nnnjjj123
2020-11-02 4a31ede53d0e237921282de08feba3b6ed545e4f
右击菜单
9 files modified
414 ■■■■■ changed files
config.json 12 ●●●●● patch | view | raw | blame | history
libs/Cesium/dc.base.min.js 34 ●●●● patch | view | raw | blame | history
libs/Cesium/dc.core.min.css 2 ●●● patch | view | raw | blame | history
libs/Cesium/dc.core.min.js 2 ●●● patch | view | raw | blame | history
widgets/ContextMenu/Widget.html 5 ●●●● patch | view | raw | blame | history
widgets/ContextMenu/Widget.js 264 ●●●●● patch | view | raw | blame | history
widgets/ContextMenu/css/style.css 77 ●●●●● patch | view | raw | blame | history
widgets/Layermanagement/Widget.js 6 ●●●● patch | view | raw | blame | history
widgets/Measurement/Widget.js 12 ●●●●● patch | view | raw | blame | history
config.json
@@ -169,7 +169,19 @@
          "height": "320px",
          "relativeTo": "map"
        }
      },
      {
        "name": "测试",
        "uri": "widgets/cs/Widget",
        "position": {
          "right": 10,
          "top": 96,
          "width": "350px",
          "height": "320px",
          "relativeTo": "map"
      }
      }
    ],
    "groups": [],
    "panel": {
libs/Cesium/dc.base.min.js
@@ -1,19 +1,45 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DC",[],t):"object"==typeof exports?exports.DC=t():e.DC=t()}(window,(function(){return function(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i(i.s=232)}([function(e,t){var i={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},r={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},n=Object.prototype.toString,a=Array.prototype,o=a.forEach,s=a.filter,l=a.slice,c=a.map,u=a.reduce,d={};function h(e){if(null==e||"object"!=typeof e)return e;var t=e,a=n.call(e);if("[object Array]"===a){if(!S(e)){t=[];for(var o=0,s=e.length;o<s;o++)t[o]=h(e[o])}}else if(r[a]){if(!S(e)){var l=e.constructor;if(e.constructor.from)t=l.from(e);else{t=new l(e.length);for(o=0,s=e.length;o<s;o++)t[o]=h(e[o])}}}else if(!i[a]&&!S(e)&&!b(e))for(var c in t={},e)e.hasOwnProperty(c)&&(t[c]=h(e[c]));return t}function p(e,t,i){if(!C(t)||!C(e))return i?h(t):e;for(var r in t)if(t.hasOwnProperty(r)){var n=e[r],a=t[r];!C(a)||!C(n)||v(a)||v(n)||b(a)||b(n)||x(a)||x(n)||S(a)||S(n)?!i&&r in e||(e[r]=h(t[r])):p(n,a,i)}return e}function f(e,t,i){for(var r in t)t.hasOwnProperty(r)&&(i?null!=t[r]:null==e[r])&&(e[r]=t[r]);return e}var m,g=function(){return d.createCanvas()};function y(e,t,i){if(e&&t)if(e.forEach&&e.forEach===o)e.forEach(t,i);else if(e.length===+e.length)for(var r=0,n=e.length;r<n;r++)t.call(i,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(i,e[a],a,e)}function _(e,t){var i=l.call(arguments,2);return function(){return e.apply(t,i.concat(l.call(arguments)))}}function v(e){return"[object Array]"===n.call(e)}function C(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function x(e){return!!i[n.call(e)]}function b(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}d.createCanvas=function(){return document.createElement("canvas")};function S(e){return e.__ec_primitive__}function T(e){var t=v(e);this.data={};var i=this;function r(e,r){t?i.set(e,r):i.set(r,e)}e instanceof T?e.each(r):e&&y(e,r)}T.prototype={constructor:T,get:function(e){return this.data.hasOwnProperty(e)?this.data[e]:null},set:function(e,t){return this.data[e]=t},each:function(e,t){for(var i in void 0!==t&&(e=_(e,t)),this.data)this.data.hasOwnProperty(i)&&e(this.data[i],i)},removeKey:function(e){delete this.data[e]}},t.$override=function(e,t){"createCanvas"===e&&(m=null),d[e]=t},t.clone=h,t.merge=p,t.mergeAll=function(e,t){for(var i=e[0],r=1,n=e.length;r<n;r++)i=p(i,e[r],t);return i},t.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},t.defaults=f,t.createCanvas=g,t.getContext=function(){return m||(m=g().getContext("2d")),m},t.indexOf=function(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i}return-1},t.inherits=function(e,t){var i=e.prototype;function r(){}for(var n in r.prototype=t.prototype,e.prototype=new r,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);e.prototype.constructor=e,e.superClass=t},t.mixin=function(e,t,i){f(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,i)},t.isArrayLike=function(e){if(e)return"string"!=typeof e&&"number"==typeof e.length},t.each=y,t.map=function(e,t,i){if(e&&t){if(e.map&&e.map===c)return e.map(t,i);for(var r=[],n=0,a=e.length;n<a;n++)r.push(t.call(i,e[n],n,e));return r}},t.reduce=function(e,t,i,r){if(e&&t){if(e.reduce&&e.reduce===u)return e.reduce(t,i,r);for(var n=0,a=e.length;n<a;n++)i=t.call(r,i,e[n],n,e);return i}},t.filter=function(e,t,i){if(e&&t){if(e.filter&&e.filter===s)return e.filter(t,i);for(var r=[],n=0,a=e.length;n<a;n++)t.call(i,e[n],n,e)&&r.push(e[n]);return r}},t.find=function(e,t,i){if(e&&t)for(var r=0,n=e.length;r<n;r++)if(t.call(i,e[r],r,e))return e[r]},t.bind=_,t.curry=function(e){var t=l.call(arguments,1);return function(){return e.apply(this,t.concat(l.call(arguments)))}},t.isArray=v,t.isFunction=function(e){return"function"==typeof e},t.isString=function(e){return"[object String]"===n.call(e)},t.isObject=C,t.isBuiltInObject=x,t.isTypedArray=function(e){return!!r[n.call(e)]},t.isDom=b,t.eqNaN=function(e){return e!=e},t.retrieve=function(e){for(var t=0,i=arguments.length;t<i;t++)if(null!=arguments[t])return arguments[t]},t.retrieve2=function(e,t){return null!=e?e:t},t.retrieve3=function(e,t,i){return null!=e?e:null!=t?t:i},t.slice=function(){return Function.call.apply(l,arguments)},t.normalizeCssArray=function(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e},t.assert=function(e,t){if(!e)throw new Error(t)},t.trim=function(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},t.setAsPrimitive=function(e){e.__ec_primitive__=!0},t.isPrimitive=S,t.createHashMap=function(e){return new T(e)},t.concatArray=function(e,t){for(var i=new e.constructor(e.length+t.length),r=0;r<e.length;r++)i[r]=e[r];var n=e.length;for(r=0;r<t.length;r++)i[r+n]=t[r];return i},t.noop=function(){}},function(e,t,i){i(5).__DEV__;var r=i(78),n=i(0),a=i(23),o=i(11),s=i(100),l=i(39),c=i(157),u=i(170),d=i(20),h=i(305),p=i(306),f=i(308),m=i(13),g=i(14),y=i(84),_=i(24),v=i(2),C=i(4),x=i(33).throttle,b=i(309),S=i(310),T=i(311),E=i(312),w=i(313),A=i(314);i(171);var P=i(109),D=n.assert,M=n.each,I=n.isFunction,R=n.isObject,O=m.parseClassType,L={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},N="__flagInMainProcess",F=/^[a-zA-Z0-9_]+$/;function B(e,t){return function(i,r,n){t||!this._disposed?(i=i&&i.toLowerCase(),l.prototype[e].call(this,i,r,n)):this.id}}function V(){l.call(this)}function k(e,t,i){i=i||{},"string"==typeof t&&(t=ce[t]),this.id,this.group,this._dom=e;var a=this._zr=r.init(e,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=x(n.bind(a.flush,a),17),(t=n.clone(t))&&p(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new d;var o,c,h=this._api=(c=(o=this)._coordSysMgr,n.extend(new u(o),{getCoordinateSystems:n.bind(c.getCoordinateSystems,c),getComponentByElement:function(e){for(;e;){var t=e.__ecComponentInfo;if(null!=t)return o._model.getComponent(t.mainType,t.index);e=e.parent}}}));function f(e,t){return e.__prio-t.__prio}s(le,f),s(ae,f),this._scheduler=new E(this,h,ae,le),l.call(this,this._ecEventProcessor=new ie),this._messageCenter=new V,this._initEvents(),this.resize=n.bind(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),function(e,t){e.on("rendered",(function(){t.trigger("rendered"),!e.animation.isFinished()||t.__optionUpdated||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(a,this),n.setAsPrimitive(this)}V.prototype.on=B("on",!0),V.prototype.off=B("off",!0),V.prototype.one=B("one",!0),n.mixin(V,l);var z=k.prototype;function G(e,t,i){if(this._disposed)this.id;else{var r,n=this._model,a=this._coordSysMgr.getCoordinateSystems();t=C.parseFinder(n,t);for(var o=0;o<a.length;o++){var s=a[o];if(s[e]&&null!=(r=s[e](n,t,i)))return r}}}z._onframe=function(){if(!this._disposed){var e=this._scheduler;if(this.__optionUpdated){var t=this.__optionUpdated.silent;this[N]=!0,$(this),U.update.call(this),this[N]=!1,this.__optionUpdated=!1,q.call(this,t),Y.call(this,t)}else if(e.unfinished){var i=1,r=this._model,n=this._api;e.unfinished=!1;do{var a=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),W(this,r),e.performVisualTasks(r),J(this,this._model,n,"remain"),i-=+new Date-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},z.getDom=function(){return this._dom},z.getZr=function(){return this._zr},z.setOption=function(e,t,i){if(this._disposed)this.id;else{var r;if(R(t)&&(i=t.lazyUpdate,r=t.silent,t=t.notMerge),this[N]=!0,!this._model||t){var n=new h(this._api),a=this._theme,o=this._model=new c;o.scheduler=this._scheduler,o.init(null,null,a,n)}this._model.setOption(e,oe),i?(this.__optionUpdated={silent:r},this[N]=!1):($(this),U.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this[N]=!1,q.call(this,r),Y.call(this,r))}},z.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},z.getModel=function(){return this._model},z.getOption=function(){return this._model&&this._model.getOption()},z.getWidth=function(){return this._zr.getWidth()},z.getHeight=function(){return this._zr.getHeight()},z.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},z.getRenderedCanvas=function(e){if(o.canvasSupported)return(e=e||{}).pixelRatio=e.pixelRatio||1,e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},z.getSvgDataURL=function(){if(o.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return n.each(t,(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},z.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,i=this._model,r=[],n=this;M(t,(function(e){i.eachComponent({mainType:e},(function(e){var t=n._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return M(r,(function(e){e.group.ignore=!1})),a}this.id},z.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(o.canvasSupported){var t="svg"===e.type,i=this.group,a=Math.min,s=Math.max;if(he[i]){var l=1/0,c=1/0,u=-1/0,d=-1/0,h=[],p=e&&e.pixelRatio||1;n.each(de,(function(r,o){if(r.group===i){var p=t?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(n.clone(e)),f=r.getDom().getBoundingClientRect();l=a(f.left,l),c=a(f.top,c),u=s(f.right,u),d=s(f.bottom,d),h.push({dom:p,left:f.left,top:f.top})}}));var f=(u*=p)-(l*=p),m=(d*=p)-(c*=p),g=n.createCanvas(),y=r.init(g,{renderer:t?"svg":"canvas"});if(y.resize({width:f,height:m}),t){var _="";return M(h,(function(e){var t=e.left-l,i=e.top-c;_+='<g transform="translate('+t+","+i+')">'+e.dom+"</g>"})),y.painter.getSvgRoot().innerHTML=_,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return e.connectedBackgroundColor&&y.add(new v.Rect({shape:{x:0,y:0,width:f,height:m},style:{fill:e.connectedBackgroundColor}})),M(h,(function(e){var t=new v.Image({style:{x:e.left*p-l,y:e.top*p-c,image:e.dom}});y.add(t)})),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},z.convertToPixel=n.curry(G,"convertToPixel"),z.convertFromPixel=n.curry(G,"convertFromPixel"),z.containPixel=function(e,t){if(!this._disposed){var i,r=this._model;return e=C.parseFinder(r,e),n.each(e,(function(e,r){r.indexOf("Models")>=0&&n.each(e,(function(e){var n=e.coordinateSystem;if(n&&n.containPoint)i|=!!n.containPoint(t);else if("seriesModels"===r){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(i|=a.containPoint(t,e))}}),this)}),this),!!i}this.id},z.getVisual=function(e,t){var i=this._model,r=(e=C.parseFinder(i,e,{defaultMainType:"series"})).seriesModel.getData(),n=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?r.indexOfRawIndex(e.dataIndex):null;return null!=n?r.getItemVisual(n,t):r.getVisual(t)},z.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},z.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]};var U={prepareAndUpdate:function(e){$(this),U.update.call(this,e)},update:function(e){var t=this._model,i=this._api,r=this._zr,n=this._coordSysMgr,s=this._scheduler;if(t){s.restoreData(t,e),s.performSeriesTasks(t),n.create(t,i),s.performDataProcessorTasks(t,e),W(this,t),n.update(t,i),Q(t),s.performVisualTasks(t,e),Z(this,t,i,e);var l=t.get("backgroundColor")||"transparent";if(o.canvasSupported)r.setBackgroundColor(l);else{var c=a.parse(l);l=a.stringify(c,"rgb"),0===c[3]&&(l="transparent")}K(t,i)}},updateTransform:function(e){var t=this._model,i=this,r=this._api;if(t){var a=[];t.eachComponent((function(n,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,r,e);l&&l.update&&a.push(s)}else a.push(s)}));var o=n.createHashMap();t.eachSeries((function(n){var a=i._chartsMap[n.__viewId];if(a.updateTransform){var s=a.updateTransform(n,t,r,e);s&&s.update&&o.set(n.uid,1)}else o.set(n.uid,1)})),Q(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:o}),J(i,t,r,e,o),K(t,this._api)}},updateView:function(e){var t=this._model;t&&(_.markUpdateMethod(e,"updateView"),Q(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),Z(this,this._model,this._api,e),K(t,this._api))},updateVisual:function(e){U.update.call(this,e)},updateLayout:function(e){U.update.call(this,e)}};function $(e){var t=e._model,i=e._scheduler;i.restorePipelines(t),i.prepareStageTasks(),X(e,"component",t,i),X(e,"chart",t,i),i.plan()}function H(e,t,i,r,a){var o=e._model;if(r){var s={};s[r+"Id"]=i[r+"Id"],s[r+"Index"]=i[r+"Index"],s[r+"Name"]=i[r+"Name"];var l={mainType:r,query:s};a&&(l.subType=a);var c=i.excludeSeriesId;null!=c&&(c=n.createHashMap(C.normalizeToArray(c))),o&&o.eachComponent(l,(function(t){c&&null!=c.get(t.id)||u(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else M(e._componentsViews.concat(e._chartsViews),u);function u(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,i)}}function W(e,t){var i=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,i[e.__viewId])}))}function j(e,t){var i=e.type,r=e.escapeConnect,a=re[i],o=a.actionInfo,s=(o.update||"update").split(":"),l=s.pop();s=null!=s[0]&&O(s[0]),this[N]=!0;var c=[e],u=!1;e.batch&&(u=!0,c=n.map(e.batch,(function(t){return(t=n.defaults(n.extend({},t),e)).batch=null,t})));var d,h=[],p="highlight"===i||"downplay"===i;M(c,(function(e){(d=(d=a.action(e,this._model,this._api))||n.extend({},e)).type=o.event||d.type,h.push(d),p?H(this,l,e,"series"):s&&H(this,l,e,s.main,s.sub)}),this),"none"===l||p||s||(this.__optionUpdated?($(this),U.update.call(this,e),this.__optionUpdated=!1):U[l].call(this,e)),d=u?{type:o.event||i,escapeConnect:r,batch:h}:h[0],this[N]=!1,!t&&this._messageCenter.trigger(d.type,d)}function q(e){for(var t=this._pendingActions;t.length;){var i=t.shift();j.call(this,i,e)}}function Y(e){!e&&this.trigger("updated")}function X(e,t,i,r){for(var n="component"===t,a=n?e._componentsViews:e._chartsViews,o=n?e._componentsMap:e._chartsMap,s=e._zr,l=e._api,c=0;c<a.length;c++)a[c].__alive=!1;function u(e){var t="_ec_"+e.id+"_"+e.type,c=o[t];if(!c){var u=O(e.type);(c=new(n?y.getClass(u.main,u.sub):_.getClass(u.sub))).init(i,l),o[t]=c,a.push(c),s.add(c.group)}e.__viewId=c.__id=t,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!n&&r.prepareView(c,e,i,l)}n?i.eachComponent((function(e,t){"series"!==e&&u(t)})):i.eachSeries(u);for(c=0;c<a.length;){var d=a[c];d.__alive?c++:(!n&&d.renderTask.dispose(),s.remove(d.group),d.dispose(i,l),a.splice(c,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function Q(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function Z(e,t,i,r){!function(e,t,i,r,n){M(n||e._componentsViews,(function(e){var n=e.__model;e.render(n,t,i,r),te(n,e)}))}(e,t,i,r),M(e._chartsViews,(function(e){e.__alive=!1})),J(e,t,i,r),M(e._chartsViews,(function(e){e.__alive||e.remove(t,i)}))}function J(e,t,i,r,n){var a,s=e._scheduler;t.eachSeries((function(t){var i=e._chartsMap[t.__viewId];i.__alive=!0;var o=i.renderTask;s.updatePayload(o,r),n&&n.get(t.uid)&&o.dirty(),a|=o.perform(s.getPerformArgs(o)),i.group.silent=!!t.get("silent"),te(t,i),function(e,t){var i=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==i&&e.setStyle("blend",i),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",i)}))}))}(t,i)})),s.unfinished|=a,function(e,t){var i=e._zr.storage,r=0;i.traverse((function(e){r++})),r>t.get("hoverLayerThreshold")&&!o.node&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var i=e._chartsMap[t.__viewId];i.__alive&&i.group.traverse((function(e){e.useHoverLayer=!0}))}}))}(e,t),S(e._zr.dom,t)}function K(e,t){M(se,(function(i){i(e,t)}))}z.resize=function(e){if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var i=t.resetOption("media"),r=e&&e.silent;this[N]=!0,i&&$(this),U.update.call(this),this[N]=!1,q.call(this,r),Y.call(this,r)}}},z.showLoading=function(e,t){if(this._disposed)this.id;else if(R(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),ue[e]){var i=ue[e](this._api,t),r=this._zr;this._loadingFX=i,r.add(i)}},z.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},z.makeActionFromEvent=function(e){var t=n.extend({},e);return t.type=ne[e.type],t},z.dispatchAction=function(e,t){this._disposed?this.id:(R(t)||(t={silent:!!t}),re[e.type]&&this._model&&(this[N]?this._pendingActions.push(e):(j.call(this,e,t.silent),t.flush?this._zr.flush(!0):!1!==t.flush&&o.browser.weChat&&this._throttledZrFlush(),q.call(this,t.silent),Y.call(this,t.silent))))},z.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},z.on=B("on",!1),z.off=B("off",!1),z.one=B("one",!1);var ee=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function te(e,t){var i=e.get("z"),r=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=r&&(e.zlevel=r))}))}function ie(){this.eventInfo}z._initEvents=function(){M(ee,(function(e){var t=function(t){var i,r=this.getModel(),a=t.target;if("globalout"===e)i={};else if(a&&null!=a.dataIndex){var o=a.dataModel||r.getSeriesByIndex(a.seriesIndex);i=o&&o.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(i=n.extend({},a.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var c=s&&null!=l&&r.getComponent(s,l),u=c&&this["series"===c.mainType?"_chartsMap":"_componentsMap"][c.__viewId];i.event=t,i.type=e,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:i,model:c,view:u},this.trigger(e,i)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),M(ne,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),this)}),this)},z.isDisposed=function(){return this._disposed},z.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},z.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,C.setAttribute(this.getDom(),me,"");var e=this._api,t=this._model;M(this._componentsViews,(function(i){i.dispose(t,e)})),M(this._chartsViews,(function(i){i.dispose(t,e)})),this._zr.dispose(),delete de[this.id]}},n.mixin(k,l),ie.prototype={constructor:ie,normalizeQuery:function(e){var t={},i={},r={};if(n.isString(e)){var a=O(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};n.each(e,(function(e,n){for(var a=!1,l=0;l<o.length;l++){var c=o[l],u=n.lastIndexOf(c);if(u>0&&u===n.length-c.length){var d=n.slice(0,u);"data"!==d&&(t.mainType=d,t[c.toLowerCase()]=e,a=!0)}}s.hasOwnProperty(n)&&(i[n]=e,a=!0),a||(r[n]=e)}))}return{cptQuery:t,dataQuery:i,otherQuery:r}},filter:function(e,t,i){var r=this.eventInfo;if(!r)return!0;var n=r.targetEl,a=r.packedEvent,o=r.model,s=r.view;if(!o||!s)return!0;var l=t.cptQuery,c=t.dataQuery;return u(l,o,"mainType")&&u(l,o,"subType")&&u(l,o,"index","componentIndex")&&u(l,o,"name")&&u(l,o,"id")&&u(c,a,"name")&&u(c,a,"dataIndex")&&u(c,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,a));function u(e,t,i,r){return null==e[i]||t[r||i]===e[i]}},afterTrigger:function(){this.eventInfo=null}};var re={},ne={},ae=[],oe=[],se=[],le=[],ce={},ue={},de={},he={},pe=new Date-0,fe=new Date-0,me="_echarts_instance_";function ge(e){he[e]=!1}var ye=ge;function _e(e){return de[C.getAttribute(e,me)]}function ve(e,t){ce[e]=t}function Ce(e){oe.push(e)}function xe(e,t){Te(ae,e,t,1e3)}function be(e,t,i){"function"==typeof t&&(i=t,t="");var r=R(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,D(F.test(r)&&F.test(t)),re[r]||(re[r]={action:i,actionInfo:e}),ne[t]=r}function Se(e,t){Te(le,e,t,3e3,"visual")}function Te(e,t,i,r,n){(I(t)||R(t))&&(i=t,t=r);var a=E.wrapStageHandler(i,n);return a.__prio=t,a.__raw=i,e.push(a),a}function Ee(e,t){ue[e]=t}Se(2e3,b),Ce(p),xe(900,f),Ee("default",T),be({type:"highlight",event:"highlight",update:"highlight"},n.noop),be({type:"downplay",event:"downplay",update:"downplay"},n.noop),ve("light",w),ve("dark",A);t.version="4.9.0",t.dependencies={zrender:"4.3.2"},t.PRIORITY=L,t.init=function(e,t,i){var r=_e(e);if(r)return r;var n=new k(e,t,i);return n.id="ec_"+pe++,de[n.id]=n,C.setAttribute(e,me,n.id),function(e){var t="__connectUpdateStatus";function i(e,i){for(var r=0;r<e.length;r++){e[r][t]=i}}M(ne,(function(r,n){e._messageCenter.on(n,(function(r){if(he[e.group]&&0!==e[t]){if(r&&r.escapeConnect)return;var n=e.makeActionFromEvent(r),a=[];M(de,(function(t){t!==e&&t.group===e.group&&a.push(t)})),i(a,0),M(a,(function(e){1!==e[t]&&e.dispatchAction(n)})),i(a,2)}}))}))}(n),n},t.connect=function(e){if(n.isArray(e)){var t=e;e=null,M(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+fe++,M(t,(function(t){t.group=e}))}return he[e]=!0,e},t.disConnect=ge,t.disconnect=ye,t.dispose=function(e){"string"==typeof e?e=de[e]:e instanceof k||(e=_e(e)),e instanceof k&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=_e,t.getInstanceById=function(e){return de[e]},t.registerTheme=ve,t.registerPreprocessor=Ce,t.registerProcessor=xe,t.registerPostUpdate=function(e){se.push(e)},t.registerAction=be,t.registerCoordinateSystem=function(e,t){d.register(e,t)},t.getCoordinateSystemDimensions=function(e){var t=d.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.registerLayout=function(e,t){Te(le,e,t,1e3,"layout")},t.registerVisual=Se,t.registerLoading=Ee,t.extendComponentModel=function(e){return m.extend(e)},t.extendComponentView=function(e){return y.extend(e)},t.extendSeriesModel=function(e){return g.extend(e)},t.extendChartView=function(e){return _.extend(e)},t.setCanvasCreator=function(e){n.$override("createCanvas",e)},t.registerMap=function(e,t,i){P.registerMap(e,t,i)},t.getMap=function(e){var t=P.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={};var we=i(173);!function(){for(var e in we)we.hasOwnProperty(e)&&(t[e]=we[e])}()},function(e,t,i){var r=i(0),n=i(158),a=i(23),o=i(15),s=i(8),l=i(10),c=i(79),u=i(48);t.Image=u;var d=i(40);t.Group=d;var h=i(41);t.Text=h;var p=i(163);t.Circle=p;var f=i(294);t.Sector=f;var m=i(295);t.Ring=m;var g=i(165);t.Polygon=g;var y=i(167);t.Polyline=y;var _=i(103);t.Rect=_;var v=i(168);t.Line=v;var C=i(298);t.BezierCurve=C;var x=i(299);t.Arc=x;var b=i(300);t.CompoundPath=b;var S=i(105);t.LinearGradient=S;var T=i(301);t.RadialGradient=T;var E=i(9);t.BoundingRect=E;var w=i(106);t.IncrementalDisplayable=w;var A=i(104),P=Math.max,D=Math.min,M={},I=1,R={},O={};function L(e,t){O[e]=t}function N(e,t,i,r){var a=n.createFromString(e,t);return i&&("center"===r&&(i=F(i,a.getBoundingRect())),V(a,i)),a}function F(e,t){var i,r=t.width/t.height,n=e.height*r;return i=n<=e.width?e.height:(n=e.width)/r,{x:e.x+e.width/2-n/2,y:e.y+e.height/2-i/2,width:n,height:i}}var B=n.mergePath;function V(e,t){if(e.applyTransform){var i=e.getBoundingRect().calculateTransform(t);e.applyTransform(i)}}var k=A.subPixelOptimize;function z(e){return null!=e&&"none"!==e}var G=r.createHashMap(),U=0;function $(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var i=e.__zr,r=e.useHoverLayer&&i&&"canvas"===i.painter.type;if(e.__highlighted=r?"layer":"plain",!(e.isGroup||!i&&e.useHoverLayer)){var n=e,a=e.style;r&&(a=(n=i.addHover(e)).style),ae(a),r||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var i=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var r=e.style;for(var n in t)null!=t[n]&&(i[n]=r[n]);i.fill=r.fill,i.stroke=r.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(n),a.extendFrom(t),H(a,t,"fill"),H(a,t,"stroke"),ne(a),r||(e.dirty(!1),e.z2+=1)}}}function H(e,t,i){!z(t[i])&&z(e[i])&&(e[i]=function(e){if("string"!=typeof e)return e;var t=G.get(e);return t||(t=a.lift(e,-.1),U<1e4&&(G.set(e,t),U++)),t}(e[i]))}function W(e){var t=e.__highlighted;if(t&&(e.__highlighted=!1,!e.isGroup))if("layer"===t)e.__zr&&e.__zr.removeHover(e);else{var i=e.style,r=e.__cachedNormalStl;r&&(ae(i),e.setStyle(r),ne(i));var n=e.__cachedNormalZ2;null!=n&&e.z2-n==1&&(e.z2=n)}}function j(e,t,i){var r,n="normal",a="normal";e.__highlighted&&(n="emphasis",r=!0),t(e,i),e.__highlighted&&(a="emphasis",r=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,i)})),r&&e.__highDownOnUpdate&&e.__highDownOnUpdate(n,a)}function q(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,W(e),$(e))}function Y(e){!J(this,e)&&!this.__highByOuter&&j(this,$)}function X(e){!J(this,e)&&!this.__highByOuter&&j(this,W)}function Q(e){this.__highByOuter|=1<<(e||0),j(this,$)}function Z(e){!(this.__highByOuter&=~(1<<(e||0)))&&j(this,W)}function J(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function K(e,t){var i=!1===t;if(e.__highDownSilentOnTouch=e.highDownSilentOnTouch,e.__highDownOnUpdate=e.highDownOnUpdate,!i||e.__highDownDispatcher){var r=i?"off":"on";e[r]("mouseover",Y)[r]("mouseout",X),e[r]("emphasis",Q)[r]("normal",Z),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!i}}function ee(e,t,i,n,a){return te(e,t,n,a),i&&r.extend(e,i),e}function te(e,t,i,n){if((i=i||M).isRectText){var a;i.getTextPosition?a=i.getTextPosition(t,n):"outside"===(a=t.getShallow("position")||(n?null:"inside"))&&(a="top"),e.textPosition=a,e.textOffset=t.getShallow("offset");var o=t.getShallow("rotate");null!=o&&(o*=Math.PI/180),e.textRotation=o,e.textDistance=r.retrieve2(t.getShallow("distance"),n?null:5)}var s,l=t.ecModel,c=l&&l.option.textStyle,u=function(e){var t;for(;e&&e!==e.ecModel;){var i=(e.option||M).rich;if(i)for(var r in t=t||{},i)i.hasOwnProperty(r)&&(t[r]=1);e=e.parentModel}return t}(t);if(u)for(var d in s={},u)if(u.hasOwnProperty(d)){var h=t.getModel(["rich",d]);ie(s[d]={},h,c,i,n)}return e.rich=s,ie(e,t,c,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),e}function ie(e,t,i,n,a,o){i=!a&&i||M,e.textFill=re(t.getShallow("color"),n)||i.color,e.textStroke=re(t.getShallow("textBorderColor"),n)||i.textBorderColor,e.textStrokeWidth=r.retrieve2(t.getShallow("textBorderWidth"),i.textBorderWidth),a||(o&&(e.insideRollbackOpt=n,ne(e)),null==e.textFill&&(e.textFill=n.autoColor)),e.fontStyle=t.getShallow("fontStyle")||i.fontStyle,e.fontWeight=t.getShallow("fontWeight")||i.fontWeight,e.fontSize=t.getShallow("fontSize")||i.fontSize,e.fontFamily=t.getShallow("fontFamily")||i.fontFamily,e.textAlign=t.getShallow("align"),e.textVerticalAlign=t.getShallow("verticalAlign")||t.getShallow("baseline"),e.textLineHeight=t.getShallow("lineHeight"),e.textWidth=t.getShallow("width"),e.textHeight=t.getShallow("height"),e.textTag=t.getShallow("tag"),o&&n.disableBox||(e.textBackgroundColor=re(t.getShallow("backgroundColor"),n),e.textPadding=t.getShallow("padding"),e.textBorderColor=re(t.getShallow("borderColor"),n),e.textBorderWidth=t.getShallow("borderWidth"),e.textBorderRadius=t.getShallow("borderRadius"),e.textBoxShadowColor=t.getShallow("shadowColor"),e.textBoxShadowBlur=t.getShallow("shadowBlur"),e.textBoxShadowOffsetX=t.getShallow("shadowOffsetX"),e.textBoxShadowOffsetY=t.getShallow("shadowOffsetY")),e.textShadowColor=t.getShallow("textShadowColor")||i.textShadowColor,e.textShadowBlur=t.getShallow("textShadowBlur")||i.textShadowBlur,e.textShadowOffsetX=t.getShallow("textShadowOffsetX")||i.textShadowOffsetX,e.textShadowOffsetY=t.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function re(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function ne(e){var t,i=e.textPosition,r=e.insideRollbackOpt;if(r&&null==e.textFill){var n=r.autoColor,a=r.isRectText,o=r.useInsideStyle,s=!1!==o&&(!0===o||a&&i&&"string"==typeof i&&i.indexOf("inside")>=0),l=!s&&null!=n;(s||l)&&(t={textFill:e.textFill,textStroke:e.textStroke,textStrokeWidth:e.textStrokeWidth}),s&&(e.textFill="#fff",null==e.textStroke&&(e.textStroke=n,null==e.textStrokeWidth&&(e.textStrokeWidth=2))),l&&(e.textFill=n)}e.insideRollback=t}function ae(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function oe(e,t,i,r,n,a){if("function"==typeof n&&(a=n,n=null),r&&r.isAnimationEnabled()){var o=e?"Update":"",s=r.getShallow("animationDuration"+o),l=r.getShallow("animationEasing"+o),c=r.getShallow("animationDelay"+o);"function"==typeof c&&(c=c(n,r.getAnimationDelayParams?r.getAnimationDelayParams(t,n):null)),"function"==typeof s&&(s=s(n)),s>0?t.animateTo(i,s,c||0,l,a,!!a):(t.stopAnimation(),t.attr(i),a&&a())}else t.stopAnimation(),t.attr(i),a&&a()}function se(e,t,i,r,n){oe(!0,e,t,i,r,n)}function le(e,t,i){return t&&!r.isArrayLike(t)&&(t=c.getLocalTransform(t)),i&&(t=o.invert([],t)),s.applyTransform([],e,t)}function ce(e,t,i,r,n,a,o,s){var l,c=i-e,u=r-t,d=o-n,h=s-a,p=ue(d,h,c,u);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-n,m=t-a,g=ue(f,m,c,u)/p;if(g<0||g>1)return!1;var y=ue(f,m,d,h)/p;return!(y<0||y>1)}function ue(e,t,i,r){return e*r-i*t}L("circle",p),L("sector",f),L("ring",m),L("polygon",g),L("polyline",y),L("rect",_),L("line",v),L("bezierCurve",C),L("arc",x),t.Z2_EMPHASIS_LIFT=1,t.CACHED_LABEL_STYLE_PROPERTIES={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},t.extendShape=function(e){return l.extend(e)},t.extendPath=function(e,t){return n.extendFromString(e,t)},t.registerShape=L,t.getShapeClass=function(e){if(O.hasOwnProperty(e))return O[e]},t.makePath=N,t.makeImage=function(e,t,i){var r=new u({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===i){var n={width:e.width,height:e.height};r.setStyle(F(t,n))}}});return r},t.mergePath=B,t.resizePath=V,t.subPixelOptimizeLine=function(e){return A.subPixelOptimizeLine(e.shape,e.shape,e.style),e},t.subPixelOptimizeRect=function(e){return A.subPixelOptimizeRect(e.shape,e.shape,e.style),e},t.subPixelOptimize=k,t.setElementHoverStyle=q,t.setHoverStyle=function(e,t){K(e,!0),j(e,q,t)},t.setAsHighDownDispatcher=K,t.isHighDownDispatcher=function(e){return!(!e||!e.__highDownDispatcher)},t.getHighlightDigit=function(e){var t=R[e];return null==t&&I<=32&&(t=R[e]=I++),t},t.setLabelStyle=function(e,t,i,n,a,o,s){var l,c=(a=a||M).labelFetcher,u=a.labelDataIndex,d=a.labelDimIndex,h=a.labelProp,p=i.getShallow("show"),f=n.getShallow("show");(p||f)&&(c&&(l=c.getFormattedLabel(u,"normal",null,d,h)),null==l&&(l=r.isFunction(a.defaultText)?a.defaultText(u,a):a.defaultText));var m=p?l:null,g=f?r.retrieve2(c?c.getFormattedLabel(u,"emphasis",null,d,h):null,l):null;null==m&&null==g||(ee(e,i,o,a),ee(t,n,s,a,!0)),e.text=m,t.text=g},t.modifyLabelStyle=function(e,t,i){var n=e.style;t&&(ae(n),e.setStyle(t),ne(n)),n=e.__hoverStl,i&&n&&(ae(n),r.extend(n,i),ne(n))},t.setTextStyle=ee,t.setText=function(e,t,i){var r,n={isRectText:!0};!1===i?r=!0:n.autoColor=i,te(e,t,n,r)},t.getFont=function(e,t){var i=t&&t.getModel("textStyle");return r.trim([e.fontStyle||i&&i.getShallow("fontStyle")||"",e.fontWeight||i&&i.getShallow("fontWeight")||"",(e.fontSize||i&&i.getShallow("fontSize")||12)+"px",e.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))},t.updateProps=se,t.initProps=function(e,t,i,r,n){oe(!1,e,t,i,r,n)},t.getTransform=function(e,t){for(var i=o.identity([]);e&&e!==t;)o.mul(i,e.getLocalTransform(),i),e=e.parent;return i},t.applyTransform=le,t.transformDirection=function(e,t,i){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),n=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),a=["left"===e?-r:"right"===e?r:0,"top"===e?-n:"bottom"===e?n:0];return a=le(a,t,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},t.groupTransition=function(e,t,i,n){if(e&&t){var a,o=(a={},e.traverse((function(e){!e.isGroup&&e.anid&&(a[e.anid]=e)})),a);t.traverse((function(e){if(!e.isGroup&&e.anid){var t=o[e.anid];if(t){var r=l(e);e.attr(l(t)),se(e,r,i,e.dataIndex)}}}))}function l(e){var t={position:s.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=r.extend({},e.shape)),t}},t.clipPointsByRect=function(e,t){return r.map(e,(function(e){var i=e[0];i=P(i,t.x),i=D(i,t.x+t.width);var r=e[1];return r=P(r,t.y),[i,r=D(r,t.y+t.height)]}))},t.clipRectByRect=function(e,t){var i=P(e.x,t.x),r=D(e.x+e.width,t.x+t.width),n=P(e.y,t.y),a=D(e.y+e.height,t.y+t.height);if(r>=i&&a>=n)return{x:i,y:n,width:r-i,height:a-n}},t.createIcon=function(e,t,i){var n=(t=r.extend({rectHover:!0},t)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(n.image=e.slice(8),r.defaults(n,i),new u(t)):N(e.replace("path://",""),t,i,"center")},t.linePolygonIntersect=function(e,t,i,r,n){for(var a=0,o=n[n.length-1];a<n.length;a++){var s=n[a];if(ce(e,t,i,r,s[0],s[1],o[0],o[1]))return!0;o=s}},t.lineLineIntersect=ce},function(e,t,i){var r=i(0);var n=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function a(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}t.linearMap=function(e,t,i,r){var n=t[1]-t[0],a=i[1]-i[0];if(0===n)return 0===a?i[0]:(i[0]+i[1])/2;if(r)if(n>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/n*a+i[0]},t.parsePercent=function(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?(i=e,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var i},t.round=function(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e},t.asc=function(e){return e.sort((function(e,t){return e-t})),e},t.getPrecision=function(e){if(e=+e,isNaN(e))return 0;for(var t=1,i=0;Math.round(e*t)/t!==e;)t*=10,i++;return i},t.getPrecisionSafe=function(e){var t=e.toString(),i=t.indexOf("e");if(i>0){var r=+t.slice(i+1);return r<0?-r:0}var n=t.indexOf(".");return n<0?0:t.length-1-n},t.getPixelPrecision=function(e,t){var i=Math.log,r=Math.LN10,n=Math.floor(i(e[1]-e[0])/r),a=Math.round(i(Math.abs(t[1]-t[0]))/r),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20},t.getPercentWithPrecision=function(e,t,i){if(!e[t])return 0;var n=r.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return 0;for(var a=Math.pow(10,i),o=r.map(e,(function(e){return(isNaN(e)?0:e)/n*a*100})),s=100*a,l=r.map(o,(function(e){return Math.floor(e)})),c=r.reduce(l,(function(e,t){return e+t}),0),u=r.map(o,(function(e,t){return e-l[t]}));c<s;){for(var d=Number.NEGATIVE_INFINITY,h=null,p=0,f=u.length;p<f;++p)u[p]>d&&(d=u[p],h=p);++l[h],u[h]=0,++c}return l[t]/a},t.MAX_SAFE_INTEGER=9007199254740991,t.remRadian=function(e){var t=2*Math.PI;return(e%t+t)%t},t.isRadianAroundZero=function(e){return e>-1e-4&&e<1e-4},t.parseDate=function(e){if(e instanceof Date)return e;if("string"==typeof e){var t=n.exec(e);if(!t)return new Date(NaN);if(t[8]){var i=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(i-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,i,+(t[5]||0),+t[6]||0,+t[7]||0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,+t[7]||0)}return null==e?new Date(NaN):new Date(Math.round(e))},t.quantity=function(e){return Math.pow(10,a(e))},t.quantityExponent=a,t.nice=function(e,t){var i=a(e),r=Math.pow(10,i),n=e/r;return e=(t?n<1.5?1:n<2.5?2:n<4?3:n<7?5:10:n<1?1:n<2?2:n<3?3:n<5?5:10)*r,i>=-20?+e.toFixed(i<0?-i:0):e},t.quantile=function(e,t){var i=(e.length-1)*t+1,r=Math.floor(i),n=+e[r-1],a=i-r;return a?n+a*(e[r]-n):n},t.reformIntervals=function(e){e.sort((function(e,t){return function e(t,i,r){return t.interval[r]<i.interval[r]||t.interval[r]===i.interval[r]&&(t.close[r]-i.close[r]==(r?-1:1)||!r&&e(t,i,1))}(e,t,0)?-1:1}));for(var t=-1/0,i=1,r=0;r<e.length;){for(var n=e[r].interval,a=e[r].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,a[o]=o?1:1-i),t=n[o],i=a[o];n[0]===n[1]&&a[0]*a[1]!=1?e.splice(r,1):r++}return e},t.isNumeric=function(e){return e-parseFloat(e)>=0}},function(e,t,i){var r=i(0),n=i(11),a=r.each,o=r.isObject,s=r.isArray;function l(e){return e instanceof Array?e:null==e?[]:[e]}function c(e){return o(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var u=0;function d(e,t){return e&&e.hasOwnProperty(t)}t.normalizeToArray=l,t.defaultEmphasis=function(e,t,i){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,n=i.length;r<n;r++){var a=i[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}},t.TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],t.getDataItemValue=function(e){return!o(e)||s(e)||e instanceof Date?e:e.value},t.isDataItemOption=function(e){return o(e)&&!(e instanceof Array)},t.mappingToExists=function(e,t){t=(t||[]).slice();var i=r.map(e||[],(function(e,t){return{exist:e}}));return a(t,(function(e,r){if(o(e)){for(var n=0;n<i.length;n++)if(!i[n].option&&null!=e.id&&i[n].exist.id===e.id+"")return i[n].option=e,void(t[r]=null);for(n=0;n<i.length;n++){var a=i[n].exist;if(!(i[n].option||null!=a.id&&null!=e.id||null==e.name||c(e)||c(a)||a.name!==e.name+""))return i[n].option=e,void(t[r]=null)}}})),a(t,(function(e,t){if(o(e)){for(var r=0;r<i.length;r++){var n=i[r].exist;if(!i[r].option&&!c(n)&&null==e.id){i[r].option=e;break}}r>=i.length&&i.push({option:e})}})),i},t.makeIdAndName=function(e){var t=r.createHashMap();a(e,(function(e,i){var r=e.exist;r&&t.set(r.id,e)})),a(e,(function(e,i){var n=e.option;r.assert(!n||null==n.id||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})})),a(e,(function(e,i){var r=e.exist,n=e.option,a=e.keyInfo;if(o(n)){if(a.name=null!=n.name?n.name+"":r?r.name:"series\0"+i,r)a.id=r.id;else if(null!=n.id)a.id=n.id+"";else{var s=0;do{a.id="\0"+a.name+"\0"+s++}while(t.get(a.id))}t.set(a.id,e)}}))},t.isNameSpecified=function(e){var t=e.name;return!(!t||!t.indexOf("series\0"))},t.isIdInner=c,t.compressBatches=function(e,t){var i={},r={};return n(e||[],i),n(t||[],r,i),[a(i),a(r)];function n(e,t,i){for(var r=0,n=e.length;r<n;r++)for(var a=e[r].seriesId,o=l(e[r].dataIndex),s=i&&i[a],c=0,u=o.length;c<u;c++){var d=o[c];s&&s[d]?s[d]=null:(t[a]||(t[a]={}))[d]=1}}function a(e,t){var i=[];for(var r in e)if(e.hasOwnProperty(r)&&null!=e[r])if(t)i.push(+r);else{var n=a(e[r],!0);n.length&&i.push({seriesId:r,dataIndex:n})}return i}},t.queryDataIndex=function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?r.isArray(t.dataIndex)?r.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?r.isArray(t.name)?r.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},t.makeInner=function(){var e="__\0ec_inner_"+u+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},t.parseFinder=function(e,t,i){if(r.isString(t)){var n={};n[t+"Index"]=0,t=n}var o=i&&i.defaultMainType;!o||d(t,o+"Index")||d(t,o+"Id")||d(t,o+"Name")||(t[o+"Index"]=0);var s={};return a(t,(function(n,a){n=t[a];if("dataIndex"!==a&&"dataIndexInside"!==a){var o=a.match(/^(\w+)(Index|Id|Name)$/)||[],l=o[1],c=(o[2]||"").toLowerCase();if(!(!l||!c||null==n||"index"===c&&"none"===n||i&&i.includeMainTypes&&r.indexOf(i.includeMainTypes,l)<0)){var u={mainType:l};"index"===c&&"all"===n||(u[c]=n);var d=e.queryComponents(u);s[l+"Models"]=d,s[l+"Model"]=d[0]}}else s[a]=n})),s},t.setAttribute=function(e,t,i){e.setAttribute?e.setAttribute(t,i):e[t]=i},t.getAttribute=function(e,t){return e.getAttribute?e.getAttribute(t):e[t]},t.getTooltipRenderMode=function(e){return"auto"===e?n.domSupported?"html":"richText":e||"html"},t.groupData=function(e,t){var i=r.createHashMap(),n=[];return r.each(e,(function(e){var r=t(e);(i.get(r)||(n.push(r),i.set(r,[]))).push(e)})),{keys:n,buckets:i}}},function(e,t,i){(function(e){var i;"undefined"!=typeof window?i=window.__DEV__:void 0!==e&&(i=e.__DEV__),void 0===i&&(i=!0);var r=i;t.__DEV__=r}).call(this,i(16))},function(e,t,i){var r=i(0),n=i(9),a=i(3).parsePercent,o=i(7),s=r.each,l=["left","right","top","bottom","width","height"],c=[["width","left","right"],["height","top","bottom"]];function u(e,t,i,r,n){var a=0,o=0;null==r&&(r=1/0),null==n&&(n=1/0);var s=0;t.eachChild((function(l,c){var u,d,h=l.position,p=l.getBoundingRect(),f=t.childAt(c+1),m=f&&f.getBoundingRect();if("horizontal"===e){var g=p.width+(m?-m.x+p.x:0);(u=a+g)>r||l.newline?(a=0,u=g,o+=s+i,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(m?-m.y+p.y:0);(d=o+y)>n||l.newline?(a+=s+i,o=0,d=y,s=p.width):s=Math.max(s,p.width)}l.newline||(h[0]=a,h[1]=o,"horizontal"===e?a=u+i:o=d+i)}))}var d=u,h=r.curry(u,"vertical"),p=r.curry(u,"horizontal");function f(e,t,i){i=o.normalizeCssArray(i||0);var r=t.width,s=t.height,l=a(e.left,r),c=a(e.top,s),u=a(e.right,r),d=a(e.bottom,s),h=a(e.width,r),p=a(e.height,s),f=i[2]+i[0],m=i[1]+i[3],g=e.aspect;switch(isNaN(h)&&(h=r-u-m-l),isNaN(p)&&(p=s-d-f-c),null!=g&&(isNaN(h)&&isNaN(p)&&(g>r/s?h=.8*r:p=.8*s),isNaN(h)&&(h=g*p),isNaN(p)&&(p=h/g)),isNaN(l)&&(l=r-u-h-m),isNaN(c)&&(c=s-d-p-f),e.left||e.right){case"center":l=r/2-h/2-i[3];break;case"right":l=r-h-m}switch(e.top||e.bottom){case"middle":case"center":c=s/2-p/2-i[0];break;case"bottom":c=s-p-f}l=l||0,c=c||0,isNaN(h)&&(h=r-m-l-(u||0)),isNaN(p)&&(p=s-f-c-(d||0));var y=new n(l+i[3],c+i[0],h,p);return y.margin=i,y}function m(e,t){return t&&e&&s(l,(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}t.LOCATION_PARAMS=l,t.HV_NAMES=c,t.box=d,t.vbox=h,t.hbox=p,t.getAvailableSize=function(e,t,i){var r=t.width,n=t.height,s=a(e.x,r),l=a(e.y,n),c=a(e.x2,r),u=a(e.y2,n);return(isNaN(s)||isNaN(parseFloat(e.x)))&&(s=0),(isNaN(c)||isNaN(parseFloat(e.x2)))&&(c=r),(isNaN(l)||isNaN(parseFloat(e.y)))&&(l=0),(isNaN(u)||isNaN(parseFloat(e.y2)))&&(u=n),i=o.normalizeCssArray(i||0),{width:Math.max(c-s-i[1]-i[3],0),height:Math.max(u-l-i[0]-i[2],0)}},t.getLayoutRect=f,t.positionElement=function(e,t,i,a,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],c=o&&o.boundingMode||"all";if(s||l){var u;if("raw"===c)u="group"===e.type?new n(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(u=e.getBoundingRect(),e.needLocalTransform()){var d=e.getLocalTransform();(u=u.clone()).applyTransform(d)}t=f(r.defaults({width:u.width,height:u.height},t),i,a);var h=e.position,p=s?t.x-u.x:0,m=l?t.y-u.y:0;e.attr("position","raw"===c?[p,m]:[h[0]+p,h[1]+m])}},t.sizeCalculable=function(e,t){return null!=e[c[t][0]]||null!=e[c[t][1]]&&null!=e[c[t][2]]},t.mergeLayoutParam=function(e,t,i){!r.isObject(i)&&(i={});var n=i.ignoreSize;!r.isArray(n)&&(n=[n,n]);var a=l(c[0],0),o=l(c[1],1);function l(i,r){var a={},o=0,l={},c=0;if(s(i,(function(t){l[t]=e[t]})),s(i,(function(e){u(t,e)&&(a[e]=l[e]=t[e]),d(a,e)&&o++,d(l,e)&&c++})),n[r])return d(t,i[1])?l[i[2]]=null:d(t,i[2])&&(l[i[1]]=null),l;if(2!==c&&o){if(o>=2)return a;for(var h=0;h<i.length;h++){var p=i[h];if(!u(a,p)&&u(e,p)){a[p]=e[p];break}}return a}return l}function u(e,t){return e.hasOwnProperty(t)}function d(e,t){return null!=e[t]&&"auto"!==e[t]}function h(e,t,i){s(e,(function(e){t[e]=i[e]}))}h(c[0],e,a),h(c[1],e,o)},t.getLayoutParams=function(e){return m({},e)},t.copyLayoutParams=m},function(e,t,i){var r=i(0),n=i(17),a=i(3);var o=r.normalizeCssArray,s=/([&<>"'])/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function c(e){return null==e?"":(e+"").replace(s,(function(e,t){return l[t]}))}var u=["a","b","c","d","e","f","g"],d=function(e,t){return"{"+e+(null==t?"":t)+"}"};function h(e,t){return"0000".substr(0,t-(e+="").length)+e}var p=n.truncateText;t.addCommas=function(e){return isNaN(e)?"-":(e=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")},t.toCamelCase=function(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e},t.normalizeCssArray=o,t.encodeHTML=c,t.formatTpl=function(e,t,i){r.isArray(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],o=0;o<a.length;o++){var s=u[o];e=e.replace(d(s),d(s,0))}for(var l=0;l<n;l++)for(var h=0;h<a.length;h++){var p=t[l][a[h]];e=e.replace(d(u[h],l),i?c(p):p)}return e},t.formatTplSimple=function(e,t,i){return r.each(t,(function(t,r){e=e.replace("{"+r+"}",i?c(t):t)})),e},t.getTooltipMarker=function(e,t){var i=(e=r.isString(e)?{color:e,extraCssText:t}:e||{}).color,n=e.type,a=(t=e.extraCssText,e.renderMode||"html"),o=e.markerId||"X";return i?"html"===a?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+c(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+c(i)+";"+(t||"")+'"></span>':{renderMode:a,content:"{marker"+o+"|}  ",style:{color:i}}:""},t.formatTime=function(e,t,i){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var r=a.parseDate(t),n=i?"UTC":"",o=r["get"+n+"FullYear"](),s=r["get"+n+"Month"]()+1,l=r["get"+n+"Date"](),c=r["get"+n+"Hours"](),u=r["get"+n+"Minutes"](),d=r["get"+n+"Seconds"](),p=r["get"+n+"Milliseconds"]();return e=e.replace("MM",h(s,2)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",h(l,2)).replace("d",l).replace("hh",h(c,2)).replace("h",c).replace("mm",h(u,2)).replace("m",u).replace("ss",h(d,2)).replace("s",d).replace("SSS",h(p,3))},t.capitalFirst=function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},t.truncateText=p,t.getTextBoundingRect=function(e){return n.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},t.getTextRect=function(e,t,i,r,a,o,s,l){return n.getBoundingRect(e,t,i,r,a,l,o,s)},t.windowOpen=function(e,t){if("_blank"===t||"blank"===t){var i=window.open();i.opener=null,i.location=e}else window.open(e,t)}},function(e,t){var i="undefined"==typeof Float32Array?Array:Float32Array;function r(e){return Math.sqrt(a(e))}var n=r;function a(e){return e[0]*e[0]+e[1]*e[1]}var o=a;function s(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var l=s;function c(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var u=c;t.create=function(e,t){var r=new i(2);return null==e&&(e=0),null==t&&(t=0),r[0]=e,r[1]=t,r},t.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},t.clone=function(e){var t=new i(2);return t[0]=e[0],t[1]=e[1],t},t.set=function(e,t,i){return e[0]=t,e[1]=i,e},t.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},t.scaleAndAdd=function(e,t,i,r){return e[0]=t[0]+i[0]*r,e[1]=t[1]+i[1]*r,e},t.sub=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},t.len=r,t.length=n,t.lenSquare=a,t.lengthSquare=o,t.mul=function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},t.div=function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},t.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},t.scale=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},t.normalize=function(e,t){var i=r(t);return 0===i?(e[0]=0,e[1]=0):(e[0]=t[0]/i,e[1]=t[1]/i),e},t.distance=s,t.dist=l,t.distanceSquare=c,t.distSquare=u,t.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},t.lerp=function(e,t,i,r){return e[0]=t[0]+r*(i[0]-t[0]),e[1]=t[1]+r*(i[1]-t[1]),e},t.applyTransform=function(e,t,i){var r=t[0],n=t[1];return e[0]=i[0]*r+i[2]*n+i[4],e[1]=i[1]*r+i[3]*n+i[5],e},t.min=function(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e},t.max=function(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}},function(e,t,i){var r,n,a,o,s=i(8),l=i(15),c=s.applyTransform,u=Math.min,d=Math.max;function h(e,t,i,r){i<0&&(e+=i,i=-i),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=i,this.height=r}h.prototype={constructor:h,union:function(e){var t=u(e.x,this.x),i=u(e.y,this.y);this.width=d(e.x+e.width,this.x+this.width)-t,this.height=d(e.y+e.height,this.y+this.height)-i,this.x=t,this.y=i},applyTransform:(r=[],n=[],a=[],o=[],function(e){if(e){r[0]=a[0]=this.x,r[1]=o[1]=this.y,n[0]=o[0]=this.x+this.width,n[1]=a[1]=this.y+this.height,c(r,r,e),c(n,n,e),c(a,a,e),c(o,o,e),this.x=u(r[0],n[0],a[0],o[0]),this.y=u(r[1],n[1],a[1],o[1]);var t=d(r[0],n[0],a[0],o[0]),i=d(r[1],n[1],a[1],o[1]);this.width=t-this.x,this.height=i-this.y}}),calculateTransform:function(e){var t=this,i=e.width/t.width,r=e.height/t.height,n=l.create();return l.translate(n,n,[-t.x,-t.y]),l.scale(n,n,[i,r]),l.translate(n,n,[e.x,e.y]),n},intersect:function(e){if(!e)return!1;e instanceof h||(e=h.create(e));var t=this,i=t.x,r=t.x+t.width,n=t.y,a=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,c=e.y+e.height;return!(r<o||s<i||a<l||c<n)},contain:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},clone:function(){return new h(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},h.create=function(e){return new h(e.x,e.y,e.width,e.height)};var p=h;e.exports=p},function(e,t,i){var r=i(61),n=i(0),a=i(50),o=i(290),s=i(153).prototype.getCanvasPattern,l=Math.abs,c=new a(!0);function u(e){r.call(this,e),this.path=null}u.prototype={constructor:u,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var i,r=this.style,n=this.path||c,a=r.hasStroke(),o=r.hasFill(),l=r.fill,u=r.stroke,d=o&&!!l.colorStops,h=a&&!!u.colorStops,p=o&&!!l.image,f=a&&!!u.image;(r.bind(e,this,t),this.setTransform(e),this.__dirty)&&(d&&(i=i||this.getBoundingRect(),this._fillGradient=r.getGradient(e,l,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=r.getGradient(e,u,i)));d?e.fillStyle=this._fillGradient:p&&(e.fillStyle=s.call(l,e)),h?e.strokeStyle=this._strokeGradient:f&&(e.strokeStyle=s.call(u,e));var m=r.lineDash,g=r.lineDashOffset,y=!!e.setLineDash,_=this.getGlobalScale();if(n.setScale(_[0],_[1],this.segmentIgnoreThreshold),this.__dirtyPath||m&&!y&&a?(n.beginPath(e),m&&!y&&(n.setLineDash(m),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=r.fillOpacity){var v=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,n.fill(e),e.globalAlpha=v}else n.fill(e);if(m&&y&&(e.setLineDash(m),e.lineDashOffset=g),a)if(null!=r.strokeOpacity){v=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,n.stroke(e),e.globalAlpha=v}else n.stroke(e);m&&y&&e.setLineDash([]),null!=r.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,i){},createPathProxy:function(){this.path=new a},getBoundingRect:function(){var e=this._rect,t=this.style,i=!e;if(i){var r=this.path;r||(r=this.path=new a),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),e=r.getBoundingRect()}if(this._rect=e,t.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||i){n.copy(e);var o=t.lineWidth,s=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),s>1e-10&&(n.width+=o/s,n.height+=o/s,n.x-=o/s/2,n.y-=o/s/2)}return n}return e},contain:function(e,t){var i=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),n=this.style;if(e=i[0],t=i[1],r.contain(e,t)){var a=this.path.data;if(n.hasStroke()){var s=n.lineWidth,l=n.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(n.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),o.containStroke(a,s/l,e,t)))return!0}if(n.hasFill())return o.contain(a,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var i=this.shape;if(i){if(n.isObject(e))for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r]);else i[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&l(e[0]-1)>1e-10&&l(e[3]-1)>1e-10?Math.sqrt(l(e[0]*e[3]-e[2]*e[1])):1}},u.extend=function(e){var t=function(t){u.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var i=e.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var n in i)!r.hasOwnProperty(n)&&i.hasOwnProperty(n)&&(r[n]=i[n])}e.init&&e.init.call(this,t)};for(var i in n.inherits(t,u),e)"style"!==i&&"shape"!==i&&(t.prototype[i]=e[i]);return t},n.inherits(u,r);var d=u;e.exports=d},function(e,t){var i="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(e){var t={},i=e.match(/Firefox\/([\d.]+)/),r=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),n=e.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(e);i&&(t.firefox=!0,t.version=i[1]);r&&(t.ie=!0,t.version=r[1]);n&&(t.edge=!0,t.version=n[1]);a&&(t.weChat=!0);return{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&t.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent);e.exports=i},function(e,t,i){var r=i(0),n=i(11),a=i(4).makeInner,o=i(28),s=o.enableClassExtend,l=o.enableClassCheck,c=i(287),u=i(288),d=i(289),h=i(302),p=r.mixin,f=a();function m(e,t,i){this.parentModel=t,this.ecModel=i,this.option=e}function g(e,t,i){for(var r=0;r<t.length&&(!t[r]||null!=(e=e&&"object"==typeof e?e[t[r]]:null));r++);return null==e&&i&&(e=i.get(t)),e}function y(e,t){var i=f(e).getParent;return i?i.call(e,t):e.parentModel}m.prototype={constructor:m,init:null,mergeOption:function(e){r.merge(this.option,e,!0)},get:function(e,t){return null==e?this.option:g(this.option,this.parsePath(e),!t&&y(this,e))},getShallow:function(e,t){var i=this.option,r=null==i?i:i[e],n=!t&&y(this,e);return null==r&&n&&(r=n.getShallow(e)),r},getModel:function(e,t){var i;return new m(null==e?this.option:g(this.option,e=this.parsePath(e)),t=t||(i=y(this,e))&&i.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(r.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){f(this).getParent=e},isAnimationEnabled:function(){if(!n.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},s(m),l(m),p(m,c),p(m,u),p(m,d),p(m,h);var _=m;e.exports=_},function(e,t,i){var r=i(0),n=i(12),a=i(63),o=i(28),s=o.enableClassManagement,l=o.parseClassType,c=i(4).makeInner,u=i(6),d=i(303),h=c(),p=n.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,i,r){n.call(this,e,t,i,r),this.uid=a.getUID("ec_cpt_model")},init:function(e,t,i,r){this.mergeDefaultAndTheme(e,i)},mergeDefaultAndTheme:function(e,t){var i=this.layoutMode,n=i?u.getLayoutParams(e):{},a=t.getTheme();r.merge(e,a.get(this.mainType)),r.merge(e,this.getDefaultOption()),i&&u.mergeLayoutParam(e,n,i)},mergeOption:function(e,t){r.merge(this.option,e,!0);var i=this.layoutMode;i&&u.mergeLayoutParam(this.option,e,i)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=h(this);if(!e.defaultOption){for(var t=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&t.push(n),i=i.superClass}for(var a={},o=t.length-1;o>=0;o--)a=r.merge(a,t[o],!0);e.defaultOption=a}return e.defaultOption},getReferringComponents:function(e){return this.ecModel.queryComponents({mainType:e,index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)})}});s(p,{registerWhenExtend:!0}),a.enableSubTypeDefaulter(p),a.enableTopologicalTravel(p,(function(e){var t=[];r.each(p.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=r.map(t,(function(e){return l(e).main})),"dataset"!==e&&r.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),r.mixin(p,d);var f=p;e.exports=f},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(11),a=i(7),o=a.formatTime,s=a.encodeHTML,l=a.addCommas,c=a.getTooltipMarker,u=i(4),d=i(13),h=i(169),p=i(107),f=i(6),m=f.getLayoutParams,g=f.mergeLayoutParam,y=i(108).createTask,_=i(29),v=_.prepareSource,C=_.getSource,x=i(42).retrieveRawValue,b=u.makeInner(),S=d.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(e,t,i,r){this.seriesIndex=this.componentIndex,this.dataTask=y({count:E,reset:w}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i),v(this);var n=this.getInitialData(e,i);P(n,this),this.dataTask.context.data=n,b(this).dataBeforeProcessed=n,T(this)},mergeDefaultAndTheme:function(e,t){var i=this.layoutMode,n=i?m(e):{},a=this.subType;d.hasClass(a)&&(a+="Series"),r.merge(e,t.getTheme().get(this.subType)),r.merge(e,this.getDefaultOption()),u.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&g(e,n,i)},mergeOption:function(e,t){e=r.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var i=this.layoutMode;i&&g(this.option,e,i),v(this);var n=this.getInitialData(e,t);P(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,b(this).dataBeforeProcessed=n,T(this)},fillDataTextStyle:function(e){if(e&&!r.isTypedArray(e))for(var t=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&u.defaultEmphasis(e[i],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=M(this);if(t){var i=t.context.data;return null==e?i:i.getLinkedData(e)}return b(this).data},setData:function(e){var t=M(this);if(t){var i=t.context;i.data!==e&&t.modifyOutputEnd&&t.setOutputEnd(e.count()),i.outputData=e,t!==this.dataTask&&(i.data=e)}b(this).data=e},getSource:function(){return C(this)},getRawData:function(){return b(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,i,n){var a=this,d="html"===(n=n||"html")?"<br/>":"\n",h="richText"===n,p={},f=0;function m(e){return{renderMode:n,content:s(l(e)),style:p}}var g=this.getData(),y=g.mapDimension("defaultedTooltip",!0),_=y.length,v=this.getRawValue(e),C=r.isArray(v),b=g.getItemVisual(e,"color");r.isObject(b)&&b.colorStops&&(b=(b.colorStops[0]||{}).color),b=b||"transparent";var S=(_>1||C&&!_?function(i){var u=r.reduce(i,(function(e,t,i){var r=g.getDimensionInfo(i);return e|(r&&!1!==r.tooltip&&null!=r.displayName)}),0),d=[];function m(e,i){var r=g.getDimensionInfo(i);if(r&&!1!==r.otherDims.tooltip){var m=r.type,y="sub"+a.seriesIndex+"at"+f,_=c({color:b,type:"subItem",renderMode:n,markerId:y}),v="string"==typeof _?_:_.content,C=(u?v+s(r.displayName||"-")+": ":"")+s("ordinal"===m?e+"":"time"===m?t?"":o("yyyy/MM/dd hh:mm:ss",e):l(e));C&&d.push(C),h&&(p[y]=b,++f)}}y.length?r.each(y,(function(t){m(x(g,e,t),t)})):r.each(i,m);var _=u?h?"\n":"<br/>":"",v=_+d.join(_||", ");return{renderMode:n,content:v,style:p}}(v):m(_?x(g,e,y[0]):C?v[0]:v)).content,T=a.seriesIndex+"at"+f,E=c({color:b,type:"item",renderMode:n,markerId:T});p[T]=b,++f;var w=g.getName(e),A=this.name;u.isNameSpecified(this)||(A=""),A=A?s(A)+(t?": ":d):"";var P="string"==typeof E?E:E.content;return{html:t?P+A+S:A+P+(w?s(w)+": "+S:S),markers:p}},isAnimationEnabled:function(){if(n.node)return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),e},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(e,t,i){var r=this.ecModel,n=h.getColorFromPalette.call(this,e,t,i);return n||(n=r.getColorFromPalette(e,t,i)),n},coordDimToDataDim:function(e){return this.getRawData().mapDimension(e,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function T(e){var t=e.name;u.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),i=t.mapDimension("seriesName",!0),n=[];return r.each(i,(function(e){var i=t.getDimensionInfo(e);i.displayName&&n.push(i.displayName)})),n.join(" ")}(e)||t)}function E(e){return e.model.getRawData().count()}function w(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),A}function A(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function P(e,t){r.each(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,r.curry(D,t))}))}function D(e){var t=M(e);t&&t.setOutputEnd(this.count())}function M(e){var t=(e.ecModel||{}).scheduler,i=t&&t.getPipeline(e.uid);if(i){var r=i.currentTask;if(r){var n=r.agentStubMap;n&&(r=n.get(e.uid))}return r}}r.mixin(S,p),r.mixin(S,h);var I=S;e.exports=I},function(e,t){var i="undefined"==typeof Float32Array?Array:Float32Array;function r(){var e=new i(6);return n(e),e}function n(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}t.create=r,t.identity=n,t.copy=a,t.mul=function(e,t,i){var r=t[0]*i[0]+t[2]*i[1],n=t[1]*i[0]+t[3]*i[1],a=t[0]*i[2]+t[2]*i[3],o=t[1]*i[2]+t[3]*i[3],s=t[0]*i[4]+t[2]*i[5]+t[4],l=t[1]*i[4]+t[3]*i[5]+t[5];return e[0]=r,e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},t.translate=function(e,t,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+i[0],e[5]=t[5]+i[1],e},t.rotate=function(e,t,i){var r=t[0],n=t[2],a=t[4],o=t[1],s=t[3],l=t[5],c=Math.sin(i),u=Math.cos(i);return e[0]=r*u+o*c,e[1]=-r*c+o*u,e[2]=n*u+s*c,e[3]=-n*c+u*s,e[4]=u*a+c*l,e[5]=u*l-c*a,e},t.scale=function(e,t,i){var r=i[0],n=i[1];return e[0]=t[0]*r,e[1]=t[1]*n,e[2]=t[2]*r,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*n,e},t.invert=function(e,t){var i=t[0],r=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=i*o-a*r;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-r*l,e[3]=i*l,e[4]=(r*s-o*n)*l,e[5]=(a*n-i*s)*l,e):null},t.clone=function(e){var t=r();return a(t,e),t}},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){var r=i(9),n=i(102),a=i(0),o=a.getContext,s=a.extend,l=a.retrieve2,c=a.retrieve3,u=a.trim,d={},h=0,p=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,f={};function m(e,t){var i=e+":"+(t=t||"12px sans-serif");if(d[i])return d[i];for(var r=(e+"").split("\n"),n=0,a=0,o=r.length;a<o;a++)n=Math.max(T(r[a],t).width,n);return h>5e3&&(h=0,d={}),h++,d[i]=n,n}function g(e,t,i){return"right"===i?e-=t:"center"===i&&(e-=t/2),e}function y(e,t,i){return"middle"===i?e-=t/2:"bottom"===i&&(e-=t),e}function _(e,t,i){var r=t.textPosition,n=t.textDistance,a=i.x,o=i.y;n=n||0;var s=i.height,l=i.width,c=s/2,u="left",d="top";switch(r){case"left":a-=n,o+=c,u="right",d="middle";break;case"right":a+=n+l,o+=c,d="middle";break;case"top":a+=l/2,o-=n,u="center",d="bottom";break;case"bottom":a+=l/2,o+=s+n,u="center";break;case"inside":a+=l/2,o+=c,u="center",d="middle";break;case"insideLeft":a+=n,o+=c,d="middle";break;case"insideRight":a+=l-n,o+=c,u="right",d="middle";break;case"insideTop":a+=l/2,o+=n,u="center";break;case"insideBottom":a+=l/2,o+=s-n,u="center",d="bottom";break;case"insideTopLeft":a+=n,o+=n;break;case"insideTopRight":a+=l-n,o+=n,u="right";break;case"insideBottomLeft":a+=n,o+=s-n,d="bottom";break;case"insideBottomRight":a+=l-n,o+=s-n,u="right",d="bottom"}return(e=e||{}).x=a,e.y=o,e.textAlign=u,e.textVerticalAlign=d,e}function v(e,t,i,r,n){if(!t)return"";var a=(e+"").split("\n");n=C(t,i,r,n);for(var o=0,s=a.length;o<s;o++)a[o]=x(a[o],n);return a.join("\n")}function C(e,t,i,r){(r=s({},r)).font=t;i=l(i,"...");r.maxIterations=l(r.maxIterations,2);var n=r.minChar=l(r.minChar,0);r.cnCharWidth=m("国",t);var a=r.ascCharWidth=m("a",t);r.placeholder=l(r.placeholder,"");for(var o=e=Math.max(0,e-1),c=0;c<n&&o>=a;c++)o-=a;var u=m(i,t);return u>o&&(i="",u=0),o=e-u,r.ellipsis=i,r.ellipsisWidth=u,r.contentWidth=o,r.containerWidth=e,r}function x(e,t){var i=t.containerWidth,r=t.font,n=t.contentWidth;if(!i)return"";var a=m(e,r);if(a<=i)return e;for(var o=0;;o++){if(a<=n||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?b(e,n,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*n/a):0;a=m(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function b(e,t,i,r){for(var n=0,a=0,o=e.length;a<o&&n<t;a++){var s=e.charCodeAt(a);n+=0<=s&&s<=127?i:r}return a}function S(e){return m("国",e)}function T(e,t){return f.measureText(e,t)}function E(e,t,i,r,n){null!=e&&(e+="");var a=l(r,S(t)),o=e?e.split("\n"):[],s=o.length*a,c=s,u=!0;if(i&&(c+=i[0]+i[2]),e&&n){u=!1;var d=n.outerHeight,h=n.outerWidth;if(null!=d&&c>d)e="",o=[];else if(null!=h)for(var p=C(h-(i?i[1]+i[3]:0),t,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),f=0,m=o.length;f<m;f++)o[f]=x(o[f],p)}return{lines:o,height:s,outerHeight:c,lineHeight:a,canCacheByTextString:u}}function w(e,t){var i={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return i;for(var r,a=p.lastIndex=0;null!=(r=p.exec(e));){var o=r.index;o>a&&A(i,e.substring(a,o)),A(i,r[2],r[1]),a=p.lastIndex}a<e.length&&A(i,e.substring(a,e.length));var s=i.lines,u=0,d=0,h=[],f=t.textPadding,g=t.truncate,y=g&&g.outerWidth,_=g&&g.outerHeight;f&&(null!=y&&(y-=f[1]+f[3]),null!=_&&(_-=f[0]+f[2]));for(var C=0;C<s.length;C++){for(var x=s[C],b=0,T=0,E=0;E<x.tokens.length;E++){var w=(B=x.tokens[E]).styleName&&t.rich[B.styleName]||{},P=B.textPadding=w.textPadding,D=B.font=w.font||t.font,M=B.textHeight=l(w.textHeight,S(D));if(P&&(M+=P[0]+P[2]),B.height=M,B.lineHeight=c(w.textLineHeight,t.textLineHeight,M),B.textAlign=w&&w.textAlign||t.textAlign,B.textVerticalAlign=w&&w.textVerticalAlign||"middle",null!=_&&u+B.lineHeight>_)return{lines:[],width:0,height:0};B.textWidth=m(B.text,D);var I=w.textWidth,R=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))B.percentWidth=I,h.push(B),I=0;else{if(R){I=B.textWidth;var O=w.textBackgroundColor,L=O&&O.image;L&&(L=n.findExistImage(L),n.isImageReady(L)&&(I=Math.max(I,L.width*M/L.height)))}var N=P?P[1]+P[3]:0;I+=N;var F=null!=y?y-T:null;null!=F&&F<I&&(!R||F<N?(B.text="",B.textWidth=I=0):(B.text=v(B.text,F-N,D,g.ellipsis,{minChar:g.minChar}),B.textWidth=m(B.text,D),I=B.textWidth+N))}T+=B.width=I,w&&(b=Math.max(b,B.lineHeight))}x.width=T,x.lineHeight=b,u+=b,d=Math.max(d,T)}i.outerWidth=i.width=l(t.textWidth,d),i.outerHeight=i.height=l(t.textHeight,u),f&&(i.outerWidth+=f[1]+f[3],i.outerHeight+=f[0]+f[2]);for(C=0;C<h.length;C++){var B,V=(B=h[C]).percentWidth;B.width=parseInt(V,10)/100*d}return i}function A(e,t,i){for(var r=""===t,n=t.split("\n"),a=e.lines,o=0;o<n.length;o++){var s=n[o],l={styleName:i,text:s,isLineHolder:!s&&!r};if(o)a.push({tokens:[l]});else{var c=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=c.length;1===u&&c[0].isLineHolder?c[0]=l:(s||!u||r)&&c.push(l)}}}f.measureText=function(e,t){var i=o();return i.font=t||"12px sans-serif",i.measureText(e)},t.DEFAULT_FONT="12px sans-serif",t.$override=function(e,t){f[e]=t},t.getWidth=m,t.getBoundingRect=function(e,t,i,n,a,o,s,l){return s?function(e,t,i,n,a,o,s,l){var c=w(e,{rich:s,truncate:l,font:t,textAlign:i,textPadding:a,textLineHeight:o}),u=c.outerWidth,d=c.outerHeight,h=g(0,u,i),p=y(0,d,n);return new r(h,p,u,d)}(e,t,i,n,a,o,s,l):function(e,t,i,n,a,o,s){var l=E(e,t,a,o,s),c=m(e,t);a&&(c+=a[1]+a[3]);var u=l.outerHeight,d=g(0,c,i),h=y(0,u,n),p=new r(d,h,c,u);return p.lineHeight=l.lineHeight,p}(e,t,i,n,a,o,l)},t.adjustTextX=g,t.adjustTextY=y,t.calculateTextPosition=_,t.adjustTextPositionOnRect=function(e,t,i){return _({},{textPosition:e,textDistance:i},t)},t.truncateText=v,t.getLineHeight=S,t.measureText=T,t.parsePlainText=E,t.parseRichText=w,t.makeFont=function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&u(t)||e.textFont||e.font}},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(12),a=i(43),o=i(64),s=i(42),l=s.defaultDimValueGetters,c=s.DefaultDataProvider,u=i(66).summarizeDimensions,d=i(174),h=r.isObject,p={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},f="undefined"==typeof Uint32Array?Array:Uint32Array,m="undefined"==typeof Int32Array?Array:Int32Array,g="undefined"==typeof Uint16Array?Array:Uint16Array;function y(e){return e._rawCount>65535?f:g}var _=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],v=["_extent","_approximateExtent","_rawExtent"];function C(e,t){r.each(_.concat(t.__wrappedMethods||[]),(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e.__wrappedMethods=t.__wrappedMethods,r.each(v,(function(i){e[i]=r.clone(t[i])})),e._calculationInfo=r.extend(t._calculationInfo)}var x=function(e,t){e=e||["x","y"];for(var i={},n=[],a={},o=0;o<e.length;o++){var s=e[o];r.isString(s)?s=new d({name:s}):s instanceof d||(s=new d(s));var l=s.name;s.type=s.type||"float",s.coordDim||(s.coordDim=l,s.coordDimIndex=0),s.otherDims=s.otherDims||{},n.push(l),i[l]=s,s.index=o,s.createInvertedIndices&&(a[l]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=t,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=u(this),this._invertedIndicesMap=a,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},b=x.prototype;function S(e,t,i,r,n){var a=p[t.type],o=r-1,s=t.name,l=e[s][o];if(l&&l.length<i){for(var c=new a(Math.min(n-o*i,i)),u=0;u<l.length;u++)c[u]=l[u];e[s][o]=c}for(var d=r*i;d<n;d+=i)e[s].push(new a(Math.min(n-d,i)))}function T(e){var t=e._invertedIndicesMap;r.each(t,(function(i,r){var n=e._dimensionInfos[r].ordinalMeta;if(n){i=t[r]=new m(n.categories.length);for(var a=0;a<i.length;a++)i[a]=-1;for(a=0;a<e._count;a++)i[e.get(r,a)]=a}}))}function E(e,t,i){var r;if(null!=t){var n=e._chunkSize,a=Math.floor(i/n),o=i%n,s=e.dimensions[t],l=e._storage[s][a];if(l){r=l[o];var c=e._dimensionInfos[s].ordinalMeta;c&&c.categories.length&&(r=c.categories[r])}}return r}function w(e){return e}function A(e){return e<this._count&&e>=0?this._indices[e]:-1}function P(e,t){var i=e._idList[t];return null==i&&(i=E(e,e._idDimIdx,t)),null==i&&(i="e\0\0"+t),i}function D(e){return r.isArray(e)||(e=[e]),e}function M(e,t){var i=e.dimensions,n=new x(r.map(i,e.getDimensionInfo,e),e.hostModel);C(n,e);for(var a=n._storage={},o=e._storage,s=0;s<i.length;s++){var l=i[s];o[l]&&(r.indexOf(t,l)>=0?(a[l]=I(o[l]),n._rawExtent[l]=R(),n._extent[l]=null):a[l]=o[l])}return n}function I(e){for(var t,i,r=new Array(e.length),n=0;n<e.length;n++)r[n]=(t=e[n],i=void 0,(i=t.constructor)===Array?t.slice():new i(t));return r}function R(){return[1/0,-1/0]}b.type="list",b.hasItemOption=!0,b.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},b.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},b.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},b.mapDimension=function(e,t){var i=this._dimensionsSummary;if(null==t)return i.encodeFirstDimNotExtra[e];var r=i.encode[e];return!0===t?(r||[]).slice():r&&r[t]},b.initData=function(e,t,i){(o.isInstance(e)||r.isArrayLike(e))&&(e=new c(e,this.dimensions.length)),this._rawData=e,this._storage={},this._indices=null,this._nameList=t||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=l[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=l.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},b.getProvider=function(){return this._rawData},b.appendData=function(e){var t=this._rawData,i=this.count();t.appendData(e);var r=t.count();t.persistent||(r+=i),this._initDataFromProvider(i,r)},b.appendValues=function(e,t){for(var i=this._chunkSize,r=this._storage,n=this.dimensions,a=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t?t.length:0),c=this._chunkCount,u=0;u<a;u++){o[y=n[u]]||(o[y]=R()),r[y]||(r[y]=[]),S(r,this._dimensionInfos[y],i,c,l),this._chunkCount=r[y].length}for(var d=new Array(a),h=s;h<l;h++){for(var p=h-s,f=Math.floor(h/i),m=h%i,g=0;g<a;g++){var y=n[g],_=this._dimValueGetterArrayRows(e[p]||d,y,p,g);r[y][f][m]=_;var v=o[y];_<v[0]&&(v[0]=_),_>v[1]&&(v[1]=_)}t&&(this._nameList[h]=t[p])}this._rawCount=this._count=l,this._extent={},T(this)},b._initDataFromProvider=function(e,t){if(!(e>=t)){for(var i,r=this._chunkSize,n=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,c=this._nameList,u=this._idList,d=this._rawExtent,h=this._nameRepeatCount={},p=this._chunkCount,f=0;f<s;f++){d[x=o[f]]||(d[x]=R());var m=l[x];0===m.otherDims.itemName&&(i=this._nameDimIdx=f),0===m.otherDims.itemId&&(this._idDimIdx=f),a[x]||(a[x]=[]),S(a,m,r,p,t),this._chunkCount=a[x].length}for(var g=new Array(s),y=e;y<t;y++){g=n.getItem(y,g);for(var _=Math.floor(y/r),v=y%r,C=0;C<s;C++){var x,b=a[x=o[C]][_],E=this._dimValueGetter(g,x,y,C);b[v]=E;var w=d[x];E<w[0]&&(w[0]=E),E>w[1]&&(w[1]=E)}if(!n.pure){var A=c[y];if(g&&null==A)if(null!=g.name)c[y]=A=g.name;else if(null!=i){var P=o[i],D=a[P][_];if(D){A=D[v];var M=l[P].ordinalMeta;M&&M.categories.length&&(A=M.categories[A])}}var I=null==g?null:g.id;null==I&&null!=A&&(h[A]=h[A]||0,I=A,h[A]>0&&(I+="__ec__"+h[A]),h[A]++),null!=I&&(u[y]=I)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent={},T(this)}},b.count=function(){return this._count},b.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,i=this._count;if(t===Array){n=new t(i);for(var r=0;r<i;r++)n[r]=e[r]}else n=new t(e.buffer,0,i)}else{var n=new(t=y(this))(this.count());for(r=0;r<n.length;r++)n[r]=r}return n},b.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var i=this._storage;if(!i[e])return NaN;t=this.getRawIndex(t);var r=Math.floor(t/this._chunkSize),n=t%this._chunkSize;return i[e][r][n]},b.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var i=this._storage[e];if(!i)return NaN;var r=Math.floor(t/this._chunkSize),n=t%this._chunkSize;return i[r][n]},b._getFast=function(e,t){var i=Math.floor(t/this._chunkSize),r=t%this._chunkSize;return this._storage[e][i][r]},b.getValues=function(e,t){var i=[];r.isArray(e)||(t=e,e=this.dimensions);for(var n=0,a=e.length;n<a;n++)i.push(this.get(e[n],t));return i},b.hasValue=function(e){for(var t=this._dimensionsSummary.dataDimsOnCoord,i=0,r=t.length;i<r;i++)if(isNaN(this.get(t[i],e)))return!1;return!0},b.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],i=R();if(!t)return i;var r,n=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var a=(r=i)[0],o=r[1],s=0;s<n;s++){var l=this._getFast(e,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return r=[a,o],this._extent[e]=r,r},b.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},b.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},b.getCalculationInfo=function(e){return this._calculationInfo[e]},b.setCalculationInfo=function(e,t){h(e)?r.extend(this._calculationInfo,e):this._calculationInfo[e]=t},b.getSum=function(e){var t=0;if(this._storage[e])for(var i=0,r=this.count();i<r;i++){var n=this.get(e,i);isNaN(n)||(t+=n)}return t},b.getMedian=function(e){var t=[];this.each(e,(function(e,i){isNaN(e)||t.push(e)}));var i=[].concat(t).sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2==1?i[(r-1)/2]:(i[r/2]+i[r/2-1])/2},b.rawIndexOf=function(e,t){var i=(e&&this._invertedIndicesMap[e])[t];return null==i||isNaN(i)?-1:i},b.indexOfName=function(e){for(var t=0,i=this.count();t<i;t++)if(this.getName(t)===e)return t;return-1},b.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(null!=i&&i<this._count&&i===e)return e;for(var r=0,n=this._count-1;r<=n;){var a=(r+n)/2|0;if(t[a]<e)r=a+1;else{if(!(t[a]>e))return a;n=a-1}}return-1},b.indicesOfNearest=function(e,t,i){var r=[];if(!this._storage[e])return r;null==i&&(i=1/0);for(var n=1/0,a=-1,o=0,s=0,l=this.count();s<l;s++){var c=t-this.get(e,s),u=Math.abs(c);u<=i&&((u<n||u===n&&c>=0&&a<0)&&(n=u,a=c,o=0),c===a&&(r[o++]=s))}return r.length=o,r},b.getRawIndex=w,b.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],i=0;i<this.dimensions.length;i++){var r=this.dimensions[i];t.push(this.get(r,e))}return t},b.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||E(this,this._nameDimIdx,t)||""},b.getId=function(e){return P(this,this.getRawIndex(e))},b.each=function(e,t,i,n){"use strict";if(this._count){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this;for(var a=(e=r.map(D(e),this.getDimension,this)).length,o=0;o<this.count();o++)switch(a){case 0:t.call(i,o);break;case 1:t.call(i,this.get(e[0],o),o);break;case 2:t.call(i,this.get(e[0],o),this.get(e[1],o),o);break;default:for(var s=0,l=[];s<a;s++)l[s]=this.get(e[s],o);l[s]=o,t.apply(i,l)}}},b.filterSelf=function(e,t,i,n){"use strict";if(this._count){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this,e=r.map(D(e),this.getDimension,this);for(var a=this.count(),o=new(y(this))(a),s=[],l=e.length,c=0,u=e[0],d=0;d<a;d++){var h,p=this.getRawIndex(d);if(0===l)h=t.call(i,d);else if(1===l){var f=this._getFast(u,p);h=t.call(i,f,d)}else{for(var m=0;m<l;m++)s[m]=this._getFast(u,p);s[m]=d,h=t.apply(i,s)}h&&(o[c++]=p)}return c<a&&(this._indices=o),this._count=c,this._extent={},this.getRawIndex=this._indices?A:w,this}},b.selectRange=function(e){"use strict";if(this._count){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);var r=t.length;if(r){var n=this.count(),a=new(y(this))(n),o=0,s=t[0],l=e[s][0],c=e[s][1],u=!1;if(!this._indices){var d=0;if(1===r){for(var h=this._storage[t[0]],p=0;p<this._chunkCount;p++)for(var f=h[p],m=Math.min(this._count-p*this._chunkSize,this._chunkSize),g=0;g<m;g++){((b=f[g])>=l&&b<=c||isNaN(b))&&(a[o++]=d),d++}u=!0}else if(2===r){h=this._storage[s];var _=this._storage[t[1]],v=e[t[1]][0],C=e[t[1]][1];for(p=0;p<this._chunkCount;p++){f=h[p];var x=_[p];for(m=Math.min(this._count-p*this._chunkSize,this._chunkSize),g=0;g<m;g++){var b=f[g],S=x[g];(b>=l&&b<=c||isNaN(b))&&(S>=v&&S<=C||isNaN(S))&&(a[o++]=d),d++}}u=!0}}if(!u)if(1===r)for(g=0;g<n;g++){var T=this.getRawIndex(g);((b=this._getFast(s,T))>=l&&b<=c||isNaN(b))&&(a[o++]=T)}else for(g=0;g<n;g++){var E=!0;for(T=this.getRawIndex(g),p=0;p<r;p++){var P=t[p];((b=this._getFast(i,T))<e[P][0]||b>e[P][1])&&(E=!1)}E&&(a[o++]=this.getRawIndex(g))}return o<n&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?A:w,this}}},b.mapArray=function(e,t,i,r){"use strict";"function"==typeof e&&(r=i,i=t,t=e,e=[]),i=i||r||this;var n=[];return this.each(e,(function(){n.push(t&&t.apply(this,arguments))}),i),n},b.map=function(e,t,i,n){"use strict";i=i||n||this;var a=M(this,e=r.map(D(e),this.getDimension,this));a._indices=this._indices,a.getRawIndex=a._indices?A:w;for(var o=a._storage,s=[],l=this._chunkSize,c=e.length,u=this.count(),d=[],h=a._rawExtent,p=0;p<u;p++){for(var f=0;f<c;f++)d[f]=this.get(e[f],p);d[c]=p;var m=t&&t.apply(i,d);if(null!=m){"object"!=typeof m&&(s[0]=m,m=s);for(var g=this.getRawIndex(p),y=Math.floor(g/l),_=g%l,v=0;v<m.length;v++){var C=e[v],x=m[v],b=h[C],S=o[C];S&&(S[y][_]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return a},b.downSample=function(e,t,i,r){for(var n=M(this,[e]),a=n._storage,o=[],s=Math.floor(1/t),l=a[e],c=this.count(),u=this._chunkSize,d=n._rawExtent[e],h=new(y(this))(c),p=0,f=0;f<c;f+=s){s>c-f&&(s=c-f,o.length=s);for(var m=0;m<s;m++){var g=this.getRawIndex(f+m),_=Math.floor(g/u),v=g%u;o[m]=l[_][v]}var C=i(o),x=this.getRawIndex(Math.min(f+r(o,C)||0,c-1)),b=x%u;l[Math.floor(x/u)][b]=C,C<d[0]&&(d[0]=C),C>d[1]&&(d[1]=C),h[p++]=x}return n._count=p,n._indices=h,n.getRawIndex=A,n},b.getItemModel=function(e){var t=this.hostModel;return new n(this.getRawDataItem(e),t,t&&t.ecModel)},b.diff=function(e){var t=this;return new a(e?e.getIndices():[],this.getIndices(),(function(t){return P(e,t)}),(function(e){return P(t,e)}))},b.getVisual=function(e){var t=this._visual;return t&&t[e]},b.setVisual=function(e,t){if(h(e))for(var i in e)e.hasOwnProperty(i)&&this.setVisual(i,e[i]);else this._visual=this._visual||{},this._visual[e]=t},b.setLayout=function(e,t){if(h(e))for(var i in e)e.hasOwnProperty(i)&&this.setLayout(i,e[i]);else this._layout[e]=t},b.getLayout=function(e){return this._layout[e]},b.getItemLayout=function(e){return this._itemLayouts[e]},b.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?r.extend(this._itemLayouts[e]||{},t):t},b.clearItemLayouts=function(){this._itemLayouts.length=0},b.getItemVisual=function(e,t,i){var r=this._itemVisuals[e],n=r&&r[t];return null!=n||i?n:this.getVisual(t)},b.setItemVisual=function(e,t,i){var r=this._itemVisuals[e]||{},n=this.hasItemVisual;if(this._itemVisuals[e]=r,h(t))for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a],n[a]=!0);else r[t]=i,n[t]=!0},b.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var O=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};b.setItemGraphicEl=function(e,t){var i=this.hostModel;t&&(t.dataIndex=e,t.dataType=this.dataType,t.seriesIndex=i&&i.seriesIndex,"group"===t.type&&t.traverse(O,t)),this._graphicEls[e]=t},b.getItemGraphicEl=function(e){return this._graphicEls[e]},b.eachItemGraphicEl=function(e,t){r.each(this._graphicEls,(function(i,r){i&&e&&e.call(t,i,r)}))},b.cloneShallow=function(e){if(!e){var t=r.map(this.dimensions,this.getDimensionInfo,this);e=new x(t,this.hostModel)}if(e._storage=this._storage,C(e,this),this._indices){var i=this._indices.constructor;e._indices=new i(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?A:w,e},b.wrapMethod=function(e,t){var i=this[e];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=i.apply(this,arguments);return t.apply(this,[e].concat(r.slice(arguments)))})},b.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],b.CHANGABLE_METHODS=["filterSelf","selectRange"];var L=x;e.exports=L},function(e,t,i){var r=i(0),n=i(2),a=i(9),o=i(17).calculateTextPosition,s=n.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var i=t.cx,r=t.cy,n=t.width/2,a=t.height/2;e.moveTo(i,r-a),e.lineTo(i+n,r+a),e.lineTo(i-n,r+a),e.closePath()}}),l=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var i=t.cx,r=t.cy,n=t.width/2,a=t.height/2;e.moveTo(i,r-a),e.lineTo(i+n,r),e.lineTo(i,r+a),e.lineTo(i-n,r),e.closePath()}}),c=n.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var i=t.x,r=t.y,n=t.width/5*3,a=Math.max(n,t.height),o=n/2,s=o*o/(a-o),l=r-a+o+s,c=Math.asin(s/o),u=Math.cos(c)*o,d=Math.sin(c),h=Math.cos(c),p=.6*o,f=.7*o;e.moveTo(i-u,l+s),e.arc(i,l,o,Math.PI-c,2*Math.PI+c),e.bezierCurveTo(i+u-d*p,l+s+h*p,i,r-f,i,r),e.bezierCurveTo(i,r-f,i-u+d*p,l+s+h*p,i-u,l+s),e.closePath()}}),u=n.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var i=t.height,r=t.width,n=t.x,a=t.y,o=r/3*2;e.moveTo(n,a),e.lineTo(n+o,a+i),e.lineTo(n,a+i/4*3),e.lineTo(n-o,a+i),e.lineTo(n,a),e.closePath()}}),d={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:l,pin:c,arrow:u,triangle:s},h={line:function(e,t,i,r,n){n.x1=e,n.y1=t+r/2,n.x2=e+i,n.y2=t+r/2},rect:function(e,t,i,r,n){n.x=e,n.y=t,n.width=i,n.height=r},roundRect:function(e,t,i,r,n){n.x=e,n.y=t,n.width=i,n.height=r,n.r=Math.min(i,r)/4},square:function(e,t,i,r,n){var a=Math.min(i,r);n.x=e,n.y=t,n.width=a,n.height=a},circle:function(e,t,i,r,n){n.cx=e+i/2,n.cy=t+r/2,n.r=Math.min(i,r)/2},diamond:function(e,t,i,r,n){n.cx=e+i/2,n.cy=t+r/2,n.width=i,n.height=r},pin:function(e,t,i,r,n){n.x=e+i/2,n.y=t+r/2,n.width=i,n.height=r},arrow:function(e,t,i,r,n){n.x=e+i/2,n.y=t+r/2,n.width=i,n.height=r},triangle:function(e,t,i,r,n){n.cx=e+i/2,n.cy=t+r/2,n.width=i,n.height=r}},p={};r.each(d,(function(e,t){p[t]=new e}));var f=n.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,i){var r=o(e,t,i),n=this.shape;return n&&"pin"===n.symbolType&&"inside"===t.textPosition&&(r.y=i.y+.4*i.height),r},buildPath:function(e,t,i){var r=t.symbolType;if("none"!==r){var n=p[r];n||(n=p[r="rect"]),h[r](t.x,t.y,t.width,t.height,n.shape),n.buildPath(e,n.shape,i)}}});function m(e,t){if("image"!==this.type){var i=this.style,r=this.shape;r&&"line"===r.symbolType?i.stroke=e:this.__isEmptyBrush?(i.stroke=e,i.fill=t||"#fff"):(i.fill&&(i.fill=e),i.stroke&&(i.stroke=e)),this.dirty(!1)}}t.createSymbol=function(e,t,i,r,o,s,l){var c,u=0===e.indexOf("empty");return u&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(c=0===e.indexOf("image://")?n.makeImage(e.slice(8),new a(t,i,r,o),l?"center":"cover"):0===e.indexOf("path://")?n.makePath(e.slice(7),{},new a(t,i,r,o),l?"center":"cover"):new f({shape:{symbolType:e,x:t,y:i,width:r,height:o}})).__isEmptyBrush=u,c.setColor=m,c.setColor(s),c}},function(e,t,i){var r=i(0),n={};function a(){this._coordinateSystems=[]}a.prototype={constructor:a,create:function(e,t){var i=[];r.each(n,(function(r,n){var a=r.create(e,t);i=i.concat(a||[])})),this._coordinateSystems=i},update:function(e,t){r.each(this._coordinateSystems,(function(i){i.update&&i.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},a.register=function(e,t){n[e]=t},a.get=function(e){return n[e]};var o=a;e.exports=o},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(318),a=i(86),o=i(85),s=i(3),l=i(87),c=l.prepareLayoutBarSeries,u=l.makeColumnLayout,d=l.retrieveColumnLayout,h=i(9);function p(e,t){var i,n,a,o=e.type,l=t.getMin(),h=t.getMax(),p=e.getExtent();"ordinal"===o?i=t.getCategories().length:(n=t.get("boundaryGap"),r.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=s.parsePercent(n[0],1),n[1]=s.parsePercent(n[1],1),a=p[1]-p[0]||Math.abs(p[0])),"dataMin"===l?l=p[0]:"function"==typeof l&&(l=l({min:p[0],max:p[1]})),"dataMax"===h?h=p[1]:"function"==typeof h&&(h=h({min:p[0],max:p[1]}));var f=null!=l,m=null!=h;null==l&&(l="ordinal"===o?i?0:NaN:p[0]-n[0]*a),null==h&&(h="ordinal"===o?i?i-1:NaN:p[1]+n[1]*a),(null==l||!isFinite(l))&&(l=NaN),(null==h||!isFinite(h))&&(h=NaN),e.setBlank(r.eqNaN(l)||r.eqNaN(h)||"ordinal"===o&&!e.getOrdinalMeta().categories.length),t.getNeedCrossZero()&&(l>0&&h>0&&!f&&(l=0),l<0&&h<0&&!m&&(h=0));var g=t.ecModel;if(g&&"time"===o){var y,_=c("bar",g);if(r.each(_,(function(e){y|=e.getBaseAxis()===t.axis})),y){var v=u(_),C=function(e,t,i,n){var a=i.axis.getExtent(),o=a[1]-a[0],s=d(n,i.axis);if(void 0===s)return{min:e,max:t};var l=1/0;r.each(s,(function(e){l=Math.min(e.offset,l)}));var c=-1/0;r.each(s,(function(e){c=Math.max(e.offset+e.width,c)})),l=Math.abs(l),c=Math.abs(c);var u=l+c,h=t-e,p=h/(1-(l+c)/o)-h;return{min:e-=p*(l/u),max:t+=p*(c/u)}}(l,h,t,v);l=C.min,h=C.max}}return{extent:[l,h],fixMin:f,fixMax:m}}function f(e){var t,i=e.getLabelModel().get("formatter"),r="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof i?(t=i,i=function(i){return i=e.scale.getLabel(i),t.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(t,n){return null!=r&&(n=t-r),i(m(e,t),n)}:function(t){return e.scale.getLabel(t)}}function m(e,t){return"category"===e.type?e.scale.getLabel(t):t}function g(e){var t=e.get("interval");return null==t?"auto":t}i(319),i(178),t.getScaleExtent=p,t.niceScaleExtent=function(e,t){var i=p(e,t),r=i.extent,n=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var a=e.type;e.setExtent(r[0],r[1]),e.niceExtent({splitNumber:n,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:"interval"===a||"time"===a?t.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?t.get("maxInterval"):null});var o=t.get("interval");null!=o&&e.setInterval&&e.setInterval(o)},t.createScaleByModel=function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new n(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new a;default:return(o.getClass(t)||a).create(e)}},t.ifAxisCrossZero=function(e){var t=e.scale.getExtent(),i=t[0],r=t[1];return!(i>0&&r>0||i<0&&r<0)},t.makeLabelFormatter=f,t.getAxisRawValue=m,t.estimateLabelUnionRect=function(e){var t=e.model,i=e.scale;if(t.get("axisLabel.show")&&!i.isBlank()){var r,n,a="category"===e.type,o=i.getExtent();n=a?i.count():(r=i.getTicks()).length;var s,l,c,u,d,p,m,g,y,_=e.getLabelModel(),v=f(e),C=1;n>40&&(C=Math.ceil(n/40));for(var x=0;x<n;x+=C){var b=v(r?r[x]:o[0]+x),S=_.getTextRect(b),T=(l=S,c=_.get("rotate")||0,u=void 0,d=void 0,p=void 0,m=void 0,g=void 0,y=void 0,void 0,u=c*Math.PI/180,d=l.plain(),p=d.width,m=d.height,g=p*Math.abs(Math.cos(u))+Math.abs(m*Math.sin(u)),y=p*Math.abs(Math.sin(u))+Math.abs(m*Math.cos(u)),new h(d.x,d.y,g,y));s?s.union(T):s=T}return s}},t.getOptionCategoryInterval=g,t.shouldShowAllLabels=function(e){return"category"===e.type&&0===g(e.getLabelModel())}},function(e,t,i){var r=i(39);t.Dispatcher=r;var n=i(11),a=i(148),o=a.isCanvasEl,s=a.transformCoordWithViewport,l="undefined"!=typeof window&&!!window.addEventListener,c=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,u=[];function d(e,t,i,r){return i=i||{},r||!n.canvasSupported?h(e,t,i):n.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(i.zrX=t.layerX,i.zrY=t.layerY):null!=t.offsetX?(i.zrX=t.offsetX,i.zrY=t.offsetY):h(e,t,i),i}function h(e,t,i){if(n.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(o(e)){var l=e.getBoundingClientRect();return i.zrX=r-l.left,void(i.zrY=a-l.top)}if(s(u,e,r,a))return i.zrX=u[0],void(i.zrY=u[1])}i.zrX=i.zrY=0}function p(e){return e||window.event}var f=l?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};t.clientToLocal=d,t.getNativeEvent=p,t.normalizeEvent=function(e,t,i){if(null!=(t=p(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var n="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];n&&d(e,n,t,i)}else d(e,t,t,i),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var a=t.button;return null==t.which&&void 0!==a&&c.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t},t.addEventListener=function(e,t,i,r){l?e.addEventListener(t,i,r):e.attachEvent("on"+t,i)},t.removeEventListener=function(e,t,i,r){l?e.removeEventListener(t,i,r):e.detachEvent("on"+t,i)},t.stop=f,t.isMiddleOrRightButtonOnMouseUpDown=function(e){return 2===e.which||3===e.which},t.notLeftMouse=function(e){return e.which>1}},function(e,t,i){var r=i(151),n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function a(e){return(e=Math.round(e))<0?0:e>255?255:e}function o(e){return e<0?0:e>1?1:e}function s(e){return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100*255):a(parseInt(e,10))}function l(e){return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100):o(parseFloat(e))}function c(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function u(e,t,i){return e+(t-e)*i}function d(e,t,i,r,n){return e[0]=t,e[1]=i,e[2]=r,e[3]=n,e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var p=new r(20),f=null;function m(e,t){f&&h(f,t),f=p.put(e,f||t.slice())}function g(e,t){if(e){t=t||[];var i=p.get(e);if(i)return h(t,i);var r,a=(e+="").replace(/ /g,"").toLowerCase();if(a in n)return h(t,n[a]),m(e,t),t;if("#"===a.charAt(0))return 4===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=4095?(d(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1),m(e,t),t):void d(t,0,0,0,1):7===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=16777215?(d(t,(16711680&r)>>16,(65280&r)>>8,255&r,1),m(e,t),t):void d(t,0,0,0,1):void 0;var o=a.indexOf("("),c=a.indexOf(")");if(-1!==o&&c+1===a.length){var u=a.substr(0,o),f=a.substr(o+1,c-(o+1)).split(","),g=1;switch(u){case"rgba":if(4!==f.length)return void d(t,0,0,0,1);g=l(f.pop());case"rgb":return 3!==f.length?void d(t,0,0,0,1):(d(t,s(f[0]),s(f[1]),s(f[2]),g),m(e,t),t);case"hsla":return 4!==f.length?void d(t,0,0,0,1):(f[3]=l(f[3]),y(f,t),m(e,t),t);case"hsl":return 3!==f.length?void d(t,0,0,0,1):(y(f,t),m(e,t),t);default:return}}d(t,0,0,0,1)}}function y(e,t){var i=(parseFloat(e[0])%360+360)%360/360,r=l(e[1]),n=l(e[2]),o=n<=.5?n*(r+1):n+r-n*r,s=2*n-o;return d(t=t||[],a(255*c(s,o,i+1/3)),a(255*c(s,o,i)),a(255*c(s,o,i-1/3)),1),4===e.length&&(t[3]=e[3]),t}function _(e,t,i){if(t&&t.length&&e>=0&&e<=1){i=i||[];var r=e*(t.length-1),n=Math.floor(r),s=Math.ceil(r),l=t[n],c=t[s],d=r-n;return i[0]=a(u(l[0],c[0],d)),i[1]=a(u(l[1],c[1],d)),i[2]=a(u(l[2],c[2],d)),i[3]=o(u(l[3],c[3],d)),i}}var v=_;function C(e,t,i){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),n=Math.floor(r),s=Math.ceil(r),l=g(t[n]),c=g(t[s]),d=r-n,h=b([a(u(l[0],c[0],d)),a(u(l[1],c[1],d)),a(u(l[2],c[2],d)),o(u(l[3],c[3],d))],"rgba");return i?{color:h,leftIndex:n,rightIndex:s,value:r}:h}}var x=C;function b(e,t){if(e&&e.length){var i=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(i+=","+e[3]),t+"("+i+")"}}t.parse=g,t.lift=function(e,t){var i=g(e);if(i){for(var r=0;r<3;r++)i[r]=t<0?i[r]*(1-t)|0:(255-i[r])*t+i[r]|0,i[r]>255?i[r]=255:e[r]<0&&(i[r]=0);return b(i,4===i.length?"rgba":"rgb")}},t.toHex=function(e){var t=g(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},t.fastLerp=_,t.fastMapToColor=v,t.lerp=C,t.mapToColor=x,t.modifyHSL=function(e,t,i,r){if(e=g(e))return e=function(e){if(e){var t,i,r=e[0]/255,n=e[1]/255,a=e[2]/255,o=Math.min(r,n,a),s=Math.max(r,n,a),l=s-o,c=(s+o)/2;if(0===l)t=0,i=0;else{i=c<.5?l/(s+o):l/(2-s-o);var u=((s-r)/6+l/2)/l,d=((s-n)/6+l/2)/l,h=((s-a)/6+l/2)/l;r===s?t=h-d:n===s?t=1/3+u-h:a===s&&(t=2/3+d-u),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,i,c];return null!=e[3]&&p.push(e[3]),p}}(e),null!=t&&(e[0]=(n=t,(n=Math.round(n))<0?0:n>360?360:n)),null!=i&&(e[1]=l(i)),null!=r&&(e[2]=l(r)),b(y(e),"rgba");var n},t.modifyAlpha=function(e,t){if((e=g(e))&&null!=t)return e[3]=o(t),b(e,"rgba")},t.stringify=b},function(e,t,i){var r=i(0).each,n=i(40),a=i(63),o=i(28),s=i(4),l=i(2),c=i(108).createTask,u=i(51),d=s.makeInner(),h=u();function p(){this.group=new n,this.uid=a.getUID("viewChart"),this.renderTask=c({plan:y,reset:_}),this.renderTask.context={view:this}}p.prototype={type:"chart",init:function(e,t){},render:function(e,t,i,r){},highlight:function(e,t,i,r){g(e.getData(),r,"emphasis")},downplay:function(e,t,i,r){g(e.getData(),r,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var f=p.prototype;function m(e,t,i){if(e&&(e.trigger(t,i),e.isGroup&&!l.isHighDownDispatcher(e)))for(var r=0,n=e.childCount();r<n;r++)m(e.childAt(r),t,i)}function g(e,t,i){var n=s.queryDataIndex(e,t),a=t&&null!=t.highlightKey?l.getHighlightDigit(t.highlightKey):null;null!=n?r(s.normalizeToArray(n),(function(t){m(e.getItemGraphicEl(t),i,a)})):e.eachItemGraphicEl((function(e){m(e,i,a)}))}function y(e){return h(e.model)}function _(e){var t=e.model,i=e.ecModel,r=e.api,n=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=n&&d(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,i,r,n),v[l]}f.updateView=f.updateLayout=f.updateVisual=function(e,t,i,r){this.render(e,t,i,r)},o.enableClassExtend(p,["dispose"]),o.enableClassManagement(p,{registerWhenExtend:!0}),p.markUpdateMethod=function(e,t){d(e).updateMethod=t};var v={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},C=p;e.exports=C},function(e,t,i){var r=i(0),n=r.each,a=r.isString;function o(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}t.enableDataStack=function(e,t,i){var r,o,s,l,c=(i=i||{}).byIndex,u=i.stackedCoordDimension,d=!(!e||!e.get("stack"));if(n(t,(function(e,i){a(e)&&(t[i]=e={name:e}),d&&!e.isExtraCoord&&(c||r||!e.ordinalMeta||(r=e),o||"ordinal"===e.type||"time"===e.type||u&&u!==e.coordDim||(o=e))})),!o||c||r||(c=!0),o){s="__\0ecstackresult",l="__\0ecstackedover",r&&(r.createInvertedIndices=!0);var h=o.coordDim,p=o.type,f=0;n(t,(function(e){e.coordDim===h&&f++})),t.push({name:s,coordDim:h,coordDimIndex:f,type:p,isExtraCoord:!0,isCalculationCoord:!0}),f++,t.push({name:l,coordDim:l,coordDimIndex:f,type:p,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:r&&r.name,isStackedByIndex:c,stackedOverDimension:l,stackResultDimension:s}},t.isDimensionStacked=o,t.getStackedDimension=function(e,t){return o(e,t)?e.getCalculationInfo("stackResultDimension"):t}},function(e,t,i){"use strict";(function(e){
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DC",[],t):"object"==typeof exports?exports.DC=t():e.DC=t()}(window,(function(){return function(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i(i.s=232)}([function(e,t){var i={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},r={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},n=Object.prototype.toString,a=Array.prototype,o=a.forEach,s=a.filter,l=a.slice,c=a.map,u=a.reduce,d={};function h(e){if(null==e||"object"!=typeof e)return e;var t=e,a=n.call(e);if("[object Array]"===a){if(!S(e)){t=[];for(var o=0,s=e.length;o<s;o++)t[o]=h(e[o])}}else if(r[a]){if(!S(e)){var l=e.constructor;if(e.constructor.from)t=l.from(e);else{t=new l(e.length);for(o=0,s=e.length;o<s;o++)t[o]=h(e[o])}}}else if(!i[a]&&!S(e)&&!b(e))for(var c in t={},e)e.hasOwnProperty(c)&&(t[c]=h(e[c]));return t}function p(e,t,i){if(!C(t)||!C(e))return i?h(t):e;for(var r in t)if(t.hasOwnProperty(r)){var n=e[r],a=t[r];!C(a)||!C(n)||v(a)||v(n)||b(a)||b(n)||x(a)||x(n)||S(a)||S(n)?!i&&r in e||(e[r]=h(t[r])):p(n,a,i)}return e}function f(e,t,i){for(var r in t)t.hasOwnProperty(r)&&(i?null!=t[r]:null==e[r])&&(e[r]=t[r]);return e}var m,g=function(){return d.createCanvas()};function y(e,t,i){if(e&&t)if(e.forEach&&e.forEach===o)e.forEach(t,i);else if(e.length===+e.length)for(var r=0,n=e.length;r<n;r++)t.call(i,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(i,e[a],a,e)}function _(e,t){var i=l.call(arguments,2);return function(){return e.apply(t,i.concat(l.call(arguments)))}}function v(e){return"[object Array]"===n.call(e)}function C(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function x(e){return!!i[n.call(e)]}function b(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}d.createCanvas=function(){return document.createElement("canvas")};function S(e){return e.__ec_primitive__}function T(e){var t=v(e);this.data={};var i=this;function r(e,r){t?i.set(e,r):i.set(r,e)}e instanceof T?e.each(r):e&&y(e,r)}T.prototype={constructor:T,get:function(e){return this.data.hasOwnProperty(e)?this.data[e]:null},set:function(e,t){return this.data[e]=t},each:function(e,t){for(var i in void 0!==t&&(e=_(e,t)),this.data)this.data.hasOwnProperty(i)&&e(this.data[i],i)},removeKey:function(e){delete this.data[e]}},t.$override=function(e,t){"createCanvas"===e&&(m=null),d[e]=t},t.clone=h,t.merge=p,t.mergeAll=function(e,t){for(var i=e[0],r=1,n=e.length;r<n;r++)i=p(i,e[r],t);return i},t.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},t.defaults=f,t.createCanvas=g,t.getContext=function(){return m||(m=g().getContext("2d")),m},t.indexOf=function(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i}return-1},t.inherits=function(e,t){var i=e.prototype;function r(){}for(var n in r.prototype=t.prototype,e.prototype=new r,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);e.prototype.constructor=e,e.superClass=t},t.mixin=function(e,t,i){f(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,i)},t.isArrayLike=function(e){if(e)return"string"!=typeof e&&"number"==typeof e.length},t.each=y,t.map=function(e,t,i){if(e&&t){if(e.map&&e.map===c)return e.map(t,i);for(var r=[],n=0,a=e.length;n<a;n++)r.push(t.call(i,e[n],n,e));return r}},t.reduce=function(e,t,i,r){if(e&&t){if(e.reduce&&e.reduce===u)return e.reduce(t,i,r);for(var n=0,a=e.length;n<a;n++)i=t.call(r,i,e[n],n,e);return i}},t.filter=function(e,t,i){if(e&&t){if(e.filter&&e.filter===s)return e.filter(t,i);for(var r=[],n=0,a=e.length;n<a;n++)t.call(i,e[n],n,e)&&r.push(e[n]);return r}},t.find=function(e,t,i){if(e&&t)for(var r=0,n=e.length;r<n;r++)if(t.call(i,e[r],r,e))return e[r]},t.bind=_,t.curry=function(e){var t=l.call(arguments,1);return function(){return e.apply(this,t.concat(l.call(arguments)))}},t.isArray=v,t.isFunction=function(e){return"function"==typeof e},t.isString=function(e){return"[object String]"===n.call(e)},t.isObject=C,t.isBuiltInObject=x,t.isTypedArray=function(e){return!!r[n.call(e)]},t.isDom=b,t.eqNaN=function(e){return e!=e},t.retrieve=function(e){for(var t=0,i=arguments.length;t<i;t++)if(null!=arguments[t])return arguments[t]},t.retrieve2=function(e,t){return null!=e?e:t},t.retrieve3=function(e,t,i){return null!=e?e:null!=t?t:i},t.slice=function(){return Function.call.apply(l,arguments)},t.normalizeCssArray=function(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e},t.assert=function(e,t){if(!e)throw new Error(t)},t.trim=function(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},t.setAsPrimitive=function(e){e.__ec_primitive__=!0},t.isPrimitive=S,t.createHashMap=function(e){return new T(e)},t.concatArray=function(e,t){for(var i=new e.constructor(e.length+t.length),r=0;r<e.length;r++)i[r]=e[r];var n=e.length;for(r=0;r<t.length;r++)i[r+n]=t[r];return i},t.noop=function(){}},function(e,t,i){i(5).__DEV__;var r=i(77),n=i(0),a=i(24),o=i(11),s=i(100),l=i(39),c=i(157),u=i(170),d=i(20),h=i(306),p=i(307),f=i(309),m=i(13),g=i(14),y=i(83),_=i(25),v=i(2),C=i(4),x=i(33).throttle,b=i(310),S=i(311),T=i(312),E=i(313),w=i(314),A=i(315);i(171);var P=i(109),D=n.assert,M=n.each,I=n.isFunction,R=n.isObject,O=m.parseClassType,L={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},N="__flagInMainProcess",F=/^[a-zA-Z0-9_]+$/;function B(e,t){return function(i,r,n){t||!this._disposed?(i=i&&i.toLowerCase(),l.prototype[e].call(this,i,r,n)):this.id}}function V(){l.call(this)}function k(e,t,i){i=i||{},"string"==typeof t&&(t=ce[t]),this.id,this.group,this._dom=e;var a=this._zr=r.init(e,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=x(n.bind(a.flush,a),17),(t=n.clone(t))&&p(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new d;var o,c,h=this._api=(c=(o=this)._coordSysMgr,n.extend(new u(o),{getCoordinateSystems:n.bind(c.getCoordinateSystems,c),getComponentByElement:function(e){for(;e;){var t=e.__ecComponentInfo;if(null!=t)return o._model.getComponent(t.mainType,t.index);e=e.parent}}}));function f(e,t){return e.__prio-t.__prio}s(le,f),s(ae,f),this._scheduler=new E(this,h,ae,le),l.call(this,this._ecEventProcessor=new ie),this._messageCenter=new V,this._initEvents(),this.resize=n.bind(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),function(e,t){e.on("rendered",(function(){t.trigger("rendered"),!e.animation.isFinished()||t.__optionUpdated||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(a,this),n.setAsPrimitive(this)}V.prototype.on=B("on",!0),V.prototype.off=B("off",!0),V.prototype.one=B("one",!0),n.mixin(V,l);var z=k.prototype;function G(e,t,i){if(this._disposed)this.id;else{var r,n=this._model,a=this._coordSysMgr.getCoordinateSystems();t=C.parseFinder(n,t);for(var o=0;o<a.length;o++){var s=a[o];if(s[e]&&null!=(r=s[e](n,t,i)))return r}}}z._onframe=function(){if(!this._disposed){var e=this._scheduler;if(this.__optionUpdated){var t=this.__optionUpdated.silent;this[N]=!0,$(this),U.update.call(this),this[N]=!1,this.__optionUpdated=!1,q.call(this,t),Y.call(this,t)}else if(e.unfinished){var i=1,r=this._model,n=this._api;e.unfinished=!1;do{var a=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),W(this,r),e.performVisualTasks(r),J(this,this._model,n,"remain"),i-=+new Date-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},z.getDom=function(){return this._dom},z.getZr=function(){return this._zr},z.setOption=function(e,t,i){if(this._disposed)this.id;else{var r;if(R(t)&&(i=t.lazyUpdate,r=t.silent,t=t.notMerge),this[N]=!0,!this._model||t){var n=new h(this._api),a=this._theme,o=this._model=new c;o.scheduler=this._scheduler,o.init(null,null,a,n)}this._model.setOption(e,oe),i?(this.__optionUpdated={silent:r},this[N]=!1):($(this),U.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this[N]=!1,q.call(this,r),Y.call(this,r))}},z.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},z.getModel=function(){return this._model},z.getOption=function(){return this._model&&this._model.getOption()},z.getWidth=function(){return this._zr.getWidth()},z.getHeight=function(){return this._zr.getHeight()},z.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},z.getRenderedCanvas=function(e){if(o.canvasSupported)return(e=e||{}).pixelRatio=e.pixelRatio||1,e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},z.getSvgDataURL=function(){if(o.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return n.each(t,(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},z.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,i=this._model,r=[],n=this;M(t,(function(e){i.eachComponent({mainType:e},(function(e){var t=n._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return M(r,(function(e){e.group.ignore=!1})),a}this.id},z.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(o.canvasSupported){var t="svg"===e.type,i=this.group,a=Math.min,s=Math.max;if(he[i]){var l=1/0,c=1/0,u=-1/0,d=-1/0,h=[],p=e&&e.pixelRatio||1;n.each(de,(function(r,o){if(r.group===i){var p=t?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(n.clone(e)),f=r.getDom().getBoundingClientRect();l=a(f.left,l),c=a(f.top,c),u=s(f.right,u),d=s(f.bottom,d),h.push({dom:p,left:f.left,top:f.top})}}));var f=(u*=p)-(l*=p),m=(d*=p)-(c*=p),g=n.createCanvas(),y=r.init(g,{renderer:t?"svg":"canvas"});if(y.resize({width:f,height:m}),t){var _="";return M(h,(function(e){var t=e.left-l,i=e.top-c;_+='<g transform="translate('+t+","+i+')">'+e.dom+"</g>"})),y.painter.getSvgRoot().innerHTML=_,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return e.connectedBackgroundColor&&y.add(new v.Rect({shape:{x:0,y:0,width:f,height:m},style:{fill:e.connectedBackgroundColor}})),M(h,(function(e){var t=new v.Image({style:{x:e.left*p-l,y:e.top*p-c,image:e.dom}});y.add(t)})),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},z.convertToPixel=n.curry(G,"convertToPixel"),z.convertFromPixel=n.curry(G,"convertFromPixel"),z.containPixel=function(e,t){if(!this._disposed){var i,r=this._model;return e=C.parseFinder(r,e),n.each(e,(function(e,r){r.indexOf("Models")>=0&&n.each(e,(function(e){var n=e.coordinateSystem;if(n&&n.containPoint)i|=!!n.containPoint(t);else if("seriesModels"===r){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(i|=a.containPoint(t,e))}}),this)}),this),!!i}this.id},z.getVisual=function(e,t){var i=this._model,r=(e=C.parseFinder(i,e,{defaultMainType:"series"})).seriesModel.getData(),n=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?r.indexOfRawIndex(e.dataIndex):null;return null!=n?r.getItemVisual(n,t):r.getVisual(t)},z.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},z.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]};var U={prepareAndUpdate:function(e){$(this),U.update.call(this,e)},update:function(e){var t=this._model,i=this._api,r=this._zr,n=this._coordSysMgr,s=this._scheduler;if(t){s.restoreData(t,e),s.performSeriesTasks(t),n.create(t,i),s.performDataProcessorTasks(t,e),W(this,t),n.update(t,i),Q(t),s.performVisualTasks(t,e),Z(this,t,i,e);var l=t.get("backgroundColor")||"transparent";if(o.canvasSupported)r.setBackgroundColor(l);else{var c=a.parse(l);l=a.stringify(c,"rgb"),0===c[3]&&(l="transparent")}K(t,i)}},updateTransform:function(e){var t=this._model,i=this,r=this._api;if(t){var a=[];t.eachComponent((function(n,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,r,e);l&&l.update&&a.push(s)}else a.push(s)}));var o=n.createHashMap();t.eachSeries((function(n){var a=i._chartsMap[n.__viewId];if(a.updateTransform){var s=a.updateTransform(n,t,r,e);s&&s.update&&o.set(n.uid,1)}else o.set(n.uid,1)})),Q(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:o}),J(i,t,r,e,o),K(t,this._api)}},updateView:function(e){var t=this._model;t&&(_.markUpdateMethod(e,"updateView"),Q(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),Z(this,this._model,this._api,e),K(t,this._api))},updateVisual:function(e){U.update.call(this,e)},updateLayout:function(e){U.update.call(this,e)}};function $(e){var t=e._model,i=e._scheduler;i.restorePipelines(t),i.prepareStageTasks(),X(e,"component",t,i),X(e,"chart",t,i),i.plan()}function H(e,t,i,r,a){var o=e._model;if(r){var s={};s[r+"Id"]=i[r+"Id"],s[r+"Index"]=i[r+"Index"],s[r+"Name"]=i[r+"Name"];var l={mainType:r,query:s};a&&(l.subType=a);var c=i.excludeSeriesId;null!=c&&(c=n.createHashMap(C.normalizeToArray(c))),o&&o.eachComponent(l,(function(t){c&&null!=c.get(t.id)||u(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else M(e._componentsViews.concat(e._chartsViews),u);function u(r){r&&r.__alive&&r[t]&&r[t](r.__model,o,e._api,i)}}function W(e,t){var i=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,i[e.__viewId])}))}function j(e,t){var i=e.type,r=e.escapeConnect,a=re[i],o=a.actionInfo,s=(o.update||"update").split(":"),l=s.pop();s=null!=s[0]&&O(s[0]),this[N]=!0;var c=[e],u=!1;e.batch&&(u=!0,c=n.map(e.batch,(function(t){return(t=n.defaults(n.extend({},t),e)).batch=null,t})));var d,h=[],p="highlight"===i||"downplay"===i;M(c,(function(e){(d=(d=a.action(e,this._model,this._api))||n.extend({},e)).type=o.event||d.type,h.push(d),p?H(this,l,e,"series"):s&&H(this,l,e,s.main,s.sub)}),this),"none"===l||p||s||(this.__optionUpdated?($(this),U.update.call(this,e),this.__optionUpdated=!1):U[l].call(this,e)),d=u?{type:o.event||i,escapeConnect:r,batch:h}:h[0],this[N]=!1,!t&&this._messageCenter.trigger(d.type,d)}function q(e){for(var t=this._pendingActions;t.length;){var i=t.shift();j.call(this,i,e)}}function Y(e){!e&&this.trigger("updated")}function X(e,t,i,r){for(var n="component"===t,a=n?e._componentsViews:e._chartsViews,o=n?e._componentsMap:e._chartsMap,s=e._zr,l=e._api,c=0;c<a.length;c++)a[c].__alive=!1;function u(e){var t="_ec_"+e.id+"_"+e.type,c=o[t];if(!c){var u=O(e.type);(c=new(n?y.getClass(u.main,u.sub):_.getClass(u.sub))).init(i,l),o[t]=c,a.push(c),s.add(c.group)}e.__viewId=c.__id=t,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!n&&r.prepareView(c,e,i,l)}n?i.eachComponent((function(e,t){"series"!==e&&u(t)})):i.eachSeries(u);for(c=0;c<a.length;){var d=a[c];d.__alive?c++:(!n&&d.renderTask.dispose(),s.remove(d.group),d.dispose(i,l),a.splice(c,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function Q(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function Z(e,t,i,r){!function(e,t,i,r,n){M(n||e._componentsViews,(function(e){var n=e.__model;e.render(n,t,i,r),te(n,e)}))}(e,t,i,r),M(e._chartsViews,(function(e){e.__alive=!1})),J(e,t,i,r),M(e._chartsViews,(function(e){e.__alive||e.remove(t,i)}))}function J(e,t,i,r,n){var a,s=e._scheduler;t.eachSeries((function(t){var i=e._chartsMap[t.__viewId];i.__alive=!0;var o=i.renderTask;s.updatePayload(o,r),n&&n.get(t.uid)&&o.dirty(),a|=o.perform(s.getPerformArgs(o)),i.group.silent=!!t.get("silent"),te(t,i),function(e,t){var i=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==i&&e.setStyle("blend",i),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",i)}))}))}(t,i)})),s.unfinished|=a,function(e,t){var i=e._zr.storage,r=0;i.traverse((function(e){r++})),r>t.get("hoverLayerThreshold")&&!o.node&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var i=e._chartsMap[t.__viewId];i.__alive&&i.group.traverse((function(e){e.useHoverLayer=!0}))}}))}(e,t),S(e._zr.dom,t)}function K(e,t){M(se,(function(i){i(e,t)}))}z.resize=function(e){if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var i=t.resetOption("media"),r=e&&e.silent;this[N]=!0,i&&$(this),U.update.call(this),this[N]=!1,q.call(this,r),Y.call(this,r)}}},z.showLoading=function(e,t){if(this._disposed)this.id;else if(R(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),ue[e]){var i=ue[e](this._api,t),r=this._zr;this._loadingFX=i,r.add(i)}},z.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},z.makeActionFromEvent=function(e){var t=n.extend({},e);return t.type=ne[e.type],t},z.dispatchAction=function(e,t){this._disposed?this.id:(R(t)||(t={silent:!!t}),re[e.type]&&this._model&&(this[N]?this._pendingActions.push(e):(j.call(this,e,t.silent),t.flush?this._zr.flush(!0):!1!==t.flush&&o.browser.weChat&&this._throttledZrFlush(),q.call(this,t.silent),Y.call(this,t.silent))))},z.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},z.on=B("on",!1),z.off=B("off",!1),z.one=B("one",!1);var ee=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function te(e,t){var i=e.get("z"),r=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=r&&(e.zlevel=r))}))}function ie(){this.eventInfo}z._initEvents=function(){M(ee,(function(e){var t=function(t){var i,r=this.getModel(),a=t.target;if("globalout"===e)i={};else if(a&&null!=a.dataIndex){var o=a.dataModel||r.getSeriesByIndex(a.seriesIndex);i=o&&o.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(i=n.extend({},a.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var c=s&&null!=l&&r.getComponent(s,l),u=c&&this["series"===c.mainType?"_chartsMap":"_componentsMap"][c.__viewId];i.event=t,i.type=e,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:i,model:c,view:u},this.trigger(e,i)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),M(ne,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),this)}),this)},z.isDisposed=function(){return this._disposed},z.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},z.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,C.setAttribute(this.getDom(),me,"");var e=this._api,t=this._model;M(this._componentsViews,(function(i){i.dispose(t,e)})),M(this._chartsViews,(function(i){i.dispose(t,e)})),this._zr.dispose(),delete de[this.id]}},n.mixin(k,l),ie.prototype={constructor:ie,normalizeQuery:function(e){var t={},i={},r={};if(n.isString(e)){var a=O(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};n.each(e,(function(e,n){for(var a=!1,l=0;l<o.length;l++){var c=o[l],u=n.lastIndexOf(c);if(u>0&&u===n.length-c.length){var d=n.slice(0,u);"data"!==d&&(t.mainType=d,t[c.toLowerCase()]=e,a=!0)}}s.hasOwnProperty(n)&&(i[n]=e,a=!0),a||(r[n]=e)}))}return{cptQuery:t,dataQuery:i,otherQuery:r}},filter:function(e,t,i){var r=this.eventInfo;if(!r)return!0;var n=r.targetEl,a=r.packedEvent,o=r.model,s=r.view;if(!o||!s)return!0;var l=t.cptQuery,c=t.dataQuery;return u(l,o,"mainType")&&u(l,o,"subType")&&u(l,o,"index","componentIndex")&&u(l,o,"name")&&u(l,o,"id")&&u(c,a,"name")&&u(c,a,"dataIndex")&&u(c,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,a));function u(e,t,i,r){return null==e[i]||t[r||i]===e[i]}},afterTrigger:function(){this.eventInfo=null}};var re={},ne={},ae=[],oe=[],se=[],le=[],ce={},ue={},de={},he={},pe=new Date-0,fe=new Date-0,me="_echarts_instance_";function ge(e){he[e]=!1}var ye=ge;function _e(e){return de[C.getAttribute(e,me)]}function ve(e,t){ce[e]=t}function Ce(e){oe.push(e)}function xe(e,t){Te(ae,e,t,1e3)}function be(e,t,i){"function"==typeof t&&(i=t,t="");var r=R(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,D(F.test(r)&&F.test(t)),re[r]||(re[r]={action:i,actionInfo:e}),ne[t]=r}function Se(e,t){Te(le,e,t,3e3,"visual")}function Te(e,t,i,r,n){(I(t)||R(t))&&(i=t,t=r);var a=E.wrapStageHandler(i,n);return a.__prio=t,a.__raw=i,e.push(a),a}function Ee(e,t){ue[e]=t}Se(2e3,b),Ce(p),xe(900,f),Ee("default",T),be({type:"highlight",event:"highlight",update:"highlight"},n.noop),be({type:"downplay",event:"downplay",update:"downplay"},n.noop),ve("light",w),ve("dark",A);t.version="4.9.0",t.dependencies={zrender:"4.3.2"},t.PRIORITY=L,t.init=function(e,t,i){var r=_e(e);if(r)return r;var n=new k(e,t,i);return n.id="ec_"+pe++,de[n.id]=n,C.setAttribute(e,me,n.id),function(e){var t="__connectUpdateStatus";function i(e,i){for(var r=0;r<e.length;r++){e[r][t]=i}}M(ne,(function(r,n){e._messageCenter.on(n,(function(r){if(he[e.group]&&0!==e[t]){if(r&&r.escapeConnect)return;var n=e.makeActionFromEvent(r),a=[];M(de,(function(t){t!==e&&t.group===e.group&&a.push(t)})),i(a,0),M(a,(function(e){1!==e[t]&&e.dispatchAction(n)})),i(a,2)}}))}))}(n),n},t.connect=function(e){if(n.isArray(e)){var t=e;e=null,M(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+fe++,M(t,(function(t){t.group=e}))}return he[e]=!0,e},t.disConnect=ge,t.disconnect=ye,t.dispose=function(e){"string"==typeof e?e=de[e]:e instanceof k||(e=_e(e)),e instanceof k&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=_e,t.getInstanceById=function(e){return de[e]},t.registerTheme=ve,t.registerPreprocessor=Ce,t.registerProcessor=xe,t.registerPostUpdate=function(e){se.push(e)},t.registerAction=be,t.registerCoordinateSystem=function(e,t){d.register(e,t)},t.getCoordinateSystemDimensions=function(e){var t=d.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.registerLayout=function(e,t){Te(le,e,t,1e3,"layout")},t.registerVisual=Se,t.registerLoading=Ee,t.extendComponentModel=function(e){return m.extend(e)},t.extendComponentView=function(e){return y.extend(e)},t.extendSeriesModel=function(e){return g.extend(e)},t.extendChartView=function(e){return _.extend(e)},t.setCanvasCreator=function(e){n.$override("createCanvas",e)},t.registerMap=function(e,t,i){P.registerMap(e,t,i)},t.getMap=function(e){var t=P.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={};var we=i(173);!function(){for(var e in we)we.hasOwnProperty(e)&&(t[e]=we[e])}()},function(e,t,i){var r=i(0),n=i(158),a=i(24),o=i(15),s=i(8),l=i(10),c=i(78),u=i(48);t.Image=u;var d=i(40);t.Group=d;var h=i(41);t.Text=h;var p=i(163);t.Circle=p;var f=i(295);t.Sector=f;var m=i(296);t.Ring=m;var g=i(165);t.Polygon=g;var y=i(167);t.Polyline=y;var _=i(103);t.Rect=_;var v=i(168);t.Line=v;var C=i(299);t.BezierCurve=C;var x=i(300);t.Arc=x;var b=i(301);t.CompoundPath=b;var S=i(105);t.LinearGradient=S;var T=i(302);t.RadialGradient=T;var E=i(9);t.BoundingRect=E;var w=i(106);t.IncrementalDisplayable=w;var A=i(104),P=Math.max,D=Math.min,M={},I=1,R={},O={};function L(e,t){O[e]=t}function N(e,t,i,r){var a=n.createFromString(e,t);return i&&("center"===r&&(i=F(i,a.getBoundingRect())),V(a,i)),a}function F(e,t){var i,r=t.width/t.height,n=e.height*r;return i=n<=e.width?e.height:(n=e.width)/r,{x:e.x+e.width/2-n/2,y:e.y+e.height/2-i/2,width:n,height:i}}var B=n.mergePath;function V(e,t){if(e.applyTransform){var i=e.getBoundingRect().calculateTransform(t);e.applyTransform(i)}}var k=A.subPixelOptimize;function z(e){return null!=e&&"none"!==e}var G=r.createHashMap(),U=0;function $(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var i=e.__zr,r=e.useHoverLayer&&i&&"canvas"===i.painter.type;if(e.__highlighted=r?"layer":"plain",!(e.isGroup||!i&&e.useHoverLayer)){var n=e,a=e.style;r&&(a=(n=i.addHover(e)).style),ae(a),r||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var i=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var r=e.style;for(var n in t)null!=t[n]&&(i[n]=r[n]);i.fill=r.fill,i.stroke=r.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(n),a.extendFrom(t),H(a,t,"fill"),H(a,t,"stroke"),ne(a),r||(e.dirty(!1),e.z2+=1)}}}function H(e,t,i){!z(t[i])&&z(e[i])&&(e[i]=function(e){if("string"!=typeof e)return e;var t=G.get(e);return t||(t=a.lift(e,-.1),U<1e4&&(G.set(e,t),U++)),t}(e[i]))}function W(e){var t=e.__highlighted;if(t&&(e.__highlighted=!1,!e.isGroup))if("layer"===t)e.__zr&&e.__zr.removeHover(e);else{var i=e.style,r=e.__cachedNormalStl;r&&(ae(i),e.setStyle(r),ne(i));var n=e.__cachedNormalZ2;null!=n&&e.z2-n==1&&(e.z2=n)}}function j(e,t,i){var r,n="normal",a="normal";e.__highlighted&&(n="emphasis",r=!0),t(e,i),e.__highlighted&&(a="emphasis",r=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,i)})),r&&e.__highDownOnUpdate&&e.__highDownOnUpdate(n,a)}function q(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,W(e),$(e))}function Y(e){!J(this,e)&&!this.__highByOuter&&j(this,$)}function X(e){!J(this,e)&&!this.__highByOuter&&j(this,W)}function Q(e){this.__highByOuter|=1<<(e||0),j(this,$)}function Z(e){!(this.__highByOuter&=~(1<<(e||0)))&&j(this,W)}function J(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function K(e,t){var i=!1===t;if(e.__highDownSilentOnTouch=e.highDownSilentOnTouch,e.__highDownOnUpdate=e.highDownOnUpdate,!i||e.__highDownDispatcher){var r=i?"off":"on";e[r]("mouseover",Y)[r]("mouseout",X),e[r]("emphasis",Q)[r]("normal",Z),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!i}}function ee(e,t,i,n,a){return te(e,t,n,a),i&&r.extend(e,i),e}function te(e,t,i,n){if((i=i||M).isRectText){var a;i.getTextPosition?a=i.getTextPosition(t,n):"outside"===(a=t.getShallow("position")||(n?null:"inside"))&&(a="top"),e.textPosition=a,e.textOffset=t.getShallow("offset");var o=t.getShallow("rotate");null!=o&&(o*=Math.PI/180),e.textRotation=o,e.textDistance=r.retrieve2(t.getShallow("distance"),n?null:5)}var s,l=t.ecModel,c=l&&l.option.textStyle,u=function(e){var t;for(;e&&e!==e.ecModel;){var i=(e.option||M).rich;if(i)for(var r in t=t||{},i)i.hasOwnProperty(r)&&(t[r]=1);e=e.parentModel}return t}(t);if(u)for(var d in s={},u)if(u.hasOwnProperty(d)){var h=t.getModel(["rich",d]);ie(s[d]={},h,c,i,n)}return e.rich=s,ie(e,t,c,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),e}function ie(e,t,i,n,a,o){i=!a&&i||M,e.textFill=re(t.getShallow("color"),n)||i.color,e.textStroke=re(t.getShallow("textBorderColor"),n)||i.textBorderColor,e.textStrokeWidth=r.retrieve2(t.getShallow("textBorderWidth"),i.textBorderWidth),a||(o&&(e.insideRollbackOpt=n,ne(e)),null==e.textFill&&(e.textFill=n.autoColor)),e.fontStyle=t.getShallow("fontStyle")||i.fontStyle,e.fontWeight=t.getShallow("fontWeight")||i.fontWeight,e.fontSize=t.getShallow("fontSize")||i.fontSize,e.fontFamily=t.getShallow("fontFamily")||i.fontFamily,e.textAlign=t.getShallow("align"),e.textVerticalAlign=t.getShallow("verticalAlign")||t.getShallow("baseline"),e.textLineHeight=t.getShallow("lineHeight"),e.textWidth=t.getShallow("width"),e.textHeight=t.getShallow("height"),e.textTag=t.getShallow("tag"),o&&n.disableBox||(e.textBackgroundColor=re(t.getShallow("backgroundColor"),n),e.textPadding=t.getShallow("padding"),e.textBorderColor=re(t.getShallow("borderColor"),n),e.textBorderWidth=t.getShallow("borderWidth"),e.textBorderRadius=t.getShallow("borderRadius"),e.textBoxShadowColor=t.getShallow("shadowColor"),e.textBoxShadowBlur=t.getShallow("shadowBlur"),e.textBoxShadowOffsetX=t.getShallow("shadowOffsetX"),e.textBoxShadowOffsetY=t.getShallow("shadowOffsetY")),e.textShadowColor=t.getShallow("textShadowColor")||i.textShadowColor,e.textShadowBlur=t.getShallow("textShadowBlur")||i.textShadowBlur,e.textShadowOffsetX=t.getShallow("textShadowOffsetX")||i.textShadowOffsetX,e.textShadowOffsetY=t.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function re(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function ne(e){var t,i=e.textPosition,r=e.insideRollbackOpt;if(r&&null==e.textFill){var n=r.autoColor,a=r.isRectText,o=r.useInsideStyle,s=!1!==o&&(!0===o||a&&i&&"string"==typeof i&&i.indexOf("inside")>=0),l=!s&&null!=n;(s||l)&&(t={textFill:e.textFill,textStroke:e.textStroke,textStrokeWidth:e.textStrokeWidth}),s&&(e.textFill="#fff",null==e.textStroke&&(e.textStroke=n,null==e.textStrokeWidth&&(e.textStrokeWidth=2))),l&&(e.textFill=n)}e.insideRollback=t}function ae(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function oe(e,t,i,r,n,a){if("function"==typeof n&&(a=n,n=null),r&&r.isAnimationEnabled()){var o=e?"Update":"",s=r.getShallow("animationDuration"+o),l=r.getShallow("animationEasing"+o),c=r.getShallow("animationDelay"+o);"function"==typeof c&&(c=c(n,r.getAnimationDelayParams?r.getAnimationDelayParams(t,n):null)),"function"==typeof s&&(s=s(n)),s>0?t.animateTo(i,s,c||0,l,a,!!a):(t.stopAnimation(),t.attr(i),a&&a())}else t.stopAnimation(),t.attr(i),a&&a()}function se(e,t,i,r,n){oe(!0,e,t,i,r,n)}function le(e,t,i){return t&&!r.isArrayLike(t)&&(t=c.getLocalTransform(t)),i&&(t=o.invert([],t)),s.applyTransform([],e,t)}function ce(e,t,i,r,n,a,o,s){var l,c=i-e,u=r-t,d=o-n,h=s-a,p=ue(d,h,c,u);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-n,m=t-a,g=ue(f,m,c,u)/p;if(g<0||g>1)return!1;var y=ue(f,m,d,h)/p;return!(y<0||y>1)}function ue(e,t,i,r){return e*r-i*t}L("circle",p),L("sector",f),L("ring",m),L("polygon",g),L("polyline",y),L("rect",_),L("line",v),L("bezierCurve",C),L("arc",x),t.Z2_EMPHASIS_LIFT=1,t.CACHED_LABEL_STYLE_PROPERTIES={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},t.extendShape=function(e){return l.extend(e)},t.extendPath=function(e,t){return n.extendFromString(e,t)},t.registerShape=L,t.getShapeClass=function(e){if(O.hasOwnProperty(e))return O[e]},t.makePath=N,t.makeImage=function(e,t,i){var r=new u({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===i){var n={width:e.width,height:e.height};r.setStyle(F(t,n))}}});return r},t.mergePath=B,t.resizePath=V,t.subPixelOptimizeLine=function(e){return A.subPixelOptimizeLine(e.shape,e.shape,e.style),e},t.subPixelOptimizeRect=function(e){return A.subPixelOptimizeRect(e.shape,e.shape,e.style),e},t.subPixelOptimize=k,t.setElementHoverStyle=q,t.setHoverStyle=function(e,t){K(e,!0),j(e,q,t)},t.setAsHighDownDispatcher=K,t.isHighDownDispatcher=function(e){return!(!e||!e.__highDownDispatcher)},t.getHighlightDigit=function(e){var t=R[e];return null==t&&I<=32&&(t=R[e]=I++),t},t.setLabelStyle=function(e,t,i,n,a,o,s){var l,c=(a=a||M).labelFetcher,u=a.labelDataIndex,d=a.labelDimIndex,h=a.labelProp,p=i.getShallow("show"),f=n.getShallow("show");(p||f)&&(c&&(l=c.getFormattedLabel(u,"normal",null,d,h)),null==l&&(l=r.isFunction(a.defaultText)?a.defaultText(u,a):a.defaultText));var m=p?l:null,g=f?r.retrieve2(c?c.getFormattedLabel(u,"emphasis",null,d,h):null,l):null;null==m&&null==g||(ee(e,i,o,a),ee(t,n,s,a,!0)),e.text=m,t.text=g},t.modifyLabelStyle=function(e,t,i){var n=e.style;t&&(ae(n),e.setStyle(t),ne(n)),n=e.__hoverStl,i&&n&&(ae(n),r.extend(n,i),ne(n))},t.setTextStyle=ee,t.setText=function(e,t,i){var r,n={isRectText:!0};!1===i?r=!0:n.autoColor=i,te(e,t,n,r)},t.getFont=function(e,t){var i=t&&t.getModel("textStyle");return r.trim([e.fontStyle||i&&i.getShallow("fontStyle")||"",e.fontWeight||i&&i.getShallow("fontWeight")||"",(e.fontSize||i&&i.getShallow("fontSize")||12)+"px",e.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))},t.updateProps=se,t.initProps=function(e,t,i,r,n){oe(!1,e,t,i,r,n)},t.getTransform=function(e,t){for(var i=o.identity([]);e&&e!==t;)o.mul(i,e.getLocalTransform(),i),e=e.parent;return i},t.applyTransform=le,t.transformDirection=function(e,t,i){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),n=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),a=["left"===e?-r:"right"===e?r:0,"top"===e?-n:"bottom"===e?n:0];return a=le(a,t,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},t.groupTransition=function(e,t,i,n){if(e&&t){var a,o=(a={},e.traverse((function(e){!e.isGroup&&e.anid&&(a[e.anid]=e)})),a);t.traverse((function(e){if(!e.isGroup&&e.anid){var t=o[e.anid];if(t){var r=l(e);e.attr(l(t)),se(e,r,i,e.dataIndex)}}}))}function l(e){var t={position:s.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=r.extend({},e.shape)),t}},t.clipPointsByRect=function(e,t){return r.map(e,(function(e){var i=e[0];i=P(i,t.x),i=D(i,t.x+t.width);var r=e[1];return r=P(r,t.y),[i,r=D(r,t.y+t.height)]}))},t.clipRectByRect=function(e,t){var i=P(e.x,t.x),r=D(e.x+e.width,t.x+t.width),n=P(e.y,t.y),a=D(e.y+e.height,t.y+t.height);if(r>=i&&a>=n)return{x:i,y:n,width:r-i,height:a-n}},t.createIcon=function(e,t,i){var n=(t=r.extend({rectHover:!0},t)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(n.image=e.slice(8),r.defaults(n,i),new u(t)):N(e.replace("path://",""),t,i,"center")},t.linePolygonIntersect=function(e,t,i,r,n){for(var a=0,o=n[n.length-1];a<n.length;a++){var s=n[a];if(ce(e,t,i,r,s[0],s[1],o[0],o[1]))return!0;o=s}},t.lineLineIntersect=ce},function(e,t,i){var r=i(0);var n=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function a(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}t.linearMap=function(e,t,i,r){var n=t[1]-t[0],a=i[1]-i[0];if(0===n)return 0===a?i[0]:(i[0]+i[1])/2;if(r)if(n>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/n*a+i[0]},t.parsePercent=function(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?(i=e,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var i},t.round=function(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e},t.asc=function(e){return e.sort((function(e,t){return e-t})),e},t.getPrecision=function(e){if(e=+e,isNaN(e))return 0;for(var t=1,i=0;Math.round(e*t)/t!==e;)t*=10,i++;return i},t.getPrecisionSafe=function(e){var t=e.toString(),i=t.indexOf("e");if(i>0){var r=+t.slice(i+1);return r<0?-r:0}var n=t.indexOf(".");return n<0?0:t.length-1-n},t.getPixelPrecision=function(e,t){var i=Math.log,r=Math.LN10,n=Math.floor(i(e[1]-e[0])/r),a=Math.round(i(Math.abs(t[1]-t[0]))/r),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20},t.getPercentWithPrecision=function(e,t,i){if(!e[t])return 0;var n=r.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return 0;for(var a=Math.pow(10,i),o=r.map(e,(function(e){return(isNaN(e)?0:e)/n*a*100})),s=100*a,l=r.map(o,(function(e){return Math.floor(e)})),c=r.reduce(l,(function(e,t){return e+t}),0),u=r.map(o,(function(e,t){return e-l[t]}));c<s;){for(var d=Number.NEGATIVE_INFINITY,h=null,p=0,f=u.length;p<f;++p)u[p]>d&&(d=u[p],h=p);++l[h],u[h]=0,++c}return l[t]/a},t.MAX_SAFE_INTEGER=9007199254740991,t.remRadian=function(e){var t=2*Math.PI;return(e%t+t)%t},t.isRadianAroundZero=function(e){return e>-1e-4&&e<1e-4},t.parseDate=function(e){if(e instanceof Date)return e;if("string"==typeof e){var t=n.exec(e);if(!t)return new Date(NaN);if(t[8]){var i=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(i-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,i,+(t[5]||0),+t[6]||0,+t[7]||0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,+t[7]||0)}return null==e?new Date(NaN):new Date(Math.round(e))},t.quantity=function(e){return Math.pow(10,a(e))},t.quantityExponent=a,t.nice=function(e,t){var i=a(e),r=Math.pow(10,i),n=e/r;return e=(t?n<1.5?1:n<2.5?2:n<4?3:n<7?5:10:n<1?1:n<2?2:n<3?3:n<5?5:10)*r,i>=-20?+e.toFixed(i<0?-i:0):e},t.quantile=function(e,t){var i=(e.length-1)*t+1,r=Math.floor(i),n=+e[r-1],a=i-r;return a?n+a*(e[r]-n):n},t.reformIntervals=function(e){e.sort((function(e,t){return function e(t,i,r){return t.interval[r]<i.interval[r]||t.interval[r]===i.interval[r]&&(t.close[r]-i.close[r]==(r?-1:1)||!r&&e(t,i,1))}(e,t,0)?-1:1}));for(var t=-1/0,i=1,r=0;r<e.length;){for(var n=e[r].interval,a=e[r].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,a[o]=o?1:1-i),t=n[o],i=a[o];n[0]===n[1]&&a[0]*a[1]!=1?e.splice(r,1):r++}return e},t.isNumeric=function(e){return e-parseFloat(e)>=0}},function(e,t,i){var r=i(0),n=i(11),a=r.each,o=r.isObject,s=r.isArray;function l(e){return e instanceof Array?e:null==e?[]:[e]}function c(e){return o(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var u=0;function d(e,t){return e&&e.hasOwnProperty(t)}t.normalizeToArray=l,t.defaultEmphasis=function(e,t,i){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,n=i.length;r<n;r++){var a=i[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}},t.TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],t.getDataItemValue=function(e){return!o(e)||s(e)||e instanceof Date?e:e.value},t.isDataItemOption=function(e){return o(e)&&!(e instanceof Array)},t.mappingToExists=function(e,t){t=(t||[]).slice();var i=r.map(e||[],(function(e,t){return{exist:e}}));return a(t,(function(e,r){if(o(e)){for(var n=0;n<i.length;n++)if(!i[n].option&&null!=e.id&&i[n].exist.id===e.id+"")return i[n].option=e,void(t[r]=null);for(n=0;n<i.length;n++){var a=i[n].exist;if(!(i[n].option||null!=a.id&&null!=e.id||null==e.name||c(e)||c(a)||a.name!==e.name+""))return i[n].option=e,void(t[r]=null)}}})),a(t,(function(e,t){if(o(e)){for(var r=0;r<i.length;r++){var n=i[r].exist;if(!i[r].option&&!c(n)&&null==e.id){i[r].option=e;break}}r>=i.length&&i.push({option:e})}})),i},t.makeIdAndName=function(e){var t=r.createHashMap();a(e,(function(e,i){var r=e.exist;r&&t.set(r.id,e)})),a(e,(function(e,i){var n=e.option;r.assert(!n||null==n.id||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})})),a(e,(function(e,i){var r=e.exist,n=e.option,a=e.keyInfo;if(o(n)){if(a.name=null!=n.name?n.name+"":r?r.name:"series\0"+i,r)a.id=r.id;else if(null!=n.id)a.id=n.id+"";else{var s=0;do{a.id="\0"+a.name+"\0"+s++}while(t.get(a.id))}t.set(a.id,e)}}))},t.isNameSpecified=function(e){var t=e.name;return!(!t||!t.indexOf("series\0"))},t.isIdInner=c,t.compressBatches=function(e,t){var i={},r={};return n(e||[],i),n(t||[],r,i),[a(i),a(r)];function n(e,t,i){for(var r=0,n=e.length;r<n;r++)for(var a=e[r].seriesId,o=l(e[r].dataIndex),s=i&&i[a],c=0,u=o.length;c<u;c++){var d=o[c];s&&s[d]?s[d]=null:(t[a]||(t[a]={}))[d]=1}}function a(e,t){var i=[];for(var r in e)if(e.hasOwnProperty(r)&&null!=e[r])if(t)i.push(+r);else{var n=a(e[r],!0);n.length&&i.push({seriesId:r,dataIndex:n})}return i}},t.queryDataIndex=function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?r.isArray(t.dataIndex)?r.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?r.isArray(t.name)?r.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},t.makeInner=function(){var e="__\0ec_inner_"+u+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},t.parseFinder=function(e,t,i){if(r.isString(t)){var n={};n[t+"Index"]=0,t=n}var o=i&&i.defaultMainType;!o||d(t,o+"Index")||d(t,o+"Id")||d(t,o+"Name")||(t[o+"Index"]=0);var s={};return a(t,(function(n,a){n=t[a];if("dataIndex"!==a&&"dataIndexInside"!==a){var o=a.match(/^(\w+)(Index|Id|Name)$/)||[],l=o[1],c=(o[2]||"").toLowerCase();if(!(!l||!c||null==n||"index"===c&&"none"===n||i&&i.includeMainTypes&&r.indexOf(i.includeMainTypes,l)<0)){var u={mainType:l};"index"===c&&"all"===n||(u[c]=n);var d=e.queryComponents(u);s[l+"Models"]=d,s[l+"Model"]=d[0]}}else s[a]=n})),s},t.setAttribute=function(e,t,i){e.setAttribute?e.setAttribute(t,i):e[t]=i},t.getAttribute=function(e,t){return e.getAttribute?e.getAttribute(t):e[t]},t.getTooltipRenderMode=function(e){return"auto"===e?n.domSupported?"html":"richText":e||"html"},t.groupData=function(e,t){var i=r.createHashMap(),n=[];return r.each(e,(function(e){var r=t(e);(i.get(r)||(n.push(r),i.set(r,[]))).push(e)})),{keys:n,buckets:i}}},function(e,t,i){(function(e){var i;"undefined"!=typeof window?i=window.__DEV__:void 0!==e&&(i=e.__DEV__),void 0===i&&(i=!0);var r=i;t.__DEV__=r}).call(this,i(16))},function(e,t,i){var r=i(0),n=i(9),a=i(3).parsePercent,o=i(7),s=r.each,l=["left","right","top","bottom","width","height"],c=[["width","left","right"],["height","top","bottom"]];function u(e,t,i,r,n){var a=0,o=0;null==r&&(r=1/0),null==n&&(n=1/0);var s=0;t.eachChild((function(l,c){var u,d,h=l.position,p=l.getBoundingRect(),f=t.childAt(c+1),m=f&&f.getBoundingRect();if("horizontal"===e){var g=p.width+(m?-m.x+p.x:0);(u=a+g)>r||l.newline?(a=0,u=g,o+=s+i,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(m?-m.y+p.y:0);(d=o+y)>n||l.newline?(a+=s+i,o=0,d=y,s=p.width):s=Math.max(s,p.width)}l.newline||(h[0]=a,h[1]=o,"horizontal"===e?a=u+i:o=d+i)}))}var d=u,h=r.curry(u,"vertical"),p=r.curry(u,"horizontal");function f(e,t,i){i=o.normalizeCssArray(i||0);var r=t.width,s=t.height,l=a(e.left,r),c=a(e.top,s),u=a(e.right,r),d=a(e.bottom,s),h=a(e.width,r),p=a(e.height,s),f=i[2]+i[0],m=i[1]+i[3],g=e.aspect;switch(isNaN(h)&&(h=r-u-m-l),isNaN(p)&&(p=s-d-f-c),null!=g&&(isNaN(h)&&isNaN(p)&&(g>r/s?h=.8*r:p=.8*s),isNaN(h)&&(h=g*p),isNaN(p)&&(p=h/g)),isNaN(l)&&(l=r-u-h-m),isNaN(c)&&(c=s-d-p-f),e.left||e.right){case"center":l=r/2-h/2-i[3];break;case"right":l=r-h-m}switch(e.top||e.bottom){case"middle":case"center":c=s/2-p/2-i[0];break;case"bottom":c=s-p-f}l=l||0,c=c||0,isNaN(h)&&(h=r-m-l-(u||0)),isNaN(p)&&(p=s-f-c-(d||0));var y=new n(l+i[3],c+i[0],h,p);return y.margin=i,y}function m(e,t){return t&&e&&s(l,(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}t.LOCATION_PARAMS=l,t.HV_NAMES=c,t.box=d,t.vbox=h,t.hbox=p,t.getAvailableSize=function(e,t,i){var r=t.width,n=t.height,s=a(e.x,r),l=a(e.y,n),c=a(e.x2,r),u=a(e.y2,n);return(isNaN(s)||isNaN(parseFloat(e.x)))&&(s=0),(isNaN(c)||isNaN(parseFloat(e.x2)))&&(c=r),(isNaN(l)||isNaN(parseFloat(e.y)))&&(l=0),(isNaN(u)||isNaN(parseFloat(e.y2)))&&(u=n),i=o.normalizeCssArray(i||0),{width:Math.max(c-s-i[1]-i[3],0),height:Math.max(u-l-i[0]-i[2],0)}},t.getLayoutRect=f,t.positionElement=function(e,t,i,a,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],c=o&&o.boundingMode||"all";if(s||l){var u;if("raw"===c)u="group"===e.type?new n(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(u=e.getBoundingRect(),e.needLocalTransform()){var d=e.getLocalTransform();(u=u.clone()).applyTransform(d)}t=f(r.defaults({width:u.width,height:u.height},t),i,a);var h=e.position,p=s?t.x-u.x:0,m=l?t.y-u.y:0;e.attr("position","raw"===c?[p,m]:[h[0]+p,h[1]+m])}},t.sizeCalculable=function(e,t){return null!=e[c[t][0]]||null!=e[c[t][1]]&&null!=e[c[t][2]]},t.mergeLayoutParam=function(e,t,i){!r.isObject(i)&&(i={});var n=i.ignoreSize;!r.isArray(n)&&(n=[n,n]);var a=l(c[0],0),o=l(c[1],1);function l(i,r){var a={},o=0,l={},c=0;if(s(i,(function(t){l[t]=e[t]})),s(i,(function(e){u(t,e)&&(a[e]=l[e]=t[e]),d(a,e)&&o++,d(l,e)&&c++})),n[r])return d(t,i[1])?l[i[2]]=null:d(t,i[2])&&(l[i[1]]=null),l;if(2!==c&&o){if(o>=2)return a;for(var h=0;h<i.length;h++){var p=i[h];if(!u(a,p)&&u(e,p)){a[p]=e[p];break}}return a}return l}function u(e,t){return e.hasOwnProperty(t)}function d(e,t){return null!=e[t]&&"auto"!==e[t]}function h(e,t,i){s(e,(function(e){t[e]=i[e]}))}h(c[0],e,a),h(c[1],e,o)},t.getLayoutParams=function(e){return m({},e)},t.copyLayoutParams=m},function(e,t,i){var r=i(0),n=i(17),a=i(3);var o=r.normalizeCssArray,s=/([&<>"'])/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function c(e){return null==e?"":(e+"").replace(s,(function(e,t){return l[t]}))}var u=["a","b","c","d","e","f","g"],d=function(e,t){return"{"+e+(null==t?"":t)+"}"};function h(e,t){return"0000".substr(0,t-(e+="").length)+e}var p=n.truncateText;t.addCommas=function(e){return isNaN(e)?"-":(e=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")},t.toCamelCase=function(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e},t.normalizeCssArray=o,t.encodeHTML=c,t.formatTpl=function(e,t,i){r.isArray(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],o=0;o<a.length;o++){var s=u[o];e=e.replace(d(s),d(s,0))}for(var l=0;l<n;l++)for(var h=0;h<a.length;h++){var p=t[l][a[h]];e=e.replace(d(u[h],l),i?c(p):p)}return e},t.formatTplSimple=function(e,t,i){return r.each(t,(function(t,r){e=e.replace("{"+r+"}",i?c(t):t)})),e},t.getTooltipMarker=function(e,t){var i=(e=r.isString(e)?{color:e,extraCssText:t}:e||{}).color,n=e.type,a=(t=e.extraCssText,e.renderMode||"html"),o=e.markerId||"X";return i?"html"===a?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+c(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+c(i)+";"+(t||"")+'"></span>':{renderMode:a,content:"{marker"+o+"|}  ",style:{color:i}}:""},t.formatTime=function(e,t,i){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var r=a.parseDate(t),n=i?"UTC":"",o=r["get"+n+"FullYear"](),s=r["get"+n+"Month"]()+1,l=r["get"+n+"Date"](),c=r["get"+n+"Hours"](),u=r["get"+n+"Minutes"](),d=r["get"+n+"Seconds"](),p=r["get"+n+"Milliseconds"]();return e=e.replace("MM",h(s,2)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",h(l,2)).replace("d",l).replace("hh",h(c,2)).replace("h",c).replace("mm",h(u,2)).replace("m",u).replace("ss",h(d,2)).replace("s",d).replace("SSS",h(p,3))},t.capitalFirst=function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},t.truncateText=p,t.getTextBoundingRect=function(e){return n.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},t.getTextRect=function(e,t,i,r,a,o,s,l){return n.getBoundingRect(e,t,i,r,a,l,o,s)},t.windowOpen=function(e,t){if("_blank"===t||"blank"===t){var i=window.open();i.opener=null,i.location=e}else window.open(e,t)}},function(e,t){var i="undefined"==typeof Float32Array?Array:Float32Array;function r(e){return Math.sqrt(a(e))}var n=r;function a(e){return e[0]*e[0]+e[1]*e[1]}var o=a;function s(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var l=s;function c(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var u=c;t.create=function(e,t){var r=new i(2);return null==e&&(e=0),null==t&&(t=0),r[0]=e,r[1]=t,r},t.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},t.clone=function(e){var t=new i(2);return t[0]=e[0],t[1]=e[1],t},t.set=function(e,t,i){return e[0]=t,e[1]=i,e},t.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},t.scaleAndAdd=function(e,t,i,r){return e[0]=t[0]+i[0]*r,e[1]=t[1]+i[1]*r,e},t.sub=function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},t.len=r,t.length=n,t.lenSquare=a,t.lengthSquare=o,t.mul=function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},t.div=function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},t.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},t.scale=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},t.normalize=function(e,t){var i=r(t);return 0===i?(e[0]=0,e[1]=0):(e[0]=t[0]/i,e[1]=t[1]/i),e},t.distance=s,t.dist=l,t.distanceSquare=c,t.distSquare=u,t.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},t.lerp=function(e,t,i,r){return e[0]=t[0]+r*(i[0]-t[0]),e[1]=t[1]+r*(i[1]-t[1]),e},t.applyTransform=function(e,t,i){var r=t[0],n=t[1];return e[0]=i[0]*r+i[2]*n+i[4],e[1]=i[1]*r+i[3]*n+i[5],e},t.min=function(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e},t.max=function(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}},function(e,t,i){var r,n,a,o,s=i(8),l=i(15),c=s.applyTransform,u=Math.min,d=Math.max;function h(e,t,i,r){i<0&&(e+=i,i=-i),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=i,this.height=r}h.prototype={constructor:h,union:function(e){var t=u(e.x,this.x),i=u(e.y,this.y);this.width=d(e.x+e.width,this.x+this.width)-t,this.height=d(e.y+e.height,this.y+this.height)-i,this.x=t,this.y=i},applyTransform:(r=[],n=[],a=[],o=[],function(e){if(e){r[0]=a[0]=this.x,r[1]=o[1]=this.y,n[0]=o[0]=this.x+this.width,n[1]=a[1]=this.y+this.height,c(r,r,e),c(n,n,e),c(a,a,e),c(o,o,e),this.x=u(r[0],n[0],a[0],o[0]),this.y=u(r[1],n[1],a[1],o[1]);var t=d(r[0],n[0],a[0],o[0]),i=d(r[1],n[1],a[1],o[1]);this.width=t-this.x,this.height=i-this.y}}),calculateTransform:function(e){var t=this,i=e.width/t.width,r=e.height/t.height,n=l.create();return l.translate(n,n,[-t.x,-t.y]),l.scale(n,n,[i,r]),l.translate(n,n,[e.x,e.y]),n},intersect:function(e){if(!e)return!1;e instanceof h||(e=h.create(e));var t=this,i=t.x,r=t.x+t.width,n=t.y,a=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,c=e.y+e.height;return!(r<o||s<i||a<l||c<n)},contain:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},clone:function(){return new h(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},h.create=function(e){return new h(e.x,e.y,e.width,e.height)};var p=h;e.exports=p},function(e,t,i){var r=i(61),n=i(0),a=i(50),o=i(291),s=i(153).prototype.getCanvasPattern,l=Math.abs,c=new a(!0);function u(e){r.call(this,e),this.path=null}u.prototype={constructor:u,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var i,r=this.style,n=this.path||c,a=r.hasStroke(),o=r.hasFill(),l=r.fill,u=r.stroke,d=o&&!!l.colorStops,h=a&&!!u.colorStops,p=o&&!!l.image,f=a&&!!u.image;(r.bind(e,this,t),this.setTransform(e),this.__dirty)&&(d&&(i=i||this.getBoundingRect(),this._fillGradient=r.getGradient(e,l,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=r.getGradient(e,u,i)));d?e.fillStyle=this._fillGradient:p&&(e.fillStyle=s.call(l,e)),h?e.strokeStyle=this._strokeGradient:f&&(e.strokeStyle=s.call(u,e));var m=r.lineDash,g=r.lineDashOffset,y=!!e.setLineDash,_=this.getGlobalScale();if(n.setScale(_[0],_[1],this.segmentIgnoreThreshold),this.__dirtyPath||m&&!y&&a?(n.beginPath(e),m&&!y&&(n.setLineDash(m),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=r.fillOpacity){var v=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,n.fill(e),e.globalAlpha=v}else n.fill(e);if(m&&y&&(e.setLineDash(m),e.lineDashOffset=g),a)if(null!=r.strokeOpacity){v=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,n.stroke(e),e.globalAlpha=v}else n.stroke(e);m&&y&&e.setLineDash([]),null!=r.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,i){},createPathProxy:function(){this.path=new a},getBoundingRect:function(){var e=this._rect,t=this.style,i=!e;if(i){var r=this.path;r||(r=this.path=new a),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),e=r.getBoundingRect()}if(this._rect=e,t.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||i){n.copy(e);var o=t.lineWidth,s=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),s>1e-10&&(n.width+=o/s,n.height+=o/s,n.x-=o/s/2,n.y-=o/s/2)}return n}return e},contain:function(e,t){var i=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),n=this.style;if(e=i[0],t=i[1],r.contain(e,t)){var a=this.path.data;if(n.hasStroke()){var s=n.lineWidth,l=n.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(n.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),o.containStroke(a,s/l,e,t)))return!0}if(n.hasFill())return o.contain(a,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var i=this.shape;if(i){if(n.isObject(e))for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r]);else i[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&l(e[0]-1)>1e-10&&l(e[3]-1)>1e-10?Math.sqrt(l(e[0]*e[3]-e[2]*e[1])):1}},u.extend=function(e){var t=function(t){u.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var i=e.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var n in i)!r.hasOwnProperty(n)&&i.hasOwnProperty(n)&&(r[n]=i[n])}e.init&&e.init.call(this,t)};for(var i in n.inherits(t,u),e)"style"!==i&&"shape"!==i&&(t.prototype[i]=e[i]);return t},n.inherits(u,r);var d=u;e.exports=d},function(e,t){var i="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(e){var t={},i=e.match(/Firefox\/([\d.]+)/),r=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),n=e.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(e);i&&(t.firefox=!0,t.version=i[1]);r&&(t.ie=!0,t.version=r[1]);n&&(t.edge=!0,t.version=n[1]);a&&(t.weChat=!0);return{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&t.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent);e.exports=i},function(e,t,i){var r=i(0),n=i(11),a=i(4).makeInner,o=i(28),s=o.enableClassExtend,l=o.enableClassCheck,c=i(288),u=i(289),d=i(290),h=i(303),p=r.mixin,f=a();function m(e,t,i){this.parentModel=t,this.ecModel=i,this.option=e}function g(e,t,i){for(var r=0;r<t.length&&(!t[r]||null!=(e=e&&"object"==typeof e?e[t[r]]:null));r++);return null==e&&i&&(e=i.get(t)),e}function y(e,t){var i=f(e).getParent;return i?i.call(e,t):e.parentModel}m.prototype={constructor:m,init:null,mergeOption:function(e){r.merge(this.option,e,!0)},get:function(e,t){return null==e?this.option:g(this.option,this.parsePath(e),!t&&y(this,e))},getShallow:function(e,t){var i=this.option,r=null==i?i:i[e],n=!t&&y(this,e);return null==r&&n&&(r=n.getShallow(e)),r},getModel:function(e,t){var i;return new m(null==e?this.option:g(this.option,e=this.parsePath(e)),t=t||(i=y(this,e))&&i.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(r.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){f(this).getParent=e},isAnimationEnabled:function(){if(!n.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},s(m),l(m),p(m,c),p(m,u),p(m,d),p(m,h);var _=m;e.exports=_},function(e,t,i){var r=i(0),n=i(12),a=i(63),o=i(28),s=o.enableClassManagement,l=o.parseClassType,c=i(4).makeInner,u=i(6),d=i(304),h=c(),p=n.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,i,r){n.call(this,e,t,i,r),this.uid=a.getUID("ec_cpt_model")},init:function(e,t,i,r){this.mergeDefaultAndTheme(e,i)},mergeDefaultAndTheme:function(e,t){var i=this.layoutMode,n=i?u.getLayoutParams(e):{},a=t.getTheme();r.merge(e,a.get(this.mainType)),r.merge(e,this.getDefaultOption()),i&&u.mergeLayoutParam(e,n,i)},mergeOption:function(e,t){r.merge(this.option,e,!0);var i=this.layoutMode;i&&u.mergeLayoutParam(this.option,e,i)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=h(this);if(!e.defaultOption){for(var t=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&t.push(n),i=i.superClass}for(var a={},o=t.length-1;o>=0;o--)a=r.merge(a,t[o],!0);e.defaultOption=a}return e.defaultOption},getReferringComponents:function(e){return this.ecModel.queryComponents({mainType:e,index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)})}});s(p,{registerWhenExtend:!0}),a.enableSubTypeDefaulter(p),a.enableTopologicalTravel(p,(function(e){var t=[];r.each(p.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=r.map(t,(function(e){return l(e).main})),"dataset"!==e&&r.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),r.mixin(p,d);var f=p;e.exports=f},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(11),a=i(7),o=a.formatTime,s=a.encodeHTML,l=a.addCommas,c=a.getTooltipMarker,u=i(4),d=i(13),h=i(169),p=i(107),f=i(6),m=f.getLayoutParams,g=f.mergeLayoutParam,y=i(108).createTask,_=i(29),v=_.prepareSource,C=_.getSource,x=i(42).retrieveRawValue,b=u.makeInner(),S=d.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(e,t,i,r){this.seriesIndex=this.componentIndex,this.dataTask=y({count:E,reset:w}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i),v(this);var n=this.getInitialData(e,i);P(n,this),this.dataTask.context.data=n,b(this).dataBeforeProcessed=n,T(this)},mergeDefaultAndTheme:function(e,t){var i=this.layoutMode,n=i?m(e):{},a=this.subType;d.hasClass(a)&&(a+="Series"),r.merge(e,t.getTheme().get(this.subType)),r.merge(e,this.getDefaultOption()),u.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&g(e,n,i)},mergeOption:function(e,t){e=r.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var i=this.layoutMode;i&&g(this.option,e,i),v(this);var n=this.getInitialData(e,t);P(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,b(this).dataBeforeProcessed=n,T(this)},fillDataTextStyle:function(e){if(e&&!r.isTypedArray(e))for(var t=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&u.defaultEmphasis(e[i],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=M(this);if(t){var i=t.context.data;return null==e?i:i.getLinkedData(e)}return b(this).data},setData:function(e){var t=M(this);if(t){var i=t.context;i.data!==e&&t.modifyOutputEnd&&t.setOutputEnd(e.count()),i.outputData=e,t!==this.dataTask&&(i.data=e)}b(this).data=e},getSource:function(){return C(this)},getRawData:function(){return b(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,i,n){var a=this,d="html"===(n=n||"html")?"<br/>":"\n",h="richText"===n,p={},f=0;function m(e){return{renderMode:n,content:s(l(e)),style:p}}var g=this.getData(),y=g.mapDimension("defaultedTooltip",!0),_=y.length,v=this.getRawValue(e),C=r.isArray(v),b=g.getItemVisual(e,"color");r.isObject(b)&&b.colorStops&&(b=(b.colorStops[0]||{}).color),b=b||"transparent";var S=(_>1||C&&!_?function(i){var u=r.reduce(i,(function(e,t,i){var r=g.getDimensionInfo(i);return e|(r&&!1!==r.tooltip&&null!=r.displayName)}),0),d=[];function m(e,i){var r=g.getDimensionInfo(i);if(r&&!1!==r.otherDims.tooltip){var m=r.type,y="sub"+a.seriesIndex+"at"+f,_=c({color:b,type:"subItem",renderMode:n,markerId:y}),v="string"==typeof _?_:_.content,C=(u?v+s(r.displayName||"-")+": ":"")+s("ordinal"===m?e+"":"time"===m?t?"":o("yyyy/MM/dd hh:mm:ss",e):l(e));C&&d.push(C),h&&(p[y]=b,++f)}}y.length?r.each(y,(function(t){m(x(g,e,t),t)})):r.each(i,m);var _=u?h?"\n":"<br/>":"",v=_+d.join(_||", ");return{renderMode:n,content:v,style:p}}(v):m(_?x(g,e,y[0]):C?v[0]:v)).content,T=a.seriesIndex+"at"+f,E=c({color:b,type:"item",renderMode:n,markerId:T});p[T]=b,++f;var w=g.getName(e),A=this.name;u.isNameSpecified(this)||(A=""),A=A?s(A)+(t?": ":d):"";var P="string"==typeof E?E:E.content;return{html:t?P+A+S:A+P+(w?s(w)+": "+S:S),markers:p}},isAnimationEnabled:function(){if(n.node)return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),e},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(e,t,i){var r=this.ecModel,n=h.getColorFromPalette.call(this,e,t,i);return n||(n=r.getColorFromPalette(e,t,i)),n},coordDimToDataDim:function(e){return this.getRawData().mapDimension(e,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function T(e){var t=e.name;u.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),i=t.mapDimension("seriesName",!0),n=[];return r.each(i,(function(e){var i=t.getDimensionInfo(e);i.displayName&&n.push(i.displayName)})),n.join(" ")}(e)||t)}function E(e){return e.model.getRawData().count()}function w(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),A}function A(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function P(e,t){r.each(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,r.curry(D,t))}))}function D(e){var t=M(e);t&&t.setOutputEnd(this.count())}function M(e){var t=(e.ecModel||{}).scheduler,i=t&&t.getPipeline(e.uid);if(i){var r=i.currentTask;if(r){var n=r.agentStubMap;n&&(r=n.get(e.uid))}return r}}r.mixin(S,p),r.mixin(S,h);var I=S;e.exports=I},function(e,t){var i="undefined"==typeof Float32Array?Array:Float32Array;function r(){var e=new i(6);return n(e),e}function n(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}t.create=r,t.identity=n,t.copy=a,t.mul=function(e,t,i){var r=t[0]*i[0]+t[2]*i[1],n=t[1]*i[0]+t[3]*i[1],a=t[0]*i[2]+t[2]*i[3],o=t[1]*i[2]+t[3]*i[3],s=t[0]*i[4]+t[2]*i[5]+t[4],l=t[1]*i[4]+t[3]*i[5]+t[5];return e[0]=r,e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},t.translate=function(e,t,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+i[0],e[5]=t[5]+i[1],e},t.rotate=function(e,t,i){var r=t[0],n=t[2],a=t[4],o=t[1],s=t[3],l=t[5],c=Math.sin(i),u=Math.cos(i);return e[0]=r*u+o*c,e[1]=-r*c+o*u,e[2]=n*u+s*c,e[3]=-n*c+u*s,e[4]=u*a+c*l,e[5]=u*l-c*a,e},t.scale=function(e,t,i){var r=i[0],n=i[1];return e[0]=t[0]*r,e[1]=t[1]*n,e[2]=t[2]*r,e[3]=t[3]*n,e[4]=t[4]*r,e[5]=t[5]*n,e},t.invert=function(e,t){var i=t[0],r=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=i*o-a*r;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-r*l,e[3]=i*l,e[4]=(r*s-o*n)*l,e[5]=(a*n-i*s)*l,e):null},t.clone=function(e){var t=r();return a(t,e),t}},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){var r=i(9),n=i(102),a=i(0),o=a.getContext,s=a.extend,l=a.retrieve2,c=a.retrieve3,u=a.trim,d={},h=0,p=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,f={};function m(e,t){var i=e+":"+(t=t||"12px sans-serif");if(d[i])return d[i];for(var r=(e+"").split("\n"),n=0,a=0,o=r.length;a<o;a++)n=Math.max(T(r[a],t).width,n);return h>5e3&&(h=0,d={}),h++,d[i]=n,n}function g(e,t,i){return"right"===i?e-=t:"center"===i&&(e-=t/2),e}function y(e,t,i){return"middle"===i?e-=t/2:"bottom"===i&&(e-=t),e}function _(e,t,i){var r=t.textPosition,n=t.textDistance,a=i.x,o=i.y;n=n||0;var s=i.height,l=i.width,c=s/2,u="left",d="top";switch(r){case"left":a-=n,o+=c,u="right",d="middle";break;case"right":a+=n+l,o+=c,d="middle";break;case"top":a+=l/2,o-=n,u="center",d="bottom";break;case"bottom":a+=l/2,o+=s+n,u="center";break;case"inside":a+=l/2,o+=c,u="center",d="middle";break;case"insideLeft":a+=n,o+=c,d="middle";break;case"insideRight":a+=l-n,o+=c,u="right",d="middle";break;case"insideTop":a+=l/2,o+=n,u="center";break;case"insideBottom":a+=l/2,o+=s-n,u="center",d="bottom";break;case"insideTopLeft":a+=n,o+=n;break;case"insideTopRight":a+=l-n,o+=n,u="right";break;case"insideBottomLeft":a+=n,o+=s-n,d="bottom";break;case"insideBottomRight":a+=l-n,o+=s-n,u="right",d="bottom"}return(e=e||{}).x=a,e.y=o,e.textAlign=u,e.textVerticalAlign=d,e}function v(e,t,i,r,n){if(!t)return"";var a=(e+"").split("\n");n=C(t,i,r,n);for(var o=0,s=a.length;o<s;o++)a[o]=x(a[o],n);return a.join("\n")}function C(e,t,i,r){(r=s({},r)).font=t;i=l(i,"...");r.maxIterations=l(r.maxIterations,2);var n=r.minChar=l(r.minChar,0);r.cnCharWidth=m("国",t);var a=r.ascCharWidth=m("a",t);r.placeholder=l(r.placeholder,"");for(var o=e=Math.max(0,e-1),c=0;c<n&&o>=a;c++)o-=a;var u=m(i,t);return u>o&&(i="",u=0),o=e-u,r.ellipsis=i,r.ellipsisWidth=u,r.contentWidth=o,r.containerWidth=e,r}function x(e,t){var i=t.containerWidth,r=t.font,n=t.contentWidth;if(!i)return"";var a=m(e,r);if(a<=i)return e;for(var o=0;;o++){if(a<=n||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?b(e,n,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*n/a):0;a=m(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function b(e,t,i,r){for(var n=0,a=0,o=e.length;a<o&&n<t;a++){var s=e.charCodeAt(a);n+=0<=s&&s<=127?i:r}return a}function S(e){return m("国",e)}function T(e,t){return f.measureText(e,t)}function E(e,t,i,r,n){null!=e&&(e+="");var a=l(r,S(t)),o=e?e.split("\n"):[],s=o.length*a,c=s,u=!0;if(i&&(c+=i[0]+i[2]),e&&n){u=!1;var d=n.outerHeight,h=n.outerWidth;if(null!=d&&c>d)e="",o=[];else if(null!=h)for(var p=C(h-(i?i[1]+i[3]:0),t,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),f=0,m=o.length;f<m;f++)o[f]=x(o[f],p)}return{lines:o,height:s,outerHeight:c,lineHeight:a,canCacheByTextString:u}}function w(e,t){var i={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return i;for(var r,a=p.lastIndex=0;null!=(r=p.exec(e));){var o=r.index;o>a&&A(i,e.substring(a,o)),A(i,r[2],r[1]),a=p.lastIndex}a<e.length&&A(i,e.substring(a,e.length));var s=i.lines,u=0,d=0,h=[],f=t.textPadding,g=t.truncate,y=g&&g.outerWidth,_=g&&g.outerHeight;f&&(null!=y&&(y-=f[1]+f[3]),null!=_&&(_-=f[0]+f[2]));for(var C=0;C<s.length;C++){for(var x=s[C],b=0,T=0,E=0;E<x.tokens.length;E++){var w=(B=x.tokens[E]).styleName&&t.rich[B.styleName]||{},P=B.textPadding=w.textPadding,D=B.font=w.font||t.font,M=B.textHeight=l(w.textHeight,S(D));if(P&&(M+=P[0]+P[2]),B.height=M,B.lineHeight=c(w.textLineHeight,t.textLineHeight,M),B.textAlign=w&&w.textAlign||t.textAlign,B.textVerticalAlign=w&&w.textVerticalAlign||"middle",null!=_&&u+B.lineHeight>_)return{lines:[],width:0,height:0};B.textWidth=m(B.text,D);var I=w.textWidth,R=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))B.percentWidth=I,h.push(B),I=0;else{if(R){I=B.textWidth;var O=w.textBackgroundColor,L=O&&O.image;L&&(L=n.findExistImage(L),n.isImageReady(L)&&(I=Math.max(I,L.width*M/L.height)))}var N=P?P[1]+P[3]:0;I+=N;var F=null!=y?y-T:null;null!=F&&F<I&&(!R||F<N?(B.text="",B.textWidth=I=0):(B.text=v(B.text,F-N,D,g.ellipsis,{minChar:g.minChar}),B.textWidth=m(B.text,D),I=B.textWidth+N))}T+=B.width=I,w&&(b=Math.max(b,B.lineHeight))}x.width=T,x.lineHeight=b,u+=b,d=Math.max(d,T)}i.outerWidth=i.width=l(t.textWidth,d),i.outerHeight=i.height=l(t.textHeight,u),f&&(i.outerWidth+=f[1]+f[3],i.outerHeight+=f[0]+f[2]);for(C=0;C<h.length;C++){var B,V=(B=h[C]).percentWidth;B.width=parseInt(V,10)/100*d}return i}function A(e,t,i){for(var r=""===t,n=t.split("\n"),a=e.lines,o=0;o<n.length;o++){var s=n[o],l={styleName:i,text:s,isLineHolder:!s&&!r};if(o)a.push({tokens:[l]});else{var c=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=c.length;1===u&&c[0].isLineHolder?c[0]=l:(s||!u||r)&&c.push(l)}}}f.measureText=function(e,t){var i=o();return i.font=t||"12px sans-serif",i.measureText(e)},t.DEFAULT_FONT="12px sans-serif",t.$override=function(e,t){f[e]=t},t.getWidth=m,t.getBoundingRect=function(e,t,i,n,a,o,s,l){return s?function(e,t,i,n,a,o,s,l){var c=w(e,{rich:s,truncate:l,font:t,textAlign:i,textPadding:a,textLineHeight:o}),u=c.outerWidth,d=c.outerHeight,h=g(0,u,i),p=y(0,d,n);return new r(h,p,u,d)}(e,t,i,n,a,o,s,l):function(e,t,i,n,a,o,s){var l=E(e,t,a,o,s),c=m(e,t);a&&(c+=a[1]+a[3]);var u=l.outerHeight,d=g(0,c,i),h=y(0,u,n),p=new r(d,h,c,u);return p.lineHeight=l.lineHeight,p}(e,t,i,n,a,o,l)},t.adjustTextX=g,t.adjustTextY=y,t.calculateTextPosition=_,t.adjustTextPositionOnRect=function(e,t,i){return _({},{textPosition:e,textDistance:i},t)},t.truncateText=v,t.getLineHeight=S,t.measureText=T,t.parsePlainText=E,t.parseRichText=w,t.makeFont=function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&u(t)||e.textFont||e.font}},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(12),a=i(43),o=i(64),s=i(42),l=s.defaultDimValueGetters,c=s.DefaultDataProvider,u=i(66).summarizeDimensions,d=i(174),h=r.isObject,p={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},f="undefined"==typeof Uint32Array?Array:Uint32Array,m="undefined"==typeof Int32Array?Array:Int32Array,g="undefined"==typeof Uint16Array?Array:Uint16Array;function y(e){return e._rawCount>65535?f:g}var _=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],v=["_extent","_approximateExtent","_rawExtent"];function C(e,t){r.each(_.concat(t.__wrappedMethods||[]),(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e.__wrappedMethods=t.__wrappedMethods,r.each(v,(function(i){e[i]=r.clone(t[i])})),e._calculationInfo=r.extend(t._calculationInfo)}var x=function(e,t){e=e||["x","y"];for(var i={},n=[],a={},o=0;o<e.length;o++){var s=e[o];r.isString(s)?s=new d({name:s}):s instanceof d||(s=new d(s));var l=s.name;s.type=s.type||"float",s.coordDim||(s.coordDim=l,s.coordDimIndex=0),s.otherDims=s.otherDims||{},n.push(l),i[l]=s,s.index=o,s.createInvertedIndices&&(a[l]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=t,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=u(this),this._invertedIndicesMap=a,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},b=x.prototype;function S(e,t,i,r,n){var a=p[t.type],o=r-1,s=t.name,l=e[s][o];if(l&&l.length<i){for(var c=new a(Math.min(n-o*i,i)),u=0;u<l.length;u++)c[u]=l[u];e[s][o]=c}for(var d=r*i;d<n;d+=i)e[s].push(new a(Math.min(n-d,i)))}function T(e){var t=e._invertedIndicesMap;r.each(t,(function(i,r){var n=e._dimensionInfos[r].ordinalMeta;if(n){i=t[r]=new m(n.categories.length);for(var a=0;a<i.length;a++)i[a]=-1;for(a=0;a<e._count;a++)i[e.get(r,a)]=a}}))}function E(e,t,i){var r;if(null!=t){var n=e._chunkSize,a=Math.floor(i/n),o=i%n,s=e.dimensions[t],l=e._storage[s][a];if(l){r=l[o];var c=e._dimensionInfos[s].ordinalMeta;c&&c.categories.length&&(r=c.categories[r])}}return r}function w(e){return e}function A(e){return e<this._count&&e>=0?this._indices[e]:-1}function P(e,t){var i=e._idList[t];return null==i&&(i=E(e,e._idDimIdx,t)),null==i&&(i="e\0\0"+t),i}function D(e){return r.isArray(e)||(e=[e]),e}function M(e,t){var i=e.dimensions,n=new x(r.map(i,e.getDimensionInfo,e),e.hostModel);C(n,e);for(var a=n._storage={},o=e._storage,s=0;s<i.length;s++){var l=i[s];o[l]&&(r.indexOf(t,l)>=0?(a[l]=I(o[l]),n._rawExtent[l]=R(),n._extent[l]=null):a[l]=o[l])}return n}function I(e){for(var t,i,r=new Array(e.length),n=0;n<e.length;n++)r[n]=(t=e[n],i=void 0,(i=t.constructor)===Array?t.slice():new i(t));return r}function R(){return[1/0,-1/0]}b.type="list",b.hasItemOption=!0,b.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},b.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},b.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},b.mapDimension=function(e,t){var i=this._dimensionsSummary;if(null==t)return i.encodeFirstDimNotExtra[e];var r=i.encode[e];return!0===t?(r||[]).slice():r&&r[t]},b.initData=function(e,t,i){(o.isInstance(e)||r.isArrayLike(e))&&(e=new c(e,this.dimensions.length)),this._rawData=e,this._storage={},this._indices=null,this._nameList=t||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=l[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=l.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},b.getProvider=function(){return this._rawData},b.appendData=function(e){var t=this._rawData,i=this.count();t.appendData(e);var r=t.count();t.persistent||(r+=i),this._initDataFromProvider(i,r)},b.appendValues=function(e,t){for(var i=this._chunkSize,r=this._storage,n=this.dimensions,a=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t?t.length:0),c=this._chunkCount,u=0;u<a;u++){o[y=n[u]]||(o[y]=R()),r[y]||(r[y]=[]),S(r,this._dimensionInfos[y],i,c,l),this._chunkCount=r[y].length}for(var d=new Array(a),h=s;h<l;h++){for(var p=h-s,f=Math.floor(h/i),m=h%i,g=0;g<a;g++){var y=n[g],_=this._dimValueGetterArrayRows(e[p]||d,y,p,g);r[y][f][m]=_;var v=o[y];_<v[0]&&(v[0]=_),_>v[1]&&(v[1]=_)}t&&(this._nameList[h]=t[p])}this._rawCount=this._count=l,this._extent={},T(this)},b._initDataFromProvider=function(e,t){if(!(e>=t)){for(var i,r=this._chunkSize,n=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,c=this._nameList,u=this._idList,d=this._rawExtent,h=this._nameRepeatCount={},p=this._chunkCount,f=0;f<s;f++){d[x=o[f]]||(d[x]=R());var m=l[x];0===m.otherDims.itemName&&(i=this._nameDimIdx=f),0===m.otherDims.itemId&&(this._idDimIdx=f),a[x]||(a[x]=[]),S(a,m,r,p,t),this._chunkCount=a[x].length}for(var g=new Array(s),y=e;y<t;y++){g=n.getItem(y,g);for(var _=Math.floor(y/r),v=y%r,C=0;C<s;C++){var x,b=a[x=o[C]][_],E=this._dimValueGetter(g,x,y,C);b[v]=E;var w=d[x];E<w[0]&&(w[0]=E),E>w[1]&&(w[1]=E)}if(!n.pure){var A=c[y];if(g&&null==A)if(null!=g.name)c[y]=A=g.name;else if(null!=i){var P=o[i],D=a[P][_];if(D){A=D[v];var M=l[P].ordinalMeta;M&&M.categories.length&&(A=M.categories[A])}}var I=null==g?null:g.id;null==I&&null!=A&&(h[A]=h[A]||0,I=A,h[A]>0&&(I+="__ec__"+h[A]),h[A]++),null!=I&&(u[y]=I)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent={},T(this)}},b.count=function(){return this._count},b.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,i=this._count;if(t===Array){n=new t(i);for(var r=0;r<i;r++)n[r]=e[r]}else n=new t(e.buffer,0,i)}else{var n=new(t=y(this))(this.count());for(r=0;r<n.length;r++)n[r]=r}return n},b.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var i=this._storage;if(!i[e])return NaN;t=this.getRawIndex(t);var r=Math.floor(t/this._chunkSize),n=t%this._chunkSize;return i[e][r][n]},b.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var i=this._storage[e];if(!i)return NaN;var r=Math.floor(t/this._chunkSize),n=t%this._chunkSize;return i[r][n]},b._getFast=function(e,t){var i=Math.floor(t/this._chunkSize),r=t%this._chunkSize;return this._storage[e][i][r]},b.getValues=function(e,t){var i=[];r.isArray(e)||(t=e,e=this.dimensions);for(var n=0,a=e.length;n<a;n++)i.push(this.get(e[n],t));return i},b.hasValue=function(e){for(var t=this._dimensionsSummary.dataDimsOnCoord,i=0,r=t.length;i<r;i++)if(isNaN(this.get(t[i],e)))return!1;return!0},b.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],i=R();if(!t)return i;var r,n=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var a=(r=i)[0],o=r[1],s=0;s<n;s++){var l=this._getFast(e,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return r=[a,o],this._extent[e]=r,r},b.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},b.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},b.getCalculationInfo=function(e){return this._calculationInfo[e]},b.setCalculationInfo=function(e,t){h(e)?r.extend(this._calculationInfo,e):this._calculationInfo[e]=t},b.getSum=function(e){var t=0;if(this._storage[e])for(var i=0,r=this.count();i<r;i++){var n=this.get(e,i);isNaN(n)||(t+=n)}return t},b.getMedian=function(e){var t=[];this.each(e,(function(e,i){isNaN(e)||t.push(e)}));var i=[].concat(t).sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2==1?i[(r-1)/2]:(i[r/2]+i[r/2-1])/2},b.rawIndexOf=function(e,t){var i=(e&&this._invertedIndicesMap[e])[t];return null==i||isNaN(i)?-1:i},b.indexOfName=function(e){for(var t=0,i=this.count();t<i;t++)if(this.getName(t)===e)return t;return-1},b.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(null!=i&&i<this._count&&i===e)return e;for(var r=0,n=this._count-1;r<=n;){var a=(r+n)/2|0;if(t[a]<e)r=a+1;else{if(!(t[a]>e))return a;n=a-1}}return-1},b.indicesOfNearest=function(e,t,i){var r=[];if(!this._storage[e])return r;null==i&&(i=1/0);for(var n=1/0,a=-1,o=0,s=0,l=this.count();s<l;s++){var c=t-this.get(e,s),u=Math.abs(c);u<=i&&((u<n||u===n&&c>=0&&a<0)&&(n=u,a=c,o=0),c===a&&(r[o++]=s))}return r.length=o,r},b.getRawIndex=w,b.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],i=0;i<this.dimensions.length;i++){var r=this.dimensions[i];t.push(this.get(r,e))}return t},b.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||E(this,this._nameDimIdx,t)||""},b.getId=function(e){return P(this,this.getRawIndex(e))},b.each=function(e,t,i,n){"use strict";if(this._count){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this;for(var a=(e=r.map(D(e),this.getDimension,this)).length,o=0;o<this.count();o++)switch(a){case 0:t.call(i,o);break;case 1:t.call(i,this.get(e[0],o),o);break;case 2:t.call(i,this.get(e[0],o),this.get(e[1],o),o);break;default:for(var s=0,l=[];s<a;s++)l[s]=this.get(e[s],o);l[s]=o,t.apply(i,l)}}},b.filterSelf=function(e,t,i,n){"use strict";if(this._count){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this,e=r.map(D(e),this.getDimension,this);for(var a=this.count(),o=new(y(this))(a),s=[],l=e.length,c=0,u=e[0],d=0;d<a;d++){var h,p=this.getRawIndex(d);if(0===l)h=t.call(i,d);else if(1===l){var f=this._getFast(u,p);h=t.call(i,f,d)}else{for(var m=0;m<l;m++)s[m]=this._getFast(u,p);s[m]=d,h=t.apply(i,s)}h&&(o[c++]=p)}return c<a&&(this._indices=o),this._count=c,this._extent={},this.getRawIndex=this._indices?A:w,this}},b.selectRange=function(e){"use strict";if(this._count){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);var r=t.length;if(r){var n=this.count(),a=new(y(this))(n),o=0,s=t[0],l=e[s][0],c=e[s][1],u=!1;if(!this._indices){var d=0;if(1===r){for(var h=this._storage[t[0]],p=0;p<this._chunkCount;p++)for(var f=h[p],m=Math.min(this._count-p*this._chunkSize,this._chunkSize),g=0;g<m;g++){((b=f[g])>=l&&b<=c||isNaN(b))&&(a[o++]=d),d++}u=!0}else if(2===r){h=this._storage[s];var _=this._storage[t[1]],v=e[t[1]][0],C=e[t[1]][1];for(p=0;p<this._chunkCount;p++){f=h[p];var x=_[p];for(m=Math.min(this._count-p*this._chunkSize,this._chunkSize),g=0;g<m;g++){var b=f[g],S=x[g];(b>=l&&b<=c||isNaN(b))&&(S>=v&&S<=C||isNaN(S))&&(a[o++]=d),d++}}u=!0}}if(!u)if(1===r)for(g=0;g<n;g++){var T=this.getRawIndex(g);((b=this._getFast(s,T))>=l&&b<=c||isNaN(b))&&(a[o++]=T)}else for(g=0;g<n;g++){var E=!0;for(T=this.getRawIndex(g),p=0;p<r;p++){var P=t[p];((b=this._getFast(i,T))<e[P][0]||b>e[P][1])&&(E=!1)}E&&(a[o++]=this.getRawIndex(g))}return o<n&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?A:w,this}}},b.mapArray=function(e,t,i,r){"use strict";"function"==typeof e&&(r=i,i=t,t=e,e=[]),i=i||r||this;var n=[];return this.each(e,(function(){n.push(t&&t.apply(this,arguments))}),i),n},b.map=function(e,t,i,n){"use strict";i=i||n||this;var a=M(this,e=r.map(D(e),this.getDimension,this));a._indices=this._indices,a.getRawIndex=a._indices?A:w;for(var o=a._storage,s=[],l=this._chunkSize,c=e.length,u=this.count(),d=[],h=a._rawExtent,p=0;p<u;p++){for(var f=0;f<c;f++)d[f]=this.get(e[f],p);d[c]=p;var m=t&&t.apply(i,d);if(null!=m){"object"!=typeof m&&(s[0]=m,m=s);for(var g=this.getRawIndex(p),y=Math.floor(g/l),_=g%l,v=0;v<m.length;v++){var C=e[v],x=m[v],b=h[C],S=o[C];S&&(S[y][_]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return a},b.downSample=function(e,t,i,r){for(var n=M(this,[e]),a=n._storage,o=[],s=Math.floor(1/t),l=a[e],c=this.count(),u=this._chunkSize,d=n._rawExtent[e],h=new(y(this))(c),p=0,f=0;f<c;f+=s){s>c-f&&(s=c-f,o.length=s);for(var m=0;m<s;m++){var g=this.getRawIndex(f+m),_=Math.floor(g/u),v=g%u;o[m]=l[_][v]}var C=i(o),x=this.getRawIndex(Math.min(f+r(o,C)||0,c-1)),b=x%u;l[Math.floor(x/u)][b]=C,C<d[0]&&(d[0]=C),C>d[1]&&(d[1]=C),h[p++]=x}return n._count=p,n._indices=h,n.getRawIndex=A,n},b.getItemModel=function(e){var t=this.hostModel;return new n(this.getRawDataItem(e),t,t&&t.ecModel)},b.diff=function(e){var t=this;return new a(e?e.getIndices():[],this.getIndices(),(function(t){return P(e,t)}),(function(e){return P(t,e)}))},b.getVisual=function(e){var t=this._visual;return t&&t[e]},b.setVisual=function(e,t){if(h(e))for(var i in e)e.hasOwnProperty(i)&&this.setVisual(i,e[i]);else this._visual=this._visual||{},this._visual[e]=t},b.setLayout=function(e,t){if(h(e))for(var i in e)e.hasOwnProperty(i)&&this.setLayout(i,e[i]);else this._layout[e]=t},b.getLayout=function(e){return this._layout[e]},b.getItemLayout=function(e){return this._itemLayouts[e]},b.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?r.extend(this._itemLayouts[e]||{},t):t},b.clearItemLayouts=function(){this._itemLayouts.length=0},b.getItemVisual=function(e,t,i){var r=this._itemVisuals[e],n=r&&r[t];return null!=n||i?n:this.getVisual(t)},b.setItemVisual=function(e,t,i){var r=this._itemVisuals[e]||{},n=this.hasItemVisual;if(this._itemVisuals[e]=r,h(t))for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a],n[a]=!0);else r[t]=i,n[t]=!0},b.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var O=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};b.setItemGraphicEl=function(e,t){var i=this.hostModel;t&&(t.dataIndex=e,t.dataType=this.dataType,t.seriesIndex=i&&i.seriesIndex,"group"===t.type&&t.traverse(O,t)),this._graphicEls[e]=t},b.getItemGraphicEl=function(e){return this._graphicEls[e]},b.eachItemGraphicEl=function(e,t){r.each(this._graphicEls,(function(i,r){i&&e&&e.call(t,i,r)}))},b.cloneShallow=function(e){if(!e){var t=r.map(this.dimensions,this.getDimensionInfo,this);e=new x(t,this.hostModel)}if(e._storage=this._storage,C(e,this),this._indices){var i=this._indices.constructor;e._indices=new i(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?A:w,e},b.wrapMethod=function(e,t){var i=this[e];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=i.apply(this,arguments);return t.apply(this,[e].concat(r.slice(arguments)))})},b.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],b.CHANGABLE_METHODS=["filterSelf","selectRange"];var L=x;e.exports=L},function(e,t,i){var r=i(0),n=i(2),a=i(9),o=i(17).calculateTextPosition,s=n.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var i=t.cx,r=t.cy,n=t.width/2,a=t.height/2;e.moveTo(i,r-a),e.lineTo(i+n,r+a),e.lineTo(i-n,r+a),e.closePath()}}),l=n.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var i=t.cx,r=t.cy,n=t.width/2,a=t.height/2;e.moveTo(i,r-a),e.lineTo(i+n,r),e.lineTo(i,r+a),e.lineTo(i-n,r),e.closePath()}}),c=n.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var i=t.x,r=t.y,n=t.width/5*3,a=Math.max(n,t.height),o=n/2,s=o*o/(a-o),l=r-a+o+s,c=Math.asin(s/o),u=Math.cos(c)*o,d=Math.sin(c),h=Math.cos(c),p=.6*o,f=.7*o;e.moveTo(i-u,l+s),e.arc(i,l,o,Math.PI-c,2*Math.PI+c),e.bezierCurveTo(i+u-d*p,l+s+h*p,i,r-f,i,r),e.bezierCurveTo(i,r-f,i-u+d*p,l+s+h*p,i-u,l+s),e.closePath()}}),u=n.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var i=t.height,r=t.width,n=t.x,a=t.y,o=r/3*2;e.moveTo(n,a),e.lineTo(n+o,a+i),e.lineTo(n,a+i/4*3),e.lineTo(n-o,a+i),e.lineTo(n,a),e.closePath()}}),d={line:n.Line,rect:n.Rect,roundRect:n.Rect,square:n.Rect,circle:n.Circle,diamond:l,pin:c,arrow:u,triangle:s},h={line:function(e,t,i,r,n){n.x1=e,n.y1=t+r/2,n.x2=e+i,n.y2=t+r/2},rect:function(e,t,i,r,n){n.x=e,n.y=t,n.width=i,n.height=r},roundRect:function(e,t,i,r,n){n.x=e,n.y=t,n.width=i,n.height=r,n.r=Math.min(i,r)/4},square:function(e,t,i,r,n){var a=Math.min(i,r);n.x=e,n.y=t,n.width=a,n.height=a},circle:function(e,t,i,r,n){n.cx=e+i/2,n.cy=t+r/2,n.r=Math.min(i,r)/2},diamond:function(e,t,i,r,n){n.cx=e+i/2,n.cy=t+r/2,n.width=i,n.height=r},pin:function(e,t,i,r,n){n.x=e+i/2,n.y=t+r/2,n.width=i,n.height=r},arrow:function(e,t,i,r,n){n.x=e+i/2,n.y=t+r/2,n.width=i,n.height=r},triangle:function(e,t,i,r,n){n.cx=e+i/2,n.cy=t+r/2,n.width=i,n.height=r}},p={};r.each(d,(function(e,t){p[t]=new e}));var f=n.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,i){var r=o(e,t,i),n=this.shape;return n&&"pin"===n.symbolType&&"inside"===t.textPosition&&(r.y=i.y+.4*i.height),r},buildPath:function(e,t,i){var r=t.symbolType;if("none"!==r){var n=p[r];n||(n=p[r="rect"]),h[r](t.x,t.y,t.width,t.height,n.shape),n.buildPath(e,n.shape,i)}}});function m(e,t){if("image"!==this.type){var i=this.style,r=this.shape;r&&"line"===r.symbolType?i.stroke=e:this.__isEmptyBrush?(i.stroke=e,i.fill=t||"#fff"):(i.fill&&(i.fill=e),i.stroke&&(i.stroke=e)),this.dirty(!1)}}t.createSymbol=function(e,t,i,r,o,s,l){var c,u=0===e.indexOf("empty");return u&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(c=0===e.indexOf("image://")?n.makeImage(e.slice(8),new a(t,i,r,o),l?"center":"cover"):0===e.indexOf("path://")?n.makePath(e.slice(7),{},new a(t,i,r,o),l?"center":"cover"):new f({shape:{symbolType:e,x:t,y:i,width:r,height:o}})).__isEmptyBrush=u,c.setColor=m,c.setColor(s),c}},function(e,t,i){var r=i(0),n={};function a(){this._coordinateSystems=[]}a.prototype={constructor:a,create:function(e,t){var i=[];r.each(n,(function(r,n){var a=r.create(e,t);i=i.concat(a||[])})),this._coordinateSystems=i},update:function(e,t){r.each(this._coordinateSystems,(function(i){i.update&&i.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},a.register=function(e,t){n[e]=t},a.get=function(e){return n[e]};var o=a;e.exports=o},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(319),a=i(85),o=i(84),s=i(3),l=i(86),c=l.prepareLayoutBarSeries,u=l.makeColumnLayout,d=l.retrieveColumnLayout,h=i(9);function p(e,t){var i,n,a,o=e.type,l=t.getMin(),h=t.getMax(),p=e.getExtent();"ordinal"===o?i=t.getCategories().length:(n=t.get("boundaryGap"),r.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=s.parsePercent(n[0],1),n[1]=s.parsePercent(n[1],1),a=p[1]-p[0]||Math.abs(p[0])),"dataMin"===l?l=p[0]:"function"==typeof l&&(l=l({min:p[0],max:p[1]})),"dataMax"===h?h=p[1]:"function"==typeof h&&(h=h({min:p[0],max:p[1]}));var f=null!=l,m=null!=h;null==l&&(l="ordinal"===o?i?0:NaN:p[0]-n[0]*a),null==h&&(h="ordinal"===o?i?i-1:NaN:p[1]+n[1]*a),(null==l||!isFinite(l))&&(l=NaN),(null==h||!isFinite(h))&&(h=NaN),e.setBlank(r.eqNaN(l)||r.eqNaN(h)||"ordinal"===o&&!e.getOrdinalMeta().categories.length),t.getNeedCrossZero()&&(l>0&&h>0&&!f&&(l=0),l<0&&h<0&&!m&&(h=0));var g=t.ecModel;if(g&&"time"===o){var y,_=c("bar",g);if(r.each(_,(function(e){y|=e.getBaseAxis()===t.axis})),y){var v=u(_),C=function(e,t,i,n){var a=i.axis.getExtent(),o=a[1]-a[0],s=d(n,i.axis);if(void 0===s)return{min:e,max:t};var l=1/0;r.each(s,(function(e){l=Math.min(e.offset,l)}));var c=-1/0;r.each(s,(function(e){c=Math.max(e.offset+e.width,c)})),l=Math.abs(l),c=Math.abs(c);var u=l+c,h=t-e,p=h/(1-(l+c)/o)-h;return{min:e-=p*(l/u),max:t+=p*(c/u)}}(l,h,t,v);l=C.min,h=C.max}}return{extent:[l,h],fixMin:f,fixMax:m}}function f(e){var t,i=e.getLabelModel().get("formatter"),r="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof i?(t=i,i=function(i){return i=e.scale.getLabel(i),t.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(t,n){return null!=r&&(n=t-r),i(m(e,t),n)}:function(t){return e.scale.getLabel(t)}}function m(e,t){return"category"===e.type?e.scale.getLabel(t):t}function g(e){var t=e.get("interval");return null==t?"auto":t}i(320),i(178),t.getScaleExtent=p,t.niceScaleExtent=function(e,t){var i=p(e,t),r=i.extent,n=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var a=e.type;e.setExtent(r[0],r[1]),e.niceExtent({splitNumber:n,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:"interval"===a||"time"===a?t.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?t.get("maxInterval"):null});var o=t.get("interval");null!=o&&e.setInterval&&e.setInterval(o)},t.createScaleByModel=function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new n(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new a;default:return(o.getClass(t)||a).create(e)}},t.ifAxisCrossZero=function(e){var t=e.scale.getExtent(),i=t[0],r=t[1];return!(i>0&&r>0||i<0&&r<0)},t.makeLabelFormatter=f,t.getAxisRawValue=m,t.estimateLabelUnionRect=function(e){var t=e.model,i=e.scale;if(t.get("axisLabel.show")&&!i.isBlank()){var r,n,a="category"===e.type,o=i.getExtent();n=a?i.count():(r=i.getTicks()).length;var s,l,c,u,d,p,m,g,y,_=e.getLabelModel(),v=f(e),C=1;n>40&&(C=Math.ceil(n/40));for(var x=0;x<n;x+=C){var b=v(r?r[x]:o[0]+x),S=_.getTextRect(b),T=(l=S,c=_.get("rotate")||0,u=void 0,d=void 0,p=void 0,m=void 0,g=void 0,y=void 0,void 0,u=c*Math.PI/180,d=l.plain(),p=d.width,m=d.height,g=p*Math.abs(Math.cos(u))+Math.abs(m*Math.sin(u)),y=p*Math.abs(Math.sin(u))+Math.abs(m*Math.cos(u)),new h(d.x,d.y,g,y));s?s.union(T):s=T}return s}},t.getOptionCategoryInterval=g,t.shouldShowAllLabels=function(e){return"category"===e.type&&0===g(e.getLabelModel())}},function(e,t,i){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var r=i(235),n=i(236),a=i(134);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,i){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,i)}function c(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,i,r):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!l.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|f(t,i),n=(e=s(e,r)).write(t,i);n!==r&&(e=e.slice(0,n));return e}(e,t,i):function(e,t){if(l.isBuffer(t)){var i=0|p(t.length);return 0===(e=s(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&a(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function h(e,t){var i=t.length<0?0:0|p(t.length);e=s(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return G(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,i);case"utf8":case"utf-8":return w(this,t,i);case"ascii":return A(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function y(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:_(e,t,i,r,n);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):_(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function _(e,t,i,r,n){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,i/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=i;a<s;a++)if(c(e,a)===c(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(i+l>s&&(i=s-l),a=i;a>=0;a--){for(var d=!0,h=0;h<l;h++)if(c(e,a+h)!==c(t,h)){d=!1;break}if(d)return a}return-1}function v(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function C(e,t,i,r){return U(z(t,e.length-i),e,i,r)}function x(e,t,i,r){return U(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function b(e,t,i,r){return x(e,t,i,r)}function S(e,t,i,r){return U(G(t),e,i,r)}function T(e,t,i,r){return U(function(e,t){for(var i,r,n,a=[],o=0;o<e.length&&!((t-=2)<0);++o)i=e.charCodeAt(o),r=i>>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function E(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function w(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var a,o,s,l,c=e[n],u=null,d=c>239?4:c>223?3:c>191?2:1;if(n+d<=i)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],o=e[n+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return i}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,i){return c(null,e,t,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,i){return function(e,t,i,r){return u(t),t<=0?s(e,t):void 0!==i?"string"==typeof r?s(e,t).fill(i,r):s(e,t).fill(i):s(e,t)}(null,e,t,i)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=l.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var o=e[i];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?w(this,0,e):m.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,i,r,n){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(n>>>=0)-(r>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,n),u=e.slice(t,i),d=0;d<s;++d)if(c[d]!==u[d]){a=c[d],o=u[d];break}return a<o?-1:o<a?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return y(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return y(this,e,t,i,!1)},l.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return v(this,e,t,i);case"utf8":case"utf-8":return C(this,e,t,i);case"ascii":return x(this,e,t,i);case"latin1":case"binary":return b(this,e,t,i);case"base64":return S(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function P(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function D(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",a=t;a<i;++a)n+=k(e[a]);return n}function M(e,t,i){for(var r=e.slice(t,i),n="",a=0;a<r.length;a+=2)n+=String.fromCharCode(r[a]+256*r[a+1]);return n}function I(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,i,r,n,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function O(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-i,2);n<a;++n)e[i+n]=(t&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function L(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-i,4);n<a;++n)e[i+n]=t>>>8*(r?n:3-n)&255}function N(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function F(e,t,i,r,a){return a||N(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function B(e,t,i,r,a){return a||N(e,0,i,8),n.write(e,t,i,r,52,8),i+8}l.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=l.prototype;else{var n=t-e;i=new l(n,void 0);for(var a=0;a<n;++a)i[a]=this[a+e]}return i},l.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||I(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r},l.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||I(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},l.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||I(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||I(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||R(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a<i&&(n*=256);)this[t+a]=e/n&255;return t+i},l.prototype.writeUIntBE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||R(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},l.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);R(this,e,t,i,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a<i&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},l.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);R(this,e,t,i,n-1,-n)}var a=i-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},l.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,i){return F(this,e,t,!0,i)},l.prototype.writeFloatBE=function(e,t,i){return F(this,e,t,!1,i)},l.prototype.writeDoubleLE=function(e,t,i){return B(this,e,t,!0,i)},l.prototype.writeDoubleBE=function(e,t,i){return B(this,e,t,!1,i)},l.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n,a=r-i;if(this===e&&i<t&&t<r)for(n=a-1;n>=0;--n)e[n+t]=this[n+i];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},l.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var o=l.isBuffer(e)?e:z(new l(e,r).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function k(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var i;t=t||1/0;for(var r=e.length,n=null,a=[],o=0;o<r;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function G(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}}).call(this,i(16))},function(e,t){var i,r,n=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(i===setTimeout)return setTimeout(e,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(e){i=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=s(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];c.push(new f(e,t)),1!==c.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,i){i(5).__DEV__;var r=i(0),n="___EC__COMPONENT__CONTAINER___";function a(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var o=0;function s(e,t){var i=r.slice(arguments,2);return this.superClass.prototype[t].apply(e,i)}function l(e,t,i){return this.superClass.prototype[t].apply(e,i)}t.parseClassType=a,t.enableClassExtend=function(e,t){e.$constructor=e,e.extend=function(e){var t=this,i=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return r.extend(i.prototype,e),i.extend=this.extend,i.superCall=s,i.superApply=l,r.inherits(i,this),i.superClass=t,i}},t.enableClassCheck=function(e){var t=["__\0is_clz",o++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},t.enableClassManagement=function(e,t){t=t||{};var i={};if(e.registerClass=function(e,t){if(t)if(function(e){r.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=a(t)).sub){if(t.sub!==n){(function(e){var t=i[e.main];t&&t[n]||((t=i[e.main]={})[n]=!0);return t}(t))[t.sub]=e}}else i[t.main]=e;return e},e.getClass=function(e,t,r){var a=i[e];if(a&&a[n]&&(a=t?a[t]:null),r&&!a)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return a},e.getClassesByMainType=function(e){e=a(e);var t=[],o=i[e.main];return o&&o[n]?r.each(o,(function(e,i){i!==n&&t.push(e)})):t.push(o),t},e.hasClass=function(e){return e=a(e),!!i[e.main]},e.getAllClassMainTypes=function(){var e=[];return r.each(i,(function(t,i){e.push(i)})),e},e.hasSubTypes=function(e){e=a(e);var t=i[e.main];return t&&t[n]},e.parseClassType=a,t.registerWhenExtend){var o=e.extend;o&&(e.extend=function(t){var i=o.call(this,t);return e.registerClass(i,t.type)})}return e},t.setReadOnly=function(e,t){}},function(e,t,i){i(5).__DEV__;var r=i(4),n=r.makeInner,a=r.getDataItemValue,o=i(0),s=o.createHashMap,l=o.each,c=o.map,u=o.isArray,d=o.isString,h=o.isObject,p=o.isTypedArray,f=o.isArrayLike,m=o.extend,g=(o.assert,i(64)),y=i(65),_=y.SOURCE_FORMAT_ORIGINAL,v=y.SOURCE_FORMAT_ARRAY_ROWS,C=y.SOURCE_FORMAT_OBJECT_ROWS,x=y.SOURCE_FORMAT_KEYED_COLUMNS,b=y.SOURCE_FORMAT_UNKNOWN,S=y.SOURCE_FORMAT_TYPED_ARRAY,T=y.SERIES_LAYOUT_BY_ROW,E={Must:1,Might:2,Not:3},w=n();function A(e){if(e){var t=s();return c(e,(function(e,i){if(null==(e=m({},h(e)?e:{name:e})).name)return e;e.name+="",null==e.displayName&&(e.displayName=e.name);var r=t.get(e.name);return r?e.name+="-"+r.count++:t.set(e.name,{count:1}),e}))}}function P(e,t,i,r){if(null==r&&(r=1/0),t===T)for(var n=0;n<i.length&&n<r;n++)e(i[n]?i[n][0]:null,n);else{var a=i[0]||[];for(n=0;n<a.length&&n<r;n++)e(a[n],n)}}function D(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function M(e,t,i,r,n,o){var s,l,c;if(p(e))return E.Not;if(r){var f=r[o];h(f)?(l=f.name,c=f.type):d(f)&&(l=f)}if(null!=c)return"ordinal"===c?E.Must:E.Not;if(t===v)if(i===T){for(var m=e[o],g=0;g<(m||[]).length&&g<5;g++)if(null!=(s=w(m[n+g])))return s}else for(g=0;g<e.length&&g<5;g++){var y=e[n+g];if(y&&null!=(s=w(y[o])))return s}else if(t===C){if(!l)return E.Not;for(g=0;g<e.length&&g<5;g++){if((b=e[g])&&null!=(s=w(b[l])))return s}}else if(t===x){if(!l)return E.Not;if(!(m=e[l])||p(m))return E.Not;for(g=0;g<m.length&&g<5;g++)if(null!=(s=w(m[g])))return s}else if(t===_)for(g=0;g<e.length&&g<5;g++){var b=e[g],S=a(b);if(!u(S))return E.Not;if(null!=(s=w(S[o])))return s}function w(e){var t=d(e);return null!=e&&isFinite(e)&&""!==e?t?E.Might:E.Not:t&&"-"!==e?E.Must:void 0}return E.Not}t.BE_ORDINAL=E,t.detectSourceFormat=function(e){var t=e.option.source,i=b;if(p(t))i=S;else if(u(t)){0===t.length&&(i=v);for(var r=0,n=t.length;r<n;r++){var a=t[r];if(null!=a){if(u(a)){i=v;break}if(h(a)){i=C;break}}}}else if(h(t)){for(var o in t)if(t.hasOwnProperty(o)&&f(t[o])){i=x;break}}else if(null!=t)throw new Error("Invalid data");w(e).sourceFormat=i},t.getSource=function(e){return w(e).source},t.resetSourceDefaulter=function(e){w(e).datasetMap=s()},t.prepareSource=function(e){var t=e.option,i=t.data,r=p(i)?S:_,n=!1,o=t.seriesLayoutBy,s=t.sourceHeader,c=t.dimensions,h=D(e);if(h){var f=h.option;i=f.source,r=w(h).sourceFormat,n=!0,o=o||f.seriesLayoutBy,null==s&&(s=f.sourceHeader),c=c||f.dimensions}var m=function(e,t,i,r,n){if(!e)return{dimensionsDefine:A(n)};var o,s;if(t===v)"auto"===r||null==r?P((function(e){null!=e&&"-"!==e&&(d(e)?null==s&&(s=1):s=0)}),i,e,10):s=r?1:0,n||1!==s||(n=[],P((function(e,t){n[t]=null!=e?e:""}),i,e)),o=n?n.length:i===T?e.length:e[0]?e[0].length:null;else if(t===C)n||(n=function(e){var t,i=0;for(;i<e.length&&!(t=e[i++]););if(t){var r=[];return l(t,(function(e,t){r.push(t)})),r}}(e));else if(t===x)n||(n=[],l(e,(function(e,t){n.push(t)})));else if(t===_){var c=a(e[0]);o=u(c)&&c.length||1}return{startIndex:s,dimensionsDefine:A(n),dimensionsDetectCount:o}}(i,r,o,s,c);w(e).source=new g({data:i,fromDataset:n,seriesLayoutBy:o,sourceFormat:r,dimensionsDefine:m.dimensionsDefine,startIndex:m.startIndex,dimensionsDetectCount:m.dimensionsDetectCount,encodeDefine:t.encode})},t.makeSeriesEncodeForAxisCoordSys=function(e,t,i){var r={},n=D(t);if(!n||!e)return r;var a,o,s=[],c=[],u=t.ecModel,d=w(u).datasetMap,p=n.uid+"_"+i.seriesLayoutBy;e=e.slice(),l(e,(function(t,i){!h(t)&&(e[i]={name:t}),"ordinal"===t.type&&null==a&&(a=i,o=g(e[i])),r[t.name]=[]}));var f=d.get(p)||d.set(p,{categoryWayDim:o,valueWayDim:0});function m(e,t,i){for(var r=0;r<i;r++)e.push(t+r)}function g(e){var t=e.dimsDef;return t?t.length:1}return l(e,(function(e,t){var i=e.name,n=g(e);if(null==a){var o=f.valueWayDim;m(r[i],o,n),m(c,o,n),f.valueWayDim+=n}else if(a===t)m(r[i],0,n),m(s,0,n);else{o=f.categoryWayDim;m(r[i],o,n),m(c,o,n),f.categoryWayDim+=n}})),s.length&&(r.itemName=s),c.length&&(r.seriesName=c),r},t.makeSeriesEncodeForNameBased=function(e,t,i){var r={};if(!D(e))return r;var n,a=t.sourceFormat,o=t.dimensionsDefine;a!==C&&a!==x||l(o,(function(e,t){"name"===(h(e)?e.name:e)&&(n=t)}));var s=function(){for(var e={},r={},s=[],l=0,c=Math.min(5,i);l<c;l++){var u=M(t.data,a,t.seriesLayoutBy,o,t.startIndex,l);s.push(u);var d=u===E.Not;if(d&&null==e.v&&l!==n&&(e.v=l),(null==e.n||e.n===e.v||!d&&s[e.n]===E.Not)&&(e.n=l),h(e)&&s[e.n]!==E.Not)return e;d||(u===E.Might&&null==r.v&&l!==n&&(r.v=l),null!=r.n&&r.n!==r.v||(r.n=l))}function h(e){return null!=e.v&&null!=e.n}return h(e)?e:h(r)?r:null}();if(s){r.value=s.v;var c=null!=n?n:s.n;r.itemName=[c],r.seriesName=[c]}return r},t.guessOrdinal=function(e,t){return M(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},function(e,t,i){var r=i(0),n=i(18),a=i(52),o=i(65).SOURCE_FORMAT_ORIGINAL,s=i(66).getDimensionTypeByAxis,l=i(4).getDataItemValue,c=i(20),u=i(317).getCoordSysInfoBySeries,d=i(64),h=i(25).enableDataStack,p=i(29).makeSeriesEncodeForAxisCoordSys;var f=function(e,t,i){i=i||{},d.isInstance(e)||(e=d.seriesDataToSource(e));var f,m=t.get("coordinateSystem"),g=c.get(m),y=u(t);y&&(f=r.map(y.coordSysDims,(function(e){var t={name:e},i=y.axisMap.get(e);if(i){var r=i.get("type");t.type=s(r)}return t}))),f||(f=g&&(g.getDimensionsInfo?g.getDimensionsInfo():g.dimensions.slice())||["x","y"]);var _,v,C=a(e,{coordDimensions:f,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?r.curry(p,f,t):null});y&&r.each(C,(function(e,t){var i=e.coordDim,r=y.categoryAxisMap.get(i);r&&(null==_&&(_=t),e.ordinalMeta=r.getOrdinalMeta()),null!=e.otherDims.itemName&&(v=!0)})),v||null==_||(C[_].otherDims.itemName=0);var x=h(t,C),b=new n(C,t);b.setCalculationInfo(x);var S=null!=_&&function(e){if(e.sourceFormat===o){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!r.isArray(l(t))}}(e)?function(e,t,i,r){return r===_?i:this.defaultDimValueGetter(e,t,i,r)}:null;return b.hasItemOption=!1,b.initData(e,null,S),b};e.exports=f},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},function(e,t,i){var r=i(8),n=r.create,a=r.distSquare,o=Math.pow,s=Math.sqrt,l=s(3),c=n(),u=n(),d=n();function h(e){return e>-1e-8&&e<1e-8}function p(e){return e>1e-8||e<-1e-8}function f(e,t,i,r,n){var a=1-n;return a*a*(a*e+3*n*t)+n*n*(n*r+3*a*i)}function m(e,t,i,r){var n=1-r;return n*(n*e+2*r*t)+r*r*i}t.cubicAt=f,t.cubicDerivativeAt=function(e,t,i,r,n){var a=1-n;return 3*(((t-e)*a+2*(i-t)*n)*a+(r-i)*n*n)},t.cubicRootAt=function(e,t,i,r,n,a){var c=r+3*(t-i)-e,u=3*(i-2*t+e),d=3*(t-e),p=e-n,f=u*u-3*c*d,m=u*d-9*c*p,g=d*d-3*u*p,y=0;if(h(f)&&h(m)){if(h(u))a[0]=0;else(P=-d/u)>=0&&P<=1&&(a[y++]=P)}else{var _=m*m-4*f*g;if(h(_)){var v=m/f,C=-v/2;(P=-u/c+v)>=0&&P<=1&&(a[y++]=P),C>=0&&C<=1&&(a[y++]=C)}else if(_>0){var x=s(_),b=f*u+1.5*c*(-m+x),S=f*u+1.5*c*(-m-x);(P=(-u-((b=b<0?-o(-b,1/3):o(b,1/3))+(S=S<0?-o(-S,1/3):o(S,1/3))))/(3*c))>=0&&P<=1&&(a[y++]=P)}else{var T=(2*f*u-3*c*m)/(2*s(f*f*f)),E=Math.acos(T)/3,w=s(f),A=Math.cos(E),P=(-u-2*w*A)/(3*c),D=(C=(-u+w*(A+l*Math.sin(E)))/(3*c),(-u+w*(A-l*Math.sin(E)))/(3*c));P>=0&&P<=1&&(a[y++]=P),C>=0&&C<=1&&(a[y++]=C),D>=0&&D<=1&&(a[y++]=D)}}return y},t.cubicExtrema=function(e,t,i,r,n){var a=6*i-12*t+6*e,o=9*t+3*r-3*e-9*i,l=3*t-3*e,c=0;if(h(o)){if(p(a))(d=-l/a)>=0&&d<=1&&(n[c++]=d)}else{var u=a*a-4*o*l;if(h(u))n[0]=-a/(2*o);else if(u>0){var d,f=s(u),m=(-a-f)/(2*o);(d=(-a+f)/(2*o))>=0&&d<=1&&(n[c++]=d),m>=0&&m<=1&&(n[c++]=m)}}return c},t.cubicSubdivide=function(e,t,i,r,n,a){var o=(t-e)*n+e,s=(i-t)*n+t,l=(r-i)*n+i,c=(s-o)*n+o,u=(l-s)*n+s,d=(u-c)*n+c;a[0]=e,a[1]=o,a[2]=c,a[3]=d,a[4]=d,a[5]=u,a[6]=l,a[7]=r},t.cubicProjectPoint=function(e,t,i,r,n,o,l,h,p,m,g){var y,_,v,C,x,b=.005,S=1/0;c[0]=p,c[1]=m;for(var T=0;T<1;T+=.05)u[0]=f(e,i,n,l,T),u[1]=f(t,r,o,h,T),(C=a(c,u))<S&&(y=T,S=C);S=1/0;for(var E=0;E<32&&!(b<1e-4);E++)_=y-b,v=y+b,u[0]=f(e,i,n,l,_),u[1]=f(t,r,o,h,_),C=a(u,c),_>=0&&C<S?(y=_,S=C):(d[0]=f(e,i,n,l,v),d[1]=f(t,r,o,h,v),x=a(d,c),v<=1&&x<S?(y=v,S=x):b*=.5);return g&&(g[0]=f(e,i,n,l,y),g[1]=f(t,r,o,h,y)),s(S)},t.quadraticAt=m,t.quadraticDerivativeAt=function(e,t,i,r){return 2*((1-r)*(t-e)+r*(i-t))},t.quadraticRootAt=function(e,t,i,r,n){var a=e-2*t+i,o=2*(t-e),l=e-r,c=0;if(h(a)){if(p(o))(d=-l/o)>=0&&d<=1&&(n[c++]=d)}else{var u=o*o-4*a*l;if(h(u))(d=-o/(2*a))>=0&&d<=1&&(n[c++]=d);else if(u>0){var d,f=s(u),m=(-o-f)/(2*a);(d=(-o+f)/(2*a))>=0&&d<=1&&(n[c++]=d),m>=0&&m<=1&&(n[c++]=m)}}return c},t.quadraticExtremum=function(e,t,i){var r=e+i-2*t;return 0===r?.5:(e-t)/r},t.quadraticSubdivide=function(e,t,i,r,n){var a=(t-e)*r+e,o=(i-t)*r+t,s=(o-a)*r+a;n[0]=e,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=i},t.quadraticProjectPoint=function(e,t,i,r,n,o,l,h,p){var f,g=.005,y=1/0;c[0]=l,c[1]=h;for(var _=0;_<1;_+=.05){u[0]=m(e,i,n,_),u[1]=m(t,r,o,_),(b=a(c,u))<y&&(f=_,y=b)}y=1/0;for(var v=0;v<32&&!(g<1e-4);v++){var C=f-g,x=f+g;u[0]=m(e,i,n,C),u[1]=m(t,r,o,C);var b=a(u,c);if(C>=0&&b<y)f=C,y=b;else{d[0]=m(e,i,n,x),d[1]=m(t,r,o,x);var S=a(d,c);x<=1&&S<y?(f=x,y=S):g*=.5}}return p&&(p[0]=m(e,i,n,f),p[1]=m(t,r,o,f)),s(y)}},function(e,t){var i="\0__throttleOriginMethod",r="\0__throttleRate";function n(e,t,i){var r,n,a,o,s,l=0,c=0,u=null;function d(){c=(new Date).getTime(),u=null,e.apply(a,o||[])}t=t||0;var h=function(){r=(new Date).getTime(),a=this,o=arguments;var e=s||t,h=s||i;s=null,n=r-(h?l:c)-e,clearTimeout(u),h?u=setTimeout(d,e):n>=0?d():u=setTimeout(d,-n),l=r};return h.clear=function(){u&&(clearTimeout(u),u=null)},h.debounceNextCall=function(e){s=e},h}t.throttle=n,t.createOrUpdate=function(e,t,a,o){var s=e[t];if(s){var l=s[i]||s,c=s["\0__throttleType"];if(s[r]!==a||c!==o){if(null==a||!o)return e[t]=l;(s=e[t]=n(l,a,"debounce"===o))[i]=l,s["\0__throttleType"]=o,s[r]=a}return s}},t.clear=function(e,t){var r=e[t];r&&r[i]&&(e[t]=r[i])}},function(e,t){e.exports={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}}},function(e,t,i){var r=i(0),n=r.each,a=r.map,o=i(3),s=o.linearMap,l=o.getPixelPrecision,c=o.round,u=i(320),d=u.createAxisTicks,h=u.createAxisLabels,p=u.calculateCategoryInterval,f=[0,1],m=function(e,t,i){this.dim=e,this.scale=t,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function g(e,t){var i=(e[1]-e[0])/t/2;e[0]+=i,e[1]-=i}m.prototype={constructor:m,contain:function(e){var t=this._extent,i=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=i&&e<=r},containData:function(e){return this.scale.contain(e)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(e){return l(e||this.scale.getExtent(),this._extent)},setExtent:function(e,t){var i=this._extent;i[0]=e,i[1]=t},dataToCoord:function(e,t){var i=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&g(i=i.slice(),r.count()),s(e,f,i,t)},coordToData:function(e,t){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&g(i=i.slice(),r.count());var n=s(e,i,f,t);return this.scale.scale(n)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),i=d(this,t).ticks,r=a(i,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,i,r){var a=t.length;if(!e.onBand||i||!a)return;var o,s,l=e.getExtent();if(1===a)t[0].coord=l[0],o=t[1]={coord:l[0]};else{var u=t[a-1].tickValue-t[0].tickValue,d=(t[a-1].coord-t[0].coord)/u;n(t,(function(e){e.coord-=d/2}));var h=e.scale.getExtent();s=1+h[1]-t[a-1].tickValue,o={coord:t[a-1].coord+d*s},t.push(o)}var p=l[0]>l[1];f(t[0].coord,l[0])&&(r?t[0].coord=l[0]:t.shift());r&&f(l[0],t[0].coord)&&t.unshift({coord:l[0]});f(l[1],o.coord)&&(r?o.coord=l[1]:t.pop());r&&f(o.coord,l[1])&&t.push({coord:l[1]});function f(e,t){return e=c(e),t=c(t),p?e>t:e<t}}(this,r,t.get("alignWithLabel"),e.clamp),r},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");e>0&&e<100||(e=5);var t=this.scale.getMinorTicks(e);return a(t,(function(e){return a(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return h(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);0===i&&(i=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return p(this)}};var y=m;e.exports=y},function(e,t,i){var r=i(0),n=r.retrieve,a=r.defaults,o=r.extend,s=r.each,l=i(7),c=i(2),u=i(12),d=i(3),h=d.isRadianAroundZero,p=d.remRadian,f=i(19).createSymbol,m=i(15),g=i(8).applyTransform,y=i(21).shouldShowAllLabels,_=Math.PI,v=function(e,t){this.opt=t,this.axisModel=e,a(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new c.Group;var i=new c.Group({position:t.position.slice(),rotation:t.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};v.prototype={constructor:v,hasBuilder:function(e){return!!C[e]},add:function(e){C[e].call(this)},getGroup:function(){return this.group}};var C={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),r=this._transform,n=[i[0],0],a=[i[1],0];r&&(g(n,n,r),g(a,a,r));var l=o({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new c.Line({anid:"line",subPixelOptimize:!0,shape:{x1:n[0],y1:n[1],x2:a[0],y2:a[1]},style:l,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1}));var u=t.get("axisLine.symbol"),d=t.get("axisLine.symbolSize"),h=t.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=u){"string"==typeof u&&(u=[u,u]),"string"!=typeof d&&"number"!=typeof d||(d=[d,d]);var p=d[0],m=d[1];s([{rotate:e.rotation+Math.PI/2,offset:h[0],r:0},{rotate:e.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((n[0]-a[0])*(n[0]-a[0])+(n[1]-a[1])*(n[1]-a[1]))}],(function(t,i){if("none"!==u[i]&&null!=u[i]){var r=f(u[i],-p/2,-m/2,p,m,l.stroke,!0),a=t.r+t.offset,o=[n[0]+a*Math.cos(e.rotation),n[1]-a*Math.sin(e.rotation)];r.attr({rotation:t.rotate,position:o,silent:!0,z2:11}),this.group.add(r)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,i=function(e,t,i){var r=t.axis,n=t.getModel("axisTick");if(!n.get("show")||r.scale.isBlank())return;for(var o=n.getModel("lineStyle"),s=i.tickDirection*n.get("length"),l=A(r.getTicksCoords(),e._transform,s,a(o.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}),"ticks"),c=0;c<l.length;c++)e.group.add(l[c]);return l}(this,e,t),r=function(e,t,i){var r=t.axis;if(!n(i.axisLabelShow,t.get("axisLabel.show"))||r.scale.isBlank())return;var a=t.getModel("axisLabel"),o=a.get("margin"),l=r.getViewLabels(),d=(n(i.labelRotate,a.get("rotate"))||0)*_/180,h=b(i.rotation,d,i.labelDirection),p=t.getCategories&&t.getCategories(!0),f=[],m=S(t),g=t.get("triggerEvent");return s(l,(function(n,s){var l=n.tickValue,d=n.formattedLabel,y=n.rawLabel,_=a;p&&p[l]&&p[l].textStyle&&(_=new u(p[l].textStyle,a,t.ecModel));var v=_.getTextColor()||t.get("axisLine.lineStyle.color"),C=[r.dataToCoord(l),i.labelOffset+i.labelDirection*o],b=new c.Text({anid:"label_"+l,position:C,rotation:h.rotation,silent:m,z2:10});c.setTextStyle(b.style,_,{text:d,textAlign:_.getShallow("align",!0)||h.textAlign,textVerticalAlign:_.getShallow("verticalAlign",!0)||_.getShallow("baseline",!0)||h.textVerticalAlign,textFill:"function"==typeof v?v("category"===r.type?y:"value"===r.type?l+"":l,s):v}),g&&(b.eventData=x(t),b.eventData.targetType="axisLabel",b.eventData.value=y),e._dumbGroup.add(b),b.updateTransform(),f.push(b),e.group.add(b),b.decomposeTransform()})),f}(this,e,t);!function(e,t,i){if(y(e.axis))return;var r=e.get("axisLabel.showMinLabel"),n=e.get("axisLabel.showMaxLabel");i=i||[];var a=(t=t||[])[0],o=t[1],s=t[t.length-1],l=t[t.length-2],c=i[0],u=i[1],d=i[i.length-1],h=i[i.length-2];!1===r?(T(a),T(c)):E(a,o)&&(r?(T(o),T(u)):(T(a),T(c)));!1===n?(T(s),T(d)):E(l,s)&&(n?(T(l),T(h)):(T(s),T(d)))}(e,r,i),function(e,t,i){var r=t.axis,n=t.getModel("minorTick");if(!n.get("show")||r.scale.isBlank())return;var o=r.getMinorTicksCoords();if(!o.length)return;for(var s=n.getModel("lineStyle"),l=i.tickDirection*n.get("length"),c=a(s.getLineStyle(),a(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<o.length;u++)for(var d=A(o[u],e._transform,l,c,"minorticks_"+u),h=0;h<d.length;h++)e.group.add(d[h])}(this,e,t)},axisName:function(){var e=this.opt,t=this.axisModel,i=n(e.axisName,t.get("name"));if(i){var r,a,s=t.get("nameLocation"),u=e.nameDirection,d=t.getModel("nameTextStyle"),f=t.get("nameGap")||0,m=this.axisModel.axis.getExtent(),g=m[0]>m[1]?-1:1,y=["start"===s?m[0]-g*f:"end"===s?m[1]+g*f:(m[0]+m[1])/2,w(s)?e.labelOffset+u*f:0],v=t.get("nameRotate");null!=v&&(v=v*_/180),w(s)?r=b(e.rotation,null!=v?v:e.rotation,u):(r=function(e,t,i,r){var n,a,o=p(i-e.rotation),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;h(o-_/2)?(a=l?"bottom":"top",n="center"):h(o-1.5*_)?(a=l?"top":"bottom",n="center"):(a="middle",n=o<1.5*_&&o>_/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:n,textVerticalAlign:a}}(e,s,v||0,m),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(r.rotation)),!isFinite(a)&&(a=null)));var C=d.getFont(),T=t.get("nameTruncate",!0)||{},E=T.ellipsis,A=n(e.nameTruncateMaxWidth,T.maxWidth,a),P=null!=E&&null!=A?l.truncateText(i,A,C,E,{minChar:2,placeholder:T.placeholder}):i,D=t.get("tooltip",!0),M=t.mainType,I={componentType:M,name:i,$vars:["name"]};I[M+"Index"]=t.componentIndex;var R=new c.Text({anid:"name",__fullText:i,__truncatedText:P,position:y,rotation:r.rotation,silent:S(t),z2:1,tooltip:D&&D.show?o({content:i,formatter:function(){return i},formatterParams:I},D):null});c.setTextStyle(R.style,d,{text:P,textFont:C,textFill:d.getTextColor()||t.get("axisLine.lineStyle.color"),textAlign:d.get("align")||r.textAlign,textVerticalAlign:d.get("verticalAlign")||r.textVerticalAlign}),t.get("triggerEvent")&&(R.eventData=x(t),R.eventData.targetType="axisName",R.eventData.name=i),this._dumbGroup.add(R),R.updateTransform(),this.group.add(R),R.decomposeTransform()}}},x=v.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},b=v.innerTextLayout=function(e,t,i){var r,n,a=p(t-e);return h(a)?(n=i>0?"top":"bottom",r="center"):h(a-_)?(n=i>0?"bottom":"top",r="center"):(n="middle",r=a>0&&a<_?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:r,textVerticalAlign:n}};var S=v.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function T(e){e&&(e.ignore=!0)}function E(e,t,i){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(r&&n){var a=m.identity([]);return m.rotate(a,a,-e.rotation),r.applyTransform(m.mul([],a,e.getLocalTransform())),n.applyTransform(m.mul([],a,t.getLocalTransform())),r.intersect(n)}}function w(e){return"middle"===e||"center"===e}function A(e,t,i,r,n){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=i,t&&(g(o,o,t),g(s,s,t));var d=new c.Line({anid:n+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,silent:!0});a.push(d)}return a}var P=v;e.exports=P},function(e,t){var i={};t.register=function(e,t){i[e]=t},t.get=function(e){return i[e]}},function(e,t,i){"use strict";var r=i(75),n=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};e.exports=d;var a=Object.create(i(59));a.inherits=i(31);var o=i(138),s=i(99);a.inherits(d,o);for(var l=n(s.prototype),c=0;c<l.length;c++){var u=l[c];d.prototype[u]||(d.prototype[u]=s.prototype[u])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t){var i=Array.prototype.slice,r=function(e){this._$handlers={},this._$eventProcessor=e};function n(e,t,i,r,n,a){var o=e._$handlers;if("function"==typeof i&&(n=r,r=i,i=null),!r||!t)return e;i=function(e,t){var i=e._$eventProcessor;return null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),t}(e,i),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===r)return e;var l={h:r,one:a,query:i,ctx:n||e,callAtLast:r.zrEventfulCallAtLast},c=o[t].length-1,u=o[t][c];return u&&u.callAtLast?o[t].splice(c,0,l):o[t].push(l),e}r.prototype={constructor:r,one:function(e,t,i,r){return n(this,e,t,i,r,!0)},on:function(e,t,i,r){return n(this,e,t,i,r,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var i=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(i[e]){for(var r=[],n=0,a=i[e].length;n<a;n++)i[e][n].h!==t&&r.push(i[e][n]);i[e]=r}i[e]&&0===i[e].length&&delete i[e]}else delete i[e];return this},trigger:function(e){var t=this._$handlers[e],r=this._$eventProcessor;if(t){var n=arguments,a=n.length;a>3&&(n=i.call(n,1));for(var o=t.length,s=0;s<o;){var l=t[s];if(r&&r.filter&&null!=l.query&&!r.filter(e,l.query))s++;else{switch(a){case 1:l.h.call(l.ctx);break;case 2:l.h.call(l.ctx,n[1]);break;case 3:l.h.call(l.ctx,n[1],n[2]);break;default:l.h.apply(l.ctx,n)}l.one?(t.splice(s,1),o--):s++}}}return r&&r.afterTrigger&&r.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],r=this._$eventProcessor;if(t){var n=arguments,a=n.length;a>4&&(n=i.call(n,1,n.length-1));for(var o=n[n.length-1],s=t.length,l=0;l<s;){var c=t[l];if(r&&r.filter&&null!=c.query&&!r.filter(e,c.query))l++;else{switch(a){case 1:c.h.call(o);break;case 2:c.h.call(o,n[1]);break;case 3:c.h.call(o,n[1],n[2]);break;default:c.h.apply(o,n)}c.one?(t.splice(l,1),s--):l++}}}return r&&r.afterTrigger&&r.afterTrigger(e),this}};var a=r;e.exports=a},function(e,t,i){var r=i(0),n=i(149),a=i(9),o=function(e){for(var t in e=e||{},n.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};o.prototype={constructor:o,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,i=0;i<t.length;i++)if(t[i].name===e)return t[i]},childCount:function(){return this._children.length},add:function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},addBefore:function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var i=this._children,r=i.indexOf(t);r>=0&&(i.splice(r,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,i=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof o&&e.addChildrenToStorage(t)),i&&i.refresh()},remove:function(e){var t=this.__zr,i=this.__storage,n=this._children,a=r.indexOf(n,e);return a<0||(n.splice(a,1),e.parent=null,i&&(i.delFromStorage(e),e instanceof o&&e.delChildrenFromStorage(i)),t&&t.refresh()),this},removeAll:function(){var e,t,i=this._children,r=this.__storage;for(t=0;t<i.length;t++)e=i[t],r&&(r.delFromStorage(e),e instanceof o&&e.delChildrenFromStorage(r)),e.parent=null;return i.length=0,this},eachChild:function(e,t){for(var i=this._children,r=0;r<i.length;r++){var n=i[r];e.call(t,n,r)}return this},traverse:function(e,t){for(var i=0;i<this._children.length;i++){var r=this._children[i];e.call(t,r),"group"===r.type&&r.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.addToStorage(i),i instanceof o&&i.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.delFromStorage(i),i instanceof o&&i.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,i=new a(0,0,0,0),r=e||this._children,n=[],o=0;o<r.length;o++){var s=r[o];if(!s.ignore&&!s.invisible){var l=s.getBoundingRect(),c=s.getLocalTransform(n);c?(i.copy(l),i.applyTransform(c),(t=t||i.clone()).union(i)):(t=t||l.clone()).union(l)}}return t||i}},r.inherits(o,n);var s=o;e.exports=s},function(e,t,i){var r=i(61),n=i(0),a=i(17),o=i(82),s=i(81).ContextCachedBy,l=function(e){r.call(this,e)};l.prototype={constructor:l,type:"text",brush:function(e,t){var i=this.style;this.__dirty&&o.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var r=i.text;null!=r&&(r+=""),o.needDrawText(r,i)?(this.setTransform(e),o.renderText(this,e,r,i,null,t),this.restoreTransform(e)):e.__attrCachedBy=s.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&o.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var i=a.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(i.x+=e.x||0,i.y+=e.y||0,o.getStroke(e.textStroke,e.textStrokeWidth)){var r=e.textStrokeWidth;i.x-=r/2,i.y-=r/2,i.width+=r,i.height+=r}this._rect=i}return this._rect}},n.inherits(l,r);var c=l;e.exports=c},function(e,t,i){i(5).__DEV__;var r=i(0),n=(r.isTypedArray,r.extend),a=(r.assert,r.each),o=r.isObject,s=i(4),l=s.getDataItemValue,c=s.isDataItemOption,u=i(3).parseDate,d=i(64),h=i(65),p=h.SOURCE_FORMAT_TYPED_ARRAY,f=h.SOURCE_FORMAT_ARRAY_ROWS,m=h.SOURCE_FORMAT_ORIGINAL,g=h.SOURCE_FORMAT_OBJECT_ROWS;function y(e,t){d.isInstance(e)||(e=d.seriesDataToSource(e)),this._source=e;var i=this._data=e.data,r=e.sourceFormat;r===p&&(this._offset=0,this._dimSize=t,this._data=i);var a=v[r===f?r+"_"+e.seriesLayoutBy:r];n(this,a)}var _=y.prototype;_.pure=!1,_.persistent=!0,_.getSource=function(){return this._source};var v={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(e){return this._data[e+this._source.startIndex]},appendData:b},arrayRows_row:{pure:!0,count:function(){var e=this._data[0];return e?Math.max(0,e.length-this._source.startIndex):0},getItem:function(e){e+=this._source.startIndex;for(var t=[],i=this._data,r=0;r<i.length;r++){var n=i[r];t.push(n?n[e]:null)}return t},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:C,getItem:x,appendData:b},keyedColumns:{pure:!0,count:function(){var e=this._source.dimensionsDefine[0].name,t=this._data[e];return t?t.length:0},getItem:function(e){for(var t=[],i=this._source.dimensionsDefine,r=0;r<i.length;r++){var n=this._data[i[r].name];t.push(n?n[e]:null)}return t},appendData:function(e){var t=this._data;a(e,(function(e,i){for(var r=t[i]||(t[i]=[]),n=0;n<(e||[]).length;n++)r.push(e[n])}))}},original:{count:C,getItem:x,appendData:b},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(e,t){e-=this._offset,t=t||[];for(var i=this._dimSize*e,r=0;r<this._dimSize;r++)t[r]=this._data[i+r];return t},appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function C(){return this._data.length}function x(e){return this._data[e]}function b(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var S={arrayRows:T,objectRows:function(e,t,i,r){return null!=i?e[r]:e},keyedColumns:T,original:function(e,t,i,r){var n=l(e);return null!=i&&n instanceof Array?n[i]:n},typedArray:T};function T(e,t,i,r){return null!=i?e[i]:e}var E={arrayRows:w,objectRows:function(e,t,i,r){return A(e[t],this._dimensionInfos[t])},keyedColumns:w,original:function(e,t,i,r){var n=e&&(null==e.value?e:e.value);return!this._rawData.pure&&c(e)&&(this.hasItemOption=!0),A(n instanceof Array?n[r]:n,this._dimensionInfos[t])},typedArray:function(e,t,i,r){return e[r]}};function w(e,t,i,r){return A(e[r],this._dimensionInfos[t])}function A(e,t){var i=t&&t.type;if("ordinal"===i){var r=t&&t.ordinalMeta;return r?r.parseAndCollect(e):e}return"time"===i&&"number"!=typeof e&&null!=e&&"-"!==e&&(e=+u(e)),null==e||""===e?NaN:+e}t.DefaultDataProvider=y,t.defaultDimValueGetters=E,t.retrieveRawValue=function(e,t,i){if(e){var r=e.getRawDataItem(t);if(null!=r){var n,a,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(i);return s&&(n=s.name,a=s.index),S[o](r,t,a,n)}}},t.retrieveRawAttr=function(e,t,i){if(e){var r=e.getProvider().getSource().sourceFormat;if(r===m||r===g){var n=e.getRawDataItem(t);return r!==m||o(n)||(n=null),n?n[i]:void 0}}}},function(e,t){function i(e){return e}function r(e,t,r,n,a){this._old=e,this._new=t,this._oldKeyGetter=r||i,this._newKeyGetter=n||i,this.context=a}function n(e,t,i,r,n){for(var a=0;a<e.length;a++){var o="_ec_"+n[r](e[a],a),s=t[o];null==s?(i.push(o),t[o]=a):(s.length||(t[o]=s=[s]),s.push(a))}}r.prototype={constructor:r,add:function(e){return this._add=e,this},update:function(e){return this._update=e,this},remove:function(e){return this._remove=e,this},execute:function(){var e=this._old,t=this._new,i={},r=[],a=[];for(n(e,{},r,"_oldKeyGetter",this),n(t,i,a,"_newKeyGetter",this),o=0;o<e.length;o++){if(null!=(l=i[s=r[o]]))(u=l.length)?(1===u&&(i[s]=null),l=l.shift()):i[s]=null,this._update&&this._update(l,o);else this._remove&&this._remove(o)}for(var o=0;o<a.length;o++){var s=a[o];if(i.hasOwnProperty(s)){var l;if(null==(l=i[s]))continue;if(l.length)for(var c=0,u=l.length;c<u;c++)this._add&&this._add(l[c]);else this._add&&this._add(l)}}}};var a=r;e.exports=a},function(e,t,i){var r=i(0).isFunction;e.exports=function(e,t,i){return{seriesType:e,performRawSeries:!0,reset:function(e,n,a){var o=e.getData(),s=e.get("symbol"),l=e.get("symbolSize"),c=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),d=r(s),h=r(l),p=r(u),f=d||h||p,m=!d&&s?s:t,g=h?null:l;if(o.setVisual({legendSymbol:i||m,symbol:m,symbolSize:g,symbolKeepAspect:c,symbolRotate:u}),!n.isSeriesFiltered(e))return{dataEach:o.hasItemOption||f?function(t,i){if(f){var r=e.getRawValue(i),n=e.getDataParams(i);d&&t.setItemVisual(i,"symbol",s(r,n)),h&&t.setItemVisual(i,"symbolSize",l(r,n)),p&&t.setItemVisual(i,"symbolRotate",u(r,n))}if(t.hasItemOption){var a=t.getItemModel(i),o=a.getShallow("symbol",!0),c=a.getShallow("symbolSize",!0),m=a.getShallow("symbolRotate",!0),g=a.getShallow("symbolKeepAspect",!0);null!=o&&t.setItemVisual(i,"symbol",o),null!=c&&t.setItemVisual(i,"symbolSize",c),null!=m&&t.setItemVisual(i,"symbolRotate",m),null!=g&&t.setItemVisual(i,"symbolKeepAspect",g)}}:null}}}}},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(90),a=r.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,i,r){this.axisPointerClass&&n.fixValue(e),a.superApply(this,"render",arguments),o(this,e,t,i,r,!0)},updateAxisPointer:function(e,t,i,r,n){o(this,e,t,i,r,!1)},remove:function(e,t){var i=this._axisPointer;i&&i.remove(t),a.superApply(this,"remove",arguments)},dispose:function(e,t){s(this,t),a.superApply(this,"dispose",arguments)}});function o(e,t,i,r,o,l){var c=a.getAxisPointerClass(e.axisPointerClass);if(c){var u=n.getAxisPointerModel(t);u?(e._axisPointer||(e._axisPointer=new c)).render(t,u,r,l):s(e,r)}}function s(e,t,i){var r=e._axisPointer;r&&r.dispose(t,i),e._axisPointer=null}var l=[];a.registerAxisPointerClass=function(e,t){l[e]=t},a.getAxisPointerClass=function(e){return e&&l[e]};var c=a;e.exports=c},function(e,t,i){var r=i(0);function n(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}t.retrieveTargetInfo=function(e,t,i){if(e&&r.indexOf(t,e.type)>=0){var n=i.getData().tree.root,a=e.targetNode;if("string"==typeof a&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var o=e.targetNodeId;if(null!=o&&(a=n.getNodeById(o)))return{node:a}}},t.getPathToRoot=n,t.aboveViewRoot=function(e,t){var i=n(e);return r.indexOf(i,t)>=0},t.wrapTreePathInfo=function(e,t){for(var i=[];e;){var r=e.dataIndex;i.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return i.reverse(),i}},function(e,t,i){var r=i(0),n=i(23),a=i(3).linearMap,o=r.each,s=r.isObject,l=function(e){var t=e.mappingMethod,i=e.type,n=this.option=r.clone(e);this.type=i,this.mappingMethod=t,this._normalizeData=v[t];var a=c[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[t],"piecewise"===t?(u(n),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,r.each(t,(function(t,i){t.originIndex=i,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(n)):"category"===t?n.categories?function(e){var t=e.categories,i=e.visual,n=e.categoryMap={};if(o(t,(function(e,t){n[e]=t})),!r.isArray(i)){var a=[];r.isObject(i)?o(i,(function(e,t){var i=n[t];a[null!=i?i:-1]=e})):a[-1]=i,i=_(e,a)}for(var s=t.length-1;s>=0;s--)null==i[s]&&(delete n[t[s]],t.pop())}(n):u(n,!0):(r.assert("linear"!==t||n.dataExtent),u(n))};l.prototype={constructor:l,mapValueToVisual:function(e){var t=this._normalizeData(e);return this._doMap(t,e)},getNormalizer:function(){return r.bind(this._normalizeData,this)}};var c=l.visualHandlers={color:{applyVisual:p("color"),getColorMapper:function(){var e=this.option;return r.bind("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),f.call(this,e)}:function(t,i,r){var a=!!r;return!i&&(t=this._normalizeData(t)),r=n.fastLerp(t,e.parsedVisual,r),a?r:n.stringify(r,"rgba")},this)},_doMap:{linear:function(e){return n.stringify(n.fastLerp(e,this.option.parsedVisual),"rgba")},category:f,piecewise:function(e,t){var i=y.call(this,t);return null==i&&(i=n.stringify(n.fastLerp(e,this.option.parsedVisual),"rgba")),i},fixed:m}},colorHue:d((function(e,t){return n.modifyHSL(e,t)})),colorSaturation:d((function(e,t){return n.modifyHSL(e,null,t)})),colorLightness:d((function(e,t){return n.modifyHSL(e,null,null,t)})),colorAlpha:d((function(e,t){return n.modifyAlpha(e,t)})),opacity:{applyVisual:p("opacity"),_doMap:g([0,1])},liftZ:{applyVisual:p("liftZ"),_doMap:{linear:m,category:m,piecewise:m,fixed:m}},symbol:{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);if(r.isString(n))i("symbol",n);else if(s(n))for(var a in n)n.hasOwnProperty(a)&&i(a,n[a])},_doMap:{linear:h,category:f,piecewise:function(e,t){var i=y.call(this,t);return null==i&&(i=h.call(this,e)),i},fixed:m}},symbolSize:{applyVisual:p("symbolSize"),_doMap:g([0,1])}};function u(e,t){var i=e.visual,n=[];r.isObject(i)?o(i,(function(e){n.push(e)})):null!=i&&n.push(i);t||1!==n.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(n[1]=n[0]),_(e,n)}function d(e){return{applyVisual:function(t,i,r){t=this.mapValueToVisual(t),r("color",e(i("color"),t))},_doMap:g([0,1])}}function h(e){var t=this.option.visual;return t[Math.round(a(e,[0,1],[0,t.length-1],!0))]||{}}function p(e){return function(t,i,r){r(e,this.mapValueToVisual(t))}}function f(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function m(){return this.option.visual[0]}function g(e){return{linear:function(t){return a(t,e,this.option.visual,!0)},category:f,piecewise:function(t,i){var r=y.call(this,i);return null==r&&(r=a(t,e,this.option.visual,!0)),r},fixed:m}}function y(e){var t=this.option,i=t.pieceList;if(t.hasSpecialVisual){var r=i[l.findPieceIndex(e,i)];if(r&&r.visual)return r.visual[this.type]}}function _(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=r.map(t,(function(e){return n.parse(e)}))),t}var v={linear:function(e){return a(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,i=l.findPieceIndex(e,t,!0);if(null!=i)return a(i,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:r.noop};function C(e,t,i){return e?t<=i:t<i}l.listVisualTypes=function(){var e=[];return r.each(c,(function(t,i){e.push(i)})),e},l.addVisualHandler=function(e,t){c[e]=t},l.isValidType=function(e){return c.hasOwnProperty(e)},l.eachVisual=function(e,t,i){r.isObject(e)?r.each(e,t,i):t.call(i,e)},l.mapVisual=function(e,t,i){var n,a=r.isArray(e)?[]:r.isObject(e)?{}:(n=!0,null);return l.eachVisual(e,(function(e,r){var o=t.call(i,e,r);n?a=o:a[r]=o})),a},l.retrieveVisuals=function(e){var t,i={};return e&&o(c,(function(r,n){e.hasOwnProperty(n)&&(i[n]=e[n],t=!0)})),t?i:null},l.prepareVisualTypes=function(e){if(s(e)){var t=[];o(e,(function(e,i){t.push(i)})),e=t}else{if(!r.isArray(e))return[];e=e.slice()}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},l.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},l.findPieceIndex=function(e,t,i){for(var r,n=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(null!=s){if(s===e||"string"==typeof s&&s===e+"")return a;i&&d(s,a)}}for(a=0,o=t.length;a<o;a++){var l=t[a],c=l.interval,u=l.close;if(c){if(c[0]===-1/0){if(C(u[1],e,c[1]))return a}else if(c[1]===1/0){if(C(u[0],c[0],e))return a}else if(C(u[0],c[0],e)&&C(u[1],e,c[1]))return a;i&&d(c[0],a),i&&d(c[1],a)}}if(i)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,i){var a=Math.abs(t-e);a<n&&(n=a,r=i)}};var x=l;e.exports=x},function(e,t,i){var r=i(61),n=i(9),a=i(0),o=i(102);function s(e){r.call(this,e)}s.prototype={constructor:s,type:"image",brush:function(e,t){var i=this.style,r=i.image;i.bind(e,this,t);var n=this._image=o.createOrUpdateImage(r,this._image,this,this.onload);if(n&&o.isImageReady(n)){var a=i.x||0,s=i.y||0,l=i.width,c=i.height,u=n.width/n.height;if(null==l&&null!=c?l=c*u:null==c&&null!=l?c=l/u:null==l&&null==c&&(l=n.width,c=n.height),this.setTransform(e),i.sWidth&&i.sHeight){var d=i.sx||0,h=i.sy||0;e.drawImage(n,d,h,i.sWidth,i.sHeight,a,s,l,c)}else if(i.sx&&i.sy){var p=l-(d=i.sx),f=c-(h=i.sy);e.drawImage(n,d,h,p,f,a,s,l,c)}else e.drawImage(n,a,s,l,c);null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new n(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},a.inherits(s,r);var l=s;e.exports=l},function(e,t,i){var r=i(0);e.exports=function(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,i,n){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(i&&r.indexOf(i,s)>=0||n&&r.indexOf(n,s)<0)){var l=t.getShallow(s);null!=l&&(a[e[o][0]]=l)}}return a}}},function(e,t,i){var r=i(32),n=i(8),a=i(62),o=i(9),s=i(80).devicePixelRatio,l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},c=[],u=[],d=[],h=[],p=Math.min,f=Math.max,m=Math.cos,g=Math.sin,y=Math.sqrt,_=Math.abs,v="undefined"!=typeof Float32Array,C=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};C.prototype={constructor:C,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(e,t,i){i=i||0,this._ux=_(i/s/e)||0,this._uy=_(i/s/t)||0},getContext:function(){return this._ctx},beginPath:function(e){return this._ctx=e,e&&e.beginPath(),e&&(this.dpr=e.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(e,t){return this.addData(l.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},lineTo:function(e,t){var i=_(e-this._xi)>this._ux||_(t-this._yi)>this._uy||this._len<5;return this.addData(l.L,e,t),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),i&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,i,r,n,a){return this.addData(l.C,e,t,i,r,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,i,r,n,a):this._ctx.bezierCurveTo(e,t,i,r,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(e,t,i,r){return this.addData(l.Q,e,t,i,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,i,r):this._ctx.quadraticCurveTo(e,t,i,r)),this._xi=i,this._yi=r,this},arc:function(e,t,i,r,n,a){return this.addData(l.A,e,t,i,i,r,n-r,0,a?0:1),this._ctx&&this._ctx.arc(e,t,i,r,n,a),this._xi=m(n)*i+e,this._yi=g(n)*i+t,this},arcTo:function(e,t,i,r,n){return this._ctx&&this._ctx.arcTo(e,t,i,r,n),this},rect:function(e,t,i,r){return this._ctx&&this._ctx.rect(e,t,i,r),this.addData(l.R,e,t,i,r),this},closePath:function(){this.addData(l.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,i),e.closePath()),this._xi=t,this._yi=i,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,i=0;i<e.length;i++)t+=e[i];this._dashSum=t}return this},setLineDashOffset:function(e){return this._dashOffset=e,this},len:function(){return this._len},setData:function(e){var t=e.length;this.data&&this.data.length===t||!v||(this.data=new Float32Array(t));for(var i=0;i<t;i++)this.data[i]=e[i];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,i=0,r=this._len,n=0;n<t;n++)i+=e[n].len();v&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i));for(n=0;n<t;n++)for(var a=e[n].data,o=0;o<a.length;o++)this.data[r++]=a[o];this._len=r},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var i=0;i<arguments.length;i++)t[this._len++]=arguments[i];this._prevCmd=e}},_expandData:function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(e,t){var i,r,n=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,c=this._yi,u=e-l,d=t-c,h=y(u*u+d*d),m=l,g=c,_=o.length;for(a<0&&(a=n+a),m-=(a%=n)*(u/=h),g-=a*(d/=h);u>0&&m<=e||u<0&&m>=e||0===u&&(d>0&&g<=t||d<0&&g>=t);)m+=u*(i=o[r=this._dashIdx]),g+=d*i,this._dashIdx=(r+1)%_,u>0&&m<l||u<0&&m>l||d>0&&g<c||d<0&&g>c||s[r%2?"moveTo":"lineTo"](u>=0?p(m,e):f(m,e),d>=0?p(g,t):f(g,t));u=m-e,d=g-t,this._dashOffset=-y(u*u+d*d)},_dashedBezierTo:function(e,t,i,n,a,o){var s,l,c,u,d,h=this._dashSum,p=this._dashOffset,f=this._lineDash,m=this._ctx,g=this._xi,_=this._yi,v=r.cubicAt,C=0,x=this._dashIdx,b=f.length,S=0;for(p<0&&(p=h+p),p%=h,s=0;s<1;s+=.1)l=v(g,e,i,a,s+.1)-v(g,e,i,a,s),c=v(_,t,n,o,s+.1)-v(_,t,n,o,s),C+=y(l*l+c*c);for(;x<b&&!((S+=f[x])>p);x++);for(s=(S-p)/C;s<=1;)u=v(g,e,i,a,s),d=v(_,t,n,o,s),x%2?m.moveTo(u,d):m.lineTo(u,d),s+=f[x]/C,x=(x+1)%b;x%2!=0&&m.lineTo(a,o),l=a-u,c=o-d,this._dashOffset=-y(l*l+c*c)},_dashedQuadraticTo:function(e,t,i,r){var n=i,a=r;i=(i+2*e)/3,r=(r+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,i,r,n,a)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,v&&(this.data=new Float32Array(e)))},getBoundingRect:function(){c[0]=c[1]=d[0]=d[1]=Number.MAX_VALUE,u[0]=u[1]=h[0]=h[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,i=0,r=0,s=0,p=0;p<e.length;){var f=e[p++];switch(1===p&&(r=t=e[p],s=i=e[p+1]),f){case l.M:t=r=e[p++],i=s=e[p++],d[0]=r,d[1]=s,h[0]=r,h[1]=s;break;case l.L:a.fromLine(t,i,e[p],e[p+1],d,h),t=e[p++],i=e[p++];break;case l.C:a.fromCubic(t,i,e[p++],e[p++],e[p++],e[p++],e[p],e[p+1],d,h),t=e[p++],i=e[p++];break;case l.Q:a.fromQuadratic(t,i,e[p++],e[p++],e[p],e[p+1],d,h),t=e[p++],i=e[p++];break;case l.A:var y=e[p++],_=e[p++],v=e[p++],C=e[p++],x=e[p++],b=e[p++]+x;p+=1;var S=1-e[p++];1===p&&(r=m(x)*v+y,s=g(x)*C+_),a.fromArc(y,_,v,C,x,b,S,d,h),t=m(b)*v+y,i=g(b)*C+_;break;case l.R:r=t=e[p++],s=i=e[p++];var T=e[p++],E=e[p++];a.fromLine(r,s,r+T,s+E,d,h);break;case l.Z:t=r,i=s}n.min(c,c,d),n.max(u,u,h)}return 0===p&&(c[0]=c[1]=u[0]=u[1]=0),new o(c[0],c[1],u[0]-c[0],u[1]-c[1])},rebuildPath:function(e){for(var t,i,r,n,a,o,s=this.data,c=this._ux,u=this._uy,d=this._len,h=0;h<d;){var p=s[h++];switch(1===h&&(t=r=s[h],i=n=s[h+1]),p){case l.M:t=r=s[h++],i=n=s[h++],e.moveTo(r,n);break;case l.L:a=s[h++],o=s[h++],(_(a-r)>c||_(o-n)>u||h===d-1)&&(e.lineTo(a,o),r=a,n=o);break;case l.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),r=s[h-2],n=s[h-1];break;case l.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),r=s[h-2],n=s[h-1];break;case l.A:var f=s[h++],y=s[h++],v=s[h++],C=s[h++],x=s[h++],b=s[h++],S=s[h++],T=s[h++],E=v>C?v:C,w=v>C?1:v/C,A=v>C?C/v:1,P=x+b;Math.abs(v-C)>.001?(e.translate(f,y),e.rotate(S),e.scale(w,A),e.arc(0,0,E,x,P,1-T),e.scale(1/w,1/A),e.rotate(-S),e.translate(-f,-y)):e.arc(f,y,E,x,P,1-T),1===h&&(t=m(x)*v+f,i=g(x)*C+y),r=m(P)*v+f,n=g(P)*C+y;break;case l.R:t=r=s[h],i=n=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case l.Z:e.closePath(),r=t,n=i}}}},C.CMD=l;var x=C;e.exports=x},function(e,t,i){var r=i(4).makeInner;e.exports=function(){var e=r();return function(t){var i=e(t),r=t.pipelineContext,n=i.large,a=i.progressiveRender,o=i.large=r&&r.large,s=i.progressiveRender=r&&r.progressiveRender;return!!(n^o||a^s)&&"reset"}}},function(e,t,i){var r=i(175);e.exports=function(e,t){return r((t=t||{}).coordDimensions||[],e,{dimsDef:t.dimensionsDefine||e.dimensionsDefine,encodeDef:t.encodeDefine||e.encodeDefine,dimCount:t.dimensionsCount,encodeDefaulter:t.encodeDefaulter,generateCoord:t.generateCoord,generateCoordCount:t.generateCoordCount})}},function(e,t,i){var r=i(0),n={getMin:function(e){var t=this.option,i=e||null==t.rangeStart?t.min:t.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!r.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(e){var t=this.option,i=e||null==t.rangeEnd?t.max:t.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!r.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var e=this.option;return null==e.rangeStart&&null==e.rangeEnd&&!e.scale},getCoordSysModel:r.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}};e.exports=n},function(e,t,i){var r=i(52),n=i(18),a=i(0),o=a.extend,s=a.isArray;e.exports=function(e,t,i){t=s(t)&&{coordDimensions:t}||o({},t);var a=e.getSource(),l=r(a,t),c=new n(l,e);return c.initData(a,i),c}},function(e,t){function i(e,t){var i=e[t]-e[1-t];return{span:Math.abs(i),sign:i>0?-1:i<0?1:t?-1:1}}function r(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}e.exports=function(e,t,n,a,o,s){e=e||0;var l=n[1]-n[0];if(null!=o&&(o=r(o,[0,l])),null!=s&&(s=Math.max(s,null!=o?o:0)),"all"===a){var c=Math.abs(t[1]-t[0]);c=r(c,[0,l]),o=s=r(c,[o,s]),a=0}t[0]=r(t[0],n),t[1]=r(t[1],n);var u=i(t,a);t[a]+=e;var d=o||0,h=n.slice();u.sign<0?h[0]+=d:h[1]-=d,t[a]=r(t[a],h);var p=i(t,a);return null!=o&&(p.sign!==u.sign||p.span<o)&&(t[1-a]=t[a]+u.sign*o),p=i(t,a),null!=s&&p.span>s&&(t[1-a]=t[a]+p.sign*s),t}},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(11),o=i(4),s=i(125),l=i(508),c=n.each,u=s.eachAxisDim;function d(e){var t={};return c(["start","end","startValue","endValue","throttle"],(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}function h(e,t){var i=e._rangePropMode,r=e.get("rangeMode");c([["start","startValue"],["end","endValue"]],(function(e,n){var a=null!=t[e[0]],o=null!=t[e[1]];a&&!o?i[n]="percent":!a&&o?i[n]="value":r?i[n]=r[n]:a&&(i[n]="percent")}))}var p=r.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(e,t,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var r=d(e);this.settledOption=r,this.mergeDefaultAndTheme(e,i),this.doInit(r)},mergeOption:function(e){var t=d(e);n.merge(this.option,e,!0),n.merge(this.settledOption,t,!0),this.doInit(t)},doInit:function(e){var t=this.option;a.canvasSupported||(t.realtime=!1),this._setDefaultThrottle(e),h(this,e);var i=this.settledOption;c([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=i[e[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var e=this._axisProxies;this.eachTargetAxis((function(t,i,r,n){var a=this.dependentModels[t.axis][i],o=a.__dzAxisProxy||(a.__dzAxisProxy=new l(t.name,i,this,n));e[t.name+"_"+i]=o}),this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();u((function(t){var i=t.axisIndex;e[i]=o.normalizeToArray(e[i])}),this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,t=!1;u((function(i){null!=e[i.axisIndex]&&(t=!0)}),this);var i=e.orient;return null==i&&t?"orient":t?void 0:(null==i&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var e=!0,t=this.get("orient",!0),i=this.option,r=this.dependentModels;if(e){var a="vertical"===t?"y":"x";r[a+"Axis"].length?(i[a+"AxisIndex"]=[0],e=!1):c(r.singleAxis,(function(r){e&&r.get("orient",!0)===t&&(i.singleAxisIndex=[r.componentIndex],e=!1)}))}e&&u((function(t){if(e){var r=[],n=this.dependentModels[t.axis];if(n.length&&!r.length)for(var a=0,o=n.length;a<o;a++)"category"===n[a].get("type")&&r.push(a);i[t.axisIndex]=r,r.length&&(e=!1)}}),this),e&&this.ecModel.eachSeries((function(e){this._isSeriesHasAllAxesTypeOf(e,"value")&&u((function(t){var r=i[t.axisIndex],a=e.get(t.axisIndex),o=e.get(t.axisId);a=e.ecModel.queryComponents({mainType:t.axis,index:a,id:o})[0].componentIndex,n.indexOf(r,a)<0&&r.push(a)}))}),this)},_autoSetOrient:function(){var e;this.eachTargetAxis((function(t){!e&&(e=t.name)}),this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(e,t){var i=!0;return u((function(r){var n=e.get(r.axisIndex),a=this.dependentModels[r.axis][n];a&&a.get("type")===t||(i=!1)}),this),i},_setDefaultThrottle:function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var e;return u((function(t){if(null==e){var i=this.get(t.axisIndex);i.length&&(e=this.dependentModels[t.axis][i[0]])}}),this),e},eachTargetAxis:function(e,t){var i=this.ecModel;u((function(r){c(this.get(r.axisIndex),(function(n){e.call(t,r,n,this,i)}),this)}),this)},getAxisProxy:function(e,t){return this._axisProxies[e+"_"+t]},getAxisModel:function(e,t){var i=this.getAxisProxy(e,t);return i&&i.getAxisModel()},setRawRange:function(e){var t=this.option,i=this.settledOption;c([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=i[r[0]]=e[r[0]],t[r[1]]=i[r[1]]=e[r[1]])}),this),h(this,e)},setCalculatedRange:function(e){var t=this.option;c(["start","startValue","end","endValue"],(function(i){t[i]=e[i]}))},getPercentRange:function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},getValueRange:function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(e){if(e)return e.__dzAxisProxy;var t=this._axisProxies;for(var i in t)if(t.hasOwnProperty(i)&&t[i].hostedBy(this))return t[i];for(var i in t)if(t.hasOwnProperty(i)&&!t[i].hostedBy(this))return t[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});e.exports=p},function(e,t,i){var r=i(84).extend({type:"dataZoom",render:function(e,t,i,r){this.dataZoomModel=e,this.ecModel=t,this.api=i},getTargetCoordInfo:function(){var e=this.dataZoomModel,t=this.ecModel,i={};return e.eachTargetAxis((function(e,r){var n=t.getComponent(e.axis,r);if(n){var a=n.getCoordSysModel();a&&function(e,t,i,r){for(var n,a=0;a<i.length;a++)if(i[a].model===e){n=i[a];break}n||i.push(n={model:e,axisModels:[],coordIndex:r});n.axisModels.push(t)}(a,n,i[a.mainType]||(i[a.mainType]=[]),a.componentIndex)}}),this),i}});e.exports=r},function(e,t,i){(t=e.exports=i(138)).Stream=t,t.Readable=t,t.Writable=i(99),t.Duplex=i(38),t.Transform=i(142),t.PassThrough=i(251)},function(e,t,i){(function(e){function i(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===i(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===i(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===i(e)},t.isError=function(e){return"[object Error]"===i(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,i(26).Buffer)},function(e,t,i){var r=function(){};1===i(80).debugMode&&(r=console.error);var n=r;e.exports=n},function(e,t,i){var r=i(0),n=i(101),a=i(149),o=i(155);function s(e){for(var t in e=e||{},a.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new n(e.style,this),this._rect=null,this.__clipPaths=null}s.prototype={constructor:s,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var i=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?a.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new n(e,this),this.dirty(!1),this},calculateTextPosition:null},r.inherits(s,a),r.mixin(s,o);var l=s;e.exports=l},function(e,t,i){var r=i(8),n=i(32),a=Math.min,o=Math.max,s=Math.sin,l=Math.cos,c=2*Math.PI,u=r.create(),d=r.create(),h=r.create();var p=[],f=[];t.fromPoints=function(e,t,i){if(0!==e.length){var r,n=e[0],s=n[0],l=n[0],c=n[1],u=n[1];for(r=1;r<e.length;r++)n=e[r],s=a(s,n[0]),l=o(l,n[0]),c=a(c,n[1]),u=o(u,n[1]);t[0]=s,t[1]=c,i[0]=l,i[1]=u}},t.fromLine=function(e,t,i,r,n,s){n[0]=a(e,i),n[1]=a(t,r),s[0]=o(e,i),s[1]=o(t,r)},t.fromCubic=function(e,t,i,r,s,l,c,u,d,h){var m,g=n.cubicExtrema,y=n.cubicAt,_=g(e,i,s,c,p);for(d[0]=1/0,d[1]=1/0,h[0]=-1/0,h[1]=-1/0,m=0;m<_;m++){var v=y(e,i,s,c,p[m]);d[0]=a(v,d[0]),h[0]=o(v,h[0])}for(_=g(t,r,l,u,f),m=0;m<_;m++){var C=y(t,r,l,u,f[m]);d[1]=a(C,d[1]),h[1]=o(C,h[1])}d[0]=a(e,d[0]),h[0]=o(e,h[0]),d[0]=a(c,d[0]),h[0]=o(c,h[0]),d[1]=a(t,d[1]),h[1]=o(t,h[1]),d[1]=a(u,d[1]),h[1]=o(u,h[1])},t.fromQuadratic=function(e,t,i,r,s,l,c,u){var d=n.quadraticExtremum,h=n.quadraticAt,p=o(a(d(e,i,s),1),0),f=o(a(d(t,r,l),1),0),m=h(e,i,s,p),g=h(t,r,l,f);c[0]=a(e,s,m),c[1]=a(t,l,g),u[0]=o(e,s,m),u[1]=o(t,l,g)},t.fromArc=function(e,t,i,n,a,o,p,f,m){var g=r.min,y=r.max,_=Math.abs(a-o);if(_%c<1e-4&&_>1e-4)return f[0]=e-i,f[1]=t-n,m[0]=e+i,void(m[1]=t+n);if(u[0]=l(a)*i+e,u[1]=s(a)*n+t,d[0]=l(o)*i+e,d[1]=s(o)*n+t,g(f,u,d),y(m,u,d),(a%=c)<0&&(a+=c),(o%=c)<0&&(o+=c),a>o&&!p?o+=c:a<o&&p&&(a+=c),p){var v=o;o=a,a=v}for(var C=0;C<o;C+=Math.PI/2)C>a&&(h[0]=l(C)*i+e,h[1]=s(C)*n+t,g(f,h,f),y(m,h,m))}},function(e,t,i){var r=i(0),n=i(28).parseClassType,a=0;t.getUID=function(e){return[e||"",a++,Math.random().toFixed(5)].join("_")},t.enableSubTypeDefaulter=function(e){var t={};return e.registerSubTypeDefaulter=function(e,i){e=n(e),t[e.main]=i},e.determineSubType=function(i,r){var a=r.type;if(!a){var o=n(i).main;e.hasSubTypes(i)&&t[o]&&(a=t[o](r))}return a},e},t.enableTopologicalTravel=function(e,t){function i(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,n,a,o){if(e.length){var s=function(e){var n={},a=[];return r.each(e,(function(o){var s=i(n,o),l=function(e,t){var i=[];return r.each(e,(function(e){r.indexOf(t,e)>=0&&i.push(e)})),i}(s.originalDeps=t(o),e);s.entryCount=l.length,0===s.entryCount&&a.push(o),r.each(l,(function(e){r.indexOf(s.predecessor,e)<0&&s.predecessor.push(e);var t=i(n,e);r.indexOf(t.successor,e)<0&&t.successor.push(o)}))})),{graph:n,noEntryList:a}}(n),l=s.graph,c=s.noEntryList,u={};for(r.each(e,(function(e){u[e]=!0}));c.length;){var d=c.pop(),h=l[d],p=!!u[d];p&&(a.call(o,d,h.originalDeps.slice()),delete u[d]),r.each(h.successor,p?m:f)}r.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(e){l[e].entryCount--,0===l[e].entryCount&&c.push(e)}function m(e){u[e]=!0,f(e)}}}},function(e,t,i){var r=i(0),n=r.createHashMap,a=r.isTypedArray,o=i(28).enableClassCheck,s=i(65),l=s.SOURCE_FORMAT_ORIGINAL,c=s.SERIES_LAYOUT_BY_COLUMN,u=s.SOURCE_FORMAT_UNKNOWN,d=s.SOURCE_FORMAT_TYPED_ARRAY,h=s.SOURCE_FORMAT_KEYED_COLUMNS;function p(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===h?{}:[]),this.sourceFormat=e.sourceFormat||u,this.seriesLayoutBy=e.seriesLayoutBy||c,this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&n(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}p.seriesDataToSource=function(e){return new p({data:e,sourceFormat:a(e)?d:l,fromDataset:!1})},o(p);var f=p;e.exports=f},function(e,t){t.SOURCE_FORMAT_ORIGINAL="original",t.SOURCE_FORMAT_ARRAY_ROWS="arrayRows",t.SOURCE_FORMAT_OBJECT_ROWS="objectRows",t.SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",t.SOURCE_FORMAT_UNKNOWN="unknown",t.SOURCE_FORMAT_TYPED_ARRAY="typedArray",t.SERIES_LAYOUT_BY_COLUMN="column",t.SERIES_LAYOUT_BY_ROW="row"},function(e,t,i){var r=i(0),n=r.each,a=r.createHashMap,o=(r.assert,i(5).__DEV__,a(["tooltip","label","itemName","itemId","seriesName"]));function s(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}t.OTHER_DIMENSIONS=o,t.summarizeDimensions=function(e){var t={},i=t.encode={},r=a(),l=[],c=[],u=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};n(e.dimensions,(function(t){var n,a=e.getDimensionInfo(t),d=a.coordDim;if(d){var h=a.coordDimIndex;s(i,d)[h]=t,a.isExtraCoord||(r.set(d,1),"ordinal"!==(n=a.type)&&"time"!==n&&(l[0]=t),s(u.encode,d)[h]=a.index),a.defaultTooltip&&c.push(t)}o.each((function(e,t){var r=s(i,t),n=a.otherDims[t];null!=n&&!1!==n&&(r[n]=a.name)}))}));var d=[],h={};r.each((function(e,t){var r=i[t];h[t]=r[0],d=d.concat(r)})),t.dataDimsOnCoord=d,t.encodeFirstDimNotExtra=h;var p=i.label;p&&p.length&&(l=p.slice());var f=i.tooltip;return f&&f.length?c=f.slice():c.length||(c=l.slice()),i.defaultedLabel=l,i.defaultedTooltip=c,t},t.getDimensionTypeByAxis=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}},function(e,t,i){var r=i(2),n=i(88),a=i(0).isObject;function o(e){this.group=new r.Group,this._symbolCtor=e||n}var s=o.prototype;function l(e,t,i,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(i))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(i,"symbol")}function c(e){return null==e||a(e)||(e={isIgnore:e}),e||{}}function u(e){var t=e.hostModel;return{itemStyle:t.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:t.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label"),cursorStyle:t.get("cursor")}}s.updateData=function(e,t){t=c(t);var i=this.group,n=e.hostModel,a=this._data,o=this._symbolCtor,s=u(e);a||i.removeAll(),e.diff(a).add((function(r){var n=e.getItemLayout(r);if(l(e,n,r,t)){var a=new o(e,r,s);a.attr("position",n),e.setItemGraphicEl(r,a),i.add(a)}})).update((function(c,u){var d=a.getItemGraphicEl(u),h=e.getItemLayout(c);l(e,h,c,t)?(d?(d.updateData(e,c,s),r.updateProps(d,{position:h},n)):(d=new o(e,c)).attr("position",h),i.add(d),e.setItemGraphicEl(c,d)):i.remove(d)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&t.fadeOut((function(){i.remove(t)}))})).execute(),this._data=e},s.isPersistent=function(){return!0},s.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,i){var r=e.getItemLayout(i);t.attr("position",r)}))},s.incrementalPrepareUpdate=function(e){this._seriesScope=u(e),this._data=null,this.group.removeAll()},s.incrementalUpdate=function(e,t,i){function r(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}i=c(i);for(var n=e.start;n<e.end;n++){var a=t.getItemLayout(n);if(l(t,a,n,i)){var o=new this._symbolCtor(t,n,this._seriesScope);o.traverse(r),o.attr("position",a),this.group.add(o),t.setItemGraphicEl(n,o)}}},s.remove=function(e){var t=this.group,i=this._data;i&&e?i.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}))})):t.removeAll()};var d=o;e.exports=d},function(e,t,i){var r=i(2),n=i(3).round;function a(e,t,i){var n=e.getArea(),a=e.getBaseAxis().isHorizontal(),o=n.x,s=n.y,l=n.width,c=n.height,u=i.get("lineStyle.width")||2;o-=u/2,s-=u/2,l+=u,c+=u,o=Math.floor(o),l=Math.round(l);var d=new r.Rect({shape:{x:o,y:s,width:l,height:c}});return t&&(d.shape[a?"width":"height"]=0,r.initProps(d,{shape:{width:l,height:c}},i)),d}function o(e,t,i){var a=e.getArea(),o=new r.Sector({shape:{cx:n(e.cx,1),cy:n(e.cy,1),r0:n(a.r0,1),r:n(a.r,1),startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});return t&&(o.shape.endAngle=a.startAngle,r.initProps(o,{shape:{endAngle:a.endAngle}},i)),o}t.createGridClipPath=a,t.createPolarClipPath=o,t.createClipPath=function(e,t,i){return e?"polar"===e.type?o(e,t,i):"cartesian2d"===e.type?a(e,t,i):null:null}},function(e,t,i){var r=i(0).map,n=i(51),a=i(25).isDimensionStacked;e.exports=function(e){return{seriesType:e,plan:n(),reset:function(e){var t=e.getData(),i=e.coordinateSystem,n=e.pipelineContext.large;if(i){var o=r(i.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),s=o.length,l=t.getCalculationInfo("stackResultDimension");return a(t,o[0])&&(o[0]=l),a(t,o[1])&&(o[1]=l),s&&{progress:function(e,t){for(var r=e.end-e.start,a=n&&new Float32Array(r*s),l=e.start,c=0,u=[],d=[];l<e.end;l++){var h;if(1===s){var p=t.get(o[0],l);h=!isNaN(p)&&i.dataToPoint(p,null,d)}else{p=u[0]=t.get(o[0],l);var f=u[1]=t.get(o[1],l);h=!isNaN(p)&&!isNaN(f)&&i.dataToPoint(u,null,d)}n?(a[c++]=h?h[0]:NaN,a[c++]=h?h[1]:NaN):t.setItemLayout(l,h&&h.slice()||[NaN,NaN])}n&&t.setLayout("symbolPoints",a)}}}}}}},function(e,t,i){var r=i(1),n=i(0),a=i(2);i(111),i(330),r.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new a.Rect({shape:e.coordinateSystem.getRect(),style:n.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),r.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))},function(e,t){var i=function(e,t){this.getAllNames=function(){var e=t();return e.mapArray(e.getName)},this.containName=function(e){return t().indexOfName(e)>=0},this.indexOfName=function(t){return e().indexOfName(t)},this.getItemVisual=function(t,i){return e().getItemVisual(t,i)}};e.exports=i},function(e,t){e.exports=function(e){return{seriesType:e,reset:function(e,t){var i=t.findComponents({mainType:"legend"});if(i&&i.length){var r=e.getData();r.filterSelf((function(e){for(var t=r.getName(e),n=0;n<i.length;n++)if(!i[n].isSelected(t))return!1;return!0}))}}}}},function(e,t,i){var r=i(0),n=i(39),a=i(22),o=i(192);function s(e){this.pointerChecker,this._zr=e,this._opt={};var t=r.bind,i=t(l,this),a=t(c,this),o=t(u,this),s=t(d,this),p=t(h,this);n.call(this),this.setPointerChecker=function(e){this.pointerChecker=e},this.enable=function(t,n){this.disable(),this._opt=r.defaults(r.clone(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",a),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",s),e.on("pinch",p))},this.disable=function(){e.off("mousedown",i),e.off("mousemove",a),e.off("mouseup",o),e.off("mousewheel",s),e.off("pinch",p)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function l(e){if(!(a.isMiddleOrRightButtonOnMouseUpDown(e)||e.target&&e.target.draggable)){var t=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,i)&&(this._x=t,this._y=i,this._dragging=!0)}}function c(e){if(this._dragging&&m("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!o.isTaken(this._zr,"globalPan")){var t=e.offsetX,i=e.offsetY,r=this._x,n=this._y,s=t-r,l=i-n;this._x=t,this._y=i,this._opt.preventDefaultMouseMove&&a.stop(e.event),f(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:r,oldY:n,newX:t,newY:i})}}function u(e){a.isMiddleOrRightButtonOnMouseUpDown(e)||(this._dragging=!1)}function d(e){var t=m("zoomOnMouseWheel",e,this._opt),i=m("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,n=Math.abs(r),a=e.offsetX,o=e.offsetY;if(0!==r&&(t||i)){if(t){var s=n>3?1.4:n>1?1.2:1.1;p(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:a,originY:o})}if(i){var l=Math.abs(r);p(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:o})}}}function h(e){o.isTaken(this._zr,"globalPan")||p(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY})}function p(e,t,i,r,n){e.pointerChecker&&e.pointerChecker(r,n.originX,n.originY)&&(a.stop(r.event),f(e,t,i,r,n))}function f(e,t,i,n,a){a.isAvailableBehavior=r.bind(m,null,i,n),e.trigger(t,a)}function m(e,t,i){var n=i[e];return!e||n&&(!r.isString(n)||t.event[n+"Key"])}r.mixin(s,n);var g=s;e.exports=g},function(e,t,i){var r=i(1),n=i(0),a=i(90),o=i(459);i(460),i(461),i(211),r.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!n.isArray(t)&&(e.axisPointer.link=[t])}})),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=a.collect(e,t)})),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},o)},function(e,t,i){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,i,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,i)}));case 3:return t.nextTick((function(){e.call(null,i,r)}));case 4:return t.nextTick((function(){e.call(null,i,r,n)}));default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,i(27))},function(e,t,i){var r=i(26),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function o(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),a(n,o),o.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,i){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var r in i)n(i,r)&&(e[r]=i[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,r,n){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+r),n);else for(var a=0;a<r;a++)e[n+a]=t[i+a]},flattenChunks:function(e){var t,i,r,n,a,o;for(r=0,t=0,i=e.length;t<i;t++)r+=e[t].length;for(o=new Uint8Array(r),n=0,t=0,i=e.length;t<i;t++)a=e[t],o.set(a,n),n+=a.length;return o}},o={arraySet:function(e,t,i,r,n){for(var a=0;a<r;a++)e[n+a]=t[i+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,a)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(r)},function(e,t,i){var r=i(147),n=i(11),a=i(0),o=i(275),s=i(279),l=i(283),c=i(285),u=i(286),d=!n.canvasSupported,h={canvas:l},p={};var f=function(e,t,i){i=i||{},this.dom=t,this.id=e;var r=this,l=new s,p=i.renderer;if(d){if(!h.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");p="vml"}else p&&h[p]||(p="canvas");var f=new h[p](t,l,i,e);this.storage=l,this.painter=f;var m=n.node||n.worker?null:new u(f.getViewportRoot(),f.root);this.handler=new o(l,f,m,f.root),this.animation=new c({stage:{update:a.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var g=l.delFromStorage,y=l.addToStorage;l.delFromStorage=function(e){g.call(l,e),e&&e.removeSelfFromZr(r)},l.addToStorage=function(e){y.call(l,e),e.addSelfToZr(r)}};f.prototype={constructor:f,getId:function(){return this.id},add:function(e){this.storage.addRoot(e),this._needsRefresh=!0},remove:function(e){this.storage.delRoot(e),this._needsRefresh=!0},configLayer:function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this._needsRefresh=!0},setBackgroundColor:function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var e;this._needsRefresh&&(e=!0,this.refreshImmediately()),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),e&&this.trigger("rendered")},addHover:function(e,t){if(this.painter.addHover){var i=this.painter.addHover(e,t);return this.refreshHover(),i}},removeHover:function(e){this.painter.removeHover&&(this.painter.removeHover(e),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(e,t){return this.painter.pathToImage(e,t)},setCursorStyle:function(e){this.handler.setCursorStyle(e)},findHover:function(e,t){return this.handler.findHover(e,t)},on:function(e,t,i){this.handler.on(e,t,i)},off:function(e,t){this.handler.off(e,t)},trigger:function(e,t){this.handler.trigger(e,t)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete p[e]}},t.version="4.3.2",t.init=function(e,t){var i=new f(r(),e,t);return p[i.id]=i,i},t.dispose=function(e){if(e)e.dispose();else{for(var t in p)p.hasOwnProperty(t)&&p[t].dispose();p={}}return this},t.getInstance=function(e){return p[e]},t.registerPainter=function(e,t){h[e]=t}},function(e,t,i){var r=i(15),n=i(8),a=r.identity;function o(e){return e>5e-5||e<-5e-5}var s=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},l=s.prototype;l.transform=null,l.needLocalTransform=function(){return o(this.rotation)||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)};var c=[];l.updateTransform=function(){var e=this.parent,t=e&&e.transform,i=this.needLocalTransform(),n=this.transform;if(i||t){n=n||r.create(),i?this.getLocalTransform(n):a(n),t&&(i?r.mul(n,e.transform,n):r.copy(n,e.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(c);var s=c[0]<0?-1:1,l=c[1]<0?-1:1,u=((c[0]-s)*o+s)/c[0]||0,d=((c[1]-l)*o+l)/c[1]||0;n[0]*=u,n[1]*=u,n[2]*=d,n[3]*=d}this.invTransform=this.invTransform||r.create(),r.invert(this.invTransform,n)}else n&&a(n)},l.getLocalTransform=function(e){return s.getLocalTransform(this,e)},l.setTransform=function(e){var t=this.transform,i=e.dpr||1;t?e.setTransform(i*t[0],i*t[1],i*t[2],i*t[3],i*t[4],i*t[5]):e.setTransform(i,0,0,i,0,0)},l.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var u=[],d=r.create();l.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=this.position,n=this.scale;o(t-1)&&(t=Math.sqrt(t)),o(i-1)&&(i=Math.sqrt(i)),e[0]<0&&(t=-t),e[3]<0&&(i=-i),r[0]=e[4],r[1]=e[5],n[0]=t,n[1]=i,this.rotation=Math.atan2(-e[1]/i,e[0]/t)}},l.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(r.mul(u,e.invTransform,t),t=u);var i=this.origin;i&&(i[0]||i[1])&&(d[4]=i[0],d[5]=i[1],r.mul(u,t,d),u[4]-=i[0],u[5]-=i[1],t=u),this.setLocalTransform(t)}},l.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},l.transformCoordToLocal=function(e,t){var i=[e,t],r=this.invTransform;return r&&n.applyTransform(i,i,r),i},l.transformCoordToGlobal=function(e,t){var i=[e,t],r=this.transform;return r&&n.applyTransform(i,i,r),i},s.getLocalTransform=function(e,t){a(t=t||[]);var i=e.origin,n=e.scale||[1,1],o=e.rotation||0,s=e.position||[0,0];return i&&(t[4]-=i[0],t[5]-=i[1]),r.scale(t,t,n),o&&r.rotate(t,t,o),i&&(t[4]+=i[0],t[5]+=i[1]),t[4]+=s[0],t[5]+=s[1],t};var h=s;e.exports=h},function(e,t){var i=1;"undefined"!=typeof window&&(i=Math.max(window.devicePixelRatio||1,1));var r=i;t.debugMode=0,t.devicePixelRatio=r},function(e,t){t.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},t.WILL_BE_RESTORED=9},function(e,t,i){var r=i(0),n=r.retrieve2,a=r.retrieve3,o=r.each,s=r.normalizeCssArray,l=r.isString,c=r.isObject,u=i(17),d=i(156),h=i(102),p=i(152),f=i(81),m=f.ContextCachedBy,g=f.WILL_BE_RESTORED,y=u.DEFAULT_FONT,_={left:1,right:1,center:1},v={top:1,bottom:1,middle:1},C=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],x={},b={};function S(e){if(e){e.font=u.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||_[t]?t:"left";var i=e.textVerticalAlign||e.textBaseline;"center"===i&&(i="middle"),e.textVerticalAlign=null==i||v[i]?i:"top",e.textPadding&&(e.textPadding=s(e.textPadding))}}function T(e,t,i,r,n){if(i&&t.textRotation){var a=t.textOrigin;"center"===a?(r=i.width/2+i.x,n=i.height/2+i.y):a&&(r=a[0]+i.x,n=a[1]+i.y),e.translate(r,n),e.rotate(-t.textRotation),e.translate(-r,-n)}}function E(e,t,i,r,o,s,l,c){var u=r.rich[i.styleName]||{};u.text=i.text;var d=i.textVerticalAlign,h=s+o/2;"top"===d?h=s+i.height/2:"bottom"===d&&(h=s+o-i.height/2),!i.isLineHolder&&w(u)&&A(e,t,u,"right"===c?l-i.width:"center"===c?l-i.width/2:l,h-i.height/2,i.width,i.height);var p=i.textPadding;p&&(l=L(l,c,p),h-=i.height/2-p[2]-i.textHeight/2),M(t,"shadowBlur",a(u.textShadowBlur,r.textShadowBlur,0)),M(t,"shadowColor",u.textShadowColor||r.textShadowColor||"transparent"),M(t,"shadowOffsetX",a(u.textShadowOffsetX,r.textShadowOffsetX,0)),M(t,"shadowOffsetY",a(u.textShadowOffsetY,r.textShadowOffsetY,0)),M(t,"textAlign",c),M(t,"textBaseline","middle"),M(t,"font",i.font||y);var f=I(u.textStroke||r.textStroke,g),m=R(u.textFill||r.textFill),g=n(u.textStrokeWidth,r.textStrokeWidth);f&&(M(t,"lineWidth",g),M(t,"strokeStyle",f),t.strokeText(i.text,l,h)),m&&(M(t,"fillStyle",m),t.fillText(i.text,l,h))}function w(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function A(e,t,i,r,n,a,o){var s=i.textBackgroundColor,u=i.textBorderWidth,p=i.textBorderColor,f=l(s);if(M(t,"shadowBlur",i.textBoxShadowBlur||0),M(t,"shadowColor",i.textBoxShadowColor||"transparent"),M(t,"shadowOffsetX",i.textBoxShadowOffsetX||0),M(t,"shadowOffsetY",i.textBoxShadowOffsetY||0),f||u&&p){t.beginPath();var m=i.textBorderRadius;m?d.buildPath(t,{x:r,y:n,width:a,height:o,r:m}):t.rect(r,n,a,o),t.closePath()}if(f)if(M(t,"fillStyle",s),null!=i.fillOpacity){var g=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,t.fill(),t.globalAlpha=g}else t.fill();else if(c(s)){var y=s.image;(y=h.createOrUpdateImage(y,null,e,P,s))&&h.isImageReady(y)&&t.drawImage(y,r,n,a,o)}if(u&&p)if(M(t,"lineWidth",u),M(t,"strokeStyle",p),null!=i.strokeOpacity){g=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,t.stroke(),t.globalAlpha=g}else t.stroke()}function P(e,t){t.image=e}function D(e,t,i,r){var n=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(r){var l=i.textPosition;if(l instanceof Array)n=r.x+O(l[0],r.width),a=r.y+O(l[1],r.height);else{var c=t&&t.calculateTextPosition?t.calculateTextPosition(x,i,r):u.calculateTextPosition(x,i,r);n=c.x,a=c.y,o=o||c.textAlign,s=s||c.textVerticalAlign}var d=i.textOffset;d&&(n+=d[0],a+=d[1])}return(e=e||{}).baseX=n,e.baseY=a,e.textAlign=o,e.textVerticalAlign=s,e}function M(e,t,i){return e[t]=p(e,t,i),e[t]}function I(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function R(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function O(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function L(e,t,i){return"right"===t?e-i[1]:"center"===t?e+i[3]/2-i[1]/2:e+i[3]}t.normalizeTextStyle=function(e){return S(e),o(e.rich,S),e},t.renderText=function(e,t,i,r,n,a){r.rich?function(e,t,i,r,n,a){a!==g&&(t.__attrCachedBy=m.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=u.parseRichText(i,r));!function(e,t,i,r,n){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=r.textPadding,c=D(b,e,r,n),d=c.baseX,h=c.baseY,p=c.textAlign,f=c.textVerticalAlign;T(t,r,n,d,h);var m=u.adjustTextX(d,o,p),g=u.adjustTextY(h,s,f),y=m,_=g;l&&(y+=l[3],_+=l[0]);var v=y+a;w(r)&&A(e,t,r,m,g,o,s);for(var C=0;C<i.lines.length;C++){for(var x,S=i.lines[C],P=S.tokens,M=P.length,I=S.lineHeight,R=S.width,O=0,L=y,N=v,F=M-1;O<M&&(!(x=P[O]).textAlign||"left"===x.textAlign);)E(e,t,x,r,I,_,L,"left"),R-=x.width,L+=x.width,O++;for(;F>=0&&"right"===(x=P[F]).textAlign;)E(e,t,x,r,I,_,N,"right"),R-=x.width,N-=x.width,F--;for(L+=(a-(L-y)-(v-N)-R)/2;O<=F;)x=P[O],E(e,t,x,r,I,_,L+x.width/2,"center"),L+=x.width,O++;_+=I}}(e,t,o,r,n)}(e,t,i,r,n,a):function(e,t,i,r,n,a){"use strict";var o,s=w(r),l=!1,c=t.__attrCachedBy===m.PLAIN_TEXT;a!==g?(a&&(o=a.style,l=!s&&c&&o),t.__attrCachedBy=s?m.NONE:m.PLAIN_TEXT):c&&(t.__attrCachedBy=m.NONE);var d=r.font||y;l&&d===(o.font||y)||(t.font=d);var h=e.__computedFont;e.__styleFont!==d&&(e.__styleFont=d,h=e.__computedFont=t.font);var f=r.textPadding,_=r.textLineHeight,v=e.__textCotentBlock;v&&!e.__dirtyText||(v=e.__textCotentBlock=u.parsePlainText(i,h,f,_,r.truncate));var x=v.outerHeight,S=v.lines,E=v.lineHeight,P=D(b,e,r,n),M=P.baseX,O=P.baseY,N=P.textAlign||"left",F=P.textVerticalAlign;T(t,r,n,M,O);var B=u.adjustTextY(O,x,F),V=M,k=B;if(s||f){var z=u.getWidth(i,h);f&&(z+=f[1]+f[3]);var G=u.adjustTextX(M,z,N);s&&A(e,t,r,G,B,z,x),f&&(V=L(M,N,f),k+=f[0])}t.textAlign=N,t.textBaseline="middle",t.globalAlpha=r.opacity||1;for(var U=0;U<C.length;U++){var $=C[U],H=$[0],W=$[1],j=r[H];l&&j===o[H]||(t[W]=p(t,W,j||$[2]))}k+=E/2;var q=r.textStrokeWidth,Y=l?o.textStrokeWidth:null,X=!l||q!==Y,Q=!l||X||r.textStroke!==o.textStroke,Z=I(r.textStroke,q),J=R(r.textFill);Z&&(X&&(t.lineWidth=q),Q&&(t.strokeStyle=Z));J&&(l&&r.textFill===o.textFill||(t.fillStyle=J));if(1===S.length)Z&&t.strokeText(S[0],V,k),J&&t.fillText(S[0],V,k);else for(U=0;U<S.length;U++)Z&&t.strokeText(S[U],V,k),J&&t.fillText(S[U],V,k),k+=E}(e,t,i,r,n,a)},t.getBoxPosition=D,t.getStroke=I,t.getFill=R,t.parsePercent=O,t.needDrawText=function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)}},function(e,t){var i=function(e){this.colorStops=e||[]};i.prototype={constructor:i,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var r=i;e.exports=r},function(e,t,i){var r=i(40),n=i(63),a=i(28),o=function(){this.group=new r,this.uid=n.getUID("viewComponent")},s=o.prototype={constructor:o,init:function(e,t){},render:function(e,t,i,r){},dispose:function(){},filterForExposedEvent:null};s.updateView=s.updateLayout=s.updateVisual=function(e,t,i,r){},a.enableClassExtend(o),a.enableClassManagement(o,{registerWhenExtend:!0});var l=o;e.exports=l},function(e,t,i){var r=i(28);function n(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}n.prototype.parse=function(e){return e},n.prototype.getSetting=function(e){return this._setting[e]},n.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},n.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},n.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},n.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},n.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},n.prototype.isBlank=function(){return this._isBlank},n.prototype.setBlank=function(e){this._isBlank=e},n.prototype.getLabel=null,r.enableClassExtend(n),r.enableClassManagement(n,{registerWhenExtend:!0});var a=n;e.exports=a},function(e,t,i){var r=i(3),n=i(7),a=i(85),o=i(177),s=r.round,l=a.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(e,t){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(t)||(i[1]=parseFloat(t))},unionExtent:function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),l.prototype.setExtent.call(this,t[0],t[1])},getInterval:function(){return this._interval},setInterval:function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=o.getIntervalPrecision(e)},getTicks:function(e){var t=this._interval,i=this._extent,r=this._niceExtent,n=this._intervalPrecision,a=[];if(!t)return a;i[0]<r[0]&&(e?a.push(s(r[0]-t,n)):a.push(i[0]));for(var o=r[0];o<=r[1]&&(a.push(o),(o=s(o+t,n))!==a[a.length-1]);)if(a.length>1e4)return[];var l=a.length?a[a.length-1]:r[1];return i[1]>l&&(e?a.push(s(l+t,n)):a.push(i[1])),a},getMinorTicks:function(e){for(var t=this.getTicks(!0),i=[],n=this.getExtent(),a=1;a<t.length;a++){for(var o=t[a],s=t[a-1],l=0,c=[],u=(o-s)/e;l<e-1;){var d=r.round(s+(l+1)*u);d>n[0]&&d<n[1]&&c.push(d),l++}i.push(c)}return i},getLabel:function(e,t){if(null==e)return"";var i=t&&t.precision;return null==i?i=r.getPrecisionSafe(e)||0:"auto"===i&&(i=this._intervalPrecision),e=s(e,i,!0),n.addCommas(e)},niceTicks:function(e,t,i){e=e||5;var r=this._extent,n=r[1]-r[0];if(isFinite(n)){n<0&&(n=-n,r.reverse());var a=o.intervalScaleNiceTicks(r,e,t,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var i=t[0];e.fixMax||(t[1]+=i/2),t[0]-=i/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var n=this._interval;e.fixMin||(t[0]=s(Math.floor(t[0]/n)*n)),e.fixMax||(t[1]=s(Math.ceil(t[1]/n)*n))}});l.create=function(){return new l};var c=l;e.exports=c},function(e,t,i){var r=i(0),n=i(3).parsePercent,a=i(25).isDimensionStacked,o=i(51),s="undefined"!=typeof Float32Array?Float32Array:Array;function l(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function c(e){return e.dim+e.index}function u(e,t){var i=[];return t.eachSeriesByType(e,(function(e){m(e)&&!g(e)&&i.push(e)})),i}function d(e){var t=function(e){var t={};r.each(e,(function(e){var i=e.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var r=e.getData(),n=i.dim+"_"+i.index,a=r.mapDimension(i.dim),o=0,s=r.count();o<s;++o){var l=r.get(a,o);t[n]?t[n].push(l):t[n]=[l]}}));var i=[];for(var n in t)if(t.hasOwnProperty(n)){var a=t[n];if(a){a.sort((function(e,t){return e-t}));for(var o=null,s=1;s<a.length;++s){var l=a[s]-a[s-1];l>0&&(o=null===o?l:Math.min(o,l))}i[n]=o}}return i}(e),i=[];return r.each(e,(function(e){var r,a=e.coordinateSystem.getBaseAxis(),o=a.getExtent();if("category"===a.type)r=a.getBandWidth();else if("value"===a.type||"time"===a.type){var s=a.dim+"_"+a.index,u=t[s],d=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),p=Math.abs(h[1]-h[0]);r=u?d/p*u:d}else{var f=e.getData();r=Math.abs(o[1]-o[0])/f.count()}var m=n(e.get("barWidth"),r),g=n(e.get("barMaxWidth"),r),y=n(e.get("barMinWidth")||1,r),_=e.get("barGap"),v=e.get("barCategoryGap");i.push({bandWidth:r,barWidth:m,barMaxWidth:g,barMinWidth:y,barGap:_,barCategoryGap:v,axisKey:c(a),stackId:l(e)})})),h(i)}function h(e){var t={};r.each(e,(function(e,i){var r=e.axisKey,n=e.bandWidth,a=t[r]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;t[r]=a;var s=e.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var c=e.barMaxWidth;c&&(o[s].maxWidth=c);var u=e.barMinWidth;u&&(o[s].minWidth=u);var d=e.barGap;null!=d&&(a.gap=d);var h=e.barCategoryGap;null!=h&&(a.categoryGap=h)}));var i={};return r.each(t,(function(e,t){i[t]={};var a=e.stacks,o=e.bandWidth,s=n(e.categoryGap,o),l=n(e.gap,1),c=e.remainedWidth,u=e.autoWidthCount,d=(c-s)/(u+(u-1)*l);d=Math.max(d,0),r.each(a,(function(e){var t=e.maxWidth,i=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),i&&(r=Math.max(r,i)),e.width=r,c-=r+l*r,u--}else{var r=d;t&&t<r&&(r=Math.min(t,c)),i&&i>r&&(r=i),r!==d&&(e.width=r,c-=r+l*r,u--)}})),d=(c-s)/(u+(u-1)*l),d=Math.max(d,0);var h,p=0;r.each(a,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;r.each(a,(function(e,r){i[t][r]=i[t][r]||{bandWidth:o,offset:f,width:e.width},f+=e.width*(1+l)}))})),i}function p(e,t,i){if(e&&t){var r=e[c(t)];return null!=r&&null!=i&&(r=r[l(i)]),r}}var f={seriesType:"bar",plan:o(),reset:function(e){if(m(e)&&g(e)){var t=e.getData(),i=e.coordinateSystem,r=i.grid.getRect(),n=i.getBaseAxis(),a=i.getOtherAxis(n),o=t.mapDimension(a.dim),l=t.mapDimension(n.dim),c=a.isHorizontal(),u=c?0:1,h=p(d([e]),n,e).width;return h>.5||(h=.5),{progress:function(e,t){var d,p=e.count,f=new s(2*p),m=new s(2*p),g=new s(p),_=[],v=[],C=0,x=0;for(;null!=(d=e.next());)v[u]=t.get(o,d),v[1-u]=t.get(l,d),_=i.dataToPoint(v,null,_),m[C]=c?r.x+r.width:_[0],f[C++]=_[0],m[C]=c?_[1]:r.y+r.height,f[C++]=_[1],g[x++]=d;t.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:m,barWidth:h,valueAxisStart:y(n,a,!1),backgroundStart:c?r.x:r.y,valueAxisHorizontal:c})}}}}};function m(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function g(e){return e.pipelineContext&&e.pipelineContext.large}function y(e,t,i){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}t.getLayoutOnAxis=function(e){var t=[],i=e.axis;if("category"===i.type){for(var n=i.getBandWidth(),a=0;a<e.count;a++)t.push(r.defaults({bandWidth:n,axisKey:"axis0",stackId:"__ec_stack_"+a},e));var o=h(t),s=[];for(a=0;a<e.count;a++){var l=o.axis0["__ec_stack_"+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},t.prepareLayoutBarSeries=u,t.makeColumnLayout=d,t.retrieveColumnLayout=p,t.layout=function(e,t){var i=u(e,t),n=d(i),o={},s={};r.each(i,(function(e){var t=e.getData(),i=e.coordinateSystem,r=i.getBaseAxis(),u=l(e),d=n[c(r)][u],h=d.offset,p=d.width,f=i.getOtherAxis(r),m=e.get("barMinHeight")||0;o[u]=o[u]||[],s[u]=s[u]||[],t.setLayout({bandWidth:d.bandWidth,offset:h,size:p});for(var g=t.mapDimension(f.dim),_=t.mapDimension(r.dim),v=a(t,g),C=f.isHorizontal(),x=y(r,f,v),b=0,S=t.count();b<S;b++){var T,E,w,A,P,D=t.get(g,b),M=t.get(_,b),I=D>=0?"p":"n",R=x;if(v&&(o[u][M]||(o[u][M]={p:x,n:x}),R=o[u][M][I]),C)T=R,E=(P=i.dataToPoint([D,M]))[1]+h,w=P[0]-x,A=p,Math.abs(w)<m&&(w=(w<0?-1:1)*m),isNaN(w)||v&&(o[u][M][I]+=w);else T=(P=i.dataToPoint([M,D]))[0]+h,E=R,w=p,A=P[1]-x,Math.abs(A)<m&&(A=(A<=0?-1:1)*m),isNaN(A)||v&&(o[u][M][I]+=A);t.setItemLayout(b,{x:T,y:E,width:w,height:A})}}),this)},t.largeLayout=f},function(e,t,i){var r=i(0),n=i(19).createSymbol,a=i(2),o=i(3).parsePercent,s=i(110).getDefaultLabel;function l(e,t,i){a.Group.call(this),this.updateData(e,t,i)}var c=l.prototype,u=l.getSymbolSize=function(e,t){var i=e.getItemVisual(t,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function d(e){return[e[0]/2,e[1]/2]}function h(e,t){this.parent.drift(e,t)}c._createSymbol=function(e,t,i,r,a){this.removeAll();var o=t.getItemVisual(i,"color"),s=n(e,-1,-1,2,2,o,a);s.attr({z2:100,culling:!0,scale:d(r)}),s.drift=h,this._symbolType=e,this.add(s)},c.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},c.getSymbolPath=function(){return this.childAt(0)},c.getScale=function(){return this.childAt(0).scale},c.highlight=function(){this.childAt(0).trigger("emphasis")},c.downplay=function(){this.childAt(0).trigger("normal")},c.setZ=function(e,t){var i=this.childAt(0);i.zlevel=e,i.z=t},c.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},c.updateData=function(e,t,i){this.silent=!1;var r=e.getItemVisual(t,"symbol")||"circle",n=e.hostModel,o=u(e,t),s=r!==this._symbolType;if(s){var l=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(r,e,t,o,l)}else{(c=this.childAt(0)).silent=!1,a.updateProps(c,{scale:d(o)},n,t)}if(this._updateCommon(e,t,o,i),s){var c=this.childAt(0),h=i&&i.fadeIn,p={scale:c.scale.slice()};h&&(p.style={opacity:c.style.opacity}),c.scale=[0,0],h&&(c.style.opacity=0),a.initProps(c,p,n,t)}this._seriesModel=n};var p=["itemStyle"],f=["emphasis","itemStyle"],m=["label"],g=["emphasis","label"];function y(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var i=this.__symbolOriginalScale,r=i[1]/i[0],n={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*r)]};this.animateTo(n,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}c._updateCommon=function(e,t,i,n){var l=this.childAt(0),c=e.hostModel,u=e.getItemVisual(t,"color");"image"!==l.type?l.useStyle({strokeNoScale:!0}):l.setStyle({opacity:1,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var h=n&&n.itemStyle,_=n&&n.hoverItemStyle,v=n&&n.symbolOffset,C=n&&n.labelModel,x=n&&n.hoverLabelModel,b=n&&n.hoverAnimation,S=n&&n.cursorStyle;if(!n||e.hasItemOption){var T=n&&n.itemModel?n.itemModel:e.getItemModel(t);h=T.getModel(p).getItemStyle(["color"]),_=T.getModel(f).getItemStyle(),v=T.getShallow("symbolOffset"),C=T.getModel(m),x=T.getModel(g),b=T.getShallow("hoverAnimation"),S=T.getShallow("cursor")}else _=r.extend({},_);var E=l.style,w=e.getItemVisual(t,"symbolRotate");l.attr("rotation",(w||0)*Math.PI/180||0),v&&l.attr("position",[o(v[0],i[0]),o(v[1],i[1])]),S&&l.attr("cursor",S),l.setColor(u,n&&n.symbolInnerColor),l.setStyle(h);var A=e.getItemVisual(t,"opacity");null!=A&&(E.opacity=A);var P=e.getItemVisual(t,"liftZ"),D=l.__z2Origin;null!=P?null==D&&(l.__z2Origin=l.z2,l.z2+=P):null!=D&&(l.z2=D,l.__z2Origin=null);var M=n&&n.useNameLabel;a.setLabelStyle(E,_,C,x,{labelFetcher:c,labelDataIndex:t,defaultText:function(t,i){return M?e.getName(t):s(e,t)},isRectText:!0,autoColor:u}),l.__symbolOriginalScale=d(i),l.hoverStyle=_,l.highDownOnUpdate=b&&c.isAnimationEnabled()?y:null,a.setHoverStyle(l)},c.fadeOut=function(e,t){var i=this.childAt(0);this.silent=i.silent=!0,(!t||!t.keepLabel)&&(i.style.text=null),a.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},r.inherits(l,a.Group);var _=l;e.exports=_},function(e,t,i){var r=i(0),n=i(185),a=i(13),o=i(6),s=o.getLayoutParams,l=o.mergeLayoutParam,c=i(176),u=["value","category","time","log"];e.exports=function(e,t,i,o){r.each(u,(function(a){t.extend({type:e+"Axis."+a,mergeDefaultAndTheme:function(t,n){var o=this.layoutMode,c=o?s(t):{},u=n.getTheme();r.merge(t,u.get(a+"Axis")),r.merge(t,this.getDefaultOption()),t.type=i(e,t),o&&l(t,c,o)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=c.createByAxisModel(this))},getCategories:function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r.mergeAll([{},n[a+"Axis"],o],!0)})})),a.registerSubTypeDefaulter(e+"Axis",r.curry(i,e))}},function(e,t,i){var r=i(0),n=i(12),a=r.each,o=r.curry;function s(e,t){return"all"===e||r.isArray(e)&&r.indexOf(e,t)>=0||e===t}function l(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[u(e)]}function c(e){return!!e.get("handle.show")}function u(e){return e.type+"||"+e.id}t.collect=function(e,t){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,i){var l=t.getComponent("tooltip"),d=t.getComponent("axisPointer"),h=d.get("link",!0)||[],p=[];a(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var f=u(i.model),m=e.coordSysAxesInfo[f]={};e.coordSysMap[f]=i;var g=i.model.getModel("tooltip",l);if(a(i.getAxes(),o(C,!1,null)),i.getTooltipAxes&&l&&g.get("show")){var y="axis"===g.get("trigger"),_="cross"===g.get("axisPointer.type"),v=i.getTooltipAxes(g.get("axisPointer.axis"));(y||_)&&a(v.baseAxes,o(C,!_||"cross",y)),_&&a(v.otherAxes,o(C,"cross",!1))}}function C(o,l,f){var y=f.model.getModel("axisPointer",d),_=y.get("show");if(_&&("auto"!==_||o||c(y))){null==l&&(l=y.get("triggerTooltip"));var v=(y=o?function(e,t,i,o,s,l){var c=t.getModel("axisPointer"),u={};a(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){u[e]=r.clone(c.get(e))})),u.snap="category"!==e.type&&!!l,"cross"===c.get("type")&&(u.type="line");var d=u.label||(u.label={});if(null==d.show&&(d.show=!1),"cross"===s){var h=c.get("label.show");if(d.show=null==h||h,!l){var p=u.lineStyle=c.get("crossStyle");p&&r.defaults(d,p.textStyle)}}return e.model.getModel("axisPointer",new n(u,i,o))}(f,g,d,t,o,l):y).get("snap"),C=u(f.model),x=l||v||"category"===f.type,b=e.axesInfo[C]={key:C,axis:f,coordSys:i,axisPointerModel:y,triggerTooltip:l,involveSeries:x,snap:v,useHandle:c(y),seriesModels:[]};m[C]=b,e.seriesInvolved|=x;var S=function(e,t){for(var i=t.model,r=t.dim,n=0;n<e.length;n++){var a=e[n]||{};if(s(a[r+"AxisId"],i.id)||s(a[r+"AxisIndex"],i.componentIndex)||s(a[r+"AxisName"],i.name))return n}}(h,f);if(null!=S){var T=p[S]||(p[S]={axesInfo:{}});T.axesInfo[C]=b,T.mapper=h[S].mapper,b.linkGroup=T}}}}))}(i,e,t),i.seriesInvolved&&function(e,t){t.eachSeries((function(t){var i=t.coordinateSystem,r=t.get("tooltip.trigger",!0),n=t.get("tooltip.show",!0);i&&"none"!==r&&!1!==r&&"item"!==r&&!1!==n&&!1!==t.get("axisPointer.show",!0)&&a(e.coordSysAxesInfo[u(i.model)],(function(e){var r=e.axis;i.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}),this)}(i,e),i},t.fixValue=function(e){var t=l(e);if(t){var i=t.axisPointerModel,r=t.axis.scale,n=i.option,a=i.get("status"),o=i.get("value");null!=o&&(o=r.parse(o));var s=c(i);null==a&&(n.status=s?"show":"hide");var u=r.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==o||o>u[1])&&(o=u[1]),o<u[0]&&(o=u[0]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}},t.getAxisInfo=l,t.getAxisPointerModel=function(e){var t=l(e);return t&&t.axisPointerModel},t.makeKey=u},function(e,t,i){var r=i(0).createHashMap;e.exports=function(e){return{getTargetSeries:function(t){var i={},n=r();return t.eachSeriesByType(e,(function(e){e.__paletteScope=i,n.set(e.uid,e)})),n},reset:function(e,t){var i=e.getRawData(),r={},n=e.getData();n.each((function(e){var t=n.getRawIndex(e);r[t]=e})),i.each((function(t){var a,o=r[t],s=null!=o&&n.getItemVisual(o,"color",!0),l=null!=o&&n.getItemVisual(o,"borderColor",!0);if(s&&l||(a=i.getItemModel(t)),!s){var c=a.get("itemStyle.color")||e.getColorFromPalette(i.getName(t)||t+"",e.__paletteScope,i.count());null!=o&&n.setItemVisual(o,"color",c)}if(!l){var u=a.get("itemStyle.borderColor");null!=o&&n.setItemVisual(o,"borderColor",u)}}))}}}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.each,a=r.createHashMap,o=i(109),s=i(358),l=i(363),c=i(9),u={geoJSON:s,svg:l},d={load:function(e,t,i){var r,o=[],s=a(),l=a(),d=p(e);return n(d,(function(a){var c=u[a.type].load(e,a,i);n(c.regions,(function(e){var i=e.name;t&&t.hasOwnProperty(i)&&(e=e.cloneShallow(i=t[i])),o.push(e),s.set(i,e),l.set(i,e.center)}));var d=c.boundingRect;d&&(r?r.union(d):r=d.clone())})),{regions:o,regionsMap:s,nameCoordMap:l,boundingRect:r||new c(0,0,0,0)}},makeGraphic:h("makeGraphic"),removeGraphic:h("removeGraphic")};function h(e){return function(t,i){var r=p(t),a=[];return n(r,(function(r){var n=u[r.type][e];n&&a.push(n(t,r,i))})),a}}function p(e){return o.retrieveMap(e)||[]}e.exports=d},function(e,t){var i={axisPointer:1,tooltip:1,brush:1};t.onIrrelevantElement=function(e,t,r){var n=t.getComponentByElement(e.topTarget),a=n&&n.coordinateSystem;return n&&n!==r&&!i[n.mainType]&&a&&a.model!==r}},function(e,t,i){var r=i(0),n=function(e){return e.get("autoCurveness")||null},a=function(e,t){var i=n(e),a=20,o=[];if("number"==typeof i)a=i;else if(r.isArray(i))return void(e.__curvenessList=i);t>a&&(a=t);var s=a%2?a+2:a+3;o=[];for(var l=0;l<s;l++)o.push((l%2?l+1:l)/10*(l%2?-1:1));e.__curvenessList=o},o=function(e,t,i){var r=[e.id,e.dataIndex].join("."),n=[t.id,t.dataIndex].join(".");return[i.uid,r,n].join("--\x3e")},s=function(e){var t=e.split("--\x3e");return[t[0],t[2],t[1]].join("--\x3e")},l=function(e,t){var i=t.__edgeMap;return i[e]?i[e].length:0};t.initCurvenessList=function(e){n(e)&&(e.__curvenessList=[],e.__edgeMap={},a(e))},t.createEdgeMapForCurveness=function(e,t,i,r){if(n(i)){var a=o(e,t,i),l=i.__edgeMap,c=l[s(a)];l[a]&&!c?l[a].isForward=!0:c&&l[a]&&(c.isForward=!0,l[a].isForward=!1),l[a]=l[a]||[],l[a].push(r)}},t.getCurvenessForEdge=function(e,t,i,c){var u=n(t),d=r.isArray(u);if(!u)return null;var h=function(e,t){var i=o(e.node1,e.node2,t);return t.__edgeMap[i]}(e,t);if(!h)return null;for(var p=-1,f=0;f<h.length;f++)if(h[f]===i){p=f;break}var m=function(e,t){return l(o(e.node1,e.node2,t),t)+l(o(e.node2,e.node1,t),t)}(e,t);a(t,m),e.lineStyle=e.lineStyle||{};var g=o(e.node1,e.node2,t),y=t.__curvenessList,_=d||m%2?0:1;if(h.isForward)return y[_+p];var v=s(g),C=l(v,t),x=y[p+C+_];return c?d?u&&0===u[0]?(C+_)%2?x:-x:((C%2?0:1)+_)%2?x:-x:(C+_)%2?x:-x:y[p+C+_]}},function(e,t,i){var r=i(0),n=i(2),a=i(17),o=i(7),s=i(15),l=i(21),c=i(36);function u(e,t,i,r,n){var s=d(i.get("value"),t.axis,t.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),l=i.getModel("label"),c=o.normalizeCssArray(l.get("padding")||0),u=l.getFont(),h=a.getBoundingRect(s,u),p=n.position,f=h.width+c[1]+c[3],m=h.height+c[0]+c[2],g=n.align;"right"===g&&(p[0]-=f),"center"===g&&(p[0]-=f/2);var y=n.verticalAlign;"bottom"===y&&(p[1]-=m),"middle"===y&&(p[1]-=m/2),function(e,t,i,r){var n=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,n)-t,e[1]=Math.min(e[1]+i,a)-i,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(p,f,m,r);var _=l.get("backgroundColor");_&&"auto"!==_||(_=t.get("axisLine.lineStyle.color")),e.label={shape:{x:0,y:0,width:f,height:m,r:l.get("borderRadius")},position:p.slice(),style:{text:s,textFont:u,textFill:l.getTextColor(),textPosition:"inside",textPadding:c,fill:_,stroke:l.get("borderColor")||"transparent",lineWidth:l.get("borderWidth")||0,shadowBlur:l.get("shadowBlur"),shadowColor:l.get("shadowColor"),shadowOffsetX:l.get("shadowOffsetX"),shadowOffsetY:l.get("shadowOffsetY")},z2:10}}function d(e,t,i,n,a){e=t.scale.parse(e);var o=t.scale.getLabel(e,{precision:a.precision}),s=a.formatter;if(s){var c={value:l.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};r.each(n,(function(e){var t=i.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,n=t&&t.getDataParams(r);n&&c.seriesData.push(n)})),r.isString(s)?o=s.replace("{value}",o):r.isFunction(s)&&(o=s(c))}return o}function h(e,t,i){var r=s.create();return s.rotate(r,r,i.rotation),s.translate(r,r,i.position),n.applyTransform([e.dataToCoord(t),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],r)}t.buildElStyle=function(e){var t,i=e.get("type"),r=e.getModel(i+"Style");return"line"===i?(t=r.getLineStyle()).fill=null:"shadow"===i&&((t=r.getAreaStyle()).stroke=null),t},t.buildLabelElOption=u,t.getValueLabel=d,t.getTransformedPosition=h,t.buildCartesianSingleLabelElOption=function(e,t,i,r,n,a){var o=c.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=n.get("label.margin"),u(t,r,n,a,{position:h(r.axis,e,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})},t.makeLineShape=function(e,t,i){return{x1:e[i=i||0],y1:e[1-i],x2:t[i],y2:t[1-i]}},t.makeRectShape=function(e,t,i){return{x:e[i=i||0],y:e[1-i],width:t[i],height:t[1-i]}},t.makeSectorShape=function(e,t,i,r,n,a){return{cx:e,cy:t,r0:i,r:r,startAngle:n,endAngle:a,clockwise:!0}}},function(e,t,i){var r=i(0),n=i(47),a=r.each;function o(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}t.createVisualMappings=function(e,t,i){var o={};return a(t,(function(t){var s,l=o[t]=((s=function(){}).prototype.__hidden=s.prototype,new s);a(e[t],(function(e,a){if(n.isValidType(a)){var o={type:a,visual:e};i&&i(o,t),l[a]=new n(o),"opacity"===a&&((o=r.clone(o)).type="colorAlpha",l.__hidden.__alphaForOpacity=new n(o))}}))})),o},t.replaceVisualOption=function(e,t,i){var n;r.each(i,(function(e){t.hasOwnProperty(e)&&o(t[e])&&(n=!0)})),n&&r.each(i,(function(i){t.hasOwnProperty(i)&&o(t[i])?e[i]=r.clone(t[i]):delete e[i]}))},t.applyVisual=function(e,t,i,a,o,s){var l,c={};function u(e){return i.getItemVisual(l,e)}function d(e,t){i.setItemVisual(l,e,t)}function h(e,r){l=null==s?e:r;var n=i.getRawDataItem(l);if(!n||!1!==n.visualMap)for(var h=a.call(o,e),p=t[h],f=c[h],m=0,g=f.length;m<g;m++){var y=f[m];p[y]&&p[y].applyVisual(e,u,d)}}r.each(e,(function(e){var i=n.prepareVisualTypes(t[e]);c[e]=i})),null==s?i.each(h):i.each([s],h)},t.incrementalApplyVisual=function(e,t,i,a){var o={};return r.each(e,(function(e){var i=n.prepareVisualTypes(t[e]);o[e]=i})),{progress:function(e,r){function n(e){return r.getItemVisual(l,e)}function s(e,t){r.setItemVisual(l,e,t)}var l;for(null!=a&&(a=r.getDimension(a));null!=(l=e.next());){var c=r.getRawDataItem(l);if(!c||!1!==c.visualMap)for(var u=null!=a?r.get(a,l,!0):l,d=i(u),h=t[d],p=o[d],f=0,m=p.length;f<m;f++){var g=p[f];h[g]&&h[g].applyVisual(u,n,s)}}}}}},function(e,t,i){"use strict";var r=i(237),n=i(239);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){n.isString(e)&&(e=v(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=i(240);function v(e,t,i){if(e&&n.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,i),r}a.prototype.parse=function(e,t,i){if(!n.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var v=e=c.join(s);if(v=v.trim(),!i&&1===e.split("#").length){var C=l.exec(v);if(C)return this.path=v,this.href=v,this.pathname=C[1],C[2]?(this.search=C[2],this.query=t?_.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var x=o.exec(v);if(x){var b=(x=x[0]).toLowerCase();this.protocol=b,v=v.substr(x.length)}if(i||x||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===v.substr(0,2);!S||x&&g[x]||(v=v.substr(2),this.slashes=!0)}if(!g[x]&&(S||x&&!y[x])){for(var T,E,w=-1,A=0;A<h.length;A++){-1!==(P=v.indexOf(h[A]))&&(-1===w||P<w)&&(w=P)}-1!==(E=-1===w?v.lastIndexOf("@"):v.lastIndexOf("@",w))&&(T=v.slice(0,E),v=v.slice(E+1),this.auth=decodeURIComponent(T)),w=-1;for(A=0;A<d.length;A++){var P;-1!==(P=v.indexOf(d[A]))&&(-1===w||P<w)&&(w=P)}-1===w&&(w=v.length),this.host=v.slice(0,w),v=v.slice(w),this.parseHost(),this.hostname=this.hostname||"";var D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D)for(var M=this.hostname.split(/\./),I=(A=0,M.length);A<I;A++){var R=M[A];if(R&&!R.match(p)){for(var O="",L=0,N=R.length;L<N;L++)R.charCodeAt(L)>127?O+="x":O+=R[L];if(!O.match(p)){var F=M.slice(0,A),B=M.slice(A+1),V=R.match(f);V&&(F.push(V[1]),B.unshift(V[2])),B.length&&(v="/"+B.join(".")+v),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=r.toASCII(this.hostname));var k=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+k,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!m[b])for(A=0,I=u.length;A<I;A++){var G=u[A];if(-1!==v.indexOf(G)){var U=encodeURIComponent(G);U===G&&(U=escape(G)),v=v.split(G).join(U)}}var $=v.indexOf("#");-1!==$&&(this.hash=v.substr($),v=v.slice(0,$));var H=v.indexOf("?");if(-1!==H?(this.search=v.substr(H),this.query=v.substr(H+1),t&&(this.query=_.parse(this.query)),v=v.slice(0,H)):t&&(this.search="",this.query={}),v&&(this.pathname=v),y[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var W=this.search||"";this.path=k+W}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",i=this.pathname||"",r=this.hash||"",a=!1,o="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(o=_.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==a?(a="//"+(a||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+a+(i=i.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(n.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var i=new a,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];i[s]=this[s]}if(i.hash=e.hash,""===e.href)return i.href=i.format(),i;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(i[u]=e[u])}return y[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(e.protocol&&e.protocol!==i.protocol){if(!y[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var p=d[h];i[p]=e[p]}return i.href=i.format(),i}if(i.protocol=e.protocol,e.host||g[e.protocol])i.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),i.pathname=f.join("/")}if(i.search=e.search,i.query=e.query,i.host=e.host||"",i.auth=e.auth,i.hostname=e.hostname||e.host,i.port=e.port,i.pathname||i.search){var m=i.pathname||"",_=i.search||"";i.path=m+_}return i.slashes=i.slashes||e.slashes,i.href=i.format(),i}var v=i.pathname&&"/"===i.pathname.charAt(0),C=e.host||e.pathname&&"/"===e.pathname.charAt(0),x=C||v||i.host&&e.pathname,b=x,S=i.pathname&&i.pathname.split("/")||[],T=(f=e.pathname&&e.pathname.split("/")||[],i.protocol&&!y[i.protocol]);if(T&&(i.hostname="",i.port=null,i.host&&(""===S[0]?S[0]=i.host:S.unshift(i.host)),i.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),x=x&&(""===f[0]||""===S[0])),C)i.host=e.host||""===e.host?e.host:i.host,i.hostname=e.hostname||""===e.hostname?e.hostname:i.hostname,i.search=e.search,i.query=e.query,S=f;else if(f.length)S||(S=[]),S.pop(),S=S.concat(f),i.search=e.search,i.query=e.query;else if(!n.isNullOrUndefined(e.search)){if(T)i.hostname=i.host=S.shift(),(D=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=D.shift(),i.host=i.hostname=D.shift());return i.search=e.search,i.query=e.query,n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!S.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var E=S.slice(-1)[0],w=(i.host||e.host||S.length>1)&&("."===E||".."===E)||""===E,A=0,P=S.length;P>=0;P--)"."===(E=S[P])?S.splice(P,1):".."===E?(S.splice(P,1),A++):A&&(S.splice(P,1),A--);if(!x&&!b)for(;A--;A)S.unshift("..");!x||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),w&&"/"!==S.join("/").substr(-1)&&S.push("");var D,M=""===S[0]||S[0]&&"/"===S[0].charAt(0);T&&(i.hostname=i.host=M?"":S.length?S.shift():"",(D=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=D.shift(),i.host=i.hostname=D.shift()));return(x=x||i.host&&S.length)&&!M&&S.unshift(""),S.length?i.pathname=S.join("/"):(i.pathname=null,i.path=null),n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=e.auth||i.auth,i.slashes=i.slashes||e.slashes,i.href=i.format(),i},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,i){"use strict";var r,n="object"==typeof Reflect?Reflect:null,a=n&&"function"==typeof n.apply?n.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(i,r){function n(){void 0!==a&&e.removeListener("error",a),i([].slice.call(arguments))}var a;"error"!==t&&(a=function(i){e.removeListener(t,n),r(i)},e.once("error",a)),e.once(t,n)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,i,r){var n,a,o,s;if(c(i),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),a=e._events),o=a[t]),void 0===o)o=a[t]=i,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[i,o]:[o,i]:r?o.unshift(i):o.push(i),(n=u(e))>0&&o.length>n&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,i){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},n=h.bind(r);return n.listener=i,r.wrapFn=n,n}function f(e,t,i){var r=e._events;if(void 0===r)return[];var n=r[t];return void 0===n?[]:"function"==typeof n?i?[n.listener||n]:[n]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(n):g(n,n.length)}function m(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function g(e,t){for(var i=new Array(t),r=0;r<t;++r)i[r]=e[r];return i}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,n=this._events;if(void 0!==n)r=r&&void 0===n.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=n[e];if(void 0===l)return!1;if("function"==typeof l)a(l,this,t);else{var c=l.length,u=g(l,c);for(i=0;i<c;++i)a(u[i],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var i,r,n,a,o;if(c(t),void 0===(r=this._events))return this;if(void 0===(i=r[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(n=-1,a=i.length-1;a>=0;a--)if(i[a]===t||i[a].listener===t){o=i[a].listener,n=a;break}if(n<0)return this;0===n?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,n),1===i.length&&(r[e]=i[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,i,r;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var n,a=Object.keys(i);for(r=0;r<a.length;++r)"removeListener"!==(n=a[r])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,i){"use strict";(function(t,r,n){var a=i(75);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var r=e.entry;e.entry=null;for(;r;){var n=r.callback;t.pendingcb--,n(i),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=_;var s,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:a.nextTick;_.WritableState=y;var c=Object.create(i(59));c.inherits=i(31);var u={deprecate:i(250)},d=i(139),h=i(76).Buffer,p=n.Uint8Array||function(){};var f,m=i(140);function g(){}function y(e,t){s=s||i(38),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,c=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(a.nextTick(n,r),a.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),T(e,t))}(e,i,r,t,n);else{var o=b(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||x(e,i),r?l(C,e,i,o,n):C(e,i,o,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function _(e){if(s=s||i(38),!(f.call(_,this)||this instanceof s))return new _(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function v(e,t,i,r,n,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function C(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),T(e,t)}function x(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),a=t.corkedRequestsFree;a.entry=i;for(var s=0,l=!0;i;)n[s]=i,i.isBuf||(l=!1),i=i.next,s+=1;n.allBuffers=l,v(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,u=i.encoding,d=i.callback;if(v(e,t,!1,t.objectMode?1:c.length,c,u,d),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var i=b(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}c.inherits(_,d),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===_&&(e&&e._writableState instanceof y)}})):f=function(e){return e instanceof this},_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},_.prototype.write=function(e,t,i){var r,n=this._writableState,o=!1,s=!n.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(i=t,t=null),s?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=g),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),a.nextTick(t,i)}(this,i):(s||function(e,t,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(r,o),n=!1),n}(this,n,e,i))&&(n.pendingcb++,o=function(e,t,i,r,n,a){if(!i){var o=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,i));return t}(t,r,n);r!==o&&(i=!0,n="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,s,r,n,a);return l}(this,n,s,e,t,i)),o},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||x(this,e))},_.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,T(e,t),i&&(t.finished?a.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,i(27),i(248).setImmediate,i(16))},function(e,t){function i(e,t,i,r){var n=t+1;if(n===i)return 1;if(r(e[n++],e[t])<0){for(;n<i&&r(e[n],e[n-1])<0;)n++;!function(e,t,i){i--;for(;t<i;){var r=e[t];e[t++]=e[i],e[i--]=r}}(e,t,n)}else for(;n<i&&r(e[n],e[n-1])>=0;)n++;return n-t}function r(e,t,i,r,n){for(r===t&&r++;r<i;r++){for(var a,o=e[r],s=t,l=r;s<l;)n(o,e[a=s+l>>>1])<0?l=a:s=a+1;var c=r-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;c>0;)e[s+c]=e[s+c-1],c--}e[s]=o}}function n(e,t,i,r,n,a){var o=0,s=0,l=1;if(a(e,t[i+n])>0){for(s=r-n;l<s&&a(e,t[i+n+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&a(e,t[i+n-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var c=o;o=n-l,l=n-c}for(o++;o<l;){var u=o+(l-o>>>1);a(e,t[i+u])>0?o=u+1:l=u}return l}function a(e,t,i,r,n,a){var o=0,s=0,l=1;if(a(e,t[i+n])<0){for(s=n+1;l<s&&a(e,t[i+n-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var c=o;o=n-l,l=n-c}else{for(s=r-n;l<s&&a(e,t[i+n+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var u=o+(l-o>>>1);a(e,t[i+u])<0?l=u:o=u+1}return l}function o(e,t){var i,r,o,s=7,l=0;i=e.length;var c=[];function u(i){var u=r[i],d=o[i],h=r[i+1],p=o[i+1];o[i]=d+p,i===l-3&&(r[i+1]=r[i+2],o[i+1]=o[i+2]),l--;var f=a(e[h],e,u,d,0,t);u+=f,0!==(d-=f)&&0!==(p=n(e[u+d-1],e,h,p,p-1,t))&&(d<=p?function(i,r,o,l){var u=0;for(u=0;u<r;u++)c[u]=e[i+u];var d=0,h=o,p=i;if(e[p++]=e[h++],0==--l){for(u=0;u<r;u++)e[p+u]=c[d+u];return}if(1===r){for(u=0;u<l;u++)e[p+u]=e[h+u];return void(e[p+l]=c[d])}var f,m,g,y=s;for(;;){f=0,m=0,g=!1;do{if(t(e[h],c[d])<0){if(e[p++]=e[h++],m++,f=0,0==--l){g=!0;break}}else if(e[p++]=c[d++],f++,m=0,1==--r){g=!0;break}}while((f|m)<y);if(g)break;do{if(0!==(f=a(e[h],c,d,r,0,t))){for(u=0;u<f;u++)e[p+u]=c[d+u];if(p+=f,d+=f,(r-=f)<=1){g=!0;break}}if(e[p++]=e[h++],0==--l){g=!0;break}if(0!==(m=n(c[d],e,h,l,0,t))){for(u=0;u<m;u++)e[p+u]=e[h+u];if(p+=m,h+=m,0===(l-=m)){g=!0;break}}if(e[p++]=c[d++],1==--r){g=!0;break}y--}while(f>=7||m>=7);if(g)break;y<0&&(y=0),y+=2}if((s=y)<1&&(s=1),1===r){for(u=0;u<l;u++)e[p+u]=e[h+u];e[p+l]=c[d]}else{if(0===r)throw new Error;for(u=0;u<r;u++)e[p+u]=c[d+u]}}(u,d,h,p):function(i,r,o,l){var u=0;for(u=0;u<l;u++)c[u]=e[o+u];var d=i+r-1,h=l-1,p=o+l-1,f=0,m=0;if(e[p--]=e[d--],0==--r){for(f=p-(l-1),u=0;u<l;u++)e[f+u]=c[u];return}if(1===l){for(m=(p-=r)+1,f=(d-=r)+1,u=r-1;u>=0;u--)e[m+u]=e[f+u];return void(e[p]=c[h])}var g=s;for(;;){var y=0,_=0,v=!1;do{if(t(c[h],e[d])<0){if(e[p--]=e[d--],y++,_=0,0==--r){v=!0;break}}else if(e[p--]=c[h--],_++,y=0,1==--l){v=!0;break}}while((y|_)<g);if(v)break;do{if(0!==(y=r-a(c[h],e,i,r,r-1,t))){for(r-=y,m=(p-=y)+1,f=(d-=y)+1,u=y-1;u>=0;u--)e[m+u]=e[f+u];if(0===r){v=!0;break}}if(e[p--]=c[h--],1==--l){v=!0;break}if(0!==(_=l-n(e[d],c,0,l,l-1,t))){for(l-=_,m=(p-=_)+1,f=(h-=_)+1,u=0;u<_;u++)e[m+u]=c[f+u];if(l<=1){v=!0;break}}if(e[p--]=e[d--],0==--r){v=!0;break}g--}while(y>=7||_>=7);if(v)break;g<0&&(g=0),g+=2}(s=g)<1&&(s=1);if(1===l){for(m=(p-=r)+1,f=(d-=r)+1,u=r-1;u>=0;u--)e[m+u]=e[f+u];e[p]=c[h]}else{if(0===l)throw new Error;for(f=p-(l-1),u=0;u<l;u++)e[f+u]=c[u]}}(u,d,h,p))}r=[],o=[],this.mergeRuns=function(){for(;l>1;){var e=l-2;if(e>=1&&o[e-1]<=o[e]+o[e+1]||e>=2&&o[e-2]<=o[e]+o[e-1])o[e-1]<o[e+1]&&e--;else if(o[e]>o[e+1])break;u(e)}},this.forceMergeRuns=function(){for(;l>1;){var e=l-2;e>0&&o[e-1]<o[e+1]&&e--,u(e)}},this.pushRun=function(e,t){r[l]=e,o[l]=t,l+=1}}e.exports=function(e,t,n,a){n||(n=0),a||(a=e.length);var s=a-n;if(!(s<2)){var l=0;if(s<32)r(e,n,a,n+(l=i(e,n,a,t)),t);else{var c=new o(e,t),u=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(s);do{if((l=i(e,n,a,t))<u){var d=s;d>u&&(d=u),r(e,n,n+d,n+l,t),l=d}c.pushRun(n,l),c.mergeRuns(),s-=l,n+=l}while(0!==s);c.forceMergeRuns()}}}},function(e,t,i){var r=i(152),n=i(81).ContextCachedBy,a=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],o=function(e){this.extendFrom(e,!1)};function s(e,t,i){var r=null==t.x?0:t.x,n=null==t.x2?1:t.x2,a=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(r=r*i.width+i.x,n=n*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),r=isNaN(r)?0:r,n=isNaN(n)?1:n,a=isNaN(a)?0:a,o=isNaN(o)?0:o,e.createLinearGradient(r,a,n,o)}function l(e,t,i){var r=i.width,n=i.height,a=Math.min(r,n),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*r+i.x,s=s*n+i.y,l*=a),e.createRadialGradient(o,s,0,o,s,l)}for(var c=o.prototype={constructor:o,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(e,t,i){var o=i&&i.style,s=!o||e.__attrCachedBy!==n.STYLE_BIND;e.__attrCachedBy=n.STYLE_BIND;for(var l=0;l<a.length;l++){var c=a[l],u=c[0];(s||this[u]!==o[u])&&(e[u]=r(e,u,this[u]||c[1]))}if((s||this.fill!==o.fill)&&(e.fillStyle=this.fill),(s||this.stroke!==o.stroke)&&(e.strokeStyle=this.stroke),(s||this.opacity!==o.opacity)&&(e.globalAlpha=null==this.opacity?1:this.opacity),(s||this.blend!==o.blend)&&(e.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()){var d=this.lineWidth;e.lineWidth=d/(this.strokeNoScale&&t&&t.getLineScale?t.getLineScale():1)}},hasFill:function(){var e=this.fill;return null!=e&&"none"!==e},hasStroke:function(){var e=this.stroke;return null!=e&&"none"!==e&&this.lineWidth>0},extendFrom:function(e,t){if(e)for(var i in e)!e.hasOwnProperty(i)||!0!==t&&(!1===t?this.hasOwnProperty(i):null==e[i])||(this[i]=e[i])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,i){for(var r=("radial"===t.type?l:s)(e,t,i),n=t.colorStops,a=0;a<n.length;a++)r.addColorStop(n[a].offset,n[a].color);return r}},u=0;u<a.length;u++){var d=a[u];d[0]in c||(c[d[0]]=d[1])}o.getGradient=c.getGradient;var h=o;e.exports=h},function(e,t,i){var r=new(i(151))(50);function n(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var i=e.pending[t],r=i.cb;r&&r(this,i.cbPayload),i.hostEl.dirty()}e.pending.length=0}function a(e){return e&&e.width&&e.height}t.findExistImage=function(e){if("string"==typeof e){var t=r.get(e);return t&&t.image}return e},t.createOrUpdateImage=function(e,t,i,o,s){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!i)return t;var l=r.get(e),c={hostEl:i,cb:o,cbPayload:s};return l?!a(t=l.image)&&l.pending.push(c):((t=new Image).onload=t.onerror=n,r.put(e,t.__cachedImgObj={image:t,pending:[c]}),t.src=t.__zrImageSrc=e),t}return e}return t},t.isImageReady=a},function(e,t,i){var r=i(10),n=i(156),a=i(104).subPixelOptimizeRect,o={},s=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var i,r,s,l;this.subPixelOptimize?(a(o,t,this.style),i=o.x,r=o.y,s=o.width,l=o.height,o.r=t.r,t=o):(i=t.x,r=t.y,s=t.width,l=t.height),t.r?n.buildPath(e,t):e.rect(i,r,s,l),e.closePath()}});e.exports=s},function(e,t){var i=Math.round;function r(e,t,r){if(!t)return e;var n=i(2*e);return(n+i(t))%2==0?n/2:(n+(r?1:-1))/2}t.subPixelOptimizeLine=function(e,t,n){if(t){var a=t.x1,o=t.x2,s=t.y1,l=t.y2;e.x1=a,e.x2=o,e.y1=s,e.y2=l;var c=n&&n.lineWidth;c&&(i(2*a)===i(2*o)&&(e.x1=e.x2=r(a,c,!0)),i(2*s)===i(2*l)&&(e.y1=e.y2=r(s,c,!0)))}},t.subPixelOptimizeRect=function(e,t,i){if(t){var n=t.x,a=t.y,o=t.width,s=t.height;e.x=n,e.y=a,e.width=o,e.height=s;var l=i&&i.lineWidth;l&&(e.x=r(n,l,!0),e.y=r(a,l,!0),e.width=Math.max(r(n+o,l,!1)-e.x,0===o?0:1),e.height=Math.max(r(a+s,l,!1)-e.y,0===s?0:1))}},t.subPixelOptimize=r},function(e,t,i){var r=i(0),n=i(83),a=function(e,t,i,r,a,o){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==i?1:i,this.y2=null==r?0:r,this.type="linear",this.global=o||!1,n.call(this,a)};a.prototype={constructor:a},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(0).inherits,n=i(61),a=i(9);function o(e){n.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}o.prototype.incremental=!0,o.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},o.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},o.prototype.addDisplayables=function(e,t){t=t||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],t)},o.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},o.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},o.prototype.brush=function(e,t){for(var i=this._cursor;i<this._displayables.length;i++){(r=this._displayables[i]).beforeBrush&&r.beforeBrush(e),r.brush(e,i===this._cursor?null:this._displayables[i-1]),r.afterBrush&&r.afterBrush(e)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var r;(r=this._temporaryDisplayables[i]).beforeBrush&&r.beforeBrush(e),r.brush(e,0===i?null:this._temporaryDisplayables[i-1]),r.afterBrush&&r.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var s=[];o.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new a(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var i=this._displayables[t],r=i.getBoundingRect().clone();i.needLocalTransform()&&r.applyTransform(i.getLocalTransform(s)),e.union(r)}this._rect=e}return this._rect},o.prototype.contain=function(e,t){var i=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},r(o,n);var l=o;e.exports=l},function(e,t,i){var r=i(42).retrieveRawValue,n=i(7),a=n.getTooltipMarker,o=n.formatTpl,s=i(4).getTooltipRenderMode,l=/\{@(.+?)\}/g,c={getDataParams:function(e,t){var i=this.getData(t),r=this.getRawValue(e,t),n=i.getRawIndex(e),o=i.getName(e),l=i.getRawDataItem(e),c=i.getItemVisual(e,"color"),u=i.getItemVisual(e,"borderColor"),d=this.ecModel.getComponent("tooltip"),h=d&&d.get("renderMode"),p=s(h),f=this.mainType,m="series"===f,g=i.userOutput;return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:m?this.subType:null,seriesIndex:this.seriesIndex,seriesId:m?this.id:null,seriesName:m?this.name:null,name:o,dataIndex:n,data:l,dataType:t,value:r,color:c,borderColor:u,dimensionNames:g?g.dimensionNames:null,encode:g?g.encode:null,marker:a({color:c,renderMode:p}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,i,n,a){t=t||"normal";var s=this.getData(i),c=s.getItemModel(e),u=this.getDataParams(e,i);null!=n&&u.value instanceof Array&&(u.value=u.value[n]);var d=c.get("normal"===t?[a||"label","formatter"]:[t,a||"label","formatter"]);return"function"==typeof d?(u.status=t,u.dimensionIndex=n,d(u)):"string"==typeof d?o(d,u).replace(l,(function(t,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),r(s,e,i)})):void 0},getRawValue:function(e,t){return r(this.getData(t),e)},formatTooltip:function(){}};e.exports=c},function(e,t,i){var r=i(0),n=(r.assert,r.isArray);i(5).__DEV__;function a(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0,this.context}var o=a.prototype;o.perform=function(e){var t,i=this._upstream,r=e&&e.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var o,s=h(this._modBy),c=this._modDataCount||0,u=h(e&&e.modBy),d=e&&e.modDataCount||0;function h(e){return!(e>=1)&&(e=1),e}s===u&&c===d||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=function(e,t){var i,r;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((i=e._reset(e.context))&&i.progress&&(r=i.forceFirstProgress,i=i.progress),n(i)&&!i.length&&(i=null));e._progress=i,e._modBy=e._modDataCount=null;var a=e._downstream;return a&&a.dirty(),r}(this,r)),this._modBy=u,this._modDataCount=d;var p=e&&e.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,m=Math.min(null!=p?this._dueIndex+p:1/0,this._dueEnd);if(!r&&(o||f<m)){var g=this._progress;if(n(g))for(var y=0;y<g.length;y++)l(this,g[y],f,m,u,d);else l(this,g,f,m,u,d)}this._dueIndex=m;var _=null!=this._settedOutputEnd?this._settedOutputEnd:m;this._outputDueEnd=_}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var s=function(){var e,t,i,r,n,a={reset:function(l,c,u,d){t=l,e=c,i=u,r=d,n=Math.ceil(r/i),a.next=i>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%n*i+Math.ceil(t/n),o=t>=e?null:a<r?a:t;return t++,o}}();function l(e,t,i,r,n,a){s.reset(i,r,n,a),e._callingProgress=t,e._callingProgress({start:i,end:r,count:r-i,next:s.next},e.context)}o.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},o.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},o.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},o.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},o.getUpstream=function(){return this._upstream},o.getDownstream=function(){return this._downstream},o.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t.createTask=function(e){return new a(e)}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.createHashMap,a=r.isString,o=r.isArray,s=r.each,l=(r.assert,i(172).parseXML),c=n(),u={registerMap:function(e,t,i){var r;return o(t)?r=t:t.svg?r=[{type:"svg",source:t.svg,specialAreas:t.specialAreas}]:(t.geoJson&&!t.features&&(i=t.specialAreas,t=t.geoJson),r=[{type:"geoJSON",source:t,specialAreas:i}]),s(r,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,d[t])(e)})),c.set(e,r)},retrieveMap:function(e){return c.get(e)}},d={geoJSON:function(e){var t=e.source;e.geoJSON=a(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=l(e.source)}};e.exports=u},function(e,t,i){var r=i(42).retrieveRawValue;t.getDefaultLabel=function(e,t){var i=e.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return r(e,t,i[0]);if(n){for(var a=[],o=0;o<i.length;o++){var s=r(e,t,i[o]);a.push(s)}return a.join(" ")}}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.isObject,a=r.each,o=r.map,s=r.indexOf,l=(r.retrieve,i(6).getLayoutRect),c=i(21),u=c.createScaleByModel,d=c.ifAxisCrossZero,h=c.niceScaleExtent,p=c.estimateLabelUnionRect,f=i(326),m=i(328),g=i(20),y=i(25).getStackedDimension;function _(e,t,i){return e.getCoordSysModel()===t}function v(e,t,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,i),this.model=e}i(329);var C=v.prototype;function x(e,t,i,r){i.getAxesOnZeroOf=function(){return n?[n]:[]};var n,a=e[t],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)b(a[l])&&(n=a[l]);else for(var c in a)if(a.hasOwnProperty(c)&&b(a[c])&&!r[u(a[c])]){n=a[c];break}n&&(r[u(n)]=!0)}function u(e){return e.dim+"_"+e.index}}function b(e){return e&&"category"!==e.type&&"time"!==e.type&&d(e)}C.type="grid",C.axisPointerEnabled=!0,C.getRect=function(){return this._rect},C.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model),a(i.x,(function(e){h(e.scale,e.model)})),a(i.y,(function(e){h(e.scale,e.model)}));var r={};a(i.x,(function(e){x(i,"y",e,r)})),a(i.y,(function(e){x(i,"x",e,r)})),this.resize(this.model,t)},C.resize=function(e,t,i){var r=l(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=r;var n=this._axesList;function o(){a(n,(function(e){var t=e.isHorizontal(),i=t?[0,r.width]:[0,r.height],n=e.inverse?1:0;e.setExtent(i[n],i[1-n]),function(e,t){var i=e.getExtent(),r=i[0]+i[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?r.x:r.y)}))}o(),!i&&e.get("containLabel")&&(a(n,(function(e){if(!e.model.get("axisLabel.inside")){var t=p(e);if(t){var i=e.isHorizontal()?"height":"width",n=e.model.get("axisLabel.margin");r[i]-=t[i]+n,"top"===e.position?r.y+=t.height+n:"left"===e.position&&(r.x+=t.width+n)}}})),o())},C.getAxis=function(e,t){var i=this._axesMap[e];if(null!=i){if(null==t)for(var r in i)if(i.hasOwnProperty(r))return i[r];return i[t]}},C.getAxes=function(){return this._axesList.slice()},C.getCartesian=function(e,t){if(null!=e&&null!=t){var i="x"+e+"y"+t;return this._coordsMap[i]}n(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,a=this._coordsList;r<a.length;r++)if(a[r].getAxis("x").index===e||a[r].getAxis("y").index===t)return a[r]},C.getCartesians=function(){return this._coordsList.slice()},C.convertToPixel=function(e,t,i){var r=this._findConvertTarget(e,t);return r.cartesian?r.cartesian.dataToPoint(i):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(i)):null},C.convertFromPixel=function(e,t,i){var r=this._findConvertTarget(e,t);return r.cartesian?r.cartesian.pointToData(i):r.axis?r.axis.coordToData(r.axis.toLocalCoord(i)):null},C._findConvertTarget=function(e,t){var i,r,n=t.seriesModel,a=t.xAxisModel||n&&n.getReferringComponents("xAxis")[0],o=t.yAxisModel||n&&n.getReferringComponents("yAxis")[0],l=t.gridModel,c=this._coordsList;if(n)i=n.coordinateSystem,s(c,i)<0&&(i=null);else if(a&&o)i=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)r=this.getAxis("x",a.componentIndex);else if(o)r=this.getAxis("y",o.componentIndex);else if(l){l.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:r}},C.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},C._initCartesian=function(e,t,i){var r={left:!1,right:!1,top:!1,bottom:!1},n={x:{},y:{}},o={x:0,y:0};if(t.eachComponent("xAxis",s("x"),this),t.eachComponent("yAxis",s("y"),this),!o.x||!o.y)return this._axesMap={},void(this._axesList=[]);function s(t){return function(i,a){if(_(i,e)){var s=i.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=r.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=r.left?"right":"left"),r[s]=!0;var l=new m(t,u(i),[0,0],i.get("type"),s),c="category"===l.type;l.onBand=c&&i.get("boundaryGap"),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=this,l.index=a,this._axesList.push(l),n[t][a]=l,o[t]++}}}this._axesMap=n,a(n.x,(function(t,i){a(n.y,(function(r,n){var a="x"+i+"y"+n,o=new f(a);o.grid=this,o.model=e,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(r)}),this)}),this)},C._updateScale=function(e,t){function i(e,t,i){a(e.mapDimension(t.dim,!0),(function(i){t.scale.unionExtentFromData(e,y(e,i))}))}a(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(r){if(E(r)){var n=T(r,e),a=n[0],o=n[1];if(!_(a,t)||!_(o,t))return;var s=this.getCartesian(a.componentIndex,o.componentIndex),l=r.getData(),c=s.getAxis("x"),u=s.getAxis("y");"list"===l.type&&(i(l,c,r),i(l,u,r))}}),this)},C.getTooltipAxes=function(e){var t=[],i=[];return a(this.getCartesians(),(function(r){var n=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(n);s(t,n)<0&&t.push(n),s(i,a)<0&&i.push(a)})),{baseAxes:t,otherAxes:i}};var S=["xAxis","yAxis"];function T(e,t){return o(S,(function(t){return e.getReferringComponents(t)[0]}))}function E(e){return"cartesian2d"===e.get("coordinateSystem")}v.create=function(e,t){var i=[];return e.eachComponent("grid",(function(r,n){var a=new v(r,e,t);a.name="grid_"+n,a.resize(r,t,!0),r.coordinateSystem=a,i.push(a)})),e.eachSeries((function(e){if(E(e)){var t=T(e),i=t[0],r=t[1],n=i.getCoordSysModel().coordinateSystem;e.coordinateSystem=n.getCartesian(i.componentIndex,r.componentIndex)}})),i},v.dimensions=v.prototype.dimensions=f.prototype.dimensions,g.register("cartesian2d",v);var w=v;e.exports=w},function(e,t,i){var r=i(0),n={updateSelectedMap:function(e){this._targetList=r.isArray(e)?e.slice():[],this._selectTargetMap=r.reduce(e||[],(function(e,t){return e.set(t.name,t),e}),r.createHashMap())},select:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(e){e.selected=!1})),i&&(i.selected=!0)},unSelect:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);i&&(i.selected=!1)},toggleSelected:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);if(null!=i)return this[i.selected?"unSelect":"select"](e,t),i.selected},isSelected:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);return i&&i.selected}};e.exports=n},function(e,t){t.updateViewOnPan=function(e,t,i){var r=e.target,n=r.position;n[0]+=t,n[1]+=i,r.dirty()},t.updateViewOnZoom=function(e,t,i,r){var n=e.target,a=e.zoomLimit,o=n.position,s=n.scale,l=e.zoom=e.zoom||1;if(l*=t,a){var c=a.min||0,u=a.max||1/0;l=Math.max(Math.min(u,l),c)}var d=l/e.zoom;e.zoom=l,o[0]-=(i-o[0])*(d-1),o[1]-=(r-o[1])*(d-1),s[0]*=d,s[1]*=d,n.dirty()}},function(e,t){t.updateCenterAndZoom=function(e,t,i){var r=e.getZoom(),n=e.getCenter(),a=t.zoom,o=e.dataToPoint(n);if(null!=t.dx&&null!=t.dy){o[0]-=t.dx,o[1]-=t.dy;n=e.pointToData(o);e.setCenter(n)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(r*a,l),s)/r}e.scale[0]*=a,e.scale[1]*=a;var c=e.position,u=(t.originX-c[0])*(a-1),d=(t.originY-c[1])*(a-1);c[0]-=u,c[1]-=d,e.updateTransform();n=e.pointToData(o);e.setCenter(n),e.setZoom(a*r)}return{center:e.getCenter(),zoom:e.getZoom()}}},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(365),o=i(6),s=i(3),l=i(92),c=i(109);function u(e,t){var i=e.get("boundingCoords");if(null!=i){var r=i[0],n=i[1];isNaN(r[0])||isNaN(r[1])||isNaN(n[0])||isNaN(n[1])||this.setBoundingRect(r[0],r[1],n[0]-r[0],n[1]-r[1])}var a,l=this.getBoundingRect(),c=e.get("layoutCenter"),u=e.get("layoutSize"),d=t.getWidth(),h=t.getHeight(),p=l.width/l.height*this.aspectScale,f=!1;if(c&&u&&(c=[s.parsePercent(c[0],d),s.parsePercent(c[1],h)],u=s.parsePercent(u,Math.min(d,h)),isNaN(c[0])||isNaN(c[1])||isNaN(u)||(f=!0)),f){var m={};p>1?(m.width=u,m.height=u/p):(m.height=u,m.width=u*p),m.y=c[1]-m.height/2,m.x=c[0]-m.width/2}else(a=e.getBoxLayoutParams()).aspect=p,m=o.getLayoutRect(a,{width:d,height:h});this.setViewRect(m.x,m.y,m.width,m.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function d(e,t){n.each(t.get("geoCoord"),(function(t,i){e.addGeoCoord(i,t)}))}var h={dimensions:a.prototype.dimensions,create:function(e,t){var i=[];e.eachComponent("geo",(function(e,r){var n=e.get("map"),o=e.get("aspectScale"),s=!0,l=c.retrieveMap(n);l&&l[0]&&"svg"===l[0].type?(null==o&&(o=1),s=!1):null==o&&(o=.75);var h=new a(n+r,n,e.get("nameMap"),s);h.aspectScale=o,h.zoomLimit=e.get("scaleLimit"),i.push(h),d(h,e),e.coordinateSystem=h,h.model=e,h.resize=u,h.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=i[t]}}));var r={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();r[t]=r[t]||[],r[t].push(e)}})),n.each(r,(function(e,r){var o=n.map(e,(function(e){return e.get("nameMap")})),s=new a(r,r,n.mergeAll(o));s.zoomLimit=n.retrieve.apply(null,n.map(e,(function(e){return e.get("scaleLimit")}))),i.push(s),s.resize=u,s.aspectScale=e[0].get("aspectScale"),s.resize(e[0],t),n.each(e,(function(e){e.coordinateSystem=s,d(s,e)}))})),i},getFilledRegions:function(e,t,i){for(var r=(e||[]).slice(),a=n.createHashMap(),o=0;o<r.length;o++)a.set(r[o].name,r[o]);var s=l.load(t,i);return n.each(s.regions,(function(e){var t=e.name;!a.get(t)&&r.push({name:t})})),r}};r.registerCoordinateSystem("geo",h);var p=h;e.exports=p},function(e,t,i){var r=i(0),n=i(8),a=i(15),o=i(9),s=i(79),l=n.applyTransform;function c(){s.call(this)}function u(e){this.name=e,this.zoomLimit,s.call(this),this._roamTransformable=new c,this._rawTransformable=new c,this._center,this._zoom}function d(e,t,i,r){var n=i.seriesModel,a=n?n.coordinateSystem:null;return a===this?a[e](r):null}r.mixin(c,s),u.prototype={constructor:u,type:"view",dimensions:["x","y"],setBoundingRect:function(e,t,i,r){return this._rect=new o(e,t,i,r),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(e,t,i,r){this.transformTo(e,t,i,r),this._viewRect=new o(e,t,i,r)},transformTo:function(e,t,i,r){var n=this.getBoundingRect(),a=this._rawTransformable;a.transform=n.calculateTransform(new o(e,t,i,r)),a.decomposeTransform(),this._updateTransform()},setCenter:function(e){e&&(this._center=e,this._updateCenterAndZoom())},setZoom:function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},getDefaultCenter:function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,i=this.getDefaultCenter(),r=this.getCenter(),a=this.getZoom();r=n.applyTransform([],r,e),i=n.applyTransform([],i,e),t.origin=r,t.position=[i[0]-r[0],i[1]-r[1]],t.scale=[a,a],this._updateTransform()},_updateTransform:function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),a.copy(this.transform||(this.transform=[]),t.transform||a.create()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],a.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,t=this._rawTransformable;return{roamTransform:e?r.slice(e):a.create(),rawScale:r.slice(t.scale),rawPosition:r.slice(t.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},dataToPoint:function(e,t,i){var r=t?this._rawTransform:this.transform;return i=i||[],r?l(i,e,r):n.copy(i,e)},pointToData:function(e){var t=this.invTransform;return t?l([],e,t):[e[0],e[1]]},convertToPixel:r.curry(d,"dataToPoint"),convertFromPixel:r.curry(d,"pointToData"),containPoint:function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])}},r.mixin(u,s);var h=u;e.exports=h},function(e,t,i){var r=i(0),n=i(194),a=i(18),o=i(52),s=function(e,t){this.name=e||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=t};function l(e){this.root,this.data,this._nodes=[],this.hostModel=e}s.prototype={constructor:s,isRemoved:function(){return this.dataIndex<0},eachNode:function(e,t,i){"function"==typeof e&&(i=t,t=e,e=null),e=e||{},r.isString(e)&&(e={order:e});var n,a=e.order||"preorder",o=this[e.attr||"children"];"preorder"===a&&(n=t.call(i,this));for(var s=0;!n&&s<o.length;s++)o[s].eachNode(e,t,i);"postorder"===a&&t.call(i,this)},updateDepthAndHeight:function(e){var t=0;this.depth=e;for(var i=0;i<this.children.length;i++){var r=this.children[i];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},getNodeById:function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,r=i.length;t<r;t++){var n=i[t].getNodeById(e);if(n)return n}},contains:function(e){if(e===this)return!0;for(var t=0,i=this.children,r=i.length;t<r;t++){var n=i[t].contains(e);if(n)return n}},getAncestors:function(e){for(var t=[],i=e?this:this.parentNode;i;)t.push(i),i=i.parentNode;return t.reverse(),t},getValue:function(e){var t=this.hostTree.data;return t.get(t.getDimension(e||"value"),this.dataIndex)},setLayout:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},setVisual:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},getVisual:function(e,t){return this.hostTree.data.getItemVisual(this.dataIndex,e,t)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},isDescendantOf:function(e){return e!==this&&e.isAncestorOf(this)}},l.prototype={constructor:l,type:"tree",eachNode:function(e,t,i){this.root.eachNode(e,t,i)},getNodeByDataIndex:function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},getNodeByName:function(e){return this.root.getNodeByName(e)},update:function(){for(var e=this.data,t=this._nodes,i=0,r=t.length;i<r;i++)t[i].dataIndex=-1;for(i=0,r=e.count();i<r;i++)t[e.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},l.createTree=function(e,t,i){var c=new l(t),u=[],d=1;!function e(t,i){var n=t.value;d=Math.max(d,r.isArray(n)?n.length:1),u.push(t);var a=new s(t.name,c);i?function(e,t){var i=t.children;if(e.parentNode===t)return;i.push(e),e.parentNode=t}(a,i):c.root=a,c._nodes.push(a);var o=t.children;if(o)for(var l=0;l<o.length;l++)e(o[l],a)}(e),c.root.updateDepthAndHeight(0);var h=o(u,{coordDimensions:["value"],dimensionsCount:d}),p=new a(h,t);return p.initData(u),i&&i(p),n({mainData:p,struct:c,structAttr:"tree"}),c.update(),c};var c=l;e.exports=c},function(e,t,i){var r=i(2),n=i(119);function a(e){this._ctor=e||n,this.group=new r.Group}var o=a.prototype;function s(e){var t=e.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),hoverLineStyle:t.getModel("emphasis.lineStyle").getLineStyle(),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label")}}function l(e){return isNaN(e[0])||isNaN(e[1])}function c(e){return!l(e[0])&&!l(e[1])}o.isPersistent=function(){return!0},o.updateData=function(e){var t=this,i=t.group,r=t._lineData;t._lineData=e,r||i.removeAll();var n=s(e);e.diff(r).add((function(i){!function(e,t,i,r){if(!c(t.getItemLayout(i)))return;var n=new e._ctor(t,i,r);t.setItemGraphicEl(i,n),e.group.add(n)}(t,e,i,n)})).update((function(i,a){!function(e,t,i,r,n,a){var o=t.getItemGraphicEl(r);if(!c(i.getItemLayout(n)))return void e.group.remove(o);o?o.updateData(i,n,a):o=new e._ctor(i,n,a);i.setItemGraphicEl(n,o),e.group.add(o)}(t,r,e,a,i,n)})).remove((function(e){i.remove(r.getItemGraphicEl(e))})).execute()},o.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,i){t.updateLayout(e,i)}),this)},o.incrementalPrepareUpdate=function(e){this._seriesScope=s(e),this._lineData=null,this.group.removeAll()},o.incrementalUpdate=function(e,t){function i(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=e.useHoverLayer=!0)}for(var r=e.start;r<e.end;r++){if(c(t.getItemLayout(r))){var n=new this._ctor(t,r,this._seriesScope);n.traverse(i),this.group.add(n),t.setItemGraphicEl(r,n)}}},o.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},o._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var u=a;e.exports=u},function(e,t,i){var r=i(0),n=i(8),a=i(19),o=i(388),s=i(2),l=i(3).round,c=["fromSymbol","toSymbol"];function u(e){return"_"+e+"Type"}function d(e,t,i){var n=t.getItemVisual(i,e);if(n&&"none"!==n){var o=t.getItemVisual(i,"color"),s=t.getItemVisual(i,e+"Size"),l=t.getItemVisual(i,e+"Rotate");r.isArray(s)||(s=[s,s]);var c=a.createSymbol(n,-s[0]/2,-s[1]/2,s[0],s[1],o);return c.__specifiedRotation=null==l||isNaN(l)?void 0:+l*Math.PI/180||0,c.name=e,c}}function h(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var i=t[2];i?(e.cpx1=i[0],e.cpy1=i[1]):(e.cpx1=NaN,e.cpy1=NaN)}function p(e,t,i){s.Group.call(this),this._createLine(e,t,i)}var f=p.prototype;f.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),i=this.childOfName("label");if(e||t||!i.ignore){for(var r=1,a=this.parent;a;)a.scale&&(r/=a.scale[0]),a=a.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),c=o.pointAt(s),u=n.sub([],c,l);if(n.normalize(u,u),e){if(e.attr("position",l),null==(h=e.__specifiedRotation)){var d=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(d[1],d[0]))}else e.attr("rotation",h);e.attr("scale",[r*s,r*s])}if(t){var h;if(t.attr("position",c),null==(h=t.__specifiedRotation)){d=o.tangentAt(1);t.attr("rotation",-Math.PI/2-Math.atan2(d[1],d[0]))}else t.attr("rotation",h);t.attr("scale",[r*s,r*s])}if(!i.ignore){var p,f,m,g;i.attr("position",c);var y=i.__labelDistance,_=y[0]*r,v=y[1]*r,C=s/2,x=[(d=o.tangentAt(C))[1],-d[0]],b=o.pointAt(C);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var S,T=d[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var E=-Math.atan2(d[1],d[0]);c[0]<l[0]&&(E=Math.PI+E),i.attr("rotation",E)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-v,m="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=v,m="top";break;default:S=0,m="middle"}switch(i.__position){case"end":p=[u[0]*_+c[0],u[1]*v+c[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",m=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":p=[-u[0]*_+l[0],-u[1]*v+l[1]],f=u[0]>.8?"right":u[0]<-.8?"left":"center",m=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":p=[_*T+l[0],l[1]+S],f=d[0]<0?"right":"left",g=[-_*T,-S];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":p=[b[0],b[1]+S],f="center",g=[0,-S];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":p=[-_*T+c[0],c[1]+S],f=d[0]>=0?"right":"left",g=[_*T,-S]}i.attr({style:{textVerticalAlign:i.__verticalAlign||m,textAlign:i.__textAlign||f},position:p,scale:[r,r],origin:g})}}}},f._createLine=function(e,t,i){var n=e.hostModel,a=function(e){var t=new o({name:"line",subPixelOptimize:!0});return h(t.shape,e),t}(e.getItemLayout(t));a.shape.percent=0,s.initProps(a,{shape:{percent:1}},n,t),this.add(a);var l=new s.Text({name:"label",lineLabelOriginalOpacity:1});this.add(l),r.each(c,(function(i){var r=d(i,e,t);this.add(r),this[u(i)]=e.getItemVisual(t,i)}),this),this._updateCommonStl(e,t,i)},f.updateData=function(e,t,i){var n=e.hostModel,a=this.childOfName("line"),o=e.getItemLayout(t),l={shape:{}};h(l.shape,o),s.updateProps(a,l,n,t),r.each(c,(function(i){var r=e.getItemVisual(t,i),n=u(i);if(this[n]!==r){this.remove(this.childOfName(i));var a=d(i,e,t);this.add(a)}this[n]=r}),this),this._updateCommonStl(e,t,i)},f._updateCommonStl=function(e,t,i){var n=e.hostModel,a=this.childOfName("line"),o=i&&i.lineStyle,u=i&&i.hoverLineStyle,d=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||e.hasItemOption){var p=e.getItemModel(t);o=p.getModel("lineStyle").getLineStyle(),u=p.getModel("emphasis.lineStyle").getLineStyle(),d=p.getModel("label"),h=p.getModel("emphasis.label")}var f=e.getItemVisual(t,"color"),m=r.retrieve3(e.getItemVisual(t,"opacity"),o.opacity,1);a.useStyle(r.defaults({strokeNoScale:!0,fill:"none",stroke:f,opacity:m},o)),a.hoverStyle=u,r.each(c,(function(e){var t=this.childOfName(e);t&&(t.setColor(f),t.setStyle({opacity:m}))}),this);var g,y,_=d.getShallow("show"),v=h.getShallow("show"),C=this.childOfName("label");if((_||v)&&(g=f||"#000",null==(y=n.getFormattedLabel(t,"normal",e.dataType)))){var x=n.getRawValue(t);y=null==x?e.getName(t):isFinite(x)?l(x):x}var b=_?y:null,S=v?r.retrieve2(n.getFormattedLabel(t,"emphasis",e.dataType),y):null,T=C.style;if(null!=b||null!=S){s.setTextStyle(C.style,d,{text:b},{autoColor:g}),C.__textAlign=T.textAlign,C.__verticalAlign=T.textVerticalAlign,C.__position=d.get("position")||"middle";var E=d.get("distance");r.isArray(E)||(E=[E,E]),C.__labelDistance=E}C.hoverStyle=null!=S?{text:S,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},C.ignore=!_&&!v,s.setHoverStyle(this)},f.highlight=function(){this.trigger("emphasis")},f.downplay=function(){this.trigger("normal")},f.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},f.setLinePoints=function(e){var t=this.childOfName("line");h(t.shape,e),t.dirty()},r.inherits(p,s.Group);var m=p;e.exports=m},function(e,t){t.getNodeGlobalScale=function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=e.option.nodeScaleRatio,r=t.scale,n=r&&r[0]||1;return((t.getZoom()-1)*i+1)/n},t.getSymbolSize=function(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(39),a=i(2),o=i(192),s=i(43),l=r.curry,c=r.each,u=r.map,d=Math.min,h=Math.max,p=Math.pow,f={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},m={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},g={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},y=0;function _(e){n.call(this),this._zr=e,this.group=new a.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+y++,this._handlers={},c(H,(function(e,t){this._handlers[t]=r.bind(e,this)}),this)}function v(e,t){var i=j[t.brushType].createCover(e,t);return i.__brushOption=t,b(i,t),e.group.add(i),i}function C(e,t){var i=T(t);return i.endCreating&&(i.endCreating(e,t),b(t,t.__brushOption)),t}function x(e,t){var i=t.__brushOption;T(t).updateCoverShape(e,t,i.range,i)}function b(e,t){var i=t.z;null==i&&(i=1e4),e.traverse((function(e){e.z=i,e.z2=i}))}function S(e,t){T(t).updateCommon(e,t),x(e,t)}function T(e){return j[e.__brushOption.brushType]}function E(e,t,i){var r,n=e._panels;if(!n)return!0;var a=e._transform;return c(n,(function(e){e.isTargetByCursor(t,i,a)&&(r=e)})),r}function w(e,t){var i=e._panels;if(!i)return!0;var r=t.__brushOption.panelId;return null==r||i[r]}function A(e){var t=e._covers,i=t.length;return c(t,(function(t){e.group.remove(t)}),e),t.length=0,!!i}function P(e,t){var i=u(e._covers,(function(e){var t=e.__brushOption,i=r.clone(t.range);return{brushType:t.brushType,panelId:t.panelId,range:i}}));e.trigger("brush",i,{isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function D(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function M(e,t,i,r){var n=new a.Group;return n.add(new a.Rect({name:"main",style:L(i),silent:!0,draggable:!0,cursor:"move",drift:l(e,t,n,"nswe"),ondragend:l(P,t,{isEnd:!0})})),c(r,(function(i){n.add(new a.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:l(e,t,n,i),ondragend:l(P,t,{isEnd:!0})}))})),n}function I(e,t,i,r){var n=r.brushStyle.lineWidth||0,a=h(n,6),o=i[0][0],s=i[1][0],l=o-n/2,c=s-n/2,u=i[0][1],d=i[1][1],p=u-a+n/2,f=d-a+n/2,m=u-o,g=d-s,y=m+n,_=g+n;O(e,t,"main",o,s,m,g),r.transformable&&(O(e,t,"w",l,c,a,_),O(e,t,"e",p,c,a,_),O(e,t,"n",l,c,y,a),O(e,t,"s",l,f,y,a),O(e,t,"nw",l,c,a,a),O(e,t,"ne",p,c,a,a),O(e,t,"sw",l,f,a,a),O(e,t,"se",p,f,a,a))}function R(e,t){var i=t.__brushOption,r=i.transformable,n=t.childAt(0);n.useStyle(L(i)),n.attr({silent:!r,cursor:r?"move":"default"}),c(["w","e","n","s","se","sw","ne","nw"],(function(i){var n=t.childOfName(i),o=function e(t,i){if(i.length>1)return i=i.split(""),("e"===(r=[e(t,i[0]),e(t,i[1])])[0]||"w"===r[0])&&r.reverse(),r.join("");var r;return{left:"w",right:"e",top:"n",bottom:"s"}[r=a.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[i],function(e){return a.getTransform(e.group)}(t))]}(e,i);n&&n.attr({silent:!r,invisible:!r,cursor:r?m[o]+"-resize":null})}))}function O(e,t,i,r,n,a,o){var s,l,c,u,p,f=t.childOfName(i);f&&f.setShape((s=k(e,t,[[r,n],[r+a,n+o]]),l=d(s[0][0],s[1][0]),c=d(s[0][1],s[1][1]),u=h(s[0][0],s[1][0]),p=h(s[0][1],s[1][1]),{x:l,y:c,width:u-l,height:p-c}))}function L(e){return r.defaults({strokeNoScale:!0},e.brushStyle)}function N(e,t,i,r){var n=[d(e,i),d(t,r)],a=[h(e,i),h(t,r)];return[[n[0],a[0]],[n[1],a[1]]]}function F(e,t,i,r,n,a,o,s){var l=r.__brushOption,u=e(l.range),d=V(i,a,o);c(n.split(""),(function(e){var t=f[e];u[t[0]][t[1]]+=d[t[0]]})),l.range=t(N(u[0][0],u[1][0],u[0][1],u[1][1])),S(i,r),P(i,{isEnd:!1})}function B(e,t,i,r,n){var a=t.__brushOption.range,o=V(e,i,r);c(a,(function(e){e[0]+=o[0],e[1]+=o[1]})),S(e,t),P(e,{isEnd:!1})}function V(e,t,i){var r=e.group,n=r.transformCoordToLocal(t,i),a=r.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function k(e,t,i){var n=w(e,t);return n&&!0!==n?n.clipPath(i,e._transform):r.clone(i)}function z(e){var t=e.event;t.preventDefault&&t.preventDefault()}function G(e,t,i){return e.childOfName("main").contain(t,i)}function U(e,t,i,n){var a,o=e._creatingCover,s=e._creatingPanel,l=e._brushOption;if(e._track.push(i.slice()),function(e){var t=e._track;if(!t.length)return!1;var i=t[t.length-1],r=t[0],n=i[0]-r[0],a=i[1]-r[1];return p(n*n+a*a,.5)>6}(e)||o){if(s&&!o){"single"===l.brushMode&&A(e);var c=r.clone(l);c.brushType=$(c.brushType,s),c.panelId=!0===s?null:s.panelId,o=e._creatingCover=v(e,c),e._covers.push(o)}if(o){var u=j[$(e._brushType,s)];o.__brushOption.range=u.getCreatingRange(k(e,o,e._track)),n&&(C(e,o),u.updateCommon(e,o)),x(e,o),a={isEnd:n}}}else n&&"single"===l.brushMode&&l.removeOnClick&&E(e,t,i)&&A(e)&&(a={isEnd:n,removeOnClick:!0});return a}function $(e,t){return"auto"===e?t.defaultBrushType:e}_.prototype={constructor:_,enableBrush:function(e){var t,i;return this._brushType&&(i=(t=this)._zr,o.release(i,"globalPan",t._uid),function(e,t){c(t,(function(t,i){e.off(i,t)}))}(i,t._handlers),t._brushType=t._brushOption=null),e.brushType&&function(e,t){var i=e._zr;e._enableGlobalPan||o.take(i,"globalPan",e._uid);(function(e,t){c(t,(function(t,i){e.on(i,t)}))})(i,e._handlers),e._brushType=t.brushType,e._brushOption=r.merge(r.clone(g),t,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var t=this._panels={};r.each(e,(function(e){t[e.panelId]=r.clone(e)}))}else this._panels=null;return this},mount:function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({position:e.position||[0,0],rotation:e.rotation||0,scale:e.scale||[1,1]}),this._transform=t.getLocalTransform(),this},eachCover:function(e,t){c(this._covers,e,t)},updateCovers:function(e){e=r.map(e,(function(e){return r.merge(r.clone(g),e,!0)}));var t=this._covers,i=this._covers=[],n=this,a=this._creatingCover;return new s(t,e,(function(e,t){return o(e.__brushOption,t)}),o).add(l).update(l).remove((function(e){t[e]!==a&&n.group.remove(t[e])})).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function l(r,o){var s=e[r];if(null!=o&&t[o]===a)i[r]=t[o];else{var l=i[r]=null!=o?(t[o].__brushOption=s,t[o]):C(n,v(n,s));S(n,l)}}},unmount:function(){return this.enableBrush(!1),A(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},r.mixin(_,n);var H={mousedown:function(e){if(this._dragging)W(this,e);else if(!e.target||!e.target.draggable){z(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=E(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,i=e.offsetY,r=this.group.transformCoordToLocal(t,i);if(function(e,t,i){if(e._brushType&&!function(e,t,i){var r=e._zr;return t<0||t>r.getWidth()||i<0||i>r.getHeight()}(e,t)){var r=e._zr,n=e._covers,a=E(e,t,i);if(!e._dragging)for(var o=0;o<n.length;o++){var s=n[o].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&j[s.brushType].contain(n[o],i[0],i[1]))return}a&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){z(e);var n=U(this,e,r,!1);n&&P(this,n)}},mouseup:function(e){W(this,e)}};function W(e,t){if(e._dragging){z(t);var i=t.offsetX,r=t.offsetY,n=e.group.transformCoordToLocal(i,r),a=U(e,t,n,!0);e._dragging=!1,e._track=[],e._creatingCover=null,a&&P(e,a)}}var j={lineX:q(0),lineY:q(1),rect:{createCover:function(e,t){return M(l(F,(function(e){return e}),(function(e){return e})),e,t,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(e){var t=D(e);return N(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,i,r){I(e,t,i,r)},updateCommon:R,contain:G},polygon:{createCover:function(e,t){var i=new a.Group;return i.add(new a.Polyline({name:"main",style:L(t),silent:!0})),i},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new a.Polygon({name:"main",draggable:!0,drift:l(B,e,t),ondragend:l(P,e,{isEnd:!0})}))},updateCoverShape:function(e,t,i,r){t.childAt(0).setShape({points:k(e,t,i)})},updateCommon:R,contain:G}};function q(e){return{createCover:function(t,i){return M(l(F,(function(t){var i=[t,[0,100]];return e&&i.reverse(),i}),(function(t){return t[e]})),t,i,[["w","e"],["n","s"]][e])},getCreatingRange:function(t){var i=D(t);return[d(i[0][e],i[1][e]),h(i[0][e],i[1][e])]},updateCoverShape:function(t,i,r,n){var a,o=w(t,i);if(!0!==o&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e,t._transform);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,a];e&&l.reverse(),I(t,i,l,n)},updateCommon:R,contain:G}}var Y=_;e.exports=Y},function(e,t,i){var r=i(0),n=i(28),a=i(2),o=i(90),s=i(22),l=i(33),c=(0,i(4).makeInner)(),u=r.clone,d=r.bind;function h(){}function p(e,t,i,n){(function e(t,i){if(r.isObject(t)&&r.isObject(i)){var n=!0;return r.each(i,(function(i,r){n=n&&e(t[r],i)})),!!n}return t===i})(c(i).lastProp,n)||(c(i).lastProp=n,t?a.updateProps(i,n,e):(i.stopAnimation(),i.attr(n)))}function f(e,t){e[t.get("label.show")?"show":"hide"]()}function m(e){return{position:e.position.slice(),rotation:e.rotation||0}}function g(e,t,i){var r=t.get("z"),n=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=n&&(e.zlevel=n),e.silent=i)}))}h.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,i,n){var o=t.get("value"),s=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,n||this._lastValue!==o||this._lastStatus!==s){this._lastValue=o,this._lastStatus=s;var l=this._group,c=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(c&&c.hide());l&&l.show(),c&&c.show();var u={};this.makeElOption(u,o,e,t,i);var d=u.graphicKey;d!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=d;var h=this._moveAnimation=this.determineAnimation(e,t);if(l){var f=r.curry(p,t,h);this.updatePointerEl(l,u,f,t),this.updateLabelEl(l,u,f,t)}else l=this._group=new a.Group,this.createPointerEl(l,u,e,t),this.createLabelEl(l,u,e,t),i.getZr().add(l);g(l,t,!0),this._renderHandle(o)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var i=t.get("animation"),r=e.axis,n="category"===r.type,a=t.get("snap");if(!a&&!n)return!1;if("auto"===i||null==i){var s=this.animationThreshold;if(n&&r.getBandWidth()>s)return!0;if(a){var l=o.getAxisInfo(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/l>s}return!1}return!0===i},makeElOption:function(e,t,i,r,n){},createPointerEl:function(e,t,i,r){var n=t.pointer;if(n){var o=c(e).pointerEl=new a[n.type](u(t.pointer));e.add(o)}},createLabelEl:function(e,t,i,r){if(t.label){var n=c(e).labelEl=new a.Rect(u(t.label));e.add(n),f(n,r)}},updatePointerEl:function(e,t,i){var r=c(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),i(r,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,i,r){var n=c(e).labelEl;n&&(n.setStyle(t.label.style),i(n,{shape:t.label.shape,position:t.label.position}),f(n,r))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,c=i.getModel("handle"),u=i.get("status");if(!c.get("show")||!u||"hide"===u)return o&&n.remove(o),void(this._handle=null);this._handle||(t=!0,o=this._handle=a.createIcon(c.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){s.stop(e.event)},onmousedown:d(this._onHandleDragMove,this,0,0),drift:d(this._onHandleDragMove,this),ondragend:d(this._onHandleDragEnd,this)}),n.add(o)),g(o,i,!1);o.setStyle(c.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var h=c.get("size");r.isArray(h)||(h=[h,h]),o.attr("scale",[h[0]/2,h[1]/2]),l.createOrUpdate(this,"_doDispatchAxisPointer",c.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){p(this._axisPointerModel,!t&&this._moveAnimation,this._handle,m(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(m(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(m(r)),c(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},_onHandleDragEnd:function(e){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,r=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(e,t,i){return{x:e[i=i||0],y:e[1-i],width:t[i],height:t[1-i]}}},h.prototype.constructor=h,n.enableClassExtend(h);var y=h;e.exports=y},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(482),a=i(3).parsePercent,o=i(21),s=o.createScaleByModel,l=o.niceScaleExtent,c=i(20),u=i(25).getStackedDimension;function d(e,t){var i=this,n=i.getAngleAxis(),a=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===i){var t=e.getData();r.each(t.mapDimension("radius",!0),(function(e){a.scale.unionExtentFromData(t,u(t,e))})),r.each(t.mapDimension("angle",!0),(function(e){n.scale.unionExtentFromData(t,u(t,e))}))}})),l(n.scale,n.model),l(a.scale,a.model),"category"===n.type&&!n.onBand){var o=n.getExtent(),s=360/n.scale.count();n.inverse?o[1]+=s:o[1]-=s,n.setExtent(o[0],o[1])}}function h(e,t){if(e.type=t.get("type"),e.scale=s(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),"angleAxis"===t.mainType){e.inverse^=t.get("clockwise");var i=t.get("startAngle");e.setExtent(i,i+(e.inverse?-360:360))}t.axis=e,e.model=t}i(485);var p={dimensions:n.prototype.dimensions,create:function(e,t){var i=[];return e.eachComponent("polar",(function(e,o){var s=new n(o);s.update=d;var l=s.getRadiusAxis(),c=s.getAngleAxis(),u=e.findAxisModel("radiusAxis"),p=e.findAxisModel("angleAxis");h(l,u),h(c,p),function(e,t,i){var n=t.get("center"),o=i.getWidth(),s=i.getHeight();e.cx=a(n[0],o),e.cy=a(n[1],s);var l=e.getRadiusAxis(),c=Math.min(o,s)/2,u=t.get("radius");null==u?u=[0,"100%"]:r.isArray(u)||(u=[0,u]),u=[a(u[0],c),a(u[1],c)],l.inverse?l.setExtent(u[1],u[0]):l.setExtent(u[0],u[1])}(s,e,t),i.push(s),e.coordinateSystem=s,s.model=e})),e.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=i.coordinateSystem}})),i}};c.register("polar",p)},function(e,t,i){i(13).registerSubTypeDefaulter("dataZoom",(function(){return"slider"}))},function(e,t,i){var r=i(0),n=i(7),a=["cartesian2d","polar","singleAxis"];function o(e,t){e=e.slice();var i=r.map(e,n.capitalFirst);t=(t||[]).slice();var a=r.map(t,n.capitalFirst);return function(n,o){r.each(e,(function(e,r){for(var s={name:e,capital:i[r]},l=0;l<t.length;l++)s[t[l]]=e+a[l];n.call(o,s)}))}}var s=o(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);t.isCoordSupported=function(e){return r.indexOf(a,e)>=0},t.createNameEach=o,t.eachAxisDim=s,t.createLinkedNodesFinder=function(e,t,i){return function(a){var o,s={nodes:[],records:{}};if(t((function(e){s.records[e.name]={}})),!a)return s;n(a,s);do{o=!1,e(l)}while(o);function l(e){!function(e,t){return r.indexOf(t.nodes,e)>=0}(e,s)&&function(e,n){var a=!1;return t((function(t){r.each(i(e,t)||[],(function(e){n.records[t.name][e]&&(a=!0)}))})),a}(e,s)&&(n(e,s),o=!0)}return s};function n(e,n){n.nodes.push(e),t((function(t){r.each(i(e,t)||[],(function(e){n.records[t.name][e]=!0}))}))}}},function(e,t,i){var r=i(1),n=i(0),a=n.createHashMap,o=n.each;r.registerProcessor({getTargetSeries:function(e){var t=a();return e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,i,r){var n=r.getAxisProxy(e.name,i);o(n.getTargetSeriesModels(),(function(e){t.set(e.uid,e)}))}))})),t},modifyOutputEnd:!0,overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,i,r){r.getAxisProxy(e.name,i).reset(r,t)})),e.eachTargetAxis((function(e,i,r){r.getAxisProxy(e.name,i).filterData(r,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy(),i=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:r[0],endValue:r[1]})}))}})},function(e,t,i){var r=i(1),n=i(0),a=i(125);r.registerAction("dataZoom",(function(e,t){var i=a.createLinkedNodesFinder(n.bind(t.eachComponent,t,"dataZoom"),a.eachAxisDim,(function(e,t){return e.get(t.axisIndex)})),r=[];t.eachComponent({mainType:"dataZoom",query:e},(function(e,t){r.push.apply(r,i(e).nodes)})),n.each(r,(function(t,i){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(11),o=i(4),s=i(7),l=i(107),c=s.addCommas,u=s.encodeHTML;function d(e){o.defaultEmphasis(e,"label",["show"])}var h=r.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(e,t,i){this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},isAnimationEnabled:function(){if(a.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},mergeOption:function(e,t){this._mergeOption(e,t,!1,!1)},_mergeOption:function(e,t,i,r){var a=this.constructor,o=this.mainType+"Model";i||t.eachSeries((function(e){var i=e.get(this.mainType,!0),s=e[o];i&&i.data?(s?s._mergeOption(i,t,!0):(r&&d(i),n.each(i.data,(function(e){e instanceof Array?(d(e[0]),d(e[1])):d(e)})),s=new a(i,this,t),n.extend(s,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),s.__hostSeries=e),e[o]=s):e[o]=null}),this)},formatTooltip:function(e,t,i,r){var a=this.getData(),o=this.getRawValue(e),s=n.isArray(o)?n.map(o,c).join(", "):c(o),l=a.getName(e),d=u(this.name);return(null!=o||l)&&(d+="html"===r?"<br/>":"\n"),l&&(d+=u(l),null!=o&&(d+=" : ")),null!=o&&(d+=u(s)),d},getData:function(){return this._data},setData:function(e){this._data=e}});n.mixin(h,l);var p=h;e.exports=p},function(e,t,i){var r=i(0),n=i(3),a=i(25).isDimensionStacked,o=r.indexOf;function s(e,t,i,r,o,s){var l=[],c=a(t,r)?t.getCalculationInfo("stackResultDimension"):r,u=d(t,c,e),h=t.indicesOfNearest(c,u)[0];l[o]=t.get(i,h),l[s]=t.get(c,h);var p=t.get(r,h),f=n.getPrecision(t.get(r,h));return(f=Math.min(f,20))>=0&&(l[s]=+l[s].toFixed(f)),[l,p]}var l=r.curry,c={min:l(s,"min"),max:l(s,"max"),average:l(s,"average")};function u(e,t,i,r){var n={};return null!=e.valueIndex||null!=e.valueDim?(n.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,n.valueAxis=i.getAxis(function(e,t){var i=e.getData(),r=i.dimensions;t=i.getDimension(t);for(var n=0;n<r.length;n++){var a=i.getDimensionInfo(r[n]);if(a.name===t)return a.coordDim}}(r,n.valueDataDim)),n.baseAxis=i.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=r.getBaseAxis(),n.valueAxis=i.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function d(e,t,i){if("average"===i){var r=0,n=0;return e.each(t,(function(e,t){isNaN(e)||(r+=e,n++)})),r/n}return"median"===i?e.getMedian(t):e.getDataExtent(t,!0)["max"===i?1:0]}t.dataTransform=function(e,t){var i=e.getData(),n=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!r.isArray(t.coord)&&n){var a=n.dimensions,s=u(t,i,n,e);if((t=r.clone(t)).type&&c[t.type]&&s.baseAxis&&s.valueAxis){var l=o(a,s.baseAxis.dim),h=o(a,s.valueAxis.dim),p=c[t.type](i,s.baseDataDim,s.valueDataDim,l,h);t.coord=p[0],t.value=p[1]}else{for(var f=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],m=0;m<2;m++)c[f[m]]&&(f[m]=d(i,i.mapDimension(a[m]),f[m]));t.coord=f}}return t},t.getAxisInfo=u,t.dataFilter=function(e,t){return!(e&&e.containData&&t.coord&&!function(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}(t))||e.containData(t.coord)},t.dimValueGetter=function(e,t,i,r){return r<2?e.coord&&e.coord[r]:e.value},t.numCalculate=d},function(e,t,i){var r=i(1),n=i(0),a=r.extendComponentView({type:"marker",init:function(){this.markerGroupMap=n.createHashMap()},render:function(e,t,i){var r=this.markerGroupMap;r.each((function(e){e.__keep=!1}));var n=this.type+"Model";t.eachSeries((function(e){var r=e[n];r&&this.renderSeries(e,r,t,i)}),this),r.each((function(e){!e.__keep&&this.group.remove(e.group)}),this)},renderSeries:function(){}});e.exports=a},function(e,t,i){var r=i(132).createElement,n=i(50),a=i(9),o=i(15),s=i(17),l=i(82),c=i(41),u=n.CMD,d=Array.prototype.join,h=Math.round,p=Math.sin,f=Math.cos,m=Math.PI,g=2*Math.PI,y=180/m;function _(e){return h(1e4*e)/1e4}function v(e){return e<1e-4&&e>-1e-4}function C(e,t){t&&x(e,"transform","matrix("+d.call(t,",")+")")}function x(e,t,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&e.setAttribute(t,i)}function b(e,t,i,r){if(function(e,t){var i=t?e.textFill:e.fill;return null!=i&&"none"!==i}(t,i)){var n=i?t.textFill:t.fill;x(e,"fill",n="transparent"===n?"none":n),x(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else x(e,"fill","none");if(function(e,t){var i=t?e.textStroke:e.stroke;return null!=i&&"none"!==i}(t,i)){var a=i?t.textStroke:t.stroke;x(e,"stroke",a="transparent"===a?"none":a),x(e,"stroke-width",(i?t.textStrokeWidth:t.lineWidth)/(!i&&t.strokeNoScale?r.getLineScale():1)),x(e,"paint-order",i?"stroke":"fill"),x(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(x(e,"stroke-dasharray",t.lineDash.join(",")),x(e,"stroke-dashoffset",h(t.lineDashOffset||0))):x(e,"stroke-dasharray",""),t.lineCap&&x(e,"stroke-linecap",t.lineCap),t.lineJoin&&x(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&x(e,"stroke-miterlimit",t.miterLimit)}else x(e,"stroke","none")}var S={};S.brush=function(e){var t=e.style,i=e.__svgEl;i||(i=r("path"),e.__svgEl=i),e.path||e.createPathProxy();var n=e.path;if(e.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,e.buildPath(n,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],i=e.data,r=e.len(),n=0;n<r;){var a="",o=0;switch(i[n++]){case u.M:a="M",o=2;break;case u.L:a="L",o=2;break;case u.Q:a="Q",o=4;break;case u.C:a="C",o=6;break;case u.A:var s=i[n++],l=i[n++],c=i[n++],d=i[n++],C=i[n++],x=i[n++],b=i[n++],S=i[n++],T=Math.abs(x),E=v(T-g)||(S?x>=g:-x>=g),w=x>0?x%g:x%g+g,A=!1;A=!!E||!v(T)&&w>=m==!!S;var P=_(s+c*f(C)),D=_(l+d*p(C));E&&(x=S?g-1e-4:1e-4-g,A=!0,9===n&&t.push("M",P,D));var M=_(s+c*f(C+x)),I=_(l+d*p(C+x));t.push("A",_(c),_(d),h(b*y),+A,+S,M,I);break;case u.Z:a="Z";break;case u.R:M=_(i[n++]),I=_(i[n++]);var R=_(i[n++]),O=_(i[n++]);t.push("M",M,I,"L",M+R,I,"L",M+R,I+O,"L",M,I+O,"L",M,I)}a&&t.push(a);for(var L=0;L<o;L++)t.push(_(i[n++]))}return t.join(" ")}(n);a.indexOf("NaN")<0&&x(i,"d",a)}b(i,t,!1,e),C(i,e.transform),null!=t.text?M(e,e.getBoundingRect()):R(e)};var T={brush:function(e){var t=e.style,i=t.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=t.x||0,a=t.y||0,o=t.width,s=t.height,l=e.__svgEl;l||(l=r("image"),e.__svgEl=l),i!==e.__imageSrc&&(!function(e,t,i){e.setAttributeNS("http://www.w3.org/1999/xlink",t,i)}(l,"href",i),e.__imageSrc=i),x(l,"width",o),x(l,"height",s),x(l,"x",n),x(l,"y",a),C(l,e.transform),null!=t.text?M(e,e.getBoundingRect()):R(e)}}},E={},w=new a,A={},P=[],D={left:"start",right:"end",center:"middle",middle:"middle"},M=function(e,t){var i=e.style,n=e.transform,a=e instanceof c||i.transformText;e.__dirty&&l.normalizeTextStyle(i,!0);var u=i.text;if(null!=u&&(u+=""),l.needDrawText(u,i)){null==u&&(u=""),!a&&n&&(w.copy(t),w.applyTransform(n),t=w);var d=e.__textSvgEl;d||(d=r("text"),e.__textSvgEl=d);var h=d.style,p=i.font||s.DEFAULT_FONT,f=d.__computedFont;p!==d.__styleFont&&(h.font=d.__styleFont=p,f=d.__computedFont=h.font);var m=i.textPadding,g=i.textLineHeight,y=e.__textCotentBlock;y&&!e.__dirtyText||(y=e.__textCotentBlock=s.parsePlainText(u,f,m,g,i.truncate));var _=y.outerHeight,v=y.lineHeight;l.getBoxPosition(A,e,i,t);var x=A.baseX,S=A.baseY,T=A.textAlign||"left",E=A.textVerticalAlign;!function(e,t,i,r,n,a,s){o.identity(P),t&&i&&o.copy(P,i);var l=r.textRotation;if(n&&l){var c=r.textOrigin;"center"===c?(a=n.width/2+n.x,s=n.height/2+n.y):c&&(a=c[0]+n.x,s=c[1]+n.y),P[4]-=a,P[5]-=s,o.rotate(P,P,l),P[4]+=a,P[5]+=s}C(e,P)}(d,a,n,i,t,x,S);var D=x,M=s.adjustTextY(S,_,E);m&&(D=function(e,t,i){return"right"===t?e-i[1]:"center"===t?e+i[3]/2-i[1]/2:e+i[3]}(x,T,m),M+=m[0]),M+=v/2,b(d,i,!0,e);var R=y.canCacheByTextString,O=e.__tspanList||(e.__tspanList=[]),L=O.length;if(R&&e.__canCacheByTextString&&e.__text===u){if(e.__dirtyText&&L)for(var N=0;N<L;++N)I(O[N],T,D,M+N*v)}else{e.__text=u,e.__canCacheByTextString=R;var F=y.lines,B=F.length;for(N=0;N<B;N++){var V=O[N],k=F[N];V?V.__zrText!==k&&(V.innerHTML="",V.appendChild(document.createTextNode(k))):(V=O[N]=r("tspan"),d.appendChild(V),V.appendChild(document.createTextNode(k))),I(V,T,D,M+N*v)}if(L>B){for(;N<L;N++)d.removeChild(O[N]);O.length=B}}}};function I(e,t,i,r){x(e,"dominant-baseline","middle"),x(e,"text-anchor",D[t]),x(e,"x",i),x(e,"y",r)}function R(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}E.drawRectText=M,E.brush=function(e){null!=e.style.text?M(e,!1):R(e)},t.path=S,t.image=T,t.text=E},function(e,t){t.createElement=function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},function(e,t,i){var r=i(132).createElement,n=i(0),a=i(10),o=i(48),s=i(41),l=i(131),c=l.path,u=l.image,d=l.text;function h(e,t,i,r,n){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof i?[i]:i,this._markLabel=r,this._domName=n||"_dom",this.nextId=0}h.prototype.createElement=r,h.prototype.getDefs=function(e){var t=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?e?((i=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(i.contains=function(e){var t=i.children;if(!t)return!1;for(var r=t.length-1;r>=0;--r)if(t[r]===e)return!0;return!1}),i):null:i[0]},h.prototype.update=function(e,t){if(e){var i=this.getDefs(!1);if(e[this._domName]&&i.contains(e[this._domName]))"function"==typeof t&&t(e);else{var r=this.add(e);r&&(e[this._domName]=r)}}},h.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},h.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},h.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return n.each(this._tagNames,(function(i){var r=e.getElementsByTagName(i);t=t.concat([].slice.call(r))})),t},h.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;n.each(e,(function(e){e[t._markLabel]="0"}))},h.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},h.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),i=this;n.each(t,(function(t){"1"!==t[i._markLabel]&&e.removeChild(t)}))}},h.prototype.getSvgProxy=function(e){return e instanceof a?c:e instanceof o?u:e instanceof s?d:c},h.prototype.getTextSvgElement=function(e){return e.__textSvgEl},h.prototype.getSvgElement=function(e){return e.__svgEl};var p=h;e.exports=p},function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},function(e,t,i){(function(e){var r=i(244),n=i(137),a=i(253),o=i(254),s=i(97),l=t;l.request=function(t,i){t="string"==typeof t?s.parse(t):a(t);var n=-1===e.location.protocol.search(/^https?:$/)?"http:":"",o=t.protocol||n,l=t.hostname||t.host,c=t.port,u=t.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),t.url=(l?o+"//"+l:"")+(c?":"+c:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new r(t);return i&&d.on("response",i),d},l.get=function(e,t){var i=l.request(e,t);return i.end(),i},l.ClientRequest=r,l.IncomingMessage=n.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=o,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,i(16))},function(e,t,i){(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var i;function r(){if(void 0!==i)return i;if(e.XMLHttpRequest){i=new e.XMLHttpRequest;try{i.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){i=null}}else i=null;return i}function n(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var a=void 0!==e.ArrayBuffer,o=a&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||a&&n("arraybuffer"),t.msstream=!t.fetch&&o&&n("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&a&&n("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&s(r().overrideMimeType),t.vbArray=s(e.VBArray),i=null}).call(this,i(16))},function(e,t,i){(function(e,r,n){var a=i(136),o=i(31),s=i(58),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,i,o,l){var c=this;if(s.Readable.call(c),c._mode=o,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){e.nextTick((function(){c.emit("close")}))})),"fetch"===o){if(c._fetchResponse=i,c.url=i.url,c.statusCode=i.status,c.statusMessage=i.statusText,i.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),a.writableStream){var u=new WritableStream({write:function(e){return new Promise((function(t,i){c._destroyed?i():c.push(new r(e))?t():c._resumeFetch=t}))},close:function(){n.clearTimeout(l),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void i.body.pipeTo(u).catch((function(e){n.clearTimeout(l),c._destroyed||c.emit("error",e)}))}catch(e){}}var d=i.body.getReader();!function e(){d.read().then((function(t){if(!c._destroyed){if(t.done)return n.clearTimeout(l),void c.push(null);c.push(new r(t.value)),e()}})).catch((function(e){n.clearTimeout(l),c._destroyed||c.emit("error",e)}))}()}else{if(c._xhr=t,c._pos=0,c.url=t.responseURL,c.statusCode=t.status,c.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var i=t[1].toLowerCase();"set-cookie"===i?(void 0===c.headers[i]&&(c.headers[i]=[]),c.headers[i].push(t[2])):void 0!==c.headers[i]?c.headers[i]+=", "+t[2]:c.headers[i]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!a.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};o(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,i=null;switch(e._mode){case"text:vbarray":if(t.readyState!==l.DONE)break;try{i=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==i){e.push(new r(i));break}case"text":try{i=t.responseText}catch(t){e._mode="text:vbarray";break}if(i.length>e._pos){var a=i.substr(e._pos);if("x-user-defined"===e._charset){for(var o=new r(a.length),s=0;s<a.length;s++)o[s]=255&a.charCodeAt(s);e.push(o)}else e.push(a,e._charset);e._pos=i.length}break;case"arraybuffer":if(t.readyState!==l.DONE||!t.response)break;i=t.response,e.push(new r(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=t.response,t.readyState!==l.LOADING||!i)break;e.push(new r(new Uint8Array(i)));break;case"ms-stream":if(i=t.response,t.readyState!==l.LOADING)break;var c=new n.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new r(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(i)}e._xhr.readyState===l.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,i(27),i(26).Buffer,i(16))},function(e,t,i){"use strict";(function(t,r){var n=i(75);e.exports=v;var a,o=i(134);v.ReadableState=_;i(98).EventEmitter;var s=function(e,t){return e.listeners(t).length},l=i(139),c=i(76).Buffer,u=t.Uint8Array||function(){};var d=Object.create(i(59));d.inherits=i(31);var h=i(245),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var f,m=i(246),g=i(140);d.inherits(v,l);var y=["error","close","destroy","pause","resume"];function _(e,t){e=e||{};var r=t instanceof(a=a||i(38));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=i(141).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function v(e){if(a=a||i(38),!(this instanceof v))return new v(e);this._readableState=new _(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function C(e,t,i,r,n){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,S(e)}(e,o)):(n||(a=function(e,t){var i;r=t,c.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));var r;return i}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!i?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):E(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function x(e,t,i,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,r?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&S(e)),E(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var i,r=this._readableState;return r.objectMode?i=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),i=!0),C(this,e,t,!1,i)},v.prototype.unshift=function(e){return C(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return f||(f=i(141).StringDecoder),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};function b(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(T,e):T(e))}function T(e){p("emit readable"),e.emit("readable"),D(e)}function E(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(w,e,t))}function w(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}function A(e){p("readable nexttick read 0"),e.read(0)}function P(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():i?function(e,t){var i=t.head,r=1,n=i.data;e-=n.length;for(;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),0===(e-=o)){o===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=c.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,o),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1}v.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):S(this),null;if(0===(e=b(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,n=t.needReadable;return p("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",n=!0),t.ended||t.reading?p("reading or ended",n=!1):n&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=b(i,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,p("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:v;function c(t,r){p("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",y),e.removeListener("finish",_),e.removeListener("drain",d),e.removeListener("error",g),e.removeListener("unpipe",c),i.removeListener("end",u),i.removeListener("end",v),i.removeListener("data",m),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function u(){p("onend"),e.end()}a.endEmitted?n.nextTick(l):i.once("end",l),e.on("unpipe",c);var d=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,D(e))}}(i);e.on("drain",d);var h=!1;var f=!1;function m(t){p("ondata"),f=!1,!1!==e.write(t)||f||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==O(a.pipes,e))&&!h&&(p("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,f=!0),i.pause())}function g(t){p("onerror",t),v(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",_),v()}function _(){p("onfinish"),e.removeListener("close",y),v()}function v(){p("unpipe"),i.unpipe(e)}return i.on("data",m),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",g),e.once("close",y),e.once("finish",_),e.emit("pipe",i),a.flowing||(p("pipe resume"),i.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<n;a++)r[a].emit("unpipe",this,i);return this}var o=O(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i)),this},v.prototype.on=function(e,t){var i=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&S(this):n.nextTick(A,this))}return i},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(P,e,t))}(this,e)),this},v.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",(function(){if(p("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(p("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(t.push(n)||(r=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var a=0;a<y.length;a++)e.on(y[a],this.emit.bind(this,y[a]));return this._read=function(t){p("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=M}).call(this,i(16),i(27))},function(e,t,i){e.exports=i(98).EventEmitter},function(e,t,i){"use strict";var r=i(75);function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var i=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(n,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,i){"use strict";var r=i(76).Buffer,n=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,i=function(e,t,i){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==i?i:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-i))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<e.length?t?t+this.text(e,i):this.text(e,i):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var i=function(e,t,i){var r=t.length-1;if(r<i)return 0;var n=o(t[r]);if(n>=0)return n>0&&(e.lastNeed=n-1),n;if(--r<i||-2===n)return 0;if((n=o(t[r]))>=0)return n>0&&(e.lastNeed=n-2),n;if(--r<i||-2===n)return 0;if((n=o(t[r]))>=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,i){"use strict";e.exports=o;var r=i(38),n=Object.create(i(59));function a(e,t){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,null!=t&&this.push(t),r(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);r.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,i){l(e,t,i)})):l(this,null,null)}function l(e,t,i){if(t)return e.emit("error",t);if(null!=i&&e.push(i),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}n.inherits=i(31),n.inherits(o,r),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,i){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,i){var r=this._transformState;if(r.writecb=i,r.writechunk=e,r.writeencoding=t,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var i=this;r.prototype._destroy.call(this,e,(function(e){t(e),i.emit("close")}))}},function(e,t,i){"use strict";(function(t){var r=i(262);
var r=i(235),n=i(236),a=i(134);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,i){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,i)}function c(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,i,r):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!l.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|f(t,i),n=(e=s(e,r)).write(t,i);n!==r&&(e=e.slice(0,n));return e}(e,t,i):function(e,t){if(l.isBuffer(t)){var i=0|p(t.length);return 0===(e=s(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&a(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function h(e,t){var i=t.length<0?0:0|p(t.length);e=s(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return G(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,i);case"utf8":case"utf-8":return w(this,t,i);case"ascii":return A(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function y(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:_(e,t,i,r,n);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):_(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function _(e,t,i,r,n){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,i/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=i;a<s;a++)if(c(e,a)===c(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(i+l>s&&(i=s-l),a=i;a>=0;a--){for(var d=!0,h=0;h<l;h++)if(c(e,a+h)!==c(t,h)){d=!1;break}if(d)return a}return-1}function v(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function C(e,t,i,r){return U(z(t,e.length-i),e,i,r)}function x(e,t,i,r){return U(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function b(e,t,i,r){return x(e,t,i,r)}function S(e,t,i,r){return U(G(t),e,i,r)}function T(e,t,i,r){return U(function(e,t){for(var i,r,n,a=[],o=0;o<e.length&&!((t-=2)<0);++o)i=e.charCodeAt(o),r=i>>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function E(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function w(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var a,o,s,l,c=e[n],u=null,d=c>239?4:c>223?3:c>191?2:1;if(n+d<=i)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],o=e[n+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return i}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,i){return c(null,e,t,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,i){return function(e,t,i,r){return u(t),t<=0?s(e,t):void 0!==i?"string"==typeof r?s(e,t).fill(i,r):s(e,t).fill(i):s(e,t)}(null,e,t,i)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=l.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var o=e[i];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?w(this,0,e):m.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,i,r,n){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(n>>>=0)-(r>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,n),u=e.slice(t,i),d=0;d<s;++d)if(c[d]!==u[d]){a=c[d],o=u[d];break}return a<o?-1:o<a?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return y(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return y(this,e,t,i,!1)},l.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return v(this,e,t,i);case"utf8":case"utf-8":return C(this,e,t,i);case"ascii":return x(this,e,t,i);case"latin1":case"binary":return b(this,e,t,i);case"base64":return S(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function P(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function D(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",a=t;a<i;++a)n+=k(e[a]);return n}function M(e,t,i){for(var r=e.slice(t,i),n="",a=0;a<r.length;a+=2)n+=String.fromCharCode(r[a]+256*r[a+1]);return n}function I(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,i,r,n,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function O(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-i,2);n<a;++n)e[i+n]=(t&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function L(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-i,4);n<a;++n)e[i+n]=t>>>8*(r?n:3-n)&255}function N(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function F(e,t,i,r,a){return a||N(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function B(e,t,i,r,a){return a||N(e,0,i,8),n.write(e,t,i,r,52,8),i+8}l.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=l.prototype;else{var n=t-e;i=new l(n,void 0);for(var a=0;a<n;++a)i[a]=this[a+e]}return i},l.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||I(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r},l.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||I(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},l.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||I(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||I(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||R(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a<i&&(n*=256);)this[t+a]=e/n&255;return t+i},l.prototype.writeUIntBE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||R(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},l.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);R(this,e,t,i,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a<i&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},l.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);R(this,e,t,i,n-1,-n)}var a=i-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},l.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,i){return F(this,e,t,!0,i)},l.prototype.writeFloatBE=function(e,t,i){return F(this,e,t,!1,i)},l.prototype.writeDoubleLE=function(e,t,i){return B(this,e,t,!0,i)},l.prototype.writeDoubleBE=function(e,t,i){return B(this,e,t,!1,i)},l.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n,a=r-i;if(this===e&&i<t&&t<r)for(n=a-1;n>=0;--n)e[n+t]=this[n+i];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},l.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var o=l.isBuffer(e)?e:z(new l(e,r).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function k(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var i;t=t||1/0;for(var r=e.length,n=null,a=[],o=0;o<r;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function G(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}}).call(this,i(16))},function(e,t,i){var r=i(39);t.Dispatcher=r;var n=i(11),a=i(148),o=a.isCanvasEl,s=a.transformCoordWithViewport,l="undefined"!=typeof window&&!!window.addEventListener,c=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,u=[];function d(e,t,i,r){return i=i||{},r||!n.canvasSupported?h(e,t,i):n.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(i.zrX=t.layerX,i.zrY=t.layerY):null!=t.offsetX?(i.zrX=t.offsetX,i.zrY=t.offsetY):h(e,t,i),i}function h(e,t,i){if(n.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(o(e)){var l=e.getBoundingClientRect();return i.zrX=r-l.left,void(i.zrY=a-l.top)}if(s(u,e,r,a))return i.zrX=u[0],void(i.zrY=u[1])}i.zrX=i.zrY=0}function p(e){return e||window.event}var f=l?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};t.clientToLocal=d,t.getNativeEvent=p,t.normalizeEvent=function(e,t,i){if(null!=(t=p(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var n="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];n&&d(e,n,t,i)}else d(e,t,t,i),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var a=t.button;return null==t.which&&void 0!==a&&c.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t},t.addEventListener=function(e,t,i,r){l?e.addEventListener(t,i,r):e.attachEvent("on"+t,i)},t.removeEventListener=function(e,t,i,r){l?e.removeEventListener(t,i,r):e.detachEvent("on"+t,i)},t.stop=f,t.isMiddleOrRightButtonOnMouseUpDown=function(e){return 2===e.which||3===e.which},t.notLeftMouse=function(e){return e.which>1}},function(e,t,i){var r=i(151),n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function a(e){return(e=Math.round(e))<0?0:e>255?255:e}function o(e){return e<0?0:e>1?1:e}function s(e){return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100*255):a(parseInt(e,10))}function l(e){return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100):o(parseFloat(e))}function c(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function u(e,t,i){return e+(t-e)*i}function d(e,t,i,r,n){return e[0]=t,e[1]=i,e[2]=r,e[3]=n,e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var p=new r(20),f=null;function m(e,t){f&&h(f,t),f=p.put(e,f||t.slice())}function g(e,t){if(e){t=t||[];var i=p.get(e);if(i)return h(t,i);var r,a=(e+="").replace(/ /g,"").toLowerCase();if(a in n)return h(t,n[a]),m(e,t),t;if("#"===a.charAt(0))return 4===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=4095?(d(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1),m(e,t),t):void d(t,0,0,0,1):7===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=16777215?(d(t,(16711680&r)>>16,(65280&r)>>8,255&r,1),m(e,t),t):void d(t,0,0,0,1):void 0;var o=a.indexOf("("),c=a.indexOf(")");if(-1!==o&&c+1===a.length){var u=a.substr(0,o),f=a.substr(o+1,c-(o+1)).split(","),g=1;switch(u){case"rgba":if(4!==f.length)return void d(t,0,0,0,1);g=l(f.pop());case"rgb":return 3!==f.length?void d(t,0,0,0,1):(d(t,s(f[0]),s(f[1]),s(f[2]),g),m(e,t),t);case"hsla":return 4!==f.length?void d(t,0,0,0,1):(f[3]=l(f[3]),y(f,t),m(e,t),t);case"hsl":return 3!==f.length?void d(t,0,0,0,1):(y(f,t),m(e,t),t);default:return}}d(t,0,0,0,1)}}function y(e,t){var i=(parseFloat(e[0])%360+360)%360/360,r=l(e[1]),n=l(e[2]),o=n<=.5?n*(r+1):n+r-n*r,s=2*n-o;return d(t=t||[],a(255*c(s,o,i+1/3)),a(255*c(s,o,i)),a(255*c(s,o,i-1/3)),1),4===e.length&&(t[3]=e[3]),t}function _(e,t,i){if(t&&t.length&&e>=0&&e<=1){i=i||[];var r=e*(t.length-1),n=Math.floor(r),s=Math.ceil(r),l=t[n],c=t[s],d=r-n;return i[0]=a(u(l[0],c[0],d)),i[1]=a(u(l[1],c[1],d)),i[2]=a(u(l[2],c[2],d)),i[3]=o(u(l[3],c[3],d)),i}}var v=_;function C(e,t,i){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),n=Math.floor(r),s=Math.ceil(r),l=g(t[n]),c=g(t[s]),d=r-n,h=b([a(u(l[0],c[0],d)),a(u(l[1],c[1],d)),a(u(l[2],c[2],d)),o(u(l[3],c[3],d))],"rgba");return i?{color:h,leftIndex:n,rightIndex:s,value:r}:h}}var x=C;function b(e,t){if(e&&e.length){var i=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(i+=","+e[3]),t+"("+i+")"}}t.parse=g,t.lift=function(e,t){var i=g(e);if(i){for(var r=0;r<3;r++)i[r]=t<0?i[r]*(1-t)|0:(255-i[r])*t+i[r]|0,i[r]>255?i[r]=255:e[r]<0&&(i[r]=0);return b(i,4===i.length?"rgba":"rgb")}},t.toHex=function(e){var t=g(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},t.fastLerp=_,t.fastMapToColor=v,t.lerp=C,t.mapToColor=x,t.modifyHSL=function(e,t,i,r){if(e=g(e))return e=function(e){if(e){var t,i,r=e[0]/255,n=e[1]/255,a=e[2]/255,o=Math.min(r,n,a),s=Math.max(r,n,a),l=s-o,c=(s+o)/2;if(0===l)t=0,i=0;else{i=c<.5?l/(s+o):l/(2-s-o);var u=((s-r)/6+l/2)/l,d=((s-n)/6+l/2)/l,h=((s-a)/6+l/2)/l;r===s?t=h-d:n===s?t=1/3+u-h:a===s&&(t=2/3+d-u),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,i,c];return null!=e[3]&&p.push(e[3]),p}}(e),null!=t&&(e[0]=(n=t,(n=Math.round(n))<0?0:n>360?360:n)),null!=i&&(e[1]=l(i)),null!=r&&(e[2]=l(r)),b(y(e),"rgba");var n},t.modifyAlpha=function(e,t){if((e=g(e))&&null!=t)return e[3]=o(t),b(e,"rgba")},t.stringify=b},function(e,t,i){var r=i(0).each,n=i(40),a=i(63),o=i(28),s=i(4),l=i(2),c=i(108).createTask,u=i(51),d=s.makeInner(),h=u();function p(){this.group=new n,this.uid=a.getUID("viewChart"),this.renderTask=c({plan:y,reset:_}),this.renderTask.context={view:this}}p.prototype={type:"chart",init:function(e,t){},render:function(e,t,i,r){},highlight:function(e,t,i,r){g(e.getData(),r,"emphasis")},downplay:function(e,t,i,r){g(e.getData(),r,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var f=p.prototype;function m(e,t,i){if(e&&(e.trigger(t,i),e.isGroup&&!l.isHighDownDispatcher(e)))for(var r=0,n=e.childCount();r<n;r++)m(e.childAt(r),t,i)}function g(e,t,i){var n=s.queryDataIndex(e,t),a=t&&null!=t.highlightKey?l.getHighlightDigit(t.highlightKey):null;null!=n?r(s.normalizeToArray(n),(function(t){m(e.getItemGraphicEl(t),i,a)})):e.eachItemGraphicEl((function(e){m(e,i,a)}))}function y(e){return h(e.model)}function _(e){var t=e.model,i=e.ecModel,r=e.api,n=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=n&&d(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,i,r,n),v[l]}f.updateView=f.updateLayout=f.updateVisual=function(e,t,i,r){this.render(e,t,i,r)},o.enableClassExtend(p,["dispose"]),o.enableClassManagement(p,{registerWhenExtend:!0}),p.markUpdateMethod=function(e,t){d(e).updateMethod=t};var v={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},C=p;e.exports=C},function(e,t,i){var r=i(0),n=r.each,a=r.isString;function o(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}t.enableDataStack=function(e,t,i){var r,o,s,l,c=(i=i||{}).byIndex,u=i.stackedCoordDimension,d=!(!e||!e.get("stack"));if(n(t,(function(e,i){a(e)&&(t[i]=e={name:e}),d&&!e.isExtraCoord&&(c||r||!e.ordinalMeta||(r=e),o||"ordinal"===e.type||"time"===e.type||u&&u!==e.coordDim||(o=e))})),!o||c||r||(c=!0),o){s="__\0ecstackresult",l="__\0ecstackedover",r&&(r.createInvertedIndices=!0);var h=o.coordDim,p=o.type,f=0;n(t,(function(e){e.coordDim===h&&f++})),t.push({name:s,coordDim:h,coordDimIndex:f,type:p,isExtraCoord:!0,isCalculationCoord:!0}),f++,t.push({name:l,coordDim:l,coordDimIndex:f,type:p,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:r&&r.name,isStackedByIndex:c,stackedOverDimension:l,stackResultDimension:s}},t.isDimensionStacked=o,t.getStackedDimension=function(e,t){return o(e,t)?e.getCalculationInfo("stackResultDimension"):t}},function(e,t){var i,r,n=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(i===setTimeout)return setTimeout(e,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(e){i=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=s(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];c.push(new f(e,t)),1!==c.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,i){i(5).__DEV__;var r=i(0),n="___EC__COMPONENT__CONTAINER___";function a(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var o=0;function s(e,t){var i=r.slice(arguments,2);return this.superClass.prototype[t].apply(e,i)}function l(e,t,i){return this.superClass.prototype[t].apply(e,i)}t.parseClassType=a,t.enableClassExtend=function(e,t){e.$constructor=e,e.extend=function(e){var t=this,i=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return r.extend(i.prototype,e),i.extend=this.extend,i.superCall=s,i.superApply=l,r.inherits(i,this),i.superClass=t,i}},t.enableClassCheck=function(e){var t=["__\0is_clz",o++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},t.enableClassManagement=function(e,t){t=t||{};var i={};if(e.registerClass=function(e,t){if(t)if(function(e){r.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=a(t)).sub){if(t.sub!==n){(function(e){var t=i[e.main];t&&t[n]||((t=i[e.main]={})[n]=!0);return t}(t))[t.sub]=e}}else i[t.main]=e;return e},e.getClass=function(e,t,r){var a=i[e];if(a&&a[n]&&(a=t?a[t]:null),r&&!a)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return a},e.getClassesByMainType=function(e){e=a(e);var t=[],o=i[e.main];return o&&o[n]?r.each(o,(function(e,i){i!==n&&t.push(e)})):t.push(o),t},e.hasClass=function(e){return e=a(e),!!i[e.main]},e.getAllClassMainTypes=function(){var e=[];return r.each(i,(function(t,i){e.push(i)})),e},e.hasSubTypes=function(e){e=a(e);var t=i[e.main];return t&&t[n]},e.parseClassType=a,t.registerWhenExtend){var o=e.extend;o&&(e.extend=function(t){var i=o.call(this,t);return e.registerClass(i,t.type)})}return e},t.setReadOnly=function(e,t){}},function(e,t,i){i(5).__DEV__;var r=i(4),n=r.makeInner,a=r.getDataItemValue,o=i(0),s=o.createHashMap,l=o.each,c=o.map,u=o.isArray,d=o.isString,h=o.isObject,p=o.isTypedArray,f=o.isArrayLike,m=o.extend,g=(o.assert,i(64)),y=i(65),_=y.SOURCE_FORMAT_ORIGINAL,v=y.SOURCE_FORMAT_ARRAY_ROWS,C=y.SOURCE_FORMAT_OBJECT_ROWS,x=y.SOURCE_FORMAT_KEYED_COLUMNS,b=y.SOURCE_FORMAT_UNKNOWN,S=y.SOURCE_FORMAT_TYPED_ARRAY,T=y.SERIES_LAYOUT_BY_ROW,E={Must:1,Might:2,Not:3},w=n();function A(e){if(e){var t=s();return c(e,(function(e,i){if(null==(e=m({},h(e)?e:{name:e})).name)return e;e.name+="",null==e.displayName&&(e.displayName=e.name);var r=t.get(e.name);return r?e.name+="-"+r.count++:t.set(e.name,{count:1}),e}))}}function P(e,t,i,r){if(null==r&&(r=1/0),t===T)for(var n=0;n<i.length&&n<r;n++)e(i[n]?i[n][0]:null,n);else{var a=i[0]||[];for(n=0;n<a.length&&n<r;n++)e(a[n],n)}}function D(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function M(e,t,i,r,n,o){var s,l,c;if(p(e))return E.Not;if(r){var f=r[o];h(f)?(l=f.name,c=f.type):d(f)&&(l=f)}if(null!=c)return"ordinal"===c?E.Must:E.Not;if(t===v)if(i===T){for(var m=e[o],g=0;g<(m||[]).length&&g<5;g++)if(null!=(s=w(m[n+g])))return s}else for(g=0;g<e.length&&g<5;g++){var y=e[n+g];if(y&&null!=(s=w(y[o])))return s}else if(t===C){if(!l)return E.Not;for(g=0;g<e.length&&g<5;g++){if((b=e[g])&&null!=(s=w(b[l])))return s}}else if(t===x){if(!l)return E.Not;if(!(m=e[l])||p(m))return E.Not;for(g=0;g<m.length&&g<5;g++)if(null!=(s=w(m[g])))return s}else if(t===_)for(g=0;g<e.length&&g<5;g++){var b=e[g],S=a(b);if(!u(S))return E.Not;if(null!=(s=w(S[o])))return s}function w(e){var t=d(e);return null!=e&&isFinite(e)&&""!==e?t?E.Might:E.Not:t&&"-"!==e?E.Must:void 0}return E.Not}t.BE_ORDINAL=E,t.detectSourceFormat=function(e){var t=e.option.source,i=b;if(p(t))i=S;else if(u(t)){0===t.length&&(i=v);for(var r=0,n=t.length;r<n;r++){var a=t[r];if(null!=a){if(u(a)){i=v;break}if(h(a)){i=C;break}}}}else if(h(t)){for(var o in t)if(t.hasOwnProperty(o)&&f(t[o])){i=x;break}}else if(null!=t)throw new Error("Invalid data");w(e).sourceFormat=i},t.getSource=function(e){return w(e).source},t.resetSourceDefaulter=function(e){w(e).datasetMap=s()},t.prepareSource=function(e){var t=e.option,i=t.data,r=p(i)?S:_,n=!1,o=t.seriesLayoutBy,s=t.sourceHeader,c=t.dimensions,h=D(e);if(h){var f=h.option;i=f.source,r=w(h).sourceFormat,n=!0,o=o||f.seriesLayoutBy,null==s&&(s=f.sourceHeader),c=c||f.dimensions}var m=function(e,t,i,r,n){if(!e)return{dimensionsDefine:A(n)};var o,s;if(t===v)"auto"===r||null==r?P((function(e){null!=e&&"-"!==e&&(d(e)?null==s&&(s=1):s=0)}),i,e,10):s=r?1:0,n||1!==s||(n=[],P((function(e,t){n[t]=null!=e?e:""}),i,e)),o=n?n.length:i===T?e.length:e[0]?e[0].length:null;else if(t===C)n||(n=function(e){var t,i=0;for(;i<e.length&&!(t=e[i++]););if(t){var r=[];return l(t,(function(e,t){r.push(t)})),r}}(e));else if(t===x)n||(n=[],l(e,(function(e,t){n.push(t)})));else if(t===_){var c=a(e[0]);o=u(c)&&c.length||1}return{startIndex:s,dimensionsDefine:A(n),dimensionsDetectCount:o}}(i,r,o,s,c);w(e).source=new g({data:i,fromDataset:n,seriesLayoutBy:o,sourceFormat:r,dimensionsDefine:m.dimensionsDefine,startIndex:m.startIndex,dimensionsDetectCount:m.dimensionsDetectCount,encodeDefine:t.encode})},t.makeSeriesEncodeForAxisCoordSys=function(e,t,i){var r={},n=D(t);if(!n||!e)return r;var a,o,s=[],c=[],u=t.ecModel,d=w(u).datasetMap,p=n.uid+"_"+i.seriesLayoutBy;e=e.slice(),l(e,(function(t,i){!h(t)&&(e[i]={name:t}),"ordinal"===t.type&&null==a&&(a=i,o=g(e[i])),r[t.name]=[]}));var f=d.get(p)||d.set(p,{categoryWayDim:o,valueWayDim:0});function m(e,t,i){for(var r=0;r<i;r++)e.push(t+r)}function g(e){var t=e.dimsDef;return t?t.length:1}return l(e,(function(e,t){var i=e.name,n=g(e);if(null==a){var o=f.valueWayDim;m(r[i],o,n),m(c,o,n),f.valueWayDim+=n}else if(a===t)m(r[i],0,n),m(s,0,n);else{o=f.categoryWayDim;m(r[i],o,n),m(c,o,n),f.categoryWayDim+=n}})),s.length&&(r.itemName=s),c.length&&(r.seriesName=c),r},t.makeSeriesEncodeForNameBased=function(e,t,i){var r={};if(!D(e))return r;var n,a=t.sourceFormat,o=t.dimensionsDefine;a!==C&&a!==x||l(o,(function(e,t){"name"===(h(e)?e.name:e)&&(n=t)}));var s=function(){for(var e={},r={},s=[],l=0,c=Math.min(5,i);l<c;l++){var u=M(t.data,a,t.seriesLayoutBy,o,t.startIndex,l);s.push(u);var d=u===E.Not;if(d&&null==e.v&&l!==n&&(e.v=l),(null==e.n||e.n===e.v||!d&&s[e.n]===E.Not)&&(e.n=l),h(e)&&s[e.n]!==E.Not)return e;d||(u===E.Might&&null==r.v&&l!==n&&(r.v=l),null!=r.n&&r.n!==r.v||(r.n=l))}function h(e){return null!=e.v&&null!=e.n}return h(e)?e:h(r)?r:null}();if(s){r.value=s.v;var c=null!=n?n:s.n;r.itemName=[c],r.seriesName=[c]}return r},t.guessOrdinal=function(e,t){return M(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},function(e,t,i){var r=i(0),n=i(18),a=i(52),o=i(65).SOURCE_FORMAT_ORIGINAL,s=i(66).getDimensionTypeByAxis,l=i(4).getDataItemValue,c=i(20),u=i(318).getCoordSysInfoBySeries,d=i(64),h=i(26).enableDataStack,p=i(29).makeSeriesEncodeForAxisCoordSys;var f=function(e,t,i){i=i||{},d.isInstance(e)||(e=d.seriesDataToSource(e));var f,m=t.get("coordinateSystem"),g=c.get(m),y=u(t);y&&(f=r.map(y.coordSysDims,(function(e){var t={name:e},i=y.axisMap.get(e);if(i){var r=i.get("type");t.type=s(r)}return t}))),f||(f=g&&(g.getDimensionsInfo?g.getDimensionsInfo():g.dimensions.slice())||["x","y"]);var _,v,C=a(e,{coordDimensions:f,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?r.curry(p,f,t):null});y&&r.each(C,(function(e,t){var i=e.coordDim,r=y.categoryAxisMap.get(i);r&&(null==_&&(_=t),e.ordinalMeta=r.getOrdinalMeta()),null!=e.otherDims.itemName&&(v=!0)})),v||null==_||(C[_].otherDims.itemName=0);var x=h(t,C),b=new n(C,t);b.setCalculationInfo(x);var S=null!=_&&function(e){if(e.sourceFormat===o){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!r.isArray(l(t))}}(e)?function(e,t,i,r){return r===_?i:this.defaultDimValueGetter(e,t,i,r)}:null;return b.hasItemOption=!1,b.initData(e,null,S),b};e.exports=f},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},function(e,t,i){var r=i(8),n=r.create,a=r.distSquare,o=Math.pow,s=Math.sqrt,l=s(3),c=n(),u=n(),d=n();function h(e){return e>-1e-8&&e<1e-8}function p(e){return e>1e-8||e<-1e-8}function f(e,t,i,r,n){var a=1-n;return a*a*(a*e+3*n*t)+n*n*(n*r+3*a*i)}function m(e,t,i,r){var n=1-r;return n*(n*e+2*r*t)+r*r*i}t.cubicAt=f,t.cubicDerivativeAt=function(e,t,i,r,n){var a=1-n;return 3*(((t-e)*a+2*(i-t)*n)*a+(r-i)*n*n)},t.cubicRootAt=function(e,t,i,r,n,a){var c=r+3*(t-i)-e,u=3*(i-2*t+e),d=3*(t-e),p=e-n,f=u*u-3*c*d,m=u*d-9*c*p,g=d*d-3*u*p,y=0;if(h(f)&&h(m)){if(h(u))a[0]=0;else(P=-d/u)>=0&&P<=1&&(a[y++]=P)}else{var _=m*m-4*f*g;if(h(_)){var v=m/f,C=-v/2;(P=-u/c+v)>=0&&P<=1&&(a[y++]=P),C>=0&&C<=1&&(a[y++]=C)}else if(_>0){var x=s(_),b=f*u+1.5*c*(-m+x),S=f*u+1.5*c*(-m-x);(P=(-u-((b=b<0?-o(-b,1/3):o(b,1/3))+(S=S<0?-o(-S,1/3):o(S,1/3))))/(3*c))>=0&&P<=1&&(a[y++]=P)}else{var T=(2*f*u-3*c*m)/(2*s(f*f*f)),E=Math.acos(T)/3,w=s(f),A=Math.cos(E),P=(-u-2*w*A)/(3*c),D=(C=(-u+w*(A+l*Math.sin(E)))/(3*c),(-u+w*(A-l*Math.sin(E)))/(3*c));P>=0&&P<=1&&(a[y++]=P),C>=0&&C<=1&&(a[y++]=C),D>=0&&D<=1&&(a[y++]=D)}}return y},t.cubicExtrema=function(e,t,i,r,n){var a=6*i-12*t+6*e,o=9*t+3*r-3*e-9*i,l=3*t-3*e,c=0;if(h(o)){if(p(a))(d=-l/a)>=0&&d<=1&&(n[c++]=d)}else{var u=a*a-4*o*l;if(h(u))n[0]=-a/(2*o);else if(u>0){var d,f=s(u),m=(-a-f)/(2*o);(d=(-a+f)/(2*o))>=0&&d<=1&&(n[c++]=d),m>=0&&m<=1&&(n[c++]=m)}}return c},t.cubicSubdivide=function(e,t,i,r,n,a){var o=(t-e)*n+e,s=(i-t)*n+t,l=(r-i)*n+i,c=(s-o)*n+o,u=(l-s)*n+s,d=(u-c)*n+c;a[0]=e,a[1]=o,a[2]=c,a[3]=d,a[4]=d,a[5]=u,a[6]=l,a[7]=r},t.cubicProjectPoint=function(e,t,i,r,n,o,l,h,p,m,g){var y,_,v,C,x,b=.005,S=1/0;c[0]=p,c[1]=m;for(var T=0;T<1;T+=.05)u[0]=f(e,i,n,l,T),u[1]=f(t,r,o,h,T),(C=a(c,u))<S&&(y=T,S=C);S=1/0;for(var E=0;E<32&&!(b<1e-4);E++)_=y-b,v=y+b,u[0]=f(e,i,n,l,_),u[1]=f(t,r,o,h,_),C=a(u,c),_>=0&&C<S?(y=_,S=C):(d[0]=f(e,i,n,l,v),d[1]=f(t,r,o,h,v),x=a(d,c),v<=1&&x<S?(y=v,S=x):b*=.5);return g&&(g[0]=f(e,i,n,l,y),g[1]=f(t,r,o,h,y)),s(S)},t.quadraticAt=m,t.quadraticDerivativeAt=function(e,t,i,r){return 2*((1-r)*(t-e)+r*(i-t))},t.quadraticRootAt=function(e,t,i,r,n){var a=e-2*t+i,o=2*(t-e),l=e-r,c=0;if(h(a)){if(p(o))(d=-l/o)>=0&&d<=1&&(n[c++]=d)}else{var u=o*o-4*a*l;if(h(u))(d=-o/(2*a))>=0&&d<=1&&(n[c++]=d);else if(u>0){var d,f=s(u),m=(-o-f)/(2*a);(d=(-o+f)/(2*a))>=0&&d<=1&&(n[c++]=d),m>=0&&m<=1&&(n[c++]=m)}}return c},t.quadraticExtremum=function(e,t,i){var r=e+i-2*t;return 0===r?.5:(e-t)/r},t.quadraticSubdivide=function(e,t,i,r,n){var a=(t-e)*r+e,o=(i-t)*r+t,s=(o-a)*r+a;n[0]=e,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=i},t.quadraticProjectPoint=function(e,t,i,r,n,o,l,h,p){var f,g=.005,y=1/0;c[0]=l,c[1]=h;for(var _=0;_<1;_+=.05){u[0]=m(e,i,n,_),u[1]=m(t,r,o,_),(b=a(c,u))<y&&(f=_,y=b)}y=1/0;for(var v=0;v<32&&!(g<1e-4);v++){var C=f-g,x=f+g;u[0]=m(e,i,n,C),u[1]=m(t,r,o,C);var b=a(u,c);if(C>=0&&b<y)f=C,y=b;else{d[0]=m(e,i,n,x),d[1]=m(t,r,o,x);var S=a(d,c);x<=1&&S<y?(f=x,y=S):g*=.5}}return p&&(p[0]=m(e,i,n,f),p[1]=m(t,r,o,f)),s(y)}},function(e,t){var i="\0__throttleOriginMethod",r="\0__throttleRate";function n(e,t,i){var r,n,a,o,s,l=0,c=0,u=null;function d(){c=(new Date).getTime(),u=null,e.apply(a,o||[])}t=t||0;var h=function(){r=(new Date).getTime(),a=this,o=arguments;var e=s||t,h=s||i;s=null,n=r-(h?l:c)-e,clearTimeout(u),h?u=setTimeout(d,e):n>=0?d():u=setTimeout(d,-n),l=r};return h.clear=function(){u&&(clearTimeout(u),u=null)},h.debounceNextCall=function(e){s=e},h}t.throttle=n,t.createOrUpdate=function(e,t,a,o){var s=e[t];if(s){var l=s[i]||s,c=s["\0__throttleType"];if(s[r]!==a||c!==o){if(null==a||!o)return e[t]=l;(s=e[t]=n(l,a,"debounce"===o))[i]=l,s["\0__throttleType"]=o,s[r]=a}return s}},t.clear=function(e,t){var r=e[t];r&&r[i]&&(e[t]=r[i])}},function(e,t){e.exports={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}}},function(e,t,i){var r=i(0),n=r.each,a=r.map,o=i(3),s=o.linearMap,l=o.getPixelPrecision,c=o.round,u=i(321),d=u.createAxisTicks,h=u.createAxisLabels,p=u.calculateCategoryInterval,f=[0,1],m=function(e,t,i){this.dim=e,this.scale=t,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function g(e,t){var i=(e[1]-e[0])/t/2;e[0]+=i,e[1]-=i}m.prototype={constructor:m,contain:function(e){var t=this._extent,i=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=i&&e<=r},containData:function(e){return this.scale.contain(e)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(e){return l(e||this.scale.getExtent(),this._extent)},setExtent:function(e,t){var i=this._extent;i[0]=e,i[1]=t},dataToCoord:function(e,t){var i=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&g(i=i.slice(),r.count()),s(e,f,i,t)},coordToData:function(e,t){var i=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&g(i=i.slice(),r.count());var n=s(e,i,f,t);return this.scale.scale(n)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),i=d(this,t).ticks,r=a(i,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,i,r){var a=t.length;if(!e.onBand||i||!a)return;var o,s,l=e.getExtent();if(1===a)t[0].coord=l[0],o=t[1]={coord:l[0]};else{var u=t[a-1].tickValue-t[0].tickValue,d=(t[a-1].coord-t[0].coord)/u;n(t,(function(e){e.coord-=d/2}));var h=e.scale.getExtent();s=1+h[1]-t[a-1].tickValue,o={coord:t[a-1].coord+d*s},t.push(o)}var p=l[0]>l[1];f(t[0].coord,l[0])&&(r?t[0].coord=l[0]:t.shift());r&&f(l[0],t[0].coord)&&t.unshift({coord:l[0]});f(l[1],o.coord)&&(r?o.coord=l[1]:t.pop());r&&f(o.coord,l[1])&&t.push({coord:l[1]});function f(e,t){return e=c(e),t=c(t),p?e>t:e<t}}(this,r,t.get("alignWithLabel"),e.clamp),r},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");e>0&&e<100||(e=5);var t=this.scale.getMinorTicks(e);return a(t,(function(e){return a(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return h(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);0===i&&(i=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return p(this)}};var y=m;e.exports=y},function(e,t,i){var r=i(0),n=r.retrieve,a=r.defaults,o=r.extend,s=r.each,l=i(7),c=i(2),u=i(12),d=i(3),h=d.isRadianAroundZero,p=d.remRadian,f=i(19).createSymbol,m=i(15),g=i(8).applyTransform,y=i(21).shouldShowAllLabels,_=Math.PI,v=function(e,t){this.opt=t,this.axisModel=e,a(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new c.Group;var i=new c.Group({position:t.position.slice(),rotation:t.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};v.prototype={constructor:v,hasBuilder:function(e){return!!C[e]},add:function(e){C[e].call(this)},getGroup:function(){return this.group}};var C={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),r=this._transform,n=[i[0],0],a=[i[1],0];r&&(g(n,n,r),g(a,a,r));var l=o({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new c.Line({anid:"line",subPixelOptimize:!0,shape:{x1:n[0],y1:n[1],x2:a[0],y2:a[1]},style:l,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1}));var u=t.get("axisLine.symbol"),d=t.get("axisLine.symbolSize"),h=t.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=u){"string"==typeof u&&(u=[u,u]),"string"!=typeof d&&"number"!=typeof d||(d=[d,d]);var p=d[0],m=d[1];s([{rotate:e.rotation+Math.PI/2,offset:h[0],r:0},{rotate:e.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((n[0]-a[0])*(n[0]-a[0])+(n[1]-a[1])*(n[1]-a[1]))}],(function(t,i){if("none"!==u[i]&&null!=u[i]){var r=f(u[i],-p/2,-m/2,p,m,l.stroke,!0),a=t.r+t.offset,o=[n[0]+a*Math.cos(e.rotation),n[1]-a*Math.sin(e.rotation)];r.attr({rotation:t.rotate,position:o,silent:!0,z2:11}),this.group.add(r)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,i=function(e,t,i){var r=t.axis,n=t.getModel("axisTick");if(!n.get("show")||r.scale.isBlank())return;for(var o=n.getModel("lineStyle"),s=i.tickDirection*n.get("length"),l=A(r.getTicksCoords(),e._transform,s,a(o.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}),"ticks"),c=0;c<l.length;c++)e.group.add(l[c]);return l}(this,e,t),r=function(e,t,i){var r=t.axis;if(!n(i.axisLabelShow,t.get("axisLabel.show"))||r.scale.isBlank())return;var a=t.getModel("axisLabel"),o=a.get("margin"),l=r.getViewLabels(),d=(n(i.labelRotate,a.get("rotate"))||0)*_/180,h=b(i.rotation,d,i.labelDirection),p=t.getCategories&&t.getCategories(!0),f=[],m=S(t),g=t.get("triggerEvent");return s(l,(function(n,s){var l=n.tickValue,d=n.formattedLabel,y=n.rawLabel,_=a;p&&p[l]&&p[l].textStyle&&(_=new u(p[l].textStyle,a,t.ecModel));var v=_.getTextColor()||t.get("axisLine.lineStyle.color"),C=[r.dataToCoord(l),i.labelOffset+i.labelDirection*o],b=new c.Text({anid:"label_"+l,position:C,rotation:h.rotation,silent:m,z2:10});c.setTextStyle(b.style,_,{text:d,textAlign:_.getShallow("align",!0)||h.textAlign,textVerticalAlign:_.getShallow("verticalAlign",!0)||_.getShallow("baseline",!0)||h.textVerticalAlign,textFill:"function"==typeof v?v("category"===r.type?y:"value"===r.type?l+"":l,s):v}),g&&(b.eventData=x(t),b.eventData.targetType="axisLabel",b.eventData.value=y),e._dumbGroup.add(b),b.updateTransform(),f.push(b),e.group.add(b),b.decomposeTransform()})),f}(this,e,t);!function(e,t,i){if(y(e.axis))return;var r=e.get("axisLabel.showMinLabel"),n=e.get("axisLabel.showMaxLabel");i=i||[];var a=(t=t||[])[0],o=t[1],s=t[t.length-1],l=t[t.length-2],c=i[0],u=i[1],d=i[i.length-1],h=i[i.length-2];!1===r?(T(a),T(c)):E(a,o)&&(r?(T(o),T(u)):(T(a),T(c)));!1===n?(T(s),T(d)):E(l,s)&&(n?(T(l),T(h)):(T(s),T(d)))}(e,r,i),function(e,t,i){var r=t.axis,n=t.getModel("minorTick");if(!n.get("show")||r.scale.isBlank())return;var o=r.getMinorTicksCoords();if(!o.length)return;for(var s=n.getModel("lineStyle"),l=i.tickDirection*n.get("length"),c=a(s.getLineStyle(),a(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<o.length;u++)for(var d=A(o[u],e._transform,l,c,"minorticks_"+u),h=0;h<d.length;h++)e.group.add(d[h])}(this,e,t)},axisName:function(){var e=this.opt,t=this.axisModel,i=n(e.axisName,t.get("name"));if(i){var r,a,s=t.get("nameLocation"),u=e.nameDirection,d=t.getModel("nameTextStyle"),f=t.get("nameGap")||0,m=this.axisModel.axis.getExtent(),g=m[0]>m[1]?-1:1,y=["start"===s?m[0]-g*f:"end"===s?m[1]+g*f:(m[0]+m[1])/2,w(s)?e.labelOffset+u*f:0],v=t.get("nameRotate");null!=v&&(v=v*_/180),w(s)?r=b(e.rotation,null!=v?v:e.rotation,u):(r=function(e,t,i,r){var n,a,o=p(i-e.rotation),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;h(o-_/2)?(a=l?"bottom":"top",n="center"):h(o-1.5*_)?(a=l?"top":"bottom",n="center"):(a="middle",n=o<1.5*_&&o>_/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:n,textVerticalAlign:a}}(e,s,v||0,m),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(r.rotation)),!isFinite(a)&&(a=null)));var C=d.getFont(),T=t.get("nameTruncate",!0)||{},E=T.ellipsis,A=n(e.nameTruncateMaxWidth,T.maxWidth,a),P=null!=E&&null!=A?l.truncateText(i,A,C,E,{minChar:2,placeholder:T.placeholder}):i,D=t.get("tooltip",!0),M=t.mainType,I={componentType:M,name:i,$vars:["name"]};I[M+"Index"]=t.componentIndex;var R=new c.Text({anid:"name",__fullText:i,__truncatedText:P,position:y,rotation:r.rotation,silent:S(t),z2:1,tooltip:D&&D.show?o({content:i,formatter:function(){return i},formatterParams:I},D):null});c.setTextStyle(R.style,d,{text:P,textFont:C,textFill:d.getTextColor()||t.get("axisLine.lineStyle.color"),textAlign:d.get("align")||r.textAlign,textVerticalAlign:d.get("verticalAlign")||r.textVerticalAlign}),t.get("triggerEvent")&&(R.eventData=x(t),R.eventData.targetType="axisName",R.eventData.name=i),this._dumbGroup.add(R),R.updateTransform(),this.group.add(R),R.decomposeTransform()}}},x=v.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},b=v.innerTextLayout=function(e,t,i){var r,n,a=p(t-e);return h(a)?(n=i>0?"top":"bottom",r="center"):h(a-_)?(n=i>0?"bottom":"top",r="center"):(n="middle",r=a>0&&a<_?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:r,textVerticalAlign:n}};var S=v.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function T(e){e&&(e.ignore=!0)}function E(e,t,i){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(r&&n){var a=m.identity([]);return m.rotate(a,a,-e.rotation),r.applyTransform(m.mul([],a,e.getLocalTransform())),n.applyTransform(m.mul([],a,t.getLocalTransform())),r.intersect(n)}}function w(e){return"middle"===e||"center"===e}function A(e,t,i,r,n){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=i,t&&(g(o,o,t),g(s,s,t));var d=new c.Line({anid:n+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,silent:!0});a.push(d)}return a}var P=v;e.exports=P},function(e,t){var i={};t.register=function(e,t){i[e]=t},t.get=function(e){return i[e]}},function(e,t,i){"use strict";var r=i(75),n=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};e.exports=d;var a=Object.create(i(59));a.inherits=i(31);var o=i(138),s=i(99);a.inherits(d,o);for(var l=n(s.prototype),c=0;c<l.length;c++){var u=l[c];d.prototype[u]||(d.prototype[u]=s.prototype[u])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t){var i=Array.prototype.slice,r=function(e){this._$handlers={},this._$eventProcessor=e};function n(e,t,i,r,n,a){var o=e._$handlers;if("function"==typeof i&&(n=r,r=i,i=null),!r||!t)return e;i=function(e,t){var i=e._$eventProcessor;return null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),t}(e,i),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===r)return e;var l={h:r,one:a,query:i,ctx:n||e,callAtLast:r.zrEventfulCallAtLast},c=o[t].length-1,u=o[t][c];return u&&u.callAtLast?o[t].splice(c,0,l):o[t].push(l),e}r.prototype={constructor:r,one:function(e,t,i,r){return n(this,e,t,i,r,!0)},on:function(e,t,i,r){return n(this,e,t,i,r,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var i=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(i[e]){for(var r=[],n=0,a=i[e].length;n<a;n++)i[e][n].h!==t&&r.push(i[e][n]);i[e]=r}i[e]&&0===i[e].length&&delete i[e]}else delete i[e];return this},trigger:function(e){var t=this._$handlers[e],r=this._$eventProcessor;if(t){var n=arguments,a=n.length;a>3&&(n=i.call(n,1));for(var o=t.length,s=0;s<o;){var l=t[s];if(r&&r.filter&&null!=l.query&&!r.filter(e,l.query))s++;else{switch(a){case 1:l.h.call(l.ctx);break;case 2:l.h.call(l.ctx,n[1]);break;case 3:l.h.call(l.ctx,n[1],n[2]);break;default:l.h.apply(l.ctx,n)}l.one?(t.splice(s,1),o--):s++}}}return r&&r.afterTrigger&&r.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],r=this._$eventProcessor;if(t){var n=arguments,a=n.length;a>4&&(n=i.call(n,1,n.length-1));for(var o=n[n.length-1],s=t.length,l=0;l<s;){var c=t[l];if(r&&r.filter&&null!=c.query&&!r.filter(e,c.query))l++;else{switch(a){case 1:c.h.call(o);break;case 2:c.h.call(o,n[1]);break;case 3:c.h.call(o,n[1],n[2]);break;default:c.h.apply(o,n)}c.one?(t.splice(l,1),s--):l++}}}return r&&r.afterTrigger&&r.afterTrigger(e),this}};var a=r;e.exports=a},function(e,t,i){var r=i(0),n=i(149),a=i(9),o=function(e){for(var t in e=e||{},n.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};o.prototype={constructor:o,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,i=0;i<t.length;i++)if(t[i].name===e)return t[i]},childCount:function(){return this._children.length},add:function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},addBefore:function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var i=this._children,r=i.indexOf(t);r>=0&&(i.splice(r,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,i=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof o&&e.addChildrenToStorage(t)),i&&i.refresh()},remove:function(e){var t=this.__zr,i=this.__storage,n=this._children,a=r.indexOf(n,e);return a<0||(n.splice(a,1),e.parent=null,i&&(i.delFromStorage(e),e instanceof o&&e.delChildrenFromStorage(i)),t&&t.refresh()),this},removeAll:function(){var e,t,i=this._children,r=this.__storage;for(t=0;t<i.length;t++)e=i[t],r&&(r.delFromStorage(e),e instanceof o&&e.delChildrenFromStorage(r)),e.parent=null;return i.length=0,this},eachChild:function(e,t){for(var i=this._children,r=0;r<i.length;r++){var n=i[r];e.call(t,n,r)}return this},traverse:function(e,t){for(var i=0;i<this._children.length;i++){var r=this._children[i];e.call(t,r),"group"===r.type&&r.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.addToStorage(i),i instanceof o&&i.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.delFromStorage(i),i instanceof o&&i.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,i=new a(0,0,0,0),r=e||this._children,n=[],o=0;o<r.length;o++){var s=r[o];if(!s.ignore&&!s.invisible){var l=s.getBoundingRect(),c=s.getLocalTransform(n);c?(i.copy(l),i.applyTransform(c),(t=t||i.clone()).union(i)):(t=t||l.clone()).union(l)}}return t||i}},r.inherits(o,n);var s=o;e.exports=s},function(e,t,i){var r=i(61),n=i(0),a=i(17),o=i(81),s=i(80).ContextCachedBy,l=function(e){r.call(this,e)};l.prototype={constructor:l,type:"text",brush:function(e,t){var i=this.style;this.__dirty&&o.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var r=i.text;null!=r&&(r+=""),o.needDrawText(r,i)?(this.setTransform(e),o.renderText(this,e,r,i,null,t),this.restoreTransform(e)):e.__attrCachedBy=s.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&o.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var i=a.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(i.x+=e.x||0,i.y+=e.y||0,o.getStroke(e.textStroke,e.textStrokeWidth)){var r=e.textStrokeWidth;i.x-=r/2,i.y-=r/2,i.width+=r,i.height+=r}this._rect=i}return this._rect}},n.inherits(l,r);var c=l;e.exports=c},function(e,t,i){i(5).__DEV__;var r=i(0),n=(r.isTypedArray,r.extend),a=(r.assert,r.each),o=r.isObject,s=i(4),l=s.getDataItemValue,c=s.isDataItemOption,u=i(3).parseDate,d=i(64),h=i(65),p=h.SOURCE_FORMAT_TYPED_ARRAY,f=h.SOURCE_FORMAT_ARRAY_ROWS,m=h.SOURCE_FORMAT_ORIGINAL,g=h.SOURCE_FORMAT_OBJECT_ROWS;function y(e,t){d.isInstance(e)||(e=d.seriesDataToSource(e)),this._source=e;var i=this._data=e.data,r=e.sourceFormat;r===p&&(this._offset=0,this._dimSize=t,this._data=i);var a=v[r===f?r+"_"+e.seriesLayoutBy:r];n(this,a)}var _=y.prototype;_.pure=!1,_.persistent=!0,_.getSource=function(){return this._source};var v={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(e){return this._data[e+this._source.startIndex]},appendData:b},arrayRows_row:{pure:!0,count:function(){var e=this._data[0];return e?Math.max(0,e.length-this._source.startIndex):0},getItem:function(e){e+=this._source.startIndex;for(var t=[],i=this._data,r=0;r<i.length;r++){var n=i[r];t.push(n?n[e]:null)}return t},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:C,getItem:x,appendData:b},keyedColumns:{pure:!0,count:function(){var e=this._source.dimensionsDefine[0].name,t=this._data[e];return t?t.length:0},getItem:function(e){for(var t=[],i=this._source.dimensionsDefine,r=0;r<i.length;r++){var n=this._data[i[r].name];t.push(n?n[e]:null)}return t},appendData:function(e){var t=this._data;a(e,(function(e,i){for(var r=t[i]||(t[i]=[]),n=0;n<(e||[]).length;n++)r.push(e[n])}))}},original:{count:C,getItem:x,appendData:b},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(e,t){e-=this._offset,t=t||[];for(var i=this._dimSize*e,r=0;r<this._dimSize;r++)t[r]=this._data[i+r];return t},appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function C(){return this._data.length}function x(e){return this._data[e]}function b(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var S={arrayRows:T,objectRows:function(e,t,i,r){return null!=i?e[r]:e},keyedColumns:T,original:function(e,t,i,r){var n=l(e);return null!=i&&n instanceof Array?n[i]:n},typedArray:T};function T(e,t,i,r){return null!=i?e[i]:e}var E={arrayRows:w,objectRows:function(e,t,i,r){return A(e[t],this._dimensionInfos[t])},keyedColumns:w,original:function(e,t,i,r){var n=e&&(null==e.value?e:e.value);return!this._rawData.pure&&c(e)&&(this.hasItemOption=!0),A(n instanceof Array?n[r]:n,this._dimensionInfos[t])},typedArray:function(e,t,i,r){return e[r]}};function w(e,t,i,r){return A(e[r],this._dimensionInfos[t])}function A(e,t){var i=t&&t.type;if("ordinal"===i){var r=t&&t.ordinalMeta;return r?r.parseAndCollect(e):e}return"time"===i&&"number"!=typeof e&&null!=e&&"-"!==e&&(e=+u(e)),null==e||""===e?NaN:+e}t.DefaultDataProvider=y,t.defaultDimValueGetters=E,t.retrieveRawValue=function(e,t,i){if(e){var r=e.getRawDataItem(t);if(null!=r){var n,a,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(i);return s&&(n=s.name,a=s.index),S[o](r,t,a,n)}}},t.retrieveRawAttr=function(e,t,i){if(e){var r=e.getProvider().getSource().sourceFormat;if(r===m||r===g){var n=e.getRawDataItem(t);return r!==m||o(n)||(n=null),n?n[i]:void 0}}}},function(e,t){function i(e){return e}function r(e,t,r,n,a){this._old=e,this._new=t,this._oldKeyGetter=r||i,this._newKeyGetter=n||i,this.context=a}function n(e,t,i,r,n){for(var a=0;a<e.length;a++){var o="_ec_"+n[r](e[a],a),s=t[o];null==s?(i.push(o),t[o]=a):(s.length||(t[o]=s=[s]),s.push(a))}}r.prototype={constructor:r,add:function(e){return this._add=e,this},update:function(e){return this._update=e,this},remove:function(e){return this._remove=e,this},execute:function(){var e=this._old,t=this._new,i={},r=[],a=[];for(n(e,{},r,"_oldKeyGetter",this),n(t,i,a,"_newKeyGetter",this),o=0;o<e.length;o++){if(null!=(l=i[s=r[o]]))(u=l.length)?(1===u&&(i[s]=null),l=l.shift()):i[s]=null,this._update&&this._update(l,o);else this._remove&&this._remove(o)}for(var o=0;o<a.length;o++){var s=a[o];if(i.hasOwnProperty(s)){var l;if(null==(l=i[s]))continue;if(l.length)for(var c=0,u=l.length;c<u;c++)this._add&&this._add(l[c]);else this._add&&this._add(l)}}}};var a=r;e.exports=a},function(e,t,i){var r=i(0).isFunction;e.exports=function(e,t,i){return{seriesType:e,performRawSeries:!0,reset:function(e,n,a){var o=e.getData(),s=e.get("symbol"),l=e.get("symbolSize"),c=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),d=r(s),h=r(l),p=r(u),f=d||h||p,m=!d&&s?s:t,g=h?null:l;if(o.setVisual({legendSymbol:i||m,symbol:m,symbolSize:g,symbolKeepAspect:c,symbolRotate:u}),!n.isSeriesFiltered(e))return{dataEach:o.hasItemOption||f?function(t,i){if(f){var r=e.getRawValue(i),n=e.getDataParams(i);d&&t.setItemVisual(i,"symbol",s(r,n)),h&&t.setItemVisual(i,"symbolSize",l(r,n)),p&&t.setItemVisual(i,"symbolRotate",u(r,n))}if(t.hasItemOption){var a=t.getItemModel(i),o=a.getShallow("symbol",!0),c=a.getShallow("symbolSize",!0),m=a.getShallow("symbolRotate",!0),g=a.getShallow("symbolKeepAspect",!0);null!=o&&t.setItemVisual(i,"symbol",o),null!=c&&t.setItemVisual(i,"symbolSize",c),null!=m&&t.setItemVisual(i,"symbolRotate",m),null!=g&&t.setItemVisual(i,"symbolKeepAspect",g)}}:null}}}}},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(89),a=r.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,i,r){this.axisPointerClass&&n.fixValue(e),a.superApply(this,"render",arguments),o(this,e,t,i,r,!0)},updateAxisPointer:function(e,t,i,r,n){o(this,e,t,i,r,!1)},remove:function(e,t){var i=this._axisPointer;i&&i.remove(t),a.superApply(this,"remove",arguments)},dispose:function(e,t){s(this,t),a.superApply(this,"dispose",arguments)}});function o(e,t,i,r,o,l){var c=a.getAxisPointerClass(e.axisPointerClass);if(c){var u=n.getAxisPointerModel(t);u?(e._axisPointer||(e._axisPointer=new c)).render(t,u,r,l):s(e,r)}}function s(e,t,i){var r=e._axisPointer;r&&r.dispose(t,i),e._axisPointer=null}var l=[];a.registerAxisPointerClass=function(e,t){l[e]=t},a.getAxisPointerClass=function(e){return e&&l[e]};var c=a;e.exports=c},function(e,t,i){var r=i(0);function n(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}t.retrieveTargetInfo=function(e,t,i){if(e&&r.indexOf(t,e.type)>=0){var n=i.getData().tree.root,a=e.targetNode;if("string"==typeof a&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var o=e.targetNodeId;if(null!=o&&(a=n.getNodeById(o)))return{node:a}}},t.getPathToRoot=n,t.aboveViewRoot=function(e,t){var i=n(e);return r.indexOf(i,t)>=0},t.wrapTreePathInfo=function(e,t){for(var i=[];e;){var r=e.dataIndex;i.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return i.reverse(),i}},function(e,t,i){var r=i(0),n=i(24),a=i(3).linearMap,o=r.each,s=r.isObject,l=function(e){var t=e.mappingMethod,i=e.type,n=this.option=r.clone(e);this.type=i,this.mappingMethod=t,this._normalizeData=v[t];var a=c[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[t],"piecewise"===t?(u(n),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,r.each(t,(function(t,i){t.originIndex=i,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(n)):"category"===t?n.categories?function(e){var t=e.categories,i=e.visual,n=e.categoryMap={};if(o(t,(function(e,t){n[e]=t})),!r.isArray(i)){var a=[];r.isObject(i)?o(i,(function(e,t){var i=n[t];a[null!=i?i:-1]=e})):a[-1]=i,i=_(e,a)}for(var s=t.length-1;s>=0;s--)null==i[s]&&(delete n[t[s]],t.pop())}(n):u(n,!0):(r.assert("linear"!==t||n.dataExtent),u(n))};l.prototype={constructor:l,mapValueToVisual:function(e){var t=this._normalizeData(e);return this._doMap(t,e)},getNormalizer:function(){return r.bind(this._normalizeData,this)}};var c=l.visualHandlers={color:{applyVisual:p("color"),getColorMapper:function(){var e=this.option;return r.bind("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),f.call(this,e)}:function(t,i,r){var a=!!r;return!i&&(t=this._normalizeData(t)),r=n.fastLerp(t,e.parsedVisual,r),a?r:n.stringify(r,"rgba")},this)},_doMap:{linear:function(e){return n.stringify(n.fastLerp(e,this.option.parsedVisual),"rgba")},category:f,piecewise:function(e,t){var i=y.call(this,t);return null==i&&(i=n.stringify(n.fastLerp(e,this.option.parsedVisual),"rgba")),i},fixed:m}},colorHue:d((function(e,t){return n.modifyHSL(e,t)})),colorSaturation:d((function(e,t){return n.modifyHSL(e,null,t)})),colorLightness:d((function(e,t){return n.modifyHSL(e,null,null,t)})),colorAlpha:d((function(e,t){return n.modifyAlpha(e,t)})),opacity:{applyVisual:p("opacity"),_doMap:g([0,1])},liftZ:{applyVisual:p("liftZ"),_doMap:{linear:m,category:m,piecewise:m,fixed:m}},symbol:{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);if(r.isString(n))i("symbol",n);else if(s(n))for(var a in n)n.hasOwnProperty(a)&&i(a,n[a])},_doMap:{linear:h,category:f,piecewise:function(e,t){var i=y.call(this,t);return null==i&&(i=h.call(this,e)),i},fixed:m}},symbolSize:{applyVisual:p("symbolSize"),_doMap:g([0,1])}};function u(e,t){var i=e.visual,n=[];r.isObject(i)?o(i,(function(e){n.push(e)})):null!=i&&n.push(i);t||1!==n.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(n[1]=n[0]),_(e,n)}function d(e){return{applyVisual:function(t,i,r){t=this.mapValueToVisual(t),r("color",e(i("color"),t))},_doMap:g([0,1])}}function h(e){var t=this.option.visual;return t[Math.round(a(e,[0,1],[0,t.length-1],!0))]||{}}function p(e){return function(t,i,r){r(e,this.mapValueToVisual(t))}}function f(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function m(){return this.option.visual[0]}function g(e){return{linear:function(t){return a(t,e,this.option.visual,!0)},category:f,piecewise:function(t,i){var r=y.call(this,i);return null==r&&(r=a(t,e,this.option.visual,!0)),r},fixed:m}}function y(e){var t=this.option,i=t.pieceList;if(t.hasSpecialVisual){var r=i[l.findPieceIndex(e,i)];if(r&&r.visual)return r.visual[this.type]}}function _(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=r.map(t,(function(e){return n.parse(e)}))),t}var v={linear:function(e){return a(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,i=l.findPieceIndex(e,t,!0);if(null!=i)return a(i,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:r.noop};function C(e,t,i){return e?t<=i:t<i}l.listVisualTypes=function(){var e=[];return r.each(c,(function(t,i){e.push(i)})),e},l.addVisualHandler=function(e,t){c[e]=t},l.isValidType=function(e){return c.hasOwnProperty(e)},l.eachVisual=function(e,t,i){r.isObject(e)?r.each(e,t,i):t.call(i,e)},l.mapVisual=function(e,t,i){var n,a=r.isArray(e)?[]:r.isObject(e)?{}:(n=!0,null);return l.eachVisual(e,(function(e,r){var o=t.call(i,e,r);n?a=o:a[r]=o})),a},l.retrieveVisuals=function(e){var t,i={};return e&&o(c,(function(r,n){e.hasOwnProperty(n)&&(i[n]=e[n],t=!0)})),t?i:null},l.prepareVisualTypes=function(e){if(s(e)){var t=[];o(e,(function(e,i){t.push(i)})),e=t}else{if(!r.isArray(e))return[];e=e.slice()}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},l.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},l.findPieceIndex=function(e,t,i){for(var r,n=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(null!=s){if(s===e||"string"==typeof s&&s===e+"")return a;i&&d(s,a)}}for(a=0,o=t.length;a<o;a++){var l=t[a],c=l.interval,u=l.close;if(c){if(c[0]===-1/0){if(C(u[1],e,c[1]))return a}else if(c[1]===1/0){if(C(u[0],c[0],e))return a}else if(C(u[0],c[0],e)&&C(u[1],e,c[1]))return a;i&&d(c[0],a),i&&d(c[1],a)}}if(i)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,i){var a=Math.abs(t-e);a<n&&(n=a,r=i)}};var x=l;e.exports=x},function(e,t,i){var r=i(61),n=i(9),a=i(0),o=i(102);function s(e){r.call(this,e)}s.prototype={constructor:s,type:"image",brush:function(e,t){var i=this.style,r=i.image;i.bind(e,this,t);var n=this._image=o.createOrUpdateImage(r,this._image,this,this.onload);if(n&&o.isImageReady(n)){var a=i.x||0,s=i.y||0,l=i.width,c=i.height,u=n.width/n.height;if(null==l&&null!=c?l=c*u:null==c&&null!=l?c=l/u:null==l&&null==c&&(l=n.width,c=n.height),this.setTransform(e),i.sWidth&&i.sHeight){var d=i.sx||0,h=i.sy||0;e.drawImage(n,d,h,i.sWidth,i.sHeight,a,s,l,c)}else if(i.sx&&i.sy){var p=l-(d=i.sx),f=c-(h=i.sy);e.drawImage(n,d,h,p,f,a,s,l,c)}else e.drawImage(n,a,s,l,c);null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new n(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},a.inherits(s,r);var l=s;e.exports=l},function(e,t,i){var r=i(0);e.exports=function(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,i,n){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(i&&r.indexOf(i,s)>=0||n&&r.indexOf(n,s)<0)){var l=t.getShallow(s);null!=l&&(a[e[o][0]]=l)}}return a}}},function(e,t,i){var r=i(32),n=i(8),a=i(62),o=i(9),s=i(79).devicePixelRatio,l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},c=[],u=[],d=[],h=[],p=Math.min,f=Math.max,m=Math.cos,g=Math.sin,y=Math.sqrt,_=Math.abs,v="undefined"!=typeof Float32Array,C=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};C.prototype={constructor:C,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(e,t,i){i=i||0,this._ux=_(i/s/e)||0,this._uy=_(i/s/t)||0},getContext:function(){return this._ctx},beginPath:function(e){return this._ctx=e,e&&e.beginPath(),e&&(this.dpr=e.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(e,t){return this.addData(l.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},lineTo:function(e,t){var i=_(e-this._xi)>this._ux||_(t-this._yi)>this._uy||this._len<5;return this.addData(l.L,e,t),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),i&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,i,r,n,a){return this.addData(l.C,e,t,i,r,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,i,r,n,a):this._ctx.bezierCurveTo(e,t,i,r,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(e,t,i,r){return this.addData(l.Q,e,t,i,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,i,r):this._ctx.quadraticCurveTo(e,t,i,r)),this._xi=i,this._yi=r,this},arc:function(e,t,i,r,n,a){return this.addData(l.A,e,t,i,i,r,n-r,0,a?0:1),this._ctx&&this._ctx.arc(e,t,i,r,n,a),this._xi=m(n)*i+e,this._yi=g(n)*i+t,this},arcTo:function(e,t,i,r,n){return this._ctx&&this._ctx.arcTo(e,t,i,r,n),this},rect:function(e,t,i,r){return this._ctx&&this._ctx.rect(e,t,i,r),this.addData(l.R,e,t,i,r),this},closePath:function(){this.addData(l.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,i),e.closePath()),this._xi=t,this._yi=i,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,i=0;i<e.length;i++)t+=e[i];this._dashSum=t}return this},setLineDashOffset:function(e){return this._dashOffset=e,this},len:function(){return this._len},setData:function(e){var t=e.length;this.data&&this.data.length===t||!v||(this.data=new Float32Array(t));for(var i=0;i<t;i++)this.data[i]=e[i];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,i=0,r=this._len,n=0;n<t;n++)i+=e[n].len();v&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i));for(n=0;n<t;n++)for(var a=e[n].data,o=0;o<a.length;o++)this.data[r++]=a[o];this._len=r},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var i=0;i<arguments.length;i++)t[this._len++]=arguments[i];this._prevCmd=e}},_expandData:function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(e,t){var i,r,n=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,c=this._yi,u=e-l,d=t-c,h=y(u*u+d*d),m=l,g=c,_=o.length;for(a<0&&(a=n+a),m-=(a%=n)*(u/=h),g-=a*(d/=h);u>0&&m<=e||u<0&&m>=e||0===u&&(d>0&&g<=t||d<0&&g>=t);)m+=u*(i=o[r=this._dashIdx]),g+=d*i,this._dashIdx=(r+1)%_,u>0&&m<l||u<0&&m>l||d>0&&g<c||d<0&&g>c||s[r%2?"moveTo":"lineTo"](u>=0?p(m,e):f(m,e),d>=0?p(g,t):f(g,t));u=m-e,d=g-t,this._dashOffset=-y(u*u+d*d)},_dashedBezierTo:function(e,t,i,n,a,o){var s,l,c,u,d,h=this._dashSum,p=this._dashOffset,f=this._lineDash,m=this._ctx,g=this._xi,_=this._yi,v=r.cubicAt,C=0,x=this._dashIdx,b=f.length,S=0;for(p<0&&(p=h+p),p%=h,s=0;s<1;s+=.1)l=v(g,e,i,a,s+.1)-v(g,e,i,a,s),c=v(_,t,n,o,s+.1)-v(_,t,n,o,s),C+=y(l*l+c*c);for(;x<b&&!((S+=f[x])>p);x++);for(s=(S-p)/C;s<=1;)u=v(g,e,i,a,s),d=v(_,t,n,o,s),x%2?m.moveTo(u,d):m.lineTo(u,d),s+=f[x]/C,x=(x+1)%b;x%2!=0&&m.lineTo(a,o),l=a-u,c=o-d,this._dashOffset=-y(l*l+c*c)},_dashedQuadraticTo:function(e,t,i,r){var n=i,a=r;i=(i+2*e)/3,r=(r+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,i,r,n,a)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,v&&(this.data=new Float32Array(e)))},getBoundingRect:function(){c[0]=c[1]=d[0]=d[1]=Number.MAX_VALUE,u[0]=u[1]=h[0]=h[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,i=0,r=0,s=0,p=0;p<e.length;){var f=e[p++];switch(1===p&&(r=t=e[p],s=i=e[p+1]),f){case l.M:t=r=e[p++],i=s=e[p++],d[0]=r,d[1]=s,h[0]=r,h[1]=s;break;case l.L:a.fromLine(t,i,e[p],e[p+1],d,h),t=e[p++],i=e[p++];break;case l.C:a.fromCubic(t,i,e[p++],e[p++],e[p++],e[p++],e[p],e[p+1],d,h),t=e[p++],i=e[p++];break;case l.Q:a.fromQuadratic(t,i,e[p++],e[p++],e[p],e[p+1],d,h),t=e[p++],i=e[p++];break;case l.A:var y=e[p++],_=e[p++],v=e[p++],C=e[p++],x=e[p++],b=e[p++]+x;p+=1;var S=1-e[p++];1===p&&(r=m(x)*v+y,s=g(x)*C+_),a.fromArc(y,_,v,C,x,b,S,d,h),t=m(b)*v+y,i=g(b)*C+_;break;case l.R:r=t=e[p++],s=i=e[p++];var T=e[p++],E=e[p++];a.fromLine(r,s,r+T,s+E,d,h);break;case l.Z:t=r,i=s}n.min(c,c,d),n.max(u,u,h)}return 0===p&&(c[0]=c[1]=u[0]=u[1]=0),new o(c[0],c[1],u[0]-c[0],u[1]-c[1])},rebuildPath:function(e){for(var t,i,r,n,a,o,s=this.data,c=this._ux,u=this._uy,d=this._len,h=0;h<d;){var p=s[h++];switch(1===h&&(t=r=s[h],i=n=s[h+1]),p){case l.M:t=r=s[h++],i=n=s[h++],e.moveTo(r,n);break;case l.L:a=s[h++],o=s[h++],(_(a-r)>c||_(o-n)>u||h===d-1)&&(e.lineTo(a,o),r=a,n=o);break;case l.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),r=s[h-2],n=s[h-1];break;case l.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),r=s[h-2],n=s[h-1];break;case l.A:var f=s[h++],y=s[h++],v=s[h++],C=s[h++],x=s[h++],b=s[h++],S=s[h++],T=s[h++],E=v>C?v:C,w=v>C?1:v/C,A=v>C?C/v:1,P=x+b;Math.abs(v-C)>.001?(e.translate(f,y),e.rotate(S),e.scale(w,A),e.arc(0,0,E,x,P,1-T),e.scale(1/w,1/A),e.rotate(-S),e.translate(-f,-y)):e.arc(f,y,E,x,P,1-T),1===h&&(t=m(x)*v+f,i=g(x)*C+y),r=m(P)*v+f,n=g(P)*C+y;break;case l.R:t=r=s[h],i=n=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case l.Z:e.closePath(),r=t,n=i}}}},C.CMD=l;var x=C;e.exports=x},function(e,t,i){var r=i(4).makeInner;e.exports=function(){var e=r();return function(t){var i=e(t),r=t.pipelineContext,n=i.large,a=i.progressiveRender,o=i.large=r&&r.large,s=i.progressiveRender=r&&r.progressiveRender;return!!(n^o||a^s)&&"reset"}}},function(e,t,i){var r=i(175);e.exports=function(e,t){return r((t=t||{}).coordDimensions||[],e,{dimsDef:t.dimensionsDefine||e.dimensionsDefine,encodeDef:t.encodeDefine||e.encodeDefine,dimCount:t.dimensionsCount,encodeDefaulter:t.encodeDefaulter,generateCoord:t.generateCoord,generateCoordCount:t.generateCoordCount})}},function(e,t,i){var r=i(0),n={getMin:function(e){var t=this.option,i=e||null==t.rangeStart?t.min:t.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!r.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(e){var t=this.option,i=e||null==t.rangeEnd?t.max:t.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!r.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var e=this.option;return null==e.rangeStart&&null==e.rangeEnd&&!e.scale},getCoordSysModel:r.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}};e.exports=n},function(e,t,i){var r=i(52),n=i(18),a=i(0),o=a.extend,s=a.isArray;e.exports=function(e,t,i){t=s(t)&&{coordDimensions:t}||o({},t);var a=e.getSource(),l=r(a,t),c=new n(l,e);return c.initData(a,i),c}},function(e,t){function i(e,t){var i=e[t]-e[1-t];return{span:Math.abs(i),sign:i>0?-1:i<0?1:t?-1:1}}function r(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}e.exports=function(e,t,n,a,o,s){e=e||0;var l=n[1]-n[0];if(null!=o&&(o=r(o,[0,l])),null!=s&&(s=Math.max(s,null!=o?o:0)),"all"===a){var c=Math.abs(t[1]-t[0]);c=r(c,[0,l]),o=s=r(c,[o,s]),a=0}t[0]=r(t[0],n),t[1]=r(t[1],n);var u=i(t,a);t[a]+=e;var d=o||0,h=n.slice();u.sign<0?h[0]+=d:h[1]-=d,t[a]=r(t[a],h);var p=i(t,a);return null!=o&&(p.sign!==u.sign||p.span<o)&&(t[1-a]=t[a]+u.sign*o),p=i(t,a),null!=s&&p.span>s&&(t[1-a]=t[a]+p.sign*s),t}},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(11),o=i(4),s=i(125),l=i(509),c=n.each,u=s.eachAxisDim;function d(e){var t={};return c(["start","end","startValue","endValue","throttle"],(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}function h(e,t){var i=e._rangePropMode,r=e.get("rangeMode");c([["start","startValue"],["end","endValue"]],(function(e,n){var a=null!=t[e[0]],o=null!=t[e[1]];a&&!o?i[n]="percent":!a&&o?i[n]="value":r?i[n]=r[n]:a&&(i[n]="percent")}))}var p=r.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(e,t,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var r=d(e);this.settledOption=r,this.mergeDefaultAndTheme(e,i),this.doInit(r)},mergeOption:function(e){var t=d(e);n.merge(this.option,e,!0),n.merge(this.settledOption,t,!0),this.doInit(t)},doInit:function(e){var t=this.option;a.canvasSupported||(t.realtime=!1),this._setDefaultThrottle(e),h(this,e);var i=this.settledOption;c([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=i[e[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var e=this._axisProxies;this.eachTargetAxis((function(t,i,r,n){var a=this.dependentModels[t.axis][i],o=a.__dzAxisProxy||(a.__dzAxisProxy=new l(t.name,i,this,n));e[t.name+"_"+i]=o}),this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();u((function(t){var i=t.axisIndex;e[i]=o.normalizeToArray(e[i])}),this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,t=!1;u((function(i){null!=e[i.axisIndex]&&(t=!0)}),this);var i=e.orient;return null==i&&t?"orient":t?void 0:(null==i&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var e=!0,t=this.get("orient",!0),i=this.option,r=this.dependentModels;if(e){var a="vertical"===t?"y":"x";r[a+"Axis"].length?(i[a+"AxisIndex"]=[0],e=!1):c(r.singleAxis,(function(r){e&&r.get("orient",!0)===t&&(i.singleAxisIndex=[r.componentIndex],e=!1)}))}e&&u((function(t){if(e){var r=[],n=this.dependentModels[t.axis];if(n.length&&!r.length)for(var a=0,o=n.length;a<o;a++)"category"===n[a].get("type")&&r.push(a);i[t.axisIndex]=r,r.length&&(e=!1)}}),this),e&&this.ecModel.eachSeries((function(e){this._isSeriesHasAllAxesTypeOf(e,"value")&&u((function(t){var r=i[t.axisIndex],a=e.get(t.axisIndex),o=e.get(t.axisId);a=e.ecModel.queryComponents({mainType:t.axis,index:a,id:o})[0].componentIndex,n.indexOf(r,a)<0&&r.push(a)}))}),this)},_autoSetOrient:function(){var e;this.eachTargetAxis((function(t){!e&&(e=t.name)}),this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(e,t){var i=!0;return u((function(r){var n=e.get(r.axisIndex),a=this.dependentModels[r.axis][n];a&&a.get("type")===t||(i=!1)}),this),i},_setDefaultThrottle:function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var e;return u((function(t){if(null==e){var i=this.get(t.axisIndex);i.length&&(e=this.dependentModels[t.axis][i[0]])}}),this),e},eachTargetAxis:function(e,t){var i=this.ecModel;u((function(r){c(this.get(r.axisIndex),(function(n){e.call(t,r,n,this,i)}),this)}),this)},getAxisProxy:function(e,t){return this._axisProxies[e+"_"+t]},getAxisModel:function(e,t){var i=this.getAxisProxy(e,t);return i&&i.getAxisModel()},setRawRange:function(e){var t=this.option,i=this.settledOption;c([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=i[r[0]]=e[r[0]],t[r[1]]=i[r[1]]=e[r[1]])}),this),h(this,e)},setCalculatedRange:function(e){var t=this.option;c(["start","startValue","end","endValue"],(function(i){t[i]=e[i]}))},getPercentRange:function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},getValueRange:function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(e){if(e)return e.__dzAxisProxy;var t=this._axisProxies;for(var i in t)if(t.hasOwnProperty(i)&&t[i].hostedBy(this))return t[i];for(var i in t)if(t.hasOwnProperty(i)&&!t[i].hostedBy(this))return t[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});e.exports=p},function(e,t,i){var r=i(83).extend({type:"dataZoom",render:function(e,t,i,r){this.dataZoomModel=e,this.ecModel=t,this.api=i},getTargetCoordInfo:function(){var e=this.dataZoomModel,t=this.ecModel,i={};return e.eachTargetAxis((function(e,r){var n=t.getComponent(e.axis,r);if(n){var a=n.getCoordSysModel();a&&function(e,t,i,r){for(var n,a=0;a<i.length;a++)if(i[a].model===e){n=i[a];break}n||i.push(n={model:e,axisModels:[],coordIndex:r});n.axisModels.push(t)}(a,n,i[a.mainType]||(i[a.mainType]=[]),a.componentIndex)}}),this),i}});e.exports=r},function(e,t,i){(t=e.exports=i(138)).Stream=t,t.Readable=t,t.Writable=i(99),t.Duplex=i(38),t.Transform=i(142),t.PassThrough=i(252)},function(e,t,i){(function(e){function i(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===i(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===i(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===i(e)},t.isError=function(e){return"[object Error]"===i(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,i(22).Buffer)},function(e,t,i){var r=function(){};1===i(79).debugMode&&(r=console.error);var n=r;e.exports=n},function(e,t,i){var r=i(0),n=i(101),a=i(149),o=i(155);function s(e){for(var t in e=e||{},a.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new n(e.style,this),this._rect=null,this.__clipPaths=null}s.prototype={constructor:s,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var i=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?a.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new n(e,this),this.dirty(!1),this},calculateTextPosition:null},r.inherits(s,a),r.mixin(s,o);var l=s;e.exports=l},function(e,t,i){var r=i(8),n=i(32),a=Math.min,o=Math.max,s=Math.sin,l=Math.cos,c=2*Math.PI,u=r.create(),d=r.create(),h=r.create();var p=[],f=[];t.fromPoints=function(e,t,i){if(0!==e.length){var r,n=e[0],s=n[0],l=n[0],c=n[1],u=n[1];for(r=1;r<e.length;r++)n=e[r],s=a(s,n[0]),l=o(l,n[0]),c=a(c,n[1]),u=o(u,n[1]);t[0]=s,t[1]=c,i[0]=l,i[1]=u}},t.fromLine=function(e,t,i,r,n,s){n[0]=a(e,i),n[1]=a(t,r),s[0]=o(e,i),s[1]=o(t,r)},t.fromCubic=function(e,t,i,r,s,l,c,u,d,h){var m,g=n.cubicExtrema,y=n.cubicAt,_=g(e,i,s,c,p);for(d[0]=1/0,d[1]=1/0,h[0]=-1/0,h[1]=-1/0,m=0;m<_;m++){var v=y(e,i,s,c,p[m]);d[0]=a(v,d[0]),h[0]=o(v,h[0])}for(_=g(t,r,l,u,f),m=0;m<_;m++){var C=y(t,r,l,u,f[m]);d[1]=a(C,d[1]),h[1]=o(C,h[1])}d[0]=a(e,d[0]),h[0]=o(e,h[0]),d[0]=a(c,d[0]),h[0]=o(c,h[0]),d[1]=a(t,d[1]),h[1]=o(t,h[1]),d[1]=a(u,d[1]),h[1]=o(u,h[1])},t.fromQuadratic=function(e,t,i,r,s,l,c,u){var d=n.quadraticExtremum,h=n.quadraticAt,p=o(a(d(e,i,s),1),0),f=o(a(d(t,r,l),1),0),m=h(e,i,s,p),g=h(t,r,l,f);c[0]=a(e,s,m),c[1]=a(t,l,g),u[0]=o(e,s,m),u[1]=o(t,l,g)},t.fromArc=function(e,t,i,n,a,o,p,f,m){var g=r.min,y=r.max,_=Math.abs(a-o);if(_%c<1e-4&&_>1e-4)return f[0]=e-i,f[1]=t-n,m[0]=e+i,void(m[1]=t+n);if(u[0]=l(a)*i+e,u[1]=s(a)*n+t,d[0]=l(o)*i+e,d[1]=s(o)*n+t,g(f,u,d),y(m,u,d),(a%=c)<0&&(a+=c),(o%=c)<0&&(o+=c),a>o&&!p?o+=c:a<o&&p&&(a+=c),p){var v=o;o=a,a=v}for(var C=0;C<o;C+=Math.PI/2)C>a&&(h[0]=l(C)*i+e,h[1]=s(C)*n+t,g(f,h,f),y(m,h,m))}},function(e,t,i){var r=i(0),n=i(28).parseClassType,a=0;t.getUID=function(e){return[e||"",a++,Math.random().toFixed(5)].join("_")},t.enableSubTypeDefaulter=function(e){var t={};return e.registerSubTypeDefaulter=function(e,i){e=n(e),t[e.main]=i},e.determineSubType=function(i,r){var a=r.type;if(!a){var o=n(i).main;e.hasSubTypes(i)&&t[o]&&(a=t[o](r))}return a},e},t.enableTopologicalTravel=function(e,t){function i(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,n,a,o){if(e.length){var s=function(e){var n={},a=[];return r.each(e,(function(o){var s=i(n,o),l=function(e,t){var i=[];return r.each(e,(function(e){r.indexOf(t,e)>=0&&i.push(e)})),i}(s.originalDeps=t(o),e);s.entryCount=l.length,0===s.entryCount&&a.push(o),r.each(l,(function(e){r.indexOf(s.predecessor,e)<0&&s.predecessor.push(e);var t=i(n,e);r.indexOf(t.successor,e)<0&&t.successor.push(o)}))})),{graph:n,noEntryList:a}}(n),l=s.graph,c=s.noEntryList,u={};for(r.each(e,(function(e){u[e]=!0}));c.length;){var d=c.pop(),h=l[d],p=!!u[d];p&&(a.call(o,d,h.originalDeps.slice()),delete u[d]),r.each(h.successor,p?m:f)}r.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(e){l[e].entryCount--,0===l[e].entryCount&&c.push(e)}function m(e){u[e]=!0,f(e)}}}},function(e,t,i){var r=i(0),n=r.createHashMap,a=r.isTypedArray,o=i(28).enableClassCheck,s=i(65),l=s.SOURCE_FORMAT_ORIGINAL,c=s.SERIES_LAYOUT_BY_COLUMN,u=s.SOURCE_FORMAT_UNKNOWN,d=s.SOURCE_FORMAT_TYPED_ARRAY,h=s.SOURCE_FORMAT_KEYED_COLUMNS;function p(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===h?{}:[]),this.sourceFormat=e.sourceFormat||u,this.seriesLayoutBy=e.seriesLayoutBy||c,this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&n(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}p.seriesDataToSource=function(e){return new p({data:e,sourceFormat:a(e)?d:l,fromDataset:!1})},o(p);var f=p;e.exports=f},function(e,t){t.SOURCE_FORMAT_ORIGINAL="original",t.SOURCE_FORMAT_ARRAY_ROWS="arrayRows",t.SOURCE_FORMAT_OBJECT_ROWS="objectRows",t.SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",t.SOURCE_FORMAT_UNKNOWN="unknown",t.SOURCE_FORMAT_TYPED_ARRAY="typedArray",t.SERIES_LAYOUT_BY_COLUMN="column",t.SERIES_LAYOUT_BY_ROW="row"},function(e,t,i){var r=i(0),n=r.each,a=r.createHashMap,o=(r.assert,i(5).__DEV__,a(["tooltip","label","itemName","itemId","seriesName"]));function s(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}t.OTHER_DIMENSIONS=o,t.summarizeDimensions=function(e){var t={},i=t.encode={},r=a(),l=[],c=[],u=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};n(e.dimensions,(function(t){var n,a=e.getDimensionInfo(t),d=a.coordDim;if(d){var h=a.coordDimIndex;s(i,d)[h]=t,a.isExtraCoord||(r.set(d,1),"ordinal"!==(n=a.type)&&"time"!==n&&(l[0]=t),s(u.encode,d)[h]=a.index),a.defaultTooltip&&c.push(t)}o.each((function(e,t){var r=s(i,t),n=a.otherDims[t];null!=n&&!1!==n&&(r[n]=a.name)}))}));var d=[],h={};r.each((function(e,t){var r=i[t];h[t]=r[0],d=d.concat(r)})),t.dataDimsOnCoord=d,t.encodeFirstDimNotExtra=h;var p=i.label;p&&p.length&&(l=p.slice());var f=i.tooltip;return f&&f.length?c=f.slice():c.length||(c=l.slice()),i.defaultedLabel=l,i.defaultedTooltip=c,t},t.getDimensionTypeByAxis=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}},function(e,t,i){var r=i(2),n=i(87),a=i(0).isObject;function o(e){this.group=new r.Group,this._symbolCtor=e||n}var s=o.prototype;function l(e,t,i,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(i))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(i,"symbol")}function c(e){return null==e||a(e)||(e={isIgnore:e}),e||{}}function u(e){var t=e.hostModel;return{itemStyle:t.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:t.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label"),cursorStyle:t.get("cursor")}}s.updateData=function(e,t){t=c(t);var i=this.group,n=e.hostModel,a=this._data,o=this._symbolCtor,s=u(e);a||i.removeAll(),e.diff(a).add((function(r){var n=e.getItemLayout(r);if(l(e,n,r,t)){var a=new o(e,r,s);a.attr("position",n),e.setItemGraphicEl(r,a),i.add(a)}})).update((function(c,u){var d=a.getItemGraphicEl(u),h=e.getItemLayout(c);l(e,h,c,t)?(d?(d.updateData(e,c,s),r.updateProps(d,{position:h},n)):(d=new o(e,c)).attr("position",h),i.add(d),e.setItemGraphicEl(c,d)):i.remove(d)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&t.fadeOut((function(){i.remove(t)}))})).execute(),this._data=e},s.isPersistent=function(){return!0},s.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,i){var r=e.getItemLayout(i);t.attr("position",r)}))},s.incrementalPrepareUpdate=function(e){this._seriesScope=u(e),this._data=null,this.group.removeAll()},s.incrementalUpdate=function(e,t,i){function r(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}i=c(i);for(var n=e.start;n<e.end;n++){var a=t.getItemLayout(n);if(l(t,a,n,i)){var o=new this._symbolCtor(t,n,this._seriesScope);o.traverse(r),o.attr("position",a),this.group.add(o),t.setItemGraphicEl(n,o)}}},s.remove=function(e){var t=this.group,i=this._data;i&&e?i.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}))})):t.removeAll()};var d=o;e.exports=d},function(e,t,i){var r=i(2),n=i(3).round;function a(e,t,i){var n=e.getArea(),a=e.getBaseAxis().isHorizontal(),o=n.x,s=n.y,l=n.width,c=n.height,u=i.get("lineStyle.width")||2;o-=u/2,s-=u/2,l+=u,c+=u,o=Math.floor(o),l=Math.round(l);var d=new r.Rect({shape:{x:o,y:s,width:l,height:c}});return t&&(d.shape[a?"width":"height"]=0,r.initProps(d,{shape:{width:l,height:c}},i)),d}function o(e,t,i){var a=e.getArea(),o=new r.Sector({shape:{cx:n(e.cx,1),cy:n(e.cy,1),r0:n(a.r0,1),r:n(a.r,1),startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});return t&&(o.shape.endAngle=a.startAngle,r.initProps(o,{shape:{endAngle:a.endAngle}},i)),o}t.createGridClipPath=a,t.createPolarClipPath=o,t.createClipPath=function(e,t,i){return e?"polar"===e.type?o(e,t,i):"cartesian2d"===e.type?a(e,t,i):null:null}},function(e,t,i){var r=i(0).map,n=i(51),a=i(26).isDimensionStacked;e.exports=function(e){return{seriesType:e,plan:n(),reset:function(e){var t=e.getData(),i=e.coordinateSystem,n=e.pipelineContext.large;if(i){var o=r(i.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),s=o.length,l=t.getCalculationInfo("stackResultDimension");return a(t,o[0])&&(o[0]=l),a(t,o[1])&&(o[1]=l),s&&{progress:function(e,t){for(var r=e.end-e.start,a=n&&new Float32Array(r*s),l=e.start,c=0,u=[],d=[];l<e.end;l++){var h;if(1===s){var p=t.get(o[0],l);h=!isNaN(p)&&i.dataToPoint(p,null,d)}else{p=u[0]=t.get(o[0],l);var f=u[1]=t.get(o[1],l);h=!isNaN(p)&&!isNaN(f)&&i.dataToPoint(u,null,d)}n?(a[c++]=h?h[0]:NaN,a[c++]=h?h[1]:NaN):t.setItemLayout(l,h&&h.slice()||[NaN,NaN])}n&&t.setLayout("symbolPoints",a)}}}}}}},function(e,t,i){var r=i(1),n=i(0),a=i(2);i(111),i(331),r.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new a.Rect({shape:e.coordinateSystem.getRect(),style:n.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),r.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))},function(e,t){var i=function(e,t){this.getAllNames=function(){var e=t();return e.mapArray(e.getName)},this.containName=function(e){return t().indexOfName(e)>=0},this.indexOfName=function(t){return e().indexOfName(t)},this.getItemVisual=function(t,i){return e().getItemVisual(t,i)}};e.exports=i},function(e,t){e.exports=function(e){return{seriesType:e,reset:function(e,t){var i=t.findComponents({mainType:"legend"});if(i&&i.length){var r=e.getData();r.filterSelf((function(e){for(var t=r.getName(e),n=0;n<i.length;n++)if(!i[n].isSelected(t))return!1;return!0}))}}}}},function(e,t,i){var r=i(0),n=i(39),a=i(23),o=i(192);function s(e){this.pointerChecker,this._zr=e,this._opt={};var t=r.bind,i=t(l,this),a=t(c,this),o=t(u,this),s=t(d,this),p=t(h,this);n.call(this),this.setPointerChecker=function(e){this.pointerChecker=e},this.enable=function(t,n){this.disable(),this._opt=r.defaults(r.clone(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",a),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",s),e.on("pinch",p))},this.disable=function(){e.off("mousedown",i),e.off("mousemove",a),e.off("mouseup",o),e.off("mousewheel",s),e.off("pinch",p)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function l(e){if(!(a.isMiddleOrRightButtonOnMouseUpDown(e)||e.target&&e.target.draggable)){var t=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,i)&&(this._x=t,this._y=i,this._dragging=!0)}}function c(e){if(this._dragging&&m("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!o.isTaken(this._zr,"globalPan")){var t=e.offsetX,i=e.offsetY,r=this._x,n=this._y,s=t-r,l=i-n;this._x=t,this._y=i,this._opt.preventDefaultMouseMove&&a.stop(e.event),f(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:r,oldY:n,newX:t,newY:i})}}function u(e){a.isMiddleOrRightButtonOnMouseUpDown(e)||(this._dragging=!1)}function d(e){var t=m("zoomOnMouseWheel",e,this._opt),i=m("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,n=Math.abs(r),a=e.offsetX,o=e.offsetY;if(0!==r&&(t||i)){if(t){var s=n>3?1.4:n>1?1.2:1.1;p(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:a,originY:o})}if(i){var l=Math.abs(r);p(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:o})}}}function h(e){o.isTaken(this._zr,"globalPan")||p(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY})}function p(e,t,i,r,n){e.pointerChecker&&e.pointerChecker(r,n.originX,n.originY)&&(a.stop(r.event),f(e,t,i,r,n))}function f(e,t,i,n,a){a.isAvailableBehavior=r.bind(m,null,i,n),e.trigger(t,a)}function m(e,t,i){var n=i[e];return!e||n&&(!r.isString(n)||t.event[n+"Key"])}r.mixin(s,n);var g=s;e.exports=g},function(e,t,i){var r=i(1),n=i(0),a=i(89),o=i(460);i(461),i(462),i(211),r.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!n.isArray(t)&&(e.axisPointer.link=[t])}})),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=a.collect(e,t)})),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},o)},function(e,t,i){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,i,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,i)}));case 3:return t.nextTick((function(){e.call(null,i,r)}));case 4:return t.nextTick((function(){e.call(null,i,r,n)}));default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,i(27))},function(e,t,i){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var r in i)n(i,r)&&(e[r]=i[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,r,n){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+r),n);else for(var a=0;a<r;a++)e[n+a]=t[i+a]},flattenChunks:function(e){var t,i,r,n,a,o;for(r=0,t=0,i=e.length;t<i;t++)r+=e[t].length;for(o=new Uint8Array(r),n=0,t=0,i=e.length;t<i;t++)a=e[t],o.set(a,n),n+=a.length;return o}},o={arraySet:function(e,t,i,r,n){for(var a=0;a<r;a++)e[n+a]=t[i+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,a)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(r)},function(e,t,i){var r=i(147),n=i(11),a=i(0),o=i(276),s=i(280),l=i(284),c=i(286),u=i(287),d=!n.canvasSupported,h={canvas:l},p={};var f=function(e,t,i){i=i||{},this.dom=t,this.id=e;var r=this,l=new s,p=i.renderer;if(d){if(!h.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");p="vml"}else p&&h[p]||(p="canvas");var f=new h[p](t,l,i,e);this.storage=l,this.painter=f;var m=n.node||n.worker?null:new u(f.getViewportRoot(),f.root);this.handler=new o(l,f,m,f.root),this.animation=new c({stage:{update:a.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var g=l.delFromStorage,y=l.addToStorage;l.delFromStorage=function(e){g.call(l,e),e&&e.removeSelfFromZr(r)},l.addToStorage=function(e){y.call(l,e),e.addSelfToZr(r)}};f.prototype={constructor:f,getId:function(){return this.id},add:function(e){this.storage.addRoot(e),this._needsRefresh=!0},remove:function(e){this.storage.delRoot(e),this._needsRefresh=!0},configLayer:function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this._needsRefresh=!0},setBackgroundColor:function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var e;this._needsRefresh&&(e=!0,this.refreshImmediately()),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),e&&this.trigger("rendered")},addHover:function(e,t){if(this.painter.addHover){var i=this.painter.addHover(e,t);return this.refreshHover(),i}},removeHover:function(e){this.painter.removeHover&&(this.painter.removeHover(e),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(e,t){return this.painter.pathToImage(e,t)},setCursorStyle:function(e){this.handler.setCursorStyle(e)},findHover:function(e,t){return this.handler.findHover(e,t)},on:function(e,t,i){this.handler.on(e,t,i)},off:function(e,t){this.handler.off(e,t)},trigger:function(e,t){this.handler.trigger(e,t)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete p[e]}},t.version="4.3.2",t.init=function(e,t){var i=new f(r(),e,t);return p[i.id]=i,i},t.dispose=function(e){if(e)e.dispose();else{for(var t in p)p.hasOwnProperty(t)&&p[t].dispose();p={}}return this},t.getInstance=function(e){return p[e]},t.registerPainter=function(e,t){h[e]=t}},function(e,t,i){var r=i(15),n=i(8),a=r.identity;function o(e){return e>5e-5||e<-5e-5}var s=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},l=s.prototype;l.transform=null,l.needLocalTransform=function(){return o(this.rotation)||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)};var c=[];l.updateTransform=function(){var e=this.parent,t=e&&e.transform,i=this.needLocalTransform(),n=this.transform;if(i||t){n=n||r.create(),i?this.getLocalTransform(n):a(n),t&&(i?r.mul(n,e.transform,n):r.copy(n,e.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(c);var s=c[0]<0?-1:1,l=c[1]<0?-1:1,u=((c[0]-s)*o+s)/c[0]||0,d=((c[1]-l)*o+l)/c[1]||0;n[0]*=u,n[1]*=u,n[2]*=d,n[3]*=d}this.invTransform=this.invTransform||r.create(),r.invert(this.invTransform,n)}else n&&a(n)},l.getLocalTransform=function(e){return s.getLocalTransform(this,e)},l.setTransform=function(e){var t=this.transform,i=e.dpr||1;t?e.setTransform(i*t[0],i*t[1],i*t[2],i*t[3],i*t[4],i*t[5]):e.setTransform(i,0,0,i,0,0)},l.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var u=[],d=r.create();l.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=this.position,n=this.scale;o(t-1)&&(t=Math.sqrt(t)),o(i-1)&&(i=Math.sqrt(i)),e[0]<0&&(t=-t),e[3]<0&&(i=-i),r[0]=e[4],r[1]=e[5],n[0]=t,n[1]=i,this.rotation=Math.atan2(-e[1]/i,e[0]/t)}},l.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(r.mul(u,e.invTransform,t),t=u);var i=this.origin;i&&(i[0]||i[1])&&(d[4]=i[0],d[5]=i[1],r.mul(u,t,d),u[4]-=i[0],u[5]-=i[1],t=u),this.setLocalTransform(t)}},l.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},l.transformCoordToLocal=function(e,t){var i=[e,t],r=this.invTransform;return r&&n.applyTransform(i,i,r),i},l.transformCoordToGlobal=function(e,t){var i=[e,t],r=this.transform;return r&&n.applyTransform(i,i,r),i},s.getLocalTransform=function(e,t){a(t=t||[]);var i=e.origin,n=e.scale||[1,1],o=e.rotation||0,s=e.position||[0,0];return i&&(t[4]-=i[0],t[5]-=i[1]),r.scale(t,t,n),o&&r.rotate(t,t,o),i&&(t[4]+=i[0],t[5]+=i[1]),t[4]+=s[0],t[5]+=s[1],t};var h=s;e.exports=h},function(e,t){var i=1;"undefined"!=typeof window&&(i=Math.max(window.devicePixelRatio||1,1));var r=i;t.debugMode=0,t.devicePixelRatio=r},function(e,t){t.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},t.WILL_BE_RESTORED=9},function(e,t,i){var r=i(0),n=r.retrieve2,a=r.retrieve3,o=r.each,s=r.normalizeCssArray,l=r.isString,c=r.isObject,u=i(17),d=i(156),h=i(102),p=i(152),f=i(80),m=f.ContextCachedBy,g=f.WILL_BE_RESTORED,y=u.DEFAULT_FONT,_={left:1,right:1,center:1},v={top:1,bottom:1,middle:1},C=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],x={},b={};function S(e){if(e){e.font=u.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||_[t]?t:"left";var i=e.textVerticalAlign||e.textBaseline;"center"===i&&(i="middle"),e.textVerticalAlign=null==i||v[i]?i:"top",e.textPadding&&(e.textPadding=s(e.textPadding))}}function T(e,t,i,r,n){if(i&&t.textRotation){var a=t.textOrigin;"center"===a?(r=i.width/2+i.x,n=i.height/2+i.y):a&&(r=a[0]+i.x,n=a[1]+i.y),e.translate(r,n),e.rotate(-t.textRotation),e.translate(-r,-n)}}function E(e,t,i,r,o,s,l,c){var u=r.rich[i.styleName]||{};u.text=i.text;var d=i.textVerticalAlign,h=s+o/2;"top"===d?h=s+i.height/2:"bottom"===d&&(h=s+o-i.height/2),!i.isLineHolder&&w(u)&&A(e,t,u,"right"===c?l-i.width:"center"===c?l-i.width/2:l,h-i.height/2,i.width,i.height);var p=i.textPadding;p&&(l=L(l,c,p),h-=i.height/2-p[2]-i.textHeight/2),M(t,"shadowBlur",a(u.textShadowBlur,r.textShadowBlur,0)),M(t,"shadowColor",u.textShadowColor||r.textShadowColor||"transparent"),M(t,"shadowOffsetX",a(u.textShadowOffsetX,r.textShadowOffsetX,0)),M(t,"shadowOffsetY",a(u.textShadowOffsetY,r.textShadowOffsetY,0)),M(t,"textAlign",c),M(t,"textBaseline","middle"),M(t,"font",i.font||y);var f=I(u.textStroke||r.textStroke,g),m=R(u.textFill||r.textFill),g=n(u.textStrokeWidth,r.textStrokeWidth);f&&(M(t,"lineWidth",g),M(t,"strokeStyle",f),t.strokeText(i.text,l,h)),m&&(M(t,"fillStyle",m),t.fillText(i.text,l,h))}function w(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function A(e,t,i,r,n,a,o){var s=i.textBackgroundColor,u=i.textBorderWidth,p=i.textBorderColor,f=l(s);if(M(t,"shadowBlur",i.textBoxShadowBlur||0),M(t,"shadowColor",i.textBoxShadowColor||"transparent"),M(t,"shadowOffsetX",i.textBoxShadowOffsetX||0),M(t,"shadowOffsetY",i.textBoxShadowOffsetY||0),f||u&&p){t.beginPath();var m=i.textBorderRadius;m?d.buildPath(t,{x:r,y:n,width:a,height:o,r:m}):t.rect(r,n,a,o),t.closePath()}if(f)if(M(t,"fillStyle",s),null!=i.fillOpacity){var g=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,t.fill(),t.globalAlpha=g}else t.fill();else if(c(s)){var y=s.image;(y=h.createOrUpdateImage(y,null,e,P,s))&&h.isImageReady(y)&&t.drawImage(y,r,n,a,o)}if(u&&p)if(M(t,"lineWidth",u),M(t,"strokeStyle",p),null!=i.strokeOpacity){g=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,t.stroke(),t.globalAlpha=g}else t.stroke()}function P(e,t){t.image=e}function D(e,t,i,r){var n=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(r){var l=i.textPosition;if(l instanceof Array)n=r.x+O(l[0],r.width),a=r.y+O(l[1],r.height);else{var c=t&&t.calculateTextPosition?t.calculateTextPosition(x,i,r):u.calculateTextPosition(x,i,r);n=c.x,a=c.y,o=o||c.textAlign,s=s||c.textVerticalAlign}var d=i.textOffset;d&&(n+=d[0],a+=d[1])}return(e=e||{}).baseX=n,e.baseY=a,e.textAlign=o,e.textVerticalAlign=s,e}function M(e,t,i){return e[t]=p(e,t,i),e[t]}function I(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function R(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function O(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function L(e,t,i){return"right"===t?e-i[1]:"center"===t?e+i[3]/2-i[1]/2:e+i[3]}t.normalizeTextStyle=function(e){return S(e),o(e.rich,S),e},t.renderText=function(e,t,i,r,n,a){r.rich?function(e,t,i,r,n,a){a!==g&&(t.__attrCachedBy=m.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=u.parseRichText(i,r));!function(e,t,i,r,n){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=r.textPadding,c=D(b,e,r,n),d=c.baseX,h=c.baseY,p=c.textAlign,f=c.textVerticalAlign;T(t,r,n,d,h);var m=u.adjustTextX(d,o,p),g=u.adjustTextY(h,s,f),y=m,_=g;l&&(y+=l[3],_+=l[0]);var v=y+a;w(r)&&A(e,t,r,m,g,o,s);for(var C=0;C<i.lines.length;C++){for(var x,S=i.lines[C],P=S.tokens,M=P.length,I=S.lineHeight,R=S.width,O=0,L=y,N=v,F=M-1;O<M&&(!(x=P[O]).textAlign||"left"===x.textAlign);)E(e,t,x,r,I,_,L,"left"),R-=x.width,L+=x.width,O++;for(;F>=0&&"right"===(x=P[F]).textAlign;)E(e,t,x,r,I,_,N,"right"),R-=x.width,N-=x.width,F--;for(L+=(a-(L-y)-(v-N)-R)/2;O<=F;)x=P[O],E(e,t,x,r,I,_,L+x.width/2,"center"),L+=x.width,O++;_+=I}}(e,t,o,r,n)}(e,t,i,r,n,a):function(e,t,i,r,n,a){"use strict";var o,s=w(r),l=!1,c=t.__attrCachedBy===m.PLAIN_TEXT;a!==g?(a&&(o=a.style,l=!s&&c&&o),t.__attrCachedBy=s?m.NONE:m.PLAIN_TEXT):c&&(t.__attrCachedBy=m.NONE);var d=r.font||y;l&&d===(o.font||y)||(t.font=d);var h=e.__computedFont;e.__styleFont!==d&&(e.__styleFont=d,h=e.__computedFont=t.font);var f=r.textPadding,_=r.textLineHeight,v=e.__textCotentBlock;v&&!e.__dirtyText||(v=e.__textCotentBlock=u.parsePlainText(i,h,f,_,r.truncate));var x=v.outerHeight,S=v.lines,E=v.lineHeight,P=D(b,e,r,n),M=P.baseX,O=P.baseY,N=P.textAlign||"left",F=P.textVerticalAlign;T(t,r,n,M,O);var B=u.adjustTextY(O,x,F),V=M,k=B;if(s||f){var z=u.getWidth(i,h);f&&(z+=f[1]+f[3]);var G=u.adjustTextX(M,z,N);s&&A(e,t,r,G,B,z,x),f&&(V=L(M,N,f),k+=f[0])}t.textAlign=N,t.textBaseline="middle",t.globalAlpha=r.opacity||1;for(var U=0;U<C.length;U++){var $=C[U],H=$[0],W=$[1],j=r[H];l&&j===o[H]||(t[W]=p(t,W,j||$[2]))}k+=E/2;var q=r.textStrokeWidth,Y=l?o.textStrokeWidth:null,X=!l||q!==Y,Q=!l||X||r.textStroke!==o.textStroke,Z=I(r.textStroke,q),J=R(r.textFill);Z&&(X&&(t.lineWidth=q),Q&&(t.strokeStyle=Z));J&&(l&&r.textFill===o.textFill||(t.fillStyle=J));if(1===S.length)Z&&t.strokeText(S[0],V,k),J&&t.fillText(S[0],V,k);else for(U=0;U<S.length;U++)Z&&t.strokeText(S[U],V,k),J&&t.fillText(S[U],V,k),k+=E}(e,t,i,r,n,a)},t.getBoxPosition=D,t.getStroke=I,t.getFill=R,t.parsePercent=O,t.needDrawText=function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)}},function(e,t){var i=function(e){this.colorStops=e||[]};i.prototype={constructor:i,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var r=i;e.exports=r},function(e,t,i){var r=i(40),n=i(63),a=i(28),o=function(){this.group=new r,this.uid=n.getUID("viewComponent")},s=o.prototype={constructor:o,init:function(e,t){},render:function(e,t,i,r){},dispose:function(){},filterForExposedEvent:null};s.updateView=s.updateLayout=s.updateVisual=function(e,t,i,r){},a.enableClassExtend(o),a.enableClassManagement(o,{registerWhenExtend:!0});var l=o;e.exports=l},function(e,t,i){var r=i(28);function n(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}n.prototype.parse=function(e){return e},n.prototype.getSetting=function(e){return this._setting[e]},n.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},n.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},n.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},n.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},n.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},n.prototype.isBlank=function(){return this._isBlank},n.prototype.setBlank=function(e){this._isBlank=e},n.prototype.getLabel=null,r.enableClassExtend(n),r.enableClassManagement(n,{registerWhenExtend:!0});var a=n;e.exports=a},function(e,t,i){var r=i(3),n=i(7),a=i(84),o=i(177),s=r.round,l=a.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(e,t){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(t)||(i[1]=parseFloat(t))},unionExtent:function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),l.prototype.setExtent.call(this,t[0],t[1])},getInterval:function(){return this._interval},setInterval:function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=o.getIntervalPrecision(e)},getTicks:function(e){var t=this._interval,i=this._extent,r=this._niceExtent,n=this._intervalPrecision,a=[];if(!t)return a;i[0]<r[0]&&(e?a.push(s(r[0]-t,n)):a.push(i[0]));for(var o=r[0];o<=r[1]&&(a.push(o),(o=s(o+t,n))!==a[a.length-1]);)if(a.length>1e4)return[];var l=a.length?a[a.length-1]:r[1];return i[1]>l&&(e?a.push(s(l+t,n)):a.push(i[1])),a},getMinorTicks:function(e){for(var t=this.getTicks(!0),i=[],n=this.getExtent(),a=1;a<t.length;a++){for(var o=t[a],s=t[a-1],l=0,c=[],u=(o-s)/e;l<e-1;){var d=r.round(s+(l+1)*u);d>n[0]&&d<n[1]&&c.push(d),l++}i.push(c)}return i},getLabel:function(e,t){if(null==e)return"";var i=t&&t.precision;return null==i?i=r.getPrecisionSafe(e)||0:"auto"===i&&(i=this._intervalPrecision),e=s(e,i,!0),n.addCommas(e)},niceTicks:function(e,t,i){e=e||5;var r=this._extent,n=r[1]-r[0];if(isFinite(n)){n<0&&(n=-n,r.reverse());var a=o.intervalScaleNiceTicks(r,e,t,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var i=t[0];e.fixMax||(t[1]+=i/2),t[0]-=i/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var n=this._interval;e.fixMin||(t[0]=s(Math.floor(t[0]/n)*n)),e.fixMax||(t[1]=s(Math.ceil(t[1]/n)*n))}});l.create=function(){return new l};var c=l;e.exports=c},function(e,t,i){var r=i(0),n=i(3).parsePercent,a=i(26).isDimensionStacked,o=i(51),s="undefined"!=typeof Float32Array?Float32Array:Array;function l(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function c(e){return e.dim+e.index}function u(e,t){var i=[];return t.eachSeriesByType(e,(function(e){m(e)&&!g(e)&&i.push(e)})),i}function d(e){var t=function(e){var t={};r.each(e,(function(e){var i=e.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var r=e.getData(),n=i.dim+"_"+i.index,a=r.mapDimension(i.dim),o=0,s=r.count();o<s;++o){var l=r.get(a,o);t[n]?t[n].push(l):t[n]=[l]}}));var i=[];for(var n in t)if(t.hasOwnProperty(n)){var a=t[n];if(a){a.sort((function(e,t){return e-t}));for(var o=null,s=1;s<a.length;++s){var l=a[s]-a[s-1];l>0&&(o=null===o?l:Math.min(o,l))}i[n]=o}}return i}(e),i=[];return r.each(e,(function(e){var r,a=e.coordinateSystem.getBaseAxis(),o=a.getExtent();if("category"===a.type)r=a.getBandWidth();else if("value"===a.type||"time"===a.type){var s=a.dim+"_"+a.index,u=t[s],d=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),p=Math.abs(h[1]-h[0]);r=u?d/p*u:d}else{var f=e.getData();r=Math.abs(o[1]-o[0])/f.count()}var m=n(e.get("barWidth"),r),g=n(e.get("barMaxWidth"),r),y=n(e.get("barMinWidth")||1,r),_=e.get("barGap"),v=e.get("barCategoryGap");i.push({bandWidth:r,barWidth:m,barMaxWidth:g,barMinWidth:y,barGap:_,barCategoryGap:v,axisKey:c(a),stackId:l(e)})})),h(i)}function h(e){var t={};r.each(e,(function(e,i){var r=e.axisKey,n=e.bandWidth,a=t[r]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;t[r]=a;var s=e.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var c=e.barMaxWidth;c&&(o[s].maxWidth=c);var u=e.barMinWidth;u&&(o[s].minWidth=u);var d=e.barGap;null!=d&&(a.gap=d);var h=e.barCategoryGap;null!=h&&(a.categoryGap=h)}));var i={};return r.each(t,(function(e,t){i[t]={};var a=e.stacks,o=e.bandWidth,s=n(e.categoryGap,o),l=n(e.gap,1),c=e.remainedWidth,u=e.autoWidthCount,d=(c-s)/(u+(u-1)*l);d=Math.max(d,0),r.each(a,(function(e){var t=e.maxWidth,i=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),i&&(r=Math.max(r,i)),e.width=r,c-=r+l*r,u--}else{var r=d;t&&t<r&&(r=Math.min(t,c)),i&&i>r&&(r=i),r!==d&&(e.width=r,c-=r+l*r,u--)}})),d=(c-s)/(u+(u-1)*l),d=Math.max(d,0);var h,p=0;r.each(a,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;r.each(a,(function(e,r){i[t][r]=i[t][r]||{bandWidth:o,offset:f,width:e.width},f+=e.width*(1+l)}))})),i}function p(e,t,i){if(e&&t){var r=e[c(t)];return null!=r&&null!=i&&(r=r[l(i)]),r}}var f={seriesType:"bar",plan:o(),reset:function(e){if(m(e)&&g(e)){var t=e.getData(),i=e.coordinateSystem,r=i.grid.getRect(),n=i.getBaseAxis(),a=i.getOtherAxis(n),o=t.mapDimension(a.dim),l=t.mapDimension(n.dim),c=a.isHorizontal(),u=c?0:1,h=p(d([e]),n,e).width;return h>.5||(h=.5),{progress:function(e,t){var d,p=e.count,f=new s(2*p),m=new s(2*p),g=new s(p),_=[],v=[],C=0,x=0;for(;null!=(d=e.next());)v[u]=t.get(o,d),v[1-u]=t.get(l,d),_=i.dataToPoint(v,null,_),m[C]=c?r.x+r.width:_[0],f[C++]=_[0],m[C]=c?_[1]:r.y+r.height,f[C++]=_[1],g[x++]=d;t.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:m,barWidth:h,valueAxisStart:y(n,a,!1),backgroundStart:c?r.x:r.y,valueAxisHorizontal:c})}}}}};function m(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function g(e){return e.pipelineContext&&e.pipelineContext.large}function y(e,t,i){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}t.getLayoutOnAxis=function(e){var t=[],i=e.axis;if("category"===i.type){for(var n=i.getBandWidth(),a=0;a<e.count;a++)t.push(r.defaults({bandWidth:n,axisKey:"axis0",stackId:"__ec_stack_"+a},e));var o=h(t),s=[];for(a=0;a<e.count;a++){var l=o.axis0["__ec_stack_"+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},t.prepareLayoutBarSeries=u,t.makeColumnLayout=d,t.retrieveColumnLayout=p,t.layout=function(e,t){var i=u(e,t),n=d(i),o={},s={};r.each(i,(function(e){var t=e.getData(),i=e.coordinateSystem,r=i.getBaseAxis(),u=l(e),d=n[c(r)][u],h=d.offset,p=d.width,f=i.getOtherAxis(r),m=e.get("barMinHeight")||0;o[u]=o[u]||[],s[u]=s[u]||[],t.setLayout({bandWidth:d.bandWidth,offset:h,size:p});for(var g=t.mapDimension(f.dim),_=t.mapDimension(r.dim),v=a(t,g),C=f.isHorizontal(),x=y(r,f,v),b=0,S=t.count();b<S;b++){var T,E,w,A,P,D=t.get(g,b),M=t.get(_,b),I=D>=0?"p":"n",R=x;if(v&&(o[u][M]||(o[u][M]={p:x,n:x}),R=o[u][M][I]),C)T=R,E=(P=i.dataToPoint([D,M]))[1]+h,w=P[0]-x,A=p,Math.abs(w)<m&&(w=(w<0?-1:1)*m),isNaN(w)||v&&(o[u][M][I]+=w);else T=(P=i.dataToPoint([M,D]))[0]+h,E=R,w=p,A=P[1]-x,Math.abs(A)<m&&(A=(A<=0?-1:1)*m),isNaN(A)||v&&(o[u][M][I]+=A);t.setItemLayout(b,{x:T,y:E,width:w,height:A})}}),this)},t.largeLayout=f},function(e,t,i){var r=i(0),n=i(19).createSymbol,a=i(2),o=i(3).parsePercent,s=i(110).getDefaultLabel;function l(e,t,i){a.Group.call(this),this.updateData(e,t,i)}var c=l.prototype,u=l.getSymbolSize=function(e,t){var i=e.getItemVisual(t,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function d(e){return[e[0]/2,e[1]/2]}function h(e,t){this.parent.drift(e,t)}c._createSymbol=function(e,t,i,r,a){this.removeAll();var o=t.getItemVisual(i,"color"),s=n(e,-1,-1,2,2,o,a);s.attr({z2:100,culling:!0,scale:d(r)}),s.drift=h,this._symbolType=e,this.add(s)},c.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},c.getSymbolPath=function(){return this.childAt(0)},c.getScale=function(){return this.childAt(0).scale},c.highlight=function(){this.childAt(0).trigger("emphasis")},c.downplay=function(){this.childAt(0).trigger("normal")},c.setZ=function(e,t){var i=this.childAt(0);i.zlevel=e,i.z=t},c.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},c.updateData=function(e,t,i){this.silent=!1;var r=e.getItemVisual(t,"symbol")||"circle",n=e.hostModel,o=u(e,t),s=r!==this._symbolType;if(s){var l=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(r,e,t,o,l)}else{(c=this.childAt(0)).silent=!1,a.updateProps(c,{scale:d(o)},n,t)}if(this._updateCommon(e,t,o,i),s){var c=this.childAt(0),h=i&&i.fadeIn,p={scale:c.scale.slice()};h&&(p.style={opacity:c.style.opacity}),c.scale=[0,0],h&&(c.style.opacity=0),a.initProps(c,p,n,t)}this._seriesModel=n};var p=["itemStyle"],f=["emphasis","itemStyle"],m=["label"],g=["emphasis","label"];function y(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var i=this.__symbolOriginalScale,r=i[1]/i[0],n={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*r)]};this.animateTo(n,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}c._updateCommon=function(e,t,i,n){var l=this.childAt(0),c=e.hostModel,u=e.getItemVisual(t,"color");"image"!==l.type?l.useStyle({strokeNoScale:!0}):l.setStyle({opacity:1,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var h=n&&n.itemStyle,_=n&&n.hoverItemStyle,v=n&&n.symbolOffset,C=n&&n.labelModel,x=n&&n.hoverLabelModel,b=n&&n.hoverAnimation,S=n&&n.cursorStyle;if(!n||e.hasItemOption){var T=n&&n.itemModel?n.itemModel:e.getItemModel(t);h=T.getModel(p).getItemStyle(["color"]),_=T.getModel(f).getItemStyle(),v=T.getShallow("symbolOffset"),C=T.getModel(m),x=T.getModel(g),b=T.getShallow("hoverAnimation"),S=T.getShallow("cursor")}else _=r.extend({},_);var E=l.style,w=e.getItemVisual(t,"symbolRotate");l.attr("rotation",(w||0)*Math.PI/180||0),v&&l.attr("position",[o(v[0],i[0]),o(v[1],i[1])]),S&&l.attr("cursor",S),l.setColor(u,n&&n.symbolInnerColor),l.setStyle(h);var A=e.getItemVisual(t,"opacity");null!=A&&(E.opacity=A);var P=e.getItemVisual(t,"liftZ"),D=l.__z2Origin;null!=P?null==D&&(l.__z2Origin=l.z2,l.z2+=P):null!=D&&(l.z2=D,l.__z2Origin=null);var M=n&&n.useNameLabel;a.setLabelStyle(E,_,C,x,{labelFetcher:c,labelDataIndex:t,defaultText:function(t,i){return M?e.getName(t):s(e,t)},isRectText:!0,autoColor:u}),l.__symbolOriginalScale=d(i),l.hoverStyle=_,l.highDownOnUpdate=b&&c.isAnimationEnabled()?y:null,a.setHoverStyle(l)},c.fadeOut=function(e,t){var i=this.childAt(0);this.silent=i.silent=!0,(!t||!t.keepLabel)&&(i.style.text=null),a.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},r.inherits(l,a.Group);var _=l;e.exports=_},function(e,t,i){var r=i(0),n=i(185),a=i(13),o=i(6),s=o.getLayoutParams,l=o.mergeLayoutParam,c=i(176),u=["value","category","time","log"];e.exports=function(e,t,i,o){r.each(u,(function(a){t.extend({type:e+"Axis."+a,mergeDefaultAndTheme:function(t,n){var o=this.layoutMode,c=o?s(t):{},u=n.getTheme();r.merge(t,u.get(a+"Axis")),r.merge(t,this.getDefaultOption()),t.type=i(e,t),o&&l(t,c,o)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=c.createByAxisModel(this))},getCategories:function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r.mergeAll([{},n[a+"Axis"],o],!0)})})),a.registerSubTypeDefaulter(e+"Axis",r.curry(i,e))}},function(e,t,i){var r=i(0),n=i(12),a=r.each,o=r.curry;function s(e,t){return"all"===e||r.isArray(e)&&r.indexOf(e,t)>=0||e===t}function l(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[u(e)]}function c(e){return!!e.get("handle.show")}function u(e){return e.type+"||"+e.id}t.collect=function(e,t){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,i){var l=t.getComponent("tooltip"),d=t.getComponent("axisPointer"),h=d.get("link",!0)||[],p=[];a(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var f=u(i.model),m=e.coordSysAxesInfo[f]={};e.coordSysMap[f]=i;var g=i.model.getModel("tooltip",l);if(a(i.getAxes(),o(C,!1,null)),i.getTooltipAxes&&l&&g.get("show")){var y="axis"===g.get("trigger"),_="cross"===g.get("axisPointer.type"),v=i.getTooltipAxes(g.get("axisPointer.axis"));(y||_)&&a(v.baseAxes,o(C,!_||"cross",y)),_&&a(v.otherAxes,o(C,"cross",!1))}}function C(o,l,f){var y=f.model.getModel("axisPointer",d),_=y.get("show");if(_&&("auto"!==_||o||c(y))){null==l&&(l=y.get("triggerTooltip"));var v=(y=o?function(e,t,i,o,s,l){var c=t.getModel("axisPointer"),u={};a(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){u[e]=r.clone(c.get(e))})),u.snap="category"!==e.type&&!!l,"cross"===c.get("type")&&(u.type="line");var d=u.label||(u.label={});if(null==d.show&&(d.show=!1),"cross"===s){var h=c.get("label.show");if(d.show=null==h||h,!l){var p=u.lineStyle=c.get("crossStyle");p&&r.defaults(d,p.textStyle)}}return e.model.getModel("axisPointer",new n(u,i,o))}(f,g,d,t,o,l):y).get("snap"),C=u(f.model),x=l||v||"category"===f.type,b=e.axesInfo[C]={key:C,axis:f,coordSys:i,axisPointerModel:y,triggerTooltip:l,involveSeries:x,snap:v,useHandle:c(y),seriesModels:[]};m[C]=b,e.seriesInvolved|=x;var S=function(e,t){for(var i=t.model,r=t.dim,n=0;n<e.length;n++){var a=e[n]||{};if(s(a[r+"AxisId"],i.id)||s(a[r+"AxisIndex"],i.componentIndex)||s(a[r+"AxisName"],i.name))return n}}(h,f);if(null!=S){var T=p[S]||(p[S]={axesInfo:{}});T.axesInfo[C]=b,T.mapper=h[S].mapper,b.linkGroup=T}}}}))}(i,e,t),i.seriesInvolved&&function(e,t){t.eachSeries((function(t){var i=t.coordinateSystem,r=t.get("tooltip.trigger",!0),n=t.get("tooltip.show",!0);i&&"none"!==r&&!1!==r&&"item"!==r&&!1!==n&&!1!==t.get("axisPointer.show",!0)&&a(e.coordSysAxesInfo[u(i.model)],(function(e){var r=e.axis;i.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}),this)}(i,e),i},t.fixValue=function(e){var t=l(e);if(t){var i=t.axisPointerModel,r=t.axis.scale,n=i.option,a=i.get("status"),o=i.get("value");null!=o&&(o=r.parse(o));var s=c(i);null==a&&(n.status=s?"show":"hide");var u=r.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==o||o>u[1])&&(o=u[1]),o<u[0]&&(o=u[0]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}},t.getAxisInfo=l,t.getAxisPointerModel=function(e){var t=l(e);return t&&t.axisPointerModel},t.makeKey=u},function(e,t,i){var r=i(0).createHashMap;e.exports=function(e){return{getTargetSeries:function(t){var i={},n=r();return t.eachSeriesByType(e,(function(e){e.__paletteScope=i,n.set(e.uid,e)})),n},reset:function(e,t){var i=e.getRawData(),r={},n=e.getData();n.each((function(e){var t=n.getRawIndex(e);r[t]=e})),i.each((function(t){var a,o=r[t],s=null!=o&&n.getItemVisual(o,"color",!0),l=null!=o&&n.getItemVisual(o,"borderColor",!0);if(s&&l||(a=i.getItemModel(t)),!s){var c=a.get("itemStyle.color")||e.getColorFromPalette(i.getName(t)||t+"",e.__paletteScope,i.count());null!=o&&n.setItemVisual(o,"color",c)}if(!l){var u=a.get("itemStyle.borderColor");null!=o&&n.setItemVisual(o,"borderColor",u)}}))}}}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.each,a=r.createHashMap,o=i(109),s=i(359),l=i(364),c=i(9),u={geoJSON:s,svg:l},d={load:function(e,t,i){var r,o=[],s=a(),l=a(),d=p(e);return n(d,(function(a){var c=u[a.type].load(e,a,i);n(c.regions,(function(e){var i=e.name;t&&t.hasOwnProperty(i)&&(e=e.cloneShallow(i=t[i])),o.push(e),s.set(i,e),l.set(i,e.center)}));var d=c.boundingRect;d&&(r?r.union(d):r=d.clone())})),{regions:o,regionsMap:s,nameCoordMap:l,boundingRect:r||new c(0,0,0,0)}},makeGraphic:h("makeGraphic"),removeGraphic:h("removeGraphic")};function h(e){return function(t,i){var r=p(t),a=[];return n(r,(function(r){var n=u[r.type][e];n&&a.push(n(t,r,i))})),a}}function p(e){return o.retrieveMap(e)||[]}e.exports=d},function(e,t){var i={axisPointer:1,tooltip:1,brush:1};t.onIrrelevantElement=function(e,t,r){var n=t.getComponentByElement(e.topTarget),a=n&&n.coordinateSystem;return n&&n!==r&&!i[n.mainType]&&a&&a.model!==r}},function(e,t,i){var r=i(0),n=function(e){return e.get("autoCurveness")||null},a=function(e,t){var i=n(e),a=20,o=[];if("number"==typeof i)a=i;else if(r.isArray(i))return void(e.__curvenessList=i);t>a&&(a=t);var s=a%2?a+2:a+3;o=[];for(var l=0;l<s;l++)o.push((l%2?l+1:l)/10*(l%2?-1:1));e.__curvenessList=o},o=function(e,t,i){var r=[e.id,e.dataIndex].join("."),n=[t.id,t.dataIndex].join(".");return[i.uid,r,n].join("--\x3e")},s=function(e){var t=e.split("--\x3e");return[t[0],t[2],t[1]].join("--\x3e")},l=function(e,t){var i=t.__edgeMap;return i[e]?i[e].length:0};t.initCurvenessList=function(e){n(e)&&(e.__curvenessList=[],e.__edgeMap={},a(e))},t.createEdgeMapForCurveness=function(e,t,i,r){if(n(i)){var a=o(e,t,i),l=i.__edgeMap,c=l[s(a)];l[a]&&!c?l[a].isForward=!0:c&&l[a]&&(c.isForward=!0,l[a].isForward=!1),l[a]=l[a]||[],l[a].push(r)}},t.getCurvenessForEdge=function(e,t,i,c){var u=n(t),d=r.isArray(u);if(!u)return null;var h=function(e,t){var i=o(e.node1,e.node2,t);return t.__edgeMap[i]}(e,t);if(!h)return null;for(var p=-1,f=0;f<h.length;f++)if(h[f]===i){p=f;break}var m=function(e,t){return l(o(e.node1,e.node2,t),t)+l(o(e.node2,e.node1,t),t)}(e,t);a(t,m),e.lineStyle=e.lineStyle||{};var g=o(e.node1,e.node2,t),y=t.__curvenessList,_=d||m%2?0:1;if(h.isForward)return y[_+p];var v=s(g),C=l(v,t),x=y[p+C+_];return c?d?u&&0===u[0]?(C+_)%2?x:-x:((C%2?0:1)+_)%2?x:-x:(C+_)%2?x:-x:y[p+C+_]}},function(e,t,i){var r=i(0),n=i(2),a=i(17),o=i(7),s=i(15),l=i(21),c=i(36);function u(e,t,i,r,n){var s=d(i.get("value"),t.axis,t.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),l=i.getModel("label"),c=o.normalizeCssArray(l.get("padding")||0),u=l.getFont(),h=a.getBoundingRect(s,u),p=n.position,f=h.width+c[1]+c[3],m=h.height+c[0]+c[2],g=n.align;"right"===g&&(p[0]-=f),"center"===g&&(p[0]-=f/2);var y=n.verticalAlign;"bottom"===y&&(p[1]-=m),"middle"===y&&(p[1]-=m/2),function(e,t,i,r){var n=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,n)-t,e[1]=Math.min(e[1]+i,a)-i,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(p,f,m,r);var _=l.get("backgroundColor");_&&"auto"!==_||(_=t.get("axisLine.lineStyle.color")),e.label={shape:{x:0,y:0,width:f,height:m,r:l.get("borderRadius")},position:p.slice(),style:{text:s,textFont:u,textFill:l.getTextColor(),textPosition:"inside",textPadding:c,fill:_,stroke:l.get("borderColor")||"transparent",lineWidth:l.get("borderWidth")||0,shadowBlur:l.get("shadowBlur"),shadowColor:l.get("shadowColor"),shadowOffsetX:l.get("shadowOffsetX"),shadowOffsetY:l.get("shadowOffsetY")},z2:10}}function d(e,t,i,n,a){e=t.scale.parse(e);var o=t.scale.getLabel(e,{precision:a.precision}),s=a.formatter;if(s){var c={value:l.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};r.each(n,(function(e){var t=i.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,n=t&&t.getDataParams(r);n&&c.seriesData.push(n)})),r.isString(s)?o=s.replace("{value}",o):r.isFunction(s)&&(o=s(c))}return o}function h(e,t,i){var r=s.create();return s.rotate(r,r,i.rotation),s.translate(r,r,i.position),n.applyTransform([e.dataToCoord(t),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],r)}t.buildElStyle=function(e){var t,i=e.get("type"),r=e.getModel(i+"Style");return"line"===i?(t=r.getLineStyle()).fill=null:"shadow"===i&&((t=r.getAreaStyle()).stroke=null),t},t.buildLabelElOption=u,t.getValueLabel=d,t.getTransformedPosition=h,t.buildCartesianSingleLabelElOption=function(e,t,i,r,n,a){var o=c.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=n.get("label.margin"),u(t,r,n,a,{position:h(r.axis,e,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})},t.makeLineShape=function(e,t,i){return{x1:e[i=i||0],y1:e[1-i],x2:t[i],y2:t[1-i]}},t.makeRectShape=function(e,t,i){return{x:e[i=i||0],y:e[1-i],width:t[i],height:t[1-i]}},t.makeSectorShape=function(e,t,i,r,n,a){return{cx:e,cy:t,r0:i,r:r,startAngle:n,endAngle:a,clockwise:!0}}},function(e,t,i){var r=i(0),n=i(47),a=r.each;function o(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}t.createVisualMappings=function(e,t,i){var o={};return a(t,(function(t){var s,l=o[t]=((s=function(){}).prototype.__hidden=s.prototype,new s);a(e[t],(function(e,a){if(n.isValidType(a)){var o={type:a,visual:e};i&&i(o,t),l[a]=new n(o),"opacity"===a&&((o=r.clone(o)).type="colorAlpha",l.__hidden.__alphaForOpacity=new n(o))}}))})),o},t.replaceVisualOption=function(e,t,i){var n;r.each(i,(function(e){t.hasOwnProperty(e)&&o(t[e])&&(n=!0)})),n&&r.each(i,(function(i){t.hasOwnProperty(i)&&o(t[i])?e[i]=r.clone(t[i]):delete e[i]}))},t.applyVisual=function(e,t,i,a,o,s){var l,c={};function u(e){return i.getItemVisual(l,e)}function d(e,t){i.setItemVisual(l,e,t)}function h(e,r){l=null==s?e:r;var n=i.getRawDataItem(l);if(!n||!1!==n.visualMap)for(var h=a.call(o,e),p=t[h],f=c[h],m=0,g=f.length;m<g;m++){var y=f[m];p[y]&&p[y].applyVisual(e,u,d)}}r.each(e,(function(e){var i=n.prepareVisualTypes(t[e]);c[e]=i})),null==s?i.each(h):i.each([s],h)},t.incrementalApplyVisual=function(e,t,i,a){var o={};return r.each(e,(function(e){var i=n.prepareVisualTypes(t[e]);o[e]=i})),{progress:function(e,r){function n(e){return r.getItemVisual(l,e)}function s(e,t){r.setItemVisual(l,e,t)}var l;for(null!=a&&(a=r.getDimension(a));null!=(l=e.next());){var c=r.getRawDataItem(l);if(!c||!1!==c.visualMap)for(var u=null!=a?r.get(a,l,!0):l,d=i(u),h=t[d],p=o[d],f=0,m=p.length;f<m;f++){var g=p[f];h[g]&&h[g].applyVisual(u,n,s)}}}}}},function(e,t,i){"use strict";var r=i(237),n=i(239);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){n.isString(e)&&(e=v(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=i(240);function v(e,t,i){if(e&&n.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,i),r}a.prototype.parse=function(e,t,i){if(!n.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var v=e=c.join(s);if(v=v.trim(),!i&&1===e.split("#").length){var C=l.exec(v);if(C)return this.path=v,this.href=v,this.pathname=C[1],C[2]?(this.search=C[2],this.query=t?_.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var x=o.exec(v);if(x){var b=(x=x[0]).toLowerCase();this.protocol=b,v=v.substr(x.length)}if(i||x||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===v.substr(0,2);!S||x&&g[x]||(v=v.substr(2),this.slashes=!0)}if(!g[x]&&(S||x&&!y[x])){for(var T,E,w=-1,A=0;A<h.length;A++){-1!==(P=v.indexOf(h[A]))&&(-1===w||P<w)&&(w=P)}-1!==(E=-1===w?v.lastIndexOf("@"):v.lastIndexOf("@",w))&&(T=v.slice(0,E),v=v.slice(E+1),this.auth=decodeURIComponent(T)),w=-1;for(A=0;A<d.length;A++){var P;-1!==(P=v.indexOf(d[A]))&&(-1===w||P<w)&&(w=P)}-1===w&&(w=v.length),this.host=v.slice(0,w),v=v.slice(w),this.parseHost(),this.hostname=this.hostname||"";var D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D)for(var M=this.hostname.split(/\./),I=(A=0,M.length);A<I;A++){var R=M[A];if(R&&!R.match(p)){for(var O="",L=0,N=R.length;L<N;L++)R.charCodeAt(L)>127?O+="x":O+=R[L];if(!O.match(p)){var F=M.slice(0,A),B=M.slice(A+1),V=R.match(f);V&&(F.push(V[1]),B.unshift(V[2])),B.length&&(v="/"+B.join(".")+v),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=r.toASCII(this.hostname));var k=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+k,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!m[b])for(A=0,I=u.length;A<I;A++){var G=u[A];if(-1!==v.indexOf(G)){var U=encodeURIComponent(G);U===G&&(U=escape(G)),v=v.split(G).join(U)}}var $=v.indexOf("#");-1!==$&&(this.hash=v.substr($),v=v.slice(0,$));var H=v.indexOf("?");if(-1!==H?(this.search=v.substr(H),this.query=v.substr(H+1),t&&(this.query=_.parse(this.query)),v=v.slice(0,H)):t&&(this.search="",this.query={}),v&&(this.pathname=v),y[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var W=this.search||"";this.path=k+W}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",i=this.pathname||"",r=this.hash||"",a=!1,o="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(o=_.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==a?(a="//"+(a||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+a+(i=i.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(n.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var i=new a,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];i[s]=this[s]}if(i.hash=e.hash,""===e.href)return i.href=i.format(),i;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(i[u]=e[u])}return y[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(e.protocol&&e.protocol!==i.protocol){if(!y[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var p=d[h];i[p]=e[p]}return i.href=i.format(),i}if(i.protocol=e.protocol,e.host||g[e.protocol])i.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),i.pathname=f.join("/")}if(i.search=e.search,i.query=e.query,i.host=e.host||"",i.auth=e.auth,i.hostname=e.hostname||e.host,i.port=e.port,i.pathname||i.search){var m=i.pathname||"",_=i.search||"";i.path=m+_}return i.slashes=i.slashes||e.slashes,i.href=i.format(),i}var v=i.pathname&&"/"===i.pathname.charAt(0),C=e.host||e.pathname&&"/"===e.pathname.charAt(0),x=C||v||i.host&&e.pathname,b=x,S=i.pathname&&i.pathname.split("/")||[],T=(f=e.pathname&&e.pathname.split("/")||[],i.protocol&&!y[i.protocol]);if(T&&(i.hostname="",i.port=null,i.host&&(""===S[0]?S[0]=i.host:S.unshift(i.host)),i.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),x=x&&(""===f[0]||""===S[0])),C)i.host=e.host||""===e.host?e.host:i.host,i.hostname=e.hostname||""===e.hostname?e.hostname:i.hostname,i.search=e.search,i.query=e.query,S=f;else if(f.length)S||(S=[]),S.pop(),S=S.concat(f),i.search=e.search,i.query=e.query;else if(!n.isNullOrUndefined(e.search)){if(T)i.hostname=i.host=S.shift(),(D=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=D.shift(),i.host=i.hostname=D.shift());return i.search=e.search,i.query=e.query,n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!S.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var E=S.slice(-1)[0],w=(i.host||e.host||S.length>1)&&("."===E||".."===E)||""===E,A=0,P=S.length;P>=0;P--)"."===(E=S[P])?S.splice(P,1):".."===E?(S.splice(P,1),A++):A&&(S.splice(P,1),A--);if(!x&&!b)for(;A--;A)S.unshift("..");!x||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),w&&"/"!==S.join("/").substr(-1)&&S.push("");var D,M=""===S[0]||S[0]&&"/"===S[0].charAt(0);T&&(i.hostname=i.host=M?"":S.length?S.shift():"",(D=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=D.shift(),i.host=i.hostname=D.shift()));return(x=x||i.host&&S.length)&&!M&&S.unshift(""),S.length?i.pathname=S.join("/"):(i.pathname=null,i.path=null),n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=e.auth||i.auth,i.slashes=i.slashes||e.slashes,i.href=i.format(),i},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,i){"use strict";var r,n="object"==typeof Reflect?Reflect:null,a=n&&"function"==typeof n.apply?n.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(i,r){function n(){void 0!==a&&e.removeListener("error",a),i([].slice.call(arguments))}var a;"error"!==t&&(a=function(i){e.removeListener(t,n),r(i)},e.once("error",a)),e.once(t,n)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,i,r){var n,a,o,s;if(c(i),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),a=e._events),o=a[t]),void 0===o)o=a[t]=i,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[i,o]:[o,i]:r?o.unshift(i):o.push(i),(n=u(e))>0&&o.length>n&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,i){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},n=h.bind(r);return n.listener=i,r.wrapFn=n,n}function f(e,t,i){var r=e._events;if(void 0===r)return[];var n=r[t];return void 0===n?[]:"function"==typeof n?i?[n.listener||n]:[n]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(n):g(n,n.length)}function m(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function g(e,t){for(var i=new Array(t),r=0;r<t;++r)i[r]=e[r];return i}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,n=this._events;if(void 0!==n)r=r&&void 0===n.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=n[e];if(void 0===l)return!1;if("function"==typeof l)a(l,this,t);else{var c=l.length,u=g(l,c);for(i=0;i<c;++i)a(u[i],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var i,r,n,a,o;if(c(t),void 0===(r=this._events))return this;if(void 0===(i=r[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(n=-1,a=i.length-1;a>=0;a--)if(i[a]===t||i[a].listener===t){o=i[a].listener,n=a;break}if(n<0)return this;0===n?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,n),1===i.length&&(r[e]=i[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,i,r;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var n,a=Object.keys(i);for(r=0;r<a.length;++r)"removeListener"!==(n=a[r])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,i){var r=i(22),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function o(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),a(n,o),o.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,i){"use strict";(function(t,r,n){var a=i(75);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var r=e.entry;e.entry=null;for(;r;){var n=r.callback;t.pendingcb--,n(i),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=_;var s,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:a.nextTick;_.WritableState=y;var c=Object.create(i(59));c.inherits=i(31);var u={deprecate:i(250)},d=i(139),h=i(98).Buffer,p=n.Uint8Array||function(){};var f,m=i(140);function g(){}function y(e,t){s=s||i(38),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,c=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(a.nextTick(n,r),a.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),T(e,t))}(e,i,r,t,n);else{var o=b(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||x(e,i),r?l(C,e,i,o,n):C(e,i,o,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function _(e){if(s=s||i(38),!(f.call(_,this)||this instanceof s))return new _(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function v(e,t,i,r,n,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function C(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),T(e,t)}function x(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),a=t.corkedRequestsFree;a.entry=i;for(var s=0,l=!0;i;)n[s]=i,i.isBuf||(l=!1),i=i.next,s+=1;n.allBuffers=l,v(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,u=i.encoding,d=i.callback;if(v(e,t,!1,t.objectMode?1:c.length,c,u,d),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var i=b(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}c.inherits(_,d),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===_&&(e&&e._writableState instanceof y)}})):f=function(e){return e instanceof this},_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},_.prototype.write=function(e,t,i){var r,n=this._writableState,o=!1,s=!n.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(i=t,t=null),s?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=g),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),a.nextTick(t,i)}(this,i):(s||function(e,t,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(r,o),n=!1),n}(this,n,e,i))&&(n.pendingcb++,o=function(e,t,i,r,n,a){if(!i){var o=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,i));return t}(t,r,n);r!==o&&(i=!0,n="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,s,r,n,a);return l}(this,n,s,e,t,i)),o},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||x(this,e))},_.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,T(e,t),i&&(t.finished?a.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,i(27),i(248).setImmediate,i(16))},function(e,t){function i(e,t,i,r){var n=t+1;if(n===i)return 1;if(r(e[n++],e[t])<0){for(;n<i&&r(e[n],e[n-1])<0;)n++;!function(e,t,i){i--;for(;t<i;){var r=e[t];e[t++]=e[i],e[i--]=r}}(e,t,n)}else for(;n<i&&r(e[n],e[n-1])>=0;)n++;return n-t}function r(e,t,i,r,n){for(r===t&&r++;r<i;r++){for(var a,o=e[r],s=t,l=r;s<l;)n(o,e[a=s+l>>>1])<0?l=a:s=a+1;var c=r-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;c>0;)e[s+c]=e[s+c-1],c--}e[s]=o}}function n(e,t,i,r,n,a){var o=0,s=0,l=1;if(a(e,t[i+n])>0){for(s=r-n;l<s&&a(e,t[i+n+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&a(e,t[i+n-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var c=o;o=n-l,l=n-c}for(o++;o<l;){var u=o+(l-o>>>1);a(e,t[i+u])>0?o=u+1:l=u}return l}function a(e,t,i,r,n,a){var o=0,s=0,l=1;if(a(e,t[i+n])<0){for(s=n+1;l<s&&a(e,t[i+n-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var c=o;o=n-l,l=n-c}else{for(s=r-n;l<s&&a(e,t[i+n+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var u=o+(l-o>>>1);a(e,t[i+u])<0?l=u:o=u+1}return l}function o(e,t){var i,r,o,s=7,l=0;i=e.length;var c=[];function u(i){var u=r[i],d=o[i],h=r[i+1],p=o[i+1];o[i]=d+p,i===l-3&&(r[i+1]=r[i+2],o[i+1]=o[i+2]),l--;var f=a(e[h],e,u,d,0,t);u+=f,0!==(d-=f)&&0!==(p=n(e[u+d-1],e,h,p,p-1,t))&&(d<=p?function(i,r,o,l){var u=0;for(u=0;u<r;u++)c[u]=e[i+u];var d=0,h=o,p=i;if(e[p++]=e[h++],0==--l){for(u=0;u<r;u++)e[p+u]=c[d+u];return}if(1===r){for(u=0;u<l;u++)e[p+u]=e[h+u];return void(e[p+l]=c[d])}var f,m,g,y=s;for(;;){f=0,m=0,g=!1;do{if(t(e[h],c[d])<0){if(e[p++]=e[h++],m++,f=0,0==--l){g=!0;break}}else if(e[p++]=c[d++],f++,m=0,1==--r){g=!0;break}}while((f|m)<y);if(g)break;do{if(0!==(f=a(e[h],c,d,r,0,t))){for(u=0;u<f;u++)e[p+u]=c[d+u];if(p+=f,d+=f,(r-=f)<=1){g=!0;break}}if(e[p++]=e[h++],0==--l){g=!0;break}if(0!==(m=n(c[d],e,h,l,0,t))){for(u=0;u<m;u++)e[p+u]=e[h+u];if(p+=m,h+=m,0===(l-=m)){g=!0;break}}if(e[p++]=c[d++],1==--r){g=!0;break}y--}while(f>=7||m>=7);if(g)break;y<0&&(y=0),y+=2}if((s=y)<1&&(s=1),1===r){for(u=0;u<l;u++)e[p+u]=e[h+u];e[p+l]=c[d]}else{if(0===r)throw new Error;for(u=0;u<r;u++)e[p+u]=c[d+u]}}(u,d,h,p):function(i,r,o,l){var u=0;for(u=0;u<l;u++)c[u]=e[o+u];var d=i+r-1,h=l-1,p=o+l-1,f=0,m=0;if(e[p--]=e[d--],0==--r){for(f=p-(l-1),u=0;u<l;u++)e[f+u]=c[u];return}if(1===l){for(m=(p-=r)+1,f=(d-=r)+1,u=r-1;u>=0;u--)e[m+u]=e[f+u];return void(e[p]=c[h])}var g=s;for(;;){var y=0,_=0,v=!1;do{if(t(c[h],e[d])<0){if(e[p--]=e[d--],y++,_=0,0==--r){v=!0;break}}else if(e[p--]=c[h--],_++,y=0,1==--l){v=!0;break}}while((y|_)<g);if(v)break;do{if(0!==(y=r-a(c[h],e,i,r,r-1,t))){for(r-=y,m=(p-=y)+1,f=(d-=y)+1,u=y-1;u>=0;u--)e[m+u]=e[f+u];if(0===r){v=!0;break}}if(e[p--]=c[h--],1==--l){v=!0;break}if(0!==(_=l-n(e[d],c,0,l,l-1,t))){for(l-=_,m=(p-=_)+1,f=(h-=_)+1,u=0;u<_;u++)e[m+u]=c[f+u];if(l<=1){v=!0;break}}if(e[p--]=e[d--],0==--r){v=!0;break}g--}while(y>=7||_>=7);if(v)break;g<0&&(g=0),g+=2}(s=g)<1&&(s=1);if(1===l){for(m=(p-=r)+1,f=(d-=r)+1,u=r-1;u>=0;u--)e[m+u]=e[f+u];e[p]=c[h]}else{if(0===l)throw new Error;for(f=p-(l-1),u=0;u<l;u++)e[f+u]=c[u]}}(u,d,h,p))}r=[],o=[],this.mergeRuns=function(){for(;l>1;){var e=l-2;if(e>=1&&o[e-1]<=o[e]+o[e+1]||e>=2&&o[e-2]<=o[e]+o[e-1])o[e-1]<o[e+1]&&e--;else if(o[e]>o[e+1])break;u(e)}},this.forceMergeRuns=function(){for(;l>1;){var e=l-2;e>0&&o[e-1]<o[e+1]&&e--,u(e)}},this.pushRun=function(e,t){r[l]=e,o[l]=t,l+=1}}e.exports=function(e,t,n,a){n||(n=0),a||(a=e.length);var s=a-n;if(!(s<2)){var l=0;if(s<32)r(e,n,a,n+(l=i(e,n,a,t)),t);else{var c=new o(e,t),u=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(s);do{if((l=i(e,n,a,t))<u){var d=s;d>u&&(d=u),r(e,n,n+d,n+l,t),l=d}c.pushRun(n,l),c.mergeRuns(),s-=l,n+=l}while(0!==s);c.forceMergeRuns()}}}},function(e,t,i){var r=i(152),n=i(80).ContextCachedBy,a=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],o=function(e){this.extendFrom(e,!1)};function s(e,t,i){var r=null==t.x?0:t.x,n=null==t.x2?1:t.x2,a=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(r=r*i.width+i.x,n=n*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),r=isNaN(r)?0:r,n=isNaN(n)?1:n,a=isNaN(a)?0:a,o=isNaN(o)?0:o,e.createLinearGradient(r,a,n,o)}function l(e,t,i){var r=i.width,n=i.height,a=Math.min(r,n),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*r+i.x,s=s*n+i.y,l*=a),e.createRadialGradient(o,s,0,o,s,l)}for(var c=o.prototype={constructor:o,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(e,t,i){var o=i&&i.style,s=!o||e.__attrCachedBy!==n.STYLE_BIND;e.__attrCachedBy=n.STYLE_BIND;for(var l=0;l<a.length;l++){var c=a[l],u=c[0];(s||this[u]!==o[u])&&(e[u]=r(e,u,this[u]||c[1]))}if((s||this.fill!==o.fill)&&(e.fillStyle=this.fill),(s||this.stroke!==o.stroke)&&(e.strokeStyle=this.stroke),(s||this.opacity!==o.opacity)&&(e.globalAlpha=null==this.opacity?1:this.opacity),(s||this.blend!==o.blend)&&(e.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()){var d=this.lineWidth;e.lineWidth=d/(this.strokeNoScale&&t&&t.getLineScale?t.getLineScale():1)}},hasFill:function(){var e=this.fill;return null!=e&&"none"!==e},hasStroke:function(){var e=this.stroke;return null!=e&&"none"!==e&&this.lineWidth>0},extendFrom:function(e,t){if(e)for(var i in e)!e.hasOwnProperty(i)||!0!==t&&(!1===t?this.hasOwnProperty(i):null==e[i])||(this[i]=e[i])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,i){for(var r=("radial"===t.type?l:s)(e,t,i),n=t.colorStops,a=0;a<n.length;a++)r.addColorStop(n[a].offset,n[a].color);return r}},u=0;u<a.length;u++){var d=a[u];d[0]in c||(c[d[0]]=d[1])}o.getGradient=c.getGradient;var h=o;e.exports=h},function(e,t,i){var r=new(i(151))(50);function n(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var i=e.pending[t],r=i.cb;r&&r(this,i.cbPayload),i.hostEl.dirty()}e.pending.length=0}function a(e){return e&&e.width&&e.height}t.findExistImage=function(e){if("string"==typeof e){var t=r.get(e);return t&&t.image}return e},t.createOrUpdateImage=function(e,t,i,o,s){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!i)return t;var l=r.get(e),c={hostEl:i,cb:o,cbPayload:s};return l?!a(t=l.image)&&l.pending.push(c):((t=new Image).onload=t.onerror=n,r.put(e,t.__cachedImgObj={image:t,pending:[c]}),t.src=t.__zrImageSrc=e),t}return e}return t},t.isImageReady=a},function(e,t,i){var r=i(10),n=i(156),a=i(104).subPixelOptimizeRect,o={},s=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var i,r,s,l;this.subPixelOptimize?(a(o,t,this.style),i=o.x,r=o.y,s=o.width,l=o.height,o.r=t.r,t=o):(i=t.x,r=t.y,s=t.width,l=t.height),t.r?n.buildPath(e,t):e.rect(i,r,s,l),e.closePath()}});e.exports=s},function(e,t){var i=Math.round;function r(e,t,r){if(!t)return e;var n=i(2*e);return(n+i(t))%2==0?n/2:(n+(r?1:-1))/2}t.subPixelOptimizeLine=function(e,t,n){if(t){var a=t.x1,o=t.x2,s=t.y1,l=t.y2;e.x1=a,e.x2=o,e.y1=s,e.y2=l;var c=n&&n.lineWidth;c&&(i(2*a)===i(2*o)&&(e.x1=e.x2=r(a,c,!0)),i(2*s)===i(2*l)&&(e.y1=e.y2=r(s,c,!0)))}},t.subPixelOptimizeRect=function(e,t,i){if(t){var n=t.x,a=t.y,o=t.width,s=t.height;e.x=n,e.y=a,e.width=o,e.height=s;var l=i&&i.lineWidth;l&&(e.x=r(n,l,!0),e.y=r(a,l,!0),e.width=Math.max(r(n+o,l,!1)-e.x,0===o?0:1),e.height=Math.max(r(a+s,l,!1)-e.y,0===s?0:1))}},t.subPixelOptimize=r},function(e,t,i){var r=i(0),n=i(82),a=function(e,t,i,r,a,o){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==i?1:i,this.y2=null==r?0:r,this.type="linear",this.global=o||!1,n.call(this,a)};a.prototype={constructor:a},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(0).inherits,n=i(61),a=i(9);function o(e){n.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}o.prototype.incremental=!0,o.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},o.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},o.prototype.addDisplayables=function(e,t){t=t||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],t)},o.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},o.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},o.prototype.brush=function(e,t){for(var i=this._cursor;i<this._displayables.length;i++){(r=this._displayables[i]).beforeBrush&&r.beforeBrush(e),r.brush(e,i===this._cursor?null:this._displayables[i-1]),r.afterBrush&&r.afterBrush(e)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var r;(r=this._temporaryDisplayables[i]).beforeBrush&&r.beforeBrush(e),r.brush(e,0===i?null:this._temporaryDisplayables[i-1]),r.afterBrush&&r.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var s=[];o.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new a(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var i=this._displayables[t],r=i.getBoundingRect().clone();i.needLocalTransform()&&r.applyTransform(i.getLocalTransform(s)),e.union(r)}this._rect=e}return this._rect},o.prototype.contain=function(e,t){var i=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},r(o,n);var l=o;e.exports=l},function(e,t,i){var r=i(42).retrieveRawValue,n=i(7),a=n.getTooltipMarker,o=n.formatTpl,s=i(4).getTooltipRenderMode,l=/\{@(.+?)\}/g,c={getDataParams:function(e,t){var i=this.getData(t),r=this.getRawValue(e,t),n=i.getRawIndex(e),o=i.getName(e),l=i.getRawDataItem(e),c=i.getItemVisual(e,"color"),u=i.getItemVisual(e,"borderColor"),d=this.ecModel.getComponent("tooltip"),h=d&&d.get("renderMode"),p=s(h),f=this.mainType,m="series"===f,g=i.userOutput;return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:m?this.subType:null,seriesIndex:this.seriesIndex,seriesId:m?this.id:null,seriesName:m?this.name:null,name:o,dataIndex:n,data:l,dataType:t,value:r,color:c,borderColor:u,dimensionNames:g?g.dimensionNames:null,encode:g?g.encode:null,marker:a({color:c,renderMode:p}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,i,n,a){t=t||"normal";var s=this.getData(i),c=s.getItemModel(e),u=this.getDataParams(e,i);null!=n&&u.value instanceof Array&&(u.value=u.value[n]);var d=c.get("normal"===t?[a||"label","formatter"]:[t,a||"label","formatter"]);return"function"==typeof d?(u.status=t,u.dimensionIndex=n,d(u)):"string"==typeof d?o(d,u).replace(l,(function(t,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),r(s,e,i)})):void 0},getRawValue:function(e,t){return r(this.getData(t),e)},formatTooltip:function(){}};e.exports=c},function(e,t,i){var r=i(0),n=(r.assert,r.isArray);i(5).__DEV__;function a(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0,this.context}var o=a.prototype;o.perform=function(e){var t,i=this._upstream,r=e&&e.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var o,s=h(this._modBy),c=this._modDataCount||0,u=h(e&&e.modBy),d=e&&e.modDataCount||0;function h(e){return!(e>=1)&&(e=1),e}s===u&&c===d||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=function(e,t){var i,r;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((i=e._reset(e.context))&&i.progress&&(r=i.forceFirstProgress,i=i.progress),n(i)&&!i.length&&(i=null));e._progress=i,e._modBy=e._modDataCount=null;var a=e._downstream;return a&&a.dirty(),r}(this,r)),this._modBy=u,this._modDataCount=d;var p=e&&e.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,m=Math.min(null!=p?this._dueIndex+p:1/0,this._dueEnd);if(!r&&(o||f<m)){var g=this._progress;if(n(g))for(var y=0;y<g.length;y++)l(this,g[y],f,m,u,d);else l(this,g,f,m,u,d)}this._dueIndex=m;var _=null!=this._settedOutputEnd?this._settedOutputEnd:m;this._outputDueEnd=_}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var s=function(){var e,t,i,r,n,a={reset:function(l,c,u,d){t=l,e=c,i=u,r=d,n=Math.ceil(r/i),a.next=i>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%n*i+Math.ceil(t/n),o=t>=e?null:a<r?a:t;return t++,o}}();function l(e,t,i,r,n,a){s.reset(i,r,n,a),e._callingProgress=t,e._callingProgress({start:i,end:r,count:r-i,next:s.next},e.context)}o.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},o.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},o.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},o.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},o.getUpstream=function(){return this._upstream},o.getDownstream=function(){return this._downstream},o.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t.createTask=function(e){return new a(e)}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.createHashMap,a=r.isString,o=r.isArray,s=r.each,l=(r.assert,i(172).parseXML),c=n(),u={registerMap:function(e,t,i){var r;return o(t)?r=t:t.svg?r=[{type:"svg",source:t.svg,specialAreas:t.specialAreas}]:(t.geoJson&&!t.features&&(i=t.specialAreas,t=t.geoJson),r=[{type:"geoJSON",source:t,specialAreas:i}]),s(r,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,d[t])(e)})),c.set(e,r)},retrieveMap:function(e){return c.get(e)}},d={geoJSON:function(e){var t=e.source;e.geoJSON=a(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=l(e.source)}};e.exports=u},function(e,t,i){var r=i(42).retrieveRawValue;t.getDefaultLabel=function(e,t){var i=e.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return r(e,t,i[0]);if(n){for(var a=[],o=0;o<i.length;o++){var s=r(e,t,i[o]);a.push(s)}return a.join(" ")}}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.isObject,a=r.each,o=r.map,s=r.indexOf,l=(r.retrieve,i(6).getLayoutRect),c=i(21),u=c.createScaleByModel,d=c.ifAxisCrossZero,h=c.niceScaleExtent,p=c.estimateLabelUnionRect,f=i(327),m=i(329),g=i(20),y=i(26).getStackedDimension;function _(e,t,i){return e.getCoordSysModel()===t}function v(e,t,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,i),this.model=e}i(330);var C=v.prototype;function x(e,t,i,r){i.getAxesOnZeroOf=function(){return n?[n]:[]};var n,a=e[t],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)b(a[l])&&(n=a[l]);else for(var c in a)if(a.hasOwnProperty(c)&&b(a[c])&&!r[u(a[c])]){n=a[c];break}n&&(r[u(n)]=!0)}function u(e){return e.dim+"_"+e.index}}function b(e){return e&&"category"!==e.type&&"time"!==e.type&&d(e)}C.type="grid",C.axisPointerEnabled=!0,C.getRect=function(){return this._rect},C.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model),a(i.x,(function(e){h(e.scale,e.model)})),a(i.y,(function(e){h(e.scale,e.model)}));var r={};a(i.x,(function(e){x(i,"y",e,r)})),a(i.y,(function(e){x(i,"x",e,r)})),this.resize(this.model,t)},C.resize=function(e,t,i){var r=l(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=r;var n=this._axesList;function o(){a(n,(function(e){var t=e.isHorizontal(),i=t?[0,r.width]:[0,r.height],n=e.inverse?1:0;e.setExtent(i[n],i[1-n]),function(e,t){var i=e.getExtent(),r=i[0]+i[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?r.x:r.y)}))}o(),!i&&e.get("containLabel")&&(a(n,(function(e){if(!e.model.get("axisLabel.inside")){var t=p(e);if(t){var i=e.isHorizontal()?"height":"width",n=e.model.get("axisLabel.margin");r[i]-=t[i]+n,"top"===e.position?r.y+=t.height+n:"left"===e.position&&(r.x+=t.width+n)}}})),o())},C.getAxis=function(e,t){var i=this._axesMap[e];if(null!=i){if(null==t)for(var r in i)if(i.hasOwnProperty(r))return i[r];return i[t]}},C.getAxes=function(){return this._axesList.slice()},C.getCartesian=function(e,t){if(null!=e&&null!=t){var i="x"+e+"y"+t;return this._coordsMap[i]}n(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,a=this._coordsList;r<a.length;r++)if(a[r].getAxis("x").index===e||a[r].getAxis("y").index===t)return a[r]},C.getCartesians=function(){return this._coordsList.slice()},C.convertToPixel=function(e,t,i){var r=this._findConvertTarget(e,t);return r.cartesian?r.cartesian.dataToPoint(i):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(i)):null},C.convertFromPixel=function(e,t,i){var r=this._findConvertTarget(e,t);return r.cartesian?r.cartesian.pointToData(i):r.axis?r.axis.coordToData(r.axis.toLocalCoord(i)):null},C._findConvertTarget=function(e,t){var i,r,n=t.seriesModel,a=t.xAxisModel||n&&n.getReferringComponents("xAxis")[0],o=t.yAxisModel||n&&n.getReferringComponents("yAxis")[0],l=t.gridModel,c=this._coordsList;if(n)i=n.coordinateSystem,s(c,i)<0&&(i=null);else if(a&&o)i=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)r=this.getAxis("x",a.componentIndex);else if(o)r=this.getAxis("y",o.componentIndex);else if(l){l.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:r}},C.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},C._initCartesian=function(e,t,i){var r={left:!1,right:!1,top:!1,bottom:!1},n={x:{},y:{}},o={x:0,y:0};if(t.eachComponent("xAxis",s("x"),this),t.eachComponent("yAxis",s("y"),this),!o.x||!o.y)return this._axesMap={},void(this._axesList=[]);function s(t){return function(i,a){if(_(i,e)){var s=i.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=r.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=r.left?"right":"left"),r[s]=!0;var l=new m(t,u(i),[0,0],i.get("type"),s),c="category"===l.type;l.onBand=c&&i.get("boundaryGap"),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=this,l.index=a,this._axesList.push(l),n[t][a]=l,o[t]++}}}this._axesMap=n,a(n.x,(function(t,i){a(n.y,(function(r,n){var a="x"+i+"y"+n,o=new f(a);o.grid=this,o.model=e,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(r)}),this)}),this)},C._updateScale=function(e,t){function i(e,t,i){a(e.mapDimension(t.dim,!0),(function(i){t.scale.unionExtentFromData(e,y(e,i))}))}a(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(r){if(E(r)){var n=T(r,e),a=n[0],o=n[1];if(!_(a,t)||!_(o,t))return;var s=this.getCartesian(a.componentIndex,o.componentIndex),l=r.getData(),c=s.getAxis("x"),u=s.getAxis("y");"list"===l.type&&(i(l,c,r),i(l,u,r))}}),this)},C.getTooltipAxes=function(e){var t=[],i=[];return a(this.getCartesians(),(function(r){var n=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(n);s(t,n)<0&&t.push(n),s(i,a)<0&&i.push(a)})),{baseAxes:t,otherAxes:i}};var S=["xAxis","yAxis"];function T(e,t){return o(S,(function(t){return e.getReferringComponents(t)[0]}))}function E(e){return"cartesian2d"===e.get("coordinateSystem")}v.create=function(e,t){var i=[];return e.eachComponent("grid",(function(r,n){var a=new v(r,e,t);a.name="grid_"+n,a.resize(r,t,!0),r.coordinateSystem=a,i.push(a)})),e.eachSeries((function(e){if(E(e)){var t=T(e),i=t[0],r=t[1],n=i.getCoordSysModel().coordinateSystem;e.coordinateSystem=n.getCartesian(i.componentIndex,r.componentIndex)}})),i},v.dimensions=v.prototype.dimensions=f.prototype.dimensions,g.register("cartesian2d",v);var w=v;e.exports=w},function(e,t,i){var r=i(0),n={updateSelectedMap:function(e){this._targetList=r.isArray(e)?e.slice():[],this._selectTargetMap=r.reduce(e||[],(function(e,t){return e.set(t.name,t),e}),r.createHashMap())},select:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(e){e.selected=!1})),i&&(i.selected=!0)},unSelect:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);i&&(i.selected=!1)},toggleSelected:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);if(null!=i)return this[i.selected?"unSelect":"select"](e,t),i.selected},isSelected:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);return i&&i.selected}};e.exports=n},function(e,t){t.updateViewOnPan=function(e,t,i){var r=e.target,n=r.position;n[0]+=t,n[1]+=i,r.dirty()},t.updateViewOnZoom=function(e,t,i,r){var n=e.target,a=e.zoomLimit,o=n.position,s=n.scale,l=e.zoom=e.zoom||1;if(l*=t,a){var c=a.min||0,u=a.max||1/0;l=Math.max(Math.min(u,l),c)}var d=l/e.zoom;e.zoom=l,o[0]-=(i-o[0])*(d-1),o[1]-=(r-o[1])*(d-1),s[0]*=d,s[1]*=d,n.dirty()}},function(e,t){t.updateCenterAndZoom=function(e,t,i){var r=e.getZoom(),n=e.getCenter(),a=t.zoom,o=e.dataToPoint(n);if(null!=t.dx&&null!=t.dy){o[0]-=t.dx,o[1]-=t.dy;n=e.pointToData(o);e.setCenter(n)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(r*a,l),s)/r}e.scale[0]*=a,e.scale[1]*=a;var c=e.position,u=(t.originX-c[0])*(a-1),d=(t.originY-c[1])*(a-1);c[0]-=u,c[1]-=d,e.updateTransform();n=e.pointToData(o);e.setCenter(n),e.setZoom(a*r)}return{center:e.getCenter(),zoom:e.getZoom()}}},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(366),o=i(6),s=i(3),l=i(91),c=i(109);function u(e,t){var i=e.get("boundingCoords");if(null!=i){var r=i[0],n=i[1];isNaN(r[0])||isNaN(r[1])||isNaN(n[0])||isNaN(n[1])||this.setBoundingRect(r[0],r[1],n[0]-r[0],n[1]-r[1])}var a,l=this.getBoundingRect(),c=e.get("layoutCenter"),u=e.get("layoutSize"),d=t.getWidth(),h=t.getHeight(),p=l.width/l.height*this.aspectScale,f=!1;if(c&&u&&(c=[s.parsePercent(c[0],d),s.parsePercent(c[1],h)],u=s.parsePercent(u,Math.min(d,h)),isNaN(c[0])||isNaN(c[1])||isNaN(u)||(f=!0)),f){var m={};p>1?(m.width=u,m.height=u/p):(m.height=u,m.width=u*p),m.y=c[1]-m.height/2,m.x=c[0]-m.width/2}else(a=e.getBoxLayoutParams()).aspect=p,m=o.getLayoutRect(a,{width:d,height:h});this.setViewRect(m.x,m.y,m.width,m.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function d(e,t){n.each(t.get("geoCoord"),(function(t,i){e.addGeoCoord(i,t)}))}var h={dimensions:a.prototype.dimensions,create:function(e,t){var i=[];e.eachComponent("geo",(function(e,r){var n=e.get("map"),o=e.get("aspectScale"),s=!0,l=c.retrieveMap(n);l&&l[0]&&"svg"===l[0].type?(null==o&&(o=1),s=!1):null==o&&(o=.75);var h=new a(n+r,n,e.get("nameMap"),s);h.aspectScale=o,h.zoomLimit=e.get("scaleLimit"),i.push(h),d(h,e),e.coordinateSystem=h,h.model=e,h.resize=u,h.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=i[t]}}));var r={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();r[t]=r[t]||[],r[t].push(e)}})),n.each(r,(function(e,r){var o=n.map(e,(function(e){return e.get("nameMap")})),s=new a(r,r,n.mergeAll(o));s.zoomLimit=n.retrieve.apply(null,n.map(e,(function(e){return e.get("scaleLimit")}))),i.push(s),s.resize=u,s.aspectScale=e[0].get("aspectScale"),s.resize(e[0],t),n.each(e,(function(e){e.coordinateSystem=s,d(s,e)}))})),i},getFilledRegions:function(e,t,i){for(var r=(e||[]).slice(),a=n.createHashMap(),o=0;o<r.length;o++)a.set(r[o].name,r[o]);var s=l.load(t,i);return n.each(s.regions,(function(e){var t=e.name;!a.get(t)&&r.push({name:t})})),r}};r.registerCoordinateSystem("geo",h);var p=h;e.exports=p},function(e,t,i){var r=i(0),n=i(8),a=i(15),o=i(9),s=i(78),l=n.applyTransform;function c(){s.call(this)}function u(e){this.name=e,this.zoomLimit,s.call(this),this._roamTransformable=new c,this._rawTransformable=new c,this._center,this._zoom}function d(e,t,i,r){var n=i.seriesModel,a=n?n.coordinateSystem:null;return a===this?a[e](r):null}r.mixin(c,s),u.prototype={constructor:u,type:"view",dimensions:["x","y"],setBoundingRect:function(e,t,i,r){return this._rect=new o(e,t,i,r),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(e,t,i,r){this.transformTo(e,t,i,r),this._viewRect=new o(e,t,i,r)},transformTo:function(e,t,i,r){var n=this.getBoundingRect(),a=this._rawTransformable;a.transform=n.calculateTransform(new o(e,t,i,r)),a.decomposeTransform(),this._updateTransform()},setCenter:function(e){e&&(this._center=e,this._updateCenterAndZoom())},setZoom:function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},getDefaultCenter:function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,i=this.getDefaultCenter(),r=this.getCenter(),a=this.getZoom();r=n.applyTransform([],r,e),i=n.applyTransform([],i,e),t.origin=r,t.position=[i[0]-r[0],i[1]-r[1]],t.scale=[a,a],this._updateTransform()},_updateTransform:function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),a.copy(this.transform||(this.transform=[]),t.transform||a.create()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],a.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,t=this._rawTransformable;return{roamTransform:e?r.slice(e):a.create(),rawScale:r.slice(t.scale),rawPosition:r.slice(t.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},dataToPoint:function(e,t,i){var r=t?this._rawTransform:this.transform;return i=i||[],r?l(i,e,r):n.copy(i,e)},pointToData:function(e){var t=this.invTransform;return t?l([],e,t):[e[0],e[1]]},convertToPixel:r.curry(d,"dataToPoint"),convertFromPixel:r.curry(d,"pointToData"),containPoint:function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])}},r.mixin(u,s);var h=u;e.exports=h},function(e,t,i){var r=i(0),n=i(194),a=i(18),o=i(52),s=function(e,t){this.name=e||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=t};function l(e){this.root,this.data,this._nodes=[],this.hostModel=e}s.prototype={constructor:s,isRemoved:function(){return this.dataIndex<0},eachNode:function(e,t,i){"function"==typeof e&&(i=t,t=e,e=null),e=e||{},r.isString(e)&&(e={order:e});var n,a=e.order||"preorder",o=this[e.attr||"children"];"preorder"===a&&(n=t.call(i,this));for(var s=0;!n&&s<o.length;s++)o[s].eachNode(e,t,i);"postorder"===a&&t.call(i,this)},updateDepthAndHeight:function(e){var t=0;this.depth=e;for(var i=0;i<this.children.length;i++){var r=this.children[i];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},getNodeById:function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,r=i.length;t<r;t++){var n=i[t].getNodeById(e);if(n)return n}},contains:function(e){if(e===this)return!0;for(var t=0,i=this.children,r=i.length;t<r;t++){var n=i[t].contains(e);if(n)return n}},getAncestors:function(e){for(var t=[],i=e?this:this.parentNode;i;)t.push(i),i=i.parentNode;return t.reverse(),t},getValue:function(e){var t=this.hostTree.data;return t.get(t.getDimension(e||"value"),this.dataIndex)},setLayout:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},setVisual:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},getVisual:function(e,t){return this.hostTree.data.getItemVisual(this.dataIndex,e,t)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},isDescendantOf:function(e){return e!==this&&e.isAncestorOf(this)}},l.prototype={constructor:l,type:"tree",eachNode:function(e,t,i){this.root.eachNode(e,t,i)},getNodeByDataIndex:function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},getNodeByName:function(e){return this.root.getNodeByName(e)},update:function(){for(var e=this.data,t=this._nodes,i=0,r=t.length;i<r;i++)t[i].dataIndex=-1;for(i=0,r=e.count();i<r;i++)t[e.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},l.createTree=function(e,t,i){var c=new l(t),u=[],d=1;!function e(t,i){var n=t.value;d=Math.max(d,r.isArray(n)?n.length:1),u.push(t);var a=new s(t.name,c);i?function(e,t){var i=t.children;if(e.parentNode===t)return;i.push(e),e.parentNode=t}(a,i):c.root=a,c._nodes.push(a);var o=t.children;if(o)for(var l=0;l<o.length;l++)e(o[l],a)}(e),c.root.updateDepthAndHeight(0);var h=o(u,{coordDimensions:["value"],dimensionsCount:d}),p=new a(h,t);return p.initData(u),i&&i(p),n({mainData:p,struct:c,structAttr:"tree"}),c.update(),c};var c=l;e.exports=c},function(e,t,i){var r=i(2),n=i(119);function a(e){this._ctor=e||n,this.group=new r.Group}var o=a.prototype;function s(e){var t=e.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),hoverLineStyle:t.getModel("emphasis.lineStyle").getLineStyle(),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label")}}function l(e){return isNaN(e[0])||isNaN(e[1])}function c(e){return!l(e[0])&&!l(e[1])}o.isPersistent=function(){return!0},o.updateData=function(e){var t=this,i=t.group,r=t._lineData;t._lineData=e,r||i.removeAll();var n=s(e);e.diff(r).add((function(i){!function(e,t,i,r){if(!c(t.getItemLayout(i)))return;var n=new e._ctor(t,i,r);t.setItemGraphicEl(i,n),e.group.add(n)}(t,e,i,n)})).update((function(i,a){!function(e,t,i,r,n,a){var o=t.getItemGraphicEl(r);if(!c(i.getItemLayout(n)))return void e.group.remove(o);o?o.updateData(i,n,a):o=new e._ctor(i,n,a);i.setItemGraphicEl(n,o),e.group.add(o)}(t,r,e,a,i,n)})).remove((function(e){i.remove(r.getItemGraphicEl(e))})).execute()},o.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,i){t.updateLayout(e,i)}),this)},o.incrementalPrepareUpdate=function(e){this._seriesScope=s(e),this._lineData=null,this.group.removeAll()},o.incrementalUpdate=function(e,t){function i(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=e.useHoverLayer=!0)}for(var r=e.start;r<e.end;r++){if(c(t.getItemLayout(r))){var n=new this._ctor(t,r,this._seriesScope);n.traverse(i),this.group.add(n),t.setItemGraphicEl(r,n)}}},o.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},o._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var u=a;e.exports=u},function(e,t,i){var r=i(0),n=i(8),a=i(19),o=i(389),s=i(2),l=i(3).round,c=["fromSymbol","toSymbol"];function u(e){return"_"+e+"Type"}function d(e,t,i){var n=t.getItemVisual(i,e);if(n&&"none"!==n){var o=t.getItemVisual(i,"color"),s=t.getItemVisual(i,e+"Size"),l=t.getItemVisual(i,e+"Rotate");r.isArray(s)||(s=[s,s]);var c=a.createSymbol(n,-s[0]/2,-s[1]/2,s[0],s[1],o);return c.__specifiedRotation=null==l||isNaN(l)?void 0:+l*Math.PI/180||0,c.name=e,c}}function h(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var i=t[2];i?(e.cpx1=i[0],e.cpy1=i[1]):(e.cpx1=NaN,e.cpy1=NaN)}function p(e,t,i){s.Group.call(this),this._createLine(e,t,i)}var f=p.prototype;f.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),i=this.childOfName("label");if(e||t||!i.ignore){for(var r=1,a=this.parent;a;)a.scale&&(r/=a.scale[0]),a=a.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),c=o.pointAt(s),u=n.sub([],c,l);if(n.normalize(u,u),e){if(e.attr("position",l),null==(h=e.__specifiedRotation)){var d=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(d[1],d[0]))}else e.attr("rotation",h);e.attr("scale",[r*s,r*s])}if(t){var h;if(t.attr("position",c),null==(h=t.__specifiedRotation)){d=o.tangentAt(1);t.attr("rotation",-Math.PI/2-Math.atan2(d[1],d[0]))}else t.attr("rotation",h);t.attr("scale",[r*s,r*s])}if(!i.ignore){var p,f,m,g;i.attr("position",c);var y=i.__labelDistance,_=y[0]*r,v=y[1]*r,C=s/2,x=[(d=o.tangentAt(C))[1],-d[0]],b=o.pointAt(C);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var S,T=d[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var E=-Math.atan2(d[1],d[0]);c[0]<l[0]&&(E=Math.PI+E),i.attr("rotation",E)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-v,m="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=v,m="top";break;default:S=0,m="middle"}switch(i.__position){case"end":p=[u[0]*_+c[0],u[1]*v+c[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",m=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":p=[-u[0]*_+l[0],-u[1]*v+l[1]],f=u[0]>.8?"right":u[0]<-.8?"left":"center",m=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":p=[_*T+l[0],l[1]+S],f=d[0]<0?"right":"left",g=[-_*T,-S];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":p=[b[0],b[1]+S],f="center",g=[0,-S];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":p=[-_*T+c[0],c[1]+S],f=d[0]>=0?"right":"left",g=[_*T,-S]}i.attr({style:{textVerticalAlign:i.__verticalAlign||m,textAlign:i.__textAlign||f},position:p,scale:[r,r],origin:g})}}}},f._createLine=function(e,t,i){var n=e.hostModel,a=function(e){var t=new o({name:"line",subPixelOptimize:!0});return h(t.shape,e),t}(e.getItemLayout(t));a.shape.percent=0,s.initProps(a,{shape:{percent:1}},n,t),this.add(a);var l=new s.Text({name:"label",lineLabelOriginalOpacity:1});this.add(l),r.each(c,(function(i){var r=d(i,e,t);this.add(r),this[u(i)]=e.getItemVisual(t,i)}),this),this._updateCommonStl(e,t,i)},f.updateData=function(e,t,i){var n=e.hostModel,a=this.childOfName("line"),o=e.getItemLayout(t),l={shape:{}};h(l.shape,o),s.updateProps(a,l,n,t),r.each(c,(function(i){var r=e.getItemVisual(t,i),n=u(i);if(this[n]!==r){this.remove(this.childOfName(i));var a=d(i,e,t);this.add(a)}this[n]=r}),this),this._updateCommonStl(e,t,i)},f._updateCommonStl=function(e,t,i){var n=e.hostModel,a=this.childOfName("line"),o=i&&i.lineStyle,u=i&&i.hoverLineStyle,d=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||e.hasItemOption){var p=e.getItemModel(t);o=p.getModel("lineStyle").getLineStyle(),u=p.getModel("emphasis.lineStyle").getLineStyle(),d=p.getModel("label"),h=p.getModel("emphasis.label")}var f=e.getItemVisual(t,"color"),m=r.retrieve3(e.getItemVisual(t,"opacity"),o.opacity,1);a.useStyle(r.defaults({strokeNoScale:!0,fill:"none",stroke:f,opacity:m},o)),a.hoverStyle=u,r.each(c,(function(e){var t=this.childOfName(e);t&&(t.setColor(f),t.setStyle({opacity:m}))}),this);var g,y,_=d.getShallow("show"),v=h.getShallow("show"),C=this.childOfName("label");if((_||v)&&(g=f||"#000",null==(y=n.getFormattedLabel(t,"normal",e.dataType)))){var x=n.getRawValue(t);y=null==x?e.getName(t):isFinite(x)?l(x):x}var b=_?y:null,S=v?r.retrieve2(n.getFormattedLabel(t,"emphasis",e.dataType),y):null,T=C.style;if(null!=b||null!=S){s.setTextStyle(C.style,d,{text:b},{autoColor:g}),C.__textAlign=T.textAlign,C.__verticalAlign=T.textVerticalAlign,C.__position=d.get("position")||"middle";var E=d.get("distance");r.isArray(E)||(E=[E,E]),C.__labelDistance=E}C.hoverStyle=null!=S?{text:S,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},C.ignore=!_&&!v,s.setHoverStyle(this)},f.highlight=function(){this.trigger("emphasis")},f.downplay=function(){this.trigger("normal")},f.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},f.setLinePoints=function(e){var t=this.childOfName("line");h(t.shape,e),t.dirty()},r.inherits(p,s.Group);var m=p;e.exports=m},function(e,t){t.getNodeGlobalScale=function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=e.option.nodeScaleRatio,r=t.scale,n=r&&r[0]||1;return((t.getZoom()-1)*i+1)/n},t.getSymbolSize=function(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(39),a=i(2),o=i(192),s=i(43),l=r.curry,c=r.each,u=r.map,d=Math.min,h=Math.max,p=Math.pow,f={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},m={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},g={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},y=0;function _(e){n.call(this),this._zr=e,this.group=new a.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+y++,this._handlers={},c(H,(function(e,t){this._handlers[t]=r.bind(e,this)}),this)}function v(e,t){var i=j[t.brushType].createCover(e,t);return i.__brushOption=t,b(i,t),e.group.add(i),i}function C(e,t){var i=T(t);return i.endCreating&&(i.endCreating(e,t),b(t,t.__brushOption)),t}function x(e,t){var i=t.__brushOption;T(t).updateCoverShape(e,t,i.range,i)}function b(e,t){var i=t.z;null==i&&(i=1e4),e.traverse((function(e){e.z=i,e.z2=i}))}function S(e,t){T(t).updateCommon(e,t),x(e,t)}function T(e){return j[e.__brushOption.brushType]}function E(e,t,i){var r,n=e._panels;if(!n)return!0;var a=e._transform;return c(n,(function(e){e.isTargetByCursor(t,i,a)&&(r=e)})),r}function w(e,t){var i=e._panels;if(!i)return!0;var r=t.__brushOption.panelId;return null==r||i[r]}function A(e){var t=e._covers,i=t.length;return c(t,(function(t){e.group.remove(t)}),e),t.length=0,!!i}function P(e,t){var i=u(e._covers,(function(e){var t=e.__brushOption,i=r.clone(t.range);return{brushType:t.brushType,panelId:t.panelId,range:i}}));e.trigger("brush",i,{isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function D(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function M(e,t,i,r){var n=new a.Group;return n.add(new a.Rect({name:"main",style:L(i),silent:!0,draggable:!0,cursor:"move",drift:l(e,t,n,"nswe"),ondragend:l(P,t,{isEnd:!0})})),c(r,(function(i){n.add(new a.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:l(e,t,n,i),ondragend:l(P,t,{isEnd:!0})}))})),n}function I(e,t,i,r){var n=r.brushStyle.lineWidth||0,a=h(n,6),o=i[0][0],s=i[1][0],l=o-n/2,c=s-n/2,u=i[0][1],d=i[1][1],p=u-a+n/2,f=d-a+n/2,m=u-o,g=d-s,y=m+n,_=g+n;O(e,t,"main",o,s,m,g),r.transformable&&(O(e,t,"w",l,c,a,_),O(e,t,"e",p,c,a,_),O(e,t,"n",l,c,y,a),O(e,t,"s",l,f,y,a),O(e,t,"nw",l,c,a,a),O(e,t,"ne",p,c,a,a),O(e,t,"sw",l,f,a,a),O(e,t,"se",p,f,a,a))}function R(e,t){var i=t.__brushOption,r=i.transformable,n=t.childAt(0);n.useStyle(L(i)),n.attr({silent:!r,cursor:r?"move":"default"}),c(["w","e","n","s","se","sw","ne","nw"],(function(i){var n=t.childOfName(i),o=function e(t,i){if(i.length>1)return i=i.split(""),("e"===(r=[e(t,i[0]),e(t,i[1])])[0]||"w"===r[0])&&r.reverse(),r.join("");var r;return{left:"w",right:"e",top:"n",bottom:"s"}[r=a.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[i],function(e){return a.getTransform(e.group)}(t))]}(e,i);n&&n.attr({silent:!r,invisible:!r,cursor:r?m[o]+"-resize":null})}))}function O(e,t,i,r,n,a,o){var s,l,c,u,p,f=t.childOfName(i);f&&f.setShape((s=k(e,t,[[r,n],[r+a,n+o]]),l=d(s[0][0],s[1][0]),c=d(s[0][1],s[1][1]),u=h(s[0][0],s[1][0]),p=h(s[0][1],s[1][1]),{x:l,y:c,width:u-l,height:p-c}))}function L(e){return r.defaults({strokeNoScale:!0},e.brushStyle)}function N(e,t,i,r){var n=[d(e,i),d(t,r)],a=[h(e,i),h(t,r)];return[[n[0],a[0]],[n[1],a[1]]]}function F(e,t,i,r,n,a,o,s){var l=r.__brushOption,u=e(l.range),d=V(i,a,o);c(n.split(""),(function(e){var t=f[e];u[t[0]][t[1]]+=d[t[0]]})),l.range=t(N(u[0][0],u[1][0],u[0][1],u[1][1])),S(i,r),P(i,{isEnd:!1})}function B(e,t,i,r,n){var a=t.__brushOption.range,o=V(e,i,r);c(a,(function(e){e[0]+=o[0],e[1]+=o[1]})),S(e,t),P(e,{isEnd:!1})}function V(e,t,i){var r=e.group,n=r.transformCoordToLocal(t,i),a=r.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function k(e,t,i){var n=w(e,t);return n&&!0!==n?n.clipPath(i,e._transform):r.clone(i)}function z(e){var t=e.event;t.preventDefault&&t.preventDefault()}function G(e,t,i){return e.childOfName("main").contain(t,i)}function U(e,t,i,n){var a,o=e._creatingCover,s=e._creatingPanel,l=e._brushOption;if(e._track.push(i.slice()),function(e){var t=e._track;if(!t.length)return!1;var i=t[t.length-1],r=t[0],n=i[0]-r[0],a=i[1]-r[1];return p(n*n+a*a,.5)>6}(e)||o){if(s&&!o){"single"===l.brushMode&&A(e);var c=r.clone(l);c.brushType=$(c.brushType,s),c.panelId=!0===s?null:s.panelId,o=e._creatingCover=v(e,c),e._covers.push(o)}if(o){var u=j[$(e._brushType,s)];o.__brushOption.range=u.getCreatingRange(k(e,o,e._track)),n&&(C(e,o),u.updateCommon(e,o)),x(e,o),a={isEnd:n}}}else n&&"single"===l.brushMode&&l.removeOnClick&&E(e,t,i)&&A(e)&&(a={isEnd:n,removeOnClick:!0});return a}function $(e,t){return"auto"===e?t.defaultBrushType:e}_.prototype={constructor:_,enableBrush:function(e){var t,i;return this._brushType&&(i=(t=this)._zr,o.release(i,"globalPan",t._uid),function(e,t){c(t,(function(t,i){e.off(i,t)}))}(i,t._handlers),t._brushType=t._brushOption=null),e.brushType&&function(e,t){var i=e._zr;e._enableGlobalPan||o.take(i,"globalPan",e._uid);(function(e,t){c(t,(function(t,i){e.on(i,t)}))})(i,e._handlers),e._brushType=t.brushType,e._brushOption=r.merge(r.clone(g),t,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var t=this._panels={};r.each(e,(function(e){t[e.panelId]=r.clone(e)}))}else this._panels=null;return this},mount:function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({position:e.position||[0,0],rotation:e.rotation||0,scale:e.scale||[1,1]}),this._transform=t.getLocalTransform(),this},eachCover:function(e,t){c(this._covers,e,t)},updateCovers:function(e){e=r.map(e,(function(e){return r.merge(r.clone(g),e,!0)}));var t=this._covers,i=this._covers=[],n=this,a=this._creatingCover;return new s(t,e,(function(e,t){return o(e.__brushOption,t)}),o).add(l).update(l).remove((function(e){t[e]!==a&&n.group.remove(t[e])})).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function l(r,o){var s=e[r];if(null!=o&&t[o]===a)i[r]=t[o];else{var l=i[r]=null!=o?(t[o].__brushOption=s,t[o]):C(n,v(n,s));S(n,l)}}},unmount:function(){return this.enableBrush(!1),A(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},r.mixin(_,n);var H={mousedown:function(e){if(this._dragging)W(this,e);else if(!e.target||!e.target.draggable){z(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=E(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,i=e.offsetY,r=this.group.transformCoordToLocal(t,i);if(function(e,t,i){if(e._brushType&&!function(e,t,i){var r=e._zr;return t<0||t>r.getWidth()||i<0||i>r.getHeight()}(e,t)){var r=e._zr,n=e._covers,a=E(e,t,i);if(!e._dragging)for(var o=0;o<n.length;o++){var s=n[o].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&j[s.brushType].contain(n[o],i[0],i[1]))return}a&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){z(e);var n=U(this,e,r,!1);n&&P(this,n)}},mouseup:function(e){W(this,e)}};function W(e,t){if(e._dragging){z(t);var i=t.offsetX,r=t.offsetY,n=e.group.transformCoordToLocal(i,r),a=U(e,t,n,!0);e._dragging=!1,e._track=[],e._creatingCover=null,a&&P(e,a)}}var j={lineX:q(0),lineY:q(1),rect:{createCover:function(e,t){return M(l(F,(function(e){return e}),(function(e){return e})),e,t,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(e){var t=D(e);return N(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,i,r){I(e,t,i,r)},updateCommon:R,contain:G},polygon:{createCover:function(e,t){var i=new a.Group;return i.add(new a.Polyline({name:"main",style:L(t),silent:!0})),i},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new a.Polygon({name:"main",draggable:!0,drift:l(B,e,t),ondragend:l(P,e,{isEnd:!0})}))},updateCoverShape:function(e,t,i,r){t.childAt(0).setShape({points:k(e,t,i)})},updateCommon:R,contain:G}};function q(e){return{createCover:function(t,i){return M(l(F,(function(t){var i=[t,[0,100]];return e&&i.reverse(),i}),(function(t){return t[e]})),t,i,[["w","e"],["n","s"]][e])},getCreatingRange:function(t){var i=D(t);return[d(i[0][e],i[1][e]),h(i[0][e],i[1][e])]},updateCoverShape:function(t,i,r,n){var a,o=w(t,i);if(!0!==o&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e,t._transform);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,a];e&&l.reverse(),I(t,i,l,n)},updateCommon:R,contain:G}}var Y=_;e.exports=Y},function(e,t,i){var r=i(0),n=i(28),a=i(2),o=i(89),s=i(23),l=i(33),c=(0,i(4).makeInner)(),u=r.clone,d=r.bind;function h(){}function p(e,t,i,n){(function e(t,i){if(r.isObject(t)&&r.isObject(i)){var n=!0;return r.each(i,(function(i,r){n=n&&e(t[r],i)})),!!n}return t===i})(c(i).lastProp,n)||(c(i).lastProp=n,t?a.updateProps(i,n,e):(i.stopAnimation(),i.attr(n)))}function f(e,t){e[t.get("label.show")?"show":"hide"]()}function m(e){return{position:e.position.slice(),rotation:e.rotation||0}}function g(e,t,i){var r=t.get("z"),n=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=n&&(e.zlevel=n),e.silent=i)}))}h.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,i,n){var o=t.get("value"),s=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,n||this._lastValue!==o||this._lastStatus!==s){this._lastValue=o,this._lastStatus=s;var l=this._group,c=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(c&&c.hide());l&&l.show(),c&&c.show();var u={};this.makeElOption(u,o,e,t,i);var d=u.graphicKey;d!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=d;var h=this._moveAnimation=this.determineAnimation(e,t);if(l){var f=r.curry(p,t,h);this.updatePointerEl(l,u,f,t),this.updateLabelEl(l,u,f,t)}else l=this._group=new a.Group,this.createPointerEl(l,u,e,t),this.createLabelEl(l,u,e,t),i.getZr().add(l);g(l,t,!0),this._renderHandle(o)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var i=t.get("animation"),r=e.axis,n="category"===r.type,a=t.get("snap");if(!a&&!n)return!1;if("auto"===i||null==i){var s=this.animationThreshold;if(n&&r.getBandWidth()>s)return!0;if(a){var l=o.getAxisInfo(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/l>s}return!1}return!0===i},makeElOption:function(e,t,i,r,n){},createPointerEl:function(e,t,i,r){var n=t.pointer;if(n){var o=c(e).pointerEl=new a[n.type](u(t.pointer));e.add(o)}},createLabelEl:function(e,t,i,r){if(t.label){var n=c(e).labelEl=new a.Rect(u(t.label));e.add(n),f(n,r)}},updatePointerEl:function(e,t,i){var r=c(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),i(r,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,i,r){var n=c(e).labelEl;n&&(n.setStyle(t.label.style),i(n,{shape:t.label.shape,position:t.label.position}),f(n,r))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,c=i.getModel("handle"),u=i.get("status");if(!c.get("show")||!u||"hide"===u)return o&&n.remove(o),void(this._handle=null);this._handle||(t=!0,o=this._handle=a.createIcon(c.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){s.stop(e.event)},onmousedown:d(this._onHandleDragMove,this,0,0),drift:d(this._onHandleDragMove,this),ondragend:d(this._onHandleDragEnd,this)}),n.add(o)),g(o,i,!1);o.setStyle(c.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var h=c.get("size");r.isArray(h)||(h=[h,h]),o.attr("scale",[h[0]/2,h[1]/2]),l.createOrUpdate(this,"_doDispatchAxisPointer",c.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){p(this._axisPointerModel,!t&&this._moveAnimation,this._handle,m(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(m(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(m(r)),c(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},_onHandleDragEnd:function(e){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,r=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(e,t,i){return{x:e[i=i||0],y:e[1-i],width:t[i],height:t[1-i]}}},h.prototype.constructor=h,n.enableClassExtend(h);var y=h;e.exports=y},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(483),a=i(3).parsePercent,o=i(21),s=o.createScaleByModel,l=o.niceScaleExtent,c=i(20),u=i(26).getStackedDimension;function d(e,t){var i=this,n=i.getAngleAxis(),a=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===i){var t=e.getData();r.each(t.mapDimension("radius",!0),(function(e){a.scale.unionExtentFromData(t,u(t,e))})),r.each(t.mapDimension("angle",!0),(function(e){n.scale.unionExtentFromData(t,u(t,e))}))}})),l(n.scale,n.model),l(a.scale,a.model),"category"===n.type&&!n.onBand){var o=n.getExtent(),s=360/n.scale.count();n.inverse?o[1]+=s:o[1]-=s,n.setExtent(o[0],o[1])}}function h(e,t){if(e.type=t.get("type"),e.scale=s(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),"angleAxis"===t.mainType){e.inverse^=t.get("clockwise");var i=t.get("startAngle");e.setExtent(i,i+(e.inverse?-360:360))}t.axis=e,e.model=t}i(486);var p={dimensions:n.prototype.dimensions,create:function(e,t){var i=[];return e.eachComponent("polar",(function(e,o){var s=new n(o);s.update=d;var l=s.getRadiusAxis(),c=s.getAngleAxis(),u=e.findAxisModel("radiusAxis"),p=e.findAxisModel("angleAxis");h(l,u),h(c,p),function(e,t,i){var n=t.get("center"),o=i.getWidth(),s=i.getHeight();e.cx=a(n[0],o),e.cy=a(n[1],s);var l=e.getRadiusAxis(),c=Math.min(o,s)/2,u=t.get("radius");null==u?u=[0,"100%"]:r.isArray(u)||(u=[0,u]),u=[a(u[0],c),a(u[1],c)],l.inverse?l.setExtent(u[1],u[0]):l.setExtent(u[0],u[1])}(s,e,t),i.push(s),e.coordinateSystem=s,s.model=e})),e.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=i.coordinateSystem}})),i}};c.register("polar",p)},function(e,t,i){i(13).registerSubTypeDefaulter("dataZoom",(function(){return"slider"}))},function(e,t,i){var r=i(0),n=i(7),a=["cartesian2d","polar","singleAxis"];function o(e,t){e=e.slice();var i=r.map(e,n.capitalFirst);t=(t||[]).slice();var a=r.map(t,n.capitalFirst);return function(n,o){r.each(e,(function(e,r){for(var s={name:e,capital:i[r]},l=0;l<t.length;l++)s[t[l]]=e+a[l];n.call(o,s)}))}}var s=o(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);t.isCoordSupported=function(e){return r.indexOf(a,e)>=0},t.createNameEach=o,t.eachAxisDim=s,t.createLinkedNodesFinder=function(e,t,i){return function(a){var o,s={nodes:[],records:{}};if(t((function(e){s.records[e.name]={}})),!a)return s;n(a,s);do{o=!1,e(l)}while(o);function l(e){!function(e,t){return r.indexOf(t.nodes,e)>=0}(e,s)&&function(e,n){var a=!1;return t((function(t){r.each(i(e,t)||[],(function(e){n.records[t.name][e]&&(a=!0)}))})),a}(e,s)&&(n(e,s),o=!0)}return s};function n(e,n){n.nodes.push(e),t((function(t){r.each(i(e,t)||[],(function(e){n.records[t.name][e]=!0}))}))}}},function(e,t,i){var r=i(1),n=i(0),a=n.createHashMap,o=n.each;r.registerProcessor({getTargetSeries:function(e){var t=a();return e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,i,r){var n=r.getAxisProxy(e.name,i);o(n.getTargetSeriesModels(),(function(e){t.set(e.uid,e)}))}))})),t},modifyOutputEnd:!0,overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,i,r){r.getAxisProxy(e.name,i).reset(r,t)})),e.eachTargetAxis((function(e,i,r){r.getAxisProxy(e.name,i).filterData(r,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy(),i=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:r[0],endValue:r[1]})}))}})},function(e,t,i){var r=i(1),n=i(0),a=i(125);r.registerAction("dataZoom",(function(e,t){var i=a.createLinkedNodesFinder(n.bind(t.eachComponent,t,"dataZoom"),a.eachAxisDim,(function(e,t){return e.get(t.axisIndex)})),r=[];t.eachComponent({mainType:"dataZoom",query:e},(function(e,t){r.push.apply(r,i(e).nodes)})),n.each(r,(function(t,i){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(11),o=i(4),s=i(7),l=i(107),c=s.addCommas,u=s.encodeHTML;function d(e){o.defaultEmphasis(e,"label",["show"])}var h=r.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(e,t,i){this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},isAnimationEnabled:function(){if(a.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},mergeOption:function(e,t){this._mergeOption(e,t,!1,!1)},_mergeOption:function(e,t,i,r){var a=this.constructor,o=this.mainType+"Model";i||t.eachSeries((function(e){var i=e.get(this.mainType,!0),s=e[o];i&&i.data?(s?s._mergeOption(i,t,!0):(r&&d(i),n.each(i.data,(function(e){e instanceof Array?(d(e[0]),d(e[1])):d(e)})),s=new a(i,this,t),n.extend(s,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),s.__hostSeries=e),e[o]=s):e[o]=null}),this)},formatTooltip:function(e,t,i,r){var a=this.getData(),o=this.getRawValue(e),s=n.isArray(o)?n.map(o,c).join(", "):c(o),l=a.getName(e),d=u(this.name);return(null!=o||l)&&(d+="html"===r?"<br/>":"\n"),l&&(d+=u(l),null!=o&&(d+=" : ")),null!=o&&(d+=u(s)),d},getData:function(){return this._data},setData:function(e){this._data=e}});n.mixin(h,l);var p=h;e.exports=p},function(e,t,i){var r=i(0),n=i(3),a=i(26).isDimensionStacked,o=r.indexOf;function s(e,t,i,r,o,s){var l=[],c=a(t,r)?t.getCalculationInfo("stackResultDimension"):r,u=d(t,c,e),h=t.indicesOfNearest(c,u)[0];l[o]=t.get(i,h),l[s]=t.get(c,h);var p=t.get(r,h),f=n.getPrecision(t.get(r,h));return(f=Math.min(f,20))>=0&&(l[s]=+l[s].toFixed(f)),[l,p]}var l=r.curry,c={min:l(s,"min"),max:l(s,"max"),average:l(s,"average")};function u(e,t,i,r){var n={};return null!=e.valueIndex||null!=e.valueDim?(n.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,n.valueAxis=i.getAxis(function(e,t){var i=e.getData(),r=i.dimensions;t=i.getDimension(t);for(var n=0;n<r.length;n++){var a=i.getDimensionInfo(r[n]);if(a.name===t)return a.coordDim}}(r,n.valueDataDim)),n.baseAxis=i.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=r.getBaseAxis(),n.valueAxis=i.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function d(e,t,i){if("average"===i){var r=0,n=0;return e.each(t,(function(e,t){isNaN(e)||(r+=e,n++)})),r/n}return"median"===i?e.getMedian(t):e.getDataExtent(t,!0)["max"===i?1:0]}t.dataTransform=function(e,t){var i=e.getData(),n=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!r.isArray(t.coord)&&n){var a=n.dimensions,s=u(t,i,n,e);if((t=r.clone(t)).type&&c[t.type]&&s.baseAxis&&s.valueAxis){var l=o(a,s.baseAxis.dim),h=o(a,s.valueAxis.dim),p=c[t.type](i,s.baseDataDim,s.valueDataDim,l,h);t.coord=p[0],t.value=p[1]}else{for(var f=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],m=0;m<2;m++)c[f[m]]&&(f[m]=d(i,i.mapDimension(a[m]),f[m]));t.coord=f}}return t},t.getAxisInfo=u,t.dataFilter=function(e,t){return!(e&&e.containData&&t.coord&&!function(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}(t))||e.containData(t.coord)},t.dimValueGetter=function(e,t,i,r){return r<2?e.coord&&e.coord[r]:e.value},t.numCalculate=d},function(e,t,i){var r=i(1),n=i(0),a=r.extendComponentView({type:"marker",init:function(){this.markerGroupMap=n.createHashMap()},render:function(e,t,i){var r=this.markerGroupMap;r.each((function(e){e.__keep=!1}));var n=this.type+"Model";t.eachSeries((function(e){var r=e[n];r&&this.renderSeries(e,r,t,i)}),this),r.each((function(e){!e.__keep&&this.group.remove(e.group)}),this)},renderSeries:function(){}});e.exports=a},function(e,t,i){var r=i(132).createElement,n=i(50),a=i(9),o=i(15),s=i(17),l=i(81),c=i(41),u=n.CMD,d=Array.prototype.join,h=Math.round,p=Math.sin,f=Math.cos,m=Math.PI,g=2*Math.PI,y=180/m;function _(e){return h(1e4*e)/1e4}function v(e){return e<1e-4&&e>-1e-4}function C(e,t){t&&x(e,"transform","matrix("+d.call(t,",")+")")}function x(e,t,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&e.setAttribute(t,i)}function b(e,t,i,r){if(function(e,t){var i=t?e.textFill:e.fill;return null!=i&&"none"!==i}(t,i)){var n=i?t.textFill:t.fill;x(e,"fill",n="transparent"===n?"none":n),x(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else x(e,"fill","none");if(function(e,t){var i=t?e.textStroke:e.stroke;return null!=i&&"none"!==i}(t,i)){var a=i?t.textStroke:t.stroke;x(e,"stroke",a="transparent"===a?"none":a),x(e,"stroke-width",(i?t.textStrokeWidth:t.lineWidth)/(!i&&t.strokeNoScale?r.getLineScale():1)),x(e,"paint-order",i?"stroke":"fill"),x(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(x(e,"stroke-dasharray",t.lineDash.join(",")),x(e,"stroke-dashoffset",h(t.lineDashOffset||0))):x(e,"stroke-dasharray",""),t.lineCap&&x(e,"stroke-linecap",t.lineCap),t.lineJoin&&x(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&x(e,"stroke-miterlimit",t.miterLimit)}else x(e,"stroke","none")}var S={};S.brush=function(e){var t=e.style,i=e.__svgEl;i||(i=r("path"),e.__svgEl=i),e.path||e.createPathProxy();var n=e.path;if(e.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,e.buildPath(n,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],i=e.data,r=e.len(),n=0;n<r;){var a="",o=0;switch(i[n++]){case u.M:a="M",o=2;break;case u.L:a="L",o=2;break;case u.Q:a="Q",o=4;break;case u.C:a="C",o=6;break;case u.A:var s=i[n++],l=i[n++],c=i[n++],d=i[n++],C=i[n++],x=i[n++],b=i[n++],S=i[n++],T=Math.abs(x),E=v(T-g)||(S?x>=g:-x>=g),w=x>0?x%g:x%g+g,A=!1;A=!!E||!v(T)&&w>=m==!!S;var P=_(s+c*f(C)),D=_(l+d*p(C));E&&(x=S?g-1e-4:1e-4-g,A=!0,9===n&&t.push("M",P,D));var M=_(s+c*f(C+x)),I=_(l+d*p(C+x));t.push("A",_(c),_(d),h(b*y),+A,+S,M,I);break;case u.Z:a="Z";break;case u.R:M=_(i[n++]),I=_(i[n++]);var R=_(i[n++]),O=_(i[n++]);t.push("M",M,I,"L",M+R,I,"L",M+R,I+O,"L",M,I+O,"L",M,I)}a&&t.push(a);for(var L=0;L<o;L++)t.push(_(i[n++]))}return t.join(" ")}(n);a.indexOf("NaN")<0&&x(i,"d",a)}b(i,t,!1,e),C(i,e.transform),null!=t.text?M(e,e.getBoundingRect()):R(e)};var T={brush:function(e){var t=e.style,i=t.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=t.x||0,a=t.y||0,o=t.width,s=t.height,l=e.__svgEl;l||(l=r("image"),e.__svgEl=l),i!==e.__imageSrc&&(!function(e,t,i){e.setAttributeNS("http://www.w3.org/1999/xlink",t,i)}(l,"href",i),e.__imageSrc=i),x(l,"width",o),x(l,"height",s),x(l,"x",n),x(l,"y",a),C(l,e.transform),null!=t.text?M(e,e.getBoundingRect()):R(e)}}},E={},w=new a,A={},P=[],D={left:"start",right:"end",center:"middle",middle:"middle"},M=function(e,t){var i=e.style,n=e.transform,a=e instanceof c||i.transformText;e.__dirty&&l.normalizeTextStyle(i,!0);var u=i.text;if(null!=u&&(u+=""),l.needDrawText(u,i)){null==u&&(u=""),!a&&n&&(w.copy(t),w.applyTransform(n),t=w);var d=e.__textSvgEl;d||(d=r("text"),e.__textSvgEl=d);var h=d.style,p=i.font||s.DEFAULT_FONT,f=d.__computedFont;p!==d.__styleFont&&(h.font=d.__styleFont=p,f=d.__computedFont=h.font);var m=i.textPadding,g=i.textLineHeight,y=e.__textCotentBlock;y&&!e.__dirtyText||(y=e.__textCotentBlock=s.parsePlainText(u,f,m,g,i.truncate));var _=y.outerHeight,v=y.lineHeight;l.getBoxPosition(A,e,i,t);var x=A.baseX,S=A.baseY,T=A.textAlign||"left",E=A.textVerticalAlign;!function(e,t,i,r,n,a,s){o.identity(P),t&&i&&o.copy(P,i);var l=r.textRotation;if(n&&l){var c=r.textOrigin;"center"===c?(a=n.width/2+n.x,s=n.height/2+n.y):c&&(a=c[0]+n.x,s=c[1]+n.y),P[4]-=a,P[5]-=s,o.rotate(P,P,l),P[4]+=a,P[5]+=s}C(e,P)}(d,a,n,i,t,x,S);var D=x,M=s.adjustTextY(S,_,E);m&&(D=function(e,t,i){return"right"===t?e-i[1]:"center"===t?e+i[3]/2-i[1]/2:e+i[3]}(x,T,m),M+=m[0]),M+=v/2,b(d,i,!0,e);var R=y.canCacheByTextString,O=e.__tspanList||(e.__tspanList=[]),L=O.length;if(R&&e.__canCacheByTextString&&e.__text===u){if(e.__dirtyText&&L)for(var N=0;N<L;++N)I(O[N],T,D,M+N*v)}else{e.__text=u,e.__canCacheByTextString=R;var F=y.lines,B=F.length;for(N=0;N<B;N++){var V=O[N],k=F[N];V?V.__zrText!==k&&(V.innerHTML="",V.appendChild(document.createTextNode(k))):(V=O[N]=r("tspan"),d.appendChild(V),V.appendChild(document.createTextNode(k))),I(V,T,D,M+N*v)}if(L>B){for(;N<L;N++)d.removeChild(O[N]);O.length=B}}}};function I(e,t,i,r){x(e,"dominant-baseline","middle"),x(e,"text-anchor",D[t]),x(e,"x",i),x(e,"y",r)}function R(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}E.drawRectText=M,E.brush=function(e){null!=e.style.text?M(e,!1):R(e)},t.path=S,t.image=T,t.text=E},function(e,t){t.createElement=function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},function(e,t,i){var r=i(132).createElement,n=i(0),a=i(10),o=i(48),s=i(41),l=i(131),c=l.path,u=l.image,d=l.text;function h(e,t,i,r,n){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof i?[i]:i,this._markLabel=r,this._domName=n||"_dom",this.nextId=0}h.prototype.createElement=r,h.prototype.getDefs=function(e){var t=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?e?((i=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(i.contains=function(e){var t=i.children;if(!t)return!1;for(var r=t.length-1;r>=0;--r)if(t[r]===e)return!0;return!1}),i):null:i[0]},h.prototype.update=function(e,t){if(e){var i=this.getDefs(!1);if(e[this._domName]&&i.contains(e[this._domName]))"function"==typeof t&&t(e);else{var r=this.add(e);r&&(e[this._domName]=r)}}},h.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},h.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},h.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return n.each(this._tagNames,(function(i){var r=e.getElementsByTagName(i);t=t.concat([].slice.call(r))})),t},h.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;n.each(e,(function(e){e[t._markLabel]="0"}))},h.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},h.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),i=this;n.each(t,(function(t){"1"!==t[i._markLabel]&&e.removeChild(t)}))}},h.prototype.getSvgProxy=function(e){return e instanceof a?c:e instanceof o?u:e instanceof s?d:c},h.prototype.getTextSvgElement=function(e){return e.__textSvgEl},h.prototype.getSvgElement=function(e){return e.__svgEl};var p=h;e.exports=p},function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},function(e,t,i){(function(e){var r=i(244),n=i(137),a=i(254),o=i(255),s=i(96),l=t;l.request=function(t,i){t="string"==typeof t?s.parse(t):a(t);var n=-1===e.location.protocol.search(/^https?:$/)?"http:":"",o=t.protocol||n,l=t.hostname||t.host,c=t.port,u=t.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),t.url=(l?o+"//"+l:"")+(c?":"+c:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new r(t);return i&&d.on("response",i),d},l.get=function(e,t){var i=l.request(e,t);return i.end(),i},l.ClientRequest=r,l.IncomingMessage=n.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=o,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,i(16))},function(e,t,i){(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var i;function r(){if(void 0!==i)return i;if(e.XMLHttpRequest){i=new e.XMLHttpRequest;try{i.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){i=null}}else i=null;return i}function n(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var a=void 0!==e.ArrayBuffer,o=a&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||a&&n("arraybuffer"),t.msstream=!t.fetch&&o&&n("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&a&&n("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&s(r().overrideMimeType),t.vbArray=s(e.VBArray),i=null}).call(this,i(16))},function(e,t,i){(function(e,r,n){var a=i(136),o=i(31),s=i(58),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,i,o,l){var c=this;if(s.Readable.call(c),c._mode=o,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){e.nextTick((function(){c.emit("close")}))})),"fetch"===o){if(c._fetchResponse=i,c.url=i.url,c.statusCode=i.status,c.statusMessage=i.statusText,i.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),a.writableStream){var u=new WritableStream({write:function(e){return new Promise((function(t,i){c._destroyed?i():c.push(new r(e))?t():c._resumeFetch=t}))},close:function(){n.clearTimeout(l),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void i.body.pipeTo(u).catch((function(e){n.clearTimeout(l),c._destroyed||c.emit("error",e)}))}catch(e){}}var d=i.body.getReader();!function e(){d.read().then((function(t){if(!c._destroyed){if(t.done)return n.clearTimeout(l),void c.push(null);c.push(new r(t.value)),e()}})).catch((function(e){n.clearTimeout(l),c._destroyed||c.emit("error",e)}))}()}else{if(c._xhr=t,c._pos=0,c.url=t.responseURL,c.statusCode=t.status,c.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var i=t[1].toLowerCase();"set-cookie"===i?(void 0===c.headers[i]&&(c.headers[i]=[]),c.headers[i].push(t[2])):void 0!==c.headers[i]?c.headers[i]+=", "+t[2]:c.headers[i]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!a.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};o(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,i=null;switch(e._mode){case"text:vbarray":if(t.readyState!==l.DONE)break;try{i=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==i){e.push(new r(i));break}case"text":try{i=t.responseText}catch(t){e._mode="text:vbarray";break}if(i.length>e._pos){var a=i.substr(e._pos);if("x-user-defined"===e._charset){for(var o=new r(a.length),s=0;s<a.length;s++)o[s]=255&a.charCodeAt(s);e.push(o)}else e.push(a,e._charset);e._pos=i.length}break;case"arraybuffer":if(t.readyState!==l.DONE||!t.response)break;i=t.response,e.push(new r(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=t.response,t.readyState!==l.LOADING||!i)break;e.push(new r(new Uint8Array(i)));break;case"ms-stream":if(i=t.response,t.readyState!==l.LOADING)break;var c=new n.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new r(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(i)}e._xhr.readyState===l.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,i(27),i(22).Buffer,i(16))},function(e,t,i){"use strict";(function(t,r){var n=i(75);e.exports=v;var a,o=i(134);v.ReadableState=_;i(97).EventEmitter;var s=function(e,t){return e.listeners(t).length},l=i(139),c=i(98).Buffer,u=t.Uint8Array||function(){};var d=Object.create(i(59));d.inherits=i(31);var h=i(245),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var f,m=i(246),g=i(140);d.inherits(v,l);var y=["error","close","destroy","pause","resume"];function _(e,t){e=e||{};var r=t instanceof(a=a||i(38));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=i(141).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function v(e){if(a=a||i(38),!(this instanceof v))return new v(e);this._readableState=new _(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function C(e,t,i,r,n){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,S(e)}(e,o)):(n||(a=function(e,t){var i;r=t,c.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));var r;return i}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!i?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):E(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function x(e,t,i,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,r?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&S(e)),E(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var i,r=this._readableState;return r.objectMode?i=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),i=!0),C(this,e,t,!1,i)},v.prototype.unshift=function(e){return C(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return f||(f=i(141).StringDecoder),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};function b(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(T,e):T(e))}function T(e){p("emit readable"),e.emit("readable"),D(e)}function E(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(w,e,t))}function w(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}function A(e){p("readable nexttick read 0"),e.read(0)}function P(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():i?function(e,t){var i=t.head,r=1,n=i.data;e-=n.length;for(;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),0===(e-=o)){o===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=c.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,o),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1}v.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):S(this),null;if(0===(e=b(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,n=t.needReadable;return p("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",n=!0),t.ended||t.reading?p("reading or ended",n=!1):n&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=b(i,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,p("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:v;function c(t,r){p("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",y),e.removeListener("finish",_),e.removeListener("drain",d),e.removeListener("error",g),e.removeListener("unpipe",c),i.removeListener("end",u),i.removeListener("end",v),i.removeListener("data",m),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function u(){p("onend"),e.end()}a.endEmitted?n.nextTick(l):i.once("end",l),e.on("unpipe",c);var d=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,D(e))}}(i);e.on("drain",d);var h=!1;var f=!1;function m(t){p("ondata"),f=!1,!1!==e.write(t)||f||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==O(a.pipes,e))&&!h&&(p("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,f=!0),i.pause())}function g(t){p("onerror",t),v(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",_),v()}function _(){p("onfinish"),e.removeListener("close",y),v()}function v(){p("unpipe"),i.unpipe(e)}return i.on("data",m),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",g),e.once("close",y),e.once("finish",_),e.emit("pipe",i),a.flowing||(p("pipe resume"),i.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<n;a++)r[a].emit("unpipe",this,i);return this}var o=O(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i)),this},v.prototype.on=function(e,t){var i=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&S(this):n.nextTick(A,this))}return i},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(P,e,t))}(this,e)),this},v.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",(function(){if(p("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(p("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(t.push(n)||(r=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var a=0;a<y.length;a++)e.on(y[a],this.emit.bind(this,y[a]));return this._read=function(t){p("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=M}).call(this,i(16),i(27))},function(e,t,i){e.exports=i(97).EventEmitter},function(e,t,i){"use strict";var r=i(75);function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var i=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(n,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,i){"use strict";var r=i(251).Buffer,n=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,i=function(e,t,i){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==i?i:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-i))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<e.length?t?t+this.text(e,i):this.text(e,i):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var i=function(e,t,i){var r=t.length-1;if(r<i)return 0;var n=o(t[r]);if(n>=0)return n>0&&(e.lastNeed=n-1),n;if(--r<i||-2===n)return 0;if((n=o(t[r]))>=0)return n>0&&(e.lastNeed=n-2),n;if(--r<i||-2===n)return 0;if((n=o(t[r]))>=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,i){"use strict";e.exports=o;var r=i(38),n=Object.create(i(59));function a(e,t){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,null!=t&&this.push(t),r(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);r.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,i){l(e,t,i)})):l(this,null,null)}function l(e,t,i){if(t)return e.emit("error",t);if(null!=i&&e.push(i),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}n.inherits=i(31),n.inherits(o,r),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,i){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,i){var r=this._transformState;if(r.writecb=i,r.writechunk=e,r.writeencoding=t,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var i=this;r.prototype._destroy.call(this,e,(function(e){t(e),i.emit("close")}))}},function(e,t,i){"use strict";(function(t){var r=i(263);
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */function n(e,t){if(e===t)return 0;for(var i=e.length,r=t.length,n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0}function a(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=i(144),s=Object.prototype.hasOwnProperty,l=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function d(e){return!a(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var h=e.exports=_,p=/\s*function\s+([^\(\s]*)\s*/;function f(e){if(o.isFunction(e)){if(c)return e.name;var t=e.toString().match(p);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(c||!o.isFunction(e))return o.inspect(e);var t=f(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,i,r,n){throw new h.AssertionError({message:i,actual:e,expected:t,operator:r,stackStartFunction:n})}function _(e,t){e||y(e,!0,t,"==",h.ok)}function v(e,t,i,r){if(e===t)return!0;if(a(e)&&a(t))return 0===n(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(d(e)&&d(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(a(e)!==a(t))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,i,r){if(null==e||null==t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(i&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var n=C(e),a=C(t);if(n&&!a||!n&&a)return!1;if(n)return e=l.call(e),t=l.call(t),v(e,t,i);var s,c,u=S(e),d=S(t);if(u.length!==d.length)return!1;for(u.sort(),d.sort(),c=u.length-1;c>=0;c--)if(u[c]!==d[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!v(e[s],t[s],i,r))return!1;return!0}(e,t,i,r))}return i?e===t:e==t}function C(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e,t,i,r){var n;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(r=i,i=null),n=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(i&&i.name?" ("+i.name+").":".")+(r?" "+r:"."),e&&!n&&y(n,i,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&n&&!i;if((!e&&o.isError(n)&&a&&x(n,i)||s)&&y(n,i,"Got unwanted exception"+r),e&&n&&i&&!x(n,i)||!e&&n)throw n}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var i=new Error;if(i.stack){var r=i.stack,n=f(t),a=r.indexOf("\n"+n);if(a>=0){var o=r.indexOf("\n",a+1);r=r.substring(o+1)}this.stack=r}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=_,h.equal=function(e,t,i){e!=t&&y(e,t,i,"==",h.equal)},h.notEqual=function(e,t,i){e==t&&y(e,t,i,"!=",h.notEqual)},h.deepEqual=function(e,t,i){v(e,t,!1)||y(e,t,i,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,i){v(e,t,!0)||y(e,t,i,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,i){v(e,t,!1)&&y(e,t,i,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,i,r){v(t,i,!0)&&y(t,i,r,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,i){e!==t&&y(e,t,i,"===",h.strictEqual)},h.notStrictEqual=function(e,t,i){e===t&&y(e,t,i,"!==",h.notStrictEqual)},h.throws=function(e,t,i){b(!0,e,t,i)},h.doesNotThrow=function(e,t,i){b(!1,e,t,i)},h.ifError=function(e){if(e)throw e},h.strict=r((function e(t,i){t||y(t,!0,i,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var S=Object.keys||function(e){var t=[];for(var i in e)s.call(e,i)&&t.push(i);return t}}).call(this,i(16))},function(e,t,i){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),i={},r=0;r<t.length;r++)i[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return i},n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],i=0;i<arguments.length;i++)t.push(s(arguments[i]));return t.join(" ")}i=1;for(var r=arguments,a=r.length,o=String(e).replace(n,(function(e){if("%%"===e)return"%";if(i>=a)return e;switch(e){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(e){return"[Circular]"}default:return e}})),l=r[i];i<a;l=r[++i])m(l)||!C(l)?o+=" "+l:o+=" "+s(l);return o},t.deprecate=function(i,r){if(void 0!==e&&!0===e.noDeprecation)return i;if(void 0===e)return function(){return t.deprecate(i,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),n=!0}return i.apply(this,arguments)}};var a,o={};function s(e,i){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),f(i)?r.showHidden=i:i&&t._extend(r,i),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,e,r.depth)}function l(e,t){var i=s.styles[t];return i?"["+s.colors[i][0]+"m"+e+"["+s.colors[i][1]+"m":e}function c(e,t){return e}function u(e,i,r){if(e.customInspect&&i&&S(i.inspect)&&i.inspect!==t.inspect&&(!i.constructor||i.constructor.prototype!==i)){var n=i.inspect(r,e);return y(n)||(n=u(e,n,r)),n}var a=function(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}if(g(t))return e.stylize(""+t,"number");if(f(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,i);if(a)return a;var o=Object.keys(i),s=function(e){var t={};return e.forEach((function(e,i){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(i)),b(i)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return d(i);if(0===o.length){if(S(i)){var l=i.name?": "+i.name:"";return e.stylize("[Function"+l+"]","special")}if(v(i))return e.stylize(RegExp.prototype.toString.call(i),"regexp");if(x(i))return e.stylize(Date.prototype.toString.call(i),"date");if(b(i))return d(i)}var c,C="",T=!1,E=["{","}"];(p(i)&&(T=!0,E=["[","]"]),S(i))&&(C=" [Function"+(i.name?": "+i.name:"")+"]");return v(i)&&(C=" "+RegExp.prototype.toString.call(i)),x(i)&&(C=" "+Date.prototype.toUTCString.call(i)),b(i)&&(C=" "+d(i)),0!==o.length||T&&0!=i.length?r<0?v(i)?e.stylize(RegExp.prototype.toString.call(i),"regexp"):e.stylize("[Object]","special"):(e.seen.push(i),c=T?function(e,t,i,r,n){for(var a=[],o=0,s=t.length;o<s;++o)P(t,String(o))?a.push(h(e,t,i,r,String(o),!0)):a.push("");return n.forEach((function(n){n.match(/^\d+$/)||a.push(h(e,t,i,r,n,!0))})),a}(e,i,r,s,o):o.map((function(t){return h(e,i,r,s,t,T)})),e.seen.pop(),function(e,t,i){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+i[1];return i[0]+t+" "+e.join(", ")+" "+i[1]}(c,C,E)):E[0]+C+E[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,i,r,n,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),P(r,n)||(o="["+n+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(i)?u(e,l.value,null):u(e,l.value,i-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),_(o)){if(a&&n.match(/^\d+$/))return s;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function p(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function _(e){return void 0===e}function v(e){return C(e)&&"[object RegExp]"===T(e)}function C(e){return"object"==typeof e&&null!==e}function x(e){return C(e)&&"[object Date]"===T(e)}function b(e){return C(e)&&("[object Error]"===T(e)||e instanceof Error)}function S(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(i){if(_(a)&&(a=e.env.NODE_DEBUG||""),i=i.toUpperCase(),!o[i])if(new RegExp("\\b"+i+"\\b","i").test(a)){var r=e.pid;o[i]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",i,r,e)}}else o[i]=function(){};return o[i]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=f,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=_,t.isRegExp=v,t.isObject=C,t.isDate=x,t.isError=b,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=i(263);var w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),w[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",A(),t.format.apply(t,arguments))},t.inherits=i(264),t._extend=function(e,t){if(!t||!C(t))return e;for(var i=Object.keys(t),r=i.length;r--;)e[i[r]]=t[i[r]];return e};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var i=new Error("Promise was rejected with a falsy value");i.reason=e,e=i}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(D&&e[D]){var t;if("function"!=typeof(t=e[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,i,r=new Promise((function(e,r){t=e,i=r})),n=[],a=0;a<arguments.length;a++)n.push(arguments[a]);n.push((function(e,r){e?i(e):t(r)}));try{e.apply(this,n)}catch(e){i(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),D&&Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=D,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function i(){for(var i=[],r=0;r<arguments.length;r++)i.push(arguments[r]);var n=i.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var a=this,o=function(){return n.apply(a,arguments)};t.apply(this,i).then((function(t){e.nextTick(o,null,t)}),(function(t){e.nextTick(M,t,o)}))}return Object.setPrototypeOf(i,Object.getPrototypeOf(t)),Object.defineProperties(i,r(t)),i}}).call(this,i(27))},function(e,t,i){"use strict";e.exports=function(e,t,i,r){for(var n=65535&e|0,a=e>>>16&65535|0,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{a=a+(n=n+t[r++]|0)|0}while(--o);n%=65521,a%=65521}return n|a<<16|0}},function(e,t,i){"use strict";var r=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();e.exports=function(e,t,i,n){var a=r,o=n+i;e^=-1;for(var s=n;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},function(e,t){var i=2311;e.exports=function(){return i++}},function(e,t,i){var r=i(11),n=i(277).buildTransformer,a=[];function o(e,t,i,a,o){if(t.getBoundingClientRect&&r.domSupported&&!s(t)){var l=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),c=function(e,t,i){for(var r=i?"invTrans":"trans",a=t[r],o=t.srcCoords,s=!0,l=[],c=[],u=0;u<4;u++){var d=e[u].getBoundingClientRect(),h=2*u,p=d.left,f=d.top;l.push(p,f),s=s&&o&&p===o[h]&&f===o[h+1],c.push(e[u].offsetLeft,e[u].offsetTop)}return s&&a?a:(t.srcCoords=l,t[r]=i?n(c,l):n(l,c))}(function(e,t){var i=t.markers;if(i)return i;i=t.markers=[];for(var r=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,c=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",n[c]+":0",r[1-l]+":auto",n[1-c]+":auto",""].join("!important;"),e.appendChild(o),i.push(o)}return i}(t,l),l,o);if(c)return c(e,i,a),!0}return!1}function s(e){return"CANVAS"===e.nodeName.toUpperCase()}t.transformLocalCoord=function(e,t,i,r,n){return o(a,t,r,n,!0)&&o(e,i,a[0],a[1])},t.transformCoordWithViewport=o,t.isCanvasEl=s},function(e,t,i){var r=i(147),n=i(39),a=i(79),o=i(280),s=i(0),l=function(e){a.call(this,e),n.call(this,e),o.call(this,e),this.id=e.id||r()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var i=this[e];i||(i=this[e]=[]),i[0]=t[0],i[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(s.isObject(e))for(var i in e)e.hasOwnProperty(i)&&this.attrKV(i,e[i]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),this.clipPath=e,e.__zr=t,e.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.addAnimator(t[i]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.removeAnimator(t[i]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},s.mixin(l,o),s.mixin(l,a),s.mixin(l,n);var c=l;e.exports=c},function(e,t,i){var r=i(281),n=i(23),a=i(0).isArrayLike,o=Array.prototype.slice;function s(e,t){return e[t]}function l(e,t,i){e[t]=i}function c(e,t,i){return(t-e)*i+e}function u(e,t,i){return i>.5?t:e}function d(e,t,i,r,n){var a=e.length;if(1===n)for(var o=0;o<a;o++)r[o]=c(e[o],t[o],i);else{var s=a&&e[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)r[o][l]=c(e[o][l],t[o][l],i)}}function h(e,t,i){var r=e.length,n=t.length;if(r!==n)if(r>n)e.length=n;else for(var a=r;a<n;a++)e.push(1===i?t[a]:o.call(t[a]));var s=e[0]&&e[0].length;for(a=0;a<e.length;a++)if(1===i)isNaN(e[a])&&(e[a]=t[a]);else for(var l=0;l<s;l++)isNaN(e[a][l])&&(e[a][l]=t[a][l])}function p(e,t,i){if(e===t)return!0;var r=e.length;if(r!==t.length)return!1;if(1===i){for(var n=0;n<r;n++)if(e[n]!==t[n])return!1}else{var a=e[0].length;for(n=0;n<r;n++)for(var o=0;o<a;o++)if(e[n][o]!==t[n][o])return!1}return!0}function f(e,t,i,r,n,a,o,s,l){var c=e.length;if(1===l)for(var u=0;u<c;u++)s[u]=m(e[u],t[u],i[u],r[u],n,a,o);else{var d=e[0].length;for(u=0;u<c;u++)for(var h=0;h<d;h++)s[u][h]=m(e[u][h],t[u][h],i[u][h],r[u][h],n,a,o)}}function m(e,t,i,r,n,a,o){var s=.5*(i-e),l=.5*(r-t);return(2*(t-i)+s+l)*o+(-3*(t-i)-2*s-l)*a+s*n+t}function g(e){if(a(e)){var t=e.length;if(a(e[0])){for(var i=[],r=0;r<t;r++)i.push(o.call(e[r]));return i}return o.call(e)}return e}function y(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function _(e,t,i,o,s,l){var g=e._getter,_=e._setter,v="spline"===t,C=o.length;if(C){var x,b=o[0].value,S=a(b),T=!1,E=!1,w=S?function(e){var t=e[e.length-1].value;return a(t&&t[0])?2:1}(o):0;o.sort((function(e,t){return e.time-t.time})),x=o[C-1].time;for(var A=[],P=[],D=o[0].value,M=!0,I=0;I<C;I++){A.push(o[I].time/x);var R=o[I].value;if(S&&p(R,D,w)||!S&&R===D||(M=!1),D=R,"string"==typeof R){var O=n.parse(R);O?(R=O,T=!0):E=!0}P.push(R)}if(l||!M){var L=P[C-1];for(I=0;I<C-1;I++)S?h(P[I],L,w):!isNaN(P[I])||isNaN(L)||E||T||(P[I]=L);S&&h(g(e._target,s),L,w);var N,F,B,V,k,z=0,G=0;if(T)var U=[0,0,0,0];var $=new r({target:e._target,life:x,loop:e._loop,delay:e._delay,onframe:function(e,t){var i;if(t<0)i=0;else if(t<G){for(i=Math.min(z+1,C-1);i>=0&&!(A[i]<=t);i--);i=Math.min(i,C-2)}else{for(i=z;i<C&&!(A[i]>t);i++);i=Math.min(i-1,C-2)}z=i,G=t;var r=A[i+1]-A[i];if(0!==r)if(N=(t-A[i])/r,v)if(B=P[i],F=P[0===i?i:i-1],V=P[i>C-2?C-1:i+1],k=P[i>C-3?C-1:i+2],S)f(F,B,V,k,N,N*N,N*N*N,g(e,s),w);else{if(T)n=f(F,B,V,k,N,N*N,N*N*N,U,1),n=y(U);else{if(E)return u(B,V,N);n=m(F,B,V,k,N,N*N,N*N*N)}_(e,s,n)}else if(S)d(P[i],P[i+1],N,g(e,s),w);else{var n;if(T)d(P[i],P[i+1],N,U,1),n=y(U);else{if(E)return u(P[i],P[i+1],N);n=c(P[i],P[i+1],N)}_(e,s,n)}},ondestroy:i});return t&&"spline"!==t&&($.easing=t),$}}}var v=function(e,t,i,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=i||s,this._setter=r||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};v.prototype={when:function(e,t){var i=this._tracks;for(var r in t)if(t.hasOwnProperty(r)){if(!i[r]){i[r]=[];var n=this._getter(this._target,r);if(null==n)continue;0!==e&&i[r].push({time:0,value:g(n)})}i[r].push({time:e,value:t[r]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,i=0;i<t;i++)e[i].call(this)},start:function(e,t){var i,r=this,n=0,a=function(){--n||r._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=_(this,e,a,this._tracks[o],o,t);s&&(this._clipList.push(s),n++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(e,t){l(e,t);for(var i=0;i<r._onframeList.length;i++)r._onframeList[i](e,t)}}return n||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,i=this.animation,r=0;r<t.length;r++){var n=t[r];e&&n.onframe(this._target,1),i&&i.removeClip(n)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var C=v;e.exports=C},function(e,t){var i=function(){this.head=null,this.tail=null,this._len=0},r=i.prototype;r.insert=function(e){var t=new n(e);return this.insertEntry(t),t},r.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.len=function(){return this._len},r.clear=function(){this.head=this.tail=null,this._len=0};var n=function(e){this.value=e,this.next,this.prev},a=function(e){this._list=new i,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},o=a.prototype;o.put=function(e,t){var i=this._list,r=this._map,a=null;if(null==r[e]){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new n(t),s.key=e,i.insertEntry(s),r[e]=s}return a},o.get=function(e){var t=this._map[e],i=this._list;if(null!=t)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;e.exports=s},function(e,t){var i={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};e.exports=function(e,t,r){return i.hasOwnProperty(t)?r*e.dpr:r}},function(e,t){var i=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};i.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var r=i;e.exports=r},function(e,t){var i="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)};e.exports=i},function(e,t,i){var r=i(82),n=i(9),a=i(81).WILL_BE_RESTORED,o=new n,s=function(){};s.prototype={constructor:s,drawRectText:function(e,t){var i=this.style;t=i.textRect||t,this.__dirty&&r.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),r.needDrawText(n,i)){e.save();var s=this.transform;i.transformText?this.setTransform(e):s&&(o.copy(t),o.applyTransform(s),t=o),r.renderText(this,e,n,i,t,a),e.restore()}}};var l=s;e.exports=l},function(e,t){t.buildPath=function(e,t){var i,r,n,a,o,s=t.x,l=t.y,c=t.width,u=t.height,d=t.r;c<0&&(s+=c,c=-c),u<0&&(l+=u,u=-u),"number"==typeof d?i=r=n=a=d:d instanceof Array?1===d.length?i=r=n=a=d[0]:2===d.length?(i=n=d[0],r=a=d[1]):3===d.length?(i=d[0],r=a=d[1],n=d[2]):(i=d[0],r=d[1],n=d[2],a=d[3]):i=r=n=a=0,i+r>c&&(i*=c/(o=i+r),r*=c/o),n+a>c&&(n*=c/(o=n+a),a*=c/o),r+n>u&&(r*=u/(o=r+n),n*=u/o),i+a>u&&(i*=u/(o=i+a),a*=u/o),e.moveTo(s+i,l),e.lineTo(s+c-r,l),0!==r&&e.arc(s+c-r,l+r,r,-Math.PI/2,0),e.lineTo(s+c,l+u-n),0!==n&&e.arc(s+c-n,l+u-n,n,0,Math.PI/2),e.lineTo(s+a,l+u),0!==a&&e.arc(s+a,l+u-a,a,Math.PI/2,Math.PI),e.lineTo(s,l+i),0!==i&&e.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.each,a=r.filter,o=r.map,s=r.isArray,l=r.indexOf,c=r.isObject,u=r.isString,d=r.createHashMap,h=r.assert,p=r.clone,f=r.merge,m=r.extend,g=r.mixin,y=i(4),_=i(12),v=i(13),C=i(304),x=i(169),b=i(29).resetSourceDefaulter,S=_.extend({init:function(e,t,i,r){i=i||{},this.option=null,this._theme=new _(i),this._optionManager=r},setOption:function(e,t){h(!("\0_ec_inner"in e),"please use chart.getOption()"),this._optionManager.setOption(e,t),this.resetOption(null)},resetOption:function(e){var t=!1,i=this._optionManager;if(!e||"recreate"===e){var r=i.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this.mergeOption(r)):T.call(this,r),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),t=!0)}if(!e||"recreate"===e||"media"===e){var o=i.getMediaOption(this,this._api);o.length&&n(o,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,i=this._componentsMap,r=[];b(this),n(e,(function(e,i){null!=e&&(v.hasClass(i)?i&&r.push(i):t[i]=null==t[i]?p(e):f(t[i],e,!0))})),v.topologicalTravel(r,v.getAllClassMainTypes(),(function(r,a){var o=y.normalizeToArray(e[r]),l=y.mappingToExists(i.get(r),o);y.makeIdAndName(l),n(l,(function(e,t){var i=e.option;c(i)&&(e.keyInfo.mainType=r,e.keyInfo.subType=function(e,t,i){return t.type?t.type:i?i.subType:v.determineSubType(e,t)}(r,i,e.exist))}));var u=function(e,t){s(t)||(t=t?[t]:[]);var i={};return n(t,(function(t){i[t]=(e.get(t)||[]).slice()})),i}(i,a);t[r]=[],i.set(r,[]),n(l,(function(e,n){var a=e.exist,o=e.option;if(h(c(o)||a,"Empty component definition"),o){var s=v.getClass(r,e.keyInfo.subType,!0);if(a&&a.constructor===s)a.name=e.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var l=m({dependentModels:u,componentIndex:n},e.keyInfo);a=new s(o,this,this,l),m(a,l),a.init(o,this,this,l),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(r)[n]=a,t[r][n]=a.option}),this),"series"===r&&E(this,i.get("series"))}),this),this._seriesIndicesMap=d(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=p(this.option);return n(e,(function(t,i){if(v.hasClass(i)){for(var r=(t=y.normalizeToArray(t)).length-1;r>=0;r--)y.isIdInner(t[r])&&t.splice(r,1);e[i]=t}})),delete e["\0_ec_inner"],e},getTheme:function(){return this._theme},getComponent:function(e,t){var i=this._componentsMap.get(e);if(i)return i[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var i,r=e.index,n=e.id,c=e.name,u=this._componentsMap.get(t);if(!u||!u.length)return[];if(null!=r)s(r)||(r=[r]),i=a(o(r,(function(e){return u[e]})),(function(e){return!!e}));else if(null!=n){var d=s(n);i=a(u,(function(e){return d&&l(n,e.id)>=0||!d&&e.id===n}))}else if(null!=c){var h=s(c);i=a(u,(function(e){return h&&l(c,e.name)>=0||!h&&e.name===c}))}else i=u.slice();return w(i,e)},findComponents:function(e){var t,i,r,n,o,s=e.query,l=e.mainType,c=(i=l+"Index",r=l+"Id",n=l+"Name",!(t=s)||null==t[i]&&null==t[r]&&null==t[n]?null:{mainType:l,index:t[i],id:t[r],name:t[n]}),u=c?this.queryComponents(c):this._componentsMap.get(l);return o=w(u,e),e.filter?a(o,e.filter):o},eachComponent:function(e,t,i){var r=this._componentsMap;if("function"==typeof e)i=t,t=e,r.each((function(e,r){n(e,(function(e,n){t.call(i,r,e,n)}))}));else if(u(e))n(r.get(e),t,i);else if(c(e)){var a=this.findComponents(e);n(a,t,i)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return a(t,(function(t){return t.name===e}))},getSeriesByIndex:function(e){return this._componentsMap.get("series")[e]},getSeriesByType:function(e){var t=this._componentsMap.get("series");return a(t,(function(t){return t.subType===e}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(e,t){n(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];e.call(t,r,i)}),this)},eachRawSeries:function(e,t){n(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,i){n(this._seriesIndices,(function(r){var n=this._componentsMap.get("series")[r];n.subType===e&&t.call(i,n,r)}),this)},eachRawSeriesByType:function(e,t,i){return n(this.getSeriesByType(e),t,i)},isSeriesFiltered:function(e){return null==this._seriesIndicesMap.get(e.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(e,t){E(this,a(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;E(this,t.get("series"));var i=[];t.each((function(e,t){i.push(t)})),v.topologicalTravel(i,v.getAllClassMainTypes(),(function(i,r){n(t.get(i),(function(t){("series"!==i||!function(e,t){if(t){var i=t.seiresIndex,r=t.seriesId,n=t.seriesName;return null!=i&&e.componentIndex!==i||null!=r&&e.id!==r||null!=n&&e.name!==n}}(t,e))&&t.restoreData()}))}))}});function T(e){var t,i,r;e=e,this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=d({series:[]}),this._seriesIndices,this._seriesIndicesMap,t=e,i=this._theme.option,r=t.color&&!t.colorLayer,n(i,(function(e,i){"colorLayer"===i&&r||v.hasClass(i)||("object"==typeof e?t[i]=t[i]?f(t[i],e,!1):p(e):null==t[i]&&(t[i]=e))})),f(e,C,!1),this.mergeOption(e)}function E(e,t){e._seriesIndicesMap=d(e._seriesIndices=o(t,(function(e){return e.componentIndex}))||[])}function w(e,t){return t.hasOwnProperty("subType")?a(e,(function(e){return e.subType===t.subType})):e}g(S,x);var A=S;e.exports=A},function(e,t,i){var r=i(10),n=i(50),a=i(293),o=Math.sqrt,s=Math.sin,l=Math.cos,c=Math.PI,u=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},d=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(u(e)*u(t))},h=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(d(e,t))};function p(e,t,i,r,n,a,u,p,f,m,g){var y=f*(c/180),_=l(y)*(e-i)/2+s(y)*(t-r)/2,v=-1*s(y)*(e-i)/2+l(y)*(t-r)/2,C=_*_/(u*u)+v*v/(p*p);C>1&&(u*=o(C),p*=o(C));var x=(n===a?-1:1)*o((u*u*(p*p)-u*u*(v*v)-p*p*(_*_))/(u*u*(v*v)+p*p*(_*_)))||0,b=x*u*v/p,S=x*-p*_/u,T=(e+i)/2+l(y)*b-s(y)*S,E=(t+r)/2+s(y)*b+l(y)*S,w=h([1,0],[(_-b)/u,(v-S)/p]),A=[(_-b)/u,(v-S)/p],P=[(-1*_-b)/u,(-1*v-S)/p],D=h(A,P);d(A,P)<=-1&&(D=c),d(A,P)>=1&&(D=0),0===a&&D>0&&(D-=2*c),1===a&&D<0&&(D+=2*c),g.addData(m,T,E,u,p,w,D,y,a)}var f=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,m=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function g(e,t){var i=function(e){if(!e)return new n;for(var t,i=0,r=0,a=i,o=r,s=new n,l=n.CMD,c=e.match(f),u=0;u<c.length;u++){for(var d,h=c[u],g=h.charAt(0),y=h.match(m)||[],_=y.length,v=0;v<_;v++)y[v]=parseFloat(y[v]);for(var C=0;C<_;){var x,b,S,T,E,w,A,P=i,D=r;switch(g){case"l":i+=y[C++],r+=y[C++],d=l.L,s.addData(d,i,r);break;case"L":i=y[C++],r=y[C++],d=l.L,s.addData(d,i,r);break;case"m":i+=y[C++],r+=y[C++],d=l.M,s.addData(d,i,r),a=i,o=r,g="l";break;case"M":i=y[C++],r=y[C++],d=l.M,s.addData(d,i,r),a=i,o=r,g="L";break;case"h":i+=y[C++],d=l.L,s.addData(d,i,r);break;case"H":i=y[C++],d=l.L,s.addData(d,i,r);break;case"v":r+=y[C++],d=l.L,s.addData(d,i,r);break;case"V":r=y[C++],d=l.L,s.addData(d,i,r);break;case"C":d=l.C,s.addData(d,y[C++],y[C++],y[C++],y[C++],y[C++],y[C++]),i=y[C-2],r=y[C-1];break;case"c":d=l.C,s.addData(d,y[C++]+i,y[C++]+r,y[C++]+i,y[C++]+r,y[C++]+i,y[C++]+r),i+=y[C-2],r+=y[C-1];break;case"S":x=i,b=r;var M=s.len(),I=s.data;t===l.C&&(x+=i-I[M-4],b+=r-I[M-3]),d=l.C,P=y[C++],D=y[C++],i=y[C++],r=y[C++],s.addData(d,x,b,P,D,i,r);break;case"s":x=i,b=r;M=s.len(),I=s.data;t===l.C&&(x+=i-I[M-4],b+=r-I[M-3]),d=l.C,P=i+y[C++],D=r+y[C++],i+=y[C++],r+=y[C++],s.addData(d,x,b,P,D,i,r);break;case"Q":P=y[C++],D=y[C++],i=y[C++],r=y[C++],d=l.Q,s.addData(d,P,D,i,r);break;case"q":P=y[C++]+i,D=y[C++]+r,i+=y[C++],r+=y[C++],d=l.Q,s.addData(d,P,D,i,r);break;case"T":x=i,b=r;M=s.len(),I=s.data;t===l.Q&&(x+=i-I[M-4],b+=r-I[M-3]),i=y[C++],r=y[C++],d=l.Q,s.addData(d,x,b,i,r);break;case"t":x=i,b=r;M=s.len(),I=s.data;t===l.Q&&(x+=i-I[M-4],b+=r-I[M-3]),i+=y[C++],r+=y[C++],d=l.Q,s.addData(d,x,b,i,r);break;case"A":S=y[C++],T=y[C++],E=y[C++],w=y[C++],A=y[C++],p(P=i,D=r,i=y[C++],r=y[C++],w,A,S,T,E,d=l.A,s);break;case"a":S=y[C++],T=y[C++],E=y[C++],w=y[C++],A=y[C++],p(P=i,D=r,i+=y[C++],r+=y[C++],w,A,S,T,E,d=l.A,s)}}"z"!==g&&"Z"!==g||(d=l.Z,s.addData(d),i=a,r=o),t=d}return s.toStatic(),s}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(i.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;i.rebuildPath(t)}},t.applyTransform=function(e){a(i,e),this.dirty(!0)},t}t.createFromString=function(e,t){return new r(g(e,t))},t.extendFromString=function(e,t){return r.extend(g(e,t))},t.mergePath=function(e,t){for(var i=[],n=e.length,a=0;a<n;a++){var o=e[a];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var s=new r(t);return s.createPathProxy(),s.buildPath=function(e){e.appendPath(i);var t=e.getContext();t&&e.rebuildPath(t)},s}},function(e,t){t.containStroke=function(e,t,i,r,n,a,o){if(0===n)return!1;var s=n,l=0;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>i+s||a<e-s&&a<i-s)return!1;if(e===i)return Math.abs(a-e)<=s/2;var c=(l=(t-r)/(e-i))*a-o+(e*r-i*t)/(e-i);return c*c/(l*l+1)<=s/2*s/2}},function(e,t,i){var r=i(32).quadraticProjectPoint;t.containStroke=function(e,t,i,n,a,o,s,l,c){if(0===s)return!1;var u=s;return!(c>t+u&&c>n+u&&c>o+u||c<t-u&&c<n-u&&c<o-u||l>e+u&&l>i+u&&l>a+u||l<e-u&&l<i-u&&l<a-u)&&r(e,t,i,n,a,o,l,c,null)<=u/2}},function(e,t){var i=2*Math.PI;t.normalizeRadian=function(e){return(e%=i)<0&&(e+=i),e}},function(e,t){e.exports=function(e,t,i,r,n,a){if(a>t&&a>r||a<t&&a<r)return 0;if(r===t)return 0;var o=r<t?1:-1,s=(a-t)/(r-t);1!==s&&0!==s||(o=r<t?.5:-.5);var l=s*(i-e)+e;return l===n?1/0:l>n?o:0}},function(e,t,i){var r=i(10).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,i){i&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}});e.exports=r},function(e,t,i){var r=i(11),n=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];e.exports=function(e){return r.browser.ie&&r.browser.version>=11?function(){var t,i=this.__clipPaths,r=this.style;if(i)for(var a=0;a<i.length;a++){var o=i[a],s=o&&o.shape,l=o&&o.type;if(s&&("sector"===l&&s.startAngle===s.endAngle||"rect"===l&&(!s.width||!s.height))){for(var c=0;c<n.length;c++)n[c][2]=r[n[c][0]],r[n[c][0]]=n[c][1];t=!0;break}}if(e.apply(this,arguments),t)for(c=0;c<n.length;c++)r[n[c][0]]=n[c][2]}:e}},function(e,t,i){var r=i(10),n=i(166),a=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){n.buildPath(e,t,!0)}});e.exports=a},function(e,t,i){var r=i(296),n=i(297);t.buildPath=function(e,t,i){var a=t.points,o=t.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=n(a,o,i,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var l=a.length,c=0;c<(i?l:l-1);c++){var u=s[2*c],d=s[2*c+1],h=a[(c+1)%l];e.bezierCurveTo(u[0],u[1],d[0],d[1],h[0],h[1])}}else{"spline"===o&&(a=r(a,i)),e.moveTo(a[0][0],a[0][1]);c=1;for(var p=a.length;c<p;c++)e.lineTo(a[c][0],a[c][1])}i&&e.closePath()}}},function(e,t,i){var r=i(10),n=i(166),a=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){n.buildPath(e,t,!1)}});e.exports=a},function(e,t,i){var r=i(10),n=i(104).subPixelOptimizeLine,a={},o=r.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i,r,o,s;this.subPixelOptimize?(n(a,t,this.style),i=a.x1,r=a.y1,o=a.x2,s=a.y2):(i=t.x1,r=t.y1,o=t.x2,s=t.y2);var l=t.percent;0!==l&&(e.moveTo(i,r),l<1&&(o=i*(1-l)+o*l,s=r*(1-l)+s*l),e.lineTo(o,s))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}});e.exports=o},function(e,t,i){var r=i(4),n=r.makeInner,a=r.normalizeToArray,o=n();var s={clearColorPalette:function(){o(this).colorIdx=0,o(this).colorNameMap={}},getColorFromPalette:function(e,t,i){var r=o(t=t||this),n=r.colorIdx||0,s=r.colorNameMap=r.colorNameMap||{};if(s.hasOwnProperty(e))return s[e];var l=a(this.get("color",!0)),c=this.get("colorLayer",!0),u=null!=i&&c?function(e,t){for(var i=e.length,r=0;r<i;r++)if(e[r].length>t)return e[r];return e[i-1]}(c,i):l;if((u=u||l)&&u.length){var d=u[n];return e&&(s[e]=d),r.colorIdx=(n+1)%u.length,d}}};e.exports=s},function(e,t,i){var r=i(0),n=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var a=function(e){r.each(n,(function(t){this[t]=r.bind(e[t],e)}),this)};e.exports=a},function(e,t,i){var r=i(13),n=i(84),a=i(29).detectSourceFormat,o=i(65).SERIES_LAYOUT_BY_COLUMN;r.extend({type:"dataset",defaultOption:{seriesLayoutBy:o,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){a(this)}}),n.extend({type:"dataset"})},function(e,t,i){var r=i(40),n=i(48),a=i(41),o=i(163),s=i(103),l=i(315),c=i(168),u=i(10),d=i(165),h=i(167),p=i(105),f=i(101),m=i(15),g=i(158).createFromString,y=i(0),_=y.isString,v=y.extend,C=y.defaults,x=y.trim,b=y.each,S=/[\s,]+/;function T(e){_(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function E(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}E.prototype.parse=function(e,t){t=t||{};var i=T(e);if(!i)throw new Error("Illegal svg");var n=new r;this._root=n;var a=i.getAttribute("viewBox")||"",o=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(o)&&(o=null),isNaN(l)&&(l=null),I(i,n,null,!0);for(var c,u,d=i.firstChild;d;)this._parseNode(d,n),d=d.nextSibling;if(a){var h=x(a).split(S);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&null!=o&&null!=l&&(u=F(c,o,l),!t.ignoreViewBox)){var p=n;(n=new r).add(p),p.scale=u.scale.slice(),p.position=u.position.slice()}return t.ignoreRootClip||null==o||null==l||n.setClipPath(new s({shape:{x:0,y:0,width:o,height:l}})),{root:n,width:o,height:l,viewBoxRect:c,viewBoxTransform:u}},E.prototype._parseNode=function(e,t){var i,r,n=e.nodeName.toLowerCase();if("defs"===n?this._isDefine=!0:"text"===n&&(this._isText=!0),this._isDefine){if(r=A[n]){var a=r.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=a)}}else(r=w[n])&&(i=r.call(this,e,t),t.add(i));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===n?this._isDefine=!1:"text"===n&&(this._isText=!1)},E.prototype._parseText=function(e,t){if(1===e.nodeType){var i=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(r)}var n=new a({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});P(t,n),I(e,n,this._defs);var o=n.style.fontSize;o&&o<9&&(n.style.fontSize=9,n.scale=n.scale||[1,1],n.scale[0]*=o/9,n.scale[1]*=o/9);var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n};var w={g:function(e,t){var i=new r;return P(t,i),I(e,i,this._defs),i},rect:function(e,t){var i=new s;return P(t,i),I(e,i,this._defs),i.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),i},circle:function(e,t){var i=new o;return P(t,i),I(e,i,this._defs),i.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),i},line:function(e,t){var i=new c;return P(t,i),I(e,i,this._defs),i.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),i},ellipse:function(e,t){var i=new l;return P(t,i),I(e,i,this._defs),i.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),i},polygon:function(e,t){var i=e.getAttribute("points");i&&(i=D(i));var r=new d({shape:{points:i||[]}});return P(t,r),I(e,r,this._defs),r},polyline:function(e,t){var i=new u;P(t,i),I(e,i,this._defs);var r=e.getAttribute("points");return r&&(r=D(r)),new h({shape:{points:r||[]}})},image:function(e,t){var i=new n;return P(t,i),I(e,i,this._defs),i.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),i},text:function(e,t){var i=e.getAttribute("x")||0,n=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var s=new r;return P(t,s),I(e,s,this._defs),s},tspan:function(e,t){var i=e.getAttribute("x"),n=e.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0,s=new r;return P(t,s),I(e,s,this._defs),this._textX+=a,this._textY+=o,s},path:function(e,t){var i=e.getAttribute("d")||"",r=g(i);return P(t,r),I(e,r,this._defs),r}},A={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),i=parseInt(e.getAttribute("y1")||0,10),r=parseInt(e.getAttribute("x2")||10,10),n=parseInt(e.getAttribute("y2")||0,10),a=new p(t,i,r,n);return function(e,t){var i=e.firstChild;for(;i;){if(1===i.nodeType){var r=i.getAttribute("offset");r=r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var n=i.getAttribute("stop-color")||"#000000";t.addColorStop(r,n)}i=i.nextSibling}}(e,a),a},radialgradient:function(e){}};function P(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),C(t.__inheritedStyle,e.__inheritedStyle))}function D(e){for(var t=x(e).split(S),i=[],r=0;r<t.length;r+=2){var n=parseFloat(t[r]),a=parseFloat(t[r+1]);i.push([n,a])}return i}var M={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function I(e,t,i,r){var n=t.__inheritedStyle||{},a="text"===t.type;if(1===e.nodeType&&(function(e,t){var i=e.getAttribute("transform");if(i){i=i.replace(/,/g," ");var r=null,n=[];i.replace(L,(function(e,t,i){n.push(t,i)}));for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1];switch(r=r||m.create(),s){case"translate":o=x(o).split(S),m.translate(r,r,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=x(o).split(S),m.scale(r,r,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=x(o).split(S),m.rotate(r,r,parseFloat(o[0]));break;case"skew":o=x(o).split(S),console.warn("Skew transform is not supported yet");break;case"matrix":o=x(o).split(S);r[0]=parseFloat(o[0]),r[1]=parseFloat(o[1]),r[2]=parseFloat(o[2]),r[3]=parseFloat(o[3]),r[4]=parseFloat(o[4]),r[5]=parseFloat(o[5])}}t.setLocalTransform(r)}}(e,t),v(n,function(e){var t=e.getAttribute("style"),i={};if(!t)return i;var r,n={};N.lastIndex=0;for(;null!=(r=N.exec(t));)n[r[1]]=r[2];for(var a in M)M.hasOwnProperty(a)&&null!=n[a]&&(i[M[a]]=n[a]);return i}(e)),!r))for(var o in M)if(M.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(n[M[o]]=s)}var l=a?"textFill":"fill",c=a?"textStroke":"stroke";t.style=t.style||new f;var u=t.style;null!=n.fill&&u.set(l,O(n.fill,i)),null!=n.stroke&&u.set(c,O(n.stroke,i)),b(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&a?"textStrokeWidth":e;null!=n[e]&&u.set(t,parseFloat(n[e]))})),n.textBaseline&&"auto"!==n.textBaseline||(n.textBaseline="alphabetic"),"alphabetic"===n.textBaseline&&(n.textBaseline="bottom"),"start"===n.textAlign&&(n.textAlign="left"),"end"===n.textAlign&&(n.textAlign="right"),b(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=n[e]&&u.set(e,n[e])})),n.lineDash&&(t.style.lineDash=x(n.lineDash).split(S)),u[c]&&"none"!==u[c]&&(t[c]=!0),t.__inheritedStyle=n}var R=/url\(\s*#(.*?)\)/;function O(e,t){var i=t&&e&&e.match(R);return i?t[x(i[1])]:e}var L=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var N=/([^\s:;]+)\s*:\s*([^:;]+)/g;function F(e,t,i){var r=t/e.width,n=i/e.height,a=Math.min(r,n);return{scale:[a,a],position:[-(e.x+e.width/2)*a+t/2,-(e.y+e.height/2)*a+i/2]}}t.parseXML=T,t.makeViewBoxTransform=F,t.parseSVG=function(e,t){return(new E).parse(e,t)}},function(e,t,i){var r=i(78);t.zrender=r;var n=i(15);t.matrix=n;var a=i(8);t.vector=a;var o=i(0),s=i(23);t.color=s;var l=i(2),c=i(3);t.number=c;var u=i(7);t.format=u;var d=i(33);d.throttle;t.throttle=d.throttle;var h=i(316);t.helper=h;var p=i(179);t.parseGeoJSON=p;var f=i(18);t.List=f;var m=i(12);t.Model=m;var g=i(35);t.Axis=g;var y=i(11);t.env=y;var _=p,v={};o.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){v[e]=o[e]}));var C={};o.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(e){C[e]=l[e]})),t.parseGeoJson=_,t.util=v,t.graphic=C},function(e,t,i){var r=i(0);var n=function(e){null!=e&&r.extend(this,e),this.otherDims={}};e.exports=n},function(e,t,i){var r=i(0),n=r.createHashMap,a=r.each,o=r.isString,s=r.defaults,l=r.extend,c=r.isObject,u=r.clone,d=i(4).normalizeToArray,h=i(29),p=h.guessOrdinal,f=h.BE_ORDINAL,m=i(64),g=i(66).OTHER_DIMENSIONS,y=i(174);function _(e,t,i){if(i||null!=t.get(e)){for(var r=0;null!=t.get(e+r);)r++;e+=r}return t.set(e,!0),e}var v=function(e,t,i){m.isInstance(t)||(t=m.seriesDataToSource(t)),i=i||{},e=(e||[]).slice();for(var r=(i.dimsDef||[]).slice(),h=n(),v=n(),C=[],x=function(e,t,i,r){var n=Math.max(e.dimensionsDetectCount||1,t.length,i.length,r||0);return a(t,(function(e){var t=e.dimsDef;t&&(n=Math.max(n,t.length))})),n}(t,e,r,i.dimCount),b=0;b<x;b++){var S=r[b]=l({},c(r[b])?r[b]:{name:r[b]}),T=S.name,E=C[b]=new y;null!=T&&null==h.get(T)&&(E.name=E.displayName=T,h.set(T,b)),null!=S.type&&(E.type=S.type),null!=S.displayName&&(E.displayName=S.displayName)}var w=i.encodeDef;!w&&i.encodeDefaulter&&(w=i.encodeDefaulter(t,x)),(w=n(w)).each((function(e,t){if(1===(e=d(e).slice()).length&&!o(e[0])&&e[0]<0)w.set(t,!1);else{var i=w.set(t,[]);a(e,(function(e,r){o(e)&&(e=h.get(e)),null!=e&&e<x&&(i[r]=e,P(C[e],t,r))}))}}));var A=0;function P(e,t,i){null!=g.get(t)?e.otherDims[t]=i:(e.coordDim=t,e.coordDimIndex=i,v.set(t,!0))}a(e,(function(e,t){var i,r,n;if(o(e))i=e,e={};else{i=e.name;var l=e.ordinalMeta;e.ordinalMeta=null,(e=u(e)).ordinalMeta=l,r=e.dimsDef,n=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(h=w.get(i))){var h;if(!(h=d(h)).length)for(var p=0;p<(r&&r.length||1);p++){for(;A<C.length&&null!=C[A].coordDim;)A++;A<C.length&&h.push(A++)}a(h,(function(t,a){var o=C[t];if(P(s(o,e),i,a),null==o.name&&r){var l=r[a];!c(l)&&(l={name:l}),o.name=o.displayName=l.name,o.defaultTooltip=l.defaultTooltip}n&&s(o.otherDims,n)}))}}));var D=i.generateCoord,M=i.generateCoordCount,I=null!=M;M=D?M||1:0;for(var R=D||"value",O=0;O<x;O++){null==(E=C[O]=C[O]||new y).coordDim&&(E.coordDim=_(R,v,I),E.coordDimIndex=0,(!D||M<=0)&&(E.isExtraCoord=!0),M--),null==E.name&&(E.name=_(E.coordDim,h)),null!=E.type||p(t,O,E.name)!==f.Must&&(!E.isExtraCoord||null==E.otherDims.itemName&&null==E.otherDims.seriesName)||(E.type="ordinal")}return C};e.exports=v},function(e,t,i){var r=i(0),n=r.createHashMap,a=r.isObject,o=r.map;function s(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}s.createByAxisModel=function(e){var t=e.option,i=t.data,r=i&&o(i,u);return new s({categories:r,needCollect:!r,deduplication:!1!==t.dedplication})};var l=s.prototype;function c(e){return e._map||(e._map=n(e.categories))}function u(e){return a(e)&&null!=e.value?e.value:e+""}l.getOrdinal=function(e){return c(this).get(e)},l.parseAndCollect=function(e){var t,i=this._needCollect;if("string"!=typeof e&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=c(this);return null==(t=r.get(e))&&(i?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t};var d=s;e.exports=d},function(e,t,i){var r=i(3),n=r.round;function a(e){return r.getPrecisionSafe(e)+2}function o(e,t,i){e[t]=Math.max(Math.min(e[t],i[1]),i[0])}function s(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),o(e,0,t),o(e,1,t),e[0]>e[1]&&(e[0]=e[1])}t.intervalScaleNiceTicks=function(e,t,i,o){var l={},c=e[1]-e[0],u=l.interval=r.nice(c/t,!0);null!=i&&u<i&&(u=l.interval=i),null!=o&&u>o&&(u=l.interval=o);var d=l.intervalPrecision=a(u);return s(l.niceTickExtent=[n(Math.ceil(e[0]/u)*u,d),n(Math.floor(e[1]/u)*u,d)],e),l},t.getIntervalPrecision=a,t.fixExtent=s},function(e,t,i){var r=i(0),n=i(85),a=i(3),o=i(86),s=n.prototype,l=o.prototype,c=a.getPrecisionSafe,u=a.round,d=Math.floor,h=Math.ceil,p=Math.pow,f=Math.log,m=n.extend({type:"log",base:10,$constructor:function(){n.apply(this,arguments),this._originalScale=new o},getTicks:function(e){var t=this._originalScale,i=this._extent,n=t.getExtent();return r.map(l.getTicks.call(this,e),(function(e){var r=a.round(p(this.base,e));return r=e===i[0]&&t.__fixMin?g(r,n[0]):r,r=e===i[1]&&t.__fixMax?g(r,n[1]):r}),this)},getMinorTicks:l.getMinorTicks,getLabel:l.getLabel,scale:function(e){return e=s.scale.call(this,e),p(this.base,e)},setExtent:function(e,t){var i=this.base;e=f(e)/f(i),t=f(t)/f(i),l.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=s.getExtent.call(this);t[0]=p(e,t[0]),t[1]=p(e,t[1]);var i=this._originalScale,r=i.getExtent();return i.__fixMin&&(t[0]=g(t[0],r[0])),i.__fixMax&&(t[1]=g(t[1],r[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=f(e[0])/f(t),e[1]=f(e[1])/f(t),s.unionExtent.call(this,e)},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},niceTicks:function(e){e=e||10;var t=this._extent,i=t[1]-t[0];if(!(i===1/0||i<=0)){var r=a.quantity(i);for(e/i*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var n=[a.round(h(t[0]/r)*r),a.round(d(t[1]/r)*r)];this._interval=r,this._niceExtent=n}},niceExtent:function(e){l.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function g(e,t){return u(e,c(t))}r.each(["contain","normalize"],(function(e){m.prototype[e]=function(t){return t=f(t)/f(this.base),s[e].call(this,t)}})),m.create=function(){return new m};var y=m;e.exports=y},function(e,t,i){var r=i(0),n=i(180);function a(e,t,i){for(var r=[],n=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),n=s+=n,a=l+=a,r.push([s/i,l/i])}return r}e.exports=function(e,t){return function(e){if(!e.UTF8Encoding)return e;var t=e.UTF8Scale;null==t&&(t=1024);for(var i=e.features,r=0;r<i.length;r++)for(var n=i[r].geometry,o=n.coordinates,s=n.encodeOffsets,l=0;l<o.length;l++){var c=o[l];if("Polygon"===n.type)o[l]=a(c,s[l],t);else if("MultiPolygon"===n.type)for(var u=0;u<c.length;u++){var d=c[u];c[u]=a(d,s[l][u],t)}}e.UTF8Encoding=!1}(e),r.map(r.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var i=e.properties,a=e.geometry,o=a.coordinates,s=[];"Polygon"===a.type&&s.push({type:"polygon",exterior:o[0],interiors:o.slice(1)}),"MultiPolygon"===a.type&&r.each(o,(function(e){e[0]&&s.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var l=new n(i[t||"name"],s,i.cp);return l.properties=i,l}))}},function(e,t,i){var r=i(9),n=i(62),a=i(8),o=i(181);function s(e,t,i){if(this.name=e,this.geometries=t,i)i=[i[0],i[1]];else{var r=this.getBoundingRect();i=[r.x+r.width/2,r.y+r.height/2]}this.center=i}s.prototype={constructor:s,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,i=[t,t],o=[-t,-t],s=[],l=[],c=this.geometries,u=0;u<c.length;u++)if("polygon"===c[u].type){var d=c[u].exterior;n.fromPoints(d,s,l),a.min(i,i,s),a.max(o,o,l)}return 0===u&&(i[0]=i[1]=o[0]=o[1]=0),this._rect=new r(i[0],i[1],o[0]-i[0],o[1]-i[1])},contain:function(e){var t=this.getBoundingRect(),i=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var r=0,n=i.length;r<n;r++)if("polygon"===i[r].type){var a=i[r].exterior,s=i[r].interiors;if(o.contain(a,e[0],e[1])){for(var l=0;l<(s?s.length:0);l++)if(o.contain(s[l]))continue e;return!0}}return!1},transformTo:function(e,t,i,n){var o=this.getBoundingRect(),s=o.width/o.height;i?n||(n=i/s):i=s*n;for(var l=new r(e,t,i,n),c=o.calculateTransform(l),u=this.geometries,d=0;d<u.length;d++)if("polygon"===u[d].type){for(var h=u[d].exterior,p=u[d].interiors,f=0;f<h.length;f++)a.applyTransform(h[f],h[f],c);for(var m=0;m<(p?p.length:0);m++)for(f=0;f<p[m].length;f++)a.applyTransform(p[m][f],p[m][f],c)}(o=this._rect).copy(l),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(e){null==e&&(e=this.name);var t=new s(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var l=s;e.exports=l},function(e,t,i){var r=i(162);function n(e,t){return Math.abs(e-t)<1e-8}t.contain=function(e,t,i){var a=0,o=e[0];if(!o)return!1;for(var s=1;s<e.length;s++){var l=e[s];a+=r(o[0],o[1],l[0],l[1],t,i),o=l}var c=e[0];return n(o[0],c[0])&&n(o[1],c[1])||(a+=r(o[0],o[1],c[0],c[1],t,i)),0!==a}},function(e,t,i){var r=i(25).isDimensionStacked,n=i(0).map;t.prepareDataCoordInfo=function(e,t,i){var a,o=e.getBaseAxis(),s=e.getOtherAxis(o),l=function(e,t){var i=0,r=e.scale.getExtent();"start"===t?i=r[0]:"end"===t?i=r[1]:r[0]>0?i=r[0]:r[1]<0&&(i=r[1]);return i}(s,i),c=o.dim,u=s.dim,d=t.mapDimension(u),h=t.mapDimension(c),p="x"===u||"radius"===u?1:0,f=n(e.dimensions,(function(e){return t.mapDimension(e)})),m=t.getCalculationInfo("stackResultDimension");return(a|=r(t,f[0]))&&(f[0]=m),(a|=r(t,f[1]))&&(f[1]=m),{dataDimsForPoint:f,valueStart:l,valueAxisDim:u,baseAxisDim:c,stacked:!!a,valueDim:d,baseDim:h,baseDataOffset:p,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}},t.getStackedOnPoint=function(e,t,i,r){var n=NaN;e.stacked&&(n=i.get(i.getCalculationInfo("stackedOverDimension"),r)),isNaN(n)&&(n=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=i.get(e.baseDim,r),o[1-a]=n,t.dataToPoint(o)}},function(e,t,i){var r=i(10),n=i(8),a=i(164),o=n.min,s=n.max,l=n.scaleAndAdd,c=n.copy,u=[],d=[],h=[];function p(e){return isNaN(e[0])||isNaN(e[1])}function f(e,t,i,r,n,a,o,s,l,c,u){return"none"!==c&&c?m.apply(this,arguments):g.apply(this,arguments)}function m(e,t,i,r,n,a,o,s,l,u,f){for(var m=0,g=i,y=0;y<r;y++){var _=t[g];if(g>=n||g<0)break;if(p(_)){if(f){g+=a;continue}break}if(g===i)e[a>0?"moveTo":"lineTo"](_[0],_[1]);else if(l>0){var v=t[m],C="y"===u?1:0,x=(_[C]-v[C])*l;c(d,v),d[C]=v[C]+x,c(h,_),h[C]=_[C]-x,e.bezierCurveTo(d[0],d[1],h[0],h[1],_[0],_[1])}else e.lineTo(_[0],_[1]);m=g,g+=a}return y}function g(e,t,i,r,a,f,m,g,y,_,v){for(var C=0,x=i,b=0;b<r;b++){var S=t[x];if(x>=a||x<0)break;if(p(S)){if(v){x+=f;continue}break}if(x===i)e[f>0?"moveTo":"lineTo"](S[0],S[1]),c(d,S);else if(y>0){var T=x+f,E=t[T];if(v)for(;E&&p(t[T]);)E=t[T+=f];var w=.5,A=t[C];if(!(E=t[T])||p(E))c(h,S);else{var P,D;if(p(E)&&!v&&(E=S),n.sub(u,E,A),"x"===_||"y"===_){var M="x"===_?0:1;P=Math.abs(S[M]-A[M]),D=Math.abs(S[M]-E[M])}else P=n.dist(S,A),D=n.dist(S,E);l(h,S,u,-y*(1-(w=D/(D+P))))}o(d,d,g),s(d,d,m),o(h,h,g),s(h,h,m),e.bezierCurveTo(d[0],d[1],h[0],h[1],S[0],S[1]),l(d,S,u,y*w)}else e.lineTo(S[0],S[1]);C=x,x+=f}return b}function y(e,t){var i=[1/0,1/0],r=[-1/0,-1/0];if(t)for(var n=0;n<e.length;n++){var a=e[n];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])}return{min:t?i:r,max:t?r:i}}var _=r.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:a(r.prototype.brush),buildPath:function(e,t){var i=t.points,r=0,n=i.length,a=y(i,t.smoothConstraint);if(t.connectNulls){for(;n>0&&p(i[n-1]);n--);for(;r<n&&p(i[r]);r++);}for(;r<n;)r+=f(e,i,r,n,n,1,a.min,a.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),v=r.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:a(r.prototype.brush),buildPath:function(e,t){var i=t.points,r=t.stackedOnPoints,n=0,a=i.length,o=t.smoothMonotone,s=y(i,t.smoothConstraint),l=y(r,t.smoothConstraint);if(t.connectNulls){for(;a>0&&p(i[a-1]);a--);for(;n<a&&p(i[n]);n++);}for(;n<a;){var c=f(e,i,n,a,a,1,s.min,s.max,t.smooth,o,t.connectNulls);f(e,r,n+c-1,c,a,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),n+=c+1,e.closePath()}}});t.Polyline=_,t.Polygon=v},function(e,t,i){var r=i(0),n=i(13),a=i(89),o=i(53),s=n.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function l(e,t){return t.type||(t.data?"category":"value")}r.merge(s.prototype,o);var c={offset:0};a("x",s,l,c),a("y",s,l,c);var u=s;e.exports=u},function(e,t,i){var r=i(0),n={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},a={};a.categoryAxis=r.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},n),a.valueAxis=r.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},n),a.timeAxis=r.defaults({scale:!0,min:"dataMin",max:"dataMax"},a.valueAxis),a.logAxis=r.defaults({scale:!0,logBase:10},a.valueAxis);var o=a;e.exports=o},function(e,t,i){var r=i(0);t.layout=function(e,t,i){i=i||{};var n=e.coordinateSystem,a=t.axis,o={},s=a.getAxesOnZeroOf()[0],l=a.position,c=s?"onZero":l,u=a.dim,d=n.getRect(),h=[d.x,d.x+d.width,d.y,d.y+d.height],p={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,m="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(s){var g=s.toGlobalCoord(s.dataToCoord(0));m[p.onZero]=Math.max(Math.min(g,m[1]),m[0])}o.position=["y"===u?m[p[c]]:h[0],"x"===u?m[p[c]]:h[3]],o.rotation=Math.PI/2*("x"===u?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],o.labelOffset=s?m[p[l]]-m[p.onZero]:0,t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),r.retrieve(i.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var y=t.get("axisLabel.rotate");return o.labelRotate="top"===c?-y:y,o.z2=1,o}},function(e,t,i){var r=i(0),n=i(2);t.rectCoordAxisBuildSplitArea=function(e,t,i,a){var o=i.axis;if(!o.scale.isBlank()){var s=i.getModel("splitArea"),l=s.getModel("areaStyle"),c=l.get("color"),u=a.coordinateSystem.getRect(),d=o.getTicksCoords({tickModel:s,clamp:!0});if(d.length){var h=c.length,p=e.__splitAreaColors,f=r.createHashMap(),m=0;if(p)for(var g=0;g<d.length;g++){var y=p.get(d[g].tickValue);if(null!=y){m=(y+(h-1)*g)%h;break}}var _=o.toGlobalCoord(d[0].coord),v=l.getAreaStyle();c=r.isArray(c)?c:[c];for(g=1;g<d.length;g++){var C,x,b,S,T=o.toGlobalCoord(d[g].coord);o.isHorizontal()?(C=_,x=u.y,b=T-C,S=u.height,_=C+b):(C=u.x,x=_,b=u.width,_=x+(S=T-x));var E=d[g-1].tickValue;null!=E&&f.set(E,m),t.add(new n.Rect({anid:null!=E?"area_"+E:null,shape:{x:C,y:x,width:b,height:S},style:r.defaults({fill:c[m]},v),silent:!0})),m=(m+1)%h}e.__splitAreaColors=f}}},t.rectCoordAxisHandleRemove=function(e){e.__splitAreaColors=null}},function(e,t,i){var r=i(14),n=i(30),a=r.extend({type:"series.__base_bar__",getInitialData:function(e,t){return n(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var i=t.dataToPoint(t.clampData(e)),r=this.getData(),n=r.getLayout("offset"),a=r.getLayout("size");return i[t.getBaseAxis().isHorizontal()?0:1]+=n+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});e.exports=a},function(e,t,i){var r=i(2),n=i(110).getDefaultLabel;function a(e,t){"outside"===e.textPosition&&(e.textPosition=t)}t.setLabel=function(e,t,i,o,s,l,c){var u=i.getModel("label"),d=i.getModel("emphasis.label");r.setLabelStyle(e,t,u,d,{labelFetcher:s,labelDataIndex:l,defaultText:n(s.getData(),l),isRectText:!0,autoColor:o}),a(e),a(t)}},function(e,t,i){var r=i(1),n=i(0);e.exports=function(e,t){n.each(t,(function(t){t.update="updateView",r.registerAction(t,(function(i,r){var n={};return r.eachComponent({mainType:"series",subType:e,query:i},(function(e){e[t.method]&&e[t.method](i.name,i.dataIndex);var r=e.getData();r.each((function(t){var i=r.getName(t);n[i]=e.isSelected(i)||!1}))})),{name:i.name,selected:n,seriesId:i.seriesId}}))}))}},function(e,t,i){var r=i(0),n=i(73),a=i(113),o=i(93).onIrrelevantElement,s=i(2),l=i(92),c=i(63).getUID,u=i(79);function d(e){var t=e.getItemStyle(),i=e.get("areaColor");return null!=i&&(t.fill=i),t}function h(e,t){t.eachChild((function(t){r.each(t.__regions,(function(i){t.trigger(e.isSelected(i.name)?"emphasis":"normal")}))}))}function p(e,t){var i=new s.Group;this.uid=c("ec_map_draw"),this._controller=new n(e.getZr()),this._controllerHost={target:t?i:null},this.group=i,this._updateGroup=t,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new s.Group),i.add(this._backgroundGroup=new s.Group)}p.prototype={constructor:p,draw:function(e,t,i,n,a){var o="geo"===e.mainType,l=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},(function(t){l||t.getHostGeoModel()!==e||(l=t.getData())}));var c=e.coordinateSystem;this._updateBackground(c);var p,f=this._regionsGroup,m=this.group,g=c.getTransformInfo(),y=!f.childAt(0)||a;if(y)m.transform=g.roamTransform,m.decomposeTransform(),m.dirty();else{var _=new u;_.transform=g.roamTransform,_.decomposeTransform();var v={scale:_.scale,position:_.position};p=_.scale,s.updateProps(m,v,e)}var C=g.rawScale,x=g.rawPosition;f.removeAll();var b=["itemStyle"],S=["emphasis","itemStyle"],T=["label"],E=["emphasis","label"],w=r.createHashMap();r.each(c.regions,(function(t){var i=w.get(t.name)||w.set(t.name,new s.Group),n=new s.CompoundPath({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var a,c=(B=e.getRegionModel(t.name)||e).getModel(b),u=B.getModel(S),h=d(c),g=d(u),_=B.getModel(T),v=B.getModel(E);if(l){a=l.indexOfName(t.name);var A=l.getItemVisual(a,"color",!0);A&&(h.fill=A)}var P=function(e){return[e[0]*C[0]+x[0],e[1]*C[1]+x[1]]};r.each(t.geometries,(function(e){if("polygon"===e.type){for(var t=[],i=0;i<e.exterior.length;++i)t.push(P(e.exterior[i]));n.shape.paths.push(new s.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}));for(i=0;i<(e.interiors?e.interiors.length:0);++i){for(var r=e.interiors[i],a=(t=[],0);a<r.length;++a)t.push(P(r[a]));n.shape.paths.push(new s.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}))}}})),n.setStyle(h),n.style.strokeNoScale=!0,n.culling=!0;var D=_.get("show"),M=v.get("show"),I=l&&isNaN(l.get(l.mapDimension("value"),a)),R=l&&l.getItemLayout(a);if(o||I&&(D||M)||R&&R.showLabel){var O,L=o?t.name:a;(!l||a>=0)&&(O=e);var N=new s.Text({position:P(t.center.slice()),scale:[1/m.scale[0],1/m.scale[1]],z2:10,silent:!0});if(s.setLabelStyle(N.style,N.hoverStyle={},_,v,{labelFetcher:O,labelDataIndex:L,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!y){var F=[1/p[0],1/p[1]];s.updateProps(N,{scale:F},e)}i.add(N)}if(l)l.setItemGraphicEl(a,i);else{var B=e.getRegionModel(t.name);n.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:t.name,region:B&&B.option||{}}}(i.__regions||(i.__regions=[])).push(t),i.highDownSilentOnTouch=!!e.get("selectedMode"),s.setHoverStyle(i,g),f.add(i)})),this._updateController(e,t,i),function(e,t,i,n,a){i.off("click"),i.off("mousedown"),t.get("selectedMode")&&(i.on("mousedown",(function(){e._mouseDownFlag=!0})),i.on("click",(function(o){if(e._mouseDownFlag){e._mouseDownFlag=!1;for(var s=o.target;!s.__regions;)s=s.parent;if(s){var l={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",batch:r.map(s.__regions,(function(e){return{name:e.name,from:a.uid}}))};l[t.mainType+"Id"]=t.id,n.dispatchAction(l),h(t,i)}}})))}(this,e,f,i,n),h(e,f)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&l.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var t=e.map;this._mapName!==t&&r.each(l.makeGraphic(t,this.uid),(function(e){this._backgroundGroup.add(e)}),this),this._mapName=t},_updateController:function(e,t,i){var n=e.coordinateSystem,s=this._controller,l=this._controllerHost;l.zoomLimit=e.get("scaleLimit"),l.zoom=n.getZoom(),s.enable(e.get("roam")||!1);var c=e.mainType;function u(){var t={type:"geoRoam",componentType:c};return t[c+"Id"]=e.id,t}s.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,a.updateViewOnPan(l,e.dx,e.dy),i.dispatchAction(r.extend(u(),{dx:e.dx,dy:e.dy}))}),this),s.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,a.updateViewOnZoom(l,e.scale,e.originX,e.originY),i.dispatchAction(r.extend(u(),{zoom:e.scale,originX:e.originX,originY:e.originY})),this._updateGroup){var t=this.group.scale;this._regionsGroup.traverse((function(e){"text"===e.type&&e.attr("scale",[1/t[0],1/t[1]])}))}}),this),s.setPointerChecker((function(t,r,a){return n.getViewRectAfterRoam().contain(r,a)&&!o(t,i,e)}))}};var f=p;e.exports=f},function(e,t,i){var r=i(1),n="\0_ec_interaction_mutex";function a(e){return e[n]||(e[n]={})}r.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),t.take=function(e,t,i){a(e)[t]=i},t.release=function(e,t,i){var r=a(e);r[t]===i&&(r[t]=null)},t.isTaken=function(e,t){return!!a(e)[t]}},function(e,t,i){var r=i(1),n=i(0),a=i(114).updateCenterAndZoom;r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},(function(t){var r=t.coordinateSystem;if("geo"===r.type){var o=a(r,e,t.get("scaleLimit"));t.setCenter&&t.setCenter(o.center),t.setZoom&&t.setZoom(o.zoom),"series"===i&&n.each(t.seriesGroup,(function(e){e.setCenter(o.center),e.setZoom(o.zoom)}))}}))}))},function(e,t,i){var r=i(0),n=r.each,a="\0__link_datas",o="\0__link_mainData";function s(e,t){if((n=this)[o]===n){var i=r.extend({},this[a]);i[this.dataType]=t,d(t,i,e)}else h(t,this.dataType,this[o],e);var n;return t}function l(e,t){return e.struct&&e.struct.update(this),t}function c(e,t){return n(t[a],(function(i,r){i!==t&&h(i.cloneShallow(),r,t,e)})),t}function u(e){var t=this[o];return null==e||null==t?t:t[a][e]}function d(e,t,i){e[a]={},n(t,(function(t,r){h(t,r,e,i)}))}function h(e,t,i,r){i[a][t]=e,e[o]=i,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=u}var p=function(e){var t=e.mainData,i=e.datas;i||(i={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,d(t,i,e),n(i,(function(i){n(t.TRANSFERABLE_METHODS,(function(t){i.wrapMethod(t,r.curry(s,e))}))})),t.wrapMethod("cloneShallow",r.curry(c,e)),n(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,r.curry(l,e))})),r.assert(i[t.dataType]===t)};e.exports=p},function(e,t,i){var r=i(6);function n(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function a(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function o(e,t,i){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:i}function s(e,t,i){var r=i/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=i,t.hierNode.modifier+=i,t.hierNode.prelim+=i,e.hierNode.change+=r}function l(e,t){return e.parentNode===t.parentNode?1:2}t.init=function(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t,i,r=[e];t=r.pop();)if(i=t.children,t.isExpand&&i.length)for(var n=i.length-1;n>=0;n--){var a=i[n];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null},r.push(a)}},t.firstWalk=function(e,t){var i=e.isExpand?e.children:[],r=e.parentNode.children,l=e.hierNode.i?r[e.hierNode.i-1]:null;if(i.length){!function(e){var t=e.children,i=t.length,r=0,n=0;for(;--i>=0;){var a=t[i];a.hierNode.prelim+=r,a.hierNode.modifier+=r,n+=a.hierNode.change,r+=a.hierNode.shift+n}}(e);var c=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;l?(e.hierNode.prelim=l.hierNode.prelim+t(e,l),e.hierNode.modifier=e.hierNode.prelim-c):e.hierNode.prelim=c}else l&&(e.hierNode.prelim=l.hierNode.prelim+t(e,l));e.parentNode.hierNode.defaultAncestor=function(e,t,i,r){if(t){for(var l=e,c=e,u=c.parentNode.children[0],d=t,h=l.hierNode.modifier,p=c.hierNode.modifier,f=u.hierNode.modifier,m=d.hierNode.modifier;d=n(d),c=a(c),d&&c;){l=n(l),u=a(u),l.hierNode.ancestor=e;var g=d.hierNode.prelim+m-c.hierNode.prelim-p+r(d,c);g>0&&(s(o(d,e,i),e,g),p+=g,h+=g),m+=d.hierNode.modifier,p+=c.hierNode.modifier,h+=l.hierNode.modifier,f+=u.hierNode.modifier}d&&!n(l)&&(l.hierNode.thread=d,l.hierNode.modifier+=m-h),c&&!a(u)&&(u.hierNode.thread=c,u.hierNode.modifier+=p-f,i=e)}return i}(e,l,e.parentNode.hierNode.defaultAncestor||r[0],t)},t.secondWalk=function(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier},t.separation=function(e){return arguments.length?e:l},t.radialCoordinate=function(e,t){var i={};return e-=Math.PI/2,i.x=t*Math.cos(e),i.y=t*Math.sin(e),i},t.getViewRect=function(e,t){return r.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}},function(e,t,i){var r=i(0),n=i(18),a=i(386),o=i(194),s=i(52),l=i(20),c=i(30);e.exports=function(e,t,i,u,d){for(var h=new a(u),p=0;p<e.length;p++)h.addNode(r.retrieve(e[p].id,e[p].name,p),p);var f=[],m=[],g=0;for(p=0;p<t.length;p++){var y=t[p],_=y.source,v=y.target;h.addEdge(_,v,g)&&(m.push(y),f.push(r.retrieve(y.id,_+" > "+v)),g++)}var C,x=i.get("coordinateSystem");if("cartesian2d"===x||"polar"===x)C=c(e,i);else{var b=l.get(x),S=b&&"view"!==b.type&&b.dimensions||[];r.indexOf(S,"value")<0&&S.concat(["value"]);var T=s(e,{coordDimensions:S});(C=new n(T,i)).initData(e)}var E=new n(["value"],i);return E.initData(m,f),d&&d(C,E),o({mainData:C,struct:h,structAttr:"graph",datas:{node:C,edge:E},datasAttr:{node:"data",edge:"edgeData"}}),h.update(),h}},function(e,t,i){var r=i(1);r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}))},function(e,t,i){var r=i(8),n=i(0),a=i(94).getCurvenessForEdge;function o(e,t){e.eachEdge((function(e,i){var o=n.retrieve3(e.getModel().get("lineStyle.curveness"),-a(e,t,i,!0),0),s=r.clone(e.node1.getLayout()),l=r.clone(e.node2.getLayout()),c=[s,l];+o&&c.push([(s[0]+l[0])/2-(s[1]-l[1])*o,(s[1]+l[1])/2-(l[0]-s[0])*o]),e.setLayout(c)}))}t.simpleLayout=function(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var i=e.getGraph();i.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),o(i,e)}},t.simpleLayoutEdge=o},function(e,t,i){var r=i(8),n=i(120),a=n.getSymbolSize,o=n.getNodeGlobalScale,s=i(0),l=i(94).getCurvenessForEdge,c=Math.PI,u=[];var d={value:function(e,t,i,r,n,a,o,s){var l=0,c=r.getSum("value"),u=2*Math.PI/(c||s);i.eachNode((function(e){var t=e.getValue("value"),i=u*(c?t:1)/2;l+=i,e.setLayout([n*Math.cos(l)+a,n*Math.sin(l)+o]),l+=i}))},symbolSize:function(e,t,i,r,n,s,l,d){var h=0;u.length=d;var p=o(e);i.eachNode((function(e){var t=a(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=p;var i=Math.asin(t/2/n);isNaN(i)&&(i=c/2),u[e.dataIndex]=i,h+=2*i}));var f=(2*c-h)/d/2,m=0;i.eachNode((function(e){var t=f+u[e.dataIndex];m+=t,e.setLayout([n*Math.cos(m)+s,n*Math.sin(m)+l]),m+=t}))}};t.circularLayout=function(e,t){var i=e.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),a=e.getData(),o=a.graph,c=n.width/2+n.x,u=n.height/2+n.y,h=Math.min(n.width,n.height)/2,p=a.count();a.setLayout({cx:c,cy:u}),p&&(d[t](e,i,o,a,h,c,u,p),o.eachEdge((function(t,i){var n,a=s.retrieve3(t.getModel().get("lineStyle.curveness"),l(t,e,i),0),o=r.clone(t.node1.getLayout()),d=r.clone(t.node2.getLayout()),h=(o[0]+d[0])/2,p=(o[1]+d[1])/2;+a&&(n=[c*(a*=3)+h*(1-a),u*a+p*(1-a)]),t.setLayout([o,d,n])})))}}},function(e,t,i){var r=i(1),n=i(0),a=i(33),o=i(408);i(201),i(411),i(413);r.extendComponentView({type:"parallel",render:function(e,t,i){this._model=e,this._api=i,this._handlers||(this._handlers={},n.each(s,(function(e,t){i.getZr().on(t,this._handlers[t]=n.bind(e,this))}),this)),a.createOrUpdate(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},dispose:function(e,t){n.each(this._handlers,(function(e,i){t.getZr().off(i,e)})),this._handlers=null},_throttledDispatchExpand:function(e){this._dispatchExpand(e)},_dispatchExpand:function(e){e&&this._api.dispatchAction(n.extend({type:"parallelAxisExpand"},e))}});var s={mousedown:function(e){l(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(l(this,"click")&&t){var i=[e.offsetX,e.offsetY];if(Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2)>5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&l(this,"mousemove")){var t=this._model,i=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=i.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===r&&null})}}};function l(e,t){var i=e._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===t}r.registerPreprocessor(o)},function(e,t,i){var r=i(409);i(20).register("parallel",{create:function(e,t){var i=[];return e.eachComponent("parallel",(function(n,a){var o=new r(n,e,t);o.name="parallel_"+a,o.resize(n,t),n.coordinateSystem=o,o.model=n,i.push(o)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=i.coordinateSystem}})),i}})},function(e,t,i){var r=i(9),n=i(93).onIrrelevantElement,a=i(2);function o(e){return r.create(e)}t.makeRectPanelClipPath=function(e){return e=o(e),function(t,i){return a.clipPointsByRect(t,e)}},t.makeLinearBrushOtherExtent=function(e,t){return e=o(e),function(i){var r=null!=t?t:i,n=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(n||0)]}},t.makeRectIsTargetByCursor=function(e,t,i){return e=o(e),function(r,a,o){return e.contain(a[0],a[1])&&!n(r,t,i)}}},function(e,t,i){var r=i(54),n=i(0),a=i(66).getDimensionTypeByAxis,o=i(29).makeSeriesEncodeForAxisCoordSys,s={_baseAxisDim:null,getInitialData:function(e,t){var i,s,l=t.getComponent("xAxis",this.get("xAxisIndex")),c=t.getComponent("yAxis",this.get("yAxisIndex")),u=l.get("type"),d=c.get("type");"category"===u?(e.layout="horizontal",i=l.getOrdinalMeta(),s=!0):"category"===d?(e.layout="vertical",i=c.getOrdinalMeta(),s=!0):e.layout=e.layout||"horizontal";var h=["x","y"],p="horizontal"===e.layout?0:1,f=this._baseAxisDim=h[p],m=h[1-p],g=[l,c],y=g[p].get("type"),_=g[1-p].get("type"),v=e.data;if(v&&s){var C=[];n.each(v,(function(e,t){var i;e.value&&n.isArray(e.value)?(i=e.value.slice(),e.value.unshift(t)):n.isArray(e)?(i=e.slice(),e.unshift(t)):i=e,C.push(i)})),e.data=C}var x=this.defaultValueDimensions,b=[{name:f,type:a(y),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:m,type:a(_),dimsDef:x.slice()}];return r(this,{coordDimensions:b,dimensionsCount:x.length+1,encodeDefaulter:n.curry(o,b,this)})},getBaseAxis:function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis}};t.seriesModelMixin=s},function(e,t,i){var r=i(2),n=i(119),a=i(0),o=i(19).createSymbol,s=i(8),l=i(32);function c(e,t,i){r.Group.call(this),this.add(this.createLine(e,t,i)),this._updateEffectSymbol(e,t)}var u=c.prototype;u.createLine=function(e,t,i){return new n(e,t,i)},u._updateEffectSymbol=function(e,t){var i=e.getItemModel(t).getModel("effect"),r=i.get("symbolSize"),n=i.get("symbol");a.isArray(r)||(r=[r,r]);var s=i.get("color")||e.getItemVisual(t,"color"),l=this.childAt(1);this._symbolType!==n&&(this.remove(l),(l=o(n,-.5,-.5,1,1,s)).z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",s),l.setStyle(i.getItemStyle(["color"])),l.attr("scale",r),l.setColor(s),l.attr("scale",r),this._symbolType=n,this._symbolScale=r,this._updateEffectAnimation(e,i,t))},u._updateEffectAnimation=function(e,t,i){var r=this.childAt(1);if(r){var n=this,o=e.getItemLayout(i),s=1e3*t.get("period"),l=t.get("loop"),c=t.get("constantSpeed"),u=a.retrieve(t.get("delay"),(function(t){return t/e.count()*s/3})),d="function"==typeof u;if(r.ignore=!0,this.updateAnimationPoints(r,o),c>0&&(s=this.getLineLength(r)/c*1e3),s!==this._period||l!==this._loop){r.stopAnimation();var h=u;d&&(h=u(i)),r.__t>0&&(h=-s*r.__t),r.__t=0;var p=r.animate("",l).when(s,{__t:1}).delay(h).during((function(){n.updateSymbolPosition(r)}));l||p.done((function(){n.remove(r)})),p.start()}this._period=s,this._loop=l}},u.getLineLength=function(e){return s.dist(e.__p1,e.__cp1)+s.dist(e.__cp1,e.__p2)},u.updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},u.updateData=function(e,t,i){this.childAt(0).updateData(e,t,i),this._updateEffectSymbol(e,t)},u.updateSymbolPosition=function(e){var t=e.__p1,i=e.__p2,r=e.__cp1,n=e.__t,a=e.position,o=[a[0],a[1]],c=l.quadraticAt,u=l.quadraticDerivativeAt;a[0]=c(t[0],r[0],i[0],n),a[1]=c(t[1],r[1],i[1],n);var d=u(t[0],r[0],i[0],n),h=u(t[1],r[1],i[1],n);if(e.rotation=-Math.atan2(h,d)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==e.__lastT&&e.__lastT<e.__t){var p=1.05*s.dist(o,a);e.attr("scale",[e.scale[0],p]),1===n&&(a[0]=o[0]+(a[0]-o[0])/2,a[1]=o[1]+(a[1]-o[1])/2)}else if(1===e.__lastT){p=2*s.dist(t,a);e.attr("scale",[e.scale[0],p])}else e.attr("scale",this._symbolScale);e.__lastT=e.__t,e.ignore=!1},u.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var i=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,i,t)},a.inherits(c,r.Group);var d=c;e.exports=d},function(e,t,i){var r=i(2),n=i(0);function a(e,t,i){r.Group.call(this),this._createPolyline(e,t,i)}var o=a.prototype;o._createPolyline=function(e,t,i){var n=e.getItemLayout(t),a=new r.Polyline({shape:{points:n}});this.add(a),this._updateCommonStl(e,t,i)},o.updateData=function(e,t,i){var n=e.hostModel,a=this.childAt(0),o={shape:{points:e.getItemLayout(t)}};r.updateProps(a,o,n,t),this._updateCommonStl(e,t,i)},o._updateCommonStl=function(e,t,i){var a=this.childAt(0),o=e.getItemModel(t),s=e.getItemVisual(t,"color"),l=i&&i.lineStyle,c=i&&i.hoverLineStyle;i&&!e.hasItemOption||(l=o.getModel("lineStyle").getLineStyle(),c=o.getModel("emphasis.lineStyle").getLineStyle()),a.useStyle(n.defaults({strokeNoScale:!0,fill:"none",stroke:s},l)),a.hoverStyle=c,r.setHoverStyle(this)},o.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},n.inherits(a,r.Group);var s=a;e.exports=s},function(e,t,i){var r={seriesType:"lines",plan:i(51)(),reset:function(e){var t=e.coordinateSystem,i=e.get("polyline"),r=e.pipelineContext.large;return{progress:function(n,a){var o=[];if(r){var s,l=n.end-n.start;if(i){for(var c=0,u=n.start;u<n.end;u++)c+=e.getLineCoordsCount(u);s=new Float32Array(l+2*c)}else s=new Float32Array(4*l);var d=0,h=[];for(u=n.start;u<n.end;u++){var p=e.getLineCoords(u,o);i&&(s[d++]=p);for(var f=0;f<p;f++)h=t.dataToPoint(o[f],!1,h),s[d++]=h[0],s[d++]=h[1]}a.setLayout("linesPoints",s)}else for(u=n.start;u<n.end;u++){var m=a.getItemModel(u),g=(p=e.getLineCoords(u,o),[]);if(i)for(var y=0;y<p;y++)g.push(t.dataToPoint(o[y]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var _=m.get("lineStyle.curveness");+_&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*_,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*_])}a.setItemLayout(u,g)}}}}};e.exports=r},function(e,t,i){var r=i(1);i(454),i(457),i(458),i(74),i(462),r.extendComponentView({type:"single"})},function(e,t,i){var r=i(0);t.layout=function(e,t){t=t||{};var i=e.coordinateSystem,n=e.axis,a={},o=n.position,s=n.orient,l=i.getRect(),c=[l.x,l.x+l.width,l.y,l.y+l.height],u={horizontal:{top:c[2],bottom:c[3]},vertical:{left:c[0],right:c[1]}};a.position=["vertical"===s?u.vertical[o]:c[0],"horizontal"===s?u.horizontal[o]:c[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[s],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),r.retrieve(t.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var d=t.rotate;return null==d&&(d=e.get("axisLabel.rotate")),a.labelRotation="top"===o?-d:d,a.z2=1,a}},function(e,t,i){var r=i(0),n=i(4);e.exports=function(e,t){var i,a=[],o=e.seriesIndex;if(null==o||!(i=t.getSeriesByIndex(o)))return{point:[]};var s=i.getData(),l=n.queryDataIndex(s,e);if(null==l||l<0||r.isArray(l))return{point:[]};var c=s.getItemGraphicEl(l),u=i.coordinateSystem;if(i.getTooltipPosition)a=i.getTooltipPosition(l)||[];else if(u&&u.dataToPoint)a=u.dataToPoint(s.getValues(r.map(u.dimensions,(function(e){return s.mapDimension(e)})),l,!0))||[];else if(c){var d=c.getBoundingRect().clone();d.applyTransform(c.transform),a=[d.x+d.width/2,d.y+d.height/2]}return{point:a,el:c}}},function(e,t,i){var r=i(0),n=i(11),a=(0,i(4).makeInner)(),o=r.each;function s(e,t,i){e.handler("leave",null,i)}function l(e,t,i,r){t.handler(e,i,r)}t.register=function(e,t,i){if(!n.node){var c=t.getZr();a(c).records||(a(c).records={}),function(e,t){if(a(e).initialized)return;function i(i,r){e.on(i,(function(i){var n=function(e){var t={showTip:[],hideTip:[]},i=function(r){var n=t[r.type];n?n.push(r):(r.dispatchAction=i,e.dispatchAction(r))};return{dispatchAction:i,pendings:t}}(t);o(a(e).records,(function(e){e&&r(e,i,n.dispatchAction)})),function(e,t){var i,r=e.showTip.length,n=e.hideTip.length;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]);i&&(i.dispatchAction=null,t.dispatchAction(i))}(n.pendings,t)}))}a(e).initialized=!0,i("click",r.curry(l,"click")),i("mousemove",r.curry(l,"mousemove")),i("globalout",s)}(c,t),(a(c).records[e]||(a(c).records[e]={})).handler=i}},t.unregister=function(e,t){if(!n.node){var i=t.getZr();(a(i).records||{})[e]&&(a(i).records[e]=null)}}},function(e,t,i){var r=i(122),n=i(95),a=i(186),o=i(45),s=r.extend({makeElOption:function(e,t,i,r,o){var s=i.axis,u=s.grid,d=r.get("type"),h=l(u,s).getOtherAxis(s).getGlobalExtent(),p=s.toGlobalCoord(s.dataToCoord(t,!0));if(d&&"none"!==d){var f=n.buildElStyle(r),m=c[d](s,p,h);m.style=f,e.graphicKey=m.type,e.pointer=m}var g=a.layout(u.model,i);n.buildCartesianSingleLabelElOption(t,e,g,i,r,o)},getHandleTransform:function(e,t,i){var r=a.layout(t.axis.grid.model,t,{labelInside:!1});return r.labelMargin=i.get("handle.margin"),{position:n.getTransformedPosition(t.axis,e,r),rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,i,r){var n=i.axis,a=n.grid,o=n.getGlobalExtent(!0),s=l(a,n).getOtherAxis(n).getGlobalExtent(),c="x"===n.dim?0:1,u=e.position;u[c]+=t[c],u[c]=Math.min(o[1],u[c]),u[c]=Math.max(o[0],u[c]);var d=(s[1]+s[0])/2,h=[d,d];h[c]=u[c];return{position:u,rotation:e.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][c]}}});function l(e,t){var i={};return i[t.dim+"AxisIndex"]=t.index,e.getCartesian(i)}var c={line:function(e,t,i){return{type:"Line",subPixelOptimize:!0,shape:n.makeLineShape([t,i[0]],[t,i[1]],u(e))}},shadow:function(e,t,i){var r=Math.max(1,e.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:n.makeRectShape([t-r/2,i[0]],[r,a],u(e))}}};function u(e){return"x"===e.dim?0:1}o.registerAxisPointerClass("CartesianAxisPointer",s);var d=s;e.exports=d},function(e,t,i){var r=i(6),n=r.getLayoutRect,a=r.box,o=r.positionElement,s=i(7),l=i(2);t.layout=function(e,t,i){var r=t.getBoxLayoutParams(),s=t.get("padding"),l={width:i.getWidth(),height:i.getHeight()},c=n(r,l,s);a(t.get("orient"),e,t.get("itemGap"),c.width,c.height),o(e,r,l,s)},t.makeBackground=function(e,t){var i=s.normalizeCssArray(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new l.Rect({shape:{x:e.x-i[3],y:e.y-i[0],width:e.width+i[1]+i[3],height:e.height+i[0]+i[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(2),a=i(4),o=i(202),s=r.each,l=r.indexOf,c=r.curry,u=["dataToPoint","pointToData"],d=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function h(e,t,i){var r=this._targetInfoList=[],n={},a=m(t,e);s(g,(function(e,t){(!i||!i.include||l(i.include,t)>=0)&&e(a,r,n)}))}var p=h.prototype;function f(e){return e[0]>e[1]&&e.reverse(),e}function m(e,t){return a.parseFinder(e,t,{includeMainTypes:d})}p.setOutputRanges=function(e,t){this.matchOutputRanges(e,t,(function(e,t,i){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=v[e.brushType](0,i,t);e.__rangeOffset={offset:x[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}))},p.matchOutputRanges=function(e,t,i){s(e,(function(e){var n=this.findTargetInfo(e,t);n&&!0!==n&&r.each(n.coordSyses,(function(r){var n=v[e.brushType](1,r,e.range);i(e,n.values,r,t)}))}),this)},p.setInputRanges=function(e,t){s(e,(function(e){var i,r,n,a,o,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=v[e.brushType](0,s.coordSys,e.coordRange),c=e.__rangeOffset;e.range=c?x[e.brushType](l.values,c.offset,(i=l.xyMinMax,r=c.xyMinMax,n=S(i),a=S(r),o=[n[0]/a[0],n[1]/a[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},p.makePanelOpts=function(e,t){return r.map(this._targetInfoList,(function(i){var r=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t&&t(i),clipPath:o.makeRectPanelClipPath(r),isTargetByCursor:o.makeRectIsTargetByCursor(r,e,i.coordSysModel),getLinearBrushOtherExtent:o.makeLinearBrushOtherExtent(r)}}))},p.controlSeries=function(e,t,i){var r=this.findTargetInfo(e,i);return!0===r||r&&l(r.coordSyses,t.coordinateSystem)>=0},p.findTargetInfo=function(e,t){for(var i=this._targetInfoList,r=m(t,e),n=0;n<i.length;n++){var a=i[n],o=e.panelId;if(o){if(a.panelId===o)return a}else for(n=0;n<y.length;n++)if(y[n](r,a))return a}return!0};var g={grid:function(e,t){var i=e.xAxisModels,n=e.yAxisModels,a=e.gridModels,o=r.createHashMap(),c={},u={};(i||n||a)&&(s(i,(function(e){var t=e.axis.grid.model;o.set(t.id,t),c[t.id]=!0})),s(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),u[t.id]=!0})),s(a,(function(e){o.set(e.id,e),c[e.id]=!0,u[e.id]=!0})),o.each((function(e){var r=e.coordinateSystem,a=[];s(r.getCartesians(),(function(e,t){(l(i,e.getAxis("x").model)>=0||l(n,e.getAxis("y").model)>=0)&&a.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:_.grid,xAxisDeclared:c[e.id],yAxisDeclared:u[e.id]})})))},geo:function(e,t){s(e.geoModels,(function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:_.geo})}))}},y=[function(e,t){var i=e.xAxisModel,r=e.yAxisModel,n=e.gridModel;return!n&&i&&(n=i.axis.grid.model),!n&&r&&(n=r.axis.grid.model),n&&n===t.gridModel},function(e,t){var i=e.geoModel;return i&&i===t.geoModel}],_={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(n.getTransform(e)),t}},v={lineX:c(C,0),lineY:c(C,1),rect:function(e,t,i){var r=t[u[e]]([i[0][0],i[1][0]]),n=t[u[e]]([i[0][1],i[1][1]]),a=[f([r[0],n[0]]),f([r[1],n[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:r.map(i,(function(i){var r=t[u[e]](i);return n[0][0]=Math.min(n[0][0],r[0]),n[1][0]=Math.min(n[1][0],r[1]),n[0][1]=Math.max(n[0][1],r[0]),n[1][1]=Math.max(n[1][1],r[1]),r})),xyMinMax:n}}};function C(e,t,i,n){var a=i.getAxis(["x","y"][e]),o=f(r.map([0,1],(function(e){return t?a.coordToData(a.toLocalCoord(n[e])):a.toGlobalCoord(a.dataToCoord(n[e]))}))),s=[];return s[e]=o,s[1-e]=[NaN,NaN],{values:o,xyMinMax:s}}var x={lineX:c(b,0),lineY:c(b,1),rect:function(e,t,i){return[[e[0][0]-i[0]*t[0][0],e[0][1]-i[0]*t[0][1]],[e[1][0]-i[1]*t[1][0],e[1][1]-i[1]*t[1][1]]]},polygon:function(e,t,i){return r.map(e,(function(e,r){return[e[0]-i[0]*t[r][0],e[1]-i[1]*t[r][1]]}))}};function b(e,t,i,r){return[t[0]-r[e]*i[0],t[1]-r[e]*i[1]]}function S(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var T=h;e.exports=T},function(e,t,i){var r=i(0).each,n="\0_ec_hist_store";function a(e){var t=e[n];return t||(t=e[n]=[{}]),t}t.push=function(e,t){var i=a(e);r(t,(function(t,r){for(var n=i.length-1;n>=0;n--){if(i[n][r])break}if(n<0){var a=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(a){var o=a.getPercentRange();i[0][r]={dataZoomId:r,start:o[0],end:o[1]}}}})),i.push(t)},t.pop=function(e){var t=a(e),i=t[t.length-1];t.length>1&&t.pop();var n={};return r(i,(function(e,i){for(var r=t.length-1;r>=0;r--){if(e=t[r][i]){n[i]=e;break}}})),n},t.clear=function(e){e[n]=null},t.count=function(e){return a(e).length}},function(e,t,i){var r=i(1),n=i(0),a=i(9),o=i(96),s=i(519),l=i(33),c=i(213),u=["inBrush","outOfBrush"],d=r.PRIORITY.VISUAL.BRUSH;function h(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new c(t.option,e)).setInputRanges(t.areas,e)}))}function p(e,t){if(!e.isDisposed()){var i=e.getZr();i.__ecInBrushSelectEvent=!0,e.dispatchAction({type:"brushSelect",batch:t}),i.__ecInBrushSelectEvent=!1}}function f(e,t,i,r){for(var n=0,a=t.length;n<a;n++){var o=t[n];if(e[o.brushType](r,i,o.selectors,o))return!0}}function m(e){var t=e.brushSelector;if(n.isString(t)){var i=[];return n.each(s,(function(e,r){i[r]=function(i,r,n,a){var o=r.getItemLayout(i);return e[t](o,n,a)}})),i}if(n.isFunction(t)){var r={};return n.each(s,(function(e,i){r[i]=t})),r}return t}r.registerLayout(d,(function(e,t,i){e.eachComponent({mainType:"brush"},(function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})})),h(e)})),r.registerVisual(d,(function(e,t,i){var r,a,c=[];e.eachComponent({mainType:"brush"},(function(t,i){var l={brushId:t.id,brushIndex:i,brushName:t.name,areas:n.clone(t.areas),selected:[]};c.push(l);var d=t.option,h=d.brushLink,p=[],y=[],_=[],v=0;i||(r=d.throttleType,a=d.throttleDelay);var C=n.map(t.areas,(function(e){return function(e){var t=e.selectors={};return n.each(s[e.brushType],(function(i,r){t[r]=function(r){return i(r,t,e)}})),e}(n.defaults({boundingRect:g[e.brushType](e)},e))})),x=o.createVisualMappings(t.option,u,(function(e){e.mappingMethod="fixed"}));function b(e){return"all"===h||p[e]}function S(e){return!!e.length}n.isArray(h)&&n.each(h,(function(e){p[e]=1})),e.eachSeries((function(i,r){var a=_[r]=[];"parallel"===i.subType?function(e,t){var i=e.coordinateSystem;v|=i.hasAxisBrushed(),b(t)&&i.eachActiveState(e.getData(),(function(e,t){"active"===e&&(y[t]=1)}))}(i,r):function(i,r,a){var o=m(i);if(!o||function(e,t){var i=e.option.seriesIndex;return null!=i&&"all"!==i&&(n.isArray(i)?n.indexOf(i,t)<0:t!==i)}(t,r))return;if(n.each(C,(function(r){o[r.brushType]&&t.brushTargetManager.controlSeries(r,i,e)&&a.push(r),v|=S(a)})),b(r)&&S(a)){var s=i.getData();s.each((function(e){f(o,a,s,e)&&(y[e]=1)}))}}(i,r,a)})),e.eachSeries((function(e,t){var i={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};l.selected.push(i);var r=m(e),n=_[t],a=e.getData(),s=b(t)?function(e){return y[e]?(i.dataIndex.push(a.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(e){return f(r,n,a,e)?(i.dataIndex.push(a.getRawIndex(e)),"inBrush"):"outOfBrush"};(b(t)?v:S(n))&&o.applyVisual(u,x,a,s)}))})),function(e,t,i,r,n){if(!n)return;var a=e.getZr();if(a.__ecInBrushSelectEvent)return;a.__ecBrushSelect||(a.__ecBrushSelect=p);l.createOrUpdate(a,"__ecBrushSelect",i,t)(e,r)}(t,r,a,c,i)}));var g={lineX:n.noop,lineY:n.noop,rect:function(e){return y(e.range)},polygon:function(e){for(var t,i=e.range,r=0,n=i.length;r<n;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=i[r];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&y(t)}};function y(e){return new a(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}t.layoutCovers=h},function(e,t,i){var r=i(1);i(217),i(544),i(218);var n=i(545),a=i(13);r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,n),a.registerSubTypeDefaulter("legend",(function(){return"plain"}))},function(e,t,i){var r=i(1),n=i(0),a=i(12),o=i(4).isNameSpecified,s=i(34).legend.selector,l={all:{type:"all",title:n.clone(s.all)},inverse:{type:"inverse",title:n.clone(s.inverse)}},c=r.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(e,t,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},mergeOption:function(e){c.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),n.isArray(t)&&n.each(t,(function(e,i){n.isString(e)&&(e={type:e}),t[i]=n.merge(e,l[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,i=0;i<e.length;i++){var r=e[i].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},_updateData:function(e){var t=[],i=[];e.eachRawSeries((function(r){var n,a=r.name;if(i.push(a),r.legendVisualProvider){var s=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(i=i.concat(s)),s.length?t=t.concat(s):n=!0}else n=!0;n&&o(r)&&t.push(r.name)})),this._availableNames=i;var r=this.get("data")||t,s=n.map(r,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new a(e,this,this.ecModel)}),this);this._data=s},getData:function(){return this._data},select:function(e){var t=this.option.selected;if("single"===this.get("selectedMode")){var i=this._data;n.each(i,(function(e){t[e.get("name")]=!1}))}t[e]=!0},unSelect:function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},toggleSelected:function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},allSelect:function(){var e=this._data,t=this.option.selected;n.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;n.each(e,(function(e){var i=e.get("name",!0);t.hasOwnProperty(i)||(t[i]=!0),t[i]=!t[i]}))},isSelected:function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&n.indexOf(this._availableNames,e)>=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}}),u=c;e.exports=u},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(19).createSymbol,o=i(2),s=i(212).makeBackground,l=i(6),c=n.curry,u=n.each,d=o.Group,h=r.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new d),this._backgroundEl,this.group.add(this._selectorGroup=new d),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,i){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var a=e.get("align"),o=e.get("orient");a&&"auto"!==a||(a="right"===e.get("left")&&"vertical"===o?"right":"left");var c=e.get("selector",!0),u=e.get("selectorPosition",!0);!c||u&&"auto"!==u||(u="horizontal"===o?"end":"start"),this.renderInner(a,e,t,i,c,o,u);var d=e.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},p=e.get("padding"),f=l.getLayoutRect(d,h,p),m=this.layoutInner(e,a,f,r,c,u),g=l.getLayoutRect(n.defaults({width:m.width,height:m.height},d),h,p);this.group.attr("position",[g.x-m.x,g.y-m.y]),this.group.add(this._backgroundEl=s(m,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,i,r,a,o,s){var l=this.getContentGroup(),h=n.createHashMap(),p=t.get("selectedMode"),y=[];i.eachRawSeries((function(e){!e.get("legendHoverLink")&&y.push(e.id)})),u(t.getData(),(function(n,a){var o=n.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var s=i.getSeriesByName(o)[0];if(!h.get(o))if(s){var u=s.getData(),_=u.getVisual("color"),v=u.getVisual("borderColor");"function"==typeof _&&(_=_(s.getDataParams(0))),"function"==typeof v&&(v=v(s.getDataParams(0)));var C=u.getVisual("legendSymbol")||"roundRect",x=u.getVisual("symbol");this._createItem(o,a,n,t,C,x,e,_,v,p).on("click",c(f,o,null,r,y)).on("mouseover",c(m,s.name,null,r,y)).on("mouseout",c(g,s.name,null,r,y)),h.set(o,!0)}else i.eachRawSeries((function(i){if(!h.get(o)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(o))return;var l=s.indexOfName(o),u=s.getItemVisual(l,"color"),d=s.getItemVisual(l,"borderColor");this._createItem(o,a,n,t,"roundRect",null,e,u,d,p).on("click",c(f,null,o,r,y)).on("mouseover",c(m,null,o,r,y)).on("mouseout",c(g,null,o,r,y)),h.set(o,!0)}}),this)}else l.add(new d({newline:!0}))}),this),a&&this._createSelector(a,t,r,o,s)},_createSelector:function(e,t,i,r,n){var a=this.getSelectorGroup();u(e,(function(e){!function(e){var r=e.type,n=new o.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});a.add(n);var s=t.getModel("selectorLabel"),l=t.getModel("emphasis.selectorLabel");o.setLabelStyle(n.style,n.hoverStyle={},s,l,{defaultText:e.title,isRectText:!1}),o.setHoverStyle(n)}(e)}))},_createItem:function(e,t,i,r,s,l,c,u,h,f){var m=r.get("itemWidth"),g=r.get("itemHeight"),y=r.get("inactiveColor"),_=r.get("inactiveBorderColor"),v=r.get("symbolKeepAspect"),C=r.getModel("itemStyle"),x=r.isSelected(e),b=new d,S=i.getModel("textStyle"),T=i.get("icon"),E=i.getModel("tooltip"),w=E.parentModel,A=a(s=T||s,0,0,m,g,x?u:y,null==v||v);if(b.add(p(A,s,C,h,_,x)),!T&&l&&(l!==s||"none"===l)){var P=.8*g;"none"===l&&(l="circle");var D=a(l,(m-P)/2,(g-P)/2,P,P,x?u:y,null==v||v);b.add(p(D,l,C,h,_,x))}var M="left"===c?m+5:-5,I=c,R=r.get("formatter"),O=e;"string"==typeof R&&R?O=R.replace("{name}",null!=e?e:""):"function"==typeof R&&(O=R(e)),b.add(new o.Text({style:o.setTextStyle({},S,{text:O,x:M,y:g/2,textFill:x?S.getTextColor():y,textAlign:I,textVerticalAlign:"middle"})}));var L=new o.Rect({shape:b.getBoundingRect(),invisible:!0,tooltip:E.get("show")?n.extend({content:e,formatter:w.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:r.componentIndex,name:e,$vars:["name"]}},E.option):null});return b.add(L),b.eachChild((function(e){e.silent=!0})),L.silent=!f,this.getContentGroup().add(b),o.setHoverStyle(b),b.__legendDataIndex=t,b},layoutInner:function(e,t,i,r,n,a){var o=this.getContentGroup(),s=this.getSelectorGroup();l.box(e.get("orient"),o,e.get("itemGap"),i.width,i.height);var c=o.getBoundingRect(),u=[-c.x,-c.y];if(n){l.box("horizontal",s,e.get("selectorItemGap",!0));var d=s.getBoundingRect(),h=[-d.x,-d.y],p=e.get("selectorButtonGap",!0),f=e.getOrient().index,m=0===f?"width":"height",g=0===f?"height":"width",y=0===f?"y":"x";"end"===a?h[f]+=c[m]+p:u[f]+=d[m]+p,h[1-f]+=c[g]/2-d[g]/2,s.attr("position",h),o.attr("position",u);var _={x:0,y:0};return _[m]=c[m]+p+d[m],_[g]=Math.max(c[g],d[g]),_[y]=Math.min(0,d[y]+h[1-f]),_}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function p(e,t,i,r,n,a){var o;return"line"!==t&&t.indexOf("empty")<0?(o=i.getItemStyle(),e.style.stroke=r,a||(o.stroke=n)):o=i.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function f(e,t,i,r){g(e,t,i,r),i.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),m(e,t,i,r)}function m(e,t,i,r){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function g(e,t,i,r){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}e.exports=h},function(e,t,i){i(124),i(56),i(57),i(550),i(551),i(126),i(127)},function(e,t,i){i(124),i(56),i(57),i(552),i(553),i(126),i(127)},function(e,t,i){var r=i(1),n=i(222);i(223),i(224),i(556),i(557),i(229),r.registerPreprocessor(n)},function(e,t,i){var r=i(0),n=r.each;function a(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}e.exports=function(e){var t=e&&e.visualMap;r.isArray(t)||(t=t?[t]:[]),n(t,(function(e){if(e){a(e,"splitList")&&!a(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&r.isArray(t)&&n(t,(function(e){r.isObject(e)&&(a(e,"start")&&!a(e,"min")&&(e.min=e.start),a(e,"end")&&!a(e,"max")&&(e.max=e.end))}))}}))}},function(e,t,i){i(13).registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}))},function(e,t,i){var r=i(1),n=i(0),a=i(96),o=i(47),s=r.PRIORITY.VISUAL.COMPONENT;function l(e,t,i,r){for(var n=t.targetVisuals[r],a=o.prepareVisualTypes(n),s={color:e.getData().getVisual("color")},l=0,c=a.length;l<c;l++){var u=a[l],d=n["opacity"===u?"__alphaForOpacity":u];d&&d.applyVisual(i,h,p)}return s.color;function h(e){return s[e]}function p(e,t){s[e]=t}}r.registerVisual(s,{createOnAllSeries:!0,reset:function(e,t){var i=[];return t.eachComponent("visualMap",(function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||i.push(a.incrementalApplyVisual(t.stateList,t.targetVisuals,n.bind(t.getValueState,t),t.getDataDimension(e.getData())))})),i}}),r.registerVisual(s,{createOnAllSeries:!0,reset:function(e,t){var i=e.getData(),r=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(n.bind(l,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimension(i),s=i.getDimensionInfo(o);null!=s&&(a.dimension=s.index,r.push(a))}})),e.getData().setVisual("visualMeta",r)}})},function(e,t,i){var r=i(1),n=i(0),a=i(11),o=i(226),s=i(47),l=i(96),c=i(4),u=i(3),d=s.mapVisual,h=s.eachVisual,p=n.isArray,f=n.each,m=u.asc,g=u.linearMap,y=n.noop,_=r.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(e,t,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(e,i)},optionUpdated:function(e,t){var i=this.option;a.canvasSupported||(i.realtime=!1),!t&&l.replaceVisualOption(i,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(e){var t=this.stateList;e=n.bind(e,this),this.controllerVisuals=l.createVisualMappings(this.option.controller,t,e),this.targetVisuals=l.createVisualMappings(this.option.target,t,e)},getTargetSeriesIndices:function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,i){t.push(i)})):t=c.normalizeToArray(e),t},eachTargetSeries:function(e,t){n.each(this.getTargetSeriesIndices(),(function(i){e.call(t,this.ecModel.getSeriesByIndex(i))}),this)},isTargetSeries:function(e){var t=!1;return this.eachTargetSeries((function(i){i===e&&(t=!0)})),t},formatValueText:function(e,t,i){var r,a,o=this.option,s=o.precision,l=this.dataBound,c=o.formatter;return i=i||["<",">"],n.isArray(e)&&(e=e.slice(),r=!0),a=t?e:r?[u(e[0]),u(e[1])]:u(e),n.isString(c)?c.replace("{value}",r?a[0]:a).replace("{value2}",r?a[1]:a):n.isFunction(c)?r?c(e[0],e[1]):c(e):r?e[0]===l[0]?i[0]+" "+a[1]:e[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;function u(e){return e===l[0]?"min":e===l[1]?"max":(+e).toFixed(Math.min(s,20))}},resetExtent:function(){var e=this.option,t=m([e.min,e.max]);this._dataExtent=t},getDataDimension:function(e){var t=this.option.dimension,i=e.dimensions;if(null!=t||i.length){if(null!=t)return e.getDimension(t);for(var r=e.dimensions,n=r.length-1;n>=0;n--){var a=r[n];if(!e.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var e=this.ecModel,t=this.option,i={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),a=t.controller||(t.controller={});n.merge(r,i),n.merge(a,i);var l=this.isCategory();function c(i){p(t.color)&&!i.inRange&&(i.inRange={color:t.color.slice().reverse()}),i.inRange=i.inRange||{color:e.get("gradientColor")},f(this.stateList,(function(e){var t=i[e];if(n.isString(t)){var r=o.get(t,"active",l);r?(i[e]={},i[e][t]=r):delete i[e]}}),this)}c.call(this,r),c.call(this,a),function(e,t,i){var r=e[t],n=e[i];r&&!n&&(n=e[i]={},f(r,(function(e,t){if(s.isValidType(t)){var i=o.get(t,"inactive",l);null!=i&&(n[t]=i,"color"!==t||n.hasOwnProperty("opacity")||n.hasOwnProperty("colorAlpha")||(n.opacity=[0,0]))}})))}.call(this,r,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,i=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor");f(this.stateList,(function(a){var o=this.itemSize,s=e[a];s||(s=e[a]={color:l?r:[r]}),null==s.symbol&&(s.symbol=t&&n.clone(t)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n.clone(i)||(l?o[0]:[o[0],o[0]])),s.symbol=d(s.symbol,(function(e){return"none"===e||"square"===e?"roundRect":e}));var c=s.symbolSize;if(null!=c){var u=-1/0;h(c,(function(e){e>u&&(u=e)})),s.symbolSize=d(c,(function(e){return g(e,[0,u],[0,o[0]],!0)}))}}),this)}.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:y,getValueState:y,getVisualMeta:y});e.exports=_},function(e,t,i){var r=i(0),n={get:function(e,t,i){var n=r.clone((a[e]||{})[t]);return i&&r.isArray(n)?n[n.length-1]:n}},a={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},o=n;e.exports=o},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(7),s=i(6),l=i(47),c=r.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(e,t){this.ecModel=e,this.api=t,this.visualMapModel},render:function(e,t,i,r){this.visualMapModel=e,!1!==e.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(e){var t=this.visualMapModel,i=o.normalizeCssArray(t.get("padding")||0),r=e.getBoundingRect();e.add(new a.Rect({z2:-1,silent:!0,shape:{x:r.x-i[3],y:r.y-i[0],width:r.width+i[3]+i[1],height:r.height+i[0]+i[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},getControllerVisual:function(e,t,i){var r=(i=i||{}).forceState,a=this.visualMapModel,o={};if("symbol"===t&&(o.symbol=a.get("itemSymbol")),"color"===t){var s=a.get("contentColor");o.color=s}function c(e){return o[e]}function u(e,t){o[e]=t}var d=a.controllerVisuals[r||a.getValueState(e)],h=l.prepareVisualTypes(d);return n.each(h,(function(r){var n=d[r];i.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",n=d.__alphaForOpacity),l.dependsOn(r,t)&&n&&n.applyVisual(e,c,u)})),o[t]},positionGroup:function(e){var t=this.visualMapModel,i=this.api;s.positionElement(e,t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:n.noop});e.exports=c},function(e,t,i){var r=i(0),n=i(6).getLayoutRect;t.getItemAlign=function(e,t,i){var r=e.option,a=r.align;if(null!=a&&"auto"!==a)return a;for(var o={width:t.getWidth(),height:t.getHeight()},s="horizontal"===r.orient?1:0,l=[["left","right","width"],["top","bottom","height"]],c=l[s],u=[0,null,10],d={},h=0;h<3;h++)d[l[1-s][h]]=u[h],d[c[h]]=2===h?i[0]:r[c[h]];var p=[["x","width",3],["y","height",0]][s],f=n(d,o,r.padding);return c[(f.margin[p[2]]||0)+f[p[0]]+.5*f[p[1]]<.5*o[p[1]]?0:1]},t.makeHighDownBatch=function(e,t){return r.each(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}},function(e,t,i){i(1).registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))}))},function(e,t,i){var r=i(1),n=i(222);i(223),i(224),i(558),i(559),i(229),r.registerPreprocessor(n)},function(e,t,i){var r,n=i(11),a="urn:schemas-microsoft-com:vml",o="undefined"==typeof window?null:window,s=!1,l=o&&o.document;if(l&&!n.canvasSupported)try{!l.namespaces.zrvml&&l.namespaces.add("zrvml",a),r=function(e){return l.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){r=function(e){return l.createElement("<"+e+' xmlns="'+a+'" class="zrvml">')}}t.doc=l,t.createNode=function(e){return r(e)},t.initVML=function(){if(!s&&l){s=!0;var e=l.styleSheets;e.length<31?l.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},function(e,t,i){e.exports=i(569)},function(e,t){console.clear(),console.log("%c \n DC-SDK \n  %c \n 用数字描绘世界之美  %c \n\n    版本:".concat("1.11.0","\n    编译日期:").concat("2020-10-28 10:17:17","\n    Cesium版本:1.74\n    作者:").concat("Caven Chen <cavencj@gmail.com>","\n    主页: ").concat("https://www.dvgis.cn","\n    github:").concat("https://github.com/dvgis/dc-sdk.git","\n    授权信息:授权-永久使用此软件当前版本。 \n\n\n    版权声明:\n    1.框架作为一个基础平台,完全开源,任何个人和机构可以修改、重构,无需经过我方授权。\n    2.后期会添加一些行业性的插件和工具,代码会适量的开源。\n    3.任何个人和机构在遵守下列条件的前提下可以永久免费使用:\n     1)程序包完整引用\n     2)保留此版权信息在控制台输出\n    我方保留对此版权信息的最终解释权。"),"font-size:20px;padding-left:70px;color:#EEB422","font-size:14px;padding-left:50px;color:#EEB422;font-style:oblique","font-size:12px;color:#0865ba")},function(module,exports,__webpack_require__){(function(Buffer,global){!function(e,t){t(exports)}(0,(function(exports){"use strict";function defined(e){return null!=e}function DeveloperError(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}defined(Object.create)&&(DeveloperError.prototype=Object.create(Error.prototype),DeveloperError.prototype.constructor=DeveloperError),DeveloperError.prototype.toString=function(){var e=this.name+": "+this.message;return defined(this.stack)&&(e+="\n"+this.stack.toString()),e},DeveloperError.throwInstantiationError=function(){throw new DeveloperError("This function defines an interface and should not be called directly.")};var Check={};function getUndefinedErrorMessage(e){return e+" is required, actual value was undefined"}function getFailedTypeErrorMessage(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}function defaultValue(e,t){return null!=e?e:t}function MersenneTwister(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)}Check.typeOf={},Check.defined=function(e,t){if(!defined(t))throw new DeveloperError(getUndefinedErrorMessage(e))},Check.typeOf.func=function(e,t){if("function"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"function",e))},Check.typeOf.string=function(e,t){if("string"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"string",e))},Check.typeOf.number=function(e,t){if("number"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"number",e))},Check.typeOf.number.lessThan=function(e,t,i){if(Check.typeOf.number(e,t),i<=t)throw new DeveloperError("Expected "+e+" to be less than "+i+", actual value was "+t)},Check.typeOf.number.lessThanOrEquals=function(e,t,i){if(Check.typeOf.number(e,t),i<t)throw new DeveloperError("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},Check.typeOf.number.greaterThan=function(e,t,i){if(Check.typeOf.number(e,t),t<=i)throw new DeveloperError("Expected "+e+" to be greater than "+i+", actual value was "+t)},Check.typeOf.number.greaterThanOrEquals=function(e,t,i){if(Check.typeOf.number(e,t),t<i)throw new DeveloperError("Expected "+e+" to be greater than or equal to"+i+", actual value was "+t)},Check.typeOf.object=function(e,t){if("object"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"object",e))},Check.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"boolean",e))},Check.typeOf.number.equals=function(e,t,i,r){if(Check.typeOf.number(e,i),Check.typeOf.number(t,r),i!==r)throw new DeveloperError(e+" must be equal to "+t+", the actual values are "+i+" and "+r)},defaultValue.EMPTY_OBJECT=Object.freeze({}),MersenneTwister.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++)e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},MersenneTwister.prototype.genrand_int32=function(){var e,t,i=new Array(0,this.MATRIX_A);if(this.mti>=this.N){for(this.mti==this.N+1&&this.init_genrand(5489),t=0;t<this.N-this.M;t++)e=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+this.M]^e>>>1^i[1&e];for(;t<this.N-1;t++)e=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+(this.M-this.N)]^e>>>1^i[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^i[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},MersenneTwister.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var CesiumMath={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296};CesiumMath.sign=defaultValue(Math.sign,(function(e){return 0==(e=+e)||e!=e?e:0<e?1:-1})),CesiumMath.signNotZero=function(e){return e<0?-1:1},CesiumMath.toSNorm=function(e,t){return t=defaultValue(t,255),Math.round((.5*CesiumMath.clamp(e,-1,1)+.5)*t)},CesiumMath.fromSNorm=function(e,t){return t=defaultValue(t,255),CesiumMath.clamp(e,0,t)/t*2-1},CesiumMath.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:CesiumMath.clamp((e-t)/i,0,1)},CesiumMath.sinh=defaultValue(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),CesiumMath.cosh=defaultValue(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),CesiumMath.lerp=function(e,t,i){return(1-i)*e+i*t},CesiumMath.PI=Math.PI,CesiumMath.ONE_OVER_PI=1/Math.PI,CesiumMath.PI_OVER_TWO=Math.PI/2,CesiumMath.PI_OVER_THREE=Math.PI/3,CesiumMath.PI_OVER_FOUR=Math.PI/4,CesiumMath.PI_OVER_SIX=Math.PI/6,CesiumMath.THREE_PI_OVER_TWO=3*Math.PI/2,CesiumMath.TWO_PI=2*Math.PI,CesiumMath.ONE_OVER_TWO_PI=1/(2*Math.PI),CesiumMath.RADIANS_PER_DEGREE=Math.PI/180,CesiumMath.DEGREES_PER_RADIAN=180/Math.PI,CesiumMath.RADIANS_PER_ARCSECOND=CesiumMath.RADIANS_PER_DEGREE/3600,CesiumMath.toRadians=function(e){return e*CesiumMath.RADIANS_PER_DEGREE},CesiumMath.toDegrees=function(e){return e*CesiumMath.DEGREES_PER_RADIAN},CesiumMath.convertLongitudeRange=function(e){var t=CesiumMath.TWO_PI;return(e=e-Math.floor(e/t)*t)<-Math.PI?e+t:e>=Math.PI?e-t:e},CesiumMath.clampToLatitudeRange=function(e){return CesiumMath.clamp(e,-1*CesiumMath.PI_OVER_TWO,CesiumMath.PI_OVER_TWO)},CesiumMath.negativePiToPi=function(e){return CesiumMath.zeroToTwoPi(e+CesiumMath.PI)-CesiumMath.PI},CesiumMath.zeroToTwoPi=function(e){var t=CesiumMath.mod(e,CesiumMath.TWO_PI);return Math.abs(t)<CesiumMath.EPSILON14&&Math.abs(e)>CesiumMath.EPSILON14?CesiumMath.TWO_PI:t},CesiumMath.mod=function(e,t){return(e%t+t)%t},CesiumMath.equalsEpsilon=function(e,t,i,r){i=defaultValue(i,0),r=defaultValue(r,i);var n=Math.abs(e-t);return n<=r||n<=i*Math.max(Math.abs(e),Math.abs(t))},CesiumMath.lessThan=function(e,t,i){return e-t<-i},CesiumMath.lessThanOrEquals=function(e,t,i){return e-t<i},CesiumMath.greaterThan=function(e,t,i){return i<e-t},CesiumMath.greaterThanOrEquals=function(e,t,i){return-i<e-t};var factorials=[1];CesiumMath.factorial=function(e){var t=factorials.length;if(t<=e)for(var i=factorials[t-1],r=t;r<=e;r++){var n=i*r;factorials.push(n),i=n}return factorials[e]},CesiumMath.incrementWrap=function(e,t,i){return i=defaultValue(i,0),t<++e&&(e=i),e},CesiumMath.isPowerOfTwo=function(e){return 0!==e&&0==(e&e-1)},CesiumMath.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},CesiumMath.clamp=function(e,t,i){return e<t?t:i<e?i:e};var randomNumberGenerator=new MersenneTwister;function Cartesian3(e,t,i){this.x=defaultValue(e,0),this.y=defaultValue(t,0),this.z=defaultValue(i,0)}CesiumMath.setRandomNumberSeed=function(e){randomNumberGenerator=new MersenneTwister(e)},CesiumMath.nextRandomNumber=function(){return randomNumberGenerator.random()},CesiumMath.randomBetween=function(e,t){return CesiumMath.nextRandomNumber()*(t-e)+e},CesiumMath.acosClamped=function(e){return Math.acos(CesiumMath.clamp(e,-1,1))},CesiumMath.asinClamped=function(e){return Math.asin(CesiumMath.clamp(e,-1,1))},CesiumMath.chordLength=function(e,t){return 2*t*Math.sin(.5*e)},CesiumMath.logBase=function(e,t){return Math.log(e)/Math.log(t)},CesiumMath.cbrt=defaultValue(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),1/3);return e<0?-t:t})),CesiumMath.log2=defaultValue(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),CesiumMath.fog=function(e,t){return t*=e,1-Math.exp(-t*t)},CesiumMath.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},CesiumMath.fastApproximateAtan2=function(e,t){var i=Math.abs(e),r=Math.abs(t),n=Math.max(i,r);n=Math.min(i,r)/n,i=CesiumMath.fastApproximateAtan(n);return i=Math.abs(t)>Math.abs(e)?CesiumMath.PI_OVER_TWO-i:i,i=e<0?CesiumMath.PI-i:i,t<0?-i:i},Cartesian3.fromSpherical=function(e,t){defined(t)||(t=new Cartesian3);var i=e.clock,r=e.cone,n=defaultValue(e.magnitude,1);e=n*Math.sin(r);return t.x=e*Math.cos(i),t.y=e*Math.sin(i),t.z=n*Math.cos(r),t},Cartesian3.fromElements=function(e,t,i,r){return defined(r)?(r.x=e,r.y=t,r.z=i,r):new Cartesian3(e,t,i)},Cartesian3.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new Cartesian3(e.x,e.y,e.z)},Cartesian3.fromCartesian4=Cartesian3.clone,Cartesian3.packedLength=3,Cartesian3.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},Cartesian3.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Cartesian3),i.x=e[t++],i.y=e[t++],i.z=e[t],i},Cartesian3.packArray=function(e,t){var i=e.length,r=3*i;if(defined(t)){if(!Array.isArray(t)&&t.length!==r)throw new DeveloperError("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(var n=0;n<i;++n)Cartesian3.pack(e[n],t,3*n);return t},Cartesian3.unpackArray=function(e,t){var i=e.length;defined(t)?t.length=i/3:t=new Array(i/3);for(var r=0;r<i;r+=3){var n=r/3;t[n]=Cartesian3.unpack(e,r,t[n])}return t},Cartesian3.fromArray=Cartesian3.unpack,Cartesian3.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},Cartesian3.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},Cartesian3.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},Cartesian3.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},Cartesian3.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},Cartesian3.magnitude=function(e){return Math.sqrt(Cartesian3.magnitudeSquared(e))};var distanceScratch=new Cartesian3;Cartesian3.distance=function(e,t){return Cartesian3.subtract(e,t,distanceScratch),Cartesian3.magnitude(distanceScratch)},Cartesian3.distanceSquared=function(e,t){return Cartesian3.subtract(e,t,distanceScratch),Cartesian3.magnitudeSquared(distanceScratch)},Cartesian3.normalize=function(e,t){var i=Cartesian3.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t},Cartesian3.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},Cartesian3.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},Cartesian3.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},Cartesian3.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},Cartesian3.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},Cartesian3.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},Cartesian3.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},Cartesian3.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},Cartesian3.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var lerpScratch=new Cartesian3;Cartesian3.lerp=function(e,t,i,r){return Cartesian3.multiplyByScalar(t,i,lerpScratch),r=Cartesian3.multiplyByScalar(e,1-i,r),Cartesian3.add(lerpScratch,r,r)};var angleBetweenScratch=new Cartesian3,angleBetweenScratch2=new Cartesian3;Cartesian3.angleBetween=function(e,t){return Cartesian3.normalize(e,angleBetweenScratch),Cartesian3.normalize(t,angleBetweenScratch2),e=Cartesian3.dot(angleBetweenScratch,angleBetweenScratch2),t=Cartesian3.magnitude(Cartesian3.cross(angleBetweenScratch,angleBetweenScratch2,angleBetweenScratch)),Math.atan2(t,e)};var mostOrthogonalAxisScratch=new Cartesian3;Cartesian3.mostOrthogonalAxis=function(e,t){return e=Cartesian3.normalize(e,mostOrthogonalAxisScratch),Cartesian3.abs(e,e),e.x<=e.y?e.x<=e.z?Cartesian3.clone(Cartesian3.UNIT_X,t):Cartesian3.clone(Cartesian3.UNIT_Z,t):e.y<=e.z?Cartesian3.clone(Cartesian3.UNIT_Y,t):Cartesian3.clone(Cartesian3.UNIT_Z,t)},Cartesian3.projectVector=function(e,t,i){return e=Cartesian3.dot(e,t)/Cartesian3.dot(t,t),Cartesian3.multiplyByScalar(t,e,i)},Cartesian3.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},Cartesian3.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},Cartesian3.equalsEpsilon=function(e,t,i,r){return e===t||defined(e)&&defined(t)&&CesiumMath.equalsEpsilon(e.x,t.x,i,r)&&CesiumMath.equalsEpsilon(e.y,t.y,i,r)&&CesiumMath.equalsEpsilon(e.z,t.z,i,r)},Cartesian3.cross=function(e,t,i){var r=e.x,n=e.y,a=e.z,o=t.x,s=t.y;t=n*(e=t.z)-a*s,e=a*o-r*e,o=r*s-n*o;return i.x=t,i.y=e,i.z=o,i},Cartesian3.midpoint=function(e,t,i){return i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},Cartesian3.fromDegrees=function(e,t,i,r,n){return e=CesiumMath.toRadians(e),t=CesiumMath.toRadians(t),Cartesian3.fromRadians(e,t,i,r,n)};var scratchN=new Cartesian3,scratchK=new Cartesian3,wgs84RadiiSquared=new Cartesian3(40680631590769,40680631590769,40408299984661.445);Cartesian3.fromRadians=function(e,t,i,r,n){i=defaultValue(i,0);var a=defined(r)?r.radiiSquared:wgs84RadiiSquared;r=Math.cos(t);return scratchN.x=r*Math.cos(e),scratchN.y=r*Math.sin(e),scratchN.z=Math.sin(t),scratchN=Cartesian3.normalize(scratchN,scratchN),Cartesian3.multiplyComponents(a,scratchN,scratchK),a=Math.sqrt(Cartesian3.dot(scratchN,scratchK)),scratchK=Cartesian3.divideByScalar(scratchK,a,scratchK),scratchN=Cartesian3.multiplyByScalar(scratchN,i,scratchN),defined(n)||(n=new Cartesian3),Cartesian3.add(scratchK,scratchN,n)},Cartesian3.fromDegreesArray=function(e,t,i){var r=e.length;defined(i)?i.length=r/2:i=new Array(r/2);for(var n=0;n<r;n+=2){var a=e[n],o=e[n+1],s=n/2;i[s]=Cartesian3.fromDegrees(a,o,0,t,i[s])}return i},Cartesian3.fromRadiansArray=function(e,t,i){var r=e.length;defined(i)?i.length=r/2:i=new Array(r/2);for(var n=0;n<r;n+=2){var a=e[n],o=e[n+1],s=n/2;i[s]=Cartesian3.fromRadians(a,o,0,t,i[s])}return i},Cartesian3.fromDegreesArrayHeights=function(e,t,i){var r=e.length;defined(i)?i.length=r/3:i=new Array(r/3);for(var n=0;n<r;n+=3){var a=e[n],o=e[n+1],s=e[n+2],l=n/3;i[l]=Cartesian3.fromDegrees(a,o,s,t,i[l])}return i},Cartesian3.fromRadiansArrayHeights=function(e,t,i){var r=e.length;defined(i)?i.length=r/3:i=new Array(r/3);for(var n=0;n<r;n+=3){var a=e[n],o=e[n+1],s=e[n+2],l=n/3;i[l]=Cartesian3.fromRadians(a,o,s,t,i[l])}return i},Cartesian3.ZERO=Object.freeze(new Cartesian3(0,0,0)),Cartesian3.UNIT_X=Object.freeze(new Cartesian3(1,0,0)),Cartesian3.UNIT_Y=Object.freeze(new Cartesian3(0,1,0)),Cartesian3.UNIT_Z=Object.freeze(new Cartesian3(0,0,1)),Cartesian3.prototype.clone=function(e){return Cartesian3.clone(this,e)},Cartesian3.prototype.equals=function(e){return Cartesian3.equals(this,e)},Cartesian3.prototype.equalsEpsilon=function(e,t,i){return Cartesian3.equalsEpsilon(this,e,t,i)},Cartesian3.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};var scaleToGeodeticSurfaceIntersection=new Cartesian3,scaleToGeodeticSurfaceGradient=new Cartesian3;function scaleToGeodeticSurface(e,t,i,r,n){var a=e.x,o=e.y,s=e.z,l=a*a*(d=t.x)*d,c=o*o*(h=t.y)*h,u=s*s*(t=t.z)*t,d=l+c+u,h=Math.sqrt(1/d);t=Cartesian3.multiplyByScalar(e,h,scaleToGeodeticSurfaceIntersection);if(d<r)return isFinite(h)?Cartesian3.clone(t,n):void 0;var p=i.x,f=i.y,m=i.z;(i=scaleToGeodeticSurfaceGradient).x=t.x*p*2,i.y=t.y*f*2,i.z=t.z*m*2;var g,y,_,v,C,x,b,S=(1-h)*Cartesian3.magnitude(e)/(.5*Cartesian3.magnitude(i)),T=0;do{T=(g=l*(C=(y=1/(1+(S-=T)*p))*y)+c*(x=(_=1/(1+S*f))*_)+u*(b=(v=1/(1+S*m))*v)-1)/(-2*(l*(C*y)*p+c*(x*_)*f+u*(b*v)*m))}while(Math.abs(g)>CesiumMath.EPSILON12);return defined(n)?(n.x=a*y,n.y=o*_,n.z=s*v,n):new Cartesian3(a*y,o*_,s*v)}function Cartographic(e,t,i){this.longitude=defaultValue(e,0),this.latitude=defaultValue(t,0),this.height=defaultValue(i,0)}Cartographic.fromRadians=function(e,t,i,r){return i=defaultValue(i,0),defined(r)?(r.longitude=e,r.latitude=t,r.height=i,r):new Cartographic(e,t,i)},Cartographic.fromDegrees=function(e,t,i,r){return e=CesiumMath.toRadians(e),t=CesiumMath.toRadians(t),Cartographic.fromRadians(e,t,i,r)};var cartesianToCartographicN=new Cartesian3,cartesianToCartographicP=new Cartesian3,cartesianToCartographicH=new Cartesian3,wgs84OneOverRadii=new Cartesian3(1/6378137,1/6378137,1/6356752.314245179),wgs84OneOverRadiiSquared=new Cartesian3(1/40680631590769,1/40680631590769,1/40408299984661.445),wgs84CenterToleranceSquared=CesiumMath.EPSILON1;function initialize(e,t,i,r){t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,0),e._radii=new Cartesian3(t,i,r),e._radiiSquared=new Cartesian3(t*t,i*i,r*r),e._radiiToTheFourth=new Cartesian3(t*t*t*t,i*i*i*i,r*r*r*r),e._oneOverRadii=new Cartesian3(0===t?0:1/t,0===i?0:1/i,0===r?0:1/r),e._oneOverRadiiSquared=new Cartesian3(0===t?0:1/(t*t),0===i?0:1/(i*i),0===r?0:1/(r*r)),e._minimumRadius=Math.min(t,i,r),e._maximumRadius=Math.max(t,i,r),e._centerToleranceSquared=CesiumMath.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Ellipsoid(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,initialize(this,e,t,i)}Cartographic.fromCartesian=function(e,t,i){var r=defined(t)?t.oneOverRadii:wgs84OneOverRadii,n=defined(t)?t.oneOverRadiiSquared:wgs84OneOverRadiiSquared;r=scaleToGeodeticSurface(e,r,n,defined(t)?t._centerToleranceSquared:wgs84CenterToleranceSquared,cartesianToCartographicP);if(defined(r))return t=Cartesian3.multiplyComponents(r,n,cartesianToCartographicN),t=Cartesian3.normalize(t,t),n=Cartesian3.subtract(e,r,cartesianToCartographicH),r=Math.atan2(t.y,t.x),t=Math.asin(t.z),n=CesiumMath.sign(Cartesian3.dot(n,e))*Cartesian3.magnitude(n),defined(i)?(i.longitude=r,i.latitude=t,i.height=n,i):new Cartographic(r,t,n)},Cartographic.toCartesian=function(e,t,i){return Cartesian3.fromRadians(e.longitude,e.latitude,e.height,t,i)},Cartographic.clone=function(e,t){if(defined(e))return defined(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Cartographic(e.longitude,e.latitude,e.height)},Cartographic.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},Cartographic.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},Cartographic.ZERO=Object.freeze(new Cartographic(0,0,0)),Cartographic.prototype.clone=function(e){return Cartographic.clone(this,e)},Cartographic.prototype.equals=function(e){return Cartographic.equals(this,e)},Cartographic.prototype.equalsEpsilon=function(e,t){return Cartographic.equalsEpsilon(this,e,t)},Cartographic.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(Ellipsoid.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),Ellipsoid.clone=function(e,t){if(defined(e)){var i=e._radii;return defined(t)?(Cartesian3.clone(i,t._radii),Cartesian3.clone(e._radiiSquared,t._radiiSquared),Cartesian3.clone(e._radiiToTheFourth,t._radiiToTheFourth),Cartesian3.clone(e._oneOverRadii,t._oneOverRadii),Cartesian3.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Ellipsoid(i.x,i.y,i.z)}},Ellipsoid.fromCartesian3=function(e,t){return defined(t)||(t=new Ellipsoid),defined(e)&&initialize(t,e.x,e.y,e.z),t},Ellipsoid.WGS84=Object.freeze(new Ellipsoid(6378137,6378137,6356752.314245179)),Ellipsoid.UNIT_SPHERE=Object.freeze(new Ellipsoid(1,1,1)),Ellipsoid.MOON=Object.freeze(new Ellipsoid(CesiumMath.LUNAR_RADIUS,CesiumMath.LUNAR_RADIUS,CesiumMath.LUNAR_RADIUS)),Ellipsoid.prototype.clone=function(e){return Ellipsoid.clone(this,e)},Ellipsoid.packedLength=Cartesian3.packedLength,Ellipsoid.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._radii,t,i),t},Ellipsoid.unpack=function(e,t,i){return t=defaultValue(t,0),t=Cartesian3.unpack(e,t),Ellipsoid.fromCartesian3(t,i)},Ellipsoid.prototype.geocentricSurfaceNormal=Cartesian3.normalize,Ellipsoid.prototype.geodeticSurfaceNormalCartographic=function(e,t){var i=e.longitude,r=e.latitude,n=Math.cos(r);e=n*Math.cos(i),i=n*Math.sin(i),r=Math.sin(r);return defined(t)||(t=new Cartesian3),t.x=e,t.y=i,t.z=r,Cartesian3.normalize(t,t)},Ellipsoid.prototype.geodeticSurfaceNormal=function(e,t){if(!Cartesian3.equalsEpsilon(e,Cartesian3.ZERO,CesiumMath.EPSILON14))return defined(t)||(t=new Cartesian3),t=Cartesian3.multiplyComponents(e,this._oneOverRadiiSquared,t),Cartesian3.normalize(t,t)};var cartographicToCartesianNormal=new Cartesian3,cartographicToCartesianK=new Cartesian3;Ellipsoid.prototype.cartographicToCartesian=function(e,t){var i=cartographicToCartesianNormal,r=cartographicToCartesianK;this.geodeticSurfaceNormalCartographic(e,i),Cartesian3.multiplyComponents(this._radiiSquared,i,r);var n=Math.sqrt(Cartesian3.dot(i,r));return Cartesian3.divideByScalar(r,n,r),Cartesian3.multiplyByScalar(i,e.height,i),defined(t)||(t=new Cartesian3),Cartesian3.add(r,i,t)},Ellipsoid.prototype.cartographicArrayToCartesianArray=function(e,t){var i=e.length;defined(t)?t.length=i:t=new Array(i);for(var r=0;r<i;r++)t[r]=this.cartographicToCartesian(e[r],t[r]);return t};var cartesianToCartographicN$1=new Cartesian3,cartesianToCartographicP$1=new Cartesian3,cartesianToCartographicH$1=new Cartesian3;Ellipsoid.prototype.cartesianToCartographic=function(e,t){if(defined(n=this.scaleToGeodeticSurface(e,cartesianToCartographicP$1))){var i=this.geodeticSurfaceNormal(n,cartesianToCartographicN$1),r=Cartesian3.subtract(e,n,cartesianToCartographicH$1),n=Math.atan2(i.y,i.x);i=Math.asin(i.z),r=CesiumMath.sign(Cartesian3.dot(r,e))*Cartesian3.magnitude(r);return defined(t)?(t.longitude=n,t.latitude=i,t.height=r,t):new Cartographic(n,i,r)}},Ellipsoid.prototype.cartesianArrayToCartographicArray=function(e,t){var i=e.length;defined(t)?t.length=i:t=new Array(i);for(var r=0;r<i;++r)t[r]=this.cartesianToCartographic(e[r],t[r]);return t},Ellipsoid.prototype.scaleToGeodeticSurface=function(e,t){return scaleToGeodeticSurface(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},Ellipsoid.prototype.scaleToGeocentricSurface=function(e,t){defined(t)||(t=new Cartesian3);var i=e.x,r=e.y,n=e.z,a=this._oneOverRadiiSquared;a=1/Math.sqrt(i*i*a.x+r*r*a.y+n*n*a.z);return Cartesian3.multiplyByScalar(e,a,t)},Ellipsoid.prototype.transformPositionToScaledSpace=function(e,t){return defined(t)||(t=new Cartesian3),Cartesian3.multiplyComponents(e,this._oneOverRadii,t)},Ellipsoid.prototype.transformPositionFromScaledSpace=function(e,t){return defined(t)||(t=new Cartesian3),Cartesian3.multiplyComponents(e,this._radii,t)},Ellipsoid.prototype.equals=function(e){return this===e||defined(e)&&Cartesian3.equals(this._radii,e._radii)},Ellipsoid.prototype.toString=function(){return this._radii.toString()},Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){t=defaultValue(t,0);var r=this._squaredXOverSquaredZ;if(defined(i)||(i=new Cartesian3),i.x=0,i.y=0,i.z=e.z*(1-r),!(Math.abs(i.z)>=this._radii.z-t))return i};var abscissas=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],weights=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function gaussLegendreQuadrature(e,t,i){for(var r=.5*(t+e),n=.5*(t-e),a=0,o=0;o<5;o++){var s=n*abscissas[o];a+=weights[o]*(i(r+s)+i(r-s))}return a*n}function GeographicProjection(e){this._ellipsoid=defaultValue(e,Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Ellipsoid.prototype.surfaceArea=function(e){for(var t=e.west,i=e.east,r=e.south,n=e.north;i<t;)i+=CesiumMath.TWO_PI;var a=(e=this._radiiSquared).x,o=e.y,s=e.z,l=a*o;return gaussLegendreQuadrature(r,n,(function(e){var r=Math.cos(e),n=Math.sin(e);return Math.cos(e)*gaussLegendreQuadrature(t,i,(function(e){var t=Math.cos(e);e=Math.sin(e);return Math.sqrt(l*n*n+s*(o*t*t+a*e*e)*r*r)}))}))},Object.defineProperties(GeographicProjection.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),GeographicProjection.prototype.project=function(e,t){var i=this._semimajorAxis,r=e.longitude*i;i=e.latitude*i,e=e.height;return defined(t)?(t.x=r,t.y=i,t.z=e,t):new Cartesian3(r,i,e)},GeographicProjection.prototype.unproject=function(e,t){var i=this._oneOverSemimajorAxis,r=e.x*i;i=e.y*i,e=e.z;return defined(t)?(t.longitude=r,t.latitude=i,t.height=e,t):new Cartographic(r,i,e)};var Intersect={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Intersect$1=Object.freeze(Intersect);function Interval(e,t){this.start=defaultValue(e,0),this.stop=defaultValue(t,0)}function Matrix3(e,t,i,r,n,a,o,s,l){this[0]=defaultValue(e,0),this[1]=defaultValue(r,0),this[2]=defaultValue(o,0),this[3]=defaultValue(t,0),this[4]=defaultValue(n,0),this[5]=defaultValue(s,0),this[6]=defaultValue(i,0),this[7]=defaultValue(a,0),this[8]=defaultValue(l,0)}Matrix3.packedLength=9,Matrix3.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t},Matrix3.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix3),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i},Matrix3.clone=function(e,t){if(defined(e))return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new Matrix3(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},Matrix3.fromArray=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix3),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],i[8]=e[t+8],i},Matrix3.fromColumnMajorArray=function(e,t){return Matrix3.clone(e,t)},Matrix3.fromRowMajorArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new Matrix3(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},Matrix3.fromQuaternion=function(e,t){var i=e.x*e.x,r=e.x*e.y,n=e.x*e.z,a=e.x*e.w,o=e.y*e.y,s=e.y*e.z,l=e.y*e.w,c=e.z*e.z,u=e.z*e.w,d=i-o-c+(f=e.w*e.w),h=2*(r-u),p=2*(n+l),f=(e=2*(r+u),r=o-i-c+f,u=2*(s-a),l=2*(n-l),a=2*(s+a),-i-o+c+f);return defined(t)?(t[0]=d,t[1]=e,t[2]=l,t[3]=h,t[4]=r,t[5]=a,t[6]=p,t[7]=u,t[8]=f,t):new Matrix3(d,h,p,e,r,u,l,a,f)},Matrix3.fromHeadingPitchRoll=function(e,t){var i=Math.cos(-e.pitch),r=Math.cos(-e.heading),n=Math.cos(e.roll),a=Math.sin(-e.pitch),o=i*r,s=-n*(u=Math.sin(-e.heading))+(d=Math.sin(e.roll))*a*r,l=d*u+n*a*r,c=i*u,u=(e=n*r+d*a*u,-d*r+n*a*u),d=(a=-a,d*i);i*=n;return defined(t)?(t[0]=o,t[1]=c,t[2]=a,t[3]=s,t[4]=e,t[5]=d,t[6]=l,t[7]=u,t[8]=i,t):new Matrix3(o,s,l,c,e,u,a,d,i)},Matrix3.fromScale=function(e,t){return defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new Matrix3(e.x,0,0,0,e.y,0,0,0,e.z)},Matrix3.fromUniformScale=function(e,t){return defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new Matrix3(e,0,0,0,e,0,0,0,e)},Matrix3.fromCrossProduct=function(e,t){return defined(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new Matrix3(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},Matrix3.fromRotationX=function(e,t){var i=Math.cos(e);e=Math.sin(e);return defined(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=i,t[5]=e,t[6]=0,t[7]=-e,t[8]=i,t):new Matrix3(1,0,0,0,i,-e,0,e,i)},Matrix3.fromRotationY=function(e,t){var i=Math.cos(e);e=Math.sin(e);return defined(t)?(t[0]=i,t[1]=0,t[2]=-e,t[3]=0,t[4]=1,t[5]=0,t[6]=e,t[7]=0,t[8]=i,t):new Matrix3(i,0,e,0,1,0,-e,0,i)},Matrix3.fromRotationZ=function(e,t){var i=Math.cos(e);e=Math.sin(e);return defined(t)?(t[0]=i,t[1]=e,t[2]=0,t[3]=-e,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Matrix3(i,-e,0,e,i,0,0,0,1)},Matrix3.toArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},Matrix3.getElementIndex=function(e,t){return 3*e+t},Matrix3.getColumn=function(e,t,i){var r=e[n=3*t],n=(t=e[1+n],e[2+n]);return i.x=r,i.y=t,i.z=n,i},Matrix3.setColumn=function(e,t,i,r){return t*=3,(r=Matrix3.clone(e,r))[t]=i.x,r[1+t]=i.y,r[2+t]=i.z,r},Matrix3.getRow=function(e,t,i){var r=e[t],n=e[t+3];t=e[t+6];return i.x=r,i.y=n,i.z=t,i},Matrix3.setRow=function(e,t,i,r){return(r=Matrix3.clone(e,r))[t]=i.x,r[t+3]=i.y,r[t+6]=i.z,r};var scratchColumn=new Cartesian3;Matrix3.getScale=function(e,t){return t.x=Cartesian3.magnitude(Cartesian3.fromElements(e[0],e[1],e[2],scratchColumn)),t.y=Cartesian3.magnitude(Cartesian3.fromElements(e[3],e[4],e[5],scratchColumn)),t.z=Cartesian3.magnitude(Cartesian3.fromElements(e[6],e[7],e[8],scratchColumn)),t};var scratchScale=new Cartesian3;Matrix3.getMaximumScale=function(e){return Matrix3.getScale(e,scratchScale),Cartesian3.maximumComponent(scratchScale)},Matrix3.multiply=function(e,t,i){var r=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],n=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],a=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],o=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],c=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],u=e[1]*t[6]+e[4]*t[7]+e[7]*t[8];t=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return i[0]=r,i[1]=n,i[2]=a,i[3]=o,i[4]=s,i[5]=l,i[6]=c,i[7]=u,i[8]=t,i},Matrix3.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i},Matrix3.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i},Matrix3.multiplyByVector=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=e[0]*r+e[3]*n+e[6]*a;t=e[1]*r+e[4]*n+e[7]*a,a=e[2]*r+e[5]*n+e[8]*a;return i.x=o,i.y=t,i.z=a,i},Matrix3.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i},Matrix3.multiplyByScale=function(e,t,i){return i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.x,i[3]=e[3]*t.y,i[4]=e[4]*t.y,i[5]=e[5]*t.y,i[6]=e[6]*t.z,i[7]=e[7]*t.z,i[8]=e[8]*t.z,i},Matrix3.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},Matrix3.transpose=function(e,t){var i=e[0],r=e[3],n=e[6],a=e[1],o=e[4],s=e[7],l=e[2],c=e[5];e=e[8];return t[0]=i,t[1]=r,t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=l,t[7]=c,t[8]=e,t};var UNIT=new Cartesian3(1,1,1);function computeFrobeniusNorm(e){for(var t=0,i=0;i<9;++i){var r=e[i];t+=r*r}return Math.sqrt(t)}Matrix3.getRotation=function(e,t){var i=Cartesian3.divideComponents(UNIT,Matrix3.getScale(e,scratchScale),scratchScale);return Matrix3.multiplyByScale(e,i,t)};var rowVal=[1,0,0],colVal=[2,2,1];function offDiagonalFrobeniusNorm(e){for(var t=0,i=0;i<3;++i){var r=e[Matrix3.getElementIndex(colVal[i],rowVal[i])];t+=2*r*r}return Math.sqrt(t)}function shurDecomposition(e,t){for(var i=CesiumMath.EPSILON15,r=0,n=1,a=0;a<3;++a){var o=Math.abs(e[Matrix3.getElementIndex(colVal[a],rowVal[a])]);r<o&&(n=a,r=o)}var s=1,l=0,c=rowVal[n],u=colVal[n];return Math.abs(e[Matrix3.getElementIndex(u,c)])>i&&(l=(i=(i=(e[Matrix3.getElementIndex(u,u)]-e[Matrix3.getElementIndex(c,c)])/2/e[Matrix3.getElementIndex(u,c)])<0?-1/(-i+Math.sqrt(1+i*i)):1/(i+Math.sqrt(1+i*i)))*(s=1/Math.sqrt(1+i*i))),(t=Matrix3.clone(Matrix3.IDENTITY,t))[Matrix3.getElementIndex(c,c)]=t[Matrix3.getElementIndex(u,u)]=s,t[Matrix3.getElementIndex(u,c)]=l,t[Matrix3.getElementIndex(c,u)]=-l,t}var jMatrix=new Matrix3,jMatrixTranspose=new Matrix3;Matrix3.computeEigenDecomposition=function(e,t){var i=CesiumMath.EPSILON20,r=0,n=0;defined(t)||(t={});for(var a=t.unitary=Matrix3.clone(Matrix3.IDENTITY,t.unitary),o=t.diagonal=Matrix3.clone(e,t.diagonal),s=i*computeFrobeniusNorm(o);n<10&&offDiagonalFrobeniusNorm(o)>s;)shurDecomposition(o,jMatrix),Matrix3.transpose(jMatrix,jMatrixTranspose),Matrix3.multiply(o,jMatrix,o),Matrix3.multiply(jMatrixTranspose,o,o),Matrix3.multiply(a,jMatrix,a),2<++r&&(++n,r=0);return t},Matrix3.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},Matrix3.determinant=function(e){var t=e[0],i=e[3],r=e[6],n=e[1],a=e[4],o=e[7],s=e[2],l=e[5];return t*(a*(e=e[8])-l*o)+n*(l*r-i*e)+s*(i*o-a*r)},Matrix3.inverse=function(e,t){var i=e[0],r=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8];e=Matrix3.determinant(e);return t[0]=o*u-c*s,t[1]=c*n-r*u,t[2]=r*s-o*n,t[3]=l*s-a*u,t[4]=i*u-l*n,t[5]=a*n-i*s,t[6]=a*c-l*o,t[7]=l*r-i*c,t[8]=i*o-a*r,e=1/e,Matrix3.multiplyByScalar(t,e,t)};var scratchTransposeMatrix=new Matrix3;function Cartesian4(e,t,i,r){this.x=defaultValue(e,0),this.y=defaultValue(t,0),this.z=defaultValue(i,0),this.w=defaultValue(r,0)}Matrix3.inverseTranspose=function(e,t){return Matrix3.inverse(Matrix3.transpose(e,scratchTransposeMatrix),t)},Matrix3.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},Matrix3.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i},Matrix3.IDENTITY=Object.freeze(new Matrix3(1,0,0,0,1,0,0,0,1)),Matrix3.ZERO=Object.freeze(new Matrix3(0,0,0,0,0,0,0,0,0)),Matrix3.COLUMN0ROW0=0,Matrix3.COLUMN0ROW1=1,Matrix3.COLUMN0ROW2=2,Matrix3.COLUMN1ROW0=3,Matrix3.COLUMN1ROW1=4,Matrix3.COLUMN1ROW2=5,Matrix3.COLUMN2ROW0=6,Matrix3.COLUMN2ROW1=7,Matrix3.COLUMN2ROW2=8,Object.defineProperties(Matrix3.prototype,{length:{get:function(){return Matrix3.packedLength}}}),Matrix3.prototype.clone=function(e){return Matrix3.clone(this,e)},Matrix3.prototype.equals=function(e){return Matrix3.equals(this,e)},Matrix3.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},Matrix3.prototype.equalsEpsilon=function(e,t){return Matrix3.equalsEpsilon(this,e,t)},Matrix3.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},Cartesian4.fromElements=function(e,t,i,r,n){return defined(n)?(n.x=e,n.y=t,n.z=i,n.w=r,n):new Cartesian4(e,t,i,r)},Cartesian4.fromColor=function(e,t){return defined(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Cartesian4(e.red,e.green,e.blue,e.alpha)},Cartesian4.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Cartesian4(e.x,e.y,e.z,e.w)},Cartesian4.packedLength=4,Cartesian4.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Cartesian4.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Cartesian4),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},Cartesian4.packArray=function(e,t){var i=e.length,r=4*i;if(defined(t)){if(!Array.isArray(t)&&t.length!==r)throw new DeveloperError("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(var n=0;n<i;++n)Cartesian4.pack(e[n],t,4*n);return t},Cartesian4.unpackArray=function(e,t){var i=e.length;defined(t)?t.length=i/4:t=new Array(i/4);for(var r=0;r<i;r+=4){var n=r/4;t[n]=Cartesian4.unpack(e,r,t[n])}return t},Cartesian4.fromArray=Cartesian4.unpack,Cartesian4.maximumComponent=function(e){return Math.max(e.x,e.y,e.z,e.w)},Cartesian4.minimumComponent=function(e){return Math.min(e.x,e.y,e.z,e.w)},Cartesian4.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},Cartesian4.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},Cartesian4.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Cartesian4.magnitude=function(e){return Math.sqrt(Cartesian4.magnitudeSquared(e))};var distanceScratch$1=new Cartesian4;Cartesian4.distance=function(e,t){return Cartesian4.subtract(e,t,distanceScratch$1),Cartesian4.magnitude(distanceScratch$1)},Cartesian4.distanceSquared=function(e,t){return Cartesian4.subtract(e,t,distanceScratch$1),Cartesian4.magnitudeSquared(distanceScratch$1)},Cartesian4.normalize=function(e,t){var i=Cartesian4.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,t},Cartesian4.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Cartesian4.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},Cartesian4.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},Cartesian4.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},Cartesian4.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},Cartesian4.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},Cartesian4.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},Cartesian4.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Cartesian4.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var lerpScratch$1=new Cartesian4;Cartesian4.lerp=function(e,t,i,r){return Cartesian4.multiplyByScalar(t,i,lerpScratch$1),r=Cartesian4.multiplyByScalar(e,1-i,r),Cartesian4.add(lerpScratch$1,r,r)};var mostOrthogonalAxisScratch$1=new Cartesian4;Cartesian4.mostOrthogonalAxis=function(e,t){return e=Cartesian4.normalize(e,mostOrthogonalAxisScratch$1),Cartesian4.abs(e,e),e.x<=e.y?e.x<=e.z?e.x<=e.w?Cartesian4.clone(Cartesian4.UNIT_X,t):Cartesian4.clone(Cartesian4.UNIT_W,t):e.z<=e.w?Cartesian4.clone(Cartesian4.UNIT_Z,t):Cartesian4.clone(Cartesian4.UNIT_W,t):e.y<=e.z?e.y<=e.w?Cartesian4.clone(Cartesian4.UNIT_Y,t):Cartesian4.clone(Cartesian4.UNIT_W,t):e.z<=e.w?Cartesian4.clone(Cartesian4.UNIT_Z,t):Cartesian4.clone(Cartesian4.UNIT_W,t)},Cartesian4.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Cartesian4.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},Cartesian4.equalsEpsilon=function(e,t,i,r){return e===t||defined(e)&&defined(t)&&CesiumMath.equalsEpsilon(e.x,t.x,i,r)&&CesiumMath.equalsEpsilon(e.y,t.y,i,r)&&CesiumMath.equalsEpsilon(e.z,t.z,i,r)&&CesiumMath.equalsEpsilon(e.w,t.w,i,r)},Cartesian4.ZERO=Object.freeze(new Cartesian4(0,0,0,0)),Cartesian4.UNIT_X=Object.freeze(new Cartesian4(1,0,0,0)),Cartesian4.UNIT_Y=Object.freeze(new Cartesian4(0,1,0,0)),Cartesian4.UNIT_Z=Object.freeze(new Cartesian4(0,0,1,0)),Cartesian4.UNIT_W=Object.freeze(new Cartesian4(0,0,0,1)),Cartesian4.prototype.clone=function(e){return Cartesian4.clone(this,e)},Cartesian4.prototype.equals=function(e){return Cartesian4.equals(this,e)},Cartesian4.prototype.equalsEpsilon=function(e,t,i){return Cartesian4.equalsEpsilon(this,e,t,i)},Cartesian4.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var scratchFloatArray=new Float32Array(1),SHIFT_LEFT_8=256,SHIFT_LEFT_16=65536,SHIFT_LEFT_24=16777216,SHIFT_RIGHT_8=1/SHIFT_LEFT_8,SHIFT_RIGHT_16=1/SHIFT_LEFT_16,SHIFT_RIGHT_24=1/SHIFT_LEFT_24,BIAS=38;function RuntimeError(e){var t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}function Matrix4(e,t,i,r,n,a,o,s,l,c,u,d,h,p,f,m){this[0]=defaultValue(e,0),this[1]=defaultValue(n,0),this[2]=defaultValue(l,0),this[3]=defaultValue(h,0),this[4]=defaultValue(t,0),this[5]=defaultValue(a,0),this[6]=defaultValue(c,0),this[7]=defaultValue(p,0),this[8]=defaultValue(i,0),this[9]=defaultValue(o,0),this[10]=defaultValue(u,0),this[11]=defaultValue(f,0),this[12]=defaultValue(r,0),this[13]=defaultValue(s,0),this[14]=defaultValue(d,0),this[15]=defaultValue(m,0)}Cartesian4.packFloat=function(e,t){if(defined(t)||(t=new Cartesian4),scratchFloatArray[0]=e,0===(e=scratchFloatArray[0]))return Cartesian4.clone(Cartesian4.ZERO,t);var i,r=e<0?1:0;return isFinite(e)?(e=Math.abs(e),i=Math.floor(CesiumMath.logBase(e,10))+1,e/=Math.pow(10,i)):(e=.1,i=BIAS),e*=SHIFT_LEFT_8,t.x=Math.floor(e),e=(e-t.x)*SHIFT_LEFT_8,t.y=Math.floor(e),e=(e-t.y)*SHIFT_LEFT_8,t.z=Math.floor(e),t.w=2*(i+BIAS)+r,t},Cartesian4.unpackFloat=function(e){var t=e.w/2,i=Math.floor(t),r=-(r=2*(r=2*(t-i))-1);return BIAS<=(i-=BIAS)?r<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY:(t=r*e.x*SHIFT_RIGHT_8,t+=r*e.y*SHIFT_RIGHT_16,(t+=r*e.z*SHIFT_RIGHT_24)*Math.pow(10,i))},defined(Object.create)&&(RuntimeError.prototype=Object.create(Error.prototype),RuntimeError.prototype.constructor=RuntimeError),RuntimeError.prototype.toString=function(){var e=this.name+": "+this.message;return defined(this.stack)&&(e+="\n"+this.stack.toString()),e},Matrix4.packedLength=16,Matrix4.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t[i++]=e[9],t[i++]=e[10],t[i++]=e[11],t[i++]=e[12],t[i++]=e[13],t[i++]=e[14],t[i]=e[15],t},Matrix4.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix4),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i[9]=e[t++],i[10]=e[t++],i[11]=e[t++],i[12]=e[t++],i[13]=e[t++],i[14]=e[t++],i[15]=e[t],i},Matrix4.clone=function(e,t){if(defined(e))return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new Matrix4(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},Matrix4.fromArray=Matrix4.unpack,Matrix4.fromColumnMajorArray=function(e,t){return Matrix4.clone(e,t)},Matrix4.fromRowMajorArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new Matrix4(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},Matrix4.fromRotationTranslation=function(e,t,i){return t=defaultValue(t,Cartesian3.ZERO),defined(i)?(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=0,i[4]=e[3],i[5]=e[4],i[6]=e[5],i[7]=0,i[8]=e[6],i[9]=e[7],i[10]=e[8],i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i):new Matrix4(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},Matrix4.fromTranslationQuaternionRotationScale=function(e,t,i,r){defined(r)||(r=new Matrix4);var n=i.x,a=i.y,o=i.z,s=t.x*t.x,l=t.x*t.y,c=t.x*t.z,u=t.x*t.w,d=t.y*t.y,h=t.y*t.z,p=t.y*t.w,f=t.z*t.z,m=t.z*t.w,g=s-d-f+(_=t.w*t.w),y=2*(l-m),_=(i=2*(c+p),t=2*(l+m),l=d-s-f+_,m=2*(h-u),p=2*(c-p),u=2*(h+u),-s-d+f+_);return r[0]=g*n,r[1]=t*n,r[2]=p*n,r[3]=0,r[4]=y*a,r[5]=l*a,r[6]=u*a,r[7]=0,r[8]=i*o,r[9]=m*o,r[10]=_*o,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,r},Matrix4.fromTranslationRotationScale=function(e,t){return Matrix4.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},Matrix4.fromTranslation=function(e,t){return Matrix4.fromRotationTranslation(Matrix3.IDENTITY,e,t)},Matrix4.fromScale=function(e,t){return defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new Matrix4(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},Matrix4.fromUniformScale=function(e,t){return defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new Matrix4(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var fromCameraF=new Cartesian3,fromCameraR=new Cartesian3,fromCameraU=new Cartesian3;Matrix4.fromCamera=function(e,t){var i=e.position,r=e.direction,n=e.up;Cartesian3.normalize(r,fromCameraF),Cartesian3.normalize(Cartesian3.cross(fromCameraF,n,fromCameraR),fromCameraR),Cartesian3.normalize(Cartesian3.cross(fromCameraR,fromCameraF,fromCameraU),fromCameraU);var a=fromCameraR.x,o=fromCameraR.y,s=fromCameraR.z,l=fromCameraF.x,c=fromCameraF.y,u=fromCameraF.z,d=fromCameraU.x,h=fromCameraU.y,p=fromCameraU.z,f=i.x;n=a*-f+o*-(e=i.y)+s*-(r=i.z),i=d*-f+h*-e+p*-r,r=l*f+c*e+u*r;return defined(t)?(t[0]=a,t[1]=d,t[2]=-l,t[3]=0,t[4]=o,t[5]=h,t[6]=-c,t[7]=0,t[8]=s,t[9]=p,t[10]=-u,t[11]=0,t[12]=n,t[13]=i,t[14]=r,t[15]=1,t):new Matrix4(a,o,s,n,d,h,p,i,-l,-c,-u,r,0,0,0,1)},Matrix4.computePerspectiveFieldOfView=function(e,t,i,r,n){var a=1/Math.tan(.5*e);e=a/t,t=(r+i)/(i-r),r=2*r*i/(i-r);return n[0]=e,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=a,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t,n[11]=-1,n[12]=0,n[13]=0,n[14]=r,n[15]=0,n},Matrix4.computeOrthographicOffCenter=function(e,t,i,r,n,a,o){var s=1/(t-e),l=1/(r-i),c=1/(a-n);e=-(t+e)*s,i=-(r+i)*l,n=-(a+n)*c;return s*=2,l*=2,c*=-2,o[0]=s,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=l,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=c,o[11]=0,o[12]=e,o[13]=i,o[14]=n,o[15]=1,o},Matrix4.computePerspectiveOffCenter=function(e,t,i,r,n,a,o){var s=2*n/(t-e),l=2*n/(r-i);e=(t+e)/(t-e),r=(r+i)/(r-i),i=-(a+n)/(a-n),n=-2*a*n/(a-n);return o[0]=s,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=l,o[6]=0,o[7]=0,o[8]=e,o[9]=r,o[10]=i,o[11]=-1,o[12]=0,o[13]=0,o[14]=n,o[15]=0,o},Matrix4.computeInfinitePerspectiveOffCenter=function(e,t,i,r,n,a){var o=2*n/(t-e),s=2*n/(r-i);e=(t+e)/(t-e),i=(r+i)/(r-i),n*=-2;return a[0]=o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=s,a[6]=0,a[7]=0,a[8]=e,a[9]=i,a[10]=-1,a[11]=-1,a[12]=0,a[13]=0,a[14]=n,a[15]=0,a},Matrix4.computeViewportTransformation=function(e,t,i,r){defined(r)||(r=new Matrix4),e=defaultValue(e,defaultValue.EMPTY_OBJECT);var n=defaultValue(e.x,0),a=defaultValue(e.y,0),o=defaultValue(e.width,0),s=defaultValue(e.height,0);t=defaultValue(t,0);var l=.5*o;s=e=.5*s,i=o=.5*((i=defaultValue(i,1))-t),n+=l,e=a+e,o=t+o;return r[0]=l,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=i,r[11]=0,r[12]=n,r[13]=e,r[14]=o,r[15]=1,r},Matrix4.computeView=function(e,t,i,r,n){return n[0]=r.x,n[1]=i.x,n[2]=-t.x,n[3]=0,n[4]=r.y,n[5]=i.y,n[6]=-t.y,n[7]=0,n[8]=r.z,n[9]=i.z,n[10]=-t.z,n[11]=0,n[12]=-Cartesian3.dot(r,e),n[13]=-Cartesian3.dot(i,e),n[14]=Cartesian3.dot(t,e),n[15]=1,n},Matrix4.toArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},Matrix4.getElementIndex=function(e,t){return 4*e+t},Matrix4.getColumn=function(e,t,i){var r=e[a=4*t],n=e[1+a],a=(t=e[2+a],e[3+a]);return i.x=r,i.y=n,i.z=t,i.w=a,i},Matrix4.setColumn=function(e,t,i,r){return t*=4,(r=Matrix4.clone(e,r))[t]=i.x,r[1+t]=i.y,r[2+t]=i.z,r[3+t]=i.w,r},Matrix4.setTranslation=function(e,t,i){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i};var scaleScratch=new Cartesian3;Matrix4.setScale=function(e,t,i){var r=Matrix4.getScale(e,scaleScratch);r=Cartesian3.divideComponents(t,r,scaleScratch);return Matrix4.multiplyByScale(e,r,i)},Matrix4.getRow=function(e,t,i){var r=e[t],n=e[t+4],a=e[t+8];t=e[t+12];return i.x=r,i.y=n,i.z=a,i.w=t,i},Matrix4.setRow=function(e,t,i,r){return(r=Matrix4.clone(e,r))[t]=i.x,r[t+4]=i.y,r[t+8]=i.z,r[t+12]=i.w,r};var scratchColumn$1=new Cartesian3;Matrix4.getScale=function(e,t){return t.x=Cartesian3.magnitude(Cartesian3.fromElements(e[0],e[1],e[2],scratchColumn$1)),t.y=Cartesian3.magnitude(Cartesian3.fromElements(e[4],e[5],e[6],scratchColumn$1)),t.z=Cartesian3.magnitude(Cartesian3.fromElements(e[8],e[9],e[10],scratchColumn$1)),t};var scratchScale$1=new Cartesian3;Matrix4.getMaximumScale=function(e){return Matrix4.getScale(e,scratchScale$1),Cartesian3.maximumComponent(scratchScale$1)},Matrix4.multiply=function(e,t,i){var r=e[0],n=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=e[9],p=e[10],f=e[11],m=e[12],g=e[13],y=e[14],_=e[15],v=t[0],C=t[1],x=t[2],b=t[3],S=t[4],T=t[5],E=t[6],w=t[7],A=t[8],P=t[9],D=t[10],M=t[11],I=t[12],R=t[13],O=t[14],L=t[15],N=r*v+s*C+d*x+m*b;e=n*v+l*C+h*x+g*b,t=a*v+c*C+p*x+y*b,v=o*v+u*C+f*x+_*b,C=r*S+s*T+d*E+m*w,x=n*S+l*T+h*E+g*w,b=a*S+c*T+p*E+y*w,S=o*S+u*T+f*E+_*w,T=r*A+s*P+d*D+m*M,E=n*A+l*P+h*D+g*M,w=a*A+c*P+p*D+y*M,M=o*A+u*P+f*D+_*M,m=r*I+s*R+d*O+m*L,g=n*I+l*R+h*O+g*L,y=a*I+c*R+p*O+y*L,L=o*I+u*R+f*O+_*L;return i[0]=N,i[1]=e,i[2]=t,i[3]=v,i[4]=C,i[5]=x,i[6]=b,i[7]=S,i[8]=T,i[9]=E,i[10]=w,i[11]=M,i[12]=m,i[13]=g,i[14]=y,i[15]=L,i},Matrix4.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},Matrix4.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},Matrix4.multiplyTransformation=function(e,t,i){var r=e[0],n=e[1],a=e[2],o=e[4],s=e[5],l=e[6],c=e[8],u=e[9],d=e[10],h=e[12],p=e[13],f=e[14],m=t[0],g=t[1],y=t[2],_=t[4],v=t[5],C=t[6],x=t[8],b=t[9],S=t[10],T=t[12],E=t[13],w=t[14];e=r*m+o*g+c*y,t=n*m+s*g+u*y,m=a*m+l*g+d*y,g=r*_+o*v+c*C,y=n*_+s*v+u*C,_=a*_+l*v+d*C,v=r*x+o*b+c*S,C=n*x+s*b+u*S,S=a*x+l*b+d*S,h=r*T+o*E+c*w+h,p=n*T+s*E+u*w+p,f=a*T+l*E+d*w+f;return i[0]=e,i[1]=t,i[2]=m,i[3]=0,i[4]=g,i[5]=y,i[6]=_,i[7]=0,i[8]=v,i[9]=C,i[10]=S,i[11]=0,i[12]=h,i[13]=p,i[14]=f,i[15]=1,i},Matrix4.multiplyByMatrix3=function(e,t,i){var r=e[0],n=e[1],a=e[2],o=e[4],s=e[5],l=e[6],c=e[8],u=e[9],d=e[10],h=t[0],p=t[1],f=t[2],m=t[3],g=t[4],y=t[5],_=t[6],v=t[7],C=t[8],x=r*h+o*p+c*f;t=n*h+s*p+u*f,h=a*h+l*p+d*f,p=r*m+o*g+c*y,f=n*m+s*g+u*y,y=a*m+l*g+d*y,c=r*_+o*v+c*C,u=n*_+s*v+u*C,C=a*_+l*v+d*C;return i[0]=x,i[1]=t,i[2]=h,i[3]=0,i[4]=p,i[5]=f,i[6]=y,i[7]=0,i[8]=c,i[9]=u,i[10]=C,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},Matrix4.multiplyByTranslation=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=r*e[0]+n*e[4]+a*e[8]+e[12];t=r*e[1]+n*e[5]+a*e[9]+e[13],a=r*e[2]+n*e[6]+a*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=o,i[13]=t,i[14]=a,i[15]=e[15],i};var uniformScaleScratch=new Cartesian3;Matrix4.multiplyByUniformScale=function(e,t,i){return uniformScaleScratch.x=t,uniformScaleScratch.y=t,uniformScaleScratch.z=t,Matrix4.multiplyByScale(e,uniformScaleScratch,i)},Matrix4.multiplyByScale=function(e,t,i){var r=t.x,n=t.y;t=t.z;return 1===r&&1===n&&1===t?Matrix4.clone(e,i):(i[0]=r*e[0],i[1]=r*e[1],i[2]=r*e[2],i[3]=0,i[4]=n*e[4],i[5]=n*e[5],i[6]=n*e[6],i[7]=0,i[8]=t*e[8],i[9]=t*e[9],i[10]=t*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},Matrix4.multiplyByVector=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=t.w,s=e[0]*r+e[4]*n+e[8]*a+e[12]*o,l=e[1]*r+e[5]*n+e[9]*a+e[13]*o;t=e[2]*r+e[6]*n+e[10]*a+e[14]*o,o=e[3]*r+e[7]*n+e[11]*a+e[15]*o;return i.x=s,i.y=l,i.z=t,i.w=o,i},Matrix4.multiplyByPointAsVector=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=e[0]*r+e[4]*n+e[8]*a;t=e[1]*r+e[5]*n+e[9]*a,a=e[2]*r+e[6]*n+e[10]*a;return i.x=o,i.y=t,i.z=a,i},Matrix4.multiplyByPoint=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=e[0]*r+e[4]*n+e[8]*a+e[12];t=e[1]*r+e[5]*n+e[9]*a+e[13],e=e[2]*r+e[6]*n+e[10]*a+e[14];return i.x=o,i.y=t,i.z=e,i},Matrix4.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},Matrix4.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},Matrix4.transpose=function(e,t){var i=e[1],r=e[2],n=e[3],a=e[6],o=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[10]=e[10],t[11]=e[14],t[12]=n,t[13]=o,t[14]=s,t[15]=e[15],t},Matrix4.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},Matrix4.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},Matrix4.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},Matrix4.getTranslation=function(e,t){return t.x=e[12],t.y=e[13],t.z=e[14],t},Matrix4.getMatrix3=function(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var scratchInverseRotation=new Matrix3,scratchMatrix3Zero=new Matrix3,scratchBottomRow=new Cartesian4,scratchExpectedBottomRow=new Cartesian4(0,0,0,1);Matrix4.inverse=function(e,t){var i=e[0],r=e[4],n=e[8],a=e[12],o=e[1],s=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],p=e[14],f=e[3],m=e[7],g=e[11],y=h*(F=e[15]),_=d*F,v=p*m,C=d*g,x=h*m,b=u*F,S=u*g,T=h*f,E=u*m,w=d*f,A=y*s+v*l+C*c-((B=p*g)*s+_*l+x*c),P=B*o+b*l+T*c-(y*o+(V=p*f)*l+S*c),D=_*o+V*s+E*c-(v*o+b*s+w*c),M=x*o+S*s+w*l-(C*o+T*s+E*l),I=B*r+_*n+x*a-(y*r+v*n+C*a),R=y*i+V*n+S*a-(B*i+b*n+T*a),O=v*i+b*r+w*a-(_*i+V*r+E*a),L=C*i+T*r+E*n-(x*i+S*r+w*n),N=(y=n*c)*m+(v=a*s)*g+(C=r*l)*F-((B=a*l)*m+(_=r*c)*g+(x=n*s)*F),F=(l=B*f+(b=i*c)*g+(T=n*o)*F-(y*f+(V=a*o)*g+(S=i*l)*F),_*f+V*m+(E=i*s)*F-(v*f+b*m+(w=r*o)*F)),B=(m=x*f+S*m+w*g-(C*f+T*m+E*g),g=_*h+x*p+B*d-(C*p+y*d+v*h),S*p+y*u+V*h-(b*h+T*p+B*u)),V=b*d+w*p+v*u-(E*p+_*u+V*d);u=E*h+C*u+T*d-(S*d+w*h+x*u),a=i*A+r*P+n*D+a*M;if(Math.abs(a)<CesiumMath.EPSILON21){if(Matrix3.equalsEpsilon(Matrix4.getMatrix3(e,scratchInverseRotation),scratchMatrix3Zero,CesiumMath.EPSILON7)&&Cartesian4.equals(Matrix4.getRow(e,3,scratchBottomRow),scratchExpectedBottomRow))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new RuntimeError("matrix is not invertible because its determinate is zero.")}return a=1/a,t[0]=A*a,t[1]=P*a,t[2]=D*a,t[3]=M*a,t[4]=I*a,t[5]=R*a,t[6]=O*a,t[7]=L*a,t[8]=N*a,t[9]=l*a,t[10]=F*a,t[11]=m*a,t[12]=g*a,t[13]=B*a,t[14]=V*a,t[15]=u*a,t},Matrix4.inverseTransformation=function(e,t){var i=e[0],r=e[1],n=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],u=e[10],d=e[12],h=e[13],p=-i*d-r*h-n*(f=e[14]),f=(e=-a*d-o*h-s*f,-l*d-c*h-u*f);return t[0]=i,t[1]=a,t[2]=l,t[3]=0,t[4]=r,t[5]=o,t[6]=c,t[7]=0,t[8]=n,t[9]=s,t[10]=u,t[11]=0,t[12]=p,t[13]=e,t[14]=f,t[15]=1,t};var scratchTransposeMatrix$1=new Matrix4;function Rectangle(e,t,i,r){this.west=defaultValue(e,0),this.south=defaultValue(t,0),this.east=defaultValue(i,0),this.north=defaultValue(r,0)}Matrix4.inverseTranspose=function(e,t){return Matrix4.inverse(Matrix4.transpose(e,scratchTransposeMatrix$1),t)},Matrix4.IDENTITY=Object.freeze(new Matrix4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),Matrix4.ZERO=Object.freeze(new Matrix4(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),Matrix4.COLUMN0ROW0=0,Matrix4.COLUMN0ROW1=1,Matrix4.COLUMN0ROW2=2,Matrix4.COLUMN0ROW3=3,Matrix4.COLUMN1ROW0=4,Matrix4.COLUMN1ROW1=5,Matrix4.COLUMN1ROW2=6,Matrix4.COLUMN1ROW3=7,Matrix4.COLUMN2ROW0=8,Matrix4.COLUMN2ROW1=9,Matrix4.COLUMN2ROW2=10,Matrix4.COLUMN2ROW3=11,Matrix4.COLUMN3ROW0=12,Matrix4.COLUMN3ROW1=13,Matrix4.COLUMN3ROW2=14,Matrix4.COLUMN3ROW3=15,Object.defineProperties(Matrix4.prototype,{length:{get:function(){return Matrix4.packedLength}}}),Matrix4.prototype.clone=function(e){return Matrix4.clone(this,e)},Matrix4.prototype.equals=function(e){return Matrix4.equals(this,e)},Matrix4.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]&&e[9]===t[i+9]&&e[10]===t[i+10]&&e[11]===t[i+11]&&e[12]===t[i+12]&&e[13]===t[i+13]&&e[14]===t[i+14]&&e[15]===t[i+15]},Matrix4.prototype.equalsEpsilon=function(e,t){return Matrix4.equalsEpsilon(this,e,t)},Matrix4.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},Object.defineProperties(Rectangle.prototype,{width:{get:function(){return Rectangle.computeWidth(this)}},height:{get:function(){return Rectangle.computeHeight(this)}}}),Rectangle.packedLength=4,Rectangle.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},Rectangle.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Rectangle),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},Rectangle.computeWidth=function(e){var t=e.east;return t<(e=e.west)&&(t+=CesiumMath.TWO_PI),t-e},Rectangle.computeHeight=function(e){return e.north-e.south},Rectangle.fromDegrees=function(e,t,i,r,n){return e=CesiumMath.toRadians(defaultValue(e,0)),t=CesiumMath.toRadians(defaultValue(t,0)),i=CesiumMath.toRadians(defaultValue(i,0)),r=CesiumMath.toRadians(defaultValue(r,0)),defined(n)?(n.west=e,n.south=t,n.east=i,n.north=r,n):new Rectangle(e,t,i,r)},Rectangle.fromRadians=function(e,t,i,r,n){return defined(n)?(n.west=defaultValue(e,0),n.south=defaultValue(t,0),n.east=defaultValue(i,0),n.north=defaultValue(r,0),n):new Rectangle(e,t,i,r)},Rectangle.fromCartographicArray=function(e,t){for(var i=Number.MAX_VALUE,r=-Number.MAX_VALUE,n=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0,c=e.length;l<c;l++){var u=e[l];i=Math.min(i,u.longitude),r=Math.max(r,u.longitude),o=Math.min(o,u.latitude),s=Math.max(s,u.latitude),u=0<=u.longitude?u.longitude:u.longitude+CesiumMath.TWO_PI,n=Math.min(n,u),a=Math.max(a,u)}return a-n<r-i&&(i=n,(r=a)>CesiumMath.PI&&(r-=CesiumMath.TWO_PI),i>CesiumMath.PI&&(i-=CesiumMath.TWO_PI)),defined(t)?(t.west=i,t.south=o,t.east=r,t.north=s,t):new Rectangle(i,o,r,s)},Rectangle.fromCartesianArray=function(e,t,i){t=defaultValue(t,Ellipsoid.WGS84);for(var r=Number.MAX_VALUE,n=-Number.MAX_VALUE,a=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,c=0,u=e.length;c<u;c++){var d=t.cartesianToCartographic(e[c]);r=Math.min(r,d.longitude),n=Math.max(n,d.longitude),s=Math.min(s,d.latitude),l=Math.max(l,d.latitude),d=0<=d.longitude?d.longitude:d.longitude+CesiumMath.TWO_PI,a=Math.min(a,d),o=Math.max(o,d)}return o-a<n-r&&(r=a,(n=o)>CesiumMath.PI&&(n-=CesiumMath.TWO_PI),r>CesiumMath.PI&&(r-=CesiumMath.TWO_PI)),defined(i)?(i.west=r,i.south=s,i.east=n,i.north=l,i):new Rectangle(r,s,n,l)},Rectangle.clone=function(e,t){if(defined(e))return defined(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Rectangle(e.west,e.south,e.east,e.north)},Rectangle.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},Rectangle.prototype.clone=function(e){return Rectangle.clone(this,e)},Rectangle.prototype.equals=function(e){return Rectangle.equals(this,e)},Rectangle.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},Rectangle.prototype.equalsEpsilon=function(e,t){return Rectangle.equalsEpsilon(this,e,t)},Rectangle.validate=function(e){},Rectangle.southwest=function(e,t){return defined(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Cartographic(e.west,e.south)},Rectangle.northwest=function(e,t){return defined(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Cartographic(e.west,e.north)},Rectangle.northeast=function(e,t){return defined(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Cartographic(e.east,e.north)},Rectangle.southeast=function(e,t){return defined(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Cartographic(e.east,e.south)},Rectangle.center=function(e,t){var i=e.east,r=e.west;return i<r&&(i+=CesiumMath.TWO_PI),i=CesiumMath.negativePiToPi(.5*(r+i)),e=.5*(e.south+e.north),defined(t)?(t.longitude=i,t.latitude=e,t.height=0,t):new Cartographic(i,e)},Rectangle.intersection=function(e,t,i){var r=e.east,n=e.west,a=t.east,o=t.west;if(r<n&&0<a?r+=CesiumMath.TWO_PI:a<o&&0<r&&(a+=CesiumMath.TWO_PI),r<n&&o<0?o+=CesiumMath.TWO_PI:a<o&&n<0&&(n+=CesiumMath.TWO_PI),o=CesiumMath.negativePiToPi(Math.max(n,o)),r=CesiumMath.negativePiToPi(Math.min(r,a)),!((e.west<e.east||t.west<t.east)&&r<=o||(a=Math.max(e.south,t.south),(t=Math.min(e.north,t.north))<=a)))return defined(i)?(i.west=o,i.south=a,i.east=r,i.north=t,i):new Rectangle(o,a,r,t)},Rectangle.simpleIntersection=function(e,t,i){var r=Math.max(e.west,t.west),n=Math.max(e.south,t.south),a=Math.min(e.east,t.east);if(!((t=Math.min(e.north,t.north))<=n||a<=r))return defined(i)?(i.west=r,i.south=n,i.east=a,i.north=t,i):new Rectangle(r,n,a,t)},Rectangle.union=function(e,t,i){defined(i)||(i=new Rectangle);var r=e.east,n=e.west,a=t.east,o=t.west;return r<n&&0<a?r+=CesiumMath.TWO_PI:a<o&&0<r&&(a+=CesiumMath.TWO_PI),r<n&&o<0?o+=CesiumMath.TWO_PI:a<o&&n<0&&(n+=CesiumMath.TWO_PI),o=CesiumMath.convertLongitudeRange(Math.min(n,o)),a=CesiumMath.convertLongitudeRange(Math.max(r,a)),i.west=o,i.south=Math.min(e.south,t.south),i.east=a,i.north=Math.max(e.north,t.north),i},Rectangle.expand=function(e,t,i){return defined(i)||(i=new Rectangle),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},Rectangle.contains=function(e,t){var i=t.longitude,r=t.latitude,n=e.west;return(t=e.east)<n&&(t+=CesiumMath.TWO_PI,i<0&&(i+=CesiumMath.TWO_PI)),(n<i||CesiumMath.equalsEpsilon(i,n,CesiumMath.EPSILON14))&&(i<t||CesiumMath.equalsEpsilon(i,t,CesiumMath.EPSILON14))&&r>=e.south&&r<=e.north};var subsampleLlaScratch=new Cartographic;function BoundingSphere(e,t){this.center=Cartesian3.clone(defaultValue(e,Cartesian3.ZERO)),this.radius=defaultValue(t,0)}Rectangle.subsample=function(e,t,i,r){t=defaultValue(t,Ellipsoid.WGS84),i=defaultValue(i,0),defined(r)||(r=[]);var n=0,a=e.north,o=e.south,s=e.east,l=e.west,c=subsampleLlaScratch;c.height=i,c.longitude=l,c.latitude=a,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.longitude=s,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.latitude=o,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.longitude=l,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.latitude=a<0?a:0<o?o:0;for(var u=1;u<8;++u)c.longitude=-Math.PI+u*CesiumMath.PI_OVER_TWO,Rectangle.contains(e,c)&&(r[n]=t.cartographicToCartesian(c,r[n]),n++);return 0===c.latitude&&(c.longitude=l,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.longitude=s,r[n]=t.cartographicToCartesian(c,r[n]),n++),r.length=n,r},Rectangle.MAX_VALUE=Object.freeze(new Rectangle(-Math.PI,-CesiumMath.PI_OVER_TWO,Math.PI,CesiumMath.PI_OVER_TWO));var fromPointsXMin=new Cartesian3,fromPointsYMin=new Cartesian3,fromPointsZMin=new Cartesian3,fromPointsXMax=new Cartesian3,fromPointsYMax=new Cartesian3,fromPointsZMax=new Cartesian3,fromPointsCurrentPos=new Cartesian3,fromPointsScratch=new Cartesian3,fromPointsRitterCenter=new Cartesian3,fromPointsMinBoxPt=new Cartesian3,fromPointsMaxBoxPt=new Cartesian3,fromPointsNaiveCenterScratch=new Cartesian3,volumeConstant=4/3*CesiumMath.PI;BoundingSphere.fromPoints=function(e,t){if(defined(t)||(t=new BoundingSphere),!defined(e)||0===e.length)return t.center=Cartesian3.clone(Cartesian3.ZERO,t.center),t.radius=0,t;for(var i=Cartesian3.clone(e[0],fromPointsCurrentPos),r=Cartesian3.clone(i,fromPointsXMin),n=Cartesian3.clone(i,fromPointsYMin),a=Cartesian3.clone(i,fromPointsZMin),o=Cartesian3.clone(i,fromPointsXMax),s=Cartesian3.clone(i,fromPointsYMax),l=Cartesian3.clone(i,fromPointsZMax),c=e.length,u=1;u<c;u++){Cartesian3.clone(e[u],i);var d=i.x,h=i.y,p=i.z;d<r.x&&Cartesian3.clone(i,r),d>o.x&&Cartesian3.clone(i,o),h<n.y&&Cartesian3.clone(i,n),h>s.y&&Cartesian3.clone(i,s),p<a.z&&Cartesian3.clone(i,a),p>l.z&&Cartesian3.clone(i,l)}var f=Cartesian3.magnitudeSquared(Cartesian3.subtract(o,r,fromPointsScratch)),m=Cartesian3.magnitudeSquared(Cartesian3.subtract(s,n,fromPointsScratch)),g=Cartesian3.magnitudeSquared(Cartesian3.subtract(l,a,fromPointsScratch)),y=r,_=o;(f=f)<m&&(f=m,y=n,_=s),f<g&&(f=g,y=a,_=l);var v=fromPointsRitterCenter;v.x=.5*(y.x+_.x),v.y=.5*(y.y+_.y),v.z=.5*(y.z+_.z);var C=Cartesian3.magnitudeSquared(Cartesian3.subtract(_,v,fromPointsScratch)),x=Math.sqrt(C);(y=fromPointsMinBoxPt).x=r.x,y.y=n.y,y.z=a.z,(_=fromPointsMaxBoxPt).x=o.x,_.y=s.y,_.z=l.z;var b=Cartesian3.midpoint(y,_,fromPointsNaiveCenterScratch),S=0;for(u=0;u<c;u++){Cartesian3.clone(e[u],i);var T=Cartesian3.magnitude(Cartesian3.subtract(i,b,fromPointsScratch));S<T&&(S=T);var E=Cartesian3.magnitudeSquared(Cartesian3.subtract(i,v,fromPointsScratch));C<E&&(C=(x=.5*(x+(T=Math.sqrt(E))))*x,E=T-x,v.x=(x*v.x+E*i.x)/T,v.y=(x*v.y+E*i.y)/T,v.z=(x*v.z+E*i.z)/T)}return x<S?(Cartesian3.clone(v,t.center),t.radius=x):(Cartesian3.clone(b,t.center),t.radius=S),t};var defaultProjection=new GeographicProjection,fromRectangle2DLowerLeft=new Cartesian3,fromRectangle2DUpperRight=new Cartesian3,fromRectangle2DSouthwest=new Cartographic,fromRectangle2DNortheast=new Cartographic;BoundingSphere.fromRectangle2D=function(e,t,i){return BoundingSphere.fromRectangleWithHeights2D(e,t,0,0,i)},BoundingSphere.fromRectangleWithHeights2D=function(e,t,i,r,n){if(defined(n)||(n=new BoundingSphere),!defined(e))return n.center=Cartesian3.clone(Cartesian3.ZERO,n.center),n.radius=0,n;t=defaultValue(t,defaultProjection),Rectangle.southwest(e,fromRectangle2DSouthwest),fromRectangle2DSouthwest.height=i,Rectangle.northeast(e,fromRectangle2DNortheast),fromRectangle2DNortheast.height=r;var a=t.project(fromRectangle2DSouthwest,fromRectangle2DLowerLeft);e=(i=t.project(fromRectangle2DNortheast,fromRectangle2DUpperRight)).x-a.x,r=i.y-a.y,t=i.z-a.z;return n.radius=.5*Math.sqrt(e*e+r*r+t*t),(i=n.center).x=a.x+.5*e,i.y=a.y+.5*r,i.z=a.z+.5*t,n};var fromRectangle3DScratch=[];BoundingSphere.fromRectangle3D=function(e,t,i,r){return t=defaultValue(t,Ellipsoid.WGS84),i=defaultValue(i,0),defined(r)||(r=new BoundingSphere),defined(e)?(i=Rectangle.subsample(e,t,i,fromRectangle3DScratch),BoundingSphere.fromPoints(i,r)):(r.center=Cartesian3.clone(Cartesian3.ZERO,r.center),r.radius=0,r)},BoundingSphere.fromVertices=function(e,t,i,r){if(defined(r)||(r=new BoundingSphere),!defined(e)||0===e.length)return r.center=Cartesian3.clone(Cartesian3.ZERO,r.center),r.radius=0,r;t=defaultValue(t,Cartesian3.ZERO),i=defaultValue(i,3);var n=fromPointsCurrentPos;n.x=e[0]+t.x,n.y=e[1]+t.y,n.z=e[2]+t.z;for(var a=Cartesian3.clone(n,fromPointsXMin),o=Cartesian3.clone(n,fromPointsYMin),s=Cartesian3.clone(n,fromPointsZMin),l=Cartesian3.clone(n,fromPointsXMax),c=Cartesian3.clone(n,fromPointsYMax),u=Cartesian3.clone(n,fromPointsZMax),d=e.length,h=0;h<d;h+=i){var p=e[h]+t.x,f=e[h+1]+t.y,m=e[h+2]+t.z;n.x=p,n.y=f,n.z=m,p<a.x&&Cartesian3.clone(n,a),p>l.x&&Cartesian3.clone(n,l),f<o.y&&Cartesian3.clone(n,o),f>c.y&&Cartesian3.clone(n,c),m<s.z&&Cartesian3.clone(n,s),m>u.z&&Cartesian3.clone(n,u)}var g=Cartesian3.magnitudeSquared(Cartesian3.subtract(l,a,fromPointsScratch)),y=Cartesian3.magnitudeSquared(Cartesian3.subtract(c,o,fromPointsScratch)),_=Cartesian3.magnitudeSquared(Cartesian3.subtract(u,s,fromPointsScratch)),v=a,C=l;(g=g)<y&&(g=y,v=o,C=c),g<_&&(g=_,v=s,C=u);var x=fromPointsRitterCenter;x.x=.5*(v.x+C.x),x.y=.5*(v.y+C.y),x.z=.5*(v.z+C.z);var b=Cartesian3.magnitudeSquared(Cartesian3.subtract(C,x,fromPointsScratch)),S=Math.sqrt(b);(v=fromPointsMinBoxPt).x=a.x,v.y=o.y,v.z=s.z,(C=fromPointsMaxBoxPt).x=l.x,C.y=c.y,C.z=u.z;var T=Cartesian3.midpoint(v,C,fromPointsNaiveCenterScratch),E=0;for(h=0;h<d;h+=i){n.x=e[h]+t.x,n.y=e[h+1]+t.y,n.z=e[h+2]+t.z;var w=Cartesian3.magnitude(Cartesian3.subtract(n,T,fromPointsScratch));E<w&&(E=w);var A=Cartesian3.magnitudeSquared(Cartesian3.subtract(n,x,fromPointsScratch));b<A&&(b=(S=.5*(S+(w=Math.sqrt(A))))*S,A=w-S,x.x=(S*x.x+A*n.x)/w,x.y=(S*x.y+A*n.y)/w,x.z=(S*x.z+A*n.z)/w)}return S<E?(Cartesian3.clone(x,r.center),r.radius=S):(Cartesian3.clone(T,r.center),r.radius=E),r},BoundingSphere.fromEncodedCartesianVertices=function(e,t,i){if(defined(i)||(i=new BoundingSphere),!defined(e)||!defined(t)||e.length!==t.length||0===e.length)return i.center=Cartesian3.clone(Cartesian3.ZERO,i.center),i.radius=0,i;var r=fromPointsCurrentPos;r.x=e[0]+t[0],r.y=e[1]+t[1],r.z=e[2]+t[2];for(var n=Cartesian3.clone(r,fromPointsXMin),a=Cartesian3.clone(r,fromPointsYMin),o=Cartesian3.clone(r,fromPointsZMin),s=Cartesian3.clone(r,fromPointsXMax),l=Cartesian3.clone(r,fromPointsYMax),c=Cartesian3.clone(r,fromPointsZMax),u=e.length,d=0;d<u;d+=3){var h=e[d]+t[d],p=e[d+1]+t[d+1],f=e[d+2]+t[d+2];r.x=h,r.y=p,r.z=f,h<n.x&&Cartesian3.clone(r,n),h>s.x&&Cartesian3.clone(r,s),p<a.y&&Cartesian3.clone(r,a),p>l.y&&Cartesian3.clone(r,l),f<o.z&&Cartesian3.clone(r,o),f>c.z&&Cartesian3.clone(r,c)}var m=Cartesian3.magnitudeSquared(Cartesian3.subtract(s,n,fromPointsScratch)),g=Cartesian3.magnitudeSquared(Cartesian3.subtract(l,a,fromPointsScratch)),y=Cartesian3.magnitudeSquared(Cartesian3.subtract(c,o,fromPointsScratch)),_=n,v=s;(m=m)<g&&(m=g,_=a,v=l),m<y&&(m=y,_=o,v=c);var C=fromPointsRitterCenter;C.x=.5*(_.x+v.x),C.y=.5*(_.y+v.y),C.z=.5*(_.z+v.z);var x=Cartesian3.magnitudeSquared(Cartesian3.subtract(v,C,fromPointsScratch)),b=Math.sqrt(x);(_=fromPointsMinBoxPt).x=n.x,_.y=a.y,_.z=o.z,(v=fromPointsMaxBoxPt).x=s.x,v.y=l.y,v.z=c.z;var S=Cartesian3.midpoint(_,v,fromPointsNaiveCenterScratch),T=0;for(d=0;d<u;d+=3){r.x=e[d]+t[d],r.y=e[d+1]+t[d+1],r.z=e[d+2]+t[d+2];var E=Cartesian3.magnitude(Cartesian3.subtract(r,S,fromPointsScratch));T<E&&(T=E);var w=Cartesian3.magnitudeSquared(Cartesian3.subtract(r,C,fromPointsScratch));x<w&&(x=(b=.5*(b+(E=Math.sqrt(w))))*b,w=E-b,C.x=(b*C.x+w*r.x)/E,C.y=(b*C.y+w*r.y)/E,C.z=(b*C.z+w*r.z)/E)}return b<T?(Cartesian3.clone(C,i.center),i.radius=b):(Cartesian3.clone(S,i.center),i.radius=T),i},BoundingSphere.fromCornerPoints=function(e,t,i){return defined(i)||(i=new BoundingSphere),e=Cartesian3.midpoint(e,t,i.center),i.radius=Cartesian3.distance(e,t),i},BoundingSphere.fromEllipsoid=function(e,t){return defined(t)||(t=new BoundingSphere),Cartesian3.clone(Cartesian3.ZERO,t.center),t.radius=e.maximumRadius,t};var fromBoundingSpheresScratch=new Cartesian3;BoundingSphere.fromBoundingSpheres=function(e,t){if(defined(t)||(t=new BoundingSphere),!defined(e)||0===e.length)return t.center=Cartesian3.clone(Cartesian3.ZERO,t.center),t.radius=0,t;var i=e.length;if(1===i)return BoundingSphere.clone(e[0],t);if(2===i)return BoundingSphere.union(e[0],e[1],t);for(var r=[],n=0;n<i;n++)r.push(e[n].center);var a=(t=BoundingSphere.fromPoints(r,t)).center,o=t.radius;for(n=0;n<i;n++){var s=e[n];o=Math.max(o,Cartesian3.distance(a,s.center,fromBoundingSpheresScratch)+s.radius)}return t.radius=o,t};var fromOrientedBoundingBoxScratchU=new Cartesian3,fromOrientedBoundingBoxScratchV=new Cartesian3,fromOrientedBoundingBoxScratchW=new Cartesian3;BoundingSphere.fromOrientedBoundingBox=function(e,t){defined(t)||(t=new BoundingSphere);var i=e.halfAxes,r=Matrix3.getColumn(i,0,fromOrientedBoundingBoxScratchU),n=Matrix3.getColumn(i,1,fromOrientedBoundingBoxScratchV);i=Matrix3.getColumn(i,2,fromOrientedBoundingBoxScratchW);return Cartesian3.add(r,n,r),Cartesian3.add(r,i,r),t.center=Cartesian3.clone(e.center,t.center),t.radius=Cartesian3.magnitude(r),t},BoundingSphere.clone=function(e,t){if(defined(e))return defined(t)?(t.center=Cartesian3.clone(e.center,t.center),t.radius=e.radius,t):new BoundingSphere(e.center,e.radius)},BoundingSphere.packedLength=4,BoundingSphere.pack=function(e,t,i){i=defaultValue(i,0);var r=e.center;return t[i++]=r.x,t[i++]=r.y,t[i++]=r.z,t[i]=e.radius,t},BoundingSphere.unpack=function(e,t,i){t=defaultValue(t,0),defined(i)||(i=new BoundingSphere);var r=i.center;return r.x=e[t++],r.y=e[t++],r.z=e[t++],i.radius=e[t],i};var unionScratch=new Cartesian3,unionScratchCenter=new Cartesian3;BoundingSphere.union=function(e,t,i){defined(i)||(i=new BoundingSphere);var r=e.center,n=e.radius,a=t.center,o=t.radius,s=Cartesian3.subtract(a,r,unionScratch);return(a=Cartesian3.magnitude(s))+o<=n?(e.clone(i),i):a+n<=o?(t.clone(i),i):(o=.5*(n+a+o),a=Cartesian3.multiplyByScalar(s,(o-n)/a,unionScratchCenter),Cartesian3.add(a,r,a),Cartesian3.clone(a,i.center),i.radius=o,i)};var expandScratch=new Cartesian3;BoundingSphere.expand=function(e,t,i){return i=BoundingSphere.clone(e,i),(t=Cartesian3.magnitude(Cartesian3.subtract(t,i.center,expandScratch)))>i.radius&&(i.radius=t),i},BoundingSphere.intersectPlane=function(e,t){var i=e.center,r=e.radius;e=t.normal;return(t=Cartesian3.dot(e,i)+t.distance)<-r?Intersect$1.OUTSIDE:t<r?Intersect$1.INTERSECTING:Intersect$1.INSIDE},BoundingSphere.transform=function(e,t,i){return defined(i)||(i=new BoundingSphere),i.center=Matrix4.multiplyByPoint(t,e.center,i.center),i.radius=Matrix4.getMaximumScale(t)*e.radius,i};var distanceSquaredToScratch=new Cartesian3;BoundingSphere.distanceSquaredTo=function(e,t){return t=Cartesian3.subtract(e.center,t,distanceSquaredToScratch),Cartesian3.magnitudeSquared(t)-e.radius*e.radius},BoundingSphere.transformWithoutScale=function(e,t,i){return defined(i)||(i=new BoundingSphere),i.center=Matrix4.multiplyByPoint(t,e.center,i.center),i.radius=e.radius,i};var scratchCartesian3=new Cartesian3;BoundingSphere.computePlaneDistances=function(e,t,i,r){return defined(r)||(r=new Interval),t=Cartesian3.subtract(e.center,t,scratchCartesian3),t=Cartesian3.dot(i,t),r.start=t-e.radius,r.stop=t+e.radius,r};for(var projectTo2DNormalScratch=new Cartesian3,projectTo2DEastScratch=new Cartesian3,projectTo2DNorthScratch=new Cartesian3,projectTo2DWestScratch=new Cartesian3,projectTo2DSouthScratch=new Cartesian3,projectTo2DCartographicScratch=new Cartographic,projectTo2DPositionsScratch=new Array(8),n=0;n<8;++n)projectTo2DPositionsScratch[n]=new Cartesian3;var projectTo2DProjection=new GeographicProjection;function URI(e){e instanceof URI?(this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment):e&&(e=parseRegex.exec(e),this.scheme=e[1],this.authority=e[2],this.path=e[3],this.query=e[4],this.fragment=e[5])}BoundingSphere.projectTo2D=function(e,t,i){var r=(t=defaultValue(t,projectTo2DProjection)).ellipsoid,n=e.center,a=e.radius,o=Cartesian3.equals(n,Cartesian3.ZERO)?Cartesian3.clone(Cartesian3.UNIT_X,projectTo2DNormalScratch):r.geodeticSurfaceNormal(n,projectTo2DNormalScratch),s=Cartesian3.cross(Cartesian3.UNIT_Z,o,projectTo2DEastScratch);Cartesian3.normalize(s,s);var l=Cartesian3.cross(o,s,projectTo2DNorthScratch);Cartesian3.normalize(l,l),Cartesian3.multiplyByScalar(o,a,o),Cartesian3.multiplyByScalar(l,a,l),Cartesian3.multiplyByScalar(s,a,s);var c=Cartesian3.negate(l,projectTo2DSouthScratch),u=(e=Cartesian3.negate(s,projectTo2DWestScratch),projectTo2DPositionsScratch);a=u[0];Cartesian3.add(o,l,a),Cartesian3.add(a,s,a),a=u[1],Cartesian3.add(o,l,a),Cartesian3.add(a,e,a),a=u[2],Cartesian3.add(o,c,a),Cartesian3.add(a,e,a),a=u[3],Cartesian3.add(o,c,a),Cartesian3.add(a,s,a),Cartesian3.negate(o,o),a=u[4],Cartesian3.add(o,l,a),Cartesian3.add(a,s,a),a=u[5],Cartesian3.add(o,l,a),Cartesian3.add(a,e,a),a=u[6],Cartesian3.add(o,c,a),Cartesian3.add(a,e,a),a=u[7],Cartesian3.add(o,c,a),Cartesian3.add(a,s,a);for(var d=u.length,h=0;h<d;++h){var p=u[h];Cartesian3.add(n,p,p);var f=r.cartesianToCartographic(p,projectTo2DCartographicScratch);t.project(f,p)}return c=(n=(i=BoundingSphere.fromPoints(u,i)).center).x,s=n.y,a=n.z,n.x=a,n.y=c,n.z=s,i},BoundingSphere.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)},BoundingSphere.equals=function(e,t){return e===t||defined(e)&&defined(t)&&Cartesian3.equals(e.center,t.center)&&e.radius===t.radius},BoundingSphere.prototype.intersectPlane=function(e){return BoundingSphere.intersectPlane(this,e)},BoundingSphere.prototype.distanceSquaredTo=function(e){return BoundingSphere.distanceSquaredTo(this,e)},BoundingSphere.prototype.computePlaneDistances=function(e,t,i){return BoundingSphere.computePlaneDistances(this,e,t,i)},BoundingSphere.prototype.isOccluded=function(e){return BoundingSphere.isOccluded(this,e)},BoundingSphere.prototype.equals=function(e){return BoundingSphere.equals(this,e)},BoundingSphere.prototype.clone=function(e){return BoundingSphere.clone(this,e)},BoundingSphere.prototype.volume=function(){var e=this.radius;return volumeConstant*e*e*e},URI.prototype.scheme=null,URI.prototype.authority=null,URI.prototype.path="",URI.prototype.query=null,URI.prototype.fragment=null;var parseRegex=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");URI.prototype.getScheme=function(){return this.scheme},URI.prototype.getAuthority=function(){return this.authority},URI.prototype.getPath=function(){return this.path},URI.prototype.getQuery=function(){return this.query},URI.prototype.getFragment=function(){return this.fragment},URI.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},URI.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},URI.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},URI.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(authorityRegex,replaceAuthority).replace(caseRegex,replaceCase)),this.path&&(this.path=this.path.replace(caseRegex,replaceCase)),this.query&&(this.query=this.query.replace(caseRegex,replaceCase)),this.fragment&&(this.fragment=this.fragment.replace(caseRegex,replaceCase))};var caseRegex=/%[0-9a-z]{2}/gi,percentRegex=/[a-zA-Z0-9\-\._~]/,authorityRegex=/(.*@)?([^@:]*)(:.*)?/,reduceArray,slice,undef;function replaceCase(e){var t=unescape(e);return percentRegex.test(t)?t:e.toUpperCase()}function replaceAuthority(e,t,i,r){return(t||"")+i.toLowerCase()+(r||"")}function getAbsoluteUri(e,t){var i;return"undefined"!=typeof document&&(i=document),getAbsoluteUri._implementation(e,t,i)}function when(e,t,i,r){return resolve(e).then(t,i,r)}function resolve(e){var t;return e=e instanceof Promise$1?e:isPromise(e)?(t=defer(),e.then((function(e){t.resolve(e)}),(function(e){t.reject(e)}),(function(e){t.progress(e)})),t.promise):fulfilled(e)}function reject(e){return when(e,rejected)}function Promise$1(e){this.then=e}function fulfilled(e){return new Promise$1((function(t){try{return resolve(t?t(e):e)}catch(t){return rejected(t)}}))}function rejected(e){return new Promise$1((function(t,i){try{return i?resolve(i(e)):rejected(e)}catch(t){return rejected(t)}}))}function defer(){var e=new Promise$1(o),t=[],i=[],r=function(e,r,n){var a=defer(),o="function"==typeof n?function(e){try{a.progress(n(e))}catch(e){a.progress(e)}}:function(e){a.progress(e)};return t.push((function(t){t.then(e,r).then(a.resolve,a.reject,o)})),i.push(o),a.promise},n=function(e){return processQueue(i,e),e},a=function(e){return e=resolve(e),r=e.then,a=resolve,n=noop,processQueue(t,e),i=t=undef,e};return{then:o,resolve:s,reject:l,progress:c,promise:e,resolver:{resolve:s,reject:l,progress:c}};function o(e,t,i){return r(e,t,i)}function s(e){return a(e)}function l(e){return a(rejected(e))}function c(e){return n(e)}}function isPromise(e){return e&&"function"==typeof e.then}function some(e,t,i,r,n){return checkCallbacks(2,arguments),when(e,(function(e){var a,o,s,l,c=e.length>>>0,u=Math.max(0,Math.min(t,c)),d=[],h=c-u+1,p=[],f=defer();if(u)for(s=f.progress,o=function(e){p.push(e),--h||(a=o=noop,f.reject(p))},a=function(e){d.push(e),--u||(a=o=noop,f.resolve(d))},l=0;l<c;++l)l in e&&when(e[l],g,m,s);else f.resolve(d);return f.then(i,r,n);function m(e){o(e)}function g(e){a(e)}}))}function any(e,t,i,r){return some(e,1,(function(e){return t?t(e[0]):e[0]}),i,r)}function all(e,t,i,r){return checkCallbacks(1,arguments),map(e,identity).then(t,i,r)}function join(){return map(arguments,identity)}function map(e,t){return when(e,(function(e){var i,r,n,a=i=e.length>>>0,o=[],s=defer();if(a)for(r=function(e,i){when(e,t).then((function(e){o[i]=e,--a||s.resolve(o)}),s.reject)},n=0;n<i;n++)n in e?r(e[n],n):--a;else s.resolve(o);return s.promise}))}function reduce(e,t){var i=slice.call(arguments,1);return when(e,(function(e){var r=e.length;return i[0]=function(e,i,n){return when(e,(function(e){return when(i,(function(i){return t(e,i,n,r)}))}))},reduceArray.apply(e,i)}))}function chain(e,t,i){var r=2<arguments.length;return when(e,(function(e){return e=r?i:e,t.resolve(e),e}),(function(e){return t.reject(e),rejected(e)}),t.progress)}function processQueue(e,t){for(var i,r=0;i=e[r++];)i(t)}function checkCallbacks(e,t){for(var i,r=t.length;e<r;)if(null!=(i=t[--r])&&"function"!=typeof i)throw new Error("arg "+r+" must be a function")}function noop(){}function identity(e){return e}function appendForwardSlash(e){return 0!==e.length&&"/"===e[e.length-1]||(e+="/"),e}function clone(e,t){if(null===e||"object"!=typeof e)return e;t=defaultValue(t,!1);var i,r,n=new e.constructor;for(i in e)e.hasOwnProperty(i)&&(r=e[i],t&&(r=clone(r,t)),n[i]=r);return n}function combine(e,t,i){i=defaultValue(i,!1);var r,n,a,o={},s=defined(e),l=defined(t);if(s)for(r in e)e.hasOwnProperty(r)&&(n=e[r],l&&i&&"object"==typeof n&&t.hasOwnProperty(r)?(a=t[r],o[r]="object"==typeof a?combine(n,a,i):n):o[r]=n);if(l)for(r in t)t.hasOwnProperty(r)&&!o.hasOwnProperty(r)&&(a=t[r],o[r]=a);return o}function getBaseUri(e,t){var i="",r=e.lastIndexOf("/");return-1!==r&&(i=e.substring(0,r+1)),t&&(defined((e=new URI(e)).query)&&(i+="?"+e.query),defined(e.fragment)&&(i+="#"+e.fragment)),i}function getExtensionFromUri(e){var t=new URI(e);return t.normalize(),-1!==(t=(e=t.path).lastIndexOf("/"))&&(e=e.substr(t+1)),-1===(t=e.lastIndexOf("."))?"":e.substr(t+1)}URI.prototype.resolve=function(e){var t=new URI;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?t.path=this.path:e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments(),t.query=this.query))),t.fragment=this.fragment,t},URI.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),i=[],r=""==t[0];for(r&&t.shift(),""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?i.pop():"."!=e&&i.push(e);"."!=e&&".."!=e||i.push(""),r&&i.unshift(""),this.path=i.join("/")},URI.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},getAbsoluteUri._implementation=function(e,t,i){if(!defined(t)){if(void 0===i)return e;t=defaultValue(i.baseURI,i.location.href)}return t=new URI(t),new URI(e).resolve(t).toString()},when.defer=defer,when.resolve=resolve,when.reject=reject,when.join=join,when.all=all,when.map=map,when.reduce=reduce,when.any=any,when.some=some,when.chain=chain,when.isPromise=isPromise,Promise$1.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(undef,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return all(t,(function(t){return e.apply(undef,t)}))}))}},slice=[].slice,reduceArray=[].reduce||function(e){var t,i=0,r=Object(this),n=r.length>>>0,a=arguments;if(a.length<=1)for(;;){if(i in r){t=r[i++];break}if(++i>=n)throw new TypeError}else t=a[1];for(;i<n;++i)i in r&&(t=e(t,r[i],i,r));return t};var blobUriRegex=/^blob:/i,a;function isBlobUri(e){return blobUriRegex.test(e)}function isCrossOriginUrl(e){defined(a)||(a=document.createElement("a")),a.href=window.location.href;var t=a.host,i=a.protocol;return a.href=e,a.href=a.href,i!==a.protocol||t!==a.host}var dataUriRegex=/^data:/i;function isDataUri(e){return dataUriRegex.test(e)}function loadAndExecuteScript(e){var t=when.defer(),i=document.createElement("script");i.async=!0,i.src=e;var r=document.getElementsByTagName("head")[0];return i.onload=function(){i.onload=void 0,r.removeChild(i),t.resolve()},i.onerror=function(e){t.reject(e)},r.appendChild(i),t.promise}function objectToQuery(e){var t,i="";for(t in e)if(e.hasOwnProperty(t)){var r=e[t],n=encodeURIComponent(t)+"=";if(Array.isArray(r))for(var a=0,o=r.length;a<o;++a)i+=n+encodeURIComponent(r[a])+"&";else i+=n+encodeURIComponent(r)+"&"}return i.slice(0,-1)}function queryToObject(e){var t={};if(""===e)return t;for(var i=e.replace(/\+/g,"%20").split(/[&;]/),r=0,n=i.length;r<n;++r){var a=i[r].split("="),o=decodeURIComponent(a[0]),s=defined(s=a[1])?decodeURIComponent(s):"";"string"==typeof(a=t[o])?t[o]=[a,s]:Array.isArray(a)?a.push(s):t[o]=s}return t}var RequestState={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},RequestState$1=Object.freeze(RequestState),RequestType={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},RequestType$1=Object.freeze(RequestType);function Request(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.throttleByServer,!1),i=defaultValue(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=defaultValue(e.priority,0),this.throttle=i,this.throttleByServer=t,this.type=defaultValue(e.type,RequestType$1.OTHER),this.serverKey=void 0,this.state=RequestState$1.UNISSUED,this.deferred=void 0,this.cancelled=!1}function parseResponseHeaders(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),r=0;r<i.length;++r){var n,a=i[r],o=a.indexOf(": ");0<o&&(n=a.substring(0,o),o=a.substring(o+2),t[n]=o)}return t}function RequestErrorEvent(e,t,i){this.statusCode=e,this.response=t,this.responseHeaders=i,"string"==typeof this.responseHeaders&&(this.responseHeaders=parseResponseHeaders(this.responseHeaders))}function Event(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function compareNumber(e,t){return t-e}function Heap(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function swap(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function sortRequests(e,t){return e.priority-t.priority}Request.prototype.cancel=function(){this.cancelled=!0},Request.prototype.clone=function(e){return defined(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new Request(this)},RequestErrorEvent.prototype.toString=function(){var e="Request has failed.";return defined(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(Event.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),Event.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},Event.prototype.removeEventListener=function(e,t){for(var i=this._listeners,r=this._scopes,n=-1,a=0;a<i.length;a++)if(i[a]===e&&r[a]===t){n=a;break}return-1!==n&&(this._insideRaiseEvent?(this._toRemove.push(n),i[n]=void 0,r[n]=void 0):(i.splice(n,1),r.splice(n,1)),!0)},Event.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;for(var e=this._listeners,t=this._scopes,i=e.length,r=0;r<i;r++)defined(e[r])&&e[r].apply(t[r],arguments);var n=this._toRemove;if(0<(i=n.length)){for(n.sort(compareNumber),r=0;r<i;r++){var a=n[r];e.splice(a,1),t.splice(a,1)}n.length=0}this._insideRaiseEvent=!1},Object.defineProperties(Heap.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){var t=this._length;if(e<t){for(var i=this._array,r=e;r<t;++r)i[r]=void 0;this._length=e,i.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}}),Heap.prototype.reserve=function(e){e=defaultValue(e,this._length),this._array.length=e},Heap.prototype.heapify=function(e){e=defaultValue(e,0);for(var t=this._length,i=this._comparator,r=this._array,n=-1,a=!0;a;){var o=2*(e+1),s=o-1;n=s<t&&i(r[s],r[e])<0?s:e;o<t&&i(r[o],r[n])<0&&(n=o),n!==e?(swap(r,n,e),e=n):a=!1}},Heap.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);0<=t;--t)this.heapify(t)},Heap.prototype.insert=function(e){var t,i=this._array,r=this._comparator,n=this._maximumLength,a=this._length++;for(a<i.length?i[a]=e:i.push(e);0!==a;){var o=Math.floor((a-1)/2);if(!(r(i[a],i[o])<0))break;swap(i,a,o),a=o}return defined(n)&&this._length>n&&(t=i[n],this._length=n),t},Heap.prototype.pop=function(e){if(e=defaultValue(e,0),0!==this._length){var t=this._array,i=t[e];return swap(t,e,--this._length),this.heapify(e),t[this._length]=void 0,i}};var statistics={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},priorityHeapLength=20,requestHeap=new Heap({comparator:sortRequests});requestHeap.maximumLength=priorityHeapLength,requestHeap.reserve(priorityHeapLength);var activeRequests=[],numberOfActiveRequestsByServer={},pageUri="undefined"!=typeof document?new URI(document.location.href):new URI,requestCompletedEvent=new Event;function RequestScheduler(){}function updatePriority(e){defined(e.priorityFunction)&&(e.priority=e.priorityFunction())}function serverHasOpenSlots(e){var t=defaultValue(RequestScheduler.requestsByServer[e],RequestScheduler.maximumRequestsPerServer);return numberOfActiveRequestsByServer[e]<t}function issueRequest(e){return e.state===RequestState$1.UNISSUED&&(e.state=RequestState$1.ISSUED,e.deferred=when.defer()),e.deferred.promise}function getRequestReceivedFunction(e){return function(t){var i;e.state!==RequestState$1.CANCELLED&&(i=e.deferred,--statistics.numberOfActiveRequests,--numberOfActiveRequestsByServer[e.serverKey],requestCompletedEvent.raiseEvent(),e.state=RequestState$1.RECEIVED,e.deferred=void 0,i.resolve(t))}}function getRequestFailedFunction(e){return function(t){e.state!==RequestState$1.CANCELLED&&(++statistics.numberOfFailedRequests,--statistics.numberOfActiveRequests,--numberOfActiveRequestsByServer[e.serverKey],requestCompletedEvent.raiseEvent(t),e.state=RequestState$1.FAILED,e.deferred.reject(t))}}function startRequest(e){var t=issueRequest(e);return e.state=RequestState$1.ACTIVE,activeRequests.push(e),++statistics.numberOfActiveRequests,++statistics.numberOfActiveRequestsEver,++numberOfActiveRequestsByServer[e.serverKey],e.requestFunction().then(getRequestReceivedFunction(e)).otherwise(getRequestFailedFunction(e)),t}function cancelRequest(e){var t,i=e.state===RequestState$1.ACTIVE;e.state=RequestState$1.CANCELLED,++statistics.numberOfCancelledRequests,defined(e.deferred)&&(t=e.deferred,e.deferred=void 0,t.reject()),i&&(--statistics.numberOfActiveRequests,--numberOfActiveRequestsByServer[e.serverKey],++statistics.numberOfCancelledActiveRequests),defined(e.cancelFunction)&&e.cancelFunction()}function updateStatistics(){RequestScheduler.debugShowStatistics&&(0===statistics.numberOfActiveRequests&&0<statistics.lastNumberOfActiveRequests&&(0<statistics.numberOfAttemptedRequests&&(console.log("Number of attempted requests: "+statistics.numberOfAttemptedRequests),statistics.numberOfAttemptedRequests=0),0<statistics.numberOfCancelledRequests&&(console.log("Number of cancelled requests: "+statistics.numberOfCancelledRequests),statistics.numberOfCancelledRequests=0),0<statistics.numberOfCancelledActiveRequests&&(console.log("Number of cancelled active requests: "+statistics.numberOfCancelledActiveRequests),statistics.numberOfCancelledActiveRequests=0),0<statistics.numberOfFailedRequests&&(console.log("Number of failed requests: "+statistics.numberOfFailedRequests),statistics.numberOfFailedRequests=0)),statistics.lastNumberOfActiveRequests=statistics.numberOfActiveRequests)}RequestScheduler.maximumRequests=50,RequestScheduler.maximumRequestsPerServer=6,RequestScheduler.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},RequestScheduler.throttleRequests=!0,RequestScheduler.debugShowStatistics=!1,RequestScheduler.requestCompletedEvent=requestCompletedEvent,Object.defineProperties(RequestScheduler,{statistics:{get:function(){return statistics}},priorityHeapLength:{get:function(){return priorityHeapLength},set:function(e){if(e<priorityHeapLength)for(;requestHeap.length>e;)cancelRequest(requestHeap.pop());priorityHeapLength=e,requestHeap.maximumLength=e,requestHeap.reserve(e)}}}),RequestScheduler.update=function(){for(var e,t=0,i=activeRequests.length,r=0;r<i;++r)(e=activeRequests[r]).cancelled&&cancelRequest(e),e.state===RequestState$1.ACTIVE?0<t&&(activeRequests[r-t]=e):++t;activeRequests.length-=t;var n=requestHeap.internalArray,a=requestHeap.length;for(r=0;r<a;++r)updatePriority(n[r]);requestHeap.resort();for(var o=Math.max(RequestScheduler.maximumRequests-activeRequests.length,0),s=0;s<o&&0<requestHeap.length;)(e=requestHeap.pop()).cancelled||e.throttleByServer&&!serverHasOpenSlots(e.serverKey)?cancelRequest(e):(startRequest(e),++s);updateStatistics()},RequestScheduler.getServerKey=function(e){var t=new URI(e).resolve(pageUri);return t.normalize(),e=t.authority,/:/.test(e)||(e=e+":"+("https"===t.scheme?"443":"80")),defined(numberOfActiveRequestsByServer[e])||(numberOfActiveRequestsByServer[e]=0),e},RequestScheduler.request=function(e){if(isDataUri(e.url)||isBlobUri(e.url))return requestCompletedEvent.raiseEvent(),e.state=RequestState$1.RECEIVED,e.requestFunction();if(++statistics.numberOfAttemptedRequests,defined(e.serverKey)||(e.serverKey=RequestScheduler.getServerKey(e.url)),!RequestScheduler.throttleRequests||!e.throttleByServer||serverHasOpenSlots(e.serverKey)){if(!RequestScheduler.throttleRequests||!e.throttle)return startRequest(e);if(!(activeRequests.length>=RequestScheduler.maximumRequests)){updatePriority(e);var t=requestHeap.insert(e);if(defined(t)){if(t===e)return;cancelRequest(t)}return issueRequest(e)}}},RequestScheduler.clearForSpecs=function(){for(;0<requestHeap.length;)cancelRequest(requestHeap.pop());for(var e=activeRequests.length,t=0;t<e;++t)cancelRequest(activeRequests[t]);activeRequests.length=0,numberOfActiveRequestsByServer={},statistics.numberOfAttemptedRequests=0,statistics.numberOfActiveRequests=0,statistics.numberOfCancelledRequests=0,statistics.numberOfCancelledActiveRequests=0,statistics.numberOfFailedRequests=0,statistics.numberOfActiveRequestsEver=0,statistics.lastNumberOfActiveRequests=0},RequestScheduler.numberOfActiveRequestsByServer=function(e){return numberOfActiveRequestsByServer[e]},RequestScheduler.requestHeap=requestHeap;var TrustedServers={},_servers={};function getAuthority(e){var t=new URI(e);if(t.normalize(),defined(e=t.getAuthority())){if(-1!==e.indexOf("@")&&(e=e.split("@")[1]),-1===e.indexOf(":"))if(defined(t=t.getScheme())||(t=(t=window.location.protocol).substring(0,t.length-1)),"http"===t)e+=":80";else{if("https"!==t)return;e+=":443"}return e}}TrustedServers.add=function(e,t){t=e.toLowerCase()+":"+t,defined(_servers[t])||(_servers[t]=!0)},TrustedServers.remove=function(e,t){t=e.toLowerCase()+":"+t,defined(_servers[t])&&delete _servers[t]},TrustedServers.contains=function(e){return!(!defined(e=getAuthority(e))||!defined(_servers[e]))},TrustedServers.clear=function(){_servers={}};var xhrBlobSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),(e.responseType="blob")===e.responseType}catch(e){return!1}}(),supportsImageBitmapOptionsPromise;function parseQuery(e,t,i,r){var n,a=e.query;if(!defined(a)||0===a.length)return 1;a=-1===a.indexOf("=")?((n={})[a]=void 0,n):queryToObject(a),t._queryParameters=i?combineQueryParameters(a,t._queryParameters,r):a,e.query=void 0}function stringifyQuery(e,t){var i=t._queryParameters;1!==(t=Object.keys(i)).length||defined(i[t[0]])?e.query=objectToQuery(i):e.query=t[0]}function defaultClone(e,t){return defined(e)?defined(e.clone)?e.clone():clone(e):t}function checkAndResetRequest(e){if(e.state===RequestState$1.ISSUED||e.state===RequestState$1.ACTIVE)throw new RuntimeError("The Resource is already being fetched.");e.state=RequestState$1.UNISSUED,e.deferred=void 0}function combineQueryParameters(e,t,i){if(!i)return combine(e,t);var r,n,a,o=clone(e,!0);for(r in t)t.hasOwnProperty(r)&&(n=o[r],a=t[r],defined(n)?(Array.isArray(n)||(n=o[r]=[n]),o[r]=n.concat(a)):o[r]=Array.isArray(a)?a.slice():a);return o}function Resource(e){"string"==typeof(e=defaultValue(e,defaultValue.EMPTY_OBJECT))&&(e={url:e}),this._url=void 0,this._templateValues=defaultClone(e.templateValues,{}),this._queryParameters=defaultClone(e.queryParameters,{}),this.headers=defaultClone(e.headers,{}),this.request=defaultValue(e.request,new Request),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=defaultValue(e.retryAttempts,0),this._retryCount=0,parseQuery(e=new URI(e.url),this,!0,!0),e.fragment=void 0,this._url=e.toString()}function fetchImage(e){var t=e.resource,i=e.flipY,r=e.preferImageBitmap,n=t.request;if(n.url=t.url,n.requestFunction=function(){var e=!1;t.isDataUri||t.isBlobUri||(e=t.isCrossOriginUrl);var a=when.defer();return Resource._Implementations.createImage(n,e,a,i,r),a.promise},defined(e=RequestScheduler.request(n)))return e.otherwise((function(e){return n.state!==RequestState$1.FAILED?when.reject(e):t.retryOnError(e).then((function(a){return a?(n.state=RequestState$1.UNISSUED,n.deferred=void 0,fetchImage({resource:t,flipY:i,preferImageBitmap:r})):when.reject(e)}))}))}function fetchJsonp(e,t,i){var r={};r[t]=i,e.setQueryParameters(r);var n=e.request;if(n.url=e.url,n.requestFunction=function(){var t=when.defer();return window[i]=function(e){t.resolve(e);try{delete window[i]}catch(e){window[i]=void 0}},Resource._Implementations.loadAndExecuteScript(e.url,i,t),t.promise},defined(r=RequestScheduler.request(n)))return r.otherwise((function(r){return n.state!==RequestState$1.FAILED?when.reject(r):e.retryOnError(r).then((function(a){return a?(n.state=RequestState$1.UNISSUED,n.deferred=void 0,fetchJsonp(e,t,i)):when.reject(r)}))}))}Resource.createIfNeeded=function(e){return e instanceof Resource?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new Resource({url:e})},Resource.supportsImageBitmapOptions=function(){return defined(supportsImageBitmapOptionsPromise)?supportsImageBitmapOptionsPromise:supportsImageBitmapOptionsPromise="function"!=typeof createImageBitmap?when.resolve(!1):Resource.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none"})})).then((function(e){return!0})).otherwise((function(){return!1}))},Object.defineProperties(Resource,{isBlobSupported:{get:function(){return xhrBlobSupported}}}),Object.defineProperties(Resource.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){parseQuery(e=new URI(e),this,!1),e.fragment=void 0,this._url=e.toString()}},extension:{get:function(){return getExtensionFromUri(this._url)}},isDataUri:{get:function(){return isDataUri(this._url)}},isBlobUri:{get:function(){return isBlobUri(this._url)}},isCrossOriginUrl:{get:function(){return isCrossOriginUrl(this._url)}},hasHeaders:{get:function(){return 0<Object.keys(this.headers).length}}}),Resource.prototype.toString=function(){return this.getUrlComponent(!0,!0)},Resource.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var i=new URI(this._url);e&&stringifyQuery(i,this);i=i.toString().replace(/%7B/g,"{").replace(/%7D/g,"}");var r=this._templateValues;i=i.replace(/{(.*?)}/g,(function(e,t){return defined(t=r[t])?encodeURIComponent(t):e}));return t&&defined(this.proxy)&&(i=this.proxy.getURL(i)),i},Resource.prototype.setQueryParameters=function(e,t){this._queryParameters=t?combineQueryParameters(this._queryParameters,e,!1):combineQueryParameters(e,this._queryParameters,!1)},Resource.prototype.appendQueryParameters=function(e){this._queryParameters=combineQueryParameters(e,this._queryParameters,!0)},Resource.prototype.setTemplateValues=function(e,t){this._templateValues=t?combine(this._templateValues,e):combine(e,this._templateValues)},Resource.prototype.getDerivedResource=function(e){var t,i=this.clone();return i._retryCount=0,defined(e.url)&&(parseQuery(t=new URI(e.url),i,!0,defaultValue(e.preserveQueryParameters,!1)),t.fragment=void 0,i._url=t.resolve(new URI(getAbsoluteUri(this._url))).toString()),defined(e.queryParameters)&&(i._queryParameters=combine(e.queryParameters,i._queryParameters)),defined(e.templateValues)&&(i._templateValues=combine(e.templateValues,i.templateValues)),defined(e.headers)&&(i.headers=combine(e.headers,i.headers)),defined(e.proxy)&&(i.proxy=e.proxy),defined(e.request)&&(i.request=e.request),defined(e.retryCallback)&&(i.retryCallback=e.retryCallback),defined(e.retryAttempts)&&(i.retryAttempts=e.retryAttempts),i},Resource.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return when(!1);var i=this;return when(t(this,e)).then((function(e){return++i._retryCount,e}))},Resource.prototype.clone=function(e){return defined(e)||(e=new Resource({url:this._url})),e._url=this._url,e._queryParameters=clone(this._queryParameters),e._templateValues=clone(this._templateValues),e.headers=clone(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},Resource.prototype.getBaseUri=function(e){return getBaseUri(this.getUrlComponent(e),e)},Resource.prototype.appendForwardSlash=function(){this._url=appendForwardSlash(this._url)},Resource.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Resource.fetchArrayBuffer=function(e){return new Resource(e).fetchArrayBuffer()},Resource.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Resource.fetchBlob=function(e){return new Resource(e).fetchBlob()},Resource.prototype.fetchImage=function(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.preferImageBitmap,!1),i=defaultValue(e.preferBlob,!1),r=defaultValue(e.flipY,!1);if(checkAndResetRequest(this.request),!xhrBlobSupported||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!i)return fetchImage({resource:this,flipY:r,preferImageBitmap:t});var n,a,o,s=this.fetchBlob();return defined(s)?Resource.supportsImageBitmapOptions().then((function(e){return n=e&&t,s})).then((function(e){if(defined(e))return o=e,n?Resource.createImageBitmapFromBlob(e,{flipY:r,premultiplyAlpha:!1}):(e=window.URL.createObjectURL(e),fetchImage({resource:a=new Resource({url:e}),flipY:r,preferImageBitmap:!1}))})).then((function(e){if(defined(e))return e.blob=o,n||window.URL.revokeObjectURL(a.url),e})).otherwise((function(e){return defined(a)&&window.URL.revokeObjectURL(a.url),e.blob=o,when.reject(e)})):void 0},Resource.fetchImage=function(e){return new Resource(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Resource.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Resource.fetchText=function(e){return new Resource(e).fetchText()},Resource.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(defined(e))return e.then((function(e){if(defined(e))return JSON.parse(e)}))},Resource.fetchJson=function(e){return new Resource(e).fetchJson()},Resource.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Resource.fetchXML=function(e){return new Resource(e).fetchXML()},Resource.prototype.fetchJsonp=function(e){var t;for(e=defaultValue(e,"callback"),checkAndResetRequest(this.request);t="loadJsonp"+Math.random().toString().substring(2,8),defined(window[t]););return fetchJsonp(this,e,t)},Resource.fetchJsonp=function(e){return new Resource(e).fetchJsonp(e.callbackParameterName)},Resource.prototype._makeRequest=function(e){var t=this;checkAndResetRequest(t.request);var i=t.request;i.url=t.url,i.requestFunction=function(){var r=e.responseType,n=combine(e.headers,t.headers),a=e.overrideMimeType,o=e.method,s=e.data,l=when.defer(),c=Resource._Implementations.loadWithXhr(t.url,r,o,s,n,l,a);return defined(c)&&defined(c.abort)&&(i.cancelFunction=function(){c.abort()}),l.promise};var r=RequestScheduler.request(i);if(defined(r))return r.then((function(e){return i.cancelFunction=void 0,e})).otherwise((function(r){return i.cancelFunction=void 0,i.state!==RequestState$1.FAILED?when.reject(r):t.retryOnError(r).then((function(n){return n?(i.state=RequestState$1.UNISSUED,i.deferred=void 0,t.fetch(e)):when.reject(r)}))}))};var dataUriRegex$1=/^data:(.*?)(;base64)?,(.*)$/;function decodeDataUriText(e,t){return t=decodeURIComponent(t),e?atob(t):t}function decodeDataUriArrayBuffer(e,t){for(var i=decodeDataUriText(e,t),r=(t=new ArrayBuffer(i.length),new Uint8Array(t)),n=0;n<i.length;n++)r[n]=i.charCodeAt(n);return t}function decodeDataUri(e,t){t=defaultValue(t,"");var i=e[1],r=!!e[2];e=e[3];switch(t){case"":case"text":return decodeDataUriText(r,e);case"arraybuffer":return decodeDataUriArrayBuffer(r,e);case"blob":return t=decodeDataUriArrayBuffer(r,e),new Blob([t],{type:i});case"document":return(new DOMParser).parseFromString(decodeDataUriText(r,e),i);case"json":return JSON.parse(decodeDataUriText(r,e))}}function loadImageElement(e,t,i){var r=new Image;r.onload=function(){i.resolve(r)},r.onerror=function(e){i.reject(e)},t&&(TrustedServers.contains(e)?r.crossOrigin="use-credentials":r.crossOrigin=""),r.src=e}function decodeResponse(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function loadWithHttpRequest(e,t,i,r,n,a,o){var s=__webpack_require__(97).parse(e),l=(e="https:"===s.protocol?__webpack_require__(243):__webpack_require__(135),__webpack_require__(255));n={protocol:s.protocol,hostname:s.hostname,port:s.port,path:s.path,query:s.query,method:i,headers:n};e.request(n).on("response",(function(e){var i;e.statusCode<200||300<=e.statusCode?a.reject(new RequestErrorEvent(e.statusCode,e,e.headers)):(i=[],e.on("data",(function(e){i.push(e)})),e.on("end",(function(){var r=Buffer.concat(i);"gzip"===e.headers["content-encoding"]?l.gunzip(r,(function(e,i){e?a.reject(new RuntimeError("Error decompressing response.")):a.resolve(decodeResponse(i,t))})):a.resolve(decodeResponse(r,t))})))})).on("error",(function(e){a.reject(new RequestErrorEvent)})).end()}Resource.prototype.fetch=function(e){return(e=defaultClone(e,{})).method="GET",this._makeRequest(e)},Resource.fetch=function(e){return new Resource(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.delete=function(e){return(e=defaultClone(e,{})).method="DELETE",this._makeRequest(e)},Resource.delete=function(e){return new Resource(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},Resource.prototype.head=function(e){return(e=defaultClone(e,{})).method="HEAD",this._makeRequest(e)},Resource.head=function(e){return new Resource(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.options=function(e){return(e=defaultClone(e,{})).method="OPTIONS",this._makeRequest(e)},Resource.options=function(e){return new Resource(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.post=function(e,t){return Check.defined("data",e),(t=defaultClone(t,{})).method="POST",t.data=e,this._makeRequest(t)},Resource.post=function(e){return new Resource(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.put=function(e,t){return Check.defined("data",e),(t=defaultClone(t,{})).method="PUT",t.data=e,this._makeRequest(t)},Resource.put=function(e){return new Resource(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.patch=function(e,t){return Check.defined("data",e),(t=defaultClone(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},Resource.patch=function(e){return new Resource(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource._Implementations={},Resource._Implementations.createImage=function(e,t,i,r,n){var a=e.url;Resource.supportsImageBitmapOptions().then((function(o){if(o&&n){o=when.defer();var s=Resource._Implementations.loadWithXhr(a,"blob","GET",void 0,void 0,o,void 0,void 0,void 0);return defined(s)&&defined(s.abort)&&(e.cancelFunction=function(){s.abort()}),o.promise.then((function(e){return defined(e)?Resource.createImageBitmapFromBlob(e,{flipY:r,premultiplyAlpha:!1}):void i.reject(new RuntimeError("Successfully retrieved "+a+" but it contained no content."))})).then(i.resolve)}loadImageElement(a,t,i)})).otherwise(i.reject)},Resource.createImageBitmapFromBlob=function(e,t){return Check.defined("options",t),Check.typeOf.bool("options.flipY",t.flipY),Check.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var noXMLHttpRequest="undefined"==typeof XMLHttpRequest;Resource._Implementations.loadWithXhr=function(e,t,i,r,n,a,o){var s=dataUriRegex$1.exec(e);if(null===s){if(!noXMLHttpRequest){var l=new XMLHttpRequest;if(TrustedServers.contains(e)&&(l.withCredentials=!0),l.open(i,e,!0),defined(o)&&defined(l.overrideMimeType)&&l.overrideMimeType(o),defined(n))for(var c in n)n.hasOwnProperty(c)&&l.setRequestHeader(c,n[c]);defined(t)&&(l.responseType=t);var u=!1;return"string"==typeof e&&(u=0===e.indexOf("file://")||"undefined"!=typeof window&&"file://"===window.location.origin),l.onload=function(){if(!(l.status<200||300<=l.status)||u&&0===l.status){var e=l.response,r=l.responseType;if("HEAD"===i||"OPTIONS"===i){var n=l.getAllResponseHeaders().trim().split(/[\r\n]+/),o={};return n.forEach((function(e){var t=e.split(": ");e=t.shift();o[e]=t.join(": ")})),void a.resolve(o)}if(204===l.status)a.resolve();else if(!defined(e)||defined(t)&&r!==t)if("json"===t&&"string"==typeof e)try{a.resolve(JSON.parse(e))}catch(e){a.reject(e)}else(""===r||"document"===r)&&defined(l.responseXML)&&l.responseXML.hasChildNodes()?a.resolve(l.responseXML):""!==r&&"text"!==r||!defined(l.responseText)?a.reject(new RuntimeError("Invalid XMLHttpRequest response type.")):a.resolve(l.responseText);else a.resolve(e)}else a.reject(new RequestErrorEvent(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){a.reject(new RequestErrorEvent)},l.send(r),l}loadWithHttpRequest(e,t,i,r,n,a)}else a.resolve(decodeDataUri(s,t))},Resource._Implementations.loadAndExecuteScript=function(e,t,i){return loadAndExecuteScript(e).otherwise(i.reject)},Resource._DefaultImplementations={},Resource._DefaultImplementations.createImage=Resource._Implementations.createImage,Resource._DefaultImplementations.loadWithXhr=Resource._Implementations.loadWithXhr,Resource._DefaultImplementations.loadAndExecuteScript=Resource._Implementations.loadAndExecuteScript,Resource.DEFAULT=Object.freeze(new Resource({url:"undefined"==typeof document?"":document.location.href.split("?")[0]}));var cesiumScriptRegex=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/,a$1,baseResource,implementation;function getBaseUrlFromCesiumScript(){for(var e=document.getElementsByTagName("script"),t=0,i=e.length;t<i;++t){var r=e[t].getAttribute("src");if(null!==(r=cesiumScriptRegex.exec(r)))return r[1]}}function tryMakeAbsolute(e){return"undefined"==typeof document?e:(defined(a$1)||(a$1=document.createElement("a")),a$1.href=e,a$1.href=a$1.href,a$1.href)}function getCesiumBaseUrl(){if(defined(baseResource))return baseResource;return(baseResource=new Resource({url:tryMakeAbsolute("./libs/Cesium/resources/")})).appendForwardSlash(),baseResource}function buildModuleUrlFromRequireToUrl(e){return tryMakeAbsolute(__webpack_require__(273).toUrl("../"+e))}function buildModuleUrlFromBaseUrl(e){return getCesiumBaseUrl().getDerivedResource({url:e}).url}function buildModuleUrl(e){return defined(implementation)||(implementation=buildModuleUrlFromBaseUrl),implementation(e)}function Cartesian2(e,t){this.x=defaultValue(e,0),this.y=defaultValue(t,0)}buildModuleUrl._cesiumScriptRegex=cesiumScriptRegex,buildModuleUrl._buildModuleUrlFromBaseUrl=buildModuleUrlFromBaseUrl,buildModuleUrl._clearBaseResource=function(){baseResource=void 0},buildModuleUrl.setBaseUrl=function(e){baseResource=Resource.DEFAULT.getDerivedResource({url:e})},buildModuleUrl.getCesiumBaseUrl=getCesiumBaseUrl,Cartesian2.fromElements=function(e,t,i){return defined(i)?(i.x=e,i.y=t,i):new Cartesian2(e,t)},Cartesian2.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t):new Cartesian2(e.x,e.y)},Cartesian2.fromCartesian3=Cartesian2.clone,Cartesian2.fromCartesian4=Cartesian2.clone,Cartesian2.packedLength=2,Cartesian2.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i]=e.y,t},Cartesian2.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Cartesian2),i.x=e[t++],i.y=e[t],i},Cartesian2.packArray=function(e,t){var i=e.length,r=2*i;if(defined(t)){if(!Array.isArray(t)&&t.length!==r)throw new DeveloperError("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(var n=0;n<i;++n)Cartesian2.pack(e[n],t,2*n);return t},Cartesian2.unpackArray=function(e,t){var i=e.length;defined(t)?t.length=i/2:t=new Array(i/2);for(var r=0;r<i;r+=2){var n=r/2;t[n]=Cartesian2.unpack(e,r,t[n])}return t},Cartesian2.fromArray=Cartesian2.unpack,Cartesian2.maximumComponent=function(e){return Math.max(e.x,e.y)},Cartesian2.minimumComponent=function(e){return Math.min(e.x,e.y)},Cartesian2.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},Cartesian2.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},Cartesian2.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},Cartesian2.magnitude=function(e){return Math.sqrt(Cartesian2.magnitudeSquared(e))};var distanceScratch$2=new Cartesian2;Cartesian2.distance=function(e,t){return Cartesian2.subtract(e,t,distanceScratch$2),Cartesian2.magnitude(distanceScratch$2)},Cartesian2.distanceSquared=function(e,t){return Cartesian2.subtract(e,t,distanceScratch$2),Cartesian2.magnitudeSquared(distanceScratch$2)},Cartesian2.normalize=function(e,t){var i=Cartesian2.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t},Cartesian2.dot=function(e,t){return e.x*t.x+e.y*t.y},Cartesian2.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i},Cartesian2.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i},Cartesian2.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i},Cartesian2.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i},Cartesian2.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i},Cartesian2.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i},Cartesian2.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t},Cartesian2.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var lerpScratch$2=new Cartesian2;Cartesian2.lerp=function(e,t,i,r){return Cartesian2.multiplyByScalar(t,i,lerpScratch$2),r=Cartesian2.multiplyByScalar(e,1-i,r),Cartesian2.add(lerpScratch$2,r,r)};var angleBetweenScratch$1=new Cartesian2,angleBetweenScratch2$1=new Cartesian2;Cartesian2.angleBetween=function(e,t){return Cartesian2.normalize(e,angleBetweenScratch$1),Cartesian2.normalize(t,angleBetweenScratch2$1),CesiumMath.acosClamped(Cartesian2.dot(angleBetweenScratch$1,angleBetweenScratch2$1))};var mostOrthogonalAxisScratch$2=new Cartesian2;function GeographicTilingScheme(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._rectangle=defaultValue(e.rectangle,Rectangle.MAX_VALUE),this._projection=new GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=defaultValue(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=defaultValue(e.numberOfLevelZeroTilesY,1)}Cartesian2.mostOrthogonalAxis=function(e,t){return e=Cartesian2.normalize(e,mostOrthogonalAxisScratch$2),Cartesian2.abs(e,e),e.x<=e.y?Cartesian2.clone(Cartesian2.UNIT_X,t):Cartesian2.clone(Cartesian2.UNIT_Y,t)},Cartesian2.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y},Cartesian2.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},Cartesian2.equalsEpsilon=function(e,t,i,r){return e===t||defined(e)&&defined(t)&&CesiumMath.equalsEpsilon(e.x,t.x,i,r)&&CesiumMath.equalsEpsilon(e.y,t.y,i,r)},Cartesian2.ZERO=Object.freeze(new Cartesian2(0,0)),Cartesian2.UNIT_X=Object.freeze(new Cartesian2(1,0)),Cartesian2.UNIT_Y=Object.freeze(new Cartesian2(0,1)),Cartesian2.prototype.clone=function(e){return Cartesian2.clone(this,e)},Cartesian2.prototype.equals=function(e){return Cartesian2.equals(this,e)},Cartesian2.prototype.equalsEpsilon=function(e,t,i){return Cartesian2.equalsEpsilon(this,e,t,i)},Cartesian2.prototype.toString=function(){return"("+this.x+", "+this.y+")"},Object.defineProperties(GeographicTilingScheme.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),GeographicTilingScheme.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},GeographicTilingScheme.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},GeographicTilingScheme.prototype.rectangleToNativeRectangle=function(e,t){var i=CesiumMath.toDegrees(e.west),r=CesiumMath.toDegrees(e.south),n=CesiumMath.toDegrees(e.east);e=CesiumMath.toDegrees(e.north);return defined(t)?(t.west=i,t.south=r,t.east=n,t.north=e,t):new Rectangle(i,r,n,e)},GeographicTilingScheme.prototype.tileXYToNativeRectangle=function(e,t,i,r){return(r=this.tileXYToRectangle(e,t,i,r)).west=CesiumMath.toDegrees(r.west),r.south=CesiumMath.toDegrees(r.south),r.east=CesiumMath.toDegrees(r.east),r.north=CesiumMath.toDegrees(r.north),r},GeographicTilingScheme.prototype.tileXYToRectangle=function(e,t,i,r){var n=this._rectangle,a=this.getNumberOfXTilesAtLevel(i),o=this.getNumberOfYTilesAtLevel(i);a=e*(i=n.width/a)+n.west,e=(e+1)*i+n.west,i=n.height/o,o=n.north-t*i,i=n.north-(t+1)*i;return defined(r)||(r=new Rectangle(a,i,e,o)),r.west=a,r.south=i,r.east=e,r.north=o,r},GeographicTilingScheme.prototype.positionToTileXY=function(e,t,i){var r=this._rectangle;if(Rectangle.contains(r,e)){var n=this.getNumberOfXTilesAtLevel(t),a=this.getNumberOfYTilesAtLevel(t),o=r.width/n,s=r.height/a;t=e.longitude;return r.east<r.west&&(t+=CesiumMath.TWO_PI),n<=(o=(t-r.west)/o|0)&&(o=n-1),a<=(s=(r.north-e.latitude)/s|0)&&(s=a-1),defined(i)?(i.x=o,i.y=s,i):new Cartesian2(o,s)}};var scratchDiagonalCartesianNE=new Cartesian3,scratchDiagonalCartesianSW=new Cartesian3,scratchDiagonalCartographic=new Cartographic,scratchCenterCartesian=new Cartesian3,scratchSurfaceCartesian=new Cartesian3,scratchBoundingSphere=new BoundingSphere,tilingScheme=new GeographicTilingScheme,scratchCorners=[new Cartographic,new Cartographic,new Cartographic,new Cartographic],scratchTileXY=new Cartesian2,ApproximateTerrainHeights={};function getTileXYLevel(e){Cartographic.fromRadians(e.east,e.north,0,scratchCorners[0]),Cartographic.fromRadians(e.west,e.north,0,scratchCorners[1]),Cartographic.fromRadians(e.east,e.south,0,scratchCorners[2]),Cartographic.fromRadians(e.west,e.south,0,scratchCorners[3]);for(var t=0,i=0,r=0,n=0,a=ApproximateTerrainHeights._terrainHeightsMaxLevel,o=0;o<=a;++o){for(var s=!1,l=0;l<4;++l){var c=scratchCorners[l];if(tilingScheme.positionToTileXY(c,o,scratchTileXY),0===l)r=scratchTileXY.x,n=scratchTileXY.y;else if(r!==scratchTileXY.x||n!==scratchTileXY.y){s=!0;break}}if(s)break;t=r,i=n}if(0!==o)return{x:t,y:i,level:a<o?a:o-1}}ApproximateTerrainHeights.initialize=function(){var e=ApproximateTerrainHeights._initPromise;return defined(e)?e:(e=Resource.fetchJson(buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){ApproximateTerrainHeights._terrainHeights=e})),ApproximateTerrainHeights._initPromise=e)},ApproximateTerrainHeights.getMinimumMaximumHeights=function(e,t){t=defaultValue(t,Ellipsoid.WGS84);var i=getTileXYLevel(e),r=ApproximateTerrainHeights._defaultMinTerrainHeight,n=ApproximateTerrainHeights._defaultMaxTerrainHeight;return defined(i)&&(i=i.level+"-"+i.x+"-"+i.y,defined(i=ApproximateTerrainHeights._terrainHeights[i])&&(r=i[0],n=i[1]),t.cartographicToCartesian(Rectangle.northeast(e,scratchDiagonalCartographic),scratchDiagonalCartesianNE),t.cartographicToCartesian(Rectangle.southwest(e,scratchDiagonalCartographic),scratchDiagonalCartesianSW),Cartesian3.midpoint(scratchDiagonalCartesianSW,scratchDiagonalCartesianNE,scratchCenterCartesian),r=defined(t=t.scaleToGeodeticSurface(scratchCenterCartesian,scratchSurfaceCartesian))?(t=Cartesian3.distance(scratchCenterCartesian,t),Math.min(r,-t)):ApproximateTerrainHeights._defaultMinTerrainHeight),{minimumTerrainHeight:r=Math.max(ApproximateTerrainHeights._defaultMinTerrainHeight,r),maximumTerrainHeight:n}},ApproximateTerrainHeights.getBoundingSphere=function(e,t){t=defaultValue(t,Ellipsoid.WGS84);var i=getTileXYLevel(e),r=ApproximateTerrainHeights._defaultMaxTerrainHeight;defined(i)&&(n=i.level+"-"+i.x+"-"+i.y,defined(n=ApproximateTerrainHeights._terrainHeights[n])&&(r=n[1]));var n=BoundingSphere.fromRectangle3D(e,t,0);return BoundingSphere.fromRectangle3D(e,t,r,scratchBoundingSphere),BoundingSphere.union(n,scratchBoundingSphere,n)},ApproximateTerrainHeights._terrainHeightsMaxLevel=6,ApproximateTerrainHeights._defaultMaxTerrainHeight=9e3,ApproximateTerrainHeights._defaultMinTerrainHeight=-1e5,ApproximateTerrainHeights._terrainHeights=void 0,ApproximateTerrainHeights._initPromise=void 0,Object.defineProperties(ApproximateTerrainHeights,{initialized:{get:function(){return defined(ApproximateTerrainHeights._terrainHeights)}}});var html=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],svg=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],svgFilters=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],mathMl=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],text=["#text"],html$1=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],svg$1=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],mathMl$1=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],xml=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function addToSet(e,t){for(var i=t.length;i--;)"string"==typeof t[i]&&(t[i]=t[i].toLowerCase()),e[t[i]]=!0;return e}function clone$1(e){var t={},i=void 0;for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}var MUSTACHE_EXPR=/\{\{[\s\S]*|[\s\S]*\}\}/gm,ERB_EXPR=/<%[\s\S]*|[\s\S]*%>/gm,DATA_ATTR=/^data-[\-\w.\u00B7-\uFFFF]/,ARIA_ATTR=/^aria-[\-\w]+$/,IS_ALLOWED_URI=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,IS_SCRIPT_OR_DATA=/^(?:\w+script|data):/i,ATTR_WHITESPACE=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var getGlobal=function(){return"undefined"==typeof window?null:window};function createDOMPurify(){function e(e){return createDOMPurify(e)}var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:getGlobal();if(e.version="1.0.8",e.removed=[],!t||!t.document||9!==t.document.nodeType)return e.isSupported=!1,e;var i=t.document,r=!1,n=!1,a=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,l=t.Node,c=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.Text,p=t.Comment,f=t.DOMParser;"function"!=typeof s||(s=a.createElement("template")).content&&s.content.ownerDocument&&(a=s.content.ownerDocument);var m=a.implementation,g=a.createNodeIterator,y=a.getElementsByTagName,_=a.createDocumentFragment,v=i.importNode,C={};function x(e){"object"!==(void 0===e?"undefined":_typeof(e))&&(e={}),O="ALLOWED_TAGS"in e?addToSet({},e.ALLOWED_TAGS):L,N="ALLOWED_ATTR"in e?addToSet({},e.ALLOWED_ATTR):F,B="FORBID_TAGS"in e?addToSet({},e.FORBID_TAGS):{},V="FORBID_ATTR"in e?addToSet({},e.FORBID_ATTR):{},E="USE_PROFILES"in e&&e.USE_PROFILES,k=!1!==e.ALLOW_ARIA_ATTR,z=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,U=e.SAFE_FOR_JQUERY||!1,$=e.SAFE_FOR_TEMPLATES||!1,H=e.WHOLE_DOCUMENT||!1,q=e.RETURN_DOM||!1,Y=e.RETURN_DOM_FRAGMENT||!1,X=e.RETURN_DOM_IMPORT||!1,j=e.FORCE_BODY||!1,Q=!1!==e.SANITIZE_DOM,Z=!1!==e.KEEP_CONTENT,J=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||R,$&&(z=!1),Y&&(q=!0),E&&(O=addToSet({},[].concat(_toConsumableArray(text))),N=[],!0===E.html&&(addToSet(O,html),addToSet(N,html$1)),!0===E.svg&&(addToSet(O,svg),addToSet(N,svg$1),addToSet(N,xml)),!0===E.svgFilters&&(addToSet(O,svgFilters),addToSet(N,svg$1),addToSet(N,xml)),!0===E.mathMl&&(addToSet(O,mathMl),addToSet(N,mathMl$1),addToSet(N,xml))),e.ADD_TAGS&&(O===L&&(O=clone$1(O)),addToSet(O,e.ADD_TAGS)),e.ADD_ATTR&&(N===F&&(N=clone$1(N)),addToSet(N,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&addToSet(te,e.ADD_URI_SAFE_ATTR),Z&&(O["#text"]=!0),H&&addToSet(O,["html","head","body"]),O.table&&addToSet(O,["tbody"]),Object&&"freeze"in Object&&Object.freeze(e),ie=e}function b(t){e.removed.push({element:t});try{t.parentNode.removeChild(t)}catch(e){t.outerHTML=""}}function S(t,i){try{e.removed.push({attribute:i.getAttributeNode(t),from:i})}catch(t){e.removed.push({attribute:null,from:i})}i.removeAttribute(t)}function T(e){var t,i=void 0,o=void 0;if(j?e="<remove></remove>"+e:(o=(t=e.match(/^[\s]+/))&&t[0])&&(e=e.slice(o.length)),r)try{i=(new f).parseFromString(e,"text/html")}catch(e){}return n&&addToSet(B,["title"]),i&&i.documentElement||((t=(i=m.createHTMLDocument("")).body).parentNode.removeChild(t.parentNode.firstElementChild),t.outerHTML=e),o&&i.body.insertBefore(a.createTextNode(o),i.body.childNodes[0]||null),y.call(i,H?"html":"body")[0]}e.isSupported=m&&void 0!==m.createHTMLDocument&&9!==a.documentMode;var E,w=MUSTACHE_EXPR,A=ERB_EXPR,P=DATA_ATTR,D=ARIA_ATTR,M=IS_SCRIPT_OR_DATA,I=ATTR_WHITESPACE,R=IS_ALLOWED_URI,O=null,L=addToSet({},[].concat(_toConsumableArray(html),_toConsumableArray(svg),_toConsumableArray(svgFilters),_toConsumableArray(mathMl),_toConsumableArray(text))),N=null,F=addToSet({},[].concat(_toConsumableArray(html$1),_toConsumableArray(svg$1),_toConsumableArray(mathMl$1),_toConsumableArray(xml))),B=null,V=null,k=!0,z=!0,G=!1,U=!1,$=!1,H=!1,W=!1,j=!1,q=!1,Y=!1,X=!1,Q=!0,Z=!0,J=!1,K=addToSet({},["audio","head","math","script","style","template","svg","video"]),ee=addToSet({},["audio","video","img","source","image"]),te=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ie=null,re=a.createElement("form");function ne(e){return g.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,(function(){return c.FILTER_ACCEPT}),!1)}function ae(e){return"object"===(void 0===l?"undefined":_typeof(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":_typeof(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}function oe(t,i,r){C[t]&&C[t].forEach((function(t){t.call(e,i,r,ie)}))}function se(t){var i=void 0;if(oe("beforeSanitizeElements",t,null),!((r=t)instanceof h||r instanceof p||"string"==typeof r.nodeName&&"string"==typeof r.textContent&&"function"==typeof r.removeChild&&r.attributes instanceof d&&"function"==typeof r.removeAttribute&&"function"==typeof r.setAttribute))return b(t),1;var r=t.nodeName.toLowerCase();if(oe("uponSanitizeElement",t,{tagName:r,allowedTags:O}),O[r]&&!B[r])return!U||t.firstElementChild||t.content&&t.content.firstElementChild||!/</g.test(t.textContent)||(e.removed.push({element:t.cloneNode()}),t.innerHTML?t.innerHTML=t.innerHTML.replace(/</g,"&lt;"):t.innerHTML=t.textContent.replace(/</g,"&lt;")),$&&3===t.nodeType&&(i=(i=(i=t.textContent).replace(w," ")).replace(A," "),t.textContent!==i&&(e.removed.push({element:t.cloneNode()}),t.textContent=i)),oe("afterSanitizeElements",t,null),0;if(Z&&!K[r]&&"function"==typeof t.insertAdjacentHTML)try{t.insertAdjacentHTML("AfterEnd",t.innerHTML)}catch(t){}return b(t),1}function le(e,t,i){if(Q&&("id"===t||"name"===t)&&(i in a||i in re))return!1;if($&&(i=(i=i.replace(w," ")).replace(A," ")),!(z&&P.test(t)||k&&D.test(t))){if(!N[t]||V[t])return!1;if(!te[t]&&!R.test(i.replace(I,""))&&("src"!==t&&"xlink:href"!==t||"script"===e||0!==i.indexOf("data:")||!ee[e])&&(!G||M.test(i.replace(I,"")))&&i)return!1}return!0}function ce(t){var i=void 0,r=void 0;oe("beforeSanitizeAttributes",t,null);var n=t.attributes;if(n){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};for(r=n.length;r--;){var o=(i=n[r]).name,s=i.namespaceURI,l=i.value.trim(),c=o.toLowerCase();if(a.attrName=c,a.attrValue=l,a.keepAttr=!0,oe("uponSanitizeAttribute",t,a),l=a.attrValue,"name"===c&&"IMG"===t.nodeName&&n.id)u=n.id,n=Array.prototype.slice.apply(n),S("id",t),S(o,t),n.indexOf(u)>r&&t.setAttribute("id",u.value);else{if("INPUT"===t.nodeName&&"type"===c&&"file"===l&&(N[c]||!V[c]))continue;"id"===o&&t.setAttribute(o,""),S(o,t)}if(a.keepAttr){var u=t.nodeName.toLowerCase();if(le(u,c,l))try{s?t.setAttributeNS(s,o,l):t.setAttribute(o,l),e.removed.pop()}catch(t){}}}oe("afterSanitizeAttributes",t,null)}}function ue(e){var t,i=ne(e);for(oe("beforeSanitizeShadowDOM",e,null);t=i.nextNode();)oe("uponSanitizeShadowNode",t,null),se(t)||(t.content instanceof o&&ue(t.content),ce(t));oe("afterSanitizeShadowDOM",e,null)}return e.isSupported&&(function(){try{T('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">').querySelector("svg img")&&(r=!0)}catch(e){}}(),function(){try{T("<x/><title>&lt;/title&gt;&lt;img&gt;").querySelector("title").textContent.match(/<\/title/)&&(n=!0)}catch(e){}}()),e.sanitize=function(r,n){var a,s,c=void 0,u=void 0,d=void 0;if("string"!=typeof(r=r||"\x3c!--\x3e")&&!ae(r)){if("function"!=typeof r.toString)throw new TypeError("toString is not a function");if("string"!=typeof(r=r.toString()))throw new TypeError("dirty is not a string, aborting")}if(!e.isSupported){if("object"===_typeof(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof r)return t.toStaticHTML(r);if(ae(r))return t.toStaticHTML(r.outerHTML)}return r}if(W||x(n),e.removed=[],!J)if(r instanceof l)1===(a=(c=T("\x3c!--\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===a.nodeName?c=a:c.appendChild(a);else{if(!q&&!H&&-1===r.indexOf("<"))return r;if(!(c=T(r)))return q?null:""}c&&j&&b(c.firstChild);for(var h=ne(J?r:c);s=h.nextNode();)3===s.nodeType&&s===u||se(s)||(s.content instanceof o&&ue(s.content),ce(s),u=s);if(J)return r;if(q){if(Y)for(d=_.call(c.ownerDocument);c.firstChild;)d.appendChild(c.firstChild);else d=c;return X&&(d=v.call(i,d,!0)),d}return H?c.outerHTML:c.innerHTML},e.setConfig=function(e){x(e),W=!0},e.clearConfig=function(){ie=null,W=!1},e.isValidAttribute=function(e,t,i){return ie||x({}),le(e=e.toLowerCase(),t=t.toLowerCase(),i)},e.addHook=function(e,t){"function"==typeof t&&(C[e]=C[e]||[],C[e].push(t))},e.removeHook=function(e){C[e]&&C[e].pop()},e.removeHooks=function(e){C[e]&&(C[e]=[])},e.removeAllHooks=function(){C={}},e}var purify=createDOMPurify(),nextCreditId=0,creditToId={};function Credit(e,t){var i,r=e;defined(creditToId[r])?i=creditToId[r]:(i=nextCreditId++,creditToId[r]=i),t=defaultValue(t,!1),this._id=i,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Credit.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen}},element:{get:function(){if(!defined(this._element)){var e=purify.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;for(var i=t.querySelectorAll("a"),r=0;r<i.length;r++)i[r].setAttribute("target","_blank");this._element=t}return this._element}}}),Credit.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e._id===t._id},Credit.prototype.equals=function(e){return Credit.equals(this,e)},Credit.getIonCredit=function(e){var t=defined(e.collapsible)&&!e.collapsible;return(t=new Credit(e.html,t))._isIon=-1!==t.html.indexOf("ion-credit.png"),t},Credit.clone=function(e){if(defined(e))return new Credit(e.html,e.showOnScreen)};var HeightmapEncoding={NONE:0,LERC:1},HeightmapEncoding$1=Object.freeze(HeightmapEncoding);function AxisAlignedBoundingBox(e,t,i){this.minimum=Cartesian3.clone(defaultValue(e,Cartesian3.ZERO)),this.maximum=Cartesian3.clone(defaultValue(t,Cartesian3.ZERO)),i=defined(i)?Cartesian3.clone(i):Cartesian3.midpoint(this.minimum,this.maximum,new Cartesian3),this.center=i}AxisAlignedBoundingBox.fromPoints=function(e,t){if(defined(t)||(t=new AxisAlignedBoundingBox),!defined(e)||0===e.length)return t.minimum=Cartesian3.clone(Cartesian3.ZERO,t.minimum),t.maximum=Cartesian3.clone(Cartesian3.ZERO,t.maximum),t.center=Cartesian3.clone(Cartesian3.ZERO,t.center),t;for(var i=e[0].x,r=e[0].y,n=e[0].z,a=e[0].x,o=e[0].y,s=e[0].z,l=e.length,c=1;c<l;c++){var u=(h=e[c]).x,d=h.y,h=h.z;i=Math.min(u,i),a=Math.max(u,a),r=Math.min(d,r),o=Math.max(d,o),n=Math.min(h,n),s=Math.max(h,s)}var p=t.minimum;p.x=i,p.y=r,p.z=n;var f=t.maximum;return f.x=a,f.y=o,f.z=s,t.center=Cartesian3.midpoint(p,f,t.center),t},AxisAlignedBoundingBox.clone=function(e,t){if(defined(e))return defined(t)?(t.minimum=Cartesian3.clone(e.minimum,t.minimum),t.maximum=Cartesian3.clone(e.maximum,t.maximum),t.center=Cartesian3.clone(e.center,t.center),t):new AxisAlignedBoundingBox(e.minimum,e.maximum,e.center)},AxisAlignedBoundingBox.equals=function(e,t){return e===t||defined(e)&&defined(t)&&Cartesian3.equals(e.center,t.center)&&Cartesian3.equals(e.minimum,t.minimum)&&Cartesian3.equals(e.maximum,t.maximum)};var intersectScratch=new Cartesian3;function EllipsoidalOccluder(e,t){this._ellipsoid=e,this._cameraPosition=new Cartesian3,this._cameraPositionInScaledSpace=new Cartesian3,this._distanceToLimbInScaledSpaceSquared=0,defined(t)&&(this.cameraPosition=t)}AxisAlignedBoundingBox.intersectPlane=function(e,t){intersectScratch=Cartesian3.subtract(e.maximum,e.minimum,intersectScratch);var i=Cartesian3.multiplyByScalar(intersectScratch,.5,intersectScratch),r=t.normal;i=i.x*Math.abs(r.x)+i.y*Math.abs(r.y)+i.z*Math.abs(r.z);return 0<(t=Cartesian3.dot(e.center,r)+t.distance)-i?Intersect$1.INSIDE:t+i<0?Intersect$1.OUTSIDE:Intersect$1.INTERSECTING},AxisAlignedBoundingBox.prototype.clone=function(e){return AxisAlignedBoundingBox.clone(this,e)},AxisAlignedBoundingBox.prototype.intersectPlane=function(e){return AxisAlignedBoundingBox.intersectPlane(this,e)},AxisAlignedBoundingBox.prototype.equals=function(e){return AxisAlignedBoundingBox.equals(this,e)},Object.defineProperties(EllipsoidalOccluder.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=Cartesian3.magnitudeSquared(t)-1;Cartesian3.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var scratchCartesian=new Cartesian3;EllipsoidalOccluder.prototype.isPointVisible=function(e){return isScaledSpacePointVisible(this._ellipsoid.transformPositionToScaledSpace(e,scratchCartesian),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},EllipsoidalOccluder.prototype.isScaledSpacePointVisible=function(e){return isScaledSpacePointVisible(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var scratchCameraPositionInScaledSpaceShrunk=new Cartesian3;EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var i,r=this._ellipsoid;t=defined(t)&&t<0&&r.minimumRadius>-t?((i=scratchCameraPositionInScaledSpaceShrunk).x=this._cameraPosition.x/(r.radii.x+t),i.y=this._cameraPosition.y/(r.radii.y+t),i.z=this._cameraPosition.z/(r.radii.z+t),i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared);return isScaledSpacePointVisible(e,i,t)},EllipsoidalOccluder.prototype.computeHorizonCullingPoint=function(e,t,i){return computeHorizonCullingPointFromPositions(this._ellipsoid,e,t,i)};var scratchEllipsoidShrunk=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE);EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,i,r){return computeHorizonCullingPointFromPositions(getPossiblyShrunkEllipsoid(this._ellipsoid,i,scratchEllipsoidShrunk),e,t,r)},EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices=function(e,t,i,r,n){return computeHorizonCullingPointFromVertices(this._ellipsoid,e,t,i,r,n)},EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,i,r,n,a){return computeHorizonCullingPointFromVertices(getPossiblyShrunkEllipsoid(this._ellipsoid,n,scratchEllipsoidShrunk),e,t,i,r,a)};var subsampleScratch=[];EllipsoidalOccluder.prototype.computeHorizonCullingPointFromRectangle=function(e,t,i){var r=Rectangle.subsample(e,t,0,subsampleScratch);e=BoundingSphere.fromPoints(r);if(!(Cartesian3.magnitude(e.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(e.center,r,i)};var scratchEllipsoidShrunkRadii=new Cartesian3;function getPossiblyShrunkEllipsoid(e,t,i){return defined(t)&&t<0&&e.minimumRadius>-t&&(t=Cartesian3.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,scratchEllipsoidShrunkRadii),e=Ellipsoid.fromCartesian3(t,i)),e}function computeHorizonCullingPointFromPositions(e,t,i,r){defined(r)||(r=new Cartesian3);for(var n=computeScaledSpaceDirectionToPoint(e,t),a=0,o=0,s=i.length;o<s;++o){var l=computeMagnitude(e,i[o],n);if(l<0)return;a=Math.max(a,l)}return magnitudeToPoint(n,a,r)}var positionScratch=new Cartesian3;function computeHorizonCullingPointFromVertices(e,t,i,r,n,a){defined(a)||(a=new Cartesian3),r=defaultValue(r,3),n=defaultValue(n,Cartesian3.ZERO);for(var o=computeScaledSpaceDirectionToPoint(e,t),s=0,l=0,c=i.length;l<c;l+=r){positionScratch.x=i[l]+n.x,positionScratch.y=i[l+1]+n.y,positionScratch.z=i[l+2]+n.z;var u=computeMagnitude(e,positionScratch,o);if(u<0)return;s=Math.max(s,u)}return magnitudeToPoint(o,s,a)}function isScaledSpacePointVisible(e,t,i){return e=Cartesian3.subtract(e,t,scratchCartesian),t=-Cartesian3.dot(e,t),!(i<0?0<t:i<t&&t*t/Cartesian3.magnitudeSquared(e)>i)}var scaledSpaceScratch=new Cartesian3,directionScratch=new Cartesian3;function computeMagnitude(e,t,i){var r=e.transformPositionToScaledSpace(t,scaledSpaceScratch);e=Cartesian3.magnitudeSquared(r),t=Math.sqrt(e),r=Cartesian3.divideByScalar(r,t,directionScratch),e=Math.max(1,e),t=1/(t=Math.max(1,t));return 1/(Cartesian3.dot(r,i)*t-Cartesian3.magnitude(Cartesian3.cross(r,i,r))*(Math.sqrt(e-1)*t))}function magnitudeToPoint(e,t,i){if(!(t<=0||t===1/0||t!=t))return Cartesian3.multiplyByScalar(e,t,i)}var directionToPointScratch=new Cartesian3;function computeScaledSpaceDirectionToPoint(e,t){return Cartesian3.equals(t,Cartesian3.ZERO)?t:(e.transformPositionToScaledSpace(t,directionToPointScratch),Cartesian3.normalize(directionToPointScratch,directionToPointScratch))}var QuadraticRealPolynomial={};function addWithCancellationCheck(e,t,i){var r=e+t;return CesiumMath.sign(e)!==CesiumMath.sign(t)&&Math.abs(r/Math.max(Math.abs(e),Math.abs(t)))<i?0:r}QuadraticRealPolynomial.computeDiscriminant=function(e,t,i){return t*t-4*e*i},QuadraticRealPolynomial.computeRealRoots=function(e,t,i){if(0===e)return 0===t?[]:[-i/t];if(0===t){if(0===i)return[0,0];var r=Math.abs(i),n=Math.abs(e);return r<n&&r/n<CesiumMath.EPSILON14?[0,0]:n<r&&n/r<CesiumMath.EPSILON14||(n=-i/e)<0?[]:[-(r=Math.sqrt(n)),r]}return 0===i?(n=-t/e)<0?[n,0]:[0,n]:(n=addWithCancellationCheck(t*t,-4*e*i,CesiumMath.EPSILON14))<0?[]:(n=-.5*addWithCancellationCheck(t,CesiumMath.sign(t)*Math.sqrt(n),CesiumMath.EPSILON14),0<t?[n/e,i/n]:[i/n,n/e])};var CubicRealPolynomial={};function computeRealRoots(e,t,i,r){var n=t/3,a=i/3,o=(m=e)*a,s=n*(u=r);if((i=4*(f=m*a-(p=n*n))*(t=n*u-(h=a*a))-(e=m*u-n*a)*e)<0){r=o*h<=p*s?-2*n*(d=f)+(l=m)*e:-(l=u)*e+2*a*(d=t);var l=(l=(g=(c=-(r<0?-1:1)*Math.abs(l)*Math.sqrt(-i))-r)/2)<0?-Math.pow(-l,1/3):Math.pow(l,1/3),c=g===c?-l:-d/l;c=d<=0?l+c:-r/(l*l+c*c+d);return o*h<=p*s?[(c-n)/m]:[-u/(c+a)]}var u,d=f,h=(o=-2*n*f+m*e,t),p=-u*e+2*a*t,f=(s=Math.sqrt(i),Math.sqrt(3)/2),m=(e=Math.abs(Math.atan2(m*s,-o)/3),(o=2*n<(g=(c=2*Math.sqrt(-d))*(t=Math.cos(e)))+(i=c*(-t/2-f*Math.sin(e)))?g-n:i-n)/(d=m)),g=(e=Math.abs(Math.atan2(u*s,-p)/3),(u=-u)/(e=(g=(c=2*Math.sqrt(-h))*(t=Math.cos(e)))+(i=c*(-t/2-f*Math.sin(e)))<2*a?g+a:i+a));return m<=(e=(a*(i=-o*e-d*u)-n*(o*u))/(-n*i+a*(d*e)))?m<=g?e<=g?[m,e,g]:[m,g,e]:[g,m,e]:m<=g?[e,m,g]:e<=g?[e,g,m]:[g,e,m]}CubicRealPolynomial.computeDiscriminant=function(e,t,i,r){var n=t*t,a=i*i;return 18*e*t*i*r+n*a-e*e*27*(r*r)-4*(e*a*i+n*t*r)},CubicRealPolynomial.computeRealRoots=function(e,t,i,r){var n;if(0===e)return QuadraticRealPolynomial.computeRealRoots(t,i,r);if(0!==t)return 0===i?0===r?(a=-t/e)<0?[a,0,0]:[0,0,a]:computeRealRoots(e,t,0,r):0===r?0===(n=QuadraticRealPolynomial.computeRealRoots(e,t,i)).length?[0]:n[1]<=0?[n[0],n[1],0]:0<=n[0]?[0,n[0],n[1]]:[n[0],0,n[1]]:computeRealRoots(e,t,i,r);if(0!==i)return 0===r?0===(n=QuadraticRealPolynomial.computeRealRoots(e,0,i)).Length?[0]:[n[0],0,n[1]]:computeRealRoots(e,0,i,r);if(0===r)return[0,0,0];var a=(a=-r/e)<0?-Math.pow(-a,1/3):Math.pow(a,1/3);return[a,a,a]};var QuarticRealPolynomial={};function original(e,t,i,r){var n=e*e,a=t-3*n/8,o=i-t*e/2+n*e/8;r=r-i*e/4+t*n/16-3*n*n/256;if(0<(i=CubicRealPolynomial.computeRealRoots(1,2*a,a*a-4*r,-o*o)).length){if(t=-e/4,n=i[i.length-1],Math.abs(n)<CesiumMath.EPSILON14){if(2===(e=QuadraticRealPolynomial.computeRealRoots(1,a,r)).length){i=e[0];var s=e[1];if(0<=i&&0<=s)return r=Math.sqrt(i),[t-(e=Math.sqrt(s)),t-r,t+r,t+e];if(0<=i&&s<0)return[t-(l=Math.sqrt(i)),t+l];if(i<0&&0<=s)return[t-(l=Math.sqrt(s)),t+l]}return[]}if(0<n){var l=(a+n-o/(s=Math.sqrt(n)))/2;o=(a+n+o/s)/2,l=QuadraticRealPolynomial.computeRealRoots(1,s,l),o=QuadraticRealPolynomial.computeRealRoots(1,-s,o);return 0!==l.length?(l[0]+=t,l[1]+=t,0!==o.length?(o[0]+=t,o[1]+=t,l[1]<=o[0]?[l[0],l[1],o[0],o[1]]:o[1]<=l[0]?[o[0],o[1],l[0],l[1]]:l[0]>=o[0]&&l[1]<=o[1]?[o[0],l[0],l[1],o[1]]:o[0]>=l[0]&&o[1]<=l[1]?[l[0],o[0],o[1],l[1]]:l[0]>o[0]&&l[0]<o[1]?[o[0],l[0],o[1],l[1]]:[l[0],o[0],l[1],o[1]]):l):0!==o.length?(o[0]+=t,o[1]+=t,o):[]}}return[]}function neumark(e,t,i,r){var n=-2*t,a=i*e+t*t-4*r,o=(p=e*e)*r-i*t*e+i*i;if(0<(h=CubicRealPolynomial.computeRealRoots(1,n,a,o)).length){var s,l,c,u,d=h[0],h=(o=e/2,(n=t-d)/2),p=(t=(a=n*n)-4*r,n=a+4*Math.abs(r),a=p-4*d,p+4*Math.abs(d));l=d<0||t*p<a*n?(s=(a=Math.sqrt(a))/2,0===a?0:(e*h-i)/a):(s=0===(l=Math.sqrt(t))?0:(e*h-i)/l,l/2),0==o&&0===s?u=c=0:CesiumMath.sign(o)===CesiumMath.sign(s)?u=d/(c=o+s):c=d/(u=o-s),0==h&&0===l?m=f=0:CesiumMath.sign(h)===CesiumMath.sign(l)?m=r/(f=h+l):f=r/(m=h-l);var f=QuadraticRealPolynomial.computeRealRoots(1,c,f),m=QuadraticRealPolynomial.computeRealRoots(1,u,m);if(0!==f.length)return 0!==m.length?f[1]<=m[0]?[f[0],f[1],m[0],m[1]]:m[1]<=f[0]?[m[0],m[1],f[0],f[1]]:f[0]>=m[0]&&f[1]<=m[1]?[m[0],f[0],f[1],m[1]]:m[0]>=f[0]&&m[1]<=f[1]?[f[0],m[0],m[1],f[1]]:f[0]>m[0]&&f[0]<m[1]?[m[0],f[0],m[1],f[1]]:[f[0],m[0],f[1],m[1]]:f;if(0!==m.length)return m}return[]}function Ray(e,t){t=Cartesian3.clone(defaultValue(t,Cartesian3.ZERO)),Cartesian3.equals(t,Cartesian3.ZERO)||Cartesian3.normalize(t,t),this.origin=Cartesian3.clone(defaultValue(e,Cartesian3.ZERO)),this.direction=t}QuarticRealPolynomial.computeDiscriminant=function(e,t,i,r,n){var a=e*e,o=t*t,s=o*t,l=i*i,c=l*i,u=r*r,d=u*r,h=n*n;return o*l*u-4*s*d-4*e*c*u+18*e*t*i*d-27*a*u*u+a*e*256*(h*n)+n*(18*s*i*r-4*o*c+16*e*l*l-80*e*t*l*r-6*e*o*u+144*a*i*u)+h*(144*e*o*i-27*o*o-128*a*l-192*a*t*r)},QuarticRealPolynomial.computeRealRoots=function(e,t,i,r,n){if(Math.abs(e)<CesiumMath.EPSILON15)return CubicRealPolynomial.computeRealRoots(t,i,r,n);switch(i/=e,r/=e,n/=e,e=(t/=e)<0?1:0,e+=i<0?e+1:e,e+=r<0?e+1:e,e+=n<0?e+1:e){case 0:return original(t,i,r,n);case 1:case 2:return neumark(t,i,r,n);case 3:case 4:return original(t,i,r,n);case 5:return neumark(t,i,r,n);case 6:case 7:return original(t,i,r,n);case 8:return neumark(t,i,r,n);case 9:case 10:return original(t,i,r,n);case 11:return neumark(t,i,r,n);case 12:case 13:case 14:case 15:return original(t,i,r,n);default:return}},Ray.clone=function(e,t){if(defined(e))return defined(t)?(t.origin=Cartesian3.clone(e.origin),t.direction=Cartesian3.clone(e.direction),t):new Ray(e.origin,e.direction)},Ray.getPoint=function(e,t,i){return defined(i)||(i=new Cartesian3),i=Cartesian3.multiplyByScalar(e.direction,t,i),Cartesian3.add(e.origin,i,i)};var IntersectionTests={rayPlane:function(e,t,i){defined(i)||(i=new Cartesian3);var r=e.origin,n=e.direction,a=t.normal;e=Cartesian3.dot(a,n);if(!(Math.abs(e)<CesiumMath.EPSILON15||(e=(-t.distance-Cartesian3.dot(a,r))/e)<0))return i=Cartesian3.multiplyByScalar(n,e,i),Cartesian3.add(r,i,i)}},scratchEdge0=new Cartesian3,scratchEdge1=new Cartesian3,scratchPVec=new Cartesian3,scratchTVec=new Cartesian3,scratchQVec=new Cartesian3;IntersectionTests.rayTriangleParametric=function(e,t,i,r,n){n=defaultValue(n,!1);var a,o,s,l=e.origin,c=e.direction,u=Cartesian3.subtract(i,t,scratchEdge0);e=Cartesian3.subtract(r,t,scratchEdge1),i=Cartesian3.cross(c,e,scratchPVec),r=Cartesian3.dot(u,i);if(n){if(r<CesiumMath.EPSILON6)return;if(h=Cartesian3.subtract(l,t,scratchTVec),(d=Cartesian3.dot(h,i))<0||r<d)return;if(a=Cartesian3.cross(h,u,scratchQVec),(o=Cartesian3.dot(c,a))<0||r<d+o)return;s=Cartesian3.dot(e,a)/r}else{if(Math.abs(r)<CesiumMath.EPSILON6)return;r=1/r;var d,h=Cartesian3.subtract(l,t,scratchTVec);if((d=Cartesian3.dot(h,i)*r)<0||1<d)return;if(a=Cartesian3.cross(h,u,scratchQVec),(o=Cartesian3.dot(c,a)*r)<0||1<d+o)return;s=Cartesian3.dot(e,a)*r}return s},IntersectionTests.rayTriangle=function(e,t,i,r,n,a){if(defined(n=IntersectionTests.rayTriangleParametric(e,t,i,r,n))&&!(n<0))return defined(a)||(a=new Cartesian3),Cartesian3.multiplyByScalar(e.direction,n,a),Cartesian3.add(e.origin,a,a)};var scratchLineSegmentTriangleRay=new Ray;function solveQuadratic(e,t,i,r){if(!((n=t*t-4*e*i)<0)){if(0<n){var n,a=1/(2*e);return(n=(-t+(i=Math.sqrt(n)))*a)<(a=(-t-i)*a)?(r.root0=n,r.root1=a):(r.root0=a,r.root1=n),r}if(0!=(e=-t/(2*e)))return r.root0=r.root1=e,r}}IntersectionTests.lineSegmentTriangle=function(e,t,i,r,n,a,o){var s=scratchLineSegmentTriangleRay;if(Cartesian3.clone(e,s.origin),Cartesian3.subtract(t,e,s.direction),Cartesian3.normalize(s.direction,s.direction),!(!defined(a=IntersectionTests.rayTriangleParametric(s,i,r,n,a))||a<0||a>Cartesian3.distance(e,t)))return defined(o)||(o=new Cartesian3),Cartesian3.multiplyByScalar(s.direction,a,o),Cartesian3.add(s.origin,o,o)};var raySphereRoots={root0:0,root1:0};function raySphere(e,t,i){defined(i)||(i=new Interval);var r=e.origin,n=e.direction;e=t.center,t=t.radius*t.radius,e=Cartesian3.subtract(r,e,scratchPVec);if(defined(t=solveQuadratic(Cartesian3.dot(n,n),2*Cartesian3.dot(n,e),Cartesian3.magnitudeSquared(e)-t,raySphereRoots)))return i.start=t.root0,i.stop=t.root1,i}IntersectionTests.raySphere=function(e,t,i){if(defined(i=raySphere(e,t,i))&&!(i.stop<0))return i.start=Math.max(i.start,0),i};var scratchLineSegmentRay=new Ray;IntersectionTests.lineSegmentSphere=function(e,t,i,r){var n=scratchLineSegmentRay;if(Cartesian3.clone(e,n.origin),t=Cartesian3.subtract(t,e,n.direction),e=Cartesian3.magnitude(t),Cartesian3.normalize(t,t),!(!defined(r=raySphere(n,i,r))||r.stop<0||r.start>e))return r.start=Math.max(r.start,0),r.stop=Math.min(r.stop,e),r};var scratchQ=new Cartesian3,scratchW=new Cartesian3;function addWithCancellationCheck$1(e,t,i){var r=e+t;return CesiumMath.sign(e)!==CesiumMath.sign(t)&&Math.abs(r/Math.max(Math.abs(e),Math.abs(t)))<i?0:r}function quadraticVectorExpression(e,t,i,r,n){var a,o=r*r,s=n*n,l=(e[Matrix3.COLUMN1ROW1]-e[Matrix3.COLUMN2ROW2])*s,c=n*(r*addWithCancellationCheck$1(e[Matrix3.COLUMN1ROW0],e[Matrix3.COLUMN0ROW1],CesiumMath.EPSILON15)+t.y),u=e[Matrix3.COLUMN0ROW0]*o+e[Matrix3.COLUMN2ROW2]*s+r*t.x+i,d=s*addWithCancellationCheck$1(e[Matrix3.COLUMN2ROW1],e[Matrix3.COLUMN1ROW2],CesiumMath.EPSILON15),h=n*(r*addWithCancellationCheck$1(e[Matrix3.COLUMN2ROW0],e[Matrix3.COLUMN0ROW2])+t.z),p=[];if(0==h&&0==d){if(0===(a=QuadraticRealPolynomial.computeRealRoots(l,c,u)).length)return p;var f=a[0],m=Math.sqrt(Math.max(1-f*f,0));return p.push(new Cartesian3(r,n*f,n*-m)),p.push(new Cartesian3(r,n*f,n*m)),2===a.length&&(g=a[1],y=Math.sqrt(Math.max(1-g*g,0)),p.push(new Cartesian3(r,n*g,n*-y)),p.push(new Cartesian3(r,n*g,n*y))),p}var g=l*l+(f=d*d),y=2*(c*l+(m=h*d));f=2*u*l+c*c-f+(t=h*h),m=2*(u*c-m),t=u*u-t;if(0==g&&0==y&&0==f&&0==m)return p;var _=(a=QuarticRealPolynomial.computeRealRoots(g,y,f,m,t)).length;if(0===_)return p;for(var v=0;v<_;++v){var C=a[v],x=C*C,b=Math.max(1-x,0);b=Math.sqrt(b);(x=(x=CesiumMath.sign(l)===CesiumMath.sign(u)?addWithCancellationCheck$1(l*x+u,c*C,CesiumMath.EPSILON12):CesiumMath.sign(u)===CesiumMath.sign(c*C)?addWithCancellationCheck$1(l*x,c*C+u,CesiumMath.EPSILON12):addWithCancellationCheck$1(l*x+c*C,u,CesiumMath.EPSILON12))*addWithCancellationCheck$1(d*C,h,CesiumMath.EPSILON15))<0?p.push(new Cartesian3(r,n*C,n*b)):0<x?p.push(new Cartesian3(r,n*C,n*-b)):0!==b?(p.push(new Cartesian3(r,n*C,n*-b)),p.push(new Cartesian3(r,n*C,n*b)),++v):p.push(new Cartesian3(r,n*C,n*b))}return p}IntersectionTests.rayEllipsoid=function(e,t){var i,r,n=t.oneOverRadii,a=Cartesian3.multiplyComponents(n,e.origin,scratchQ);t=Cartesian3.multiplyComponents(n,e.direction,scratchW),n=Cartesian3.magnitudeSquared(a),e=Cartesian3.dot(a,t);if(1<n){if(0<=e)return;var o,s,l=n-1;if((a=e*e)<(s=(o=Cartesian3.magnitudeSquared(t))*l))return;if(s<a){i=e*e-s;var c=(r=-e+Math.sqrt(i))/o;return c<(a=l/r)?new Interval(c,a):{start:a,stop:c}}return new Interval(c=Math.sqrt(l/o),c)}return n<1?(l=n-1,i=e*e-(s=(o=Cartesian3.magnitudeSquared(t))*l),new Interval(0,(r=-e+Math.sqrt(i))/o)):e<0?new Interval(0,-e/(o=Cartesian3.magnitudeSquared(t))):void 0};var firstAxisScratch=new Cartesian3,secondAxisScratch=new Cartesian3,thirdAxisScratch=new Cartesian3,referenceScratch=new Cartesian3,bCart=new Cartesian3,bScratch=new Matrix3,btScratch=new Matrix3,diScratch=new Matrix3,dScratch=new Matrix3,cScratch=new Matrix3,tempMatrix=new Matrix3,aScratch=new Matrix3,sScratch=new Cartesian3,closestScratch=new Cartesian3,surfPointScratch=new Cartographic;IntersectionTests.grazingAltitudeLocation=function(e,t){var i=e.origin,r=e.direction;if(!Cartesian3.equals(i,Cartesian3.ZERO)){var n=t.geodeticSurfaceNormal(i,firstAxisScratch);if(0<=Cartesian3.dot(r,n))return i}var a=defined(this.rayEllipsoid(e,t)),o=t.transformPositionToScaledSpace(r,firstAxisScratch),s=(n=Cartesian3.normalize(o,o),e=Cartesian3.mostOrthogonalAxis(o,referenceScratch),o=Cartesian3.normalize(Cartesian3.cross(e,n,secondAxisScratch),secondAxisScratch),e=Cartesian3.normalize(Cartesian3.cross(n,o,thirdAxisScratch),thirdAxisScratch),bScratch);s[0]=n.x,s[1]=n.y,s[2]=n.z,s[3]=o.x,s[4]=o.y,s[5]=o.z,s[6]=e.x,s[7]=e.y,s[8]=e.z;n=Matrix3.transpose(s,btScratch);var l=Matrix3.fromScale(t.radii,diScratch);o=Matrix3.fromScale(t.oneOverRadii,dScratch);(e=cScratch)[0]=0,e[1]=-r.z,e[2]=r.y,e[3]=r.z,e[4]=0,e[5]=-r.x,e[6]=-r.y,e[7]=r.x,e[8]=0;o=Matrix3.multiply(Matrix3.multiply(n,o,tempMatrix),e,tempMatrix),e=Matrix3.multiply(Matrix3.multiply(o,l,aScratch),s,aScratch),o=Matrix3.multiplyByVector(o,i,bCart);var c,u=quadraticVectorExpression(e,Cartesian3.negate(o,firstAxisScratch),0,0,1),d=u.length;if(0<d){for(var h=Cartesian3.clone(Cartesian3.ZERO,closestScratch),p=Number.NEGATIVE_INFINITY,f=0;f<d;++f){c=Matrix3.multiplyByVector(l,Matrix3.multiplyByVector(s,u[f],sScratch),sScratch);var m=Cartesian3.normalize(Cartesian3.subtract(c,i,referenceScratch),referenceScratch);p<(m=Cartesian3.dot(m,r))&&(p=m,h=Cartesian3.clone(c,h))}return e=t.cartesianToCartographic(h,surfPointScratch),p=CesiumMath.clamp(p,0,1),o=Cartesian3.magnitude(Cartesian3.subtract(h,i,referenceScratch))*Math.sqrt(1-p*p),o=a?-o:o,e.height=o,t.cartographicToCartesian(e,new Cartesian3)}};var lineSegmentPlaneDifference=new Cartesian3;function Plane(e,t){this.normal=Cartesian3.clone(e),this.distance=t}IntersectionTests.lineSegmentPlane=function(e,t,i,r){defined(r)||(r=new Cartesian3);var n=Cartesian3.subtract(t,e,lineSegmentPlaneDifference),a=i.normal;t=Cartesian3.dot(a,n);if(!(Math.abs(t)<CesiumMath.EPSILON6||(a=Cartesian3.dot(a,e),(t=-(i.distance+a)/t)<0||1<t)))return Cartesian3.multiplyByScalar(n,t,r),Cartesian3.add(e,r,r),r},IntersectionTests.trianglePlaneIntersection=function(e,t,i,r){var n,a,o=r.normal,s=r.distance,l=Cartesian3.dot(o,e)+s<0,c=Cartesian3.dot(o,t)+s<0;o=Cartesian3.dot(o,i)+s<0,s=0;if(s+=l?1:0,s+=c?1:0,1!=(s+=o?1:0)&&2!=s||(n=new Cartesian3,a=new Cartesian3),1==s){if(l)return IntersectionTests.lineSegmentPlane(e,t,r,n),IntersectionTests.lineSegmentPlane(e,i,r,a),{positions:[e,t,i,n,a],indices:[0,3,4,1,2,4,1,4,3]};if(c)return IntersectionTests.lineSegmentPlane(t,i,r,n),IntersectionTests.lineSegmentPlane(t,e,r,a),{positions:[e,t,i,n,a],indices:[1,3,4,2,0,4,2,4,3]};if(o)return IntersectionTests.lineSegmentPlane(i,e,r,n),IntersectionTests.lineSegmentPlane(i,t,r,a),{positions:[e,t,i,n,a],indices:[2,3,4,0,1,4,0,4,3]}}else if(2==s){if(!l)return IntersectionTests.lineSegmentPlane(t,e,r,n),IntersectionTests.lineSegmentPlane(i,e,r,a),{positions:[e,t,i,n,a],indices:[1,2,4,1,4,3,0,3,4]};if(!c)return IntersectionTests.lineSegmentPlane(i,t,r,n),IntersectionTests.lineSegmentPlane(e,t,r,a),{positions:[e,t,i,n,a],indices:[2,0,4,2,4,3,1,3,4]};if(!o)return IntersectionTests.lineSegmentPlane(e,i,r,n),IntersectionTests.lineSegmentPlane(t,i,r,a),{positions:[e,t,i,n,a],indices:[0,1,4,0,4,3,2,3,4]}}},Plane.fromPointNormal=function(e,t,i){return e=-Cartesian3.dot(t,e),defined(i)?(Cartesian3.clone(t,i.normal),i.distance=e,i):new Plane(t,e)};var scratchNormal=new Cartesian3;Plane.fromCartesian4=function(e,t){var i=Cartesian3.fromCartesian4(e,scratchNormal);e=e.w;return defined(t)?(Cartesian3.clone(i,t.normal),t.distance=e,t):new Plane(i,e)},Plane.getPointDistance=function(e,t){return Cartesian3.dot(e.normal,t)+e.distance};var scratchCartesian$1=new Cartesian3;Plane.projectPointOntoPlane=function(e,t,i){defined(i)||(i=new Cartesian3);var r=Plane.getPointDistance(e,t);r=Cartesian3.multiplyByScalar(e.normal,r,scratchCartesian$1);return Cartesian3.subtract(t,r,i)};var scratchInverseTranspose=new Matrix4,scratchPlaneCartesian4=new Cartesian4,scratchTransformNormal=new Cartesian3;function binarySearch(e,t,i){for(var r,n,a=0,o=e.length-1;a<=o;)if((n=i(e[r=~~((a+o)/2)],t))<0)a=1+r;else{if(!(0<n))return r;o=r-1}return~(o+1)}function EarthOrientationParametersSample(e,t,i,r,n){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=r,this.ut1MinusUtc=n}function sprintf(){function e(e,t,i,r){return i=i||" ",i=e.length>=t?"":Array(1+t-e.length>>>0).join(i),r?e+i:i+e}function t(t,i,r,n,a,o){var s=n-t.length;return 0<s&&(t=r||!a?e(t,n,o,r):t.slice(0,i.length)+e("",s,"0",!0)+t.slice(i.length)),t}function i(i,r,n,a,o,s,l){var c=i>>>0;return t(i=(n=n&&c&&{2:"0b",8:"0",16:"0x"}[r]||"")+e(c.toString(r),s||0,"0",!1),n,a,o,l)}function r(e,i,r,n,a,o){return null!=n&&(e=e.slice(0,n)),t(e,"",i,r,a,o)}var n=arguments,a=0,o=n[a++];return o.replace(/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,(function(o,s,l,c,u,d,h){var p,f,m;if("%%"==o)return"%";for(var g=!1,y="",_=!1,v=!1,C=" ",x=l.length,b=0;l&&b<x;b++)switch(l.charAt(b)){case" ":y=" ";break;case"+":y="+";break;case"-":g=!0;break;case"'":C=l.charAt(b+1);break;case"0":_=!0;break;case"#":v=!0}if((c=c?"*"==c?+n[a++]:"*"==c.charAt(0)?+n[c.slice(1,-1)]:+c:0)<0&&(c=-c,g=!0),!isFinite(c))throw new Error("sprintf: (minimum-)width must be finite");switch(d=d?"*"==d?+n[a++]:"*"==d.charAt(0)?+n[d.slice(1,-1)]:+d:-1<"fFeE".indexOf(h)?6:"d"==h?0:void 0,m=s?n[s.slice(0,-1)]:n[a++],h){case"s":return r(String(m),g,c,d,_,C);case"c":return r(String.fromCharCode(+m),g,c,d,_);case"b":return i(m,2,v,g,c,d,_);case"o":return i(m,8,v,g,c,d,_);case"x":return i(m,16,v,g,c,d,_);case"X":return i(m,16,v,g,c,d,_).toUpperCase();case"u":return i(m,10,v,g,c,d,_);case"i":case"d":return p=+m||0,t(m=(f=(p=Math.round(p-p%1))<0?"-":y)+e(String(Math.abs(p)),d,"0",!1),f,g,c,_);case"e":case"E":case"f":case"F":case"g":case"G":return f=(p=+m)<0?"-":y,s=["toExponential","toFixed","toPrecision"]["efg".indexOf(h.toLowerCase())],h=["toString","toUpperCase"]["eEfFgG".indexOf(h)%2],t(m=f+Math.abs(p)[s](d),f,g,c,_)[h]();default:return o}}))}function GregorianDate(e,t,i,r,n,a,o,s){this.year=e,this.month=t,this.day=i,this.hour=r,this.minute=n,this.second=a,this.millisecond=o,this.isLeapSecond=s}function isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}function LeapSecond(e,t){this.julianDate=e,this.offset=t}Plane.transform=function(e,t,i){var r=e.normal;e=e.distance,t=Matrix4.inverseTranspose(t,scratchInverseTranspose),e=Cartesian4.fromElements(r.x,r.y,r.z,e,scratchPlaneCartesian4),e=Matrix4.multiplyByVector(t,e,e),t=Cartesian3.fromCartesian4(e,scratchTransformNormal);return e=Cartesian4.divideByScalar(e,Cartesian3.magnitude(t),e),Plane.fromCartesian4(e,i)},Plane.clone=function(e,t){return defined(t)?(Cartesian3.clone(e.normal,t.normal),t.distance=e.distance,t):new Plane(e.normal,e.distance)},Plane.equals=function(e,t){return e.distance===t.distance&&Cartesian3.equals(e.normal,t.normal)},Plane.ORIGIN_XY_PLANE=Object.freeze(new Plane(Cartesian3.UNIT_Z,0)),Plane.ORIGIN_YZ_PLANE=Object.freeze(new Plane(Cartesian3.UNIT_X,0)),Plane.ORIGIN_ZX_PLANE=Object.freeze(new Plane(Cartesian3.UNIT_Y,0));var TimeConstants={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5},TimeConstants$1=Object.freeze(TimeConstants),TimeStandard={UTC:0,TAI:1},TimeStandard$1=Object.freeze(TimeStandard),gregorianDateScratch=new GregorianDate,daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],daysInLeapFeburary=29;function compareLeapSecondDates(e,t){return JulianDate.compare(e.julianDate,t.julianDate)}var binarySearchScratchLeapSecond=new LeapSecond;function convertUtcToTai(e){binarySearchScratchLeapSecond.julianDate=e;var t=JulianDate.leapSeconds,i=binarySearch(t,binarySearchScratchLeapSecond,compareLeapSecondDates);i<0&&(i=~i),i>=t.length&&(i=t.length-1);var r=t[i].offset;0<i&&r<JulianDate.secondsDifference(t[i].julianDate,e)&&(r=t[--i].offset),JulianDate.addSeconds(e,r,e)}function convertTaiToUtc(e,t){binarySearchScratchLeapSecond.julianDate=e;var i=JulianDate.leapSeconds,r=binarySearch(i,binarySearchScratchLeapSecond,compareLeapSecondDates);if(r<0&&(r=~r),0===r)return JulianDate.addSeconds(e,-i[0].offset,t);if(r>=i.length)return JulianDate.addSeconds(e,-i[r-1].offset,t);var n=JulianDate.secondsDifference(i[r].julianDate,e);return 0===n?JulianDate.addSeconds(e,-i[r].offset,t):n<=1?void 0:JulianDate.addSeconds(e,-i[--r].offset,t)}function setComponents(e,t,i){var r=t/TimeConstants$1.SECONDS_PER_DAY|0;return e+=r,(t-=TimeConstants$1.SECONDS_PER_DAY*r)<0&&(e--,t+=TimeConstants$1.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function computeJulianDateComponents(e,t,i,r,n,a,o){var s=(t-14)/12|0;i=(1461*(e=e+4800+s)/4|0)+(367*(t-2-12*s)/12|0)-(3*((e+100)/100|0)/4|0)+i-32075;return(r-=12)<0&&(r+=24),43200<=(o=a+(r*TimeConstants$1.SECONDS_PER_HOUR+n*TimeConstants$1.SECONDS_PER_MINUTE+o*TimeConstants$1.SECONDS_PER_MILLISECOND))&&--i,[i,o]}var matchCalendarYear=/^(\d{4})$/,matchCalendarMonth=/^(\d{4})-(\d{2})$/,matchOrdinalDate=/^(\d{4})-?(\d{3})$/,matchWeekDate=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,matchCalendarDate=/^(\d{4})-?(\d{2})-?(\d{2})$/,utcOffset=/([Z+\-])?(\d{2})?:?(\d{2})?$/,matchHours=/^(\d{2})(\.\d+)?/.source+utcOffset.source,matchHoursMinutes=/^(\d{2}):?(\d{2})(\.\d+)?/.source+utcOffset.source,matchHoursMinutesSeconds=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+utcOffset.source;function JulianDate(e,t,i){this.dayNumber=void 0,this.secondsOfDay=void 0,e=defaultValue(e,0),t=defaultValue(t,0),i=defaultValue(i,TimeStandard$1.UTC);var r=0|e;setComponents(r,t+=(e-r)*TimeConstants$1.SECONDS_PER_DAY,this),i===TimeStandard$1.UTC&&convertUtcToTai(this)}JulianDate.fromGregorianDate=function(e,t){return e=computeJulianDateComponents(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond),defined(t)?(setComponents(e[0],e[1],t),convertUtcToTai(t),t):new JulianDate(e[0],e[1],TimeStandard$1.UTC)},JulianDate.fromDate=function(e,t){return e=computeJulianDateComponents(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),defined(t)?(setComponents(e[0],e[1],t),convertUtcToTai(t),t):new JulianDate(e[0],e[1],TimeStandard$1.UTC)},JulianDate.fromIso8601=function(e,t){var i,r,n,a=(e=e.replace(",",".")).split("T"),o=1,s=1,l=0,c=0,u=0,d=0,h=a[0];e=a[1];if(null!==(a=h.match(matchCalendarDate))?(i=+a[1],o=+a[2],s=+a[3]):null!==(a=h.match(matchCalendarMonth))?(i=+a[1],o=+a[2]):null!==(a=h.match(matchCalendarYear))?i=+a[1]:(null!==(a=h.match(matchOrdinalDate))?(i=+a[1],p=+a[2],n=isLeapYear(i)):null!==(a=h.match(matchWeekDate))&&(i=+a[1],p=7*+a[2]+(+a[3]||0)-new Date(Date.UTC(i,0,4)).getUTCDay()-3),(r=new Date(Date.UTC(i,0,1))).setUTCDate(p),o=r.getUTCMonth()+1,s=r.getUTCDate()),n=isLeapYear(i),defined(e)){null!==(a=e.match(matchHoursMinutesSeconds))?(l=+a[1],c=+a[2],u=+a[3],d=1e3*+(a[4]||0),f=5):null!==(a=e.match(matchHoursMinutes))?(l=+a[1],c=+a[2],u=60*+(a[3]||0),f=4):null!==(a=e.match(matchHours))&&(l=+a[1],c=60*+(a[2]||0),f=3);var p=a[f],f=(e=+a[f+1],+(a[f+2]||0));switch(p){case"+":l-=e,c-=f;break;case"-":l+=e,c+=f;break;case"Z":break;default:c+=new Date(Date.UTC(i,o-1,s,l,c)).getTimezoneOffset()}}for((f=60===u)&&u--;60<=c;)c-=60,l++;for(;24<=l;)l-=24,s++;for(r=n&&2===o?daysInLeapFeburary:daysInMonth[o-1];r<s;)s-=r,12<++o&&(o-=12,i++),r=n&&2===o?daysInLeapFeburary:daysInMonth[o-1];for(;c<0;)c+=60,l--;for(;l<0;)l+=24,s--;for(;s<1;)--o<1&&(o+=12,i--),s+=r=n&&2===o?daysInLeapFeburary:daysInMonth[o-1];return d=computeJulianDateComponents(i,o,s,l,c,u,d),defined(t)?(setComponents(d[0],d[1],t),convertUtcToTai(t)):t=new JulianDate(d[0],d[1],TimeStandard$1.UTC),f&&JulianDate.addSeconds(t,1,t),t},JulianDate.now=function(e){return JulianDate.fromDate(new Date,e)};var toGregorianDateScratch=new JulianDate(0,0,TimeStandard$1.TAI);function EarthOrientationParameters(e){var t,i;e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=defaultValue(e.addNewLeapSeconds,!0),defined(e.data)?onDataReady(this,e.data):defined(e.url)?(t=Resource.createIfNeeded(e.url),(i=this)._downloadPromise=t.fetchJson().then((function(e){onDataReady(i,e)})).otherwise((function(){i._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))):onDataReady(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function compareLeapSecondDates$1(e,t){return JulianDate.compare(e.julianDate,t)}function onDataReady(e,t){if(defined(t.columnNames))if(defined(t.samples)){var i=t.columnNames.indexOf("modifiedJulianDateUtc"),r=t.columnNames.indexOf("xPoleWanderRadians"),n=t.columnNames.indexOf("yPoleWanderRadians"),a=t.columnNames.indexOf("ut1MinusUtcSeconds"),o=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(i<0||r<0||n<0||a<0||o<0||s<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var c,u=e._samples=t.samples,d=e._dates=[];e._dateColumn=i,e._xPoleWanderRadiansColumn=r,e._yPoleWanderRadiansColumn=n,e._ut1MinusUtcSecondsColumn=a,e._xCelestialPoleOffsetRadiansColumn=o,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var h=e._addNewLeapSeconds,p=0,f=u.length;p<f;p+=e._columnCount){var m,g=u[p+i],y=u[p+l],_=new JulianDate(g+TimeConstants$1.MODIFIED_JULIAN_DATE_DIFFERENCE,y,TimeStandard$1.TAI);d.push(_),h&&(y===c||!defined(c)||(g=binarySearch(m=JulianDate.leapSeconds,_,compareLeapSecondDates$1))<0&&(_=new LeapSecond(_,y),m.splice(~g,0,_)),c=y)}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function fillResultFromIndex(e,t,i,r,n){r*=i,n.xPoleWander=t[r+e._xPoleWanderRadiansColumn],n.yPoleWander=t[r+e._yPoleWanderRadiansColumn],n.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],n.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],n.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function linearInterp(e,t,i){return t+e*(i-t)}function interpolate(e,t,i,r,n,a,o){var s=e._columnCount;if(a>t.length-1)return o.xPoleWander=0,o.yPoleWander=0,o.xPoleOffset=0,o.yPoleOffset=0,o.ut1MinusUtc=0,o;var l=t[n],c=t[a];if(l.equals(c)||r.equals(l))return fillResultFromIndex(e,i,n,s,o),o;if(r.equals(c))return fillResultFromIndex(e,i,a,s,o),o;var u=JulianDate.secondsDifference(r,l)/JulianDate.secondsDifference(c,l),d=n*s;t=a*s,l=i[d+e._ut1MinusUtcSecondsColumn];return!(.5<(a=(n=i[t+e._ut1MinusUtcSecondsColumn])-l)||a<-.5)||(s=i[d+e._taiMinusUtcSecondsColumn])!==(a=i[t+e._taiMinusUtcSecondsColumn])&&(c.equals(r)?l=n:n-=a-s),o.xPoleWander=linearInterp(u,i[d+e._xPoleWanderRadiansColumn],i[t+e._xPoleWanderRadiansColumn]),o.yPoleWander=linearInterp(u,i[d+e._yPoleWanderRadiansColumn],i[t+e._yPoleWanderRadiansColumn]),o.xPoleOffset=linearInterp(u,i[d+e._xCelestialPoleOffsetRadiansColumn],i[t+e._xCelestialPoleOffsetRadiansColumn]),o.yPoleOffset=linearInterp(u,i[d+e._yCelestialPoleOffsetRadiansColumn],i[t+e._yCelestialPoleOffsetRadiansColumn]),o.ut1MinusUtc=linearInterp(u,l,n),o}function HeadingPitchRoll(e,t,i){this.heading=defaultValue(e,0),this.pitch=defaultValue(t,0),this.roll=defaultValue(i,0)}function Iau2006XysSample(e,t,i){this.x=e,this.y=t,this.s=i}function Iau2006XysData(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._xysFileUrlTemplate=Resource.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=defaultValue(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=defaultValue(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new JulianDate(this._sampleZeroJulianEphemerisDate,0,TimeStandard$1.TAI),this._stepSizeDays=defaultValue(e.stepSizeDays,1),this._samplesPerXysFile=defaultValue(e.samplesPerXysFile,1e3),this._totalSamples=defaultValue(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,i=this._denominators=new Array(t+1),r=this._xTable=new Array(t+1),n=Math.pow(this._stepSizeDays,t),a=0;a<=t;++a){i[a]=n,r[a]=a*this._stepSizeDays;for(var o=0;o<=t;++o)o!==a&&(i[a]*=a-o);i[a]=1/i[a]}this._work=new Array(t+1),this._coef=new Array(t+1)}JulianDate.toGregorianDate=function(e,t){var i=!1;defined(s=convertTaiToUtc(e,toGregorianDateScratch))||(JulianDate.addSeconds(e,-1,toGregorianDateScratch),s=convertTaiToUtc(toGregorianDateScratch,toGregorianDateScratch),i=!0);var r=s.dayNumber;43200<=(l=s.secondsOfDay)&&(r+=1);var n,a,o=4e3*(1+(a=(a=r+68569|0)-((146097*(n=4*a/146097|0)+3)/4|0)|0))/1461001|0,s=(e=80*(a=a-(1461*o/4|0)+31|0)/2447|0,a-(2447*e/80|0)|0),l=(r=2+e-12*(a=e/11|0)|0,e=100*(n-49)+o+a|0,o=l-(n=l/TimeConstants$1.SECONDS_PER_HOUR|0)*TimeConstants$1.SECONDS_PER_HOUR,0|(o-=(a=o/TimeConstants$1.SECONDS_PER_MINUTE|0)*TimeConstants$1.SECONDS_PER_MINUTE));o=(o-l)/TimeConstants$1.SECONDS_PER_MILLISECOND;return 23<(n+=12)&&(n-=24),i&&(l+=1),defined(t)?(t.year=e,t.month=r,t.day=s,t.hour=n,t.minute=a,t.second=l,t.millisecond=o,t.isLeapSecond=i,t):new GregorianDate(e,r,s,n,a,l,o,i)},JulianDate.toDate=function(e){var t=JulianDate.toGregorianDate(e,gregorianDateScratch);e=t.second;return t.isLeapSecond&&--e,new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,e,t.millisecond))},JulianDate.toIso8601=function(e,t){var i=(s=JulianDate.toGregorianDate(e,gregorianDateScratch)).year,r=s.month,n=s.day,a=s.hour,o=s.minute,s=(e=s.second,s.millisecond);return 1e4===i&&1===r&&1===n&&0===a&&0===o&&0===e&&0===s&&(i=9999,r=12,n=31,a=24),defined(t)||0===s?defined(t)&&0!==t?sprintf("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",i,r,n,a,o,e,(.01*s).toFixed(t).replace(".","").slice(0,t)):sprintf("%04d-%02d-%02dT%02d:%02d:%02dZ",i,r,n,a,o,e):sprintf("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",i,r,n,a,o,e,(.01*s).toString().replace(".",""))},JulianDate.clone=function(e,t){if(defined(e))return defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new JulianDate(e.dayNumber,e.secondsOfDay,TimeStandard$1.TAI)},JulianDate.compare=function(e,t){var i=e.dayNumber-t.dayNumber;return 0!=i?i:e.secondsOfDay-t.secondsOfDay},JulianDate.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},JulianDate.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(JulianDate.secondsDifference(e,t))<=i},JulianDate.totalDays=function(e){return e.dayNumber+e.secondsOfDay/TimeConstants$1.SECONDS_PER_DAY},JulianDate.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*TimeConstants$1.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},JulianDate.daysDifference=function(e,t){return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/TimeConstants$1.SECONDS_PER_DAY},JulianDate.computeTaiMinusUtc=function(e){binarySearchScratchLeapSecond.julianDate=e;var t=JulianDate.leapSeconds;return(e=binarySearch(t,binarySearchScratchLeapSecond,compareLeapSecondDates))<0&&(e=~e,--e<0&&(e=0)),t[e].offset},JulianDate.addSeconds=function(e,t,i){return setComponents(e.dayNumber,e.secondsOfDay+t,i)},JulianDate.addMinutes=function(e,t,i){return t=e.secondsOfDay+t*TimeConstants$1.SECONDS_PER_MINUTE,setComponents(e.dayNumber,t,i)},JulianDate.addHours=function(e,t,i){return t=e.secondsOfDay+t*TimeConstants$1.SECONDS_PER_HOUR,setComponents(e.dayNumber,t,i)},JulianDate.addDays=function(e,t,i){return setComponents(e.dayNumber+t,e.secondsOfDay,i)},JulianDate.lessThan=function(e,t){return JulianDate.compare(e,t)<0},JulianDate.lessThanOrEquals=function(e,t){return JulianDate.compare(e,t)<=0},JulianDate.greaterThan=function(e,t){return 0<JulianDate.compare(e,t)},JulianDate.greaterThanOrEquals=function(e,t){return 0<=JulianDate.compare(e,t)},JulianDate.prototype.clone=function(e){return JulianDate.clone(this,e)},JulianDate.prototype.equals=function(e){return JulianDate.equals(this,e)},JulianDate.prototype.equalsEpsilon=function(e,t){return JulianDate.equalsEpsilon(this,e,t)},JulianDate.prototype.toString=function(){return JulianDate.toIso8601(this)},JulianDate.leapSeconds=[new LeapSecond(new JulianDate(2441317,43210,TimeStandard$1.TAI),10),new LeapSecond(new JulianDate(2441499,43211,TimeStandard$1.TAI),11),new LeapSecond(new JulianDate(2441683,43212,TimeStandard$1.TAI),12),new LeapSecond(new JulianDate(2442048,43213,TimeStandard$1.TAI),13),new LeapSecond(new JulianDate(2442413,43214,TimeStandard$1.TAI),14),new LeapSecond(new JulianDate(2442778,43215,TimeStandard$1.TAI),15),new LeapSecond(new JulianDate(2443144,43216,TimeStandard$1.TAI),16),new LeapSecond(new JulianDate(2443509,43217,TimeStandard$1.TAI),17),new LeapSecond(new JulianDate(2443874,43218,TimeStandard$1.TAI),18),new LeapSecond(new JulianDate(2444239,43219,TimeStandard$1.TAI),19),new LeapSecond(new JulianDate(2444786,43220,TimeStandard$1.TAI),20),new LeapSecond(new JulianDate(2445151,43221,TimeStandard$1.TAI),21),new LeapSecond(new JulianDate(2445516,43222,TimeStandard$1.TAI),22),new LeapSecond(new JulianDate(2446247,43223,TimeStandard$1.TAI),23),new LeapSecond(new JulianDate(2447161,43224,TimeStandard$1.TAI),24),new LeapSecond(new JulianDate(2447892,43225,TimeStandard$1.TAI),25),new LeapSecond(new JulianDate(2448257,43226,TimeStandard$1.TAI),26),new LeapSecond(new JulianDate(2448804,43227,TimeStandard$1.TAI),27),new LeapSecond(new JulianDate(2449169,43228,TimeStandard$1.TAI),28),new LeapSecond(new JulianDate(2449534,43229,TimeStandard$1.TAI),29),new LeapSecond(new JulianDate(2450083,43230,TimeStandard$1.TAI),30),new LeapSecond(new JulianDate(2450630,43231,TimeStandard$1.TAI),31),new LeapSecond(new JulianDate(2451179,43232,TimeStandard$1.TAI),32),new LeapSecond(new JulianDate(2453736,43233,TimeStandard$1.TAI),33),new LeapSecond(new JulianDate(2454832,43234,TimeStandard$1.TAI),34),new LeapSecond(new JulianDate(2456109,43235,TimeStandard$1.TAI),35),new LeapSecond(new JulianDate(2457204,43236,TimeStandard$1.TAI),36),new LeapSecond(new JulianDate(2457754,43237,TimeStandard$1.TAI),37)],EarthOrientationParameters.NONE=Object.freeze({getPromiseToLoad:function(){return when.resolve()},compute:function(e,t){return defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new EarthOrientationParametersSample(0,0,0,0,0),t}}),EarthOrientationParameters.prototype.getPromiseToLoad=function(){return when(this._downloadPromise)},EarthOrientationParameters.prototype.compute=function(e,t){if(defined(this._samples)){if(defined(t)||(t=new EarthOrientationParametersSample(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var i=this._dates,r=this._lastIndex,n=0,a=0;if(defined(r)){var o=i[r],s=i[r+1],l=JulianDate.lessThanOrEquals(o,e),c=!defined(s);o=c||JulianDate.greaterThanOrEquals(s,e);if(l&&o)return n=r,!c&&s.equals(e)&&++n,a=n+1,interpolate(this,i,this._samples,e,n,a,t),t}return 0<=(s=binarySearch(i,e,JulianDate.compare,this._dateColumn))?(s<i.length-1&&i[s+1].equals(e)&&++s,a=n=s):(n=(a=~s)-1)<0&&(n=0),this._lastIndex=n,interpolate(this,i,this._samples,e,n,a,t),t}if(defined(this._dataError))throw new RuntimeError(this._dataError)},HeadingPitchRoll.fromQuaternion=function(e,t){defined(t)||(t=new HeadingPitchRoll);var i=2*(e.w*e.y-e.z*e.x),r=1-2*(e.x*e.x+e.y*e.y),n=2*(e.w*e.x+e.y*e.z),a=1-2*(e.y*e.y+e.z*e.z);e=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(e,a),t.roll=Math.atan2(n,r),t.pitch=-CesiumMath.asinClamped(i),t},HeadingPitchRoll.fromDegrees=function(e,t,i,r){return defined(r)||(r=new HeadingPitchRoll),r.heading=e*CesiumMath.RADIANS_PER_DEGREE,r.pitch=t*CesiumMath.RADIANS_PER_DEGREE,r.roll=i*CesiumMath.RADIANS_PER_DEGREE,r},HeadingPitchRoll.clone=function(e,t){if(defined(e))return defined(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new HeadingPitchRoll(e.heading,e.pitch,e.roll)},HeadingPitchRoll.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},HeadingPitchRoll.equalsEpsilon=function(e,t,i,r){return e===t||defined(e)&&defined(t)&&CesiumMath.equalsEpsilon(e.heading,t.heading,i,r)&&CesiumMath.equalsEpsilon(e.pitch,t.pitch,i,r)&&CesiumMath.equalsEpsilon(e.roll,t.roll,i,r)},HeadingPitchRoll.prototype.clone=function(e){return HeadingPitchRoll.clone(this,e)},HeadingPitchRoll.prototype.equals=function(e){return HeadingPitchRoll.equals(this,e)},HeadingPitchRoll.prototype.equalsEpsilon=function(e,t,i){return HeadingPitchRoll.equalsEpsilon(this,e,t,i)},HeadingPitchRoll.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var julianDateScratch=new JulianDate(0,0,TimeStandard$1.TAI),_supportsFullscreen;function getDaysSinceEpoch(e,t,i){var r=julianDateScratch;return r.dayNumber=t,r.secondsOfDay=i,JulianDate.daysDifference(r,e._sampleZeroDateTT)}function requestXysChunk(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var i=when.defer();e._chunkDownloadsInProgress[t]=i;var r=e._xysFileUrlTemplate;return when((defined(r)?r.getDerivedResource({templateValues:{0:t}}):new Resource({url:buildModuleUrl("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")})).fetchJson(),(function(r){e._chunkDownloadsInProgress[t]=!1;for(var n=e._samples,a=r.samples,o=t*e._samplesPerXysFile*3,s=0,l=a.length;s<l;++s)n[o+s]=a[s];i.resolve()})),i.promise}Iau2006XysData.prototype.preload=function(e,t,i,r){t=getDaysSinceEpoch(this,e,t),r=getDaysSinceEpoch(this,i,r),(t=t/this._stepSizeDays-this._interpolationOrder/2|0)<0&&(t=0),(r=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder)>=this._totalSamples&&(r=this._totalSamples-1);t=t/this._samplesPerXysFile|0;for(var n=r/this._samplesPerXysFile|0,a=[],o=t;o<=n;++o)a.push(requestXysChunk(this,o));return when.all(a)},Iau2006XysData.prototype.computeXysRadians=function(e,t,i){var r=getDaysSinceEpoch(this,e,t);if(!(r<0||(e=r/this._stepSizeDays|0)>=this._totalSamples)){var n=this._interpolationOrder,a=e-(n/2|0);a<0&&(a=0),(t=a+n)>=this._totalSamples&&(a=(t=this._totalSamples-1)-n)<0&&(a=0);e=!1;var o=this._samples;if(defined(o[3*a])||(requestXysChunk(this,a/this._samplesPerXysFile|0),e=!0),defined(o[3*t])||(requestXysChunk(this,t/this._samplesPerXysFile|0),e=!0),!e){defined(i)?(i.x=0,i.y=0,i.s=0):i=new Iau2006XysSample(0,0,0);for(var s,l=r-a*this._stepSizeDays,c=this._work,u=this._denominators,d=this._coef,h=this._xTable,p=0;p<=n;++p)c[p]=l-h[p];for(p=0;p<=n;++p){for(d[p]=1,s=0;s<=n;++s)s!==p&&(d[p]*=c[s]);d[p]*=u[p];var f=3*(a+p);i.x+=d[p]*o[f++],i.y+=d[p]*o[f++],i.s+=d[p]*o[f]}return i}}};var _names={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Fullscreen={},theNavigator,isChromeResult,chromeVersionResult,isSafariResult,safariVersionResult,isWebkitResult,webkitVersionResult,isInternetExplorerResult,internetExplorerVersionResult,isEdgeResult,edgeVersionResult,isFirefoxResult,firefoxVersionResult,isWindowsResult,hasPointerEvents,imageRenderingValueResult,supportsImageRenderingPixelatedResult;function extractVersion(e){for(var t=e.split("."),i=0,r=t.length;i<r;++i)t[i]=parseInt(t[i],10);return t}function isChrome(){var e;return defined(isChromeResult)||(isChromeResult=!1,isEdge()||null!==(e=/ Chrome\/([\.0-9]+)/.exec(theNavigator.userAgent))&&(isChromeResult=!0,chromeVersionResult=extractVersion(e[1]))),isChromeResult}function chromeVersion(){return isChrome()&&chromeVersionResult}function isSafari(){var e;return defined(isSafariResult)||(isSafariResult=!1,isChrome()||isEdge()||!/ Safari\/[\.0-9]+/.test(theNavigator.userAgent)||null!==(e=/ Version\/([\.0-9]+)/.exec(theNavigator.userAgent))&&(isSafariResult=!0,safariVersionResult=extractVersion(e[1]))),isSafariResult}function safariVersion(){return isSafari()&&safariVersionResult}function isWebkit(){var e;return defined(isWebkitResult)||(isWebkitResult=!1,null!==(e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(theNavigator.userAgent))&&(isWebkitResult=!0,(webkitVersionResult=extractVersion(e[1])).isNightly=!!e[2])),isWebkitResult}function webkitVersion(){return isWebkit()&&webkitVersionResult}function isInternetExplorer(){var e;return defined(isInternetExplorerResult)||(isInternetExplorerResult=!1,"Microsoft Internet Explorer"===theNavigator.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent))&&(isInternetExplorerResult=!0,internetExplorerVersionResult=extractVersion(e[1])):"Netscape"===theNavigator.appName&&null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent))&&(isInternetExplorerResult=!0,internetExplorerVersionResult=extractVersion(e[1]))),isInternetExplorerResult}function internetExplorerVersion(){return isInternetExplorer()&&internetExplorerVersionResult}function isEdge(){var e;return defined(isEdgeResult)||(isEdgeResult=!1,null!==(e=/ Edge\/([\.0-9]+)/.exec(theNavigator.userAgent))&&(isEdgeResult=!0,edgeVersionResult=extractVersion(e[1]))),isEdgeResult}function edgeVersion(){return isEdge()&&edgeVersionResult}function isFirefox(){var e;return defined(isFirefoxResult)||(isFirefoxResult=!1,null!==(e=/Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent))&&(isFirefoxResult=!0,firefoxVersionResult=extractVersion(e[1]))),isFirefoxResult}function isWindows(){return defined(isWindowsResult)||(isWindowsResult=/Windows/i.test(theNavigator.appVersion)),isWindowsResult}function firefoxVersion(){return isFirefox()&&firefoxVersionResult}function supportsPointerEvents(){return defined(hasPointerEvents)||(hasPointerEvents=!isFirefox()&&"undefined"!=typeof PointerEvent&&(!defined(theNavigator.pointerEnabled)||theNavigator.pointerEnabled)),hasPointerEvents}function supportsImageRenderingPixelated(){var e;return defined(supportsImageRenderingPixelatedResult)||((e=document.createElement("canvas")).setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;"),e=e.style.imageRendering,(supportsImageRenderingPixelatedResult=defined(e)&&""!==e)&&(imageRenderingValueResult=e)),supportsImageRenderingPixelatedResult}function imageRenderingValue(){return supportsImageRenderingPixelated()?imageRenderingValueResult:void 0}function supportsWebP(){return supportsWebP._result}Object.defineProperties(Fullscreen,{element:{get:function(){if(Fullscreen.supportsFullscreen())return document[_names.fullscreenElement]}},changeEventName:{get:function(){if(Fullscreen.supportsFullscreen())return _names.fullscreenchange}},errorEventName:{get:function(){if(Fullscreen.supportsFullscreen())return _names.fullscreenerror}},enabled:{get:function(){if(Fullscreen.supportsFullscreen())return document[_names.fullscreenEnabled]}},fullscreen:{get:function(){if(Fullscreen.supportsFullscreen())return null!==Fullscreen.element}}}),Fullscreen.supportsFullscreen=function(){if(defined(_supportsFullscreen))return _supportsFullscreen;_supportsFullscreen=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return _names.requestFullscreen="requestFullscreen",_names.exitFullscreen="exitFullscreen",_names.fullscreenEnabled="fullscreenEnabled",_names.fullscreenElement="fullscreenElement",_names.fullscreenchange="fullscreenchange",_names.fullscreenerror="fullscreenerror",_supportsFullscreen=!0;for(var t=["webkit","moz","o","ms","khtml"],i=0,r=t.length;i<r;++i){var n,a=t[i];"function"!=typeof e[n=a+"RequestFullscreen"]&&"function"!=typeof e[n=a+"RequestFullScreen"]||(_names.requestFullscreen=n,_supportsFullscreen=!0),n=a+"ExitFullscreen","function"==typeof document[n]?_names.exitFullscreen=n:(n=a+"CancelFullScreen","function"==typeof document[n]&&(_names.exitFullscreen=n)),n=a+"FullscreenEnabled",void 0!==document[n]?_names.fullscreenEnabled=n:(n=a+"FullScreenEnabled",void 0!==document[n]&&(_names.fullscreenEnabled=n)),n=a+"FullscreenElement",void 0!==document[n]?_names.fullscreenElement=n:(n=a+"FullScreenElement",void 0!==document[n]&&(_names.fullscreenElement=n)),n=a+"fullscreenchange",void 0!==document["on"+n]&&("ms"===a&&(n="MSFullscreenChange"),_names.fullscreenchange=n),n=a+"fullscreenerror",void 0!==document["on"+n]&&("ms"===a&&(n="MSFullscreenError"),_names.fullscreenerror=n)}return _supportsFullscreen},Fullscreen.requestFullscreen=function(e,t){Fullscreen.supportsFullscreen()&&e[_names.requestFullscreen]({vrDisplay:t})},Fullscreen.exitFullscreen=function(){Fullscreen.supportsFullscreen()&&document[_names.exitFullscreen]()},Fullscreen._names=_names,theNavigator="undefined"!=typeof navigator?navigator:{},supportsWebP._promise=void 0,supportsWebP._result=void 0,supportsWebP.initialize=function(){if(defined(supportsWebP._promise))return supportsWebP._promise;var e=when.defer();if(supportsWebP._promise=e.promise,isEdge())return supportsWebP._result=!1,e.resolve(supportsWebP._result),e.promise;var t=new Image;return t.onload=function(){supportsWebP._result=0<t.width&&0<t.height,e.resolve(supportsWebP._result)},t.onerror=function(){supportsWebP._result=!1,e.resolve(supportsWebP._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.promise},Object.defineProperties(supportsWebP,{initialized:{get:function(){return defined(supportsWebP._result)}}});var typedArrayTypes=[];"undefined"!=typeof ArrayBuffer&&(typedArrayTypes.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&typedArrayTypes.push(Uint8ClampedArray),"undefined"!=typeof Uint8ClampedArray&&typedArrayTypes.push(Uint8ClampedArray));var FeatureDetection={isChrome:isChrome,chromeVersion:chromeVersion,isSafari:isSafari,safariVersion:safariVersion,isWebkit:isWebkit,webkitVersion:webkitVersion,isInternetExplorer:isInternetExplorer,internetExplorerVersion:internetExplorerVersion,isEdge:isEdge,edgeVersion:edgeVersion,isFirefox:isFirefox,firefoxVersion:firefoxVersion,isWindows:isWindows,hardwareConcurrency:defaultValue(theNavigator.hardwareConcurrency,3),supportsPointerEvents:supportsPointerEvents,supportsImageRenderingPixelated:supportsImageRenderingPixelated,supportsWebP:supportsWebP,imageRenderingValue:imageRenderingValue,typedArrayTypes:typedArrayTypes};function Quaternion(e,t,i,r){this.x=defaultValue(e,0),this.y=defaultValue(t,0),this.z=defaultValue(i,0),this.w=defaultValue(r,0)}FeatureDetection.supportsFullscreen=function(){return Fullscreen.supportsFullscreen()},FeatureDetection.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},FeatureDetection.supportsWebWorkers=function(){return"undefined"!=typeof Worker},FeatureDetection.supportsWebAssembly=function(){return"undefined"!=typeof WebAssembly&&!FeatureDetection.isEdge()};var fromAxisAngleScratch=new Cartesian3;Quaternion.fromAxisAngle=function(e,t,i){var r=t/2,n=Math.sin(r);t=(fromAxisAngleScratch=Cartesian3.normalize(e,fromAxisAngleScratch)).x*n,e=fromAxisAngleScratch.y*n,n=fromAxisAngleScratch.z*n,r=Math.cos(r);return defined(i)?(i.x=t,i.y=e,i.z=n,i.w=r,i):new Quaternion(t,e,n,r)};var fromRotationMatrixNext=[1,2,0],fromRotationMatrixQuat=new Array(3);Quaternion.fromRotationMatrix=function(e,t){var i,r,n,a,o=e[Matrix3.COLUMN0ROW0],s=e[Matrix3.COLUMN1ROW1],l=e[Matrix3.COLUMN2ROW2],c=o+s+l,u=0<c?(n=.5*(a=Math.sqrt(c+1)),a=.5/a,i=(e[Matrix3.COLUMN1ROW2]-e[Matrix3.COLUMN2ROW1])*a,r=(e[Matrix3.COLUMN2ROW0]-e[Matrix3.COLUMN0ROW2])*a,(e[Matrix3.COLUMN0ROW1]-e[Matrix3.COLUMN1ROW0])*a):(o=fromRotationMatrixNext[l=o<l&&s<l?2:o<s?1:0],s=fromRotationMatrixNext[o],a=Math.sqrt(e[Matrix3.getElementIndex(l,l)]-e[Matrix3.getElementIndex(o,o)]-e[Matrix3.getElementIndex(s,s)]+1),(u=fromRotationMatrixQuat)[l]=.5*a,a=.5/a,n=(e[Matrix3.getElementIndex(s,o)]-e[Matrix3.getElementIndex(o,s)])*a,u[o]=(e[Matrix3.getElementIndex(o,l)]+e[Matrix3.getElementIndex(l,o)])*a,u[s]=(e[Matrix3.getElementIndex(s,l)]+e[Matrix3.getElementIndex(l,s)])*a,i=-u[0],r=-u[1],-u[2]);return defined(t)?(t.x=i,t.y=r,t.z=u,t.w=n,t):new Quaternion(i,r,u,n)};var scratchHPRQuaternion=new Quaternion,scratchHeadingQuaternion=new Quaternion,scratchPitchQuaternion=new Quaternion,scratchRollQuaternion=new Quaternion;Quaternion.fromHeadingPitchRoll=function(e,t){return scratchRollQuaternion=Quaternion.fromAxisAngle(Cartesian3.UNIT_X,e.roll,scratchHPRQuaternion),scratchPitchQuaternion=Quaternion.fromAxisAngle(Cartesian3.UNIT_Y,-e.pitch,t),t=Quaternion.multiply(scratchPitchQuaternion,scratchRollQuaternion,scratchPitchQuaternion),scratchHeadingQuaternion=Quaternion.fromAxisAngle(Cartesian3.UNIT_Z,-e.heading,scratchHPRQuaternion),Quaternion.multiply(scratchHeadingQuaternion,t,t)};var sampledQuaternionAxis=new Cartesian3,sampledQuaternionRotation=new Cartesian3,sampledQuaternionTempQuaternion=new Quaternion,sampledQuaternionQuaternion0=new Quaternion,sampledQuaternionQuaternion0Conjugate=new Quaternion;Quaternion.packedLength=4,Quaternion.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Quaternion.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Quaternion),i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3],i},Quaternion.packedInterpolationLength=3,Quaternion.convertPackedArrayForInterpolation=function(e,t,i,r){Quaternion.unpack(e,4*i,sampledQuaternionQuaternion0Conjugate),Quaternion.conjugate(sampledQuaternionQuaternion0Conjugate,sampledQuaternionQuaternion0Conjugate);for(var n=0,a=i-t+1;n<a;n++){var o=3*n;Quaternion.unpack(e,4*(t+n),sampledQuaternionTempQuaternion),Quaternion.multiply(sampledQuaternionTempQuaternion,sampledQuaternionQuaternion0Conjugate,sampledQuaternionTempQuaternion),sampledQuaternionTempQuaternion.w<0&&Quaternion.negate(sampledQuaternionTempQuaternion,sampledQuaternionTempQuaternion),Quaternion.computeAxis(sampledQuaternionTempQuaternion,sampledQuaternionAxis);var s=Quaternion.computeAngle(sampledQuaternionTempQuaternion);defined(r)||(r=[]),r[o]=sampledQuaternionAxis.x*s,r[1+o]=sampledQuaternionAxis.y*s,r[2+o]=sampledQuaternionAxis.z*s}},Quaternion.unpackInterpolationResult=function(e,t,i,r,n){return defined(n)||(n=new Quaternion),Cartesian3.fromArray(e,0,sampledQuaternionRotation),e=Cartesian3.magnitude(sampledQuaternionRotation),Quaternion.unpack(t,4*r,sampledQuaternionQuaternion0),0===e?Quaternion.clone(Quaternion.IDENTITY,sampledQuaternionTempQuaternion):Quaternion.fromAxisAngle(sampledQuaternionRotation,e,sampledQuaternionTempQuaternion),Quaternion.multiply(sampledQuaternionTempQuaternion,sampledQuaternionQuaternion0,n)},Quaternion.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Quaternion(e.x,e.y,e.z,e.w)},Quaternion.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},Quaternion.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Quaternion.magnitude=function(e){return Math.sqrt(Quaternion.magnitudeSquared(e))},Quaternion.normalize=function(e,t){var i=1/Quaternion.magnitude(e),r=e.x*i,n=e.y*i,a=e.z*i;i=e.w*i;return t.x=r,t.y=n,t.z=a,t.w=i,t},Quaternion.inverse=function(e,t){var i=Quaternion.magnitudeSquared(e);return t=Quaternion.conjugate(e,t),Quaternion.multiplyByScalar(t,1/i,t)},Quaternion.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},Quaternion.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},Quaternion.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Quaternion.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Quaternion.multiply=function(e,t,i){var r=e.x,n=e.y,a=e.z,o=e.w,s=t.x,l=t.y,c=t.z,u=t.w,d=o*s+r*u+n*c-a*l;e=o*l-r*c+n*u+a*s,t=o*c+r*l-n*s+a*u,c=o*u-r*s-n*l-a*c;return i.x=d,i.y=e,i.z=t,i.w=c,i},Quaternion.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},Quaternion.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},Quaternion.computeAxis=function(e,t){var i=e.w;return Math.abs(i-1)<CesiumMath.EPSILON6?(t.x=t.y=t.z=0,t):(i=1/Math.sqrt(1-i*i),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t)},Quaternion.computeAngle=function(e){return Math.abs(e.w-1)<CesiumMath.EPSILON6?0:2*Math.acos(e.w)};var lerpScratch$3=new Quaternion;Quaternion.lerp=function(e,t,i,r){return lerpScratch$3=Quaternion.multiplyByScalar(t,i,lerpScratch$3),r=Quaternion.multiplyByScalar(e,1-i,r),Quaternion.add(lerpScratch$3,r,r)};var slerpEndNegated=new Quaternion,slerpScaledP=new Quaternion,slerpScaledR=new Quaternion;Quaternion.slerp=function(e,t,i,r){var n=Quaternion.dot(e,t),a=t;return n<0&&(n=-n,a=slerpEndNegated=Quaternion.negate(t,slerpEndNegated)),1-n<CesiumMath.EPSILON6?Quaternion.lerp(e,a,i,r):(n=Math.acos(n),slerpScaledP=Quaternion.multiplyByScalar(e,Math.sin((1-i)*n),slerpScaledP),slerpScaledR=Quaternion.multiplyByScalar(a,Math.sin(i*n),slerpScaledR),r=Quaternion.add(slerpScaledP,slerpScaledR,r),Quaternion.multiplyByScalar(r,1/Math.sin(n),r))},Quaternion.log=function(e,t){var i=CesiumMath.acosClamped(e.w),r=0;return 0!==i&&(r=i/Math.sin(i)),Cartesian3.multiplyByScalar(e,r,t)},Quaternion.exp=function(e,t){var i=Cartesian3.magnitude(e),r=0;return 0!==i&&(r=Math.sin(i)/i),t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t.w=Math.cos(i),t};var squadScratchCartesian0=new Cartesian3,squadScratchCartesian1=new Cartesian3,squadScratchQuaternion0=new Quaternion,squadScratchQuaternion1=new Quaternion;Quaternion.computeInnerQuadrangle=function(e,t,i,r){var n=Quaternion.conjugate(t,squadScratchQuaternion0);return Quaternion.multiply(n,i,squadScratchQuaternion1),i=Quaternion.log(squadScratchQuaternion1,squadScratchCartesian0),Quaternion.multiply(n,e,squadScratchQuaternion1),e=Quaternion.log(squadScratchQuaternion1,squadScratchCartesian1),Cartesian3.add(i,e,i),Cartesian3.multiplyByScalar(i,.25,i),Cartesian3.negate(i,i),Quaternion.exp(i,squadScratchQuaternion0),Quaternion.multiply(t,squadScratchQuaternion0,r)},Quaternion.squad=function(e,t,i,r,n,a){return t=Quaternion.slerp(e,t,n,squadScratchQuaternion0),r=Quaternion.slerp(i,r,n,squadScratchQuaternion1),Quaternion.slerp(t,r,2*n*(1-n),a)};for(var fastSlerpScratchQuaternion=new Quaternion,opmu=1.9011074535173003,u=FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],v=FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],bT=FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],bD=FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],i=0;i<7;++i){var s=i+1,t=2*s+1;u[i]=1/(s*t),v[i]=s/t}u[7]=opmu/136,v[7]=8*opmu/17,Quaternion.fastSlerp=function(e,t,i,r){var n;0<=(a=Quaternion.dot(e,t))?n=1:(n=-1,a=-a);for(var a,o=a-1,s=i*i,l=(a=1-i)*a,c=7;0<=c;--c)bT[c]=(u[c]*s-v[c])*o,bD[c]=(u[c]*l-v[c])*o;return i=n*i*(1+bT[0]*(1+bT[1]*(1+bT[2]*(1+bT[3]*(1+bT[4]*(1+bT[5]*(1+bT[6]*(1+bT[7])))))))),a*=1+bD[0]*(1+bD[1]*(1+bD[2]*(1+bD[3]*(1+bD[4]*(1+bD[5]*(1+bD[6]*(1+bD[7]))))))),a=Quaternion.multiplyByScalar(e,a,fastSlerpScratchQuaternion),Quaternion.multiplyByScalar(t,i,r),Quaternion.add(a,r,r)},Quaternion.fastSquad=function(e,t,i,r,n,a){return t=Quaternion.fastSlerp(e,t,n,squadScratchQuaternion0),r=Quaternion.fastSlerp(i,r,n,squadScratchQuaternion1),Quaternion.fastSlerp(t,r,2*n*(1-n),a)},Quaternion.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Quaternion.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e.x-t.x)<=i&&Math.abs(e.y-t.y)<=i&&Math.abs(e.z-t.z)<=i&&Math.abs(e.w-t.w)<=i},Quaternion.ZERO=Object.freeze(new Quaternion(0,0,0,0)),Quaternion.IDENTITY=Object.freeze(new Quaternion(0,0,0,1)),Quaternion.prototype.clone=function(e){return Quaternion.clone(this,e)},Quaternion.prototype.equals=function(e){return Quaternion.equals(this,e)},Quaternion.prototype.equalsEpsilon=function(e,t){return Quaternion.equalsEpsilon(this,e,t)},Quaternion.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var Transforms={},vectorProductLocalFrame={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},degeneratePositionLocalFrame={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},localFrameToFixedFrameCache={},scratchCalculateCartesian={east:new Cartesian3,north:new Cartesian3,up:new Cartesian3,west:new Cartesian3,south:new Cartesian3,down:new Cartesian3},scratchFirstCartesian=new Cartesian3,scratchSecondCartesian=new Cartesian3,scratchThirdCartesian=new Cartesian3;Transforms.localFrameToFixedFrameGenerator=function(e,t){if(!vectorProductLocalFrame.hasOwnProperty(e)||!vectorProductLocalFrame[e].hasOwnProperty(t))throw new DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,r=vectorProductLocalFrame[e][t],n=e+t;return defined(localFrameToFixedFrameCache[n])?i=localFrameToFixedFrameCache[n]:(i=function(i,n,a){var o;return defined(a)||(a=new Matrix4),Cartesian3.equalsEpsilon(i,Cartesian3.ZERO,CesiumMath.EPSILON14)?(Cartesian3.unpack(degeneratePositionLocalFrame[e],0,scratchFirstCartesian),Cartesian3.unpack(degeneratePositionLocalFrame[t],0,scratchSecondCartesian),Cartesian3.unpack(degeneratePositionLocalFrame[r],0,scratchThirdCartesian)):CesiumMath.equalsEpsilon(i.x,0,CesiumMath.EPSILON14)&&CesiumMath.equalsEpsilon(i.y,0,CesiumMath.EPSILON14)?(o=CesiumMath.sign(i.z),Cartesian3.unpack(degeneratePositionLocalFrame[e],0,scratchFirstCartesian),"east"!==e&&"west"!==e&&Cartesian3.multiplyByScalar(scratchFirstCartesian,o,scratchFirstCartesian),Cartesian3.unpack(degeneratePositionLocalFrame[t],0,scratchSecondCartesian),"east"!==t&&"west"!==t&&Cartesian3.multiplyByScalar(scratchSecondCartesian,o,scratchSecondCartesian),Cartesian3.unpack(degeneratePositionLocalFrame[r],0,scratchThirdCartesian),"east"!==r&&"west"!==r&&Cartesian3.multiplyByScalar(scratchThirdCartesian,o,scratchThirdCartesian)):((n=defaultValue(n,Ellipsoid.WGS84)).geodeticSurfaceNormal(i,scratchCalculateCartesian.up),o=scratchCalculateCartesian.up,(n=scratchCalculateCartesian.east).x=-i.y,n.y=i.x,n.z=0,Cartesian3.normalize(n,scratchCalculateCartesian.east),Cartesian3.cross(o,n,scratchCalculateCartesian.north),Cartesian3.multiplyByScalar(scratchCalculateCartesian.up,-1,scratchCalculateCartesian.down),Cartesian3.multiplyByScalar(scratchCalculateCartesian.east,-1,scratchCalculateCartesian.west),Cartesian3.multiplyByScalar(scratchCalculateCartesian.north,-1,scratchCalculateCartesian.south),scratchFirstCartesian=scratchCalculateCartesian[e],scratchSecondCartesian=scratchCalculateCartesian[t],scratchThirdCartesian=scratchCalculateCartesian[r]),a[0]=scratchFirstCartesian.x,a[1]=scratchFirstCartesian.y,a[2]=scratchFirstCartesian.z,a[3]=0,a[4]=scratchSecondCartesian.x,a[5]=scratchSecondCartesian.y,a[6]=scratchSecondCartesian.z,a[7]=0,a[8]=scratchThirdCartesian.x,a[9]=scratchThirdCartesian.y,a[10]=scratchThirdCartesian.z,a[11]=0,a[12]=i.x,a[13]=i.y,a[14]=i.z,a[15]=1,a},localFrameToFixedFrameCache[n]=i),i},Transforms.eastNorthUpToFixedFrame=Transforms.localFrameToFixedFrameGenerator("east","north"),Transforms.northEastDownToFixedFrame=Transforms.localFrameToFixedFrameGenerator("north","east"),Transforms.northUpEastToFixedFrame=Transforms.localFrameToFixedFrameGenerator("north","up"),Transforms.northWestUpToFixedFrame=Transforms.localFrameToFixedFrameGenerator("north","west");var scratchHPRQuaternion$1=new Quaternion,scratchScale$2=new Cartesian3(1,1,1),scratchHPRMatrix4=new Matrix4;Transforms.headingPitchRollToFixedFrame=function(e,t,i,r,n){return r=defaultValue(r,Transforms.eastNorthUpToFixedFrame),t=Quaternion.fromHeadingPitchRoll(t,scratchHPRQuaternion$1),t=Matrix4.fromTranslationQuaternionRotationScale(Cartesian3.ZERO,t,scratchScale$2,scratchHPRMatrix4),n=r(e,i,n),Matrix4.multiply(n,t,n)};var scratchENUMatrix4=new Matrix4,scratchHPRMatrix3=new Matrix3;Transforms.headingPitchRollQuaternion=function(e,t,i,r,n){return r=Transforms.headingPitchRollToFixedFrame(e,t,i,r,scratchENUMatrix4),r=Matrix4.getMatrix3(r,scratchHPRMatrix3),Quaternion.fromRotationMatrix(r,n)};var noScale=new Cartesian3(1,1,1),hprCenterScratch=new Cartesian3,ffScratch=new Matrix4,hprTransformScratch=new Matrix4,hprRotationScratch=new Matrix3,hprQuaternionScratch=new Quaternion;Transforms.fixedFrameToHeadingPitchRoll=function(e,t,i,r){t=defaultValue(t,Ellipsoid.WGS84),i=defaultValue(i,Transforms.eastNorthUpToFixedFrame),defined(r)||(r=new HeadingPitchRoll);var n=Matrix4.getTranslation(e,hprCenterScratch);return Cartesian3.equals(n,Cartesian3.ZERO)?(r.heading=0,r.pitch=0,r.roll=0,r):(t=Matrix4.inverseTransformation(i(n,t,ffScratch),ffScratch),e=Matrix4.setScale(e,noScale,hprTransformScratch),e=Matrix4.setTranslation(e,Cartesian3.ZERO,e),t=Matrix4.multiply(t,e,t),t=Quaternion.fromRotationMatrix(Matrix4.getMatrix3(t,hprRotationScratch),hprQuaternionScratch),t=Quaternion.normalize(t,t),HeadingPitchRoll.fromQuaternion(t,r))};var gmstConstant0=24110.54841,gmstConstant1=8640184.812866,gmstConstant2=.093104,gmstConstant3=-62e-7,rateCoef=11772758384668e-32,wgs84WRPrecessing=72921158553e-15,twoPiOverSecondsInDay=CesiumMath.TWO_PI/86400,dateInUtc=new JulianDate;Transforms.computeTemeToPseudoFixedMatrix=function(e,t){e=(i=(dateInUtc=JulianDate.addSeconds(e,-JulianDate.computeTaiMinusUtc(e),dateInUtc)).dayNumber)-2451545,e=43200<=(r=dateInUtc.secondsOfDay)?(.5+e)/TimeConstants$1.DAYS_PER_JULIAN_CENTURY:(e-.5)/TimeConstants$1.DAYS_PER_JULIAN_CENTURY;var i=(gmstConstant0+e*(gmstConstant1+e*(gmstConstant2+e*gmstConstant3)))*twoPiOverSecondsInDay%CesiumMath.TWO_PI+(wgs84WRPrecessing+rateCoef*(i-2451545.5))*((r+.5*TimeConstants$1.SECONDS_PER_DAY)%TimeConstants$1.SECONDS_PER_DAY),r=Math.cos(i);i=Math.sin(i);return defined(t)?(t[0]=r,t[1]=-i,t[2]=0,t[3]=i,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Matrix3(r,i,0,-i,r,0,0,0,1)},Transforms.iau2006XysData=new Iau2006XysData,Transforms.earthOrientationParameters=EarthOrientationParameters.NONE;var ttMinusTai=32.184,j2000ttDays=2451545;Transforms.preloadIcrfFixed=function(e){var t=e.start.dayNumber,i=e.start.secondsOfDay+ttMinusTai,r=e.stop.dayNumber;e=e.stop.secondsOfDay+ttMinusTai,r=Transforms.iau2006XysData.preload(t,i,r,e),e=Transforms.earthOrientationParameters.getPromiseToLoad();return when.all([r,e])},Transforms.computeIcrfToFixedMatrix=function(e,t){if(defined(t)||(t=new Matrix3),defined(e=Transforms.computeFixedToIcrfMatrix(e,t)))return Matrix3.transpose(e,t)};var xysScratch=new Iau2006XysSample(0,0,0),eopScratch=new EarthOrientationParametersSample(0,0,0,0,0,0),rotation1Scratch=new Matrix3,rotation2Scratch=new Matrix3;Transforms.computeFixedToIcrfMatrix=function(e,t){defined(t)||(t=new Matrix3);var i=Transforms.earthOrientationParameters.compute(e,eopScratch);if(defined(i)){var r=e.dayNumber,n=e.secondsOfDay+ttMinusTai,a=Transforms.iau2006XysData.computeXysRadians(r,n,xysScratch);if(defined(a)){var o=a.x+i.xPoleOffset,s=a.y+i.yPoleOffset,l=1/(1+Math.sqrt(1-o*o-s*s)),c=rotation1Scratch;return c[0]=1-l*o*o,c[3]=-l*o*s,c[6]=o,c[1]=-l*o*s,c[4]=1-l*s*s,c[7]=s,c[2]=-o,c[5]=-s,c[8]=1-l*(o*o+s*s),o=Matrix3.fromRotationZ(-a.s,rotation2Scratch),s=Matrix3.multiply(c,o,rotation1Scratch),a=e.dayNumber-2451545,o=(o=.779057273264+(c=(e.secondsOfDay-JulianDate.computeTaiMinusUtc(e)+i.ut1MinusUtc)/TimeConstants$1.SECONDS_PER_DAY)+.00273781191135448*(a+c))%1*CesiumMath.TWO_PI,e=Matrix3.fromRotationZ(o,rotation2Scratch),a=Matrix3.multiply(s,e,rotation1Scratch),c=Math.cos(i.xPoleWander),o=Math.cos(i.yPoleWander),s=Math.sin(i.xPoleWander),e=Math.sin(i.yPoleWander),i=r-j2000ttDays+n/TimeConstants$1.SECONDS_PER_DAY,r=-47e-6*(i/=36525)*CesiumMath.RADIANS_PER_DEGREE/3600,n=Math.cos(r),i=Math.sin(r),(r=rotation2Scratch)[0]=c*n,r[1]=c*i,r[2]=s,r[3]=-o*i+e*s*n,r[4]=o*n+e*s*i,r[5]=-e*c,r[6]=-e*i-o*s*n,r[7]=e*n-o*s*i,r[8]=o*c,Matrix3.multiply(a,r,t)}}};var pointToWindowCoordinatesTemp=new Cartesian4;Transforms.pointToWindowCoordinates=function(e,t,i,r){return(r=Transforms.pointToGLWindowCoordinates(e,t,i,r)).y=2*t[5]-r.y,r},Transforms.pointToGLWindowCoordinates=function(e,t,i,r){defined(r)||(r=new Cartesian2);var n=pointToWindowCoordinatesTemp;return Matrix4.multiplyByVector(e,Cartesian4.fromElements(i.x,i.y,i.z,1,n),n),Cartesian4.multiplyByScalar(n,1/n.w,n),Matrix4.multiplyByVector(t,n,n),Cartesian2.fromCartesian4(n,r)};var normalScratch=new Cartesian3,rightScratch=new Cartesian3,upScratch=new Cartesian3;Transforms.rotationMatrixFromPositionVelocity=function(e,t,i,r){return i=defaultValue(i,Ellipsoid.WGS84).geodeticSurfaceNormal(e,normalScratch),e=Cartesian3.cross(t,i,rightScratch),Cartesian3.equalsEpsilon(e,Cartesian3.ZERO,CesiumMath.EPSILON6)&&(e=Cartesian3.clone(Cartesian3.UNIT_X,e)),i=Cartesian3.cross(e,t,upScratch),Cartesian3.normalize(i,i),Cartesian3.cross(t,i,e),Cartesian3.negate(e,e),Cartesian3.normalize(e,e),defined(r)||(r=new Matrix3),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=e.x,r[4]=e.y,r[5]=e.z,r[6]=i.x,r[7]=i.y,r[8]=i.z,r};var swizzleMatrix=new Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),scratchCartographic=new Cartographic,scratchCartesian3Projection=new Cartesian3,scratchCenter=new Cartesian3,scratchRotation=new Matrix3,scratchFromENU=new Matrix4,scratchToENU=new Matrix4;Transforms.basisTo2D=function(e,t,i){var r=Matrix4.getTranslation(t,scratchCenter),n=e.ellipsoid,a=n.cartesianToCartographic(r,scratchCartographic);a=e.project(a,scratchCartesian3Projection);return Cartesian3.fromElements(a.z,a.x,a.y,a),n=Transforms.eastNorthUpToFixedFrame(r,n,scratchFromENU),n=Matrix4.inverseTransformation(n,scratchToENU),t=Matrix4.getMatrix3(t,scratchRotation),t=Matrix4.multiplyByMatrix3(n,t,i),Matrix4.multiply(swizzleMatrix,t,i),Matrix4.setTranslation(i,a,i),i},Transforms.wgs84To2DModelMatrix=function(e,t,i){var r=e.ellipsoid,n=Transforms.eastNorthUpToFixedFrame(t,r,scratchFromENU);n=Matrix4.inverseTransformation(n,scratchToENU),t=r.cartesianToCartographic(t,scratchCartographic),t=e.project(t,scratchCartesian3Projection);return Cartesian3.fromElements(t.z,t.x,t.y,t),t=Matrix4.fromTranslation(t,scratchFromENU),Matrix4.multiply(swizzleMatrix,n,i),Matrix4.multiply(t,i,i),i};var scratchCart4=new Cartesian4;function EllipsoidTangentPlane(e,t){e=(t=defaultValue(t,Ellipsoid.WGS84)).scaleToGeodeticSurface(e);var i=Transforms.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=Cartesian3.fromCartesian4(Matrix4.getColumn(i,0,scratchCart4)),this._yAxis=Cartesian3.fromCartesian4(Matrix4.getColumn(i,1,scratchCart4)),i=Cartesian3.fromCartesian4(Matrix4.getColumn(i,2,scratchCart4)),this._plane=Plane.fromPointNormal(e,i)}Object.defineProperties(EllipsoidTangentPlane.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var tmp=new AxisAlignedBoundingBox;EllipsoidTangentPlane.fromPoints=function(e,t){return new EllipsoidTangentPlane(AxisAlignedBoundingBox.fromPoints(e,tmp).center,t)};var scratchProjectPointOntoPlaneRay=new Ray,scratchProjectPointOntoPlaneCartesian3=new Cartesian3;EllipsoidTangentPlane.prototype.projectPointOntoPlane=function(e,t){var i=scratchProjectPointOntoPlaneRay;if(i.origin=e,Cartesian3.normalize(e,i.direction),defined(e=IntersectionTests.rayPlane(i,this._plane,scratchProjectPointOntoPlaneCartesian3))||(Cartesian3.negate(i.direction,i.direction),e=IntersectionTests.rayPlane(i,this._plane,scratchProjectPointOntoPlaneCartesian3)),defined(e))return i=Cartesian3.subtract(e,this._origin,e),e=Cartesian3.dot(this._xAxis,i),i=Cartesian3.dot(this._yAxis,i),defined(t)?(t.x=e,t.y=i,t):new Cartesian2(e,i)},EllipsoidTangentPlane.prototype.projectPointsOntoPlane=function(e,t){defined(t)||(t=[]);for(var i=0,r=e.length,n=0;n<r;n++){var a=this.projectPointOntoPlane(e[n],t[i]);defined(a)&&(t[i]=a,i++)}return t.length=i,t},EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane=function(e,t){defined(t)||(t=new Cartesian2);var i=scratchProjectPointOntoPlaneRay;return i.origin=e,Cartesian3.clone(this._plane.normal,i.direction),defined(e=IntersectionTests.rayPlane(i,this._plane,scratchProjectPointOntoPlaneCartesian3))||(Cartesian3.negate(i.direction,i.direction),e=IntersectionTests.rayPlane(i,this._plane,scratchProjectPointOntoPlaneCartesian3)),i=Cartesian3.subtract(e,this._origin,e),e=Cartesian3.dot(this._xAxis,i),i=Cartesian3.dot(this._yAxis,i),t.x=e,t.y=i,t},EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane=function(e,t){defined(t)||(t=[]);var i=e.length;t.length=i;for(var r=0;r<i;r++)t[r]=this.projectPointToNearestOnPlane(e[r],t[r]);return t};var projectPointsOntoEllipsoidScratch=new Cartesian3;function OrientedBoundingBox(e,t){this.center=Cartesian3.clone(defaultValue(e,Cartesian3.ZERO)),this.halfAxes=Matrix3.clone(defaultValue(t,Matrix3.ZERO))}EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid=function(e,t){defined(t)||(t=new Cartesian3);var i=this._ellipsoid,r=this._origin,n=this._xAxis,a=this._yAxis,o=projectPointsOntoEllipsoidScratch;return Cartesian3.multiplyByScalar(n,e.x,o),t=Cartesian3.add(r,o,t),Cartesian3.multiplyByScalar(a,e.y,o),Cartesian3.add(t,o,t),i.scaleToGeocentricSurface(t,t),t},EllipsoidTangentPlane.prototype.projectPointsOntoEllipsoid=function(e,t){var i=e.length;defined(t)?t.length=i:t=new Array(i);for(var r=0;r<i;++r)t[r]=this.projectPointOntoEllipsoid(e[r],t[r]);return t},OrientedBoundingBox.packedLength=Cartesian3.packedLength+Matrix3.packedLength,OrientedBoundingBox.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e.center,t,i),Matrix3.pack(e.halfAxes,t,i+Cartesian3.packedLength),t},OrientedBoundingBox.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new OrientedBoundingBox),Cartesian3.unpack(e,t,i.center),Matrix3.unpack(e,t+Cartesian3.packedLength,i.halfAxes),i};var scratchCartesian1=new Cartesian3,scratchCartesian2=new Cartesian3,scratchCartesian3$1=new Cartesian3,scratchCartesian4=new Cartesian3,scratchCartesian5=new Cartesian3,scratchCartesian6=new Cartesian3,scratchCovarianceResult=new Matrix3,scratchEigenResult={unitary:new Matrix3,diagonal:new Matrix3};OrientedBoundingBox.fromPoints=function(e,t){if(defined(t)||(t=new OrientedBoundingBox),!defined(e)||0===e.length)return t.halfAxes=Matrix3.ZERO,t.center=Cartesian3.ZERO,t;for(var i=e.length,r=Cartesian3.clone(e[0],scratchCartesian1),n=1;n<i;n++)Cartesian3.add(r,e[n],r);var a=1/i;Cartesian3.multiplyByScalar(r,a,r);var o,s=0,l=0,c=0,u=0,d=0,h=0;for(n=0;n<i;n++)s+=(o=Cartesian3.subtract(e[n],r,scratchCartesian2)).x*o.x,l+=o.x*o.y,c+=o.x*o.z,u+=o.y*o.y,d+=o.y*o.z,h+=o.z*o.z;s*=a,l*=a,c*=a,u*=a,d*=a,h*=a,(a=scratchCovarianceResult)[0]=s,a[1]=l,a[2]=c,a[3]=l,a[4]=u,a[5]=d,a[6]=c,a[7]=d,a[8]=h;a=Matrix3.computeEigenDecomposition(a,scratchEigenResult),a=Matrix3.clone(a.unitary,t.halfAxes);var p=Matrix3.getColumn(a,0,scratchCartesian4),f=Matrix3.getColumn(a,1,scratchCartesian5),m=Matrix3.getColumn(a,2,scratchCartesian6),g=-Number.MAX_VALUE,y=-Number.MAX_VALUE,_=-Number.MAX_VALUE,v=Number.MAX_VALUE,C=Number.MAX_VALUE,x=Number.MAX_VALUE;for(n=0;n<i;n++)o=e[n],g=Math.max(Cartesian3.dot(p,o),g),y=Math.max(Cartesian3.dot(f,o),y),_=Math.max(Cartesian3.dot(m,o),_),v=Math.min(Cartesian3.dot(p,o),v),C=Math.min(Cartesian3.dot(f,o),C),x=Math.min(Cartesian3.dot(m,o),x);return p=Cartesian3.multiplyByScalar(p,.5*(v+g),p),f=Cartesian3.multiplyByScalar(f,.5*(C+y),f),m=Cartesian3.multiplyByScalar(m,.5*(x+_),m),a=Cartesian3.add(p,f,t.center),Cartesian3.add(a,m,a),(a=scratchCartesian3$1).x=g-v,a.y=y-C,a.z=_-x,Cartesian3.multiplyByScalar(a,.5,a),Matrix3.multiplyByScale(t.halfAxes,a,t.halfAxes),t};var scratchOffset=new Cartesian3,scratchScale$3=new Cartesian3;function fromPlaneExtents(e,t,i,r,n,a,o,s,l,c,u){defined(u)||(u=new OrientedBoundingBox);var d=u.halfAxes;return Matrix3.setColumn(d,0,t,d),Matrix3.setColumn(d,1,i,d),Matrix3.setColumn(d,2,r,d),(i=scratchOffset).x=(n+a)/2,i.y=(o+s)/2,i.z=(l+c)/2,(r=scratchScale$3).x=(a-n)/2,r.y=(s-o)/2,r.z=(c-l)/2,l=u.center,i=Matrix3.multiplyByVector(d,i,i),Cartesian3.add(e,i,l),Matrix3.multiplyByScale(d,r,d),u}var scratchRectangleCenterCartographic=new Cartographic,scratchRectangleCenter=new Cartesian3,scratchPerimeterCartographicNC=new Cartographic,scratchPerimeterCartographicNW=new Cartographic,scratchPerimeterCartographicCW=new Cartographic,scratchPerimeterCartographicSW=new Cartographic,scratchPerimeterCartographicSC=new Cartographic,scratchPerimeterCartesianNC=new Cartesian3,scratchPerimeterCartesianNW=new Cartesian3,scratchPerimeterCartesianCW=new Cartesian3,scratchPerimeterCartesianSW=new Cartesian3,scratchPerimeterCartesianSC=new Cartesian3,scratchPerimeterProjectedNC=new Cartesian2,scratchPerimeterProjectedNW=new Cartesian2,scratchPerimeterProjectedCW=new Cartesian2,scratchPerimeterProjectedSW=new Cartesian2,scratchPerimeterProjectedSC=new Cartesian2,scratchPlaneOrigin=new Cartesian3,scratchPlaneNormal=new Cartesian3,scratchPlaneXAxis=new Cartesian3,scratchHorizonCartesian=new Cartesian3,scratchHorizonProjected=new Cartesian2,scratchMaxY=new Cartesian3,scratchMinY=new Cartesian3,scratchZ=new Cartesian3,scratchPlane=new Plane(Cartesian3.UNIT_X,0);OrientedBoundingBox.fromRectangle=function(e,t,i,r,n){if(t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,Ellipsoid.WGS84),e.width<=CesiumMath.PI){var a=Rectangle.center(e,scratchRectangleCenterCartographic),o=new EllipsoidTangentPlane(r.cartographicToCartesian(a,scratchRectangleCenter),r),s=o.plane,l=a.longitude,c=e.south<0&&0<e.north?0:a.latitude,u=Cartographic.fromRadians(l,e.north,i,scratchPerimeterCartographicNC),d=Cartographic.fromRadians(e.west,e.north,i,scratchPerimeterCartographicNW),h=Cartographic.fromRadians(e.west,c,i,scratchPerimeterCartographicCW),p=Cartographic.fromRadians(e.west,e.south,i,scratchPerimeterCartographicSW),f=Cartographic.fromRadians(l,e.south,i,scratchPerimeterCartographicSC),m=r.cartographicToCartesian(u,scratchPerimeterCartesianNC),g=r.cartographicToCartesian(d,scratchPerimeterCartesianNW),y=r.cartographicToCartesian(h,scratchPerimeterCartesianCW),_=r.cartographicToCartesian(p,scratchPerimeterCartesianSW),v=r.cartographicToCartesian(f,scratchPerimeterCartesianSC);a=o.projectPointToNearestOnPlane(m,scratchPerimeterProjectedNC),c=o.projectPointToNearestOnPlane(g,scratchPerimeterProjectedNW),l=o.projectPointToNearestOnPlane(y,scratchPerimeterProjectedCW),u=o.projectPointToNearestOnPlane(_,scratchPerimeterProjectedSW),h=o.projectPointToNearestOnPlane(v,scratchPerimeterProjectedSC),m=-(f=Math.min(c.x,l.x,u.x)),y=Math.max(c.y,a.y),v=Math.min(u.y,h.y);return d.height=p.height=t,g=r.cartographicToCartesian(d,scratchPerimeterCartesianNW),_=r.cartographicToCartesian(p,scratchPerimeterCartesianSW),l=Math.min(Plane.getPointDistance(s,g),Plane.getPointDistance(s,_)),c=i,fromPlaneExtents(o.origin,o.xAxis,o.yAxis,o.zAxis,f,m,v,y,l,c,n)}return a=0<e.south,u=e.north<0,h=a?e.south:u?e.north:0,d=Rectangle.center(e,scratchRectangleCenterCartographic).longitude,(p=Cartesian3.fromRadians(d,h,i,r,scratchPlaneOrigin)).z=0,g=Math.abs(p.x)<CesiumMath.EPSILON10&&Math.abs(p.y)<CesiumMath.EPSILON10?Cartesian3.UNIT_X:Cartesian3.normalize(p,scratchPlaneNormal),_=Cartesian3.UNIT_Z,o=Cartesian3.cross(g,_,scratchPlaneXAxis),s=Plane.fromPointNormal(p,g,scratchPlane),d=Cartesian3.fromRadians(d+CesiumMath.PI_OVER_TWO,h,i,r,scratchHorizonCartesian),f=-(m=Cartesian3.dot(Plane.projectPointOntoPlane(s,d,scratchHorizonProjected),o)),y=Cartesian3.fromRadians(0,e.north,u?t:i,r,scratchMaxY).z,v=Cartesian3.fromRadians(0,e.south,a?t:i,r,scratchMinY).z,r=Cartesian3.fromRadians(e.east,h,i,r,scratchZ),fromPlaneExtents(p,o,_,g,f,m,v,y,l=Plane.getPointDistance(s,r),c=0,n)},OrientedBoundingBox.clone=function(e,t){if(defined(e))return defined(t)?(Cartesian3.clone(e.center,t.center),Matrix3.clone(e.halfAxes,t.halfAxes),t):new OrientedBoundingBox(e.center,e.halfAxes)},OrientedBoundingBox.intersectPlane=function(e,t){var i=e.center,r=t.normal,n=e.halfAxes,a=r.x,o=r.y;e=r.z,n=Math.abs(a*n[Matrix3.COLUMN0ROW0]+o*n[Matrix3.COLUMN0ROW1]+e*n[Matrix3.COLUMN0ROW2])+Math.abs(a*n[Matrix3.COLUMN1ROW0]+o*n[Matrix3.COLUMN1ROW1]+e*n[Matrix3.COLUMN1ROW2])+Math.abs(a*n[Matrix3.COLUMN2ROW0]+o*n[Matrix3.COLUMN2ROW1]+e*n[Matrix3.COLUMN2ROW2]);return(t=Cartesian3.dot(r,i)+t.distance)<=-n?Intersect$1.OUTSIDE:n<=t?Intersect$1.INSIDE:Intersect$1.INTERSECTING};var scratchCartesianU=new Cartesian3,scratchCartesianV=new Cartesian3,scratchCartesianW=new Cartesian3,scratchPPrime=new Cartesian3;OrientedBoundingBox.distanceSquaredTo=function(e,t){var i=Cartesian3.subtract(t,e.center,scratchOffset),r=e.halfAxes,n=Matrix3.getColumn(r,0,scratchCartesianU),a=Matrix3.getColumn(r,1,scratchCartesianV),o=Matrix3.getColumn(r,2,scratchCartesianW),s=Cartesian3.magnitude(n);t=Cartesian3.magnitude(a),e=Cartesian3.magnitude(o);Cartesian3.normalize(n,n),Cartesian3.normalize(a,a),Cartesian3.normalize(o,o),(r=scratchPPrime).x=Cartesian3.dot(i,n),r.y=Cartesian3.dot(i,a),r.z=Cartesian3.dot(i,o);var l;o=0;return r.x<-s?o+=(l=r.x+s)*l:r.x>s&&(o+=(l=r.x-s)*l),r.y<-t?o+=(l=r.y+t)*l:r.y>t&&(o+=(l=r.y-t)*l),r.z<-e?o+=(l=r.z+e)*l:r.z>e&&(o+=(l=r.z-e)*l),o};var scratchCorner=new Cartesian3,scratchToCenter=new Cartesian3;OrientedBoundingBox.computePlaneDistances=function(e,t,i,r){defined(r)||(r=new Interval);var n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=e.center,s=e.halfAxes,l=Matrix3.getColumn(s,0,scratchCartesianU),c=Matrix3.getColumn(s,1,scratchCartesianV),u=Matrix3.getColumn(s,2,scratchCartesianW),d=Cartesian3.add(l,c,scratchCorner);return Cartesian3.add(d,u,d),Cartesian3.add(d,o,d),e=Cartesian3.subtract(d,t,scratchToCenter),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.add(o,l,d),Cartesian3.add(d,c,d),Cartesian3.subtract(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.add(o,l,d),Cartesian3.subtract(d,c,d),Cartesian3.add(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.add(o,l,d),Cartesian3.subtract(d,c,d),Cartesian3.subtract(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.subtract(o,l,d),Cartesian3.add(d,c,d),Cartesian3.add(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.subtract(o,l,d),Cartesian3.add(d,c,d),Cartesian3.subtract(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.subtract(o,l,d),Cartesian3.subtract(d,c,d),Cartesian3.add(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.subtract(o,l,d),Cartesian3.subtract(d,c,d),Cartesian3.subtract(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),r.start=n,r.stop=a,r};var scratchBoundingSphere$1=new BoundingSphere;OrientedBoundingBox.isOccluded=function(e,t){return e=BoundingSphere.fromOrientedBoundingBox(e,scratchBoundingSphere$1),!t.isBoundingSphereVisible(e)},OrientedBoundingBox.prototype.intersectPlane=function(e){return OrientedBoundingBox.intersectPlane(this,e)},OrientedBoundingBox.prototype.distanceSquaredTo=function(e){return OrientedBoundingBox.distanceSquaredTo(this,e)},OrientedBoundingBox.prototype.computePlaneDistances=function(e,t,i){return OrientedBoundingBox.computePlaneDistances(this,e,t,i)},OrientedBoundingBox.prototype.isOccluded=function(e){return OrientedBoundingBox.isOccluded(this,e)},OrientedBoundingBox.equals=function(e,t){return e===t||defined(e)&&defined(t)&&Cartesian3.equals(e.center,t.center)&&Matrix3.equals(e.halfAxes,t.halfAxes)},OrientedBoundingBox.prototype.clone=function(e){return OrientedBoundingBox.clone(this,e)},OrientedBoundingBox.prototype.equals=function(e){return OrientedBoundingBox.equals(this,e)};var RIGHT_SHIFT=1/256,LEFT_SHIFT=256,AttributeCompression={octEncodeInRange:function(e,t,i){var r;return i.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),i.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0&&(r=i.x,e=i.y,i.x=(1-Math.abs(e))*CesiumMath.signNotZero(r),i.y=(1-Math.abs(r))*CesiumMath.signNotZero(e)),i.x=CesiumMath.toSNorm(i.x,t),i.y=CesiumMath.toSNorm(i.y,t),i},octEncode:function(e,t){return AttributeCompression.octEncodeInRange(e,255,t)}},octEncodeScratch=new Cartesian2,uint8ForceArray=new Uint8Array(1);function forceUint8(e){return uint8ForceArray[0]=e,uint8ForceArray[0]}AttributeCompression.octEncodeToCartesian4=function(e,t){return AttributeCompression.octEncodeInRange(e,65535,octEncodeScratch),t.x=forceUint8(octEncodeScratch.x*RIGHT_SHIFT),t.y=forceUint8(octEncodeScratch.x),t.z=forceUint8(octEncodeScratch.y*RIGHT_SHIFT),t.w=forceUint8(octEncodeScratch.y),t},AttributeCompression.octDecodeInRange=function(e,t,i,r){return r.x=CesiumMath.fromSNorm(e,i),r.y=CesiumMath.fromSNorm(t,i),r.z=1-(Math.abs(r.x)+Math.abs(r.y)),r.z<0&&(i=r.x,r.x=(1-Math.abs(r.y))*CesiumMath.signNotZero(i),r.y=(1-Math.abs(i))*CesiumMath.signNotZero(r.y)),Cartesian3.normalize(r,r)},AttributeCompression.octDecode=function(e,t,i){return AttributeCompression.octDecodeInRange(e,t,255,i)},AttributeCompression.octDecodeFromCartesian4=function(e,t){var i=e.x,r=e.y,n=e.z;e=e.w,r=i*LEFT_SHIFT+r,e=n*LEFT_SHIFT+e;return AttributeCompression.octDecodeInRange(r,e,65535,t)},AttributeCompression.octPackFloat=function(e){return 256*e.x+e.y};var scratchEncodeCart2=new Cartesian2;function zigZagDecode(e){return e>>1^-(1&e)}AttributeCompression.octEncodeFloat=function(e){return AttributeCompression.octEncode(e,scratchEncodeCart2),AttributeCompression.octPackFloat(scratchEncodeCart2)},AttributeCompression.octDecodeFloat=function(e,t){var i=256*((i=e/256)-(e=Math.floor(i)));return AttributeCompression.octDecode(e,i,t)},AttributeCompression.octPack=function(e,t,i,r){return e=AttributeCompression.octEncodeFloat(e),t=AttributeCompression.octEncodeFloat(t),i=AttributeCompression.octEncode(i,scratchEncodeCart2),r.x=65536*i.x+e,r.y=65536*i.y+t,r},AttributeCompression.octUnpack=function(e,t,i,r){var n=e.x/65536,a=Math.floor(n),o=65536*(n-a);n=65536*((n=e.y/65536)-(e=Math.floor(n)));AttributeCompression.octDecodeFloat(o,t),AttributeCompression.octDecodeFloat(n,i),AttributeCompression.octDecode(a,e,r)},AttributeCompression.compressTextureCoordinates=function(e){return 4096*(4095*e.x|0)+(4095*e.y|0)},AttributeCompression.decompressTextureCoordinates=function(e,t){var i=e/4096;i=Math.floor(i);return t.x=i/4095,t.y=(e-4096*i)/4095,t},AttributeCompression.zigZagDeltaDecode=function(e,t,i){for(var r=e.length,n=0,a=0,o=0,s=0;s<r;++s)n+=zigZagDecode(e[s]),a+=zigZagDecode(t[s]),e[s]=n,t[s]=a,defined(i)&&(o+=zigZagDecode(i[s]),i[s]=o)};var WebGLConstants={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},WebGLConstants$1=Object.freeze(WebGLConstants),ComponentDatatype={BYTE:WebGLConstants$1.BYTE,UNSIGNED_BYTE:WebGLConstants$1.UNSIGNED_BYTE,SHORT:WebGLConstants$1.SHORT,UNSIGNED_SHORT:WebGLConstants$1.UNSIGNED_SHORT,INT:WebGLConstants$1.INT,UNSIGNED_INT:WebGLConstants$1.UNSIGNED_INT,FLOAT:WebGLConstants$1.FLOAT,DOUBLE:WebGLConstants$1.DOUBLE,getSizeInBytes:function(e){switch(e){case ComponentDatatype.BYTE:return Int8Array.BYTES_PER_ELEMENT;case ComponentDatatype.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case ComponentDatatype.SHORT:return Int16Array.BYTES_PER_ELEMENT;case ComponentDatatype.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case ComponentDatatype.INT:return Int32Array.BYTES_PER_ELEMENT;case ComponentDatatype.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case ComponentDatatype.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case ComponentDatatype.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}},fromTypedArray:function(e){return e instanceof Int8Array?ComponentDatatype.BYTE:e instanceof Uint8Array?ComponentDatatype.UNSIGNED_BYTE:e instanceof Int16Array?ComponentDatatype.SHORT:e instanceof Uint16Array?ComponentDatatype.UNSIGNED_SHORT:e instanceof Int32Array?ComponentDatatype.INT:e instanceof Uint32Array?ComponentDatatype.UNSIGNED_INT:e instanceof Float32Array?ComponentDatatype.FLOAT:e instanceof Float64Array?ComponentDatatype.DOUBLE:void 0},validate:function(e){return defined(e)&&(e===ComponentDatatype.BYTE||e===ComponentDatatype.UNSIGNED_BYTE||e===ComponentDatatype.SHORT||e===ComponentDatatype.UNSIGNED_SHORT||e===ComponentDatatype.INT||e===ComponentDatatype.UNSIGNED_INT||e===ComponentDatatype.FLOAT||e===ComponentDatatype.DOUBLE)},createTypedArray:function(e,t){switch(e){case ComponentDatatype.BYTE:return new Int8Array(t);case ComponentDatatype.UNSIGNED_BYTE:return new Uint8Array(t);case ComponentDatatype.SHORT:return new Int16Array(t);case ComponentDatatype.UNSIGNED_SHORT:return new Uint16Array(t);case ComponentDatatype.INT:return new Int32Array(t);case ComponentDatatype.UNSIGNED_INT:return new Uint32Array(t);case ComponentDatatype.FLOAT:return new Float32Array(t);case ComponentDatatype.DOUBLE:return new Float64Array(t)}},createArrayBufferView:function(e,t,i,r){switch(i=defaultValue(i,0),r=defaultValue(r,(t.byteLength-i)/ComponentDatatype.getSizeInBytes(e)),e){case ComponentDatatype.BYTE:return new Int8Array(t,i,r);case ComponentDatatype.UNSIGNED_BYTE:return new Uint8Array(t,i,r);case ComponentDatatype.SHORT:return new Int16Array(t,i,r);case ComponentDatatype.UNSIGNED_SHORT:return new Uint16Array(t,i,r);case ComponentDatatype.INT:return new Int32Array(t,i,r);case ComponentDatatype.UNSIGNED_INT:return new Uint32Array(t,i,r);case ComponentDatatype.FLOAT:return new Float32Array(t,i,r);case ComponentDatatype.DOUBLE:return new Float64Array(t,i,r)}},fromName:function(e){switch(e){case"BYTE":return ComponentDatatype.BYTE;case"UNSIGNED_BYTE":return ComponentDatatype.UNSIGNED_BYTE;case"SHORT":return ComponentDatatype.SHORT;case"UNSIGNED_SHORT":return ComponentDatatype.UNSIGNED_SHORT;case"INT":return ComponentDatatype.INT;case"UNSIGNED_INT":return ComponentDatatype.UNSIGNED_INT;case"FLOAT":return ComponentDatatype.FLOAT;case"DOUBLE":return ComponentDatatype.DOUBLE}}},ComponentDatatype$1=Object.freeze(ComponentDatatype),TerrainQuantization={NONE:0,BITS12:1},TerrainQuantization$1=Object.freeze(TerrainQuantization),cartesian3Scratch=new Cartesian3,cartesian3DimScratch=new Cartesian3,cartesian2Scratch=new Cartesian2,matrix4Scratch=new Matrix4,matrix4Scratch2=new Matrix4,SHIFT_LEFT_12=Math.pow(2,12);function TerrainEncoding(e,t,i,r,n,a){var o,s,l,c,u,d=TerrainQuantization$1.NONE;defined(e)&&defined(t)&&defined(i)&&defined(r)&&(c=e.minimum,s=e.maximum,u=Cartesian3.subtract(s,c,cartesian3DimScratch),l=i-t,d=Math.max(Cartesian3.maximumComponent(u),l)<SHIFT_LEFT_12-1?TerrainQuantization$1.BITS12:TerrainQuantization$1.NONE,o=e.center,s=Matrix4.inverseTransformation(r,new Matrix4),l=Cartesian3.negate(c,cartesian3Scratch),Matrix4.multiply(Matrix4.fromTranslation(l,matrix4Scratch),s,s),(l=cartesian3Scratch).x=1/u.x,l.y=1/u.y,l.z=1/u.z,Matrix4.multiply(Matrix4.fromScale(l,matrix4Scratch),s,s),l=Matrix4.clone(r),Matrix4.setTranslation(l,Cartesian3.ZERO,l),r=Matrix4.clone(r,new Matrix4),c=Matrix4.fromTranslation(c,matrix4Scratch),u=Matrix4.fromScale(u,matrix4Scratch2),u=Matrix4.multiply(c,u,matrix4Scratch),Matrix4.multiply(r,u,r),Matrix4.multiply(l,u,l)),this.quantization=d,this.minimumHeight=t,this.maximumHeight=i,this.center=o,this.toScaledENU=s,this.fromScaledENU=r,this.matrix=l,this.hasVertexNormals=n,this.hasWebMercatorT=defaultValue(a,!1)}TerrainEncoding.prototype.encode=function(e,t,i,r,n,a,o){var s,l,c=r.x,u=r.y;return this.quantization===TerrainQuantization$1.BITS12?((i=Matrix4.multiplyByPoint(this.toScaledENU,i,cartesian3Scratch)).x=CesiumMath.clamp(i.x,0,1),i.y=CesiumMath.clamp(i.y,0,1),i.z=CesiumMath.clamp(i.z,0,1),s=this.maximumHeight-this.minimumHeight,l=CesiumMath.clamp((n-this.minimumHeight)/s,0,1),Cartesian2.fromElements(i.x,i.y,cartesian2Scratch),r=AttributeCompression.compressTextureCoordinates(cartesian2Scratch),Cartesian2.fromElements(i.z,l,cartesian2Scratch),s=AttributeCompression.compressTextureCoordinates(cartesian2Scratch),Cartesian2.fromElements(c,u,cartesian2Scratch),l=AttributeCompression.compressTextureCoordinates(cartesian2Scratch),e[t++]=r,e[t++]=s,e[t++]=l,this.hasWebMercatorT&&(Cartesian2.fromElements(o,0,cartesian2Scratch),l=AttributeCompression.compressTextureCoordinates(cartesian2Scratch),e[t++]=l)):(Cartesian3.subtract(i,this.center,cartesian3Scratch),e[t++]=cartesian3Scratch.x,e[t++]=cartesian3Scratch.y,e[t++]=cartesian3Scratch.z,e[t++]=n,e[t++]=c,e[t++]=u,this.hasWebMercatorT&&(e[t++]=o)),this.hasVertexNormals&&(e[t++]=AttributeCompression.octPackFloat(a)),t},TerrainEncoding.prototype.decodePosition=function(e,t,i){if(defined(i)||(i=new Cartesian3),t*=this.getStride(),this.quantization!==TerrainQuantization$1.BITS12)return i.x=e[t],i.y=e[t+1],i.z=e[t+2],Cartesian3.add(i,this.center,i);var r=AttributeCompression.decompressTextureCoordinates(e[t],cartesian2Scratch);return i.x=r.x,i.y=r.y,t=AttributeCompression.decompressTextureCoordinates(e[t+1],cartesian2Scratch),i.z=t.x,Matrix4.multiplyByPoint(this.fromScaledENU,i,i)},TerrainEncoding.prototype.decodeTextureCoordinates=function(e,t,i){return defined(i)||(i=new Cartesian2),t*=this.getStride(),this.quantization===TerrainQuantization$1.BITS12?AttributeCompression.decompressTextureCoordinates(e[t+2],i):Cartesian2.fromElements(e[t+4],e[t+5],i)},TerrainEncoding.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization!==TerrainQuantization$1.BITS12?e[t+3]:AttributeCompression.decompressTextureCoordinates(e[t+1],cartesian2Scratch).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight},TerrainEncoding.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===TerrainQuantization$1.BITS12?AttributeCompression.decompressTextureCoordinates(e[t+3],cartesian2Scratch).x:e[t+6]},TerrainEncoding.prototype.getOctEncodedNormal=function(e,t,i){return e=256*((e=e[t=(t+1)*this.getStride()-1]/256)-(t=Math.floor(e))),Cartesian2.fromElements(t,e,i)},TerrainEncoding.prototype.getStride=function(){var e=this.quantization===TerrainQuantization$1.BITS12?3:6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var attributesNone={position3DAndHeight:0,textureCoordAndEncodedNormals:1},attributes={compressed0:0,compressed1:1};function WebMercatorProjection(e){this._ellipsoid=defaultValue(e,Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}TerrainEncoding.prototype.getAttributes=function(e){var t,i=ComponentDatatype$1.FLOAT,r=ComponentDatatype$1.getSizeInBytes(i);if(this.quantization===TerrainQuantization$1.NONE){var n=2;return this.hasWebMercatorT&&++n,this.hasVertexNormals&&++n,t=(4+n)*r,[{index:attributesNone.position3DAndHeight,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t},{index:attributesNone.textureCoordAndEncodedNormals,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:n,offsetInBytes:4*r,strideInBytes:t}]}var a=3;n=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(++n,t=(a+1)*r,[{index:attributes.compressed0,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:attributes.compressed1,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:1,offsetInBytes:a*r,strideInBytes:t}]):[{index:attributes.compressed0,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a}]},TerrainEncoding.prototype.getAttributeLocations=function(){return this.quantization===TerrainQuantization$1.NONE?attributesNone:attributes},TerrainEncoding.clone=function(e,t){return defined(t)||(t=new TerrainEncoding),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=Cartesian3.clone(e.center),t.toScaledENU=Matrix4.clone(e.toScaledENU),t.fromScaledENU=Matrix4.clone(e.fromScaledENU),t.matrix=Matrix4.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t},Object.defineProperties(WebMercatorProjection.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),WebMercatorProjection.mercatorAngleToGeodeticLatitude=function(e){return CesiumMath.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},WebMercatorProjection.geodeticLatitudeToMercatorAngle=function(e){return e>WebMercatorProjection.MaximumLatitude?e=WebMercatorProjection.MaximumLatitude:e<-WebMercatorProjection.MaximumLatitude&&(e=-WebMercatorProjection.MaximumLatitude),e=Math.sin(e),.5*Math.log((1+e)/(1-e))},WebMercatorProjection.MaximumLatitude=WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI),WebMercatorProjection.prototype.project=function(e,t){var i=this._semimajorAxis,r=e.longitude*i;i=WebMercatorProjection.geodeticLatitudeToMercatorAngle(e.latitude)*i,e=e.height;return defined(t)?(t.x=r,t.y=i,t.z=e,t):new Cartesian3(r,i,e)},WebMercatorProjection.prototype.unproject=function(e,t){var i=this._oneOverSemimajorAxis,r=e.x*i;i=WebMercatorProjection.mercatorAngleToGeodeticLatitude(e.y*i),e=e.z;return defined(t)?(t.longitude=r,t.latitude=i,t.height=e,t):new Cartographic(r,i,e)};var HeightmapTessellator={};HeightmapTessellator.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var cartesian3Scratch$1=new Cartesian3,matrix4Scratch$1=new Matrix4,minimumScratch=new Cartesian3,maximumScratch=new Cartesian3;function returnTrue(){return!0}function destroyObject(e,t){function i(){}for(var r in e)"function"==typeof e[r]&&(e[r]=i);e.isDestroyed=returnTrue}function canTransferArrayBuffer(){if(!defined(TaskProcessor._canTransferArrayBuffer)){var e=new Worker(getWorkerUrl("Workers/transferTypedArrayTest.js"));e.postMessage=defaultValue(e.webkitPostMessage,e.postMessage);var t=new Int8Array([99]);try{e.postMessage({array:t},[t.buffer])}catch(t){return TaskProcessor._canTransferArrayBuffer=!1,TaskProcessor._canTransferArrayBuffer}var i=when.defer();e.onmessage=function(t){t=defined(t=t.data.array)&&99===t[0],i.resolve(t),e.terminate(),TaskProcessor._canTransferArrayBuffer=t},TaskProcessor._canTransferArrayBuffer=i.promise}return TaskProcessor._canTransferArrayBuffer}HeightmapTessellator.computeVertices=function(e){var t,i,r,n=Math.cos,a=Math.sin,o=Math.sqrt,s=Math.atan,l=Math.exp,c=CesiumMath.PI_OVER_TWO,u=CesiumMath.toRadians,d=e.heightmap,h=e.width,p=e.height,f=e.skirtHeight,m=defaultValue(e.isGeographic,!0),g=defaultValue(e.ellipsoid,Ellipsoid.WGS84),y=1/g.maximumRadius,_=e.nativeRectangle,v=e.rectangle,C=defined(v)?(t=v.west,i=v.south,r=v.east,v.north):m?(t=u(_.west),i=u(_.south),r=u(_.east),u(_.north)):(t=_.west*y,i=c-2*s(l(-_.south*y)),r=_.east*y,c-2*s(l(-_.north*y))),x=defined(b=e.relativeToCenter),b=x?b:Cartesian3.ZERO,S=defaultValue(e.exaggeration,1),T=defaultValue(e.includeWebMercatorT,!1),E=defaultValue(e.structure,HeightmapTessellator.DEFAULT_STRUCTURE),w=defaultValue(E.heightScale,HeightmapTessellator.DEFAULT_STRUCTURE.heightScale),A=defaultValue(E.heightOffset,HeightmapTessellator.DEFAULT_STRUCTURE.heightOffset),P=defaultValue(E.elementsPerHeight,HeightmapTessellator.DEFAULT_STRUCTURE.elementsPerHeight),D=defaultValue(E.stride,HeightmapTessellator.DEFAULT_STRUCTURE.stride),M=defaultValue(E.elementMultiplier,HeightmapTessellator.DEFAULT_STRUCTURE.elementMultiplier),I=defaultValue(E.isBigEndian,HeightmapTessellator.DEFAULT_STRUCTURE.isBigEndian),R=Rectangle.computeWidth(_),O=Rectangle.computeHeight(_),L=R/(h-1),N=O/(p-1);m||(R*=y,O*=y);var F,B,V=(e=g.radiiSquared).x,k=e.y,z=e.z,G=65536,U=-65536,$=(E=Transforms.eastNorthUpToFixedFrame(b,g),Matrix4.inverseTransformation(E,matrix4Scratch$1));T&&(F=WebMercatorProjection.geodeticLatitudeToMercatorAngle(i),B=1/(WebMercatorProjection.geodeticLatitudeToMercatorAngle(C)-F));var H=minimumScratch;H.x=Number.POSITIVE_INFINITY,H.y=Number.POSITIVE_INFINITY,H.z=Number.POSITIVE_INFINITY;var W=maximumScratch;W.x=Number.NEGATIVE_INFINITY,W.y=Number.NEGATIVE_INFINITY,W.z=Number.NEGATIVE_INFINITY;var j=Number.POSITIVE_INFINITY,q=h*p,Y=q+(0<f?2*h+2*p:0),X=new Array(Y),Q=new Array(Y),Z=new Array(Y),J=T?new Array(Y):[],K=0,ee=p,te=0,ie=h;0<f&&(--K,++ee,--te,++ie);for(var re=K;re<ee;++re){var ne=re;ne<0&&(ne=0),p<=ne&&(ne=p-1);var ae=_.north-N*ne,oe=((ae=m?u(ae):c-2*s(l(-ae*y)))-i)/(C-i),se=(oe=CesiumMath.clamp(oe,0,1),re===K),le=re===ee-1;0<f&&(se?ae+=1e-5*O:le&&(ae-=1e-5*O));var ce,ue=n(ae),de=a(ae),he=z*de;T&&(ce=(WebMercatorProjection.geodeticLatitudeToMercatorAngle(ae)-F)*B);for(var pe=te;pe<ie;++pe){(Se=pe)<0&&(Se=0),h<=Se&&(Se=h-1);var fe=ne*(h*D)+Se*D;if(1===P)ge=d[fe];else{var me,ge=0;if(I)for(me=0;me<P;++me)ge=ge*M+d[fe+me];else for(me=P-1;0<=me;--me)ge=ge*M+d[fe+me]}ge=(ge*w+A)*S,U=Math.max(U,ge),G=Math.min(G,ge);var ye=_.west+L*Se;m?ye=u(ye):ye*=y;var _e=(ye-t)/(r-t),ve=(_e=CesiumMath.clamp(_e,0,1),ne*h+Se);if(0<f){var Ce=pe===te,xe=pe===ie-1,be=se||le||Ce||xe;if((se||le)&&(Ce||xe))continue;be&&(ge-=f,Ce?(ve=p-ne-1+q,ye-=1e-5*R):le?ve=q+p+(h-Se-1):xe?(ve=q+p+h+ne,ye+=1e-5*R):se&&(ve=q+p+h+p+Se))}var Se,Te=ue*n(ye);ye=(Ce=V*Te)*(Se=1/o(Ce*Te+(xe=k*(be=ue*a(ye)))*be+he*de)),Ce=xe*Se,xe=he*Se;(Se=new Cartesian3).x=ye+Te*ge,Se.y=Ce+be*ge,Se.z=xe+de*ge,X[ve]=Se,Q[ve]=ge,Z[ve]=new Cartesian2(_e,oe),T&&(J[ve]=ce),Matrix4.multiplyByPoint($,Se,cartesian3Scratch$1),Cartesian3.minimumByComponent(cartesian3Scratch$1,H,H),Cartesian3.maximumByComponent(cartesian3Scratch$1,W,W),j=Math.min(j,ge)}}var Ee,we;e=BoundingSphere.fromPoints(X);defined(v)&&(Ee=OrientedBoundingBox.fromRectangle(v,G,U,g)),x&&(we=new EllipsoidalOccluder(g).computeHorizonCullingPointPossiblyUnderEllipsoid(b,X,G));for(var Ae=new TerrainEncoding(new AxisAlignedBoundingBox(H,W,b),j,U,E,!1,T),Pe=new Float32Array(Y*Ae.getStride()),De=0,Me=0;Me<Y;++Me)De=Ae.encode(Pe,De,X[Me],Z[Me],Q[Me],void 0,J[Me]);return{vertices:Pe,maximumHeight:U,minimumHeight:G,encoding:Ae,boundingSphere3D:e,orientedBoundingBox:Ee,occludeePointInScaledSpace:we}};var taskCompletedEvent=new Event,bootstrapperUrlResult;function completeTask(e,t){--e._activeTasks;var i,r,n=t.id;defined(n)&&(r=(i=e._deferreds)[n],defined(t.error)?("RuntimeError"===(e=t.error).name?(e=new RuntimeError(t.error.message)).stack=t.error.stack:"DeveloperError"===e.name&&((e=new DeveloperError(t.error.message)).stack=t.error.stack),taskCompletedEvent.raiseEvent(e),r.reject(e)):(taskCompletedEvent.raiseEvent(),r.resolve(t.result)),delete i[n])}function getWorkerUrl(e){if(isCrossOriginUrl(r=buildModuleUrl(e))){var t,i='importScripts("'+r+'");';try{t=new Blob([i],{type:"application/javascript"})}catch(r){(e=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(i),t=e.getBlob("application/javascript")}var r=(window.URL||window.webkitURL).createObjectURL(t)}return r}function getBootstrapperUrl(){return defined(bootstrapperUrlResult)||(bootstrapperUrlResult=getWorkerUrl("Workers/cesiumWorkerBootstrapper.js")),bootstrapperUrlResult}function createWorker(e){var t=new Worker(getBootstrapperUrl());t.postMessage=defaultValue(t.webkitPostMessage,t.postMessage);var i={loaderConfig:{paths:{Workers:buildModuleUrl("Workers")},baseUrl:buildModuleUrl.getCesiumBaseUrl().url},workerModule:TaskProcessor._workerModulePrefix+e._workerName};return t.postMessage(i),t.onmessage=function(t){completeTask(e,t.data)},t}function getWebAssemblyLoaderConfig(e,t){var i={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(FeatureDetection.supportsWebAssembly())return i.modulePath=buildModuleUrl(t.modulePath),i.wasmBinaryFile=buildModuleUrl(t.wasmBinaryFile),Resource.fetchArrayBuffer({url:i.wasmBinaryFile}).then((function(e){return i.wasmBinary=e,i}));if(!defined(t.fallbackModulePath))throw new RuntimeError("This browser does not support Web Assembly, and no backup module was provided for "+e._workerName);return i.modulePath=buildModuleUrl(t.fallbackModulePath),when.resolve(i)}function TaskProcessor(e,t){this._workerName=e,this._maximumActiveTasks=defaultValue(t,5),this._activeTasks=0,this._deferreds={},this._nextID=0}var emptyTransferableObjectArray=[];function TerrainMesh(e,t,i,r,n,a,o,s,l,c,u,d,h,p,f,m,g){this.center=e,this.vertices=t,this.stride=defaultValue(c,6),this.indices=i,this.indexCountWithoutSkirts=r,this.vertexCountWithoutSkirts=n,this.minimumHeight=a,this.maximumHeight=o,this.boundingSphere3D=s,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=u,this.encoding=d,this.exaggeration=h,this.westIndicesSouthToNorth=p,this.southIndicesEastToWest=f,this.eastIndicesNorthToSouth=m,this.northIndicesWestToEast=g}TaskProcessor.prototype.scheduleTask=function(e,t){if(defined(this._worker)||(this._worker=createWorker(this)),!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var i=this;return when(canTransferArrayBuffer(),(function(r){defined(t)?r||(t.length=0):t=emptyTransferableObjectArray;var n=i._nextID++,a=when.defer();return i._deferreds[n]=a,i._worker.postMessage({id:n,parameters:e,canTransferArrayBuffer:r},t),a.promise}))}},TaskProcessor.prototype.initWebAssemblyModule=function(e){defined(this._worker)||(this._worker=createWorker(this));var t=when.defer(),i=this,r=this._worker;return getWebAssemblyLoaderConfig(this,e).then((function(e){return when(canTransferArrayBuffer(),(function(n){var a,o=e.wasmBinary;defined(o)&&n&&(a=[o]),r.onmessage=function(e){r.onmessage=function(e){completeTask(i,e.data)},t.resolve(e.data)},r.postMessage({webAssemblyConfig:e},a)}))})),t},TaskProcessor.prototype.isDestroyed=function(){return!1},TaskProcessor.prototype.destroy=function(){return defined(this._worker)&&this._worker.terminate(),destroyObject(this)},TaskProcessor.taskCompletedEvent=taskCompletedEvent,TaskProcessor._defaultWorkerModulePrefix="Workers/",TaskProcessor._workerModulePrefix=TaskProcessor._defaultWorkerModulePrefix,TaskProcessor._canTransferArrayBuffer=void 0;var IndexDatatype={UNSIGNED_BYTE:WebGLConstants$1.UNSIGNED_BYTE,UNSIGNED_SHORT:WebGLConstants$1.UNSIGNED_SHORT,UNSIGNED_INT:WebGLConstants$1.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case IndexDatatype.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case IndexDatatype.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case IndexDatatype.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}},fromSizeInBytes:function(e){switch(e){case 2:return IndexDatatype.UNSIGNED_SHORT;case 4:return IndexDatatype.UNSIGNED_INT;case 1:return IndexDatatype.UNSIGNED_BYTE}},validate:function(e){return defined(e)&&(e===IndexDatatype.UNSIGNED_BYTE||e===IndexDatatype.UNSIGNED_SHORT||e===IndexDatatype.UNSIGNED_INT)},createTypedArray:function(e,t){return new(e>=CesiumMath.SIXTY_FOUR_KILOBYTES?Uint32Array:Uint16Array)(t)},createTypedArrayFromArrayBuffer:function(e,t,i,r){return new(e>=CesiumMath.SIXTY_FOUR_KILOBYTES?Uint32Array:Uint16Array)(t,i,r)}},IndexDatatype$1=Object.freeze(IndexDatatype);function TerrainProvider(){DeveloperError.throwInstantiationError()}Object.defineProperties(TerrainProvider.prototype,{errorEvent:{get:DeveloperError.throwInstantiationError},credit:{get:DeveloperError.throwInstantiationError},tilingScheme:{get:DeveloperError.throwInstantiationError},ready:{get:DeveloperError.throwInstantiationError},readyPromise:{get:DeveloperError.throwInstantiationError},hasWaterMask:{get:DeveloperError.throwInstantiationError},hasVertexNormals:{get:DeveloperError.throwInstantiationError},availability:{get:DeveloperError.throwInstantiationError}});var regularGridIndicesCache=[];TerrainProvider.getRegularGridIndices=function(e,t){var i=regularGridIndicesCache[e];defined(i)||(regularGridIndicesCache[e]=i=[]);var r=i[t];return defined(r)||addRegularGridIndices(e,t,r=e*t<CesiumMath.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6):i[t]=new Uint32Array((e-1)*(t-1)*6),0),r};var regularGridAndEdgeIndicesCache=[];TerrainProvider.getRegularGridIndicesAndEdgeIndices=function(e,t){var i=regularGridAndEdgeIndicesCache[e];defined(i)||(regularGridAndEdgeIndicesCache[e]=i=[]);var r,n,a,o,s=i[t];return defined(s)||(r=TerrainProvider.getRegularGridIndices(e,t),n=(o=getEdgeIndices(e,t)).westIndicesSouthToNorth,a=o.southIndicesEastToWest,e=o.eastIndicesNorthToSouth,o=o.northIndicesWestToEast,s=i[t]={indices:r,westIndicesSouthToNorth:n,southIndicesEastToWest:a,eastIndicesNorthToSouth:e,northIndicesWestToEast:o}),s};var regularGridAndSkirtAndEdgeIndicesCache=[];function getEdgeIndices(e,t){for(var i=new Array(t),r=new Array(e),n=new Array(t),a=new Array(e),o=0;o<e;++o)r[a[o]=o]=e*t-1-o;for(o=0;o<t;++o)n[o]=(o+1)*e-1,i[o]=(t-o-1)*e;return{westIndicesSouthToNorth:i,southIndicesEastToWest:r,eastIndicesNorthToSouth:n,northIndicesWestToEast:a}}function addRegularGridIndices(e,t,i,r){for(var n=0,a=0;a<t-1;++a){for(var o=0;o<e-1;++o){var s=n+e,l=s+1,c=n+1;i[r++]=n,i[r++]=s,i[r++]=c,i[r++]=c,i[r++]=s,i[r++]=l,++n}++n}}function addSkirtIndices(e,t,i,r){for(var n=e[0],a=e.length,o=1;o<a;++o){var s=e[o];i[r++]=n,i[r++]=s,i[r++]=t,i[r++]=t,i[r++]=s,i[r++]=t+1,n=s,++t}return r}function HeightmapTerrainData(e){this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=defaultValue(e.childTileMask,15),this._encoding=defaultValue(e.encoding,HeightmapEncoding$1.NONE);var t=HeightmapTessellator.DEFAULT_STRUCTURE,i=e.structure;defined(i)?i!==t&&(i.heightScale=defaultValue(i.heightScale,t.heightScale),i.heightOffset=defaultValue(i.heightOffset,t.heightOffset),i.elementsPerHeight=defaultValue(i.elementsPerHeight,t.elementsPerHeight),i.stride=defaultValue(i.stride,t.stride),i.elementMultiplier=defaultValue(i.elementMultiplier,t.elementMultiplier),i.isBigEndian=defaultValue(i.isBigEndian,t.isBigEndian)):i=t,this._structure=i,this._createdByUpsampling=defaultValue(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===HeightmapEncoding$1.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){var i=regularGridAndSkirtAndEdgeIndicesCache[e];defined(i)||(regularGridAndSkirtAndEdgeIndicesCache[e]=i=[]);var r,n,a,o,s,l,c,u,d=i[t];return defined(d)||(a=(r=e*t)+(l=2*e+2*t),u=(n=(e-1)*(t-1)*6)+6*Math.max(0,l-4),o=(c=getEdgeIndices(e,t)).westIndicesSouthToNorth,s=c.southIndicesEastToWest,l=c.eastIndicesNorthToSouth,c=c.northIndicesWestToEast,addRegularGridIndices(e,t,u=IndexDatatype$1.createTypedArray(a,u),0),TerrainProvider.addSkirtIndices(o,s,l,c,r,u,n),d=i[t]={indices:u,westIndicesSouthToNorth:o,southIndicesEastToWest:s,eastIndicesNorthToSouth:l,northIndicesWestToEast:c,indexCountWithoutSkirts:n}),d},TerrainProvider.addSkirtIndices=function(e,t,i,r,n,a,o){o=addSkirtIndices(e,n,a,o),o=addSkirtIndices(t,n+=e.length,a,o),o=addSkirtIndices(i,n+=t.length,a,o),addSkirtIndices(r,n+=i.length,a,o)},TerrainProvider.heightmapTerrainQuality=.25,TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*TerrainProvider.heightmapTerrainQuality/(t*i)},TerrainProvider.prototype.requestTileGeometry=DeveloperError.throwInstantiationError,TerrainProvider.prototype.getLevelMaximumGeometricError=DeveloperError.throwInstantiationError,TerrainProvider.prototype.getTileDataAvailable=DeveloperError.throwInstantiationError,TerrainProvider.prototype.loadTileDataAvailability=DeveloperError.throwInstantiationError,Object.defineProperties(HeightmapTerrainData.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var taskProcessor=new TaskProcessor("createVerticesFromHeightmap");function interpolateHeight(e,t,i,r,n,a,o,s,l,c){var u=(l-a.west)*(o-1)/(a.east-a.west),d=(c-a.south)*(s-1)/(a.north-a.south),h=0|u;return o<=(l=h+1)&&(l=o-1,h=o-2),s<=(a=(c=0|d)+1)&&(a=s-1,c=s-2),a=s-1-a,triangleInterpolateHeight(u-h,d-c,getHeight(e,t,i,r,n,(c=s-1-c)*o+h),getHeight(e,t,i,r,n,c*o+l),getHeight(e,t,i,r,n,a*o+h),getHeight(e,t,i,r,n,a*o+l))}function interpolateMeshHeight(e,t,i,r,n,a,o,s,l,c){var u=(s-n.west)*(a-1)/(n.east-n.west),d=(l-n.south)*(o-1)/(n.north-n.south),h=0|u;return a<=(s=h+1)&&(s=a-1,h=a-2),o<=(n=1+(l=0|d))&&(n=o-1,l=o-2),d-=l,l=o-1-l,n=o-1-n,triangleInterpolateHeight(u-h,d,(t.decodeHeight(e,l*a+h)/c-i)/r,(t.decodeHeight(e,l*a+s)/c-i)/r,(t.decodeHeight(e,n*a+h)/c-i)/r,(t.decodeHeight(e,n*a+s)/c-i)/r)}function triangleInterpolateHeight(e,t,i,r,n,a){return t<e?i+e*(r-i)+t*(a-r):i+e*(a-n)+t*(n-i)}function getHeight(e,t,i,r,n,a){a*=r;var o,s=0;if(n)for(o=0;o<t;++o)s=s*i+e[a+o];else for(o=t-1;0<=o;--o)s=s*i+e[a+o];return s}function setHeight(e,t,i,r,n,a,o,s){var l;if(o*=n,a)for(l=0;l<t-1;++l)e[o+l]=s/r|0,s-=e[o+l]*r,r/=i;else for(l=t-1;0<l;--l)e[o+l]=s/r|0,s-=e[o+l]*r,r/=i;e[o+l]=s}function TileAvailability(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}HeightmapTerrainData.prototype.createMesh=function(e,t,i,r,n){var a=e.ellipsoid,o=e.tileXYToNativeRectangle(t,i,r);t=e.tileXYToRectangle(t,i,r);n=defaultValue(n,1);var s=a.cartographicToCartesian(Rectangle.center(t));i=this._structure,r=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<r);if(this._skirtHeight=Math.min(4*r,1e3),defined(e=taskProcessor.scheduleTask({heightmap:this._buffer,structure:i,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:o,rectangle:t,relativeToCenter:s,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof GeographicProjection,exaggeration:n,encoding:this._encoding}))){var l=this;return when(e,(function(e){var t=0<l._skirtHeight?TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices(e.gridWidth,e.gridHeight):TerrainProvider.getRegularGridIndicesAndEdgeIndices(e.gridWidth,e.gridHeight),i=e.gridWidth*e.gridHeight;return l._mesh=new TerrainMesh(s,new Float32Array(e.vertices),t.indices,t.indexCountWithoutSkirts,i,e.minimumHeight,e.maximumHeight,BoundingSphere.clone(e.boundingSphere3D),Cartesian3.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,OrientedBoundingBox.clone(e.orientedBoundingBox),TerrainEncoding.clone(e.encoding),n,t.westIndicesSouthToNorth,t.southIndicesEastToWest,t.eastIndicesNorthToSouth,t.northIndicesWestToEast),l._buffer=void 0,l._mesh}))}},HeightmapTerrainData.prototype._createMeshSync=function(e,t,i,r,n){var a=e.ellipsoid,o=e.tileXYToNativeRectangle(t,i,r),s=e.tileXYToRectangle(t,i,r);return n=defaultValue(n,1),t=a.cartographicToCartesian(Rectangle.center(s)),i=this._structure,r=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<r),this._skirtHeight=Math.min(4*r,1e3),s=HeightmapTessellator.computeVertices({heightmap:this._buffer,structure:i,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:o,rectangle:s,relativeToCenter:t,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof GeographicProjection,exaggeration:n}),this._buffer=void 0,a=0<this._skirtHeight?TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):TerrainProvider.getRegularGridIndicesAndEdgeIndices(this._width,this._height),e=s.gridWidth*s.gridHeight,new TerrainMesh(t,s.vertices,a.indices,a.indexCountWithoutSkirts,e,s.minimumHeight,s.maximumHeight,s.boundingSphere3D,s.occludeePointInScaledSpace,s.encoding.getStride(),s.orientedBoundingBox,s.encoding,n,a.westIndicesSouthToNorth,a.southIndicesEastToWest,a.eastIndicesNorthToSouth,a.northIndicesWestToEast)},HeightmapTerrainData.prototype.interpolateHeight=function(e,t,i){var r=this._width,n=this._height,a=(u=this._structure).stride,o=u.elementsPerHeight,s=u.elementMultiplier,l=u.isBigEndian,c=u.heightOffset,u=u.heightScale;return defined(this._mesh)?interpolateMeshHeight(this._mesh.vertices,this._mesh.encoding,c,u,e,r,n,t,i,this._mesh.exaggeration):interpolateHeight(this._buffer,o,s,a,l,e,r,n,t,i)*u+c},HeightmapTerrainData.prototype.upsample=function(e,t,i,r,n,a,o){var s=this._mesh;if(defined(s)){for(var l=this._width,c=this._height,u=this._structure,d=u.stride,h=new this._bufferType(l*c*d),p=s.vertices,f=s.encoding,m=e.tileXYToRectangle(t,i,r),g=e.tileXYToRectangle(n,a,o),y=u.heightOffset,_=u.heightScale,v=s.exaggeration,C=u.elementsPerHeight,x=u.elementMultiplier,b=u.isBigEndian,S=Math.pow(x,C-1),T=0;T<c;++T)for(var E=CesiumMath.lerp(g.north,g.south,T/(c-1)),w=0;w<l;++w){var A=interpolateMeshHeight(p,f,y,_,m,l,c,CesiumMath.lerp(g.west,g.east,w/(l-1)),E,v);setHeight(h,C,x,S,d,b,T*l+w,A=(A=A<u.lowestEncodedHeight?u.lowestEncodedHeight:A)>u.highestEncodedHeight?u.highestEncodedHeight:A)}return new HeightmapTerrainData({buffer:h,width:l,height:c,childTileMask:0,structure:this._structure,createdByUpsampling:!0})}},HeightmapTerrainData.prototype.isChildAvailable=function(e,t,i,r){var n=2;return i!==2*e&&++n,r!==2*t&&(n-=2),0!=(this._childTileMask&1<<n)},HeightmapTerrainData.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var rectangleScratch=new Rectangle;function findNode(e,t,i,r){for(var n=r.length,a=0;a<n;++a){var o=r[a];if(o.x===t&&o.y===i&&o.level===e)return 1}}TileAvailability.prototype.addAvailableTileRange=function(e,t,i,r,n){var a=this._tilingScheme,o=this._rootNodes;if(0===e)for(var s=i;s<=n;++s)for(var l=t;l<=r;++l)findNode(e,l,s,o)||o.push(new QuadtreeNode(a,void 0,0,l,s));a.tileXYToRectangle(t,i,e,rectangleScratch);var c=rectangleScratch.west,u=rectangleScratch.north;a.tileXYToRectangle(r,n,e,rectangleScratch);i=rectangleScratch.east;for(var d=new RectangleWithLevel(e,c,rectangleScratch.south,i,u),h=0;h<o.length;++h){var p=o[h];rectanglesOverlap(p.extent,d)&&putRectangleInQuadtree(this._maximumLevel,p,d)}},TileAvailability.prototype.computeMaximumLevelAtPosition=function(e){for(var t,i=0;i<this._rootNodes.length;++i){var r=this._rootNodes[i];if(rectangleContainsPosition(r.extent,e)){t=r;break}}return defined(t)?findMaxLevelFromNode(void 0,t,e):-1};var rectanglesScratch=[],remainingToCoverByLevelScratch=[],westScratch=new Rectangle,eastScratch=new Rectangle;TileAvailability.prototype.computeBestAvailableLevelOverRectangle=function(e){var t=rectanglesScratch;t.length=0,e.east<e.west?(t.push(Rectangle.fromRadians(-Math.PI,e.south,e.east,e.north,westScratch)),t.push(Rectangle.fromRadians(e.west,e.south,Math.PI,e.north,eastScratch))):t.push(e);for(var i=remainingToCoverByLevelScratch,r=i.length=0;r<this._rootNodes.length;++r)updateCoverageWithNode(i,this._rootNodes[r],t);for(r=i.length-1;0<=r;--r)if(defined(i[r])&&0===i[r].length)return r;return 0};var cartographicScratch=new Cartographic;function QuadtreeNode(e,t,i,r,n){this.tilingScheme=e,this.parent=t,this.level=i,this.x=r,this.y=n,this.extent=e.tileXYToRectangle(r,n,i),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}function RectangleWithLevel(e,t,i,r,n){this.level=e,this.west=t,this.south=i,this.east=r,this.north=n}function rectanglesOverlap(e,t){var i=Math.max(e.west,t.west),r=Math.max(e.south,t.south),n=Math.min(e.east,t.east);return r<Math.min(e.north,t.north)&&i<n}function putRectangleInQuadtree(e,t,i){for(;t.level<e;)if(rectangleFullyContainsRectangle(t.nw.extent,i))t=t.nw;else if(rectangleFullyContainsRectangle(t.ne.extent,i))t=t.ne;else if(rectangleFullyContainsRectangle(t.sw.extent,i))t=t.sw;else{if(!rectangleFullyContainsRectangle(t.se.extent,i))break;t=t.se}var r;0===t.rectangles.length||t.rectangles[t.rectangles.length-1].level<=i.level?t.rectangles.push(i):((r=binarySearch(t.rectangles,i.level,rectangleLevelComparator))<0&&(r=~r),t.rectangles.splice(r,0,i))}function rectangleLevelComparator(e,t){return e.level-t}function rectangleFullyContainsRectangle(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function rectangleContainsPosition(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function findMaxLevelFromNode(e,t,i){for(var r=0,n=!1;!n;){var a=t._nw&&rectangleContainsPosition(t._nw.extent,i),o=t._ne&&rectangleContainsPosition(t._ne.extent,i),s=t._sw&&rectangleContainsPosition(t._sw.extent,i),l=t._se&&rectangleContainsPosition(t._se.extent,i);if(1<a+o+s+l){a&&(r=Math.max(r,findMaxLevelFromNode(t,t._nw,i))),o&&(r=Math.max(r,findMaxLevelFromNode(t,t._ne,i))),s&&(r=Math.max(r,findMaxLevelFromNode(t,t._sw,i))),l&&(r=Math.max(r,findMaxLevelFromNode(t,t._se,i)));break}a?t=t._nw:o?t=t._ne:s?t=t._sw:l?t=t._se:n=!0}for(;t!==e;){for(var c=t.rectangles,u=c.length-1;0<=u&&c[u].level>r;--u){var d=c[u];rectangleContainsPosition(d,i)&&(r=d.level)}t=t.parent}return r}function updateCoverageWithNode(e,t,i){if(t){var r=!1;for(a=0;a<i.length;++a)r=r||rectanglesOverlap(t.extent,i[a]);if(r){for(var n=t.rectangles,a=0;a<n.length;++a){var o=n[a];e[o.level]||(e[o.level]=i),e[o.level]=subtractRectangle(e[o.level],o)}updateCoverageWithNode(e,t._nw,i),updateCoverageWithNode(e,t._ne,i),updateCoverageWithNode(e,t._sw,i),updateCoverageWithNode(e,t._se,i)}}}function subtractRectangle(e,t){for(var i=[],r=0;r<e.length;++r){var n=e[r];rectanglesOverlap(n,t)?(n.west<t.west&&i.push(new Rectangle(n.west,n.south,t.west,n.north)),n.east>t.east&&i.push(new Rectangle(t.east,n.south,n.east,n.north)),n.south<t.south&&i.push(new Rectangle(Math.max(t.west,n.west),n.south,Math.min(t.east,n.east),t.south)),n.north>t.north&&i.push(new Rectangle(Math.max(t.west,n.west),t.north,Math.min(t.east,n.east),n.north))):i.push(n)}return i}function formatError(e){var t=e.name,i=e.message;i=defined(t)&&defined(i)?t+": "+i:e.toString();return defined(e=e.stack)&&(i+="\n"+e),i}function TileProviderError(e,t,i,r,n,a,o){this.provider=e,this.message=t,this.x=i,this.y=r,this.level=n,this.timesRetried=defaultValue(a,0),this.retry=!1,this.error=o}function WebMercatorTilingScheme(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._numberOfLevelZeroTilesX=defaultValue(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=defaultValue(e.numberOfLevelZeroTilesY,1),this._projection=new WebMercatorProjection(this._ellipsoid),defined(e.rectangleSouthwestInMeters)&&defined(e.rectangleNortheastInMeters)?(this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters):(t=this._ellipsoid.maximumRadius*Math.PI,this._rectangleSouthwestInMeters=new Cartesian2(-t,-t),this._rectangleNortheastInMeters=new Cartesian2(t,t));e=this._projection.unproject(this._rectangleSouthwestInMeters);var t=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new Rectangle(e.longitude,e.latitude,t.longitude,t.latitude)}TileAvailability.prototype.isTileAvailable=function(e,t,i){return i=this._tilingScheme.tileXYToRectangle(t,i,e,rectangleScratch),Rectangle.center(i,cartographicScratch),this.computeMaximumLevelAtPosition(cartographicScratch)>=e},TileAvailability.prototype.computeChildMaskForTile=function(e,t,i){var r=e+1;return r>=this._maximumLevel?0:(e=0,e|=this.isTileAvailable(r,2*t,2*i+1)?1:0,e|=this.isTileAvailable(r,2*t+1,2*i+1)?2:0,(e|=this.isTileAvailable(r,2*t,2*i)?4:0)|(this.isTileAvailable(r,2*t+1,2*i)?8:0))},Object.defineProperties(QuadtreeNode.prototype,{nw:{get:function(){return this._nw||(this._nw=new QuadtreeNode(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new QuadtreeNode(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new QuadtreeNode(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new QuadtreeNode(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}}),TileProviderError.handleError=function(e,t,i,r,n,a,o,s,l){var c=e;return defined(e)?(c.provider=t,c.message=r,c.x=n,c.y=a,c.level=o,c.retry=!1,c.error=l,++c.timesRetried):c=new TileProviderError(t,r,n,a,o,0,l),0<i.numberOfListeners?i.raiseEvent(c):console.log('An error occurred in "'+t.constructor.name+'": '+formatError(r)),c.retry&&defined(s)&&s(),c},TileProviderError.handleSuccess=function(e){defined(e)&&(e.timesRetried=-1)},Object.defineProperties(WebMercatorTilingScheme.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),WebMercatorTilingScheme.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},WebMercatorTilingScheme.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},WebMercatorTilingScheme.prototype.rectangleToNativeRectangle=function(e,t){var i=this._projection,r=i.project(Rectangle.southwest(e));e=i.project(Rectangle.northeast(e));return defined(t)?(t.west=r.x,t.south=r.y,t.east=e.x,t.north=e.y,t):new Rectangle(r.x,r.y,e.x,e.y)},WebMercatorTilingScheme.prototype.tileXYToNativeRectangle=function(e,t,i,r){var n=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i);i=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/n,n=this._rectangleSouthwestInMeters.x+e*i,e=this._rectangleSouthwestInMeters.x+(e+1)*i,i=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/a,a=this._rectangleNortheastInMeters.y-t*i,i=this._rectangleNortheastInMeters.y-(t+1)*i;return defined(r)?(r.west=n,r.south=i,r.east=e,r.north=a,r):new Rectangle(n,i,e,a)},WebMercatorTilingScheme.prototype.tileXYToRectangle=function(e,t,i,r){return t=this.tileXYToNativeRectangle(e,t,i,r),r=(i=this._projection).unproject(new Cartesian2(t.west,t.south)),i=i.unproject(new Cartesian2(t.east,t.north)),t.west=r.longitude,t.south=r.latitude,t.east=i.longitude,t.north=i.latitude,t},WebMercatorTilingScheme.prototype.positionToTileXY=function(e,t,i){var r=this._rectangle;if(Rectangle.contains(r,e)){var n=this.getNumberOfXTilesAtLevel(t),a=this.getNumberOfYTilesAtLevel(t);r=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/n,t=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/a;return n<=(r=((e=this._projection.project(e)).x-this._rectangleSouthwestInMeters.x)/r|0)&&(r=n-1),a<=(t=(this._rectangleNortheastInMeters.y-e.y)/t|0)&&(t=a-1),defined(i)?(i.x=r,i.y=t,i):new Cartesian2(r,t)}};var ALL_CHILDREN=15;function ArcGISTiledElevationTerrainProvider(e){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;var t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};var i=this,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84);this._readyPromise=when(e.url).then((function(e){return(e=Resource.createIfNeeded(e)).appendForwardSlash(),defined(t)&&(e=e.getDerivedResource({queryParameters:{token:t}})),(i._resource=e).getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()})).then((function(e){defined(n=e.copyrightText)&&(i._credit=new Credit(n));var t=defaultValue((a=e.spatialReference).latestWkid,a.wkid),n=e.extent,a={ellipsoid:r};if(4326===t)a.rectangle=Rectangle.fromDegrees(n.xmin,n.ymin,n.xmax,n.ymax),i._tilingScheme=new GeographicTilingScheme(a);else{if(3857!==t)return when.reject(new RuntimeError("Invalid spatial reference"));a.rectangleSouthwestInMeters=new Cartesian2(n.xmin,n.ymin),a.rectangleNortheastInMeters=new Cartesian2(n.xmax,n.ymax),i._tilingScheme=new WebMercatorTilingScheme(a)}return defined(a=e.tileInfo)?(i._width=a.rows+1,i._height=a.cols+1,i._encoding="LERC"===a.format?HeightmapEncoding$1.LERC:HeightmapEncoding$1.NONE,i._lodCount=a.lods.length-1,(i._hasAvailability=-1!==e.capabilities.indexOf("Tilemap"))&&(i._tilesAvailable=new TileAvailability(i._tilingScheme,i._lodCount),i._tilesAvailable.addAvailableTileRange(0,0,0,i._tilingScheme.getNumberOfXTilesAtLevel(0),i._tilingScheme.getNumberOfYTilesAtLevel(0)),i._tilesAvailablityLoaded=new TileAvailability(i._tilingScheme,i._lodCount)),i._levelZeroMaximumGeometricError=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(i._tilingScheme.ellipsoid,i._width,i._tilingScheme.getNumberOfXTilesAtLevel(0)),1<e.bandCount&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),i._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:e.minValues[0],highestEncodedHeight:e.maxValues[0]},i._ready=!0):when.reject(new RuntimeError("tileInfo is required"))})).otherwise((function(e){var t="An error occurred while accessing "+i._resource.url+".";return TileProviderError.handleError(void 0,i,i._errorEvent,t),when.reject(e)})),this._errorEvent=new Event}function isTileAvailable(e,t,i,r){if(e._hasAvailability){var n=e._tilesAvailablityLoaded,a=e._tilesAvailable;return!(t>e._lodCount)&&(!!a.isTileAvailable(t,i,r)||!n.isTileAvailable(t,i,r)&&void 0)}}function findRange(e,t,i,r){for(var n=t-1,a=i-1,o=r[e.y*t+e.x],s=[],l={startX:e.x,startY:e.y,endX:0,endY:0},c=new Cartesian2(e.x+1,e.y+1),u=!1,d=!1;!u||!d;){var h=c.x,p=d?c.y+1:c.y;if(!u){for(var f=e.y;f<p;++f)if(r[f*t+c.x]!==o){u=!0;break}u?(s.push(new Cartesian2(c.x,e.y)),--c.x,--h,l.endX=c.x):c.x===n?(l.endX=c.x,u=!0):++c.x}if(!d){for(var m=c.y*t,g=e.x;g<=h;++g)if(r[m+g]!==o){d=!0;break}d?(s.push(new Cartesian2(e.x,c.y)),--c.y,l.endY=c.y):c.y===a?(l.endY=c.y,d=!0):++c.y}}return{endingIndices:s,range:l,value:o}}function computeAvailability(e,t,i,r,n){var a=[];if(n.every((function(e){return e===n[0]})))return 1===n[0]&&a.push({startX:e,startY:t,endX:e+i-1,endY:t+r-1}),a;for(var o=[new Cartesian2(0,0)];0<o.length;){var s,l=findRange(o.pop(),i,r,n);1===l.value&&((s=l.range).startX+=e,s.endX+=e,s.startY+=t,s.endY+=t,a.push(s)),0<(l=l.endingIndices).length&&(o=o.concat(l))}return a}function requestAvailability(e,t,i,r){if(!e._hasAvailability)return{};var n=128*Math.floor(i/128),a=128*Math.floor(r/128),o=Math.min(1<<t,128),s="tilemap/"+t+"/"+a+"/"+n+"/"+o+"/"+o,l=e._availableCache;if(defined(l[s]))return l[s];var c=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.TERRAIN}),u=e._resource.getDerivedResource({url:s,request:c}).fetchJson();return defined(u)?(u=u.then((function(s){var l=computeAvailability(n,a,o,o,s.data);e._tilesAvailablityLoaded.addAvailableTileRange(n,a,n+o,a+o);for(var c=e._tilesAvailable,u=0;u<l.length;++u){var d=l[u];c.addAvailableTileRange(t,d.startX,d.startY,d.endX,d.endY)}return isTileAvailable(e,t,i,r)})),l[s]={promise:u,request:c},{promise:u=u.always((function(e){return delete l[s],e})),request:c}):{}}Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}}),ArcGISTiledElevationTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){var n,a,o=this._resource.getDerivedResource({url:"tile/"+i+"/"+t+"/"+e,request:r}),s=this._hasAvailability,l=when.resolve(!0);if(s&&!defined(isTileAvailable(this,i+1,2*e,2*t))&&(l=(n=requestAvailability(this,i+1,2*e,2*t)).promise,a=n.request),defined(o=o.fetchArrayBuffer())&&defined(l)){var c=this,u=this._tilesAvailable;return when.join(o,l).then((function(r){return new HeightmapTerrainData({buffer:r[0],width:c._width,height:c._height,childTileMask:s?u.computeChildMaskForTile(i,e,t):ALL_CHILDREN,structure:c._terrainDataStructure,encoding:c._encoding})})).otherwise((function(e){return defined(a)&&a.state===RequestState$1.CANCELLED?(r.cancel(),r.deferred.promise.always((function(){return r.state=RequestState$1.CANCELLED,when.reject(e)}))):when.reject(e)}))}},ArcGISTiledElevationTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},ArcGISTiledElevationTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){if(this._hasAvailability){var r=isTileAvailable(this,i,e,t);if(defined(r))return r;requestAvailability(this,i,e,t)}},ArcGISTiledElevationTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){};var ArcType={NONE:0,GEODESIC:1,RHUMB:2},ArcType$1=Object.freeze(ArcType);function AssociativeArray(){this._array=[],this._hash={}}Object.defineProperties(AssociativeArray.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}}),AssociativeArray.prototype.contains=function(e){return defined(this._hash[e])},AssociativeArray.prototype.set=function(e,t){t!==this._hash[e]&&(this.remove(e),this._hash[e]=t,this._array.push(t))},AssociativeArray.prototype.get=function(e){return this._hash[e]},AssociativeArray.prototype.remove=function(e){var t,i=this._hash[e],r=defined(i);return r&&((t=this._array).splice(t.indexOf(i),1),delete this._hash[e]),r},AssociativeArray.prototype.removeAll=function(){var e=this._array;0<e.length&&(this._hash={},e.length=0)};var url="https://dev.virtualearth.net/REST/v1/Locations";function BingMapsGeocoderService(e){e=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).key,this._key=e,this._resource=new Resource({url:url,queryParameters:{key:e}})}function BoundingRectangle(e,t,i,r){this.x=defaultValue(e,0),this.y=defaultValue(t,0),this.width=defaultValue(i,0),this.height=defaultValue(r,0)}Object.defineProperties(BingMapsGeocoderService.prototype,{url:{get:function(){return url}},key:{get:function(){return this._key}}}),BingMapsGeocoderService.prototype.geocode=function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then((function(e){return 0===e.resourceSets.length?[]:e.resourceSets[0].resources.map((function(e){var t=(n=e.bbox)[0],i=n[1],r=n[2],n=n[3];return{displayName:e.name,destination:Rectangle.fromDegrees(i,t,n,r)}}))}))},BoundingRectangle.packedLength=4,BoundingRectangle.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},BoundingRectangle.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new BoundingRectangle),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},BoundingRectangle.fromPoints=function(e,t){if(defined(t)||(t=new BoundingRectangle),!defined(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,r=e[0].x,n=e[0].y,a=e[0].x,o=e[0].y,s=1;s<i;s++){var l=(c=e[s]).x,c=c.y;r=Math.min(l,r),a=Math.max(l,a),n=Math.min(c,n),o=Math.max(c,o)}return t.x=r,t.y=n,t.width=a-r,t.height=o-n,t};var defaultProjection$1=new GeographicProjection,fromRectangleLowerLeft=new Cartographic,fromRectangleUpperRight=new Cartographic;function arrayFill(e,t,i,r){if("function"==typeof e.fill)return e.fill(t,i,r);for(var n=e.length>>>0,a=(i=defaultValue(i,0))<0?Math.max(n+i,0):Math.min(i,n),o=(r=defaultValue(r,n))<0?Math.max(n+r,0):Math.min(r,n);a<o;)e[a]=t,a++;return e}BoundingRectangle.fromRectangle=function(e,t,i){if(defined(i)||(i=new BoundingRectangle),!defined(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var r=(t=defaultValue(t,defaultProjection$1)).project(Rectangle.southwest(e,fromRectangleLowerLeft));e=t.project(Rectangle.northeast(e,fromRectangleUpperRight));return Cartesian2.subtract(e,r,e),i.x=r.x,i.y=r.y,i.width=e.x,i.height=e.y,i},BoundingRectangle.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new BoundingRectangle(e.x,e.y,e.width,e.height)},BoundingRectangle.union=function(e,t,i){defined(i)||(i=new BoundingRectangle);var r=Math.min(e.x,t.x),n=Math.min(e.y,t.y),a=Math.max(e.x+e.width,t.x+t.width);t=Math.max(e.y+e.height,t.y+t.height);return i.x=r,i.y=n,i.width=a-r,i.height=t-n,i},BoundingRectangle.expand=function(e,t,i){i=BoundingRectangle.clone(e,i);var r=t.x-i.x;e=t.y-i.y;return r>i.width?i.width=r:r<0&&(i.width-=r,i.x=t.x),e>i.height?i.height=e:e<0&&(i.height-=e,i.y=t.y),i},BoundingRectangle.intersect=function(e,t){var i=e.x,r=e.y,n=t.x,a=t.y;return i>n+t.width||i+e.width<n||r+e.height<a||r>a+t.height?Intersect$1.OUTSIDE:Intersect$1.INTERSECTING},BoundingRectangle.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},BoundingRectangle.prototype.clone=function(e){return BoundingRectangle.clone(this,e)},BoundingRectangle.prototype.intersect=function(e){return BoundingRectangle.intersect(this,e)},BoundingRectangle.prototype.equals=function(e){return BoundingRectangle.equals(this,e)};var GeometryType={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},GeometryType$1=Object.freeze(GeometryType);function Matrix2(e,t,i,r){this[0]=defaultValue(e,0),this[1]=defaultValue(i,0),this[2]=defaultValue(t,0),this[3]=defaultValue(r,0)}Matrix2.packedLength=4,Matrix2.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t},Matrix2.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix2),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i},Matrix2.clone=function(e,t){if(defined(e))return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new Matrix2(e[0],e[2],e[1],e[3])},Matrix2.fromArray=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix2),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i},Matrix2.fromColumnMajorArray=function(e,t){return Matrix2.clone(e,t)},Matrix2.fromRowMajorArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new Matrix2(e[0],e[1],e[2],e[3])},Matrix2.fromScale=function(e,t){return defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new Matrix2(e.x,0,0,e.y)},Matrix2.fromUniformScale=function(e,t){return defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new Matrix2(e,0,0,e)},Matrix2.fromRotation=function(e,t){var i=Math.cos(e);e=Math.sin(e);return defined(t)?(t[0]=i,t[1]=e,t[2]=-e,t[3]=i,t):new Matrix2(i,-e,e,i)},Matrix2.toArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},Matrix2.getElementIndex=function(e,t){return 2*e+t},Matrix2.getColumn=function(e,t,i){t=e[r=2*t];var r=e[1+r];return i.x=t,i.y=r,i},Matrix2.setColumn=function(e,t,i,r){return t*=2,(r=Matrix2.clone(e,r))[t]=i.x,r[1+t]=i.y,r},Matrix2.getRow=function(e,t,i){var r=e[t];t=e[t+2];return i.x=r,i.y=t,i},Matrix2.setRow=function(e,t,i,r){return(r=Matrix2.clone(e,r))[t]=i.x,r[t+2]=i.y,r};var scratchColumn$2=new Cartesian2;Matrix2.getScale=function(e,t){return t.x=Cartesian2.magnitude(Cartesian2.fromElements(e[0],e[1],scratchColumn$2)),t.y=Cartesian2.magnitude(Cartesian2.fromElements(e[2],e[3],scratchColumn$2)),t};var scratchScale$4=new Cartesian2;Matrix2.getMaximumScale=function(e){return Matrix2.getScale(e,scratchScale$4),Cartesian2.maximumComponent(scratchScale$4)},Matrix2.multiply=function(e,t,i){var r=e[0]*t[0]+e[2]*t[1],n=e[0]*t[2]+e[2]*t[3],a=e[1]*t[0]+e[3]*t[1];t=e[1]*t[2]+e[3]*t[3];return i[0]=r,i[1]=a,i[2]=n,i[3]=t,i},Matrix2.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i},Matrix2.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i},Matrix2.multiplyByVector=function(e,t,i){var r=e[0]*t.x+e[2]*t.y;t=e[1]*t.x+e[3]*t.y;return i.x=r,i.y=t,i},Matrix2.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i},Matrix2.multiplyByScale=function(e,t,i){return i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.y,i[3]=e[3]*t.y,i},Matrix2.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},Matrix2.transpose=function(e,t){var i=e[0],r=e[2],n=e[1];e=e[3];return t[0]=i,t[1]=r,t[2]=n,t[3]=e,t},Matrix2.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},Matrix2.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},Matrix2.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]},Matrix2.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i},Matrix2.IDENTITY=Object.freeze(new Matrix2(1,0,0,1)),Matrix2.ZERO=Object.freeze(new Matrix2(0,0,0,0)),Matrix2.COLUMN0ROW0=0,Matrix2.COLUMN0ROW1=1,Matrix2.COLUMN1ROW0=2,Matrix2.COLUMN1ROW1=3,Object.defineProperties(Matrix2.prototype,{length:{get:function(){return Matrix2.packedLength}}}),Matrix2.prototype.clone=function(e){return Matrix2.clone(this,e)},Matrix2.prototype.equals=function(e){return Matrix2.equals(this,e)},Matrix2.prototype.equalsEpsilon=function(e,t){return Matrix2.equalsEpsilon(this,e,t)},Matrix2.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var PrimitiveType={POINTS:WebGLConstants$1.POINTS,LINES:WebGLConstants$1.LINES,LINE_LOOP:WebGLConstants$1.LINE_LOOP,LINE_STRIP:WebGLConstants$1.LINE_STRIP,TRIANGLES:WebGLConstants$1.TRIANGLES,TRIANGLE_STRIP:WebGLConstants$1.TRIANGLE_STRIP,TRIANGLE_FAN:WebGLConstants$1.TRIANGLE_FAN,validate:function(e){return e===PrimitiveType.POINTS||e===PrimitiveType.LINES||e===PrimitiveType.LINE_LOOP||e===PrimitiveType.LINE_STRIP||e===PrimitiveType.TRIANGLES||e===PrimitiveType.TRIANGLE_STRIP||e===PrimitiveType.TRIANGLE_FAN}},PrimitiveType$1=Object.freeze(PrimitiveType);function Geometry(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=defaultValue(e.primitiveType,PrimitiveType$1.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=defaultValue(e.geometryType,GeometryType$1.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}Geometry.computeNumberOfVertices=function(e){var t,i,r=-1;for(t in e.attributes)e.attributes.hasOwnProperty(t)&&defined(e.attributes[t])&&defined(e.attributes[t].values)&&(r=(i=e.attributes[t]).values.length/i.componentsPerAttribute);return r};var rectangleCenterScratch=new Cartographic,enuCenterScratch=new Cartesian3,fixedFrameToEnuScratch=new Matrix4,boundingRectanglePointsCartographicScratch=[new Cartographic,new Cartographic,new Cartographic],boundingRectanglePointsEnuScratch=[new Cartesian2,new Cartesian2,new Cartesian2],points2DScratch=[new Cartesian2,new Cartesian2,new Cartesian2],pointEnuScratch=new Cartesian3,enuRotationScratch=new Quaternion,enuRotationMatrixScratch=new Matrix4,rotation2DScratch=new Matrix2;function GeometryAttribute(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=defaultValue(e.normalize,!1),this.values=e.values}function GeometryAttributes(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}Geometry._textureCoordinateRotationPoints=function(e,t,i,r){var n=Rectangle.center(r,rectangleCenterScratch),a=Cartographic.toCartesian(n,i,enuCenterScratch),o=(n=Transforms.eastNorthUpToFixedFrame(a,i,fixedFrameToEnuScratch),Matrix4.inverse(n,fixedFrameToEnuScratch)),s=boundingRectanglePointsEnuScratch,l=boundingRectanglePointsCartographicScratch;l[0].longitude=r.west,l[0].latitude=r.south,l[1].longitude=r.west,l[1].latitude=r.north,l[2].longitude=r.east,l[2].latitude=r.south;for(var c=pointEnuScratch,u=0;u<3;u++)Cartographic.toCartesian(l[u],i,c),c=Matrix4.multiplyByPointAsVector(o,c,c),s[u].x=c.x,s[u].y=c.y;a=Quaternion.fromAxisAngle(Cartesian3.UNIT_Z,-t,enuRotationScratch);var d=Matrix3.fromQuaternion(a,enuRotationMatrixScratch),h=e.length,p=Number.POSITIVE_INFINITY,f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=Number.NEGATIVE_INFINITY;for(u=0;u<h;u++)c=Matrix4.multiplyByPointAsVector(o,e[u],c),c=Matrix3.multiplyByVector(d,c,c),p=Math.min(p,c.x),f=Math.min(f,c.y),m=Math.max(m,c.x),g=Math.max(g,c.y);var y=Matrix2.fromRotation(t,rotation2DScratch),_=points2DScratch;_[0].x=p,_[0].y=f,_[1].x=p,_[1].y=g,_[2].x=m,_[2].y=f;var v=s[0],C=s[2].x-v.x,x=s[1].y-v.y;for(u=0;u<3;u++){var b=_[u];Matrix2.multiplyByVector(y,b,b),b.x=(b.x-v.x)/C,b.y=(b.y-v.y)/x}return n=_[0],r=_[1],a=_[2],t=new Array(6),Cartesian2.pack(n,t),Cartesian2.pack(r,t,2),Cartesian2.pack(a,t,4),t};var GeometryOffsetAttribute={NONE:0,TOP:1,ALL:2},GeometryOffsetAttribute$1=Object.freeze(GeometryOffsetAttribute);function VertexFormat(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.position=defaultValue(e.position,!1),this.normal=defaultValue(e.normal,!1),this.st=defaultValue(e.st,!1),this.bitangent=defaultValue(e.bitangent,!1),this.tangent=defaultValue(e.tangent,!1),this.color=defaultValue(e.color,!1)}VertexFormat.POSITION_ONLY=Object.freeze(new VertexFormat({position:!0})),VertexFormat.POSITION_AND_NORMAL=Object.freeze(new VertexFormat({position:!0,normal:!0})),VertexFormat.POSITION_NORMAL_AND_ST=Object.freeze(new VertexFormat({position:!0,normal:!0,st:!0})),VertexFormat.POSITION_AND_ST=Object.freeze(new VertexFormat({position:!0,st:!0})),VertexFormat.POSITION_AND_COLOR=Object.freeze(new VertexFormat({position:!0,color:!0})),VertexFormat.ALL=Object.freeze(new VertexFormat({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),VertexFormat.DEFAULT=VertexFormat.POSITION_NORMAL_AND_ST,VertexFormat.packedLength=6,VertexFormat.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.position?1:0,t[i++]=e.normal?1:0,t[i++]=e.st?1:0,t[i++]=e.tangent?1:0,t[i++]=e.bitangent?1:0,t[i]=e.color?1:0,t},VertexFormat.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new VertexFormat),i.position=1===e[t++],i.normal=1===e[t++],i.st=1===e[t++],i.tangent=1===e[t++],i.bitangent=1===e[t++],i.color=1===e[t],i},VertexFormat.clone=function(e,t){if(defined(e))return defined(t)||(t=new VertexFormat),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var diffScratch=new Cartesian3;function BoxGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).minimum,i=e.maximum,r=defaultValue(e.vertexFormat,VertexFormat.DEFAULT);this._minimum=Cartesian3.clone(t),this._maximum=Cartesian3.clone(i),this._vertexFormat=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}BoxGeometry.fromDimensions=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).dimensions;t=Cartesian3.multiplyByScalar(t,.5,new Cartesian3);return new BoxGeometry({minimum:Cartesian3.negate(t,new Cartesian3),maximum:t,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},BoxGeometry.fromAxisAlignedBoundingBox=function(e){return new BoxGeometry({minimum:e.minimum,maximum:e.maximum})},BoxGeometry.packedLength=2*Cartesian3.packedLength+VertexFormat.packedLength+1,BoxGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._minimum,t,i),Cartesian3.pack(e._maximum,t,i+Cartesian3.packedLength),VertexFormat.pack(e._vertexFormat,t,i+2*Cartesian3.packedLength),t[i+2*Cartesian3.packedLength+VertexFormat.packedLength]=defaultValue(e._offsetAttribute,-1),t};var scratchMin=new Cartesian3,scratchMax=new Cartesian3,scratchVertexFormat=new VertexFormat,scratchOptions={minimum:scratchMin,maximum:scratchMax,vertexFormat:scratchVertexFormat,offsetAttribute:void 0},unitBoxGeometry;BoxGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchMin),n=Cartesian3.unpack(e,t+Cartesian3.packedLength,scratchMax),a=VertexFormat.unpack(e,t+2*Cartesian3.packedLength,scratchVertexFormat);t=e[t+2*Cartesian3.packedLength+VertexFormat.packedLength];return defined(i)?(i._minimum=Cartesian3.clone(r,i._minimum),i._maximum=Cartesian3.clone(n,i._maximum),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions.offsetAttribute=-1===t?void 0:t,new BoxGeometry(scratchOptions))},BoxGeometry.createGeometry=function(e){var t=e._minimum,i=e._maximum,r=e._vertexFormat;if(!Cartesian3.equals(t,i)){var n,a,o,s=new GeometryAttributes;r.position&&(r.st||r.normal||r.tangent||r.bitangent)?(r.position&&((l=new Float64Array(72))[0]=t.x,l[1]=t.y,l[2]=i.z,l[3]=i.x,l[4]=t.y,l[5]=i.z,l[6]=i.x,l[7]=i.y,l[8]=i.z,l[9]=t.x,l[10]=i.y,l[11]=i.z,l[12]=t.x,l[13]=t.y,l[14]=t.z,l[15]=i.x,l[16]=t.y,l[17]=t.z,l[18]=i.x,l[19]=i.y,l[20]=t.z,l[21]=t.x,l[22]=i.y,l[23]=t.z,l[24]=i.x,l[25]=t.y,l[26]=t.z,l[27]=i.x,l[28]=i.y,l[29]=t.z,l[30]=i.x,l[31]=i.y,l[32]=i.z,l[33]=i.x,l[34]=t.y,l[35]=i.z,l[36]=t.x,l[37]=t.y,l[38]=t.z,l[39]=t.x,l[40]=i.y,l[41]=t.z,l[42]=t.x,l[43]=i.y,l[44]=i.z,l[45]=t.x,l[46]=t.y,l[47]=i.z,l[48]=t.x,l[49]=i.y,l[50]=t.z,l[51]=i.x,l[52]=i.y,l[53]=t.z,l[54]=i.x,l[55]=i.y,l[56]=i.z,l[57]=t.x,l[58]=i.y,l[59]=i.z,l[60]=t.x,l[61]=t.y,l[62]=t.z,l[63]=i.x,l[64]=t.y,l[65]=t.z,l[66]=i.x,l[67]=t.y,l[68]=i.z,l[69]=t.x,l[70]=t.y,l[71]=i.z,s.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l})),r.normal&&((n=new Float32Array(72))[0]=0,n[1]=0,n[2]=1,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=1,n[9]=0,n[10]=0,n[11]=1,n[12]=0,n[13]=0,n[14]=-1,n[15]=0,n[16]=0,n[17]=-1,n[18]=0,n[19]=0,n[20]=-1,n[21]=0,n[22]=0,n[23]=-1,n[24]=1,n[25]=0,n[26]=0,n[27]=1,n[28]=0,n[29]=0,n[30]=1,n[31]=0,n[32]=0,n[33]=1,n[34]=0,n[35]=0,n[36]=-1,n[37]=0,n[38]=0,n[39]=-1,n[40]=0,n[41]=0,n[42]=-1,n[43]=0,n[44]=0,n[45]=-1,n[46]=0,n[47]=0,n[48]=0,n[49]=1,n[50]=0,n[51]=0,n[52]=1,n[53]=0,n[54]=0,n[55]=1,n[56]=0,n[57]=0,n[58]=1,n[59]=0,n[60]=0,n[61]=-1,n[62]=0,n[63]=0,n[64]=-1,n[65]=0,n[66]=0,n[67]=-1,n[68]=0,n[69]=0,n[70]=-1,n[71]=0,s.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:n})),r.st&&((a=new Float32Array(48))[0]=0,a[1]=0,a[2]=1,a[3]=0,a[4]=1,a[5]=1,a[6]=0,a[7]=1,a[8]=1,a[9]=0,a[10]=0,a[11]=0,a[12]=0,a[13]=1,a[14]=1,a[15]=1,a[16]=0,a[17]=0,a[18]=1,a[19]=0,a[20]=1,a[21]=1,a[22]=0,a[23]=1,a[24]=1,a[25]=0,a[26]=0,a[27]=0,a[28]=0,a[29]=1,a[30]=1,a[31]=1,a[32]=1,a[33]=0,a[34]=0,a[35]=0,a[36]=0,a[37]=1,a[38]=1,a[39]=1,a[40]=0,a[41]=0,a[42]=1,a[43]=0,a[44]=1,a[45]=1,a[46]=0,a[47]=1,s.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:a})),r.tangent&&((a=new Float32Array(72))[0]=1,a[1]=0,a[2]=0,a[3]=1,a[4]=0,a[5]=0,a[6]=1,a[7]=0,a[8]=0,a[9]=1,a[10]=0,a[11]=0,a[12]=-1,a[13]=0,a[14]=0,a[15]=-1,a[16]=0,a[17]=0,a[18]=-1,a[19]=0,a[20]=0,a[21]=-1,a[22]=0,a[23]=0,a[24]=0,a[25]=1,a[26]=0,a[27]=0,a[28]=1,a[29]=0,a[30]=0,a[31]=1,a[32]=0,a[33]=0,a[34]=1,a[35]=0,a[36]=0,a[37]=-1,a[38]=0,a[39]=0,a[40]=-1,a[41]=0,a[42]=0,a[43]=-1,a[44]=0,a[45]=0,a[46]=-1,a[47]=0,a[48]=-1,a[49]=0,a[50]=0,a[51]=-1,a[52]=0,a[53]=0,a[54]=-1,a[55]=0,a[56]=0,a[57]=-1,a[58]=0,a[59]=0,a[60]=1,a[61]=0,a[62]=0,a[63]=1,a[64]=0,a[65]=0,a[66]=1,a[67]=0,a[68]=0,a[69]=1,a[70]=0,a[71]=0,s.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:a})),r.bitangent&&((o=new Float32Array(72))[0]=0,o[1]=1,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=0,o[7]=1,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=1,o[14]=0,o[15]=0,o[16]=1,o[17]=0,o[18]=0,o[19]=1,o[20]=0,o[21]=0,o[22]=1,o[23]=0,o[24]=0,o[25]=0,o[26]=1,o[27]=0,o[28]=0,o[29]=1,o[30]=0,o[31]=0,o[32]=1,o[33]=0,o[34]=0,o[35]=1,o[36]=0,o[37]=0,o[38]=1,o[39]=0,o[40]=0,o[41]=1,o[42]=0,o[43]=0,o[44]=1,o[45]=0,o[46]=0,o[47]=1,o[48]=0,o[49]=0,o[50]=1,o[51]=0,o[52]=0,o[53]=1,o[54]=0,o[55]=0,o[56]=1,o[57]=0,o[58]=0,o[59]=1,o[60]=0,o[61]=0,o[62]=1,o[63]=0,o[64]=0,o[65]=1,o[66]=0,o[67]=0,o[68]=1,o[69]=0,o[70]=0,o[71]=1,s.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:o})),(o=new Uint16Array(36))[0]=0,o[1]=1,o[2]=2,o[3]=0,o[4]=2,o[5]=3,o[6]=6,o[7]=5,o[8]=4,o[9]=7,o[10]=6,o[11]=4,o[12]=8,o[13]=9,o[14]=10,o[15]=8,o[16]=10,o[17]=11,o[18]=14,o[19]=13,o[20]=12,o[21]=15,o[22]=14,o[23]=12,o[24]=18,o[25]=17,o[26]=16,o[27]=19,o[28]=18,o[29]=16,o[30]=20,o[31]=21,o[32]=22,o[33]=20,o[34]=22,o[35]=23):((l=new Float64Array(24))[0]=t.x,l[1]=t.y,l[2]=t.z,l[3]=i.x,l[4]=t.y,l[5]=t.z,l[6]=i.x,l[7]=i.y,l[8]=t.z,l[9]=t.x,l[10]=i.y,l[11]=t.z,l[12]=t.x,l[13]=t.y,l[14]=i.z,l[15]=i.x,l[16]=t.y,l[17]=i.z,l[18]=i.x,l[19]=i.y,l[20]=i.z,l[21]=t.x,l[22]=i.y,l[23]=i.z,s.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l}),(o=new Uint16Array(36))[0]=4,o[1]=5,o[2]=6,o[3]=4,o[4]=6,o[5]=7,o[6]=1,o[7]=0,o[8]=3,o[9]=1,o[10]=3,o[11]=2,o[12]=1,o[13]=6,o[14]=5,o[15]=1,o[16]=2,o[17]=6,o[18]=2,o[19]=3,o[20]=7,o[21]=2,o[22]=7,o[23]=6,o[24]=3,o[25]=0,o[26]=4,o[27]=3,o[28]=4,o[29]=7,o[30]=0,o[31]=1,o[32]=5,o[33]=0,o[34]=5,o[35]=4);var l;t=Cartesian3.subtract(i,t,diffScratch),t=.5*Cartesian3.magnitude(t);return defined(e._offsetAttribute)&&(l=l.length,arrayFill(l=new Uint8Array(l/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),s.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})),new Geometry({attributes:s,indices:o,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:new BoundingSphere(Cartesian3.ZERO,t),offsetAttribute:e._offsetAttribute})}},BoxGeometry.getUnitBox=function(){return defined(unitBoxGeometry)||(unitBoxGeometry=BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(1,1,1),vertexFormat:VertexFormat.POSITION_ONLY}))),unitBoxGeometry};var diffScratch$1=new Cartesian3;function BoxOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).minimum,i=e.maximum;this._min=Cartesian3.clone(t),this._max=Cartesian3.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}BoxOutlineGeometry.fromDimensions=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).dimensions;t=Cartesian3.multiplyByScalar(t,.5,new Cartesian3);return new BoxOutlineGeometry({minimum:Cartesian3.negate(t,new Cartesian3),maximum:t,offsetAttribute:e.offsetAttribute})},BoxOutlineGeometry.fromAxisAlignedBoundingBox=function(e){return new BoxOutlineGeometry({minimum:e.minimum,maximum:e.maximum})},BoxOutlineGeometry.packedLength=2*Cartesian3.packedLength+1,BoxOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._min,t,i),Cartesian3.pack(e._max,t,i+Cartesian3.packedLength),t[i+2*Cartesian3.packedLength]=defaultValue(e._offsetAttribute,-1),t};var scratchMin$1=new Cartesian3,scratchMax$1=new Cartesian3,scratchOptions$1={minimum:scratchMin$1,maximum:scratchMax$1,offsetAttribute:void 0};function CartographicGeocoderService(){}function Spline(){this.times=void 0,this.points=void 0,DeveloperError.throwInstantiationError()}function LinearSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).points;e=e.times;this._times=e,this._points=t,this._lastTimeIndex=0}BoxOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchMin$1),n=Cartesian3.unpack(e,t+Cartesian3.packedLength,scratchMax$1);t=e[t+2*Cartesian3.packedLength];return defined(i)?(i._min=Cartesian3.clone(r,i._min),i._max=Cartesian3.clone(n,i._max),i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$1.offsetAttribute=-1===t?void 0:t,new BoxOutlineGeometry(scratchOptions$1))},BoxOutlineGeometry.createGeometry=function(e){var t=e._min,i=e._max;if(!Cartesian3.equals(t,i)){var r=new GeometryAttributes,n=new Uint16Array(24),a=new Float64Array(24);return a[0]=t.x,a[1]=t.y,a[2]=t.z,a[3]=i.x,a[4]=t.y,a[5]=t.z,a[6]=i.x,a[7]=i.y,a[8]=t.z,a[9]=t.x,a[10]=i.y,a[11]=t.z,a[12]=t.x,a[13]=t.y,a[14]=i.z,a[15]=i.x,a[16]=t.y,a[17]=i.z,a[18]=i.x,a[19]=i.y,a[20]=i.z,a[21]=t.x,a[22]=i.y,a[23]=i.z,r.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:a}),n[0]=4,n[1]=5,n[2]=5,n[3]=6,n[4]=6,n[5]=7,n[6]=7,n[7]=4,n[8]=0,n[9]=1,n[10]=1,n[11]=2,n[12]=2,n[13]=3,n[14]=3,n[15]=0,n[16]=0,n[17]=4,n[18]=1,n[19]=5,n[20]=2,n[21]=6,n[22]=3,n[23]=7,t=Cartesian3.subtract(i,t,diffScratch$1),t=.5*Cartesian3.magnitude(t),defined(e._offsetAttribute)&&(a=a.length,arrayFill(a=new Uint8Array(a/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),r.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new Geometry({attributes:r,indices:n,primitiveType:PrimitiveType$1.LINES,boundingSphere:new BoundingSphere(Cartesian3.ZERO,t),offsetAttribute:e._offsetAttribute})}},CartographicGeocoderService.prototype.geocode=function(e){var t=e.match(/[^\s,\n]+/g);if(2===t.length||3===t.length){var i=+t[0],r=+t[1],n=3===t.length?+t[2]:300;if(isNaN(i)&&isNaN(r))for(var a=/^(\d+.?\d*)([nsew])/i,o=0;o<t.length;++o){var s=t[o].match(a);a.test(t[o])&&3===s.length&&(/^[ns]/i.test(s[2])?r=/^[n]/i.test(s[2])?+s[1]:-s[1]:/^[ew]/i.test(s[2])&&(i=/^[e]/i.test(s[2])?+s[1]:-s[1]))}if(!isNaN(i)&&!isNaN(r)&&!isNaN(n))return n={displayName:e,destination:Cartesian3.fromDegrees(i,r,n)},when.resolve([n])}return when.resolve([])},Spline.prototype.evaluate=DeveloperError.throwInstantiationError,Spline.prototype.findTimeInterval=function(e,t){var i,r=this.times,n=r.length;if(e>=r[t=defaultValue(t,0)]){if(t+1<n&&e<r[t+1])return t;if(t+2<n&&e<r[t+2])return t+1}else if(0<=t-1&&e>=r[t-1])return t-1;if(e>r[t])for(i=t;i<n-1&&!(e>=r[i]&&e<r[i+1]);++i);else for(i=t-1;0<=i&&!(e>=r[i]&&e<r[i+1]);--i);return i===n-1&&(i=n-2),i},Spline.prototype.wrapTime=function(e){var t=(r=this.times)[r.length-1],i=r[0],r=t-i;return e<i&&(e+=(Math.floor((i-e)/r)+1)*r),t<e&&(e-=(Math.floor((e-t)/r)+1)*r),e},Spline.prototype.clampTime=function(e){var t=this.times;return CesiumMath.clamp(e,t[0],t[t.length-1])},Object.defineProperties(LinearSpline.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),LinearSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,LinearSpline.prototype.wrapTime=Spline.prototype.wrapTime,LinearSpline.prototype.clampTime=Spline.prototype.clampTime,LinearSpline.prototype.evaluate=function(e,t){var i=this.points,r=this.times,n=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);r=(e-r[n])/(r[n+1]-r[n]);return defined(t)||(t=new Cartesian3),Cartesian3.lerp(i[n],i[n+1],r,t)};var TridiagonalSystemSolver={solve:function(e,t,i,r){for(var n,a=new Array(i.length),o=new Array(r.length),s=new Array(r.length),l=0;l<o.length;l++)o[l]=new Cartesian3,s[l]=new Cartesian3;for(a[0]=i[0]/t[0],o[0]=Cartesian3.multiplyByScalar(r[0],1/t[0],o[0]),l=1;l<a.length;++l)n=1/(t[l]-a[l-1]*e[l-1]),a[l]=i[l]*n,o[l]=Cartesian3.subtract(r[l],Cartesian3.multiplyByScalar(o[l-1],e[l-1],o[l]),o[l]),o[l]=Cartesian3.multiplyByScalar(o[l],n,o[l]);for(n=1/(t[l]-a[l-1]*e[l-1]),o[l]=Cartesian3.subtract(r[l],Cartesian3.multiplyByScalar(o[l-1],e[l-1],o[l]),o[l]),o[l]=Cartesian3.multiplyByScalar(o[l],n,o[l]),s[s.length-1]=o[o.length-1],l=s.length-2;0<=l;--l)s[l]=Cartesian3.subtract(o[l],Cartesian3.multiplyByScalar(s[l+1],a[l],s[l]),s[l]);return s}},scratchLower=[],scratchDiagonal=[],scratchUpper=[],scratchRight=[];function generateClamped(e,t,i){var r,n=scratchLower,a=scratchUpper,o=scratchDiagonal,s=scratchRight;n.length=a.length=e.length-1,o.length=s.length=e.length,n[0]=o[0]=1;var l=s[a[0]=0];for(defined(l)||(l=s[0]=new Cartesian3),Cartesian3.clone(t,l),r=1;r<n.length-1;++r)n[r]=a[r]=1,o[r]=4,defined(l=s[r])||(l=s[r]=new Cartesian3),Cartesian3.subtract(e[r+1],e[r-1],l),Cartesian3.multiplyByScalar(l,3,l);return n[r]=0,a[r]=1,o[r]=4,defined(l=s[r])||(l=s[r]=new Cartesian3),Cartesian3.subtract(e[r+1],e[r-1],l),Cartesian3.multiplyByScalar(l,3,l),defined(l=s[r+(o[r+1]=1)])||(l=s[r+1]=new Cartesian3),Cartesian3.clone(i,l),TridiagonalSystemSolver.solve(n,o,a,s)}function generateNatural(e){var t,i=scratchLower,r=scratchUpper,n=scratchDiagonal,a=scratchRight;i.length=r.length=e.length-1,n.length=a.length=e.length,i[0]=r[0]=1,n[0]=2;var o=a[0];for(defined(o)||(o=a[0]=new Cartesian3),Cartesian3.subtract(e[1],e[0],o),Cartesian3.multiplyByScalar(o,3,o),t=1;t<i.length;++t)i[t]=r[t]=1,n[t]=4,defined(o=a[t])||(o=a[t]=new Cartesian3),Cartesian3.subtract(e[t+1],e[t-1],o),Cartesian3.multiplyByScalar(o,3,o);return n[t]=2,defined(o=a[t])||(o=a[t]=new Cartesian3),Cartesian3.subtract(e[t],e[t-1],o),Cartesian3.multiplyByScalar(o,3,o),TridiagonalSystemSolver.solve(i,n,r,a)}function HermiteSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).points,i=e.times,r=e.inTangents;e=e.outTangents;this._times=i,this._points=t,this._inTangents=r,this._outTangents=e,this._lastTimeIndex=0}Object.defineProperties(HermiteSpline.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),HermiteSpline.createC1=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).times,i=e.points,r=e.tangents;e=r.slice(0,r.length-1);return new HermiteSpline({times:t,points:i,inTangents:r.slice(1,r.length),outTangents:e})},HermiteSpline.createNaturalCubic=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).times,i=e.points;if(i.length<3)return new LinearSpline({points:i,times:t});var r=generateNatural(i);e=r.slice(0,r.length-1);return new HermiteSpline({times:t,points:i,inTangents:r.slice(1,r.length),outTangents:e})},HermiteSpline.createClampedCubic=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).times,i=e.points,r=e.firstTangent;e=e.lastTangent;return i.length<3?new LinearSpline({points:i,times:t}):(e=(r=generateClamped(i,r,e)).slice(0,r.length-1),new HermiteSpline({times:t,points:i,inTangents:r.slice(1,r.length),outTangents:e}))},HermiteSpline.hermiteCoefficientMatrix=new Matrix4(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0),HermiteSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval;var scratchTimeVec=new Cartesian4,scratchTemp=new Cartesian3;HermiteSpline.prototype.wrapTime=Spline.prototype.wrapTime,HermiteSpline.prototype.clampTime=Spline.prototype.clampTime,HermiteSpline.prototype.evaluate=function(e,t){defined(t)||(t=new Cartesian3);var i=this.points,r=this.times,n=this.inTangents,a=this.outTangents,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);e=(e-r[o])/(r[o+1]-r[o]);return(r=scratchTimeVec).z=e,r.y=e*e,r.x=r.y*e,r.w=1,r=Matrix4.multiplyByVector(HermiteSpline.hermiteCoefficientMatrix,r,r),t=Cartesian3.multiplyByScalar(i[o],r.x,t),Cartesian3.multiplyByScalar(i[o+1],r.y,scratchTemp),Cartesian3.add(t,scratchTemp,t),Cartesian3.multiplyByScalar(a[o],r.z,scratchTemp),Cartesian3.add(t,scratchTemp,t),Cartesian3.multiplyByScalar(n[o],r.w,scratchTemp),Cartesian3.add(t,scratchTemp,t)};var scratchTimeVec$1=new Cartesian4,scratchTemp0=new Cartesian3,scratchTemp1=new Cartesian3;function createEvaluateFunction(e){var t=e.points,i=e.times;if(t.length<3){var r=i[0],n=1/(i[1]-r),a=t[0],o=t[1];return function(e,t){return defined(t)||(t=new Cartesian3),e=(e-r)*n,Cartesian3.lerp(a,o,e,t)}}return function(r,n){defined(n)||(n=new Cartesian3);var a,o,s,l,c=e._lastTimeIndex=e.findTimeInterval(r,e._lastTimeIndex),u=(r-i[c])/(i[c+1]-i[c]);return(r=scratchTimeVec$1).z=u,r.y=u*u,r.x=r.y*u,r.w=1,r=0===c?(a=t[0],o=t[1],s=e.firstTangent,l=Cartesian3.subtract(t[2],a,scratchTemp0),Cartesian3.multiplyByScalar(l,.5,l),Matrix4.multiplyByVector(HermiteSpline.hermiteCoefficientMatrix,r,r)):c===t.length-2?(a=t[c],o=t[c+1],l=e.lastTangent,s=Cartesian3.subtract(o,t[c-1],scratchTemp0),Cartesian3.multiplyByScalar(s,.5,s),Matrix4.multiplyByVector(HermiteSpline.hermiteCoefficientMatrix,r,r)):(a=t[c-1],o=t[c],s=t[c+1],l=t[c+2],Matrix4.multiplyByVector(CatmullRomSpline.catmullRomCoefficientMatrix,r,r)),n=Cartesian3.multiplyByScalar(a,r.x,n),Cartesian3.multiplyByScalar(o,r.y,scratchTemp1),Cartesian3.add(n,scratchTemp1,n),Cartesian3.multiplyByScalar(s,r.z,scratchTemp1),Cartesian3.add(n,scratchTemp1,n),Cartesian3.multiplyByScalar(l,r.w,scratchTemp1),Cartesian3.add(n,scratchTemp1,n)}}var firstTangentScratch=new Cartesian3,lastTangentScratch=new Cartesian3;function CatmullRomSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).points,i=e.times,r=e.firstTangent,n=e.lastTangent;2<t.length&&(defined(r)||(r=firstTangentScratch,Cartesian3.multiplyByScalar(t[1],2,r),Cartesian3.subtract(r,t[2],r),Cartesian3.subtract(r,t[0],r),Cartesian3.multiplyByScalar(r,.5,r)),defined(n)||(e=t.length-1,n=lastTangentScratch,Cartesian3.multiplyByScalar(t[e-1],2,n),Cartesian3.subtract(t[e],n,n),Cartesian3.add(n,t[e-2],n),Cartesian3.multiplyByScalar(n,.5,n))),this._times=i,this._points=t,this._firstTangent=Cartesian3.clone(r),this._lastTangent=Cartesian3.clone(n),this._evaluateFunction=createEvaluateFunction(this),this._lastTimeIndex=0}function getStringFromTypedArray(e,t,i){return t=defaultValue(t,0),i=defaultValue(i,e.byteLength-t),e=e.subarray(t,t+i),getStringFromTypedArray.decode(e)}function inRange(e,t,i){return t<=e&&e<=i}function utf8Handler(e){for(var t=0,i=0,r=0,n=128,a=191,o=[],s=e.length,l=0;l<s;++l){var c=e[l];if(0===r){if(inRange(c,0,127)){o.push(c);continue}if(inRange(c,194,223)){r=1,t=31&c;continue}if(inRange(c,224,239)){224===c&&(n=160),237===c&&(a=159),r=2,t=15&c;continue}if(inRange(c,240,244)){240===c&&(n=144),244===c&&(a=143),r=3,t=7&c;continue}throw new RuntimeError("String decoding failed.")}inRange(c,n,a)?(n=128,a=191,t=t<<6|63&c,++i===r&&(o.push(t),t=r=i=0)):(t=r=i=0,n=128,a=191,--l)}return o}Object.defineProperties(CatmullRomSpline.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}}),CatmullRomSpline.catmullRomCoefficientMatrix=new Matrix4(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),CatmullRomSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,CatmullRomSpline.prototype.wrapTime=Spline.prototype.wrapTime,CatmullRomSpline.prototype.clampTime=Spline.prototype.clampTime,CatmullRomSpline.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},getStringFromTypedArray.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)},getStringFromTypedArray.decodeWithFromCharCode=function(e){for(var t="",i=utf8Handler(e),r=i.length,n=0;n<r;++n){var a=i[n];a<=65535?t+=String.fromCharCode(a):(a-=65536,t+=String.fromCharCode(55296+(a>>10),56320+(1023&a)))}return t},"undefined"!=typeof TextDecoder?getStringFromTypedArray.decode=getStringFromTypedArray.decodeWithTextDecoder:getStringFromTypedArray.decode=getStringFromTypedArray.decodeWithFromCharCode;var Intersections2D={};function QuantizedMeshTerrainData(e){this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;var t=this._quantizedVertices.length/3,i=this._uValues=this._quantizedVertices.subarray(0,t),r=this._vValues=this._quantizedVertices.subarray(t,2*t);function n(e,t){return r[e]-r[t]}function a(e,t){return i[e]-i[t]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=sortIndicesIfNecessary(e.westIndices,n,t),this._southIndices=sortIndicesIfNecessary(e.southIndices,a,t),this._eastIndices=sortIndicesIfNecessary(e.eastIndices,n,t),this._northIndices=sortIndicesIfNecessary(e.northIndices,a,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=defaultValue(e.childTileMask,15),this._createdByUpsampling=defaultValue(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Intersections2D.clipTriangleAtAxisAlignedThreshold=function(e,t,i,r,n,a){var o,s,l,c,u,d,h,p,f;return defined(a)?a.length=0:a=[],l=t?(o=i<e,s=r<e,n<e):(o=e<i,s=e<r,e<n),1===(t=o+s+l)?o?(c=(e-i)/(r-i),u=(e-i)/(n-i),a.push(1),a.push(2),1!==u&&(a.push(-1),a.push(0),a.push(2),a.push(u)),1!==c&&(a.push(-1),a.push(0),a.push(1),a.push(c))):s?(d=(e-r)/(n-r),h=(e-r)/(i-r),a.push(2),a.push(0),1!==h&&(a.push(-1),a.push(1),a.push(0),a.push(h)),1!==d&&(a.push(-1),a.push(1),a.push(2),a.push(d))):l&&(p=(e-n)/(i-n),f=(e-n)/(r-n),a.push(0),a.push(1),1!==f&&(a.push(-1),a.push(2),a.push(1),a.push(f)),1!==p&&(a.push(-1),a.push(2),a.push(0),a.push(p))):2===t?o||i===e?s||r===e?l||n===e||(u=(e-i)/(n-i),d=(e-r)/(n-r),a.push(2),a.push(-1),a.push(0),a.push(2),a.push(u),a.push(-1),a.push(1),a.push(2),a.push(d)):(f=(e-n)/(r-n),c=(e-i)/(r-i),a.push(1),a.push(-1),a.push(2),a.push(1),a.push(f),a.push(-1),a.push(0),a.push(1),a.push(c)):(h=(e-r)/(i-r),p=(e-n)/(i-n),a.push(0),a.push(-1),a.push(1),a.push(0),a.push(h),a.push(-1),a.push(2),a.push(0),a.push(p)):3!==t&&(a.push(0),a.push(1),a.push(2)),a},Intersections2D.computeBarycentricCoordinates=function(e,t,i,r,n,a,o,s,l){var c=i-o;i=o-n,n=a-s,a=r-s,r=1-(i=(n*(o=e-o)+i*(s=t-s))*(r=1/(n*c+i*a)))-(s=(-a*o+c*s)*r);return defined(l)?(l.x=i,l.y=s,l.z=r,l):new Cartesian3(i,s,r)},Intersections2D.computeLineSegmentLineSegmentIntersection=function(e,t,i,r,n,a,o,s,l){var c=(s-a)*(i-e)-(o-n)*(r-t);if(0!=c)return s=((o-n)*(t-a)-(s-a)*(e-n))/c,c=((i-e)*(t-a)-(r-t)*(e-n))/c,0<=s&&s<=1&&0<=c&&c<=1?(defined(l)||(l=new Cartesian2),l.x=e+s*(i-e),l.y=t+s*(r-t),l):void 0},Object.defineProperties(QuantizedMeshTerrainData.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return defined(this._mesh)}}});var arrayScratch=[];function sortIndicesIfNecessary(e,t,i){arrayScratch.length=e.length;for(var r=!1,n=0,a=e.length;n<a;++n)arrayScratch[n]=e[n],r=r||0<n&&0<t(e[n-1],e[n]);return r?(arrayScratch.sort(t),IndexDatatype$1.createTypedArray(i,arrayScratch)):e}var createMeshTaskProcessor=new TaskProcessor("createVerticesFromQuantizedTerrainMesh");QuantizedMeshTerrainData.prototype.createMesh=function(e,t,i,r,n){var a=e.ellipsoid;r=e.tileXYToRectangle(t,i,r);if(n=defaultValue(n,1),defined(a=createMeshTaskProcessor.scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:r,relativeToCenter:this._boundingSphere.center,ellipsoid:a,exaggeration:n}))){var o=this;return when(a,(function(e){var t=o._quantizedVertices.length/3,i=t+o._westIndices.length+o._southIndices.length+o._eastIndices.length+o._northIndices.length,r=IndexDatatype$1.createTypedArray(i,e.indices),a=new Float32Array(e.vertices),s=e.center,l=e.minimumHeight,c=e.maximumHeight,u=defaultValue(BoundingSphere.clone(e.boundingSphere),o._boundingSphere),d=defaultValue(OrientedBoundingBox.clone(e.orientedBoundingBox),o._orientedBoundingBox),h=defaultValue(Cartesian3.clone(e.occludeePointInScaledSpace),o._horizonOcclusionPoint),p=e.vertexStride;i=TerrainEncoding.clone(e.encoding);return o._mesh=new TerrainMesh(s,a,r,e.indexCountWithoutSkirts,t,l,c,u,h,p,d,i,n,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),o._quantizedVertices=void 0,o._encodedNormals=void 0,o._indices=void 0,o._uValues=void 0,o._vValues=void 0,o._heightValues=void 0,o._westIndices=void 0,o._southIndices=void 0,o._eastIndices=void 0,o._northIndices=void 0,o._mesh}))}};var upsampleTaskProcessor=new TaskProcessor("upsampleQuantizedTerrainMesh");QuantizedMeshTerrainData.prototype.upsample=function(e,t,i,r,n,a,o){var s=this._mesh;if(defined(this._mesh)){var l=2*t!==n;t=2*i===a,i=e.ellipsoid,o=e.tileXYToRectangle(n,a,o);if(defined(i=upsampleTaskProcessor.scheduleTask({vertices:s.vertices,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:t,childRectangle:o,ellipsoid:i,exaggeration:s.exaggeration}))){s=Math.min(this._westSkirtHeight,this._eastSkirtHeight),s=Math.min(s,this._southSkirtHeight),s=Math.min(s,this._northSkirtHeight);var c=l?.5*s:this._westSkirtHeight,u=t?.5*s:this._southSkirtHeight,d=l?this._eastSkirtHeight:.5*s,h=t?this._northSkirtHeight:.5*s,p=this._credits;return when(i).then((function(e){var t,i=new Uint16Array(e.vertices),r=IndexDatatype$1.createTypedArray(i.length/3,e.indices);return defined(e.encodedNormals)&&(t=new Uint8Array(e.encodedNormals)),new QuantizedMeshTerrainData({quantizedVertices:i,indices:r,encodedNormals:t,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:BoundingSphere.clone(e.boundingSphere),orientedBoundingBox:OrientedBoundingBox.clone(e.orientedBoundingBox),horizonOcclusionPoint:Cartesian3.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:c,southSkirtHeight:u,eastSkirtHeight:d,northSkirtHeight:h,childTileMask:0,credits:p,createdByUpsampling:!0})}))}}};var maxShort=32767,barycentricCoordinateScratch=new Cartesian3;function pointInBoundingBox(e,t,i,r,n,a,o,s){var l=Math.min(i,n,o);n=Math.max(i,n,o),o=Math.min(r,a,s),s=Math.max(r,a,s);return l<=e&&e<=n&&o<=t&&t<=s}QuantizedMeshTerrainData.prototype.interpolateHeight=function(e,t,i){return t=CesiumMath.clamp((t-e.west)/e.width,0,1),t*=maxShort,e=CesiumMath.clamp((i-e.south)/e.height,0,1),e*=maxShort,(defined(this._mesh)?interpolateMeshHeight$1:interpolateHeight$1)(this,t,e)};var texCoordScratch0=new Cartesian2,texCoordScratch1=new Cartesian2,texCoordScratch2=new Cartesian2;function interpolateMeshHeight$1(e,t,i){for(var r=(e=e._mesh).vertices,n=e.encoding,a=e.indices,o=0,s=a.length;o<s;o+=3){var l=a[o],c=a[o+1],u=a[o+2],d=n.decodeTextureCoordinates(r,l,texCoordScratch0),h=n.decodeTextureCoordinates(r,c,texCoordScratch1),p=n.decodeTextureCoordinates(r,u,texCoordScratch2);if(pointInBoundingBox(t,i,d.x,d.y,h.x,h.y,p.x,p.y)&&-1e-15<=(p=Intersections2D.computeBarycentricCoordinates(t,i,d.x,d.y,h.x,h.y,p.x,p.y,barycentricCoordinateScratch)).x&&-1e-15<=p.y&&-1e-15<=p.z)return l=n.decodeHeight(r,l),c=n.decodeHeight(r,c),u=n.decodeHeight(r,u),p.x*l+p.y*c+p.z*u}}function interpolateHeight$1(e,t,i){for(var r=e._uValues,n=e._vValues,a=e._heightValues,o=e._indices,s=0,l=o.length;s<l;s+=3){var c=o[s],u=o[s+1],d=o[s+2],h=r[c],p=r[u],f=r[d],m=n[c],g=n[u],y=n[d];if(pointInBoundingBox(t,i,h,m,p,g,f,y)&&-1e-15<=(y=Intersections2D.computeBarycentricCoordinates(t,i,h,m,p,g,f,y,barycentricCoordinateScratch)).x&&-1e-15<=y.y&&-1e-15<=y.z)return d=y.x*a[c]+y.y*a[u]+y.z*a[d],CesiumMath.lerp(e._minimumHeight,e._maximumHeight,d/maxShort)}}function LayerInformation(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.availabilityPromiseCache={}}function CesiumTerrainProvider(e){this._heightmapWidth=65,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=defaultValue(e.requestVertexNormals,!1),this._requestWaterMask=defaultValue(e.requestWaterMask,!1),this._requestMetadata=defaultValue(e.requestMetadata,!0),this._errorEvent=new Event;var t=e.credit;"string"==typeof t&&(t=new Credit(t)),this._credit=t,this._availability=void 0;var i=when.defer();this._ready=!1,this._readyPromise=i,this._tileCredits=void 0;var r,n,a,o=this,s=this._layers=[],l="",c=[],u=0;function d(e){if(!e.format)return x="The tile format is not specified in the layer.json file.",void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));if(!e.tiles||0===e.tiles.length)return x="The layer.json file does not specify any tile URL templates.",void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));var t=!1,i=!1,p=!1,f=!0,g=!1;if("heightmap-1.0"===e.format)g=!0,defined(o._heightmapStructure)||(o._heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),i=!0,o._requestWaterMask=!0;else if(0!==e.format.indexOf("quantized-mesh-1."))return x='The tile format "'+e.format+'" is invalid or not supported.',void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));var y,_=e.tiles,v=e.maxzoom;if(u=Math.max(u,v),e.projection&&"EPSG:4326"!==e.projection){if("EPSG:3857"!==e.projection)return x='The projection "'+e.projection+'" is invalid or not supported.',void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));o._tilingScheme=new WebMercatorTilingScheme({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:o._ellipsoid})}else o._tilingScheme=new GeographicTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:o._ellipsoid});if(o._levelZeroMaximumGeometricError=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(o._tilingScheme.ellipsoid,o._heightmapWidth,o._tilingScheme.getNumberOfXTilesAtLevel(0)),e.scheme&&"tms"!==e.scheme&&"slippyMap"!==e.scheme)return x='The scheme "'+e.scheme+'" is invalid or not supported.',void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));o._scheme=e.scheme,defined(e.extensions)&&-1!==e.extensions.indexOf("octvertexnormals")?t=!0:defined(e.extensions)&&-1!==e.extensions.indexOf("vertexnormals")&&(f=!(t=!0)),defined(e.extensions)&&-1!==e.extensions.indexOf("watermask")&&(i=!0),defined(e.extensions)&&-1!==e.extensions.indexOf("metadata")&&(p=!0);var C,x=e.metadataAvailability,b=e.available;if(defined(b)&&!defined(x)){C=new TileAvailability(o._tilingScheme,b.length);for(var S=0;S<b.length;++S){var T=b[S],E=o._tilingScheme.getNumberOfYTilesAtLevel(S);defined(c[S])||(c[S]=[]);for(var w=0;w<T.length;++w){var A=T[w],P=E-A.endY-1,D=E-A.startY-1;c[S].push([A.startX,P,A.endX,D]),C.addAvailableTileRange(S,A.startX,P,A.endX,D)}}}else defined(x)&&(y=new TileAvailability(o._tilingScheme,v),C=new TileAvailability(o._tilingScheme,v),c[0]=[[0,0,1,0]],C.addAvailableTileRange(0,0,0,1,0));return o._hasWaterMask=o._hasWaterMask||i,o._hasVertexNormals=o._hasVertexNormals||t,o._hasMetadata=o._hasMetadata||p,defined(e.attribution)&&(0<l.length&&(l+=" "),l+=e.attribution),s.push(new LayerInformation({resource:r,version:e.version,isHeightmap:g,tileUrlTemplates:_,availability:C,hasVertexNormals:t,hasWaterMask:i,hasMetadata:p,availabilityLevels:x,availabilityTilesLoaded:y,littleEndianExtensionSize:f})),defined(e=e.parentUrl)?defined(C)?((r=r.getDerivedResource({url:e})).appendForwardSlash(),when((n=r.getDerivedResource({url:"layer.json"})).fetchJson(),d,h)):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),when.resolve()):when.resolve()}function h(e){var t="An error occurred while accessing "+n.url+".";a=TileProviderError.handleError(a,o,o._errorEvent,t,void 0,void 0,void 0,m)}function p(e){d(e).then((function(){if(!defined(a)){var e,t=c.length;if(0<t)for(var i=o._availability=new TileAvailability(o._tilingScheme,u),r=0;r<t;++r)for(var n=c[r],s=0;s<n.length;++s){var d=n[s];i.addAvailableTileRange(r,d[0],d[1],d[2],d[3])}0<l.length&&(e=new Credit(l),defined(o._tileCredits)?o._tileCredits.push(e):o._tileCredits=[e]),o._ready=!0,o._readyPromise.resolve(!0)}}))}function f(e){defined(e)&&404===e.statusCode?p({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):h()}function m(){when(n.fetchJson()).then(p).otherwise(f)}when(e.url).then((function(e){(e=Resource.createIfNeeded(e)).appendForwardSlash(),n=(r=e).getDerivedResource({url:"layer.json"}),o._tileCredits=e.credits,m()})).otherwise((function(e){i.reject(e)}))}QuantizedMeshTerrainData.prototype.isChildAvailable=function(e,t,i,r){var n=2;return i!==2*e&&++n,r!==2*t&&(n-=2),0!=(this._childTileMask&1<<n)},QuantizedMeshTerrainData.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var QuantizedMeshExtensionIds={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function getRequestHeader(e){return defined(e)&&0!==e.length?{Accept:"application/vnd.quantized-mesh;extensions="+e.join("-")+",application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function createHeightmapTerrainData(e,t,i,r,n){var a=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new HeightmapTerrainData({buffer:a,childTileMask:new Uint8Array(t,a.byteLength,1)[0],waterMask:new Uint8Array(t,a.byteLength+1,t.byteLength-a.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function createQuantizedMeshTerrainData(e,t,i,r,n,a){var o=a.littleEndianExtensionSize,s=0,l=3*Float64Array.BYTES_PER_ELEMENT,c=4*Float64Array.BYTES_PER_ELEMENT,u=3*Uint16Array.BYTES_PER_ELEMENT,d=Uint16Array.BYTES_PER_ELEMENT,h=3*d,p=new DataView(t),f=new Cartesian3(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0));s+=l;var m=p.getFloat32(s,!0);s+=Float32Array.BYTES_PER_ELEMENT;var g=p.getFloat32(s,!0);s+=Float32Array.BYTES_PER_ELEMENT;var y=new BoundingSphere(new Cartesian3(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0)),p.getFloat64(s+l,!0));s+=c;var _=new Cartesian3(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0));s+=l;var v=p.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var C=new Uint16Array(t,s,3*v);s+=v*u,65536<v&&(h=3*(d=Uint32Array.BYTES_PER_ELEMENT));var x=C.subarray(0,v);c=C.subarray(v,2*v),l=C.subarray(2*v,3*v);AttributeCompression.zigZagDeltaDecode(x,c,l),s%d!=0&&(s+=d-s%d),u=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var b=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,3*u);s+=u*h;for(var S=0,T=b.length,E=0;E<T;++E){var w=b[E];b[E]=S-w,0===w&&++S}x=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT,c=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,x),s+=x*d,l=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT,u=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,l),s+=l*d,h=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT,x=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,h),s+=h*d,l=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var A,P;h=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,l);for(s+=l*d;s<p.byteLength;){var D=p.getUint8(s,!0);s+=Uint8Array.BYTES_PER_ELEMENT;var M=p.getUint32(s,o);if(s+=Uint32Array.BYTES_PER_ELEMENT,D===QuantizedMeshExtensionIds.OCT_VERTEX_NORMALS&&e._requestVertexNormals)A=new Uint8Array(t,s,2*v);else if(D===QuantizedMeshExtensionIds.WATER_MASK&&e._requestWaterMask)P=new Uint8Array(t,s,M);else if(D===QuantizedMeshExtensionIds.METADATA&&e._requestMetadata){if(0<(D=p.getUint32(s,!0))){D=getStringFromTypedArray(new Uint8Array(t),s+Uint32Array.BYTES_PER_ELEMENT,D);var I=JSON.parse(D).available;if(defined(I))for(var R=0;R<I.length;++R)for(var O=i+R+1,L=I[R],N=e._tilingScheme.getNumberOfYTilesAtLevel(O),F=0;F<L.length;++F){var B=L[F],V=N-B.endY-1,k=N-B.startY-1;e.availability.addAvailableTileRange(O,B.startX,V,B.endX,k),a.availability.addAvailableTileRange(O,B.startX,V,B.endX,k)}}a.availabilityTilesLoaded.addAvailableTileRange(i,r,n,r,n)}s+=M}return l=5*e.getLevelMaximumGeometricError(i),d=e._tilingScheme.tileXYToRectangle(r,n,i),new QuantizedMeshTerrainData({center:f,minimumHeight:m,maximumHeight:g,boundingSphere:y,orientedBoundingBox:OrientedBoundingBox.fromRectangle(d,m,g,e._tilingScheme.ellipsoid),horizonOcclusionPoint:_,quantizedVertices:C,encodedNormals:A,indices:b,westIndices:c,southIndices:u,eastIndices:x,northIndices:h,westSkirtHeight:l,southSkirtHeight:l,eastSkirtHeight:l,northSkirtHeight:l,childTileMask:e.availability.computeChildMaskForTile(i,r,n),waterMask:P,credits:e._tileCredits})}function requestTileGeometry(e,t,i,r,n,a){if(!defined(n))return when.reject(new RuntimeError("Terrain tile doesn't exist"));var o;if(0!==(c=n.tileUrlTemplates).length){o=e._scheme&&"tms"!==e._scheme?i:e._tilingScheme.getNumberOfYTilesAtLevel(r)-i-1;var s,l=[];e._requestVertexNormals&&n.hasVertexNormals&&l.push(n.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&n.hasWaterMask&&l.push("watermask"),e._requestMetadata&&n.hasMetadata&&l.push("metadata");var c,u=c[(t+o+r)%c.length];l=defined((c=n.resource)._ionEndpoint)&&!defined(c._ionEndpoint.externalType)?(0!==l.length&&(s={extensions:l.join("-")}),getRequestHeader(void 0)):getRequestHeader(l);if(defined(a=c.getDerivedResource({url:u,templateValues:{version:n.version,z:r,x:t,y:o},queryParameters:s,headers:l,request:a}).fetchArrayBuffer()))return a.then((function(a){return defined(e._heightmapStructure)?createHeightmapTerrainData(e,a):createQuantizedMeshTerrainData(e,a,r,t,i,n)}))}}function getAvailabilityTile(e,t,i,r){if(0!==r)return{level:e=r%(e=e.availabilityLevels)==0?r-e:(r/e|0)*e,x:t/(r=1<<r-e)|0,y:i/r|0}}function checkLayer(e,t,i,r,n,a){if(!defined(n.availabilityLevels))return{result:!1};for(var o,s,l,c=function(){delete n.availabilityPromiseCache[l]},u=n.availabilityTilesLoaded,d=n.availability,h=getAvailabilityTile(n,t,i,r);defined(h);){if(d.isTileAvailable(h.level,h.x,h.y)&&!u.isTileAvailable(h.level,h.x,h.y))return a||(l=h.level+"-"+h.x+"-"+h.y,defined(s=n.availabilityPromiseCache[l])||(o=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.TERRAIN}),defined(s=requestTileGeometry(e,h.x,h.y,h.level,n,o))&&(n.availabilityPromiseCache[l]=s).then(c))),{result:!0,promise:s};h=getAvailabilityTile(n,h.x,h.y,h.level)}return{result:!1}}CesiumTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){var n,a=this._layers,o=a.length;if(1===o)n=a[0];else for(var s=0;s<o;++s){var l=a[s];if(!defined(l.availability)||l.availability.isTileAvailable(i,e,t)){n=l;break}}return requestTileGeometry(this,e,t,i,n,r)},Object.defineProperties(CesiumTerrainProvider.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}}),CesiumTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},CesiumTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){if(defined(this._availability)){if(i>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(i,e,t))return!0;if(!this._hasMetadata)return!1;for(var r=this._layers,n=r.length,a=0;a<n;++a)if(checkLayer(this,e,t,i,r[a],0===a).result)return;return!1}},CesiumTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){if(!(!defined(this._availability)||i>this._availability._maximumLevel||this._availability.isTileAvailable(i,e,t))&&this._hasMetadata)for(var r=this._layers,n=r.length,a=0;a<n;++a){var o=checkLayer(this,e,t,i,r[a],0===a);if(defined(o.promise))return o.promise}},CesiumTerrainProvider._getAvailabilityTile=getAvailabilityTile;var EllipseGeometryLibrary={},rotAxis=new Cartesian3,tempVec=new Cartesian3,unitQuat=new Quaternion,rotMtx=new Matrix3;function pointOnEllipsoid(e,t,i,r,n,a,o,s,l,c){return t=e+t,Cartesian3.multiplyByScalar(r,Math.cos(t),rotAxis),Cartesian3.multiplyByScalar(i,Math.sin(t),tempVec),Cartesian3.add(rotAxis,tempVec,rotAxis),t=Math.cos(e),t*=t,e=Math.sin(e),e*=e,e=a/Math.sqrt(o*t+n*e)/s,Quaternion.fromAxisAngle(rotAxis,e,unitQuat),Matrix3.fromQuaternion(unitQuat,rotMtx),Matrix3.multiplyByVector(rotMtx,l,c),Cartesian3.normalize(c,c),Cartesian3.multiplyByScalar(c,s,c),c}var scratchCartesian1$1=new Cartesian3,scratchCartesian2$1=new Cartesian3,scratchCartesian3$2=new Cartesian3,scratchNormal$1=new Cartesian3;EllipseGeometryLibrary.raisePositionsToHeight=function(e,t,i){for(var r=t.ellipsoid,n=t.height,a=t.extrudedHeight,o=(t=i?e.length/3*2:e.length/3,new Float64Array(3*t)),s=e.length,l=i?s:0,c=0;c<s;c+=3){var u=c+1,d=c+2,h=Cartesian3.fromArray(e,c,scratchCartesian1$1);r.scaleToGeodeticSurface(h,h);var p=Cartesian3.clone(h,scratchCartesian2$1),f=r.geodeticSurfaceNormal(h,scratchNormal$1),m=Cartesian3.multiplyByScalar(f,n,scratchCartesian3$2);Cartesian3.add(h,m,h),i&&(Cartesian3.multiplyByScalar(f,a,m),Cartesian3.add(p,m,p),o[c+l]=p.x,o[u+l]=p.y,o[d+l]=p.z),o[c]=h.x,o[u]=h.y,o[d]=h.z}return o};var unitPosScratch=new Cartesian3,eastVecScratch=new Cartesian3,northVecScratch=new Cartesian3;function GeometryInstance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}EllipseGeometryLibrary.computeEllipsePositions=function(e,t,i){var r=e.semiMinorAxis,n=e.semiMajorAxis,a=e.rotation,o=e.center,s=(e=8*e.granularity,r*r),l=n*n,c=n*r,u=Cartesian3.magnitude(o),d=Cartesian3.normalize(o,unitPosScratch),h=Cartesian3.cross(Cartesian3.UNIT_Z,o,eastVecScratch),p=(h=Cartesian3.normalize(h,h),Cartesian3.cross(d,h,northVecScratch)),f=1+Math.ceil(CesiumMath.PI_OVER_TWO/e),m=CesiumMath.PI_OVER_TWO/(f-1),g=CesiumMath.PI_OVER_TWO-f*m;g<0&&(f-=Math.ceil(Math.abs(g)/m));var y,_,v,C,x,b=t?new Array(f*(f+2)*2*3):void 0,S=0,T=scratchCartesian1$1,E=scratchCartesian2$1,w=(e=4*f*3)-1,A=0,P=i?new Array(e):void 0;T=pointOnEllipsoid(g=CesiumMath.PI_OVER_TWO,a,p,h,s,c,l,u,d,T);for(t&&(b[S++]=T.x,b[S++]=T.y,b[S++]=T.z),i&&(P[w--]=T.z,P[w--]=T.y,P[w--]=T.x),g=CesiumMath.PI_OVER_TWO-m,y=1;y<f+1;++y){if(T=pointOnEllipsoid(g,a,p,h,s,c,l,u,d,T),E=pointOnEllipsoid(Math.PI-g,a,p,h,s,c,l,u,d,E),t){for(b[S++]=T.x,b[S++]=T.y,b[S++]=T.z,v=2*y+2,_=1;_<v-1;++_)C=_/(v-1),x=Cartesian3.lerp(T,E,C,scratchCartesian3$2),b[S++]=x.x,b[S++]=x.y,b[S++]=x.z;b[S++]=E.x,b[S++]=E.y,b[S++]=E.z}i&&(P[w--]=T.z,P[w--]=T.y,P[w--]=T.x,P[A++]=E.x,P[A++]=E.y,P[A++]=E.z),g=CesiumMath.PI_OVER_TWO-(y+1)*m}for(y=f;1<y;--y){if(T=pointOnEllipsoid(-(g=CesiumMath.PI_OVER_TWO-(y-1)*m),a,p,h,s,c,l,u,d,T),E=pointOnEllipsoid(g+Math.PI,a,p,h,s,c,l,u,d,E),t){for(b[S++]=T.x,b[S++]=T.y,b[S++]=T.z,v=2*(y-1)+2,_=1;_<v-1;++_)C=_/(v-1),x=Cartesian3.lerp(T,E,C,scratchCartesian3$2),b[S++]=x.x,b[S++]=x.y,b[S++]=x.z;b[S++]=E.x,b[S++]=E.y,b[S++]=E.z}i&&(P[w--]=T.z,P[w--]=T.y,P[w--]=T.x,P[A++]=E.x,P[A++]=E.y,P[A++]=E.z)}return T=pointOnEllipsoid(-(g=CesiumMath.PI_OVER_TWO),a,p,h,s,c,l,u,d,T),e={},t&&(b[S++]=T.x,b[S++]=T.y,b[S++]=T.z,e.positions=b,e.numPts=f),i&&(P[w--]=T.z,P[w--]=T.y,P[w--]=T.x,e.outerPositions=P),e};var scratchCartesian1$2=new Cartesian3,scratchCartesian2$2=new Cartesian3,scratchCartesian3$3=new Cartesian3;function barycentricCoordinates(e,t,i,r,n){var a,o,s,l,c,u,d;if(defined(n)||(n=new Cartesian3),defined(t.z)){if(Cartesian3.equalsEpsilon(e,t,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_X,n);if(Cartesian3.equalsEpsilon(e,i,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_Y,n);if(Cartesian3.equalsEpsilon(e,r,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_Z,n);a=Cartesian3.subtract(i,t,scratchCartesian1$2),o=Cartesian3.subtract(r,t,scratchCartesian2$2),s=Cartesian3.subtract(e,t,scratchCartesian3$3),l=Cartesian3.dot(a,a),h=Cartesian3.dot(a,o),c=Cartesian3.dot(a,s),u=Cartesian3.dot(o,o),d=Cartesian3.dot(o,s)}else{if(Cartesian2.equalsEpsilon(e,t,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_X,n);if(Cartesian2.equalsEpsilon(e,i,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_Y,n);if(Cartesian2.equalsEpsilon(e,r,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_Z,n);a=Cartesian2.subtract(i,t,scratchCartesian1$2),o=Cartesian2.subtract(r,t,scratchCartesian2$2),s=Cartesian2.subtract(e,t,scratchCartesian3$3),l=Cartesian2.dot(a,a),h=Cartesian2.dot(a,o),c=Cartesian2.dot(a,s),u=Cartesian2.dot(o,o),d=Cartesian2.dot(o,s)}n.y=u*c-h*d,n.z=l*d-h*c;var h=l*u-h*h;return 0!==n.y&&(n.y/=h),0!==n.z&&(n.z/=h),n.x=1-n.y-n.z,n}function EncodedCartesian3(){this.high=Cartesian3.clone(Cartesian3.ZERO),this.low=Cartesian3.clone(Cartesian3.ZERO)}EncodedCartesian3.encode=function(e,t){var i;return defined(t)||(t={high:0,low:0}),0<=e?(i=65536*Math.floor(e/65536),t.high=i,t.low=e-i):(i=65536*Math.floor(-e/65536),t.high=-i,t.low=e+i),t};var scratchEncode={high:0,low:0};EncodedCartesian3.fromCartesian=function(e,t){defined(t)||(t=new EncodedCartesian3);var i=t.high,r=t.low;return EncodedCartesian3.encode(e.x,scratchEncode),i.x=scratchEncode.high,r.x=scratchEncode.low,EncodedCartesian3.encode(e.y,scratchEncode),i.y=scratchEncode.high,r.y=scratchEncode.low,EncodedCartesian3.encode(e.z,scratchEncode),i.z=scratchEncode.high,r.z=scratchEncode.low,t};var encodedP=new EncodedCartesian3;EncodedCartesian3.writeElements=function(e,t,i){EncodedCartesian3.fromCartesian(e,encodedP);var r=encodedP.high;e=encodedP.low;t[i]=r.x,t[i+1]=r.y,t[i+2]=r.z,t[i+3]=e.x,t[i+4]=e.y,t[i+5]=e.z};var Tipsify={calculateACMR:function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).indices,i=e.maximumIndex,r=defaultValue(e.cacheSize,24),n=t.length;if(!defined(i))for(var a=i=0,o=t[a];a<n;)i<o&&(i=o),o=t[++a];for(var s=[],l=0;l<i+1;l++)s[l]=0;for(var c=r+1,u=0;u<n;++u)c-s[t[u]]>r&&(s[t[u]]=c,++c);return(c-r+1)/(n/3)},tipsify:function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).indices,i=e.maximumIndex,r=defaultValue(e.cacheSize,24);function n(e,t,i,r,n,a,o){for(var s,l=-1,c=-1,u=0;u<i.length;){var d=i[u];r[d].numLiveTriangles&&(s=0,n-r[d].timeStamp+2*r[d].numLiveTriangles<=t&&(s=n-r[d].timeStamp),(c<s||-1===c)&&(c=s,l=d)),++u}return-1===l?function(e,t,i){for(;1<=t.length;){var r=t[t.length-1];if(t.splice(t.length-1,1),0<e[r].numLiveTriangles)return r}for(;y<i;){if(0<e[y].numLiveTriangles)return++y-1;++y}return-1}(r,a,o):l}e=t.length;var a=0,o=0,s=t[o],l=e;if(defined(i))a=i+1;else{for(;o<l;)a<s&&(a=s),s=t[++o];if(-1===a)return 0;++a}for(var c=[],u=0;u<a;u++)c[u]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};for(var d=o=0;o<l;)c[t[o]].vertexTriangles.push(d),++c[t[o]].numLiveTriangles,c[t[o+1]].vertexTriangles.push(d),++c[t[o+1]].numLiveTriangles,c[t[o+2]].vertexTriangles.push(d),++c[t[o+2]].numLiveTriangles,++d,o+=3;var h,p,f,m=0,g=r+1,y=1,_=[],v=[],C=0,x=[],b=e/3,S=[];for(u=0;u<b;u++)S[u]=!1;for(;-1!==m;){_=[],f=(h=c[m]).vertexTriangles.length;for(var T=0;T<f;++T)if(!S[d=h.vertexTriangles[T]]){S[d]=!0,o=d+d+d;for(var E=0;E<3;++E)p=t[o],_.push(p),v.push(p),x[C]=p,++C,--(p=c[p]).numLiveTriangles,g-p.timeStamp>r&&(p.timeStamp=g,++g),++o}m=n(0,r,_,c,g,v,a)}return x}},GeometryPipeline={};function addTriangle(e,t,i,r,n){e[t++]=i,e[t++]=r,e[t++]=r,e[t++]=n,e[t++]=n,e[t]=i}function trianglesToLines(e){for(var t=e.length,i=t/3*6,r=IndexDatatype$1.createTypedArray(t,i),n=0,a=0;a<t;a+=3,n+=6)addTriangle(r,n,e[a],e[a+1],e[a+2]);return r}function triangleStripToLines(e){var t=e.length;if(3<=t){var i=6*(t-2),r=IndexDatatype$1.createTypedArray(t,i);addTriangle(r,0,e[0],e[1],e[2]);for(var n=6,a=3;a<t;++a,n+=6)addTriangle(r,n,e[a-1],e[a],e[a-2]);return r}return new Uint16Array}function triangleFanToLines(e){if(0<e.length){for(var t=e.length-1,i=6*(t-1),r=IndexDatatype$1.createTypedArray(t,i),n=e[0],a=0,o=1;o<t;++o,a+=6)addTriangle(r,a,n,e[o],e[o+1]);return r}return new Uint16Array}function copyAttributesDescriptions(e){var t,i,r={};for(t in e)e.hasOwnProperty(t)&&defined(e[t])&&defined(e[t].values)&&(i=e[t],r[t]=new GeometryAttribute({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]}));return r}function copyVertex(e,t,i){for(var r in t)if(t.hasOwnProperty(r)&&defined(t[r])&&defined(t[r].values))for(var n=t[r],a=0;a<n.componentsPerAttribute;++a)e[r].values.push(n.values[i*n.componentsPerAttribute+a])}GeometryPipeline.toWireframe=function(e){var t=e.indices;if(defined(t)){switch(e.primitiveType){case PrimitiveType$1.TRIANGLES:e.indices=trianglesToLines(t);break;case PrimitiveType$1.TRIANGLE_STRIP:e.indices=triangleStripToLines(t);break;case PrimitiveType$1.TRIANGLE_FAN:e.indices=triangleFanToLines(t)}e.primitiveType=PrimitiveType$1.LINES}return e},GeometryPipeline.createLineSegmentsForVectors=function(e,t,i){t=defaultValue(t,"normal"),i=defaultValue(i,1e4);for(var r,n=e.attributes.position.values,a=e.attributes[t].values,o=n.length,s=new Float64Array(2*o),l=0,c=0;c<o;c+=3)s[l++]=n[c],s[l++]=n[c+1],s[l++]=n[c+2],s[l++]=n[c]+a[c]*i,s[l++]=n[c+1]+a[c+1]*i,s[l++]=n[c+2]+a[c+2]*i;return defined(e=e.boundingSphere)&&(r=new BoundingSphere(e.center,e.radius+i)),new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:PrimitiveType$1.LINES,boundingSphere:r})},GeometryPipeline.createAttributeLocations=function(e){for(var t,i=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],r=e.attributes,n={},a=0,o=i.length,s=0;s<o;++s){var l=i[s];defined(r[l])&&(n[l]=a++)}for(t in r)r.hasOwnProperty(t)&&!defined(n[t])&&(n[t]=a++);return n},GeometryPipeline.reorderForPreVertexCache=function(e){var t=Geometry.computeNumberOfVertices(e),i=e.indices;if(defined(i)){for(var r=new Int32Array(t),n=0;n<t;n++)r[n]=-1;for(var a,o=i,s=o.length,l=IndexDatatype$1.createTypedArray(t,s),c=0,u=0,d=0;c<s;)-1!==(a=r[o[c]])?l[u]=a:(r[a=o[c]]=d,l[u]=d,++d),++c,++u;e.indices=l;var h,p=e.attributes;for(h in p)if(p.hasOwnProperty(h)&&defined(p[h])&&defined(p[h].values)){for(var f=p[h],m=f.values,g=0,y=f.componentsPerAttribute,_=ComponentDatatype$1.createTypedArray(f.componentDatatype,d*y);g<t;){var v=r[g];if(-1!==v)for(var C=0;C<y;C++)_[y*v+C]=m[y*g+C];++g}f.values=_}}return e},GeometryPipeline.reorderForPostVertexCache=function(e,t){var i=e.indices;if(e.primitiveType===PrimitiveType$1.TRIANGLES&&defined(i)){for(var r=i.length,n=0,a=0;a<r;a++)i[a]>n&&(n=i[a]);e.indices=Tipsify.tipsify({indices:i,maximumIndex:n,cacheSize:t})}return e},GeometryPipeline.fitToUnsignedShortIndices=function(e){var t=[],i=Geometry.computeNumberOfVertices(e);if(defined(e.indices)&&i>=CesiumMath.SIXTY_FOUR_KILOBYTES){var r,n=[],a=[],o=0,s=copyAttributesDescriptions(e.attributes),l=e.indices,c=l.length;e.primitiveType===PrimitiveType$1.TRIANGLES?r=3:e.primitiveType===PrimitiveType$1.LINES?r=2:e.primitiveType===PrimitiveType$1.POINTS&&(r=1);for(var u=0;u<c;u+=r){for(var d=0;d<r;++d){var h=l[u+d],p=n[h];defined(p)||(p=o++,n[h]=p,copyVertex(s,e.attributes,h)),a.push(p)}o+r>=CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new Geometry({attributes:s,indices:a,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),n=[],a=[],o=0,s=copyAttributesDescriptions(e.attributes))}0!==a.length&&t.push(new Geometry({attributes:s,indices:a,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var scratchProjectTo2DCartesian3=new Cartesian3,scratchProjectTo2DCartographic=new Cartographic;GeometryPipeline.projectTo2D=function(e,t,i,r,n){for(var a=e.attributes[t],o=(n=defined(n)?n:new GeographicProjection).ellipsoid,s=a.values,l=new Float64Array(s.length),c=0,u=0;u<s.length;u+=3){var d=Cartesian3.fromArray(s,u,scratchProjectTo2DCartesian3);d=o.cartesianToCartographic(d,scratchProjectTo2DCartographic),d=n.project(d,scratchProjectTo2DCartesian3);l[c++]=d.x,l[c++]=d.y,l[c++]=d.z}return e.attributes[i]=a,e.attributes[r]=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l}),delete e.attributes[t],e};var encodedResult={high:0,low:0};GeometryPipeline.encodeAttribute=function(e,t,i,r){for(var n=e.attributes[t],a=n.values,o=a.length,s=new Float32Array(o),l=new Float32Array(o),c=0;c<o;++c)EncodedCartesian3.encode(a[c],encodedResult),s[c]=encodedResult.high,l[c]=encodedResult.low;return n=n.componentsPerAttribute,e.attributes[i]=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:n,values:s}),e.attributes[r]=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:n,values:l}),delete e.attributes[t],e};var scratchCartesian3$4=new Cartesian3;function transformPoint(e,t){if(defined(t))for(var i=t.values,r=i.length,n=0;n<r;n+=3)Cartesian3.unpack(i,n,scratchCartesian3$4),Matrix4.multiplyByPoint(e,scratchCartesian3$4,scratchCartesian3$4),Cartesian3.pack(scratchCartesian3$4,i,n)}function transformVector(e,t){if(defined(t))for(var i=t.values,r=i.length,n=0;n<r;n+=3)Cartesian3.unpack(i,n,scratchCartesian3$4),Matrix3.multiplyByVector(e,scratchCartesian3$4,scratchCartesian3$4),scratchCartesian3$4=Cartesian3.normalize(scratchCartesian3$4,scratchCartesian3$4),Cartesian3.pack(scratchCartesian3$4,i,n)}var inverseTranspose=new Matrix4,normalMatrix=new Matrix3;function findAttributesInAllGeometries(e,t){var i,r=e.length,n={},a=e[0][t].attributes;for(i in a)if(a.hasOwnProperty(i)&&defined(a[i])&&defined(a[i].values)){for(var o=a[i],s=o.values.length,l=!0,c=1;c<r;++c){var u=e[c][t].attributes[i];if(!defined(u)||o.componentDatatype!==u.componentDatatype||o.componentsPerAttribute!==u.componentsPerAttribute||o.normalize!==u.normalize){l=!1;break}s+=u.values.length}l&&(n[i]=new GeometryAttribute({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:ComponentDatatype$1.createTypedArray(o.componentDatatype,s)}))}return n}GeometryPipeline.transformToWorldCoordinates=function(e){var t=e.modelMatrix;if(Matrix4.equals(t,Matrix4.IDENTITY))return e;var i=e.geometry.attributes;return transformPoint(t,i.position),transformPoint(t,i.prevPosition),transformPoint(t,i.nextPosition),(defined(i.normal)||defined(i.tangent)||defined(i.bitangent))&&(Matrix4.inverse(t,inverseTranspose),Matrix4.transpose(inverseTranspose,inverseTranspose),Matrix4.getMatrix3(inverseTranspose,normalMatrix),transformVector(normalMatrix,i.normal),transformVector(normalMatrix,i.tangent),transformVector(normalMatrix,i.bitangent)),defined(i=e.geometry.boundingSphere)&&(e.geometry.boundingSphere=BoundingSphere.transform(i,t,i)),e.modelMatrix=Matrix4.clone(Matrix4.IDENTITY),e};var tempScratch=new Cartesian3;function combineGeometries(e,t){var i,r,n,a,o,s=e.length,l=(e[0].modelMatrix,defined(e[0][t].indices)),c=e[0][t].primitiveType,u=findAttributesInAllGeometries(e,t);for(i in u)if(u.hasOwnProperty(i))for(n=u[i].values,h=v=0;h<s;++h)for(o=(a=e[h][t].attributes[i].values).length,r=0;r<o;++r)n[v++]=a[r];if(l){for(var d=0,h=0;h<s;++h)d+=e[h][t].indices.length;var p=Geometry.computeNumberOfVertices(new Geometry({attributes:u,primitiveType:PrimitiveType$1.POINTS})),f=IndexDatatype$1.createTypedArray(p,d),m=0,g=0;for(h=0;h<s;++h){for(var y=e[h][t].indices,_=y.length,v=0;v<_;++v)f[m++]=g+y[v];g+=Geometry.computeNumberOfVertices(e[h][t])}p=f}var C,x=new Cartesian3,b=0;for(h=0;h<s;++h){if(!defined(C=e[h][t].boundingSphere)){x=void 0;break}Cartesian3.add(C.center,x,x)}if(defined(x))for(Cartesian3.divideByScalar(x,s,x),h=0;h<s;++h){C=e[h][t].boundingSphere;var S=Cartesian3.magnitude(Cartesian3.subtract(C.center,x,tempScratch))+C.radius;b<S&&(b=S)}return new Geometry({attributes:u,indices:p,primitiveType:c,boundingSphere:defined(x)?new BoundingSphere(x,b):void 0})}GeometryPipeline.combineInstances=function(e){for(var t=[],i=[],r=e.length,n=0;n<r;++n){var a=e[n];defined(a.geometry)?t.push(a):defined(a.westHemisphereGeometry)&&defined(a.eastHemisphereGeometry)&&i.push(a)}var o=[];return 0<t.length&&o.push(combineGeometries(t,"geometry")),0<i.length&&(o.push(combineGeometries(i,"westHemisphereGeometry")),o.push(combineGeometries(i,"eastHemisphereGeometry"))),o};var normal=new Cartesian3,v0=new Cartesian3,v1=new Cartesian3,v2=new Cartesian3;GeometryPipeline.computeNormal=function(e){for(var t=e.indices,i=e.attributes,r=i.position.values,n=i.position.values.length/3,a=t.length,o=new Array(n),s=new Array(a/3),l=new Array(a),c=0;c<n;c++)o[c]={indexOffset:0,count:0,currentCount:0};var u=0;for(c=0;c<a;c+=3){var d=t[c],h=t[c+1],p=t[c+2],f=3*d,m=3*h,g=3*p;v0.x=r[f],v0.y=r[1+f],v0.z=r[2+f],v1.x=r[m],v1.y=r[1+m],v1.z=r[2+m],v2.x=r[g],v2.y=r[1+g],v2.z=r[2+g],o[d].count++,o[h].count++,o[p].count++,Cartesian3.subtract(v1,v0,v1),Cartesian3.subtract(v2,v0,v2),s[u]=Cartesian3.cross(v1,v2,new Cartesian3),u++}var y=0;for(c=0;c<n;c++)o[c].indexOffset+=y,y+=o[c].count;for(c=u=0;c<a;c+=3){l[(C=o[t[c]]).indexOffset+C.currentCount]=u,C.currentCount++,l[(C=o[t[c+1]]).indexOffset+C.currentCount]=u,C.currentCount++,l[(C=o[t[c+2]]).indexOffset+C.currentCount]=u,C.currentCount++,u++}var _=new Float32Array(3*n);for(c=0;c<n;c++){var v=3*c,C=o[c];if(Cartesian3.clone(Cartesian3.ZERO,normal),0<C.count){for(u=0;u<C.count;u++)Cartesian3.add(normal,s[l[C.indexOffset+u]],normal);Cartesian3.equalsEpsilon(Cartesian3.ZERO,normal,CesiumMath.EPSILON10)&&Cartesian3.clone(s[l[C.indexOffset]],normal)}Cartesian3.equalsEpsilon(Cartesian3.ZERO,normal,CesiumMath.EPSILON10)&&(normal.z=1),Cartesian3.normalize(normal,normal),_[v]=normal.x,_[1+v]=normal.y,_[2+v]=normal.z}return e.attributes.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:_}),e};var normalScratch$1=new Cartesian3,normalScale=new Cartesian3,tScratch=new Cartesian3;GeometryPipeline.computeTangentAndBitangent=function(e){e.attributes;for(var t=e.indices,i=e.attributes.position.values,r=e.attributes.normal.values,n=e.attributes.st.values,a=e.attributes.position.values.length/3,o=t.length,s=new Array(3*a),l=0;l<s.length;l++)s[l]=0;for(l=0;l<o;l+=3){var c,u=t[l],d=3*(_=t[l+1]),h=3*(v=t[l+2]),p=2*u,f=2*_,m=2*v,g=i[c=3*u],y=i[c+1],_=i[c+2],v=n[p];u=n[1+p],p=n[1+f]-u,u=n[1+m]-u,v=1/((n[f]-v)*u-(n[m]-v)*p),g=(u*(i[d]-g)-p*(i[h]-g))*v,y=(u*(i[d+1]-y)-p*(i[h+1]-y))*v,v=(u*(i[d+2]-_)-p*(i[h+2]-_))*v;s[c]+=g,s[c+1]+=y,s[c+2]+=v,s[d]+=g,s[d+1]+=y,s[d+2]+=v,s[h]+=g,s[h+1]+=y,s[h+2]+=v}var C=new Float32Array(3*a),x=new Float32Array(3*a);for(l=0;l<a;l++){d=1+(c=3*l),h=c+2;var b=Cartesian3.fromArray(r,c,normalScratch$1),S=Cartesian3.fromArray(s,c,tScratch),T=Cartesian3.dot(b,S);Cartesian3.multiplyByScalar(b,T,normalScale),Cartesian3.normalize(Cartesian3.subtract(S,normalScale,S),S),C[c]=S.x,C[d]=S.y,C[h]=S.z,Cartesian3.normalize(Cartesian3.cross(b,S,S),S),x[c]=S.x,x[d]=S.y,x[h]=S.z}return e.attributes.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:C}),e.attributes.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:x}),e};var scratchCartesian2$3=new Cartesian2,toEncode1=new Cartesian3,toEncode2=new Cartesian3,toEncode3=new Cartesian3,encodeResult2=new Cartesian2;function indexTriangles(e){if(defined(e.indices))return e;for(var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,t),r=0;r<t;++r)i[r]=r;return e.indices=i,e}function indexTriangleFan(e){var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,3*(t-2));i[0]=1,i[1]=0,i[2]=2;for(var r=3,n=3;n<t;++n)i[r++]=n-1,i[r++]=0,i[r++]=n;return e.indices=i,e.primitiveType=PrimitiveType$1.TRIANGLES,e}function indexTriangleStrip(e){var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,3*(t-2));i[0]=0,i[1]=1,i[2]=2,3<t&&(i[3]=0,i[4]=2,i[5]=3);for(var r=6,n=3;n<t-1;n+=2)i[r++]=n,i[r++]=n-1,i[r++]=n+1,n+2<t&&(i[r++]=n,i[r++]=n+1,i[r++]=n+2);return e.indices=i,e.primitiveType=PrimitiveType$1.TRIANGLES,e}function indexLines(e){if(defined(e.indices))return e;for(var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,t),r=0;r<t;++r)i[r]=r;return e.indices=i,e}function indexLineStrip(e){var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,2*(t-1));i[0]=0,i[1]=1;for(var r=2,n=2;n<t;++n)i[r++]=n-1,i[r++]=n;return e.indices=i,e.primitiveType=PrimitiveType$1.LINES,e}function indexLineLoop(e){var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,2*t);i[0]=0,i[1]=1;for(var r=2,n=2;n<t;++n)i[r++]=n-1,i[r++]=n;return i[r++]=t-1,i[r]=0,e.indices=i,e.primitiveType=PrimitiveType$1.LINES,e}function indexPrimitive(e){switch(e.primitiveType){case PrimitiveType$1.TRIANGLE_FAN:return indexTriangleFan(e);case PrimitiveType$1.TRIANGLE_STRIP:return indexTriangleStrip(e);case PrimitiveType$1.TRIANGLES:return indexTriangles(e);case PrimitiveType$1.LINE_STRIP:return indexLineStrip(e);case PrimitiveType$1.LINE_LOOP:return indexLineLoop(e);case PrimitiveType$1.LINES:return indexLines(e)}return e}function offsetPointFromXZPlane(e,t){Math.abs(e.y)<CesiumMath.EPSILON6&&(e.y=t?-CesiumMath.EPSILON6:CesiumMath.EPSILON6)}function offsetTriangleFromXZPlane(e,t,i){if(0!==e.y&&0!==t.y&&0!==i.y)return offsetPointFromXZPlane(e,e.y<0),offsetPointFromXZPlane(t,t.y<0),void offsetPointFromXZPlane(i,i.y<0);var r=Math.abs(e.y),n=Math.abs(t.y),a=Math.abs(i.y);offsetPointFromXZPlane(e,n=(n=n<r?a<r?CesiumMath.sign(e.y):CesiumMath.sign(i.y):a<n?CesiumMath.sign(t.y):CesiumMath.sign(i.y))<0),offsetPointFromXZPlane(t,n),offsetPointFromXZPlane(i,n)}GeometryPipeline.compressVertices=function(e){if(defined(m=e.attributes.extrudeDirection)){for(var t=m.values,i=t.length/3,r=new Float32Array(2*i),n=0,a=0;a<i;++a)Cartesian3.fromArray(t,3*a,toEncode1),Cartesian3.equals(toEncode1,Cartesian3.ZERO)?n+=2:(encodeResult2=AttributeCompression.octEncodeInRange(toEncode1,65535,encodeResult2),r[n++]=encodeResult2.x,r[n++]=encodeResult2.y);return e.attributes.compressedAttributes=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:r}),delete e.attributes.extrudeDirection,e}var o=e.attributes.normal,s=e.attributes.st,l=defined(o),c=defined(s);if(!l&&!c)return e;var u,d,h,p,f=e.attributes.tangent,m=e.attributes.bitangent,g=defined(f),y=defined(m);l&&(u=o.values),c&&(d=s.values),g&&(h=f.values),y&&(p=m.values),f=i=(l?u:d).length/(l?3:2),m=c&&l?2:1,f*=m+=g||y?1:0;var _=new Float32Array(f),v=0;for(a=0;a<i;++a){c&&(Cartesian2.fromArray(d,2*a,scratchCartesian2$3),_[v++]=AttributeCompression.compressTextureCoordinates(scratchCartesian2$3));var C=3*a;l&&defined(h)&&defined(p)?(Cartesian3.fromArray(u,C,toEncode1),Cartesian3.fromArray(h,C,toEncode2),Cartesian3.fromArray(p,C,toEncode3),AttributeCompression.octPack(toEncode1,toEncode2,toEncode3,scratchCartesian2$3),_[v++]=scratchCartesian2$3.x,_[v++]=scratchCartesian2$3.y):(l&&(Cartesian3.fromArray(u,C,toEncode1),_[v++]=AttributeCompression.octEncodeFloat(toEncode1)),g&&(Cartesian3.fromArray(h,C,toEncode1),_[v++]=AttributeCompression.octEncodeFloat(toEncode1)),y&&(Cartesian3.fromArray(p,C,toEncode1),_[v++]=AttributeCompression.octEncodeFloat(toEncode1)))}return e.attributes.compressedAttributes=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:m,values:_}),l&&delete e.attributes.normal,c&&delete e.attributes.st,y&&delete e.attributes.bitangent,g&&delete e.attributes.tangent,e};var c3=new Cartesian3;function getXZIntersectionOffsetPoints(e,t,i,r){Cartesian3.add(e,Cartesian3.multiplyByScalar(Cartesian3.subtract(t,e,c3),e.y/(e.y-t.y),c3),i),Cartesian3.clone(i,r),offsetPointFromXZPlane(i,!0),offsetPointFromXZPlane(r,!1)}var u1=new Cartesian3,u2=new Cartesian3,q1=new Cartesian3,q2=new Cartesian3,splitTriangleResult={positions:new Array(7),indices:new Array(9)};function splitTriangle(e,t,i){if(!(0<=e.x||0<=t.x||0<=i.x)){offsetTriangleFromXZPlane(e,t,i);var r=e.y<0,n=t.y<0,a=i.y<0,o=0;o+=r?1:0,o+=n?1:0,o+=a?1:0;var s=splitTriangleResult.indices;return 1==o?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,r?(getXZIntersectionOffsetPoints(e,t,u1,q1),getXZIntersectionOffsetPoints(e,i,u2,q2),s[0]=0,s[3]=1,s[4]=2,s[6]=1):n?(getXZIntersectionOffsetPoints(t,i,u1,q1),getXZIntersectionOffsetPoints(t,e,u2,q2),s[0]=1,s[3]=2,s[4]=0,s[6]=2):a&&(getXZIntersectionOffsetPoints(i,e,u1,q1),getXZIntersectionOffsetPoints(i,t,u2,q2),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2==o&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,r?n?a||(getXZIntersectionOffsetPoints(i,e,u1,q1),getXZIntersectionOffsetPoints(i,t,u2,q2),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(getXZIntersectionOffsetPoints(t,i,u1,q1),getXZIntersectionOffsetPoints(t,e,u2,q2),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(getXZIntersectionOffsetPoints(e,t,u1,q1),getXZIntersectionOffsetPoints(e,i,u2,q2),s[0]=1,s[1]=2,s[3]=1,s[6]=0)),(s=splitTriangleResult.positions)[0]=e,s[1]=t,s[2]=i,s.length=3,1!=o&&2!=o||(s[3]=u1,s[4]=u2,s[5]=q1,s[6]=q2,s.length=7),splitTriangleResult}}function updateGeometryAfterSplit(e,t){var i,r=e.attributes;if(0!==r.position.values.length){for(var n in r)r.hasOwnProperty(n)&&defined(r[n])&&defined(r[n].values)&&((i=r[n]).values=ComponentDatatype$1.createTypedArray(i.componentDatatype,i.values));var a=Geometry.computeNumberOfVertices(e);return e.indices=IndexDatatype$1.createTypedArray(a,e.indices),t&&(e.boundingSphere=BoundingSphere.fromVertices(r.position.values)),e}}function copyGeometryForSplit(e){var t,i,r=e.attributes,n={};for(t in r)r.hasOwnProperty(t)&&defined(r[t])&&defined(r[t].values)&&(i=r[t],n[t]=new GeometryAttribute({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]}));return new Geometry({attributes:n,indices:[],primitiveType:e.primitiveType})}function updateInstanceAfterSplit(e,t,i){var r=defined(e.geometry.boundingSphere);t=updateGeometryAfterSplit(t,r),defined(i=updateGeometryAfterSplit(i,r))&&!defined(t)?e.geometry=i:!defined(i)&&defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function generateBarycentricInterpolateFunction(e,t){var i=new e,r=new e,n=new e;return function(a,o,s,l,c,u,d,h){a=e.fromArray(c,a*t,i),o=e.fromArray(c,o*t,r),s=e.fromArray(c,s*t,n),e.multiplyByScalar(a,l.x,a),e.multiplyByScalar(o,l.y,o),e.multiplyByScalar(s,l.z,s),a=e.add(a,o,a),e.add(a,s,a),h&&e.normalize(a,a),e.pack(a,u,d*t)}}var interpolateAndPackCartesian4=generateBarycentricInterpolateFunction(Cartesian4,4),interpolateAndPackCartesian3=generateBarycentricInterpolateFunction(Cartesian3,3),interpolateAndPackCartesian2=generateBarycentricInterpolateFunction(Cartesian2,2),interpolateAndPackBoolean=function(e,t,i,r,n,a,o){e=n[e]*r.x,t=n[t]*r.y,r=n[i]*r.z,a[o]=e+t+r>CesiumMath.EPSILON6?1:0},p0Scratch=new Cartesian3,p1Scratch=new Cartesian3,p2Scratch=new Cartesian3,barycentricScratch=new Cartesian3;function computeTriangleAttributes(e,t,i,r,n,a,o,s,l,c,u,d,h,p,f,m){if(defined(a)||defined(o)||defined(s)||defined(l)||defined(c)||0!==p){var g,y=barycentricCoordinates(r,Cartesian3.fromArray(n,3*e,p0Scratch),Cartesian3.fromArray(n,3*t,p1Scratch),Cartesian3.fromArray(n,3*i,p2Scratch),barycentricScratch);if(defined(a)&&interpolateAndPackCartesian3(e,t,i,y,a,d.normal.values,m,!0),defined(c)&&(n=Cartesian3.fromArray(c,3*e,p0Scratch),a=Cartesian3.fromArray(c,3*t,p1Scratch),c=Cartesian3.fromArray(c,3*i,p2Scratch),Cartesian3.multiplyByScalar(n,y.x,n),Cartesian3.multiplyByScalar(a,y.y,a),Cartesian3.multiplyByScalar(c,y.z,c),Cartesian3.equals(n,Cartesian3.ZERO)&&Cartesian3.equals(a,Cartesian3.ZERO)&&Cartesian3.equals(c,Cartesian3.ZERO)?((g=p0Scratch).x=0,g.y=0,g.z=0):(g=Cartesian3.add(n,a,n),Cartesian3.add(g,c,g),Cartesian3.normalize(g,g)),Cartesian3.pack(g,d.extrudeDirection.values,3*m)),defined(u)&&interpolateAndPackBoolean(e,t,i,y,u,d.applyOffset.values,m),defined(o)&&interpolateAndPackCartesian3(e,t,i,y,o,d.tangent.values,m,!0),defined(s)&&interpolateAndPackCartesian3(e,t,i,y,s,d.bitangent.values,m,!0),defined(l)&&interpolateAndPackCartesian2(e,t,i,y,l,d.st.values,m),0<p)for(var _=0;_<p;_++){var v=h[_];genericInterpolate(e,t,i,y,m,f[v],d[v])}}}function genericInterpolate(e,t,i,r,n,a,o){var s=a.componentsPerAttribute;a=a.values,o=o.values;switch(s){case 4:interpolateAndPackCartesian4(e,t,i,r,a,o,n,!1);break;case 3:interpolateAndPackCartesian3(e,t,i,r,a,o,n,!1);break;case 2:interpolateAndPackCartesian2(e,t,i,r,a,o,n,!1);break;default:o[n]=a[e]*r.x+a[t]*r.y+a[i]*r.z}}function insertSplitPoint(e,t,i,r,n,a){var o=e.position.values.length/3;return-1===n?(e.position.values.push(a.x,a.y,a.z),t.push(o),o):-1===(n=i[r=r[n]])?(i[r]=o,e.position.values.push(a.x,a.y,a.z),t.push(o),o):(t.push(n),n)}var NAMED_ATTRIBUTES={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function splitLongitudeTriangles(e){var t,i=e.geometry,r=i.attributes,n=r.position.values,a=defined(r.normal)?r.normal.values:void 0,o=defined(r.bitangent)?r.bitangent.values:void 0,s=defined(r.tangent)?r.tangent.values:void 0,l=defined(r.st)?r.st.values:void 0,c=defined(r.extrudeDirection)?r.extrudeDirection.values:void 0,u=defined(r.applyOffset)?r.applyOffset.values:void 0,d=i.indices,h=[];for(t in r)r.hasOwnProperty(t)&&!NAMED_ATTRIBUTES[t]&&defined(r[t])&&h.push(t);var p,f,m=h.length,g=copyGeometryForSplit(i),y=copyGeometryForSplit(i),_=[];_.length=n.length/3;var v=[];for(v.length=n.length/3,x=0;x<_.length;++x)_[x]=-1,v[x]=-1;for(var C=d.length,x=0;x<C;x+=3){var b=d[x],S=d[x+1],T=d[x+2],E=Cartesian3.fromArray(n,3*b),w=Cartesian3.fromArray(n,3*S),A=Cartesian3.fromArray(n,3*T),P=splitTriangle(E,w,A);if(defined(P)&&3<P.positions.length)for(var D=P.positions,M=P.indices,I=M.length,R=0;R<I;++R){var O=M[R],L=D[O],N=L.y<0?(p=y.attributes,f=y.indices,_):(p=g.attributes,f=g.indices,v);computeTriangleAttributes(b,S,T,L,n,a,s,o,l,c,u,p,h,m,r,insertSplitPoint(p,f,N,d,O<3?x+O:-1,L))}else defined(P)&&(E=P.positions[0],w=P.positions[1],A=P.positions[2]),N=E.y<0?(p=y.attributes,f=y.indices,_):(p=g.attributes,f=g.indices,v),computeTriangleAttributes(b,S,T,E,n,a,s,o,l,c,u,p,h,m,r,insertSplitPoint(p,f,N,d,x,E)),computeTriangleAttributes(b,S,T,w,n,a,s,o,l,c,u,p,h,m,r,insertSplitPoint(p,f,N,d,x+1,w)),computeTriangleAttributes(b,S,T,A,n,a,s,o,l,c,u,p,h,m,r,insertSplitPoint(p,f,N,d,x+2,A))}updateInstanceAfterSplit(e,y,g)}var xzPlane=Plane.fromPointNormal(Cartesian3.ZERO,Cartesian3.UNIT_Y),offsetScratch=new Cartesian3,offsetPointScratch=new Cartesian3;function computeLineAttributes(e,t,i,r,n,a,o){defined(o)&&(r=Cartesian3.fromArray(r,3*e,p0Scratch),Cartesian3.equalsEpsilon(r,i,CesiumMath.EPSILON10)?a.applyOffset.values[n]=o[e]:a.applyOffset.values[n]=o[t])}function splitLongitudeLines(e){var t,i=e.geometry,r=i.attributes,n=r.position.values,a=defined(r.applyOffset)?r.applyOffset.values:void 0,o=i.indices,s=copyGeometryForSplit(i),l=copyGeometryForSplit(i),c=o.length,u=[];u.length=n.length/3;var d=[];for(d.length=n.length/3,t=0;t<u.length;++t)u[t]=-1,d[t]=-1;for(t=0;t<c;t+=2){var h=o[t],p=o[t+1],f=Cartesian3.fromArray(n,3*h,p0Scratch),m=Cartesian3.fromArray(n,3*p,p1Scratch);Math.abs(f.y)<CesiumMath.EPSILON6&&(f.y<0?f.y=-CesiumMath.EPSILON6:f.y=CesiumMath.EPSILON6),Math.abs(m.y)<CesiumMath.EPSILON6&&(m.y<0?m.y=-CesiumMath.EPSILON6:m.y=CesiumMath.EPSILON6);var g,y,_,v,C=s.attributes,x=s.indices,b=d,S=l.attributes,T=l.indices,E=u,w=IntersectionTests.lineSegmentPlane(f,m,xzPlane,p2Scratch);defined(w)?(g=Cartesian3.multiplyByScalar(Cartesian3.UNIT_Y,5*CesiumMath.EPSILON9,offsetScratch),f.y<0&&(Cartesian3.negate(g,g),C=l.attributes,x=l.indices,b=u,S=s.attributes,T=s.indices,E=d),y=Cartesian3.add(w,g,offsetPointScratch),computeLineAttributes(h,p,f,n,insertSplitPoint(C,x,b,o,t,f),C,a),computeLineAttributes(h,p,y,n,insertSplitPoint(C,x,b,o,-1,y),C,a),Cartesian3.negate(g,g),Cartesian3.add(w,g,y),computeLineAttributes(h,p,y,n,insertSplitPoint(S,T,E,o,-1,y),S,a),computeLineAttributes(h,p,m,n,insertSplitPoint(S,T,E,o,t+1,m),S,a)):(S=f.y<0?(_=l.attributes,v=l.indices,u):(_=s.attributes,v=s.indices,d),computeLineAttributes(h,p,f,n,insertSplitPoint(_,v,S,o,t,f),_,a),computeLineAttributes(h,p,m,n,insertSplitPoint(_,v,S,o,t+1,m),_,a))}updateInstanceAfterSplit(e,l,s)}var cartesian2Scratch0=new Cartesian2,cartesian2Scratch1=new Cartesian2,cartesian3Scratch0=new Cartesian3,cartesian3Scratch2=new Cartesian3,cartesian3Scratch3=new Cartesian3,cartesian3Scratch4=new Cartesian3,cartesian3Scratch5=new Cartesian3,cartesian3Scratch6=new Cartesian3,cartesian4Scratch0=new Cartesian4;function updateAdjacencyAfterSplit(e){for(var t=(e=e.attributes).position.values,i=e.prevPosition.values,r=e.nextPosition.values,n=t.length,a=0;a<n;a+=3){var o,s=Cartesian3.unpack(t,a,cartesian3Scratch0);0<s.x||(o=Cartesian3.unpack(i,a,cartesian3Scratch2),(s.y<0&&0<o.y||0<s.y&&o.y<0)&&(0<a-3?(i[a]=t[a-3],i[a+1]=t[a-2],i[a+2]=t[a-1]):Cartesian3.pack(s,i,a)),o=Cartesian3.unpack(r,a,cartesian3Scratch3),(s.y<0&&0<o.y||0<s.y&&o.y<0)&&(a+3<n?(r[a]=t[a+3],r[a+1]=t[a+4],r[a+2]=t[a+5]):Cartesian3.pack(s,r,a)))}}var offsetScalar=5*CesiumMath.EPSILON9,coplanarOffset=CesiumMath.EPSILON6;function splitLongitudePolyline(e){for(var t=e.geometry,i=t.attributes,r=i.position.values,n=i.prevPosition.values,a=i.nextPosition.values,o=i.expandAndWidth.values,s=defined(i.st)?i.st.values:void 0,l=defined(i.color)?i.color.values:void 0,c=copyGeometryForSplit(t),u=copyGeometryForSplit(t),d=!1,h=r.length/3,p=0;p<h;p+=4){var f=p,m=p+2,g=Cartesian3.fromArray(r,3*f,cartesian3Scratch0),y=Cartesian3.fromArray(r,3*m,cartesian3Scratch2);if(Math.abs(g.y)<coplanarOffset)for(g.y=coplanarOffset*(y.y<0?-1:1),r[3*p+1]=g.y,r[3*(p+1)+1]=g.y,P=3*f;P<3*f+12;P+=3)n[P]=r[3*p],n[P+1]=r[3*p+1],n[P+2]=r[3*p+2];if(Math.abs(y.y)<coplanarOffset)for(y.y=coplanarOffset*(g.y<0?-1:1),r[3*(p+2)+1]=y.y,r[3*(p+3)+1]=y.y,P=3*f;P<3*f+12;P+=3)a[P]=r[3*(p+2)],a[P+1]=r[3*(p+2)+1],a[P+2]=r[3*(p+2)+2];var _=c.attributes,v=c.indices,C=u.attributes,x=u.indices;if(defined(A=IntersectionTests.lineSegmentPlane(g,y,xzPlane,cartesian3Scratch4))){d=!0;var b=Cartesian3.multiplyByScalar(Cartesian3.UNIT_Y,offsetScalar,cartesian3Scratch5);g.y<0&&(Cartesian3.negate(b,b),_=u.attributes,v=u.indices,C=c.attributes,x=c.indices);var S=Cartesian3.add(A,b,cartesian3Scratch6);_.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),_.position.values.push(S.x,S.y,S.z),_.position.values.push(S.x,S.y,S.z),_.prevPosition.values.push(n[3*f],n[3*f+1],n[3*f+2]),_.prevPosition.values.push(n[3*f+3],n[3*f+4],n[3*f+5]),_.prevPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),_.nextPosition.values.push(S.x,S.y,S.z),_.nextPosition.values.push(S.x,S.y,S.z),_.nextPosition.values.push(S.x,S.y,S.z),_.nextPosition.values.push(S.x,S.y,S.z),Cartesian3.negate(b,b),Cartesian3.add(A,b,S),C.position.values.push(S.x,S.y,S.z),C.position.values.push(S.x,S.y,S.z),C.position.values.push(y.x,y.y,y.z,y.x,y.y,y.z),C.prevPosition.values.push(S.x,S.y,S.z),C.prevPosition.values.push(S.x,S.y,S.z),C.prevPosition.values.push(S.x,S.y,S.z),C.prevPosition.values.push(S.x,S.y,S.z),C.nextPosition.values.push(y.x,y.y,y.z,y.x,y.y,y.z),C.nextPosition.values.push(a[3*m],a[3*m+1],a[3*m+2]),C.nextPosition.values.push(a[3*m+3],a[3*m+4],a[3*m+5]);var T=Cartesian2.fromArray(o,2*f,cartesian2Scratch0),E=Math.abs(T.y);if(_.expandAndWidth.values.push(-1,E,1,E),_.expandAndWidth.values.push(-1,-E,1,-E),C.expandAndWidth.values.push(-1,E,1,E),C.expandAndWidth.values.push(-1,-E,1,-E),b=Cartesian3.magnitudeSquared(Cartesian3.subtract(A,g,cartesian3Scratch3)),b/=Cartesian3.magnitudeSquared(Cartesian3.subtract(y,g,cartesian3Scratch3)),defined(l)){S=Cartesian4.fromArray(l,4*f,cartesian4Scratch0);for(var w=Cartesian4.fromArray(l,4*m,cartesian4Scratch0),A=(T=CesiumMath.lerp(S.x,w.x,b),E=CesiumMath.lerp(S.y,w.y,b),CesiumMath.lerp(S.z,w.z,b)),P=(w=CesiumMath.lerp(S.w,w.w,b),4*f);P<4*f+8;++P)_.color.values.push(l[P]);for(_.color.values.push(T,E,A,w),_.color.values.push(T,E,A,w),C.color.values.push(T,E,A,w),C.color.values.push(T,E,A,w),P=4*m;P<4*m+8;++P)C.color.values.push(l[P])}if(defined(s)){w=Cartesian2.fromArray(s,2*f,cartesian2Scratch0);var D=Cartesian2.fromArray(s,2*(p+3),cartesian2Scratch1);b=CesiumMath.lerp(w.x,D.x,b);for(P=2*f;P<2*f+4;++P)_.st.values.push(s[P]);for(_.st.values.push(b,w.y),_.st.values.push(b,D.y),C.st.values.push(b,w.y),C.st.values.push(b,D.y),P=2*m;P<2*m+4;++P)C.st.values.push(s[P])}D=_.position.values.length/3-4,v.push(D,D+2,D+1),v.push(D+1,D+2,D+3),D=C.position.values.length/3-4,x.push(D,D+2,D+1),x.push(D+1,D+2,D+3)}else{var M;x=g.y<0?(M=u.attributes,u.indices):(M=c.attributes,c.indices);for(M.position.values.push(g.x,g.y,g.z),M.position.values.push(g.x,g.y,g.z),M.position.values.push(y.x,y.y,y.z),M.position.values.push(y.x,y.y,y.z),P=3*p;P<3*p+12;++P)M.prevPosition.values.push(n[P]),M.nextPosition.values.push(a[P]);for(P=2*p;P<2*p+8;++P)M.expandAndWidth.values.push(o[P]),defined(s)&&M.st.values.push(s[P]);if(defined(l))for(P=4*p;P<4*p+16;++P)M.color.values.push(l[P]);D=M.position.values.length/3-4,x.push(D,D+2,D+1),x.push(D+1,D+2,D+3)}}d&&(updateAdjacencyAfterSplit(u),updateAdjacencyAfterSplit(c)),updateInstanceAfterSplit(e,u,c)}GeometryPipeline.splitLongitude=function(e){var t=e.geometry,i=t.boundingSphere;if(defined(i)&&(0<i.center.x-i.radius||BoundingSphere.intersectPlane(i,Plane.ORIGIN_ZX_PLANE)!==Intersect$1.INTERSECTING))return e;if(t.geometryType!==GeometryType$1.NONE)switch(t.geometryType){case GeometryType$1.POLYLINES:splitLongitudePolyline(e);break;case GeometryType$1.TRIANGLES:splitLongitudeTriangles(e);break;case GeometryType$1.LINES:splitLongitudeLines(e)}else indexPrimitive(t),t.primitiveType===PrimitiveType$1.TRIANGLES?splitLongitudeTriangles(e):t.primitiveType===PrimitiveType$1.LINES&&splitLongitudeLines(e);return e};var scratchCartesian1$3=new Cartesian3,scratchCartesian2$4=new Cartesian3,scratchCartesian3$5=new Cartesian3,scratchCartesian4$1=new Cartesian3,texCoordScratch=new Cartesian2,textureMatrixScratch=new Matrix3,tangentMatrixScratch=new Matrix3,quaternionScratch=new Quaternion,scratchNormal$2=new Cartesian3,scratchTangent=new Cartesian3,scratchBitangent=new Cartesian3,scratchCartographic$1=new Cartographic,projectedCenterScratch=new Cartesian3,scratchMinTexCoord=new Cartesian2,scratchMaxTexCoord=new Cartesian2;function computeTopBottomAttributes(e,t,i){var r=t.vertexFormat,n=t.center,a=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,c=i?e.length/3*2:e.length/3,u=t.shadowVolume,d=r.st?new Float32Array(2*c):void 0,h=r.normal?new Float32Array(3*c):void 0,p=r.tangent?new Float32Array(3*c):void 0,f=r.bitangent?new Float32Array(3*c):void 0,m=u?new Float32Array(3*c):void 0,g=0,y=scratchNormal$2,_=scratchTangent,v=scratchBitangent,C=new GeographicProjection(s),x=C.project(s.cartesianToCartographic(n,scratchCartographic$1),projectedCenterScratch);n=s.scaleToGeodeticSurface(n,scratchCartesian1$3);s.geodeticSurfaceNormal(n,n);var b=textureMatrixScratch,S=tangentMatrixScratch;S=0!==l?(F=Quaternion.fromAxisAngle(n,l,quaternionScratch),b=Matrix3.fromQuaternion(F,b),F=Quaternion.fromAxisAngle(n,-l,quaternionScratch),Matrix3.fromQuaternion(F,S)):(b=Matrix3.clone(Matrix3.IDENTITY,b),Matrix3.clone(Matrix3.IDENTITY,S));for(var T=Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,scratchMinTexCoord),E=Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,scratchMaxTexCoord),w=e.length,A=i?w:0,P=A/3*2,D=0;D<w;D+=3){var M,I=D+1,R=D+2,O=Cartesian3.fromArray(e,D,scratchCartesian1$3);r.st&&(M=Matrix3.multiplyByVector(b,O,scratchCartesian2$4),M=C.project(s.cartesianToCartographic(M,scratchCartographic$1),scratchCartesian3$5),Cartesian3.subtract(M,x,M),texCoordScratch.x=(M.x+a)/(2*a),texCoordScratch.y=(M.y+o)/(2*o),T.x=Math.min(texCoordScratch.x,T.x),T.y=Math.min(texCoordScratch.y,T.y),E.x=Math.max(texCoordScratch.x,E.x),E.y=Math.max(texCoordScratch.y,E.y),i&&(d[g+P]=texCoordScratch.x,d[g+1+P]=texCoordScratch.y),d[g++]=texCoordScratch.x,d[g++]=texCoordScratch.y),(r.normal||r.tangent||r.bitangent||u)&&(y=s.geodeticSurfaceNormal(O,y),u&&(m[D+A]=-y.x,m[I+A]=-y.y,m[R+A]=-y.z),(r.normal||r.tangent||r.bitangent)&&((r.tangent||r.bitangent)&&(_=Cartesian3.normalize(Cartesian3.cross(Cartesian3.UNIT_Z,y,_),_),Matrix3.multiplyByVector(S,_,_)),r.normal&&(h[D]=y.x,h[I]=y.y,h[R]=y.z,i&&(h[D+A]=-y.x,h[I+A]=-y.y,h[R+A]=-y.z)),r.tangent&&(p[D]=_.x,p[I]=_.y,p[R]=_.z,i&&(p[D+A]=-_.x,p[I+A]=-_.y,p[R+A]=-_.z)),r.bitangent&&(v=Cartesian3.normalize(Cartesian3.cross(y,_,v),v),f[D]=v.x,f[I]=v.y,f[R]=v.z,i&&(f[D+A]=v.x,f[I+A]=v.y,f[R+A]=v.z))))}if(r.st){w=d.length;for(var L=0;L<w;L+=2)d[L]=(d[L]-T.x)/(E.x-T.x),d[L+1]=(d[L+1]-T.y)/(E.y-T.y)}var N,F=new GeometryAttributes;return r.position&&(N=EllipseGeometryLibrary.raisePositionsToHeight(e,t,i),F.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:N})),r.st&&(F.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:d})),r.normal&&(F.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:h})),r.tangent&&(F.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:p})),r.bitangent&&(F.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:f})),u&&(F.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:m})),i&&defined(t.offsetAttribute)&&(N=new Uint8Array(c),N=t.offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(N,1,0,c/2):arrayFill(N,t.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),F.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})),F}function topIndices(e){for(var t,i,r=new Array(e*(e+1)*12-6),n=0,a=0,o=1,s=0;s<3;s++)r[n++]=o++,r[n++]=a,r[n++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,a=(s-1)*s-1,r[n++]=o++,r[n++]=a,r[n++]=o,t=2*s,i=0;i<t-1;++i)r[n++]=o,r[n++]=a++,r[n++]=a,r[n++]=o++,r[n++]=a,r[n++]=o;r[n++]=o++,r[n++]=a,r[n++]=o}for(t=2*e,++o,++a,s=0;s<t-1;++s)r[n++]=o,r[n++]=a++,r[n++]=a,r[n++]=o++,r[n++]=a,r[n++]=o;for(r[n++]=o,r[n++]=a++,r[n++]=a,r[n++]=o++,r[n++]=a++,r[n++]=a,++a,s=e-1;1<s;--s){for(r[n++]=a++,r[n++]=a,r[n++]=o,t=2*s,i=0;i<t-1;++i)r[n++]=o,r[n++]=a++,r[n++]=a,r[n++]=o++,r[n++]=a,r[n++]=o;r[n++]=a++,r[n++]=a++,r[n++]=o++}for(s=0;s<3;s++)r[n++]=a++,r[n++]=a,r[n++]=o;return r}var boundingSphereCenter=new Cartesian3;function computeEllipse(e){var t=e.center;boundingSphereCenter=Cartesian3.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,boundingSphereCenter),e.height,boundingSphereCenter);var i=new BoundingSphere(boundingSphereCenter=Cartesian3.add(t,boundingSphereCenter,boundingSphereCenter),e.semiMajorAxis),r=(t=(r=EllipseGeometryLibrary.computeEllipsePositions(e,!0,!1)).positions,r.numPts);e=computeTopBottomAttributes(t,e,!1),r=topIndices(r);return{boundingSphere:i,attributes:e,indices:r=IndexDatatype$1.createTypedArray(t.length/3,r)}}function computeWallAttributes(e,t){var i=t.vertexFormat,r=t.center,n=t.semiMajorAxis,a=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,c=t.stRotation,u=e.length/3*2,d=new Float64Array(3*u),h=i.st?new Float32Array(2*u):void 0,p=i.normal?new Float32Array(3*u):void 0,f=i.tangent?new Float32Array(3*u):void 0,m=i.bitangent?new Float32Array(3*u):void 0,g=t.shadowVolume,y=g?new Float32Array(3*u):void 0,_=0,v=scratchNormal$2,C=scratchTangent,x=scratchBitangent,b=new GeographicProjection(o),S=b.project(o.cartesianToCartographic(r,scratchCartographic$1),projectedCenterScratch);r=o.scaleToGeodeticSurface(r,scratchCartesian1$3);o.geodeticSurfaceNormal(r,r);r=Quaternion.fromAxisAngle(r,c,quaternionScratch);for(var T=Matrix3.fromQuaternion(r,textureMatrixScratch),E=Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,scratchMinTexCoord),w=Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,scratchMaxTexCoord),A=e.length,P=A/3*2,D=0;D<A;D+=3){var M=D+1,I=D+2,R=Cartesian3.fromArray(e,D,scratchCartesian1$3);i.st&&(L=Matrix3.multiplyByVector(T,R,scratchCartesian2$4),O=b.project(o.cartesianToCartographic(L,scratchCartographic$1),scratchCartesian3$5),Cartesian3.subtract(O,S,O),texCoordScratch.x=(O.x+n)/(2*n),texCoordScratch.y=(O.y+a)/(2*a),E.x=Math.min(texCoordScratch.x,E.x),E.y=Math.min(texCoordScratch.y,E.y),w.x=Math.max(texCoordScratch.x,w.x),w.y=Math.max(texCoordScratch.y,w.y),h[_+P]=texCoordScratch.x,h[_+1+P]=texCoordScratch.y,h[_++]=texCoordScratch.x,h[_++]=texCoordScratch.y),R=o.scaleToGeodeticSurface(R,R),L=Cartesian3.clone(R,scratchCartesian2$4),v=o.geodeticSurfaceNormal(R,v),g&&(y[D+A]=-v.x,y[M+A]=-v.y,y[I+A]=-v.z);var O=Cartesian3.multiplyByScalar(v,s,scratchCartesian4$1),L=(R=Cartesian3.add(R,O,R),O=Cartesian3.multiplyByScalar(v,l,O),Cartesian3.add(L,O,L));i.position&&(d[D+A]=L.x,d[M+A]=L.y,d[I+A]=L.z,d[D]=R.x,d[M]=R.y,d[I]=R.z),(i.normal||i.tangent||i.bitangent)&&(x=Cartesian3.clone(v,x),O=Cartesian3.fromArray(e,(D+3)%A,scratchCartesian4$1),Cartesian3.subtract(O,R,O),R=Cartesian3.subtract(L,R,scratchCartesian3$5),v=Cartesian3.normalize(Cartesian3.cross(R,O,v),v),i.normal&&(p[D]=v.x,p[M]=v.y,p[I]=v.z,p[D+A]=v.x,p[M+A]=v.y,p[I+A]=v.z),i.tangent&&(C=Cartesian3.normalize(Cartesian3.cross(x,v,C),C),f[D]=C.x,f[M]=C.y,f[I]=C.z,f[D+A]=C.x,f[D+1+A]=C.y,f[D+2+A]=C.z),i.bitangent&&(m[D]=x.x,m[M]=x.y,m[I]=x.z,m[D+A]=x.x,m[M+A]=x.y,m[I+A]=x.z))}if(i.st){A=h.length;for(var N=0;N<A;N+=2)h[N]=(h[N]-E.x)/(w.x-E.x),h[N+1]=(h[N+1]-E.y)/(w.y-E.y)}return c=new GeometryAttributes,i.position&&(c.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:d})),i.st&&(c.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:h})),i.normal&&(c.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(c.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:f})),i.bitangent&&(c.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:m})),g&&(c.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:y})),defined(t.offsetAttribute)&&(r=new Uint8Array(u),r=t.offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(r,1,0,u/2):arrayFill(r,t.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),c.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})),c}function computeWallIndices(e){for(var t=e.length/3,i=IndexDatatype$1.createTypedArray(t,6*t),r=0,n=0;n<t;n++){var a=n+t,o=(n+1)%t,s=o+t;i[r++]=n,i[r++]=a,i[r++]=o,i[r++]=o,i[r++]=a,i[r++]=s}return i}var topBoundingSphere=new BoundingSphere,bottomBoundingSphere=new BoundingSphere;function computeExtrudedEllipse(e){var t=e.center,i=e.ellipsoid,r=e.semiMajorAxis,n=Cartesian3.multiplyByScalar(i.geodeticSurfaceNormal(t,scratchCartesian1$3),e.height,scratchCartesian1$3);topBoundingSphere.center=Cartesian3.add(t,n,topBoundingSphere.center),topBoundingSphere.radius=r,n=Cartesian3.multiplyByScalar(i.geodeticSurfaceNormal(t,n),e.extrudedHeight,n),bottomBoundingSphere.center=Cartesian3.add(t,n,bottomBoundingSphere.center),bottomBoundingSphere.radius=r;i=(a=EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)).positions,t=a.numPts,n=a.outerPositions,r=BoundingSphere.union(topBoundingSphere,bottomBoundingSphere);var a=computeTopBottomAttributes(i,e,!0),o=(c=topIndices(t)).length;c.length=2*o;for(var s=i.length/3,l=0;l<o;l+=3)c[l+o]=c[l+2]+s,c[l+1+o]=c[l+1]+s,c[l+2+o]=c[l]+s;a=new Geometry({attributes:a,indices:IndexDatatype$1.createTypedArray(2*s/3,c),primitiveType:PrimitiveType$1.TRIANGLES}),e=computeWallAttributes(n,e);var c=computeWallIndices(n);n=new Geometry({attributes:e,indices:IndexDatatype$1.createTypedArray(2*n.length/3,c),primitiveType:PrimitiveType$1.TRIANGLES});return{boundingSphere:r,attributes:(n=GeometryPipeline.combineInstances([new GeometryInstance({geometry:a}),new GeometryInstance({geometry:n})]))[0].attributes,indices:n[0].indices}}function computeRectangle(e,t,i,r,n,a,o){for(var s=EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:i,rotation:r,granularity:n},!1,!0).outerPositions,l=s.length/3,c=new Array(l),u=0;u<l;++u)c[u]=Cartesian3.fromArray(s,3*u);return(o=Rectangle.fromCartesianArray(c,a,o)).width>CesiumMath.PI&&(o.north=0<o.north?CesiumMath.PI_OVER_TWO-CesiumMath.EPSILON7:o.north,o.south=o.south<0?CesiumMath.EPSILON7-CesiumMath.PI_OVER_TWO:o.south,o.east=CesiumMath.PI,o.west=-CesiumMath.PI),o}function EllipseGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).center,i=defaultValue(e.ellipsoid,Ellipsoid.WGS84),r=e.semiMajorAxis,n=e.semiMinorAxis,a=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),o=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),s=defaultValue(e.height,0),l=defaultValue(e.extrudedHeight,s);this._center=Cartesian3.clone(t),this._semiMajorAxis=r,this._semiMinorAxis=n,this._ellipsoid=Ellipsoid.clone(i),this._rotation=defaultValue(e.rotation,0),this._stRotation=defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=a,this._vertexFormat=VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}EllipseGeometry.packedLength=Cartesian3.packedLength+Ellipsoid.packedLength+VertexFormat.packedLength+9,EllipseGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._center,t,i),i+=Cartesian3.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchCenter$1=new Cartesian3,scratchEllipsoid=new Ellipsoid,scratchVertexFormat$1=new VertexFormat,scratchOptions$2={center:scratchCenter$1,ellipsoid:scratchEllipsoid,vertexFormat:scratchVertexFormat$1,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function textureCoordinateRotationPoints(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var i=EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,r=i.length/3,n=new Array(r),a=0;a<r;++a)n[a]=Cartesian3.fromArray(i,3*a);var o=e._ellipsoid;e=e.rectangle;return Geometry._textureCoordinateRotationPoints(n,t,o,e)}function CircleGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).radius;e={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new EllipseGeometry(e),this._workerName="createCircleGeometry"}EllipseGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchCenter$1);t+=Cartesian3.packedLength;var n=Ellipsoid.unpack(e,t,scratchEllipsoid);t+=Ellipsoid.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$1);t+=VertexFormat.packedLength;var o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++],h=e[t++],p=1===e[t++];t=e[t];return defined(i)?(i._center=Cartesian3.clone(r,i._center),i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._semiMajorAxis=o,i._semiMinorAxis=s,i._rotation=l,i._stRotation=c,i._height=u,i._granularity=d,i._extrudedHeight=h,i._shadowVolume=p,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$2.height=u,scratchOptions$2.extrudedHeight=h,scratchOptions$2.granularity=d,scratchOptions$2.stRotation=c,scratchOptions$2.rotation=l,scratchOptions$2.semiMajorAxis=o,scratchOptions$2.semiMinorAxis=s,scratchOptions$2.shadowVolume=p,scratchOptions$2.offsetAttribute=-1===t?void 0:t,new EllipseGeometry(scratchOptions$2))},EllipseGeometry.computeRectangle=function(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).center,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=e.semiMajorAxis,a=e.semiMinorAxis,o=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE);return computeRectangle(i,n,a,defaultValue(e.rotation,0),o,r,t)},EllipseGeometry.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,r=!CesiumMath.equalsEpsilon(t,i,0,CesiumMath.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var n;t={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation};return r?(t.extrudedHeight=i,t.shadowVolume=e._shadowVolume,t.offsetAttribute=e._offsetAttribute,n=computeExtrudedEllipse(t)):(n=computeEllipse(t),defined(e._offsetAttribute)&&(t=n.attributes.position.values.length,arrayFill(t=new Uint8Array(t/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),n.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t}))),new Geometry({attributes:n.attributes,indices:n.indices,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:n.boundingSphere,offsetAttribute:e._offsetAttribute})}},EllipseGeometry.createShadowVolume=function(e,t,i){var r=e._granularity,n=e._ellipsoid;t=t(r,n),i=i(r,n);return new EllipseGeometry({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:n,rotation:e._rotation,stRotation:e._stRotation,granularity:r,extrudedHeight:t,height:i,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(EllipseGeometry.prototype,{rectangle:{get:function(){return defined(this._rectangle)||(this._rectangle=computeRectangle(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=textureCoordinateRotationPoints(this)),this._textureCoordinateRotationPoints}}}),CircleGeometry.packedLength=EllipseGeometry.packedLength,CircleGeometry.pack=function(e,t,i){return EllipseGeometry.pack(e._ellipseGeometry,t,i)};var scratchEllipseGeometry=new EllipseGeometry({center:new Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),scratchOptions$3={center:new Cartesian3,radius:void 0,ellipsoid:Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};CircleGeometry.unpack=function(e,t,i){return t=EllipseGeometry.unpack(e,t,scratchEllipseGeometry),scratchOptions$3.center=Cartesian3.clone(t._center,scratchOptions$3.center),scratchOptions$3.ellipsoid=Ellipsoid.clone(t._ellipsoid,scratchOptions$3.ellipsoid),scratchOptions$3.height=t._height,scratchOptions$3.extrudedHeight=t._extrudedHeight,scratchOptions$3.granularity=t._granularity,scratchOptions$3.vertexFormat=VertexFormat.clone(t._vertexFormat,scratchOptions$3.vertexFormat),scratchOptions$3.stRotation=t._stRotation,scratchOptions$3.shadowVolume=t._shadowVolume,defined(i)?(scratchOptions$3.semiMajorAxis=t._semiMajorAxis,scratchOptions$3.semiMinorAxis=t._semiMinorAxis,i._ellipseGeometry=new EllipseGeometry(scratchOptions$3),i):(scratchOptions$3.radius=t._semiMajorAxis,new CircleGeometry(scratchOptions$3))},CircleGeometry.createGeometry=function(e){return EllipseGeometry.createGeometry(e._ellipseGeometry)},CircleGeometry.createShadowVolume=function(e,t,i){var r=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid;t=t(r,n),i=i(r,n);return new CircleGeometry({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:t,height:i,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(CircleGeometry.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var scratchCartesian1$4=new Cartesian3,boundingSphereCenter$1=new Cartesian3;function computeEllipse$1(e){var t=e.center;boundingSphereCenter$1=Cartesian3.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,boundingSphereCenter$1),e.height,boundingSphereCenter$1);for(var i=new BoundingSphere(boundingSphereCenter$1=Cartesian3.add(t,boundingSphereCenter$1,boundingSphereCenter$1),e.semiMajorAxis),r=(t=EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions,e=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:EllipseGeometryLibrary.raisePositionsToHeight(t,e,!1)})}),t.length/3),n=IndexDatatype$1.createTypedArray(r,2*r),a=0,o=0;o<r;++o)n[a++]=o,n[a++]=(o+1)%r;return{boundingSphere:i,attributes:e,indices:n}}var topBoundingSphere$1=new BoundingSphere,bottomBoundingSphere$1=new BoundingSphere;function computeExtrudedEllipse$1(e){var t=e.center,i=e.ellipsoid,r=e.semiMajorAxis,n=Cartesian3.multiplyByScalar(i.geodeticSurfaceNormal(t,scratchCartesian1$4),e.height,scratchCartesian1$4);topBoundingSphere$1.center=Cartesian3.add(t,n,topBoundingSphere$1.center),topBoundingSphere$1.radius=r,n=Cartesian3.multiplyByScalar(i.geodeticSurfaceNormal(t,n),e.extrudedHeight,n),bottomBoundingSphere$1.center=Cartesian3.add(t,n,bottomBoundingSphere$1.center),bottomBoundingSphere$1.radius=r;t=EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions,t=(n=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:EllipseGeometryLibrary.raisePositionsToHeight(t,e,!0)})})).position.values,r=BoundingSphere.union(topBoundingSphere$1,bottomBoundingSphere$1);var a=t.length/3;defined(e.offsetAttribute)&&(o=new Uint8Array(a),o=e.offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(o,1,0,a/2):arrayFill(o,e.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),n.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:o}));var o=defaultValue(e.numberOfVerticalLines,16),s=(o=CesiumMath.clamp(o,0,a/2),IndexDatatype$1.createTypedArray(a,2*a+2*o));a/=2;var l=0;for(d=0;d<a;++d)s[l++]=d,s[l++]=(d+1)%a,s[l++]=d+a,s[l++]=(d+1)%a+a;if(0<o){e=Math.min(o,a);for(var c=Math.round(a/e),u=Math.min(c*o,a),d=0;d<u;d+=c)s[l++]=d,s[l++]=d+a}return{boundingSphere:r,attributes:n,indices:s}}function EllipseOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).center,i=defaultValue(e.ellipsoid,Ellipsoid.WGS84),r=e.semiMajorAxis,n=e.semiMinorAxis,a=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),o=defaultValue(e.height,0),s=defaultValue(e.extrudedHeight,o);this._center=Cartesian3.clone(t),this._semiMajorAxis=r,this._semiMinorAxis=n,this._ellipsoid=Ellipsoid.clone(i),this._rotation=defaultValue(e.rotation,0),this._height=Math.max(s,o),this._granularity=a,this._extrudedHeight=Math.min(s,o),this._numberOfVerticalLines=Math.max(defaultValue(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}EllipseOutlineGeometry.packedLength=Cartesian3.packedLength+Ellipsoid.packedLength+8,EllipseOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._center,t,i),i+=Cartesian3.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchCenter$2=new Cartesian3,scratchEllipsoid$1=new Ellipsoid,scratchOptions$4={center:scratchCenter$2,ellipsoid:scratchEllipsoid$1,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};function CircleOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).radius;e={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new EllipseOutlineGeometry(e),this._workerName="createCircleOutlineGeometry"}EllipseOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchCenter$2);t+=Cartesian3.packedLength;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$1);t+=Ellipsoid.packedLength;var a=e[t++],o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++];t=e[t];return defined(i)?(i._center=Cartesian3.clone(r,i._center),i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._semiMajorAxis=a,i._semiMinorAxis=o,i._rotation=s,i._height=l,i._granularity=c,i._extrudedHeight=u,i._numberOfVerticalLines=d,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$4.height=l,scratchOptions$4.extrudedHeight=u,scratchOptions$4.granularity=c,scratchOptions$4.rotation=s,scratchOptions$4.semiMajorAxis=a,scratchOptions$4.semiMinorAxis=o,scratchOptions$4.numberOfVerticalLines=d,scratchOptions$4.offsetAttribute=-1===t?void 0:t,new EllipseOutlineGeometry(scratchOptions$4))},EllipseOutlineGeometry.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,r=!CesiumMath.equalsEpsilon(t,i,0,CesiumMath.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var n;t={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines};return r?(t.extrudedHeight=i,t.offsetAttribute=e._offsetAttribute,n=computeExtrudedEllipse$1(t)):(n=computeEllipse$1(t),defined(e._offsetAttribute)&&(t=n.attributes.position.values.length,arrayFill(t=new Uint8Array(t/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),n.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t}))),new Geometry({attributes:n.attributes,indices:n.indices,primitiveType:PrimitiveType$1.LINES,boundingSphere:n.boundingSphere,offsetAttribute:e._offsetAttribute})}},CircleOutlineGeometry.packedLength=EllipseOutlineGeometry.packedLength,CircleOutlineGeometry.pack=function(e,t,i){return EllipseOutlineGeometry.pack(e._ellipseGeometry,t,i)};var scratchEllipseGeometry$1=new EllipseOutlineGeometry({center:new Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),scratchOptions$5={center:new Cartesian3,radius:void 0,ellipsoid:Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};CircleOutlineGeometry.unpack=function(e,t,i){return t=EllipseOutlineGeometry.unpack(e,t,scratchEllipseGeometry$1),scratchOptions$5.center=Cartesian3.clone(t._center,scratchOptions$5.center),scratchOptions$5.ellipsoid=Ellipsoid.clone(t._ellipsoid,scratchOptions$5.ellipsoid),scratchOptions$5.height=t._height,scratchOptions$5.extrudedHeight=t._extrudedHeight,scratchOptions$5.granularity=t._granularity,scratchOptions$5.numberOfVerticalLines=t._numberOfVerticalLines,defined(i)?(scratchOptions$5.semiMajorAxis=t._semiMajorAxis,scratchOptions$5.semiMinorAxis=t._semiMinorAxis,i._ellipseGeometry=new EllipseOutlineGeometry(scratchOptions$5),i):(scratchOptions$5.radius=t._semiMajorAxis,new CircleOutlineGeometry(scratchOptions$5))},CircleOutlineGeometry.createGeometry=function(e){return EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)};var ClockRange={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},ClockRange$1=Object.freeze(ClockRange),ClockStep={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},ClockStep$1=Object.freeze(ClockStep),getTimestamp,getTimestamp="undefined"!=typeof performance&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()},getTimestamp$1=getTimestamp,scratchArrayBuffer,scratchUint32Array,scratchUint8Array;function Clock(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).currentTime,i=e.startTime,r=e.stopTime;t=defined(t)?JulianDate.clone(t):defined(i)?JulianDate.clone(i):defined(r)?JulianDate.addDays(r,-1,new JulianDate):JulianDate.now(),i=defined(i)?JulianDate.clone(i):JulianDate.clone(t),r=defined(r)?JulianDate.clone(r):JulianDate.addDays(i,1,new JulianDate);this.startTime=i,this.stopTime=r,this.clockRange=defaultValue(e.clockRange,ClockRange$1.UNBOUNDED),this.canAnimate=defaultValue(e.canAnimate,!0),this.onTick=new Event,this.onStop=new Event,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=getTimestamp$1(),this.currentTime=t,this.multiplier=defaultValue(e.multiplier,1),this.shouldAnimate=defaultValue(e.shouldAnimate,!1),this.clockStep=defaultValue(e.clockStep,ClockStep$1.SYSTEM_CLOCK_MULTIPLIER)}function hue2rgb(e,t,i){return i<0&&(i+=1),1<i&&--i,6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function Color(e,t,i,r){this.red=defaultValue(e,1),this.green=defaultValue(t,1),this.blue=defaultValue(i,1),this.alpha=defaultValue(r,1)}Object.defineProperties(Clock.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){JulianDate.equals(this._currentTime,e)||(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===ClockStep$1.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=JulianDate.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),Clock.prototype.tick=function(){var e=getTimestamp$1(),t=JulianDate.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var i=this._clockStep;if(i===ClockStep$1.SYSTEM_CLOCK)t=JulianDate.now(t);else{var r=this._multiplier;t=i===ClockStep$1.TICK_DEPENDENT?JulianDate.addSeconds(t,r,t):(n=e-this._lastSystemTime,JulianDate.addSeconds(t,r*(n/1e3),t));var n=this.clockRange,a=this.startTime,o=this.stopTime;if(n===ClockRange$1.CLAMPED)JulianDate.lessThan(t,a)?t=JulianDate.clone(a,t):JulianDate.greaterThan(t,o)&&(t=JulianDate.clone(o,t),this.onStop.raiseEvent(this));else if(n===ClockRange$1.LOOP_STOP)for(JulianDate.lessThan(t,a)&&(t=JulianDate.clone(a,t));JulianDate.greaterThan(t,o);)t=JulianDate.addSeconds(a,JulianDate.secondsDifference(t,o),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t},Color.fromCartesian4=function(e,t){return defined(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new Color(e.x,e.y,e.z,e.w)},Color.fromBytes=function(e,t,i,r,n){return e=Color.byteToFloat(defaultValue(e,255)),t=Color.byteToFloat(defaultValue(t,255)),i=Color.byteToFloat(defaultValue(i,255)),r=Color.byteToFloat(defaultValue(r,255)),defined(n)?(n.red=e,n.green=t,n.blue=i,n.alpha=r,n):new Color(e,t,i,r)},Color.fromAlpha=function(e,t,i){return defined(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new Color(e.red,e.green,e.blue,t)},FeatureDetection.supportsTypedArrays()&&(scratchArrayBuffer=new ArrayBuffer(4),scratchUint32Array=new Uint32Array(scratchArrayBuffer),scratchUint8Array=new Uint8Array(scratchArrayBuffer)),Color.fromRgba=function(e,t){return scratchUint32Array[0]=e,Color.fromBytes(scratchUint8Array[0],scratchUint8Array[1],scratchUint8Array[2],scratchUint8Array[3],t)},Color.fromHsl=function(e,t,i,r,n){e=defaultValue(e,0)%1,t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,1);var a=i,o=i,s=i;return 0!==t&&(a=hue2rgb(t=2*i-(i=i<.5?i*(1+t):i+t-i*t),i,e+1/3),o=hue2rgb(t,i,e),s=hue2rgb(t,i,e-1/3)),defined(n)?(n.red=a,n.green=o,n.blue=s,n.alpha=r,n):new Color(a,o,s,r)},Color.fromRandom=function(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).red;defined(i)||(r=defaultValue(e.minimumRed,0),n=defaultValue(e.maximumRed,1),i=r+CesiumMath.nextRandomNumber()*(n-r));var r,n=e.green;defined(n)||(a=defaultValue(e.minimumGreen,0),r=defaultValue(e.maximumGreen,1),n=a+CesiumMath.nextRandomNumber()*(r-a));var a=e.blue;defined(a)||(o=defaultValue(e.minimumBlue,0),s=defaultValue(e.maximumBlue,1),a=o+CesiumMath.nextRandomNumber()*(s-o));var o,s=e.alpha;return defined(s)||(o=defaultValue(e.minimumAlpha,0),e=defaultValue(e.maximumAlpha,1),s=o+CesiumMath.nextRandomNumber()*(e-o)),defined(t)?(t.red=i,t.green=n,t.blue=a,t.alpha=s,t):new Color(i,n,a,s)};var rgbaMatcher=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,rrggbbaaMatcher=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,rgbParenthesesMatcher=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,hslParenthesesMatcher=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;function ColorGeometryInstanceAttribute(e,t,i,r){e=defaultValue(e,1),t=defaultValue(t,1),i=defaultValue(i,1),r=defaultValue(r,1),this.value=new Uint8Array([Color.floatToByte(e),Color.floatToByte(t),Color.floatToByte(i),Color.floatToByte(r)])}function CompressedTextureBuffer(e,t,i,r){this._format=e,this._width=t,this._height=i,this._buffer=r}Color.fromCssColorString=function(e,t){defined(t)||(t=new Color);var i=Color[(e=e.replace(/\s/g,"")).toUpperCase()];return defined(i)?(Color.clone(i,t),t):null!==(i=rgbaMatcher.exec(e))?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(defaultValue(i[4],"f"),16)/15,t):null!==(i=rrggbbaaMatcher.exec(e))?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(defaultValue(i[4],"ff"),16)/255,t):null!==(i=rgbParenthesesMatcher.exec(e))?(t.red=parseFloat(i[1])/("%"===i[1].substr(-1)?100:255),t.green=parseFloat(i[2])/("%"===i[2].substr(-1)?100:255),t.blue=parseFloat(i[3])/("%"===i[3].substr(-1)?100:255),t.alpha=parseFloat(defaultValue(i[4],"1.0")),t):null!==(i=hslParenthesesMatcher.exec(e))?Color.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(defaultValue(i[4],"1.0")),t):t=void 0},Color.packedLength=4,Color.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},Color.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Color),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},Color.byteToFloat=function(e){return e/255},Color.floatToByte=function(e){return 1===e?255:256*e|0},Color.clone=function(e,t){if(defined(e))return defined(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new Color(e.red,e.green,e.blue,e.alpha)},Color.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},Color.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},Color.prototype.clone=function(e){return Color.clone(this,e)},Color.prototype.equals=function(e){return Color.equals(this,e)},Color.prototype.equalsEpsilon=function(e,t){return this===e||defined(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},Color.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},Color.prototype.toCssColorString=function(){var e=Color.floatToByte(this.red),t=Color.floatToByte(this.green),i=Color.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},Color.prototype.toCssHexString=function(){var e=Color.floatToByte(this.red).toString(16);e.length<2&&(e="0"+e);var t=Color.floatToByte(this.green).toString(16);t.length<2&&(t="0"+t);var i=Color.floatToByte(this.blue).toString(16);if(i.length<2&&(i="0"+i),this.alpha<1){var r=Color.floatToByte(this.alpha).toString(16);return r.length<2&&(r="0"+r),"#"+e+t+i+r}return"#"+e+t+i},Color.prototype.toBytes=function(e){var t=Color.floatToByte(this.red),i=Color.floatToByte(this.green),r=Color.floatToByte(this.blue),n=Color.floatToByte(this.alpha);return defined(e)?(e[0]=t,e[1]=i,e[2]=r,e[3]=n,e):[t,i,r,n]},Color.prototype.toRgba=function(){return scratchUint8Array[0]=Color.floatToByte(this.red),scratchUint8Array[1]=Color.floatToByte(this.green),scratchUint8Array[2]=Color.floatToByte(this.blue),scratchUint8Array[3]=Color.floatToByte(this.alpha),scratchUint32Array[0]},Color.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},Color.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},Color.prototype.withAlpha=function(e,t){return Color.fromAlpha(this,e,t)},Color.add=function(e,t,i){return i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},Color.subtract=function(e,t,i){return i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},Color.multiply=function(e,t,i){return i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},Color.divide=function(e,t,i){return i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},Color.mod=function(e,t,i){return i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},Color.lerp=function(e,t,i,r){return r.red=CesiumMath.lerp(e.red,t.red,i),r.green=CesiumMath.lerp(e.green,t.green,i),r.blue=CesiumMath.lerp(e.blue,t.blue,i),r.alpha=CesiumMath.lerp(e.alpha,t.alpha,i),r},Color.multiplyByScalar=function(e,t,i){return i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},Color.divideByScalar=function(e,t,i){return i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},Color.ALICEBLUE=Object.freeze(Color.fromCssColorString("#F0F8FF")),Color.ANTIQUEWHITE=Object.freeze(Color.fromCssColorString("#FAEBD7")),Color.AQUA=Object.freeze(Color.fromCssColorString("#00FFFF")),Color.AQUAMARINE=Object.freeze(Color.fromCssColorString("#7FFFD4")),Color.AZURE=Object.freeze(Color.fromCssColorString("#F0FFFF")),Color.BEIGE=Object.freeze(Color.fromCssColorString("#F5F5DC")),Color.BISQUE=Object.freeze(Color.fromCssColorString("#FFE4C4")),Color.BLACK=Object.freeze(Color.fromCssColorString("#000000")),Color.BLANCHEDALMOND=Object.freeze(Color.fromCssColorString("#FFEBCD")),Color.BLUE=Object.freeze(Color.fromCssColorString("#0000FF")),Color.BLUEVIOLET=Object.freeze(Color.fromCssColorString("#8A2BE2")),Color.BROWN=Object.freeze(Color.fromCssColorString("#A52A2A")),Color.BURLYWOOD=Object.freeze(Color.fromCssColorString("#DEB887")),Color.CADETBLUE=Object.freeze(Color.fromCssColorString("#5F9EA0")),Color.CHARTREUSE=Object.freeze(Color.fromCssColorString("#7FFF00")),Color.CHOCOLATE=Object.freeze(Color.fromCssColorString("#D2691E")),Color.CORAL=Object.freeze(Color.fromCssColorString("#FF7F50")),Color.CORNFLOWERBLUE=Object.freeze(Color.fromCssColorString("#6495ED")),Color.CORNSILK=Object.freeze(Color.fromCssColorString("#FFF8DC")),Color.CRIMSON=Object.freeze(Color.fromCssColorString("#DC143C")),Color.CYAN=Object.freeze(Color.fromCssColorString("#00FFFF")),Color.DARKBLUE=Object.freeze(Color.fromCssColorString("#00008B")),Color.DARKCYAN=Object.freeze(Color.fromCssColorString("#008B8B")),Color.DARKGOLDENROD=Object.freeze(Color.fromCssColorString("#B8860B")),Color.DARKGRAY=Object.freeze(Color.fromCssColorString("#A9A9A9")),Color.DARKGREEN=Object.freeze(Color.fromCssColorString("#006400")),Color.DARKGREY=Color.DARKGRAY,Color.DARKKHAKI=Object.freeze(Color.fromCssColorString("#BDB76B")),Color.DARKMAGENTA=Object.freeze(Color.fromCssColorString("#8B008B")),Color.DARKOLIVEGREEN=Object.freeze(Color.fromCssColorString("#556B2F")),Color.DARKORANGE=Object.freeze(Color.fromCssColorString("#FF8C00")),Color.DARKORCHID=Object.freeze(Color.fromCssColorString("#9932CC")),Color.DARKRED=Object.freeze(Color.fromCssColorString("#8B0000")),Color.DARKSALMON=Object.freeze(Color.fromCssColorString("#E9967A")),Color.DARKSEAGREEN=Object.freeze(Color.fromCssColorString("#8FBC8F")),Color.DARKSLATEBLUE=Object.freeze(Color.fromCssColorString("#483D8B")),Color.DARKSLATEGRAY=Object.freeze(Color.fromCssColorString("#2F4F4F")),Color.DARKSLATEGREY=Color.DARKSLATEGRAY,Color.DARKTURQUOISE=Object.freeze(Color.fromCssColorString("#00CED1")),Color.DARKVIOLET=Object.freeze(Color.fromCssColorString("#9400D3")),Color.DEEPPINK=Object.freeze(Color.fromCssColorString("#FF1493")),Color.DEEPSKYBLUE=Object.freeze(Color.fromCssColorString("#00BFFF")),Color.DIMGRAY=Object.freeze(Color.fromCssColorString("#696969")),Color.DIMGREY=Color.DIMGRAY,Color.DODGERBLUE=Object.freeze(Color.fromCssColorString("#1E90FF")),Color.FIREBRICK=Object.freeze(Color.fromCssColorString("#B22222")),Color.FLORALWHITE=Object.freeze(Color.fromCssColorString("#FFFAF0")),Color.FORESTGREEN=Object.freeze(Color.fromCssColorString("#228B22")),Color.FUCHSIA=Object.freeze(Color.fromCssColorString("#FF00FF")),Color.GAINSBORO=Object.freeze(Color.fromCssColorString("#DCDCDC")),Color.GHOSTWHITE=Object.freeze(Color.fromCssColorString("#F8F8FF")),Color.GOLD=Object.freeze(Color.fromCssColorString("#FFD700")),Color.GOLDENROD=Object.freeze(Color.fromCssColorString("#DAA520")),Color.GRAY=Object.freeze(Color.fromCssColorString("#808080")),Color.GREEN=Object.freeze(Color.fromCssColorString("#008000")),Color.GREENYELLOW=Object.freeze(Color.fromCssColorString("#ADFF2F")),Color.GREY=Color.GRAY,Color.HONEYDEW=Object.freeze(Color.fromCssColorString("#F0FFF0")),Color.HOTPINK=Object.freeze(Color.fromCssColorString("#FF69B4")),Color.INDIANRED=Object.freeze(Color.fromCssColorString("#CD5C5C")),Color.INDIGO=Object.freeze(Color.fromCssColorString("#4B0082")),Color.IVORY=Object.freeze(Color.fromCssColorString("#FFFFF0")),Color.KHAKI=Object.freeze(Color.fromCssColorString("#F0E68C")),Color.LAVENDER=Object.freeze(Color.fromCssColorString("#E6E6FA")),Color.LAVENDAR_BLUSH=Object.freeze(Color.fromCssColorString("#FFF0F5")),Color.LAWNGREEN=Object.freeze(Color.fromCssColorString("#7CFC00")),Color.LEMONCHIFFON=Object.freeze(Color.fromCssColorString("#FFFACD")),Color.LIGHTBLUE=Object.freeze(Color.fromCssColorString("#ADD8E6")),Color.LIGHTCORAL=Object.freeze(Color.fromCssColorString("#F08080")),Color.LIGHTCYAN=Object.freeze(Color.fromCssColorString("#E0FFFF")),Color.LIGHTGOLDENRODYELLOW=Object.freeze(Color.fromCssColorString("#FAFAD2")),Color.LIGHTGRAY=Object.freeze(Color.fromCssColorString("#D3D3D3")),Color.LIGHTGREEN=Object.freeze(Color.fromCssColorString("#90EE90")),Color.LIGHTGREY=Color.LIGHTGRAY,Color.LIGHTPINK=Object.freeze(Color.fromCssColorString("#FFB6C1")),Color.LIGHTSEAGREEN=Object.freeze(Color.fromCssColorString("#20B2AA")),Color.LIGHTSKYBLUE=Object.freeze(Color.fromCssColorString("#87CEFA")),Color.LIGHTSLATEGRAY=Object.freeze(Color.fromCssColorString("#778899")),Color.LIGHTSLATEGREY=Color.LIGHTSLATEGRAY,Color.LIGHTSTEELBLUE=Object.freeze(Color.fromCssColorString("#B0C4DE")),Color.LIGHTYELLOW=Object.freeze(Color.fromCssColorString("#FFFFE0")),Color.LIME=Object.freeze(Color.fromCssColorString("#00FF00")),Color.LIMEGREEN=Object.freeze(Color.fromCssColorString("#32CD32")),Color.LINEN=Object.freeze(Color.fromCssColorString("#FAF0E6")),Color.MAGENTA=Object.freeze(Color.fromCssColorString("#FF00FF")),Color.MAROON=Object.freeze(Color.fromCssColorString("#800000")),Color.MEDIUMAQUAMARINE=Object.freeze(Color.fromCssColorString("#66CDAA")),Color.MEDIUMBLUE=Object.freeze(Color.fromCssColorString("#0000CD")),Color.MEDIUMORCHID=Object.freeze(Color.fromCssColorString("#BA55D3")),Color.MEDIUMPURPLE=Object.freeze(Color.fromCssColorString("#9370DB")),Color.MEDIUMSEAGREEN=Object.freeze(Color.fromCssColorString("#3CB371")),Color.MEDIUMSLATEBLUE=Object.freeze(Color.fromCssColorString("#7B68EE")),Color.MEDIUMSPRINGGREEN=Object.freeze(Color.fromCssColorString("#00FA9A")),Color.MEDIUMTURQUOISE=Object.freeze(Color.fromCssColorString("#48D1CC")),Color.MEDIUMVIOLETRED=Object.freeze(Color.fromCssColorString("#C71585")),Color.MIDNIGHTBLUE=Object.freeze(Color.fromCssColorString("#191970")),Color.MINTCREAM=Object.freeze(Color.fromCssColorString("#F5FFFA")),Color.MISTYROSE=Object.freeze(Color.fromCssColorString("#FFE4E1")),Color.MOCCASIN=Object.freeze(Color.fromCssColorString("#FFE4B5")),Color.NAVAJOWHITE=Object.freeze(Color.fromCssColorString("#FFDEAD")),Color.NAVY=Object.freeze(Color.fromCssColorString("#000080")),Color.OLDLACE=Object.freeze(Color.fromCssColorString("#FDF5E6")),Color.OLIVE=Object.freeze(Color.fromCssColorString("#808000")),Color.OLIVEDRAB=Object.freeze(Color.fromCssColorString("#6B8E23")),Color.ORANGE=Object.freeze(Color.fromCssColorString("#FFA500")),Color.ORANGERED=Object.freeze(Color.fromCssColorString("#FF4500")),Color.ORCHID=Object.freeze(Color.fromCssColorString("#DA70D6")),Color.PALEGOLDENROD=Object.freeze(Color.fromCssColorString("#EEE8AA")),Color.PALEGREEN=Object.freeze(Color.fromCssColorString("#98FB98")),Color.PALETURQUOISE=Object.freeze(Color.fromCssColorString("#AFEEEE")),Color.PALEVIOLETRED=Object.freeze(Color.fromCssColorString("#DB7093")),Color.PAPAYAWHIP=Object.freeze(Color.fromCssColorString("#FFEFD5")),Color.PEACHPUFF=Object.freeze(Color.fromCssColorString("#FFDAB9")),Color.PERU=Object.freeze(Color.fromCssColorString("#CD853F")),Color.PINK=Object.freeze(Color.fromCssColorString("#FFC0CB")),Color.PLUM=Object.freeze(Color.fromCssColorString("#DDA0DD")),Color.POWDERBLUE=Object.freeze(Color.fromCssColorString("#B0E0E6")),Color.PURPLE=Object.freeze(Color.fromCssColorString("#800080")),Color.RED=Object.freeze(Color.fromCssColorString("#FF0000")),Color.ROSYBROWN=Object.freeze(Color.fromCssColorString("#BC8F8F")),Color.ROYALBLUE=Object.freeze(Color.fromCssColorString("#4169E1")),Color.SADDLEBROWN=Object.freeze(Color.fromCssColorString("#8B4513")),Color.SALMON=Object.freeze(Color.fromCssColorString("#FA8072")),Color.SANDYBROWN=Object.freeze(Color.fromCssColorString("#F4A460")),Color.SEAGREEN=Object.freeze(Color.fromCssColorString("#2E8B57")),Color.SEASHELL=Object.freeze(Color.fromCssColorString("#FFF5EE")),Color.SIENNA=Object.freeze(Color.fromCssColorString("#A0522D")),Color.SILVER=Object.freeze(Color.fromCssColorString("#C0C0C0")),Color.SKYBLUE=Object.freeze(Color.fromCssColorString("#87CEEB")),Color.SLATEBLUE=Object.freeze(Color.fromCssColorString("#6A5ACD")),Color.SLATEGRAY=Object.freeze(Color.fromCssColorString("#708090")),Color.SLATEGREY=Color.SLATEGRAY,Color.SNOW=Object.freeze(Color.fromCssColorString("#FFFAFA")),Color.SPRINGGREEN=Object.freeze(Color.fromCssColorString("#00FF7F")),Color.STEELBLUE=Object.freeze(Color.fromCssColorString("#4682B4")),Color.TAN=Object.freeze(Color.fromCssColorString("#D2B48C")),Color.TEAL=Object.freeze(Color.fromCssColorString("#008080")),Color.THISTLE=Object.freeze(Color.fromCssColorString("#D8BFD8")),Color.TOMATO=Object.freeze(Color.fromCssColorString("#FF6347")),Color.TURQUOISE=Object.freeze(Color.fromCssColorString("#40E0D0")),Color.VIOLET=Object.freeze(Color.fromCssColorString("#EE82EE")),Color.WHEAT=Object.freeze(Color.fromCssColorString("#F5DEB3")),Color.WHITE=Object.freeze(Color.fromCssColorString("#FFFFFF")),Color.WHITESMOKE=Object.freeze(Color.fromCssColorString("#F5F5F5")),Color.YELLOW=Object.freeze(Color.fromCssColorString("#FFFF00")),Color.YELLOWGREEN=Object.freeze(Color.fromCssColorString("#9ACD32")),Color.TRANSPARENT=Object.freeze(new Color(0,0,0,0)),Object.defineProperties(ColorGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),ColorGeometryInstanceAttribute.fromColor=function(e){return new ColorGeometryInstanceAttribute(e.red,e.green,e.blue,e.alpha)},ColorGeometryInstanceAttribute.toValue=function(e,t){return defined(t)?e.toBytes(t):new Uint8Array(e.toBytes())},ColorGeometryInstanceAttribute.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},Object.defineProperties(CompressedTextureBuffer.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}}),CompressedTextureBuffer.clone=function(e){if(defined(e))return new CompressedTextureBuffer(e._format,e._width,e._height,e._buffer)},CompressedTextureBuffer.prototype.clone=function(){return CompressedTextureBuffer.clone(this)};var removeDuplicatesEpsilon=CesiumMath.EPSILON10;function arrayRemoveDuplicates(e,t,i){if(defined(e)){i=defaultValue(i,!1);var r,n,a,o=e.length;if(o<2)return e;for(r=1;r<o&&!t(n=e[r-1],a=e[r],removeDuplicatesEpsilon);++r);if(r===o)return i&&t(e[0],e[e.length-1],removeDuplicatesEpsilon)?e.slice(1):e;for(var s=e.slice(0,r);r<o;++r)t(n,a=e[r],removeDuplicatesEpsilon)||(s.push(a),n=a);return i&&1<s.length&&t(s[0],s[s.length-1],removeDuplicatesEpsilon)&&s.shift(),s}}var CoplanarPolygonGeometryLibrary={},scratchIntersectionPoint=new Cartesian3,scratchXAxis=new Cartesian3,scratchYAxis=new Cartesian3,scratchZAxis=new Cartesian3,obbScratch=new OrientedBoundingBox;function projectTo2D(e,t,i,r,n){return t=Cartesian3.subtract(e,t,scratchIntersectionPoint),i=Cartesian3.dot(i,t),t=Cartesian3.dot(r,t),Cartesian2.fromElements(i,t,n)}function calculateM(e,t,i){if(0===e)return t*i;var r=e*e,n=r*r,a=n*r,o=a*r,s=o*r;return t*((1-r/4-3*n/64-5*a/256-175*o/16384-441*s/65536-4851*(e=s*r)/1048576)*(i=i)-(3*r/8+3*n/32+45*a/1024+105*o/4096+2205*s/131072+6237*e/524288)*Math.sin(2*i)+(15*n/256+45*a/1024+525*o/16384+1575*s/65536+155925*e/8388608)*Math.sin(4*i)-(35*a/3072+175*o/12288+3675*s/262144+13475*e/1048576)*Math.sin(6*i)+(315*o/131072+2205*s/524288+43659*e/8388608)*Math.sin(8*i)-(693*s/1310720+6237*e/5242880)*Math.sin(10*i)+1001*e/8388608*Math.sin(12*i))}function calculateInverseM(e,t,i){var r=e/i;if(0===t)return r;var n=r*r,a=n*r,o=a*r,s=t*t,l=s*s,c=l*s,u=c*s,d=u*s,h=d*s,p=Math.sin(2*r),f=Math.cos(2*r),m=Math.sin(4*r),g=Math.cos(4*r),y=Math.sin(6*r),_=Math.cos(6*r);e=Math.sin(8*r),i=Math.cos(8*r),t=Math.sin(10*r);return r+r*s/4+7*r*l/64+15*r*c/256+579*r*u/16384+1515*r*d/65536+16837*r*h/1048576+(3*r*l/16+45*r*c/256-r*(32*n-561)*u/4096-r*(232*n-1677)*d/16384+r*(399985-90560*n+512*o)*h/5242880)*f+(21*r*c/256+483*r*u/4096-r*(224*n-1969)*d/16384-r*(33152*n-112599)*h/1048576)*g+(151*r*u/4096+4681*r*d/65536+1479*r*h/16384-453*a*h/32768)*_+(1097*r*d/65536+42783*r*h/1048576)*i+8011*r*h/1048576*Math.cos(10*r)+(3*s/8+3*l/16+213*c/2048-3*n*c/64+255*u/4096-33*n*u/512+20861*d/524288-33*n*d/512+o*d/1024+28273*h/1048576-471*n*h/8192+9*o*h/4096)*p+(21*l/256+21*c/256+533*u/8192-21*n*u/512+197*d/4096-315*n*d/4096+584039*h/16777216-12517*n*h/131072+7*o*h/2048)*m+(151*c/6144+151*u/4096+5019*d/131072-453*n*d/16384+26965*h/786432-8607*n*h/131072)*y+(1097*u/131072+1097*d/65536+225797*h/10485760-1097*n*h/65536)*e+(8011*d/2621440+8011*h/1048576)*t+293393*h/251658240*Math.sin(12*r)}function calculateSigma(e,t){if(0===e)return Math.log(Math.tan(.5*(CesiumMath.PI_OVER_TWO+t)));var i=e*Math.sin(t);return Math.log(Math.tan(.5*(CesiumMath.PI_OVER_TWO+t)))-e/2*Math.log((1+i)/(1-i))}function calculateHeading(e,t,i,r,n){return i=calculateSigma(e._ellipticity,i),n=calculateSigma(e._ellipticity,n),Math.atan2(CesiumMath.negativePiToPi(r-t),n-i)}function calculateArcLength(e,t,i,r,n,a,o){var s=e._heading;a-=r,r=0;return r=CesiumMath.equalsEpsilon(Math.abs(s),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8)?t===i?t*Math.cos(n)*CesiumMath.negativePiToPi(a):(i=Math.sin(n),t*Math.cos(n)*CesiumMath.negativePiToPi(a)/Math.sqrt(1-e._ellipticitySquared*i*i)):(n=calculateM(e._ellipticity,t,n),(calculateM(e._ellipticity,t,o)-n)/Math.cos(s)),Math.abs(r)}CoplanarPolygonGeometryLibrary.validOutline=function(e){var t=OrientedBoundingBox.fromPoints(e,obbScratch).halfAxes,i=Matrix3.getColumn(t,0,scratchXAxis);e=Matrix3.getColumn(t,1,scratchYAxis),t=Matrix3.getColumn(t,2,scratchZAxis),i=Cartesian3.magnitude(i),e=Cartesian3.magnitude(e),t=Cartesian3.magnitude(t);return!(0===i&&(0===e||0===t)||0===e&&0===t)},CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments=function(e,t,i,r){var n,a,o=OrientedBoundingBox.fromPoints(e,obbScratch),s=o.halfAxes,l=Matrix3.getColumn(s,0,scratchXAxis),c=Matrix3.getColumn(s,1,scratchYAxis),u=Matrix3.getColumn(s,2,scratchZAxis),d=Cartesian3.magnitude(l),h=Cartesian3.magnitude(c);e=Cartesian3.magnitude(u),s=Math.min(d,h,e);return(0!==d||0!==h&&0!==e)&&(0!==h||0!==e)&&(s!==h&&s!==e||(n=l),s===d?n=c:s===e&&(a=c),s!==d&&s!==h||(a=u),Cartesian3.normalize(n,i),Cartesian3.normalize(a,r),Cartesian3.clone(o.center,t),!0)},CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction=function(e,t,i){return function(r){for(var n=new Array(r.length),a=0;a<r.length;a++)n[a]=projectTo2D(r[a],e,t,i);return n}},CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction=function(e,t,i){return function(r,n){return projectTo2D(r,e,t,i,n)}};var scratchCart1=new Cartesian3,scratchCart2=new Cartesian3;function computeProperties(e,t,i,r){Cartesian3.normalize(r.cartographicToCartesian(t,scratchCart2),scratchCart1),Cartesian3.normalize(r.cartographicToCartesian(i,scratchCart2),scratchCart2);var n=(n=r.maximumRadius)*n,a=(a=r.minimumRadius)*a;e._ellipticitySquared=(n-a)/n,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=Cartographic.clone(t,e._start),e._start.height=0,e._end=Cartographic.clone(i,e._end),e._end.height=0,e._heading=calculateHeading(e,t.longitude,t.latitude,i.longitude,i.latitude),e._distance=calculateArcLength(e,r.maximumRadius,r.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude)}function interpolateUsingSurfaceDistance(e,t,i,r,n,a){var o,s,l,c=n*n;return l=Math.abs(CesiumMath.PI_OVER_TWO-Math.abs(t))>CesiumMath.EPSILON8?(o=calculateInverseM(calculateM(n,r,e.latitude)+i*Math.cos(t),n,r),l=calculateSigma(n,e.latitude),s=calculateSigma(n,o),l=Math.tan(t)*(s-l),CesiumMath.negativePiToPi(e.longitude+l)):(o=e.latitude,l=i/(0===n?r*Math.cos(e.latitude):(n=Math.sin(e.latitude),r*Math.cos(e.latitude)/Math.sqrt(1-c*n*n))),0<t?CesiumMath.negativePiToPi(e.longitude+l):CesiumMath.negativePiToPi(e.longitude-l)),defined(a)?(a.longitude=l,a.latitude=o,a.height=0,a):new Cartographic(l,o,0)}function EllipsoidRhumbLine(e,t,i){i=defaultValue(i,Ellipsoid.WGS84),this._ellipsoid=i,this._start=new Cartographic,this._end=new Cartographic,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,defined(e)&&defined(t)&&computeProperties(this,e,t,i)}function earcut(e,t,i){i=i||2;var r,n,a,o,s,l,c,u=t&&t.length,d=u?t[0]*i:e.length,h=linkedList(e,0,d,i,!0),p=[];if(!h||h.next===h.prev)return p;if(u&&(h=eliminateHoles(e,t,h,i)),e.length>80*i){r=a=e[0],n=o=e[1];for(var f=i;f<d;f+=i)(s=e[f])<r&&(r=s),(l=e[f+1])<n&&(n=l),a<s&&(a=s),o<l&&(o=l);c=0!==(c=Math.max(a-r,o-n))?1/c:0}return earcutLinked(h,p,i,r,n,c),p}function linkedList(e,t,i,r,n){var a,o;if(n===0<signedArea(e,t,i,r))for(a=t;a<i;a+=r)o=insertNode(a,e[a],e[a+1],o);else for(a=i-r;t<=a;a-=r)o=insertNode(a,e[a],e[a+1],o);return o&&equals(o,o.next)&&(removeNode(o),o=o.next),o}function filterPoints(e,t){if(!e)return e;t=t||e;var i,r=e;do{if(i=!1,r.steiner||!equals(r,r.next)&&0!==area(r.prev,r,r.next))r=r.next;else{if(removeNode(r),(r=t=r.prev)===r.next)break;i=!0}}while(i||r!==t);return t}function earcutLinked(e,t,i,r,n,a,o){if(e){!o&&a&&indexCurve(e,r,n,a);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?isEarHashed(e,r,n,a):isEar(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),removeNode(e),e=l.next,c=l.next;else if((e=l)===c){o?1===o?earcutLinked(e=cureLocalIntersections(filterPoints(e),t,i),t,i,r,n,a,2):2===o&&splitEarcut(e,t,i,r,n,a):earcutLinked(filterPoints(e),t,i,r,n,a,1);break}}}function isEar(e){var t=e.prev,i=e,r=e.next;if(!(0<=area(t,i,r))){for(var n=e.next.next;n!==e.prev;){if(pointInTriangle(t.x,t.y,i.x,i.y,r.x,r.y,n.x,n.y)&&0<=area(n.prev,n,n.next))return;n=n.next}return 1}}function isEarHashed(e,t,i,r){var n=e.prev,a=e,o=e.next;if(!(0<=area(n,a,o))){for(var s=(n.x<a.x?n.x<o.x?n:o:a.x<o.x?a:o).x,l=(n.y<a.y?n.y<o.y?n:o:a.y<o.y?a:o).y,c=(n.x>a.x?n.x>o.x?n:o:a.x>o.x?a:o).x,u=(n.y>a.y?n.y>o.y?n:o:a.y>o.y?a:o).y,d=zOrder(s,l,t,i,r),h=zOrder(c,u,t,i,r),p=e.prevZ,f=e.nextZ;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&pointInTriangle(n.x,n.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=area(p.prev,p,p.next))return;if(p=p.prevZ,f!==e.prev&&f!==e.next&&pointInTriangle(n.x,n.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=area(f.prev,f,f.next))return;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&pointInTriangle(n.x,n.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=area(p.prev,p,p.next))return;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&pointInTriangle(n.x,n.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=area(f.prev,f,f.next))return;f=f.nextZ}return 1}}function cureLocalIntersections(e,t,i){var r=e;do{var n=r.prev,a=r.next.next;!equals(n,a)&&intersects(n,r,r.next,a)&&locallyInside(n,a)&&locallyInside(a,n)&&(t.push(n.i/i),t.push(r.i/i),t.push(a.i/i),removeNode(r),removeNode(r.next),r=e=a),r=r.next}while(r!==e);return filterPoints(r)}function splitEarcut(e,t,i,r,n,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&isValidDiagonal(o,s)){var l=splitPolygon(o,s);o=filterPoints(o,o.next),l=filterPoints(l,l.next);return earcutLinked(o,t,i,r,n,a),void earcutLinked(l,t,i,r,n,a)}s=s.next}o=o.next}while(o!==e)}function eliminateHoles(e,t,i,r){for(var n,a=[],o=0,s=t.length;o<s;o++)(n=linkedList(e,t[o]*r,o<s-1?t[o+1]*r:e.length,r,!1))===n.next&&(n.steiner=!0),a.push(getLeftmost(n));for(a.sort(compareX),o=0;o<a.length;o++)eliminateHole(a[o],i),i=filterPoints(i,i.next);return i}function compareX(e,t){return e.x-t.x}function eliminateHole(e,t){(t=findHoleBridge(e,t))&&filterPoints(e=splitPolygon(t,e),e.next)}function findHoleBridge(e,t){var i,r=t,n=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&o<s){if((o=s)===n){if(a===r.y)return r;if(a===r.next.y)return r.next}i=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!i)return null;if(n===o)return i;var l,c=i,u=i.x,d=i.y,h=1/0;for(r=i;n>=r.x&&r.x>=u&&n!==r.x&&pointInTriangle(a<d?n:o,a,u,d,a<d?o:n,a,r.x,r.y)&&(l=Math.abs(a-r.y)/(n-r.x),locallyInside(r,e)&&(l<h||l===h&&(r.x>i.x||r.x===i.x&&sectorContainsSector(i,r)))&&(i=r,h=l)),(r=r.next)!==c;);return i}function sectorContainsSector(e,t){return area(e.prev,e,t.prev)<0&&area(t.next,e,e.next)<0}function indexCurve(e,t,i,r){for(var n=e;null===n.z&&(n.z=zOrder(n.x,n.y,t,i,r)),n.prevZ=n.prev,n.nextZ=n.next,(n=n.next)!==e;);n.prevZ.nextZ=null,n.prevZ=null,sortLinked(n)}function sortLinked(e){var t,i,r,n,a,o,s,l,c=1;do{for(i=e,a=e=null,o=0;i;){for(o++,r=i,t=s=0;t<c&&(s++,r=r.nextZ);t++);for(l=c;0<s||0<l&&r;)0!==s&&(0===l||!r||i.z<=r.z)?(i=(n=i).nextZ,s--):(r=(n=r).nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;i=r}a.nextZ=null,c*=2}while(1<o);return e}function zOrder(e,t,i,r,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function getLeftmost(e){for(var t=e,i=e;(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),(t=t.next)!==e;);return i}function pointInTriangle(e,t,i,r,n,a,o,s){return 0<=(n-o)*(t-s)-(e-o)*(a-s)&&0<=(e-o)*(r-s)-(i-o)*(t-s)&&0<=(i-o)*(a-s)-(n-o)*(r-s)}function isValidDiagonal(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!intersectsPolygon(e,t)&&(locallyInside(e,t)&&locallyInside(t,e)&&middleInside(e,t)&&(area(e.prev,e,t.prev)||area(e,t.prev,t))||equals(e,t)&&0<area(e.prev,e,e.next)&&0<area(t.prev,t,t.next))}function area(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function equals(e,t){return e.x===t.x&&e.y===t.y}function intersects(e,t,i,r){var n=sign(area(e,t,i)),a=sign(area(e,t,r)),o=sign(area(i,r,e)),s=sign(area(i,r,t));return n!==a&&o!==s||0===n&&onSegment(e,i,t)||0===a&&onSegment(e,r,t)||0===o&&onSegment(i,e,r)||!(0!==s||!onSegment(i,t,r))}function onSegment(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function sign(e){return 0<e?1:e<0?-1:0}function intersectsPolygon(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&intersects(i,i.next,e,t))return 1;i=i.next}while(i!==e)}function locallyInside(e,t){return area(e.prev,e,e.next)<0?0<=area(e,t,e.next)&&0<=area(e,e.prev,t):area(e,t,e.prev)<0||area(e,e.next,t)<0}function middleInside(e,t){for(var i=e,r=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;i.y>a!=i.next.y>a&&i.next.y!==i.y&&n<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(r=!r),(i=i.next)!==e;);return r}function splitPolygon(e,t){var i=new Node$1(e.i,e.x,e.y),r=new Node$1(t.i,t.x,t.y),n=e.next,a=t.prev;return(e.next=t).prev=e,(i.next=n).prev=i,(r.next=i).prev=r,(a.next=r).prev=a,r}function insertNode(e,t,i,r){return i=new Node$1(e,t,i),r?(i.next=r.next,(i.prev=r).next.prev=i,r.next=i):(i.prev=i).next=i,i}function removeNode(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Node$1(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function signedArea(e,t,i,r){for(var n=0,a=t,o=i-r;a<i;a+=r)n+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return n}Object.defineProperties(EllipsoidRhumbLine.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}}),EllipsoidRhumbLine.fromStartHeadingDistance=function(e,t,i,r,n){var a=defaultValue(r,Ellipsoid.WGS84),o=(o=a.maximumRadius)*o,s=(s=a.minimumRadius)*s;o=Math.sqrt((o-s)/o),o=interpolateUsingSurfaceDistance(e,t=CesiumMath.negativePiToPi(t),i,a.maximumRadius,o);return!defined(n)||defined(r)&&!r.equals(n.ellipsoid)?new EllipsoidRhumbLine(e,o,a):(n.setEndPoints(e,o),n)},EllipsoidRhumbLine.prototype.setEndPoints=function(e,t){computeProperties(this,e,t,this._ellipsoid)},EllipsoidRhumbLine.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance=function(e,t){return interpolateUsingSurfaceDistance(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},EllipsoidRhumbLine.prototype.findIntersectionWithLongitude=function(e,t){var i=this._ellipticity,r=this._heading,n=Math.abs(r),a=this._start;if(e=CesiumMath.negativePiToPi(e),CesiumMath.equalsEpsilon(Math.abs(e),Math.PI,CesiumMath.EPSILON14)&&(e=CesiumMath.sign(a.longitude)*Math.PI),defined(t)||(t=new Cartographic),Math.abs(CesiumMath.PI_OVER_TWO-n)<=CesiumMath.EPSILON8)return t.longitude=e,t.latitude=a.latitude,t.height=0,t;if(CesiumMath.equalsEpsilon(Math.abs(CesiumMath.PI_OVER_TWO-n),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8)){if(CesiumMath.equalsEpsilon(e,a.longitude,CesiumMath.EPSILON12))return;return t.longitude=e,t.latitude=CesiumMath.PI_OVER_TWO*CesiumMath.sign(CesiumMath.PI_OVER_TWO-r),t.height=0,t}var o,s=a.latitude,l=(n=i*Math.sin(s),Math.tan(.5*(CesiumMath.PI_OVER_TWO+s))*Math.exp((e-a.longitude)/Math.tan(r))),c=(1+n)/(1-n),u=a.latitude;do{o=u;var d=(1+(d=i*Math.sin(o)))/(1-d);u=2*Math.atan(l*Math.pow(d/c,i/2))-CesiumMath.PI_OVER_TWO}while(!CesiumMath.equalsEpsilon(u,o,CesiumMath.EPSILON12));return t.longitude=e,t.latitude=u,t.height=0,t},EllipsoidRhumbLine.prototype.findIntersectionWithLatitude=function(e,t){var i=this._ellipticity,r=this._heading,n=this._start;if(!CesiumMath.equalsEpsilon(Math.abs(r),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8)){var a=calculateSigma(i,n.latitude);i=calculateSigma(i,e),a=Math.tan(r)*(i-a),a=CesiumMath.negativePiToPi(n.longitude+a);return defined(t)?(t.longitude=a,t.latitude=e,t.height=0,t):new Cartographic(a,e,0)}},earcut.deviation=function(e,t,i,r){var n=t&&t.length,a=n?t[0]*i:e.length,o=Math.abs(signedArea(e,0,a,i));if(n)for(var s=0,l=t.length;s<l;s++){var c=t[s]*i,u=s<l-1?t[s+1]*i:e.length;o-=Math.abs(signedArea(e,c,u,i))}var d=0;for(s=0;s<r.length;s+=3){var h=r[s]*i,p=r[s+1]*i,f=r[s+2]*i;d+=Math.abs((e[h]-e[f])*(e[1+p]-e[1+h])-(e[h]-e[p])*(e[1+f]-e[1+h]))}return 0===o&&0===d?0:Math.abs((d-o)/o)},earcut.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},r=0,n=0;n<e.length;n++){for(var a=0;a<e[n].length;a++)for(var o=0;o<t;o++)i.vertices.push(e[n][a][o]);0<n&&(r+=e[n-1].length,i.holes.push(r))}return i};var WindingOrder={CLOCKWISE:WebGLConstants$1.CW,COUNTER_CLOCKWISE:WebGLConstants$1.CCW,validate:function(e){return e===WindingOrder.CLOCKWISE||e===WindingOrder.COUNTER_CLOCKWISE}},WindingOrder$1=Object.freeze(WindingOrder),scaleToGeodeticHeightN=new Cartesian3,scaleToGeodeticHeightP=new Cartesian3,PolygonPipeline={computeArea2D:function(e){for(var t=e.length,i=0,r=t-1,n=0;n<t;r=n++){var a=e[r],o=e[n];i+=a.x*o.y-o.x*a.y}return.5*i},computeWindingOrder2D:function(e){return 0<PolygonPipeline.computeArea2D(e)?WindingOrder$1.COUNTER_CLOCKWISE:WindingOrder$1.CLOCKWISE},triangulate:function(e,t){return earcut(Cartesian2.packArray(e),t,2)}},subdivisionV0Scratch=new Cartesian3,subdivisionV1Scratch=new Cartesian3,subdivisionV2Scratch=new Cartesian3,subdivisionS0Scratch=new Cartesian3,subdivisionS1Scratch=new Cartesian3,subdivisionS2Scratch=new Cartesian3,subdivisionMidScratch=new Cartesian3;PolygonPipeline.computeSubdivision=function(e,t,i,r){r=defaultValue(r,CesiumMath.RADIANS_PER_DEGREE);for(var n=i.slice(0),a=t.length,o=new Array(3*a),s=0,l=0;l<a;l++){var c=t[l];o[s++]=c.x,o[s++]=c.y,o[s++]=c.z}for(var u=[],d={},h=e.maximumRadius,p=(r=CesiumMath.chordLength(r,h))*r;0<n.length;){var f,m,g=n.pop(),y=n.pop(),_=n.pop(),v=Cartesian3.fromArray(o,3*_,subdivisionV0Scratch),C=Cartesian3.fromArray(o,3*y,subdivisionV1Scratch),x=Cartesian3.fromArray(o,3*g,subdivisionV2Scratch),b=Cartesian3.multiplyByScalar(Cartesian3.normalize(v,subdivisionS0Scratch),h,subdivisionS0Scratch),S=Cartesian3.multiplyByScalar(Cartesian3.normalize(C,subdivisionS1Scratch),h,subdivisionS1Scratch),T=Cartesian3.multiplyByScalar(Cartesian3.normalize(x,subdivisionS2Scratch),h,subdivisionS2Scratch),E=Cartesian3.magnitudeSquared(Cartesian3.subtract(b,S,subdivisionMidScratch));S=Cartesian3.magnitudeSquared(Cartesian3.subtract(S,T,subdivisionMidScratch)),T=Cartesian3.magnitudeSquared(Cartesian3.subtract(T,b,subdivisionMidScratch));p<(b=Math.max(E,S,T))?E===b?(defined(l=d[f=Math.min(_,y)+" "+Math.max(_,y)])||(m=Cartesian3.add(v,C,subdivisionMidScratch),Cartesian3.multiplyByScalar(m,.5,m),o.push(m.x,m.y,m.z),l=o.length/3-1,d[f]=l),n.push(_,l,g),n.push(l,y,g)):S===b?(defined(l=d[f=Math.min(y,g)+" "+Math.max(y,g)])||(m=Cartesian3.add(C,x,subdivisionMidScratch),Cartesian3.multiplyByScalar(m,.5,m),o.push(m.x,m.y,m.z),l=o.length/3-1,d[f]=l),n.push(y,l,_),n.push(l,g,_)):T===b&&(defined(l=d[f=Math.min(g,_)+" "+Math.max(g,_)])||(m=Cartesian3.add(x,v,subdivisionMidScratch),Cartesian3.multiplyByScalar(m,.5,m),o.push(m.x,m.y,m.z),l=o.length/3-1,d[f]=l),n.push(g,l,y),n.push(l,_,y)):(u.push(_),u.push(y),u.push(g))}return new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:o})},indices:u,primitiveType:PrimitiveType$1.TRIANGLES})};var subdivisionC0Scratch=new Cartographic,subdivisionC1Scratch=new Cartographic,subdivisionC2Scratch=new Cartographic,subdivisionCartographicScratch=new Cartographic;function Queue(){this._array=[],this._offset=0,this._length=0}PolygonPipeline.computeRhumbLineSubdivision=function(e,t,i,r){r=defaultValue(r,CesiumMath.RADIANS_PER_DEGREE);for(var n=i.slice(0),a=t.length,o=new Array(3*a),s=0,l=0;l<a;l++){var c=t[l];o[s++]=c.x,o[s++]=c.y,o[s++]=c.z}for(var u=[],d={},h=(i=e.maximumRadius,CesiumMath.chordLength(r,i)),p=new EllipsoidRhumbLine(void 0,void 0,e),f=new EllipsoidRhumbLine(void 0,void 0,e),m=new EllipsoidRhumbLine(void 0,void 0,e);0<n.length;){var g=n.pop(),y=n.pop(),_=n.pop(),v=Cartesian3.fromArray(o,3*_,subdivisionV0Scratch),C=Cartesian3.fromArray(o,3*y,subdivisionV1Scratch),x=Cartesian3.fromArray(o,3*g,subdivisionV2Scratch),b=e.cartesianToCartographic(v,subdivisionC0Scratch),S=e.cartesianToCartographic(C,subdivisionC1Scratch),T=e.cartesianToCartographic(x,subdivisionC2Scratch);p.setEndPoints(b,S);var E=p.surfaceDistance;f.setEndPoints(S,T),v=f.surfaceDistance,m.setEndPoints(T,b);var w,A,P,D;C=m.surfaceDistance;h<(x=Math.max(E,v,C))?E===x?(defined(l=d[w=Math.min(_,y)+" "+Math.max(_,y)])||(A=p.interpolateUsingFraction(.5,subdivisionCartographicScratch),P=.5*(b.height+S.height),D=Cartesian3.fromRadians(A.longitude,A.latitude,P,e,subdivisionMidScratch),o.push(D.x,D.y,D.z),l=o.length/3-1,d[w]=l),n.push(_,l,g),n.push(l,y,g)):v===x?(defined(l=d[w=Math.min(y,g)+" "+Math.max(y,g)])||(A=f.interpolateUsingFraction(.5,subdivisionCartographicScratch),P=.5*(S.height+T.height),D=Cartesian3.fromRadians(A.longitude,A.latitude,P,e,subdivisionMidScratch),o.push(D.x,D.y,D.z),l=o.length/3-1,d[w]=l),n.push(y,l,_),n.push(l,g,_)):C===x&&(defined(l=d[w=Math.min(g,_)+" "+Math.max(g,_)])||(A=m.interpolateUsingFraction(.5,subdivisionCartographicScratch),P=.5*(T.height+b.height),D=Cartesian3.fromRadians(A.longitude,A.latitude,P,e,subdivisionMidScratch),o.push(D.x,D.y,D.z),l=o.length/3-1,d[w]=l),n.push(g,l,y),n.push(l,_,y)):(u.push(_),u.push(y),u.push(g))}return new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:o})},indices:u,primitiveType:PrimitiveType$1.TRIANGLES})},PolygonPipeline.scaleToGeodeticHeight=function(e,t,i,r){i=defaultValue(i,Ellipsoid.WGS84);var n=scaleToGeodeticHeightN,a=scaleToGeodeticHeightP;if(t=defaultValue(t,0),r=defaultValue(r,!0),defined(e))for(var o=e.length,s=0;s<o;s+=3)Cartesian3.fromArray(e,s,a),r&&(a=i.scaleToGeodeticSurface(a,a)),0!==t&&(n=i.geodeticSurfaceNormal(a,n),Cartesian3.multiplyByScalar(n,t,n),Cartesian3.add(a,n,a)),e[s]=a.x,e[s+1]=a.y,e[s+2]=a.z;return e},Object.defineProperties(Queue.prototype,{length:{get:function(){return this._length}}}),Queue.prototype.enqueue=function(e){this._array.push(e),this._length++},Queue.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,10<++t&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},Queue.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},Queue.prototype.contains=function(e){return-1!==this._array.indexOf(e)},Queue.prototype.clear=function(){this._array.length=this._offset=this._length=0},Queue.prototype.sort=function(e){0<this._offset&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var PolygonGeometryLibrary={computeHierarchyPackedLength:function(e){for(var t=0,i=[e];0<i.length;){var r=i.pop();if(defined(r)){t+=2;var n=r.positions,a=r.holes;if(defined(n)&&(t+=n.length*Cartesian3.packedLength),defined(a))for(var o=a.length,s=0;s<o;++s)i.push(a[s])}}return t},packPolygonHierarchy:function(e,t,i){for(var r=[e];0<r.length;){var n=r.pop();if(defined(n)){var a=n.positions,o=n.holes;if(t[i++]=defined(a)?a.length:0,t[i++]=defined(o)?o.length:0,defined(a))for(var s=a.length,l=0;l<s;++l,i+=3)Cartesian3.pack(a[l],t,i);if(defined(o))for(var c=o.length,u=0;u<c;++u)r.push(o[u])}}return i},unpackPolygonHierarchy:function(e,t){for(var i=e[t++],r=e[t++],n=new Array(i),a=0<r?new Array(r):void 0,o=0;o<i;++o,t+=Cartesian3.packedLength)n[o]=Cartesian3.unpack(e,t);for(var s=0;s<r;++s)a[s]=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t),t=a[s].startingIndex,delete a[s].startingIndex;return{positions:n,holes:a,startingIndex:t}}},distanceScratch$3=new Cartesian3;function getPointAtDistance(e,t,i,r){return Cartesian3.subtract(t,e,distanceScratch$3),Cartesian3.multiplyByScalar(distanceScratch$3,i/r,distanceScratch$3),Cartesian3.add(e,distanceScratch$3,distanceScratch$3),[distanceScratch$3.x,distanceScratch$3.y,distanceScratch$3.z]}PolygonGeometryLibrary.subdivideLineCount=function(e,t,i){return i=Cartesian3.distance(e,t)/i,i=Math.max(0,Math.ceil(CesiumMath.log2(i))),Math.pow(2,i)};var scratchCartographic0=new Cartographic,scratchCartographic1=new Cartographic,scratchCartographic2=new Cartographic,scratchCartesian0=new Cartesian3;PolygonGeometryLibrary.subdivideRhumbLineCount=function(e,t,i,r){return r=new EllipsoidRhumbLine(e.cartesianToCartographic(t,scratchCartographic0),e.cartesianToCartographic(i,scratchCartographic1),e).surfaceDistance/r,r=Math.max(0,Math.ceil(CesiumMath.log2(r))),Math.pow(2,r)},PolygonGeometryLibrary.subdivideLine=function(e,t,i,r){var n=PolygonGeometryLibrary.subdivideLineCount(e,t,i),a=Cartesian3.distance(e,t),o=a/n;defined(r)||(r=[]);var s=r;s.length=3*n;for(var l=0,c=0;c<n;c++){var u=getPointAtDistance(e,t,c*o,a);s[l++]=u[0],s[l++]=u[1],s[l++]=u[2]}return s},PolygonGeometryLibrary.subdivideRhumbLine=function(e,t,i,r,n){var a=new EllipsoidRhumbLine(e.cartesianToCartographic(t,scratchCartographic0),e.cartesianToCartographic(i,scratchCartographic1),e),o=(r=a.surfaceDistance/r,r=Math.max(0,Math.ceil(CesiumMath.log2(r))),Math.pow(2,r)),s=a.surfaceDistance/o;defined(n)||(n=[]);var l=n;l.length=3*o;for(var c=0,u=0;u<o;u++){var d=a.interpolateUsingSurfaceDistance(u*s,scratchCartographic2);d=e.cartographicToCartesian(d,scratchCartesian0);l[c++]=d.x,l[c++]=d.y,l[c++]=d.z}return l};var scaleToGeodeticHeightN1=new Cartesian3,scaleToGeodeticHeightN2=new Cartesian3,scaleToGeodeticHeightP1=new Cartesian3,scaleToGeodeticHeightP2=new Cartesian3;PolygonGeometryLibrary.scaleToGeodeticHeightExtruded=function(e,t,i,r,n){r=defaultValue(r,Ellipsoid.WGS84);var a=scaleToGeodeticHeightN1,o=scaleToGeodeticHeightN2,s=scaleToGeodeticHeightP1,l=scaleToGeodeticHeightP2;if(defined(e)&&defined(e.attributes)&&defined(e.attributes.position))for(var c=e.attributes.position.values,u=c.length/2,d=0;d<u;d+=3)Cartesian3.fromArray(c,d,s),r.geodeticSurfaceNormal(s,a),l=r.scaleToGeodeticSurface(s,l),o=Cartesian3.multiplyByScalar(a,i,o),o=Cartesian3.add(l,o,o),c[d+u]=o.x,c[d+1+u]=o.y,c[d+2+u]=o.z,n&&(l=Cartesian3.clone(s,l)),o=Cartesian3.multiplyByScalar(a,t,o),o=Cartesian3.add(l,o,o),c[d]=o.x,c[d+1]=o.y,c[d+2]=o.z;return e},PolygonGeometryLibrary.polygonOutlinesFromHierarchy=function(e,t,i){var r,n,a=[],o=new Queue;for(o.enqueue(e);0!==o.length;){var s=o.dequeue(),l=s.positions;if(t)for(n=l.length,u=0;u<n;u++)i.scaleToGeodeticSurface(l[u],l[u]);if(!((l=arrayRemoveDuplicates(l,Cartesian3.equalsEpsilon,!0)).length<3)){for(var c=s.holes?s.holes.length:0,u=0;u<c;u++){var d=s.holes[u],h=d.positions;if(t)for(n=h.length,r=0;r<n;++r)i.scaleToGeodeticSurface(h[r],h[r]);if(!((h=arrayRemoveDuplicates(h,Cartesian3.equalsEpsilon,!0)).length<3)){a.push(h);var p=0;for(defined(d.holes)&&(p=d.holes.length),r=0;r<p;r++)o.enqueue(d.holes[r])}}a.push(l)}}return a},PolygonGeometryLibrary.polygonsFromHierarchy=function(e,t,i,r){var n=[],a=[],o=new Queue;for(o.enqueue(e);0!==o.length;){var s,l=o.dequeue(),c=l.positions,u=l.holes;if(i)for(s=c.length,y=0;y<s;y++)r.scaleToGeodeticSurface(c[y],c[y]);if(!((c=arrayRemoveDuplicates(c,Cartesian3.equalsEpsilon,!0)).length<3)){var d=t(c);if(defined(d)){var h=[];PolygonPipeline.computeWindingOrder2D(d)===WindingOrder$1.CLOCKWISE&&(d.reverse(),c=c.slice().reverse());for(var p,f=c.slice(),m=defined(u)?u.length:0,g=[],y=0;y<m;y++){var _=u[y],v=_.positions;if(i)for(s=v.length,p=0;p<s;++p)r.scaleToGeodeticSurface(v[p],v[p]);if(!((v=arrayRemoveDuplicates(v,Cartesian3.equalsEpsilon,!0)).length<3)){var C=t(v);if(defined(C)){PolygonPipeline.computeWindingOrder2D(C)===WindingOrder$1.CLOCKWISE&&(C.reverse(),v=v.slice().reverse()),g.push(v),h.push(f.length),f=f.concat(v),d=d.concat(C);var x=0;for(defined(_.holes)&&(x=_.holes.length),p=0;p<x;p++)o.enqueue(_.holes[p])}}}n.push({outerRing:c,holes:g}),a.push({positions:f,positions2D:d,holes:h})}}}return{hierarchy:n,polygons:a}};var computeBoundingRectangleCartesian2=new Cartesian2,computeBoundingRectangleCartesian3=new Cartesian3,computeBoundingRectangleQuaternion=new Quaternion,computeBoundingRectangleMatrix3=new Matrix3;PolygonGeometryLibrary.computeBoundingRectangle=function(e,t,i,r,n){r=Quaternion.fromAxisAngle(e,r,computeBoundingRectangleQuaternion);for(var a=Matrix3.fromQuaternion(r,computeBoundingRectangleMatrix3),o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=i.length,d=0;d<u;++d){var h=Cartesian3.clone(i[d],computeBoundingRectangleCartesian3);Matrix3.multiplyByVector(a,h,h),defined(h=t(h,computeBoundingRectangleCartesian2))&&(o=Math.min(o,h.x),s=Math.max(s,h.x),l=Math.min(l,h.y),c=Math.max(c,h.y))}return n.x=o,n.y=l,n.width=s-o,n.height=c-l,n},PolygonGeometryLibrary.createGeometryFromPositions=function(e,t,i,r,n,a){var o=PolygonPipeline.triangulate(t.positions2D,t.holes);o.length<3&&(o=[0,1,2]);var s=t.positions;if(r){for(var l=s.length,c=new Array(3*l),u=0,d=0;d<l;d++){var h=s[d];c[u++]=h.x,c[u++]=h.y,c[u++]=h.z}return r=new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:c})},indices:o,primitiveType:PrimitiveType$1.TRIANGLES}),n.normal?GeometryPipeline.computeNormal(r):r}return a===ArcType$1.GEODESIC?PolygonPipeline.computeSubdivision(e,s,o,i):a===ArcType$1.RHUMB?PolygonPipeline.computeRhumbLineSubdivision(e,s,o,i):void 0};var computeWallIndicesSubdivided=[],p1Scratch$1=new Cartesian3,p2Scratch$1=new Cartesian3;PolygonGeometryLibrary.computeWallGeometry=function(e,t,i,r,n){var a,o,s,l=e.length,c=0;if(r)for(o=3*l*2,a=new Array(2*o),s=0;s<l;s++)p=e[s],f=e[(s+1)%l],a[c]=a[c+o]=p.x,a[++c]=a[c+o]=p.y,a[++c]=a[c+o]=p.z,a[++c]=a[c+o]=f.x,a[++c]=a[c+o]=f.y,a[++c]=a[c+o]=f.z,++c;else{var u=CesiumMath.chordLength(i,t.maximumRadius),d=0;if(n===ArcType$1.GEODESIC)for(s=0;s<l;s++)d+=PolygonGeometryLibrary.subdivideLineCount(e[s],e[(s+1)%l],u);else if(n===ArcType$1.RHUMB)for(s=0;s<l;s++)d+=PolygonGeometryLibrary.subdivideRhumbLineCount(t,e[s],e[(s+1)%l],u);for(o=3*(d+l),a=new Array(2*o),s=0;s<l;s++){var h,p=e[s],f=e[(s+1)%l];n===ArcType$1.GEODESIC?h=PolygonGeometryLibrary.subdivideLine(p,f,u,computeWallIndicesSubdivided):n===ArcType$1.RHUMB&&(h=PolygonGeometryLibrary.subdivideRhumbLine(t,p,f,u,computeWallIndicesSubdivided));for(var m=h.length,g=0;g<m;++g,++c)a[c]=h[g],a[c+o]=h[g];a[c]=f.x,a[c+o]=f.x,a[++c]=f.y,a[c+o]=f.y,a[++c]=f.z,a[c+o]=f.z,++c}}l=a.length;var y=IndexDatatype$1.createTypedArray(l/3,l-6*e.length),_=0;for(l/=6,s=0;s<l;s++){var v=s,C=v+1,x=v+l,b=x+1;p=Cartesian3.fromArray(a,3*v,p1Scratch$1),f=Cartesian3.fromArray(a,3*C,p2Scratch$1),Cartesian3.equalsEpsilon(p,f,CesiumMath.EPSILON10,CesiumMath.EPSILON10)||(y[_++]=v,y[_++]=x,y[_++]=C,y[_++]=C,y[_++]=x,y[_++]=b)}return new Geometry({attributes:new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:a})}),indices:y,primitiveType:PrimitiveType$1.TRIANGLES})};var scratchPosition=new Cartesian3,scratchBR=new BoundingRectangle,stScratch=new Cartesian2,textureCoordinatesOrigin=new Cartesian2,scratchNormal$3=new Cartesian3,scratchTangent$1=new Cartesian3,scratchBitangent$1=new Cartesian3,centerScratch=new Cartesian3,axis1Scratch=new Cartesian3,axis2Scratch=new Cartesian3,quaternionScratch$1=new Quaternion,textureMatrixScratch$1=new Matrix3,tangentRotationScratch=new Matrix3,surfaceNormalScratch=new Cartesian3;function createGeometryFromPolygon(e,t,i,r,n,a,o,s){var l=e.positions,c=PolygonPipeline.triangulate(e.positions2D,e.holes);c.length<3&&(c=[0,1,2]),(e=IndexDatatype$1.createTypedArray(l.length,c.length)).set(c);var u=textureMatrixScratch$1;0!==r?(c=Quaternion.fromAxisAngle(a,r,quaternionScratch$1),u=Matrix3.fromQuaternion(c,u),(t.tangent||t.bitangent)&&(c=Quaternion.fromAxisAngle(a,-r,quaternionScratch$1),p=Matrix3.fromQuaternion(c,tangentRotationScratch),o=Cartesian3.normalize(Matrix3.multiplyByVector(p,o,o),o),t.bitangent&&(s=Cartesian3.normalize(Cartesian3.cross(a,o,s),s)))):u=Matrix3.clone(Matrix3.IDENTITY,u);var d=textureCoordinatesOrigin;t.st&&(d.x=i.x,d.y=i.y);for(var h=l.length,p=3*h,f=new Float64Array(p),m=t.normal?new Float32Array(p):void 0,g=t.tangent?new Float32Array(p):void 0,y=t.bitangent?new Float32Array(p):void 0,_=t.st?new Float32Array(2*h):void 0,v=0,C=0,x=0,b=0,S=0,T=0;T<h;T++){var E,w=l[T];f[v++]=w.x,f[v++]=w.y,f[v++]=w.z,t.st&&(E=n(Matrix3.multiplyByVector(u,w,scratchPosition),stScratch),Cartesian2.subtract(E,d,E),w=CesiumMath.clamp(E.x/i.width,0,1),E=CesiumMath.clamp(E.y/i.height,0,1),_[S++]=w,_[S++]=E),t.normal&&(m[C++]=a.x,m[C++]=a.y,m[C++]=a.z),t.tangent&&(g[b++]=o.x,g[b++]=o.y,g[b++]=o.z),t.bitangent&&(y[x++]=s.x,y[x++]=s.y,y[x++]=s.z)}return p=new GeometryAttributes,t.position&&(p.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:f})),t.normal&&(p.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:m})),t.tangent&&(p.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:g})),t.bitangent&&(p.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:y})),t.st&&(p.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:_})),new Geometry({attributes:p,indices:e,primitiveType:PrimitiveType$1.TRIANGLES})}function CoplanarPolygonGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).polygonHierarchy,i=defaultValue(e.vertexFormat,VertexFormat.DEFAULT);this._vertexFormat=VertexFormat.clone(i),this._polygonHierarchy=t,this._stRotation=defaultValue(e.stRotation,0),this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=PolygonGeometryLibrary.computeHierarchyPackedLength(t)+VertexFormat.packedLength+Ellipsoid.packedLength+2}CoplanarPolygonGeometry.fromPositions=function(e){return new CoplanarPolygonGeometry({polygonHierarchy:{positions:(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},CoplanarPolygonGeometry.pack=function(e,t,i){return i=defaultValue(i,0),i=PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i),Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._stRotation,t[i]=e.packedLength,t};var scratchEllipsoid$2=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$2=new VertexFormat,scratchOptions$6={polygonHierarchy:{}};function createGeometryFromPositions(e){for(var t=e.length,i=new Float64Array(3*t),r=IndexDatatype$1.createTypedArray(t,2*t),n=0,a=0,o=0;o<t;o++){var s=e[o];i[n++]=s.x,i[n++]=s.y,i[n++]=s.z,r[a++]=o,r[a++]=(o+1)%t}return new Geometry({attributes:new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:i})}),indices:r,primitiveType:PrimitiveType$1.LINES})}function CoplanarPolygonOutlineGeometry(e){e=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).polygonHierarchy,this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=PolygonGeometryLibrary.computeHierarchyPackedLength(e)+1}CoplanarPolygonGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$2);t+=Ellipsoid.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$2);t+=VertexFormat.packedLength;var o=e[t++];t=e[t];return defined(i)||(i=new CoplanarPolygonGeometry(scratchOptions$6)),i._polygonHierarchy=r,i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._stRotation=o,i.packedLength=t,i},CoplanarPolygonGeometry.createGeometry=function(e){var t=e._vertexFormat,i=e._polygonHierarchy,r=e._stRotation,n=i.positions;if(!((n=arrayRemoveDuplicates(n,Cartesian3.equalsEpsilon,!0)).length<3)){var a=scratchNormal$3,o=scratchTangent$1,s=scratchBitangent$1,l=axis1Scratch,c=axis2Scratch;if(CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(n,centerScratch,l,c)){a=Cartesian3.cross(l,c,a),a=Cartesian3.normalize(a,a),Cartesian3.equalsEpsilon(centerScratch,Cartesian3.ZERO,CesiumMath.EPSILON6)||(u=e._ellipsoid.geodeticSurfaceNormal(centerScratch,surfaceNormalScratch),Cartesian3.dot(a,u)<0&&(a=Cartesian3.negate(a,a),l=Cartesian3.negate(l,l)));var u=CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(centerScratch,l,c),d=CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(centerScratch,l,c);t.tangent&&(o=Cartesian3.clone(l,o)),t.bitangent&&(s=Cartesian3.clone(c,s));u=(i=PolygonGeometryLibrary.polygonsFromHierarchy(i,u,!1)).hierarchy;var h=i.polygons;if(0!==u.length){n=u[0].outerRing;i=BoundingSphere.fromPoints(n);for(var p=PolygonGeometryLibrary.computeBoundingRectangle(a,d,n,r,scratchBR),f=[],m=0;m<h.length;m++){var g=new GeometryInstance({geometry:createGeometryFromPolygon(h[m],t,p,r,d,a,o,s)});f.push(g)}return(u=GeometryPipeline.combineInstances(f)[0]).attributes.position.values=new Float64Array(u.attributes.position.values),u.indices=IndexDatatype$1.createTypedArray(u.attributes.position.values.length/3,u.indices),n=u.attributes,t.position||delete n.position,new Geometry({attributes:n,indices:u.indices,primitiveType:u.primitiveType,boundingSphere:i})}}}},CoplanarPolygonOutlineGeometry.fromPositions=function(e){return new CoplanarPolygonOutlineGeometry({polygonHierarchy:{positions:(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions}})},CoplanarPolygonOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),t[i=PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i)]=e.packedLength,t};var scratchOptions$7={polygonHierarchy:{}};CoplanarPolygonOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);return t=r.startingIndex,delete r.startingIndex,t=e[t],defined(i)||(i=new CoplanarPolygonOutlineGeometry(scratchOptions$7)),i._polygonHierarchy=r,i.packedLength=t,i},CoplanarPolygonOutlineGeometry.createGeometry=function(e){var t=e._polygonHierarchy;if(!((e=arrayRemoveDuplicates(e=t.positions,Cartesian3.equalsEpsilon,!0)).length<3)&&CoplanarPolygonGeometryLibrary.validOutline(e)){var i=PolygonGeometryLibrary.polygonOutlinesFromHierarchy(t,!1);if(0!==i.length){for(var r=[],n=0;n<i.length;n++){var a=new GeometryInstance({geometry:createGeometryFromPositions(i[n])});r.push(a)}return e=GeometryPipeline.combineInstances(r)[0],t=BoundingSphere.fromPoints(t.positions),new Geometry({attributes:e.attributes,indices:e.indices,primitiveType:e.primitiveType,boundingSphere:t})}}};var CornerType={ROUNDED:0,MITERED:1,BEVELED:2},CornerType$1=Object.freeze(CornerType);function setConstants(e){var t=e._uSquared,i=e._ellipsoid.maximumRadius,r=e._ellipsoid.minimumRadius,n=(i-r)/i,a=Math.cos(e._startHeading),o=Math.sin(e._startHeading),s=(1-n)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+s*s),c=l*s,u=Math.atan2(s,a),d=l*o,h=d*d,p=1-h,f=Math.sqrt(p),m=t/4,g=m*m,y=g*m,_=g*g,v=1+m-3*g/4+5*y/4-175*_/64,C=1-m+15*g/8-35*y/8,x=1-3*m+35*g/4,b=1-5*m;t=v*u-C*Math.sin(2*u)*m/2-x*Math.sin(4*u)*g/16-b*Math.sin(6*u)*y/48-5*Math.sin(8*u)*_/512;(e=e._constants).a=i,e.b=r,e.f=n,e.cosineHeading=a,e.sineHeading=o,e.tanU=s,e.cosineU=l,e.sineU=c,e.sigma=u,e.sineAlpha=d,e.sineSquaredAlpha=h,e.cosineSquaredAlpha=p,e.cosineAlpha=f,e.u2Over4=m,e.u4Over16=g,e.u6Over64=y,e.u8Over256=_,e.a0=v,e.a1=C,e.a2=x,e.a3=b,e.distanceRatio=t}function computeC(e,t){return e*t*(4+e*(4-3*t))/16}function computeDeltaLambda(e,t,i,r,n,a,o){return(1-(i=computeC(e,i)))*e*t*(r+i*n*(o+i*a*(2*o*o-1)))}function vincentyInverseFormula(e,t,i,r,n,a,o){var s=(t-i)/t,l=a-r,c=(r=Math.atan((1-s)*Math.tan(n)),n=Math.atan((1-s)*Math.tan(o)),o=Math.cos(r),r=Math.sin(r),Math.cos(n)),u=o*c,d=o*(n=Math.sin(n)),h=r*n,p=r*c,f=l,m=CesiumMath.TWO_PI,g=Math.cos(f),y=Math.sin(f);do{g=Math.cos(f),y=Math.sin(f);var _,v,C=d-p*g,x=Math.sqrt(c*c*y*y+C*C),b=h+u*g,S=Math.atan2(x,b),T=(m=f,b-2*h/(v=0===x?(_=0,1):1-(_=u*y/x)*_));isNaN(T)&&(T=0),f=l+computeDeltaLambda(s,_,v,S,x,b,T)}while(Math.abs(f-m)>CesiumMath.EPSILON12);r=i*(1+(n=v*(t*t-i*i)/(i*i))*(4096+n*(n*(320-175*n)-768))/16384)*(S-(r=n*(256+n*(n*(74-47*n)-128))/1024)*x*(T+r*(b*(2*(t=T*T)-1)-r*T*(4*x*x-3)*(4*t-3)/6)/4)),t=Math.atan2(c*y,d-p*g),o=Math.atan2(o*y,d*g-p),e._distance=r,e._startHeading=t,e._endHeading=o,e._uSquared=n}var scratchCart1$1=new Cartesian3,scratchCart2$1=new Cartesian3;function computeProperties$1(e,t,i,r){Cartesian3.normalize(r.cartographicToCartesian(t,scratchCart2$1),scratchCart1$1),Cartesian3.normalize(r.cartographicToCartesian(i,scratchCart2$1),scratchCart2$1),vincentyInverseFormula(e,r.maximumRadius,r.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude),e._start=Cartographic.clone(t,e._start),e._end=Cartographic.clone(i,e._end),e._start.height=0,e._end.height=0,setConstants(e)}function EllipsoidGeodesic(e,t,i){i=defaultValue(i,Ellipsoid.WGS84),this._ellipsoid=i,this._start=new Cartographic,this._end=new Cartographic,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,defined(e)&&defined(t)&&computeProperties$1(this,e,t,i)}Object.defineProperties(EllipsoidGeodesic.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),EllipsoidGeodesic.prototype.setEndPoints=function(e,t){computeProperties$1(this,e,t,this._ellipsoid)},EllipsoidGeodesic.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance=function(e,t){var i=this._constants,r=i.distanceRatio+e/i.b,n=Math.cos(2*r),a=Math.cos(4*r),o=Math.cos(6*r),s=Math.sin(2*r),l=Math.sin(4*r),c=Math.sin(6*r),u=Math.sin(8*r),d=r*(m=r*r),h=i.u8Over256,p=i.u2Over4,f=i.u6Over64,m=2*d*h*n/3+r*(1-p+7*(e=i.u4Over16)/4-15*f/4+579*h/64-(e-15*f/4+187*h/16)*n-(5*f/4-115*h/16)*a-29*h*o/16)+(p/2-e+71*f/32-85*h/16)*s+(5*e/16-5*f/4+383*h/96)*l-m*((f-11*h/2)*s+5*h*l/2)+(29*f/96-29*h/16)*c+539*h*u/1536;s=Math.asin(Math.sin(m)*i.cosineAlpha),l=Math.atan(i.a/i.b*Math.tan(s));return m-=i.sigma,f=Math.cos(2*i.sigma+m),c=Math.sin(m),h=Math.cos(m),u=i.cosineU*h,s=i.sineU*c,f=Math.atan2(c*i.sineHeading,u-s*i.cosineHeading)-computeDeltaLambda(i.f,i.sineAlpha,i.cosineSquaredAlpha,m,c,h,f),defined(t)?(t.longitude=this._start.longitude+f,t.latitude=l,t.height=0,t):new Cartographic(this._start.longitude+f,l,0)};var PolylinePipeline={numberOfPoints:function(e,t,i){return t=Cartesian3.distance(e,t),Math.ceil(t/i)},numberOfPointsRhumbLine:function(e,t,i){return t=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2),Math.max(1,Math.ceil(Math.sqrt(t/(i*i))))}},cartoScratch=new Cartographic;PolylinePipeline.extractHeights=function(e,t){for(var i=e.length,r=new Array(i),n=0;n<i;n++){var a=e[n];r[n]=t.cartesianToCartographic(a,cartoScratch).height}return r};var wrapLongitudeInversMatrix=new Matrix4,wrapLongitudeOrigin=new Cartesian3,wrapLongitudeXZNormal=new Cartesian3,wrapLongitudeXZPlane=new Plane(Cartesian3.UNIT_X,0),wrapLongitudeYZNormal=new Cartesian3,wrapLongitudeYZPlane=new Plane(Cartesian3.UNIT_X,0),wrapLongitudeIntersection=new Cartesian3,wrapLongitudeOffset=new Cartesian3,subdivideHeightsScratchArray=[];function subdivideHeights(e,t,i){var r=subdivideHeightsScratchArray;if(r.length=e,t===i){for(a=0;a<e;a++)r[a]=t;return r}for(var n=(i-t)/e,a=0;a<e;a++){var o=t+a*n;r[a]=o}return r}var carto1=new Cartographic,carto2=new Cartographic,cartesian=new Cartesian3,scaleFirst=new Cartesian3,scaleLast=new Cartesian3,ellipsoidGeodesic=new EllipsoidGeodesic,ellipsoidRhumb=new EllipsoidRhumbLine;function generateCartesianArc(e,t,i,r,n,a,o,s){var l=r.scaleToGeodeticSurface(e,scaleFirst),c=r.scaleToGeodeticSurface(t,scaleLast),u=PolylinePipeline.numberOfPoints(e,t,i),d=(l=r.cartesianToCartographic(l,carto1),c=r.cartesianToCartographic(c,carto2),subdivideHeights(u,n,a));ellipsoidGeodesic.setEndPoints(l,c);var h=ellipsoidGeodesic.surfaceDistance/u,p=s;l.height=n;var f=r.cartographicToCartesian(l,cartesian);Cartesian3.pack(f,o,p),p+=3;for(var m=1;m<u;m++){var g=ellipsoidGeodesic.interpolateUsingSurfaceDistance(m*h,carto2);g.height=d[m],f=r.cartographicToCartesian(g,cartesian),Cartesian3.pack(f,o,p),p+=3}return p}function generateCartesianRhumbArc(e,t,i,r,n,a,o,s){e=r.cartesianToCartographic(e,carto1),t=r.cartesianToCartographic(t,carto2);var l=PolylinePipeline.numberOfPointsRhumbLine(e,t,i);e.height=0,t.height=0;var c=subdivideHeights(l,n,a);ellipsoidRhumb.ellipsoid.equals(r)||(ellipsoidRhumb=new EllipsoidRhumbLine(void 0,void 0,r)),ellipsoidRhumb.setEndPoints(e,t);var u=ellipsoidRhumb.surfaceDistance/l,d=s;e.height=n;var h=r.cartographicToCartesian(e,cartesian);Cartesian3.pack(h,o,d),d+=3;for(var p=1;p<l;p++){var f=ellipsoidRhumb.interpolateUsingSurfaceDistance(p*u,carto2);f.height=c[p],h=r.cartographicToCartesian(f,cartesian),Cartesian3.pack(h,o,d),d+=3}return d}PolylinePipeline.wrapLongitude=function(e,t){var i=[],r=[];if(defined(e)&&0<e.length){t=defaultValue(t,Matrix4.IDENTITY);var n=Matrix4.inverseTransformation(t,wrapLongitudeInversMatrix),a=(t=Matrix4.multiplyByPoint(n,Cartesian3.ZERO,wrapLongitudeOrigin),Cartesian3.normalize(Matrix4.multiplyByPointAsVector(n,Cartesian3.UNIT_Y,wrapLongitudeXZNormal),wrapLongitudeXZNormal)),o=Plane.fromPointNormal(t,a,wrapLongitudeXZPlane),s=(n=Cartesian3.normalize(Matrix4.multiplyByPointAsVector(n,Cartesian3.UNIT_X,wrapLongitudeYZNormal),wrapLongitudeYZNormal),Plane.fromPointNormal(t,n,wrapLongitudeYZPlane)),l=1;i.push(Cartesian3.clone(e[0]));for(var c=i[0],u=e.length,d=1;d<u;++d){var h,p,f=e[d];!(Plane.getPointDistance(s,c)<0||Plane.getPointDistance(s,f)<0)||defined(h=IntersectionTests.lineSegmentPlane(c,f,o,wrapLongitudeIntersection))&&(p=Cartesian3.multiplyByScalar(a,5e-9,wrapLongitudeOffset),Plane.getPointDistance(o,c)<0&&Cartesian3.negate(p,p),i.push(Cartesian3.add(h,p,new Cartesian3)),r.push(l+1),Cartesian3.negate(p,p),i.push(Cartesian3.add(h,p,new Cartesian3)),l=1),i.push(Cartesian3.clone(e[d])),l++,c=f}r.push(l)}return{positions:i,lengths:r}},PolylinePipeline.generateArc=function(e){defined(e)||(e={});var t=e.positions,i=t.length,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=defaultValue(e.height,0),a=Array.isArray(n);if(i<1)return[];if(1===i){var o,s=r.scaleToGeodeticSurface(t[0],scaleFirst);return 0!==(n=a?n[0]:n)&&(o=r.geodeticSurfaceNormal(s,cartesian),Cartesian3.multiplyByScalar(o,n,o),Cartesian3.add(s,o,s)),[s.x,s.y,s.z]}var l=e.minDistance;defined(l)||(p=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),l=CesiumMath.chordLength(p,r.maximumRadius));for(var c=0,u=0;u<i-1;u++)c+=PolylinePipeline.numberOfPoints(t[u],t[u+1],l);e=3*(c+1);var d=new Array(e),h=0;for(u=0;u<i-1;u++)h=generateCartesianArc(t[u],t[u+1],l,r,a?n[u]:n,a?n[u+1]:n,d,h);subdivideHeightsScratchArray.length=0;var p=t[i-1];return(p=r.cartesianToCartographic(p,carto1)).height=a?n[i-1]:n,p=r.cartographicToCartesian(p,cartesian),Cartesian3.pack(p,d,e-3),d};var scratchCartographic0$1=new Cartographic,scratchCartographic1$1=new Cartographic;PolylinePipeline.generateRhumbArc=function(e){defined(e)||(e={});var t=e.positions,i=t.length,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=defaultValue(e.height,0),a=Array.isArray(n);if(i<1)return[];if(1===i){var o,s=r.scaleToGeodeticSurface(t[0],scaleFirst);return 0!==(n=a?n[0]:n)&&(o=r.geodeticSurfaceNormal(s,cartesian),Cartesian3.multiplyByScalar(o,n,o),Cartesian3.add(s,o,s)),[s.x,s.y,s.z]}for(var l,c=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),u=0,d=r.cartesianToCartographic(t[0],scratchCartographic0$1),h=0;h<i-1;h++)l=r.cartesianToCartographic(t[h+1],scratchCartographic1$1),u+=PolylinePipeline.numberOfPointsRhumbLine(d,l,c),d=Cartographic.clone(l,scratchCartographic0$1);s=3*(u+1);var p=new Array(s),f=0;for(h=0;h<i-1;h++)f=generateCartesianRhumbArc(t[h],t[h+1],c,r,a?n[h]:n,a?n[h+1]:n,p,f);return subdivideHeightsScratchArray.length=0,e=t[i-1],(e=r.cartesianToCartographic(e,carto1)).height=a?n[i-1]:n,e=r.cartographicToCartesian(e,cartesian),Cartesian3.pack(e,p,s-3),p},PolylinePipeline.generateCartesianArc=function(e){for(var t=PolylinePipeline.generateArc(e),i=t.length/3,r=new Array(i),n=0;n<i;n++)r[n]=Cartesian3.unpack(t,3*n);return r},PolylinePipeline.generateCartesianRhumbArc=function(e){for(var t=PolylinePipeline.generateRhumbArc(e),i=t.length/3,r=new Array(i),n=0;n<i;n++)r[n]=Cartesian3.unpack(t,3*n);return r};var scratch2Array=[new Cartesian3,new Cartesian3],scratchCartesian1$5=new Cartesian3,scratchCartesian2$5=new Cartesian3,scratchCartesian3$6=new Cartesian3,scratchCartesian4$2=new Cartesian3,scratchCartesian5$1=new Cartesian3,scratchCartesian6$1=new Cartesian3,scratchCartesian7=new Cartesian3,scratchCartesian8=new Cartesian3,scratchCartesian9=new Cartesian3,scratch1=new Cartesian3,scratch2=new Cartesian3,PolylineVolumeGeometryLibrary={},cartographic=new Cartographic;function scaleToSurface(e,t){for(var i=new Array(e.length),r=0;r<e.length;r++){var n=e[r];cartographic=t.cartesianToCartographic(n,cartographic),i[r]=cartographic.height,e[r]=t.scaleToGeodeticSurface(n,n)}return i}function subdivideHeights$1(e,t,i,r){var n=e[0],a=(e=e[1],e=Cartesian3.angleBetween(n,e),Math.ceil(e/r)),o=new Array(a);if(t===i){for(l=0;l<a;l++)o[l]=t;return o.push(i),o}for(var s=(i-t)/a,l=1;l<a;l++){var c=t+l*s;o[l]=c}return o[0]=t,o.push(i),o}var nextScratch=new Cartesian3,prevScratch=new Cartesian3;function computeRotationAngle(e,t,i,r){return e=(r=new EllipsoidTangentPlane(i,r)).projectPointOntoPlane(Cartesian3.add(i,e,nextScratch),nextScratch),i=r.projectPointOntoPlane(Cartesian3.add(i,t,prevScratch),prevScratch),t=Cartesian2.angleBetween(e,i),0<=i.x*e.y-i.y*e.x?-t:t}var negativeX=new Cartesian3(-1,0,0),transform=new Matrix4,translation=new Matrix4,rotationZ=new Matrix3,scaleMatrix=Matrix3.IDENTITY.clone(),westScratch$1=new Cartesian3,finalPosScratch=new Cartesian4,heightCartesian=new Cartesian3;function addPosition(e,t,i,r,n,a,o,s){var l=westScratch$1,c=finalPosScratch;transform=Transforms.eastNorthUpToFixedFrame(e,n,transform),l=Matrix4.multiplyByPointAsVector(transform,negativeX,l),n=computeRotationAngle(Cartesian3.normalize(l,l),t,e,n),rotationZ=Matrix3.fromRotationZ(n,rotationZ),heightCartesian.z=a,transform=Matrix4.multiplyTransformation(transform,Matrix4.fromRotationTranslation(rotationZ,heightCartesian,translation),transform);var u=scaleMatrix;u[0]=o;for(var d=0;d<s;d++)for(var h=0;h<i.length;h+=3)c=Cartesian3.fromArray(i,h,c),c=Matrix3.multiplyByVector(u,c,c),c=Matrix4.multiplyByPoint(transform,c,c),r.push(c.x,c.y,c.z);return r}var centerScratch$1=new Cartesian3;function addPositions(e,t,i,r,n,a,o){for(var s=0;s<e.length;s+=3)r=addPosition(Cartesian3.fromArray(e,s,centerScratch$1),t,i,r,n,a[s/3],o,1);return r}function convertShapeTo3DDuplicate(e,t){var i=e.length,r=new Array(6*i),n=0,a=t.x+t.width/2,o=t.y+t.height/2,s=e[0];r[n++]=s.x-a,r[n++]=0,r[n++]=s.y-o;for(var l=1;l<i;l++){var c=(s=e[l]).x-a,u=s.y-o;r[n++]=c,r[n++]=0,r[n++]=u,r[n++]=c,r[n++]=0,r[n++]=u}return s=e[0],r[n++]=s.x-a,r[n++]=0,r[n++]=s.y-o,r}function convertShapeTo3D(e,t){for(var i=e.length,r=new Array(3*i),n=0,a=t.x+t.width/2,o=t.y+t.height/2,s=0;s<i;s++)r[n++]=e[s].x-a,r[n++]=0,r[n++]=e[s].y-o;return r}var quaterion=new Quaternion,startPointScratch=new Cartesian3,rotMatrix=new Matrix3;function computeRoundCorner(e,t,i,r,n,a,o,s,l,c){var u,d=Cartesian3.angleBetween(Cartesian3.subtract(t,e,scratch1),Cartesian3.subtract(i,e,scratch2)),h=r===CornerType$1.BEVELED?0:Math.ceil(d/CesiumMath.toRadians(5)),p=n?Matrix3.fromQuaternion(Quaternion.fromAxisAngle(Cartesian3.negate(e,scratch1),d/(h+1),quaterion),rotMatrix):Matrix3.fromQuaternion(Quaternion.fromAxisAngle(e,d/(h+1),quaterion),rotMatrix);if(t=Cartesian3.clone(t,startPointScratch),0<h)for(var f=c?2:1,m=0;m<h;m++)t=Matrix3.multiplyByVector(p,t,t),u=Cartesian3.subtract(t,e,scratch1),u=Cartesian3.normalize(u,u),n||(u=Cartesian3.negate(u,u)),o=addPosition(a.scaleToGeodeticSurface(t,scratch2),u,s,o,a,l,1,f);else u=Cartesian3.subtract(t,e,scratch1),u=Cartesian3.normalize(u,u),n||(u=Cartesian3.negate(u,u)),o=addPosition(a.scaleToGeodeticSurface(t,scratch2),u,s,o,a,l,1,1),i=Cartesian3.clone(i,startPointScratch),u=Cartesian3.subtract(i,e,scratch1),u=Cartesian3.normalize(u,u),n||(u=Cartesian3.negate(u,u)),o=addPosition(a.scaleToGeodeticSurface(i,scratch2),u,s,o,a,l,1,1);return o}PolylineVolumeGeometryLibrary.removeDuplicatesFromShape=function(e){for(var t=e.length,i=[],r=t-1,n=0;n<t;r=n++){var a=e[r],o=e[n];Cartesian2.equals(a,o)||i.push(o)}return i},PolylineVolumeGeometryLibrary.angleIsGreaterThanPi=function(e,t,i,r){return e=(r=new EllipsoidTangentPlane(i,r)).projectPointOntoPlane(Cartesian3.add(i,e,nextScratch),nextScratch),0<=(t=r.projectPointOntoPlane(Cartesian3.add(i,t,prevScratch),prevScratch)).x*e.y-t.y*e.x};var scratchForwardProjection=new Cartesian3,scratchBackwardProjection=new Cartesian3;PolylineVolumeGeometryLibrary.computePositions=function(e,t,i,r,n){var a=r._ellipsoid,o=scaleToSurface(e,a),s=r._granularity,l=r._cornerType,c=(n?convertShapeTo3DDuplicate:convertShapeTo3D)(t,i),u=(t=n?convertShapeTo3D(t,i):void 0,i.height/2),d=i.width/2,h=e.length,p=[],f=(i=n?[]:void 0,scratchCartesian1$5),m=scratchCartesian2$5,g=scratchCartesian3$6,y=scratchCartesian4$2,_=scratchCartesian5$1,v=scratchCartesian6$1,C=scratchCartesian7,x=scratchCartesian8,b=scratchCartesian9,S=e[0],T=e[1];y=a.geodeticSurfaceNormal(S,y);f=Cartesian3.subtract(T,S,f),f=Cartesian3.normalize(f,f),x=Cartesian3.cross(y,f,x),x=Cartesian3.normalize(x,x);var E,w=o[0],A=o[1];n&&(i=addPosition(S,x,t,i,a,w+u,1,1)),b=Cartesian3.clone(S,b),S=T,m=Cartesian3.negate(f,m);for(var P=1;P<h-1;P++){var D=n?2:1;T=e[P+1],f=Cartesian3.subtract(T,S,f);f=Cartesian3.normalize(f,f),g=Cartesian3.add(f,m,g),g=Cartesian3.normalize(g,g),y=a.geodeticSurfaceNormal(S,y);var M=Cartesian3.multiplyByScalar(y,Cartesian3.dot(f,y),scratchForwardProjection);Cartesian3.subtract(f,M,M),Cartesian3.normalize(M,M);var I=Cartesian3.multiplyByScalar(y,Cartesian3.dot(m,y),scratchBackwardProjection);Cartesian3.subtract(m,I,I),Cartesian3.normalize(I,I),CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(M,I)),1,CesiumMath.EPSILON7)?(p=addPosition(b,x,c,p,a,w+u,1,1),b=S):(g=Cartesian3.cross(g,y,g),g=Cartesian3.cross(y,g,g),g=Cartesian3.normalize(g,g),M=1/Math.max(.25,Cartesian3.magnitude(Cartesian3.cross(g,m,scratch1))),(I=PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(f,m,S,a))?(_=Cartesian3.add(S,Cartesian3.multiplyByScalar(g,M*d,g),_),v=Cartesian3.add(_,Cartesian3.multiplyByScalar(x,d,v),v),scratch2Array[0]=Cartesian3.clone(b,scratch2Array[0]),scratch2Array[1]=Cartesian3.clone(v,scratch2Array[1]),E=subdivideHeights$1(scratch2Array,w+u,A+u,s),p=addPositions(PolylinePipeline.generateArc({positions:scratch2Array,granularity:s,ellipsoid:a}),x,c,p,a,E,1),x=Cartesian3.cross(y,f,x),x=Cartesian3.normalize(x,x),C=Cartesian3.add(_,Cartesian3.multiplyByScalar(x,d,C),C),l===CornerType$1.ROUNDED||l===CornerType$1.BEVELED?computeRoundCorner(_,v,C,l,I,a,p,c,A+u,n):p=addPosition(S,g=Cartesian3.negate(g,g),c,p,a,A+u,M,D)):(_=Cartesian3.add(S,Cartesian3.multiplyByScalar(g,M*d,g),_),v=Cartesian3.add(_,Cartesian3.multiplyByScalar(x,-d,v),v),scratch2Array[0]=Cartesian3.clone(b,scratch2Array[0]),scratch2Array[1]=Cartesian3.clone(v,scratch2Array[1]),E=subdivideHeights$1(scratch2Array,w+u,A+u,s),p=addPositions(PolylinePipeline.generateArc({positions:scratch2Array,granularity:s,ellipsoid:a}),x,c,p,a,E,1),x=Cartesian3.cross(y,f,x),x=Cartesian3.normalize(x,x),C=Cartesian3.add(_,Cartesian3.multiplyByScalar(x,-d,C),C),l===CornerType$1.ROUNDED||l===CornerType$1.BEVELED?computeRoundCorner(_,v,C,l,I,a,p,c,A+u,n):p=addPosition(S,g,c,p,a,A+u,M,D)),b=Cartesian3.clone(C,b),m=Cartesian3.negate(f,m)),w=A,A=o[P+1],S=T}return scratch2Array[0]=Cartesian3.clone(b,scratch2Array[0]),scratch2Array[1]=Cartesian3.clone(S,scratch2Array[1]),E=subdivideHeights$1(scratch2Array,w+u,A+u,s),p=addPositions(PolylinePipeline.generateArc({positions:scratch2Array,granularity:s,ellipsoid:a}),x,c,p,a,E,1),n&&(i=addPosition(S,x,t,i,a,A+u,1,1)),h=p.length,t=n?h+i.length:h,(t=new Float64Array(t)).set(p),n&&t.set(i,h),t};var CorridorGeometryLibrary={},scratch1$1=new Cartesian3,scratch2$1=new Cartesian3,scratch3=new Cartesian3,scratch4=new Cartesian3,scaleArray2=[new Cartesian3,new Cartesian3],cartesian1=new Cartesian3,cartesian2=new Cartesian3,cartesian3=new Cartesian3,cartesian4=new Cartesian3,cartesian5=new Cartesian3,cartesian6=new Cartesian3,cartesian7=new Cartesian3,cartesian8=new Cartesian3,cartesian9=new Cartesian3,cartesian10=new Cartesian3,quaterion$1=new Quaternion,rotMatrix$1=new Matrix3;function computeRoundCorner$1(e,t,i,r,n){var a,o=Cartesian3.angleBetween(Cartesian3.subtract(t,e,scratch1$1),Cartesian3.subtract(i,e,scratch2$1)),s=r===CornerType$1.BEVELED?1:Math.ceil(o/CesiumMath.toRadians(5))+1,l=(r=3*s,new Array(r));l[r-3]=i.x,l[r-2]=i.y,l[r-1]=i.z,a=n?Matrix3.fromQuaternion(Quaternion.fromAxisAngle(Cartesian3.negate(e,scratch1$1),o/s,quaterion$1),rotMatrix$1):Matrix3.fromQuaternion(Quaternion.fromAxisAngle(e,o/s,quaterion$1),rotMatrix$1);var c=0;t=Cartesian3.clone(t,scratch1$1);for(var u=0;u<s;u++)t=Matrix3.multiplyByVector(a,t,t),l[c++]=t.x,l[c++]=t.y,l[c++]=t.z;return l}function addEndCaps(e){var t=cartesian1,i=cartesian2,r=cartesian3,n=e[1],a=(i=Cartesian3.fromArray(e[1],n.length-3,i),r=Cartesian3.fromArray(e[0],0,r),computeRoundCorner$1(t=Cartesian3.midpoint(i,r,t),i,r,CornerType$1.ROUNDED,!1)),o=e.length-1,s=e[o-1];n=e[o];return i=Cartesian3.fromArray(s,s.length-3,i),r=Cartesian3.fromArray(n,0,r),[a,computeRoundCorner$1(t=Cartesian3.midpoint(i,r,t),i,r,CornerType$1.ROUNDED,!1)]}function computeMiteredCorner(e,t,i,r){var n=scratch1$1;return[(r||(t=Cartesian3.negate(t,t)),n=Cartesian3.add(e,t,n)).x,n.y,n.z,i.x,i.y,i.z]}function addShiftedPositions(e,t,i,r){for(var n=new Array(e.length),a=new Array(e.length),o=Cartesian3.multiplyByScalar(t,i,scratch1$1),s=Cartesian3.negate(o,scratch2$1),l=0,c=e.length-1,u=0;u<e.length;u+=3){var d=Cartesian3.fromArray(e,u,scratch3),h=Cartesian3.add(d,s,scratch4);n[l++]=h.x,n[l++]=h.y,n[l++]=h.z,d=Cartesian3.add(d,o,scratch4),a[c--]=d.z,a[c--]=d.y,a[c--]=d.x}return r.push(n,a),r}CorridorGeometryLibrary.addAttribute=function(e,t,i,r){var n=t.x,a=t.y;t=t.z;defined(i)&&(e[i]=n,e[i+1]=a,e[i+2]=t),defined(r)&&(e[r]=t,e[r-1]=a,e[r-2]=n)};var scratchForwardProjection$1=new Cartesian3,scratchBackwardProjection$1=new Cartesian3;CorridorGeometryLibrary.computePositions=function(e){var t=e.granularity,i=e.positions,r=e.ellipsoid,n=e.width/2,a=e.cornerType,o=e.saveAttributes,s=cartesian1,l=cartesian2,c=cartesian3,u=cartesian4,d=cartesian5,h=cartesian6,p=cartesian7,f=cartesian8,m=cartesian9,g=cartesian10,y=[],_=o?[]:void 0,v=o?[]:void 0,C=i[0],x=i[1];l=Cartesian3.normalize(Cartesian3.subtract(x,C,l),l),s=r.geodeticSurfaceNormal(C,s),u=Cartesian3.normalize(Cartesian3.cross(s,l,u),u);o&&(_.push(u.x,u.y,u.z),v.push(s.x,s.y,s.z)),p=Cartesian3.clone(C,p),C=x,c=Cartesian3.negate(l,c);for(var b,S=[],T=i.length,E=1;E<T-1;E++){s=r.geodeticSurfaceNormal(C,s),x=i[E+1],l=Cartesian3.normalize(Cartesian3.subtract(x,C,l),l),d=Cartesian3.normalize(Cartesian3.add(l,c,d),d);var w=Cartesian3.multiplyByScalar(s,Cartesian3.dot(l,s),scratchForwardProjection$1);Cartesian3.subtract(l,w,w),Cartesian3.normalize(w,w);var A=Cartesian3.multiplyByScalar(s,Cartesian3.dot(c,s),scratchBackwardProjection$1);Cartesian3.subtract(c,A,A),Cartesian3.normalize(A,A),CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(w,A)),1,CesiumMath.EPSILON7)||(d=Cartesian3.cross(d,s,d),d=Cartesian3.cross(s,d,d),d=Cartesian3.normalize(d,d),w=n/Math.max(.25,Cartesian3.magnitude(Cartesian3.cross(d,c,scratch1$1))),A=PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(l,c,C,r),d=Cartesian3.multiplyByScalar(d,w,d),A?(f=Cartesian3.add(C,d,f),g=Cartesian3.add(f,Cartesian3.multiplyByScalar(u,n,g),g),m=Cartesian3.add(f,Cartesian3.multiplyByScalar(u,2*n,m),m),scaleArray2[0]=Cartesian3.clone(p,scaleArray2[0]),scaleArray2[1]=Cartesian3.clone(g,scaleArray2[1]),y=addShiftedPositions(PolylinePipeline.generateArc({positions:scaleArray2,granularity:t,ellipsoid:r}),u,n,y),o&&(_.push(u.x,u.y,u.z),v.push(s.x,s.y,s.z)),h=Cartesian3.clone(m,h),u=Cartesian3.normalize(Cartesian3.cross(s,l,u),u),m=Cartesian3.add(f,Cartesian3.multiplyByScalar(u,2*n,m),m),p=Cartesian3.add(f,Cartesian3.multiplyByScalar(u,n,p),p),a===CornerType$1.ROUNDED||a===CornerType$1.BEVELED?S.push({leftPositions:computeRoundCorner$1(f,h,m,a,A)}):S.push({leftPositions:computeMiteredCorner(C,Cartesian3.negate(d,d),m,A)})):(m=Cartesian3.add(C,d,m),g=Cartesian3.add(m,Cartesian3.negate(Cartesian3.multiplyByScalar(u,n,g),g),g),f=Cartesian3.add(m,Cartesian3.negate(Cartesian3.multiplyByScalar(u,2*n,f),f),f),scaleArray2[0]=Cartesian3.clone(p,scaleArray2[0]),scaleArray2[1]=Cartesian3.clone(g,scaleArray2[1]),y=addShiftedPositions(PolylinePipeline.generateArc({positions:scaleArray2,granularity:t,ellipsoid:r}),u,n,y),o&&(_.push(u.x,u.y,u.z),v.push(s.x,s.y,s.z)),h=Cartesian3.clone(f,h),u=Cartesian3.normalize(Cartesian3.cross(s,l,u),u),f=Cartesian3.add(m,Cartesian3.negate(Cartesian3.multiplyByScalar(u,2*n,f),f),f),p=Cartesian3.add(m,Cartesian3.negate(Cartesian3.multiplyByScalar(u,n,p),p),p),a===CornerType$1.ROUNDED||a===CornerType$1.BEVELED?S.push({rightPositions:computeRoundCorner$1(m,h,f,a,A)}):S.push({rightPositions:computeMiteredCorner(C,d,f,A)})),c=Cartesian3.negate(l,c)),C=x}return s=r.geodeticSurfaceNormal(C,s),scaleArray2[0]=Cartesian3.clone(p,scaleArray2[0]),scaleArray2[1]=Cartesian3.clone(C,scaleArray2[1]),y=addShiftedPositions(PolylinePipeline.generateArc({positions:scaleArray2,granularity:t,ellipsoid:r}),u,n,y),o&&(_.push(u.x,u.y,u.z),v.push(s.x,s.y,s.z)),a===CornerType$1.ROUNDED&&(b=addEndCaps(y)),{positions:y,corners:S,lefts:_,normals:v,endPositions:b}};var cartesian1$1=new Cartesian3,cartesian2$1=new Cartesian3,cartesian3$1=new Cartesian3,cartesian4$1=new Cartesian3,cartesian5$1=new Cartesian3,cartesian6$1=new Cartesian3,scratch1$2=new Cartesian3,scratch2$2=new Cartesian3;function scaleToSurface$1(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function addNormals(e,t,i,r,n,a){var o=e.normals,s=e.tangents,l=e.bitangents;e=Cartesian3.normalize(Cartesian3.cross(i,t,scratch1$2),scratch1$2);a.normal&&CorridorGeometryLibrary.addAttribute(o,t,r,n),a.tangent&&CorridorGeometryLibrary.addAttribute(s,e,r,n),a.bitangent&&CorridorGeometryLibrary.addAttribute(l,i,r,n)}function combine$1(e,t,i){var r,n=e.positions,a=e.corners,o=e.endPositions,s=e.lefts,l=e.normals,c=new GeometryAttributes,u=0,d=0,h=0;for(R=0;R<n.length;R+=2)u+=r=n[R].length-3,h+=2*r,d+=n[R+1].length-3;for(u+=3,d+=3,R=0;R<a.length;R++){z=a[R];var p=a[R].leftPositions;defined(p)?u+=r=p.length:d+=r=a[R].rightPositions.length,h+=r}var f,m=defined(o);m&&(u+=f=o[0].length-3,d+=f,h+=6*(f/=3));e=u+d;var g,y,_,v,C,x,b=new Float64Array(e),S={normals:t.normal?new Float32Array(e):void 0,tangents:t.tangent?new Float32Array(e):void 0,bitangents:t.bitangent?new Float32Array(e):void 0},T=0,E=e-1,w=cartesian1$1,A=cartesian2$1,P=f/2,D=IndexDatatype$1.createTypedArray(e/3,h),M=0;if(m){x=cartesian3$1,C=cartesian4$1;for(var I=o[0],R=(w=Cartesian3.fromArray(l,0,w),A=Cartesian3.fromArray(s,0,A),0);R<P;R++)x=Cartesian3.fromArray(I,3*(P-1-R),x),C=Cartesian3.fromArray(I,3*(P+R),C),CorridorGeometryLibrary.addAttribute(b,C,T),CorridorGeometryLibrary.addAttribute(b,x,void 0,E),addNormals(S,w,A,T,E,t),v=1+(y=T/3),_=(g=(E-2)/3)-1,D[M++]=g,D[M++]=y,D[M++]=_,D[M++]=_,D[M++]=y,D[M++]=v,T+=3,E-=3}var O,L,N=0,F=0,B=n[N++],V=n[N++];for(b.set(B,T),b.set(V,E-V.length+1),A=Cartesian3.fromArray(s,F,A),r=V.length-3,R=0;R<r;R+=3)O=i.geodeticSurfaceNormal(Cartesian3.fromArray(B,R,scratch1$2),scratch1$2),L=i.geodeticSurfaceNormal(Cartesian3.fromArray(V,r-R,scratch2$2),scratch2$2),addNormals(S,w=Cartesian3.normalize(Cartesian3.add(O,L,w),w),A,T,E,t),v=1+(y=T/3),_=(g=(E-2)/3)-1,D[M++]=g,D[M++]=y,D[M++]=_,D[M++]=_,D[M++]=y,D[M++]=v,T+=3,E-=3;for(O=i.geodeticSurfaceNormal(Cartesian3.fromArray(B,r,scratch1$2),scratch1$2),L=i.geodeticSurfaceNormal(Cartesian3.fromArray(V,r,scratch2$2),scratch2$2),w=Cartesian3.normalize(Cartesian3.add(O,L,w),w),F+=3,R=0;R<a.length;R++){var k,z,G,U,$=(z=a[R]).leftPositions,H=z.rightPositions,W=cartesian6$1,j=cartesian3$1,q=cartesian4$1;if(w=Cartesian3.fromArray(l,F,w),defined($)){for(addNormals(S,w,A,void 0,E,t),E-=3,G=v,U=_,k=0;k<$.length/3;k++)W=Cartesian3.fromArray($,3*k,W),D[M++]=G,D[M++]=U-k-1,D[M++]=U-k,CorridorGeometryLibrary.addAttribute(b,W,void 0,E),j=Cartesian3.fromArray(b,3*(U-k-1),j),q=Cartesian3.fromArray(b,3*G,q),addNormals(S,w,A=Cartesian3.normalize(Cartesian3.subtract(j,q,A),A),void 0,E,t),E-=3;W=Cartesian3.fromArray(b,3*G,W),j=Cartesian3.subtract(Cartesian3.fromArray(b,3*U,j),W,j),q=Cartesian3.subtract(Cartesian3.fromArray(b,3*(U-k),q),W,q),addNormals(S,w,A=Cartesian3.normalize(Cartesian3.add(j,q,A),A),T,void 0,t),T+=3}else{for(addNormals(S,w,A,T,void 0,t),T+=3,G=_,U=v,k=0;k<H.length/3;k++)W=Cartesian3.fromArray(H,3*k,W),D[M++]=G,D[M++]=U+k,D[M++]=U+k+1,CorridorGeometryLibrary.addAttribute(b,W,T),j=Cartesian3.fromArray(b,3*G,j),q=Cartesian3.fromArray(b,3*(U+k),q),addNormals(S,w,A=Cartesian3.normalize(Cartesian3.subtract(j,q,A),A),T,void 0,t),T+=3;W=Cartesian3.fromArray(b,3*G,W),j=Cartesian3.subtract(Cartesian3.fromArray(b,3*(U+k),j),W,j),q=Cartesian3.subtract(Cartesian3.fromArray(b,3*U,q),W,q),addNormals(S,w,A=Cartesian3.normalize(Cartesian3.negate(Cartesian3.add(q,j,A),A),A),void 0,E,t),E-=3}for(B=n[N++],V=n[N++],B.splice(0,3),V.splice(V.length-3,3),b.set(B,T),b.set(V,E-V.length+1),r=V.length-3,F+=3,A=Cartesian3.fromArray(s,F,A),k=0;k<V.length;k+=3)O=i.geodeticSurfaceNormal(Cartesian3.fromArray(B,k,scratch1$2),scratch1$2),L=i.geodeticSurfaceNormal(Cartesian3.fromArray(V,r-k,scratch2$2),scratch2$2),addNormals(S,w=Cartesian3.normalize(Cartesian3.add(O,L,w),w),A,T,E,t),y=(v=T/3)-1,g=1+(_=(E-2)/3),D[M++]=g,D[M++]=y,D[M++]=_,D[M++]=_,D[M++]=y,D[M++]=v,T+=3,E-=3;T-=3,E+=3}if(addNormals(S,w=Cartesian3.fromArray(l,l.length-3,w),A,T,E,t),m){T+=3,E-=3,x=cartesian3$1,C=cartesian4$1;var Y=o[1];for(R=0;R<P;R++)x=Cartesian3.fromArray(Y,3*(f-R-1),x),C=Cartesian3.fromArray(Y,3*R,C),CorridorGeometryLibrary.addAttribute(b,x,void 0,E),CorridorGeometryLibrary.addAttribute(b,C,T),addNormals(S,w,A,T,E,t),y=(v=T/3)-1,g=1+(_=(E-2)/3),D[M++]=g,D[M++]=y,D[M++]=_,D[M++]=_,D[M++]=y,D[M++]=v,T+=3,E-=3}if(c.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:b}),t.st){var X=new Float32Array(e/3*2),Q=0;if(m){u/=3,d/=3;var Z,J=Math.PI/(f+1),K=1/(u-f+1),ee=1/(d-f+1),te=f/2;for(R=1+te;R<f+1;R++)Z=CesiumMath.PI_OVER_TWO+J*R,X[Q++]=ee*(1+Math.cos(Z)),X[Q++]=.5*(1+Math.sin(Z));for(R=1;R<d-f+1;R++)X[Q++]=R*ee,X[Q++]=0;for(R=f;te<R;R--)Z=CesiumMath.PI_OVER_TWO-R*J,X[Q++]=1-ee*(1+Math.cos(Z)),X[Q++]=.5*(1+Math.sin(Z));for(R=te;0<R;R--)Z=CesiumMath.PI_OVER_TWO-J*R,X[Q++]=1-K*(1+Math.cos(Z)),X[Q++]=.5*(1+Math.sin(Z));for(R=u-f;0<R;R--)X[Q++]=R*K,X[Q++]=1;for(R=1;R<1+te;R++)Z=CesiumMath.PI_OVER_TWO+J*R,X[Q++]=K*(1+Math.cos(Z)),X[Q++]=.5*(1+Math.sin(Z))}else{for(K=1/((u/=3)-1),ee=1/((d/=3)-1),R=0;R<d;R++)X[Q++]=R*ee,X[Q++]=0;for(R=u;0<R;R--)X[Q++]=(R-1)*K,X[Q++]=1}c.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:X})}return t.normal&&(c.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:S.normals})),t.tangent&&(c.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:S.tangents})),t.bitangent&&(c.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:S.bitangents})),{attributes:c,indices:D}}function extrudedAttributes(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;var i,r=e.position.values;(t.normal||t.bitangent)&&(i=e.normal.values,l=e.bitangent.values);var n=e.position.values.length/18,a=3*n,o=2*n,s=2*a;if(t.normal||t.bitangent||t.tangent){for(var l,c=t.normal?new Float32Array(6*a):void 0,u=t.tangent?new Float32Array(6*a):void 0,d=t.bitangent?new Float32Array(6*a):void 0,h=cartesian1$1,p=cartesian2$1,f=cartesian3$1,m=cartesian4$1,g=cartesian5$1,y=cartesian6$1,_=s,v=0;v<a;v+=3){var C=_+s;h=Cartesian3.fromArray(r,v,h),p=Cartesian3.fromArray(r,v+a,p),f=Cartesian3.fromArray(r,(v+3)%a,f);p=Cartesian3.subtract(p,h,p),f=Cartesian3.subtract(f,h,f),m=Cartesian3.normalize(Cartesian3.cross(p,f,m),m),t.normal&&(CorridorGeometryLibrary.addAttribute(c,m,C),CorridorGeometryLibrary.addAttribute(c,m,C+3),CorridorGeometryLibrary.addAttribute(c,m,_),CorridorGeometryLibrary.addAttribute(c,m,_+3)),(t.tangent||t.bitangent)&&(y=Cartesian3.fromArray(i,v,y),t.bitangent&&(CorridorGeometryLibrary.addAttribute(d,y,C),CorridorGeometryLibrary.addAttribute(d,y,C+3),CorridorGeometryLibrary.addAttribute(d,y,_),CorridorGeometryLibrary.addAttribute(d,y,_+3)),t.tangent&&(g=Cartesian3.normalize(Cartesian3.cross(y,m,g),g),CorridorGeometryLibrary.addAttribute(u,g,C),CorridorGeometryLibrary.addAttribute(u,g,C+3),CorridorGeometryLibrary.addAttribute(u,g,_),CorridorGeometryLibrary.addAttribute(u,g,_+3))),_+=6}if(t.normal){for(c.set(i),v=0;v<a;v+=3)c[v+a]=-i[v],c[v+a+1]=-i[v+1],c[v+a+2]=-i[v+2];e.normal.values=c}else e.normal=void 0;t.bitangent?(d.set(l),d.set(l,a),e.bitangent.values=d):e.bitangent=void 0,t.tangent&&(l=e.tangent.values,u.set(l),u.set(l,a),e.tangent.values=u)}if(t.st){var x=e.st.values,b=new Float32Array(6*o);b.set(x),b.set(x,o);for(var S=2*o,T=0;T<2;T++){for(b[S++]=x[0],b[S++]=x[1],v=2;v<o;v+=2){var E=x[v],w=x[v+1];b[S++]=E,b[S++]=w,b[S++]=E,b[S++]=w}b[S++]=x[0],b[S++]=x[1]}e.st.values=b}return e}function addWallPositions(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var r=3;r<e.length;r+=3){var n=e[r],a=e[r+1],o=e[r+2];i[t++]=n,i[t++]=a,i[t++]=o,i[t++]=n,i[t++]=a,i[t++]=o}return i[t++]=e[0],i[t++]=e[1],i[t++]=e[2],i}function computePositionsExtruded(e,t){var i=new VertexFormat({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),r=e.ellipsoid,n=combine$1(CorridorGeometryLibrary.computePositions(e),i,r),a=e.height,o=e.extrudedHeight,s=n.attributes,l=n.indices,c=s.position.values,u=c.length,d=new Float64Array(6*u);(i=new Float64Array(u)).set(c),n=new Float64Array(4*u),n=addWallPositions(c=PolygonPipeline.scaleToGeodeticHeight(c,a,r),0,n),n=addWallPositions(i=PolygonPipeline.scaleToGeodeticHeight(i,o,r),2*u,n),d.set(c),d.set(i,u),d.set(n,2*u),s.position.values=d,s=extrudedAttributes(s,t);var h=u/3;if(e.shadowVolume){for(var p=s.normal.values,f=(u=p.length,n=new Float32Array(6*u),0);f<u;f++)p[f]=-p[f];n.set(p,u),n=addWallPositions(p,4*u,n),s.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:n}),t.normal||(s.normal=void 0)}defined(e.offsetAttribute)&&(t=new Uint8Array(6*h),t=e.offsetAttribute===GeometryOffsetAttribute$1.TOP?(t=arrayFill(t,1,0,h),arrayFill(t,1,2*h,4*h)):arrayFill(t,e.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),s.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t}));var m=l.length,g=h+h,y=IndexDatatype$1.createTypedArray(d.length/3,2*m+3*g);y.set(l);var _,v,C,x,b=m;for(f=0;f<m;f+=3){var S=l[f],T=l[f+1],E=l[f+2];y[b++]=E+h,y[b++]=T+h,y[b++]=S+h}for(f=0;f<g;f+=2)C=(_=f+g)+1,x=(v=_+g)+1,y[b++]=_,y[b++]=v,y[b++]=C,y[b++]=C,y[b++]=v,y[b++]=x;return{attributes:s,indices:y}}var scratchCartesian1$6=new Cartesian3,scratchCartesian2$6=new Cartesian3,scratchCartographic$2=new Cartographic;function computeOffsetPoints(e,t,i,r,n,a){var o=Cartesian3.subtract(t,e,scratchCartesian1$6);Cartesian3.normalize(o,o);var s=i.geodeticSurfaceNormal(e,scratchCartesian2$6),l=Cartesian3.cross(o,s,scratchCartesian1$6);Cartesian3.multiplyByScalar(l,r,l);var c=n.latitude,u=n.longitude;t=a.latitude,o=a.longitude;Cartesian3.add(e,l,scratchCartesian2$6),i.cartesianToCartographic(scratchCartesian2$6,scratchCartographic$2),s=scratchCartographic$2.latitude,r=scratchCartographic$2.longitude,c=Math.min(c,s),u=Math.min(u,r),t=Math.max(t,s),o=Math.max(o,r),Cartesian3.subtract(e,l,scratchCartesian2$6),i.cartesianToCartographic(scratchCartesian2$6,scratchCartographic$2),s=scratchCartographic$2.latitude,r=scratchCartographic$2.longitude,c=Math.min(c,s),u=Math.min(u,r),t=Math.max(t,s),o=Math.max(o,r),n.latitude=c,n.longitude=u,a.latitude=t,a.longitude=o}var scratchCartesianOffset=new Cartesian3,scratchCartesianEnds=new Cartesian3,scratchCartographicMin=new Cartographic,scratchCartographicMax=new Cartographic;function computeRectangle$1(e,t,i,r,n){var a=arrayRemoveDuplicates(e=scaleToSurface$1(e,t),Cartesian3.equalsEpsilon),o=a.length;if(o<2||i<=0)return new Rectangle;var s,l,c=.5*i;scratchCartographicMin.latitude=Number.POSITIVE_INFINITY,scratchCartographicMin.longitude=Number.POSITIVE_INFINITY,scratchCartographicMax.latitude=Number.NEGATIVE_INFINITY,scratchCartographicMax.longitude=Number.NEGATIVE_INFINITY,r===CornerType$1.ROUNDED&&(d=a[0],Cartesian3.subtract(d,a[1],scratchCartesianOffset),Cartesian3.normalize(scratchCartesianOffset,scratchCartesianOffset),Cartesian3.multiplyByScalar(scratchCartesianOffset,c,scratchCartesianOffset),Cartesian3.add(d,scratchCartesianOffset,scratchCartesianEnds),t.cartesianToCartographic(scratchCartesianEnds,scratchCartographic$2),s=scratchCartographic$2.latitude,l=scratchCartographic$2.longitude,scratchCartographicMin.latitude=Math.min(scratchCartographicMin.latitude,s),scratchCartographicMin.longitude=Math.min(scratchCartographicMin.longitude,l),scratchCartographicMax.latitude=Math.max(scratchCartographicMax.latitude,s),scratchCartographicMax.longitude=Math.max(scratchCartographicMax.longitude,l));for(var u=0;u<o-1;++u)computeOffsetPoints(a[u],a[u+1],t,c,scratchCartographicMin,scratchCartographicMax);var d=a[o-1];return Cartesian3.subtract(d,a[o-2],scratchCartesianOffset),Cartesian3.normalize(scratchCartesianOffset,scratchCartesianOffset),Cartesian3.multiplyByScalar(scratchCartesianOffset,c,scratchCartesianOffset),Cartesian3.add(d,scratchCartesianOffset,scratchCartesianEnds),computeOffsetPoints(d,scratchCartesianEnds,t,c,scratchCartographicMin,scratchCartographicMax),r===CornerType$1.ROUNDED&&(t.cartesianToCartographic(scratchCartesianEnds,scratchCartographic$2),s=scratchCartographic$2.latitude,l=scratchCartographic$2.longitude,scratchCartographicMin.latitude=Math.min(scratchCartographicMin.latitude,s),scratchCartographicMin.longitude=Math.min(scratchCartographicMin.longitude,l),scratchCartographicMax.latitude=Math.max(scratchCartographicMax.latitude,s),scratchCartographicMax.longitude=Math.max(scratchCartographicMax.longitude,l)),(n=defined(n)?n:new Rectangle).north=scratchCartographicMax.latitude,n.south=scratchCartographicMin.latitude,n.east=scratchCartographicMax.longitude,n.west=scratchCartographicMin.longitude,n}function CorridorGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.width,r=defaultValue(e.height,0),n=defaultValue(e.extrudedHeight,r);this._positions=t,this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._vertexFormat=VertexFormat.clone(defaultValue(e.vertexFormat,VertexFormat.DEFAULT)),this._width=i,this._height=Math.max(r,n),this._extrudedHeight=Math.min(r,n),this._cornerType=defaultValue(e.cornerType,CornerType$1.ROUNDED),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*Cartesian3.packedLength+Ellipsoid.packedLength+VertexFormat.packedLength+7}CorridorGeometry.pack=function(e,t,i){i=defaultValue(i,0);var r=e._positions,n=r.length;t[i++]=n;for(var a=0;a<n;++a,i+=Cartesian3.packedLength)Cartesian3.pack(r[a],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i++]=e._shadowVolume?1:0,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchEllipsoid$3=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$3=new VertexFormat,scratchOptions$8={positions:void 0,ellipsoid:scratchEllipsoid$3,vertexFormat:scratchVertexFormat$3,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};CorridorGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);var o=Ellipsoid.unpack(e,t,scratchEllipsoid$3);t+=Ellipsoid.packedLength;var s=VertexFormat.unpack(e,t,scratchVertexFormat$3);t+=VertexFormat.packedLength;var l=e[t++],c=e[t++],u=e[t++],d=e[t++],h=e[t++],p=1===e[t++],f=e[t];return defined(i)?(i._positions=n,i._ellipsoid=Ellipsoid.clone(o,i._ellipsoid),i._vertexFormat=VertexFormat.clone(s,i._vertexFormat),i._width=l,i._height=c,i._extrudedHeight=u,i._cornerType=d,i._granularity=h,i._shadowVolume=p,i._offsetAttribute=-1===f?void 0:f,i):(scratchOptions$8.positions=n,scratchOptions$8.width=l,scratchOptions$8.height=c,scratchOptions$8.extrudedHeight=u,scratchOptions$8.cornerType=d,scratchOptions$8.granularity=h,scratchOptions$8.shadowVolume=p,scratchOptions$8.offsetAttribute=-1===f?void 0:f,new CorridorGeometry(scratchOptions$8))},CorridorGeometry.computeRectangle=function(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,r=e.width;return computeRectangle$1(i,defaultValue(e.ellipsoid,Ellipsoid.WGS84),r,defaultValue(e.cornerType,CornerType$1.ROUNDED),t)},CorridorGeometry.createGeometry=function(e){var t=e._positions,i=e._width,r=e._ellipsoid,n=arrayRemoveDuplicates(t=scaleToSurface$1(t,r),Cartesian3.equalsEpsilon);if(!(n.length<2||i<=0)){var a,o=e._height,s=e._extrudedHeight,l=!CesiumMath.equalsEpsilon(o,s,0,CesiumMath.EPSILON2);t=e._vertexFormat,i={ellipsoid:r,positions:n,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};l?(i.height=o,i.extrudedHeight=s,i.shadowVolume=e._shadowVolume,i.offsetAttribute=e._offsetAttribute,a=computePositionsExtruded(i,t)):((a=combine$1(CorridorGeometryLibrary.computePositions(i),t,r)).attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(a.attributes.position.values,o,r),defined(e._offsetAttribute)&&(c=e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1,u=a.attributes.position.values.length,arrayFill(u=new Uint8Array(u/3),c),a.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})));var c=a.attributes,u=BoundingSphere.fromVertices(c.position.values,void 0,3);return t.position||(a.attributes.position.values=void 0),new Geometry({attributes:c,indices:a.indices,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:u,offsetAttribute:e._offsetAttribute})}},CorridorGeometry.createShadowVolume=function(e,t,i){var r=e._granularity,n=e._ellipsoid;t=t(r,n),i=i(r,n);return new CorridorGeometry({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:n,granularity:r,extrudedHeight:t,height:i,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(CorridorGeometry.prototype,{rectangle:{get:function(){return defined(this._rectangle)||(this._rectangle=computeRectangle$1(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var cartesian1$2=new Cartesian3,cartesian2$2=new Cartesian3,cartesian3$2=new Cartesian3;function scaleToSurface$2(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function combine$2(e,t){var i,r=[],n=e.positions,a=e.corners,o=e.endPositions,s=new GeometryAttributes,l=0,c=0,u=0;for(A=0;A<n.length;A+=2)l+=i=n[A].length-3,u+=i/3*4,c+=n[A+1].length-3;for(l+=3,c+=3,A=0;A<a.length;A++){R=a[A];var d=a[A].leftPositions;defined(d)?l+=i=d.length:c+=i=a[A].rightPositions.length,u+=i/3*2}var h,p=defined(o);p&&(l+=h=o[0].length-3,c+=h,u+=4*(h/=3));e=l+c;var f,m,g,y,_,v,C=new Float64Array(e),x=0,b=e-1,S=h/2,T=IndexDatatype$1.createTypedArray(e/3,u+4),E=0;if(T[E++]=x/3,T[E++]=(b-2)/3,p){r.push(x/3),v=cartesian1$2,_=cartesian2$2;for(var w=o[0],A=0;A<S;A++)v=Cartesian3.fromArray(w,3*(S-1-A),v),_=Cartesian3.fromArray(w,3*(S+A),_),CorridorGeometryLibrary.addAttribute(C,_,x),CorridorGeometryLibrary.addAttribute(C,v,void 0,b),y=1+(m=x/3),g=(f=(b-2)/3)-1,T[E++]=f,T[E++]=g,T[E++]=m,T[E++]=y,x+=3,b-=3}var P=0,D=n[P++],M=n[P++];for(C.set(D,x),C.set(M,b-M.length+1),i=M.length-3,r.push(x/3,(b-2)/3),A=0;A<i;A+=3)y=1+(m=x/3),g=(f=(b-2)/3)-1,T[E++]=f,T[E++]=g,T[E++]=m,T[E++]=y,x+=3,b-=3;for(A=0;A<a.length;A++){var I,R,O,L=(R=a[A]).leftPositions,N=R.rightPositions,F=cartesian3$2;if(defined(L)){for(b-=3,O=g,r.push(y),I=0;I<L.length/3;I++)F=Cartesian3.fromArray(L,3*I,F),T[E++]=O-I-1,T[E++]=O-I,CorridorGeometryLibrary.addAttribute(C,F,void 0,b),b-=3;r.push(O-Math.floor(L.length/6)),t===CornerType$1.BEVELED&&r.push((b-2)/3+1),x+=3}else{for(x+=3,O=y,r.push(g),I=0;I<N.length/3;I++)F=Cartesian3.fromArray(N,3*I,F),T[E++]=O+I,T[E++]=O+I+1,CorridorGeometryLibrary.addAttribute(C,F,x),x+=3;r.push(O+Math.floor(N.length/6)),t===CornerType$1.BEVELED&&r.push(x/3-1),b-=3}for(D=n[P++],M=n[P++],D.splice(0,3),M.splice(M.length-3,3),C.set(D,x),C.set(M,b-M.length+1),i=M.length-3,I=0;I<M.length;I+=3)m=(y=x/3)-1,f=1+(g=(b-2)/3),T[E++]=f,T[E++]=g,T[E++]=m,T[E++]=y,x+=3,b-=3;x-=3,b+=3,r.push(x/3,(b-2)/3)}if(p){x+=3,b-=3,v=cartesian1$2,_=cartesian2$2;var B=o[1];for(A=0;A<S;A++)v=Cartesian3.fromArray(B,3*(h-A-1),v),_=Cartesian3.fromArray(B,3*A,_),CorridorGeometryLibrary.addAttribute(C,v,void 0,b),CorridorGeometryLibrary.addAttribute(C,_,x),m=(y=x/3)-1,f=1+(g=(b-2)/3),T[E++]=f,T[E++]=g,T[E++]=m,T[E++]=y,x+=3,b-=3;r.push(x/3)}else r.push(x/3,(b-2)/3);return T[E++]=x/3,T[E++]=(b-2)/3,s.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:C}),{attributes:s,indices:T,wallIndices:r}}function computePositionsExtruded$1(e){var t=e.ellipsoid,i=(l=combine$2(CorridorGeometryLibrary.computePositions(e),e.cornerType)).wallIndices,r=e.height,n=e.extrudedHeight,a=l.attributes,o=l.indices,s=(c=a.position.values).length;(u=new Float64Array(s)).set(c);var l=new Float64Array(2*s),c=PolygonPipeline.scaleToGeodeticHeight(c,r,t),u=PolygonPipeline.scaleToGeodeticHeight(u,n,t);l.set(c),l.set(u,s),a.position.values=l,s/=3,defined(e.offsetAttribute)&&(u=new Uint8Array(2*s),u=e.offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(u,1,0,s):arrayFill(u,e.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:u}));var d=o.length,h=IndexDatatype$1.createTypedArray(l.length/3,2*(d+i.length));h.set(o);for(var p,f,m=d,g=0;g<d;g+=2){var y=o[g],_=o[g+1];h[m++]=y+s,h[m++]=_+s}for(g=0;g<i.length;g++)f=(p=i[g])+s,h[m++]=p,h[m++]=f;return{attributes:a,indices:h}}function CorridorOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.width,r=defaultValue(e.height,0),n=defaultValue(e.extrudedHeight,r);this._positions=t,this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._width=i,this._height=Math.max(r,n),this._extrudedHeight=Math.min(r,n),this._cornerType=defaultValue(e.cornerType,CornerType$1.ROUNDED),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*Cartesian3.packedLength+Ellipsoid.packedLength+6}CorridorOutlineGeometry.pack=function(e,t,i){i=defaultValue(i,0);var r=e._positions,n=r.length;t[i++]=n;for(var a=0;a<n;++a,i+=Cartesian3.packedLength)Cartesian3.pack(r[a],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchEllipsoid$4=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$9={positions:void 0,ellipsoid:scratchEllipsoid$4,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};function CullingVolume(e){this.planes=defaultValue(e,[])}CorridorOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);var o=Ellipsoid.unpack(e,t,scratchEllipsoid$4);t+=Ellipsoid.packedLength;var s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++],h=e[t];return defined(i)?(i._positions=n,i._ellipsoid=Ellipsoid.clone(o,i._ellipsoid),i._width=s,i._height=l,i._extrudedHeight=c,i._cornerType=u,i._granularity=d,i._offsetAttribute=-1===h?void 0:h,i):(scratchOptions$9.positions=n,scratchOptions$9.width=s,scratchOptions$9.height=l,scratchOptions$9.extrudedHeight=c,scratchOptions$9.cornerType=u,scratchOptions$9.granularity=d,scratchOptions$9.offsetAttribute=-1===h?void 0:h,new CorridorOutlineGeometry(scratchOptions$9))},CorridorOutlineGeometry.createGeometry=function(e){var t=e._positions,i=e._width,r=e._ellipsoid,n=arrayRemoveDuplicates(t=scaleToSurface$2(t,r),Cartesian3.equalsEpsilon);if(!(n.length<2||i<=0)){var a,o=e._height,s=e._extrudedHeight;t=!CesiumMath.equalsEpsilon(o,s,0,CesiumMath.EPSILON2),i={ellipsoid:r,positions:n,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};t?(i.height=o,i.extrudedHeight=s,i.offsetAttribute=e._offsetAttribute,a=computePositionsExtruded$1(i)):((a=combine$2(CorridorGeometryLibrary.computePositions(i),i.cornerType)).attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(a.attributes.position.values,o,r),defined(e._offsetAttribute)&&(l=a.attributes.position.values.length,arrayFill(c=new Uint8Array(l/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})));var l=a.attributes,c=BoundingSphere.fromVertices(l.position.values,void 0,3);return new Geometry({attributes:l,indices:a.indices,primitiveType:PrimitiveType$1.LINES,boundingSphere:c,offsetAttribute:e._offsetAttribute})}};var faces=[new Cartesian3,new Cartesian3,new Cartesian3];Cartesian3.clone(Cartesian3.UNIT_X,faces[0]),Cartesian3.clone(Cartesian3.UNIT_Y,faces[1]),Cartesian3.clone(Cartesian3.UNIT_Z,faces[2]);var scratchPlaneCenter=new Cartesian3,scratchPlaneNormal$1=new Cartesian3,scratchPlane$1=new Plane(new Cartesian3(1,0,0),0);CullingVolume.fromBoundingSphere=function(e,t){defined(t)||(t=new CullingVolume);var i=faces.length,r=t.planes;r.length=2*i;for(var n=e.center,a=e.radius,o=0,s=0;s<i;++s){var l=faces[s],c=r[o],u=r[o+1];defined(c)||(c=r[o]=new Cartesian4),defined(u)||(u=r[o+1]=new Cartesian4),Cartesian3.multiplyByScalar(l,-a,scratchPlaneCenter),Cartesian3.add(n,scratchPlaneCenter,scratchPlaneCenter),c.x=l.x,c.y=l.y,c.z=l.z,c.w=-Cartesian3.dot(l,scratchPlaneCenter),Cartesian3.multiplyByScalar(l,a,scratchPlaneCenter),Cartesian3.add(n,scratchPlaneCenter,scratchPlaneCenter),u.x=-l.x,u.y=-l.y,u.z=-l.z,u.w=-Cartesian3.dot(Cartesian3.negate(l,scratchPlaneNormal$1),scratchPlaneCenter),o+=2}return t},CullingVolume.prototype.computeVisibility=function(e){for(var t=this.planes,i=!1,r=0,n=t.length;r<n;++r){var a=e.intersectPlane(Plane.fromCartesian4(t[r],scratchPlane$1));if(a===Intersect$1.OUTSIDE)return Intersect$1.OUTSIDE;a===Intersect$1.INTERSECTING&&(i=!0)}return i?Intersect$1.INTERSECTING:Intersect$1.INSIDE},CullingVolume.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===CullingVolume.MASK_OUTSIDE||t===CullingVolume.MASK_INSIDE)return t;for(var i=CullingVolume.MASK_INSIDE,r=this.planes,n=0,a=r.length;n<a;++n){var o=n<31?1<<n:0;if(!(n<31&&0==(t&o))){var s=e.intersectPlane(Plane.fromCartesian4(r[n],scratchPlane$1));if(s===Intersect$1.OUTSIDE)return CullingVolume.MASK_OUTSIDE;s===Intersect$1.INTERSECTING&&(i|=o)}}return i},CullingVolume.MASK_OUTSIDE=4294967295,CullingVolume.MASK_INSIDE=0,CullingVolume.MASK_INDETERMINATE=2147483647;var CylinderGeometryLibrary={computePositions:function(e,t,i,r,n){for(var a=.5*e,o=-a,s=(e=r+r,new Float64Array(3*(n?2*e:e))),l=0,c=0,u=n?3*e:0,d=n?3*(e+r):3*r,h=0;h<r;h++){var p=h/r*CesiumMath.TWO_PI,f=(m=Math.cos(p))*i,m=(p=(g=Math.sin(p))*i,m*t),g=g*t;s[c+u]=f,s[c+u+1]=p,s[c+u+2]=o,s[c+d]=m,s[c+d+1]=g,s[c+d+2]=a,c+=3,n&&(s[l++]=f,s[l++]=p,s[l++]=o,s[l++]=m,s[l++]=g,s[l++]=a)}return s}},radiusScratch=new Cartesian2,normalScratch$2=new Cartesian3,bitangentScratch=new Cartesian3,tangentScratch=new Cartesian3,positionScratch$1=new Cartesian3;function CylinderGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,r=e.bottomRadius,n=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),a=defaultValue(e.slices,128);this._length=t,this._topRadius=i,this._bottomRadius=r,this._vertexFormat=VertexFormat.clone(n),this._slices=a,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}CylinderGeometry.packedLength=VertexFormat.packedLength+5,CylinderGeometry.pack=function(e,t,i){return i=defaultValue(i,0),VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchVertexFormat$4=new VertexFormat,scratchOptions$a={vertexFormat:scratchVertexFormat$4,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},unitCylinderGeometry;CylinderGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=VertexFormat.unpack(e,t,scratchVertexFormat$4);t+=VertexFormat.packedLength;var n=e[t++],a=e[t++],o=e[t++],s=e[t++];t=e[t];return defined(i)?(i._vertexFormat=VertexFormat.clone(r,i._vertexFormat),i._length=n,i._topRadius=a,i._bottomRadius=o,i._slices=s,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$a.length=n,scratchOptions$a.topRadius=a,scratchOptions$a.bottomRadius=o,scratchOptions$a.slices=s,scratchOptions$a.offsetAttribute=-1===t?void 0:t,new CylinderGeometry(scratchOptions$a))},CylinderGeometry.createGeometry=function(e){var t=e._length,i=e._topRadius,r=e._bottomRadius,n=e._vertexFormat,a=e._slices;if(!(t<=0||i<0||r<0||0===i&&0===r)){var o=a+a,s=a+o,l=o+o,c=CylinderGeometryLibrary.computePositions(t,i,r,a,!0),u=n.st?new Float32Array(2*l):void 0,d=n.normal?new Float32Array(3*l):void 0,h=n.tangent?new Float32Array(3*l):void 0,p=n.bitangent?new Float32Array(3*l):void 0,f=n.normal||n.tangent||n.bitangent;if(f){var m=n.tangent||n.bitangent,g=0,y=0,_=0,v=Math.atan2(r-i,t),C=normalScratch$2;C.z=Math.sin(v);for(var x=Math.cos(v),b=tangentScratch,S=bitangentScratch,T=0;T<a;T++){var E=T/a*CesiumMath.TWO_PI,w=x*Math.cos(E);E=x*Math.sin(E);f&&(C.x=w,C.y=E,m&&(b=Cartesian3.normalize(Cartesian3.cross(Cartesian3.UNIT_Z,C,b),b)),n.normal&&(d[g++]=C.x,d[g++]=C.y,d[g++]=C.z,d[g++]=C.x,d[g++]=C.y,d[g++]=C.z),n.tangent&&(h[y++]=b.x,h[y++]=b.y,h[y++]=b.z,h[y++]=b.x,h[y++]=b.y,h[y++]=b.z),n.bitangent&&(S=Cartesian3.normalize(Cartesian3.cross(C,b,S),S),p[_++]=S.x,p[_++]=S.y,p[_++]=S.z,p[_++]=S.x,p[_++]=S.y,p[_++]=S.z))}for(T=0;T<a;T++)n.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),n.tangent&&(h[y++]=1,h[y++]=0,h[y++]=0),n.bitangent&&(p[_++]=0,p[_++]=-1,p[_++]=0);for(T=0;T<a;T++)n.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),n.tangent&&(h[y++]=1,h[y++]=0,h[y++]=0),n.bitangent&&(p[_++]=0,p[_++]=1,p[_++]=0)}v=12*a-12;var A=IndexDatatype$1.createTypedArray(l,v),P=0,D=0;for(T=0;T<a-1;T++)A[P++]=D,A[P++]=D+2,A[P++]=D+3,A[P++]=D,A[P++]=D+3,A[P++]=D+1,D+=2;for(A[P++]=o-2,A[P++]=0,A[P++]=1,A[P++]=o-2,A[P++]=1,A[P++]=o-1,T=1;T<a-1;T++)A[P++]=o+T+1,A[P++]=o+T,A[P++]=o;for(T=1;T<a-1;T++)A[P++]=s,A[P++]=s+T,A[P++]=s+T+1;var M=0;if(n.st){var I=Math.max(i,r);for(T=0;T<l;T++){var R=Cartesian3.fromArray(c,3*T,positionScratch$1);u[M++]=(R.x+I)/(2*I),u[M++]=(R.y+I)/(2*I)}}return v=new GeometryAttributes,n.position&&(v.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:c})),n.normal&&(v.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(v.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:h})),n.bitangent&&(v.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:p})),n.st&&(v.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:u})),radiusScratch.x=.5*t,radiusScratch.y=Math.max(r,i),i=new BoundingSphere(Cartesian3.ZERO,Cartesian2.magnitude(radiusScratch)),defined(e._offsetAttribute)&&(t=c.length,arrayFill(t=new Uint8Array(t/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),v.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})),new Geometry({attributes:v,indices:A,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},CylinderGeometry.getUnitCylinder=function(){return defined(unitCylinderGeometry)||(unitCylinderGeometry=CylinderGeometry.createGeometry(new CylinderGeometry({topRadius:1,bottomRadius:1,length:1,vertexFormat:VertexFormat.POSITION_ONLY}))),unitCylinderGeometry};var radiusScratch$1=new Cartesian2;function CylinderOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,r=e.bottomRadius,n=defaultValue(e.slices,128),a=Math.max(defaultValue(e.numberOfVerticalLines,16),0);this._length=t,this._topRadius=i,this._bottomRadius=r,this._slices=n,this._numberOfVerticalLines=a,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}CylinderOutlineGeometry.packedLength=6,CylinderOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchOptions$b={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};function DefaultProxy(e){this.proxy=e}function DistanceDisplayCondition(e,t){e=defaultValue(e,0),this._near=e,t=defaultValue(t,Number.MAX_VALUE),this._far=t}function DistanceDisplayConditionGeometryInstanceAttribute(e,t){e=defaultValue(e,0),t=defaultValue(t,Number.MAX_VALUE),this.value=new Float32Array([e,t])}function DoublyLinkedList(){this.head=void 0,this.tail=void 0,this._length=0}function DoublyLinkedListNode(e,t,i){this.item=e,this.previous=t,this.next=i}function remove(e,t){defined(t.previous)&&defined(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):defined(t.previous)?(t.previous.next=void 0,e.tail=t.previous):defined(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}CylinderOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=e[t++],n=e[t++],a=e[t++],o=e[t++],s=e[t++];t=e[t];return defined(i)?(i._length=r,i._topRadius=n,i._bottomRadius=a,i._slices=o,i._numberOfVerticalLines=s,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$b.length=r,scratchOptions$b.topRadius=n,scratchOptions$b.bottomRadius=a,scratchOptions$b.slices=o,scratchOptions$b.numberOfVerticalLines=s,scratchOptions$b.offsetAttribute=-1===t?void 0:t,new CylinderOutlineGeometry(scratchOptions$b))},CylinderOutlineGeometry.createGeometry=function(e){var t=e._length,i=e._topRadius,r=e._bottomRadius,n=e._slices,a=e._numberOfVerticalLines;if(!(t<=0||i<0||r<0||0===i&&0===r)){var o,s,l=2*n,c=CylinderGeometryLibrary.computePositions(t,i,r,n,!1),u=2*n;0<a&&(o=Math.min(a,n),s=Math.round(n/o),u+=o);for(var d=IndexDatatype$1.createTypedArray(l,2*u),h=0,p=0;p<n-1;p++)d[h++]=p,d[h++]=p+1,d[h++]=p+n,d[h++]=p+1+n;if(d[h++]=n-1,d[h++]=0,d[h++]=n+n-1,d[h++]=n,0<a)for(p=0;p<n;p+=s)d[h++]=p,d[h++]=p+n;return(a=new GeometryAttributes).position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:c}),radiusScratch$1.x=.5*t,radiusScratch$1.y=Math.max(r,i),i=new BoundingSphere(Cartesian3.ZERO,Cartesian2.magnitude(radiusScratch$1)),defined(e._offsetAttribute)&&(t=c.length,arrayFill(t=new Uint8Array(t/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})),new Geometry({attributes:a,indices:d,primitiveType:PrimitiveType$1.LINES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},DefaultProxy.prototype.getURL=function(e){var t=-1===this.proxy.indexOf("?")?"?":"";return this.proxy+t+encodeURIComponent(e)},Object.defineProperties(DistanceDisplayCondition.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}}),DistanceDisplayCondition.packedLength=2,DistanceDisplayCondition.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.near,t[i]=e.far,t},DistanceDisplayCondition.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new DistanceDisplayCondition),i.near=e[t++],i.far=e[t],i},DistanceDisplayCondition.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.near===t.near&&e.far===t.far},DistanceDisplayCondition.clone=function(e,t){if(defined(e))return defined(t)||(t=new DistanceDisplayCondition),t.near=e.near,t.far=e.far,t},DistanceDisplayCondition.prototype.clone=function(e){return DistanceDisplayCondition.clone(this,e)},DistanceDisplayCondition.prototype.equals=function(e){return DistanceDisplayCondition.equals(this,e)},Object.defineProperties(DistanceDisplayConditionGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition=function(e){return new DistanceDisplayConditionGeometryInstanceAttribute(e.near,e.far)},DistanceDisplayConditionGeometryInstanceAttribute.toValue=function(e,t){return defined(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])},Object.defineProperties(DoublyLinkedList.prototype,{length:{get:function(){return this._length}}}),DoublyLinkedList.prototype.add=function(e){return e=new DoublyLinkedListNode(e,this.tail,void 0),defined(this.tail)?this.tail.next=e:this.head=e,this.tail=e,++this._length,e},DoublyLinkedList.prototype.remove=function(e){defined(e)&&(remove(this,e),--this._length)},DoublyLinkedList.prototype.splice=function(e,t){var i;e!==t&&(remove(this,t),i=e.next,e.next=t,this.tail===e?this.tail=t:i.previous=t,t.next=i,t.previous=e)},void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var TWEEN=TWEEN||(uzb=[],{REVISION:"13",getAll:function(){return uzb},removeAll:function(){uzb=[]},add:function(e){uzb.push(e)},remove:function(e){-1!==(e=uzb.indexOf(e))&&uzb.splice(e,1)},update:function(e){if(0===uzb.length)return!1;var t=0;for(e=void 0!==e?e:("undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance:Date).now();t<uzb.length;)uzb[t].update(e)?t++:uzb.splice(t,1);return!0}}),uzb,EBb;TWEEN.Tween=function(e){var t,i=e,r={},n={},a={},o=1e3,s=0,l=!1,c=!1,u=0,d=null,h=TWEEN.Easing.Linear.None,p=TWEEN.Interpolation.Linear,f=[],m=null,g=!1,y=null,_=null,v=null;for(t in e)r[t]=parseFloat(e[t],10);this.to=function(e,t){return void 0!==t&&(o=t),n=e,this},this.start=function(e){for(var t in TWEEN.add(this),g=!(c=!0),d=void 0!==e?e:("undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance:Date).now(),d+=u,n){if(n[t]instanceof Array){if(0===n[t].length)continue;n[t]=[i[t]].concat(n[t])}r[t]=i[t],r[t]instanceof Array==0&&(r[t]*=1),a[t]=r[t]||0}return this},this.stop=function(){return c&&(TWEEN.remove(this),c=!1,null!==v&&v.call(i),this.stopChainedTweens()),this},this.stopChainedTweens=function(){for(var e=0,t=f.length;e<t;e++)f[e].stop()},this.delay=function(e){return u=e,this},this.repeat=function(e){return s=e,this},this.yoyo=function(e){return l=e,this},this.easing=function(e){return h=e,this},this.interpolation=function(e){return p=e,this},this.chain=function(){return f=arguments,this},this.onStart=function(e){return m=e,this},this.onUpdate=function(e){return y=e,this},this.onComplete=function(e){return _=e,this},this.onStop=function(e){return v=e,this},this.update=function(e){if(e<d)return!0;!1===g&&(null!==m&&m.call(i),g=!0);var t,c=(e-d)/o,v=h(c=1<c?1:c);for(var C in n){var x=r[C]||0,b=n[C];b instanceof Array?i[C]=p(b,v):("string"==typeof b&&(b=x+parseFloat(b,10)),"number"==typeof b&&(i[C]=x+(b-x)*v))}if(null!==y&&y.call(i,v),1!=c)return!0;if(0<s){for(C in isFinite(s)&&s--,a)"string"==typeof n[C]&&(a[C]=a[C]+parseFloat(n[C],10)),l&&(t=a[C],a[C]=n[C],n[C]=t),r[C]=a[C];return d=e+u,!0}null!==_&&_.call(i);for(var S=0,T=f.length;S<T;S++)f[S].start(e);return!1}},TWEEN.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,i=.1;return 0===e?0:1===e?1:(t=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*--e)*Math.sin((e-t)*(2*Math.PI)/.4))},Out:function(e){var t,i=.1;return 0===e?0:1===e?1:(t=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},InOut:function(e){var t,i=.1;return 0===e?0:1===e?1:(t=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*--e)*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*--e)*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)}},Back:{In:function(e){return e*e*(2.70158*e-1.70158)},Out:function(e){return--e*e*(2.70158*e+1.70158)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((1+t)*e-t)*.5:.5*((e-=2)*e*((1+t)*e+t)+2)}},Bounce:{In:function(e){return 1-TWEEN.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*TWEEN.Easing.Bounce.In(2*e):.5*TWEEN.Easing.Bounce.Out(2*e-1)+.5}}},TWEEN.Interpolation={Linear:function(e,t){var i=e.length-1,r=i*t,n=Math.floor(r),a=TWEEN.Interpolation.Utils.Linear;return t<0?a(e[0],e[1],r):1<t?a(e[i],e[i-1],i-r):a(e[n],e[i<n+1?i:n+1],r-n)},Bezier:function(e,t){for(var i=0,r=e.length-1,n=Math.pow,a=TWEEN.Interpolation.Utils.Bernstein,o=0;o<=r;o++)i+=n(1-t,r-o)*n(t,o)*e[o]*a(r,o);return i},CatmullRom:function(e,t){var i=e.length-1,r=i*t,n=Math.floor(r),a=TWEEN.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(n=Math.floor(r=i*(1+t))),a(e[(n-1+i)%i],e[n],e[(n+1)%i],e[(n+2)%i],r-n)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):1<t?e[i]-(a(e[i],e[i],e[i-1],e[i-1],r-i)-e[i]):a(e[n?n-1:0],e[n],e[i<n+1?i:n+1],e[i<n+2?i:n+2],r-n)},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(e,t){var i=TWEEN.Interpolation.Utils.Factorial;return i(e)/i(t)/i(e-t)},Factorial:(EBb=[1],function(e){var t,i=1;if(EBb[e])return EBb[e];for(t=e;1<t;t--)i*=t;return EBb[e]=i}),CatmullRom:function(e,t,i,r,n){var a=.5*(i-e);return(2*t-2*i+a+(e=.5*(r-t)))*(n*(r=n*n))+(-3*t+3*i-2*a-e)*r+a*n+t}}};var EasingFunction={LINEAR_NONE:TWEEN.Easing.Linear.None,QUADRACTIC_IN:TWEEN.Easing.Quadratic.In,QUADRACTIC_OUT:TWEEN.Easing.Quadratic.Out,QUADRACTIC_IN_OUT:TWEEN.Easing.Quadratic.InOut,CUBIC_IN:TWEEN.Easing.Cubic.In,CUBIC_OUT:TWEEN.Easing.Cubic.Out,CUBIC_IN_OUT:TWEEN.Easing.Cubic.InOut,QUARTIC_IN:TWEEN.Easing.Quartic.In,QUARTIC_OUT:TWEEN.Easing.Quartic.Out,QUARTIC_IN_OUT:TWEEN.Easing.Quartic.InOut,QUINTIC_IN:TWEEN.Easing.Quintic.In,QUINTIC_OUT:TWEEN.Easing.Quintic.Out,QUINTIC_IN_OUT:TWEEN.Easing.Quintic.InOut,SINUSOIDAL_IN:TWEEN.Easing.Sinusoidal.In,SINUSOIDAL_OUT:TWEEN.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:TWEEN.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:TWEEN.Easing.Exponential.In,EXPONENTIAL_OUT:TWEEN.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:TWEEN.Easing.Exponential.InOut,CIRCULAR_IN:TWEEN.Easing.Circular.In,CIRCULAR_OUT:TWEEN.Easing.Circular.Out,CIRCULAR_IN_OUT:TWEEN.Easing.Circular.InOut,ELASTIC_IN:TWEEN.Easing.Elastic.In,ELASTIC_OUT:TWEEN.Easing.Elastic.Out,ELASTIC_IN_OUT:TWEEN.Easing.Elastic.InOut,BACK_IN:TWEEN.Easing.Back.In,BACK_OUT:TWEEN.Easing.Back.Out,BACK_IN_OUT:TWEEN.Easing.Back.InOut,BOUNCE_IN:TWEEN.Easing.Bounce.In,BOUNCE_OUT:TWEEN.Easing.Bounce.Out,BOUNCE_IN_OUT:TWEEN.Easing.Bounce.InOut},EasingFunction$1=Object.freeze(EasingFunction),scratchPosition$1=new Cartesian3,scratchNormal$4=new Cartesian3,scratchTangent$2=new Cartesian3,scratchBitangent$2=new Cartesian3,scratchNormalST=new Cartesian3,defaultRadii=new Cartesian3(1,1,1),cos=Math.cos,sin=Math.sin;function EllipsoidGeometry(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.radii,defaultRadii),i=defaultValue(e.innerRadii,t),r=defaultValue(e.minimumClock,0),n=defaultValue(e.maximumClock,CesiumMath.TWO_PI),a=defaultValue(e.minimumCone,0),o=defaultValue(e.maximumCone,CesiumMath.PI),s=Math.round(defaultValue(e.stackPartitions,64)),l=Math.round(defaultValue(e.slicePartitions,64)),c=defaultValue(e.vertexFormat,VertexFormat.DEFAULT);this._radii=Cartesian3.clone(t),this._innerRadii=Cartesian3.clone(i),this._minimumClock=r,this._maximumClock=n,this._minimumCone=a,this._maximumCone=o,this._stackPartitions=s,this._slicePartitions=l,this._vertexFormat=VertexFormat.clone(c),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}EllipsoidGeometry.packedLength=2*Cartesian3.packedLength+VertexFormat.packedLength+7,EllipsoidGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._radii,t,i),i+=Cartesian3.packedLength,Cartesian3.pack(e._innerRadii,t,i),i+=Cartesian3.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchRadii=new Cartesian3,scratchInnerRadii=new Cartesian3,scratchVertexFormat$5=new VertexFormat,scratchOptions$c={radii:scratchRadii,innerRadii:scratchInnerRadii,vertexFormat:scratchVertexFormat$5,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},unitEllipsoidGeometry;EllipsoidGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchRadii);t+=Cartesian3.packedLength;var n=Cartesian3.unpack(e,t,scratchInnerRadii);t+=Cartesian3.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$5);t+=VertexFormat.packedLength;var o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++];t=e[t];return defined(i)?(i._radii=Cartesian3.clone(r,i._radii),i._innerRadii=Cartesian3.clone(n,i._innerRadii),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._minimumClock=o,i._maximumClock=s,i._minimumCone=l,i._maximumCone=c,i._stackPartitions=u,i._slicePartitions=d,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$c.minimumClock=o,scratchOptions$c.maximumClock=s,scratchOptions$c.minimumCone=l,scratchOptions$c.maximumCone=c,scratchOptions$c.stackPartitions=u,scratchOptions$c.slicePartitions=d,scratchOptions$c.offsetAttribute=-1===t?void 0:t,new EllipsoidGeometry(scratchOptions$c))},EllipsoidGeometry.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var r=e._minimumClock,n=e._maximumClock,a=e._minimumCone,o=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,c=e._stackPartitions+1;(l=Math.round(l*Math.abs(n-r)/CesiumMath.TWO_PI))<2&&(l=2),(c=Math.round(c*Math.abs(o-a)/CesiumMath.PI))<2&&(c=2);var u=0,d=[a],h=[r];for(U=0;U<c;U++)d.push(a+U*(o-a)/(c-1));for(d.push(o),N=0;N<l;N++)h.push(r+N*(n-r)/(l-1));h.push(n);var p=d.length,f=h.length,m=0,g=1,y=i.x!==t.x||i.y!==t.y||i.z!==t.z,_=!1,v=!1,C=!1;y&&(g=2,0<a&&(_=!0,m+=l-1),o<Math.PI&&(v=!0,m+=l-1),(n-r)%CesiumMath.TWO_PI?(C=!0,m+=2*(c-1)+1):m+=1);var x=f*p*g,b=new Float64Array(3*x),S=arrayFill(new Array(x),!1),T=arrayFill(new Array(x),!1),E=l*c*g,w=(m=6*(E+m+1-(l+c)*g),IndexDatatype$1.createTypedArray(E,m)),A=s.normal?new Float32Array(3*x):void 0,P=s.tangent?new Float32Array(3*x):void 0,D=s.bitangent?new Float32Array(3*x):void 0,M=s.st?new Float32Array(2*x):void 0,I=new Array(p),R=new Array(p);for(U=0;U<p;U++)I[U]=sin(d[U]),R[U]=cos(d[U]);for(var O=new Array(f),L=new Array(f),N=0;N<f;N++)L[N]=cos(h[N]),O[N]=sin(h[N]);for(U=0;U<p;U++)for(N=0;N<f;N++)b[u++]=t.x*I[U]*L[N],b[u++]=t.y*I[U]*O[N],b[u++]=t.z*R[U];var F,B,V,k,z=x/2;if(y)for(U=0;U<p;U++)for(N=0;N<f;N++)b[u++]=i.x*I[U]*L[N],b[u++]=i.y*I[U]*O[N],b[u++]=i.z*R[U],S[z]=!0,0<U&&U!==p-1&&0!==N&&N!==f-1&&(T[z]=!0),z++;for(u=0,U=1;U<p-2;U++)for(F=U*f,B=(U+1)*f,N=1;N<f-2;N++)w[u++]=B+N,w[u++]=B+N+1,w[u++]=F+N+1,w[u++]=B+N,w[u++]=F+N+1,w[u++]=F+N;if(y)for(var G=p*f,U=1;U<p-2;U++)for(F=G+U*f,B=G+(U+1)*f,N=1;N<f-2;N++)w[u++]=B+N,w[u++]=F+N,w[u++]=F+N+1,w[u++]=B+N,w[u++]=F+N+1,w[u++]=B+N+1;if(y){if(_)for(k=p*f,U=1;U<f-2;U++)w[u++]=U,w[u++]=U+1,w[u++]=k+U+1,w[u++]=U,w[u++]=k+U+1,w[u++]=k+U;if(v)for(V=p*f-f,k=p*f*g-f,U=1;U<f-2;U++)w[u++]=V+U+1,w[u++]=V+U,w[u++]=k+U,w[u++]=V+U+1,w[u++]=k+U,w[u++]=k+U+1}if(C){for(U=1;U<p-2;U++)k=f*p+f*U,V=f*U,w[u++]=k,w[u++]=V+f,w[u++]=V,w[u++]=k,w[u++]=k+f,w[u++]=V+f;for(U=1;U<p-2;U++)k=f*p+f*(U+1)-1,V=f*(U+1)-1,w[u++]=V+f,w[u++]=k,w[u++]=V,w[u++]=V+f,w[u++]=k+f,w[u++]=k}g=new GeometryAttributes,s.position&&(g.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:b}));var $=0,H=0,W=0,j=0,q=x/2,Y=Ellipsoid.fromCartesian3(t),X=Ellipsoid.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(U=0;U<x;U++){J=S[U]?X:Y;var Q,Z=Cartesian3.fromArray(b,3*U,scratchPosition$1),J=J.geodeticSurfaceNormal(Z,scratchNormal$4);T[U]&&Cartesian3.negate(J,J),s.st&&(Q=Cartesian2.negate(J,scratchNormalST),M[$++]=Math.atan2(Q.y,Q.x)/CesiumMath.TWO_PI+.5,M[$++]=Math.asin(J.z)/Math.PI+.5),s.normal&&(A[H++]=J.x,A[H++]=J.y,A[H++]=J.z),(s.tangent||s.bitangent)&&(Z=scratchTangent$2,Q=0,S[U]&&(Q=q),Q=!_&&Q<=U&&U<Q+2*f?Cartesian3.UNIT_X:Cartesian3.UNIT_Z,Cartesian3.cross(Q,J,Z),Cartesian3.normalize(Z,Z),s.tangent&&(P[W++]=Z.x,P[W++]=Z.y,P[W++]=Z.z),s.bitangent&&(Z=Cartesian3.cross(J,Z,scratchBitangent$2),Cartesian3.normalize(Z,Z),D[j++]=Z.x,D[j++]=Z.y,D[j++]=Z.z))}s.st&&(g.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:M})),s.normal&&(g.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:A})),s.tangent&&(g.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:P})),s.bitangent&&(g.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:D}))}return defined(e._offsetAttribute)&&(C=b.length,arrayFill(C=new Uint8Array(C/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),g.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})),new Geometry({attributes:g,indices:w,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:BoundingSphere.fromEllipsoid(Y),offsetAttribute:e._offsetAttribute})}}},EllipsoidGeometry.getUnitEllipsoid=function(){return defined(unitEllipsoidGeometry)||(unitEllipsoidGeometry=EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new Cartesian3(1,1,1),vertexFormat:VertexFormat.POSITION_ONLY}))),unitEllipsoidGeometry};var defaultRadii$1=new Cartesian3(1,1,1),cos$1=Math.cos,sin$1=Math.sin;function EllipsoidOutlineGeometry(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.radii,defaultRadii$1),i=defaultValue(e.innerRadii,t),r=defaultValue(e.minimumClock,0),n=defaultValue(e.maximumClock,CesiumMath.TWO_PI),a=defaultValue(e.minimumCone,0),o=defaultValue(e.maximumCone,CesiumMath.PI),s=Math.round(defaultValue(e.stackPartitions,10)),l=Math.round(defaultValue(e.slicePartitions,8)),c=Math.round(defaultValue(e.subdivisions,128));this._radii=Cartesian3.clone(t),this._innerRadii=Cartesian3.clone(i),this._minimumClock=r,this._maximumClock=n,this._minimumCone=a,this._maximumCone=o,this._stackPartitions=s,this._slicePartitions=l,this._subdivisions=c,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}EllipsoidOutlineGeometry.packedLength=2*Cartesian3.packedLength+8,EllipsoidOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._radii,t,i),i+=Cartesian3.packedLength,Cartesian3.pack(e._innerRadii,t,i),i+=Cartesian3.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchRadii$1=new Cartesian3,scratchInnerRadii$1=new Cartesian3,scratchOptions$d={radii:scratchRadii$1,innerRadii:scratchInnerRadii$1,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};function EllipsoidTerrainProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,defined(this._tilingScheme)||(this._tilingScheme=new GeographicTilingScheme({ellipsoid:defaultValue(e.ellipsoid,Ellipsoid.WGS84)})),this._levelZeroMaximumGeometricError=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new Event,this._readyPromise=when.resolve(!0)}function EventHelper(){this._removalFunctions=[]}EllipsoidOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchRadii$1);t+=Cartesian3.packedLength;var n=Cartesian3.unpack(e,t,scratchInnerRadii$1);t+=Cartesian3.packedLength;var a=e[t++],o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++];t=e[t];return defined(i)?(i._radii=Cartesian3.clone(r,i._radii),i._innerRadii=Cartesian3.clone(n,i._innerRadii),i._minimumClock=a,i._maximumClock=o,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=c,i._slicePartitions=u,i._subdivisions=d,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$d.minimumClock=a,scratchOptions$d.maximumClock=o,scratchOptions$d.minimumCone=s,scratchOptions$d.maximumCone=l,scratchOptions$d.stackPartitions=c,scratchOptions$d.slicePartitions=u,scratchOptions$d.subdivisions=d,scratchOptions$d.offsetAttribute=-1===t?void 0:t,new EllipsoidOutlineGeometry(scratchOptions$d))},EllipsoidOutlineGeometry.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var r=e._minimumClock,n=e._maximumClock,a=e._minimumCone,o=e._maximumCone,s=e._subdivisions,l=Ellipsoid.fromCartesian3(t),c=e._slicePartitions+1,u=e._stackPartitions+1;(c=Math.round(c*Math.abs(n-r)/CesiumMath.TWO_PI))<2&&(c=2),(u=Math.round(u*Math.abs(o-a)/CesiumMath.PI))<2&&(u=2);var d=0,h=1,p=i.x!==t.x||i.y!==t.y||i.z!==t.z,f=!1,m=!1;p&&(h=2,0<a&&(f=!0,d+=c),o<Math.PI&&(m=!0,d+=c));for(var g,y,_=s*h*(u+c),v=new Float64Array(3*_),C=(d=2*(_+d-(c+u)*h),IndexDatatype$1.createTypedArray(_,d)),x=0,b=new Array(u),S=new Array(u),T=0;T<u;T++)y=a+T*(o-a)/(u-1),b[T]=sin$1(y),S[T]=cos$1(y);var E=new Array(s),w=new Array(s);for(T=0;T<s;T++)g=r+T*(n-r)/(s-1),E[T]=sin$1(g),w[T]=cos$1(g);for(T=0;T<u;T++)for(P=0;P<s;P++)v[x++]=t.x*b[T]*w[P],v[x++]=t.y*b[T]*E[P],v[x++]=t.z*S[T];if(p)for(T=0;T<u;T++)for(P=0;P<s;P++)v[x++]=i.x*b[T]*w[P],v[x++]=i.y*b[T]*E[P],v[x++]=i.z*S[T];for(b.length=s,S.length=s,T=0;T<s;T++)y=a+T*(o-a)/(s-1),b[T]=sin$1(y),S[T]=cos$1(y);for(E.length=c,w.length=c,T=0;T<c;T++)g=r+T*(n-r)/(c-1),E[T]=sin$1(g),w[T]=cos$1(g);for(T=0;T<s;T++)for(P=0;P<c;P++)v[x++]=t.x*b[T]*w[P],v[x++]=t.y*b[T]*E[P],v[x++]=t.z*S[T];if(p)for(T=0;T<s;T++)for(P=0;P<c;P++)v[x++]=i.x*b[T]*w[P],v[x++]=i.y*b[T]*E[P],v[x++]=i.z*S[T];for(T=x=0;T<u*h;T++)for(var A=T*s,P=0;P<s-1;P++)C[x++]=A+P,C[x++]=A+P+1;var D=u*s*h;for(T=0;T<c;T++)for(P=0;P<s-1;P++)C[x++]=D+T+P*c,C[x++]=D+T+(P+1)*c;if(p)for(D=u*s*h+c*s,T=0;T<c;T++)for(P=0;P<s-1;P++)C[x++]=D+T+P*c,C[x++]=D+T+(P+1)*c;if(p){var M=u*s*h,I=M+s*c;if(f)for(T=0;T<c;T++)C[x++]=M+T,C[x++]=I+T;if(m)for(M+=s*c-c,I+=s*c-c,T=0;T<c;T++)C[x++]=M+T,C[x++]=I+T}return f=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:v})}),defined(e._offsetAttribute)&&(m=v.length,arrayFill(m=new Uint8Array(m/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),f.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})),new Geometry({attributes:f,indices:C,primitiveType:PrimitiveType$1.LINES,boundingSphere:BoundingSphere.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}},Object.defineProperties(EllipsoidTerrainProvider.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}}),EllipsoidTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){return when.resolve(new HeightmapTerrainData({buffer:new Uint8Array(256),width:16,height:16}))},EllipsoidTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},EllipsoidTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){},EllipsoidTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){},EventHelper.prototype.add=function(e,t,i){var r=e.addEventListener(t,i);this._removalFunctions.push(r);var n=this;return function(){r();var e=n._removalFunctions;e.splice(e.indexOf(r),1)}},EventHelper.prototype.removeAll=function(){for(var e=this._removalFunctions,t=0,i=e.length;t<i;++t)e[t]();e.length=0};var ExtrapolationType={NONE:0,HOLD:1,EXTRAPOLATE:2},ExtrapolationType$1=Object.freeze(ExtrapolationType);function OrthographicOffCenterFrustum(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=defaultValue(e.near,1),this._near=this.near,this.far=defaultValue(e.far,5e8),this._far=this.far,this._cullingVolume=new CullingVolume,this._orthographicMatrix=new Matrix4}function update(e){e.top===e._top&&e.bottom===e._bottom&&e.left===e._left&&e.right===e._right&&e.near===e._near&&e.far===e._far||(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=Matrix4.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(OrthographicOffCenterFrustum.prototype,{projectionMatrix:{get:function(){return update(this),this._orthographicMatrix}}});var getPlanesRight=new Cartesian3,getPlanesNearCenter=new Cartesian3,getPlanesPoint=new Cartesian3,negateScratch=new Cartesian3;function OrthographicFrustum(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._offCenterFrustum=new OrthographicOffCenterFrustum,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=defaultValue(e.near,1),this._near=this.near,this.far=defaultValue(e.far,5e8),this._far=this.far}function update$1(e){var t,i=e._offCenterFrustum;e.width===e._width&&e.aspectRatio===e._aspectRatio&&e.near===e._near&&e.far===e._far||(e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far,t=1/e.aspectRatio,i.right=.5*e.width,i.left=-i.right,i.top=t*i.right,i.bottom=-i.top,i.near=e.near,i.far=e.far)}function PerspectiveOffCenterFrustum(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=defaultValue(e.near,1),this._near=this.near,this.far=defaultValue(e.far,5e8),this._far=this.far,this._cullingVolume=new CullingVolume,this._perspectiveMatrix=new Matrix4,this._infinitePerspective=new Matrix4}function update$2(e){var t=e.top,i=e.bottom,r=e.right,n=e.left,a=e.near,o=e.far;t===e._top&&i===e._bottom&&n===e._left&&r===e._right&&a===e._near&&o===e._far||(e._left=n,e._right=r,e._top=t,e._bottom=i,e._near=a,e._far=o,e._perspectiveMatrix=Matrix4.computePerspectiveOffCenter(n,r,i,t,a,o,e._perspectiveMatrix),e._infinitePerspective=Matrix4.computeInfinitePerspectiveOffCenter(n,r,i,t,a,e._infinitePerspective))}OrthographicOffCenterFrustum.prototype.computeCullingVolume=function(e,t,i){var r=this._cullingVolume.planes,n=this.top,a=this.bottom,o=this.right,s=this.left,l=this.near,c=this.far,u=Cartesian3.cross(t,i,getPlanesRight);Cartesian3.normalize(u,u);var d=getPlanesNearCenter;return Cartesian3.multiplyByScalar(t,l,d),Cartesian3.add(e,d,d),l=getPlanesPoint,Cartesian3.multiplyByScalar(u,s,l),Cartesian3.add(d,l,l),defined(s=r[0])||(s=r[0]=new Cartesian4),s.x=u.x,s.y=u.y,s.z=u.z,s.w=-Cartesian3.dot(u,l),Cartesian3.multiplyByScalar(u,o,l),Cartesian3.add(d,l,l),defined(s=r[1])||(s=r[1]=new Cartesian4),s.x=-u.x,s.y=-u.y,s.z=-u.z,s.w=-Cartesian3.dot(Cartesian3.negate(u,negateScratch),l),Cartesian3.multiplyByScalar(i,a,l),Cartesian3.add(d,l,l),defined(s=r[2])||(s=r[2]=new Cartesian4),s.x=i.x,s.y=i.y,s.z=i.z,s.w=-Cartesian3.dot(i,l),Cartesian3.multiplyByScalar(i,n,l),Cartesian3.add(d,l,l),defined(s=r[3])||(s=r[3]=new Cartesian4),s.x=-i.x,s.y=-i.y,s.z=-i.z,s.w=-Cartesian3.dot(Cartesian3.negate(i,negateScratch),l),defined(s=r[4])||(s=r[4]=new Cartesian4),s.x=t.x,s.y=t.y,s.z=t.z,s.w=-Cartesian3.dot(t,d),Cartesian3.multiplyByScalar(t,c,l),Cartesian3.add(e,l,l),defined(s=r[5])||(s=r[5]=new Cartesian4),s.x=-t.x,s.y=-t.y,s.z=-t.z,s.w=-Cartesian3.dot(Cartesian3.negate(t,negateScratch),l),this._cullingVolume},OrthographicOffCenterFrustum.prototype.getPixelDimensions=function(e,t,i,r,n){return update(this),e=r*(this.right-this.left)/e,t=r*(this.top-this.bottom)/t,n.x=e,n.y=t,n},OrthographicOffCenterFrustum.prototype.clone=function(e){return defined(e)||(e=new OrthographicOffCenterFrustum),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},OrthographicOffCenterFrustum.prototype.equals=function(e){return defined(e)&&e instanceof OrthographicOffCenterFrustum&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},OrthographicOffCenterFrustum.prototype.equalsEpsilon=function(e,t,i){return e===this||defined(e)&&e instanceof OrthographicOffCenterFrustum&&CesiumMath.equalsEpsilon(this.right,e.right,t,i)&&CesiumMath.equalsEpsilon(this.left,e.left,t,i)&&CesiumMath.equalsEpsilon(this.top,e.top,t,i)&&CesiumMath.equalsEpsilon(this.bottom,e.bottom,t,i)&&CesiumMath.equalsEpsilon(this.near,e.near,t,i)&&CesiumMath.equalsEpsilon(this.far,e.far,t,i)},OrthographicFrustum.packedLength=4,OrthographicFrustum.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.width,t[i++]=e.aspectRatio,t[i++]=e.near,t[i]=e.far,t},OrthographicFrustum.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new OrthographicFrustum),i.width=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t],i},Object.defineProperties(OrthographicFrustum.prototype,{projectionMatrix:{get:function(){return update$1(this),this._offCenterFrustum.projectionMatrix}}}),OrthographicFrustum.prototype.computeCullingVolume=function(e,t,i){return update$1(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},OrthographicFrustum.prototype.getPixelDimensions=function(e,t,i,r,n){return update$1(this),this._offCenterFrustum.getPixelDimensions(e,t,i,r,n)},OrthographicFrustum.prototype.clone=function(e){return defined(e)||(e=new OrthographicFrustum),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},OrthographicFrustum.prototype.equals=function(e){return!!(defined(e)&&e instanceof OrthographicFrustum)&&(update$1(this),update$1(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},OrthographicFrustum.prototype.equalsEpsilon=function(e,t,i){return!!(defined(e)&&e instanceof OrthographicFrustum)&&(update$1(this),update$1(e),CesiumMath.equalsEpsilon(this.width,e.width,t,i)&&CesiumMath.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))},Object.defineProperties(PerspectiveOffCenterFrustum.prototype,{projectionMatrix:{get:function(){return update$2(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return update$2(this),this._infinitePerspective}}});var getPlanesRight$1=new Cartesian3,getPlanesNearCenter$1=new Cartesian3,getPlanesFarCenter=new Cartesian3,getPlanesNormal=new Cartesian3;function PerspectiveFrustum(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._offCenterFrustum=new PerspectiveOffCenterFrustum,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=defaultValue(e.near,1),this._near=this.near,this.far=defaultValue(e.far,5e8),this._far=this.far,this.xOffset=defaultValue(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=defaultValue(e.yOffset,0),this._yOffset=this.yOffset}function update$3(e){var t=e._offCenterFrustum;e.fov===e._fov&&e.aspectRatio===e._aspectRatio&&e.near===e._near&&e.far===e._far&&e.xOffset===e._xOffset&&e.yOffset===e._yOffset||(e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}PerspectiveOffCenterFrustum.prototype.computeCullingVolume=function(e,t,i){var r=this._cullingVolume.planes,n=this.top,a=this.bottom,o=this.right,s=this.left,l=this.near,c=this.far,u=Cartesian3.cross(t,i,getPlanesRight$1),d=getPlanesNearCenter$1;return Cartesian3.multiplyByScalar(t,l,d),Cartesian3.add(e,d,d),l=getPlanesFarCenter,Cartesian3.multiplyByScalar(t,c,l),Cartesian3.add(e,l,l),c=getPlanesNormal,Cartesian3.multiplyByScalar(u,s,c),Cartesian3.add(d,c,c),Cartesian3.subtract(c,e,c),Cartesian3.normalize(c,c),Cartesian3.cross(c,i,c),Cartesian3.normalize(c,c),defined(s=r[0])||(s=r[0]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,e),Cartesian3.multiplyByScalar(u,o,c),Cartesian3.add(d,c,c),Cartesian3.subtract(c,e,c),Cartesian3.cross(i,c,c),Cartesian3.normalize(c,c),defined(s=r[1])||(s=r[1]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,e),Cartesian3.multiplyByScalar(i,a,c),Cartesian3.add(d,c,c),Cartesian3.subtract(c,e,c),Cartesian3.cross(u,c,c),Cartesian3.normalize(c,c),defined(s=r[2])||(s=r[2]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,e),Cartesian3.multiplyByScalar(i,n,c),Cartesian3.add(d,c,c),Cartesian3.subtract(c,e,c),Cartesian3.cross(c,u,c),Cartesian3.normalize(c,c),defined(s=r[3])||(s=r[3]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,e),defined(s=r[4])||(s=r[4]=new Cartesian4),s.x=t.x,s.y=t.y,s.z=t.z,s.w=-Cartesian3.dot(t,d),Cartesian3.negate(t,c),defined(s=r[5])||(s=r[5]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,l),this._cullingVolume},PerspectiveOffCenterFrustum.prototype.getPixelDimensions=function(e,t,i,r,n){update$2(this);var a=1/this.near;t=2*r*i*(this.top*a)/t,e=2*r*i*(this.right*a)/e;return n.x=e,n.y=t,n},PerspectiveOffCenterFrustum.prototype.clone=function(e){return defined(e)||(e=new PerspectiveOffCenterFrustum),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},PerspectiveOffCenterFrustum.prototype.equals=function(e){return defined(e)&&e instanceof PerspectiveOffCenterFrustum&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},PerspectiveOffCenterFrustum.prototype.equalsEpsilon=function(e,t,i){return e===this||defined(e)&&e instanceof PerspectiveOffCenterFrustum&&CesiumMath.equalsEpsilon(this.right,e.right,t,i)&&CesiumMath.equalsEpsilon(this.left,e.left,t,i)&&CesiumMath.equalsEpsilon(this.top,e.top,t,i)&&CesiumMath.equalsEpsilon(this.bottom,e.bottom,t,i)&&CesiumMath.equalsEpsilon(this.near,e.near,t,i)&&CesiumMath.equalsEpsilon(this.far,e.far,t,i)},PerspectiveFrustum.packedLength=6,PerspectiveFrustum.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.fov,t[i++]=e.aspectRatio,t[i++]=e.near,t[i++]=e.far,t[i++]=e.xOffset,t[i]=e.yOffset,t},PerspectiveFrustum.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new PerspectiveFrustum),i.fov=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t++],i.xOffset=e[t++],i.yOffset=e[t],i},Object.defineProperties(PerspectiveFrustum.prototype,{projectionMatrix:{get:function(){return update$3(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return update$3(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return update$3(this),this._fovy}},sseDenominator:{get:function(){return update$3(this),this._sseDenominator}}}),PerspectiveFrustum.prototype.computeCullingVolume=function(e,t,i){return update$3(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},PerspectiveFrustum.prototype.getPixelDimensions=function(e,t,i,r,n){return update$3(this),this._offCenterFrustum.getPixelDimensions(e,t,i,r,n)},PerspectiveFrustum.prototype.clone=function(e){return defined(e)||(e=new PerspectiveFrustum),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},PerspectiveFrustum.prototype.equals=function(e){return!!(defined(e)&&e instanceof PerspectiveFrustum)&&(update$3(this),update$3(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},PerspectiveFrustum.prototype.equalsEpsilon=function(e,t,i){return!!(defined(e)&&e instanceof PerspectiveFrustum)&&(update$3(this),update$3(e),CesiumMath.equalsEpsilon(this.fov,e.fov,t,i)&&CesiumMath.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var PERSPECTIVE=0,ORTHOGRAPHIC=1;function FrustumGeometry(e){var t,i,r=e.frustum,n=e.orientation,a=e.origin,o=defaultValue(e.vertexFormat,VertexFormat.DEFAULT);e=defaultValue(e._drawNearPlane,!0);r instanceof PerspectiveFrustum?(t=PERSPECTIVE,i=PerspectiveFrustum.packedLength):r instanceof OrthographicFrustum&&(t=ORTHOGRAPHIC,i=OrthographicFrustum.packedLength),this._frustumType=t,this._frustum=r.clone(),this._origin=Cartesian3.clone(a),this._orientation=Quaternion.clone(n),this._drawNearPlane=e,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+i+Cartesian3.packedLength+Quaternion.packedLength+VertexFormat.packedLength}FrustumGeometry.pack=function(e,t,i){i=defaultValue(i,0);var r=e._frustumType,n=e._frustum;return(t[i++]=r)===PERSPECTIVE?(PerspectiveFrustum.pack(n,t,i),i+=PerspectiveFrustum.packedLength):(OrthographicFrustum.pack(n,t,i),i+=OrthographicFrustum.packedLength),Cartesian3.pack(e._origin,t,i),i+=Cartesian3.packedLength,Quaternion.pack(e._orientation,t,i),i+=Quaternion.packedLength,VertexFormat.pack(e._vertexFormat,t,i),t[i+=VertexFormat.packedLength]=e._drawNearPlane?1:0,t};var scratchPackPerspective=new PerspectiveFrustum,scratchPackOrthographic=new OrthographicFrustum,scratchPackQuaternion=new Quaternion,scratchPackorigin=new Cartesian3,scratchVertexFormat$6=new VertexFormat;function getAttributes(e,t,i,r,n,a,o,s){for(var l=e/3*2,c=0;c<4;++c)defined(t)&&(t[e]=a.x,t[e+1]=a.y,t[e+2]=a.z),defined(i)&&(i[e]=o.x,i[e+1]=o.y,i[e+2]=o.z),defined(r)&&(r[e]=s.x,r[e+1]=s.y,r[e+2]=s.z),e+=3;n[l]=0,n[1+l]=0,n[2+l]=1,n[3+l]=0,n[4+l]=1,n[5+l]=1,n[6+l]=0,n[7+l]=1}FrustumGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r,n=e[t++];n===PERSPECTIVE?(r=PerspectiveFrustum.unpack(e,t,scratchPackPerspective),t+=PerspectiveFrustum.packedLength):(r=OrthographicFrustum.unpack(e,t,scratchPackOrthographic),t+=OrthographicFrustum.packedLength);var a=Cartesian3.unpack(e,t,scratchPackorigin);t+=Cartesian3.packedLength;var o=Quaternion.unpack(e,t,scratchPackQuaternion);t+=Quaternion.packedLength;var s=VertexFormat.unpack(e,t,scratchVertexFormat$6);e=1===e[t+=VertexFormat.packedLength];return defined(i)?(t=n===i._frustumType?i._frustum:void 0,i._frustum=r.clone(t),i._frustumType=n,i._origin=Cartesian3.clone(a,i._origin),i._orientation=Quaternion.clone(o,i._orientation),i._vertexFormat=VertexFormat.clone(s,i._vertexFormat),i._drawNearPlane=e,i):new FrustumGeometry({frustum:r,origin:a,orientation:o,vertexFormat:s,_drawNearPlane:e})};var scratchRotationMatrix=new Matrix3,scratchViewMatrix=new Matrix4,scratchInverseMatrix=new Matrix4,scratchXDirection=new Cartesian3,scratchYDirection=new Cartesian3,scratchZDirection=new Cartesian3,scratchNegativeX=new Cartesian3,scratchNegativeY=new Cartesian3,scratchNegativeZ=new Cartesian3,frustumSplits=new Array(3),frustumCornersNDC=new Array(4);frustumCornersNDC[0]=new Cartesian4(-1,-1,1,1),frustumCornersNDC[1]=new Cartesian4(1,-1,1,1),frustumCornersNDC[2]=new Cartesian4(1,1,1,1),frustumCornersNDC[3]=new Cartesian4(-1,1,1,1);for(var scratchFrustumCorners=new Array(4),i$1=0;i$1<4;++i$1)scratchFrustumCorners[i$1]=new Cartesian4;FrustumGeometry._computeNearFarPlanes=function(e,t,i,r,n,a,o,s){t=Matrix3.fromQuaternion(t,scratchRotationMatrix),a=defaultValue(a,scratchXDirection),o=defaultValue(o,scratchYDirection);var l=defaultValue(s,scratchZDirection);a=Matrix3.getColumn(t,0,a),o=Matrix3.getColumn(t,1,o),l=Matrix3.getColumn(t,2,l);Cartesian3.normalize(a,a),Cartesian3.normalize(o,o),Cartesian3.normalize(l,l),Cartesian3.negate(a,a);var c,u;a=Matrix4.computeView(e,l,o,a,scratchViewMatrix);i===PERSPECTIVE?(i=r.projectionMatrix,i=Matrix4.multiply(i,a,scratchInverseMatrix),u=Matrix4.inverse(i,scratchInverseMatrix)):c=Matrix4.inverseTransformation(a,scratchInverseMatrix),defined(u)?(frustumSplits[0]=r.near,frustumSplits[1]=r.far):(frustumSplits[0]=0,frustumSplits[1]=r.near,frustumSplits[2]=r.far);for(var d=0;d<2;++d)for(var h=0;h<4;++h){var p,f,m=Cartesian4.clone(frustumCornersNDC[h],scratchFrustumCorners[h]);defined(u)?(p=1/(m=Matrix4.multiplyByVector(u,m,m)).w,Cartesian3.multiplyByScalar(m,p,m),Cartesian3.subtract(m,e,m),Cartesian3.normalize(m,m),f=Cartesian3.dot(l,m),Cartesian3.multiplyByScalar(m,frustumSplits[d]/f,m),Cartesian3.add(m,e,m)):(defined(r._offCenterFrustum)&&(r=r._offCenterFrustum),p=frustumSplits[d],f=frustumSplits[d+1],m.x=.5*(m.x*(r.right-r.left)+r.left+r.right),m.y=.5*(m.y*(r.top-r.bottom)+r.bottom+r.top),m.z=.5*(m.z*(p-f)-p-f),m.w=1,Matrix4.multiplyByVector(c,m,m)),n[12*d+3*h]=m.x,n[12*d+3*h+1]=m.y,n[12*d+3*h+2]=m.z}},FrustumGeometry.createGeometry=function(e){var t=e._frustumType,i=e._frustum,r=e._origin,n=e._orientation,a=e._drawNearPlane,o=e._vertexFormat,s=a?6:5,l=new Float64Array(72);FrustumGeometry._computeNearFarPlanes(r,n,t,i,l);var c=24;l[c]=l[12],l[c+1]=l[13],l[c+2]=l[14],l[c+3]=l[0],l[c+4]=l[1],l[c+5]=l[2],l[c+6]=l[9],l[c+7]=l[10],l[c+8]=l[11],l[c+9]=l[21],l[c+10]=l[22],l[c+11]=l[23],l[c+=12]=l[15],l[c+1]=l[16],l[c+2]=l[17],l[c+3]=l[3],l[c+4]=l[4],l[c+5]=l[5],l[c+6]=l[0],l[c+7]=l[1],l[c+8]=l[2],l[c+9]=l[12],l[c+10]=l[13],l[c+11]=l[14],l[c+=12]=l[3],l[c+1]=l[4],l[c+2]=l[5],l[c+3]=l[15],l[c+4]=l[16],l[c+5]=l[17],l[c+6]=l[18],l[c+7]=l[19],l[c+8]=l[20],l[c+9]=l[6],l[c+10]=l[7],l[c+11]=l[8],l[c+=12]=l[6],l[c+1]=l[7],l[c+2]=l[8],l[c+3]=l[18],l[c+4]=l[19],l[c+5]=l[20],l[c+6]=l[21],l[c+7]=l[22],l[c+8]=l[23],l[c+9]=l[9],l[c+10]=l[10],l[c+11]=l[11],a||(l=l.subarray(12));var u,d,h,p,f=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l})});(defined(o.normal)||defined(o.tangent)||defined(o.bitangent)||defined(o.st))&&(u=defined(o.normal)?new Float32Array(12*s):void 0,d=defined(o.tangent)?new Float32Array(12*s):void 0,h=defined(o.bitangent)?new Float32Array(12*s):void 0,p=defined(o.st)?new Float32Array(8*s):void 0,e=scratchXDirection,r=scratchYDirection,n=scratchZDirection,t=Cartesian3.negate(e,scratchNegativeX),i=Cartesian3.negate(r,scratchNegativeY),o=Cartesian3.negate(n,scratchNegativeZ),c=0,a&&(getAttributes(c,u,d,h,p,o,e,r),c+=12),getAttributes(c,u,d,h,p,n,t,r),getAttributes(c+=12,u,d,h,p,t,o,r),getAttributes(c+=12,u,d,h,p,i,o,t),getAttributes(c+=12,u,d,h,p,e,n,r),getAttributes(c+=12,u,d,h,p,r,n,t),defined(u)&&(f.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:u})),defined(d)&&(f.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:d})),defined(h)&&(f.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:h})),defined(p)&&(f.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:p})));for(var m=new Uint16Array(6*s),g=0;g<s;++g){var y=6*g,_=4*g;m[y]=_,m[1+y]=1+_,m[2+y]=2+_,m[3+y]=_,m[4+y]=2+_,m[5+y]=3+_}return new Geometry({attributes:f,indices:m,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:BoundingSphere.fromVertices(l)})};var PERSPECTIVE$1=0,ORTHOGRAPHIC$1=1;function FrustumOutlineGeometry(e){var t,i,r=e.frustum,n=e.orientation,a=e.origin;e=defaultValue(e._drawNearPlane,!0);r instanceof PerspectiveFrustum?(t=PERSPECTIVE$1,i=PerspectiveFrustum.packedLength):r instanceof OrthographicFrustum&&(t=ORTHOGRAPHIC$1,i=OrthographicFrustum.packedLength),this._frustumType=t,this._frustum=r.clone(),this._origin=Cartesian3.clone(a),this._orientation=Quaternion.clone(n),this._drawNearPlane=e,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+i+Cartesian3.packedLength+Quaternion.packedLength}FrustumOutlineGeometry.pack=function(e,t,i){i=defaultValue(i,0);var r=e._frustumType,n=e._frustum;return(t[i++]=r)===PERSPECTIVE$1?(PerspectiveFrustum.pack(n,t,i),i+=PerspectiveFrustum.packedLength):(OrthographicFrustum.pack(n,t,i),i+=OrthographicFrustum.packedLength),Cartesian3.pack(e._origin,t,i),i+=Cartesian3.packedLength,Quaternion.pack(e._orientation,t,i),t[i+=Quaternion.packedLength]=e._drawNearPlane?1:0,t};var scratchPackPerspective$1=new PerspectiveFrustum,scratchPackOrthographic$1=new OrthographicFrustum,scratchPackQuaternion$1=new Quaternion,scratchPackorigin$1=new Cartesian3;FrustumOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r,n=e[t++];n===PERSPECTIVE$1?(r=PerspectiveFrustum.unpack(e,t,scratchPackPerspective$1),t+=PerspectiveFrustum.packedLength):(r=OrthographicFrustum.unpack(e,t,scratchPackOrthographic$1),t+=OrthographicFrustum.packedLength);var a=Cartesian3.unpack(e,t,scratchPackorigin$1);t+=Cartesian3.packedLength;var o=Quaternion.unpack(e,t,scratchPackQuaternion$1);e=1===e[t+=Quaternion.packedLength];return defined(i)?(t=n===i._frustumType?i._frustum:void 0,i._frustum=r.clone(t),i._frustumType=n,i._origin=Cartesian3.clone(a,i._origin),i._orientation=Quaternion.clone(o,i._orientation),i._drawNearPlane=e,i):new FrustumOutlineGeometry({frustum:r,origin:a,orientation:o,_drawNearPlane:e})},FrustumOutlineGeometry.createGeometry=function(e){var t=e._frustumType,i=e._frustum,r=e._origin,n=e._orientation,a=e._drawNearPlane;e=new Float64Array(24);FrustumGeometry._computeNearFarPlanes(r,n,t,i,e);i=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:e})});for(var o,s,l=a?2:1,c=new Uint16Array(8*(1+l)),u=a?0:1;u<2;++u)s=4*u,c[o=a?8*u:0]=s,c[o+1]=s+1,c[o+2]=s+1,c[o+3]=s+2,c[o+4]=s+2,c[o+5]=s+3,c[o+6]=s+3,c[o+7]=s;for(u=0;u<2;++u)s=4*u,c[o=8*(l+u)]=s,c[o+1]=s+4,c[o+2]=s+1,c[o+3]=s+5,c[o+4]=s+2,c[o+5]=s+6,c[o+6]=s+3,c[o+7]=s+7;return new Geometry({attributes:i,indices:c,primitiveType:PrimitiveType$1.LINES,boundingSphere:BoundingSphere.fromVertices(e)})};var GeocodeType={SEARCH:0,AUTOCOMPLETE:1},GeocodeType$1=Object.freeze(GeocodeType);function GeocoderService(){}function GeometryFactory(){DeveloperError.throwInstantiationError()}function GeometryInstanceAttribute(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=defaultValue(e.normalize,!1),this.value=e.value}GeocoderService.prototype.geocode=DeveloperError.throwInstantiationError,GeometryFactory.createGeometry=function(e){DeveloperError.throwInstantiationError()};var tmp$1={};!function(global,undefined$1){var rJb,sJb,tJb;rJb={1:[function(e,t,i){t.exports=function(e,t){for(var i=[],r=2;r<arguments.length;)i.push(arguments[r++]);var n=!0;return new Promise((function(r,a){i.push((function(e){if(n)if(n=!1,e)a(e);else{for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);r.apply(null,t)}}));try{e.apply(t||this,i)}catch(e){n&&(n=!1,a(e))}}))}},{}],2:[function(e,t,i){i.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;1<--t%4&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var r=new Array(64),n=new Array(123),a=0;a<64;)n[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;i.encode=function(e,t,i){for(var n,a=[],o=0,s=0;t<i;){var l=e[t++];switch(s){case 0:a[o++]=r[l>>2],n=(3&l)<<4,s=1;break;case 1:a[o++]=r[n|l>>4],n=(15&l)<<2,s=2;break;case 2:a[o++]=r[n|l>>6],a[o++]=r[63&l],s=0}}return s&&(a[o++]=r[n],a[o]=61,1===s&&(a[o+1]=61)),String.fromCharCode.apply(String,a)};var o="invalid encoding";i.decode=function(e,t,i){for(var r,a=i,s=0,l=0;l<e.length;){var c=e.charCodeAt(l++);if(61===c&&1<s)break;if((c=n[c])===undefined$1)throw Error(o);switch(s){case 0:r=c,s=1;break;case 1:t[i++]=r<<2|(48&c)>>4,r=c,s=2;break;case 2:t[i++]=(15&r)<<4|(60&c)>>2,r=c,s=3;break;case 3:t[i++]=(3&r)<<6|c,s=0}}if(1===s)throw Error(o);return i-a},i.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,i){function r(){this._listeners={}}(t.exports=r).prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},r.prototype.off=function(e,t){if(e===undefined$1)this._listeners={};else if(t===undefined$1)this._listeners[e]=[];else for(var i=this._listeners[e],r=0;r<i.length;)i[r].fn===t?i.splice(r,1):++r;return this},r.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],r=1;r<arguments.length;)i.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,i)}return this}},{}],4:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],5:[function(e,t,i){t.exports=function(e,t,i){var r=i||8192,n=r>>>1,a=null,o=r;return function(i){return i<1||n<i?e(i):(r<o+i&&(a=e(r),o=0),i=t.call(a,o,o+=i),7&o&&(o=1+(7|o)),i)}}},{}],6:[function(e,t,i){i.length=function(e){for(var t,i=0,r=0;r<e.length;++r)(t=e.charCodeAt(r))<128?i+=1:t<2048?i+=2:55296==(64512&t)&&56320==(64512&e.charCodeAt(r+1))?(++r,i+=4):i+=3;return i},i.read=function(e,t,i){if(i-t<1)return"";for(var r,n=null,a=[],o=0;t<i;)(r=e[t++])<128?a[o++]=r:191<r&&r<224?a[o++]=(31&r)<<6|63&e[t++]:239<r&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,a[o++]=55296+(r>>10),a[o++]=56320+(1023&r)):a[o++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],8191<o&&((n=n||[]).push(String.fromCharCode.apply(String,a)),o=0);return n?(o&&n.push(String.fromCharCode.apply(String,a.slice(0,o))),n.join("")):String.fromCharCode.apply(String,a.slice(0,o))},i.write=function(e,t,i){for(var r,n,a=i,o=0;o<e.length;++o)(r=e.charCodeAt(o))<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(n=e.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&n),++o,t[i++]=r>>18|240,t[i++]=r>>12&63|128):t[i++]=r>>12|224,t[i++]=r>>6&63|128),t[i++]=63&r|128);return i-a}},{}],7:[function(e,t,i){var r=i;function n(){r.Reader._configure(r.BufferReader),r.util._configure()}r.build="minimal",r.roots={},r.Writer=e(14),r.BufferWriter=e(15),r.Reader=e(8),r.BufferReader=e(9),r.util=e(13),r.rpc=e(10),r.configure=n,r.Writer._configure(r.BufferWriter),n()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(e,t,i){t.exports=l;var r,n=e(13),a=n.LongBits,o=n.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function d(){var e=new a(0,0),t=0;if(!(4<this.len-this.pos)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,4<this.len-this.pos){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw s(this,8);return new a(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=n.Buffer?function(e){return(l.create=function(e){return n.Buffer.isBuffer(e)?new r(e):u(e)})(e)}:u,l.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,l.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return c}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)};var f,m,g="undefined"!=typeof Float32Array?(f=new Float32Array(1),m=new Uint8Array(f.buffer),f[0]=-0,m[3]?function(e,t){return m[0]=e[t],m[1]=e[t+1],m[2]=e[t+2],m[3]=e[t+3],f[0]}:function(e,t){return m[0]=e[t+3],m[1]=e[t+2],m[2]=e[t+1],m[3]=e[t],f[0]}):function(e,t){e=2*((i=h(e,t+4))>>31)+1,t=i>>>23&255;var i=8388607&i;return 255==t?i?NaN:1/0*e:0==t?1401298464324817e-60*e*i:e*Math.pow(2,t-150)*(8388608+i)};l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=g(this.buf,this.pos);return this.pos+=4,e};var y,_,v="undefined"!=typeof Float64Array?(y=new Float64Array(1),_=new Uint8Array(y.buffer),y[0]=-0,_[7]?function(e,t){return _[0]=e[t],_[1]=e[t+1],_[2]=e[t+2],_[3]=e[t+3],_[4]=e[t+4],_[5]=e[t+5],_[6]=e[t+6],_[7]=e[t+7],y[0]}:function(e,t){return _[0]=e[t+7],_[1]=e[t+6],_[2]=e[t+5],_[3]=e[t+4],_[4]=e[t+3],_[5]=e[t+2],_[6]=e[t+1],_[7]=e[t],y[0]}):function(e,t){var i=h(e,t+4),r=h(e,t+8);e=2*(r>>31)+1,i=4294967296*(1048575&r)+i;return 2047==(t=r>>>20&2047)?i?NaN:1/0*e:0==t?5e-324*e*i:e*Math.pow(2,t-1075)*(i+4503599627370496)};l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=v(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw s(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){r=e;var t=n.Long?"toLong":"toNumber";n.merge(l.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},{13:13}],9:[function(e,t,i){t.exports=n;var r=e(8);function n(e){r.call(this,e)}(n.prototype=Object.create(r.prototype)).constructor=n,(e=e(13)).Buffer&&(n.prototype._slice=e.Buffer.prototype.slice),n.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{13:13,8:8}],10:[function(e,t,i){i.Service=e(11)},{11:11}],11:[function(e,t,i){t.exports=n;var r=e(13);function n(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}((n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n).prototype.rpcCall=function e(t,i,n,a,o){if(!a)throw TypeError("request must be specified");var s=this;if(!o)return r.asPromise(e,s,t,i,n,a);if(!s.rpcImpl)return setTimeout((function(){o(Error("already ended"))}),0),undefined$1;try{return s.rpcImpl(t,i[s.requestDelimited?"encodeDelimited":"encode"](a).finish(),(function(e,i){if(e)return s.emit("error",e,t),o(e);if(null===i)return s.end(!0),undefined$1;if(!(i instanceof n))try{i=n[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return s.emit("error",e,t),o(e)}return s.emit("data",i,t),o(null,i)}))}catch(e){return s.emit("error",e,t),setTimeout((function(){o(e)}),0),undefined$1}},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(e,t,i){t.exports=n;var r=e(13);function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var a=n.zero=new n(0,0);a.toNumber=function(){return 0},a.zzEncode=a.zzDecode=function(){return this},a.length=function(){return 1},n.zeroHash="\0\0\0\0\0\0\0\0",n.fromNumber=function(e){if(0===e)return a;var t=e<0;t&&(e=-e);var i=e>>>0;e=(e-i)/4294967296>>>0;return t&&(e=~e>>>0,i=~i>>>0,4294967295<++i&&(i=0,4294967295<++e&&(e=0))),new n(i,e)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):a},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0;e=~this.hi>>>0;return t||(e=e+1>>>0),-(t+4294967296*e)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var o=String.prototype.charCodeAt;n.fromHash=function(e){return"\0\0\0\0\0\0\0\0"===e?a:new n((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},n.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0==i?0==t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},{13:13}],13:[function(e,t,i){var r=i;function n(e,t,i){for(var r=Object.keys(t),n=0;n<r.length;++n)e[r[n]]!==undefined$1&&i||(e[r[n]]=t[r[n]]);return e}function a(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&n(this,i)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}r.asPromise=e(1),r.base64=e(2),r.EventEmitter=e(3),r.inquire=e(4),r.utf8=e(6),r.pool=e(5),r.LongBits=e(12),r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=global.dcodeIO&&global.dcodeIO.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){return e=r.LongBits.fromHash(e),r.Long?r.Long.fromBits(e.lo,e.hi,t):e.toNumber(Boolean(t))},r.merge=n,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=a,r.ProtocolError=a("ProtocolError"),r.oneOfGetter=function(e){for(var t={},i=0;i<e.length;++i)t[e[i]]=1;return function(){for(var e=Object.keys(this),i=e.length-1;-1<i;--i)if(1===t[e[i]]&&this[e[i]]!==undefined$1&&null!==this[e[i]])return e[i]}},r.oneOfSetter=function(e){return function(t){for(var i=0;i<e.length;++i)e[i]!==t&&delete this[e[i]]}},r.lazyResolve=function(e,t){for(var i=0;i<t.length;++i)for(var r=Object.keys(t[i]),n=0;n<r.length;++n){for(var a=t[i][r[n]].split("."),o=e;a.length;)o=o[a.shift()];t[i][r[n]]=o}},r.toJSONOptions={longs:String,enums:String,bytes:String},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,i){return new e(t,i)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(e,t,i){t.exports=d;var r,n=e(13),a=n.LongBits,o=n.base64,s=n.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=undefined$1,this.val=i}function c(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new l(c,0,0),this.tail=this.head,this.states=null}function h(e,t,i){t[i]=255&e}function p(e,t){this.len=e,this.next=undefined$1,this.val=t}function f(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;127<e.lo;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function m(e,t,i){t[i++]=255&e,t[i++]=e>>>8&255,t[i++]=e>>>16&255,t[i]=e>>>24}d.create=n.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d},d.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(d.alloc=n.pool(d.alloc,n.Array.prototype.subarray)),d.prototype.push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},(p.prototype=Object.create(l.prototype)).fn=function(e,t,i){for(;127<e;)t[i++]=127&e|128,e>>>=7;t[i]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this.push(f,10,a.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.int64=d.prototype.uint64=function(e){return e=a.from(e),this.push(f,e.length(),e)},d.prototype.sint64=function(e){return e=a.from(e).zzEncode(),this.push(f,e.length(),e)},d.prototype.bool=function(e){return this.push(h,1,e?1:0)},d.prototype.sfixed32=d.prototype.fixed32=function(e){return this.push(m,4,e>>>0)},d.prototype.sfixed64=d.prototype.fixed64=function(e){return e=a.from(e),this.push(m,4,e.lo).push(m,4,e.hi)};var g,y,_="undefined"!=typeof Float32Array?(g=new Float32Array(1),y=new Uint8Array(g.buffer),g[0]=-0,y[3]?function(e,t,i){g[0]=e,t[i++]=y[0],t[i++]=y[1],t[i++]=y[2],t[i]=y[3]}:function(e,t,i){g[0]=e,t[i++]=y[3],t[i++]=y[2],t[i++]=y[1],t[i]=y[0]}):function(e,t,i){var r=e<0?1:0;r&&(e=-e),0===e?m(0<1/e?0:2147483648,t,i):isNaN(e)?m(2147483647,t,i):m(34028234663852886e22<e?(r<<31|2139095040)>>>0:e<11754943508222875e-54?(r<<31|Math.round(e/1401298464324817e-60))>>>0:(r<<31|(r=Math.floor(Math.log(e)/Math.LN2))+127<<23|8388607&Math.round(e*Math.pow(2,-r)*8388608))>>>0,t,i)};d.prototype.float=function(e){return this.push(_,4,e)};var v,C,x="undefined"!=typeof Float64Array?(v=new Float64Array(1),C=new Uint8Array(v.buffer),v[0]=-0,C[7]?function(e,t,i){v[0]=e,t[i++]=C[0],t[i++]=C[1],t[i++]=C[2],t[i++]=C[3],t[i++]=C[4],t[i++]=C[5],t[i++]=C[6],t[i]=C[7]}:function(e,t,i){v[0]=e,t[i++]=C[7],t[i++]=C[6],t[i++]=C[5],t[i++]=C[4],t[i++]=C[3],t[i++]=C[2],t[i++]=C[1],t[i]=C[0]}):function(e,t,i){var r,n,a=e<0?1:0;a&&(e=-e),0===e?(m(0,t,i),m(0<1/e?0:2147483648,t,i+4)):isNaN(e)?(m(4294967295,t,i),m(2147483647,t,i+4)):17976931348623157e292<e?(m(0,t,i),m((a<<31|2146435072)>>>0,t,i+4)):e<22250738585072014e-324?(m((r=e/5e-324)>>>0,t,i),m((a<<31|r/4294967296)>>>0,t,i+4)):(1024===(n=Math.floor(Math.log(e)/Math.LN2))&&(n=1023),m(4503599627370496*(r=e*Math.pow(2,-n))>>>0,t,i),m((a<<31|n+1023<<20|1048576*r&1048575)>>>0,t,i+4))};d.prototype.double=function(e){return this.push(x,8,e)};var b=n.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var r=0;r<e.length;++r)t[i+r]=e[r]};d.prototype.bytes=function(e){var t,i=e.length>>>0;return i?(n.isString(e)&&(t=d.alloc(i=o.length(e)),o.decode(e,t,0),e=t),this.uint32(i).push(b,i,e)):this.push(h,1,0)},d.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t).push(s.write,t,e):this.push(h,1,0)},d.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new l(c,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(c,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},d._configure=function(e){r=e}},{13:13}],15:[function(e,t,i){t.exports=o;var r=e(14);(o.prototype=Object.create(r.prototype)).constructor=o;var n=e(13),a=n.Buffer;function o(){r.call(this)}o.alloc=function(e){return(o.alloc=n._Buffer_allocUnsafe)(e)};var s=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var r=0;r<e.length;)t[i++]=e[r++]};function l(e,t,i){e.length<40?n.utf8.write(e,t,i):t.utf8Write(e,i)}o.prototype.bytes=function(e){n.isString(e)&&(e=n._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(s,t,e),this},o.prototype.string=function(e){var t=a.byteLength(e);return this.uint32(t),t&&this.push(l,t,e),this}},{13:13,14:14}]},sJb={},tJb=[7],global.protobuf=function e(t){var i=sJb[t];return i||rJb[t][0].call(i=sJb[t]={exports:{}},e,i,i.exports),i.exports}(tJb[0])}(tmp$1);var protobuf=tmp$1.protobuf;function isBitSet(e,t){return 0!=(e&t)}var childrenBitmasks=[1,2,4,8],anyChildBitmask=15,cacheFlagBitmask=16,imageBitmask=64,terrainBitmask=128;function GoogleEarthEnterpriseTileInformation(e,t,i,r,n,a){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=r,this.imageryProvider=n,this.terrainProvider=a,this.ancestorHasTerrain=!1,this.terrainState=void 0}function stringToBuffer(e){for(var t=e.length,i=new ArrayBuffer(t),r=new Uint8Array(i),n=0;n<t;++n)r[n]=e.charCodeAt(n);return i}GoogleEarthEnterpriseTileInformation.clone=function(e,t){return defined(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new GoogleEarthEnterpriseTileInformation(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},GoogleEarthEnterpriseTileInformation.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},GoogleEarthEnterpriseTileInformation.prototype.hasSubtree=function(){return isBitSet(this._bits,cacheFlagBitmask)},GoogleEarthEnterpriseTileInformation.prototype.hasImagery=function(){return isBitSet(this._bits,imageBitmask)},GoogleEarthEnterpriseTileInformation.prototype.hasTerrain=function(){return isBitSet(this._bits,terrainBitmask)},GoogleEarthEnterpriseTileInformation.prototype.hasChildren=function(){return isBitSet(this._bits,anyChildBitmask)},GoogleEarthEnterpriseTileInformation.prototype.hasChild=function(e){return isBitSet(this._bits,childrenBitmasks[e])},GoogleEarthEnterpriseTileInformation.prototype.getChildBitmask=function(){return this._bits&anyChildBitmask};var defaultKey=stringToBuffer('Eô½\vyâjE"’,ÍqøIFgQ\0B%Æèa,f)\bÆ4Üjb%y\nwmiÖðœk“¡½NuàA[ß@V\fÙ»r›|3SîOlÔq°{ÀEVZ­wUe\v3’*¬l5Å0sø3>mF8J´Ýð.ÝuڌDt"úa"\f3"So¯9D\vŒ9Ù9L¹¿«\\ŒP_Ÿ"uxéq‘h;Áěð<VqH‚\'UfYNe˜u£aF}a?A\0Ÿ×´4M·F°Õ¸Š\'{‹Ü+»Mg0ÈÑö\\Pú[/F›n5/\'C.ë\n\f^¥se4ål.jC\'c#U©?q{gC}:¯ÍâTUœýKÆâŸ/(íË\\Æ-fˆ§;/*"N°k.Ý\r•}}GºC²²+>Mª>}æÎI‰Ææx\fa1-¤O¥~q ˆì\r1èN\v\0nPh}=\b\r•¦n£h—$[kó#ó¶s³\r\v@ÀŸØQ]ú".jßI\0¹ wUÆïj¿{GLƒîÜÜF…©­S+S4ÿ”Yä8è1ƒN¹XFkË-#†’p\x005ˆ"Ï1²&/çÃu-6,rt°#G·ÓÑ&…7râ\0ŒDÏÚ3-Þ`†i#i*|ÍKQ\r•T9w.)ê¦P¢joP™\\>TûïP[\vE‰m(w7ێJfJo™ åpâ¹q~\fmI-zþrÇòY0»]såÉ êx점ðŠB|G`°½&·q¶ÇŸÑ3‚=Ó«îc™È+S D\\qÆÌD2O<ÊÀ)=RÓaX©}e´ÜÏ\rô=ñ\b©BÚ#\tØ¿^PIøMÀËGLO÷{+ØÅ1’;µoÜl\r’ˆўÛ?âéÚ_ԄâFaZÞUϤ\0¾ýÎgñJi—æ HØ]~®q N®ÀV©‘<‚rçvì)IÖ]-ƒãÛ6©;f—‡jÕ¶=P^R¹KÇsWxÉô.Y•“oÐKW>\'\'Ç`Û;íšSD>?’mw¢\në?R¨ÆU^1I7…ôÅ&-©¿‹\'TÚÃj å*x°Öprª‹h½ˆ÷_H±~ÀXL?fù>áeÀp§Ï8i¯ðVldIœ\'­xtO‡ÞV9\0Úw\vË-‰û5Oõ\bQ`Á\nZGM&30xÚÀœFGâ[y`In7gS\n>éìF9²ñ4\rƄSuná\fYÙÞ)…{II¥wy¾IV.6ç\v:»Ob{ÒM1•/½8{¨O!áìFpv•})"xˆ\nÝ\\ÚÞQÏðüYRe|3ßóHÚ»*uÛ`²Ôüíì5¨ÿ(1-È܈F|Š["');function GoogleEarthEnterpriseMetadata(e){var t=e;"string"==typeof t||t instanceof Resource||(t=e.url),(t=Resource.createIfNeeded(t)).appendForwardSlash(),this._resource=t,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=CesiumMath.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var i=this;this._readyPromise=requestDbRoot(this).then((function(){return i.getQuadTreePacket("",i._quadPacketVersion)})).then((function(){return!0})).otherwise((function(e){var t="An error occurred while accessing "+getMetadataResource(i,"",1).url+".";return when.reject(new RuntimeError(t))}))}Object.defineProperties(GoogleEarthEnterpriseMetadata.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}}),GoogleEarthEnterpriseMetadata.tileXYToQuadKey=function(e,t,i){for(var r="",n=i;0<=n;--n){var a=1<<n,o=0;isBitSet(t,a)?isBitSet(e,a)&&(o|=1):(o|=2,isBitSet(e,a)||(o|=1)),r+=o}return r},GoogleEarthEnterpriseMetadata.quadKeyToTileXY=function(e){for(var t=0,i=0,r=e.length-1,n=r;0<=n;--n){var a=1<<n,o=+e[r-n];isBitSet(o,2)?isBitSet(o,1)||(t|=a):(i|=a,isBitSet(o,1)&&(t|=a))}return{x:t,y:i,level:r}},GoogleEarthEnterpriseMetadata.prototype.isValid=function(e){var t=this.getTileInformationFromQuadKey(e);if(defined(t))return null!==t;for(var i,r=!0,n=e;1<n.length;){if(i=n.substring(n.length-1),n=n.substring(0,n.length-1),defined(t=this.getTileInformationFromQuadKey(n))){t.hasSubtree()||t.hasChild(parseInt(i))||(r=!1);break}if(null===t){r=!1;break}}return r};var taskProcessor$1=new TaskProcessor("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY),dbrootParser,dbrootParserPromise;function populateSubtree(e,t,i){var r,n=e._tileInfo,a=t,o=n[a];if(defined(o)&&(!o.hasSubtree()||o.hasChildren()))return o;for(;void 0===o&&1<a.length;)o=n[a=a.substring(0,a.length-1)];var s=e._subtreePromises,l=s[a];return defined(l)?l.then((function(){return r=new Request({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),populateSubtree(e,t,r)})):defined(o)&&o.hasSubtree()?defined(l=e.getQuadTreePacket(a,o.cnodeVersion,i))?(s[a]=l).then((function(){return r=new Request({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),populateSubtree(e,t,r)})).always((function(){delete s[a]})):void 0:when.reject(new RuntimeError("Couldn't load metadata for tile "+t))}function getMetadataResource(e,t,i,r){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+i.toString(),request:r})}function requestDbRoot(e){var t,i,r=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});return defined(dbrootParserPromise)||(t=buildModuleUrl("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser,dbrootParserPromise=loadAndExecuteScript(t).then((function(){dbrootParser=window.cesiumGoogleEarthDbRootParser(protobuf),defined(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser}))),dbrootParserPromise.then((function(){return r.fetchArrayBuffer()})).then((function(t){var i=dbrootParser.EncryptedDbRootProto.decode(new Uint8Array(t)),r=i.encryptionData,n=r.byteOffset,a=n+r.byteLength;t=e.key=r.buffer.slice(n,a),a=(n=(r=i.dbrootData).byteOffset)+r.byteLength,a=r.buffer.slice(n,a);return taskProcessor$1.scheduleTask({buffer:a,type:"DbRoot",key:t},[a])})).then((function(t){var i=dbrootParser.DbRootProto.decode(new Uint8Array(t.buffer));e.imageryPresent=defaultValue(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=defaultValue(i.terrainPresent,e.terrainPresent),defined(i.endSnippet)&&defined(i.endSnippet.model)&&(t=i.endSnippet.model,e.negativeAltitudeExponentBias=defaultValue(t.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=defaultValue(t.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)),defined(i.databaseVersion)&&(e._quadPacketVersion=defaultValue(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));for(var r=e.providers,n=defaultValue(i.providerInfo,[]),a=n.length,o=0;o<a;++o){var s=n[o],l=s.copyrightString;defined(l)&&(r[s.providerId]=new Credit(l.value))}})).otherwise((function(){console.log("Failed to retrieve "+r.url+". Using defaults."),e.key=defaultKey}))}function GoogleEarthEnterpriseTerrainData(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=defaultValue(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=defaultValue(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket=function(e,t,i){if(t=defaultValue(t,1),defined(i=getMetadataResource(this,e=defaultValue(e,""),t,i).fetchArrayBuffer())){var r=this._tileInfo,n=this.key;return i.then((function(t){return taskProcessor$1.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:n},[t]).then((function(t){var i,n,a=-1;""!==e&&(a=e.length+1,i=t[e],(n=r[e])._bits|=i._bits,delete t[e]);var o=Object.keys(t);o.sort((function(e,t){return e.length-t.length}));for(var s=o.length,l=0;l<s;++l){var c,u,d=o[l];null!==t[d]?(c=GoogleEarthEnterpriseTileInformation.clone(t[d]),(u=d.length)===a?c.setParent(n):1<u&&(u=r[d.substring(0,d.length-1)],c.setParent(u)),r[d]=c):r[d]=null}}))}))}},GoogleEarthEnterpriseMetadata.prototype.populateSubtree=function(e,t,i,r){return populateSubtree(this,GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),r)},GoogleEarthEnterpriseMetadata.prototype.getTileInformation=function(e,t,i){return i=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),this._tileInfo[i]},GoogleEarthEnterpriseMetadata.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]},Object.defineProperties(GoogleEarthEnterpriseTerrainData.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var taskProcessor$2=new TaskProcessor("createVerticesFromGoogleEarthEnterpriseBuffer"),nativeRectangleScratch=new Rectangle,rectangleScratch$1=new Rectangle;GoogleEarthEnterpriseTerrainData.prototype.createMesh=function(e,t,i,r,n){var a=e.ellipsoid;e.tileXYToNativeRectangle(t,i,r,nativeRectangleScratch),e.tileXYToRectangle(t,i,r,rectangleScratch$1),n=defaultValue(n,1);var o=a.cartographicToCartesian(Rectangle.center(rectangleScratch$1));r=40075.16/(1<<r);if(this._skirtHeight=Math.min(8*r,1e3),defined(a=taskProcessor$2.scheduleTask({buffer:this._buffer,nativeRectangle:nativeRectangleScratch,rectangle:rectangleScratch$1,relativeToCenter:o,ellipsoid:a,skirtHeight:this._skirtHeight,exaggeration:n,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold}))){var s=this;return a.then((function(e){return s._mesh=new TerrainMesh(o,new Float32Array(e.vertices),new Uint16Array(e.indices),e.indexCountWithoutSkirts,e.vertexCountWithoutSkirts,e.minimumHeight,e.maximumHeight,BoundingSphere.clone(e.boundingSphere3D),Cartesian3.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,OrientedBoundingBox.clone(e.orientedBoundingBox),TerrainEncoding.clone(e.encoding),n,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),s._minimumHeight=e.minimumHeight,s._maximumHeight=e.maximumHeight,s._buffer=void 0,s._mesh}))}},GoogleEarthEnterpriseTerrainData.prototype.interpolateHeight=function(e,t,i){return t=CesiumMath.clamp((t-e.west)/e.width,0,1),i=CesiumMath.clamp((i-e.south)/e.height,0,1),defined(this._mesh)?interpolateMeshHeight$2(this,t,i):interpolateHeight$2(this,t,i,e)};var upsampleTaskProcessor$1=new TaskProcessor("upsampleQuantizedTerrainMesh");GoogleEarthEnterpriseTerrainData.prototype.upsample=function(e,t,i,r,n,a,o){var s=this._mesh;if(defined(this._mesh)){var l=2*t!==n;t=2*i===a,i=e.ellipsoid,o=e.tileXYToRectangle(n,a,o);if(defined(s=upsampleTaskProcessor$1.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:t,childRectangle:o,ellipsoid:i,exaggeration:s.exaggeration}))){var c=this;return s.then((function(e){var t=new Uint16Array(e.vertices),i=IndexDatatype$1.createTypedArray(t.length/3,e.indices),r=c._skirtHeight;return new QuantizedMeshTerrainData({quantizedVertices:t,indices:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:BoundingSphere.clone(e.boundingSphere),orientedBoundingBox:OrientedBoundingBox.clone(e.orientedBoundingBox),horizonOcclusionPoint:Cartesian3.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:r,southSkirtHeight:r,eastSkirtHeight:r,northSkirtHeight:r,childTileMask:0,createdByUpsampling:!0,credits:c._credits})}))}}},GoogleEarthEnterpriseTerrainData.prototype.isChildAvailable=function(e,t,i,r){var n=2;return i!==2*e&&++n,r!==2*t&&(n-=2),0!=(this._childTileMask&1<<n)},GoogleEarthEnterpriseTerrainData.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var texCoordScratch0$1=new Cartesian2,texCoordScratch1$1=new Cartesian2,texCoordScratch2$1=new Cartesian2,barycentricCoordinateScratch$1=new Cartesian3;function interpolateMeshHeight$2(e,t,i){for(var r=(e=e._mesh).vertices,n=e.encoding,a=e.indices,o=0,s=a.length;o<s;o+=3){var l=a[o],c=a[o+1],u=a[o+2],d=n.decodeTextureCoordinates(r,l,texCoordScratch0$1),h=n.decodeTextureCoordinates(r,c,texCoordScratch1$1),p=n.decodeTextureCoordinates(r,u,texCoordScratch2$1);if(-1e-15<=(p=Intersections2D.computeBarycentricCoordinates(t,i,d.x,d.y,h.x,h.y,p.x,p.y,barycentricCoordinateScratch$1)).x&&-1e-15<=p.y&&-1e-15<=p.z)return l=n.decodeHeight(r,l),c=n.decodeHeight(r,c),u=n.decodeHeight(r,u),p.x*l+p.y*c+p.z*u}}var sizeOfUint16=Uint16Array.BYTES_PER_ELEMENT,sizeOfUint32=Uint32Array.BYTES_PER_ELEMENT,sizeOfInt32=Int32Array.BYTES_PER_ELEMENT,sizeOfFloat=Float32Array.BYTES_PER_ELEMENT,sizeOfDouble=Float64Array.BYTES_PER_ELEMENT;function interpolateHeight$2(e,t,i,r){var n=e._buffer,a=0,o=0,s=0;.5<i?(.5<t?(a=2,o=.5):a=3,s=.5):.5<t&&(a=1,o=.5);for(var l=new DataView(n),c=0,u=0;u<a;++u)c+=l.getUint32(c,!0),c+=sizeOfUint32;c+=sizeOfUint32,c+=2*sizeOfDouble,e=CesiumMath.toRadians(180*l.getFloat64(c,!0)),c+=sizeOfDouble,n=CesiumMath.toRadians(180*l.getFloat64(c,!0)),c+=sizeOfDouble;var d=r.width/e/2,h=r.height/n/2,p=l.getInt32(c,!0);c+=sizeOfInt32;var f=3*l.getInt32(c,!0);c+=sizeOfInt32,c+=sizeOfInt32;for(var m=new Array(p),g=new Array(p),y=new Array(p),_=0;_<p;++_)m[_]=o+l.getUint8(c++)*d,g[_]=s+l.getUint8(c++)*h,y[_]=6371010*l.getFloat32(c,!0),c+=sizeOfFloat;var v=new Array(f);for(_=0;_<f;++_)v[_]=l.getUint16(c,!0),c+=sizeOfUint16;for(_=0;_<f;_+=3){var C=v[_],x=v[_+1],b=v[_+2],S=m[C],T=m[x],E=m[b],w=g[C],A=g[x],P=g[b];if(-1e-15<=(P=Intersections2D.computeBarycentricCoordinates(t,i,S,w,T,A,E,P,barycentricCoordinateScratch$1)).x&&-1e-15<=P.y&&-1e-15<=P.z)return P.x*y[C]+P.y*y[x]+P.z*y[b]}}var TerrainState={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},julianDateScratch$1=new JulianDate;function TerrainCache(){this._terrainCache={},this._lastTidy=JulianDate.now()}function GoogleEarthEnterpriseTerrainProvider(e){var t;e=defaultValue(e,defaultValue.EMPTY_OBJECT),t=defined(e.metadata)?e.metadata:new GoogleEarthEnterpriseMetadata(Resource.createIfNeeded(e.url)),this._metadata=t,this._tilingScheme=new GeographicTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Rectangle(-CesiumMath.PI,-CesiumMath.PI,CesiumMath.PI,CesiumMath.PI),ellipsoid:e.ellipsoid}),"string"==typeof(e=e.credit)&&(e=new Credit(e)),this._credit=e,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new TerrainCache,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new Event,this._ready=!1;var i,r=this;this._readyPromise=t.readyPromise.then((function(e){return t.terrainPresent?(TileProviderError.handleSuccess(i),r._ready=e):(e=new RuntimeError("The server "+t.url+" doesn't have terrain"),i=TileProviderError.handleError(i,r,r._errorEvent,e.message,void 0,void 0,void 0,e),when.reject(e))})).otherwise((function(e){return i=TileProviderError.handleError(i,r,r._errorEvent,e.message,void 0,void 0,void 0,e),when.reject(e)}))}TerrainCache.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:JulianDate.now()}},TerrainCache.prototype.get=function(e){var t=this._terrainCache[e];if(defined(t))return delete this._terrainCache[e],t.buffer},TerrainCache.prototype.tidy=function(){if(JulianDate.now(julianDateScratch$1),10<JulianDate.secondsDifference(julianDateScratch$1,this._lastTidy)){for(var e=this._terrainCache,t=Object.keys(e),i=t.length,r=0;r<i;++r){var n=t[r],a=e[n];10<JulianDate.secondsDifference(julianDateScratch$1,a.timestamp)&&delete e[n]}JulianDate.clone(julianDateScratch$1,this._lastTidy)}},Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var taskProcessor$3=new TaskProcessor("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);function computeChildMask(e,t,i){var r=t.getChildBitmask();if(t.terrainState===TerrainState.PARENT)for(var n=r=0;n<4;++n){var a=i.getTileInformationFromQuadKey(e+n.toString());defined(a)&&a.hasTerrain()&&(r|=1<<n)}return r}function buildTerrainResource(e,t,i,r){return i=defined(i)&&0<i?i:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+i.toString(),request:r})}GoogleEarthEnterpriseTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){var n,a=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),o=this._terrainCache,s=this._metadata,l=s.getTileInformationFromQuadKey(a);if(!defined(l))return when.reject(new RuntimeError("Terrain tile doesn't exist"));if(defined(t=l.terrainState)||(t=l.terrainState=TerrainState.UNKNOWN),defined(i=o.get(a))){var c=s.providers[l.terrainProvider];return when.resolve(new GoogleEarthEnterpriseTerrainData({buffer:i,childTileMask:computeChildMask(a,l,s),credits:defined(c)?[c]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(o.tidy(),!l.ancestorHasTerrain)return when.resolve(new HeightmapTerrainData({buffer:new Uint8Array(256),width:16,height:16}));if(t===TerrainState.NONE)return when.reject(new RuntimeError("Terrain tile doesn't exist"));var u=a;c=-1;switch(t){case TerrainState.SELF:c=l.terrainVersion;break;case TerrainState.PARENT:u=u.substring(0,u.length-1),c=(n=s.getTileInformationFromQuadKey(u)).terrainVersion;break;case TerrainState.UNKNOWN:l.hasTerrain()?c=l.terrainVersion:(u=u.substring(0,u.length-1),defined(n=s.getTileInformationFromQuadKey(u))&&n.hasTerrain()&&(c=n.terrainVersion))}if(c<0)return when.reject(new RuntimeError("Terrain tile doesn't exist"));var d,h,p=this._terrainPromises,f=this._terrainRequests;if(defined(p[u]))d=p[u],h=f[u];else{if(!defined(c=buildTerrainResource(this,u,c,h=r).fetchArrayBuffer()))return;d=c.then((function(e){return defined(e)?taskProcessor$3.scheduleTask({buffer:e,type:"Terrain",key:s.key},[e]).then((function(e){var t=s.getTileInformationFromQuadKey(u);t.terrainState=TerrainState.SELF,o.add(u,e[0]);for(var i=t.terrainProvider,r=e.length-1,n=0;n<r;++n){var a=u+n.toString(),l=s.getTileInformationFromQuadKey(a);defined(l)&&(o.add(a,e[n+1]),l.terrainState=TerrainState.PARENT,0===l.terrainProvider&&(l.terrainProvider=i))}})):when.reject(new RuntimeError("Failed to load terrain."))})),p[u]=d,f[u]=h,d=d.always((function(){delete p[u],delete f[u]}))}return d.then((function(){var e=o.get(a);if(defined(e)){var t=s.providers[l.terrainProvider];return new GoogleEarthEnterpriseTerrainData({buffer:e,childTileMask:computeChildMask(a,l,s),credits:defined(t)?[t]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return when.reject(new RuntimeError("Failed to load terrain."))})).otherwise((function(e){return h.state===RequestState$1.CANCELLED?r.state=h.state:l.terrainState=TerrainState.NONE,when.reject(e)}))},GoogleEarthEnterpriseTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},GoogleEarthEnterpriseTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){var r=this._metadata,n=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),a=r.getTileInformation(e,t,i);if(null===a)return!1;if(defined(a)){if(!a.ancestorHasTerrain)return!0;var o=a.terrainState;return o!==TerrainState.NONE&&!!(defined(o)&&o!==TerrainState.UNKNOWN||(a.terrainState=TerrainState.UNKNOWN,a.hasTerrain())||(n=n.substring(0,n.length-1),defined(a=r.getTileInformationFromQuadKey(n))&&a.hasTerrain()))}return r.isValid(n)&&(n=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.TERRAIN}),r.populateSubtree(e,t,i,n)),!1},GoogleEarthEnterpriseTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){};var PROJECTIONS=[GeographicProjection,WebMercatorProjection],PROJECTION_COUNT=PROJECTIONS.length,MITER_BREAK_SMALL=Math.cos(CesiumMath.toRadians(30)),MITER_BREAK_LARGE=Math.cos(CesiumMath.toRadians(150)),WALL_INITIAL_MIN_HEIGHT=0,WALL_INITIAL_MAX_HEIGHT=1e3;function GroundPolylineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions;this.width=defaultValue(e.width,1),this._positions=t,this.granularity=defaultValue(e.granularity,9999),this.loop=defaultValue(e.loop,!1),this.arcType=defaultValue(e.arcType,ArcType$1.GEODESIC),this._ellipsoid=Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(GroundPolylineGeometry.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+Ellipsoid.packedLength+1+1}}}),GroundPolylineGeometry.setProjectionAndEllipsoid=function(e,t){for(var i=0,r=0;r<PROJECTION_COUNT;r++)if(t instanceof PROJECTIONS[r]){i=r;break}e._projectionIndex=i,e._ellipsoid=t.ellipsoid};var cart3Scratch1=new Cartesian3,cart3Scratch2=new Cartesian3,cart3Scratch3=new Cartesian3;function computeRightNormal(e,t,i,r,n){var a=getPosition(r,e,0,cart3Scratch1);i=getPosition(r,e,i,cart3Scratch2),t=getPosition(r,t,0,cart3Scratch3),i=direction(i,a,cart3Scratch2),a=direction(t,a,cart3Scratch3);return Cartesian3.cross(a,i,n),Cartesian3.normalize(n,n)}var interpolatedCartographicScratch=new Cartographic,interpolatedBottomScratch=new Cartesian3,interpolatedTopScratch=new Cartesian3,interpolatedNormalScratch=new Cartesian3;function interpolateSegment(e,t,i,r,n,a,o,s,l,c,u){var d;if(0!==n&&(a===ArcType$1.GEODESIC?d=new EllipsoidGeodesic(e,t,o):a===ArcType$1.RHUMB&&(d=new EllipsoidRhumbLine(e,t,o)),!((a=d.surfaceDistance)<n)))for(var h=computeRightNormal(e,t,r,o,interpolatedNormalScratch),p=a/(n=Math.ceil(a/n)),f=p,m=n-1,g=s.length,y=0;y<m;y++){var _=d.interpolateUsingSurfaceDistance(f,interpolatedCartographicScratch),v=getPosition(o,_,i,interpolatedBottomScratch),C=getPosition(o,_,r,interpolatedTopScratch);Cartesian3.pack(h,s,g),Cartesian3.pack(v,l,g),Cartesian3.pack(C,c,g),u.push(_.latitude),u.push(_.longitude),g+=3,f+=p}}var heightlessCartographicScratch=new Cartographic;function getPosition(e,t,i,r){return Cartographic.clone(t,heightlessCartographicScratch),heightlessCartographicScratch.height=i,Cartographic.toCartesian(heightlessCartographicScratch,e,r)}function direction(e,t,i){return Cartesian3.subtract(e,t,i),Cartesian3.normalize(i,i),i}function tangentDirection(e,t,i,r){return r=direction(e,t,r),r=Cartesian3.cross(r,i,r),r=Cartesian3.normalize(r,r),Cartesian3.cross(i,r,r)}GroundPolylineGeometry.pack=function(e,t,i){var r=defaultValue(i,0),n=e._positions,a=n.length;t[r++]=a;for(var o=0;o<a;++o){var s=n[o];Cartesian3.pack(s,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,Ellipsoid.pack(e._ellipsoid,t,r),r+=Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},GroundPolylineGeometry.unpack=function(e,t,i){for(var r=defaultValue(t,0),n=e[r++],a=new Array(n),o=0;o<n;o++)a[o]=Cartesian3.unpack(e,r),r+=3;var s=e[r++],l=1===e[r++],c=e[r++],u=Ellipsoid.unpack(e,r);r+=Ellipsoid.packedLength;var d=e[r++];t=1===e[r++];return defined(i)||(i=new GroundPolylineGeometry({positions:a})),i._positions=a,i.granularity=s,i.loop=l,i.arcType=c,i._ellipsoid=u,i._projectionIndex=d,i._scene3DOnly=t,i};var toPreviousScratch=new Cartesian3,toNextScratch=new Cartesian3,forwardScratch=new Cartesian3,vertexUpScratch=new Cartesian3,cosine90=0,cosine180=-1;function computeVertexMiterNormal(e,t,i,r,n){return e=tangentDirection(e,t,i=direction(i,t,vertexUpScratch),toPreviousScratch),t=tangentDirection(r,t,i,toNextScratch),CesiumMath.equalsEpsilon(Cartesian3.dot(e,t),cosine180,CesiumMath.EPSILON5)?(n=Cartesian3.cross(i,e,n),Cartesian3.normalize(n,n)):(n=Cartesian3.add(t,e,n),n=Cartesian3.normalize(n,n),i=Cartesian3.cross(i,n,forwardScratch),Cartesian3.dot(t,i)<cosine90&&(n=Cartesian3.negate(n,n)),n)}var XZ_PLANE=Plane.fromPointNormal(Cartesian3.ZERO,Cartesian3.UNIT_Y),previousBottomScratch=new Cartesian3,vertexBottomScratch=new Cartesian3,vertexTopScratch=new Cartesian3,nextBottomScratch=new Cartesian3,vertexNormalScratch=new Cartesian3,intersectionScratch=new Cartesian3,cartographicScratch0=new Cartographic,cartographicScratch1=new Cartographic,cartographicIntersectionScratch=new Cartographic;GroundPolylineGeometry.createGeometry=function(e){var t,i,r,n,a,o=!e._scene3DOnly,s=e.loop,l=e._ellipsoid,c=e.granularity,u=e.arcType,d=new PROJECTIONS[e._projectionIndex](l),h=WALL_INITIAL_MIN_HEIGHT,p=WALL_INITIAL_MAX_HEIGHT,f=e._positions,m=f.length;2===m&&(s=!1);for(var g,y,_,v=new EllipsoidRhumbLine(void 0,void 0,l),C=[f[0]],x=0;x<m-1;x++)i=f[x],r=f[x+1],!defined(g=IntersectionTests.lineSegmentPlane(i,r,XZ_PLANE,intersectionScratch))||Cartesian3.equalsEpsilon(g,i,CesiumMath.EPSILON7)||Cartesian3.equalsEpsilon(g,r,CesiumMath.EPSILON7)||(e.arcType===ArcType$1.GEODESIC?C.push(Cartesian3.clone(g)):e.arcType===ArcType$1.RHUMB&&(_=l.cartesianToCartographic(g,cartographicScratch0).longitude,n=l.cartesianToCartographic(i,cartographicScratch0),a=l.cartesianToCartographic(r,cartographicScratch1),v.setEndPoints(n,a),y=v.findIntersectionWithLongitude(_,cartographicIntersectionScratch),!defined(g=l.cartographicToCartesian(y,intersectionScratch))||Cartesian3.equalsEpsilon(g,i,CesiumMath.EPSILON7)||Cartesian3.equalsEpsilon(g,r,CesiumMath.EPSILON7)||C.push(Cartesian3.clone(g)))),C.push(r);s&&(i=f[m-1],r=f[0],!defined(g=IntersectionTests.lineSegmentPlane(i,r,XZ_PLANE,intersectionScratch))||Cartesian3.equalsEpsilon(g,i,CesiumMath.EPSILON7)||Cartesian3.equalsEpsilon(g,r,CesiumMath.EPSILON7)||(e.arcType===ArcType$1.GEODESIC?C.push(Cartesian3.clone(g)):e.arcType===ArcType$1.RHUMB&&(_=l.cartesianToCartographic(g,cartographicScratch0).longitude,n=l.cartesianToCartographic(i,cartographicScratch0),a=l.cartesianToCartographic(r,cartographicScratch1),v.setEndPoints(n,a),y=v.findIntersectionWithLongitude(_,cartographicIntersectionScratch),!defined(g=l.cartographicToCartesian(y,intersectionScratch))||Cartesian3.equalsEpsilon(g,i,CesiumMath.EPSILON7)||Cartesian3.equalsEpsilon(g,r,CesiumMath.EPSILON7)||C.push(Cartesian3.clone(g)))));var b=C.length,S=new Array(b);for(x=0;x<b;x++){var T=Cartographic.fromCartesian(C[x],l);T.height=0,S[x]=T}if(!((b=(S=arrayRemoveDuplicates(S,Cartographic.equalsEpsilon)).length)<2)){var E=[],w=[],A=[],P=[],D=previousBottomScratch,M=vertexBottomScratch,I=vertexTopScratch,R=nextBottomScratch,O=vertexNormalScratch,L=S[0],N=S[1];for(D=getPosition(l,S[b-1],h,D),R=getPosition(l,N,h,R),M=getPosition(l,L,h,M),I=getPosition(l,L,p,I),O=s?computeVertexMiterNormal(D,M,I,R,O):computeRightNormal(L,N,p,l,O),Cartesian3.pack(O,w,0),Cartesian3.pack(M,A,0),Cartesian3.pack(I,P,0),E.push(L.latitude),E.push(L.longitude),interpolateSegment(L,N,h,p,c,u,l,w,A,P,E),x=1;x<b-1;++x){D=Cartesian3.clone(M,D),M=Cartesian3.clone(R,M);var F=S[x];getPosition(l,F,p,I),getPosition(l,S[x+1],h,R),computeVertexMiterNormal(D,M,I,R,O),t=w.length,Cartesian3.pack(O,w,t),Cartesian3.pack(M,A,t),Cartesian3.pack(I,P,t),E.push(F.latitude),E.push(F.longitude),interpolateSegment(S[x],S[x+1],h,p,c,u,l,w,A,P,E)}var B=S[b-1],V=S[b-2];M=getPosition(l,B,h,M),I=getPosition(l,B,p,I);if(O=s?(N=S[0],computeVertexMiterNormal(D=getPosition(l,V,h,D),M,I,R=getPosition(l,N,h,R),O)):computeRightNormal(V,B,p,l,O),t=w.length,Cartesian3.pack(O,w,t),Cartesian3.pack(M,A,t),Cartesian3.pack(I,P,t),E.push(B.latitude),E.push(B.longitude),s){for(interpolateSegment(B,L,h,p,c,u,l,w,A,P,E),t=w.length,x=0;x<3;++x)w[t+x]=w[x],A[t+x]=A[x],P[t+x]=P[x];E.push(L.latitude),E.push(L.longitude)}return generateGeometryAttributes(s,d,A,P,w,E,o)}};var lineDirectionScratch=new Cartesian3,matrix3Scratch=new Matrix3,quaternionScratch$2=new Quaternion;function breakMiter(e,t,i,r){return t=direction(i,t,lineDirectionScratch),t=Cartesian3.dot(t,e),(MITER_BREAK_SMALL<t||t<MITER_BREAK_LARGE)&&(i=direction(r,i,vertexUpScratch),t=t<MITER_BREAK_LARGE?CesiumMath.PI_OVER_TWO:-CesiumMath.PI_OVER_TWO,t=Quaternion.fromAxisAngle(i,t,quaternionScratch$2),t=Matrix3.fromQuaternion(t,matrix3Scratch),Matrix3.multiplyByVector(t,e,e),!0)}var endPosCartographicScratch=new Cartographic,normalStartpointScratch=new Cartesian3,normalEndpointScratch=new Cartesian3;function projectNormal(e,t,i,r,n){var a=Cartographic.toCartesian(t,e._ellipsoid,normalStartpointScratch),o=Cartesian3.add(a,i,normalEndpointScratch),s=!1,l=e._ellipsoid,c=l.cartesianToCartographic(o,endPosCartographicScratch);return Math.abs(t.longitude-c.longitude)>CesiumMath.PI_OVER_TWO&&(s=!0,o=Cartesian3.subtract(a,i,normalEndpointScratch),c=l.cartesianToCartographic(o,endPosCartographicScratch)),c.height=0,c=e.project(c,n),(n=Cartesian3.subtract(c,r,n)).z=0,n=Cartesian3.normalize(n,n),s&&Cartesian3.negate(n,n),n}var adjustHeightNormalScratch=new Cartesian3,adjustHeightOffsetScratch=new Cartesian3;function adjustHeights(e,t,i,r,n,a){var o=Cartesian3.subtract(t,e,adjustHeightNormalScratch);Cartesian3.normalize(o,o),i-=WALL_INITIAL_MIN_HEIGHT,i=Cartesian3.multiplyByScalar(o,i,adjustHeightOffsetScratch),Cartesian3.add(e,i,n),r-=WALL_INITIAL_MAX_HEIGHT,i=Cartesian3.multiplyByScalar(o,r,adjustHeightOffsetScratch),Cartesian3.add(t,i,a)}var nudgeDirectionScratch=new Cartesian3;function nudgeXZ(e,t){var i=Plane.getPointDistance(XZ_PLANE,e),r=Plane.getPointDistance(XZ_PLANE,t),n=nudgeDirectionScratch;CesiumMath.equalsEpsilon(i,0,CesiumMath.EPSILON2)?(n=direction(t,e,n),Cartesian3.multiplyByScalar(n,CesiumMath.EPSILON2,n),Cartesian3.add(e,n,e)):CesiumMath.equalsEpsilon(r,0,CesiumMath.EPSILON2)&&(n=direction(e,t,n),Cartesian3.multiplyByScalar(n,CesiumMath.EPSILON2,n),Cartesian3.add(t,n,t))}function nudgeCartographic(e,t){var i=Math.abs(e.longitude),r=Math.abs(t.longitude);if(CesiumMath.equalsEpsilon(i,CesiumMath.PI,CesiumMath.EPSILON11)){var n=CesiumMath.sign(t.longitude);return e.longitude=n*(i-CesiumMath.EPSILON11),1}return CesiumMath.equalsEpsilon(r,CesiumMath.PI,CesiumMath.EPSILON11)?(e=CesiumMath.sign(e.longitude),t.longitude=e*(r-CesiumMath.EPSILON11),2):0}var startCartographicScratch=new Cartographic,endCartographicScratch=new Cartographic,segmentStartTopScratch=new Cartesian3,segmentEndTopScratch=new Cartesian3,segmentStartBottomScratch=new Cartesian3,segmentEndBottomScratch=new Cartesian3,segmentStartNormalScratch=new Cartesian3,segmentEndNormalScratch=new Cartesian3,getHeightCartographics=[startCartographicScratch,endCartographicScratch],getHeightRectangleScratch=new Rectangle,adjustHeightStartTopScratch=new Cartesian3,adjustHeightEndTopScratch=new Cartesian3,adjustHeightStartBottomScratch=new Cartesian3,adjustHeightEndBottomScratch=new Cartesian3,segmentStart2DScratch=new Cartesian3,segmentEnd2DScratch=new Cartesian3,segmentStartNormal2DScratch=new Cartesian3,segmentEndNormal2DScratch=new Cartesian3,offsetScratch$1=new Cartesian3,startUpScratch=new Cartesian3,endUpScratch=new Cartesian3,rightScratch$1=new Cartesian3,startPlaneNormalScratch=new Cartesian3,endPlaneNormalScratch=new Cartesian3,encodeScratch=new EncodedCartesian3,encodeScratch2D=new EncodedCartesian3,forwardOffset2DScratch=new Cartesian3,right2DScratch=new Cartesian3,normalNudgeScratch=new Cartesian3,scratchBoundingSpheres=[new BoundingSphere,new BoundingSphere],REFERENCE_INDICES=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],REFERENCE_INDICES_LENGTH=REFERENCE_INDICES.length;function generateGeometryAttributes(e,t,i,r,n,a,o){var s,l,c,u,d=t._ellipsoid,h=i.length/3-1,p=8*h,f=4*p,m=new(65535<p?Uint32Array:Uint16Array)(36*h),g=new Float64Array(3*p),y=new Float32Array(f),_=new Float32Array(f),v=new Float32Array(f),C=new Float32Array(f),x=new Float32Array(f);o&&(s=new Float32Array(f),l=new Float32Array(f),c=new Float32Array(f),u=new Float32Array(2*p));var b=a.length/2,S=0,T=startCartographicScratch;T.height=0;var E=endCartographicScratch;E.height=0;var w=segmentStartTopScratch,A=segmentEndTopScratch;if(o)for(I=0,R=1;R<b;R++)T.latitude=a[I],T.longitude=a[I+1],E.latitude=a[I+2],E.longitude=a[I+3],w=t.project(T,w),A=t.project(E,A),S+=Cartesian3.distance(w,A),I+=2;for(var P,D=r.length/3,M=(A=Cartesian3.unpack(r,0,A),0),I=3,R=1;R<D;R++)w=Cartesian3.clone(A,w),A=Cartesian3.unpack(r,I,A),M+=Cartesian3.distance(w,A),I+=3;var O=0,L=0,N=0,F=0,B=!(I=3),V=Cartesian3.unpack(i,0,segmentEndBottomScratch),k=Cartesian3.unpack(r,0,segmentEndTopScratch),z=Cartesian3.unpack(n,0,segmentEndNormalScratch);e&&breakMiter(z,Cartesian3.unpack(i,i.length-6,segmentStartBottomScratch),V,k)&&(z=Cartesian3.negate(z,z));var G=0,U=0,$=0;for(R=0;R<h;R++){var H,W,j,q,Y=Cartesian3.clone(V,segmentStartBottomScratch),X=Cartesian3.clone(k,segmentStartTopScratch),Q=Cartesian3.clone(z,segmentStartNormalScratch);B&&(Q=Cartesian3.negate(Q,Q)),V=Cartesian3.unpack(i,I,segmentEndBottomScratch),k=Cartesian3.unpack(r,I,segmentEndTopScratch),B=breakMiter(z=Cartesian3.unpack(n,I,segmentEndNormalScratch),Y,V,k),T.latitude=a[O],T.longitude=a[O+1],E.latitude=a[O+2],E.longitude=a[O+3],o&&(xe=nudgeCartographic(T,E),j=t.project(T,segmentStart2DScratch),(de=direction(q=t.project(E,segmentEnd2DScratch),j,forwardOffset2DScratch)).y=Math.abs(de.y),H=segmentStartNormal2DScratch,W=segmentEndNormal2DScratch,0===xe||Cartesian3.dot(de,Cartesian3.UNIT_Y)>MITER_BREAK_SMALL?(H=projectNormal(t,T,Q,j,segmentStartNormal2DScratch),W=projectNormal(t,E,z,q,segmentEndNormal2DScratch)):1===xe?(W=projectNormal(t,E,z,q,segmentEndNormal2DScratch),H.x=0,H.y=CesiumMath.sign(T.longitude-Math.abs(E.longitude)),H.z=0):(H=projectNormal(t,T,Q,j,segmentStartNormal2DScratch),W.x=0,W.y=CesiumMath.sign(T.longitude-E.longitude),W.z=0));var Z,J,K,ee=Cartesian3.distance(X,k),te=EncodedCartesian3.fromCartesian(Y,encodeScratch),ie=Cartesian3.subtract(V,Y,offsetScratch$1),re=Cartesian3.normalize(ie,rightScratch$1),ne=Cartesian3.subtract(X,Y,startUpScratch),ae=(ne=Cartesian3.normalize(ne,ne),Cartesian3.cross(re,ne,rightScratch$1)),oe=(ae=Cartesian3.normalize(ae,ae),Cartesian3.cross(ne,Q,startPlaneNormalScratch)),se=(oe=Cartesian3.normalize(oe,oe),Cartesian3.subtract(k,V,endUpScratch)),le=(se=Cartesian3.normalize(se,se),Cartesian3.cross(z,se,endPlaneNormalScratch)),ce=(le=Cartesian3.normalize(le,le),ee/M),ue=G/M,de=0,he=0,pe=0;for(o&&(de=Cartesian3.distance(j,q),Z=EncodedCartesian3.fromCartesian(j,encodeScratch2D),J=Cartesian3.subtract(q,j,forwardOffset2DScratch),Ce=(K=Cartesian3.normalize(J,right2DScratch)).x,K.x=K.y,K.y=-Ce,he=de/S,pe=U/S),P=0;P<8;P++){var fe=F+4*P,me=L+2*P,ge=fe+3,ye=P<4?1:-1,_e=2===P||3===P||6===P||7===P?1:-1;Cartesian3.pack(te.high,y,fe),y[ge]=ie.x,Cartesian3.pack(te.low,_,fe),_[ge]=ie.y,Cartesian3.pack(oe,v,fe),v[ge]=ie.z,Cartesian3.pack(le,C,fe),C[ge]=ce*ye,Cartesian3.pack(ae,x,fe);var ve=ue*_e;0===ve&&_e<0&&(ve=9),x[ge]=ve,o&&(s[fe]=Z.high.x,s[fe+1]=Z.high.y,s[fe+2]=Z.low.x,s[fe+3]=Z.low.y,c[fe]=-H.y,c[fe+1]=H.x,c[fe+2]=W.y,c[fe+3]=-W.x,l[fe]=J.x,l[fe+1]=J.y,l[fe+2]=K.x,l[fe+3]=K.y,u[me]=he*ye,0==(ve=pe*_e)&&_e<0&&(ve=9),u[me+1]=ve)}var Ce,xe=adjustHeightStartBottomScratch;re=adjustHeightEndBottomScratch,ne=adjustHeightStartTopScratch,Q=adjustHeightEndTopScratch,se=Rectangle.fromCartographicArray(getHeightCartographics,getHeightRectangleScratch);$+=se=(Ce=ApproximateTerrainHeights.getMinimumMaximumHeights(se,d)).minimumTerrainHeight,$+=Ce=Ce.maximumTerrainHeight,adjustHeights(Y,X,se,Ce,xe,ne),adjustHeights(V,k,se,Ce,re,Q),Ce=Cartesian3.multiplyByScalar(ae,CesiumMath.EPSILON5,normalNudgeScratch),Cartesian3.add(xe,Ce,xe),Cartesian3.add(re,Ce,re),Cartesian3.add(ne,Ce,ne),Cartesian3.add(Q,Ce,Q),nudgeXZ(xe,re),nudgeXZ(ne,Q),Cartesian3.pack(xe,g,N),Cartesian3.pack(re,g,N+3),Cartesian3.pack(Q,g,N+6),Cartesian3.pack(ne,g,N+9),Ce=Cartesian3.multiplyByScalar(ae,-2*CesiumMath.EPSILON5,normalNudgeScratch),Cartesian3.add(xe,Ce,xe),Cartesian3.add(re,Ce,re),Cartesian3.add(ne,Ce,ne),Cartesian3.add(Q,Ce,Q),nudgeXZ(xe,re),nudgeXZ(ne,Q),Cartesian3.pack(xe,g,N+12),Cartesian3.pack(re,g,N+15),Cartesian3.pack(Q,g,N+18),Cartesian3.pack(ne,g,N+21),O+=2,I+=3,L+=16,N+=24,F+=32,G+=ee,U+=de}var be=I=0;for(R=0;R<h;R++){for(P=0;P<REFERENCE_INDICES_LENGTH;P++)m[I+P]=REFERENCE_INDICES[P]+be;be+=8,I+=REFERENCE_INDICES_LENGTH}return p=scratchBoundingSpheres,BoundingSphere.fromVertices(i,Cartesian3.ZERO,3,p[0]),BoundingSphere.fromVertices(r,Cartesian3.ZERO,3,p[1]),(e=BoundingSphere.fromBoundingSpheres(p)).radius+=$/(2*h),p={position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,normalize:!1,values:g}),startHiAndForwardOffsetX:getVec4GeometryAttribute(y),startLoAndForwardOffsetY:getVec4GeometryAttribute(_),startNormalAndForwardOffsetZ:getVec4GeometryAttribute(v),endNormalAndTextureCoordinateNormalizationX:getVec4GeometryAttribute(C),rightNormalAndTextureCoordinateNormalizationY:getVec4GeometryAttribute(x)},o&&(p.startHiLo2D=getVec4GeometryAttribute(s),p.offsetAndRight2D=getVec4GeometryAttribute(l),p.startEndNormals2D=getVec4GeometryAttribute(c),p.texcoordNormalization2D=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,normalize:!1,values:u})),new Geometry({attributes:p,indices:m,boundingSphere:e})}function getVec4GeometryAttribute(e){return new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}function HeadingPitchRange(e,t,i){this.heading=defaultValue(e,0),this.pitch=defaultValue(t,0),this.range=defaultValue(i,0)}GroundPolylineGeometry._projectNormal=projectNormal,HeadingPitchRange.clone=function(e,t){if(defined(e))return defined(t)||(t=new HeadingPitchRange),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var factorial=CesiumMath.factorial;function calculateCoefficientTerm(e,t,i,r,n,a){var o,s,l,c=0;if(0<r){for(s=0;s<n;s++){for(o=!1,l=0;l<a.length&&!o;l++)s===a[l]&&(o=!0);o||(a.push(s),c+=calculateCoefficientTerm(e,t,i,r-1,n,a),a.splice(a.length-1,1))}return c}for(c=1,s=0;s<n;s++){for(o=!1,l=0;l<a.length&&!o;l++)s===a[l]&&(o=!0);o||(c*=e-i[t[s]])}return c}var HermitePolynomialApproximation={type:"Hermite",getRequiredDataPoints:function(e,t){return t=defaultValue(t,0),Math.max(Math.floor((e+1)/(t+1)),2)},interpolateOrderZero:function(e,t,i,r,n){var a,o;defined(n)||(n=new Array(r));for(var s=t.length,l=new Array(r),c=0;c<r;c++){n[c]=0;var u=new Array(s);for(l[c]=u,m=0;m<s;m++)u[m]=[]}var d=s,h=new Array(d);for(c=0;c<d;c++)h[c]=c;var p=s-1;for(C=0;C<r;C++){for(m=0;m<d;m++)o=h[m]*r+C,l[C][0].push(i[o]);for(c=1;c<d;c++){for(var f=!1,m=0;m<d-c;m++){var g,y=t[h[m]],_=t[h[m+c]];_-y<=0?(g=i[o=h[m]*r+r*c+C],l[C][c].push(g/factorial(c))):(g=l[C][c-1][m+1]-l[C][c-1][m],l[C][c].push(g/(_-y))),f=f||0!==g}f||(p=c-1)}}for(a=0;a<=0;a++)for(c=a;c<=p;c++)for(var v=calculateCoefficientTerm(e,h,t,a,c,[]),C=0;C<r;C++){var x=l[C][c][0];n[C+a*r]+=x*v}return n}},arrayScratch$1=[];function fillCoefficientList(e,t,i,r,n,a){for(var o,s=-1,l=t.length,c=l*(l+1)/2,u=0;u<n;u++){var d=Math.floor(u*c);for(g=0;g<l;g++)o=t[g]*n*(a+1)+u,e[d+g]=r[o];for(var h=1;h<l;h++){for(var p=0,f=Math.floor(h*(1-h)/2)+l*h,m=!1,g=0;g<l-h;g++){var y,_,v=i[t[g]],C=i[t[g+h]];v=C-v<=0?(_=r[o=t[g]*n*(a+1)+n*h+u])/CesiumMath.factorial(h):(_=e[d+(y=Math.floor((h-1)*(2-h)/2)+l*(h-1))+g+1]-e[d+y+g])/(C-v),e[d+f+p]=v,p++,m=m||0!==_}m&&(s=Math.max(s,h))}}return s}function IauOrientationParameters(e,t,i,r){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=r}HermitePolynomialApproximation.interpolate=function(e,t,i,r,n,a,o){var s=r*(a+1);defined(o)||(o=new Array(s));for(var l=0;l<s;l++)o[l]=0;for(var c=t.length,u=new Array(c*(n+1)),d=0;d<c;d++)for(var h=0;h<n+1;h++)u[d*(n+1)+h]=d;for(var p=u.length,f=arrayScratch$1,m=fillCoefficientList(f,u,t,i,r,n),g=[],y=p*(p+1)/2,_=Math.min(m,a),v=0;v<=_;v++)for(d=v;d<=m;d++){g.length=0;for(var C=calculateCoefficientTerm(e,u,t,v,d,g),x=Math.floor(d*(1-d)/2)+p*d,b=0;b<r;b++){var S=f[Math.floor(b*y)+x];o[b+v*r]+=S*C}}return o};var Iau2000Orientation={},TdtMinusTai=32.184,J2000d=2451545,c1=-.0529921,c2=-.1059842,c3$1=13.0120009,c4=13.3407154,c5=.9856003,c6=26.4057084,c7=13.064993,c8=.3287146,c9=1.7484877,c10=-.1589763,c11=.0036096,c12=.1643573,c13=12.9590088,dateTT=new JulianDate;function IauOrientationAxes(e){defined(e)&&"function"==typeof e||(e=Iau2000Orientation.ComputeMoon),this._computeFunction=e}Iau2000Orientation.ComputeMoon=function(e,t){defined(e)||(e=JulianDate.now()),dateTT=JulianDate.addSeconds(e,TdtMinusTai,dateTT);var i=JulianDate.totalDays(dateTT)-J2000d,r=i/TimeConstants$1.DAYS_PER_JULIAN_CENTURY,n=(125.045+c1*i)*CesiumMath.RADIANS_PER_DEGREE,a=(250.089+c2*i)*CesiumMath.RADIANS_PER_DEGREE,o=(260.008+c3$1*i)*CesiumMath.RADIANS_PER_DEGREE,s=(176.625+c4*i)*CesiumMath.RADIANS_PER_DEGREE,l=(357.529+c5*i)*CesiumMath.RADIANS_PER_DEGREE,c=(311.589+c6*i)*CesiumMath.RADIANS_PER_DEGREE,u=(134.963+c7*i)*CesiumMath.RADIANS_PER_DEGREE,d=(276.617+c8*i)*CesiumMath.RADIANS_PER_DEGREE,h=(34.226+c9*i)*CesiumMath.RADIANS_PER_DEGREE,p=(15.134+c10*i)*CesiumMath.RADIANS_PER_DEGREE,f=(119.743+c11*i)*CesiumMath.RADIANS_PER_DEGREE,m=(239.961+c12*i)*CesiumMath.RADIANS_PER_DEGREE,g=(25.053+c13*i)*CesiumMath.RADIANS_PER_DEGREE,y=Math.sin(n),_=Math.sin(a),v=Math.sin(o),C=Math.sin(s),x=Math.sin(l),b=Math.sin(c),S=Math.sin(u),T=Math.sin(d),E=Math.sin(h),w=Math.sin(p),A=Math.sin(f),P=Math.sin(m),D=Math.sin(g);e=Math.cos(n),n=Math.cos(a),a=Math.cos(o),o=Math.cos(s),s=Math.cos(l),l=Math.cos(c),c=Math.cos(u),u=Math.cos(d),d=Math.cos(h),h=Math.cos(p),p=Math.cos(f),f=Math.cos(m),m=Math.cos(g),g=(269.9949+.0031*r-3.8787*y-.1204*_+.07*v-.0172*C+.0072*b-.0052*w+.0043*D)*CesiumMath.RADIANS_PER_DEGREE,r=(66.5392+.013*r+1.5419*e+.0239*n-.0278*a+.0068*o-.0029*l+9e-4*c+8e-4*h-9e-4*m)*CesiumMath.RADIANS_PER_DEGREE,D=(38.3213+13.17635815*i-14e-13*i*i+3.561*y+.1208*_-.0642*v+.0158*C+.0252*x-.0066*b-.0047*S-.0046*T+.0028*E+.0052*w+.004*A+.0019*P-.0044*D)*CesiumMath.RADIANS_PER_DEGREE,m=(13.17635815-2*i*14e-13+3.561*e*c1+.1208*n*c2-.0642*a*c3$1+.0158*o*c4+.0252*s*c5-.0066*l*c6-.0047*c*c7-.0046*u*c8+.0028*d*c9+.0052*h*c10+.004*p*c11+.0019*f*c12-.0044*m*c13)/86400*CesiumMath.RADIANS_PER_DEGREE;return defined(t)||(t=new IauOrientationParameters),t.rightAscension=g,t.declination=r,t.rotation=D,t.rotationRate=m,t};var xAxisScratch=new Cartesian3,yAxisScratch=new Cartesian3,zAxisScratch=new Cartesian3;function computeRotationMatrix(e,t,i){var r=xAxisScratch;r.x=Math.cos(e+CesiumMath.PI_OVER_TWO),r.y=Math.sin(e+CesiumMath.PI_OVER_TWO),r.z=0;var n=Math.cos(t),a=zAxisScratch;return a.x=n*Math.cos(e),a.y=n*Math.sin(e),a.z=Math.sin(t),t=Cartesian3.cross(a,r,yAxisScratch),defined(i)||(i=new Matrix3),i[0]=r.x,i[1]=t.x,i[2]=a.x,i[3]=r.y,i[4]=t.y,i[5]=a.y,i[6]=r.z,i[7]=t.z,i[8]=a.z,i}var rotMtxScratch=new Matrix3,quatScratch=new Quaternion;IauOrientationAxes.prototype.evaluate=function(e,t){return defined(e)||(e=JulianDate.now()),t=computeRotationMatrix((e=this._computeFunction(e)).rightAscension,e.declination,t),e=CesiumMath.zeroToTwoPi(e.rotation),e=Quaternion.fromAxisAngle(Cartesian3.UNIT_Z,e,quatScratch),e=Matrix3.fromQuaternion(Quaternion.conjugate(e,e),rotMtxScratch),Matrix3.multiply(e,t,t)};var InterpolationAlgorithm={type:void 0},defaultTokenCredit;InterpolationAlgorithm.getRequiredDataPoints=DeveloperError.throwInstantiationError,InterpolationAlgorithm.interpolateOrderZero=DeveloperError.throwInstantiationError,InterpolationAlgorithm.interpolate=DeveloperError.throwInstantiationError;var defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlNzMyOGZjZC1jMWUzLTQxNDctOGQxYi03YTYyZDQ1OTIxMjkiLCJpZCI6MjU5LCJpYXQiOjE2MDE1Njk1NDN9.X1a0DCM6F539g9MDSs_ldZ0gwgruxLAZiBl60JwG1ck",Ion={};function PeliasGeocoderService(e){this._url=Resource.createIfNeeded(e),this._url.appendForwardSlash()}function IonGeocoderService(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.accessToken,Ion.defaultAccessToken),i=Resource.createIfNeeded(defaultValue(e.server,Ion.defaultServer));i.appendForwardSlash();var r=Ion.getDefaultTokenCredit(t);defined(r)&&e.scene.frameState.creditDisplay.addDefaultCredit(Credit.clone(r)),r=i.getDerivedResource({url:"v1/geocode"}),defined(t)&&r.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=i,this._pelias=new PeliasGeocoderService(r)}function IonResource(e,t){var i,r=e.externalType,n=defined(r);if(n){if("3DTILES"!==r&&"STK_TERRAIN_SERVER"!==r)throw new RuntimeError("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");i={url:e.options.url}}else i={url:e.url,retryAttempts:1,retryCallback:retryCallback};Resource.call(this,i),this._ionEndpoint=e,this._ionEndpointDomain=n?void 0:new URI(e.url).authority,this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=n}function retryCallback(e,t){var i=defaultValue(e._ionRoot,e),r=i._ionEndpointResource;return defined(t)&&(401===t.statusCode||t.target instanceof Image)?(defined(i._pendingPromise)||(i._pendingPromise=r.fetchJson().then((function(e){return i._ionEndpoint=e})).always((function(e){return i._pendingPromise=void 0,e}))),i._pendingPromise.then((function(t){return e._ionEndpoint=t,!0}))):when.resolve(!1)}function TimeInterval(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.start=defined(e.start)?JulianDate.clone(e.start):new JulianDate,this.stop=defined(e.stop)?JulianDate.clone(e.stop):new JulianDate,this.data=e.data,this.isStartIncluded=defaultValue(e.isStartIncluded,!0),this.isStopIncluded=defaultValue(e.isStopIncluded,!0)}Ion.defaultAccessToken=defaultAccessToken,Ion.defaultServer=new Resource({url:"https://api.cesium.com/"}),Ion.getDefaultTokenCredit=function(e){if(e===defaultAccessToken)return defined(defaultTokenCredit)||(defaultTokenCredit=new Credit('<b>             This application is using Cesium\'s default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i>             with an access token from your ion account before making any Cesium API calls.             You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>',!0)),defaultTokenCredit},Object.defineProperties(PeliasGeocoderService.prototype,{url:{get:function(){return this._url}}}),PeliasGeocoderService.prototype.geocode=function(e,t){return this._url.getDerivedResource({url:t===GeocodeType$1.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then((function(e){return e.features.map((function(e){var t,i=e.bbox;return t=defined(i)?Rectangle.fromDegrees(i[0],i[1],i[2],i[3]):(i=e.geometry.coordinates[0],t=e.geometry.coordinates[1],Cartesian3.fromDegrees(i,t)),{displayName:e.properties.label,destination:t}}))}))},IonGeocoderService.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)},defined(Object.create)&&(IonResource.prototype=Object.create(Resource.prototype),IonResource.prototype.constructor=IonResource),IonResource.fromAssetId=function(e,t){var i=IonResource._createEndpointResource(e,t);return i.fetchJson().then((function(e){return new IonResource(e,i)}))},Object.defineProperties(IonResource.prototype,{credits:{get:function(){return defined(this._ionRoot)?this._ionRoot.credits:(defined(this._credits)||(this._credits=IonResource.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),IonResource.getCreditsFromEndpoint=function(e,t){return e=e.attributions.map(Credit.getIonCredit),defined(t=Ion.getDefaultTokenCredit(t.queryParameters.access_token))&&e.push(Credit.clone(t)),e},IonResource.prototype.clone=function(e){var t=defaultValue(this._ionRoot,this);return defined(e)||(e=new IonResource(t._ionEndpoint,t._ionEndpointResource)),(e=Resource.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},IonResource.prototype.fetchImage=function(e){var t;return this._isExternal||(t=e,e={preferBlob:!0},defined(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)),Resource.prototype.fetchImage.call(this,e)},IonResource.prototype._makeRequest=function(e){return this._isExternal||new URI(this.url).authority!==this._ionEndpointDomain||(defined(e.headers)||(e.headers={}),e.headers.Authorization="Bearer "+this._ionEndpoint.accessToken),Resource.prototype._makeRequest.call(this,e)},IonResource._createEndpointResource=function(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=defaultValue(t.server,Ion.defaultServer);t=defaultValue(t.accessToken,Ion.defaultAccessToken),i=Resource.createIfNeeded(i),e={url:"v1/assets/"+e+"/endpoint"};return defined(t)&&(e.queryParameters={access_token:t}),i.getDerivedResource(e)},Object.defineProperties(TimeInterval.prototype,{isEmpty:{get:function(){var e=JulianDate.compare(this.stop,this.start);return e<0||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});var scratchInterval={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};TimeInterval.fromIso8601=function(e,t){if(2!==(a=e.iso8601.split("/")).length)throw new DeveloperError("options.iso8601 is an invalid ISO 8601 interval.");var i=JulianDate.fromIso8601(a[0]),r=JulianDate.fromIso8601(a[1]),n=defaultValue(e.isStartIncluded,!0),a=defaultValue(e.isStopIncluded,!0);e=e.data;return defined(t)?(t.start=i,t.stop=r,t.isStartIncluded=n,t.isStopIncluded=a,t.data=e,t):(scratchInterval.start=i,scratchInterval.stop=r,scratchInterval.isStartIncluded=n,scratchInterval.isStopIncluded=a,scratchInterval.data=e,new TimeInterval(scratchInterval))},TimeInterval.toIso8601=function(e,t){return JulianDate.toIso8601(e.start,t)+"/"+JulianDate.toIso8601(e.stop,t)},TimeInterval.clone=function(e,t){if(defined(e))return defined(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new TimeInterval(e)},TimeInterval.equals=function(e,t,i){return e===t||defined(e)&&defined(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&JulianDate.equals(e.start,t.start)&&JulianDate.equals(e.stop,t.stop)&&(e.data===t.data||defined(i)&&i(e.data,t.data)))},TimeInterval.equalsEpsilon=function(e,t,i,r){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&JulianDate.equalsEpsilon(e.start,t.start,i)&&JulianDate.equalsEpsilon(e.stop,t.stop,i)&&(e.data===t.data||defined(r)&&r(e.data,t.data)))},TimeInterval.intersect=function(e,t,i,r){if(!defined(t))return TimeInterval.clone(TimeInterval.EMPTY,i);var n=e.start,a=e.stop,o=t.start,s=t.stop,l=JulianDate.greaterThanOrEquals(o,n)&&JulianDate.greaterThanOrEquals(a,o),c=!l&&JulianDate.lessThanOrEquals(o,n)&&JulianDate.lessThanOrEquals(n,s);if(!l&&!c)return TimeInterval.clone(TimeInterval.EMPTY,i);var u=e.isStartIncluded,d=e.isStopIncluded,h=t.isStartIncluded,p=t.isStopIncluded,f=JulianDate.lessThan(a,s);return defined(i)||(i=new TimeInterval),i.start=l?o:n,i.isStartIncluded=u&&h||!JulianDate.equals(o,n)&&(l&&h||c&&u),i.stop=f?a:s,i.isStopIncluded=f?d:d&&p||!JulianDate.equals(s,a)&&p,i.data=defined(r)?r(e.data,t.data):e.data,i},TimeInterval.contains=function(e,t){if(e.isEmpty)return!1;var i=JulianDate.compare(e.start,t);return 0===i?e.isStartIncluded:0===(t=JulianDate.compare(t,e.stop))?e.isStopIncluded:i<0&&t<0},TimeInterval.prototype.clone=function(e){return TimeInterval.clone(this,e)},TimeInterval.prototype.equals=function(e,t){return TimeInterval.equals(this,e,t)},TimeInterval.prototype.equalsEpsilon=function(e,t,i){return TimeInterval.equalsEpsilon(this,e,t,i)},TimeInterval.prototype.toString=function(){return TimeInterval.toIso8601(this)},TimeInterval.EMPTY=Object.freeze(new TimeInterval({start:new JulianDate,stop:new JulianDate,isStartIncluded:!1,isStopIncluded:!1}));var MINIMUM_VALUE=Object.freeze(JulianDate.fromIso8601("0000-01-01T00:00:00Z")),MAXIMUM_VALUE=Object.freeze(JulianDate.fromIso8601("9999-12-31T24:00:00Z")),MAXIMUM_INTERVAL=Object.freeze(new TimeInterval({start:MINIMUM_VALUE,stop:MAXIMUM_VALUE})),Iso8601={MINIMUM_VALUE:MINIMUM_VALUE,MAXIMUM_VALUE:MAXIMUM_VALUE,MAXIMUM_INTERVAL:MAXIMUM_INTERVAL},KeyboardEventModifier={SHIFT:0,CTRL:1,ALT:2},KeyboardEventModifier$1=Object.freeze(KeyboardEventModifier),LagrangePolynomialApproximation={type:"Lagrange",getRequiredDataPoints:function(e){return Math.max(e+1,2)},interpolateOrderZero:function(e,t,i,r,n){defined(n)||(n=new Array(r));for(var a=t.length,o=0;o<r;o++)n[o]=0;for(o=0;o<a;o++){for(var s,l=1,c=0;c<a;c++)c!==o&&(s=t[o]-t[c],l*=(e-t[c])/s);for(c=0;c<r;c++)n[c]+=l*i[o*r+c]}return n}},LinearApproximation={type:"Linear"};function ManagedArray(e){e=defaultValue(e,0),this._array=new Array(e),this._length=e}function MapProjection(){DeveloperError.throwInstantiationError()}function NearFarScalar(e,t,i,r){this.near=defaultValue(e,0),this.nearValue=defaultValue(t,0),this.far=defaultValue(i,1),this.farValue=defaultValue(r,0)}LinearApproximation.getRequiredDataPoints=function(e){return 2},LinearApproximation.interpolateOrderZero=function(e,t,i,r,n){var a,o;defined(n)||(n=new Array(r));for(var s=t[0],l=t[1],c=0;c<r;c++)a=i[c],o=i[c+r],n[c]=((o-a)*e+l*a-s*o)/(l-s);return n},Object.defineProperties(ManagedArray.prototype,{length:{get:function(){return this._length},set:function(e){var t=this._array,i=this._length;if(e<i)for(var r=e;r<i;++r)t[r]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}}),ManagedArray.prototype.get=function(e){return this._array[e]},ManagedArray.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t},ManagedArray.prototype.peek=function(){return this._array[this._length-1]},ManagedArray.prototype.push=function(e){var t=this.length++;this._array[t]=e},ManagedArray.prototype.pop=function(){if(0!==this._length){var e=this._array[this._length-1];return--this.length,e}},ManagedArray.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)},ManagedArray.prototype.resize=function(e){this.length=e},ManagedArray.prototype.trim=function(e){e=defaultValue(e,this._length),this._array.length=e},Object.defineProperties(MapProjection.prototype,{ellipsoid:{get:DeveloperError.throwInstantiationError}}),MapProjection.prototype.project=DeveloperError.throwInstantiationError,MapProjection.prototype.unproject=DeveloperError.throwInstantiationError,NearFarScalar.clone=function(e,t){if(defined(e))return defined(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new NearFarScalar(e.near,e.nearValue,e.far,e.farValue)},NearFarScalar.packedLength=4,NearFarScalar.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.near,t[i++]=e.nearValue,t[i++]=e.far,t[i]=e.farValue,t},NearFarScalar.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new NearFarScalar),i.near=e[t++],i.nearValue=e[t++],i.far=e[t++],i.farValue=e[t],i},NearFarScalar.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue},NearFarScalar.prototype.clone=function(e){return NearFarScalar.clone(this,e)},NearFarScalar.prototype.equals=function(e){return NearFarScalar.equals(this,e)};var Visibility={NONE:-1,PARTIAL:0,FULL:1},Visibility$1=Object.freeze(Visibility);function Occluder(e,t){this._occluderPosition=Cartesian3.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var scratchCartesian3$7=new Cartesian3;Object.defineProperties(Occluder.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=Cartesian3.clone(e,this._cameraPosition);var t,i,r,n=Cartesian3.subtract(this._occluderPosition,e,scratchCartesian3$7),a=Cartesian3.magnitudeSquared(n),o=this._occluderRadius*this._occluderRadius;o<a?(t=Math.sqrt(a-o),a=1/Math.sqrt(a),i=Cartesian3.multiplyByScalar(n,a,scratchCartesian3$7),r=t*t*a,r=Cartesian3.add(e,Cartesian3.multiplyByScalar(i,r,scratchCartesian3$7),scratchCartesian3$7)):t=Number.MAX_VALUE,this._horizonDistance=t,this._horizonPlaneNormal=i,this._horizonPlanePosition=r,this._cameraPosition=e}}}),Occluder.fromBoundingSphere=function(e,t,i){return defined(i)?(Cartesian3.clone(e.center,i._occluderPosition),i._occluderRadius=e.radius,i.cameraPosition=t,i):new Occluder(e,t)};var tempVecScratch=new Cartesian3;Occluder.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var t=Cartesian3.subtract(e,this._occluderPosition,tempVecScratch),i=this._occluderRadius;if(0<(i=Cartesian3.magnitudeSquared(t)-i*i))return i=Math.sqrt(i)+this._horizonDistance,t=Cartesian3.subtract(e,this._cameraPosition,t),i*i>Cartesian3.magnitudeSquared(t)}return!1};var occludeePositionScratch=new Cartesian3;Occluder.prototype.isBoundingSphereVisible=function(e){var t=Cartesian3.clone(e.center,occludeePositionScratch),i=e.radius;if(this._horizonDistance===Number.MAX_VALUE)return!1;var r=Cartesian3.subtract(t,this._occluderPosition,tempVecScratch);e=this._occluderRadius-i,e=Cartesian3.magnitudeSquared(r)-e*e;return i<this._occluderRadius?0<e&&(e=Math.sqrt(e)+this._horizonDistance,r=Cartesian3.subtract(t,this._cameraPosition,r),e*e+i*i>Cartesian3.magnitudeSquared(r)):!(0<e)||(r=Cartesian3.subtract(t,this._cameraPosition,r),t=Cartesian3.magnitudeSquared(r),r=this._occluderRadius*this._occluderRadius,i*=i,(this._horizonDistance*this._horizonDistance+r)*i>t*r||t<(e=Math.sqrt(e)+this._horizonDistance)*e+i)};var tempScratch$1=new Cartesian3;Occluder.prototype.computeVisibility=function(e){var t=Cartesian3.clone(e.center),i=e.radius;if(i>this._occluderRadius)return Visibility$1.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var r=Cartesian3.subtract(t,this._occluderPosition,tempScratch$1),n=this._occluderRadius-i,a=Cartesian3.magnitudeSquared(r);if(0<(n=a-n*n))return n=Math.sqrt(n)+this._horizonDistance,r=Cartesian3.subtract(t,this._cameraPosition,r),n*n+i*i<(e=Cartesian3.magnitudeSquared(r))?Visibility$1.NONE:0<(n=a-(n=this._occluderRadius+i)*n)?e<(n=Math.sqrt(n)+this._horizonDistance)*n+i*i?Visibility$1.FULL:Visibility$1.PARTIAL:(r=Cartesian3.subtract(t,this._horizonPlanePosition,r),Cartesian3.dot(r,this._horizonPlaneNormal)>-i?Visibility$1.PARTIAL:Visibility$1.FULL)}return Visibility$1.NONE};var occludeePointScratch=new Cartesian3;Occluder.computeOccludeePoint=function(e,t,i){var r=Cartesian3.clone(t),n=Cartesian3.clone(e.center),a=(t=e.radius,i.length),o=Cartesian3.normalize(Cartesian3.subtract(r,n,occludeePointScratch),occludeePointScratch),s=-Cartesian3.dot(o,n),l=Occluder._anyRotationVector(n,o,s),c=Occluder._horizonToPlaneNormalDotProduct(e,o,s,l,i[0]);if(c){for(var u,d=1;d<a;++d){if(!(u=Occluder._horizonToPlaneNormalDotProduct(e,o,s,l,i[d])))return;u<c&&(c=u)}if(!(c<.0017453283658983088))return t/=c,Cartesian3.add(n,Cartesian3.multiplyByScalar(o,t,occludeePointScratch),occludeePointScratch)}};var computeOccludeePointFromRectangleScratch=[];Occluder.computeOccludeePointFromRectangle=function(e,t){t=defaultValue(t,Ellipsoid.WGS84);var i=Rectangle.subsample(e,t,0,computeOccludeePointFromRectangleScratch),r=BoundingSphere.fromPoints(i);e=Cartesian3.ZERO;if(!Cartesian3.equals(e,r.center))return Occluder.computeOccludeePoint(new BoundingSphere(e,t.minimumRadius),r.center,i)};var tempVec0Scratch=new Cartesian3;Occluder._anyRotationVector=function(e,t,i){var r=Cartesian3.abs(t,tempVec0Scratch);(0===(a=r.x>r.y?0:1)&&r.z>r.x||1===a&&r.z>r.y)&&(a=2);var n=new Cartesian3,a=0===a?(r.x=e.x,r.y=e.y+1,r.z=e.z+1,Cartesian3.UNIT_X):1===a?(r.x=e.x+1,r.y=e.y,r.z=e.z+1,Cartesian3.UNIT_Y):(r.x=e.x+1,r.y=e.y+1,r.z=e.z,Cartesian3.UNIT_Z);t=(Cartesian3.dot(t,r)+i)/-Cartesian3.dot(t,a);return Cartesian3.normalize(Cartesian3.subtract(Cartesian3.add(r,Cartesian3.multiplyByScalar(a,t,n),r),e,r),r)};var posDirectionScratch=new Cartesian3;Occluder._rotationVector=function(e,t,i,r,n){return e=Cartesian3.subtract(r,e,posDirectionScratch),e=Cartesian3.normalize(e,e),Cartesian3.dot(t,e)<.9999999847691291&&(e=Cartesian3.cross(t,e,e),Cartesian3.magnitude(e)>CesiumMath.EPSILON13)?Cartesian3.normalize(e,new Cartesian3):n};var posScratch1=new Cartesian3,occluerPosScratch=new Cartesian3,posScratch2=new Cartesian3,horizonPlanePosScratch=new Cartesian3;function OffsetGeometryInstanceAttribute(e,t,i){e=defaultValue(e,0),t=defaultValue(t,0),i=defaultValue(i,0),this.value=new Float32Array([e,t,i])}function OpenCageGeocoderService(e,t,i){(e=Resource.createIfNeeded(e)).appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=defaultValue(i,{})}Occluder._horizonToPlaneNormalDotProduct=function(e,t,i,r,n){var a=Cartesian3.clone(n,posScratch1),o=Cartesian3.clone(e.center,occluerPosScratch),s=e.radius,l=Cartesian3.subtract(o,a,posScratch2);return!((n=Cartesian3.magnitudeSquared(l))<(e=s*s))&&(s=n-e,n=(e=Math.sqrt(s))*(1/Math.sqrt(n))*e,l=Cartesian3.normalize(l,l),e=Cartesian3.add(a,Cartesian3.multiplyByScalar(l,n,horizonPlanePosScratch),horizonPlanePosScratch),n=Math.sqrt(s-n*n),r=this._rotationVector(o,t,i,a,r),l=Cartesian3.fromElements(r.x*r.x*l.x+(r.x*r.y-r.z)*l.y+(r.x*r.z+r.y)*l.z,(r.x*r.y+r.z)*l.x+r.y*r.y*l.y+(r.y*r.z-r.x)*l.z,(r.x*r.z-r.y)*l.x+(r.y*r.z+r.x)*l.y+r.z*r.z*l.z,posScratch1),l=Cartesian3.normalize(l,l),l=Cartesian3.multiplyByScalar(l,n,posScratch1),r=Cartesian3.normalize(Cartesian3.subtract(Cartesian3.add(e,l,posScratch2),o,posScratch2),posScratch2),n=Cartesian3.dot(t,r),r=Cartesian3.normalize(Cartesian3.subtract(Cartesian3.subtract(e,l,r),o,r),r),n<(r=Cartesian3.dot(t,r))?n:r)},Object.defineProperties(OffsetGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),OffsetGeometryInstanceAttribute.fromCartesian3=function(e){return new OffsetGeometryInstanceAttribute(e.x,e.y,e.z)},OffsetGeometryInstanceAttribute.toValue=function(e,t){return defined(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t},Object.defineProperties(OpenCageGeocoderService.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}}),OpenCageGeocoderService.prototype.geocode=function(e){return this._url.getDerivedResource({url:"json",queryParameters:combine(this._params,{q:e})}).fetchJson().then((function(e){return e.results.map((function(e){var t,i=e.bounds;return t=defined(i)?Rectangle.fromDegrees(i.southwest.lng,i.southwest.lat,i.northeast.lng,i.northeast.lat):(i=e.geometry.lat,t=e.geometry.lng,Cartesian3.fromDegrees(i,t)),{displayName:e.formatted,destination:t}}))}))};var Packable={packedLength:void 0,pack:DeveloperError.throwInstantiationError,unpack:DeveloperError.throwInstantiationError},PackableForInterpolation={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:DeveloperError.throwInstantiationError,unpackInterpolationResult:DeveloperError.throwInstantiationError},getCSSValue=function(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},measureText=function(e,t,i,r){var n=e.measureText(t),a=getCSSValue(e.canvas,"font-family"),o=getCSSValue(e.canvas,"font-size").replace("px",""),s=getCSSValue(e.canvas,"font-style"),l=getCSSValue(e.canvas,"font-weight"),c=!/\S/.test(t);n.fontsize=o;var u=document.createElement("div");u.style.position="absolute",u.style.opacity=0,u.style.font=s+" "+l+" "+o+"px "+a,u.innerHTML=t+"<br/>"+t,document.body.appendChild(u),n.leading=1.2*o;var d=getCSSValue(u,"height");if(2*o<=(d=d.replace("px",""))&&(n.leading=d/2|0),document.body.removeChild(u),c)n.ascent=0,n.descent=0,n.bounds={minx:0,maxx:n.width,miny:0,maxy:0},n.height=0;else{(u=document.createElement("canvas")).width=n.width+100,u.height=3*o,u.style.opacity=1,u.style.fontFamily=a,u.style.fontSize=o,u.style.fontStyle=s,u.style.fontWeight=l,(c=u.getContext("2d")).font=s+" "+l+" "+o+"px "+a,o=u.width,u=(a=u.height)/2,c.fillStyle="white",c.fillRect(-1,-1,o+2,a+2),i&&(c.strokeStyle="black",c.lineWidth=e.lineWidth,c.strokeText(t,50,u)),r&&(c.fillStyle="black",c.fillText(t,50,u));for(var h=c.getImageData(0,0,o,a).data,p=0,f=4*o,m=h.length;++p<m&&255===h[p];);for(t=p/f|0,p=m-1;0<--p&&255===h[p];);for(c=p/f|0,p=0;p<m&&255===h[p];)m<=(p+=f)&&(p=p-m+4);a=p%f/4|0;var g=1;for(p=m-3;0<=p&&255===h[p];)(p-=f)<0&&(p=m-3-4*g++);o=p%f/4+1|0,n.ascent=u-t,n.descent=c-u,n.bounds={minx:a-50,maxx:o-50,miny:0,maxy:c-t},n.height=c-t+1}return n},imageSmoothingEnabledName;function writeTextToCanvas(e,t){if(""!==e){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=defaultValue(t.font,"10px sans-serif"),r=defaultValue(t.stroke,!1),n=defaultValue(t.fill,!0),a=defaultValue(t.strokeWidth,1),o=defaultValue(t.backgroundColor,Color.TRANSPARENT),s=defaultValue(t.padding,0),l=2*s,c=document.createElement("canvas");c.width=1,c.height=1,c.style.font=i;var u=c.getContext("2d");defined(imageSmoothingEnabledName)||(defined(u.imageSmoothingEnabled)?imageSmoothingEnabledName="imageSmoothingEnabled":defined(u.mozImageSmoothingEnabled)?imageSmoothingEnabledName="mozImageSmoothingEnabled":defined(u.webkitImageSmoothingEnabled)?imageSmoothingEnabledName="webkitImageSmoothingEnabled":defined(u.msImageSmoothingEnabled)&&(imageSmoothingEnabledName="msImageSmoothingEnabled")),u.font=i,u.lineJoin="round",u.lineWidth=a,u[imageSmoothingEnabledName]=!1,u.textBaseline=defaultValue(t.textBaseline,"bottom"),c.style.visibility="hidden",document.body.appendChild(c);var d=measureText(u,e,r,n);c.dimensions=d,document.body.removeChild(c),c.style.visibility="";var h=-d.bounds.minx,p=Math.ceil(d.width)+h+l,f=d.height+l;l=f-(f-d.ascent+s)+l;return c.width=p,c.height=f,u.font=i,u.lineJoin="round",u.lineWidth=a,u[imageSmoothingEnabledName]=!1,o!==Color.TRANSPARENT&&(u.fillStyle=o.toCssColorString(),u.fillRect(0,0,c.width,c.height)),r&&(r=defaultValue(t.strokeColor,Color.BLACK),u.strokeStyle=r.toCssColorString(),u.strokeText(e,h+s,l)),n&&(t=defaultValue(t.fillColor,Color.WHITE),u.fillStyle=t.toCssColorString(),u.fillText(e,h+s,l)),c}}function PinBuilder(){this._cache={}}PinBuilder.prototype.fromColor=function(e,t){return createPin(void 0,void 0,e,t,this._cache)},PinBuilder.prototype.fromUrl=function(e,t,i){return createPin(e,void 0,t,i,this._cache)},PinBuilder.prototype.fromMakiIconId=function(e,t,i){return createPin(buildModuleUrl("Assets/Textures/maki/"+encodeURIComponent(e)+".png"),void 0,t,i,this._cache)},PinBuilder.prototype.fromText=function(e,t,i){return createPin(void 0,e,t,i,this._cache)};var colorScratch=new Color;function drawPin(e,t,i){e.save(),e.scale(i/24,i/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,colorScratch).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function drawIcon(e,t,i){var r=i/2.5,n=r,a=r;t.width>t.height?a=r*(t.height/t.width):t.width<t.height&&(n=r*(t.width/t.height)),r=Math.round((i-n)/2),i=Math.round(7/24*i-a/2),e.globalCompositeOperation="destination-out",e.drawImage(t,r-1,i,n,a),e.drawImage(t,r,i-1,n,a),e.drawImage(t,r+1,i,n,a),e.drawImage(t,r,i+1,n,a),e.globalCompositeOperation="destination-over",e.fillStyle=Color.BLACK.toCssColorString(),e.fillRect(r-1,i-1,n+2,a+2),e.globalCompositeOperation="destination-out",e.drawImage(t,r,i,n,a),e.globalCompositeOperation="destination-over",e.fillStyle=Color.WHITE.toCssColorString(),e.fillRect(r-1,i-2,n+2,a+2)}var stringifyScratch=new Array(4);function createPin(e,t,i,r,n){stringifyScratch[0]=e,stringifyScratch[1]=t,stringifyScratch[2]=i,stringifyScratch[3]=r;var a=JSON.stringify(stringifyScratch),o=n[a];if(defined(o))return o;var s=document.createElement("canvas");s.width=r,s.height=r;var l=s.getContext("2d");return drawPin(l,i,r),defined(e)?(e=Resource.createIfNeeded(e).fetchImage().then((function(e){return drawIcon(l,e,r),n[a]=s})),n[a]=e):(defined(t)&&(t=writeTextToCanvas(t,{font:"bold "+r+"px sans-serif"}),drawIcon(l,t,r)),n[a]=s)}var PixelDatatype={UNSIGNED_BYTE:WebGLConstants$1.UNSIGNED_BYTE,UNSIGNED_SHORT:WebGLConstants$1.UNSIGNED_SHORT,UNSIGNED_INT:WebGLConstants$1.UNSIGNED_INT,FLOAT:WebGLConstants$1.FLOAT,HALF_FLOAT:WebGLConstants$1.HALF_FLOAT_OES,UNSIGNED_INT_24_8:WebGLConstants$1.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:WebGLConstants$1.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:WebGLConstants$1.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:WebGLConstants$1.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(e,t){switch(e){case PixelDatatype.UNSIGNED_BYTE:return WebGLConstants$1.UNSIGNED_BYTE;case PixelDatatype.UNSIGNED_SHORT:return WebGLConstants$1.UNSIGNED_SHORT;case PixelDatatype.UNSIGNED_INT:return WebGLConstants$1.UNSIGNED_INT;case PixelDatatype.FLOAT:return WebGLConstants$1.FLOAT;case PixelDatatype.HALF_FLOAT:return t.webgl2?WebGLConstants$1.HALF_FLOAT:WebGLConstants$1.HALF_FLOAT_OES;case PixelDatatype.UNSIGNED_INT_24_8:return WebGLConstants$1.UNSIGNED_INT_24_8;case PixelDatatype.UNSIGNED_SHORT_4_4_4_4:return WebGLConstants$1.UNSIGNED_SHORT_4_4_4_4;case PixelDatatype.UNSIGNED_SHORT_5_5_5_1:return WebGLConstants$1.UNSIGNED_SHORT_5_5_5_1;case PixelDatatype.UNSIGNED_SHORT_5_6_5:return PixelDatatype.UNSIGNED_SHORT_5_6_5}},isPacked:function(e){return e===PixelDatatype.UNSIGNED_INT_24_8||e===PixelDatatype.UNSIGNED_SHORT_4_4_4_4||e===PixelDatatype.UNSIGNED_SHORT_5_5_5_1||e===PixelDatatype.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case PixelDatatype.UNSIGNED_BYTE:return 1;case PixelDatatype.UNSIGNED_SHORT:case PixelDatatype.UNSIGNED_SHORT_4_4_4_4:case PixelDatatype.UNSIGNED_SHORT_5_5_5_1:case PixelDatatype.UNSIGNED_SHORT_5_6_5:case PixelDatatype.HALF_FLOAT:return 2;case PixelDatatype.UNSIGNED_INT:case PixelDatatype.FLOAT:case PixelDatatype.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===PixelDatatype.UNSIGNED_BYTE||e===PixelDatatype.UNSIGNED_SHORT||e===PixelDatatype.UNSIGNED_INT||e===PixelDatatype.FLOAT||e===PixelDatatype.HALF_FLOAT||e===PixelDatatype.UNSIGNED_INT_24_8||e===PixelDatatype.UNSIGNED_SHORT_4_4_4_4||e===PixelDatatype.UNSIGNED_SHORT_5_5_5_1||e===PixelDatatype.UNSIGNED_SHORT_5_6_5}},PixelDatatype$1=Object.freeze(PixelDatatype),PixelFormat={DEPTH_COMPONENT:WebGLConstants$1.DEPTH_COMPONENT,DEPTH_STENCIL:WebGLConstants$1.DEPTH_STENCIL,ALPHA:WebGLConstants$1.ALPHA,RGB:WebGLConstants$1.RGB,RGBA:WebGLConstants$1.RGBA,LUMINANCE:WebGLConstants$1.LUMINANCE,LUMINANCE_ALPHA:WebGLConstants$1.LUMINANCE_ALPHA,RGB_DXT1:WebGLConstants$1.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:WebGLConstants$1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:WebGLConstants$1.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:WebGLConstants$1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:WebGLConstants$1.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGB_ETC1:WebGLConstants$1.COMPRESSED_RGB_ETC1_WEBGL,componentsLength:function(e){switch(e){case PixelFormat.RGB:return 3;case PixelFormat.RGBA:return 4;case PixelFormat.LUMINANCE_ALPHA:return 2;case PixelFormat.ALPHA:case PixelFormat.LUMINANCE:default:return 1}},validate:function(e){return e===PixelFormat.DEPTH_COMPONENT||e===PixelFormat.DEPTH_STENCIL||e===PixelFormat.ALPHA||e===PixelFormat.RGB||e===PixelFormat.RGBA||e===PixelFormat.LUMINANCE||e===PixelFormat.LUMINANCE_ALPHA||e===PixelFormat.RGB_DXT1||e===PixelFormat.RGBA_DXT1||e===PixelFormat.RGBA_DXT3||e===PixelFormat.RGBA_DXT5||e===PixelFormat.RGB_PVRTC_4BPPV1||e===PixelFormat.RGB_PVRTC_2BPPV1||e===PixelFormat.RGBA_PVRTC_4BPPV1||e===PixelFormat.RGBA_PVRTC_2BPPV1||e===PixelFormat.RGB_ETC1},isColorFormat:function(e){return e===PixelFormat.ALPHA||e===PixelFormat.RGB||e===PixelFormat.RGBA||e===PixelFormat.LUMINANCE||e===PixelFormat.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===PixelFormat.DEPTH_COMPONENT||e===PixelFormat.DEPTH_STENCIL},isCompressedFormat:function(e){return e===PixelFormat.RGB_DXT1||e===PixelFormat.RGBA_DXT1||e===PixelFormat.RGBA_DXT3||e===PixelFormat.RGBA_DXT5||e===PixelFormat.RGB_PVRTC_4BPPV1||e===PixelFormat.RGB_PVRTC_2BPPV1||e===PixelFormat.RGBA_PVRTC_4BPPV1||e===PixelFormat.RGBA_PVRTC_2BPPV1||e===PixelFormat.RGB_ETC1},isDXTFormat:function(e){return e===PixelFormat.RGB_DXT1||e===PixelFormat.RGBA_DXT1||e===PixelFormat.RGBA_DXT3||e===PixelFormat.RGBA_DXT5},isPVRTCFormat:function(e){return e===PixelFormat.RGB_PVRTC_4BPPV1||e===PixelFormat.RGB_PVRTC_2BPPV1||e===PixelFormat.RGBA_PVRTC_4BPPV1||e===PixelFormat.RGBA_PVRTC_2BPPV1},isETC1Format:function(e){return e===PixelFormat.RGB_ETC1},compressedTextureSizeInBytes:function(e,t,i){switch(e){case PixelFormat.RGB_DXT1:case PixelFormat.RGBA_DXT1:case PixelFormat.RGB_ETC1:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8;case PixelFormat.RGBA_DXT3:case PixelFormat.RGBA_DXT5:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16;case PixelFormat.RGB_PVRTC_4BPPV1:case PixelFormat.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case PixelFormat.RGB_PVRTC_2BPPV1:case PixelFormat.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);default:return 0}},textureSizeInBytes:function(e,t,i,r){return e=PixelFormat.componentsLength(e),PixelDatatype$1.isPacked(t)&&(e=1),e*PixelDatatype$1.sizeInBytes(t)*i*r},alignmentInBytes:function(e,t,i){return 0==(i=PixelFormat.textureSizeInBytes(e,t,i,1)%4)?4:2==i?2:1},createTypedArray:function(e,t,i,r){var n=PixelDatatype$1.sizeInBytes(t);return new(t=n===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:n===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:n===Float32Array.BYTES_PER_ELEMENT&&t===PixelDatatype$1.FLOAT?Float32Array:Uint32Array)(PixelFormat.componentsLength(e)*i*r)},flipY:function(e,t,i,r,n){if(1===n)return e;for(var a=PixelFormat.createTypedArray(t,i,r,n),o=PixelFormat.componentsLength(t),s=r*o,l=0;l<n;++l)for(var c=l*r*o,u=(n-l-1)*r*o,d=0;d<s;++d)a[u+d]=e[c+d];return a},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===PixelFormat.DEPTH_STENCIL)return WebGLConstants$1.DEPTH24_STENCIL8;if(e===PixelFormat.DEPTH_COMPONENT){if(t===PixelDatatype$1.UNSIGNED_SHORT)return WebGLConstants$1.DEPTH_COMPONENT16;if(t===PixelDatatype$1.UNSIGNED_INT)return WebGLConstants$1.DEPTH_COMPONENT24}if(t===PixelDatatype$1.FLOAT)switch(e){case PixelFormat.RGBA:return WebGLConstants$1.RGBA32F;case PixelFormat.RGB:return WebGLConstants$1.RGB32F;case PixelFormat.RG:return WebGLConstants$1.RG32F;case PixelFormat.R:return WebGLConstants$1.R32F}if(t===PixelDatatype$1.HALF_FLOAT)switch(e){case PixelFormat.RGBA:return WebGLConstants$1.RGBA16F;case PixelFormat.RGB:return WebGLConstants$1.RGB16F;case PixelFormat.RG:return WebGLConstants$1.RG16F;case PixelFormat.R:return WebGLConstants$1.R16F}return e}},PixelFormat$1=Object.freeze(PixelFormat);function PlaneGeometry(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),e=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),this._vertexFormat=e,this._workerName="createPlaneGeometry"}PlaneGeometry.packedLength=VertexFormat.packedLength,PlaneGeometry.pack=function(e,t,i){return i=defaultValue(i,0),VertexFormat.pack(e._vertexFormat,t,i),t};var scratchVertexFormat$7=new VertexFormat,scratchOptions$e={vertexFormat:scratchVertexFormat$7};PlaneGeometry.unpack=function(e,t,i){return t=defaultValue(t,0),t=VertexFormat.unpack(e,t,scratchVertexFormat$7),defined(i)?(i._vertexFormat=VertexFormat.clone(t,i._vertexFormat),i):new PlaneGeometry(scratchOptions$e)};var min=new Cartesian3(-.5,-.5,0),max=new Cartesian3(.5,.5,0);function PlaneOutlineGeometry(){this._workerName="createPlaneOutlineGeometry"}PlaneGeometry.createGeometry=function(e){var t,i,r=e._vertexFormat,n=new GeometryAttributes;return r.position&&((e=new Float64Array(12))[0]=min.x,e[1]=min.y,e[2]=0,e[3]=max.x,e[4]=min.y,e[5]=0,e[6]=max.x,e[7]=max.y,e[8]=0,e[9]=min.x,e[10]=max.y,e[11]=0,n.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:e}),r.normal&&((e=new Float32Array(12))[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=1,e[9]=0,e[10]=0,e[11]=1,n.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:e})),r.st&&((t=new Float32Array(8))[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,n.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:t})),r.tangent&&((t=new Float32Array(12))[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,n.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:t})),r.bitangent&&((i=new Float32Array(12))[0]=0,i[1]=1,i[2]=0,i[3]=0,i[4]=1,i[5]=0,i[6]=0,i[7]=1,i[8]=0,i[9]=0,i[10]=1,i[11]=0,n.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:i})),(i=new Uint16Array(6))[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3),new Geometry({attributes:n,indices:i,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:new BoundingSphere(Cartesian3.ZERO,Math.sqrt(2))})},PlaneOutlineGeometry.packedLength=0,PlaneOutlineGeometry.pack=function(e,t){return t},PlaneOutlineGeometry.unpack=function(e,t,i){return defined(i)?i:new PlaneOutlineGeometry};var min$1=new Cartesian3(-.5,-.5,0),max$1=new Cartesian3(.5,.5,0);PlaneOutlineGeometry.createGeometry=function(){var e=new GeometryAttributes,t=new Uint16Array(8),i=new Float64Array(12);return i[0]=min$1.x,i[1]=min$1.y,i[2]=min$1.z,i[3]=max$1.x,i[4]=min$1.y,i[5]=min$1.z,i[6]=max$1.x,i[7]=max$1.y,i[8]=min$1.z,i[9]=min$1.x,i[10]=max$1.y,i[11]=min$1.z,e.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:i}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new Geometry({attributes:e,indices:t,primitiveType:PrimitiveType$1.LINES,boundingSphere:new BoundingSphere(Cartesian3.ZERO,Math.sqrt(2))})};var scratchCarto1=new Cartographic,scratchCarto2=new Cartographic;function adjustPosHeightsForNormal(e,t,i,r){var n=r.cartesianToCartographic(e,scratchCarto1).height;(e=r.cartesianToCartographic(t,scratchCarto2)).height=n,r.cartographicToCartesian(e,t),(t=r.cartesianToCartographic(i,scratchCarto2)).height=n-100,r.cartographicToCartesian(t,i)}var scratchBoundingRectangle=new BoundingRectangle,scratchPosition$2=new Cartesian3,scratchNormal$5=new Cartesian3,scratchTangent$3=new Cartesian3,scratchBitangent$3=new Cartesian3,p1Scratch$2=new Cartesian3,p2Scratch$2=new Cartesian3,scratchPerPosNormal=new Cartesian3,scratchPerPosTangent=new Cartesian3,scratchPerPosBitangent=new Cartesian3,appendTextureCoordinatesOrigin=new Cartesian2,appendTextureCoordinatesCartesian2=new Cartesian2,appendTextureCoordinatesCartesian3=new Cartesian3,appendTextureCoordinatesQuaternion=new Quaternion,appendTextureCoordinatesMatrix3=new Matrix3,tangentMatrixScratch$1=new Matrix3;function computeAttributes(e){var t=e.vertexFormat,i=e.geometry,r=e.shadowVolume,n=i.attributes.position.values,a=n.length,o=e.wall,s=e.top||o,l=e.bottom||o;if(t.st||t.normal||t.tangent||t.bitangent||r){var c=e.boundingRectangle,u=e.tangentPlane,d=e.ellipsoid,h=e.stRotation,p=e.perPositionHeight,f=appendTextureCoordinatesOrigin;f.x=c.x,f.y=c.y;var m,g=t.st?new Float32Array(a/3*2):void 0;t.normal&&(m=p&&s&&!o?i.attributes.normal.values:new Float32Array(a));var y,_=t.tangent?new Float32Array(a):void 0,v=t.bitangent?new Float32Array(a):void 0,C=r?new Float32Array(a):void 0,x=0,b=0,S=scratchNormal$5,T=scratchTangent$3,E=scratchBitangent$3,w=!0,A=appendTextureCoordinatesMatrix3,P=tangentMatrixScratch$1;P=0!==h?(y=Quaternion.fromAxisAngle(u._plane.normal,h,appendTextureCoordinatesQuaternion),A=Matrix3.fromQuaternion(y,A),y=Quaternion.fromAxisAngle(u._plane.normal,-h,appendTextureCoordinatesQuaternion),Matrix3.fromQuaternion(y,P)):(A=Matrix3.clone(Matrix3.IDENTITY,A),Matrix3.clone(Matrix3.IDENTITY,P));var D=0,M=0;s&&l&&(D=a/2,M=a/3,a/=2);for(var I=0;I<a;I+=3){var R,O,L,N,F=Cartesian3.fromArray(n,I,appendTextureCoordinatesCartesian3);t.st&&(R=Matrix3.multiplyByVector(A,F,scratchPosition$2),R=d.scaleToGeodeticSurface(R,R),O=u.projectPointOntoPlane(R,appendTextureCoordinatesCartesian2),Cartesian2.subtract(O,f,O),L=CesiumMath.clamp(O.x/c.width,0,1),N=CesiumMath.clamp(O.y/c.height,0,1),l&&(g[x+M]=L,g[x+1+M]=N),s&&(g[x]=L,g[x+1]=N),x+=2),(t.normal||t.tangent||t.bitangent||r)&&(R=b+1,O=b+2,o?(I+3<a&&(L=Cartesian3.fromArray(n,I+3,p1Scratch$2),w&&(N=Cartesian3.fromArray(n,I+a,p2Scratch$2),p&&adjustPosHeightsForNormal(F,L,N,d),Cartesian3.subtract(L,F,L),Cartesian3.subtract(N,F,N),S=Cartesian3.normalize(Cartesian3.cross(N,L,S),S),w=!1),Cartesian3.equalsEpsilon(L,F,CesiumMath.EPSILON10)&&(w=!0)),(t.tangent||t.bitangent)&&(E=d.geodeticSurfaceNormal(F,E),t.tangent&&(T=Cartesian3.normalize(Cartesian3.cross(E,S,T),T)))):(S=d.geodeticSurfaceNormal(F,S),(t.tangent||t.bitangent)&&(p&&(scratchPerPosNormal=Cartesian3.fromArray(m,b,scratchPerPosNormal),scratchPerPosTangent=Cartesian3.cross(Cartesian3.UNIT_Z,scratchPerPosNormal,scratchPerPosTangent),scratchPerPosTangent=Cartesian3.normalize(Matrix3.multiplyByVector(P,scratchPerPosTangent,scratchPerPosTangent),scratchPerPosTangent),t.bitangent&&(scratchPerPosBitangent=Cartesian3.normalize(Cartesian3.cross(scratchPerPosNormal,scratchPerPosTangent,scratchPerPosBitangent),scratchPerPosBitangent))),T=Cartesian3.cross(Cartesian3.UNIT_Z,S,T),T=Cartesian3.normalize(Matrix3.multiplyByVector(P,T,T),T),t.bitangent&&(E=Cartesian3.normalize(Cartesian3.cross(S,T,E),E)))),t.normal&&(e.wall?(m[b+D]=S.x,m[R+D]=S.y,m[O+D]=S.z):l&&(m[b+D]=-S.x,m[R+D]=-S.y,m[O+D]=-S.z),(s&&!p||o)&&(m[b]=S.x,m[R]=S.y,m[O]=S.z)),r&&(o&&(S=d.geodeticSurfaceNormal(F,S)),C[b+D]=-S.x,C[R+D]=-S.y,C[O+D]=-S.z),t.tangent&&(e.wall?(_[b+D]=T.x,_[R+D]=T.y,_[O+D]=T.z):l&&(_[b+D]=-T.x,_[R+D]=-T.y,_[O+D]=-T.z),s&&(p?(_[b]=scratchPerPosTangent.x,_[R]=scratchPerPosTangent.y,_[O]=scratchPerPosTangent.z):(_[b]=T.x,_[R]=T.y,_[O]=T.z))),t.bitangent&&(l&&(v[b+D]=E.x,v[R+D]=E.y,v[O+D]=E.z),s&&(p?(v[b]=scratchPerPosBitangent.x,v[R]=scratchPerPosBitangent.y,v[O]=scratchPerPosBitangent.z):(v[b]=E.x,v[R]=E.y,v[O]=E.z))),b+=3)}t.st&&(i.attributes.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:g})),t.normal&&(i.attributes.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:m})),t.tangent&&(i.attributes.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:_})),t.bitangent&&(i.attributes.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:v})),r&&(i.attributes.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:C}))}return e.extrude&&defined(e.offsetAttribute)&&(h=n.length/3,y=new Uint8Array(h),e.offsetAttribute===GeometryOffsetAttribute$1.TOP?s&&l||o?y=arrayFill(y,1,0,h/2):s&&(y=arrayFill(y,1)):y=arrayFill(y,e.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),i.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})),i}var startCartographicScratch$1=new Cartographic,endCartographicScratch$1=new Cartographic,idlCross={westOverIDL:0,eastOverIDL:0},ellipsoidGeodesic$1=new EllipsoidGeodesic;function computeRectangle$2(e,t,i,r,n){if(n=defaultValue(n,new Rectangle),!defined(e)||e.length<3)return n.west=0,n.north=0,n.south=0,n.east=0,n;if(i===ArcType$1.RHUMB)return Rectangle.fromCartesianArray(e,t,n);ellipsoidGeodesic$1.ellipsoid.equals(t)||(ellipsoidGeodesic$1=new EllipsoidGeodesic(void 0,void 0,t)),n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,idlCross.westOverIDL=Number.POSITIVE_INFINITY,idlCross.eastOverIDL=Number.NEGATIVE_INFINITY;for(var a,o=1/CesiumMath.chordLength(r,t.maximumRadius),s=e.length,l=t.cartesianToCartographic(e[0],endCartographicScratch$1),c=startCartographicScratch$1,u=1;u<s;u++)a=c,c=l,l=t.cartesianToCartographic(e[u],a),ellipsoidGeodesic$1.setEndPoints(c,l),interpolateAndGrowRectangle(ellipsoidGeodesic$1,o,n,idlCross);return a=c,c=l,l=t.cartesianToCartographic(e[0],a),ellipsoidGeodesic$1.setEndPoints(c,l),interpolateAndGrowRectangle(ellipsoidGeodesic$1,o,n,idlCross),n.east-n.west>idlCross.eastOverIDL-idlCross.westOverIDL&&(n.west=idlCross.westOverIDL,n.east=idlCross.eastOverIDL,n.east>CesiumMath.PI&&(n.east=n.east-CesiumMath.TWO_PI),n.west>CesiumMath.PI&&(n.west=n.west-CesiumMath.TWO_PI)),n}var interpolatedCartographicScratch$1=new Cartographic;function interpolateAndGrowRectangle(e,t,i,r){for(var n=e.surfaceDistance,a=Math.ceil(n*t),o=0<a?n/(a-1):Number.POSITIVE_INFINITY,s=0,l=0;l<a;l++){var c=e.interpolateUsingSurfaceDistance(s,interpolatedCartographicScratch$1);s+=o;var u=c.longitude;c=c.latitude;i.west=Math.min(i.west,u),i.east=Math.max(i.east,u),i.south=Math.min(i.south,c),i.north=Math.max(i.north,c),u=0<=u?u:u+CesiumMath.TWO_PI,r.westOverIDL=Math.min(r.westOverIDL,u),r.eastOverIDL=Math.max(r.eastOverIDL,u)}}var createGeometryFromPositionsExtrudedPositions=[];function createGeometryFromPositionsExtruded(e,t,i,r,n,a,o,s,l){var c={walls:[]};if(a||o){t=(v=PolygonGeometryLibrary.createGeometryFromPositions(e,t,i,n,s,l)).attributes.position.values;var u=v.indices;if(a&&o){var d,h=(a=t.concat(t)).length/3;(d=IndexDatatype$1.createTypedArray(h,2*u.length)).set(u);for(var p=u.length,f=h/2,m=0;m<p;m+=3){var g=d[m]+f,y=d[m+1]+f,_=d[m+2]+f;d[m+p]=_,d[m+1+p]=y,d[m+2+p]=g}v.attributes.position.values=a,n&&s.normal&&(s=v.attributes.normal.values,v.attributes.normal.values=new Float32Array(a.length),v.attributes.normal.values.set(s)),v.indices=d}else if(o){for(h=t.length/3,d=IndexDatatype$1.createTypedArray(h,u.length),m=0;m<u.length;m+=3)d[m]=u[m+2],d[m+1]=u[m+1],d[m+2]=u[m];v.indices=d}c.topAndBottom=new GeometryInstance({geometry:v})}var v=r.outerRing,C=EllipsoidTangentPlane.fromPoints(v,e).projectPointsOntoPlane(v,createGeometryFromPositionsExtrudedPositions);PolygonPipeline.computeWindingOrder2D(C)===WindingOrder$1.CLOCKWISE&&(v=v.slice().reverse());var x=PolygonGeometryLibrary.computeWallGeometry(v,e,i,n,l);c.walls.push(new GeometryInstance({geometry:x}));var b=r.holes;for(m=0;m<b.length;m++){var S=b[m];C=EllipsoidTangentPlane.fromPoints(S,e).projectPointsOntoPlane(S,createGeometryFromPositionsExtrudedPositions);PolygonPipeline.computeWindingOrder2D(C)===WindingOrder$1.COUNTER_CLOCKWISE&&(S=S.slice().reverse()),x=PolygonGeometryLibrary.computeWallGeometry(S,e,i,n,l),c.walls.push(new GeometryInstance({geometry:x}))}return c}function PolygonGeometry(e){var t,i=e.polygonHierarchy,r=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),n=defaultValue(e.ellipsoid,Ellipsoid.WGS84),a=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),o=defaultValue(e.stRotation,0),s=defaultValue(e.perPositionHeight,!1),l=s&&defined(e.extrudedHeight),c=defaultValue(e.height,0),u=defaultValue(e.extrudedHeight,c);l||(t=Math.max(c,u),u=Math.min(c,u),c=t),this._vertexFormat=VertexFormat.clone(r),this._ellipsoid=Ellipsoid.clone(n),this._granularity=a,this._stRotation=o,this._height=c,this._extrudedHeight=u,this._closeTop=defaultValue(e.closeTop,!0),this._closeBottom=defaultValue(e.closeBottom,!0),this._polygonHierarchy=i,this._perPositionHeight=s,this._perPositionHeightExtrude=l,this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=defaultValue(e.arcType,ArcType$1.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=PolygonGeometryLibrary.computeHierarchyPackedLength(i)+Ellipsoid.packedLength+VertexFormat.packedLength+12}PolygonGeometry.fromPositions=function(e){return new PolygonGeometry({polygonHierarchy:{positions:(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType})},PolygonGeometry.pack=function(e,t,i){return i=defaultValue(i,0),i=PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i),Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._stRotation,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._closeTop?1:0,t[i++]=e._closeBottom?1:0,t[i++]=e._shadowVolume?1:0,t[i++]=defaultValue(e._offsetAttribute,-1),t[i++]=e._arcType,t[i]=e.packedLength,t};var scratchEllipsoid$5=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$8=new VertexFormat,dummyOptions={polygonHierarchy:{}};function textureCoordinateRotationPoints$1(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];var i=e._ellipsoid,r=e._polygonHierarchy.positions;e=e.rectangle;return Geometry._textureCoordinateRotationPoints(r,t,i,e)}function PolygonHierarchy(e,t){this.positions=defined(e)?e:[],this.holes=defined(t)?t:[]}PolygonGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$5);t+=Ellipsoid.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$8);t+=VertexFormat.packedLength;var o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=1===e[t++],d=1===e[t++],h=1===e[t++],p=1===e[t++],f=1===e[t++],m=e[t++],g=e[t++];t=e[t];return defined(i)||(i=new PolygonGeometry(dummyOptions)),i._polygonHierarchy=r,i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._height=o,i._extrudedHeight=s,i._granularity=l,i._stRotation=c,i._perPositionHeightExtrude=u,i._perPositionHeight=d,i._closeTop=h,i._closeBottom=p,i._shadowVolume=f,i._offsetAttribute=-1===m?void 0:m,i._arcType=g,i.packedLength=t,i},PolygonGeometry.computeRectangle=function(e,t){var i=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),r=defaultValue(e.arcType,ArcType$1.GEODESIC),n=e.polygonHierarchy;e=defaultValue(e.ellipsoid,Ellipsoid.WGS84);return computeRectangle$2(n.positions,e,r,i,t)},PolygonGeometry.createGeometry=function(e){var t=e._vertexFormat,i=e._ellipsoid,r=e._granularity,n=e._stRotation,a=e._polygonHierarchy,o=e._perPositionHeight,s=e._closeTop,l=e._closeBottom,c=e._arcType;if(!((f=a.positions).length<3)){var u=EllipsoidTangentPlane.fromPoints(f,i),d=(a=PolygonGeometryLibrary.polygonsFromHierarchy(a,u.projectPointsOntoPlane.bind(u),!o,i)).hierarchy,h=a.polygons;if(0!==d.length){f=d[0].outerRing;var p,f=PolygonGeometryLibrary.computeBoundingRectangle(u.plane.normal,u.projectPointOntoPlane.bind(u),f,n,scratchBoundingRectangle),m=[],g=e._height,y=e._extrudedHeight,_={perPositionHeight:o,vertexFormat:t,geometry:void 0,tangentPlane:u,boundingRectangle:f,ellipsoid:i,stRotation:n,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:c};if(e._perPositionHeightExtrude||!CesiumMath.equalsEpsilon(g,y,0,CesiumMath.EPSILON2))for(_.extrude=!0,_.top=s,_.bottom=l,_.shadowVolume=e._shadowVolume,_.offsetAttribute=e._offsetAttribute,p=0;p<h.length;p++){var v,C=createGeometryFromPositionsExtruded(i,h[p],r,d[p],o,s,l,t,c);s&&l?(v=C.topAndBottom,_.geometry=PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(v.geometry,g,y,i,o)):s?((v=C.topAndBottom).geometry.attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(v.geometry.attributes.position.values,g,i,!o),_.geometry=v.geometry):l&&((v=C.topAndBottom).geometry.attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(v.geometry.attributes.position.values,y,i,!0),_.geometry=v.geometry),(s||l)&&(_.wall=!1,v.geometry=computeAttributes(_),m.push(v));var x=C.walls;_.wall=!0;for(var b=0;b<x.length;b++){var S=x[b];_.geometry=PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(S.geometry,g,y,i,o),S.geometry=computeAttributes(_),m.push(S)}}else for(p=0;p<h.length;p++){var T,E=new GeometryInstance({geometry:PolygonGeometryLibrary.createGeometryFromPositions(i,h[p],r,o,t,c)});E.geometry.attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(E.geometry.attributes.position.values,g,i,!o),_.geometry=E.geometry,E.geometry=computeAttributes(_),defined(e._offsetAttribute)&&(T=E.geometry.attributes.position.values.length,arrayFill(T=new Uint8Array(T/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),E.geometry.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})),m.push(E)}return(u=GeometryPipeline.combineInstances(m)[0]).attributes.position.values=new Float64Array(u.attributes.position.values),u.indices=IndexDatatype$1.createTypedArray(u.attributes.position.values.length/3,u.indices),f=u.attributes,n=BoundingSphere.fromVertices(f.position.values),t.position||delete f.position,new Geometry({attributes:f,indices:u.indices,primitiveType:u.primitiveType,boundingSphere:n,offsetAttribute:e._offsetAttribute})}}},PolygonGeometry.createShadowVolume=function(e,t,i){var r=e._granularity,n=e._ellipsoid;t=t(r,n),i=i(r,n);return new PolygonGeometry({polygonHierarchy:e._polygonHierarchy,ellipsoid:n,stRotation:e._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:t,height:i,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(PolygonGeometry.prototype,{rectangle:{get:function(){var e;return defined(this._rectangle)||(e=this._polygonHierarchy.positions,this._rectangle=computeRectangle$2(e,this._ellipsoid,this._arcType,this._granularity)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=textureCoordinateRotationPoints$1(this)),this._textureCoordinateRotationPoints}}});var createGeometryFromPositionsPositions=[],createGeometryFromPositionsSubdivided=[];function createGeometryFromPositions$1(e,t,i,r,n){var a,o=EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,createGeometryFromPositionsPositions);PolygonPipeline.computeWindingOrder2D(o)===WindingOrder$1.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var s=t.length,l=0;if(r)for(a=new Float64Array(2*s*3),g=0;g<s;g++){var c=t[g],u=t[(g+1)%s];a[l++]=c.x,a[l++]=c.y,a[l++]=c.z,a[l++]=u.x,a[l++]=u.y,a[l++]=u.z}else{var d,h=0;if(n===ArcType$1.GEODESIC)for(g=0;g<s;g++)h+=PolygonGeometryLibrary.subdivideLineCount(t[g],t[(g+1)%s],i);else if(n===ArcType$1.RHUMB)for(g=0;g<s;g++)h+=PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[g],t[(g+1)%s],i);for(a=new Float64Array(3*h),g=0;g<s;g++){n===ArcType$1.GEODESIC?d=PolygonGeometryLibrary.subdivideLine(t[g],t[(g+1)%s],i,createGeometryFromPositionsSubdivided):n===ArcType$1.RHUMB&&(d=PolygonGeometryLibrary.subdivideRhumbLine(e,t[g],t[(g+1)%s],i,createGeometryFromPositionsSubdivided));for(var p=d.length,f=0;f<p;++f)a[l++]=d[f]}}r=2*(s=a.length/3);for(var m=IndexDatatype$1.createTypedArray(s,r),g=(l=0,0);g<s-1;g++)m[l++]=g,m[l++]=g+1;return m[l++]=s-1,m[l++]=0,new GeometryInstance({geometry:new Geometry({attributes:new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:a})}),indices:m,primitiveType:PrimitiveType$1.LINES})})}function createGeometryFromPositionsExtruded$1(e,t,i,r,n){var a,o=EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,createGeometryFromPositionsPositions);PolygonPipeline.computeWindingOrder2D(o)===WindingOrder$1.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var s=t.length,l=new Array(s),c=0;if(r)for(a=new Float64Array(2*s*3*2),_=0;_<s;++_){l[_]=c/3;var u=t[_],d=t[(_+1)%s];a[c++]=u.x,a[c++]=u.y,a[c++]=u.z,a[c++]=d.x,a[c++]=d.y,a[c++]=d.z}else{var h,p=0;if(n===ArcType$1.GEODESIC)for(_=0;_<s;_++)p+=PolygonGeometryLibrary.subdivideLineCount(t[_],t[(_+1)%s],i);else if(n===ArcType$1.RHUMB)for(_=0;_<s;_++)p+=PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[_],t[(_+1)%s],i);for(a=new Float64Array(3*p*2),_=0;_<s;++_){l[_]=c/3,n===ArcType$1.GEODESIC?h=PolygonGeometryLibrary.subdivideLine(t[_],t[(_+1)%s],i,createGeometryFromPositionsSubdivided):n===ArcType$1.RHUMB&&(h=PolygonGeometryLibrary.subdivideRhumbLine(e,t[_],t[(_+1)%s],i,createGeometryFromPositionsSubdivided));for(var f=h.length,m=0;m<f;++m)a[c++]=h[m]}}s=a.length/6;for(var g=l.length,y=(r=2*(2*s+g),IndexDatatype$1.createTypedArray(s+g,r)),_=(c=0,0);_<s;++_)y[c++]=_,y[c++]=(_+1)%s,y[c++]=_+s,y[c++]=(_+1)%s+s;for(_=0;_<g;_++){var v=l[_];y[c++]=v,y[c++]=v+s}return new GeometryInstance({geometry:new Geometry({attributes:new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:a})}),indices:y,primitiveType:PrimitiveType$1.LINES})})}function PolygonOutlineGeometry(e){var t,i=e.polygonHierarchy,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),a=defaultValue(e.perPositionHeight,!1),o=a&&defined(e.extrudedHeight),s=defaultValue(e.arcType,ArcType$1.GEODESIC),l=defaultValue(e.height,0),c=defaultValue(e.extrudedHeight,l);o||(t=Math.max(l,c),c=Math.min(l,c),l=t),this._ellipsoid=Ellipsoid.clone(r),this._granularity=n,this._height=l,this._extrudedHeight=c,this._arcType=s,this._polygonHierarchy=i,this._perPositionHeight=a,this._perPositionHeightExtrude=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=PolygonGeometryLibrary.computeHierarchyPackedLength(i)+Ellipsoid.packedLength+8}PolygonOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),i=PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i),Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=defaultValue(e._offsetAttribute,-1),t[i]=e.packedLength,t};var scratchEllipsoid$6=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),dummyOptions$1={polygonHierarchy:{}};PolygonOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$6);t+=Ellipsoid.packedLength;var a=e[t++],o=e[t++],s=e[t++],l=1===e[t++],c=1===e[t++],u=e[t++],d=e[t++];t=e[t];return defined(i)||(i=new PolygonOutlineGeometry(dummyOptions$1)),i._polygonHierarchy=r,i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._height=a,i._extrudedHeight=o,i._granularity=s,i._perPositionHeight=c,i._perPositionHeightExtrude=l,i._arcType=u,i._offsetAttribute=-1===d?void 0:d,i.packedLength=t,i},PolygonOutlineGeometry.fromPositions=function(e){return new PolygonOutlineGeometry({polygonHierarchy:{positions:(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},PolygonOutlineGeometry.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,r=e._polygonHierarchy,n=e._perPositionHeight,a=e._arcType,o=PolygonGeometryLibrary.polygonOutlinesFromHierarchy(r,!n,t);if(0!==o.length){var s,l,c,u,d,h=[],p=CesiumMath.chordLength(i,t.maximumRadius),f=e._height,m=e._extrudedHeight;if(e._perPositionHeightExtrude||!CesiumMath.equalsEpsilon(f,m,0,CesiumMath.EPSILON2))for(s=0;s<o.length;s++)(u=createGeometryFromPositionsExtruded$1(t,o[s],p,n,a)).geometry=PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(u.geometry,f,m,t,n),defined(e._offsetAttribute)&&(l=u.geometry.attributes.position.values.length/3,c=new Uint8Array(l),c=e._offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(c,1,0,l/2):arrayFill(c,e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),u.geometry.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})),h.push(u);else for(s=0;s<o.length;s++)(u=createGeometryFromPositions$1(t,o[s],p,n,a)).geometry.attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(u.geometry.attributes.position.values,f,t,!n),defined(e._offsetAttribute)&&(d=u.geometry.attributes.position.values.length,arrayFill(d=new Uint8Array(d/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),u.geometry.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})),h.push(u);return r=GeometryPipeline.combineInstances(h)[0],i=BoundingSphere.fromVertices(r.attributes.position.values),new Geometry({attributes:r.attributes,indices:r.indices,primitiveType:r.primitiveType,boundingSphere:i,offsetAttribute:e._offsetAttribute})}};var scratchInterpolateColorsArray=[];function interpolateColors(e,t,i,r,n){var a=scratchInterpolateColorsArray;a.length=n;var o=i.red,s=i.green,l=i.blue,c=i.alpha,u=r.red,d=r.green,h=r.blue,p=r.alpha;if(Color.equals(i,r)){for(_=0;_<n;_++)a[_]=Color.clone(i);return a}for(var f=(u-o)/n,m=(d-s)/n,g=(h-l)/n,y=(p-c)/n,_=0;_<n;_++)a[_]=new Color(o+_*f,s+_*m,l+_*g,c+_*y);return a}function PolylineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.colors,r=defaultValue(e.width,1),n=defaultValue(e.colorsPerVertex,!1);this._positions=t,this._colors=i,this._width=r,this._colorsPerVertex=n,this._vertexFormat=VertexFormat.clone(defaultValue(e.vertexFormat,VertexFormat.DEFAULT)),this._arcType=defaultValue(e.arcType,ArcType$1.GEODESIC),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._workerName="createPolylineGeometry",t=1+t.length*Cartesian3.packedLength,t+=defined(i)?1+i.length*Color.packedLength:1,this.packedLength=t+Ellipsoid.packedLength+VertexFormat.packedLength+4}PolylineGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._colors;a=defined(o)?o.length:0;for(t[i++]=a,r=0;r<a;++r,i+=Color.packedLength)Color.pack(o[r],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._width,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t};var scratchEllipsoid$7=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$9=new VertexFormat,scratchOptions$f={positions:void 0,colors:void 0,ellipsoid:scratchEllipsoid$7,vertexFormat:scratchVertexFormat$9,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};PolylineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);var o=0<(r=e[t++])?new Array(r):void 0;for(a=0;a<r;++a,t+=Color.packedLength)o[a]=Color.unpack(e,t);var s=Ellipsoid.unpack(e,t,scratchEllipsoid$7);t+=Ellipsoid.packedLength;var l=VertexFormat.unpack(e,t,scratchVertexFormat$9);t+=VertexFormat.packedLength;var c=e[t++],u=1===e[t++],d=e[t++],h=e[t];return defined(i)?(i._positions=n,i._colors=o,i._ellipsoid=Ellipsoid.clone(s,i._ellipsoid),i._vertexFormat=VertexFormat.clone(l,i._vertexFormat),i._width=c,i._colorsPerVertex=u,i._arcType=d,i._granularity=h,i):(scratchOptions$f.positions=n,scratchOptions$f.colors=o,scratchOptions$f.width=c,scratchOptions$f.colorsPerVertex=u,scratchOptions$f.arcType=d,scratchOptions$f.granularity=h,new PolylineGeometry(scratchOptions$f))};var scratchCartesian3$8=new Cartesian3,scratchPosition$3=new Cartesian3,scratchPrevPosition=new Cartesian3,scratchNextPosition=new Cartesian3;PolylineGeometry.createGeometry=function(e){var t=e._width,i=e._vertexFormat,r=e._colors,n=e._colorsPerVertex,a=e._arcType,o=e._granularity,s=e._ellipsoid,l=arrayRemoveDuplicates(e._positions,Cartesian3.equalsEpsilon),c=l.length;if(!(c<2||t<=0)){if(a===ArcType$1.GEODESIC||a===ArcType$1.RHUMB){var u,d=a===ArcType$1.GEODESIC?(u=CesiumMath.chordLength(o,s.maximumRadius),PolylinePipeline.numberOfPoints):(u=o,PolylinePipeline.numberOfPointsRhumbLine),h=PolylinePipeline.extractHeights(l,s);if(defined(r)){for(var p=1,f=0;f<c-1;++f)p+=d(l[f],l[f+1],u);var m=new Array(p),g=0;for(f=0;f<c-1;++f){var y=l[f],_=l[f+1],v=r[f],C=d(y,_,u);if(n&&f<p)for(var x=interpolateColors(y,_,v,r[f+1],C),b=x.length,S=0;S<b;++S)m[g++]=x[S];else for(S=0;S<C;++S)m[g++]=Color.clone(v)}m[g]=Color.clone(r[r.length-1]),r=m,scratchInterpolateColorsArray.length=0}l=a===ArcType$1.GEODESIC?PolylinePipeline.generateCartesianArc({positions:l,minDistance:u,ellipsoid:s,height:h}):PolylinePipeline.generateCartesianRhumbArc({positions:l,granularity:u,ellipsoid:s,height:h})}s=4*(c=l.length)-4;var T,E,w,A=new Float64Array(3*s),P=new Float64Array(3*s),D=new Float64Array(3*s),M=new Float32Array(2*s),I=i.st?new Float32Array(2*s):void 0,R=defined(r)?new Uint8Array(4*s):void 0,O=0,L=0,N=0,F=0;for(S=0;S<c;++S){0===S?(T=scratchCartesian3$8,Cartesian3.subtract(l[0],l[1],T),Cartesian3.add(l[0],T,T)):T=l[S-1],Cartesian3.clone(T,scratchPrevPosition),Cartesian3.clone(l[S],scratchPosition$3),S===c-1?(T=scratchCartesian3$8,Cartesian3.subtract(l[c-1],l[c-2],T),Cartesian3.add(l[c-1],T,T)):T=l[S+1],Cartesian3.clone(T,scratchNextPosition),defined(R)&&(E=0===S||n?r[S]:r[S-1],S!==c-1&&(w=r[S]));for(var B=S===c-1?2:4,V=0===S?2:0;V<B;++V){Cartesian3.pack(scratchPosition$3,A,O),Cartesian3.pack(scratchPrevPosition,P,O),Cartesian3.pack(scratchNextPosition,D,O),O+=3;var k=V-2<0?-1:1;M[L++]=V%2*2-1,M[L++]=k*t,i.st&&(I[N++]=S/(c-1),I[N++]=Math.max(M[L-2],0)),defined(R)&&(k=V<2?E:w,R[F++]=Color.floatToByte(k.red),R[F++]=Color.floatToByte(k.green),R[F++]=Color.floatToByte(k.blue),R[F++]=Color.floatToByte(k.alpha))}}(h=new GeometryAttributes).position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:A}),h.prevPosition=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:P}),h.nextPosition=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:D}),h.expandAndWidth=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:M}),i.st&&(h.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:I})),defined(R)&&(h.color=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:4,values:R,normalize:!0}));var z=IndexDatatype$1.createTypedArray(s,6*c-6),G=0,U=0,$=c-1;for(S=0;S<$;++S)z[U++]=G,z[U++]=G+2,z[U++]=G+1,z[U++]=G+1,z[U++]=G+2,z[U++]=G+3,G+=4;return new Geometry({attributes:h,indices:z,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:BoundingSphere.fromPoints(l),geometryType:GeometryType$1.POLYLINES})}};var warnings={};function oneTimeWarning(e,t){defined(warnings[e])||(warnings[e]=!0,console.warn(defaultValue(t,e)))}function computeAttributes$1(e,t,i,r){var n=new GeometryAttributes;r.position&&(n.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:e}));var a,o,s,l,c,u=t.length,d=e.length/3,h=(d-2*u)/(2*u),p=PolygonPipeline.triangulate(t),f=(h-1)*u*6+2*p.length,m=IndexDatatype$1.createTypedArray(d,f),g=2*u,y=0;for(E=0;E<h-1;E++){for(a=0;a<u-1;a++)c=(o=2*a+E*u*2)+g,l=(s=o+1)+g,m[y++]=s,m[y++]=o,m[y++]=l,m[y++]=l,m[y++]=o,m[y++]=c;l=(s=1+(o=2*u-2+E*u*2))+g,c=o+g,m[y++]=s,m[y++]=o,m[y++]=l,m[y++]=l,m[y++]=o,m[y++]=c}if(r.st||r.tangent||r.bitangent){for(var _,v,C=new Float32Array(2*d),x=1/(h-1),b=1/i.height,S=i.height/2,T=0,E=0;E<h;E++){for(_=E*x,v=b*(t[0].y+S),C[T++]=_,C[T++]=v,a=1;a<u;a++)v=b*(t[a].y+S),C[T++]=_,C[T++]=v,C[T++]=_,C[T++]=v;v=b*(t[0].y+S),C[T++]=_,C[T++]=v}for(a=0;a<u;a++)_=0,v=b*(t[a].y+S),C[T++]=_,C[T++]=v;for(a=0;a<u;a++)_=(h-1)*x,v=b*(t[a].y+S),C[T++]=_,C[T++]=v;n.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:new Float32Array(C)})}var w=d-2*u;for(E=0;E<p.length;E+=3){var A=p[E]+w,P=p[E+1]+w,D=p[E+2]+w;m[y++]=A,m[y++]=P,m[y++]=D,m[y++]=D+u,m[y++]=P+u,m[y++]=A+u}var M=new Geometry({attributes:n,indices:m,boundingSphere:BoundingSphere.fromVertices(e),primitiveType:PrimitiveType$1.TRIANGLES});if(r.normal&&(M=GeometryPipeline.computeNormal(M)),r.tangent||r.bitangent){try{M=GeometryPipeline.computeTangentAndBitangent(M)}catch(e){oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}r.tangent||(M.attributes.tangent=void 0),r.bitangent||(M.attributes.bitangent=void 0),r.st||(M.attributes.st=void 0)}return M}function PolylineVolumeGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;this._positions=t,this._shape=i,this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._cornerType=defaultValue(e.cornerType,CornerType$1.ROUNDED),this._vertexFormat=VertexFormat.clone(defaultValue(e.vertexFormat,VertexFormat.DEFAULT)),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",t=1+t.length*Cartesian3.packedLength,t+=1+i.length*Cartesian2.packedLength,this.packedLength=t+Ellipsoid.packedLength+VertexFormat.packedLength+2}oneTimeWarning.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",oneTimeWarning.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined.  zIndex will be ignored",oneTimeWarning.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height.  heightReference will be ignored",oneTimeWarning.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight.  extrudedHeightReference will be ignored",PolylineVolumeGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._shape;a=o.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian2.packedLength)Cartesian2.pack(o[r],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var scratchEllipsoid$8=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$a=new VertexFormat,scratchOptions$g={polylinePositions:void 0,shapePositions:void 0,ellipsoid:scratchEllipsoid$8,vertexFormat:scratchVertexFormat$a,cornerType:void 0,granularity:void 0};PolylineVolumeGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);r=e[t++];var o=new Array(r);for(a=0;a<r;++a,t+=Cartesian2.packedLength)o[a]=Cartesian2.unpack(e,t);var s=Ellipsoid.unpack(e,t,scratchEllipsoid$8);t+=Ellipsoid.packedLength;var l=VertexFormat.unpack(e,t,scratchVertexFormat$a);t+=VertexFormat.packedLength;var c=e[t++],u=e[t];return defined(i)?(i._positions=n,i._shape=o,i._ellipsoid=Ellipsoid.clone(s,i._ellipsoid),i._vertexFormat=VertexFormat.clone(l,i._vertexFormat),i._cornerType=c,i._granularity=u,i):(scratchOptions$g.polylinePositions=n,scratchOptions$g.shapePositions=o,scratchOptions$g.cornerType=c,scratchOptions$g.granularity=u,new PolylineVolumeGeometry(scratchOptions$g))};var brScratch=new BoundingRectangle;function computeAttributes$2(e,t){var i=new GeometryAttributes;i.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:e});var r=t.length,n=(t=i.position.values.length/3,e.length/3/r),a=IndexDatatype$1.createTypedArray(t,2*r*(1+n)),o=0,s=0,l=s*r;for(d=0;d<r-1;d++)a[o++]=d+l,a[o++]=d+l+1;for(a[o++]=r-1+l,a[o++]=l,l=(s=n-1)*r,d=0;d<r-1;d++)a[o++]=d+l,a[o++]=d+l+1;for(a[o++]=r-1+l,a[o++]=l,s=0;s<n-1;s++)for(var c=r*s,u=c+r,d=0;d<r;d++)a[o++]=d+c,a[o++]=d+u;return new Geometry({attributes:i,indices:IndexDatatype$1.createTypedArray(t,a),boundingSphere:BoundingSphere.fromVertices(e),primitiveType:PrimitiveType$1.LINES})}function PolylineVolumeOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;this._positions=t,this._shape=i,this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._cornerType=defaultValue(e.cornerType,CornerType$1.ROUNDED),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry",t=1+t.length*Cartesian3.packedLength,t+=1+i.length*Cartesian2.packedLength,this.packedLength=t+Ellipsoid.packedLength+2}PolylineVolumeGeometry.createGeometry=function(e){var t=arrayRemoveDuplicates(e._positions,Cartesian3.equalsEpsilon),i=e._shape;i=PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(i);if(!(t.length<2||i.length<3)){PolygonPipeline.computeWindingOrder2D(i)===WindingOrder$1.CLOCKWISE&&i.reverse();var r=BoundingRectangle.fromPoints(i,brScratch);return computeAttributes$1(PolylineVolumeGeometryLibrary.computePositions(t,i,r,e,!0),i,r,e._vertexFormat)}},PolylineVolumeOutlineGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._shape;a=o.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian2.packedLength)Cartesian2.pack(o[r],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var scratchEllipsoid$9=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$h={polylinePositions:void 0,shapePositions:void 0,ellipsoid:scratchEllipsoid$9,height:void 0,cornerType:void 0,granularity:void 0};PolylineVolumeOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);r=e[t++];var o=new Array(r);for(a=0;a<r;++a,t+=Cartesian2.packedLength)o[a]=Cartesian2.unpack(e,t);var s=Ellipsoid.unpack(e,t,scratchEllipsoid$9);t+=Ellipsoid.packedLength;var l=e[t++],c=e[t];return defined(i)?(i._positions=n,i._shape=o,i._ellipsoid=Ellipsoid.clone(s,i._ellipsoid),i._cornerType=l,i._granularity=c,i):(scratchOptions$h.polylinePositions=n,scratchOptions$h.shapePositions=o,scratchOptions$h.cornerType=l,scratchOptions$h.granularity=c,new PolylineVolumeOutlineGeometry(scratchOptions$h))};var brScratch$1=new BoundingRectangle;function Proxy(){DeveloperError.throwInstantiationError()}function createEvaluateFunction$1(e){var t=e.points,i=e.times;return function(r,n){defined(n)||(n=new Quaternion);var a=e._lastTimeIndex=e.findTimeInterval(r,e._lastTimeIndex),o=(r-i[a])/(i[a+1]-i[a]);r=t[a],a=t[a+1];return Quaternion.fastSlerp(r,a,o,n)}}function QuaternionSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).points;e=e.times;this._times=e,this._points=t,this._evaluateFunction=createEvaluateFunction$1(this),this._lastTimeIndex=0}function quickselect(e,t,i,r,n){quickselectStep(e,t,i||0,r||e.length-1,n||defaultCompare)}function quickselectStep(e,t,i,r,n){for(;i<r;){var a,o,s,l;600<r-i&&(a=r-i+1,o=t-i+1,l=Math.log(a),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(a-s)/a)*(o-a/2<0?-1:1),quickselectStep(e,t,Math.max(i,Math.floor(t-o*s/a+l)),Math.min(r,Math.floor(t+(a-o)*s/a+l)),n));var c=e[t],u=i,d=r;for(swap$1(e,i,t),0<n(e[r],c)&&swap$1(e,i,r);u<d;){for(swap$1(e,u,d),u++,d--;n(e[u],c)<0;)u++;for(;0<n(e[d],c);)d--}0===n(e[i],c)?swap$1(e,i,d):swap$1(e,++d,r),d<=t&&(i=d+1),t<=d&&(r=d-1)}}function swap$1(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function defaultCompare(e,t){return e<t?-1:t<e?1:0}function RBush(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function findItem(e,t,i){if(!i)return t.indexOf(e);for(var r=0;r<t.length;r++)if(i(e,t[r]))return r;return-1}function calcBBox(e,t){distBBox(e,0,e.children.length,t,e)}function distBBox(e,t,i,r,n){(n=n||createNode(null)).minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var a=t;a<i;a++){var o=e.children[a];extend(n,e.leaf?r(o):o)}return n}function extend(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function compareNodeMinX(e,t){return e.minX-t.minX}function compareNodeMinY(e,t){return e.minY-t.minY}function bboxArea(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function bboxMargin(e){return e.maxX-e.minX+(e.maxY-e.minY)}function enlargedArea(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function intersectionArea(e,t){var i=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX);t=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,t-r)}function contains(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function intersects$1(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function createNode(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(e,t,i,r,n){for(var a,o=[t,i];o.length;)(i=o.pop())-(t=o.pop())<=r||(quickselect(e,a=t+Math.ceil((i-t)/r/2)*r,t,i,n),o.push(t,a,a,i))}function RectangleCollisionChecker(){this._tree=new RBush}function RectangleWithId(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function idCompare(e,t){return e.id===t.id}PolylineVolumeOutlineGeometry.createGeometry=function(e){var t=arrayRemoveDuplicates(e._positions,Cartesian3.equalsEpsilon),i=e._shape;i=PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(i);if(!(t.length<2||i.length<3)){PolygonPipeline.computeWindingOrder2D(i)===WindingOrder$1.CLOCKWISE&&i.reverse();var r=BoundingRectangle.fromPoints(i,brScratch$1);return computeAttributes$2(PolylineVolumeGeometryLibrary.computePositions(t,i,r,e,!1),i)}},Proxy.prototype.getURL=DeveloperError.throwInstantiationError,Object.defineProperties(QuaternionSpline.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),QuaternionSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,QuaternionSpline.prototype.wrapTime=Spline.prototype.wrapTime,QuaternionSpline.prototype.clampTime=Spline.prototype.clampTime,QuaternionSpline.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},RBush.prototype.all=function(){return this._all(this.data,[])},RBush.prototype.search=function(e){var t=this.data,i=[];if(!intersects$1(e,t))return i;for(var r=this.toBBox,n=[];t;){for(var a=0;a<t.children.length;a++){var o=t.children[a],s=t.leaf?r(o):o;intersects$1(e,s)&&(t.leaf?i.push(o):contains(e,s)?this._all(o,i):n.push(o))}t=n.pop()}return i},RBush.prototype.collides=function(e){var t=this.data;if(!intersects$1(e,t))return!1;for(var i=[];t;){for(var r=0;r<t.children.length;r++){var n=t.children[r],a=t.leaf?this.toBBox(n):n;if(intersects$1(e,a)){if(t.leaf||contains(e,a))return!0;i.push(n)}}t=i.pop()}return!1},RBush.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var i,r=this._build(e.slice(),0,e.length-1,0);return this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(i=this.data,this.data=r,r=i),this._insert(r,this.data.height-r.height-1,!0)):this.data=r,this},RBush.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},RBush.prototype.clear=function(){return this.data=createNode([]),this},RBush.prototype.remove=function(e,t){if(!e)return this;for(var i,r,n,a=this.data,o=this.toBBox(e),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],i=l.pop(),n=!0),a.leaf){var c=findItem(e,a.children,t);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}n||a.leaf||!contains(a,o)?r?(i++,a=r.children[i],n=!1):a=null:(s.push(a),l.push(i),i=0,a=(r=a).children[0])}return this},RBush.prototype.toBBox=function(e){return e},RBush.prototype.compareMinX=function(e,t){return e.minX-t.minX},RBush.prototype.compareMinY=function(e,t){return e.minY-t.minY},RBush.prototype.toJSON=function(){return this.data},RBush.prototype.fromJSON=function(e){return this.data=e,this},RBush.prototype._all=function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},RBush.prototype._build=function(e,t,i,r){var n,a=i-t+1,o=this._maxEntries;if(a<=o)return calcBBox(n=createNode(e.slice(t,i+1)),this.toBBox),n;r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(n=createNode([])).leaf=!1,n.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));multiSelect(e,t,i,l,this.compareMinX);for(var c=t;c<=i;c+=l){var u=Math.min(c+l-1,i);multiSelect(e,c,u,s,this.compareMinY);for(var d=c;d<=u;d+=s){var h=Math.min(d+s-1,u);n.children.push(this._build(e,d,h,r-1))}}return calcBBox(n,this.toBBox),n},RBush.prototype._chooseSubtree=function(e,t,i,r){for(;r.push(t),!t.leaf&&r.length-1!==i;){for(var n=1/0,a=1/0,o=void 0,s=0;s<t.children.length;s++){var l=t.children[s],c=bboxArea(l),u=enlargedArea(e,l)-c;u<a?(a=u,n=c<n?c:n,o=l):u===a&&c<n&&(n=c,o=l)}t=o||t.children[0]}return t},RBush.prototype._insert=function(e,t,i){var r=i?e:this.toBBox(e),n=[];for((i=this._chooseSubtree(r,this.data,t,n)).children.push(e),extend(i,r);0<=t&&n[t].children.length>this._maxEntries;)this._split(n,t),t--;this._adjustParentBBoxes(r,n,t)},RBush.prototype._split=function(e,t){var i=e[t],r=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,r),r=this._chooseSplitIndex(i,n,r),(r=createNode(i.children.splice(r,i.children.length-r))).height=i.height,r.leaf=i.leaf,calcBBox(i,this.toBBox),calcBBox(r,this.toBBox),t?e[t-1].children.push(r):this._splitRoot(i,r)},RBush.prototype._splitRoot=function(e,t){this.data=createNode([e,t]),this.data.height=e.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)},RBush.prototype._chooseSplitIndex=function(e,t,i){for(var r,n=1/0,a=1/0,o=t;o<=i-t;o++){var s=distBBox(e,0,o,this.toBBox),l=intersectionArea(s,c=distBBox(e,o,i,this.toBBox)),c=bboxArea(s)+bboxArea(c);l<n?(n=l,r=o,a=c<a?c:a):l===n&&c<a&&(a=c,r=o)}return r||i-t},RBush.prototype._chooseSplitAxis=function(e,t,i){var r=e.leaf?this.compareMinX:compareNodeMinX,n=e.leaf?this.compareMinY:compareNodeMinY;this._allDistMargin(e,t,i,r)<this._allDistMargin(e,t,i,n)&&e.children.sort(r)},RBush.prototype._allDistMargin=function(e,t,i,r){e.children.sort(r);for(var n=this.toBBox,a=distBBox(e,0,t,n),o=distBBox(e,i-t,i,n),s=bboxMargin(a)+bboxMargin(o),l=t;l<i-t;l++){var c=e.children[l];extend(a,e.leaf?n(c):c),s+=bboxMargin(a)}for(var u=i-t-1;t<=u;u--){var d=e.children[u];extend(o,e.leaf?n(d):d),s+=bboxMargin(o)}return s},RBush.prototype._adjustParentBBoxes=function(e,t,i){for(var r=i;0<=r;r--)extend(t[r],e)},RBush.prototype._condense=function(e){for(var t=e.length-1,i=void 0;0<=t;t--)0===e[t].children.length?0<t?(i=e[t-1].children).splice(i.indexOf(e[t]),1):this.clear():calcBBox(e[t],this.toBBox)},RectangleWithId.fromRectangleAndId=function(e,t,i){return i.minX=t.west,i.minY=t.south,i.maxX=t.east,i.maxY=t.north,i.id=e,i},RectangleCollisionChecker.prototype.insert=function(e,t){t=RectangleWithId.fromRectangleAndId(e,t,new RectangleWithId),this._tree.insert(t)};var removalScratch=new RectangleWithId;RectangleCollisionChecker.prototype.remove=function(e,t){t=RectangleWithId.fromRectangleAndId(e,t,removalScratch),this._tree.remove(t,idCompare)};var collisionScratch=new RectangleWithId;RectangleCollisionChecker.prototype.collides=function(e){return e=RectangleWithId.fromRectangleAndId("",e,collisionScratch),this._tree.collides(e)};var cos$2=Math.cos,sin$2=Math.sin,sqrt=Math.sqrt,RectangleGeometryLibrary={computePosition:function(e,t,i,r,n,a,o){var s=t.radiiSquared,l=e.nwCorner,c=e.boundingRectangle,u=l.latitude-e.granYCos*r+n*e.granXSin,d=cos$2(u),h=sin$2(u),p=s.z*h,f=l.longitude+r*e.granYSin+n*e.granXCos;t=d*cos$2(f),l=d*sin$2(f),d=s.x*t,s=s.y*l,h=sqrt(d*t+s*l+p*h);a.x=d/h,a.y=s/h,a.z=p/h,i&&(defined(i=e.stNwCorner)?(u=i.latitude-e.stGranYCos*r+n*e.stGranXSin,f=i.longitude+r*e.stGranYSin+n*e.stGranXCos,o.x=(f-e.stWest)*e.lonScalar,o.y=(u-e.stSouth)*e.latScalar):(o.x=(f-c.west)*e.lonScalar,o.y=(u-c.south)*e.latScalar))}},rotationMatrixScratch=new Matrix2,nwCartesian=new Cartesian3,centerScratch$2=new Cartographic,centerCartesian=new Cartesian3,proj=new GeographicProjection;function getRotationOptions(e,t,i,r,n,a,o){var s=Math.cos(t),l=r*s,c=i*s,u=Math.sin(t),d=r*u,h=i*u;return nwCartesian=proj.project(e,nwCartesian),nwCartesian=Cartesian3.subtract(nwCartesian,centerCartesian,nwCartesian),s=Matrix2.fromRotation(t,rotationMatrixScratch),nwCartesian=Matrix2.multiplyByVector(s,nwCartesian,nwCartesian),nwCartesian=Cartesian3.add(nwCartesian,centerCartesian,nwCartesian),--a,--o,i=(r=(e=proj.unproject(nwCartesian,e)).latitude)+a*h,u=r-l*o,t=r-l*o+a*h,s=Math.max(r,i,u,t),r=Math.min(r,i,u,t),u=(i=e.longitude)+a*c,t=i+o*d,a=i+o*d+a*c,{north:s,south:r,east:Math.max(i,u,t,a),west:Math.min(i,u,t,a),granYCos:l,granYSin:d,granXCos:c,granXSin:h,nwCorner:e}}RectangleGeometryLibrary.computeOptions=function(e,t,i,r,n,a,o){var s=e.east,l=e.west,c=e.north,u=e.south,d=!1,h=!1;c===CesiumMath.PI_OVER_TWO&&(d=!0),u===-CesiumMath.PI_OVER_TWO&&(h=!0);var p,f=c-u,m=(y=s<l?CesiumMath.TWO_PI-l+s:s-l)/((p=Math.ceil(y/t)+1)-1),g=f/((_=Math.ceil(f/t)+1)-1),y=Rectangle.northwest(e,a);f=Rectangle.center(e,centerScratch$2);0===i&&0===r||(f.longitude<y.longitude&&(f.longitude+=CesiumMath.TWO_PI),centerCartesian=proj.project(f,centerCartesian));var _;h={granYCos:t=g,granYSin:0,granXCos:a=m,granXSin:0,nwCorner:y,boundingRectangle:n=Rectangle.clone(e,n),width:p,height:_,northCap:d,southCap:h};return 0!==i&&(c=(y=getRotationOptions(y,i,m,g,f,p,_)).north,u=y.south,s=y.east,l=y.west,h.granYCos=y.granYCos,h.granYSin=y.granYSin,h.granXCos=y.granXCos,h.granXSin=y.granXSin,n.north=c,n.south=u,n.east=s,n.west=l),0!==r&&(i-=r,_=getRotationOptions(o=Rectangle.northwest(n,o),i,m,g,f,p,_),h.stGranYCos=_.granYCos,h.stGranXCos=_.granXCos,h.stGranYSin=_.granYSin,h.stGranXSin=_.granXSin,h.stNwCorner=o,h.stWest=_.west,h.stSouth=_.south),h};var positionScratch$2=new Cartesian3,normalScratch$3=new Cartesian3,tangentScratch$1=new Cartesian3,bitangentScratch$1=new Cartesian3,rectangleScratch$2=new Rectangle,stScratch$1=new Cartesian2,bottomBoundingSphere$2=new BoundingSphere,topBoundingSphere$2=new BoundingSphere;function createAttributes(e,t){var i=new Geometry({attributes:new GeometryAttributes,primitiveType:PrimitiveType$1.TRIANGLES});return i.attributes.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(i.attributes.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:t.bitangents})),i}function calculateAttributes(e,t,i,r){var n=e.length,a=t.normal?new Float32Array(n):void 0,o=t.tangent?new Float32Array(n):void 0,s=t.bitangent?new Float32Array(n):void 0,l=0,c=bitangentScratch$1,u=tangentScratch$1,d=normalScratch$3;if(t.normal||t.tangent||t.bitangent)for(var h=0;h<n;h+=3){var p=Cartesian3.fromArray(e,h,positionScratch$2),f=l+1,m=l+2;d=i.geodeticSurfaceNormal(p,d);(t.tangent||t.bitangent)&&(Cartesian3.cross(Cartesian3.UNIT_Z,d,u),Matrix3.multiplyByVector(r,u,u),Cartesian3.normalize(u,u),t.bitangent&&Cartesian3.normalize(Cartesian3.cross(d,u,c),c)),t.normal&&(a[l]=d.x,a[f]=d.y,a[m]=d.z),t.tangent&&(o[l]=u.x,o[f]=u.y,o[m]=u.z),t.bitangent&&(s[l]=c.x,s[f]=c.y,s[m]=c.z),l+=3}return createAttributes(t,{positions:e,normals:a,tangents:o,bitangents:s})}var v1Scratch=new Cartesian3,v2Scratch=new Cartesian3;function calculateAttributesWall(e,t,i){var r=e.length,n=t.normal?new Float32Array(r):void 0,a=t.tangent?new Float32Array(r):void 0,o=t.bitangent?new Float32Array(r):void 0,s=0,l=0,c=0,u=!0,d=bitangentScratch$1,h=tangentScratch$1,p=normalScratch$3;if(t.normal||t.tangent||t.bitangent)for(var f=0;f<r;f+=6){var m,g=Cartesian3.fromArray(e,f,positionScratch$2),y=Cartesian3.fromArray(e,(f+6)%r,v1Scratch);u&&(m=Cartesian3.fromArray(e,(f+3)%r,v2Scratch),Cartesian3.subtract(y,g,y),Cartesian3.subtract(m,g,m),p=Cartesian3.normalize(Cartesian3.cross(m,y,p),p),u=!1),Cartesian3.equalsEpsilon(y,g,CesiumMath.EPSILON10)&&(u=!0),(t.tangent||t.bitangent)&&(d=i.geodeticSurfaceNormal(g,d),t.tangent&&(h=Cartesian3.normalize(Cartesian3.cross(d,p,h),h))),t.normal&&(n[s++]=p.x,n[s++]=p.y,n[s++]=p.z,n[s++]=p.x,n[s++]=p.y,n[s++]=p.z),t.tangent&&(a[l++]=h.x,a[l++]=h.y,a[l++]=h.z,a[l++]=h.x,a[l++]=h.y,a[l++]=h.z),t.bitangent&&(o[c++]=d.x,o[c++]=d.y,o[c++]=d.z,o[c++]=d.x,o[c++]=d.y,o[c++]=d.z)}return createAttributes(t,{positions:e,normals:n,tangents:a,bitangents:o})}function constructRectangle(e,t){var i=e._vertexFormat,r=e._ellipsoid,n=t.height,a=t.width,o=t.northCap,s=t.southCap,l=0,c=n,u=n;e=0;o&&(--u,e+=l=1),s&&(--c,--u,e+=1),e+=a*u;for(var d=i.position?new Float64Array(3*e):void 0,h=i.st?new Float32Array(2*e):void 0,p=0,f=0,m=positionScratch$2,g=stScratch$1,y=Number.MAX_VALUE,_=Number.MAX_VALUE,v=-Number.MAX_VALUE,C=-Number.MAX_VALUE,x=l;x<c;++x)for(var b=0;b<a;++b)RectangleGeometryLibrary.computePosition(t,r,i.st,x,b,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(h[f++]=g.x,h[f++]=g.y,y=Math.min(y,g.x),_=Math.min(_,g.y),v=Math.max(v,g.x),C=Math.max(C,g.y));if(o&&(RectangleGeometryLibrary.computePosition(t,r,i.st,0,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(h[f++]=g.x,h[f++]=g.y,y=g.x,_=g.y,v=g.x,C=g.y)),s&&(RectangleGeometryLibrary.computePosition(t,r,i.st,n-1,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p]=m.z,i.st&&(h[f++]=g.x,h[f]=g.y,y=Math.min(y,g.x),_=Math.min(_,g.y),v=Math.max(v,g.x),C=Math.max(C,g.y))),i.st&&(y<0||_<0||1<v||1<C))for(var S=0;S<h.length;S+=2)h[S]=(h[S]-y)/(v-y),h[S+1]=(h[S+1]-_)/(C-_);l=calculateAttributes(d,i,r,t.tangentRotationMatrix),n=6*(a-1)*(u-1),o&&(n+=3*(a-1)),s&&(n+=3*(a-1));for(var T=IndexDatatype$1.createTypedArray(e,n),E=0,w=0,A=0;A<u-1;++A){for(var P=0;P<a-1;++P){var D=E+a,M=D+1,I=E+1;T[w++]=E,T[w++]=D,T[w++]=I,T[w++]=I,T[w++]=D,T[w++]=M,++E}++E}if(o||s){var R,O,L=e-1,N=e-1;if(o&&s&&(L=e-2),E=0,o)for(A=0;A<a-1;A++)O=(R=E)+1,T[w++]=L,T[w++]=R,T[w++]=O,++E;if(s)for(E=(u-1)*a,A=0;A<a-1;A++)O=(R=E)+1,T[w++]=R,T[w++]=N,T[w++]=O,++E}return l.indices=T,i.st&&(l.attributes.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:h})),l}function addWallPositions$1(e,t,i,r,n){return e[t++]=r[i],e[t++]=r[i+1],e[t++]=r[i+2],e[t++]=n[i],e[t++]=n[i+1],e[t]=n[i+2],e}function addWallTextureCoordinates(e,t,i,r){return e[t++]=r[i],e[t++]=r[i+1],e[t++]=r[i],e[t]=r[i+1],e}var scratchVertexFormat$b=new VertexFormat;function constructExtrudedRectangle(e,t){var i=e._shadowVolume,r=e._offsetAttribute,n=e._vertexFormat,a=e._extrudedHeight,o=e._surfaceHeight,s=e._ellipsoid,l=t.height,c=t.width;i&&((y=VertexFormat.clone(n,scratchVertexFormat$b)).normal=!0,e._vertexFormat=y);var u=constructRectangle(e,t);i&&(e._vertexFormat=n);var d=PolygonPipeline.scaleToGeodeticHeight(u.attributes.position.values,o,s,!1),h=2*(U=(d=new Float64Array(d)).length),p=new Float64Array(h);p.set(d);var f=PolygonPipeline.scaleToGeodeticHeight(u.attributes.position.values,a,s);p.set(f,U),u.attributes.position.values=p;var m,g,y=n.normal?new Float32Array(h):void 0;e=n.tangent?new Float32Array(h):void 0,o=n.bitangent?new Float32Array(h):void 0,a=n.st?new Float32Array(h/3*2):void 0;if(n.normal){for(g=u.attributes.normal.values,y.set(g),v=0;v<U;v++)g[v]=-g[v];y.set(g,U),u.attributes.normal.values=y}if(i){g=u.attributes.normal.values,n.normal||(u.attributes.normal=void 0);for(var _=new Float32Array(h),v=0;v<U;v++)g[v]=-g[v];_.set(g,U),u.attributes.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:_})}if((p=defined(r))&&(y=U/3*2,_=new Uint8Array(y),_=r===GeometryOffsetAttribute$1.TOP?arrayFill(_,1,0,y/2):arrayFill(_,r===GeometryOffsetAttribute$1.NONE?0:1),u.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})),n.tangent){var C=u.attributes.tangent.values;for(e.set(C),v=0;v<U;v++)C[v]=-C[v];e.set(C,U),u.attributes.tangent.values=e}n.bitangent&&(E=u.attributes.bitangent.values,o.set(E),o.set(E,U),u.attributes.bitangent.values=o),n.st&&(m=u.attributes.st.values,a.set(m),a.set(m,U/3*2),u.attributes.st.values=a);var x=u.indices,b=x.length,S=U/3,T=IndexDatatype$1.createTypedArray(h/3,2*b);for(T.set(x),v=0;v<b;v+=3)T[v+b]=x[v+2]+S,T[v+1+b]=x[v+1]+S,T[v+2+b]=x[v]+S;u.indices=T;e=t.northCap;var E=t.southCap;o=l,a=2,h=0,t=4,l=4;e&&(--a,--o,h+=1,t-=2,--l),E&&(--a,--o,h+=1,t-=2,--l);l=2*((h+=a*c+2*o-t)+l);var w=new Float64Array(3*l),A=i?new Float32Array(3*l):void 0,P=p?new Uint8Array(l):void 0,D=n.st?new Float32Array(2*l):void 0,M=r===GeometryOffsetAttribute$1.TOP;p&&!M&&(P=arrayFill(P,r===GeometryOffsetAttribute$1.ALL?1:0));var I=0,R=0,O=0,L=0,N=c*o;for(v=0;v<N;v+=c)w=addWallPositions$1(w,I,B=3*v,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*v,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1);if(E){var F=e?1+N:N,B=3*F;for(v=0;v<2;v++)w=addWallPositions$1(w,I,B,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*F,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1)}else for(v=N-c;v<N;v++)w=addWallPositions$1(w,I,B=3*v,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*v,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1);for(v=N-1;0<v;v-=c)w=addWallPositions$1(w,I,B=3*v,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*v,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1);if(e){var V=N;for(B=3*V,v=0;v<2;v++)w=addWallPositions$1(w,I,B,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*V,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1)}else for(v=c-1;0<=v;v--)w=addWallPositions$1(w,I,B=3*v,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*v,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1);s=calculateAttributesWall(w,n,s),n.st&&(s.attributes.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:D})),i&&(s.attributes.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:A})),p&&(s.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:P}));var k,z,G=IndexDatatype$1.createTypedArray(l,6*h),U=w.length/3,$=0;for(v=0;v<U-1;v+=2){z=((k=v)+2)%U;var H=Cartesian3.fromArray(w,3*k,v1Scratch),W=Cartesian3.fromArray(w,3*z,v2Scratch);Cartesian3.equalsEpsilon(H,W,CesiumMath.EPSILON10)||(W=(2+(H=(k+1)%U))%U,G[$++]=k,G[$++]=H,G[$++]=z,G[$++]=z,G[$++]=H,G[$++]=W)}return s.indices=G,(s=GeometryPipeline.combineInstances([new GeometryInstance({geometry:u}),new GeometryInstance({geometry:s})]))[0]}var scratchRectanglePoints=[new Cartesian3,new Cartesian3,new Cartesian3,new Cartesian3],nwScratch=new Cartographic,stNwScratch=new Cartographic;function computeRectangle$3(e,t,i,r,n){if(0===i)return Rectangle.clone(e,n);var a=RectangleGeometryLibrary.computeOptions(e,t,i,0,rectangleScratch$2,nwScratch);e=a.height,t=a.width,i=scratchRectanglePoints;return RectangleGeometryLibrary.computePosition(a,r,!1,0,0,i[0]),RectangleGeometryLibrary.computePosition(a,r,!1,0,t-1,i[1]),RectangleGeometryLibrary.computePosition(a,r,!1,e-1,0,i[2]),RectangleGeometryLibrary.computePosition(a,r,!1,e-1,t-1,i[3]),Rectangle.fromCartesianArray(i,r,n)}function RectangleGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).rectangle,i=defaultValue(e.height,0),r=defaultValue(e.extrudedHeight,i);this._rectangle=Rectangle.clone(t),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._surfaceHeight=Math.max(i,r),this._rotation=defaultValue(e.rotation,0),this._stRotation=defaultValue(e.stRotation,0),this._vertexFormat=VertexFormat.clone(defaultValue(e.vertexFormat,VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(i,r),this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}RectangleGeometry.packedLength=Rectangle.packedLength+Ellipsoid.packedLength+VertexFormat.packedLength+7,RectangleGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Rectangle.pack(e._rectangle,t,i),i+=Rectangle.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchRectangle=new Rectangle,scratchEllipsoid$a=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$i={rectangle:scratchRectangle,ellipsoid:scratchEllipsoid$a,vertexFormat:scratchVertexFormat$b,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};RectangleGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Rectangle.unpack(e,t,scratchRectangle);t+=Rectangle.packedLength;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$a);t+=Ellipsoid.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$b);t+=VertexFormat.packedLength;var o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=1===e[t++];t=e[t];return defined(i)?(i._rectangle=Rectangle.clone(r,i._rectangle),i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._granularity=o,i._surfaceHeight=s,i._rotation=l,i._stRotation=c,i._extrudedHeight=u,i._shadowVolume=d,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$i.granularity=o,scratchOptions$i.height=s,scratchOptions$i.rotation=l,scratchOptions$i.stRotation=c,scratchOptions$i.extrudedHeight=u,scratchOptions$i.shadowVolume=d,scratchOptions$i.offsetAttribute=-1===t?void 0:t,new RectangleGeometry(scratchOptions$i))},RectangleGeometry.computeRectangle=function(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).rectangle,r=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),n=defaultValue(e.ellipsoid,Ellipsoid.WGS84);return computeRectangle$3(i,r,defaultValue(e.rotation,0),n,t)};var tangentRotationMatrixScratch=new Matrix3,quaternionScratch$3=new Quaternion,centerScratch$3=new Cartographic;RectangleGeometry.createGeometry=function(e){if(!CesiumMath.equalsEpsilon(e._rectangle.north,e._rectangle.south,CesiumMath.EPSILON10)&&!CesiumMath.equalsEpsilon(e._rectangle.east,e._rectangle.west,CesiumMath.EPSILON10)){var t=e._rectangle,i=e._ellipsoid,r=e._rotation,n=e._stRotation,a=e._vertexFormat,o=RectangleGeometryLibrary.computeOptions(t,e._granularity,r,n,rectangleScratch$2,nwScratch,stNwScratch),s=tangentRotationMatrixScratch;0!==n||0!==r?(c=Rectangle.center(t,centerScratch$3),u=i.geodeticSurfaceNormalCartographic(c,v1Scratch),Quaternion.fromAxisAngle(u,-n,quaternionScratch$3),Matrix3.fromQuaternion(quaternionScratch$3,s)):Matrix3.clone(Matrix3.IDENTITY,s);var l,c=e._surfaceHeight,u=e._extrudedHeight;n=!CesiumMath.equalsEpsilon(c,u,0,CesiumMath.EPSILON2);return o.lonScalar=1/e._rectangle.width,o.latScalar=1/e._rectangle.height,o.tangentRotationMatrix=s,t=e._rectangle,c=n?(l=constructExtrudedRectangle(e,o),n=BoundingSphere.fromRectangle3D(t,i,c,topBoundingSphere$2),u=BoundingSphere.fromRectangle3D(t,i,u,bottomBoundingSphere$2),BoundingSphere.union(n,u)):((l=constructRectangle(e,o)).attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,c,i,!1),defined(e._offsetAttribute)&&(o=l.attributes.position.values.length,arrayFill(o=new Uint8Array(o/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),l.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})),BoundingSphere.fromRectangle3D(t,i,c)),a.position||delete l.attributes.position,new Geometry({attributes:l.attributes,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:c,offsetAttribute:e._offsetAttribute})}},RectangleGeometry.createShadowVolume=function(e,t,i){var r=e._granularity,n=e._ellipsoid;t=t(r,n),i=i(r,n);return new RectangleGeometry({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:n,stRotation:e._stRotation,granularity:r,extrudedHeight:i,height:t,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0})};var unrotatedTextureRectangleScratch=new Rectangle,points2DScratch$1=[new Cartesian2,new Cartesian2,new Cartesian2],rotation2DScratch$1=new Matrix2,rectangleCenterScratch$1=new Cartographic;function textureCoordinateRotationPoints$2(e){if(0===e._stRotation)return[0,0,0,1,1,0];var t=Rectangle.clone(e._rectangle,unrotatedTextureRectangleScratch),i=e._granularity,r=e._ellipsoid,n=(t=computeRectangle$3(t,i,e._rotation-e._stRotation,r,unrotatedTextureRectangleScratch),points2DScratch$1);n[0].x=t.west,n[0].y=t.south,n[1].x=t.west,n[1].y=t.north,n[2].x=t.east,n[2].y=t.south;for(var a=e.rectangle,o=Matrix2.fromRotation(e._stRotation,rotation2DScratch$1),s=Rectangle.center(a,rectangleCenterScratch$1),l=0;l<3;++l){var c=n[l];c.x-=s.longitude,c.y-=s.latitude,Matrix2.multiplyByVector(o,c,c),c.x+=s.longitude,c.y+=s.latitude,c.x=(c.x-a.west)/a.width,c.y=(c.y-a.south)/a.height}return i=n[0],r=n[1],t=n[2],e=new Array(6),Cartesian2.pack(i,e),Cartesian2.pack(r,e,2),Cartesian2.pack(t,e,4),e}Object.defineProperties(RectangleGeometry.prototype,{rectangle:{get:function(){return defined(this._rotatedRectangle)||(this._rotatedRectangle=computeRectangle$3(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=textureCoordinateRotationPoints$2(this)),this._textureCoordinateRotationPoints}}});var bottomBoundingSphere$3=new BoundingSphere,topBoundingSphere$3=new BoundingSphere,positionScratch$3=new Cartesian3,rectangleScratch$3=new Rectangle;function constructRectangle$1(e,t){var i=e._ellipsoid,r=t.height,n=t.width,a=t.northCap,o=r,s=2,l=0;e=4;a&&(--s,--o,l+=1,e-=2),(f=t.southCap)&&(--s,--o,l+=1,e-=2),l+=s*n+2*o-e;var c,u=new Float64Array(3*l),d=0,h=0,p=positionScratch$3;if(a)RectangleGeometryLibrary.computePosition(t,i,!1,h,0,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;else for(c=0;c<n;c++)RectangleGeometryLibrary.computePosition(t,i,!1,h,c,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;for(c=n-1,h=1;h<r;h++)RectangleGeometryLibrary.computePosition(t,i,!1,h,c,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;if(h=r-1,!f)for(c=n-2;0<=c;c--)RectangleGeometryLibrary.computePosition(t,i,!1,h,c,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;for(c=0,h=r-2;0<h;h--)RectangleGeometryLibrary.computePosition(t,i,!1,h,c,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;for(var f=u.length/3*2,m=IndexDatatype$1.createTypedArray(u.length/3,f),g=0,y=0;y<u.length/3-1;y++)m[g++]=y,m[g++]=y+1;return m[g++]=u.length/3-1,m[g++]=0,(f=new Geometry({attributes:new GeometryAttributes,primitiveType:PrimitiveType$1.LINES})).attributes.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:u}),f.indices=m,f}function constructExtrudedRectangle$1(e,t){var i=e._surfaceHeight,r=e._extrudedHeight,n=e._ellipsoid,a=r,o=i,s=constructRectangle$1(e,t),l=(r=t.height,i=t.width,(e=PolygonPipeline.scaleToGeodeticHeight(s.attributes.position.values,o,n,!1)).length);(o=new Float64Array(2*l)).set(e),a=PolygonPipeline.scaleToGeodeticHeight(s.attributes.position.values,a,n),o.set(a,l),s.attributes.position.values=o,n=t.northCap,a=t.southCap,t=4,n&&--t,a&&--t;t=2*(o.length/3+t);for(var c=IndexDatatype$1.createTypedArray(o.length/3,t),u=(l=o.length/6,0),d=0;d<l-1;d++)c[u++]=d,c[u++]=d+1,c[u++]=d+l,c[u++]=d+l+1;return c[u++]=l-1,c[u++]=0,c[u++]=l+l-1,c[u++]=l,c[u++]=0,c[u++]=l,r=n?r-1:(n=i-1,c[u++]=n,c[u++]=n+l,i+r-2),c[u++]=r,c[u++]=r+l,a||(r=i+r-1,c[u++]=r,c[u]=r+l),s.indices=c,s}function RectangleOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).rectangle,i=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=defaultValue(e.rotation,0),a=defaultValue(e.height,0),o=defaultValue(e.extrudedHeight,a);this._rectangle=Rectangle.clone(t),this._granularity=i,this._ellipsoid=r,this._surfaceHeight=Math.max(a,o),this._rotation=n,this._extrudedHeight=Math.min(a,o),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}RectangleOutlineGeometry.packedLength=Rectangle.packedLength+Ellipsoid.packedLength+5,RectangleOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Rectangle.pack(e._rectangle,t,i),i+=Rectangle.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._extrudedHeight,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchRectangle$1=new Rectangle,scratchEllipsoid$b=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$j={rectangle:scratchRectangle$1,ellipsoid:scratchEllipsoid$b,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};RectangleOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Rectangle.unpack(e,t,scratchRectangle$1);t+=Rectangle.packedLength;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$b);t+=Ellipsoid.packedLength;var a=e[t++],o=e[t++],s=e[t++],l=e[t++];t=e[t];return defined(i)?(i._rectangle=Rectangle.clone(r,i._rectangle),i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._surfaceHeight=o,i._rotation=s,i._extrudedHeight=l,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$j.granularity=a,scratchOptions$j.height=o,scratchOptions$j.rotation=s,scratchOptions$j.extrudedHeight=l,scratchOptions$j.offsetAttribute=-1===t?void 0:t,new RectangleOutlineGeometry(scratchOptions$j))};var nwScratch$1=new Cartographic;RectangleOutlineGeometry.createGeometry=function(e){var t=e._rectangle,i=e._ellipsoid,r=RectangleGeometryLibrary.computeOptions(t,e._granularity,e._rotation,0,rectangleScratch$3,nwScratch$1);if(!CesiumMath.equalsEpsilon(t.north,t.south,CesiumMath.EPSILON10)&&!CesiumMath.equalsEpsilon(t.east,t.west,CesiumMath.EPSILON10)){var n,a,o,s=e._surfaceHeight,l=e._extrudedHeight;return s=CesiumMath.equalsEpsilon(s,l,0,CesiumMath.EPSILON2)?((a=constructRectangle$1(e,r)).attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(a.attributes.position.values,s,i,!1),defined(e._offsetAttribute)&&(r=a.attributes.position.values.length,arrayFill(r=new Uint8Array(r/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})),BoundingSphere.fromRectangle3D(t,i,s)):(a=constructExtrudedRectangle$1(e,r),defined(e._offsetAttribute)&&(n=a.attributes.position.values.length/3,o=new Uint8Array(n),o=e._offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(o,1,0,n/2):arrayFill(o,e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})),o=BoundingSphere.fromRectangle3D(t,i,s,topBoundingSphere$3),l=BoundingSphere.fromRectangle3D(t,i,l,bottomBoundingSphere$3),BoundingSphere.union(o,l)),new Geometry({attributes:a.attributes,indices:a.indices,primitiveType:PrimitiveType$1.LINES,boundingSphere:s,offsetAttribute:e._offsetAttribute})}};var ReferenceFrame={FIXED:0,INERTIAL:1},ReferenceFrame$1=Object.freeze(ReferenceFrame),ScreenSpaceEventType={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},ScreenSpaceEventType$1=Object.freeze(ScreenSpaceEventType);function getPosition$1(e,t,i){return(e=e._element)===document?(i.x=t.clientX,i.y=t.clientY,i):(e=e.getBoundingClientRect(),i.x=t.clientX-e.left,i.y=t.clientY-e.top,i)}function getInputEventKey(e,t){return defined(t)&&(e+="+"+t),e}function getModifier(e){return e.shiftKey?KeyboardEventModifier$1.SHIFT:e.ctrlKey?KeyboardEventModifier$1.CTRL:e.altKey?KeyboardEventModifier$1.ALT:void 0}var MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};function registerListener(e,t,i,r){function n(t){r(e,t)}FeatureDetection.isInternetExplorer()?i.addEventListener(t,n,!1):i.addEventListener(t,n,{capture:!1,passive:!1}),e._removalFunctions.push((function(){i.removeEventListener(t,n,!1)}))}function registerListeners(e){var t=e._element,i=defined(t.disableRootEvents)?t:document;FeatureDetection.supportsPointerEvents()?(registerListener(e,"pointerdown",t,handlePointerDown),registerListener(e,"pointerup",t,handlePointerUp),registerListener(e,"pointermove",t,handlePointerMove),registerListener(e,"pointercancel",t,handlePointerUp)):(registerListener(e,"mousedown",t,handleMouseDown),registerListener(e,"mouseup",i,handleMouseUp),registerListener(e,"mousemove",i,handleMouseMove),registerListener(e,"touchstart",t,handleTouchStart),registerListener(e,"touchend",i,handleTouchEnd),registerListener(e,"touchmove",i,handleTouchMove),registerListener(e,"touchcancel",i,handleTouchEnd)),registerListener(e,"dblclick",t,handleDblClick),registerListener(e,"onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",t,handleWheel)}function unregisterListeners(e){for(var t=e._removalFunctions,i=0;i<t.length;++i)t[i]()}var mouseDownEvent={position:new Cartesian2};function gotTouchEvent(e){e._lastSeenTouchEvent=getTimestamp$1()}function canProcessMouseEvent(e){return getTimestamp$1()-e._lastSeenTouchEvent>ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds}function checkPixelTolerance(e,t,i){var r=e.x-t.x;t=e.y-t.y;return Math.sqrt(r*r+t*t)<i}function handleMouseDown(e,t){if(canProcessMouseEvent(e)){var i,r=t.button;if(e._buttonDown[r]=!0,r===MouseButton.LEFT)i=ScreenSpaceEventType$1.LEFT_DOWN;else if(r===MouseButton.MIDDLE)i=ScreenSpaceEventType$1.MIDDLE_DOWN;else{if(r!==MouseButton.RIGHT)return;i=ScreenSpaceEventType$1.RIGHT_DOWN}var n=getPosition$1(e,t,e._primaryPosition);Cartesian2.clone(n,e._primaryStartPosition),Cartesian2.clone(n,e._primaryPreviousPosition),r=getModifier(t),defined(r=e.getInputAction(i,r))&&(Cartesian2.clone(n,mouseDownEvent.position),r(mouseDownEvent),t.preventDefault())}}var mouseUpEvent={position:new Cartesian2},mouseClickEvent={position:new Cartesian2};function cancelMouseEvent(e,t,i,r){var n=getModifier(r);t=e.getInputAction(t,n),n=e.getInputAction(i,n);(defined(t)||defined(n))&&(r=getPosition$1(e,r,e._primaryPosition),defined(t)&&(Cartesian2.clone(r,mouseUpEvent.position),t(mouseUpEvent)),defined(n)&&checkPixelTolerance(e._primaryStartPosition,r,e._clickPixelTolerance)&&(Cartesian2.clone(r,mouseClickEvent.position),n(mouseClickEvent)))}function handleMouseUp(e,t){var i;canProcessMouseEvent(e)&&((i=t.button)!==MouseButton.LEFT&&i!==MouseButton.MIDDLE&&i!==MouseButton.RIGHT||(e._buttonDown[MouseButton.LEFT]&&(cancelMouseEvent(e,ScreenSpaceEventType$1.LEFT_UP,ScreenSpaceEventType$1.LEFT_CLICK,t),e._buttonDown[MouseButton.LEFT]=!1),e._buttonDown[MouseButton.MIDDLE]&&(cancelMouseEvent(e,ScreenSpaceEventType$1.MIDDLE_UP,ScreenSpaceEventType$1.MIDDLE_CLICK,t),e._buttonDown[MouseButton.MIDDLE]=!1),e._buttonDown[MouseButton.RIGHT]&&(cancelMouseEvent(e,ScreenSpaceEventType$1.RIGHT_UP,ScreenSpaceEventType$1.RIGHT_CLICK,t),e._buttonDown[MouseButton.RIGHT]=!1)))}var mouseMoveEvent={startPosition:new Cartesian2,endPosition:new Cartesian2};function handleMouseMove(e,t){var i,r,n;canProcessMouseEvent(e)&&(n=getModifier(t),i=getPosition$1(e,t,e._primaryPosition),r=e._primaryPreviousPosition,defined(n=e.getInputAction(ScreenSpaceEventType$1.MOUSE_MOVE,n))&&(Cartesian2.clone(r,mouseMoveEvent.startPosition),Cartesian2.clone(i,mouseMoveEvent.endPosition),n(mouseMoveEvent)),Cartesian2.clone(i,r),(e._buttonDown[MouseButton.LEFT]||e._buttonDown[MouseButton.MIDDLE]||e._buttonDown[MouseButton.RIGHT])&&t.preventDefault())}var mouseDblClickEvent={position:new Cartesian2};function handleDblClick(e,t){var i,r;t.button===MouseButton.LEFT&&(i=ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK,r=getModifier(t),defined(r=e.getInputAction(i,r))&&(getPosition$1(e,t,mouseDblClickEvent.position),r(mouseDblClickEvent)))}function handleWheel(e,t){var i,r;i=defined(t.deltaY)?(r=t.deltaMode)===t.DOM_DELTA_PIXEL?-t.deltaY:r===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY:0<t.detail?-120*t.detail:t.wheelDelta,defined(i)&&(r=getModifier(t),defined(r=e.getInputAction(ScreenSpaceEventType$1.WHEEL,r))&&(r(i),t.preventDefault()))}function handleTouchStart(e,t){gotTouchEvent(e);for(var i,r,n=t.changedTouches,a=n.length,o=e._positions,s=0;s<a;++s)r=(i=n[s]).identifier,o.set(r,getPosition$1(e,i,new Cartesian2));fireTouchEvents(e,t);var l=e._previousPositions;for(s=0;s<a;++s)r=(i=n[s]).identifier,l.set(r,Cartesian2.clone(o.get(r)))}function handleTouchEnd(e,t){gotTouchEvent(e);for(var i,r=t.changedTouches,n=r.length,a=e._positions,o=0;o<n;++o)i=r[o].identifier,a.remove(i);fireTouchEvents(e,t);var s=e._previousPositions;for(o=0;o<n;++o)i=r[o].identifier,s.remove(i)}var touchStartEvent={position:new Cartesian2},touch2StartEvent={position1:new Cartesian2,position2:new Cartesian2},touchEndEvent={position:new Cartesian2},touchClickEvent={position:new Cartesian2},touchHoldEvent={position:new Cartesian2};function fireTouchEvents(e,t){var i,r,n,a=getModifier(t),o=e._positions,s=o.length,l=e._isPinching;1!==s&&e._buttonDown[MouseButton.LEFT]&&(e._buttonDown[MouseButton.LEFT]=!1,defined(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),defined(i=e.getInputAction(ScreenSpaceEventType$1.LEFT_UP,a))&&(Cartesian2.clone(e._primaryPosition,touchEndEvent.position),i(touchEndEvent)),0!==s||e._isTouchHolding||defined(r=e.getInputAction(ScreenSpaceEventType$1.LEFT_CLICK,a))&&checkPixelTolerance(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(Cartesian2.clone(e._primaryPosition,touchClickEvent.position),r(touchClickEvent)),e._isTouchHolding=!1),0===s&&l&&(e._isPinching=!1,defined(i=e.getInputAction(ScreenSpaceEventType$1.PINCH_END,a))&&i()),1!==s||l||(n=o.values[0],Cartesian2.clone(n,e._primaryPosition),Cartesian2.clone(n,e._primaryStartPosition),Cartesian2.clone(n,e._primaryPreviousPosition),e._buttonDown[MouseButton.LEFT]=!0,defined(i=e.getInputAction(ScreenSpaceEventType$1.LEFT_DOWN,a))&&(Cartesian2.clone(n,touchStartEvent.position),i(touchStartEvent)),e._touchHoldTimer=setTimeout((function(){e.isDestroyed()||(e._touchHoldTimer=void 0,e._isTouchHolding=!0,defined(r=e.getInputAction(ScreenSpaceEventType$1.RIGHT_CLICK,a))&&checkPixelTolerance(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(Cartesian2.clone(e._primaryPosition,touchHoldEvent.position),r(touchHoldEvent)))}),ScreenSpaceEventHandler.touchHoldDelayMilliseconds),t.preventDefault()),2!==s||l||(e._isPinching=!0,defined(i=e.getInputAction(ScreenSpaceEventType$1.PINCH_START,a))&&(Cartesian2.clone(o.values[0],touch2StartEvent.position1),Cartesian2.clone(o.values[1],touch2StartEvent.position2),i(touch2StartEvent),t.preventDefault()))}function handleTouchMove(e,t){gotTouchEvent(e);for(var i,r,n=t.changedTouches,a=n.length,o=e._positions,s=0;s<a;++s){r=(i=n[s]).identifier;var l=o.get(r);defined(l)&&getPosition$1(e,i,l)}fireTouchMoveEvents(e,t);var c=e._previousPositions;for(s=0;s<a;++s)r=(i=n[s]).identifier,Cartesian2.clone(o.get(r),c.get(r))}var touchMoveEvent={startPosition:new Cartesian2,endPosition:new Cartesian2},touchPinchMovementEvent={distance:{startPosition:new Cartesian2,endPosition:new Cartesian2},angleAndHeight:{startPosition:new Cartesian2,endPosition:new Cartesian2}};function fireTouchMoveEvents(e,t){var i,r,n,a,o,s=getModifier(t),l=e._positions,c=e._previousPositions,u=l.length;1===u&&e._buttonDown[MouseButton.LEFT]?(o=l.values[0],Cartesian2.clone(o,e._primaryPosition),n=e._primaryPreviousPosition,defined(i=e.getInputAction(ScreenSpaceEventType$1.MOUSE_MOVE,s))&&(Cartesian2.clone(n,touchMoveEvent.startPosition),Cartesian2.clone(o,touchMoveEvent.endPosition),i(touchMoveEvent)),Cartesian2.clone(o,n),t.preventDefault()):2===u&&e._isPinching&&defined(i=e.getInputAction(ScreenSpaceEventType$1.PINCH_MOVE,s))&&(a=l.values[0],r=l.values[1],o=c.values[0],n=c.values[1],t=r.x-a.x,u=r.y-a.y,e=.25*Math.sqrt(t*t+u*u),s=n.x-o.x,l=n.y-o.y,c=.25*Math.sqrt(s*s+l*l),a=.125*(r.y+a.y),o=.125*(n.y+o.y),t=Math.atan2(u,t),s=Math.atan2(l,s),Cartesian2.fromElements(0,c,touchPinchMovementEvent.distance.startPosition),Cartesian2.fromElements(0,e,touchPinchMovementEvent.distance.endPosition),Cartesian2.fromElements(s,o,touchPinchMovementEvent.angleAndHeight.startPosition),Cartesian2.fromElements(t,a,touchPinchMovementEvent.angleAndHeight.endPosition),i(touchPinchMovementEvent))}function handlePointerDown(e,t){var i,r;t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType?(i=e._positions,r=t.pointerId,i.set(r,getPosition$1(e,t,new Cartesian2)),fireTouchEvents(e,t),e._previousPositions.set(r,Cartesian2.clone(i.get(r)))):handleMouseDown(e,t)}function handlePointerUp(e,t){var i,r;"touch"===t.pointerType?(i=e._positions,r=t.pointerId,i.remove(r),fireTouchEvents(e,t),e._previousPositions.remove(r)):handleMouseUp(e,t)}function handlePointerMove(e,t){if("touch"===t.pointerType){var i=e._positions,r=t.pointerId,n=i.get(r);if(!defined(n))return;getPosition$1(e,t,n),fireTouchMoveEvents(e,t),n=e._previousPositions,Cartesian2.clone(i.get(r),n.get(r))}else handleMouseMove(e,t)}function ScreenSpaceEventHandler(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new Cartesian2,this._primaryPosition=new Cartesian2,this._primaryPreviousPosition=new Cartesian2,this._positions=new AssociativeArray,this._previousPositions=new AssociativeArray,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=defaultValue(e,document),registerListeners(this)}function ShowGeometryInstanceAttribute(e){e=defaultValue(e,!0),this.value=ShowGeometryInstanceAttribute.toValue(e)}ScreenSpaceEventHandler.prototype.setInputAction=function(e,t,i){i=getInputEventKey(t,i),this._inputEvents[i]=e},ScreenSpaceEventHandler.prototype.getInputAction=function(e,t){return t=getInputEventKey(e,t),this._inputEvents[t]},ScreenSpaceEventHandler.prototype.removeInputAction=function(e,t){t=getInputEventKey(e,t),delete this._inputEvents[t]},ScreenSpaceEventHandler.prototype.isDestroyed=function(){return!1},ScreenSpaceEventHandler.prototype.destroy=function(){return unregisterListeners(this),destroyObject(this)},ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds=800,ScreenSpaceEventHandler.touchHoldDelayMilliseconds=1500,Object.defineProperties(ShowGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),ShowGeometryInstanceAttribute.toValue=function(e,t){return defined(t)?(t[0]=e,t):new Uint8Array([e])};var Simon1994PlanetaryPositions={};function computeTdbMinusTtSpice(e){return e=6.239996+.0172019696544*e,.001657*Math.sin(e+.01671*Math.sin(e))}var TdtMinusTai$1=32.184,J2000d$1=2451545;function taiToTdb(e,t){return t=JulianDate.addSeconds(e,TdtMinusTai$1,t),e=JulianDate.totalDays(t)-J2000d$1,JulianDate.addSeconds(t,computeTdbMinusTtSpice(e),t)}var epoch=new JulianDate(2451545,0,TimeStandard$1.TAI),MetersPerKilometer=1e3,RadiansPerDegree=CesiumMath.RADIANS_PER_DEGREE,RadiansPerArcSecond=CesiumMath.RADIANS_PER_ARCSECOND,MetersPerAstronomicalUnit=14959787e4,perifocalToEquatorial=new Matrix3;function elementsToCartesian(e,t,i,r,n,a,o){i<0&&(i=-i,n+=CesiumMath.PI);var s=e*(1-t);e=r-n,n=n,r=meanAnomalyToTrueAnomaly(a-r,t);return perifocalToCartesianMatrix(e,i,n,perifocalToEquatorial),n=s*(1+t),s=Math.cos(r),r=Math.sin(r),t=n/(1+t*s),defined(o)?(o.x=t*s,o.y=t*r,o.z=0):o=new Cartesian3(t*s,t*r,0),Matrix3.multiplyByVector(perifocalToEquatorial,o,o)}function meanAnomalyToTrueAnomaly(e,t){return eccentricAnomalyToTrueAnomaly(meanAnomalyToEccentricAnomaly(e,t),t)}var maxIterationCount=50,keplerEqConvergence=CesiumMath.EPSILON8;function meanAnomalyToEccentricAnomaly(e,t){for(var i=Math.floor(e/CesiumMath.TWO_PI),r=(e-=i*CesiumMath.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),n=Number.MAX_VALUE,a=0;a<maxIterationCount&&Math.abs(n-r)>keplerEqConvergence;++a)r=(n=r)-(n-t*Math.sin(n)-e)/(1-t*Math.cos(n));return r+i*CesiumMath.TWO_PI}function eccentricAnomalyToTrueAnomaly(e,t){var i=Math.floor(e/CesiumMath.TWO_PI);e-=i*CesiumMath.TWO_PI;var r=Math.cos(e)-t;t=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(t,r),r=CesiumMath.zeroToTwoPi(r);return e<0&&(r-=CesiumMath.TWO_PI),r+i*CesiumMath.TWO_PI}function perifocalToCartesianMatrix(e,t,i,r){var n=Math.cos(e),a=Math.sin(e),o=Math.cos(t);e=Math.sin(t),t=Math.cos(i),i=Math.sin(i);return defined(r)?(r[0]=t*n-i*a*o,r[1]=i*n+t*a*o,r[2]=a*e,r[3]=-t*a-i*n*o,r[4]=-i*a+t*n*o,r[5]=n*e,r[6]=i*e,r[7]=-t*e,r[8]=o):r=new Matrix3(t*n-i*a*o,-t*a-i*n*o,i*e,i*n+t*a*o,-i*a+t*n*o,-t*e,a*e,n*e,o),r}var semiMajorAxis0=1.0000010178*MetersPerAstronomicalUnit,meanLongitude0=100.46645683*RadiansPerDegree,meanLongitude1=1295977422.83429*RadiansPerArcSecond,p1u=16002,p2u=21863,p3u=32004,p4u=10931,p5u=14529,p6u=16368,p7u=15318,p8u=32794,Ca1=64e-7*MetersPerAstronomicalUnit,Ca2=-152e-7*MetersPerAstronomicalUnit,Ca3=62e-7*MetersPerAstronomicalUnit,Ca4=-8e-7*MetersPerAstronomicalUnit,Ca5=32e-7*MetersPerAstronomicalUnit,Ca6=-41e-7*MetersPerAstronomicalUnit,Ca7=19e-7*MetersPerAstronomicalUnit,Ca8=-11e-7*MetersPerAstronomicalUnit,Sa1=1e-7*-150*MetersPerAstronomicalUnit,Sa2=-46e-7*MetersPerAstronomicalUnit,Sa3=68*1e-7*MetersPerAstronomicalUnit,Sa4=54e-7*MetersPerAstronomicalUnit,Sa5=14e-7*MetersPerAstronomicalUnit,Sa6=24e-7*MetersPerAstronomicalUnit,Sa7=-28e-7*MetersPerAstronomicalUnit,Sa8=22e-7*MetersPerAstronomicalUnit,q1u=10,q2u=16002,q3u=21863,q4u=10931,q5u=1473,q6u=32004,q7u=4387,q8u=73,Cl1=-325e-7,Cl2=-322e-7,Cl3=1e-7*-79,Cl4=232*1e-7,Cl5=1e-7*-52,Cl6=97e-7,Cl7=55e-7,Cl8=-41e-7,Sl1=-105e-7,Sl2=-137e-7,Sl3=258e-7,Sl4=35e-7,Sl5=1e-7*-116,Sl6=-88e-7,Sl7=-112e-7,Sl8=-8e-6,scratchDate=new JulianDate(0,0,TimeStandard$1.TAI);function computeSimonEarthMoonBarycenter(e,t){taiToTdb(e,scratchDate);var i=(scratchDate.dayNumber-epoch.dayNumber+(scratchDate.secondsOfDay-epoch.secondsOfDay)/TimeConstants$1.SECONDS_PER_DAY)/(10*TimeConstants$1.DAYS_PER_JULIAN_CENTURY),r=.3595362*i;e=semiMajorAxis0+Ca1*Math.cos(p1u*r)+Sa1*Math.sin(p1u*r)+Ca2*Math.cos(p2u*r)+Sa2*Math.sin(p2u*r)+Ca3*Math.cos(p3u*r)+Sa3*Math.sin(p3u*r)+Ca4*Math.cos(p4u*r)+Sa4*Math.sin(p4u*r)+Ca5*Math.cos(p5u*r)+Sa5*Math.sin(p5u*r)+Ca6*Math.cos(p6u*r)+Sa6*Math.sin(p6u*r)+Ca7*Math.cos(p7u*r)+Sa7*Math.sin(p7u*r)+Ca8*Math.cos(p8u*r)+Sa8*Math.sin(p8u*r),r=meanLongitude0+meanLongitude1*i+Cl1*Math.cos(q1u*r)+Sl1*Math.sin(q1u*r)+Cl2*Math.cos(q2u*r)+Sl2*Math.sin(q2u*r)+Cl3*Math.cos(q3u*r)+Sl3*Math.sin(q3u*r)+Cl4*Math.cos(q4u*r)+Sl4*Math.sin(q4u*r)+Cl5*Math.cos(q5u*r)+Sl5*Math.sin(q5u*r)+Cl6*Math.cos(q6u*r)+Sl6*Math.sin(q6u*r)+Cl7*Math.cos(q7u*r)+Sl7*Math.sin(q7u*r)+Cl8*Math.cos(q8u*r)+Sl8*Math.sin(q8u*r);return elementsToCartesian(e,.0167086342-.0004203654*i,469.97289*RadiansPerArcSecond*i,102.93734808*RadiansPerDegree+11612.3529*RadiansPerArcSecond*i,174.87317577*RadiansPerDegree-8679.27034*RadiansPerArcSecond*i,r,t)}function computeSimonMoon(e,t){taiToTdb(e,scratchDate);var i=(scratchDate.dayNumber-epoch.dayNumber+(scratchDate.secondsOfDay-epoch.secondsOfDay)/TimeConstants$1.SECONDS_PER_DAY)/TimeConstants$1.DAYS_PER_JULIAN_CENTURY,r=i*i,n=r*i,a=383397.7725+.004*i,o=.055545526-16e-9*i,s=5.15668983*RadiansPerDegree,l=-8e-5*i+.02966*r-42e-6*n-13e-8*(T=n*i),c=83.35324312*RadiansPerDegree,u=14643420.2669*i-38.2702*r-.045047*n+21301e-8*T,d=125.04455501*RadiansPerDegree,h=-6967919.3631*i+6.3602*r+.007625*n-3586e-8*T,p=218.31664563*RadiansPerDegree,f=1732559343.4847*i-6.391*r+.006588*n-3169e-8*T,m=297.85019547*RadiansPerDegree+RadiansPerArcSecond*(1602961601.209*i-6.3706*r+.006593*n-3169e-8*T),g=134.96340251*RadiansPerDegree+RadiansPerArcSecond*(1717915923.2178*i+31.8792*r+.051635*n-2447e-7*T),y=357.52910918*RadiansPerDegree+RadiansPerArcSecond*(129596581.0481*i-.5532*r+136e-6*n-1149e-8*T),_=310.17137918*RadiansPerDegree-RadiansPerArcSecond*(6967051.436*i+6.2068*r+.007618*n-3219e-8*T),v=2*m,C=4*m,x=6*m,b=2*g,S=3*g,T=(e=4*g,2*(93.27209062*RadiansPerDegree+RadiansPerArcSecond*(1739527262.8478*i-12.7512*r-.001037*n+417e-8*T)));return a+=3400.4*Math.cos(v)-635.6*Math.cos(v-g)-235.6*Math.cos(g)+218.1*Math.cos(v-y)+181*Math.cos(v+g),o+=.014216*Math.cos(v-g)+.008551*Math.cos(v-b)-.001383*Math.cos(g)+.001356*Math.cos(v+g)-.001147*Math.cos(C-S)-914e-6*Math.cos(C-b)+869e-6*Math.cos(v-y-g)-627e-6*Math.cos(v)-394e-6*Math.cos(C-e)+282e-6*Math.cos(v-y-b)-279e-6*Math.cos(m-g)-236e-6*Math.cos(b)+231e-6*Math.cos(C)+229e-6*Math.cos(x-e)-201e-6*Math.cos(b-T),l+=486.26*Math.cos(v-T)-40.13*Math.cos(v)+37.51*Math.cos(T)+25.73*Math.cos(b-T)+19.97*Math.cos(v-y-T),u+=-55609*Math.sin(v-g)-34711*Math.sin(v-b)-9792*Math.sin(g)+9385*Math.sin(C-S)+7505*Math.sin(C-b)+5318*Math.sin(v+g)+3484*Math.sin(C-e)-3417*Math.sin(v-y-g)-2530*Math.sin(x-e)-2376*Math.sin(v)-2075*Math.sin(v-S)-1883*Math.sin(b)-1736*Math.sin(x-5*g)+1626*Math.sin(y)-1370*Math.sin(x-S),h+=-5392*Math.sin(v-T)-540*Math.sin(y)-441*Math.sin(v)+423*Math.sin(T)-288*Math.sin(b-T),f+=-3332.9*Math.sin(v)+1197.4*Math.sin(v-g)-662.5*Math.sin(y)+396.3*Math.sin(g)-218*Math.sin(v-y),b=2*_,g=3*_,l+=46.997*Math.cos(_)*i-.614*Math.cos(v-T+_)*i+.614*Math.cos(v-T-_)*i-.0297*Math.cos(b)*r-.0335*Math.cos(_)*r+.0012*Math.cos(v-T+b)*r-16e-5*Math.cos(_)*n+4e-5*Math.cos(g)*n+4e-5*Math.cos(b)*n,u+=y=2.116*Math.sin(_)*i-.111*Math.sin(v-T-_)*i-.0015*Math.sin(_)*r,f+=y,h+=-520.77*Math.sin(_)*i+13.66*Math.sin(v-T+_)*i+1.12*Math.sin(v-_)*i-1.06*Math.sin(T-_)*i+.66*Math.sin(b)*r+.371*Math.sin(_)*r-.035*Math.sin(v-T+b)*r-.015*Math.sin(v-T+_)*r+.0014*Math.sin(_)*n-.0011*Math.sin(g)*n-9e-4*Math.sin(b)*n,elementsToCartesian(a*=MetersPerKilometer,o,s+l*RadiansPerArcSecond,c+u*RadiansPerArcSecond,d+h*RadiansPerArcSecond,p+f*RadiansPerArcSecond,t)}var moonEarthMassRatio=.012300034,factor=moonEarthMassRatio/(moonEarthMassRatio+1)*-1;function computeSimonEarth(e,t){return t=computeSimonMoon(e,t),Cartesian3.multiplyByScalar(t,factor,t)}var axesTransformation=new Matrix3(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),translation$1=new Cartesian3;function interpolateColors$1(e,t,i,r,n,a,o){var s=PolylinePipeline.numberOfPoints(e,t,n),l=i.red,c=i.green,u=i.blue,d=i.alpha,h=r.red;e=r.green,t=r.blue,n=r.alpha;if(Color.equals(i,r)){for(_=0;_<s;_++)a[o++]=Color.floatToByte(l),a[o++]=Color.floatToByte(c),a[o++]=Color.floatToByte(u),a[o++]=Color.floatToByte(d);return o}for(var p=(h-l)/s,f=(e-c)/s,m=(t-u)/s,g=(n-d)/s,y=o,_=0;_<s;_++)a[y++]=Color.floatToByte(l+_*p),a[y++]=Color.floatToByte(c+_*f),a[y++]=Color.floatToByte(u+_*m),a[y++]=Color.floatToByte(d+_*g);return y}function SimplePolylineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.colors,r=defaultValue(e.colorsPerVertex,!1);this._positions=t,this._colors=i,this._colorsPerVertex=r,this._arcType=defaultValue(e.arcType,ArcType$1.GEODESIC),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry",t=1+t.length*Cartesian3.packedLength,t+=defined(i)?1+i.length*Color.packedLength:1,this.packedLength=t+Ellipsoid.packedLength+3}Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame=function(e,t){return defined(e)||(e=JulianDate.now()),defined(t)||(t=new Cartesian3),translation$1=computeSimonEarthMoonBarycenter(e,translation$1),t=Cartesian3.negate(translation$1,t),computeSimonEarth(e,translation$1),Cartesian3.subtract(t,translation$1,t),Matrix3.multiplyByVector(axesTransformation,t,t),t},Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame=function(e,t){return defined(e)||(e=JulianDate.now()),t=computeSimonMoon(e,t),Matrix3.multiplyByVector(axesTransformation,t,t),t},SimplePolylineGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._colors;a=defined(o)?o.length:0;for(t[i++]=a,r=0;r<a;++r,i+=Color.packedLength)Color.pack(o[r],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t},SimplePolylineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);var o=0<(r=e[t++])?new Array(r):void 0;for(a=0;a<r;++a,t+=Color.packedLength)o[a]=Color.unpack(e,t);var s=Ellipsoid.unpack(e,t);t+=Ellipsoid.packedLength;var l=1===e[t++],c=e[t++],u=e[t];return defined(i)?(i._positions=n,i._colors=o,i._ellipsoid=s,i._colorsPerVertex=l,i._arcType=c,i._granularity=u,i):new SimplePolylineGeometry({positions:n,colors:o,ellipsoid:s,colorsPerVertex:l,arcType:c,granularity:u})};var scratchArray1=new Array(2),scratchArray2=new Array(2),generateArcOptionsScratch={positions:scratchArray1,height:scratchArray2,ellipsoid:void 0,minDistance:void 0,granularity:void 0};function SphereGeometry(e){var t=defaultValue(e.radius,1);e={radii:new Cartesian3(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new EllipsoidGeometry(e),this._workerName="createSphereGeometry"}SimplePolylineGeometry.createGeometry=function(e){var t,i,r,n=e._positions,a=e._colors,o=e._colorsPerVertex,s=e._arcType,l=e._granularity,c=(e=e._ellipsoid,CesiumMath.chordLength(l,e.maximumRadius)),u=defined(a)&&!o,d=n.length,h=0;if(s===ArcType$1.GEODESIC||s===ArcType$1.RHUMB){var p,f,m=s===ArcType$1.GEODESIC?(p=CesiumMath.chordLength(l,e.maximumRadius),f=PolylinePipeline.numberOfPoints,PolylinePipeline.generateArc):(p=l,f=PolylinePipeline.numberOfPointsRhumbLine,PolylinePipeline.generateRhumbArc),g=PolylinePipeline.extractHeights(n,e),y=generateArcOptionsScratch;if(s===ArcType$1.GEODESIC?y.minDistance=c:y.granularity=l,y.ellipsoid=e,u){for(var _=0,v=0;v<d-1;v++)_+=f(n[v],n[v+1],p)+1;t=new Float64Array(3*_),r=new Uint8Array(4*_),y.positions=scratchArray1,y.height=scratchArray2;var C=0;for(v=0;v<d-1;++v){scratchArray1[0]=n[v],scratchArray1[1]=n[v+1],scratchArray2[0]=g[v],scratchArray2[1]=g[v+1];var x=m(y);if(defined(a))for(var b=x.length/3,S=a[v],T=0;T<b;++T)r[C++]=Color.floatToByte(S.red),r[C++]=Color.floatToByte(S.green),r[C++]=Color.floatToByte(S.blue),r[C++]=Color.floatToByte(S.alpha);t.set(x,h),h+=x.length}}else if(y.positions=n,y.height=g,t=new Float64Array(m(y)),defined(a)){for(r=new Uint8Array(t.length/3*4),v=0;v<d-1;++v)h=interpolateColors$1(n[v],n[v+1],a[v],a[v+1],c,r,h);var E=a[d-1];r[h++]=Color.floatToByte(E.red),r[h++]=Color.floatToByte(E.green),r[h++]=Color.floatToByte(E.blue),r[h++]=Color.floatToByte(E.alpha)}}else{i=u?2*d-2:d,t=new Float64Array(3*i),r=defined(a)?new Uint8Array(4*i):void 0;var w=0,A=0;for(v=0;v<d;++v){var P=n[v];if(u&&0<v&&(Cartesian3.pack(P,t,w),w+=3,S=a[v-1],r[A++]=Color.floatToByte(S.red),r[A++]=Color.floatToByte(S.green),r[A++]=Color.floatToByte(S.blue),r[A++]=Color.floatToByte(S.alpha)),u&&v===d-1)break;Cartesian3.pack(P,t,w),w+=3,defined(a)&&(S=a[v],r[A++]=Color.floatToByte(S.red),r[A++]=Color.floatToByte(S.green),r[A++]=Color.floatToByte(S.blue),r[A++]=Color.floatToByte(S.alpha))}}(e=new GeometryAttributes).position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:t}),defined(a)&&(e.color=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:4,values:r,normalize:!0}));E=2*((i=t.length/3)-1);var D=IndexDatatype$1.createTypedArray(i,E),M=0;for(v=0;v<i-1;++v)D[M++]=v,D[M++]=v+1;return new Geometry({attributes:e,indices:D,primitiveType:PrimitiveType$1.LINES,boundingSphere:BoundingSphere.fromPoints(n)})},SphereGeometry.packedLength=EllipsoidGeometry.packedLength,SphereGeometry.pack=function(e,t,i){return EllipsoidGeometry.pack(e._ellipsoidGeometry,t,i)};var scratchEllipsoidGeometry=new EllipsoidGeometry,scratchOptions$k={radius:void 0,radii:new Cartesian3,vertexFormat:new VertexFormat,stackPartitions:void 0,slicePartitions:void 0};function SphereOutlineGeometry(e){var t=defaultValue(e.radius,1);e={radii:new Cartesian3(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new EllipsoidOutlineGeometry(e),this._workerName="createSphereOutlineGeometry"}SphereGeometry.unpack=function(e,t,i){return t=EllipsoidGeometry.unpack(e,t,scratchEllipsoidGeometry),scratchOptions$k.vertexFormat=VertexFormat.clone(t._vertexFormat,scratchOptions$k.vertexFormat),scratchOptions$k.stackPartitions=t._stackPartitions,scratchOptions$k.slicePartitions=t._slicePartitions,defined(i)?(Cartesian3.clone(t._radii,scratchOptions$k.radii),i._ellipsoidGeometry=new EllipsoidGeometry(scratchOptions$k),i):(scratchOptions$k.radius=t._radii.x,new SphereGeometry(scratchOptions$k))},SphereGeometry.createGeometry=function(e){return EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},SphereOutlineGeometry.packedLength=EllipsoidOutlineGeometry.packedLength,SphereOutlineGeometry.pack=function(e,t,i){return EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,t,i)};var scratchEllipsoidGeometry$1=new EllipsoidOutlineGeometry,scratchOptions$l={radius:void 0,radii:new Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};function Spherical(e,t,i){this.clock=defaultValue(e,0),this.cone=defaultValue(t,0),this.magnitude=defaultValue(i,1)}function TerrainData(){DeveloperError.throwInstantiationError()}SphereOutlineGeometry.unpack=function(e,t,i){return t=EllipsoidOutlineGeometry.unpack(e,t,scratchEllipsoidGeometry$1),scratchOptions$l.stackPartitions=t._stackPartitions,scratchOptions$l.slicePartitions=t._slicePartitions,scratchOptions$l.subdivisions=t._subdivisions,defined(i)?(Cartesian3.clone(t._radii,scratchOptions$l.radii),i._ellipsoidGeometry=new EllipsoidOutlineGeometry(scratchOptions$l),i):(scratchOptions$l.radius=t._radii.x,new SphereOutlineGeometry(scratchOptions$l))},SphereOutlineGeometry.createGeometry=function(e){return EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},Spherical.fromCartesian3=function(e,t){var i=e.x,r=e.y,n=e.z;e=i*i+r*r;return defined(t)||(t=new Spherical),t.clock=Math.atan2(r,i),t.cone=Math.atan2(Math.sqrt(e),n),t.magnitude=Math.sqrt(e+n*n),t},Spherical.clone=function(e,t){if(defined(e))return defined(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new Spherical(e.clock,e.cone,e.magnitude)},Spherical.normalize=function(e,t){return defined(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new Spherical(e.clock,e.cone,1)},Spherical.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude},Spherical.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e.clock-t.clock)<=i&&Math.abs(e.cone-t.cone)<=i&&Math.abs(e.magnitude-t.magnitude)<=i},Spherical.prototype.equals=function(e){return Spherical.equals(this,e)},Spherical.prototype.clone=function(e){return Spherical.clone(this,e)},Spherical.prototype.equalsEpsilon=function(e,t){return Spherical.equalsEpsilon(this,e,t)},Spherical.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},Object.defineProperties(TerrainData.prototype,{credits:{get:DeveloperError.throwInstantiationError},waterMask:{get:DeveloperError.throwInstantiationError}}),TerrainData.prototype.interpolateHeight=DeveloperError.throwInstantiationError,TerrainData.prototype.isChildAvailable=DeveloperError.throwInstantiationError,TerrainData.prototype.createMesh=DeveloperError.throwInstantiationError,TerrainData.prototype.upsample=DeveloperError.throwInstantiationError,TerrainData.prototype.wasCreatedByUpsampling=DeveloperError.throwInstantiationError;var TileEdge={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7};function TilingScheme(e){}function compareIntervalStartTimes(e,t){return JulianDate.compare(e.start,t.start)}function TimeIntervalCollection(e){if(this._intervals=[],this._changedEvent=new Event,defined(e))for(var t=e.length,i=0;i<t;i++)this.addInterval(e[i])}Object.defineProperties(TilingScheme.prototype,{ellipsoid:{get:DeveloperError.throwInstantiationError},rectangle:{get:DeveloperError.throwInstantiationError},projection:{get:DeveloperError.throwInstantiationError}}),TilingScheme.prototype.getNumberOfXTilesAtLevel=DeveloperError.throwInstantiationError,TilingScheme.prototype.getNumberOfYTilesAtLevel=DeveloperError.throwInstantiationError,TilingScheme.prototype.rectangleToNativeRectangle=DeveloperError.throwInstantiationError,TilingScheme.prototype.tileXYToNativeRectangle=DeveloperError.throwInstantiationError,TilingScheme.prototype.tileXYToRectangle=DeveloperError.throwInstantiationError,TilingScheme.prototype.positionToTileXY=DeveloperError.throwInstantiationError,Object.defineProperties(TimeIntervalCollection.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){var e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){var e=this._intervals;return 0!==e.length&&e[0].isStartIncluded}},stop:{get:function(){var e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){var e=this._intervals,t=e.length;return 0!==t&&e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),TimeIntervalCollection.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof TimeIntervalCollection))return!1;var i=this._intervals,r=e._intervals,n=i.length;if(n!==r.length)return!1;for(var a=0;a<n;a++)if(!TimeInterval.equals(i[a],r[a],t))return!1;return!0},TimeIntervalCollection.prototype.get=function(e){return this._intervals[e]},TimeIntervalCollection.prototype.removeAll=function(){0<this._intervals.length&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},TimeIntervalCollection.prototype.findIntervalContainingDate=function(e){return 0<=(e=this.indexOf(e))?this._intervals[e]:void 0},TimeIntervalCollection.prototype.findDataForIntervalContainingDate=function(e){return 0<=(e=this.indexOf(e))?this._intervals[e].data:void 0},TimeIntervalCollection.prototype.contains=function(e){return 0<=this.indexOf(e)};var indexOfScratch=new TimeInterval;TimeIntervalCollection.prototype.indexOf=function(e){var t=this._intervals;indexOfScratch.start=e,indexOfScratch.stop=e;var i=binarySearch(t,indexOfScratch,compareIntervalStartTimes);return 0<=i?t[i].isStartIncluded?i:0<i&&t[i-1].stop.equals(e)&&t[i-1].isStopIncluded?i-1:~i:0<(i=~i)&&i-1<t.length&&TimeInterval.contains(t[i-1],e)?i-1:~i},TimeIntervalCollection.prototype.findInterval=function(e){for(var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).start,i=e.stop,r=e.isStartIncluded,n=e.isStopIncluded,a=this._intervals,o=0,s=a.length;o<s;o++){var l=a[o];if((!defined(t)||l.start.equals(t))&&(!defined(i)||l.stop.equals(i))&&(!defined(r)||l.isStartIncluded===r)&&(!defined(n)||l.isStopIncluded===n))return a[o]}},TimeIntervalCollection.prototype.addInterval=function(e,t){if(!e.isEmpty){var i=this._intervals;if(0===i.length||JulianDate.greaterThan(e.start,i[i.length-1].stop))return i.push(e),void this._changedEvent.raiseEvent(this);var r,n=binarySearch(i,e,compareIntervalStartTimes);for(n<0?n=~n:0<n&&e.isStartIncluded&&i[n-1].isStartIncluded&&i[n-1].start.equals(e.start)?--n:n<i.length&&!e.isStartIncluded&&i[n].isStartIncluded&&i[n].start.equals(e.start)&&++n,0<n&&(0<(r=JulianDate.compare(i[n-1].stop,e.start))||0===r&&(i[n-1].isStopIncluded||e.isStartIncluded))&&((defined(t)?t(i[n-1].data,e.data):i[n-1].data===e.data)?(e=JulianDate.greaterThan(e.stop,i[n-1].stop)?new TimeInterval({start:i[n-1].start,stop:e.stop,isStartIncluded:i[n-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new TimeInterval({start:i[n-1].start,stop:i[n-1].stop,isStartIncluded:i[n-1].isStartIncluded,isStopIncluded:i[n-1].isStopIncluded||e.stop.equals(i[n-1].stop)&&e.isStopIncluded,data:e.data}),i.splice(n-1,1),--n):((0<(r=JulianDate.compare(i[n-1].stop,e.stop))||0===r&&i[n-1].isStopIncluded&&!e.isStopIncluded)&&i.splice(n,0,new TimeInterval({start:e.stop,stop:i[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[n-1].isStopIncluded,data:i[n-1].data})),i[n-1]=new TimeInterval({start:i[n-1].start,stop:e.start,isStartIncluded:i[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:i[n-1].data})));n<i.length&&(0<(r=JulianDate.compare(e.stop,i[n].start))||0===r&&(e.isStopIncluded||i[n].isStartIncluded));)if(defined(t)?t(i[n].data,e.data):i[n].data===e.data)e=new TimeInterval({start:e.start,stop:(JulianDate.greaterThan(i[n].stop,e.stop)?i[n]:e).stop,isStartIncluded:e.isStartIncluded,isStopIncluded:(JulianDate.greaterThan(i[n].stop,e.stop)?i[n]:e).isStopIncluded,data:e.data}),i.splice(n,1);else{if(i[n]=new TimeInterval({start:e.stop,stop:i[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[n].isStopIncluded,data:i[n].data}),!i[n].isEmpty)break;i.splice(n,1)}i.splice(n,0,e),this._changedEvent.raiseEvent(this)}},TimeIntervalCollection.prototype.removeInterval=function(e){if(e.isEmpty)return!1;var t=this._intervals,i=binarySearch(t,e,compareIntervalStartTimes);i<0&&(i=~i);var r=!1;for(0<i&&(JulianDate.greaterThan(t[i-1].stop,e.start)||t[i-1].stop.equals(e.start)&&t[i-1].isStopIncluded&&e.isStartIncluded)&&(r=!0,(JulianDate.greaterThan(t[i-1].stop,e.stop)||t[i-1].isStopIncluded&&!e.isStopIncluded&&t[i-1].stop.equals(e.stop))&&t.splice(i,0,new TimeInterval({start:e.stop,stop:t[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i-1].isStopIncluded,data:t[i-1].data})),t[i-1]=new TimeInterval({start:t[i-1].start,stop:e.start,isStartIncluded:t[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[i-1].data})),i<t.length&&!e.isStartIncluded&&t[i].isStartIncluded&&e.start.equals(t[i].start)&&(r=!0,t.splice(i,0,new TimeInterval({start:t[i].start,stop:t[i].start,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data})),++i);i<t.length&&JulianDate.greaterThan(e.stop,t[i].stop);)r=!0,t.splice(i,1);return i<t.length&&e.stop.equals(t[i].stop)&&(r=!0,!e.isStopIncluded&&t[i].isStopIncluded?i+1<t.length&&t[i+1].start.equals(e.stop)&&t[i].data===t[i+1].data?(t.splice(i,1),t[i]=new TimeInterval({start:t[i].start,stop:t[i].stop,isStartIncluded:!0,isStopIncluded:t[i].isStopIncluded,data:t[i].data})):t[i]=new TimeInterval({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data}):t.splice(i,1)),i<t.length&&(JulianDate.greaterThan(e.stop,t[i].start)||e.stop.equals(t[i].start)&&e.isStopIncluded&&t[i].isStartIncluded)&&(r=!0,t[i]=new TimeInterval({start:e.stop,stop:t[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i].isStopIncluded,data:t[i].data})),r&&this._changedEvent.raiseEvent(this),r},TimeIntervalCollection.prototype.intersect=function(e,t,i){for(var r=new TimeIntervalCollection,n=0,a=0,o=this._intervals,s=e._intervals;n<o.length&&a<s.length;){var l,c=o[n],u=s[a];JulianDate.lessThan(c.stop,u.start)?++n:JulianDate.lessThan(u.stop,c.start)?++a:((defined(i)||defined(t)&&t(c.data,u.data)||!defined(t)&&u.data===c.data)&&((l=TimeInterval.intersect(c,u,new TimeInterval,i)).isEmpty||r.addInterval(l,t)),JulianDate.lessThan(c.stop,u.stop)||c.stop.equals(u.stop)&&!c.isStopIncluded&&u.isStopIncluded?++n:++a)}return r},TimeIntervalCollection.fromJulianDateArray=function(e,t){defined(t)||(t=new TimeIntervalCollection);var i=e.julianDates,r=i.length,n=e.dataCallback,a=defaultValue(e.isStartIncluded,!0),o=defaultValue(e.isStopIncluded,!0),s=defaultValue(e.leadingInterval,!1),l=(e=defaultValue(e.trailingInterval,!1),0);s&&(++l,(u=new TimeInterval({start:Iso8601.MINIMUM_VALUE,stop:i[0],isStartIncluded:!0,isStopIncluded:!a})).data=defined(n)?n(u,t.length):t.length,t.addInterval(u));for(var c=0;c<r-1;++c){var u;(u=new TimeInterval({start:i[c],stop:i[c+1],isStartIncluded:t.length!==l||a,isStopIncluded:c===r-2&&o})).data=defined(n)?n(u,t.length):t.length,t.addInterval(u)}return e&&((u=new TimeInterval({start:i[r-1],stop:Iso8601.MAXIMUM_VALUE,isStartIncluded:!o,isStopIncluded:!0})).data=defined(n)?n(u,t.length):t.length,t.addInterval(u)),t};var scratchGregorianDate=new GregorianDate,monthLengths=[0,31,28,31,30,31,30,31,31,30,31,30,31];function addToDate(e,t,i){defined(i)||(i=new JulianDate),JulianDate.toGregorianDate(e,scratchGregorianDate);var r=scratchGregorianDate.millisecond+t.millisecond,n=scratchGregorianDate.second+t.second,a=scratchGregorianDate.minute+t.minute,o=(e=scratchGregorianDate.hour+t.hour,scratchGregorianDate.day+t.day),s=scratchGregorianDate.month+t.month,l=scratchGregorianDate.year+t.year;for(1e3<=r&&(n+=Math.floor(r/1e3),r%=1e3),60<=n&&(a+=Math.floor(n/60),n%=60),60<=a&&(e+=Math.floor(a/60),a%=60),24<=e&&(o+=Math.floor(e/24),e%=24),monthLengths[2]=isLeapYear(l)?29:28;o>monthLengths[s]||13<=s;)o>monthLengths[s]&&(o-=monthLengths[s],++s),13<=s&&(--s,l+=Math.floor(s/12),s%=12,++s),monthLengths[2]=isLeapYear(l)?29:28;return scratchGregorianDate.millisecond=r,scratchGregorianDate.second=n,scratchGregorianDate.minute=a,scratchGregorianDate.hour=e,scratchGregorianDate.day=o,scratchGregorianDate.month=s,scratchGregorianDate.year=l,JulianDate.fromGregorianDate(scratchGregorianDate,i)}var scratchJulianDate=new JulianDate,durationRegex=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function parseDuration(e,t){if(defined(e)&&0!==e.length){if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,"P"===e[t.millisecond=0]){var i=e.match(durationRegex);if(!defined(i))return;defined(i[1])&&(t.year=Number(i[1].replace(",","."))),defined(i[2])&&(t.month=Number(i[2].replace(",","."))),defined(i[3])&&(t.day=7*Number(i[3].replace(",","."))),defined(i[4])&&(t.day+=Number(i[4].replace(",","."))),defined(i[5])&&(t.hour=Number(i[5].replace(",","."))),defined(i[6])&&(t.minute=Number(i[6].replace(",","."))),defined(i[7])&&(i=Number(i[7].replace(",",".")),t.second=Math.floor(i),t.millisecond=i%1*1e3)}else"Z"!==e[e.length-1]&&(e+="Z"),JulianDate.toGregorianDate(JulianDate.fromIso8601(e,scratchJulianDate),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}}var scratchDuration=new GregorianDate;TimeIntervalCollection.fromIso8601=function(e,t){var i=e.iso8601.split("/"),r=JulianDate.fromIso8601(i[0]),n=JulianDate.fromIso8601(i[1]),a=[];if(parseDuration(i[2],scratchDuration)){var o=JulianDate.clone(r);for(a.push(o);JulianDate.compare(o,n)<0;)o=addToDate(o,scratchDuration),JulianDate.compare(n,o)<=0&&JulianDate.clone(n,o),a.push(o)}else a.push(r,n);return TimeIntervalCollection.fromJulianDateArray({julianDates:a,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},TimeIntervalCollection.fromIso8601DateArray=function(e,t){return TimeIntervalCollection.fromJulianDateArray({julianDates:e.iso8601Dates.map((function(e){return JulianDate.fromIso8601(e)})),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},TimeIntervalCollection.fromIso8601DurationArray=function(e,t){for(var i,r,n=e.epoch,a=e.iso8601Durations,o=defaultValue(e.relativeToPrevious,!1),s=[],l=a.length,c=0;c<l;++c)!parseDuration(a[c],scratchDuration)&&0!==c||(i=o&&defined(r)?addToDate(r,scratchDuration):addToDate(n,scratchDuration),s.push(i),r=i);return TimeIntervalCollection.fromJulianDateArray({julianDates:s,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var defaultScale=new Cartesian3(1,1,1),defaultTranslation=Cartesian3.ZERO,defaultRotation=Quaternion.IDENTITY;function TranslationRotationScale(e,t,i){this.translation=Cartesian3.clone(defaultValue(e,defaultTranslation)),this.rotation=Quaternion.clone(defaultValue(t,defaultRotation)),this.scale=Cartesian3.clone(defaultValue(i,defaultScale))}TranslationRotationScale.prototype.equals=function(e){return this===e||defined(e)&&Cartesian3.equals(this.translation,e.translation)&&Quaternion.equals(this.rotation,e.rotation)&&Cartesian3.equals(this.scale,e.scale)};var context2DsByWidthAndHeight={};function getImagePixels(e,t,i){defined(t)||(t=e.width),defined(i)||(i=e.height);var r=context2DsByWidthAndHeight[t];defined(r)||(r={},context2DsByWidthAndHeight[t]=r);var n,a=r[i];return defined(a)||((n=document.createElement("canvas")).width=t,n.height=i,(a=n.getContext("2d")).globalCompositeOperation="copy",r[i]=a),a.drawImage(e,0,0,t,i),a.getImageData(0,0,t,i).data}function DataRectangle(e,t){this.rectangle=e,this.maxLevel=t}function VRTheWorldTerrainProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=Resource.createIfNeeded(e.url);this._resource=t,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer(),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:16777215},"string"==typeof(t=e.credit)&&(t=new Credit(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[];var i,r=this,n=defaultValue(e.ellipsoid,Ellipsoid.WGS84);function a(e){var t=e.getElementsByTagName("SRS")[0].textContent;if("EPSG:4326"===t){r._tilingScheme=new GeographicTilingScheme({ellipsoid:n});var i=e.getElementsByTagName("TileFormat")[0];r._heightmapWidth=parseInt(i.getAttribute("width"),10),r._heightmapHeight=parseInt(i.getAttribute("height"),10),r._levelZeroMaximumGeometricError=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(n,Math.min(r._heightmapWidth,r._heightmapHeight),r._tilingScheme.getNumberOfXTilesAtLevel(0));for(var a=e.getElementsByTagName("DataExtent"),s=0;s<a.length;++s){var l=a[s],c=CesiumMath.toRadians(parseFloat(l.getAttribute("minx"))),u=CesiumMath.toRadians(parseFloat(l.getAttribute("miny"))),d=CesiumMath.toRadians(parseFloat(l.getAttribute("maxx"))),h=CesiumMath.toRadians(parseFloat(l.getAttribute("maxy")));l=parseInt(l.getAttribute("maxlevel"),10);r._rectangles.push(new DataRectangle(new Rectangle(c,u,d,h),l))}r._ready=!0,r._readyPromise.resolve(!0)}else o("SRS "+t+" is not supported.")}function o(e){e=defaultValue(e,"An error occurred while accessing "+r._resource.url+"."),i=TileProviderError.handleError(i,r,r._errorEvent,e,void 0,void 0,void 0,s)}function s(){when(r._resource.fetchXML(),a,o)}s()}Object.defineProperties(VRTheWorldTerrainProvider.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}}),VRTheWorldTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){var n=this._tilingScheme.getNumberOfYTilesAtLevel(i);if(defined(r=this._resource.getDerivedResource({url:i+"/"+e+"/"+(n-t-1)+".tif",queryParameters:{cesium:!0},request:r}).fetchImage({preferImageBitmap:!0}))){var a=this;return when(r).then((function(r){return new HeightmapTerrainData({buffer:getImagePixels(r),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:getChildMask(a,e,t,i),structure:a._terrainDataStructure})}))}},VRTheWorldTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var rectangleScratch$4=new Rectangle;function getChildMask(e,t,i,r){for(var n=e._tilingScheme,a=e._rectangles,o=n.tileXYToRectangle(t,i,r),s=0,l=0;l<a.length&&15!==s;++l){var c=a[l];c.maxLevel<=r||(c=c.rectangle,defined(Rectangle.intersection(c,o,rectangleScratch$4))&&(isTileInRectangle(n,c,2*t,2*i,r+1)&&(s|=4),isTileInRectangle(n,c,2*t+1,2*i,r+1)&&(s|=8),isTileInRectangle(n,c,2*t,2*i+1,r+1)&&(s|=1),isTileInRectangle(n,c,2*t+1,2*i+1,r+1)&&(s|=2)))}return s}function isTileInRectangle(e,t,i,r,n){return n=e.tileXYToRectangle(i,r,n),defined(Rectangle.intersection(n,t,rectangleScratch$4))}function VideoSynchronizer(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=defaultValue(e.epoch,Iso8601.MINIMUM_VALUE),this.tolerance=defaultValue(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}function createSeekFunction(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}VRTheWorldTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){},VRTheWorldTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){},Object.defineProperties(VideoSynchronizer.prototype,{clock:{get:function(){return this._clock},set:function(e){var t=this._clock;t!==e&&(defined(t)&&(this._clockSubscription(),this._clockSubscription=void 0),defined(e)&&(this._clockSubscription=e.onTick.addEventListener(VideoSynchronizer.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){var t=this._element;t!==e&&(defined(t)&&t.removeEventListener("seeked",this._seekFunction,!1),defined(e)&&(this._seeking=!1,this._seekFunction=createSeekFunction(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}}),VideoSynchronizer.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,destroyObject(this)},VideoSynchronizer.prototype.isDestroyed=function(){return!1},VideoSynchronizer.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate!==e.multiplier){var t=this._element;try{t.playbackRate=e.multiplier}catch(e){t.playbackRate=0}this._lastPlaybackRate=e.multiplier}},VideoSynchronizer.prototype._onTick=function(e){var t,i,r,n=this._element;!defined(n)||n.readyState<2||(i=n.paused,(r=e.shouldAnimate)===i&&(r?n.play():n.pause()),this._seeking||this._firstTickAfterSeek?this._firstTickAfterSeek=!1:(this._trySetPlaybackRate(e),t=e.currentTime,i=defaultValue(this.epoch,Iso8601.MINIMUM_VALUE),e=JulianDate.secondsDifference(t,i),t=n.duration,i=n.currentTime,e=n.loop?((e%=t)<0&&(e=t-e),e):t<e?t:e<0?0:e,r=r?defaultValue(this.tolerance,1):.001,Math.abs(e-i)>r&&(this._seeking=!0,n.currentTime=e)))};var WallGeometryLibrary={};function latLonEquals(e,t){return CesiumMath.equalsEpsilon(e.latitude,t.latitude,CesiumMath.EPSILON10)&&CesiumMath.equalsEpsilon(e.longitude,t.longitude,CesiumMath.EPSILON10)}var scratchCartographic1$2=new Cartographic,scratchCartographic2$1=new Cartographic;function removeDuplicates(e,t,i,r){var n=(t=arrayRemoveDuplicates(t,Cartesian3.equalsEpsilon)).length;if(!(n<2)){var a=defined(r),o=defined(i),s=new Array(n),l=new Array(n),c=new Array(n),u=t[0];s[0]=u;var d=e.cartesianToCartographic(u,scratchCartographic1$2);o&&(d.height=i[0]),l[0]=d.height,c[0]=a?r[0]:0;for(var h=l[0]===c[0],p=1,f=1;f<n;++f){var m=t[f],g=e.cartesianToCartographic(m,scratchCartographic2$1);o&&(g.height=i[f]),h=h&&0===g.height,latLonEquals(d,g)?d.height<g.height&&(l[p-1]=g.height):(s[p]=m,l[p]=g.height,c[p]=a?r[f]:0,h=h&&l[p]===c[p],Cartographic.clone(g,d),++p)}if(!(h||p<2))return s.length=p,l.length=p,c.length=p,{positions:s,topHeights:l,bottomHeights:c}}}var positionsArrayScratch=new Array(2),heightsArrayScratch=new Array(2),generateArcOptionsScratch$1={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};WallGeometryLibrary.computePositions=function(e,t,i,r,n,a){if(defined(c=removeDuplicates(e,t,i,r))){t=c.positions,i=c.topHeights,r=c.bottomHeights;var o,s,l=t.length,c=l-2,u=CesiumMath.chordLength(n,e.maximumRadius),d=generateArcOptionsScratch$1;if(d.minDistance=u,d.ellipsoid=e,a){for(var h=0,p=0;p<l-1;p++)h+=PolylinePipeline.numberOfPoints(t[p],t[p+1],u)+1;o=new Float64Array(3*h),s=new Float64Array(3*h);var f=positionsArrayScratch,m=heightsArrayScratch;d.positions=f,d.height=m;var g=0;for(p=0;p<l-1;p++){f[0]=t[p],f[1]=t[p+1],m[0]=i[p],m[1]=i[p+1];var y=PolylinePipeline.generateArc(d);o.set(y,g),m[0]=r[p],m[1]=r[p+1],s.set(PolylinePipeline.generateArc(d),g),g+=y.length}}else d.positions=t,d.height=i,o=new Float64Array(PolylinePipeline.generateArc(d)),d.height=r,s=new Float64Array(PolylinePipeline.generateArc(d));return{bottomPositions:s,topPositions:o,numCorners:c}}};var scratchCartesian3Position1=new Cartesian3,scratchCartesian3Position2=new Cartesian3,scratchCartesian3Position4=new Cartesian3,scratchCartesian3Position5=new Cartesian3,scratchBitangent$4=new Cartesian3,scratchTangent$4=new Cartesian3,scratchNormal$6=new Cartesian3;function WallGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.maximumHeights,r=e.minimumHeights,n=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),a=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE);e=defaultValue(e.ellipsoid,Ellipsoid.WGS84);this._positions=t,this._minimumHeights=r,this._maximumHeights=i,this._vertexFormat=VertexFormat.clone(n),this._granularity=a,this._ellipsoid=Ellipsoid.clone(e),this._workerName="createWallGeometry",t=1+t.length*Cartesian3.packedLength+2,defined(r)&&(t+=r.length),defined(i)&&(t+=i.length),this.packedLength=t+Ellipsoid.packedLength+VertexFormat.packedLength+1}WallGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._minimumHeights;a=defined(o)?o.length:0;if(t[i++]=a,defined(o))for(r=0;r<a;++r)t[i++]=o[r];var s=e._maximumHeights;if(a=defined(s)?s.length:0,t[i++]=a,defined(s))for(r=0;r<a;++r)t[i++]=s[r];return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),t[i+=VertexFormat.packedLength]=e._granularity,t};var scratchEllipsoid$c=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$c=new VertexFormat,scratchOptions$m={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:scratchEllipsoid$c,vertexFormat:scratchVertexFormat$c,granularity:void 0};WallGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r,n,a=e[t++],o=new Array(a),s=0;s<a;++s,t+=Cartesian3.packedLength)o[s]=Cartesian3.unpack(e,t);if(0<(a=e[t++]))for(r=new Array(a),s=0;s<a;++s)r[s]=e[t++];if(0<(a=e[t++]))for(n=new Array(a),s=0;s<a;++s)n[s]=e[t++];var l=Ellipsoid.unpack(e,t,scratchEllipsoid$c);t+=Ellipsoid.packedLength;var c=VertexFormat.unpack(e,t,scratchVertexFormat$c),u=e[t+=VertexFormat.packedLength];return defined(i)?(i._positions=o,i._minimumHeights=r,i._maximumHeights=n,i._ellipsoid=Ellipsoid.clone(l,i._ellipsoid),i._vertexFormat=VertexFormat.clone(c,i._vertexFormat),i._granularity=u,i):(scratchOptions$m.positions=o,scratchOptions$m.minimumHeights=r,scratchOptions$m.maximumHeights=n,scratchOptions$m.granularity=u,new WallGeometry(scratchOptions$m))},WallGeometry.fromConstantHeights=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.minimumHeight,r=e.maximumHeight,n=defined(i),a=defined(r);if(n||a)for(var o=t.length,s=n?new Array(o):void 0,l=a?new Array(o):void 0,c=0;c<o;++c)n&&(s[c]=i),a&&(l[c]=r);return new WallGeometry({positions:t,maximumHeights:l,minimumHeights:s,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},WallGeometry.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,r=e._maximumHeights,n=e._vertexFormat,a=e._granularity,o=e._ellipsoid;if(defined(r=WallGeometryLibrary.computePositions(o,t,r,i,a,!0))){for(var s=r.bottomPositions,l=r.topPositions,c=(i=r.numCorners,l.length),u=(a=2*c,n.position?new Float64Array(a):void 0),d=n.normal?new Float32Array(a):void 0,h=n.tangent?new Float32Array(a):void 0,p=n.bitangent?new Float32Array(a):void 0,f=n.st?new Float32Array(a/3*2):void 0,m=0,g=0,y=0,_=0,v=0,C=scratchNormal$6,x=scratchTangent$4,b=scratchBitangent$4,S=!0,T=0,E=1/((c/=3)-i-1),w=0;w<c;++w){var A,P=3*w,D=Cartesian3.fromArray(l,P,scratchCartesian3Position1),M=Cartesian3.fromArray(s,P,scratchCartesian3Position2);n.position&&(u[m++]=M.x,u[m++]=M.y,u[m++]=M.z,u[m++]=D.x,u[m++]=D.y,u[m++]=D.z),n.st&&(f[v++]=T,f[v++]=0,f[v++]=T,f[v++]=1),(n.normal||n.tangent||n.bitangent)&&(A=Cartesian3.clone(Cartesian3.ZERO,scratchCartesian3Position5),M=Cartesian3.subtract(D,o.geodeticSurfaceNormal(D,scratchCartesian3Position2),scratchCartesian3Position2),w+1<c&&(A=Cartesian3.fromArray(l,3+P,scratchCartesian3Position5)),S&&(P=Cartesian3.subtract(A,D,scratchCartesian3Position4),M=Cartesian3.subtract(M,D,scratchCartesian3Position1),C=Cartesian3.normalize(Cartesian3.cross(M,P,C),C),S=!1),Cartesian3.equalsEpsilon(D,A,CesiumMath.EPSILON10)?S=!0:(T+=E,n.tangent&&(x=Cartesian3.normalize(Cartesian3.subtract(A,D,x),x)),n.bitangent&&(b=Cartesian3.normalize(Cartesian3.cross(C,x,b),b))),n.normal&&(d[g++]=C.x,d[g++]=C.y,d[g++]=C.z,d[g++]=C.x,d[g++]=C.y,d[g++]=C.z),n.tangent&&(h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,h[_++]=x.x,h[_++]=x.y,h[_++]=x.z),n.bitangent&&(p[y++]=b.x,p[y++]=b.y,p[y++]=b.z,p[y++]=b.x,p[y++]=b.y,p[y++]=b.z))}r=new GeometryAttributes,n.position&&(r.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(r.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(r.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:h})),n.bitangent&&(r.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:p})),n.st&&(r.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:f}));var I=a/3;a-=6*(i+1);var R=IndexDatatype$1.createTypedArray(I,a),O=0;for(w=0;w<I-2;w+=2){var L=w,N=w+2,F=Cartesian3.fromArray(u,3*L,scratchCartesian3Position1),B=Cartesian3.fromArray(u,3*N,scratchCartesian3Position2);Cartesian3.equalsEpsilon(F,B,CesiumMath.EPSILON10)||(F=w+1,B=w+3,R[O++]=F,R[O++]=L,R[O++]=B,R[O++]=B,R[O++]=L,R[O++]=N)}return new Geometry({attributes:r,indices:R,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:new BoundingSphere.fromVertices(u)})}};var scratchCartesian3Position1$1=new Cartesian3,scratchCartesian3Position2$1=new Cartesian3;function WallOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.maximumHeights,r=e.minimumHeights,n=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE);e=defaultValue(e.ellipsoid,Ellipsoid.WGS84);this._positions=t,this._minimumHeights=r,this._maximumHeights=i,this._granularity=n,this._ellipsoid=Ellipsoid.clone(e),this._workerName="createWallOutlineGeometry",t=1+t.length*Cartesian3.packedLength+2,defined(r)&&(t+=r.length),defined(i)&&(t+=i.length),this.packedLength=t+Ellipsoid.packedLength+1}WallOutlineGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._minimumHeights;a=defined(o)?o.length:0;if(t[i++]=a,defined(o))for(r=0;r<a;++r)t[i++]=o[r];var s=e._maximumHeights;if(a=defined(s)?s.length:0,t[i++]=a,defined(s))for(r=0;r<a;++r)t[i++]=s[r];return Ellipsoid.pack(e._ellipsoid,t,i),t[i+=Ellipsoid.packedLength]=e._granularity,t};var scratchEllipsoid$d=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$n={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:scratchEllipsoid$d,granularity:void 0},implementation$1;function WeightSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).weights;e=e.times;this._times=e,this._weights=t,this._count=t.length/e.length,this._lastTimeIndex=0}function arraySlice(e,t,i){if("function"==typeof e.slice)return e.slice(t,i);for(var r=Array.prototype.slice.call(e,t,i),n=FeatureDetection.typedArrayTypes,a=n.length,o=0;o<a;++o)if(e instanceof n[o]){r=new n[o](r);break}return r}function cancelAnimationFramePolyfill(e){implementation$1(e)}function createGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function createWorldTerrain(e){return e=defaultValue(e,defaultValue.EMPTY_OBJECT),new CesiumTerrainProvider({url:IonResource.fromAssetId(1),requestVertexNormals:defaultValue(e.requestVertexNormals,!1),requestWaterMask:defaultValue(e.requestWaterMask,!1)})}WallOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r,n,a=e[t++],o=new Array(a),s=0;s<a;++s,t+=Cartesian3.packedLength)o[s]=Cartesian3.unpack(e,t);if(0<(a=e[t++]))for(r=new Array(a),s=0;s<a;++s)r[s]=e[t++];if(0<(a=e[t++]))for(n=new Array(a),s=0;s<a;++s)n[s]=e[t++];var l=Ellipsoid.unpack(e,t,scratchEllipsoid$d),c=e[t+=Ellipsoid.packedLength];return defined(i)?(i._positions=o,i._minimumHeights=r,i._maximumHeights=n,i._ellipsoid=Ellipsoid.clone(l,i._ellipsoid),i._granularity=c,i):(scratchOptions$n.positions=o,scratchOptions$n.minimumHeights=r,scratchOptions$n.maximumHeights=n,scratchOptions$n.granularity=c,new WallOutlineGeometry(scratchOptions$n))},WallOutlineGeometry.fromConstantHeights=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.minimumHeight,r=e.maximumHeight,n=defined(i),a=defined(r);if(n||a)for(var o=t.length,s=n?new Array(o):void 0,l=a?new Array(o):void 0,c=0;c<o;++c)n&&(s[c]=i),a&&(l[c]=r);return new WallOutlineGeometry({positions:t,maximumHeights:l,minimumHeights:s,ellipsoid:e.ellipsoid})},WallOutlineGeometry.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,r=e._maximumHeights,n=e._granularity;e=e._ellipsoid;if(defined(i=WallGeometryLibrary.computePositions(e,t,r,i,n,!1))){var a=i.bottomPositions,o=i.topPositions,s=o.length,l=(n=2*s,new Float64Array(n)),c=0;for(s/=3,m=0;m<s;++m){var u=3*m,d=Cartesian3.fromArray(o,u,scratchCartesian3Position1$1);u=Cartesian3.fromArray(a,u,scratchCartesian3Position2$1);l[c++]=u.x,l[c++]=u.y,l[c++]=u.z,l[c++]=d.x,l[c++]=d.y,l[c++]=d.z}i=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l})});for(var h=n/3,p=(n=2*h-4+h,IndexDatatype$1.createTypedArray(h,n)),f=0,m=0;m<h-2;m+=2){var g=m,y=m+2,_=Cartesian3.fromArray(l,3*g,scratchCartesian3Position1$1),v=Cartesian3.fromArray(l,3*y,scratchCartesian3Position2$1);Cartesian3.equalsEpsilon(_,v,CesiumMath.EPSILON10)||(_=m+1,v=m+3,p[f++]=_,p[f++]=g,p[f++]=_,p[f++]=v,p[f++]=g,p[f++]=y)}return p[f++]=h-2,p[f++]=h-1,new Geometry({attributes:i,indices:p,primitiveType:PrimitiveType$1.LINES,boundingSphere:new BoundingSphere.fromVertices(l)})}},Object.defineProperties(WeightSpline.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}}),WeightSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,WeightSpline.prototype.wrapTime=Spline.prototype.wrapTime,WeightSpline.prototype.clampTime=Spline.prototype.clampTime,WeightSpline.prototype.evaluate=function(e,t){var i=this.weights,r=this.times,n=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),a=(e-r[n])/(r[n+1]-r[n]);defined(t)||(t=new Array(this._count));for(var o=0;o<this._count;o++){var s=n*this._count+o;t[o]=i[s]*(1-a)+i[s+this._count]*a}return t},"undefined"!=typeof cancelAnimationFrame&&(implementation$1=cancelAnimationFrame),function(){if(!defined(implementation$1)&&"undefined"!=typeof window)for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!defined(implementation$1);)defined(implementation$1=window[e[t]+"CancelAnimationFrame"])||(implementation$1=window[e[t]+"CancelRequestAnimationFrame"]),++t;defined(implementation$1)||(implementation$1=clearTimeout)}();var compressedMagic=1953029805,compressedMagicSwap=2917034100;function decodeGoogleEarthEnterpriseData(e,t){if(decodeGoogleEarthEnterpriseData.passThroughDataForTesting)return t;var i=e.byteLength;if(0===i||i%4!=0)throw new RuntimeError("The length of key must be greater than 0 and a multiple of 4.");var r=new DataView(t),n=r.getUint32(0,!0);if(n===compressedMagic||n===compressedMagicSwap)return t;for(var a,o=new DataView(e),s=0,l=t.byteLength,c=l-l%8,u=i,d=8;s<c;)for(a=d=(d+8)%24;s<c&&a<u;)r.setUint32(s,r.getUint32(s,!0)^o.getUint32(a,!0),!0),r.setUint32(s+4,r.getUint32(s+4,!0)^o.getUint32(a+4,!0),!0),s+=8,a+=24;if(s<l)for(u<=a&&(a=d=(d+8)%24);s<l;)r.setUint8(s,r.getUint8(s)^o.getUint8(a)),s++,a++}function deprecationWarning(e,t){oneTimeWarning(e,t)}function getFilenameFromUri(e){var t=new URI(e);return t.normalize(),-1!==(t=(e=t.path).lastIndexOf("/"))&&(e=e.substr(t+1)),e}function getMagic(e,t){return getStringFromTypedArray(e,t=defaultValue(t,0),Math.min(4,e.length))}decodeGoogleEarthEnterpriseData.passThroughDataForTesting=!1;var transcodeTaskProcessor=new TaskProcessor("transcodeCRNToDXT",Number.POSITIVE_INFINITY);function loadCRN(e){if(defined(e=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?when.resolve(e):Resource.createIfNeeded(e).fetchArrayBuffer()))return e.then((function(e){if(defined(e)){var t=[];return e instanceof ArrayBuffer?t.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),t.push(e.buffer)),transcodeTaskProcessor.scheduleTask(e,t)}})).then((function(e){return CompressedTextureBuffer.clone(e)}))}function loadImageFromTypedArray(e){var t,i=e.uint8Array,r=e.format,n=e.request,a=defaultValue(e.flipY,!1),o=new Blob([i],{type:r});return Resource.supportsImageBitmapOptions().then((function(e){return e?when(Resource.createImageBitmapFromBlob(o,{flipY:a,premultiplyAlpha:!1})):new Resource({url:t=window.URL.createObjectURL(o),request:n}).fetchImage({flipY:a})})).then((function(e){return defined(t)&&window.URL.revokeObjectURL(t),e})).otherwise((function(e){return defined(t)&&window.URL.revokeObjectURL(t),when.reject(e)}))}function loadKTX(e){if(defined(e=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?when.resolve(e):Resource.createIfNeeded(e).fetchArrayBuffer()))return e.then((function(e){if(defined(e))return parseKTX(e)}))}var fileIdentifier=[171,75,84,88,32,49,49,187,13,10,26,10],endiannessTest=67305985,faceOrder=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],sizeOfUint32$1=4;function parseKTX(e){for(var t,i=new Uint8Array(e),r=!0,n=0;n<fileIdentifier.length;++n)if(fileIdentifier[n]!==i[n]){r=!1;break}if(!r)throw new RuntimeError("Invalid KTX file.");t=defined(e.buffer)?(_=new DataView(e.buffer),e.byteOffset):(_=new DataView(e),0),t+=12;var a=_.getUint32(t,!0);if(t+=sizeOfUint32$1,a!==endiannessTest)throw new RuntimeError("File is the wrong endianness.");var o=_.getUint32(t,!0);t+=sizeOfUint32$1;var s=_.getUint32(t,!0);t+=sizeOfUint32$1;var l=_.getUint32(t,!0);t+=sizeOfUint32$1;var c=_.getUint32(t,!0);t+=sizeOfUint32$1;var u=_.getUint32(t,!0);t+=sizeOfUint32$1;var d=_.getUint32(t,!0);t+=sizeOfUint32$1;var h=_.getUint32(t,!0);t+=sizeOfUint32$1;var p=_.getUint32(t,!0);t+=sizeOfUint32$1;var f=_.getUint32(t,!0);t+=sizeOfUint32$1;var m=_.getUint32(t,!0);t+=sizeOfUint32$1;var g=_.getUint32(t,!0);t+=sizeOfUint32$1,a=_.getUint32(t,!0),t+=sizeOfUint32$1,t+=a;var y,_=_.getUint32(t,!0);if(t+=sizeOfUint32$1,y=defined(e.buffer)?new Uint8Array(e.buffer,t,_):new Uint8Array(e,t,_),c===WebGLConstants$1.RGB8?c=PixelFormat$1.RGB:c===WebGLConstants$1.RGBA8&&(c=PixelFormat$1.RGBA),!PixelFormat$1.validate(c))throw new RuntimeError("glInternalFormat is not a valid format.");if(PixelFormat$1.isCompressedFormat(c)){if(0!==o)throw new RuntimeError("glType must be zero when the texture is compressed.");if(1!==s)throw new RuntimeError("The type size for compressed textures must be 1.");if(0!==l)throw new RuntimeError("glFormat must be zero when the texture is compressed.")}else{if(o!==WebGLConstants$1.UNSIGNED_BYTE)throw new RuntimeError("Only unsigned byte buffers are supported.");if(u!==l)throw new RuntimeError("The base internal format must be the same as the format for uncompressed textures.")}if(0!==p)throw new RuntimeError("3D textures are unsupported.");if(0!==f)throw new RuntimeError("Texture arrays are unsupported.");var v=y.byteOffset,C=new Array(g);for(n=0;n<g;++n){for(var x=C[n]={},b=0;b<m;++b){var S=d>>n,T=h>>n,E=PixelFormat$1.isCompressedFormat(c)?PixelFormat$1.compressedTextureSizeInBytes(c,S,T):PixelFormat$1.textureSizeInBytes(c,o,S,T),w=new Uint8Array(y.buffer,v,E);x[faceOrder[b]]=new CompressedTextureBuffer(c,S,T,w),v+=E}v+=3-(v+3)%4+4}var A=C;if(1===m)for(n=0;n<g;++n)A[n]=A[n][faceOrder[0]];return 1===g&&(A=A[0]),A}var leftScratchArray=[],rightScratchArray=[];function merge(e,t,i,r,n,a){for(var o,s=n-r+1,l=a-n,c=leftScratchArray,u=rightScratchArray,d=0;d<s;++d)c[d]=e[r+d];for(o=0;o<l;++o)u[o]=e[n+o+1];o=d=0;for(var h=r;h<=a;++h){var p=c[d],f=u[o];d<s&&(l<=o||t(p,f,i)<=0)?(e[h]=p,++d):o<l&&(e[h]=f,++o)}}function sort(e,t,i,r,n){var a;n<=r||(sort(e,t,i,r,a=Math.floor(.5*(r+n))),sort(e,t,i,a+1,n),merge(e,t,i,r,a,n))}function mergeSort(e,t,i){var r=e.length,n=Math.ceil(.5*r);leftScratchArray.length=n,rightScratchArray.length=n,sort(e,t,i,0,r-1),leftScratchArray.length=0,rightScratchArray.length=0}var coords=new Cartesian3,implementation$2;function pointInsideTriangle(e,t,i,r){return barycentricCoordinates(e,t,i,r,coords),0<coords.x&&0<coords.y&&0<coords.z}function requestAnimationFramePolyFill(e){return implementation$2(e)}function sampleTerrain(e,t,i){return e.readyPromise.then((function(){return doSampling(e,t,i)}))}function doSampling(e,t,i){for(var r=e.tilingScheme,n=[],a={},o=0;o<i.length;++o){var s=r.positionToTileXY(i[o],t),l=s.toString();a.hasOwnProperty(l)||(s={x:s.x,y:s.y,level:t,tilingScheme:r,terrainProvider:e,positions:[]},a[l]=s,n.push(s)),a[l].positions.push(i[o])}var c=[];for(o=0;o<n.length;++o){var u=(u=n[o]).terrainProvider.requestTileGeometry(u.x,u.y,u.level).then(createInterpolateFunction(u)).otherwise(createMarkFailedFunction(u));c.push(u)}return when.all(c,(function(){return i}))}function createInterpolateFunction(e){var t=e.positions,i=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(e){for(var r=0;r<t.length;++r){var n=t[r];n.height=e.interpolateHeight(i,n.longitude,n.latitude)}}}function createMarkFailedFunction(e){var t=e.positions;return function(){for(var e=0;e<t.length;++e)t[e].height=void 0}}"undefined"!=typeof requestAnimationFrame&&(implementation$2=requestAnimationFrame),function(){if(!defined(implementation$2)&&"undefined"!=typeof window)for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!defined(implementation$2);)implementation$2=window[e[t]+"RequestAnimationFrame"],++t;var r;defined(implementation$2)||(r=0,implementation$2=function(e){var t=getTimestamp$1(),i=Math.max(1e3/60-(t-r),0);return r=t+i,setTimeout((function(){e(r)}),i)})}();var scratchCartesian2$7=new Cartesian2;function sampleTerrainMostDetailed(e,t){return e.readyPromise.then((function(){for(var i=[],r=[],n=e.availability,a=[],o=0;o<t.length;++o){var s=t[o],l=n.computeMaximumLevelAtPosition(s);0===(r[o]=l)&&(e.tilingScheme.positionToTileXY(s,1,scratchCartesian2$7),defined(c=e.loadTileDataAvailability(scratchCartesian2$7.x,scratchCartesian2$7.y,1))&&a.push(c));var c=i[l];defined(c)||(i[l]=c=[]),c.push(s)}return when.all(a).then((function(){return when.all(i.map((function(t,i){if(defined(t))return sampleTerrain(e,i,t)})))})).then((function(){for(var i=[],a=0;a<t.length;++a){var o=t[a];n.computeMaximumLevelAtPosition(o)!==r[a]&&i.push(o)}if(0<i.length)return sampleTerrainMostDetailed(e,i)})).then((function(){return t}))}))}function subdivideArray(e,t){for(var i=[],r=e.length,n=0;n<r;){var a=Math.ceil((r-n)/t--);i.push(e.slice(n,n+a)),n+=a}return i}function webGLConstantToGlslType(e){switch(e){case WebGLConstants$1.FLOAT:return"float";case WebGLConstants$1.FLOAT_VEC2:return"vec2";case WebGLConstants$1.FLOAT_VEC3:return"vec3";case WebGLConstants$1.FLOAT_VEC4:return"vec4";case WebGLConstants$1.FLOAT_MAT2:return"mat2";case WebGLConstants$1.FLOAT_MAT3:return"mat3";case WebGLConstants$1.FLOAT_MAT4:return"mat4";case WebGLConstants$1.SAMPLER_2D:return"sampler2D";case WebGLConstants$1.BOOL:return"bool"}}function wrapFunction(e,t,i){return function(){i.apply(e,arguments),t.apply(e,arguments)}}function ConstantProperty(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new Event,this.setValue(e)}function createProperty(e,t,i,r,n){return{configurable:r,get:function(){return this[t]},set:function(r){var a=this[t],o=this[i];defined(o)&&(o(),this[i]=void 0),!(void 0!==r)||defined(r)&&defined(r.getValue)||!defined(n)||(r=n(r)),a!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,a)),defined(r)&&defined(r.definitionChanged)&&(this[i]=r.definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this,e,r,r)}),this))}}}function createConstantProperty(e){return new ConstantProperty(e)}function createPropertyDescriptor(e,t,i){return createProperty(e,"_"+e.toString(),"_"+e.toString()+"Subscription",defaultValue(t,!1),defaultValue(i,createConstantProperty))}function BillboardGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}Object.defineProperties(ConstantProperty.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),ConstantProperty.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},ConstantProperty.prototype.setValue=function(e){var t,i,r=this._value;r!==e&&(t=(i=defined(e))&&"function"==typeof e.clone,(i=i&&"function"==typeof e.equals)&&e.equals(r)||(this._hasClone=t,this._hasEquals=i,this._value=t?e.clone(this._value):e,this._definitionChanged.raiseEvent(this)))},ConstantProperty.prototype.equals=function(e){return this===e||e instanceof ConstantProperty&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},ConstantProperty.prototype.valueOf=function(){return this._value},ConstantProperty.prototype.toString=function(){return String(this._value)},Object.defineProperties(BillboardGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),image:createPropertyDescriptor("image"),scale:createPropertyDescriptor("scale"),pixelOffset:createPropertyDescriptor("pixelOffset"),eyeOffset:createPropertyDescriptor("eyeOffset"),horizontalOrigin:createPropertyDescriptor("horizontalOrigin"),verticalOrigin:createPropertyDescriptor("verticalOrigin"),heightReference:createPropertyDescriptor("heightReference"),color:createPropertyDescriptor("color"),rotation:createPropertyDescriptor("rotation"),alignedAxis:createPropertyDescriptor("alignedAxis"),sizeInMeters:createPropertyDescriptor("sizeInMeters"),width:createPropertyDescriptor("width"),height:createPropertyDescriptor("height"),scaleByDistance:createPropertyDescriptor("scaleByDistance"),translucencyByDistance:createPropertyDescriptor("translucencyByDistance"),pixelOffsetScaleByDistance:createPropertyDescriptor("pixelOffsetScaleByDistance"),imageSubRegion:createPropertyDescriptor("imageSubRegion"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),disableDepthTestDistance:createPropertyDescriptor("disableDepthTestDistance")}),BillboardGraphics.prototype.clone=function(e){return defined(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new BillboardGraphics(this)},BillboardGraphics.prototype.merge=function(e){this.show=defaultValue(this._show,e.show),this.image=defaultValue(this._image,e.image),this.scale=defaultValue(this._scale,e.scale),this.pixelOffset=defaultValue(this._pixelOffset,e.pixelOffset),this.eyeOffset=defaultValue(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=defaultValue(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=defaultValue(this._verticalOrigin,e.verticalOrigin),this.heightReference=defaultValue(this._heightReference,e.heightReference),this.color=defaultValue(this._color,e.color),this.rotation=defaultValue(this._rotation,e.rotation),this.alignedAxis=defaultValue(this._alignedAxis,e.alignedAxis),this.sizeInMeters=defaultValue(this._sizeInMeters,e.sizeInMeters),this.width=defaultValue(this._width,e.width),this.height=defaultValue(this._height,e.height),this.scaleByDistance=defaultValue(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=defaultValue(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=defaultValue(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=defaultValue(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=defaultValue(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=defaultValue(this._disableDepthTestDistance,e.disableDepthTestDistance)};var HeightReference={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2},HeightReference$1=Object.freeze(HeightReference),HorizontalOrigin={CENTER:0,LEFT:1,RIGHT:-1},HorizontalOrigin$1=Object.freeze(HorizontalOrigin),VerticalOrigin={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},VerticalOrigin$1=Object.freeze(VerticalOrigin),BoundingSphereState={DONE:0,PENDING:1,FAILED:2},BoundingSphereState$1=Object.freeze(BoundingSphereState);function Property(){DeveloperError.throwInstantiationError()}Object.defineProperties(Property.prototype,{isConstant:{get:DeveloperError.throwInstantiationError},definitionChanged:{get:DeveloperError.throwInstantiationError}}),Property.prototype.getValue=DeveloperError.throwInstantiationError,Property.prototype.equals=DeveloperError.throwInstantiationError,Property.equals=function(e,t){return e===t||defined(e)&&e.equals(t)},Property.arrayEquals=function(e,t){if(e===t)return!0;if(!defined(e)||!defined(t)||e.length!==t.length)return!1;for(var i=e.length,r=0;r<i;r++)if(!Property.equals(e[r],t[r]))return!1;return!0},Property.isConstant=function(e){return!defined(e)||e.isConstant},Property.getValueOrUndefined=function(e,t,i){return defined(e)?e.getValue(t,i):void 0},Property.getValueOrDefault=function(e,t,i,r){return defined(e)?defaultValue(e.getValue(t,r),i):i},Property.getValueOrClonedDefault=function(e,t,i,r){var n;return defined(e)&&(n=e.getValue(t,r)),defined(n)||(n=i.clone(n)),n};var defaultColor=Color.WHITE,defaultEyeOffset=Cartesian3.ZERO,defaultHeightReference=HeightReference$1.NONE,defaultPixelOffset=Cartesian2.ZERO,defaultScale$1=1,defaultRotation$1=0,defaultAlignedAxis=Cartesian3.ZERO,defaultHorizontalOrigin=HorizontalOrigin$1.CENTER,defaultVerticalOrigin=VerticalOrigin$1.CENTER,defaultSizeInMeters=!1,positionScratch$4=new Cartesian3,colorScratch$1=new Color,eyeOffsetScratch=new Cartesian3,pixelOffsetScratch=new Cartesian2,scaleByDistanceScratch=new NearFarScalar,translucencyByDistanceScratch=new NearFarScalar,pixelOffsetScaleByDistanceScratch=new NearFarScalar,boundingRectangleScratch=new BoundingRectangle,distanceDisplayConditionScratch=new DistanceDisplayCondition;function EntityData(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function BillboardVisualizer(e,t){t.collectionChanged.addEventListener(BillboardVisualizer.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function returnPrimitive(e,t,i){defined(e)&&(e.billboard=void 0,i.removeBillboard(t))}BillboardVisualizer.prototype.update=function(e){for(var t=this._items.values,i=this._cluster,r=0,n=t.length;r<n;r++){var a,o,s=t[r],l=s.entity,c=l._billboard,u=s.billboard,d=l.isShowing&&l.isAvailable(e)&&Property.getValueOrDefault(c._show,e,!0);d&&(o=Property.getValueOrUndefined(l._position,e,positionScratch$4),a=Property.getValueOrUndefined(c._image,e),d=defined(o)&&defined(a)),d?(Property.isConstant(l._position)||(i._clusterDirty=!0),defined(u)||((u=i.getBillboard(l)).id=l,u.image=void 0,s.billboard=u),u.show=d,defined(u.image)&&s.textureValue===a||(u.image=a,s.textureValue=a),u.position=o,u.color=Property.getValueOrDefault(c._color,e,defaultColor,colorScratch$1),u.eyeOffset=Property.getValueOrDefault(c._eyeOffset,e,defaultEyeOffset,eyeOffsetScratch),u.heightReference=Property.getValueOrDefault(c._heightReference,e,defaultHeightReference),u.pixelOffset=Property.getValueOrDefault(c._pixelOffset,e,defaultPixelOffset,pixelOffsetScratch),u.scale=Property.getValueOrDefault(c._scale,e,defaultScale$1),u.rotation=Property.getValueOrDefault(c._rotation,e,defaultRotation$1),u.alignedAxis=Property.getValueOrDefault(c._alignedAxis,e,defaultAlignedAxis),u.horizontalOrigin=Property.getValueOrDefault(c._horizontalOrigin,e,defaultHorizontalOrigin),u.verticalOrigin=Property.getValueOrDefault(c._verticalOrigin,e,defaultVerticalOrigin),u.width=Property.getValueOrUndefined(c._width,e),u.height=Property.getValueOrUndefined(c._height,e),u.scaleByDistance=Property.getValueOrUndefined(c._scaleByDistance,e,scaleByDistanceScratch),u.translucencyByDistance=Property.getValueOrUndefined(c._translucencyByDistance,e,translucencyByDistanceScratch),u.pixelOffsetScaleByDistance=Property.getValueOrUndefined(c._pixelOffsetScaleByDistance,e,pixelOffsetScaleByDistanceScratch),u.sizeInMeters=Property.getValueOrDefault(c._sizeInMeters,e,defaultSizeInMeters),u.distanceDisplayCondition=Property.getValueOrUndefined(c._distanceDisplayCondition,e,distanceDisplayConditionScratch),u.disableDepthTestDistance=Property.getValueOrUndefined(c._disableDepthTestDistance,e),defined(c=Property.getValueOrUndefined(c._imageSubRegion,e,boundingRectangleScratch))&&u.setImageSubRegion(u._imageId,c)):returnPrimitive(s,l,i)}return!0},BillboardVisualizer.prototype.getBoundingSphere=function(e,t){if(!defined(e=this._items.get(e.id))||!defined(e.billboard))return BoundingSphereState$1.FAILED;if((e=e.billboard).heightReference===HeightReference$1.NONE)t.center=Cartesian3.clone(e.position,t.center);else{if(!defined(e._clampedPosition))return BoundingSphereState$1.PENDING;t.center=Cartesian3.clone(e._clampedPosition,t.center)}return t.radius=0,BoundingSphereState$1.DONE},BillboardVisualizer.prototype.isDestroyed=function(){return!1},BillboardVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(BillboardVisualizer.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return destroyObject(this)},BillboardVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._items,o=this._cluster,s=t.length-1;-1<s;s--)defined((n=t[s])._billboard)&&defined(n._position)&&a.set(n.id,new EntityData(n));for(s=r.length-1;-1<s;s--)defined((n=r[s])._billboard)&&defined(n._position)?a.contains(n.id)||a.set(n.id,new EntityData(n)):(returnPrimitive(a.get(n.id),n,o),a.remove(n.id));for(s=i.length-1;-1<s;s--)n=i[s],returnPrimitive(a.get(n.id),n,o),a.remove(n.id)};var AllMaterialAppearanceFS="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nmat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = tangentToEyeMatrix;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",AllMaterialAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 bitangent;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_tangentEC = czm_normal * tangent;\nv_bitangentEC = czm_normal * bitangent;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",BasicMaterialAppearanceFS="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",BasicMaterialAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",TexturedMaterialAppearanceFS="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",TexturedMaterialAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",BlendEquation={ADD:WebGLConstants$1.FUNC_ADD,SUBTRACT:WebGLConstants$1.FUNC_SUBTRACT,REVERSE_SUBTRACT:WebGLConstants$1.FUNC_REVERSE_SUBTRACT,MIN:WebGLConstants$1.MIN,MAX:WebGLConstants$1.MAX},BlendEquation$1=Object.freeze(BlendEquation),BlendFunction={ZERO:WebGLConstants$1.ZERO,ONE:WebGLConstants$1.ONE,SOURCE_COLOR:WebGLConstants$1.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:WebGLConstants$1.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:WebGLConstants$1.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:WebGLConstants$1.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:WebGLConstants$1.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:WebGLConstants$1.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:WebGLConstants$1.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:WebGLConstants$1.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:WebGLConstants$1.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:WebGLConstants$1.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:WebGLConstants$1.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:WebGLConstants$1.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:WebGLConstants$1.SRC_ALPHA_SATURATE},BlendFunction$1=Object.freeze(BlendFunction),BlendingState={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.SOURCE_ALPHA,functionSourceAlpha:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.ONE,functionSourceAlpha:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.SOURCE_ALPHA,functionSourceAlpha:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE,functionDestinationAlpha:BlendFunction$1.ONE})},BlendingState$1=Object.freeze(BlendingState),CullFace={FRONT:WebGLConstants$1.FRONT,BACK:WebGLConstants$1.BACK,FRONT_AND_BACK:WebGLConstants$1.FRONT_AND_BACK},CullFace$1=Object.freeze(CullFace);function Appearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.material=e.material,this.translucent=defaultValue(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=defaultValue(e.closed,!1)}Object.defineProperties(Appearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}}),Appearance.prototype.getFragmentShaderSource=function(){var e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),defined(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join("\n")},Appearance.prototype.isTranslucent=function(){return defined(this.material)&&this.material.isTranslucent()||!defined(this.material)&&this.translucent},Appearance.prototype.getRenderState=function(){var e=this.isTranslucent(),t=clone(this.renderState,!1);return e?(t.depthMask=!1,t.blending=BlendingState$1.ALPHA_BLEND):t.depthMask=!0,t},Appearance.getDefaultRenderState=function(e,t,i){var r={depthTest:{enabled:!0}};return e&&(r.depthMask=!1,r.blending=BlendingState$1.ALPHA_BLEND),t&&(r.cull={enabled:!0,face:CullFace$1.BACK}),defined(i)&&(r=combine(i,r,!0)),r};var ContextLimits={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1};function CubeMapFace(e,t,i,r,n,a,o,s,l,c,u){this._context=e,this._texture=t,this._textureTarget=i,this._targetFace=r,this._pixelDatatype=o,this._internalFormat=n,this._pixelFormat=a,this._size=s,this._preMultiplyAlpha=l,this._flipY=c,this._initialized=u}Object.defineProperties(ContextLimits,{maximumCombinedTextureImageUnits:{get:function(){return ContextLimits._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return ContextLimits._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return ContextLimits._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return ContextLimits._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return ContextLimits._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return ContextLimits._maximumTextureSize}},maximumVaryingVectors:{get:function(){return ContextLimits._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return ContextLimits._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return ContextLimits._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return ContextLimits._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return ContextLimits._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return ContextLimits._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return ContextLimits._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return ContextLimits._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return ContextLimits._maximumViewportWidth}},maximumViewportHeight:{get:function(){return ContextLimits._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return ContextLimits._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return ContextLimits._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return ContextLimits._maximumColorAttachments}},highpFloatSupported:{get:function(){return ContextLimits._highpFloatSupported}},highpIntSupported:{get:function(){return ContextLimits._highpIntSupported}}}),Object.defineProperties(CubeMapFace.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),CubeMapFace.prototype.copyFrom=function(e,t,i){t=defaultValue(t,0),i=defaultValue(i,0);var r=this._context._gl,n=this._textureTarget,a=this._targetFace;r.activeTexture(r.TEXTURE0),r.bindTexture(n,this._texture);var o=e.width,s=e.height,l=e.arrayBufferView,c=this._size,u=this._pixelFormat,d=this._internalFormat,h=this._pixelDatatype,p=this._preMultiplyAlpha,f=this._flipY,m=4;defined(l)&&(m=PixelFormat$1.alignmentInBytes(u,h,o)),r.pixelStorei(r.UNPACK_ALIGNMENT,m);var g=!1;this._initialized||(0===t&&0===i&&o===c&&s===c?(defined(l)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),f&&(l=PixelFormat$1.flipY(l,u,h,c,c)),r.texImage2D(a,0,d,c,c,0,u,PixelDatatype$1.toWebGLConstant(h,this._context),l)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,f),r.texImage2D(a,0,d,u,PixelDatatype$1.toWebGLConstant(h,this._context),e)),g=!0):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),m=PixelFormat$1.createTypedArray(u,h,c,c),r.texImage2D(a,0,d,c,c,0,u,PixelDatatype$1.toWebGLConstant(h,this._context),m)),this._initialized=!0),g||(defined(l)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),f&&(l=PixelFormat$1.flipY(l,u,h,o,s)),r.texSubImage2D(a,0,t,i,o,s,u,PixelDatatype$1.toWebGLConstant(h,this._context),l)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,f),r.texSubImage2D(a,0,t,i,u,PixelDatatype$1.toWebGLConstant(h,this._context),e))),r.bindTexture(n,null)},CubeMapFace.prototype.copyFromFramebuffer=function(e,t,i,r,n,a){e=defaultValue(e,0),t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,0),n=defaultValue(n,this._size),a=defaultValue(a,this._size);var o=this._context._gl,s=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(s,this._texture),o.copyTexSubImage2D(this._targetFace,0,e,t,i,r,n,a),o.bindTexture(s,null),this._initialized=!0};var MipmapHint={DONT_CARE:WebGLConstants$1.DONT_CARE,FASTEST:WebGLConstants$1.FASTEST,NICEST:WebGLConstants$1.NICEST,validate:function(e){return e===MipmapHint.DONT_CARE||e===MipmapHint.FASTEST||e===MipmapHint.NICEST}},MipmapHint$1=Object.freeze(MipmapHint),TextureMagnificationFilter={NEAREST:WebGLConstants$1.NEAREST,LINEAR:WebGLConstants$1.LINEAR,validate:function(e){return e===TextureMagnificationFilter.NEAREST||e===TextureMagnificationFilter.LINEAR}},TextureMagnificationFilter$1=Object.freeze(TextureMagnificationFilter),TextureMinificationFilter={NEAREST:WebGLConstants$1.NEAREST,LINEAR:WebGLConstants$1.LINEAR,NEAREST_MIPMAP_NEAREST:WebGLConstants$1.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:WebGLConstants$1.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:WebGLConstants$1.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:WebGLConstants$1.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===TextureMinificationFilter.NEAREST||e===TextureMinificationFilter.LINEAR||e===TextureMinificationFilter.NEAREST_MIPMAP_NEAREST||e===TextureMinificationFilter.LINEAR_MIPMAP_NEAREST||e===TextureMinificationFilter.NEAREST_MIPMAP_LINEAR||e===TextureMinificationFilter.LINEAR_MIPMAP_LINEAR}},TextureMinificationFilter$1=Object.freeze(TextureMinificationFilter),TextureWrap={CLAMP_TO_EDGE:WebGLConstants$1.CLAMP_TO_EDGE,REPEAT:WebGLConstants$1.REPEAT,MIRRORED_REPEAT:WebGLConstants$1.MIRRORED_REPEAT,validate:function(e){return e===TextureWrap.CLAMP_TO_EDGE||e===TextureWrap.REPEAT||e===TextureWrap.MIRRORED_REPEAT}},TextureWrap$1=Object.freeze(TextureWrap);function Sampler(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.wrapS,TextureWrap$1.CLAMP_TO_EDGE),i=defaultValue(e.wrapT,TextureWrap$1.CLAMP_TO_EDGE),r=defaultValue(e.minificationFilter,TextureMinificationFilter$1.LINEAR),n=defaultValue(e.magnificationFilter,TextureMagnificationFilter$1.LINEAR);e=defined(e.maximumAnisotropy)?e.maximumAnisotropy:1;this._wrapS=t,this._wrapT=i,this._minificationFilter=r,this._magnificationFilter=n,this._maximumAnisotropy=e}function CubeMap(e){var t,i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,r=e.source;defined(r)?(p=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ],t=p[0].width,p[0].height):(t=e.width,e.height);var n=t,a=defaultValue(e.pixelDatatype,PixelDatatype$1.UNSIGNED_BYTE),o=defaultValue(e.pixelFormat,PixelFormat$1.RGBA),s=PixelFormat$1.toInternalFormat(o,a,i),l=6*PixelFormat$1.textureSizeInBytes(o,a,n,n),c=e.preMultiplyAlpha||o===PixelFormat$1.RGB||o===PixelFormat$1.LUMINANCE,u=defaultValue(e.flipY,!0),d=i._gl,h=d.TEXTURE_CUBE_MAP,p=d.createTexture();function f(e,r,l,c){var u=r.arrayBufferView;defined(u)||(u=r.bufferView);var h=4;defined(u)&&(h=PixelFormat$1.alignmentInBytes(o,a,t)),d.pixelStorei(d.UNPACK_ALIGNMENT,h),defined(u)?(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1),c&&(u=PixelFormat$1.flipY(u,o,a,n,n)),d.texImage2D(e,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),u)):(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,c),d.texImage2D(e,0,s,o,PixelDatatype$1.toWebGLConstant(a,i),r))}d.activeTexture(d.TEXTURE0),d.bindTexture(h,p),defined(r)?(f(d.TEXTURE_CUBE_MAP_POSITIVE_X,r.positiveX,c,u),f(d.TEXTURE_CUBE_MAP_NEGATIVE_X,r.negativeX,c,u),f(d.TEXTURE_CUBE_MAP_POSITIVE_Y,r.positiveY,c,u),f(d.TEXTURE_CUBE_MAP_NEGATIVE_Y,r.negativeY,c,u),f(d.TEXTURE_CUBE_MAP_POSITIVE_Z,r.positiveZ,c,u),f(d.TEXTURE_CUBE_MAP_NEGATIVE_Z,r.negativeZ,c,u)):(d.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_NEGATIVE_X,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_Y,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_Z,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null)),d.bindTexture(h,null),this._context=i,this._textureFilterAnisotropic=i._textureFilterAnisotropic,this._textureTarget=h,this._texture=p,this._pixelFormat=o,this._pixelDatatype=a,this._size=n,this._hasMipmap=!1,this._sizeInBytes=l,this._preMultiplyAlpha=c,this._flipY=u,this._sampler=void 0,r=defined(r),this._positiveX=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_POSITIVE_X,s,o,a,n,c,u,r),this._negativeX=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_NEGATIVE_X,s,o,a,n,c,u,r),this._positiveY=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_POSITIVE_Y,s,o,a,n,c,u,r),this._negativeY=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_NEGATIVE_Y,s,o,a,n,c,u,r),this._positiveZ=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_POSITIVE_Z,s,o,a,n,c,u,r),this._negativeZ=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_NEGATIVE_Z,s,o,a,n,c,u,r),this.sampler=defined(e.sampler)?e.sampler:new Sampler}function Texture(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,i=e.width,r=e.height,n=e.source;defined(n)&&(defined(i)||(i=defaultValue(n.videoWidth,n.width)),defined(r)||(r=defaultValue(n.videoHeight,n.height)));var a=defaultValue(e.pixelFormat,PixelFormat$1.RGBA),o=defaultValue(e.pixelDatatype,PixelDatatype$1.UNSIGNED_BYTE),s=PixelFormat$1.toInternalFormat(a,o,t),l=PixelFormat$1.isCompressedFormat(s),c=e.preMultiplyAlpha||a===PixelFormat$1.RGB||a===PixelFormat$1.LUMINANCE,u=defaultValue(e.flipY,!0),d=!0,h=t._gl,p=h.TEXTURE_2D,f=h.createTexture();h.activeTexture(h.TEXTURE0),h.bindTexture(p,f);var m=4;if(defined(n)&&defined(n.arrayBufferView)&&!l&&(m=PixelFormat$1.alignmentInBytes(a,o,i)),h.pixelStorei(h.UNPACK_ALIGNMENT,m),defined(n))if(defined(n.arrayBufferView)){if(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1),m=n.arrayBufferView,l)h.compressedTexImage2D(p,0,s,i,r,0,m);else if(u&&(m=PixelFormat$1.flipY(m,a,o,i,r)),h.texImage2D(p,0,s,i,r,0,a,PixelDatatype$1.toWebGLConstant(o,t),m),defined(n.mipLevels))for(var g=i,y=r,_=0;_<n.mipLevels.length;++_)(g=0|Math.floor(g/2))<1&&(g=1),(y=0|Math.floor(y/2))<1&&(y=1),h.texImage2D(p,_+1,s,g,y,0,a,PixelDatatype$1.toWebGLConstant(o,t),n.mipLevels[_])}else defined(n.framebuffer)?(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1),n.framebuffer!==t.defaultFramebuffer&&n.framebuffer._bind(),h.copyTexImage2D(p,0,s,n.xOffset,n.yOffset,i,r,0),n.framebuffer!==t.defaultFramebuffer&&n.framebuffer._unBind()):(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,c),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,u),h.texImage2D(p,0,s,a,PixelDatatype$1.toWebGLConstant(o,t),n));else h.texImage2D(p,0,s,i,r,0,a,PixelDatatype$1.toWebGLConstant(o,t),null),d=!1;h.bindTexture(p,null),l=l?PixelFormat$1.compressedTextureSizeInBytes(a,i,r):PixelFormat$1.textureSizeInBytes(a,o,i,r),this._id=createGuid(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=f,this._internalFormat=s,this._pixelFormat=a,this._pixelDatatype=o,this._width=i,this._height=r,this._dimensions=new Cartesian2(i,r),this._hasMipmap=!1,this._sizeInBytes=l,this._preMultiplyAlpha=c,this._flipY=u,this._initialized=d,this._sampler=void 0,this.sampler=defined(e.sampler)?e.sampler:new Sampler}Object.defineProperties(Sampler.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),Sampler.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},Sampler.NEAREST=Object.freeze(new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.NEAREST,magnificationFilter:TextureMagnificationFilter$1.NEAREST})),Object.defineProperties(CubeMap.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,r=t===TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST||t===TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR||t===TextureMinificationFilter$1.LINEAR_MIPMAP_NEAREST||t===TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR,n=this._context,a=this._pixelDatatype;(a===PixelDatatype$1.FLOAT&&!n.textureFloatLinear||a===PixelDatatype$1.HALF_FLOAT&&!n.textureHalfFloatLinear)&&(t=r?TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST:TextureMinificationFilter$1.NEAREST,i=TextureMagnificationFilter$1.NEAREST),r=n._gl,n=this._textureTarget,r.activeTexture(r.TEXTURE0),r.bindTexture(n,this._texture),r.texParameteri(n,r.TEXTURE_MIN_FILTER,t),r.texParameteri(n,r.TEXTURE_MAG_FILTER,i),r.texParameteri(n,r.TEXTURE_WRAP_S,e.wrapS),r.texParameteri(n,r.TEXTURE_WRAP_T,e.wrapT),defined(this._textureFilterAnisotropic)&&r.texParameteri(n,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),r.bindTexture(n,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),CubeMap.prototype.generateMipmap=function(e){e=defaultValue(e,MipmapHint$1.DONT_CARE),this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},CubeMap.prototype.isDestroyed=function(){return!1},CubeMap.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=destroyObject(this._positiveX),this._negativeX=destroyObject(this._negativeX),this._positiveY=destroyObject(this._positiveY),this._negativeY=destroyObject(this._negativeY),this._positiveZ=destroyObject(this._positiveZ),this._negativeZ=destroyObject(this._negativeZ),destroyObject(this)},Texture.create=function(e){return new Texture(e)},Texture.fromFramebuffer=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,i=t._gl,r=defaultValue(e.pixelFormat,PixelFormat$1.RGB),n=defaultValue(e.framebufferXOffset,0),a=defaultValue(e.framebufferYOffset,0),o=defaultValue(e.width,i.drawingBufferWidth);return new Texture({context:t,width:o,height:i=defaultValue(e.height,i.drawingBufferHeight),pixelFormat:r,source:{framebuffer:defined(e=e.framebuffer)?e:t.defaultFramebuffer,xOffset:n,yOffset:a,width:o,height:i}})},Object.defineProperties(Texture.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,r=this._context,n=this._pixelFormat,a=this._pixelDatatype,o=t===TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST||t===TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR||t===TextureMinificationFilter$1.LINEAR_MIPMAP_NEAREST||t===TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR;(a===PixelDatatype$1.FLOAT&&!r.textureFloatLinear||a===PixelDatatype$1.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=o?TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST:TextureMinificationFilter$1.NEAREST,i=TextureMagnificationFilter$1.NEAREST),r.webgl2&&PixelFormat$1.isDepthFormat(n)&&(t=TextureMinificationFilter$1.NEAREST,i=TextureMagnificationFilter$1.NEAREST),n=r._gl,r=this._textureTarget,n.activeTexture(n.TEXTURE0),n.bindTexture(r,this._texture),n.texParameteri(r,n.TEXTURE_MIN_FILTER,t),n.texParameteri(r,n.TEXTURE_MAG_FILTER,i),n.texParameteri(r,n.TEXTURE_WRAP_S,e.wrapS),n.texParameteri(r,n.TEXTURE_WRAP_T,e.wrapT),defined(this._textureFilterAnisotropic)&&n.texParameteri(r,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),n.bindTexture(r,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),Texture.prototype.copyFrom=function(e,t,i){t=defaultValue(t,0),i=defaultValue(i,0);var r=this._context,n=r._gl,a=this._textureTarget;n.activeTexture(n.TEXTURE0),n.bindTexture(a,this._texture);var o=e.width,s=e.height,l=e.arrayBufferView,c=this._width,u=this._height,d=this._internalFormat,h=this._pixelFormat,p=this._pixelDatatype,f=this._preMultiplyAlpha,m=this._flipY,g=4;defined(l)&&(g=PixelFormat$1.alignmentInBytes(h,p,o)),n.pixelStorei(n.UNPACK_ALIGNMENT,g);var y=!1;this._initialized||(0===t&&0===i&&o===c&&s===u?(defined(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),m&&(l=PixelFormat$1.flipY(l,h,p,c,u)),n.texImage2D(a,0,d,c,u,0,h,PixelDatatype$1.toWebGLConstant(p,r),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,m),n.texImage2D(a,0,d,h,PixelDatatype$1.toWebGLConstant(p,r),e)),y=!0):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),g=PixelFormat$1.createTypedArray(h,p,c,u),n.texImage2D(a,0,d,c,u,0,h,PixelDatatype$1.toWebGLConstant(p,r),g)),this._initialized=!0),y||(defined(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),m&&(l=PixelFormat$1.flipY(l,h,p,o,s)),n.texSubImage2D(a,0,t,i,o,s,h,PixelDatatype$1.toWebGLConstant(p,r),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,m),n.texSubImage2D(a,0,t,i,h,PixelDatatype$1.toWebGLConstant(p,r),e))),n.bindTexture(a,null)},Texture.prototype.copyFromFramebuffer=function(e,t,i,r,n,a){e=defaultValue(e,0),t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,0),n=defaultValue(n,this._width),a=defaultValue(a,this._height);var o=this._context._gl,s=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(s,this._texture),o.copyTexSubImage2D(s,0,e,t,i,r,n,a),o.bindTexture(s,null),this._initialized=!0},Texture.prototype.generateMipmap=function(e){e=defaultValue(e,MipmapHint$1.DONT_CARE),this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},Texture.prototype.isDestroyed=function(){return!1},Texture.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),destroyObject(this)};var AspectRampMaterial="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",BumpMapMaterial="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nvec2 centerPixel = fract(repeat * st);\nfloat centerBump = texture2D(image, centerPixel).channel;\nfloat imageWidth = float(imageDimensions.x);\nvec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\nfloat rightBump = texture2D(image, rightPixel).channel;\nfloat imageHeight = float(imageDimensions.y);\nvec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\nfloat topBump = texture2D(image, leftPixel).channel;\nvec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nmaterial.diffuse = vec3(0.01);\nreturn material;\n}\n",CheckerboardMaterial="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0);\nfloat scaledWidth = fract(repeat.s * st.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(repeat.t * st.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value = min(scaledWidth, scaledHeight);\nvec4 currentColor = mix(lightColor, darkColor, b);\nvec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",DotMaterial="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5));\nvec4 color = mix(lightColor, darkColor, b);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",ElevationContourMaterial="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float spacing;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat distanceToContour = mod(materialInput.height, spacing);\n#ifdef GL_OES_standard_derivatives\nfloat dxc = abs(dFdx(materialInput.height));\nfloat dyc = abs(dFdy(materialInput.height));\nfloat dF = max(dxc, dyc) * czm_pixelRatio * width;\nfloat alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\nfloat alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\nvec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",ElevationRampMaterial="uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\nvec4 rampColor = texture2D(image, vec2(scaledHeight, 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",FadeMaterial="uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\nfloat getTime(float t, float coord)\n{\nfloat scalar = 1.0 / maximumDistance;\nfloat q  = distance(t, coord) * scalar;\nif (repeat)\n{\nfloat r = distance(t, coord + 1.0) * scalar;\nfloat s = distance(t, coord - 1.0) * scalar;\nq = min(min(r, s), q);\n}\nreturn clamp(q, 0.0, 1.0);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat s = getTime(time.x, st.s) * fadeDirection.s;\nfloat t = getTime(time.y, st.t) * fadeDirection.t;\nfloat u = length(vec2(s, t));\nvec4 color = mix(fadeInColor, fadeOutColor, u);\ncolor = czm_gammaCorrect(color);\nmaterial.emission = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",GridMaterial="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value;\n#ifdef GL_OES_standard_derivatives\nconst float fuzz = 1.2;\nvec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\nvec2 dx = abs(dFdx(st));\nvec2 dy = abs(dFdy(st));\nvec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\nvalue = min(\nsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\nsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\nconst float fuzz = 0.05;\nvec2 range = 0.5 - (lineThickness * 0.05);\nvalue = min(\n1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\nfloat dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\nfloat sRim = smoothstep(0.8, 1.0, dRim);\nvalue *= (1.0 - sRim);\nvec4 halfColor;\nhalfColor.rgb = color.rgb * 0.5;\nhalfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\nhalfColor = czm_gammaCorrect(halfColor);\nmaterial.diffuse = halfColor.rgb;\nmaterial.emission = halfColor.rgb;\nmaterial.alpha = halfColor.a;\nreturn material;\n}\n",NormalMapMaterial="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 textureValue = texture2D(image, fract(repeat * materialInput.st));\nvec3 normalTangentSpace = textureValue.channels;\nnormalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\nnormalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\nnormalTangentSpace = normalize(normalTangentSpace);\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nreturn material;\n}\n",PolylineArrowMaterial="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\nfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\nreturn slope * (x - p0.x) + p0.y;\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\n#ifdef GL_OES_standard_derivatives\nfloat base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\nfloat base = 0.975;\n#endif\nvec2 center = vec2(1.0, 0.5);\nfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\nfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\nfloat halfWidth = 0.15;\nfloat s = step(0.5 - halfWidth, st.t);\ns *= 1.0 - step(0.5 + halfWidth, st.t);\ns *= 1.0 - step(base, st.s);\nfloat t = step(base, materialInput.st.s);\nt *= 1.0 - step(ptOnUpperLine, st.t);\nt *= step(ptOnLowerLine, st.t);\nfloat dist;\nif (st.s < base)\n{\nfloat d1 = abs(st.t - (0.5 - halfWidth));\nfloat d2 = abs(st.t - (0.5 + halfWidth));\ndist = min(d1, d2);\n}\nelse\n{\nfloat d1 = czm_infinity;\nif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n{\nd1 = abs(st.s - base);\n}\nfloat d2 = abs(st.t - ptOnUpperLine);\nfloat d3 = abs(st.t - ptOnLowerLine);\ndist = min(min(d1, d2), d3);\n}\nvec4 outsideColor = vec4(0.0);\nvec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\nvec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",PolylineDashMaterial="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nvarying float v_polylineAngle;\nconst float maskLength = 16.0;\nmat2 rotate(float rad) {\nfloat c = cos(rad);\nfloat s = sin(rad);\nreturn mat2(\nc, s,\n-s, c\n);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\nfloat dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\nfloat maskIndex = floor(dashPosition * maskLength);\nfloat maskTest = floor(dashPattern / pow(2.0, maskIndex));\nvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\nif (fragColor.a < 0.005) {\ndiscard;\n}\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",PolylineGlowMaterial="uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\nif (taperPower <= 0.99999) {\nglow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n}\nvec4 fragColor;\nfragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\nfragColor.a = clamp(0.0, 1.0, glow) * color.a;\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",PolylineOutlineMaterial="uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\nvarying float v_width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat halfInteriorWidth =  0.5 * (v_width - outlineWidth) / v_width;\nfloat b = step(0.5 - halfInteriorWidth, st.t);\nb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\nfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\nfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\nfloat dist = min(d1, d2);\nvec4 currentColor = mix(outlineColor, color, b);\nvec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",RimLightingMaterial="uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\nfloat s = smoothstep(1.0 - width, 1.0, d);\nvec4 outColor = czm_gammaCorrect(color);\nvec4 outRimColor = czm_gammaCorrect(rimColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.emission = outRimColor.rgb * s;\nmaterial.alpha = mix(outColor.a, outRimColor.a, s);\nreturn material;\n}\n",SlopeRampMaterial="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",StripeMaterial="uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\nfloat value = fract((coord - offset) * (repeat * 0.5));\nfloat dist = min(value, min(abs(value - 0.5), 1.0 - value));\nvec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\nvec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",WaterMaterial="uniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat time = czm_frameNumber * animationSpeed;\nfloat fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\nfloat specularMapValue = texture2D(specularMap, materialInput.st).r;\nvec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\nvec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\nnormalTangentSpace.xy /= fade;\nnormalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\nnormalTangentSpace = normalize(normalTangentSpace);\nfloat tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\nmaterial.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\nmaterial.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\nmaterial.diffuse += (0.1 * tsPerturbationRatio);\nmaterial.diffuse = material.diffuse;\nmaterial.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\nmaterial.specular = specularIntensity;\nmaterial.shininess = 10.0;\nreturn material;\n}\n";function Material(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=defaultValue(e.minificationFilter,TextureMinificationFilter$1.LINEAR),this._magnificationFilter=defaultValue(e.magnificationFilter,TextureMagnificationFilter$1.LINEAR),this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,initializeMaterial(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),defined(Material._uniformList[this.type])||(Material._uniformList[this.type]=Object.keys(this._uniforms))}function initializeMaterial(e,t){var i;e=defaultValue(e,defaultValue.EMPTY_OBJECT),t._strict=defaultValue(e.strict,!1),t._count=defaultValue(e.count,0),t._template=clone(defaultValue(e.fabric,defaultValue.EMPTY_OBJECT)),t._template.uniforms=clone(defaultValue(t._template.uniforms,defaultValue.EMPTY_OBJECT)),t._template.materials=clone(defaultValue(t._template.materials,defaultValue.EMPTY_OBJECT)),t.type=defined(t._template.type)?t._template.type:createGuid(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[],defined(r=Material._materialCache.getMaterial(t.type))&&(i=clone(r.fabric,!0),t._template=combine(t._template,i,!0),n=r.translucent),checkForTemplateErrors(t),defined(r)||Material._materialCache.addMaterial(t.type,t),createMethodDefinition(t),createUniforms(t),createSubMaterials(t);var r=0===t._translucentFunctions.length||void 0,n=defaultValue(n,r);defined(n=defaultValue(e.translucent,n))&&("function"==typeof n?t._translucentFunctions.push((function(){return n(t)})):t._translucentFunctions.push(n))}function checkForValidProperties(e,t,i,r){if(defined(e))for(var n in e){var a;e.hasOwnProperty(n)&&(a=-1!==t.indexOf(n),(r&&!a||!r&&a)&&i(n,t))}}function invalidNameError(e,t){}function duplicateNameError(e,t){}Material._uniformList={},Material.fromType=function(e,t){var i=new Material({fabric:{type:e}});if(defined(t))for(var r in t)t.hasOwnProperty(r)&&(i.uniforms[r]=t[r]);return i},Material.prototype.isTranslucent=function(){if(defined(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;for(var e=!0,t=this._translucentFunctions,i=t.length,r=0;r<i;++r){var n=t[r];if(!(e="function"==typeof n?e&&n():e&&n))break}return e},Material.prototype.update=function(e){for(var t=this._loadedImages,i=t.length,r=0;r<i;++r){var n=(o=t[r]).id,a=o.image,o=new Sampler({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter});a=defined(a.internalFormat)?new Texture({context:e,pixelFormat:a.internalFormat,width:a.width,height:a.height,source:{arrayBufferView:a.bufferView},sampler:o}):new Texture({context:e,source:a,sampler:o});this._textures[n]=a,o=n+"Dimensions",this.uniforms.hasOwnProperty(o)&&((o=this.uniforms[o]).x=a._width,o.y=a._height)}t.length=0;var s=this._loadedCubeMaps;i=s.length;for(r=0;r<i;++r){var l=s[r];n=l.id,l=new CubeMap({context:e,source:{positiveX:(l=l.images)[0],negativeX:l[1],positiveY:l[2],negativeY:l[3],positiveZ:l[4],negativeZ:l[5]},sampler:new Sampler({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})}),this._textures[n]=l}s.length=0;var c=this._updateFunctions;for(i=c.length,r=0;r<i;++r)c[r](this,e);var u,d=this.materials;for(u in d)d.hasOwnProperty(u)&&d[u].update(e)},Material.prototype.isDestroyed=function(){return!1},Material.prototype.destroy=function(){var e,t,i=this._textures;for(e in i)!i.hasOwnProperty(e)||(t=i[e])!==this._defaultTexture&&t.destroy();var r,n=this.materials;for(r in n)n.hasOwnProperty(r)&&n[r].destroy();return destroyObject(this)};var templateProperties=["type","materials","uniforms","components","source"],componentProperties=["diffuse","specular","shininess","normal","emission","alpha"];function checkForTemplateErrors(e){var t=e._template,i=t.uniforms,r=t.materials;e=t.components;checkForValidProperties(t,templateProperties,invalidNameError,!0),checkForValidProperties(e,componentProperties,invalidNameError,!0);var n,a=[];for(n in r)r.hasOwnProperty(n)&&a.push(n);checkForValidProperties(i,a,duplicateNameError,!1)}function isMaterialFused(e,t){var i,r=t._template.materials;for(i in r)if(r.hasOwnProperty(i)&&-1<e.indexOf(i))return!0;return!1}function createMethodDefinition(e){var t=e._template.components,i=e._template.source;if(defined(i))e.shaderSource+=i+"\n";else{if(e.shaderSource+="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n",e.shaderSource+="czm_material material = czm_getDefaultMaterial(materialInput);\n",defined(t)){var r,n,a=0<Object.keys(e._template.materials).length;for(r in t)t.hasOwnProperty(r)&&("diffuse"===r||"emission"===r?(n=a&&isMaterialFused(t[r],e)?t[r]:"czm_gammaCorrect("+t[r]+")",e.shaderSource+="material."+r+" = "+n+"; \n"):e.shaderSource+="alpha"===r?"material.alpha = "+t.alpha+"; \n":"material."+r+" = "+t[r]+";\n")}e.shaderSource+="return material;\n}\n"}}var matrixMap={mat2:Matrix2,mat3:Matrix3,mat4:Matrix4},ktxRegex=/\.ktx$/i,crnRegex=/\.crn$/i;function createTexture2DUpdateFunction(e){var t;return function(i,r){var n=i.uniforms,a=n[e],o=t!==a;t=a;var s,l=i._textures[e];if(a instanceof HTMLVideoElement)if(2<=a.readyState){if(o&&defined(l)&&(l!==r.defaultTexture&&l.destroy(),l=void 0),!defined(l)||l===r.defaultTexture){l=new Texture({context:r,source:a,sampler:new Sampler({minificationFilter:i._minificationFilter,magnificationFilter:i._magnificationFilter})});return void(i._textures[e]=l)}l.copyFrom(a)}else defined(l)||(i._textures[e]=r.defaultTexture);else{if(a instanceof Texture&&a!==l){i._texturePaths[e]=void 0;var c=i._textures[e];return c!==i._defaultTexture&&c.destroy(),i._textures[e]=a,c=e+"Dimensions",void(n.hasOwnProperty(c)&&((s=n[c]).x=a._width,s.y=a._height))}defined(l)||(i._texturePaths[e]=void 0,defined(i._defaultTexture)||(i._defaultTexture=r.defaultTexture),l=i._textures[e]=i._defaultTexture,c=e+"Dimensions",n.hasOwnProperty(c)&&((s=n[c]).x=l._width,s.y=l._height)),a!==Material.DefaultImageId&&(l=a instanceof Resource,(!defined(i._texturePaths[e])||l&&a.url!==i._texturePaths[e].url||!l&&a!==i._texturePaths[e])&&("string"==typeof a||l?(l=l?a:Resource.createIfNeeded(a),when(ktxRegex.test(l.url)?loadKTX(l):crnRegex.test(l.url)?loadCRN(l):l.fetchImage(),(function(t){i._loadedImages.push({id:e,image:t})}))):(a instanceof HTMLCanvasElement||a instanceof HTMLImageElement)&&i._loadedImages.push({id:e,image:a}),i._texturePaths[e]=a))}}}function createCubeMapUpdateFunction(e){return function(t,i){var r=t.uniforms[e];if(r instanceof CubeMap){var n=t._textures[e];return n!==t._defaultTexture&&n.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=r)}defined(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),r===Material.DefaultCubeMapId||(i=r.positiveX+r.negativeX+r.positiveY+r.negativeY+r.positiveZ+r.negativeZ)!==t._texturePaths[e]&&(r=[Resource.createIfNeeded(r.positiveX).fetchImage(),Resource.createIfNeeded(r.negativeX).fetchImage(),Resource.createIfNeeded(r.positiveY).fetchImage(),Resource.createIfNeeded(r.negativeY).fetchImage(),Resource.createIfNeeded(r.positiveZ).fetchImage(),Resource.createIfNeeded(r.negativeZ).fetchImage()],when.all(r).then((function(i){t._loadedCubeMaps.push({id:e,images:i})})),t._texturePaths[e]=i)}}function createUniforms(e){var t,i=e._template.uniforms;for(t in i)i.hasOwnProperty(t)&&createUniform(e,t)}function createUniform(e,t){e._strict;var i,r,n,a=e._template.uniforms,o=a[t],s=getUniformType(o);"channels"===s?replaceToken(e,t,o,!1):("sampler2D"!==s||0<getNumberOfTokens(e,i=t+"Dimensions")&&(a[i]={type:"ivec3",x:1,y:1},createUniform(e,i)),new RegExp("uniform\\s+"+s+"\\s+"+t+"\\s*;").test(e.shaderSource)||(r="uniform "+s+" "+t+";",e.shaderSource=r+e.shaderSource),r=t+"_"+e._count++,replaceToken(e,t,r),e.uniforms[t]=o,"sampler2D"===s?(e._uniforms[r]=function(){return e._textures[t]},e._updateFunctions.push(createTexture2DUpdateFunction(t))):"samplerCube"===s?(e._uniforms[r]=function(){return e._textures[t]},e._updateFunctions.push(createCubeMapUpdateFunction(t))):-1!==s.indexOf("mat")?(n=new matrixMap[s],e._uniforms[r]=function(){return matrixMap[s].fromColumnMajorArray(e.uniforms[t],n)}):e._uniforms[r]=function(){return e.uniforms[t]})}function getUniformType(e){var t=e.type;if(!defined(t)){var i=typeof e;if("number"==i)t="float";else if("boolean"==i)t="bool";else if("string"==i||e instanceof Resource||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===Material.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"==i)if(Array.isArray(e))4!==e.length&&9!==e.length&&16!==e.length||(t="mat"+Math.sqrt(e.length));else{var r,n=0;for(r in e)e.hasOwnProperty(r)&&(n+=1);2<=n&&n<=4?t="vec"+n:6===n&&(t="samplerCube")}}return t}function createSubMaterials(e){var t,i,r,n=e._strict,a=e._template.materials;for(t in a)a.hasOwnProperty(t)&&(i=new Material({strict:n,fabric:a[t],count:e._count}),e._count=i._count,e._uniforms=combine(e._uniforms,i._uniforms,!0),e.materials[t]=i,e._translucentFunctions=e._translucentFunctions.concat(i._translucentFunctions),replaceToken(i,r="czm_getMaterial",r=r+"_"+e._count++),e.shaderSource=i.shaderSource+e.shaderSource,replaceToken(e,t,r+"(materialInput)"))}function replaceToken(e,t,i,r){r=defaultValue(r,!0);var n=0;t=new RegExp("([\\w"+(r?".":"")+"])?"+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(t,(function(e,t,r){return t||r?e:(n+=1,i)})),n}function getNumberOfTokens(e,t,i){return replaceToken(e,t,t,i)}function MaterialAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=defaultValue(e.closed,!1),r=defaultValue(e.materialSupport,MaterialAppearance.MaterialSupport.TEXTURED);this.material=defined(e.material)?e.material:Material.fromType(Material.ColorType),this.translucent=t,this._vertexShaderSource=defaultValue(e.vertexShaderSource,r.vertexShaderSource),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,r.fragmentShaderSource),this._renderState=Appearance.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._materialSupport=r,this._vertexFormat=r.vertexFormat,this._flat=defaultValue(e.flat,!1),this._faceForward=defaultValue(e.faceForward,!i)}Material._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},Material.DefaultImageId="czm_defaultImage",Material.DefaultCubeMapId="czm_defaultCubeMap",Material.ColorType="Color",Material._materialCache.addMaterial(Material.ColorType,{fabric:{type:Material.ColorType,uniforms:{color:new Color(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),Material.ImageType="Image",Material._materialCache.addMaterial(Material.ImageType,{fabric:{type:Material.ImageType,uniforms:{image:Material.DefaultImageId,repeat:new Cartesian2(1,1),color:new Color(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),Material.DiffuseMapType="DiffuseMap",Material._materialCache.addMaterial(Material.DiffuseMapType,{fabric:{type:Material.DiffuseMapType,uniforms:{image:Material.DefaultImageId,channels:"rgb",repeat:new Cartesian2(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),Material.AlphaMapType="AlphaMap",Material._materialCache.addMaterial(Material.AlphaMapType,{fabric:{type:Material.AlphaMapType,uniforms:{image:Material.DefaultImageId,channel:"a",repeat:new Cartesian2(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),Material.SpecularMapType="SpecularMap",Material._materialCache.addMaterial(Material.SpecularMapType,{fabric:{type:Material.SpecularMapType,uniforms:{image:Material.DefaultImageId,channel:"r",repeat:new Cartesian2(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),Material.EmissionMapType="EmissionMap",Material._materialCache.addMaterial(Material.EmissionMapType,{fabric:{type:Material.EmissionMapType,uniforms:{image:Material.DefaultImageId,channels:"rgb",repeat:new Cartesian2(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),Material.BumpMapType="BumpMap",Material._materialCache.addMaterial(Material.BumpMapType,{fabric:{type:Material.BumpMapType,uniforms:{image:Material.DefaultImageId,channel:"r",strength:.8,repeat:new Cartesian2(1,1)},source:BumpMapMaterial},translucent:!1}),Material.NormalMapType="NormalMap",Material._materialCache.addMaterial(Material.NormalMapType,{fabric:{type:Material.NormalMapType,uniforms:{image:Material.DefaultImageId,channels:"rgb",strength:.8,repeat:new Cartesian2(1,1)},source:NormalMapMaterial},translucent:!1}),Material.GridType="Grid",Material._materialCache.addMaterial(Material.GridType,{fabric:{type:Material.GridType,uniforms:{color:new Color(0,1,0,1),cellAlpha:.1,lineCount:new Cartesian2(8,8),lineThickness:new Cartesian2(1,1),lineOffset:new Cartesian2(0,0)},source:GridMaterial},translucent:function(e){return(e=e.uniforms).color.alpha<1||e.cellAlpha<1}}),Material.StripeType="Stripe",Material._materialCache.addMaterial(Material.StripeType,{fabric:{type:Material.StripeType,uniforms:{horizontal:!0,evenColor:new Color(1,1,1,.5),oddColor:new Color(0,0,1,.5),offset:0,repeat:5},source:StripeMaterial},translucent:function(e){return(e=e.uniforms).evenColor.alpha<1||e.oddColor.alpha<1}}),Material.CheckerboardType="Checkerboard",Material._materialCache.addMaterial(Material.CheckerboardType,{fabric:{type:Material.CheckerboardType,uniforms:{lightColor:new Color(1,1,1,.5),darkColor:new Color(0,0,0,.5),repeat:new Cartesian2(5,5)},source:CheckerboardMaterial},translucent:function(e){return(e=e.uniforms).lightColor.alpha<1||e.darkColor.alpha<1}}),Material.DotType="Dot",Material._materialCache.addMaterial(Material.DotType,{fabric:{type:Material.DotType,uniforms:{lightColor:new Color(1,1,0,.75),darkColor:new Color(0,1,1,.75),repeat:new Cartesian2(5,5)},source:DotMaterial},translucent:function(e){return(e=e.uniforms).lightColor.alpha<1||e.darkColor.alpha<1}}),Material.WaterType="Water",Material._materialCache.addMaterial(Material.WaterType,{fabric:{type:Material.WaterType,uniforms:{baseWaterColor:new Color(.2,.3,.6,1),blendColor:new Color(0,1,.699,1),specularMap:Material.DefaultImageId,normalMap:Material.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:WaterMaterial},translucent:function(e){return(e=e.uniforms).baseWaterColor.alpha<1||e.blendColor.alpha<1}}),Material.RimLightingType="RimLighting",Material._materialCache.addMaterial(Material.RimLightingType,{fabric:{type:Material.RimLightingType,uniforms:{color:new Color(1,0,0,.7),rimColor:new Color(1,1,1,.4),width:.3},source:RimLightingMaterial},translucent:function(e){return(e=e.uniforms).color.alpha<1||e.rimColor.alpha<1}}),Material.FadeType="Fade",Material._materialCache.addMaterial(Material.FadeType,{fabric:{type:Material.FadeType,uniforms:{fadeInColor:new Color(1,0,0,1),fadeOutColor:new Color(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new Cartesian2(.5,.5)},source:FadeMaterial},translucent:function(e){return(e=e.uniforms).fadeInColor.alpha<1||e.fadeOutColor.alpha<1}}),Material.PolylineArrowType="PolylineArrow",Material._materialCache.addMaterial(Material.PolylineArrowType,{fabric:{type:Material.PolylineArrowType,uniforms:{color:new Color(1,1,1,1)},source:PolylineArrowMaterial},translucent:!0}),Material.PolylineDashType="PolylineDash",Material._materialCache.addMaterial(Material.PolylineDashType,{fabric:{type:Material.PolylineDashType,uniforms:{color:new Color(1,0,1,1),gapColor:new Color(0,0,0,0),dashLength:16,dashPattern:255},source:PolylineDashMaterial},translucent:!0}),Material.PolylineGlowType="PolylineGlow",Material._materialCache.addMaterial(Material.PolylineGlowType,{fabric:{type:Material.PolylineGlowType,uniforms:{color:new Color(0,.5,1,1),glowPower:.25,taperPower:1},source:PolylineGlowMaterial},translucent:!0}),Material.PolylineOutlineType="PolylineOutline",Material._materialCache.addMaterial(Material.PolylineOutlineType,{fabric:{type:Material.PolylineOutlineType,uniforms:{color:new Color(1,1,1,1),outlineColor:new Color(1,0,0,1),outlineWidth:1},source:PolylineOutlineMaterial},translucent:function(e){return(e=e.uniforms).color.alpha<1||e.outlineColor.alpha<1}}),Material.ElevationContourType="ElevationContour",Material._materialCache.addMaterial(Material.ElevationContourType,{fabric:{type:Material.ElevationContourType,uniforms:{spacing:100,color:new Color(1,0,0,1),width:1},source:ElevationContourMaterial},translucent:!1}),Material.ElevationRampType="ElevationRamp",Material._materialCache.addMaterial(Material.ElevationRampType,{fabric:{type:Material.ElevationRampType,uniforms:{image:Material.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:ElevationRampMaterial},translucent:!1}),Material.SlopeRampMaterialType="SlopeRamp",Material._materialCache.addMaterial(Material.SlopeRampMaterialType,{fabric:{type:Material.SlopeRampMaterialType,uniforms:{image:Material.DefaultImageId},source:SlopeRampMaterial},translucent:!1}),Material.AspectRampMaterialType="AspectRamp",Material._materialCache.addMaterial(Material.AspectRampMaterialType,{fabric:{type:Material.AspectRampMaterialType,uniforms:{image:Material.DefaultImageId},source:AspectRampMaterial},translucent:!1}),Object.defineProperties(MaterialAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),MaterialAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,MaterialAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,MaterialAppearance.prototype.getRenderState=Appearance.prototype.getRenderState,MaterialAppearance.MaterialSupport={BASIC:Object.freeze({vertexFormat:VertexFormat.POSITION_AND_NORMAL,vertexShaderSource:BasicMaterialAppearanceVS,fragmentShaderSource:BasicMaterialAppearanceFS}),TEXTURED:Object.freeze({vertexFormat:VertexFormat.POSITION_NORMAL_AND_ST,vertexShaderSource:TexturedMaterialAppearanceVS,fragmentShaderSource:TexturedMaterialAppearanceFS}),ALL:Object.freeze({vertexFormat:VertexFormat.ALL,vertexShaderSource:AllMaterialAppearanceVS,fragmentShaderSource:AllMaterialAppearanceFS})};var PerInstanceColorAppearanceFS="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nvec4 color = czm_gammaCorrect(v_color);\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\n",PerInstanceColorAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec4 color;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",PerInstanceFlatColorAppearanceFS="varying vec4 v_color;\nvoid main()\n{\ngl_FragColor = czm_gammaCorrect(v_color);\n}\n",PerInstanceFlatColorAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function PerInstanceColorAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=defaultValue(e.closed,!1),r=defaultValue(e.flat,!1),n=r?PerInstanceFlatColorAppearanceVS:PerInstanceColorAppearanceVS,a=r?PerInstanceFlatColorAppearanceFS:PerInstanceColorAppearanceFS,o=r?PerInstanceColorAppearance.FLAT_VERTEX_FORMAT:PerInstanceColorAppearance.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=defaultValue(e.vertexShaderSource,n),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,a),this._renderState=Appearance.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._vertexFormat=o,this._flat=r,this._faceForward=defaultValue(e.faceForward,!i)}function ColorMaterialProperty(e){this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this.color=e}function DrawCommand(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._cull=defaultValue(e.cull,!0),this._occlude=defaultValue(e.occlude,!0),this._modelMatrix=e.modelMatrix,this._primitiveType=defaultValue(e.primitiveType,PrimitiveType$1.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=defaultValue(e.offset,0),this._instanceCount=defaultValue(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._executeInClosestFrustum=defaultValue(e.executeInClosestFrustum,!1),this._owner=e.owner,this._debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugOverlappingFrustums=0,this._castShadows=defaultValue(e.castShadows,!1),this._receiveShadows=defaultValue(e.receiveShadows,!1),this._pickId=e.pickId,this._pickOnly=defaultValue(e.pickOnly,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}Object.defineProperties(PerInstanceColorAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),PerInstanceColorAppearance.VERTEX_FORMAT=VertexFormat.POSITION_AND_NORMAL,PerInstanceColorAppearance.FLAT_VERTEX_FORMAT=VertexFormat.POSITION_ONLY,PerInstanceColorAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,PerInstanceColorAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,PerInstanceColorAppearance.prototype.getRenderState=Appearance.prototype.getRenderState,Object.defineProperties(ColorMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color")}),ColorMaterialProperty.prototype.getType=function(e){return"Color"},ColorMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,Color.WHITE,t.color),t},ColorMaterialProperty.prototype.equals=function(e){return this===e||e instanceof ColorMaterialProperty&&Property.equals(this._color,e._color)},Object.defineProperties(DrawCommand.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},occlude:{get:function(){return this._occlude},set:function(e){this._occlude!==e&&(this._occlude=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return this._pickOnly},set:function(e){this._pickOnly!==e&&(this._pickOnly=e,this.dirty=!0)}}}),DrawCommand.shallowClone=function(e,t){if(defined(e))return defined(t)||(t=new DrawCommand),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._cull=e._cull,t._occlude=e._occlude,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._executeInClosestFrustum=e._executeInClosestFrustum,t._owner=e._owner,t._debugShowBoundingVolume=e._debugShowBoundingVolume,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._castShadows=e._castShadows,t._receiveShadows=e._receiveShadows,t._pickId=e._pickId,t._pickOnly=e._pickOnly,t.dirty=!0,t.lastDirtyTime=0,t},DrawCommand.prototype.execute=function(e,t){e.draw(this,t)};var Pass={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,OPAQUE:7,TRANSLUCENT:8,OVERLAY:9,NUMBER_OF_PASSES:10},Pass$1=Object.freeze(Pass);function freezeRenderState(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),r=0;r<i.length;r++)t=i[r],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=freezeRenderState(e[t]));return Object.freeze(e)}function RenderState(e){var t=defaultValue(e,defaultValue.EMPTY_OBJECT),i=defaultValue(t.cull,defaultValue.EMPTY_OBJECT),r=defaultValue(t.polygonOffset,defaultValue.EMPTY_OBJECT),n=defaultValue(t.scissorTest,defaultValue.EMPTY_OBJECT),a=defaultValue(n.rectangle,defaultValue.EMPTY_OBJECT),o=defaultValue(t.depthRange,defaultValue.EMPTY_OBJECT),s=defaultValue(t.depthTest,defaultValue.EMPTY_OBJECT),l=defaultValue(t.colorMask,defaultValue.EMPTY_OBJECT),c=defaultValue(t.blending,defaultValue.EMPTY_OBJECT),u=defaultValue(c.color,defaultValue.EMPTY_OBJECT),d=defaultValue(t.stencilTest,defaultValue.EMPTY_OBJECT),h=defaultValue(d.frontOperation,defaultValue.EMPTY_OBJECT),p=defaultValue(d.backOperation,defaultValue.EMPTY_OBJECT),f=defaultValue(t.sampleCoverage,defaultValue.EMPTY_OBJECT);e=t.viewport;this.frontFace=defaultValue(t.frontFace,WindingOrder$1.COUNTER_CLOCKWISE),this.cull={enabled:defaultValue(i.enabled,!1),face:defaultValue(i.face,WebGLConstants$1.BACK)},this.lineWidth=defaultValue(t.lineWidth,1),this.polygonOffset={enabled:defaultValue(r.enabled,!1),factor:defaultValue(r.factor,0),units:defaultValue(r.units,0)},this.scissorTest={enabled:defaultValue(n.enabled,!1),rectangle:BoundingRectangle.clone(a)},this.depthRange={near:defaultValue(o.near,0),far:defaultValue(o.far,1)},this.depthTest={enabled:defaultValue(s.enabled,!1),func:defaultValue(s.func,WebGLConstants$1.LESS)},this.colorMask={red:defaultValue(l.red,!0),green:defaultValue(l.green,!0),blue:defaultValue(l.blue,!0),alpha:defaultValue(l.alpha,!0)},this.depthMask=defaultValue(t.depthMask,!0),this.stencilMask=defaultValue(t.stencilMask,-1),this.blending={enabled:defaultValue(c.enabled,!1),color:new Color(defaultValue(u.red,0),defaultValue(u.green,0),defaultValue(u.blue,0),defaultValue(u.alpha,0)),equationRgb:defaultValue(c.equationRgb,WebGLConstants$1.FUNC_ADD),equationAlpha:defaultValue(c.equationAlpha,WebGLConstants$1.FUNC_ADD),functionSourceRgb:defaultValue(c.functionSourceRgb,WebGLConstants$1.ONE),functionSourceAlpha:defaultValue(c.functionSourceAlpha,WebGLConstants$1.ONE),functionDestinationRgb:defaultValue(c.functionDestinationRgb,WebGLConstants$1.ZERO),functionDestinationAlpha:defaultValue(c.functionDestinationAlpha,WebGLConstants$1.ZERO)},this.stencilTest={enabled:defaultValue(d.enabled,!1),frontFunction:defaultValue(d.frontFunction,WebGLConstants$1.ALWAYS),backFunction:defaultValue(d.backFunction,WebGLConstants$1.ALWAYS),reference:defaultValue(d.reference,0),mask:defaultValue(d.mask,-1),frontOperation:{fail:defaultValue(h.fail,WebGLConstants$1.KEEP),zFail:defaultValue(h.zFail,WebGLConstants$1.KEEP),zPass:defaultValue(h.zPass,WebGLConstants$1.KEEP)},backOperation:{fail:defaultValue(p.fail,WebGLConstants$1.KEEP),zFail:defaultValue(p.zFail,WebGLConstants$1.KEEP),zPass:defaultValue(p.zPass,WebGLConstants$1.KEEP)}},this.sampleCoverage={enabled:defaultValue(f.enabled,!1),value:defaultValue(f.value,1),invert:defaultValue(f.invert,!1)},this.viewport=defined(e)?new BoundingRectangle(e.x,e.y,e.width,e.height):void 0,this.id=0,this._applyFunctions=[]}var nextRenderStateId=0,renderStateCache={};function enableOrDisable(e,t,i){i?e.enable(t):e.disable(t)}function applyFrontFace(e,t){e.frontFace(t.frontFace)}function applyCull(e,t){var i=t.cull;t=i.enabled;enableOrDisable(e,e.CULL_FACE,t),t&&e.cullFace(i.face)}function applyLineWidth(e,t){e.lineWidth(t.lineWidth)}function applyPolygonOffset(e,t){var i=t.polygonOffset;t=i.enabled;enableOrDisable(e,e.POLYGON_OFFSET_FILL,t),t&&e.polygonOffset(i.factor,i.units)}function applyScissorTest(e,t,i){var r=t.scissorTest;t=(defined(i.scissorTest)?i.scissorTest:r).enabled;enableOrDisable(e,e.SCISSOR_TEST,t),t&&(r=(defined(i.scissorTest)?i.scissorTest:r).rectangle,e.scissor(r.x,r.y,r.width,r.height))}function applyDepthRange(e,t){t=t.depthRange,e.depthRange(t.near,t.far)}function applyDepthTest(e,t){var i=t.depthTest;t=i.enabled;enableOrDisable(e,e.DEPTH_TEST,t),t&&e.depthFunc(i.func)}function applyColorMask(e,t){t=t.colorMask,e.colorMask(t.red,t.green,t.blue,t.alpha)}function applyDepthMask(e,t){e.depthMask(t.depthMask)}function applyStencilMask(e,t){e.stencilMask(t.stencilMask)}function applyBlendingColor(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function applyBlending(e,t,i){t=t.blending,i=defined(i.blendingEnabled)?i.blendingEnabled:t.enabled,enableOrDisable(e,e.BLEND,i),i&&(applyBlendingColor(e,t.color),e.blendEquationSeparate(t.equationRgb,t.equationAlpha),e.blendFuncSeparate(t.functionSourceRgb,t.functionDestinationRgb,t.functionSourceAlpha,t.functionDestinationAlpha))}function applyStencilTest(e,t){var i,r,n=t.stencilTest,a=n.enabled;enableOrDisable(e,e.STENCIL_TEST,a),a&&(r=n.frontFunction,i=n.backFunction,t=n.reference,a=n.mask,e.stencilFunc(r,t,a),e.stencilFuncSeparate(e.BACK,i,t,a),e.stencilFuncSeparate(e.FRONT,r,t,a),t=(r=n.frontOperation).fail,a=r.zFail,r=r.zPass,e.stencilOpSeparate(e.FRONT,t,a,r),r=(a=n.backOperation).fail,n=a.zFail,a=a.zPass,e.stencilOpSeparate(e.BACK,r,n,a))}function applySampleCoverage(e,t){var i=t.sampleCoverage;t=i.enabled;enableOrDisable(e,e.SAMPLE_COVERAGE,t),t&&e.sampleCoverage(i.value,i.invert)}RenderState.fromCache=function(e){var t=JSON.stringify(e),i=renderStateCache[t];if(defined(i))return++i.referenceCount,i.state;var r=new RenderState(e);e=JSON.stringify(r);return defined(i=renderStateCache[e])||(r.id=nextRenderStateId++,i={referenceCount:0,state:r},renderStateCache[e]=i),++i.referenceCount,renderStateCache[t]={referenceCount:1,state:i.state},i.state},RenderState.removeFromCache=function(e){var t=new RenderState(e),i=JSON.stringify(t),r=renderStateCache[i];t=JSON.stringify(e);defined(e=renderStateCache[t])&&(--e.referenceCount,0===e.referenceCount&&(delete renderStateCache[t],defined(r)&&--r.referenceCount)),defined(r)&&0===r.referenceCount&&delete renderStateCache[i]},RenderState.getCache=function(){return renderStateCache},RenderState.clearCache=function(){renderStateCache={}};var scratchViewport=new BoundingRectangle;function applyViewport(e,t,i){defined(t=defaultValue(t.viewport,i.viewport))||((t=scratchViewport).width=i.context.drawingBufferWidth,t.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=t,e.viewport(t.x,t.y,t.width,t.height)}function createFuncs(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(applyFrontFace),e.cull.enabled===t.cull.enabled&&e.cull.face===t.cull.face||i.push(applyCull),e.lineWidth!==t.lineWidth&&i.push(applyLineWidth),e.polygonOffset.enabled===t.polygonOffset.enabled&&e.polygonOffset.factor===t.polygonOffset.factor&&e.polygonOffset.units===t.polygonOffset.units||i.push(applyPolygonOffset),e.depthRange.near===t.depthRange.near&&e.depthRange.far===t.depthRange.far||i.push(applyDepthRange),e.depthTest.enabled===t.depthTest.enabled&&e.depthTest.func===t.depthTest.func||i.push(applyDepthTest),e.colorMask.red===t.colorMask.red&&e.colorMask.green===t.colorMask.green&&e.colorMask.blue===t.colorMask.blue&&e.colorMask.alpha===t.colorMask.alpha||i.push(applyColorMask),e.depthMask!==t.depthMask&&i.push(applyDepthMask),e.stencilMask!==t.stencilMask&&i.push(applyStencilMask),e.stencilTest.enabled===t.stencilTest.enabled&&e.stencilTest.frontFunction===t.stencilTest.frontFunction&&e.stencilTest.backFunction===t.stencilTest.backFunction&&e.stencilTest.reference===t.stencilTest.reference&&e.stencilTest.mask===t.stencilTest.mask&&e.stencilTest.frontOperation.fail===t.stencilTest.frontOperation.fail&&e.stencilTest.frontOperation.zFail===t.stencilTest.frontOperation.zFail&&e.stencilTest.backOperation.fail===t.stencilTest.backOperation.fail&&e.stencilTest.backOperation.zFail===t.stencilTest.backOperation.zFail&&e.stencilTest.backOperation.zPass===t.stencilTest.backOperation.zPass||i.push(applyStencilTest),e.sampleCoverage.enabled===t.sampleCoverage.enabled&&e.sampleCoverage.value===t.sampleCoverage.value&&e.sampleCoverage.invert===t.sampleCoverage.invert||i.push(applySampleCoverage),i}RenderState.apply=function(e,t,i){applyFrontFace(e,t),applyCull(e,t),applyLineWidth(e,t),applyPolygonOffset(e,t),applyDepthRange(e,t),applyDepthTest(e,t),applyColorMask(e,t),applyDepthMask(e,t),applyStencilMask(e,t),applyStencilTest(e,t),applySampleCoverage(e,t),applyScissorTest(e,t,i),applyBlending(e,t,i),applyViewport(e,t,i)},RenderState.partialApply=function(e,t,i,r,n,a){if(t!==i){var o=i._applyFunctions[t.id];defined(o)||(o=createFuncs(t,i),i._applyFunctions[t.id]=o);for(var s=o.length,l=0;l<s;++l)o[l](e,i)}(defined(r.scissorTest)?r:t).scissorTest===(defined(n.scissorTest)?n:i).scissorTest&&!a||applyScissorTest(e,i,n),((defined(r.blendingEnabled)?r.blendingEnabled:t.blending.enabled)!==(a=defined(n.blendingEnabled)?n.blendingEnabled:i.blending.enabled)||a&&t.blending!==i.blending)&&applyBlending(e,i,n),t===i&&r===n&&r.context===n.context||applyViewport(e,i,n)},RenderState.getState=function(e){return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:BoundingRectangle.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:Color.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:defined(e.viewport)?BoundingRectangle.clone(e.viewport):void 0}};var viewerPositionWCScratch=new Cartesian3;function AutomaticUniform(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var datatypeToGlsl={};datatypeToGlsl[WebGLConstants$1.FLOAT]="float",datatypeToGlsl[WebGLConstants$1.FLOAT_VEC2]="vec2",datatypeToGlsl[WebGLConstants$1.FLOAT_VEC3]="vec3",datatypeToGlsl[WebGLConstants$1.FLOAT_VEC4]="vec4",datatypeToGlsl[WebGLConstants$1.INT]="int",datatypeToGlsl[WebGLConstants$1.INT_VEC2]="ivec2",datatypeToGlsl[WebGLConstants$1.INT_VEC3]="ivec3",datatypeToGlsl[WebGLConstants$1.INT_VEC4]="ivec4",datatypeToGlsl[WebGLConstants$1.BOOL]="bool",datatypeToGlsl[WebGLConstants$1.BOOL_VEC2]="bvec2",datatypeToGlsl[WebGLConstants$1.BOOL_VEC3]="bvec3",datatypeToGlsl[WebGLConstants$1.BOOL_VEC4]="bvec4",datatypeToGlsl[WebGLConstants$1.FLOAT_MAT2]="mat2",datatypeToGlsl[WebGLConstants$1.FLOAT_MAT3]="mat3",datatypeToGlsl[WebGLConstants$1.FLOAT_MAT4]="mat4",datatypeToGlsl[WebGLConstants$1.SAMPLER_2D]="sampler2D",datatypeToGlsl[WebGLConstants$1.SAMPLER_CUBE]="samplerCube",AutomaticUniform.prototype.getDeclaration=function(e){return"uniform "+datatypeToGlsl[this._datatype]+" "+e+(1===(e=this._size)?";":"["+e.toString()+"];")};var AutomaticUniforms={czm_viewport:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new AutomaticUniform({size:1,datatype:WebGLConstants$1.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return Matrix4.getTranslation(e.inverseView,viewerPositionWCScratch)}}),czm_frameNumber:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new AutomaticUniform({size:1,datatype:WebGLConstants$1.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new AutomaticUniform({size:1,datatype:WebGLConstants$1.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new AutomaticUniform({size:1,datatype:WebGLConstants$1.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new AutomaticUniform({size:9,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.fogDensity}}),czm_imagerySplitPosition:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.imagerySplitPosition}}),czm_geometricToleranceOverMeter:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})};function createUniform$1(e,t,i,r){switch(t.type){case e.FLOAT:return new UniformFloat(e,t,i,r);case e.FLOAT_VEC2:return new UniformFloatVec2(e,t,i,r);case e.FLOAT_VEC3:return new UniformFloatVec3(e,t,i,r);case e.FLOAT_VEC4:return new UniformFloatVec4(e,t,i,r);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new UniformSampler(e,t,i,r);case e.INT:case e.BOOL:return new UniformInt(e,t,i,r);case e.INT_VEC2:case e.BOOL_VEC2:return new UniformIntVec2(e,t,i,r);case e.INT_VEC3:case e.BOOL_VEC3:return new UniformIntVec3(e,t,i,r);case e.INT_VEC4:case e.BOOL_VEC4:return new UniformIntVec4(e,t,i,r);case e.FLOAT_MAT2:return new UniformMat2(e,t,i,r);case e.FLOAT_MAT3:return new UniformMat3(e,t,i,r);case e.FLOAT_MAT4:return new UniformMat4(e,t,i,r);default:throw new RuntimeError("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function UniformFloat(e,t,i,r){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=r}function UniformFloatVec2(e,t,i,r){this.name=i,this.value=void 0,this._value=new Cartesian2,this._gl=e,this._location=r}function UniformFloatVec3(e,t,i,r){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=r}function UniformFloatVec4(e,t,i,r){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=r}function UniformSampler(e,t,i,r){this.name=i,this.value=void 0,this._gl=e,this._location=r,this.textureUnitIndex=void 0}function UniformInt(e,t,i,r){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=r}function UniformIntVec2(e,t,i,r){this.name=i,this.value=void 0,this._value=new Cartesian2,this._gl=e,this._location=r}function UniformIntVec3(e,t,i,r){this.name=i,this.value=void 0,this._value=new Cartesian3,this._gl=e,this._location=r}function UniformIntVec4(e,t,i,r){this.name=i,this.value=void 0,this._value=new Cartesian4,this._gl=e,this._location=r}UniformFloat.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},UniformFloatVec2.prototype.set=function(){var e=this.value;Cartesian2.equals(e,this._value)||(Cartesian2.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},UniformFloatVec3.prototype.set=function(){var e=this.value;defined(e.red)?Color.equals(e,this._value)||(this._value=Color.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue)):defined(e.x)&&(Cartesian3.equals(e,this._value)||(this._value=Cartesian3.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z)))},UniformFloatVec4.prototype.set=function(){var e=this.value;defined(e.red)?Color.equals(e,this._value)||(this._value=Color.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha)):defined(e.x)&&(Cartesian4.equals(e,this._value)||(this._value=Cartesian4.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w)))},UniformSampler.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},UniformSampler.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},UniformInt.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},UniformIntVec2.prototype.set=function(){var e=this.value;Cartesian2.equals(e,this._value)||(Cartesian2.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},UniformIntVec3.prototype.set=function(){var e=this.value;Cartesian3.equals(e,this._value)||(Cartesian3.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},UniformIntVec4.prototype.set=function(){var e=this.value;Cartesian4.equals(e,this._value)||(Cartesian4.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var scratchUniformArray=new Float32Array(4);function UniformMat2(e,t,i,r){this.name=i,this.value=void 0,this._value=new Matrix2,this._gl=e,this._location=r}UniformMat2.prototype.set=function(){var e;Matrix2.equalsArray(this.value,this._value,0)||(Matrix2.clone(this.value,this._value),e=Matrix2.toArray(this.value,scratchUniformArray),this._gl.uniformMatrix2fv(this._location,!1,e))};var scratchMat3Array=new Float32Array(9);function UniformMat3(e,t,i,r){this.name=i,this.value=void 0,this._value=new Matrix3,this._gl=e,this._location=r}UniformMat3.prototype.set=function(){var e;Matrix3.equalsArray(this.value,this._value,0)||(Matrix3.clone(this.value,this._value),e=Matrix3.toArray(this.value,scratchMat3Array),this._gl.uniformMatrix3fv(this._location,!1,e))};var scratchMat4Array=new Float32Array(16);function UniformMat4(e,t,i,r){this.name=i,this.value=void 0,this._value=new Matrix4,this._gl=e,this._location=r}function createUniformArray(e,t,i,r){switch(t.type){case e.FLOAT:return new UniformArrayFloat(e,t,i,r);case e.FLOAT_VEC2:return new UniformArrayFloatVec2(e,t,i,r);case e.FLOAT_VEC3:return new UniformArrayFloatVec3(e,t,i,r);case e.FLOAT_VEC4:return new UniformArrayFloatVec4(e,t,i,r);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new UniformArraySampler(e,t,i,r);case e.INT:case e.BOOL:return new UniformArrayInt(e,t,i,r);case e.INT_VEC2:case e.BOOL_VEC2:return new UniformArrayIntVec2(e,t,i,r);case e.INT_VEC3:case e.BOOL_VEC3:return new UniformArrayIntVec3(e,t,i,r);case e.INT_VEC4:case e.BOOL_VEC4:return new UniformArrayIntVec4(e,t,i,r);case e.FLOAT_MAT2:return new UniformArrayMat2(e,t,i,r);case e.FLOAT_MAT3:return new UniformArrayMat3(e,t,i,r);case e.FLOAT_MAT4:return new UniformArrayMat4(e,t,i,r);default:throw new RuntimeError("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function UniformArrayFloat(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(n),this._gl=e,this._location=r[0]}function UniformArrayFloatVec2(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(2*n),this._gl=e,this._location=r[0]}function UniformArrayFloatVec3(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(3*n),this._gl=e,this._location=r[0]}function UniformArrayFloatVec4(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(4*n),this._gl=e,this._location=r[0]}function UniformArraySampler(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(n),this._gl=e,this._locations=r,this.textureUnitIndex=void 0}function UniformArrayInt(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Int32Array(n),this._gl=e,this._location=r[0]}function UniformArrayIntVec2(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Int32Array(2*n),this._gl=e,this._location=r[0]}function UniformArrayIntVec3(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Int32Array(3*n),this._gl=e,this._location=r[0]}function UniformArrayIntVec4(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Int32Array(4*n),this._gl=e,this._location=r[0]}function UniformArrayMat2(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(4*n),this._gl=e,this._location=r[0]}function UniformArrayMat3(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(9*n),this._gl=e,this._location=r[0]}function UniformArrayMat4(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(16*n),this._gl=e,this._location=r[0]}UniformMat4.prototype.set=function(){var e;Matrix4.equalsArray(this.value,this._value,0)||(Matrix4.clone(this.value,this._value),e=Matrix4.toArray(this.value,scratchMat4Array),this._gl.uniformMatrix4fv(this._location,!1,e))},UniformArrayFloat.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0;n<t;++n){var a=e[n];a!==i[n]&&(i[n]=a,r=!0)}r&&this._gl.uniform1fv(this._location,i)},UniformArrayFloatVec2.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Cartesian2.equalsArray(o,i,n)||(Cartesian2.pack(o,i,n),r=!0),n+=2}r&&this._gl.uniform2fv(this._location,i)},UniformArrayFloatVec3.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];defined(o.red)?o.red===i[n]&&o.green===i[n+1]&&o.blue===i[n+2]||(i[n]=o.red,i[n+1]=o.green,i[n+2]=o.blue,r=!0):defined(o.x)&&(Cartesian3.equalsArray(o,i,n)||(Cartesian3.pack(o,i,n),r=!0)),n+=3}r&&this._gl.uniform3fv(this._location,i)},UniformArrayFloatVec4.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];defined(o.red)?Color.equalsArray(o,i,n)||(Color.pack(o,i,n),r=!0):defined(o.x)&&(Cartesian4.equalsArray(o,i,n)||(Cartesian4.pack(o,i,n),r=!0)),n+=4}r&&this._gl.uniform4fv(this._location,i)},UniformArraySampler.prototype.set=function(){for(var e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,i=this.value,r=i.length,n=0;n<r;++n){var a=i[n];e.activeTexture(t+n),e.bindTexture(a._target,a._texture)}},UniformArraySampler.prototype._setSampler=function(e){this.textureUnitIndex=e;for(var t=this._locations,i=t.length,r=0;r<i;++r){var n=e+r;this._gl.uniform1i(t[r],n)}return e+i},UniformArrayInt.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0;n<t;++n){var a=e[n];a!==i[n]&&(i[n]=a,r=!0)}r&&this._gl.uniform1iv(this._location,i)},UniformArrayIntVec2.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Cartesian2.equalsArray(o,i,n)||(Cartesian2.pack(o,i,n),r=!0),n+=2}r&&this._gl.uniform2iv(this._location,i)},UniformArrayIntVec3.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Cartesian3.equalsArray(o,i,n)||(Cartesian3.pack(o,i,n),r=!0),n+=3}r&&this._gl.uniform3iv(this._location,i)},UniformArrayIntVec4.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Cartesian4.equalsArray(o,i,n)||(Cartesian4.pack(o,i,n),r=!0),n+=4}r&&this._gl.uniform4iv(this._location,i)},UniformArrayMat2.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Matrix2.equalsArray(o,i,n)||(Matrix2.pack(o,i,n),r=!0),n+=4}r&&this._gl.uniformMatrix2fv(this._location,!1,i)},UniformArrayMat3.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Matrix3.equalsArray(o,i,n)||(Matrix3.pack(o,i,n),r=!0),n+=9}r&&this._gl.uniformMatrix3fv(this._location,!1,i)},UniformArrayMat4.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Matrix4.equalsArray(o,i,n)||(Matrix4.pack(o,i,n),r=!0),n+=16}r&&this._gl.uniformMatrix4fv(this._location,!1,i)};var nextShaderProgramId=0;function ShaderProgram(e){var t=e.vertexShaderText,i=e.fragmentShaderText;"undefined"!=typeof spector&&(t=t.replace(/^#line/gm,"//#line"),i=i.replace(/^#line/gm,"//#line")),i=handleUniformPrecisionMismatches(t,i),this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=i.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=i.fragmentShaderText,this.id=nextShaderProgramId++}function extractUniforms(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(defined(i))for(var r=i.length,n=0;n<r;n++){var a=(a=i[n].trim()).slice(a.lastIndexOf(" ")+1);t.push(a)}return t}function handleUniformPrecisionMismatches(e,t){var i={};if(!ContextLimits.highpFloatSupported||!ContextLimits.highpIntSupported)for(var r,n,a,o,s=extractUniforms(e),l=extractUniforms(t),c=s.length,u=l.length,d=0;d<c;d++)for(r=0;r<u;r++)s[d]===l[r]&&(a="czm_mediump_"+(n=s[d]),o=new RegExp(n+"\\b","g"),t=t.replace(o,a),i[a]=n);return{fragmentShaderText:t,duplicateUniformNames:i}}ShaderProgram.fromCache=function(e){return(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context.shaderCache.getShaderProgram(e)},ShaderProgram.replaceCache=function(e){return(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context.shaderCache.replaceShaderProgram(e)},Object.defineProperties(ShaderProgram.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return initialize$1(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return initialize$1(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return initialize$1(this),this._uniformsByName}}});var consolePrefix="[Cesium WebGL] ";function createAndLinkProgram(e,t){var i=t._vertexShaderText,r=t._fragmentShaderText,n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,i),e.compileShader(n),i=e.createShader(e.FRAGMENT_SHADER),e.shaderSource(i,r),e.compileShader(i);var a=e.createProgram();e.attachShader(a,n),e.attachShader(a,i),e.deleteShader(n),e.deleteShader(i);var o=t._attributeLocations;if(defined(o))for(var s in o)o.hasOwnProperty(s)&&e.bindAttribLocation(a,o[s],s);if(e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){if(r=t._debugShaders,!e.getShaderParameter(i,e.COMPILE_STATUS)){var l,c=e.getShaderInfoLog(i);throw console.error(consolePrefix+"Fragment shader compile log: "+c),defined(r)&&(""!==(l=r.getTranslatedShaderSource(i))?console.error(consolePrefix+"Translated fragment shader source:\n"+l):console.error(consolePrefix+"Fragment shader translation failed.")),e.deleteProgram(a),new RuntimeError("Fragment shader failed to compile.  Compile log: "+c)}if(!e.getShaderParameter(n,e.COMPILE_STATUS))throw c=e.getShaderInfoLog(n),console.error(consolePrefix+"Vertex shader compile log: "+c),defined(r)&&(""!==(l=r.getTranslatedShaderSource(n))?console.error(consolePrefix+"Translated vertex shader source:\n"+l):console.error(consolePrefix+"Vertex shader translation failed.")),e.deleteProgram(a),new RuntimeError("Vertex shader failed to compile.  Compile log: "+c);throw c=e.getProgramInfoLog(a),console.error(consolePrefix+"Shader program link log: "+c),defined(r)&&(console.error(consolePrefix+"Translated vertex shader source:\n"+r.getTranslatedShaderSource(n)),console.error(consolePrefix+"Translated fragment shader source:\n"+r.getTranslatedShaderSource(i))),e.deleteProgram(a),new RuntimeError("Program failed to link.  Link log: "+c)}return(t=t._logShaderCompilation)&&defined(c=e.getShaderInfoLog(n))&&0<c.length&&console.log(consolePrefix+"Vertex shader compile log: "+c),t&&defined(c=e.getShaderInfoLog(i))&&0<c.length&&console.log(consolePrefix+"Fragment shader compile log: "+c),t&&defined(c=e.getProgramInfoLog(a))&&0<c.length&&console.log(consolePrefix+"Shader program link log: "+c),a}function findVertexAttributes(e,t,i){for(var r={},n=0;n<i;++n){var a=e.getActiveAttrib(t,n),o=e.getAttribLocation(t,a.name);r[a.name]={name:a.name,type:a.type,index:o}}return r}function findUniforms(e,t){for(var i={},r=[],n=[],a=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),o=0;o<a;++o){var s=e.getActiveUniform(t,o),l=-1!==s.name.indexOf("[0]",s.name.length-"[0]".length)?s.name.slice(0,s.name.length-3):s.name;if(0!==l.indexOf("gl_"))if(s.name.indexOf("[")<0){var c=e.getUniformLocation(t,l);null!==c&&(p=createUniform$1(e,s,l,c),i[l]=p,r.push(p),p._setSampler&&n.push(p))}else{var u,d,h,p=l.indexOf("[");if(0<=p)defined(u=i[l.slice(0,p)])&&(d=u._locations).length<=1&&(p=u.value,null!==(h=e.getUniformLocation(t,l))&&(d.push(h),p.push(e.getUniform(t,h))));else{d=[];for(var f=0;f<s.size;++f)null!==(h=e.getUniformLocation(t,l+"["+f+"]"))&&d.push(h);u=createUniformArray(e,s,l,d),i[l]=u,r.push(u),u._setSampler&&n.push(u)}}}return{uniformsByName:i,uniforms:r,samplerUniforms:n}}function partitionUniforms(e,t){var i,r,n,a,o=[],s=[];for(i in t)t.hasOwnProperty(i)&&(r=t[i],a=i,defined(n=e._duplicateUniformNames[a])&&(a=r.name=n),defined(a=AutomaticUniforms[a])?o.push({uniform:r,automaticUniform:a}):s.push(r));return{automaticUniforms:o,manualUniforms:s}}function setSamplerUniforms(e,t,i){e.useProgram(t);for(var r=0,n=i.length,a=0;a<n;++a)r=i[a]._setSampler(r);return e.useProgram(null),r}function initialize$1(e){defined(e._program)||reinitialize(e)}function reinitialize(e){var t=e._program,i=e._gl,r=createAndLinkProgram(i,e,e._debugShaders),n=i.getProgramParameter(r,i.ACTIVE_ATTRIBUTES),a=findUniforms(i,r),o=partitionUniforms(e,a.uniformsByName);e._program=r,e._numberOfVertexAttributes=n,e._vertexAttributes=findVertexAttributes(i,r,n),e._uniformsByName=a.uniformsByName,e._uniforms=a.uniforms,e._automaticUniforms=o.automaticUniforms,e._manualUniforms=o.manualUniforms,e.maximumTextureUnitIndex=setSamplerUniforms(i,r,a.samplerUniforms),t&&e._gl.deleteProgram(t),"undefined"!=typeof spector&&(e._program.__SPECTOR_rebuildProgram=function(t,i,r,n){var a=e._vertexShaderText,o=e._fragmentShaderText,s=/ ! = /g;e._vertexShaderText=t.replace(s," != "),e._fragmentShaderText=i.replace(s," != ");try{reinitialize(e),r(e._program)}catch(t){e._vertexShaderText=a,e._fragmentShaderText=o,n((o=/(?:Compile|Link) error: ([^]*)/.exec(t.message))?o[1]:t.message)}})}function modernizeShader(e,t){var i=/#define OUTPUT_DECLARATION/,r=e.split("\n");if(/#version 300 es/g.test(e))return e;for(var n,a=-1,o=0;o<r.length;++o)if(n=r[o],i.test(n)){a=o;break}if(-1===a)throw new DeveloperError("Could not find a #define OUTPUT_DECLARATION!");var s=[];for(o=0;o<10;o++){var l="gl_FragData\\["+o+"\\]",c="czm_out"+o;new RegExp(l,"g").test(e)&&(setAdd(c,s),replaceInSourceString(l,c,r),r.splice(a,0,"layout(location = "+o+") out vec4 "+c+";"),a+=1)}var u="czm_fragColor";findInSource("gl_FragColor",r)&&(setAdd(u,s),replaceInSourceString("gl_FragColor",u,r),r.splice(a,0,"layout(location = 0) out vec4 czm_fragColor;"),a+=1);var d,h=getVariablePreprocessorBranch(s,r),p={};for(o=0;o<r.length;o++)for(var f in n=r[o],h)h.hasOwnProperty(f)&&new RegExp("(layout)[^]+(out)[^]+("+f+")[^]+","g").test(n)&&(p[n]=f);for(d in p)if(p.hasOwnProperty(d)){for(var m=p[d],g=r.indexOf(d),y=h[m],_=y.length,v=0;v<_;v++)r.splice(g,0,y[v]);for(g+=_+1,v=_-1;0<=v;v--)r.splice(g,0,"#endif //"+y[v])}u="WEBGL_2";var C="#version 300 es",x=!1;for(o=0;o<r.length;o++)if(/#version/.test(r[o])){r[o]=C,x=!0;break}return x||r.splice(0,0,C),r.splice(1,0,"#define WEBGL_2"),removeExtension("EXT_draw_buffers",u,r),removeExtension("EXT_frag_depth",u,r),removeExtension("OES_standard_derivatives",u,r),replaceInSourceString("texture2D","texture",r),replaceInSourceString("texture3D","texture",r),replaceInSourceString("textureCube","texture",r),replaceInSourceString("gl_FragDepthEXT","gl_FragDepth",r),t?replaceInSourceString("varying","in",r):(replaceInSourceString("attribute","in",r),replaceInSourceString("varying","out",r)),compileSource(r)}function replaceInSourceString(e,t,i){for(var r=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=i.length,a=0;a<n;++a){var o=i[a];i[a]=o.replace(r,"$1"+t+"$3")}}function replaceInSourceRegex(e,t,i){for(var r=i.length,n=0;n<r;++n){var a=i[n];i[n]=a.replace(e,t)}}function findInSource(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),r=t.length,n=0;n<r;++n){var a=t[n];if(i.test(a))return 1}}function compileSource(e){for(var t="",i=e.length,r=0;r<i;++r)t+=e[r]+"\n";return t}function setAdd(e,t){-1===t.indexOf(e)&&t.push(e)}function getVariablePreprocessorBranch(e,t){for(var i={},r=e.length,n=[],a=0;a<t.length;++a){var o=t[a],s=/(#ifdef|#if)/g.test(o),l=/#else/g.test(o),c=/#endif/g.test(o);if(s)n.push(o);else if(l)l=n[n.length-1].replace("ifdef","ifndef"),/if/g.test(l)&&(l=l.replace(/(#if\s+)(\S*)([^]*)/,"$1!($2)$3")),n.pop(),n.push(l);else if(c)n.pop();else if(!/layout/g.test(o))for(var u=0;u<r;++u){var d=e[u];-1!==o.indexOf(d)&&(defined(i[d])?i[d]=i[d].filter((function(e){return 0<=n.indexOf(e)})):i[d]=n.slice())}}return i}function removeExtension(e,t,i){replaceInSourceRegex(new RegExp("#extension\\s+GL_"+e+"\\s+:\\s+[a-zA-Z0-9]+\\s*$","g"),"",i),replaceInSourceString("GL_"+e,t,i)}ShaderProgram.prototype._bind=function(){initialize$1(this),this._gl.useProgram(this._program)},ShaderProgram.prototype._setUniforms=function(e,t,i){if(defined(e))for(var r=this._manualUniforms,n=r.length,a=0;a<n;++a){var o=r[a];o.value=e[o.name]()}var s=this._automaticUniforms;for(n=s.length,a=0;a<n;++a){var l=s[a];l.uniform.value=l.automaticUniform.getValue(t)}var c,u=this._uniforms;for(n=u.length,a=0;a<n;++a)u[a].set();i&&(c=this._gl,i=this._program,c.validateProgram(i))},ShaderProgram.prototype.isDestroyed=function(){return!1},ShaderProgram.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},ShaderProgram.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),destroyObject(this)};var czm_degreesPerRadian="const float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange="const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_epsilon1="const float czm_epsilon1 = 0.1;\n",czm_epsilon2="const float czm_epsilon2 = 0.01;\n",czm_epsilon3="const float czm_epsilon3 = 0.001;\n",czm_epsilon4="const float czm_epsilon4 = 0.0001;\n",czm_epsilon5="const float czm_epsilon5 = 0.00001;\n",czm_epsilon6="const float czm_epsilon6 = 0.000001;\n",czm_epsilon7="const float czm_epsilon7 = 0.0000001;\n",czm_infinity="const float czm_infinity = 5906376272000.0;\n",czm_oneOverPi="const float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi="const float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile="const float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification="const float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow="const float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification="const float czm_passClassification = 7.0;\n",czm_passCompute="const float czm_passCompute = 1.0;\n",czm_passEnvironment="const float czm_passEnvironment = 0.0;\n",czm_passGlobe="const float czm_passGlobe = 2.0;\n",czm_passOpaque="const float czm_passOpaque = 7.0;\n",czm_passOverlay="const float czm_passOverlay = 9.0;\n",czm_passTerrainClassification="const float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent="const float czm_passTranslucent = 8.0;\n",czm_pi="const float czm_pi = 3.141592653589793;\n",czm_piOverFour="const float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix="const float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree="const float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo="const float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree="const float czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D="const float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D="const float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView="const float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing="const float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius="const float czm_solarRadius = 695500000.0;\n",czm_threePiOver2="const float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi="const float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude="const float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct="struct czm_depthRangeStruct\n{\nfloat near;\nfloat far;\n};\n",czm_material="struct czm_material\n{\nvec3 diffuse;\nfloat specular;\nfloat shininess;\nvec3 normal;\nvec3 emission;\nfloat alpha;\n};\n",czm_materialInput="struct czm_materialInput\n{\nfloat s;\nvec2 st;\nvec3 str;\nvec3 normalEC;\nmat3 tangentToEyeMatrix;\nvec3 positionToEyeEC;\nfloat height;\nfloat slope;\nfloat aspect;\n};\n",czm_ray="struct czm_ray\n{\nvec3 origin;\nvec3 direction;\n};\n",czm_raySegment="struct czm_raySegment\n{\nfloat start;\nfloat stop;\n};\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_shadowParameters="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\nvec3 texCoords;\n#else\nvec2 texCoords;\n#endif\nfloat depthBias;\nfloat depth;\nfloat nDotL;\nvec2 texelStepSize;\nfloat normalShadingSmooth;\nfloat darkness;\n};\n",czm_HSBToRGB="const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 czm_HSBToRGB(vec3 hsb)\n{\nvec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\nreturn hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB="vec3 hueToRGB(float hue)\n{\nfloat r = abs(hue * 6.0 - 3.0) - 1.0;\nfloat g = 2.0 - abs(hue * 6.0 - 2.0);\nfloat b = 2.0 - abs(hue * 6.0 - 4.0);\nreturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\nvec3 czm_HSLToRGB(vec3 hsl)\n{\nvec3 rgb = hueToRGB(hsl.x);\nfloat c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\nreturn (rgb - 0.5) * c + hsl.z;\n}\n",czm_RGBToHSB="const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec3 czm_RGBToHSB(vec3 rgb)\n{\nvec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\nvec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\nfloat d = q.x - min(q.w, q.y);\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL="vec3 RGBtoHCV(vec3 rgb)\n{\nvec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\nvec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\nfloat c = q.x - min(q.w, q.y);\nfloat h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\nreturn vec3(h, c, q.x);\n}\nvec3 czm_RGBToHSL(vec3 rgb)\n{\nvec3 hcv = RGBtoHCV(rgb);\nfloat l = hcv.z - hcv.y * 0.5;\nfloat s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\nreturn vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ="vec3 czm_RGBToXYZ(vec3 rgb)\n{\nconst mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n0.3576, 0.7152, 0.1192,\n0.1805, 0.0722, 0.9505);\nvec3 xyz = RGB2XYZ * rgb;\nvec3 Yxy;\nYxy.r = xyz.g;\nfloat temp = dot(vec3(1.0), xyz);\nYxy.gb = xyz.rg / temp;\nreturn Yxy;\n}\n",czm_XYZToRGB="vec3 czm_XYZToRGB(vec3 Yxy)\n{\nconst mat3 XYZ2RGB = mat3( 3.2405, -0.9693,  0.0556,\n-1.5371,  1.8760, -0.2040,\n-0.4985,  0.0416,  1.0572);\nvec3 xyz;\nxyz.r = Yxy.r * Yxy.g / Yxy.b;\nxyz.g = Yxy.r;\nxyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\nreturn XYZ2RGB * xyz;\n}\n",czm_acesTonemapping="vec3 czm_acesTonemapping(vec3 color) {\nfloat g = 0.985;\nfloat a = 0.065;\nfloat b = 0.0001;\nfloat c = 0.433;\nfloat d = 0.238;\ncolor = (color * (color + a) - b) / (color * (g * color + c) + d);\ncolor = clamp(color, 0.0, 1.0);\nreturn color;\n}\n",czm_alphaWeight="float czm_alphaWeight(float a)\n{\nfloat z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nreturn pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias="vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\nfloat val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\nfloat val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\nval1 = val1 * (1.0 - val2);\nval1 = val1 * val1 * (3.0 - (2.0 * val1));\nval1 = pow(val1, 0.5);\nvec4 midColor = (color1 + color2) * 0.5;\nreturn mix(midColor, currentColor, val1);\n}\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\nreturn czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates="vec2 czm_approximateSphericalCoordinates(vec3 normal) {\nfloat latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\nfloat longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\nreturn vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_backFacing="bool czm_backFacing()\n{\nreturn gl_FrontFacing == false;\n}\n",czm_branchFreeTernary="float czm_branchFreeTernary(bool comparison, float a, float b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor="vec4 czm_cascadeColor(vec4 weights)\n{\nreturn vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\nvec4(0.0, 1.0, 0.0, 1.0) * weights.y +\nvec4(0.0, 0.0, 1.0, 1.0) * weights.z +\nvec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance="uniform vec4 shadowMap_cascadeDistances;\nfloat czm_cascadeDistance(vec4 weights)\n{\nreturn dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix="uniform mat4 shadowMap_cascadeMatrices[4];\nmat4 czm_cascadeMatrix(vec4 weights)\n{\nreturn shadowMap_cascadeMatrices[0] * weights.x +\nshadowMap_cascadeMatrices[1] * weights.y +\nshadowMap_cascadeMatrices[2] * weights.z +\nshadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights="uniform vec4 shadowMap_cascadeSplits[2];\nvec4 czm_cascadeWeights(float depthEye)\n{\nvec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\nvec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\nreturn near * far;\n}\n",czm_columbusViewMorph="vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\nvec3 p = mix(position2D.xyz, position3D.xyz, time);\nreturn vec4(p, 1.0);\n}\n",czm_computePosition="vec4 czm_computePosition();\n",czm_cosineAndSine="vec2 cordic(float angle)\n{\nvec2 vector = vec2(6.0725293500888267e-1, 0.0);\nfloat sense = (angle < 0.0) ? -1.0 : 1.0;\nmat2 rotation = mat2(1.0, sense, -sense, 1.0);\nvector = rotation * vector;\nangle -= sense * 7.8539816339744828e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfloat factor = sense * 5.0e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.6364760900080609e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.5e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4497866312686414e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.25e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2435499454676144e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.25e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.2418809995957350e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.125e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.1239833430268277e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.5625e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5623728620476831e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.8125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.8123410601011111e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.90625e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.9062301319669718e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.953125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9531225164788188e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.765625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.7656218955931946e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.8828125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.8828121119489829e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.44140625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4414062014936177e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.220703125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2207031189367021e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.103515625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.1035156174208773e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.0517578125e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.0517578115526096e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.52587890625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5258789061315762e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.62939453125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.6293945311019700e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.814697265625e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.8146972656064961e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.9073486328125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9073486328101870e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.5367431640625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.5367431640596084e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.76837158203125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.7683715820308884e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.384185791015625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.3841857910155797e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.1920928955078125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nreturn vector;\n}\nvec2 czm_cosineAndSine(float angle)\n{\nif (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n{\nif (angle < 0.0)\n{\nreturn -cordic(angle + czm_pi);\n}\nelse\n{\nreturn -cordic(angle - czm_pi);\n}\n}\nelse\n{\nreturn cordic(angle);\n}\n}\n",czm_decompressTextureCoordinates="vec2 czm_decompressTextureCoordinates(float encoded)\n{\nfloat temp = encoded / 4096.0;\nfloat xZeroTo4095 = floor(temp);\nfloat stx = xZeroTo4095 / 4095.0;\nfloat sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\nreturn vec2(stx, sty);\n}\n",czm_depthClamp="#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\nvarying float v_WindowZ;\n#endif\nvec4 czm_depthClamp(vec4 coords)\n{\n#ifndef LOG_DEPTH\n#ifdef GL_EXT_frag_depth\nv_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\ncoords.z = 0.0;\n#else\ncoords.z = min(coords.z, coords.w);\n#endif\n#endif\nreturn coords;\n}\n",czm_eastNorthUpToEyeCoordinates="mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\nvec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0));\nvec3 tangentEC = normalize(czm_normal3D * tangentMC);\nvec3 bitangentEC = normalize(cross(normalEC, tangentEC));\nreturn mat3(\ntangentEC.x,   tangentEC.y,   tangentEC.z,\nbitangentEC.x, bitangentEC.y, bitangentEC.z,\nnormalEC.x,    normalEC.y,    normalEC.z);\n}\n",czm_ellipsoidContainsPoint="bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\nvec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\nreturn (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidWgs84TextureCoordinates="vec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\nreturn vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon="bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\nreturn (abs(left - right) <= epsilon);\n}\n",czm_eyeOffset="vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\nvec4 p = positionEC;\nvec4 zEyeOffset = normalize(p) * eyeOffset.z;\np.xy += eyeOffset.xy + zEyeOffset.xy;\np.z += zEyeOffset.z;\nreturn p;\n}\n",czm_eyeToWindowCoordinates="vec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\nvec4 q = czm_projection * positionEC;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_fastApproximateAtan="float czm_fastApproximateAtan(float x) {\nreturn x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\nfloat czm_fastApproximateAtan(float x, float y) {\nfloat t = abs(x);\nfloat opposite = abs(y);\nfloat adjacent = max(t, opposite);\nopposite = min(t, opposite);\nt = czm_fastApproximateAtan(opposite / adjacent);\nt = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\nt = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\nt = czm_branchFreeTernary(y < 0.0, -t, t);\nreturn t;\n}\n",czm_fog="vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-(scalar * scalar));\nreturn mix(color, fogColor, fog);\n}\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\nreturn mix(color, fogColor, fog);\n}\n",czm_gammaCorrect="vec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\ncolor = pow(color, vec3(czm_gamma));\n#endif\nreturn color;\n}\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\ncolor.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\nreturn color;\n}\n",czm_geodeticSurfaceNormal="vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\nreturn normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial="czm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\nczm_material material;\nmaterial.diffuse = vec3(0.0);\nmaterial.specular = 0.0;\nmaterial.shininess = 1.0;\nmaterial.normal = materialInput.normalEC;\nmaterial.emission = vec3(0.0);\nmaterial.alpha = 1.0;\nreturn material;\n}\n",czm_getLambertDiffuse="float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\nreturn max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular="float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\nvec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\nfloat specular = max(dot(toReflectedLight, toEyeEC), 0.0);\nreturn pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getWaterNoise="vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\nfloat cosAngle = cos(angleInRadians);\nfloat sinAngle = sin(angleInRadians);\nvec2 s0 = vec2(1.0/17.0, 0.0);\nvec2 s1 = vec2(-1.0/29.0, 0.0);\nvec2 s2 = vec2(1.0/101.0, 1.0/59.0);\nvec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\ns0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\ns1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\ns2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\ns3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\nvec2 uv0 = (uv/103.0) + (time * s0);\nvec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\nvec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\nvec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\nuv0 = fract(uv0);\nuv1 = fract(uv1);\nuv2 = fract(uv2);\nuv3 = fract(uv3);\nvec4 noise = (texture2D(normalMap, uv0)) +\n(texture2D(normalMap, uv1)) +\n(texture2D(normalMap, uv2)) +\n(texture2D(normalMap, uv3));\nreturn ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_hue="vec3 czm_hue(vec3 rgb, float adjustment)\n{\nconst mat3 toYIQ = mat3(0.299,     0.587,     0.114,\n0.595716, -0.274453, -0.321263,\n0.211456, -0.522591,  0.311135);\nconst mat3 toRGB = mat3(1.0,  0.9563,  0.6210,\n1.0, -0.2721, -0.6474,\n1.0, -1.107,   1.7046);\nvec3 yiq = toYIQ * rgb;\nfloat hue = atan(yiq.z, yiq.y) + adjustment;\nfloat chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\nvec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\nreturn toRGB * color;\n}\n",czm_inverseGamma="vec3 czm_inverseGamma(vec3 color) {\nreturn pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_isEmpty="bool czm_isEmpty(czm_raySegment interval)\n{\nreturn (interval.stop < 0.0);\n}\n",czm_isFull="bool czm_isFull(czm_raySegment interval)\n{\nreturn (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction="float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\nfloat sinLatitude = sin(latitude);\nfloat mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\nreturn (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance="float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\nreturn abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance="float czm_luminance(vec3 rgb)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nreturn dot(rgb, W);\n}\n",czm_metersPerPixel="float czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\nfloat width = czm_viewport.z;\nfloat height = czm_viewport.w;\nfloat pixelWidth;\nfloat pixelHeight;\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nif (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n{\nfloat frustumWidth = right - left;\nfloat frustumHeight = top - bottom;\npixelWidth = frustumWidth / width;\npixelHeight = frustumHeight / height;\n}\nelse\n{\nfloat distanceToPixel = -positionEC.z;\nfloat inverseNear = 1.0 / czm_currentFrustum.x;\nfloat tanTheta = top * inverseNear;\npixelHeight = 2.0 * distanceToPixel * tanTheta / height;\ntanTheta = right * inverseNear;\npixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n}\nreturn max(pixelWidth, pixelHeight) * pixelRatio;\n}\nfloat czm_metersPerPixel(vec4 positionEC)\n{\nreturn czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates="vec4 czm_modelToWindowCoordinates(vec4 position)\n{\nvec4 q = czm_modelViewProjection * position;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_multiplyWithColorBalance="vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 target = left * right;\nfloat leftLuminance = dot(left, W);\nfloat rightLuminance = dot(right, W);\nfloat targetLuminance = dot(target, W);\nreturn ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar="float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\nfloat valueAtMin = nearFarScalar.y;\nfloat valueAtMax = nearFarScalar.w;\nfloat nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\nfloat farDistanceSq = nearFarScalar.z * nearFarScalar.z;\nfloat t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\nt = pow(clamp(t, 0.0, 1.0), 0.2);\nreturn mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode="vec3 czm_octDecode(vec2 encoded, float range)\n{\nif (encoded.x == 0.0 && encoded.y == 0.0) {\nreturn vec3(0.0, 0.0, 0.0);\n}\nencoded = encoded / range * 2.0 - 1.0;\nvec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\nif (v.z < 0.0)\n{\nv.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n}\nreturn normalize(v);\n}\nvec3 czm_octDecode(vec2 encoded)\n{\nreturn czm_octDecode(encoded, 255.0);\n}\nvec3 czm_octDecode(float encoded)\n{\nfloat temp = encoded / 256.0;\nfloat x = floor(temp);\nfloat y = (temp - x) * 256.0;\nreturn czm_octDecode(vec2(x, y));\n}\nvoid czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n{\nfloat temp = encoded.x / 65536.0;\nfloat x = floor(temp);\nfloat encodedFloat1 = (temp - x) * 65536.0;\ntemp = encoded.y / 65536.0;\nfloat y = floor(temp);\nfloat encodedFloat2 = (temp - y) * 65536.0;\nvector1 = czm_octDecode(encodedFloat1);\nvector2 = czm_octDecode(encodedFloat2);\nvector3 = czm_octDecode(vec2(x, y));\n}\n",czm_packDepth="vec4 czm_packDepth(float depth)\n{\nvec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\nenc = fract(enc);\nenc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\nreturn enc;\n}\n",czm_phong="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\nreturn czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\nreturn czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n}\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 ambient = vec3(0.0);\nvec3 color = ambient + material.emission;\ncolor += material.diffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_planeDistance="float czm_planeDistance(vec4 plane, vec3 point) {\nreturn (dot(plane.xyz, point) + plane.w);\n}\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\nreturn (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay="vec3 czm_pointAlongRay(czm_ray ray, float time)\n{\nreturn ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval="czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\nvec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\nvec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\nq = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\nfloat q2 = dot(q, q);\nfloat qw = dot(q, w);\nif (q2 > 1.0)\n{\nif (qw >= 0.0)\n{\nreturn czm_emptyRaySegment;\n}\nelse\n{\nfloat qw2 = qw * qw;\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nif (qw2 < product)\n{\nreturn czm_emptyRaySegment;\n}\nelse if (qw2 > product)\n{\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nfloat root0 = temp / w2;\nfloat root1 = difference / temp;\nif (root0 < root1)\n{\nczm_raySegment i = czm_raySegment(root0, root1);\nreturn i;\n}\nelse\n{\nczm_raySegment i = czm_raySegment(root1, root0);\nreturn i;\n}\n}\nelse\n{\nfloat root = sqrt(difference / w2);\nczm_raySegment i = czm_raySegment(root, root);\nreturn i;\n}\n}\n}\nelse if (q2 < 1.0)\n{\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nczm_raySegment i = czm_raySegment(0.0, temp / w2);\nreturn i;\n}\nelse\n{\nif (qw < 0.0)\n{\nfloat w2 = dot(w, w);\nczm_raySegment i = czm_raySegment(0.0, -qw / w2);\nreturn i;\n}\nelse\n{\nreturn czm_emptyRaySegment;\n}\n}\n}\n",czm_readDepth="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\nreturn czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective="float czm_readNonPerspective(float value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\nreturn value * oneOverW;\n}\n",czm_reverseLogDepth="float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nreturn far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\nreturn logZ;\n}\n",czm_sampleOctahedralProjection="vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\ndirection /= dot(vec3(1.0), abs(direction));\nvec2 rev = abs(direction.zx) - vec2(1.0);\nvec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\ndirection.z < 0.0 ? rev.y : -rev.y);\nvec2 uv = direction.y < 0.0 ? neg : direction.xz;\nvec2 coord = 0.5 * uv + vec2(0.5);\nvec2 pixel = 1.0 / textureSize;\nif (lod > 0.0)\n{\nfloat scale = 1.0 / pow(2.0, lod);\nfloat offset = ((textureSize.y + 1.0) / textureSize.x);\ncoord.x *= offset;\ncoord *= scale;\ncoord.x += offset + pixel.x;\ncoord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n}\nelse\n{\ncoord.x *= (textureSize.y / textureSize.x);\n}\n#ifndef OES_texture_float_linear\nvec3 color1 = texture2D(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\nvec3 color2 = texture2D(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\nvec3 color3 = texture2D(projectedMap, coord + pixel).rgb;\nvec3 color4 = texture2D(projectedMap, coord).rgb;\nvec2 texturePosition = coord * textureSize;\nfloat fu = fract(texturePosition.x);\nfloat fv = fract(texturePosition.y);\nvec3 average1 = mix(color4, color2, fu);\nvec3 average2 = mix(color1, color3, fu);\nvec3 color = mix(average1, average2, fv);\n#else\nvec3 color = texture2D(projectedMap, coord).rgb;\n#endif\nreturn color;\n}\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\nfloat currentLod = floor(lod + 0.5);\nfloat nextLod = min(currentLod + 1.0, maxLod);\nvec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\nvec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\nreturn mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation="vec3 czm_saturation(vec3 rgb, float adjustment)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 intensity = vec3(dot(rgb, W));\nreturn mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare="float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)\n{\nreturn czm_unpackDepth(textureCube(shadowMap, d));\n}\nfloat czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\nreturn texture2D(shadowMap, uv).r;\n#else\nreturn czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility="float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\nfloat strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\nfloat strength = step(0.0, nDotL);\n#endif\nvisibility *= strength;\n#endif\nvisibility = max(visibility, darkness);\nreturn visibility;\n}\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec3 uvw = shadowParameters.texCoords;\ndepth -= depthBias;\nfloat visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec2 uv = shadowParameters.texCoords;\ndepth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\nvec2 texelStepSize = shadowParameters.texelStepSize;\nfloat radius = 1.0;\nfloat dx0 = -texelStepSize.x * radius;\nfloat dy0 = -texelStepSize.y * radius;\nfloat dx1 = texelStepSize.x * radius;\nfloat dy1 = texelStepSize.y * radius;\nfloat visibility = (\nczm_shadowDepthCompare(shadowMap, uv, depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n) * (1.0 / 9.0);\n#else\nfloat visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",czm_signNotZero="float czm_signNotZero(float value)\n{\nreturn value >= 0.0 ? 1.0 : -1.0;\n}\nvec2 czm_signNotZero(vec2 value)\n{\nreturn vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\nvec3 czm_signNotZero(vec3 value)\n{\nreturn vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\nvec4 czm_signNotZero(vec4 value)\n{\nreturn vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n",czm_sphericalHarmonics="vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\nconst float c1 = 0.429043;\nconst float c2 = 0.511664;\nconst float c3 = 0.743125;\nconst float c4 = 0.886227;\nconst float c5 = 0.247708;\nvec3 L00 = coefficients[0];\nvec3 L1_1 = coefficients[1];\nvec3 L10 = coefficients[2];\nvec3 L11 = coefficients[3];\nvec3 L2_2 = coefficients[4];\nvec3 L2_1 = coefficients[5];\nvec3 L20 = coefficients[6];\nvec3 L21 = coefficients[7];\nvec3 L22 = coefficients[8];\nfloat x = normal.x;\nfloat y = normal.y;\nfloat z = normal.z;\nreturn c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_tangentToEyeSpaceMatrix="mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\nvec3 normal = normalize(normalEC);\nvec3 tangent = normalize(tangentEC);\nvec3 bitangent = normalize(bitangentEC);\nreturn mat3(tangent.x  , tangent.y  , tangent.z,\nbitangent.x, bitangent.y, bitangent.z,\nnormal.x   , normal.y   , normal.z);\n}\n",czm_transformPlane="vec4 czm_transformPlane(vec4 plane, mat4 transform) {\nvec4 transformedPlane = transform * plane;\nfloat normalMagnitude = length(transformedPlane.xyz);\nreturn transformedPlane / normalMagnitude;\n}\n",czm_translateRelativeToEye="vec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\nvec3 highDifference = high - czm_encodedCameraPositionMCHigh;\nvec3 lowDifference = low - czm_encodedCameraPositionMCLow;\nreturn vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong="vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n}\ndiffuse = clamp(diffuse, 0.0, 1.0);\nfloat specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_transpose="mat2 czm_transpose(mat2 matrix)\n{\nreturn mat2(\nmatrix[0][0], matrix[1][0],\nmatrix[0][1], matrix[1][1]);\n}\nmat3 czm_transpose(mat3 matrix)\n{\nreturn mat3(\nmatrix[0][0], matrix[1][0], matrix[2][0],\nmatrix[0][1], matrix[1][1], matrix[2][1],\nmatrix[0][2], matrix[1][2], matrix[2][2]);\n}\nmat4 czm_transpose(mat4 matrix)\n{\nreturn mat4(\nmatrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\nmatrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\nmatrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\nmatrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth="float czm_unpackDepth(vec4 packedDepth)\n{\nreturn dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n",czm_unpackFloat="#define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n#define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n#define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n#define BIAS 38.0\nfloat czm_unpackFloat(vec4 packedFloat)\n{\npackedFloat *= 255.0;\nfloat temp = packedFloat.w / 2.0;\nfloat exponent = floor(temp);\nfloat sign = (temp - exponent) * 2.0;\nexponent = exponent - float(BIAS);\nsign = sign * 2.0 - 1.0;\nsign = -sign;\nfloat unpacked = sign * packedFloat.x * float(SHIFT_RIGHT_8);\nunpacked += sign * packedFloat.y * float(SHIFT_RIGHT_16);\nunpacked += sign * packedFloat.z * float(SHIFT_RIGHT_24);\nreturn unpacked * pow(10.0, exponent);\n}\n",czm_vertexLogDepth="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n#ifdef SHADOW_MAP\nvec3 logPositionEC = (czm_inverseProjection * coords).xyz;\nv_logPositionEC = logPositionEC;\n#endif\ncoords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\nreturn coords;\n}\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;\ngl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;\nczm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates="vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\nfloat x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\nfloat y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\nfloat z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nvec4 q = vec4(x, y, z, 1.0);\nq /= fragmentCoordinate.w;\nif (!(czm_inverseProjection == mat4(0.0)))\n{\nq = czm_inverseProjection * q;\n}\nelse\n{\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nq.x = (q.x * (right - left) + left + right) * 0.5;\nq.y = (q.y * (top - bottom) + bottom + top) * 0.5;\nq.z = (q.z * (near - far) - near - far) * 0.5;\nq.w = 1.0;\n}\nreturn q;\n}\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nfloat depthFromCamera = depthFromNear + near;\nvec4 windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\neyeCoordinate.w = 1.0 / depthFromCamera;\nreturn eyeCoordinate;\n#else\nvec4 windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\nreturn eyeCoordinate;\n}\n",czm_writeDepthClamp="#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\nvarying float v_WindowZ;\n#endif\nvoid czm_writeDepthClamp()\n{\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\ngl_FragDepthEXT = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);\n#endif\n}\n",czm_writeLogDepth="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n#endif\nvoid czm_writeLogDepth(float depth)\n{\n#if defined(GL_EXT_frag_depth) && defined(LOG_DEPTH)\nif (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\ndiscard;\n}\n#ifdef POLYGON_OFFSET\nfloat factor = u_polygonOffset[0];\nfloat units = u_polygonOffset[1];\n#ifdef GL_OES_standard_derivatives\nfloat x = dFdx(depth);\nfloat y = dFdy(depth);\nfloat m = sqrt(x * x + y * y);\ndepth += m * factor;\n#endif\n#endif\ngl_FragDepthEXT = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\ngl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n#endif\n}\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\nczm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective="float czm_writeNonPerspective(float value, float w) {\nreturn value * w;\n}\nvec2 czm_writeNonPerspective(vec2 value, float w) {\nreturn value * w;\n}\nvec3 czm_writeNonPerspective(vec3 value, float w) {\nreturn value * w;\n}\nvec4 czm_writeNonPerspective(vec4 value, float w) {\nreturn value * w;\n}\n",CzmBuiltins={czm_degreesPerRadian:czm_degreesPerRadian,czm_depthRange:czm_depthRange,czm_epsilon1:czm_epsilon1,czm_epsilon2:czm_epsilon2,czm_epsilon3:czm_epsilon3,czm_epsilon4:czm_epsilon4,czm_epsilon5:czm_epsilon5,czm_epsilon6:czm_epsilon6,czm_epsilon7:czm_epsilon7,czm_infinity:czm_infinity,czm_oneOverPi:czm_oneOverPi,czm_oneOverTwoPi:czm_oneOverTwoPi,czm_passCesium3DTile:czm_passCesium3DTile,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,czm_passClassification:czm_passClassification,czm_passCompute:czm_passCompute,czm_passEnvironment:czm_passEnvironment,czm_passGlobe:czm_passGlobe,czm_passOpaque:czm_passOpaque,czm_passOverlay:czm_passOverlay,czm_passTerrainClassification:czm_passTerrainClassification,czm_passTranslucent:czm_passTranslucent,czm_pi:czm_pi,czm_piOverFour:czm_piOverFour,czm_piOverSix:czm_piOverSix,czm_piOverThree:czm_piOverThree,czm_piOverTwo:czm_piOverTwo,czm_radiansPerDegree:czm_radiansPerDegree,czm_sceneMode2D:czm_sceneMode2D,czm_sceneMode3D:czm_sceneMode3D,czm_sceneModeColumbusView:czm_sceneModeColumbusView,czm_sceneModeMorphing:czm_sceneModeMorphing,czm_solarRadius:czm_solarRadius,czm_threePiOver2:czm_threePiOver2,czm_twoPi:czm_twoPi,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude,czm_depthRangeStruct:czm_depthRangeStruct,czm_material:czm_material,czm_materialInput:czm_materialInput,czm_ray:czm_ray,czm_raySegment:czm_raySegment,czm_shadowParameters:czm_shadowParameters,czm_HSBToRGB:czm_HSBToRGB,czm_HSLToRGB:czm_HSLToRGB,czm_RGBToHSB:czm_RGBToHSB,czm_RGBToHSL:czm_RGBToHSL,czm_RGBToXYZ:czm_RGBToXYZ,czm_XYZToRGB:czm_XYZToRGB,czm_acesTonemapping:czm_acesTonemapping,czm_alphaWeight:czm_alphaWeight,czm_antialias:czm_antialias,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates,czm_backFacing:czm_backFacing,czm_branchFreeTernary:czm_branchFreeTernary,czm_cascadeColor:czm_cascadeColor,czm_cascadeDistance:czm_cascadeDistance,czm_cascadeMatrix:czm_cascadeMatrix,czm_cascadeWeights:czm_cascadeWeights,czm_columbusViewMorph:czm_columbusViewMorph,czm_computePosition:czm_computePosition,czm_cosineAndSine:czm_cosineAndSine,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates,czm_depthClamp:czm_depthClamp,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates,czm_equalsEpsilon:czm_equalsEpsilon,czm_eyeOffset:czm_eyeOffset,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates,czm_fastApproximateAtan:czm_fastApproximateAtan,czm_fog:czm_fog,czm_gammaCorrect:czm_gammaCorrect,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal,czm_getDefaultMaterial:czm_getDefaultMaterial,czm_getLambertDiffuse:czm_getLambertDiffuse,czm_getSpecular:czm_getSpecular,czm_getWaterNoise:czm_getWaterNoise,czm_hue:czm_hue,czm_inverseGamma:czm_inverseGamma,czm_isEmpty:czm_isEmpty,czm_isFull:czm_isFull,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,czm_lineDistance:czm_lineDistance,czm_luminance:czm_luminance,czm_metersPerPixel:czm_metersPerPixel,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance,czm_nearFarScalar:czm_nearFarScalar,czm_octDecode:czm_octDecode,czm_packDepth:czm_packDepth,czm_phong:czm_phong,czm_planeDistance:czm_planeDistance,czm_pointAlongRay:czm_pointAlongRay,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,czm_readDepth:czm_readDepth,czm_readNonPerspective:czm_readNonPerspective,czm_reverseLogDepth:czm_reverseLogDepth,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection,czm_saturation:czm_saturation,czm_shadowDepthCompare:czm_shadowDepthCompare,czm_shadowVisibility:czm_shadowVisibility,czm_signNotZero:czm_signNotZero,czm_sphericalHarmonics:czm_sphericalHarmonics,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,czm_transformPlane:czm_transformPlane,czm_translateRelativeToEye:czm_translateRelativeToEye,czm_translucentPhong:czm_translucentPhong,czm_transpose:czm_transpose,czm_unpackDepth:czm_unpackDepth,czm_unpackFloat:czm_unpackFloat,czm_vertexLogDepth:czm_vertexLogDepth,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates,czm_writeDepthClamp:czm_writeDepthClamp,czm_writeLogDepth:czm_writeLogDepth,czm_writeNonPerspective:czm_writeNonPerspective},builtinName,uniformName,uniform;function removeComments(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,(function(e){for(var t=e.match(/\n/gm).length,i="",r=0;r<t;++r)i+="\n";return i}))}function getDependencyNode(e,t,i){for(var r,n=0;n<i.length;++n)i[n].name===e&&(r=i[n]);return defined(r)||(r={name:e,glslSource:t=removeComments(t),dependsOn:[],requiredBy:[],evaluated:!1},i.push(r)),r}function generateDependencies(e,t){var i;e.evaluated||(e.evaluated=!0,defined(i=e.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g))&&null!==i&&(i=i.filter((function(e,t){return i.indexOf(e)===t}))).forEach((function(i){i!==e.name&&ShaderSource._czmBuiltinsAndUniforms.hasOwnProperty(i)&&(i=getDependencyNode(i,ShaderSource._czmBuiltinsAndUniforms[i],t),e.dependsOn.push(i),i.requiredBy.push(e),generateDependencies(i,t))})))}function sortDependencies(e){for(var t=[],i=[];0<e.length;){var r=e.pop();i.push(r),0===r.requiredBy.length&&t.push(r)}for(;0<t.length;){var n=t.shift();e.push(n);for(var a=0;a<n.dependsOn.length;++a){var o=n.dependsOn[a],s=o.requiredBy.indexOf(n);o.requiredBy.splice(s,1),0===o.requiredBy.length&&t.push(o)}}for(var l=0;l<i.length;++l)i[l].requiredBy.length}function getBuiltinsAndAutomaticUniforms(e){var t=[];generateDependencies(e=getDependencyNode("main",e,t),t),sortDependencies(t);for(var i="",r=t.length-1;0<=r;--r)i=i+t[r].glslSource+"\n";return i.replace(e.glslSource,"")}function combineShader(e,t,i){var r,n,a="",o=e.sources;if(defined(o))for(d=0,r=o.length;d<r;++d)a+="\n#line 0\n"+o[d];a=(a=removeComments(a)).replace(/#version\s+(.*?)\n/gm,(function(e,t){return n=t,"\n"}));var s=[];a=(a=a.replace(/#extension.*\n/gm,(function(e){return s.push(e),"\n"}))).replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");var l=e.pickColorQualifier;defined(l)&&(a=ShaderSource.createPickFragmentShaderSource(a,l));var c="";defined(n)&&(c="#version "+n+"\n");for(var u=s.length,d=0;d<u;d++)c+=s[d];t&&(c+="#ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n#else\n    precision mediump float;\n    #define highp mediump\n#endif\n\n");var h=e.defines;if(defined(h))for(d=0,r=h.length;d<r;++d){var p=h[d];0!==p.length&&(c+="#define "+p+"\n")}return i.webgl2&&(c+="#define OUTPUT_DECLARATION\n\n"),i.textureFloatLinear&&(c+="#define OES_texture_float_linear\n\n"),e.includeBuiltIns&&(c+=getBuiltinsAndAutomaticUniforms(a)),c+="\n#line 0\n",c+=a,i.webgl2&&(c=modernizeShader(c,t)),c}function ShaderSource(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).pickColorQualifier;this.defines=defined(e.defines)?e.defines.slice(0):[],this.sources=defined(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=defaultValue(e.includeBuiltIns,!0)}for(builtinName in ShaderSource.prototype.clone=function(){return new ShaderSource({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})},ShaderSource.replaceMain=function(e,t){return t="void "+t+"()",e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)},ShaderSource.prototype.createCombinedVertexShader=function(e){return combineShader(this,!1,e)},ShaderSource.prototype.createCombinedFragmentShader=function(e){return combineShader(this,!0,e)},ShaderSource._czmBuiltinsAndUniforms={},CzmBuiltins)CzmBuiltins.hasOwnProperty(builtinName)&&(ShaderSource._czmBuiltinsAndUniforms[builtinName]=CzmBuiltins[builtinName]);for(uniformName in AutomaticUniforms)AutomaticUniforms.hasOwnProperty(uniformName)&&(uniform=AutomaticUniforms[uniformName],"function"==typeof uniform.getDeclaration&&(ShaderSource._czmBuiltinsAndUniforms[uniformName]=uniform.getDeclaration(uniformName)));ShaderSource.createPickVertexShaderSource=function(e){return ShaderSource.replaceMain(e,"czm_old_main")+"\nattribute vec4 pickColor; \nvarying vec4 czm_pickColor; \nvoid main() \n{ \n    czm_old_main(); \n    czm_pickColor = pickColor; \n}"},ShaderSource.createPickFragmentShaderSource=function(e,t){return ShaderSource.replaceMain(e,"czm_old_main")+"\n"+t+" vec4 czm_pickColor; \nvoid main() \n{ \n    czm_old_main(); \n    if (gl_FragColor.a == 0.0) { \n       discard; \n    } \n    gl_FragColor = czm_pickColor; \n}"},ShaderSource.findVarying=function(e,t){for(var i=e.sources,r=t.length,n=0;n<r;++n)for(var a=t[n],o=i.length,s=0;s<o;++s)if(-1!==i[s].indexOf(a))return a};var normalVaryingNames=["v_normalEC","v_normal"];ShaderSource.findNormalVarying=function(e){return ShaderSource.findVarying(e,normalVaryingNames)};var positionVaryingNames=["v_positionEC"];ShaderSource.findPositionVarying=function(e){return ShaderSource.findVarying(e,positionVaryingNames)};var ShadowVolumeAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n#ifdef EXTRUDED_GEOMETRY\nattribute vec3 extrudeDirection;\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\nvoid main()\n{\nvec4 position = czm_computePosition();\n#ifdef EXTRUDED_GEOMETRY\nfloat delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\ndelta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\nposition = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nv_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\nv_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\nvec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\nvec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\nvec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\nbool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\nplanes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\nplanes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\nidlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\nidlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\nplanes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\nplanes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\nvec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\nvec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\nvec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\nvec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // COLUMBUS_VIEW_2D\nvec3 eastWard = southEastCorner - southWestCorner;\nfloat eastExtent = length(eastWard);\neastWard /= eastExtent;\nvec3 northWard = northWestCorner - southWestCorner;\nfloat northExtent = length(northWard);\nnorthWard /= northExtent;\nv_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\nv_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\nv_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\nvec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\nvec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\nv_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\nv_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\nv_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif\ngl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);\n}\n",ShadowVolumeFS="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvoid main(void)\n{\n#ifdef VECTOR_TILE\ngl_FragColor = czm_gammaCorrect(u_highlightColor);\n#else\ngl_FragColor = vec4(1.0);\n#endif\nczm_writeDepthClamp();\n}\n",ClassificationType={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2,NUMBER_OF_CLASSIFICATION_TYPES:3},ClassificationType$1=Object.freeze(ClassificationType),DepthFunction={NEVER:WebGLConstants$1.NEVER,LESS:WebGLConstants$1.LESS,EQUAL:WebGLConstants$1.EQUAL,LESS_OR_EQUAL:WebGLConstants$1.LEQUAL,GREATER:WebGLConstants$1.GREATER,NOT_EQUAL:WebGLConstants$1.NOTEQUAL,GREATER_OR_EQUAL:WebGLConstants$1.GEQUAL,ALWAYS:WebGLConstants$1.ALWAYS},DepthFunction$1=Object.freeze(DepthFunction),BufferUsage={STREAM_DRAW:WebGLConstants$1.STREAM_DRAW,STATIC_DRAW:WebGLConstants$1.STATIC_DRAW,DYNAMIC_DRAW:WebGLConstants$1.DYNAMIC_DRAW,validate:function(e){return e===BufferUsage.STREAM_DRAW||e===BufferUsage.STATIC_DRAW||e===BufferUsage.DYNAMIC_DRAW}},BufferUsage$1=Object.freeze(BufferUsage);function Buffer$1(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context._gl,i=e.bufferTarget,r=e.typedArray,n=e.sizeInBytes,a=e.usage,o=defined(r);o&&(n=r.byteLength);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,o?r:n,a),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=n,this._usage=a,this._buffer=s,this.vertexArrayDestroyable=!0}function addAttribute(e,t,i,r){var n=defined(t.vertexBuffer),a=defined(t.value),o=t.value?t.value.length:t.componentsPerAttribute;t={index:defaultValue(t.index,i),enabled:defaultValue(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:a?t.value.slice(0):void 0,componentsPerAttribute:o,componentDatatype:defaultValue(t.componentDatatype,ComponentDatatype$1.FLOAT),normalize:defaultValue(t.normalize,!1),offsetInBytes:defaultValue(t.offsetInBytes,0),strideInBytes:defaultValue(t.strideInBytes,0),instanceDivisor:defaultValue(t.instanceDivisor,0)};if(n)t.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),0<this.instanceDivisor&&(r.glVertexAttribDivisor(t,this.instanceDivisor),r._vertexAttribDivisors[t]=this.instanceDivisor,r._previousDrawInstanced=!0)},t.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),0<this.instanceDivisor&&r.glVertexAttribDivisor(i,0)};else{switch(t.componentsPerAttribute){case 1:t.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:t.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:t.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:t.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}t.disableVertexAttribArray=function(e){}}e.push(t)}function bind(e,t,i){for(var r=0;r<t.length;++r){var n=t[r];n.enabled&&n.vertexAttrib(e)}defined(i)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i._getBuffer())}function VertexArray(e){for(var t,i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,r=i._gl,n=e.attributes,a=(e=e.indexBuffer,[]),o=1,s=!1,l=!1,c=n.length,u=0;u<c;++u)addAttribute(a,n[u],u,i);for(c=a.length,u=0;u<c;++u){var d=a[u];if(defined(d.vertexBuffer)&&0===d.instanceDivisor){var h=d.strideInBytes||d.componentsPerAttribute*ComponentDatatype$1.getSizeInBytes(d.componentDatatype);o=d.vertexBuffer.sizeInBytes/h;break}}for(u=0;u<c;++u)0<a[u].instanceDivisor&&(s=!0),defined(a[u].value)&&(l=!0);i.vertexArrayObject&&(t=i.glCreateVertexArray(),i.glBindVertexArray(t),bind(r,a,e),i.glBindVertexArray(null)),this._numberOfVertices=o,this._hasInstancedAttributes=s,this._hasConstantAttributes=l,this._context=i,this._gl=r,this._vao=t,this._attributes=a,this._indexBuffer=e}function computeNumberOfVertices(e){return e.values.length/e.componentsPerAttribute}function computeAttributeSizeInBytes(e){return ComponentDatatype$1.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function interleaveAttributes(e){var t,i,r,n=[];for(t in e)e.hasOwnProperty(t)&&defined(e[t])&&defined(e[t].values)&&(n.push(t),e[t].componentDatatype===ComponentDatatype$1.DOUBLE&&(e[t].componentDatatype=ComponentDatatype$1.FLOAT,e[t].values=ComponentDatatype$1.createTypedArray(ComponentDatatype$1.FLOAT,e[t].values)));var a=n.length;if(0<a)for(r=computeNumberOfVertices(e[n[0]]),p=1;p<a;++p){var o=computeNumberOfVertices(e[n[p]]);if(o!==r)throw new RuntimeError("Each attribute list must have the same number of vertices.  Attribute "+n[p]+" has a different number of vertices ("+o.toString()+") than attribute "+n[0]+" ("+r.toString()+").")}n.sort((function(t,i){return ComponentDatatype$1.getSizeInBytes(e[i].componentDatatype)-ComponentDatatype$1.getSizeInBytes(e[t].componentDatatype)}));var s=0,l={};for(p=0;p<a;++p)t=n[p],i=e[t],l[t]=s,s+=computeAttributeSizeInBytes(i);if(0<s){var c=ComponentDatatype$1.getSizeInBytes(e[n[0]].componentDatatype),u=s%c;0!=u&&(s+=c-u);for(var d=new ArrayBuffer(r*s),h={},p=0;p<a;++p){t=n[p];var f=ComponentDatatype$1.getSizeInBytes(e[t].componentDatatype);h[t]={pointer:ComponentDatatype$1.createTypedArray(e[t].componentDatatype,d),index:l[t]/f,strideInComponentType:s/f}}for(p=0;p<r;++p)for(var m=0;m<a;++m){t=n[m];for(var g=(i=e[t]).values,y=h[t],_=y.pointer,v=i.componentsPerAttribute,C=0;C<v;++C)_[y.index+C]=g[p*v+C];y.index+=y.strideInComponentType}return{buffer:d,offsetsInBytes:l,vertexSizeInBytes:s}}}function setVertexAttribDivisor(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var r=t._vertexAttribDivisors,n=e._attributes,a=ContextLimits.maximumVertexAttributes;if(i)for(var o=n.length,s=0;s<o;++s){var l,c=n[s];!c.enabled||(l=c.instanceDivisor)!==r[c=c.index]&&(t.glVertexAttribDivisor(c,l),r[c]=l)}else for(s=0;s<a;++s)0<r[s]&&(t.glVertexAttribDivisor(s,0),r[s]=0)}}function setConstantAttributes(e,t){for(var i=e._attributes,r=i.length,n=0;n<r;++n){var a=i[n];a.enabled&&defined(a.value)&&a.vertexAttrib(t)}}function BatchTable(e,t,i){var r,n,a,o,s,l,c;this._attributes=t,this._numberOfInstances=i,0!==t.length&&(r=getDatatype(t),s=e.floatingPointTexture,o=getStride(a=createOffsets(t,n=r===PixelDatatype$1.FLOAT&&!s),t,n),c=Math.floor(ContextLimits.maximumTextureSize/o),t=.5*(s=1/(e=o*(l=Math.min(i,c)))),l=.5*(i=1/(c=Math.ceil(i/l))),this._textureDimensions=new Cartesian2(e,c),this._textureStep=new Cartesian4(s,t,i,l),this._pixelDatatype=n?PixelDatatype$1.UNSIGNED_BYTE:r,this._packFloats=n,this._offsets=a,this._stride=o,this._texture=void 0,c*=4*e,this._batchValues=new(r!==PixelDatatype$1.FLOAT||n?Uint8Array:Float32Array)(c),this._batchValuesDirty=!1)}function getDatatype(e){for(var t=!1,i=e.length,r=0;r<i;++r)if(e[r].componentDatatype!==ComponentDatatype$1.UNSIGNED_BYTE){t=!0;break}return t?PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE}function getAttributeType(e,t){return 2===(t=e[t].componentsPerAttribute)?Cartesian2:3===t?Cartesian3:4===t?Cartesian4:Number}function createOffsets(e,t){for(var i=new Array(e.length),r=0,n=e.length,a=0;a<n;++a){var o=e[a].componentDatatype;i[a]=r,o!==ComponentDatatype$1.UNSIGNED_BYTE&&t?r+=4:++r}return i}function getStride(e,t,i){var r=e.length;e=e[r-1];return t[r-1].componentDatatype!==ComponentDatatype$1.UNSIGNED_BYTE&&i?e+4:e+1}Buffer$1.createVertexBuffer=function(e){return new Buffer$1({context:e.context,bufferTarget:WebGLConstants$1.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},Buffer$1.createIndexBuffer=function(e){var t=e.context,i=e.indexDatatype,r=IndexDatatype$1.getSizeInBytes(i),n=(e=new Buffer$1({context:t,bufferTarget:WebGLConstants$1.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})).sizeInBytes/r;return Object.defineProperties(e,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return r}},numberOfIndices:{get:function(){return n}}}),e},Object.defineProperties(Buffer$1.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),Buffer$1.prototype._getBuffer=function(){return this._buffer},Buffer$1.prototype.copyFromArrayView=function(e,t){t=defaultValue(t,0);var i=this._gl,r=this._bufferTarget;i.bindBuffer(r,this._buffer),i.bufferSubData(r,t,e),i.bindBuffer(r,null)},Buffer$1.prototype.copyFromBuffer=function(e,t,i,r){var n=WebGLConstants$1.COPY_READ_BUFFER,a=WebGLConstants$1.COPY_WRITE_BUFFER,o=this._gl;o.bindBuffer(a,this._buffer),o.bindBuffer(n,e._buffer),o.copyBufferSubData(n,a,t,i,r),o.bindBuffer(a,null),o.bindBuffer(n,null)},Buffer$1.prototype.getBufferData=function(e,t,i,r){t=defaultValue(t,0),i=defaultValue(i,0);var n=this._gl,a=WebGLConstants$1.COPY_READ_BUFFER;n.bindBuffer(a,this._buffer),n.getBufferSubData(a,t,e,i,r),n.bindBuffer(a,null)},Buffer$1.prototype.isDestroyed=function(){return!1},Buffer$1.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),destroyObject(this)},VertexArray.fromGeometry=function(e){var t,i,r,n,a,o=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,s=defaultValue(e.geometry,defaultValue.EMPTY_OBJECT),l=defaultValue(e.bufferUsage,BufferUsage$1.DYNAMIC_DRAW),c=defaultValue(e.attributeLocations,defaultValue.EMPTY_OBJECT),u=defaultValue(e.interleave,!1),d=defined(e=e.vertexArrayAttributes)?e:[],h=s.attributes;if(u){var p=interleaveAttributes(h);if(defined(p)){r=Buffer$1.createVertexBuffer({context:o,typedArray:p.buffer,usage:l});var f=p.offsetsInBytes,m=p.vertexSizeInBytes;for(t in h)h.hasOwnProperty(t)&&defined(h[t])&&(defined((i=h[t]).values)?d.push({index:c[t],vertexBuffer:r,componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,offsetInBytes:f[t],strideInBytes:m}):d.push({index:c[t],value:i.value,componentDatatype:i.componentDatatype,normalize:i.normalize}))}}else for(t in h)h.hasOwnProperty(t)&&defined(h[t])&&((n=(i=h[t]).componentDatatype)===ComponentDatatype$1.DOUBLE&&(n=ComponentDatatype$1.FLOAT),r=void 0,defined(i.values)&&(r=Buffer$1.createVertexBuffer({context:o,typedArray:ComponentDatatype$1.createTypedArray(n,i.values),usage:l})),d.push({index:c[t],vertexBuffer:r,value:i.value,componentDatatype:n,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize}));return defined(p=s.indices)&&(a=Geometry.computeNumberOfVertices(s)>=CesiumMath.SIXTY_FOUR_KILOBYTES&&o.elementIndexUint?Buffer$1.createIndexBuffer({context:o,typedArray:new Uint32Array(p),usage:l,indexDatatype:IndexDatatype$1.UNSIGNED_INT}):Buffer$1.createIndexBuffer({context:o,typedArray:new Uint16Array(p),usage:l,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT})),new VertexArray({context:o,attributes:d,indexBuffer:a})},Object.defineProperties(VertexArray.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),VertexArray.prototype.getAttribute=function(e){return this._attributes[e]},VertexArray.prototype._bind=function(){defined(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&setVertexAttribDivisor(this),this._hasConstantAttributes&&setConstantAttributes(this,this._gl)):bind(this._gl,this._attributes,this._indexBuffer)},VertexArray.prototype._unBind=function(){if(defined(this._vao))this._context.glBindVertexArray(null);else{for(var e=this._attributes,t=this._gl,i=0;i<e.length;++i){var r=e[i];r.enabled&&r.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}},VertexArray.prototype.isDestroyed=function(){return!1},VertexArray.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;defined(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var r=this._indexBuffer;return defined(r)&&!r.isDestroyed()&&r.vertexArrayDestroyable&&r.destroy(),defined(this._vao)&&this._context.glDeleteVertexArray(this._vao),destroyObject(this)},Object.defineProperties(BatchTable.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});var scratchPackedFloatCartesian4=new Cartesian4;function getPackedFloat(e,t,i){var r=Cartesian4.unpack(e,t,scratchPackedFloatCartesian4),n=Cartesian4.unpackFloat(r),a=(r=Cartesian4.unpack(e,t+4,scratchPackedFloatCartesian4),Cartesian4.unpackFloat(r));r=Cartesian4.unpack(e,t+8,scratchPackedFloatCartesian4);var o=Cartesian4.unpackFloat(r);return r=Cartesian4.unpack(e,t+12,scratchPackedFloatCartesian4),r=Cartesian4.unpackFloat(r),Cartesian4.fromElements(n,a,o,r,i)}function setPackedAttribute(e,t,i){var r=Cartesian4.packFloat(e.x,scratchPackedFloatCartesian4);Cartesian4.pack(r,t,i),r=Cartesian4.packFloat(e.y,r),Cartesian4.pack(r,t,i+4),r=Cartesian4.packFloat(e.z,r),Cartesian4.pack(r,t,i+8),r=Cartesian4.packFloat(e.w,r),Cartesian4.pack(r,t,i+12)}var scratchGetAttributeCartesian4=new Cartesian4;BatchTable.prototype.getBatchedAttribute=function(e,t,i){var r=this._attributes,n=this._offsets[t];n=4*this._stride*e+4*n,n=this._packFloats&&r[t].componentDatatype!==PixelDatatype$1.UNSIGNED_BYTE?getPackedFloat(this._batchValues,n,scratchGetAttributeCartesian4):Cartesian4.unpack(this._batchValues,n,scratchGetAttributeCartesian4);return defined((t=getAttributeType(r,t)).fromCartesian4)?t.fromCartesian4(n,i):defined(t.clone)?t.clone(n,i):n.x};var setAttributeScratchValues=[void 0,void 0,new Cartesian2,new Cartesian3,new Cartesian4],setAttributeScratchCartesian4=new Cartesian4;function createTexture(e,t){var i=e._textureDimensions;e._texture=new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:e._pixelDatatype,width:i.x,height:i.y,sampler:Sampler.NEAREST,flipY:!1})}function updateTexture(e){var t=e._textureDimensions;e._texture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function getGlslComputeSt(e){var t=e._stride;return 1===e._textureDimensions.y?"uniform vec4 batchTextureStep; \nvec2 computeSt(float batchId) \n{ \n    float stepX = batchTextureStep.x; \n    float centerX = batchTextureStep.y; \n    float numberOfAttributes = float("+t+"); \n    return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n":"uniform vec4 batchTextureStep; \nuniform vec2 batchTextureDimensions; \nvec2 computeSt(float batchId) \n{ \n    float stepX = batchTextureStep.x; \n    float centerX = batchTextureStep.y; \n    float stepY = batchTextureStep.z; \n    float centerY = batchTextureStep.w; \n    float numberOfAttributes = float("+t+"); \n    float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x); \n    float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x); \n    return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function getComponentType(e){return 1===e?"float":"vec"+e}function getComponentSwizzle(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}function getGlslAttributeFunction(e,t){var i=e._attributes[t],r=i.componentsPerAttribute,n=i.functionName,a=getComponentType(r);r=getComponentSwizzle(r),t=a+" "+n+"(float batchId) \n{ \n    vec2 st = computeSt(batchId); \n    st.x += batchTextureStep.x * float("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==PixelDatatype$1.UNSIGNED_BYTE?t+="vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture2D(batchTexture, st)); \ntextureValue.y = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0))); \n":t+="    vec4 textureValue = texture2D(batchTexture, st); \n",t+="    "+a+" value = textureValue"+r+"; \n",e._pixelDatatype!==PixelDatatype$1.UNSIGNED_BYTE||i.componentDatatype!==ComponentDatatype$1.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===PixelDatatype$1.FLOAT&&i.componentDatatype===ComponentDatatype$1.UNSIGNED_BYTE&&i.normalize&&(t+="value /= 255.0; \n"):t+="value *= 255.0; \n",t+"    return value; \n} \n"}function transformToWorldCoordinates(e,t,i){var r=!i,n=e.length;if(!r&&1<n)for(var a=e[0].modelMatrix,o=1;o<n;++o)if(!Matrix4.equals(a,e[o].modelMatrix)){r=!0;break}if(r)for(o=0;o<n;++o)defined(e[o].geometry)&&GeometryPipeline.transformToWorldCoordinates(e[o]);else Matrix4.multiplyTransformation(t,e[0].modelMatrix,t)}function addGeometryBatchId(e,t){var i=e.attributes,r=(e=i.position).values.length/e.componentsPerAttribute;i.batchId=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});for(var n=i.batchId.values,a=0;a<r;++a)n[a]=t}function addBatchIds(e){for(var t=e.length,i=0;i<t;++i){var r=e[i];defined(r.geometry)?addGeometryBatchId(r.geometry,i):defined(r.westHemisphereGeometry)&&defined(r.eastHemisphereGeometry)&&(addGeometryBatchId(r.westHemisphereGeometry,i),addGeometryBatchId(r.eastHemisphereGeometry,i))}}function geometryPipeline(e){var t,i=e.instances,r=e.projection,n=e.elementIndexUintSupported,a=e.scene3DOnly,o=e.vertexCacheOptimize,s=e.compressVertices,l=(e=e.modelMatrix,i.length);for(g=0;g<l;++g)if(defined(i[g].geometry)){i[g].geometry.primitiveType;break}if(transformToWorldCoordinates(i,e,a),!a)for(g=0;g<l;++g)defined(i[g].geometry)&&GeometryPipeline.splitLongitude(i[g]);if(addBatchIds(i),o)for(g=0;g<l;++g){var c=i[g];defined(c.geometry)?(GeometryPipeline.reorderForPostVertexCache(c.geometry),GeometryPipeline.reorderForPreVertexCache(c.geometry)):defined(c.westHemisphereGeometry)&&defined(c.eastHemisphereGeometry)&&(GeometryPipeline.reorderForPostVertexCache(c.westHemisphereGeometry),GeometryPipeline.reorderForPreVertexCache(c.westHemisphereGeometry),GeometryPipeline.reorderForPostVertexCache(c.eastHemisphereGeometry),GeometryPipeline.reorderForPreVertexCache(c.eastHemisphereGeometry))}var u=GeometryPipeline.combineInstances(i);for(l=u.length,g=0;g<l;++g){var d,h,p,f=(t=u[g]).attributes;if(a)for(d in f)f.hasOwnProperty(d)&&f[d].componentDatatype===ComponentDatatype$1.DOUBLE&&GeometryPipeline.encodeAttribute(t,d,d+"3DHigh",d+"3DLow");else for(d in f)f.hasOwnProperty(d)&&f[d].componentDatatype===ComponentDatatype$1.DOUBLE&&(h=d+"3D",p=d+"2D",GeometryPipeline.projectTo2D(t,d,h,p,r),defined(t.boundingSphere)&&"position"===d&&(t.boundingSphereCV=BoundingSphere.fromVertices(t.attributes.position2D.values)),GeometryPipeline.encodeAttribute(t,h,h+"High",h+"Low"),GeometryPipeline.encodeAttribute(t,p,p+"High",p+"Low"));s&&GeometryPipeline.compressVertices(t)}if(!n){for(var m=[],g=(l=u.length,0);g<l;++g)t=u[g],m=m.concat(GeometryPipeline.fitToUnsignedShortIndices(t));u=m}return u}function createPickOffsets(e,t,i,r){var n,a,o,s=r.length-1;o=0<=s?(n=(s=r[s]).offset+s.count,i[a=s.index].indices.length):i[a=n=0].indices.length;for(var l=e.length,c=0;c<l;++c){var u=e[c][t];defined(u)&&(o<n+(u=u.indices.length)&&(n=0,o=i[++a].indices.length),r.push({index:a,offset:n,count:u}),n+=u)}}function createInstancePickOffsets(e,t){var i=[];return createPickOffsets(e,"geometry",t,i),createPickOffsets(e,"westHemisphereGeometry",t,i),createPickOffsets(e,"eastHemisphereGeometry",t,i),i}BatchTable.prototype.setBatchedAttribute=function(e,t,i){var r=this._attributes,n=setAttributeScratchValues[r[t].componentsPerAttribute],a=this.getBatchedAttribute(e,t,n);(defined((n=getAttributeType(this._attributes,t)).equals)?n.equals(a,i):a===i)||((a=setAttributeScratchCartesian4).x=defined(i.x)?i.x:i,a.y=defined(i.y)?i.y:0,a.z=defined(i.z)?i.z:0,a.w=defined(i.w)?i.w:0,i=this._offsets[t],i=4*this._stride*e+4*i,this._packFloats&&r[t].componentDatatype!==PixelDatatype$1.UNSIGNED_BYTE?setPackedAttribute(a,this._batchValues,i):Cartesian4.pack(a,this._batchValues,i),this._batchValuesDirty=!0)},BatchTable.prototype.update=function(e){defined(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,defined(this._texture)||createTexture(this,e.context),updateTexture(this))},BatchTable.prototype.getUniformMapCallback=function(){var e=this;return function(t){return 0===e._attributes.length?t:combine(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}},BatchTable.prototype.getVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="uniform highp sampler2D batchTexture; \n";t+=getGlslComputeSt(this)+"\n";for(var i=e.length,r=0;r<i;++r)t+=getGlslAttributeFunction(this,r);return function(e){var i=e.indexOf("void main"),r=e.substring(0,i);i=e.substring(i);return r+"\n"+t+"\n"+i}},BatchTable.prototype.isDestroyed=function(){return!1},BatchTable.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),destroyObject(this)};var PrimitivePipeline={};function transferGeometry(e,t){var i,r,n=e.attributes;for(i in n)!n.hasOwnProperty(i)||defined(r=n[i])&&defined(r.values)&&t.push(r.values.buffer);defined(e.indices)&&t.push(e.indices.buffer)}function transferGeometries(e,t){for(var i=e.length,r=0;r<i;++r)transferGeometry(e[r],t)}function countCreateGeometryResults(e){for(var t=1,i=e.length,r=0;r<i;r++){var n=e[r];if(++t,defined(n)){var a,o=n.attributes;for(a in t+=7+2*BoundingSphere.packedLength+(defined(n.indices)?n.indices.length:0),o)o.hasOwnProperty(a)&&defined(o[a])&&(t+=5+o[a].values.length)}}return t}function packInstancesForCombine(e,t){var i=e.length,r=new Float64Array(1+19*i),n=0;r[n++]=i;for(var a=0;a<i;a++){var o=e[a];Matrix4.pack(o.modelMatrix,r,n),n+=Matrix4.packedLength,defined(o.attributes)&&defined(o.attributes.offset)&&(o=o.attributes.offset.value,r[n]=o[0],r[n+1]=o[1],r[n+2]=o[2]),n+=3}return t.push(r.buffer),r}function unpackInstancesForCombine(e){for(var t=e,i=new Array(t[0]),r=0,n=1;n<t.length;){var a,o=Matrix4.unpack(t,n);defined(t[n+=Matrix4.packedLength])&&(a={offset:new OffsetGeometryInstanceAttribute(t[n],t[n+1],t[n+2])}),n+=3,i[r++]={modelMatrix:o,attributes:a}}return i}function packBoundingSpheres(e){var t=e.length,i=1+(BoundingSphere.packedLength+1)*t,r=new Float32Array(i),n=0;r[n++]=t;for(var a=0;a<t;++a)defined(e[a])?(r[n++]=1,BoundingSphere.pack(e[a],r,n)):r[n++]=0,n+=BoundingSphere.packedLength;return r}function unpackBoundingSpheres(e){for(var t=new Array(e[0]),i=0,r=1;r<e.length;)1===e[r++]&&(t[i]=BoundingSphere.unpack(e,r)),++i,r+=BoundingSphere.packedLength;return t}PrimitivePipeline.combineGeometry=function(e){var t,i,r,n,a=e.instances,o=a.length,s=!1;0<o&&(0<(t=geometryPipeline(e)).length&&(i=GeometryPipeline.createAttributeLocations(t[0]),e.createPickOffsets&&(r=createInstancePickOffsets(a,t))),defined(a[0].attributes)&&defined(a[0].attributes.offset)&&(n=new Array(o),s=!0));for(var l=new Array(o),c=new Array(o),u=0;u<o;++u){var d=a[u],h=d.geometry;defined(h)&&(l[u]=h.boundingSphere,c[u]=h.boundingSphereCV,s&&(n[u]=d.geometry.offsetAttribute)),h=d.eastHemisphereGeometry,d=d.westHemisphereGeometry,defined(h)&&defined(d)&&(defined(h.boundingSphere)&&defined(d.boundingSphere)&&(l[u]=BoundingSphere.union(h.boundingSphere,d.boundingSphere)),defined(h.boundingSphereCV)&&defined(d.boundingSphereCV)&&(c[u]=BoundingSphere.union(h.boundingSphereCV,d.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:i,pickOffsets:r,offsetInstanceExtend:n,boundingSpheres:l,boundingSpheresCV:c}},PrimitivePipeline.packCreateGeometryResults=function(e,t){var i=new Float64Array(countCreateGeometryResults(e)),r=[],n={},a=e.length,o=0;i[o++]=a;for(var s=0;s<a;s++){var l=e[s],c=defined(l);if(i[o++]=c?1:0,c){i[o++]=l.primitiveType,i[o++]=l.geometryType,i[o++]=defaultValue(l.offsetAttribute,-1),c=defined(l.boundingSphere)?1:0,(i[o++]=c)&&BoundingSphere.pack(l.boundingSphere,i,o),o+=BoundingSphere.packedLength,c=defined(l.boundingSphereCV)?1:0,(i[o++]=c)&&BoundingSphere.pack(l.boundingSphereCV,i,o),o+=BoundingSphere.packedLength;var u,d=l.attributes,h=[];for(u in d)d.hasOwnProperty(u)&&defined(d[u])&&(h.push(u),defined(n[u])||(n[u]=r.length,r.push(u)));i[o++]=h.length;for(var p=0;p<h.length;p++){var f=h[p],m=d[f];i[o++]=n[f],i[o++]=m.componentDatatype,i[o++]=m.componentsPerAttribute,i[o++]=m.normalize?1:0,i[o++]=m.values.length,i.set(m.values,o),o+=m.values.length}c=defined(l.indices)?l.indices.length:0,0<(i[o++]=c)&&(i.set(l.indices,o),o+=c)}}return t.push(i.buffer),{stringTable:r,packedData:i}},PrimitivePipeline.unpackCreateGeometryResults=function(e){for(var t=e.stringTable,i=e.packedData,r=new Array(i[0]),n=0,a=1;a<i.length;)if(1===i[a++]){var o,s,l=i[a++],c=i[a++],u=i[a++];-1===u&&(u=void 0),1===i[a++]&&(o=BoundingSphere.unpack(i,a)),a+=BoundingSphere.packedLength,1===i[a++]&&(s=BoundingSphere.unpack(i,a)),a+=BoundingSphere.packedLength;var d=new GeometryAttributes,h=i[a++];for(b=0;b<h;b++){for(var p=t[i[a++]],f=i[a++],m=i[a++],g=0!==i[a++],y=i[a++],_=ComponentDatatype$1.createTypedArray(f,y),v=0;v<y;v++)_[v]=i[a++];d[p]=new GeometryAttribute({componentDatatype:f,componentsPerAttribute:m,normalize:g,values:_})}if(0<(y=i[a++]))for(var C=_.length/m,x=IndexDatatype$1.createTypedArray(C,y),b=0;b<y;b++)x[b]=i[a++];r[n++]=new Geometry({primitiveType:l,geometryType:c,boundingSphere:o,boundingSphereCV:s,indices:x,attributes:d,offsetAttribute:u})}else r[n++]=void 0;return r},PrimitivePipeline.packCombineGeometryParameters=function(e,t){for(var i=e.createGeometryResults,r=i.length,n=0;n<r;n++)t.push(i[n].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:packInstancesForCombine(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof GeographicProjection,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},PrimitivePipeline.unpackCombineGeometryParameters=function(e){for(var t=unpackInstancesForCombine(e.packedInstances),i=e.createGeometryResults,r=i.length,n=0,a=0;a<r;a++)for(var o=PrimitivePipeline.unpackCreateGeometryResults(i[a]),s=o.length,l=0;l<s;l++){var c=o[l];t[n].geometry=c,++n}var u=Ellipsoid.clone(e.ellipsoid);return{instances:t,ellipsoid:u,projection:new(e.isGeographic?GeographicProjection:WebMercatorProjection)(u),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:Matrix4.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},PrimitivePipeline.packCombineGeometryResults=function(e,t){defined(e.geometries)&&transferGeometries(e.geometries,t);var i=packBoundingSpheres(e.boundingSpheres),r=packBoundingSpheres(e.boundingSpheresCV);return t.push(i.buffer,r.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:i,boundingSpheresCV:r}},PrimitivePipeline.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:unpackBoundingSpheres(e.boundingSpheres),boundingSpheresCV:unpackBoundingSpheres(e.boundingSpheresCV)}};var PrimitiveState={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6},PrimitiveState$1=Object.freeze(PrimitiveState),SceneMode={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===SceneMode.SCENE3D?1:e!==SceneMode.MORPHING?0:void 0}},SceneMode$1=Object.freeze(SceneMode),ShadowMode={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===ShadowMode.ENABLED||e===ShadowMode.CAST_ONLY},receiveShadows:function(e){return e===ShadowMode.ENABLED||e===ShadowMode.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?ShadowMode.ENABLED:e?ShadowMode.CAST_ONLY:t?ShadowMode.RECEIVE_ONLY:ShadowMode.DISABLED}},ShadowMode$1=Object.freeze(ShadowMode);function Primitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=new Matrix4,this.show=defaultValue(e.show,!0),this._vertexCacheOptimize=defaultValue(e.vertexCacheOptimize,!1),this._interleave=defaultValue(e.interleave,!1),this._releaseGeometryInstances=defaultValue(e.releaseGeometryInstances,!0),this._allowPicking=defaultValue(e.allowPicking,!0),this._asynchronous=defaultValue(e.asynchronous,!0),this._compressVertices=defaultValue(e.compressVertices,!0),this.cull=defaultValue(e.cull,!0),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,this.shadows=defaultValue(e.shadows,ShadowMode$1.DISABLED),this._translucent=void 0,this._state=PrimitiveState$1.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=[],this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._readyPromise=when.defer(),this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0}function getCommonPerInstanceAttributeNames(e){var t,i=e.length,r=[],n=e[0].attributes;for(t in n)if(n.hasOwnProperty(t)&&defined(n[t])){for(var a=n[t],o=!0,s=1;s<i;++s){var l=e[s].attributes[t];if(!defined(l)||a.componentDatatype!==l.componentDatatype||a.componentsPerAttribute!==l.componentsPerAttribute||a.normalize!==l.normalize){o=!1;break}}o&&r.push(t)}return r}Object.defineProperties(Primitive.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}});var scratchGetAttributeCartesian2=new Cartesian2,scratchGetAttributeCartesian3=new Cartesian3,scratchGetAttributeCartesian4$1=new Cartesian4;function getAttributeValue(e){var t=e.length;return 1===t?e[0]:2===t?Cartesian2.unpack(e,0,scratchGetAttributeCartesian2):3===t?Cartesian3.unpack(e,0,scratchGetAttributeCartesian3):4===t?Cartesian4.unpack(e,0,scratchGetAttributeCartesian4$1):void 0}function createBatchTable(e,t){var i=e.geometryInstances,r=Array.isArray(i)?i:[i],n=r.length;if(0!==n){for(var a,o,s,l=getCommonPerInstanceAttributeNames(r),c=l.length,u=[],d={},h=(i={},r[0].attributes),p=0;p<c;++p)s=h[o=l[p]],d[o]=p,u.push({functionName:"czm_batchTable_"+o,componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize});-1!==l.indexOf("distanceDisplayCondition")&&(u.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:1}),i.center3DHigh=u.length-5,i.center3DLow=u.length-4,i.center2DHigh=u.length-3,i.center2DLow=u.length-2,i.radius=u.length-1),-1!==l.indexOf("offset")&&(u.push({functionName:"czm_batchTable_offset2D",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3}),a=u.length-1),u.push({functionName:"czm_batchTable_pickColor",componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});var f=u.length,m=new BatchTable(t,u,n);for(p=0;p<n;++p){for(var g=r[p],y=(h=g.attributes,0);y<c;++y){var _=getAttributeValue((s=h[o=l[y]]).value),v=d[o];m.setBatchedAttribute(p,v,_)}var C={primitive:defaultValue(g.pickPrimitive,e)};defined(g.id)&&(C.id=g.id),g=t.createPickId(C),e._pickIds.push(g),C=g.color,(g=scratchGetAttributeCartesian4$1).x=Color.floatToByte(C.red),g.y=Color.floatToByte(C.green),g.z=Color.floatToByte(C.blue),g.w=Color.floatToByte(C.alpha),m.setBatchedAttribute(p,f-1,g)}e._batchTable=m,e._batchTableAttributeIndices=d,e._batchTableBoundingSphereAttributeIndices=i,e._batchTableOffsetAttribute2DIndex=a}}function cloneAttribute(e){var t=Array.isArray(e.values)?e.values.slice(0):new e.values.constructor(e.values);return new GeometryAttribute({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function cloneGeometry(e){var t,i,r=e.attributes,n=new GeometryAttributes;for(t in r)r.hasOwnProperty(t)&&defined(r[t])&&(n[t]=cloneAttribute(r[t]));return defined(e.indices)&&(i=e.indices,i=Array.isArray(i)?i.slice(0):new i.constructor(i)),new Geometry({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:BoundingSphere.clone(e.boundingSphere)})}function cloneInstance(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:Matrix4.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var positionRegex=/attribute\s+vec(?:3|4)\s+(.*)3DHigh;/g;function appendPickToVertexShader(e){return ShaderSource.replaceMain(e,"czm_non_pick_main")+"\nvarying vec4 v_pickColor; \nvoid main() \n{ \n    czm_non_pick_main(); \n    v_pickColor = czm_batchTable_pickColor(batchId); \n}"}function appendPickToFragmentShader(e){return"varying vec4 v_pickColor;\n"+e}function modifyForEncodedNormals(e,t){if(!e.compressVertices)return t;var i=-1!==t.search(/attribute\s+vec3\s+normal;/g),r=-1!==t.search(/attribute\s+vec2\s+st;/g);if(!i&&!r)return t;var n=-1!==t.search(/attribute\s+vec3\s+tangent;/g),a=-1!==t.search(/attribute\s+vec3\s+bitangent;/g),o=r&&i?2:1,s="compressedAttributes",l="attribute "+(1<(o+=n||a?1:0)?"vec"+o:"float")+" "+s+";",c="";e="";return r&&(c+="vec2 st;\n",e+="    st = czm_decompressTextureCoordinates("+(1<o?s+".x":s)+");\n"),i&&n&&a?(c+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",e+="    czm_octDecode("+s+"."+(r?"yz":"xy")+", normal, tangent, bitangent);\n"):(i&&(c+="vec3 normal;\n",e+="    normal = czm_octDecode("+s+(1<o?"."+(r?"y":"x"):"")+");\n"),n&&(c+="vec3 tangent;\n",e+="    tangent = czm_octDecode("+s+"."+(r&&i?"z":"y")+");\n"),a&&(c+="vec3 bitangent;\n",e+="    bitangent = czm_octDecode("+s+"."+(r&&i?"z":"y")+");\n")),t=(t=(t=(t=t.replace(/attribute\s+vec3\s+normal;/g,"")).replace(/attribute\s+vec2\s+st;/g,"")).replace(/attribute\s+vec3\s+tangent;/g,"")).replace(/attribute\s+vec3\s+bitangent;/g,""),[l,c,t=ShaderSource.replaceMain(t,"czm_non_compressed_main"),"void main() \n{ \n"+e+"    czm_non_compressed_main(); \n}"].join("\n")}function depthClampVS(e){return(e=ShaderSource.replaceMain(e,"czm_non_depth_clamp_main"))+"void main() {\n    czm_non_depth_clamp_main();\n    gl_Position = czm_depthClamp(gl_Position);}\n"}function depthClampFS(e){return"#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n"+(e=ShaderSource.replaceMain(e,"czm_non_depth_clamp_main"))+"void main() {\n    czm_non_depth_clamp_main();\n#if defined(GL_EXT_frag_depth)\n    #if defined(LOG_DEPTH)\n        czm_writeLogDepth();\n    #else\n        czm_writeDepthClamp();\n    #endif\n#endif\n}\n"}function validateShaderMatching(e,t){e.vertexAttributes}function getUniformFunction(e,t){return function(){return e[t]}}Primitive._modifyShaderPosition=function(e,t,i){for(var r="",n="",a="";null!==(s=positionRegex.exec(t));){var o=s[1],s="vec4 czm_compute"+o[0].toUpperCase()+o.substr(1)+"()";"vec4 czm_computePosition()"!=s&&(r+=s+";\n"),defined(e.rtcCenter)?(r+="uniform mat4 u_modifiedModelView;\n",n+="attribute vec4 position;\n",a+=s+"\n{\n    return u_modifiedModelView * position;\n}\n\n",t=(t=(t=(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?a+=s+"\n{\n    return czm_translateRelativeToEye("+o+"3DHigh, "+o+"3DLow);\n}\n\n":(n+="attribute vec3 "+o+"2DHigh;\nattribute vec3 "+o+"2DLow;\n",a+=s+"\n{\n    vec4 p;\n    if (czm_morphTime == 1.0)\n    {\n        p = czm_translateRelativeToEye("+o+"3DHigh, "+o+"3DLow);\n    }\n    else if (czm_morphTime == 0.0)\n    {\n        p = czm_translateRelativeToEye("+o+"2DHigh.zxy, "+o+"2DLow.zxy);\n    }\n    else\n    {\n        p = czm_columbusViewMorph(\n                czm_translateRelativeToEye("+o+"2DHigh.zxy, "+o+"2DLow.zxy),\n                czm_translateRelativeToEye("+o+"3DHigh, "+o+"3DLow),\n                czm_morphTime);\n    }\n    return p;\n}\n\n")}return[r,n,t,a].join("\n")},Primitive._appendShowToShader=function(e,t){return defined(e._batchTableAttributeIndices.show)?ShaderSource.replaceMain(t,"czm_non_show_main")+"\nvoid main() \n{ \n    czm_non_show_main(); \n    gl_Position *= czm_batchTable_show(batchId); \n}":t},Primitive._updateColorAttribute=function(e,t,i){return defined(e._batchTableAttributeIndices.color)||defined(e._batchTableAttributeIndices.depthFailColor)?-1===t.search(/attribute\s+vec4\s+color;/g)?t:(t=(t=t).replace(/attribute\s+vec4\s+color;/g,""),i?t.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):t.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2")):t},Primitive._updatePickColorAttribute=function(e){return e.replace(/attribute\s+vec4\s+pickColor;/g,"").replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2")},Primitive._appendOffsetToShader=function(e,t){return defined(e._batchTableAttributeIndices.offset)?(e="attribute float batchId;\n",e+="attribute float applyOffset;",e=t.replace(/attribute\s+float\s+batchId;/g,"attribute float batchId;\nattribute float applyOffset;"),t="vec4 $1 = czm_computePosition();\n",t+="    if (czm_sceneMode == czm_sceneMode3D)\n",t+="    {\n",t+="        $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",t+="    }\n",t+="    else\n",t+="    {\n",t+="        $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",t+="    }\n",e.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n    if (czm_sceneMode == czm_sceneMode3D)\n    {\n        $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);    }\n    else\n    {\n        $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);    }\n")):t},Primitive._appendDistanceDisplayConditionToShader=function(e,t,i){return defined(e._batchTableAttributeIndices.distanceDisplayCondition)?(e="void main() \n{ \n    czm_non_distanceDisplayCondition_main(); \n    vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n    vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n    vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n    float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n",e+=i?"    vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":"    vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n    vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n    vec4 centerRTE;\n    if (czm_morphTime == 1.0)\n    {\n        centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n    }\n    else if (czm_morphTime == 0.0)\n    {\n        centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n    }\n    else\n    {\n        centerRTE = czm_columbusViewMorph(\n                czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n                czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n                czm_morphTime);\n    }\n",ShaderSource.replaceMain(t,"czm_non_distanceDisplayCondition_main")+"\n"+e+"    float radiusSq = boundingSphereRadius * boundingSphereRadius; \n    float distanceSq; \n    if (czm_sceneMode == czm_sceneMode2D) \n    { \n        distanceSq = czm_eyeHeight2D.y - radiusSq; \n    } \n    else \n    { \n        distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n    } \n    distanceSq = max(distanceSq, 0.0); \n    float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n    float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n    float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n    gl_Position *= show; \n}"):t};var numberOfCreationWorkers=Math.max(FeatureDetection.hardwareConcurrency-1,1),createGeometryTaskProcessors,combineGeometryTaskProcessor=new TaskProcessor("combineGeometry",Number.POSITIVE_INFINITY);function loadAsynchronous(e,t){var i,r,n,a,o,s=e._instanceIds;if(e._state===PrimitiveState$1.READY){r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];for(var l,c=e._numberOfInstances=r.length,u=[],d=[],h=0;h<c;++h)i=r[h].geometry,s.push(r[h].id),d.push({moduleName:i._workerName,geometry:i});if(!defined(createGeometryTaskProcessors))for(createGeometryTaskProcessors=new Array(numberOfCreationWorkers),h=0;h<numberOfCreationWorkers;h++)createGeometryTaskProcessors[h]=new TaskProcessor("createGeometry",Number.POSITIVE_INFINITY);for(d=subdivideArray(d,numberOfCreationWorkers),h=0;h<d.length;h++){var p=0,f=d[h],m=f.length;for(_=0;_<m;++_)defined((i=(l=f[_]).geometry).constructor.pack)&&(l.offset=p,p+=defaultValue(i.constructor.packedLength,i.packedLength));if(0<p)for(var g=new Float64Array(p),y=[g.buffer],_=0;_<m;++_)defined((i=(l=f[_]).geometry).constructor.pack)&&(i.constructor.pack(i,g,l.offset),l.geometry=g);u.push(createGeometryTaskProcessors[h].scheduleTask({subTasks:d[h]},y))}e._state=PrimitiveState$1.CREATING,when.all(u,(function(t){e._createGeometryResults=t,e._state=PrimitiveState$1.CREATED})).otherwise((function(i){setReady(e,t,PrimitiveState$1.FAILED,i)}))}else e._state===PrimitiveState$1.CREATED&&(o=[],r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],n=t.scene3DOnly,a=t.mapProjection,o=combineGeometryTaskProcessor.scheduleTask(PrimitivePipeline.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:r,ellipsoid:a.ellipsoid,projection:a,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:n,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},o),o),e._createGeometryResults=void 0,e._state=PrimitiveState$1.COMBINING,when(o,(function(i){i=PrimitivePipeline.unpackCombineGeometryResults(i),e._geometries=i.geometries,e._attributeLocations=i.attributeLocations,e.modelMatrix=Matrix4.clone(i.modelMatrix,e.modelMatrix),e._pickOffsets=i.pickOffsets,e._offsetInstanceExtend=i.offsetInstanceExtend,e._instanceBoundingSpheres=i.boundingSpheres,e._instanceBoundingSpheresCV=i.boundingSpheresCV,defined(e._geometries)&&0<e._geometries.length?(e._recomputeBoundingSpheres=!0,e._state=PrimitiveState$1.COMBINED):setReady(e,t,PrimitiveState$1.FAILED,void 0)})).otherwise((function(i){setReady(e,t,PrimitiveState$1.FAILED,i)})))}function loadSynchronous(e,t){for(var i,r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],n=e._numberOfInstances=r.length,a=new Array(n),o=e._instanceIds,s=0,l=0;l<n;l++){var c=defined((c=(i=r[l]).geometry).attributes)&&defined(c.primitiveType)?cloneGeometry(c):c.constructor.createGeometry(c);a[s++]=cloneInstance(i,c),o.push(i.id)}a.length=s;var u=t.scene3DOnly,d=t.mapProjection;u=PrimitivePipeline.combineGeometry({instances:a,ellipsoid:d.ellipsoid,projection:d,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:u,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=u.geometries,e._attributeLocations=u.attributeLocations,e.modelMatrix=Matrix4.clone(u.modelMatrix,e.modelMatrix),e._pickOffsets=u.pickOffsets,e._offsetInstanceExtend=u.offsetInstanceExtend,e._instanceBoundingSpheres=u.boundingSpheres,e._instanceBoundingSpheresCV=u.boundingSpheresCV,defined(e._geometries)&&0<e._geometries.length?(e._recomputeBoundingSpheres=!0,e._state=PrimitiveState$1.COMBINED):setReady(e,t,PrimitiveState$1.FAILED,void 0)}function recomputeBoundingSpheres(e,t){var i=e._batchTableAttributeIndices.offset;if(e._recomputeBoundingSpheres&&defined(i)){var r=e._offsetInstanceExtend,n=e._instanceBoundingSpheres,a=n.length,o=e._tempBoundingSpheres;if(!defined(o)){for(o=new Array(a),h=0;h<a;h++)o[h]=new BoundingSphere;e._tempBoundingSpheres=o}for(h=0;h<a;++h){var s=o[h],l=e._batchTable.getBatchedAttribute(h,i,new Cartesian3);transformBoundingSphere(s=n[h].clone(s),l,r[h])}for(var c=[],u=[],d=[],h=0;h<a;++h){var p=o[h];0<p.center.x-p.radius||BoundingSphere.intersectPlane(p,Plane.ORIGIN_ZX_PLANE)!==Intersect$1.INTERSECTING?c.push(p):(u.push(p),d.push(p))}var f=c[0],m=d[0],g=u[0];for(h=1;h<c.length;h++)f=BoundingSphere.union(f,c[h]);for(h=1;h<d.length;h++)m=BoundingSphere.union(m,d[h]);for(h=1;h<u.length;h++)g=BoundingSphere.union(g,u[h]);var y=[];for(defined(f)&&y.push(f),defined(m)&&y.push(m),defined(g)&&y.push(g),h=0;h<y.length;h++){var _=y[h].clone(e._boundingSpheres[h]);e._boundingSpheres[h]=_,e._boundingSphereCV[h]=BoundingSphere.projectTo2D(_,t.mapProjection,e._boundingSphereCV[h])}Primitive._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}else e._recomputeBoundingSpheres=!1}var scratchBoundingSphereCenterEncoded=new EncodedCartesian3,scratchBoundingSphereCartographic=new Cartographic,scratchBoundingSphereCenter2D=new Cartesian3,scratchBoundingSphere$2=new BoundingSphere;function updateBatchTableBoundingSpheres(e,t){if(defined(e._batchTableAttributeIndices.distanceDisplayCondition)&&!e._batchTableBoundingSpheresUpdated){for(var i=e._batchTableBoundingSphereAttributeIndices,r=i.center3DHigh,n=i.center3DLow,a=i.center2DHigh,o=i.center2DLow,s=i.radius,l=t.mapProjection,c=l.ellipsoid,u=e._batchTable,d=e._instanceBoundingSpheres,h=d.length,p=0;p<h;++p){var f,m,g=d[p];defined(g)&&(defined(f=e.modelMatrix)&&(g=BoundingSphere.transform(g,f,scratchBoundingSphere$2)),m=g.center,f=g.radius,g=EncodedCartesian3.fromCartesian(m,scratchBoundingSphereCenterEncoded),u.setBatchedAttribute(p,r,g.high),u.setBatchedAttribute(p,n,g.low),t.scene3DOnly||(m=c.cartesianToCartographic(m,scratchBoundingSphereCartographic),m=l.project(m,scratchBoundingSphereCenter2D),g=EncodedCartesian3.fromCartesian(m,scratchBoundingSphereCenterEncoded),u.setBatchedAttribute(p,a,g.high),u.setBatchedAttribute(p,o,g.low)),u.setBatchedAttribute(p,s,f))}e._batchTableBoundingSpheresUpdated=!0}}var offsetScratchCartesian=new Cartesian3,offsetCenterScratch=new Cartesian3;function updateBatchTableOffsets(e,t){if(defined(e._batchTableAttributeIndices.offset)&&!e._batchTableOffsetsUpdated&&!t.scene3DOnly){for(var i=e._batchTableOffsetAttribute2DIndex,r=t.mapProjection,n=r.ellipsoid,a=e._batchTable,o=e._instanceBoundingSpheres,s=o.length,l=0;l<s;++l){var c,u,d,h=o[l];defined(h)&&(c=a.getBatchedAttribute(l,e._batchTableAttributeIndices.offset),Cartesian3.equals(c,Cartesian3.ZERO)?a.setBatchedAttribute(l,i,Cartesian3.ZERO):(defined(d=e.modelMatrix)&&(h=BoundingSphere.transform(h,d,scratchBoundingSphere$2)),u=h.center,u=n.scaleToGeodeticSurface(u,offsetCenterScratch),d=n.cartesianToCartographic(u,scratchBoundingSphereCartographic),h=r.project(d,scratchBoundingSphereCenter2D),u=Cartesian3.add(c,u,offsetScratchCartesian),d=n.cartesianToCartographic(u,d),d=r.project(d,offsetScratchCartesian),h=(d=Cartesian3.subtract(d,h,offsetScratchCartesian)).x,d.x=d.z,d.z=d.y,d.y=h,a.setBatchedAttribute(l,i,d)))}e._batchTableOffsetsUpdated=!0}}function createVertexArray(e,t){for(var i=e._attributeLocations,r=e._geometries,n=t.scene3DOnly,a=t.context,o=[],s=r.length,l=0;l<s;++l){var c,u,d,h,p=r[l];o.push(VertexArray.fromGeometry({context:a,geometry:p,attributeLocations:i,bufferUsage:BufferUsage$1.STATIC_DRAW,interleave:e._interleave})),defined(e._createBoundingVolumeFunction)?e._createBoundingVolumeFunction(t,p):(e._boundingSpheres.push(BoundingSphere.clone(p.boundingSphere)),e._boundingSphereWC.push(new BoundingSphere),n||(u=(c=p.boundingSphereCV.center).x,d=c.y,h=c.z,c.x=h,c.y=u,c.z=d,e._boundingSphereCV.push(BoundingSphere.clone(p.boundingSphereCV)),e._boundingSphere2D.push(new BoundingSphere),e._boundingSphereMorph.push(new BoundingSphere)))}e._va=o,e._primitiveType=r[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,setReady(e,t,PrimitiveState$1.COMPLETE,void 0)}function createRenderStates(e,t,i,r){var n;i=i.getRenderState();r?((n=clone(i,!1)).cull={enabled:!0,face:CullFace$1.BACK},e._frontFaceRS=RenderState.fromCache(n),n.cull.face=CullFace$1.FRONT,e._backFaceRS=RenderState.fromCache(n)):(e._frontFaceRS=RenderState.fromCache(i),e._backFaceRS=e._frontFaceRS),n=clone(i,!1),defined(e._depthFailAppearance)&&(n.depthTest.enabled=!1),defined(e._depthFailAppearance)&&((n=clone(i=e._depthFailAppearance.getRenderState(),!1)).depthTest.func=DepthFunction$1.GREATER,r?(n.cull={enabled:!0,face:CullFace$1.BACK},e._frontFaceDepthFailRS=RenderState.fromCache(n),n.cull.face=CullFace$1.FRONT,e._backFaceDepthFailRS=RenderState.fromCache(n)):(e._frontFaceDepthFailRS=RenderState.fromCache(n),e._backFaceDepthFailRS=e._frontFaceRS))}function createShaderProgram(e,t,i){var r=t.context,n=e._attributeLocations,a=e._batchTable.getVertexShaderCallback()(i.vertexShaderSource);a=Primitive._appendOffsetToShader(e,a);a=Primitive._appendShowToShader(e,a),a=appendPickToVertexShader(Primitive._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=modifyForEncodedNormals(e,Primitive._updateColorAttribute(e,a,!1)),a=Primitive._modifyShaderPosition(e,a,t.scene3DOnly),i=appendPickToFragmentShader(i=i.getFragmentShaderSource()),e._sp=ShaderProgram.replaceCache({context:r,shaderProgram:e._sp,vertexShaderSource:a,fragmentShaderSource:i,attributeLocations:n}),validateShaderMatching(e._sp),defined(e._depthFailAppearance)&&(a=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),a=Primitive._appendShowToShader(e,a),a=appendPickToVertexShader(Primitive._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=modifyForEncodedNormals(e,Primitive._updateColorAttribute(e,a,!0)),a=depthClampVS(Primitive._modifyShaderPosition(e,a,t.scene3DOnly)),i=depthClampFS(i=appendPickToFragmentShader(i=e._depthFailAppearance.getFragmentShaderSource())),e._spDepthFail=ShaderProgram.replaceCache({context:r,shaderProgram:e._spDepthFail,vertexShaderSource:a,fragmentShaderSource:i,attributeLocations:n}),validateShaderMatching(e._spDepthFail))}var modifiedModelViewScratch=new Matrix4,rtcScratch=new Cartesian3;function getUniforms(e,t,i,r){i=defined(i)?i._uniforms:void 0;var n={},a=t.uniforms;if(defined(a))for(var o in a)a.hasOwnProperty(o)&&(n[o]=getUniformFunction(a,o));return i=combine(n,i),i=e._batchTable.getUniformMapCallback()(i),defined(e.rtcCenter)&&(i.u_modifiedModelView=function(){var t=r.context.uniformState.view;return Matrix4.multiply(t,e._modelMatrix,modifiedModelViewScratch),Matrix4.multiplyByPoint(modifiedModelViewScratch,e.rtcCenter,rtcScratch),Matrix4.setTranslation(modifiedModelViewScratch,rtcScratch,modifiedModelViewScratch),modifiedModelViewScratch}),i}function createCommands(e,t,i,r,n,a,o,s){var l,c=getUniforms(e,t,i,s);defined(e._depthFailAppearance)&&(l=getUniforms(e,e._depthFailAppearance,e._depthFailAppearance.material,s));var u=r?Pass$1.TRANSLUCENT:Pass$1.OPAQUE;r=n?2:1;r*=defined(e._depthFailAppearance)?2:1,a.length=e._va.length*r;for(var d,h=a.length,p=0,f=0;f<h;++f)n&&(defined(d=a[f])||(d=a[f]=new DrawCommand({owner:e,primitiveType:e._primitiveType})),d.vertexArray=e._va[p],d.renderState=e._backFaceRS,d.shaderProgram=e._sp,d.uniformMap=c,d.pass=u,++f),defined(d=a[f])||(d=a[f]=new DrawCommand({owner:e,primitiveType:e._primitiveType})),d.vertexArray=e._va[p],d.renderState=e._frontFaceRS,d.shaderProgram=e._sp,d.uniformMap=c,d.pass=u,defined(e._depthFailAppearance)&&(n&&(defined(d=a[++f])||(d=a[f]=new DrawCommand({owner:e,primitiveType:e._primitiveType})),d.vertexArray=e._va[p],d.renderState=e._backFaceDepthFailRS,d.shaderProgram=e._spDepthFail,d.uniformMap=l,d.pass=u),defined(d=a[++f])||(d=a[f]=new DrawCommand({owner:e,primitiveType:e._primitiveType})),d.vertexArray=e._va[p],d.renderState=e._frontFaceDepthFailRS,d.shaderProgram=e._spDepthFail,d.uniformMap=l,d.pass=u),++p}function updateAndQueueCommands(e,t,i,r,n,a,o,s){var l;Primitive._updateBoundingVolumes(e,t,n),t.mode===SceneMode$1.SCENE3D?l=e._boundingSphereWC:t.mode===SceneMode$1.COLUMBUS_VIEW?l=e._boundingSphereCV:t.mode===SceneMode$1.SCENE2D&&defined(e._boundingSphere2D)?l=e._boundingSphere2D:defined(e._boundingSphereMorph)&&(l=e._boundingSphereMorph);var c=t.commandList;if((t=t.passes).render||t.pick){var u=e.allowPicking,d=ShadowMode$1.castShadows(e.shadows),h=ShadowMode$1.receiveShadows(e.shadows),p=i.length,f=s?2:1;f*=defined(e._depthFailAppearance)?2:1;for(var m=0;m<p;++m){var g=Math.floor(m/f),y=i[m];y.modelMatrix=n,y.boundingVolume=l[g],y.cull=a,y.debugShowBoundingVolume=o,y.castShadows=d,y.receiveShadows=h,y.pickId=u?"v_pickColor":void 0,c.push(y)}}}Primitive._updateBoundingVolumes=function(e,t,i,r){var n,a,o;if(r||!Matrix4.equals(i,e._modelMatrix))for(Matrix4.clone(i,e._modelMatrix),a=e._boundingSpheres.length,n=0;n<a;++n)defined(o=e._boundingSpheres[n])&&(e._boundingSphereWC[n]=BoundingSphere.transform(o,i,e._boundingSphereWC[n]),t.scene3DOnly||(e._boundingSphere2D[n]=BoundingSphere.clone(e._boundingSphereCV[n],e._boundingSphere2D[n]),e._boundingSphere2D[n].center.x=0,e._boundingSphereMorph[n]=BoundingSphere.union(e._boundingSphereWC[n],e._boundingSphereCV[n])));var s=e.appearance.pixelSize;if(defined(s))for(a=e._boundingSpheres.length,n=0;n<a;++n){o=e._boundingSpheres[n];var l=e._boundingSphereWC[n],c=t.camera.getPixelSize(o,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*s;l.radius=o.radius+c}},Primitive.prototype.update=function(e){if(!(!defined(this.geometryInstances)&&0===this._va.length||defined(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&0===this.geometryInstances.length||!defined(this.appearance)||e.mode!==SceneMode$1.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)){if(defined(this._error))throw this._error;if(this._state!==PrimitiveState$1.FAILED){var t,i,r,n,a,o,s=e.context;if(defined(this._batchTable)||createBatchTable(this,s),0<this._batchTable.attributes.length){if(0===ContextLimits.maximumVertexTextureImageUnits)throw new RuntimeError("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}this._state!==PrimitiveState$1.COMPLETE&&this._state!==PrimitiveState$1.COMBINED&&(this.asynchronous?loadAsynchronous:loadSynchronous)(this,e),this._state===PrimitiveState$1.COMBINED&&(updateBatchTableBoundingSpheres(this,e),updateBatchTableOffsets(this,e),createVertexArray(this,e)),this.show&&this._state===PrimitiveState$1.COMPLETE&&(this._batchTableOffsetsUpdated||updateBatchTableOffsets(this,e),this._recomputeBoundingSpheres&&recomputeBoundingSpheres(this,e),i=(t=this.appearance).material,n=r=!1,this._appearance!==t?(this._appearance=t,this._material=i,n=r=!0):this._material!==i&&(this._material=i,n=!0),o=defined(a=this.depthFailAppearance)?a.material:void 0,this._depthFailAppearance!==a?(this._depthFailAppearance=a,this._depthFailMaterial=o,n=r=!0):this._depthFailMaterial!==o&&(this._depthFailMaterial=o,n=!0),a=this._appearance.isTranslucent(),this._translucent!==a&&(this._translucent=a,r=!0),defined(this._material)&&this._material.update(s),o=t.closed&&a,r&&defaultValue(this._createRenderStatesFunction,createRenderStates)(this,s,t,o),n&&defaultValue(this._createShaderProgramFunction,createShaderProgram)(this,e,t),(r||n)&&defaultValue(this._createCommandsFunction,createCommands)(this,t,i,a,o,this._colorCommands,this._pickCommands,e),defaultValue(this._updateAndQueueCommandsFunction,updateAndQueueCommands)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,o))}}};var offsetBoundingSphereScratch1=new BoundingSphere,offsetBoundingSphereScratch2=new BoundingSphere;function transformBoundingSphere(e,t,i){var r,n;return i===GeometryOffsetAttribute$1.TOP?(r=BoundingSphere.clone(e,offsetBoundingSphereScratch1),(n=BoundingSphere.clone(e,offsetBoundingSphereScratch2)).center=Cartesian3.add(n.center,t,n.center),e=BoundingSphere.union(r,n,e)):i===GeometryOffsetAttribute$1.ALL&&(e.center=Cartesian3.add(e.center,t,e.center)),e}function createGetFunction(e,t,i){return function(){var r=e.getBatchedAttribute(t,i),n=e.attributes[i],a=n.componentsPerAttribute;a=ComponentDatatype$1.createTypedArray(n.componentDatatype,a);return defined(r.constructor.pack)?r.constructor.pack(r,a,0):a[0]=r,a}}function createSetFunction(e,t,i,r,n){return function(a){a=getAttributeValue(a),e.setBatchedAttribute(t,i,a),"offset"===n&&(r._recomputeBoundingSpheres=!0,r._batchTableOffsetsUpdated=!1)}}var offsetScratch$2=new Cartesian3;function createBoundingSphereProperties(e,t,i){t.boundingSphere={get:function(){var r,n,a=e._instanceBoundingSpheres[i];return defined(a)&&(a=a.clone(),r=e.modelMatrix,defined(n=t.offset)&&transformBoundingSphere(a,Cartesian3.fromArray(n.get(),0,offsetScratch$2),e._offsetInstanceExtend[i]),defined(r)&&(a=BoundingSphere.transform(a,r))),a}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[i]}}}function createPickIdProperty(e,t,i){t.pickId={get:function(){return e._pickIds[i]}}}function setReady(e,t,i,r){e._error=r,e._state=i,t.afterRender.push((function(){e._ready=e._state===PrimitiveState$1.COMPLETE||e._state===PrimitiveState$1.FAILED,defined(r)?e._readyPromise.reject(r):e._readyPromise.resolve(e)}))}Primitive.prototype.getGeometryInstanceAttributes=function(e){for(var t=-1,i=this._lastPerInstanceAttributeIndex,r=this._instanceIds,n=r.length,a=0;a<n;++a){var o=(i+a)%n;if(e===r[o]){t=o;break}}if(-1!==t){if(defined(d=this._perInstanceAttributeCache[t]))return d;var s,l,c=this._batchTable,u=this._batchTableAttributeIndices,d={},h={};for(s in u)u.hasOwnProperty(s)&&(l=u[s],h[s]={get:createGetFunction(c,t,l),set:createSetFunction(c,t,l,this,s)});return createBoundingSphereProperties(this,h,t),createPickIdProperty(this,h,t),Object.defineProperties(d,h),this._lastPerInstanceAttributeIndex=t,this._perInstanceAttributeCache[t]=d}},Primitive.prototype.isDestroyed=function(){return!1},Primitive.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._spDepthFail=this._spDepthFail&&this._spDepthFail.destroy();for(var e=this._va,t=e.length,i=0;i<t;++i)e[i].destroy();this._va=void 0;var r=this._pickIds;for(t=r.length,i=0;i<t;++i)r[i].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,destroyObject(this)};var ShadowVolumeAppearanceFS="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\nreturn eyeCoordinate.xyz / eyeCoordinate.w;\n}\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {\nvec2 glFragCoordXY = gl_FragCoord.xy;\nfloat upOrRightLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\nfloat downOrLeftLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\nbvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\nfloat useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\nfloat useDownOrLeft = float(useUpOrRight == 0.0);\nvec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\nvec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\nreturn (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\nvoid main(void)\n{\n#ifdef REQUIRES_EC\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n#ifdef REQUIRES_WC\nvec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\nvec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n#ifdef TEXTURE_COORDINATES\nvec2 uv;\n#ifdef SPHERICAL\nvec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\nsphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\nsphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\nuv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\nuv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\nuv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\nuv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\nif (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0) {\ngl_FragColor.a = 1.0;\nczm_writeDepthClamp();\n}\n#else // CULL_FRAGMENTS\ngl_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n#ifdef CULL_FRAGMENTS\nif (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y) {\ndiscard;\n}\n#endif\n#ifdef NORMAL_EC\nvec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\nvec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\nvec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n#ifdef PER_INSTANCE_COLOR\nvec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\ngl_FragColor = color;\n#else // FLAT\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\ngl_FragColor.rgb *= gl_FragColor.a;\n#else // PER_INSTANCE_COLOR\nczm_materialInput materialInput;\n#ifdef USES_NORMAL_EC\nmaterialInput.normalEC = normalEC;\n#endif\n#ifdef USES_POSITION_TO_EYE_EC\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n#ifdef USES_TANGENT_TO_EYE\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n#ifdef USES_ST\nmaterialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\nmaterialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\ngl_FragColor.rgb *= gl_FragColor.a;\n#endif // PER_INSTANCE_COLOR\nczm_writeDepthClamp();\n#endif // PICK\n}\n";function ShadowVolumeAppearance(e,t,i){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};var r=new ShaderDependencies;r.requiresTextureCoordinates=e,r.requiresEC=!i.flat;var n,a=new ShaderDependencies;a.requiresTextureCoordinates=e,i instanceof PerInstanceColorAppearance?r.requiresNormalEC=!i.flat:(n=i.material.shaderSource+"\n"+i.fragmentShaderSource,r.normalEC=-1!==n.indexOf("materialInput.normalEC")||-1!==n.indexOf("czm_getDefaultMaterial"),r.positionToEyeEC=-1!==n.indexOf("materialInput.positionToEyeEC"),r.tangentToEyeMatrix=-1!==n.indexOf("materialInput.tangentToEyeMatrix"),r.st=-1!==n.indexOf("materialInput.st")),this._colorShaderDependencies=r,this._pickShaderDependencies=a,this._appearance=i,this._extentsCulling=e,this._planarExtents=t}ShadowVolumeAppearance.prototype.createFragmentShader=function(e){var t=this._appearance,i=this._colorShaderDependencies,r=[];return e||this._planarExtents||r.push("SPHERICAL"),i.requiresEC&&r.push("REQUIRES_EC"),i.requiresWC&&r.push("REQUIRES_WC"),i.requiresTextureCoordinates&&r.push("TEXTURE_COORDINATES"),this._extentsCulling&&r.push("CULL_FRAGMENTS"),i.requiresNormalEC&&r.push("NORMAL_EC"),t instanceof PerInstanceColorAppearance&&r.push("PER_INSTANCE_COLOR"),i.normalEC&&r.push("USES_NORMAL_EC"),i.positionToEyeEC&&r.push("USES_POSITION_TO_EYE_EC"),i.tangentToEyeMatrix&&r.push("USES_TANGENT_TO_EYE"),i.st&&r.push("USES_ST"),t.flat&&r.push("FLAT"),i="",t instanceof PerInstanceColorAppearance||(i=t.material.shaderSource),new ShaderSource({defines:r,sources:[i,ShadowVolumeAppearanceFS]})},ShadowVolumeAppearance.prototype.createPickFragmentShader=function(e){var t=this._pickShaderDependencies,i=["PICK"];return e||this._planarExtents||i.push("SPHERICAL"),t.requiresEC&&i.push("REQUIRES_EC"),t.requiresWC&&i.push("REQUIRES_WC"),t.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),new ShaderSource({defines:i,sources:[ShadowVolumeAppearanceFS],pickColorQualifier:"varying"})},ShadowVolumeAppearance.prototype.createVertexShader=function(e,t,i,r){return createShadowVolumeAppearanceVS(this._colorShaderDependencies,this._planarExtents,i,e,t,this._appearance,r,this._projectionExtentDefines)},ShadowVolumeAppearance.prototype.createPickVertexShader=function(e,t,i,r){return createShadowVolumeAppearanceVS(this._pickShaderDependencies,this._planarExtents,i,e,t,void 0,r,this._projectionExtentDefines)};var longitudeExtentsCartesianScratch=new Cartesian3,longitudeExtentsCartographicScratch=new Cartographic,longitudeExtentsEncodeScratch={high:0,low:0};function createShadowVolumeAppearanceVS(e,t,i,r,n,a,o,s){var l,c=r.slice();return""===s.eastMostYhighDefine&&((l=longitudeExtentsCartographicScratch).longitude=CesiumMath.PI,l.latitude=0,l.height=0,r=o.project(l,longitudeExtentsCartesianScratch),l=EncodedCartesian3.encode(r.x,longitudeExtentsEncodeScratch),s.eastMostYhighDefine="EAST_MOST_X_HIGH "+l.high.toFixed((l.high+"").length+1),s.eastMostYlowDefine="EAST_MOST_X_LOW "+l.low.toFixed((l.low+"").length+1),(r=longitudeExtentsCartographicScratch).longitude=-CesiumMath.PI,r.latitude=0,r.height=0,r=o.project(r,longitudeExtentsCartesianScratch),l=EncodedCartesian3.encode(r.x,longitudeExtentsEncodeScratch),s.westMostYhighDefine="WEST_MOST_X_HIGH "+l.high.toFixed((l.high+"").length+1),s.westMostYlowDefine="WEST_MOST_X_LOW "+l.low.toFixed((l.low+"").length+1)),i&&(c.push(s.eastMostYhighDefine),c.push(s.eastMostYlowDefine),c.push(s.westMostYhighDefine),c.push(s.westMostYlowDefine)),defined(a)&&a instanceof PerInstanceColorAppearance&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||i||c.push("SPHERICAL"),i&&c.push("COLUMBUS_VIEW_2D")),new ShaderSource({defines:c,sources:[n]})}function ShaderDependencies(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}function pointLineDistance(e,t,i){return Math.abs((t.y-e.y)*i.x-(t.x-e.x)*i.y+t.x*e.y-t.y*e.x)/Cartesian2.distance(t,e)}Object.defineProperties(ShaderDependencies.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});var points2DScratch$2=[new Cartesian2,new Cartesian2,new Cartesian2,new Cartesian2];function addTextureCoordinateRotationAttributes(e,t){var i=points2DScratch$2,r=Cartesian2.unpack(t,0,i[0]),n=Cartesian2.unpack(t,2,i[1]);t=Cartesian2.unpack(t,4,i[2]);e.uMaxVmax=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:[n.x,n.y,t.x,t.y]}),i=1/pointLineDistance(r,n,t),n=1/pointLineDistance(r,t,n),e.uvMinAndExtents=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r.x,r.y,i,n]})}var cartographicScratch$1=new Cartographic,cornerScratch=new Cartesian3,northWestScratch=new Cartesian3,southEastScratch=new Cartesian3,highLowScratch={high:0,low:0};function add2DTextureCoordinateAttributes(e,t,i){(o=cartographicScratch$1).height=0,o.longitude=e.west,o.latitude=e.south;var r=t.project(o,cornerScratch);o.latitude=e.north;var n=t.project(o,northWestScratch);o.longitude=e.east,o.latitude=e.south;var a=t.project(o,southEastScratch),o=(e=[0,0,0,0],t=[0,0,0,0],EncodedCartesian3.encode(r.x,highLowScratch));e[0]=o.high,t[0]=o.low,o=EncodedCartesian3.encode(r.y,highLowScratch),e[1]=o.high,t[1]=o.low,o=EncodedCartesian3.encode(n.y,highLowScratch),e[2]=o.high,t[2]=o.low,o=EncodedCartesian3.encode(a.x,highLowScratch),e[3]=o.high,t[3]=o.low,i.planes2D_HIGH=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:e}),i.planes2D_LOW=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:t})}var enuMatrixScratch=new Matrix4,inverseEnuScratch=new Matrix4,rectanglePointCartesianScratch=new Cartesian3,rectangleCenterScratch$2=new Cartographic,pointsCartographicScratch=[new Cartographic,new Cartographic,new Cartographic,new Cartographic,new Cartographic,new Cartographic,new Cartographic,new Cartographic];function computeRectangleBounds(e,t,i,r,n,a){(h=Rectangle.center(e,rectangleCenterScratch$2)).height=i;var o=Cartographic.toCartesian(h,t,rectanglePointCartesianScratch),s=Transforms.eastNorthUpToFixedFrame(o,t,enuMatrixScratch),l=Matrix4.inverse(s,inverseEnuScratch),c=e.west,u=e.east,d=e.north,h=e.south,p=pointsCartographicScratch;p[0].latitude=h,p[0].longitude=c,p[1].latitude=d,p[1].longitude=c,p[2].latitude=d,p[2].longitude=u,p[3].latitude=h,o=.5*(c+(p[3].longitude=u)),e=.5*(d+h),p[4].latitude=h,p[4].longitude=o,p[5].latitude=d,p[5].longitude=o,p[6].latitude=e,p[6].longitude=c,p[7].latitude=e,p[7].longitude=u;for(var f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,_=0;_<8;_++){p[_].height=i;var v=Cartographic.toCartesian(p[_],t,rectanglePointCartesianScratch);Matrix4.multiplyByPoint(l,v,v),v.z=0,f=Math.min(f,v.x),m=Math.max(m,v.x),g=Math.min(g,v.y),y=Math.max(y,v.y)}(u=r).x=f,u.y=g,u.z=0,Matrix4.multiplyByPoint(s,u,u),(r=n).x=m,r.y=g,r.z=0,Matrix4.multiplyByPoint(s,r,r),Cartesian3.subtract(r,u,n),(n=a).x=f,n.y=y,n.z=0,Matrix4.multiplyByPoint(s,n,n),Cartesian3.subtract(n,u,a)}var eastwardScratch=new Cartesian3,northwardScratch=new Cartesian3,encodeScratch$1=new EncodedCartesian3;ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes=function(e,t,i,r,n){var a=cornerScratch,o=eastwardScratch,s=northwardScratch;return computeRectangleBounds(e,i,defaultValue(n,0),a,o,s),addTextureCoordinateRotationAttributes(n={},t),a=EncodedCartesian3.fromCartesian(a,encodeScratch$1),n.southWest_HIGH=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,normalize:!1,value:Cartesian3.pack(a.high,[0,0,0])}),n.southWest_LOW=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,normalize:!1,value:Cartesian3.pack(a.low,[0,0,0])}),n.eastward=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,normalize:!1,value:Cartesian3.pack(o,[0,0,0])}),n.northward=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,normalize:!1,value:Cartesian3.pack(s,[0,0,0])}),add2DTextureCoordinateAttributes(e,r,n),n};var spherePointScratch=new Cartesian3;function latLongToSpherical(e,t,i,r){var n=cartographicScratch$1;return n.latitude=e,n.longitude=t,n.height=0,n=Cartographic.toCartesian(n,i,spherePointScratch),i=Math.sqrt(n.x*n.x+n.y*n.y),i=CesiumMath.fastApproximateAtan2(i,n.z),n=CesiumMath.fastApproximateAtan2(n.x,n.y),r.x=i,r.y=n,r}var sphericalScratch=new Cartesian2;function shouldUseSpherical(e){return Math.max(e.width,e.height)>ShadowVolumeAppearance.MAX_WIDTH_FOR_PLANAR_EXTENTS}ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes=function(e,t,i,r){var n=(o=latLongToSpherical(e.south,e.west,i,sphericalScratch)).x,a=o.y,o=(s=latLongToSpherical(e.north,e.east,i,sphericalScratch)).x,s=(i=s.y,0);return i<a&&(s=CesiumMath.PI-a,a=-CesiumMath.PI,i+=s),n-=CesiumMath.EPSILON5,a-=CesiumMath.EPSILON5,o+=CesiumMath.EPSILON5,i=1/((i+=CesiumMath.EPSILON5)-a),o=1/(o-n),addTextureCoordinateRotationAttributes(s={sphericalExtents:new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:[n,a,o,i]}),longitudeRotation:new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:1,normalize:!1,value:[s]})},t),add2DTextureCoordinateAttributes(e,r,s),s},ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes=function(e){return defined(e.southWest_HIGH)&&defined(e.southWest_LOW)&&defined(e.northward)&&defined(e.eastward)&&defined(e.planes2D_HIGH)&&defined(e.planes2D_LOW)&&defined(e.uMaxVmax)&&defined(e.uvMinAndExtents)},ShadowVolumeAppearance.hasAttributesForSphericalExtents=function(e){return defined(e.sphericalExtents)&&defined(e.longitudeRotation)&&defined(e.planes2D_HIGH)&&defined(e.planes2D_LOW)&&defined(e.uMaxVmax)&&defined(e.uvMinAndExtents)},ShadowVolumeAppearance.shouldUseSphericalCoordinates=function(e){return shouldUseSpherical(e)},ShadowVolumeAppearance.MAX_WIDTH_FOR_PLANAR_EXTENTS=CesiumMath.toRadians(1);var StencilFunction={NEVER:WebGLConstants$1.NEVER,LESS:WebGLConstants$1.LESS,EQUAL:WebGLConstants$1.EQUAL,LESS_OR_EQUAL:WebGLConstants$1.LEQUAL,GREATER:WebGLConstants$1.GREATER,NOT_EQUAL:WebGLConstants$1.NOTEQUAL,GREATER_OR_EQUAL:WebGLConstants$1.GEQUAL,ALWAYS:WebGLConstants$1.ALWAYS},StencilFunction$1=Object.freeze(StencilFunction),StencilOperation={ZERO:WebGLConstants$1.ZERO,KEEP:WebGLConstants$1.KEEP,REPLACE:WebGLConstants$1.REPLACE,INCREMENT:WebGLConstants$1.INCR,DECREMENT:WebGLConstants$1.DECR,INVERT:WebGLConstants$1.INVERT,INCREMENT_WRAP:WebGLConstants$1.INCR_WRAP,DECREMENT_WRAP:WebGLConstants$1.DECR_WRAP},StencilOperation$1=Object.freeze(StencilOperation),StencilConstants={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:StencilFunction$1.ALWAYS,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.REPLACE},backFunction:StencilFunction$1.ALWAYS,backOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.REPLACE},reference:StencilConstants.CESIUM_3D_TILE_MASK,mask:StencilConstants.CESIUM_3D_TILE_MASK}}},StencilConstants$1=Object.freeze(StencilConstants);function ClassificationPrimitive(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).geometryInstances;this.geometryInstances=t,this.show=defaultValue(e.show,!0),this.classificationType=defaultValue(e.classificationType,ClassificationType$1.BOTH),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=defaultValue(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=defaultValue(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._readyPromise=when.defer(),this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:defaultValue(e.vertexCacheOptimize,!1),interleave:defaultValue(e.interleave,!1),releaseGeometryInstances:defaultValue(e.releaseGeometryInstances,!0),allowPicking:defaultValue(e.allowPicking,!0),asynchronous:defaultValue(e.asynchronous,!0),compressVertices:defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}function getStencilDepthRenderState(e,t){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:t=t?StencilFunction$1.EQUAL:StencilFunction$1.ALWAYS,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.DECREMENT_WRAP,zPass:StencilOperation$1.KEEP},backFunction:t,backOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.INCREMENT_WRAP,zPass:StencilOperation$1.KEEP},reference:StencilConstants$1.CESIUM_3D_TILE_MASK,mask:StencilConstants$1.CESIUM_3D_TILE_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:DepthFunction$1.LESS_OR_EQUAL},depthMask:!1}}function getColorRenderState(e){return{stencilTest:{enabled:e,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},backFunction:StencilFunction$1.NOT_EQUAL,backOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND}}Object.defineProperties(ClassificationPrimitive.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}}),ClassificationPrimitive.isSupported=function(e){return e.context.stencilBuffer};var pickRenderState={stencilTest:{enabled:!0,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},backFunction:StencilFunction$1.NOT_EQUAL,backOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function createRenderStates$1(e,t,i,r){var n;defined(e._rsStencilDepthPass)||(n=!e.debugShowShadowVolume,e._rsStencilDepthPass=RenderState.fromCache(getStencilDepthRenderState(n,!1)),e._rsStencilDepthPass3DTiles=RenderState.fromCache(getStencilDepthRenderState(n,!0)),e._rsColorPass=RenderState.fromCache(getColorRenderState(n)),e._rsPickPass=RenderState.fromCache(pickRenderState))}function modifyForEncodedNormals$1(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){e="attribute vec2 compressedAttributes;",t=(t=t).replace(/attribute\s+vec3\s+extrudeDirection;/g,"");return[e,"vec3 extrudeDirection;\n",t=ShaderSource.replaceMain(t,"czm_non_compressed_main"),"void main() \n{ \n    extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n    czm_non_compressed_main(); \n}"].join("\n")}}function createShaderProgram$1(e,t){var i=t.context,r=e._primitive,n=ShadowVolumeAppearanceVS;n=e._primitive._batchTable.getVertexShaderCallback()(n);n=Primitive._appendDistanceDisplayConditionToShader(r,n),n=Primitive._modifyShaderPosition(e,n,t.scene3DOnly),n=Primitive._updateColorAttribute(r,n);var a=e._hasPlanarExtentsAttributes,o=a||e._hasSphericalExtentsAttribute;e._extruded&&(n=modifyForEncodedNormals$1(r,n));var s,l,c=e._extruded?"EXTRUDED_GEOMETRY":"",u=new ShaderSource({defines:[c],sources:[n]}),d=new ShaderSource({sources:[ShadowVolumeFS]}),h=e._primitive._attributeLocations,p=new ShadowVolumeAppearance(o,a,e.appearance);e._spStencil=ShaderProgram.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:h}),e._primitive.allowPicking?(l=ShaderSource.createPickVertexShaderSource(n),l=Primitive._appendShowToShader(r,l),l=Primitive._updatePickColorAttribute(l),s=p.createPickFragmentShader(!1),a=p.createPickVertexShader([c],l,!1,t.mapProjection),e._spPick=ShaderProgram.replaceCache({context:i,shaderProgram:e._spPick,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:h}),o&&(defined(a=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick"))||(s=p.createPickFragmentShader(!0),l=p.createPickVertexShader([c],l,!0,t.mapProjection),a=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:l,fragmentShaderSource:s,attributeLocations:h})),e._spPick2D=a)):e._spPick=ShaderProgram.fromCache({context:i,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:h}),u=new ShaderSource({defines:[c],sources:[n=Primitive._appendShowToShader(r,n)]}),e._sp=ShaderProgram.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:h}),u=p.createFragmentShader(!1),d=p.createVertexShader([c],n,!1,t.mapProjection),e._spColor=ShaderProgram.replaceCache({context:i,shaderProgram:e._spColor,vertexShaderSource:d,fragmentShaderSource:u,attributeLocations:h}),o&&(defined(u=i.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor"))||(o=p.createFragmentShader(!0),t=p.createVertexShader([c],n,!0,t.mapProjection),u=i.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:t,fragmentShaderSource:o,attributeLocations:h})),e._spColor2D=u)}function createColorCommands(e,t){var i,r=e._primitive,n=2*r._va.length;t.length=n;for(var a=0,o=r._batchTable.getUniformMapCallback()(e._uniformMap),s=e._needs2DShader,l=0;l<n;l+=2){var c,u=r._va[a++];defined(c=t[l])||(c=t[l]=new DrawCommand({owner:e,primitiveType:r._primitiveType})),c.vertexArray=u,c.renderState=e._rsStencilDepthPass,c.shaderProgram=e._sp,c.uniformMap=o,c.pass=Pass$1.TERRAIN_CLASSIFICATION,(i=DrawCommand.shallowClone(c,c.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,i.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,c.derivedCommands.tileset=i,defined(c=t[l+1])||(c=t[l+1]=new DrawCommand({owner:e,primitiveType:r._primitiveType})),c.vertexArray=u,c.renderState=e._rsColorPass,c.shaderProgram=e._spColor,c.pass=Pass$1.TERRAIN_CLASSIFICATION,defined(u=e.appearance.material)&&(o=combine(o,u._uniforms)),c.uniformMap=o,(i=DrawCommand.shallowClone(c,c.derivedCommands.tileset)).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,c.derivedCommands.tileset=i,s&&((u=DrawCommand.shallowClone(c,c.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,c.derivedCommands.appearance2D=u,(u=DrawCommand.shallowClone(i,i.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,i.derivedCommands.appearance2D=u)}for(var d=e._commandsIgnoreShow,h=e._spStencil,p=0,f=(n=d.length=n/2,0);f<n;++f){var m=d[f]=DrawCommand.shallowClone(t[p],d[f]);m.shaderProgram=h,m.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,p+=2}}function createPickCommands(e,t){var i,r,n,a,o=e._usePickOffsets,s=e._primitive,l=2*s._va.length,c=0;o&&(l=2*(i=s._pickOffsets).length),t.length=l;for(var u=0,d=s._batchTable.getUniformMapCallback()(e._uniformMap),h=e._needs2DShader,p=0;p<l;p+=2){var f=s._va[u++];o&&(r=i[c++],f=s._va[r.index]),defined(n=t[p])||(n=t[p]=new DrawCommand({owner:e,primitiveType:s._primitiveType,pickOnly:!0})),n.vertexArray=f,n.renderState=e._rsStencilDepthPass,n.shaderProgram=e._sp,n.uniformMap=d,n.pass=Pass$1.TERRAIN_CLASSIFICATION,o&&(n.offset=r.offset,n.count=r.count),(a=DrawCommand.shallowClone(n,n.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,a.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=a,defined(n=t[p+1])||(n=t[p+1]=new DrawCommand({owner:e,primitiveType:s._primitiveType,pickOnly:!0})),n.vertexArray=f,n.renderState=e._rsPickPass,n.shaderProgram=e._spPick,n.uniformMap=d,n.pass=Pass$1.TERRAIN_CLASSIFICATION,o&&(n.offset=r.offset,n.count=r.count),(a=DrawCommand.shallowClone(n,n.derivedCommands.tileset)).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=a,h&&((f=DrawCommand.shallowClone(n,n.derivedCommands.pick2D)).shaderProgram=e._spPick2D,n.derivedCommands.pick2D=f,(f=DrawCommand.shallowClone(a,a.derivedCommands.pick2D)).shaderProgram=e._spPick2D,a.derivedCommands.pick2D=f)}}function createCommands$1(e,t,i,r,n,a,o){createColorCommands(e,a),createPickCommands(e,o)}function boundingVolumeIndex(e,t){return Math.floor(e%t/2)}function updateAndQueueRenderCommand(e,t,i,r,n,a){e.modelMatrix=i,e.boundingVolume=n,e.cull=r,e.debugShowBoundingVolume=a,t.commandList.push(e)}function updateAndQueuePickCommand(e,t,i,r,n){e.modelMatrix=i,e.boundingVolume=n,e.cull=r,t.commandList.push(e)}function updateAndQueueCommands$1(e,t,i,r,n,a,o,s){var l,c=e._primitive;Primitive._updateBoundingVolumes(c,t,n),t.mode===SceneMode$1.SCENE3D?l=c._boundingSphereWC:t.mode===SceneMode$1.COLUMBUS_VIEW?l=c._boundingSphereCV:t.mode===SceneMode$1.SCENE2D&&defined(c._boundingSphere2D)?l=c._boundingSphere2D:defined(c._boundingSphereMorph)&&(l=c._boundingSphereMorph);var u,d=(u=e.classificationType)!==ClassificationType$1.CESIUM_3D_TILE,h=u!==ClassificationType$1.TERRAIN;if((u=t.passes).render){var p=i.length;for(g=0;g<p;++g)v=l[boundingVolumeIndex(g,p)],d&&updateAndQueueRenderCommand(i[g],t,n,a,v,o),h&&updateAndQueueRenderCommand(i[g].derivedCommands.tileset,t,n,a,v,o);if(t.invertClassification)for(var f=e._commandsIgnoreShow,m=f.length,g=0;g<m;++g)v=l[g],updateAndQueueRenderCommand(f[g],t,n,a,v,o)}if(u.pick){var y=r.length,_=c._pickOffsets;for(g=0;g<y;++g){var v=l[_[boundingVolumeIndex(g,y)].index];d&&updateAndQueuePickCommand(r[g],t,n,a,v),h&&updateAndQueuePickCommand(r[g].derivedCommands.tileset,t,n,a,v)}}}ClassificationPrimitive.prototype.update=function(e){if(defined(this._primitive)||defined(this.geometryInstances)){var t=this.appearance;defined(t)&&defined(t.material)&&t.material.update(e.context);var i=this,r=this._primitiveOptions;if(!defined(this._primitive)){var n,a,o,s=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],l=s.length,c=!1,u=!0,d=!1,h=!1;for(0<l&&(a=s[0].attributes,d=ShadowVolumeAppearance.hasAttributesForSphericalExtents(a),h=ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes(a),o=a.color),m=0;m<l;m++){var p=(n=s[m]).attributes.color;defined(p)&&(c=!0),u=u&&defined(p)&&ColorGeometryInstanceAttribute.equals(o,p)}if(!u&&!d&&!h)throw new DeveloperError("All GeometryInstances must have the same color attribute except via GroundPrimitives");c&&!defined(t)&&(t=new PerInstanceColorAppearance({flat:!0}),this.appearance=t),this._usePickOffsets=!d&&!h,this._hasSphericalExtentsAttribute=d,this._hasPlanarExtentsAttributes=h,this._hasPerColorAttribute=c;for(var f=new Array(l),m=0;m<l;++m)n=s[m],f[m]=new GeometryInstance({geometry:n.geometry,attributes:n.attributes,modelMatrix:n.modelMatrix,id:n.id,pickPrimitive:defaultValue(this._pickPrimitive,i)});r.appearance=t,r.geometryInstances=f,defined(this._createBoundingVolumeFunction)&&(r._createBoundingVolumeFunction=function(e,t){i._createBoundingVolumeFunction(e,t)}),r._createRenderStatesFunction=function(e,t,r,n){createRenderStates$1(i)},r._createShaderProgramFunction=function(e,t,r){createShaderProgram$1(i,t)},r._createCommandsFunction=function(e,t,r,n,a,o,s){createCommands$1(i,void 0,void 0,!0,!1,o,s)},defined(this._updateAndQueueCommandsFunction)?r._updateAndQueueCommandsFunction=function(e,t,r,n,a,o,s,l){i._updateAndQueueCommandsFunction(e,t,r,n,a,o,s,l)}:r._updateAndQueueCommandsFunction=function(e,t,r,n,a,o,s,l){updateAndQueueCommands$1(i,t,r,n,a,o,s)},this._primitive=new Primitive(r),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0),defined(e=e._error)?i._readyPromise.reject(e):i._readyPromise.resolve(i)}))}this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=RenderState.fromCache(getStencilDepthRenderState(!1,!1)),this._rsStencilDepthPass3DTiles=RenderState.fromCache(getStencilDepthRenderState(!1,!0)),this._rsColorPass=RenderState.fromCache(getColorRenderState(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=RenderState.fromCache(getStencilDepthRenderState(!0,!1)),this._rsStencilDepthPass3DTiles=RenderState.fromCache(getStencilDepthRenderState(!0,!0)),this._rsColorPass=RenderState.fromCache(getColorRenderState(!0))),this._primitive.appearance!==t&&(this._primitive.appearance=t),this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},ClassificationPrimitive.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)},ClassificationPrimitive.prototype.isDestroyed=function(){return!1},ClassificationPrimitive.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,destroyObject(this)};var GroundPrimitiveUniformMap={u_globeMinimumAltitude:function(){return 55e3}};function GroundPrimitive(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!defined(t)&&defined(i))for(var r=Array.isArray(i)?i:[i],n=r.length,a=0;a<n;a++){var o=r[a].attributes;if(defined(o)&&defined(o.color)){t=new PerInstanceColorAppearance({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=defaultValue(e.show,!0),this.classificationType=defaultValue(e.classificationType,ClassificationType$1.BOTH),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=defaultValue(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=when.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=ApproximateTerrainHeights._defaultMaxTerrainHeight,this._minTerrainHeight=ApproximateTerrainHeights._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0,this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:defaultValue(e.vertexCacheOptimize,!1),interleave:defaultValue(e.interleave,!1),releaseGeometryInstances:defaultValue(e.releaseGeometryInstances,!0),allowPicking:defaultValue(e.allowPicking,!0),asynchronous:defaultValue(e.asynchronous,!0),compressVertices:defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:GroundPrimitiveUniformMap}}function getComputeMaximumHeightFunction(e){return function(t,i){return i=(i=i.maximumRadius)/Math.cos(.5*t)-i,e._maxHeight+i}}function getComputeMinimumHeightFunction(e){return function(t,i){return e._minHeight}}Object.defineProperties(GroundPrimitive.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),GroundPrimitive.isSupported=ClassificationPrimitive.isSupported;var scratchBVCartesianHigh=new Cartesian3,scratchBVCartesianLow=new Cartesian3,scratchBVCartesian=new Cartesian3,scratchBVCartographic=new Cartographic,scratchBVRectangle=new Rectangle;function getRectangle(e,t){var i=e.mapProjection.ellipsoid;if(!defined(t.attributes)||!defined(t.attributes.position3DHigh))return defined(t.rectangle)?t.rectangle:void 0;for(var r=t.attributes.position3DHigh.values,n=t.attributes.position3DLow.values,a=r.length,o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=0;u<a;u+=3){var d=Cartesian3.unpack(r,u,scratchBVCartesianHigh),h=Cartesian3.unpack(n,u,scratchBVCartesianLow);d=Cartesian3.add(d,h,scratchBVCartesian),d=(h=i.cartesianToCartographic(d,scratchBVCartographic)).latitude,h=h.longitude,o=Math.min(o,d),s=Math.min(s,h),l=Math.max(l,d),c=Math.max(c,h)}return(t=scratchBVRectangle).north=l,t.south=o,t.east=c,t.west=s,t}function setMinMaxTerrainHeights(e,t,i){i=ApproximateTerrainHeights.getMinimumMaximumHeights(t,i),e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function createBoundingVolume(e,t,i){var r=t.mapProjection.ellipsoid;i=getRectangle(t,i),r=OrientedBoundingBox.fromRectangle(i,e._minHeight,e._maxHeight,r);e._boundingVolumes.push(r),t.scene3DOnly||(t=t.mapProjection,t=BoundingSphere.fromRectangleWithHeights2D(i,t,e._maxHeight,e._minHeight),Cartesian3.fromElements(t.center.z,t.center.x,t.center.y,t.center),e._boundingVolumes2D.push(t))}function boundingVolumeIndex$1(e,t){return Math.floor(e%t/2)}function updateAndQueueRenderCommand$1(e,t,i,r,n,a,o){var s=e._primitive;i.mode!==SceneMode$1.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=r,t.boundingVolume=a,t.cull=n,t.debugShowBoundingVolume=o,i.commandList.push(t)}function updateAndQueuePickCommand$1(e,t,i,r,n,a){var o=e._primitive;i.mode!==SceneMode$1.SCENE3D&&t.shaderProgram===o._spPick&&o._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=r,t.boundingVolume=a,t.cull=n,i.commandList.push(t)}function updateAndQueueCommands$2(e,t,i,r,n,a,o,s){var l=t.mode===SceneMode$1.SCENE3D?e._boundingVolumes:e._boundingVolumes2D,c=(h=e.classificationType)!==ClassificationType$1.CESIUM_3D_TILE,u=h!==ClassificationType$1.TERRAIN,d=t.passes,h=e._primitive;if(d.render){var p=i.length;for(g=0;g<p;++g)_=l[boundingVolumeIndex$1(g,p)],c&&updateAndQueueRenderCommand$1(e,i[g],t,n,a,_,o),u&&updateAndQueueRenderCommand$1(e,i[g].derivedCommands.tileset,t,n,a,_,o);if(t.invertClassification)for(var f=h._commandsIgnoreShow,m=f.length,g=0;g<m;++g)_=l[g],updateAndQueueRenderCommand$1(e,f[g],t,n,a,_,o)}if(d.pick){var y,_,v=r.length;for(e._useFragmentCulling||(y=h._primitive._pickOffsets),g=0;g<v;++g)_=l[boundingVolumeIndex$1(g,v)],e._useFragmentCulling||(_=l[y[boundingVolumeIndex$1(g,v)].index]),c&&updateAndQueuePickCommand$1(e,r[g],t,n,a,_),u&&updateAndQueuePickCommand$1(e,r[g].derivedCommands.tileset,t,n,a,_)}}function MaterialProperty(){DeveloperError.throwInstantiationError()}function DynamicGeometryUpdater(e,t,i){this._primitives=t,this._orderedGroundPrimitives=i,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}GroundPrimitive.initializeTerrainHeights=function(){return ApproximateTerrainHeights.initialize()},GroundPrimitive.prototype.update=function(e){if(defined(this._primitive)||defined(this.geometryInstances))if(ApproximateTerrainHeights.initialized){var t=this,i=this._classificationPrimitiveOptions;if(!defined(this._primitive)){var r,n,a,o,s=e.mapProjection.ellipsoid,l=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=l.length,u=new Array(c);for(m=0;m<c;++m){var d=getRectangle(e,n=(r=l[m]).geometry);defined(o)?defined(d)&&Rectangle.union(o,d,o):o=Rectangle.clone(d);var h=r.id;defined(h)&&defined(d)&&(d=ApproximateTerrainHeights.getBoundingSphere(d,s),this._boundingSpheresKeys.push(h),this._boundingSpheres.push(d)),defined(a=n.constructor)&&defined(a.createShadowVolume)}setMinMaxTerrainHeights(this,o,s);var p=e.terrainExaggeration;if(this._minHeight=this._minTerrainHeight*p,this._maxHeight=this._maxTerrainHeight*p,p=GroundPrimitive._supportsMaterials(e.context),this._useFragmentCulling=p){for(var f=!0,m=0;m<c;++m)if(o=getRectangle(e,n=(r=l[m]).geometry),ShadowVolumeAppearance.shouldUseSphericalCoordinates(o)){f=!1;break}for(m=0;m<c;++m){a=(n=(r=l[m]).geometry).constructor;var g,y=getRectangle(e,n),_=n.textureCoordinateRotationPoints,v=f?ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(y,_,s,e.mapProjection,this._maxHeight):ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(y,_,s,e.mapProjection),C=r.attributes;for(g in C)C.hasOwnProperty(g)&&(v[g]=C[g]);u[m]=new GeometryInstance({geometry:a.createShadowVolume(n,getComputeMinimumHeightFunction(this),getComputeMaximumHeightFunction(this)),attributes:v,id:r.id})}}else for(m=0;m<c;++m)a=(n=(r=l[m]).geometry).constructor,u[m]=new GeometryInstance({geometry:a.createShadowVolume(n,getComputeMinimumHeightFunction(this),getComputeMaximumHeightFunction(this)),attributes:r.attributes,id:r.id});i.geometryInstances=u,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){createBoundingVolume(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,r,n,a,o,s,l){updateAndQueueCommands$2(t,i,r,n,a,o,s)},this._primitive=new ClassificationPrimitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0),defined(e=e._error)?t._readyPromise.reject(e):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}else GroundPrimitive.initializeTerrainHeights()},GroundPrimitive.prototype.getBoundingSphere=function(e){if(-1!==(e=this._boundingSpheresKeys.indexOf(e)))return this._boundingSpheres[e]},GroundPrimitive.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)},GroundPrimitive.prototype.isDestroyed=function(){return!1},GroundPrimitive.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)},GroundPrimitive._supportsMaterials=function(e){return e.depthTexture},GroundPrimitive.supportsMaterials=function(e){return GroundPrimitive._supportsMaterials(e.frameState.context)},Object.defineProperties(MaterialProperty.prototype,{isConstant:{get:DeveloperError.throwInstantiationError},definitionChanged:{get:DeveloperError.throwInstantiationError}}),MaterialProperty.prototype.getType=DeveloperError.throwInstantiationError,MaterialProperty.prototype.getValue=DeveloperError.throwInstantiationError,MaterialProperty.prototype.equals=DeveloperError.throwInstantiationError,MaterialProperty.getValue=function(e,t,i){var r;return defined(t)&&defined(r=t.getType(e))?(defined(i)&&i.type===r||(i=Material.fromType(r)),t.getValue(e,i.uniforms)):(defined(i)&&i.type===Material.ColorType||(i=Material.fromType(Material.ColorType)),Color.clone(Color.WHITE,i.uniforms.color)),i},DynamicGeometryUpdater.prototype._isHidden=function(e,t,i){return!e.isShowing||!e.isAvailable(i)||!Property.getValueOrDefault(t.show,i,!0)},DynamicGeometryUpdater.prototype._setOptions=DeveloperError.throwInstantiationError,DynamicGeometryUpdater.prototype.update=function(e){var t=this._geometryUpdater,i=t._onTerrain,r=this._primitives,n=this._orderedGroundPrimitives;i?n.remove(this._primitive):(r.removeAndDestroy(this._primitive),r.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;var a,o,s,l,c=this._entity,u=c[this._geometryUpdater._geometryPropertyName];this._setOptions(c,u,e),this._isHidden(c,u,e)||(a=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options,defined(u.fill)&&!u.fill.getValue(e)||(o=(s=t.fillMaterialProperty)instanceof ColorMaterialProperty,c=t._getIsClosed(l),c=o?new PerInstanceColorAppearance({closed:c,flat:i&&!t._supportsMaterialsforEntitiesOnTerrain}):(s=MaterialProperty.getValue(e,s,this._material),new MaterialAppearance({material:this._material=s,translucent:s.isTranslucent(),closed:c})),i?(l.vertexFormat=PerInstanceColorAppearance.VERTEX_FORMAT,this._primitive=n.add(new GroundPrimitive({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:c,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),Property.getValueOrUndefined(this._geometryUpdater.zIndex,e))):(l.vertexFormat=c.vertexFormat,l=this._geometryUpdater.createFillGeometryInstance(e),o&&(c.translucent=255!==l.attributes.color.value[3]),this._primitive=r.add(new Primitive({geometryInstances:l,appearance:c,asynchronous:!1,shadows:a})))),!i&&defined(u.outline)&&u.outline.getValue(e)&&(i=this._geometryUpdater.createOutlineGeometryInstance(e),e=Property.getValueOrDefault(u.outlineWidth,e,1),this._outlinePrimitive=r.add(new Primitive({geometryInstances:i,appearance:new PerInstanceColorAppearance({flat:!0,translucent:255!==i.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(e)}}),asynchronous:!1,shadows:a}))))},DynamicGeometryUpdater.prototype.getBoundingSphere=function(e){var t,i=this._entity,r=this._primitive,n=this._outlinePrimitive;return defined(r)&&r.show&&r.ready&&defined(t=r.getGeometryInstanceAttributes(i))&&defined(t.boundingSphere)||defined(n)&&n.show&&n.ready&&defined(t=n.getGeometryInstanceAttributes(i))&&defined(t.boundingSphere)?(BoundingSphere.clone(t.boundingSphere,e),BoundingSphereState$1.DONE):defined(r)&&!r.ready||defined(n)&&!n.ready?BoundingSphereState$1.PENDING:BoundingSphereState$1.FAILED},DynamicGeometryUpdater.prototype.isDestroyed=function(){return!1},DynamicGeometryUpdater.prototype.destroy=function(){var e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),destroyObject(this)};var PolylineShadowVolumeFS="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main(void)\n{\nfloat logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));\nvec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\nif (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\nfloat widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\nfloat distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\nfloat distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\nif (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec3 alignedPlaneNormal;\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\ns = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\nfloat t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, t);\nmaterialInput.str = vec3(s, t, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\ngl_FragColor.rgb *= gl_FragColor.a;\nczm_writeDepthClamp();\n}\n",PolylineShadowVolumeMorphFS="varying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\nreturn (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\nvoid main(void)\n{\nvec4 eyeCoordinate = gl_FragCoord;\neyeCoordinate /= eyeCoordinate.w;\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\nfloat distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\ndistanceFromStart = max(0.0, distanceFromStart);\ndistanceFromEnd = max(0.0, distanceFromEnd);\nfloat s = distanceFromStart / (distanceFromStart + distanceFromEnd);\ns = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, v_texcoordT);\nmaterialInput.str = vec3(s, v_texcoordT, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n",PolylineShadowVolumeMorphVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\nattribute float batchId;\nvarying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nvoid main()\n{\nv_batchId = batchId;\nvec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\nvec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\nvec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nvec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nvec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec4 startPlane2D;\nvec4 startPlane3D;\nstartPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\nstartPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\nvec4 rightPlane2D;\nvec4 rightPlane3D;\nrightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nrightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nrightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\nrightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\nposRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\nposRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\nposRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nposEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nposEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\nvec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\nvec4 endPlane2D;\nvec4 endPlane3D;\nendPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\nendPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\nv_forwardDirectionEC = normalize(endEC - startEC);\nvec2 cleanTexcoordNormalization2D;\ncleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\ncleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\nvec2 cleanTexcoordNormalization3D;\ncleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\ncleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\ncleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\nv_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\nv_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\nv_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n#ifdef WIDTH_VARYING\nfloat width = czm_batchTable_width(batchId);\nfloat halfWidth = width * 0.5;\nv_width = width;\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\nfloat halfWidth = 0.5 * czm_batchTable_width(batchId);\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\nvec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\nvec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nvec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\ngeodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc3D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\npositionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC;\nvec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\nabsStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\nabsEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\nplaneDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\nupOrDown = normalize(cross(rightPlane2D.xyz, planeDirection));\nnormalEC = normalize(cross(planeDirection, upOrDown));\ngeodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\ngeodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc2D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\nv_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\npositionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC;\ngl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",PolylineShadowVolumeVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n#ifndef COLUMBUS_VIEW_2D\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n#endif\nattribute float batchId;\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\nvec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\nvec3 ecEnd = forwardDirectionEC + ecStart;\nforwardDirectionEC = normalize(forwardDirectionEC);\nv_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nvec4 startPlaneEC;\nstartPlaneEC.xyz =  czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz =  czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\nv_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n#else // COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\nvec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\nvec3 ecEnd = ecStart + offset;\nvec3 forwardDirectionEC = normalize(offset);\nvec4 startPlaneEC;\nstartPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nv_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\nv_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n#endif // COLUMBUS_VIEW_2D\nv_endEcAndStartEcX.xyz = ecEnd;\nv_endEcAndStartEcX.w = ecStart.x;\nv_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\nvec4 positionRelativeToEye = czm_computePosition();\nvec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\nvec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nupOrDown = cross(forwardDirectionEC, normalEC);\nupOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\nupOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\nupOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\npositionEC.xyz += upOrDown;\nv_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\nfloat width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\nv_width = width;\n#endif\nv_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\nv_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\nv_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\nv_endPlaneNormalEcAndBatchId.w = batchId;\nwidth = width * max(0.0, czm_metersPerPixel(positionEC));\nwidth = width / dot(normalEC, v_rightPlaneEC.xyz);\n#ifdef COLUMBUS_VIEW_2D\nnormalEC *= sign(texcoordNormalization2D.x);\n#else\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\npositionEC.xyz += width * normalEC;\ngl_Position = czm_depthClamp(czm_projection * positionEC);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",PolylineColorAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_color = color;\n}\n",PolylineCommon="void clipLineSegmentToNearPlane(\nvec3 p0,\nvec3 p1,\nout vec4 positionWC,\nout bool clipped,\nout bool culledByNearPlane,\nout vec4 clippedPositionEC)\n{\nculledByNearPlane = false;\nclipped = false;\nvec3 p0ToP1 = p1 - p0;\nfloat magnitude = length(p0ToP1);\nvec3 direction = normalize(p0ToP1);\nfloat endPoint0Distance =  czm_currentFrustum.x + p0.z;\nfloat denominator = -direction.z;\nif (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n{\nculledByNearPlane = true;\n}\nelse if (endPoint0Distance > 0.0)\n{\nfloat t = endPoint0Distance / denominator;\nif (t < 0.0 || t > magnitude)\n{\nculledByNearPlane = true;\n}\nelse\n{\np0 = p0 + t * direction;\np0.z = min(p0.z, -czm_currentFrustum.x);\nclipped = true;\n}\n}\nclippedPositionEC = vec4(p0, 1.0);\npositionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n}\nvec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n{\n#ifdef POLYLINE_DASH\nvec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\nvec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\nvec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\nvec2 lineDir;\nif (usePrevious) {\nlineDir = normalize(positionWindow.xy - previousWindow.xy);\n}\nelse {\nlineDir = normalize(nextWindow.xy - positionWindow.xy);\n}\nangle = atan(lineDir.x, lineDir.y) - 1.570796327;\nangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n#endif\nvec4 clippedPrevWC, clippedPrevEC;\nbool prevSegmentClipped, prevSegmentCulled;\nclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\nvec4 clippedNextWC, clippedNextEC;\nbool nextSegmentClipped, nextSegmentCulled;\nclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\nbool segmentClipped, segmentCulled;\nvec4 clippedPositionWC, clippedPositionEC;\nclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\nif (segmentCulled)\n{\nreturn vec4(0.0, 0.0, 0.0, 1.0);\n}\nvec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\nvec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\nif (prevSegmentCulled)\n{\ndirectionToPrevWC = -directionToNextWC;\n}\nelse if (nextSegmentCulled)\n{\ndirectionToNextWC = -directionToPrevWC;\n}\nvec2 thisSegmentForwardWC, otherSegmentForwardWC;\nif (usePrevious)\n{\nthisSegmentForwardWC = -directionToPrevWC;\notherSegmentForwardWC = directionToNextWC;\n}\nelse\n{\nthisSegmentForwardWC = directionToNextWC;\notherSegmentForwardWC =  -directionToPrevWC;\n}\nvec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\nvec2 leftWC = thisSegmentLeftWC;\nfloat expandWidth = width * 0.5;\nif (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n{\nvec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\nvec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\nfloat leftSumLength = length(leftSumWC);\nleftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\nvec2 u = -thisSegmentForwardWC;\nvec2 v = leftWC;\nfloat sinAngle = abs(u.x * v.y - u.y * v.x);\nexpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n}\nvec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\nreturn vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\nvec4 positionEC = czm_modelViewRelativeToEye * position;\nvec4 prevEC = czm_modelViewRelativeToEye * previous;\nvec4 nextEC = czm_modelViewRelativeToEye * next;\nreturn getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);\n}\n",defaultVertexShaderSource=PolylineCommon+"\n"+PolylineColorAppearanceVS,defaultFragmentShaderSource=PerInstanceFlatColorAppearanceFS;function PolylineColorAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=PolylineColorAppearance.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=defaultValue(e.vertexShaderSource,defaultVertexShaderSource),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,defaultFragmentShaderSource),this._renderState=Appearance.getDefaultRenderState(t,!1,e.renderState),this._closed=!1,this._vertexFormat=i}FeatureDetection.isInternetExplorer()||(defaultVertexShaderSource="#define CLIP_POLYLINE \n"+defaultVertexShaderSource),Object.defineProperties(PolylineColorAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),PolylineColorAppearance.VERTEX_FORMAT=VertexFormat.POSITION_ONLY,PolylineColorAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,PolylineColorAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,PolylineColorAppearance.prototype.getRenderState=Appearance.prototype.getRenderState;var PolylineMaterialAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\nattribute float batchId;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_width = width;\nv_st.s = st.s;\nv_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\nv_polylineAngle = angle;\n}\n",PolylineFS="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying vec2 v_st;\nvoid main()\n{\nczm_materialInput materialInput;\nvec2 st = v_st;\nst.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = vec3(st, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#ifdef VECTOR_TILE\ngl_FragColor *= u_highlightColor;\n#endif\nczm_writeLogDepth();\n}\n",defaultVertexShaderSource$1=PolylineCommon+"\n"+PolylineMaterialAppearanceVS,defaultFragmentShaderSource$1=PolylineFS;function PolylineMaterialAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=PolylineMaterialAppearance.VERTEX_FORMAT;this.material=defined(e.material)?e.material:Material.fromType(Material.ColorType),this.translucent=t,this._vertexShaderSource=defaultValue(e.vertexShaderSource,defaultVertexShaderSource$1),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,defaultFragmentShaderSource$1),this._renderState=Appearance.getDefaultRenderState(t,!1,e.renderState),this._closed=!1,this._vertexFormat=i}function GroundPolylinePrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;var t=e.appearance;defined(t)||(t=new PolylineMaterialAppearance),this.appearance=t,this.show=defaultValue(e.show,!0),this.classificationType=defaultValue(e.classificationType,ClassificationType$1.BOTH),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=defaultValue(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:defaultValue(e.interleave,!1),releaseGeometryInstances:defaultValue(e.releaseGeometryInstances,!0),allowPicking:defaultValue(e.allowPicking,!0),asynchronous:defaultValue(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._readyPromise=when.defer(),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=getRenderState(!1),this._renderState3DTiles=getRenderState(!0),this._renderStateMorph=RenderState.fromCache({cull:{enabled:!0,face:CullFace$1.FRONT},depthTest:{enabled:!0},blending:BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}function createShaderProgram$2(e,t,i){var r=t.context,n=e._primitive,a=n._attributeLocations,o=n._batchTable.getVertexShaderCallback()(PolylineShadowVolumeVS);o=Primitive._appendShowToShader(n,o);o=Primitive._appendDistanceDisplayConditionToShader(n,o),o=Primitive._modifyShaderPosition(e,o,t.scene3DOnly);var s=n._batchTable.getVertexShaderCallback()(PolylineShadowVolumeMorphVS);s=Primitive._appendShowToShader(n,s);s=Primitive._appendDistanceDisplayConditionToShader(n,s),s=Primitive._modifyShaderPosition(e,s,t.scene3DOnly);var l=n._batchTable.getVertexShaderCallback()(PolylineShadowVolumeFS),c=["GLOBE_MINIMUM_ALTITUDE "+t.mapProjection.ellipsoid.minimumRadius.toFixed(1)],u="",d="";defined(i.material)?(-1!==(d=defined(i.material)?i.material.shaderSource:"").search(/varying\s+float\s+v_polylineAngle;/g)&&c.push("ANGLE_VARYING"),-1!==d.search(/varying\s+float\s+v_width;/g)&&c.push("WIDTH_VARYING")):u="PER_INSTANCE_COLOR",c.push(u),t=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",u]:[u],i=new ShaderSource({defines:c,sources:[o]}),u=new ShaderSource({defines:t,sources:[d,l]}),e._sp=ShaderProgram.replaceCache({context:r,shaderProgram:n._sp,vertexShaderSource:i,fragmentShaderSource:u,attributeLocations:a}),defined(i=r.shaderCache.getDerivedShaderProgram(e._sp,"2dColor"))||(o=new ShaderSource({defines:c.concat(["COLUMBUS_VIEW_2D"]),sources:[o]}),i=r.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:r,shaderProgram:e._sp2D,vertexShaderSource:o,fragmentShaderSource:u,attributeLocations:a})),e._sp2D=i,defined(i=r.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor"))||(s=new ShaderSource({defines:c.concat(["MAX_TERRAIN_HEIGHT "+ApproximateTerrainHeights._defaultMaxTerrainHeight.toFixed(1)]),sources:[s]}),l=new ShaderSource({defines:t,sources:[d,l=n._batchTable.getVertexShaderCallback()(PolylineShadowVolumeMorphFS)]}),i=r.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:r,shaderProgram:e._spMorph,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:a})),e._spMorph=i}function getRenderState(e){return RenderState.fromCache({cull:{enabled:!0},blending:BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:StencilFunction$1.EQUAL,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},backFunction:StencilFunction$1.EQUAL,backOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},reference:StencilConstants$1.CESIUM_3D_TILE_MASK,mask:StencilConstants$1.CESIUM_3D_TILE_MASK}})}function createCommands$2(e,t,i,r,n,a){var o=e._primitive,s=o._va.length;n.length=s,a.length=s;i=t instanceof PolylineColorAppearance?{}:i._uniforms;for(var l=o._batchTable.getUniformMapCallback()(i),c=0;c<s;c++){var u=o._va[c],d=n[c];defined(d)||(d=n[c]=new DrawCommand({owner:e,primitiveType:o._primitiveType})),d.vertexArray=u,d.renderState=e._renderState,d.shaderProgram=e._sp,d.uniformMap=l,d.pass=Pass$1.TERRAIN_CLASSIFICATION,d.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";var h=DrawCommand.shallowClone(d,d.derivedCommands.tileset);h.renderState=e._renderState3DTiles,h.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=h,(u=DrawCommand.shallowClone(d,d.derivedCommands.color2D)).shaderProgram=e._sp2D,d.derivedCommands.color2D=u,(u=DrawCommand.shallowClone(h,h.derivedCommands.color2D)).shaderProgram=e._sp2D,h.derivedCommands.color2D=u,(u=DrawCommand.shallowClone(d,d.derivedCommands.colorMorph)).renderState=e._renderStateMorph,u.shaderProgram=e._spMorph,u.pickId="czm_batchTable_pickColor(v_batchId)",d.derivedCommands.colorMorph=u}}function updateAndQueueCommand(e,t,i,r,n,a,o){i.mode===SceneMode$1.MORPHING?t=t.derivedCommands.colorMorph:i.mode!==SceneMode$1.SCENE3D&&(t=t.derivedCommands.color2D),t.modelMatrix=r,t.boundingVolume=a,t.cull=n,t.debugShowBoundingVolume=o,i.commandList.push(t)}function updateAndQueueCommands$3(e,t,i,r,n,a,o){var s,l=e._primitive;Primitive._updateBoundingVolumes(l,t,n),t.mode===SceneMode$1.SCENE3D?s=l._boundingSphereWC:t.mode===SceneMode$1.COLUMBUS_VIEW?s=l._boundingSphereCV:t.mode===SceneMode$1.SCENE2D&&defined(l._boundingSphere2D)?s=l._boundingSphere2D:defined(l._boundingSphereMorph)&&(s=l._boundingSphereMorph);var c=t.mode===SceneMode$1.MORPHING,u=e.classificationType,d=u!==ClassificationType$1.CESIUM_3D_TILE,h=u!==ClassificationType$1.TERRAIN&&!c;if((c=t.passes).render||c.pick&&l.allowPicking)for(var p=i.length,f=0;f<p;++f){var m=s[f];d&&updateAndQueueCommand(e,i[f],t,n,a,m,o),h&&updateAndQueueCommand(e,i[f].derivedCommands.tileset,t,n,a,m,o)}}FeatureDetection.isInternetExplorer()||(defaultVertexShaderSource$1="#define CLIP_POLYLINE \n"+defaultVertexShaderSource$1),Object.defineProperties(PolylineMaterialAppearance.prototype,{vertexShaderSource:{get:function(){var e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&(e="#define POLYLINE_DASH\n"+e),e}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),PolylineMaterialAppearance.VERTEX_FORMAT=VertexFormat.POSITION_AND_ST,PolylineMaterialAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,PolylineMaterialAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,PolylineMaterialAppearance.prototype.getRenderState=Appearance.prototype.getRenderState,Object.defineProperties(GroundPolylinePrimitive.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),GroundPolylinePrimitive.initializeTerrainHeights=function(){return ApproximateTerrainHeights.initialize()},GroundPolylinePrimitive.prototype.update=function(e){if(defined(this._primitive)||defined(this.geometryInstances))if(ApproximateTerrainHeights.initialized){var t=this,i=this._primitiveOptions;if(!defined(this._primitive)){for(var r=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],n=r.length,a=new Array(n),o=0;o<n;++o)if(!defined(c=r[o].attributes)||!defined(c.color)){this._hasPerInstanceColors=!1;break}for(o=0;o<n;++o){var s,l=r[o],c={},u=l.attributes;for(s in u)u.hasOwnProperty(s)&&(c[s]=u[s]);defined(c.width)||(c.width=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,GroundPolylineGeometry.setProjectionAndEllipsoid(l.geometry,e.mapProjection),a[o]=new GeometryInstance({geometry:l.geometry,attributes:c,id:l.id,pickPrimitive:t})}i.geometryInstances=a,i.appearance=this.appearance,i._createShaderProgramFunction=function(e,i,r){createShaderProgram$2(t,i,r)},i._createCommandsFunction=function(e,i,r,n,a,o,s){createCommands$2(t,i,r,n,o,s)},i._updateAndQueueCommandsFunction=function(e,i,r,n,a,o,s,l){updateAndQueueCommands$3(t,i,r,n,a,o,s)},this._primitive=new Primitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0),defined(e=e._error)?t._readyPromise.reject(e):t._readyPromise.resolve(t)}))}if(this.appearance instanceof PolylineColorAppearance&&!this._hasPerInstanceColors)throw new DeveloperError("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}else GroundPolylinePrimitive.initializeTerrainHeights()},GroundPolylinePrimitive.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)},GroundPolylinePrimitive.isSupported=function(e){return e.frameState.context.depthTexture},GroundPolylinePrimitive.prototype.isDestroyed=function(){return!1},GroundPolylinePrimitive.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,destroyObject(this)};var defaultRepeat=new Cartesian2(1,1),defaultTransparent=!1,defaultColor$1=Color.WHITE;function ImageMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}function createMaterialProperty(e){if(e instanceof Color)return new ColorMaterialProperty(e);if("string"==typeof e||e instanceof Resource||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){var t=new ImageMaterialProperty;return t.image=e,t}}function createMaterialPropertyDescriptor(e,t){return createPropertyDescriptor(e,t,createMaterialProperty)}function BoxGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PositionProperty(){DeveloperError.throwInstantiationError()}Object.defineProperties(ImageMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._image)&&Property.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:createPropertyDescriptor("image"),repeat:createPropertyDescriptor("repeat"),color:createPropertyDescriptor("color"),transparent:createPropertyDescriptor("transparent")}),ImageMaterialProperty.prototype.getType=function(e){return"Image"},ImageMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.image=Property.getValueOrUndefined(this._image,e),t.repeat=Property.getValueOrClonedDefault(this._repeat,e,defaultRepeat,t.repeat),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$1,t.color),Property.getValueOrDefault(this._transparent,e,defaultTransparent)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},ImageMaterialProperty.prototype.equals=function(e){return this===e||e instanceof ImageMaterialProperty&&Property.equals(this._image,e._image)&&Property.equals(this._repeat,e._repeat)&&Property.equals(this._color,e._color)&&Property.equals(this._transparent,e._transparent)},Object.defineProperties(BoxGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),dimensions:createPropertyDescriptor("dimensions"),heightReference:createPropertyDescriptor("heightReference"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),BoxGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new BoxGraphics(this)},BoxGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.dimensions=defaultValue(this.dimensions,e.dimensions),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(PositionProperty.prototype,{isConstant:{get:DeveloperError.throwInstantiationError},definitionChanged:{get:DeveloperError.throwInstantiationError},referenceFrame:{get:DeveloperError.throwInstantiationError}}),PositionProperty.prototype.getValue=DeveloperError.throwInstantiationError,PositionProperty.prototype.getValueInReferenceFrame=DeveloperError.throwInstantiationError,PositionProperty.prototype.equals=DeveloperError.throwInstantiationError;var scratchMatrix3=new Matrix3;function ConstantPositionProperty(e,t){this._definitionChanged=new Event,this._value=Cartesian3.clone(e),this._referenceFrame=defaultValue(t,ReferenceFrame$1.FIXED)}function CorridorGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function createRawProperty(e){return e}function createRawPropertyDescriptor(e,t){return createPropertyDescriptor(e,t,createRawProperty)}function CylinderGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function EllipseGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function EllipsoidGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function LabelGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}PositionProperty.convertToReferenceFrame=function(e,t,i,r,n){return defined(t)?(defined(n)||(n=new Cartesian3),i===r?Cartesian3.clone(t,n):(defined(r=Transforms.computeIcrfToFixedMatrix(e,scratchMatrix3))||(r=Transforms.computeTemeToPseudoFixedMatrix(e,scratchMatrix3)),i===ReferenceFrame$1.INERTIAL?Matrix3.multiplyByVector(r,t,n):i===ReferenceFrame$1.FIXED?Matrix3.multiplyByVector(Matrix3.transpose(r,scratchMatrix3),t,n):void 0)):t},Object.defineProperties(ConstantPositionProperty.prototype,{isConstant:{get:function(){return!defined(this._value)||this._referenceFrame===ReferenceFrame$1.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),ConstantPositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},ConstantPositionProperty.prototype.setValue=function(e,t){var i=!1;Cartesian3.equals(this._value,e)||(i=!0,this._value=Cartesian3.clone(e)),defined(t)&&this._referenceFrame!==t&&(i=!0,this._referenceFrame=t),i&&this._definitionChanged.raiseEvent(this)},ConstantPositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){return PositionProperty.convertToReferenceFrame(e,this._value,this._referenceFrame,t,i)},ConstantPositionProperty.prototype.equals=function(e){return this===e||e instanceof ConstantPositionProperty&&Cartesian3.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame},Object.defineProperties(CorridorGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),positions:createPropertyDescriptor("positions"),width:createPropertyDescriptor("width"),height:createPropertyDescriptor("height"),heightReference:createPropertyDescriptor("heightReference"),extrudedHeight:createPropertyDescriptor("extrudedHeight"),extrudedHeightReference:createPropertyDescriptor("extrudedHeightReference"),cornerType:createPropertyDescriptor("cornerType"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),CorridorGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new CorridorGraphics(this)},CorridorGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.positions=defaultValue(this.positions,e.positions),this.width=defaultValue(this.width,e.width),this.height=defaultValue(this.height,e.height),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.extrudedHeight=defaultValue(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=defaultValue(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=defaultValue(this.cornerType,e.cornerType),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(CylinderGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),length:createPropertyDescriptor("length"),topRadius:createPropertyDescriptor("topRadius"),bottomRadius:createPropertyDescriptor("bottomRadius"),heightReference:createPropertyDescriptor("heightReference"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),numberOfVerticalLines:createPropertyDescriptor("numberOfVerticalLines"),slices:createPropertyDescriptor("slices"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),CylinderGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new CylinderGraphics(this)},CylinderGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.length=defaultValue(this.length,e.length),this.topRadius=defaultValue(this.topRadius,e.topRadius),this.bottomRadius=defaultValue(this.bottomRadius,e.bottomRadius),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=defaultValue(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=defaultValue(this.slices,e.slices),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(EllipseGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),semiMajorAxis:createPropertyDescriptor("semiMajorAxis"),semiMinorAxis:createPropertyDescriptor("semiMinorAxis"),height:createPropertyDescriptor("height"),heightReference:createPropertyDescriptor("heightReference"),extrudedHeight:createPropertyDescriptor("extrudedHeight"),extrudedHeightReference:createPropertyDescriptor("extrudedHeightReference"),rotation:createPropertyDescriptor("rotation"),stRotation:createPropertyDescriptor("stRotation"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),numberOfVerticalLines:createPropertyDescriptor("numberOfVerticalLines"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),EllipseGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new EllipseGraphics(this)},EllipseGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.semiMajorAxis=defaultValue(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=defaultValue(this.semiMinorAxis,e.semiMinorAxis),this.height=defaultValue(this.height,e.height),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.extrudedHeight=defaultValue(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=defaultValue(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=defaultValue(this.rotation,e.rotation),this.stRotation=defaultValue(this.stRotation,e.stRotation),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=defaultValue(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(EllipsoidGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),radii:createPropertyDescriptor("radii"),innerRadii:createPropertyDescriptor("innerRadii"),minimumClock:createPropertyDescriptor("minimumClock"),maximumClock:createPropertyDescriptor("maximumClock"),minimumCone:createPropertyDescriptor("minimumCone"),maximumCone:createPropertyDescriptor("maximumCone"),heightReference:createPropertyDescriptor("heightReference"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),stackPartitions:createPropertyDescriptor("stackPartitions"),slicePartitions:createPropertyDescriptor("slicePartitions"),subdivisions:createPropertyDescriptor("subdivisions"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),EllipsoidGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new EllipsoidGraphics(this)},EllipsoidGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.radii=defaultValue(this.radii,e.radii),this.innerRadii=defaultValue(this.innerRadii,e.innerRadii),this.minimumClock=defaultValue(this.minimumClock,e.minimumClock),this.maximumClock=defaultValue(this.maximumClock,e.maximumClock),this.minimumCone=defaultValue(this.minimumCone,e.minimumCone),this.maximumCone=defaultValue(this.maximumCone,e.maximumCone),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.stackPartitions=defaultValue(this.stackPartitions,e.stackPartitions),this.slicePartitions=defaultValue(this.slicePartitions,e.slicePartitions),this.subdivisions=defaultValue(this.subdivisions,e.subdivisions),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(LabelGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),text:createPropertyDescriptor("text"),font:createPropertyDescriptor("font"),style:createPropertyDescriptor("style"),scale:createPropertyDescriptor("scale"),showBackground:createPropertyDescriptor("showBackground"),backgroundColor:createPropertyDescriptor("backgroundColor"),backgroundPadding:createPropertyDescriptor("backgroundPadding"),pixelOffset:createPropertyDescriptor("pixelOffset"),eyeOffset:createPropertyDescriptor("eyeOffset"),horizontalOrigin:createPropertyDescriptor("horizontalOrigin"),verticalOrigin:createPropertyDescriptor("verticalOrigin"),heightReference:createPropertyDescriptor("heightReference"),fillColor:createPropertyDescriptor("fillColor"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),translucencyByDistance:createPropertyDescriptor("translucencyByDistance"),pixelOffsetScaleByDistance:createPropertyDescriptor("pixelOffsetScaleByDistance"),scaleByDistance:createPropertyDescriptor("scaleByDistance"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),disableDepthTestDistance:createPropertyDescriptor("disableDepthTestDistance")}),LabelGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new LabelGraphics(this)},LabelGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.text=defaultValue(this.text,e.text),this.font=defaultValue(this.font,e.font),this.style=defaultValue(this.style,e.style),this.scale=defaultValue(this.scale,e.scale),this.showBackground=defaultValue(this.showBackground,e.showBackground),this.backgroundColor=defaultValue(this.backgroundColor,e.backgroundColor),this.backgroundPadding=defaultValue(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=defaultValue(this.pixelOffset,e.pixelOffset),this.eyeOffset=defaultValue(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=defaultValue(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=defaultValue(this.verticalOrigin,e.verticalOrigin),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.fillColor=defaultValue(this.fillColor,e.fillColor),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=defaultValue(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=defaultValue(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=defaultValue(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=defaultValue(this.disableDepthTestDistance,e.disableDepthTestDistance)};var defaultNodeTransformation=new TranslationRotationScale;function NodeTransformationProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale}function PropertyBag(e,t){this._propertyNames=[],this._definitionChanged=new Event,defined(e)&&this.merge(e,t)}function createConstantProperty$1(e){return new ConstantProperty(e)}function propertiesEqual(e,t){var i=e._propertyNames,r=t._propertyNames,n=i.length;if(n!==r.length)return!1;for(var a=0;a<n;++a){var o=i[a];if(-1===r.indexOf(o))return!1;if(!Property.equals(e[o],t[o]))return!1}return!0}function createNodeTransformationProperty(e){return new NodeTransformationProperty(e)}function createNodeTransformationPropertyBag(e){return new PropertyBag(e,createNodeTransformationProperty)}function createArticulationStagePropertyBag(e){return new PropertyBag(e)}function ModelGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._clampAnimations=void 0,this._clampAnimationsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._articulations=void 0,this._articulationsSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function Cesium3DTilesetGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PathGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PlaneGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PointGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function createPolygonHierarchyProperty(e){return Array.isArray(e)&&(e=new PolygonHierarchy(e)),new ConstantProperty(e)}function PolygonGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PolylineGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PolylineVolumeGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function RectangleGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function WallGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}Object.defineProperties(NodeTransformationProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._translation)&&Property.isConstant(this._rotation)&&Property.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:createPropertyDescriptor("translation"),rotation:createPropertyDescriptor("rotation"),scale:createPropertyDescriptor("scale")}),NodeTransformationProperty.prototype.getValue=function(e,t){return defined(t)||(t=new TranslationRotationScale),t.translation=Property.getValueOrClonedDefault(this._translation,e,defaultNodeTransformation.translation,t.translation),t.rotation=Property.getValueOrClonedDefault(this._rotation,e,defaultNodeTransformation.rotation,t.rotation),t.scale=Property.getValueOrClonedDefault(this._scale,e,defaultNodeTransformation.scale,t.scale),t},NodeTransformationProperty.prototype.equals=function(e){return this===e||e instanceof NodeTransformationProperty&&Property.equals(this._translation,e._translation)&&Property.equals(this._rotation,e._rotation)&&Property.equals(this._scale,e._scale)},Object.defineProperties(PropertyBag.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){for(var e=this._propertyNames,t=0,i=e.length;t<i;t++)if(!Property.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),PropertyBag.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},PropertyBag.prototype.addProperty=function(e,t,i){this._propertyNames.push(e),Object.defineProperty(this,e,createPropertyDescriptor(e,!0,defaultValue(i,createConstantProperty$1))),defined(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)},PropertyBag.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);this._propertyNames.splice(t,1),delete this[e],this._definitionChanged.raiseEvent(this)},PropertyBag.prototype.getValue=function(e,t){defined(t)||(t={});for(var i=this._propertyNames,r=0,n=i.length;r<n;r++){var a=i[r];t[a]=Property.getValueOrUndefined(this[a],e,t[a])}return t},PropertyBag.prototype.merge=function(e,t){for(var i=this._propertyNames,r=defined(e._propertyNames)?e._propertyNames:Object.keys(e),n=0,a=r.length;n<a;n++){var o=r[n],s=this[o],l=e[o];void 0===s&&-1===i.indexOf(o)&&this.addProperty(o,void 0,t),void 0!==l&&(void 0!==s?defined(s)&&defined(s.merge)&&s.merge(l):defined(l)&&defined(l.merge)&&defined(l.clone)?this[o]=l.clone():this[o]=l)}},PropertyBag.prototype.equals=function(e){return this===e||e instanceof PropertyBag&&propertiesEqual(this,e)},Object.defineProperties(ModelGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),uri:createPropertyDescriptor("uri"),scale:createPropertyDescriptor("scale"),minimumPixelSize:createPropertyDescriptor("minimumPixelSize"),maximumScale:createPropertyDescriptor("maximumScale"),incrementallyLoadTextures:createPropertyDescriptor("incrementallyLoadTextures"),runAnimations:createPropertyDescriptor("runAnimations"),clampAnimations:createPropertyDescriptor("clampAnimations"),shadows:createPropertyDescriptor("shadows"),heightReference:createPropertyDescriptor("heightReference"),silhouetteColor:createPropertyDescriptor("silhouetteColor"),silhouetteSize:createPropertyDescriptor("silhouetteSize"),color:createPropertyDescriptor("color"),colorBlendMode:createPropertyDescriptor("colorBlendMode"),colorBlendAmount:createPropertyDescriptor("colorBlendAmount"),imageBasedLightingFactor:createPropertyDescriptor("imageBasedLightingFactor"),lightColor:createPropertyDescriptor("lightColor"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),nodeTransformations:createPropertyDescriptor("nodeTransformations",void 0,createNodeTransformationPropertyBag),articulations:createPropertyDescriptor("articulations",void 0,createArticulationStagePropertyBag),clippingPlanes:createPropertyDescriptor("clippingPlanes")}),ModelGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.uri=this.uri,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.heightReference=this._heightReference,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e.distanceDisplayCondition=this.distanceDisplayCondition,e.nodeTransformations=this.nodeTransformations,e.articulations=this.articulations,e.clippingPlanes=this.clippingPlanes,e):new ModelGraphics(this)},ModelGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.uri=defaultValue(this.uri,e.uri),this.scale=defaultValue(this.scale,e.scale),this.minimumPixelSize=defaultValue(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=defaultValue(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=defaultValue(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.runAnimations=defaultValue(this.runAnimations,e.runAnimations),this.clampAnimations=defaultValue(this.clampAnimations,e.clampAnimations),this.shadows=defaultValue(this.shadows,e.shadows),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.silhouetteColor=defaultValue(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=defaultValue(this.silhouetteSize,e.silhouetteSize),this.color=defaultValue(this.color,e.color),this.colorBlendMode=defaultValue(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=defaultValue(this.colorBlendAmount,e.colorBlendAmount),this.imageBasedLightingFactor=defaultValue(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=defaultValue(this.lightColor,e.lightColor),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.clippingPlanes=defaultValue(this.clippingPlanes,e.clippingPlanes);var t,i=e.nodeTransformations;defined(i)&&(defined(t=this.nodeTransformations)?t.merge(i):this.nodeTransformations=new PropertyBag(i,createNodeTransformationProperty)),defined(i=e.articulations)&&(defined(e=this.articulations)?e.merge(i):this.articulations=new PropertyBag(i))},Object.defineProperties(Cesium3DTilesetGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),uri:createPropertyDescriptor("uri"),maximumScreenSpaceError:createPropertyDescriptor("maximumScreenSpaceError")}),Cesium3DTilesetGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new Cesium3DTilesetGraphics(this)},Cesium3DTilesetGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.uri=defaultValue(this.uri,e.uri),this.maximumScreenSpaceError=defaultValue(this.maximumScreenSpaceError,e.maximumScreenSpaceError)},Object.defineProperties(PathGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),leadTime:createPropertyDescriptor("leadTime"),trailTime:createPropertyDescriptor("trailTime"),width:createPropertyDescriptor("width"),resolution:createPropertyDescriptor("resolution"),material:createMaterialPropertyDescriptor("material"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),PathGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new PathGraphics(this)},PathGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.leadTime=defaultValue(this.leadTime,e.leadTime),this.trailTime=defaultValue(this.trailTime,e.trailTime),this.width=defaultValue(this.width,e.width),this.resolution=defaultValue(this.resolution,e.resolution),this.material=defaultValue(this.material,e.material),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(PlaneGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),plane:createPropertyDescriptor("plane"),dimensions:createPropertyDescriptor("dimensions"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),PlaneGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new PlaneGraphics(this)},PlaneGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.plane=defaultValue(this.plane,e.plane),this.dimensions=defaultValue(this.dimensions,e.dimensions),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(PointGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),pixelSize:createPropertyDescriptor("pixelSize"),heightReference:createPropertyDescriptor("heightReference"),color:createPropertyDescriptor("color"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),scaleByDistance:createPropertyDescriptor("scaleByDistance"),translucencyByDistance:createPropertyDescriptor("translucencyByDistance"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),disableDepthTestDistance:createPropertyDescriptor("disableDepthTestDistance")}),PointGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new PointGraphics(this)},PointGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.pixelSize=defaultValue(this.pixelSize,e.pixelSize),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.color=defaultValue(this.color,e.color),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.scaleByDistance=defaultValue(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=defaultValue(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=defaultValue(this.disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(PolygonGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),hierarchy:createPropertyDescriptor("hierarchy",void 0,createPolygonHierarchyProperty),height:createPropertyDescriptor("height"),heightReference:createPropertyDescriptor("heightReference"),extrudedHeight:createPropertyDescriptor("extrudedHeight"),extrudedHeightReference:createPropertyDescriptor("extrudedHeightReference"),stRotation:createPropertyDescriptor("stRotation"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),perPositionHeight:createPropertyDescriptor("perPositionHeight"),closeTop:createPropertyDescriptor("closeTop"),closeBottom:createPropertyDescriptor("closeBottom"),arcType:createPropertyDescriptor("arcType"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),PolygonGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new PolygonGraphics(this)},PolygonGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.hierarchy=defaultValue(this.hierarchy,e.hierarchy),this.height=defaultValue(this.height,e.height),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.extrudedHeight=defaultValue(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=defaultValue(this.extrudedHeightReference,e.extrudedHeightReference),this.stRotation=defaultValue(this.stRotation,e.stRotation),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.perPositionHeight=defaultValue(this.perPositionHeight,e.perPositionHeight),this.closeTop=defaultValue(this.closeTop,e.closeTop),this.closeBottom=defaultValue(this.closeBottom,e.closeBottom),this.arcType=defaultValue(this.arcType,e.arcType),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(PolylineGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),positions:createPropertyDescriptor("positions"),width:createPropertyDescriptor("width"),granularity:createPropertyDescriptor("granularity"),material:createMaterialPropertyDescriptor("material"),depthFailMaterial:createMaterialPropertyDescriptor("depthFailMaterial"),arcType:createPropertyDescriptor("arcType"),clampToGround:createPropertyDescriptor("clampToGround"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),PolylineGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new PolylineGraphics(this)},PolylineGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.positions=defaultValue(this.positions,e.positions),this.width=defaultValue(this.width,e.width),this.granularity=defaultValue(this.granularity,e.granularity),this.material=defaultValue(this.material,e.material),this.depthFailMaterial=defaultValue(this.depthFailMaterial,e.depthFailMaterial),this.arcType=defaultValue(this.arcType,e.arcType),this.clampToGround=defaultValue(this.clampToGround,e.clampToGround),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(PolylineVolumeGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),positions:createPropertyDescriptor("positions"),shape:createPropertyDescriptor("shape"),cornerType:createPropertyDescriptor("cornerType"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),PolylineVolumeGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.positions=this.positions,e.shape=this.shape,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new PolylineVolumeGraphics(this)},PolylineVolumeGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.positions=defaultValue(this.positions,e.positions),this.shape=defaultValue(this.shape,e.shape),this.cornerType=defaultValue(this.cornerType,e.cornerType),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(RectangleGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),coordinates:createPropertyDescriptor("coordinates"),height:createPropertyDescriptor("height"),heightReference:createPropertyDescriptor("heightReference"),extrudedHeight:createPropertyDescriptor("extrudedHeight"),extrudedHeightReference:createPropertyDescriptor("extrudedHeightReference"),rotation:createPropertyDescriptor("rotation"),stRotation:createPropertyDescriptor("stRotation"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),RectangleGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new RectangleGraphics(this)},RectangleGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.coordinates=defaultValue(this.coordinates,e.coordinates),this.height=defaultValue(this.height,e.height),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.extrudedHeight=defaultValue(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=defaultValue(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=defaultValue(this.rotation,e.rotation),this.stRotation=defaultValue(this.stRotation,e.stRotation),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(WallGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),positions:createPropertyDescriptor("positions"),minimumHeights:createPropertyDescriptor("minimumHeights"),maximumHeights:createPropertyDescriptor("maximumHeights"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),WallGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new WallGraphics(this)},WallGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.positions=defaultValue(this.positions,e.positions),this.minimumHeights=defaultValue(this.minimumHeights,e.minimumHeights),this.maximumHeights=defaultValue(this.maximumHeights,e.maximumHeights),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)};var cartoScratch$1=new Cartographic;function createConstantPositionProperty(e){return new ConstantPositionProperty(e)}function createPositionPropertyDescriptor(e){return createPropertyDescriptor(e,void 0,createConstantPositionProperty)}function createPropertyTypeDescriptor(e,t){return createPropertyDescriptor(e,void 0,(function(e){return e instanceof t?e:new t(e)}))}function Entity(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).id;defined(t)||(t=createGuid()),this._availability=void 0,this._id=t,this._definitionChanged=new Event,this._name=e.name,this._show=defaultValue(e.show,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function updateShow(e,t,i){for(var r=t.length,n=0;n<r;n++){var a=t[n],o=a._show;(!i&&o)!==(i&&o)&&updateShow(a,a._children,i)}e._definitionChanged.raiseEvent(e,"isShowing",i,!i)}Object.defineProperties(Entity.prototype,{availability:createRawPropertyDescriptor("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:createRawPropertyDescriptor("name"),show:{get:function(){return this._show},set:function(e){var t;e!==this._show&&(t=this.isShowing,this._show=e,t!==(t=this.isShowing)&&updateShow(this,this._children,t),this._definitionChanged.raiseEvent(this,"show",e,!e))}},isShowing:{get:function(){return this._show&&(!defined(this.entityCollection)||this.entityCollection.show)&&(!defined(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){var t,i,r=this._parent;r!==e&&(i=this.isShowing,defined(r)&&(t=r._children.indexOf(this),r._children.splice(t,1)),defined(this._parent=e)&&e._children.push(this),i!==(i=this.isShowing)&&updateShow(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,r))}},propertyNames:{get:function(){return this._propertyNames}},billboard:createPropertyTypeDescriptor("billboard",BillboardGraphics),box:createPropertyTypeDescriptor("box",BoxGraphics),corridor:createPropertyTypeDescriptor("corridor",CorridorGraphics),cylinder:createPropertyTypeDescriptor("cylinder",CylinderGraphics),description:createPropertyDescriptor("description"),ellipse:createPropertyTypeDescriptor("ellipse",EllipseGraphics),ellipsoid:createPropertyTypeDescriptor("ellipsoid",EllipsoidGraphics),label:createPropertyTypeDescriptor("label",LabelGraphics),model:createPropertyTypeDescriptor("model",ModelGraphics),tileset:createPropertyTypeDescriptor("tileset",Cesium3DTilesetGraphics),orientation:createPropertyDescriptor("orientation"),path:createPropertyTypeDescriptor("path",PathGraphics),plane:createPropertyTypeDescriptor("plane",PlaneGraphics),point:createPropertyTypeDescriptor("point",PointGraphics),polygon:createPropertyTypeDescriptor("polygon",PolygonGraphics),polyline:createPropertyTypeDescriptor("polyline",PolylineGraphics),polylineVolume:createPropertyTypeDescriptor("polylineVolume",PolylineVolumeGraphics),properties:createPropertyTypeDescriptor("properties",PropertyBag),position:createPositionPropertyDescriptor("position"),rectangle:createPropertyTypeDescriptor("rectangle",RectangleGraphics),viewFrom:createPropertyDescriptor("viewFrom"),wall:createPropertyTypeDescriptor("wall",WallGraphics)}),Entity.prototype.isAvailable=function(e){var t=this._availability;return!defined(t)||t.contains(e)},Entity.prototype.addProperty=function(e){this._propertyNames.push(e),Object.defineProperty(this,e,createRawPropertyDescriptor(e,!0))},Entity.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);this._propertyNames.splice(t,1),delete this[e]},Entity.prototype.merge=function(e){this.name=defaultValue(this.name,e.name),this.availability=defaultValue(this.availability,e.availability);for(var t=this._propertyNames,i=defined(e._propertyNames)?e._propertyNames:Object.keys(e),r=i.length,n=0;n<r;n++){var a,o,s=i[n];"parent"!==s&&"name"!==s&&"availability"!==s&&(a=this[s],o=e[s],defined(a)||-1!==t.indexOf(s)||this.addProperty(s),defined(o)&&(defined(a)?defined(a.merge)&&a.merge(o):defined(o.merge)&&defined(o.clone)?this[s]=o.clone():this[s]=o))}};var matrix3Scratch$1=new Matrix3,positionScratch$5=new Cartesian3,orientationScratch=new Quaternion;Entity.prototype.computeModelMatrix=function(e,t){var i=Property.getValueOrUndefined(this._position,e,positionScratch$5);if(defined(i))return defined(e=Property.getValueOrUndefined(this._orientation,e,orientationScratch))?Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(e,matrix3Scratch$1),i,t):Transforms.eastNorthUpToFixedFrame(i,void 0,t)},Entity.prototype.computeModelMatrixForHeightReference=function(e,t,i,r,n){var a=Property.getValueOrDefault(t,e,HeightReference$1.NONE),o=Property.getValueOrUndefined(this._position,e,positionScratch$5);return a===HeightReference$1.NONE||!defined(o)||Cartesian3.equalsEpsilon(o,Cartesian3.ZERO,CesiumMath.EPSILON8)?this.computeModelMatrix(e,n):(t=r.cartesianToCartographic(o,cartoScratch$1),a===HeightReference$1.CLAMP_TO_GROUND?t.height=i:t.height+=i,o=r.cartographicToCartesian(t,o),defined(e=Property.getValueOrUndefined(this._orientation,e,orientationScratch))?Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(e,matrix3Scratch$1),o,n):Transforms.eastNorthUpToFixedFrame(o,void 0,n))},Entity.supportsMaterialsforEntitiesOnTerrain=function(e){return GroundPrimitive.supportsMaterials(e)},Entity.supportsPolylinesOnTerrain=function(e){return GroundPolylinePrimitive.isSupported(e)};var defaultMaterial=new ColorMaterialProperty(Color.WHITE),defaultShow=new ConstantProperty(!0),defaultFill=new ConstantProperty(!0),defaultOutline=new ConstantProperty(!1),defaultOutlineColor=new ConstantProperty(Color.BLACK),defaultShadows=new ConstantProperty(ShadowMode$1.DISABLED),defaultDistanceDisplayCondition=new ConstantProperty(new DistanceDisplayCondition),defaultClassificationType=new ConstantProperty(ClassificationType$1.BOTH);function GeometryUpdater(e){var t=e.entity,i=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new Event,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=i,this._id=i+"-"+t.id,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=Entity.supportsMaterialsforEntitiesOnTerrain(e.scene)}function CallbackProperty(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new Event,this.setCallback(e,t)}Object.defineProperties(GeometryUpdater.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!defined(this._entity.availability)&&Property.isConstant(this._showProperty)&&Property.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!defined(this._entity.availability)&&Property.isConstant(this._showProperty)&&Property.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),GeometryUpdater.prototype.isOutlineVisible=function(e){var t=this._entity;return defaultValue(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e),!1)},GeometryUpdater.prototype.isFilled=function(e){var t=this._entity;return defaultValue(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e),!1)},GeometryUpdater.prototype.createFillGeometryInstance=DeveloperError.throwInstantiationError,GeometryUpdater.prototype.createOutlineGeometryInstance=DeveloperError.throwInstantiationError,GeometryUpdater.prototype.isDestroyed=function(){return!1},GeometryUpdater.prototype.destroy=function(){destroyObject(this)},GeometryUpdater.prototype._isHidden=function(e,t){return defined(t=t.show)&&t.isConstant&&!t.getValue(Iso8601.MINIMUM_VALUE)},GeometryUpdater.prototype._isOnTerrain=function(e,t){return!1},GeometryUpdater.prototype._getIsClosed=function(e){return!0},GeometryUpdater.prototype._isDynamic=DeveloperError.throwInstantiationError,GeometryUpdater.prototype._setStaticOptions=DeveloperError.throwInstantiationError,GeometryUpdater.prototype._onEntityPropertyChanged=function(e,t,i,r){var n,a,o,s;-1!==this._observedPropertyNames.indexOf(t)&&(defined(s=this._entity[this._geometryPropertyName])?(o=!defined(n=s.fill)||!n.isConstant||n.getValue(Iso8601.MINIMUM_VALUE),(t=defined(a=s.outline))&&a.isConstant&&(t=a.getValue(Iso8601.MINIMUM_VALUE)),o||t?(a=s.show,this._isHidden(e,s)?(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)):(this._materialProperty=defaultValue(s.material,defaultMaterial),this._fillProperty=defaultValue(n,defaultFill),this._showProperty=defaultValue(a,defaultShow),this._showOutlineProperty=defaultValue(s.outline,defaultOutline),this._outlineColorProperty=t?defaultValue(s.outlineColor,defaultOutlineColor):void 0,this._shadowsProperty=defaultValue(s.shadows,defaultShadows),this._distanceDisplayConditionProperty=defaultValue(s.distanceDisplayCondition,defaultDistanceDisplayCondition),this._classificationTypeProperty=defaultValue(s.classificationType,defaultClassificationType),this._fillEnabled=o,o=this._isOnTerrain(e,s)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof ColorMaterialProperty),t&&o&&(oneTimeWarning(oneTimeWarning.geometryOutlines),t=!1),this._onTerrain=o,this._outlineEnabled=t,this._isDynamic(e,s)?this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this)):(this._setStaticOptions(e,s),this._isClosed=this._getIsClosed(this._options),s=s.outlineWidth,this._outlineWidth=defined(s)?s.getValue(Iso8601.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)))):(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this))):(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)))},GeometryUpdater.prototype.createDynamicUpdater=function(e,t){return new this.constructor.DynamicGeometryUpdater(this,e,t)},Object.defineProperties(CallbackProperty.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),CallbackProperty.prototype.getValue=function(e,t){return this._callback(e,t)},CallbackProperty.prototype.setCallback=function(e,t){var i=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,i&&this._definitionChanged.raiseEvent(this)},CallbackProperty.prototype.equals=function(e){return this===e||e instanceof CallbackProperty&&this._callback===e._callback&&this._isConstant===e._isConstant};var scratchPosition$4=new Cartesian3,scratchCarto=new Cartographic;function TerrainOffsetProperty(e,t,i,r){this._scene=e,this._heightReference=i,this._extrudedHeightReference=r,this._positionProperty=t,this._position=new Cartesian3,this._cartographicPosition=new Cartographic,this._normal=new Cartesian3,this._definitionChanged=new Event,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;var n=this;if(defined(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener((function(){n._updateClamping()})),this._removeModeListener=e.morphComplete.addEventListener((function(){n._updateClamping()}))),t.isConstant){if(!defined(t=t.getValue(Iso8601.MINIMUM_VALUE,scratchPosition$4))||Cartesian3.equals(t,Cartesian3.ZERO)||!defined(e.globe))return;this._position=Cartesian3.clone(t,this._position),this._updateClamping(),this._normal=e.globe.ellipsoid.geodeticSurfaceNormal(t,this._normal)}}function heightReferenceOnEntityPropertyChanged(e,t,i,r){GeometryUpdater.prototype._onEntityPropertyChanged.call(this,e,t,i,r),-1===this._observedPropertyNames.indexOf(t)||defined(r=this._entity[this._geometryPropertyName])&&(defined(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),defined(t=r.heightReference)&&(r=new CallbackProperty(this._computeCenter.bind(this),!this._dynamic),this._terrainOffsetProperty=new TerrainOffsetProperty(this._scene,r,t)))}Object.defineProperties(TerrainOffsetProperty.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),TerrainOffsetProperty.prototype._updateClamping=function(){defined(this._removeCallbackFunc)&&this._removeCallbackFunc();var e,t,i,r=this._scene,n=r.globe,a=this._position;defined(n)&&!Cartesian3.equals(a,Cartesian3.ZERO)?(e=n.ellipsoid,t=n._surface,i=this,a=e.cartesianToCartographic(a,this._cartographicPosition),defined(n=n.getHeight(a))?this._terrainHeight=n:this._terrainHeight=0,this._removeCallbackFunc=t.updateHeight(a,(function(t){var n;r.mode===SceneMode$1.SCENE3D?(n=e.cartesianToCartographic(t,scratchCarto),i._terrainHeight=n.height):i._terrainHeight=t.x,i.definitionChanged.raiseEvent()}))):this._terrainHeight=0},TerrainOffsetProperty.prototype.getValue=function(e,t){var i=Property.getValueOrDefault(this._heightReference,e,HeightReference$1.NONE),r=Property.getValueOrDefault(this._extrudedHeightReference,e,HeightReference$1.NONE);return i===HeightReference$1.NONE&&r!==HeightReference$1.RELATIVE_TO_GROUND?(this._position=Cartesian3.clone(Cartesian3.ZERO,this._position),Cartesian3.clone(Cartesian3.ZERO,t)):this._positionProperty.isConstant?Cartesian3.multiplyByScalar(this._normal,this._terrainHeight,t):(r=this._scene,defined(e=this._positionProperty.getValue(e,scratchPosition$4))&&!Cartesian3.equals(e,Cartesian3.ZERO)&&defined(r.globe)?Cartesian3.equalsEpsilon(this._position,e,CesiumMath.EPSILON10)?Cartesian3.multiplyByScalar(this._normal,this._terrainHeight,t):(this._position=Cartesian3.clone(e,this._position),this._updateClamping(),e=r.globe.ellipsoid.geodeticSurfaceNormal(e,this._normal),Cartesian3.multiplyByScalar(e,this._terrainHeight,t)):Cartesian3.clone(Cartesian3.ZERO,t))},TerrainOffsetProperty.prototype.isDestroyed=function(){return!1},TerrainOffsetProperty.prototype.destroy=function(){return defined(this._removeEventListener)&&this._removeEventListener(),defined(this._removeModeListener)&&this._removeModeListener(),defined(this._removeCallbackFunc)&&this._removeCallbackFunc(),destroyObject(this)};var defaultOffset=Cartesian3.ZERO,offsetScratch$3=new Cartesian3,positionScratch$6=new Cartesian3,scratchColor=new Color;function BoxGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function BoxGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new BoxGeometryOptions(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function DynamicBoxGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}function ClearCommand(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}defined(Object.create)&&(BoxGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),BoxGeometryUpdater.prototype.constructor=BoxGeometryUpdater),Object.defineProperties(BoxGeometryUpdater.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),BoxGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a={show:n,distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),color:void 0,offset:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor)),defined(t)||(t=Color.WHITE),a.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(a.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset,offsetScratch$3))),new GeometryInstance({id:i,geometry:BoxGeometry.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:a})},BoxGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor),n=this._distanceDisplayConditionProperty.getValue(e);n={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n),offset:void 0};return defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset,offsetScratch$3))),new GeometryInstance({id:t,geometry:BoxOutlineGeometry.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:n})},BoxGeometryUpdater.prototype._computeCenter=function(e,t){return Property.getValueOrUndefined(this._entity.position,e,t)},BoxGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.dimensions)||!defined(e.position)||GeometryUpdater.prototype._isHidden.call(this,e,t)},BoxGeometryUpdater.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&Property.isConstant(e.orientation)&&t.dimensions.isConstant&&Property.isConstant(t.outlineWidth))},BoxGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),r=this._options;r.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,r.dimensions=t.dimensions.getValue(Iso8601.MINIMUM_VALUE,r.dimensions),r.offsetAttribute=i!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},BoxGeometryUpdater.prototype._onEntityPropertyChanged=heightReferenceOnEntityPropertyChanged,BoxGeometryUpdater.DynamicGeometryUpdater=DynamicBoxGeometryUpdater,defined(Object.create)&&(DynamicBoxGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicBoxGeometryUpdater.prototype.constructor=DynamicBoxGeometryUpdater),DynamicBoxGeometryUpdater.prototype._isHidden=function(e,t,i){var r=Property.getValueOrUndefined(e.position,i,positionScratch$6),n=this._options.dimensions;return!defined(r)||!defined(n)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicBoxGeometryUpdater.prototype._setOptions=function(e,t,i){var r=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),n=this._options;n.dimensions=Property.getValueOrUndefined(t.dimensions,i,n.dimensions),n.offsetAttribute=r!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},ClearCommand.ALL=Object.freeze(new ClearCommand({color:new Color(0,0,0,0),depth:1,stencil:0})),ClearCommand.prototype.execute=function(e,t){e.clear(this,t)};var Axis={X:0,Y:1,Z:2};Axis.Y_UP_TO_Z_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationX(CesiumMath.PI_OVER_TWO)),Axis.Z_UP_TO_Y_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationX(-CesiumMath.PI_OVER_TWO)),Axis.X_UP_TO_Z_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationY(-CesiumMath.PI_OVER_TWO)),Axis.Z_UP_TO_X_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationY(CesiumMath.PI_OVER_TWO)),Axis.X_UP_TO_Y_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationZ(CesiumMath.PI_OVER_TWO)),Axis.Y_UP_TO_X_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationZ(-CesiumMath.PI_OVER_TWO)),Axis.fromName=function(e){return Axis[e]};var Axis$1=Object.freeze(Axis),AttributeType={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"},AttributeType$1=Object.freeze(AttributeType),Cesium3DTileColorBlendMode={HIGHLIGHT:0,REPLACE:1,MIX:2},Cesium3DTileColorBlendMode$1=Object.freeze(Cesium3DTileColorBlendMode),ComponentsPerAttribute={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ClassPerType={SCALAR:void 0,VEC2:Cartesian2,VEC3:Cartesian3,VEC4:Cartesian4,MAT2:Matrix2,MAT3:Matrix3,MAT4:Matrix4};function getBinaryAccessor(e){var t=e.componentType,i="string"==typeof t?ComponentDatatype$1.fromName(t):t,r=ComponentsPerAttribute[e.type];e=ClassPerType[e.type];return{componentsPerAttribute:r,classType:e,createArrayBufferView:function(e,t,n){return ComponentDatatype$1.createArrayBufferView(i,e,t,r*n)}}}var DEFAULT_COLOR_VALUE=Color.WHITE,DEFAULT_SHOW_VALUE=!0;function Cesium3DTileBatchTable(e,t,i,r,n){this.featuresLength=t,this._translucentFeaturesLength=0,defined(i)&&(s=i.extensions),this._extensions=defaultValue(s,{});var a,o,s=initializeProperties(i);this._properties=s,this._batchTableHierarchy=initializeHierarchy(this,i,r),this._batchTableBinaryProperties=getBinaryProperties(t,s,r),this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[],this._content=e,this._colorChangedCallback=n,0<t&&(n=.5*(e=1/(r=Math.min(t,ContextLimits.maximumTextureSize))),o=.5*(t=1/(a=Math.ceil(t/ContextLimits.maximumTextureSize))),a=new Cartesian2(r,a),o=new Cartesian4(e,n,t,o)),this._textureDimensions=a,this._textureStep=o}function initializeProperties(e){var t,i={};if(!defined(e))return i;for(t in e)e.hasOwnProperty(t)&&"HIERARCHY"!==t&&"extensions"!==t&&"extras"!==t&&(i[t]=clone(e[t],!0));return i}function initializeHierarchy(e,t,i){if(defined(t)){var r=e._extensions["3DTILES_batch_table_hierarchy"];if(defined(t=t.HIERARCHY)&&(Cesium3DTileBatchTable._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),r=e._extensions["3DTILES_batch_table_hierarchy"]=t),defined(r))return initializeHierarchyValues(r,i)}}function initializeHierarchyValues(e,t){var i,r,n=e.instancesLength,a=e.classes,o=e.classIds,s=e.parentCounts,l=(e=e.parentIds,n);if(defined(o.byteOffset)&&(o.componentType=defaultValue(o.componentType,ComponentDatatype$1.UNSIGNED_SHORT),o.type=AttributeType$1.SCALAR,o=getBinaryAccessor(o).createArrayBufferView(t.buffer,t.byteOffset+o.byteOffset,n)),defined(s))for(defined(s.byteOffset)&&(s.componentType=defaultValue(s.componentType,ComponentDatatype$1.UNSIGNED_SHORT),s.type=AttributeType$1.SCALAR,s=getBinaryAccessor(s).createArrayBufferView(t.buffer,t.byteOffset+s.byteOffset,n)),r=new Uint16Array(n),u=l=0;u<n;++u)r[u]=l,l+=s[u];defined(e)&&defined(e.byteOffset)&&(e.componentType=defaultValue(e.componentType,ComponentDatatype$1.UNSIGNED_SHORT),e.type=AttributeType$1.SCALAR,e=getBinaryAccessor(e).createArrayBufferView(t.buffer,t.byteOffset+e.byteOffset,l));for(var c=a.length,u=0;u<c;++u){var d=a[u].length,h=a[u].instances;d=getBinaryProperties(d,h,t);a[u].instances=combine(d,h)}var p=arrayFill(new Array(c),0),f=new Uint16Array(n);for(u=0;u<n;++u)i=o[u],f[u]=p[i],++p[i];return{classes:a,classIds:o,classIndexes:f,parentCounts:s,parentIndexes:r,parentIds:e}}function getBinaryProperties(e,t,i){var r,n;for(n in t)if(t.hasOwnProperty(n)){var a=t[n],o=a.byteOffset;if(defined(o)){var s=a.componentType,l=a.type;if(!defined(s))throw new RuntimeError("componentType is required.");if(!defined(l))throw new RuntimeError("type is required.");if(!defined(i))throw new RuntimeError("Property "+n+" requires a batch table binary.");l=(s=getBinaryAccessor(a)).componentsPerAttribute,a=s.classType,o=s.createArrayBufferView(i.buffer,i.byteOffset+o,e),defined(r)||(r={}),r[n]={typedArray:o,componentCount:l,type:a}}}return r}function getByteLength(e){return(e=e._textureDimensions).x*e.y*4}function getBatchValues(e){var t;return defined(e._batchValues)||(t=getByteLength(e),arrayFill(t=new Uint8Array(t),255),e._batchValues=t),e._batchValues}function getShowAlphaProperties(e){var t;return defined(e._showAlphaProperties)||(t=2*e.featuresLength,arrayFill(t=new Uint8Array(t),255),e._showAlphaProperties=t),e._showAlphaProperties}Cesium3DTileBatchTable._deprecationWarning=deprecationWarning,Object.defineProperties(Cesium3DTileBatchTable.prototype,{memorySizeInBytes:{get:function(){var e=0;return defined(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),defined(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}}}),Cesium3DTileBatchTable.getBinaryProperties=function(e,t,i){return getBinaryProperties(e,t,i)},Cesium3DTileBatchTable.prototype.setShow=function(e,t){var i,r,n;t&&!defined(this._showAlphaProperties)||(n=t?255:0,(i=getShowAlphaProperties(this))[r=2*e]!==n&&(i[r]=n,getBatchValues(this)[4*e+3]=t?i[1+r]:0,this._batchValuesDirty=!0))},Cesium3DTileBatchTable.prototype.setAllShow=function(e){for(var t=this.featuresLength,i=0;i<t;++i)this.setShow(i,e)},Cesium3DTileBatchTable.prototype.getShow=function(e){return!defined(this._showAlphaProperties)||(e*=2,255===this._showAlphaProperties[e])};var scratchColorBytes=new Array(4);Cesium3DTileBatchTable.prototype.setColor=function(e,t){var i,r,n,a,o,s,l;Color.equals(t,DEFAULT_COLOR_VALUE)&&!defined(this._batchValues)||(l=(s=t.toBytes(scratchColorBytes))[3],i=getBatchValues(this),r=4*e,n=getShowAlphaProperties(this),a=2*e,i[r]===s[0]&&i[1+r]===s[1]&&i[2+r]===s[2]&&n[1+a]===l||(i[r]=s[0],i[1+r]=s[1],i[2+r]=s[2],o=255!==n[1+a],s=0!==n[a],i[3+r]=s?l:0,(l=255!==(n[1+a]=l))&&!o?++this._translucentFeaturesLength:!l&&o&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,defined(this._colorChangedCallback)&&this._colorChangedCallback(e,t)))},Cesium3DTileBatchTable.prototype.setAllColor=function(e){for(var t=this.featuresLength,i=0;i<t;++i)this.setColor(i,e)},Cesium3DTileBatchTable.prototype.getColor=function(e,t){if(!defined(this._batchValues))return Color.clone(DEFAULT_COLOR_VALUE,t);var i=this._batchValues,r=4*e,n=this._showAlphaProperties;e*=2;return Color.fromBytes(i[r],i[1+r],i[2+r],n[1+e],t)},Cesium3DTileBatchTable.prototype.getPickColor=function(e){return this._pickIds[e]};var scratchColor$1=new Color;function getBinaryProperty(e,t){var i=e.typedArray,r=e.componentCount;return 1===r?i[t]:e.type.unpack(i,t*r)}function setBinaryProperty(e,t,i){var r=e.typedArray,n=e.componentCount;1===n?r[t]=i:e.type.pack(i,r,t*n)}Cesium3DTileBatchTable.prototype.applyStyle=function(e){if(!defined(e))return this.setAllColor(DEFAULT_COLOR_VALUE),void this.setAllShow(DEFAULT_SHOW_VALUE);for(var t=this._content,i=this.featuresLength,r=0;r<i;++r){var n=t.getFeature(r),a=defined(e.color)?e.color.evaluateColor(n,scratchColor$1):DEFAULT_COLOR_VALUE;n=defined(e.show)?e.show.evaluate(n):DEFAULT_SHOW_VALUE;this.setColor(r,a),this.setShow(r,n)}};var scratchVisited=[],scratchStack=[],marker=0;function traverseHierarchyMultipleParents(e,t,i){var r=e.classIds,n=e.parentCounts,a=e.parentIds,o=e.parentIndexes,s=(r=r.length,scratchVisited);s.length=Math.max(s.length,r);var l=++marker,c=scratchStack;for(c.length=0,c.push(t);0<c.length;)if(s[t=c.pop()]!==l){s[t]=l;var u=i(e,t);if(defined(u))return u;for(var d=n[t],h=o[t],p=0;p<d;++p){var f=a[h+p];f!==t&&c.push(f)}}}function traverseHierarchySingleParent(e,t,i){for(var r=!0;r;){var n=i(e,t);if(defined(n))return n;r=(n=e.parentIds[t])!==t,t=n}}function traverseHierarchy(e,t,i){var r=e.parentCounts;return defined(e.parentIds)?(defined(r)?traverseHierarchyMultipleParents:traverseHierarchySingleParent)(e,t,i):i(e,t)}function hasPropertyInHierarchy(e,t,i){return t=traverseHierarchy(e._batchTableHierarchy,t,(function(e,t){if(t=e.classIds[t],defined(e.classes[t].instances[i]))return!0})),defined(t)}function getPropertyNamesInHierarchy(e,t,i){traverseHierarchy(e._batchTableHierarchy,t,(function(e,t){t=e.classIds[t];var r,n=e.classes[t].instances;for(r in n)n.hasOwnProperty(r)&&-1===i.indexOf(r)&&i.push(r)}))}function getHierarchyProperty(e,t,i){return traverseHierarchy(e._batchTableHierarchy,t,(function(e,t){var r=e.classIds[t];r=e.classes[r],t=e.classIndexes[t];if(defined(r=r.instances[i]))return defined(r.typedArray)?getBinaryProperty(r,t):clone(r[t],!0)}))}function setHierarchyProperty(e,t,i,r){return t=traverseHierarchy(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t];n=e.classes[n],t=e.classIndexes[t];if(defined(n=n.instances[i]))return defined(n.typedArray)?setBinaryProperty(n,t,r):n[t]=clone(r,!0),!0})),defined(t)}function getGlslComputeSt$1(e){return 1===e._textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n    float stepX = tile_textureStep.x; \n    float centerX = tile_textureStep.y; \n    return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n    float stepX = tile_textureStep.x; \n    float centerX = tile_textureStep.y; \n    float stepY = tile_textureStep.z; \n    float centerY = tile_textureStep.w; \n    float xId = mod(batchId, tile_textureDimensions.x); \n    float yId = floor(batchId / tile_textureDimensions.x); \n    return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function getDefaultShader(e,t){return e=ShaderSource.replaceMain(e,"tile_main"),t?e+"uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n    tile_main(); \n    tile_featureColor = czm_gammaCorrect(tile_featureColor); \n    gl_FragColor.a *= tile_featureColor.a; \n    float highlight = ceil(tile_colorBlend); \n    gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n":e+"void tile_color(vec4 tile_featureColor) \n{ \n    tile_main(); \n} \n"}function replaceDiffuseTextureCalls(e,t){for(var i,r,n="texture2D("+t,a=e.indexOf(n,0);-1<a;){for(var o=0,s=a;s<e.length;++s){var l=e.charAt(s);if("("===l)++o;else if(")"===l&&0==--o){r=s+1;break}}var c="tile_diffuse_final("+e.slice(a,r)+", tile_diffuse)";e=e.slice(0,a)+c+e.slice(r),i=a+c.length,a=e.indexOf(n,i)}return e}function modifyDiffuse(e,t,i){if(!defined(t))return getDefaultShader(e,i);var r=new RegExp("(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+"+t+";"),n=e.match(r);if(!defined(n))return getDefaultShader(e,i);var a,o=n[0],s=n[2];return e=(e=ShaderSource.replaceMain(e,"tile_main")).replace(o,""),"vec3"===s||"vec4"===s?(a="vec3"===s?"vec4("+t+", 1.0)":t,n="vec3"===s?"tile_diffuse.xyz":"tile_diffuse",r=new RegExp(t,"g"),e=e.replace(r,n),a="    vec4 source = "+a+"; \n    tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n    tile_main(); \n"):"sampler2D"===s&&(e=replaceDiffuseTextureCalls(e,t),a="    tile_diffuse = tile_featureColor; \n    tile_main(); \n"),e="uniform float tile_colorBlend; \nvec4 tile_diffuse = vec4(1.0); \nbool isWhite(vec3 color) \n{ \n    return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); \n} \nvec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) \n{ \n    vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); \n    vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; \n    return vec4(diffuse.rgb, sourceDiffuse.a); \n} \n"+o+"\n"+e+"\nvoid tile_color(vec4 tile_featureColor) \n{ \n"+a,i&&(e+="    tile_featureColor = czm_gammaCorrect(tile_featureColor); \n    gl_FragColor.a *= tile_featureColor.a; \n    float highlight = ceil(tile_colorBlend); \n    gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n"),e+"} \n"}function getColorBlend(e){e=(t=e._content.tileset).colorBlendMode;var t=t.colorBlendAmount;return e===Cesium3DTileColorBlendMode$1.HIGHLIGHT?0:e===Cesium3DTileColorBlendMode$1.REPLACE?1:e===Cesium3DTileColorBlendMode$1.MIX?CesiumMath.clamp(t,CesiumMath.EPSILON4,1):void 0}Cesium3DTileBatchTable.prototype.isClass=function(e,t){var i=this._batchTableHierarchy;return!!defined(i)&&defined(traverseHierarchy(i,e,(function(e,i){if(i=e.classIds[i],e.classes[i].name===t)return!0})))},Cesium3DTileBatchTable.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t},Cesium3DTileBatchTable.prototype.getExactClassName=function(e){var t=this._batchTableHierarchy;if(defined(t))return e=t.classIds[e],t.classes[e].name},Cesium3DTileBatchTable.prototype.hasProperty=function(e,t){return defined(this._properties[t])||defined(this._batchTableHierarchy)&&hasPropertyInHierarchy(this,e,t)},Cesium3DTileBatchTable.prototype.getPropertyNames=function(e,t){(t=defined(t)?t:[]).length=0;var i=Object.keys(this._properties);return t.push.apply(t,i),defined(this._batchTableHierarchy)&&getPropertyNamesInHierarchy(this,e,t),t},Cesium3DTileBatchTable.prototype.getProperty=function(e,t){if(defined(this._batchTableBinaryProperties)){var i=this._batchTableBinaryProperties[t];if(defined(i))return getBinaryProperty(i,e)}return defined(i=this._properties[t])?clone(i[e],!0):defined(this._batchTableHierarchy)&&defined(t=getHierarchyProperty(this,e,t))?t:void 0},Cesium3DTileBatchTable.prototype.setProperty=function(e,t,i){var r=this.featuresLength;if(defined(this._batchTableBinaryProperties)){var n=this._batchTableBinaryProperties[t];if(defined(n))return void setBinaryProperty(n,e,i)}defined(this._batchTableHierarchy)&&setHierarchyProperty(this,e,t,i)||(defined(n=this._properties[t])||(this._properties[t]=new Array(r),n=this._properties[t]),n[e]=clone(i,!0))},Cesium3DTileBatchTable.prototype.getVertexShaderCallback=function(e,t,i){if(0!==this.featuresLength){var r=this;return function(n){var a;n=modifyDiffuse(n,i,!1);return 0<ContextLimits.maximumVertexTextureImageUnits?(a="",e&&(a+="uniform bool tile_translucentCommand; \n"),a+="uniform sampler2D tile_batchTexture; \nvarying vec4 tile_featureColor; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n    vec2 st = computeSt("+t+"); \n    vec4 featureProperties = texture2D(tile_batchTexture, st); \n    tile_color(featureProperties); \n    float show = ceil(featureProperties.a); \n    gl_Position *= show; \n",e&&(a+="    bool isStyleTranslucent = (featureProperties.a != 1.0); \n    if (czm_pass == czm_passTranslucent) \n    { \n        if (!isStyleTranslucent && !tile_translucentCommand) \n        { \n            gl_Position *= 0.0; \n        } \n    } \n    else \n    { \n        if (isStyleTranslucent) \n        { \n            gl_Position *= 0.0; \n        } \n    } \n"),a+="    tile_featureColor = featureProperties; \n    tile_featureSt = st; \n}"):a="varying vec2 tile_featureSt; \nvoid main() \n{ \n    tile_color(vec4(1.0)); \n    tile_featureSt = computeSt("+t+"); \n}",n+"\n"+getGlslComputeSt$1(r)+a}}},Cesium3DTileBatchTable.prototype.getFragmentShaderCallback=function(e,t){if(0!==this.featuresLength)return function(i){return i=modifyDiffuse(i,t,!0),0<ContextLimits.maximumVertexTextureImageUnits?i+="uniform sampler2D tile_pickTexture; \nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n    tile_color(tile_featureColor); \n}":(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n    vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n    if (featureProperties.a == 0.0) { \n        discard; \n    } \n",e&&(i+="    bool isStyleTranslucent = (featureProperties.a != 1.0); \n    if (czm_pass == czm_passTranslucent) \n    { \n        if (!isStyleTranslucent && !tile_translucentCommand) \n        { \n            discard; \n        } \n    } \n    else \n    { \n        if (isStyleTranslucent) \n        { \n            discard; \n        } \n    } \n"),i+="    tile_color(featureProperties); \n} \n"),i}},Cesium3DTileBatchTable.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return e=ShaderSource.replaceMain(e,"tile_main"),0<ContextLimits.maximumVertexTextureImageUnits?e+="uniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n    tile_main(); \n    gl_FragColor = tile_featureColor; \n}":e+="uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvoid main() \n{ \n    tile_main(); \n    vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n    if (featureProperties.a == 0.0) { \n        discard; \n    } \n    gl_FragColor = featureProperties; \n} \n",e}},Cesium3DTileBatchTable.prototype.getUniformMapCallback=function(){if(0!==this.featuresLength){var e=this;return function(t){return combine(t,{tile_batchTexture:function(){return defaultValue(e._batchTexture,e._defaultTexture)},tile_textureDimensions:function(){return e._textureDimensions},tile_textureStep:function(){return e._textureStep},tile_colorBlend:function(){return getColorBlend(e)},tile_pickTexture:function(){return e._pickTexture}})}}},Cesium3DTileBatchTable.prototype.getPickId=function(){return"texture2D(tile_pickTexture, tile_featureSt)"};var StyleCommandsNeeded={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};function getStyleCommandsNeeded(e){var t=e._translucentFeaturesLength;return 0===t?StyleCommandsNeeded.ALL_OPAQUE:t===e.featuresLength?StyleCommandsNeeded.ALL_TRANSLUCENT:StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT}function deriveCommand(e){var t=(e=DrawCommand.shallowClone(e)).pass===Pass$1.TRANSLUCENT;return e.uniformMap=defined(e.uniformMap)?e.uniformMap:{},e.uniformMap.tile_translucentCommand=function(){return t},e}function deriveTranslucentCommand(e){var t=DrawCommand.shallowClone(e);return t.pass=Pass$1.TRANSLUCENT,t.renderState=getTranslucentRenderState(e.renderState),t}function deriveOpaqueCommand(e){var t=DrawCommand.shallowClone(e);return t.renderState=getOpaqueRenderState(e.renderState),t}function getLogDepthPolygonOffsetFragmentShaderProgram(e,t){var i,r=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");return defined(r)||((i=t.fragmentShaderSource.clone()).defines=defined(i.defines)?i.defines.slice(0):[],i.defines.push("POLYGON_OFFSET"),i.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),r=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})),r}function deriveZBackfaceCommand(e,t){var i=DrawCommand.shallowClone(t),r=clone(i.renderState,!0);r.cull.enabled=!0,r.cull.face=CullFace$1.FRONT,r.colorMask={red:!1,green:!1,blue:!1,alpha:!1},r.polygonOffset={enabled:!0,factor:5,units:5},r.stencilTest=StencilConstants$1.setCesium3DTileBit(),r.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK,i.renderState=RenderState.fromCache(r),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=clone(t.uniformMap);var n=new Cartesian2(5,5);return i.uniformMap.u_polygonOffset=function(){return n},i.shaderProgram=getLogDepthPolygonOffsetFragmentShaderProgram(e,t.shaderProgram),i}function deriveStencilCommand(e,t){var i=DrawCommand.shallowClone(e);return(e=clone(i.renderState,!0)).stencilTest.enabled=!0,e.stencilTest.mask=StencilConstants$1.SKIP_LOD_MASK,e.stencilTest.reference=StencilConstants$1.CESIUM_3D_TILE_MASK|t<<StencilConstants$1.SKIP_LOD_BIT_SHIFT,e.stencilTest.frontFunction=StencilFunction$1.GREATER_OR_EQUAL,e.stencilTest.frontOperation.zPass=StencilOperation$1.REPLACE,e.stencilTest.backFunction=StencilFunction$1.GREATER_OR_EQUAL,e.stencilTest.backOperation.zPass=StencilOperation$1.REPLACE,e.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK|StencilConstants$1.SKIP_LOD_MASK,i.renderState=RenderState.fromCache(e),i}function getLastSelectionDepth(e){return(e.renderState.stencilTest.reference&StencilConstants$1.SKIP_LOD_MASK)>>>StencilConstants$1.SKIP_LOD_BIT_SHIFT}function getTranslucentRenderState(e){return(e=clone(e,!0)).cull.enabled=!1,e.depthTest.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND,RenderState.fromCache(e)}function getOpaqueRenderState(e){return(e=clone(e,!0)).stencilTest=StencilConstants$1.setCesium3DTileBit(),e.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK,RenderState.fromCache(e)}function createTexture$1(e,t,i){return e=e._textureDimensions,new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{width:e.x,height:e.y,arrayBufferView:i},flipY:!1,sampler:Sampler.NEAREST})}function createPickTexture(e,t){var i=e.featuresLength;if(!defined(e._pickTexture)&&0<i){for(var r=e._pickIds,n=getByteLength(e),a=new Uint8Array(n),o=e._content,s=0;s<i;++s){var l=t.createPickId(o.getFeature(s));r.push(l);var c=l.color;a[l=4*s]=Color.floatToByte(c.red),a[1+l]=Color.floatToByte(c.green),a[2+l]=Color.floatToByte(c.blue),a[3+l]=Color.floatToByte(c.alpha)}e._pickTexture=createTexture$1(e,t,a),o.tileset._statistics.batchTableByteLength+=e._pickTexture.sizeInBytes}}function updateBatchTexture(e){var t=e._textureDimensions;e._batchTexture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function Cesium3DTileFeature(e,t){this._content=e,this._batchId=t,this._color=void 0}function Cesium3DTileFeatureTable(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function getTypedArrayFromBinary(e,t,i,r,n,a){var o=e._cachedTypedArrays,s=o[t];return defined(s)||(s=ComponentDatatype$1.createArrayBufferView(i,e.buffer.buffer,e.buffer.byteOffset+a,n*r),o[t]=s),s}function getTypedArrayFromArray(e,t,i,r){var n=e._cachedTypedArrays;return defined(e=n[t])||(e=ComponentDatatype$1.createTypedArray(i,r),n[t]=e),e}function addToArray(e,t,i){return(i=defaultValue(i,!1))&&-1<(i=e.indexOf(t))?i:(e.push(t),e.length-1)}function hasExtension(e,t){return defined(e.extensionsUsed)&&0<=e.extensionsUsed.indexOf(t)}function ForEach(){}function numberOfComponentsForType(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}function getAccessorByteStride(e,t){var i=t.bufferView;return defined(i)&&defined((i=e.bufferViews[i]).byteStride)&&0<i.byteStride?i.byteStride:ComponentDatatype$1.getSizeInBytes(t.componentType)*numberOfComponentsForType(t.type)}function addDefaults(e){ForEach.accessor(e,(function(e){defined(e.bufferView)&&(e.byteOffset=defaultValue(e.byteOffset,0))})),ForEach.bufferView(e,(function(e){defined(e.buffer)&&(e.byteOffset=defaultValue(e.byteOffset,0))})),ForEach.mesh(e,(function(t){ForEach.meshPrimitive(t,(function(t){t.mode=defaultValue(t.mode,WebGLConstants$1.TRIANGLES),defined(t.material)||(defined(e.materials)||(e.materials=[]),t.material=addToArray(e.materials,{name:"default"}))}))})),ForEach.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t];t=i.bufferView;i.normalized=defaultValue(i.normalized,!1),defined(t)&&((t=e.bufferViews[t]).byteStride=getAccessorByteStride(e,i),t.target=WebGLConstants$1.ARRAY_BUFFER)})),ForEach.accessorContainingIndexData(e,(function(t){defined(t=e.accessors[t].bufferView)&&(e.bufferViews[t].target=WebGLConstants$1.ELEMENT_ARRAY_BUFFER)})),ForEach.material(e,(function(e){var t=defaultValue(e.extensions,defaultValue.EMPTY_OBJECT),i=t.KHR_materials_common;if(defined(i)){var r=i.technique,n=defined(i.values)?i.values:{};return(i.values=n).ambient=defined(n.ambient)?n.ambient:[0,0,0,1],n.emission=defined(n.emission)?n.emission:[0,0,0,1],n.transparency=defaultValue(n.transparency,1),n.transparent=defaultValue(n.transparent,!1),n.doubleSided=defaultValue(n.doubleSided,!1),void("CONSTANT"!==r&&(n.diffuse=defined(n.diffuse)?n.diffuse:[0,0,0,1],"LAMBERT"!==r&&(n.specular=defined(n.specular)?n.specular:[0,0,0,1],n.shininess=defaultValue(n.shininess,0))))}e.emissiveFactor=defaultValue(e.emissiveFactor,[0,0,0]),e.alphaMode=defaultValue(e.alphaMode,"OPAQUE"),e.doubleSided=defaultValue(e.doubleSided,!1),"MASK"===e.alphaMode&&(e.alphaCutoff=defaultValue(e.alphaCutoff,.5)),defined(t.KHR_techniques_webgl)&&ForEach.materialValue(e,(function(e){defined(e.index)&&addTextureDefaults(e)})),addTextureDefaults(e.emissiveTexture),addTextureDefaults(e.normalTexture),addTextureDefaults(e.occlusionTexture),defined(e=e.pbrMetallicRoughness)&&(e.baseColorFactor=defaultValue(e.baseColorFactor,[1,1,1,1]),e.metallicFactor=defaultValue(e.metallicFactor,1),e.roughnessFactor=defaultValue(e.roughnessFactor,1),addTextureDefaults(e.baseColorTexture),addTextureDefaults(e.metallicRoughnessTexture)),defined(t=t.pbrSpecularGlossiness)&&(t.diffuseFactor=defaultValue(t.diffuseFactor,[1,1,1,1]),t.specularFactor=defaultValue(t.specularFactor,[1,1,1]),t.glossinessFactor=defaultValue(t.glossinessFactor,1),addTextureDefaults(t.specularGlossinessTexture))})),ForEach.animation(e,(function(e){ForEach.animationSampler(e,(function(e){e.interpolation=defaultValue(e.interpolation,"LINEAR")}))}));var t=getAnimatedNodes(e);return ForEach.node(e,(function(e,i){defined(t[i])||defined(e.translation)||defined(e.rotation)||defined(e.scale)?(e.translation=defaultValue(e.translation,[0,0,0]),e.rotation=defaultValue(e.rotation,[0,0,0,1]),e.scale=defaultValue(e.scale,[1,1,1])):e.matrix=defaultValue(e.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])})),ForEach.sampler(e,(function(e){e.wrapS=defaultValue(e.wrapS,WebGLConstants$1.REPEAT),e.wrapT=defaultValue(e.wrapT,WebGLConstants$1.REPEAT)})),defined(e.scenes)&&!defined(e.scene)&&(e.scene=0),e}function getAnimatedNodes(e){var t={};return ForEach.animation(e,(function(e){ForEach.animationChannel(e,(function(e){var i;e=(i=e.target).node;"translation"!==(i=i.path)&&"rotation"!==i&&"scale"!==i||(t[e]=!0)}))})),t}function addTextureDefaults(e){defined(e)&&(e.texCoord=defaultValue(e.texCoord,0))}function addPipelineExtras(e){return ForEach.shader(e,(function(e){addExtras(e)})),ForEach.buffer(e,(function(e){addExtras(e)})),ForEach.image(e,(function(e){addExtras(e),ForEach.compressedImage(e,(function(e){addExtras(e)}))})),addExtras(e),e}function addExtras(e){e.extras=defined(e.extras)?e.extras:{},e.extras._pipeline=defined(e.extras._pipeline)?e.extras._pipeline:{}}function removeExtensionsRequired(e,t){var i=e.extensionsRequired;defined(i)&&(0<=(t=i.indexOf(t))&&i.splice(t,1),0===i.length&&delete e.extensionsRequired)}function removeExtensionsUsed(e,t){var i,r=e.extensionsUsed;defined(r)&&(0<=(i=r.indexOf(t))&&r.splice(i,1),removeExtensionsRequired(e,t),0===r.length&&delete e.extensionsUsed)}Cesium3DTileBatchTable.prototype.addDerivedCommands=function(e,t){for(var i=e.commandList,r=i.length,n=this._content._tile,a=n._finalResolution,o=n.tileset,s=o._skipLevelOfDetail&&o._hasMixedContent&&e.context.stencilBuffer,l=getStyleCommandsNeeded(this),c=t;c<r;++c){var u=i[c];defined(p=u.derivedCommands.tileset)&&!u.dirty||(p={},(u.derivedCommands.tileset=p).originalCommand=deriveCommand(u),u.dirty=!1);var d=p.originalCommand;l!==StyleCommandsNeeded.ALL_OPAQUE&&u.pass!==Pass$1.TRANSLUCENT&&(defined(p.translucent)||(p.translucent=deriveTranslucentCommand(d))),l!==StyleCommandsNeeded.ALL_TRANSLUCENT&&u.pass!==Pass$1.TRANSLUCENT&&(defined(p.opaque)||(p.opaque=deriveOpaqueCommand(d)),s&&(a||(defined(p.zback)||(p.zback=deriveZBackfaceCommand(e.context,d)),o._backfaceCommands.push(p.zback)),defined(p.stencil)&&n._selectionDepth===getLastSelectionDepth(p.stencil)||(u.renderState.depthMask?p.stencil=deriveStencilCommand(d,n._selectionDepth):p.stencil=p.opaque)));var h=s?p.stencil:p.opaque,p=p.translucent;u.pass!==Pass$1.TRANSLUCENT?(l===StyleCommandsNeeded.ALL_OPAQUE&&(i[c]=h),l===StyleCommandsNeeded.ALL_TRANSLUCENT&&(i[c]=p),l===StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT&&(i[c]=h,i.push(p))):i[c]=d}},Cesium3DTileBatchTable.prototype.update=function(e,t){var i=t.context;this._defaultTexture=i.defaultTexture,((t=t.passes).pick||t.postProcess)&&createPickTexture(this,i),this._batchValuesDirty&&(this._batchValuesDirty=!1,defined(this._batchTexture)||(this._batchTexture=createTexture$1(this,i,this._batchValues),e._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes),updateBatchTexture(this))},Cesium3DTileBatchTable.prototype.isDestroyed=function(){return!1},Cesium3DTileBatchTable.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();return destroyObject(this)},Object.defineProperties(Cesium3DTileFeature.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return defined(this._color)||(this._color=new Color),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}}),Cesium3DTileFeature.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},Cesium3DTileFeature.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},Cesium3DTileFeature.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},Cesium3DTileFeature.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},Cesium3DTileFeature.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},Cesium3DTileFeature.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},Cesium3DTileFeature.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},Cesium3DTileFeatureTable.prototype.getGlobalProperty=function(e,t,i){var r=this.json[e];if(defined(r))return defined(r.byteOffset)?getTypedArrayFromBinary(this,e,t=defaultValue(t,ComponentDatatype$1.UNSIGNED_INT),i=defaultValue(i,1),1,r.byteOffset):r},Cesium3DTileFeatureTable.prototype.getPropertyArray=function(e,t,i){var r=this.json[e];if(defined(r))return defined(r.byteOffset)?(defined(r.componentType)&&(t=ComponentDatatype$1.fromName(r.componentType)),getTypedArrayFromBinary(this,e,t,i,this.featuresLength,r.byteOffset)):getTypedArrayFromArray(this,e,t,r)},Cesium3DTileFeatureTable.prototype.getProperty=function(e,t,i,r,n){if(defined(this.json[e])){var a=this.getPropertyArray(e,t,i);if(1===i)return a[r];for(var o=0;o<i;++o)n[o]=a[i*r+o];return n}},ForEach.objectLegacy=function(e,t){if(defined(e))for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=t(e[i],i);if(defined(r))return r}},ForEach.object=function(e,t){if(defined(e))for(var i=e.length,r=0;r<i;r++){var n=t(e[r],r);if(defined(n))return n}},ForEach.topLevel=function(e,t,i){return defined(t=e[t])&&!Array.isArray(t)?ForEach.objectLegacy(t,i):ForEach.object(t,i)},ForEach.accessor=function(e,t){return ForEach.topLevel(e,"accessors",t)},ForEach.accessorWithSemantic=function(e,t,i){var r={};return ForEach.mesh(e,(function(e){return ForEach.meshPrimitive(e,(function(e){var n=ForEach.meshPrimitiveAttribute(e,(function(e,n){if(0===n.indexOf(t)&&!defined(r[e])&&(r[e]=!0,defined(e=i(e))))return e}));return defined(n)?n:ForEach.meshPrimitiveTarget(e,(function(e){return ForEach.meshPrimitiveTargetAttribute(e,(function(e,n){if(0===n.indexOf(t)&&!defined(r[e])&&(r[e]=!0,defined(e=i(e))))return e}))}))}))}))},ForEach.accessorContainingVertexAttributeData=function(e,t){var i={};return ForEach.mesh(e,(function(e){return ForEach.meshPrimitive(e,(function(e){var r=ForEach.meshPrimitiveAttribute(e,(function(e){if(!defined(i[e])&&(i[e]=!0,defined(e=t(e))))return e}));return defined(r)?r:ForEach.meshPrimitiveTarget(e,(function(e){return ForEach.meshPrimitiveTargetAttribute(e,(function(e){if(!defined(i[e])&&(i[e]=!0,defined(e=t(e))))return e}))}))}))}))},ForEach.accessorContainingIndexData=function(e,t){var i={};return ForEach.mesh(e,(function(e){return ForEach.meshPrimitive(e,(function(e){if(defined(e=e.indices)&&!defined(i[e])&&(i[e]=!0,defined(e=t(e))))return e}))}))},ForEach.animation=function(e,t){return ForEach.topLevel(e,"animations",t)},ForEach.animationChannel=function(e,t){return e=e.channels,ForEach.object(e,t)},ForEach.animationSampler=function(e,t){return e=e.samplers,ForEach.object(e,t)},ForEach.buffer=function(e,t){return ForEach.topLevel(e,"buffers",t)},ForEach.bufferView=function(e,t){return ForEach.topLevel(e,"bufferViews",t)},ForEach.camera=function(e,t){return ForEach.topLevel(e,"cameras",t)},ForEach.image=function(e,t){return ForEach.topLevel(e,"images",t)},ForEach.compressedImage=function(e,t){if(defined(e.extras)){var i,r=e.extras.compressedImage3DTiles;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}}},ForEach.material=function(e,t){return ForEach.topLevel(e,"materials",t)},ForEach.materialValue=function(e,t){var i,r=e.values;for(i in defined(e.extensions)&&defined(e.extensions.KHR_techniques_webgl)&&(r=e.extensions.KHR_techniques_webgl.values),r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.mesh=function(e,t){return ForEach.topLevel(e,"meshes",t)},ForEach.meshPrimitive=function(e,t){var i=e.primitives;if(defined(i))for(var r=i.length,n=0;n<r;n++){var a=t(i[n],n);if(defined(a))return a}},ForEach.meshPrimitiveAttribute=function(e,t){var i,r=e.attributes;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.meshPrimitiveTarget=function(e,t){var i=e.targets;if(defined(i))for(var r=i.length,n=0;n<r;++n){var a=t(i[n],n);if(defined(a))return a}},ForEach.meshPrimitiveTargetAttribute=function(e,t){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=t(e[i],i);if(defined(r))return r}},ForEach.node=function(e,t){return ForEach.topLevel(e,"nodes",t)},ForEach.nodeInTree=function(e,t,i){var r=e.nodes;if(defined(r))for(var n=t.length,a=0;a<n;a++){var o=t[a],s=r[o];if(defined(s)){if(defined(o=i(s,o)))return o;if(defined(s=s.children)&&defined(o=ForEach.nodeInTree(e,s,i)))return o}}},ForEach.nodeInScene=function(e,t,i){if(defined(t=t.nodes))return ForEach.nodeInTree(e,t,i)},ForEach.program=function(e,t){return hasExtension(e,"KHR_techniques_webgl")?ForEach.object(e.extensions.KHR_techniques_webgl.programs,t):ForEach.topLevel(e,"programs",t)},ForEach.sampler=function(e,t){return ForEach.topLevel(e,"samplers",t)},ForEach.scene=function(e,t){return ForEach.topLevel(e,"scenes",t)},ForEach.shader=function(e,t){return hasExtension(e,"KHR_techniques_webgl")?ForEach.object(e.extensions.KHR_techniques_webgl.shaders,t):ForEach.topLevel(e,"shaders",t)},ForEach.skin=function(e,t){return ForEach.topLevel(e,"skins",t)},ForEach.skinJoint=function(e,t){var i=e.joints;if(defined(i))for(var r=i.length,n=0;n<r;n++){var a=t(i[n]);if(defined(a))return a}},ForEach.techniqueAttribute=function(e,t){var i,r=e.attributes;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.techniqueUniform=function(e,t){var i,r=e.uniforms;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.techniqueParameter=function(e,t){var i,r=e.parameters;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.technique=function(e,t){return hasExtension(e,"KHR_techniques_webgl")?ForEach.object(e.extensions.KHR_techniques_webgl.techniques,t):ForEach.topLevel(e,"techniques",t)},ForEach.texture=function(e,t){return ForEach.topLevel(e,"textures",t)};var sizeOfUint32$2=4;function parseGlb(e){if("glTF"!==getMagic(e))throw new RuntimeError("File is not valid binary glTF");var t=readHeader(e,0,5),i=t[1];if(1!==i&&2!==i)throw new RuntimeError("Binary glTF version is not 1 or 2");return(1===i?parseGlbVersion1:parseGlbVersion2)(e,t)}function readHeader(e,t,i){for(var r=new DataView(e.buffer),n=new Array(i),a=0;a<i;++a)n[a]=r.getUint32(e.byteOffset+t+a*sizeOfUint32$2,!0);return n}function parseGlbVersion1(e,t){var i=t[2],r=t[3];if(0!==t[4])throw new RuntimeError("Binary glTF scene format is not JSON");return t=20+r,r=getStringFromTypedArray(e,20,r),addPipelineExtras(r=JSON.parse(r)),t=e.subarray(t,i),defined(i=r.buffers)&&0<Object.keys(i).length&&defined(i=defaultValue(i.binary_glTF,i.KHR_binary_glTF))&&(i.extras._pipeline.source=t),removeExtensionsUsed(r,"KHR_binary_glTF"),r}function parseGlbVersion2(e,t){for(var i,r=t[2],n=12;n<r;){var a=(l=readHeader(e,n,2))[0],o=l[1];n+=8;var s,l=e.subarray(n,n+a);n+=a,1313821514===o?(a=getStringFromTypedArray(l),addPipelineExtras(s=JSON.parse(a))):5130562===o&&(i=l)}return defined(s)&&defined(i)&&defined(t=s.buffers)&&0<t.length&&(t[0].extras._pipeline.source=i),s}function addExtensionsUsed(e,t){var i=e.extensionsUsed;defined(i)||(i=[],e.extensionsUsed=i),addToArray(i,t,!0)}function getComponentReader(e){switch(e){case ComponentDatatype$1.BYTE:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getInt8(t+a*r)};case ComponentDatatype$1.UNSIGNED_BYTE:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getUint8(t+a*r)};case ComponentDatatype$1.SHORT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getInt16(t+a*r,!0)};case ComponentDatatype$1.UNSIGNED_SHORT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getUint16(t+a*r,!0)};case ComponentDatatype$1.INT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getInt32(t+a*r,!0)};case ComponentDatatype$1.UNSIGNED_INT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getUint32(t+a*r,!0)};case ComponentDatatype$1.FLOAT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getFloat32(t+a*r,!0)};case ComponentDatatype$1.DOUBLE:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getFloat64(t+a*r,!0)}}}function findAccessorMinMax(e,t){var i=e.bufferViews,r=e.buffers,n=t.bufferView,a=numberOfComponentsForType(t.type);if(!defined(t.bufferView))return{min:arrayFill(new Array(a),0),max:arrayFill(new Array(a),0)};for(var o=arrayFill(new Array(a),Number.POSITIVE_INFINITY),s=arrayFill(new Array(a),Number.NEGATIVE_INFINITY),l=(r=r[(n=i[n]).buffer].extras._pipeline.source,t.count),c=getAccessorByteStride(e,t),u=t.byteOffset+n.byteOffset+r.byteOffset,d=(t=t.componentType,ComponentDatatype$1.getSizeInBytes(t)),h=new DataView(r.buffer),p=new Array(a),f=getComponentReader(t),m=0;m<l;m++){f(h,u,a,d,p);for(var g=0;g<a;g++){var y=p[g];o[g]=Math.min(o[g],y),s[g]=Math.max(s[g],y)}u+=c}return{min:o,max:s}}var defaultBlendEquation=[WebGLConstants$1.FUNC_ADD,WebGLConstants$1.FUNC_ADD],defaultBlendFactors=[WebGLConstants$1.ONE,WebGLConstants$1.ZERO,WebGLConstants$1.ONE,WebGLConstants$1.ZERO];function isStateEnabled(e,t){return defined(e=e.enable)&&-1<e.indexOf(t)}var supportedBlendFactors=[WebGLConstants$1.ZERO,WebGLConstants$1.ONE,WebGLConstants$1.SRC_COLOR,WebGLConstants$1.ONE_MINUS_SRC_COLOR,WebGLConstants$1.SRC_ALPHA,WebGLConstants$1.ONE_MINUS_SRC_ALPHA,WebGLConstants$1.DST_ALPHA,WebGLConstants$1.ONE_MINUS_DST_ALPHA,WebGLConstants$1.DST_COLOR,WebGLConstants$1.ONE_MINUS_DST_COLOR];function getSupportedBlendFactors(e,t){if(!defined(e))return t;for(var i=0;i<4;i++)if(-1===supportedBlendFactors.indexOf(e[i]))return t;return e}function moveTechniqueRenderStates(e){var t={},i={};return defined(e.techniques)&&(ForEach.technique(e,(function(e,r){var n,a,o=e.states;defined(o)&&(n=i[r]={},isStateEnabled(o,WebGLConstants$1.BLEND)&&(n.alphaMode="BLEND",defined(a=o.functions)&&(defined(a.blendEquationSeparate)||defined(a.blendFuncSeparate))&&(t[r]={blendEquation:defaultValue(a.blendEquationSeparate,defaultBlendEquation),blendFactors:getSupportedBlendFactors(a.blendFuncSeparate,defaultBlendFactors)})),isStateEnabled(o,WebGLConstants$1.CULL_FACE)||(n.doubleSided=!0),delete e.states)})),0<Object.keys(t).length&&(defined(e.extensions)||(e.extensions={}),addExtensionsUsed(e,"KHR_blend")),ForEach.material(e,(function(e){var r;defined(e.technique)&&(r=i[e.technique],ForEach.objectLegacy(r,(function(t,i){e[i]=t})),defined(r=t[e.technique])&&(defined(e.extensions)||(e.extensions={}),e.extensions.KHR_blend=r))}))),e}function addExtensionsRequired(e,t){var i=e.extensionsRequired;defined(i)||(i=[],e.extensionsRequired=i),addToArray(i,t,!0),addExtensionsUsed(e,t)}function moveTechniquesToExtension(e){var t,i,r=e.techniques,n={},a={};return defined(r)&&(t={programs:[],shaders:[],techniques:[]},i=e.glExtensionsUsed,delete e.glExtensionsUsed,ForEach.technique(e,(function(r,o){var s,l={name:r.name,program:void 0,attributes:{},uniforms:{}};ForEach.techniqueAttribute(r,(function(e,t){s=r.parameters[e],l.attributes[t]={semantic:s.semantic}})),ForEach.techniqueUniform(r,(function(e,t){s=r.parameters[e],l.uniforms[t]={count:s.count,node:s.node,type:s.type,semantic:s.semantic,value:s.value},n[e]=t}));var c=e.programs[r.program],u={name:c.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:i},d=e.shaders[c.fragmentShader];u.fragmentShader=addToArray(t.shaders,d,!0),c=e.shaders[c.vertexShader],u.vertexShader=addToArray(t.shaders,c,!0),l.program=addToArray(t.programs,u),a[o]=addToArray(t.techniques,l)})),0<t.techniques.length&&(defined(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t,addExtensionsUsed(e,"KHR_techniques_webgl"),addExtensionsRequired(e,"KHR_techniques_webgl"))),ForEach.material(e,(function(e){var t;defined(e.technique)&&(t={technique:a[e.technique]},ForEach.objectLegacy(e.values,(function(e,i){defined(t.values)||(t.values={}),i=n[i],t.values[i]=e})),defined(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t),delete e.technique,delete e.values})),delete e.techniques,delete e.programs,delete e.shaders,e}var allElementTypes=["mesh","node","material","accessor","bufferView","buffer"];function removeUnusedElements(e,t){return t=defaultValue(t,allElementTypes),allElementTypes.forEach((function(i){-1<t.indexOf(i)&&removeUnusedElementsByType(e,i)})),e}var TypeToGltfElementName={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",node:"nodes",material:"materials",mesh:"meshes"};function removeUnusedElementsByType(e,t){var i=e[TypeToGltfElementName[t]];if(defined(i))for(var r=0,n=getListOfElementsIdsInUse[t](e),a=i.length,o=0;o<a;++o)n[o]||(Remove[t](e,o-r),r++)}function Remove(){}function getListOfElementsIdsInUse(){}function nodeIsEmpty(e,t){return!(defined(t.mesh)||defined(t.camera)||defined(t.skin)||defined(t.weights)||defined(t.extras)||defined(t.extensions)&&0!==t.extensions.length||defined(t.children)&&0!==t.children.filter((function(t){return!nodeIsEmpty(e,e.nodes[t])})).length)}function addBuffer(e,t){var i={byteLength:t.length,extras:{_pipeline:{source:t}}};t={buffer:addToArray(e.buffers,i),byteOffset:0,byteLength:t.length};return addToArray(e.bufferViews,t)}function readAccessorPacked(e,t){var i=getAccessorByteStride(e,t),r=ComponentDatatype$1.getSizeInBytes(t.componentType),n=numberOfComponentsForType(t.type),a=t.count,o=new Array(n*a);if(!defined(t.bufferView))return arrayFill(o,0),o;for(var s=e.bufferViews[t.bufferView],l=(e=e.buffers[s.buffer].extras._pipeline.source,t.byteOffset+s.byteOffset+e.byteOffset),c=new DataView(e.buffer),u=new Array(n),d=getComponentReader(t.componentType),h=0;h<a;++h){d(c,l,n,r,u);for(var p=0;p<n;++p)o[h*n+p]=u[p];l+=i}return o}function updateAccessorComponentTypes(e){var t;return ForEach.accessorWithSemantic(e,"JOINTS_0",(function(i){i=e.accessors[i],(t=i.componentType)===WebGLConstants$1.BYTE?convertType(e,i,ComponentDatatype$1.UNSIGNED_BYTE):t!==WebGLConstants$1.UNSIGNED_BYTE&&t!==WebGLConstants$1.UNSIGNED_SHORT&&convertType(e,i,ComponentDatatype$1.UNSIGNED_SHORT)})),ForEach.accessorWithSemantic(e,"WEIGHTS_0",(function(i){i=e.accessors[i],(t=i.componentType)===WebGLConstants$1.BYTE?convertType(e,i,ComponentDatatype$1.UNSIGNED_BYTE):t===WebGLConstants$1.SHORT&&convertType(e,i,ComponentDatatype$1.UNSIGNED_SHORT)})),e}function convertType(e,t,i){var r=ComponentDatatype$1.createTypedArray(i,readAccessorPacked(e,t));r=new Uint8Array(r.buffer);t.bufferView=addBuffer(e,r),t.componentType=i,t.byteOffset=0}Remove.accessor=function(e,t){e.accessors.splice(t,1),ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){ForEach.meshPrimitiveAttribute(e,(function(i,r){t<i&&e.attributes[r]--})),ForEach.meshPrimitiveTarget(e,(function(e){ForEach.meshPrimitiveTargetAttribute(e,(function(i,r){t<i&&e[r]--}))}));var i=e.indices;defined(i)&&t<i&&e.indices--}))})),ForEach.skin(e,(function(e){defined(e.inverseBindMatrices)&&e.inverseBindMatrices>t&&e.inverseBindMatrices--})),ForEach.animation(e,(function(e){ForEach.animationSampler(e,(function(e){defined(e.input)&&e.input>t&&e.input--,defined(e.output)&&e.output>t&&e.output--}))}))},Remove.buffer=function(e,t){e.buffers.splice(t,1),ForEach.bufferView(e,(function(e){defined(e.buffer)&&e.buffer>t&&e.buffer--}))},Remove.bufferView=function(e,t){e.bufferViews.splice(t,1),ForEach.accessor(e,(function(e){defined(e.bufferView)&&e.bufferView>t&&e.bufferView--})),ForEach.shader(e,(function(e){defined(e.bufferView)&&e.bufferView>t&&e.bufferView--})),ForEach.image(e,(function(e){defined(e.bufferView)&&e.bufferView>t&&e.bufferView--,ForEach.compressedImage(e,(function(e){var i=e.bufferView;defined(i)&&t<i&&e.bufferView--}))})),hasExtension(e,"KHR_draco_mesh_compression")&&ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.extensions)&&defined(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>t&&e.extensions.KHR_draco_mesh_compression.bufferView--}))}))},Remove.mesh=function(e,t){e.meshes.splice(t,1),ForEach.node(e,(function(e){defined(e.mesh)&&(e.mesh>t?e.mesh--:e.mesh===t&&delete e.mesh)}))},Remove.node=function(e,t){e.nodes.splice(t,1),ForEach.skin(e,(function(e){defined(e.skeleton)&&e.skeleton>t&&e.skeleton--,e.joints=e.joints.map((function(e){return t<e?e-1:e}))})),ForEach.animation(e,(function(e){ForEach.animationChannel(e,(function(e){defined(e.target)&&defined(e.target.node)&&e.target.node>t&&e.target.node--}))})),ForEach.technique(e,(function(e){ForEach.techniqueUniform(e,(function(e){defined(e.node)&&e.node>t&&e.node--}))})),ForEach.node(e,(function(e){defined(e.children)&&(e.children=e.children.filter((function(e){return e!==t})).map((function(e){return t<e?e-1:e})))})),ForEach.scene(e,(function(e){e.nodes=e.nodes.filter((function(e){return e!==t})).map((function(e){return t<e?e-1:e}))}))},Remove.material=function(e,t){e.materials.splice(t,1),ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.material)&&e.material>t&&e.material--}))}))},getListOfElementsIdsInUse.accessor=function(e){var t={};return ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){ForEach.meshPrimitiveAttribute(e,(function(e){t[e]=!0})),ForEach.meshPrimitiveTarget(e,(function(e){ForEach.meshPrimitiveTargetAttribute(e,(function(e){t[e]=!0}))})),defined(e=e.indices)&&(t[e]=!0)}))})),ForEach.skin(e,(function(e){defined(e.inverseBindMatrices)&&(t[e.inverseBindMatrices]=!0)})),ForEach.animation(e,(function(e){ForEach.animationSampler(e,(function(e){defined(e.input)&&(t[e.input]=!0),defined(e.output)&&(t[e.output]=!0)}))})),t},getListOfElementsIdsInUse.buffer=function(e){var t={};return ForEach.bufferView(e,(function(e){defined(e.buffer)&&(t[e.buffer]=!0)})),t},getListOfElementsIdsInUse.bufferView=function(e){var t={};return ForEach.accessor(e,(function(e){defined(e.bufferView)&&(t[e.bufferView]=!0)})),ForEach.shader(e,(function(e){defined(e.bufferView)&&(t[e.bufferView]=!0)})),ForEach.image(e,(function(e){defined(e.bufferView)&&(t[e.bufferView]=!0),ForEach.compressedImage(e,(function(e){defined(e.bufferView)&&(t[e.bufferView]=!0)}))})),hasExtension(e,"KHR_draco_mesh_compression")&&ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.extensions)&&defined(e.extensions.KHR_draco_mesh_compression)&&(t[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)}))})),t},getListOfElementsIdsInUse.mesh=function(e){var t={};return ForEach.node(e,(function(i){var r;!defined(i.mesh&&defined(e.meshes))||defined(r=e.meshes[i.mesh])&&defined(r.primitives)&&0<r.primitives.length&&(t[i.mesh]=!0)})),t},getListOfElementsIdsInUse.node=function(e){var t={};return ForEach.node(e,(function(i,r){nodeIsEmpty(e,i)||(t[r]=!0)})),ForEach.skin(e,(function(e){defined(e.skeleton)&&(t[e.skeleton]=!0),ForEach.skinJoint(e,(function(e){t[e]=!0}))})),ForEach.animation(e,(function(e){ForEach.animationChannel(e,(function(e){defined(e.target)&&defined(e.target.node)&&(t[e.target.node]=!0)}))})),ForEach.technique(e,(function(e){ForEach.techniqueUniform(e,(function(e){defined(e.node)&&(t[e.node]=!0)}))})),t},getListOfElementsIdsInUse.material=function(e){var t={};return ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.material)&&(t[e.material]=!0)}))})),t};var updateFunctions={.8:glTF08to10,"1.0":glTF10to20,"2.0":void 0};function updateVersion(e,t){var i=(t=defaultValue(t,defaultValue.EMPTY_OBJECT)).targetVersion,r=e.version;e.asset=defaultValue(e.asset,{version:"1.0"}),e.asset.version=defaultValue(e.asset.version,"1.0"),r=defaultValue(r,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(updateFunctions,r)||(defined(r)&&(r=r.substring(0,3)),Object.prototype.hasOwnProperty.call(updateFunctions,r)||(r="1.0"));for(var n=updateFunctions[r];defined(n)&&r!==i;)n(e,t),r=e.asset.version,n=updateFunctions[r];return e}function updateInstanceTechniques(e){var t,i,r,n=e.materials;for(t in n)!Object.prototype.hasOwnProperty.call(n,t)||defined(r=(i=n[t]).instanceTechnique)&&(i.technique=r.technique,i.values=r.values,delete i.instanceTechnique)}function setPrimitiveModes(e){var t,i=e.meshes;for(t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var r=i[t].primitives;if(defined(r))for(var n=r.length,a=0;a<n;++a){var o=r[a],s=defaultValue(o.primitive,WebGLConstants$1.TRIANGLES);o.mode=defaultValue(o.mode,s),delete o.primitive}}}function updateNodes(e){var t,i,r,n=e.nodes,a=new Cartesian3,o=new Quaternion;for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(defined((i=n[t]).rotation)&&(r=i.rotation,Cartesian3.fromArray(r,0,a),Quaternion.fromAxisAngle(a,r[3],o),i.rotation=[o.x,o.y,o.z,o.w]),defined(r=i.instanceSkin)&&(i.skeletons=r.skeletons,i.skin=r.skin,i.meshes=r.meshes,delete i.instanceSkin))}function updateAnimations(e){var t,i=e.animations,r=e.accessors,n=e.bufferViews,a=e.buffers,o={},s=new Cartesian3,l=new Quaternion;for(t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var c=i[t],u=c.channels,d=c.parameters,h=c.samplers;if(defined(u))for(var p=u.length,f=0;f<p;++f){if("rotation"===(m=u[f]).target.path)if(!defined(o[g=d[h[m.sampler].output]])){o[g]=!0;for(var m,g=(m=a[(y=n[(C=r[g]).bufferView]).buffer].extras._pipeline.source).byteOffset+y.byteOffset+C.byteOffset,y=C.componentType,_=C.count,v=numberOfComponentsForType(C.type),C=C.count*v,x=ComponentDatatype$1.createArrayBufferView(y,m.buffer,g,C),b=0;b<_;b++){var S=b*v;Cartesian3.unpack(x,S,s);var T=x[3+S];Quaternion.fromAxisAngle(s,T,l),Quaternion.pack(l,x,S)}}}}}function removeTechniquePasses(e){var t,i,r,n,a=e.techniques;for(t in a)!Object.prototype.hasOwnProperty.call(a,t)||defined(r=(i=a[t]).passes)&&(n=defaultValue(i.pass,"defaultPass"),Object.prototype.hasOwnProperty.call(r,n)&&(n=(r=r[n]).instanceProgram,i.attributes=defaultValue(i.attributes,n.attributes),i.program=defaultValue(i.program,n.program),i.uniforms=defaultValue(i.uniforms,n.uniforms),i.states=defaultValue(i.states,r.states)),delete i.passes,delete i.pass)}function glTF08to10(e){defined(e.asset)||(e.asset={});var t,i=e.asset;i.version="1.0","string"==typeof i.profile?(t=i.profile.split(" "),i.profile={api:t[0],version:t[1]}):i.profile={},defined(e.version)&&delete e.version,updateInstanceTechniques(e),setPrimitiveModes(e),updateNodes(e),updateAnimations(e),removeTechniquePasses(e),defined(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),defined(e.lights)&&(t=defaultValue(e.extensions,{}),i=defaultValue((e.extensions=t).KHR_materials_common,{}),(t.KHR_materials_common=i).lights=e.lights,delete e.lights,addExtensionsUsed(e,"KHR_materials_common"))}function removeAnimationSamplersIndirection(e){var t,i=e.animations;for(t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var r=i[t],n=r.parameters;if(defined(n)){var a,o,s=r.samplers;for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&((o=s[a]).input=n[o.input],o.output=n[o.output]);delete r.parameters}}}function objectToArray(e,t){var i,r,n=[];for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r=e[i],t[i]=n.length,n.push(r),defined(r.name)||(r.name=i));return n}function objectsToArrays(e){var t,i,r,n,a,o,s={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},l={},c=e.nodes;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&defined(i=c[r].jointName)&&(l[i]=r);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&defined(s[n])&&(a={},o=e[n],e[n]=objectToArray(o,a),s[n]=a);for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(l[i]=s.nodes[l[i]]);defined(e.scene)&&(e.scene=s.scenes[e.scene]),ForEach.bufferView(e,(function(e){defined(e.buffer)&&(e.buffer=s.buffers[e.buffer])})),ForEach.accessor(e,(function(e){defined(e.bufferView)&&(e.bufferView=s.bufferViews[e.bufferView])})),ForEach.shader(e,(function(e){var t,i=e.extensions;defined(i)&&(defined(t=i.KHR_binary_glTF)&&(e.bufferView=s.bufferViews[t.bufferView],delete i.KHR_binary_glTF),0===Object.keys(i).length&&delete e.extensions)})),ForEach.program(e,(function(e){defined(e.vertexShader)&&(e.vertexShader=s.shaders[e.vertexShader]),defined(e.fragmentShader)&&(e.fragmentShader=s.shaders[e.fragmentShader])})),ForEach.technique(e,(function(e){defined(e.program)&&(e.program=s.programs[e.program]),ForEach.techniqueParameter(e,(function(e){defined(e.node)&&(e.node=s.nodes[e.node]);var t=e.value;"string"==typeof t&&(e.value={index:s.textures[t]})}))})),ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.indices)&&(e.indices=s.accessors[e.indices]),ForEach.meshPrimitiveAttribute(e,(function(t,i){e.attributes[i]=s.accessors[t]})),defined(e.material)&&(e.material=s.materials[e.material])}))})),ForEach.node(e,(function(i){var r,n=i.children;if(defined(n)){var a=n.length;for(t=0;t<a;++t)n[t]=s.nodes[n[t]]}if(defined(i.meshes)){var o=i.meshes,l=o.length;if(0<l)for(i.mesh=s.meshes[o[0]],t=1;t<l;++t){var c={mesh:s.meshes[o[t]]};c=addToArray(e.nodes,c);defined(n)||(n=[],i.children=n),n.push(c)}delete i.meshes}defined(i.camera)&&(i.camera=s.cameras[i.camera]),defined(i.skin)&&(i.skin=s.skins[i.skin]),defined(i.skeletons)&&(0<(r=i.skeletons).length&&defined(i.skin)&&(e.skins[i.skin].skeleton=s.nodes[r[0]]),delete i.skeletons),defined(i.jointName)&&delete i.jointName})),ForEach.skin(e,(function(e){defined(e.inverseBindMatrices)&&(e.inverseBindMatrices=s.accessors[e.inverseBindMatrices]);var i=e.jointNames;if(defined(i)){var r=[],n=i.length;for(t=0;t<n;++t)r[t]=l[i[t]];e.joints=r,delete e.jointNames}})),ForEach.scene(e,(function(e){var i=e.nodes;if(defined(i)){var r=i.length;for(t=0;t<r;++t)i[t]=s.nodes[i[t]]}})),ForEach.animation(e,(function(e){var t={};e.samplers=objectToArray(e.samplers,t),ForEach.animationSampler(e,(function(e){e.input=s.accessors[e.input],e.output=s.accessors[e.output]})),ForEach.animationChannel(e,(function(e){e.sampler=t[e.sampler],defined(e=e.target)&&(e.node=s.nodes[e.id],delete e.id)}))})),ForEach.material(e,(function(e){defined(e.technique)&&(e.technique=s.techniques[e.technique]),ForEach.materialValue(e,(function(t,i){"string"==typeof t&&(e.values[i]={index:s.textures[t]})}));var t,i=e.extensions;!defined(i)||defined(t=i.KHR_materials_common)&&ForEach.materialValue(t,(function(e,i){"string"==typeof e&&(t.values[i]={index:s.textures[e]})}))})),ForEach.image(e,(function(e){var t,i=e.extensions;defined(i)&&(defined(t=i.KHR_binary_glTF)&&(e.bufferView=s.bufferViews[t.bufferView],e.mimeType=t.mimeType,delete i.KHR_binary_glTF),0===Object.keys(i).length&&delete e.extensions),ForEach.compressedImage(e,(function(e){var t,r=e.extensions;defined(r)&&(defined(t=r.KHR_binary_glTF)&&(e.bufferView=s.bufferViews[t.bufferView],e.mimeType=t.mimeType,delete r.KHR_binary_glTF),0===Object.keys(i).length&&delete e.extensions)}))})),ForEach.texture(e,(function(e){defined(e.sampler)&&(e.sampler=s.samplers[e.sampler]),defined(e.source)&&(e.source=s.images[e.source])}))}function removeAnimationSamplerNames(e){ForEach.animation(e,(function(e){ForEach.animationSampler(e,(function(e){delete e.name}))}))}function removeEmptyArrays(e){for(var t in e){var i;Object.prototype.hasOwnProperty.call(e,t)&&(i=e[t],Array.isArray(i)&&0===i.length&&delete e[t])}ForEach.node(e,(function(e){defined(e.children)&&0===e.children.length&&delete e.children}))}function stripAsset(e){delete(e=e.asset).profile,delete e.premultipliedAlpha}var knownExtensions={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function requireKnownExtensions(e){var t=e.extensionsUsed;if(e.extensionsRequired=defaultValue(e.extensionsRequired,[]),defined(t))for(var i=t.length,r=0;r<i;++r){var n=t[r];defined(knownExtensions[n])&&e.extensionsRequired.push(n)}}function removeBufferType(e){ForEach.buffer(e,(function(e){delete e.type}))}function removeTextureProperties(e){ForEach.texture(e,(function(e){delete e.format,delete e.internalFormat,delete e.target,delete e.type}))}function requireAttributeSetIndex(e){ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){ForEach.meshPrimitiveAttribute(e,(function(t,i){"TEXCOORD"===i?e.attributes.TEXCOORD_0=t:"COLOR"===i&&(e.attributes.COLOR_0=t)})),delete e.attributes.TEXCOORD,delete e.attributes.COLOR}))})),ForEach.technique(e,(function(e){ForEach.techniqueParameter(e,(function(e){var t=e.semantic;defined(t)&&("TEXCOORD"===t?e.semantic="TEXCOORD_0":"COLOR"===t&&(e.semantic="COLOR_0"))}))}))}var knownSemantics={POSITION:!0,NORMAL:!0,TANGENT:!0},indexedSemantics={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function underscoreApplicationSpecificSemantics(e){var t={};ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){for(var i in ForEach.meshPrimitiveAttribute(e,(function(e,i){var r,n,a,o;"_"!==i.charAt(0)&&(o=i.search(/_[0-9]+/g),r=i,n="_0",0<=o&&(r=i.substring(0,o),n=i.substring(o)),defined(o=indexedSemantics[r])?(a=o+n,t[i]=a):defined(knownSemantics[r])||(a="_"+i,t[i]=a))})),t){var r,n;Object.prototype.hasOwnProperty.call(t,i)&&(r=t[i],defined(n=e.attributes[i])&&(delete e.attributes[i],e.attributes[r]=n))}}))})),ForEach.technique(e,(function(e){ForEach.techniqueParameter(e,(function(e){var i=t[e.semantic];defined(i)&&(e.semantic=i)}))}))}function clampCameraParameters(e){ForEach.camera(e,(function(e){var t=e.perspective;defined(t)&&(defined(e=t.aspectRatio)&&0===e&&delete t.aspectRatio,defined(e=t.yfov)&&0===e&&(t.yfov=1))}))}function computeAccessorByteStride(e,t){return defined(t.byteStride)&&0!==t.byteStride?t.byteStride:getAccessorByteStride(e,t)}function requireByteLength(e){ForEach.buffer(e,(function(e){defined(e.byteLength)||(e.byteLength=e.extras._pipeline.source.length)})),ForEach.accessor(e,(function(t){var i,r=t.bufferView;defined(r)&&(i=e.bufferViews[r],r=computeAccessorByteStride(e,t),r=t.byteOffset+t.count*r,i.byteLength=Math.max(defaultValue(i.byteLength,0),r))}))}function moveByteStrideToBufferView(e){var t,i=e.bufferViews,r={};ForEach.accessorContainingVertexAttributeData(e,(function(t){defined((t=e.accessors[t]).bufferView)&&(r[t.bufferView]=!0)}));var n,a={};for(n in ForEach.accessor(e,(function(e){defined(e.bufferView)&&(a[e.bufferView]=defaultValue(a[e.bufferView],[]),a[e.bufferView].push(e))})),a)if(Object.prototype.hasOwnProperty.call(a,n)){t=i[n];var o=a[n];o.sort((function(e,t){return e.byteOffset-t.byteOffset}));for(var s=0,l=0,c=o.length,u=0;u<c;++u){var d=o[u],h=computeAccessorByteStride(e,d),p=d.byteOffset,f=d.count*h;delete d.byteStride;var m=u<c-1;if(h!==(m?computeAccessorByteStride(e,o[u+1]):void 0)){var g=clone(t,!0);r[n]&&(g.byteStride=h),g.byteOffset+=s,g.byteLength=p+f-s;for(var y=addToArray(i,g),_=l;_<=u;++_)(d=o[_]).bufferView=y,d.byteOffset=d.byteOffset-s;s=m?o[u+1].byteOffset:void 0,l=u+1}}}removeUnusedElements(e,["accessor","bufferView","buffer"])}function requirePositionAccessorMinMax(e){ForEach.accessorWithSemantic(e,"POSITION",(function(t){var i=e.accessors[t];defined(i.min)&&defined(i.max)||(t=findAccessorMinMax(e,i),i.min=t.min,i.max=t.max)}))}function isNodeEmpty(e){return(!defined(e.children)||0===e.children.length)&&(!defined(e.meshes)||0===e.meshes.length)&&!defined(e.camera)&&!defined(e.skin)&&!defined(e.skeletons)&&!defined(e.jointName)&&(!defined(e.translation)||Cartesian3.fromArray(e.translation).equals(Cartesian3.ZERO))&&(!defined(e.scale)||Cartesian3.fromArray(e.scale).equals(new Cartesian3(1,1,1)))&&(!defined(e.rotation)||Cartesian4.fromArray(e.rotation).equals(new Cartesian4(0,0,0,1)))&&(!defined(e.matrix)||Matrix4.fromColumnMajorArray(e.matrix).equals(Matrix4.IDENTITY))&&!defined(e.extensions)&&!defined(e.extras)}function deleteNode(e,t){ForEach.scene(e,(function(e){var i=e.nodes;if(defined(i))for(var r=i.length;0<=r;--r)if(i[r]===t)return void i.splice(r,1)})),ForEach.node(e,(function(i,r){var n;!defined(i.children)||-1<(n=i.children.indexOf(t))&&(i.children.splice(n,1),isNodeEmpty(i)&&deleteNode(e,r))})),delete e.nodes[t]}function removeEmptyNodes(e){return ForEach.node(e,(function(t,i){isNodeEmpty(t)&&deleteNode(e,i)})),e}function requireAnimationAccessorMinMax(e){ForEach.animation(e,(function(t){ForEach.animationSampler(t,(function(t){var i=e.accessors[t.input];defined(i.min)&&defined(i.max)||(t=findAccessorMinMax(e,i),i.min=t.min,i.max=t.max)}))}))}function glTF10to20(e){e.asset=defaultValue(e.asset,{}),e.asset.version="2.0",updateInstanceTechniques(e),removeAnimationSamplersIndirection(e),removeEmptyNodes(e),objectsToArrays(e),removeAnimationSamplerNames(e),stripAsset(e),requireKnownExtensions(e),requireByteLength(e),moveByteStrideToBufferView(e),requirePositionAccessorMinMax(e),requireAnimationAccessorMinMax(e),removeBufferType(e),removeTextureProperties(e),requireAttributeSetIndex(e),underscoreApplicationSpecificSemantics(e),updateAccessorComponentTypes(e),clampCameraParameters(e),moveTechniqueRenderStates(e),moveTechniquesToExtension(e),removeEmptyArrays(e)}function ModelLoadResources(){this.initialized=!1,this.resourcesParsed=!1,this.vertexBuffersToCreate=new Queue,this.indexBuffersToCreate=new Queue,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new Queue,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new Queue,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new Queue,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.createdBufferViews={},this.primitivesToDecode=new Queue,this.activeDecodingTasks=0,this.pendingDecodingCache=!1,this.skinnedNodesIds=[]}function getSubarray(e,t,i){return e.subarray(t,t+i)}ModelLoadResources.prototype.getBuffer=function(e){return getSubarray(this.buffers[e.buffer],e.byteOffset,e.byteLength)},ModelLoadResources.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},ModelLoadResources.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length},ModelLoadResources.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},ModelLoadResources.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},ModelLoadResources.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return this.finishedDecoding()&&e&&t},ModelLoadResources.prototype.finishedDecoding=function(){return 0===this.primitivesToDecode.length&&0===this.activeDecodingTasks&&!this.pendingDecodingCache},ModelLoadResources.prototype.finished=function(){return this.finishedDecoding()&&this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()};var ModelUtility={updateForwardAxis:function(e){var t=e.gltf.extras.sourceVersion;(defined(t)&&"2.0"!==t||"2.0"!==ModelUtility.getAssetVersion(e.gltf))&&(e._gltfForwardAxis=Axis$1.X)},getAssetVersion:function(e){return defined(e.asset)&&defined(e.asset.version)?e.asset.version:"1.0"},splitIncompatibleMaterials:function(e){var t=e.accessors,i=e.materials,r={};return ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){var n,a=e.material,o=i[a];defined(f=e.attributes.JOINTS_0)&&(n=(p=t[f]).componentType,m=p.type);var s=defined(f)&&"VEC4"===m,l=defined(e.attributes.COLOR_0),c=defined(e.targets),u=defined(e.attributes.NORMAL),d=defined(e.attributes.TANGENT),h=defined(e.attributes.TEXCOORD_0),p=h&&defined(e.attributes.TEXCOORD_1),f=defined(e.extensions)&&defined(e.extensions.CESIUM_primitive_outline),m=r[a];defined(m)?m.skinning.skinned===s&&m.hasVertexColors===l&&m.hasMorphTargets===c&&m.hasNormals===u&&m.hasTangents===d&&m.hasTexCoords===h&&m.hasTexCoord1===p&&m.hasOutline===f||(o=clone(o,!0),a=addToArray(i,o),e.material=a,r[a]={skinning:{skinned:s,componentType:n},hasVertexColors:l,hasMorphTargets:c,hasNormals:u,hasTangents:d,hasTexCoords:h,hasTexCoord1:p,hasOutline:f}):r[a]={skinning:{skinned:s,componentType:n},hasVertexColors:l,hasMorphTargets:c,hasNormals:u,hasTangents:d,hasTexCoords:h,hasTexCoord1:p,hasOutline:f}}))})),r},getShaderVariable:function(e){return"SCALAR"===e?"float":e.toLowerCase()},ModelState:{NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},getFailedLoadFunction:function(e,t,i){return function(r){e._state=ModelUtility.ModelState.FAILED;var n="Failed to load "+t+": "+i;defined(r)&&(n+="\n"+r.message),e._readyPromise.reject(new RuntimeError(n))}},parseBuffers:function(e,t){var i=e._loadResources;ForEach.buffer(e.gltf,(function(r,n){defined(r.extras._pipeline.source)?i.buffers[n]=r.extras._pipeline.source:defined(t)&&(r=e._resource.getDerivedResource({url:r.uri}),++i.pendingBufferLoads,r.fetchArrayBuffer().then(t(e,n)).otherwise(ModelUtility.getFailedLoadFunction(e,"buffer",r.url)))}))}},aMinScratch=new Cartesian3,aMaxScratch=new Cartesian3;function techniqueAttributeForSemantic(e,t){return ForEach.techniqueAttribute(e,(function(e,i){if(e.semantic===t)return i}))}function ensureSemanticExistenceForPrimitive(e,t){var i,r=e.accessors,n=e.materials,a=(o=e.extensions.KHR_techniques_webgl).techniques,o=(e=o.programs,o.shaders),s=t.targets,l=t.attributes;for(i in s)if(s.hasOwnProperty(i)){var c,u=s[i];for(c in u)"extras"!==c&&(l[c+"_"+i]=u[c])}var d,h,p,f,m,g=a[n[t.material].extensions.KHR_techniques_webgl.technique],y=o[e[g.program].vertexShader];for(d in l)l.hasOwnProperty(d)&&(defined(techniqueAttributeForSemantic(g,d))||(h=r[l[d]],"_"===(m=d.toLowerCase()).charAt(0)&&(m=m.slice(1)),p="a_"+m,g.attributes[p]={semantic:d,type:h.componentType},m=(f=y.extras._pipeline).source,m="attribute "+ModelUtility.getShaderVariable(h.type)+" "+p+";\n"+m,f.source=m))}function getTechniqueAttributeOrUniformFunction(e,t,i,r){return hasExtension(e,"KHR_techniques_webgl")?function(e,t){if(!(e.semantic!==i||r&&defined(e.node)))return t}:function(e,n){if(!((e=t.parameters[e]).semantic!==i||r&&defined(e.node)))return n}}ModelUtility.computeBoundingSphere=function(e){for(var t=e.gltf,i=t.nodes,r=t.meshes,n=t.scenes[t.scene].nodes,a=n.length,o=[],s=new Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),c=0;c<a;++c){var u=i[n[c]];for(u._transformToRoot=ModelUtility.getTransform(u),o.push(u);0<o.length;){var d=(u=o.pop())._transformToRoot,h=u.mesh;if(defined(h))for(var p=r[h].primitives,f=p.length,m=0;m<f;++m){var g,y=p[m].attributes.POSITION;!defined(y)||defined((g=ModelUtility.getAccessorMinMax(t,y)).min)&&defined(g.max)&&(y=Cartesian3.fromArray(g.min,0,aMinScratch),g=Cartesian3.fromArray(g.max,0,aMaxScratch),Matrix4.multiplyByPoint(d,y,y),Matrix4.multiplyByPoint(d,g,g),Cartesian3.minimumByComponent(s,y,s),Cartesian3.maximumByComponent(l,g,l))}var _=u.children;if(defined(_))for(var v=_.length,C=0;C<v;++C){var x=i[_[C]];x._transformToRoot=ModelUtility.getTransform(x),Matrix4.multiplyTransformation(d,x._transformToRoot,x._transformToRoot),o.push(x)}delete u._transformToRoot}}var b=BoundingSphere.fromCornerPoints(s,l);return e._forwardAxis===Axis$1.Z&&BoundingSphere.transformWithoutScale(b,Axis$1.Z_UP_TO_X_UP,b),e._upAxis===Axis$1.Y?BoundingSphere.transformWithoutScale(b,Axis$1.Y_UP_TO_Z_UP,b):e._upAxis===Axis$1.X&&BoundingSphere.transformWithoutScale(b,Axis$1.X_UP_TO_Z_UP,b),b},ModelUtility.ensureSemanticExistence=function(e){return ForEach.mesh(e,(function(t){ForEach.meshPrimitive(t,(function(t){ensureSemanticExistenceForPrimitive(e,t)}))})),e},ModelUtility.createAttributeLocations=function(e,t){var i={},r=!1,n=1;if(ForEach.techniqueAttribute(e,(function(e,t){/pos/i.test(t)&&!r?(i[t]=0,r=!0):i[t]=n++})),defined(t))for(var a in t)t.hasOwnProperty(a)&&(i[a]=n++);return i},ModelUtility.getAccessorMinMax=function(e,t){e=(i=e.accessors[t]).extensions,t=i.min;var i=i.max;return!defined(e)||defined(e=e.WEB3D_quantized_attributes)&&(t=e.decodedMin,i=e.decodedMax),{min:t,max:i}},ModelUtility.getAttributeOrUniformBySemantic=function(e,t,i,r){return ForEach.technique(e,(function(n){if(!defined(i)||n.program===i){var a=ForEach.techniqueAttribute(n,getTechniqueAttributeOrUniformFunction(e,n,t,r));return defined(a)?a:ForEach.techniqueUniform(n,getTechniqueAttributeOrUniformFunction(e,n,t,r))}}))},ModelUtility.getDiffuseAttributeOrUniform=function(e,t){var i=ModelUtility.getAttributeOrUniformBySemantic(e,"COLOR_0",t);return defined(i)||(i=ModelUtility.getAttributeOrUniformBySemantic(e,"_3DTILESDIFFUSE",t)),i};var nodeTranslationScratch=new Cartesian3,nodeQuaternionScratch=new Quaternion,nodeScaleScratch=new Cartesian3;function replaceAllButFirstInString(e,t,i){t+="(?!\\w)",t=new RegExp(t,"g");var r=e.search(t);return e.replace(t,(function(e,t){return r===t?e:i}))}function getQuantizedAttributes(e,t){if(defined(t=e.accessors[t].extensions))return t.WEB3D_quantized_attributes}function getAttributeVariableName(e,t,i){if(t=t.material,t=e.materials[t],hasExtension(e,"KHR_techniques_webgl")&&defined(t.extensions)&&defined(t.extensions.KHR_techniques_webgl))return t=t.extensions.KHR_techniques_webgl.technique,t=e.extensions.KHR_techniques_webgl.techniques[t],ForEach.techniqueAttribute(t,(function(e,t){if(e.semantic===i)return t}))}function getScalarUniformFunction(e){var t={value:e,clone:function(e,t){return e},func:function(){return t.value}};return t}function getVec2UniformFunction(e){var t={value:Cartesian2.fromArray(e),clone:Cartesian2.clone,func:function(){return t.value}};return t}function getVec3UniformFunction(e){var t={value:Cartesian3.fromArray(e),clone:Cartesian3.clone,func:function(){return t.value}};return t}function getVec4UniformFunction(e){var t={value:Cartesian4.fromArray(e),clone:Cartesian4.clone,func:function(){return t.value}};return t}function getMat2UniformFunction(e){var t={value:Matrix2.fromColumnMajorArray(e),clone:Matrix2.clone,func:function(){return t.value}};return t}function getMat3UniformFunction(e){var t={value:Matrix3.fromColumnMajorArray(e),clone:Matrix3.clone,func:function(){return t.value}};return t}function getMat4UniformFunction(e){var t={value:Matrix4.fromColumnMajorArray(e),clone:Matrix4.clone,func:function(){return t.value}};return t}function DelayLoadedTextureUniform(e,t,i){this._value=void 0,this._textureId=e.index,this._textures=t,this._defaultTexture=i}function getTextureUniformFunction(e,t,i){var r=new DelayLoadedTextureUniform(e,t,i);return r.func=function(){return r.value},r}ModelUtility.getTransform=function(e,t){return defined(e.matrix)?Matrix4.fromColumnMajorArray(e.matrix,t):Matrix4.fromTranslationQuaternionRotationScale(Cartesian3.fromArray(e.translation,0,nodeTranslationScratch),Quaternion.unpack(e.rotation,0,nodeQuaternionScratch),Cartesian3.fromArray(e.scale,0,nodeScaleScratch),t)},ModelUtility.getUsedExtensions=function(e){var t=e.extensionsUsed,i={};if(defined(t))for(var r=t.length,n=0;n<r;n++)i[t[n]]=!0;return i},ModelUtility.getRequiredExtensions=function(e){var t=e.extensionsRequired,i={};if(defined(t))for(var r=t.length,n=0;n<r;n++)i[t[n]]=!0;return i},ModelUtility.supportedExtensions={AGI_articulations:!0,CESIUM_RTC:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_binary_glTF:!0,KHR_draco_mesh_compression:!0,KHR_materials_common:!0,KHR_techniques_webgl:!0,KHR_materials_unlit:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0},ModelUtility.checkSupportedExtensions=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){if(!ModelUtility.supportedExtensions[i])throw new RuntimeError("Unsupported glTF Extension: "+i);if("EXT_texture_webp"===i&&!1===t)throw new RuntimeError("Loaded model requires WebP but browser does not support it.")}},ModelUtility.checkSupportedGlExtensions=function(e,t){if(defined(e))for(var i=e.length,r=0;r<i;r++){var n=e[r];if("OES_element_index_uint"!==n)throw new RuntimeError("Unsupported WebGL Extension: "+n);if(!t.elementIndexUint)throw new RuntimeError("OES_element_index_uint WebGL extension is not enabled.")}},ModelUtility.modifyShaderForDracoQuantizedAttributes=function(e,t,i,r){var n,a,o,s,l,c,u,d,h,p,f={};for(n in r)!r.hasOwnProperty(n)||defined(a=(u=r[n]).quantization)&&(o=getAttributeVariableName(e,t,n),"_"===n.charAt(0)&&(n=n.substring(1)),defined(f[h="gltf_u_dec_"+n.toLowerCase()])||(s="gltf_decoded_"+n,l=o.replace("a_","gltf_a_dec_"),p=u.componentsPerAttribute,i=replaceAllButFirstInString(i,o,l),i=(c=a.octEncoded?"vec3":1<p?"vec"+p:"float")+" "+l+";\n"+i,(u=3===p&&"COLOR_0"===n)&&(i=replaceAllButFirstInString(i,l,"vec4("+l+", 1.0)")),p="",p=a.octEncoded?(i="uniform float "+(d=h+"_rangeConstant")+";\n"+i,"\nvoid main() {\n    "+l+" = czm_octDecode("+o+".xy, "+d+").zxy;\n    "+s+"();\n}\n"):(i="uniform float "+(d=h+"_normConstant")+";\nuniform "+c+" "+(h+="_min")+";\n"+i,"\nvoid main() {\n    "+l+" = "+h+" + "+o+(u?".xyz":"")+" * "+d+";\n    "+s+"();\n}\n"),i=ShaderSource.replaceMain(i,s),i+=p));return{shader:i}},ModelUtility.modifyShaderForQuantizedAttributes=function(e,t,i){var r,n,a,o,s,l,c,u,d,h,p={},f=t.attributes;for(r in f)f.hasOwnProperty(r)&&(n=getAttributeVariableName(e,t,r),u=t.attributes[r],"_"===r.charAt(0)&&(r=r.substring(1)),o=(a="gltf_u_dec_"+r.toLowerCase())+"_scale",s=a+"_translate",defined(p[a])||defined(p[o])||defined(d=getQuantizedAttributes(e,u))&&(h=d.decodeMatrix,l="gltf_decoded_"+r,c=n.replace("a_","gltf_a_dec_"),i=(d=2<(u=Math.floor(Math.sqrt(h.length)))?"vec"+(u-1):"float")+" "+c+";\n"+(i=replaceAllButFirstInString(i,n,c)),h="",5===u?(i="uniform vec4 "+s+";\n"+(i="uniform mat4 "+o+";\n"+i),h="\nvoid main() {\n    "+c+" = "+o+" * "+n+" + "+s+";\n    "+l+"();\n}\n",p[o]={mat:4},p[s]={vec:4}):(i="uniform mat"+u+" "+a+";\n"+i,h="\nvoid main() {\n    "+c+" = "+d+"("+a+" * vec"+u+"("+n+",1.0));\n    "+l+"();\n}\n",p[a]={mat:u}),i=ShaderSource.replaceMain(i,l),i+=h));return{shader:i,uniforms:p}},Object.defineProperties(DelayLoadedTextureUniform.prototype,{value:{get:function(){if(!defined(this._value)){var e=this._textures[this._textureId];if(!defined(e))return this._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),DelayLoadedTextureUniform.prototype.clone=function(e){return e},DelayLoadedTextureUniform.prototype.func=void 0;var gltfUniformFunctions={};function scaleFromMatrix5Array(e){return[e[0],e[1],e[2],e[3],e[5],e[6],e[7],e[8],e[10],e[11],e[12],e[13],e[15],e[16],e[17],e[18]]}function translateFromMatrix5Array(e){return[e[20],e[21],e[22],e[23]]}gltfUniformFunctions[WebGLConstants$1.FLOAT]=getScalarUniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_VEC2]=getVec2UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_VEC3]=getVec3UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_VEC4]=getVec4UniformFunction,gltfUniformFunctions[WebGLConstants$1.INT]=getScalarUniformFunction,gltfUniformFunctions[WebGLConstants$1.INT_VEC2]=getVec2UniformFunction,gltfUniformFunctions[WebGLConstants$1.INT_VEC3]=getVec3UniformFunction,gltfUniformFunctions[WebGLConstants$1.INT_VEC4]=getVec4UniformFunction,gltfUniformFunctions[WebGLConstants$1.BOOL]=getScalarUniformFunction,gltfUniformFunctions[WebGLConstants$1.BOOL_VEC2]=getVec2UniformFunction,gltfUniformFunctions[WebGLConstants$1.BOOL_VEC3]=getVec3UniformFunction,gltfUniformFunctions[WebGLConstants$1.BOOL_VEC4]=getVec4UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_MAT2]=getMat2UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_MAT3]=getMat3UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_MAT4]=getMat4UniformFunction,gltfUniformFunctions[WebGLConstants$1.SAMPLER_2D]=getTextureUniformFunction,ModelUtility.createUniformFunction=function(e,t,i,r){return gltfUniformFunctions[e](t,i,r)},ModelUtility.createUniformsForDracoQuantizedAttributes=function(e){var t,i={};for(t in e)if(e.hasOwnProperty(t)){var r=e[t],n=r.quantization;if(defined(n)){"_"===t.charAt(0)&&(t=t.substring(1));var a="gltf_u_dec_"+t.toLowerCase();if(n.octEncoded){var o=a+"_rangeConstant",s=(1<<n.quantizationBits)-1;i[o]=getScalarUniformFunction(s).func}else switch(o=a+"_normConstant",s=n.range/(1<<n.quantizationBits),i[o]=getScalarUniformFunction(s).func,a+="_min",r.componentsPerAttribute){case 1:i[a]=getScalarUniformFunction(n.minValues).func;break;case 2:i[a]=getVec2UniformFunction(n.minValues).func;break;case 3:i[a]=getVec3UniformFunction(n.minValues).func;break;case 4:i[a]=getVec4UniformFunction(n.minValues).func}}}return i},ModelUtility.createUniformsForQuantizedAttributes=function(e,t,i){var r,n,a,o=e.accessors,s={},l={},c=t.attributes;for(r in c)if(c.hasOwnProperty(r)){var u=o[c[r]],d=u.extensions;if("_"===r.charAt(0)&&(r=r.substring(1)),defined(d)){var h=d.WEB3D_quantized_attributes;if(defined(h))switch(d=h.decodeMatrix,h="gltf_u_dec_"+r.toLowerCase(),u.type){case AttributeType$1.SCALAR:l[h]=getMat2UniformFunction(d).func,s[h]=!0;break;case AttributeType$1.VEC2:l[h]=getMat3UniformFunction(d).func,s[h]=!0;break;case AttributeType$1.VEC3:l[h]=getMat4UniformFunction(d).func,s[h]=!0;break;case AttributeType$1.VEC4:u=h+"_scale",h+="_translate",l[u]=getMat4UniformFunction(scaleFromMatrix5Array(d)).func,l[h]=getVec4UniformFunction(translateFromMatrix5Array(d)).func,s[u]=!0,s[h]=!0}}}for(n in i)i.hasOwnProperty(n)&&(s[n]||(defined((a=i[n]).mat)&&(2===a.mat?l[n]=getMat2UniformFunction(Matrix2.IDENTITY).func:3===a.mat?l[n]=getMat3UniformFunction(Matrix3.IDENTITY).func:4===a.mat&&(l[n]=getMat4UniformFunction(Matrix4.IDENTITY).func)),defined(a.vec)&&4===a.vec&&(l[n]=getVec4UniformFunction([0,0,0,0]).func)));return l};var scratchTranslationRtc=new Cartesian3,gltfSemanticUniforms={MODEL:function(e,t){return function(){return e.model}},VIEW:function(e,t){return function(){return e.view}},PROJECTION:function(e,t){return function(){return e.projection}},MODELVIEW:function(e,t){return function(){return e.modelView}},CESIUM_RTC_MODELVIEW:function(e,t){var i=new Matrix4;return function(){return defined(t._rtcCenter)?(Matrix4.getTranslation(e.model,scratchTranslationRtc),Cartesian3.add(scratchTranslationRtc,t._rtcCenter,scratchTranslationRtc),Matrix4.multiplyByPoint(e.view,scratchTranslationRtc,scratchTranslationRtc),Matrix4.setTranslation(e.modelView,scratchTranslationRtc,i)):e.modelView}},MODELVIEWPROJECTION:function(e,t){return function(){return e.modelViewProjection}},MODELINVERSE:function(e,t){return function(){return e.inverseModel}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t){return function(){return e.inverseModelView}},MODELVIEWPROJECTIONINVERSE:function(e,t){return function(){return e.inverseModelViewProjection}},MODELINVERSETRANSPOSE:function(e,t){return function(){return e.inverseTransposeModel}},MODELVIEWINVERSETRANSPOSE:function(e,t){return function(){return e.normal}},VIEWPORT:function(e,t){return function(){return e.viewportCartesian4}}};function processModelMaterialsCommon(e,t){if(t=defaultValue(t,defaultValue.EMPTY_OBJECT),defined(e)&&hasExtension(e,"KHR_materials_common")){hasExtension(e,"KHR_techniques_webgl")||(defined(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl"));var i=e.extensions.KHR_techniques_webgl;lightDefaults(e);var r=generateLightParameters(e),n=ModelUtility.splitIncompatibleMaterials(e),a={},o=!1;return ForEach.material(e,(function(s,l){if(defined(s.extensions)&&defined(s.extensions.KHR_materials_common)){var c=s.extensions.KHR_materials_common,u=n[l],d=getTechniqueKey(c,u);defined(l=a[d])||(l=generateTechnique(e,i,u,c,r,t.addBatchIdToGeneratedShaders),a[d]=l,o=!0);var h,p={},f=c.values;for(h in f)f.hasOwnProperty(h)&&"transparent"!==h&&"doubleSided"!==h&&(p["u_"+h.toLowerCase()]=f[h]);s.extensions.KHR_techniques_webgl={technique:l,values:p},s.alphaMode="OPAQUE",c.transparent&&(s.alphaMode="BLEND"),c.doubleSided&&(s.doubleSided=!0)}})),o?(ModelUtility.ensureSemanticExistence(e),e):e}}function generateLightParameters(e){var t,i={};if(defined(e.extensions)&&defined(e.extensions.KHR_materials_common)&&(t=e.extensions.KHR_materials_common.lights),defined(t)){var r,n,a,o=e.nodes;for(r in o)!o.hasOwnProperty(r)||defined((n=o[r]).extensions)&&defined(n.extensions.KHR_materials_common)&&(defined(a=n.extensions.KHR_materials_common.light)&&defined(t[a])&&(t[a].node=r),delete n.extensions.KHR_materials_common);var s,l=0;for(s in t)if(t.hasOwnProperty(s)){var c=t[s],u=c.type;if("ambient"===u||defined(c.node)){var d="light"+l.toString();switch(c.baseName=d,u){case"ambient":var h=c.ambient;i[d+"Color"]={type:WebGLConstants$1.FLOAT_VEC3,value:h.color};break;case"directional":h=c.directional,i[d+"Color"]={type:WebGLConstants$1.FLOAT_VEC3,value:h.color},defined(c.node)&&(i[d+"Transform"]={node:c.node,semantic:"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4});break;case"point":var p=c.point;i[d+"Color"]={type:WebGLConstants$1.FLOAT_VEC3,value:p.color},defined(c.node)&&(i[d+"Transform"]={node:c.node,semantic:"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4}),i[d+"Attenuation"]={type:WebGLConstants$1.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]};break;case"spot":p=c.spot,i[d+"Color"]={type:WebGLConstants$1.FLOAT_VEC3,value:p.color},defined(c.node)&&(i[d+"Transform"]={node:c.node,semantic:"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4},i[d+"InverseTransform"]={node:c.node,semantic:"MODELVIEWINVERSE",type:WebGLConstants$1.FLOAT_MAT4,useInFragment:!0}),i[d+"Attenuation"]={type:WebGLConstants$1.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]},i[d+"FallOff"]={type:WebGLConstants$1.FLOAT_VEC2,value:[p.fallOffAngle,p.fallOffExponent]}}++l}else delete t[s]}}return i}function generateTechnique(e,t,i,r,n,a){defined(r)||(r={}),a=defaultValue(a,!1);var o,s=t.techniques,l=t.shaders,c=t.programs,u=r.technique.toUpperCase();defined(e.extensions)&&defined(e.extensions.KHR_materials_common)&&(o=e.extensions.KHR_materials_common.lights);var d=r.values,h=defaultValue(r.jointCount,0),p=!1;t=!1;defined(i)&&(p=i.skinning.skinned,t=i.hasVertexColors);var f="precision highp float;\n",m="precision highp float;\n",g="CONSTANT"!==u,y={u_modelViewMatrix:{semantic:hasExtension(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:WebGLConstants$1.FLOAT_MAT4}};g&&(y.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:WebGLConstants$1.FLOAT_MAT3}),p&&(y.u_jointMatrix={count:h,semantic:"JOINTMATRIX",type:WebGLConstants$1.FLOAT_MAT4});var _,v,C,x,b,S=!1;for(_ in d)d.hasOwnProperty(_)&&"transparent"!==_&&"doubleSided"!==_&&(v=getKHRMaterialsCommonValueType(_,d[_]),C="u_"+_.toLowerCase(),S||v!==WebGLConstants$1.SAMPLER_2D||(S=!0),y[C]={type:v});if(defined(y.u_diffuse)&&(y.u_diffuse.semantic="_3DTILESDIFFUSE"),defined(n))for(var T in n)n.hasOwnProperty(T)&&(y[C="u_"+T]=n[T]);for(C in y)y.hasOwnProperty(C)&&(b=defined((x=y[C]).count)?"["+x.count+"]":"",x.type!==WebGLConstants$1.FLOAT_MAT3&&x.type!==WebGLConstants$1.FLOAT_MAT4||x.useInFragment?(m+="uniform "+webGLConstantToGlslType(x.type)+" "+C+b+";\n",delete x.useInFragment):f+="uniform "+webGLConstantToGlslType(x.type)+" "+C+b+";\n");var E="";p&&(E+="    mat4 skinMatrix =\n        a_weight.x * u_jointMatrix[int(a_joint.x)] +\n        a_weight.y * u_jointMatrix[int(a_joint.y)] +\n        a_weight.z * u_jointMatrix[int(a_joint.z)] +\n        a_weight.w * u_jointMatrix[int(a_joint.w)];\n");var w;h={a_position:{semantic:"POSITION"}};f+="attribute vec3 a_position;\n",f+="varying vec3 v_positionEC;\n",E+=p?"  vec4 pos = u_modelViewMatrix * skinMatrix * vec4(a_position,1.0);\n":"  vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n",E+="  v_positionEC = pos.xyz;\n",E+="  gl_Position = u_projectionMatrix * pos;\n",m+="varying vec3 v_positionEC;\n",g&&(h.a_normal={semantic:"NORMAL"},f+="attribute vec3 a_normal;\n",f+="varying vec3 v_normal;\n",E+=p?"  v_normal = u_normalMatrix * mat3(skinMatrix) * a_normal;\n":"  v_normal = u_normalMatrix * a_normal;\n",m+="varying vec3 v_normal;\n"),S&&(h.a_texcoord_0={semantic:"TEXCOORD_0"},f+="attribute vec2 a_texcoord_0;\n",f+="varying vec2 "+(w="v_texcoord_0")+";\n",E+="  "+w+" = a_texcoord_0;\n",m+="varying vec2 "+w+";\n"),p&&(h.a_joint={semantic:"JOINTS_0"},h.a_weight={semantic:"WEIGHTS_0"},f+="attribute vec4 a_joint;\n",f+="attribute vec4 a_weight;\n"),t&&(h.a_vertexColor={semantic:"COLOR_0"},f+="attribute vec4 a_vertexColor;\n",f+="varying vec4 v_vertexColor;\n",E+="  v_vertexColor = a_vertexColor;\n",m+="varying vec4 v_vertexColor;\n"),a&&(h.a_batchId={semantic:"_BATCHID"},f+="attribute float a_batchId;\n");var A,P,D,M,I,R,O=g&&("BLINN"===u||"PHONG"===u)&&defined(y.u_specular)&&defined(y.u_shininess)&&0<y.u_shininess,L=!1,N=!1,F="";for(A in o)o.hasOwnProperty(A)&&(P=(R=o[A]).type.toLowerCase(),F+="  {\n",M="u_"+(D=R.baseName)+"Color","ambient"===P?(N=!0,F+="    ambientLight += "+M+";\n"):g&&(L=!0,I="v_"+D+"Direction",R="v_"+D+"Position","point"!==P&&(f+="varying vec3 "+I+";\n",m+="varying vec3 "+I+";\n",E+="  "+I+" = mat3(u_"+D+"Transform) * vec3(0.,0.,1.);\n","directional"===P&&(F+="    vec3 l = normalize("+I+");\n")),"directional"!==P?(f+="varying vec3 "+R+";\n",m+="varying vec3 "+R+";\n",E+="  "+R+" = u_"+D+"Transform[3].xyz;\n",F+="    vec3 VP = "+R+" - v_positionEC;\n",F+="    vec3 l = normalize(VP);\n",F+="    float range = length(VP);\n",F+="    float attenuation = 1.0 / (u_"+D+"Attenuation.x + ",F+="(u_"+D+"Attenuation.y * range) + ",F+="(u_"+D+"Attenuation.z * range * range));\n"):F+="    float attenuation = 1.0;\n","spot"===P&&(F+="    float spotDot = dot(l, normalize("+I+"));\n",F+="    if (spotDot < cos(u_"+D+"FallOff.x * 0.5))\n",F+="    {\n",F+="      attenuation = 0.0;\n",F+="    }\n",F+="    else\n",F+="    {\n",F+="        attenuation *= max(0.0, pow(spotDot, u_"+D+"FallOff.y));\n",F+="    }\n"),F+="    diffuseLight += "+M+"* max(dot(normal,l), 0.) * attenuation;\n",O&&("BLINN"===u?(F+="    vec3 h = normalize(l + viewDir);\n",F+="    float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(F+="    vec3 reflectDir = reflect(-l, normal);\n",F+="    float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),F+="    specularLight += "+M+" * specularIntensity;\n")),F+="  }\n");return N||(F+="  ambientLight += vec3(0.2, 0.2, 0.2);\n"),L||"CONSTANT"===u||(m+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",m+="uniform vec3 gltf_lightColor; \n",m+="#endif \n",F+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",F+="    vec3 lightColor = czm_lightColor;\n",F+="#else \n",F+="    vec3 lightColor = gltf_lightColor;\n",F+="#endif \n",F+="  vec3 l = normalize(czm_lightDirectionEC);\n",F+="  diffuseLight += lightColor * max(dot(normal,l), 0.2);\n",O&&("BLINN"===u?(F+="  vec3 h = normalize(l + viewDir);\n",F+="  float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(F+="  vec3 reflectDir = reflect(-l, normal);\n",F+="  float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),F+="  specularLight += lightColor * specularIntensity;\n")),f+="void main(void) {\n",f+=E,f+="}\n",m+="void main(void) {\n",a="  vec3 color = vec3(0.0, 0.0, 0.0);\n",g&&(m+="  vec3 normal = normalize(v_normal);\n",r.doubleSided&&(m+="  if (czm_backFacing())\n",m+="  {\n",m+="    normal = -normal;\n",m+="  }\n")),r="CONSTANT"!==u?(defined(y.u_diffuse)&&(y.u_diffuse.type===WebGLConstants$1.SAMPLER_2D?m+="  vec4 diffuse = texture2D(u_diffuse, "+w+");\n":m+="  vec4 diffuse = u_diffuse;\n",m+="  vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",a+="  color += diffuse.rgb * diffuseLight;\n"),O&&(y.u_specular.type===WebGLConstants$1.SAMPLER_2D?m+="  vec3 specular = texture2D(u_specular, "+w+").rgb;\n":m+="  vec3 specular = u_specular.rgb;\n",m+="  vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",a+="  color += specular * specularLight;\n"),defined(y.u_transparency)?"  gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency);\n":"  gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):defined(y.u_transparency)?"  gl_FragColor = vec4(color * u_transparency, u_transparency);\n":"  gl_FragColor = vec4(color, 1.0);\n",t&&(a+="  color *= v_vertexColor.rgb;\n"),defined(y.u_emission)&&(y.u_emission.type===WebGLConstants$1.SAMPLER_2D?m+="  vec3 emission = texture2D(u_emission, "+w+").rgb;\n":m+="  vec3 emission = u_emission.rgb;\n",a+="  color += emission;\n"),!defined(y.u_ambient)&&"CONSTANT"===u||(defined(y.u_ambient)?y.u_ambient.type===WebGLConstants$1.SAMPLER_2D?m+="  vec3 ambient = texture2D(u_ambient, "+w+").rgb;\n":m+="  vec3 ambient = u_ambient.rgb;\n":m+="  vec3 ambient = diffuse.rgb;\n",a+="  color += ambient * ambientLight;\n"),m+="  vec3 viewDir = -normalize(v_positionEC);\n",m+="  vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",m+=F,m+=a,m+=r,m+="}\n",r=addToArray(l,{type:WebGLConstants$1.VERTEX_SHADER,extras:{_pipeline:{source:f,extension:".glsl"}}}),l=addToArray(l,{type:WebGLConstants$1.FRAGMENT_SHADER,extras:{_pipeline:{source:m,extension:".glsl"}}}),r=addToArray(c,{fragmentShader:l,vertexShader:r}),addToArray(s,{attributes:h,program:r,uniforms:y})}function getKHRMaterialsCommonValueType(e,t){switch(t=defined(t.value)?t.value:defined(t.index)?[t.index]:t,e){case"ambient":case"diffuse":case"emission":case"specular":return 1===t.length?WebGLConstants$1.SAMPLER_2D:WebGLConstants$1.FLOAT_VEC4;case"shininess":case"transparency":return WebGLConstants$1.FLOAT;case"transparent":case"doubleSided":return WebGLConstants$1.BOOL}}function getTechniqueKey(e,t){var i="";i+="technique:"+e.technique+";";for(var r=e.values,n=Object.keys(r).sort(),a=n.length,o=0;o<a;++o){var s=n[o];r.hasOwnProperty(s)&&(i+=s+":"+getKHRMaterialsCommonValueType(s,r[s]),i+=";")}var l=defaultValue(e.jointCount,0);return i+=l.toString()+";",defined(t)&&(e=t.skinning,0<l&&(i+=e.type+";"),i+=t.hasVertexColors),i}function lightDefaults(e){if(defined(e=e.extensions.KHR_materials_common)&&defined(e.lights))for(var t=e.lights,i=t.length,r=0;r<i;r++){var n,a,o=t[r];"ambient"===o.type?(defined(o.ambient)||(o.ambient={}),defined((n=o.ambient).color)||(n.color=[1,1,1])):"directional"===o.type?(defined(o.directional)||(o.directional={}),defined((a=o.directional).color)||(a.color=[1,1,1])):"point"===o.type?(defined(o.point)||(o.point={}),defined((a=o.point).color)||(a.color=[1,1,1]),a.constantAttenuation=defaultValue(a.constantAttenuation,1),a.linearAttenuation=defaultValue(a.linearAttenuation,0),a.quadraticAttenuation=defaultValue(a.quadraticAttenuation,0)):"spot"===o.type&&(defined(o.spot)||(o.spot={}),defined((o=o.spot).color)||(o.color=[1,1,1]),o.constantAttenuation=defaultValue(o.constantAttenuation,1),o.fallOffAngle=defaultValue(o.fallOffAngle,3.14159265),o.fallOffExponent=defaultValue(o.fallOffExponent,0),o.linearAttenuation=defaultValue(o.linearAttenuation,0),o.quadraticAttenuation=defaultValue(o.quadraticAttenuation,0))}}function processPbrMaterials(e,t){if(t=defaultValue(t,defaultValue.EMPTY_OBJECT),hasExtension(e,"KHR_techniques_webgl"))return e;if(!defined(e.materials)||0===e.materials.length)return e;defined(e.extensions)||(e.extensions={}),defined(e.extensionsUsed)||(e.extensionsUsed=[]),defined(e.extensionsRequired)||(e.extensionsRequired=[]),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl");var i=ModelUtility.splitIncompatibleMaterials(e);return ForEach.material(e,(function(r,n){var a={};n=generateTechnique$1(e,r,n,a,i,t);defined(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl={values:a,technique:n}})),ModelUtility.ensureSemanticExistence(e),e}function isSpecularGlossinessMaterial(e){return defined(e.extensions)&&defined(e.extensions.KHR_materials_pbrSpecularGlossiness)}function addTextureCoordinates(e,t,i,r,n){var a,o=i[t];return defined(o)&&defined(o.texCoord)&&1===o.texCoord&&(r=r.replace("0","1")),defined(i[t+"Offset"])?(a=t+"Coord",n.fragmentShaderMain+="    vec2 "+a+" = computeTexCoord("+r+", "+t+"Offset, "+t+"Rotation, "+t+"Scale);\n"):a=r,a}ModelUtility.getGltfSemanticUniforms=function(){return gltfSemanticUniforms};var DEFAULT_TEXTURE_OFFSET=[0,0],DEFAULT_TEXTURE_ROTATION=[0],DEFAULT_TEXTURE_SCALE=[1,1];function handleKHRTextureTransform(e,t,i){var r;-1!==e.indexOf("Texture")&&defined(t.extensions)&&defined(t.extensions.KHR_texture_transform)&&(r="u_"+e,e=t.extensions.KHR_texture_transform,i[r+"Offset"]=defaultValue(e.offset,DEFAULT_TEXTURE_OFFSET),i[r+"Rotation"]=defaultValue(e.rotation,DEFAULT_TEXTURE_ROTATION),i[r+"Scale"]=defaultValue(e.scale,DEFAULT_TEXTURE_SCALE),defined(t.texCoord)&&defined(e.texCoord)&&(i[r].texCoord=e.texCoord))}function generateTechnique$1(e,t,i,r,n,a){var o,s,l,c,u=defaultValue(a.addBatchIdToGeneratedShaders,!1),d=(P=e.extensions.KHR_techniques_webgl).techniques,h=P.shaders,p=P.programs,f=isSpecularGlossinessMaterial(t),m=t.pbrMetallicRoughness;if(defined(m)&&!f)for(s in m)m.hasOwnProperty(s)&&(l=m[s],handleKHRTextureTransform(s,r[o="u_"+s]=l,r));if(f){var g=t.extensions.KHR_materials_pbrSpecularGlossiness;for(s in g)g.hasOwnProperty(s)&&(l=g[s],handleKHRTextureTransform(s,r[o="u_"+s]=l,r))}for(c in t)t.hasOwnProperty(c)&&(0<=c.indexOf("Texture")||0<=c.indexOf("Factor"))&&(l=t[c],handleKHRTextureTransform(c,r[o="u_"+c]=l,r));var y="precision highp float;\n",_="precision highp float;\n";defined(e.skins)&&(D=e.skins[0]);var v,C=defined(D)?D.joints:[],x=C.length,b=n[i],S=!1,T=!1,E=!1,w=!1,A=!1,P=(a=!1,!1),D=!1;n=!1;defined(b)&&(S=b.skinning.skinned&&0<C.length,T=b.hasVertexColors,E=b.hasMorphTargets,w=b.hasNormals,A=b.hasTangents,a=b.hasTexCoords,P=b.hasTexCoord1,D=b.hasOutline),E&&ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){e.material!==i||defined(e=e.targets)&&(v=e)}))}));var M={u_modelViewMatrix:{semantic:hasExtension(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:WebGLConstants$1.FLOAT_MAT4}};for(o in defined(t.extensions)&&defined(t.extensions.KHR_materials_unlit)&&(A=w=!(n=!0)),w&&(M.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:WebGLConstants$1.FLOAT_MAT3}),S&&(M.u_jointMatrix={count:x,semantic:"JOINTMATRIX",type:WebGLConstants$1.FLOAT_MAT4}),E&&(M.u_morphWeights={count:v.length,semantic:"MORPHWEIGHTS",type:WebGLConstants$1.FLOAT}),defined(b=t.alphaMode)&&"MASK"===b&&(M.u_alphaCutoff={semantic:"ALPHACUTOFF",type:WebGLConstants$1.FLOAT}),r)r.hasOwnProperty(o)&&(M[o]={type:getPBRValueType(o)});var I,R;x=defaultValue(M.u_baseColorTexture,M.u_baseColorFactor);for(o in defined(x)&&(x.semantic="_3DTILESDIFFUSE"),M)M.hasOwnProperty(o)&&(R=defined((I=M[o]).count)?"["+I.count+"]":"",I.type!==WebGLConstants$1.FLOAT_MAT3&&I.type!==WebGLConstants$1.FLOAT_MAT4&&"u_morphWeights"!==o||I.useInFragment?(_+="uniform "+webGLConstantToGlslType(I.type)+" "+o+R+";\n",delete I.useInFragment):y+="uniform "+webGLConstantToGlslType(I.type)+" "+o+R+";\n");D&&(_+="uniform sampler2D u_outlineTexture;\n");var O="";S&&(O+="    mat4 skinMatrix =\n        a_weight.x * u_jointMatrix[int(a_joint.x)] +\n        a_weight.y * u_jointMatrix[int(a_joint.y)] +\n        a_weight.z * u_jointMatrix[int(a_joint.z)] +\n        a_weight.w * u_jointMatrix[int(a_joint.w)];\n");var L={a_position:{semantic:"POSITION"}};if(D&&(L.a_outlineCoordinates={semantic:"_OUTLINE_COORDINATES"}),y+="attribute vec3 a_position;\n",w&&(y+="varying vec3 v_positionEC;\n"),D&&(y+="attribute vec3 a_outlineCoordinates;\n",y+="varying vec3 v_outlineCoordinates;\n"),O+="    vec3 weightedPosition = a_position;\n",w&&(O+="    vec3 weightedNormal = a_normal;\n"),A&&(O+="    vec4 weightedTangent = a_tangent;\n"),E)for(var N=0;N<v.length;N++){var F,B,V=v[N];for(F in V)V.hasOwnProperty(F)&&"extras"!==F&&(L[B="a_"+F+"_"+N]={semantic:F+"_"+N},y+="attribute vec3 "+B+";\n","POSITION"===F?O+="    weightedPosition += u_morphWeights["+N+"] * "+B+";\n":"NORMAL"===F?O+="    weightedNormal += u_morphWeights["+N+"] * "+B+";\n":A&&"TANGENT"===F&&(O+="    weightedTangent.xyz += u_morphWeights["+N+"] * "+B+";\n"))}O+=S?"    vec4 position = skinMatrix * vec4(weightedPosition, 1.0);\n":"    vec4 position = vec4(weightedPosition, 1.0);\n",O+="    position = u_modelViewMatrix * position;\n",w&&(O+="    v_positionEC = position.xyz;\n"),O+="    gl_Position = u_projectionMatrix * position;\n",D&&(O+="    v_outlineCoordinates = a_outlineCoordinates;\n"),w&&(L.a_normal={semantic:"NORMAL"},y+="attribute vec3 a_normal;\n",y+="varying vec3 v_normal;\n",O+=S?"    v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n":"    v_normal = u_normalMatrix * weightedNormal;\n",_+="varying vec3 v_normal;\n",_+="varying vec3 v_positionEC;\n"),A&&(L.a_tangent={semantic:"TANGENT"},y+="attribute vec4 a_tangent;\n",y+="varying vec4 v_tangent;\n",O+="    v_tangent.xyz = u_normalMatrix * weightedTangent.xyz;\n",O+="    v_tangent.w = weightedTangent.w;\n",_+="varying vec4 v_tangent;\n"),D&&(_+="varying vec3 v_outlineCoordinates;\n");var k,z,G,U,$,H,W;E="";return a&&(L.a_texcoord_0={semantic:"TEXCOORD_0"},y+="attribute vec2 a_texcoord_0;\n",y+="varying vec2 "+(W="v_texcoord_0")+";\n",O+="    "+W+" = a_texcoord_0;\n",_+="varying vec2 "+W+";\n",P&&(L.a_texcoord_1={semantic:"TEXCOORD_1"},y+="attribute vec2 a_texcoord_1;\n",y+="varying vec2 "+(H=W.replace("0","1"))+";\n",O+="    "+H+" = a_texcoord_1;\n",_+="varying vec2 "+H+";\n"),k=addTextureCoordinates(e,"u_normalTexture",r,W,P={fragmentShaderMain:E}),z=addTextureCoordinates(e,"u_baseColorTexture",r,W,P),G=addTextureCoordinates(e,"u_specularGlossinessTexture",r,W,P),U=addTextureCoordinates(e,"u_diffuseTexture",r,W,P),$=addTextureCoordinates(e,"u_metallicRoughnessTexture",r,W,P),H=addTextureCoordinates(e,"u_occlusionTexture",r,W,P),W=addTextureCoordinates(e,"u_emissiveTexture",r,W,P),E=P.fragmentShaderMain),S&&(L.a_joint={semantic:"JOINTS_0"},L.a_weight={semantic:"WEIGHTS_0"},y+="attribute vec4 a_joint;\n",y+="attribute vec4 a_weight;\n"),T&&(L.a_vertexColor={semantic:"COLOR_0"},y+="attribute vec4 a_vertexColor;\n",y+="varying vec4 v_vertexColor;\n",O+="  v_vertexColor = a_vertexColor;\n",_+="varying vec4 v_vertexColor;\n"),u&&(L.a_batchId={semantic:"_BATCHID"},y+="attribute float a_batchId;\n"),y+="void main(void) \n{\n",y+=O,y+="}\n",w&&(_+="const float M_PI = 3.141592653589793;\n",_+="vec3 lambertianDiffuse(vec3 diffuseColor) \n{\n    return diffuseColor / M_PI;\n}\n\n",_+="vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n    return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\n",_+="vec3 fresnelSchlick(float metalness, float VdotH) \n{\n    return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\n\n",_+="float smithVisibilityG1(float NdotV, float roughness) \n{\n    float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n    return NdotV / (NdotV * (1.0 - k) + k);\n}\n\n",_+="float smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n    return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\n\n",_+="float GGX(float roughness, float NdotH) \n{\n    float roughnessSquared = roughness * roughness;\n    float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n    return roughnessSquared / (M_PI * f * f);\n}\n\n"),_+="vec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n    return pow(srgbIn, vec3(2.2));\n}\n\n",_+="vec4 SRGBtoLINEAR4(vec4 srgbIn) \n{\n    vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n    return vec4(linearOut, srgbIn.a);\n}\n\n",_+="vec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR \n    return czm_acesTonemapping(linearIn);\n#else \n    return linearIn;\n#endif \n}\n\n",_+="vec3 LINEARtoSRGB(vec3 linearIn) \n{\n#ifndef HDR \n    return pow(linearIn, vec3(1.0/2.2));\n#else \n    return linearIn;\n#endif \n}\n\n",_+="vec2 computeTexCoord(vec2 texCoords, vec2 offset, float rotation, vec2 scale) \n{\n    rotation = -rotation; \n    mat3 transform = mat3(\n        cos(rotation) * scale.x, sin(rotation) * scale.x, 0.0, \n       -sin(rotation) * scale.y, cos(rotation) * scale.y, 0.0, \n        offset.x, offset.y, 1.0); \n    vec2 transformedTexCoords = (transform * vec3(fract(texCoords), 1.0)).xy; \n    return transformedTexCoords; \n}\n\n",_+="#ifdef USE_IBL_LIGHTING \n",_+="uniform vec2 gltf_iblFactor; \n",_+="#endif \n",_+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",_+="uniform vec3 gltf_lightColor; \n",_+="#endif \n",_+="void main(void) \n{\n",_+=E,w&&(_+="    vec3 ng = normalize(v_normal);\n",_+="    vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n",defined(r.u_normalTexture)?A?(_+="    vec3 t = normalize(v_tangent.xyz);\n",_+="    vec3 b = normalize(cross(ng, t) * v_tangent.w);\n",_+="    mat3 tbn = mat3(t, b, ng);\n",_+="    vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",_+="    n = normalize(tbn * (2.0 * n - 1.0));\n"):(_="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"+_,_+="#ifdef GL_OES_standard_derivatives\n",_+="    vec3 pos_dx = dFdx(v_positionEC);\n",_+="    vec3 pos_dy = dFdy(v_positionEC);\n",_+="    vec3 tex_dx = dFdx(vec3("+k+",0.0));\n",_+="    vec3 tex_dy = dFdy(vec3("+k+",0.0));\n",_+="    vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n",_+="    t = normalize(t - ng * dot(ng, t));\n",_+="    vec3 b = normalize(cross(ng, t));\n",_+="    mat3 tbn = mat3(t, b, ng);\n",_+="    vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",_+="    n = normalize(tbn * (2.0 * n - 1.0));\n",_+="#else\n",_+="    vec3 n = ng;\n",_+="#endif\n"):_+="    vec3 n = ng;\n",t.doubleSided&&(_+="    if (czm_backFacing())\n",_+="    {\n",_+="        n = -n;\n",_+="    }\n")),defined(r.u_baseColorTexture)?(_+="    vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, "+z+"));\n",defined(r.u_baseColorFactor)&&(_+="    baseColorWithAlpha *= u_baseColorFactor;\n")):defined(r.u_baseColorFactor)?_+="    vec4 baseColorWithAlpha = u_baseColorFactor;\n":_+="    vec4 baseColorWithAlpha = vec4(1.0);\n",T&&(_+="    baseColorWithAlpha *= v_vertexColor;\n"),_+="    vec3 baseColor = baseColorWithAlpha.rgb;\n",w?(f?(defined(r.u_specularGlossinessTexture)?(_+="    vec4 specularGlossiness = SRGBtoLINEAR4(texture2D(u_specularGlossinessTexture, "+G+"));\n",_+="    vec3 specular = specularGlossiness.rgb;\n",_+="    float glossiness = specularGlossiness.a;\n",defined(r.u_specularFactor)&&(_+="    specular *= u_specularFactor;\n"),defined(r.u_glossinessFactor)&&(_+="    glossiness *= u_glossinessFactor;\n")):(defined(r.u_specularFactor)?_+="    vec3 specular = clamp(u_specularFactor, vec3(0.0), vec3(1.0));\n":_+="    vec3 specular = vec3(1.0);\n",defined(r.u_glossinessFactor)?_+="    float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n":_+="    float glossiness = 1.0;\n"),defined(r.u_diffuseTexture)?(_+="    vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+U+"));\n",defined(r.u_diffuseFactor)&&(_+="    diffuse *= u_diffuseFactor;\n")):defined(r.u_diffuseFactor)?_+="    vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n":_+="    vec4 diffuse = vec4(1.0);\n"):defined(r.u_metallicRoughnessTexture)?(_+="    vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, "+$+").rgb;\n",_+="    float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n",_+="    float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n",defined(r.u_metallicFactor)&&(_+="    metalness *= u_metallicFactor;\n"),defined(r.u_roughnessFactor)&&(_+="    roughness *= u_roughnessFactor;\n")):(defined(r.u_metallicFactor)?_+="    float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n":_+="    float metalness = 1.0;\n",defined(r.u_roughnessFactor)?_+="    float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n":_+="    float roughness = 1.0;\n"),_+="    vec3 v = -normalize(v_positionEC);\n",_+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",_+="    vec3 lightColorHdr = czm_lightColorHdr;\n",_+="#else \n",_+="    vec3 lightColorHdr = gltf_lightColor;\n",_+="#endif \n",_+="    vec3 l = normalize(czm_lightDirectionEC);\n",_+="    vec3 h = normalize(v + l);\n",_+="    float NdotL = clamp(dot(n, l), 0.001, 1.0);\n",_+="    float NdotV = abs(dot(n, v)) + 0.001;\n",_+="    float NdotH = clamp(dot(n, h), 0.0, 1.0);\n",_+="    float LdotH = clamp(dot(l, h), 0.0, 1.0);\n",_+="    float VdotH = clamp(dot(v, h), 0.0, 1.0);\n",_+="    vec3 f0 = vec3(0.04);\n",f?(_+="    float roughness = 1.0 - glossiness;\n",_+="    vec3 diffuseColor = diffuse.rgb * (1.0 - max(max(specular.r, specular.g), specular.b));\n",_+="    vec3 specularColor = specular;\n"):(_+="    vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n",_+="    vec3 specularColor = mix(f0, baseColor, metalness);\n"),_+="    float alpha = roughness * roughness;\n",_+="    float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n",_+="    vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n",_+="    vec3 r0 = specularColor.rgb;\n",_+="    vec3 F = fresnelSchlick2(r0, r90, VdotH);\n",_+="    float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n",_+="    float D = GGX(alpha, NdotH);\n",_+="    vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n",_+="    vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n",_+="    vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n",_+="#if defined(USE_IBL_LIGHTING) && !defined(DIFFUSE_IBL) && !defined(SPECULAR_IBL) \n",_+="    vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n",_+="    float vertexRadius = length(positionWC);\n",_+="    float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n",_+="    float reflectionDotNadir = dot(r, normalize(positionWC));\n",_+="    r.x = -r.x;\n",_+="    r = -normalize(czm_temeToPseudoFixed * r);\n",_+="    r.x = -r.x;\n",_+="    float inverseRoughness = 1.04 - roughness;\n",_+="    inverseRoughness *= inverseRoughness;\n",_+="    vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n",_+="    float atmosphereHeight = 0.05;\n",_+="    float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n",_+="    float blendRegionOffset = roughness * -1.0;\n",_+="    float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n",_+="    float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n",_+="    float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n",_+="    float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n",_+="    vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n",_+="    vec3 nadirColor = belowHorizonColor * 0.5;\n",_+="    vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n",_+="    vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n",_+="    vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n",_+="    vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n",_+="    float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n",_+="    float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n",_+="    vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n",_+="    float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n",_+="    vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n",_+="    specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n",_+="    specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n",_+="#ifdef USE_SUN_LUMINANCE \n",_+="    float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n",_+="    float S = acos(LdotZenith);\n",_+="    float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n",_+="    float gamma = acos(NdotL);\n",_+="    float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n",_+="    float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n",_+="    float luminance = gltf_luminanceAtZenith * (numerator / denominator);\n",_+="#endif \n",_+="    vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",_+="    vec3 IBLColor = (diffuseIrradiance * diffuseColor * gltf_iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * gltf_iblFactor.y);\n",_+="    float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n",_+="    vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n",_+="    IBLColor *= lightColor;\n",_+="#ifdef USE_SUN_LUMINANCE \n",_+="    color += IBLColor * luminance;\n",_+="#else \n",_+="    color += IBLColor; \n",_+="#endif \n",_+="#elif defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) \n",_+="    const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0); \n",_+="    vec3 cubeDir = normalize(yUpToZUp * gltf_iblReferenceFrameMatrix * normalize(reflect(-v, n))); \n",_+="#ifdef DIFFUSE_IBL \n",_+="#ifdef CUSTOM_SPHERICAL_HARMONICS \n",_+="    vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, gltf_sphericalHarmonicCoefficients); \n",_+="#else \n",_+="    vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); \n",_+="#endif \n",_+="#else \n",_+="    vec3 diffuseIrradiance = vec3(0.0); \n",_+="#endif \n",_+="#ifdef SPECULAR_IBL \n",_+="    vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",_+="#ifdef CUSTOM_SPECULAR_IBL \n",_+="    vec3 specularIBL = czm_sampleOctahedralProjection(gltf_specularMap, gltf_specularMapSize, cubeDir,  roughness * gltf_maxSpecularLOD, gltf_maxSpecularLOD);\n",_+="#else \n",_+="    vec3 specularIBL = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir,  roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\n",_+="#endif \n",_+="    specularIBL *= F * brdfLut.x + brdfLut.y;\n",_+="#else \n",_+="    vec3 specularIBL = vec3(0.0); \n",_+="#endif \n",_+="    color += diffuseIrradiance * diffuseColor + specularColor * specularIBL;\n",_+="#endif \n"):_+="    vec3 color = baseColor;\n",n||(defined(r.u_occlusionTexture)&&(_+="    color *= texture2D(u_occlusionTexture, "+H+").r;\n"),defined(r.u_emissiveTexture)?(_+="    vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, "+W+").rgb);\n",defined(r.u_emissiveFactor)&&(_+="    emissive *= u_emissiveFactor;\n"),_+="    color += emissive;\n"):defined(r.u_emissiveFactor)&&(_+="    color += u_emissiveFactor;\n")),n||(_+="    color = applyTonemapping(color);\n"),_+="    color = LINEARtoSRGB(color);\n",D&&(_+="    float outlineness = max(\n",_+="        texture2D(u_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r,\n",_+="        max(\n",_+="          texture2D(u_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r,\n",_+="          texture2D(u_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r));\n",_+="    color = mix(color, vec3(0.0, 0.0, 0.0), outlineness);\n"),defined(b)?"MASK"===b?(_+="    if (baseColorWithAlpha.a < u_alphaCutoff) {\n",_+="        discard;\n",_+="    }\n",_+="    gl_FragColor = vec4(color, 1.0);\n"):_+="BLEND"===b?"    gl_FragColor = vec4(color, baseColorWithAlpha.a);\n":"    gl_FragColor = vec4(color, 1.0);\n":_+="    gl_FragColor = vec4(color, 1.0);\n",_+="}\n",b=addToArray(h,{type:WebGLConstants$1.VERTEX_SHADER,extras:{_pipeline:{source:y,extension:".glsl"}}}),h=addToArray(h,{type:WebGLConstants$1.FRAGMENT_SHADER,extras:{_pipeline:{source:_,extension:".glsl"}}}),b=addToArray(p,{fragmentShader:h,vertexShader:b}),addToArray(d,{attributes:L,program:b,uniforms:M})}function getPBRValueType(e){if(-1!==e.indexOf("Offset"))return WebGLConstants$1.FLOAT_VEC2;if(-1!==e.indexOf("Rotation"))return WebGLConstants$1.FLOAT;if(-1!==e.indexOf("Scale"))return WebGLConstants$1.FLOAT_VEC2;if(-1!==e.indexOf("Texture"))return WebGLConstants$1.SAMPLER_2D;switch(e){case"u_baseColorFactor":return WebGLConstants$1.FLOAT_VEC4;case"u_metallicFactor":case"u_roughnessFactor":return WebGLConstants$1.FLOAT;case"u_emissiveFactor":return WebGLConstants$1.FLOAT_VEC3;case"u_diffuseFactor":return WebGLConstants$1.FLOAT_VEC4;case"u_specularFactor":return WebGLConstants$1.FLOAT_VEC3;case"u_glossinessFactor":return WebGLConstants$1.FLOAT}}function Vector3DTileBatch(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var VectorTileVS="attribute vec3 position;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelViewProjection;\nvoid main()\n{\ngl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n",tmp$2={},b2d,e2d,f2d,A2d,B2d,D2d,E2d,F2d;function y2d(e,t){var i=new Error(e+" at character "+t);throw i.index=t,i.description=e,i}function C2d(e){var t,i,r=0;for(i in e)(t=i.length)>r&&e.hasOwnProperty(i)&&(r=t);return r}function H2d(e){return B2d[e]||0}function I2d(e,t,i){return{type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}}function J2d(e){return 48<=e&&e<=57}function K2d(e){return 36===e||95===e||65<=e&&e<=90||97<=e&&e<=122||128<=e&&!B2d[String.fromCharCode(e)]}function M2d(e){for(var t,i=0,r=e.charAt,n=e.charCodeAt,a=function(t){return r.call(e,t)},o=function(t){return n.call(e,t)},s=e.length,l=function(){for(var e=o(i);32===e||9===e;)e=o(++i)},c=function(){var e,t,r=d();return l(),63!==o(i)?r:(i++,(e=c())||y2d("Expected expression",i),l(),58===o(i)?(i++,(t=c())||y2d("Expected expression",i),{type:"ConditionalExpression",test:r,consequent:e,alternate:t}):void y2d("Expected :",i))},u=function(){l();for(var t=e.substr(i,E2d),r=t.length;0<r;){if(B2d.hasOwnProperty(t))return i+=r,t;t=t.substr(0,--r)}return!1},d=function(){var e,t,r,n,a,o,s=h(),l=u();if(!l)return s;for(n={value:l,prec:H2d(l)},(a=h())||y2d("Expected expression after "+l,i),r=[s,n,a];(l=u())&&0!==(t=H2d(l));){for(n={value:l,prec:t};2<r.length&&t<=r[r.length-2].prec;)a=r.pop(),e=I2d(l=r.pop().value,s=r.pop(),a),r.push(e);(e=h())||y2d("Expected expression after "+l,i),r.push(n,e)}for(e=r[o=r.length-1];1<o;)e=I2d(r[o-1].value,r[o-2],e),o-=2;return e},h=function(){var t,r,n;if(l(),J2d(t=o(i))||46===t)return p();if(39===t||34===t)return f();if(K2d(t)||40===t)return y();if(91===t)return v();for(n=(r=e.substr(i,D2d)).length;0<n;){if(A2d.hasOwnProperty(r))return i+=n,{type:"UnaryExpression",operator:r,argument:h(),prefix:!0};r=r.substr(0,--n)}return!1},p=function(){for(var e,t="";J2d(o(i));)t+=a(i++);if(46===o(i))for(t+=a(i++);J2d(o(i));)t+=a(i++);if("e"===(e=a(i))||"E"===e){for(t+=a(i++),"+"!==(e=a(i))&&"-"!==e||(t+=a(i++));J2d(o(i));)t+=a(i++);J2d(o(i-1))||y2d("Expected exponent ("+t+a(i)+")",i)}return K2d(e=o(i))?y2d("Variable names cannot start with a number ("+t+a(i)+")",i):46===e&&y2d("Unexpected period",i),{type:f2d,value:parseFloat(t),raw:t}},f=function(){for(var e,t="",r=a(i++),n=!1;i<s;){if((e=a(i++))===r){n=!0;break}if("\\"===e)switch(e=a(i++)){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+="\\"+e}else t+=e}return n||y2d('Unclosed quote after "'+t+'"',i),{type:f2d,value:t,raw:r+t+r}},m=function(){var t,r=o(i),n=i;for(K2d(r)?i++:y2d("Unexpected "+a(i),i);i<s&&(36===(t=r=o(i))||95===t||65<=t&&t<=90||97<=t&&t<=122||48<=t&&t<=57||128<=t&&!B2d[String.fromCharCode(t)]);)i++;return n=e.slice(n,i),F2d.hasOwnProperty(n)?{type:f2d,value:F2d[n],raw:n}:"this"===n?{type:"ThisExpression"}:{type:"Identifier",name:n}},g=function(e){for(var t,r=[],n=!1;i<s;){if(l(),(t=o(i))===e){n=!0,i++;break}44===t?i++:((t=c())&&"Compound"!==t.type||y2d("Expected comma",i),r.push(t))}return n||y2d("Expected "+String.fromCharCode(e),i),r},y=function(){var e=o(i),t=(40===e?_:m)();for(l(),e=o(i);46===e||91===e||40===e;)i++,46===e?(l(),t={type:e2d,computed:!1,object:t,property:m()}):91===e?(t={type:e2d,computed:!0,object:t,property:c()},l(),93!==(e=o(i))&&y2d("Unclosed [",i),i++):40===e&&(t={type:"CallExpression",arguments:g(41),callee:t}),l(),e=o(i);return t},_=function(){i++;var e=c();if(l(),41===o(i))return i++,e;y2d("Unclosed (",i)},v=function(){return i++,{type:"ArrayExpression",elements:g(93)}},C=[];i<s;)59===(t=o(i))||44===t?i++:(t=c())?C.push(t):i<s&&y2d('Unexpected "'+a(i)+'"',i);return 1===C.length?C[0]:{type:"Compound",body:C}}b2d=tmp$2,e2d="MemberExpression",f2d="Literal",A2d={"-":!0,"!":!0,"~":!0,"+":!0},B2d={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},D2d=C2d(A2d),E2d=C2d(B2d),F2d={true:!0,false:!1,null:null},M2d.version="0.3.1",M2d.toString=function(){return"JavaScript Expression Parser (JSEP) v"+M2d.version},M2d.addUnaryOp=function(e){return D2d=Math.max(e.length,D2d),A2d[e]=!0,this},M2d.addBinaryOp=function(e,t){return E2d=Math.max(e.length,E2d),B2d[e]=t,this},M2d.addLiteral=function(e,t){return F2d[e]=t,this},M2d.removeUnaryOp=function(e){return delete A2d[e],e.length===D2d&&(D2d=C2d(A2d)),this},M2d.removeAllUnaryOps=function(){return A2d={},D2d=0,this},M2d.removeBinaryOp=function(e){return delete B2d[e],e.length===E2d&&(E2d=C2d(B2d)),this},M2d.removeAllBinaryOps=function(){return B2d={},E2d=0,this},M2d.removeLiteral=function(e){return delete F2d[e],this},M2d.removeAllLiterals=function(){return F2d={},this},b2d.jsep=M2d;var jsep=tmp$2.jsep,ExpressionNodeType={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},ExpressionNodeType$1=Object.freeze(ExpressionNodeType);function Expression(e,t){var i;e=replaceVariables(removeBackslashes(e=replaceDefines(this._expression=e,t))),jsep.addBinaryOp("=~",0),jsep.addBinaryOp("!~",0);try{i=jsep(e)}catch(e){throw new RuntimeError(e)}this._runtimeAst=createRuntimeAst(this,i)}Object.defineProperties(Expression.prototype,{expression:{get:function(){return this._expression}}});var scratchStorage={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new Cartesian2],cartesian3Array:[new Cartesian3],cartesian4Array:[new Cartesian4],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);var e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new Cartesian2),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new Cartesian3),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new Cartesian4),this.cartesian4Array[this.cartesian4Index++]}};Expression.prototype.evaluate=function(e,t){return scratchStorage.reset(),e=this._runtimeAst.evaluate(e),t instanceof Color&&e instanceof Cartesian4?Color.fromCartesian4(e,t):e instanceof Cartesian2||e instanceof Cartesian3||e instanceof Cartesian4?e.clone(t):e},Expression.prototype.evaluateColor=function(e,t){return scratchStorage.reset(),e=this._runtimeAst.evaluate(e),Color.fromCartesian4(e,t)},Expression.prototype.getShaderFunction=function(e,t,i,r){return r+" "+e+"() \n{ \n    return "+this.getShaderExpression(t,i)+"; \n} \n"},Expression.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};var unaryOperators=["!","-","+"],binaryOperators=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],variableRegex=/\${(.*?)}/g,backslashRegex=/\\/g,backslashReplacement="@#%",replacementRegex=/@#%/g,scratchColor$2=new Color,unaryFunctions={abs:getEvaluateUnaryComponentwise(Math.abs),sqrt:getEvaluateUnaryComponentwise(Math.sqrt),cos:getEvaluateUnaryComponentwise(Math.cos),sin:getEvaluateUnaryComponentwise(Math.sin),tan:getEvaluateUnaryComponentwise(Math.tan),acos:getEvaluateUnaryComponentwise(Math.acos),asin:getEvaluateUnaryComponentwise(Math.asin),atan:getEvaluateUnaryComponentwise(Math.atan),radians:getEvaluateUnaryComponentwise(CesiumMath.toRadians),degrees:getEvaluateUnaryComponentwise(CesiumMath.toDegrees),sign:getEvaluateUnaryComponentwise(CesiumMath.sign),floor:getEvaluateUnaryComponentwise(Math.floor),ceil:getEvaluateUnaryComponentwise(Math.ceil),round:getEvaluateUnaryComponentwise(Math.round),exp:getEvaluateUnaryComponentwise(Math.exp),exp2:getEvaluateUnaryComponentwise(exp2),log:getEvaluateUnaryComponentwise(Math.log),log2:getEvaluateUnaryComponentwise(log2),fract:getEvaluateUnaryComponentwise(fract),length:length,normalize:normalize},binaryFunctions={atan2:getEvaluateBinaryComponentwise(Math.atan2,!1),pow:getEvaluateBinaryComponentwise(Math.pow,!1),min:getEvaluateBinaryComponentwise(Math.min,!0),max:getEvaluateBinaryComponentwise(Math.max,!0),distance:distance,dot:dot,cross:cross},ternaryFunctions={clamp:getEvaluateTernaryComponentwise(CesiumMath.clamp,!0),mix:getEvaluateTernaryComponentwise(CesiumMath.lerp,!0)};function fract(e){return e-Math.floor(e)}function exp2(e){return Math.pow(2,e)}function log2(e){return CesiumMath.log2(e)}function getEvaluateUnaryComponentwise(e){return function(t,i){if("number"==typeof i)return e(i);if(i instanceof Cartesian2)return Cartesian2.fromElements(e(i.x),e(i.y),scratchStorage.getCartesian2());if(i instanceof Cartesian3)return Cartesian3.fromElements(e(i.x),e(i.y),e(i.z),scratchStorage.getCartesian3());if(i instanceof Cartesian4)return Cartesian4.fromElements(e(i.x),e(i.y),e(i.z),e(i.w),scratchStorage.getCartesian4());throw new RuntimeError('Function "'+t+'" requires a vector or number argument. Argument is '+i+".")}}function getEvaluateBinaryComponentwise(e,t){return function(i,r,n){if(t&&"number"==typeof n){if("number"==typeof r)return e(r,n);if(r instanceof Cartesian2)return Cartesian2.fromElements(e(r.x,n),e(r.y,n),scratchStorage.getCartesian2());if(r instanceof Cartesian3)return Cartesian3.fromElements(e(r.x,n),e(r.y,n),e(r.z,n),scratchStorage.getCartesian3());if(r instanceof Cartesian4)return Cartesian4.fromElements(e(r.x,n),e(r.y,n),e(r.z,n),e(r.w,n),scratchStorage.getCartesian4())}if("number"==typeof r&&"number"==typeof n)return e(r,n);if(r instanceof Cartesian2&&n instanceof Cartesian2)return Cartesian2.fromElements(e(r.x,n.x),e(r.y,n.y),scratchStorage.getCartesian2());if(r instanceof Cartesian3&&n instanceof Cartesian3)return Cartesian3.fromElements(e(r.x,n.x),e(r.y,n.y),e(r.z,n.z),scratchStorage.getCartesian3());if(r instanceof Cartesian4&&n instanceof Cartesian4)return Cartesian4.fromElements(e(r.x,n.x),e(r.y,n.y),e(r.z,n.z),e(r.w,n.w),scratchStorage.getCartesian4());throw new RuntimeError('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+r+" and "+n+".")}}function getEvaluateTernaryComponentwise(e,t){return function(i,r,n,a){if(t&&"number"==typeof a){if("number"==typeof r&&"number"==typeof n)return e(r,n,a);if(r instanceof Cartesian2&&n instanceof Cartesian2)return Cartesian2.fromElements(e(r.x,n.x,a),e(r.y,n.y,a),scratchStorage.getCartesian2());if(r instanceof Cartesian3&&n instanceof Cartesian3)return Cartesian3.fromElements(e(r.x,n.x,a),e(r.y,n.y,a),e(r.z,n.z,a),scratchStorage.getCartesian3());if(r instanceof Cartesian4&&n instanceof Cartesian4)return Cartesian4.fromElements(e(r.x,n.x,a),e(r.y,n.y,a),e(r.z,n.z,a),e(r.w,n.w,a),scratchStorage.getCartesian4())}if("number"==typeof r&&"number"==typeof n&&"number"==typeof a)return e(r,n,a);if(r instanceof Cartesian2&&n instanceof Cartesian2&&a instanceof Cartesian2)return Cartesian2.fromElements(e(r.x,n.x,a.x),e(r.y,n.y,a.y),scratchStorage.getCartesian2());if(r instanceof Cartesian3&&n instanceof Cartesian3&&a instanceof Cartesian3)return Cartesian3.fromElements(e(r.x,n.x,a.x),e(r.y,n.y,a.y),e(r.z,n.z,a.z),scratchStorage.getCartesian3());if(r instanceof Cartesian4&&n instanceof Cartesian4&&a instanceof Cartesian4)return Cartesian4.fromElements(e(r.x,n.x,a.x),e(r.y,n.y,a.y),e(r.z,n.z,a.z),e(r.w,n.w,a.w),scratchStorage.getCartesian4());throw new RuntimeError('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+r+", "+n+", and "+a+".")}}function length(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof Cartesian2)return Cartesian2.magnitude(t);if(t instanceof Cartesian3)return Cartesian3.magnitude(t);if(t instanceof Cartesian4)return Cartesian4.magnitude(t);throw new RuntimeError('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function normalize(e,t){if("number"==typeof t)return 1;if(t instanceof Cartesian2)return Cartesian2.normalize(t,scratchStorage.getCartesian2());if(t instanceof Cartesian3)return Cartesian3.normalize(t,scratchStorage.getCartesian3());if(t instanceof Cartesian4)return Cartesian4.normalize(t,scratchStorage.getCartesian4());throw new RuntimeError('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function distance(e,t,i){if("number"==typeof t&&"number"==typeof i)return Math.abs(t-i);if(t instanceof Cartesian2&&i instanceof Cartesian2)return Cartesian2.distance(t,i);if(t instanceof Cartesian3&&i instanceof Cartesian3)return Cartesian3.distance(t,i);if(t instanceof Cartesian4&&i instanceof Cartesian4)return Cartesian4.distance(t,i);throw new RuntimeError('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function dot(e,t,i){if("number"==typeof t&&"number"==typeof i)return t*i;if(t instanceof Cartesian2&&i instanceof Cartesian2)return Cartesian2.dot(t,i);if(t instanceof Cartesian3&&i instanceof Cartesian3)return Cartesian3.dot(t,i);if(t instanceof Cartesian4&&i instanceof Cartesian4)return Cartesian4.dot(t,i);throw new RuntimeError('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function cross(e,t,i){if(t instanceof Cartesian3&&i instanceof Cartesian3)return Cartesian3.cross(t,i,scratchStorage.getCartesian3());throw new RuntimeError('Function "'+e+'" requires vec3 arguments. Arguments are '+t+" and "+i+".")}function Node$2(e,t,i,r,n){this._type=e,this._value=t,this._left=i,this._right=r,this._test=n,this.evaluate=void 0,setEvaluateFunction(this)}function replaceDefines(e,t){if(!defined(t))return e;for(var i in t){var r,n;t.hasOwnProperty(i)&&(r=new RegExp("\\$\\{"+i+"\\}","g"),defined(n="("+t[i]+")")&&(e=e.replace(r,n)))}return e}function removeBackslashes(e){return e.replace(backslashRegex,backslashReplacement)}function replaceBackslashes(e){return e.replace(replacementRegex,"\\")}function replaceVariables(e){for(var t=e,i="",r=t.indexOf("${");0<=r;){var n,a=t.indexOf("'"),o=t.indexOf('"');if(0<=a&&a<r)n=t.indexOf("'",a+1),i+=t.substr(0,n+1),r=(t=t.substr(n+1)).indexOf("${");else if(0<=o&&o<r)n=t.indexOf('"',o+1),i+=t.substr(0,n+1),r=(t=t.substr(n+1)).indexOf("${");else{if(i+=t.substr(0,r),(o=t.indexOf("}"))<0)throw new RuntimeError("Unmatched {.");i+="czm_"+t.substr(r+2,o-(r+2)),r=(t=t.substr(o+1)).indexOf("${")}}return i+t}function parseLiteral(e){var t=typeof e.value;return null===e.value?new Node$2(ExpressionNodeType$1.LITERAL_NULL,null):"boolean"==t?new Node$2(ExpressionNodeType$1.LITERAL_BOOLEAN,e.value):"number"==t?new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,e.value):"string"==t?0<=e.value.indexOf("${")?new Node$2(ExpressionNodeType$1.VARIABLE_IN_STRING,e.value):new Node$2(ExpressionNodeType$1.LITERAL_STRING,replaceBackslashes(e.value)):void 0}function parseCall(e,t){var i,r,n,a,o=t.arguments,s=o.length;if("MemberExpression"===t.callee.type){i=t.callee.property.name;var l=t.callee.object;if("test"===i||"exec"===i){if("regExp"!==l.callee.name)throw new RuntimeError(i+" is not a function.");return 0===s?"test"===i?new Node$2(ExpressionNodeType$1.LITERAL_BOOLEAN,!1):new Node$2(ExpressionNodeType$1.LITERAL_NULL,null):(n=createRuntimeAst(e,l),a=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.FUNCTION_CALL,i,n,a))}if("toString"===i)return r=createRuntimeAst(e,l),new Node$2(ExpressionNodeType$1.FUNCTION_CALL,i,r);throw new RuntimeError('Unexpected function call "'+i+'".')}if("color"===(i=t.callee.name)){if(0===s)return new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i);if(r=createRuntimeAst(e,o[0]),defined(o[1])){var c=createRuntimeAst(e,o[1]);return new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i,[r,c])}return new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i,[r])}if("rgb"===i||"hsl"===i){if(s<3)throw new RuntimeError(i+" requires three arguments.");return r=[createRuntimeAst(e,o[0]),createRuntimeAst(e,o[1]),createRuntimeAst(e,o[2])],new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i,r)}if("rgba"===i||"hsla"===i){if(s<4)throw new RuntimeError(i+" requires four arguments.");return r=[createRuntimeAst(e,o[0]),createRuntimeAst(e,o[1]),createRuntimeAst(e,o[2]),createRuntimeAst(e,o[3])],new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i,r)}if("vec2"===i||"vec3"===i||"vec4"===i){r=new Array(s);for(var u=0;u<s;++u)r[u]=createRuntimeAst(e,o[u]);return new Node$2(ExpressionNodeType$1.LITERAL_VECTOR,i,r)}if("isNaN"===i||"isFinite"===i)return 0===s?new Node$2(ExpressionNodeType$1.LITERAL_BOOLEAN,"isNaN"===i):(r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r));if("isExactClass"===i||"isClass"===i){if(s<1||1<s)throw new RuntimeError(i+" requires exactly one argument.");return r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r)}if("getExactClassName"===i){if(0<s)throw new RuntimeError(i+" does not take any argument.");return new Node$2(ExpressionNodeType$1.UNARY,i)}if(defined(unaryFunctions[i])){if(1!==s)throw new RuntimeError(i+" requires exactly one argument.");return r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r)}if(defined(binaryFunctions[i])){if(2!==s)throw new RuntimeError(i+" requires exactly two arguments.");return n=createRuntimeAst(e,o[0]),a=createRuntimeAst(e,o[1]),new Node$2(ExpressionNodeType$1.BINARY,i,n,a)}if(defined(ternaryFunctions[i])){if(3!==s)throw new RuntimeError(i+" requires exactly three arguments.");return n=createRuntimeAst(e,o[0]),a=createRuntimeAst(e,o[1]),c=createRuntimeAst(e,o[2]),new Node$2(ExpressionNodeType$1.TERNARY,i,n,a,c)}if("Boolean"===i)return 0===s?new Node$2(ExpressionNodeType$1.LITERAL_BOOLEAN,!1):(r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r));if("Number"===i)return 0===s?new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,0):(r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r));if("String"===i)return 0===s?new Node$2(ExpressionNodeType$1.LITERAL_STRING,""):(r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r));if("regExp"===i)return parseRegex$1(e,t);throw new RuntimeError('Unexpected function call "'+i+'".')}function parseRegex$1(e,t){if(0===(t=t.arguments).length)return new Node$2(ExpressionNodeType$1.LITERAL_REGEX,new RegExp);var i,r=createRuntimeAst(e,t[0]);if(1<t.length){var n=createRuntimeAst(e,t[1]);if(isLiteralType(r)&&isLiteralType(n)){try{i=new RegExp(replaceBackslashes(String(r._value)),n._value)}catch(e){throw new RuntimeError(e)}return new Node$2(ExpressionNodeType$1.LITERAL_REGEX,i)}return new Node$2(ExpressionNodeType$1.REGEX,r,n)}if(isLiteralType(r)){try{i=new RegExp(replaceBackslashes(String(r._value)))}catch(e){throw new RuntimeError(e)}return new Node$2(ExpressionNodeType$1.LITERAL_REGEX,i)}return new Node$2(ExpressionNodeType$1.REGEX,r)}function parseKeywordsAndVariables(e){if(isVariable(e.name)){var t=getPropertyName(e.name);return"tiles3d_"===t.substr(0,8)?new Node$2(ExpressionNodeType$1.BUILTIN_VARIABLE,t):new Node$2(ExpressionNodeType$1.VARIABLE,t)}if("NaN"===e.name)return new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new Node$2(ExpressionNodeType$1.LITERAL_UNDEFINED,void 0);throw new RuntimeError(e.name+" is not defined.")}function parseMathConstant(e){return"PI"===(e=e.property.name)?new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,Math.PI):"E"===e?new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,Math.E):void 0}function parseNumberConstant(e){if("POSITIVE_INFINITY"===e.property.name)return new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function parseMemberExpression(e,t){if("Math"===t.object.name)return parseMathConstant(t);if("Number"===t.object.name)return parseNumberConstant(t);var i,r=createRuntimeAst(e,t.object);return t.computed?(i=createRuntimeAst(e,t.property),new Node$2(ExpressionNodeType$1.MEMBER,"brackets",r,i)):(i=new Node$2(ExpressionNodeType$1.LITERAL_STRING,t.property.name),new Node$2(ExpressionNodeType$1.MEMBER,"dot",r,i))}function isLiteralType(e){return e._type>=ExpressionNodeType$1.LITERAL_NULL}function isVariable(e){return"czm_"===e.substr(0,4)}function getPropertyName(e){return e.substr(4)}function createRuntimeAst(e,t){if("Literal"===t.type)o=parseLiteral(t);else if("CallExpression"===t.type)o=parseCall(e,t);else if("Identifier"===t.type)o=parseKeywordsAndVariables(t);else if("UnaryExpression"===t.type){r=t.operator;var i=createRuntimeAst(e,t.argument);if(!(-1<unaryOperators.indexOf(r)))throw new RuntimeError('Unexpected operator "'+r+'".');o=new Node$2(ExpressionNodeType$1.UNARY,r,i)}else if("BinaryExpression"===t.type){if(r=t.operator,n=createRuntimeAst(e,t.left),a=createRuntimeAst(e,t.right),!(-1<binaryOperators.indexOf(r)))throw new RuntimeError('Unexpected operator "'+r+'".');o=new Node$2(ExpressionNodeType$1.BINARY,r,n,a)}else if("LogicalExpression"===t.type)r=t.operator,n=createRuntimeAst(e,t.left),a=createRuntimeAst(e,t.right),-1<binaryOperators.indexOf(r)&&(o=new Node$2(ExpressionNodeType$1.BINARY,r,n,a));else if("ConditionalExpression"===t.type)var r=createRuntimeAst(e,t.test),n=createRuntimeAst(e,t.consequent),a=createRuntimeAst(e,t.alternate),o=new Node$2(ExpressionNodeType$1.CONDITIONAL,"?",n,a,r);else if("MemberExpression"===t.type)o=parseMemberExpression(e,t);else{if("ArrayExpression"!==t.type)throw"Compound"===t.type?new RuntimeError("Provide exactly one expression."):new RuntimeError("Cannot parse expression.");for(var s=[],l=0;l<t.elements.length;l++)s[l]=createRuntimeAst(e,t.elements[l]);o=new Node$2(ExpressionNodeType$1.ARRAY,s)}return o}function setEvaluateFunction(e){e._type===ExpressionNodeType$1.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===ExpressionNodeType$1.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===ExpressionNodeType$1.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:defined(unaryFunctions[e._value])&&(e.evaluate=getEvaluateUnaryFunction(e._value)):e._type===ExpressionNodeType$1.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?e.evaluate=e._evaluateGreaterThan:">="===e._value?e.evaluate=e._evaluateGreaterThanOrEquals:"&&"===e._value?e.evaluate=e._evaluateAnd:"||"===e._value?e.evaluate=e._evaluateOr:"=~"===e._value?e.evaluate=e._evaluateRegExpMatch:"!~"===e._value?e.evaluate=e._evaluateRegExpNotMatch:defined(binaryFunctions[e._value])&&(e.evaluate=getEvaluateBinaryFunction(e._value)):e._type===ExpressionNodeType$1.TERNARY?e.evaluate=getEvaluateTernaryFunction(e._value):e._type===ExpressionNodeType$1.MEMBER?"brackets"===e._value?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===ExpressionNodeType$1.ARRAY?e.evaluate=e._evaluateArray:e._type===ExpressionNodeType$1.VARIABLE?e.evaluate=e._evaluateVariable:e._type===ExpressionNodeType$1.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===ExpressionNodeType$1.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===ExpressionNodeType$1.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===ExpressionNodeType$1.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===ExpressionNodeType$1.REGEX?e.evaluate=e._evaluateRegExp:e._type===ExpressionNodeType$1.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=evaluateTilesetTime):e.evaluate=e._evaluateLiteral}function evaluateTilesetTime(e){return defined(e)?e.content.tileset.timeSinceLoad:0}function getEvaluateUnaryFunction(e){var t=unaryFunctions[e];return function(i){return i=this._left.evaluate(i),t(e,i)}}function getEvaluateBinaryFunction(e){var t=binaryFunctions[e];return function(i){var r=this._left.evaluate(i);i=this._right.evaluate(i);return t(e,r,i)}}function getEvaluateTernaryFunction(e){var t=ternaryFunctions[e];return function(i){var r=this._left.evaluate(i),n=this._right.evaluate(i);i=this._test.evaluate(i);return t(e,r,n,i)}}function getFeatureProperty(e,t){if(defined(e))return e.getProperty(t)}function checkFeature(e){return"feature"===e._value}function convertHSLToRGB(e){for(var t=e._left,i=t.length,r=0;r<i;++r)if(t[r]._type!==ExpressionNodeType$1.LITERAL_NUMBER)return;var n=t[0]._value,a=t[1]._value,o=t[2]._value;e=4===i?t[3]._value:1;return Color.fromHsl(n,a,o,e,scratchColor$2)}function convertRGBToColor(e){for(var t=e._left,i=t.length,r=0;r<i;++r)if(t[r]._type!==ExpressionNodeType$1.LITERAL_NUMBER)return;return(e=scratchColor$2).red=t[0]._value/255,e.green=t[1]._value/255,e.blue=t[2]._value/255,e.alpha=4===i?t[3]._value:1,e}function numberToString(e){return e%1==0?e.toFixed(1):e.toString()}function colorToVec3(e){return"vec3("+numberToString(e.red)+", "+numberToString(e.green)+", "+numberToString(e.blue)+")"}function colorToVec4(e){return"vec4("+numberToString(e.red)+", "+numberToString(e.green)+", "+numberToString(e.blue)+", "+numberToString(e.alpha)+")"}function getExpressionArray(e,t,i,r){for(var n=e.length,a=new Array(n),o=0;o<n;++o)a[o]=e[o].getShaderExpression(t,i,r);return a}function getVariableName(e,t){if(!defined(t[e]))throw new RuntimeError('Style references a property "'+e+'" that does not exist or is not styleable.');return t[e]}Node$2.prototype._evaluateLiteral=function(){return this._value},Node$2.prototype._evaluateLiteralColor=function(e){var t,i=scratchColor$2,r=this._left;return"color"===this._value?defined(r)?1<r.length?(Color.fromCssColorString(r[0].evaluate(e),i),i.alpha=r[1].evaluate(e)):Color.fromCssColorString(r[0].evaluate(e),i):Color.fromBytes(255,255,255,255,i):"rgb"===this._value?Color.fromBytes(r[0].evaluate(e),r[1].evaluate(e),r[2].evaluate(e),255,i):"rgba"===this._value?(t=255*r[3].evaluate(e),Color.fromBytes(r[0].evaluate(e),r[1].evaluate(e),r[2].evaluate(e),t,i)):"hsl"===this._value?Color.fromHsl(r[0].evaluate(e),r[1].evaluate(e),r[2].evaluate(e),1,i):"hsla"===this._value&&Color.fromHsl(r[0].evaluate(e),r[1].evaluate(e),r[2].evaluate(e),r[3].evaluate(e),i),Cartesian4.fromColor(i,scratchStorage.getCartesian4())},Node$2.prototype._evaluateLiteralVector=function(e){for(var t=scratchStorage.getArray(),i=this._value,r=this._left,n=r.length,a=0;a<n;++a){var o=r[a].evaluate(e);if("number"==typeof o)t.push(o);else if(o instanceof Cartesian2)t.push(o.x,o.y);else if(o instanceof Cartesian3)t.push(o.x,o.y,o.z);else{if(!(o instanceof Cartesian4))throw new RuntimeError(i+" argument must be a vector or number. Argument is "+o+".");t.push(o.x,o.y,o.z,o.w)}}var s=t.length,l=parseInt(i.charAt(3));if(0===s)throw new RuntimeError("Invalid "+i+" constructor. No valid arguments.");if(s<l&&1<s)throw new RuntimeError("Invalid "+i+" constructor. Not enough arguments.");if(l<s&&1<n)throw new RuntimeError("Invalid "+i+" constructor. Too many arguments.");return 1===s&&(s=t[0],t.push(s,s,s)),"vec2"===i?Cartesian2.fromArray(t,0,scratchStorage.getCartesian2()):"vec3"===i?Cartesian3.fromArray(t,0,scratchStorage.getCartesian3()):"vec4"===i?Cartesian4.fromArray(t,0,scratchStorage.getCartesian4()):void 0},Node$2.prototype._evaluateLiteralString=function(){return this._value},Node$2.prototype._evaluateVariableString=function(e){for(var t=this._value,i=variableRegex.exec(t);null!==i;){var r=i[0],n=getFeatureProperty(e,i[1]);defined(n)||(n=""),t=t.replace(r,n),i=variableRegex.exec(t)}return t},Node$2.prototype._evaluateVariable=function(e){return getFeatureProperty(e,this._value)},Node$2.prototype._evaluateMemberDot=function(e){if(checkFeature(this._left))return getFeatureProperty(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(defined(t)){if(e=this._right.evaluate(e),t instanceof Cartesian2||t instanceof Cartesian3||t instanceof Cartesian4){if("r"===e)return t.x;if("g"===e)return t.y;if("b"===e)return t.z;if("a"===e)return t.w}return t[e]}},Node$2.prototype._evaluateMemberBrackets=function(e){if(checkFeature(this._left))return getFeatureProperty(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(defined(t)){if(e=this._right.evaluate(e),t instanceof Cartesian2||t instanceof Cartesian3||t instanceof Cartesian4){if(0===e||"r"===e)return t.x;if(1===e||"g"===e)return t.y;if(2===e||"b"===e)return t.z;if(3===e||"a"===e)return t.w}return t[e]}},Node$2.prototype._evaluateArray=function(e){for(var t=[],i=0;i<this._value.length;i++)t[i]=this._value[i].evaluate(e);return t},Node$2.prototype._evaluateNot=function(e){if("boolean"!=typeof(e=this._left.evaluate(e)))throw new RuntimeError('Operator "!" requires a boolean argument. Argument is '+e+".");return!e},Node$2.prototype._evaluateNegative=function(e){if((e=this._left.evaluate(e))instanceof Cartesian2)return Cartesian2.negate(e,scratchStorage.getCartesian2());if(e instanceof Cartesian3)return Cartesian3.negate(e,scratchStorage.getCartesian3());if(e instanceof Cartesian4)return Cartesian4.negate(e,scratchStorage.getCartesian4());if("number"==typeof e)return-e;throw new RuntimeError('Operator "-" requires a vector or number argument. Argument is '+e+".")},Node$2.prototype._evaluatePositive=function(e){if(!((e=this._left.evaluate(e))instanceof Cartesian2||e instanceof Cartesian3||e instanceof Cartesian4||"number"==typeof e))throw new RuntimeError('Operator "+" requires a vector or number argument. Argument is '+e+".");return e},Node$2.prototype._evaluateLessThan=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof e)throw new RuntimeError('Operator "<" requires number arguments. Arguments are '+t+" and "+e+".");return t<e},Node$2.prototype._evaluateLessThanOrEquals=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof e)throw new RuntimeError('Operator "<=" requires number arguments. Arguments are '+t+" and "+e+".");return t<=e},Node$2.prototype._evaluateGreaterThan=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof e)throw new RuntimeError('Operator ">" requires number arguments. Arguments are '+t+" and "+e+".");return e<t},Node$2.prototype._evaluateGreaterThanOrEquals=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof e)throw new RuntimeError('Operator ">=" requires number arguments. Arguments are '+t+" and "+e+".");return e<=t},Node$2.prototype._evaluateOr=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new RuntimeError('Operator "||" requires boolean arguments. First argument is '+t+".");if(t)return!0;if("boolean"!=typeof(e=this._right.evaluate(e)))throw new RuntimeError('Operator "||" requires boolean arguments. Second argument is '+e+".");return t||e},Node$2.prototype._evaluateAnd=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new RuntimeError('Operator "&&" requires boolean arguments. First argument is '+t+".");if(!t)return!1;if("boolean"!=typeof(e=this._right.evaluate(e)))throw new RuntimeError('Operator "&&" requires boolean arguments. Second argument is '+e+".");return t&&e},Node$2.prototype._evaluatePlus=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.add(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.add(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.add(t,e,scratchStorage.getCartesian4());if("string"==typeof t||"string"==typeof e)return t+e;if("number"==typeof t&&"number"==typeof e)return t+e;throw new RuntimeError('Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateMinus=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.subtract(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.subtract(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.subtract(t,e,scratchStorage.getCartesian4());if("number"==typeof t&&"number"==typeof e)return t-e;throw new RuntimeError('Operator "-" requires vector or number arguments of matching types. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateTimes=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.multiplyComponents(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian2&&"number"==typeof t)return Cartesian2.multiplyByScalar(e,t,scratchStorage.getCartesian2());if(t instanceof Cartesian2&&"number"==typeof e)return Cartesian2.multiplyByScalar(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.multiplyComponents(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian3&&"number"==typeof t)return Cartesian3.multiplyByScalar(e,t,scratchStorage.getCartesian3());if(t instanceof Cartesian3&&"number"==typeof e)return Cartesian3.multiplyByScalar(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.multiplyComponents(t,e,scratchStorage.getCartesian4());if(e instanceof Cartesian4&&"number"==typeof t)return Cartesian4.multiplyByScalar(e,t,scratchStorage.getCartesian4());if(t instanceof Cartesian4&&"number"==typeof e)return Cartesian4.multiplyByScalar(t,e,scratchStorage.getCartesian4());if("number"==typeof t&&"number"==typeof e)return t*e;throw new RuntimeError('Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateDivide=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.divideComponents(t,e,scratchStorage.getCartesian2());if(t instanceof Cartesian2&&"number"==typeof e)return Cartesian2.divideByScalar(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.divideComponents(t,e,scratchStorage.getCartesian3());if(t instanceof Cartesian3&&"number"==typeof e)return Cartesian3.divideByScalar(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.divideComponents(t,e,scratchStorage.getCartesian4());if(t instanceof Cartesian4&&"number"==typeof e)return Cartesian4.divideByScalar(t,e,scratchStorage.getCartesian4());if("number"==typeof t&&"number"==typeof e)return t/e;throw new RuntimeError('Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateMod=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.fromElements(t.x%e.x,t.y%e.y,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.fromElements(t.x%e.x,t.y%e.y,t.z%e.z,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.fromElements(t.x%e.x,t.y%e.y,t.z%e.z,t.w%e.w,scratchStorage.getCartesian4());if("number"==typeof t&&"number"==typeof e)return t%e;throw new RuntimeError('Operator "%" requires vector or number arguments of matching types. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateEqualsStrict=function(e){var t=this._left.evaluate(e);return(e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2||e instanceof Cartesian3&&t instanceof Cartesian3||e instanceof Cartesian4&&t instanceof Cartesian4?t.equals(e):t===e},Node$2.prototype._evaluateNotEqualsStrict=function(e){var t=this._left.evaluate(e);return(e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2||e instanceof Cartesian3&&t instanceof Cartesian3||e instanceof Cartesian4&&t instanceof Cartesian4?!t.equals(e):t!==e},Node$2.prototype._evaluateConditional=function(e){var t=this._test.evaluate(e);if("boolean"!=typeof t)throw new RuntimeError("Conditional argument of conditional expression must be a boolean. Argument is "+t+".");return(t?this._left:this._right).evaluate(e)},Node$2.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},Node$2.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},Node$2.prototype._evaluateIsExactClass=function(e){return!!defined(e)&&e.isExactClass(this._left.evaluate(e))},Node$2.prototype._evaluateIsClass=function(e){return!!defined(e)&&e.isClass(this._left.evaluate(e))},Node$2.prototype._evaluateGetExactClassName=function(e){if(defined(e))return e.getExactClassName()},Node$2.prototype._evaluateBooleanConversion=function(e){return Boolean(this._left.evaluate(e))},Node$2.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},Node$2.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},Node$2.prototype._evaluateRegExp=function(e){var t,i=this._value.evaluate(e),r="";defined(this._left)&&(r=this._left.evaluate(e));try{t=new RegExp(i,r)}catch(e){throw new RuntimeError(e)}return t},Node$2.prototype._evaluateRegExpTest=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof e))throw new RuntimeError("RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+e+".");return t.test(e)},Node$2.prototype._evaluateRegExpMatch=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof e)return t.test(e);if(e instanceof RegExp&&"string"==typeof t)return e.test(t);throw new RuntimeError('Operator "=~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateRegExpNotMatch=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof e)return!t.test(e);if(e instanceof RegExp&&"string"==typeof t)return!e.test(t);throw new RuntimeError('Operator "!~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateRegExpExec=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof e))throw new RuntimeError("RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+e+".");return defined(e=t.exec(e))?e[1]:null},Node$2.prototype._evaluateToString=function(e){if((e=this._left.evaluate(e))instanceof RegExp||e instanceof Cartesian2||e instanceof Cartesian3||e instanceof Cartesian4)return String(e);throw new RuntimeError('Unexpected function call "'+this._value+'".')};var nullSentinel="czm_infinity";function Vector3DTilePrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=defaultValue(e.center,Cartesian3.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=Color.clone(Color.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=defaultValue(e.classificationType,ClassificationType$1.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};for(var t=this._batchIds.length,i=0;i<t;++i){var r=this._batchIds[i];this._batchIdLookUp[r]=i}}Node$2.prototype.getShaderExpression=function(e,t,i){var r,n,a,o=this._type,s=this._value;switch(defined(this._left)&&(n=Array.isArray(this._left)?getExpressionArray(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),defined(this._right)&&(l=this._right.getShaderExpression(e,t,this)),defined(this._test)&&(a=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(s=getExpressionArray(this._value,e,t,this)),o){case ExpressionNodeType$1.VARIABLE:if(checkFeature(this))return;return getVariableName(s,e);case ExpressionNodeType$1.UNARY:if("Boolean"===s)return"bool("+n+")";if("Number"===s)return"float("+n+")";if("round"===s)return"floor("+n+" + 0.5)";if(defined(unaryFunctions[s]))return s+"("+n+")";if("isNaN"===s)return"("+n+" != "+n+")";if("isFinite"===s)return"(abs("+n+") < czm_infinity)";if("String"===s||"isExactClass"===s||"isClass"===s||"getExactClassName"===s)throw new RuntimeError('Error generating style shader: "'+s+'" is not supported.');return s+n;case ExpressionNodeType$1.BINARY:return"%"===s?"mod("+n+", "+l+")":"==="===s?"("+n+" == "+l+")":"!=="===s?"("+n+" != "+l+")":"atan2"===s?"atan("+n+", "+l+")":defined(binaryFunctions[s])?s+"("+n+", "+l+")":"("+n+" "+s+" "+l+")";case ExpressionNodeType$1.TERNARY:if(defined(ternaryFunctions[s]))return s+"("+n+", "+l+", "+a+")";break;case ExpressionNodeType$1.CONDITIONAL:return"("+a+" ? "+n+" : "+l+")";case ExpressionNodeType$1.MEMBER:return checkFeature(this._left)?getVariableName(l,e):"r"===l||"x"===l||"0.0"===l?n+"[0]":"g"===l||"y"===l||"1.0"===l?n+"[1]":"b"===l||"z"===l||"2.0"===l?n+"[2]":"a"===l||"w"===l||"3.0"===l?n+"[3]":n+"[int("+l+")]";case ExpressionNodeType$1.FUNCTION_CALL:throw new RuntimeError('Error generating style shader: "'+s+'" is not supported.');case ExpressionNodeType$1.ARRAY:if(4===s.length)return"vec4("+s[0]+", "+s[1]+", "+s[2]+", "+s[3]+")";if(3===s.length)return"vec3("+s[0]+", "+s[1]+", "+s[2]+")";if(2===s.length)return"vec2("+s[0]+", "+s[1]+")";throw new RuntimeError("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case ExpressionNodeType$1.REGEX:throw new RuntimeError("Error generating style shader: Regular expressions are not supported.");case ExpressionNodeType$1.VARIABLE_IN_STRING:throw new RuntimeError("Error generating style shader: Converting a variable to a string is not supported.");case ExpressionNodeType$1.LITERAL_NULL:return nullSentinel;case ExpressionNodeType$1.LITERAL_BOOLEAN:return s?"true":"false";case ExpressionNodeType$1.LITERAL_NUMBER:return numberToString(s);case ExpressionNodeType$1.LITERAL_STRING:if(defined(i)&&i._type===ExpressionNodeType$1.MEMBER&&("r"===s||"g"===s||"b"===s||"a"===s||"x"===s||"y"===s||"z"===s||"w"===s||checkFeature(i._left)))return s;if(defined(r=Color.fromCssColorString(s,scratchColor$2)))return colorToVec3(r);throw new RuntimeError("Error generating style shader: String literals are not supported.");case ExpressionNodeType$1.LITERAL_COLOR:if(e=n,"color"===s){if(!defined(e))return"vec4(1.0)";if(1<e.length){var l=e[0];return"1.0"!==(i=e[1])&&(t.translucent=!0),"vec4("+l+", "+i+")"}return"vec4("+e[0]+", 1.0)"}if("rgb"===s)return defined(r=convertRGBToColor(this))?colorToVec4(r):"vec4("+e[0]+" / 255.0, "+e[1]+" / 255.0, "+e[2]+" / 255.0, 1.0)";if("rgba"===s)return"1.0"!==e[3]&&(t.translucent=!0),defined(r=convertRGBToColor(this))?colorToVec4(r):"vec4("+e[0]+" / 255.0, "+e[1]+" / 255.0, "+e[2]+" / 255.0, "+e[3]+")";if("hsl"===s)return defined(r=convertHSLToRGB(this))?colorToVec4(r):"vec4(czm_HSLToRGB(vec3("+e[0]+", "+e[1]+", "+e[2]+")), 1.0)";if("hsla"===s)return defined(r=convertHSLToRGB(this))?(1!==r.alpha&&(t.translucent=!0),colorToVec4(r)):("1.0"!==e[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+e[0]+", "+e[1]+", "+e[2]+")), "+e[3]+")");break;case ExpressionNodeType$1.LITERAL_VECTOR:for(var c=n.length,u=s+"(",d=0;d<c;++d)u+=n[d],d<c-1&&(u+=", ");return u+")";case ExpressionNodeType$1.LITERAL_REGEX:throw new RuntimeError("Error generating style shader: Regular expressions are not supported.");case ExpressionNodeType$1.LITERAL_UNDEFINED:return nullSentinel;case ExpressionNodeType$1.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===s)return"u_time"}},Object.defineProperties(Vector3DTilePrimitive.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var defaultAttributeLocations={position:0,a_batchId:1};function createVertexArray$1(e,t){var i,r,n;defined(e._va)||(i=Buffer$1.createVertexBuffer({context:t,typedArray:e._positions,usage:BufferUsage$1.STATIC_DRAW}),n=Buffer$1.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:BufferUsage$1.STATIC_DRAW}),r=Buffer$1.createIndexBuffer({context:t,typedArray:e._indices,usage:BufferUsage$1.DYNAMIC_DRAW,indexDatatype:2===e._indices.BYTES_PER_ELEMENT?IndexDatatype$1.UNSIGNED_SHORT:IndexDatatype$1.UNSIGNED_INT}),n=[{index:0,vertexBuffer:i,componentDatatype:ComponentDatatype$1.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:n,componentDatatype:ComponentDatatype$1.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}],e._va=new VertexArray({context:t,attributes:n,indexBuffer:r}),t.webgl2&&(e._vaSwap=new VertexArray({context:t,attributes:n,indexBuffer:Buffer$1.createIndexBuffer({context:t,sizeInBytes:r.sizeInBytes,usage:BufferUsage$1.DYNAMIC_DRAW,indexDatatype:r.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._verticesPromise=void 0)}function createShaders(e,t){if(!defined(e._sp)){var i=e._batchTable,r=defaultValue(e._attributeLocations,defaultAttributeLocations),n=e._pickId,a=e._vertexShaderSource,o=e._fragmentShaderSource;if(defined(a))return e._sp=ShaderProgram.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:r}),e._spStencil=e._sp,o=ShaderSource.replaceMain(o,"czm_non_pick_main")+"void main() \n{ \n    czm_non_pick_main(); \n    gl_FragColor = "+n+"; \n} \n",void(e._spPick=ShaderProgram.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:r}));var s=i.getVertexShaderCallback(!1,"a_batchId",void 0)(VectorTileVS);a=i.getFragmentShaderCallback()(ShadowVolumeFS,!1,void 0),n=i.getPickId(),o=new ShaderSource({sources:[s]}),i=new ShaderSource({defines:["VECTOR_TILE"],sources:[a]});e._sp=ShaderProgram.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:i,attributeLocations:r}),o=new ShaderSource({sources:[VectorTileVS]}),i=new ShaderSource({defines:["VECTOR_TILE"],sources:[ShadowVolumeFS]}),e._spStencil=ShaderProgram.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:i,attributeLocations:r}),a=ShaderSource.replaceMain(a,"czm_non_pick_main")+"\nvoid main() \n{ \n    czm_non_pick_main(); \n    gl_FragColor = "+n+"; \n} \n",s=new ShaderSource({sources:[s]}),a=new ShaderSource({defines:["VECTOR_TILE"],sources:[a]}),e._spPick=ShaderProgram.fromCache({context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:r})}}function getStencilDepthRenderState$1(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e=e?StencilFunction$1.EQUAL:StencilFunction$1.ALWAYS,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.DECREMENT_WRAP,zPass:StencilOperation$1.KEEP},backFunction:e,backOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.INCREMENT_WRAP,zPass:StencilOperation$1.KEEP},reference:StencilConstants$1.CESIUM_3D_TILE_MASK,mask:StencilConstants$1.CESIUM_3D_TILE_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:DepthFunction$1.LESS_OR_EQUAL},depthMask:!1}}var colorRenderState={stencilTest:{enabled:!0,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},backFunction:StencilFunction$1.NOT_EQUAL,backOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:BlendingState$1.ALPHA_BLEND},pickRenderState$1={stencilTest:{enabled:!0,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},backFunction:StencilFunction$1.NOT_EQUAL,backOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function createRenderStates$2(e){defined(e._rsStencilDepthPass)||(e._rsStencilDepthPass=RenderState.fromCache(getStencilDepthRenderState$1(!1)),e._rsStencilDepthPass3DTiles=RenderState.fromCache(getStencilDepthRenderState$1(!0)),e._rsColorPass=RenderState.fromCache(colorRenderState),e._rsPickPass=RenderState.fromCache(pickRenderState$1))}var modifiedModelViewScratch$1=new Matrix4,rtcScratch$1=new Cartesian3;function createUniformMap(e,t){var i;defined(e._uniformMap)||(i={u_modifiedModelViewProjection:function(){var i=t.uniformState.view,r=t.uniformState.projection;return Matrix4.clone(i,modifiedModelViewScratch$1),Matrix4.multiplyByPoint(modifiedModelViewScratch$1,e._center,rtcScratch$1),Matrix4.setTranslation(modifiedModelViewScratch$1,rtcScratch$1,modifiedModelViewScratch$1),Matrix4.multiply(r,modifiedModelViewScratch$1,modifiedModelViewScratch$1),modifiedModelViewScratch$1},u_highlightColor:function(){return e._highlightColor}},e._uniformMap=e._batchTable.getUniformMapCallback()(i))}function copyIndicesCPU(e,t,i,r,n,a,o){for(var s=e.constructor.BYTES_PER_ELEMENT,l=a.length,c=0;c<l;++c){var u=o[a[c]],d=r[u],h=n[u];d=new e.constructor(e.buffer,s*d,h);t.set(d,i),r[u]=i,i+=h}return i}function rebatchCPU(e,t){var i=e._indices,r=e._indexOffsets,n=e._indexCounts,a=e._batchIdLookUp,o=new i.constructor(i.length),s=t.pop(),l=[s],c=copyIndicesCPU(i,o,0,r,n,s.batchIds,a);for(s.offset=0,s.count=c;0<t.length;){var u,d=t.pop();Color.equals(d.color,s.color)?(c=copyIndicesCPU(i,o,c,r,n,d.batchIds,a),s.batchIds=s.batchIds.concat(d.batchIds),s.count=c-s.offset):(c=copyIndicesCPU(i,o,u=c,r,n,d.batchIds,a),d.offset=u,d.count=c-u,l.push(d),s=d)}e._va.indexBuffer.copyFromArrayView(o),e._indices=o,e._batchedIndices=l}function copyIndicesGPU(e,t,i,r,n,a,o){for(var s=e.bytesPerIndex,l=a.length,c=0;c<l;++c){var u=o[a[c]],d=r[u],h=n[u];t.copyFromBuffer(e,d*s,i*s,h*s),r[u]=i,i+=h}return i}function rebatchGPU(e,t){var i=e._indexOffsets,r=e._indexCounts,n=e._batchIdLookUp,a=t.pop(),o=[a],s=e._va.indexBuffer,l=e._vaSwap.indexBuffer,c=copyIndicesGPU(s,l,0,i,r,a.batchIds,n);for(a.offset=0,a.count=c;0<t.length;){var u,d=t.pop();Color.equals(d.color,a.color)?(c=copyIndicesGPU(s,l,c,i,r,d.batchIds,n),a.batchIds=a.batchIds.concat(d.batchIds),a.count=c-a.offset):(c=copyIndicesGPU(s,l,u=c,i,r,d.batchIds,n),d.offset=u,d.count=c-u,o.push(d),a=d)}var h=e._va;e._va=e._vaSwap,e._vaSwap=h,e._batchedIndices=o}function compareColors(e,t){return t.color.toRgba()-e.color.toRgba()}function rebatchCommands(e,t){if(!e._batchDirty)return!1;for(var i=e._batchedIndices,r=i.length,n=!1,a={},o=0;o<r;++o){var s=i[o].color.toRgba();if(defined(a[s])){n=!0;break}a[s]=!0}return n?n&&!e.forceRebatch&&e._framesSinceLastRebatch<120?void++e._framesSinceLastRebatch:(i.sort(compareColors),(t.webgl2?rebatchGPU:rebatchCPU)(e,i),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0):e._batchDirty=!1}function createColorCommands$1(e,t){var i=rebatchCommands(e,t),r=e._commands,n=e._batchedIndices,a=n.length;t=2*a;if(!defined(r)||i||r.length!==t){r.length=t;for(var o=e._va,s=e._sp,l=defaultValue(e._modelMatrix,Matrix4.IDENTITY),c=e._uniformMap,u=e._boundingVolume,d=0;d<a;++d){var h=n[d].offset,p=n[d].count,f=r[2*d];defined(f)||(f=r[2*d]=new DrawCommand({owner:e})),f.vertexArray=o,f.modelMatrix=l,f.offset=h,f.count=p,f.renderState=e._rsStencilDepthPass,f.shaderProgram=s,f.uniformMap=c,f.boundingVolume=u,f.cull=!1,f.pass=Pass$1.TERRAIN_CLASSIFICATION;var m=DrawCommand.shallowClone(f,f.derivedCommands.tileset);m.renderState=e._rsStencilDepthPass3DTiles,m.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,f.derivedCommands.tileset=m,defined(m=r[2*d+1])||(m=r[2*d+1]=new DrawCommand({owner:e})),m.vertexArray=o,m.modelMatrix=l,m.offset=h,m.count=p,m.renderState=e._rsColorPass,m.shaderProgram=s,m.uniformMap=c,m.boundingVolume=u,m.cull=!1,m.pass=Pass$1.TERRAIN_CLASSIFICATION,(p=DrawCommand.shallowClone(m,m.derivedCommands.tileset)).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=p}e._commandsDirty=!0}}function createColorCommandsIgnoreShow(e,t){if(e.classificationType!==ClassificationType$1.TERRAIN&&t.invertClassification&&(!defined(e._commandsIgnoreShow)||e._commandsDirty)){for(var i=e._commands,r=e._commandsIgnoreShow,n=e._spStencil,a=(t=i.length,r.length=t/2),o=0,s=0;s<a;++s){var l=r[s]=DrawCommand.shallowClone(i[o],r[s]);l.shaderProgram=n,l.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,o+=2}e._commandsDirty=!1}}function createPickCommands$1(e){if(e._pickCommandsDirty){var t=e._indexOffsets.length,i=e._pickCommands;i.length=2*t;for(var r=e._va,n=e._spStencil,a=e._spPick,o=defaultValue(e._modelMatrix,Matrix4.IDENTITY),s=e._uniformMap,l=0;l<t;++l){var c=e._indexOffsets[l],u=e._indexCounts[l],d=defined(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume,h=i[2*l];defined(h)||(h=i[2*l]=new DrawCommand({owner:e,pickOnly:!0})),h.vertexArray=r,h.modelMatrix=o,h.offset=c,h.count=u,h.renderState=e._rsStencilDepthPass,h.shaderProgram=n,h.uniformMap=s,h.boundingVolume=d,h.pass=Pass$1.TERRAIN_CLASSIFICATION;var p=DrawCommand.shallowClone(h,h.derivedCommands.tileset);p.renderState=e._rsStencilDepthPass3DTiles,p.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,h.derivedCommands.tileset=p,defined(p=i[2*l+1])||(p=i[2*l+1]=new DrawCommand({owner:e,pickOnly:!0})),p.vertexArray=r,p.modelMatrix=o,p.offset=c,p.count=u,p.renderState=e._rsPickPass,p.shaderProgram=a,p.uniformMap=s,p.boundingVolume=d,p.pass=Pass$1.TERRAIN_CLASSIFICATION,(d=DrawCommand.shallowClone(p,p.derivedCommands.tileset)).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=d}e._pickCommandsDirty=!1}}function clearStyle(e,t){e._updatingAllCommands=!0;for(var i=e._batchIds,r=i.length,n=0;n<r;++n){var a=t[i[n]];a.show=!0,a.color=Color.WHITE}var o=e._batchedIndices;r=o.length;for(n=0;n<r;++n)o[n].color=Color.clone(Color.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}Vector3DTilePrimitive.prototype.createFeatures=function(e,t){for(var i=this._batchIds,r=i.length,n=0;n<r;++n){var a=i[n];t[a]=new Cesium3DTileFeature(e,a)}},Vector3DTilePrimitive.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var scratchColor$3=new Color,DEFAULT_COLOR_VALUE$1=Color.WHITE,DEFAULT_SHOW_VALUE$1=!0,complexExpressionReg=/\$/;function queueCommands(e,t,i,r){for(var n,a=(e=e.classificationType)!==ClassificationType$1.CESIUM_3D_TILE,o=e!==ClassificationType$1.TERRAIN,s=t.commandList,l=i.length,c=0;c<l;++c)a&&((n=i[c]).pass=Pass$1.TERRAIN_CLASSIFICATION,s.push(n)),o&&((n=i[c].derivedCommands.tileset).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,s.push(n));if(t.invertClassification&&defined(r))for(l=r.length,c=0;c<l;++c)s.push(r[c])}function queueWireframeCommands(e,t){for(var i=e.commandList,r=t.length,n=0;n<r;n+=2){var a=t[n+1];a.pass=Pass$1.OPAQUE,i.push(a)}}function updateWireframe(e){var t,i;if(e.debugWireframe!==e._debugWireframe||e.debugWireframe&&e._wireframeDirty){defined(e._rsWireframe)||(e._rsWireframe=RenderState.fromCache({})),i=e.debugWireframe?(t=e._rsWireframe,PrimitiveType$1.LINES):(t=e._rsColorPass,PrimitiveType$1.TRIANGLES);for(var r=e._commands,n=r.length,a=0;a<n;a+=2){var o=r[a+1];o.renderState=t,o.primitiveType=i}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}}Vector3DTilePrimitive.prototype.applyStyle=function(e,t){if(defined(e)){var i=(i=e.color)instanceof Expression&&!complexExpressionReg.test(i.expression);this._updatingAllCommands=i;var r=this._batchIds,n=r.length;for(s=0;s<n;++s){var a=t[r[s]];a.color=defined(e.color)?e.color.evaluateColor(a,scratchColor$3):DEFAULT_COLOR_VALUE$1,a.show=defined(e.show)?e.show.evaluate(a):DEFAULT_SHOW_VALUE$1}if(i){for(var o=this._batchedIndices,s=(n=o.length,0);s<n;++s)o[s].color=Color.clone(Color.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}}else clearStyle(this,t)},Vector3DTilePrimitive.prototype.updateCommands=function(e,t){if(!this._updatingAllCommands){var i=this._batchIdLookUp;if(defined(o=i[e])){for(var r=this._indexOffsets,n=this._indexCounts,a=r[o],o=n[o],s=this._batchedIndices,l=s.length,c=0;c<l;++c){var u=s[c].offset,d=s[c].count;if(u<=a&&a<u+d)break}s.push(new Vector3DTileBatch({color:Color.clone(t),offset:a,count:o,batchIds:[e]}));for(var h=[],p=[],f=s[c].batchIds,m=f.length,g=0;g<m;++g){var y=f[g];y!==e&&(r[i[y]]<a?h:p).push(y)}0!==p.length&&s.push(new Vector3DTileBatch({color:Color.clone(s[c].color),offset:a+o,count:s[c].offset+s[c].count-(a+o),batchIds:p})),0!==h.length?(s[c].count=a-s[c].offset,s[c].batchIds=h):s.splice(c,1),this._batchDirty=!0}}},Vector3DTilePrimitive.prototype.update=function(e){var t=e.context;createVertexArray$1(this,t),createShaders(this,t),createRenderStates$2(this),createUniformMap(this,t);var i=e.passes;i.render&&(createColorCommands$1(this,t),createColorCommandsIgnoreShow(this,e),updateWireframe(this),this._debugWireframe?queueWireframeCommands(e,this._commands):queueCommands(this,e,this._commands,this._commandsIgnoreShow)),i.pick&&(createPickCommands$1(this),queueCommands(this,e,this._pickCommands))},Vector3DTilePrimitive.prototype.isDestroyed=function(){return!1},Vector3DTilePrimitive.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),destroyObject(this)};var boundingSphereCartesian3Scratch=new Cartesian3,ModelState=ModelUtility.ModelState;function ClassificationModel(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).gltf;if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t instanceof Uint8Array))throw new RuntimeError("Only binary glTF is supported as a classifier.");updateVersion(t=parseGlb(t)),addDefaults(t),processModelMaterialsCommon(t),processPbrMaterials(t),ForEach.buffer(t,(function(e){if(!defined(e.extras._pipeline.source))throw new RuntimeError("Buffer data must be embedded in the binary gltf.")}));var i=t.nodes,r=t.meshes,n=i[0].mesh;if(1!==i.length||!defined(n))throw new RuntimeError("Only one node is supported for classification and it must have a mesh.");if(1!==r.length)throw new RuntimeError("Only one mesh is supported when using b3dm for classification.");if(1!==(r=r[0].primitives).length)throw new RuntimeError("Only one primitive per mesh is supported when using b3dm for classification.");if(!defined(r[0].attributes.POSITION))throw new RuntimeError("The mesh must have a position attribute.");if(!defined(r[0].attributes._BATCHID))throw new RuntimeError("The mesh must have a batch id attribute.");this._gltf=t,this.show=defaultValue(e.show,!0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(this.modelMatrix),this._ready=!1,this._readyPromise=when.defer(),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=defaultValue(e.debugWireframe,!1),this._debugWireframe=!1,this._classificationType=e.classificationType,this._vertexShaderLoaded=e.vertexShaderLoaded,this._classificationShaderLoaded=e.classificationShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=defaultValue(e.ignoreCommands,!1),this._upAxis=defaultValue(e.upAxis,Axis$1.Y),this._batchTable=e.batchTable,this._computedModelMatrix=new Matrix4,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new BoundingSphere,this._state=ModelState.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._dirty=!1,this._nodeMatrix=new Matrix4,this._primitive=void 0,this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms=void 0,this._buffers={},this._vertexArray=void 0,this._shaderProgram=void 0,this._uniformMap=void 0,this._geometryByteLength=0,this._trianglesLength=0,this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0}function addBuffersToLoadResources(e){var t=e.gltf,i=e._loadResources;ForEach.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function parseBufferViews(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;ForEach.bufferView(e.gltf,(function(e,t){e.target===WebGLConstants$1.ARRAY_BUFFER&&i.enqueue(t)}));var r=e._loadResources.indexBuffersToCreate,n={};ForEach.accessor(e.gltf,(function(e){var i=e.bufferView;t[i].target!==WebGLConstants$1.ELEMENT_ARRAY_BUFFER||defined(n[i])||(n[i]=!0,r.enqueue({id:i,componentType:e.componentType}))}))}function createVertexBuffer(e,t){var i=t._loadResources,r=t.gltf.bufferViews[e];r=i.getBuffer(r);t._buffers[e]=r,t._geometryByteLength+=r.byteLength}function createIndexBuffer(e,t,i){var r=i._loadResources,n=i.gltf.bufferViews[e];t={typedArray:r.getBuffer(n),indexDatatype:t};i._buffers[e]=t,i._geometryByteLength+=t.typedArray.byteLength}function createBuffers(e){var t=e._loadResources;if(0===t.pendingBufferLoads){for(var i=t.vertexBuffersToCreate,r=t.indexBuffersToCreate;0<i.length;)createVertexBuffer(i.dequeue(),e);for(;0<r.length;){var n=r.dequeue();createIndexBuffer(n.id,n.componentType,e)}}}function modifyShaderForQuantizedAttributes(e,t){var i=t.gltf.meshes[0].primitives[0];e=ModelUtility.modifyShaderForQuantizedAttributes(t.gltf,i,e);return t._quantizedUniforms=e.uniforms,e.shader}function modifyShader(e,t){return defined(t)&&(e=t(e)),e}function createProgram(e){var t=e.gltf,i=ModelUtility.getAttributeOrUniformBySemantic(t,"POSITION"),r=ModelUtility.getAttributeOrUniformBySemantic(t,"_BATCHID"),n={};n[i]=0,n[r]=1;var a=ModelUtility.getAttributeOrUniformBySemantic(t,"MODELVIEWPROJECTION"),o=defined(a)?(s="uniform mat4 "+a+";\n",a+" * vec4("+i+", 1.0)"):(a=ModelUtility.getAttributeOrUniformBySemantic(t,"PROJECTION"),defined(o=ModelUtility.getAttributeOrUniformBySemantic(t,"MODELVIEW"))||(o=ModelUtility.getAttributeOrUniformBySemantic(t,"CESIUM_RTC_MODELVIEW")),s="uniform mat4 "+o+";\nuniform mat4 "+a+";\n",a+" * "+o+" * vec4("+i+", 1.0)"),s="attribute vec3 "+i+";\nattribute float "+r+";\n"+s+"void main() {\n    vec4 positionInClipCoords = "+o+";\n    gl_Position = czm_depthClamp(positionInClipCoords);\n}\n";e.extensionsUsed.WEB3D_quantized_attributes&&(s=modifyShaderForQuantizedAttributes(s,e)),o=modifyShader(s,e._vertexShaderLoaded),s=modifyShader("#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvoid main() \n{ \n    gl_FragColor = vec4(1.0); \n    czm_writeDepthClamp();\n}\n",e._classificationShaderLoaded),e._shaderProgram={vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:n}}function getAttributeLocations(){return{POSITION:0,_BATCHID:1}}function createVertexArray$2(e){var t,i,r,n,a,o,s;e._loadResources.finishedBuffersCreation()&&!defined(e._vertexArray)&&(t=e._buffers,i=e.gltf,r=i.accessors,n=i.meshes[0].primitives[0],a=getAttributeLocations(),o={},ForEach.meshPrimitiveAttribute(n,(function(e,n){var s=a[n];defined(s)&&(e=r[e],o[n]={index:s,vertexBuffer:t[e.bufferView],componentsPerAttribute:numberOfComponentsForType(e.type),componentDatatype:e.componentType,offsetInBytes:e.byteOffset,strideInBytes:getAccessorByteStride(i,e)})})),defined(n.indices)&&(s=r[n.indices],s=t[s.bufferView]),e._vertexArray={attributes:o,indexBuffer:s})}Object.defineProperties(ClassificationModel.prototype,{gltf:{get:function(){return this._gltf}},boundingSphere:{get:function(){var e=this.modelMatrix,t=Matrix4.getScale(e,boundingSphereCartesian3Scratch);return(e=this._scaledBoundingSphere).center=Cartesian3.multiplyComponents(this._boundingSphere.center,t,e.center),e.radius=Cartesian3.maximumComponent(t)*this._initialRadius,defined(this._rtcCenter)&&Cartesian3.add(this._rtcCenter,e.center,e.center),e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},dirty:{get:function(){return this._dirty}},extensionsUsed:{get:function(){return defined(this._extensionsUsed)||(this._extensionsUsed=ModelUtility.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return defined(this._extensionsRequired)||(this._extensionsRequired=ModelUtility.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return 0}},classificationType:{get:function(){return this._classificationType}}});var gltfSemanticUniforms$1={PROJECTION:function(e,t){return ModelUtility.getGltfSemanticUniforms().PROJECTION(e,t)},MODELVIEW:function(e,t){return ModelUtility.getGltfSemanticUniforms().MODELVIEW(e,t)},CESIUM_RTC_MODELVIEW:function(e,t){return ModelUtility.getGltfSemanticUniforms().CESIUM_RTC_MODELVIEW(e,t)},MODELVIEWPROJECTION:function(e,t){return ModelUtility.getGltfSemanticUniforms().MODELVIEWPROJECTION(e,t)}};function createUniformMap$1(e,t){var i;defined(e._uniformMap)||(i={},ForEach.technique(e.gltf,(function(r){ForEach.techniqueUniform(r,(function(r,n){defined(r.semantic)&&defined(gltfSemanticUniforms$1[r.semantic])&&(i[n]=gltfSemanticUniforms$1[r.semantic](t.uniformState,e))}))})),e._uniformMap=i)}function createUniformsForQuantizedAttributes(e,t){return ModelUtility.createUniformsForQuantizedAttributes(e.gltf,t,e._quantizedUniforms)}function triangleCountFromPrimitiveIndices(e,t){switch(e.mode){case PrimitiveType$1.TRIANGLES:return t/3;case PrimitiveType$1.TRIANGLE_STRIP:case PrimitiveType$1.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function createPrimitive(e){var t=e._batchTable,i=e._uniformMap,r=e._vertexArray,n=(h=(d=e.gltf).accessors)[(p=d.meshes[0].primitives[0]).indices],a=p.attributes.POSITION,o=ModelUtility.getAccessorMinMax(d,a),s=BoundingSphere.fromCornerPoints(Cartesian3.fromArray(o.min),Cartesian3.fromArray(o.max));S=defined(n)?(T=n.count,n.byteOffset/IndexDatatype$1.getSizeInBytes(n.componentType)):(T=h[p.attributes.POSITION].count,0),e._trianglesLength+=triangleCountFromPrimitiveIndices(p,T),defined(e._uniformMapLoaded)&&(i=e._uniformMapLoaded(i)),e.extensionsUsed.WEB3D_quantized_attributes&&(i=combine(i,createUniformsForQuantizedAttributes(e,p)));a=(d=r.attributes.POSITION).componentDatatype,n=(o=d.vertexBuffer).byteOffset;var l,c,u,d,h=o.byteLength/ComponentDatatype$1.getSizeInBytes(a),p=ComponentDatatype$1.createArrayBufferView(a,o.buffer,n,h),f=(a=(d=r.attributes._BATCHID).componentDatatype,n=(o=d.vertexBuffer).byteOffset,h=o.byteLength/ComponentDatatype$1.getSizeInBytes(a),ComponentDatatype$1.createArrayBufferView(a,o.buffer,n,h)),m=(h=r.indexBuffer.typedArray,r.indexBuffer.indexDatatype===IndexDatatype$1.UNSIGNED_SHORT?new Uint16Array(h.buffer,h.byteOffset,h.byteLength/Uint16Array.BYTES_PER_ELEMENT):new Uint32Array(h.buffer,h.byteOffset,h.byteLength/Uint32Array.BYTES_PER_ELEMENT)),g=(p=arraySlice(p),[]),y=[],_=[],v=[],C=(f=arraySlice(f))[(m=arraySlice(m,S,S+T))[0]];g.push(C),_.push(0);for(var x=m.length,b=1;b<x;++b)(l=f[m[b]])!==C&&(u=b-(c=_[_.length-1]),g.push(l),y.push(u),_.push(b),v.push(new Vector3DTileBatch({offset:c,count:u,batchIds:[C],color:Color.WHITE})),C=l);u=x-(c=_[_.length-1]),y.push(u),v.push(new Vector3DTileBatch({offset:c,count:u,batchIds:[C],color:Color.WHITE}));h=(r=e._shaderProgram).vertexShaderSource;var S=r.fragmentShaderSource,T=r.attributeLocations;r=defined(e._pickIdLoaded)?e._pickIdLoaded():void 0;e._primitive=new Vector3DTilePrimitive({classificationType:e._classificationType,positions:p,indices:m,indexOffsets:_,indexCounts:y,batchIds:g,vertexBatchIds:f,batchedIndices:v,batchTable:t,boundingVolume:new BoundingSphere,_vertexShaderSource:h,_fragmentShaderSource:S,_attributeLocations:T,_uniformMap:i,_pickId:r,_modelMatrix:new Matrix4,_boundingSphere:s}),e._buffers=void 0,e._vertexArray=void 0,e._shaderProgram=void 0,e._uniformMap=void 0}function createRuntimeNodes(e){var t;e._loadResources.finished()&&(defined(e._primitive)||(t=e.gltf.nodes[0],e._nodeMatrix=ModelUtility.getTransform(t,e._nodeMatrix),createPrimitive(e)))}function createResources(e,t){t=t.context,ModelUtility.checkSupportedGlExtensions(e.gltf.glExtensionsUsed,t),createBuffers(e),createProgram(e),createVertexArray$2(e),createUniformMap$1(e,t),createRuntimeNodes(e)}var scratchComputedTranslation=new Cartesian4,scratchComputedMatrixIn2D=new Matrix4;function updateNodeModelMatrix(e,t,i,r){var n,a=e._computedModelMatrix;e._mode===SceneMode$1.SCENE3D||e._ignoreCommands||(n=Matrix4.getColumn(a,3,scratchComputedTranslation),Cartesian4.equals(n,Cartesian4.UNIT_W)?(n=e.boundingSphere.center,n=Transforms.wgs84To2DModelMatrix(r,n,scratchComputedMatrixIn2D),a=Matrix4.multiply(n,a,scratchComputedMatrixIn2D),defined(e._rtcCenter)&&(Matrix4.setTranslation(a,Cartesian4.UNIT_W,a),e._rtcCenter=e._rtcCenter2D)):(a=Transforms.basisTo2D(r,a,scratchComputedMatrixIn2D),e._rtcCenter=e._rtcCenter3D)),r=e._primitive,(t||i)&&(Matrix4.multiplyTransformation(a,e._nodeMatrix,r._modelMatrix),BoundingSphere.transform(r._boundingSphere,r._modelMatrix,r._boundingVolume),defined(e._rtcCenter)&&Cartesian3.add(e._rtcCenter,r._boundingVolume.center,r._boundingVolume.center))}function ClippingPlane(e,t){this._distance=t,this._normal=new UpdateChangedCartesian3(e,this),this.onChangeCallback=void 0,this.index=-1}function UpdateChangedCartesian3(e,t){this._clippingPlane=t,this._cartesian3=Cartesian3.clone(e)}function ClippingPlaneCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=defaultValue(e.enabled,!0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this.edgeColor=Color.clone(defaultValue(e.edgeColor,Color.WHITE)),this.edgeWidth=defaultValue(e.edgeWidth,0),this.planeAdded=new Event,this.planeRemoved=new Event,this._owner=void 0;var t=defaultValue(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?unionIntersectFunction:defaultIntersectFunction,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;var i=e.planes;if(defined(i))for(var r=i.length,n=0;n<r;++n)this.add(i[n])}function unionIntersectFunction(e){return e===Intersect$1.OUTSIDE}function defaultIntersectFunction(e){return e===Intersect$1.INSIDE}function setIndexDirty(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||-1!==e._dirtyIndex&&e._dirtyIndex!==t,e._dirtyIndex=t}function indexOf(e,t){for(var i=e.length,r=0;r<i;++r)if(Plane.equals(e[r],t))return r;return-1}ClassificationModel.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},ClassificationModel.prototype.update=function(e){var t,i,r,n,a,o,s;e.mode!==SceneMode$1.MORPHING&&(FeatureDetection.supportsWebP.initialized?(o=FeatureDetection.supportsWebP(),this._state===ModelState.NEEDS_LOAD&&defined(this.gltf)&&(this._state=ModelState.LOADING,this._state!==ModelState.FAILED&&(defined(t=this.gltf.extensions)&&defined(t.CESIUM_RTC)&&(a=Cartesian3.fromArray(t.CESIUM_RTC.center),Cartesian3.equals(a,Cartesian3.ZERO)||(this._rtcCenter3D=a,r=(i=e.mapProjection).ellipsoid.cartesianToCartographic(this._rtcCenter3D),n=i.project(r),Cartesian3.fromElements(n.z,n.x,n.y,n),this._rtcCenter2D=n,this._rtcCenterEye=new Cartesian3,this._rtcCenter=this._rtcCenter3D)),this._loadResources=new ModelLoadResources,ModelUtility.parseBuffers(this))),a=this._loadResources,i=!1,this._state===ModelState.LOADING&&(0===a.pendingBufferLoads&&(ModelUtility.checkSupportedExtensions(this.extensionsRequired,o),addBuffersToLoadResources(this),parseBufferViews(this),this._boundingSphere=ModelUtility.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,createResources(this,e)),a.finished()&&(this._state=ModelState.LOADED,i=!0)),defined(a)&&this._state===ModelState.LOADED&&(i||createResources(this,e),a.finished()&&(this._loadResources=void 0)),((r=this.show)&&this._state===ModelState.LOADED||i)&&(this._dirty=!1,n=this.modelMatrix,o=e.mode!==this._mode,this._mode=e.mode,((a=!Matrix4.equals(this._modelMatrix,n)||o)||i)&&(Matrix4.clone(n,this._modelMatrix),o=this._computedModelMatrix,Matrix4.clone(n,o),this._upAxis===Axis$1.Y?Matrix4.multiplyTransformation(o,Axis$1.Y_UP_TO_Z_UP,o):this._upAxis===Axis$1.X&&Matrix4.multiplyTransformation(o,Axis$1.X_UP_TO_Z_UP,o)),(a||i)&&(updateNodeModelMatrix(this,a,i,e.mapProjection),this._dirty=!0)),i?(s=this,e.afterRender.push((function(){s._ready=!0,s._readyPromise.resolve(s)}))):r&&!this._ignoreCommands&&(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.debugWireframe=this.debugWireframe,this._primitive.update(e))):FeatureDetection.supportsWebP.initialize())},ClassificationModel.prototype.isDestroyed=function(){return!1},ClassificationModel.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)},Object.defineProperties(ClippingPlane.prototype,{distance:{get:function(){return this._distance},set:function(e){defined(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){defined(this.onChangeCallback)&&!Cartesian3.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),Cartesian3.clone(e,this._normal._cartesian3)}}}),ClippingPlane.fromPlane=function(e,t){return defined(t)?(t.normal=e.normal,t.distance=e.distance):t=new ClippingPlane(e.normal,e.distance),t},ClippingPlane.clone=function(e,t){return defined(t)?(t.normal=e.normal,t.distance=e.distance,t):new ClippingPlane(e.normal,e.distance)},Object.defineProperties(UpdateChangedCartesian3.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){defined(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){defined(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){defined(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}}),Object.defineProperties(ClippingPlaneCollection.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?unionIntersectFunction:defaultIntersectFunction)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}}),ClippingPlaneCollection.prototype.add=function(e){var t=this._planes.length,i=this;e.onChangeCallback=function(e){setIndexDirty(i,e)},setIndexDirty(this,e.index=t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)},ClippingPlaneCollection.prototype.get=function(e){return this._planes[e]},ClippingPlaneCollection.prototype.contains=function(e){return-1!==indexOf(this._planes,e)},ClippingPlaneCollection.prototype.remove=function(e){var t=this._planes,i=indexOf(t,e);if(-1===i)return!1;e instanceof ClippingPlane&&(e.onChangeCallback=void 0,e.index=-1);for(var r=t.length-1,n=i;n<r;++n){var a=t[n+1];(t[n]=a)instanceof ClippingPlane&&(a.index=n)}return this._multipleDirtyPlanes=!0,t.length=r,this.planeRemoved.raiseEvent(e,i),!0},ClippingPlaneCollection.prototype.removeAll=function(){for(var e=this._planes,t=e.length,i=0;i<t;++i){var r=e[i];r instanceof ClippingPlane&&(r.onChangeCallback=void 0,r.index=-1),this.planeRemoved.raiseEvent(r,i)}this._multipleDirtyPlanes=!0,this._planes=[]};var distanceEncodeScratch=new Cartesian4,oct32EncodeScratch=new Cartesian4;function packPlanesAsUint8(e,t,i){for(var r=e._uint8View,n=e._planes,a=0,o=t;o<i;++o){var s=n[o],l=AttributeCompression.octEncodeToCartesian4(s.normal,oct32EncodeScratch);r[a]=l.x,r[a+1]=l.y,r[a+2]=l.z,r[a+3]=l.w,s=Cartesian4.packFloat(s.distance,distanceEncodeScratch),r[a+4]=s.x,r[a+5]=s.y,r[a+6]=s.z,r[a+7]=s.w,a+=8}}function packPlanesAsFloats(e,t,i){for(var r=e._float32View,n=e._planes,a=0,o=t;o<i;++o){var s=n[o],l=s.normal;r[a]=l.x,r[a+1]=l.y,r[a+2]=l.z,r[a+3]=s.distance,a+=4}}function computeTextureResolution(e,t){var i=ContextLimits.maximumTextureSize;return t.x=Math.min(e,i),t.y=Math.ceil(e/t.x),t}var textureResolutionScratch=new Cartesian2;ClippingPlaneCollection.prototype.update=function(e){var t,i=this._clippingPlanesTexture,r=e.context,n=ClippingPlaneCollection.useFloatTexture(r),a=n?this.length:2*this.length;!defined(i)||((e=i.width*i.height)<a||a<.25*e)&&(i.destroy(),i=void 0,this._clippingPlanesTexture=void 0),0!==this.length&&(defined(i)||((t=computeTextureResolution(a,textureResolutionScratch)).y*=2,n?(i=new Texture({context:r,width:t.x,height:t.y,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.FLOAT,sampler:Sampler.NEAREST,flipY:!1}),this._float32View=new Float32Array(t.x*t.y*4)):(i=new Texture({context:r,width:t.x,height:t.y,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST,flipY:!1}),this._uint8View=new Uint8Array(t.x*t.y*4)),this._clippingPlanesTexture=i,this._multipleDirtyPlanes=!0),a=this._dirtyIndex,!this._multipleDirtyPlanes&&-1===a||(this._multipleDirtyPlanes?n?(packPlanesAsFloats(this,0,this._planes.length),i.copyFrom({width:i.width,height:i.height,arrayBufferView:this._float32View})):(packPlanesAsUint8(this,0,this._planes.length),i.copyFrom({width:i.width,height:i.height,arrayBufferView:this._uint8View})):(t=r=0,n?(t=Math.floor(a/i.width),r=Math.floor(a-t*i.width),packPlanesAsFloats(this,a,a+1),i.copyFrom({width:1,height:1,arrayBufferView:this._float32View},r,t)):(t=Math.floor(2*a/i.width),r=Math.floor(2*a-t*i.width),packPlanesAsUint8(this,a,a+1),i.copyFrom({width:2,height:1,arrayBufferView:this._uint8View},r,t))),this._multipleDirtyPlanes=!1,this._dirtyIndex=-1))};var scratchMatrix=new Matrix4,scratchPlane$2=new Plane(Cartesian3.UNIT_X,0);ClippingPlaneCollection.prototype.computeIntersectionWithBoundingVolume=function(e,t){var i=this._planes,r=i.length,n=this.modelMatrix;defined(t)&&(n=Matrix4.multiply(t,n,scratchMatrix));var a=Intersect$1.INSIDE;!this.unionClippingRegions&&0<r&&(a=Intersect$1.OUTSIDE);for(var o=0;o<r;++o){var s=i[o];if(Plane.transform(s,n,scratchPlane$2),(s=e.intersectPlane(scratchPlane$2))===Intersect$1.INTERSECTING)a=s;else if(this._testIntersection(s))return s}return a},ClippingPlaneCollection.setOwner=function(e,t,i){e!==t[i]&&(t[i]=t[i]&&t[i].destroy(),defined(e)&&((e._owner=t)[i]=e))},ClippingPlaneCollection.useFloatTexture=function(e){return e.floatingPointTexture},ClippingPlaneCollection.getTextureResolution=function(e,t,i){var r=e.texture;return defined(r)?(i.x=r.width,i.y=r.height,i):((i=computeTextureResolution(ClippingPlaneCollection.useFloatTexture(t)?e.length:2*e.length,i)).y*=2,i)},ClippingPlaneCollection.prototype.isDestroyed=function(){return!1},ClippingPlaneCollection.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),destroyObject(this)};var ColorBlendMode={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===ColorBlendMode.HIGHLIGHT?0:e===ColorBlendMode.REPLACE?1:e===ColorBlendMode.MIX?CesiumMath.clamp(t,CesiumMath.EPSILON4,1):void 0}},ColorBlendMode$1=Object.freeze(ColorBlendMode);function DracoLoader(){}function addBufferToLoadResources(e,t){var i="runtime."+Object.keys(e.createdBufferViews).length,r=e.buffers,n=Object.keys(r).length;return r[n]=t,e.createdBufferViews[i]={buffer:n,byteOffset:0,byteLength:t.byteLength},i}function addNewVertexBuffer(e,t,i){return e=addBufferToLoadResources(t=t._loadResources,e),t.vertexBuffersToCreate.enqueue(e),e}function addNewIndexBuffer(e,t,i){var r=e.typedArray,n=t._loadResources;t=addBufferToLoadResources(n,r);return n.indexBuffersToCreate.enqueue({id:t,componentType:ComponentDatatype$1.fromTypedArray(r)}),{bufferViewId:t,numberOfIndices:e.numberOfIndices}}function scheduleDecodingTask(e,t,i,r){if(DracoLoader._taskProcessorReady){var n=i.primitivesToDecode.peek();if(defined(n)&&defined(e=e.scheduleTask(n,[n.array.buffer])))return i.activeDecodingTasks++,i.primitivesToDecode.dequeue(),e.then((function(e){i.activeDecodingTasks--;var r,a,o,s=addNewIndexBuffer(e.indexArray,t),l={},c=e.attributeData;for(r in c)c.hasOwnProperty(r)&&(a=addNewVertexBuffer((o=c[r]).array,t),(o=o.data).bufferView=a,l[r]=o);t._decodedData[n.mesh+".primitive."+n.primitive]={bufferView:s.bufferViewId,numberOfIndices:s.numberOfIndices,attributes:l}}))}}function getClipAndStyleCode(e,t,i){return"    float clipDistance = clip(gl_FragCoord, "+e+", "+t+"); \n    vec4 clippingPlanesEdgeColor = vec4(1.0); \n    clippingPlanesEdgeColor.rgb = "+i+".rgb; \n    float clippingPlanesEdgeWidth = "+i+".a; \n    if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n    { \n        gl_FragColor = clippingPlanesEdgeColor;\n    } \n"}DracoLoader._maxDecodingConcurrency=Math.max(FeatureDetection.hardwareConcurrency-1,1),DracoLoader._decoderTaskProcessor=void 0,DracoLoader._taskProcessorReady=!1,DracoLoader._getDecoderTaskProcessor=function(){var e;return defined(DracoLoader._decoderTaskProcessor)||((e=new TaskProcessor("decodeDraco",DracoLoader._maxDecodingConcurrency)).initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(){DracoLoader._taskProcessorReady=!0})),DracoLoader._decoderTaskProcessor=e),DracoLoader._decoderTaskProcessor},DracoLoader.hasExtension=function(e){return defined(e.extensionsRequired.KHR_draco_mesh_compression)||defined(e.extensionsUsed.KHR_draco_mesh_compression)},DracoLoader._decodedModelResourceCache=void 0,DracoLoader.parse=function(e,t){if(DracoLoader.hasExtension(e)){var i=e._loadResources,r=e.cacheKey;if(defined(r)&&(defined(DracoLoader._decodedModelResourceCache)||(defined(t.cache.modelDecodingCache)||(t.cache.modelDecodingCache={}),DracoLoader._decodedModelResourceCache=t.cache.modelDecodingCache),defined(r=DracoLoader._decodedModelResourceCache[r])))return r.count++,void(i.pendingDecodingCache=!0);var n=e._dequantizeInShader,a=e.gltf;ForEach.mesh(a,(function(e,t){ForEach.meshPrimitive(e,(function(e,r){var o,s;!defined(e.extensions)||defined(o=e.extensions.KHR_draco_mesh_compression)&&(s=a.bufferViews[o.bufferView],e=arraySlice(a.buffers[s.buffer].extras._pipeline.source,s.byteOffset,s.byteOffset+s.byteLength),i.primitivesToDecode.enqueue({mesh:t,primitive:r,array:e,bufferView:s,compressedAttributes:o.attributes,dequantizeInShader:n}))}))}))}},DracoLoader.decodeModel=function(e,t){if(!DracoLoader.hasExtension(e))return when.resolve();var i=e._loadResources,r=e.cacheKey;if(defined(r)&&defined(DracoLoader._decodedModelResourceCache)){var n=DracoLoader._decodedModelResourceCache[r];if(defined(n)&&i.pendingDecodingCache)return when(n.ready,(function(){e._decodedData=n.data,i.pendingDecodingCache=!1}));DracoLoader._decodedModelResourceCache[r]={ready:!1,count:1,data:void 0}}if(0===i.primitivesToDecode.length)return when.resolve();for(var a=DracoLoader._getDecoderTaskProcessor(),o=[],s=scheduleDecodingTask(a,e,i);defined(s);)o.push(s),s=scheduleDecodingTask(a,e,i);return when.all(o)},DracoLoader.decodePointCloud=function(e){var t=DracoLoader._getDecoderTaskProcessor();if(DracoLoader._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},DracoLoader.cacheDataForModel=function(e){var t=e.cacheKey;defined(t)&&defined(DracoLoader._decodedModelResourceCache)&&defined(t=DracoLoader._decodedModelResourceCache[t])&&(t.ready=!0,t.data=e._decodedData)},DracoLoader.destroyCachedDataForModel=function(e){var t=e.cacheKey;defined(t)&&defined(DracoLoader._decodedModelResourceCache)&&defined(e=DracoLoader._decodedModelResourceCache[t])&&0==--e.count&&delete DracoLoader._decodedModelResourceCache[t]};var textureResolutionScratch$1=new Cartesian2;function getClippingFunction(e,t){var i=e.unionClippingRegions,r=e.length;e=(ClippingPlaneCollection.useFloatTexture(t)?getClippingPlaneFloat:getClippingPlaneUint8)(t=(e=ClippingPlaneCollection.getTextureResolution(e,t,textureResolutionScratch$1)).x,e=e.y);return(e+="\n")+(i?clippingFunctionUnion:clippingFunctionIntersect)(r)}function clippingFunctionUnion(e){return"float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n    vec4 position = czm_windowToEyeCoordinates(fragCoord);\n    vec3 clipNormal = vec3(0.0);\n    vec3 clipPosition = vec3(0.0);\n    float clipAmount;\n    float pixelWidth = czm_metersPerPixel(position);\n    bool breakAndDiscard = false;\n    for (int i = 0; i < "+e+"; ++i)\n    {\n        vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n        clipNormal = clippingPlane.xyz;\n        clipPosition = -clippingPlane.w * clipNormal;\n        float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n        clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));\n        if (amount <= 0.0)\n        {\n           breakAndDiscard = true;\n           break;\n        }\n    }\n    if (breakAndDiscard) {\n        discard;\n    }\n    return clipAmount;\n}\n"}function clippingFunctionIntersect(e){return"float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n    bool clipped = true;\n    vec4 position = czm_windowToEyeCoordinates(fragCoord);\n    vec3 clipNormal = vec3(0.0);\n    vec3 clipPosition = vec3(0.0);\n    float clipAmount = 0.0;\n    float pixelWidth = czm_metersPerPixel(position);\n    for (int i = 0; i < "+e+"; ++i)\n    {\n        vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n        clipNormal = clippingPlane.xyz;\n        clipPosition = -clippingPlane.w * clipNormal;\n        float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n        clipAmount = max(amount, clipAmount);\n        clipped = clipped && (amount <= 0.0);\n    }\n    if (clipped)\n    {\n        discard;\n    }\n    return clipAmount;\n}\n"}function getClippingPlaneFloat(e,t){var i=1/t;return-1===(t=1/e+"").indexOf(".")&&(t+=".0"),-1===(i+="").indexOf(".")&&(i+=".0"),"vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n    int pixY = clippingPlaneNumber / "+e+";\n    int pixX = clippingPlaneNumber - (pixY * "+e+");\n    float u = (float(pixX) + 0.5) * "+t+";\n    float v = (float(pixY) + 0.5) * "+i+";\n    vec4 plane = texture2D(packedClippingPlanes, vec2(u, v));\n    return czm_transformPlane(plane, transform);\n}\n"}function getClippingPlaneUint8(e,t){var i=1/t;return-1===(t=1/e+"").indexOf(".")&&(t+=".0"),-1===(i+="").indexOf(".")&&(i+=".0"),"vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n    int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n    int pixY = clippingPlaneStartIndex / "+e+";\n    int pixX = clippingPlaneStartIndex - (pixY * "+e+");\n    float u = (float(pixX) + 0.5) * "+t+";\n    float v = (float(pixY) + 0.5) * "+i+";\n    vec4 oct32 = texture2D(packedClippingPlanes, vec2(u, v)) * 255.0;\n    vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n    vec4 plane;\n    plane.xyz = czm_octDecode(oct, 65535.0);\n    plane.w = czm_unpackFloat(texture2D(packedClippingPlanes, vec2(u + "+t+", v)));\n    return czm_transformPlane(plane, transform);\n}\n"}var JobType={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},JobType$1=Object.freeze(JobType);function ModelAnimationCache(){}var dataUriRegex$2=/^data\:/i;function getAccessorKey(e,t){var i=(i=(r=e.gltf).buffers)[(r=r.bufferViews[t.bufferView]).buffer],r=r.byteOffset+t.byteOffset;t=t.count*numberOfComponentsForType(t.type),i=dataUriRegex$2.test(i.uri)?"":i.uri;return e.cacheKey+"//"+i+"/"+r+"/"+t}var cachedAnimationParameters={};ModelAnimationCache.getAnimationParameterValues=function(e,t){var i=getAccessorKey(e,t);if(!defined(h=cachedAnimationParameters[i])){for(var r=e.gltf,n=r.buffers,a=r.bufferViews[t.bufferView],o=n[a.buffer].extras._pipeline.source,s=t.componentType,l=t.type,c=numberOfComponentsForType(l),u=t.count,d=getAccessorByteStride(r,t),h=new Array(u),p=(t=defaultValue(t.byteOffset,0),a.byteOffset+t),f=0;f<u;f++){var m=ComponentDatatype$1.createArrayBufferView(s,o.buffer,o.byteOffset+p,c);"SCALAR"===l?h[f]=m[0]:"VEC3"===l?h[f]=Cartesian3.fromArray(m):"VEC4"===l&&(h[f]=Quaternion.unpack(m)),p+=d}defined(e.cacheKey)&&(cachedAnimationParameters[i]=h)}return h};var cachedAnimationSplines={};function getAnimationSplineKey(e,t,i){return e.cacheKey+"//"+t+"/"+i}function ConstantSpline(e){this._value=e}function SteppedSpline(e){this._spline=e,this._lastTimeIndex=0}ConstantSpline.prototype.evaluate=function(e,t){return this._value},ConstantSpline.prototype.wrapTime=function(e){return 0},ConstantSpline.prototype.clampTime=function(e){return 0},SteppedSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,SteppedSpline.prototype.evaluate=function(e,t){var i=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=this._spline.times;i=e>=r[i+1]?r[i+1]:r[i];return this._spline.evaluate(i,t)},Object.defineProperties(SteppedSpline.prototype,{times:{get:function(){return this._spline.times}}}),SteppedSpline.prototype.wrapTime=function(e){return this._spline.wrapTime(e)},SteppedSpline.prototype.clampTime=function(e){return this._spline.clampTime(e)},ModelAnimationCache.getAnimationSpline=function(e,t,i,r,n,a,o,s){return t=getAnimationSplineKey(e,t,r),defined(r=cachedAnimationSplines[t])||(s=s,1===(a=a).length&&1===s.length?r=new ConstantSpline(s[0]):"LINEAR"!==n.interpolation&&"STEP"!==n.interpolation||("translation"===o||"scale"===o?r=new LinearSpline({times:a,points:s}):"rotation"===o?r=new QuaternionSpline({times:a,points:s}):"weights"===o&&(r=new WeightSpline({times:a,weights:s})),defined(r)&&"STEP"===n.interpolation&&(r=new SteppedSpline(r))),defined(e.cacheKey)&&(cachedAnimationSplines[t]=r)),r};var cachedSkinInverseBindMatrices={};ModelAnimationCache.getSkinInverseBindMatrices=function(e,t){var i=getAccessorKey(e,t);if(!defined(d=cachedSkinInverseBindMatrices[i])){var r=e.gltf,n=(o=r.buffers)[(e=r.bufferViews[t.bufferView]).buffer].extras._pipeline.source,a=t.componentType,o=t.type,s=t.count,l=getAccessorByteStride(r,t),c=e.byteOffset+t.byteOffset,u=numberOfComponentsForType(o),d=new Array(s);if(a===WebGLConstants$1.FLOAT&&o===AttributeType$1.MAT4)for(var h=0;h<s;++h){var p=ComponentDatatype$1.createArrayBufferView(a,n.buffer,n.byteOffset+c,u);d[h]=Matrix4.fromArray(p),c+=l}cachedSkinInverseBindMatrices[i]=d}return d};var ModelAnimationLoop={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},ModelAnimationLoop$1=Object.freeze(ModelAnimationLoop),ModelAnimationState=Object.freeze({STOPPED:0,ANIMATING:1});function ModelAnimation(e,t,i){this._name=i.name,this._startTime=JulianDate.clone(e.startTime),this._delay=defaultValue(e.delay,0),this._stopTime=e.stopTime,this.removeOnStop=defaultValue(e.removeOnStop,!1),this._multiplier=defaultValue(e.multiplier,1),this._reverse=defaultValue(e.reverse,!1),this._loop=defaultValue(e.loop,ModelAnimationLoop$1.NONE),this.start=new Event,this.update=new Event,this.stop=new Event,this._state=ModelAnimationState.STOPPED,this._runtimeAnimation=i,this._computedStartTime=void 0,this._duration=void 0;var r=this;this._raiseStartEvent=function(){r.start.raiseEvent(t,r)},this._updateEventTime=0,this._raiseUpdateEvent=function(){r.update.raiseEvent(t,r,r._updateEventTime)},this._raiseStopEvent=function(){r.stop.raiseEvent(t,r)}}function ModelAnimationCollection(e){this.animationAdded=new Event,this.animationRemoved=new Event,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function add(e,t,i){var r=e._model;t=new ModelAnimation(i,r,r._runtime.animations[t]);return e._scheduledAnimations.push(t),e.animationAdded.raiseEvent(r,t),t}function animateChannels(e,t){for(var i=e.channelEvaluators,r=i.length,n=0;n<r;++n)i[n](t)}Object.defineProperties(ModelAnimation.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),Object.defineProperties(ModelAnimationCollection.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),ModelAnimationCollection.prototype.add=function(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t,i=this._model._runtime.animations;if(defined(e.index))return add(this,e.index,e);for(var r=i.length,n=0;n<r;++n)if(i[n].name===e.name){t=n;break}return add(this,t,e)},ModelAnimationCollection.prototype.addAll=function(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);for(var t=[],i=this._model._runtime.animations.length,r=0;r<i;++r)t.push(add(this,r,e));return t},ModelAnimationCollection.prototype.remove=function(e){if(defined(e)){var t=this._scheduledAnimations,i=t.indexOf(e);if(-1!==i)return t.splice(i,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},ModelAnimationCollection.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var r=0;r<i;++r)this.animationRemoved.raiseEvent(e,t[r])},ModelAnimationCollection.prototype.contains=function(e){return!!defined(e)&&-1!==this._scheduledAnimations.indexOf(e)},ModelAnimationCollection.prototype.get=function(e){return this._scheduledAnimations[e]};var animationsToRemove=[];function createAnimationRemovedFunction(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}function ModelMaterial(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i],this._technique=void 0,this._program=void 0,this._values=void 0}function ModelMesh(e,t,i){for(var r=[],n=e.primitives,a=n.length,o=0;o<a;++o){var s=n[o];r[o]=t[s.material]}this._name=e.name,this._materials=r,this._id=i}function ModelNode(e,t,i,r,n){this._model=e,this._runtimeNode=i,this._name=t.name,this._id=r,this.useMatrix=!1,this._show=!0,this._matrix=Matrix4.clone(n),this._originalMatrix=Matrix4.clone(n)}ModelAnimationCollection.prototype.update=function(e){var t=this._scheduledAnimations,i=t.length;if(0===i)return this._previousTime=void 0,!1;if(JulianDate.equals(e.time,this._previousTime))return!1;this._previousTime=JulianDate.clone(e.time,this._previousTime);for(var r=!1,n=e.time,a=this._model,o=0;o<i;++o){var s=t[o],l=s._runtimeAnimation;defined(s._computedStartTime)||(s._computedStartTime=JulianDate.addSeconds(defaultValue(s.startTime,n),s.delay,new JulianDate)),defined(s._duration)||(s._duration=l.stopTime*(1/s.multiplier));var c=s._computedStartTime,u=s._duration,d=s.stopTime,h=0!==u?JulianDate.secondsDifference(n,c)/u:0;0!==u&&defined(d)&&JulianDate.greaterThan(n,d)&&(h=JulianDate.secondsDifference(d,c)/u);var p=0<=h;c=s.loop===ModelAnimationLoop$1.REPEAT||s.loop===ModelAnimationLoop$1.MIRRORED_REPEAT;!(p=(p||c&&!defined(s.startTime))&&(h<=1||c)&&(!defined(d)||JulianDate.lessThanOrEquals(n,d)))&&s._state!==ModelAnimationState.ANIMATING||(p&&s._state===ModelAnimationState.STOPPED&&(s._state=ModelAnimationState.ANIMATING,0<s.start.numberOfListeners&&e.afterRender.push(s._raiseStartEvent)),s.loop===ModelAnimationLoop$1.REPEAT?h-=Math.floor(h):s.loop===ModelAnimationLoop$1.MIRRORED_REPEAT&&(d=h-(c=Math.floor(h)),h=c%2==1?1-d:d),s.reverse&&(h=1-h),u=h*u*s.multiplier,animateChannels(l,u=CesiumMath.clamp(u,l.startTime,l.stopTime)),0<s.update.numberOfListeners&&(s._updateEventTime=u,e.afterRender.push(s._raiseUpdateEvent)),r=!0,p||(s._state=ModelAnimationState.STOPPED,0<s.stop.numberOfListeners&&e.afterRender.push(s._raiseStopEvent),s.removeOnStop&&animationsToRemove.push(s)))}i=animationsToRemove.length;for(var f=0;f<i;++f){var m=animationsToRemove[f];t.splice(t.indexOf(m),1),e.afterRender.push(createAnimationRemovedFunction(this,a,m))}return animationsToRemove.length=0,r},Object.defineProperties(ModelMaterial.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),ModelMaterial.prototype.setValue=function(e,t){e="u_"+e,(e=this._uniformMap.values[e]).value=e.clone(t,e.value)},ModelMaterial.prototype.getValue=function(e){if(e="u_"+e,defined(e=this._uniformMap.values[e]))return e.value},Object.defineProperties(ModelMesh.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),Object.defineProperties(ModelNode.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=Matrix4.clone(e,this._matrix),this.useMatrix=!0,(e=this._model)._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=e._maxDirtyNumber}},originalMatrix:{get:function(){return this._originalMatrix}}}),ModelNode.prototype.setMatrix=function(e){Matrix4.clone(e,this._matrix)};var MAX_GLTF_UINT16_INDEX=65534;function ModelOutlineLoader(){}function addOutline(e,t,i,r,n){var a,o,s=n.vertexCopies,l=n.extraVertices,c=n.outlineCoordinates,u=e.gltf,d=u.meshes[t].primitives[i],h=u.accessors;t=u.bufferViews;for(o in d.attributes)if(d.attributes.hasOwnProperty(o)){var p=h[d.attributes[o]];if(defined(p)){a=p.count;break}}if(defined(a)){for(var f=h[d.indices],m=t[f.bufferView],g=(r=t[(i=h[r]).bufferView],e._loadResources),y=(t=g.getBuffer(m),r=g.getBuffer(r),new(5123===f.componentType?Uint16Array:Uint32Array)(t.buffer,t.byteOffset+f.byteOffset,f.count)),_=new(5123===i.componentType?Uint16Array:Uint32Array)(r.buffer,r.byteOffset+i.byteOffset,i.count),v=a,C=[v],x=0;x<_.length;x+=2){var b=_[x],S=_[x+1];C[Math.min(b,S)*v+Math.max(b,S)]=1}for(x=0;x<y.length;x+=3)for(var T=y[x],E=y[x+1],w=y[x+2],A=isHighlighted(C,T,E),P=isHighlighted(C,E,w),D=isHighlighted(C,w,T),M=matchAndStoreCoordinates(c,T,E,w,A,P,D);0<=M;){var I=M===T?s[T]:M===E?s[E]:s[w];if(void 0===I){I=a+l.length;for(var R=M;a<=R;)R=l[R-a];l.push(R),s[M]=I}MAX_GLTF_UINT16_INDEX<I&&y instanceof Uint16Array&&(y=new Uint32Array(y),f.componentType=5125,m.buffer=u.buffers.push({byteLength:y.byteLength,extras:{_pipeline:{source:y.buffer}}})-1,m.byteLength=y.byteLength,m.byteOffset=0,e._loadResources.buffers[m.buffer]=new Uint8Array(y.buffer,0,y.byteLength),g.indexBuffersToCreate._array.forEach((function(e){e.id===f.bufferView&&(e.componentType=f.componentType)}))),M===T?(T=I,y[x]=I):M===E?(E=I,y[x+1]=I):(w=I,y[x+2]=I),defined(f.max)&&(f.max[0]=Math.max(f.max[0],I)),M=matchAndStoreCoordinates(c,T,E,w,A,P,D)}}}function computeOrderMask(e,t,i,r,n){var a=e[o=3*t],o=(t=e[1+o],e[2+o]);return void 0===a?63:((a===i&&t===r&&o===n)<<0)+((a===i&&t===n&&o===r)<<1)+((a===r&&t===i&&o===n)<<2)+((a===r&&t===n&&o===i)<<3)+((a===n&&t===i&&o===r)<<4)+((a===n&&t===r&&o===i)<<5)}function popcount0to63(e){return(1&e)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}function matchAndStoreCoordinates(e,t,i,r,n,a,o){var s=o?1:0,l=n?1:0,c=computeOrderMask(e,t,s,l,0);if(0===c)return t;var u=n?1:0,d=a?1:0,h=computeOrderMask(e,i,0,u,d);if(0===h)return i;var p,f,m,g=o?1:0;if(0===(o=computeOrderMask(e,r,g,0,n=a?1:0)))return r;if(1&(a=c&h&o))p=0,f=1,m=2;else if(2&a)p=0,m=1,f=2;else if(4&a)f=0,p=1,m=2;else if(8&a)f=0,m=1,p=2;else if(16&a)m=0,p=1,f=2;else{if(!(32&a))return c=popcount0to63(c),h=popcount0to63(h),o=popcount0to63(o),c<h&&c<o?t:h<o?i:r;m=0,f=1,p=2}return e[(t*=3)+p]=s,e[t+f]=l,e[t+m]=0,e[(i*=3)+p]=0,e[i+f]=u,e[i+m]=d,e[(r*=3)+p]=g,e[r+f]=0,e[r+m]=n,-1}function isHighlighted(e,t,i){var r=e[0];return 1===e[Math.min(t,i)*r+Math.max(t,i)]}function createTexture$2(e){var t=new Uint8Array(e);return t[e-1]=192,8===e?t[e-1]=96:4===e?t[e-1]=48:2===e?t[e-1]=24:1===e&&(t[e-1]=12),t}function updateBufferViewsWithNewVertices(e,t){for(var i=e.gltf,r=e._loadResources,n=0;n<t.length;++n){var a=(y=t[n]).extras._pipeline.vertexNumberingScope;y.extras._pipeline.vertexNumberingScope=void 0;var o=a.extraVertices,s=r.getBuffer(y),l=y.byteStride||4,c=o.length,u=new Uint8Array(s.byteLength+c*l);for(u.set(s),C=0;C<c;++C)for(var d=o[C]*l,h=s.length+C*l,p=0;p<l;++p)u[h+p]=u[d+p];y.byteOffset=0,y.byteLength=u.byteLength;var f=i.buffers.push({byteLength:u.byteLength,extras:{_pipeline:{source:u.buffer}}})-1;y.buffer=f,r.buffers[f]=u;var m=a.accessors;for(C=0;C<m.length;++C){var g=m[C];i.accessors[g].count+=c}if(!a.createdOutlines){y=a.outlineCoordinates,f=new Float32Array(y),y=e.gltf.buffers.push({byteLength:f.byteLength,extras:{_pipeline:{source:f.buffer}}})-1,r.buffers[y]=new Uint8Array(f.buffer,0,f.byteLength);for(var y=e.gltf.bufferViews.push({buffer:y,byteLength:f.byteLength,byteOffset:0,byteStride:3*Float32Array.BYTES_PER_ELEMENT,target:34962})-1,_=e.gltf.accessors.push({bufferView:y,byteOffset:0,componentType:5126,count:f.length/3,type:"VEC3",min:[0,0,0],max:[1,1,1]})-1,v=a.primitives,C=0;C<v.length;++C)v[C].attributes._OUTLINE_COORDINATES=_;r.vertexBuffersToCreate.enqueue(y),a.createdOutlines=!0}}}function compactBuffers(e){for(var t=e.gltf,i=e._loadResources,r=0;r<t.buffers.length;++r){var n=t.buffers[r],a=t.bufferViews.filter(usesBuffer.bind(void 0,r)),o=a.reduce((function(e,t){return e+t.byteLength}),0);if(o!==n.byteLength){for(var s=new Uint8Array(o),l=0,c=0;c<a.length;++c){var u=a[c],d=i.getBuffer(u);s.set(d,l),u.byteOffset=l,l+=d.byteLength}i.buffers[r]=s,n.extras._pipeline.source=s.buffer,n.byteLength=o}}}function usesBuffer(e,t){return t.buffer===e}function getVertexNumberingScope(e,t){var i=t.attributes;if(void 0!==i){var r,n,a=e.gltf;for(n in i)if(i.hasOwnProperty(n)){var o=i[n],s=a.accessors[o].bufferView;if(defined((s=a.bufferViews[s]).extras)||(s.extras={}),defined(s.extras._pipeline)||(s.extras._pipeline={}),defined(s.extras._pipeline.vertexNumberingScope)){if(void 0!==r&&s.extras._pipeline.vertexNumberingScope!==r)return}else s.extras._pipeline.vertexNumberingScope=r||{vertexCopies:[],extraVertices:[],outlineCoordinates:[],accessors:[],bufferViews:[],primitives:[],createdOutlines:!1};(r=s.extras._pipeline.vertexNumberingScope).bufferViews.indexOf(s)<0&&r.bufferViews.push(s),r.accessors.indexOf(o)<0&&r.accessors.push(o)}return r.primitives.push(t),r}}function ComputeCommand(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=defaultValue(e.persists,!1),this.pass=Pass$1.COMPUTE,this.owner=e.owner}ModelOutlineLoader.hasExtension=function(e){return defined(e.extensionsRequired.CESIUM_primitive_outline)||defined(e.extensionsUsed.CESIUM_primitive_outline)},ModelOutlineLoader.outlinePrimitives=function(e){if(ModelOutlineLoader.hasExtension(e)){var t=e.gltf,i=[];ForEach.mesh(t,(function(t,r){ForEach.meshPrimitive(t,(function(t,n){var a;defined(t.extensions)&&(!defined(a=t.extensions.CESIUM_primitive_outline)||void 0!==(t=getVertexNumberingScope(e,t))&&(i.indexOf(t)<0&&i.push(t),addOutline(e,r,n,a.indices,t)))}))}));for(var r=0;r<i.length;++r)updateBufferViewsWithNewVertices(e,i[r].bufferViews);compactBuffers(e)}},ModelOutlineLoader.createTexture=function(e,t){var i=t.cache.modelOutliningCache;if(defined(i)||(i=t.cache.modelOutliningCache={}),defined(i.outlineTexture))return i.outlineTexture;for(var r=Math.min(4096,ContextLimits.maximumTextureSize),n=r,a=createTexture$2(n),o=[];1<n;)n>>=1,o.push(createTexture$2(n));return r=new Texture({context:t,source:{arrayBufferView:a,mipLevels:o},width:r,height:1,pixelFormat:PixelFormat$1.LUMINANCE,sampler:new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR})}),i.outlineTexture=r},ComputeCommand.prototype.execute=function(e){e.execute(this)};var OctahedralProjectionAtlasFS="varying vec2 v_textureCoordinates;\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\nvoid main()\n{\nvec2 uv = v_textureCoordinates;\nvec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\nvec2 pixel = 1.0 / textureSize;\nfloat mipLevel = 0.0;\nif (uv.x - pixel.x > (textureSize.y / textureSize.x))\n{\nmipLevel = 1.0;\nif (uv.y - pixel.y > yMipLevel1)\n{\nmipLevel = 2.0;\nif (uv.y - pixel.y * 3.0 > yMipLevel2)\n{\nmipLevel = 3.0;\nif (uv.y - pixel.y * 5.0 > yMipLevel3)\n{\nmipLevel = 4.0;\nif (uv.y - pixel.y * 7.0 > yMipLevel4)\n{\nmipLevel = 5.0;\n}\n}\n}\n}\n}\nif (mipLevel > 0.0)\n{\nfloat scale = pow(2.0, mipLevel);\nuv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\nuv.x *= ((textureSize.x - 2.0) / textureSize.y);\nuv.x -= 1.0 + pixel.x;\nuv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\nuv *= scale;\n}\nelse\n{\nuv.x *= (textureSize.x / textureSize.y);\n}\nif(mipLevel == 0.0)\n{\ngl_FragColor = texture2D(texture0, uv);\n}\nelse if(mipLevel == 1.0)\n{\ngl_FragColor = texture2D(texture1, uv);\n}\nelse if(mipLevel == 2.0)\n{\ngl_FragColor = texture2D(texture2, uv);\n}\nelse if(mipLevel == 3.0)\n{\ngl_FragColor = texture2D(texture3, uv);\n}\nelse if(mipLevel == 4.0)\n{\ngl_FragColor = texture2D(texture4, uv);\n}\nelse if(mipLevel == 5.0)\n{\ngl_FragColor = texture2D(texture5, uv);\n}\nelse\n{\ngl_FragColor = vec4(0.0);\n}\n}\n",OctahedralProjectionFS="varying vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\nvoid main()\n{\nvec4 rgbm = textureCube(cubeMap, v_cubeMapCoordinates);\nfloat m = rgbm.a * 16.0;\nvec3 r = rgbm.rgb * m;\ngl_FragColor = vec4(r * r, 1.0);\n}\n",OctahedralProjectionVS="attribute vec4 position;\nattribute vec3 cubeMapCoordinates;\nvarying vec3 v_cubeMapCoordinates;\nvoid main()\n{\ngl_Position = position;\nv_cubeMapCoordinates = cubeMapCoordinates;\n}\n";function OctahedralProjectedCubeMap(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._readyPromise=when.defer()}Object.defineProperties(OctahedralProjectedCubeMap.prototype,{url:{get:function(){return this._url}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),OctahedralProjectedCubeMap.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};for(var v1$1=new Cartesian3(1,0,0),v2$1=new Cartesian3(0,0,1),v3=new Cartesian3(-1,0,0),v4=new Cartesian3(0,0,-1),v5=new Cartesian3(0,1,0),v6=new Cartesian3(0,-1,0),cubeMapCoordinates=[v5,v3,v2$1,v6,v1$1,v5,v4,v5,v5],length$1=cubeMapCoordinates.length,flatCubeMapCoordinates=new Float32Array(3*length$1),offset=0,i$2=0;i$2<length$1;++i$2,offset+=3)Cartesian3.pack(cubeMapCoordinates[i$2],flatCubeMapCoordinates,offset);var flatPositions=new Float32Array([-1,1,-1,0,0,1,0,0,1,0,1,1,0,-1,-1,-1,1,-1]),indices=new Uint16Array([0,1,2,2,3,1,7,6,1,3,6,1,2,5,4,3,4,2,4,8,6,3,4,6]);function createVertexArray$3(e){var t=Buffer$1.createVertexBuffer({context:e,typedArray:flatPositions,usage:BufferUsage$1.STATIC_DRAW}),i=Buffer$1.createVertexBuffer({context:e,typedArray:flatCubeMapCoordinates,usage:BufferUsage$1.STATIC_DRAW}),r=Buffer$1.createIndexBuffer({context:e,typedArray:indices,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT});return new VertexArray({context:e,attributes:[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:ComponentDatatype$1.FLOAT},{index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT}],indexBuffer:r})}function createUniformTexture(e){return function(){return e}}function cleanupResources(e){var t,i;e._va=e._va&&e._va.destroy(),e._sp=e._sp&&e._sp.destroy();var r=e._cubeMaps;if(defined(r))for(i=r.length,t=0;t<i;++t)r[t].destroy();var n=e._mipTextures;if(defined(n))for(i=n.length,t=0;t<i;++t)n[t].destroy();e._va=void 0,e._sp=void 0,e._cubeMaps=void 0,e._cubeMapBuffers=void 0,e._mipTextures=void 0}OctahedralProjectedCubeMap.prototype.update=function(e){var t=e.context;if(OctahedralProjectedCubeMap.isSupported(t)&&(defined(this._texture)&&defined(this._va)&&cleanupResources(this),!defined(this._texture))){if(!defined(this._texture)&&!this._loading){var i=t.textureCache.getTexture(this._url);if(defined(i))return cleanupResources(this),this._texture=i,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0,void this._readyPromise.resolve()}var r,n=this._cubeMapBuffers;if(defined(n)||this._loading||(loadKTX((r=this)._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject),this._loading=!0),defined(this._cubeMapBuffers)){this._va=createVertexArray$3(t),this._sp=ShaderProgram.fromCache({context:t,vertexShaderSource:OctahedralProjectionVS,fragmentShaderSource:OctahedralProjectionFS,attributeLocations:{position:0,cubeMapCoordinates:1}});var a=Math.min(n.length,6);this._maximumMipmapLevel=a-1;for(var o=this._cubeMaps=new Array(a),s=this._mipTextures=new Array(a),l=2*n[0].positiveX.width,c={originalSize:function(){return l}},u=t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT,d=PixelFormat$1.RGBA,h=0;h<a;++h){var p=n[h].positiveY;n[h].positiveY=n[h].negativeY,n[h].negativeY=p;var f=o[h]=new CubeMap({context:t,source:n[h]});p=2*o[h].width,p=s[h]=new Texture({context:t,width:p,height:p,pixelDatatype:u,pixelFormat:d}),f=new ComputeCommand({vertexArray:this._va,shaderProgram:this._sp,uniformMap:{cubeMap:createUniformTexture(f)},outputTexture:p,persists:!0,owner:this});e.commandList.push(f),c["texture"+h]=createUniformTexture(p)}this._texture=new Texture({context:t,width:1.5*l+2,height:l,pixelDatatype:u,pixelFormat:d}),this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),i=new ComputeCommand({fragmentShaderSource:OctahedralProjectionAtlasFS,uniformMap:c,outputTexture:this._texture,persists:!1,owner:this}),e.commandList.push(i),this._ready=!0,this._readyPromise.resolve()}}},OctahedralProjectedCubeMap.prototype.isDestroyed=function(){return!1},OctahedralProjectedCubeMap.prototype.destroy=function(){return cleanupResources(this),this._texture=this._texture&&this._texture.destroy(),destroyObject(this)};var boundingSphereCartesian3Scratch$1=new Cartesian3,ModelState$1=ModelUtility.ModelState,defaultModelAccept="model/gltf-binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01",articulationEpsilon=CesiumMath.EPSILON16;function setCachedGltf(e,t){e._cachedGltf=t}function CachedGltf(e){this._gltf=e.gltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}Object.defineProperties(CachedGltf.prototype,{gltf:{set:function(e){this._gltf=e},get:function(){return this._gltf}}}),CachedGltf.prototype.makeReady=function(e){this.gltf=e;for(var t=this.modelsToLoad,i=t.length,r=0;r<i;++r){var n=t[r];n.isDestroyed()||setCachedGltf(n,this)}this.modelsToLoad=void 0,this.ready=!0};var gltfCache={},uriToGuid={};function Model(e){var t,i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).cacheKey;this._cacheKey=i,this._cachedGltf=void 0,this._releaseGltfJson=defaultValue(e.releaseGltfJson,!1),defined(i)&&defined(gltfCache[i])&&gltfCache[i].ready?++(r=gltfCache[i]).count:defined(t=e.gltf)&&(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(r=t instanceof Uint8Array?new CachedGltf({gltf:parseGlb(t),ready:!0}):new CachedGltf({gltf:e.gltf,ready:!0})).count=1,defined(i)&&(gltfCache[i]=r)),setCachedGltf(this,r);var r=defaultValue(e.basePath,"");this._resource=Resource.createIfNeeded(r),"string"==typeof(r=e.credit)&&(r=new Credit(r)),this._credit=r,this._resourceCredits=[],this.show=defaultValue(e.show,!0),this.silhouetteColor=defaultValue(e.silhouetteColor,Color.RED),this._silhouetteColor=new Color,this._silhouetteColorPreviousAlpha=1,this._normalAttributeName=void 0,this.silhouetteSize=defaultValue(e.silhouetteSize,0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=defaultValue(e.scale,1),this._scale=this.scale,this.minimumPixelSize=defaultValue(e.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=e.maximumScale,this._maximumScale=this.maximumScale,this.id=e.id,this._id=e.id,this.heightReference=defaultValue(e.heightReference,HeightReference$1.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0,r=e.scene,defined(this._scene=r)&&defined(r.terrainProviderChanged)&&(this._terrainProviderChangedCallback=r.terrainProviderChanged.addEventListener((function(){this._heightChanged=!0}),this)),this._pickObject=e.pickObject,this._allowPicking=defaultValue(e.allowPicking,!0),this._ready=!1,this._readyPromise=when.defer(),this.activeAnimations=new ModelAnimationCollection(this),this.clampAnimations=defaultValue(e.clampAnimations,!0),this._defaultTexture=void 0,this._incrementallyLoadTextures=defaultValue(e.incrementallyLoadTextures,!0),this._asynchronous=defaultValue(e.asynchronous,!0),this.shadows=defaultValue(e.shadows,ShadowMode$1.ENABLED),this._shadows=this.shadows,this.color=Color.clone(defaultValue(e.color,Color.WHITE)),this._colorPreviousAlpha=1,this.colorBlendMode=defaultValue(e.colorBlendMode,ColorBlendMode$1.HIGHLIGHT),this.colorBlendAmount=defaultValue(e.colorBlendAmount,.5),this._colorShadingEnabled=!1,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._clippingPlanesState=0,this.referenceMatrix=void 0,this.backFaceCulling=defaultValue(e.backFaceCulling,!0),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=defaultValue(e.debugWireframe,!1),this._debugWireframe=!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._addBatchIdToGeneratedShaders=e.addBatchIdToGeneratedShaders,this._precreatedAttributes=e.precreatedAttributes,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=defaultValue(e.ignoreCommands,!1),this._requestType=e.requestType,this._upAxis=defaultValue(e.upAxis,Axis$1.Y),this._gltfForwardAxis=Axis$1.Z,this._forwardAxis=e.forwardAxis,this.cull=defaultValue(e.cull,!0),this.opaquePass=defaultValue(e.opaquePass,Pass$1.OPAQUE),this._computedModelMatrix=new Matrix4,this._clippingPlanesMatrix=Matrix4.clone(Matrix4.IDENTITY),this._iblReferenceFrameMatrix=Matrix3.clone(Matrix3.IDENTITY),this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new BoundingSphere,this._state=ModelState$1.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._perNodeShowDirty=!1,this._cesiumAnimationsDirty=!1,this._dirty=!1,this._maxDirtyNumber=0,this._runtime={animations:void 0,articulationsByName:void 0,articulationsByStageKey:void 0,stagesByKey:void 0,rootNodes:void 0,nodes:void 0,nodesByName:void 0,skinnedNodes:void 0,meshesByName:void 0,materialsByName:void 0,materialsById:void 0},this._uniformMaps={},this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms={},this._programPrimitives={},this._rendererResources={buffers:{},vertexArrays:{},programs:{},sourceShaders:{},silhouettePrograms:{},textures:{},samplers:{},renderStates:{}},this._cachedRendererResources=void 0,this._loadRendererResourcesFromCache=!1,this._dequantizeInShader=defaultValue(e.dequantizeInShader,!0),this._decodedData={},this._cachedGeometryByteLength=0,this._cachedTexturesByteLength=0,this._geometryByteLength=0,this._texturesByteLength=0,this._trianglesLength=0,this._sourceTechniques={},this._sourcePrograms={},this._quantizedVertexShaders={},this._nodeCommands=[],this._pickIds=[],this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0,this._sourceVersion=void 0,this._sourceKHRTechniquesWebGL=void 0,this._imageBasedLightingFactor=new Cartesian2(1,1),Cartesian2.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this._lightColor=Cartesian3.clone(e.lightColor),this._luminanceAtZenith=void 0,this.luminanceAtZenith=defaultValue(e.luminanceAtZenith,.2),this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._shouldUpdateSpecularMapAtlas=!0,this._specularEnvironmentMapAtlas=void 0,this._useDefaultSphericalHarmonics=!1,this._useDefaultSpecularMaps=!1,this._shouldRegenerateShaders=!1}function silhouetteSupported(e){return e.stencilBuffer}function isColorShadingEnabled(e){return!Color.equals(e.color,Color.WHITE)||e.colorBlendMode!==ColorBlendMode$1.HIGHLIGHT}function isClippingEnabled(e){return defined(e=e._clippingPlanes)&&e.enabled&&0!==e.length}function containsGltfMagic(e){return"glTF"===getMagic(e)}function getRuntime(e,t,i){return e._runtime[t][i]}Object.defineProperties(Model.prototype,{gltf:{get:function(){return defined(this._cachedGltf)?this._cachedGltf.gltf:void 0}},releaseGltfJson:{get:function(){return this._releaseGltfJson}},cacheKey:{get:function(){return this._cacheKey}},basePath:{get:function(){return this._resource.url}},boundingSphere:{get:function(){var e=this.modelMatrix;this.heightReference!==HeightReference$1.NONE&&this._clampedModelMatrix&&(e=this._clampedModelMatrix);var t=Matrix4.getScale(e,boundingSphereCartesian3Scratch$1);e=defined(this.maximumScale)?Math.min(this.maximumScale,this.scale):this.scale;return Cartesian3.multiplyByScalar(t,e,t),(e=this._scaledBoundingSphere).center=Cartesian3.multiplyComponents(this._boundingSphere.center,t,e.center),e.radius=Cartesian3.maximumComponent(t)*this._initialRadius,defined(this._rtcCenter)&&Cartesian3.add(this._rtcCenter,e.center,e.center),e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},asynchronous:{get:function(){return this._asynchronous}},allowPicking:{get:function(){return this._allowPicking}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},pendingTextureLoads:{get:function(){return defined(this._loadResources)?this._loadResources.pendingTextureLoads:0}},dirty:{get:function(){return this._dirty}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition)}},extensionsUsed:{get:function(){return defined(this._extensionsUsed)||(this._extensionsUsed=ModelUtility.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return defined(this._extensionsRequired)||(this._extensionsRequired=ModelUtility.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},forwardAxis:{get:function(){return defined(this._forwardAxis)?this._forwardAxis:this._gltfForwardAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return this._texturesByteLength}},cachedGeometryByteLength:{get:function(){return this._cachedGeometryByteLength}},cachedTexturesByteLength:{get:function(){return this._cachedTexturesByteLength}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&ClippingPlaneCollection.setOwner(e,this,"_clippingPlanes")}},pickIds:{get:function(){return this._pickIds}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){var t=this._imageBasedLightingFactor;e===t||Cartesian2.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||0<this._imageBasedLightingFactor.x&&0===e.x||0===this._imageBasedLightingFactor.x&&0<e.x,this._shouldRegenerateShaders=this._shouldRegenerateShaders||0<this._imageBasedLightingFactor.y&&0===e.y||0===this._imageBasedLightingFactor.y&&0<e.y,Cartesian2.clone(e,this._imageBasedLightingFactor))}},lightColor:{get:function(){return this._lightColor},set:function(e){var t=this._lightColor;e===t||Cartesian3.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||defined(t)&&!defined(e)||defined(e)&&!defined(t),this._lightColor=Cartesian3.clone(e,t))}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){var t=this._luminanceAtZenith;e!==t&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||defined(t)&&!defined(e)||defined(e)&&!defined(t),this._luminanceAtZenith=e)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){e!==this._sphericalHarmonicCoefficients&&(this._sphericalHarmonicCoefficients=e,this._shouldRegenerateShaders=!0)}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){this._shouldUpdateSpecularMapAtlas=this._shouldUpdateSpecularMapAtlas||e!==this._specularEnvironmentMaps,this._specularEnvironmentMaps=e}},credit:{get:function(){return this._credit}}}),Model.silhouetteSupported=function(e){return silhouetteSupported(e.context)},Model.fromGltf=function(e){var t=e.url;e=clone(e);var i=Resource.createIfNeeded(t),r=defaultValue(e.basePath,i.clone());t=Resource.createIfNeeded(r);defined(r=defaultValue(e.cacheKey,uriToGuid[getAbsoluteUri(i.url)]))||(r=createGuid(),uriToGuid[getAbsoluteUri(i.url)]=r),defined(e.basePath)&&!defined(e.cacheKey)&&(r+=t.url),e.cacheKey=r,e.basePath=t;var n=new Model(e),a=gltfCache[r];return defined(a)?a.ready||(++a.count,a.modelsToLoad.push(n)):((a=new CachedGltf({ready:!1})).count=1,a.modelsToLoad.push(n),setCachedGltf(n,a),gltfCache[r]=a,defined(i.headers.Accept)||(i.headers.Accept=defaultModelAccept),i.fetchArrayBuffer().then((function(e){var t=new Uint8Array(e);containsGltfMagic(t)?(e=parseGlb(t),a.makeReady(e)):(t=getStringFromTypedArray(t),a.makeReady(JSON.parse(t)));var r=n._resourceCredits,o=i.credits;if(defined(o))for(var s=o.length,l=0;l<s;l++)r.push(o[l])})).otherwise(ModelUtility.getFailedLoadFunction(n,"model",i.url))),n},Model._gltfCache=gltfCache,Model.prototype.getNode=function(e){return defined(e=getRuntime(this,"nodesByName",e))?e.publicNode:void 0},Model.prototype.getMesh=function(e){return getRuntime(this,"meshesByName",e)},Model.prototype.getMaterial=function(e){return getRuntime(this,"materialsByName",e)},Model.prototype.setArticulationStage=function(e,t){var i=getRuntime(this,"stagesByKey",e);e=getRuntime(this,"articulationsByStageKey",e);defined(i)&&defined(e)&&(t=CesiumMath.clamp(t,i.minimumValue,i.maximumValue),CesiumMath.equalsEpsilon(i.currentValue,t,articulationEpsilon)||(i.currentValue=t,e.isDirty=!0))};var scratchArticulationCartesian=new Cartesian3,scratchArticulationRotation=new Matrix3;function applyArticulationStageMatrix(e,t){var i,r=e.currentValue,n=scratchArticulationCartesian;switch(e.type){case"xRotate":i=Matrix3.fromRotationX(CesiumMath.toRadians(r),scratchArticulationRotation),Matrix4.multiplyByMatrix3(t,i,t);break;case"yRotate":i=Matrix3.fromRotationY(CesiumMath.toRadians(r),scratchArticulationRotation),Matrix4.multiplyByMatrix3(t,i,t);break;case"zRotate":i=Matrix3.fromRotationZ(CesiumMath.toRadians(r),scratchArticulationRotation),Matrix4.multiplyByMatrix3(t,i,t);break;case"xTranslate":n.x=r,n.y=0,n.z=0,Matrix4.multiplyByTranslation(t,n,t);break;case"yTranslate":n.x=0,n.y=r,n.z=0,Matrix4.multiplyByTranslation(t,n,t);break;case"zTranslate":n.x=0,n.y=0,n.z=r,Matrix4.multiplyByTranslation(t,n,t);break;case"xScale":n.x=r,n.y=1,n.z=1,Matrix4.multiplyByScale(t,n,t);break;case"yScale":n.x=1,n.y=r,n.z=1,Matrix4.multiplyByScale(t,n,t);break;case"zScale":n.x=1,n.y=1,n.z=r,Matrix4.multiplyByScale(t,n,t);break;case"uniformScale":Matrix4.multiplyByUniformScale(t,r,t)}return t}var scratchApplyArticulationTransform=new Matrix4;function addBuffersToLoadResources$1(e){var t=e.gltf,i=e._loadResources;ForEach.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function bufferLoad(e,t){return function(i){var r=e._loadResources;i=new Uint8Array(i);--r.pendingBufferLoads,e.gltf.buffers[t].extras._pipeline.source=i}}function parseBufferViews$1(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;ForEach.bufferView(e.gltf,(function(e,t){e.target===WebGLConstants$1.ARRAY_BUFFER&&i.enqueue(t)}));var r=e._loadResources.indexBuffersToCreate,n={};ForEach.accessor(e.gltf,(function(e){var i=e.bufferView;defined(i)&&(t[i].target!==WebGLConstants$1.ELEMENT_ARRAY_BUFFER||defined(n[i])||(n[i]=!0,r.enqueue({id:i,componentType:e.componentType})))}))}function parseTechniques(e){var t,i,r,n=e.gltf;hasExtension(n,"KHR_techniques_webgl")&&(t=e._sourcePrograms,i=e._sourceTechniques,r=n.extensions.KHR_techniques_webgl.programs,ForEach.technique(n,(function(e,n){i[n]=clone(e),e=e.program,defined(t[e])||(t[e]=clone(r[e]))})))}function shaderLoad(e,t,i){return function(r){var n=e._loadResources;n.shaders[i]={source:r,type:t,bufferView:void 0},--n.pendingShaderLoads,e._rendererResources.sourceShaders[i]=r}}function parseShaders(e){var t=e.gltf,i=t.buffers,r=t.bufferViews,n=e._rendererResources.sourceShaders;ForEach.shader(t,(function(t,a){var o,s;defined(t.bufferView)?(o=t.bufferView,o=(s=r[o]).buffer,s=getStringFromTypedArray(i[o].extras._pipeline.source,s.byteOffset,s.byteLength),n[a]=s):defined(t.extras._pipeline.source)?n[a]=t.extras._pipeline.source:(++e._loadResources.pendingShaderLoads,(s=e._resource.getDerivedResource({url:t.uri})).fetchText().then(shaderLoad(e,t.type,a)).otherwise(ModelUtility.getFailedLoadFunction(e,"shader",s.url)))}))}function parsePrograms(e){var t,i,r=e._sourceTechniques;for(t in r)r.hasOwnProperty(t)&&(i=r[t],e._loadResources.programsToCreate.enqueue({programId:i.program,techniqueId:t}))}function parseArticulations(e){var t={},i={},r={};if(e._runtime.articulationsByName=t,e._runtime.articulationsByStageKey=i,e._runtime.stagesByKey=r,hasExtension(e=e.gltf,"AGI_articulations")&&defined(e.extensions)&&defined(e.extensions.AGI_articulations)){var n=e.extensions.AGI_articulations.articulations;if(defined(n))for(var a=n.length,o=0;o<a;++o){var s=clone(n[o]);s.nodes=[],s.isDirty=!0;for(var l=(t[s.name]=s).stages.length,c=0;c<l;++c){var u=s.stages[c];u.currentValue=u.initialValue;var d=s.name+" "+u.name;i[d]=s,r[d]=u}}}}function imageLoad(e,t){return function(i){var r=e._loadResources;--r.pendingTextureLoads,r.texturesToCreate.enqueue({id:t,image:i,bufferView:i.bufferView,width:i.width,height:i.height,internalFormat:i.internalFormat})}}Model.prototype.applyArticulations=function(){var e,t=this._runtime.articulationsByName;for(e in t)if(t.hasOwnProperty(e)){var i=t[e];if(i.isDirty){i.isDirty=!1;for(var r=i.nodes.length,n=0;n<r;++n){for(var a=i.nodes[n],o=Matrix4.clone(a.originalMatrix,scratchApplyArticulationTransform),s=i.stages.length,l=0;l<s;++l)o=applyArticulationStageMatrix(i.stages[l],o);a.matrix=o}}}};var ktxRegex$1=/(^data:image\/ktx)|(\.ktx$)/i,crnRegex$1=/(^data:image\/crn)|(\.crn$)/i;function parseTextures(e,t,i){var r,n=e.gltf,a=n.images;ForEach.texture(n,(function(n,o){var s=n.source;defined(n.extensions)&&defined(n.extensions.EXT_texture_webp)&&i&&(s=n.extensions.EXT_texture_webp.source);var l=a[s],c=l.extras,u=l.bufferView,d=l.mimeType;r=l.uri,defined(c)&&defined(c.compressedImage3DTiles)&&(n=c.compressedImage3DTiles.crunch,s=c.compressedImage3DTiles.s3tc,l=c.compressedImage3DTiles.pvrtc1,c=c.compressedImage3DTiles.etc1,t.s3tc&&defined(n)?(d=n.mimeType,defined(n.bufferView)?u=n.bufferView:r=n.uri):t.s3tc&&defined(s)?(d=s.mimeType,defined(s.bufferView)?u=s.bufferView:r=s.uri):t.pvrtc&&defined(l)?(d=l.mimeType,defined(l.bufferView)?u=l.bufferView:r=l.uri):t.etc1&&defined(c)&&(d=c.mimeType,defined(c.bufferView)?u=c.bufferView:r=c.uri)),defined(u)?e._loadResources.texturesToCreateFromBufferView.enqueue({id:o,image:void 0,bufferView:u,mimeType:d}):(++e._loadResources.pendingTextureLoads,d=e._resource.getDerivedResource({url:r}),(ktxRegex$1.test(r)?loadKTX(d):crnRegex$1.test(r)?loadCRN(d):d.fetchImage()).then(imageLoad(e,o)).otherwise(ModelUtility.getFailedLoadFunction(e,"image",d.url)))}))}var scratchArticulationStageInitialTransform=new Matrix4;function parseNodes(e){var t={},i={},r=[],n=e._loadResources.skinnedNodesIds,a=e._runtime.articulationsByName;ForEach.node(e.gltf,(function(o,s){var l={matrix:void 0,translation:void 0,rotation:void 0,scale:void 0,computedShow:!0,transformToRoot:new Matrix4,computedMatrix:new Matrix4,dirtyNumber:0,commands:[],inverseBindMatrices:void 0,bindShapeMatrix:void 0,joints:[],computedJointMatrices:[],jointName:o.jointName,weights:[],children:[],parents:[],publicNode:void 0};if(l.publicNode=new ModelNode(e,o,l,s,ModelUtility.getTransform(o)),t[s]=l,i[o.name]=l,defined(o.skin)&&(n.push(s),r.push(l)),defined(o.extensions)&&defined(o.extensions.AGI_articulations)&&defined(o=o.extensions.AGI_articulations.articulationName)){var c=Matrix4.clone(l.publicNode.originalMatrix,scratchArticulationStageInitialTransform),u=a[o];u.nodes.push(l.publicNode);for(var d=u.stages.length,h=0;h<d;++h)c=applyArticulationStageMatrix(u.stages[h],c);l.publicNode.matrix=c}})),e._runtime.nodes=t,e._runtime.nodesByName=i,e._runtime.skinnedNodes=r}function parseMaterials(e){var t=e.gltf,i=e._sourceTechniques,r={},n={},a=e._uniformMaps;ForEach.material(t,(function(t,o){a[o]={uniformMap:void 0,values:void 0,jointMatrixUniformName:void 0,morphWeightsUniformName:void 0};var s,l=new ModelMaterial(e,t,o);defined(t.extensions)&&defined(t.extensions.KHR_techniques_webgl)&&(s=t.extensions.KHR_techniques_webgl.technique,l._technique=s,l._program=i[s].program,ForEach.materialValue(t,(function(e,t){defined(l._values)||(l._values={}),l._values[t]=clone(e)}))),r[t.name]=l,n[o]=l})),e._runtime.materialsByName=r,e._runtime.materialsById=n}function parseMeshes(e){var t={},i=e._runtime.materialsById;ForEach.mesh(e.gltf,(function(r,n){t[r.name]=new ModelMesh(r,i,n),(defined(e.extensionsUsed.WEB3D_quantized_attributes)||e._dequantizeInShader)&&ForEach.meshPrimitive(r,(function(t,i){var r=getProgramForPrimitive(e,t),a=e._programPrimitives[r];defined(a)||(a={},e._programPrimitives[r]=a),a[n+".primitive."+i]=t}))})),e._runtime.meshesByName=t}var CreateVertexBufferJob=function(){this.id=void 0,this.model=void 0,this.context=void 0};function createVertexBuffer$1(e,t,i){var r=t._loadResources,n=t.gltf.bufferViews[e];defined(n)||(n=r.createdBufferViews[e]),(n=Buffer$1.createVertexBuffer({context:i,typedArray:r.getBuffer(n),usage:BufferUsage$1.STATIC_DRAW})).vertexArrayDestroyable=!1,t._rendererResources.buffers[e]=n,t._geometryByteLength+=n.sizeInBytes}CreateVertexBufferJob.prototype.set=function(e,t,i){this.id=e,this.model=t,this.context=i},CreateVertexBufferJob.prototype.execute=function(){createVertexBuffer$1(this.id,this.model,this.context)};var CreateIndexBufferJob=function(){this.id=void 0,this.componentType=void 0,this.model=void 0,this.context=void 0};function createIndexBuffer$1(e,t,i,r){var n=i._loadResources,a=i.gltf.bufferViews[e];defined(a)||(a=n.createdBufferViews[e]),(t=Buffer$1.createIndexBuffer({context:r,typedArray:n.getBuffer(a),usage:BufferUsage$1.STATIC_DRAW,indexDatatype:t})).vertexArrayDestroyable=!1,i._rendererResources.buffers[e]=t,i._geometryByteLength+=t.sizeInBytes}CreateIndexBufferJob.prototype.set=function(e,t,i,r){this.id=e,this.componentType=t,this.model=i,this.context=r},CreateIndexBufferJob.prototype.execute=function(){createIndexBuffer$1(this.id,this.componentType,this.model,this.context)};var scratchVertexBufferJob=new CreateVertexBufferJob,scratchIndexBufferJob=new CreateIndexBufferJob;function createBuffers$1(e,t){var i=e._loadResources;if(0===i.pendingBufferLoads){var r,n=t.context,a=i.vertexBuffersToCreate,o=i.indexBuffersToCreate;if(e.asynchronous){for(;0<a.length&&(scratchVertexBufferJob.set(a.peek(),e,n),t.jobScheduler.execute(scratchVertexBufferJob,JobType$1.BUFFER));)a.dequeue();for(;0<o.length&&(r=o.peek(),scratchIndexBufferJob.set(r.id,r.componentType,e,n),t.jobScheduler.execute(scratchIndexBufferJob,JobType$1.BUFFER));)o.dequeue()}else{for(;0<a.length;)createVertexBuffer$1(a.dequeue(),e,n);for(;0<o.length;)createIndexBuffer$1((r=o.dequeue()).id,r.componentType,e,n)}}}function getProgramForPrimitive(e,t){if(defined(t=e._runtime.materialsById[t.material]))return t._program}function modifyShaderForQuantizedAttributes$1(e,t,i){var r,n,a,o=i._programPrimitives[t];if(!defined(o))return e;for(n in o)if(o.hasOwnProperty(n)&&getProgramForPrimitive(i,r=o[n])===t)break;if(i._programPrimitives[t]=void 0,i.extensionsUsed.WEB3D_quantized_attributes)a=ModelUtility.modifyShaderForQuantizedAttributes(i.gltf,r,e),i._quantizedUniforms[t]=a.uniforms;else{var s=i._decodedData[n];if(!defined(s))return e;a=ModelUtility.modifyShaderForDracoQuantizedAttributes(i.gltf,r,e,s.attributes)}return a.shader}function modifyShaderForColor(e){return(e=ShaderSource.replaceMain(e,"gltf_blend_main"))+"uniform vec4 gltf_color; \nuniform float gltf_colorBlend; \nvoid main() \n{ \n    gltf_blend_main(); \n    gl_FragColor.rgb = mix(gl_FragColor.rgb, gltf_color.rgb, gltf_colorBlend); \n    float highlight = ceil(gltf_colorBlend); \n    gl_FragColor.rgb *= mix(gltf_color.rgb, vec3(1.0), highlight); \n    gl_FragColor.a *= gltf_color.a; \n} \n"}function modifyShader$1(e,t,i){return defined(i)&&(e=i(e,t)),e}var CreateProgramJob=function(){this.programToCreate=void 0,this.model=void 0,this.context=void 0};function createProgram$1(e,t,i){var r=e.programId,n=e.techniqueId,a=t._sourcePrograms[r],o=(s=t._rendererResources.sourceShaders)[a.vertexShader],s=(e=s[a.fragmentShader],t._quantizedVertexShaders);(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(defined(l=s[r])||(l=modifyShaderForQuantizedAttributes$1(o,r,t),s[r]=l),o=l),a=modifyShader$1(o,r,t._vertexShaderLoaded),s=modifyShader$1(e,r,t._fragmentShaderLoaded),defined(t._uniformMapLoaded)||(s="uniform vec4 czm_pickColor;\n"+s);var l=0<t._imageBasedLightingFactor.x||0<t._imageBasedLightingFactor.y;l&&(s="#define USE_IBL_LIGHTING \n\n"+s),defined(t._lightColor)&&(s="#define USE_CUSTOM_LIGHT_COLOR \n\n"+s),"2.0"===t._sourceVersion&&!t._sourceKHRTechniquesWebGL||(s=ShaderSource.replaceMain(s,"non_gamma_corrected_main"),s+="\nvoid main() { \n    non_gamma_corrected_main(); \n    gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),OctahedralProjectedCubeMap.isSupported(i)&&(o=defined(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,e=defined(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps,(o||e||l)&&(s="uniform mat3 gltf_iblReferenceFrameMatrix; \n"+s),defined(t._sphericalHarmonicCoefficients)?s="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+s:t._useDefaultSphericalHarmonics&&(s="#define DIFFUSE_IBL \n"+s),defined(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?s="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+s:t._useDefaultSpecularMaps&&(s="#define SPECULAR_IBL \n"+s)),defined(t._luminanceAtZenith)&&(s="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+s),createAttributesAndProgram(r,n,s,a,t,i)}function recreateProgram(e,t,i){var r=e.programId,n=e.techniqueId,a=t._sourcePrograms[r],o=t._rendererResources.sourceShaders,s=t._quantizedVertexShaders,l=t.clippingPlanes,c=isClippingEnabled(t);e=o[a.vertexShader],a=o[a.fragmentShader];(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(e=s[r]),s=a,isColorShadingEnabled(t)&&(s=Model._modifyShaderForColor(s)),c&&(s=modifyShaderForClippingPlanes(s,l,i)),a=modifyShader$1(e,r,t._vertexShaderLoaded),c=modifyShader$1(s,r,t._fragmentShaderLoaded),defined(t._uniformMapLoaded)||(c="uniform vec4 czm_pickColor;\n"+c),(l=0<t._imageBasedLightingFactor.x||0<t._imageBasedLightingFactor.y)&&(c="#define USE_IBL_LIGHTING \n\n"+c),defined(t._lightColor)&&(c="#define USE_CUSTOM_LIGHT_COLOR \n\n"+c),"2.0"===t._sourceVersion&&!t._sourceKHRTechniquesWebGL||(c=ShaderSource.replaceMain(c,"non_gamma_corrected_main"),c+="\nvoid main() { \n    non_gamma_corrected_main(); \n    gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),OctahedralProjectedCubeMap.isSupported(i)&&(e=defined(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,s=defined(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps,(e||s||l)&&(c="uniform mat3 gltf_iblReferenceFrameMatrix; \n"+c),defined(t._sphericalHarmonicCoefficients)?c="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+c:t._useDefaultSphericalHarmonics&&(c="#define DIFFUSE_IBL \n"+c),defined(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?c="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+c:t._useDefaultSpecularMaps&&(c="#define SPECULAR_IBL \n"+c)),defined(t._luminanceAtZenith)&&(c="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+c),createAttributesAndProgram(r,n,c,a,t,i)}function createAttributesAndProgram(e,t,i,r,n,a){t=n._sourceTechniques[t],t=ModelUtility.createAttributeLocations(t,n._precreatedAttributes),n._rendererResources.programs[e]=ShaderProgram.fromCache({context:a,vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:t})}CreateProgramJob.prototype.set=function(e,t,i){this.programToCreate=e,this.model=t,this.context=i},CreateProgramJob.prototype.execute=function(){createProgram$1(this.programToCreate,this.model,this.context)};var scratchCreateProgramJob=new CreateProgramJob;function createPrograms(e,t){var i=e._loadResources,r=i.programsToCreate;if(0===i.pendingShaderLoads&&0===i.pendingBufferLoads){var n=t.context;if(e.asynchronous)for(;0<r.length&&(scratchCreateProgramJob.set(r.peek(),e,n),t.jobScheduler.execute(scratchCreateProgramJob,JobType$1.PROGRAM));)r.dequeue();else for(;0<r.length;)createProgram$1(r.dequeue(),e,n)}}function getOnImageCreatedFromTypedArray(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}function loadTexturesFromBufferViews(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;0<t.texturesToCreateFromBufferView.length;){var i=t.texturesToCreateFromBufferView.dequeue(),r=e.gltf,n=r.bufferViews[i.bufferView],a=(r.textures[i.id].source,ModelUtility.getFailedLoadFunction(e,"image","id: "+i.id+", bufferView: "+i.bufferView));"image/ktx"===i.mimeType?(loadKTX(t.getBuffer(n)).then(imageLoad(e,i.id)).otherwise(a),++e._loadResources.pendingTextureLoads):"image/crn"===i.mimeType?(loadCRN(t.getBuffer(n)).then(imageLoad(e,i.id)).otherwise(a),++e._loadResources.pendingTextureLoads):(r=getOnImageCreatedFromTypedArray(t,i),loadImageFromTypedArray({uint8Array:t.getBuffer(n),format:i.mimeType,flipY:!1}).then(r).otherwise(a),++t.pendingBufferViewToImage)}}function createSamplers(e){var t,i=e._loadResources;i.createSamplers&&(i.createSamplers=!1,t=e._rendererResources.samplers,ForEach.sampler(e.gltf,(function(e,i){t[i]=new Sampler({wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:e.minFilter,magnificationFilter:e.magFilter})})))}var CreateTextureJob=function(){this.gltfTexture=void 0,this.model=void 0,this.context=void 0};function createTexture$3(e,t,i){var r=t.gltf.textures[e.id],n=t._rendererResources.samplers[r.sampler];defined(n)||(n=new Sampler({wrapS:TextureWrap$1.REPEAT,wrapT:TextureWrap$1.REPEAT}));for(var a=!1,o=t.gltf.materials,s=o.length,l=0;l<s;++l){var c=o[l];if(defined(c.extensions)&&defined(c.extensions.KHR_techniques_webgl)){var u,d=c.extensions.KHR_techniques_webgl.values;for(u in d)if(d.hasOwnProperty(u)&&-1!==u.indexOf("Texture")){var h=d[u];if(h.index===e.id&&defined(h.extensions)&&defined(h.extensions.KHR_texture_transform)){a=!0;break}}}if(a)break}var p=n.wrapS,f=n.wrapT,m=n.minificationFilter;a&&m!==TextureMinificationFilter$1.LINEAR&&m!==TextureMinificationFilter$1.NEAREST&&(m=m===TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST||m===TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR?TextureMinificationFilter$1.NEAREST:TextureMinificationFilter$1.LINEAR,n=new Sampler({wrapS:n.wrapS,wrapT:n.wrapT,textureMinificationFilter:m,textureMagnificationFilter:n.magnificationFilter}));var g,y=e.internalFormat;p=(m=!(defined(y)&&PixelFormat$1.isCompressedFormat(y)||m!==TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST&&m!==TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR&&m!==TextureMinificationFilter$1.LINEAR_MIPMAP_NEAREST&&m!==TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR))||p===TextureWrap$1.REPEAT||p===TextureWrap$1.MIRRORED_REPEAT||f===TextureWrap$1.REPEAT||f===TextureWrap$1.MIRRORED_REPEAT,f=e.image;defined(y)?g=new Texture({context:i,source:{arrayBufferView:e.bufferView},width:e.width,height:e.height,pixelFormat:y,sampler:n}):defined(f)&&(y=!CesiumMath.isPowerOfTwo(f.width)||!CesiumMath.isPowerOfTwo(f.height),p&&y&&((y=document.createElement("canvas")).width=CesiumMath.nextPowerOfTwo(f.width),y.height=CesiumMath.nextPowerOfTwo(f.height),y.getContext("2d").drawImage(f,0,0,f.width,f.height,0,0,y.width,y.height),f=y),g=new Texture({context:i,source:f,pixelFormat:r.internalFormat,pixelDatatype:r.type,sampler:n,flipY:!1}),m&&g.generateMipmap()),defined(g)&&(t._rendererResources.textures[e.id]=g,t._texturesByteLength+=g.sizeInBytes)}CreateTextureJob.prototype.set=function(e,t,i){this.gltfTexture=e,this.model=t,this.context=i},CreateTextureJob.prototype.execute=function(){createTexture$3(this.gltfTexture,this.model,this.context)};var scratchCreateTextureJob=new CreateTextureJob;function createTextures(e,t){var i=t.context,r=e._loadResources.texturesToCreate;if(e.asynchronous)for(;0<r.length&&(scratchCreateTextureJob.set(r.peek(),e,i),t.jobScheduler.execute(scratchCreateTextureJob,JobType$1.TEXTURE));)r.dequeue();else for(;0<r.length;)createTexture$3(r.dequeue(),e,i)}function getAttributeLocations$1(e,t){var i,r,n=e._sourceTechniques,a={};if(!defined(t=e._runtime.materialsById[t.material]))return a;if(!defined(t=n[t._technique]))return a;var o,s=t.attributes,l=(t=e._rendererResources.programs[t.program]).vertexAttributes,c=t._attributeLocations;for(i in l)!l.hasOwnProperty(i)||defined(o=s[i])&&(r=c[i],a[o.semantic]=r);var u=e._precreatedAttributes;if(defined(u))for(i in u)u.hasOwnProperty(i)&&(r=c[i],a[i]=r);return a}function createJoints(e,t){for(var i=e.gltf,r=i.skins,n=i.nodes,a=e._runtime.nodes,o=e._loadResources.skinnedNodesIds,s=o.length,l=0;l<s;++l){var c=a[d=o[l]],u=n[d],d=t[u.skin];c.inverseBindMatrices=d.inverseBindMatrices,c.bindShapeMatrix=d.bindShapeMatrix;for(var h=r[u.skin].joints,p=h.length,f=0;f<p;++f){var m=a[h[f]];c.joints.push(m)}}}function createSkins(e){var t,i,r=e._loadResources;0===r.pendingBufferLoads&&r.createSkins&&(r.createSkins=!1,r=e.gltf,t=r.accessors,i={},ForEach.skin(r,(function(r,n){var a,o=t[r.inverseBindMatrices];Matrix4.equals(r.bindShapeMatrix,Matrix4.IDENTITY)||(a=Matrix4.clone(r.bindShapeMatrix)),i[n]={inverseBindMatrices:ModelAnimationCache.getSkinInverseBindMatrices(e,o),bindShapeMatrix:a}})),createJoints(e,i))}function getChannelEvaluator(e,t,i,r){return function(n){defined(r)&&(n=e.clampAnimations?r.clampTime(n):r.wrapTime(n),t[i]=r.evaluate(n,t[i]),t.dirtyNumber=e._maxDirtyNumber)}}function createRuntimeAnimations(e){var t,i,r=e._loadResources;r.finishedPendingBufferLoads()&&r.createRuntimeAnimations&&(r.createRuntimeAnimations=!1,e._runtime.animations=[],t=e._runtime.nodes,i=e.gltf.accessors,ForEach.animation(e.gltf,(function(r,n){for(var a=r.channels,o=r.samplers,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,c=a.length,u=new Array(c),d=0;d<c;++d){var h=a[d],p=h.target,f=p.path,m=o[h.sampler],g=ModelAnimationCache.getAnimationParameterValues(e,i[m.input]),y=ModelAnimationCache.getAnimationParameterValues(e,i[m.output]);s=Math.min(s,g[0]),l=Math.max(l,g[g.length-1]),y=ModelAnimationCache.getAnimationSpline(e,n,r,h.sampler,m,g,f,y);u[d]=getChannelEvaluator(e,t[p.node],p.path,y)}e._runtime.animations[n]={name:r.name,startTime:s,stopTime:l,channelEvaluators:u}})))}function createVertexArrays(e,t){var i,r,n,a,o=e._loadResources;o.finishedBuffersCreation()&&o.finishedProgramCreation()&&o.createVertexArrays&&(o.createVertexArrays=!1,i=e._rendererResources.buffers,r=e._rendererResources.vertexArrays,n=e.gltf,a=n.accessors,ForEach.mesh(n,(function(o,s){ForEach.meshPrimitive(o,(function(o,l){var c,u,d,h=[],p=getAttributeLocations$1(e,o),f=e._decodedData[s+".primitive."+l];ForEach.meshPrimitiveAttribute(o,(function(e,t){if(defined(c=p[t])){if(defined(f)){var r=f.attributes;if(r.hasOwnProperty(t)){var o=r[t];return void h.push({index:c,vertexBuffer:i[o.bufferView],componentsPerAttribute:o.componentsPerAttribute,componentDatatype:o.componentDatatype,normalize:o.normalized,offsetInBytes:o.byteOffset,strideInBytes:o.byteStride})}}e=defined((o=a[e]).normalized)&&o.normalized,h.push({index:c,vertexBuffer:i[o.bufferView],componentsPerAttribute:numberOfComponentsForType(o.type),componentDatatype:o.componentType,normalize:e,offsetInBytes:o.byteOffset,strideInBytes:getAccessorByteStride(n,o)})}}));var m,g=e._precreatedAttributes;if(defined(g))for(d in g)g.hasOwnProperty(d)&&defined(c=p[d])&&((u=g[d]).index=c,h.push(u));defined(o.indices)&&(m=a[o.indices].bufferView,defined(f)&&(m=f.bufferView),m=i[m]),r[s+".primitive."+l]=new VertexArray({context:t,attributes:h,indexBuffer:m})}))})))}function createRenderStates$3(e){var t=e._loadResources;t.createRenderStates&&(t.createRenderStates=!1,ForEach.material(e.gltf,(function(t,i){createRenderStateForMaterial(e,t,i)})))}function createRenderStateForMaterial(e,t,i){var r=e._rendererResources.renderStates,n=[WebGLConstants$1.FUNC_ADD,WebGLConstants$1.FUNC_ADD],a=[WebGLConstants$1.ONE,WebGLConstants$1.ONE_MINUS_SRC_ALPHA,WebGLConstants$1.ONE,WebGLConstants$1.ONE_MINUS_SRC_ALPHA];defined(t.extensions)&&defined(t.extensions.KHR_blend)&&(n=t.extensions.KHR_blend.blendEquation,a=t.extensions.KHR_blend.blendFactors),e=!t.doubleSided,t="BLEND"===t.alphaMode,r[i]=RenderState.fromCache({cull:{enabled:e},depthTest:{enabled:!0,func:DepthFunction$1.LESS_OR_EQUAL},depthMask:!t,blending:{enabled:t,equationRgb:n[0],equationAlpha:n[1],functionSourceRgb:a[0],functionDestinationRgb:a[1],functionSourceAlpha:a[2],functionDestinationAlpha:a[3]}})}var gltfUniformsFromNode={MODEL:function(e,t,i){return function(){return i.computedMatrix}},VIEW:function(e,t,i){return function(){return e.view}},PROJECTION:function(e,t,i){return function(){return e.projection}},MODELVIEW:function(e,t,i){var r=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r)}},CESIUM_RTC_MODELVIEW:function(e,t,i){var r=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.setTranslation(r,t._rtcCenterEye,r)}},MODELVIEWPROJECTION:function(e,t,i){var r=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.multiply(e._projection,r,r)}},MODELINVERSE:function(e,t,i){var r=new Matrix4;return function(){return Matrix4.inverse(i.computedMatrix,r)}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t,i){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t,i){var r=new Matrix4,n=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.inverse(r,n)}},MODELVIEWPROJECTIONINVERSE:function(e,t,i){var r=new Matrix4,n=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.multiply(e._projection,r,r),Matrix4.inverse(r,n)}},MODELINVERSETRANSPOSE:function(e,t,i){var r=new Matrix4,n=new Matrix3;return function(){return Matrix4.inverse(i.computedMatrix,r),Matrix4.getMatrix3(r,n),Matrix3.transpose(n,n)}},MODELVIEWINVERSETRANSPOSE:function(e,t,i){var r=new Matrix4,n=new Matrix4,a=new Matrix3;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.inverse(r,n),Matrix4.getMatrix3(n,a),Matrix3.transpose(a,a)}},VIEWPORT:function(e,t,i){return function(){return e.viewportCartesian4}}};function getUniformFunctionFromSource(e,t,i,r){return e=t._runtime.nodes[e],gltfUniformsFromNode[i](r,t,e)}function createUniformsForMaterial(e,t,i,r,n,a,o){var s,l,c={},u={};return ForEach.techniqueUniform(i,(function(i,d){var h,p;defined(r)&&defined(r[d])?(p=ModelUtility.createUniformFunction(i.type,r[d],a,o),c[d]=p.func,u[d]=p):defined(i.node)?c[d]=getUniformFunctionFromSource(i.node,e,i.semantic,n.uniformState):defined(i.semantic)?"JOINTMATRIX"===i.semantic?s=d:"MORPHWEIGHTS"===i.semantic?l=d:"ALPHACUTOFF"===i.semantic?defined(h=t.alphaMode)&&"MASK"===h&&(h=defaultValue(t.alphaCutoff,.5),p=ModelUtility.createUniformFunction(i.type,h,a,o),c[d]=p.func,u[d]=p):c[d]=ModelUtility.getGltfSemanticUniforms()[i.semantic](n.uniformState,e):defined(i.value)&&(i=ModelUtility.createUniformFunction(i.type,i.value,a,o),c[d]=i.func,u[d]=i)})),{map:c,values:u,jointMatrixUniformName:s,morphWeightsUniformName:l}}function createUniformMaps(e,t){var i,r,n,a,o=e._loadResources;o.finishedProgramCreation()&&o.createUniformMaps&&(o.createUniformMaps=!1,o=e.gltf,i=e._sourceTechniques,r=e._uniformMaps,n=e._rendererResources.textures,a=e._defaultTexture,ForEach.material(o,(function(o,s){var l,c=e._runtime.materialsById[s],u=i[c._technique];c=c._values,c=createUniformsForMaterial(e,o,u,c,t,n,a);(s=r[s]).uniformMap=c.map,s.values=c.values,s.jointMatrixUniformName=c.jointMatrixUniformName,s.morphWeightsUniformName=c.morphWeightsUniformName,defined(u.attributes.a_outlineCoordinates)&&(l=ModelOutlineLoader.createTexture(e,t),s.uniformMap.u_outlineTexture=function(){return l})})))}function createUniformsForDracoQuantizedAttributes(e){return ModelUtility.createUniformsForDracoQuantizedAttributes(e.attributes)}function createUniformsForQuantizedAttributes$1(e,t){var i=getProgramForPrimitive(e,t);i=e._quantizedUniforms[i];return ModelUtility.createUniformsForQuantizedAttributes(e.gltf,t,i)}function createPickColorFunction(e){return function(){return e}}function createJointMatricesFunction(e){return function(){return e.computedJointMatrices}}function createMorphWeightsFunction(e){return function(){return e.weights}}function createSilhouetteColorFunction(e){return function(){return e.silhouetteColor}}function createSilhouetteSizeFunction(e){return function(){return e.silhouetteSize}}function createColorFunction(e){return function(){return e.color}}function createClippingPlanesMatrixFunction(e){return function(){return e._clippingPlanesMatrix}}function createIBLReferenceFrameMatrixFunction(e){return function(){return e._iblReferenceFrameMatrix}}function createClippingPlanesFunction(e){return function(){var t=e.clippingPlanes;return defined(t)&&t.enabled?t.texture:e._defaultTexture}}function createClippingPlanesEdgeStyleFunction(e){return function(){var t=e.clippingPlanes;if(!defined(t))return Color.WHITE.withAlpha(0);var i=Color.clone(t.edgeColor);return i.alpha=t.edgeWidth,i}}function createColorBlendFunction(e){return function(){return ColorBlendMode$1.getColorBlend(e.colorBlendMode,e.colorBlendAmount)}}function createIBLFactorFunction(e){return function(){return e._imageBasedLightingFactor}}function createLightColorFunction(e){return function(){return e._lightColor}}function createLuminanceAtZenithFunction(e){return function(){return e.luminanceAtZenith}}function createSphericalHarmonicCoefficientsFunction(e){return function(){return e._sphericalHarmonicCoefficients}}function createSpecularEnvironmentMapFunction(e){return function(){return e._specularEnvironmentMapAtlas.texture}}function createSpecularEnvironmentMapSizeFunction(e){return function(){return e._specularEnvironmentMapAtlas.texture.dimensions}}function createSpecularEnvironmentMapLOD(e){return function(){return e._specularEnvironmentMapAtlas.maximumMipmapLevel}}function triangleCountFromPrimitiveIndices$1(e,t){switch(e.mode){case PrimitiveType$1.TRIANGLES:return t/3;case PrimitiveType$1.TRIANGLE_STRIP:case PrimitiveType$1.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function createCommand(e,t,i,r,n){for(var a=e._nodeCommands,o=e._pickIds,s=e.allowPicking,l=e._runtime.meshesByName,c=(m=e._rendererResources).vertexArrays,u=m.programs,d=m.renderStates,h=e._uniformMaps,p=e.gltf,f=p.accessors,m=p.meshes,g=t.mesh,y=m[g],_=y.primitives,v=_.length,C=0;C<v;++C){var x,b=_[C],S=f[b.indices],T=e._runtime.materialsById[b.material]._program,E=e._decodedData[g+".primitive."+C];defined(I=b.attributes.POSITION)&&(D=ModelUtility.getAccessorMinMax(p,I),x=BoundingSphere.fromCornerPoints(Cartesian3.fromArray(D.min),Cartesian3.fromArray(D.max)));var w,A,P=c[g+".primitive."+C];A=defined(E)?(w=E.numberOfIndices,0):defined(S)?(w=S.count,S.byteOffset/IndexDatatype$1.getSizeInBytes(S.componentType)):(w=f[b.attributes.POSITION].count,0),e._trianglesLength+=triangleCountFromPrimitiveIndices$1(b,w);var D=(I=h[b.material]).uniformMap;defined(I.jointMatrixUniformName)&&((M={})[I.jointMatrixUniformName]=createJointMatricesFunction(i),D=combine(D,M)),defined(I.morphWeightsUniformName)&&((R={})[I.morphWeightsUniformName]=createMorphWeightsFunction(i),D=combine(D,R)),D=combine(D,{gltf_color:createColorFunction(e),gltf_colorBlend:createColorBlendFunction(e),gltf_clippingPlanes:createClippingPlanesFunction(e),gltf_clippingPlanesEdgeStyle:createClippingPlanesEdgeStyleFunction(e),gltf_clippingPlanesMatrix:createClippingPlanesMatrixFunction(e),gltf_iblReferenceFrameMatrix:createIBLReferenceFrameMatrixFunction(e),gltf_iblFactor:createIBLFactorFunction(e),gltf_lightColor:createLightColorFunction(e),gltf_sphericalHarmonicCoefficients:createSphericalHarmonicCoefficientsFunction(e),gltf_specularMap:createSpecularEnvironmentMapFunction(e),gltf_specularMapSize:createSpecularEnvironmentMapSizeFunction(e),gltf_maxSpecularLOD:createSpecularEnvironmentMapLOD(e),gltf_luminanceAtZenith:createLuminanceAtZenithFunction(e)}),defined(e._uniformMapLoaded)&&(D=e._uniformMapLoaded(D,T,i)),S={},e.extensionsUsed.WEB3D_quantized_attributes?S=createUniformsForQuantizedAttributes$1(e,b):e._dequantizeInShader&&defined(E)&&(S=createUniformsForDracoQuantizedAttributes(E)),D=combine(D,S);var M=d[b.material],I=M.blending.enabled,R=e._pickObject;defined(R)||(R={primitive:e,id:e.id,node:i.publicNode,mesh:l[y.name]});var O;E=ShadowMode$1.castShadows(e._shadows),S=ShadowMode$1.receiveShadows(e._shadows);s&&!defined(e._uniformMapLoaded)&&(O=r.createPickId(R),o.push(O),D=combine(D,{czm_pickColor:createPickColorFunction(O.color)})),s&&(O=defined(e._pickIdLoaded)&&defined(e._uniformMapLoaded)?e._pickIdLoaded():"czm_pickColor");var L;I=new DrawCommand({boundingVolume:new BoundingSphere,cull:e.cull,modelMatrix:new Matrix4,primitiveType:b.mode,vertexArray:P,count:w,offset:A,shaderProgram:u[T],castShadows:E,receiveShadows:S,uniformMap:D,renderState:M,owner:R,pass:I?Pass$1.TRANSLUCENT:e.opaquePass,pickId:O});n||((L=DrawCommand.shallowClone(I)).boundingVolume=new BoundingSphere,L.modelMatrix=new Matrix4),T={show:!0,boundingSphere:x,command:I,command2D:L,silhouetteModelCommand:void 0,silhouetteModelCommand2D:void 0,silhouetteColorCommand:void 0,silhouetteColorCommand2D:void 0,translucentCommand:void 0,translucentCommand2D:void 0,disableCullingCommand:void 0,disableCullingCommand2D:void 0,programId:T},i.commands.push(T),a.push(T)}}function createRuntimeNodes$1(e,t,i){if((r=e._loadResources).finishedEverythingButTextureCreation()&&r.createRuntimeNodes){r.createRuntimeNodes=!1;for(var r,n=[],a=e._runtime.nodes,o=(r=e.gltf).nodes,s=r.scenes[r.scene].nodes,l=s.length,c=[],u={},d=0;d<l;++d)for(c.push({parentRuntimeNode:void 0,gltfNode:o[s[d]],id:s[d]});0<c.length;){var h=c.pop();u[h.id]=!0;var p=h.parentRuntimeNode,f=h.gltfNode,m=a[h.id];0===m.parents.length&&(defined(f.matrix)?m.matrix=Matrix4.fromColumnMajorArray(f.matrix):(h=f.rotation,m.translation=Cartesian3.fromArray(f.translation),m.rotation=Quaternion.unpack(h),m.scale=Cartesian3.fromArray(f.scale))),defined(p)?(p.children.push(m),m.parents.push(p)):n.push(m),defined(f.mesh)&&createCommand(e,f,m,t,i);var g=f.children;if(defined(g))for(var y=g.length,_=0;_<y;_++){var v=g[_];u[v]||c.push({parentRuntimeNode:m,gltfNode:o[v],id:g[_]})}}e._runtime.rootNodes=n,e._runtime.nodes=a}}function getGeometryByteLength(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&(i+=e[t].sizeInBytes);return i}function getTexturesByteLength(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&(i+=e[t].sizeInBytes);return i}function createResources$1(e,t){var i,r,n,a,o,s=t.context,l=t.scene3DOnly,c=e._quantizedVertexShaders,u=e._sourceTechniques,d=e._sourcePrograms,h=e._rendererResources,p=h.sourceShaders;for(i in e._loadRendererResourcesFromCache&&(p=h.sourceShaders=e._cachedRendererResources.sourceShaders),u)u.hasOwnProperty(i)&&(n=p[(a=d[r=u[i].program]).vertexShader],ModelUtility.checkSupportedGlExtensions(a.glExtensions,s),(e.extensionsUsed.WEB3D_quantized_attributes||e._dequantizeInShader)&&(defined(a=c[r])||(a=modifyShaderForQuantizedAttributes$1(n,r,e),c[r]=a),n=a),n=modifyShader$1(n,r,e._vertexShaderLoaded));e._loadRendererResourcesFromCache?(o=e._cachedRendererResources,h.buffers=o.buffers,h.vertexArrays=o.vertexArrays,h.programs=o.programs,h.silhouettePrograms=o.silhouettePrograms,h.textures=o.textures,h.samplers=o.samplers,h.renderStates=o.renderStates,defined(e._precreatedAttributes)&&createVertexArrays(e,s),e._cachedGeometryByteLength+=getGeometryByteLength(o.buffers),e._cachedTexturesByteLength+=getTexturesByteLength(o.textures)):(createBuffers$1(e,t),createPrograms(e,t),createSamplers(e),loadTexturesFromBufferViews(e),createTextures(e,t)),createSkins(e),createRuntimeAnimations(e),e._loadRendererResourcesFromCache||(createVertexArrays(e,s),createRenderStates$3(e)),createUniformMaps(e,s),createRuntimeNodes$1(e,s,l)}function getNodeMatrix(e,t){var i=e.publicNode,r=i.matrix;i.useMatrix&&defined(r)?Matrix4.clone(r,t):defined(e.matrix)?Matrix4.clone(e.matrix,t):(Matrix4.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}var scratchNodeStack=[],scratchComputedTranslation$1=new Cartesian4,scratchComputedMatrixIn2D$1=new Matrix4;function updateNodeHierarchyModelMatrix(e,t,i,r){var n,a=e._maxDirtyNumber,o=e._runtime.rootNodes,s=o.length,l=scratchNodeStack,c=e._computedModelMatrix;e._mode===SceneMode$1.SCENE3D||e._ignoreCommands||(n=Matrix4.getColumn(c,3,scratchComputedTranslation$1),Cartesian4.equals(n,Cartesian4.UNIT_W)?(n=e.boundingSphere.center,n=Transforms.wgs84To2DModelMatrix(r,n,scratchComputedMatrixIn2D$1),c=Matrix4.multiply(n,c,scratchComputedMatrixIn2D$1),defined(e._rtcCenter)&&(Matrix4.setTranslation(c,Cartesian4.UNIT_W,c),e._rtcCenter=e._rtcCenter2D)):(c=Transforms.basisTo2D(r,c,scratchComputedMatrixIn2D$1),e._rtcCenter=e._rtcCenter3D));for(var u=0;u<s;++u){var d=o[u];for(getNodeMatrix(d,d.transformToRoot),l.push(d);0<l.length;){var h=(d=l.pop()).transformToRoot,p=d.commands;if(d.dirtyNumber===a||t||i){var f=Matrix4.multiplyTransformation(c,h,d.computedMatrix),m=p.length;if(0<m)for(var g=0;g<m;++g){var y=p[g],_=y.command;Matrix4.clone(f,_.modelMatrix),BoundingSphere.transform(y.boundingSphere,_.modelMatrix,_.boundingVolume),defined(e._rtcCenter)&&Cartesian3.add(e._rtcCenter,_.boundingVolume.center,_.boundingVolume.center),defined(_=y.command2D)&&e._mode===SceneMode$1.SCENE2D&&(Matrix4.clone(f,_.modelMatrix),_.modelMatrix[13]-=2*CesiumMath.sign(_.modelMatrix[13])*CesiumMath.PI*r.ellipsoid.maximumRadius,BoundingSphere.transform(y.boundingSphere,_.modelMatrix,_.boundingVolume))}}var v=d.children;if(defined(v))for(var C=v.length,x=0;x<C;++x){var b=v[x];b.dirtyNumber=Math.max(b.dirtyNumber,d.dirtyNumber),b.dirtyNumber!==a&&!i||(getNodeMatrix(b,b.transformToRoot),Matrix4.multiplyTransformation(h,b.transformToRoot,b.transformToRoot)),l.push(b)}}}++e._maxDirtyNumber}var scratchObjectSpace=new Matrix4;function applySkins(e){for(var t=e._runtime.skinnedNodes,i=t.length,r=0;r<i;++r){var n=t[r];scratchObjectSpace=Matrix4.inverseTransformation(n.transformToRoot,scratchObjectSpace);for(var a=n.computedJointMatrices,o=n.joints,s=n.bindShapeMatrix,l=n.inverseBindMatrices,c=l.length,u=0;u<c;++u)defined(a[u])||(a[u]=new Matrix4),a[u]=Matrix4.multiplyTransformation(scratchObjectSpace,o[u].transformToRoot,a[u]),a[u]=Matrix4.multiplyTransformation(a[u],l[u],a[u]),defined(s)&&(a[u]=Matrix4.multiplyTransformation(a[u],s,a[u]))}}function updatePerNodeShow(e){for(var t=e._runtime.rootNodes,i=t.length,r=scratchNodeStack,n=0;n<i;++n){var a=t[n];for(a.computedShow=a.publicNode.show,r.push(a);0<r.length;){for(var o=(a=r.pop()).computedShow,s=a.commands,l=s.length,c=0;c<l;++c)s[c].show=o;var u=a.children;if(defined(u))for(var d=u.length,h=0;h<d;++h){var p=u[h];p.computedShow=o&&p.publicNode.show,r.push(p)}}}}function updatePickIds(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var r=e._pickIds,n=r.length,a=0;a<n;++a)r[a].object.id=i}}function updateWireframe$1(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?PrimitiveType$1.LINES:PrimitiveType$1.TRIANGLES,i=e._nodeCommands,r=i.length,n=0;n<r;++n)i[n].command.primitiveType=t}}function updateShowBoundingVolume(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,r=i.length,n=0;n<r;++n)i[n].command.debugShowBoundingVolume=t}}function updateShadows(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=ShadowMode$1.castShadows(e.shadows),i=ShadowMode$1.receiveShadows(e.shadows),r=e._nodeCommands,n=r.length,a=0;a<n;a++){var o=r[a];o.command.castShadows=t,o.command.receiveShadows=i}}}function getTranslucentRenderState$1(e){return(e=clone(e,!0)).cull.enabled=!1,e.depthTest.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND,RenderState.fromCache(e)}function deriveTranslucentCommand$1(e){var t=DrawCommand.shallowClone(e);return t.pass=Pass$1.TRANSLUCENT,t.renderState=getTranslucentRenderState$1(e.renderState),t}function updateColor(e,t,i){var r=t.scene3DOnly;if(0<(t=e.color.alpha)&&t<1){var n=e._nodeCommands,a=n.length;if(!defined(n[0].translucentCommand)||i)for(var o=0;o<a;++o){var s=n[o],l=s.command;s.translucentCommand=deriveTranslucentCommand$1(l),r||(l=s.command2D,s.translucentCommand2D=deriveTranslucentCommand$1(l))}}}function getDisableCullingRenderState(e){return(e=clone(e,!0)).cull.enabled=!1,RenderState.fromCache(e)}function deriveDisableCullingCommand(e){var t=DrawCommand.shallowClone(e);return t.renderState=getDisableCullingRenderState(e.renderState),t}function updateBackFaceCulling(e,t,i){var r=t.scene3DOnly;if(!e.backFaceCulling){var n=e._nodeCommands,a=n.length;if(!defined(n[0].disableCullingCommand)||i)for(var o=0;o<a;++o){var s=n[o],l=s.command;s.disableCullingCommand=deriveDisableCullingCommand(l),r||(l=s.command2D,s.disableCullingCommand2D=deriveDisableCullingCommand(l))}}}function getProgramId(e,t){var i,r=e._rendererResources.programs;for(i in r)if(r.hasOwnProperty(i)&&r[i]===t)return i}function createSilhouetteProgram(e,t,i){var r=t.vertexShaderSource.sources[0];t=t._attributeLocations,e=e._normalAttributeName,r=ShaderSource.replaceMain(r,"gltf_silhouette_main");return r+="uniform float gltf_silhouetteSize; \nvoid main() \n{ \n    gltf_silhouette_main(); \n    vec3 n = normalize(czm_normal3D * "+e+"); \n    n.x *= czm_projection[0][0]; \n    n.y *= czm_projection[1][1]; \n    vec4 clip = gl_Position; \n    clip.xy += n.xy * clip.w * gltf_silhouetteSize * czm_pixelRatio / czm_viewport.z; \n    gl_Position = clip; \n}",ShaderProgram.fromCache({context:i.context,vertexShaderSource:r,fragmentShaderSource:"uniform vec4 gltf_silhouetteColor; \nvoid main() \n{ \n    gl_FragColor = czm_gammaCorrect(gltf_silhouetteColor); \n}",attributeLocations:t})}function hasSilhouette(e,t){return silhouetteSupported(t.context)&&0<e.silhouetteSize&&0<e.silhouetteColor.alpha&&defined(e._normalAttributeName)}function hasTranslucentCommands(e){for(var t=e._nodeCommands,i=t.length,r=0;r<i;++r)if(t[r].command.pass===Pass$1.TRANSLUCENT)return!0;return!1}function isTranslucent(e){return 0<e.color.alpha&&e.color.alpha<1}function isInvisible(e){return 0===e.color.alpha}function alphaDirty(e,t){return Math.floor(e)!==Math.floor(t)||Math.ceil(e)!==Math.ceil(t)}var silhouettesLength=0;function createSilhouetteCommands(e,t){for(var i=++silhouettesLength%255,r=hasTranslucentCommands(e)||isTranslucent(e)||e.silhouetteColor.alpha<1,n=e._rendererResources.silhouettePrograms,a=t.scene3DOnly,o=e._nodeCommands,s=o.length,l=0;l<s;++l){var c=o[l],u=c.command,d=isTranslucent(e)?c.translucentCommand:u,h=DrawCommand.shallowClone(d),p=clone(d.renderState);p.stencilTest={enabled:!0,frontFunction:WebGLConstants$1.ALWAYS,backFunction:WebGLConstants$1.ALWAYS,reference:i,mask:-1,frontOperation:{fail:WebGLConstants$1.KEEP,zFail:WebGLConstants$1.KEEP,zPass:WebGLConstants$1.REPLACE},backOperation:{fail:WebGLConstants$1.KEEP,zFail:WebGLConstants$1.KEEP,zPass:WebGLConstants$1.REPLACE}},isInvisible(e)&&(p.colorMask={red:!1,green:!1,blue:!1,alpha:!1},p.depthMask=!1),p=RenderState.fromCache(p),h.renderState=p,c.silhouetteModelCommand=h;var f=DrawCommand.shallowClone(u);(p=clone(u.renderState,!0)).depthTest.enabled=!0,p.cull.enabled=!1,r&&(f.pass=Pass$1.TRANSLUCENT,p.depthMask=!1,p.blending=BlendingState$1.ALPHA_BLEND),p.stencilTest={enabled:!0,frontFunction:WebGLConstants$1.NOTEQUAL,backFunction:WebGLConstants$1.NOTEQUAL,reference:i,mask:-1,frontOperation:{fail:WebGLConstants$1.KEEP,zFail:WebGLConstants$1.KEEP,zPass:WebGLConstants$1.KEEP},backOperation:{fail:WebGLConstants$1.KEEP,zFail:WebGLConstants$1.KEEP,zPass:WebGLConstants$1.KEEP}},p=RenderState.fromCache(p);var m=u.shaderProgram,g=getProgramId(e,m);defined(d=n[g])||(d=createSilhouetteProgram(e,m,t),n[g]=d),u=combine(u.uniformMap,{gltf_silhouetteColor:createSilhouetteColorFunction(e),gltf_silhouetteSize:createSilhouetteSizeFunction(e)}),f.renderState=p,f.shaderProgram=d,f.uniformMap=u,f.castShadows=!1,f.receiveShadows=!1,c.silhouetteColorCommand=f,a||(u=c.command2D,(h=DrawCommand.shallowClone(h)).boundingVolume=u.boundingVolume,h.modelMatrix=u.modelMatrix,c.silhouetteModelCommand2D=h,f=DrawCommand.shallowClone(f),h.boundingVolume=u.boundingVolume,h.modelMatrix=u.modelMatrix,c.silhouetteColorCommand2D=f)}}function modifyShaderForClippingPlanes(e,t,i){return e=ShaderSource.replaceMain(e,"gltf_clip_main"),(e+=Model._getClippingFunction(t,i)+"\n")+"uniform highp sampler2D gltf_clippingPlanes; \nuniform mat4 gltf_clippingPlanesMatrix; \nuniform vec4 gltf_clippingPlanesEdgeStyle; \nvoid main() \n{ \n    gltf_clip_main(); \n"+getClipAndStyleCode("gltf_clippingPlanes","gltf_clippingPlanesMatrix","gltf_clippingPlanesEdgeStyle")+"} \n"}function updateSilhouette(e,t,i){var r;hasSilhouette(e,t)&&(r=e._nodeCommands,r=alphaDirty(e.color.alpha,e._colorPreviousAlpha)||alphaDirty(e.silhouetteColor.alpha,e._silhouetteColorPreviousAlpha)||!defined(r[0].silhouetteModelCommand),e._colorPreviousAlpha=e.color.alpha,e._silhouetteColorPreviousAlpha=e.silhouetteColor.alpha,(r||i)&&createSilhouetteCommands(e,t))}function updateClippingPlanes(e,t){var i=e._clippingPlanes;defined(i)&&i.owner===e&&i.enabled&&i.update(t)}var scratchBoundingSphere$3=new BoundingSphere;function scaleInPixels(e,t,i){return scratchBoundingSphere$3.center=e,scratchBoundingSphere$3.radius=t,i.camera.getPixelSize(scratchBoundingSphere$3,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}var scratchPosition$5=new Cartesian3,scratchCartographic$3=new Cartographic;function getScale(e,t){var i,r,n,a,o=e.scale;return 0!==e.minimumPixelSize&&(r=t.context,i=Math.max(r.drawingBufferWidth,r.drawingBufferHeight),r=defined(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,scratchPosition$5.x=r[12],scratchPosition$5.y=r[13],scratchPosition$5.z=r[14],defined(e._rtcCenter)&&Cartesian3.add(e._rtcCenter,scratchPosition$5,scratchPosition$5),e._mode!==SceneMode$1.SCENE3D&&(a=(n=t.mapProjection).ellipsoid.cartesianToCartographic(scratchPosition$5,scratchCartographic$3),n.project(a,scratchPosition$5),Cartesian3.fromElements(scratchPosition$5.z,scratchPosition$5.x,scratchPosition$5.y,scratchPosition$5)),n=e.boundingSphere.radius,t=1/(a=scaleInPixels(scratchPosition$5,n,t)),Math.min(2*n*t,i)<e.minimumPixelSize&&(o=e.minimumPixelSize*a/(2*e._initialRadius))),defined(e.maximumScale)?Math.min(e.maximumScale,o):o}function releaseCachedGltf(e){defined(e._cacheKey)&&defined(e._cachedGltf)&&0==--e._cachedGltf.count&&delete gltfCache[e._cacheKey],e._cachedGltf=void 0}function CachedRendererResources(e,t){this.buffers=void 0,this.vertexArrays=void 0,this.programs=void 0,this.sourceShaders=void 0,this.silhouettePrograms=void 0,this.textures=void 0,this.samplers=void 0,this.renderStates=void 0,this.ready=!1,this.context=e,this.cacheKey=t,this.count=0}function destroy(e){for(var t in e)e.hasOwnProperty(t)&&e[t].destroy()}function destroyCachedRendererResources(e){destroy(e.buffers),destroy(e.vertexArrays),destroy(e.programs),destroy(e.silhouettePrograms),destroy(e.textures)}function getUpdateHeightCallback(e,t,i){return function(r){e.heightReference===HeightReference$1.RELATIVE_TO_GROUND&&((n=t.cartesianToCartographic(r,scratchCartographic$3)).height+=i.height,t.cartographicToCartesian(n,r));var n=e._clampedModelMatrix;Matrix4.clone(e.modelMatrix,n),n[12]=r.x,n[13]=r.y,n[14]=r.z,e._heightChanged=!0}}function updateClamping(e){defined(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t,i,r,n=e._scene;defined(n)&&defined(n.globe)&&e.heightReference!==HeightReference$1.NONE?(t=(r=n.globe).ellipsoid,i=e.modelMatrix,scratchPosition$5.x=i[12],scratchPosition$5.y=i[13],scratchPosition$5.z=i[14],n=t.cartesianToCartographic(scratchPosition$5),defined(e._clampedModelMatrix)||(e._clampedModelMatrix=Matrix4.clone(i,new Matrix4)),i=r._surface,e._removeUpdateHeightCallback=i.updateHeight(n,getUpdateHeightCallback(e,t,n)),defined(i=r.getHeight(n))&&(r=getUpdateHeightCallback(e,t,n),Cartographic.clone(n,scratchCartographic$3),scratchCartographic$3.height=i,t.cartographicToCartesian(scratchCartographic$3,scratchPosition$5),r(scratchPosition$5))):e._clampedModelMatrix=void 0}CachedRendererResources.prototype.release=function(){if(0==--this.count)return defined(this.cacheKey)&&delete this.context.cache.modelRendererResourceCache[this.cacheKey],destroyCachedRendererResources(this),destroyObject(this)};var scratchDisplayConditionCartesian=new Cartesian3,scratchDistanceDisplayConditionCartographic=new Cartographic;function distanceDisplayConditionVisible(e,t){var i,r,n=e.distanceDisplayCondition,a=n.near*n.near,o=n.far*n.far;return t.mode===SceneMode$1.SCENE2D?(i=.5*(t.camera.frustum.right-t.camera.frustum.left),i*=i):(r=Matrix4.getTranslation(e.modelMatrix,scratchDisplayConditionCartesian),t.mode===SceneMode$1.COLUMBUS_VIEW&&(e=(n=t.mapProjection).ellipsoid.cartesianToCartographic(r,scratchDistanceDisplayConditionCartographic),r=n.project(e,r),Cartesian3.fromElements(r.z,r.x,r.y,r)),i=Cartesian3.distanceSquared(r,t.camera.positionWC)),a<=i&&i<=o}var scratchClippingPlanesMatrix=new Matrix4,scratchIBLReferenceFrameMatrix4=new Matrix4,scratchIBLReferenceFrameMatrix3=new Matrix3;function destroyIfNotCached(e,t){e.programs!==t.programs&&destroy(e.programs),e.silhouettePrograms!==t.silhouettePrograms&&destroy(e.silhouettePrograms)}function regenerateShaders(e,t){var i=e._rendererResources,r=e._cachedRendererResources;if(destroyIfNotCached(i,r),isClippingEnabled(e)||isColorShadingEnabled(e)||e._shouldRegenerateShaders){e._shouldRegenerateShaders=!1,i.programs={},i.silhouettePrograms={};var n,a={},o=e._sourceTechniques;for(n in o)o.hasOwnProperty(n)&&(a[d=o[n].program]||(a[d]=!0,recreateProgram({programId:d,techniqueId:n},e,t.context)))}else i.programs=r.programs,i.silhouettePrograms=r.silhouettePrograms;for(var s=i.programs,l=e._nodeCommands,c=l.length,u=0;u<c;++u){var d,h=l[u],p=s[d=h.programId];h.command.shaderProgram=p,defined(h.command2D)&&(h.command2D.shaderProgram=p)}updateColor(e,t,!0),updateBackFaceCulling(e,t,!0),updateSilhouette(e,t,!0)}function Batched3DModel3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._batchTable=void 0,this._features=void 0,this._batchIdAttributeName=void 0,this._diffuseAttributeOrUniformName={},this._rtcCenterTransform=void 0,this._contentModelMatrix=void 0,this.featurePropertiesDirty=!1,initialize$2(this,r,n)}Model.prototype.update=function(e){if(e.mode!==SceneMode$1.MORPHING)if(FeatureDetection.supportsWebP.initialized){var t=FeatureDetection.supportsWebP(),i=e.context;if(this._defaultTexture=i.defaultTexture,this._state===ModelState$1.NEEDS_LOAD&&defined(this.gltf)){var r=this.cacheKey;if(defined(r)){i.cache.modelRendererResourceCache=defaultValue(i.cache.modelRendererResourceCache,{});var n,a=i.cache.modelRendererResourceCache;if(defined(n=a[this.cacheKey])){if(!n.ready)return;++n.count,this._loadRendererResourcesFromCache=!0}else(n=new CachedRendererResources(i,r)).count=1,a[this.cacheKey]=n;this._cachedRendererResources=n}else(n=new CachedRendererResources(i)).count=1,this._cachedRendererResources=n;this._state=ModelState$1.LOADING,this._state!==ModelState$1.FAILED&&(defined(l=this.gltf.extensions)&&defined(l.CESIUM_RTC)&&(c=Cartesian3.fromArray(l.CESIUM_RTC.center),Cartesian3.equals(c,Cartesian3.ZERO)||(this._rtcCenter3D=c,o=(u=e.mapProjection).ellipsoid.cartesianToCartographic(this._rtcCenter3D),s=u.project(o),Cartesian3.fromElements(s.z,s.x,s.y,s),this._rtcCenter2D=s,this._rtcCenterEye=new Cartesian3,this._rtcCenter=this._rtcCenter3D)),addPipelineExtras(this.gltf),this._loadResources=new ModelLoadResources,this._loadRendererResourcesFromCache||ModelUtility.parseBuffers(this,bufferLoad))}var o,s,l=this._loadResources,c=this._incrementallyLoadTextures,u=!1;this._state===ModelState$1.LOADING&&(0===l.pendingBufferLoads&&(l.initialized||(e.brdfLutGenerator.update(e),ModelUtility.checkSupportedExtensions(this.extensionsRequired,t),ModelUtility.updateForwardAxis(this),defined(this.gltf.extras.sourceVersion)||((o=this.gltf).extras.sourceVersion=ModelUtility.getAssetVersion(o),o.extras.sourceKHRTechniquesWebGL=defined(ModelUtility.getUsedExtensions(o).KHR_techniques_webgl),this._sourceVersion=o.extras.sourceVersion,this._sourceKHRTechniquesWebGL=o.extras.sourceKHRTechniquesWebGL,updateVersion(o),addDefaults(o),processModelMaterialsCommon(o,s={addBatchIdToGeneratedShaders:this._addBatchIdToGeneratedShaders}),processPbrMaterials(o,s)),this._sourceVersion=this.gltf.extras.sourceVersion,this._sourceKHRTechniquesWebGL=this.gltf.extras.sourceKHRTechniquesWebGL,this._dequantizeInShader=this._dequantizeInShader&&DracoLoader.hasExtension(this),addBuffersToLoadResources$1(this),parseArticulations(this),parseTechniques(this),this._loadRendererResourcesFromCache||(parseBufferViews$1(this),parseShaders(this),parsePrograms(this),parseTextures(this,i,t)),parseMaterials(this),parseMeshes(this),parseNodes(this),DracoLoader.parse(this,i),l.initialized=!0),l.finishedDecoding()||DracoLoader.decodeModel(this,i).otherwise(ModelUtility.getFailedLoadFunction(this,"model",this.basePath)),l.finishedDecoding()&&!l.resourcesParsed&&(this._boundingSphere=ModelUtility.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,DracoLoader.cacheDataForModel(this),l.resourcesParsed=!0),l.resourcesParsed&&0===l.pendingShaderLoads&&(ModelOutlineLoader.outlinePrimitives(this),createResources$1(this,e))),(l.finished()||c&&l.finishedEverythingButTextureCreation())&&(this._state=ModelState$1.LOADED,u=!0)),defined(l)&&this._state===ModelState$1.LOADED&&(c&&!u&&createResources$1(this,e),l.finished()&&(this._loadResources=void 0,h=this._rendererResources,(p=this._cachedRendererResources).buffers=h.buffers,p.vertexArrays=h.vertexArrays,p.programs=h.programs,p.sourceShaders=h.sourceShaders,p.silhouettePrograms=h.silhouettePrograms,p.textures=h.textures,p.samplers=h.samplers,p.renderStates=h.renderStates,p.ready=!0,this._normalAttributeName=ModelUtility.getAttributeOrUniformBySemantic(this.gltf,"NORMAL"),defined(this._precreatedAttributes)&&(p.vertexArrays={}),this.releaseGltfJson&&releaseCachedGltf(this)));var d;t=OctahedralProjectedCubeMap.isSupported(i);this._shouldUpdateSpecularMapAtlas&&t&&(this._shouldUpdateSpecularMapAtlas=!1,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._specularEnvironmentMapAtlas=void 0,defined(this._specularEnvironmentMaps)&&(this._specularEnvironmentMapAtlas=new OctahedralProjectedCubeMap(this._specularEnvironmentMaps),(d=this)._specularEnvironmentMapAtlas.readyPromise.then((function(){d._shouldRegenerateShaders=!0})).otherwise((function(e){console.error("Error loading specularEnvironmentMaps: "+e)}))),this._shouldRegenerateShaders=!0),defined(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e);c=!defined(this._specularEnvironmentMapAtlas)&&defined(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,l=!defined(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps;var h=!defined(this._sphericalHarmonicCoefficients)&&defined(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,p=!defined(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||c||l||h||p,this._useDefaultSpecularMaps=!defined(this._specularEnvironmentMapAtlas)&&defined(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!defined(this._sphericalHarmonicCoefficients)&&defined(e.sphericalHarmonicCoefficients);var f,m,g,y=hasSilhouette(this,e),_=isTranslucent(this),v=(t=isInvisible(this),this.backFaceCulling);c=!defined(this.distanceDisplayCondition)||distanceDisplayConditionVisible(this,e);if(((l=this.show&&c&&0!==this.scale&&(!t||y))&&this._state===ModelState$1.LOADED||u)&&(h=this.activeAnimations.update(e)||this._cesiumAnimationsDirty,this._cesiumAnimationsDirty=!1,this._dirty=!1,p=this.modelMatrix,c=e.mode!==this._mode,this._mode=e.mode,((t=!Matrix4.equals(this._modelMatrix,p)||this._scale!==this.scale||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||c)||u)&&(Matrix4.clone(p,this._modelMatrix),updateClamping(this),defined(this._clampedModelMatrix)&&(p=this._clampedModelMatrix),this._scale=this.scale,this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1,c=getScale(this,e),g=this._computedModelMatrix,Matrix4.multiplyByUniformScale(p,c,g),this._upAxis===Axis$1.Y?Matrix4.multiplyTransformation(g,Axis$1.Y_UP_TO_Z_UP,g):this._upAxis===Axis$1.X&&Matrix4.multiplyTransformation(g,Axis$1.X_UP_TO_Z_UP,g),this.forwardAxis===Axis$1.Z&&Matrix4.multiplyTransformation(g,Axis$1.Z_UP_TO_X_UP,g)),(h||t||u)&&(updateNodeHierarchyModelMatrix(this,t,u,e.mapProjection),this._dirty=!0,(h||u)&&applySkins(this)),this._perNodeShowDirty&&(this._perNodeShowDirty=!1,updatePerNodeShow(this)),updatePickIds(this),updateWireframe$1(this),updateShowBoundingVolume(this),updateShadows(this),updateClippingPlanes(this,e),g=0,h=defined(t=this._clippingPlanes)&&t.enabled&&0<t.length,p=defaultValue(this.referenceMatrix,p),h&&(f=scratchClippingPlanesMatrix,f=Matrix4.multiply(i.uniformState.view3D,p,f),f=Matrix4.multiply(f,t.modelMatrix,f),this._clippingPlanesMatrix=Matrix4.inverseTranspose(f,this._clippingPlanesMatrix),g=t.clippingPlanesState),f=defined(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics,t=defined(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps,(f||t)&&(m=scratchIBLReferenceFrameMatrix3,t=scratchIBLReferenceFrameMatrix4,t=Matrix4.multiply(i.uniformState.view3D,p,t),m=Matrix4.getMatrix3(t,m),m=Matrix3.getRotation(m,m),this._iblReferenceFrameMatrix=Matrix3.transpose(m,this._iblReferenceFrameMatrix)),m=(m=this._shouldRegenerateShaders)||this._clippingPlanesState!==g,this._clippingPlanesState=g,(g=isColorShadingEnabled(this))!==this._colorShadingEnabled&&(this._colorShadingEnabled=g,m=!0),m?regenerateShaders(this,e):(updateColor(this,e,!1),updateBackFaceCulling(this,e,!1),updateSilhouette(this,e,!1))),u){var C=this;e.afterRender.push((function(){C._ready=!0,C._readyPromise.resolve(C)}))}else{if(l&&!this._ignoreCommands){var x,b,S,T,E=e.commandList,w=e.passes,A=this._nodeCommands,P=A.length,D=e.mapProjection.ellipsoid.maximumRadius*CesiumMath.PI;if(w.render||w.pick&&this.allowPicking){for(x=0;x<P;++x)(T=A[x]).show&&(S=T.command,y?S=T.silhouetteModelCommand:_?S=T.translucentCommand:v||(S=T.disableCullingCommand),E.push(S),b=T.command.boundingVolume,e.mode===SceneMode$1.SCENE2D&&(b.center.y+b.radius>D||b.center.y-b.radius<D)&&(S=T.command2D,y?S=T.silhouetteModelCommand2D:_?S=T.translucentCommand2D:v||(S=T.disableCullingCommand2D),E.push(S)));if(y&&!w.pick)for(x=0;x<P;++x)(T=A[x]).show&&(E.push(T.silhouetteColorCommand),b=T.command.boundingVolume,e.mode===SceneMode$1.SCENE2D&&(b.center.y+b.radius>D||b.center.y-b.radius<D)&&E.push(T.silhouetteColorCommand2D))}}defined(w=this._credit)&&e.creditDisplay.addCredit(w);for(var M=this._resourceCredits,I=M.length,R=0;R<I;R++)e.creditDisplay.addCredit(M[R])}}else FeatureDetection.supportsWebP.initialize()},Model.prototype.isDestroyed=function(){return!1},Model.prototype.destroy=function(){defined(this._precreatedAttributes)&&destroy(this._rendererResources.vertexArrays),defined(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),defined(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0),defined(this._cachedRendererResources)&&destroyIfNotCached(this._rendererResources,this._cachedRendererResources),this._rendererResources=void 0,this._cachedRendererResources=this._cachedRendererResources&&this._cachedRendererResources.release(),DracoLoader.destroyCachedDataForModel(this);for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();releaseCachedGltf(this),this._quantizedVertexShaders=void 0;var r=this._clippingPlanes;return defined(r)&&!r.isDestroyed()&&r.owner===this&&r.destroy(),this._clippingPlanes=void 0,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),destroyObject(this)},Model._getClippingFunction=getClippingFunction,Model._modifyShaderForColor=modifyShaderForColor,Batched3DModel3DTileContent._deprecationWarning=deprecationWarning,Object.defineProperties(Batched3DModel3DTileContent.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var sizeOfUint32$3=Uint32Array.BYTES_PER_ELEMENT;function getBatchIdAttributeName(e){var t=ModelUtility.getAttributeOrUniformBySemantic(e,"_BATCHID");return defined(t)||defined(t=ModelUtility.getAttributeOrUniformBySemantic(e,"BATCHID"))&&Batched3DModel3DTileContent._deprecationWarning("b3dm-legacy-batchid","The glTF in this b3dm uses the semantic `BATCHID`. Application-specific semantics should be prefixed with an underscore: `_BATCHID`."),t}function getVertexShaderCallback(e){return function(t,i){var r=e._batchTable,n=!defined(e._tileset.classificationType),a=e._model.gltf;return defined(a)&&(e._batchIdAttributeName=getBatchIdAttributeName(a),e._diffuseAttributeOrUniformName[i]=ModelUtility.getDiffuseAttributeOrUniform(a,i)),defined(i=r.getVertexShaderCallback(n,e._batchIdAttributeName,e._diffuseAttributeOrUniformName[i]))?i(t):t}}function getFragmentShaderCallback(e){return function(t,i){var r=e._batchTable,n=!defined(e._tileset.classificationType),a=e._model.gltf;return defined(a)&&(e._diffuseAttributeOrUniformName[i]=ModelUtility.getDiffuseAttributeOrUniform(a,i)),defined(i=r.getFragmentShaderCallback(n,e._diffuseAttributeOrUniformName[i]))?i(t):t}}function getPickIdCallback(e){return function(){return e._batchTable.getPickId()}}function getClassificationFragmentShaderCallback(e){return function(t){var i=e._batchTable.getClassificationFragmentShaderCallback();return defined(i)?i(t):t}}function createColorChangedCallback(e){return function(t,i){e._model.updateCommands(t,i)}}function initialize$2(e,t,i){var r=e._tileset,n=e._tile,a=e._resource,o=defaultValue(i,0);i=o;var s=new Uint8Array(t),l=new DataView(t);if(i+=sizeOfUint32$3,1!==(f=l.getUint32(i,!0)))throw new RuntimeError("Only Batched 3D Model version 1 is supported.  Version "+f+" is not.");i+=sizeOfUint32$3;var c=l.getUint32(i,!0);i+=sizeOfUint32$3;var u=l.getUint32(i,!0);i+=sizeOfUint32$3;var d=l.getUint32(i,!0);i+=sizeOfUint32$3;var h=l.getUint32(i,!0);i+=sizeOfUint32$3;var p,f=l.getUint32(i,!0);i+=sizeOfUint32$3,570425344<=h?(i-=2*sizeOfUint32$3,y=u,h=d,d=u=f=0,Batched3DModel3DTileContent._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/master/specification/TileFormats/Batched3DModel.")):570425344<=f&&(i-=sizeOfUint32$3,y=h,h=u,f=d,d=u=0,Batched3DModel3DTileContent._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/master/specification/TileFormats/Batched3DModel.")),0===u?p={BATCH_LENGTH:defaultValue(y,0)}:(l=getStringFromTypedArray(s,i,u),p=JSON.parse(l),i+=u),u=new Uint8Array(t,i,d),i+=d;var m,g,y=(u=new Cesium3DTileFeatureTable(p,u)).getGlobalProperty("BATCH_LENGTH");u.featuresLength=y,0<h&&(g=getStringFromTypedArray(s,i,h),g=JSON.parse(g),i+=h,0<f&&(m=new Uint8Array(t,i,f),m=new Uint8Array(m),i+=f)),defined(r.classificationType)&&(_=createColorChangedCallback(e));var _=new Cesium3DTileBatchTable(e,y,g,m,_);if(e._batchTable=_,0==(c=o+c-i))throw new RuntimeError("glTF byte length must be greater than 0.");i=i%4==0?new Uint8Array(t,i,c):(Batched3DModel3DTileContent._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),new Uint8Array(s.subarray(i,i+c))),c={content:e,primitive:r},e._rtcCenterTransform=Matrix4.IDENTITY,defined(u=u.getGlobalProperty("RTC_CENTER",ComponentDatatype$1.FLOAT,3))&&(e._rtcCenterTransform=Matrix4.fromTranslation(Cartesian3.fromArray(u))),e._contentModelMatrix=Matrix4.multiply(n.computedTransform,e._rtcCenterTransform,new Matrix4),defined(r.classificationType)?e._model=new ClassificationModel({gltf:i,cull:!1,basePath:a,requestType:RequestType$1.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:r._gltfUpAxis,forwardAxis:Axis$1.X,debugWireframe:r.debugWireframe,vertexShaderLoaded:getVertexShaderCallback(e),classificationShaderLoaded:getClassificationFragmentShaderCallback(e),uniformMapLoaded:_.getUniformMapCallback(),pickIdLoaded:getPickIdCallback(e),classificationType:r._classificationType,batchTable:_}):(e._model=new Model({gltf:i,cull:!1,releaseGltfJson:!0,opaquePass:Pass$1.CESIUM_3D_TILE,basePath:a,requestType:RequestType$1.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:r._gltfUpAxis,forwardAxis:Axis$1.X,shadows:r.shadows,debugWireframe:r.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:getVertexShaderCallback(e),fragmentShaderLoaded:getFragmentShaderCallback(e),uniformMapLoaded:_.getUniformMapCallback(),pickIdLoaded:getPickIdCallback(e),addBatchIdToGeneratedShaders:0<y,pickObject:c,imageBasedLightingFactor:r.imageBasedLightingFactor,lightColor:r.lightColor,luminanceAtZenith:r.luminanceAtZenith,sphericalHarmonicCoefficients:r.sphericalHarmonicCoefficients,specularEnvironmentMaps:r.specularEnvironmentMaps,backFaceCulling:r.backFaceCulling}),e._model.readyPromise.then((function(e){e.activeAnimations.addAll({loop:ModelAnimationLoop$1.REPEAT})})))}function createFeatures(e){var t=e.featuresLength;if(!defined(e._features)&&0<t){for(var i=new Array(t),r=0;r<t;++r)i[r]=new Cesium3DTileFeature(e,r);e._features=i}}function Composite3DTileContent(e,t,i,r,n,a){this._tileset=e,this._tile=t,this._resource=i,this._contents=[],this._readyPromise=when.defer(),initialize$3(this,r,n,a)}Batched3DModel3DTileContent.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Batched3DModel3DTileContent.prototype.getFeature=function(e){return createFeatures(this),this._features[e]},Batched3DModel3DTileContent.prototype.applyDebugSettings=function(e,t){t=e?t:Color.WHITE,0===this.featuresLength?this._model.color=t:this._batchTable.setAllColor(t)},Batched3DModel3DTileContent.prototype.applyStyle=function(e){var t,i;0===this.featuresLength?(t=defined(e)&&defined(e.color),i=defined(e)&&defined(e.show),this._model.color=t?e.color.evaluateColor(void 0,this._model.color):Color.clone(Color.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)):this._batchTable.applyStyle(e)},Batched3DModel3DTileContent.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._contentModelMatrix=Matrix4.multiply(this._tile.computedTransform,this._rtcCenterTransform,this._contentModelMatrix),this._model.modelMatrix=this._contentModelMatrix,this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.backFaceCulling=this._tileset.backFaceCulling,this._model.debugWireframe=this._tileset.debugWireframe;var r=this._tileset.clippingPlanes;this._model.referenceMatrix=this._tileset.clippingPlanesOriginMatrix,defined(r)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=r.enabled&&this._tile._isClipped?r:void 0),defined(r)&&defined(this._model._clippingPlanes)&&this._model._clippingPlanes!==r&&(this._model._clippingPlanes=r),this._model.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&!defined(e.classificationType)&&this._batchTable.addDerivedCommands(t,i)},Batched3DModel3DTileContent.prototype.isDestroyed=function(){return!1},Batched3DModel3DTileContent.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)},Object.defineProperties(Composite3DTileContent.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,r=0;r<i;++r)t[r].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}});var sizeOfUint32$4=Uint32Array.BYTES_PER_ELEMENT;function initialize$3(e,t,i,r){i=defaultValue(i,0);var n=new Uint8Array(t),a=new DataView(t);i+=sizeOfUint32$4;var o=a.getUint32(i,!0);if(1!==o)throw new RuntimeError("Only Composite Tile version 1 is supported. Version "+o+" is not.");i+=sizeOfUint32$4,i+=sizeOfUint32$4;var s=a.getUint32(i,!0);i+=sizeOfUint32$4;for(var l=[],c=0;c<s;++c){var u=getMagic(n,i),d=a.getUint32(i+2*sizeOfUint32$4,!0),h=r[u];if(!defined(h))throw new RuntimeError("Unknown tile content type, "+u+", inside Composite tile");h=h(e._tileset,e._tile,e._resource,t,i),e._contents.push(h),l.push(h.readyPromise),i+=d}when.all(l).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}function Vector3DTileGeometry(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,defined(this._center)||(defined(this._boundingVolume)?this._center=Cartesian3.clone(this._boundingVolume.center):this._center=Cartesian3.clone(Cartesian3.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=when.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=ClassificationType$1.BOTH}function packBuffer(e){var t=new Float64Array(Matrix4.packedLength+Cartesian3.packedLength),i=0;return Cartesian3.pack(e._center,t,0),i+=Cartesian3.packedLength,Matrix4.pack(e._modelMatrix,t,i),t}function unpackBuffer(e,t){for(var i=0,r=t[i++],n=t[i++],a=e._boundingVolumes=new Array(n),o=0;o<n;++o)a[o]=BoundingSphere.unpack(t,i),i+=BoundingSphere.packedLength;for(var s=t[i++],l=e._batchedIndices=new Array(s),c=0;c<s;++c){var u=Color.unpack(t,i);i+=Color.packedLength;for(var d=t[i++],h=t[i++],p=t[i++],f=new Array(p),m=0;m<p;++m)f[m]=t[i++];l[c]=new Vector3DTileBatch({color:u,offset:d,count:h,batchIds:f})}return r}Composite3DTileContent.prototype.hasProperty=function(e,t){return!1},Composite3DTileContent.prototype.getFeature=function(e){},Composite3DTileContent.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,r=i.length,n=0;n<r;++n)i[n].applyDebugSettings(e,t)},Composite3DTileContent.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,r=0;r<i;++r)t[r].applyStyle(e)},Composite3DTileContent.prototype.update=function(e,t){for(var i=this._contents,r=i.length,n=0;n<r;++n)i[n].update(e,t)},Composite3DTileContent.prototype.isDestroyed=function(){return!1},Composite3DTileContent.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return destroyObject(this)},Object.defineProperties(Vector3DTileGeometry.prototype,{trianglesLength:{get:function(){return defined(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return defined(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}}),Vector3DTileGeometry.packedBoxLength=Matrix4.packedLength+Cartesian3.packedLength,Vector3DTileGeometry.packedCylinderLength=Matrix4.packedLength+2,Vector3DTileGeometry.packedEllipsoidLength=Matrix4.packedLength+Cartesian3.packedLength,Vector3DTileGeometry.packedSphereLength=Cartesian3.packedLength+1;var createVerticesTaskProcessor=new TaskProcessor("createVectorTileGeometries"),scratchColor$4=new Color;function createPrimitive$1(e){if(!defined(e._primitive)){if(!defined(e._verticesPromise)){var t=e._boxes,i=e._boxBatchIds,r=e._cylinders,n=e._cylinderBatchIds,a=e._ellipsoids,o=e._ellipsoidBatchIds,s=e._spheres,l=e._sphereBatchIds,c=e._batchTableColors,u=e._packedBuffer;if(!defined(c)){var d=0;defined(e._boxes)&&(t=e._boxes=arraySlice(t),d+=(i=e._boxBatchIds=arraySlice(i)).length),defined(e._cylinders)&&(r=e._cylinders=arraySlice(r),d+=(n=e._cylinderBatchIds=arraySlice(n)).length),defined(e._ellipsoids)&&(a=e._ellipsoids=arraySlice(a),d+=(o=e._ellipsoidBatchIds=arraySlice(o)).length),defined(e._spheres)&&(s=e._sphere=arraySlice(s),d+=(l=e._sphereBatchIds=arraySlice(l)).length),c=e._batchTableColors=new Uint32Array(d);for(var h=e._batchTable,p=0;p<d;++p){var f=h.getColor(p,scratchColor$4);c[p]=f.toRgba()}u=e._packedBuffer=packBuffer(e)}var m=[];if(defined(t)&&m.push(t.buffer,i.buffer),defined(r)&&m.push(r.buffer,n.buffer),defined(a)&&m.push(a.buffer,o.buffer),defined(s)&&m.push(s.buffer,l.buffer),m.push(c.buffer,u.buffer),u={boxes:defined(t)?t.buffer:void 0,boxBatchIds:defined(t)?i.buffer:void 0,cylinders:defined(r)?r.buffer:void 0,cylinderBatchIds:defined(r)?n.buffer:void 0,ellipsoids:defined(a)?a.buffer:void 0,ellipsoidBatchIds:defined(a)?o.buffer:void 0,spheres:defined(s)?s.buffer:void 0,sphereBatchIds:defined(s)?l.buffer:void 0,batchTableColors:c.buffer,packedBuffer:u.buffer},!defined(m=e._verticesPromise=createVerticesTaskProcessor.scheduleTask(u,m)))return;m.then((function(t){var i=new Float64Array(t.packedBuffer);i=unpackBuffer(e,i);e._indices=new(2===i?Uint16Array:Uint32Array)(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._positions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.vertexBatchIds),e._batchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!defined(e._primitive)&&(e._primitive=new Vector3DTilePrimitive({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:defaultValue(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}function Geometry3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._geometries=void 0,this._contentReadyPromise=void 0,this._readyPromise=when.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,initialize$4(this,r,n)}function createColorChangedCallback$1(e){return function(t,i){defined(e._geometries)&&e._geometries.updateCommands(t,i)}}function getBatchIds(e,t){var i,r,n,a,o,s,l,c=defaultValue(e.BOXES_LENGTH,0),u=defaultValue(e.CYLINDERS_LENGTH,0),d=defaultValue(e.ELLIPSOIDS_LENGTH,0),h=defaultValue(e.SPHERES_LENGTH,0);0<c&&defined(e.BOX_BATCH_IDS)&&(r=t.byteOffset+e.BOX_BATCH_IDS.byteOffset,n=new Uint16Array(t.buffer,r,c)),0<u&&defined(e.CYLINDER_BATCH_IDS)&&(o=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset,a=new Uint16Array(t.buffer,o,u)),0<d&&defined(e.ELLIPSOID_BATCH_IDS)&&(o=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset,s=new Uint16Array(t.buffer,o,d)),0<h&&defined(e.SPHERE_BATCH_IDS)&&(p=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset,l=new Uint16Array(t.buffer,p,h));t=defined(n)||defined(a)||defined(s)||defined(l);var p=0<c&&!defined(n)||0<u&&!defined(a)||0<d&&!defined(s)||0<h&&!defined(l);if(t&&p)throw new RuntimeError("If one group of batch ids is defined, then all batch ids must be defined.");if(!(defined(n)||defined(a)||defined(s)||defined(l))){var f=0;if(!defined(n)&&0<c)for(n=new Uint16Array(c),i=0;i<c;++i)n[i]=f++;if(!defined(a)&&0<u)for(a=new Uint16Array(u),i=0;i<u;++i)a[i]=f++;if(!defined(s)&&0<d)for(s=new Uint16Array(d),i=0;i<d;++i)s[i]=f++;if(!defined(l)&&0<h)for(l=new Uint16Array(h),i=0;i<h;++i)l[i]=f++}return{boxes:n,cylinders:a,ellipsoids:s,spheres:l}}Vector3DTileGeometry.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},Vector3DTileGeometry.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},Vector3DTileGeometry.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},Vector3DTileGeometry.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},Vector3DTileGeometry.prototype.update=function(e){createPrimitive$1(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},Vector3DTileGeometry.prototype.isDestroyed=function(){return!1},Vector3DTileGeometry.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)},Object.defineProperties(Geometry3DTileContent.prototype,{featuresLength:{get:function(){return defined(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return defined(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return defined(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return defined(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var sizeOfUint32$5=Uint32Array.BYTES_PER_ELEMENT;function initialize$4(e,t,i){i=defaultValue(i,0);var r=new Uint8Array(t),n=new DataView(t);if(i+=sizeOfUint32$5,1!==(f=n.getUint32(i,!0)))throw new RuntimeError("Only Geometry tile version 1 is supported.  Version "+f+" is not.");i+=sizeOfUint32$5;var a=n.getUint32(i,!0);if(i+=sizeOfUint32$5,0!==a){var o=n.getUint32(i,!0);if(i+=sizeOfUint32$5,0===o)throw new RuntimeError("Feature table must have a byte length greater than zero");var s=n.getUint32(i,!0);i+=sizeOfUint32$5,f=n.getUint32(i,!0),i+=sizeOfUint32$5,a=n.getUint32(i,!0),n=getStringFromTypedArray(r,i+=sizeOfUint32$5,o),n=JSON.parse(n),i+=o,o=new Uint8Array(t,i,s),i+=s,0<f&&(m=getStringFromTypedArray(r,i,f),g=JSON.parse(m),i+=f,0<a&&(l=new Uint8Array(t,i,a),l=new Uint8Array(l)));var l,c,u,d,h,p,f,m=defaultValue(n.BOXES_LENGTH,0),g=new Cesium3DTileBatchTable(e,a=m+(f=defaultValue(n.CYLINDERS_LENGTH,0))+(t=defaultValue(n.ELLIPSOIDS_LENGTH,0))+(i=defaultValue(n.SPHERES_LENGTH,0)),g,l,createColorChangedCallback$1(e));e._batchTable=g,0!==a&&(l=e.tile.computedTransform,defined(n.RTC_CENTER)&&(c=Cartesian3.unpack(n.RTC_CENTER),Matrix4.multiplyByPoint(l,c,c)),a=getBatchIds(n,o),(0<m||0<f||0<t||0<i)&&(0<m&&(u=o.byteOffset+n.BOXES.byteOffset,u=new Float32Array(o.buffer,u,Vector3DTileGeometry.packedBoxLength*m)),0<f&&(d=o.byteOffset+n.CYLINDERS.byteOffset,d=new Float32Array(o.buffer,d,Vector3DTileGeometry.packedCylinderLength*f)),0<t&&(h=o.byteOffset+n.ELLIPSOIDS.byteOffset,h=new Float32Array(o.buffer,h,Vector3DTileGeometry.packedEllipsoidLength*t)),0<i&&(p=o.byteOffset+n.SPHERES.byteOffset,p=new Float32Array(o.buffer,p,Vector3DTileGeometry.packedSphereLength*i)),e._geometries=new Vector3DTileGeometry({boxes:u,boxBatchIds:a.boxes,cylinders:d,cylinderBatchIds:a.cylinders,ellipsoids:h,ellipsoidBatchIds:a.ellipsoids,spheres:p,sphereBatchIds:a.spheres,center:c,modelMatrix:l,batchTable:g,boundingVolume:e.tile.boundingVolume.boundingVolume})))}else e._readyPromise.resolve(e)}function createFeatures$1(e){var t=e.featuresLength;!defined(e._features)&&0<t&&(t=new Array(t),defined(e._geometries)&&e._geometries.createFeatures(e,t),e._features=t)}function ModelInstance(e,t,i){this.primitive=e,this._modelMatrix=Matrix4.clone(t),this._instanceId=i}Geometry3DTileContent.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Geometry3DTileContent.prototype.getFeature=function(e){return createFeatures$1(this),this._features[e]},Geometry3DTileContent.prototype.applyDebugSettings=function(e,t){defined(this._geometries)&&this._geometries.applyDebugSettings(e,t)},Geometry3DTileContent.prototype.applyStyle=function(e){createFeatures$1(this),defined(this._geometries)&&this._geometries.applyStyle(e,this._features)},Geometry3DTileContent.prototype.update=function(e,t){var i;defined(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),defined(this._batchTable)&&this._geometries._ready&&this._batchTable.update(e,t),defined(this._contentReadyPromise)||((i=this)._contentReadyPromise=this._geometries.readyPromise.then((function(){i._readyPromise.resolve(i)})))},Geometry3DTileContent.prototype.isDestroyed=function(){return!1},Geometry3DTileContent.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)},Object.defineProperties(ModelInstance.prototype,{instanceId:{get:function(){return this._instanceId}},model:{get:function(){return this.primitive._model}},modelMatrix:{get:function(){return Matrix4.clone(this._modelMatrix)},set:function(e){Matrix4.clone(e,this._modelMatrix),this.primitive.expandBoundingSphere(this._modelMatrix),this.primitive._dirty=!0}}});var LoadState={NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3};function ModelInstanceCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.show=defaultValue(e.show,!0),this._instancingSupported=!1,this._dynamic=defaultValue(e.dynamic,!1),this._allowPicking=defaultValue(e.allowPicking,!0),this._ready=!1,this._readyPromise=when.defer(),this._state=LoadState.NEEDS_LOAD,this._dirty=!1,this._cull=defaultValue(e.cull,!0),this._opaquePass=defaultValue(e.opaquePass,Pass$1.OPAQUE),this._instances=createInstances(this,e.instances),this._batchTable=e.batchTable,this._model=void 0,this._vertexBufferTypedArray=void 0,this._vertexBuffer=void 0,this._batchIdBuffer=void 0,this._instancedUniformsByProgram=void 0,this._drawCommands=[],this._modelCommands=void 0,this._renderStates=void 0,this._disableCullingRenderStates=void 0,this._boundingSphere=createBoundingSphere(this),this._center=Cartesian3.clone(this._boundingSphere.center),this._rtcTransform=new Matrix4,this._rtcModelView=new Matrix4,this._mode=void 0,this.modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this._modelMatrix=Matrix4.clone(this.modelMatrix),this._url=Resource.createIfNeeded(e.url),this._requestType=e.requestType,this._gltf=e.gltf,this._basePath=Resource.createIfNeeded(e.basePath),this._asynchronous=e.asynchronous,this._incrementallyLoadTextures=e.incrementallyLoadTextures,this._upAxis=e.upAxis,this._forwardAxis=e.forwardAxis,this.shadows=defaultValue(e.shadows,ShadowMode$1.ENABLED),this._shadows=this.shadows,this._pickIdLoaded=e.pickIdLoaded,this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=defaultValue(e.debugWireframe,!1),this._debugWireframe=!1,this._imageBasedLightingFactor=new Cartesian2(1,1),Cartesian2.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e.luminanceAtZenith,this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.backFaceCulling=defaultValue(e.backFaceCulling,!0),this._backFaceCulling=this.backFaceCulling}function createInstances(e,t){for(var i=(t=defaultValue(t,[])).length,r=new Array(i),n=0;n<i;++n){var a=(o=t[n]).modelMatrix,o=defaultValue(o.batchId,n);r[n]=new ModelInstance(e,a,o)}return r}function createBoundingSphere(e){for(var t=e.length,i=new Array(t),r=0;r<t;++r)i[r]=Matrix4.getTranslation(e._instances[r]._modelMatrix,new Cartesian3);return BoundingSphere.fromPoints(i)}Object.defineProperties(ModelInstanceCollection.prototype,{allowPicking:{get:function(){return this._allowPicking}},length:{get:function(){return this._instances.length}},activeAnimations:{get:function(){return this._model.activeAnimations}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){Cartesian2.clone(e,this._imageBasedLightingFactor)}}});var scratchCartesian$2=new Cartesian3,scratchMatrix$1=new Matrix4;function getCheckUniformSemanticFunction(e,t,i,r){return function(n,a){if(defined(n=n.semantic)&&-1<e.indexOf(n)){if(!(-1<t.indexOf(n)))throw new RuntimeError('Shader program cannot be optimized for instancing. Uniform "'+a+'" in program "'+i+'" uses unsupported semantic "'+n+'"');r[a]=n}}}function getInstancedUniforms(e,t){if(defined(e._instancedUniformsByProgram))return e._instancedUniformsByProgram[t];var i={};e._instancedUniformsByProgram=i;var r,n,a,o,s=["MODEL","MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELINVERSE","MODELVIEWINVERSE","MODELVIEWPROJECTIONINVERSE","MODELINVERSETRANSPOSE","MODELVIEWINVERSETRANSPOSE"],l=["MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELVIEWINVERSETRANSPOSE"],c=e._model._sourceTechniques;for(r in c)c.hasOwnProperty(r)&&(defined(i[a=(n=c[r]).program])||(o={},i[a]=o,ForEach.techniqueUniform(n,getCheckUniformSemanticFunction(s,l,t,o))));return i[t]}function getVertexShaderCallback$1(e){return function(t,i){var r,n,a,o=getInstancedUniforms(e,i),s=defined(e._batchTable),l=ShaderSource.replaceMain(t,"czm_instancing_main"),c="",u="";for(r in o)o.hasOwnProperty(r)&&("MODELVIEW"===(a=o[r])||"CESIUM_RTC_MODELVIEW"===a?n="czm_instanced_modelView":"MODELVIEWPROJECTION"===a?(n="czm_instanced_modelViewProjection",c+="mat4 czm_instanced_modelViewProjection;\n",u+="czm_instanced_modelViewProjection = czm_projection * czm_instanced_modelView;\n"):"MODELVIEWINVERSETRANSPOSE"===a&&(n="czm_instanced_modelViewInverseTranspose",c+="mat3 czm_instanced_modelViewInverseTranspose;\n",u+="czm_instanced_modelViewInverseTranspose = mat3(czm_instanced_modelView);\n"),a=new RegExp("uniform.*"+r+".*"),l=l.replace(a,""),a=new RegExp(r+"\\b","g"),l=l.replace(a,n));var d,h;t=s?(d="attribute float a_batchId;\n",h=""):(d="",h="attribute vec4 pickColor;\nvarying vec4 v_pickColor;\n","    v_pickColor = pickColor;\n"),t="uniform mat4 czm_instanced_modifiedModelView;\nuniform mat4 czm_instanced_nodeTransform;\n"+c+"mat4 czm_instanced_modelView;\nattribute vec4 czm_modelMatrixRow0;\nattribute vec4 czm_modelMatrixRow1;\nattribute vec4 czm_modelMatrixRow2;\n"+d+h+l+"void main()\n{\n    mat4 czm_instanced_model = mat4(czm_modelMatrixRow0.x, czm_modelMatrixRow1.x, czm_modelMatrixRow2.x, 0.0, czm_modelMatrixRow0.y, czm_modelMatrixRow1.y, czm_modelMatrixRow2.y, 0.0, czm_modelMatrixRow0.z, czm_modelMatrixRow1.z, czm_modelMatrixRow2.z, 0.0, czm_modelMatrixRow0.w, czm_modelMatrixRow1.w, czm_modelMatrixRow2.w, 1.0);\n    czm_instanced_modelView = czm_instanced_modifiedModelView * czm_instanced_model * czm_instanced_nodeTransform;\n"+u+"    czm_instancing_main();\n"+t+"}\n";return s&&(s=e._model.gltf,i=ModelUtility.getDiffuseAttributeOrUniform(s,i),t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",i)(t)),t}}function getFragmentShaderCallback$1(e){return function(t,i){var r,n=e._batchTable;return defined(n)?(r=e._model.gltf,i=ModelUtility.getDiffuseAttributeOrUniform(r,i),n.getFragmentShaderCallback(!0,i)(t)):"varying vec4 v_pickColor;\n"+t}}function createModifiedModelView(e,t){return function(){return Matrix4.multiply(t.uniformState.view,e._rtcTransform,e._rtcModelView)}}function createNodeTransformFunction(e){return function(){return e.computedMatrix}}function getUniformMapCallback(e,t){return function(i,r,n){(i=clone(i)).czm_instanced_modifiedModelView=createModifiedModelView(e,t),i.czm_instanced_nodeTransform=createNodeTransformFunction(n);var a,o=getInstancedUniforms(e,r);for(a in o)o.hasOwnProperty(a)&&delete i[a];return defined(e._batchTable)&&(i=e._batchTable.getUniformMapCallback()(i)),i}}function getVertexShaderNonInstancedCallback(e){return function(t,i){var r;return defined(e._batchTable)&&(r=e._model.gltf,i=ModelUtility.getDiffuseAttributeOrUniform(r,i),t="uniform float a_batchId\n;"+(t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",i)(t))),t}}function getFragmentShaderNonInstancedCallback(e){return function(t,i){var r,n=e._batchTable;return defined(n)?(r=e._model.gltf,i=ModelUtility.getDiffuseAttributeOrUniform(r,i),n.getFragmentShaderCallback(!0,i)(t)):"uniform vec4 czm_pickColor;\n"+t}}function getUniformMapNonInstancedCallback(e){return function(t){return defined(e._batchTable)&&(t=e._batchTable.getUniformMapCallback()(t)),t}}function getVertexBufferTypedArray(e){var t=e._instances,i=e.length,r=e._center,n=e._vertexBufferTypedArray;defined(n)||(n=new Float32Array(12*i)),e._dynamic&&(e._vertexBufferTypedArray=n);for(var a=0;a<i;++a){var o=t[a]._modelMatrix,s=Matrix4.clone(o,scratchMatrix$1);s[12]-=r.x,s[13]-=r.y,s[14]-=r.z,n[0+(o=12*a)]=s[0],n[1+o]=s[4],n[2+o]=s[8],n[3+o]=s[12],n[4+o]=s[1],n[5+o]=s[5],n[6+o]=s[9],n[7+o]=s[13],n[8+o]=s[2],n[9+o]=s[6],n[10+o]=s[10],n[11+o]=s[14]}return n}function createVertexBuffer$2(e,t){var i=e._instances,r=e.length,n=e._dynamic,a=defined(e._batchTable);if(a){for(var o=new Uint16Array(r),s=0;s<r;++s)o[s]=i[s]._instanceId;e._batchIdBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:o,usage:BufferUsage$1.STATIC_DRAW})}if(!a){var l=new Uint8Array(4*r);for(s=0;s<r;++s){var c=e._pickIds[s].color,u=4*s;l[u]=Color.floatToByte(c.red),l[1+u]=Color.floatToByte(c.green),l[2+u]=Color.floatToByte(c.blue),l[3+u]=Color.floatToByte(c.alpha)}e._pickIdBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:l,usage:BufferUsage$1.STATIC_DRAW})}a=getVertexBufferTypedArray(e),e._vertexBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:a,usage:n?BufferUsage$1.STREAM_DRAW:BufferUsage$1.STATIC_DRAW})}function updateVertexBuffer(e){var t=getVertexBufferTypedArray(e);e._vertexBuffer.copyFromArrayView(t)}function createPickIds(e,t){for(var i=e._instances,r=i.length,n=new Array(r),a=0;a<r;++a)n[a]=t.createPickId(i[a]);return n}function createModel(e,t){var i=e._instancingSupported,r=defined(e._batchTable),n=e._allowPicking;n={url:e._url,requestType:e._requestType,gltf:e._gltf,basePath:e._basePath,shadows:e._shadows,cacheKey:void 0,asynchronous:e._asynchronous,allowPicking:n,incrementallyLoadTextures:e._incrementallyLoadTextures,upAxis:e._upAxis,forwardAxis:e._forwardAxis,precreatedAttributes:void 0,vertexShaderLoaded:void 0,fragmentShaderLoaded:void 0,uniformMapLoaded:void 0,pickIdLoaded:e._pickIdLoaded,ignoreCommands:!0,opaquePass:e._opaquePass,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps};r||(e._pickIds=createPickIds(e,t)),i?(createVertexBuffer$2(e,t),i=ComponentDatatype$1.getSizeInBytes(ComponentDatatype$1.FLOAT),i={czm_modelMatrixRow0:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*i,instanceDivisor:1},czm_modelMatrixRow1:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,normalize:!1,offsetInBytes:4*i,strideInBytes:12*i,instanceDivisor:1},czm_modelMatrixRow2:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,normalize:!1,offsetInBytes:8*i,strideInBytes:12*i,instanceDivisor:1}},r&&(i.a_batchId={index:0,vertexBuffer:e._batchIdBuffer,componentsPerAttribute:1,componentDatatype:ComponentDatatype$1.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),r||(i.pickColor={index:0,vertexBuffer:e._pickIdBuffer,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),n.precreatedAttributes=i,n.vertexShaderLoaded=getVertexShaderCallback$1(e),n.fragmentShaderLoaded=getFragmentShaderCallback$1(e),n.uniformMapLoaded=getUniformMapCallback(e,t),defined(e._url)&&(n.cacheKey=e._url.getUrlComponent()+"#instanced")):(n.vertexShaderLoaded=getVertexShaderNonInstancedCallback(e),n.fragmentShaderLoaded=getFragmentShaderNonInstancedCallback(e),n.uniformMapLoaded=getUniformMapNonInstancedCallback(e)),defined(e._url)?e._model=Model.fromGltf(n):e._model=new Model(n)}function updateWireframe$2(e,t){if(e._debugWireframe!==e.debugWireframe||t){e._debugWireframe=e.debugWireframe;for(var i=e.debugWireframe?PrimitiveType$1.LINES:PrimitiveType$1.TRIANGLES,r=e._drawCommands,n=r.length,a=0;a<n;++a)r[a].primitiveType=i}}function getDisableCullingRenderState$1(e){return(e=clone(e,!0)).cull.enabled=!1,RenderState.fromCache(e)}function updateBackFaceCulling$1(e,t){if(e._backFaceCulling!==e.backFaceCulling||t){e._backFaceCulling=e.backFaceCulling;var i,r=e._drawCommands,n=r.length;if(!defined(e._disableCullingRenderStates))for(e._disableCullingRenderStates=new Array(n),e._renderStates=new Array(n),i=0;i<n;++i){var a=r[i].renderState,o=getDisableCullingRenderState$1(a);e._disableCullingRenderStates[i]=o,e._renderStates[i]=a}for(i=0;i<n;++i)r[i].renderState=(e._backFaceCulling?e._renderStates:e._disableCullingRenderStates)[i]}}function updateShowBoundingVolume$1(e,t){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume||t){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var i=e._drawCommands,r=i.length,n=0;n<r;++n)i[n].debugShowBoundingVolume=e.debugShowBoundingVolume}}function createCommands$3(e,t){for(var i=t.length,r=e.length,n=e._boundingSphere,a=e._cull,o=0;o<i;++o){var s=DrawCommand.shallowClone(t[o]);s.instanceCount=r,s.boundingVolume=n,s.cull=a,defined(e._batchTable)?s.pickId=e._batchTable.getPickId():s.pickId="v_pickColor",e._drawCommands.push(s)}}function createBatchIdFunction(e){return function(){return e}}function createPickColorFunction$1(e){return function(){return e}}function createCommandsNonInstanced(e,t){for(var i=e._instances,r=t.length,n=e.length,a=defined(e._batchTable),o=e._cull,s=0;s<r;++s)for(var l=0;l<n;++l){var c,u=DrawCommand.shallowClone(t[s]);u.modelMatrix=new Matrix4,u.boundingVolume=new BoundingSphere,u.cull=o,u.uniformMap=clone(u.uniformMap),a?u.uniformMap.a_batchId=createBatchIdFunction(i[l]._instanceId):(c=e._pickIds[l],u.uniformMap.czm_pickColor=createPickColorFunction$1(c.color)),e._drawCommands.push(u)}}function updateCommandsNonInstanced(e){for(var t=e._modelCommands,i=t.length,r=e.length,n=e._rtcTransform,a=e._center,o=0;o<i;++o)for(var s=t[o],l=0;l<r;++l){var c=o*r+l,u=e._drawCommands[c],d=Matrix4.clone(e._instances[l]._modelMatrix,scratchMatrix$1);d[12]-=a.x,d[13]-=a.y,d[14]-=a.z,d=Matrix4.multiply(n,d,scratchMatrix$1);var h=s.modelMatrix;c=u.modelMatrix;Matrix4.multiply(d,h,c),c=s.boundingVolume,u=u.boundingVolume,BoundingSphere.transform(c,d,u)}}function getModelCommands(e){for(var t=e._nodeCommands,i=t.length,r=[],n=0;n<i;++n){var a=t[n];a.show&&r.push(a.command)}return r}function commandsDirty(e){for(var t=e._nodeCommands,i=t.length,r=!1,n=0;n<i;n++){var a=t[n];a.command.dirty&&(r=!(a.command.dirty=!1))}return r}function generateModelCommands(e,t){e._drawCommands=[];var i=getModelCommands(e._model);t?createCommands$3(e,i):(createCommandsNonInstanced(e,i),updateCommandsNonInstanced(e))}function updateShadows$1(e,t){if(e.shadows!==e._shadows||t){e._shadows=e.shadows;for(var i=ShadowMode$1.castShadows(e.shadows),r=ShadowMode$1.receiveShadows(e.shadows),n=e._drawCommands,a=n.length,o=0;o<a;++o){var s=n[o];s.castShadows=i,s.receiveShadows=r}}}function Instanced3DModel3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._modelInstanceCollection=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,initialize$5(this,r,n)}function getPickIdCallback$1(e){return function(){return e._batchTable.getPickId()}}ModelInstanceCollection.prototype.expandBoundingSphere=function(e){e=Matrix4.getTranslation(e,scratchCartesian$2),BoundingSphere.expand(this._boundingSphere,e,this._boundingSphere)},ModelInstanceCollection.prototype.update=function(e){if(e.mode!==SceneMode$1.MORPHING&&this.show&&0!==this.length){var t,i=e.context;this._state===LoadState.NEEDS_LOAD&&(this._state=LoadState.LOADING,this._instancingSupported=i.instancedArrays,createModel(this,i),(t=this)._model.readyPromise.otherwise((function(e){t._state=LoadState.FAILED,t._readyPromise.reject(e)})));var r=this._instancingSupported,n=this._model;if(n.imageBasedLightingFactor=this.imageBasedLightingFactor,n.lightColor=this.lightColor,n.luminanceAtZenith=this.luminanceAtZenith,n.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,n.specularEnvironmentMaps=this.specularEnvironmentMaps,n.update(e),n.ready&&this._state===LoadState.LOADING){this._state=LoadState.LOADED,this._ready=!0;var a=n.boundingSphere.radius+Cartesian3.magnitude(n.boundingSphere.center);return this._boundingSphere.radius+=a,this._modelCommands=getModelCommands(n),generateModelCommands(this,r),void this._readyPromise.resolve(this)}if(this._state===LoadState.LOADED){var o=e.mode!==this._mode;i=this.modelMatrix,a=!Matrix4.equals(this._modelMatrix,i);(o||a)&&(this._mode=e.mode,Matrix4.clone(i,this._modelMatrix),s=Matrix4.multiplyByTranslation(this._modelMatrix,this._center,this._rtcTransform),this._mode!==SceneMode$1.SCENE3D&&(s=Transforms.basisTo2D(e.mapProjection,s,s)),Matrix4.getTranslation(s,this._boundingSphere.center)),r&&this._dirty&&(this._dynamic=!0,this._dirty=!1,updateVertexBuffer(this));var s=commandsDirty(n);if(s&&generateModelCommands(this,r),!r&&(n.dirty||this._dirty||o||a)&&updateCommandsNonInstanced(this),updateShadows$1(this,s),updateWireframe$2(this,s),updateBackFaceCulling$1(this,s),updateShowBoundingVolume$1(this,s),(s=e.passes).render||s.pick)for(var l=e.commandList,c=this._drawCommands,u=c.length,d=0;d<u;++d)l.push(c[d])}}},ModelInstanceCollection.prototype.isDestroyed=function(){return!1},ModelInstanceCollection.prototype.destroy=function(){this._model=this._model&&this._model.destroy();var e=this._pickIds;if(defined(e))for(var t=e.length,i=0;i<t;++i)e[i].destroy();return destroyObject(this)},Instanced3DModel3DTileContent._deprecationWarning=deprecationWarning,Object.defineProperties(Instanced3DModel3DTileContent.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){var e=this._modelInstanceCollection._model;return defined(e)?e.trianglesLength:0}},geometryByteLength:{get:function(){var e=this._modelInstanceCollection._model;return defined(e)?e.geometryByteLength:0}},texturesByteLength:{get:function(){var e=this._modelInstanceCollection._model;return defined(e)?e.texturesByteLength:0}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._modelInstanceCollection.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var sizeOfUint32$6=Uint32Array.BYTES_PER_ELEMENT,propertyScratch1=new Array(4),propertyScratch2=new Array(4);function initialize$5(e,t,i){var r=defaultValue(i,0);i=r;var n=new Uint8Array(t),a=new DataView(t);i+=sizeOfUint32$6;var o=a.getUint32(i,!0);if(1!==o)throw new RuntimeError("Only Instanced 3D Model version 1 is supported. Version "+o+" is not.");i+=sizeOfUint32$6;var s=a.getUint32(i,!0);i+=sizeOfUint32$6;var l=a.getUint32(i,!0);if(0===l)throw new RuntimeError("featureTableJsonByteLength is zero, the feature table must be defined.");i+=sizeOfUint32$6;var c=a.getUint32(i,!0);i+=sizeOfUint32$6;var u=a.getUint32(i,!0);i+=sizeOfUint32$6;var d=a.getUint32(i,!0);if(i+=sizeOfUint32$6,1!==(o=a.getUint32(i,!0))&&0!==o)throw new RuntimeError("Only glTF format 0 (uri) or 1 (embedded) are supported. Format "+o+" is not.");a=getStringFromTypedArray(n,i+=sizeOfUint32$6,l),a=JSON.parse(a),i+=l,l=new Uint8Array(t,i,c),i+=c;var h,p,f=new Cesium3DTileFeatureTable(a,l),m=f.getGlobalProperty("INSTANCES_LENGTH");if(!defined(f.featuresLength=m))throw new RuntimeError("Feature table global property: INSTANCES_LENGTH must be defined");if(0<u&&(p=getStringFromTypedArray(n,i,u),p=JSON.parse(p),i+=u,0<d&&(h=new Uint8Array(t,i,d),h=new Uint8Array(h),i+=d)),e._batchTable=new Cesium3DTileBatchTable(e,m,p,h),0==(s=r+s-i))throw new RuntimeError("glTF byte length is zero, i3dm must have a glTF to instance.");i=i%4==0?new Uint8Array(t,i,s):(Instanced3DModel3DTileContent._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),new Uint8Array(n.subarray(i,i+s))),s=e._tileset,s={instances:new Array(m),batchTable:e._batchTable,cull:!1,url:void 0,requestType:RequestType$1.TILES3D,gltf:void 0,basePath:void 0,incrementallyLoadTextures:!1,upAxis:s._gltfUpAxis,forwardAxis:Axis$1.X,opaquePass:Pass$1.CESIUM_3D_TILE,pickIdLoaded:getPickIdCallback$1(e),imageBasedLightingFactor:s.imageBasedLightingFactor,lightColor:s.lightColor,luminanceAtZenith:s.luminanceAtZenith,sphericalHarmonicCoefficients:s.sphericalHarmonicCoefficients,specularEnvironmentMaps:s.specularEnvironmentMaps,backFaceCulling:s.backFaceCulling},0===o?(o=(o=getStringFromTypedArray(i)).replace(/[\s\0]+$/,""),s.url=e._resource.getDerivedResource({url:o})):(s.gltf=i,s.basePath=e._resource.clone());var g,y=f.getGlobalProperty("EAST_NORTH_UP");defined(i=f.getGlobalProperty("RTC_CENTER",ComponentDatatype$1.FLOAT,3))&&(g=Cartesian3.unpack(i));for(var _=s.instances,v=new Cartesian3,C=new Array(3),x=new Cartesian3,b=new Cartesian3,S=new Cartesian3,T=new Matrix3,E=new Quaternion,w=new Cartesian3,A=new TranslationRotationScale,P=new Matrix4,D=0;D<m;D++){var M=f.getProperty("POSITION",ComponentDatatype$1.FLOAT,3,D,propertyScratch1);if(!defined(M)){M=C;var I=f.getProperty("POSITION_QUANTIZED",ComponentDatatype$1.UNSIGNED_SHORT,3,D,propertyScratch1);if(!defined(I))throw new RuntimeError("Either POSITION or POSITION_QUANTIZED must be defined for each instance.");var R=f.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",ComponentDatatype$1.FLOAT,3);if(!defined(R))throw new RuntimeError("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var O=f.getGlobalProperty("QUANTIZED_VOLUME_SCALE",ComponentDatatype$1.FLOAT,3);if(!defined(O))throw new RuntimeError("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var L=0;L<3;L++)M[L]=I[L]/65535*O[L]+R[L]}Cartesian3.unpack(M,0,v),defined(g)&&Cartesian3.add(v,g,v),A.translation=v;var N=f.getProperty("NORMAL_UP",ComponentDatatype$1.FLOAT,3,D,propertyScratch1),F=f.getProperty("NORMAL_RIGHT",ComponentDatatype$1.FLOAT,3,D,propertyScratch2),B=!1;if(defined(N)){if(!defined(F))throw new RuntimeError("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");Cartesian3.unpack(N,0,b),Cartesian3.unpack(F,0,x),B=!0}else{F=f.getProperty("NORMAL_UP_OCT32P",ComponentDatatype$1.UNSIGNED_SHORT,2,D,propertyScratch1);var V=f.getProperty("NORMAL_RIGHT_OCT32P",ComponentDatatype$1.UNSIGNED_SHORT,2,D,propertyScratch2);if(defined(F)){if(!defined(V))throw new RuntimeError("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");AttributeCompression.octDecodeInRange(F[0],F[1],65535,b),AttributeCompression.octDecodeInRange(V[0],V[1],65535,x),B=!0}else y?(Transforms.eastNorthUpToFixedFrame(v,Ellipsoid.WGS84,P),Matrix4.getMatrix3(P,T)):Matrix3.clone(Matrix3.IDENTITY,T)}B&&(Cartesian3.cross(x,b,S),Cartesian3.normalize(S,S),Matrix3.setColumn(T,0,x,T),Matrix3.setColumn(T,1,b,T),Matrix3.setColumn(T,2,S,T)),Quaternion.fromRotationMatrix(T,E),A.rotation=E,w=Cartesian3.fromElements(1,1,1,w),defined(V=f.getProperty("SCALE",ComponentDatatype$1.FLOAT,1,D))&&Cartesian3.multiplyByScalar(w,V,w),defined(B=f.getProperty("SCALE_NON_UNIFORM",ComponentDatatype$1.FLOAT,3,D,propertyScratch1))&&(w.x*=B[0],w.y*=B[1],w.z*=B[2]),A.scale=w,defined(V=f.getProperty("BATCH_ID",ComponentDatatype$1.UNSIGNED_SHORT,1,D))||(V=D),Matrix4.fromTranslationRotationScale(A,P),B=P.clone(),_[D]={modelMatrix:B,batchId:V}}e._modelInstanceCollection=new ModelInstanceCollection(s),e._modelInstanceCollection.readyPromise.then((function(e){e.activeAnimations.addAll({loop:ModelAnimationLoop$1.REPEAT})}))}function createFeatures$2(e){var t=e.featuresLength;if(!defined(e._features)&&0<t){for(var i=new Array(t),r=0;r<t;++r)i[r]=new Cesium3DTileFeature(e,r);e._features=i}}Instanced3DModel3DTileContent.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Instanced3DModel3DTileContent.prototype.getFeature=function(e){return this.featuresLength,createFeatures$2(this),this._features[e]},Instanced3DModel3DTileContent.prototype.applyDebugSettings=function(e,t){t=e?t:Color.WHITE,this._batchTable.setAllColor(t)},Instanced3DModel3DTileContent.prototype.applyStyle=function(e){this._batchTable.applyStyle(e)},Instanced3DModel3DTileContent.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._modelInstanceCollection.modelMatrix=this._tile.computedTransform,this._modelInstanceCollection.shadows=this._tileset.shadows,this._modelInstanceCollection.lightColor=this._tileset.lightColor,this._modelInstanceCollection.luminanceAtZenith=this._tileset.luminanceAtZenith,this._modelInstanceCollection.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._modelInstanceCollection.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._modelInstanceCollection.backFaceCulling=this._tileset.backFaceCulling,this._modelInstanceCollection.debugWireframe=this._tileset.debugWireframe;var r=this._modelInstanceCollection._model;defined(r)&&(e=this._tileset.clippingPlanes,r.referenceMatrix=this._tileset.clippingPlanesOriginMatrix,defined(e)&&this._tile.clippingPlanesDirty&&(r._clippingPlanes=e.enabled&&this._tile._isClipped?e:void 0),defined(e)&&defined(r._clippingPlanes)&&r._clippingPlanes!==e&&(r._clippingPlanes=e)),this._modelInstanceCollection.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&this._batchTable.addDerivedCommands(t,i,!1)},Instanced3DModel3DTileContent.prototype.isDestroyed=function(){return!1},Instanced3DModel3DTileContent.prototype.destroy=function(){return this._modelInstanceCollection=this._modelInstanceCollection&&this._modelInstanceCollection.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)};var Cesium3DTileRefine={ADD:0,REPLACE:1},Cesium3DTileRefine$1=Object.freeze(Cesium3DTileRefine),DecodingState={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function PointCloud(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=Color.clone(Color.DARKGRAY),this._highlightColor=Color.clone(Color.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=DecodingState.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._readyPromise=when.defer(),this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=defaultValue(e.opaquePass,Pass$1.OPAQUE),this._cull=defaultValue(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this._modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this.time=0,this.shadows=ShadowMode$1.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,initialize$6(this,e)}Object.defineProperties(PointCloud.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},color:{get:function(){return Color.clone(this._highlightColor)},set:function(e){this._highlightColor=Color.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(defined(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=BoundingSphere.clone(e,this._boundingSphere)}}});var sizeOfUint32$7=Uint32Array.BYTES_PER_ELEMENT;function initialize$6(e,t){var i=t.arrayBuffer,r=defaultValue(t.byteOffset,0),n=new Uint8Array(i),a=new DataView(i);r+=sizeOfUint32$7;var o=a.getUint32(r,!0);if(1!==o)throw new RuntimeError("Only Point Cloud tile version 1 is supported.  Version "+o+" is not.");if(r+=sizeOfUint32$7,r+=sizeOfUint32$7,0===(b=a.getUint32(r,!0)))throw new RuntimeError("Feature table must have a byte length greater than zero");r+=sizeOfUint32$7;var s=a.getUint32(r,!0);r+=sizeOfUint32$7;var l=a.getUint32(r,!0);r+=sizeOfUint32$7;var c=a.getUint32(r,!0),u=getStringFromTypedArray(n,r+=sizeOfUint32$7,b),d=JSON.parse(u);r+=b;var h,p,f,m,g,y,_=new Uint8Array(i,r,s);if(r+=s,0<l&&(S=getStringFromTypedArray(n,r,l),p=JSON.parse(S),r+=l,0<c&&(h=new Uint8Array(i,r,c))),o=(t=new Cesium3DTileFeatureTable(d,_)).getGlobalProperty("POINTS_LENGTH"),!defined(t.featuresLength=o))throw new RuntimeError("Feature table global property: POINTS_LENGTH must be defined");defined(a=t.getGlobalProperty("RTC_CENTER",ComponentDatatype$1.FLOAT,3))&&(e._rtcCenter=Cartesian3.unpack(a));u=!1;var v,C,x,b=!1,S=(s=!1,n=!1,!1);l=!1,i=!1,c=!1,r=defined(d.extensions)?d.extensions["3DTILES_draco_point_compression"]:void 0,a=defined(p)&&defined(p.extensions)?p.extensions["3DTILES_draco_point_compression"]:void 0;if(defined(a)&&(E=a.properties),defined(r)){v=r.properties;a=r.byteOffset;var T=r.byteLength;if(!defined(v)||!defined(a)||!defined(T))throw new RuntimeError("Draco properties, byteOffset, and byteLength must be defined");T=arraySlice(_,a,a+T),u=defined(v.POSITION),b=defined(v.RGB)||defined(v.RGBA),s=defined(v.NORMAL),n=defined(v.BATCH_ID),l=defined(v.RGBA),e._decodingState=DecodingState.NEEDS_DECODE}if(defined(T)&&(C={buffer:T,featureTableProperties:v,batchTableProperties:E,properties:combine(v,E),dequantizeInShader:e._dequantizeInShader}),!u)if(defined(d.POSITION))f=t.getPropertyArray("POSITION",ComponentDatatype$1.FLOAT,3),u=!0;else if(defined(d.POSITION_QUANTIZED)){f=t.getPropertyArray("POSITION_QUANTIZED",ComponentDatatype$1.UNSIGNED_SHORT,3),u=S=!0;var E=t.getGlobalProperty("QUANTIZED_VOLUME_SCALE",ComponentDatatype$1.FLOAT,3);if(!defined(E))throw new RuntimeError("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(e._quantizedVolumeScale=Cartesian3.unpack(E),e._quantizedRange=65535,!defined(E=t.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",ComponentDatatype$1.FLOAT,3)))throw new RuntimeError("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e._quantizedVolumeOffset=Cartesian3.unpack(E)}if(b||(defined(d.RGBA)?(m=t.getPropertyArray("RGBA",ComponentDatatype$1.UNSIGNED_BYTE,4),b=l=!0):defined(d.RGB)?(m=t.getPropertyArray("RGB",ComponentDatatype$1.UNSIGNED_BYTE,3),b=!0):defined(d.RGB565)&&(m=t.getPropertyArray("RGB565",ComponentDatatype$1.UNSIGNED_SHORT,1),b=i=!0)),s||(defined(d.NORMAL)?(g=t.getPropertyArray("NORMAL",ComponentDatatype$1.FLOAT,3),s=!0):defined(d.NORMAL_OCT16P)&&(g=t.getPropertyArray("NORMAL_OCT16P",ComponentDatatype$1.UNSIGNED_BYTE,2),s=c=!0)),n||defined(d.BATCH_ID)&&(y=t.getPropertyArray("BATCH_ID",ComponentDatatype$1.UNSIGNED_SHORT,1),n=!0),!u)throw new RuntimeError("Either POSITION or POSITION_QUANTIZED must be defined.");if(defined(d.CONSTANT_RGBA)&&(d=t.getGlobalProperty("CONSTANT_RGBA",ComponentDatatype$1.UNSIGNED_BYTE,4),e._constantColor=Color.fromBytes(d[0],d[1],d[2],d[3],e._constantColor)),n){if(!defined(t=t.getGlobalProperty("BATCH_LENGTH")))throw new RuntimeError("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");defined(h)&&(h=new Uint8Array(h)),defined(e._batchTableLoaded)&&e._batchTableLoaded(t,p,h)}!n&&defined(h)&&(x=Cesium3DTileBatchTable.getBinaryProperties(o,p,h)),e._parsedContent={positions:f,colors:m,normals:g,batchIds:y,styleableProperties:x,draco:C},e._pointsLength=o,e._isQuantized=S,e._isOctEncoded16P=c,e._isRGB565=i,e._isTranslucent=l,e._hasColors=b,e._hasNormals=s,e._hasBatchIds=n}var scratchMin$2=new Cartesian3,scratchMax$2=new Cartesian3,scratchPosition$6=new Cartesian3,randomValues;function getRandomValues(e){if(!defined(randomValues)){CesiumMath.setRandomNumberSeed(0),randomValues=new Array(e);for(var t=0;t<e;++t)randomValues[t]=CesiumMath.nextRandomNumber()}return randomValues}function computeApproximateBoundingSphereFromPositions(e){for(var t=e.length/3,i=Math.min(t,20),r=getRandomValues(20),n=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=Cartesian3.fromElements(n,n,n,scratchMin$2),s=Cartesian3.fromElements(a,a,a,scratchMax$2),l=0;l<i;++l){var c=Math.floor(r[l]*t);c=Cartesian3.unpack(e,3*c,scratchPosition$6);Cartesian3.minimumByComponent(o,c,o),Cartesian3.maximumByComponent(s,c,s)}return(a=BoundingSphere.fromCornerPoints(o,s)).radius+=CesiumMath.EPSILON2,a}function prepareVertexAttribute(e,t){var i=ComponentDatatype$1.fromTypedArray(e);return i===ComponentDatatype$1.INT||i===ComponentDatatype$1.UNSIGNED_INT||i===ComponentDatatype$1.DOUBLE?(oneTimeWarning("Cast pnts property to floats",'Point cloud property "'+t+'" will be casted to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.'),new Float32Array(e)):e}var scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier=new Cartesian4,scratchQuantizedVolumeScaleAndOctEncodedRange=new Cartesian4,scratchColor$5=new Color,positionLocation=0,colorLocation=1,normalLocation=2,batchIdLocation=3,numberOfAttributes=4,scratchClippingPlanesMatrix$1=new Matrix4,scratchInverseTransposeClippingPlanesMatrix=new Matrix4;function createResources$2(e,t){var i=t.context,r=e._parsedContent,n=e._pointsLength,a=r.positions,o=r.colors,s=r.normals,l=r.batchIds,c=r.styleableProperties,u=defined(c),d=e._isQuantized,h=e._isQuantizedDraco,p=e._isOctEncoded16P,f=e._isOctEncodedDraco,m=e._quantizedRange,g=e._octEncodedRange,y=e._isRGB565,_=e._isTranslucent,v=e._hasColors,C=e._hasNormals,x=(t=e._hasBatchIds,[]),b={};if(e._styleableShaderAttributes=b,u){var S,T,E,w,A,P=numberOfAttributes;for(S in c)c.hasOwnProperty(S)&&(A=prepareVertexAttribute((T=c[S]).typedArray,S),E=T.componentCount,w=ComponentDatatype$1.fromTypedArray(A),A=Buffer$1.createVertexBuffer({context:i,typedArray:A,usage:BufferUsage$1.STATIC_DRAW}),e._geometryByteLength+=A.sizeInBytes,A={index:P,vertexBuffer:A,componentsPerAttribute:E,componentDatatype:w,normalize:!1,offsetInBytes:0,strideInBytes:0},x.push(A),b[S]={location:P,componentCount:E},++P)}var D,M,I;r=Buffer$1.createVertexBuffer({context:i,typedArray:a,usage:BufferUsage$1.STATIC_DRAW});e._geometryByteLength+=r.sizeInBytes,v&&(D=Buffer$1.createVertexBuffer({context:i,typedArray:o,usage:BufferUsage$1.STATIC_DRAW}),e._geometryByteLength+=D.sizeInBytes),C&&(M=Buffer$1.createVertexBuffer({context:i,typedArray:s,usage:BufferUsage$1.STATIC_DRAW}),e._geometryByteLength+=M.sizeInBytes),t&&(l=prepareVertexAttribute(l,"batchIds"),I=Buffer$1.createVertexBuffer({context:i,typedArray:l,usage:BufferUsage$1.STATIC_DRAW}),e._geometryByteLength+=I.sizeInBytes),s=[],w=d?ComponentDatatype$1.UNSIGNED_SHORT:h?m<=255?ComponentDatatype$1.UNSIGNED_BYTE:ComponentDatatype$1.UNSIGNED_SHORT:ComponentDatatype$1.FLOAT,s.push({index:positionLocation,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:w,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=d||h?BoundingSphere.fromCornerPoints(Cartesian3.ZERO,e._quantizedVolumeScale):computeApproximateBoundingSphereFromPositions(a)),v&&(y?s.push({index:colorLocation,vertexBuffer:D,componentsPerAttribute:1,componentDatatype:ComponentDatatype$1.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0}):(y=_?4:3,s.push({index:colorLocation,vertexBuffer:D,componentsPerAttribute:y,componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0}))),C&&(w=p?(E=2,ComponentDatatype$1.UNSIGNED_BYTE):f?(E=2,g<=255?ComponentDatatype$1.UNSIGNED_BYTE:ComponentDatatype$1.UNSIGNED_SHORT):(E=3,ComponentDatatype$1.FLOAT),s.push({index:normalLocation,vertexBuffer:M,componentsPerAttribute:E,componentDatatype:w,normalize:!1,offsetInBytes:0,strideInBytes:0})),t&&s.push({index:batchIdLocation,vertexBuffer:I,componentsPerAttribute:1,componentDatatype:ComponentDatatype$1.fromTypedArray(l),normalize:!1,offsetInBytes:0,strideInBytes:0}),u&&(s=s.concat(x)),u=new VertexArray({context:i,attributes:s}),s={depthTest:{enabled:!0}},e._opaquePass===Pass$1.CESIUM_3D_TILE&&(s.stencilTest=StencilConstants$1.setCesium3DTileBit(),s.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK),e._opaqueRenderState=RenderState.fromCache(s),e._translucentRenderState=RenderState.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:BlendingState$1.ALPHA_BLEND}),e._drawCommand=new DrawCommand({boundingVolume:new BoundingSphere,cull:e._cull,modelMatrix:new Matrix4,primitiveType:PrimitiveType$1.POINTS,vertexArray:u,count:n,shaderProgram:void 0,uniformMap:void 0,renderState:_?e._translucentRenderState:e._opaqueRenderState,pass:_?Pass$1.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function createUniformMap$2(e,t){var i=t.context,r=e._isQuantized,n=e._isQuantizedDraco,a=e._isOctEncodedDraco,o={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){var r,n=scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier;return n.x=e._attenuation?e.maximumAttenuation:e._pointSize,n.x*=t.pixelRatio,n.y=e.time,e._attenuation&&(r=t.camera.frustum,r=t.mode===SceneMode$1.SCENE2D||r instanceof OrthographicFrustum?Number.POSITIVE_INFINITY:i.drawingBufferHeight/t.camera.frustum.sseDenominator,n.z=e.geometricError*e.geometricErrorScale,n.w=r),n},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){var t=e.clippingPlanes;return e.isClipped?t.texture:i.defaultTexture},u_clippingPlanesEdgeStyle:function(){var t=e.clippingPlanes;if(!defined(t))return Color.TRANSPARENT;var i=Color.clone(t.edgeColor,scratchColor$5);return i.alpha=t.edgeWidth,i},u_clippingPlanesMatrix:function(){var t=e.clippingPlanes;if(!defined(t))return Matrix4.IDENTITY;var r=defaultValue(e.clippingPlanesOriginMatrix,e._modelMatrix);return Matrix4.multiply(i.uniformState.view3D,r,scratchClippingPlanesMatrix$1),t=Matrix4.multiply(scratchClippingPlanesMatrix$1,t.modelMatrix,scratchClippingPlanesMatrix$1),Matrix4.inverseTranspose(t,scratchInverseTransposeClippingPlanesMatrix)}};(r||n||a)&&(o=combine(o,{u_quantizedVolumeScaleAndOctEncodedRange:function(){var t,i=scratchQuantizedVolumeScaleAndOctEncodedRange;return defined(e._quantizedVolumeScale)&&(t=Cartesian3.clone(e._quantizedVolumeScale,i),Cartesian3.divideByScalar(t,e._quantizedRange,i)),i.w=e._octEncodedRange,i}})),defined(e._uniformMapLoaded)&&(o=e._uniformMapLoaded(o)),e._drawCommand.uniformMap=o}function getStyleablePropertyIds(e,t){for(var i=/czm_3dtiles_property_(\d+)/g,r=i.exec(e);null!==r;){var n=parseInt(r[1]);-1===t.indexOf(n)&&t.push(n),r=i.exec(e)}}function getBuiltinPropertyNames(e,t){for(var i=/czm_3dtiles_builtin_property_(\w+)/g,r=i.exec(e);null!==r;){var n=r[1];-1===t.indexOf(n)&&t.push(n),r=i.exec(e)}}function getVertexAttribute(e,t){for(var i=e.numberOfAttributes,r=0;r<i;++r){var n=e.getAttribute(r);if(n.index===t)return n}}var builtinPropertyNameMap={POSITION:"czm_3dtiles_builtin_property_POSITION",POSITION_ABSOLUTE:"czm_3dtiles_builtin_property_POSITION_ABSOLUTE",COLOR:"czm_3dtiles_builtin_property_COLOR",NORMAL:"czm_3dtiles_builtin_property_NORMAL"};function modifyStyleFunction(e){return e.replace("()","(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)")}function createShaders$1(e,t,i){var r,n,a,o,s=t.context,l=defined(i),c=e._isQuantized,u=e._isQuantizedDraco,d=e._isOctEncoded16P,h=e._isOctEncodedDraco,p=e._isRGB565,f=e._isTranslucent,m=e._hasColors,g=e._hasNormals,y=e._hasBatchIds,_=e._backFaceCulling,v=e._normalShading,C=e._drawCommand.vertexArray,x=e.clippingPlanes,b=e._attenuation,S=f,T=clone(builtinPropertyNameMap),E={},w=e._styleableShaderAttributes;for(r in w)w.hasOwnProperty(r)&&(F=w[r],T[r]="czm_3dtiles_property_"+F.location,E[F.location]=F);l&&(M={translucent:!1},n=i.getColorShaderFunction("getColorFromStyle",T,M),a=i.getShowShaderFunction("getShowFromStyle",T,M),o=i.getPointSizeShaderFunction("getPointSizeFromStyle",T,M),defined(n)&&M.translucent&&(S=!0)),e._styleTranslucent=S;var A=defined(n),P=defined(a),D=(l=defined(o),i=e.isClipped,[]),M=[];A&&(getStyleablePropertyIds(n,D),getBuiltinPropertyNames(n,M),n=modifyStyleFunction(n)),P&&(getStyleablePropertyIds(a,D),getBuiltinPropertyNames(a,M),a=modifyStyleFunction(a)),l&&(getStyleablePropertyIds(o,D),getBuiltinPropertyNames(o,M),o=modifyStyleFunction(o));var I;S=0<=M.indexOf("COLOR");if((M=0<=M.indexOf("NORMAL"))&&!g)throw new RuntimeError("Style references the NORMAL semantic but the point cloud does not have normals");for(r in w)w.hasOwnProperty(r)&&(F=w[r],I=0<=D.indexOf(F.location),getVertexAttribute(C,F.location).enabled=I);S=m&&(!A||S),m&&(getVertexAttribute(C,colorLocation).enabled=S),M=g&&(v||_||M),g&&(getVertexAttribute(C,normalLocation).enabled=M);var R={a_position:positionLocation};S&&(R.a_color=colorLocation),M&&(R.a_normal=normalLocation),y&&(R.a_batchId=batchIdLocation);for(var O="",L=D.length,N=0;N<L;++N){var F,B,V;O+="attribute "+(V=1===(V=(F=E[B=D[N]]).componentCount)?"float":"vec"+V)+" "+(B="czm_3dtiles_property_"+B)+"; \n",R[B]=F.location}createUniformMap$2(e,t),t="attribute vec3 a_position; \nvarying vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n",t+="float u_pointSize; \nfloat u_time; \n",b&&(t+="float u_geometricError; \nfloat u_depthMultiplier; \n"),t+=O,S&&(t+=f?"attribute vec4 a_color; \n":p?"attribute float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"attribute vec3 a_color; \n"),M&&(t+=d||h?"attribute vec2 a_normal; \n":"attribute vec3 a_normal; \n"),y&&(t+="attribute float a_batchId; \n"),(c||u||h)&&(t+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),A&&(t+=n),P&&(t+=a),l&&(t+=o),t+="void main() \n{ \n    u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n    u_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",b&&(t+="    u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n    u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),t+=S?f?"    vec4 color = a_color; \n":p?"    float compressed = a_color; \n    float r = floor(compressed * SHIFT_RIGHT_11); \n    compressed -= r * SHIFT_LEFT_11; \n    float g = floor(compressed * SHIFT_RIGHT_5); \n    compressed -= g * SHIFT_LEFT_5; \n    float b = compressed; \n    vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n    vec4 color = vec4(rgb, 1.0); \n":"    vec4 color = vec4(a_color, 1.0); \n":"    vec4 color = u_constantColor; \n",t+=c||u?"    vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":"    vec3 position = a_position; \n",t+="    vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",M?(t+=d?"    vec3 normal = czm_octDecode(a_normal); \n":h?"    vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":"    vec3 normal = a_normal; \n",t+="    vec3 normalEC = czm_normal * normal; \n"):t+="    vec3 normal = vec3(1.0); \n",A&&(t+="    color = getColorFromStyle(position, position_absolute, color, normal); \n"),P&&(t+="    float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),t+=l?"    gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":b?"    vec4 positionEC = czm_modelView * vec4(position, 1.0); \n    float depth = -positionEC.z; \n    gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":"    gl_PointSize = u_pointSize; \n",t+="    color = color * u_highlightColor; \n",M&&v&&(t+="    float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n    diffuseStrength = max(diffuseStrength, 0.4); \n    color.xyz *= diffuseStrength * czm_lightColor; \n"),t+="    v_color = color; \n    gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",M&&_&&(t+="    float visible = step(-normalEC.z, 0.0); \n    gl_Position *= visible; \n    gl_PointSize *= visible; \n"),P&&(t+="    gl_Position.w *= float(show); \n    gl_PointSize *= float(show); \n"),t+="} \n",P="varying vec4 v_color; \n",i&&(P+="uniform highp sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",P+="\n",P+=getClippingFunction(x,s),P+="\n"),P+="void main() \n{ \n    gl_FragColor = czm_gammaCorrect(v_color); \n",i&&(P+=getClipAndStyleCode("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),P+="} \n",defined(e._vertexShaderLoaded)&&(t=e._vertexShaderLoaded(t)),defined(e._fragmentShaderLoaded)&&(P=e._fragmentShaderLoaded(P));var k=e._drawCommand;defined(k.shaderProgram)&&k.shaderProgram.destroy(),k.shaderProgram=ShaderProgram.fromCache({context:s,vertexShaderSource:t,fragmentShaderSource:P,attributeLocations:R});try{k.shaderProgram._bind()}catch(e){throw new RuntimeError("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function decodeDraco(e,t){return e._decodingState!==DecodingState.READY&&(e._decodingState===DecodingState.NEEDS_DECODE&&(i=e._parsedContent,r=i.draco,defined(t=DracoLoader.decodePointCloud(r,t))&&(e._decodingState=DecodingState.DECODING,t.then((function(t){e._decodingState=DecodingState.READY;var n,a=defined(t.POSITION)?t.POSITION.array:void 0,o=defined(t.RGB)?t.RGB.array:void 0,s=defined(t.RGBA)?t.RGBA.array:void 0,l=defined(t.NORMAL)?t.NORMAL.array:void 0,c=defined(t.BATCH_ID)?t.BATCH_ID.array:void 0,u=defined(a)&&defined(t.POSITION.data.quantization),d=defined(l)&&defined(t.NORMAL.data.quantization);u&&(u=(n=t.POSITION.data.quantization).range,e._quantizedVolumeScale=Cartesian3.fromElements(u,u,u),e._quantizedVolumeOffset=Cartesian3.unpack(n.minValues),e._quantizedRange=(1<<n.quantizationBits)-1,e._isQuantizedDraco=!0),d&&(e._octEncodedRange=(1<<t.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);var h,p,f=i.styleableProperties,m=r.batchTableProperties;for(h in m)m.hasOwnProperty(h)&&(p=t[h],defined(f)||(f={}),f[h]={typedArray:p.array,componentCount:p.data.componentsPerAttribute});i.positions=defaultValue(a,i.positions),i.colors=defaultValue(defaultValue(s,o),i.colors),i.normals=defaultValue(l,i.normals),i.batchIds=defaultValue(c,i.batchIds),i.styleableProperties=f})).otherwise((function(t){e._decodingState=DecodingState.FAILED,e._readyPromise.reject(t)})))),!0);var i,r}var scratchComputedTranslation$2=new Cartesian4,scratchScale$5=new Cartesian3;function attachTexture(e,t,i){(e=e._gl).framebufferTexture2D(e.FRAMEBUFFER,t,i._target,i._texture,0)}function attachRenderbuffer(e,t,i){(e=e._gl).framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,i._getRenderbuffer())}function Framebuffer(e){var t,i,r,n=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context._gl;if(this._gl=n,this._framebuffer=n.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=defaultValue(e.destroyAttachments,!0),defined(e.depthTexture)||defined(e.depthRenderbuffer),defined(e.depthStencilTexture)||defined(e.depthStencilRenderbuffer),this._bind(),defined(e.colorTextures))for(var a=e.colorTextures,o=this._colorTextures.length=this._activeColorAttachments.length=a.length,s=0;s<o;++s)t=a[s],attachTexture(this,r=this._gl.COLOR_ATTACHMENT0+s,t),this._activeColorAttachments[s]=r,this._colorTextures[s]=t;if(defined(e.colorRenderbuffers)){var l=e.colorRenderbuffers;for(o=this._colorRenderbuffers.length=this._activeColorAttachments.length=l.length,s=0;s<o;++s)i=l[s],attachRenderbuffer(this,r=this._gl.COLOR_ATTACHMENT0+s,i),this._activeColorAttachments[s]=r,this._colorRenderbuffers[s]=i}defined(e.depthTexture)&&(t=e.depthTexture,attachTexture(this,this._gl.DEPTH_ATTACHMENT,t),this._depthTexture=t),defined(e.depthRenderbuffer)&&(i=e.depthRenderbuffer,attachRenderbuffer(this,this._gl.DEPTH_ATTACHMENT,i),this._depthRenderbuffer=i),defined(e.stencilRenderbuffer)&&(i=e.stencilRenderbuffer,attachRenderbuffer(this,this._gl.STENCIL_ATTACHMENT,i),this._stencilRenderbuffer=i),defined(e.depthStencilTexture)&&(t=e.depthStencilTexture,attachTexture(this,this._gl.DEPTH_STENCIL_ATTACHMENT,t),this._depthStencilTexture=t),defined(e.depthStencilRenderbuffer)&&(i=e.depthStencilRenderbuffer,attachRenderbuffer(this,this._gl.DEPTH_STENCIL_ATTACHMENT,i),this._depthStencilRenderbuffer=i),this._unBind()}PointCloud.prototype.update=function(e){var t,i,r,n;decodeDraco(this,e.context)||(n=!1,r=!Matrix4.equals(this._modelMatrix,this.modelMatrix),this._mode!==e.mode&&(this._mode=e.mode,r=!0),defined(this._drawCommand)||(createResources$2(this,e),n=r=!0,this._ready=!0,this._readyPromise.resolve(this),this._parsedContent=void 0),r&&(Matrix4.clone(this.modelMatrix,this._modelMatrix),r=this._drawCommand.modelMatrix,Matrix4.clone(this._modelMatrix,r),defined(this._rtcCenter)&&Matrix4.multiplyByTranslation(r,this._rtcCenter,r),defined(this._quantizedVolumeOffset)&&Matrix4.multiplyByTranslation(r,this._quantizedVolumeOffset,r),e.mode!==SceneMode$1.SCENE3D&&(i=e.mapProjection,t=Matrix4.getColumn(r,3,scratchComputedTranslation$2),Cartesian4.equals(t,Cartesian4.UNIT_W)||Transforms.basisTo2D(i,r,r)),t=this._drawCommand.boundingVolume,BoundingSphere.clone(this._boundingSphere,t),this._cull&&(i=t.center,Matrix4.multiplyByPoint(r,i,i),r=Matrix4.getScale(r,scratchScale$5),t.radius*=Cartesian3.maximumComponent(r))),this.clippingPlanesDirty&&(n=!(this.clippingPlanesDirty=!1)),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,n=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,n=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,n=!0),this._style===this.style&&!this.styleDirty||(this._style=this.style,n=!(this.styleDirty=!1)),n&&createShaders$1(this,e,this._style),this._drawCommand.castShadows=ShadowMode$1.castShadows(this.shadows),this._drawCommand.receiveShadows=ShadowMode$1.receiveShadows(this.shadows),n=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent,this._drawCommand.renderState=n?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=n?Pass$1.TRANSLUCENT:this._opaquePass,n=e.commandList,((e=e.passes).render||e.pick)&&n.push(this._drawCommand))},PointCloud.prototype.isDestroyed=function(){return!1},PointCloud.prototype.destroy=function(){var e=this._drawCommand;return defined(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),destroyObject(this)},Object.defineProperties(Framebuffer.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),Framebuffer.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},Framebuffer.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},Framebuffer.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},Framebuffer.prototype.getColorTexture=function(e){return this._colorTextures[e]},Framebuffer.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]},Framebuffer.prototype.isDestroyed=function(){return!1},Framebuffer.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,i=t.length;e<i;++e){var r=t[e];defined(r)&&r.destroy()}var n=this._colorRenderbuffers;for(i=n.length,e=0;e<i;++e){var a=n[e];defined(a)&&a.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),destroyObject(this)};var PointCloudEyeDomeLightingShader="#extension GL_EXT_frag_depth : enable\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec2 u_distanceAndEdlStrength;\nvarying vec2 v_textureCoordinates;\nvec2 neighborContribution(float log2Depth, vec2 offset)\n{\nfloat dist = u_distanceAndEdlStrength.x;\nvec2 texCoordOrig = v_textureCoordinates + offset * dist;\nvec2 texCoord0 = v_textureCoordinates + offset * floor(dist);\nvec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);\nfloat depthOrLogDepth0 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord0));\nfloat depthOrLogDepth1 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord1));\nif (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {\nreturn vec2(0.0);\n}\nfloat depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, v_textureCoordinates));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 0.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\nvec2 texelSize = 1.0 / czm_viewport.zw;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat strength = u_distanceAndEdlStrength.y;\nfloat shade = exp(-response * 300.0 * strength);\ncolor.rgb *= shade;\ngl_FragColor = vec4(color);\ngl_FragDepthEXT = depthOrLogDepth;\n}\n";function PointCloudEyeDomeLighting(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthGBuffer=void 0,this._depthTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}function destroyFramebuffer(e){var t=e._framebuffer;defined(t)&&(e._colorGBuffer.destroy(),e._depthGBuffer.destroy(),e._depthTexture.destroy(),t.destroy(),e._framebuffer=void 0,e._colorGBuffer=void 0,e._depthGBuffer=void 0,e._depthTexture=void 0,e._drawCommand=void 0,e._clearCommand=void 0)}function createFramebuffer(e,t){var i=t.drawingBufferWidth,r=new Texture({context:t,width:i,height:a=t.drawingBufferHeight,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),n=new Texture({context:t,width:i,height:a,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),a=new Texture({context:t,width:i,height:a,pixelFormat:PixelFormat$1.DEPTH_COMPONENT,pixelDatatype:PixelDatatype$1.UNSIGNED_INT,sampler:Sampler.NEAREST});e._framebuffer=new Framebuffer({context:t,colorTextures:[r,n],depthTexture:a,destroyAttachments:!1}),e._colorGBuffer=r,e._depthGBuffer=n,e._depthTexture=a}var distanceAndEdlStrengthScratch=new Cartesian2;function createCommands$4(e,t){var i=new ShaderSource({defines:["LOG_DEPTH_WRITE"],sources:[PointCloudEyeDomeLightingShader]}),r={u_pointCloud_colorGBuffer:function(){return e._colorGBuffer},u_pointCloud_depthGBuffer:function(){return e._depthGBuffer},u_distanceAndEdlStrength:function(){return distanceAndEdlStrengthScratch.x=e._radius,distanceAndEdlStrengthScratch.y=e._strength,distanceAndEdlStrengthScratch}},n=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:StencilConstants$1.setCesium3DTileBit(),stencilMask:StencilConstants$1.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:r,renderState:n,pass:Pass$1.CESIUM_3D_TILE,owner:e}),e._clearCommand=new ClearCommand({framebuffer:e._framebuffer,color:new Color(0,0,0,0),depth:1,renderState:RenderState.fromCache(),pass:Pass$1.CESIUM_3D_TILE,owner:e})}function createResources$3(e,t){var i=t.drawingBufferWidth,r=t.drawingBufferHeight,n=e._colorGBuffer,a=!1;r=defined(n)&&(n.width!==i||n.height!==r);return defined(n)&&!r||(destroyFramebuffer(e),createFramebuffer(e,t),createCommands$4(e,t),a=!0),a}function isSupported(e){return e.drawBuffers&&e.fragmentDepth}function getECShaderProgram(e,t){var i,r,n=e.shaderCache.getDerivedShaderProgram(t,"EC");return defined(n)||(i=t._attributeLocations,(r=t.fragmentShaderSource.clone()).sources=r.sources.map((function(e){return(e=ShaderSource.replaceMain(e,"czm_point_cloud_post_process_main")).replace(/gl_FragColor/g,"gl_FragData[0]")})),r.sources.unshift("#extension GL_EXT_draw_buffers : enable \n"),r.sources.push("void main() \n{ \n    czm_point_cloud_post_process_main(); \n#ifdef LOG_DEPTH\n    czm_writeLogDepth();\n    gl_FragData[1] = czm_packDepth(gl_FragDepthEXT); \n#else\n    gl_FragData[1] = czm_packDepth(gl_FragCoord.z);\n#endif\n}"),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:i})),n}function PointCloudShading(e){e=defaultValue(e,{}),this.attenuation=defaultValue(e.attenuation,!1),this.geometricErrorScale=defaultValue(e.geometricErrorScale,1),this.maximumAttenuation=e.maximumAttenuation,this.baseResolution=e.baseResolution,this.eyeDomeLighting=defaultValue(e.eyeDomeLighting,!0),this.eyeDomeLightingStrength=defaultValue(e.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=defaultValue(e.eyeDomeLightingRadius,1),this.backFaceCulling=defaultValue(e.backFaceCulling,!1),this.normalShading=defaultValue(e.normalShading,!0)}function PointCloud3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._pickId=void 0,this._batchTable=void 0,this._styleDirty=!1,this._features=void 0,this.featurePropertiesDirty=!1,this._pointCloud=new PointCloud({arrayBuffer:r,byteOffset:n,cull:!1,opaquePass:Pass$1.CESIUM_3D_TILE,vertexShaderLoaded:getVertexShaderLoaded(this),fragmentShaderLoaded:getFragmentShaderLoaded(this),uniformMapLoaded:getUniformMapLoaded(this),batchTableLoaded:getBatchTableLoaded(this),pickIdLoaded:getPickIdLoaded(this)})}function getVertexShaderLoaded(e){return function(t){return defined(e._batchTable)?e._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(t):t}}function getFragmentShaderLoaded(e){return function(t){return defined(e._batchTable)?e._batchTable.getFragmentShaderCallback(!1,void 0)(t):"uniform vec4 czm_pickColor;\n"+t}}function getUniformMapLoaded(e){return function(t){return defined(e._batchTable)?e._batchTable.getUniformMapCallback()(t):combine(t,{czm_pickColor:function(){return e._pickId.color}})}}function getBatchTableLoaded(e){return function(t,i,r){e._batchTable=new Cesium3DTileBatchTable(e,t,i,r)}}function getPickIdLoaded(e){return function(){return defined(e._batchTable)?e._batchTable.getPickId():"czm_pickColor"}}function getGeometricError(e){var t=e._tileset.pointCloudShading,i=e._tile.contentBoundingVolume.boundingSphere.volume();i=CesiumMath.cbrt(i/e.pointsLength);return 0===(e=e._tile.geometricError)&&(e=defined(t)&&defined(t.baseResolution)?t.baseResolution:i),e}function createFeatures$3(e){var t=e.featuresLength;if(!defined(e._features)&&0<t){for(var i=new Array(t),r=0;r<t;++r)i[r]=new Cesium3DTileFeature(e,r);e._features=i}}PointCloudEyeDomeLighting.isSupported=isSupported,PointCloudEyeDomeLighting.prototype.update=function(e,t,i,r){if(isSupported(e.context)){this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius*e.pixelRatio;for(var n=createResources$3(this,e.context),a=e.commandList,o=a.length,s=t;s<o;++s){var l,c=a[s];c.primitiveType===PrimitiveType$1.POINTS&&c.pass!==Pass$1.TRANSLUCENT&&(defined(l=c.derivedCommands.pointCloudProcessor)&&!c.dirty&&!n&&l.framebuffer===this._framebuffer||(l=DrawCommand.shallowClone(c),(c.derivedCommands.pointCloudProcessor=l).framebuffer=this._framebuffer,l.shaderProgram=getECShaderProgram(e.context,c.shaderProgram),l.castShadows=!1,l.receiveShadows=!1),a[s]=l)}i=this._clearCommand,(t=this._drawCommand).boundingVolume=r,a.push(t),a.push(i)}},PointCloudEyeDomeLighting.prototype.isDestroyed=function(){return!1},PointCloudEyeDomeLighting.prototype.destroy=function(){return destroyFramebuffer(this),destroyObject(this)},PointCloudShading.isSupported=function(e){return PointCloudEyeDomeLighting.isSupported(e.context)},Object.defineProperties(PointCloud3DTileContent.prototype,{featuresLength:{get:function(){return defined(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return this._pointCloud.pointsLength}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this._pointCloud.geometryByteLength}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return defined(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._pointCloud.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}}),PointCloud3DTileContent.prototype.hasProperty=function(e,t){return!!defined(this._batchTable)&&this._batchTable.hasProperty(e,t)},PointCloud3DTileContent.prototype.getFeature=function(e){if(defined(this._batchTable))return this.featuresLength,createFeatures$3(this),this._features[e]},PointCloud3DTileContent.prototype.applyDebugSettings=function(e,t){this._pointCloud.color=e?t:Color.WHITE},PointCloud3DTileContent.prototype.applyStyle=function(e){defined(this._batchTable)?this._batchTable.applyStyle(e):this._styleDirty=!0};var defaultShading=new PointCloudShading;function Tileset3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=when.defer(),this.featurePropertiesDirty=!1,initialize$7(this,r,n)}function initialize$7(e,t,i){i=defaultValue(i,0);var r,n=getStringFromTypedArray(new Uint8Array(t),i);try{r=JSON.parse(n)}catch(t){return void e._readyPromise.reject(new RuntimeError("Invalid tile content."))}e._tileset.loadTileset(e._resource,r,e._tile),e._readyPromise.resolve(e)}function VertexArrayFacade(e,t,i,r){var n=VertexArrayFacade._verifyAttributes(t);i=defaultValue(i,0);for(var a,o,s,l=[],c={},u=n.length,d=0;d<u;++d){var h=n[d];h.vertexBuffer?l.push(h):(defined(a=c[o=h.usage])||(a=c[o]=[]),a.push(h))}function p(e,t){return ComponentDatatype$1.getSizeInBytes(t.componentDatatype)-ComponentDatatype$1.getSizeInBytes(e.componentDatatype)}for(o in this._allBuffers=[],c)c.hasOwnProperty(o)&&((a=c[o]).sort(p),s={vertexSizeInBytes:s=VertexArrayFacade._vertexSizeInBytes(a),vertexBuffer:void 0,usage:a[0].usage,needsCommit:!1,arrayBuffer:void 0,arrayViews:VertexArrayFacade._createArrayViews(a,s)},this._allBuffers.push(s));this._size=0,this._instanced=defaultValue(r,!1),this._precreated=l,this._context=e,this.writers=void 0,this.va=void 0,this.resize(i)}PointCloud3DTileContent.prototype.update=function(e,t){var i,r=this._pointCloud,n=defaultValue(e.pointCloudShading,defaultShading),a=this._tile,o=this._batchTable,s=t.mode,l=e.clippingPlanes;defined(this._pickId)||defined(o)||(this._pickId=t.context.createPickId({primitive:e,content:this})),defined(o)&&o.update(e,t),i=(defined(a._contentBoundingVolume)?s===SceneMode$1.SCENE3D?a._contentBoundingVolume:a._contentBoundingVolume2D:s===SceneMode$1.SCENE3D?a._boundingVolume:a._boundingVolume2D).boundingSphere,s=this._styleDirty,this._styleDirty=!1,r.clippingPlanesOriginMatrix=e.clippingPlanesOriginMatrix,r.style=defined(o)?void 0:e.style,r.styleDirty=s,r.modelMatrix=a.computedTransform,r.time=e.timeSinceLoad,r.shadows=e.shadows,r.boundingSphere=i,r.clippingPlanes=l,r.isClipped=defined(l)&&l.enabled&&a._isClipped,r.clippingPlanesDirty=a.clippingPlanesDirty,r.attenuation=n.attenuation,r.backFaceCulling=n.backFaceCulling,r.normalShading=n.normalShading,r.geometricError=getGeometricError(this),r.geometricErrorScale=n.geometricErrorScale,defined(n)&&defined(n.maximumAttenuation)?r.maximumAttenuation=n.maximumAttenuation:a.refine===Cesium3DTileRefine$1.ADD?r.maximumAttenuation=5:r.maximumAttenuation=e.maximumScreenSpaceError,r.update(t)},PointCloud3DTileContent.prototype.isDestroyed=function(){return!1},PointCloud3DTileContent.prototype.destroy=function(){return this._pickId=this._pickId&&this._pickId.destroy(),this._pointCloud=this._pointCloud&&this._pointCloud.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)},Object.defineProperties(Tileset3DTileContent.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),Tileset3DTileContent.prototype.hasProperty=function(e,t){return!1},Tileset3DTileContent.prototype.getFeature=function(e){},Tileset3DTileContent.prototype.applyDebugSettings=function(e,t){},Tileset3DTileContent.prototype.applyStyle=function(e){},Tileset3DTileContent.prototype.update=function(e,t){},Tileset3DTileContent.prototype.isDestroyed=function(){return!1},Tileset3DTileContent.prototype.destroy=function(){return destroyObject(this)},VertexArrayFacade._verifyAttributes=function(e){for(var t=[],i=0;i<e.length;++i){var r={index:defaultValue((r=e[i]).index,i),enabled:defaultValue(r.enabled,!0),componentsPerAttribute:r.componentsPerAttribute,componentDatatype:defaultValue(r.componentDatatype,ComponentDatatype$1.FLOAT),normalize:defaultValue(r.normalize,!1),vertexBuffer:r.vertexBuffer,usage:defaultValue(r.usage,BufferUsage$1.STATIC_DRAW)};t.push(r)}for(var n=new Array(t.length),a=0;a<t.length;++a)n[t[a].index]=!0;return t},VertexArrayFacade._vertexSizeInBytes=function(e){for(var t=0,i=e.length,r=0;r<i;++r){var n=e[r];t+=n.componentsPerAttribute*ComponentDatatype$1.getSizeInBytes(n.componentDatatype)}var a=0<i?ComponentDatatype$1.getSizeInBytes(e[0].componentDatatype):0,o=0<a?t%a:0;return t+(0==o?0:a-o)},VertexArrayFacade._createArrayViews=function(e,t){for(var i=[],r=0,n=e.length,a=0;a<n;++a){var o=e[a],s=o.componentDatatype;i.push({index:o.index,enabled:o.enabled,componentsPerAttribute:o.componentsPerAttribute,componentDatatype:s,normalize:o.normalize,offsetInBytes:r,vertexSizeInComponentType:t/ComponentDatatype$1.getSizeInBytes(s),view:void 0}),r+=o.componentsPerAttribute*ComponentDatatype$1.getSizeInBytes(s)}return i},VertexArrayFacade.prototype.resize=function(e){this._size=e;var t=this._allBuffers;this.writers=[];for(var i=0,r=t.length;i<r;++i){var n=t[i];VertexArrayFacade._resize(n,this._size),VertexArrayFacade._appendWriters(this.writers,n)}destroyVA(this)},VertexArrayFacade._resize=function(e,t){if(0<e.vertexSizeInBytes){var i=new ArrayBuffer(t*e.vertexSizeInBytes);if(defined(e.arrayBuffer))for(var r=new Uint8Array(i),n=new Uint8Array(e.arrayBuffer),a=n.length,o=0;o<a;++o)r[o]=n[o];for(var s=e.arrayViews,l=s.length,c=0;c<l;++c){var u=s[c];u.view=ComponentDatatype$1.createArrayBufferView(u.componentDatatype,i,u.offsetInBytes)}e.arrayBuffer=i}};var createWriters=[function(e,t,i){return function(r,n){t[r*i]=n,e.needsCommit=!0}},function(e,t,i){return function(r,n,a){t[r*=i]=n,t[1+r]=a,e.needsCommit=!0}},function(e,t,i){return function(r,n,a,o){t[r*=i]=n,t[1+r]=a,t[2+r]=o,e.needsCommit=!0}},function(e,t,i){return function(r,n,a,o,s){t[r*=i]=n,t[1+r]=a,t[2+r]=o,t[3+r]=s,e.needsCommit=!0}}];function commit(e,t){if(t.needsCommit&&0<t.vertexSizeInBytes){t.needsCommit=!1;var i=t.vertexBuffer,r=e._size*t.vertexSizeInBytes,n=defined(i);if(!n||i.sizeInBytes<r)return n&&i.destroy(),t.vertexBuffer=Buffer$1.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),!(t.vertexBuffer.vertexArrayDestroyable=!1);t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}function subCommit(e,t,i){e.needsCommit&&0<e.vertexSizeInBytes&&(t=e.vertexSizeInBytes*t,i=e.vertexSizeInBytes*i,e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,t,i),t))}function destroyVA(e){var t=e.va;if(defined(t)){for(var i=t.length,r=0;r<i;++r)t[r].va.destroy();e.va=void 0}}VertexArrayFacade._appendWriters=function(e,t){for(var i=t.arrayViews,r=i.length,n=0;n<r;++n){var a=i[n];e[a.index]=createWriters[a.componentsPerAttribute-1](t,a.view,a.vertexSizeInComponentType)}},VertexArrayFacade.prototype.commit=function(e){var t,i=!1,r=this._allBuffers;for(c=0,u=r.length;c<u;++c)i=commit(this,t=r[c])||i;if(i||!defined(this.va)){destroyVA(this);for(var n=this.va=[],a=CesiumMath.SIXTY_FOUR_KILOBYTES-4,o=defined(e)&&!this._instanced?Math.ceil(this._size/a):1,s=0;s<o;++s){for(var l=[],c=0,u=r.length;c<u;++c){var d=s*((t=r[c]).vertexSizeInBytes*a);VertexArrayFacade._appendAttributes(l,t,d,this._instanced)}l=l.concat(this._precreated),n.push({va:new VertexArray({context:this._context,attributes:l,indexBuffer:e}),indicesCount:1.5*(s!==o-1?a:this._size%a)})}}},VertexArrayFacade._appendAttributes=function(e,t,i,r){for(var n=t.arrayViews,a=n.length,o=0;o<a;++o){var s=n[o];e.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:i+s.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:r?1:0})}},VertexArrayFacade.prototype.subCommit=function(e,t){for(var i=this._allBuffers,r=0,n=i.length;r<n;++r)subCommit(i[r],e,t)},VertexArrayFacade.prototype.endSubCommits=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t)e[t].needsCommit=!1},VertexArrayFacade.prototype.isDestroyed=function(){return!1},VertexArrayFacade.prototype.destroy=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t){var r=e[t];r.vertexBuffer=r.vertexBuffer&&r.vertexBuffer.destroy()}return destroyVA(this),destroyObject(this)};var BillboardCollectionFS="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D u_atlas;\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying vec2 v_textureCoordinates;\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\nvec2 lookupVector = imageSize * (depthLookupST - adjustedST);\nlookupVector = v_rotationMatrix * lookupVector;\nvec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y));\nvec2 translation = v_originTextureCoordinateAndTranslate.zw;\nif (applyTranslate)\n{\ntranslation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n}\nvec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st));\nif (logDepthOrDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n#ifdef SDF\nfloat getDistance(vec2 position)\n{\nreturn texture2D(u_atlas, position).r;\n}\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\nfloat distance = getDistance(position);\nif (outlineWidth > 0.0)\n{\nfloat outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\nfloat outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nvec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\nfloat alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\nreturn vec4(sdfColor.rgb, sdfColor.a * alpha);\n}\nelse\n{\nfloat alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nreturn vec4(v_color.rgb, v_color.a * alpha);\n}\n}\n#endif\nvoid main()\n{\nvec4 color = texture2D(u_atlas, v_textureCoordinates);\n#ifdef SDF\nfloat outlineWidth = v_outlineWidth;\nvec4 outlineColor = v_outlineColor;\nfloat distance = getDistance(v_textureCoordinates);\n#ifdef GL_OES_standard_derivatives\nfloat smoothing = fwidth(distance);\nvec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\nvec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\nvec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\ncolor = (center + color1 + color2 + color3 + color4)/5.0;\n#else\nfloat smoothing = 1.0/32.0;\ncolor = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\ncolor = czm_gammaCorrect(color);\n#else\ncolor = czm_gammaCorrect(color);\ncolor *= czm_gammaCorrect(v_color);\n#endif\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef VECTOR_TILE\ncolor *= u_highlightColor;\n#endif\ngl_FragColor = color;\n#ifdef LOG_DEPTH\nczm_writeLogDepth();\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat temp = v_compressed.y;\ntemp = temp * SHIFT_RIGHT1;\nfloat temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\nbool enableDepthTest = temp2 != 0.0;\nbool applyTranslate = floor(temp) != 0.0;\nif (enableDepthTest) {\ntemp = v_compressed.z;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\ntemp = v_compressed.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 imageSize;\nimageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\nimageSize.x = floor(temp);\nvec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\nadjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\nfloat epsilonEyeDepth = v_compressed.x + czm_epsilon1;\nfloat globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\nif (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n{\nfloat globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n{\nfloat globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n{\ndiscard;\n}\n}\n}\n}\n#endif\n}\n",BillboardCollectionVS="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 compressedAttribute2;\nattribute vec4 eyeOffset;\nattribute vec4 scaleByDistance;\nattribute vec4 pixelOffsetScaleByDistance;\nattribute vec4 compressedAttribute3;\nattribute vec2 sdf;\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nattribute vec4 textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef VECTOR_TILE\nattribute float a_batchId;\n#endif\nvarying vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\n#endif\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\nconst float UPPER_BOUND = 32768.0;\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\nvec2 halfSize = imageSize * scale * 0.5;\nhalfSize *= ((direction * 2.0) - 1.0);\nvec2 originTranslate = origin * abs(halfSize);\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nif (validAlignedAxis || rotation != 0.0)\n{\nfloat angle = rotation;\nif (validAlignedAxis)\n{\nvec4 projectedAlignedAxis = czm_modelViewProjection * vec4(alignedAxis, 0.0);\nangle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n}\nfloat cosTheta = cos(angle);\nfloat sinTheta = sin(angle);\nrotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\nhalfSize = rotationMatrix * halfSize;\n}\nelse\n{\nrotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n}\n#endif\nmpp = czm_metersPerPixel(positionEC);\npositionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\npositionEC.xy += (translate + pixelOffset) * mpp;\nreturn positionEC;\n}\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\nvec4 posWC = czm_eyeToWindowCoordinates(positionEC);\nfloat globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\nif (globeDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\nvec3 positionHigh = positionHighAndScale.xyz;\nvec3 positionLow = positionLowAndRotation.xyz;\nfloat scale = positionHighAndScale.w;\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nfloat rotation = positionLowAndRotation.w;\n#else\nfloat rotation = 0.0;\n#endif\nfloat compressed = compressedAttribute0.x;\nvec2 pixelOffset;\npixelOffset.x = floor(compressed * SHIFT_RIGHT7);\ncompressed -= pixelOffset.x * SHIFT_LEFT7;\npixelOffset.x -= UPPER_BOUND;\nvec2 origin;\norigin.x = floor(compressed * SHIFT_RIGHT5);\ncompressed -= origin.x * SHIFT_LEFT5;\norigin.y = floor(compressed * SHIFT_RIGHT3);\ncompressed -= origin.y * SHIFT_LEFT3;\n#ifdef FRAGMENT_DEPTH_CHECK\nvec2 depthOrigin = origin.xy;\n#endif\norigin -= vec2(1.0);\nfloat show = floor(compressed * SHIFT_RIGHT2);\ncompressed -= show * SHIFT_LEFT2;\n#ifdef INSTANCED\nvec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\nvec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\nvec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#else\nvec2 direction;\ndirection.x = floor(compressed * SHIFT_RIGHT1);\ndirection.y = compressed - direction.x * SHIFT_LEFT1;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\nfloat temp = compressedAttribute0.y  * SHIFT_RIGHT8;\npixelOffset.y = -(floor(temp) - UPPER_BOUND);\nvec2 translate;\ntranslate.y = (temp - floor(temp)) * SHIFT_LEFT16;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\ntranslate.x = floor(temp) - UPPER_BOUND;\ntranslate.y += (temp - floor(temp)) * SHIFT_LEFT8;\ntranslate.y -= UPPER_BOUND;\ntemp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\nvec2 imageSize = vec2(floor(temp), temp2);\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\nfloat applyTranslate = 0.0;\nif (labelHorizontalOrigin != 0.0)\n{\napplyTranslate = 1.0;\nlabelHorizontalOrigin -= 2.0;\ndepthOrigin.x = labelHorizontalOrigin + 1.0;\n}\ndepthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\ntemp = compressedAttribute3.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\n#endif\n#ifdef ALIGNED_AXIS\nvec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\ntemp = compressedAttribute2.z * SHIFT_RIGHT5;\nbool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\nvec3 alignedAxis = vec3(0.0);\nbool validAlignedAxis = false;\n#endif\nvec4 pickColor;\nvec4 color;\ntemp = compressedAttribute2.y;\ntemp = temp * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute2.x;\ntemp = temp * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute2.z * SHIFT_RIGHT8;\nbool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\nfloat eyeDepth = positionEC.z;\n#endif\npositionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\npositionEC.xyz *= show;\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\nfloat distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\nscale *= distanceScale;\ntranslate *= distanceScale;\nif (scale == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\nfloat pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\npixelOffset *= pixelOffsetScale;\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = compressedAttribute3.x;\nfloat farSq = compressedAttribute3.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nmat2 rotationMatrix;\nfloat mpp;\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = compressedAttribute3.z;\n#endif\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\nfloat depthsilon = 10.0;\nvec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\nvec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth1 = getGlobeDepth(pEC1);\nif (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n{\nvec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth2 = getGlobeDepth(pEC2);\nif (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n{\nvec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth3 = getGlobeDepth(pEC3);\nif (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n{\npositionEC.xyz = vec3(0.0);\n}\n}\n}\n}\n#endif\npositionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\ngl_Position = czm_projection * positionEC;\nv_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth();\n#endif\n#ifdef DISABLE_DEPTH_DISTANCE\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\nbool clipped = (zclip < -1.0 || zclip > 1.0);\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\ngl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0;\n#endif\n}\n}\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nif (sizeInMeters) {\ntranslate /= mpp;\ndimensions /= mpp;\nimageSize /= mpp;\n}\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nv_rotationMatrix = rotationMatrix;\n#else\nv_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\nfloat enableDepthCheck = 0.0;\nif (lengthSq < disableDepthTestDistance)\n{\nenableDepthCheck = 1.0;\n}\nfloat dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\nfloat dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\nfloat iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\nfloat ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\nv_compressed.x = eyeDepth;\nv_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\nv_compressed.z = dw * SHIFT_LEFT12 + dh;\nv_compressed.w = iw * SHIFT_LEFT12 + ih;\nv_originTextureCoordinateAndTranslate.xy = depthOrigin;\nv_originTextureCoordinateAndTranslate.zw = translate;\nv_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef SDF\nvec4 outlineColor;\nfloat outlineWidth;\ntemp = sdf.x;\ntemp = temp * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = sdf.y;\ntemp = temp * SHIFT_RIGHT8;\nfloat temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.a = floor(temp);\noutlineColor /= 255.0;\nv_outlineWidth = outlineWidth / 255.0;\nv_outlineColor = outlineColor;\nv_outlineColor.a *= translucency;\n#endif\nv_pickColor = pickColor;\nv_color = color;\nv_color.a *= translucency;\n}\n",SceneTransforms={},actualPositionScratch=new Cartesian4(0,0,0,1),positionCC=new Cartesian4,scratchViewport$1=new BoundingRectangle,scratchWindowCoord0=new Cartesian2,scratchWindowCoord1=new Cartesian2;SceneTransforms.wgs84ToWindowCoordinates=function(e,t,i){return SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates(e,t,Cartesian3.ZERO,i)};var scratchCartesian4$3=new Cartesian4,scratchEyeOffset=new Cartesian3;function worldToClip(e,t,i,r){var n=i.viewMatrix;n=Matrix4.multiplyByVector(n,Cartesian4.fromElements(e.x,e.y,e.z,1,scratchCartesian4$3),scratchCartesian4$3),e=Cartesian3.multiplyComponents(t,Cartesian3.normalize(n,scratchEyeOffset),scratchEyeOffset);return n.x+=t.x+e.x,n.y+=t.y+e.y,n.z+=e.z,Matrix4.multiplyByVector(i.frustum.projectionMatrix,n,r)}var scratchMaxCartographic=new Cartographic(Math.PI,CesiumMath.PI_OVER_TWO),scratchProjectedCartesian=new Cartesian3,scratchCameraPosition=new Cartesian3;SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates=function(e,t,i,r){var n=e.frameState,a=SceneTransforms.computeActualWgs84Position(n,t,actualPositionScratch);if(defined(a)){var o=e.canvas,s=scratchViewport$1;s.x=0,s.y=0,s.width=o.clientWidth,s.height=o.clientHeight;var l,c,u,d,h,p=e.camera,f=!1;if(n.mode===SceneMode$1.SCENE2D&&(l=e.mapProjection.project(scratchMaxCartographic,scratchProjectedCartesian),c=Cartesian3.clone(p.position,scratchCameraPosition),u=p.frustum.clone(),h=Matrix4.computeViewportTransformation(s,0,1,new Matrix4),d=p.frustum.projectionMatrix,t=p.positionWC.y,e=Cartesian3.fromElements(CesiumMath.sign(t)*l.x-t,0,-p.positionWC.x),h=Transforms.pointToGLWindowCoordinates(d,h,e),0===t||h.x<=0||h.x>=o.clientWidth?f=!0:(h.x>.5*o.clientWidth?(s.width=h.x,p.frustum.right=l.x-t,positionCC=worldToClip(a,i,p,positionCC),SceneTransforms.clipToGLWindowCoordinates(s,positionCC,scratchWindowCoord0),s.x+=h.x,p.position.x=-p.position.x,e=p.frustum.right,p.frustum.right=-p.frustum.left,p.frustum.left=-e):(s.x+=h.x,s.width-=h.x,p.frustum.left=-l.x-t,positionCC=worldToClip(a,i,p,positionCC),SceneTransforms.clipToGLWindowCoordinates(s,positionCC,scratchWindowCoord0),s.x=s.x-s.width,p.position.x=-p.position.x,t=p.frustum.left,p.frustum.left=-p.frustum.right,p.frustum.right=-t),positionCC=worldToClip(a,i,p,positionCC),SceneTransforms.clipToGLWindowCoordinates(s,positionCC,scratchWindowCoord1),Cartesian3.clone(c,p.position),p.frustum=u.clone(),((r=Cartesian2.clone(scratchWindowCoord0,r)).x<0||r.x>o.clientWidth)&&(r.x=scratchWindowCoord1.x))),n.mode!==SceneMode$1.SCENE2D||f){if((positionCC=worldToClip(a,i,p,positionCC)).z<0&&!(p.frustum instanceof OrthographicFrustum)&&!(p.frustum instanceof OrthographicOffCenterFrustum))return;r=SceneTransforms.clipToGLWindowCoordinates(s,positionCC,r)}return r.y=o.clientHeight-r.y,r}},SceneTransforms.wgs84ToDrawingBufferCoordinates=function(e,t,i){if(defined(i=SceneTransforms.wgs84ToWindowCoordinates(e,t,i)))return SceneTransforms.transformWindowToDrawingBuffer(e,i,i)};var projectedPosition=new Cartesian3,positionInCartographic=new Cartographic;SceneTransforms.computeActualWgs84Position=function(e,t,i){var r=e.mode;if(r===SceneMode$1.SCENE3D)return Cartesian3.clone(t,i);var n=e.mapProjection,a=n.ellipsoid.cartesianToCartographic(t,positionInCartographic);return defined(a)?(n.project(a,projectedPosition),r===SceneMode$1.COLUMBUS_VIEW?Cartesian3.fromElements(projectedPosition.z,projectedPosition.x,projectedPosition.y,i):r===SceneMode$1.SCENE2D?Cartesian3.fromElements(0,projectedPosition.x,projectedPosition.y,i):(e=e.morphTime,Cartesian3.fromElements(CesiumMath.lerp(projectedPosition.z,t.x,e),CesiumMath.lerp(projectedPosition.x,t.y,e),CesiumMath.lerp(projectedPosition.y,t.z,e),i))):void 0};var positionNDC=new Cartesian3,positionWC=new Cartesian3,viewportTransform=new Matrix4;SceneTransforms.clipToGLWindowCoordinates=function(e,t,i){return Cartesian3.divideByScalar(t,t.w,positionNDC),Matrix4.computeViewportTransformation(e,0,1,viewportTransform),Matrix4.multiplyByPoint(viewportTransform,positionNDC,positionWC),Cartesian2.fromCartesian3(positionWC,i)},SceneTransforms.transformWindowToDrawingBuffer=function(e,t,i){var r=e.canvas,n=e.drawingBufferWidth/r.clientWidth;r=e.drawingBufferHeight/r.clientHeight;return Cartesian2.fromElements(t.x*n,t.y*r,i)};var scratchNDC=new Cartesian4,scratchWorldCoords=new Cartesian4;function Billboard(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).translucencyByDistance,r=e.pixelOffsetScaleByDistance,n=e.scaleByDistance,a=e.distanceDisplayCondition;defined(i)&&(i=NearFarScalar.clone(i)),defined(r)&&(r=NearFarScalar.clone(r)),defined(n)&&(n=NearFarScalar.clone(n)),defined(a)&&(a=DistanceDisplayCondition.clone(a)),this._show=defaultValue(e.show,!0),this._position=Cartesian3.clone(defaultValue(e.position,Cartesian3.ZERO)),this._actualPosition=Cartesian3.clone(this._position),this._pixelOffset=Cartesian2.clone(defaultValue(e.pixelOffset,Cartesian2.ZERO)),this._translate=new Cartesian2(0,0),this._eyeOffset=Cartesian3.clone(defaultValue(e.eyeOffset,Cartesian3.ZERO)),this._heightReference=defaultValue(e.heightReference,HeightReference$1.NONE),this._verticalOrigin=defaultValue(e.verticalOrigin,VerticalOrigin$1.CENTER),this._horizontalOrigin=defaultValue(e.horizontalOrigin,HorizontalOrigin$1.CENTER),this._scale=defaultValue(e.scale,1),this._color=Color.clone(defaultValue(e.color,Color.WHITE)),this._rotation=defaultValue(e.rotation,0),this._alignedAxis=Cartesian3.clone(defaultValue(e.alignedAxis,Cartesian3.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=n,this._translucencyByDistance=i,this._pixelOffsetScaleByDistance=r,this._sizeInMeters=defaultValue(e.sizeInMeters,!1),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=defaultValue(e.collection,t),this._pickId=void 0,this._pickPrimitive=defaultValue(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=void 0,this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0,a=e.image,t=e.imageId,defined(a)&&(defined(t)||(t="string"==typeof a?a:defined(a.src)?a.src:createGuid()),this._imageId=t,this._image=a),defined(e.imageSubRegion)&&(this._imageId=t,this._imageSubRegion=e.imageSubRegion),defined(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=SceneMode$1.SCENE3D,this._clusterShow=!0,this._outlineColor=Color.clone(defaultValue(e.outlineColor,Color.BLACK)),this._outlineWidth=defaultValue(e.outlineWidth,0),this._updateClamping()}SceneTransforms.drawingBufferToWgs84Coordinates=function(e,t,i,r){var n=e.context.uniformState,a=(l=n.currentFrustum).x,o=l.y;e.frameState.useLogDepth&&(c=i*n.log2FarDepthFromNearPlusOne,i=o*(1-a/(Math.pow(2,c)-1+a))/(o-a));var s,l=e.view.passState.viewport,c=Cartesian4.clone(Cartesian4.UNIT_W,scratchNDC);return c.x=(t.x-l.x)/l.width*2-1,c.y=(t.y-l.y)/l.height*2-1,c.z=2*i-1,c.w=1,defined((i=e.camera.frustum).fovy)?(e=1/(s=Matrix4.multiplyByVector(n.inverseViewProjection,c,scratchWorldCoords)).w,Cartesian3.multiplyByScalar(s,e,s)):(defined(i._offCenterFrustum)&&(i=i._offCenterFrustum),(s=scratchWorldCoords).x=.5*(c.x*(i.right-i.left)+i.left+i.right),s.y=.5*(c.y*(i.top-i.bottom)+i.bottom+i.top),s.z=.5*(c.z*(a-o)-a-o),s.w=1,s=Matrix4.multiplyByVector(n.inverseView,s,s)),Cartesian3.fromCartesian4(s,r)};var SHOW_INDEX=Billboard.SHOW_INDEX=0,POSITION_INDEX=Billboard.POSITION_INDEX=1,PIXEL_OFFSET_INDEX=Billboard.PIXEL_OFFSET_INDEX=2,EYE_OFFSET_INDEX=Billboard.EYE_OFFSET_INDEX=3,HORIZONTAL_ORIGIN_INDEX=Billboard.HORIZONTAL_ORIGIN_INDEX=4,VERTICAL_ORIGIN_INDEX=Billboard.VERTICAL_ORIGIN_INDEX=5,SCALE_INDEX=Billboard.SCALE_INDEX=6,IMAGE_INDEX_INDEX=Billboard.IMAGE_INDEX_INDEX=7,COLOR_INDEX=Billboard.COLOR_INDEX=8,ROTATION_INDEX=Billboard.ROTATION_INDEX=9,ALIGNED_AXIS_INDEX=Billboard.ALIGNED_AXIS_INDEX=10,SCALE_BY_DISTANCE_INDEX=Billboard.SCALE_BY_DISTANCE_INDEX=11,TRANSLUCENCY_BY_DISTANCE_INDEX=Billboard.TRANSLUCENCY_BY_DISTANCE_INDEX=12,PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=Billboard.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,DISTANCE_DISPLAY_CONDITION=Billboard.DISTANCE_DISPLAY_CONDITION=14,DISABLE_DEPTH_DISTANCE=Billboard.DISABLE_DEPTH_DISTANCE=15;Billboard.TEXTURE_COORDINATE_BOUNDS=16;var SDF_INDEX=Billboard.SDF_INDEX=17;function makeDirty(e,t){var i=e._billboardCollection;defined(i)&&(i._updateBillboard(e,t),e._dirty=!0)}Billboard.NUMBER_OF_PROPERTIES=18,Object.defineProperties(Billboard.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,makeDirty(this,SHOW_INDEX))}},position:{get:function(){return this._position},set:function(e){var t=this._position;Cartesian3.equals(t,e)||(Cartesian3.clone(e,t),Cartesian3.clone(e,this._actualPosition),this._updateClamping(),makeDirty(this,POSITION_INDEX))}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),makeDirty(this,POSITION_INDEX))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){var t=this._pixelOffset;Cartesian2.equals(t,e)||(Cartesian2.clone(e,t),makeDirty(this,PIXEL_OFFSET_INDEX))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;NearFarScalar.equals(t,e)||(this._scaleByDistance=NearFarScalar.clone(e,t),makeDirty(this,SCALE_BY_DISTANCE_INDEX))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;NearFarScalar.equals(t,e)||(this._translucencyByDistance=NearFarScalar.clone(e,t),makeDirty(this,TRANSLUCENCY_BY_DISTANCE_INDEX))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){var t=this._pixelOffsetScaleByDistance;NearFarScalar.equals(t,e)||(this._pixelOffsetScaleByDistance=NearFarScalar.clone(e,t),makeDirty(this,PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){var t=this._eyeOffset;Cartesian3.equals(t,e)||(Cartesian3.clone(e,t),makeDirty(this,EYE_OFFSET_INDEX))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,makeDirty(this,HORIZONTAL_ORIGIN_INDEX))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,makeDirty(this,VERTICAL_ORIGIN_INDEX))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,makeDirty(this,SCALE_INDEX))}},color:{get:function(){return this._color},set:function(e){var t=this._color;Color.equals(t,e)||(Color.clone(e,t),makeDirty(this,COLOR_INDEX))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,makeDirty(this,ROTATION_INDEX))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){var t=this._alignedAxis;Cartesian3.equals(t,e)||(Cartesian3.clone(e,t),makeDirty(this,ALIGNED_AXIS_INDEX))}},width:{get:function(){return defaultValue(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,makeDirty(this,IMAGE_INDEX_INDEX))}},height:{get:function(){return defaultValue(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,makeDirty(this,IMAGE_INDEX_INDEX))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,makeDirty(this,COLOR_INDEX))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){DistanceDisplayCondition.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition),makeDirty(this,DISTANCE_DISPLAY_CONDITION))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,makeDirty(this,DISABLE_DEPTH_DISTANCE))}},id:{get:function(){return this._id},set:function(e){this._id=e,defined(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,defined(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){defined(e)?"string"==typeof e?this.setImage(e,e):e instanceof Resource?this.setImage(e.url,e):defined(e.src)?this.setImage(e.src,e):this.setImage(createGuid(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,makeDirty(this,IMAGE_INDEX_INDEX))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=Cartesian3.clone(e,this._actualClampedPosition),makeDirty(this,POSITION_INDEX)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,makeDirty(this,SHOW_INDEX))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;Color.equals(t,e)||(Color.clone(e,t),makeDirty(this,SDF_INDEX))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,makeDirty(this,SDF_INDEX))}}}),Billboard.prototype.getPickId=function(e){return defined(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},Billboard.prototype._updateClamping=function(){Billboard._updateClamping(this._billboardCollection,this)};var scratchCartographic$4=new Cartographic,scratchPosition$7=new Cartesian3;Billboard._updateClamping=function(e,t){var i,r,n,a,o=e._scene;function s(e){var r;t._heightReference===HeightReference$1.RELATIVE_TO_GROUND&&(t._mode===SceneMode$1.SCENE3D?((r=i.cartesianToCartographic(e,scratchCartographic$4)).height+=n.height,i.cartographicToCartesian(r,e)):e.x+=n.height),t._clampedPosition=Cartesian3.clone(e,t._clampedPosition)}defined(o)&&defined(o.globe)&&(a=o.globe,i=a.ellipsoid,r=a._surface,o=(e=o.frameState.mode)!==t._mode,t._mode=e,(t._heightReference===HeightReference$1.NONE||o)&&defined(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==HeightReference$1.NONE&&defined(t._position)&&(defined(n=i.cartesianToCartographic(t._position))?(defined(t._removeCallbackFunc)&&t._removeCallbackFunc(),t._removeCallbackFunc=r.updateHeight(n,s),Cartographic.clone(n,scratchCartographic$4),defined(a=a.getHeight(n))&&(scratchCartographic$4.height=a),i.cartographicToCartesian(scratchCartographic$4,scratchPosition$7),s(scratchPosition$7)):t._actualClampedPosition=void 0))},Billboard.prototype._loadImage=function(){var e,t,i=this._billboardCollection._textureAtlas,r=this._imageId,n=this._image,a=this._imageSubRegion;defined(n)&&(e=i.addImage(r,n)),defined(a)&&(e=i.addSubRegion(r,a)),defined(this._imageIndexPromise=e)&&(t=this,e.then((function(e){var o;t._imageId===r&&t._image===n&&BoundingRectangle.equals(t._imageSubRegion,a)&&(o=i.textureCoordinates[e],t._imageWidth=i.texture.width*o.width,t._imageHeight=i.texture.height*o.height,t._imageIndex=e,t._ready=!0,t._image=void 0,t._imageIndexPromise=void 0,makeDirty(t,IMAGE_INDEX_INDEX))})).otherwise((function(e){console.error("Error loading image for billboard: "+e),t._imageIndexPromise=void 0})))},Billboard.prototype.setImage=function(e,t){this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,defined(this._billboardCollection._textureAtlas)&&this._loadImage())},Billboard.prototype.setImageSubRegion=function(e,t){this._imageId===e&&BoundingRectangle.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=BoundingRectangle.clone(t),defined(this._billboardCollection._textureAtlas)&&this._loadImage())},Billboard.prototype._setTranslate=function(e){var t=this._translate;Cartesian2.equals(t,e)||(Cartesian2.clone(e,t),makeDirty(this,PIXEL_OFFSET_INDEX))},Billboard.prototype._getActualPosition=function(){return defined(this._clampedPosition)?this._clampedPosition:this._actualPosition},Billboard.prototype._setActualPosition=function(e){defined(this._clampedPosition)||Cartesian3.clone(e,this._actualPosition),makeDirty(this,POSITION_INDEX)};var tempCartesian3=new Cartesian4;Billboard._computeActualPosition=function(e,t,i,r){return defined(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===SceneMode$1.SCENE3D?t:(Matrix4.multiplyByPoint(r,t,tempCartesian3),SceneTransforms.computeActualWgs84Position(i,tempCartesian3))};var scratchCartesian3$9=new Cartesian3;Billboard._computeScreenSpacePosition=function(e,t,i,r,n,a){if(t=Matrix4.multiplyByPoint(e,t,scratchCartesian3$9),defined(a=SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates(n,t,i,a)))return Cartesian2.add(a,r,a),a};var scratchPixelOffset=new Cartesian2(0,0);Billboard.prototype.computeScreenSpacePosition=function(e,t){var i=this._billboardCollection;defined(t)||(t=new Cartesian2),Cartesian2.clone(this._pixelOffset,scratchPixelOffset),Cartesian2.add(scratchPixelOffset,this._translate,scratchPixelOffset);var r,n=i.modelMatrix,a=this._position;return defined(this._clampedPosition)&&(a=this._clampedPosition,e.mode!==SceneMode$1.SCENE3D&&(i=(r=e.mapProjection).ellipsoid,r=r.unproject(a,scratchCartographic$4),a=i.cartographicToCartesian(r,scratchCartesian3$9),n=Matrix4.IDENTITY)),Billboard._computeScreenSpacePosition(n,a,this._eyeOffset,scratchPixelOffset,e,t)},Billboard.getScreenSpaceBoundingBox=function(e,t,i){var r=e.width,n=e.height,a=e.scale;return r*=a,n*=a,a=t.x,e.horizontalOrigin===HorizontalOrigin$1.RIGHT?a-=r:e.horizontalOrigin===HorizontalOrigin$1.CENTER&&(a-=.5*r),t=t.y,e.verticalOrigin===VerticalOrigin$1.BOTTOM||e.verticalOrigin===VerticalOrigin$1.BASELINE?t-=n:e.verticalOrigin===VerticalOrigin$1.CENTER&&(t-=.5*n),defined(i)||(i=new BoundingRectangle),i.x=a,i.y=t,i.width=r,i.height=n,i},Billboard.prototype.equals=function(e){return this===e||defined(e)&&this._id===e._id&&Cartesian3.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&BoundingRectangle.equals(this._imageSubRegion,e._imageSubRegion)&&Color.equals(this._color,e._color)&&Cartesian2.equals(this._pixelOffset,e._pixelOffset)&&Cartesian2.equals(this._translate,e._translate)&&Cartesian3.equals(this._eyeOffset,e._eyeOffset)&&NearFarScalar.equals(this._scaleByDistance,e._scaleByDistance)&&NearFarScalar.equals(this._translucencyByDistance,e._translucencyByDistance)&&NearFarScalar.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&DistanceDisplayCondition.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},Billboard.prototype._destroy=function(){defined(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),defined(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};var BlendOption={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},BlendOption$1=Object.freeze(BlendOption),SDFSettings={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},SDFSettings$1=Object.freeze(SDFSettings);function TextureAtlasNode(e,t,i,r,n){this.bottomLeft=defaultValue(e,Cartesian2.ZERO),this.topRight=defaultValue(t,Cartesian2.ZERO),this.childNode1=i,this.childNode2=r,this.imageIndex=n}var defaultInitialSize=new Cartesian2(16,16);function TextureAtlas(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.borderWidthInPixels,1),i=defaultValue(e.initialSize,defaultInitialSize);this._context=e.context,this._pixelFormat=defaultValue(e.pixelFormat,PixelFormat$1.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=createGuid(),this._idHash={},this._initialSize=i,this._root=void 0}function resizeAtlas(e,t){var i=e._context,r=e.numberOfImages,n=e._borderWidthInPixels;if(0<r){for(var a=e._texture.width,o=e._texture.height,s=2*(a+t.width+n),l=a/s,c=o/(r=2*(o+t.height+n)),u=(a=new TextureAtlasNode(new Cartesian2(a+n,n),new Cartesian2(s,o)),a=new TextureAtlasNode(new Cartesian2,new Cartesian2(s,o),e._root,a),o=new TextureAtlasNode(new Cartesian2(n,o+n),new Cartesian2(s,r)),a=new TextureAtlasNode(new Cartesian2,new Cartesian2(s,r),a,o),0);u<e._textureCoordinates.length;u++){var d=e._textureCoordinates[u];defined(d)&&(d.x*=l,d.y*=c,d.width*=l,d.height*=c)}o=new Texture({context:e._context,width:s,height:r,pixelFormat:e._pixelFormat}),(i=new Framebuffer({context:i,colorTextures:[e._texture],destroyAttachments:!1}))._bind(),o.copyFromFramebuffer(0,0,0,0,s,r),i._unBind(),i.destroy(),e._texture=e._texture&&e._texture.destroy(),e._texture=o,e._root=a}else a=2*(t.width+2*n),t=2*(t.height+2*n),a<e._initialSize.x&&(a=e._initialSize.x),t<e._initialSize.y&&(t=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new Texture({context:e._context,width:a,height:t,pixelFormat:e._pixelFormat}),e._root=new TextureAtlasNode(new Cartesian2(n,n),new Cartesian2(a,t))}function findNode$1(e,t,i){if(defined(t)){if(defined(t.childNode1)||defined(t.childNode2))return findNode$1(e,t.childNode1,i)||findNode$1(e,t.childNode2,i);if(defined(t.imageIndex))return;var r,n=t.topRight.x-t.bottomLeft.x,a=t.topRight.y-t.bottomLeft.y;n=n-i.width,a=a-i.height;if(n<0||a<0)return;return 0==n&&0==a?t:(a<n?(t.childNode1=new TextureAtlasNode(new Cartesian2(t.bottomLeft.x,t.bottomLeft.y),new Cartesian2(t.bottomLeft.x+i.width,t.topRight.y)),(r=t.bottomLeft.x+i.width+e._borderWidthInPixels)<t.topRight.x&&(t.childNode2=new TextureAtlasNode(new Cartesian2(r,t.bottomLeft.y),new Cartesian2(t.topRight.x,t.topRight.y)))):(t.childNode1=new TextureAtlasNode(new Cartesian2(t.bottomLeft.x,t.bottomLeft.y),new Cartesian2(t.topRight.x,t.bottomLeft.y+i.height)),(r=t.bottomLeft.y+i.height+e._borderWidthInPixels)<t.topRight.y&&(t.childNode2=new TextureAtlasNode(new Cartesian2(t.bottomLeft.x,r),new Cartesian2(t.topRight.x,t.topRight.y)))),findNode$1(e,t.childNode1,i))}}function addImage(e,t,i){var r,n,a,o,s,l,c=findNode$1(e,e._root,t);defined(c)?(c.imageIndex=i,s=e._texture.width,l=e._texture.height,r=c.topRight.x-c.bottomLeft.x,n=c.topRight.y-c.bottomLeft.y,a=c.bottomLeft.x/s,o=c.bottomLeft.y/l,s=r/s,l=n/l,e._textureCoordinates[i]=new BoundingRectangle(a,o,s,l),e._texture.copyFrom(t,c.bottomLeft.x,c.bottomLeft.y)):(resizeAtlas(e,t),addImage(e,t,i)),e._guid=createGuid()}Object.defineProperties(TextureAtlas.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return defined(this._texture)||(this._texture=new Texture({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}}),TextureAtlas.prototype.addImage=function(e,t){if(defined(r=this._idHash[e]))return r;"function"==typeof t?t=t(e):("string"==typeof t||t instanceof Resource)&&(t=Resource.createIfNeeded(t).fetchImage());var i=this,r=when(t,(function(e){if(i.isDestroyed())return-1;var t=i.numberOfImages;return addImage(i,e,t),t}));return this._idHash[e]=r},TextureAtlas.prototype.addSubRegion=function(e,t){var i=this._idHash[e];if(!defined(i))throw new RuntimeError('image with id "'+e+'" not found in the atlas.');var r=this;return when(i,(function(e){if(-1===e)return-1;var i=r._texture.width,n=r._texture.height,a=r.numberOfImages,o=(e=(o=r._textureCoordinates[e]).x+t.x/i,o.y+t.y/n);i=t.width/i,n=t.height/n;return r._textureCoordinates.push(new BoundingRectangle(e,o,i,n)),r._guid=createGuid(),a}))},TextureAtlas.prototype.isDestroyed=function(){return!1},TextureAtlas.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),destroyObject(this)};var SHOW_INDEX$1=Billboard.SHOW_INDEX,POSITION_INDEX$1=Billboard.POSITION_INDEX,PIXEL_OFFSET_INDEX$1=Billboard.PIXEL_OFFSET_INDEX,EYE_OFFSET_INDEX$1=Billboard.EYE_OFFSET_INDEX,HORIZONTAL_ORIGIN_INDEX$1=Billboard.HORIZONTAL_ORIGIN_INDEX,VERTICAL_ORIGIN_INDEX$1=Billboard.VERTICAL_ORIGIN_INDEX,SCALE_INDEX$1=Billboard.SCALE_INDEX,IMAGE_INDEX_INDEX$1=Billboard.IMAGE_INDEX_INDEX,COLOR_INDEX$1=Billboard.COLOR_INDEX,ROTATION_INDEX$1=Billboard.ROTATION_INDEX,ALIGNED_AXIS_INDEX$1=Billboard.ALIGNED_AXIS_INDEX,SCALE_BY_DISTANCE_INDEX$1=Billboard.SCALE_BY_DISTANCE_INDEX,TRANSLUCENCY_BY_DISTANCE_INDEX$1=Billboard.TRANSLUCENCY_BY_DISTANCE_INDEX,PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX$1=Billboard.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,DISTANCE_DISPLAY_CONDITION_INDEX=Billboard.DISTANCE_DISPLAY_CONDITION,DISABLE_DEPTH_DISTANCE$1=Billboard.DISABLE_DEPTH_DISTANCE,TEXTURE_COORDINATE_BOUNDS=Billboard.TEXTURE_COORDINATE_BOUNDS,SDF_INDEX$1=Billboard.SDF_INDEX,NUMBER_OF_PROPERTIES=Billboard.NUMBER_OF_PROPERTIES,attributeLocations,attributeLocationsBatched={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11},attributeLocationsInstanced={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12},getIndexBuffer;function BillboardCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(NUMBER_OF_PROPERTIES),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new BoundingSphere,this._baseVolumeWC=new BoundingSphere,this._baseVolume2D=new BoundingSphere,this._boundingVolume=new BoundingSphere,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.debugShowTextureAtlas=defaultValue(e.debugShowTextureAtlas,!1),this.blendOption=defaultValue(e.blendOption,BlendOption$1.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=SceneMode$1.SCENE3D,this._buffersUsage=[BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW],this._highlightColor=Color.clone(Color.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture},u_highlightColor:function(){return t._highlightColor}},defined(e=this._scene)&&defined(e.terrainProviderChanged)&&(this._removeCallbackFunc=e.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)defined(e[i])&&e[i]._updateClamping()}),this))}function destroyBillboards(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function removeBillboards(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,r=i.length,n=0,a=0;n<r;++n){var o=i[n];o&&(o._index=a++,t.push(o))}e._billboards=t}}function getIndexBufferBatched(e){var t=e.cache.billboardCollection_indexBufferBatched;if(defined(t))return t;for(var i=new Uint16Array(98298),r=0,n=0;r<98298;r+=6,n+=4)i[r]=n,i[r+1]=n+1,i[r+2]=n+2,i[r+3]=n+0,i[r+4]=n+2,i[r+5]=n+3;return(t=Buffer$1.createIndexBuffer({context:e,typedArray:i,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t}function getIndexBufferInstanced(e){var t=e.cache.billboardCollection_indexBufferInstanced;return defined(t)?t:((t=Buffer$1.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t)}function getVertexBufferInstanced(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return defined(t)?t:((t=Buffer$1.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:BufferUsage$1.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t)}function createVAF(e,t,i,r,n,a){var o=[{index:attributeLocations.positionHighAndScale,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[POSITION_INDEX$1]},{index:attributeLocations.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[POSITION_INDEX$1]},{index:attributeLocations.compressedAttribute0,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[PIXEL_OFFSET_INDEX$1]},{index:attributeLocations.compressedAttribute1,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[TRANSLUCENCY_BY_DISTANCE_INDEX$1]},{index:attributeLocations.compressedAttribute2,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[COLOR_INDEX$1]},{index:attributeLocations.eyeOffset,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[EYE_OFFSET_INDEX$1]},{index:attributeLocations.scaleByDistance,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[SCALE_BY_DISTANCE_INDEX$1]},{index:attributeLocations.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX$1]},{index:attributeLocations.compressedAttribute3,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[DISTANCE_DISPLAY_CONDITION_INDEX]},{index:attributeLocations.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[TEXTURE_COORDINATE_BOUNDS]}];return r&&o.push({index:attributeLocations.direction,componentsPerAttribute:2,componentDatatype:ComponentDatatype$1.FLOAT,vertexBuffer:getVertexBufferInstanced(e)}),defined(n)&&o.push({index:attributeLocations.a_batchId,componentsPerAttribute:1,componentDatatype:ComponentDatatype$1.FLOAT,bufferUsage:BufferUsage$1.STATIC_DRAW}),a&&o.push({index:attributeLocations.sdf,componentsPerAttribute:2,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[SDF_INDEX$1]}),new VertexArrayFacade(e,o,r?t:4*t,r)}Object.defineProperties(BillboardCollection.prototype,{length:{get:function(){return removeBillboards(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),BillboardCollection.prototype.add=function(e){return(e=new Billboard(e,this))._index=this._billboards.length,this._billboards.push(e),this._createVertexArray=!0,e},BillboardCollection.prototype.remove=function(e){return!!this.contains(e)&&(this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},BillboardCollection.prototype.removeAll=function(){destroyBillboards(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},BillboardCollection.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},BillboardCollection.prototype.contains=function(e){return defined(e)&&e._billboardCollection===this},BillboardCollection.prototype.get=function(e){return removeBillboards(this),this._billboards[e]},BillboardCollection.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,r=0;r<NUMBER_OF_PROPERTIES;++r){var n=0===i[r]?BufferUsage$1.STATIC_DRAW:BufferUsage$1.STREAM_DRAW;t=t||e[r]!==n;e[r]=n}return t};var writePositionScratch=new EncodedCartesian3;function writePositionScaleAndRotation(e,t,i,r,n){var a,o=r[attributeLocations.positionHighAndScale],s=r[attributeLocations.positionLowAndRotation],l=n._getActualPosition();e._mode===SceneMode$1.SCENE3D&&(BoundingSphere.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),EncodedCartesian3.fromCartesian(l,writePositionScratch);var c=n.scale,u=n.rotation;0!==u&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,c),r=writePositionScratch.high,l=writePositionScratch.low,e._instanced?(o(a=n._index,r.x,r.y,r.z,c),s(a,l.x,l.y,l.z,u)):(o(0+(a=4*n._index),r.x,r.y,r.z,c),o(a+1,r.x,r.y,r.z,c),o(a+2,r.x,r.y,r.z,c),o(a+3,r.x,r.y,r.z,c),s(a+0,l.x,l.y,l.z,u),s(a+1,l.x,l.y,l.z,u),s(a+2,l.x,l.y,l.z,u),s(a+3,l.x,l.y,l.z,u))}var scratchCartesian2$8=new Cartesian2,UPPER_BOUND=32768,LEFT_SHIFT16=65536,LEFT_SHIFT12=4096,LEFT_SHIFT8=256,LEFT_SHIFT7=128,LEFT_SHIFT5=32,LEFT_SHIFT3=8,LEFT_SHIFT2=4,RIGHT_SHIFT8=1/256,LOWER_LEFT=0,LOWER_RIGHT=2,UPPER_RIGHT=3,UPPER_LEFT=1;function writeCompressedAttrib0(e,t,i,r,n){var a,o=r[attributeLocations.compressedAttribute0],s=(y=n.pixelOffset).x,l=y.y,c=(f=n._translate).x,u=f.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(s+c),Math.abs(-l+u));var d=n.horizontalOrigin,h=n._verticalOrigin,p=n.show&&n.clusterShow;0===n.color.alpha&&(p=!1),h===VerticalOrigin$1.BASELINE&&(h=VerticalOrigin$1.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&d===HorizontalOrigin$1.CENTER,e._allVerticalCenter=e._allVerticalCenter&&h===VerticalOrigin$1.CENTER;var f,m=0,g=0,y=(r=0,0);-1!==(f=n._imageIndex)&&(m=(f=i[f]).x,g=f.y,r=f.width,y=f.height),r=m+r,y=g+y,s=Math.floor(CesiumMath.clamp(s,-UPPER_BOUND,UPPER_BOUND)+UPPER_BOUND)*LEFT_SHIFT7,s+=(d+1)*LEFT_SHIFT5,s+=(h+1)*LEFT_SHIFT3,s+=(p?1:0)*LEFT_SHIFT2,p=Math.floor(CesiumMath.clamp(l,-UPPER_BOUND,UPPER_BOUND)+UPPER_BOUND)*LEFT_SHIFT8,l=Math.floor(CesiumMath.clamp(c,-UPPER_BOUND,UPPER_BOUND)+UPPER_BOUND)*LEFT_SHIFT8,c=(CesiumMath.clamp(u,-UPPER_BOUND,UPPER_BOUND)+UPPER_BOUND)*RIGHT_SHIFT8,p+=u=Math.floor(c),l+=Math.floor((c-u)*LEFT_SHIFT8),scratchCartesian2$8.x=m,scratchCartesian2$8.y=g,g=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),scratchCartesian2$8.x=r,r=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),scratchCartesian2$8.y=y,y=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),scratchCartesian2$8.x=m,m=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),e._instanced?o(a=n._index,s,p,l,g):(o(0+(a=4*n._index),s+LOWER_LEFT,p,l,g),o(a+1,s+LOWER_RIGHT,p,l,r),o(a+2,s+UPPER_RIGHT,p,l,y),o(a+3,s+UPPER_LEFT,p,l,m))}function writeCompressedAttrib1(e,t,i,r,n){var a,o=r[attributeLocations.compressedAttribute1],s=n.alignedAxis;Cartesian3.equals(s,Cartesian3.ZERO)||(e._shaderAlignedAxis=!0);var l=0,c=1,u=1,d=1,h=n.translucencyByDistance;defined(h)&&(l=h.near,c=h.nearValue,u=h.far,d=h.farValue,1===c&&1===d||(e._shaderTranslucencyByDistance=!0)),r=0,-1!==(h=n._imageIndex)&&(r=i[h].width),h=e._textureAtlas.texture.width,h=Math.round(defaultValue(n.width,h*r)),e._maxSize=Math.max(e._maxSize,h),r=CesiumMath.clamp(h,0,LEFT_SHIFT16),h=0,Math.abs(Cartesian3.magnitudeSquared(s)-1)<CesiumMath.EPSILON6&&(h=AttributeCompression.octEncodeFloat(s)),c=CesiumMath.clamp(c,0,1),r=r*LEFT_SHIFT8+(c=1===c?255:255*c|0),d=CesiumMath.clamp(d,0,1),h=h*LEFT_SHIFT8+(d=1===d?255:255*d|0),e._instanced?o(a=n._index,r,h,l,u):(o(0+(a=4*n._index),r,h,l,u),o(a+1,r,h,l,u),o(a+2,r,h,l,u),o(a+3,r,h,l,u))}function writeCompressedAttrib2(e,t,i,r,n){var a,o=r[attributeLocations.compressedAttribute2],s=n.color,l=defined(e._batchTable)?Color.WHITE:n.getPickId(t.context).color,c=n.sizeInMeters?1:0,u=Math.abs(Cartesian3.magnitudeSquared(n.alignedAxis)-1)<CesiumMath.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&1==c;var d=0,h=n._imageIndex;-1!==h&&(d=i[h].height),r=e._textureAtlas.texture.dimensions,t=Math.round(defaultValue(n.height,r.y*d)),e._maxSize=Math.max(e._maxSize,t),i=defaultValue(n._labelHorizontalOrigin,-2),h=t*LEFT_SHIFT2+(i+=2),r=Color.floatToByte(s.red),d=Color.floatToByte(s.green),t=Color.floatToByte(s.blue),i=r*LEFT_SHIFT16+d*LEFT_SHIFT8+t,r=Color.floatToByte(l.red),d=Color.floatToByte(l.green),t=Color.floatToByte(l.blue),t=r*LEFT_SHIFT16+d*LEFT_SHIFT8+t,l=Color.floatToByte(s.alpha)*LEFT_SHIFT16+Color.floatToByte(l.alpha)*LEFT_SHIFT8,l+=2*c+u,e._instanced?o(a=n._index,i,t,l,h):(o(0+(a=4*n._index),i,t,l,h),o(a+1,i,t,l,h),o(a+2,i,t,l,h),o(a+3,i,t,l,h))}function writeEyeOffset(e,t,i,r,n){var a,o=r[attributeLocations.eyeOffset],s=n.eyeOffset,l=s.z;n._heightReference!==HeightReference$1.NONE&&(l*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(s.x),Math.abs(s.y),Math.abs(l)),e._instanced?(a=r=0,-1!==(e=n._imageIndex)&&(r=(e=i[e]).width,a=e.height),scratchCartesian2$8.x=r,scratchCartesian2$8.y=a,r=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),o(a=n._index,s.x,s.y,l,r)):(o(0+(a=4*n._index),s.x,s.y,l,0),o(a+1,s.x,s.y,l,0),o(a+2,s.x,s.y,l,0),o(a+3,s.x,s.y,l,0))}function writeScaleByDistance(e,t,i,r,n){var a,o=r[attributeLocations.scaleByDistance],s=0,l=1,c=1,u=1;defined(r=n.scaleByDistance)&&(s=r.near,l=r.nearValue,c=r.far,u=r.farValue,1===l&&1===u||(e._shaderScaleByDistance=!0)),e._instanced?o(a=n._index,s,l,c,u):(o(0+(a=4*n._index),s,l,c,u),o(a+1,s,l,c,u),o(a+2,s,l,c,u),o(a+3,s,l,c,u))}function writePixelOffsetScaleByDistance(e,t,i,r,n){var a,o=r[attributeLocations.pixelOffsetScaleByDistance],s=0,l=1,c=1,u=1;defined(r=n.pixelOffsetScaleByDistance)&&(s=r.near,l=r.nearValue,c=r.far,u=r.farValue,1===l&&1===u||(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?o(a=n._index,s,l,c,u):(o(0+(a=4*n._index),s,l,c,u),o(a+1,s,l,c,u),o(a+2,s,l,c,u),o(a+3,s,l,c,u))}function writeCompressedAttribute3(e,t,i,r,n){var a,o=r[attributeLocations.compressedAttribute3],s=0,l=Number.MAX_VALUE,c=n.distanceDisplayCondition;defined(c)&&(s=c.near,l=c.far,s*=s,l*=l,e._shaderDistanceDisplayCondition=!0);var u=n.disableDepthTestDistance;r=n.heightReference===HeightReference$1.CLAMP_TO_GROUND&&t.context.depthTexture;defined(u)||(u=r?5e3:0),u*=u,(r||0<u)&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),defined(n._labelDimensions)?(d=n._labelDimensions.x,h=n._labelDimensions.y):(t=c=0,-1!==(r=n._imageIndex)&&(c=(r=i[r]).height,t=r.width),h=Math.round(defaultValue(n.height,e._textureAtlas.texture.dimensions.y*c)),c=e._textureAtlas.texture.width,d=Math.round(defaultValue(n.width,c*t)));var d=Math.floor(CesiumMath.clamp(d,0,LEFT_SHIFT12)),h=Math.floor(CesiumMath.clamp(h,0,LEFT_SHIFT12));h=d*LEFT_SHIFT12+h;e._instanced?o(a=n._index,s,l,u,h):(o(0+(a=4*n._index),s,l,u,h),o(a+1,s,l,u,h),o(a+2,s,l,u,h),o(a+3,s,l,u,h))}function writeTextureCoordinateBoundsOrLabelTranslate(e,t,i,r,n){var a;n.heightReference===HeightReference$1.CLAMP_TO_GROUND&&(u=e._scene,o=t.context,c=t.globeTranslucencyState.translucent,u=defined(u.globe)&&u.globe.depthTestAgainstTerrain,e._shaderClampToGround=o.depthTexture&&!c&&u);var o=r[attributeLocations.textureCoordinateBoundsOrLabelTranslate];if(0<ContextLimits.maximumVertexTextureImageUnits){var s=0,l=0;return defined(n._labelTranslate)&&(s=n._labelTranslate.x,l=n._labelTranslate.y),void(e._instanced?o(a=n._index,s,l,0,0):(o(0+(a=4*n._index),s,l,0,0),o(a+1,s,l,0,0),o(a+2,s,l,0,0),o(a+3,s,l,0,0)))}var c=0,u=0;r=0,s=0;-1!==(l=n._imageIndex)&&(c=(l=i[l]).x,u=l.y,r=l.width,s=l.height),r=c+r,s=u+s,e._instanced?o(a=n._index,c,u,r,s):(o(0+(a=4*n._index),c,u,r,s),o(a+1,c,u,r,s),o(a+2,c,u,r,s),o(a+3,c,u,r,s))}function writeBatchId(e,t,i,r,n){var a,o;defined(e._batchTable)&&(a=r[attributeLocations.a_batchId],r=n._batchIndex,e._instanced?a(o=n._index,r):(a(0+(o=4*n._index),r),a(o+1,r),a(o+2,r),a(o+3,r)))}function writeSDF(e,t,i,r,n){var a,o,s,l,c,u;e._sdf&&(o=r[attributeLocations.sdf],s=n.outlineColor,u=n.outlineWidth,l=Color.floatToByte(s.red),c=Color.floatToByte(s.green),r=Color.floatToByte(s.blue),r=l*LEFT_SHIFT16+c*LEFT_SHIFT8+r,u/=SDFSettings$1.RADIUS,u=Color.floatToByte(s.alpha)*LEFT_SHIFT16+Color.floatToByte(u)*LEFT_SHIFT8,e._instanced?o(a=n._index,r,u):(o(0+(a=4*n._index),r+LOWER_LEFT,u),o(a+1,r+LOWER_RIGHT,u),o(a+2,r+UPPER_RIGHT,u),o(a+3,r+UPPER_LEFT,u)))}function writeBillboard(e,t,i,r,n){writePositionScaleAndRotation(e,t,i,r,n),writeCompressedAttrib0(e,t,i,r,n),writeCompressedAttrib1(e,t,i,r,n),writeCompressedAttrib2(e,t,i,r,n),writeEyeOffset(e,t,i,r,n),writeScaleByDistance(e,t,i,r,n),writePixelOffsetScaleByDistance(e,t,i,r,n),writeCompressedAttribute3(e,t,i,r,n),writeTextureCoordinateBoundsOrLabelTranslate(e,t,i,r,n),writeBatchId(e,t,i,r,n),writeSDF(e,t,i,r,n)}function recomputeActualPositions(e,t,i,r,n,a){var o;r.mode===SceneMode$1.SCENE3D?(o=e._baseVolume,e._boundingVolumeDirty=!0):o=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var c=t[l],u=c.position;defined(u=Billboard._computeActualPosition(c,u,r,n))&&(c._setActualPosition(u),a?s.push(u):BoundingSphere.expand(o,u,o))}a&&BoundingSphere.fromPoints(s,o)}function updateMode(e,t){var i=t.mode,r=e._billboards,n=e._billboardsToUpdate,a=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==SceneMode$1.SCENE3D&&!Matrix4.equals(a,e.modelMatrix)?(e._mode=i,Matrix4.clone(e.modelMatrix,a),e._createVertexArray=!0,i!==SceneMode$1.SCENE3D&&i!==SceneMode$1.SCENE2D&&i!==SceneMode$1.COLUMBUS_VIEW||recomputeActualPositions(e,r,r.length,t,a,!0)):i===SceneMode$1.MORPHING?recomputeActualPositions(e,r,r.length,t,a,!0):i!==SceneMode$1.SCENE2D&&i!==SceneMode$1.COLUMBUS_VIEW||recomputeActualPositions(e,n,e._billboardsToUpdateIndex,t,a,!1)}function updateBoundingVolume(e,t,i){var r=1;e._allSizedInMeters&&0===e._maxPixelOffset||(r=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)),t=r*e._maxScale*e._maxSize*2,e._allHorizontalCenter&&e._allVerticalCenter&&(t*=.5),e=r*e._maxPixelOffset+e._maxEyeOffset,i.radius+=t+e}function createDebugCommand(e,t){return(t=t.createViewportQuadCommand("uniform sampler2D billboard_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n    gl_FragColor = texture2D(billboard_texture, v_textureCoordinates); \n} \n",{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}})).pass=Pass$1.OVERLAY,t}var scratchWriterArray=[];function createBillboardPointCallback(e,t,i,r,n){return function(){var a=document.createElement("canvas"),o=n+2*r;a.height=a.width=o;var s=a.getContext("2d");return s.clearRect(0,0,o,o),0!==r&&(s.beginPath(),s.arc(o/2,o/2,o/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=i,s.fill(),e<1&&(s.save(),s.globalCompositeOperation="destination-out",s.beginPath(),s.arc(o/2,o/2,n/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(o/2,o/2,n/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),a}}function Cesium3DTilePointFeature(e,t,i,r,n){this._content=e,this._billboard=i,this._label=r,this._polyline=n,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),setBillboardImage(this)}BillboardCollection.prototype.update=function(e){removeBillboards(this);var t=this._billboards,i=t.length,r=e.context;if(this._instanced=r.instancedArrays,attributeLocations=this._instanced?attributeLocationsInstanced:attributeLocationsBatched,getIndexBuffer=this._instanced?getIndexBufferInstanced:getIndexBufferBatched,!defined(A=this._textureAtlas)){A=this._textureAtlas=new TextureAtlas({context:r});for(var n=0;n<i;++n)t[n]._loadImage()}var a=A.textureCoordinates;if(0!==a.length){updateMode(this,e),i=(t=this._billboards).length;var o=this._billboardsToUpdate,s=this._billboardsToUpdateIndex,l=this._propertiesChanged,c=A.guid,u=this._createVertexArray||this._textureAtlasGUID!==c;this._textureAtlasGUID=c;var d=(L=e.passes).pick;if(u||!d&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var h=0;h<NUMBER_OF_PROPERTIES;++h)l[h]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),0<i){this._vaf=createVAF(r,i,this._buffersUsage,this._instanced,this._batchTable,this._sdf),y=this._vaf.writers;for(var p=0;p<i;++p){var f=this._billboards[p];f._dirty=!1,writeBillboard(this,e,a,y,f)}this._vaf.commit(getIndexBuffer(r))}this._billboardsToUpdateIndex=0}else if(0<s){var m=scratchWriterArray;m.length=0,(l[POSITION_INDEX$1]||l[ROTATION_INDEX$1]||l[SCALE_INDEX$1])&&m.push(writePositionScaleAndRotation),(l[IMAGE_INDEX_INDEX$1]||l[PIXEL_OFFSET_INDEX$1]||l[HORIZONTAL_ORIGIN_INDEX$1]||l[VERTICAL_ORIGIN_INDEX$1]||l[SHOW_INDEX$1])&&(m.push(writeCompressedAttrib0),this._instanced&&m.push(writeEyeOffset)),(l[IMAGE_INDEX_INDEX$1]||l[ALIGNED_AXIS_INDEX$1]||l[TRANSLUCENCY_BY_DISTANCE_INDEX$1])&&(m.push(writeCompressedAttrib1),m.push(writeCompressedAttrib2)),(l[IMAGE_INDEX_INDEX$1]||l[COLOR_INDEX$1])&&m.push(writeCompressedAttrib2),l[EYE_OFFSET_INDEX$1]&&m.push(writeEyeOffset),l[SCALE_BY_DISTANCE_INDEX$1]&&m.push(writeScaleByDistance),l[PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX$1]&&m.push(writePixelOffsetScaleByDistance),(l[DISTANCE_DISPLAY_CONDITION_INDEX]||l[DISABLE_DEPTH_DISTANCE$1]||l[IMAGE_INDEX_INDEX$1]||l[POSITION_INDEX$1])&&m.push(writeCompressedAttribute3),(l[IMAGE_INDEX_INDEX$1]||l[POSITION_INDEX$1])&&m.push(writeTextureCoordinateBoundsOrLabelTranslate),l[SDF_INDEX$1]&&m.push(writeSDF);var g=m.length,y=this._vaf.writers;if(.1<s/i){for(var _=0;_<s;++_){var v=o[_];v._dirty=!1;for(var C=0;C<g;++C)m[C](this,e,a,y,v)}this._vaf.commit(getIndexBuffer(r))}else{for(var x=0;x<s;++x){var b=o[x];b._dirty=!1;for(var S=0;S<g;++S)m[S](this,e,a,y,b);this._instanced?this._vaf.subCommit(b._index,1):this._vaf.subCommit(4*b._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(1.5*i<s&&(o.length=i),defined(this._vaf)&&defined(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,BoundingSphere.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var T,E=Matrix4.IDENTITY;updateBoundingVolume(this,e,T=e.mode===SceneMode$1.SCENE3D?(E=this.modelMatrix,BoundingSphere.clone(this._baseVolumeWC,this._boundingVolume)):BoundingSphere.clone(this._baseVolume2D,this._boundingVolume));var w,A=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,A&&(this._blendOption===BlendOption$1.OPAQUE||this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=RenderState.fromCache({depthTest:{enabled:!0,func:WebGLConstants$1.LESS},depthMask:!0}):this._rsOpaque=void 0,P=this._blendOption===BlendOption$1.TRANSLUCENT,this._blendOption===BlendOption$1.TRANSLUCENT||this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=RenderState.fromCache({depthTest:{enabled:!0,func:P?WebGLConstants$1.LEQUAL:WebGLConstants$1.LESS},depthMask:P,blending:BlendingState$1.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;var P;c=0<ContextLimits.maximumVertexTextureImageUnits;!A&&this._shaderRotation===this._compiledShaderRotation&&this._shaderAlignedAxis===this._compiledShaderAlignedAxis&&this._shaderScaleByDistance===this._compiledShaderScaleByDistance&&this._shaderTranslucencyByDistance===this._compiledShaderTranslucencyByDistance&&this._shaderPixelOffsetScaleByDistance===this._compiledShaderPixelOffsetScaleByDistance&&this._shaderDistanceDisplayCondition===this._compiledShaderDistanceDisplayCondition&&this._shaderDisableDepthDistance===this._compiledShaderDisableDepthDistance&&this._shaderClampToGround===this._compiledShaderClampToGround&&this._sdf===this._compiledSDF||(u=BillboardCollectionVS,d=BillboardCollectionFS,P=[],defined(this._batchTable)&&(P.push("VECTOR_TILE"),u=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(u),d=this._batchTable.getFragmentShaderCallback(!1,void 0)(d)),A=new ShaderSource({defines:P,sources:[u]}),this._instanced&&A.defines.push("INSTANCED"),this._shaderRotation&&A.defines.push("ROTATION"),this._shaderAlignedAxis&&A.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&A.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&A.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&A.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&A.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&A.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(c?A.defines.push("VERTEX_DEPTH_CHECK"):A.defines.push("FRAGMENT_DEPTH_CHECK")),P=1-SDFSettings$1.CUTOFF,this._sdf&&A.defines.push("SDF"),u=defined(this._batchTable)?"VECTOR_TILE":"",this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT&&(w=new ShaderSource({defines:["OPAQUE",u],sources:[d]}),this._shaderClampToGround&&(c?w.defines.push("VERTEX_DEPTH_CHECK"):w.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(w.defines.push("SDF"),w.defines.push("SDF_EDGE "+P)),this._sp=ShaderProgram.replaceCache({context:r,shaderProgram:this._sp,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:attributeLocations}),w=new ShaderSource({defines:["TRANSLUCENT",u],sources:[d]}),this._shaderClampToGround&&(c?w.defines.push("VERTEX_DEPTH_CHECK"):w.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(w.defines.push("SDF"),w.defines.push("SDF_EDGE "+P)),this._spTranslucent=ShaderProgram.replaceCache({context:r,shaderProgram:this._spTranslucent,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:attributeLocations})),this._blendOption===BlendOption$1.OPAQUE&&(w=new ShaderSource({defines:[u],sources:[d]}),this._shaderClampToGround&&(c?w.defines.push("VERTEX_DEPTH_CHECK"):w.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(w.defines.push("SDF"),w.defines.push("SDF_EDGE "+P)),this._sp=ShaderProgram.replaceCache({context:r,shaderProgram:this._sp,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:attributeLocations})),this._blendOption===BlendOption$1.TRANSLUCENT&&(w=new ShaderSource({defines:[u],sources:[d]}),this._shaderClampToGround&&(c?w.defines.push("VERTEX_DEPTH_CHECK"):w.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(w.defines.push("SDF"),w.defines.push("SDF_EDGE "+P)),this._spTranslucent=ShaderProgram.replaceCache({context:r,shaderProgram:this._spTranslucent,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:attributeLocations})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf);var D=e.commandList;if(L.render||L.pick){var M=this._colorCommands,I=this._blendOption===BlendOption$1.OPAQUE,R=this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT,O=this._vaf.va,L=O.length,N=this._uniforms,F=defined(this._batchTable)?(N=this._batchTable.getUniformMapCallback()(N),this._batchTable.getPickId()):"v_pickColor";M.length=L;for(var B=R?2*L:L,V=0;V<B;++V){var k=M[V];defined(k)||(k=M[V]=new DrawCommand);var z=I||R&&V%2==0;k.pass=z||!R?Pass$1.OPAQUE:Pass$1.TRANSLUCENT,k.owner=this;var G=R?Math.floor(V/2):V;k.boundingVolume=T,k.modelMatrix=E,k.count=O[G].indicesCount,k.shaderProgram=z?this._sp:this._spTranslucent,k.uniformMap=N,k.vertexArray=O[G].va,k.renderState=z?this._rsOpaque:this._rsTranslucent,k.debugShowBoundingVolume=this.debugShowBoundingVolume,k.pickId=F,this._instanced&&(k.count=6,k.instanceCount=i),D.push(k)}this.debugShowTextureAtlas&&(defined(this.debugCommand)||(this.debugCommand=createDebugCommand(this,e.context)),D.push(this.debugCommand))}}}},BillboardCollection.prototype.isDestroyed=function(){return!1},BillboardCollection.prototype.destroy=function(){return defined(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),destroyBillboards(this._billboards),destroyObject(this)};var scratchCartographic$5=new Cartographic;function setBillboardImage(e){var t,i,r,n,a,o,s,l,c=e._billboard;defined(e._billboardImage)&&e._billboardImage!==c.image?c.image=e._billboardImage:defined(e._billboardImage)||(s=defaultValue(e._color,Cesium3DTilePointFeature.defaultColor),l=defaultValue(e._pointOutlineColor,Cesium3DTilePointFeature.defaultPointOutlineColor),t=defaultValue(e._pointOutlineWidth,Cesium3DTilePointFeature.defaultPointOutlineWidth),i=defaultValue(e._pointSize,Cesium3DTilePointFeature.defaultPointSize),r=e._billboardColor,n=e._billboardOutlineColor,a=e._billboardOutlineWidth,o=e._billboardSize,Color.equals(s,r)&&Color.equals(l,n)&&t===a&&i===o||(e._billboardColor=Color.clone(s,e._billboardColor),e._billboardOutlineColor=Color.clone(l,e._billboardOutlineColor),e._billboardOutlineWidth=t,e._billboardSize=i,o=s.alpha,e=s.toCssColorString(),s=l.toCssColorString(),l=JSON.stringify([e,i,s,t]),c.setImage(l,createBillboardPointCallback(o,e,s,t,i))))}Object.defineProperties(Cesium3DTilePointFeature.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=Color.clone(e,this._color),setBillboardImage(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,setBillboardImage(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=Color.clone(e,this._pointOutlineColor),setBillboardImage(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,setBillboardImage(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&0<e.alpha}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){defined(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){var t=defaultValue(this._heightOffset,0),i=this._content.tileset.ellipsoid,r=i.cartesianToCartographic(this._billboard.position,scratchCartographic$5);r.height=r.height-t+e,r=i.cartographicToCartesian(r),this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=Color.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){var t=this._billboardImage!==e;this._billboardImage=e,t&&setBillboardImage(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){var e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),Cesium3DTilePointFeature.defaultColor=Color.WHITE,Cesium3DTilePointFeature.defaultPointOutlineColor=Color.BLACK,Cesium3DTilePointFeature.defaultPointOutlineWidth=0,Cesium3DTilePointFeature.defaultPointSize=8,Cesium3DTilePointFeature.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},Cesium3DTilePointFeature.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},Cesium3DTilePointFeature.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},Cesium3DTilePointFeature.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},Cesium3DTilePointFeature.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},Cesium3DTilePointFeature.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},Cesium3DTilePointFeature.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var INF=1e20;function clamp(e,t,i){return t<i?e<t?t:i<e?i:e:e<i?i:t<e?t:e}function calcSDF(e,t){var i,r,n,a,o,s=null==(t=t||{}).cutoff?.25:t.cutoff,l=null==t.radius?8:t.radius,c=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,r=t.height,n=e,o=t.stride?t.stride:Math.floor(e.length/i/r)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=(f=e).getContext("2d"),i=f.width,r=f.height,n=(p=h.getImageData(0,0,i,r)).data,o=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(i=(f=(h=e).canvas).width,r=f.height,n=(p=h.getImageData(0,0,i,r)).data,o=4):window.ImageData&&e instanceof window.ImageData&&(i=(p=e).width,r=e.height,n=p.data,o=4);if(f=Math.max(i,r),window.Uint8ClampedArray&&n instanceof window.Uint8ClampedArray||window.Uint8Array&&n instanceof window.Uint8Array)for(a=n,n=Array(i*r),m=0,g=a.length;m<g;m++)n[m]=a[m*o+c]/255;else if(1!==o)throw Error("Raw data can have only 1 value per pixel");for(var u=Array(i*r),d=Array(i*r),h=Array(f),p=(e=Array(f),Array(f+1)),f=Array(f),m=0,g=i*r;m<g;m++){var y=n[m];u[m]=1===y?0:0===y?INF:Math.pow(Math.max(0,.5-y),2),d[m]=1===y?INF:0===y?0:Math.pow(Math.max(0,y-.5),2)}edt(u,i,r,h,e,f,p),edt(d,i,r,h,e,f,p);var _=new(window.Float32Array?Float32Array:Array)(i*r);for(m=0,g=i*r;m<g;m++)_[m]=clamp(1-((u[m]-d[m])/l+s),0,1);return _}function edt(e,t,i,r,n,a,o){for(var s=0;s<t;s++){for(var l=0;l<i;l++)r[l]=e[l*t+s];for(edt1d(r,n,a,o,i),l=0;l<i;l++)e[l*t+s]=n[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)r[s]=e[l*t+s];for(edt1d(r,n,a,o,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(n[s])}}function edt1d(e,t,i,r,n){r[i[0]=0]=-INF,r[1]=+INF;for(var a=1,o=0;a<n;a++){for(var s=(e[a]+a*a-(e[i[o]]+i[o]*i[o]))/(2*a-2*i[o]);s<=r[o];)o--,s=(e[a]+a*a-(e[i[o]]+i[o]*i[o]))/(2*a-2*i[o]);i[++o]=a,r[o]=s,r[o+1]=+INF}for(o=a=0;a<n;a++){for(;r[o+1]<a;)o++;t[a]=(a-i[o])*(a-i[o])+e[i[o]]}}var LabelStyle={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},LabelStyle$1=Object.freeze(LabelStyle),fontInfoCache={},fontInfoCacheLength=0,fontInfoCacheMaxSize=256,defaultBackgroundColor=new Color(.165,.165,.165,.8),defaultBackgroundPadding=new Cartesian2(7,5),textTypes=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function rebindAllGlyphs(e){e._rebindAllGlyphs||e._repositionAllGlyphs||e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function repositionAllGlyphs(e){e._rebindAllGlyphs||e._repositionAllGlyphs||e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function getCSSValue$1(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function parseFont(e){var t,i,r=fontInfoCache[e._font];defined(r)||((t=document.createElement("div")).style.position="absolute",t.style.opacity=0,t.style.font=e._font,document.body.appendChild(t),i=Number.parseFloat(getCSSValue$1(t,"line-height")),isNaN(i)&&(i=void 0),r={family:getCSSValue$1(t,"font-family"),size:getCSSValue$1(t,"font-size").replace("px",""),style:getCSSValue$1(t,"font-style"),weight:getCSSValue$1(t,"font-weight"),lineHeight:i},document.body.removeChild(t),fontInfoCacheLength<fontInfoCacheMaxSize&&(fontInfoCache[e._font]=r,fontInfoCacheLength++)),e._fontFamily=r.family,e._fontSize=r.size,e._fontStyle=r.style,e._fontWeight=r.weight,e._lineHeight=r.lineHeight}function Label(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).translucencyByDistance,r=e.pixelOffsetScaleByDistance,n=e.scaleByDistance,a=e.distanceDisplayCondition;defined(i)&&(i=NearFarScalar.clone(i)),defined(r)&&(r=NearFarScalar.clone(r)),defined(n)&&(n=NearFarScalar.clone(n)),defined(a)&&(a=DistanceDisplayCondition.clone(a)),this._renderedText=void 0,this._text=void 0,this._show=defaultValue(e.show,!0),this._font=defaultValue(e.font,"30px sans-serif"),this._fillColor=Color.clone(defaultValue(e.fillColor,Color.WHITE)),this._outlineColor=Color.clone(defaultValue(e.outlineColor,Color.BLACK)),this._outlineWidth=defaultValue(e.outlineWidth,1),this._showBackground=defaultValue(e.showBackground,!1),this._backgroundColor=Color.clone(defaultValue(e.backgroundColor,defaultBackgroundColor)),this._backgroundPadding=Cartesian2.clone(defaultValue(e.backgroundPadding,defaultBackgroundPadding)),this._style=defaultValue(e.style,LabelStyle$1.FILL),this._verticalOrigin=defaultValue(e.verticalOrigin,VerticalOrigin$1.BASELINE),this._horizontalOrigin=defaultValue(e.horizontalOrigin,HorizontalOrigin$1.LEFT),this._pixelOffset=Cartesian2.clone(defaultValue(e.pixelOffset,Cartesian2.ZERO)),this._eyeOffset=Cartesian3.clone(defaultValue(e.eyeOffset,Cartesian3.ZERO)),this._position=Cartesian3.clone(defaultValue(e.position,Cartesian3.ZERO)),this._scale=defaultValue(e.scale,1),this._id=e.id,this._translucencyByDistance=i,this._pixelOffsetScaleByDistance=r,this._scaleByDistance=n,this._heightReference=defaultValue(e.heightReference,HeightReference$1.NONE),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=defaultValue(e.text,""),this._relativeSize=1,parseFont(this),this._updateClamping()}function convertTextToTypes(e,t){for(var i=/[a-zA-Z0-9]/,r=/[()[\]{}<>]/,n=[],a="",o=textTypes.LTR,s="",l=e.length,c=0;c<l;++c){var u=e.charAt(c);s=t.test(u)?textTypes.RTL:i.test(u)?textTypes.LTR:r.test(u)?textTypes.BRACKETS:textTypes.WEAK;0===c&&(o=s),o===s&&s!==textTypes.BRACKETS?a+=u:(""!==a&&n.push({Type:o,Word:a}),o=s,a=u)}return n.push({Type:s,Word:a}),n}function reverseWord(e){return e.split("").reverse().join("")}function spliceWord(e,t,i){return e.slice(0,t)+i+e.slice(t)}function reverseBrackets(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}Object.defineProperties(Label.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i].billboard;defined(n)&&(n.show=e)}var a=this._backgroundBillboard;defined(a)&&(a.show=e)}}},position:{get:function(){return this._position},set:function(e){var t=this._position;if(!Cartesian3.equals(t,e)){Cartesian3.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r].billboard;defined(a)&&(a.position=e)}defined(t=this._backgroundBillboard)&&(t.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i].billboard;defined(n)&&(n.heightReference=e)}var a=this._backgroundBillboard;defined(a)&&(a.heightReference=e),repositionAllGlyphs(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){this._text!==e&&(this._text=e,this._renderedText=Label.enableRightToLeftDetection?reverseRtl(e):e,rebindAllGlyphs(this))}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,rebindAllGlyphs(this),parseFont(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){var t=this._fillColor;Color.equals(t,e)||(Color.clone(e,t),rebindAllGlyphs(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;Color.equals(t,e)||(Color.clone(e,t),rebindAllGlyphs(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,rebindAllGlyphs(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,rebindAllGlyphs(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){var t=this._backgroundColor;Color.equals(t,e)||(Color.clone(e,t),defined(e=this._backgroundBillboard)&&(e.color=t))}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){var t=this._backgroundPadding;Cartesian2.equals(t,e)||(Cartesian2.clone(e,t),repositionAllGlyphs(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,rebindAllGlyphs(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){var t=this._pixelOffset;if(!Cartesian2.equals(t,e)){Cartesian2.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.pixelOffset=e)}defined(t=this._backgroundBillboard)&&(t.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;if(!NearFarScalar.equals(t,e)){this._translucencyByDistance=NearFarScalar.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.translucencyByDistance=e)}defined(t=this._backgroundBillboard)&&(t.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){var t=this._pixelOffsetScaleByDistance;if(!NearFarScalar.equals(t,e)){this._pixelOffsetScaleByDistance=NearFarScalar.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.pixelOffsetScaleByDistance=e)}defined(t=this._backgroundBillboard)&&(t.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;if(!NearFarScalar.equals(t,e)){this._scaleByDistance=NearFarScalar.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.scaleByDistance=e)}defined(t=this._backgroundBillboard)&&(t.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){var t=this._eyeOffset;if(!Cartesian3.equals(t,e)){Cartesian3.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.eyeOffset=e)}defined(t=this._backgroundBillboard)&&(t.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,repositionAllGlyphs(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(this._verticalOrigin!==e){this._verticalOrigin=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.verticalOrigin=e)}var a=this._backgroundBillboard;defined(a)&&(a.verticalOrigin=e),repositionAllGlyphs(this)}}},scale:{get:function(){return this._scale},set:function(e){if(this._scale!==e){this._scale=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.scale=e*this._relativeSize)}var a=this._backgroundBillboard;defined(a)&&(a.scale=e*this._relativeSize),repositionAllGlyphs(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!DistanceDisplayCondition.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition);for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.distanceDisplayCondition=e)}var a=this._backgroundBillboard;defined(a)&&(a.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){this._disableDepthTestDistance=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.disableDepthTestDistance=e)}var a=this._backgroundBillboard;defined(a)&&(a.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.id=e)}var a=this._backgroundBillboard;defined(a)&&(a.id=e)}}},pickId:{get:function(){if(0!==this._glyphs.length&&defined(this._glyphs[0].billboard))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=Cartesian3.clone(e,this._actualClampedPosition);for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard._clampedPosition=e)}var a=this._backgroundBillboard;defined(a)&&(a._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.clusterShow=e)}var a=this._backgroundBillboard;defined(a)&&(a.clusterShow=e)}}}}),Label.prototype._updateClamping=function(){Billboard._updateClamping(this._labelCollection,this)},Label.prototype.computeScreenSpacePosition=function(e,t){defined(t)||(t=new Cartesian2);var i=this._labelCollection.modelMatrix,r=defined(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Billboard._computeScreenSpacePosition(i,r,this._eyeOffset,this._pixelOffset,e,t)},Label.getScreenSpaceBoundingBox=function(e,t,i){var r=0,n=0,a=0,o=0,s=e.totalScale,l=e._backgroundBillboard;if(defined(l))r=t.x+l._translate.x,n=t.y-l._translate.y,a=l.width*s,o=l.height*s,e.verticalOrigin===VerticalOrigin$1.BOTTOM||e.verticalOrigin===VerticalOrigin$1.BASELINE?n-=o:e.verticalOrigin===VerticalOrigin$1.CENTER&&(n-=.5*o);else{r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(var c=0,u=0,d=e._glyphs,h=d.length,p=0;p<h;++p){var f,m,g=d[p],y=g.billboard;defined(y)&&(f=t.x+y._translate.x,m=t.y-y._translate.y,y=g.dimensions.width*s,g=g.dimensions.height*s,e.verticalOrigin===VerticalOrigin$1.BOTTOM||e.verticalOrigin===VerticalOrigin$1.BASELINE?m-=g:e.verticalOrigin===VerticalOrigin$1.CENTER&&(m-=.5*g),e._verticalOrigin===VerticalOrigin$1.TOP?m+=SDFSettings$1.PADDING*s:e._verticalOrigin!==VerticalOrigin$1.BOTTOM&&e._verticalOrigin!==VerticalOrigin$1.BASELINE||(m-=SDFSettings$1.PADDING*s),r=Math.min(r,f),n=Math.min(n,m),c=Math.max(c,f+y),u=Math.max(u,m+g))}a=c-r,o=u-n}return defined(i)||(i=new BoundingRectangle),i.x=r,i.y=n,i.width=a,i.height=o,i},Label.prototype.equals=function(e){return this===e||defined(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&Cartesian3.equals(this._position,e._position)&&Color.equals(this._fillColor,e._fillColor)&&Color.equals(this._outlineColor,e._outlineColor)&&Color.equals(this._backgroundColor,e._backgroundColor)&&Cartesian2.equals(this._backgroundPadding,e._backgroundPadding)&&Cartesian2.equals(this._pixelOffset,e._pixelOffset)&&Cartesian3.equals(this._eyeOffset,e._eyeOffset)&&NearFarScalar.equals(this._translucencyByDistance,e._translucencyByDistance)&&NearFarScalar.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&NearFarScalar.equals(this._scaleByDistance,e._scaleByDistance)&&DistanceDisplayCondition.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id},Label.prototype.isDestroyed=function(){return!1},Label.enableRightToLeftDetection=!1;var hebrew="א-ת",arabic="؀-ۿݐ-ݿࢠ-ࣿ",rtlChars=new RegExp("["+hebrew+arabic+"]");function reverseRtl(e){for(var t=e.split("\n"),i="",r=0;r<t.length;r++){for(var n=t[r],a=rtlChars.test(n.charAt(0)),o=convertTextToTypes(n,rtlChars),s=0,l="",c=0;c<o.length;++c){var u=o[c],d=(u.Type===textTypes.BRACKETS?reverseBrackets:reverseWord)(u.Word);a?u.Type===textTypes.RTL?(l=d+l,s=0):u.Type===textTypes.LTR?(l=spliceWord(l,s,u.Word),s+=u.Word.length):u.Type!==textTypes.WEAK&&u.Type!==textTypes.BRACKETS||(u.Type===textTypes.WEAK&&o[c-1].Type===textTypes.BRACKETS?l=d+l:o[c-1].Type===textTypes.RTL?(l=d+l,s=0):o.length>c+1?o[c+1].Type===textTypes.RTL?(l=d+l,s=0):(l=spliceWord(l,s,u.Word),s+=u.Word.length):l=spliceWord(l,0,d)):u.Type===textTypes.RTL?l=spliceWord(l,s,d):u.Type===textTypes.LTR?s=(l+=u.Word).length:u.Type!==textTypes.WEAK&&u.Type!==textTypes.BRACKETS||(0<c&&o[c-1].Type===textTypes.RTL?o.length>c+1?o[c+1].Type===textTypes.RTL?l=spliceWord(l,s,d):s=(l+=u.Word).length:l+=u.Word:s=(l+=u.Word).length)}i+=l,r<t.length-1&&(i+="\n")}return i}function GraphemeSplitter(){var e=3,t=4,i=12,r=13,n=16,a=17;function o(e,t){void 0===t&&(t=0);var i=e.charCodeAt(t);if(55296<=i&&i<=56319&&t<e.length-1){var r=i;return 56320<=(n=e.charCodeAt(t+1))&&n<=57343?1024*(r-55296)+(n-56320)+65536:r}if(56320<=i&&i<=57343&&1<=t){var n=i;return 55296<=(r=e.charCodeAt(t-1))&&r<=56319?1024*(r-55296)+(n-56320)+65536:n}return i}function s(o){return 1536<=o&&o<=1541||1757==o||1807==o||2274==o||3406==o||69821==o||70082<=o&&o<=70083||72250==o||72326<=o&&o<=72329||73030==o?i:13==o?0:10==o?1:0<=o&&o<=9||11<=o&&o<=12||14<=o&&o<=31||127<=o&&o<=159||173==o||1564==o||6158==o||8203==o||8206<=o&&o<=8207||8232==o||8233==o||8234<=o&&o<=8238||8288<=o&&o<=8292||8293==o||8294<=o&&o<=8303||55296<=o&&o<=57343||65279==o||65520<=o&&o<=65528||65529<=o&&o<=65531||113824<=o&&o<=113827||119155<=o&&o<=119162||917504==o||917505==o||917506<=o&&o<=917535||917632<=o&&o<=917759||918e3<=o&&o<=921599?2:768<=o&&o<=879||1155<=o&&o<=1159||1160<=o&&o<=1161||1425<=o&&o<=1469||1471==o||1473<=o&&o<=1474||1476<=o&&o<=1477||1479==o||1552<=o&&o<=1562||1611<=o&&o<=1631||1648==o||1750<=o&&o<=1756||1759<=o&&o<=1764||1767<=o&&o<=1768||1770<=o&&o<=1773||1809==o||1840<=o&&o<=1866||1958<=o&&o<=1968||2027<=o&&o<=2035||2070<=o&&o<=2073||2075<=o&&o<=2083||2085<=o&&o<=2087||2089<=o&&o<=2093||2137<=o&&o<=2139||2260<=o&&o<=2273||2275<=o&&o<=2306||2362==o||2364==o||2369<=o&&o<=2376||2381==o||2385<=o&&o<=2391||2402<=o&&o<=2403||2433==o||2492==o||2494==o||2497<=o&&o<=2500||2509==o||2519==o||2530<=o&&o<=2531||2561<=o&&o<=2562||2620==o||2625<=o&&o<=2626||2631<=o&&o<=2632||2635<=o&&o<=2637||2641==o||2672<=o&&o<=2673||2677==o||2689<=o&&o<=2690||2748==o||2753<=o&&o<=2757||2759<=o&&o<=2760||2765==o||2786<=o&&o<=2787||2810<=o&&o<=2815||2817==o||2876==o||2878==o||2879==o||2881<=o&&o<=2884||2893==o||2902==o||2903==o||2914<=o&&o<=2915||2946==o||3006==o||3008==o||3021==o||3031==o||3072==o||3134<=o&&o<=3136||3142<=o&&o<=3144||3146<=o&&o<=3149||3157<=o&&o<=3158||3170<=o&&o<=3171||3201==o||3260==o||3263==o||3266==o||3270==o||3276<=o&&o<=3277||3285<=o&&o<=3286||3298<=o&&o<=3299||3328<=o&&o<=3329||3387<=o&&o<=3388||3390==o||3393<=o&&o<=3396||3405==o||3415==o||3426<=o&&o<=3427||3530==o||3535==o||3538<=o&&o<=3540||3542==o||3551==o||3633==o||3636<=o&&o<=3642||3655<=o&&o<=3662||3761==o||3764<=o&&o<=3769||3771<=o&&o<=3772||3784<=o&&o<=3789||3864<=o&&o<=3865||3893==o||3895==o||3897==o||3953<=o&&o<=3966||3968<=o&&o<=3972||3974<=o&&o<=3975||3981<=o&&o<=3991||3993<=o&&o<=4028||4038==o||4141<=o&&o<=4144||4146<=o&&o<=4151||4153<=o&&o<=4154||4157<=o&&o<=4158||4184<=o&&o<=4185||4190<=o&&o<=4192||4209<=o&&o<=4212||4226==o||4229<=o&&o<=4230||4237==o||4253==o||4957<=o&&o<=4959||5906<=o&&o<=5908||5938<=o&&o<=5940||5970<=o&&o<=5971||6002<=o&&o<=6003||6068<=o&&o<=6069||6071<=o&&o<=6077||6086==o||6089<=o&&o<=6099||6109==o||6155<=o&&o<=6157||6277<=o&&o<=6278||6313==o||6432<=o&&o<=6434||6439<=o&&o<=6440||6450==o||6457<=o&&o<=6459||6679<=o&&o<=6680||6683==o||6742==o||6744<=o&&o<=6750||6752==o||6754==o||6757<=o&&o<=6764||6771<=o&&o<=6780||6783==o||6832<=o&&o<=6845||6846==o||6912<=o&&o<=6915||6964==o||6966<=o&&o<=6970||6972==o||6978==o||7019<=o&&o<=7027||7040<=o&&o<=7041||7074<=o&&o<=7077||7080<=o&&o<=7081||7083<=o&&o<=7085||7142==o||7144<=o&&o<=7145||7149==o||7151<=o&&o<=7153||7212<=o&&o<=7219||7222<=o&&o<=7223||7376<=o&&o<=7378||7380<=o&&o<=7392||7394<=o&&o<=7400||7405==o||7412==o||7416<=o&&o<=7417||7616<=o&&o<=7673||7675<=o&&o<=7679||8204==o||8400<=o&&o<=8412||8413<=o&&o<=8416||8417==o||8418<=o&&o<=8420||8421<=o&&o<=8432||11503<=o&&o<=11505||11647==o||11744<=o&&o<=11775||12330<=o&&o<=12333||12334<=o&&o<=12335||12441<=o&&o<=12442||42607==o||42608<=o&&o<=42610||42612<=o&&o<=42621||42654<=o&&o<=42655||42736<=o&&o<=42737||43010==o||43014==o||43019==o||43045<=o&&o<=43046||43204<=o&&o<=43205||43232<=o&&o<=43249||43302<=o&&o<=43309||43335<=o&&o<=43345||43392<=o&&o<=43394||43443==o||43446<=o&&o<=43449||43452==o||43493==o||43561<=o&&o<=43566||43569<=o&&o<=43570||43573<=o&&o<=43574||43587==o||43596==o||43644==o||43696==o||43698<=o&&o<=43700||43703<=o&&o<=43704||43710<=o&&o<=43711||43713==o||43756<=o&&o<=43757||43766==o||44005==o||44008==o||44013==o||64286==o||65024<=o&&o<=65039||65056<=o&&o<=65071||65438<=o&&o<=65439||66045==o||66272==o||66422<=o&&o<=66426||68097<=o&&o<=68099||68101<=o&&o<=68102||68108<=o&&o<=68111||68152<=o&&o<=68154||68159==o||68325<=o&&o<=68326||69633==o||69688<=o&&o<=69702||69759<=o&&o<=69761||69811<=o&&o<=69814||69817<=o&&o<=69818||69888<=o&&o<=69890||69927<=o&&o<=69931||69933<=o&&o<=69940||70003==o||70016<=o&&o<=70017||70070<=o&&o<=70078||70090<=o&&o<=70092||70191<=o&&o<=70193||70196==o||70198<=o&&o<=70199||70206==o||70367==o||70371<=o&&o<=70378||70400<=o&&o<=70401||70460==o||70462==o||70464==o||70487==o||70502<=o&&o<=70508||70512<=o&&o<=70516||70712<=o&&o<=70719||70722<=o&&o<=70724||70726==o||70832==o||70835<=o&&o<=70840||70842==o||70845==o||70847<=o&&o<=70848||70850<=o&&o<=70851||71087==o||71090<=o&&o<=71093||71100<=o&&o<=71101||71103<=o&&o<=71104||71132<=o&&o<=71133||71219<=o&&o<=71226||71229==o||71231<=o&&o<=71232||71339==o||71341==o||71344<=o&&o<=71349||71351==o||71453<=o&&o<=71455||71458<=o&&o<=71461||71463<=o&&o<=71467||72193<=o&&o<=72198||72201<=o&&o<=72202||72243<=o&&o<=72248||72251<=o&&o<=72254||72263==o||72273<=o&&o<=72278||72281<=o&&o<=72283||72330<=o&&o<=72342||72344<=o&&o<=72345||72752<=o&&o<=72758||72760<=o&&o<=72765||72767==o||72850<=o&&o<=72871||72874<=o&&o<=72880||72882<=o&&o<=72883||72885<=o&&o<=72886||73009<=o&&o<=73014||73018==o||73020<=o&&o<=73021||73023<=o&&o<=73029||73031==o||92912<=o&&o<=92916||92976<=o&&o<=92982||94095<=o&&o<=94098||113821<=o&&o<=113822||119141==o||119143<=o&&o<=119145||119150<=o&&o<=119154||119163<=o&&o<=119170||119173<=o&&o<=119179||119210<=o&&o<=119213||119362<=o&&o<=119364||121344<=o&&o<=121398||121403<=o&&o<=121452||121461==o||121476==o||121499<=o&&o<=121503||121505<=o&&o<=121519||122880<=o&&o<=122886||122888<=o&&o<=122904||122907<=o&&o<=122913||122915<=o&&o<=122916||122918<=o&&o<=122922||125136<=o&&o<=125142||125252<=o&&o<=125258||917536<=o&&o<=917631||917760<=o&&o<=917999?e:127462<=o&&o<=127487?t:2307==o||2363==o||2366<=o&&o<=2368||2377<=o&&o<=2380||2382<=o&&o<=2383||2434<=o&&o<=2435||2495<=o&&o<=2496||2503<=o&&o<=2504||2507<=o&&o<=2508||2563==o||2622<=o&&o<=2624||2691==o||2750<=o&&o<=2752||2761==o||2763<=o&&o<=2764||2818<=o&&o<=2819||2880==o||2887<=o&&o<=2888||2891<=o&&o<=2892||3007==o||3009<=o&&o<=3010||3014<=o&&o<=3016||3018<=o&&o<=3020||3073<=o&&o<=3075||3137<=o&&o<=3140||3202<=o&&o<=3203||3262==o||3264<=o&&o<=3265||3267<=o&&o<=3268||3271<=o&&o<=3272||3274<=o&&o<=3275||3330<=o&&o<=3331||3391<=o&&o<=3392||3398<=o&&o<=3400||3402<=o&&o<=3404||3458<=o&&o<=3459||3536<=o&&o<=3537||3544<=o&&o<=3550||3570<=o&&o<=3571||3635==o||3763==o||3902<=o&&o<=3903||3967==o||4145==o||4155<=o&&o<=4156||4182<=o&&o<=4183||4228==o||6070==o||6078<=o&&o<=6085||6087<=o&&o<=6088||6435<=o&&o<=6438||6441<=o&&o<=6443||6448<=o&&o<=6449||6451<=o&&o<=6456||6681<=o&&o<=6682||6741==o||6743==o||6765<=o&&o<=6770||6916==o||6965==o||6971==o||6973<=o&&o<=6977||6979<=o&&o<=6980||7042==o||7073==o||7078<=o&&o<=7079||7082==o||7143==o||7146<=o&&o<=7148||7150==o||7154<=o&&o<=7155||7204<=o&&o<=7211||7220<=o&&o<=7221||7393==o||7410<=o&&o<=7411||7415==o||43043<=o&&o<=43044||43047==o||43136<=o&&o<=43137||43188<=o&&o<=43203||43346<=o&&o<=43347||43395==o||43444<=o&&o<=43445||43450<=o&&o<=43451||43453<=o&&o<=43456||43567<=o&&o<=43568||43571<=o&&o<=43572||43597==o||43755==o||43758<=o&&o<=43759||43765==o||44003<=o&&o<=44004||44006<=o&&o<=44007||44009<=o&&o<=44010||44012==o||69632==o||69634==o||69762==o||69808<=o&&o<=69810||69815<=o&&o<=69816||69932==o||70018==o||70067<=o&&o<=70069||70079<=o&&o<=70080||70188<=o&&o<=70190||70194<=o&&o<=70195||70197==o||70368<=o&&o<=70370||70402<=o&&o<=70403||70463==o||70465<=o&&o<=70468||70471<=o&&o<=70472||70475<=o&&o<=70477||70498<=o&&o<=70499||70709<=o&&o<=70711||70720<=o&&o<=70721||70725==o||70833<=o&&o<=70834||70841==o||70843<=o&&o<=70844||70846==o||70849==o||71088<=o&&o<=71089||71096<=o&&o<=71099||71102==o||71216<=o&&o<=71218||71227<=o&&o<=71228||71230==o||71340==o||71342<=o&&o<=71343||71350==o||71456<=o&&o<=71457||71462==o||72199<=o&&o<=72200||72249==o||72279<=o&&o<=72280||72343==o||72751==o||72766==o||72873==o||72881==o||72884==o||94033<=o&&o<=94078||119142==o||119149==o?5:4352<=o&&o<=4447||43360<=o&&o<=43388?6:4448<=o&&o<=4519||55216<=o&&o<=55238?7:4520<=o&&o<=4607||55243<=o&&o<=55291?8:44032==o||44060==o||44088==o||44116==o||44144==o||44172==o||44200==o||44228==o||44256==o||44284==o||44312==o||44340==o||44368==o||44396==o||44424==o||44452==o||44480==o||44508==o||44536==o||44564==o||44592==o||44620==o||44648==o||44676==o||44704==o||44732==o||44760==o||44788==o||44816==o||44844==o||44872==o||44900==o||44928==o||44956==o||44984==o||45012==o||45040==o||45068==o||45096==o||45124==o||45152==o||45180==o||45208==o||45236==o||45264==o||45292==o||45320==o||45348==o||45376==o||45404==o||45432==o||45460==o||45488==o||45516==o||45544==o||45572==o||45600==o||45628==o||45656==o||45684==o||45712==o||45740==o||45768==o||45796==o||45824==o||45852==o||45880==o||45908==o||45936==o||45964==o||45992==o||46020==o||46048==o||46076==o||46104==o||46132==o||46160==o||46188==o||46216==o||46244==o||46272==o||46300==o||46328==o||46356==o||46384==o||46412==o||46440==o||46468==o||46496==o||46524==o||46552==o||46580==o||46608==o||46636==o||46664==o||46692==o||46720==o||46748==o||46776==o||46804==o||46832==o||46860==o||46888==o||46916==o||46944==o||46972==o||47e3==o||47028==o||47056==o||47084==o||47112==o||47140==o||47168==o||47196==o||47224==o||47252==o||47280==o||47308==o||47336==o||47364==o||47392==o||47420==o||47448==o||47476==o||47504==o||47532==o||47560==o||47588==o||47616==o||47644==o||47672==o||47700==o||47728==o||47756==o||47784==o||47812==o||47840==o||47868==o||47896==o||47924==o||47952==o||47980==o||48008==o||48036==o||48064==o||48092==o||48120==o||48148==o||48176==o||48204==o||48232==o||48260==o||48288==o||48316==o||48344==o||48372==o||48400==o||48428==o||48456==o||48484==o||48512==o||48540==o||48568==o||48596==o||48624==o||48652==o||48680==o||48708==o||48736==o||48764==o||48792==o||48820==o||48848==o||48876==o||48904==o||48932==o||48960==o||48988==o||49016==o||49044==o||49072==o||49100==o||49128==o||49156==o||49184==o||49212==o||49240==o||49268==o||49296==o||49324==o||49352==o||49380==o||49408==o||49436==o||49464==o||49492==o||49520==o||49548==o||49576==o||49604==o||49632==o||49660==o||49688==o||49716==o||49744==o||49772==o||49800==o||49828==o||49856==o||49884==o||49912==o||49940==o||49968==o||49996==o||50024==o||50052==o||50080==o||50108==o||50136==o||50164==o||50192==o||50220==o||50248==o||50276==o||50304==o||50332==o||50360==o||50388==o||50416==o||50444==o||50472==o||50500==o||50528==o||50556==o||50584==o||50612==o||50640==o||50668==o||50696==o||50724==o||50752==o||50780==o||50808==o||50836==o||50864==o||50892==o||50920==o||50948==o||50976==o||51004==o||51032==o||51060==o||51088==o||51116==o||51144==o||51172==o||51200==o||51228==o||51256==o||51284==o||51312==o||51340==o||51368==o||51396==o||51424==o||51452==o||51480==o||51508==o||51536==o||51564==o||51592==o||51620==o||51648==o||51676==o||51704==o||51732==o||51760==o||51788==o||51816==o||51844==o||51872==o||51900==o||51928==o||51956==o||51984==o||52012==o||52040==o||52068==o||52096==o||52124==o||52152==o||52180==o||52208==o||52236==o||52264==o||52292==o||52320==o||52348==o||52376==o||52404==o||52432==o||52460==o||52488==o||52516==o||52544==o||52572==o||52600==o||52628==o||52656==o||52684==o||52712==o||52740==o||52768==o||52796==o||52824==o||52852==o||52880==o||52908==o||52936==o||52964==o||52992==o||53020==o||53048==o||53076==o||53104==o||53132==o||53160==o||53188==o||53216==o||53244==o||53272==o||53300==o||53328==o||53356==o||53384==o||53412==o||53440==o||53468==o||53496==o||53524==o||53552==o||53580==o||53608==o||53636==o||53664==o||53692==o||53720==o||53748==o||53776==o||53804==o||53832==o||53860==o||53888==o||53916==o||53944==o||53972==o||54e3==o||54028==o||54056==o||54084==o||54112==o||54140==o||54168==o||54196==o||54224==o||54252==o||54280==o||54308==o||54336==o||54364==o||54392==o||54420==o||54448==o||54476==o||54504==o||54532==o||54560==o||54588==o||54616==o||54644==o||54672==o||54700==o||54728==o||54756==o||54784==o||54812==o||54840==o||54868==o||54896==o||54924==o||54952==o||54980==o||55008==o||55036==o||55064==o||55092==o||55120==o||55148==o||55176==o?9:44033<=o&&o<=44059||44061<=o&&o<=44087||44089<=o&&o<=44115||44117<=o&&o<=44143||44145<=o&&o<=44171||44173<=o&&o<=44199||44201<=o&&o<=44227||44229<=o&&o<=44255||44257<=o&&o<=44283||44285<=o&&o<=44311||44313<=o&&o<=44339||44341<=o&&o<=44367||44369<=o&&o<=44395||44397<=o&&o<=44423||44425<=o&&o<=44451||44453<=o&&o<=44479||44481<=o&&o<=44507||44509<=o&&o<=44535||44537<=o&&o<=44563||44565<=o&&o<=44591||44593<=o&&o<=44619||44621<=o&&o<=44647||44649<=o&&o<=44675||44677<=o&&o<=44703||44705<=o&&o<=44731||44733<=o&&o<=44759||44761<=o&&o<=44787||44789<=o&&o<=44815||44817<=o&&o<=44843||44845<=o&&o<=44871||44873<=o&&o<=44899||44901<=o&&o<=44927||44929<=o&&o<=44955||44957<=o&&o<=44983||44985<=o&&o<=45011||45013<=o&&o<=45039||45041<=o&&o<=45067||45069<=o&&o<=45095||45097<=o&&o<=45123||45125<=o&&o<=45151||45153<=o&&o<=45179||45181<=o&&o<=45207||45209<=o&&o<=45235||45237<=o&&o<=45263||45265<=o&&o<=45291||45293<=o&&o<=45319||45321<=o&&o<=45347||45349<=o&&o<=45375||45377<=o&&o<=45403||45405<=o&&o<=45431||45433<=o&&o<=45459||45461<=o&&o<=45487||45489<=o&&o<=45515||45517<=o&&o<=45543||45545<=o&&o<=45571||45573<=o&&o<=45599||45601<=o&&o<=45627||45629<=o&&o<=45655||45657<=o&&o<=45683||45685<=o&&o<=45711||45713<=o&&o<=45739||45741<=o&&o<=45767||45769<=o&&o<=45795||45797<=o&&o<=45823||45825<=o&&o<=45851||45853<=o&&o<=45879||45881<=o&&o<=45907||45909<=o&&o<=45935||45937<=o&&o<=45963||45965<=o&&o<=45991||45993<=o&&o<=46019||46021<=o&&o<=46047||46049<=o&&o<=46075||46077<=o&&o<=46103||46105<=o&&o<=46131||46133<=o&&o<=46159||46161<=o&&o<=46187||46189<=o&&o<=46215||46217<=o&&o<=46243||46245<=o&&o<=46271||46273<=o&&o<=46299||46301<=o&&o<=46327||46329<=o&&o<=46355||46357<=o&&o<=46383||46385<=o&&o<=46411||46413<=o&&o<=46439||46441<=o&&o<=46467||46469<=o&&o<=46495||46497<=o&&o<=46523||46525<=o&&o<=46551||46553<=o&&o<=46579||46581<=o&&o<=46607||46609<=o&&o<=46635||46637<=o&&o<=46663||46665<=o&&o<=46691||46693<=o&&o<=46719||46721<=o&&o<=46747||46749<=o&&o<=46775||46777<=o&&o<=46803||46805<=o&&o<=46831||46833<=o&&o<=46859||46861<=o&&o<=46887||46889<=o&&o<=46915||46917<=o&&o<=46943||46945<=o&&o<=46971||46973<=o&&o<=46999||47001<=o&&o<=47027||47029<=o&&o<=47055||47057<=o&&o<=47083||47085<=o&&o<=47111||47113<=o&&o<=47139||47141<=o&&o<=47167||47169<=o&&o<=47195||47197<=o&&o<=47223||47225<=o&&o<=47251||47253<=o&&o<=47279||47281<=o&&o<=47307||47309<=o&&o<=47335||47337<=o&&o<=47363||47365<=o&&o<=47391||47393<=o&&o<=47419||47421<=o&&o<=47447||47449<=o&&o<=47475||47477<=o&&o<=47503||47505<=o&&o<=47531||47533<=o&&o<=47559||47561<=o&&o<=47587||47589<=o&&o<=47615||47617<=o&&o<=47643||47645<=o&&o<=47671||47673<=o&&o<=47699||47701<=o&&o<=47727||47729<=o&&o<=47755||47757<=o&&o<=47783||47785<=o&&o<=47811||47813<=o&&o<=47839||47841<=o&&o<=47867||47869<=o&&o<=47895||47897<=o&&o<=47923||47925<=o&&o<=47951||47953<=o&&o<=47979||47981<=o&&o<=48007||48009<=o&&o<=48035||48037<=o&&o<=48063||48065<=o&&o<=48091||48093<=o&&o<=48119||48121<=o&&o<=48147||48149<=o&&o<=48175||48177<=o&&o<=48203||48205<=o&&o<=48231||48233<=o&&o<=48259||48261<=o&&o<=48287||48289<=o&&o<=48315||48317<=o&&o<=48343||48345<=o&&o<=48371||48373<=o&&o<=48399||48401<=o&&o<=48427||48429<=o&&o<=48455||48457<=o&&o<=48483||48485<=o&&o<=48511||48513<=o&&o<=48539||48541<=o&&o<=48567||48569<=o&&o<=48595||48597<=o&&o<=48623||48625<=o&&o<=48651||48653<=o&&o<=48679||48681<=o&&o<=48707||48709<=o&&o<=48735||48737<=o&&o<=48763||48765<=o&&o<=48791||48793<=o&&o<=48819||48821<=o&&o<=48847||48849<=o&&o<=48875||48877<=o&&o<=48903||48905<=o&&o<=48931||48933<=o&&o<=48959||48961<=o&&o<=48987||48989<=o&&o<=49015||49017<=o&&o<=49043||49045<=o&&o<=49071||49073<=o&&o<=49099||49101<=o&&o<=49127||49129<=o&&o<=49155||49157<=o&&o<=49183||49185<=o&&o<=49211||49213<=o&&o<=49239||49241<=o&&o<=49267||49269<=o&&o<=49295||49297<=o&&o<=49323||49325<=o&&o<=49351||49353<=o&&o<=49379||49381<=o&&o<=49407||49409<=o&&o<=49435||49437<=o&&o<=49463||49465<=o&&o<=49491||49493<=o&&o<=49519||49521<=o&&o<=49547||49549<=o&&o<=49575||49577<=o&&o<=49603||49605<=o&&o<=49631||49633<=o&&o<=49659||49661<=o&&o<=49687||49689<=o&&o<=49715||49717<=o&&o<=49743||49745<=o&&o<=49771||49773<=o&&o<=49799||49801<=o&&o<=49827||49829<=o&&o<=49855||49857<=o&&o<=49883||49885<=o&&o<=49911||49913<=o&&o<=49939||49941<=o&&o<=49967||49969<=o&&o<=49995||49997<=o&&o<=50023||50025<=o&&o<=50051||50053<=o&&o<=50079||50081<=o&&o<=50107||50109<=o&&o<=50135||50137<=o&&o<=50163||50165<=o&&o<=50191||50193<=o&&o<=50219||50221<=o&&o<=50247||50249<=o&&o<=50275||50277<=o&&o<=50303||50305<=o&&o<=50331||50333<=o&&o<=50359||50361<=o&&o<=50387||50389<=o&&o<=50415||50417<=o&&o<=50443||50445<=o&&o<=50471||50473<=o&&o<=50499||50501<=o&&o<=50527||50529<=o&&o<=50555||50557<=o&&o<=50583||50585<=o&&o<=50611||50613<=o&&o<=50639||50641<=o&&o<=50667||50669<=o&&o<=50695||50697<=o&&o<=50723||50725<=o&&o<=50751||50753<=o&&o<=50779||50781<=o&&o<=50807||50809<=o&&o<=50835||50837<=o&&o<=50863||50865<=o&&o<=50891||50893<=o&&o<=50919||50921<=o&&o<=50947||50949<=o&&o<=50975||50977<=o&&o<=51003||51005<=o&&o<=51031||51033<=o&&o<=51059||51061<=o&&o<=51087||51089<=o&&o<=51115||51117<=o&&o<=51143||51145<=o&&o<=51171||51173<=o&&o<=51199||51201<=o&&o<=51227||51229<=o&&o<=51255||51257<=o&&o<=51283||51285<=o&&o<=51311||51313<=o&&o<=51339||51341<=o&&o<=51367||51369<=o&&o<=51395||51397<=o&&o<=51423||51425<=o&&o<=51451||51453<=o&&o<=51479||51481<=o&&o<=51507||51509<=o&&o<=51535||51537<=o&&o<=51563||51565<=o&&o<=51591||51593<=o&&o<=51619||51621<=o&&o<=51647||51649<=o&&o<=51675||51677<=o&&o<=51703||51705<=o&&o<=51731||51733<=o&&o<=51759||51761<=o&&o<=51787||51789<=o&&o<=51815||51817<=o&&o<=51843||51845<=o&&o<=51871||51873<=o&&o<=51899||51901<=o&&o<=51927||51929<=o&&o<=51955||51957<=o&&o<=51983||51985<=o&&o<=52011||52013<=o&&o<=52039||52041<=o&&o<=52067||52069<=o&&o<=52095||52097<=o&&o<=52123||52125<=o&&o<=52151||52153<=o&&o<=52179||52181<=o&&o<=52207||52209<=o&&o<=52235||52237<=o&&o<=52263||52265<=o&&o<=52291||52293<=o&&o<=52319||52321<=o&&o<=52347||52349<=o&&o<=52375||52377<=o&&o<=52403||52405<=o&&o<=52431||52433<=o&&o<=52459||52461<=o&&o<=52487||52489<=o&&o<=52515||52517<=o&&o<=52543||52545<=o&&o<=52571||52573<=o&&o<=52599||52601<=o&&o<=52627||52629<=o&&o<=52655||52657<=o&&o<=52683||52685<=o&&o<=52711||52713<=o&&o<=52739||52741<=o&&o<=52767||52769<=o&&o<=52795||52797<=o&&o<=52823||52825<=o&&o<=52851||52853<=o&&o<=52879||52881<=o&&o<=52907||52909<=o&&o<=52935||52937<=o&&o<=52963||52965<=o&&o<=52991||52993<=o&&o<=53019||53021<=o&&o<=53047||53049<=o&&o<=53075||53077<=o&&o<=53103||53105<=o&&o<=53131||53133<=o&&o<=53159||53161<=o&&o<=53187||53189<=o&&o<=53215||53217<=o&&o<=53243||53245<=o&&o<=53271||53273<=o&&o<=53299||53301<=o&&o<=53327||53329<=o&&o<=53355||53357<=o&&o<=53383||53385<=o&&o<=53411||53413<=o&&o<=53439||53441<=o&&o<=53467||53469<=o&&o<=53495||53497<=o&&o<=53523||53525<=o&&o<=53551||53553<=o&&o<=53579||53581<=o&&o<=53607||53609<=o&&o<=53635||53637<=o&&o<=53663||53665<=o&&o<=53691||53693<=o&&o<=53719||53721<=o&&o<=53747||53749<=o&&o<=53775||53777<=o&&o<=53803||53805<=o&&o<=53831||53833<=o&&o<=53859||53861<=o&&o<=53887||53889<=o&&o<=53915||53917<=o&&o<=53943||53945<=o&&o<=53971||53973<=o&&o<=53999||54001<=o&&o<=54027||54029<=o&&o<=54055||54057<=o&&o<=54083||54085<=o&&o<=54111||54113<=o&&o<=54139||54141<=o&&o<=54167||54169<=o&&o<=54195||54197<=o&&o<=54223||54225<=o&&o<=54251||54253<=o&&o<=54279||54281<=o&&o<=54307||54309<=o&&o<=54335||54337<=o&&o<=54363||54365<=o&&o<=54391||54393<=o&&o<=54419||54421<=o&&o<=54447||54449<=o&&o<=54475||54477<=o&&o<=54503||54505<=o&&o<=54531||54533<=o&&o<=54559||54561<=o&&o<=54587||54589<=o&&o<=54615||54617<=o&&o<=54643||54645<=o&&o<=54671||54673<=o&&o<=54699||54701<=o&&o<=54727||54729<=o&&o<=54755||54757<=o&&o<=54783||54785<=o&&o<=54811||54813<=o&&o<=54839||54841<=o&&o<=54867||54869<=o&&o<=54895||54897<=o&&o<=54923||54925<=o&&o<=54951||54953<=o&&o<=54979||54981<=o&&o<=55007||55009<=o&&o<=55035||55037<=o&&o<=55063||55065<=o&&o<=55091||55093<=o&&o<=55119||55121<=o&&o<=55147||55149<=o&&o<=55175||55177<=o&&o<=55203?10:9757==o||9977==o||9994<=o&&o<=9997||127877==o||127938<=o&&o<=127940||127943==o||127946<=o&&o<=127948||128066<=o&&o<=128067||128070<=o&&o<=128080||128110==o||128112<=o&&o<=128120||128124==o||128129<=o&&o<=128131||128133<=o&&o<=128135||128170==o||128372<=o&&o<=128373||128378==o||128400==o||128405<=o&&o<=128406||128581<=o&&o<=128583||128587<=o&&o<=128591||128675==o||128692<=o&&o<=128694||128704==o||128716==o||129304<=o&&o<=129308||129310<=o&&o<=129311||129318==o||129328<=o&&o<=129337||129341<=o&&o<=129342||129489<=o&&o<=129501?r:127995<=o&&o<=127999?14:8205==o?15:9792==o||9794==o||9877<=o&&o<=9878||9992==o||10084==o||127752==o||127806==o||127859==o||127891==o||127908==o||127912==o||127979==o||127981==o||128139==o||128187<=o&&o<=128188||128295==o||128300==o||128488==o||128640==o||128658==o?n:128102<=o&&o<=128105?a:11}return this.nextBreak=function(l,c){if(void 0===c&&(c=0),c<0)return 0;if(c>=l.length-1)return l.length;for(var u,d,h,p,f,m,g=s(o(l,c)),y=[],_=c+1;_<l.length;_++)if(m=_-1,!(55296<=(f=l).charCodeAt(m)&&f.charCodeAt(m)<=56319&&56320<=f.charCodeAt(m+1)&&f.charCodeAt(m+1)<=57343)){var v=s(o(l,_));if(u=v,d=void 0,h=(d=[f=g].concat(m=y).concat([u]))[d.length-2],p=u,1<(u=d.lastIndexOf(14))&&d.slice(1,u).every((function(t){return t==e}))&&-1==[e,r,a].indexOf(f)||(0<(f=d.lastIndexOf(t))&&d.slice(1,f).every((function(e){return e==t}))&&-1==[i,t].indexOf(h)?d.filter((function(e){return e==t})).length%2==1||4:(0!=h||1!=p)&&(2==h||0==h||1==h?14==p&&m.every((function(t){return t==e}))||1:2==p||0==p||1==p||(6!=h||6!=p&&7!=p&&9!=p&&10!=p)&&(9!=h&&7!=h||7!=p&&8!=p)&&(10!=h&&8!=h||8!=p)&&p!=e&&15!=p&&5!=p&&h!=i&&(f=-1!=d.indexOf(e)?d.lastIndexOf(e)-1:d.length-2,!(-1!=[r,a].indexOf(d[f])&&d.slice(1+f,-1).every((function(t){return t==e}))&&14==p||15==h&&-1!=[n,a].indexOf(p))&&(-1!=m.indexOf(t)||(h!=t||p!=t))))))return _;y.push(v)}return l.length},this.splitGraphemes=function(e){for(var t,i=[],r=0;(t=this.nextBreak(e,r))<e.length;)i.push(e.slice(r,t)),r=t;return r<e.length&&i.push(e.slice(r)),i},this.iterateGraphemes=function(e){var t=0,i={next:function(){var i,r;return(r=this.nextBreak(e,t))<e.length?(i=e.slice(t,r),t=r,{value:i,done:!1}):t<e.length?(i=e.slice(t),t=e.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return"undefined"!=typeof Symbol&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(e){for(var t,i=0,r=0;(t=this.nextBreak(e,r))<e.length;)r=t,i++;return r<e.length&&i++,i},this}function Glyph(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function GlyphTextureInfo(e,t,i){this.labelCollection=e,this.index=t,this.dimensions=i}var defaultLineSpacingPercent=1.2,whitePixelCanvasId="ID_WHITE_PIXEL",whitePixelSize=new Cartesian2(4,4),whitePixelBoundingRegion=new BoundingRectangle(1,1,1,1);function addWhitePixelCanvas(e,t){var i=document.createElement("canvas");i.width=whitePixelSize.x,i.height=whitePixelSize.y;var r=i.getContext("2d");r.fillStyle="#fff",r.fillRect(0,0,i.width,i.height),e.addImage(whitePixelCanvasId,i).then((function(e){t._whitePixelIndex=e}))}var writeTextToCanvasParameters={};function createGlyphCanvas(e,t,i,r,n,a,o){return writeTextToCanvasParameters.font=t,writeTextToCanvasParameters.fillColor=i,writeTextToCanvasParameters.strokeColor=r,writeTextToCanvasParameters.strokeWidth=n,writeTextToCanvasParameters.padding=SDFSettings$1.PADDING,o===VerticalOrigin$1.CENTER?writeTextToCanvasParameters.textBaseline="middle":o===VerticalOrigin$1.TOP?writeTextToCanvasParameters.textBaseline="top":writeTextToCanvasParameters.textBaseline="bottom",writeTextToCanvasParameters.fill=a===LabelStyle$1.FILL||a===LabelStyle$1.FILL_AND_OUTLINE,writeTextToCanvasParameters.stroke=a===LabelStyle$1.OUTLINE||a===LabelStyle$1.FILL_AND_OUTLINE,writeTextToCanvasParameters.backgroundColor=Color.BLACK,writeTextToCanvas(e,writeTextToCanvasParameters)}function unbindGlyph(e,t){t.textureInfo=void 0,t.dimensions=void 0;var i=t.billboard;defined(i)&&(i.show=!1,i.image=void 0,defined(i._removeCallbackFunc)&&(i._removeCallbackFunc(),i._removeCallbackFunc=void 0),e._spareBillboards.push(i),t.billboard=void 0)}function addGlyphToTextureAtlas(e,t,i,r){e.addImage(t,i).then((function(e){r.index=e}))}var splitter=new GraphemeSplitter;function rebindAllGlyphs$1(e,t){var i,r=t._renderedText,n=splitter.splitGraphemes(r),a=n.length,o=t._glyphs,s=o.length;if(t._relativeSize=t._fontSize/SDFSettings$1.FONT_SIZE,a<s)for(i=a;i<s;++i)unbindGlyph(e,o[i]);o.length=a;var l=t._showBackground&&0<r.split("\n").join("").length,c=t._backgroundBillboard;r=e._backgroundBillboardCollection;l?(defined(c)||(c=r.add({collection:e,image:whitePixelCanvasId,imageSubRegion:whitePixelBoundingRegion}),t._backgroundBillboard=c),c.color=t._backgroundColor,c.show=t._show,c.position=t._position,c.eyeOffset=t._eyeOffset,c.pixelOffset=t._pixelOffset,c.horizontalOrigin=HorizontalOrigin$1.LEFT,c.verticalOrigin=t._verticalOrigin,c.heightReference=t._heightReference,c.scale=t.totalScale,c.pickPrimitive=t,c.id=t._id,c.translucencyByDistance=t._translucencyByDistance,c.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,c.scaleByDistance=t._scaleByDistance,c.distanceDisplayCondition=t._distanceDisplayCondition,c.disableDepthTestDistance=t._disableDepthTestDistance):defined(c)&&(r.remove(c),t._backgroundBillboard=c=void 0);for(var u=e._glyphTextureCache,d=0;d<a;++d){var h=n[d],p=t._verticalOrigin,f=JSON.stringify([h,t._fontFamily,t._fontStyle,t._fontWeight,+p]);if(!defined(g=u[f])){var m=createGlyphCanvas(h,t._fontStyle+" "+t._fontWeight+" "+SDFSettings$1.FONT_SIZE+"px "+t._fontFamily,Color.WHITE,Color.WHITE,0,LabelStyle$1.FILL,p),g=new GlyphTextureInfo(e,-1,m.dimensions);if(u[f]=g,0<m.width&&0<m.height){for(var y=calcSDF(m,{cutoff:SDFSettings$1.CUTOFF,radius:SDFSettings$1.RADIUS}),_=(p=m.getContext("2d"),m.width),v=m.height,C=p.getImageData(0,0,_,v),x=0;x<_;x++)for(var b=0;b<v;b++){var S=255*y[T=b*_+x],T=4*T;C.data[0+T]=S,C.data[1+T]=S,C.data[2+T]=S,C.data[3+T]=S}p.putImageData(C,0,0)," "!==h&&addGlyphToTextureAtlas(e._textureAtlas,f,m,g)}}defined(h=o[d])?-1===g.index?unbindGlyph(e,h):defined(h.textureInfo)&&(h.textureInfo=void 0):(h=new Glyph,o[d]=h),h.textureInfo=g,h.dimensions=g.dimensions,-1!==g.index&&(m=h.billboard,g=e._spareBillboards,defined(m)||(0<g.length?m=g.pop():((m=e._billboardCollection.add({collection:e}))._labelDimensions=new Cartesian2,m._labelTranslate=new Cartesian2),h.billboard=m),m.show=t._show,m.position=t._position,m.eyeOffset=t._eyeOffset,m.pixelOffset=t._pixelOffset,m.horizontalOrigin=HorizontalOrigin$1.LEFT,m.verticalOrigin=t._verticalOrigin,m.heightReference=t._heightReference,m.scale=t.totalScale,m.pickPrimitive=t,m.id=t._id,m.image=f,m.translucencyByDistance=t._translucencyByDistance,m.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,m.scaleByDistance=t._scaleByDistance,m.distanceDisplayCondition=t._distanceDisplayCondition,m.disableDepthTestDistance=t._disableDepthTestDistance,m._batchIndex=t._batchIndex,m.outlineColor=t.outlineColor,t.style===LabelStyle$1.FILL_AND_OUTLINE?(m.color=t._fillColor,m.outlineWidth=t.outlineWidth):t.style===LabelStyle$1.FILL?(m.color=t._fillColor,m.outlineWidth=0):t.style===LabelStyle$1.OUTLINE&&(m.color=Color.TRANSPARENT,m.outlineWidth=t.outlineWidth))}t._repositionAllGlyphs=!0}function calculateWidthOffset(e,t,i){return t===HorizontalOrigin$1.CENTER?-e/2:t===HorizontalOrigin$1.RIGHT?-(e+i.x):i.x}var glyphPixelOffset=new Cartesian2,scratchBackgroundPadding=new Cartesian2;function repositionAllGlyphs$1(e){var t=e._glyphs,i=e._renderedText,r=0,n=0,a=[],o=Number.NEGATIVE_INFINITY,s=0,l=1,c=t.length,u=e._backgroundBillboard,d=Cartesian2.clone(defined(u)?e._backgroundPadding:Cartesian2.ZERO,scratchBackgroundPadding);for(d.x/=e._relativeSize,d.y/=e._relativeSize,A=0;A<c;++A)"\n"===i.charAt(A)?(a.push(r),++l,r=0):(T=(S=t[A]).dimensions,s=Math.max(s,T.height-T.descent),o=Math.max(o,T.descent),r+=T.width-T.bounds.minx,A<c-1&&(r+=t[A+1].dimensions.bounds.minx),n=Math.max(n,r));a.push(r);var h=s+o,p=e.totalScale,f=e._horizontalOrigin,m=e._verticalOrigin,g=0,y=calculateWidthOffset(a[g],f,d),_=(defined(e._lineHeight)?e._lineHeight:defaultLineSpacingPercent*e._fontSize)/e._relativeSize,v=_*(l-1),C=n,x=h+v;defined(u)&&(C+=2*d.x,x+=2*d.y,u._labelHorizontalOrigin=f),glyphPixelOffset.x=y*p;for(var b,S,T,E=!(glyphPixelOffset.y=0),w=0,A=0;A<c;++A)"\n"===i.charAt(A)?(w+=_,y=calculateWidthOffset(a[++g],f,d),glyphPixelOffset.x=y*p,E=!0):(T=(S=t[A]).dimensions,m===VerticalOrigin$1.TOP?(glyphPixelOffset.y=T.height-s-d.y,glyphPixelOffset.y+=SDFSettings$1.PADDING):m===VerticalOrigin$1.CENTER?glyphPixelOffset.y=(v+T.height-s)/2:(m===VerticalOrigin$1.BASELINE?glyphPixelOffset.y=v:glyphPixelOffset.y=v+o+d.y,glyphPixelOffset.y-=SDFSettings$1.PADDING),glyphPixelOffset.y=(glyphPixelOffset.y-T.descent-w)*p,E&&(glyphPixelOffset.x-=SDFSettings$1.PADDING*p,E=!1),defined(S.billboard)&&(S.billboard._setTranslate(glyphPixelOffset),S.billboard._labelDimensions.x=C,S.billboard._labelDimensions.y=x,S.billboard._labelHorizontalOrigin=f),A<c-1&&(b=t[A+1],glyphPixelOffset.x+=(T.width-T.bounds.minx+b.dimensions.bounds.minx)*p));if(defined(u)&&0<i.split("\n").join("").length&&(y=f===HorizontalOrigin$1.CENTER?-n/2-d.x:f===HorizontalOrigin$1.RIGHT?-(n+2*d.x):0,glyphPixelOffset.x=y*p,m===VerticalOrigin$1.TOP?glyphPixelOffset.y=h-s-o:m===VerticalOrigin$1.CENTER?glyphPixelOffset.y=(h-s)/2-o:m===VerticalOrigin$1.BASELINE?glyphPixelOffset.y=-d.y-o:glyphPixelOffset.y=0,glyphPixelOffset.y=glyphPixelOffset.y*p,u.width=C,u.height=x,u._setTranslate(glyphPixelOffset),u._labelTranslate=Cartesian2.clone(glyphPixelOffset,u._labelTranslate)),e.heightReference===HeightReference$1.CLAMP_TO_GROUND)for(A=0;A<c;++A){var P=(S=t[A]).billboard;defined(P)&&(P._labelTranslate=Cartesian2.clone(glyphPixelOffset,P._labelTranslate))}}function destroyLabel(e,t){for(var i=t._glyphs,r=0,n=i.length;r<n;++r)unbindGlyph(e,i[r]);defined(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,defined(t._removeCallbackFunc)&&t._removeCallbackFunc(),destroyObject(t)}function LabelCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._backgroundTextureAtlas=void 0,this._whitePixelIndex=void 0,this._backgroundBillboardCollection=new BillboardCollection({scene:this._scene}),this._backgroundBillboardCollection.destroyTextureAtlas=!1,this._billboardCollection=new BillboardCollection({scene:this._scene,batchTable:this._batchTable}),this._billboardCollection.destroyTextureAtlas=!1,this._billboardCollection._sdf=!0,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=Color.clone(Color.WHITE),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.blendOption=defaultValue(e.blendOption,BlendOption$1.OPAQUE_AND_TRANSLUCENT)}Object.defineProperties(LabelCollection.prototype,{length:{get:function(){return this._labels.length}}}),LabelCollection.prototype.add=function(e){return e=new Label(e,this),this._labels.push(e),this._labelsToUpdate.push(e),e},LabelCollection.prototype.remove=function(e){if(defined(e)&&e._labelCollection===this){var t=this._labels.indexOf(e);if(-1!==t)return this._labels.splice(t,1),destroyLabel(this,e),!0}return!1},LabelCollection.prototype.removeAll=function(){for(var e=this._labels,t=0,i=e.length;t<i;++t)destroyLabel(this,e[t]);e.length=0},LabelCollection.prototype.contains=function(e){return defined(e)&&e._labelCollection===this},LabelCollection.prototype.get=function(e){return this._labels[e]},LabelCollection.prototype.update=function(e){var t=this._billboardCollection,i=this._backgroundBillboardCollection;t.modelMatrix=this.modelMatrix,t.debugShowBoundingVolume=this.debugShowBoundingVolume,i.modelMatrix=this.modelMatrix,i.debugShowBoundingVolume=this.debugShowBoundingVolume;var r=e.context;defined(this._textureAtlas)||(this._textureAtlas=new TextureAtlas({context:r}),t.textureAtlas=this._textureAtlas),defined(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new TextureAtlas({context:r,initialSize:whitePixelSize}),i.textureAtlas=this._backgroundTextureAtlas,addWhitePixelCanvas(this._backgroundTextureAtlas,this));for(var n=this._labelsToUpdate.length,a=0;a<n;++a){var o,s=this._labelsToUpdate[a];s.isDestroyed()||(o=s._glyphs.length,s._rebindAllGlyphs&&(rebindAllGlyphs$1(this,s),s._rebindAllGlyphs=!1),s._repositionAllGlyphs&&(repositionAllGlyphs$1(s),s._repositionAllGlyphs=!1),o=s._glyphs.length-o,this._totalGlyphCount+=o)}r=0<i.length?BlendOption$1.TRANSLUCENT:this.blendOption,t.blendOption=r,i.blendOption=r,t._highlightColor=this._highlightColor,i._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,i.update(e),t.update(e)},LabelCollection.prototype.isDestroyed=function(){return!1},LabelCollection.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),destroyObject(this)};var PolylineVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 position2DHigh;\nattribute vec3 position2DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 prevPosition2DHigh;\nattribute vec3 prevPosition2DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec3 nextPosition2DHigh;\nattribute vec3 nextPosition2DLow;\nattribute vec4 texCoordExpandAndBatchIndex;\nvarying vec2  v_st;\nvarying float v_width;\nvarying vec4 v_pickColor;\nvarying float v_polylineAngle;\nvoid main()\n{\nfloat texCoord = texCoordExpandAndBatchIndex.x;\nfloat expandDir = texCoordExpandAndBatchIndex.y;\nbool usePrev = texCoordExpandAndBatchIndex.z < 0.0;\nfloat batchTableIndex = texCoordExpandAndBatchIndex.w;\nvec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\nfloat width = widthAndShow.x + 0.5;\nfloat show = widthAndShow.y;\nif (width < 1.0)\n{\nshow = 0.0;\n}\nvec4 pickColor = batchTable_getPickColor(batchTableIndex);\nvec4 p, prev, next;\nif (czm_morphTime == 1.0)\n{\np = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);\nprev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);\nnext = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);\n}\nelse if (czm_morphTime == 0.0)\n{\np = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\nprev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);\nnext = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);\n}\nelse\n{\np = czm_columbusViewMorph(\nczm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),\nczm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),\nczm_morphTime);\nprev = czm_columbusViewMorph(\nczm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),\nczm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),\nczm_morphTime);\nnext = czm_columbusViewMorph(\nczm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),\nczm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),\nczm_morphTime);\n}\n#ifdef DISTANCE_DISPLAY_CONDITION\nvec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\nvec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);\nvec3 centerLow = centerLowAndRadius.xyz;\nfloat radius = centerLowAndRadius.w;\nvec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nvec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);\nlengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);\n}\nfloat nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;\nfloat farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\nshow = 0.0;\n}\n#endif\nfloat polylineAngle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\ngl_Position = czm_viewportOrthographic * positionWC * show;\nv_st.s = texCoord;\nv_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\nv_width = width;\nv_pickColor = pickColor;\nv_polylineAngle = polylineAngle;\n}\n";function Polyline(e,t){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._show=defaultValue(e.show,!0),this._width=defaultValue(e.width,1),this._loop=defaultValue(e.loop,!1),this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,defined(this._material)||(this._material=Material.fromType(Material.ColorType,{color:new Color(1,1,1,1)}));var i,r=e.positions;defined(r)||(r=[]),this._positions=r,this._actualPositions=arrayRemoveDuplicates(r,Cartesian3.equalsEpsilon),this._loop&&2<this._actualPositions.length&&(this._actualPositions===this._positions&&(this._actualPositions=r.slice()),this._actualPositions.push(Cartesian3.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,defined(t)&&(i=Matrix4.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=PolylinePipeline.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(NUMBER_OF_PROPERTIES$1),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=BoundingSphere.fromPoints(this._actualPositions),this._boundingVolumeWC=BoundingSphere.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new BoundingSphere}var POSITION_INDEX$2=Polyline.POSITION_INDEX=0,SHOW_INDEX$2=Polyline.SHOW_INDEX=1,WIDTH_INDEX=Polyline.WIDTH_INDEX=2,MATERIAL_INDEX=Polyline.MATERIAL_INDEX=3,POSITION_SIZE_INDEX=Polyline.POSITION_SIZE_INDEX=4,DISTANCE_DISPLAY_CONDITION$1=Polyline.DISTANCE_DISPLAY_CONDITION=5,NUMBER_OF_PROPERTIES$1=Polyline.NUMBER_OF_PROPERTIES=6;function makeDirty$1(e,t){++e._propertiesChanged[t];var i=e._polylineCollection;defined(i)&&(i._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(Polyline.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,makeDirty$1(this,SHOW_INDEX$2))}},positions:{get:function(){return this._positions},set:function(e){var t=arrayRemoveDuplicates(e,Cartesian3.equalsEpsilon);this._loop&&2<t.length&&(t===e&&(t=e.slice()),t.push(Cartesian3.clone(t[0]))),this._actualPositions.length===t.length&&this._actualPositions.length===this._length||makeDirty$1(this,POSITION_SIZE_INDEX),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=BoundingSphere.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=BoundingSphere.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),makeDirty$1(this,POSITION_INDEX$2),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,makeDirty$1(this,MATERIAL_INDEX))}},width:{get:function(){return this._width},set:function(e){e!==this._width&&(this._width=e,makeDirty$1(this,WIDTH_INDEX))}},loop:{get:function(){return this._loop},set:function(e){var t;e!==this._loop&&(t=this._actualPositions,e?2<t.length&&!Cartesian3.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(Cartesian3.clone(t[0]))):2<t.length&&Cartesian3.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,makeDirty$1(this,POSITION_SIZE_INDEX))}},id:{get:function(){return this._id},set:function(e){this._id=e,defined(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!defined(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){DistanceDisplayCondition.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition),makeDirty$1(this,DISTANCE_DISPLAY_CONDITION$1))}}}),Polyline.prototype.update=function(){var e=Matrix4.IDENTITY;defined(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var t=this._segments.positions.length,i=this._segments.lengths,r=0<this._propertiesChanged[POSITION_INDEX$2]||0<this._propertiesChanged[POSITION_SIZE_INDEX];if(Matrix4.equals(e,this._modelMatrix)&&!r||(this._segments=PolylinePipeline.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=BoundingSphere.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=Matrix4.clone(e,this._modelMatrix),this._segments.positions.length!==t)makeDirty$1(this,POSITION_SIZE_INDEX);else for(var n=i.length,a=0;a<n;++a)if(i[a]!==this._segments.lengths[a]){makeDirty$1(this,POSITION_SIZE_INDEX);break}},Polyline.prototype.getPickId=function(e){return defined(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId},Polyline.prototype._clean=function(){this._dirty=!1;for(var e=this._propertiesChanged,t=0;t<NUMBER_OF_PROPERTIES$1-1;++t)e[t]=0},Polyline.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var SHOW_INDEX$3=Polyline.SHOW_INDEX,WIDTH_INDEX$1=Polyline.WIDTH_INDEX,POSITION_INDEX$3=Polyline.POSITION_INDEX,MATERIAL_INDEX$1=Polyline.MATERIAL_INDEX,POSITION_SIZE_INDEX$1=Polyline.POSITION_SIZE_INDEX,DISTANCE_DISPLAY_CONDITION$2=Polyline.DISTANCE_DISPLAY_CONDITION,NUMBER_OF_PROPERTIES$2=Polyline.NUMBER_OF_PROPERTIES,attributeLocations$1={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function PolylineCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(NUMBER_OF_PROPERTIES$2),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:BufferUsage$1.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=Color.clone(Color.WHITE);var t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}function createBatchTable$1(e,t){defined(e._batchTable)&&e._batchTable.destroy();var i=[{functionName:"batchTable_getWidthAndShow",componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2}];e._batchTable=new BatchTable(t,i,e._polylines.length)}Object.defineProperties(PolylineCollection.prototype,{length:{get:function(){return removePolylines(this),this._polylines.length}}}),PolylineCollection.prototype.add=function(e){return(e=new Polyline(e,this))._index=this._polylines.length,this._polylines.push(e),this._createVertexArray=!0,this._createBatchTable=!0,e},PolylineCollection.prototype.remove=function(e){var t;return!!this.contains(e)&&(this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,defined(e._bucket)&&((t=e._bucket).shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),e._destroy(),!0)},PolylineCollection.prototype.removeAll=function(){releaseShaders(this),destroyPolylines(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},PolylineCollection.prototype.contains=function(e){return defined(e)&&e._polylineCollection===this},PolylineCollection.prototype.get=function(e){return removePolylines(this),this._polylines[e]};var scratchUpdatePolylineEncodedCartesian=new EncodedCartesian3,scratchUpdatePolylineCartesian4=new Cartesian4,scratchNearFarCartesian2=new Cartesian2;PolylineCollection.prototype.update=function(e){if(removePolylines(this),0!==this._polylines.length){updateMode$1(this,e);var t,i=e.context,r=e.mapProjection,n=this._propertiesChanged;if(this._createBatchTable){if(0===ContextLimits.maximumVertexTextureImageUnits)throw new RuntimeError("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");createBatchTable$1(this,i),this._createBatchTable=!1}if(this._createVertexArray||computeNewBuffersUsage(this))createVertexArrays$1(this,i,r);else if(this._polylinesUpdated){var a=this._polylinesToUpdate;if(this._mode!==SceneMode$1.SCENE3D)for(var o=a.length,s=0;s<o;++s)(t=a[s]).update();if(n[POSITION_SIZE_INDEX$1]||n[MATERIAL_INDEX$1])createVertexArrays$1(this,i,r);else for(var l=a.length,c=this._polylineBuckets,u=0;u<l;++u){n=(t=a[u])._propertiesChanged;var d,h,p,f=t._bucket,m=0;for(d in c)if(c.hasOwnProperty(d)){if(c[d]===f){n[POSITION_INDEX$3]&&f.writeUpdate(m,t,this._positionBuffer,r);break}m+=c[d].lengthOfPositions}(n[SHOW_INDEX$3]||n[WIDTH_INDEX$1])&&this._batchTable.setBatchedAttribute(t._index,0,new Cartesian2(t._width,t._show)),2<this._batchTable.attributes.length&&((n[POSITION_INDEX$3]||n[POSITION_SIZE_INDEX$1])&&(p=e.mode===SceneMode$1.SCENE2D?t._boundingVolume2D:t._boundingVolumeWC,h=EncodedCartesian3.fromCartesian(p.center,scratchUpdatePolylineEncodedCartesian),p=Cartesian4.fromElements(h.low.x,h.low.y,h.low.z,p.radius,scratchUpdatePolylineCartesian4),this._batchTable.setBatchedAttribute(t._index,2,h.high),this._batchTable.setBatchedAttribute(t._index,3,p)),n[DISTANCE_DISPLAY_CONDITION$2]&&((h=scratchNearFarCartesian2).x=0,h.y=Number.MAX_VALUE,defined(p=t.distanceDisplayCondition)&&(h.x=p.near,h.y=p.far),this._batchTable.setBatchedAttribute(t._index,4,h))),t._clean()}a.length=0,this._polylinesUpdated=!1}n=this._propertiesChanged;for(var g=0;g<NUMBER_OF_PROPERTIES$2;++g)n[g]=0;var y=Matrix4.IDENTITY;e.mode===SceneMode$1.SCENE3D&&(y=this.modelMatrix);var _=e.passes;i=0!==e.morphTime;defined(this._opaqueRS)&&this._opaqueRS.depthTest.enabled===i||(this._opaqueRS=RenderState.fromCache({depthMask:i,depthTest:{enabled:i}})),defined(this._translucentRS)&&this._translucentRS.depthTest.enabled===i||(this._translucentRS=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND,depthMask:!i,depthTest:{enabled:i}})),this._batchTable.update(e),(_.render||_.pick)&&createCommandLists(this,e,this._colorCommands,y)}};var boundingSphereScratch=new BoundingSphere,boundingSphereScratch2=new BoundingSphere;function createCommandLists(e,t,i,r){for(var n=t.context,a=t.commandList,o=i.length,s=0,l=!0,c=e._vertexArrays,u=e.debugShowBoundingVolume,d=e._batchTable.getUniformMapCallback(),h=c.length,p=0;p<h;++p)for(var f=c[p],m=f.buckets,g=m.length,y=0;y<g;++y){for(var _,v,C,x,b=m[y],S=b.offset,T=b.bucket.shaderProgram,E=b.bucket.polylines,w=E.length,A=0,P=0;P<w;++P){var D,M=E[P],I=createMaterialId(M._material);I!==_&&(defined(_)&&0<A&&(D=v.isTranslucent(),o<=s?(C=new DrawCommand({owner:e}),i.push(C)):C=i[s],++s,x=combine(d(v._uniforms),e._uniformMap),C.boundingVolume=BoundingSphere.clone(boundingSphereScratch,C.boundingVolume),C.modelMatrix=r,C.shaderProgram=T,C.vertexArray=f.va,C.renderState=D?e._translucentRS:e._opaqueRS,C.pass=D?Pass$1.TRANSLUCENT:Pass$1.OPAQUE,C.debugShowBoundingVolume=u,C.pickId="v_pickColor",C.uniformMap=x,C.count=A,C.offset=S,S+=A,l=!(A=0),a.push(C)),(v=M._material).update(n),_=I);for(var R,O=M._locatorBuckets,L=O.length,N=0;N<L;++N){var F=O[N];F.locator===b&&(A+=F.count)}t.mode===SceneMode$1.SCENE3D?R=M._boundingVolumeWC:t.mode===SceneMode$1.COLUMBUS_VIEW?R=M._boundingVolume2D:t.mode===SceneMode$1.SCENE2D?defined(M._boundingVolume2D)&&((R=BoundingSphere.clone(M._boundingVolume2D,boundingSphereScratch2)).center.x=0):defined(M._boundingVolumeWC)&&defined(M._boundingVolume2D)&&(R=BoundingSphere.union(M._boundingVolumeWC,M._boundingVolume2D,boundingSphereScratch2)),l?(l=!1,BoundingSphere.clone(R,boundingSphereScratch)):BoundingSphere.union(R,boundingSphereScratch,boundingSphereScratch)}defined(_)&&0<A&&(o<=s?(C=new DrawCommand({owner:e}),i.push(C)):C=i[s],++s,x=combine(d(v._uniforms),e._uniformMap),C.boundingVolume=BoundingSphere.clone(boundingSphereScratch,C.boundingVolume),C.modelMatrix=r,C.shaderProgram=T,C.vertexArray=f.va,C.renderState=v.isTranslucent()?e._translucentRS:e._opaqueRS,C.pass=v.isTranslucent()?Pass$1.TRANSLUCENT:Pass$1.OPAQUE,C.debugShowBoundingVolume=u,C.pickId="v_pickColor",C.uniformMap=x,C.count=A,C.offset=S,l=!0,a.push(C)),_=void 0}i.length=s}function computeNewBuffersUsage(e){var t=!1,i=e._propertiesChanged;e=e._positionBufferUsage;return i[POSITION_INDEX$3]?(e.bufferUsage!==BufferUsage$1.STREAM_DRAW&&(t=!0,e.bufferUsage=BufferUsage$1.STREAM_DRAW),e.frameCount=100):e.bufferUsage!==BufferUsage$1.STATIC_DRAW&&(0===e.frameCount?(t=!0,e.bufferUsage=BufferUsage$1.STATIC_DRAW):e.frameCount--),t}PolylineCollection.prototype.isDestroyed=function(){return!1},PolylineCollection.prototype.destroy=function(){return destroyVertexArrays(this),releaseShaders(this),destroyPolylines(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)};var emptyVertexBuffer=[0,0,0];function createVertexArrays$1(e,t,i){e._createVertexArray=!1,releaseShaders(e),destroyVertexArrays(e),sortPolylinesIntoBuckets(e);var r,n,a=[[]],o=a[0],s=e._batchTable,l=e._useHighlightColor,c=[0],u=0,d=[[]],h=0,p=e._polylineBuckets;for(r in p)p.hasOwnProperty(r)&&((n=p[r]).updateShader(t,s,l),h+=n.lengthOfPositions);if(0<h){var f,m,g=e._mode,y=new Float32Array(6*h*3),_=new Float32Array(4*h),v=0,C=0,x=0;for(r in p)p.hasOwnProperty(r)&&((n=p[r]).write(y,_,v,C,x,s,t,i),g===SceneMode$1.MORPHING&&(defined(f)||(f=new Float32Array(6*h*3)),n.writeForMorph(f,v)),v+=6*(m=n.lengthOfPositions)*3,C+=4*m,x+=4*m,u=n.updateIndices(a,c,d,u));var b,S=e._positionBufferUsage.bufferUsage,T=BufferUsage$1.STATIC_DRAW;e._positionBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:y,usage:S}),defined(f)&&(b=Buffer$1.createVertexBuffer({context:t,typedArray:f,usage:S})),e._texCoordExpandAndBatchIndexBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:_,usage:T});for(var E,w,A,P,D,M,I,R,O,L,N,F=3*Float32Array.BYTES_PER_ELEMENT,B=4*Float32Array.BYTES_PER_ELEMENT,V=0,k=a.length,z=0;z<k;++z)0<(o=a[z]).length&&(L=new Uint16Array(o),N=Buffer$1.createIndexBuffer({context:t,typedArray:L,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT}),V+=c[z],M=F+(D=F+(P=F+(A=F+(w=F+(E=6*(z*(F*CesiumMath.SIXTY_FOUR_KILOBYTES)-V*F)))))),L=z*(B*CesiumMath.SIXTY_FOUR_KILOBYTES)-V*B,M=[{index:attributeLocations$1.position3DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:E,strideInBytes:6*F},{index:attributeLocations$1.position3DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:w,strideInBytes:6*F},{index:attributeLocations$1.position2DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:E,strideInBytes:6*F},{index:attributeLocations$1.position2DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:w,strideInBytes:6*F},{index:attributeLocations$1.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:A,strideInBytes:6*F},{index:attributeLocations$1.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:P,strideInBytes:6*F},{index:attributeLocations$1.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:A,strideInBytes:6*F},{index:attributeLocations$1.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:P,strideInBytes:6*F},{index:attributeLocations$1.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:D,strideInBytes:6*F},{index:attributeLocations$1.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:M,strideInBytes:6*F},{index:attributeLocations$1.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:D,strideInBytes:6*F},{index:attributeLocations$1.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:M,strideInBytes:6*F},{index:attributeLocations$1.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:L}],L=g===SceneMode$1.SCENE3D?(I=e._positionBuffer,R="vertexBuffer",O=emptyVertexBuffer,"value"):(R=g===SceneMode$1.SCENE2D||g===SceneMode$1.COLUMBUS_VIEW?(I=emptyVertexBuffer,"value"):(I=b,"vertexBuffer"),O=e._positionBuffer,"vertexBuffer"),M[0][R]=I,M[1][R]=I,M[2][L]=O,M[3][L]=O,M[4][R]=I,M[5][R]=I,M[6][L]=O,M[7][L]=O,M[8][R]=I,M[9][R]=I,M[10][L]=O,M[11][L]=O,N=new VertexArray({context:t,attributes:M,indexBuffer:N}),e._vertexArrays.push({va:N,buckets:d[z]}))}}function replacer(e,t){return t instanceof Texture?t.id:t}var scratchUniformArray$1=[];function createMaterialId(e){var t=Material._uniformList[e.type],i=t.length;scratchUniformArray$1.length=2*i;for(var r=0,n=0;n<i;++n){var a=t[n];scratchUniformArray$1[r]=a,scratchUniformArray$1[r+1]=e._uniforms[a](),r+=2}return e.type+":"+JSON.stringify(scratchUniformArray$1,replacer)}function sortPolylinesIntoBuckets(e){for(var t=e._mode,i=e._modelMatrix,r=e._polylineBuckets={},n=e._polylines,a=n.length,o=0;o<a;++o){var s,l,c=n[o];1<c._actualPositions.length&&(c.update(),defined(l=r[(s=c.material).type])||(l=r[s.type]=new PolylineBucket(s,t,i)),l.addPolyline(c))}}function updateMode$1(e,t){t=t.mode,e._mode===t&&Matrix4.equals(e._modelMatrix,e.modelMatrix)||(e._mode=t,e._modelMatrix=Matrix4.clone(e.modelMatrix),e._createVertexArray=!0)}function removePolylines(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;for(var t,i=[],r=[],n=0,a=e._polylines.length,o=0;o<a;++o)(t=e._polylines[o]).isDestroyed||(t._index=n++,r.push(t),i.push(t));e._polylines=i,e._polylinesToUpdate=r}}function releaseShaders(e){for(var t,i=e._polylines,r=i.length,n=0;n<r;++n)i[n].isDestroyed||defined(t=i[n]._bucket)&&(t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy())}function destroyVertexArrays(e){for(var t=e._vertexArrays.length,i=0;i<t;++i)e._vertexArrays[i].va.destroy();e._vertexArrays.length=0}function destroyPolylines(e){for(var t=e._polylines,i=t.length,r=0;r<i;++r)t[r].isDestroyed||t[r]._destroy()}function VertexArrayBucketLocator(e,t,i){this.count=e,this.offset=t,this.bucket=i}function PolylineBucket(e,t,i){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=i}function intersectsIDL(e){return Cartesian3.dot(Cartesian3.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(Plane.ORIGIN_ZX_PLANE)===Intersect$1.INTERSECTING}PolylineCollection.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]},PolylineBucket.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this},PolylineBucket.prototype.updateShader=function(e,t,i){var r;defined(this.shaderProgram)||(r=["DISTANCE_DISPLAY_CONDITION"],i&&r.push("VECTOR_TILE"),-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&r.push("POLYLINE_DASH"),FeatureDetection.isInternetExplorer()||r.push("CLIP_POLYLINE"),i=new ShaderSource({defines:r,sources:["varying vec4 v_pickColor;\n",this.material.shaderSource,PolylineFS]}),t=t.getVertexShaderCallback()(PolylineVS),t=new ShaderSource({defines:r,sources:[PolylineCommon,t]}),this.shaderProgram=ShaderProgram.fromCache({context:e,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:attributeLocations$1}))},PolylineBucket.prototype.getPolylinePositionsLength=function(e){if(this.mode===SceneMode$1.SCENE3D||!intersectsIDL(e))return 4*(r=e._actualPositions.length)-4;for(var t=0,i=e._segments.lengths,r=i.length,n=0;n<r;++n)t+=4*i[n]-4;return t};var scratchWritePosition=new Cartesian3,scratchWritePrevPosition=new Cartesian3,scratchWriteNextPosition=new Cartesian3,scratchWriteVector=new Cartesian3,scratchPickColorCartesian=new Cartesian4,scratchWidthShowCartesian=new Cartesian2;PolylineBucket.prototype.write=function(e,t,i,r,n,a,o,s){for(var l=this.mode,c=s.ellipsoid.maximumRadius*CesiumMath.PI,u=this.polylines,d=u.length,h=0;h<d;++h){for(var p,f=u[h],m=f.width,g=f.show&&0<m,y=f._index,_=this.getSegments(f,s),v=_.positions,C=_.lengths,x=v.length,b=f.getPickId(o).color,S=0,T=0,E=0;E<x;++E){0===E?f._loop?p=v[x-2]:(p=scratchWriteVector,Cartesian3.subtract(v[0],v[1],p),Cartesian3.add(v[0],p,p)):p=v[E-1],Cartesian3.clone(p,scratchWritePrevPosition),Cartesian3.clone(v[E],scratchWritePosition),E===x-1?f._loop?p=v[1]:(p=scratchWriteVector,Cartesian3.subtract(v[x-1],v[x-2],p),Cartesian3.add(v[x-1],p,p)):p=v[E+1],Cartesian3.clone(p,scratchWriteNextPosition),E===T+(A=C[S])&&(T+=A,++S);var w=E-T==0,A=E===T+C[S]-1;l===SceneMode$1.SCENE2D&&(scratchWritePrevPosition.z=0,scratchWritePosition.z=0,scratchWriteNextPosition.z=0),l!==SceneMode$1.SCENE2D&&l!==SceneMode$1.MORPHING||(w||A)&&c-Math.abs(scratchWritePosition.x)<1&&((scratchWritePosition.x<0&&0<scratchWritePrevPosition.x||0<scratchWritePosition.x&&scratchWritePrevPosition.x<0)&&Cartesian3.clone(scratchWritePosition,scratchWritePrevPosition),(scratchWritePosition.x<0&&0<scratchWriteNextPosition.x||0<scratchWritePosition.x&&scratchWriteNextPosition.x<0)&&Cartesian3.clone(scratchWritePosition,scratchWriteNextPosition));for(var P=A?2:4,D=w?2:0;D<P;++D){EncodedCartesian3.writeElements(scratchWritePosition,e,i),EncodedCartesian3.writeElements(scratchWritePrevPosition,e,i+6),EncodedCartesian3.writeElements(scratchWriteNextPosition,e,i+12);var M=D-2<0?-1:1;t[n]=E/(x-1),t[n+1]=D%2*2-1,t[n+2]=M,t[n+3]=y,i+=18,n+=4}}var I=scratchPickColorCartesian;I.x=Color.floatToByte(b.red),I.y=Color.floatToByte(b.green),I.z=Color.floatToByte(b.blue),I.w=Color.floatToByte(b.alpha);var R=scratchWidthShowCartesian;R.x=m,R.y=g?1:0,_=l===SceneMode$1.SCENE2D?f._boundingVolume2D:f._boundingVolumeWC,m=(b=EncodedCartesian3.fromCartesian(_.center,scratchUpdatePolylineEncodedCartesian)).high,g=Cartesian4.fromElements(b.low.x,b.low.y,b.low.z,_.radius,scratchUpdatePolylineCartesian4),(b=scratchNearFarCartesian2).x=0,b.y=Number.MAX_VALUE,defined(_=f.distanceDisplayCondition)&&(b.x=_.near,b.y=_.far),a.setBatchedAttribute(y,0,R),a.setBatchedAttribute(y,1,I),2<a.attributes.length&&(a.setBatchedAttribute(y,2,m),a.setBatchedAttribute(y,3,g),a.setBatchedAttribute(y,4,b))}};var morphPositionScratch=new Cartesian3,morphPrevPositionScratch=new Cartesian3,morphNextPositionScratch=new Cartesian3,morphVectorScratch=new Cartesian3;PolylineBucket.prototype.writeForMorph=function(e,t){for(var i=this.modelMatrix,r=this.polylines,n=r.length,a=0;a<n;++a)for(var o,s=r[a],l=s._segments.positions,c=s._segments.lengths,u=l.length,d=0,h=0,p=0;p<u;++p){0===p?s._loop?o=l[u-2]:(o=morphVectorScratch,Cartesian3.subtract(l[0],l[1],o),Cartesian3.add(l[0],o,o)):o=l[p-1],o=Matrix4.multiplyByPoint(i,o,morphPrevPositionScratch);var f,m=Matrix4.multiplyByPoint(i,l[p],morphPositionScratch);p===u-1?s._loop?f=l[1]:(f=morphVectorScratch,Cartesian3.subtract(l[u-1],l[u-2],f),Cartesian3.add(l[u-1],f,f)):f=l[p+1],f=Matrix4.multiplyByPoint(i,f,morphNextPositionScratch),p===h+(g=c[d])&&(h+=g,++d);for(var g=p-h==0,y=p===h+c[d]-1?2:4,_=g?2:0;_<y;++_)EncodedCartesian3.writeElements(m,e,t),EncodedCartesian3.writeElements(o,e,t+6),EncodedCartesian3.writeElements(f,e,t+12),t+=18}};var scratchSegmentLengths=new Array(1);PolylineBucket.prototype.updateIndices=function(e,t,i,r){var n=i.length-1,a=new VertexArrayBucketLocator(0,r,this);i[n].push(a);var o=0,s=e[e.length-1],l=0;0<s.length&&(l=s[s.length-1]+1);for(var c=this.polylines,u=c.length,d=0;d<u;++d){var h,p=c[d];if(p._locatorBuckets=[],this.mode===SceneMode$1.SCENE3D){h=scratchSegmentLengths;var f=p._actualPositions.length;if(!(0<f))continue;h[0]=f}else h=p._segments.lengths;var m=h.length;if(0<m){for(var g=0,y=0;y<m;++y)for(var _=h[y]-1,v=0;v<_;++v)l+4>CesiumMath.SIXTY_FOUR_KILOBYTES&&(p._locatorBuckets.push({locator:a,count:g}),g=0,t.push(4),s=[],e.push(s),l=0,a.count=o,a=new VertexArrayBucketLocator(r=o=0,0,this),i[++n]=[a]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),g+=6,o+=6,r+=6,l+=4;p._locatorBuckets.push({locator:a,count:g}),l+4>CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),l=0,a.count=o,a=new VertexArrayBucketLocator(o=r=0,0,this),i[++n]=[a])}p._clean()}return a.count=o,r},PolylineBucket.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,r=t.length,n=0;n<r;++n){var a=t[n];if(a===e)break;i+=a._actualLength}return i};var scratchSegments={positions:void 0,lengths:void 0},scratchLengths=new Array(1),pscratch=new Cartesian3,scratchCartographic$6=new Cartographic,scratchPositionsArray;function Vector3DTilePoints(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=void 0,this._labelCollection=void 0,this._polylineCollection=void 0,this._verticesPromise=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=when.defer(),this._resolvedPromise=!1}function packBuffer$1(e,t){var i=e._rectangle,r=e._minHeight,n=e._maxHeight,a=2+Rectangle.packedLength+Ellipsoid.packedLength;e=new Float64Array(a),a=0;return e[a++]=r,e[a++]=n,Rectangle.pack(i,e,2),a+=Rectangle.packedLength,Ellipsoid.pack(t,e,a),e}PolylineBucket.prototype.getSegments=function(e,t){var i=e._actualPositions;if(this.mode===SceneMode$1.SCENE3D)return scratchLengths[0]=i.length,scratchSegments.positions=i,scratchSegments.lengths=scratchLengths,scratchSegments;intersectsIDL(e)&&(i=e._segments.positions);for(var r,n,a=t.ellipsoid,o=[],s=this.modelMatrix,l=i.length,c=pscratch,u=0;u<l;++u)r=i[u],c=Matrix4.multiplyByPoint(s,r,c),o.push(t.project(a.cartesianToCartographic(c,scratchCartographic$6)));return 0<o.length&&(e._boundingVolume2D=BoundingSphere.fromPoints(o,e._boundingVolume2D),n=e._boundingVolume2D.center,e._boundingVolume2D.center=new Cartesian3(n.z,n.x,n.y)),scratchSegments.positions=o,scratchSegments.lengths=e._segments.lengths,scratchSegments},PolylineBucket.prototype.writeUpdate=function(e,t,i,r){var n=this.mode,a=r.ellipsoid.maximumRadius*CesiumMath.PI;if(f=t._actualLength){e+=this.getPolylineStartIndex(t);var o=scratchPositionsArray,s=6*f*3;!defined(o)||o.length<s?o=scratchPositionsArray=new Float32Array(s):o.length>s&&(o=new Float32Array(o.buffer,0,s));for(var l,c=(r=this.getSegments(t,r)).positions,u=r.lengths,d=0,h=0,p=0,f=c.length,m=0;m<f;++m){0===m?t._loop?l=c[f-2]:(l=scratchWriteVector,Cartesian3.subtract(c[0],c[1],l),Cartesian3.add(c[0],l,l)):l=c[m-1],Cartesian3.clone(l,scratchWritePrevPosition),Cartesian3.clone(c[m],scratchWritePosition),m===f-1?t._loop?l=c[1]:(l=scratchWriteVector,Cartesian3.subtract(c[f-1],c[f-2],l),Cartesian3.add(c[f-1],l,l)):l=c[m+1],Cartesian3.clone(l,scratchWriteNextPosition),m===p+(y=u[h])&&(p+=y,++h);var g=m-p==0,y=m===p+u[h]-1;n===SceneMode$1.SCENE2D&&(scratchWritePrevPosition.z=0,scratchWritePosition.z=0,scratchWriteNextPosition.z=0),n!==SceneMode$1.SCENE2D&&n!==SceneMode$1.MORPHING||(g||y)&&a-Math.abs(scratchWritePosition.x)<1&&((scratchWritePosition.x<0&&0<scratchWritePrevPosition.x||0<scratchWritePosition.x&&scratchWritePrevPosition.x<0)&&Cartesian3.clone(scratchWritePosition,scratchWritePrevPosition),(scratchWritePosition.x<0&&0<scratchWriteNextPosition.x||0<scratchWritePosition.x&&scratchWriteNextPosition.x<0)&&Cartesian3.clone(scratchWritePosition,scratchWriteNextPosition));for(var _=y?2:4,v=g?2:0;v<_;++v)EncodedCartesian3.writeElements(scratchWritePosition,o,d),EncodedCartesian3.writeElements(scratchWritePrevPosition,o,d+6),EncodedCartesian3.writeElements(scratchWriteNextPosition,o,d+12),d+=18}i.copyFromArrayView(o,18*Float32Array.BYTES_PER_ELEMENT*e)}},Object.defineProperties(Vector3DTilePoints.prototype,{pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}},readyPromise:{get:function(){return this._readyPromise.promise}}});var createVerticesTaskProcessor$1=new TaskProcessor("createVectorTilePoints"),scratchPosition$8=new Cartesian3;function createPoints(e,t){if(!defined(e._billboardCollection)){var i;if(!defined(e._verticesPromise)){i=e._positions,defined(n=e._packedBuffer)||(i=e._positions=arraySlice(i),e._batchIds=arraySlice(e._batchIds),n=e._packedBuffer=packBuffer$1(e,t));var r=[i.buffer,n.buffer],n={positions:i.buffer,packedBuffer:n.buffer};if(!defined(r=e._verticesPromise=createVerticesTaskProcessor$1.scheduleTask(n,r)))return;r.then((function(t){e._positions=new Float64Array(t.positions),e._ready=!0}))}if(e._ready&&!defined(e._billboardCollection)){i=e._positions;r=e._batchTable;var a=e._batchIds,o=e._billboardCollection=new BillboardCollection({batchTable:r}),s=e._labelCollection=new LabelCollection({batchTable:r}),l=e._polylineCollection=new PolylineCollection;l._useHighlightColor=!0;for(var c=i.length/3,u=0;u<c;++u){var d=a[u],h=Cartesian3.unpack(i,3*u,scratchPosition$8),p=o.add();p.position=h,p._batchIndex=d,(p=s.add()).text=" ",p.position=h,p._batchIndex=d,l.add().positions=[Cartesian3.clone(h),Cartesian3.clone(h)]}e._positions=void 0,e._packedBuffer=void 0}}}function clearStyle$1(e,t){for(var i=e._batchIds,r=i.length,n=0;n<r;++n){var a=t[i[n]];a.show=!0,a.pointSize=Cesium3DTilePointFeature.defaultPointSize,a.color=Cesium3DTilePointFeature.defaultColor,a.pointOutlineColor=Cesium3DTilePointFeature.defaultPointOutlineColor,a.pointOutlineWidth=Cesium3DTilePointFeature.defaultPointOutlineWidth,a.labelColor=Color.WHITE,a.labelOutlineColor=Color.WHITE,a.labelOutlineWidth=1,a.font="30px sans-serif",a.labelStyle=LabelStyle$1.FILL,a.labelText=void 0,a.backgroundColor=new Color(.165,.165,.165,.8),a.backgroundPadding=new Cartesian2(7,5),a.backgroundEnabled=!1,a.scaleByDistance=void 0,a.translucencyByDistance=void 0,a.distanceDisplayCondition=void 0,a.heightOffset=0,a.anchorLineEnabled=!1,a.anchorLineColor=Color.WHITE,a.image=void 0,a.disableDepthTestDistance=0,a.horizontalOrigin=HorizontalOrigin$1.CENTER,a.verticalOrigin=VerticalOrigin$1.CENTER,a.labelHorizontalOrigin=HorizontalOrigin$1.RIGHT,a.labelVerticalOrigin=VerticalOrigin$1.BASELINE}}Vector3DTilePoints.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,r=this._labelCollection,n=this._polylineCollection,a=this._batchIds,o=a.length,s=0;s<o;++s){var l=a[s],c=i.get(s),u=r.get(s),d=n.get(s);t[l]=new Cesium3DTilePointFeature(e,l,c,u,d)}},Vector3DTilePoints.prototype.applyDebugSettings=function(e,t){e?(Color.clone(t,this._billboardCollection._highlightColor),Color.clone(t,this._labelCollection._highlightColor),Color.clone(t,this._polylineCollection._highlightColor)):(Color.clone(Color.WHITE,this._billboardCollection._highlightColor),Color.clone(Color.WHITE,this._labelCollection._highlightColor),Color.clone(Color.WHITE,this._polylineCollection._highlightColor))};var scratchColor$6=new Color,scratchColor2=new Color,scratchColor3=new Color,scratchColor4=new Color,scratchColor5=new Color,scratchColor6=new Color,scratchScaleByDistance=new NearFarScalar,scratchTranslucencyByDistance=new NearFarScalar,scratchDistanceDisplayCondition=new DistanceDisplayCondition;function Vector3DTilePolygons(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=defaultValue(e.center,Cartesian3.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._readyPromise=when.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=ClassificationType$1.BOTH}function packBuffer$2(e){var t=new Float64Array(3+Cartesian3.packedLength+Ellipsoid.packedLength+Rectangle.packedLength),i=0;return t[i++]=e._indices.BYTES_PER_ELEMENT,t[i++]=e._minimumHeight,t[i++]=e._maximumHeight,Cartesian3.pack(e._center,t,3),i+=Cartesian3.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,Rectangle.pack(e._rectangle,t,i),t}function unpackBuffer$1(e,t){for(var i=1,r=t[i++],n=e._boundingVolumes=new Array(r),a=0;a<r;++a)n[a]=OrientedBoundingBox.unpack(t,i),i+=OrientedBoundingBox.packedLength;for(var o=t[i++],s=e._batchedIndices=new Array(o),l=0;l<o;++l){var c=Color.unpack(t,i);i+=Color.packedLength;for(var u=t[i++],d=t[i++],h=t[i++],p=new Array(h),f=0;f<h;++f)p[f]=t[i++];s[l]=new Vector3DTileBatch({color:c,offset:u,count:d,batchIds:p})}}Vector3DTilePoints.prototype.applyStyle=function(e,t){if(defined(e))for(var i=this._batchIds,r=i.length,n=0;n<r;++n){var a,o,s=t[i[n]];defined(e.show)&&(s.show=e.show.evaluate(s)),defined(e.pointSize)&&(s.pointSize=e.pointSize.evaluate(s)),defined(e.color)&&(s.color=e.color.evaluateColor(s,scratchColor$6)),defined(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,scratchColor2)),defined(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),defined(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,scratchColor3)),defined(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,scratchColor4)),defined(e.labelOutlineWidth)&&(s.labelOutlineWidth=e.labelOutlineWidth.evaluate(s)),defined(e.font)&&(s.font=e.font.evaluate(s)),defined(e.labelStyle)&&(s.labelStyle=e.labelStyle.evaluate(s)),defined(e.labelText)?s.labelText=e.labelText.evaluate(s):s.labelText=void 0,defined(e.backgroundColor)&&(s.backgroundColor=e.backgroundColor.evaluateColor(s,scratchColor5)),defined(e.backgroundPadding)&&(s.backgroundPadding=e.backgroundPadding.evaluate(s)),defined(e.backgroundEnabled)&&(s.backgroundEnabled=e.backgroundEnabled.evaluate(s)),defined(e.scaleByDistance)?(a=e.scaleByDistance.evaluate(s),scratchScaleByDistance.near=a.x,scratchScaleByDistance.nearValue=a.y,scratchScaleByDistance.far=a.z,scratchScaleByDistance.farValue=a.w,s.scaleByDistance=scratchScaleByDistance):s.scaleByDistance=void 0,defined(e.translucencyByDistance)?(o=e.translucencyByDistance.evaluate(s),scratchTranslucencyByDistance.near=o.x,scratchTranslucencyByDistance.nearValue=o.y,scratchTranslucencyByDistance.far=o.z,scratchTranslucencyByDistance.farValue=o.w,s.translucencyByDistance=scratchTranslucencyByDistance):s.translucencyByDistance=void 0,defined(e.distanceDisplayCondition)?(o=e.distanceDisplayCondition.evaluate(s),scratchDistanceDisplayCondition.near=o.x,scratchDistanceDisplayCondition.far=o.y,s.distanceDisplayCondition=scratchDistanceDisplayCondition):s.distanceDisplayCondition=void 0,defined(e.heightOffset)&&(s.heightOffset=e.heightOffset.evaluate(s)),defined(e.anchorLineEnabled)&&(s.anchorLineEnabled=e.anchorLineEnabled.evaluate(s)),defined(e.anchorLineColor)&&(s.anchorLineColor=e.anchorLineColor.evaluateColor(s,scratchColor6)),defined(e.image)?s.image=e.image.evaluate(s):s.image=void 0,defined(e.disableDepthTestDistance)&&(s.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(s)),defined(e.horizontalOrigin)&&(s.horizontalOrigin=e.horizontalOrigin.evaluate(s)),defined(e.verticalOrigin)&&(s.verticalOrigin=e.verticalOrigin.evaluate(s)),defined(e.labelHorizontalOrigin)&&(s.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(s)),defined(e.labelVerticalOrigin)&&(s.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(s))}else clearStyle$1(this,t)},Vector3DTilePoints.prototype.update=function(e){createPoints(this,e.mapProjection.ellipsoid),this._ready&&(this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e),this._resolvedPromise||(this._readyPromise.resolve(),this._resolvedPromise=!0))},Vector3DTilePoints.prototype.isDestroyed=function(){return!1},Vector3DTilePoints.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),destroyObject(this)},Object.defineProperties(Vector3DTilePolygons.prototype,{trianglesLength:{get:function(){return defined(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return defined(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}});var createVerticesTaskProcessor$2=new TaskProcessor("createVectorTilePolygons"),scratchColor$7=new Color;function createPrimitive$2(e){if(!defined(e._primitive)){if(!defined(e._verticesPromise)){var t=e._positions,i=e._counts,r=e._indexCounts,n=e._indices,a=e._transferrableBatchIds,o=e._batchTableColors,s=e._packedBuffer;if(!defined(o)){t=e._positions=arraySlice(e._positions),i=e._counts=arraySlice(e._counts),r=e._indexCounts=arraySlice(e._indexCounts),n=e._indices=arraySlice(e._indices),e._center=e._ellipsoid.cartographicToCartesian(Rectangle.center(e._rectangle)),a=e._transferrableBatchIds=new Uint32Array(e._batchIds),o=e._batchTableColors=new Uint32Array(a.length);for(var l=e._batchTable,c=o.length,u=0;u<c;++u){var d=l.getColor(u,scratchColor$7);o[u]=d.toRgba()}s=e._packedBuffer=packBuffer$2(e)}var h=[t.buffer,i.buffer,r.buffer,n.buffer,a.buffer,o.buffer,s.buffer];r={packedBuffer:s.buffer,positions:t.buffer,counts:i.buffer,indexCounts:r.buffer,indices:n.buffer,batchIds:a.buffer,batchTableColors:o.buffer},n=e._polygonMinimumHeights,a=e._polygonMaximumHeights;if(defined(n)&&defined(a)&&(n=arraySlice(n),a=arraySlice(a),h.push(n.buffer,a.buffer),r.minimumHeights=n,r.maximumHeights=a),!defined(h=e._verticesPromise=createVerticesTaskProcessor$2.scheduleTask(r,h)))return;when(h,(function(t){e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;var i=new Float64Array(t.packedBuffer),r=i[0];unpackBuffer$1(e,i),e._indices=new(2===IndexDatatype$1.getSizeInBytes(r)?Uint16Array:Uint32Array)(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._batchedPositions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!defined(e._primitive)&&(e._primitive=new Vector3DTilePrimitive({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}Vector3DTilePolygons.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},Vector3DTilePolygons.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},Vector3DTilePolygons.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},Vector3DTilePolygons.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},Vector3DTilePolygons.prototype.update=function(e){createPrimitive$2(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},Vector3DTilePolygons.prototype.isDestroyed=function(){return!1},Vector3DTilePolygons.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)};var Vector3DTilePolylinesVS="attribute vec4 currentPosition;\nattribute vec4 previousPosition;\nattribute vec4 nextPosition;\nattribute vec2 expandAndWidth;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelView;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = u_modifiedModelView * currentPosition;\nvec4 prev = u_modifiedModelView * previousPosition;\nvec4 next = u_modifiedModelView * nextPosition;\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\n}\n";function Vector3DTilePolylines(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=Color.clone(Color.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._readyPromise=when.defer(),this._verticesPromise=void 0}function packBuffer$3(e){var t=e._rectangle,i=e._minimumHeight,r=e._maximumHeight,n=e._ellipsoid,a=e._center,o=2+Rectangle.packedLength+Ellipsoid.packedLength+Cartesian3.packedLength;e=new Float64Array(o),o=0;return e[o++]=i,e[o++]=r,Rectangle.pack(t,e,2),o+=Rectangle.packedLength,Ellipsoid.pack(n,e,o),o+=Ellipsoid.packedLength,Cartesian3.pack(a,e,o),e}Object.defineProperties(Vector3DTilePolylines.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},readyPromise:{get:function(){return this._readyPromise.promise}}});var createVerticesTaskProcessor$3=new TaskProcessor("createVectorTilePolylines"),attributeLocations$2={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function createVertexArray$4(e,t){if(!defined(e._va)){if(!defined(e._verticesPromise)){var i=e._positions,r=e._widths,n=e._counts,a=e._transferrableBatchIds,o=e._packedBuffer;defined(o)||(i=e._positions=arraySlice(i),r=e._widths=arraySlice(r),n=e._counts=arraySlice(n),a=e._transferrableBatchIds=arraySlice(e._batchIds),o=e._packedBuffer=packBuffer$3(e));var s=[i.buffer,r.buffer,n.buffer,a.buffer,o.buffer],l={positions:i.buffer,widths:r.buffer,counts:n.buffer,batchIds:a.buffer,packedBuffer:o.buffer};if(!defined(i=e._verticesPromise=createVerticesTaskProcessor$3.scheduleTask(l,s)))return;when(i,(function(t){e._currentPositions=new Float32Array(t.currentPositions),e._previousPositions=new Float32Array(t.previousPositions),e._nextPositions=new Float32Array(t.nextPositions),e._expandAndWidth=new Float32Array(t.expandAndWidth),e._vertexBatchIds=new Uint16Array(t.batchIds);var i=t.indexDatatype;e._indices=new(i===IndexDatatype$1.UNSIGNED_SHORT?Uint16Array:Uint32Array)(t.indices),e._ready=!0}))}e._ready&&!defined(e._va)&&(r=e._currentPositions,n=e._previousPositions,a=e._nextPositions,o=e._expandAndWidth,l=e._vertexBatchIds,s=e._indices,i=n.byteLength+r.byteLength+a.byteLength,i+=o.byteLength+l.byteLength+s.byteLength,e._trianglesLength=s.length/3,e._geometryByteLength=i,n=Buffer$1.createVertexBuffer({context:t,typedArray:n,usage:BufferUsage$1.STATIC_DRAW}),r=Buffer$1.createVertexBuffer({context:t,typedArray:r,usage:BufferUsage$1.STATIC_DRAW}),a=Buffer$1.createVertexBuffer({context:t,typedArray:a,usage:BufferUsage$1.STATIC_DRAW}),o=Buffer$1.createVertexBuffer({context:t,typedArray:o,usage:BufferUsage$1.STATIC_DRAW}),l=Buffer$1.createVertexBuffer({context:t,typedArray:l,usage:BufferUsage$1.STATIC_DRAW}),s=Buffer$1.createIndexBuffer({context:t,typedArray:s,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:2===s.BYTES_PER_ELEMENT?IndexDatatype$1.UNSIGNED_SHORT:IndexDatatype$1.UNSIGNED_INT}),l=[{index:attributeLocations$2.previousPosition,vertexBuffer:n,componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{index:attributeLocations$2.currentPosition,vertexBuffer:r,componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{index:attributeLocations$2.nextPosition,vertexBuffer:a,componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{index:attributeLocations$2.expandAndWidth,vertexBuffer:o,componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2},{index:attributeLocations$2.a_batchId,vertexBuffer:l,componentDatatype:ComponentDatatype$1.UNSIGNED_SHORT,componentsPerAttribute:1}],e._va=new VertexArray({context:t,attributes:l,indexBuffer:s}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0,e._readyPromise.resolve())}}var modifiedModelViewScratch$2=new Matrix4,rtcScratch$2=new Cartesian3;function createUniformMap$3(e,t){defined(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){var i=t.uniformState.view;return Matrix4.clone(i,modifiedModelViewScratch$2),Matrix4.multiplyByPoint(modifiedModelViewScratch$2,e._center,rtcScratch$2),Matrix4.setTranslation(modifiedModelViewScratch$2,rtcScratch$2,modifiedModelViewScratch$2),modifiedModelViewScratch$2},u_highlightColor:function(){return e._highlightColor}})}function createRenderStates$4(e){defined(e._rs)||(e._rs=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}}))}var PolylineFS$1="uniform vec4 u_highlightColor; \nvoid main()\n{\n    gl_FragColor = u_highlightColor;\n}\n";function createShaders$2(e,t){var i,r;defined(e._sp)||(i=(r=e._batchTable).getVertexShaderCallback(!1,"a_batchId",void 0)(Vector3DTilePolylinesVS),r=r.getFragmentShaderCallback()(PolylineFS$1,!1,void 0),i=new ShaderSource({defines:["VECTOR_TILE",FeatureDetection.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[PolylineCommon,i]}),r=new ShaderSource({defines:["VECTOR_TILE"],sources:[r]}),e._sp=ShaderProgram.fromCache({context:t,vertexShaderSource:i,fragmentShaderSource:r,attributeLocations:attributeLocations$2}))}function queueCommands$1(e,t){var i;defined(e._command)||(i=e._batchTable.getUniformMapCallback()(e._uniformMap),e._command=new DrawCommand({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:i,boundingVolume:e._boundingVolume,pass:Pass$1.TRANSLUCENT,pickId:e._batchTable.getPickId()})),t.commandList.push(e._command)}function clearStyle$2(e,t){for(var i=e._batchIds,r=i.length,n=0;n<r;++n){var a=t[i[n]];a.show=!0,a.color=Color.WHITE}}Vector3DTilePolylines.prototype.createFeatures=function(e,t){for(var i=this._batchIds,r=i.length,n=0;n<r;++n){var a=i[n];t[a]=new Cesium3DTileFeature(e,a)}},Vector3DTilePolylines.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var scratchColor$8=new Color,DEFAULT_COLOR_VALUE$2=Color.WHITE,DEFAULT_SHOW_VALUE$2=!0;function Vector3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._contentReadyPromise=void 0,this._readyPromise=when.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,initialize$8(this,r,n)}function createColorChangedCallback$2(e){return function(t,i){defined(e._polygons)&&e._polygons.updateCommands(t,i)}}function getBatchIds$1(e,t){var i,r,n,a,o,s=defaultValue(e.POLYGONS_LENGTH,0),l=defaultValue(e.POLYLINES_LENGTH,0),c=defaultValue(e.POINTS_LENGTH,0);0<s&&defined(e.POLYGON_BATCH_IDS)&&(n=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset,r=new Uint16Array(t.buffer,n,s)),0<l&&defined(e.POLYLINE_BATCH_IDS)&&(n=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset,a=new Uint16Array(t.buffer,n,l)),0<c&&defined(e.POINT_BATCH_IDS)&&(u=t.byteOffset+e.POINT_BATCH_IDS.byteOffset,o=new Uint16Array(t.buffer,u,c));t=defined(r)||defined(a)||defined(o);var u=0<s&&!defined(r)||0<l&&!defined(a)||0<c&&!defined(o);if(t&&u)throw new RuntimeError("If one group of batch ids is defined, then all batch ids must be defined.");if(!defined(r)&&!defined(a)&&!defined(o)){var d=0;if(!defined(r)&&0<s)for(r=new Uint16Array(s),i=0;i<s;++i)r[i]=d++;if(!defined(a)&&0<l)for(a=new Uint16Array(l),i=0;i<l;++i)a[i]=d++;if(!defined(o)&&0<c)for(o=new Uint16Array(c),i=0;i<c;++i)o[i]=d++}return{polygons:r,polylines:a,points:o}}Vector3DTilePolylines.prototype.applyStyle=function(e,t){if(defined(e))for(var i=this._batchIds,r=i.length,n=0;n<r;++n){var a=t[i[n]];a.color=defined(e.color)?e.color.evaluateColor(a,scratchColor$8):DEFAULT_COLOR_VALUE$2,a.show=defined(e.show)?e.show.evaluate(a):DEFAULT_SHOW_VALUE$2}else clearStyle$2(this,t)},Vector3DTilePolylines.prototype.update=function(e){var t=e.context;createVertexArray$4(this,t),createUniformMap$3(this,t),createShaders$2(this,t),createRenderStates$4(this),!this._ready||((t=e.passes).render||t.pick)&&queueCommands$1(this,e)},Vector3DTilePolylines.prototype.isDestroyed=function(){return!1},Vector3DTilePolylines.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),destroyObject(this)},Object.defineProperties(Vector3DTileContent.prototype,{featuresLength:{get:function(){return defined(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return defined(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){var e=0;return defined(this._polygons)&&(e+=this._polygons.trianglesLength),defined(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){var e=0;return defined(this._polygons)&&(e+=this._polygons.geometryByteLength),defined(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return defined(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return defined(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var sizeOfUint32$8=Uint32Array.BYTES_PER_ELEMENT;function initialize$8(e,t,i){i=defaultValue(i,0);var r=new Uint8Array(t),n=new DataView(t);if(i+=sizeOfUint32$8,1!==(y=n.getUint32(i,!0)))throw new RuntimeError("Only Vector tile version 1 is supported.  Version "+y+" is not.");i+=sizeOfUint32$8;var a=n.getUint32(i,!0);if(i+=sizeOfUint32$8,0!==a){var o=n.getUint32(i,!0);if(i+=sizeOfUint32$8,0===o)throw new RuntimeError("Feature table must have a byte length greater than zero");var s=n.getUint32(i,!0);i+=sizeOfUint32$8;var l=n.getUint32(i,!0);i+=sizeOfUint32$8;var c=n.getUint32(i,!0);i+=sizeOfUint32$8;var u=n.getUint32(i,!0);i+=sizeOfUint32$8;var d=n.getUint32(i,!0);i+=sizeOfUint32$8;var h=n.getUint32(i,!0);i+=sizeOfUint32$8;var p=n.getUint32(i,!0),f=getStringFromTypedArray(r,i+=sizeOfUint32$8,o),m=JSON.parse(f);i+=o;var g=new Uint8Array(t,i,s);i+=s,0<l&&(v=getStringFromTypedArray(r,i,l),C=JSON.parse(v),i+=l,0<c&&(x=new Uint8Array(t,i,c),x=new Uint8Array(x),i+=c));var y=defaultValue(m.POLYGONS_LENGTH,0),_=defaultValue(m.POLYLINES_LENGTH,0);f=new Cesium3DTileBatchTable(e,n=y+_+(a=defaultValue(m.POINTS_LENGTH,0)),C,x,createColorChangedCallback$2(e));if(e._batchTable=f,0!==n){if(!defined(s=(o=new Cesium3DTileFeatureTable(m,g)).getGlobalProperty("REGION")))throw new RuntimeError("Feature table global property: REGION must be defined");r=Rectangle.unpack(s);var v=s[4],C=(l=s[5],c=e._tile.computedTransform,o.getGlobalProperty("RTC_CENTER",ComponentDatatype$1.FLOAT,3));defined(C)?(C=Cartesian3.unpack(C),Matrix4.multiplyByPoint(c,C,C)):((C=Rectangle.center(r)).height=CesiumMath.lerp(v,l,.5),C=Ellipsoid.WGS84.cartographicToCartesian(C));var x=getBatchIds$1(m,g);if(i+=i%4,0<y){if(o.featuresLength=y,!defined(n=defaultValue(o.getPropertyArray("POLYGON_COUNTS",ComponentDatatype$1.UNSIGNED_INT,1),o.getPropertyArray("POLYGON_COUNT",ComponentDatatype$1.UNSIGNED_INT,1))))throw new RuntimeError("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");if(!defined(s=defaultValue(o.getPropertyArray("POLYGON_INDEX_COUNTS",ComponentDatatype$1.UNSIGNED_INT,1),o.getPropertyArray("POLYGON_INDEX_COUNT",ComponentDatatype$1.UNSIGNED_INT,1))))throw new RuntimeError("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");g=n.reduce((function(e,t){return e+2*t}),0),y=s.reduce((function(e,t){return e+t}),0),y=new Uint32Array(t,i,y),i+=u;var b,S;g=new Uint16Array(t,i,g);i+=d,defined(m.POLYGON_MINIMUM_HEIGHTS)&&defined(m.POLYGON_MAXIMUM_HEIGHTS)&&(b=o.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",ComponentDatatype$1.FLOAT,1),S=o.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",ComponentDatatype$1.FLOAT,1)),e._polygons=new Vector3DTilePolygons({positions:g,counts:n,indexCounts:s,indices:y,minimumHeight:v,maximumHeight:l,polygonMinimumHeights:b,polygonMaximumHeights:S,center:C,rectangle:r,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:f,batchIds:x.polygons,modelMatrix:c})}if(0<_){if(o.featuresLength=_,!defined(c=defaultValue(o.getPropertyArray("POLYLINE_COUNTS",ComponentDatatype$1.UNSIGNED_INT,1),o.getPropertyArray("POLYLINE_COUNT",ComponentDatatype$1.UNSIGNED_INT,1))))throw new RuntimeError("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");var T=o.getPropertyArray("POLYLINE_WIDTHS",ComponentDatatype$1.UNSIGNED_SHORT,1);if(!defined(T)){T=new Uint16Array(_);for(var E=0;E<_;++E)T[E]=2}o=c.reduce((function(e,t){return e+3*t}),0),o=new Uint16Array(t,i,o),i+=h,e._polylines=new Vector3DTilePolylines({positions:o,widths:T,counts:c,batchIds:x.polylines,minimumHeight:v,maximumHeight:l,center:C,rectangle:r,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:f})}0<a&&(a=new Uint16Array(t,i,3*a),i+=p,e._points=new Vector3DTilePoints({positions:a,batchIds:x.points,minimumHeight:v,maximumHeight:l,rectangle:r,batchTable:f}))}}else e._readyPromise.resolve(e)}function createFeatures$4(e){var t=e.featuresLength;!defined(e._features)&&0<t&&(t=new Array(t),defined(e._polygons)&&e._polygons.createFeatures(e,t),defined(e._polylines)&&e._polylines.createFeatures(e,t),defined(e._points)&&e._points.createFeatures(e,t),e._features=t)}Vector3DTileContent.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Vector3DTileContent.prototype.getFeature=function(e){return createFeatures$4(this),this._features[e]},Vector3DTileContent.prototype.applyDebugSettings=function(e,t){defined(this._polygons)&&this._polygons.applyDebugSettings(e,t),defined(this._polylines)&&this._polylines.applyDebugSettings(e,t),defined(this._points)&&this._points.applyDebugSettings(e,t)},Vector3DTileContent.prototype.applyStyle=function(e){createFeatures$4(this),defined(this._polygons)&&this._polygons.applyStyle(e,this._features),defined(this._polylines)&&this._polylines.applyStyle(e,this._features),defined(this._points)&&this._points.applyStyle(e,this._features)},Vector3DTileContent.prototype.update=function(e,t){var i,r=!0;defined(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),r=r&&this._polygons._ready),defined(this._polylines)&&(this._polylines.update(t),r=r&&this._polylines._ready),defined(this._points)&&(this._points.update(t),r=r&&this._points._ready),defined(this._batchTable)&&r&&this._batchTable.update(e,t),defined(this._contentReadyPromise)||(r=defined(this._points)?this._points.readyPromise:void 0,e=defined(this._polygons)?this._polygons.readyPromise:void 0,t=defined(this._polylines)?this._polylines.readyPromise:void 0,(i=this)._contentReadyPromise=when.all([r,e,t]).then((function(){i._readyPromise.resolve(i)})))},Vector3DTileContent.prototype.isDestroyed=function(){return!1},Vector3DTileContent.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)};var Cesium3DTileContentFactory={b3dm:function(e,t,i,r,n){return new Batched3DModel3DTileContent(e,t,i,r,n)},pnts:function(e,t,i,r,n){return new PointCloud3DTileContent(e,t,i,r,n)},i3dm:function(e,t,i,r,n){return new Instanced3DModel3DTileContent(e,t,i,r,n)},cmpt:function(e,t,i,r,n){return new Composite3DTileContent(e,t,i,r,n,Cesium3DTileContentFactory)},json:function(e,t,i,r,n){return new Tileset3DTileContent(e,t,i,r,n)},geom:function(e,t,i,r,n){return new Geometry3DTileContent(e,t,i,r,n)},vctr:function(e,t,i,r,n){return new Vector3DTileContent(e,t,i,r,n)}},Cesium3DTileContentState={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},Cesium3DTileContentState$1=Object.freeze(Cesium3DTileContentState),Cesium3DTileOptimizationHint={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},Cesium3DTileOptimizationHint$1=Object.freeze(Cesium3DTileOptimizationHint);function Cesium3DTilesetMostDetailedTraversal(){}var traversal={stack:new ManagedArray,stackMaximumLength:0};function isVisible(e){return e._visible&&e._inRequestVolume}function hasEmptyContent(e){return e.hasEmptyContent||e.hasTilesetContent}function hasUnloadedContent(e){return!hasEmptyContent(e)&&e.contentUnloaded}function canTraverse(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function updateAndPushChildren(e,t,i,r){for(var n=t.children,a=n.length,o=0;o<a;++o){var s=n[o];s.updateVisibility(r),isVisible(s)&&i.push(s)}}function loadTile(e,t){(hasUnloadedContent(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function touchTile(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function visitTile(e){++e.statistics.visited}function selectDesiredTile(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Intersect$1.OUTSIDE&&e._selectedTiles.push(t)}function Cesium3DTilesetTraversal(){}function isVisible$1(e){return e._visible&&e._inRequestVolume}Cesium3DTilesetMostDetailedTraversal.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0;var i=!(e._hasMixedContent=!1),r=e.root;if(r.updateVisibility(t),!isVisible(r))return i;var n=traversal.stack;for(n.push(e.root);0<n.length;){traversal.stackMaximumLength=Math.max(traversal.stackMaximumLength,n.length);var a=n.pop(),o=a.refine===Cesium3DTileRefine$1.ADD,s=a.refine===Cesium3DTileRefine$1.REPLACE,l=canTraverse(e,a);l&&updateAndPushChildren(e,a,n,t),(o||s&&!l)&&(loadTile(e,a),touchTile(e,a,t),selectDesiredTile(e,a,t),hasEmptyContent(a)||a.contentAvailable||(i=!1)),visitTile(e)}return traversal.stack.trim(traversal.stackMaximumLength),i};var traversal$1={stack:new ManagedArray,stackMaximumLength:0},emptyTraversal={stack:new ManagedArray,stackMaximumLength:0},descendantTraversal={stack:new ManagedArray,stackMaximumLength:0},selectionTraversal={stack:new ManagedArray,stackMaximumLength:0,ancestorStack:new ManagedArray,ancestorStackMaximumLength:0},descendantSelectionDepth=2;function executeBaseTraversal(e,t,i){executeTraversal(e,t,e._maximumScreenSpaceError,e._maximumScreenSpaceError,i)}function executeSkipTraversal(e,t,i){executeTraversal(e,t,Number.MAX_VALUE,e._maximumScreenSpaceError,i),traverseAndSelect(e,t,i)}function executeBaseAndSkipTraversal(e,t,i){executeTraversal(e,t,Math.max(e.baseScreenSpaceError,e.maximumScreenSpaceError),e.maximumScreenSpaceError,i),traverseAndSelect(e,t,i)}function skipLevelOfDetail(e){return e._skipLevelOfDetail}function addEmptyTile(e,t){e._emptyTiles.push(t)}function selectTile(e,t,i){var r;t.contentVisibility(i)!==Intersect$1.OUTSIDE&&((r=t.content).featurePropertiesDirty?(r.featurePropertiesDirty=!1,t.lastStyleTime=0,e._selectedTilesToStyle.push(t)):t._selectedFrame<i.frameNumber-1&&e._selectedTilesToStyle.push(t),t._selectedFrame=i.frameNumber,e._selectedTiles.push(t))}function selectDescendants(e,t,i){var r=descendantTraversal.stack;for(r.push(t);0<r.length;){descendantTraversal.stackMaximumLength=Math.max(descendantTraversal.stackMaximumLength,r.length);for(var n=r.pop().children,a=n.length,o=0;o<a;++o){var s=n[o];isVisible$1(s)&&(s.contentAvailable?(updateTile(e,s,i),touchTile$1(e,s,i),selectTile(e,s,i)):s._depth-t._depth<descendantSelectionDepth&&r.push(s))}}}function selectDesiredTile$1(e,t,i){var r;skipLevelOfDetail(e)?defined(r=t.contentAvailable?t:t._ancestorWithContentAvailable)?r._shouldSelect=!0:selectDescendants(e,t,i):t.contentAvailable&&selectTile(e,t,i)}function visitTile$1(e,t,i){++e._statistics.visited,t._visitedFrame=i.frameNumber}function touchTile$1(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function updateMinimumMaximumPriority(e,t){e._maximumPriority.distance=Math.max(t._priorityHolder._distanceToCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._priorityHolder._distanceToCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._depth,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._depth,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._priorityHolder._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._priorityHolder._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.reverseScreenSpaceError=Math.max(t._priorityReverseScreenSpaceError,e._maximumPriority.reverseScreenSpaceError),e._minimumPriority.reverseScreenSpaceError=Math.min(t._priorityReverseScreenSpaceError,e._minimumPriority.reverseScreenSpaceError)}function isOnScreenLongEnough(e,t,i){return e._cullRequestsWhileMoving?(t=t.boundingSphere,t=Math.max(2*t.radius,1),i=0!==(i=i.camera).positionWCDeltaMagnitude?i.positionWCDeltaMagnitude:i.positionWCDeltaMagnitudeLastFrame,e.cullRequestsWhileMovingMultiplier*i/t<1):1}function loadTile$1(e,t,i){var r;t._requestedFrame!==i.frameNumber&&(hasUnloadedContent$1(t)||t.contentExpired)&&isOnScreenLongEnough(e,t,i)&&(r=i.camera.timeSinceMoved<e.foveatedTimeDelay,t.priorityDeferred&&r||(t._requestedFrame=i.frameNumber,e._requestedTiles.push(t)))}function updateVisibility(e,t,i){t._updatedVisibilityFrame!==e._updatedVisibilityFrame&&(t.updateVisibility(i),t._updatedVisibilityFrame=e._updatedVisibilityFrame)}function anyChildrenVisible(e,t,i){for(var r=!1,n=t.children,a=n.length,o=0;o<a;++o){var s=n[o];updateVisibility(e,s,i),r=r||isVisible$1(s)}return r}function meetsScreenSpaceErrorEarly(e,t,i){var r=t.parent;return defined(r)&&!r.hasTilesetContent&&r.refine===Cesium3DTileRefine$1.ADD&&t.getScreenSpaceError(i,!0)<=e._maximumScreenSpaceError}function updateTileVisibility(e,t,i){if(updateVisibility(e,t,i),isVisible$1(t)){var r=0<t.children.length;if(t.hasTilesetContent&&r)return updateTileVisibility(e,a=t.children[0],i),void(t._visible=a._visible);if(!meetsScreenSpaceErrorEarly(e,t,i)){var n=t.refine===Cesium3DTileRefine$1.REPLACE,a=t._optimChildrenWithinParent===Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION;return n&&a&&r&&!anyChildrenVisible(e,t,i)&&(++e._statistics.numberOfTilesCulledWithChildrenUnion,void(t._visible=!1))}t._visible=!1}}function updateTile(e,t,i){updateTileVisibility(e,t,i),t.updateExpiration(),t._wasMinPriorityChild=!1,updateMinimumMaximumPriority(e,t._priorityHolder=t),t._shouldSelect=!1,t._finalResolution=!0}function updateTileAncestorContentLinks(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;var i=e.parent;defined(i)&&(t=!hasUnloadedContent$1(i)||i._requestedFrame===t.frameNumber,e._ancestorWithContent=t?i:i._ancestorWithContent,e._ancestorWithContentAvailable=i.contentAvailable?i:i._ancestorWithContentAvailable)}function hasEmptyContent$1(e){return e.hasEmptyContent||e.hasTilesetContent}function hasUnloadedContent$1(e){return!hasEmptyContent$1(e)&&e.contentUnloaded}function reachedSkippingThreshold(e,t){var i=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||defined(i)&&t._screenSpaceError<i._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>i._depth+e.skipLevels)}function sortChildrenByDistanceToCamera(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}function updateAndPushChildren$1(e,t,i,r){for(var n=t.refine===Cesium3DTileRefine$1.REPLACE,a=t.children,o=a.length,s=0;s<o;++s)updateTile(e,a[s],r);a.sort(sortChildrenByDistanceToCamera);var l,c,u=!skipLevelOfDetail(e)&&n&&!hasEmptyContent$1(t),d=!0,h=!1,p=-1,f=Number.MAX_VALUE;for(s=0;s<o;++s)isVisible$1(c=a[s])?(i.push(c),c._foveatedFactor<f&&(p=s,f=c._foveatedFactor),h=!0):(u||e.loadSiblings)&&(c._foveatedFactor<f&&(p=s,f=c._foveatedFactor),loadTile$1(e,c,r),touchTile$1(e,c,r)),u&&(l=!!c._inRequestVolume&&(hasEmptyContent$1(c)?executeEmptyTraversal(e,c,r):c.contentAvailable),d=d&&l);if(h||(d=!1),-1!==p&&!skipLevelOfDetail(e)&&n){(n=a[p])._wasMinPriorityChild=!0;var m=(t._wasMinPriorityChild||t===e.root)&&f<=t._priorityHolder._foveatedFactor?t._priorityHolder:t;for(m._foveatedFactor=Math.min(n._foveatedFactor,m._foveatedFactor),m._distanceToCamera=Math.min(n._distanceToCamera,m._distanceToCamera),s=0;s<o;++s)(c=a[s])._priorityHolder=m}return d}function inBaseTraversal(e,t,i){return!skipLevelOfDetail(e)||!e.immediatelyLoadDesiredLevelOfDetail&&(!defined(t._ancestorWithContent)||(0===t._screenSpaceError?t.parent._screenSpaceError>i:t._screenSpaceError>i))}function canTraverse$1(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:t._screenSpaceError>e._maximumScreenSpaceError)}function executeTraversal(e,t,i,r,n){var a=traversal$1.stack;for(a.push(t);0<a.length;){traversal$1.stackMaximumLength=Math.max(traversal$1.stackMaximumLength,a.length);var o=a.pop();updateTileAncestorContentLinks(o,n);var s=inBaseTraversal(e,o,i),l=o.refine===Cesium3DTileRefine$1.ADD,c=o.refine===Cesium3DTileRefine$1.REPLACE,u=!defined(d=o.parent)||d._refines,d=!1;canTraverse$1(e,o)&&(d=updateAndPushChildren$1(e,o,a,n)&&u),u=!d&&u,hasEmptyContent$1(o)?(addEmptyTile(e,o),loadTile$1(e,o,n),u&&selectDesiredTile$1(e,o,n)):l?(selectDesiredTile$1(e,o,n),loadTile$1(e,o,n)):c&&(s?(loadTile$1(e,o,n),u&&selectDesiredTile$1(e,o,n)):u?(selectDesiredTile$1(e,o,n),loadTile$1(e,o,n)):reachedSkippingThreshold(e,o)&&loadTile$1(e,o,n)),visitTile$1(e,o,n),touchTile$1(e,o,n),o._refines=d}}function executeEmptyTraversal(e,t,i){var r=!0,n=emptyTraversal.stack;for(n.push(t);0<n.length;){emptyTraversal.stackMaximumLength=Math.max(emptyTraversal.stackMaximumLength,n.length);var a=n.pop(),o=a.children,s=o.length,l=(c=hasEmptyContent$1(a))&&canTraverse$1(e,a),c=c&&0===a.children.length;if(l||a.contentAvailable||c||(r=!1),updateTile(e,a,i),isVisible$1(a)||(loadTile$1(e,a,i),touchTile$1(e,a,i)),l)for(var u=0;u<s;++u){var d=o[u];n.push(d)}}return r}function traverseAndSelect(e,t,i){var r,n=selectionTraversal.stack,a=selectionTraversal.ancestorStack;for(n.push(t);0<n.length||0<a.length;){if(selectionTraversal.stackMaximumLength=Math.max(selectionTraversal.stackMaximumLength,n.length),selectionTraversal.ancestorStackMaximumLength=Math.max(selectionTraversal.ancestorStackMaximumLength,a.length),0<a.length)if((d=a.peek())._stackLength===n.length){a.pop(),d!==r&&(d._finalResolution=!1),selectTile(e,d,i);continue}var o=n.pop();if(defined(o)){var s=o.refine===Cesium3DTileRefine$1.ADD,l=o._shouldSelect,c=o.children,u=c.length,d=canTraverse$1(e,o);if(l)if(s)selectTile(e,o,i);else{if(o._selectionDepth=a.length,0<o._selectionDepth&&(e._hasMixedContent=!0),r=o,!d){selectTile(e,o,i);continue}a.push(o),o._stackLength=n.length}if(d)for(var h=0;h<u;++h){var p=c[h];isVisible$1(p)&&n.push(p)}}}}Cesium3DTilesetTraversal.selectTiles=function(e,t){if(e._requestedTiles.length=0,!e.debugFreezeFrame){e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e._hasMixedContent=!1;var i=e.root;if(updateTile(e,i,t),isVisible$1(i)&&!(i.getScreenSpaceError(t,!0)<=e._maximumScreenSpaceError)){(skipLevelOfDetail(e)?e.immediatelyLoadDesiredLevelOfDetail?executeSkipTraversal:executeBaseAndSkipTraversal:executeBaseTraversal)(e,i,t),traversal$1.stack.trim(traversal$1.stackMaximumLength),emptyTraversal.stack.trim(emptyTraversal.stackMaximumLength),descendantTraversal.stack.trim(descendantTraversal.stackMaximumLength),selectionTraversal.stack.trim(selectionTraversal.stackMaximumLength),selectionTraversal.ancestorStack.trim(selectionTraversal.ancestorStackMaximumLength);for(var r=e._requestedTiles,n=r.length,a=0;a<n;++a)r[a].updatePriority()}}};var Cesium3DTilePass={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},passOptions=new Array(Cesium3DTilePass.NUMBER_OF_PASSES);passOptions[Cesium3DTilePass.RENDER]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!0,requestTiles:!0,ignoreCommands:!1}),passOptions[Cesium3DTilePass.PICK]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!1,ignoreCommands:!1}),passOptions[Cesium3DTilePass.SHADOW]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!1}),passOptions[Cesium3DTilePass.PRELOAD]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!0}),passOptions[Cesium3DTilePass.PRELOAD_FLIGHT]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!0}),passOptions[Cesium3DTilePass.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!0}),passOptions[Cesium3DTilePass.MOST_DETAILED_PRELOAD]=Object.freeze({traversal:Cesium3DTilesetMostDetailedTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!0}),passOptions[Cesium3DTilePass.MOST_DETAILED_PICK]=Object.freeze({traversal:Cesium3DTilesetMostDetailedTraversal,isRender:!1,requestTiles:!1,ignoreCommands:!1}),Cesium3DTilePass.getPassOptions=function(e){return passOptions[e]};var Cesium3DTilePass$1=Object.freeze(Cesium3DTilePass);function Empty3DTileContent(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}function TileBoundingRegion(e){this.rectangle=Rectangle.clone(e.rectangle),this.minimumHeight=defaultValue(e.minimumHeight,0),this.maximumHeight=defaultValue(e.maximumHeight,0),this.southwestCornerCartesian=new Cartesian3,this.northeastCornerCartesian=new Cartesian3,this.westNormal=new Cartesian3,this.southNormal=new Cartesian3,this.eastNormal=new Cartesian3,this.northNormal=new Cartesian3;var t=defaultValue(e.ellipsoid,Ellipsoid.WGS84);computeBox(this,e.rectangle,t),defaultValue(e.computeBoundingVolumes,!0)&&(this._orientedBoundingBox=OrientedBoundingBox.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,t),this._boundingSphere=BoundingSphere.fromOrientedBoundingBox(this._orientedBoundingBox))}Object.defineProperties(Empty3DTileContent.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}}}),Empty3DTileContent.prototype.hasProperty=function(e,t){return!1},Empty3DTileContent.prototype.getFeature=function(e){},Empty3DTileContent.prototype.applyDebugSettings=function(e,t){},Empty3DTileContent.prototype.applyStyle=function(e){},Empty3DTileContent.prototype.update=function(e,t){},Empty3DTileContent.prototype.isDestroyed=function(){return!1},Empty3DTileContent.prototype.destroy=function(){return destroyObject(this)},Object.defineProperties(TileBoundingRegion.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});var cartesian3Scratch$2=new Cartesian3,cartesian3Scratch2$1=new Cartesian3,cartesian3Scratch3$1=new Cartesian3,eastWestNormalScratch=new Cartesian3,westernMidpointScratch=new Cartesian3,easternMidpointScratch=new Cartesian3,cartographicScratch$2=new Cartographic,planeScratch=new Plane(Cartesian3.UNIT_X,0),rayScratch=new Ray;function computeBox(e,t,i){i.cartographicToCartesian(Rectangle.southwest(t),e.southwestCornerCartesian),i.cartographicToCartesian(Rectangle.northeast(t),e.northeastCornerCartesian),cartographicScratch$2.longitude=t.west,cartographicScratch$2.latitude=.5*(t.south+t.north),cartographicScratch$2.height=0;var r=i.cartographicToCartesian(cartographicScratch$2,westernMidpointScratch),n=Cartesian3.cross(r,Cartesian3.UNIT_Z,cartesian3Scratch$2);Cartesian3.normalize(n,e.westNormal),cartographicScratch$2.longitude=t.east;var a=i.cartographicToCartesian(cartographicScratch$2,easternMidpointScratch);n=Cartesian3.cross(Cartesian3.UNIT_Z,a,cartesian3Scratch$2);Cartesian3.normalize(n,e.eastNormal);n=Cartesian3.subtract(r,a,cartesian3Scratch$2),r=Cartesian3.normalize(n,eastWestNormalScratch);var o=0<(a=t.south)?(cartographicScratch$2.longitude=.5*(t.west+t.east),cartographicScratch$2.latitude=a,o=i.cartographicToCartesian(cartographicScratch$2,rayScratch.origin),Cartesian3.clone(r,rayScratch.direction),a=Plane.fromPointNormal(e.southwestCornerCartesian,e.westNormal,planeScratch),IntersectionTests.rayPlane(rayScratch,a,e.southwestCornerCartesian),i.geodeticSurfaceNormal(o,cartesian3Scratch2$1)):i.geodeticSurfaceNormalCartographic(Rectangle.southeast(t),cartesian3Scratch2$1);o=Cartesian3.cross(o,n,cartesian3Scratch3$1);Cartesian3.normalize(o,e.southNormal),t=(o=t.north)<0?(cartographicScratch$2.longitude=.5*(t.west+t.east),cartographicScratch$2.latitude=o,o=i.cartographicToCartesian(cartographicScratch$2,rayScratch.origin),Cartesian3.negate(r,rayScratch.direction),r=Plane.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,planeScratch),IntersectionTests.rayPlane(rayScratch,r,e.northeastCornerCartesian),i.geodeticSurfaceNormal(o,cartesian3Scratch2$1)):i.geodeticSurfaceNormalCartographic(Rectangle.northwest(t),cartesian3Scratch2$1),t=Cartesian3.cross(n,t,cartesian3Scratch3$1),Cartesian3.normalize(t,e.northNormal)}var southwestCornerScratch=new Cartesian3,northeastCornerScratch=new Cartesian3,negativeUnitY=new Cartesian3(0,-1,0),negativeUnitZ=new Cartesian3(0,0,-1),vectorScratch=new Cartesian3;function TileBoundingSphere(e,t){0===t&&(t=CesiumMath.EPSILON7),this._boundingSphere=new BoundingSphere(e,t)}TileBoundingRegion.prototype.distanceToCamera=function(e){var t,i,r,n,a,o,s,l=e.camera,c=l.positionWC,u=l.positionCartographic,d=0;return Rectangle.contains(this.rectangle,u)||(t=this.southwestCornerCartesian,n=this.northeastCornerCartesian,i=this.westNormal,r=this.southNormal,a=this.eastNormal,l=this.northNormal,e.mode!==SceneMode$1.SCENE3D&&((t=e.mapProjection.project(Rectangle.southwest(this.rectangle),southwestCornerScratch)).z=t.y,t.y=t.x,t.x=0,(n=e.mapProjection.project(Rectangle.northeast(this.rectangle),northeastCornerScratch)).z=n.y,n.y=n.x,n.x=0,i=negativeUnitY,a=Cartesian3.UNIT_Y,r=negativeUnitZ,l=Cartesian3.UNIT_Z),t=Cartesian3.subtract(c,t,vectorScratch),i=Cartesian3.dot(t,i),r=Cartesian3.dot(t,r),n=Cartesian3.subtract(c,n,vectorScratch),a=Cartesian3.dot(n,a),l=Cartesian3.dot(n,l),0<i?d+=i*i:0<a&&(d+=a*a),0<r?d+=r*r:0<l&&(d+=l*l)),(c=e.mode===SceneMode$1.SCENE3D?(s=u.height,o=this.minimumHeight,this.maximumHeight):(s=c.x,o=0))<s?d+=(c=s-c)*c:s<o&&(d+=(s=o-s)*s),Math.sqrt(d)},TileBoundingRegion.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)},TileBoundingRegion.prototype.createDebugVolume=function(e){var t=new Matrix4.clone(Matrix4.IDENTITY);return new Primitive({geometryInstances:new GeometryInstance({geometry:new RectangleOutlineGeometry({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),id:"outline",modelMatrix:t,attributes:{color:ColorGeometryInstanceAttribute.fromColor(e)}}),appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})},Object.defineProperties(TileBoundingSphere.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}}),TileBoundingSphere.prototype.distanceToCamera=function(e){var t=this._boundingSphere;return Math.max(0,Cartesian3.distance(t.center,e.camera.positionWC)-t.radius)},TileBoundingSphere.prototype.intersectPlane=function(e){return BoundingSphere.intersectPlane(this._boundingSphere,e)},TileBoundingSphere.prototype.update=function(e,t){Cartesian3.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},TileBoundingSphere.prototype.createDebugVolume=function(e){return new Primitive({geometryInstances:new GeometryInstance({geometry:new SphereOutlineGeometry({radius:this.radius}),id:"outline",modelMatrix:Matrix4.fromTranslation(this.center,new Matrix4.clone(Matrix4.IDENTITY)),attributes:{color:ColorGeometryInstanceAttribute.fromColor(e)}}),appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})};var scratchU=new Cartesian3,scratchV=new Cartesian3,scratchW$1=new Cartesian3,scratchCartesian$3=new Cartesian3;function computeMissingVector(e,t,i){return i=Cartesian3.cross(e,t,i),t=Cartesian3.magnitude(i),Cartesian3.multiplyByScalar(i,CesiumMath.EPSILON7/t,i)}function findOrthogonalVector(e,t){var i=Cartesian3.normalize(e,scratchCartesian$3);return computeMissingVector(e,Cartesian3.equalsEpsilon(i,Cartesian3.UNIT_X,CesiumMath.EPSILON6)?Cartesian3.UNIT_Y:Cartesian3.UNIT_X,t)}function checkHalfAxes(e){var t=Matrix3.getColumn(e,0,scratchU),i=Matrix3.getColumn(e,1,scratchV),r=Matrix3.getColumn(e,2,scratchW$1),n=Cartesian3.equals(t,Cartesian3.ZERO),a=Cartesian3.equals(i,Cartesian3.ZERO),o=Cartesian3.equals(r,Cartesian3.ZERO);return(n||a||o)&&(n&&a&&o?(e[0]=CesiumMath.EPSILON7,e[4]=CesiumMath.EPSILON7,e[8]=CesiumMath.EPSILON7):(!n||a||o?n||!a||o?n||a||!o?n?a?o||(i=computeMissingVector(r,t=findOrthogonalVector(r,t),i)):r=computeMissingVector(i,t=findOrthogonalVector(i,t),r):r=computeMissingVector(i=findOrthogonalVector(t,i),t,r):r=computeMissingVector(i,t,r):i=computeMissingVector(t,r,i):t=computeMissingVector(i,r,t),Matrix3.setColumn(e,0,t,e),Matrix3.setColumn(e,1,i,e),Matrix3.setColumn(e,2,r,e))),e}function TileOrientedBoundingBox(e,t){t=checkHalfAxes(t),this._orientedBoundingBox=new OrientedBoundingBox(e,t),this._boundingSphere=BoundingSphere.fromOrientedBoundingBox(this._orientedBoundingBox)}function Cesium3DTile(e,t,i,r){this._tileset=e;var n=(this._header=i).content;this.transform=defined(i.transform)?Matrix4.unpack(i.transform):Matrix4.clone(Matrix4.IDENTITY);var a,o,s,l,c,u,d,h,p,f=defined(r)?r.computedTransform:e.modelMatrix,m=Matrix4.multiply(f,this.transform,new Matrix4);f=defined(r)?r._initialTransform:Matrix4.IDENTITY;this._initialTransform=Matrix4.multiply(f,this.transform,new Matrix4),this.computedTransform=m,this._boundingVolume=this.createBoundingVolume(i.boundingVolume,m),this._boundingVolume2D=void 0,defined(n)&&defined(n.boundingVolume)&&(a=this.createBoundingVolume(n.boundingVolume,m)),this._contentBoundingVolume=a,this._contentBoundingVolume2D=void 0,defined(i.viewerRequestVolume)&&(o=this.createBoundingVolume(i.viewerRequestVolume,m)),this._viewerRequestVolume=o,this.geometricError=i.geometricError,this._geometricError=i.geometricError,defined(this._geometricError)||(this._geometricError=defined(r)?r.geometricError:e._geometricError,Cesium3DTile._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),o=defined(i.refine)?("replace"!==i.refine&&"add"!==i.refine||Cesium3DTile._deprecationWarning("lowercase-refine",'This tile uses a lowercase refine "'+i.refine+'". Instead use "'+i.refine.toUpperCase()+'".'),"REPLACE"===i.refine.toUpperCase()?Cesium3DTileRefine$1.REPLACE:Cesium3DTileRefine$1.ADD):defined(r)?r.refine:Cesium3DTileRefine$1.REPLACE,this.refine=o,this.children=[],this.parent=r,t=Resource.createIfNeeded(t),defined(n)?(d=n.uri,defined(n.url)&&(Cesium3DTile._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),d=n.url),l=!1,c=Cesium3DTileContentState$1.UNLOADED,u=t.getDerivedResource({url:d}),d=RequestScheduler.getServerKey(u.getUrlComponent())):(s=new Empty3DTileContent(e,this),l=!0,c=Cesium3DTileContentState$1.READY),this._content=s,this._contentResource=u,this._contentState=c,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this._expiredContent=void 0,this._serverKey=d,this.hasEmptyContent=l,this.hasTilesetContent=!1,this.cacheNode=void 0,defined(i=i.expire)&&(h=i.duration,defined(i.date)&&(p=JulianDate.fromIso8601(i.date))),this.expireDuration=h,this.expireDate=p,this.lastStyleTime=0,this._optimChildrenWithinParent=Cesium3DTileOptimizationHint$1.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.priorityDeferred=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=Color.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,(this._priorityHolder=this)._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new JulianDate,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Object.defineProperties(TileOrientedBoundingBox.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),TileOrientedBoundingBox.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},TileOrientedBoundingBox.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)},TileOrientedBoundingBox.prototype.update=function(e,t){Cartesian3.clone(e,this._orientedBoundingBox.center),t=checkHalfAxes(t),Matrix3.clone(t,this._orientedBoundingBox.halfAxes),BoundingSphere.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)},TileOrientedBoundingBox.prototype.createDebugVolume=function(e){return new Primitive({geometryInstances:new GeometryInstance({geometry:new BoxOutlineGeometry({minimum:new Cartesian3(-1,-1,-1),maximum:new Cartesian3(1,1,1)}),id:"outline",modelMatrix:Matrix4.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),attributes:{color:ColorGeometryInstanceAttribute.fromColor(e)}}),appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})},Cesium3DTile._deprecationWarning=deprecationWarning,Object.defineProperties(Cesium3DTile.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return defaultValue(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},extras:{get:function(){return this._header.extras}},color:{get:function(){return defined(this._color)||(this._color=new Color),Color.clone(this._color)},set:function(e){this._color=Color.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&!this.hasEmptyContent&&!this.hasTilesetContent||defined(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===Cesium3DTileContentState$1.READY}},contentUnloaded:{get:function(){return this._contentState===Cesium3DTileContentState$1.UNLOADED}},contentExpired:{get:function(){return this._contentState===Cesium3DTileContentState$1.EXPIRED}},contentFailed:{get:function(){return this._contentState===Cesium3DTileContentState$1.FAILED}},contentReadyToProcessPromise:{get:function(){if(defined(this._contentReadyToProcessPromise))return this._contentReadyToProcessPromise.promise}},contentReadyPromise:{get:function(){if(defined(this._contentReadyPromise))return this._contentReadyPromise.promise}},commandsLength:{get:function(){return this._commandsLength}}});var scratchCartesian$4=new Cartesian3;function isPriorityDeferred(e,t){var i=e._tileset,r=t.camera,n=e.boundingSphere,a=n.radius;t=Cartesian3.multiplyByScalar(r.directionWC,e._centerZDepth,scratchCartesian$4),t=Cartesian3.add(r.positionWC,t,scratchCartesian$4),t=Cartesian3.subtract(t,n.center,scratchCartesian$4);a<Cartesian3.magnitude(t)?(s=Cartesian3.normalize(t,scratchCartesian$4),o=Cartesian3.multiplyByScalar(s,a,scratchCartesian$4),s=Cartesian3.add(n.center,o,scratchCartesian$4),o=Cartesian3.subtract(s,r.positionWC,scratchCartesian$4),s=Cartesian3.normalize(o,scratchCartesian$4),e._foveatedFactor=1-Math.abs(Cartesian3.dot(r.directionWC,s))):e._foveatedFactor=0;var o=e.refine===Cesium3DTileRefine$1.REPLACE,s=i._skipLevelOfDetail;return!(o&&!s||!i.foveatedScreenSpaceError||1===i.foveatedConeSize||e._priorityProgressiveResolution&&o&&s||i._pass===Cesium3DTilePass$1.PRELOAD_FLIGHT||i._pass===Cesium3DTilePass$1.PRELOAD)&&(s=1-Math.cos(.5*r.frustum.fov),r=i.foveatedConeSize*s,!(e._foveatedFactor<=r)&&(s-=r,s=CesiumMath.clamp((e._foveatedFactor-r)/s,0,1),s=i.foveatedInterpolationCallback(i.foveatedMinimumScreenSpaceErrorRelaxation,i.maximumScreenSpaceError,s),e=0===e._screenSpaceError&&defined(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError,i.maximumScreenSpaceError-s<=e))}var scratchJulianDate$1=new JulianDate;function isPriorityProgressiveResolution(e,t){if(e.progressiveResolutionHeightFraction<=0||.5<e.progressiveResolutionHeightFraction)return!1;var i=t._screenSpaceErrorProgressiveResolution>e._maximumScreenSpaceError;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;var r=t.parent,n=e._maximumScreenSpaceError;e=t._screenSpaceErrorProgressiveResolution<=n,n=defined(r)&&r._screenSpaceErrorProgressiveResolution>n;return e&&n&&(i=t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0),i}function getPriorityReverseScreenSpaceError(e,t){var i=t.parent;t=(!defined(i)||e._skipLevelOfDetail&&0!==t._screenSpaceError&&!i.hasTilesetContent?t:i)._screenSpaceError;return e.root._screenSpaceError-t}function updateExpireDate(e){var t;defined(e.expireDuration)&&(t=JulianDate.now(scratchJulianDate$1),JulianDate.addSeconds(t,e.expireDuration,t),defined(e.expireDate)?JulianDate.lessThan(e.expireDate,t)&&JulianDate.clone(t,e.expireDate):e.expireDate=JulianDate.clone(t))}function getContentFailedFunction(e,t){return function(i){e._contentState===Cesium3DTileContentState$1.PROCESSING?--t.statistics.numberOfTilesProcessing:--t.statistics.numberOfPendingRequests,e._contentState=Cesium3DTileContentState$1.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}}function createPriorityFunction(e){return function(){return e._priority}}Cesium3DTile.prototype.getScreenSpaceError=function(e,t,i){var r=this._tileset,n=defaultValue(i,1),a=defined(this.parent)?this.parent.geometricError:r._geometricError,o=t?a:this.geometricError;if(0===o)return 0;var s,l=e.camera;i=l.frustum,a=(t=e.context).drawingBufferWidth,n=t.drawingBufferHeight*n;return e.mode===SceneMode$1.SCENE2D||i instanceof OrthographicFrustum?(defined(i._offCenterFrustum)&&(i=i._offCenterFrustum),s=o/(Math.max(i.top-i.bottom,i.right-i.left)/Math.max(a,n))):(s=o*n/((n=Math.max(this._distanceToCamera,CesiumMath.EPSILON7))*l.frustum.sseDenominator),r.dynamicScreenSpaceError&&(l=r._dynamicScreenSpaceErrorComputedDensity,r=r.dynamicScreenSpaceErrorFactor,s-=CesiumMath.fog(n,l)*r)),s/e.pixelRatio},Cesium3DTile.prototype.updateVisibility=function(e){var t=this.parent,i=this._tileset,r=defined(t)?t.computedTransform:i.modelMatrix;t=defined(t)?t._visibilityPlaneMask:CullingVolume.MASK_INDETERMINATE;this.updateTransform(r),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,i.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,t),this._visible=this._visibilityPlaneMask!==CullingVolume.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=getPriorityReverseScreenSpaceError(i,this),this._priorityProgressiveResolution=isPriorityProgressiveResolution(i,this),this.priorityDeferred=isPriorityDeferred(this,e)},Cesium3DTile.prototype.updateExpiration=function(){var e;defined(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&(e=JulianDate.now(scratchJulianDate$1),JulianDate.lessThan(this.expireDate,e)&&(this._contentState=Cesium3DTileContentState$1.EXPIRED,this._expiredContent=this._content))},Cesium3DTile.prototype.requestContent=function(){var e=this,t=this._tileset;if(this.hasEmptyContent)return!1;var i=this._contentResource.clone(),r=this.contentExpired;r&&i.setQueryParameters({expired:this.expireDate.toString()});var n=new Request({throttle:!0,throttleByServer:!0,type:RequestType$1.TILES3D,priorityFunction:createPriorityFunction(this),serverKey:this._serverKey});if(this._request=n,i.request=n,!defined(i=i.fetchArrayBuffer()))return!1;var a=this._contentState;this._contentState=Cesium3DTileContentState$1.LOADING,this._contentReadyToProcessPromise=when.defer(),this._contentReadyPromise=when.defer();var o=getContentFailedFunction(this,t);return i.then((function(i){if(!e.isDestroyed()){var n,a=getMagic(new Uint8Array(i)),s=Cesium3DTileContentFactory[a];return t._disableSkipLevelOfDetail=t._disableSkipLevelOfDetail||"vctr"===a||"geom"===a,defined(s)?n=s(t,e,e._contentResource,i,0):(n=Cesium3DTileContentFactory.json(t,e,e._contentResource,i,0),e.hasTilesetContent=!0),r&&(e.expireDate=void 0),e._content=n,e._contentState=Cesium3DTileContentState$1.PROCESSING,e._contentReadyToProcessPromise.resolve(n),n.readyPromise.then((function(t){e.isDestroyed()?o():(updateExpireDate(e),e._selectedFrame=0,e.lastStyleTime=0,JulianDate.now(e._loadTimestamp),e._contentState=Cesium3DTileContentState$1.READY,e._contentReadyPromise.resolve(t))}))}o()})).otherwise((function(i){return n.state===RequestState$1.CANCELLED?(e._contentState=a,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests):void o(i)})),!0},Cesium3DTile.prototype.unloadContent=function(){this.hasEmptyContent||this.hasTilesetContent||(this._content=this._content&&this._content.destroy(),this._contentState=Cesium3DTileContentState$1.UNLOADED,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var scratchProjectedBoundingSphere=new BoundingSphere;function getBoundingVolume(e,t){var i;return t.mode===SceneMode$1.SCENE3D||defined(e._boundingVolume2D)||(i=e._boundingVolume.boundingSphere,i=BoundingSphere.projectTo2D(i,t.mapProjection,scratchProjectedBoundingSphere),e._boundingVolume2D=new TileBoundingSphere(i.center,i.radius)),t.mode!==SceneMode$1.SCENE3D?e._boundingVolume2D:e._boundingVolume}function getContentBoundingVolume(e,t){var i;return t.mode===SceneMode$1.SCENE3D||defined(e._contentBoundingVolume2D)||(i=e._contentBoundingVolume.boundingSphere,i=BoundingSphere.projectTo2D(i,t.mapProjection,scratchProjectedBoundingSphere),e._contentBoundingVolume2D=new TileBoundingSphere(i.center,i.radius)),t.mode!==SceneMode$1.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}Cesium3DTile.prototype.visibility=function(e,t){var i=e.cullingVolume,r=getBoundingVolume(this,e),n=this._tileset;return defined(e=n.clippingPlanes)&&e.enabled&&(n=e.computeIntersectionWithBoundingVolume(r,n.clippingPlanesOriginMatrix),this._isClipped=n!==Intersect$1.INSIDE,n===Intersect$1.OUTSIDE)?CullingVolume.MASK_OUTSIDE:i.computeVisibilityWithPlaneMask(r,t)},Cesium3DTile.prototype.contentVisibility=function(e){if(!defined(this._contentBoundingVolume))return Intersect$1.INSIDE;if(this._visibilityPlaneMask===CullingVolume.MASK_INSIDE)return Intersect$1.INSIDE;var t=e.cullingVolume,i=getContentBoundingVolume(this,e),r=this._tileset;return defined(e=r.clippingPlanes)&&e.enabled&&(r=e.computeIntersectionWithBoundingVolume(i,r.clippingPlanesOriginMatrix),this._isClipped=r!==Intersect$1.INSIDE,r===Intersect$1.OUTSIDE)?Intersect$1.OUTSIDE:t.computeVisibility(i)},Cesium3DTile.prototype.distanceToTile=function(e){return getBoundingVolume(this,e).distanceToCamera(e)};var scratchToTileCenter=new Cartesian3;Cesium3DTile.prototype.distanceToTileCenter=function(e){var t=getBoundingVolume(this,e).boundingVolume;t=Cartesian3.subtract(t.center,e.camera.positionWC,scratchToTileCenter);return Cartesian3.dot(e.camera.directionWC,t)},Cesium3DTile.prototype.insideViewerRequestVolume=function(e){var t=this._viewerRequestVolume;return!defined(t)||0===t.distanceToCamera(e)};var scratchMatrix$2=new Matrix3,scratchScale$6=new Cartesian3,scratchHalfAxes=new Matrix3,scratchCenter$3=new Cartesian3,scratchRectangle$2=new Rectangle,scratchOrientedBoundingBox=new OrientedBoundingBox,scratchTransform=new Matrix4;function createBox(e,t,i){var r=Cartesian3.fromElements(e[0],e[1],e[2],scratchCenter$3);e=Matrix3.fromArray(e,3,scratchHalfAxes),r=Matrix4.multiplyByPoint(t,r,r),t=Matrix4.getMatrix3(t,scratchMatrix$2),e=Matrix3.multiply(t,e,e);return defined(i)?(i.update(r,e),i):new TileOrientedBoundingBox(r,e)}function createBoxFromTransformedRegion(e,t,i,r){var n=Rectangle.unpack(e,0,scratchRectangle$2),a=e[4];e=e[5],e=(a=OrientedBoundingBox.fromRectangle(n,a,e,Ellipsoid.WGS84,scratchOrientedBoundingBox)).center,a=a.halfAxes;return t=Matrix4.multiplyTransformation(t,Matrix4.inverseTransformation(i,scratchTransform),scratchTransform),e=Matrix4.multiplyByPoint(t,e,e),t=Matrix4.getMatrix3(t,scratchMatrix$2),a=Matrix3.multiply(t,a,a),defined(r)&&r instanceof TileOrientedBoundingBox?(r.update(e,a),r):new TileOrientedBoundingBox(e,a)}function createRegion(e,t,i,r){return Matrix4.equalsEpsilon(t,i,CesiumMath.EPSILON8)?defined(r)?r:new TileBoundingRegion({rectangle:Rectangle.unpack(e,0,scratchRectangle$2),minimumHeight:e[4],maximumHeight:e[5]}):createBoxFromTransformedRegion(e,t,i,r)}function createSphere(e,t,i){var r=Cartesian3.fromElements(e[0],e[1],e[2],scratchCenter$3);e=e[3],r=Matrix4.multiplyByPoint(t,r,r),t=Matrix4.getScale(t,scratchScale$6);return e*=Cartesian3.maximumComponent(t),defined(i)?(i.update(r,e),i):new TileBoundingSphere(r,e)}function applyDebugSettings(e,t,i,r){var n,a,o;r.isRender&&(o=defined(e._header.content)&&defined(e._header.content.boundingVolume),n=e.hasEmptyContent||e.hasTilesetContent,(a=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o)?(r=e._finalResolution?n?Color.DARKGRAY:Color.WHITE:Color.YELLOW,defined(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(r)),e._debugBoundingVolume.update(i),(n=e._debugBoundingVolume.getGeometryInstanceAttributes("outline")).color=ColorGeometryInstanceAttribute.toValue(r,n.color)):!a&&defined(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy()),t.debugShowContentBoundingVolume&&o?(defined(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(Color.BLUE)),e._debugContentBoundingVolume.update(i)):!t.debugShowContentBoundingVolume&&defined(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&defined(e._viewerRequestVolume)?(defined(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(Color.YELLOW)),e._debugViewerRequestVolume.update(i)):!t.debugShowViewerRequestVolume&&defined(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy()),a=t.debugColorizeTiles&&!e._debugColorizeTiles||defined(t._heatmap.tilePropertyName),o=!t.debugColorizeTiles&&e._debugColorizeTiles,a?(t._heatmap.colorize(e,i),e._debugColorizeTiles=!0,e.color=e._debugColor):o&&(e._debugColorizeTiles=!1,e.color=Color.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),o&&t.makeStyleDirty())}function updateContent(e,t,i){var r=e._content,n=e._expiredContent;if(defined(n)){if(!e.contentReady)return void n.update(t,i);e._expiredContent.destroy(),e._expiredContent=void 0}r.update(t,i)}function updateClippingPlanes$1(e,t){var i=t.clippingPlanes;t=0;defined(i)&&e._isClipped&&i.enabled&&(t=i.clippingPlanesState),t!==e._clippingPlanesState&&(e._clippingPlanesState=t,e.clippingPlanesDirty=!0)}Cesium3DTile.prototype.createBoundingVolume=function(e,t,i){if(!defined(e))throw new RuntimeError("boundingVolume must be defined");if(defined(e.box))return createBox(e.box,t,i);if(defined(e.region))return createRegion(e.region,t,this._initialTransform,i);if(defined(e.sphere))return createSphere(e.sphere,t,i);throw new RuntimeError("boundingVolume must contain a sphere, region, or box")},Cesium3DTile.prototype.updateTransform=function(e){e=defaultValue(e,Matrix4.IDENTITY);var t=Matrix4.multiply(e,this.transform,scratchTransform);Matrix4.equals(t,this.computedTransform)||(Matrix4.clone(t,this.computedTransform),e=this._header,t=this._header.content,this._boundingVolume=this.createBoundingVolume(e.boundingVolume,this.computedTransform,this._boundingVolume),defined(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(t.boundingVolume,this.computedTransform,this._contentBoundingVolume)),defined(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(e.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())},Cesium3DTile.prototype.updateGeometricErrorScale=function(){var e=Matrix4.getScale(this.computedTransform,scratchScale$6);e=Cartesian3.maximumComponent(e);this.geometricError=this._geometricError*e},Cesium3DTile.prototype.update=function(e,t,i){var r=t.commandList.length;updateClippingPlanes$1(this,e),applyDebugSettings(this,e,t,i),updateContent(this,e,t),this._commandsLength=t.commandList.length-r,this.clippingPlanesDirty=!1};var scratchCommandList=[];function isolateDigits(e,t,i){return t=e*Math.pow(10,t),parseInt(t)*Math.pow(10,i)}function priorityNormalizeAndClamp(e,t,i){return Math.max(CesiumMath.normalize(e,t,i)-CesiumMath.EPSILON7,0)}Cesium3DTile.prototype.process=function(e,t){var i=t.commandList;t.commandList=scratchCommandList,this._content.update(e,t),scratchCommandList.length=0,t.commandList=i},Cesium3DTile.prototype.updatePriority=function(){var e=this.tileset,t=e.preferLeaves,i=e._minimumPriority,r=e._maximumPriority,n=Math.pow(10,8),a=Math.pow(10,9),o=Math.pow(10,10),s=priorityNormalizeAndClamp(this._depth,i.depth,r.depth);s=t?1-s:s,t=isolateDigits(e._skipLevelOfDetail||this.refine!==Cesium3DTileRefine$1.REPLACE?priorityNormalizeAndClamp(this._priorityReverseScreenSpaceError,i.reverseScreenSpaceError,r.reverseScreenSpaceError):priorityNormalizeAndClamp(this._priorityHolder._distanceToCamera,i.distance,r.distance),4,0),n=this._priorityProgressiveResolution?0:n,r=isolateDigits(priorityNormalizeAndClamp(this._priorityHolder._foveatedFactor,i.foveatedFactor,r.foveatedFactor),4,4),a=this.priorityDeferred?a:0,o=e._pass===Cesium3DTilePass$1.PRELOAD_FLIGHT?0:o;this._priority=s+t+n+r+a+o},Cesium3DTile.prototype.isDestroyed=function(){return!1},Cesium3DTile.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),destroyObject(this)};var Cesium3DTileOptimizations={},scratchAxis=new Cartesian3;function Cesium3DTilesetCache(){this._list=new DoublyLinkedList,this._sentinel=this._list.add(),this._trimTiles=!1}function Cesium3DTilesetHeatmap(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function getHeatmapValue(e,t){return e="_loadTimestamp"===t?JulianDate.toDate(e).getTime():e}function getHeatmapValueAndUpdateMinimumMaximum(e,t){var i=e.tilePropertyName;if(defined(i))return defined(i=getHeatmapValue(t[i],i))?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}Cesium3DTileOptimizations.checkChildrenWithinParent=function(e){var t=e.children,i=t.length,r=e.boundingVolume;if(r instanceof TileOrientedBoundingBox||r instanceof TileBoundingRegion){var n=r._orientedBoundingBox;e._optimChildrenWithinParent=Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION;for(var a=0;a<i;++a){if(!((l=t[a].boundingVolume)instanceof TileOrientedBoundingBox||l instanceof TileBoundingRegion)){e._optimChildrenWithinParent=Cesium3DTileOptimizationHint$1.SKIP_OPTIMIZATION;break}var o=l._orientedBoundingBox,s=Cartesian3.subtract(o.center,n.center,scratchAxis),l=Cartesian3.magnitude(s);if(Cartesian3.divideByScalar(s,l,s),Math.abs(n.halfAxes[0]*s.x)+Math.abs(n.halfAxes[1]*s.y)+Math.abs(n.halfAxes[2]*s.z)+Math.abs(n.halfAxes[3]*s.x)+Math.abs(n.halfAxes[4]*s.y)+Math.abs(n.halfAxes[5]*s.z)+Math.abs(n.halfAxes[6]*s.x)+Math.abs(n.halfAxes[7]*s.y)+Math.abs(n.halfAxes[8]*s.z)<=Math.abs(o.halfAxes[0]*s.x)+Math.abs(o.halfAxes[1]*s.y)+Math.abs(o.halfAxes[2]*s.z)+Math.abs(o.halfAxes[3]*s.x)+Math.abs(o.halfAxes[4]*s.y)+Math.abs(o.halfAxes[5]*s.z)+Math.abs(o.halfAxes[6]*s.x)+Math.abs(o.halfAxes[7]*s.y)+Math.abs(o.halfAxes[8]*s.z)+l){e._optimChildrenWithinParent=Cesium3DTileOptimizationHint$1.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION},Cesium3DTilesetCache.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},Cesium3DTilesetCache.prototype.touch=function(e){defined(e=e.cacheNode)&&this._list.splice(this._sentinel,e)},Cesium3DTilesetCache.prototype.add=function(e){defined(e.cacheNode)||(e.cacheNode=this._list.add(e))},Cesium3DTilesetCache.prototype.unloadTile=function(e,t,i){var r=t.cacheNode;defined(r)&&(this._list.remove(r),t.cacheNode=void 0,i(e,t))},Cesium3DTilesetCache.prototype.unloadTiles=function(e,t){var i=this._trimTiles;this._trimTiles=!1;for(var r=this._list,n=1024*e.maximumMemoryUsage*1024,a=this._sentinel,o=r.head;o!==a&&(e.totalMemoryUsageInBytes>n||i);){var s=o.item;o=o.next;this.unloadTile(e,s,t)}},Cesium3DTilesetCache.prototype.trim=function(){this._trimTiles=!0},Cesium3DTilesetHeatmap.prototype.setReferenceMinimumMaximum=function(e,t,i){this._referenceMinimum[i]=getHeatmapValue(e,i),this._referenceMaximum[i]=getHeatmapValue(t,i)};var heatmapColors=[new Color(.1,.1,.1,1),new Color(.153,.278,.878,1),new Color(.827,.231,.49,1),new Color(.827,.188,.22,1),new Color(1,.592,.259,1),new Color(1,.843,0,1)];function Cesium3DTilesetStatistics(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}function updatePointAndFeatureCounts(e,t,i,r){var n=t.innerContents,a=t.pointsLength,o=t.trianglesLength,s=t.featuresLength,l=t.geometryByteLength,c=t.texturesByteLength;t=t.batchTableByteLength;if(r?(e.numberOfFeaturesLoaded+=i?-s:s,e.numberOfPointsLoaded+=i?-a:a,e.geometryByteLength+=i?-l:l,e.texturesByteLength+=i?-c:c,e.batchTableByteLength+=i?-t:t):(e.numberOfFeaturesSelected+=i?-s:s,e.numberOfPointsSelected+=i?-a:a,e.numberOfTrianglesSelected+=i?-o:o),defined(n))for(var u=n.length,d=0;d<u;++d)updatePointAndFeatureCounts(e,n[d],i,r)}function Cesium3DTileStyleEngine(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}function Cesium3DTileset(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._url=void 0,this._basePath=void 0,this._root=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._extensionsUsed=void 0,this._extensions=void 0,this._gltfUpAxis=void 0,this._cache=new Cesium3DTilesetCache,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._cullWithChildrenBounds=defaultValue(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new ManagedArray,this._maximumScreenSpaceError=defaultValue(e.maximumScreenSpaceError,16),this._maximumMemoryUsage=defaultValue(e.maximumMemoryUsage,512),this._styleEngine=new Cesium3DTileStyleEngine,this._modelMatrix=defined(e.modelMatrix)?Matrix4.clone(e.modelMatrix):Matrix4.clone(Matrix4.IDENTITY),this._statistics=new Cesium3DTilesetStatistics,this._statisticsLast=new Cesium3DTilesetStatistics,this._statisticsPerPass=new Array(Cesium3DTilePass$1.NUMBER_OF_PASSES);for(var t=0;t<Cesium3DTilePass$1.NUMBER_OF_PASSES;++t)this._statisticsPerPass[t]=new Cesium3DTilesetStatistics;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new Cesium3DTilesetHeatmap(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=defaultValue(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this.cullRequestsWhileMovingMultiplier=defaultValue(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=CesiumMath.clamp(defaultValue(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=defaultValue(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._readyPromise=when.defer(),this._classificationType=e.classificationType,this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._initialClippingPlanesOriginMatrix=Matrix4.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this.preloadWhenHidden=defaultValue(e.preloadWhenHidden,!1),this.preloadFlightDestinations=defaultValue(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=defaultValue(e.dynamicScreenSpaceError,!1),this.foveatedScreenSpaceError=defaultValue(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=defaultValue(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=defaultValue(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=defaultValue(e.foveatedInterpolationCallback,CesiumMath.lerp),this.foveatedTimeDelay=defaultValue(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorFactor=4,this.dynamicScreenSpaceErrorHeightFalloff=.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=defaultValue(e.shadows,ShadowMode$1.ENABLED),this.show=defaultValue(e.show,!0),this.colorBlendMode=Cesium3DTileColorBlendMode$1.HIGHLIGHT,this.colorBlendAmount=.5,this.pointCloudShading=new PointCloudShading(e.pointCloudShading),this._pointCloudEyeDomeLighting=new PointCloudEyeDomeLighting,this.loadProgress=new Event,this.allTilesLoaded=new Event,this.initialTilesLoaded=new Event,this.tileLoad=new Event,this.tileUnload=new Event,this.tileFailed=new Event,this.tileVisible=new Event,this.skipLevelOfDetail=defaultValue(e.skipLevelOfDetail,!1),this._skipLevelOfDetail=this.skipLevelOfDetail,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=defaultValue(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=defaultValue(e.skipScreenSpaceErrorFactor,16),this.skipLevels=defaultValue(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=defaultValue(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=defaultValue(e.loadSiblings,!1),this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._imageBasedLightingFactor=new Cartesian2(1,1),Cartesian2.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=defaultValue(e.luminanceAtZenith,.2),this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.backFaceCulling=defaultValue(e.backFaceCulling,!0),this.debugFreezeFrame=defaultValue(e.debugFreezeFrame,!1),this.debugColorizeTiles=defaultValue(e.debugColorizeTiles,!1),this.debugWireframe=defaultValue(e.debugWireframe,!1),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=defaultValue(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=defaultValue(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=defaultValue(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=defaultValue(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=defaultValue(e.debugShowMemoryUsage,!1),this.debugShowUrl=defaultValue(e.debugShowUrl,!1);var i,r=this;when(e.url).then((function(e){var t;return i=Resource.createIfNeeded(e),r._credits=i.credits,"json"===i.extension?t=i.getBaseUri(!0):i.isDataUri&&(t=""),r._url=i.url,r._basePath=t,Cesium3DTileset.loadJson(i)})).then((function(e){r._root=r.loadTileset(i,e);var t=defined(e.asset.gltfUpAxis)?Axis$1.fromName(e.asset.gltfUpAxis):Axis$1.Y,n=e.asset;if(r._asset=n,r._properties=e.properties,r._geometricError=e.geometricError,r._extensionsUsed=e.extensionsUsed,r._extensions=e.extensions,r._gltfUpAxis=t,r._extras=e.extras,defined(n=n.extras)&&defined(n.cesium)&&defined(n.cesium.credits)){var a=n.cesium.credits,o=r._credits;defined(o)||(o=[],r._credits=o);for(var s=0;s<a.length;++s){var l=a[s];o.push(new Credit(l.html,l.showOnScreen))}}n=r._root.createBoundingVolume(e.root.boundingVolume,Matrix4.IDENTITY).boundingSphere.center,defined(e=r._ellipsoid.cartesianToCartographic(n))&&e.height>ApproximateTerrainHeights._defaultMinTerrainHeight&&(r._initialClippingPlanesOriginMatrix=Transforms.eastNorthUpToFixedFrame(n)),r._clippingPlanesOriginMatrix=Matrix4.clone(r._initialClippingPlanesOriginMatrix),r._readyPromise.resolve(r)})).otherwise((function(e){r._readyPromise.reject(e)}))}Cesium3DTilesetHeatmap.prototype.colorize=function(e,t){var i,r,n;defined(this.tilePropertyName)&&e.contentAvailable&&e._selectedFrame===t.frameNumber&&(r=getHeatmapValueAndUpdateMinimumMaximum(this,e),n=this._previousMinimum,i=this._previousMaximum,n!==Number.MAX_VALUE&&i!==-Number.MAX_VALUE&&(t=i-n+CesiumMath.EPSILON7,i=CesiumMath.clamp(r-n,0,t)/t*(heatmapColors.length-1),r=Math.floor(i),n=Math.ceil(i),t=i-r,i=heatmapColors[r],r=heatmapColors[n],(n=Color.clone(Color.WHITE)).red=CesiumMath.lerp(i.red,r.red,t),n.green=CesiumMath.lerp(i.green,r.green,t),n.blue=CesiumMath.lerp(i.blue,r.blue,t),e._debugColor=n))},Cesium3DTilesetHeatmap.prototype.resetMinimumMaximum=function(){var e,t,i=this.tilePropertyName;defined(i)&&(e=this._referenceMinimum[i],t=this._referenceMaximum[i],i=defined(e)&&defined(t),this._previousMinimum=i?e:this._minimum,this._previousMaximum=i?t:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE)},Cesium3DTilesetStatistics.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0},Cesium3DTilesetStatistics.prototype.incrementSelectionCounts=function(e){updatePointAndFeatureCounts(this,e,!1,!1)},Cesium3DTilesetStatistics.prototype.incrementLoadCounts=function(e){updatePointAndFeatureCounts(this,e,!1,!0)},Cesium3DTilesetStatistics.prototype.decrementLoadCounts=function(e){updatePointAndFeatureCounts(this,e,!0,!0)},Cesium3DTilesetStatistics.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength},Object.defineProperties(Cesium3DTileStyleEngine.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}}}),Cesium3DTileStyleEngine.prototype.makeDirty=function(){this._styleDirty=!0},Cesium3DTileStyleEngine.prototype.applyStyle=function(e,t){if(e.ready&&(!defined(this._style)||this._style.ready)){var i=this._styleDirty;t.isRender&&(this._styleDirty=!1),i&&++this._lastStyleTime;for(var r=this._lastStyleTime,n=e._statistics,a=i?e._selectedTiles:e._selectedTilesToStyle,o=a.length,s=0;s<o;++s){var l,c=a[s];c.lastStyleTime!==r&&(l=c.content,c.lastStyleTime=r,l.applyStyle(this._style),n.numberOfFeaturesStyled+=l.featuresLength,++n.numberOfTilesStyled)}}},Object.defineProperties(Cesium3DTileset.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){return this._asset}},extensions:{get:function(){return this._extensions}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ClippingPlaneCollection.setOwner(e,this,"_clippingPlanes")}},properties:{get:function(){return this._properties}},ready:{get:function(){return defined(this._root)}},readyPromise:{get:function(){return this._readyPromise.promise}},tilesLoaded:{get:function(){return this._tilesLoaded}},url:{get:function(){return this._url}},basePath:{get:function(){return deprecationWarning("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){this._maximumScreenSpaceError=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){this._maximumMemoryUsage=e}},root:{get:function(){return this._root}},boundingSphere:{get:function(){return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=Matrix4.clone(e,this._modelMatrix)}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){var e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return defined(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(Matrix4.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):Matrix4.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){return this._extras}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){Cartesian2.clone(e,this._imageBasedLightingFactor)}}}),Cesium3DTileset.loadJson=function(e){return Resource.createIfNeeded(e).fetchJson()},Cesium3DTileset.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},Cesium3DTileset.prototype.loadTileset=function(e,t,i){if(!defined(r=t.asset))throw new RuntimeError("Tileset must have an asset property.");if("0.0"!==r.version&&"1.0"!==r.version)throw new RuntimeError("The tileset must be 3D Tiles version 0.0 or 1.0.");var r,n=this._statistics;defined(r=r.tilesetVersion)&&(this._basePath+="?v="+r,e.setQueryParameters({v:r})),t=new Cesium3DTile(this,e,t.root,i),defined(i)&&(i.children.push(t),t._depth=i._depth+1);var a=[];for(a.push(t);0<a.length;){var o=a.pop();++n.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&o.refine===Cesium3DTileRefine$1.ADD;var s=o._header.children;if(defined(s))for(var l=s.length,c=0;c<l;++c){var u=new Cesium3DTile(this,e,s[c],o);o.children.push(u),u._depth=o._depth+1,a.push(u)}this._cullWithChildrenBounds&&Cesium3DTileOptimizations.checkChildrenWithinParent(o)}return t};var scratchPositionNormal=new Cartesian3,scratchCartographic$7=new Cartographic,scratchMatrix$3=new Matrix4,scratchCenter$4=new Cartesian3,scratchPosition$9=new Cartesian3,scratchDirection=new Cartesian3;function updateDynamicScreenSpaceError(e,t){var i,r,n,a,o,s,l,c=t.camera,u=e._root,d=u.contentBoundingVolume;d instanceof TileBoundingRegion?(p=Cartesian3.normalize(c.positionWC,scratchPositionNormal),n=c.directionWC,a=c.positionCartographic.height,h=d.minimumHeight,o=d.maximumHeight):(i=Matrix4.inverseTransformation(u.computedTransform,scratchMatrix$3),r=t.mapProjection.ellipsoid,l=d.boundingVolume,t=Matrix4.multiplyByPoint(i,l.center,scratchCenter$4),Cartesian3.magnitude(t)>r.minimumRadius?(s=Cartographic.fromCartesian(t,r,scratchCartographic$7),p=Cartesian3.normalize(c.positionWC,scratchPositionNormal),n=c.directionWC,a=c.positionCartographic.height,h=0,o=2*s.height):(s=Matrix4.multiplyByPoint(i,c.positionWC,scratchPosition$9),p=Cartesian3.UNIT_Z,n=Matrix4.multiplyByPointAsVector(i,c.directionWC,scratchDirection),n=Cartesian3.normalize(n,n),a=s.z,d instanceof TileOrientedBoundingBox?(u=u._header.boundingVolume.box[11],h=t.z-u,o=t.z+u):d instanceof TileBoundingSphere&&(l=l.radius,h=t.z-l,o=t.z+l)));var h=h+(o-h)*e.dynamicScreenSpaceErrorHeightFalloff,p=(h=CesiumMath.clamp((a-h)/(o-h),0,1),1-Math.abs(Cartesian3.dot(n,p)));p*=1-h,h=e.dynamicScreenSpaceErrorDensity,h*=p,e._dynamicScreenSpaceErrorComputedDensity=h}function requestContent(e,t){var i,r;t.hasEmptyContent||(i=e._statistics,r=t.contentExpired,t.requestContent()?(r&&(t.hasTilesetContent?destroySubtree(e,t):(i.decrementLoadCounts(t.content),--i.numberOfTilesWithContentReady)),++i.numberOfPendingRequests,e._requestedTilesInFlight.push(t),t.contentReadyToProcessPromise.then(addToProcessingQueue(e,t)),t.contentReadyPromise.then(handleTileSuccess(e,t)).otherwise(handleTileFailure(e,t))):++i.numberOfAttemptedRequests)}function sortRequestByPriority(e,t){return e._priority-t._priority}function cancelOutOfViewRequests(e,t){for(var i=e._requestedTilesInFlight,r=0,n=i.length,a=0;a<n;++a){var o=i[a],s=1<=t.frameNumber-o._touchedFrame;o._contentState===Cesium3DTileContentState$1.LOADING?s?(o._request.cancel(),++r):0<r&&(i[a-r]=o):++r}i.length-=r}function requestTiles(e,t){var i=e._requestedTiles,r=i.length;i.sort(sortRequestByPriority);for(var n=0;n<r;++n)requestContent(e,i[n])}function addToProcessingQueue(e,t){return function(){e._processingQueue.push(t),--e._statistics.numberOfPendingRequests,++e._statistics.numberOfTilesProcessing}}function handleTileFailure(e,t){return function(i){var r=t._contentResource.url;i=defined(i.message)?i.message:i.toString();0<e.tileFailed.numberOfListeners?e.tileFailed.raiseEvent({url:r,message:i}):(console.log("A 3D tile failed to load: "+r),console.log("Error: "+i))}}function handleTileSuccess(e,t){return function(){--e._statistics.numberOfTilesProcessing,t.hasTilesetContent||(e._statistics.incrementLoadCounts(t.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(t)),e.tileLoad.raiseEvent(t)}}function filterProcessingQueue(e){for(var t=e._processingQueue,i=t.length,r=0,n=0;n<i;++n){var a=t[n];a._contentState===Cesium3DTileContentState$1.PROCESSING?0<r&&(t[n-r]=a):++r}t.length-=r}function processTiles(e,t){filterProcessingQueue(e);for(var i=e._processingQueue,r=i.length,n=0;n<r;++n)i[n].process(e,t)}Cesium3DTileset.prototype.postPassesUpdate=function(e){this.ready&&(cancelOutOfViewRequests(this,e),raiseLoadProgressEvent(this,e),this._cache.unloadTiles(this,unloadTile))},Cesium3DTileset.prototype.prePassesUpdate=function(e){var t;this.ready&&(processTiles(this,e),t=this._clippingPlanes,this._clippingPlanesOriginMatrixDirty=!0,defined(t)&&t.enabled&&t.update(e),defined(this._loadTimestamp)||(this._loadTimestamp=JulianDate.clone(e.time)),this._timeSinceLoad=Math.max(1e3*JulianDate.secondsDifference(e.time,this._loadTimestamp),0),this._skipLevelOfDetail=this.skipLevelOfDetail&&!defined(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive,this.dynamicScreenSpaceError&&updateDynamicScreenSpaceError(this,e),e.newFrame&&this._cache.reset())};var scratchCartesian$5=new Cartesian3,stringOptions={maximumFractionDigits:3};function formatMemoryString(e){return(e/=1048576)<1?e.toLocaleString(void 0,stringOptions):Math.round(e).toLocaleString()}function computeTileLabelPosition(e){var t=e.boundingVolume.boundingVolume,i=t.halfAxes,r=t.radius;e=Cartesian3.clone(t.center,scratchCartesian$5);return defined(i)?(e.x+=.75*(i[0]+i[3]+i[6]),e.y+=.75*(i[1]+i[4]+i[7]),e.z+=.75*(i[2]+i[5]+i[8])):defined(r)&&(i=Cartesian3.normalize(t.center,scratchCartesian$5),i=Cartesian3.multiplyByScalar(i,.75*r,scratchCartesian$5),e=Cartesian3.add(i,t.center,scratchCartesian$5)),e}function addTileDebugLabel(e,t,i){var r="",n=0;return t.debugShowGeometricError&&(r+="\nGeometric error: "+e.geometricError,n++),t.debugShowRenderingStatistics&&(r+="\nCommands: "+e.commandsLength,n++,0<e.content.pointsLength&&(r+="\nPoints: "+e.content.pointsLength,n++),0<e.content.trianglesLength&&(r+="\nTriangles: "+e.content.trianglesLength,n++),r+="\nFeatures: "+e.content.featuresLength,n++),t.debugShowMemoryUsage&&(r+="\nTexture Memory: "+formatMemoryString(e.content.texturesByteLength),r+="\nGeometry Memory: "+formatMemoryString(e.content.geometryByteLength),n+=2),t.debugShowUrl&&(r+="\nUrl: "+e._header.content.uri,n++),n={text:r.substring(1),position:i,font:19-n+"px sans-serif",showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},t._tileDebugLabels.add(n)}function updateTileDebugLabels(e,t){var i,r,n,a=e._selectedTiles,o=a.length,s=e._emptyTiles,l=s.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly)defined(e.debugPickedTile)&&(n=defined(e.debugPickPosition)?e.debugPickPosition:computeTileLabelPosition(e.debugPickedTile),addTileDebugLabel(e.debugPickedTile,e,n).pixelOffset=new Cartesian2(15,-15));else{for(i=0;i<o;++i)addTileDebugLabel(r=a[i],e,computeTileLabelPosition(r));for(i=0;i<l;++i)(r=s[i]).hasTilesetContent&&addTileDebugLabel(r,e,computeTileLabelPosition(r))}e._tileDebugLabels.update(t)}function updateTiles(e,t,i){e._styleEngine.applyStyle(e,i);var r,n=i.isRender,a=e._statistics,o=t.commandList,s=o.length,l=e._selectedTiles,c=l.length,u=e._emptyTiles,d=u.length,h=e.tileVisible,p=e._skipLevelOfDetail&&e._hasMixedContent&&t.context.stencilBuffer&&0<c;e._backfaceCommands.length=0,p&&(defined(e._stencilClearCommand)||(e._stencilClearCommand=new ClearCommand({stencil:0,pass:Pass$1.CESIUM_3D_TILE,renderState:RenderState.fromCache({stencilMask:StencilConstants$1.SKIP_LOD_MASK})})),o.push(e._stencilClearCommand));for(var f=o.length,m=0;m<c;++m)r=l[m],n&&h.raiseEvent(r),r.update(e,t,i),a.incrementSelectionCounts(r.content),++a.selected;for(m=0;m<d;++m)(r=u[m]).update(e,t,i);var g=o.length-f;if(e._backfaceCommands.trim(),p){var y=e._backfaceCommands.values,_=y.length;for(o.length+=_,m=g-1;0<=m;--m)o[f+_+m]=o[f+m];for(m=0;m<_;++m)o[f+m]=y[m]}g=o.length-s,a.numberOfCommands=g,n&&e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&0<g&&e._pointCloudEyeDomeLighting.update(t,s,e.pointCloudShading,e.boundingSphere),n&&(e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(defined(e._tileDebugLabels)||(e._tileDebugLabels=new LabelCollection),updateTileDebugLabels(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var scratchStack$1=[];function destroySubtree(e,t){var i=t,r=scratchStack$1;for(r.push(t);0<r.length;){for(var n=(t=r.pop()).children,a=n.length,o=0;o<a;++o)r.push(n[o]);t!==i&&(destroyTile(e,t),--e._statistics.numberOfTilesTotal)}i.children=[]}function unloadTile(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function destroyTile(e,t){e._cache.unloadTile(e,t,unloadTile),t.destroy()}function raiseLoadProgressEvent(e,t){var i=e._statistics,r=e._statisticsLast,n=i.numberOfPendingRequests,a=i.numberOfTilesProcessing,o=r.numberOfPendingRequests,s=r.numberOfTilesProcessing;Cesium3DTilesetStatistics.clone(i,r),(s=n!==o||a!==s)&&t.afterRender.push((function(){e.loadProgress.raiseEvent(n,a)})),e._tilesLoaded=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests,s&&e._tilesLoaded&&(t.afterRender.push((function(){e.allTilesLoaded.raiseEvent()})),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push((function(){e.initialTilesLoaded.raiseEvent()}))))}function resetMinimumMaximum(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function detectModelMatrixChanged(e,t){t.frameNumber===e._updatedModelMatrixFrame&&defined(e._previousModelMatrix)||(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!Matrix4.equals(e.modelMatrix,e._previousModelMatrix),e._previousModelMatrix=Matrix4.clone(e.modelMatrix,e._previousModelMatrix))}function update$4(e,t,i,r){if(t.mode===SceneMode$1.MORPHING)return!1;if(!e.ready)return!1;var n=e._statistics;n.clear();var a=r.isRender;++e._updatedVisibilityFrame,resetMinimumMaximum(e),detectModelMatrixChanged(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;var o=r.traversal.selectTiles(e,t);if(r.requestTiles&&requestTiles(e),updateTiles(e,t,r),Cesium3DTilesetStatistics.clone(n,i),a){var s=e._credits;if(defined(s)&&0!==n.selected)for(var l=s.length,c=0;c<l;++c)t.creditDisplay.addCredit(s[c])}return o}Cesium3DTileset.prototype.trimLoadedTiles=function(){this._cache.trim()},Cesium3DTileset.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)},Cesium3DTileset.prototype.updateForPass=function(e,t){var i,r,n,a,o,s,l,c,u=t.pass;u===Cesium3DTilePass$1.PRELOAD&&(!this.preloadWhenHidden||this.show)||!(u!==Cesium3DTilePass$1.PRELOAD_FLIGHT||this.preloadFlightDestinations&&(this.show||this.preloadWhenHidden))||u===Cesium3DTilePass$1.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show)||(i=e.commandList,r=e.camera,n=e.cullingVolume,t.ready=!1,o=(a=Cesium3DTilePass$1.getPassOptions(u)).ignoreCommands,l=(s=defaultValue(t.commandList,i)).length,e.commandList=s,e.camera=defaultValue(t.camera,r),e.cullingVolume=defaultValue(t.cullingVolume,n),c=this._statisticsPerPass[u],(this.show||o)&&(this._pass=u,t.ready=update$4(this,e,c,a)),o&&(s.length=l),e.commandList=i,e.camera=r,e.cullingVolume=n)},Cesium3DTileset.prototype.hasExtension=function(e){return!!defined(this._extensionsUsed)&&-1<this._extensionsUsed.indexOf(e)},Cesium3DTileset.prototype.isDestroyed=function(){return!1},Cesium3DTileset.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),defined(this._root)){var e=scratchStack$1;for(e.push(this._root);0<e.length;){var t=e.pop();t.destroy();for(var i=t.children,r=i.length,n=0;n<r;++n)e.push(i[n])}}return this._root=void 0,destroyObject(this)};var modelMatrixScratch=new Matrix4;function Cesium3DTilesetVisualizer(e,t){t.collectionChanged.addEventListener(Cesium3DTilesetVisualizer.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function removeTileset(e,t,i,r){var n=i[t.id];defined(n)&&(r.removeAndDestroy(n.tilesetPrimitive),delete i[t.id])}function checkLoad(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}Cesium3DTilesetVisualizer.prototype.update=function(e){for(var t=this._entitiesToVisualize.values,i=this._tilesetHash,r=this._primitives,n=0,a=t.length;n<a;n++){var o,s,l=t[n],c=l._tileset,u=i[l.id],d=l.isShowing&&l.isAvailable(e)&&Property.getValueOrDefault(c._show,e,!0);d&&(s=l.computeModelMatrix(e,modelMatrixScratch),o=Resource.createIfNeeded(Property.getValueOrUndefined(c._uri,e))),d?(d=defined(u)?u.tilesetPrimitive:void 0,defined(d)&&o.url===u.url||(defined(d)&&(r.removeAndDestroy(d),delete i[l.id]),(d=new Cesium3DTileset({url:o})).id=l,r.add(d),u={tilesetPrimitive:d,url:o.url,loadFail:!1},i[l.id]=u,checkLoad(d,l,i)),d.show=!0,defined(s)&&(d.modelMatrix=s),d.maximumScreenSpaceError=Property.getValueOrDefault(c.maximumScreenSpaceError,e,d.maximumScreenSpaceError)):defined(u)&&(u.tilesetPrimitive.show=!1)}return!0},Cesium3DTilesetVisualizer.prototype.isDestroyed=function(){return!1},Cesium3DTilesetVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Cesium3DTilesetVisualizer.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._tilesetHash,i=this._primitives,r=e.length-1;-1<r;r--)removeTileset(this,e[r],t,i);return destroyObject(this)},Cesium3DTilesetVisualizer.prototype.getBoundingSphere=function(e,t){return!defined(e=this._tilesetHash[e.id])||e.loadFail?BoundingSphereState$1.FAILED:defined(e=e.tilesetPrimitive)&&e.show?e.ready?(BoundingSphere.clone(e.boundingSphere,t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING:BoundingSphereState$1.FAILED},Cesium3DTilesetVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._entitiesToVisualize,o=this._tilesetHash,s=this._primitives,l=t.length-1;-1<l;l--)defined((n=t[l])._tileset)&&a.set(n.id,n);for(l=r.length-1;-1<l;l--)defined((n=r[l])._tileset)?a.set(n.id,n):(removeTileset(this,n,o,s),a.remove(n.id));for(l=i.length-1;-1<l;l--)removeTileset(this,n=i[l],o,s),a.remove(n.id)};var defaultEvenColor=Color.WHITE,defaultOddColor=Color.BLACK,defaultRepeat$1=new Cartesian2(2,2);function CheckerboardMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(CheckerboardMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._evenColor)&&Property.isConstant(this._oddColor)&&Property.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:createPropertyDescriptor("evenColor"),oddColor:createPropertyDescriptor("oddColor"),repeat:createPropertyDescriptor("repeat")}),CheckerboardMaterialProperty.prototype.getType=function(e){return"Checkerboard"},CheckerboardMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.lightColor=Property.getValueOrClonedDefault(this._evenColor,e,defaultEvenColor,t.lightColor),t.darkColor=Property.getValueOrClonedDefault(this._oddColor,e,defaultOddColor,t.darkColor),t.repeat=Property.getValueOrDefault(this._repeat,e,defaultRepeat$1),t},CheckerboardMaterialProperty.prototype.equals=function(e){return this===e||e instanceof CheckerboardMaterialProperty&&Property.equals(this._evenColor,e._evenColor)&&Property.equals(this._oddColor,e._oddColor)&&Property.equals(this._repeat,e._repeat)};var entityOptionsScratch={id:void 0};function fireChangedEvent(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){var t=e._addedEntities,i=e._removedEntities,r=e._changedEntities;if(0!==r.length||0!==t.length||0!==i.length){e._firing=!0;do{e._refire=!1;var n=t.values.slice(0),a=i.values.slice(0),o=r.values.slice(0);t.removeAll(),i.removeAll(),r.removeAll(),e._collectionChanged.raiseEvent(e,n,a,o)}while(e._refire);e._firing=!1}}}function EntityCollection(e){this._owner=e,this._entities=new AssociativeArray,this._addedEntities=new AssociativeArray,this._removedEntities=new AssociativeArray,this._changedEntities=new AssociativeArray,this._suspendCount=0,this._collectionChanged=new Event,this._id=createGuid(),this._show=!0,this._firing=!1,this._refire=!1}EntityCollection.prototype.suspendEvents=function(){this._suspendCount++},EntityCollection.prototype.resumeEvents=function(){this._suspendCount--,fireChangedEvent(this)},EntityCollection.collectionChangedEventCallback=void 0,Object.defineProperties(EntityCollection.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(e!==this._show){this.suspendEvents();for(var t=[],i=this._entities.values,r=i.length,n=0;n<r;n++)t.push(i[n].isShowing);for(this._show=e,n=0;n<r;n++){var a=t[n],o=i[n];a!==o.isShowing&&o.definitionChanged.raiseEvent(o,"isShowing",o.isShowing,a)}this.resumeEvents()}}},owner:{get:function(){return this._owner}}}),EntityCollection.prototype.computeAvailability=function(){for(var e=Iso8601.MAXIMUM_VALUE,t=Iso8601.MINIMUM_VALUE,i=this._entities.values,r=0,n=i.length;r<n;r++){var a,o=i[r].availability;defined(o)&&(a=o.start,o=o.stop,JulianDate.lessThan(a,e)&&!a.equals(Iso8601.MINIMUM_VALUE)&&(e=a),JulianDate.greaterThan(o,t)&&!o.equals(Iso8601.MAXIMUM_VALUE)&&(t=o))}return Iso8601.MAXIMUM_VALUE.equals(e)&&(e=Iso8601.MINIMUM_VALUE),Iso8601.MINIMUM_VALUE.equals(t)&&(t=Iso8601.MAXIMUM_VALUE),new TimeInterval({start:e,stop:t})},EntityCollection.prototype.add=function(e){e instanceof Entity||(e=new Entity(e));var t=e.id,i=this._entities;if(i.contains(t))throw new RuntimeError("An entity with id "+t+" already exists in this collection.");return e.entityCollection=this,i.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(EntityCollection.prototype._onEntityDefinitionChanged,this),fireChangedEvent(this),e},EntityCollection.prototype.remove=function(e){return!!defined(e)&&this.removeById(e.id)},EntityCollection.prototype.contains=function(e){return this._entities.get(e.id)===e},EntityCollection.prototype.removeById=function(e){if(!defined(e))return!1;var t=this._entities.get(e);return!!this._entities.remove(e)&&(this._addedEntities.remove(e)||(this._removedEntities.set(e,t),this._changedEntities.remove(e)),this._entities.remove(e),t.definitionChanged.removeEventListener(EntityCollection.prototype._onEntityDefinitionChanged,this),fireChangedEvent(this),!0)},EntityCollection.prototype.removeAll=function(){for(var e=this._entities,t=e.length,i=e.values,r=this._addedEntities,n=this._removedEntities,a=0;a<t;a++){var o=i[a],s=o.id;defined(r.get(s))||(o.definitionChanged.removeEventListener(EntityCollection.prototype._onEntityDefinitionChanged,this),n.set(s,o))}e.removeAll(),r.removeAll(),this._changedEntities.removeAll(),fireChangedEvent(this)},EntityCollection.prototype.getById=function(e){return this._entities.get(e)},EntityCollection.prototype.getOrCreateEntity=function(e){var t=this._entities.get(e);return defined(t)||(entityOptionsScratch.id=e,t=new Entity(entityOptionsScratch),this.add(t)),t},EntityCollection.prototype._onEntityDefinitionChanged=function(e){var t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),fireChangedEvent(this)};var entityOptionsScratch$1={id:void 0},entityIdScratch=new Array(2);function clean(e){for(var t=e.propertyNames,i=t.length,r=0;r<i;r++)e[t[r]]=void 0;e._name=void 0,e._availability=void 0}function subscribeToEntity(e,t,i,r){entityIdScratch[0]=i,entityIdScratch[1]=r.id,t[JSON.stringify(entityIdScratch)]=r.definitionChanged.addEventListener(CompositeEntityCollection.prototype._onDefinitionChanged,e)}function unsubscribeFromEntity(e,t,i,r){entityIdScratch[0]=i,entityIdScratch[1]=r.id,t[r=JSON.stringify(entityIdScratch)](),t[r]=void 0}function recomposite(e){if(e._shouldRecomposite=!0,0===e._suspendCount){for(var t,i,r,n,a,o=e._collections,s=o.length,l=e._collectionsCopy,c=l.length,u=e._composite,d=new EntityCollection(e),h=e._eventHash,p=0;p<c;p++)for((n=l[p]).collectionChanged.removeEventListener(CompositeEntityCollection.prototype._onCollectionChanged,e),i=n.values,a=n.id,r=i.length-1;-1<r;r--)unsubscribeFromEntity(e,h,a,t=i[r]);for(p=s-1;0<=p;p--)for((n=o[p]).collectionChanged.addEventListener(CompositeEntityCollection.prototype._onCollectionChanged,e),i=n.values,a=n.id,r=i.length-1;-1<r;r--){subscribeToEntity(e,h,a,t=i[r]);var f=d.getById(t.id);defined(f)||(defined(f=u.getById(t.id))?clean(f):(entityOptionsScratch$1.id=t.id,f=new Entity(entityOptionsScratch$1)),d.add(f)),f.merge(t)}e._collectionsCopy=o.slice(0),u.suspendEvents(),u.removeAll();var m=d.values;for(p=0;p<m.length;p++)u.add(m[p]);u.resumeEvents()}}function CompositeEntityCollection(e,t){this._owner=t,this._composite=new EntityCollection(this),this._suspendCount=0,this._collections=defined(e)?e.slice():[],this._collectionsCopy=[],this._id=createGuid(),this._eventHash={},recomposite(this),this._shouldRecomposite=!1}function getCollectionIndex(e,t){return e.indexOf(t)}function swapCollections(e,t,i){var r,n=e._collections;(t=CesiumMath.clamp(t,0,n.length-1))!==(i=CesiumMath.clamp(i,0,n.length-1))&&(r=n[t],n[t]=n[i],n[i]=r,recomposite(e))}function subscribeAll(e,t,i,r){function n(){i.raiseEvent(e)}var a=[];t.removeAll();for(var o=r.length,s=0;s<o;s++){var l=r.get(s);defined(l.data)&&-1===a.indexOf(l.data)&&t.add(l.data.definitionChanged,n)}}function CompositeProperty(){this._eventHelper=new EventHelper,this._definitionChanged=new Event,this._intervals=new TimeIntervalCollection,this._intervals.changedEvent.addEventListener(CompositeProperty.prototype._intervalsChanged,this)}function CompositeMaterialProperty(){this._definitionChanged=new Event,this._composite=new CompositeProperty,this._composite.definitionChanged.addEventListener(CompositeMaterialProperty.prototype._raiseDefinitionChanged,this)}function CompositePositionProperty(e){this._referenceFrame=defaultValue(e,ReferenceFrame$1.FIXED),this._definitionChanged=new Event,this._composite=new CompositeProperty,this._composite.definitionChanged.addEventListener(CompositePositionProperty.prototype._raiseDefinitionChanged,this)}Object.defineProperties(CompositeEntityCollection.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}}),CompositeEntityCollection.prototype.addCollection=function(e,t){defined(t)?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),recomposite(this)},CompositeEntityCollection.prototype.removeCollection=function(e){return-1!==(e=this._collections.indexOf(e))&&(this._collections.splice(e,1),recomposite(this),!0)},CompositeEntityCollection.prototype.removeAllCollections=function(){this._collections.length=0,recomposite(this)},CompositeEntityCollection.prototype.containsCollection=function(e){return-1!==this._collections.indexOf(e)},CompositeEntityCollection.prototype.contains=function(e){return this._composite.contains(e)},CompositeEntityCollection.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)},CompositeEntityCollection.prototype.getCollection=function(e){return this._collections[e]},CompositeEntityCollection.prototype.getCollectionsLength=function(){return this._collections.length},CompositeEntityCollection.prototype.raiseCollection=function(e){swapCollections(this,e=getCollectionIndex(this._collections,e),e+1)},CompositeEntityCollection.prototype.lowerCollection=function(e){swapCollections(this,e=getCollectionIndex(this._collections,e),e-1)},CompositeEntityCollection.prototype.raiseCollectionToTop=function(e){var t=getCollectionIndex(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),recomposite(this))},CompositeEntityCollection.prototype.lowerCollectionToBottom=function(e){var t=getCollectionIndex(this._collections,e);0!==t&&(this._collections.splice(t,1),this._collections.splice(0,0,e),recomposite(this))},CompositeEntityCollection.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()},CompositeEntityCollection.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&0===this._suspendCount&&(recomposite(this),this._shouldRecomposite=!1),this._composite.resumeEvents()},CompositeEntityCollection.prototype.computeAvailability=function(){return this._composite.computeAvailability()},CompositeEntityCollection.prototype.getById=function(e){return this._composite.getById(e)},CompositeEntityCollection.prototype._onCollectionChanged=function(e,t,i){var r,n,a=this._collectionsCopy,o=a.length,s=this._composite;s.suspendEvents();for(var l=i.length,c=this._eventHash,u=e.id,d=0;d<l;d++){var h=i[d];unsubscribeFromEntity(this,c,u,h);for(var p=h.id,f=o-1;0<=f;f--)defined(r=a[f].getById(p))&&(defined(n)||clean(n=s.getById(p)),n.merge(r));defined(n)||s.removeById(p),n=void 0}var m=t.length;for(d=0;d<m;d++){var g=t[d];subscribeToEntity(this,c,u,g);var y=g.id;for(f=o-1;0<=f;f--)defined(r=a[f].getById(y))&&(defined(n)||(defined(n=s.getById(y))?clean(n):(entityOptionsScratch$1.id=y,n=new Entity(entityOptionsScratch$1),s.add(n))),n.merge(r));n=void 0}s.resumeEvents()},CompositeEntityCollection.prototype._onDefinitionChanged=function(e,t,i,r){for(var n=this._collections,a=this._composite,o=n.length,s=e.id,l=(a=a.getById(s))[t],c=(s=!defined(l),!0),u=o-1;0<=u;u--){var d=n[u].getById(e.id);if(defined(d)&&defined(d=d[t])){if(c){if(c=!1,!defined(d.merge)||!defined(d.clone)){l=d;break}l=d.clone(l)}l.merge(d)}}s&&-1===a.propertyNames.indexOf(t)&&a.addProperty(t),a[t]=l},Object.defineProperties(CompositeProperty.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),CompositeProperty.prototype.getValue=function(e,t){var i=this._intervals.findDataForIntervalContainingDate(e);if(defined(i))return i.getValue(e,t)},CompositeProperty.prototype.equals=function(e){return this===e||e instanceof CompositeProperty&&this._intervals.equals(e._intervals,Property.equals)},CompositeProperty.prototype._intervalsChanged=function(){subscribeAll(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)},Object.defineProperties(CompositeMaterialProperty.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),CompositeMaterialProperty.prototype.getType=function(e){var t=this._composite._intervals.findDataForIntervalContainingDate(e);if(defined(t))return t.getType(e)},CompositeMaterialProperty.prototype.getValue=function(e,t){var i=this._composite._intervals.findDataForIntervalContainingDate(e);if(defined(i))return i.getValue(e,t)},CompositeMaterialProperty.prototype.equals=function(e){return this===e||e instanceof CompositeMaterialProperty&&this._composite.equals(e._composite,Property.equals)},CompositeMaterialProperty.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(CompositePositionProperty.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),CompositePositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},CompositePositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){var r=this._composite._intervals.findDataForIntervalContainingDate(e);if(defined(r))return r.getValueInReferenceFrame(e,t,i)},CompositePositionProperty.prototype.equals=function(e){return this===e||e instanceof CompositePositionProperty&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,Property.equals)},CompositePositionProperty.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var defaultZIndex=new ConstantProperty(0);function GroundGeometryUpdater(e){GeometryUpdater.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}defined(Object.create)&&(GroundGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),GroundGeometryUpdater.prototype.constructor=GroundGeometryUpdater),Object.defineProperties(GroundGeometryUpdater.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),GroundGeometryUpdater.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!defined(t.height)&&!defined(t.extrudedHeight)&&GroundPrimitive.isSupported(this._scene)},GroundGeometryUpdater.prototype._getIsClosed=function(e){var t=e.height;e=e.extrudedHeight;return 0===t||defined(e)&&e!==t},GroundGeometryUpdater.prototype._computeCenter=DeveloperError.throwInstantiationError,GroundGeometryUpdater.prototype._onEntityPropertyChanged=function(e,t,i,r){GeometryUpdater.prototype._onEntityPropertyChanged.call(this,e,t,i,r),-1===this._observedPropertyNames.indexOf(t)||defined(i=this._entity[this._geometryPropertyName])&&(defined(i.zIndex)&&(defined(i.height)||defined(i.extrudedHeight))&&oneTimeWarning(oneTimeWarning.geometryZIndex),this._zIndex=defaultValue(i.zIndex,defaultZIndex),defined(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),r=i.heightReference,t=i.extrudedHeightReference,(defined(r)||defined(t))&&(i=new CallbackProperty(this._computeCenter.bind(this),!this._dynamic),this._terrainOffsetProperty=new TerrainOffsetProperty(this._scene,i,r,t)))},GroundGeometryUpdater.prototype.destroy=function(){defined(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),GeometryUpdater.prototype.destroy.call(this)},GroundGeometryUpdater.getGeometryHeight=function(e,t){if(defined(e))return t!==HeightReference$1.CLAMP_TO_GROUND?e:0;t!==HeightReference$1.NONE&&oneTimeWarning(oneTimeWarning.geometryHeightReference)},GroundGeometryUpdater.getGeometryExtrudedHeight=function(e,t){if(defined(e))return t!==HeightReference$1.CLAMP_TO_GROUND?e:GroundGeometryUpdater.CLAMP_TO_GROUND;t!==HeightReference$1.NONE&&oneTimeWarning(oneTimeWarning.geometryExtrudedHeightReference)},GroundGeometryUpdater.CLAMP_TO_GROUND="clamp",GroundGeometryUpdater.computeGeometryOffsetAttribute=function(e,t,i,r){return defined(e)&&defined(t)||(t=HeightReference$1.NONE),defined(i)&&defined(r)||(r=HeightReference$1.NONE),i=0,t!==HeightReference$1.NONE&&i++,r===HeightReference$1.RELATIVE_TO_GROUND&&i++,2===i?GeometryOffsetAttribute$1.ALL:1===i?GeometryOffsetAttribute$1.TOP:void 0};var scratchColor$9=new Color,defaultOffset$1=Cartesian3.ZERO,offsetScratch$4=new Cartesian3,scratchRectangle$3=new Rectangle;function CorridorGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function CorridorGeometryUpdater(e,t){GroundGeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new CorridorGeometryOptions(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function DynamicCorridorGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}function DataSource(){DeveloperError.throwInstantiationError()}function PointPrimitive(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).translucencyByDistance,r=e.scaleByDistance,n=e.distanceDisplayCondition;defined(i)&&(i=NearFarScalar.clone(i)),defined(r)&&(r=NearFarScalar.clone(r)),defined(n)&&(n=DistanceDisplayCondition.clone(n)),this._show=defaultValue(e.show,!0),this._position=Cartesian3.clone(defaultValue(e.position,Cartesian3.ZERO)),this._actualPosition=Cartesian3.clone(this._position),this._color=Color.clone(defaultValue(e.color,Color.WHITE)),this._outlineColor=Color.clone(defaultValue(e.outlineColor,Color.TRANSPARENT)),this._outlineWidth=defaultValue(e.outlineWidth,0),this._pixelSize=defaultValue(e.pixelSize,10),this._scaleByDistance=r,this._translucencyByDistance=i,this._distanceDisplayCondition=n,this._disableDepthTestDistance=defaultValue(e.disableDepthTestDistance,0),this._id=e.id,this._collection=defaultValue(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}defined(Object.create)&&(CorridorGeometryUpdater.prototype=Object.create(GroundGeometryUpdater.prototype),CorridorGeometryUpdater.prototype.constructor=CorridorGeometryUpdater),CorridorGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n={show:new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$9)),defined(t)||(t=Color.WHITE),n.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$1,offsetScratch$4))),new GeometryInstance({id:i,geometry:new CorridorGeometry(this._options),attributes:n})},CorridorGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$9);r={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return defined(this._options.offsetAttribute)&&(r.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$1,offsetScratch$4))),new GeometryInstance({id:t,geometry:new CorridorOutlineGeometry(this._options),attributes:r})},CorridorGeometryUpdater.prototype._computeCenter=function(e,t){if(defined(e=Property.getValueOrUndefined(this._entity.corridor.positions,e))&&0!==e.length)return Cartesian3.clone(e[Math.floor(e.length/2)],t)},CorridorGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.positions)||!defined(t.width)||GeometryUpdater.prototype._isHidden.call(this,e,t)},CorridorGeometryUpdater.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!Property.isConstant(t.height)||!Property.isConstant(t.extrudedHeight)||!Property.isConstant(t.granularity)||!Property.isConstant(t.width)||!Property.isConstant(t.outlineWidth)||!Property.isConstant(t.cornerType)||!Property.isConstant(t.zIndex)||this._onTerrain&&!Property.isConstant(this._materialProperty)&&!(this._materialProperty instanceof ColorMaterialProperty)},CorridorGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrUndefined(t.height,Iso8601.MINIMUM_VALUE),r=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),n=Property.getValueOrUndefined(t.extrudedHeight,Iso8601.MINIMUM_VALUE),a=Property.getValueOrDefault(t.extrudedHeightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE);defined(n)&&!defined(i)&&(i=0);var o=this._options;o.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,o.positions=t.positions.getValue(Iso8601.MINIMUM_VALUE,o.positions),o.width=t.width.getValue(Iso8601.MINIMUM_VALUE),o.granularity=Property.getValueOrUndefined(t.granularity,Iso8601.MINIMUM_VALUE),o.cornerType=Property.getValueOrUndefined(t.cornerType,Iso8601.MINIMUM_VALUE),o.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(i,r,n,a),o.height=GroundGeometryUpdater.getGeometryHeight(i,r),(n=GroundGeometryUpdater.getGeometryExtrudedHeight(n,a))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(n=ApproximateTerrainHeights.getMinimumMaximumHeights(CorridorGeometry.computeRectangle(o,scratchRectangle$3)).minimumTerrainHeight),o.extrudedHeight=n},CorridorGeometryUpdater.DynamicGeometryUpdater=DynamicCorridorGeometryUpdater,defined(Object.create)&&(DynamicCorridorGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicCorridorGeometryUpdater.prototype.constructor=DynamicCorridorGeometryUpdater),DynamicCorridorGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(r.positions)||!defined(r.width)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicCorridorGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options,n=Property.getValueOrUndefined(t.height,i),a=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),o=Property.getValueOrUndefined(t.extrudedHeight,i),s=Property.getValueOrDefault(t.extrudedHeightReference,i,HeightReference$1.NONE);defined(o)&&!defined(n)&&(n=0),r.positions=Property.getValueOrUndefined(t.positions,i),r.width=Property.getValueOrUndefined(t.width,i),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.cornerType=Property.getValueOrUndefined(t.cornerType,i),r.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(n,a,o,s),r.height=GroundGeometryUpdater.getGeometryHeight(n,a),(o=GroundGeometryUpdater.getGeometryExtrudedHeight(o,s))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(o=ApproximateTerrainHeights.getMinimumMaximumHeights(CorridorGeometry.computeRectangle(r,scratchRectangle$3)).minimumTerrainHeight),r.extrudedHeight=o},Object.defineProperties(DataSource.prototype,{name:{get:DeveloperError.throwInstantiationError},clock:{get:DeveloperError.throwInstantiationError},entities:{get:DeveloperError.throwInstantiationError},isLoading:{get:DeveloperError.throwInstantiationError},changedEvent:{get:DeveloperError.throwInstantiationError},errorEvent:{get:DeveloperError.throwInstantiationError},loadingEvent:{get:DeveloperError.throwInstantiationError},show:{get:DeveloperError.throwInstantiationError},clustering:{get:DeveloperError.throwInstantiationError}}),DataSource.prototype.update=function(e){DeveloperError.throwInstantiationError()},DataSource.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var SHOW_INDEX$4=PointPrimitive.SHOW_INDEX=0,POSITION_INDEX$4=PointPrimitive.POSITION_INDEX=1,COLOR_INDEX$2=PointPrimitive.COLOR_INDEX=2,OUTLINE_COLOR_INDEX=PointPrimitive.OUTLINE_COLOR_INDEX=3,OUTLINE_WIDTH_INDEX=PointPrimitive.OUTLINE_WIDTH_INDEX=4,PIXEL_SIZE_INDEX=PointPrimitive.PIXEL_SIZE_INDEX=5,SCALE_BY_DISTANCE_INDEX$2=PointPrimitive.SCALE_BY_DISTANCE_INDEX=6,TRANSLUCENCY_BY_DISTANCE_INDEX$2=PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX=7,DISTANCE_DISPLAY_CONDITION_INDEX$1=PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX=8,DISABLE_DEPTH_DISTANCE_INDEX=PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX=9;function makeDirty$2(e,t){var i=e._pointPrimitiveCollection;defined(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}PointPrimitive.NUMBER_OF_PROPERTIES=10,Object.defineProperties(PointPrimitive.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,makeDirty$2(this,SHOW_INDEX$4))}},position:{get:function(){return this._position},set:function(e){var t=this._position;Cartesian3.equals(t,e)||(Cartesian3.clone(e,t),Cartesian3.clone(e,this._actualPosition),makeDirty$2(this,POSITION_INDEX$4))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;NearFarScalar.equals(t,e)||(this._scaleByDistance=NearFarScalar.clone(e,t),makeDirty$2(this,SCALE_BY_DISTANCE_INDEX$2))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;NearFarScalar.equals(t,e)||(this._translucencyByDistance=NearFarScalar.clone(e,t),makeDirty$2(this,TRANSLUCENCY_BY_DISTANCE_INDEX$2))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,makeDirty$2(this,PIXEL_SIZE_INDEX))}},color:{get:function(){return this._color},set:function(e){var t=this._color;Color.equals(t,e)||(Color.clone(e,t),makeDirty$2(this,COLOR_INDEX$2))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;Color.equals(t,e)||(Color.clone(e,t),makeDirty$2(this,OUTLINE_COLOR_INDEX))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,makeDirty$2(this,OUTLINE_WIDTH_INDEX))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){DistanceDisplayCondition.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition),makeDirty$2(this,DISTANCE_DISPLAY_CONDITION_INDEX$1))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,makeDirty$2(this,DISABLE_DEPTH_DISTANCE_INDEX))}},id:{get:function(){return this._id},set:function(e){this._id=e,defined(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,makeDirty$2(this,SHOW_INDEX$4))}}}),PointPrimitive.prototype.getPickId=function(e){return defined(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},PointPrimitive.prototype._getActualPosition=function(){return this._actualPosition},PointPrimitive.prototype._setActualPosition=function(e){Cartesian3.clone(e,this._actualPosition),makeDirty$2(this,POSITION_INDEX$4)};var tempCartesian3$1=new Cartesian4;PointPrimitive._computeActualPosition=function(e,t,i){return t.mode===SceneMode$1.SCENE3D?e:(Matrix4.multiplyByPoint(i,e,tempCartesian3$1),SceneTransforms.computeActualWgs84Position(t,tempCartesian3$1))};var scratchCartesian4$4=new Cartesian4;PointPrimitive._computeScreenSpacePosition=function(e,t,i,r){return t=Matrix4.multiplyByVector(e,Cartesian4.fromElements(t.x,t.y,t.z,1,scratchCartesian4$4),scratchCartesian4$4),SceneTransforms.wgs84ToWindowCoordinates(i,t,r)},PointPrimitive.prototype.computeScreenSpacePosition=function(e,t){var i=this._pointPrimitiveCollection;if(defined(t)||(t=new Cartesian2),i=i.modelMatrix,defined(t=PointPrimitive._computeScreenSpacePosition(i,this._actualPosition,e,t)))return t.y=e.canvas.clientHeight-t.y,t},PointPrimitive.getScreenSpaceBoundingBox=function(e,t,i){var r=.5*(n=e.pixelSize),n=(e=t.x-r,t=t.y-r,r=n,n);return defined(i)||(i=new BoundingRectangle),i.x=e,i.y=t,i.width=r,i.height=n,i},PointPrimitive.prototype.equals=function(e){return this===e||defined(e)&&this._id===e._id&&Cartesian3.equals(this._position,e._position)&&Color.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&Color.equals(this._outlineColor,e._outlineColor)&&NearFarScalar.equals(this._scaleByDistance,e._scaleByDistance)&&NearFarScalar.equals(this._translucencyByDistance,e._translucencyByDistance)&&DistanceDisplayCondition.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},PointPrimitive.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var PointPrimitiveCollectionFS="varying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvoid main()\n{\nfloat distanceToCenter = length(gl_PointCoord - vec2(0.5));\nfloat maxDistance = max(0.0, 0.5 - v_pixelDistance);\nfloat wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\nfloat innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\nvec4 color = mix(v_outlineColor, v_color, innerAlpha);\ncolor.a *= wholeAlpha;\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\ngl_FragColor = czm_gammaCorrect(color);\nczm_writeLogDepth();\n}\n",PointPrimitiveCollectionVS="uniform float u_maxTotalPointSize;\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 scaleByDistance;\nattribute vec3 distanceDisplayConditionAndDisableDepth;\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nvoid main()\n{\nvec3 positionHigh = positionHighAndSize.xyz;\nvec3 positionLow = positionLowAndOutline.xyz;\nfloat outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\nfloat totalSize = positionHighAndSize.w + outlineWidthBothSides;\nfloat outlinePercent = outlineWidthBothSides / totalSize;\ntotalSize *= czm_pixelRatio;\ntotalSize += 3.0;\nfloat temp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat show = floor(temp);\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\nvec4 color;\nvec4 outlineColor;\nvec4 pickColor;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute0.x * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute0.y * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = compressedAttribute0.w * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor = pickColor / 255.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\ntotalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\ntotalSize = min(totalSize, u_maxTotalPointSize);\nif (totalSize < 1.0)\n{\npositionEC.xyz = vec3(0.0);\ntotalSize = 1.0;\n}\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency < 0.004)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = distanceDisplayConditionAndDisableDepth.x;\nfloat farSq = distanceDisplayConditionAndDisableDepth.y;\nif (lengthSq < nearSq || lengthSq > farSq) {\npositionEC.xyz = vec3(0.0, 0.0, 1.0);\n}\n#endif\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\nbool clipped = (zclip < -1.0 || zclip > 1.0);\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\ngl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n}\n}\n#endif\nv_color = color;\nv_color.a *= translucency * show;\nv_outlineColor = outlineColor;\nv_outlineColor.a *= translucency * show;\nv_innerPercent = 1.0 - outlinePercent;\nv_pixelDistance = 2.0 / totalSize;\ngl_PointSize = totalSize * show;\ngl_Position *= show;\nv_pickColor = pickColor;\n}\n",SHOW_INDEX$5=PointPrimitive.SHOW_INDEX,POSITION_INDEX$5=PointPrimitive.POSITION_INDEX,COLOR_INDEX$3=PointPrimitive.COLOR_INDEX,OUTLINE_COLOR_INDEX$1=PointPrimitive.OUTLINE_COLOR_INDEX,OUTLINE_WIDTH_INDEX$1=PointPrimitive.OUTLINE_WIDTH_INDEX,PIXEL_SIZE_INDEX$1=PointPrimitive.PIXEL_SIZE_INDEX,SCALE_BY_DISTANCE_INDEX$3=PointPrimitive.SCALE_BY_DISTANCE_INDEX,TRANSLUCENCY_BY_DISTANCE_INDEX$3=PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX,DISTANCE_DISPLAY_CONDITION_INDEX$2=PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX,DISABLE_DEPTH_DISTANCE_INDEX$1=PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX,NUMBER_OF_PROPERTIES$3=PointPrimitive.NUMBER_OF_PROPERTIES,attributeLocations$3={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepth:5};function PointPrimitiveCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(NUMBER_OF_PROPERTIES$3),this._maxPixelSize=1,this._baseVolume=new BoundingSphere,this._baseVolumeWC=new BoundingSphere,this._baseVolume2D=new BoundingSphere,this._boundingVolume=new BoundingSphere,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.blendOption=defaultValue(e.blendOption,BlendOption$1.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=SceneMode$1.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW];var t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}function destroyPointPrimitives(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function removePointPrimitives(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;for(var t=[],i=e._pointPrimitives,r=i.length,n=0,a=0;n<r;++n){var o=i[n];o&&(o._index=a++,t.push(o))}e._pointPrimitives=t}}function createVAF$1(e,t,i){return new VertexArrayFacade(e,[{index:attributeLocations$3.positionHighAndSize,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[POSITION_INDEX$5]},{index:attributeLocations$3.positionLowAndShow,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[POSITION_INDEX$5]},{index:attributeLocations$3.compressedAttribute0,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[COLOR_INDEX$3]},{index:attributeLocations$3.compressedAttribute1,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[TRANSLUCENCY_BY_DISTANCE_INDEX$3]},{index:attributeLocations$3.scaleByDistance,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[SCALE_BY_DISTANCE_INDEX$3]},{index:attributeLocations$3.distanceDisplayConditionAndDisableDepth,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[DISTANCE_DISPLAY_CONDITION_INDEX$2]}],t)}Object.defineProperties(PointPrimitiveCollection.prototype,{length:{get:function(){return removePointPrimitives(this),this._pointPrimitives.length}}}),PointPrimitiveCollection.prototype.add=function(e){return(e=new PointPrimitive(e,this))._index=this._pointPrimitives.length,this._pointPrimitives.push(e),this._createVertexArray=!0,e},PointPrimitiveCollection.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},PointPrimitiveCollection.prototype.removeAll=function(){destroyPointPrimitives(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},PointPrimitiveCollection.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},PointPrimitiveCollection.prototype.contains=function(e){return defined(e)&&e._pointPrimitiveCollection===this},PointPrimitiveCollection.prototype.get=function(e){return removePointPrimitives(this),this._pointPrimitives[e]},PointPrimitiveCollection.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,r=0;r<NUMBER_OF_PROPERTIES$3;++r){var n=0===i[r]?BufferUsage$1.STATIC_DRAW:BufferUsage$1.STREAM_DRAW;t=t||e[r]!==n;e[r]=n}return t};var writePositionScratch$1=new EncodedCartesian3;function writePositionSizeAndOutline(e,t,i,r){var n=r._index,a=r._getActualPosition();e._mode===SceneMode$1.SCENE3D&&(BoundingSphere.expand(e._baseVolume,a,e._baseVolume),e._boundingVolumeDirty=!0),EncodedCartesian3.fromCartesian(a,writePositionScratch$1);var o=r.pixelSize;a=r.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,o+a),(r=i[attributeLocations$3.positionHighAndSize])(n,(e=writePositionScratch$1.high).x,e.y,e.z,o),(o=i[attributeLocations$3.positionLowAndOutline])(n,(i=writePositionScratch$1.low).x,i.y,i.z,a)}var LEFT_SHIFT16$1=65536,LEFT_SHIFT8$1=256;function writeCompressedAttrib0$1(e,t,i,r){var n=r._index,a=r.color,o=r.getPickId(t).color,s=r.outlineColor,l=Color.floatToByte(a.red),c=Color.floatToByte(a.green),u=Color.floatToByte(a.blue);t=l*LEFT_SHIFT16$1+c*LEFT_SHIFT8$1+u,l=Color.floatToByte(s.red),c=Color.floatToByte(s.green),u=Color.floatToByte(s.blue),r=l*LEFT_SHIFT16$1+c*LEFT_SHIFT8$1+u;l=Color.floatToByte(o.red),c=Color.floatToByte(o.green),u=Color.floatToByte(o.blue),u=l*LEFT_SHIFT16$1+c*LEFT_SHIFT8$1+u,o=Color.floatToByte(a.alpha)*LEFT_SHIFT16$1+Color.floatToByte(s.alpha)*LEFT_SHIFT8$1+Color.floatToByte(o.alpha),(0,i[attributeLocations$3.compressedAttribute0])(n,t,r,u,o)}function writeCompressedAttrib1$1(e,t,i,r){var n=r._index,a=0,o=1,s=1,l=1,c=r.translucencyByDistance;defined(c)&&(a=c.near,o=c.nearValue,s=c.far,l=c.farValue,1===o&&1===l||(e._shaderTranslucencyByDistance=!0)),e=r.show&&r.clusterShow,0===r.color.alpha&&0===r.outlineColor.alpha&&(e=!1),o=CesiumMath.clamp(o,0,1),o=(e?1:0)*LEFT_SHIFT8$1+(o=1===o?255:255*o|0),l=1===(l=CesiumMath.clamp(l,0,1))?255:255*l|0,(0,i[attributeLocations$3.compressedAttribute1])(n,o,l,a,s)}function writeScaleByDistance$1(e,t,i,r){var n=r._index,a=i[attributeLocations$3.scaleByDistance],o=0,s=1,l=1;i=1;defined(r=r.scaleByDistance)&&(o=r.near,s=r.nearValue,l=r.far,i=r.farValue,1===s&&1===i||(e._shaderScaleByDistance=!0)),a(n,o,s,l,i)}function writeDistanceDisplayConditionAndDepthDisable(e,t,i,r){var n=r._index,a=i[attributeLocations$3.distanceDisplayConditionAndDisableDepth],o=0,s=Number.MAX_VALUE;defined(i=r.distanceDisplayCondition)&&(o=i.near,s=i.far,o*=o,s*=s,e._shaderDistanceDisplayCondition=!0),r=r.disableDepthTestDistance,0<(r*=r)&&(e._shaderDisableDepthDistance=!0,r===Number.POSITIVE_INFINITY&&(r=-1)),a(n,o,s,r)}function writePointPrimitive(e,t,i,r){writePositionSizeAndOutline(e,t,i,r),writeCompressedAttrib0$1(e,t,i,r),writeCompressedAttrib1$1(e,t,i,r),writeScaleByDistance$1(e,t,i,r),writeDistanceDisplayConditionAndDepthDisable(e,t,i,r)}function recomputeActualPositions$1(e,t,i,r,n,a){var o;r.mode===SceneMode$1.SCENE3D?(o=e._baseVolume,e._boundingVolumeDirty=!0):o=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var c=t[l],u=c.position;defined(u=PointPrimitive._computeActualPosition(u,r,n))&&(c._setActualPosition(u),a?s.push(u):BoundingSphere.expand(o,u,o))}a&&BoundingSphere.fromPoints(s,o)}function updateMode$2(e,t){var i=t.mode,r=e._pointPrimitives,n=e._pointPrimitivesToUpdate,a=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==SceneMode$1.SCENE3D&&!Matrix4.equals(a,e.modelMatrix)?(e._mode=i,Matrix4.clone(e.modelMatrix,a),e._createVertexArray=!0,i!==SceneMode$1.SCENE3D&&i!==SceneMode$1.SCENE2D&&i!==SceneMode$1.COLUMBUS_VIEW||recomputeActualPositions$1(e,r,r.length,t,a,!0)):i===SceneMode$1.MORPHING?recomputeActualPositions$1(e,r,r.length,t,a,!0):i!==SceneMode$1.SCENE2D&&i!==SceneMode$1.COLUMBUS_VIEW||recomputeActualPositions$1(e,n,e._pointPrimitivesToUpdateIndex,t,a,!1)}function updateBoundingVolume$1(e,t,i){e=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize,i.radius+=e}var scratchWriterArray$1=[];function kdbush(e,t,i,r,n){return new KDBush(e,t,i,r,n)}function KDBush(e,t,i,r,n){t=t||defaultGetX,i=i||defaultGetY,n=n||Array,this.nodeSize=r||64,this.points=e,this.ids=new n(e.length),this.coords=new n(2*e.length);for(var a=0;a<e.length;a++)this.ids[a]=a,this.coords[2*a]=t(e[a]),this.coords[2*a+1]=i(e[a]);sort$1(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function defaultGetX(e){return e[0]}function defaultGetY(e){return e[1]}function range(e,t,i,r,n,a,o){for(var s=[0,e.length-1,0],l=[];s.length;){var c=s.pop(),u=s.pop(),d=s.pop();if(u-d<=o)for(var h=d;h<=u;h++)f=t[2*h],m=t[2*h+1],i<=f&&f<=n&&r<=m&&m<=a&&l.push(e[h]);else{var p=Math.floor((d+u)/2),f=t[2*p],m=t[2*p+1];i<=f&&f<=n&&r<=m&&m<=a&&l.push(e[p]);var g=(c+1)%2;(0===c?i<=f:r<=m)&&(s.push(d),s.push(p-1),s.push(g)),(0===c?f<=n:m<=a)&&(s.push(p+1),s.push(u),s.push(g))}}return l}function sort$1(e,t,i,r,n,a){var o;n-r<=i||(select(e,t,o=Math.floor((r+n)/2),r,n,a%2),sort$1(e,t,i,r,o-1,a+1),sort$1(e,t,i,o+1,n,a+1))}function select(e,t,i,r,n,a){for(;r<n;){var o,s,l,c;600<n-r&&(o=n-r+1,s=i-r+1,c=Math.log(o),l=.5*Math.exp(2*c/3),c=.5*Math.sqrt(c*l*(o-l)/o)*(s-o/2<0?-1:1),select(e,t,i,Math.max(r,Math.floor(i-s*l/o+c)),Math.min(n,Math.floor(i+(o-s)*l/o+c)),a));var u=t[2*i+a],d=r,h=n;for(swapItem(e,t,r,i),t[2*n+a]>u&&swapItem(e,t,r,n);d<h;){for(swapItem(e,t,d,h),d++,h--;t[2*d+a]<u;)d++;for(;t[2*h+a]>u;)h--}t[2*r+a]===u?swapItem(e,t,r,h):swapItem(e,t,++h,n),h<=i&&(r=h+1),i<=h&&(n=h-1)}}function swapItem(e,t,i,r){swap$2(e,i,r),swap$2(t,2*i,2*r),swap$2(t,2*i+1,2*r+1)}function swap$2(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function within(e,t,i,r,n,a){for(var o=[0,e.length-1,0],s=[],l=n*n;o.length;){var c=o.pop(),u=o.pop(),d=o.pop();if(u-d<=a)for(var h=d;h<=u;h++)sqDist(t[2*h],t[2*h+1],i,r)<=l&&s.push(e[h]);else{var p=Math.floor((d+u)/2),f=t[2*p],m=t[2*p+1];sqDist(f,m,i,r)<=l&&s.push(e[p]);var g=(c+1)%2;(0===c?i-n<=f:r-n<=m)&&(o.push(d),o.push(p-1),o.push(g)),(0===c?f<=i+n:m<=r+n)&&(o.push(p+1),o.push(u),o.push(g))}}return s}function sqDist(e,t,i,r){return(i=e-i)*i+(r=t-r)*r}function EntityCluster(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._enabled=defaultValue(e.enabled,!1),this._pixelRange=defaultValue(e.pixelRange,80),this._minimumClusterSize=defaultValue(e.minimumClusterSize,2),this._clusterBillboards=defaultValue(e.clusterBillboards,!0),this._clusterLabels=defaultValue(e.clusterLabels,!0),this._clusterPoints=defaultValue(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new Event}function getX(e){return e.coord.x}function getY(e){return e.coord.y}function expandBoundingBox(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}PointPrimitiveCollection.prototype.update=function(e){removePointPrimitives(this),this._maxTotalPointSize=ContextLimits.maximumAliasedPointSize,updateMode$2(this,e);var t=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,r=this._pointPrimitivesToUpdateIndex,n=this._propertiesChanged,a=this._createVertexArray,o=e.context,s=e.passes,l=s.pick;if(a||!l&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var c=0;c<NUMBER_OF_PROPERTIES$3;++c)n[c]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),0<t){this._vaf=createVAF$1(o,t,this._buffersUsage),f=this._vaf.writers;for(var u=0;u<t;++u){var d=this._pointPrimitives[u];d._dirty=!1,writePointPrimitive(this,o,f,d)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(0<r){var h=scratchWriterArray$1;h.length=0,(n[POSITION_INDEX$5]||n[OUTLINE_WIDTH_INDEX$1]||n[PIXEL_SIZE_INDEX$1])&&h.push(writePositionSizeAndOutline),(n[COLOR_INDEX$3]||n[OUTLINE_COLOR_INDEX$1])&&h.push(writeCompressedAttrib0$1),(n[SHOW_INDEX$5]||n[TRANSLUCENCY_BY_DISTANCE_INDEX$3])&&h.push(writeCompressedAttrib1$1),n[SCALE_BY_DISTANCE_INDEX$3]&&h.push(writeScaleByDistance$1),(n[DISTANCE_DISPLAY_CONDITION_INDEX$2]||n[DISABLE_DEPTH_DISTANCE_INDEX$1])&&h.push(writeDistanceDisplayConditionAndDepthDisable);var p=h.length,f=this._vaf.writers;if(.1<r/t){for(var m=0;m<r;++m){var g=i[m];g._dirty=!1;for(var y=0;y<p;++y)h[y](this,o,f,g)}this._vaf.commit()}else{for(var _=0;_<r;++_){var v=i[_];v._dirty=!1;for(var C=0;C<p;++C)h[C](this,o,f,v);this._vaf.subCommit(v._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(1.5*t<r&&(i.length=t),defined(this._vaf)&&defined(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,BoundingSphere.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var x,b=Matrix4.IDENTITY;updateBoundingVolume$1(this,e,x=e.mode===SceneMode$1.SCENE3D?(b=this.modelMatrix,BoundingSphere.clone(this._baseVolumeWC,this._boundingVolume)):BoundingSphere.clone(this._baseVolume2D,this._boundingVolume));var S;a=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,a&&(this._blendOption===BlendOption$1.OPAQUE||this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=RenderState.fromCache({depthTest:{enabled:!0,func:WebGLConstants$1.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===BlendOption$1.TRANSLUCENT||this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=RenderState.fromCache({depthTest:{enabled:!0,func:WebGLConstants$1.LEQUAL},depthMask:!1,blending:BlendingState$1.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(a||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(a=new ShaderSource({sources:[PointPrimitiveCollectionVS]}),this._shaderScaleByDistance&&a.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&a.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&a.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&a.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT&&(S=new ShaderSource({defines:["OPAQUE"],sources:[PointPrimitiveCollectionFS]}),this._sp=ShaderProgram.replaceCache({context:o,shaderProgram:this._sp,vertexShaderSource:a,fragmentShaderSource:S,attributeLocations:attributeLocations$3}),S=new ShaderSource({defines:["TRANSLUCENT"],sources:[PointPrimitiveCollectionFS]}),this._spTranslucent=ShaderProgram.replaceCache({context:o,shaderProgram:this._spTranslucent,vertexShaderSource:a,fragmentShaderSource:S,attributeLocations:attributeLocations$3})),this._blendOption===BlendOption$1.OPAQUE&&(S=new ShaderSource({sources:[PointPrimitiveCollectionFS]}),this._sp=ShaderProgram.replaceCache({context:o,shaderProgram:this._sp,vertexShaderSource:a,fragmentShaderSource:S,attributeLocations:attributeLocations$3})),this._blendOption===BlendOption$1.TRANSLUCENT&&(S=new ShaderSource({sources:[PointPrimitiveCollectionFS]}),this._spTranslucent=ShaderProgram.replaceCache({context:o,shaderProgram:this._spTranslucent,vertexShaderSource:a,fragmentShaderSource:S,attributeLocations:attributeLocations$3})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);var T=e.commandList;if(s.render||l){var E,w=this._colorCommands,A=this._blendOption===BlendOption$1.OPAQUE,P=this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT;l=(E=this._vaf.va).length;w.length=l;for(var D=P?2*l:l,M=0;M<D;++M){var I,R=A||P&&M%2==0;defined(I=w[M])||(I=w[M]=new DrawCommand),I.primitiveType=PrimitiveType$1.POINTS,I.pass=R||!P?Pass$1.OPAQUE:Pass$1.TRANSLUCENT,I.owner=this;var O=P?Math.floor(M/2):M;I.boundingVolume=x,I.modelMatrix=b,I.shaderProgram=R?this._sp:this._spTranslucent,I.uniformMap=this._uniforms,I.vertexArray=E[O].va,I.renderState=R?this._rsOpaque:this._rsTranslucent,I.debugShowBoundingVolume=this.debugShowBoundingVolume,I.pickId="v_pickColor",T.push(I)}}}},PointPrimitiveCollection.prototype.isDestroyed=function(){return!1},PointPrimitiveCollection.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),destroyPointPrimitives(this._pointPrimitives),destroyObject(this)},KDBush.prototype={range:function(e,t,i,r){return range(this.ids,this.coords,e,t,i,r,this.nodeSize)},within:function(e,t,i){return within(this.ids,this.coords,e,t,i,this.nodeSize)}};var labelBoundingBoxScratch=new BoundingRectangle;function getBoundingBox(e,t,i,r,n){return defined(e._labelCollection)&&r._clusterLabels?n=Label.getScreenSpaceBoundingBox(e,t,n):defined(e._billboardCollection)&&r._clusterBillboards?n=Billboard.getScreenSpaceBoundingBox(e,t,n):defined(e._pointPrimitiveCollection)&&r._clusterPoints&&(n=PointPrimitive.getScreenSpaceBoundingBox(e,t,n)),expandBoundingBox(n,i),r._clusterLabels&&!defined(e._labelCollection)&&defined(e.id)&&hasLabelIndex(r,e.id.id)&&defined(e.id._label)&&(e=r._collectionIndicesByEntity[e.id.id].labelIndex,e=r._labelCollection.get(e),expandBoundingBox(t=Label.getScreenSpaceBoundingBox(e,t,labelBoundingBoxScratch),i),n=BoundingRectangle.union(n,t,n)),n}function addNonClusteredItem(e,t){e.clusterShow=!0,!defined(e._labelCollection)&&defined(e.id)&&hasLabelIndex(t,e.id.id)&&defined(e.id._label)&&(e=t._collectionIndicesByEntity[e.id.id].labelIndex,t._labelCollection.get(e).clusterShow=!0)}function addCluster(e,t,i,r){var n={billboard:r._clusterBillboardCollection.add(),label:r._clusterLabelCollection.add(),point:r._clusterPointCollection.add()};n.billboard.show=!1,n.point.show=!1,n.label.show=!0,n.label.text=t.toLocaleString(),n.label.id=i,n.billboard.position=n.label.position=n.point.position=e,r._clusterEvent.raiseEvent(i,n)}function hasLabelIndex(e,t){return defined(e)&&defined(e._collectionIndicesByEntity[t])&&defined(e._collectionIndicesByEntity[t].labelIndex)}function getScreenSpacePositions(e,t,i,r,n){if(defined(e))for(var a=e.length,o=0;o<a;++o){var s,l,c,u=e.get(o);u.clusterShow=!1,u.show&&(n._scene.mode!==SceneMode$1.SCENE3D||r.isPointVisible(u.position))&&(s=n._clusterLabels&&defined(u._labelCollection),l=n._clusterBillboards&&defined(u.id._billboard),c=n._clusterPoints&&defined(u.id._point),s&&(c||l)||defined(u=u.computeScreenSpacePosition(i))&&t.push({index:o,collection:e,clustered:!1,coord:u}))}}var pointBoundinRectangleScratch=new BoundingRectangle,totalBoundingRectangleScratch=new BoundingRectangle,neighborBoundingRectangleScratch=new BoundingRectangle;function createDeclutterCallback(e){return function(t){if(!(defined(t)&&t<.05)&&e.enabled){var i=e._scene,r=e._labelCollection,n=e._billboardCollection,a=e._pointCollection;if((defined(r)||defined(n)||defined(a))&&(e._clusterBillboards||e._clusterLabels||e._clusterPoints)){var o=e._clusterLabelCollection,s=e._clusterBillboardCollection;t=e._clusterPointCollection;defined(o)?o.removeAll():o=e._clusterLabelCollection=new LabelCollection({scene:i}),defined(s)?s.removeAll():s=e._clusterBillboardCollection=new BillboardCollection({scene:i}),defined(t)?t.removeAll():t=e._clusterPointCollection=new PointPrimitiveCollection;var l,c,u,d,h=e._pixelRange,p=e._minimumClusterSize,f=e._previousClusters,m=[],g=e._previousHeight,y=i.camera.positionCartographic.height,_=new EllipsoidalOccluder(i.mapProjection.ellipsoid,i.camera.positionWC),v=[];e._clusterLabels&&getScreenSpacePositions(r,v,i,_,e),e._clusterBillboards&&getScreenSpacePositions(n,v,i,_,e),e._clusterPoints&&getScreenSpacePositions(a,v,i,_,e);var C=kdbush(v,getX,getY,64,Int32Array);if(y<g)for(c=f.length,l=0;l<c;++l){var x=f[l];if(_.isPointVisible(x.position)){var b=Billboard._computeScreenSpacePosition(Matrix4.IDENTITY,x.position,Cartesian3.ZERO,Cartesian2.ZERO,i);if(defined(b)){for(var S,T=1-y/g,E=x.width=x.width*T,w=x.height=x.height*T,A=(E=Math.max(E,x.minimumWidth),w=Math.max(w,x.minimumHeight),b.x-.5*E),P=(T=b.y-.5*w,E=b.x+E,w=b.y+w,(S=C.range(A,T,E,w)).length),D=0,M=[],I=0;I<P;++I)(V=v[S[I]]).clustered||(++D,u=V.collection,d=V.index,M.push(u.get(d).id));if(p<=D)for(addCluster(x.position,D,M,e),m.push(x),I=0;I<P;++I)v[S[I]].clustered=!0}}}for(c=v.length,l=0;l<c;++l){var R=v[l];if(!R.clustered){R.clustered=!0,u=R.collection,d=R.index;var O=u.get(d),L=getBoundingBox(O,R.coord,h,e,pointBoundinRectangleScratch),N=BoundingRectangle.clone(L,totalBoundingRectangleScratch);P=(S=C.range(L.x,L.y,L.x+L.width,L.y+L.height)).length;var F,B,V,k=Cartesian3.clone(O.position);for(D=1,M=[O.id],I=0;I<P;++I)(V=v[S[I]]).clustered||(B=getBoundingBox(F=V.collection.get(V.index),V.coord,h,e,neighborBoundingRectangleScratch),Cartesian3.add(F.position,k,k),BoundingRectangle.union(N,B,N),++D,M.push(F.id));if(p<=D)for(addCluster(R=Cartesian3.multiplyByScalar(k,1/D,k),D,M,e),m.push({position:R,width:N.width,height:N.height,minimumWidth:L.width,minimumHeight:L.height}),I=0;I<P;++I)v[S[I]].clustered=!0;else addNonClusteredItem(O,e)}}0===o.length&&(o.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===t.length&&(t.destroy(),e._clusterPointCollection=void 0),e._previousClusters=m,e._previousHeight=y}}}}function createGetEntity(e,t,i,r){return function(n){var a=this[e];defined(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});var o,s,l=this._collectionIndicesByEntity[n.id];return defined(l)||(l=this._collectionIndicesByEntity[n.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),defined(a)&&defined(l[r])?a.get(l[r]):(defined(a)||(a=this[e]=new t({scene:this._scene})),0<(n=this[i]).length?(o=n.pop(),s=a.get(o)):(s=a.add(),o=a.length-1),l[r]=o,this._clusterDirty=!0,s)}}function removeEntityIndicesIfUnused(e,t){var i=e._collectionIndicesByEntity[t];defined(i.billboardIndex)||defined(i.labelIndex)||defined(i.pointIndex)||delete e._collectionIndicesByEntity[t]}function disableCollectionClustering(e){if(defined(e))for(var t=e.length,i=0;i<t;++i)e.get(i).clusterShow=!0}function updateEnable(e){e.enabled||(defined(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),defined(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),defined(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,disableCollectionClustering(e._labelCollection),disableCollectionClustering(e._billboardCollection),disableCollectionClustering(e._pointCollection))}function CustomDataSource(e){this._name=e,this._clock=void 0,this._changed=new Event,this._error=new Event,this._isLoading=!1,this._loading=new Event,this._entityCollection=new EntityCollection(this),this._entityCluster=new EntityCluster}EntityCluster.prototype._initialize=function(e){this._scene=e;var t=createDeclutterCallback(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(EntityCluster.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),EntityCluster.prototype.getLabel=createGetEntity("_labelCollection",LabelCollection,"_unusedLabelIndices","labelIndex"),EntityCluster.prototype.removeLabel=function(e){var t,i=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];defined(this._labelCollection)&&defined(i)&&defined(i.labelIndex)&&(t=i.labelIndex,i.labelIndex=void 0,removeEntityIndicesIfUnused(this,e.id),(e=this._labelCollection.get(t)).show=!1,e.text="",e.id=void 0,this._unusedLabelIndices.push(t),this._clusterDirty=!0)},EntityCluster.prototype.getBillboard=createGetEntity("_billboardCollection",BillboardCollection,"_unusedBillboardIndices","billboardIndex"),EntityCluster.prototype.removeBillboard=function(e){var t,i=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];defined(this._billboardCollection)&&defined(i)&&defined(i.billboardIndex)&&(t=i.billboardIndex,i.billboardIndex=void 0,removeEntityIndicesIfUnused(this,e.id),(e=this._billboardCollection.get(t)).id=void 0,e.show=!1,e.image=void 0,this._unusedBillboardIndices.push(t),this._clusterDirty=!0)},EntityCluster.prototype.getPoint=createGetEntity("_pointCollection",PointPrimitiveCollection,"_unusedPointIndices","pointIndex"),EntityCluster.prototype.removePoint=function(e){var t,i=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];defined(this._pointCollection)&&defined(i)&&defined(i.pointIndex)&&(t=i.pointIndex,i.pointIndex=void 0,removeEntityIndicesIfUnused(this,e.id),(e=this._pointCollection.get(t)).show=!1,e.id=void 0,this._unusedPointIndices.push(t),this._clusterDirty=!0)},EntityCluster.prototype.update=function(e){var t;defined(this._labelCollection)&&0<this._labelCollection.length&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),defined(this._billboardCollection)&&0<this._billboardCollection.length&&!defined(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,updateEnable(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),defined(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),defined(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),defined(this._clusterPointCollection)&&this._clusterPointCollection.update(e),defined(this._labelCollection)&&this._labelCollection.update(e),defined(this._billboardCollection)&&this._billboardCollection.update(e),defined(this._pointCollection)&&this._pointCollection.update(e)},EntityCluster.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),defined(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1},Object.defineProperties(CustomDataSource.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){DataSource.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}}),CustomDataSource.prototype.update=function(e){return!0};var defaultOffset$2=Cartesian3.ZERO,offsetScratch$5=new Cartesian3,positionScratch$7=new Cartesian3,scratchColor$a=new Color;function CylinderGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function CylinderGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new CylinderGeometryOptions(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function DynamicCylinderGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}function DataSourceClock(){this._definitionChanged=new Event,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}defined(Object.create)&&(CylinderGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),CylinderGeometryUpdater.prototype.constructor=CylinderGeometryUpdater),Object.defineProperties(CylinderGeometryUpdater.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),CylinderGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a={show:n,distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),color:void 0,offset:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$a)),defined(t)||(t=Color.WHITE),a.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(a.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$2,offsetScratch$5))),new GeometryInstance({id:i,geometry:new CylinderGeometry(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:a})},CylinderGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$a),n=this._distanceDisplayConditionProperty.getValue(e);n={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n),offset:void 0};return defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$2,offsetScratch$5))),new GeometryInstance({id:t,geometry:new CylinderOutlineGeometry(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:n})},CylinderGeometryUpdater.prototype._computeCenter=function(e,t){return Property.getValueOrUndefined(this._entity.position,e,t)},CylinderGeometryUpdater.prototype._isHidden=function(e,t){return!defined(e.position)||!defined(t.length)||!defined(t.topRadius)||!defined(t.bottomRadius)||GeometryUpdater.prototype._isHidden.call(this,e,t)},CylinderGeometryUpdater.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&Property.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&Property.isConstant(t.slices)&&Property.isConstant(t.outlineWidth)&&Property.isConstant(t.numberOfVerticalLines))},CylinderGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),r=this._options;r.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,r.length=t.length.getValue(Iso8601.MINIMUM_VALUE),r.topRadius=t.topRadius.getValue(Iso8601.MINIMUM_VALUE),r.bottomRadius=t.bottomRadius.getValue(Iso8601.MINIMUM_VALUE),r.slices=Property.getValueOrUndefined(t.slices,Iso8601.MINIMUM_VALUE),r.numberOfVerticalLines=Property.getValueOrUndefined(t.numberOfVerticalLines,Iso8601.MINIMUM_VALUE),r.offsetAttribute=i!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},CylinderGeometryUpdater.prototype._onEntityPropertyChanged=heightReferenceOnEntityPropertyChanged,CylinderGeometryUpdater.DynamicGeometryUpdater=DynamicCylinderGeometryUpdater,defined(Object.create)&&(DynamicCylinderGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicCylinderGeometryUpdater.prototype.constructor=DynamicCylinderGeometryUpdater),DynamicCylinderGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(Property.getValueOrUndefined(e.position,i,positionScratch$7))||!defined(r.length)||!defined(r.topRadius)||!defined(r.bottomRadius)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicCylinderGeometryUpdater.prototype._setOptions=function(e,t,i){var r=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),n=this._options;n.length=Property.getValueOrUndefined(t.length,i),n.topRadius=Property.getValueOrUndefined(t.topRadius,i),n.bottomRadius=Property.getValueOrUndefined(t.bottomRadius,i),n.slices=Property.getValueOrUndefined(t.slices,i),n.numberOfVerticalLines=Property.getValueOrUndefined(t.numberOfVerticalLines,i),n.offsetAttribute=r!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},Object.defineProperties(DataSourceClock.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:createRawPropertyDescriptor("startTime"),stopTime:createRawPropertyDescriptor("stopTime"),currentTime:createRawPropertyDescriptor("currentTime"),clockRange:createRawPropertyDescriptor("clockRange"),clockStep:createRawPropertyDescriptor("clockStep"),multiplier:createRawPropertyDescriptor("multiplier")}),DataSourceClock.prototype.clone=function(e){return defined(e)||(e=new DataSourceClock),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},DataSourceClock.prototype.equals=function(e){return this===e||defined(e)&&JulianDate.equals(this.startTime,e.startTime)&&JulianDate.equals(this.stopTime,e.stopTime)&&JulianDate.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},DataSourceClock.prototype.merge=function(e){this.startTime=defaultValue(this.startTime,e.startTime),this.stopTime=defaultValue(this.stopTime,e.stopTime),this.currentTime=defaultValue(this.currentTime,e.currentTime),this.clockRange=defaultValue(this.clockRange,e.clockRange),this.clockStep=defaultValue(this.clockStep,e.clockStep),this.multiplier=defaultValue(this.multiplier,e.multiplier)},DataSourceClock.prototype.getValue=function(e){return defined(e)||(e=new Clock),e.startTime=defaultValue(this.startTime,e.startTime),e.stopTime=defaultValue(this.stopTime,e.stopTime),e.currentTime=defaultValue(this.currentTime,e.currentTime),e.clockRange=defaultValue(this.clockRange,e.clockRange),e.multiplier=defaultValue(this.multiplier,e.multiplier),e.clockStep=defaultValue(this.clockStep,e.clockStep),e};var defaultColor$2=Color.WHITE,defaultCellAlpha=.1,defaultLineCount=new Cartesian2(8,8),defaultLineOffset=new Cartesian2(0,0),defaultLineThickness=new Cartesian2(1,1);function GridMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}function PolylineArrowMaterialProperty(e){this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(GridMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)&&Property.isConstant(this._cellAlpha)&&Property.isConstant(this._lineCount)&&Property.isConstant(this._lineThickness)&&Property.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color"),cellAlpha:createPropertyDescriptor("cellAlpha"),lineCount:createPropertyDescriptor("lineCount"),lineThickness:createPropertyDescriptor("lineThickness"),lineOffset:createPropertyDescriptor("lineOffset")}),GridMaterialProperty.prototype.getType=function(e){return"Grid"},GridMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$2,t.color),t.cellAlpha=Property.getValueOrDefault(this._cellAlpha,e,defaultCellAlpha),t.lineCount=Property.getValueOrClonedDefault(this._lineCount,e,defaultLineCount,t.lineCount),t.lineThickness=Property.getValueOrClonedDefault(this._lineThickness,e,defaultLineThickness,t.lineThickness),t.lineOffset=Property.getValueOrClonedDefault(this._lineOffset,e,defaultLineOffset,t.lineOffset),t},GridMaterialProperty.prototype.equals=function(e){return this===e||e instanceof GridMaterialProperty&&Property.equals(this._color,e._color)&&Property.equals(this._cellAlpha,e._cellAlpha)&&Property.equals(this._lineCount,e._lineCount)&&Property.equals(this._lineThickness,e._lineThickness)&&Property.equals(this._lineOffset,e._lineOffset)},Object.defineProperties(PolylineArrowMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color")}),PolylineArrowMaterialProperty.prototype.getType=function(e){return"PolylineArrow"},PolylineArrowMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,Color.WHITE,t.color),t},PolylineArrowMaterialProperty.prototype.equals=function(e){return this===e||e instanceof PolylineArrowMaterialProperty&&Property.equals(this._color,e._color)};var defaultColor$3=Color.WHITE,defaultGapColor=Color.TRANSPARENT,defaultDashLength=16,defaultDashPattern=255;function PolylineDashMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(PolylineDashMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)&&Property.isConstant(this._gapColor)&&Property.isConstant(this._dashLength)&&Property.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color"),gapColor:createPropertyDescriptor("gapColor"),dashLength:createPropertyDescriptor("dashLength"),dashPattern:createPropertyDescriptor("dashPattern")}),PolylineDashMaterialProperty.prototype.getType=function(e){return"PolylineDash"},PolylineDashMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$3,t.color),t.gapColor=Property.getValueOrClonedDefault(this._gapColor,e,defaultGapColor,t.gapColor),t.dashLength=Property.getValueOrDefault(this._dashLength,e,defaultDashLength,t.dashLength),t.dashPattern=Property.getValueOrDefault(this._dashPattern,e,defaultDashPattern,t.dashPattern),t},PolylineDashMaterialProperty.prototype.equals=function(e){return this===e||e instanceof PolylineDashMaterialProperty&&Property.equals(this._color,e._color)&&Property.equals(this._gapColor,e._gapColor)&&Property.equals(this._dashLength,e._dashLength)&&Property.equals(this._dashPattern,e._dashPattern)};var defaultColor$4=Color.WHITE,defaultGlowPower=.25,defaultTaperPower=1;function PolylineGlowMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(PolylineGlowMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)&&Property.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color"),glowPower:createPropertyDescriptor("glowPower"),taperPower:createPropertyDescriptor("taperPower")}),PolylineGlowMaterialProperty.prototype.getType=function(e){return"PolylineGlow"},PolylineGlowMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$4,t.color),t.glowPower=Property.getValueOrDefault(this._glowPower,e,defaultGlowPower,t.glowPower),t.taperPower=Property.getValueOrDefault(this._taperPower,e,defaultTaperPower,t.taperPower),t},PolylineGlowMaterialProperty.prototype.equals=function(e){return this===e||e instanceof PolylineGlowMaterialProperty&&Property.equals(this._color,e._color)&&Property.equals(this._glowPower,e._glowPower)&&Property.equals(this._taperPower,e._taperPower)};var defaultColor$5=Color.WHITE,defaultOutlineColor$1=Color.BLACK,defaultOutlineWidth=1;function PolylineOutlineMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}function PositionPropertyArray(e,t){this._value=void 0,this._definitionChanged=new Event,this._eventHelper=new EventHelper,this._referenceFrame=defaultValue(t,ReferenceFrame$1.FIXED),this.setValue(e)}function PropertyArray(e){this._value=void 0,this._definitionChanged=new Event,this._eventHelper=new EventHelper,this.setValue(e)}function resolve$1(e){if(!defined(r=e._targetProperty)){var t=e._targetEntity;if(!defined(t)){if(!defined(t=e._targetCollection.getById(e._targetId)))return void(e._targetEntity=e._targetProperty=void 0);t.definitionChanged.addEventListener(ReferenceProperty.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=t}for(var i=e._targetPropertyNames,r=e._targetEntity,n=0,a=i.length;n<a&&defined(r);++n)r=r[i[n]];e._targetProperty=r}return r}function ReferenceProperty(e,t,i){this._targetCollection=e,this._targetId=t,this._targetPropertyNames=i,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new Event,e.collectionChanged.addEventListener(ReferenceProperty.prototype._onCollectionChanged,this)}Object.defineProperties(PolylineOutlineMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)&&Property.isConstant(this._outlineColor)&&Property.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth")}),PolylineOutlineMaterialProperty.prototype.getType=function(e){return"PolylineOutline"},PolylineOutlineMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$5,t.color),t.outlineColor=Property.getValueOrClonedDefault(this._outlineColor,e,defaultOutlineColor$1,t.outlineColor),t.outlineWidth=Property.getValueOrDefault(this._outlineWidth,e,defaultOutlineWidth),t},PolylineOutlineMaterialProperty.prototype.equals=function(e){return this===e||e instanceof PolylineOutlineMaterialProperty&&Property.equals(this._color,e._color)&&Property.equals(this._outlineColor,e._outlineColor)&&Property.equals(this._outlineWidth,e._outlineWidth)},Object.defineProperties(PositionPropertyArray.prototype,{isConstant:{get:function(){var e=this._value;if(!defined(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!Property.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),PositionPropertyArray.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},PositionPropertyArray.prototype.getValueInReferenceFrame=function(e,t,i){var r=this._value;if(defined(r)){var n=r.length;defined(i)||(i=new Array(n));for(var a=0,o=0;a<n;){var s=r[a].getValueInReferenceFrame(e,t,i[a]);defined(s)&&(i[o]=s,o++),a++}return i.length=o,i}},PositionPropertyArray.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),defined(e)){this._value=e.slice();for(var i=e.length,r=0;r<i;r++){var n=e[r];defined(n)&&t.add(n.definitionChanged,PositionPropertyArray.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},PositionPropertyArray.prototype.equals=function(e){return this===e||e instanceof PositionPropertyArray&&this._referenceFrame===e._referenceFrame&&Property.arrayEquals(this._value,e._value)},PositionPropertyArray.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(PropertyArray.prototype,{isConstant:{get:function(){var e=this._value;if(!defined(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!Property.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),PropertyArray.prototype.getValue=function(e,t){var i=this._value;if(defined(i)){var r=i.length;defined(t)||(t=new Array(r));for(var n=0,a=0;n<r;){var o=this._value[n].getValue(e,t[n]);defined(o)&&(t[a]=o,a++),n++}return t.length=a,t}},PropertyArray.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),defined(e)){this._value=e.slice();for(var i=e.length,r=0;r<i;r++){var n=e[r];defined(n)&&t.add(n.definitionChanged,PropertyArray.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},PropertyArray.prototype.equals=function(e){return this===e||e instanceof PropertyArray&&Property.arrayEquals(this._value,e._value)},PropertyArray.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(ReferenceProperty.prototype,{isConstant:{get:function(){return Property.isConstant(resolve$1(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){var e=resolve$1(this);return defined(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return resolve$1(this)}}}),ReferenceProperty.fromString=function(e,t){for(var i,r=[],n=!0,a=!1,o="",s=0;s<t.length;++s){var l=t.charAt(s);a?(o+=l,a=!1):"\\"===l?a=!0:n&&"#"===l?(i=o,n=!1,o=""):n||"."!==l?o+=l:(r.push(o),o="")}return r.push(o),new ReferenceProperty(e,i,r)},ReferenceProperty.prototype.getValue=function(e,t){var i=resolve$1(this);return defined(i)?i.getValue(e,t):void 0},ReferenceProperty.prototype.getValueInReferenceFrame=function(e,t,i){var r=resolve$1(this);return defined(r)?r.getValueInReferenceFrame(e,t,i):void 0},ReferenceProperty.prototype.getType=function(e){var t=resolve$1(this);return defined(t)?t.getType(e):void 0},ReferenceProperty.prototype.equals=function(e){if(this===e)return!0;var t=this._targetPropertyNames,i=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==i.length)return!1;for(var r=this._targetPropertyNames.length,n=0;n<r;n++)if(t[n]!==i[n])return!1;return!0},ReferenceProperty.prototype._onTargetEntityDefinitionChanged=function(e,t,i,r){defined(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},ReferenceProperty.prototype._onCollectionChanged=function(e,t,i){var r=this._targetEntity;defined(r)&&-1!==i.indexOf(r)?(r.definitionChanged.removeEventListener(ReferenceProperty.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):defined(r)||defined(r=resolve$1(this))&&this._definitionChanged.raiseEvent(this)};var Rotation={packedLength:1,pack:function(e,t,i){return t[i=defaultValue(i,0)]=e,t},unpack:function(e,t,i){return e[t=defaultValue(t,0)]},convertPackedArrayForInterpolation:function(e,t,i,r){var n;defined(r)||(r=[]),t=defaultValue(t,0);for(var a=0,o=(i=defaultValue(i,e.length))-t+1;a<o;a++){var s=e[t+a];0===a||Math.abs(n-s)<Math.PI?r[a]=s:r[a]=s-CesiumMath.TWO_PI,n=s}},unpackInterpolationResult:function(e,t,i,r,n){return(n=e[0])<0?n+CesiumMath.TWO_PI:n}},PackableNumber={packedLength:1,pack:function(e,t,i){t[i=defaultValue(i,0)]=e},unpack:function(e,t,i){return e[t=defaultValue(t,0)]}};function arrayInsert(e,t,i){var r=e.length,n=i.length,a=r+n;if(e.length=a,r!==t)for(var o=r-1,s=a-1;t<=s;s--)e[s]=e[o--];for(s=0;s<n;s++)e[t++]=i[s]}function convertDate(e,t){return e instanceof JulianDate?e:"string"==typeof e?JulianDate.fromIso8601(e):JulianDate.addSeconds(t,e,new JulianDate)}var timesSpliceArgs=[],valuesSpliceArgs=[];function mergeNewSamples(e,t,i,r,n){for(var a,o,s,l,c,u,d=0;d<r.length;){var h=0,p=0;if((s=binarySearch(t,convertDate(r[d],e),JulianDate.compare))<0){for(l=(s=~s)*n,o=void 0,u=t[s];d<r.length&&(c=convertDate(r[d],e),!(defined(o)&&0<=JulianDate.compare(o,c)||defined(u)&&0<=JulianDate.compare(c,u)));){for(timesSpliceArgs[h++]=c,d+=1,a=0;a<n;a++)valuesSpliceArgs[p++]=r[d],d+=1;o=c}0<h&&(valuesSpliceArgs.length=p,arrayInsert(i,l,valuesSpliceArgs),timesSpliceArgs.length=h,arrayInsert(t,s,timesSpliceArgs))}else{for(a=0;a<n;a++)d++,i[s*n+a]=r[d];d++}}}function SampledProperty(e,t){var i=e;i===Number&&(i=PackableNumber);var r=i.packedLength,n=defaultValue(i.packedInterpolationLength,r),a=0;if(defined(t)){for(var o=t.length,s=new Array(o),l=0;l<o;l++){var c=t[l];c===Number&&(c=PackableNumber);var u=c.packedLength;r+=u,n+=defaultValue(c.packedInterpolationLength,u),s[l]=c}a=o}this._type=e,this._innerType=i,this._interpolationDegree=1,this._interpolationAlgorithm=LinearApproximation,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=r,this._packedInterpolationLength=n,this._updateTableLength=!0,this._interpolationResult=new Array(n),this._definitionChanged=new Event,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=a,this._forwardExtrapolationType=ExtrapolationType$1.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=ExtrapolationType$1.NONE,this._backwardExtrapolationDuration=0}function removeSamples(e,t,i){var r=e._packedLength;e._times.splice(t,i),e._values.splice(t*r,i*r),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}function SampledPositionProperty(e,t){var i;if(0<(t=defaultValue(t,0))){i=new Array(t);for(var r=0;r<t;r++)i[r]=Cartesian3}this._numberOfDerivatives=t,this._property=new SampledProperty(Cartesian3,i),this._definitionChanged=new Event,this._referenceFrame=defaultValue(e,ReferenceFrame$1.FIXED),this._property._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)}Object.defineProperties(SampledProperty.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),SampledProperty.prototype.getValue=function(e,t){var i=this._times,r=i.length;if(0!==r){var n=this._innerType,a=this._values,o=binarySearch(i,e,JulianDate.compare);if(o<0){if(0==(o=~o)){var s=i[o],l=this._backwardExtrapolationDuration;if(this._backwardExtrapolationType===ExtrapolationType$1.NONE||0!==l&&JulianDate.secondsDifference(s,e)>l)return;if(this._backwardExtrapolationType===ExtrapolationType$1.HOLD)return n.unpack(a,0,t)}if(r<=o){var c=i[o=r-1];if(l=this._forwardExtrapolationDuration,this._forwardExtrapolationType===ExtrapolationType$1.NONE||0!==l&&JulianDate.secondsDifference(e,c)>l)return;if(this._forwardExtrapolationType===ExtrapolationType$1.HOLD)return o=r-1,n.unpack(a,o*n.packedLength,t)}var u=this._xTable,d=this._yTable,h=this._interpolationAlgorithm;s=this._packedInterpolationLength,c=this._inputOrder;if(this._updateTableLength&&(this._updateTableLength=!1,(p=Math.min(h.getRequiredDataPoints(this._interpolationDegree,c),r))!==this._numberOfPoints&&(this._numberOfPoints=p,u.length=p,d.length=p*s)),(l=this._numberOfPoints-1)<1)return;var p,f=0,m=r-1;1+l<=m-f+1&&((p=o-(l/2|0)-1)<f&&(p=f),m<(r=p+l)&&(p=(r=m)-l)<f&&(p=f),f=p,m=r);for(var g=m-f+1,y=0;y<g;++y)u[y]=JulianDate.secondsDifference(i[f+y],i[m]);if(defined(n.convertPackedArrayForInterpolation))n.convertPackedArrayForInterpolation(a,f,m,d);else for(var _=0,v=this._packedLength,C=f*v,x=(m+1)*v;C<x;)d[_]=a[C],C++,_++;return v=JulianDate.secondsDifference(e,i[m]),s=0!==c&&defined(h.interpolate)?(e=Math.floor(s/(c+1)),h.interpolate(v,u,d,e,c,c,this._interpolationResult)):h.interpolateOrderZero(v,u,d,s,this._interpolationResult),defined(n.unpackInterpolationResult)?n.unpackInterpolationResult(s,a,f,m,t):n.unpack(s,0,t)}return n.unpack(a,o*this._packedLength,t)}},SampledProperty.prototype.setInterpolationOptions=function(e){var t,i;defined(e)&&(t=!1,i=e.interpolationAlgorithm,e=e.interpolationDegree,defined(i)&&this._interpolationAlgorithm!==i&&(this._interpolationAlgorithm=i,t=!0),defined(e)&&this._interpolationDegree!==e&&(this._interpolationDegree=e,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)))},SampledProperty.prototype.addSample=function(e,t,i){var r=this._innerDerivativeTypes,n=defined(r),a=this._innerType,o=[];if(o.push(e),a.pack(t,o,o.length),n)for(var s=r.length,l=0;l<s;l++)r[l].pack(i[l],o,o.length);mergeNewSamples(void 0,this._times,this._values,o,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},SampledProperty.prototype.addSamples=function(e,t,i){for(var r=this._innerDerivativeTypes,n=defined(r),a=this._innerType,o=e.length,s=[],l=0;l<o;l++)if(s.push(e[l]),a.pack(t[l],s,s.length),n)for(var c=i[l],u=r.length,d=0;d<u;d++)r[d].pack(c[d],s,s.length);mergeNewSamples(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},SampledProperty.prototype.addSamplesPackedArray=function(e,t){mergeNewSamples(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},SampledProperty.prototype.removeSample=function(e){return!((e=binarySearch(this._times,e,JulianDate.compare))<0||(removeSamples(this,e,1),0))},SampledProperty.prototype.removeSamples=function(e){var t=this._times,i=binarySearch(t,e.start,JulianDate.compare);i<0?i=~i:e.isStartIncluded||++i,(t=binarySearch(t,e.stop,JulianDate.compare))<0?t=~t:e.isStopIncluded&&++t,removeSamples(this,i,t-i)},SampledProperty.prototype.equals=function(e){if(this===e)return!0;if(!defined(e))return!1;if(this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;var t,i=this._derivativeTypes,r=defined(i),n=e._derivativeTypes;if(r!==defined(n))return!1;if(r){if((a=i.length)!==n.length)return!1;for(t=0;t<a;t++)if(i[t]!==n[t])return!1}var a,o=this._times,s=e._times;if((a=o.length)!==s.length)return!1;for(t=0;t<a;t++)if(!JulianDate.equals(o[t],s[t]))return!1;var l=this._values,c=e._values;for(a=l.length,t=0;t<a;t++)if(l[t]!==c[t])return!1;return!0},SampledProperty._mergeNewSamples=mergeNewSamples,Object.defineProperties(SampledPositionProperty.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),SampledPositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},SampledPositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){if(defined(i=this._property.getValue(e,i)))return PositionProperty.convertToReferenceFrame(e,i,this._referenceFrame,t,i)},SampledPositionProperty.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},SampledPositionProperty.prototype.addSample=function(e,t,i){this._numberOfDerivatives,this._property.addSample(e,t,i)},SampledPositionProperty.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},SampledPositionProperty.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},SampledPositionProperty.prototype.removeSample=function(e){return this._property.removeSample(e)},SampledPositionProperty.prototype.removeSamples=function(e){this._property.removeSamples(e)},SampledPositionProperty.prototype.equals=function(e){return this===e||e instanceof SampledPositionProperty&&Property.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var StripeOrientation={HORIZONTAL:0,VERTICAL:1},StripeOrientation$1=Object.freeze(StripeOrientation),defaultOrientation=StripeOrientation$1.HORIZONTAL,defaultEvenColor$1=Color.WHITE,defaultOddColor$1=Color.BLACK,defaultOffset$3=0,defaultRepeat$2=1;function StripeMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}function TimeIntervalCollectionPositionProperty(e){this._definitionChanged=new Event,this._intervals=new TimeIntervalCollection,this._intervals.changedEvent.addEventListener(TimeIntervalCollectionPositionProperty.prototype._intervalsChanged,this),this._referenceFrame=defaultValue(e,ReferenceFrame$1.FIXED)}function TimeIntervalCollectionProperty(){this._definitionChanged=new Event,this._intervals=new TimeIntervalCollection,this._intervals.changedEvent.addEventListener(TimeIntervalCollectionProperty.prototype._intervalsChanged,this)}function VelocityVectorProperty(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new Event,this._normalize=defaultValue(t,!0),this.position=e}Object.defineProperties(StripeMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._orientation)&&Property.isConstant(this._evenColor)&&Property.isConstant(this._oddColor)&&Property.isConstant(this._offset)&&Property.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:createPropertyDescriptor("orientation"),evenColor:createPropertyDescriptor("evenColor"),oddColor:createPropertyDescriptor("oddColor"),offset:createPropertyDescriptor("offset"),repeat:createPropertyDescriptor("repeat")}),StripeMaterialProperty.prototype.getType=function(e){return"Stripe"},StripeMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.horizontal=Property.getValueOrDefault(this._orientation,e,defaultOrientation)===StripeOrientation$1.HORIZONTAL,t.evenColor=Property.getValueOrClonedDefault(this._evenColor,e,defaultEvenColor$1,t.evenColor),t.oddColor=Property.getValueOrClonedDefault(this._oddColor,e,defaultOddColor$1,t.oddColor),t.offset=Property.getValueOrDefault(this._offset,e,defaultOffset$3),t.repeat=Property.getValueOrDefault(this._repeat,e,defaultRepeat$2),t},StripeMaterialProperty.prototype.equals=function(e){return this===e||e instanceof StripeMaterialProperty&&Property.equals(this._orientation,e._orientation)&&Property.equals(this._evenColor,e._evenColor)&&Property.equals(this._oddColor,e._oddColor)&&Property.equals(this._offset,e._offset)&&Property.equals(this._repeat,e._repeat)},Object.defineProperties(TimeIntervalCollectionPositionProperty.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),TimeIntervalCollectionPositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},TimeIntervalCollectionPositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){var r=this._intervals.findDataForIntervalContainingDate(e);if(defined(r))return PositionProperty.convertToReferenceFrame(e,r,this._referenceFrame,t,i)},TimeIntervalCollectionPositionProperty.prototype.equals=function(e){return this===e||e instanceof TimeIntervalCollectionPositionProperty&&this._intervals.equals(e._intervals,Property.equals)&&this._referenceFrame===e._referenceFrame},TimeIntervalCollectionPositionProperty.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(TimeIntervalCollectionProperty.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),TimeIntervalCollectionProperty.prototype.getValue=function(e,t){return defined(e=this._intervals.findDataForIntervalContainingDate(e))&&"function"==typeof e.clone?e.clone(t):e},TimeIntervalCollectionProperty.prototype.equals=function(e){return this===e||e instanceof TimeIntervalCollectionProperty&&this._intervals.equals(e._intervals,Property.equals)},TimeIntervalCollectionProperty.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(VelocityVectorProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){var t=this._position;t!==e&&(defined(t)&&this._subscription(),defined(this._position=e)&&(this._subscription=e._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var position1Scratch=new Cartesian3,position2Scratch=new Cartesian3,timeScratch=new JulianDate,step=1/60;function VelocityOrientationProperty(e,t){this._velocityVectorProperty=new VelocityVectorProperty(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new Event,this.ellipsoid=defaultValue(t,Ellipsoid.WGS84);var i=this;this._velocityVectorProperty.definitionChanged.addEventListener((function(){i._definitionChanged.raiseEvent(i)}))}VelocityVectorProperty.prototype.getValue=function(e,t){return this._getValue(e,t)},VelocityVectorProperty.prototype._getValue=function(e,t,i){defined(t)||(t=new Cartesian3);var r=this._position;if(Property.isConstant(r))return this._normalize?void 0:Cartesian3.clone(Cartesian3.ZERO,t);var n=r.getValue(e,position1Scratch),a=r.getValue(JulianDate.addSeconds(e,step,timeScratch),position2Scratch);return defined(n)&&(defined(a)||(a=n,defined(n=r.getValue(JulianDate.addSeconds(e,-step,timeScratch),position2Scratch))))?Cartesian3.equals(n,a)?this._normalize?void 0:Cartesian3.clone(Cartesian3.ZERO,t):(defined(i)&&n.clone(i),n=Cartesian3.subtract(a,n,t),this._normalize?Cartesian3.normalize(n,t):Cartesian3.divideByScalar(n,step,t)):void 0},VelocityVectorProperty.prototype.equals=function(e){return this===e||e instanceof VelocityVectorProperty&&Property.equals(this._position,e._position)},Object.defineProperties(VelocityOrientationProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var positionScratch$8=new Cartesian3,velocityScratch=new Cartesian3,rotationScratch=new Matrix3,currentId;function UnitCartesian3(){}function createReferenceProperty(e,t){return"#"===t[0]&&(t=currentId+t),ReferenceProperty.fromString(e,t)}function createSpecializedProperty(e,t,i){if(defined(i.reference))return createReferenceProperty(t,i.reference);if(defined(i.velocityReference))switch(t=createReferenceProperty(t,i.velocityReference),e){case Cartesian3:case UnitCartesian3:return new VelocityVectorProperty(t,e===UnitCartesian3);case Quaternion:return new VelocityOrientationProperty(t)}throw new RuntimeError(JSON.stringify(i)+" is not valid CZML.")}function createAdapterProperty(e,t){return new CallbackProperty((function(i,r){return t(e.getValue(i,r))}),e.isConstant)}VelocityOrientationProperty.prototype.getValue=function(e,t){if(defined(e=this._velocityVectorProperty._getValue(e,velocityScratch,positionScratch$8)))return Transforms.rotationMatrixFromPositionVelocity(positionScratch$8,e,this._ellipsoid,rotationScratch),Quaternion.fromRotationMatrix(rotationScratch,t)},VelocityOrientationProperty.prototype.equals=function(e){return this===e||e instanceof VelocityOrientationProperty&&Property.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},UnitCartesian3.packedLength=Cartesian3.packedLength,UnitCartesian3.unpack=Cartesian3.unpack,UnitCartesian3.pack=Cartesian3.pack;var scratchCartesian$6=new Cartesian3,scratchSpherical=new Spherical,scratchCartographic$8=new Cartographic,scratchTimeInterval=new TimeInterval,scratchQuaternion=new Quaternion;function unwrapColorInterval(e){var t=e.rgbaf;if(defined(t))return t;var i=e.rgba;if(defined(i)){var r=i.length;if(r===Color.packedLength)return[Color.byteToFloat(i[0]),Color.byteToFloat(i[1]),Color.byteToFloat(i[2]),Color.byteToFloat(i[3])];t=new Array(r);for(var n=0;n<r;n+=5)t[n]=i[n],t[n+1]=Color.byteToFloat(i[n+1]),t[n+2]=Color.byteToFloat(i[n+2]),t[n+3]=Color.byteToFloat(i[n+3]),t[n+4]=Color.byteToFloat(i[n+4]);return t}}function unwrapUriInterval(e,t){return e=defaultValue(e.uri,e),defined(t)?t.getDerivedResource({url:e}):Resource.createIfNeeded(e)}function unwrapRectangleInterval(e){var t=e.wsen;if(defined(t))return t;var i=e.wsenDegrees;if(defined(i)){var r=i.length;if(r===Rectangle.packedLength)return[CesiumMath.toRadians(i[0]),CesiumMath.toRadians(i[1]),CesiumMath.toRadians(i[2]),CesiumMath.toRadians(i[3])];t=new Array(r);for(var n=0;n<r;n+=5)t[n]=i[n],t[n+1]=CesiumMath.toRadians(i[n+1]),t[n+2]=CesiumMath.toRadians(i[n+2]),t[n+3]=CesiumMath.toRadians(i[n+3]),t[n+4]=CesiumMath.toRadians(i[n+4]);return t}}function convertUnitSphericalToCartesian(e){var t=e.length;if(scratchSpherical.magnitude=1,2===t)return scratchSpherical.clock=e[0],scratchSpherical.cone=e[1],Cartesian3.fromSpherical(scratchSpherical,scratchCartesian$6),[scratchCartesian$6.x,scratchCartesian$6.y,scratchCartesian$6.z];for(var i=new Array(t/3*4),r=0,n=0;r<t;r+=3,n+=4)i[n]=e[r],scratchSpherical.clock=e[r+1],scratchSpherical.cone=e[r+2],Cartesian3.fromSpherical(scratchSpherical,scratchCartesian$6),i[n+1]=scratchCartesian$6.x,i[n+2]=scratchCartesian$6.y,i[n+3]=scratchCartesian$6.z;return i}function convertSphericalToCartesian(e){var t=e.length;if(3===t)return scratchSpherical.clock=e[0],scratchSpherical.cone=e[1],scratchSpherical.magnitude=e[2],Cartesian3.fromSpherical(scratchSpherical,scratchCartesian$6),[scratchCartesian$6.x,scratchCartesian$6.y,scratchCartesian$6.z];for(var i=new Array(t),r=0;r<t;r+=4)i[r]=e[r],scratchSpherical.clock=e[r+1],scratchSpherical.cone=e[r+2],scratchSpherical.magnitude=e[r+3],Cartesian3.fromSpherical(scratchSpherical,scratchCartesian$6),i[r+1]=scratchCartesian$6.x,i[r+2]=scratchCartesian$6.y,i[r+3]=scratchCartesian$6.z;return i}function convertCartographicRadiansToCartesian(e){var t=e.length;if(3===t)return scratchCartographic$8.longitude=e[0],scratchCartographic$8.latitude=e[1],scratchCartographic$8.height=e[2],Ellipsoid.WGS84.cartographicToCartesian(scratchCartographic$8,scratchCartesian$6),[scratchCartesian$6.x,scratchCartesian$6.y,scratchCartesian$6.z];for(var i=new Array(t),r=0;r<t;r+=4)i[r]=e[r],scratchCartographic$8.longitude=e[r+1],scratchCartographic$8.latitude=e[r+2],scratchCartographic$8.height=e[r+3],Ellipsoid.WGS84.cartographicToCartesian(scratchCartographic$8,scratchCartesian$6),i[r+1]=scratchCartesian$6.x,i[r+2]=scratchCartesian$6.y,i[r+3]=scratchCartesian$6.z;return i}function convertCartographicDegreesToCartesian(e){var t=e.length;if(3===t)return scratchCartographic$8.longitude=CesiumMath.toRadians(e[0]),scratchCartographic$8.latitude=CesiumMath.toRadians(e[1]),scratchCartographic$8.height=e[2],Ellipsoid.WGS84.cartographicToCartesian(scratchCartographic$8,scratchCartesian$6),[scratchCartesian$6.x,scratchCartesian$6.y,scratchCartesian$6.z];for(var i=new Array(t),r=0;r<t;r+=4)i[r]=e[r],scratchCartographic$8.longitude=CesiumMath.toRadians(e[r+1]),scratchCartographic$8.latitude=CesiumMath.toRadians(e[r+2]),scratchCartographic$8.height=e[r+3],Ellipsoid.WGS84.cartographicToCartesian(scratchCartographic$8,scratchCartesian$6),i[r+1]=scratchCartesian$6.x,i[r+2]=scratchCartesian$6.y,i[r+3]=scratchCartesian$6.z;return i}function unwrapCartesianInterval(e){var t=e.cartesian;if(defined(t))return t;if(defined(t=e.cartesianVelocity))return t;if(defined(t=e.unitCartesian))return t;if(defined(t=e.unitSpherical))return convertUnitSphericalToCartesian(t);if(defined(t=e.spherical))return convertSphericalToCartesian(t);if(defined(t=e.cartographicRadians))return convertCartographicRadiansToCartesian(t);if(defined(t=e.cartographicDegrees))return convertCartographicDegreesToCartesian(t);throw new RuntimeError(JSON.stringify(e)+" is not a valid CZML interval.")}function normalizePackedCartesianArray(e,t){Cartesian3.unpack(e,t,scratchCartesian$6),Cartesian3.normalize(scratchCartesian$6,scratchCartesian$6),Cartesian3.pack(scratchCartesian$6,e,t)}function unwrapUnitCartesianInterval(e){var t=unwrapCartesianInterval(e);if(3===t.length)return normalizePackedCartesianArray(t,0),t;for(var i=1;i<t.length;i+=4)normalizePackedCartesianArray(t,i);return t}function normalizePackedQuaternionArray(e,t){Quaternion.unpack(e,t,scratchQuaternion),Quaternion.normalize(scratchQuaternion,scratchQuaternion),Quaternion.pack(scratchQuaternion,e,t)}function unwrapQuaternionInterval(e){var t=e.unitQuaternion;if(defined(t)){if(4===t.length)return normalizePackedQuaternionArray(t,0),t;for(var i=1;i<t.length;i+=5)normalizePackedQuaternionArray(t,i)}return t}function getPropertyType(e){return"boolean"==typeof e?Boolean:"number"==typeof e?Number:"string"==typeof e?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?BoundingRectangle:e.hasOwnProperty("cartesian2")?Cartesian2:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?Cartesian3:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?UnitCartesian3:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?Color:e.hasOwnProperty("arcType")?ArcType$1:e.hasOwnProperty("classificationType")?ClassificationType$1:e.hasOwnProperty("colorBlendMode")?ColorBlendMode$1:e.hasOwnProperty("cornerType")?CornerType$1:e.hasOwnProperty("heightReference")?HeightReference$1:e.hasOwnProperty("horizontalOrigin")?HorizontalOrigin$1:e.hasOwnProperty("date")?JulianDate:e.hasOwnProperty("labelStyle")?LabelStyle$1:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?NearFarScalar:e.hasOwnProperty("distanceDisplayCondition")?DistanceDisplayCondition:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?Quaternion:e.hasOwnProperty("shadowMode")?ShadowMode$1:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?StripeOrientation$1:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?Rectangle:e.hasOwnProperty("uri")?URI:e.hasOwnProperty("verticalOrigin")?VerticalOrigin$1:Object}function unwrapInterval(e,t,i){switch(e){case ArcType$1:return ArcType$1[defaultValue(t.arcType,t)];case Array:return t.array;case Boolean:return defaultValue(t.boolean,t);case BoundingRectangle:return t.boundingRectangle;case Cartesian2:return t.cartesian2;case Cartesian3:return unwrapCartesianInterval(t);case UnitCartesian3:return unwrapUnitCartesianInterval(t);case Color:return unwrapColorInterval(t);case ClassificationType$1:return ClassificationType$1[defaultValue(t.classificationType,t)];case ColorBlendMode$1:return ColorBlendMode$1[defaultValue(t.colorBlendMode,t)];case CornerType$1:return CornerType$1[defaultValue(t.cornerType,t)];case HeightReference$1:return HeightReference$1[defaultValue(t.heightReference,t)];case HorizontalOrigin$1:return HorizontalOrigin$1[defaultValue(t.horizontalOrigin,t)];case Image:return unwrapUriInterval(t,i);case JulianDate:return JulianDate.fromIso8601(defaultValue(t.date,t));case LabelStyle$1:return LabelStyle$1[defaultValue(t.labelStyle,t)];case Number:return defaultValue(t.number,t);case NearFarScalar:return t.nearFarScalar;case DistanceDisplayCondition:return t.distanceDisplayCondition;case Object:return defaultValue(defaultValue(t.object,t.value),t);case Quaternion:return unwrapQuaternionInterval(t);case Rotation:return defaultValue(t.number,t);case ShadowMode$1:return ShadowMode$1[defaultValue(defaultValue(t.shadowMode,t.shadows),t)];case String:return defaultValue(t.string,t);case StripeOrientation$1:return StripeOrientation$1[defaultValue(t.stripeOrientation,t)];case Rectangle:return unwrapRectangleInterval(t);case URI:return unwrapUriInterval(t,i);case VerticalOrigin$1:return VerticalOrigin$1[defaultValue(t.verticalOrigin,t)];default:throw new RuntimeError(e)}}var interpolators={HERMITE:HermitePolynomialApproximation,LAGRANGE:LagrangePolynomialApproximation,LINEAR:LinearApproximation};function updateInterpolationSettings(e,t){var i=e.interpolationAlgorithm,r=e.interpolationDegree;(defined(i)||defined(r))&&t.setInterpolationOptions({interpolationAlgorithm:interpolators[i],interpolationDegree:r}),defined(r=e.forwardExtrapolationType)&&(t.forwardExtrapolationType=ExtrapolationType$1[r]),defined(r=e.forwardExtrapolationDuration)&&(t.forwardExtrapolationDuration=r),defined(r=e.backwardExtrapolationType)&&(t.backwardExtrapolationType=ExtrapolationType$1[r]),defined(e=e.backwardExtrapolationDuration)&&(t.backwardExtrapolationDuration=e)}var iso8601Scratch={iso8601:void 0};function intervalFromString(e){if(defined(e))return iso8601Scratch.iso8601=e,TimeInterval.fromIso8601(iso8601Scratch)}function wrapPropertyInInfiniteInterval(e){var t=Iso8601.MAXIMUM_INTERVAL.clone();return t.data=e,t}function convertPropertyToComposite(e){var t=new CompositeProperty;return t.intervals.addInterval(wrapPropertyInInfiniteInterval(e)),t}function convertPositionPropertyToComposite(e){var t=new CompositePositionProperty(e.referenceFrame);return t.intervals.addInterval(wrapPropertyInInfiniteInterval(e)),t}function processProperty(e,t,i,r,n,a,o){var s,l=intervalFromString(r.interval);defined(n)&&(l=defined(l)?TimeInterval.intersect(l,n,scratchTimeInterval):n);var c=!defined(r.reference)&&!defined(r.velocityReference),u=defined(l)&&!l.equals(Iso8601.MAXIMUM_INTERVAL);if(!0===r.delete)return u?removePropertyData(t[i],l):void(t[i]=void 0);if(n=!1,c){if(!defined(s=unwrapInterval(e,r,a)))return;h=defaultValue(e.packedLength,1),p=defaultValue(s.length,1),n=!defined(r.array)&&"string"!=typeof s&&h<p&&e!==Object}if(a="function"==typeof e.unpack&&e!==Rotation,n||u){var d,h=t[i],p=r.epoch;if(defined(p)&&(d=JulianDate.fromIso8601(p)),n&&!u)return h instanceof SampledProperty||(t[i]=h=new SampledProperty(e)),h.addSamplesPackedArray(s,d),void updateInterpolationSettings(r,h);if(!n&&u)return(l=l.clone()).data=c?a?e.unpack(s,0):s:createSpecializedProperty(e,o,r),defined(h)||(t[i]=h=new(c?TimeIntervalCollectionProperty:CompositeProperty)),c&&h instanceof TimeIntervalCollectionProperty||(h instanceof CompositeProperty||(t[i]=h=convertPropertyToComposite(h)),c&&(l.data=new ConstantProperty(l.data))),void h.intervals.addInterval(l);defined(h)||(t[i]=h=new CompositeProperty),h instanceof CompositeProperty||(t[i]=h=convertPropertyToComposite(h)),defined(h=(u=h.intervals).findInterval(l))&&h.data instanceof SampledProperty||((h=l.clone()).data=new SampledProperty(e),u.addInterval(h)),h.data.addSamplesPackedArray(s,d),updateInterpolationSettings(r,h.data)}else t[i]=c?new ConstantProperty(a?e.unpack(s,0):s):createSpecializedProperty(e,o,r)}function removePropertyData(e,t){if(e instanceof SampledProperty)e.removeSamples(t);else if(e instanceof TimeIntervalCollectionProperty)e.intervals.removeInterval(t);else if(e instanceof CompositeProperty){for(var i=e.intervals,r=0;r<i.length;++r){var n=TimeInterval.intersect(i.get(r),t,scratchTimeInterval);n.isEmpty||removePropertyData(n.data,t)}i.removeInterval(t)}}function processPacketData(e,t,i,r,n,a,o){if(defined(r))if(Array.isArray(r))for(var s=0,l=r.length;s<l;++s)processProperty(e,t,i,r[s],n,a,o);else processProperty(e,t,i,r,n,a,o)}function processPositionProperty(e,t,i,r,n,a){var o=intervalFromString(i.interval);defined(r)&&(o=defined(o)?TimeInterval.intersect(o,r,scratchTimeInterval):r);var s,l,c=defined(i.cartesianVelocity)?1:0,u=Cartesian3.packedLength*(1+c),d=!defined(i.reference),h=defined(o)&&!o.equals(Iso8601.MAXIMUM_INTERVAL);if(!0===i.delete)return h?removePositionPropertyData(e[t],o):void(e[t]=void 0);var p=!1;if(d&&(defined(i.referenceFrame)&&(l=ReferenceFrame$1[i.referenceFrame]),l=defaultValue(l,ReferenceFrame$1.FIXED),p=u<defaultValue((s=unwrapCartesianInterval(i)).length,1)),p||h){var f;r=e[t];if(defined(u=i.epoch)&&(f=JulianDate.fromIso8601(u)),p&&!h)return r instanceof SampledPositionProperty&&(!defined(l)||r.referenceFrame===l)||(e[t]=r=new SampledPositionProperty(l,c)),r.addSamplesPackedArray(s,f),void updateInterpolationSettings(i,r);if(!p&&h)return(o=o.clone()).data=d?Cartesian3.unpack(s):createReferenceProperty(a,i.reference),defined(r)||(r=new(d?TimeIntervalCollectionPositionProperty:CompositePositionProperty)(l),e[t]=r),d&&r instanceof TimeIntervalCollectionPositionProperty&&defined(l)&&r.referenceFrame===l||(r instanceof CompositePositionProperty||(e[t]=r=convertPositionPropertyToComposite(r)),d&&(o.data=new ConstantPositionProperty(o.data,l))),void r.intervals.addInterval(o);defined(r)?r instanceof CompositePositionProperty||(e[t]=r=convertPositionPropertyToComposite(r)):e[t]=r=new CompositePositionProperty(l),defined(r=(h=r.intervals).findInterval(o))&&r.data instanceof SampledPositionProperty&&(!defined(l)||r.data.referenceFrame===l)||((r=o.clone()).data=new SampledPositionProperty(l,c),h.addInterval(r)),r.data.addSamplesPackedArray(s,f),updateInterpolationSettings(i,r.data)}else e[t]=d?new ConstantPositionProperty(Cartesian3.unpack(s),l):createReferenceProperty(a,i.reference)}function removePositionPropertyData(e,t){if(e instanceof SampledPositionProperty)e.removeSamples(t);else if(e instanceof TimeIntervalCollectionPositionProperty)e.intervals.removeInterval(t);else if(e instanceof CompositePositionProperty){for(var i=e.intervals,r=0;r<i.length;++r){var n=TimeInterval.intersect(i.get(r),t,scratchTimeInterval);n.isEmpty||removePositionPropertyData(n.data,t)}i.removeInterval(t)}}function processPositionPacketData(e,t,i,r,n,a){if(defined(i))if(Array.isArray(i))for(var o=0,s=i.length;o<s;++o)processPositionProperty(e,t,i[o],r,n,a);else processPositionProperty(e,t,i,r,n,a)}function processShapePacketData(e,t,i,r){defined(i.references)?processReferencesArrayPacketData(e,t,i.references,i.interval,r,PropertyArray,CompositeProperty):(defined(i.cartesian)&&(i.array=Cartesian2.unpackArray(i.cartesian)),defined(i.array)&&processPacketData(Array,e,t,i,void 0,void 0,r))}function processMaterialProperty(e,t,i,r,n,a){var o=intervalFromString(i.interval);defined(r)&&(o=defined(o)?TimeInterval.intersect(o,r,scratchTimeInterval):r);var s,l,c,u=e[t];defined(o)?(u instanceof CompositeMaterialProperty||(u=new CompositeMaterialProperty,e[t]=u),defined(l=(r=u.intervals).findInterval({start:o.start,stop:o.stop}))?s=l.data:(l=o.clone(),r.addInterval(l))):s=u,defined(i.solidColor)?(s instanceof ColorMaterialProperty||(s=new ColorMaterialProperty),processPacketData(Color,s,"color",(c=i.solidColor).color,void 0,void 0,a)):defined(i.grid)?(s instanceof GridMaterialProperty||(s=new GridMaterialProperty),processPacketData(Color,s,"color",(c=i.grid).color,void 0,n,a),processPacketData(Number,s,"cellAlpha",c.cellAlpha,void 0,n,a),processPacketData(Cartesian2,s,"lineCount",c.lineCount,void 0,n,a),processPacketData(Cartesian2,s,"lineThickness",c.lineThickness,void 0,n,a),processPacketData(Cartesian2,s,"lineOffset",c.lineOffset,void 0,n,a)):defined(i.image)?(s instanceof ImageMaterialProperty||(s=new ImageMaterialProperty),c=i.image,processPacketData(Image,s,"image",c.image,void 0,n,a),processPacketData(Cartesian2,s,"repeat",c.repeat,void 0,n,a),processPacketData(Color,s,"color",c.color,void 0,n,a),processPacketData(Boolean,s,"transparent",c.transparent,void 0,n,a)):defined(i.stripe)?(s instanceof StripeMaterialProperty||(s=new StripeMaterialProperty),c=i.stripe,processPacketData(StripeOrientation$1,s,"orientation",c.orientation,void 0,n,a),processPacketData(Color,s,"evenColor",c.evenColor,void 0,n,a),processPacketData(Color,s,"oddColor",c.oddColor,void 0,n,a),processPacketData(Number,s,"offset",c.offset,void 0,n,a),processPacketData(Number,s,"repeat",c.repeat,void 0,n,a)):defined(i.polylineOutline)?(s instanceof PolylineOutlineMaterialProperty||(s=new PolylineOutlineMaterialProperty),processPacketData(Color,s,"color",(c=i.polylineOutline).color,void 0,n,a),processPacketData(Color,s,"outlineColor",c.outlineColor,void 0,n,a),processPacketData(Number,s,"outlineWidth",c.outlineWidth,void 0,n,a)):defined(i.polylineGlow)?(s instanceof PolylineGlowMaterialProperty||(s=new PolylineGlowMaterialProperty),processPacketData(Color,s,"color",(c=i.polylineGlow).color,void 0,n,a),processPacketData(Number,s,"glowPower",c.glowPower,void 0,n,a),processPacketData(Number,s,"taperPower",c.taperPower,void 0,n,a)):defined(i.polylineArrow)?(s instanceof PolylineArrowMaterialProperty||(s=new PolylineArrowMaterialProperty),processPacketData(Color,s,"color",(c=i.polylineArrow).color,void 0,void 0,a)):defined(i.polylineDash)?(s instanceof PolylineDashMaterialProperty||(s=new PolylineDashMaterialProperty),processPacketData(Color,s,"color",(c=i.polylineDash).color,void 0,void 0,a),processPacketData(Color,s,"gapColor",c.gapColor,void 0,void 0,a),processPacketData(Number,s,"dashLength",c.dashLength,void 0,n,a),processPacketData(Number,s,"dashPattern",c.dashPattern,void 0,n,a)):defined(i.checkerboard)&&(s instanceof CheckerboardMaterialProperty||(s=new CheckerboardMaterialProperty),processPacketData(Color,s,"evenColor",(c=i.checkerboard).evenColor,void 0,n,a),processPacketData(Color,s,"oddColor",c.oddColor,void 0,n,a),processPacketData(Cartesian2,s,"repeat",c.repeat,void 0,n,a)),defined(l)?l.data=s:e[t]=s}function processMaterialPacketData(e,t,i,r,n,a){if(defined(i))if(Array.isArray(i))for(var o=0,s=i.length;o<s;++o)processMaterialProperty(e,t,i[o],r,n,a);else processMaterialProperty(e,t,i,r,n,a)}function processName(e,t,i,r){defined(t.name)&&(e.name=t.name)}function processDescription(e,t,i,r){defined(t=t.description)&&processPacketData(String,e,"description",t,void 0,r,i)}function processPosition(e,t,i,r){defined(t=t.position)&&processPositionPacketData(e,"position",t,void 0,r,i)}function processViewFrom(e,t,i,r){defined(t=t.viewFrom)&&processPacketData(Cartesian3,e,"viewFrom",t,void 0,r,i)}function processOrientation(e,t,i,r){defined(t=t.orientation)&&processPacketData(Quaternion,e,"orientation",t,void 0,r,i)}function processProperties(e,t,i,r){var n=t.properties;if(defined(n))for(var a in defined(e.properties)||(e.properties=new PropertyBag),n)if(n.hasOwnProperty(a)){e.properties.hasProperty(a)||e.properties.addProperty(a);var o=n[a];if(Array.isArray(o))for(var s=0,l=o.length;s<l;++s)processProperty(getPropertyType(o[s]),e.properties,a,o[s],void 0,r,i);else processProperty(getPropertyType(o),e.properties,a,o,void 0,r,i)}}function processReferencesArrayPacketData(e,t,i,r,n,a,o){var s=i.map((function(e){return createReferenceProperty(n,e)}));defined(r)?(r=intervalFromString(r),(i=e[t])instanceof o||((o=new o).intervals.addInterval(wrapPropertyInInfiniteInterval(i)),e[t]=i=o),r.data=new a(s),i.intervals.addInterval(r)):e[t]=new a(s)}function processArrayPacketData(e,t,i,r){var n=i.references;defined(n)?processReferencesArrayPacketData(e,t,n,i.interval,r,PropertyArray,CompositeProperty):processPacketData(Array,e,t,i,void 0,void 0,r)}function processArray(e,t,i,r){if(defined(i))if(Array.isArray(i))for(var n=0,a=i.length;n<a;++n)processArrayPacketData(e,t,i[n],r);else processArrayPacketData(e,t,i,r)}function processPositionArrayPacketData(e,t,i,r){var n=i.references;defined(n)?processReferencesArrayPacketData(e,t,n,i.interval,r,PositionPropertyArray,CompositePositionProperty):(defined(i.cartesian)?i.array=Cartesian3.unpackArray(i.cartesian):defined(i.cartographicRadians)?i.array=Cartesian3.fromRadiansArrayHeights(i.cartographicRadians):defined(i.cartographicDegrees)&&(i.array=Cartesian3.fromDegreesArrayHeights(i.cartographicDegrees)),defined(i.array)&&processPacketData(Array,e,t,i,void 0,void 0,r))}function processPositionArray(e,t,i,r){if(defined(i))if(Array.isArray(i))for(var n=0,a=i.length;n<a;++n)processPositionArrayPacketData(e,t,i[n],r);else processPositionArrayPacketData(e,t,i,r)}function unpackCartesianArray(e){return Cartesian3.unpackArray(e)}function unpackCartographicRadiansArray(e){return Cartesian3.fromRadiansArrayHeights(e)}function unpackCartographicDegreesArray(e){return Cartesian3.fromDegreesArrayHeights(e)}function processPositionArrayOfArraysPacketData(e,t,i,r){var n=i.references;defined(n)?(n=n.map((function(e){var t={};return processReferencesArrayPacketData(t,"positions",e,i.interval,r,PositionPropertyArray,CompositePositionProperty),t.positions})),e[t]=new PositionPropertyArray(n)):(defined(i.cartesian)?i.array=i.cartesian.map(unpackCartesianArray):defined(i.cartographicRadians)?i.array=i.cartographicRadians.map(unpackCartographicRadiansArray):defined(i.cartographicDegrees)&&(i.array=i.cartographicDegrees.map(unpackCartographicDegreesArray)),defined(i.array)&&processPacketData(Array,e,t,i,void 0,void 0,r))}function processPositionArrayOfArrays(e,t,i,r){if(defined(i))if(Array.isArray(i))for(var n=0,a=i.length;n<a;++n)processPositionArrayOfArraysPacketData(e,t,i[n],r);else processPositionArrayOfArraysPacketData(e,t,i,r)}function processShape(e,t,i,r){if(defined(i))if(Array.isArray(i))for(var n=0,a=i.length;n<a;n++)processShapePacketData(e,t,i[n],r);else processShapePacketData(e,t,i,r)}function processAvailability(e,t,i,r){var n,a=t.availability;if(defined(a)){if(Array.isArray(a))for(var o=0,s=a.length;o<s;++o)defined(n)||(n=new TimeIntervalCollection),n.addInterval(intervalFromString(a[o]));else(n=new TimeIntervalCollection).addInterval(intervalFromString(a));e.availability=n}}function processAlignedAxis(e,t,i,r,n){defined(t)&&processPacketData(UnitCartesian3,e,"alignedAxis",t,i,r,n)}function processBillboard(e,t,i,r){var n,a=t.billboard;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.billboard)||(e.billboard=t=new BillboardGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Image,t,"image",a.image,n,r,i),processPacketData(Number,t,"scale",a.scale,n,r,i),processPacketData(Cartesian2,t,"pixelOffset",a.pixelOffset,n,r,i),processPacketData(Cartesian3,t,"eyeOffset",a.eyeOffset,n,r,i),processPacketData(HorizontalOrigin$1,t,"horizontalOrigin",a.horizontalOrigin,n,r,i),processPacketData(VerticalOrigin$1,t,"verticalOrigin",a.verticalOrigin,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Color,t,"color",a.color,n,r,i),processPacketData(Rotation,t,"rotation",a.rotation,n,r,i),processAlignedAxis(t,a.alignedAxis,n,r,i),processPacketData(Boolean,t,"sizeInMeters",a.sizeInMeters,n,r,i),processPacketData(Number,t,"width",a.width,n,r,i),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(NearFarScalar,t,"scaleByDistance",a.scaleByDistance,n,r,i),processPacketData(NearFarScalar,t,"translucencyByDistance",a.translucencyByDistance,n,r,i),processPacketData(NearFarScalar,t,"pixelOffsetScaleByDistance",a.pixelOffsetScaleByDistance,n,r,i),processPacketData(BoundingRectangle,t,"imageSubRegion",a.imageSubRegion,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(Number,t,"disableDepthTestDistance",a.disableDepthTestDistance,n,r,i))}function processBox(e,t,i,r){var n,a=t.box;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.box)||(e.box=t=new BoxGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Cartesian3,t,"dimensions",a.dimensions,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processCorridor(e,t,i,r){var n,a=t.corridor;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.corridor)||(e.corridor=t=new CorridorGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPositionArray(t,"positions",a.positions,i),processPacketData(Number,t,"width",a.width,n,r,i),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Number,t,"extrudedHeight",a.extrudedHeight,n,r,i),processPacketData(HeightReference$1,t,"extrudedHeightReference",a.extrudedHeightReference,n,r,i),processPacketData(CornerType$1,t,"cornerType",a.cornerType,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i))}function processCylinder(e,t,i,r){var n,a=t.cylinder;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.cylinder)||(e.cylinder=t=new CylinderGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Number,t,"length",a.length,n,r,i),processPacketData(Number,t,"topRadius",a.topRadius,n,r,i),processPacketData(Number,t,"bottomRadius",a.bottomRadius,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Number,t,"numberOfVerticalLines",a.numberOfVerticalLines,n,r,i),processPacketData(Number,t,"slices",a.slices,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processDocument(e,t){var i=e.version;if(defined(i)&&"string"==typeof i){var r=i.split(".");if(2===r.length){if("1"!==r[0])throw new RuntimeError("Cesium only supports CZML version 1.");t._version=i}}if(!defined(t._version))throw new RuntimeError("CZML version information invalid.  It is expected to be a property on the document object in the <Major>.<Minor> version format.");i=t._documentPacket,defined(e.name)&&(i.name=e.name),defined(t=e.clock)&&(defined(e=i.clock)?(e.interval=defaultValue(t.interval,e.interval),e.currentTime=defaultValue(t.currentTime,e.currentTime),e.range=defaultValue(t.range,e.range),e.step=defaultValue(t.step,e.step),e.multiplier=defaultValue(t.multiplier,e.multiplier)):i.clock={interval:t.interval,currentTime:t.currentTime,range:t.range,step:t.step,multiplier:t.multiplier})}function processEllipse(e,t,i,r){var n,a=t.ellipse;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.ellipse)||(e.ellipse=t=new EllipseGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Number,t,"semiMajorAxis",a.semiMajorAxis,n,r,i),processPacketData(Number,t,"semiMinorAxis",a.semiMinorAxis,n,r,i),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Number,t,"extrudedHeight",a.extrudedHeight,n,r,i),processPacketData(HeightReference$1,t,"extrudedHeightReference",a.extrudedHeightReference,n,r,i),processPacketData(Rotation,t,"rotation",a.rotation,n,r,i),processPacketData(Rotation,t,"stRotation",a.stRotation,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Number,t,"numberOfVerticalLines",a.numberOfVerticalLines,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i))}function processEllipsoid(e,t,i,r){var n,a=t.ellipsoid;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.ellipsoid)||(e.ellipsoid=t=new EllipsoidGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Cartesian3,t,"radii",a.radii,n,r,i),processPacketData(Cartesian3,t,"innerRadii",a.innerRadii,n,r,i),processPacketData(Number,t,"minimumClock",a.minimumClock,n,r,i),processPacketData(Number,t,"maximumClock",a.maximumClock,n,r,i),processPacketData(Number,t,"minimumCone",a.minimumCone,n,r,i),processPacketData(Number,t,"maximumCone",a.maximumCone,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Number,t,"stackPartitions",a.stackPartitions,n,r,i),processPacketData(Number,t,"slicePartitions",a.slicePartitions,n,r,i),processPacketData(Number,t,"subdivisions",a.subdivisions,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processLabel(e,t,i,r){var n,a=t.label;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.label)||(e.label=t=new LabelGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(String,t,"text",a.text,n,r,i),processPacketData(String,t,"font",a.font,n,r,i),processPacketData(LabelStyle$1,t,"style",a.style,n,r,i),processPacketData(Number,t,"scale",a.scale,n,r,i),processPacketData(Boolean,t,"showBackground",a.showBackground,n,r,i),processPacketData(Color,t,"backgroundColor",a.backgroundColor,n,r,i),processPacketData(Cartesian2,t,"backgroundPadding",a.backgroundPadding,n,r,i),processPacketData(Cartesian2,t,"pixelOffset",a.pixelOffset,n,r,i),processPacketData(Cartesian3,t,"eyeOffset",a.eyeOffset,n,r,i),processPacketData(HorizontalOrigin$1,t,"horizontalOrigin",a.horizontalOrigin,n,r,i),processPacketData(VerticalOrigin$1,t,"verticalOrigin",a.verticalOrigin,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Color,t,"fillColor",a.fillColor,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(NearFarScalar,t,"translucencyByDistance",a.translucencyByDistance,n,r,i),processPacketData(NearFarScalar,t,"pixelOffsetScaleByDistance",a.pixelOffsetScaleByDistance,n,r,i),processPacketData(NearFarScalar,t,"scaleByDistance",a.scaleByDistance,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(Number,t,"disableDepthTestDistance",a.disableDepthTestDistance,n,r,i))}function processModel(e,t,i,r){if(defined(t=t.model)){var n,a,o=intervalFromString(t.interval),s=e.model;defined(s)||(e.model=s=new ModelGraphics),processPacketData(Boolean,s,"show",t.show,o,r,i),processPacketData(URI,s,"uri",t.gltf,o,r,i),processPacketData(Number,s,"scale",t.scale,o,r,i),processPacketData(Number,s,"minimumPixelSize",t.minimumPixelSize,o,r,i),processPacketData(Number,s,"maximumScale",t.maximumScale,o,r,i),processPacketData(Boolean,s,"incrementallyLoadTextures",t.incrementallyLoadTextures,o,r,i),processPacketData(Boolean,s,"runAnimations",t.runAnimations,o,r,i),processPacketData(Boolean,s,"clampAnimations",t.clampAnimations,o,r,i),processPacketData(ShadowMode$1,s,"shadows",t.shadows,o,r,i),processPacketData(HeightReference$1,s,"heightReference",t.heightReference,o,r,i),processPacketData(Color,s,"silhouetteColor",t.silhouetteColor,o,r,i),processPacketData(Number,s,"silhouetteSize",t.silhouetteSize,o,r,i),processPacketData(Color,s,"color",t.color,o,r,i),processPacketData(ColorBlendMode$1,s,"colorBlendMode",t.colorBlendMode,o,r,i),processPacketData(Number,s,"colorBlendAmount",t.colorBlendAmount,o,r,i),processPacketData(DistanceDisplayCondition,s,"distanceDisplayCondition",t.distanceDisplayCondition,o,r,i);var l=t.nodeTransformations;if(defined(l))if(Array.isArray(l))for(n=0,a=l.length;n<a;++n)processNodeTransformations(s,l[n],o,r,i);else processNodeTransformations(s,l,o,r,i);var c=t.articulations;if(defined(c))if(Array.isArray(c))for(n=0,a=c.length;n<a;++n)processArticulations(s,c[n],o,r,i);else processArticulations(s,c,o,r,i)}}function processNodeTransformations(e,t,i,r,n){var a=intervalFromString(t.interval);defined(i)&&(a=defined(a)?TimeInterval.intersect(a,i,scratchTimeInterval):i);for(var o=e.nodeTransformations,s=Object.keys(t),l=0,c=s.length;l<c;++l){var u,d,h=s[l];"interval"!==h&&defined(u=t[h])&&(defined(o)||(e.nodeTransformations=o=new PropertyBag),o.hasProperty(h)||o.addProperty(h),defined(d=o[h])||(o[h]=d=new NodeTransformationProperty),processPacketData(Cartesian3,d,"translation",u.translation,a,r,n),processPacketData(Quaternion,d,"rotation",u.rotation,a,r,n),processPacketData(Cartesian3,d,"scale",u.scale,a,r,n))}}function processArticulations(e,t,i,r,n){var a=intervalFromString(t.interval);defined(i)&&(a=defined(a)?TimeInterval.intersect(a,i,scratchTimeInterval):i);for(var o=e.articulations,s=Object.keys(t),l=0,c=s.length;l<c;++l){var u,d=s[l];"interval"!==d&&defined(u=t[d])&&(defined(o)||(e.articulations=o=new PropertyBag),o.hasProperty(d)||o.addProperty(d),processPacketData(Number,o,d,u,a,r,n))}}function processPath(e,t,i,r){var n,a=t.path;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.path)||(e.path=t=new PathGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Number,t,"leadTime",a.leadTime,n,r,i),processPacketData(Number,t,"trailTime",a.trailTime,n,r,i),processPacketData(Number,t,"width",a.width,n,r,i),processPacketData(Number,t,"resolution",a.resolution,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processPoint(e,t,i,r){var n,a=t.point;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.point)||(e.point=t=new PointGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Number,t,"pixelSize",a.pixelSize,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Color,t,"color",a.color,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(NearFarScalar,t,"scaleByDistance",a.scaleByDistance,n,r,i),processPacketData(NearFarScalar,t,"translucencyByDistance",a.translucencyByDistance,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(Number,t,"disableDepthTestDistance",a.disableDepthTestDistance,n,r,i))}function PolygonHierarchyProperty(e){this.polygon=e,this._definitionChanged=new Event}function processPolygon(e,t,i,r){var n,a=t.polygon;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.polygon)||(e.polygon=t=new PolygonGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPositionArray(t,"_positions",a.positions,i),processPositionArrayOfArrays(t,"_holes",a.holes,i),(defined(t._positions)||defined(t._holes))&&(t.hierarchy=new PolygonHierarchyProperty(t)),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Number,t,"extrudedHeight",a.extrudedHeight,n,r,i),processPacketData(HeightReference$1,t,"extrudedHeightReference",a.extrudedHeightReference,n,r,i),processPacketData(Rotation,t,"stRotation",a.stRotation,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Boolean,t,"perPositionHeight",a.perPositionHeight,n,r,i),processPacketData(Boolean,t,"closeTop",a.closeTop,n,r,i),processPacketData(Boolean,t,"closeBottom",a.closeBottom,n,r,i),processPacketData(ArcType$1,t,"arcType",a.arcType,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i))}function adaptFollowSurfaceToArcType(e){return e?ArcType$1.GEODESIC:ArcType$1.NONE}function processPolyline(e,t,i,r){var n,a=t.polyline;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.polyline)||(e.polyline=t=new PolylineGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPositionArray(t,"positions",a.positions,i),processPacketData(Number,t,"width",a.width,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processMaterialPacketData(t,"depthFailMaterial",a.depthFailMaterial,n,r,i),processPacketData(ArcType$1,t,"arcType",a.arcType,n,r,i),processPacketData(Boolean,t,"clampToGround",a.clampToGround,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i),defined(a.followSurface)&&!defined(a.arcType)&&(e={},processPacketData(Boolean,e,"followSurface",a.followSurface,n,r,i),t.arcType=createAdapterProperty(e.followSurface,adaptFollowSurfaceToArcType)))}function processPolylineVolume(e,t,i,r){var n,a=t.polylineVolume;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.polylineVolume)||(e.polylineVolume=t=new PolylineVolumeGraphics),processPositionArray(t,"positions",a.positions,i),processShape(t,"shape",a.shape,i),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(CornerType$1,t,"cornerType",a.cornerType,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processRectangle(e,t,i,r){var n,a=t.rectangle;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.rectangle)||(e.rectangle=t=new RectangleGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Rectangle,t,"coordinates",a.coordinates,n,r,i),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Number,t,"extrudedHeight",a.extrudedHeight,n,r,i),processPacketData(HeightReference$1,t,"extrudedHeightReference",a.extrudedHeightReference,n,r,i),processPacketData(Rotation,t,"rotation",a.rotation,n,r,i),processPacketData(Rotation,t,"stRotation",a.stRotation,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i))}function processTileset(e,t,i,r){var n,a=t.tileset;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.tileset)||(e.tileset=t=new Cesium3DTilesetGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(URI,t,"uri",a.uri,n,r,i),processPacketData(Number,t,"maximumScreenSpaceError",a.maximumScreenSpaceError,n,r,i))}function processWall(e,t,i,r){var n,a=t.wall;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.wall)||(e.wall=t=new WallGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPositionArray(t,"positions",a.positions,i),processArray(t,"minimumHeights",a.minimumHeights,i),processArray(t,"maximumHeights",a.maximumHeights,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processCzmlPacket(e,t,i,r,n){if(defined(a=e.id)||(a=createGuid()),currentId=a,!defined(n._version)&&"document"!==a)throw new RuntimeError("The first CZML packet is required to be the document object.");if(!0===e.delete)t.removeById(a);else if("document"===a)processDocument(e,n);else{var a,o=t.getOrCreateEntity(a);defined(a=e.parent)&&(o.parent=t.getOrCreateEntity(a));for(var s=i.length-1;-1<s;s--)i[s](o,e,t,r)}currentId=void 0}function updateClock(e){var t=e._documentPacket.clock;if(!defined(t)){if(!defined(e._clock))if(!(a=e._entityCollection.computeAvailability()).start.equals(Iso8601.MINIMUM_VALUE)){var i=a.start,r=a.stop,n=JulianDate.secondsDifference(r,i),a=Math.round(n/120);return(n=new DataSourceClock).startTime=JulianDate.clone(i),n.stopTime=JulianDate.clone(r),n.clockRange=ClockRange$1.LOOP_STOP,n.multiplier=a,n.currentTime=JulianDate.clone(i),n.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,e._clock=n,!0}return!1}return defined(e._clock)?n=e._clock.clone():((n=new DataSourceClock).startTime=Iso8601.MINIMUM_VALUE.clone(),n.stopTime=Iso8601.MAXIMUM_VALUE.clone(),n.currentTime=Iso8601.MINIMUM_VALUE.clone(),n.clockRange=ClockRange$1.LOOP_STOP,n.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,n.multiplier=1),defined(i=intervalFromString(t.interval))&&(n.startTime=i.start,n.stopTime=i.stop),defined(t.currentTime)&&(n.currentTime=JulianDate.fromIso8601(t.currentTime)),defined(t.range)&&(n.clockRange=defaultValue(ClockRange$1[t.range],ClockRange$1.LOOP_STOP)),defined(t.step)&&(n.clockStep=defaultValue(ClockStep$1[t.step],ClockStep$1.SYSTEM_CLOCK_MULTIPLIER)),defined(t.multiplier)&&(n.multiplier=t.multiplier),!n.equals(e._clock)&&(e._clock=n.clone(e._clock),!0)}function load(e,t,i,r){var n=t,a=(i=defaultValue(i,defaultValue.EMPTY_OBJECT)).sourceUri;if("string"==typeof(i=i.credit)&&(i=new Credit(i)),e._credit=i,"string"==typeof t||t instanceof Resource){n=(t=Resource.createIfNeeded(t)).fetchJson(),a=defaultValue(a,t.clone());var o=e._resourceCredits,s=t.credits;if(defined(s))for(var l=s.length,c=0;c<l;c++)o.push(s[c])}return a=Resource.createIfNeeded(a),DataSource.setLoading(e,!0),when(n,(function(t){return loadCzml(e,t,a,r)})).otherwise((function(t){return DataSource.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),when.reject(t)}))}function loadCzml(e,t,i,r){DataSource.setLoading(e,!0);var n=e._entityCollection;return r&&(e._version=void 0,e._documentPacket=new DocumentPacket,n.removeAll()),CzmlDataSource._processCzml(t,n,i,void 0,e),t=updateClock(e),defined((n=e._documentPacket).name)&&e._name!==n.name?(e._name=n.name,t=!0):!defined(e._name)&&defined(i)&&(e._name=getFilenameFromUri(i.getUrlComponent()),t=!0),DataSource.setLoading(e,!1),t&&e._changed.raiseEvent(e),e}function DocumentPacket(){this.name=void 0,this.clock=void 0}function CzmlDataSource(e){this._name=e,this._changed=new Event,this._error=new Event,this._isLoading=!1,this._loading=new Event,this._clock=void 0,this._documentPacket=new DocumentPacket,this._version=void 0,this._entityCollection=new EntityCollection(this),this._entityCluster=new EntityCluster,this._credit=void 0,this._resourceCredits=[]}function DataSourceCollection(){this._dataSources=[],this._dataSourceAdded=new Event,this._dataSourceRemoved=new Event,this._dataSourceMoved=new Event}function getIndex(e,t){return e.indexOf(t)}function swapDataSources(e,t,i){var r=e._dataSources,n=r.length-1;(t=CesiumMath.clamp(t,0,n))!==(i=CesiumMath.clamp(i,0,n))&&(n=r[t],r[t]=r[i],r[i]=n,e.dataSourceMoved.raiseEvent(n,i,t))}function PrimitiveCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._primitives=[],this._guid=createGuid(),this._zIndex=void 0,this.show=defaultValue(e.show,!0),this.destroyPrimitives=defaultValue(e.destroyPrimitives,!0)}function getPrimitiveIndex(e,t){return e._primitives.indexOf(t)}function OrderedGroundPrimitiveCollection(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}function DynamicGeometryBatch(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new AssociativeArray}Object.defineProperties(PolygonHierarchyProperty.prototype,{isConstant:{get:function(){var e=this.polygon._positions,t=this.polygon._holes;return(!defined(e)||e.isConstant)&&(!defined(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}}),PolygonHierarchyProperty.prototype.getValue=function(e,t){var i,r;return defined(this.polygon._positions)&&(i=this.polygon._positions.getValue(e)),defined(this.polygon._holes)&&defined(r=this.polygon._holes.getValue(e))&&(r=r.map((function(e){return new PolygonHierarchy(e)}))),defined(t)?(t.positions=i,t.holes=r,t):new PolygonHierarchy(i,r)},PolygonHierarchyProperty.prototype.equals=function(e){return this===e||e instanceof PolygonHierarchyProperty&&Property.equals(this.polygon._positions,e.polygon._positions)&&Property.equals(this.polygon._holes,e.polygon._holes)},CzmlDataSource.load=function(e,t){return(new CzmlDataSource).load(e,t)},Object.defineProperties(CzmlDataSource.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}}),CzmlDataSource.updaters=[processBillboard,processBox,processCorridor,processCylinder,processEllipse,processEllipsoid,processLabel,processModel,processName,processDescription,processPath,processPoint,processPolygon,processPolyline,processPolylineVolume,processProperties,processRectangle,processPosition,processTileset,processViewFrom,processWall,processOrientation,processAvailability],CzmlDataSource.prototype.process=function(e,t){return load(this,e,t,!1)},CzmlDataSource.prototype.load=function(e,t){return load(this,e,t,!0)},CzmlDataSource.prototype.update=function(e){return!0},CzmlDataSource.processPacketData=processPacketData,CzmlDataSource.processPositionPacketData=processPositionPacketData,CzmlDataSource.processMaterialPacketData=processMaterialPacketData,CzmlDataSource._processCzml=function(e,t,i,r,n){if(r=defaultValue(r,CzmlDataSource.updaters),Array.isArray(e))for(var a=0,o=e.length;a<o;++a)processCzmlPacket(e[a],t,r,i,n);else processCzmlPacket(e,t,r,i,n)},Object.defineProperties(DataSourceCollection.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),DataSourceCollection.prototype.add=function(e){var t=this,i=this._dataSources;return when(e,(function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e}))},DataSourceCollection.prototype.remove=function(e,t){t=defaultValue(t,!1);var i=this._dataSources.indexOf(e);return-1!==i&&(this._dataSources.splice(i,1),this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0)},DataSourceCollection.prototype.removeAll=function(e){e=defaultValue(e,!1);for(var t=this._dataSources,i=0,r=t.length;i<r;++i){var n=t[i];this._dataSourceRemoved.raiseEvent(this,n),e&&"function"==typeof n.destroy&&n.destroy()}this._dataSources=[]},DataSourceCollection.prototype.contains=function(e){return-1!==this.indexOf(e)},DataSourceCollection.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},DataSourceCollection.prototype.get=function(e){return this._dataSources[e]},DataSourceCollection.prototype.getByName=function(e){return this._dataSources.filter((function(t){return t.name===e}))},DataSourceCollection.prototype.raise=function(e){swapDataSources(this,e=getIndex(this._dataSources,e),e+1)},DataSourceCollection.prototype.lower=function(e){swapDataSources(this,e=getIndex(this._dataSources,e),e-1)},DataSourceCollection.prototype.raiseToTop=function(e){var t=getIndex(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},DataSourceCollection.prototype.lowerToBottom=function(e){var t=getIndex(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},DataSourceCollection.prototype.isDestroyed=function(){return!1},DataSourceCollection.prototype.destroy=function(){return this.removeAll(!0),destroyObject(this)},Object.defineProperties(PrimitiveCollection.prototype,{length:{get:function(){return this._primitives.length}}}),PrimitiveCollection.prototype.add=function(e,t){var i=defined(t),r=e._external=e._external||{};return(r._composites=r._composites||{})[this._guid]={collection:this},i?this._primitives.splice(t,0,e):this._primitives.push(e),e},PrimitiveCollection.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},PrimitiveCollection.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},PrimitiveCollection.prototype.removeAll=function(){for(var e=this._primitives,t=e.length,i=0;i<t;++i)delete e[i]._external._composites[this._guid],this.destroyPrimitives&&e[i].destroy();this._primitives=[]},PrimitiveCollection.prototype.contains=function(e){return!!(defined(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},PrimitiveCollection.prototype.raise=function(e){var t,i;!defined(e)||(t=getPrimitiveIndex(this,e))!==(i=this._primitives).length-1&&(e=i[t],i[t]=i[t+1],i[t+1]=e)},PrimitiveCollection.prototype.raiseToTop=function(e){var t,i;!defined(e)||(t=getPrimitiveIndex(this,e))!==(i=this._primitives).length-1&&(i.splice(t,1),i.push(e))},PrimitiveCollection.prototype.lower=function(e){var t,i;defined(e)&&(t=getPrimitiveIndex(this,e),i=this._primitives,0!==t&&(e=i[t],i[t]=i[t-1],i[t-1]=e))},PrimitiveCollection.prototype.lowerToBottom=function(e){var t,i;defined(e)&&(t=getPrimitiveIndex(this,e),i=this._primitives,0!==t&&(i.splice(t,1),i.unshift(e)))},PrimitiveCollection.prototype.get=function(e){return this._primitives[e]},PrimitiveCollection.prototype.update=function(e){if(this.show)for(var t=this._primitives,i=0;i<t.length;++i)t[i].update(e)},PrimitiveCollection.prototype.prePassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var r=t[i];defined(r.prePassesUpdate)&&r.prePassesUpdate(e)}},PrimitiveCollection.prototype.updateForPass=function(e,t){for(var i=this._primitives,r=0;r<i.length;++r){var n=i[r];defined(n.updateForPass)&&n.updateForPass(e,t)}},PrimitiveCollection.prototype.postPassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var r=t[i];defined(r.postPassesUpdate)&&r.postPassesUpdate(e)}},PrimitiveCollection.prototype.isDestroyed=function(){return!1},PrimitiveCollection.prototype.destroy=function(){return this.removeAll(),destroyObject(this)},Object.defineProperties(OrderedGroundPrimitiveCollection.prototype,{length:{get:function(){return this._length}}}),OrderedGroundPrimitiveCollection.prototype.add=function(e,t){t=defaultValue(t,0);var i=this._collections[t];if(!defined(i)){(i=new PrimitiveCollection({destroyPrimitives:!1}))._zIndex=t,this._collections[t]=i;for(var r=this._collectionsArray,n=0;n<r.length&&r[n]._zIndex<t;)n++;r.splice(n,0,i)}return i.add(e),this._length++,e._zIndex=t,e},OrderedGroundPrimitiveCollection.prototype.set=function(e,t){return t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},OrderedGroundPrimitiveCollection.prototype.remove=function(e,t){if(this.contains(e)){var i=e._zIndex,r=this._collections[i];return(e=t?r.remove(e):r.removeAndDestroy(e))&&this._length--,0===r.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(r),1),this._collections[i]=void 0,r.destroy()),e}return!1},OrderedGroundPrimitiveCollection.prototype.removeAll=function(){for(var e=this._collectionsArray,t=0;t<e.length;t++){var i=e[t];i.destroyPrimitives=!0,i.destroy()}this._collections={},this._collectionsArray=[],this._length=0},OrderedGroundPrimitiveCollection.prototype.contains=function(e){if(!defined(e))return!1;var t=this._collections[e._zIndex];return defined(t)&&t.contains(e)},OrderedGroundPrimitiveCollection.prototype.update=function(e){if(this.show)for(var t=this._collectionsArray,i=0;i<t.length;i++)t[i].update(e)},OrderedGroundPrimitiveCollection.prototype.isDestroyed=function(){return!1},OrderedGroundPrimitiveCollection.prototype.destroy=function(){return this.removeAll(),destroyObject(this)},DynamicGeometryBatch.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},DynamicGeometryBatch.prototype.remove=function(e){var t=e.id;defined(e=this._dynamicUpdaters.get(t))&&(this._dynamicUpdaters.remove(t),e.destroy())},DynamicGeometryBatch.prototype.update=function(e){for(var t=this._dynamicUpdaters.values,i=0,r=t.length;i<r;i++)t[i].update(e);return!0},DynamicGeometryBatch.prototype.removeAllPrimitives=function(){for(var e=this._dynamicUpdaters.values,t=0,i=e.length;t<i;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},DynamicGeometryBatch.prototype.getBoundingSphere=function(e,t){return defined(e=this._dynamicUpdaters.get(e.id))&&defined(e.getBoundingSphere)?e.getBoundingSphere(t):BoundingSphereState$1.FAILED};var scratchColor$b=new Color,defaultOffset$4=Cartesian3.ZERO,offsetScratch$6=new Cartesian3,scratchRectangle$4=new Rectangle;function EllipseGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function EllipseGeometryUpdater(e,t){GroundGeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new EllipseGeometryOptions(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function DynamicEllipseGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(EllipseGeometryUpdater.prototype=Object.create(GroundGeometryUpdater.prototype),EllipseGeometryUpdater.prototype.constructor=EllipseGeometryUpdater),EllipseGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n={show:new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$b)),defined(t)||(t=Color.WHITE),n.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$4,offsetScratch$6))),new GeometryInstance({id:i,geometry:new EllipseGeometry(this._options),attributes:n})},EllipseGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$b),n=this._distanceDisplayConditionProperty.getValue(e);n={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n),offset:void 0};return defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$4,offsetScratch$6))),new GeometryInstance({id:t,geometry:new EllipseOutlineGeometry(this._options),attributes:n})},EllipseGeometryUpdater.prototype._computeCenter=function(e,t){return Property.getValueOrUndefined(this._entity.position,e,t)},EllipseGeometryUpdater.prototype._isHidden=function(e,t){return!defined(e.position)||!defined(t.semiMajorAxis)||!defined(t.semiMinorAxis)||GeometryUpdater.prototype._isHidden.call(this,e,t)},EllipseGeometryUpdater.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!Property.isConstant(t.rotation)||!Property.isConstant(t.height)||!Property.isConstant(t.extrudedHeight)||!Property.isConstant(t.granularity)||!Property.isConstant(t.stRotation)||!Property.isConstant(t.outlineWidth)||!Property.isConstant(t.numberOfVerticalLines)||!Property.isConstant(t.zIndex)||this._onTerrain&&!Property.isConstant(this._materialProperty)&&!(this._materialProperty instanceof ColorMaterialProperty)},EllipseGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrUndefined(t.height,Iso8601.MINIMUM_VALUE),r=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),n=Property.getValueOrUndefined(t.extrudedHeight,Iso8601.MINIMUM_VALUE),a=Property.getValueOrDefault(t.extrudedHeightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE);defined(n)&&!defined(i)&&(i=0);var o=this._options;o.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,o.center=e.position.getValue(Iso8601.MINIMUM_VALUE,o.center),o.semiMajorAxis=t.semiMajorAxis.getValue(Iso8601.MINIMUM_VALUE,o.semiMajorAxis),o.semiMinorAxis=t.semiMinorAxis.getValue(Iso8601.MINIMUM_VALUE,o.semiMinorAxis),o.rotation=Property.getValueOrUndefined(t.rotation,Iso8601.MINIMUM_VALUE),o.granularity=Property.getValueOrUndefined(t.granularity,Iso8601.MINIMUM_VALUE),o.stRotation=Property.getValueOrUndefined(t.stRotation,Iso8601.MINIMUM_VALUE),o.numberOfVerticalLines=Property.getValueOrUndefined(t.numberOfVerticalLines,Iso8601.MINIMUM_VALUE),o.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(i,r,n,a),o.height=GroundGeometryUpdater.getGeometryHeight(i,r),(n=GroundGeometryUpdater.getGeometryExtrudedHeight(n,a))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(n=ApproximateTerrainHeights.getMinimumMaximumHeights(EllipseGeometry.computeRectangle(o,scratchRectangle$4)).minimumTerrainHeight),o.extrudedHeight=n},EllipseGeometryUpdater.DynamicGeometryUpdater=DynamicEllipseGeometryUpdater,defined(Object.create)&&(DynamicEllipseGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicEllipseGeometryUpdater.prototype.constructor=DynamicEllipseGeometryUpdater),DynamicEllipseGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(r.center)||!defined(r.semiMajorAxis)||!defined(r.semiMinorAxis)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicEllipseGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options,n=Property.getValueOrUndefined(t.height,i),a=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),o=Property.getValueOrUndefined(t.extrudedHeight,i),s=Property.getValueOrDefault(t.extrudedHeightReference,i,HeightReference$1.NONE);defined(o)&&!defined(n)&&(n=0),r.center=Property.getValueOrUndefined(e.position,i,r.center),r.semiMajorAxis=Property.getValueOrUndefined(t.semiMajorAxis,i),r.semiMinorAxis=Property.getValueOrUndefined(t.semiMinorAxis,i),r.rotation=Property.getValueOrUndefined(t.rotation,i),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.stRotation=Property.getValueOrUndefined(t.stRotation,i),r.numberOfVerticalLines=Property.getValueOrUndefined(t.numberOfVerticalLines,i),r.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(n,a,o,s),r.height=GroundGeometryUpdater.getGeometryHeight(n,a),(o=GroundGeometryUpdater.getGeometryExtrudedHeight(o,s))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(o=ApproximateTerrainHeights.getMinimumMaximumHeights(EllipseGeometry.computeRectangle(r,scratchRectangle$4)).minimumTerrainHeight),r.extrudedHeight=o};var defaultMaterial$1=new ColorMaterialProperty(Color.WHITE),defaultOffset$5=Cartesian3.ZERO,offsetScratch$7=new Cartesian3,radiiScratch=new Cartesian3,innerRadiiScratch=new Cartesian3,scratchColor$c=new Color,unitSphere=new Cartesian3(1,1,1);function EllipsoidGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function EllipsoidGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new EllipsoidGeometryOptions(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function DynamicEllipsoidGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i),this._scene=e._scene,this._modelMatrix=new Matrix4,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new Cartesian3,this._material={}}defined(Object.create)&&(EllipsoidGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),EllipsoidGeometryUpdater.prototype.constructor=EllipsoidGeometryUpdater),Object.defineProperties(EllipsoidGeometryUpdater.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),EllipsoidGeometryUpdater.prototype.createFillGeometryInstance=function(e,t,i){var r,n=this._entity,a=n.isAvailable(e),o=new ShowGeometryInstanceAttribute(a&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e);s={show:o,distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(s),color:void 0,offset:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(r=this._materialProperty.color.getValue(e,scratchColor$c)),defined(r)||(r=Color.WHITE),r=ColorGeometryInstanceAttribute.fromColor(r),s.color=r),defined(this._options.offsetAttribute)&&(s.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$5,offsetScratch$7))),new GeometryInstance({id:n,geometry:new EllipsoidGeometry(this._options),modelMatrix:t?void 0:n.computeModelMatrixForHeightReference(e,n.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:s})},EllipsoidGeometryUpdater.prototype.createOutlineGeometryInstance=function(e,t,i){var r=this._entity,n=r.isAvailable(e),a=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$c),o=this._distanceDisplayConditionProperty.getValue(e);o={show:new ShowGeometryInstanceAttribute(n&&r.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(a),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(o),offset:void 0};return defined(this._options.offsetAttribute)&&(o.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$5,offsetScratch$7))),new GeometryInstance({id:r,geometry:new EllipsoidOutlineGeometry(this._options),modelMatrix:t?void 0:r.computeModelMatrixForHeightReference(e,r.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:o})},EllipsoidGeometryUpdater.prototype._computeCenter=function(e,t){return Property.getValueOrUndefined(this._entity.position,e,t)},EllipsoidGeometryUpdater.prototype._isHidden=function(e,t){return!defined(e.position)||!defined(t.radii)||GeometryUpdater.prototype._isHidden.call(this,e,t)},EllipsoidGeometryUpdater.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&Property.isConstant(e.orientation)&&t.radii.isConstant&&Property.isConstant(t.innerRadii)&&Property.isConstant(t.stackPartitions)&&Property.isConstant(t.slicePartitions)&&Property.isConstant(t.outlineWidth)&&Property.isConstant(t.minimumClock)&&Property.isConstant(t.maximumClock)&&Property.isConstant(t.minimumCone)&&Property.isConstant(t.maximumCone)&&Property.isConstant(t.subdivisions))},EllipsoidGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),r=this._options;r.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,r.radii=t.radii.getValue(Iso8601.MINIMUM_VALUE,r.radii),r.innerRadii=Property.getValueOrUndefined(t.innerRadii,r.radii),r.minimumClock=Property.getValueOrUndefined(t.minimumClock,Iso8601.MINIMUM_VALUE),r.maximumClock=Property.getValueOrUndefined(t.maximumClock,Iso8601.MINIMUM_VALUE),r.minimumCone=Property.getValueOrUndefined(t.minimumCone,Iso8601.MINIMUM_VALUE),r.maximumCone=Property.getValueOrUndefined(t.maximumCone,Iso8601.MINIMUM_VALUE),r.stackPartitions=Property.getValueOrUndefined(t.stackPartitions,Iso8601.MINIMUM_VALUE),r.slicePartitions=Property.getValueOrUndefined(t.slicePartitions,Iso8601.MINIMUM_VALUE),r.subdivisions=Property.getValueOrUndefined(t.subdivisions,Iso8601.MINIMUM_VALUE),r.offsetAttribute=i!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},EllipsoidGeometryUpdater.prototype._onEntityPropertyChanged=heightReferenceOnEntityPropertyChanged,EllipsoidGeometryUpdater.DynamicGeometryUpdater=DynamicEllipsoidGeometryUpdater,defined(Object.create)&&(DynamicEllipsoidGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicEllipsoidGeometryUpdater.prototype.constructor=DynamicEllipsoidGeometryUpdater),DynamicEllipsoidGeometryUpdater.prototype.update=function(e){var t=this._entity,i=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!Property.getValueOrDefault(i.show,e,!0))return defined(this._primitive)&&(this._primitive.show=!1),void(defined(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var r=Property.getValueOrUndefined(i.radii,e,radiiScratch),n=defined(r)?t.computeModelMatrixForHeightReference(e,i.heightReference,.5*r.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!defined(n)||!defined(r))return defined(this._primitive)&&(this._primitive.show=!1),void(defined(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var a=Property.getValueOrDefault(i.fill,e,!0),o=Property.getValueOrDefault(i.outline,e,!1),s=Property.getValueOrClonedDefault(i.outlineColor,e,Color.BLACK,scratchColor$c),l=MaterialProperty.getValue(e,defaultValue(i.material,defaultMaterial$1),this._material),c=Property.getValueOrUndefined(i.innerRadii,e,innerRadiiScratch),u=Property.getValueOrUndefined(i.minimumClock,e),d=Property.getValueOrUndefined(i.maximumClock,e),h=Property.getValueOrUndefined(i.minimumCone,e),p=Property.getValueOrUndefined(i.maximumCone,e),f=Property.getValueOrUndefined(i.stackPartitions,e),m=Property.getValueOrUndefined(i.slicePartitions,e),g=Property.getValueOrUndefined(i.subdivisions,e),y=Property.getValueOrDefault(i.outlineWidth,e,1),_=Property.getValueOrDefault(i.heightReference,e,HeightReference$1.NONE),v=_!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0,C=this._scene.mode,x=C===SceneMode$1.SCENE3D&&_===HeightReference$1.NONE,b=this._options,S=this._geometryUpdater.shadowsProperty.getValue(e),T=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e);i=Property.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,defaultOffset$5,offsetScratch$7);!x||this._lastSceneMode!==C||!defined(this._primitive)||b.stackPartitions!==f||b.slicePartitions!==m||defined(c)&&!Cartesian3.equals(b.innerRadii!==c)||b.minimumClock!==u||b.maximumClock!==d||b.minimumCone!==h||b.maximumCone!==p||b.subdivisions!==g||this._lastOutlineWidth!==y||b.offsetAttribute!==v?((_=this._primitives).removeAndDestroy(this._primitive),_.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=C,this._lastOutlineWidth=y,b.stackPartitions=f,b.slicePartitions=m,b.subdivisions=g,b.offsetAttribute=v,b.radii=Cartesian3.clone(x?unitSphere:r,b.radii),defined(c)?x?(v=Cartesian3.magnitude(r),b.innerRadii=Cartesian3.fromElements(c.x/v,c.y/v,c.z/v,b.innerRadii)):b.innerRadii=Cartesian3.clone(c,b.innerRadii):b.innerRadii=void 0,b.minimumClock=u,b.maximumClock=d,b.minimumCone=h,b.maximumCone=p,p=new MaterialAppearance({material:l,translucent:l.isTranslucent(),closed:!0}),b.vertexFormat=p.vertexFormat,b=this._geometryUpdater.createFillGeometryInstance(e,x,this._modelMatrix),this._primitive=_.add(new Primitive({geometryInstances:b,appearance:p,asynchronous:!1,shadows:S})),e=this._geometryUpdater.createOutlineGeometryInstance(e,x,this._modelMatrix),this._outlinePrimitive=_.add(new Primitive({geometryInstances:e,appearance:new PerInstanceColorAppearance({flat:!0,translucent:255!==e.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(y)}}),asynchronous:!1,shadows:S})),this._lastShow=a,this._lastOutlineShow=o,this._lastOutlineColor=Color.clone(s,this._lastOutlineColor),this._lastDistanceDisplayCondition=T,this._lastOffset=Cartesian3.clone(i,this._lastOffset)):this._primitive.ready&&(y=this._primitive,S=this._outlinePrimitive,y.show=!0,S.show=!0,y.appearance.material=l,defined(l=this._attributes)||(l=y.getGeometryInstanceAttributes(t),this._attributes=l),a!==this._lastShow&&(l.show=ShowGeometryInstanceAttribute.toValue(a,l.show),this._lastShow=a),defined(a=this._outlineAttributes)||(a=S.getGeometryInstanceAttributes(t),this._outlineAttributes=a),o!==this._lastOutlineShow&&(a.show=ShowGeometryInstanceAttribute.toValue(o,a.show),this._lastOutlineShow=o),Color.equals(s,this._lastOutlineColor)||(a.color=ColorGeometryInstanceAttribute.toValue(s,a.color),Color.clone(s,this._lastOutlineColor)),DistanceDisplayCondition.equals(T,this._lastDistanceDisplayCondition)||(l.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(T,l.distanceDisplayCondition),a.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(T,a.distanceDisplayCondition),DistanceDisplayCondition.clone(T,this._lastDistanceDisplayCondition)),Cartesian3.equals(i,this._lastOffset)||(l.offset=OffsetGeometryInstanceAttribute.toValue(i,l.offset),a.offset=OffsetGeometryInstanceAttribute.toValue(i,l.offset),Cartesian3.clone(i,this._lastOffset))),x&&(r.x=Math.max(r.x,.001),r.y=Math.max(r.y,.001),r.z=Math.max(r.z,.001),n=Matrix4.multiplyByScale(n,r,n),this._primitive.modelMatrix=n,this._outlinePrimitive.modelMatrix=n)};var positionScratch$9=new Cartesian3,scratchColor$d=new Color;function PlaneGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function PlaneGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new PlaneGeometryOptions(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function DynamicPlaneGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(PlaneGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),PlaneGeometryUpdater.prototype.constructor=PlaneGeometryUpdater),PlaneGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t=this._entity,i=new ShowGeometryInstanceAttribute((a=t.isAvailable(e))&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),r=this._distanceDisplayConditionProperty.getValue(e),n=DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(r),a=(r=this._materialProperty instanceof ColorMaterialProperty?(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(o=this._materialProperty.color.getValue(e,scratchColor$d)),defined(o)||(o=Color.WHITE),{show:i,distanceDisplayCondition:n,color:ColorGeometryInstanceAttribute.fromColor(o)}):{show:i,distanceDisplayCondition:n},t.plane),o=this._options;i=t.computeModelMatrix(e),n=Property.getValueOrDefault(a.plane,e,o.plane),e=Property.getValueOrUndefined(a.dimensions,e,o.dimensions),i=createPrimitiveMatrix(o.plane=n,o.dimensions=e,i,i);return new GeometryInstance({id:t,geometry:new PlaneGeometry(this._options),modelMatrix:i,attributes:r})},PlaneGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$d),n=this._distanceDisplayConditionProperty.getValue(e),a=t.plane,o=this._options,s=t.computeModelMatrix(e),l=Property.getValueOrDefault(a.plane,e,o.plane);a=Property.getValueOrUndefined(a.dimensions,e,o.dimensions),s=createPrimitiveMatrix(o.plane=l,o.dimensions=a,s,s);return new GeometryInstance({id:t,geometry:new PlaneOutlineGeometry,modelMatrix:s,attributes:{show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n)}})},PlaneGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.plane)||!defined(t.dimensions)||!defined(e.position)||GeometryUpdater.prototype._isHidden.call(this,e,t)},PlaneGeometryUpdater.prototype._getIsClosed=function(e){return!1},PlaneGeometryUpdater.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&Property.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&Property.isConstant(t.outlineWidth))},PlaneGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof ColorMaterialProperty,r=this._options;r.vertexFormat=i?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,r.plane=t.plane.getValue(Iso8601.MINIMUM_VALUE,r.plane),r.dimensions=t.dimensions.getValue(Iso8601.MINIMUM_VALUE,r.dimensions)},PlaneGeometryUpdater.DynamicGeometryUpdater=DynamicPlaneGeometryUpdater,defined(Object.create)&&(DynamicPlaneGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicPlaneGeometryUpdater.prototype.constructor=DynamicPlaneGeometryUpdater),DynamicPlaneGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(Property.getValueOrUndefined(e.position,i,positionScratch$9))||!defined(r.plane)||!defined(r.dimensions)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicPlaneGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options;r.plane=Property.getValueOrDefault(t.plane,i,r.plane),r.dimensions=Property.getValueOrUndefined(t.dimensions,i,r.dimensions)};var scratchAxis$1=new Cartesian3,scratchUp=new Cartesian3,scratchTranslation=new Cartesian3,scratchScale$7=new Cartesian3,scratchRotation$1=new Matrix3,scratchRotationScale=new Matrix3,scratchLocalTransform=new Matrix4;function createPrimitiveMatrix(e,t,i,r){var n=e.normal,a=e.distance,o=Cartesian3.multiplyByScalar(n,-a,scratchTranslation),s=Cartesian3.clone(Cartesian3.UNIT_Z,scratchUp);return CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(s,n)),1,CesiumMath.EPSILON8)&&(s=Cartesian3.clone(Cartesian3.UNIT_Y,s)),e=Cartesian3.cross(s,n,scratchAxis$1),s=Cartesian3.cross(n,e,s),Cartesian3.normalize(e,e),Cartesian3.normalize(s,s),a=scratchRotation$1,Matrix3.setColumn(a,0,e,a),Matrix3.setColumn(a,1,s,a),Matrix3.setColumn(a,2,n,a),t=Cartesian3.fromElements(t.x,t.y,1,scratchScale$7),t=Matrix3.multiplyByScale(a,t,scratchRotationScale),o=Matrix4.fromRotationTranslation(t,o,scratchLocalTransform),Matrix4.multiplyTransformation(i,o,r)}PlaneGeometryUpdater.createPrimitiveMatrix=createPrimitiveMatrix;var heightAndPerPositionHeightWarning="Entity polygons cannot have both height and perPositionHeight.  height will be ignored",heightReferenceAndPerPositionHeightWarning="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",scratchColor$e=new Color,defaultOffset$6=Cartesian3.ZERO,offsetScratch$8=new Cartesian3,scratchRectangle$5=new Rectangle,scratch2DPositions=[],cart2Scratch=new Cartesian2;function PolygonGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0}function PolygonGeometryUpdater(e,t){GroundGeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new PolygonGeometryOptions(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function DyanmicPolygonGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(PolygonGeometryUpdater.prototype=Object.create(GroundGeometryUpdater.prototype),PolygonGeometryUpdater.prototype.constructor=PolygonGeometryUpdater),PolygonGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=this._options,a={show:new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$e)),defined(t)||(t=Color.WHITE),a.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(n.offsetAttribute)&&(a.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$6,offsetScratch$8))),new GeometryInstance({id:i,geometry:new(n.perPositionHeight&&!defined(n.extrudedHeight)?CoplanarPolygonGeometry:PolygonGeometry)(n),attributes:a})},PolygonGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=this._options,n=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$e),a=this._distanceDisplayConditionProperty.getValue(e);a={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(n),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),offset:void 0};return defined(r.offsetAttribute)&&(a.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$6,offsetScratch$8))),new GeometryInstance({id:t,geometry:new(r.perPositionHeight&&!defined(r.extrudedHeight)?CoplanarPolygonOutlineGeometry:PolygonOutlineGeometry)(r),attributes:a})},PolygonGeometryUpdater.prototype._computeCenter=function(e,t){if(defined(i=Property.getValueOrUndefined(this._entity.polygon.hierarchy,e))&&0!==(e=i.positions).length){for(var i=this._scene.mapProjection.ellipsoid,r=(i=EllipsoidTangentPlane.fromPoints(e,i)).projectPointsOntoPlane(e,scratch2DPositions),n=r.length,a=0,o=n-1,s=new Cartesian2,l=0;l<n;o=l++){var c=r[l],u=r[o],d=c.x*u.y-u.x*c.y;u=Cartesian2.add(c,u,cart2Scratch),u=Cartesian2.multiplyByScalar(u,d,u),s=Cartesian2.add(s,u,s);a+=d}return e=1/(3*a),s=Cartesian2.multiplyByScalar(s,e,s),i.projectPointOntoEllipsoid(s,t)}},PolygonGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.hierarchy)||GeometryUpdater.prototype._isHidden.call(this,e,t)},PolygonGeometryUpdater.prototype._isOnTerrain=function(e,t){return e=GroundGeometryUpdater.prototype._isOnTerrain.call(this,e,t),t=defined(t=t.perPositionHeight)&&(!t.isConstant||t.getValue(Iso8601.MINIMUM_VALUE)),e&&!t},PolygonGeometryUpdater.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!Property.isConstant(t.height)||!Property.isConstant(t.extrudedHeight)||!Property.isConstant(t.granularity)||!Property.isConstant(t.stRotation)||!Property.isConstant(t.outlineWidth)||!Property.isConstant(t.perPositionHeight)||!Property.isConstant(t.closeTop)||!Property.isConstant(t.closeBottom)||!Property.isConstant(t.zIndex)||!Property.isConstant(t.arcType)||this._onTerrain&&!Property.isConstant(this._materialProperty)&&!(this._materialProperty instanceof ColorMaterialProperty)},PolygonGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof ColorMaterialProperty,r=this._options;r.vertexFormat=i?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat;var n,a=t.hierarchy.getValue(Iso8601.MINIMUM_VALUE),o=Property.getValueOrUndefined(t.height,Iso8601.MINIMUM_VALUE),s=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),l=Property.getValueOrUndefined(t.extrudedHeight,Iso8601.MINIMUM_VALUE),c=Property.getValueOrDefault(t.extrudedHeightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE);i=Property.getValueOrDefault(t.perPositionHeight,Iso8601.MINIMUM_VALUE,!1),o=GroundGeometryUpdater.getGeometryHeight(o,s);i?(defined(o)&&(o=void 0,oneTimeWarning(heightAndPerPositionHeightWarning)),s!==HeightReference$1.NONE&&i&&(o=void 0,oneTimeWarning(heightReferenceAndPerPositionHeightWarning))):(defined(l)&&!defined(o)&&(o=0),n=GroundGeometryUpdater.computeGeometryOffsetAttribute(o,s,l,c)),r.polygonHierarchy=a,r.granularity=Property.getValueOrUndefined(t.granularity,Iso8601.MINIMUM_VALUE),r.stRotation=Property.getValueOrUndefined(t.stRotation,Iso8601.MINIMUM_VALUE),r.perPositionHeight=i,r.closeTop=Property.getValueOrDefault(t.closeTop,Iso8601.MINIMUM_VALUE,!0),r.closeBottom=Property.getValueOrDefault(t.closeBottom,Iso8601.MINIMUM_VALUE,!0),r.offsetAttribute=n,r.height=o,r.arcType=Property.getValueOrDefault(t.arcType,Iso8601.MINIMUM_VALUE,ArcType$1.GEODESIC),(l=GroundGeometryUpdater.getGeometryExtrudedHeight(l,c))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(l=ApproximateTerrainHeights.getMinimumMaximumHeights(PolygonGeometry.computeRectangle(r,scratchRectangle$5)).minimumTerrainHeight),r.extrudedHeight=l},PolygonGeometryUpdater.prototype._getIsClosed=function(e){var t=e.height,i=defined(i=e.extrudedHeight)&&i!==t;return!e.perPositionHeight&&(!i&&0===t||i&&e.closeTop&&e.closeBottom)},PolygonGeometryUpdater.DynamicGeometryUpdater=DyanmicPolygonGeometryUpdater,defined(Object.create)&&(DyanmicPolygonGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DyanmicPolygonGeometryUpdater.prototype.constructor=DyanmicPolygonGeometryUpdater),DyanmicPolygonGeometryUpdater.prototype._isHidden=function(e,t,i){return!defined(this._options.polygonHierarchy)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DyanmicPolygonGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options;r.polygonHierarchy=Property.getValueOrUndefined(t.hierarchy,i);var n,a=Property.getValueOrUndefined(t.height,i),o=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),s=Property.getValueOrDefault(t.extrudedHeightReference,i,HeightReference$1.NONE),l=Property.getValueOrUndefined(t.extrudedHeight,i),c=Property.getValueOrUndefined(t.perPositionHeight,i);a=GroundGeometryUpdater.getGeometryHeight(a,s);c?(defined(a)&&(a=void 0,oneTimeWarning(heightAndPerPositionHeightWarning)),o!==HeightReference$1.NONE&&c&&(a=void 0,oneTimeWarning(heightReferenceAndPerPositionHeightWarning))):(defined(l)&&!defined(a)&&(a=0),n=GroundGeometryUpdater.computeGeometryOffsetAttribute(a,o,l,s)),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.stRotation=Property.getValueOrUndefined(t.stRotation,i),r.perPositionHeight=Property.getValueOrUndefined(t.perPositionHeight,i),r.closeTop=Property.getValueOrDefault(t.closeTop,i,!0),r.closeBottom=Property.getValueOrDefault(t.closeBottom,i,!0),r.offsetAttribute=n,r.height=a,r.arcType=Property.getValueOrDefault(t.arcType,i,ArcType$1.GEODESIC),(l=GroundGeometryUpdater.getGeometryExtrudedHeight(l,s))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(l=ApproximateTerrainHeights.getMinimumMaximumHeights(PolygonGeometry.computeRectangle(r,scratchRectangle$5)).minimumTerrainHeight),r.extrudedHeight=l};var scratchColor$f=new Color;function PolylineVolumeGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function PolylineVolumeGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new PolylineVolumeGeometryOptions(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function DynamicPolylineVolumeGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(PolylineVolumeGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),PolylineVolumeGeometryUpdater.prototype.constructor=PolylineVolumeGeometryUpdater),PolylineVolumeGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a=DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),a=this._materialProperty instanceof ColorMaterialProperty?(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$f)),defined(t)||(t=Color.WHITE),{show:n,distanceDisplayCondition:a,color:ColorGeometryInstanceAttribute.fromColor(t)}):{show:n,distanceDisplayCondition:a};return new GeometryInstance({id:i,geometry:new PolylineVolumeGeometry(this._options),attributes:a})},PolylineVolumeGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$f),n=this._distanceDisplayConditionProperty.getValue(e);return new GeometryInstance({id:t,geometry:new PolylineVolumeOutlineGeometry(this._options),attributes:{show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n)}})},PolylineVolumeGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.positions)||!defined(t.shape)||GeometryUpdater.prototype._isHidden.call(this,e,t)},PolylineVolumeGeometryUpdater.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&Property.isConstant(t.granularity)&&Property.isConstant(t.outlineWidth)&&Property.isConstant(t.cornerType))},PolylineVolumeGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=t.granularity,r=t.cornerType,n=this._options,a=this._materialProperty instanceof ColorMaterialProperty;n.vertexFormat=a?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,n.polylinePositions=t.positions.getValue(Iso8601.MINIMUM_VALUE,n.polylinePositions),n.shapePositions=t.shape.getValue(Iso8601.MINIMUM_VALUE,n.shape),n.granularity=defined(i)?i.getValue(Iso8601.MINIMUM_VALUE):void 0,n.cornerType=defined(r)?r.getValue(Iso8601.MINIMUM_VALUE):void 0},PolylineVolumeGeometryUpdater.DynamicGeometryUpdater=DynamicPolylineVolumeGeometryUpdater,defined(Object.create)&&(DynamicPolylineVolumeGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicPolylineVolumeGeometryUpdater.prototype.constructor=DynamicPolylineVolumeGeometryUpdater),DynamicPolylineVolumeGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(r.polylinePositions)||!defined(r.shapePositions)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicPolylineVolumeGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options;r.polylinePositions=Property.getValueOrUndefined(t.positions,i,r.polylinePositions),r.shapePositions=Property.getValueOrUndefined(t.shape,i),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.cornerType=Property.getValueOrUndefined(t.cornerType,i)};var scratchColor$g=new Color,defaultOffset$7=Cartesian3.ZERO,offsetScratch$9=new Cartesian3,scratchRectangle$6=new Rectangle,scratchCenterRect=new Rectangle,scratchCarto$1=new Cartographic;function RectangleGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function RectangleGeometryUpdater(e,t){GroundGeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new RectangleGeometryOptions(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function DynamicRectangleGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(RectangleGeometryUpdater.prototype=Object.create(GroundGeometryUpdater.prototype),RectangleGeometryUpdater.prototype.constructor=RectangleGeometryUpdater),RectangleGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n={show:new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$g)),defined(t)||(t=Color.WHITE),n.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$7,offsetScratch$9))),new GeometryInstance({id:i,geometry:new RectangleGeometry(this._options),attributes:n})},RectangleGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$g),n=this._distanceDisplayConditionProperty.getValue(e);n={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n),offset:void 0};return defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$7,offsetScratch$9))),new GeometryInstance({id:t,geometry:new RectangleOutlineGeometry(this._options),attributes:n})},RectangleGeometryUpdater.prototype._computeCenter=function(e,t){if(defined(e=Property.getValueOrUndefined(this._entity.rectangle.coordinates,e,scratchCenterRect)))return e=Rectangle.center(e,scratchCarto$1),Cartographic.toCartesian(e,Ellipsoid.WGS84,t)},RectangleGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.coordinates)||GeometryUpdater.prototype._isHidden.call(this,e,t)},RectangleGeometryUpdater.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!Property.isConstant(t.height)||!Property.isConstant(t.extrudedHeight)||!Property.isConstant(t.granularity)||!Property.isConstant(t.stRotation)||!Property.isConstant(t.rotation)||!Property.isConstant(t.outlineWidth)||!Property.isConstant(t.zIndex)||this._onTerrain&&!Property.isConstant(this._materialProperty)&&!(this._materialProperty instanceof ColorMaterialProperty)},RectangleGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof ColorMaterialProperty,r=Property.getValueOrUndefined(t.height,Iso8601.MINIMUM_VALUE),n=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),a=Property.getValueOrUndefined(t.extrudedHeight,Iso8601.MINIMUM_VALUE),o=Property.getValueOrDefault(t.extrudedHeightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE);defined(a)&&!defined(r)&&(r=0);var s=this._options;s.vertexFormat=i?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,s.rectangle=t.coordinates.getValue(Iso8601.MINIMUM_VALUE,s.rectangle),s.granularity=Property.getValueOrUndefined(t.granularity,Iso8601.MINIMUM_VALUE),s.stRotation=Property.getValueOrUndefined(t.stRotation,Iso8601.MINIMUM_VALUE),s.rotation=Property.getValueOrUndefined(t.rotation,Iso8601.MINIMUM_VALUE),s.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(r,n,a,o),s.height=GroundGeometryUpdater.getGeometryHeight(r,n),(a=GroundGeometryUpdater.getGeometryExtrudedHeight(a,o))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(a=ApproximateTerrainHeights.getMinimumMaximumHeights(RectangleGeometry.computeRectangle(s,scratchRectangle$6)).minimumTerrainHeight),s.extrudedHeight=a},RectangleGeometryUpdater.DynamicGeometryUpdater=DynamicRectangleGeometryUpdater,defined(Object.create)&&(DynamicRectangleGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicRectangleGeometryUpdater.prototype.constructor=DynamicRectangleGeometryUpdater),DynamicRectangleGeometryUpdater.prototype._isHidden=function(e,t,i){return!defined(this._options.rectangle)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicRectangleGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options,n=Property.getValueOrUndefined(t.height,i),a=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),o=Property.getValueOrUndefined(t.extrudedHeight,i),s=Property.getValueOrDefault(t.extrudedHeightReference,i,HeightReference$1.NONE);defined(o)&&!defined(n)&&(n=0),r.rectangle=Property.getValueOrUndefined(t.coordinates,i,r.rectangle),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.stRotation=Property.getValueOrUndefined(t.stRotation,i),r.rotation=Property.getValueOrUndefined(t.rotation,i),r.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(n,a,o,s),r.height=GroundGeometryUpdater.getGeometryHeight(n,a),(o=GroundGeometryUpdater.getGeometryExtrudedHeight(o,s))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(o=ApproximateTerrainHeights.getMinimumMaximumHeights(RectangleGeometry.computeRectangle(r,scratchRectangle$6)).minimumTerrainHeight),r.extrudedHeight=o};var colorScratch$2=new Color,distanceDisplayConditionScratch$1=new DistanceDisplayCondition,defaultDistanceDisplayCondition$1=new DistanceDisplayCondition,defaultOffset$8=Cartesian3.ZERO,offsetScratch$a=new Cartesian3;function Batch(e,t,i,r,n,a,o){var s;this.translucent=t,this.appearanceType=i,this.depthFailAppearanceType=r,this.depthFailMaterialProperty=n,this.depthFailMaterial=void 0,this.closed=a,this.shadows=o,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.updaters=new AssociativeArray,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray,this.itemsToRemove=[],this.invalidated=!1,defined(n)&&(s=n.definitionChanged.addEventListener(Batch.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=s}function StaticGeometryColorBatch(e,t,i,r,n){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=r,this._shadows=n}function removeItem(e,t){for(var i=e.length-1;0<=i;i--){var r=e[i];if(r.remove(t))return 0===r.updaters.length&&(e.splice(i,1),r.destroy()),1}}function moveItems(e,t,i){for(var r=!1,n=t.length,a=0;a<n;++a){var o=t[a],s=o.itemsToRemove,l=s.length;if(0<l)for(a=0;a<l;a++){var c=s[a];o.remove(c),e.add(i,c),r=!0}}return r}function updateItems(e,t,i,r){for(var n=t.length,a=n-1;0<=a;a--){var o=t[a];if(o.invalidated){t.splice(a,1);for(var s=o.updaters.values,l=s.length,c=0;c<l;c++)e.add(i,s[c]);o.destroy()}}for(n=t.length,a=0;a<n;++a)r=t[a].update(i)&&r;return r}function getBoundingSphere(e,t,i){for(var r=e.length,n=0;n<r;n++){var a=e[n];if(a.contains(t))return a.getBoundingSphere(t,i)}return BoundingSphereState$1.FAILED}function removeAllPrimitives(e){for(var t=e.length,i=0;i<t;i++)e[i].destroy();e.length=0}Batch.prototype.onMaterialChanged=function(){this.invalidated=!0},Batch.prototype.isMaterial=function(e){var t=this.depthFailMaterialProperty;return(e=e.depthFailMaterialProperty)===t||!!defined(t)&&t.equals(e)},Batch.prototype.add=function(e,t){var i,r=e.id;this.createPrimitive=!0,this.geometry.set(r,t),this.updaters.set(r,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&Property.isConstant(e.distanceDisplayConditionProperty)&&Property.isConstant(e.terrainOffsetProperty)?(i=this).subscriptions.set(r,e.entity.definitionChanged.addEventListener((function(t,r,n,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))):this.updatersWithAttributes.set(r,e)},Batch.prototype.remove=function(e){var t=e.id;return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0)},Batch.prototype.update=function(e){var t=!0,i=0,r=this.primitive,n=this.primitives;if(this.createPrimitive){var a,o=this.geometry.values;0<o.length?(defined(r)&&(defined(this.oldPrimitive)?n.remove(r):this.oldPrimitive=r),defined(this.depthFailAppearanceType)&&(defined(this.depthFailMaterialProperty)&&(this.depthFailMaterial=MaterialProperty.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),r=new Primitive({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:a,shadows:this.shadows}),n.add(r),t=!1):(defined(r)&&(n.remove(r),r=void 0),defined(a=this.oldPrimitive)&&(n.remove(a),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(defined(r)&&r.ready){r.show=!0,defined(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0),!defined(this.depthFailAppearanceType)||this.depthFailMaterialProperty instanceof ColorMaterialProperty||(this.depthFailMaterial=MaterialProperty.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);for(var s=this.updatersWithAttributes.values,l=s.length,c=this.waitingOnCreate,u=0;u<l;u++){var d=s[u],h=this.geometry.get(d.id),p=this.attributes.get(h.id.id);defined(p)||(p=r.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,p)),d.fillMaterialProperty.isConstant&&!c||(h=d.fillMaterialProperty.color,h=Property.getValueOrDefault(h,e,Color.WHITE,colorScratch$2),Color.equals(p._lastColor,h)||(p._lastColor=Color.clone(h,p._lastColor),p.color=ColorGeometryInstanceAttribute.toValue(h,p.color),(this.translucent&&255===p.color[3]||!this.translucent&&255!==p.color[3])&&(this.itemsToRemove[i++]=d))),defined(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof ColorMaterialProperty&&(!d.depthFailMaterialProperty.isConstant||c)&&(f=d.depthFailMaterialProperty.color,f=Property.getValueOrDefault(f,e,Color.WHITE,colorScratch$2),Color.equals(p._lastDepthFailColor,f)||(p._lastDepthFailColor=Color.clone(f,p._lastDepthFailColor),p.depthFailColor=ColorGeometryInstanceAttribute.toValue(f,p.depthFailColor)));var f=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e));f!==(1===p.show[0])&&(p.show=ShowGeometryInstanceAttribute.toValue(f,p.show)),f=d.distanceDisplayConditionProperty,Property.isConstant(f)||(f=Property.getValueOrDefault(f,e,defaultDistanceDisplayCondition$1,distanceDisplayConditionScratch$1),DistanceDisplayCondition.equals(f,p._lastDistanceDisplayCondition)||(p._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(f,p._lastDistanceDisplayCondition),p.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(f,p.distanceDisplayCondition))),d=d.terrainOffsetProperty,Property.isConstant(d)||(d=Property.getValueOrDefault(d,e,defaultOffset$8,offsetScratch$a),Cartesian3.equals(d,p._lastOffset)||(p._lastOffset=Cartesian3.clone(d,p._lastOffset),p.offset=OffsetGeometryInstanceAttribute.toValue(d,p.offset)))}this.updateShows(r),this.waitingOnCreate=!1}else defined(r)&&!r.ready&&(t=!1);return this.itemsToRemove.length=i,t},Batch.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n=t[r],a=this.geometry.get(n.id),o=this.attributes.get(a.id.id);defined(o)||(o=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,o)),(n=n.entity.isShowing)!==(1===o.show[0])&&(o.show=ShowGeometryInstanceAttribute.toValue(n,o.show),a.attributes.show.value[0]=o.show[0])}this.showsUpdated.removeAll()},Batch.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch.prototype.destroy=function(){var e=this.primitive,t=this.primitives;defined(e)&&t.remove(e),defined(e=this.oldPrimitive)&&t.remove(e),defined(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},StaticGeometryColorBatch.prototype.add=function(e,t){for(var i,r=t.createFillGeometryInstance(e),n=(e=255===r.attributes.color.value[3]?(i=this._solidItems,!1):(i=this._translucentItems,!0),i.length),a=0;a<n;a++){var o=i[a];if(o.isMaterial(t))return void o.add(t,r)}(e=new Batch(this._primitives,e,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(t,r),i.push(e)},StaticGeometryColorBatch.prototype.remove=function(e){removeItem(this._solidItems,e)||removeItem(this._translucentItems,e)},StaticGeometryColorBatch.prototype.update=function(e){var t=updateItems(this,this._solidItems,e,!0),i=(t=updateItems(this,this._translucentItems,e,t)&&t,moveItems(this,this._solidItems,e)),r=moveItems(this,this._translucentItems,e);return(i||r)&&(t=updateItems(this,this._solidItems,e,t)&&t,t=updateItems(this,this._translucentItems,e,t)&&t),t},StaticGeometryColorBatch.prototype.getBoundingSphere=function(e,t){var i=getBoundingSphere(this._solidItems,e,t);return i===BoundingSphereState$1.FAILED?getBoundingSphere(this._translucentItems,e,t):i},StaticGeometryColorBatch.prototype.removeAllPrimitives=function(){removeAllPrimitives(this._solidItems),removeAllPrimitives(this._translucentItems)};var distanceDisplayConditionScratch$2=new DistanceDisplayCondition,defaultDistanceDisplayCondition$2=new DistanceDisplayCondition,defaultOffset$9=Cartesian3.ZERO,offsetScratch$b=new Cartesian3;function Batch$1(e,t,i,r,n,a,o){this.primitives=e,this.appearanceType=t,this.materialProperty=i,this.depthFailAppearanceType=r,this.depthFailMaterialProperty=n,this.closed=a,this.shadows=o,this.updaters=new AssociativeArray,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(Batch$1.prototype.onMaterialChanged,this),this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray}Batch$1.prototype.onMaterialChanged=function(){this.invalidated=!0},Batch$1.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty,r=this.depthFailMaterialProperty;e=e.depthFailMaterialProperty;return i===t&&e===r||(i=defined(t)&&t.equals(i),(!defined(r)&&!defined(e)||defined(r)&&r.equals(e))&&i)},Batch$1.prototype.add=function(e,t){var i,r=t.id;this.updaters.set(r,t),this.geometry.set(r,t.createFillGeometryInstance(e)),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&Property.isConstant(t.distanceDisplayConditionProperty)&&Property.isConstant(t.terrainOffsetProperty)?(i=this).subscriptions.set(r,t.entity.definitionChanged.addEventListener((function(e,r,n,a){"isShowing"===r&&i.showsUpdated.set(t.id,t)}))):this.updatersWithAttributes.set(r,t),this.createPrimitive=!0},Batch$1.prototype.remove=function(e){var t=e.id;return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0)};var colorScratch$3=new Color;function StaticGeometryPerMaterialBatch(e,t,i,r,n){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=r,this._shadows=n}Batch$1.prototype.update=function(e){var t,i=!0,r=this.primitive,n=this.primitives,a=this.geometry.values;if(this.createPrimitive)0<a.length?(defined(r)&&(defined(this.oldPrimitive)?n.remove(r):this.oldPrimitive=r),this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),defined(this.depthFailMaterialProperty)&&(this.depthFailMaterial=MaterialProperty.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),t=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),r=new Primitive({show:!1,asynchronous:!0,geometryInstances:a.slice(),appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:t,shadows:this.shadows}),n.add(r),i=!1):(defined(r)&&(n.remove(r),r=void 0),defined(t=this.oldPrimitive)&&(n.remove(t),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1;else if(defined(r)&&r.ready){r.show=!0,defined(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,!defined(this.depthFailAppearanceType)||this.depthFailMaterialProperty instanceof ColorMaterialProperty||(this.depthFailMaterial=MaterialProperty.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);for(var o=this.updatersWithAttributes.values,s=o.length,l=0;l<s;l++){var c=o[l],u=c.entity,d=this.geometry.get(c.id),h=this.attributes.get(d.id.id);defined(h)||(h=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),defined(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof ColorMaterialProperty&&!c.depthFailMaterialProperty.isConstant&&(d=c.depthFailMaterialProperty.color,d=Property.getValueOrDefault(d,e,Color.WHITE,colorScratch$3),Color.equals(h._lastDepthFailColor,d)||(h._lastDepthFailColor=Color.clone(d,h._lastDepthFailColor),h.depthFailColor=ColorGeometryInstanceAttribute.toValue(d,h.depthFailColor))),(u=u.isShowing&&(c.hasConstantFill||c.isFilled(e)))!==(1===h.show[0])&&(h.show=ShowGeometryInstanceAttribute.toValue(u,h.show)),u=c.distanceDisplayConditionProperty,Property.isConstant(u)||(u=Property.getValueOrDefault(u,e,defaultDistanceDisplayCondition$2,distanceDisplayConditionScratch$2),DistanceDisplayCondition.equals(u,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(u,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(u,h.distanceDisplayCondition))),c=c.terrainOffsetProperty,Property.isConstant(c)||(c=Property.getValueOrDefault(c,e,defaultOffset$9,offsetScratch$b),Cartesian3.equals(c,h._lastOffset)||(h._lastOffset=Cartesian3.clone(c,h._lastOffset),h.offset=OffsetGeometryInstanceAttribute.toValue(c,h.offset)))}this.updateShows(r)}else defined(r)&&!r.ready&&(i=!1);return i},Batch$1.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n,a=(n=t[r]).entity,o=this.geometry.get(n.id);defined(n=this.attributes.get(o.id.id))||(n=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,n)),(a=a.isShowing)!==(1===n.show[0])&&(n.show=ShowGeometryInstanceAttribute.toValue(a,n.show),o.attributes.show.value[0]=n.show[0])}this.showsUpdated.removeAll()},Batch$1.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$1.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch$1.prototype.destroy=function(){var e=this.primitive,t=this.primitives;defined(e)&&t.remove(e),defined(e=this.oldPrimitive)&&t.remove(e),this.removeMaterialSubscription()},StaticGeometryPerMaterialBatch.prototype.add=function(e,t){for(var i=this._items,r=i.length,n=0;n<r;n++){var a=i[n];if(a.isMaterial(t))return void a.add(e,t)}var o=new Batch$1(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),i.push(o)},StaticGeometryPerMaterialBatch.prototype.remove=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.remove(e)){0===r.updaters.length&&(t.splice(i,1),r.destroy());break}}},StaticGeometryPerMaterialBatch.prototype.update=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.invalidated){t.splice(i,1);for(var n=r.updaters.values,a=n.length,o=0;o<a;o++)this.add(e,n[o]);r.destroy()}}var s=!0;for(i=0;i<t.length;i++)s=t[i].update(e)&&s;return s},StaticGeometryPerMaterialBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._items,r=i.length,n=0;n<r;n++){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticGeometryPerMaterialBatch.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var colorScratch$4=new Color,distanceDisplayConditionScratch$3=new DistanceDisplayCondition,defaultDistanceDisplayCondition$3=new DistanceDisplayCondition;function Batch$2(e,t,i,r){this.primitives=e,this.zIndex=r,this.classificationType=t,this.color=i,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.updaters=new AssociativeArray,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new RectangleCollisionChecker}function StaticGroundGeometryColorBatch(e,t){this._batches=[],this._primitives=e,this._classificationType=t}Batch$2.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},Batch$2.prototype.add=function(e,t){var i,r=e.id;this.createPrimitive=!0,this.geometry.set(r,t),this.updaters.set(r,e),this.rectangleCollisionCheck.insert(r,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&Property.isConstant(e.distanceDisplayConditionProperty)?(i=this).subscriptions.set(r,e.entity.definitionChanged.addEventListener((function(t,r,n,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))):this.updatersWithAttributes.set(r,e)},Batch$2.prototype.remove=function(e){var t=e.id;e=this.geometry.get(t);return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.rectangleCollisionCheck.remove(t,e.geometry.rectangle),this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0)},Batch$2.prototype.update=function(e){var t=!0,i=this.primitive,r=this.primitives;if(this.createPrimitive){var n=this.geometry.values;0<n.length?(defined(i)&&(defined(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i),i=new GroundPrimitive({show:!1,asynchronous:!0,geometryInstances:n.slice(),classificationType:this.classificationType}),r.add(i,this.zIndex),t=!1):(defined(i)&&(r.remove(i),i=void 0),defined(n=this.oldPrimitive)&&(r.remove(n),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(defined(i)&&i.ready){i.show=!0,defined(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);for(var a=this.updatersWithAttributes.values,o=a.length,s=this.waitingOnCreate,l=0;l<o;l++){var c=a[l],u=this.geometry.get(c.id),d=this.attributes.get(u.id.id);defined(d)||(d=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,d)),c.fillMaterialProperty.isConstant&&!s||(h=c.fillMaterialProperty.color,h=Property.getValueOrDefault(h,e,Color.WHITE,colorScratch$4),Color.equals(d._lastColor,h)||(d._lastColor=Color.clone(h,d._lastColor),d.color=ColorGeometryInstanceAttribute.toValue(h,d.color)));var h=c.entity.isShowing&&(c.hasConstantFill||c.isFilled(e));h!==(1===d.show[0])&&(d.show=ShowGeometryInstanceAttribute.toValue(h,d.show)),c=c.distanceDisplayConditionProperty,Property.isConstant(c)||(c=Property.getValueOrDefault(c,e,defaultDistanceDisplayCondition$3,distanceDisplayConditionScratch$3),DistanceDisplayCondition.equals(c,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(c,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(c,d.distanceDisplayCondition)))}this.updateShows(i),this.waitingOnCreate=!1}else defined(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=0,t},Batch$2.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n=t[r],a=this.geometry.get(n.id),o=this.attributes.get(a.id.id);defined(o)||(o=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,o)),(n=n.entity.isShowing)!==(1===o.show[0])&&(o.show=ShowGeometryInstanceAttribute.toValue(n,o.show),a.attributes.show.value[0]=o.show[0])}this.showsUpdated.removeAll()},Batch$2.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$2.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?defined(e=i.getBoundingSphere(e.entity))?(e.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.FAILED:BoundingSphereState$1.PENDING},Batch$2.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;defined(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll()),defined(t=this.oldPrimitive)&&(e.remove(t),this.oldPrimitive=void 0)},StaticGroundGeometryColorBatch.prototype.add=function(e,t){for(var i,r=t.createFillGeometryInstance(e),n=this._batches,a=Property.getValueOrDefault(t.zIndex,0),o=n.length,s=0;s<o;++s){var l=n[s];if(l.zIndex===a&&!l.overlapping(r.geometry.rectangle)){i=l;break}}return defined(i)||(i=new Batch$2(this._primitives,this._classificationType,r.attributes.color.value,a),n.push(i)),i.add(t,r),i},StaticGroundGeometryColorBatch.prototype.remove=function(e){for(var t=this._batches,i=t.length,r=0;r<i;++r)if(t[r].remove(e))return},StaticGroundGeometryColorBatch.prototype.update=function(e){for(var t=!0,i=this._batches,r=i.length,n=0;n<r;++n)t=i[n].update(e)&&t;for(n=0;n<r;++n)for(var a=i[n],o=a.itemsToRemove,s=o.length,l=0;l<s;l++){c=o[l],a.remove(c);var c=this.add(e,c);a.isDirty=!0,c.isDirty=!0}for(n=r-1;0<=n;--n){var u=i[n];u.isDirty&&(t=i[n].update(e)&&t,u.isDirty=!1),0===u.geometry.length&&i.splice(n,1)}return t},StaticGroundGeometryColorBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._batches,r=i.length,n=0;n<r;++n){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticGroundGeometryColorBatch.prototype.removeAllPrimitives=function(){for(var e=this._batches,t=e.length,i=0;i<t;++i)e[i].removeAllPrimitives()};var distanceDisplayConditionScratch$4=new DistanceDisplayCondition,defaultDistanceDisplayCondition$4=new DistanceDisplayCondition;function Batch$3(e,t,i,r,n,a){this.primitives=e,this.classificationType=t,this.appearanceType=i,this.materialProperty=r,this.updaters=new AssociativeArray,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.material=void 0,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.invalidated=!1,this.removeMaterialSubscription=r.definitionChanged.addEventListener(Batch$3.prototype.onMaterialChanged,this),this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray,this.usingSphericalTextureCoordinates=n,this.zIndex=a,this.rectangleCollisionCheck=new RectangleCollisionChecker}function StaticGroundGeometryPerMaterialBatch(e,t,i){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=i}Batch$3.prototype.onMaterialChanged=function(){this.invalidated=!0},Batch$3.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},Batch$3.prototype.isMaterial=function(e){var t=this.materialProperty;return(e=e.fillMaterialProperty)===t||e instanceof ColorMaterialProperty&&t instanceof ColorMaterialProperty||defined(t)&&t.equals(e)},Batch$3.prototype.add=function(e,t,i){var r,n=t.id;this.updaters.set(n,t),this.geometry.set(n,i),this.rectangleCollisionCheck.insert(n,i.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&Property.isConstant(t.distanceDisplayConditionProperty)?(r=this).subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,a){"isShowing"===i&&r.showsUpdated.set(t.id,t)}))):this.updatersWithAttributes.set(n,t),this.createPrimitive=!0},Batch$3.prototype.remove=function(e){var t=e.id;e=this.geometry.get(t);return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.rectangleCollisionCheck.remove(t,e.geometry.rectangle),this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t)),!0)},Batch$3.prototype.update=function(e){var t=!0,i=this.primitive,r=this.primitives,n=this.geometry.values;if(this.createPrimitive)0<n.length?(defined(i)&&(defined(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i),this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),i=new GroundPrimitive({show:!1,asynchronous:!0,geometryInstances:n.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),r.add(i,this.zIndex),t=!1):(defined(i)&&(r.remove(i),i=void 0),defined(n=this.oldPrimitive)&&(r.remove(n),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1;else if(defined(i)&&i.ready){i.show=!0,defined(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;for(var a=this.updatersWithAttributes.values,o=a.length,s=0;s<o;s++){var l=a[s],c=l.entity,u=this.geometry.get(l.id),d=this.attributes.get(u.id.id);defined(d)||(d=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,d)),(c=c.isShowing&&(l.hasConstantFill||l.isFilled(e)))!==(1===d.show[0])&&(d.show=ShowGeometryInstanceAttribute.toValue(c,d.show)),l=l.distanceDisplayConditionProperty,Property.isConstant(l)||(l=Property.getValueOrDefault(l,e,defaultDistanceDisplayCondition$4,distanceDisplayConditionScratch$4),DistanceDisplayCondition.equals(l,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(l,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(l,d.distanceDisplayCondition)))}this.updateShows(i)}else defined(i)&&!i.ready&&(t=!1);return t},Batch$3.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n,a=(n=t[r]).entity,o=this.geometry.get(n.id);defined(n=this.attributes.get(o.id.id))||(n=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,n)),(a=a.isShowing)!==(1===n.show[0])&&(n.show=ShowGeometryInstanceAttribute.toValue(a,n.show),o.attributes.show.value[0]=n.show[0])}this.showsUpdated.removeAll()},Batch$3.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$3.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch$3.prototype.destroy=function(){var e=this.primitive,t=this.primitives;defined(e)&&t.remove(e),defined(e=this.oldPrimitive)&&t.remove(e),this.removeMaterialSubscription()},StaticGroundGeometryPerMaterialBatch.prototype.add=function(e,t){for(var i=this._items,r=i.length,n=t.createFillGeometryInstance(e),a=ShadowVolumeAppearance.shouldUseSphericalCoordinates(n.geometry.rectangle),o=Property.getValueOrDefault(t.zIndex,0),s=0;s<r;++s){var l=i[s];if(l.isMaterial(t)&&l.usingSphericalTextureCoordinates===a&&l.zIndex===o&&!l.overlapping(n.geometry.rectangle))return void l.add(e,t,n)}var c=new Batch$3(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,a,o);c.add(e,t,n),i.push(c)},StaticGroundGeometryPerMaterialBatch.prototype.remove=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.remove(e)){0===r.updaters.length&&(t.splice(i,1),r.destroy());break}}},StaticGroundGeometryPerMaterialBatch.prototype.update=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.invalidated){t.splice(i,1);for(var n=r.updaters.values,a=n.length,o=0;o<a;o++)this.add(e,n[o]);r.destroy()}}var s=!0;for(i=0;i<t.length;i++)s=t[i].update(e)&&s;return s},StaticGroundGeometryPerMaterialBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._items,r=i.length,n=0;n<r;n++){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticGroundGeometryPerMaterialBatch.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var colorScratch$5=new Color,distanceDisplayConditionScratch$5=new DistanceDisplayCondition,defaultDistanceDisplayCondition$5=new DistanceDisplayCondition,defaultOffset$a=Cartesian3.ZERO,offsetScratch$c=new Cartesian3;function Batch$4(e,t,i,r){this.translucent=t,this.width=i,this.shadows=r,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.updaters=new AssociativeArray,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.itemsToRemove=[],this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray}function StaticOutlineGeometryBatch(e,t,i){this._primitives=e,this._scene=t,this._shadows=i,this._solidBatches=new AssociativeArray,this._translucentBatches=new AssociativeArray}Batch$4.prototype.add=function(e,t){var i,r=e.id;this.createPrimitive=!0,this.geometry.set(r,t),this.updaters.set(r,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&Property.isConstant(e.distanceDisplayConditionProperty)&&Property.isConstant(e.terrainOffsetProperty)?(i=this).subscriptions.set(r,e.entity.definitionChanged.addEventListener((function(t,r,n,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))):this.updatersWithAttributes.set(r,e)},Batch$4.prototype.remove=function(e){var t=e.id;return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0)},Batch$4.prototype.update=function(e){var t=!0,i=0,r=this.primitive,n=this.primitives;if(this.createPrimitive){var a=this.geometry.values;0<a.length?(defined(r)&&(defined(this.oldPrimitive)?n.remove(r):this.oldPrimitive=r),r=new Primitive({show:!1,asynchronous:!0,geometryInstances:a.slice(),appearance:new PerInstanceColorAppearance({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),n.add(r),t=!1):(defined(r)&&(n.remove(r),r=void 0),defined(a=this.oldPrimitive)&&(n.remove(a),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(defined(r)&&r.ready){r.show=!0,defined(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0);for(var o=this.updatersWithAttributes.values,s=o.length,l=this.waitingOnCreate,c=0;c<s;c++){var u=o[c],d=this.geometry.get(u.id),h=this.attributes.get(d.id.id);defined(h)||(h=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),u.outlineColorProperty.isConstant&&!l||(p=u.outlineColorProperty,p=Property.getValueOrDefault(p,e,Color.WHITE,colorScratch$5),Color.equals(h._lastColor,p)||(h._lastColor=Color.clone(p,h._lastColor),h.color=ColorGeometryInstanceAttribute.toValue(p,h.color),(this.translucent&&255===h.color[3]||!this.translucent&&255!==h.color[3])&&(this.itemsToRemove[i++]=u)));var p=u.entity.isShowing&&(u.hasConstantOutline||u.isOutlineVisible(e));p!==(1===h.show[0])&&(h.show=ShowGeometryInstanceAttribute.toValue(p,h.show)),p=u.distanceDisplayConditionProperty,Property.isConstant(p)||(p=Property.getValueOrDefault(p,e,defaultDistanceDisplayCondition$5,distanceDisplayConditionScratch$5),DistanceDisplayCondition.equals(p,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(p,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(p,h.distanceDisplayCondition))),u=u.terrainOffsetProperty,Property.isConstant(u)||(u=Property.getValueOrDefault(u,e,defaultOffset$a,offsetScratch$c),Cartesian3.equals(u,h._lastOffset)||(h._lastOffset=Cartesian3.clone(u,h._lastOffset),h.offset=OffsetGeometryInstanceAttribute.toValue(u,h.offset)))}this.updateShows(r),this.waitingOnCreate=!1}else defined(r)&&!r.ready&&(t=!1);return this.itemsToRemove.length=i,t},Batch$4.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n=t[r],a=this.geometry.get(n.id),o=this.attributes.get(a.id.id);defined(o)||(o=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,o)),(n=n.entity.isShowing)!==(1===o.show[0])&&(o.show=ShowGeometryInstanceAttribute.toValue(n,o.show),a.attributes.show.value[0]=o.show[0])}this.showsUpdated.removeAll()},Batch$4.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$4.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch$4.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;defined(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll()),defined(t=this.oldPrimitive)&&(e.remove(t),this.oldPrimitive=void 0)},StaticOutlineGeometryBatch.prototype.add=function(e,t){var i,r,n=t.createOutlineGeometryInstance(e);e=this._scene.clampLineWidth(t.outlineWidth);255===n.attributes.color.value[3]?defined(r=(i=this._solidBatches).get(e))||(r=new Batch$4(this._primitives,!1,e,this._shadows),i.set(e,r)):defined(r=(i=this._translucentBatches).get(e))||(r=new Batch$4(this._primitives,!0,e,this._shadows),i.set(e,r)),r.add(t,n)},StaticOutlineGeometryBatch.prototype.remove=function(e){for(var t=this._solidBatches.values,i=t.length,r=0;r<i;r++)if(t[r].remove(e))return;var n=this._translucentBatches.values,a=n.length;for(r=0;r<a;r++)if(n[r].remove(e))return},StaticOutlineGeometryBatch.prototype.update=function(e){var t,i,r,n,a,o=this._solidBatches.values,s=o.length,l=this._translucentBatches.values,c=l.length,u=!0,d=!1;do{for(d=!1,i=0;i<s;i++){u=(n=o[i]).update(e);var h=(a=n.itemsToRemove).length;if(0<h)for(d=!0,t=0;t<h;t++)r=a[t],n.remove(r),this.add(e,r)}for(i=0;i<c;i++){u=(n=l[i]).update(e);var p=(a=n.itemsToRemove).length;if(0<p)for(d=!0,t=0;t<p;t++)r=a[t],n.remove(r),this.add(e,r)}}while(d);return u},StaticOutlineGeometryBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._solidBatches.values,r=i.length,n=0;n<r;n++){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}var o=this._translucentBatches.values,s=o.length;for(n=0;n<s;n++){var l=o[n];if(l.contains(e))return l.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticOutlineGeometryBatch.prototype.removeAllPrimitives=function(){for(var e=this._solidBatches.values,t=e.length,i=0;i<t;i++)e[i].removeAllPrimitives();var r=this._translucentBatches.values,n=r.length;for(i=0;i<n;i++)r[i].removeAllPrimitives()};var scratchColor$h=new Color;function WallGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function WallGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new WallGeometryOptions(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function DynamicWallGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(WallGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),WallGeometryUpdater.prototype.constructor=WallGeometryUpdater),WallGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a=DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),a=this._materialProperty instanceof ColorMaterialProperty?(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$h)),defined(t)||(t=Color.WHITE),{show:n,distanceDisplayCondition:a,color:ColorGeometryInstanceAttribute.fromColor(t)}):{show:n,distanceDisplayCondition:a};return new GeometryInstance({id:i,geometry:new WallGeometry(this._options),attributes:a})},WallGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$h),n=this._distanceDisplayConditionProperty.getValue(e);return new GeometryInstance({id:t,geometry:new WallOutlineGeometry(this._options),attributes:{show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n)}})},WallGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.positions)||GeometryUpdater.prototype._isHidden.call(this,e,t)},WallGeometryUpdater.prototype._getIsClosed=function(e){return!1},WallGeometryUpdater.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&Property.isConstant(t.minimumHeights)&&Property.isConstant(t.maximumHeights)&&Property.isConstant(t.outlineWidth)&&Property.isConstant(t.granularity))},WallGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=t.minimumHeights,r=t.maximumHeights,n=t.granularity,a=this._materialProperty instanceof ColorMaterialProperty,o=this._options;o.vertexFormat=a?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,o.positions=t.positions.getValue(Iso8601.MINIMUM_VALUE,o.positions),o.minimumHeights=defined(i)?i.getValue(Iso8601.MINIMUM_VALUE,o.minimumHeights):void 0,o.maximumHeights=defined(r)?r.getValue(Iso8601.MINIMUM_VALUE,o.maximumHeights):void 0,o.granularity=defined(n)?n.getValue(Iso8601.MINIMUM_VALUE):void 0},WallGeometryUpdater.DynamicGeometryUpdater=DynamicWallGeometryUpdater,defined(Object.create)&&(DynamicWallGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicWallGeometryUpdater.prototype.constructor=DynamicWallGeometryUpdater),DynamicWallGeometryUpdater.prototype._isHidden=function(e,t,i){return!defined(this._options.positions)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicWallGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options;r.positions=Property.getValueOrUndefined(t.positions,i,r.positions),r.minimumHeights=Property.getValueOrUndefined(t.minimumHeights,i,r.minimumHeights),r.maximumHeights=Property.getValueOrUndefined(t.maximumHeights,i,r.maximumHeights),r.granularity=Property.getValueOrUndefined(t.granularity,i)};var emptyArray=[],geometryUpdaters=[BoxGeometryUpdater,CylinderGeometryUpdater,CorridorGeometryUpdater,EllipseGeometryUpdater,EllipsoidGeometryUpdater,PlaneGeometryUpdater,PolygonGeometryUpdater,PolylineVolumeGeometryUpdater,RectangleGeometryUpdater,WallGeometryUpdater];function GeometryUpdaterSet(e,t){this.entity=e,this.scene=t;var i=new Array(geometryUpdaters.length),r=new Event;function n(e){r.raiseEvent(e)}for(var a=new EventHelper,o=0;o<i.length;o++){var s=new geometryUpdaters[o](e,t);a.add(s.geometryChanged,n),i[o]=s}this.updaters=i,this.geometryChanged=r,this.eventHelper=a,this._removeEntitySubscription=e.definitionChanged.addEventListener(GeometryUpdaterSet.prototype._onEntityPropertyChanged,this)}function GeometryVisualizer(e,t,i,r){i=defaultValue(i,e.primitives),r=defaultValue(r,e.groundPrimitives),this._scene=e,this._primitives=i,this._groundPrimitives=r,this._entityCollection=void 0,this._addedObjects=new AssociativeArray,this._removedObjects=new AssociativeArray,this._changedObjects=new AssociativeArray;var n=ShadowMode$1.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*n),this._closedColorBatches=new Array(2*n),this._closedMaterialBatches=new Array(2*n),this._openColorBatches=new Array(2*n),this._openMaterialBatches=new Array(2*n);var a,o=Entity.supportsMaterialsforEntitiesOnTerrain(e);for(this._supportsMaterialsforEntitiesOnTerrain=o,a=0;a<n;++a)this._outlineBatches[a]=new StaticOutlineGeometryBatch(i,e,a,!1),this._outlineBatches[n+a]=new StaticOutlineGeometryBatch(i,e,a,!0),this._closedColorBatches[a]=new StaticGeometryColorBatch(i,PerInstanceColorAppearance,void 0,!0,a,!0),this._closedColorBatches[n+a]=new StaticGeometryColorBatch(i,PerInstanceColorAppearance,void 0,!0,a,!1),this._closedMaterialBatches[a]=new StaticGeometryPerMaterialBatch(i,MaterialAppearance,void 0,!0,a,!0),this._closedMaterialBatches[n+a]=new StaticGeometryPerMaterialBatch(i,MaterialAppearance,void 0,!0,a,!1),this._openColorBatches[a]=new StaticGeometryColorBatch(i,PerInstanceColorAppearance,void 0,!1,a,!0),this._openColorBatches[n+a]=new StaticGeometryColorBatch(i,PerInstanceColorAppearance,void 0,!1,a,!1),this._openMaterialBatches[a]=new StaticGeometryPerMaterialBatch(i,MaterialAppearance,void 0,!1,a,!0),this._openMaterialBatches[n+a]=new StaticGeometryPerMaterialBatch(i,MaterialAppearance,void 0,!1,a,!1);var s=ClassificationType$1.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(s),c=[];if(o)for(a=0;a<s;++a)c.push(new StaticGroundGeometryPerMaterialBatch(r,a,MaterialAppearance)),l[a]=new StaticGroundGeometryColorBatch(r,a);else for(a=0;a<s;++a)l[a]=new StaticGroundGeometryColorBatch(r,a);this._groundColorBatches=l,this._groundMaterialBatches=c,this._dynamicBatch=new DynamicGeometryBatch(i,r),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new AssociativeArray,this._updaterSets=new AssociativeArray,(this._entityCollection=t).collectionChanged.addEventListener(GeometryVisualizer.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,emptyArray)}GeometryUpdaterSet.prototype._onEntityPropertyChanged=function(e,t,i,r){for(var n=this.updaters,a=0;a<n.length;a++)n[a]._onEntityPropertyChanged(e,t,i,r)},GeometryUpdaterSet.prototype.forEach=function(e){for(var t=this.updaters,i=0;i<t.length;i++)e(t[i])},GeometryUpdaterSet.prototype.destroy=function(){this.eventHelper.removeAll();for(var e=this.updaters,t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),destroyObject(this)},GeometryVisualizer.prototype.update=function(e){for(var t,i,r,n=this._addedObjects,a=n.values,o=this._removedObjects,s=o.values,l=this._changedObjects,c=l.values,u=this,d=c.length-1;-1<d;d--)i=(t=c[d]).id,(r=this._updaterSets.get(i)).entity===t?r.forEach((function(t){u._removeUpdater(t),u._insertUpdaterIntoBatch(e,t)})):(s.push(t),a.push(t));for(d=s.length-1;-1<d;d--)i=(t=s[d]).id,(r=this._updaterSets.get(i)).forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(i),this._subscriptions.get(i)(),this._subscriptions.remove(i);for(d=a.length-1;-1<d;d--)i=(t=a[d]).id,r=new GeometryUpdaterSet(t,this._scene),this._updaterSets.set(i,r),r.forEach((function(t){u._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(i,r.geometryChanged.addEventListener(GeometryVisualizer._onGeometryChanged,this));n.removeAll(),o.removeAll(),l.removeAll();var h=!0,p=this._batches,f=p.length;for(d=0;d<f;d++)h=p[d].update(e)&&h;return h};var getBoundingSphereArrayScratch=[],getBoundingSphereBoundingSphereScratch=new BoundingSphere;GeometryVisualizer.prototype.getBoundingSphere=function(e,t){for(var i=getBoundingSphereArrayScratch,r=getBoundingSphereBoundingSphereScratch,n=0,a=BoundingSphereState$1.DONE,o=this._batches,s=o.length,l=(e=e.id,this._updaterSets.get(e).updaters),c=0;c<l.length;c++)for(var u=l[c],d=0;d<s;d++){if((a=o[d].getBoundingSphere(u,r))===BoundingSphereState$1.PENDING)return BoundingSphereState$1.PENDING;a===BoundingSphereState$1.DONE&&(i[n]=BoundingSphere.clone(r,i[n]),n++)}return 0===n?BoundingSphereState$1.FAILED:(i.length=n,BoundingSphere.fromBoundingSpheres(i,t),BoundingSphereState$1.DONE)},GeometryVisualizer.prototype.isDestroyed=function(){return!1},GeometryVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(GeometryVisualizer.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();for(var e=this._batches,t=e.length,i=0;i<t;i++)e[i].removeAllPrimitives();var r=this._subscriptions.values;t=r.length;for(i=0;i<t;i++)r[i]();this._subscriptions.removeAll();var n=this._updaterSets.values;for(t=n.length,i=0;i<t;i++)n[i].destroy();return this._updaterSets.removeAll(),destroyObject(this)},GeometryVisualizer.prototype._removeUpdater=function(e){for(var t=this._batches,i=t.length,r=0;r<i;r++)t[r].remove(e)},GeometryVisualizer.prototype._insertUpdaterIntoBatch=function(e,t){var i,r,n;t.isDynamic?this._dynamicBatch.add(e,t):((t.outlineEnabled||t.fillEnabled)&&(i=t.shadowsProperty.getValue(e)),r=ShadowMode$1.NUMBER_OF_SHADOW_MODES,t.outlineEnabled&&(defined(t.terrainOffsetProperty)?this._outlineBatches[r+i]:this._outlineBatches[i]).add(e,t),t.fillEnabled&&(t.onTerrain?(n=t.classificationTypeProperty.getValue(e),(t.fillMaterialProperty instanceof ColorMaterialProperty?this._groundColorBatches:this._groundMaterialBatches)[n].add(e,t)):(t.isClosed?t.fillMaterialProperty instanceof ColorMaterialProperty?defined(t.terrainOffsetProperty)?this._closedColorBatches[r+i]:this._closedColorBatches[i]:defined(t.terrainOffsetProperty)?this._closedMaterialBatches[r+i]:this._closedMaterialBatches[i]:t.fillMaterialProperty instanceof ColorMaterialProperty?defined(t.terrainOffsetProperty)?this._openColorBatches[r+i]:this._openColorBatches[i]:defined(t.terrainOffsetProperty)?this._openMaterialBatches[r+i]:this._openMaterialBatches[i]).add(e,t)))},GeometryVisualizer._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,r=e.entity;e=r.id;defined(t.get(e))||defined(i.get(e))||i.set(e,r)},GeometryVisualizer.prototype._onCollectionChanged=function(e,t,i){for(var r,n,a=this._addedObjects,o=this._removedObjects,s=this._changedObjects,l=i.length-1;-1<l;l--)r=(n=i[l]).id,a.remove(r)||(o.set(r,n),s.remove(r));for(l=t.length-1;-1<l;l--)r=(n=t[l]).id,(o.remove(r)?s:a).set(r,n)};var defaultScale$2=1,defaultFont="30px sans-serif",defaultStyle=LabelStyle$1.FILL,defaultFillColor=Color.WHITE,defaultOutlineColor$2=Color.BLACK,defaultOutlineWidth$1=1,defaultShowBackground=!1,defaultBackgroundColor$1=new Color(.165,.165,.165,.8),defaultBackgroundPadding$1=new Cartesian2(7,5),defaultPixelOffset$1=Cartesian2.ZERO,defaultEyeOffset$1=Cartesian3.ZERO,defaultHeightReference$1=HeightReference$1.NONE,defaultHorizontalOrigin$1=HorizontalOrigin$1.CENTER,defaultVerticalOrigin$1=VerticalOrigin$1.CENTER,positionScratch$a=new Cartesian3,fillColorScratch=new Color,outlineColorScratch=new Color,backgroundColorScratch=new Color,backgroundPaddingScratch=new Cartesian2,eyeOffsetScratch$1=new Cartesian3,pixelOffsetScratch$1=new Cartesian2,translucencyByDistanceScratch$1=new NearFarScalar,pixelOffsetScaleByDistanceScratch$1=new NearFarScalar,scaleByDistanceScratch$1=new NearFarScalar,distanceDisplayConditionScratch$6=new DistanceDisplayCondition;function EntityData$1(e){this.entity=e,this.label=void 0,this.index=void 0}function LabelVisualizer(e,t){t.collectionChanged.addEventListener(LabelVisualizer.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function returnPrimitive$1(e,t,i){defined(e)&&(e.label=void 0,i.removeLabel(t))}LabelVisualizer.prototype.update=function(e){for(var t=this._items.values,i=this._cluster,r=0,n=t.length;r<n;r++){var a,o,s,l=t[r],c=l.entity,u=c._label,d=l.label,h=c.isShowing&&c.isAvailable(e)&&Property.getValueOrDefault(u._show,e,!0);h&&(o=Property.getValueOrUndefined(c._position,e,positionScratch$a),a=Property.getValueOrUndefined(u._text,e),h=defined(o)&&defined(a)),h?(Property.isConstant(c._position)||(i._clusterDirty=!0),s=!1,h=Property.getValueOrDefault(u._heightReference,e,defaultHeightReference$1),defined(d)||((d=i.getLabel(c)).id=c,l.label=d,s=Cartesian3.equals(d.position,o)&&d.heightReference===h),d.show=!0,d.position=o,d.text=a,d.scale=Property.getValueOrDefault(u._scale,e,defaultScale$2),d.font=Property.getValueOrDefault(u._font,e,defaultFont),d.style=Property.getValueOrDefault(u._style,e,defaultStyle),d.fillColor=Property.getValueOrDefault(u._fillColor,e,defaultFillColor,fillColorScratch),d.outlineColor=Property.getValueOrDefault(u._outlineColor,e,defaultOutlineColor$2,outlineColorScratch),d.outlineWidth=Property.getValueOrDefault(u._outlineWidth,e,defaultOutlineWidth$1),d.showBackground=Property.getValueOrDefault(u._showBackground,e,defaultShowBackground),d.backgroundColor=Property.getValueOrDefault(u._backgroundColor,e,defaultBackgroundColor$1,backgroundColorScratch),d.backgroundPadding=Property.getValueOrDefault(u._backgroundPadding,e,defaultBackgroundPadding$1,backgroundPaddingScratch),d.pixelOffset=Property.getValueOrDefault(u._pixelOffset,e,defaultPixelOffset$1,pixelOffsetScratch$1),d.eyeOffset=Property.getValueOrDefault(u._eyeOffset,e,defaultEyeOffset$1,eyeOffsetScratch$1),d.heightReference=h,d.horizontalOrigin=Property.getValueOrDefault(u._horizontalOrigin,e,defaultHorizontalOrigin$1),d.verticalOrigin=Property.getValueOrDefault(u._verticalOrigin,e,defaultVerticalOrigin$1),d.translucencyByDistance=Property.getValueOrUndefined(u._translucencyByDistance,e,translucencyByDistanceScratch$1),d.pixelOffsetScaleByDistance=Property.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,pixelOffsetScaleByDistanceScratch$1),d.scaleByDistance=Property.getValueOrUndefined(u._scaleByDistance,e,scaleByDistanceScratch$1),d.distanceDisplayCondition=Property.getValueOrUndefined(u._distanceDisplayCondition,e,distanceDisplayConditionScratch$6),d.disableDepthTestDistance=Property.getValueOrUndefined(u._disableDepthTestDistance,e),s&&d._updateClamping()):returnPrimitive$1(l,c,i)}return!0},LabelVisualizer.prototype.getBoundingSphere=function(e,t){return defined(e=this._items.get(e.id))&&defined(e.label)?(e=e.label,t.center=Cartesian3.clone(defaultValue(e._clampedPosition,e.position),t.center),t.radius=0,BoundingSphereState$1.DONE):BoundingSphereState$1.FAILED},LabelVisualizer.prototype.isDestroyed=function(){return!1},LabelVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(LabelVisualizer.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return destroyObject(this)},LabelVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._items,o=this._cluster,s=t.length-1;-1<s;s--)defined((n=t[s])._label)&&defined(n._position)&&a.set(n.id,new EntityData$1(n));for(s=r.length-1;-1<s;s--)defined((n=r[s])._label)&&defined(n._position)?a.contains(n.id)||a.set(n.id,new EntityData$1(n)):(returnPrimitive$1(a.get(n.id),n,o),a.remove(n.id));for(s=i.length-1;-1<s;s--)n=i[s],returnPrimitive$1(a.get(n.id),n,o),a.remove(n.id)};var defaultScale$3=1,defaultMinimumPixelSize=0,defaultIncrementallyLoadTextures=!0,defaultClampAnimations=!0,defaultShadows$1=ShadowMode$1.ENABLED,defaultHeightReference$2=HeightReference$1.NONE,defaultSilhouetteColor=Color.RED,defaultSilhouetteSize=0,defaultColor$6=Color.WHITE,defaultColorBlendMode=ColorBlendMode$1.HIGHLIGHT,defaultColorBlendAmount=.5,defaultImageBasedLightingFactor=new Cartesian2(1,1),modelMatrixScratch$1=new Matrix4,nodeMatrixScratch=new Matrix4;function ModelVisualizer(e,t){t.collectionChanged.addEventListener(ModelVisualizer.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function removeModel(e,t,i,r){var n=i[t.id];defined(n)&&(r.removeAndDestroy(n.modelPrimitive),delete i[t.id])}function clearNodeTransformationsArticulationsScratch(e,t){defined(e=t[e.id])&&(e.nodeTransformationsScratch={},e.articulationsScratch={})}function checkModelLoad(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}function ScaledPositionProperty(e){this._definitionChanged=new Event,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}ModelVisualizer.prototype.update=function(e){for(var t=this._entitiesToVisualize.values,i=this._modelHash,r=this._primitives,n=0,a=t.length;n<a;n++){var o,s,l=t[n],c=l._model,u=i[l.id],d=l.isShowing&&l.isAvailable(e)&&Property.getValueOrDefault(c._show,e,!0);if(d&&(s=l.computeModelMatrix(e,modelMatrixScratch$1),o=Resource.createIfNeeded(Property.getValueOrUndefined(c._uri,e)),d=defined(s)&&defined(o)),d){var h=defined(u)?u.modelPrimitive:void 0;if(defined(h)&&o.url===u.url||(defined(h)&&(r.removeAndDestroy(h),delete i[l.id]),(h=Model.fromGltf({url:o,incrementallyLoadTextures:Property.getValueOrDefault(c._incrementallyLoadTextures,e,defaultIncrementallyLoadTextures),scene:this._scene})).id=l,r.add(h),u={modelPrimitive:h,url:o.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFail:!1},i[l.id]=u,checkModelLoad(h,l,i)),h.show=!0,h.scale=Property.getValueOrDefault(c._scale,e,defaultScale$3),h.minimumPixelSize=Property.getValueOrDefault(c._minimumPixelSize,e,defaultMinimumPixelSize),h.maximumScale=Property.getValueOrUndefined(c._maximumScale,e),h.modelMatrix=Matrix4.clone(s,h.modelMatrix),h.shadows=Property.getValueOrDefault(c._shadows,e,defaultShadows$1),h.heightReference=Property.getValueOrDefault(c._heightReference,e,defaultHeightReference$2),h.distanceDisplayCondition=Property.getValueOrUndefined(c._distanceDisplayCondition,e),h.silhouetteColor=Property.getValueOrDefault(c._silhouetteColor,e,defaultSilhouetteColor,h._silhouetteColor),h.silhouetteSize=Property.getValueOrDefault(c._silhouetteSize,e,defaultSilhouetteSize),h.color=Property.getValueOrDefault(c._color,e,defaultColor$6,h._color),h.colorBlendMode=Property.getValueOrDefault(c._colorBlendMode,e,defaultColorBlendMode),h.colorBlendAmount=Property.getValueOrDefault(c._colorBlendAmount,e,defaultColorBlendAmount),h.clippingPlanes=Property.getValueOrUndefined(c._clippingPlanes,e),h.clampAnimations=Property.getValueOrDefault(c._clampAnimations,e,defaultClampAnimations),h.imageBasedLightingFactor=Property.getValueOrDefault(c._imageBasedLightingFactor,e,defaultImageBasedLightingFactor),h.lightColor=Property.getValueOrUndefined(c._lightColor,e),h.ready){l=Property.getValueOrDefault(c._runAnimations,e,!0),u.animationsRunning!==l&&(l?h.activeAnimations.addAll({loop:ModelAnimationLoop$1.REPEAT}):h.activeAnimations.removeAll(),u.animationsRunning=l);var p=Property.getValueOrUndefined(c._nodeTransformations,e,u.nodeTransformationsScratch);if(defined(p))for(var f=Object.keys(p),m=0,g=f.length;m<g;++m){var y=f[m],_=p[y];defined(_)&&defined(y=h.getNode(y))&&(_=Matrix4.fromTranslationRotationScale(_,nodeMatrixScratch),y.matrix=Matrix4.multiply(y.originalMatrix,_,_))}var v=!1,C=Property.getValueOrUndefined(c._articulations,e,u.articulationsScratch);if(defined(C))for(var x=Object.keys(C),b=0,S=x.length;b<S;++b){var T=x[b],E=C[T];defined(E)&&(v=!0,h.setArticulationStage(T,E))}v&&h.applyArticulations()}}else defined(u)&&(u.modelPrimitive.show=!1)}return!0},ModelVisualizer.prototype.isDestroyed=function(){return!1},ModelVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ModelVisualizer.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,r=e.length-1;-1<r;r--)removeModel(this,e[r],t,i);return destroyObject(this)},ModelVisualizer.prototype.getBoundingSphere=function(e,t){if(!defined(e=this._modelHash[e.id])||e.loadFail)return BoundingSphereState$1.FAILED;if(!defined(e=e.modelPrimitive)||!e.show)return BoundingSphereState$1.FAILED;if(!e.ready)return BoundingSphereState$1.PENDING;if(e.heightReference===HeightReference$1.NONE)BoundingSphere.transform(e.boundingSphere,e.modelMatrix,t);else{if(!defined(e._clampedModelMatrix))return BoundingSphereState$1.PENDING;BoundingSphere.transform(e.boundingSphere,e._clampedModelMatrix,t)}return BoundingSphereState$1.DONE},ModelVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._entitiesToVisualize,o=this._modelHash,s=this._primitives,l=t.length-1;-1<l;l--)defined((n=t[l])._model)&&defined(n._position)&&a.set(n.id,n);for(l=r.length-1;-1<l;l--)defined((n=r[l])._model)&&defined(n._position)?(clearNodeTransformationsArticulationsScratch(n,o),a.set(n.id,n)):(removeModel(this,n,o,s),a.remove(n.id));for(l=i.length-1;-1<l;l--)removeModel(this,n=i[l],o,s),a.remove(n.id)},Object.defineProperties(ScaledPositionProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return defined(this._value)?this._value.referenceFrame:ReferenceFrame$1.FIXED}}}),ScaledPositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},ScaledPositionProperty.prototype.setValue=function(e){this._value!==e&&(this._value=e,defined(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),defined(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},ScaledPositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){if(defined(this._value))return defined(i=this._value.getValueInReferenceFrame(e,t,i))?Ellipsoid.WGS84.scaleToGeodeticSurface(i,i):void 0},ScaledPositionProperty.prototype.equals=function(e){return this===e||e instanceof ScaledPositionProperty&&this._value===e._value},ScaledPositionProperty.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var defaultResolution=60,defaultWidth=1,scratchTimeInterval$1=new TimeInterval,subSampleCompositePropertyScratch=new TimeInterval,subSampleIntervalPropertyScratch=new TimeInterval;function EntityData$2(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function subSampleSampledProperty(e,t,i,r,n,a,o,s,l){var c=s,u=e.getValueInReferenceFrame(t,a,l[c]);defined(u)&&(l[c++]=u);for(var d,h,p,f,m=!defined(n)||JulianDate.lessThanOrEquals(n,t)||JulianDate.greaterThanOrEquals(n,i),g=0,y=r.length,_=r[g],v=i,C=!1;g<y;)!m&&JulianDate.greaterThanOrEquals(_,n)&&(defined(u=e.getValueInReferenceFrame(n,a,l[c]))&&(l[c++]=u),m=!0),JulianDate.greaterThan(_,t)&&JulianDate.lessThan(_,v)&&!_.equals(n)&&defined(u=e.getValueInReferenceFrame(_,a,l[c]))&&(l[c++]=u),g<y-1&&(0<o&&!C&&(f=r[g+1],(C=o<(f=JulianDate.secondsDifference(f,_)))&&(d=Math.ceil(f/o),h=0,p=f/Math.max(d,2),d=Math.max(d-1,1))),C&&h<d)?(_=JulianDate.addSeconds(_,p,new JulianDate),h++):(C=!1,_=r[++g]);return defined(u=e.getValueInReferenceFrame(i,a,l[c]))&&(l[c++]=u),c}function subSampleGenericProperty(e,t,i,r,n,a,o,s){for(var l,c=0,u=o,d=t,h=Math.max(a,60),p=!defined(r)||JulianDate.lessThanOrEquals(r,t)||JulianDate.greaterThanOrEquals(r,i);JulianDate.lessThan(d,i);)!p&&JulianDate.greaterThanOrEquals(d,r)&&(p=!0,defined(l=e.getValueInReferenceFrame(r,n,s[u]))&&(s[u]=l,u++)),defined(l=e.getValueInReferenceFrame(d,n,s[u]))&&(s[u]=l,u++),c++,d=JulianDate.addSeconds(t,h*c,new JulianDate);return defined(l=e.getValueInReferenceFrame(i,n,s[u]))&&(s[u]=l,u++),u}function subSampleIntervalProperty(e,t,i,r,n,a,o,s){subSampleIntervalPropertyScratch.start=t,subSampleIntervalPropertyScratch.stop=i;for(var l=o,c=e.intervals,u=0;u<c.length;u++){var d,h=c.get(u);TimeInterval.intersect(h,subSampleIntervalPropertyScratch,scratchTimeInterval$1).isEmpty||(d=h.start,h.isStartIncluded||(d=h.isStopIncluded?h.stop:JulianDate.addSeconds(h.start,JulianDate.secondsDifference(h.stop,h.start)/2,new JulianDate)),defined(d=e.getValueInReferenceFrame(d,n,s[l]))&&(s[l]=d,l++))}return l}function subSampleConstantProperty(e,t,i,r,n,a,o,s){return defined(n=e.getValueInReferenceFrame(t,n,s[o]))&&(s[o++]=n),o}function subSampleCompositeProperty(e,t,i,r,n,a,o,s){subSampleCompositePropertyScratch.start=t,subSampleCompositePropertyScratch.stop=i;for(var l=o,c=e.intervals,u=0;u<c.length;u++){var d,h,p,f=c.get(u);TimeInterval.intersect(f,subSampleCompositePropertyScratch,scratchTimeInterval$1).isEmpty||(p=f.start,d=f.stop,h=t,JulianDate.greaterThan(p,h)&&(h=p),p=i,JulianDate.lessThan(d,p)&&(p=d),l=reallySubSample(f.data,h,p,r,n,a,l,s))}return l}function reallySubSample(e,t,i,r,n,a,o,s){for(;e instanceof ReferenceProperty;)e=e.resolvedProperty;return e instanceof SampledPositionProperty?subSampleSampledProperty(e,t,i,e._property._times,r,n,a,o,s):(e instanceof CompositePositionProperty?subSampleCompositeProperty:e instanceof TimeIntervalCollectionPositionProperty?subSampleIntervalProperty:e instanceof ConstantPositionProperty||e instanceof ScaledPositionProperty&&Property.isConstant(e)?subSampleConstantProperty:subSampleGenericProperty)(e,t,i,r,n,a,o,s)}function subSample(e,t,i,r,n,a,o){return defined(o)||(o=[]),a=reallySubSample(e,t,i,r,n,a,0,o),o.length=a,o}var toFixedScratch=new Matrix3;function PolylineUpdater(e,t){this._unusedIndexes=[],this._polylineCollection=new PolylineCollection,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function PathVisualizer(e,t){t.collectionChanged.addEventListener(PathVisualizer.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}PolylineUpdater.prototype.update=function(e){var t;this._referenceFrame===ReferenceFrame$1.INERTIAL&&(defined(t=Transforms.computeIcrfToFixedMatrix(e,toFixedScratch))||(t=Transforms.computeTemeToPseudoFixedMatrix(e,toFixedScratch)),Matrix4.fromRotationTranslation(t,Cartesian3.ZERO,this._polylineCollection.modelMatrix))},PolylineUpdater.prototype.updateObject=function(e,t){var i,r,n,a,o,s,l,c=t.entity,u=c._path,d=c._position,h=u._show,p=t.polyline,f=c.isShowing&&(!defined(h)||h.getValue(e));f&&(n=Property.getValueOrUndefined(u._leadTime,e),a=Property.getValueOrUndefined(u._trailTime,e),s=defined(l=c._availability),o=defined(n),h=defined(a),(f=s||o&&h)&&(h&&(i=JulianDate.addSeconds(e,-a,new JulianDate)),o&&(r=JulianDate.addSeconds(e,n,new JulianDate)),s&&(s=l.start,l=l.stop,h&&!JulianDate.greaterThan(s,i)||(i=s),o&&!JulianDate.lessThan(l,r)||(r=l)),f=JulianDate.lessThan(i,r))),f?(defined(p)||(0<(f=this._unusedIndexes).length?(f=f.pop(),p=this._polylineCollection.get(f),t.index=f):(t.index=this._polylineCollection.length,p=this._polylineCollection.add()),p.id=c,t.polyline=p),c=Property.getValueOrDefault(u._resolution,e,defaultResolution),p.show=!0,p.positions=subSample(d,i,r,e,this._referenceFrame,c,p.positions.slice()),p.material=MaterialProperty.getValue(e,u._material,p.material),p.width=Property.getValueOrDefault(u._width,e,defaultWidth),p.distanceDisplayCondition=Property.getValueOrUndefined(u._distanceDisplayCondition,e,p.distanceDisplayCondition)):defined(p)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,p.show=!1,t.index=void 0)},PolylineUpdater.prototype.removeObject=function(e){var t=e.polyline;defined(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},PolylineUpdater.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),destroyObject(this)},PathVisualizer.prototype.update=function(e){var t,i=this._updaters;for(t in i)i.hasOwnProperty(t)&&i[t].update(e);var r=this._items.values;if(0===r.length&&defined(this._updaters)&&0<Object.keys(this._updaters).length){for(var n in i)i.hasOwnProperty(n)&&i[n].destroy();this._updaters={}}for(var a=0,o=r.length;a<o;a++){var s=r[a],l=s.entity._position,c=s.updater,u=ReferenceFrame$1.FIXED;this._scene.mode===SceneMode$1.SCENE3D&&(u=l.referenceFrame),c===(l=this._updaters[u])&&defined(l)?l.updateObject(e,s):(defined(c)&&c.removeObject(s),defined(l)||((l=new PolylineUpdater(this._scene,u)).update(e),this._updaters[u]=l),defined(s.updater=l)&&l.updateObject(e,s))}return!0},PathVisualizer.prototype.isDestroyed=function(){return!1},PathVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(PathVisualizer.prototype._onCollectionChanged,this);var e,t=this._updaters;for(e in t)t.hasOwnProperty(e)&&t[e].destroy();return destroyObject(this)},PathVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a,o=this._items,s=t.length-1;-1<s;s--)defined((n=t[s])._path)&&defined(n._position)&&o.set(n.id,new EntityData$2(n));for(s=r.length-1;-1<s;s--)defined((n=r[s])._path)&&defined(n._position)?o.contains(n.id)||o.set(n.id,new EntityData$2(n)):defined(a=o.get(n.id))&&(defined(a.updater)&&a.updater.removeObject(a),o.remove(n.id));for(s=i.length-1;-1<s;s--)n=i[s],defined(a=o.get(n.id))&&(defined(a.updater)&&a.updater.removeObject(a),o.remove(n.id))},PathVisualizer._subSample=subSample;var defaultColor$7=Color.WHITE,defaultOutlineColor$3=Color.BLACK,defaultOutlineWidth$2=0,defaultPixelSize=1,defaultDisableDepthTestDistance=0,colorScratch$6=new Color,positionScratch$b=new Cartesian3,outlineColorScratch$1=new Color,scaleByDistanceScratch$2=new NearFarScalar,translucencyByDistanceScratch$2=new NearFarScalar,distanceDisplayConditionScratch$7=new DistanceDisplayCondition;function EntityData$3(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function PointVisualizer(e,t){t.collectionChanged.addEventListener(PointVisualizer.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function returnPrimitive$2(e,t,i){if(defined(e)){if(defined(e.pointPrimitive))return e.pointPrimitive=void 0,void i.removePoint(t);defined(e.billboard)&&(e.billboard=void 0,i.removeBillboard(t))}}PointVisualizer.prototype.update=function(e){for(var t=this._items.values,i=this._cluster,r=0,n=t.length;r<n;r++){var a,o,s,l,c,u=t[r],d=u.entity,h=d._point,p=u.pointPrimitive,f=u.billboard,m=Property.getValueOrDefault(h._heightReference,e,HeightReference$1.NONE);d.isShowing&&d.isAvailable(e)&&Property.getValueOrDefault(h._show,e,!0)&&defined(a=Property.getValueOrUndefined(d._position,e,positionScratch$b))?(Property.isConstant(d._position)||(i._clusterDirty=!0),o=c=!1,m===HeightReference$1.NONE||defined(f)?m!==HeightReference$1.NONE||defined(p)||(defined(f)&&(returnPrimitive$2(u,d,i),f=void 0),(p=i.getPoint(d)).id=d,u.pointPrimitive=p):(defined(p)&&(returnPrimitive$2(u,d,i),p=void 0),(f=i.getBillboard(d)).id=d,f.image=void 0,u.billboard=f,c=!0,o=Cartesian3.equals(f.position,a)&&f.heightReference===m),defined(p)?(p.show=!0,p.position=a,p.scaleByDistance=Property.getValueOrUndefined(h._scaleByDistance,e,scaleByDistanceScratch$2),p.translucencyByDistance=Property.getValueOrUndefined(h._translucencyByDistance,e,translucencyByDistanceScratch$2),p.color=Property.getValueOrDefault(h._color,e,defaultColor$7,colorScratch$6),p.outlineColor=Property.getValueOrDefault(h._outlineColor,e,defaultOutlineColor$3,outlineColorScratch$1),p.outlineWidth=Property.getValueOrDefault(h._outlineWidth,e,defaultOutlineWidth$2),p.pixelSize=Property.getValueOrDefault(h._pixelSize,e,defaultPixelSize),p.distanceDisplayCondition=Property.getValueOrUndefined(h._distanceDisplayCondition,e,distanceDisplayConditionScratch$7),p.disableDepthTestDistance=Property.getValueOrDefault(h._disableDepthTestDistance,e,defaultDisableDepthTestDistance)):defined(f)&&(f.show=!0,f.position=a,f.scaleByDistance=Property.getValueOrUndefined(h._scaleByDistance,e,scaleByDistanceScratch$2),f.translucencyByDistance=Property.getValueOrUndefined(h._translucencyByDistance,e,translucencyByDistanceScratch$2),f.distanceDisplayCondition=Property.getValueOrUndefined(h._distanceDisplayCondition,e,distanceDisplayConditionScratch$7),f.disableDepthTestDistance=Property.getValueOrDefault(h._disableDepthTestDistance,e,defaultDisableDepthTestDistance),f.heightReference=m,s=Property.getValueOrDefault(h._color,e,defaultColor$7,colorScratch$6),l=Property.getValueOrDefault(h._outlineColor,e,defaultOutlineColor$3,outlineColorScratch$1),p=Math.round(Property.getValueOrDefault(h._outlineWidth,e,defaultOutlineWidth$2)),m=Math.max(1,Math.round(Property.getValueOrDefault(h._pixelSize,e,defaultPixelSize))),(c=0<p?(f.scale=1,c||p!==u.outlineWidth||m!==u.pixelSize||!Color.equals(s,u.color)||!Color.equals(l,u.outlineColor)):(f.scale=m/50,m=50,c||p!==u.outlineWidth||!Color.equals(s,u.color)||!Color.equals(l,u.outlineColor)))&&(u.color=Color.clone(s,u.color),u.outlineColor=Color.clone(l,u.outlineColor),u.pixelSize=m,u.outlineWidth=p,h=s.alpha,c=s.toCssColorString(),s=l.toCssColorString(),l=JSON.stringify([c,m,s,p]),f.setImage(l,createBillboardPointCallback(h,c,s,p,m))),o&&f._updateClamping())):returnPrimitive$2(u,d,i)}return!0},PointVisualizer.prototype.getBoundingSphere=function(e,t){if(!defined(e=this._items.get(e.id))||!defined(e.pointPrimitive)&&!defined(e.billboard))return BoundingSphereState$1.FAILED;if(defined(e.pointPrimitive))t.center=Cartesian3.clone(e.pointPrimitive.position,t.center);else{if(!defined((e=e.billboard)._clampedPosition))return BoundingSphereState$1.PENDING;t.center=Cartesian3.clone(e._clampedPosition,t.center)}return t.radius=0,BoundingSphereState$1.DONE},PointVisualizer.prototype.isDestroyed=function(){return!1},PointVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(PointVisualizer.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return destroyObject(this)},PointVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._items,o=this._cluster,s=t.length-1;-1<s;s--)defined((n=t[s])._point)&&defined(n._position)&&a.set(n.id,new EntityData$3(n));for(s=r.length-1;-1<s;s--)defined((n=r[s])._point)&&defined(n._position)?a.contains(n.id)||a.set(n.id,new EntityData$3(n)):(returnPrimitive$2(a.get(n.id),n,o),a.remove(n.id));for(s=i.length-1;-1<s;s--)n=i[s],returnPrimitive$2(a.get(n.id),n,o),a.remove(n.id)};var defaultZIndex$1=new ConstantProperty(0),polylineCollections={},scratchColor$i=new Color,defaultMaterial$2=new ColorMaterialProperty(Color.WHITE),defaultShow$1=new ConstantProperty(!0),defaultShadows$2=new ConstantProperty(ShadowMode$1.DISABLED),defaultDistanceDisplayCondition$6=new ConstantProperty(new DistanceDisplayCondition),defaultClassificationType$1=new ConstantProperty(ClassificationType$1.BOTH);function GeometryOptions(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function GroundGeometryOptions(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function PolylineGeometryUpdater(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(PolylineGeometryUpdater.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new Event,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new GeometryOptions,this._groundGeometryOptions=new GroundGeometryOptions,this._id="polyline-"+e.id,this._clampToGround=!1,this._supportsPolylinesOnTerrain=Entity.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(PolylineGeometryUpdater.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!defined(this._entity.availability)&&Property.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),PolylineGeometryUpdater.prototype.isOutlineVisible=function(e){return!1},PolylineGeometryUpdater.prototype.isFilled=function(e){var t=this._entity;return defaultValue(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e),!1)},PolylineGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a={show:n,distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a)};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$i)),defined(t)||(t=Color.WHITE),a.color=ColorGeometryInstanceAttribute.fromColor(t)),this.clampToGround?new GeometryInstance({id:i,geometry:new GroundPolylineGeometry(this._groundGeometryOptions),attributes:a}):(defined(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof ColorMaterialProperty&&(defined(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||r)&&(t=this._depthFailMaterialProperty.color.getValue(e,scratchColor$i)),defined(t)||(t=Color.WHITE),a.depthFailColor=ColorGeometryInstanceAttribute.fromColor(t)),new GeometryInstance({id:i,geometry:new PolylineGeometry(this._geometryOptions),attributes:a}))},PolylineGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){},PolylineGeometryUpdater.prototype.isDestroyed=function(){return!1},PolylineGeometryUpdater.prototype.destroy=function(){this._entitySubscription(),destroyObject(this)},PolylineGeometryUpdater.prototype._onEntityPropertyChanged=function(e,t,i,r){if("availability"===t||"polyline"===t){var n=this._entity.polyline;if(defined(n)){var a=n.positions;if(defined(u=n.show)&&u.isConstant&&!u.getValue(Iso8601.MINIMUM_VALUE)||!defined(a))this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));else{var o=n.zIndex,s=(c=defaultValue(n.material,defaultMaterial$2))instanceof ColorMaterialProperty;this._materialProperty=c,this._depthFailMaterialProperty=n.depthFailMaterial,this._showProperty=defaultValue(u,defaultShow$1),this._shadowsProperty=defaultValue(n.shadows,defaultShadows$2),this._distanceDisplayConditionProperty=defaultValue(n.distanceDisplayCondition,defaultDistanceDisplayCondition$6),this._classificationTypeProperty=defaultValue(n.classificationType,defaultClassificationType$1),this._fillEnabled=!0,this._zIndex=defaultValue(o,defaultZIndex$1);var l=n.width,c=(t=n.arcType,n.clampToGround),u=n.granularity;if(a.isConstant&&Property.isConstant(l)&&Property.isConstant(t)&&Property.isConstant(u)&&Property.isConstant(c)&&Property.isConstant(o)){if(n=this._geometryOptions,!defined(a=a.getValue(Iso8601.MINIMUM_VALUE,n.positions))||a.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));s=(s&&(!defined(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof ColorMaterialProperty)?PolylineColorAppearance:PolylineMaterialAppearance).VERTEX_FORMAT,n.vertexFormat=s,n.positions=a,n.width=defined(l)?l.getValue(Iso8601.MINIMUM_VALUE):void 0,n.arcType=defined(t)?t.getValue(Iso8601.MINIMUM_VALUE):void 0,n.granularity=defined(u)?u.getValue(Iso8601.MINIMUM_VALUE):void 0,(u=this._groundGeometryOptions).positions=a,u.width=n.width,u.arcType=n.arcType,u.granularity=n.granularity,this._clampToGround=!!defined(c)&&c.getValue(Iso8601.MINIMUM_VALUE),!this._clampToGround&&defined(o)&&oneTimeWarning("Entity polylines must have clampToGround: true when using zIndex.  zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}}else this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this))}},PolylineGeometryUpdater.prototype.createDynamicUpdater=function(e,t){return new DynamicGeometryUpdater$1(e,t,this)};var generateCartesianArcOptions={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function DynamicGeometryUpdater$1(e,t,i){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=i,this._positions=[]}function getLine(e){if(defined(e._line))return e._line;var t=e._geometryUpdater._scene.id,i=polylineCollections[t],r=e._primitives;return!defined(i)||i.isDestroyed()?(i=new PolylineCollection,polylineCollections[t]=i,r.add(i)):r.contains(i)||r.add(i),(i=i.add()).id=e._geometryUpdater._entity,e._line=i}DynamicGeometryUpdater$1.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,r=i.polyline,n=r.positions,a=Property.getValueOrUndefined(n,e,this._positions);t._clampToGround=Property.getValueOrDefault(r._clampToGround,e,!1),t._groundGeometryOptions.positions=a,t._groundGeometryOptions.width=Property.getValueOrDefault(r._width,e,1),t._groundGeometryOptions.arcType=Property.getValueOrDefault(r._arcType,e,ArcType$1.GEODESIC),t._groundGeometryOptions.granularity=Property.getValueOrDefault(r._granularity,e,9999);var o=this._groundPrimitives;if(defined(this._groundPolylinePrimitive)&&(o.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!i.isShowing||!i.isAvailable(e)||!Property.getValueOrDefault(r._show,e,!0))return;if(!defined(a)||a.length<2)return;return(n=t.fillMaterialProperty)instanceof ColorMaterialProperty?s=new PolylineColorAppearance:(s=new PolylineMaterialAppearance({material:n=MaterialProperty.getValue(e,n,this._material),translucent:n.isTranslucent()}),this._material=n),this._groundPolylinePrimitive=o.add(new GroundPolylinePrimitive({geometryInstances:t.createFillGeometryInstance(e),appearance:s,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),Property.getValueOrUndefined(t.zIndex,e)),void(defined(this._line)&&(this._line.show=!1))}var s;o=getLine(this);i.isShowing&&i.isAvailable(e)&&Property.getValueOrDefault(r._show,e,!0)&&defined(a)&&!(a.length<2)?(s=ArcType$1.GEODESIC,s=Property.getValueOrDefault(r._arcType,e,s),i=t._scene.globe,s!==ArcType$1.NONE&&defined(i)&&(generateCartesianArcOptions.ellipsoid=i.ellipsoid,generateCartesianArcOptions.positions=a,generateCartesianArcOptions.granularity=Property.getValueOrUndefined(r._granularity,e),generateCartesianArcOptions.height=PolylinePipeline.extractHeights(a,i.ellipsoid),a=s===ArcType$1.GEODESIC?PolylinePipeline.generateCartesianArc(generateCartesianArcOptions):PolylinePipeline.generateCartesianRhumbArc(generateCartesianArcOptions)),o.show=!0,o.positions=a.slice(),o.material=MaterialProperty.getValue(e,t.fillMaterialProperty,o.material),o.width=Property.getValueOrDefault(r._width,e,1),o.distanceDisplayCondition=Property.getValueOrUndefined(r._distanceDisplayCondition,e,o.distanceDisplayCondition)):o.show=!1},DynamicGeometryUpdater$1.prototype.getBoundingSphere=function(e){if(this._geometryUpdater.clampToGround){var t=this._groundPolylinePrimitive;if(defined(t)&&t.show&&t.ready){var i=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(defined(i)&&defined(i.boundingSphere))return BoundingSphere.clone(i.boundingSphere,e),BoundingSphereState$1.DONE}return defined(t)&&!t.ready?BoundingSphereState$1.PENDING:BoundingSphereState$1.DONE}return(t=getLine(this)).show&&0<t.positions.length?(BoundingSphere.fromPoints(t.positions,e),BoundingSphereState$1.DONE):BoundingSphereState$1.FAILED},DynamicGeometryUpdater$1.prototype.isDestroyed=function(){return!1},DynamicGeometryUpdater$1.prototype.destroy=function(){var e=this._geometryUpdater._scene.id,t=polylineCollections[e];defined(t)&&(t.remove(this._line),0===t.length&&(this._primitives.removeAndDestroy(t),delete polylineCollections[e])),defined(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),destroyObject(this)};var scratchColor$j=new Color,distanceDisplayConditionScratch$8=new DistanceDisplayCondition,defaultDistanceDisplayCondition$7=new DistanceDisplayCondition;function Batch$5(e,t,i,r,n){var a=i instanceof ColorMaterialProperty?PolylineColorAppearance:PolylineMaterialAppearance;this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=a,this.materialProperty=i,this.updaters=new AssociativeArray,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.material=void 0,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(Batch$5.prototype.onMaterialChanged,this),this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray,this.zIndex=r,this._asynchronous=n}function StaticGroundPolylinePerMaterialBatch(e,t,i){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=defaultValue(i,!0)}Batch$5.prototype.onMaterialChanged=function(){this.invalidated=!0},Batch$5.prototype.isMaterial=function(e){var t=this.materialProperty;return(e=e.fillMaterialProperty)===t||e instanceof ColorMaterialProperty&&t instanceof ColorMaterialProperty||defined(t)&&t.equals(e)},Batch$5.prototype.add=function(e,t,i){var r,n=t.id;this.updaters.set(n,t),this.geometry.set(n,i),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&Property.isConstant(t.distanceDisplayConditionProperty)?(r=this).subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,a){"isShowing"===i&&r.showsUpdated.set(t.id,t)}))):this.updatersWithAttributes.set(n,t),this.createPrimitive=!0},Batch$5.prototype.remove=function(e){var t=e.id;return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t)),!0)},Batch$5.prototype.update=function(e){var t=!0,i=this.primitive,r=this.orderedGroundPrimitives,n=this.geometry.values;if(this.createPrimitive)0<n.length?(defined(i)&&(defined(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i),i=new GroundPolylinePrimitive({show:!1,asynchronous:this._asynchronous,geometryInstances:n.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===PolylineMaterialAppearance&&(this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),i.appearance.material=this.material),r.add(i,this.zIndex),t=!1):(defined(i)&&(r.remove(i),i=void 0),defined(n=this.oldPrimitive)&&(r.remove(n),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1;else if(defined(i)&&i.ready){i.show=!0,defined(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===PolylineMaterialAppearance&&(this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);for(var a=this.updatersWithAttributes.values,o=a.length,s=0;s<o;s++){var l=a[s],c=l.entity,u=this.geometry.get(l.id),d=this.attributes.get(u.id.id);defined(d)||(d=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,d)),l.fillMaterialProperty.isConstant||(u=l.fillMaterialProperty.color,u=Property.getValueOrDefault(u,e,Color.WHITE,scratchColor$j),Color.equals(d._lastColor,u)||(d._lastColor=Color.clone(u,d._lastColor),d.color=ColorGeometryInstanceAttribute.toValue(u,d.color))),(c=c.isShowing&&(l.hasConstantFill||l.isFilled(e)))!==(1===d.show[0])&&(d.show=ShowGeometryInstanceAttribute.toValue(c,d.show)),l=l.distanceDisplayConditionProperty,Property.isConstant(l)||(l=Property.getValueOrDefault(l,e,defaultDistanceDisplayCondition$7,distanceDisplayConditionScratch$8),DistanceDisplayCondition.equals(l,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(l,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(l,d.distanceDisplayCondition)))}this.updateShows(i)}else defined(i)&&!i.ready&&(t=!1);return t},Batch$5.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n,a=(n=t[r]).entity,o=this.geometry.get(n.id);defined(n=this.attributes.get(o.id.id))||(n=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,n)),(a=a.isShowing)!==(1===n.show[0])&&(n.show=ShowGeometryInstanceAttribute.toValue(a,n.show),o.attributes.show.value[0]=n.show[0])}this.showsUpdated.removeAll()},Batch$5.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$5.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch$5.prototype.destroy=function(){var e=this.primitive,t=this.orderedGroundPrimitives;defined(e)&&t.remove(e),defined(e=this.oldPrimitive)&&t.remove(e),this.removeMaterialSubscription()},StaticGroundPolylinePerMaterialBatch.prototype.add=function(e,t){for(var i=this._items,r=i.length,n=t.createFillGeometryInstance(e),a=Property.getValueOrDefault(t.zIndex,0),o=0;o<r;++o){var s=i[o];if(s.isMaterial(t)&&s.zIndex===a)return void s.add(e,t,n)}var l=new Batch$5(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,a,this._asynchronous);l.add(e,t,n),i.push(l)},StaticGroundPolylinePerMaterialBatch.prototype.remove=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.remove(e)){0===r.updaters.length&&(t.splice(i,1),r.destroy());break}}},StaticGroundPolylinePerMaterialBatch.prototype.update=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.invalidated){t.splice(i,1);for(var n=r.updaters.values,a=n.length,o=0;o<a;o++)this.add(e,n[o]);r.destroy()}}var s=!0;for(i=0;i<t.length;i++)s=t[i].update(e)&&s;return s},StaticGroundPolylinePerMaterialBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._items,r=i.length,n=0;n<r;n++){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticGroundPolylinePerMaterialBatch.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var emptyArray$1=[];function removeUpdater(e,t){for(var i=e._batches,r=i.length,n=0;n<r;n++)i[n].remove(t)}function insertUpdaterIntoBatch(e,t,i){var r,n,a;i.isDynamic?e._dynamicBatch.add(t,i):i.clampToGround&&i.fillEnabled?(n=i.classificationTypeProperty.getValue(t),e._groundBatches[n].add(t,i)):(i.fillEnabled&&(r=i.shadowsProperty.getValue(t)),n=0,defined(i.depthFailMaterialProperty)&&(n=i.depthFailMaterialProperty instanceof ColorMaterialProperty?1:2),defined(r)&&(a=r+n*ShadowMode$1.NUMBER_OF_SHADOW_MODES),i.fillEnabled&&(i.fillMaterialProperty instanceof ColorMaterialProperty?e._colorBatches:e._materialBatches)[a].add(t,i))}function PolylineVisualizer(e,t,i,r){var n;r=defaultValue(r,e.groundPrimitives),i=defaultValue(i,e.primitives),this._scene=e,this._primitives=i,this._entityCollection=void 0,this._addedObjects=new AssociativeArray,this._removedObjects=new AssociativeArray,this._changedObjects=new AssociativeArray;var a=ShadowMode$1.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*a),this._materialBatches=new Array(3*a),n=0;n<a;++n)this._colorBatches[n]=new StaticGeometryColorBatch(i,PolylineColorAppearance,void 0,!1,n),this._materialBatches[n]=new StaticGeometryPerMaterialBatch(i,PolylineMaterialAppearance,void 0,!1,n),this._colorBatches[n+a]=new StaticGeometryColorBatch(i,PolylineColorAppearance,PolylineColorAppearance,!1,n),this._materialBatches[n+a]=new StaticGeometryPerMaterialBatch(i,PolylineMaterialAppearance,PolylineColorAppearance,!1,n),this._colorBatches[n+2*a]=new StaticGeometryColorBatch(i,PolylineColorAppearance,PolylineMaterialAppearance,!1,n),this._materialBatches[n+2*a]=new StaticGeometryPerMaterialBatch(i,PolylineMaterialAppearance,PolylineMaterialAppearance,!1,n);this._dynamicBatch=new DynamicGeometryBatch(i,r);var o=ClassificationType$1.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(o),n=0;n<o;++n)this._groundBatches[n]=new StaticGroundPolylinePerMaterialBatch(r,n);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new AssociativeArray,this._updaters=new AssociativeArray,(this._entityCollection=t).collectionChanged.addEventListener(PolylineVisualizer.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,emptyArray$1)}PolylineVisualizer.prototype.update=function(e){for(var t,i,r,n=this._addedObjects,a=n.values,o=this._removedObjects,s=o.values,l=this._changedObjects,c=l.values,u=c.length-1;-1<u;u--)i=(t=c[u]).id,(r=this._updaters.get(i)).entity===t?(removeUpdater(this,r),insertUpdaterIntoBatch(this,e,r)):(s.push(t),a.push(t));for(u=s.length-1;-1<u;u--)i=(t=s[u]).id,removeUpdater(this,r=this._updaters.get(i)),r.destroy(),this._updaters.remove(i),this._subscriptions.get(i)(),this._subscriptions.remove(i);for(u=a.length-1;-1<u;u--)i=(t=a[u]).id,r=new PolylineGeometryUpdater(t,this._scene),this._updaters.set(i,r),insertUpdaterIntoBatch(this,e,r),this._subscriptions.set(i,r.geometryChanged.addEventListener(PolylineVisualizer._onGeometryChanged,this));n.removeAll(),o.removeAll(),l.removeAll();var d=!0,h=this._batches,p=h.length;for(u=0;u<p;u++)d=h[u].update(e)&&d;return d};var getBoundingSphereArrayScratch$1=[],getBoundingSphereBoundingSphereScratch$1=new BoundingSphere;function DataSourceDisplay(e){GroundPrimitive.initializeTerrainHeights(),GroundPolylinePrimitive.initializeTerrainHeights();var t=e.scene,i=e.dataSourceCollection;this._eventHelper=new EventHelper,this._eventHelper.add(i.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(i.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(i.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=i,this._scene=t,this._visualizersCallback=defaultValue(e.visualizersCallback,DataSourceDisplay.defaultVisualizersCallback);var r=!1,n=new PrimitiveCollection,a=new PrimitiveCollection;0<i.length&&(t.primitives.add(n),t.groundPrimitives.add(a),r=!0),this._primitives=n,this._groundPrimitives=a;for(var o=0,s=i.length;o<s;o++)this._onDataSourceAdded(i,i.get(o));var l,c,u;e=new CustomDataSource;this._onDataSourceAdded(void 0,e),this._defaultDataSource=e,r||(l=this,r=function(){t.primitives.add(n),t.groundPrimitives.add(a),c(),u(),l._removeDefaultDataSourceListener=void 0,l._removeDataSourceCollectionListener=void 0},c=e.entities.collectionChanged.addEventListener(r),u=i.dataSourceAdded.addEventListener(r)),this._removeDefaultDataSourceListener=c,this._removeDataSourceCollectionListener=u,this._ready=!1}PolylineVisualizer.prototype.getBoundingSphere=function(e,t){for(var i=getBoundingSphereArrayScratch$1,r=getBoundingSphereBoundingSphereScratch$1,n=0,a=BoundingSphereState$1.DONE,o=this._batches,s=o.length,l=this._updaters.get(e.id),c=0;c<s;c++){if((a=o[c].getBoundingSphere(l,r))===BoundingSphereState$1.PENDING)return BoundingSphereState$1.PENDING;a===BoundingSphereState$1.DONE&&(i[n]=BoundingSphere.clone(r,i[n]),n++)}return 0===n?BoundingSphereState$1.FAILED:(i.length=n,BoundingSphere.fromBoundingSpheres(i,t),BoundingSphereState$1.DONE)},PolylineVisualizer.prototype.isDestroyed=function(){return!1},PolylineVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(PolylineVisualizer.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();for(var e=this._batches,t=e.length,i=0;i<t;i++)e[i].removeAllPrimitives();var r=this._subscriptions.values;t=r.length;for(i=0;i<t;i++)r[i]();return this._subscriptions.removeAll(),destroyObject(this)},PolylineVisualizer._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,r=e.entity;e=r.id;defined(t.get(e))||defined(i.get(e))||i.set(e,r)},PolylineVisualizer.prototype._onCollectionChanged=function(e,t,i){for(var r,n,a=this._addedObjects,o=this._removedObjects,s=this._changedObjects,l=i.length-1;-1<l;l--)r=(n=i[l]).id,a.remove(r)||(o.set(r,n),s.remove(r));for(l=t.length-1;-1<l;l--)r=(n=t[l]).id,(o.remove(r)?s:a).set(r,n)},DataSourceDisplay.defaultVisualizersCallback=function(e,t,i){var r=i.entities;return[new BillboardVisualizer(t,r),new GeometryVisualizer(e,r,i._primitives,i._groundPrimitives),new LabelVisualizer(t,r),new ModelVisualizer(e,r),new Cesium3DTilesetVisualizer(e,r),new PointVisualizer(t,r),new PathVisualizer(e,r),new PolylineVisualizer(e,r,i._primitives,i._groundPrimitives)]},Object.defineProperties(DataSourceDisplay.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}}),DataSourceDisplay.prototype.isDestroyed=function(){return!1},DataSourceDisplay.prototype.destroy=function(){this._eventHelper.removeAll();for(var e=this._dataSourceCollection,t=0,i=e.length;t<i;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),defined(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),destroyObject(this)},DataSourceDisplay.prototype.update=function(e){if(!ApproximateTerrainHeights.initialized)return this._ready=!1;for(var t,i,r,n=!0,a=this._dataSourceCollection,o=a.length,s=0;s<o;s++){var l=a.get(s);for(defined(l.update)&&(n=l.update(e)&&n),r=(i=l._visualizers).length,t=0;t<r;t++)n=i[t].update(e)&&n}for(r=(i=this._defaultDataSource._visualizers).length,t=0;t<r;t++)n=i[t].update(e)&&n;return this._ready=n},DataSourceDisplay.prototype._postRender=function(){for(var e=this._scene.frameState,t=this._dataSourceCollection,i=t.length,r=0;r<i;r++){var n=t.get(r),a=n.credit;defined(a)&&e.creditDisplay.addCredit(a);var o=n._resourceCredits;if(defined(o))for(var s=o.length,l=0;l<s;l++)e.creditDisplay.addCredit(o[l])}};var getBoundingSphereArrayScratch$2=[],getBoundingSphereBoundingSphereScratch$2=new BoundingSphere;DataSourceDisplay.prototype.getBoundingSphere=function(e,t,i){if(!this._ready)return BoundingSphereState$1.PENDING;var r=this._defaultDataSource;if(!r.entities.contains(e)){r=void 0;for(var n=this._dataSourceCollection,a=n.length,o=0;o<a;o++){var s=n.get(o);if(s.entities.contains(e)){r=s;break}}}if(!defined(r))return BoundingSphereState$1.FAILED;var l=getBoundingSphereArrayScratch$2,c=getBoundingSphereBoundingSphereScratch$2,u=0,d=BoundingSphereState$1.DONE,h=r._visualizers,p=h.length;for(o=0;o<p;o++)if(defined(h[o].getBoundingSphere)){if(d=h[o].getBoundingSphere(e,c),!t&&d===BoundingSphereState$1.PENDING)return BoundingSphereState$1.PENDING;d===BoundingSphereState$1.DONE&&(l[u]=BoundingSphere.clone(c,l[u]),u++)}return 0===u?BoundingSphereState$1.FAILED:(l.length=u,BoundingSphere.fromBoundingSpheres(l,i),BoundingSphereState$1.DONE)},DataSourceDisplay.prototype._onDataSourceAdded=function(e,t){var i=this._scene,r=this._primitives,n=this._groundPrimitives;r=r.add(new PrimitiveCollection),n=n.add(new OrderedGroundPrimitiveCollection);t._primitives=r,t._groundPrimitives=n,(n=t.clustering)._initialize(i),r.add(n),t._visualizers=this._visualizersCallback(i,n,t)},DataSourceDisplay.prototype._onDataSourceRemoved=function(e,t){var i=this._primitives,r=this._groundPrimitives,n=t._primitives,a=t._groundPrimitives,o=t.clustering;n.remove(o);for(var s=t._visualizers,l=s.length,c=0;c<l;c++)s[c].destroy();i.remove(n),r.remove(a),t._visualizers=void 0},DataSourceDisplay.prototype._onDataSourceMoved=function(e,t,i){var r=this._primitives,n=this._groundPrimitives,a=e._primitives;e=e._groundPrimitives;t===i+1?(r.raise(a),n.raise(e)):t===i-1?(r.lower(a),n.lower(e)):0===t?(r.lowerToBottom(a),n.lowerToBottom(e),r.raise(a),n.raise(e)):(r.raiseToTop(a),n.raiseToTop(e))};var updateTransformMatrix3Scratch1=new Matrix3,updateTransformMatrix3Scratch2=new Matrix3,updateTransformMatrix3Scratch3=new Matrix3,updateTransformMatrix4Scratch=new Matrix4,updateTransformCartesian3Scratch1=new Cartesian3,updateTransformCartesian3Scratch2=new Cartesian3,updateTransformCartesian3Scratch3=new Cartesian3,updateTransformCartesian3Scratch4=new Cartesian3,updateTransformCartesian3Scratch5=new Cartesian3,updateTransformCartesian3Scratch6=new Cartesian3,deltaTime=new JulianDate,northUpAxisFactor=1.25;function updateTransform(e,t,i,r,n,a,o){var s,l,c,u,d,h,p,f,m,g,y,_,v=e.scene.mode,C=n.getValue(a,e._lastCartesian);defined(C)&&(l=s=!1,v===SceneMode$1.SCENE3D&&(JulianDate.addSeconds(a,.001,deltaTime),defined(h=n.getValue(deltaTime,updateTransformCartesian3Scratch1))||(JulianDate.addSeconds(a,-.001,deltaTime),h=n.getValue(deltaTime,updateTransformCartesian3Scratch1),l=!0),defined(h)&&(p=Transforms.computeFixedToIcrfMatrix(a,updateTransformMatrix3Scratch1),f=Transforms.computeFixedToIcrfMatrix(deltaTime,updateTransformMatrix3Scratch2),defined(p)&&defined(f)?_=Matrix3.transpose(p,updateTransformMatrix3Scratch3):(_=Transforms.computeTemeToPseudoFixedMatrix(a,updateTransformMatrix3Scratch3),p=Matrix3.transpose(_,updateTransformMatrix3Scratch1),f=Transforms.computeTemeToPseudoFixedMatrix(deltaTime,updateTransformMatrix3Scratch2),Matrix3.transpose(f,f)),n=Matrix3.multiplyByVector(p,C,updateTransformCartesian3Scratch5),a=Matrix3.multiplyByVector(f,h,updateTransformCartesian3Scratch6),Cartesian3.subtract(n,a,updateTransformCartesian3Scratch4),p=1e3*Cartesian3.magnitude(updateTransformCartesian3Scratch4),(f=-(f=CesiumMath.GRAVITATIONALPARAMETER)/(p*p-2*f/Cartesian3.magnitude(n)))<0||f>northUpAxisFactor*o.maximumRadius?(c=updateTransformCartesian3Scratch2,Cartesian3.normalize(C,c),Cartesian3.negate(c,c),d=Cartesian3.clone(Cartesian3.UNIT_Z,updateTransformCartesian3Scratch3),u=Cartesian3.cross(d,c,updateTransformCartesian3Scratch1),Cartesian3.magnitude(u)>CesiumMath.EPSILON7&&(Cartesian3.normalize(c,c),Cartesian3.normalize(u,u),d=Cartesian3.cross(c,u,updateTransformCartesian3Scratch3),Cartesian3.normalize(d,d),s=!0)):Cartesian3.equalsEpsilon(C,h,CesiumMath.EPSILON7)||(d=updateTransformCartesian3Scratch2,Cartesian3.normalize(n,d),Cartesian3.normalize(a,a),u=Cartesian3.cross(d,a,updateTransformCartesian3Scratch3),l&&(u=Cartesian3.multiplyByScalar(u,-1,u)),Cartesian3.equalsEpsilon(u,Cartesian3.ZERO,CesiumMath.EPSILON7)||(c=Cartesian3.cross(u,d,updateTransformCartesian3Scratch1),Matrix3.multiplyByVector(_,c,c),Matrix3.multiplyByVector(_,u,u),Matrix3.multiplyByVector(_,d,d),Cartesian3.normalize(c,c),Cartesian3.normalize(u,u),Cartesian3.normalize(d,d),s=!0)))),defined(e.boundingSphere)&&(C=e.boundingSphere.center),r&&(m=Cartesian3.clone(t.position,updateTransformCartesian3Scratch4),g=Cartesian3.clone(t.direction,updateTransformCartesian3Scratch5),y=Cartesian3.clone(t.up,updateTransformCartesian3Scratch6)),_=updateTransformMatrix4Scratch,s?(_[0]=c.x,_[1]=c.y,_[2]=c.z,_[3]=0,_[4]=u.x,_[5]=u.y,_[6]=u.z,_[7]=0,_[8]=d.x,_[9]=d.y,_[10]=d.z,_[11]=0,_[12]=C.x,_[13]=C.y,_[14]=C.z,_[15]=0):Transforms.eastNorthUpToFixedFrame(C,o,_),t._setTransform(_),r&&(Cartesian3.clone(m,t.position),Cartesian3.clone(g,t.direction),Cartesian3.clone(y,t.up),Cartesian3.cross(g,y,t.right))),i&&(e=v===SceneMode$1.SCENE2D||Cartesian3.equals(e._offset3D,Cartesian3.ZERO)?void 0:e._offset3D,t.lookAtTransform(t.transform,e))}function EntityView(e,t,i){this.entity=e,this.scene=t,this.ellipsoid=defaultValue(i,Ellipsoid.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new Cartesian3,this._defaultOffset3D=void 0,this._offset3D=new Cartesian3}Object.defineProperties(EntityView,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=Cartesian3.clone(e,new Cartesian3)}}}),EntityView.defaultOffset3D=new Cartesian3(-14e3,3500,3500);var scratchHeadingPitchRange=new HeadingPitchRange,scratchCartesian$7=new Cartesian3;EntityView.prototype.update=function(e,t){var i,r,n,a,o,s,l,c,u=this.scene,d=this.ellipsoid,h=u.mode;h===SceneMode$1.MORPHING||defined(r=(i=this.entity).position)&&(c=i!==this._lastEntity,n=h!==this._mode,a=u.camera,o=c||n,s=!0,c?!(u=defined(l=i.viewFrom))&&defined(t)?(scratchHeadingPitchRange.pitch=-CesiumMath.PI_OVER_FOUR,scratchHeadingPitchRange.range=0,defined(c=r.getValue(e,scratchCartesian$7))&&(c=2-1/Math.max(1,Cartesian3.magnitude(c)/d.maximumRadius),scratchHeadingPitchRange.pitch*=c),a.viewBoundingSphere(t,scratchHeadingPitchRange),this.boundingSphere=t,s=o=!1):u&&defined(l.getValue(e,this._offset3D))||Cartesian3.clone(EntityView._defaultOffset3D,this._offset3D):n||this._mode===SceneMode$1.SCENE2D||Cartesian3.clone(a.position,this._offset3D),this._lastEntity=i,this._mode=h,updateTransform(this,a,o,s,r,e,d))};var tmp$3={},GHg,HHg;GHg=tmp$3,HHg=function(e){function t(e){return e}function i(e){var t,i=n(e.transform),r=1/0,a=r,o=-r,s=-r;function l(e){(e=i(e))[0]<r&&(r=e[0]),e[0]>o&&(o=e[0]),e[1]<a&&(a=e[1]),e[1]>s&&(s=e[1])}function c(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,n=-1,l=e.length;++n<l;)(t=i(e[n],n))[0]<r&&(r=t[0]),t[0]>o&&(o=t[0]),t[1]<a&&(a=t[1]),t[1]>s&&(s=t[1])})),e.objects)c(e.objects[t]);return[r,a,o,s]}function r(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return o(e,t)}))}:o(e,t)}var n=function(e){if(null==e)return t;var i,r,n=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,t){t||(i=r=0);var l=2,c=e.length,u=new Array(c);for(u[0]=(i+=e[0])*n+o,u[1]=(r+=e[1])*a+s;l<c;)u[l]=e[l],++l;return u}},a=function(e,t){for(var i,r=e.length,n=r-t;n<--r;)i=e[n],e[n++]=e[r],e[r]=i};function o(e,t){var i=t.id,r=t.bbox,n=null==t.properties?{}:t.properties;t=s(e,t);return null==i&&null==r?{type:"Feature",properties:n,geometry:t}:null==r?{type:"Feature",id:i,properties:n,geometry:t}:{type:"Feature",id:i,bbox:r,properties:n,geometry:t}}function s(e,t){var i=n(e.transform),r=e.arcs;function o(e){return i(e)}function s(e){for(var t=[],n=0,o=e.length;n<o;++n)!function(e,t){t.length&&t.pop();for(var n=r[e<0?~e:e],o=0,s=n.length;o<s;++o)t.push(i(n[o],o));e<0&&a(t,s)}(e[n],t);return t.length<2&&t.push(t[0]),t}function l(e){for(var t=s(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(l)}return function e(t){var i,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(e)};case"Point":i=o(t.coordinates);break;case"MultiPoint":i=t.coordinates.map(o);break;case"LineString":i=s(t.arcs);break;case"MultiLineString":i=t.arcs.map(s);break;case"Polygon":i=c(t.arcs);break;case"MultiPolygon":i=t.arcs.map(c);break;default:return null}return{type:r,coordinates:i}}(t)}function l(e,t){var i={},r={},n={},a=[],o=-1;function s(e,t){for(var r in e){var n=e[r];delete t[n.start],delete n.start,delete n.end,n.forEach((function(e){i[e<0?~e:e]=1})),a.push(n)}}return t.forEach((function(i,r){var n=e.arcs[i<0?~i:i];n.length<3&&!n[1][0]&&!n[1][1]&&(n=t[++o],t[o]=i,t[r]=n)})),t.forEach((function(t){var i,a,o=function(t){var i,r=e.arcs[t<0?~t:t],n=r[0];return e.transform?(i=[0,0],r.forEach((function(e){i[0]+=e[0],i[1]+=e[1]}))):i=r[r.length-1],t<0?[i,n]:[n,i]}(t),s=o[0],l=o[1];(o=n[s])?(delete n[o.end],o.push(t),o.end=l,(i=r[l])?(delete r[i.start],a=i===o?o:o.concat(i),r[a.start=o.start]=n[a.end=i.end]=a):r[o.start]=n[o.end]=o):(o=r[l])?(delete r[o.start],o.unshift(t),o.start=s,(i=n[s])?(delete n[i.end],a=i===o?o:i.concat(o),r[a.start=i.start]=n[a.end=o.end]=a):r[o.start]=n[o.end]=o):r[(o=[t]).start=s]=n[o.end=l]=o})),s(n,r),s(r,n),t.forEach((function(e){i[e<0?~e:e]||a.push([e])})),a}function c(e,t,i){var r,n,a,o,s,c,u;if(1<arguments.length)o=i,c=[],u=[],function e(t){switch(s=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":h(t.arcs);break;case"MultiLineString":case"Polygon":p(t.arcs);break;case"MultiPolygon":t.arcs.forEach(p)}}(t),u.forEach(null==o?function(e){c.push(e[0].i)}:function(e){o(e[0].g,e[e.length-1].g)&&c.push(e[0].i)}),r=c;else for(n=0,r=new Array(a=e.arcs.length);n<a;++n)r[n]=n;function d(e){var t=e<0?~e:e;(u[t]||(u[t]=[])).push({i:e,g:s})}function h(e){e.forEach(d)}function p(e){e.forEach(h)}return{type:"MultiLineString",arcs:l(e,r)}}function u(e,t){var i={},r=[],n=[];function a(e){e.forEach((function(t){t.forEach((function(t){(i[t=t<0?~t:t]||(i[t]=[])).push(e)}))})),r.push(e)}function o(t){return function(e){for(var t,i=-1,r=e.length,n=e[r-1],a=0;++i<r;)t=n,n=e[i],a+=t[0]*n[1]-t[1]*n[0];return Math.abs(a)}(s(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":a(t.arcs);break;case"MultiPolygon":t.arcs.forEach(a)}})),r.forEach((function(e){if(!e._){var t=[],r=[e];for(e._=1,n.push(t);e=r.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].forEach((function(e){e._||(e._=1,r.push(e))}))}))}))}})),r.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:n.map((function(t){var r,n=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].length<2&&n.push(e)}))}))})),1<(r=(n=l(e,n)).length))for(var a,s,c=1,u=o(n[0]);c<r;++c)(a=o(n[c]))>u&&(s=n[0],n[0]=n[c],n[c]=s,u=a);return n}))}}function d(e,t){for(var i=0,r=e.length;i<r;){var n=i+r>>>1;e[n]<t?i=1+n:r=n}return i}function h(e){if(null==e)return t;var i,r,n=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,t){t||(i=r=0);var l=2,c=e.length,u=new Array(c),d=Math.round((e[0]-o)/n);t=Math.round((e[1]-s)/a);for(u[0]=d-i,i=d,u[1]=t-r,r=t;l<c;)u[l]=e[l],++l;return u}}function p(e,t,i,r,n,a){3===arguments.length&&(r=a=Array,n=null);for(var o=new r(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new a(e),l=e-1,c=0;c<e;++c)o[c]=n;return{set:function(r,a){for(var c=t(r)&l,u=o[c],d=0;u!=n;){if(i(u,r))return s[c]=a;if(++d>=e)throw new Error("full hashmap");u=o[c=c+1&l]}return o[c]=r,s[c]=a},maybeSet:function(r,a){for(var c=t(r)&l,u=o[c],d=0;u!=n;){if(i(u,r))return s[c];if(++d>=e)throw new Error("full hashmap");u=o[c=c+1&l]}return o[c]=r,s[c]=a},get:function(r,a){for(var c=t(r)&l,u=o[c],d=0;u!=n;){if(i(u,r))return s[c];if(++d>=e)break;u=o[c=c+1&l]}return a},keys:function(){for(var e=[],t=0,i=o.length;t<i;++t){var r=o[t];r!=n&&e.push(r)}return e}}}function f(e,t){return e[0]===t[0]&&e[1]===t[1]}function m(e){var t=_[0]^_[1];return 2147483647&(t<<5^t>>7^_[2]^_[3])}function g(e){for(var t=e.coordinates,i=e.lines,r=e.rings,n=function(){for(var e=p(1.4*t.length,T,E,Int32Array,-1,Int32Array),i=new Int32Array(t.length),r=0,n=t.length;r<n;++r)i[r]=e.maybeSet(r,r);return i}(),a=new Int32Array(t.length),o=new Int32Array(t.length),s=new Int32Array(t.length),l=new Int8Array(t.length),c=0,u=0,d=t.length;u<d;++u)a[u]=o[u]=s[u]=-1;for(u=0,d=i.length;u<d;++u){var h=i[u],g=h[0],y=h[1],_=n[g],v=n[++g];for(++c,l[_]=1;++g<=y;)S(u,_,_=v,v=n[g]);++c,l[v]=1}for(u=0,d=t.length;u<d;++u)a[u]=-1;for(u=0,d=r.length;u<d;++u){var C=r[u],x=C[0]+1,b=C[1];for(S(u,n[b-1],_=n[x-1],v=n[x]);++x<=b;)S(u,_,_=v,v=n[x])}function S(e,t,i,r){var n;a[i]!==e&&(a[i]=e,0<=(n=o[i])?(e=s[i],n===t&&e===r||n===r&&e===t||(++c,l[i]=1)):(o[i]=t,s[i]=r))}function T(e){return m(t[e])}function E(e,i){return f(t[e],t[i])}a=o=s=null;var w,A=function(e,t,i,r,n){3===arguments.length&&(r=Array,n=null);for(var a=new r(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),o=e-1,s=0;s<e;++s)a[s]=n;return{add:function(r){for(var s=t(r)&o,l=a[s],c=0;l!=n;){if(i(l,r))return!0;if(++c>=e)throw new Error("full hashset");l=a[s=s+1&o]}return a[s]=r,!0},has:function(r){for(var s=t(r)&o,l=a[s],c=0;l!=n;){if(i(l,r))return!0;if(++c>=e)break;l=a[s=s+1&o]}return!1},values:function(){for(var e=[],t=0,i=a.length;t<i;++t){var r=a[t];r!=n&&e.push(r)}return e}}}(1.4*c,m,f);for(u=0,d=t.length;u<d;++u)l[w=n[u]]&&A.add(t[w]);return A}var y=new ArrayBuffer(16),_=new Uint32Array(y);function v(e,t,i){for(var r,n=t+(i---t>>1);t<n;++t,--i)r=e[t],e[t]=e[i],e[i]=r}function C(e){var t,i,r={};for(t in e)r[t]=null==(i=e[t])?{type:null}:("FeatureCollection"===i.type?function(e){var t={type:"GeometryCollection",geometries:e.features.map(x)};return null!=e.bbox&&(t.bbox=e.bbox),t}:"Feature"===i.type?x:b)(i);return r}function x(e){var t,i=b(e.geometry);for(t in null!=e.id&&(i.id=e.id),null!=e.bbox&&(i.bbox=e.bbox),e.properties){i.properties=e.properties;break}return i}function b(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(b)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}function S(e){var t=e[0],i=e[1];return i<t&&(e=t,t=i,i=e),t+31*i}function T(e,t){var i,r=e[0],n=e[1];e=t[0];return n<r&&(i=r,r=n,n=i),(t=t[1])<e&&(i=e,e=t,t=i),r===e&&n===t}function E(){return!0}function w(e){return e}function A(e){return null!=e.type}function P(e){var t,i=new Array(e.arcs.length),r=0;function n(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(n);break;case"Polygon":a(e.arcs);break;case"MultiPolygon":e.arcs.forEach(a)}}function a(e){for(var t=0,n=e.length;t<n;++t,++r)for(var a=e[t],o=0,s=a.length;o<s;++o){var l=a[o];l<0&&(l=~l);var c=i[l];null==c?i[l]=r:c!==r&&(i[l]=-1)}}for(t in e.objects)n(e.objects[t]);return function(e){for(var t,r=0,n=e.length;r<n;++r)if(-1===i[(t=e[r])<0?~t:t])return!0;return!1}}function D(e){var t=e[0],i=e[1];e=e[2];return Math.abs((t[0]-e[0])*(i[1]-t[1])-(t[0]-i[0])*(e[1]-t[1]))/2}function M(e){for(var t,i=-1,r=e.length,n=e[r-1],a=0;++i<r;)t=n,n=e[i],a+=t[0]*n[1]-t[1]*n[0];return Math.abs(a)/2}function I(e,t,i){return t=null==t?Number.MIN_VALUE:+t,null==i&&(i=M),function(n,a){return i(r(e,{type:"Polygon",arcs:[n]}).geometry.coordinates[0],a)>=t}}function R(e,t){return e[1][2]-t[1][2]}function O(e){return[e[0],e[1],0]}function L(e,t){return t-e}var N=2*(y=Math.PI),F=y/4,B=y/180,V=Math.abs,k=Math.atan2,z=Math.cos,G=Math.sin;function U(e,t){for(var i=0,r=e.length,n=0,a=e[t?i++:r-1],o=a[0]*B,s=a[1]*B/2+F,l=z(s),c=G(s);i<r;++i){h=o,o=(a=e[i])[0]*B,s=a[1]*B/2+F;var u,d=0<=(u=o-h)?1:-1,h=d*u,p=(p=l)*(l=z(s))+(u=c*(c=G(s)))*z(h);h=u*d*G(h);n+=k(h,p)}return n}e.bbox=i,e.feature=r,e.mesh=function(e){return s(e,c.apply(this,arguments))},e.meshArcs=c,e.merge=function(e){return s(e,u.apply(this,arguments))},e.mergeArcs=u,e.neighbors=function(e){var t={},i=e.map((function(){return[]}));function r(e,i){e.forEach((function(e){e<0&&(e=~e);var r=t[e];r?r.push(i):t[e]=[i]}))}function n(e,t){e.forEach((function(e){r(e,t)}))}var a,o={LineString:r,MultiLineString:n,Polygon:n,MultiPolygon:function(e,t){e.forEach((function(e){n(e,t)}))}};for(a in e.forEach((function e(t,i){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,i)})):t.type in o&&o[t.type](t.arcs,i)})),t)for(var s=t[a],l=s.length,c=0;c<l;++c)for(var u=c+1;u<l;++u){var h,p=s[c],f=s[u];(h=i[p])[a=d(h,f)]!==f&&h.splice(a,0,f),(h=i[f])[a=d(h,p)]!==p&&h.splice(a,0,p)}return i},e.quantize=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)l=e.bbox;else{if(!(2<=(r=Math.floor(t))))throw new Error("n must be ≥2");var r,n=(l=e.bbox||i(e))[0],a=l[1],o=l[2],s=l[3];t={scale:[o-n?(o-n)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[n,a]}}var l,c,u=h(t),d=e.objects,p={};function f(e){return u(e)}function m(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(m)};break;case"Point":t={type:"Point",coordinates:f(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(f)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(c in d)p[c]=m(d[c]);return{type:"Topology",bbox:l,transform:t,objects:p,arcs:e.arcs.map((function(e){var t,i=0,r=1,n=e.length,a=new Array(n);for(a[0]=u(e[0],0);++i<n;)((t=u(e[i],i))[0]||t[1])&&(a[r++]=t);return 1===r&&(a[r++]=[0,0]),a.length=r,a}))}},e.transform=n,e.untransform=h,e.topology=function(e,t){var i=function(e){var t=1/0,i=1/0,r=-1/0,n=-1/0;function a(e){null!=e&&s.hasOwnProperty(e.type)&&s[e.type](e)}var o,s={GeometryCollection:function(e){e.geometries.forEach(a)},Point:function(e){l(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(l)},LineString:function(e){c(e.arcs)},MultiLineString:function(e){e.arcs.forEach(c)},Polygon:function(e){e.arcs.forEach(c)},MultiPolygon:function(e){e.arcs.forEach(u)}};function l(e){var a=e[0];e=e[1];a<t&&(t=a),r<a&&(r=a),e<i&&(i=e),n<e&&(n=e)}function c(e){e.forEach(l)}function u(e){e.forEach(c)}for(o in e)a(e[o]);return t<=r&&i<=n?[t,i,r,n]:void 0}(e=C(e)),r=0<t&&i&&function(e,t,i){var r=t[0],n=t[1],a=t[2],o=(t=t[3],a-r?(i-1)/(a-r):1),s=t-n?(i-1)/(t-n):1;function l(e){return[Math.round((e[0]-r)*o),Math.round((e[1]-n)*s)]}function c(e,t){for(var i,a,l,c,u=-1,d=0,h=e.length,p=new Array(h);++u<h;)c=e[u],l=Math.round((c[0]-r)*o),c=Math.round((c[1]-n)*s),l===i&&c===a||(p[d++]=[i=l,a=c]);for(p.length=d;d<t;)d=p.push([p[0][0],p[0][1]]);return p}function u(e){return c(e,2)}function d(e){return c(e,4)}function h(e){return e.map(d)}function p(e){null!=e&&m.hasOwnProperty(e.type)&&m[e.type](e)}var f,m={GeometryCollection:function(e){e.geometries.forEach(p)},Point:function(e){e.coordinates=l(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(l)},LineString:function(e){e.arcs=u(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(u)},Polygon:function(e){e.arcs=h(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(h)}};for(f in e)p(e[f]);return{scale:[1/o,1/s],translate:[r,n]}}(e,i,t),n=(t=function(e){var t,i,r=e.coordinates,n=e.lines,a=e.rings,o=n.length+a.length;for(delete e.lines,delete e.rings,c=0,u=n.length;c<u;++c)for(t=n[c];t=t.next;)++o;for(c=0,u=a.length;c<u;++c)for(i=a[c];i=i.next;)++o;for(var s=p(2*o*1.4,m,f),l=e.arcs=[],c=0,u=n.length;c<u;++c)for(t=n[c];d(t),t=t.next;);for(c=0,u=a.length;c<u;++c)if((i=a[c]).next)for(;d(i),i=i.next;);else!function(e){var t,i,n,a,o;if(i=s.get(r[e[0]]))for(a=0,o=i.length;a<o;++a){if(h(n=i[a],e))return e[0]=n[0],e[1]=n[1];if(g(n,e))return e[0]=n[1],e[1]=n[0]}if(i=s.get(t=r[e[0]+y(e)]))for(a=0,o=i.length;a<o;++a){if(h(n=i[a],e))return e[0]=n[0],e[1]=n[1];if(g(n,e))return e[0]=n[1],e[1]=n[0]}i?i.push(e):s.set(t,[e]),l.push(e)}(i);function d(e){var t,i,n,a,o,c,u,d;if(n=s.get(t=r[e[0]]))for(u=0,d=n.length;u<d;++u)if(function(e,t){var i=e[0],n=t[0],a=e[1];if(i-a!=n-(t=t[1]))return!1;for(;i<=a;++i,++n)if(!f(r[i],r[n]))return!1;return!0}(a=n[u],e))return e[0]=a[0],void(e[1]=a[1]);if(o=s.get(i=r[e[1]]))for(u=0,d=o.length;u<d;++u)if(function(e,t){var i=e[0],n=t[0],a=e[1],o=t[1];if(i-a!=n-o)return!1;for(;i<=a;++i,--o)if(!f(r[i],r[o]))return!1;return!0}(c=o[u],e))return e[1]=c[0],void(e[0]=c[1]);n?n.push(e):s.set(t,[e]),o?o.push(e):s.set(i,[e]),l.push(e)}function h(e,t){var i=e[0],n=t[0],a=e[1]-i;if(a==t[1]-n){for(var o=y(e),s=y(t),l=0;l<a;++l)if(!f(r[i+(l+o)%a],r[n+(l+s)%a]))return;return 1}}function g(e,t){var i=e[0],n=t[0],a=e[1],o=t[1],s=a-i;if(s==o-n){for(var l=y(e),c=s-y(t),u=0;u<s;++u)if(!f(r[i+(u+l)%s],r[o-(u+c)%s]))return;return 1}}function y(e){for(var t=e[0],i=e[1],n=t,a=n,o=r[n];++n<i;){var s=r[n];(s[0]<o[0]||s[0]===o[0]&&s[1]<o[1])&&(a=n,o=s)}return a-t}return e}(function(e){for(var t,i,r,n,a,o=g(e),s=e.coordinates,l=e.lines,c=e.rings,u=0,d=l.length;u<d;++u)for(var h=l[u],p=h[0],f=h[1];++p<f;)o.has(s[p])&&(t={0:p,1:h[1]},h[1]=p,h=h.next=t);for(u=0,d=c.length;u<d;++u)for(var m=c[u],y=m[0],_=y,C=m[1],x=o.has(s[y]);++_<C;)o.has(s[_])&&(x?(t={0:_,1:m[1]},m[1]=_,m=m.next=t):(a=(n=C)-_,v(i=s,r=y,n),v(i,r,r+a),v(i,r+a,n),s[C]=s[y],x=!0,_=y));return e}(function(e){var t=-1,i=[],r=[],n=[];function a(e){e&&s.hasOwnProperty(e.type)&&s[e.type](e)}var o,s={GeometryCollection:function(e){e.geometries.forEach(a)},LineString:function(e){e.arcs=l(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(l)},Polygon:function(e){e.arcs=e.arcs.map(c)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function l(e){for(var r=0,a=e.length;r<a;++r)n[++t]=e[r];var o={0:t-a+1,1:t};return i.push(o),o}function c(e){for(var i=0,a=e.length;i<a;++i)n[++t]=e[i];var o={0:t-a+1,1:t};return r.push(o),o}function u(e){return e.map(c)}for(o in e)a(e[o]);return{type:"Topology",coordinates:n,lines:i,rings:r,objects:e}}(e)))).coordinates,a=p(1.4*t.arcs.length,S,T);function o(e){e&&l.hasOwnProperty(e.type)&&l[e.type](e)}e=t.objects,t.bbox=i,t.arcs=t.arcs.map((function(e,t){return a.set(e,t),n.slice(e[0],e[1]+1)})),delete t.coordinates,n=null;var s,l={GeometryCollection:function(e){e.geometries.forEach(o)},LineString:function(e){e.arcs=c(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(c)},Polygon:function(e){e.arcs=e.arcs.map(c)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function c(e){var t=[];do{var i=a.get(e);t.push(e[0]<e[1]?i:~i)}while(e=e.next);return t}function u(e){return e.map(c)}for(s in e)o(e[s]);return r&&(t.transform=r,t.arcs=function(e){for(var t=-1,i=e.length;++t<i;){for(var r,n,a=e[t],o=0,s=1,l=a.length,c=a[0],u=c[0],d=c[1];++o<l;)r=(c=a[o])[0],n=c[1],r===u&&n===d||(a[s++]=[r-u,n-d],u=r,d=n);1===s&&(a[s++]=[0,0]),a.length=s}return e}(t.arcs)),t},e.filter=function(e,t){var i,r=e.objects,n={};function a(e){var t,i;switch(e.type){case"Polygon":t=(i=o(e.arcs))?{type:"Polygon",arcs:i}:{type:null};break;case"MultiPolygon":t=(i=e.arcs.map(o).filter(w)).length?{type:"MultiPolygon",arcs:i}:{type:null};break;case"GeometryCollection":t=(i=e.geometries.map(a).filter(A)).length?{type:"GeometryCollection",geometries:i}:{type:null};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function o(e){return e.length&&(i=e[0],t(i,!1))?[e[0]].concat(e.slice(1).filter(s)):null;var i}function s(e){return t(e,!0)}for(i in null==t&&(t=E),r)n[i]=a(r[i]);return function(e){var t,i,r=e.objects,n={},a=e.arcs,o=a.length,s=-1,l=new Array(o),c=0,u=-1;function d(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(d);break;case"LineString":p(e.arcs);break;case"MultiLineString":case"Polygon":e.arcs.forEach(p);break;case"MultiPolygon":e.arcs.forEach(f)}}function h(e){e<0&&(e=~e),l[e]||(l[e]=1,++c)}function p(e){e.forEach(h)}function f(e){e.forEach(p)}function m(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(m)};break;case"LineString":t={type:"LineString",arcs:y(e.arcs)};break;case"MultiLineString":t={type:"MultiLineString",arcs:e.arcs.map(y)};break;case"Polygon":t={type:"Polygon",arcs:e.arcs.map(y)};break;case"MultiPolygon":t={type:"MultiPolygon",arcs:e.arcs.map(_)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function g(e){return e<0?~l[~e]:l[e]}function y(e){return e.map(g)}function _(e){return e.map(y)}for(i in r)d(r[i]);for(t=new Array(c);++s<o;)l[s]&&(l[s]=++u,t[u]=a[s]);for(i in r)n[i]=m(r[i]);return{type:"Topology",bbox:e.bbox,transform:e.transform,objects:n,arcs:t}}({type:"Topology",bbox:e.bbox,transform:e.transform,objects:n,arcs:e.arcs})},e.filterAttached=P,e.filterAttachedWeight=function(e,t,i){var r=P(e),n=I(e,t,i);return function(e,t){return r(e,t)||n(e,t)}},e.filterWeight=I,e.planarRingArea=M,e.planarTriangleArea=D,e.presimplify=function(e,t){var i,r,a=e.transform?n(e.transform):O,o=(i=[],r=0,(c={}).push=function(e){return s(i[e._=r]=e,r++),r},c.pop=function(){if(!(r<=0)){var e,t=i[0];return 0<--r&&(e=i[r],l(i[e._=0]=e,0)),t}},c.remove=function(e){var t,n=e._;if(i[n]===e)return n!==--r&&(R(t=i[r],e)<0?s:l)(i[t._=n]=t,n),n},c);function s(e,t){for(;0<t;){var r=(t+1>>1)-1,n=i[r];if(0<=R(e,n))break;i[n._=t]=n,i[e._=t=r]=e}}function l(e,t){for(;;){var n=t+1<<1,a=n-1,o=t,s=i[o];if(a<r&&R(i[a],s)<0&&(s=i[o=a]),n<r&&R(i[n],s)<0&&(s=i[o=n]),o===t)break;i[s._=t]=s,i[e._=t=o]=e}}null==t&&(t=D);var c=e.arcs.map((function(e){for(var i,r=[],n=0,s=1,l=(e=e.map(a)).length-1;s<l;++s)(i=[e[s-1],e[s],e[s+1]])[1][2]=t(i),r.push(i),o.push(i);for(e[0][2]=e[l][2]=1/0,s=0,l=r.length;s<l;++s)(i=r[s]).previous=r[s-1],i.next=r[s+1];for(;i=o.pop();){var c=i.previous,d=i.next;i[1][2]<n?i[1][2]=n:n=i[1][2],c&&(c.next=d,c[2]=i[2],u(c)),d&&(d.previous=c,d[0]=i[0],u(d))}return e}));function u(e){o.remove(e),e[1][2]=t(e),o.push(e)}return{type:"Topology",bbox:e.bbox,objects:e.objects,arcs:c}},e.quantile=function(e,t){var i=[];return e.arcs.forEach((function(e){e.forEach((function(e){isFinite(e[2])&&i.push(e[2])}))})),i.length&&function(e,t){if(r=e.length){if((t=+t)<=0||r<2)return e[0];if(1<=t)return e[r-1];var i=(r-1)*t,r=Math.floor(i);return(t=e[r])+((e=e[r+1])-t)*(i-r)}}(i.sort(L),t)},e.simplify=function(e,t){t=null==t?Number.MIN_VALUE:+t;var i=e.arcs.map((function(e){for(var i,r=-1,n=0,a=e.length,o=new Array(a);++r<a;)(i=e[r])[2]>=t&&(o[n++]=[i[0],i[1]]);return o.length=n,o}));return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:i}},e.sphericalRingArea=function(e,t){return e=U(e,!0),t&&(e*=-1),2*(e<0?N+e:e)},e.sphericalTriangleArea=function(e){return 2*V(U(e,!1))},Object.defineProperty(e,"__esModule",{value:!0})},HHg("object"==typeof exports&&void 0!==module?exports:GHg.topojson=GHg.topojson||{});var topojson=tmp$3.topojson;function defaultCrsFunction(e){return Cartesian3.fromDegrees(e[0],e[1],e[2])}var crsNames={"urn:ogc:def:crs:OGC:1.3:CRS84":defaultCrsFunction,"EPSG:4326":defaultCrsFunction,"urn:ogc:def:crs:EPSG::4326":defaultCrsFunction},crsLinkHrefs={},crsLinkTypes={},defaultMarkerSize=48,defaultMarkerSymbol,defaultMarkerColor=Color.ROYALBLUE,defaultStroke=Color.YELLOW,defaultStrokeWidth=2,defaultFill$1=Color.fromBytes(255,255,0,100),defaultClampToGround=!1,sizes={small:24,medium:48,large:64},simpleStyleIdentifiers=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function defaultDescribe(e,t){var i,r,n="";for(i in e)!e.hasOwnProperty(i)||i===t||-1!==simpleStyleIdentifiers.indexOf(i)||defined(r=e[i])&&(n+="object"==typeof r?"<tr><th>"+i+"</th><td>"+defaultDescribe(r)+"</td></tr>":"<tr><th>"+i+"</th><td>"+r+"</td></tr>");return 0<n.length&&(n='<table class="cesium-infoBox-defaultTable"><tbody>'+n+"</tbody></table>"),n}function createDescriptionCallback(e,t,i){var r;return function(n,a){return defined(r)||(r=e(t,i)),r}}function defaultDescribeProperty(e,t){return new CallbackProperty(createDescriptionCallback(defaultDescribe,e,t),!0)}function createObject(e,t,i){var r=e.id;if(defined(r)&&"Feature"===e.type){for(var n=2,a=r;defined(t.getById(a));)a=r+"_"+n,n++;r=a}else r=createGuid();var o=t.getOrCreateEntity(r),s=e.properties;if(defined(s)){var l;if(defined(e=(o.properties=s).title))o.name=e,l="title";else{var c,u=Number.MAX_VALUE;for(c in s)if(s.hasOwnProperty(c)&&s[c]){var d=c.toLowerCase();if(1<u&&"title"===d){u=1,l=c;break}2<u&&"name"===d?(u=2,l=c):3<u&&/title/i.test(c)?(u=3,l=c):4<u&&/name/i.test(c)&&(u=4,l=c)}defined(l)&&(o.name=s[l])}null!==(e=s.description)&&(o.description=defined(e)?new ConstantProperty(e):i(s,l))}return o}function coordinatesArrayToCartesianArray(e,t){for(var i=new Array(e.length),r=0;r<e.length;r++)i[r]=t(e[r]);return i}var geoJsonObjectTypes={Feature:processFeature,FeatureCollection:processFeatureCollection,GeometryCollection:processGeometryCollection,LineString:processLineString,MultiLineString:processMultiLineString,MultiPoint:processMultiPoint,MultiPolygon:processMultiPolygon,Point:processPoint$1,Polygon:processPolygon$1,Topology:processTopology},geometryTypes={GeometryCollection:processGeometryCollection,LineString:processLineString,MultiLineString:processMultiLineString,MultiPoint:processMultiPoint,MultiPolygon:processMultiPolygon,Point:processPoint$1,Polygon:processPolygon$1,Topology:processTopology};function processFeature(e,t,i,r,n){if(null!==t.geometry){if(!defined(t.geometry))throw new RuntimeError("feature.geometry is required.");var a=t.geometry.type,o=geometryTypes[a];if(!defined(o))throw new RuntimeError("Unknown geometry type: "+a);o(e,t,t.geometry,r,n)}else createObject(t,e._entityCollection,n.describe)}function processFeatureCollection(e,t,i,r,n){for(var a=t.features,o=0,s=a.length;o<s;o++)processFeature(e,a[o],void 0,r,n)}function processGeometryCollection(e,t,i,r,n){for(var a=i.geometries,o=0,s=a.length;o<s;o++){var l=a[o],c=l.type,u=geometryTypes[c];if(!defined(u))throw new RuntimeError("Unknown geometry type: "+c);u(e,t,l,r,n)}}function createPoint(e,t,i,r,n){var a,o=n.markerSymbol,s=n.markerColor,l=n.markerSize,c=t.properties;defined(c)&&(defined(a=c["marker-color"])&&(s=Color.fromCssColorString(a)),l=defaultValue(sizes[c["marker-size"]],l),defined(c=c["marker-symbol"])&&(o=c)),o=defined(o)?1===o.length?e._pinBuilder.fromText(o.toUpperCase(),s,l):e._pinBuilder.fromMakiIconId(o,s,l):e._pinBuilder.fromColor(s,l);var u=new BillboardGraphics;u.verticalOrigin=new ConstantProperty(VerticalOrigin$1.BOTTOM),2===r.length&&n.clampToGround&&(u.heightReference=HeightReference$1.CLAMP_TO_GROUND),(n=createObject(t,e._entityCollection,n.describe)).billboard=u,n.position=new ConstantPositionProperty(i(r)),o=when(o).then((function(e){u.image=new ConstantProperty(e)})).otherwise((function(){u.image=new ConstantProperty(e._pinBuilder.fromColor(s,l))})),e._promises.push(o)}function processPoint$1(e,t,i,r,n){createPoint(e,t,r,i.coordinates,n)}function processMultiPoint(e,t,i,r,n){for(var a=i.coordinates,o=0;o<a.length;o++)createPoint(e,t,r,a[o],n)}function createLineString(e,t,i,r,n){var a,o,s=n.strokeMaterialProperty,l=n.strokeWidthProperty,c=t.properties;defined(c)&&(defined(o=c["stroke-width"])&&(l=new ConstantProperty(o)),defined(o=c.stroke)&&(a=Color.fromCssColorString(o)),defined(c=c["stroke-opacity"])&&1!==c&&(defined(a)||(a=s.color.clone()),a.alpha=c),defined(a)&&(s=new ColorMaterialProperty(a))),t=createObject(t,e._entityCollection,n.describe),e=new PolylineGraphics,(t.polyline=e).clampToGround=n.clampToGround,e.material=s,e.width=l,e.positions=new ConstantProperty(coordinatesArrayToCartesianArray(r,i)),e.arcType=ArcType$1.RHUMB}function processLineString(e,t,i,r,n){createLineString(e,t,r,i.coordinates,n)}function processMultiLineString(e,t,i,r,n){for(var a=i.coordinates,o=0;o<a.length;o++)createLineString(e,t,r,a[o],n)}function createPolygon(e,t,i,r,n){if(0!==r.length&&0!==r[0].length){var a,o,s=n.strokeMaterialProperty.color,l=n.fillMaterialProperty,c=n.strokeWidthProperty,u=t.properties;defined(u)&&(defined(a=u["stroke-width"])&&(c=new ConstantProperty(a)),defined(a=u.stroke)&&(o=Color.fromCssColorString(a)),defined(a=u["stroke-opacity"])&&1!==a&&(defined(o)||(o=n.strokeMaterialProperty.color.clone()),o.alpha=a),defined(o)&&(s=new ConstantProperty(o)),defined(o=u.fill)&&((d=Color.fromCssColorString(o)).alpha=l.color.alpha),defined(a=u["fill-opacity"])&&a!==l.color.alpha&&(defined(d)||(d=l.color.clone()),d.alpha=a),defined(d)&&(l=new ColorMaterialProperty(d)));var d=new PolygonGraphics;d.outline=new ConstantProperty(!0),d.outlineColor=s,d.outlineWidth=c,d.material=l,d.arcType=ArcType$1.RHUMB;for(var h=[],p=1,f=r.length;p<f;p++)h.push(new PolygonHierarchy(coordinatesArrayToCartesianArray(r[p],i)));l=r[0],d.hierarchy=new ConstantProperty(new PolygonHierarchy(coordinatesArrayToCartesianArray(l,i),h)),2<l[0].length?d.perPositionHeight=new ConstantProperty(!0):n.clampToGround||(d.height=0),createObject(t,e._entityCollection,n.describe).polygon=d}}function processPolygon$1(e,t,i,r,n){createPolygon(e,t,r,i.coordinates,n)}function processMultiPolygon(e,t,i,r,n){for(var a=i.coordinates,o=0;o<a.length;o++)createPolygon(e,t,r,a[o],n)}function processTopology(e,t,i,r,n){for(var a in i.objects){var o;i.objects.hasOwnProperty(a)&&(o=topojson.feature(i,i.objects[a]),(0,geoJsonObjectTypes[o.type])(e,o,o,r,n))}}function GeoJsonDataSource(e){this._name=e,this._changed=new Event,this._error=new Event,this._isLoading=!1,this._loading=new Event,this._entityCollection=new EntityCollection(this),this._promises=[],this._pinBuilder=new PinBuilder,this._entityCluster=new EntityCluster,this._credit=void 0,this._resourceCredits=[]}function load$1(e,t,i,r){defined(r)&&(s=getFilenameFromUri(r)),defined(s)&&e._name!==s&&(e._name=s,e._changed.raiseEvent(e));var n=geoJsonObjectTypes[t.type];if(!defined(n))throw new RuntimeError("Unsupported GeoJSON object type: "+t.type);var a=t.crs,o=null!==a?defaultCrsFunction:null;if(defined(a)){if(!defined(a.properties))throw new RuntimeError("crs.properties is undefined.");if(r=a.properties,"name"===a.type){if(!defined(o=crsNames[r.name]))throw new RuntimeError("Unknown crs name: "+r.name)}else if("link"===a.type){var s=crsLinkHrefs[r.href];if(defined(s)||(s=crsLinkTypes[r.type]),!defined(s))throw new RuntimeError("Unable to resolve crs link: "+JSON.stringify(r));o=s(r)}else{if("EPSG"!==a.type)throw new RuntimeError("Unknown crs type: "+a.type);if(!defined(o=crsNames["EPSG:"+r.code]))throw new RuntimeError("Unknown crs EPSG code: "+r.code)}}return when(o,(function(r){return e._entityCollection.removeAll(),null!==r&&n(e,t,t,r,i),when.all(e._promises,(function(){return e._promises.length=0,DataSource.setLoading(e,!1),e}))}))}function KmlCamera(e,t){this.position=e,this.headingPitchRoll=t}GeoJsonDataSource.load=function(e,t){return(new GeoJsonDataSource).load(e,t)},Object.defineProperties(GeoJsonDataSource,{markerSize:{get:function(){return defaultMarkerSize},set:function(e){defaultMarkerSize=e}},markerSymbol:{get:function(){return defaultMarkerSymbol},set:function(e){defaultMarkerSymbol=e}},markerColor:{get:function(){return defaultMarkerColor},set:function(e){defaultMarkerColor=e}},stroke:{get:function(){return defaultStroke},set:function(e){defaultStroke=e}},strokeWidth:{get:function(){return defaultStrokeWidth},set:function(e){defaultStrokeWidth=e}},fill:{get:function(){return defaultFill$1},set:function(e){defaultFill$1=e}},clampToGround:{get:function(){return defaultClampToGround},set:function(e){defaultClampToGround=e}},crsNames:{get:function(){return crsNames}},crsLinkHrefs:{get:function(){return crsLinkHrefs}},crsLinkTypes:{get:function(){return crsLinkTypes}}}),Object.defineProperties(GeoJsonDataSource.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}}),GeoJsonDataSource.prototype.load=function(e,t){DataSource.setLoading(this,!0),"string"==typeof(i=(t=defaultValue(t,defaultValue.EMPTY_OBJECT)).credit)&&(i=new Credit(i)),this._credit=i;var i=e,r=t.sourceUri;if("string"==typeof e||e instanceof Resource){i=(e=Resource.createIfNeeded(e)).fetchJson(),r=defaultValue(r,e.getUrlComponent());var n=this._resourceCredits,a=e.credits;if(defined(a))for(var o=a.length,s=0;s<o;s++)n.push(a[s])}t={describe:defaultValue(t.describe,defaultDescribeProperty),markerSize:defaultValue(t.markerSize,defaultMarkerSize),markerSymbol:defaultValue(t.markerSymbol,defaultMarkerSymbol),markerColor:defaultValue(t.markerColor,defaultMarkerColor),strokeWidthProperty:new ConstantProperty(defaultValue(t.strokeWidth,defaultStrokeWidth)),strokeMaterialProperty:new ColorMaterialProperty(defaultValue(t.stroke,defaultStroke)),fillMaterialProperty:new ColorMaterialProperty(defaultValue(t.fill,defaultFill$1)),clampToGround:defaultValue(t.clampToGround,defaultClampToGround)};var l=this;return when(i,(function(e){return load$1(l,e,t,r)})).otherwise((function(e){return DataSource.setLoading(l,!1),l._error.raiseEvent(l,e),console.log(e),when.reject(e)}))},GeoJsonDataSource.prototype.update=function(e){return!0};var tmp$4={},D$g,H$g,I$g,J$g,L$g,M$g,N$g,O$g,P$g,Q$g,R$g,S$g,T$g,U$g,V$g,W$g,X$g,_$g,a_g,b_g,c_g,d_g,e_g,f_g,g_g,h_g,i_g,j_g,k_g,l_g,m_g,n_g,o_g,q_g;function y$g(e,t,i){var r;return e.length>t&&(r=null==i?(i="&hellip;",3):i.length,e=e.substring(0,t-r)+i),e}function z$g(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1}function A$g(e,t){for(var i=e.length-1;0<=i;i--)!0===t(e[i])&&e.splice(i,1)}function C$g(e){throw new Error("Unhandled case for value: '"+e+"'")}function K$g(e,t){function i(){this.constructor=e}J$g(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}tmp$4.Autolinker=(D$g=function(){function e(e){void 0===e&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return e.prototype.setTagName=function(e){return this.tagName=e,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},e.prototype.getAttr=function(e){return this.getAttrs()[e]},e.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(e){return this.setAttr("class",e)},e.prototype.addClass=function(e){for(var t,i=this.getClass(),r=this.whitespaceRegex,n=i?i.split(r):[],a=e.split(r);t=a.shift();)-1===z$g(n,t)&&n.push(t);return this.getAttrs().class=n.join(" "),this},e.prototype.removeClass=function(e){for(var t,i=this.getClass(),r=this.whitespaceRegex,n=i?i.split(r):[],a=e.split(r);n.length&&(t=a.shift());){var o=z$g(n,t);-1!==o&&n.splice(o,1)}return this.getAttrs().class=n.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},e.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},e.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e,t=this.getAttrs(),i=[];for(e in t)t.hasOwnProperty(e)&&i.push(e+'="'+t[e]+'"');return i.join(" ")},e}(),H$g=function(){function e(e){void 0===e&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return e.prototype.build=function(e){return new D$g({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},e.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},i=this.createCssClass(e);return i&&(t.class=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(t.title=e.getAnchorHref()),t},e.prototype.createCssClass=function(e){var t=this.className;if(t){for(var i=[t],r=e.getCssClassSuffixes(),n=0,a=r.length;n<a;n++)i.push(t+"-"+r[n]);return i.join(" ")}return""},e.prototype.processAnchorText=function(e){return this.doTruncate(e)},e.prototype.doTruncate=function(e){if(!(t=this.truncate)||!t.length)return e;var t,i=t.length;return("smart"===(t=t.location)?function(e,t,i){var r;function n(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function a(e,t){var r=t/2,n=Math.ceil(r);t=-1*Math.floor(r),r="";return t<0&&(r=e.substr(t)),e.substr(0,n)+i+r}if(r=null==i?(i="&hellip;",c=3,8):(c=i.length,i.length),e.length<=t)return e;var o,s=t-c,l=function(e){var t={},i=e;return(e=i.match(/^([a-z]+):\/\//i))&&(t.scheme=e[1],i=i.substr(e[0].length)),(e=i.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(t.host=e[1],i=i.substr(e[0].length)),(e=i.match(/^\/(.*?)(?=(\?|#|$))/i))&&(t.path=e[1],i=i.substr(e[0].length)),(e=i.match(/^\?(.*?)(?=(#|$))/i))&&(t.query=e[1],i=i.substr(e[0].length)),(e=i.match(/^#(.*?)$/i))&&(t.fragment=e[1]),t}(e);if(!l.query||(o=l.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i))&&(l.query=l.query.substr(0,o[1].length),e=n(l)),e.length<=t)return e;if(l.host&&(l.host=l.host.replace(/^www\./,""),e=n(l)),e.length<=t)return e;if(e="",l.host&&(e+=l.host),e.length>=s)return(l.host.length==t?l.host.substr(0,t-c)+i:a(e,s)).substr(0,s+r);var c="";if(l.path&&(c+="/"+l.path),l.query&&(c+="?"+l.query),c){if(s<=(e+c).length){if((e+c).length==t)return(e+c).substr(0,t);var u=s-e.length;return(e+a(c,u)).substr(0,s+r)}e+=c}if(l.fragment){if(s<=(e+(u="#"+l.fragment)).length)return(e+u).length==t?(e+u).substr(0,t):(e+a(u,c=s-e.length)).substr(0,s+r);e+=u}return l.scheme&&l.host&&(e+(l=l.scheme+"://")).length<s?(l+e).substr(0,t):e.length<=t?e:(t="",0<s&&(t=e.substr(-1*Math.floor(s/2))),(e.substr(0,Math.ceil(s/2))+i+t).substr(0,s+r))}:"middle"===t?function(e,t,i){if(e.length<=t)return e;t-=n=null==i?(i="&hellip;",r=8,3):(r=i.length,i.length);var r,n="";return 0<t&&(n=e.substr(-1*Math.floor(t/2))),(e.substr(0,Math.ceil(t/2))+i+n).substr(0,t+r)}:y$g)(e,i)},e}(),I$g=function(){function e(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(e){this.offset=e},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),J$g=function(e,t){return(J$g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},L$g=function(){return(L$g=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},M$g=function(e){function t(t){var i=e.call(this,t)||this;return i.email="",i.email=t.email,i}return K$g(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(I$g),N$g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="",i.hashtag="",i.serviceName=t.serviceName,i.hashtag=t.hashtag,i}return K$g(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var e=this.serviceName,t=this.hashtag;switch(e){case"twitter":return"https://twitter.com/hashtag/"+t;case"facebook":return"https://www.facebook.com/hashtag/"+t;case"instagram":return"https://instagram.com/explore/tags/"+t;default:throw new Error("Unknown service name to point hashtag to: "+e)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(I$g),O$g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.mention="",i.mention=t.mention,i.serviceName=t.serviceName,i}return K$g(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var t=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&t.push(i),t},t}(I$g),P$g=function(e){function t(t){var i=e.call(this,t)||this;return i.number="",i.plusSign=!1,i.number=t.number,i.plusSign=t.plusSign,i}return K$g(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(I$g),Q$g=function(e){function t(t){var i=e.call(this,t)||this;return i.url="",i.urlMatchType="scheme",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\/\/)?/i,i.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,i.protocolRelativeRegex=/^\/\//,i.protocolPrepended=!1,i.urlMatchType=t.urlMatchType,i.url=t.url,i.protocolUrlMatch=t.protocolUrlMatch,i.protocolRelativeMatch=t.protocolRelativeMatch,i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return K$g(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var e=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(e=this.url="http://"+e,this.protocolPrepended=!0),e},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&amp;/g,"&")},t.prototype.getAnchorText=function(){var e=this.getMatchedText();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix.scheme&&(e=this.stripSchemePrefix(e)),this.stripPrefix.www&&(e=this.stripWwwPrefix(e)),this.stripTrailingSlash&&(e=this.removeTrailingSlash(e)),this.decodePercentEncoding&&(e=this.removePercentEncoding(e)),e},t.prototype.stripSchemePrefix=function(e){return e.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(e){return e.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(e){return e.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e},t.prototype.removePercentEncoding=function(e){var t=e.replace(/%22/gi,"&quot;").replace(/%26/gi,"&amp;").replace(/%27/gi,"&#39;").replace(/%3C/gi,"&lt;").replace(/%3E/gi,"&gt;");try{return decodeURIComponent(t)}catch(e){return t}},t}(I$g),R$g=function(e){this.__jsduckDummyDocProp=null,this.tagBuilder=e.tagBuilder},S$g=/[A-Za-z]/,T$g=/[0-9]/,U$g=/\s/,V$g=/['"]/,W$g=/[\x00-\x1F\x7F]/,c_g="(?:["+(_$g=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source)+"]{1,3}\\.){3}["+_$g+"]{1,3}",d_g="["+(b_g=a_g=(X$g=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source)+/\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source+_$g)+"](?:["+b_g+"\\-]{0,61}["+b_g+"])?",e_g=function(e){return"(?=("+d_g+"))\\"+e},f_g=function(e){return"(?:"+e_g(e)+"(?:\\."+e_g(e+1)+"){0,126}|"+c_g+")"},g_g=new RegExp("["+b_g+"]"),h_g=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,i_g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localPartCharRegex=new RegExp("["+b_g+"!#$%&'*+/=?^_`{|}~-]"),t.strictTldRegex=new RegExp("^"+h_g.source+"$"),t}return K$g(t,e),t.prototype.parseMatches=function(e){for(var t,i,r,n,a,o,s,l,c,u=this.tagBuilder,d=this.localPartCharRegex,h=this.strictTldRegex,p=[],f=e.length,m=new j_g,g={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},y=0,_=0,v=m;y<f;){var C=e.charAt(y);switch(_){case 0:"m"===(c=C)?x(1):d.test(c)&&x();break;case 1:l=C,":"===(s=e.charAt(y-1))?d.test(l)?(_=2,v=new j_g(L$g({},v,{hasMailtoPrefix:!0}))):b():g[s]===l||(d.test(l)?_=2:"."===l?_=3:"@"===l?_=4:b());break;case 2:"."===(o=C)?_=3:"@"===o?_=4:d.test(o)||b();break;case 3:"."!==(a=C)&&"@"!==a&&d.test(a)?_=2:b();break;case 4:n=C,g_g.test(n)?_=5:b();break;case 5:"."===(r=C)?_=7:"-"===r?_=6:g_g.test(r)||S();break;case 6:"-"!==(i=C)&&"."!==i&&g_g.test(i)?_=5:S();break;case 7:"."!==(t=C)&&"-"!==t&&g_g.test(t)?(_=5,v=new j_g(L$g({},v,{hasDomainDot:!0}))):S();break;default:C$g(_)}y++}return S(),p;function x(e){void 0===e&&(e=2),_=e,v=new j_g({idx:y})}function b(){_=0,v=m}function S(){var t,i;v.hasDomainDot&&(t=e.slice(v.idx,y),/[-.]$/.test(t)&&(t=t.slice(0,-1)),function(e){return e=(e.split(".").pop()||"").toLowerCase(),h.test(e)}(i=v.hasMailtoPrefix?t.slice("mailto:".length):t)&&p.push(new M$g({tagBuilder:u,matchedText:t,offset:v.idx,email:i}))),b()}},t}(R$g),j_g=function(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.hasMailtoPrefix=!!e.hasMailtoPrefix,this.hasDomainDot=!!e.hasDomainDot},k_g=function(){function e(){}return e.isValid=function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},e.isValidIpAddress=function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==e.match(t)},e.containsMultipleDots=function(e){var t=e;return this.hasFullProtocolRegex.test(e)&&(t=e.split("://")[1]),-1<t.split("/")[0].indexOf("..")},e.isValidUriScheme=function(e){return"javascript:"!==(e=(e=e.match(this.uriSchemeRegex))&&e[0].toLowerCase())&&"vbscript:"!==e},e.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t||this.hasWordCharAfterProtocolRegex.test(e))},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+X$g+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),l_g=function(e){function t(t){var i,r=e.call(this,t)||this;return r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.matcherRegex=(i=new RegExp("[/?#](?:["+b_g+"\\-+&@#/%=~_()|'$*\\[\\]?!:,.;✓]*["+b_g+"\\-+&@#/%=~_()|'$*\\[\\]✓])?"),new RegExp(["(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,f_g(2),")","|","(","(//)?",/(?:www\.)/.source,f_g(6),")","|","(","(//)?",f_g(10)+"\\.",h_g.source,"(?![-"+a_g+"])",")",")","(?::[0-9]+)?","(?:"+i.source+")?"].join(""),"gi")),r.wordCharRegExp=new RegExp("["+b_g+"]"),r.stripPrefix=t.stripPrefix,r.stripTrailingSlash=t.stripTrailingSlash,r.decodePercentEncoding=t.decodePercentEncoding,r}return K$g(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,r=this.stripPrefix,n=this.stripTrailingSlash,a=this.decodePercentEncoding,o=this.tagBuilder,s=[],l=this;null!==(t=i.exec(e));)!function(){var i=t[0],c=t[1],u=t[4],d=t[5],h=t[9],p=t.index;d=d||h,h=e.charAt(p-1);if(k_g.isValid(i,c)&&!(0<p&&"@"===h||0<p&&d&&l.wordCharRegExp.test(h))){/\?$/.test(i)&&(i=i.substr(0,i.length-1)),l.matchHasUnbalancedClosingParen(i)?i=i.substr(0,i.length-1):-1<(f=l.matchHasInvalidCharAfterTld(i,c))&&(i=i.substr(0,f));var f=["http://","https://"].find((function(e){return!!c&&-1!==c.indexOf(e)}));f&&(m=i.indexOf(f),i=i.substr(m),c=c.substr(m),p+=m);var m=c?"scheme":u?"www":"tld";u=!!c;s.push(new Q$g({tagBuilder:o,matchedText:i,offset:p,urlMatchType:m,url:i,protocolUrlMatch:u,protocolRelativeMatch:!!d,stripPrefix:r,stripTrailingSlash:n,decodePercentEncoding:a}))}}();return s},t.prototype.matchHasUnbalancedClosingParen=function(e){var t,i=e.charAt(e.length-1);if(")"===i)t="(";else{if("]"!==i)return!1;t="["}for(var r=0,n=0,a=e.length-1;n<a;n++){var o=e.charAt(n);o===t?r++:o===i&&(r=Math.max(r-1,0))}return 0===r},t.prototype.matchHasInvalidCharAfterTld=function(e,t){if(!e)return-1;var i=0;return t&&(i=e.indexOf(":"),e=e.slice(i)),null===(t=new RegExp("^((.?//)?[-."+b_g+"]*[-"+b_g+"]\\.[-"+b_g+"]+)").exec(e))?-1:(i+=t[1].length,e=e.slice(t[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(e)?i:-1)},t}(R$g),m_g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegex=new RegExp("#[_"+b_g+"]{1,139}(?![_"+b_g+"])","g"),i.nonWordCharRegex=new RegExp("[^"+b_g+"]"),i.serviceName=t.serviceName,i}return K$g(t,e),t.prototype.parseMatches=function(e){for(var t=this.matcherRegex,i=this.nonWordCharRegex,r=this.serviceName,n=this.tagBuilder,a=[];null!==(o=t.exec(e));){var o,s=o.index,l=e.charAt(s-1);0!==s&&!i.test(l)||(l=o[0],o=o[0].slice(1),a.push(new N$g({tagBuilder:n,matchedText:l,offset:s,serviceName:r,hashtag:o})))}return a},t}(R$g),n_g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.matcherRegex=/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/g,t}return K$g(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,r=this.tagBuilder,n=[];null!==(t=i.exec(e));){var a=t[0],o=a.replace(/[^0-9,;#]/g,""),s=!(!t[1]&&!t[2]),l=0==t.index?"":e.substr(t.index-1,1),c=e.substr(t.index+a.length,1);c=!l.match(/\d/)&&!c.match(/\d/);this.testMatch(t[3])&&this.testMatch(a)&&c&&n.push(new P$g({tagBuilder:r,matchedText:a,offset:t.index,number:o,plusSign:s}))}return n},t.prototype.testMatch=function(e){return/\D/.test(e)},t}(R$g),o_g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegexes={twitter:new RegExp("@[_"+b_g+"]{1,50}(?![_"+b_g+"])","g"),instagram:new RegExp("@[_."+b_g+"]{1,30}(?![_"+b_g+"])","g"),soundcloud:new RegExp("@[-_."+b_g+"]{1,50}(?![-_"+b_g+"])","g")},i.nonWordCharRegex=new RegExp("[^"+b_g+"]"),i.serviceName=t.serviceName,i}return K$g(t,e),t.prototype.parseMatches=function(e){var t=this.serviceName,i=this.matcherRegexes[this.serviceName],r=this.nonWordCharRegex,n=this.tagBuilder,a=[];if(!i)return a;for(;null!==(o=i.exec(e));){var o,s=o.index,l=e.charAt(s-1);0!==s&&!r.test(l)||(o=(l=o[0].replace(/\.+$/g,"")).slice(1),a.push(new O$g({tagBuilder:n,matchedText:l,offset:s,serviceName:t,mention:o})))}return a},t}(R$g),q_g=function(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing},function(){function e(t){void 0===t&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(t.urls),this.email=("boolean"==typeof t.email?t:this).email,this.phone=("boolean"==typeof t.phone?t:this).phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=("boolean"==typeof t.newWindow?t:this).newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(t.stripPrefix),this.stripTrailingSlash=("boolean"==typeof t.stripTrailingSlash?t:this).stripTrailingSlash,this.decodePercentEncoding=("boolean"==typeof t.decodePercentEncoding?t:this).decodePercentEncoding;var i=this.mention;if(!1!==i&&"twitter"!==i&&"instagram"!==i&&"soundcloud"!==i)throw new Error("invalid `mention` cfg - see docs");if(!1!==(i=this.hashtag)&&"twitter"!==i&&"facebook"!==i&&"instagram"!==i)throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,i){return new e(i).link(t)},e.parse=function(t,i){return new e(i).parse(t)},e.prototype.normalizeUrlsCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:"boolean"!=typeof e.schemeMatches||e.schemeMatches,wwwMatches:"boolean"!=typeof e.wwwMatches||e.wwwMatches,tldMatches:"boolean"!=typeof e.tldMatches||e.tldMatches}},e.prototype.normalizeStripPrefixCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{scheme:e,www:e}:{scheme:"boolean"!=typeof e.scheme||e.scheme,www:"boolean"!=typeof e.www||e.www}},e.prototype.normalizeTruncateCfg=function(e){return"number"==typeof e?{length:e,location:"end"}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&void 0===e[i]&&(e[i]=t[i]);return e}(e||{},{length:Number.POSITIVE_INFINITY,location:"end"})},e.prototype.parse=function(e){var t=this,i=["a","style","script"],r=0,n=[];return function(e,t){for(var i=t.onOpenTag,r=t.onCloseTag,n=t.onText,a=t.onComment,o=t.onDoctype,s=new q_g,l=0,c=e.length,u=0,d=0,h=s;l<c;){var p=e.charAt(l);switch(u){case 0:!function(e){"<"===e&&m()}(p);break;case 1:!function(e){"!"===e?u=13:"/"===e?(u=2,h=new q_g(L$g({},h,{isClosing:!0}))):"<"===e?m():h=S$g.test(e)?(u=3,new q_g(L$g({},h,{isOpening:!0}))):(u=0,s)}(p);break;case 2:!function(e){">"!==e&&S$g.test(e)?u=3:f()}(p);break;case 3:!function(e){U$g.test(e)?(h=new q_g(L$g({},h,{name:y()})),u=4):"<"===e?m():"/"===e?(h=new q_g(L$g({},h,{name:y()})),u=12):">"===e?(h=new q_g(L$g({},h,{name:y()})),g()):S$g.test(e)||T$g.test(e)||":"===e||f()}(p);break;case 4:!function(e){U$g.test(e)||("/"===e?u=12:">"===e?g():"<"===e?m():"="===e||V$g.test(e)||W$g.test(e)?f():u=5)}(p);break;case 5:!function(e){U$g.test(e)?u=6:"/"===e?u=12:"="===e?u=7:">"===e?g():"<"===e?m():V$g.test(e)&&f()}(p);break;case 6:!function(e){U$g.test(e)||("/"===e?u=12:"="===e?u=7:">"===e?g():"<"===e?m():V$g.test(e)?f():u=5)}(p);break;case 7:!function(e){U$g.test(e)||('"'===e?u=8:"'"===e?u=9:/[>=`]/.test(e)?f():"<"===e?m():u=10)}(p);break;case 8:!function(e){'"'===e&&(u=11)}(p);break;case 9:!function(e){"'"===e&&(u=11)}(p);break;case 10:!function(e){U$g.test(e)?u=4:">"===e?g():"<"===e&&m()}(p);break;case 11:!function(e){U$g.test(e)?u=4:"/"===e?u=12:">"===e?g():"<"===e?m():(u=4,l--)}(p);break;case 12:!function(e){">"===e?(h=new q_g(L$g({},h,{isClosing:!0})),g()):u=4}(p);break;case 13:"--"===e.substr(l,2)?(l+=2,h=new q_g(L$g({},h,{type:"comment"})),u=14):"DOCTYPE"===e.substr(l,7).toUpperCase()?(l+=7,h=new q_g(L$g({},h,{type:"doctype"})),u=20):f();break;case 14:!function(e){"-"===e?u=15:">"===e?f():u=16}(p);break;case 15:!function(e){"-"===e?u=18:">"===e?f():u=16}(p);break;case 16:!function(e){"-"===e&&(u=17)}(p);break;case 17:!function(e){u="-"===e?18:16}(p);break;case 18:!function(e){">"===e?g():"!"===e?u=19:"-"===e||(u=16)}(p);break;case 19:!function(e){"-"===e?u=17:">"===e?g():u=16}(p);break;case 20:!function(e){">"===e?g():"<"===e&&m()}(p);break;default:C$g(u)}l++}function f(){u=0,h=s}function m(){u=1,h=new q_g({idx:l})}function g(){var t=e.slice(d,h.idx);t&&n(t,d),"comment"===h.type?a(h.idx):"doctype"===h.type?o(h.idx):(h.isOpening&&i(h.name,h.idx),h.isClosing&&r(h.name,h.idx)),f(),d=l+1}function y(){var t=h.idx+(h.isClosing?2:1);return e.slice(t,l).toLowerCase()}d<l&&function(){var t=e.slice(d,l);n(t,d),d=l+1}()}(e,{onOpenTag:function(e){0<=i.indexOf(e)&&r++},onText:function(e,i){var a;0===r&&(e=function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,r=[],n=0;i=t.exec(e);)r.push(e.substring(n,i.index)),r.push(i[0]),n=i.index+i[0].length;return r.push(e.substring(n)),r}(e,/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi),a=i,e.forEach((function(e,i){i%2==0&&(i=t.parseText(e,a),n.push.apply(n,i)),a+=e.length})))},onCloseTag:function(e){0<=i.indexOf(e)&&(r=Math.max(r-1,0))},onComment:function(e){},onDoctype:function(e){}}),n=this.compactMatches(n),n=this.removeUnwantedMatches(n)},e.prototype.compactMatches=function(e){e.sort((function(e,t){return e.getOffset()-t.getOffset()}));for(var t=0;t<e.length-1;t++){var i=(n=e[t]).getOffset(),r=n.getMatchedText().length,n=i+r;t+1<e.length&&(e[t+1].getOffset()!==i?e[t+1].getOffset()<n&&e.splice(t+1,1):(r=e[t+1].getMatchedText().length>r?t:t+1,e.splice(r,1)))}return e},e.prototype.removeUnwantedMatches=function(e){return this.hashtag||A$g(e,(function(e){return"hashtag"===e.getType()})),this.email||A$g(e,(function(e){return"email"===e.getType()})),this.phone||A$g(e,(function(e){return"phone"===e.getType()})),this.mention||A$g(e,(function(e){return"mention"===e.getType()})),this.urls.schemeMatches||A$g(e,(function(e){return"url"===e.getType()&&"scheme"===e.getUrlMatchType()})),this.urls.wwwMatches||A$g(e,(function(e){return"url"===e.getType()&&"www"===e.getUrlMatchType()})),this.urls.tldMatches||A$g(e,(function(e){return"url"===e.getType()&&"tld"===e.getUrlMatchType()})),e},e.prototype.parseText=function(e,t){void 0===t&&(t=0),t=t||0;for(var i=this.getMatchers(),r=[],n=0,a=i.length;n<a;n++){for(var o=i[n].parseMatches(e),s=0,l=o.length;s<l;s++)o[s].setOffset(t+o[s].getOffset());r.push.apply(r,o)}return r},e.prototype.link=function(e){if(!e)return"";for(var t=this.parse(e),i=[],r=0,n=0,a=t.length;n<a;n++){var o=t[n];i.push(e.substring(r,o.getOffset())),i.push(this.createMatchReturnVal(o)),r=o.getOffset()+o.getMatchedText().length}return i.push(e.substring(r)),i.join("")},e.prototype.createMatchReturnVal=function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this.context,e)),"string"==typeof t?t:!1===t?e.getMatchedText():(t instanceof D$g?t:e.buildTag()).toAnchorString()},e.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder();e=[new m_g({tagBuilder:e,serviceName:this.hashtag}),new i_g({tagBuilder:e}),new n_g({tagBuilder:e}),new o_g({tagBuilder:e,serviceName:this.mention}),new l_g({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=e},e.prototype.getTagBuilder=function(){return this.tagBuilder||(this.tagBuilder=new H$g({newWindow:this.newWindow,truncate:this.truncate,className:this.className}))},e.version="3.11.0",e.AnchorTagBuilder=H$g,e.HtmlTag=D$g,e.matcher={Email:i_g,Hashtag:m_g,Matcher:R$g,Mention:o_g,Phone:n_g,Url:l_g},e.match={Email:M$g,Hashtag:N$g,Match:I$g,Mention:O$g,Phone:P$g,Url:Q$g},e}());var Autolinker=tmp$4.Autolinker,tmp$5={};!function(e){var t,i,r="File format is not recognized.",n="Error while reading zip file.",a="Error while reading file data.",o=524288,s="text/plain",l="message";try{t=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch(i){}function c(){var e=-1,t=this;t.append=function(i){for(var r=t.table,n=0;n<i.length;n++)e=e>>>8^r[255&(e^i[n])]},t.get=function(){return~e}}function u(e,t){var i=new ArrayBuffer(e);e=new Uint8Array(i);return t&&e.set(t,0),{buffer:i,array:e,view:new DataView(i)}}function d(){}function h(e){var t,i=this;i.size=0,i.init=function(r,n){var a=new Blob([e],{type:s});(t=new f(a)).init((function(){i.size=t.size,r()}),n)},i.readUint8Array=function(e,i,r,n){t.readUint8Array(e,i,r,n)}}function p(e){var t,i=this;i.size=0,i.init=function(r){for(var n=e.length;"="==e.charAt(n-1);)n--;t=e.indexOf(",")+1,i.size=Math.floor(.75*(n-t)),r()},i.readUint8Array=function(i,r,n){for(var a=u(r),o=4*Math.floor(i/3),s=4*Math.ceil((i+r)/3),l=window.atob(e.substring(o+t,s+t)),c=i-3*Math.floor(o/4),d=c;d<c+r;d++)a.array[d-c]=l.charCodeAt(d);n(a.array)}}function f(e){this.size=0,this.init=function(t){this.size=e.size,t()},this.readUint8Array=function(t,i,r,n){var a;(a=new FileReader).onload=function(e){r(new Uint8Array(e.target.result))},a.onerror=n,a.readAsArrayBuffer((a=t,t=i,(i=e).slice?i.slice(a,a+t):i.webkitSlice?i.webkitSlice(a,a+t):i.mozSlice?i.mozSlice(a,a+t):i.msSlice?i.msSlice(a,a+t):void 0))}}function m(){}function g(e){var i;this.init=function(e){i=new Blob([],{type:s}),e()},this.writeUint8Array=function(e,r){i=new Blob([i,t?e:e.buffer],{type:s}),r()},this.getData=function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=r,n.readAsText(i,e)}}function y(e){var t="",i="";this.init=function(i){t+="data:"+(e||"")+";base64,",i()},this.writeUint8Array=function(e,r){var n,a=i.length,o=i;for(i="",n=0;n<3*Math.floor((a+e.length)/3)-a;n++)o+=String.fromCharCode(e[n]);for(;n<e.length;n++)i+=String.fromCharCode(e[n]);2<o.length?t+=window.btoa(o):i=o,r()},this.getData=function(e){e(t+window.btoa(i))}}function _(e){var i;this.init=function(t){i=new Blob([],{type:e}),t()},this.writeUint8Array=function(r,n){i=new Blob([i,t?r:r.buffer],{type:e}),n()},this.getData=function(e){e(i)}}function v(e,t,i,r,n,a,s,c,u,d){var h,p,f=0;function m(){e.removeEventListener(l,g,!1),c(p)}function g(e){var t=(e=e.data).data;e.onappend&&(p+=t.length,i.writeUint8Array(t,(function(){a(!1,t),y()}),d)),e.onflush&&(t?(p+=t.length,i.writeUint8Array(t,(function(){a(!1,t),m()}),d)):m()),e.progress&&s&&s(h+e.current,n)}function y(){(h=f*o)<n?t.readUint8Array(r+h,Math.min(o,n-h),(function(t){e.postMessage({append:!0,data:t}),f++,s&&s(h,n),a(!0,t)}),u):e.postMessage({flush:!0})}p=0,e.addEventListener(l,g,!1),y()}function C(e,t,i,r,n,a,s,l,c,u){var d,h=0,p=0;!function f(){var m;(d=h*o)<n?t.readUint8Array(r+d,Math.min(o,n-d),(function(t){var o=e.append(t,(function(){s&&s(r+d,n)}));p+=o.length,a(!0,t),i.writeUint8Array(o,(function(){a(!1,o),h++,setTimeout(f,1)}),u),s&&s(d,n)}),c):(m=e.flush())?(p+=m.length,i.writeUint8Array(m,(function(){a(!1,m),l(p)}),u)):l(p)}()}function x(e,t,i,r,n,a,s,l,u){var d=0,h=new c;!function c(){var p=d*o;p<r?e.readUint8Array(i+p,Math.min(o,r-p),(function(e){n&&h.append(e),s&&s(p,r,e),t.writeUint8Array(e,(function(){d++,c()}),u)}),l):a(r,h.get())}()}function b(e){for(var t,i="",r=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "],n=0;n<e.length;n++)i+=127<(t=255&e.charCodeAt(n))?r[t-128]:String.fromCharCode(t);return i}function S(e){return decodeURIComponent(escape(e))}function T(e){for(var t="",i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return t}function E(e,t,i,r,n){e.version=t.view.getUint16(i,!0),e.bitFlag=t.view.getUint16(i+2,!0),e.compressionMethod=t.view.getUint16(i+4,!0),e.lastModDateRaw=t.view.getUint32(i+6,!0),e.lastModDate=function(e){var t=(4294901760&e)>>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch(e){}}(e.lastModDateRaw),1!=(1&e.bitFlag)?(!r&&8==(8&e.bitFlag)||(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(i+22,!0),e.extraFieldLength=t.view.getUint16(i+24,!0)):n("File is using Zip64 (4gb+ file size).")):n("File contains encrypted entry.")}function w(t,i){function o(){}return o.prototype.getData=function(n,o,s,l){var d,h=this;function p(e,t){d&&d.terminate(),d=null,e&&e(t)}function f(e,t){var i;l&&(i=t,(t=u(4)).view.setUint32(0,i),h.crc32!=t.view.getUint32(0))?m():n.getData((function(e){p(o,e)}))}function m(){p(i,a)}function g(){p(i,"Error while writing file data.")}t.readUint8Array(h.offset,30,(function(a){var o;1347093252==(a=u(a.length,a)).view.getUint32(0)?(E(h,a,4,!1,i),o=h.offset+30+h.filenameLength+h.extraFieldLength,n.init((function(){function i(e,t){_&&!e&&A.append(t)}function r(e){b(e,A.get())}var a,u,p,y,_,b,S,T,E,w,A;0===h.compressionMethod?x(t,n,o,h.compressedSize,l,f,s,m,g):(a=t,u=n,p=o,y=h.compressedSize,_=l,b=f,S=s,T=m,E=g,A=new c,e.zip.useWebWorkers?v(w=new Worker(e.zip.workerScriptsPath+"inflate.js"),a,u,p,y,i,S,r,T,E):C(new e.zip.Inflater,a,u,p,y,i,S,r,T,E),d=w)}),g)):i(r)}),m)},{getEntries:function(e){t.size<22?i(r):function e(r,a){t.readUint8Array(t.size-r,r,(function(t){1347093766!=(t=u(t.length,t).view).getUint32(0)?e(r+1,a):a(t)}),(function(){i(n)}))}(22,(function(a){var s=a.getUint32(16,!0),l=a.getUint16(8,!0);t.readUint8Array(s,t.size-s,(function(t){for(var n,a,s=0,c=[],d=u(t.length,t),h=0;h<l;h++){if(n=new o,1347092738!=d.view.getUint32(s))return void i(r);E(n,d,s+6,!0,i),n.commentLength=d.view.getUint16(s+32,!0),n.directory=16==(16&d.view.getUint8(s+38)),n.offset=d.view.getUint32(s+42,!0),a=T(d.array.subarray(s+46,s+46+n.filenameLength)),n.filename=(2048==(2048&n.bitFlag)?S:b)(a),n.directory||"/"!=n.filename.charAt(n.filename.length-1)||(n.directory=!0),a=T(d.array.subarray(s+46+n.filenameLength+n.extraFieldLength,s+46+n.filenameLength+n.extraFieldLength+n.commentLength)),n.comment=(2048==(2048&n.bitFlag)?S:b)(a),c.push(n),s+=46+n.filenameLength+n.extraFieldLength+n.commentLength}e(c)}),(function(){i(n)}))}))},close:function(e){e&&e()}}}function A(e){return unescape(encodeURIComponent(e))}function P(e){for(var t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i));return t}function D(t,i,r){var n,o={},s=[],d=0;function h(e,t){n&&n.terminate(),n=null,e&&e(t)}function p(){h(i,"Error while writing zip file.")}function f(){h(i,a)}return{add:function(a,m,g,y,_){var b,S,T;function E(e,i){var r=u(16);d+=e||0,r.view.setUint32(0,1347094280),void 0!==i&&(b.view.setUint32(10,i,!0),r.view.setUint32(4,i,!0)),m&&(r.view.setUint32(8,e,!0),b.view.setUint32(14,e,!0),r.view.setUint32(12,m.size,!0),b.view.setUint32(18,m.size,!0)),t.writeUint8Array(r.array,(function(){d+=16,h(g)}),p)}function w(){var h,g;_=_||{},a=a.trim(),_.directory&&"/"!=a.charAt(a.length-1)&&(a+="/"),o.hasOwnProperty(a)?i("File already exists."):(S=P(A(a)),s.push(a),h=function(){function i(e,t){e&&T.append(t)}function a(e){d(e,T.get())}var o,s,u,d,h,g,b,S,T;m?r||0===_.level?x(m,t,0,m.size,!0,E,y,f,p):(o=m,s=t,u=_.level,d=E,h=y,g=f,b=p,T=new c,e.zip.useWebWorkers?((S=new Worker(e.zip.workerScriptsPath+"deflate.js")).addEventListener(l,(function e(){S.removeEventListener(l,e,!1),v(S,o,s,0,o.size,i,h,a,g,b)}),!1),S.postMessage({init:!0,level:u})):C(new e.zip.Deflater,o,s,0,o.size,i,h,a,g,b),n=S):E()},T=_.lastModDate||new Date,b=u(26),o[a]={headerArray:b.array,directory:_.directory,filename:S,offset:d,comment:P(A(_.comment||""))},b.view.setUint32(0,335546376),_.version&&b.view.setUint8(0,_.version),r||0===_.level||_.directory||b.view.setUint16(4,2048),b.view.setUint16(6,(T.getHours()<<6|T.getMinutes())<<5|T.getSeconds()/2,!0),b.view.setUint16(8,(T.getFullYear()-1980<<4|T.getMonth()+1)<<5|T.getDate(),!0),b.view.setUint16(22,S.length,!0),(g=u(30+S.length)).view.setUint32(0,1347093252),g.array.set(b.array,4),g.array.set(S,30),d+=g.array.length,t.writeUint8Array(g.array,h,p))}m?m.init(w,f):w()},close:function(e){for(var i,r,n=0,a=0,l=0;l<s.length;l++)n+=46+(r=o[s[l]]).filename.length+r.comment.length;for(i=u(n+22),l=0;l<s.length;l++)r=o[s[l]],i.view.setUint32(a,1347092738),i.view.setUint16(a+4,5120),i.array.set(r.headerArray,a+6),i.view.setUint16(a+32,r.comment.length,!0),r.directory&&i.view.setUint8(a+38,16),i.view.setUint32(a+42,r.offset,!0),i.array.set(r.filename,a+46),i.array.set(r.comment,a+46+r.filename.length),a+=46+r.filename.length+r.comment.length;i.view.setUint32(a,1347093766),i.view.setUint16(a+8,s.length,!0),i.view.setUint16(a+10,s.length,!0),i.view.setUint32(a+12,n,!0),i.view.setUint32(a+16,d,!0),t.writeUint8Array(i.array,(function(){h((function(){t.getData(e)}))}),p)}}}c.prototype.table=function(){for(var e,t,i=[],r=0;r<256;r++){for(t=r,e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;i[r]=t}return i}(),(h.prototype=new d).constructor=h,(p.prototype=new d).constructor=p,(f.prototype=new d).constructor=f,m.prototype.getData=function(e){e(this.data)},(g.prototype=new m).constructor=g,(y.prototype=new m).constructor=y,(_.prototype=new m).constructor=_,e.zip={Reader:d,Writer:m,BlobReader:f,Data64URIReader:p,TextReader:h,BlobWriter:_,Data64URIWriter:y,TextWriter:g,createReader:function(e,t,i){e.init((function(){t(w(e,i))}),i)},createWriter:function(e,t,i,r){e.init((function(){t(D(e,i,r))}),i)},useWebWorkers:!0},Object.defineProperties(e.zip,{workerScriptsPath:{get:function(){return void 0===i&&(i=buildModuleUrl("ThirdParty/Workers/")),i}}})}(tmp$5);var zip=tmp$5.zip;function KmlLookAt(e,t){this.position=e,this.headingPitchRange=t}function KmlTour(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new Event,this.tourEnd=new Event,this.entryStart=new Event,this.entryEnd=new Event,this._activeEntries=[]}function cancelAllEntries(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function playEntry(e,t,i){var r,n,a=this.playlist[this.playlistIndex];a?(r=playNext.bind(this,e,t,i),this._activeEntries.push(a),this.entryStart.raiseEvent(a),a.blocking?a.play(r,e.scene.camera,t):(n=this,a.play((function(){n.entryEnd.raiseEvent(a);var e=n._activeEntries.indexOf(a);0<=e&&n._activeEntries.splice(e,1)})),r(e,t,i))):defined(i)&&i(!1)}function playNext(e,t,i,r){var n=this.playlist[this.playlistIndex];this.entryEnd.raiseEvent(n,r),r?i(r):(0<=(n=this._activeEntries.indexOf(n))&&this._activeEntries.splice(n,1),this.playlistIndex++,playEntry.call(this,e,t,i))}function KmlTourFlyTo(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}function KmlTourWait(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}KmlTour.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},KmlTour.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;playEntry.call(this,e,t,(function(e){i.playlistIndex=0,e||cancelAllEntries(i._activeEntries),i.tourEnd.raiseEvent(e)}))},KmlTour.prototype.stop=function(){cancelAllEntries(this._activeEntries)},KmlTourFlyTo.prototype.play=function(e,t,i){var r;this.activeCamera=t,defined(e)&&null!==e&&((r=this).activeCallback=function(t){delete r.activeCallback,delete r.activeCamera,e(!defined(t)&&t)});var n=this.getCameraOptions(i);this.view.headingPitchRoll?t.flyTo(n):this.view.headingPitchRange&&(i=new BoundingSphere(this.view.position),t.flyToBoundingSphere(i,n))},KmlTourFlyTo.prototype.stop=function(){defined(this.activeCamera)&&this.activeCamera.cancelFlight(),defined(this.activeCallback)&&this.activeCallback(!0)},KmlTourFlyTo.prototype.getCameraOptions=function(e){var t={duration:this.duration};return defined(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=EasingFunction$1.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),defined(e)&&(t=combine(t,e)),t},KmlTourWait.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout((function(){delete t.activeCallback,e(!1)}),1e3*this.duration)},KmlTourWait.prototype.stop=function(){clearTimeout(this.timeout),defined(this.activeCallback)&&this.activeCallback(!0)};var MimeTypes={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){return e=getExtensionFromUri(e=e.toLowerCase()),MimeTypes[e]}},parser;"undefined"!=typeof DOMParser&&(parser=new DOMParser);var autolinker=new Autolinker({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),BILLBOARD_SIZE=32,BILLBOARD_NEAR_DISTANCE=2414016,BILLBOARD_NEAR_RATIO=1,BILLBOARD_FAR_DISTANCE=16093e3,BILLBOARD_FAR_RATIO=.1,kmlNamespaces=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],gxNamespaces=["http://www.google.com/kml/ext/2.2"],atomNamespaces=["http://www.w3.org/2005/Atom"],namespaces={kml:kmlNamespaces,gx:gxNamespaces,atom:atomNamespaces,kmlgx:kmlNamespaces.concat(gxNamespaces)},featureTypes={Document:processDocument$1,Folder:processFolder,Placemark:processPlacemark,NetworkLink:processNetworkLink,GroundOverlay:processGroundOverlay,PhotoOverlay:processUnsupportedFeature,ScreenOverlay:processUnsupportedFeature,Tour:processTour};function DeferredLoading(e){this._dataSource=e,this._deferred=when.defer(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function isZipFile(e){e=e.slice(0,Math.min(4,e.size));var t=when.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(1347093252===new DataView(i.result).getUint32(0,!1))})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsArrayBuffer(e),t.promise}function readBlobAsText(e){var t=when.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(i.result)})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsText(e),t.promise}function insertNamespaces(e){var t,i,r,n,a={xsi:"http://www.w3.org/2001/XMLSchema-instance"};for(n in a)a.hasOwnProperty(n)&&(r="xmlns:"+n+"=",RegExp("[< ]"+n+":").test(e)&&-1===e.indexOf(r)&&(defined(t)||(t=e.substr(0,e.indexOf("<kml")+4),i=e.substr(t.length)),t+=" "+r+'"'+a[n]+'"'));return defined(t)&&(e=t+i),e}function removeDuplicateNamespaces(e){for(var t,i,r=e.indexOf("xmlns:"),n=e.indexOf(">",r);-1!==r&&r<n;)i=e.slice(r,e.indexOf('"',r)),t=r,r=-1!==(r=e.indexOf(i,r+1))?(i=e.indexOf('"',e.indexOf('"',r)+1),(e=e.slice(0,r-1)+e.slice(i+1,e.length)).indexOf("xmlns:",t-1)):e.indexOf("xmlns:",t+1);return e}function loadXmlFromZip(e,t,i){e.getData(new zip.TextWriter,(function(e){e=removeDuplicateNamespaces(e=insertNamespaces(e)),t.kml=parser.parseFromString(e,"application/xml"),i.resolve()}))}function loadDataUriFromZip(e,t,i){var r=defaultValue(MimeTypes.detectFromFilename(e.filename),"application/octet-stream");e.getData(new zip.Data64URIWriter(r),(function(r){t[e.filename]=r,i.resolve()}))}function embedDataUris(e,t,i,r){for(var n=r.keys,a=new URI("."),o=e.querySelectorAll(t),s=0;s<o.length;s++){var l=o[s],c=new URI(l.getAttribute(i)).resolve(a).toString();-1!==(c=n.indexOf(c))&&(c=n[c],l.setAttribute(i,r[c]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",c))}}function applyBasePath(e,t,i,r){for(var n=e.querySelectorAll(t),a=0;a<n.length;a++){var o=n[a],s=resolveHref(o.getAttribute(i),r);o.setAttribute(i,s.url)}}function createEntity(e,t,i){var r=defined(r=queryStringAttribute(e,"id"))&&0!==r.length?r:createGuid();return defined(i)&&(r=i+r),defined(e=t.getById(r))&&(r=createGuid(),defined(i)&&(r=i+r)),defined((e=t.add(new Entity({id:r}))).kml)||(e.addProperty("kml"),e.kml=new KmlFeatureData),e}function isExtrudable(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function readCoordinate(e,t){if(!defined(e))return Cartesian3.fromDegrees(0,0,0,t);if(!defined(r=e.match(/[^\s,\n]+/g)))return Cartesian3.fromDegrees(0,0,0,t);var i=parseFloat(r[0]),r=(e=parseFloat(r[1]),parseFloat(r[2]));i=isNaN(i)?0:i,e=isNaN(e)?0:e,r=isNaN(r)?0:r;return Cartesian3.fromDegrees(i,e,r,t)}function readCoordinates(e,t){if(defined(e)){var i=e.textContent.match(/[^\s\n]+/g);if(defined(i)){for(var r=i.length,n=new Array(r),a=0,o=0;o<r;o++)n[a++]=readCoordinate(i[o],t);return n}}}function queryNumericAttribute(e,t){if(defined(e)&&null!==(t=e.getAttribute(t)))return t=parseFloat(t),isNaN(t)?void 0:t}function queryStringAttribute(e,t){if(defined(e))return null!==(t=e.getAttribute(t))?t:void 0}function queryFirstNode(e,t,i){if(defined(e))for(var r=e.childNodes,n=r.length,a=0;a<n;a++){var o=r[a];if(o.localName===t&&-1!==i.indexOf(o.namespaceURI))return o}}function queryNodes(e,t,i){if(defined(e)){for(var r=[],n=e.getElementsByTagNameNS("*",t),a=n.length,o=0;o<a;o++){var s=n[o];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&r.push(s)}return r}}function queryChildNodes(e,t,i){if(!defined(e))return[];for(var r=[],n=e.childNodes,a=n.length,o=0;o<a;o++){var s=n[o];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&r.push(s)}return r}function queryNumericValue(e,t,i){if(defined(i=queryFirstNode(e,t,i)))return i=parseFloat(i.textContent),isNaN(i)?void 0:i}function queryStringValue(e,t,i){if(defined(i=queryFirstNode(e,t,i)))return i.textContent.trim()}function queryBooleanValue(e,t,i){if(defined(i=queryFirstNode(e,t,i)))return"1"===(i=i.textContent.trim())||/^true$/i.test(i)}function resolveHref(e,t,i){var r,n,a;if(defined(e))return defined(i)&&(defined(a=i[e=e.replace(/\\/g,"/")])?r=new Resource({url:a}):(n=new URI(t.getUrlComponent()),defined(a=i[new URI(e).resolve(n)])&&(r=new Resource({url:a})))),defined(r)||(r=t.getDerivedResource({url:e})),r}Object.defineProperties(DeferredLoading.prototype,{dataSource:{get:function(){return this._dataSource}}}),DeferredLoading.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},DeferredLoading.prototype.addPromise=function(e){this._promises.push(e)},DeferredLoading.prototype.wait=function(){var e=this._deferred;return this._used||e.resolve(),when.join(e.promise,when.all(this._promises))},DeferredLoading.prototype.process=function(){var e=1===this._stack.length;return e&&(this._started=KmlDataSource._getTimestamp()),this._process(e)},DeferredLoading.prototype._giveUpTime=function(){var e;this._timeoutSet||(this._timeoutSet=!0,this._timeThreshold=50,e=this,setTimeout((function(){e._timeoutSet=!1,e._started=KmlDataSource._getTimestamp(),e._process(!0)}),0))},DeferredLoading.prototype._nextNode=function(){var e,t=(e=this._stack)[e.length-1],i=t.index;if(i!==(e=t.nodes).length)return++t.index,e[i]},DeferredLoading.prototype._pop=function(){var e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},DeferredLoading.prototype._process=function(e){for(var t=this.dataSource,i=this._stack[this._stack.length-1].processingData,r=this._nextNode();defined(r);){var n=featureTypes[r.localName];if(defined(n)&&(-1!==namespaces.kml.indexOf(r.namespaceURI)||-1!==namespaces.gx.indexOf(r.namespaceURI))&&(n(t,r,i,this),this._timeoutSet||KmlDataSource._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();r=this._nextNode()}this._pop()&&e&&this._process(!0)};var colorOptions={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function parseColorString(e,t){if(defined(e)&&!/^\s*$/gm.test(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,r=parseInt(e.substring(2,4),16)/255,n=parseInt(e.substring(4,6),16)/255;e=parseInt(e.substring(6,8),16)/255;return t?(0<e?(colorOptions.maximumRed=e,colorOptions.red=void 0):(colorOptions.maximumRed=void 0,colorOptions.red=0),0<n?(colorOptions.maximumGreen=n,colorOptions.green=void 0):(colorOptions.maximumGreen=void 0,colorOptions.green=0),0<r?(colorOptions.maximumBlue=r,colorOptions.blue=void 0):(colorOptions.maximumBlue=void 0,colorOptions.blue=0),colorOptions.alpha=i,Color.fromRandom(colorOptions)):new Color(e,n,r,i)}}function queryColorValue(e,t,i){if(defined(t=queryStringValue(e,t,i)))return parseColorString(t,"random"===queryStringValue(e,"colorMode",i))}function processTimeStamp(e){var t=queryFirstNode(e,"TimeStamp",namespaces.kmlgx);e=queryStringValue(t,"when",namespaces.kmlgx);if(defined(t)&&defined(e)&&0!==e.length)return t=JulianDate.fromIso8601(e),(e=new TimeIntervalCollection).addInterval(new TimeInterval({start:t,stop:Iso8601.MAXIMUM_VALUE})),e}function processTimeSpan(e){if(defined(i=queryFirstNode(e,"TimeSpan",namespaces.kmlgx))){e=defined(e=queryFirstNode(i,"begin",namespaces.kmlgx))?JulianDate.fromIso8601(e.textContent):void 0;var t,i=defined(i=queryFirstNode(i,"end",namespaces.kmlgx))?JulianDate.fromIso8601(i.textContent):void 0;return defined(e)&&defined(i)?(JulianDate.lessThan(i,e)&&(t=e,e=i,i=t),(t=new TimeIntervalCollection).addInterval(new TimeInterval({start:e,stop:i}))):defined(e)?(t=new TimeIntervalCollection).addInterval(new TimeInterval({start:e,stop:Iso8601.MAXIMUM_VALUE})):defined(i)&&(t=new TimeIntervalCollection).addInterval(new TimeInterval({start:Iso8601.MINIMUM_VALUE,stop:i})),t}}function createDefaultBillboard(){var e=new BillboardGraphics;return e.width=BILLBOARD_SIZE,e.height=BILLBOARD_SIZE,e.scaleByDistance=new NearFarScalar(BILLBOARD_NEAR_DISTANCE,BILLBOARD_NEAR_RATIO,BILLBOARD_FAR_DISTANCE,BILLBOARD_FAR_RATIO),e.pixelOffsetScaleByDistance=new NearFarScalar(BILLBOARD_NEAR_DISTANCE,BILLBOARD_NEAR_RATIO,BILLBOARD_FAR_DISTANCE,BILLBOARD_FAR_RATIO),e}function createDefaultPolygon(){var e=new PolygonGraphics;return e.outline=!0,e.outlineColor=Color.WHITE,e}function createDefaultLabel(){var e=new LabelGraphics;return e.translucencyByDistance=new NearFarScalar(3e6,1,5e6,0),e.pixelOffset=new Cartesian2(17,0),e.horizontalOrigin=HorizontalOrigin$1.LEFT,e.font="16px sans-serif",e.style=LabelStyle$1.FILL_AND_OUTLINE,e}function getIconHref(e,t,i,r,n){var a,o,s,l=queryStringValue(e,"href",namespaces.kml);if(defined(l)&&0!==l.length)return 0===l.indexOf("root://icons/palette-")&&(a=l.charAt(21),o=defaultValue(queryNumericValue(e,"x",namespaces.gx),0),s=defaultValue(queryNumericValue(e,"y",namespaces.gx),0),o=Math.min(o/32,7),l="https://maps.google.com/mapfiles/kml/pal"+a+"/icon"+(8*(s=7-Math.min(s/32,7))+o)+".png"),i=resolveHref(l,i,r),n?(r=queryStringValue(e,"refreshMode",namespaces.kml),n=queryStringValue(e,"viewRefreshMode",namespaces.kml),"onInterval"===r||"onExpire"===r?oneTimeWarning("kml-refreshMode-"+r,"KML - Unsupported Icon refreshMode: "+r):"onStop"!==n&&"onRegion"!==n||oneTimeWarning("kml-refreshMode-"+n,"KML - Unsupported Icon viewRefreshMode: "+n),r=defaultValue(queryStringValue(e,"viewBoundScale",namespaces.kml),1),n="onStop"===n?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",n=defaultValue(queryStringValue(e,"viewFormat",namespaces.kml),n),e=queryStringValue(e,"httpQuery",namespaces.kml),defined(n)&&i.setQueryParameters(queryToObject(cleanupString(n))),defined(e)&&i.setQueryParameters(queryToObject(cleanupString(e))),e=t._ellipsoid,processNetworkLinkQueryString(i,t._camera,t._canvas,r,t._lastCameraView.bbox,e),i):i}function processBillboardIcon(e,t,i,r,n){var a=queryNumericValue(t,"scale",namespaces.kml),o=queryNumericValue(t,"heading",namespaces.kml),s=queryColorValue(t,"color",namespaces.kml),l=getIconHref(m=queryFirstNode(t,"Icon",namespaces.kml),e,r,n,!1);defined(m)&&!defined(l)&&(l=!1);var c,u,d=queryNumericValue(m,"x",namespaces.gx),h=queryNumericValue(m,"y",namespaces.gx),p=queryNumericValue(m,"w",namespaces.gx),f=queryNumericValue(m,"h",namespaces.gx),m=(r=queryNumericAttribute(e=queryFirstNode(t,"hotSpot",namespaces.kml),"x"),n=queryNumericAttribute(e,"y"),queryStringAttribute(e,"xunits"));t=queryStringAttribute(e,"yunits");defined(e=i.billboard)||(e=createDefaultBillboard(),i.billboard=e),e.image=l,e.scale=a,e.color=s,(defined(d)||defined(h)||defined(p)||defined(f))&&(e.imageSubRegion=new BoundingRectangle(d,h,p,f)),defined(o)&&0!==o&&(e.rotation=CesiumMath.toRadians(-o),e.alignedAxis=Cartesian3.UNIT_Z),a=defaultValue(a,1),defined(r)&&("pixels"===m?c=-r*a:"insetPixels"===m?c=(r-BILLBOARD_SIZE)*a:"fraction"===m&&(c=-r*BILLBOARD_SIZE*a),c+=.5*BILLBOARD_SIZE*a),defined(n)&&("pixels"===t?u=n*a:"insetPixels"===t?u=(-n+BILLBOARD_SIZE)*a:"fraction"===t&&(u=n*BILLBOARD_SIZE*a),u-=.5*BILLBOARD_SIZE*a),(defined(c)||defined(u))&&(e.pixelOffset=new Cartesian2(c,u))}function applyStyle(e,t,i,r,n){for(var a=0,o=t.childNodes.length;a<o;a++){var s,l,c,u=t.childNodes.item(a);"IconStyle"===u.localName?processBillboardIcon(e,u,i,r,n):"LabelStyle"===u.localName?(defined(s=i.label)||(s=createDefaultLabel(),i.label=s),s.scale=defaultValue(queryNumericValue(u,"scale",namespaces.kml),s.scale),s.fillColor=defaultValue(queryColorValue(u,"color",namespaces.kml),s.fillColor),s.text=i.name):"LineStyle"===u.localName?(defined(l=i.polyline)||(l=new PolylineGraphics,i.polyline=l),l.width=queryNumericValue(u,"width",namespaces.kml),l.material=queryColorValue(u,"color",namespaces.kml),defined(queryColorValue(u,"outerColor",namespaces.gx))&&oneTimeWarning("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),defined(queryNumericValue(u,"outerWidth",namespaces.gx))&&oneTimeWarning("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),defined(queryNumericValue(u,"physicalWidth",namespaces.gx))&&oneTimeWarning("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),defined(queryBooleanValue(u,"labelVisibility",namespaces.gx))&&oneTimeWarning("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")):"PolyStyle"===u.localName?(defined(c=i.polygon)||(c=createDefaultPolygon(),i.polygon=c),c.material=defaultValue(queryColorValue(u,"color",namespaces.kml),c.material),c.fill=defaultValue(queryBooleanValue(u,"fill",namespaces.kml),c.fill),c.outline=defaultValue(queryBooleanValue(u,"outline",namespaces.kml),c.outline)):"BalloonStyle"===u.localName?(s=defaultValue(parseColorString(queryStringValue(u,"bgColor",namespaces.kml)),Color.WHITE),l=defaultValue(parseColorString(queryStringValue(u,"textColor",namespaces.kml)),Color.BLACK),c=queryStringValue(u,"text",namespaces.kml),i.addProperty("balloonStyle"),i.balloonStyle={bgColor:s,textColor:l,text:c}):"ListStyle"===u.localName&&("radioFolder"!==(u=queryStringValue(u,"listItemType",namespaces.kml))&&"checkOffOnly"!==u||oneTimeWarning("kml-listStyle-"+u,"KML - Unsupported ListStyle with listItemType: "+u))}}function computeFinalStyle(e,t,i,r,n){for(var a,o=new Entity,s=-1,l=t.childNodes,c=l.length,u=0;u<c;u++){var d=l[u];"Style"!==d.localName&&"StyleMap"!==d.localName||(s=u)}if(-1!==s){var h=l[s];if("Style"===h.localName)applyStyle(e,h,o,r,n);else for(var p=queryChildNodes(h,"Pair",namespaces.kml),f=0;f<p.length;f++){var m,g=p[f],y=queryStringValue(g,"key",namespaces.kml);"normal"===y?defined(m=queryStringValue(g,"styleUrl",namespaces.kml))?(defined(a=i.getById(m))||(a=i.getById("#"+m)),defined(a)&&o.merge(a)):applyStyle(e,queryFirstNode(g,"Style",namespaces.kml),o,r,n):oneTimeWarning("kml-styleMap-"+y,"KML - Unsupported StyleMap key: "+y)}}var _=queryStringValue(t,"styleUrl",namespaces.kml);return defined(_)&&("#"!==(h=_)[0]&&-1!==_.indexOf("#")&&(_=(t=_.split("#"))[0],h=r.getDerivedResource({url:_}).getUrlComponent()+"#"+t[1]),defined(a=i.getById(h))||(a=i.getById("#"+h)),defined(a)&&o.merge(a)),o}function processExternalStyles(e,t,i){return t.fetchXML().then((function(r){return processStyles(e,r,i,t,!0)}))}function processStyles(e,t,i,r,n,a){var o,s,l=queryNodes(t,"Style",namespaces.kml);if(defined(l))for(var c=l.length,u=0;u<c;u++)defined(y=queryStringAttribute(s=l[u],"id"))&&(y="#"+y,n&&defined(r)&&(y=r.getUrlComponent()+y),defined(i.getById(y))||(o=new Entity({id:y}),i.add(o),applyStyle(e,s,o,r,a)));var d=queryNodes(t,"StyleMap",namespaces.kml);if(defined(d)){var h=d.length;for(u=0;u<h;u++){var p=d[u];if(defined(y=queryStringAttribute(p,"id")))for(var f=queryChildNodes(p,"Pair",namespaces.kml),m=0;m<f.length;m++){var g,y,_=f[m],v=queryStringValue(_,"key",namespaces.kml);"normal"===v?(y="#"+y,n&&defined(r)&&(y=r.getUrlComponent()+y),defined(i.getById(y))||(o=i.getOrCreateEntity(y),defined(g=queryStringValue(_,"styleUrl",namespaces.kml))?("#"!==g[0]&&(g="#"+g),n&&defined(r)&&(g=r.getUrlComponent()+g),defined(g=i.getById(g))&&o.merge(g)):applyStyle(e,s=queryFirstNode(_,"Style",namespaces.kml),o,r,a))):oneTimeWarning("kml-styleMap-"+v,"KML - Unsupported StyleMap key: "+v)}}}var C=[],x=t.getElementsByTagName("styleUrl"),b=x.length;for(u=0;u<b;u++){var S=x[u].textContent;"#"===S[0]||2===(S=S.split("#")).length&&(S=S[0],S=r.getDerivedResource({url:S}),C.push(processExternalStyles(e,S,i)))}return C}function createDropLine(e,t,i){var r=new ReferenceProperty(e,t.id,["position"]);e=new ScaledPositionProperty(t.position);t.polyline=defined(i.polyline)?i.polyline.clone():new PolylineGraphics,t.polyline.positions=new PositionPropertyArray([r,e])}function heightReferenceFromAltitudeMode(e,t){return!defined(e)&&!defined(t)||"clampToGround"===e?HeightReference$1.CLAMP_TO_GROUND:"relativeToGround"===e?HeightReference$1.RELATIVE_TO_GROUND:"absolute"===e?HeightReference$1.NONE:"clampToSeaFloor"===t?(oneTimeWarning("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),HeightReference$1.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(oneTimeWarning("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),HeightReference$1.RELATIVE_TO_GROUND):(defined(e)?oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown <kml:altitudeMode>:"+e+", using <kml:altitudeMode>:CLAMP_TO_GROUND."):oneTimeWarning("kml-gx:altitudeMode-unknown","KML - Unknown <gx:altitudeMode>:"+t+", using <kml:altitudeMode>:CLAMP_TO_GROUND."),HeightReference$1.CLAMP_TO_GROUND)}function createPositionPropertyFromAltitudeMode(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((defined(t)&&"clampToGround"!==t||defined(i)&&"clampToSeaFloor"!==i)&&oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+defaultValue(t,i)),new ScaledPositionProperty(e))}function createPositionPropertyArrayFromAltitudeMode(e,t,i,r){if(defined(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(defined(t)&&"clampToGround"!==t||defined(i)&&"clampToSeaFloor"!==i)&&oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+defaultValue(t,i));for(var n=e.length,a=0;a<n;a++){var o=e[a];r.scaleToGeodeticSurface(o,o)}return e}}function processPositionGraphics(e,t,i,r){var n=t.label;defined(n)||(n=defined(i.label)?i.label.clone():createDefaultLabel(),t.label=n),n.text=t.name;var a=t.billboard;defined(a)||(a=defined(i.billboard)?i.billboard.clone():createDefaultBillboard(),t.billboard=a),defined(a.image)?a.image.getValue()||(a.image=void 0):a.image=e._pinBuilder.fromColor(Color.YELLOW,64),t=1,defined(a.scale)&&(0!==(t=a.scale.getValue())?n.pixelOffset=new Cartesian2(16*t+1,0):(n.pixelOffset=void 0,n.horizontalOrigin=void 0)),defined(r)&&e._clampToGround&&(a.heightReference=r,n.heightReference=r)}function processPathGraphics(e,t){var i=e.path;defined(i)||((i=new PathGraphics).leadTime=0,e.path=i),defined(t=t.polyline)&&(i.material=t.material,i.width=t.width)}function processPoint$2(e,t,i,r,n){var a=queryStringValue(i,"coordinates",namespaces.kml),o=queryStringValue(i,"altitudeMode",namespaces.kml),s=queryStringValue(i,"altitudeMode",namespaces.gx);i=queryBooleanValue(i,"extrude",namespaces.kml),a=readCoordinate(a,e._ellipsoid);return r.position=a,processPositionGraphics(e,r,n,heightReferenceFromAltitudeMode(o,s)),i&&isExtrudable(o,s)&&createDropLine(t,r,n),!0}function processLineStringOrLinearRing(e,t,i,r,n){var a,o=queryFirstNode(i,"coordinates",namespaces.kml),s=queryStringValue(i,"altitudeMode",namespaces.kml),l=queryStringValue(i,"altitudeMode",namespaces.gx),c=queryBooleanValue(i,"extrude",namespaces.kml),u=queryBooleanValue(i,"tessellate",namespaces.kml),d=isExtrudable(s,l),h=queryNumericValue(i,"drawOrder",namespaces.gx),p=e._ellipsoid;i=readCoordinates(o,p),o=n.polyline;return d&&c?(c=new WallGraphics,(r.wall=c).positions=i,defined(a=n.polygon)&&(c.fill=a.fill,c.material=a.material),c.outline=!0,defined(o)?(c.outlineColor=defined(o.material)?o.material.color:Color.WHITE,c.outlineWidth=o.width):defined(a)&&(c.outlineColor=defined(a.material)?a.material.color:Color.WHITE)):e._clampToGround&&!d&&u?((a=new PolylineGraphics).clampToGround=!0,(r.polyline=a).positions=i,defined(o)?(a.material=defined(o.material)?o.material.color.getValue(Iso8601.MINIMUM_VALUE):Color.WHITE,a.width=defaultValue(o.width,1)):(a.material=Color.WHITE,a.width=1),a.zIndex=h):(defined(h)&&oneTimeWarning("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!u&&oneTimeWarning("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),o=defined(o)?o.clone():new PolylineGraphics,(r.polyline=o).positions=createPositionPropertyArrayFromAltitudeMode(i,s,l,p),u&&!d||(o.arcType=ArcType$1.NONE)),!0}function processPolygon$2(e,t,i,r,n){var a=queryFirstNode(i,"outerBoundaryIs",namespaces.kml),o=queryFirstNode(a,"LinearRing",namespaces.kml),s=queryFirstNode(o,"coordinates",namespaces.kml),l=e._ellipsoid,c=readCoordinates(s,l),u=queryBooleanValue(i,"extrude",namespaces.kml),d=isExtrudable(queryStringValue(i,"altitudeMode",namespaces.kml),queryStringValue(i,"altitudeMode",namespaces.gx));a=defined(n.polygon)?n.polygon.clone():createDefaultPolygon();if(defined(n=n.polyline)&&(a.outlineColor=defined(n.material)?n.material.color:Color.WHITE,a.outlineWidth=n.width),r.polygon=a,d?(a.perPositionHeight=!0,a.extrudedHeight=u?0:void 0):e._clampToGround||(a.height=0),defined(c)){for(var h=new PolygonHierarchy(c),p=queryChildNodes(i,"innerBoundaryIs",namespaces.kml),f=0;f<p.length;f++){o=queryChildNodes(p[f],"LinearRing",namespaces.kml);for(var m=0;m<o.length;m++)defined(c=readCoordinates(queryFirstNode(o[m],"coordinates",namespaces.kml),l))&&h.holes.push(new PolygonHierarchy(c))}a.hierarchy=h}return!0}function processTrack(e,t,i,r,n){var a=queryStringValue(i,"altitudeMode",namespaces.kml),o=queryStringValue(i,"altitudeMode",namespaces.gx),s=queryChildNodes(i,"coord",namespaces.gx),l=queryChildNodes(i,"angles",namespaces.gx),c=queryChildNodes(i,"when",namespaces.kml),u=queryBooleanValue(i,"extrude",namespaces.kml),d=(i=isExtrudable(a,o),e._ellipsoid);0<l.length&&oneTimeWarning("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");for(var h=Math.min(s.length,c.length),p=[],f=[],m=0;m<h;m++){var g=readCoordinate(s[m].textContent,d);p.push(g),f.push(JulianDate.fromIso8601(c[m].textContent))}return(l=new SampledPositionProperty).addSamples(f,p),r.position=l,processPositionGraphics(e,r,n,heightReferenceFromAltitudeMode(a,o)),processPathGraphics(r,n),r.availability=new TimeIntervalCollection,0<c.length&&r.availability.addInterval(new TimeInterval({start:f[0],stop:f[f.length-1]})),i&&u&&createDropLine(t,r,n),!0}function addToMultiTrack(e,t,i,r,n,a,o,s,l){var c=e[0],u=e[e.length-1],d=new SampledPositionProperty;d.addSamples(e,t),i.intervals.addInterval(new TimeInterval({start:c,stop:u,isStartIncluded:l,isStopIncluded:l,data:createPositionPropertyFromAltitudeMode(d,o,s)})),r.addInterval(new TimeInterval({start:c,stop:u,isStartIncluded:l,isStopIncluded:l})),n.intervals.addInterval(new TimeInterval({start:c,stop:u,isStartIncluded:l,isStopIncluded:l,data:a}))}function processMultiTrack(e,t,i,r,n){for(var a,o,s=queryBooleanValue(i,"interpolate",namespaces.gx),l=queryChildNodes(i,"Track",namespaces.gx),c=!1,u=new TimeIntervalCollectionProperty,d=new TimeIntervalCollection,h=new CompositePositionProperty,p=e._ellipsoid,f=0,m=l.length;f<m;f++){for(var g=queryChildNodes(x=l[f],"when",namespaces.kml),y=queryChildNodes(x,"coord",namespaces.gx),_=queryStringValue(x,"altitudeMode",namespaces.kml),v=queryStringValue(x,"altitudeMode",namespaces.gx),C=isExtrudable(_,v),x=queryBooleanValue(x,"extrude",namespaces.kml),b=Math.min(y.length,g.length),S=[],T=[],E=0;E<b;E++){var w=readCoordinate(y[E].textContent,p);S.push(w),T.push(JulianDate.fromIso8601(g[E].textContent))}s&&(defined(a)&&addToMultiTrack([a,T[0]],[o,S[0]],h,d,u,!1,"absolute",void 0,!1),a=T[b-1],o=S[S.length-1]),addToMultiTrack(T,S,h,d,u,C&&x,_,v,!0),c=c||C&&x}return r.availability=d,r.position=h,processPositionGraphics(e,r,n),processPathGraphics(r,n),c&&(createDropLine(t,r,n),r.polyline.show=u),!0}var geometryTypes$1={Point:processPoint$2,LineString:processLineStringOrLinearRing,LinearRing:processLineStringOrLinearRing,Polygon:processPolygon$2,Track:processTrack,MultiTrack:processMultiTrack,MultiGeometry:processMultiGeometry,Model:processUnsupportedGeometry},scratchDiv;function processMultiGeometry(e,t,i,r,n,a){for(var o=i.childNodes,s=!1,l=0,c=o.length;l<c;l++){var u,d=o.item(l),h=geometryTypes$1[d.localName];defined(h)&&((u=createEntity(d,t,a)).parent=r,u.name=r.name,u.availability=r.availability,u.description=r.description,u.kml=r.kml,h(e,t,d,u,n)&&(s=!0))}return s}function processUnsupportedGeometry(e,t,i,r,n){return oneTimeWarning("kml-unsupportedGeometry","KML - Unsupported geometry: "+i.localName),!1}function processExtendedData(e,t){if(defined(e=queryFirstNode(e,"ExtendedData",namespaces.kml))){defined(queryFirstNode(e,"SchemaData",namespaces.kml))&&oneTimeWarning("kml-schemaData","KML - SchemaData is unsupported"),defined(queryStringAttribute(e,"xmlns:prefix"))&&oneTimeWarning("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");var i={},r=queryChildNodes(e,"Data",namespaces.kml);if(defined(r))for(var n=r.length,a=0;a<n;a++){var o=r[a],s=queryStringAttribute(o,"name");defined(s)&&(i[s]={displayName:queryStringValue(o,"displayName",namespaces.kml),value:queryStringValue(o,"value",namespaces.kml)})}t.kml.extendedData=i}}function processDescription$1(e,t,i,r,n){var a,o,s=t.kml,l=s.extendedData,c=queryStringValue(e,"description",namespaces.kml),u=defaultValue(t.balloonStyle,i.balloonStyle),d=(e=Color.WHITE,i=Color.BLACK,c);if(defined(u)&&(e=defaultValue(u.bgColor,Color.WHITE),i=defaultValue(u.textColor,Color.BLACK),d=defaultValue(u.text,c)),defined(d)){if(d=(d=(d=(d=(d=(d=d.replace("$[name]",defaultValue(t.name,""))).replace("$[description]",defaultValue(c,""))).replace("$[address]",defaultValue(s.address,""))).replace("$[Snippet]",defaultValue(s.snippet,""))).replace("$[id]",t.id)).replace("$[geDirections]",""),defined(l)){var h=d.match(/\$\[.+?\]/g);if(null!==h)for(_=0;_<h.length;_++){var p,f=h[_],m=f.substr(2,f.length-3),g=/\/displayName$/.test(m);defined(p=l[m=m.replace(/\/displayName$/,"")])&&(p=g?p.displayName:p.value),defined(p)&&(d=d.replace(f,defaultValue(p,"")))}}}else if(defined(l)&&0<(o=Object.keys(l)).length){for(d='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',_=0;_<o.length;_++)d+="<tr><th>"+defaultValue((p=l[a=o[_]]).displayName,a)+"</th><td>"+defaultValue(p.value,"")+"</td></tr>";d+="</tbody></table>"}if(defined(d)){d=autolinker.link(d),scratchDiv.innerHTML=d;for(var y=scratchDiv.querySelectorAll("a"),_=0;_<y.length;_++)y[_].setAttribute("target","_blank");defined(r)&&1<r.keys.length&&(embedDataUris(scratchDiv,"a","href",r),embedDataUris(scratchDiv,"img","src",r)),applyBasePath(scratchDiv,"a","href",n),applyBasePath(scratchDiv,"img","src",n),n='<div class="cesium-infoBox-description-lighter" style="',n+="overflow:auto;",n+="word-wrap:break-word;",n+="background-color:"+e.toCssColorString()+";",n+="color:"+i.toCssColorString()+";",n+='">',n+=scratchDiv.innerHTML+"</div>",scratchDiv.innerHTML="",t.description=n}}function processFeature$1(e,t,i){var r=i.entityCollection,n=i.parentEntity,a=i.sourceResource,o=i.uriResolver,s=createEntity(t,r,i.context),l=s.kml;r=computeFinalStyle(e,t,i.styleCollection,a,o),i=queryStringValue(t,"name",namespaces.kml);return s.name=i,s.parent=n,defined(i=processTimeSpan(t))||(i=processTimeStamp(t)),s.availability=i,mergeAvailabilityWithParent(s),i=queryBooleanValue(t,"visibility",namespaces.kml),s.show=function e(t){return!t||t.show&&e(t.parent)}(n)&&defaultValue(i,!0),n=queryFirstNode(t,"author",namespaces.atom),(i=l.author).name=queryStringValue(n,"name",namespaces.atom),i.uri=queryStringValue(n,"uri",namespaces.atom),i.email=queryStringValue(n,"email",namespaces.atom),i=queryFirstNode(t,"link",namespaces.atom),(n=l.link).href=queryStringAttribute(i,"href"),n.hreflang=queryStringAttribute(i,"hreflang"),n.rel=queryStringAttribute(i,"rel"),n.type=queryStringAttribute(i,"type"),n.title=queryStringAttribute(i,"title"),n.length=queryStringAttribute(i,"length"),l.address=queryStringValue(t,"address",namespaces.kml),l.phoneNumber=queryStringValue(t,"phoneNumber",namespaces.kml),l.snippet=queryStringValue(t,"Snippet",namespaces.kml),processExtendedData(t,s),processDescription$1(t,s,r,o,a),processLookAt(t,s,e=e._ellipsoid),processCamera(t,s,e),defined(queryFirstNode(t,"Region",namespaces.kml))&&oneTimeWarning("kml-region","KML - Placemark Regions are unsupported"),{entity:s,styleEntity:r}}function processDocument$1(e,t,i,r){r.addNodes(t.childNodes,i),r.process()}function processFolder(e,t,i,r){var n=processFeature$1(e,t,i);(i=clone(i)).parentEntity=n.entity,processDocument$1(e,t,i,r)}function processPlacemark(e,t,i,r){for(var n=processFeature$1(e,t,i),a=n.entity,o=n.styleEntity,s=!1,l=t.childNodes,c=0,u=l.length;c<u&&!s;c++){var d=l.item(c),h=geometryTypes$1[d.localName];defined(h)&&(h(e,i.entityCollection,d,a,o,a.id),s=!0)}s||(a.merge(o),processPositionGraphics(e,a,o))}"undefined"!=typeof document&&(scratchDiv=document.createElement("div"));var playlistNodeProcessors={FlyTo:processTourFlyTo,Wait:processTourWait,SoundCue:processTourUnsupportedNode,AnimatedUpdate:processTourUnsupportedNode,TourControl:processTourUnsupportedNode};function processTour(e,t,i,r){var n=new KmlTour(queryStringValue(t,"name",namespaces.kml),queryStringAttribute(t,"id"));if(t=queryFirstNode(t,"Playlist",namespaces.gx))for(var a=e._ellipsoid,o=t.childNodes,s=0;s<o.length;s++){var l,c=o[s];c.localName&&((l=playlistNodeProcessors[c.localName])?l(n,c,a):console.log("Unknown KML Tour playlist entry type "+c.localName))}defined(e.kmlTours)||(e.kmlTours=[]),e.kmlTours.push(n)}function processTourUnsupportedNode(e,t){oneTimeWarning("KML Tour unsupported node "+t.localName)}function processTourWait(e,t){t=queryNumericValue(t,"duration",namespaces.gx),e.addPlaylistEntry(new KmlTourWait(t))}function processTourFlyTo(e,t,i){var r=queryNumericValue(t,"duration",namespaces.gx),n=queryStringValue(t,"flyToMode",namespaces.gx),a={kml:{}};processLookAt(t,a,i),processCamera(t,a,i),a=new KmlTourFlyTo(r,n,a.kml.lookAt||a.kml.camera),e.addPlaylistEntry(a)}function processCamera(e,t,i){var r,n,a,o,s=queryFirstNode(e,"Camera",namespaces.kml);defined(s)&&(r=defaultValue(queryNumericValue(s,"longitude",namespaces.kml),0),n=defaultValue(queryNumericValue(s,"latitude",namespaces.kml),0),a=defaultValue(queryNumericValue(s,"altitude",namespaces.kml),0),o=defaultValue(queryNumericValue(s,"heading",namespaces.kml),0),e=defaultValue(queryNumericValue(s,"tilt",namespaces.kml),0),s=defaultValue(queryNumericValue(s,"roll",namespaces.kml),0),i=Cartesian3.fromDegrees(r,n,a,i),s=HeadingPitchRoll.fromDegrees(o,e-90,s),t.kml.camera=new KmlCamera(i,s))}function processLookAt(e,t,i){var r,n,a,o,s=queryFirstNode(e,"LookAt",namespaces.kml);defined(s)&&(r=defaultValue(queryNumericValue(s,"longitude",namespaces.kml),0),n=defaultValue(queryNumericValue(s,"latitude",namespaces.kml),0),a=defaultValue(queryNumericValue(s,"altitude",namespaces.kml),0),o=queryNumericValue(s,"heading",namespaces.kml),e=queryNumericValue(s,"tilt",namespaces.kml),s=defaultValue(queryNumericValue(s,"range",namespaces.kml),0),e=CesiumMath.toRadians(defaultValue(e,0)),s=new HeadingPitchRange(o=CesiumMath.toRadians(defaultValue(o,0)),e-CesiumMath.PI_OVER_TWO,s),i=Cartesian3.fromDegrees(r,n,a,i),t.kml.lookAt=new KmlLookAt(i,s))}function processGroundOverlay(e,t,i,r){var n,a=processFeature$1(e,t,i).entity,o=!1,s=e._ellipsoid,l=readCoordinates(queryFirstNode(t,"LatLonQuad",namespaces.gx),s),c=queryNumericValue(t,"drawOrder",namespaces.kml);defined(l)?((n=createDefaultPolygon()).hierarchy=new PolygonHierarchy(l),n.zIndex=c,a.polygon=n,o=!0):((n=new RectangleGraphics).zIndex=c,a.rectangle=n,defined(s=queryFirstNode(t,"LatLonBox",namespaces.kml))&&(l=queryNumericValue(s,"west",namespaces.kml),c=queryNumericValue(s,"south",namespaces.kml),a=queryNumericValue(s,"east",namespaces.kml),u=queryNumericValue(s,"north",namespaces.kml),defined(l)&&(l=CesiumMath.negativePiToPi(CesiumMath.toRadians(l))),defined(c)&&(c=CesiumMath.clampToLatitudeRange(CesiumMath.toRadians(c))),defined(a)&&(a=CesiumMath.negativePiToPi(CesiumMath.toRadians(a))),defined(u)&&(u=CesiumMath.clampToLatitudeRange(CesiumMath.toRadians(u))),n.coordinates=new Rectangle(l,c,a,u),defined(u=queryNumericValue(s,"rotation",namespaces.kml))&&(d=CesiumMath.toRadians(u),n.rotation=d,n.stRotation=d)));var u=queryFirstNode(t,"Icon",namespaces.kml),d=getIconHref(u,e,i.sourceResource,i.uriResolver,!0);defined(d)?(o&&oneTimeWarning("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection."),e=queryNumericValue(u,"x",namespaces.gx),i=queryNumericValue(u,"y",namespaces.gx),o=queryNumericValue(u,"w",namespaces.gx),u=queryNumericValue(u,"h",namespaces.gx),(defined(e)||defined(i)||defined(o)||defined(u))&&oneTimeWarning("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),n.material=d,n.material.color=queryColorValue(t,"color",namespaces.kml),n.material.transparent=!0):n.material=queryColorValue(t,"color",namespaces.kml),defined(d=queryStringValue(t,"altitudeMode",namespaces.kml))?"absolute"===d?(n.height=queryNumericValue(t,"altitude",namespaces.kml),n.zIndex=void 0):"clampToGround"!==d&&oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+d):"relativeToSeaFloor"===(d=queryStringValue(t,"altitudeMode",namespaces.gx))?(oneTimeWarning("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),n.height=queryNumericValue(t,"altitude",namespaces.kml),n.zIndex=void 0):"clampToSeaFloor"===d?oneTimeWarning("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):defined(d)&&oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+d)}function processUnsupportedFeature(e,t,i,r){e._unsupportedNode.raiseEvent(e,i.parentEntity,t,i.entityCollection,i.styleCollection,i.sourceResource,i.uriResolver),oneTimeWarning("kml-unsupportedFeature-"+t.nodeName,"KML - Unsupported feature: "+t.nodeName)}var RefreshMode={INTERVAL:0,EXPIRE:1,STOP:2};function cleanupString(e){if(!defined(e)||0===e.length)return"";var t=e[0];return"&"!==t&&"?"!==t||(e=e.substring(1)),e}var zeroRectangle=new Rectangle,scratchCartographic$9=new Cartographic,scratchCartesian2$9=new Cartesian2,scratchCartesian3$a=new Cartesian3;function processNetworkLinkQueryString(e,t,i,r,n,a){function o(e){return e<-CesiumMath.PI_OVER_TWO?-CesiumMath.PI_OVER_TWO:e>CesiumMath.PI_OVER_TWO?CesiumMath.PI_OVER_TWO:e}function s(e){return e>CesiumMath.PI?e-CesiumMath.TWO_PI:e<-CesiumMath.PI?e+CesiumMath.TWO_PI:e}var l,c,u,d,h=objectToQuery(e.queryParameters);h=h.replace(/%5B/g,"[").replace(/%5D/g,"]"),h=defined(t)&&t._mode!==SceneMode$1.MORPHING?(n=defaultValue(n,zeroRectangle),defined(i)&&(scratchCartesian2$9.x=.5*i.clientWidth,scratchCartesian2$9.y=.5*i.clientHeight,l=t.pickEllipsoid(scratchCartesian2$9,a,scratchCartesian3$a)),defined(l)?d=a.cartesianToCartographic(l,scratchCartographic$9):(d=Rectangle.center(n,scratchCartographic$9),l=a.cartographicToCartesian(d)),defined(r)&&!CesiumMath.equalsEpsilon(r,1,CesiumMath.EPSILON9)&&(c=n.width*r*.5,u=n.height*r*.5,n=new Rectangle(s(d.longitude-c),o(d.latitude-u),s(d.longitude+c),o(d.latitude+u))),h=(h=(h=(h=h.replace("[bboxWest]",CesiumMath.toDegrees(n.west).toString())).replace("[bboxSouth]",CesiumMath.toDegrees(n.south).toString())).replace("[bboxEast]",CesiumMath.toDegrees(n.east).toString())).replace("[bboxNorth]",CesiumMath.toDegrees(n.north).toString()),u=CesiumMath.toDegrees(d.longitude).toString(),n=CesiumMath.toDegrees(d.latitude).toString(),h=(h=(h=(h=(h=(h=(h=(h=h.replace("[lookatLon]",u)).replace("[lookatLat]",n)).replace("[lookatTilt]",CesiumMath.toDegrees(t.pitch).toString())).replace("[lookatHeading]",CesiumMath.toDegrees(t.heading).toString())).replace("[lookatRange]",Cartesian3.distance(t.positionWC,l))).replace("[lookatTerrainLon]",u)).replace("[lookatTerrainLat]",n)).replace("[lookatTerrainAlt]",d.height.toString()),a.cartesianToCartographic(t.positionWC,scratchCartographic$9),h=(h=(h=h.replace("[cameraLon]",CesiumMath.toDegrees(scratchCartographic$9.longitude).toString())).replace("[cameraLat]",CesiumMath.toDegrees(scratchCartographic$9.latitude).toString())).replace("[cameraAlt]",CesiumMath.toDegrees(scratchCartographic$9.height).toString()),d=n="",defined(t=(a=t.frustum).aspectRatio)&&(a=CesiumMath.toDegrees(a.fov),1<t?d=(n=a)/t:n=(d=a)*t),(h=h.replace("[horizFov]",n.toString())).replace("[vertFov]",d.toString())):(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=h.replace("[bboxWest]","-180")).replace("[bboxSouth]","-90")).replace("[bboxEast]","180")).replace("[bboxNorth]","90")).replace("[lookatLon]","")).replace("[lookatLat]","")).replace("[lookatRange]","")).replace("[lookatTilt]","")).replace("[lookatHeading]","")).replace("[lookatTerrainLon]","")).replace("[lookatTerrainLat]","")).replace("[lookatTerrainAlt]","")).replace("[cameraLon]","")).replace("[cameraLat]","")).replace("[cameraAlt]","")).replace("[horizFov]","")).replace("[vertFov]",""),h=(h=(h=(h=(h=(h=defined(i)?(h=h.replace("[horizPixels]",i.clientWidth)).replace("[vertPixels]",i.clientHeight):(h=h.replace("[horizPixels]","")).replace("[vertPixels]","")).replace("[terrainEnabled]","1")).replace("[clientVersion]","1")).replace("[kmlVersion]","2.2")).replace("[clientName]","Cesium")).replace("[language]","English"),e.setQueryParameters(queryToObject(h))}function processNetworkLink(e,t,i,r){var n,a,o,s,l=processFeature$1(e,t,i).entity,c=i.sourceResource,u=i.uriResolver,d=queryFirstNode(t,"Link",namespaces.kml);defined(d)||(d=queryFirstNode(t,"Url",namespaces.kml)),!defined(d)||defined(o=queryStringValue(d,"href",namespaces.kml))&&(o=resolveHref(t=o,c,i.uriResolver),/^data:/.test(o.getUrlComponent())?/\.kmz/i.test(c.getUrlComponent())||(t=c.getDerivedResource({url:t})):(t=o.clone(),n=queryStringValue(d,"viewRefreshMode",namespaces.kml),a=defaultValue(queryStringValue(d,"viewBoundScale",namespaces.kml),1),i="onStop"===n?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",c=defaultValue(queryStringValue(d,"viewFormat",namespaces.kml),i),i=queryStringValue(d,"httpQuery",namespaces.kml),defined(c)&&o.setQueryParameters(queryToObject(cleanupString(c))),defined(i)&&o.setQueryParameters(queryToObject(cleanupString(i))),i=e._ellipsoid,processNetworkLinkQueryString(o,e._camera,e._canvas,a,e._lastCameraView.bbox,i)),u={sourceUri:t,uriResolver:u,context:l.id},s=new EntityCollection,u=load$2(e,s,o,u).then((function(t){var i=e._entityCollection,r=s.values;i.suspendEvents();for(var c=0;c<r.length;c++){var u=r[c];defined(u.parent)||(u.parent=l,mergeAvailabilityWithParent(u)),i.add(u)}i.resumeEvents();var h=queryStringValue(d,"refreshMode",namespaces.kml),p=defaultValue(queryNumericValue(d,"refreshInterval",namespaces.kml),0);if("onInterval"===h&&0<p||"onExpire"===h||"onStop"===n){var f,m=queryFirstNode(t,"NetworkLinkControl",namespaces.kml),g=(t=defined(m),JulianDate.now()),y={id:createGuid(),href:o,cookie:{},lastUpdated:g,updating:!1,entity:l,viewBoundScale:a,needsUpdate:!1,cameraUpdateTime:g},_=0;if(t&&(y.cookie=queryToObject(defaultValue(queryStringValue(m,"cookie",namespaces.kml),"")),_=defaultValue(queryNumericValue(m,"minRefreshPeriod",namespaces.kml),0)),"onInterval"===h)t&&(p=Math.max(_,p)),y.refreshMode=RefreshMode.INTERVAL,y.time=p;else if("onExpire"===h)if(t&&(f=queryStringValue(m,"expires",namespaces.kml)),defined(f))try{var v=JulianDate.fromIso8601(f),C=JulianDate.secondsDifference(v,g);0<C&&C<_&&JulianDate.addSeconds(g,_,v),y.refreshMode=RefreshMode.EXPIRE,y.time=v}catch(t){oneTimeWarning("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else oneTimeWarning("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element");else e._camera?(y.refreshMode=RefreshMode.STOP,y.time=defaultValue(queryNumericValue(d,"viewRefreshTime",namespaces.kml),0)):oneTimeWarning("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires a camera be passed in when creating the KmlDataSource");defined(y.refreshMode)&&e._networkLinks.set(y.id,y)}else"onRegion"===n&&oneTimeWarning("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion")})).otherwise((function(t){oneTimeWarning("An error occured during loading "+o.url),e._error.raiseEvent(e,t)})),r.addPromise(u))}function processFeatureNode(e,t,i,r){var n=featureTypes[t.localName];return defined(n)?n(e,t,i,r):processUnsupportedFeature(e,t,i)}function loadKml(e,t,i,r,n,a){var o;t.removeAll(),defined(o=queryStringValue("Document"===(o=i.documentElement).localName?o:queryFirstNode(o,"Document",namespaces.kml),"name",namespaces.kml))||(o=getFilenameFromUri(r.getUrlComponent())),defined(e._name)||(e._name=o);var s=new KmlDataSource._DeferredLoading(e),l=new EntityCollection(e);return when.all(processStyles(e,i,l,r,!1,n)).then((function(){var o=i.documentElement;if("kml"===o.localName)for(var c=o.childNodes,u=0;u<c.length;u++){var d=c[u];if(defined(featureTypes[d.localName])){o=d;break}}var h={parentEntity:void 0,entityCollection:t,styleCollection:l,sourceResource:r,uriResolver:n,context:a};return t.suspendEvents(),processFeatureNode(e,o,h,s),t.resumeEvents(),s.wait().then((function(){return i.documentElement}))}))}function loadKmz(e,t,i,r){var n=when.defer();return zip.createReader(new zip.BlobReader(i),(function(i){i.getEntries((function(a){for(var o,s,l=[],c={},u=0;u<a.length;u++){var d,h=a[u];h.directory||(d=when.defer(),l.push(d.promise),!/\.kml$/i.test(h.filename)||defined(o)&&/\//i.test(h.filename)?loadDataUriFromZip(h,c,d):(defined(o)&&loadDataUriFromZip(o,c,s),o=h,s=d))}defined(o)&&loadXmlFromZip(o,c,s),when.all(l).then((function(){return i.close(),defined(c.kml)?(c.keys=Object.keys(c),loadKml(e,t,c.kml,r,c)):void n.reject(new RuntimeError("KMZ file does not contain a KML document."))})).then(n.resolve).otherwise(n.reject)}))}),(function(e){n.reject(e)})),n.promise}function load$2(e,t,i,r){var n=(r=defaultValue(r,defaultValue.EMPTY_OBJECT)).sourceUri,a=r.uriResolver,o=r.context;r=i;if("string"==typeof i||i instanceof Resource){r=(i=Resource.createIfNeeded(i)).fetchBlob(),n=defaultValue(n,i.clone());var s=e._resourceCredits,l=i.credits;if(defined(l))for(var c=l.length,u=0;u<c;u++)s.push(l[u])}else n=defaultValue(n,Resource.DEFAULT.clone());return n=Resource.createIfNeeded(n),when(r).then((function(i){return i instanceof Blob?isZipFile(i).then((function(r){return r?loadKmz(e,t,i,n):readBlobAsText(i).then((function(i){var r,s;i=removeDuplicateNamespaces(i=insertNamespaces(i));try{r=parser.parseFromString(i,"application/xml")}catch(i){s=i.toString()}if(defined(s)||r.body||"parsererror"===r.documentElement.tagName)throw new RuntimeError((defined(s)?s:r.documentElement.firstChild.nodeValue)||r.body.innerText);return loadKml(e,t,r,n,a,o)}))})):loadKml(e,t,i,n,a,o)})).otherwise((function(t){return e._error.raiseEvent(e,t),console.log(t),when.reject(t)}))}function KmlDataSource(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).camera,i=e.canvas;this._changed=new Event,this._error=new Event,this._loading=new Event,this._refresh=new Event,this._unsupportedNode=new Event,this._clock=void 0,this._entityCollection=new EntityCollection(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new PinBuilder,this._networkLinks=new AssociativeArray,this._entityCluster=new EntityCluster,this._canvas=i,this._camera=t,this._lastCameraView={position:defined(t)?Cartesian3.clone(t.positionWC):void 0,direction:defined(t)?Cartesian3.clone(t.directionWC):void 0,up:defined(t)?Cartesian3.clone(t.upWC):void 0,bbox:defined(t)?t.computeViewRectangle():Rectangle.clone(Rectangle.MAX_VALUE)},this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),"string"==typeof(e=e.credit)&&(e=new Credit(e)),this._credit=e,this._resourceCredits=[]}function mergeAvailabilityWithParent(e){var t,i=e.parent;!defined(i)||defined(t=i.availability)&&(defined(i=e.availability)?i.intersect(t):e.availability=t)}function getNetworkLinkUpdateCallback(e,t,i,r,n){return function(a){if(r.contains(t.id)){var o=!1,s=queryFirstNode(a,"NetworkLinkControl",namespaces.kml),l=0;if(defined(s)){if(defined(queryFirstNode(s,"Update",namespaces.kml)))return oneTimeWarning("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void r.remove(t.id);t.cookie=queryToObject(defaultValue(queryStringValue(s,"cookie",namespaces.kml),"")),l=defaultValue(queryNumericValue(s,"minRefreshPeriod",namespaces.kml),0)}var c,u=JulianDate.now(),d=t.refreshMode;if(d===RefreshMode.INTERVAL)defined(s)&&(t.time=Math.max(l,t.time));else if(d===RefreshMode.EXPIRE)if(defined(s)&&(c=queryStringValue(s,"expires",namespaces.kml)),defined(c))try{var h=JulianDate.fromIso8601(c),p=JulianDate.secondsDifference(h,u);0<p&&p<l&&JulianDate.addSeconds(u,l,h),t.time=h}catch(a){oneTimeWarning("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),o=!0}else oneTimeWarning("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),o=!0;var f=t.entity,m=e._entityCollection,g=i.values;m.suspendEvents();for(var y=m.values.slice(),_=0;_<y.length;++_){var v=y[_];v.parent===f&&(v.parent=void 0,function e(t){m.remove(t);for(var i=t._children,r=i.length,n=0;n<r;++n)e(i[n])}(v))}for(m.resumeEvents(),m.suspendEvents(),_=0;_<g.length;_++){var C=g[_];defined(C.parent)||(C.parent=f,mergeAvailabilityWithParent(C)),m.add(C)}m.resumeEvents(),o?r.remove(t.id):t.lastUpdated=u,d=(a=m.computeAvailability()).start,s=a.stop,o=JulianDate.equals(d,Iso8601.MINIMUM_VALUE),a=JulianDate.equals(s,Iso8601.MAXIMUM_VALUE),o&&a||(a=e._clock).startTime===d&&a.stopTime===s||(a.startTime=d,a.stopTime=s,e._changed.raiseEvent(e)),t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,n.getUrlComponent(!0))}}}KmlDataSource.load=function(e,t){return new KmlDataSource(t=defaultValue(t,defaultValue.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(KmlDataSource.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}}),KmlDataSource.prototype.load=function(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT),DataSource.setLoading(this,!0);var i=this._name;this._name=void 0,this._clampToGround=defaultValue(t.clampToGround,!1);var r=this;return load$2(this,this._entityCollection,e,t).then((function(){var e,t=(o=r._entityCollection.computeAvailability()).start,n=o.stop,a=JulianDate.equals(t,Iso8601.MINIMUM_VALUE),o=JulianDate.equals(n,Iso8601.MAXIMUM_VALUE);return a&&o||(a&&((e=new Date).setHours(0,0,0,0),t=JulianDate.fromDate(e)),o&&((e=new Date).setHours(24,0,0,0),n=JulianDate.fromDate(e)),(e=new DataSourceClock).startTime=t,e.stopTime=n,e.currentTime=JulianDate.clone(t),e.clockRange=ClockRange$1.LOOP_STOP,e.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(JulianDate.secondsDifference(n,t)/60,1),31556900))),t=!1,e!==r._clock&&(r._clock=e,t=!0),i!==r._name&&(t=!0),t&&r._changed.raiseEvent(r),DataSource.setLoading(r,!1),r})).otherwise((function(e){return DataSource.setLoading(r,!1),r._error.raiseEvent(r,e),console.log(e),when.reject(e)}))};var entitiesToIgnore=new AssociativeArray;function KmlFeatureData(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}function Visualizer(){DeveloperError.throwInstantiationError()}KmlDataSource.prototype.update=function(e){var t=this._networkLinks;if(0===t.length)return!0;var i=JulianDate.now(),r=this;entitiesToIgnore.removeAll();var n=!1,a=this._lastCameraView,o=this._camera;!defined(o)||o.positionWC.equalsEpsilon(a.position,CesiumMath.EPSILON7)&&o.directionWC.equalsEpsilon(a.direction,CesiumMath.EPSILON7)&&o.upWC.equalsEpsilon(a.up,CesiumMath.EPSILON7)||(a.position=Cartesian3.clone(o.positionWC),a.direction=Cartesian3.clone(o.directionWC),a.up=Cartesian3.clone(o.upWC),a.bbox=o.computeViewRectangle(),n=!0);var s=new AssociativeArray,l=!1;return t.values.forEach((function(e){var t,o,c,u=e.entity;entitiesToIgnore.contains(u.id)||(e.updating||(c=!1,e.refreshMode===RefreshMode.INTERVAL?JulianDate.secondsDifference(i,e.lastUpdated)>e.time&&(c=!0):e.refreshMode===RefreshMode.EXPIRE?JulianDate.greaterThan(i,e.time)&&(c=!0):e.refreshMode===RefreshMode.STOP&&(n&&(e.needsUpdate=!0,e.cameraUpdateTime=i),e.needsUpdate&&JulianDate.secondsDifference(i,e.cameraUpdateTime)>=e.time&&(c=!0)),c&&(function e(t){for(var i=t._children,r=i.length,n=0;n<r;++n){var a=i[n];entitiesToIgnore.set(a.id,a),e(a)}}(u),e.updating=!0,t=new EntityCollection,(o=e.href.clone()).setQueryParameters(e.cookie),c=defaultValue(r._ellipsoid,Ellipsoid.WGS84),processNetworkLinkQueryString(o,r._camera,r._canvas,e.viewBoundScale,a.bbox,c),load$2(r,t,o,{context:u.id}).then(getNetworkLinkUpdateCallback(r,e,t,s,o)).otherwise((function(t){t="NetworkLink "+e.href+" refresh failed: "+t,console.log(t),r._error.raiseEvent(r,t)})),l=!0)),s.set(e.id,e))})),l&&(this._networkLinks=s,this._changed.raiseEvent(this)),!0},KmlDataSource._DeferredLoading=DeferredLoading,KmlDataSource._getTimestamp=getTimestamp$1,Visualizer.prototype.update=DeveloperError.throwInstantiationError,Visualizer.prototype.getBoundingSphere=DeveloperError.throwInstantiationError,Visualizer.prototype.isDestroyed=DeveloperError.throwInstantiationError,Visualizer.prototype.destroy=DeveloperError.throwInstantiationError;var BILLBOARD_SIZE$1=32,kmlNamespace="http://www.opengis.net/kml/2.2",gxNamespace="http://www.google.com/kml/ext/2.2",xmlnsNamespace="http://www.w3.org/2000/xmlns/";function ExternalFileHandler(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var imageTypeRegex=/^data:image\/([^,;]+)/;function getModelBlobHander(e,t){return function(i){e._files[t]=i}}function ValueGetter(e){this._time=e}function StyleCache(){this._ids={},this._styles={},this._count=0}function IdManager(){this._ids={}}function exportKml(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).entities,i=defaultValue(e.kmz,!1),r=exportKml._createState(e),n=t.values.filter((function(e){return!defined(e.parent)}));(t=(e=r.kmlDoc).documentElement).setAttributeNS(xmlnsNamespace,"xmlns:gx",gxNamespace),e=e.createElement("Document"),t.appendChild(e),recurseEntities(r,e,n),r.styleCache.save(e);var a=r.externalFileHandler;return a.promise.then((function(){var e=(new XMLSerializer).serializeToString(r.kmlDoc);return i?createKmz(e,a.files):{kml:e,externalFiles:a.files}}))}function createKmz(e,t){var i=when.defer();return zip.createWriter(new zip.BlobWriter,(function(r){addKmlToZip(r,e).then((function(){var e=Object.keys(t);return addExternalFilesToZip(r,e,t,0)})).then((function(){r.close((function(e){i.resolve({kmz:e})}))}))})),i.promise}function addKmlToZip(e,t){var i=when.defer();return e.add("doc.kml",new zip.TextReader(t),(function(){i.resolve()})),i.promise}function addExternalFilesToZip(e,t,i,r){if(t.length!==r){var n=t[r],a=when.defer();return e.add(n,new zip.BlobReader(i[n]),(function(){a.resolve()})),a.promise.then((function(){return addExternalFilesToZip(e,t,i,r+1)}))}}function recurseEntities(e,t,i){for(var r=e.kmlDoc,n=e.styleCache,a=e.valueGetter,o=e.idManager,s=i.length,l=0;l<s;++l){var c,u,d,h=i[l],p=[];createPoint$1(e,h,u=[],d=[]),createLineString$1(e,h.polyline,u,d),createPolygon$1(e,h.rectangle,u,d,p),createPolygon$1(e,h.polygon,u,d,p),createModel$1(e,h,h.model,u,d);var f=h.availability;defined(f)&&(c=r.createElement("TimeSpan"),JulianDate.equals(f.start,Iso8601.MINIMUM_VALUE)||c.appendChild(createBasicElementWithText(r,"begin",JulianDate.toIso8601(f.start))),JulianDate.equals(f.stop,Iso8601.MAXIMUM_VALUE)||c.appendChild(createBasicElementWithText(r,"end",JulianDate.toIso8601(f.stop))));for(var m=0;m<p.length;++m){var g=p[m];g.setAttribute("id",o.get(h.id)),g.appendChild(createBasicElementWithText(r,"name",h.name)),g.appendChild(createBasicElementWithText(r,"visibility",h.show)),g.appendChild(createBasicElementWithText(r,"description",h.description)),defined(c)&&g.appendChild(c),t.appendChild(g)}var y=u.length;if(0<y){var _=r.createElement("Placemark");_.setAttribute("id",o.get(h.id));var v,C=h.name,x=h.label;defined(x)&&(v=r.createElement("LabelStyle"),C=defined(f=a.get(x.text))&&0<f.length?f:C,defined(f=a.getColor(x.fillColor))&&(v.appendChild(createBasicElementWithText(r,"color",f)),v.appendChild(createBasicElementWithText(r,"colorMode","normal"))),defined(x=a.get(x.scale))&&v.appendChild(createBasicElementWithText(r,"scale",x)),d.push(v)),_.appendChild(createBasicElementWithText(r,"name",C)),_.appendChild(createBasicElementWithText(r,"visibility",h.show)),_.appendChild(createBasicElementWithText(r,"description",h.description)),defined(c)&&_.appendChild(c),t.appendChild(_);var b=d.length;if(0<b){for(var S=r.createElement("Style"),T=0;T<b;++T)S.appendChild(d[T]);_.appendChild(createBasicElementWithText(r,"styleUrl",n.get(S)))}if(1===u.length)_.appendChild(u[0]);else if(1<u.length){for(var E=r.createElement("MultiGeometry"),w=0;w<y;++w)E.appendChild(u[w]);_.appendChild(E)}}0<(C=h._children).length&&((_=r.createElement("Folder")).setAttribute("id",o.get(h.id)),_.appendChild(createBasicElementWithText(r,"name",h.name)),_.appendChild(createBasicElementWithText(r,"visibility",h.show)),_.appendChild(createBasicElementWithText(r,"description",h.description)),t.appendChild(_),recurseEntities(e,_,C))}}ExternalFileHandler.prototype.texture=function(e){var t=this;if("string"==typeof e||e instanceof Resource){if(!(e=Resource.createIfNeeded(e)).isDataUri)return e.url;var i=e.url.match(imageTypeRegex),r="texture_"+ ++this._count;return defined(i)&&(r+="."+i[1]),i=e.fetchBlob().then((function(e){t._files[r]=e})),this._promises.push(i),r}if(e instanceof HTMLCanvasElement){var n=when.defer();return this._promises.push(n.promise),r="texture_"+ ++this._count+".png",e.toBlob((function(e){t._files[r]=e,n.resolve()})),r}return""},ExternalFileHandler.prototype.model=function(e,t){var i=this._modelCallback;if(!defined(i))throw new RuntimeError("Encountered a model entity while exporting to KML, but no model callback was supplied.");var r,n,a={};t=i(e,t,a);for(r in a)a.hasOwnProperty(r)&&(n=when(a[r]),this._promises.push(n),n.then(getModelBlobHander(this,r)));return t},Object.defineProperties(ExternalFileHandler.prototype,{promise:{get:function(){return when.all(this._promises)}},files:{get:function(){return this._files}}}),ValueGetter.prototype.get=function(e,t,i){var r;return defined(e)&&(r=defined(e.getValue)?e.getValue(this._time,i):e),defaultValue(r,t)},ValueGetter.prototype.getColor=function(e,t){if(defined(t=this.get(e,t)))return colorToString(t)},ValueGetter.prototype.getMaterialType=function(e){if(defined(e))return e.getType(this._time)},StyleCache.prototype.get=function(e){var t=this._ids,i=e.innerHTML;if(defined(t[i]))return t[i];var r="style-"+ ++this._count;return e.setAttribute("id",r),r="#"+r,t[i]=r,this._styles[i]=e,r},StyleCache.prototype.save=function(e){var t,i=this._styles,r=e.childNodes[0];for(t in i)i.hasOwnProperty(t)&&e.insertBefore(i[t],r)},IdManager.prototype.get=function(e){if(!defined(e))return this.get(createGuid());var t=this._ids;return defined(t[e])?e.toString()+"-"+ ++t[e]:(t[e]=0,e)},exportKml._createState=function(e){var t=e.entities,i=new StyleCache,r=t.computeAvailability(),n=defined(e.time)?e.time:r.start,a=defaultValue(e.defaultAvailability,r);t=defaultValue(e.sampleDuration,60);return a.start===Iso8601.MINIMUM_VALUE?a.stop===Iso8601.MAXIMUM_VALUE?a=new TimeInterval:JulianDate.addSeconds(a.stop,-10*t,a.start):a.stop===Iso8601.MAXIMUM_VALUE&&JulianDate.addSeconds(a.start,10*t,a.stop),r=new ExternalFileHandler(e.modelCallback),{kmlDoc:document.implementation.createDocument(kmlNamespace,"kml"),ellipsoid:defaultValue(e.ellipsoid,Ellipsoid.WGS84),idManager:new IdManager,styleCache:i,externalFileHandler:r,time:n,valueGetter:new ValueGetter(n),sampleDuration:t,defaultAvailability:new TimeIntervalCollection([a])}};var scratchCartesian3$b=new Cartesian3,scratchCartographic$a=new Cartographic,scratchJulianDate$2=new JulianDate;function createPoint$1(e,t,i,r){var n,a=e.kmlDoc,o=e.ellipsoid,s=e.valueGetter,l=defaultValue(t.billboard,t.point);(defined(l)||defined(t.path))&&((n=t.position).isConstant?(s.get(n,void 0,scratchCartesian3$b),n=createBasicElementWithText(a,"coordinates",getCoordinates(scratchCartesian3$b,o)),o=a.createElement("Point"),(a=a.createElement("altitudeMode")).appendChild(getAltitudeMode(e,l.heightReference)),o.appendChild(a),o.appendChild(n),i.push(o),o=(l instanceof BillboardGraphics?createIconStyleFromBillboard:createIconStyleFromPoint)(e,l),r.push(o)):createTracks(e,t,l,i,r))}function createTracks(e,t,i,r,n){var a,o=e.kmlDoc,s=e.ellipsoid,l=e.valueGetter,c=t.position,u=!0;c instanceof CompositePositionProperty?(a=c.intervals,u=!1):a=defaultValue(t.availability,e.defaultAvailability);var d,h,p=i instanceof ModelGraphics,f=[];for(M=0;M<a.length;++M){var m=a.get(M),g=u?c:m.data,y=o.createElement("altitudeMode");g instanceof ScaledPositionProperty?(g=g._value,y.appendChild(getAltitudeMode(e,HeightReference$1.CLAMP_TO_GROUND))):defined(i)?y.appendChild(getAltitudeMode(e,i.heightReference)):y.appendChild(getAltitudeMode(e,HeightReference$1.NONE));var _=[],v=[];if(g.isConstant){l.get(g,void 0,scratchCartesian3$b);var C=createBasicElementWithText(o,"coordinates",getCoordinates(scratchCartesian3$b,s));_.push(JulianDate.toIso8601(m.start)),v.push(C),_.push(JulianDate.toIso8601(m.stop)),v.push(C)}else if(g instanceof SampledPositionProperty)for(d=g._property._times,b=0;b<d.length;++b)_.push(JulianDate.toIso8601(d[b])),g.getValueInReferenceFrame(d[b],ReferenceFrame$1.FIXED,scratchCartesian3$b),v.push(getCoordinates(scratchCartesian3$b,s));else if(g instanceof SampledProperty){d=g._times;for(var x=g._values,b=0;b<d.length;++b)_.push(JulianDate.toIso8601(d[b])),Cartesian3.fromArray(x,3*b,scratchCartesian3$b),v.push(getCoordinates(scratchCartesian3$b,s))}else{var S=e.sampleDuration;m.start.clone(scratchJulianDate$2),m.isStartIncluded||JulianDate.addSeconds(scratchJulianDate$2,S,scratchJulianDate$2);for(var T=m.stop;JulianDate.lessThan(scratchJulianDate$2,T);)g.getValue(scratchJulianDate$2,scratchCartesian3$b),_.push(JulianDate.toIso8601(scratchJulianDate$2)),v.push(getCoordinates(scratchCartesian3$b,s)),JulianDate.addSeconds(scratchJulianDate$2,S,scratchJulianDate$2);m.isStopIncluded&&JulianDate.equals(scratchJulianDate$2,T)&&(g.getValue(scratchJulianDate$2,scratchCartesian3$b),_.push(JulianDate.toIso8601(scratchJulianDate$2)),v.push(getCoordinates(scratchCartesian3$b,s)))}var E=o.createElementNS(gxNamespace,"Track");E.appendChild(y);for(var w=0;w<_.length;++w){var A=createBasicElementWithText(o,"when",_[w]),P=createBasicElementWithText(o,"coord",v[w],gxNamespace);E.appendChild(A),E.appendChild(P)}p&&E.appendChild(createModelGeometry(e,i)),f.push(E)}if(1===f.length)r.push(f[0]);else if(1<f.length){for(var D=o.createElementNS(gxNamespace,"MultiTrack"),M=0;M<f.length;++M)D.appendChild(f[M]);r.push(D)}defined(i)&&!p&&(h=(i instanceof BillboardGraphics?createIconStyleFromBillboard:createIconStyleFromPoint)(e,i),n.push(h)),defined(r=t.path)&&(h=l.get(r.width),(defined(t=r.material)||defined(h))&&(r=o.createElement("LineStyle"),defined(h)&&r.appendChild(createBasicElementWithText(o,"width",h)),processMaterial(e,t,r),n.push(r)))}function createIconStyleFromPoint(e,t){var i=e.kmlDoc,r=e.valueGetter,n=i.createElement("IconStyle");return defined(e=r.getColor(t.color))&&(n.appendChild(createBasicElementWithText(i,"color",e)),n.appendChild(createBasicElementWithText(i,"colorMode","normal"))),defined(t=r.get(t.pixelSize))&&n.appendChild(createBasicElementWithText(i,"scale",t/BILLBOARD_SIZE$1)),n}function createIconStyleFromBillboard(e,t){var i=e.kmlDoc,r=e.valueGetter,n=e.externalFileHandler,a=i.createElement("IconStyle");defined(e=r.get(t.image))&&(e=n.texture(e),(s=i.createElement("Icon")).appendChild(createBasicElementWithText(i,"href",e)),defined(o=r.get(t.imageSubRegion))&&(s.appendChild(createBasicElementWithText(i,"x",o.x,gxNamespace)),s.appendChild(createBasicElementWithText(i,"y",o.y,gxNamespace)),s.appendChild(createBasicElementWithText(i,"w",o.width,gxNamespace)),s.appendChild(createBasicElementWithText(i,"h",o.height,gxNamespace))),a.appendChild(s)),defined(e=r.getColor(t.color))&&(a.appendChild(createBasicElementWithText(i,"color",e)),a.appendChild(createBasicElementWithText(i,"colorMode","normal")));var o=r.get(t.scale);defined(o)&&a.appendChild(createBasicElementWithText(i,"scale",o));var s=r.get(t.pixelOffset);defined(s)&&(o=defaultValue(o,1),Cartesian2.divideByScalar(s,o,s),e=r.get(t.width,BILLBOARD_SIZE$1),l=r.get(t.height,BILLBOARD_SIZE$1),(o=r.get(t.horizontalOrigin,HorizontalOrigin$1.CENTER))===HorizontalOrigin$1.CENTER?s.x-=.5*e:o===HorizontalOrigin$1.RIGHT&&(s.x-=e),(e=r.get(t.verticalOrigin,VerticalOrigin$1.CENTER))===VerticalOrigin$1.TOP?s.y+=l:e===VerticalOrigin$1.CENTER&&(s.y+=.5*l),(l=i.createElement("hotSpot")).setAttribute("x",-s.x),l.setAttribute("y",s.y),l.setAttribute("xunits","pixels"),l.setAttribute("yunits","pixels"),a.appendChild(l));var l=r.get(t.rotation);t=r.get(t.alignedAxis);return defined(l)&&Cartesian3.equals(Cartesian3.UNIT_Z,t)&&(0===(l=CesiumMath.toDegrees(-l))&&(l=360),a.appendChild(createBasicElementWithText(i,"heading",l))),a}function createLineString$1(e,t,i,r){var n,a,o,s,l=e.kmlDoc,c=e.ellipsoid,u=e.valueGetter;defined(t)&&(s=l.createElement("LineString"),o=l.createElement("altitudeMode"),a=(n=u.get(t.clampToGround,!1))?(s.appendChild(createBasicElementWithText(l,"tessellate",!0)),l.createTextNode("clampToGround")):l.createTextNode("absolute"),o.appendChild(a),s.appendChild(o),o=t.positions,c=createBasicElementWithText(l,"coordinates",getCoordinates(u.get(o),c)),s.appendChild(c),c=u.get(t.zIndex),n&&defined(c)&&s.appendChild(createBasicElementWithText(l,"drawOrder",c,gxNamespace)),i.push(s),s=l.createElement("LineStyle"),defined(u=u.get(t.width))&&s.appendChild(createBasicElementWithText(l,"width",u)),processMaterial(e,t.material,s),r.push(s))}function getRectangleBoundaries(e,t,i){var r=e.kmlDoc,n=(e=e.valueGetter).get(t.height,0);0<i&&(n=i);t=t.coordinates;for(var a=e.get(t),o=[],s=[Rectangle.northeast,Rectangle.southeast,Rectangle.southwest,Rectangle.northwest],l=0;l<4;++l)s[l](a,scratchCartographic$a),o.push(CesiumMath.toDegrees(scratchCartographic$a.longitude)+","+CesiumMath.toDegrees(scratchCartographic$a.latitude)+","+n);return e=createBasicElementWithText(r,"coordinates",o.join(" ")),t=r.createElement("outerBoundaryIs"),(r=r.createElement("LinearRing")).appendChild(e),t.appendChild(r),[t]}function getLinearRing(e,t,i,r){for(var n=e.kmlDoc,a=e.ellipsoid,o=[],s=t.length,l=0;l<s;++l)Cartographic.fromCartesian(t[l],a,scratchCartographic$a),o.push(CesiumMath.toDegrees(scratchCartographic$a.longitude)+","+CesiumMath.toDegrees(scratchCartographic$a.latitude)+","+(r?scratchCartographic$a.height:i));return e=createBasicElementWithText(n,"coordinates",o.join(" ")),(n=n.createElement("LinearRing")).appendChild(e),n}function getPolygonBoundaries(e,t,i){var r=e.kmlDoc,n=(s=e.valueGetter).get(t.height,0),a=s.get(t.perPositionHeight,!1);!a&&0<i&&(n=i);var o=[],s=(i=t.hierarchy,t=s.get(i),Array.isArray(t)?t:t.positions);(i=r.createElement("outerBoundaryIs")).appendChild(getLinearRing(e,s,n,a)),o.push(i);var l=t.holes;if(defined(l))for(var c=l.length,u=0;u<c;++u){var d=r.createElement("innerBoundaryIs");d.appendChild(getLinearRing(e,l[u].positions,n,a)),o.push(d)}return o}function createPolygon$1(e,t,i,r,n){var a=e.kmlDoc,o=e.valueGetter;if(defined(t)){var s=t instanceof RectangleGraphics;if(s&&"Image"===o.getMaterialType(t.material))createGroundOverlay(e,t,n);else{var l=a.createElement("Polygon");0<(n=o.get(t.extrudedHeight,0))&&l.appendChild(createBasicElementWithText(a,"extrude",!0));for(var c=(s?getRectangleBoundaries:getPolygonBoundaries)(e,t,n),u=c.length,d=0;d<u;++d)l.appendChild(c[d]);(n=a.createElement("altitudeMode")).appendChild(getAltitudeMode(e,t.heightReference)),l.appendChild(n),i.push(l),n=a.createElement("PolyStyle"),(i=o.get(t.fill,!1))&&n.appendChild(createBasicElementWithText(a,"fill",i)),processMaterial(e,t.material,n),(i=o.get(t.outline,!1))&&(n.appendChild(createBasicElementWithText(a,"outline",i)),e=a.createElement("LineStyle"),i=o.get(t.outlineWidth,1),e.appendChild(createBasicElementWithText(a,"width",i)),t=o.getColor(t.outlineColor,Color.BLACK),e.appendChild(createBasicElementWithText(a,"color",t)),e.appendChild(createBasicElementWithText(a,"colorMode","normal")),r.push(e)),r.push(n)}}}function createGroundOverlay(e,t,i){var r=e.kmlDoc,n=e.valueGetter,a=e.externalFileHandler,o=r.createElement("GroundOverlay"),s=r.createElement("altitudeMode");s.appendChild(getAltitudeMode(e,t.heightReference)),o.appendChild(s),defined(e=n.get(t.height))&&o.appendChild(createBasicElementWithText(r,"altitude",e)),s=n.get(t.coordinates),(e=r.createElement("LatLonBox")).appendChild(createBasicElementWithText(r,"north",CesiumMath.toDegrees(s.north))),e.appendChild(createBasicElementWithText(r,"south",CesiumMath.toDegrees(s.south))),e.appendChild(createBasicElementWithText(r,"east",CesiumMath.toDegrees(s.east))),e.appendChild(createBasicElementWithText(r,"west",CesiumMath.toDegrees(s.west))),o.appendChild(e),n=n.get(t.material),t=a.texture(n.image),(a=r.createElement("Icon")).appendChild(createBasicElementWithText(r,"href",t)),o.appendChild(a),defined(n.color)&&o.appendChild(createBasicElementWithText(r,"color",colorToString(n.color))),i.push(o)}function createModelGeometry(e,t){var i=e.kmlDoc,r=e.valueGetter,n=e.externalFileHandler,a=i.createElement("Model");defined(r=r.get(t.scale))&&((o=i.createElement("scale")).appendChild(createBasicElementWithText(i,"x",r)),o.appendChild(createBasicElementWithText(i,"y",r)),o.appendChild(createBasicElementWithText(i,"z",r)),a.appendChild(o));var o=i.createElement("Link");e=n.model(t,e.time);return o.appendChild(createBasicElementWithText(i,"href",e)),a.appendChild(o),a}function createModel$1(e,t,i,r,n){var a,o,s,l=e.kmlDoc,c=e.ellipsoid,u=e.valueGetter;defined(i)&&((a=t.position).isConstant?(o=createModelGeometry(e,i),(s=l.createElement("altitudeMode")).appendChild(getAltitudeMode(e,i.heightReference)),o.appendChild(s),u.get(a,void 0,scratchCartesian3$b),Cartographic.fromCartesian(scratchCartesian3$b,c,scratchCartographic$a),(c=l.createElement("Location")).appendChild(createBasicElementWithText(l,"longitude",CesiumMath.toDegrees(scratchCartographic$a.longitude))),c.appendChild(createBasicElementWithText(l,"latitude",CesiumMath.toDegrees(scratchCartographic$a.latitude))),c.appendChild(createBasicElementWithText(l,"altitude",scratchCartographic$a.height)),o.appendChild(c),r.push(o)):createTracks(e,t,i,r,n))}function processMaterial(e,t,i){var r,n=e.kmlDoc,a=e.valueGetter;if(defined(t)&&defined(e=a.get(t))){switch(a.getMaterialType(t)){case"Image":r=colorToString(Color.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":r=colorToString(e.color);break;case"PolylineOutline":r=colorToString(e.color),a=colorToString(e.outlineColor),t=e.outlineWidth,i.appendChild(createBasicElementWithText(n,"outerColor",a,gxNamespace)),i.appendChild(createBasicElementWithText(n,"outerWidth",t,gxNamespace));break;case"Stripe":r=colorToString(e.oddColor)}defined(r)&&(i.appendChild(createBasicElementWithText(n,"color",r)),i.appendChild(createBasicElementWithText(n,"colorMode","normal")))}}function getAltitudeMode(e,t){var i,r=e.kmlDoc;switch(e.valueGetter.get(t,HeightReference$1.NONE)){case HeightReference$1.NONE:i=r.createTextNode("absolute");break;case HeightReference$1.CLAMP_TO_GROUND:i=r.createTextNode("clampToGround");break;case HeightReference$1.RELATIVE_TO_GROUND:i=r.createTextNode("relativeToGround")}return i}function getCoordinates(e,t){Array.isArray(e)||(e=[e]);for(var i=e.length,r=[],n=0;n<i;++n)Cartographic.fromCartesian(e[n],t,scratchCartographic$a),r.push(CesiumMath.toDegrees(scratchCartographic$a.longitude)+","+CesiumMath.toDegrees(scratchCartographic$a.latitude)+","+scratchCartographic$a.height);return r.join(" ")}function createBasicElementWithText(e,t,i,r){return"boolean"==typeof(i=defaultValue(i,""))&&(i=i?"1":"0"),t=defined(r)?e.createElementNS(r,t):e.createElement(t),i="string"===i&&-1!==i.indexOf("<")?e.createCDATASection(i):e.createTextNode(i),t.appendChild(i),t}function colorToString(e){for(var t="",i=e.toBytes(),r=3;0<=r;--r)t+=i[r]<16?"0"+i[r].toString(16):i[r].toString(16);return t}var ViewportQuadVS="attribute vec4 position;\nattribute vec2 textureCoordinates;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_Position = position;\nv_textureCoordinates = textureCoordinates;\n}\n",renderStateScratch;function ComputeEngine(e){this._context=e}var drawCommandScratch=new DrawCommand({primitiveType:PrimitiveType$1.TRIANGLES}),clearCommandScratch=new ClearCommand({color:new Color(0,0,0,0)});function createFramebuffer$1(e,t){return new Framebuffer({context:e,colorTextures:[t],destroyAttachments:!1})}function createViewportQuadShader(e,t){return ShaderProgram.fromCache({context:e,vertexShaderSource:ViewportQuadVS,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function createRenderState(e,t){return defined(renderStateScratch)&&renderStateScratch.viewport.width===e&&renderStateScratch.viewport.height===t||(renderStateScratch=RenderState.fromCache({viewport:new BoundingRectangle(0,0,e,t)})),renderStateScratch}function PassState(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}function ShaderCache(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function destroyShader(e,t){for(var i=t.derivedKeywords,r=i.length,n=0;n<r;++n){var a=i[n]+t.keyword;destroyShader(e,e._shaders[a])}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}function TextureCache(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}function SunLight(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.color=Color.clone(defaultValue(e.color,Color.WHITE)),this.intensity=defaultValue(e.intensity,2)}function UniformState(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new BoundingRectangle,this._viewportCartesian4=new Cartesian4,this._viewportDirty=!1,this._viewportOrthographicMatrix=Matrix4.clone(Matrix4.IDENTITY),this._viewportTransformation=Matrix4.clone(Matrix4.IDENTITY),this._model=Matrix4.clone(Matrix4.IDENTITY),this._view=Matrix4.clone(Matrix4.IDENTITY),this._inverseView=Matrix4.clone(Matrix4.IDENTITY),this._projection=Matrix4.clone(Matrix4.IDENTITY),this._infiniteProjection=Matrix4.clone(Matrix4.IDENTITY),this._entireFrustum=new Cartesian2,this._currentFrustum=new Cartesian2,this._frustumPlanes=new Cartesian4,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=Matrix3.clone(Matrix4.IDENTITY),this._view3DDirty=!0,this._view3D=new Matrix4,this._inverseView3DDirty=!0,this._inverseView3D=new Matrix4,this._inverseModelDirty=!0,this._inverseModel=new Matrix4,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new Matrix3,this._viewRotation=new Matrix3,this._inverseViewRotation=new Matrix3,this._viewRotation3D=new Matrix3,this._inverseViewRotation3D=new Matrix3,this._inverseProjectionDirty=!0,this._inverseProjection=new Matrix4,this._modelViewDirty=!0,this._modelView=new Matrix4,this._modelView3DDirty=!0,this._modelView3D=new Matrix4,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new Matrix4,this._inverseModelViewDirty=!0,this._inverseModelView=new Matrix4,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new Matrix4,this._viewProjectionDirty=!0,this._viewProjection=new Matrix4,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new Matrix4,this._modelViewProjectionDirty=!0,this._modelViewProjection=new Matrix4,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new Matrix4,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new Matrix4,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new Matrix4,this._normalDirty=!0,this._normal=new Matrix3,this._normal3DDirty=!0,this._normal3D=new Matrix3,this._inverseNormalDirty=!0,this._inverseNormal=new Matrix3,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new Matrix3,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new EncodedCartesian3,this._cameraPosition=new Cartesian3,this._sunPositionWC=new Cartesian3,this._sunPositionColumbusView=new Cartesian3,this._sunDirectionWC=new Cartesian3,this._sunDirectionEC=new Cartesian3,this._moonDirectionEC=new Cartesian3,this._lightDirectionWC=new Cartesian3,this._lightDirectionEC=new Cartesian3,this._lightColor=new Cartesian3,this._lightColorHdr=new Cartesian3,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new Cartesian3,this._cameraRight=new Cartesian3,this._cameraUp=new Cartesian3,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new Cartesian2,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new Color,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new Cartesian2,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._imagerySplitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}function setView(e,t){Matrix4.clone(t,e._view),Matrix4.getMatrix3(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function setInverseView(e,t){Matrix4.clone(t,e._inverseView),Matrix4.getMatrix3(t,e._inverseViewRotation)}function setProjection(e,t){Matrix4.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function setInfiniteProjection(e,t){Matrix4.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}function setCamera(e,t){Cartesian3.clone(t.positionWC,e._cameraPosition),Cartesian3.clone(t.directionWC,e._cameraDirection),Cartesian3.clone(t.rightWC,e._cameraRight),Cartesian3.clone(t.upWC,e._cameraUp),defined(t=t.positionCartographic)?e._eyeHeight=t.height:e._eyeHeight=-e._ellipsoid.maximumRadius,e._encodedCameraPositionMCDirty=!0}ComputeEngine.prototype.execute=function(e){defined(e.preExecute)&&e.preExecute(e);var t=e.outputTexture,i=t.width,r=t.height,n=this._context,a=defined(e.vertexArray)?e.vertexArray:n.getViewportQuadVertexArray(),o=defined(e.shaderProgram)?e.shaderProgram:createViewportQuadShader(n,e.fragmentShaderSource),s=createFramebuffer$1(n,t),l=createRenderState(i,r);i=e.uniformMap;(r=clearCommandScratch).framebuffer=s,r.renderState=l,r.execute(n),(r=drawCommandScratch).vertexArray=a,r.renderState=l,r.shaderProgram=o,r.uniformMap=i,r.framebuffer=s,r.execute(n),s.destroy(),e.persists||(o.destroy(),defined(e.vertexArray)&&a.destroy()),defined(e.postExecute)&&e.postExecute(t)},ComputeEngine.prototype.isDestroyed=function(){return!1},ComputeEngine.prototype.destroy=function(){return destroyObject(this)},Object.defineProperties(ShaderCache.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),ShaderCache.prototype.replaceShaderProgram=function(e){return defined(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},ShaderCache.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,r=e.attributeLocations;"string"==typeof t&&(t=new ShaderSource({sources:[t]})),"string"==typeof i&&(i=new ShaderSource({sources:[i]}));var n,a=t.createCombinedVertexShader(this._context),o=i.createCombinedFragmentShader(this._context),s=a+o+JSON.stringify(r);return defined(this._shaders[s])?(n=this._shaders[s],delete this._shadersToRelease[s]):(n={cache:this,shaderProgram:r=new ShaderProgram({gl:(e=this._context)._gl,logShaderCompilation:e.logShaderCompilation,debugShaders:e.debugShaders,vertexShaderSource:t,vertexShaderText:a,fragmentShaderSource:i,fragmentShaderText:o,attributeLocations:r}),keyword:s,derivedKeywords:[],count:0},r._cachedShader=n,this._shaders[s]=n,++this._numberOfShaders),++n.count,n.shaderProgram},ShaderCache.prototype.replaceDerivedShaderProgram=function(e,t,i){var r=e._cachedShader,n=t+r.keyword;return defined(n=this._shaders[n])&&(destroyShader(this,n),-1<(n=r.derivedKeywords.indexOf(t))&&r.derivedKeywords.splice(n,1)),this.createDerivedShaderProgram(e,t,i)},ShaderCache.prototype.getDerivedShaderProgram=function(e,t){if(e=t+e._cachedShader.keyword,defined(e=this._shaders[e]))return e.shaderProgram},ShaderCache.prototype.createDerivedShaderProgram=function(e,t,i){var r=e._cachedShader,n=t+r.keyword,a=i.vertexShaderSource,o=i.fragmentShaderSource,s=i.attributeLocations;"string"==typeof a&&(a=new ShaderSource({sources:[a]})),"string"==typeof o&&(o=new ShaderSource({sources:[o]}));var l=this._context;e=a.createCombinedVertexShader(l),i=o.createCombinedFragmentShader(l),s={cache:this,shaderProgram:i=new ShaderProgram({gl:l._gl,logShaderCompilation:l.logShaderCompilation,debugShaders:l.debugShaders,vertexShaderSource:a,vertexShaderText:e,fragmentShaderSource:o,fragmentShaderText:i,attributeLocations:s}),keyword:n,derivedKeywords:[],count:0};return r.derivedKeywords.push(t),i._cachedShader=s,this._shaders[n]=s,i},ShaderCache.prototype.destroyReleasedShaderPrograms=function(){var e,t=this._shadersToRelease;for(e in t)t.hasOwnProperty(e)&&(destroyShader(this,t[e]),--this._numberOfShaders);this._shadersToRelease={}},ShaderCache.prototype.releaseShaderProgram=function(e){!defined(e)||(e=e._cachedShader)&&0==--e.count&&(this._shadersToRelease[e.keyword]=e)},ShaderCache.prototype.isDestroyed=function(){return!1},ShaderCache.prototype.destroy=function(){var e,t=this._shaders;for(e in t)t.hasOwnProperty(e)&&t[e].shaderProgram.finalDestroy();return destroyObject(this)},Object.defineProperties(TextureCache.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),TextureCache.prototype.getTexture=function(e){var t=this._textures[e];if(defined(t))return delete this._texturesToRelease[e],++t.count,t.texture},TextureCache.prototype.addTexture=function(e,t){var i={texture:t,count:1};t.finalDestroy=t.destroy;var r=this;t.destroy=function(){0==--i.count&&(r._texturesToRelease[e]=i)},this._textures[e]=i,++this._numberOfTextures},TextureCache.prototype.destroyReleasedTextures=function(){var e,t,i=this._texturesToRelease;for(e in i)i.hasOwnProperty(e)&&(t=i[e],delete this._textures[e],t.texture.finalDestroy(),--this._numberOfTextures);this._texturesToRelease={}},TextureCache.prototype.isDestroyed=function(){return!1},TextureCache.prototype.destroy=function(){var e,t=this._textures;for(e in t)t.hasOwnProperty(e)&&t[e].texture.finalDestroy();return destroyObject(this)},Object.defineProperties(UniformState.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){var t;BoundingRectangle.equals(e,this._viewport)||(BoundingRectangle.clone(e,this._viewport),t=this._viewport,(e=this._viewportCartesian4).x=t.x,e.y=t.y,e.z=t.width,e.w=t.height,this._viewportDirty=!0)}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return cleanViewport(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return cleanViewport(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){Matrix4.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,Matrix4.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,Matrix4.getMatrix3(this.inverseModel,e),Matrix3.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return updateView3D(this),this._view3D}},viewRotation:{get:function(){return updateView3D(this),this._viewRotation}},viewRotation3D:{get:function(){return updateView3D(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return updateInverseView3D(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return updateInverseView3D(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return cleanInverseProjection(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return cleanModelView(this),this._modelView}},modelView3D:{get:function(){return cleanModelView3D(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return cleanModelViewRelativeToEye(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return cleanInverseModelView(this),this._inverseModelView}},inverseModelView3D:{get:function(){return cleanInverseModelView3D(this),this._inverseModelView3D}},viewProjection:{get:function(){return cleanViewProjection(this),this._viewProjection}},inverseViewProjection:{get:function(){return cleanInverseViewProjection(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return cleanModelViewProjection(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return cleanInverseModelViewProjection(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return cleanModelViewProjectionRelativeToEye(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return cleanModelViewInfiniteProjection(this),this._modelViewInfiniteProjection}},normal:{get:function(){return cleanNormal(this),this._normal}},normal3D:{get:function(){return cleanNormal3D(this),this._normal3D}},inverseNormal:{get:function(){return cleanInverseNormal(this),this._inverseNormal}},inverseNormal3D:{get:function(){return cleanInverseNormal3D(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return cleanEncodedCameraPositionMC(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return cleanEncodedCameraPositionMC(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},imagerySplitPosition:{get:function(){return this._imagerySplitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return defaultValue(this._ellipsoid,Ellipsoid.WGS84)}}});var transformMatrix=new Matrix3,sunCartographicScratch=new Cartographic;function setSunAndMoonDirections(e,t){defined(Transforms.computeIcrfToFixedMatrix(t.time,transformMatrix))||(transformMatrix=Transforms.computeTemeToPseudoFixedMatrix(t.time,transformMatrix));var i=Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);Matrix3.multiplyByVector(transformMatrix,i,i),Cartesian3.normalize(i,e._sunDirectionWC),i=Matrix3.multiplyByVector(e.viewRotation3D,i,e._sunDirectionEC),Cartesian3.normalize(i,i),i=Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),Matrix3.multiplyByVector(transformMatrix,i,i),Matrix3.multiplyByVector(e.viewRotation3D,i,i),Cartesian3.normalize(i,i),t=(i=t.mapProjection).ellipsoid.cartesianToCartographic(e._sunPositionWC,sunCartographicScratch),i.project(t,e._sunPositionColumbusView)}UniformState.prototype.updateCamera=function(e){setView(this,e.viewMatrix),setInverseView(this,e.inverseViewMatrix),setCamera(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==SceneMode$1.SCENE2D&&e.frustum instanceof OrthographicFrustum},UniformState.prototype.updateFrustum=function(e){setProjection(this,e.projectionMatrix),defined(e.infiniteProjectionMatrix)&&setInfiniteProjection(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=CesiumMath.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne,defined(e._offCenterFrustum)&&(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right},UniformState.prototype.updatePass=function(e){this._pass=e};var EMPTY_ARRAY=[],defaultLight=new SunLight;function cleanViewport(e){var t;e._viewportDirty&&(t=e._viewport,Matrix4.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),Matrix4.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1)}function cleanInverseProjection(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===SceneMode$1.SCENE2D||e._mode===SceneMode$1.MORPHING||e._orthographicIn3D?Matrix4.clone(Matrix4.ZERO,e._inverseProjection):Matrix4.inverse(e._projection,e._inverseProjection))}function cleanModelView(e){e._modelViewDirty&&(e._modelViewDirty=!1,Matrix4.multiplyTransformation(e._view,e._model,e._modelView))}function cleanModelView3D(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,Matrix4.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function cleanInverseModelView(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,Matrix4.inverse(e.modelView,e._inverseModelView))}function cleanInverseModelView3D(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,Matrix4.inverse(e.modelView3D,e._inverseModelView3D))}function cleanViewProjection(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,Matrix4.multiply(e._projection,e._view,e._viewProjection))}function cleanInverseViewProjection(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,Matrix4.inverse(e.viewProjection,e._inverseViewProjection))}function cleanModelViewProjection(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,Matrix4.multiply(e._projection,e.modelView,e._modelViewProjection))}function cleanModelViewRelativeToEye(e){var t;e._modelViewRelativeToEyeDirty&&(e._modelViewRelativeToEyeDirty=!1,t=e.modelView,(e=e._modelViewRelativeToEye)[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=0,e[13]=0,e[14]=0,e[15]=t[15])}function cleanInverseModelViewProjection(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,Matrix4.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function cleanModelViewProjectionRelativeToEye(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,Matrix4.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function cleanModelViewInfiniteProjection(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,Matrix4.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function cleanNormal(e){var t;e._normalDirty&&(e._normalDirty=!1,t=e._normal,Matrix4.getMatrix3(e.inverseModelView,t),Matrix3.getRotation(t,t),Matrix3.transpose(t,t))}function cleanNormal3D(e){var t;e._normal3DDirty&&(e._normal3DDirty=!1,t=e._normal3D,Matrix4.getMatrix3(e.inverseModelView3D,t),Matrix3.getRotation(t,t),Matrix3.transpose(t,t))}function cleanInverseNormal(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,Matrix4.getMatrix3(e.inverseModelView,e._inverseNormal),Matrix3.getRotation(e._inverseNormal,e._inverseNormal))}function cleanInverseNormal3D(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,Matrix4.getMatrix3(e.inverseModelView3D,e._inverseNormal3D),Matrix3.getRotation(e._inverseNormal3D,e._inverseNormal3D))}UniformState.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;var t=e.camera;this.updateCamera(t),e.mode===SceneMode$1.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),setSunAndMoonDirections(this,e),(i=defaultValue(e.light,defaultLight))instanceof SunLight?(this._lightDirectionWC=Cartesian3.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=Cartesian3.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=Cartesian3.normalize(Cartesian3.negate(i.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=Matrix3.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));var i,r=i.color;r=Cartesian3.fromElements(r.red,r.green,r.blue,this._lightColorHdr),r=Cartesian3.multiplyByScalar(r,i.intensity,r);1<(i=Cartesian3.maximumComponent(r))?Cartesian3.divideByScalar(r,i,this._lightColor):Cartesian3.clone(r,this._lightColor),r=defined(r=e.brdfLutGenerator)?r.colorTexture:void 0,this._brdfLut=r,this._environmentMap=defaultValue(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=defaultValue(e.sphericalHarmonicCoefficients,EMPTY_ARRAY),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,defined(this._specularEnvironmentMaps)&&Cartesian2.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=Transforms.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._imagerySplitPosition=e.imagerySplitPosition*e.context.drawingBufferWidth,r=t.frustum.fov,t=this._viewport,t=defined(r)?t.height>t.width?2*Math.tan(.5*r)/t.height:2*Math.tan(.5*r)/t.width:1/Math.max(t.width,t.height),this._geometricToleranceOverMeter=t*e.maximumScreenSpaceError,Color.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};var cameraPositionMC=new Cartesian3;function cleanEncodedCameraPositionMC(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,Matrix4.multiplyByPoint(e.inverseModel,e._cameraPosition,cameraPositionMC),EncodedCartesian3.fromCartesian(cameraPositionMC,e._encodedCameraPositionMC))}var view2Dto3DPScratch=new Cartesian3,view2Dto3DRScratch=new Cartesian3,view2Dto3DUScratch=new Cartesian3,view2Dto3DDScratch=new Cartesian3,view2Dto3DCartographicScratch=new Cartographic,view2Dto3DCartesian3Scratch=new Cartesian3,view2Dto3DMatrix4Scratch=new Matrix4;function view2Dto3D(e,t,i,r,n,a,o,s){var l=view2Dto3DPScratch;return l.x=e.y,l.y=e.z,l.z=e.x,(e=view2Dto3DRScratch).x=i.y,e.y=i.z,e.z=i.x,(i=view2Dto3DUScratch).x=r.y,i.y=r.z,i.z=r.x,(r=view2Dto3DDScratch).x=t.y,r.y=t.z,r.z=t.x,a===SceneMode$1.SCENE2D&&(l.z=.5*n),(l=o.unproject(l,view2Dto3DCartographicScratch)).longitude=CesiumMath.clamp(l.longitude,-Math.PI,Math.PI),l.latitude=CesiumMath.clamp(l.latitude,-CesiumMath.PI_OVER_TWO,CesiumMath.PI_OVER_TWO),l=(o=o.ellipsoid).cartographicToCartesian(l,view2Dto3DCartesian3Scratch),o=Transforms.eastNorthUpToFixedFrame(l,o,view2Dto3DMatrix4Scratch),Matrix4.multiplyByPointAsVector(o,e,e),Matrix4.multiplyByPointAsVector(o,i,i),Matrix4.multiplyByPointAsVector(o,r,r),defined(s)||(s=new Matrix4),s[0]=e.x,s[1]=i.x,s[2]=-r.x,s[3]=0,s[4]=e.y,s[5]=i.y,s[6]=-r.y,s[7]=0,s[8]=e.z,s[9]=i.z,s[10]=-r.z,s[11]=0,s[12]=-Cartesian3.dot(e,l),s[13]=-Cartesian3.dot(i,l),s[14]=Cartesian3.dot(r,l),s[15]=1,s}function updateView3D(e){e._view3DDirty&&(e._mode===SceneMode$1.SCENE3D?Matrix4.clone(e._view,e._view3D):view2Dto3D(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),Matrix4.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function updateInverseView3D(e){e._inverseView3DDirty&&(Matrix4.inverseTransformation(e.view3D,e._inverseView3D),Matrix4.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}function errorToString(e,t){var i="WebGL Error:  ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}function createErrorMessage(e,t,i,r){for(var n=errorToString(e,r)+": "+t.name+"(",a=0;a<i.length;++a)0!==a&&(n+=", "),n+=i[a];return n+");"}function throwOnError(e,t,i){var r=e.getError();if(r!==e.NO_ERROR)throw new RuntimeError(createErrorMessage(e,t,i,r))}function makeGetterSetter(e,t,i){return{get:function(){var r=e[t];return i(e,"get: "+t,r),e[t]},set:function(r){e[t]=r,i(e,"set: "+t,r)}}}function wrapGL(e,t){if(!defined(t))return e;var i,r={};for(i in e){var n=e[i];n instanceof Function?r[i]=function(i){return function(){var r=i.apply(e,arguments);return t(e,i,arguments),r}}(n):Object.defineProperty(r,i,makeGetterSetter(e,i,t))}return r}function getExtension(e,t){for(var i=t.length,r=0;r<i;++r){var n=e.getExtension(t[r]);if(n)return n}}function Context(e,t){if("undefined"==typeof WebGLRenderingContext)throw new RuntimeError("The browser does not support WebGL.  Visit http://get.webgl.org.");this._canvas=e,(t=defaultValue(t=clone(t,!0),{})).allowTextureFilterAnisotropic=defaultValue(t.allowTextureFilterAnisotropic,!0);var i=defaultValue(t.webgl,{});i.alpha=defaultValue(i.alpha,!1),i.stencil=defaultValue(i.stencil,!0);var r=defaultValue(t.requestWebgl2,!1)&&"undefined"!=typeof WebGL2RenderingContext,n=!1,a=t.getWebGLStub;if(defined(a))s=a(e,i);else if(r&&defined(s=e.getContext("webgl2",i)||e.getContext("experimental-webgl2",i)||void 0)&&(n=!0),defined(s)||(s=e.getContext("webgl",i)||e.getContext("experimental-webgl",i)||void 0),!defined(s))throw new RuntimeError("The browser supports WebGL, but initialization failed.");this._originalGLContext=s,this._gl=s,this._webgl2=n,this._id=createGuid(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new ShaderCache(this),this._textureCache=new TextureCache;var o=s;this._stencilBits=o.getParameter(o.STENCIL_BITS),ContextLimits._maximumCombinedTextureImageUnits=o.getParameter(o.MAX_COMBINED_TEXTURE_IMAGE_UNITS),ContextLimits._maximumCubeMapSize=o.getParameter(o.MAX_CUBE_MAP_TEXTURE_SIZE),ContextLimits._maximumFragmentUniformVectors=o.getParameter(o.MAX_FRAGMENT_UNIFORM_VECTORS),ContextLimits._maximumTextureImageUnits=o.getParameter(o.MAX_TEXTURE_IMAGE_UNITS),ContextLimits._maximumRenderbufferSize=o.getParameter(o.MAX_RENDERBUFFER_SIZE),ContextLimits._maximumTextureSize=o.getParameter(o.MAX_TEXTURE_SIZE),ContextLimits._maximumVaryingVectors=o.getParameter(o.MAX_VARYING_VECTORS),ContextLimits._maximumVertexAttributes=o.getParameter(o.MAX_VERTEX_ATTRIBS),ContextLimits._maximumVertexTextureImageUnits=o.getParameter(o.MAX_VERTEX_TEXTURE_IMAGE_UNITS),ContextLimits._maximumVertexUniformVectors=o.getParameter(o.MAX_VERTEX_UNIFORM_VECTORS);var s=o.getParameter(o.ALIASED_LINE_WIDTH_RANGE);ContextLimits._minimumAliasedLineWidth=s[0],ContextLimits._maximumAliasedLineWidth=s[1],s=o.getParameter(o.ALIASED_POINT_SIZE_RANGE),ContextLimits._minimumAliasedPointSize=s[0],ContextLimits._maximumAliasedPointSize=s[1],s=o.getParameter(o.MAX_VIEWPORT_DIMS),ContextLimits._maximumViewportWidth=s[0],ContextLimits._maximumViewportHeight=s[1],s=o.getShaderPrecisionFormat(o.FRAGMENT_SHADER,o.HIGH_FLOAT),ContextLimits._highpFloatSupported=0!==s.precision,s=o.getShaderPrecisionFormat(o.FRAGMENT_SHADER,o.HIGH_INT),ContextLimits._highpIntSupported=0!==s.rangeMax,this._antialias=o.getContextAttributes().antialias,this._standardDerivatives=!!getExtension(o,["OES_standard_derivatives"]),this._blendMinmax=!!getExtension(o,["EXT_blend_minmax"]),this._elementIndexUint=!!getExtension(o,["OES_element_index_uint"]),this._depthTexture=!!getExtension(o,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!getExtension(o,["EXT_frag_depth"]),this._debugShaders=getExtension(o,["WEBGL_debug_shaders"]),this._textureFloat=!!getExtension(o,["OES_texture_float"]),this._textureHalfFloat=!!getExtension(o,["OES_texture_half_float"]),this._textureFloatLinear=!!getExtension(o,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!getExtension(o,["OES_texture_half_float_linear"]),this._colorBufferFloat=!!getExtension(o,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!getExtension(o,["EXT_float_blend"]),this._colorBufferHalfFloat=!!getExtension(o,["EXT_color_buffer_half_float"]),this._s3tc=!!getExtension(o,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!getExtension(o,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._etc1=!!getExtension(o,["WEBGL_compressed_texture_etc1"]);var l,c,u,d,h,p,f,m;s=t.allowTextureFilterAnisotropic?getExtension(o,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=s,ContextLimits._maximumTextureFilterAnisotropy=defined(s)?o.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,n?(d=this,h=function(){return d._gl.createVertexArray()},p=function(e){d._gl.bindVertexArray(e)},f=function(e){d._gl.deleteVertexArray(e)},m=function(e,t,i,r,n){o.drawElementsInstanced(e,t,i,r,n)},g=function(e,t,i,r){o.drawArraysInstanced(e,t,i,r)},y=function(e,t){o.vertexAttribDivisor(e,t)},_=function(e){o.drawBuffers(e)}):(defined(l=getExtension(o,["OES_vertex_array_object"]))&&(h=function(){return l.createVertexArrayOES()},p=function(e){l.bindVertexArrayOES(e)},f=function(e){l.deleteVertexArrayOES(e)}),defined(c=getExtension(o,["ANGLE_instanced_arrays"]))&&(m=function(e,t,i,r,n){c.drawElementsInstancedANGLE(e,t,i,r,n)},g=function(e,t,i,r){c.drawArraysInstancedANGLE(e,t,i,r)},y=function(e,t){c.vertexAttribDivisorANGLE(e,t)}),defined(u=getExtension(o,["WEBGL_draw_buffers"]))&&(_=function(e){u.drawBuffersWEBGL(e)})),this.glCreateVertexArray=h,this.glBindVertexArray=p,this.glDeleteVertexArray=f,this.glDrawElementsInstanced=m,this.glDrawArraysInstanced=g,this.glVertexAttribDivisor=y,this.glDrawBuffers=_,this._vertexArrayObject=!!l,this._instancedArrays=!!c,this._drawBuffers=!!u,ContextLimits._maximumDrawBuffers=this.drawBuffers?o.getParameter(WebGLConstants$1.MAX_DRAW_BUFFERS):1,ContextLimits._maximumColorAttachments=this.drawBuffers?o.getParameter(WebGLConstants$1.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new Color(0,0,0,0),this._clearDepth=1,this._clearStencil=0;var g=new UniformState,y=new PassState(this),_=RenderState.fromCache();this._defaultPassState=y,this._defaultRenderState=_,this._defaultTexture=void 0,this._defaultCubeMap=void 0,this._us=g,this._currentRenderState=_,this._currentPassState=y,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var v=0;v<ContextLimits._maximumVertexAttributes;v++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this.options=t,this.cache={},RenderState.apply(o,_,y)}var defaultFramebufferMarker={},scratchBackBufferArray;function applyRenderState(e,t,i,r){var n=e._currentRenderState,a=e._currentPassState;e._currentRenderState=t,e._currentPassState=i,RenderState.partialApply(e._gl,n,t,a,i,r)}function bindFramebuffer(e,t){var i;t!==e._currentFramebuffer&&(e._currentFramebuffer=t,i=scratchBackBufferArray,defined(t)?(t._bind(),i=t._getActiveColorAttachments()):(t=e._gl).bindFramebuffer(t.FRAMEBUFFER,null),e.drawBuffers&&e.glDrawBuffers(i))}Object.defineProperties(Context.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return 8<=this._stencilBits}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=wrapGL(this._originalGLContext,e?throwOnError:void 0)}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new Texture({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultCubeMap:{get:function(){var e;return void 0===this._defaultCubeMap&&(e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},this._defaultCubeMap=new CubeMap({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})),this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return defaultFramebufferMarker}}}),"undefined"!=typeof WebGLRenderingContext&&(scratchBackBufferArray=[WebGLConstants$1.BACK]);var defaultClearCommand=new ClearCommand;function beginDraw(e,t,i,r,n){bindFramebuffer(e,t),applyRenderState(e,n,i,!1),r._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,r.maximumTextureUnitIndex)}function continueDraw(e,t,i,r){var n=t._primitiveType,a=t._vertexArray,o=t._offset,s=t._count,l=t.instanceCount;e._us.model=defaultValue(t._modelMatrix,Matrix4.IDENTITY),i._setUniforms(r,e._us,e.validateShaderProgram),a._bind(),defined(r=a.indexBuffer)?(o*=r.bytesPerIndex,s=defaultValue(s,r.numberOfIndices),0===l?e._gl.drawElements(n,s,r.indexDatatype,o):e.glDrawElementsInstanced(n,s,r.indexDatatype,o,l)):(s=defaultValue(s,a.numberOfVertices),0===l?e._gl.drawArrays(n,o,s):e.glDrawArraysInstanced(n,o,s,l)),a._unBind()}Context.prototype.clear=function(e,t){e=defaultValue(e,defaultClearCommand),t=defaultValue(t,this._defaultPassState);var i=this._gl,r=0,n=e.color,a=e.depth,o=e.stencil;defined(n)&&(Color.equals(this._clearColor,n)||(Color.clone(n,this._clearColor),i.clearColor(n.red,n.green,n.blue,n.alpha)),r|=i.COLOR_BUFFER_BIT),defined(a)&&(a!==this._clearDepth&&(this._clearDepth=a,i.clearDepth(a)),r|=i.DEPTH_BUFFER_BIT),defined(o)&&(o!==this._clearStencil&&(this._clearStencil=o,i.clearStencil(o)),r|=i.STENCIL_BUFFER_BIT),applyRenderState(this,defaultValue(e.renderState,this._defaultRenderState),t,!0),bindFramebuffer(this,defaultValue(e.framebuffer,t.framebuffer)),i.clear(r)},Context.prototype.draw=function(e,t,i,r){t=defaultValue(t,this._defaultPassState);var n=defaultValue(e._framebuffer,t.framebuffer),a=defaultValue(e._renderState,this._defaultRenderState);i=defaultValue(i,e._shaderProgram),r=defaultValue(r,e._uniformMap),beginDraw(this,n,t,i,a),continueDraw(this,e,i,r)},Context.prototype.endFrame=function(){var e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null),this.drawBuffers&&this.glDrawBuffers(scratchBackBufferArray);for(var t=this._maxFrameTextureUnitIndex,i=this._maxFrameTextureUnitIndex=0;i<t;++i)e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},Context.prototype.readPixels=function(e){var t=this._gl;e=defaultValue(e,defaultValue.EMPTY_OBJECT);var i=Math.max(defaultValue(e.x,0),0),r=Math.max(defaultValue(e.y,0),0),n=defaultValue(e.width,t.drawingBufferWidth),a=defaultValue(e.height,t.drawingBufferHeight),o=e.framebuffer,s=PixelDatatype$1.UNSIGNED_BYTE;return defined(o)&&0<o.numberOfColorAttachments&&(s=o.getColorTexture(0).pixelDatatype),e=PixelFormat$1.createTypedArray(PixelFormat$1.RGBA,s,n,a),bindFramebuffer(this,o),t.readPixels(i,r,n,a,PixelFormat$1.RGBA,PixelDatatype$1.toWebGLConstant(s,this),e),e};var viewportQuadAttributeLocations={position:0,textureCoordinates:1};function PickId(e,t,i){this._pickObjects=e,this.key=t,this.color=i}Context.prototype.getViewportQuadVertexArray=function(){var e,t=this.cache.viewportQuad_vertexArray;return defined(t)||(e=new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:PrimitiveType$1.TRIANGLES}),t=VertexArray.fromGeometry({context:this,geometry:e,attributeLocations:viewportQuadAttributeLocations,bufferUsage:BufferUsage$1.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=t),t},Context.prototype.createViewportQuadCommand=function(e,t){return t=defaultValue(t,defaultValue.EMPTY_OBJECT),new DrawCommand({vertexArray:this.getViewportQuadVertexArray(),primitiveType:PrimitiveType$1.TRIANGLES,renderState:t.renderState,shaderProgram:ShaderProgram.fromCache({context:this,vertexShaderSource:ViewportQuadVS,fragmentShaderSource:e,attributeLocations:viewportQuadAttributeLocations}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})},Context.prototype.getObjectByPickColor=function(e){return this._pickObjects[e.toRgba()]},Object.defineProperties(PickId.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),PickId.prototype.destroy=function(){delete this._pickObjects[this.key]},Context.prototype.createPickId=function(e){++this._nextPickColor[0];var t=this._nextPickColor[0];if(0===t)throw new RuntimeError("Out of unique Pick IDs.");return this._pickObjects[t]=e,new PickId(this._pickObjects,t,Color.fromRgba(t))},Context.prototype.isDestroyed=function(){return!1},Context.prototype.destroy=function(){var e,t,i=this.cache;for(e in i)!i.hasOwnProperty(e)||defined((t=i[e]).destroy)&&t.destroy();return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),destroyObject(this)};var RenderbufferFormat={RGBA4:WebGLConstants$1.RGBA4,RGB5_A1:WebGLConstants$1.RGB5_A1,RGB565:WebGLConstants$1.RGB565,DEPTH_COMPONENT16:WebGLConstants$1.DEPTH_COMPONENT16,STENCIL_INDEX8:WebGLConstants$1.STENCIL_INDEX8,DEPTH_STENCIL:WebGLConstants$1.DEPTH_STENCIL,validate:function(e){return e===RenderbufferFormat.RGBA4||e===RenderbufferFormat.RGB5_A1||e===RenderbufferFormat.RGB565||e===RenderbufferFormat.DEPTH_COMPONENT16||e===RenderbufferFormat.STENCIL_INDEX8||e===RenderbufferFormat.DEPTH_STENCIL}},RenderbufferFormat$1=Object.freeze(RenderbufferFormat);function Renderbuffer(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context._gl,i=defaultValue(e.format,RenderbufferFormat$1.RGBA4),r=defined(e.width)?e.width:t.drawingBufferWidth;e=defined(e.height)?e.height:t.drawingBufferHeight;this._gl=t,this._format=i,this._width=r,this._height=e,this._renderbuffer=this._gl.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this._renderbuffer),t.renderbufferStorage(t.RENDERBUFFER,i,r,e),t.bindRenderbuffer(t.RENDERBUFFER,null)}function loadCubeMap(e,t){var i={flipY:!0,preferImageBitmap:!0};i=[Resource.createIfNeeded(t.positiveX).fetchImage(i),Resource.createIfNeeded(t.negativeX).fetchImage(i),Resource.createIfNeeded(t.positiveY).fetchImage(i),Resource.createIfNeeded(t.negativeY).fetchImage(i),Resource.createIfNeeded(t.positiveZ).fetchImage(i),Resource.createIfNeeded(t.negativeZ).fetchImage(i)];return when.all(i,(function(t){return new CubeMap({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})}))}function DiscardMissingTileImagePolicy(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var t=Resource.createIfNeeded(e.missingImageUrl),i=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then((function(t){defined(t.blob)&&(i._missingImageByteLength=t.blob.size);var r=getImagePixels(t);if(e.disableCheckIfAllPixelsAreTransparent){for(var n=!0,a=t.width,o=e.pixelsToCheck,s=0,l=o.length;n&&s<l;++s){var c=o[s];0<r[4*c.x+c.y*a+3]&&(n=!1)}n&&(r=void 0)}i._missingImagePixels=r,i._isReady=!0})).otherwise((function(){i._missingImagePixels=void 0,i._isReady=!0}))}function ImageryLayerFeatureInfo(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}function ImageryProvider(){this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,DeveloperError.throwInstantiationError()}Object.defineProperties(Renderbuffer.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),Renderbuffer.prototype._getRenderbuffer=function(){return this._renderbuffer},Renderbuffer.prototype.isDestroyed=function(){return!1},Renderbuffer.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),destroyObject(this)},DiscardMissingTileImagePolicy.prototype.isReady=function(){return this._isReady},DiscardMissingTileImagePolicy.prototype.shouldDiscardImage=function(e){var t=this._pixelsToCheck,i=this._missingImagePixels;if(!defined(i))return!1;if(defined(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var r=getImagePixels(e),n=e.width,a=0,o=t.length;a<o;++a)for(var s=t[a],l=4*s.x+s.y*n,c=0;c<4;++c){var u=l+c;if(r[u]!==i[u])return!1}return!0},ImageryLayerFeatureInfo.prototype.configureNameFromProperties=function(e){var t,i,r,n=10;for(i in e)e.hasOwnProperty(i)&&e[i]&&(r=i.toLowerCase(),1<n&&"name"===r?(n=1,t=i):2<n&&"title"===r?(n=2,t=i):3<n&&/name/i.test(i)?(n=3,t=i):4<n&&/title/i.test(i)&&(n=4,t=i));defined(t)&&(this.name=e[t])},ImageryLayerFeatureInfo.prototype.configureDescriptionFromProperties=function(e){this.description=function e(t){var i,r,n='<table class="cesium-infoBox-defaultTable">';for(i in t)!t.hasOwnProperty(i)||defined(r=t[i])&&(n+="object"==typeof r?"<tr><td>"+i+"</td><td>"+e(r)+"</td></tr>":"<tr><td>"+i+"</td><td>"+r+"</td></tr>");return n+"</table>"}(e)},Object.defineProperties(ImageryProvider.prototype,{ready:{get:DeveloperError.throwInstantiationError},readyPromise:{get:DeveloperError.throwInstantiationError},rectangle:{get:DeveloperError.throwInstantiationError},tileWidth:{get:DeveloperError.throwInstantiationError},tileHeight:{get:DeveloperError.throwInstantiationError},maximumLevel:{get:DeveloperError.throwInstantiationError},minimumLevel:{get:DeveloperError.throwInstantiationError},tilingScheme:{get:DeveloperError.throwInstantiationError},tileDiscardPolicy:{get:DeveloperError.throwInstantiationError},errorEvent:{get:DeveloperError.throwInstantiationError},credit:{get:DeveloperError.throwInstantiationError},proxy:{get:DeveloperError.throwInstantiationError},hasAlphaChannel:{get:DeveloperError.throwInstantiationError}}),ImageryProvider.prototype.getTileCredits=function(e,t,i){DeveloperError.throwInstantiationError()},ImageryProvider.prototype.requestImage=function(e,t,i,r){DeveloperError.throwInstantiationError()},ImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){DeveloperError.throwInstantiationError()};var ktxRegex$2=/\.ktx$/i,crnRegex$2=/\.crn$/i;function ArcGisMapServerImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=Resource.createIfNeeded(e.url);t.appendForwardSlash(),defined(e.token)&&t.setQueryParameters({token:e.token}),this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=defaultValue(e.tileWidth,256),this._tileHeight=defaultValue(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=defaultValue(e.tilingScheme,new GeographicTilingScheme({ellipsoid:e.ellipsoid})),this._useTiles=defaultValue(e.usePreCachedTilesIfAvailable,!0),this._rectangle=defaultValue(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,"string"==typeof(t=e.credit)&&(t=new Credit(t)),this._credit=t,this.enablePickFeatures=defaultValue(e.enablePickFeatures,!0),this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer();var i,r=this;function n(t){if(defined(a=t.tileInfo)){if(r._tileWidth=a.rows,r._tileHeight=a.cols,102100===a.spatialReference.wkid||102113===a.spatialReference.wkid)r._tilingScheme=new WebMercatorTilingScheme({ellipsoid:e.ellipsoid});else{if(4326!==t.tileInfo.spatialReference.wkid){var n="Tile spatial reference WKID "+t.tileInfo.spatialReference.wkid+" is not supported.";return void(i=TileProviderError.handleError(i,r,r._errorEvent,n,void 0,void 0,void 0,o))}r._tilingScheme=new GeographicTilingScheme({ellipsoid:e.ellipsoid})}if(r._maximumLevel=t.tileInfo.lods.length-1,defined(t.fullExtent)){if(defined(t.fullExtent.spatialReference)&&defined(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var a=new WebMercatorProjection,s=t.fullExtent;n=a.unproject(new Cartesian3(Math.max(s.xmin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(s.ymin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=a.unproject(new Cartesian3(Math.min(s.xmax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(s.ymax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));r._rectangle=new Rectangle(n.longitude,n.latitude,s.longitude,s.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid)return s="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.",void(i=TileProviderError.handleError(i,r,r._errorEvent,s,void 0,void 0,void 0,o));r._rectangle=Rectangle.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else r._rectangle=r._tilingScheme.rectangle;defined(r._tileDiscardPolicy)||(r._tileDiscardPolicy=new DiscardMissingTileImagePolicy({missingImageUrl:buildImageResource(r,0,0,r._maximumLevel).url,pixelsToCheck:[new Cartesian2(0,0),new Cartesian2(200,20),new Cartesian2(20,200),new Cartesian2(80,110),new Cartesian2(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),r._useTiles=!0}else r._useTiles=!1;defined(t.copyrightText)&&0<t.copyrightText.length&&(r._credit=new Credit(t.copyrightText)),r._ready=!0,r._readyPromise.resolve(!0),TileProviderError.handleSuccess(i)}function a(e){var t="An error occurred while accessing "+r._resource.url+".";i=TileProviderError.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,o),r._readyPromise.reject(new RuntimeError(t))}function o(){when(r._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJsonp(),n,a)}this._useTiles?o():(this._ready=!0,this._readyPromise.resolve(!0))}function buildImageResource(e,t,i,r,n){var a=e._useTiles?e._resource.getDerivedResource({url:"tile/"+r+"/"+i+"/"+t,request:n}):(a={bbox:(a=e._tilingScheme.tileXYToNativeRectangle(t,i,r)).west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png32",transparent:!0,f:"image"},e._tilingScheme.projection instanceof GeographicProjection?(a.bboxSR=4326,a.imageSR=4326):(a.bboxSR=3857,a.imageSR=3857),e.layers&&(a.layers="show:"+e.layers),e._resource.getDerivedResource({url:"export",request:n,queryParameters:a}));return a}function AutoExposure(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=void 0,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new Cartesian2,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function destroyFramebuffers(e){var t=e._framebuffers;if(defined(t)){for(var i=t.length,r=0;r<i;++r)t[r].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}}function createFramebuffers(e,t){destroyFramebuffers(e);for(var i=e._width,r=e._height,n=PixelFormat$1.RGBA,a=t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT,o=Math.ceil(Math.log(Math.max(i,r))/Math.log(3)),s=new Array(o),l=0;l<o;++l)i=Math.max(Math.ceil(i/3),1),r=Math.max(Math.ceil(r/3),1),s[l]=new Framebuffer({context:t,colorTextures:[new Texture({context:t,width:i,height:r,pixelFormat:n,pixelDatatype:a,sampler:Sampler.NEAREST})]});var c=s[o-1].getColorTexture(0);e._previousLuminance=new Framebuffer({context:t,colorTextures:[new Texture({context:t,width:c.width,height:c.height,pixelFormat:n,pixelDatatype:a,sampler:Sampler.NEAREST})]}),e._framebuffers=s}function destroyCommands(e){var t=e._commands;if(defined(t)){for(var i=t.length,r=0;r<i;++r)t[r].shaderProgram.destroy();e._commands=void 0}}function createUniformMap$4(e,t){var i;return(t=0===t?{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}}:(i=e._framebuffers[t-1].getColorTexture(0),{colorTexture:function(){return i},colorTextureDimensions:function(){return i.dimensions}})).minMaxLuminance=function(){return e._minMaxLuminance},t.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},t}function getShaderSource(e,t){var i="uniform sampler2D colorTexture; \nvarying vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return i+=0===e?"    vec4 color = texture2D(colorTexture, v_textureCoordinates + offset); \n    return czm_luminance(color.rgb); \n":"    return texture2D(colorTexture, v_textureCoordinates + offset).r; \n",i+="}\n\n",i+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n    float color = 0.0; \n    float xStep = 1.0 / colorTextureDimensions.x; \n    float yStep = 1.0 / colorTextureDimensions.y; \n    int count = 0; \n    for (int i = 0; i < 3; ++i) { \n        for (int j = 0; j < 3; ++j) { \n            vec2 offset; \n            offset.x = -xStep + float(i) * xStep; \n            offset.y = -yStep + float(j) * yStep; \n            if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n                continue; \n            } \n            color += sampleTexture(offset); \n            ++count; \n        } \n    } \n    if (count > 0) { \n        color /= float(count); \n    } \n",e===t-1&&(i+="    float previous = texture2D(previousLuminance, vec2(0.5)).r; \n    color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n    color = previous + (color - previous) / (60.0 * 1.5); \n    color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),i+"    gl_FragColor = vec4(color); \n} \n"}function createCommands$5(e,t){destroyCommands(e);for(var i=e._framebuffers,r=i.length,n=new Array(r),a=0;a<r;++a)n[a]=t.createViewportQuadCommand(getShaderSource(a,r),{framebuffer:i[a],uniformMap:createUniformMap$4(e,a)});e._commands=n}ImageryProvider.loadImage=function(e,t){return t=Resource.createIfNeeded(t),ktxRegex$2.test(t.url)?loadKTX(t):crnRegex$2.test(t.url)?loadCRN(t):defined(e)&&defined(e.tileDiscardPolicy)?t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):t.fetchImage({preferImageBitmap:!0,flipY:!0})},Object.defineProperties(ArcGisMapServerImageryProvider.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),ArcGisMapServerImageryProvider.prototype.getTileCredits=function(e,t,i){},ArcGisMapServerImageryProvider.prototype.requestImage=function(e,t,i,r){return ImageryProvider.loadImage(this,buildImageResource(this,e,t,i,r))},ArcGisMapServerImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){if(this.enablePickFeatures){var a,o;i=this._tilingScheme.tileXYToNativeRectangle(e,t,i);n=this._tilingScheme.projection instanceof GeographicProjection?(a=CesiumMath.toDegrees(r),o=CesiumMath.toDegrees(n),"4326"):(a=(s=this._tilingScheme.projection.project(new Cartographic(r,n,0))).x,o=s.y,"3857");var s="visible";return defined(this._layers)&&(s+=":"+this._layers),s={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:a+","+o,mapExtent:i.west+","+i.south+","+i.east+","+i.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:n,layers:s},this._resource.getDerivedResource({url:"identify",queryParameters:s}).fetchJson().then((function(e){var t=[],i=e.results;if(!defined(i))return t;for(var r=0;r<i.length;++r){var n,a=i[r],o=new ImageryLayerFeatureInfo;o.data=a,o.name=a.value,o.properties=a.attributes,o.configureDescriptionFromProperties(a.attributes),"esriGeometryPoint"===a.geometryType&&a.geometry&&(4326===(n=a.geometry.spatialReference&&a.geometry.spatialReference.wkid?a.geometry.spatialReference.wkid:4326)||4283===n?o.position=Cartographic.fromDegrees(a.geometry.x,a.geometry.y,a.geometry.z):102100!==n&&900913!==n&&3857!==n||(n=new WebMercatorProjection,o.position=n.unproject(new Cartesian3(a.geometry.x,a.geometry.y,a.geometry.z)))),t.push(o)}return t}))}},Object.defineProperties(AutoExposure.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){var e=this._framebuffers;if(defined(e))return e[e.length-1].getColorTexture(0)}}}),AutoExposure.prototype.clear=function(e){var t=this._framebuffers;if(defined(t)){var i=this._clearCommand;defined(i)||(i=this._clearCommand=new ClearCommand({color:new Color(0,0,0,0),framebuffer:void 0}));for(var r=t.length,n=0;n<r;++n)i.framebuffer=t[n],i.execute(e)}},AutoExposure.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;t===this._width&&i===this._height||(this._width=t,this._height=i,createFramebuffers(this,e),createCommands$5(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance,e=(i=this._framebuffers)[i.length-1],i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance,this._previousLuminance=e},AutoExposure.prototype.execute=function(e,t){this._colorTexture=t;var i=this._commands;if(defined(i))for(var r=i.length,n=0;n<r;++n)i[n].execute(e)},AutoExposure.prototype.isDestroyed=function(){return!1},AutoExposure.prototype.destroy=function(){return destroyFramebuffers(this),destroyCommands(this),destroyObject(this)};var BingMapsStyle={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},BingMapsStyle$1=Object.freeze(BingMapsStyle),emptyImage;function DiscardEmptyTileImagePolicy(e){}function BingMapsImageryProvider(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).key;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=1,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._key=t,this._resource=Resource.createIfNeeded(e.url),this._resource.appendForwardSlash(),this._tileProtocol=e.tileProtocol,this._mapStyle=defaultValue(e.mapStyle,BingMapsStyle$1.AERIAL),this._culture=defaultValue(e.culture,""),this._tileDiscardPolicy=e.tileDiscardPolicy,defined(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new DiscardEmptyTileImagePolicy),this._proxy=e.proxy,this._credit=new Credit('<a href="http://www.bing.com"><img src="'+BingMapsImageryProvider.logoUrl+'" title="Bing Imagery"/></a>'),this._tilingScheme=new WebMercatorTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer(),defined(e=this._tileProtocol)?0<e.length&&":"===e[e.length-1]&&(e=e.substr(0,e.length-1)):e="http:"===document.location.protocol?"http":"https";var i,r=this._resource.getDerivedResource({url:"REST/v1/Imagery/Metadata/"+this._mapStyle,queryParameters:{incl:"ImageryProviders",key:this._key,uriScheme:e}}),n=this;function a(e){if(1===e.resourceSets.length){e=e.resourceSets[0].resources[0],n._tileWidth=e.imageWidth,n._tileHeight=e.imageHeight,n._maximumLevel=e.zoomMax-1,n._imageUrlSubdomains=e.imageUrlSubdomains,n._imageUrlTemplate=e.imageUrl;for(var t=n._attributionList=e.imageryProviders,r=0,a=(t=t||(n._attributionList=[])).length;r<a;++r){var s=t[r];if(s.credit instanceof Credit)break;s.credit=new Credit(s.attribution);for(var l=s.coverageAreas,c=0,u=s.coverageAreas.length;c<u;++c){var d=l[c],h=d.bbox;d.bbox=new Rectangle(CesiumMath.toRadians(h[1]),CesiumMath.toRadians(h[0]),CesiumMath.toRadians(h[3]),CesiumMath.toRadians(h[2]))}}n._ready=!0,n._readyPromise.resolve(!0),TileProviderError.handleSuccess(i)}else o()}function o(e){var t="An error occurred while accessing "+r.url+".";i=TileProviderError.handleError(i,n,n._errorEvent,t,void 0,void 0,void 0,l),n._readyPromise.reject(new RuntimeError(t))}var s=r.url;function l(){var e=r.fetchJsonp("jsonp");(BingMapsImageryProvider._metadataCache[s]=e).then(a).otherwise(o)}defined(e=BingMapsImageryProvider._metadataCache[s])?e.then(a).otherwise(o):l()}DiscardEmptyTileImagePolicy.prototype.isReady=function(){return!0},DiscardEmptyTileImagePolicy.prototype.shouldDiscardImage=function(e){return DiscardEmptyTileImagePolicy.EMPTY_IMAGE===e},Object.defineProperties(DiscardEmptyTileImagePolicy,{EMPTY_IMAGE:{get:function(){return defined(emptyImage)||((emptyImage=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),emptyImage}}}),Object.defineProperties(BingMapsImageryProvider.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});var rectangleScratch$5=new Rectangle;function buildImageResource$1(e,t,i,r,n){var a=e._imageUrlTemplate,o=e._imageUrlSubdomains,s=(t+i+r)%o.length;return e._resource.getDerivedResource({url:a,request:n,templateValues:{quadkey:BingMapsImageryProvider.tileXYToQuadKey(t,i,r),subdomain:o[s],culture:e._culture},queryParameters:{n:"z"}})}BingMapsImageryProvider.prototype.getTileCredits=function(e,t,i){return t=this._tilingScheme.tileXYToRectangle(e,t,i,rectangleScratch$5),getRectangleAttribution(this._attributionList,i,t)},BingMapsImageryProvider.prototype.requestImage=function(e,t,i,r){if(defined(r=ImageryProvider.loadImage(this,buildImageResource$1(this,e,t,i,r))))return r.otherwise((function(e){return defined(e.blob)&&0===e.blob.size?DiscardEmptyTileImagePolicy.EMPTY_IMAGE:when.reject(e)}))},BingMapsImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},BingMapsImageryProvider.tileXYToQuadKey=function(e,t,i){for(var r="",n=i;0<=n;--n){var a=1<<n,o=0;0!=(e&a)&&(o|=1),0!=(t&a)&&(o|=2),r+=o}return r},BingMapsImageryProvider.quadKeyToTileXY=function(e){for(var t=0,i=0,r=e.length-1,n=r;0<=n;--n){var a=1<<n,o=+e[r-n];0!=(1&o)&&(t|=a),0!=(2&o)&&(i|=a)}return{x:t,y:i,level:r}},BingMapsImageryProvider._logoUrl=void 0,Object.defineProperties(BingMapsImageryProvider,{logoUrl:{get:function(){return defined(BingMapsImageryProvider._logoUrl)||(BingMapsImageryProvider._logoUrl=buildModuleUrl("Assets/Images/bing_maps_credit.png")),BingMapsImageryProvider._logoUrl},set:function(e){BingMapsImageryProvider._logoUrl=e}}});var intersectionScratch$1=new Rectangle;function getRectangleAttribution(e,t,i){++t;for(var r=[],n=0,a=e.length;n<a;++n){for(var o=e[n],s=o.coverageAreas,l=!1,c=0,u=o.coverageAreas.length;!l&&c<u;++c){var d=s[c];t>=d.zoomMin&&t<=d.zoomMax&&defined(Rectangle.intersection(i,d.bbox,intersectionScratch$1))&&(l=!0)}l&&r.push(o.credit)}return r}BingMapsImageryProvider._metadataCache={};var defaultDimensions=new Cartesian3(1,1,1);function BoxEmitter(e){e=defaultValue(e,defaultDimensions),this._dimensions=Cartesian3.clone(e)}Object.defineProperties(BoxEmitter.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){Cartesian3.clone(e,this._dimensions)}}});var scratchHalfDim=new Cartesian3;BoxEmitter.prototype.emit=function(e){var t=this._dimensions,i=Cartesian3.multiplyByScalar(t,.5,scratchHalfDim),r=CesiumMath.randomBetween(-i.x,i.x);t=CesiumMath.randomBetween(-i.y,i.y),i=CesiumMath.randomBetween(-i.z,i.z);e.position=Cartesian3.fromElements(r,t,i,e.position),e.velocity=Cartesian3.normalize(e.position,e.velocity)};var BrdfLutGeneratorFS="varying vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\nfloat vdcRadicalInverse(int i)\n{\nfloat r;\nfloat base = 2.0;\nfloat value = 0.0;\nfloat invBase = 1.0 / base;\nfloat invBi = invBase;\nfor (int x = 0; x < 100; x++)\n{\nif (i <= 0)\n{\nbreak;\n}\nr = mod(float(i), base);\nvalue += r * invBi;\ninvBi *= invBase;\ni = int(float(i) * invBase);\n}\nreturn value;\n}\nvec2 hammersley2D(int i, int N)\n{\nreturn vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\nfloat a = roughness * roughness;\nfloat phi = 2.0 * M_PI * xi.x;\nfloat cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\nfloat sinTheta = sqrt(1.0 - cosTheta * cosTheta);\nvec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\nvec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\nvec3 tangentX = normalize(cross(upVector, N));\nvec3 tangentY = cross(N, tangentX);\nreturn tangentX * H.x + tangentY * H.y + N * H.z;\n}\nfloat G1_Smith(float NdotV, float k)\n{\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\nfloat k = roughness * roughness / 2.0;\nreturn G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\nvec2 integrateBrdf(float roughness, float NdotV)\n{\nvec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\nfloat A = 0.0;\nfloat B = 0.0;\nconst int NumSamples = 1024;\nfor (int i = 0; i < NumSamples; i++)\n{\nvec2 xi = hammersley2D(i, NumSamples);\nvec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\nvec3 L = 2.0 * dot(V, H) * H - V;\nfloat NdotL = clamp(L.z, 0.0, 1.0);\nfloat NdotH = clamp(H.z, 0.0, 1.0);\nfloat VdotH = clamp(dot(V, H), 0.0, 1.0);\nif (NdotL > 0.0)\n{\nfloat G = G_Smith(roughness, NdotV, NdotL);\nfloat G_Vis = G * VdotH / (NdotH * NdotV);\nfloat Fc = pow(1.0 - VdotH, 5.0);\nA += (1.0 - Fc) * G_Vis;\nB += Fc * G_Vis;\n}\n}\nreturn vec2(A, B) / float(NumSamples);\n}\nvoid main()\n{\ngl_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n";function BrdfLutGenerator(){this._framebuffer=void 0,this._colorTexture=void 0,this._drawCommand=void 0}function createCommand$1(e,t){var i=e._framebuffer;i=t.createViewportQuadCommand(BrdfLutGeneratorFS,{framebuffer:i,renderState:RenderState.fromCache({viewport:new BoundingRectangle(0,0,256,256)})});e._drawCommand=i}function createFramebuffer$2(e,t){var i=new Texture({context:t,width:256,height:256,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST});i=new Framebuffer({context:t,colorTextures:[e._colorTexture=i],destroyAttachments:!1});e._framebuffer=i}Object.defineProperties(BrdfLutGenerator.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),BrdfLutGenerator.prototype.update=function(e){defined(this._colorTexture)||(createFramebuffer$2(this,e=e.context),createCommand$1(this,e),this._drawCommand.execute(e),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy())},BrdfLutGenerator.prototype.isDestroyed=function(){return!1},BrdfLutGenerator.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),destroyObject(this)};var CameraFlightPath={};function getAltitude(e,t,i){if(e instanceof PerspectiveFrustum){var r=Math.tan(.5*e.fovy),n=e.near,a=e.near*r;r=e.aspectRatio*a;return Math.max(t*n/r,i*n/a)}return e instanceof PerspectiveOffCenterFrustum?(n=e.near,a=e.top,r=e.right,Math.max(t*n/r,i*n/a)):Math.max(t,i)}var scratchCart=new Cartesian3,scratchCart2$2=new Cartesian3;function createPitchFunction(e,t,i,r){if(defined(r)&&i(.5)>r){var n=i(0),a=i(1),o=(r=i(.5))-n,s=r-a;return function(r){var l=i(r);return r<=.5?(r=(l-n)/o,CesiumMath.lerp(e,-CesiumMath.PI_OVER_TWO,r)):(l=(l-a)/s,CesiumMath.lerp(-CesiumMath.PI_OVER_TWO,t,1-l))}}return function(i){return CesiumMath.lerp(e,t,i)}}function createHeightFunction(e,t,i,r,n){var a,o,s=n,l=Math.max(i,r);if(defined(s)||(a=e.position,o=e.up,n=e.right,e=e.frustum,t=Cartesian3.subtract(a,t,scratchCart),o=Cartesian3.magnitude(Cartesian3.multiplyByScalar(o,Cartesian3.dot(t,o),scratchCart2$2)),n=Cartesian3.magnitude(Cartesian3.multiplyByScalar(n,Cartesian3.dot(t,n),scratchCart2$2)),s=Math.min(.2*getAltitude(e,o,n),1e9)),l<s){var c=-Math.pow(1e6*(s-i),1/8),u=Math.pow(1e6*(s-r),1/8);return function(e){return e=e*(u-c)+c,-Math.pow(e,8)/1e6+s}}return function(e){return CesiumMath.lerp(i,r,e)}}function adjustAngleForLERP(e,t){return CesiumMath.equalsEpsilon(e,CesiumMath.TWO_PI,CesiumMath.EPSILON11)&&(e=0),t>e+Math.PI?e+=CesiumMath.TWO_PI:t<e-Math.PI&&(e-=CesiumMath.TWO_PI),e}var scratchStart=new Cartesian3;function createUpdateCV(e,t,i,r,n,a,o){var s=e.camera,l=Cartesian3.clone(s.position,scratchStart),c=s.pitch,u=adjustAngleForLERP(s.heading,r),d=adjustAngleForLERP(s.roll,a),h=createHeightFunction(s,i,l.z,i.z,o);return function(e){e=e.time/t,s.setView({orientation:{heading:CesiumMath.lerp(u,r,e),pitch:CesiumMath.lerp(c,n,e),roll:CesiumMath.lerp(d,a,e)}}),Cartesian2.lerp(l,i,e,s.position),s.position.z=h(e)}}function useLongestFlight(e,t){e.longitude<t.longitude?e.longitude+=CesiumMath.TWO_PI:t.longitude+=CesiumMath.TWO_PI}function useShortestFlight(e,t){var i=e.longitude-t.longitude;i<-CesiumMath.PI?e.longitude+=CesiumMath.TWO_PI:i>CesiumMath.PI&&(t.longitude+=CesiumMath.TWO_PI)}var scratchStartCart=new Cartographic,scratchEndCart=new Cartographic;function createUpdate3D(e,t,i,r,n,a,o,s,l,c){var u=e.camera,d=e.mapProjection.ellipsoid,h=Cartographic.clone(u.positionCartographic,scratchStartCart),p=u.pitch,f=adjustAngleForLERP(u.heading,r),m=adjustAngleForLERP(u.roll,a),g=d.cartesianToCartographic(i,scratchEndCart);h.longitude=CesiumMath.zeroToTwoPi(h.longitude),g.longitude=CesiumMath.zeroToTwoPi(g.longitude);var y=!1;defined(s)&&(e=CesiumMath.zeroToTwoPi(s),d=Math.min(h.longitude,g.longitude),s=Math.max(h.longitude,g.longitude),d=d<=e&&e<=s,defined(l)?(e=Math.abs(h.longitude-g.longitude),s=CesiumMath.TWO_PI-e,(d?e:s)<(d?s:e)*l&&!d&&(y=!0)):d||(y=!0)),(y?useLongestFlight:useShortestFlight)(h,g);var _,v,C,x,b=createHeightFunction(u,i,h.height,g.height,o),S=createPitchFunction(p,n,b,c);return _=h.longitude,v=g.longitude,C=h.latitude,x=g.latitude,function(e){var i=e.time/t;e=Cartesian3.fromRadians(CesiumMath.lerp(_,v,i),CesiumMath.lerp(C,x,i),b(i));u.setView({destination:e,orientation:{heading:CesiumMath.lerp(f,r,i),pitch:S(i),roll:CesiumMath.lerp(m,a,i)}})}}function createUpdate2D(e,t,i,r,n,a,o){var s=e.camera,l=Cartesian3.clone(s.position,scratchStart),c=adjustAngleForLERP(s.heading,r),u=(e=s.frustum.right-s.frustum.left,createHeightFunction(s,i,e,i.z,o));return function(e){var n=e.time/t;s.setView({orientation:{heading:CesiumMath.lerp(c,r,n)}}),Cartesian2.lerp(l,i,n,s.position);var a=u(n);n=(e=s.frustum).top/e.right,a=.5*(a-(e.right-e.left));e.right+=a,e.left-=a,e.top=n*e.right,e.bottom=-e.top}}var scratchCartographic$b=new Cartographic,scratchDestination=new Cartesian3;function emptyFlight(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function wrapCallback(e,t){return function(){"function"==typeof t&&t(),e.enableInputs=!0}}CameraFlightPath.createTween=function(e,t){var i=(t=defaultValue(t,defaultValue.EMPTY_OBJECT)).destination,r=e.mode;if(r===SceneMode$1.MORPHING)return emptyFlight();var n=defaultValue(t.convert,!0),a=(y=e.mapProjection).ellipsoid,o=t.maximumHeight,s=t.flyOverLongitude,l=t.flyOverLongitudeWeight,c=t.pitchAdjustHeight,u=t.easingFunction;n&&r!==SceneMode$1.SCENE3D&&(a.cartesianToCartographic(i,scratchCartographic$b),i=y.project(scratchCartographic$b,scratchDestination));var d=e.camera;defined(g=t.endTransform)&&d._setTransform(g),defined(n=t.duration)||(n=Math.ceil(Cartesian3.distance(d.position,i)/1e6)+2,n=Math.min(n,3));var h=defaultValue(t.heading,0),p=defaultValue(t.pitch,-CesiumMath.PI_OVER_TWO),f=defaultValue(t.roll,0);(y=e.screenSpaceCameraController).enableInputs=!1;var m=wrapCallback(y,t.complete),g=wrapCallback(y,t.cancel),y=d.frustum;if(t=(t=(t=(t=(t=e.mode===SceneMode$1.SCENE2D)&&Cartesian2.equalsEpsilon(d.position,i,CesiumMath.EPSILON6))&&CesiumMath.equalsEpsilon(Math.max(y.right-y.left,y.top-y.bottom),i.z,CesiumMath.EPSILON6))||e.mode!==SceneMode$1.SCENE2D&&Cartesian3.equalsEpsilon(i,d.position,CesiumMath.EPSILON10))&&CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(h),CesiumMath.negativePiToPi(d.heading),CesiumMath.EPSILON10)&&CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(p),CesiumMath.negativePiToPi(d.pitch),CesiumMath.EPSILON10)&&CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(f),CesiumMath.negativePiToPi(d.roll),CesiumMath.EPSILON10))return emptyFlight(m,g);var _=new Array(4);return _[SceneMode$1.SCENE2D]=createUpdate2D,_[SceneMode$1.SCENE3D]=createUpdate3D,_[SceneMode$1.COLUMBUS_VIEW]=createUpdateCV,n<=0?emptyFlight((function(){_[r](e,1,i,h,p,f,o,s,l,c)({time:1}),"function"==typeof m&&m()}),g):(t=_[r](e,n,i,h,p,f,o,s,l,c),defined(u)||(d=d.positionCartographic.height,u=(r===SceneMode$1.SCENE3D?a.cartesianToCartographic(i).height:i.z)<d&&11500<d?EasingFunction$1.CUBIC_OUT:EasingFunction$1.QUINTIC_IN_OUT),{duration:n,easingFunction:u,startObject:{time:0},stopObject:{time:n},update:t,complete:m,cancel:g})};var MapMode2D={ROTATE:0,INFINITE_SCROLL:1},MapMode2D$1=Object.freeze(MapMode2D);function Camera(e){this._scene=e,this._transform=Matrix4.clone(Matrix4.IDENTITY),this._invTransform=Matrix4.clone(Matrix4.IDENTITY),this._actualTransform=Matrix4.clone(Matrix4.IDENTITY),this._actualInvTransform=Matrix4.clone(Matrix4.IDENTITY),this._transformChanged=!1,this.position=new Cartesian3,this._position=new Cartesian3,this._positionWC=new Cartesian3,this._positionCartographic=new Cartographic,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new Cartesian3,this._direction=new Cartesian3,this._directionWC=new Cartesian3,this.up=new Cartesian3,this._up=new Cartesian3,this._upWC=new Cartesian3,this.right=new Cartesian3,this._right=new Cartesian3,this._rightWC=new Cartesian3,this.frustum=new PerspectiveFrustum,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=CesiumMath.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new Event,this._moveEnd=new Event,this._changed=new Event,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this.percentageChanged=.5,this._viewMatrix=new Matrix4,this._invViewMatrix=new Matrix4,updateViewMatrix(this),this._mode=SceneMode$1.SCENE3D,this._modeChanged=!0,e=e.mapProjection,this._projection=e,this._maxCoord=e.project(new Cartographic(Math.PI,CesiumMath.PI_OVER_TWO)),this._max2Dfrustum=void 0,rectangleCameraPosition3D(this,Camera.DEFAULT_VIEW_RECTANGLE,this.position,!0),e=Cartesian3.magnitude(this.position),e+=e*Camera.DEFAULT_VIEW_FACTOR,Cartesian3.normalize(this.position,this.position),Cartesian3.multiplyByScalar(this.position,e,this.position)}function updateViewMatrix(e){Matrix4.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),Matrix4.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),Matrix4.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function updateCameraDeltas(e){var t;defined(e._oldPositionWC)?(e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude,t=Cartesian3.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC),e.positionWCDeltaMagnitude=Cartesian3.magnitude(t),e._oldPositionWC=Cartesian3.clone(e.positionWC,e._oldPositionWC),0<e.positionWCDeltaMagnitude?(e.timeSinceMoved=0,e._lastMovedTimestamp=getTimestamp$1()):e.timeSinceMoved=Math.max(getTimestamp$1()-e._lastMovedTimestamp,0)/1e3):e._oldPositionWC=Cartesian3.clone(e.positionWC,e._oldPositionWC)}function convertTransformForColumbusView(e){Transforms.basisTo2D(e._projection,e._transform,e._actualTransform)}Camera.TRANSFORM_2D=new Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Camera.TRANSFORM_2D_INVERSE=Matrix4.inverseTransformation(Camera.TRANSFORM_2D,new Matrix4),Camera.DEFAULT_VIEW_RECTANGLE=Rectangle.fromDegrees(-95,-20,-70,90),Camera.DEFAULT_VIEW_FACTOR=.5,Camera.DEFAULT_OFFSET=new HeadingPitchRange(0,-CesiumMath.PI_OVER_FOUR,0),Camera.prototype.canPreloadFlight=function(){return defined(this._currentFlight)&&this._mode!==SceneMode$1.SCENE2D},Camera.prototype._updateCameraChanged=function(){var e=this;if(updateCameraDeltas(e),0!==e._changed.numberOfListeners){var t=e.percentageChanged;if(e._mode!==SceneMode$1.SCENE2D){if(!defined(e._changedDirection))return e._changedPosition=Cartesian3.clone(e.positionWC,e._changedPosition),void(e._changedDirection=Cartesian3.clone(e.directionWC,e._changedDirection));var i=CesiumMath.acosClamped(Cartesian3.dot(e.directionWC,e._changedDirection)),r=defined(e.frustum.fovy)?i/(.5*e.frustum.fovy):i,n=Cartesian3.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(t<r||t<n)&&(e._changed.raiseEvent(Math.max(r,n)),e._changedPosition=Cartesian3.clone(e.positionWC,e._changedPosition),e._changedDirection=Cartesian3.clone(e.directionWC,e._changedDirection))}else{if(!defined(e._changedFrustum))return e._changedPosition=Cartesian3.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());var a,o=e.position,s=e._changedPosition,l=e.frustum,c=e._changedFrustum,u=o.x+l.left,d=o.x+l.right,h=s.x+c.left,p=s.x+c.right,f=o.y+l.bottom,m=o.y+l.top,g=s.y+c.bottom;i=s.y+c.top,r=Math.max(u,h),n=Math.min(d,p),o=Math.max(f,g),s=Math.min(m,i);t<(a=n<=r||m<=o?1:1-(n-r)*(s-o)/(((a=u<h&&p<d&&f<g&&i<m?l:c).right-a.left)*(a.top-a.bottom)))&&(e._changed.raiseEvent(a),e._changedPosition=Cartesian3.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum))}}};var scratchCartographic$c=new Cartographic,scratchCartesian3Projection$1=new Cartesian3,scratchCartesian3$c=new Cartesian3,scratchCartesian4Origin=new Cartesian4,scratchCartesian4NewOrigin=new Cartesian4,scratchCartesian4NewXAxis=new Cartesian4,scratchCartesian4NewYAxis=new Cartesian4,scratchCartesian4NewZAxis=new Cartesian4;function convertTransformFor2D(e){var t=e._projection,i=t.ellipsoid,r=Matrix4.getColumn(e._transform,3,scratchCartesian4Origin),n=i.cartesianToCartographic(r,scratchCartographic$c),a=t.project(n,scratchCartesian3Projection$1),o=scratchCartesian4NewOrigin;o.x=a.z,o.y=a.x,o.z=a.y,o.w=1;var s=Cartesian4.clone(Cartesian4.UNIT_X,scratchCartesian4NewZAxis),l=Cartesian4.add(Matrix4.getColumn(e._transform,0,scratchCartesian3$c),r,scratchCartesian3$c);i.cartesianToCartographic(l,n),t.project(n,a);var c=scratchCartesian4NewXAxis;c.x=a.z,c.y=a.x,c.z=a.y,c.w=0,Cartesian3.subtract(c,o,c),c.x=0,l=scratchCartesian4NewYAxis,Cartesian3.magnitudeSquared(c)>CesiumMath.EPSILON10?Cartesian3.cross(s,c,l):(r=Cartesian4.add(Matrix4.getColumn(e._transform,1,scratchCartesian3$c),r,scratchCartesian3$c),i.cartesianToCartographic(r,n),t.project(n,a),l.x=a.z,l.y=a.x,l.z=a.y,l.w=0,Cartesian3.subtract(l,o,l),l.x=0,Cartesian3.magnitudeSquared(l)<CesiumMath.EPSILON10&&(Cartesian4.clone(Cartesian4.UNIT_Y,c),Cartesian4.clone(Cartesian4.UNIT_Z,l))),Cartesian3.cross(l,s,c),Cartesian3.normalize(c,c),Cartesian3.cross(s,c,l),Cartesian3.normalize(l,l),Matrix4.setColumn(e._actualTransform,0,c,e._actualTransform),Matrix4.setColumn(e._actualTransform,1,l,e._actualTransform),Matrix4.setColumn(e._actualTransform,2,s,e._actualTransform),Matrix4.setColumn(e._actualTransform,3,o,e._actualTransform)}var scratchCartesian$8=new Cartesian3;function updateMembers(e){var t=e._mode,i=!1,r=0;t===SceneMode$1.SCENE2D&&(i=(r=e.frustum.right-e.frustum.left)!==e._positionCartographic.height);var n=e._position,a=!Cartesian3.equals(n,e.position)||i;a&&(n=Cartesian3.clone(e.position,e._position));var o=e._direction,s=!Cartesian3.equals(o,e.direction);s&&(Cartesian3.normalize(e.direction,e.direction),o=Cartesian3.clone(e.direction,e._direction));var l=e._up,c=!Cartesian3.equals(l,e.up);c&&(Cartesian3.normalize(e.up,e.up),l=Cartesian3.clone(e.up,e._up));var u=e._right,d=!Cartesian3.equals(u,e.right);d&&(Cartesian3.normalize(e.right,e.right),u=Cartesian3.clone(e.right,e._right));var h=e._transformChanged||e._modeChanged;e._transformChanged=!1,h&&(Matrix4.inverseTransformation(e._transform,e._invTransform),e._mode===SceneMode$1.COLUMBUS_VIEW||e._mode===SceneMode$1.SCENE2D?Matrix4.equals(Matrix4.IDENTITY,e._transform)?Matrix4.clone(Camera.TRANSFORM_2D,e._actualTransform):(e._mode===SceneMode$1.COLUMBUS_VIEW?convertTransformForColumbusView:convertTransformFor2D)(e):Matrix4.clone(e._transform,e._actualTransform),Matrix4.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);var p;i=e._actualTransform;(a||h)&&(e._positionWC=Matrix4.multiplyByPoint(i,n,e._positionWC),t===SceneMode$1.SCENE3D||t===SceneMode$1.MORPHING?e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic):((p=scratchCartesian$8).x=e._positionWC.y,p.y=e._positionWC.z,p.z=e._positionWC.x,t===SceneMode$1.SCENE2D&&(p.z=r),e._projection.unproject(p,e._positionCartographic))),(s||c||d)&&(p=Cartesian3.dot(o,Cartesian3.cross(l,u,scratchCartesian$8)),Math.abs(1-p)>CesiumMath.EPSILON2&&(p=1/Cartesian3.magnitudeSquared(l),p=Cartesian3.dot(l,o)*p,p=Cartesian3.multiplyByScalar(o,p,scratchCartesian$8),l=Cartesian3.normalize(Cartesian3.subtract(l,p,e._up),e._up),Cartesian3.clone(l,e.up),u=Cartesian3.cross(o,l,e._right),Cartesian3.clone(u,e.right))),(s||h)&&(e._directionWC=Matrix4.multiplyByPointAsVector(i,o,e._directionWC),Cartesian3.normalize(e._directionWC,e._directionWC)),(c||h)&&(e._upWC=Matrix4.multiplyByPointAsVector(i,l,e._upWC),Cartesian3.normalize(e._upWC,e._upWC)),(d||h)&&(e._rightWC=Matrix4.multiplyByPointAsVector(i,u,e._rightWC),Cartesian3.normalize(e._rightWC,e._rightWC)),(a||s||c||d||h)&&updateViewMatrix(e)}function getHeading(e,t){return e=CesiumMath.equalsEpsilon(Math.abs(e.z),1,CesiumMath.EPSILON3)?Math.atan2(t.y,t.x)-CesiumMath.PI_OVER_TWO:Math.atan2(e.y,e.x)-CesiumMath.PI_OVER_TWO,CesiumMath.TWO_PI-CesiumMath.zeroToTwoPi(e)}function getPitch(e){return CesiumMath.PI_OVER_TWO-CesiumMath.acosClamped(e.z)}function getRoll(e,t,i){var r=0;return CesiumMath.equalsEpsilon(Math.abs(e.z),1,CesiumMath.EPSILON3)||(r=Math.atan2(-i.z,t.z),r=CesiumMath.zeroToTwoPi(r+CesiumMath.TWO_PI)),r}var scratchHPRMatrix1=new Matrix4,scratchHPRMatrix2=new Matrix4;Object.defineProperties(Camera.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return updateMembers(this),this._invTransform}},viewMatrix:{get:function(){return updateMembers(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return updateMembers(this),this._invViewMatrix}},positionCartographic:{get:function(){return updateMembers(this),this._positionCartographic}},positionWC:{get:function(){return updateMembers(this),this._positionWC}},directionWC:{get:function(){return updateMembers(this),this._directionWC}},upWC:{get:function(){return updateMembers(this),this._upWC}},rightWC:{get:function(){return updateMembers(this),this._rightWC}},heading:{get:function(){if(this._mode!==SceneMode$1.MORPHING){var e=this._projection.ellipsoid,t=Matrix4.clone(this._transform,scratchHPRMatrix1);e=Transforms.eastNorthUpToFixedFrame(this.positionWC,e,scratchHPRMatrix2);return this._setTransform(e),e=getHeading(this.direction,this.up),this._setTransform(t),e}}},pitch:{get:function(){if(this._mode!==SceneMode$1.MORPHING){var e=this._projection.ellipsoid,t=Matrix4.clone(this._transform,scratchHPRMatrix1);e=Transforms.eastNorthUpToFixedFrame(this.positionWC,e,scratchHPRMatrix2);return this._setTransform(e),e=getPitch(this.direction),this._setTransform(t),e}}},roll:{get:function(){if(this._mode!==SceneMode$1.MORPHING){var e=this._projection.ellipsoid,t=Matrix4.clone(this._transform,scratchHPRMatrix1);e=Transforms.eastNorthUpToFixedFrame(this.positionWC,e,scratchHPRMatrix2);return this._setTransform(e),e=getRoll(this.direction,this.up,this.right),this._setTransform(t),e}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}}),Camera.prototype.update=function(e){var t=!1;e!==this._mode&&(this._mode=e,this._modeChanged=e!==SceneMode$1.MORPHING,t=this._mode===SceneMode$1.SCENE2D),t&&(t=(e=this._max2Dfrustum=this.frustum.clone()).top/e.right,e.right=2*this._maxCoord.x,e.left=-e.right,e.top=t*e.right,e.bottom=-e.top),this._mode===SceneMode$1.SCENE2D&&clampMove2D(this,this.position)};var setTransformPosition=new Cartesian3,setTransformUp=new Cartesian3,setTransformDirection=new Cartesian3;Camera.prototype._setTransform=function(e){var t=Cartesian3.clone(this.positionWC,setTransformPosition),i=Cartesian3.clone(this.upWC,setTransformUp),r=Cartesian3.clone(this.directionWC,setTransformDirection);Matrix4.clone(e,this._transform),this._transformChanged=!0,updateMembers(this),e=this._actualInvTransform,Matrix4.multiplyByPoint(e,t,this.position),Matrix4.multiplyByPointAsVector(e,r,this.direction),Matrix4.multiplyByPointAsVector(e,i,this.up),Cartesian3.cross(this.direction,this.up,this.right),updateMembers(this)};var scratchAdjustOrthographicFrustumMousePosition=new Cartesian2,scratchPickRay=new Ray,scratchRayIntersection=new Cartesian3,scratchDepthIntersection=new Cartesian3;function calculateOrthographicFrustumWidth(e){if(!Matrix4.equals(Matrix4.IDENTITY,e.transform))return Cartesian3.magnitude(e.position);var t,i,r=e._scene,n=r.globe,a=scratchAdjustOrthographicFrustumMousePosition;return a.x=r.drawingBufferWidth/2,a.y=r.drawingBufferHeight/2,defined(n)&&(i=e.getPickRay(a,scratchPickRay),i=n.pickWorldCoordinates(i,r,!0,scratchRayIntersection)),r.pickPositionSupported&&(t=r.pickPositionWorldCoordinates(a,scratchDepthIntersection)),defined(i)||defined(t)?(t=defined(t)?Cartesian3.distance(t,e.positionWC):Number.POSITIVE_INFINITY,i=defined(i)?Cartesian3.distance(i,e.positionWC):Number.POSITIVE_INFINITY,Math.min(t,i)):Math.max(e.positionCartographic.height,0)}Camera.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof OrthographicFrustum&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=calculateOrthographicFrustumWidth(this)))};var scratchSetViewCartesian=new Cartesian3,scratchSetViewTransform1=new Matrix4,scratchSetViewTransform2=new Matrix4,scratchSetViewQuaternion=new Quaternion,scratchSetViewMatrix3=new Matrix3,scratchSetViewCartographic=new Cartographic;function setView3D(e,t,i){var r=Matrix4.clone(e.transform,scratchSetViewTransform1);t=Transforms.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,scratchSetViewTransform2);e._setTransform(t),Cartesian3.clone(Cartesian3.ZERO,e.position),i.heading=i.heading-CesiumMath.PI_OVER_TWO,i=Quaternion.fromHeadingPitchRoll(i,scratchSetViewQuaternion),i=Matrix3.fromQuaternion(i,scratchSetViewMatrix3),Matrix3.getColumn(i,0,e.direction),Matrix3.getColumn(i,2,e.up),Cartesian3.cross(e.direction,e.up,e.right),e._setTransform(r),e._adjustOrthographicFrustum(!0)}function setViewCV(e,t,i,r){var n,a=Matrix4.clone(e.transform,scratchSetViewTransform1);e._setTransform(Matrix4.IDENTITY),Cartesian3.equals(t,e.positionWC)||(r&&(r=(n=e._projection).ellipsoid.cartesianToCartographic(t,scratchSetViewCartographic),t=n.project(r,scratchSetViewCartesian)),Cartesian3.clone(t,e.position)),i.heading=i.heading-CesiumMath.PI_OVER_TWO,i=Quaternion.fromHeadingPitchRoll(i,scratchSetViewQuaternion),i=Matrix3.fromQuaternion(i,scratchSetViewMatrix3),Matrix3.getColumn(i,0,e.direction),Matrix3.getColumn(i,2,e.up),Cartesian3.cross(e.direction,e.up,e.right),e._setTransform(a),e._adjustOrthographicFrustum(!0)}function setView2D(e,t,i,r){var n,a,o=Matrix4.clone(e.transform,scratchSetViewTransform1);e._setTransform(Matrix4.IDENTITY),Cartesian3.equals(t,e.positionWC)||(r&&(a=(n=e._projection).ellipsoid.cartesianToCartographic(t,scratchSetViewCartographic),t=n.project(a,scratchSetViewCartesian)),Cartesian2.clone(t,e.position),n=-(r=.5*-t.z),a=e.frustum,r<n&&(t=a.top/a.right,a.right=n,a.left=r,a.top=a.right*t,a.bottom=-a.top)),e._scene.mapMode2D===MapMode2D$1.ROTATE&&(i.heading=i.heading-CesiumMath.PI_OVER_TWO,i.pitch=-CesiumMath.PI_OVER_TWO,i.roll=0,i=Quaternion.fromHeadingPitchRoll(i,scratchSetViewQuaternion),i=Matrix3.fromQuaternion(i,scratchSetViewMatrix3),Matrix3.getColumn(i,2,e.up),Cartesian3.cross(e.direction,e.up,e.right)),e._setTransform(o)}var scratchToHPRDirection=new Cartesian3,scratchToHPRUp=new Cartesian3,scratchToHPRRight=new Cartesian3;function directionUpToHeadingPitchRoll(e,t,i,r){var n=Cartesian3.clone(i.direction,scratchToHPRDirection);i=Cartesian3.clone(i.up,scratchToHPRUp);e._scene.mode===SceneMode$1.SCENE3D&&(a=e._projection.ellipsoid,a=Transforms.eastNorthUpToFixedFrame(t,a,scratchHPRMatrix1),a=Matrix4.inverseTransformation(a,scratchHPRMatrix2),Matrix4.multiplyByPointAsVector(a,n,n),Matrix4.multiplyByPointAsVector(a,i,i));var a=Cartesian3.cross(n,i,scratchToHPRRight);return r.heading=getHeading(n,i),r.pitch=getPitch(n),r.roll=getRoll(n,i,a),r}var scratchSetViewOptions={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},scratchHpr=new HeadingPitchRoll;Camera.prototype.setView=function(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t,i=defaultValue(e.orientation,defaultValue.EMPTY_OBJECT),r=this._mode;r!==SceneMode$1.MORPHING&&(defined(e.endTransform)&&this._setTransform(e.endTransform),t=defaultValue(e.convert,!0),defined(e=defaultValue(e.destination,Cartesian3.clone(this.positionWC,scratchSetViewCartesian)))&&defined(e.west)&&(e=this.getRectangleCameraCoordinates(e,scratchSetViewCartesian),t=!1),defined(i.direction)&&(i=directionUpToHeadingPitchRoll(this,e,i,scratchSetViewOptions.orientation)),scratchHpr.heading=defaultValue(i.heading,0),scratchHpr.pitch=defaultValue(i.pitch,-CesiumMath.PI_OVER_TWO),scratchHpr.roll=defaultValue(i.roll,0),r===SceneMode$1.SCENE3D?setView3D(this,e,scratchHpr):(r===SceneMode$1.SCENE2D?setView2D:setViewCV)(this,e,scratchHpr,t))};var pitchScratch=new Cartesian3;function clampMove2D(e,t){var i,r=e._scene.mapMode2D===MapMode2D$1.ROTATE,n=e._maxCoord.x;e=e._maxCoord.y,r=r?-(i=n):(i=t.x-2*n,t.x+2*n);t.x>n&&(t.x=i),t.x<-n&&(t.x=r),t.y>e&&(t.y=e),t.y<-e&&(t.y=-e)}Camera.prototype.flyHome=function(e){var t,i,r=this._mode;r===SceneMode$1.MORPHING&&this._scene.completeMorph(),r===SceneMode$1.SCENE2D?this.flyTo({destination:Camera.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:Matrix4.IDENTITY}):r===SceneMode$1.SCENE3D?(i=this.getRectangleCameraCoordinates(Camera.DEFAULT_VIEW_RECTANGLE),t=Cartesian3.magnitude(i),t+=t*Camera.DEFAULT_VIEW_FACTOR,Cartesian3.normalize(i,i),Cartesian3.multiplyByScalar(i,t,i),this.flyTo({destination:i,duration:e,endTransform:Matrix4.IDENTITY})):r===SceneMode$1.COLUMBUS_VIEW&&(i=this._projection.ellipsoid.maximumRadius,r=new Cartesian3(0,-1,1),r=Cartesian3.multiplyByScalar(Cartesian3.normalize(r,r),5*i,r),this.flyTo({destination:r,duration:e,orientation:{heading:0,pitch:-Math.acos(Cartesian3.normalize(r,pitchScratch).z),roll:0},endTransform:Matrix4.IDENTITY,convert:!1}))},Camera.prototype.worldToCameraCoordinates=function(e,t){return defined(t)||(t=new Cartesian4),updateMembers(this),Matrix4.multiplyByVector(this._actualInvTransform,e,t)},Camera.prototype.worldToCameraCoordinatesPoint=function(e,t){return defined(t)||(t=new Cartesian3),updateMembers(this),Matrix4.multiplyByPoint(this._actualInvTransform,e,t)},Camera.prototype.worldToCameraCoordinatesVector=function(e,t){return defined(t)||(t=new Cartesian3),updateMembers(this),Matrix4.multiplyByPointAsVector(this._actualInvTransform,e,t)},Camera.prototype.cameraToWorldCoordinates=function(e,t){return defined(t)||(t=new Cartesian4),updateMembers(this),Matrix4.multiplyByVector(this._actualTransform,e,t)},Camera.prototype.cameraToWorldCoordinatesPoint=function(e,t){return defined(t)||(t=new Cartesian3),updateMembers(this),Matrix4.multiplyByPoint(this._actualTransform,e,t)},Camera.prototype.cameraToWorldCoordinatesVector=function(e,t){return defined(t)||(t=new Cartesian3),updateMembers(this),Matrix4.multiplyByPointAsVector(this._actualTransform,e,t)};var moveScratch=new Cartesian3;Camera.prototype.move=function(e,t){var i=this.position;Cartesian3.multiplyByScalar(e,t,moveScratch),Cartesian3.add(i,moveScratch,i),this._mode===SceneMode$1.SCENE2D&&clampMove2D(this,i),this._adjustOrthographicFrustum(!0)},Camera.prototype.moveForward=function(e){e=defaultValue(e,this.defaultMoveAmount),this._mode===SceneMode$1.SCENE2D?zoom2D(this,e):this.move(this.direction,e)},Camera.prototype.moveBackward=function(e){e=defaultValue(e,this.defaultMoveAmount),this._mode===SceneMode$1.SCENE2D?zoom2D(this,-e):this.move(this.direction,-e)},Camera.prototype.moveUp=function(e){e=defaultValue(e,this.defaultMoveAmount),this.move(this.up,e)},Camera.prototype.moveDown=function(e){e=defaultValue(e,this.defaultMoveAmount),this.move(this.up,-e)},Camera.prototype.moveRight=function(e){e=defaultValue(e,this.defaultMoveAmount),this.move(this.right,e)},Camera.prototype.moveLeft=function(e){e=defaultValue(e,this.defaultMoveAmount),this.move(this.right,-e)},Camera.prototype.lookLeft=function(e){e=defaultValue(e,this.defaultLookAmount),this._mode!==SceneMode$1.SCENE2D&&this.look(this.up,-e)},Camera.prototype.lookRight=function(e){e=defaultValue(e,this.defaultLookAmount),this._mode!==SceneMode$1.SCENE2D&&this.look(this.up,e)},Camera.prototype.lookUp=function(e){e=defaultValue(e,this.defaultLookAmount),this._mode!==SceneMode$1.SCENE2D&&this.look(this.right,-e)},Camera.prototype.lookDown=function(e){e=defaultValue(e,this.defaultLookAmount),this._mode!==SceneMode$1.SCENE2D&&this.look(this.right,e)};var lookScratchQuaternion=new Quaternion,lookScratchMatrix=new Matrix3;Camera.prototype.look=function(e,t){var i=defaultValue(t,this.defaultLookAmount),r=Quaternion.fromAxisAngle(e,-i,lookScratchQuaternion);t=Matrix3.fromQuaternion(r,lookScratchMatrix),e=this.direction,i=this.up,r=this.right;Matrix3.multiplyByVector(t,e,e),Matrix3.multiplyByVector(t,i,i),Matrix3.multiplyByVector(t,r,r)},Camera.prototype.twistLeft=function(e){e=defaultValue(e,this.defaultLookAmount),this.look(this.direction,e)},Camera.prototype.twistRight=function(e){e=defaultValue(e,this.defaultLookAmount),this.look(this.direction,-e)};var rotateScratchQuaternion=new Quaternion,rotateScratchMatrix=new Matrix3;Camera.prototype.rotate=function(e,t){t=defaultValue(t,this.defaultRotateAmount),t=Quaternion.fromAxisAngle(e,-t,rotateScratchQuaternion),t=Matrix3.fromQuaternion(t,rotateScratchMatrix),Matrix3.multiplyByVector(t,this.position,this.position),Matrix3.multiplyByVector(t,this.direction,this.direction),Matrix3.multiplyByVector(t,this.up,this.up),Cartesian3.cross(this.direction,this.up,this.right),Cartesian3.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},Camera.prototype.rotateDown=function(e){rotateVertical(this,e=defaultValue(e,this.defaultRotateAmount))},Camera.prototype.rotateUp=function(e){rotateVertical(this,-(e=defaultValue(e,this.defaultRotateAmount)))};var rotateVertScratchP=new Cartesian3,rotateVertScratchA=new Cartesian3,rotateVertScratchTan=new Cartesian3,rotateVertScratchNegate=new Cartesian3;function rotateVertical(e,t){var i,r,n,a=e.position;defined(e.constrainedAxis)&&!Cartesian3.equalsEpsilon(e.position,Cartesian3.ZERO,CesiumMath.EPSILON2)?(n=Cartesian3.normalize(a,rotateVertScratchP),i=Cartesian3.equalsEpsilon(n,e.constrainedAxis,CesiumMath.EPSILON2),r=Cartesian3.equalsEpsilon(n,Cartesian3.negate(e.constrainedAxis,rotateVertScratchNegate),CesiumMath.EPSILON2),i||r?(i&&t<0||r&&0<t)&&e.rotate(e.right,t):(a=Cartesian3.normalize(e.constrainedAxis,rotateVertScratchA),i=Cartesian3.dot(n,a),r=CesiumMath.acosClamped(i),0<t&&r<t&&(t=r-CesiumMath.EPSILON4),i=Cartesian3.dot(n,Cartesian3.negate(a,rotateVertScratchNegate)),r=CesiumMath.acosClamped(i),t<0&&r<-t&&(t=-r+CesiumMath.EPSILON4),n=Cartesian3.cross(a,n,rotateVertScratchTan),e.rotate(n,t))):e.rotate(e.right,t)}function rotateHorizontal(e,t){defined(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function zoom2D(e,t){var i,r,n,a=e.frustum;t*=.5,Math.abs(a.top)+Math.abs(a.bottom)>Math.abs(a.left)+Math.abs(a.right)?(r=a.top-t,n=a.bottom+t,i=e._maxCoord.y,e._scene.mapMode2D===MapMode2D$1.ROTATE&&(i*=e.maximumZoomFactor),i<n&&(r=-(n=i)),r<=n&&(n=-(r=1)),i=a.right/a.top,a.top=r,a.bottom=n,a.right=a.top*i,a.left=-a.right):(r=a.right-t,n=a.left+t,t=e._maxCoord.x,e._scene.mapMode2D===MapMode2D$1.ROTATE&&(t*=e.maximumZoomFactor),t<r&&(n=-(r=t)),r<=n&&(n=-(r=1)),i=a.top/a.right,a.right=r,a.left=n,a.top=a.right*i,a.bottom=-a.top)}function zoom3D(e,t){e.move(e.direction,t)}Camera.prototype.rotateRight=function(e){rotateHorizontal(this,-(e=defaultValue(e,this.defaultRotateAmount)))},Camera.prototype.rotateLeft=function(e){rotateHorizontal(this,e=defaultValue(e,this.defaultRotateAmount))},Camera.prototype.zoomIn=function(e){e=defaultValue(e,this.defaultZoomAmount),(this._mode===SceneMode$1.SCENE2D?zoom2D:zoom3D)(this,e)},Camera.prototype.zoomOut=function(e){e=defaultValue(e,this.defaultZoomAmount),(this._mode===SceneMode$1.SCENE2D?zoom2D:zoom3D)(this,-e)},Camera.prototype.getMagnitude=function(){return this._mode===SceneMode$1.SCENE3D?Cartesian3.magnitude(this.position):this._mode===SceneMode$1.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===SceneMode$1.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var scratchLookAtMatrix4=new Matrix4;Camera.prototype.lookAt=function(e,t){e=Transforms.eastNorthUpToFixedFrame(e,Ellipsoid.WGS84,scratchLookAtMatrix4),this.lookAtTransform(e,t)};var scratchLookAtHeadingPitchRangeOffset=new Cartesian3,scratchLookAtHeadingPitchRangeQuaternion1=new Quaternion,scratchLookAtHeadingPitchRangeQuaternion2=new Quaternion,scratchHeadingPitchRangeMatrix3=new Matrix3;function offsetFromHeadingPitchRange(e,t,i){return t=CesiumMath.clamp(t,-CesiumMath.PI_OVER_TWO,CesiumMath.PI_OVER_TWO),e=CesiumMath.zeroToTwoPi(e)-CesiumMath.PI_OVER_TWO,t=Quaternion.fromAxisAngle(Cartesian3.UNIT_Y,-t,scratchLookAtHeadingPitchRangeQuaternion1),e=Quaternion.fromAxisAngle(Cartesian3.UNIT_Z,-e,scratchLookAtHeadingPitchRangeQuaternion2),t=Quaternion.multiply(e,t,e),e=Matrix3.fromQuaternion(t,scratchHeadingPitchRangeMatrix3),t=Cartesian3.clone(Cartesian3.UNIT_X,scratchLookAtHeadingPitchRangeOffset),Matrix3.multiplyByVector(e,t,t),Cartesian3.negate(t,t),Cartesian3.multiplyByScalar(t,i,t),t}Camera.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),defined(t)){var i=defined(t.heading)?offsetFromHeadingPitchRange(t.heading,t.pitch,t.range):t;if(this._mode===SceneMode$1.SCENE2D){Cartesian2.clone(Cartesian2.ZERO,this.position),Cartesian3.negate(i,this.up),this.up.z=0,Cartesian3.magnitudeSquared(this.up)<CesiumMath.EPSILON10&&Cartesian3.clone(Cartesian3.UNIT_Y,this.up),Cartesian3.normalize(this.up,this.up),this._setTransform(Matrix4.IDENTITY),Cartesian3.negate(Cartesian3.UNIT_Z,this.direction),Cartesian3.cross(this.direction,this.up,this.right),Cartesian3.normalize(this.right,this.right);var r=this.frustum;t=r.top/r.right;return r.right=.5*Cartesian3.magnitude(i),r.left=-r.right,r.top=t*r.right,r.bottom=-r.top,void this._setTransform(e)}Cartesian3.clone(i,this.position),Cartesian3.negate(this.position,this.direction),Cartesian3.normalize(this.direction,this.direction),Cartesian3.cross(this.direction,Cartesian3.UNIT_Z,this.right),Cartesian3.magnitudeSquared(this.right)<CesiumMath.EPSILON10&&Cartesian3.clone(Cartesian3.UNIT_X,this.right),Cartesian3.normalize(this.right,this.right),Cartesian3.cross(this.right,this.direction,this.up),Cartesian3.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)}};var viewRectangle3DCartographic1=new Cartographic,viewRectangle3DCartographic2=new Cartographic,viewRectangle3DNorthEast=new Cartesian3,viewRectangle3DSouthWest=new Cartesian3,viewRectangle3DNorthWest=new Cartesian3,viewRectangle3DSouthEast=new Cartesian3,viewRectangle3DNorthCenter=new Cartesian3,viewRectangle3DSouthCenter=new Cartesian3,viewRectangle3DCenter=new Cartesian3,viewRectangle3DEquator=new Cartesian3,defaultRF={direction:new Cartesian3,right:new Cartesian3,up:new Cartesian3},viewRectangle3DEllipsoidGeodesic;function computeD(e,t,i,r){return Math.abs(Cartesian3.dot(t,i))/r-Cartesian3.dot(e,i)}function rectangleCameraPosition3D(e,t,i,r){var n=e._projection.ellipsoid,a=r?e:defaultRF,o=t.north,s=t.south,l=t.east,c=t.west;l<c&&(l+=CesiumMath.TWO_PI);var u=.5*(c+l),d=s<-CesiumMath.PI_OVER_TWO+CesiumMath.RADIANS_PER_DEGREE&&o>CesiumMath.PI_OVER_TWO-CesiumMath.RADIANS_PER_DEGREE?0:((_=viewRectangle3DCartographic1).longitude=u,_.latitude=o,_.height=0,(v=viewRectangle3DCartographic2).longitude=u,v.latitude=s,v.height=0,defined(C=viewRectangle3DEllipsoidGeodesic)&&C.ellipsoid===n||(viewRectangle3DEllipsoidGeodesic=C=new EllipsoidGeodesic(void 0,void 0,n)),C.setEndPoints(_,v),C.interpolateUsingFraction(.5,viewRectangle3DCartographic1).latitude),h=viewRectangle3DCartographic1;h.longitude=u,h.latitude=d,h.height=0;var p=n.cartographicToCartesian(h,viewRectangle3DCenter),f=viewRectangle3DCartographic1;f.longitude=l,f.latitude=o;var m=n.cartographicToCartesian(f,viewRectangle3DNorthEast);f.longitude=c;var g=n.cartographicToCartesian(f,viewRectangle3DNorthWest);f.longitude=u;var y=n.cartographicToCartesian(f,viewRectangle3DNorthCenter);f.latitude=s,r=n.cartographicToCartesian(f,viewRectangle3DSouthCenter),f.longitude=l,t=n.cartographicToCartesian(f,viewRectangle3DSouthEast),f.longitude=c;var _=n.cartographicToCartesian(f,viewRectangle3DSouthWest);Cartesian3.subtract(g,p,g),Cartesian3.subtract(t,p,t),Cartesian3.subtract(m,p,m),Cartesian3.subtract(_,p,_),Cartesian3.subtract(y,p,y),Cartesian3.subtract(r,p,r);var v=n.geodeticSurfaceNormal(p,a.direction);Cartesian3.negate(v,v);var C=Cartesian3.cross(v,Cartesian3.UNIT_Z,a.right);Cartesian3.normalize(C,C);var x,b;d=Cartesian3.cross(C,v,a.up);return e.frustum instanceof OrthographicFrustum?(h=Math.max(Cartesian3.distance(m,g),Cartesian3.distance(t,_)),(a=(u=Math.max(Cartesian3.distance(m,t),Cartesian3.distance(g,_)))*(f=e.frustum._offCenterFrustum.right/e.frustum._offCenterFrustum.top))<h?x=(b=h)/f:(x=u,b=a),b=Math.max(b,x)):(x=Math.tan(.5*e.frustum.fovy),e=e.frustum.aspectRatio*x,b=Math.max(computeD(v,d,g,x),computeD(v,d,t,x),computeD(v,d,m,x),computeD(v,d,_,x),computeD(v,d,y,x),computeD(v,d,r,x),computeD(v,C,g,e),computeD(v,C,t,e),computeD(v,C,m,e),computeD(v,C,_,e),computeD(v,C,y,e),computeD(v,C,r,e)),s<0&&0<o&&((o=viewRectangle3DCartographic1).longitude=c,o.latitude=0,o.height=0,c=n.cartographicToCartesian(o,viewRectangle3DEquator),Cartesian3.subtract(c,p,c),b=Math.max(b,computeD(v,d,c,x),computeD(v,C,c,e)),o.longitude=l,c=n.cartographicToCartesian(o,viewRectangle3DEquator),Cartesian3.subtract(c,p,c),b=Math.max(b,computeD(v,d,c,x),computeD(v,C,c,e)))),Cartesian3.add(p,Cartesian3.multiplyByScalar(v,-b,viewRectangle3DEquator),i)}var viewRectangleCVCartographic=new Cartographic,viewRectangleCVNorthEast=new Cartesian3,viewRectangleCVSouthWest=new Cartesian3;function rectangleCameraPositionColumbusView(e,t,i){var r=e._projection;t.west>t.east&&(t=Rectangle.MAX_VALUE);var n=e._actualTransform,a=e._actualInvTransform;(l=viewRectangleCVCartographic).longitude=t.east,l.latitude=t.north;var o=r.project(l,viewRectangleCVNorthEast);Matrix4.multiplyByPoint(n,o,o),Matrix4.multiplyByPoint(a,o,o),l.longitude=t.west,l.latitude=t.south;var s,l=r.project(l,viewRectangleCVSouthWest);return Matrix4.multiplyByPoint(n,l,l),Matrix4.multiplyByPoint(a,l,l),i.x=.5*(o.x-l.x)+l.x,i.y=.5*(o.y-l.y)+l.y,defined(e.frustum.fovy)?(s=Math.tan(.5*e.frustum.fovy),e=e.frustum.aspectRatio*s,i.z=.5*Math.max((o.x-l.x)/e,(o.y-l.y)/s)):(s=o.x-l.x,l=o.y-l.y,i.z=Math.max(s,l)),i}var viewRectangle2DCartographic=new Cartographic,viewRectangle2DNorthEast=new Cartesian3,viewRectangle2DSouthWest=new Cartesian3;function rectangleCameraPosition2D(e,t,i){var r=e._projection,n=t.east;t.west>t.east&&(e._scene.mapMode2D===MapMode2D$1.INFINITE_SCROLL?n+=CesiumMath.TWO_PI:n=(t=Rectangle.MAX_VALUE).east);var a=viewRectangle2DCartographic;a.longitude=n,a.latitude=t.north;var o=r.project(a,viewRectangle2DNorthEast);a.longitude=t.west,a.latitude=t.south;var s,l,c=r.project(a,viewRectangle2DSouthWest),u=.5*Math.abs(o.x-c.x);return(e=(n=.5*Math.abs(o.y-c.y))*(t=e.frustum.right/e.frustum.top))<u?l=(s=u)/t:(l=n,s=e),n=Math.max(2*s,2*l),i.x=.5*(o.x-c.x)+c.x,i.y=.5*(o.y-c.y)+c.y,(a=r.unproject(i,a)).height=n,r.project(a,i)}Camera.prototype.getRectangleCameraCoordinates=function(e,t){var i=this._mode;return defined(t)||(t=new Cartesian3),i===SceneMode$1.SCENE3D?rectangleCameraPosition3D(this,e,t):i===SceneMode$1.COLUMBUS_VIEW?rectangleCameraPositionColumbusView(this,e,t):i===SceneMode$1.SCENE2D?rectangleCameraPosition2D(this,e,t):void 0};var pickEllipsoid3DRay=new Ray;function pickEllipsoid3D(e,t,i,r){if(i=defaultValue(i,Ellipsoid.WGS84),t=e.getPickRay(t,pickEllipsoid3DRay),i=IntersectionTests.rayEllipsoid(t,i))return i=0<i.start?i.start:i.stop,Ray.getPoint(t,i,r)}var pickEllipsoid2DRay=new Ray;function pickMap2D(e,t,i,r){if(t=e.getPickRay(t,pickEllipsoid2DRay).origin,t=Cartesian3.fromElements(t.y,t.z,0,t),!((t=i.unproject(t)).latitude<-CesiumMath.PI_OVER_TWO||t.latitude>CesiumMath.PI_OVER_TWO))return i.ellipsoid.cartographicToCartesian(t,r)}var pickEllipsoidCVRay=new Ray;function pickMapColumbusView(e,t,i,r){if(t=-(e=e.getPickRay(t,pickEllipsoidCVRay)).origin.x/e.direction.x,Ray.getPoint(e,t,r),!((t=i.unproject(new Cartesian3(r.y,r.z,0))).latitude<-CesiumMath.PI_OVER_TWO||t.latitude>CesiumMath.PI_OVER_TWO||t.longitude<-Math.PI||t.longitude>Math.PI))return i.ellipsoid.cartographicToCartesian(t,r)}Camera.prototype.pickEllipsoid=function(e,t,i){var r=this._scene.canvas;if(0!==r.clientWidth&&0!==r.clientHeight){if(defined(i)||(i=new Cartesian3),t=defaultValue(t,Ellipsoid.WGS84),this._mode===SceneMode$1.SCENE3D)i=pickEllipsoid3D(this,e,t,i);else if(this._mode===SceneMode$1.SCENE2D)i=pickMap2D(this,e,this._projection,i);else{if(this._mode!==SceneMode$1.COLUMBUS_VIEW)return;i=pickMapColumbusView(this,e,this._projection,i)}return i}};var pickPerspCenter=new Cartesian3,pickPerspXDir=new Cartesian3,pickPerspYDir=new Cartesian3;function getPickRayPerspective(e,t,i){var r=(l=e._scene.canvas).clientWidth,n=l.clientHeight,a=Math.tan(.5*e.frustum.fovy),o=e.frustum.aspectRatio*a,s=e.frustum.near,l=2/r*t.x-1;r=2/n*(n-t.y)-1,n=e.positionWC;return Cartesian3.clone(n,i.origin),t=Cartesian3.multiplyByScalar(e.directionWC,s,pickPerspCenter),Cartesian3.add(n,t,t),o=Cartesian3.multiplyByScalar(e.rightWC,l*s*o,pickPerspXDir),a=Cartesian3.multiplyByScalar(e.upWC,r*s*a,pickPerspYDir),o=Cartesian3.add(t,o,i.direction),Cartesian3.add(o,a,o),Cartesian3.subtract(o,n,o),Cartesian3.normalize(o,o),i}var scratchDirection$1=new Cartesian3;function getPickRayOrthographic(e,t,i){var r,n=(r=e._scene.canvas).clientWidth,a=r.clientHeight;return defined((r=e.frustum)._offCenterFrustum)&&(r=r._offCenterFrustum),n=2/n*t.x-1,n*=.5*(r.right-r.left),t=2/a*(a-t.y)-1,t*=.5*(r.top-r.bottom),r=i.origin,Cartesian3.clone(e.position,r),Cartesian3.multiplyByScalar(e.right,n,scratchDirection$1),Cartesian3.add(scratchDirection$1,r,r),Cartesian3.multiplyByScalar(e.up,t,scratchDirection$1),Cartesian3.add(scratchDirection$1,r,r),Cartesian3.clone(e.directionWC,i.direction),e._mode!==SceneMode$1.COLUMBUS_VIEW&&e._mode!==SceneMode$1.SCENE2D||Cartesian3.fromElements(i.origin.z,i.origin.x,i.origin.y,i.origin),i}Camera.prototype.getPickRay=function(e,t){defined(t)||(t=new Ray);var i=this.frustum;return(defined(i.aspectRatio)&&defined(i.fov)&&defined(i.near)?getPickRayPerspective:getPickRayOrthographic)(this,e,t)};var scratchToCenter$1=new Cartesian3,scratchProj=new Cartesian3;Camera.prototype.distanceToBoundingSphere=function(e){var t=Cartesian3.subtract(this.positionWC,e.center,scratchToCenter$1);t=Cartesian3.multiplyByScalar(this.directionWC,Cartesian3.dot(t,this.directionWC),scratchProj);return Math.max(0,Cartesian3.magnitude(t)-e.radius)};var scratchPixelSize=new Cartesian2;function createAnimationTemplateCV(e,t,i,r,n,a){var o=Cartesian3.clone(t);return i.y>r?o.y-=i.y-r:i.y<-r&&(o.y+=-r-i.y),i.z>n?o.z-=i.z-n:i.z<-n&&(o.z+=-n-i.z),{easingFunction:EasingFunction$1.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:a,update:function(i){i=Cartesian3.lerp(t,o,i.time,new Cartesian3),e.worldToCameraCoordinatesPoint(i,e.position)}}}Camera.prototype.getPixelSize=function(e,t,i){return e=this.distanceToBoundingSphere(e),e=this.frustum.getPixelDimensions(t,i,e,this._scene.pixelRatio,scratchPixelSize),Math.max(e.x,e.y)};var normalScratch$4=new Cartesian3,centerScratch$4=new Cartesian3,posScratch=new Cartesian3,scratchCartesian3Subtract=new Cartesian3;function createAnimationCV(e,t){var i=e.position,r=e.direction,n=e.worldToCameraCoordinatesVector(Cartesian3.UNIT_X,normalScratch$4),a=-Cartesian3.dot(n,i)/Cartesian3.dot(n,r),o=Cartesian3.add(i,Cartesian3.multiplyByScalar(r,a,centerScratch$4),centerScratch$4);e.cameraToWorldCoordinatesPoint(o,o),i=e.cameraToWorldCoordinatesPoint(e.position,posScratch);var s=Math.tan(.5*e.frustum.fovy);a=(n=e.frustum.aspectRatio*s)*(r=Cartesian3.magnitude(Cartesian3.subtract(i,o,scratchCartesian3Subtract))),n=s*r,s=e._maxCoord.x,r=e._maxCoord.y,a=Math.max(a-s,s),s=Math.max(n-r,r);if((i.z<-a||i.z>a||i.y<-s||i.y>s)&&(n=o.y<-a||o.y>a,r=o.z<-s||o.z>s,n||r))return createAnimationTemplateCV(e,i,o,a,s,t)}Camera.prototype.createCorrectPositionTween=function(e){if(this._mode===SceneMode$1.COLUMBUS_VIEW)return createAnimationCV(this,e)};var scratchFlyToDestination=new Cartesian3,newOptions={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};function distanceToBoundingSphere3D(e,t){var i=e.frustum;e=Math.tan(.5*i.fovy),i=i.aspectRatio*e;return Math.max(t/i,t/e)}function distanceToBoundingSphere2D(e,t){var i,r,n=e.frustum;return defined(n._offCenterFrustum)&&(n=n._offCenterFrustum),(n=t*(e=n.right/n.top))<t?r=(i=t)/e:(r=t,i=n),1.5*Math.max(i,r)}Camera.prototype.cancelFlight=function(){defined(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},Camera.prototype.completeFlight=function(){var e;defined(this._currentFlight)&&(this._currentFlight.cancelTween(),(e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}}).destination=newOptions.destination,e.orientation.heading=newOptions.heading,e.orientation.pitch=newOptions.pitch,e.orientation.roll=newOptions.roll,this.setView(e),defined(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0)},Camera.prototype.flyTo=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).destination;if(this._mode!==SceneMode$1.MORPHING){this.cancelFlight();var i=defaultValue(e.orientation,defaultValue.EMPTY_OBJECT);if(defined(i.direction)&&(i=directionUpToHeadingPitchRoll(this,t,i,scratchSetViewOptions.orientation)),defined(e.duration)&&e.duration<=0){var r=scratchSetViewOptions;return r.destination=e.destination,r.orientation.heading=i.heading,r.orientation.pitch=i.pitch,r.orientation.roll=i.roll,r.convert=e.convert,r.endTransform=e.endTransform,this.setView(r),void("function"==typeof e.complete&&e.complete())}var n=defined(t.west);n&&(t=this.getRectangleCameraCoordinates(t,scratchFlyToDestination));var a,o=this;newOptions.destination=t,newOptions.heading=i.heading,newOptions.pitch=i.pitch,newOptions.roll=i.roll,newOptions.duration=e.duration,newOptions.complete=function(){a===o._currentFlight&&(o._currentFlight=void 0),defined(e.complete)&&e.complete()},newOptions.cancel=e.cancel,newOptions.endTransform=e.endTransform,newOptions.convert=!n&&e.convert,newOptions.maximumHeight=e.maximumHeight,newOptions.pitchAdjustHeight=e.pitchAdjustHeight,newOptions.flyOverLongitude=e.flyOverLongitude,newOptions.flyOverLongitudeWeight=e.flyOverLongitudeWeight,newOptions.easingFunction=e.easingFunction,r=this._scene,0!==(n=CameraFlightPath.createTween(r,newOptions)).duration?(a=r.tweens.add(n),this._currentFlight=a,r=this._scene.preloadFlightCamera,this._mode!==SceneMode$1.SCENE2D&&(defined(r)||(r=Camera.clone(this)),r.setView({destination:t,orientation:i}),this._scene.preloadFlightCullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC))):"function"==typeof n.complete&&n.complete()}};var MINIMUM_ZOOM=100;function adjustBoundingSphereOffset(e,t,i){i=HeadingPitchRange.clone(defined(i)?i:Camera.DEFAULT_OFFSET);var r=e._scene.screenSpaceCameraController.minimumZoomDistance,n=e._scene.screenSpaceCameraController.maximumZoomDistance,a=i.range;return defined(a)&&0!==a||(0===(t=t.radius)?i.range=MINIMUM_ZOOM:e.frustum instanceof OrthographicFrustum||e._mode===SceneMode$1.SCENE2D?i.range=distanceToBoundingSphere2D(e,t):i.range=distanceToBoundingSphere3D(e,t),i.range=CesiumMath.clamp(i.range,r,n)),i}Camera.prototype.viewBoundingSphere=function(e,t){t=adjustBoundingSphereOffset(this,e,t),this.lookAt(e.center,t)};var scratchflyToBoundingSphereTransform=new Matrix4,scratchflyToBoundingSphereDestination=new Cartesian3,scratchflyToBoundingSphereDirection=new Cartesian3,scratchflyToBoundingSphereUp=new Cartesian3,scratchflyToBoundingSphereRight=new Cartesian3,scratchFlyToBoundingSphereCart4=new Cartesian4,scratchFlyToBoundingSphereQuaternion=new Quaternion,scratchFlyToBoundingSphereMatrix3=new Matrix3;Camera.prototype.flyToBoundingSphere=function(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=this._mode===SceneMode$1.SCENE2D||this._mode===SceneMode$1.COLUMBUS_VIEW;this._setTransform(Matrix4.IDENTITY);var r,n,a,o=adjustBoundingSphereOffset(this,e,t.offset),s=i?Cartesian3.multiplyByScalar(Cartesian3.UNIT_Z,o.range,scratchflyToBoundingSphereDestination):offsetFromHeadingPitchRange(o.heading,o.pitch,o.range),l=Transforms.eastNorthUpToFixedFrame(e.center,Ellipsoid.WGS84,scratchflyToBoundingSphereTransform);Matrix4.multiplyByPoint(l,s,s),i||(n=Cartesian3.subtract(e.center,s,scratchflyToBoundingSphereDirection),Cartesian3.normalize(n,n),r=Matrix4.multiplyByPointAsVector(l,Cartesian3.UNIT_Z,scratchflyToBoundingSphereUp),1-Math.abs(Cartesian3.dot(n,r))<CesiumMath.EPSILON6&&(a=Quaternion.fromAxisAngle(n,o.heading,scratchFlyToBoundingSphereQuaternion),a=Matrix3.fromQuaternion(a,scratchFlyToBoundingSphereMatrix3),Cartesian3.fromCartesian4(Matrix4.getColumn(l,1,scratchFlyToBoundingSphereCart4),r),Matrix3.multiplyByVector(a,r,r)),a=Cartesian3.cross(n,r,scratchflyToBoundingSphereRight),Cartesian3.cross(a,n,r),Cartesian3.normalize(r,r)),this.flyTo({destination:s,orientation:{direction:n,up:r},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var scratchCartesian3_1=new Cartesian3,scratchCartesian3_2=new Cartesian3,scratchCartesian3_3=new Cartesian3,scratchCartesian3_4=new Cartesian3,horizonPoints=[new Cartesian3,new Cartesian3,new Cartesian3,new Cartesian3];function computeHorizonQuad(e,t){var i=t.radii,r=e.positionWC,n=Cartesian3.multiplyComponents(t.oneOverRadii,r,scratchCartesian3_1),a=(e=Cartesian3.magnitude(n),t=Cartesian3.normalize(n,scratchCartesian3_2),r=Cartesian3.equalsEpsilon(t,Cartesian3.UNIT_Z,CesiumMath.EPSILON10)?(a=new Cartesian3(0,1,0),new Cartesian3(0,0,1)):(a=Cartesian3.normalize(Cartesian3.cross(Cartesian3.UNIT_Z,t,scratchCartesian3_3),scratchCartesian3_3),Cartesian3.normalize(Cartesian3.cross(t,a,scratchCartesian3_4),scratchCartesian3_4)),n=Math.sqrt(Cartesian3.magnitudeSquared(n)-1),t=Cartesian3.multiplyByScalar(t,1/e,scratchCartesian3_1),e=n/e,Cartesian3.multiplyByScalar(a,e,scratchCartesian3_2));r=Cartesian3.multiplyByScalar(r,e,scratchCartesian3_3),e=Cartesian3.add(t,r,horizonPoints[0]);return Cartesian3.subtract(e,a,e),Cartesian3.multiplyComponents(i,e,e),e=Cartesian3.subtract(t,r,horizonPoints[1]),Cartesian3.subtract(e,a,e),Cartesian3.multiplyComponents(i,e,e),e=Cartesian3.subtract(t,r,horizonPoints[2]),Cartesian3.add(e,a,e),Cartesian3.multiplyComponents(i,e,e),r=Cartesian3.add(t,r,horizonPoints[3]),Cartesian3.add(r,a,r),Cartesian3.multiplyComponents(i,r,r),horizonPoints}var scratchPickCartesian2=new Cartesian2,scratchRectCartesian=new Cartesian3,cartoArray=[new Cartographic,new Cartographic,new Cartographic,new Cartographic];function addToResult(e,t,i,r,n,a){return scratchPickCartesian2.x=e,scratchPickCartesian2.y=t,defined(r=r.pickEllipsoid(scratchPickCartesian2,n,scratchRectCartesian))?(cartoArray[i]=n.cartesianToCartographic(r,cartoArray[i]),1):(cartoArray[i]=n.cartesianToCartographic(a[i],cartoArray[i]),0)}Camera.prototype.computeViewRectangle=function(e,t){e=defaultValue(e,Ellipsoid.WGS84);var i=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),r=new BoundingSphere(Cartesian3.ZERO,e.maximumRadius);if(i.computeVisibility(r)!==Intersect$1.OUTSIDE){var n,a=(n=this._scene.canvas).clientWidth;i=n.clientHeight,r=0;if(r+=addToResult(0,0,0,this,e,n=computeHorizonQuad(this,e)),r+=addToResult(0,i,1,this,e,n),r+=addToResult(a,i,2,this,e,n),(r+=addToResult(a,0,3,this,e,n))<2)return Rectangle.MAX_VALUE;t=Rectangle.fromCartographicArray(cartoArray,t);for(var o=0,s=cartoArray[3].longitude,l=0;l<4;++l){var c=cartoArray[l].longitude,u=Math.abs(c-s);u>CesiumMath.PI?o+=CesiumMath.TWO_PI-u:o+=u,s=c}return CesiumMath.equalsEpsilon(Math.abs(o),CesiumMath.TWO_PI,CesiumMath.EPSILON9)&&(t.west=-CesiumMath.PI,t.east=CesiumMath.PI,0<=cartoArray[0].latitude?t.north=CesiumMath.PI_OVER_TWO:t.south=-CesiumMath.PI_OVER_TWO),t}},Camera.prototype.switchToPerspectiveFrustum=function(){var e;this._mode===SceneMode$1.SCENE2D||this.frustum instanceof PerspectiveFrustum||(e=this._scene,this.frustum=new PerspectiveFrustum,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=CesiumMath.toRadians(60))},Camera.prototype.switchToOrthographicFrustum=function(){var e,t;this._mode===SceneMode$1.SCENE2D||this.frustum instanceof OrthographicFrustum||(e=calculateOrthographicFrustumWidth(this),t=this._scene,this.frustum=new OrthographicFrustum,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e)},Camera.clone=function(e,t){return defined(t)||(t=new Camera(e._scene)),Cartesian3.clone(e.position,t.position),Cartesian3.clone(e.direction,t.direction),Cartesian3.clone(e.up,t.up),Cartesian3.clone(e.right,t.right),Matrix4.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var CameraEventType={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},CameraEventType$1=Object.freeze(CameraEventType);function getKey(e,t){return defined(t)&&(e+="+"+t),e}function clonePinchMovement(e,t){Cartesian2.clone(e.distance.startPosition,t.distance.startPosition),Cartesian2.clone(e.distance.endPosition,t.distance.endPosition),Cartesian2.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),Cartesian2.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function listenToPinch(e,t,i){var r=getKey(CameraEventType$1.PINCH,t),n=e._update,a=e._isDown,o=e._eventStartPosition,s=e._pressTime,l=e._releaseTime;n[r]=!0,a[r]=!1,o[r]=new Cartesian2;var c=e._movement[r];defined(c)||(c=e._movement[r]={}),c.distance={startPosition:new Cartesian2,endPosition:new Cartesian2},c.angleAndHeight={startPosition:new Cartesian2,endPosition:new Cartesian2},c.prevAngle=0,e._eventHandler.setInputAction((function(t){e._buttonsDown++,a[r]=!0,s[r]=new Date,Cartesian2.lerp(t.position1,t.position2,.5,o[r])}),ScreenSpaceEventType$1.PINCH_START,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),a[r]=!1,l[r]=new Date}),ScreenSpaceEventType$1.PINCH_END,t),e._eventHandler.setInputAction((function(e){if(a[r]){n[r]?(clonePinchMovement(e,c),n[r]=!1,c.prevAngle=c.angleAndHeight.startPosition.x):(Cartesian2.clone(e.distance.endPosition,c.distance.endPosition),Cartesian2.clone(e.angleAndHeight.endPosition,c.angleAndHeight.endPosition));for(var t=c.angleAndHeight.endPosition.x,o=c.prevAngle,s=2*Math.PI;t>=o+Math.PI;)t-=s;for(;t<o-Math.PI;)t+=s;c.angleAndHeight.endPosition.x=-t*i.clientWidth/12,c.angleAndHeight.startPosition.x=-o*i.clientWidth/12}}),ScreenSpaceEventType$1.PINCH_MOVE,t)}function listenToWheel(e,t){var i=getKey(CameraEventType$1.WHEEL,t),r=e._update;r[i]=!0;var n=e._movement[i];defined(n)||(n=e._movement[i]={}),n.startPosition=new Cartesian2,n.endPosition=new Cartesian2,e._eventHandler.setInputAction((function(e){e=15*CesiumMath.toRadians(e),r[i]?(Cartesian2.clone(Cartesian2.ZERO,n.startPosition),n.endPosition.x=0,n.endPosition.y=e,r[i]=!1):n.endPosition.y=n.endPosition.y+e}),ScreenSpaceEventType$1.WHEEL,t)}function listenMouseButtonDownUp(e,t,i){var r=getKey(i,t),n=e._isDown,a=e._eventStartPosition,o=e._pressTime,s=e._releaseTime;n[r]=!1,a[r]=new Cartesian2;var l,c,u=e._lastMovement[r];defined(u)||(u=e._lastMovement[r]={startPosition:new Cartesian2,endPosition:new Cartesian2,valid:!1}),i===CameraEventType$1.LEFT_DRAG?(l=ScreenSpaceEventType$1.LEFT_DOWN,c=ScreenSpaceEventType$1.LEFT_UP):i===CameraEventType$1.RIGHT_DRAG?(l=ScreenSpaceEventType$1.RIGHT_DOWN,c=ScreenSpaceEventType$1.RIGHT_UP):i===CameraEventType$1.MIDDLE_DRAG&&(l=ScreenSpaceEventType$1.MIDDLE_DOWN,c=ScreenSpaceEventType$1.MIDDLE_UP),e._eventHandler.setInputAction((function(t){e._buttonsDown++,u.valid=!1,n[r]=!0,o[r]=new Date,Cartesian2.clone(t.position,a[r])}),l,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),n[r]=!1,s[r]=new Date}),c,t)}function cloneMouseMovement(e,t){Cartesian2.clone(e.startPosition,t.startPosition),Cartesian2.clone(e.endPosition,t.endPosition)}function listenMouseMove(e,t){var i,r,n=e._update,a=e._movement,o=e._lastMovement,s=e._isDown;for(i in CameraEventType$1)!CameraEventType$1.hasOwnProperty(i)||defined(r=CameraEventType$1[i])&&(r=getKey(r,t),n[r]=!0,defined(e._lastMovement[r])||(e._lastMovement[r]={startPosition:new Cartesian2,endPosition:new Cartesian2,valid:!1}),defined(e._movement[r])||(e._movement[r]={startPosition:new Cartesian2,endPosition:new Cartesian2}));e._eventHandler.setInputAction((function(i){for(var r in CameraEventType$1){var l;!CameraEventType$1.hasOwnProperty(r)||defined(l=CameraEventType$1[r])&&(l=getKey(l,t),s[l]&&(n[l]?(cloneMouseMovement(a[l],o[l]),o[l].valid=!0,cloneMouseMovement(i,a[l]),n[l]=!1):Cartesian2.clone(i.endPosition,a[l].endPosition)))}Cartesian2.clone(i.endPosition,e._currentMousePosition)}),ScreenSpaceEventType$1.MOUSE_MOVE,t)}function CameraEventAggregator(e){for(var t in this._eventHandler=new ScreenSpaceEventHandler(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new Cartesian2,listenToWheel(this,void 0),listenToPinch(this,void 0,e),listenMouseButtonDownUp(this,void 0,CameraEventType$1.LEFT_DRAG),listenMouseButtonDownUp(this,void 0,CameraEventType$1.RIGHT_DRAG),listenMouseButtonDownUp(this,void 0,CameraEventType$1.MIDDLE_DRAG),listenMouseMove(this,void 0),KeyboardEventModifier$1){var i;!KeyboardEventModifier$1.hasOwnProperty(t)||defined(i=KeyboardEventModifier$1[t])&&(listenToWheel(this,i),listenToPinch(this,i,e),listenMouseButtonDownUp(this,i,CameraEventType$1.LEFT_DRAG),listenMouseButtonDownUp(this,i,CameraEventType$1.RIGHT_DRAG),listenMouseButtonDownUp(this,i,CameraEventType$1.MIDDLE_DRAG),listenMouseMove(this,i))}}function Cesium3DTileContent(e,t,i,r,n){this.featurePropertiesDirty=!1}function Cesium3DTilePassState(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}function ConditionsExpression(e,t){this._conditionsExpression=clone(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,setRuntime(this,t)}function Statement(e,t){this.condition=e,this.expression=t}function setRuntime(e,t){var i=[],r=e._conditions;if(defined(r)){for(var n=r.length,a=0;a<n;++a){var o=r[a],s=String(o[0]);o=String(o[1]);i.push(new Statement(new Expression(s,t),new Expression(o,t)))}e._runtimeConditions=i}}function Cesium3DTileStyle(e){this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,e="string"==typeof e||e instanceof Resource?Resource.createIfNeeded(e).fetchJson(e):when.resolve(e);var t=this;this._readyPromise=e.then((function(e){return setup(t,e),t}))}function setup(e,t){t=defaultValue(clone(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin;var i={};if(defined(t.meta)){var r,n=t.defines,a=defaultValue(t.meta,defaultValue.EMPTY_OBJECT);for(r in a)a.hasOwnProperty(r)&&(i[r]=new Expression(a[r],n))}e._meta=i,e._ready=!0}function getExpression(e,t){if(e=defaultValue(e._style,defaultValue.EMPTY_OBJECT).defines,defined(t))return"boolean"==typeof t||"number"==typeof t?new Expression(String(t)):"string"==typeof t?new Expression(t,e):defined(t.conditions)?new ConditionsExpression(t,e):t}function getJsonFromExpression(e){if(defined(e))return defined(e.expression)?e.expression:defined(e.conditionsExpression)?clone(e.conditionsExpression,!0):e}function CircleEmitter(e){e=defaultValue(e,1),this._radius=defaultValue(e,1)}Object.defineProperties(CameraEventAggregator.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){var e=!(this._update[getKey(CameraEventType$1.WHEEL)]&&this._update[getKey(CameraEventType$1.WHEEL,KeyboardEventModifier$1.SHIFT)]&&this._update[getKey(CameraEventType$1.WHEEL,KeyboardEventModifier$1.CTRL)]&&this._update[getKey(CameraEventType$1.WHEEL,KeyboardEventModifier$1.ALT)]);return 0<this._buttonsDown||e}}}),CameraEventAggregator.prototype.isMoving=function(e,t){return t=getKey(e,t),!this._update[t]},CameraEventAggregator.prototype.getMovement=function(e,t){return t=getKey(e,t),this._movement[t]},CameraEventAggregator.prototype.getLastMovement=function(e,t){if(t=getKey(e,t),(t=this._lastMovement[t]).valid)return t},CameraEventAggregator.prototype.isButtonDown=function(e,t){return t=getKey(e,t),this._isDown[t]},CameraEventAggregator.prototype.getStartMousePosition=function(e,t){return e===CameraEventType$1.WHEEL?this._currentMousePosition:(t=getKey(e,t),this._eventStartPosition[t])},CameraEventAggregator.prototype.getButtonPressTime=function(e,t){return t=getKey(e,t),this._pressTime[t]},CameraEventAggregator.prototype.getButtonReleaseTime=function(e,t){return t=getKey(e,t),this._releaseTime[t]},CameraEventAggregator.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},CameraEventAggregator.prototype.isDestroyed=function(){return!1},CameraEventAggregator.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),destroyObject(this)},Object.defineProperties(Cesium3DTileContent.prototype,{featuresLength:{get:function(){DeveloperError.throwInstantiationError()}},pointsLength:{get:function(){DeveloperError.throwInstantiationError()}},trianglesLength:{get:function(){DeveloperError.throwInstantiationError()}},geometryByteLength:{get:function(){DeveloperError.throwInstantiationError()}},texturesByteLength:{get:function(){DeveloperError.throwInstantiationError()}},batchTableByteLength:{get:function(){DeveloperError.throwInstantiationError()}},innerContents:{get:function(){DeveloperError.throwInstantiationError()}},readyPromise:{get:function(){DeveloperError.throwInstantiationError()}},tileset:{get:function(){DeveloperError.throwInstantiationError()}},tile:{get:function(){DeveloperError.throwInstantiationError()}},url:{get:function(){DeveloperError.throwInstantiationError()}},batchTable:{get:function(){DeveloperError.throwInstantiationError()}}}),Cesium3DTileContent.prototype.hasProperty=function(e,t){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.getFeature=function(e){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.applyDebugSettings=function(e,t){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.applyStyle=function(e){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.update=function(e,t){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.isDestroyed=function(){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.destroy=function(){DeveloperError.throwInstantiationError()},Object.defineProperties(ConditionsExpression.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),ConditionsExpression.prototype.evaluate=function(e,t){var i=this._runtimeConditions;if(defined(i))for(var r=i.length,n=0;n<r;++n){var a=i[n];if(a.condition.evaluate(e))return a.expression.evaluate(e,t)}},ConditionsExpression.prototype.evaluateColor=function(e,t){var i=this._runtimeConditions;if(defined(i))for(var r=i.length,n=0;n<r;++n){var a=i[n];if(a.condition.evaluate(e))return a.expression.evaluateColor(e,t)}},ConditionsExpression.prototype.getShaderFunction=function(e,t,i,r){var n=this._runtimeConditions;if(defined(n)&&0!==n.length){for(var a="",o=n.length,s=0;s<o;++s){var l=n[s];a+="    "+(0===s?"if":"else if")+" ("+l.condition.getShaderExpression(t,i)+") \n    { \n        return "+l.expression.getShaderExpression(t,i)+"; \n    } \n"}return r+" "+e+"() \n{ \n"+a+"    return "+r+"(1.0); \n} \n"}},Object.defineProperties(Cesium3DTileStyle.prototype,{style:{get:function(){return this._style}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},show:{get:function(){return this._show},set:function(e){this._show=getExpression(this,e),this._style.show=getJsonFromExpression(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=getExpression(this,e),this._style.color=getJsonFromExpression(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=getExpression(this,e),this._style.pointSize=getJsonFromExpression(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=getExpression(this,e),this._style.pointOutlineColor=getJsonFromExpression(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=getExpression(this,e),this._style.pointOutlineWidth=getJsonFromExpression(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=getExpression(this,e),this._style.labelColor=getJsonFromExpression(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=getExpression(this,e),this._style.labelOutlineColor=getJsonFromExpression(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=getExpression(this,e),this._style.labelOutlineWidth=getJsonFromExpression(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=getExpression(this,e),this._style.font=getJsonFromExpression(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=getExpression(this,e),this._style.labelStyle=getJsonFromExpression(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=getExpression(this,e),this._style.labelText=getJsonFromExpression(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=getExpression(this,e),this._style.backgroundColor=getJsonFromExpression(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=getExpression(this,e),this._style.backgroundPadding=getJsonFromExpression(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=getExpression(this,e),this._style.backgroundEnabled=getJsonFromExpression(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=getExpression(this,e),this._style.scaleByDistance=getJsonFromExpression(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=getExpression(this,e),this._style.translucencyByDistance=getJsonFromExpression(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=getExpression(this,e),this._style.distanceDisplayCondition=getJsonFromExpression(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=getExpression(this,e),this._style.heightOffset=getJsonFromExpression(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=getExpression(this,e),this._style.anchorLineEnabled=getJsonFromExpression(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=getExpression(this,e),this._style.anchorLineColor=getJsonFromExpression(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=getExpression(this,e),this._style.image=getJsonFromExpression(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=getExpression(this,e),this._style.disableDepthTestDistance=getJsonFromExpression(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=getExpression(this,e),this._style.horizontalOrigin=getJsonFromExpression(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=getExpression(this,e),this._style.verticalOrigin=getJsonFromExpression(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=getExpression(this,e),this._style.labelHorizontalOrigin=getJsonFromExpression(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=getExpression(this,e),this._style.labelVerticalOrigin=getJsonFromExpression(this._labelVerticalOrigin)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}}),Cesium3DTileStyle.prototype.getColorShaderFunction=function(e,t,i){return this._colorShaderFunctionReady?i.translucent=this._colorShaderTranslucent:(this._colorShaderFunctionReady=!0,this._colorShaderFunction=defined(this.color)?this.color.getShaderFunction(e,t,i,"vec4"):void 0,this._colorShaderTranslucent=i.translucent),this._colorShaderFunction},Cesium3DTileStyle.prototype.getShowShaderFunction=function(e,t,i){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=defined(this.show)?this.show.getShaderFunction(e,t,i,"bool"):void 0),this._showShaderFunction},Cesium3DTileStyle.prototype.getPointSizeShaderFunction=function(e,t,i){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=defined(this.pointSize)?this.pointSize.getShaderFunction(e,t,i,"float"):void 0),this._pointSizeShaderFunction},Object.defineProperties(CircleEmitter.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}}),CircleEmitter.prototype.emit=function(e){var t=CesiumMath.randomBetween(0,CesiumMath.TWO_PI),i=CesiumMath.randomBetween(0,this._radius),r=i*Math.cos(t);t=i*Math.sin(t);e.position=Cartesian3.fromElements(r,t,0,e.position),e.velocity=Cartesian3.clone(Cartesian3.UNIT_Z,e.velocity)};var defaultAngle=CesiumMath.toRadians(30);function ConeEmitter(e){this._angle=defaultValue(e,defaultAngle)}Object.defineProperties(ConeEmitter.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}}),ConeEmitter.prototype.emit=function(e){var t=Math.tan(this._angle),i=CesiumMath.randomBetween(0,CesiumMath.TWO_PI),r=CesiumMath.randomBetween(0,t);t=r*Math.cos(i),i=r*Math.sin(i);e.velocity=Cartesian3.fromElements(t,i,1,e.velocity),Cartesian3.normalize(e.velocity,e.velocity),e.position=Cartesian3.clone(Cartesian3.ZERO,e.position)};var mobileWidth=576,lightboxHeight=100,textColor="#ffffff",highlightColor="#48b";function contains$1(e,t){for(var i=e.length,r=0;r<i;r++){var n=e[r];if(Credit.equals(n,t))return 1}}function swapCesiumCredit(e){var t=e._previousCesiumCredit,i=e._currentCesiumCredit;Credit.equals(i,t)||(defined(t)&&e._cesiumCreditContainer.removeChild(t.element),defined(i)&&e._cesiumCreditContainer.appendChild(i.element),e._previousCesiumCredit=i)}var delimiterClassName="cesium-credit-delimiter",defaultCredit;function createDelimiterElement(e){var t=document.createElement("span");return t.textContent=e,t.className=delimiterClassName,t}function createCreditElement(e,t){return defined(t)&&((t=document.createElement(t))._creditId=e._creditId,t.appendChild(e),e=t),e}function displayCredits(e,t,i,r){for(var n=e.childNodes,a=-1,o=0;o<t.length;++o){var s,l,c=t[o];defined(c)&&(a=o,defined(i)&&(a*=2,0<o&&(s=a-1,n.length<=s?e.appendChild(createDelimiterElement(i)):(l=n[s]).className!==delimiterClassName&&e.replaceChild(createDelimiterElement(i),l))),s=c.element,n.length<=a?e.appendChild(createCreditElement(s,r)):(l=n[a])._creditId!==c._id&&e.replaceChild(createCreditElement(s,r),l))}for(++a;a<n.length;)e.removeChild(n[a])}function styleLightboxContainer(e){var t=e._lightboxCredits,i=e.viewport.clientWidth,r=e.viewport.clientHeight;i!==e._lastViewportWidth&&(i<mobileWidth?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=Math.floor(.5*(r-t.clientHeight))+"px"),e._lastViewportWidth=i),mobileWidth<=i&&r!==e._lastViewportHeight&&(t.style.marginTop=Math.floor(.5*(r-t.clientHeight))+"px",e._lastViewportHeight=r)}function addStyle(e,t){var i,r=e+" {";for(i in t)t.hasOwnProperty(i)&&(r+=i+": "+t[i]+"; ");return r+" }\n"}function appendCss(){var e="";e+=addStyle(".cesium-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),e+=addStyle(".cesium-credit-lightbox",{"background-color":"#303336",color:textColor,position:"relative","min-height":lightboxHeight+"px",margin:"auto"}),e+=addStyle(".cesium-credit-lightbox > ul > li a, .cesium-credit-lightbox > ul > li a:visited",{color:textColor}),e+=addStyle(".cesium-credit-lightbox > ul > li a:hover",{color:highlightColor}),e+=addStyle(".cesium-credit-lightbox.cesium-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),e+=addStyle(".cesium-credit-lightbox.cesium-credit-lightbox-mobile",{height:"100%",width:"100%"}),e+=addStyle(".cesium-credit-lightbox-title",{padding:"20px 20px 0 20px"}),e+=addStyle(".cesium-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:textColor}),e+=addStyle(".cesium-credit-lightbox-close:hover",{color:highlightColor}),e+=addStyle(".cesium-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),e+=addStyle(".cesium-credit-lightbox > ul > li",{"padding-bottom":"6px"}),e+=addStyle(".cesium-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),e+=addStyle(".cesium-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:textColor}),e+=addStyle(".cesium-credit-expand-link:hover",{color:highlightColor}),e+=addStyle(".cesium-credit-text",{color:textColor}),e+=addStyle(".cesium-credit-textContainer *, .cesium-credit-logoContainer *",{display:"inline"});var t=document.head,i=document.createElement("style");i.innerHTML=e,t.insertBefore(i,t.firstChild)}function CreditDisplay(e,t,i){var r=this;i=defaultValue(i,document.body);var n=document.createElement("div");n.className="cesium-credit-lightbox-overlay",i.appendChild(n);var a=document.createElement("div");function o(e){a.contains(e.target)||r.hideLightbox()}a.className="cesium-credit-lightbox",n.appendChild(a),n.addEventListener("click",o,!1);var s=document.createElement("div");s.className="cesium-credit-lightbox-title",s.textContent="Data provided by:",a.appendChild(s);var l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="&times;",l.className="cesium-credit-lightbox-close",a.appendChild(l);var c=document.createElement("ul");a.appendChild(c);var u=document.createElement("div");u.className="cesium-credit-logoContainer",u.style.display="inline",e.appendChild(u);var d=document.createElement("div");d.className="cesium-credit-textContainer",d.style.display="inline",e.appendChild(d),(s=document.createElement("a")).className="cesium-credit-expand-link",s.onclick=this.showLightbox.bind(this),s.textContent="Data attribution",e.appendChild(s),appendCss(),l=Credit.clone(CreditDisplay.cesiumCredit),this._delimiter=defaultValue(t," • "),this._screenContainer=d,this._cesiumCreditContainer=u,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=a,this._creditList=c,this._lightbox=n,this._hideLightbox=o,this._expandLink=s,this._expanded=!1,this._defaultCredits=[],this._cesiumCredit=l,this._previousCesiumCredit=void 0,this._currentCesiumCredit=l,this._currentFrameCredits={screenCredits:new AssociativeArray,lightboxCredits:new AssociativeArray},this._defaultCredit=void 0,this.viewport=i,this.container=e}function getDefaultCredit(){var e;return defined(defaultCredit)||(0!==(e=buildModuleUrl("Assets/Images/ion-credit.png")).indexOf("http://")&&0!==e.indexOf("https://")&&0!==e.indexOf("data:")&&(e=new URI(e).getPath()),defaultCredit=new Credit('<a href="https://cesium.com/" target="_blank"><img src="'+e+'" title="Cesium ion"/></a>',!0)),CreditDisplay._cesiumCreditInitialized||(CreditDisplay._cesiumCredit=defaultCredit,CreditDisplay._cesiumCreditInitialized=!0),defaultCredit}function DebugAppearance(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).attributeName;defined(n=e.perInstanceAttribute)||(n=!1);var i=defaultValue(e.glslDatatype,"vec3"),r="v_"+t;if("normal"===t||"tangent"===t||"bitangent"===t)a="vec4 getColor() { return vec4(("+r+" + vec3(1.0)) * 0.5, 1.0); }\n";else switch("st"===t&&(i="vec2"),i){case"float":a="vec4 getColor() { return vec4(vec3("+r+"), 1.0); }\n";break;case"vec2":a="vec4 getColor() { return vec4("+r+", 0.0, 1.0); }\n";break;case"vec3":a="vec4 getColor() { return vec4("+r+", 1.0); }\n";break;case"vec4":a="vec4 getColor() { return "+r+"; }\n"}var n="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n"+(n?"":"attribute "+i+" "+t+";\n")+"varying "+i+" "+r+";\nvoid main()\n{\nvec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);\n"+(n?r+" = czm_batchTable_"+t+"(batchId);\n":r+" = "+t+";\n")+"gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}",a="varying "+i+" "+r+";\n"+a+"\nvoid main()\n{\ngl_FragColor = getColor();\n}";this.material=void 0,this.translucent=defaultValue(e.translucent,!1),this._vertexShaderSource=defaultValue(e.vertexShaderSource,n),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,a),this._renderState=Appearance.getDefaultRenderState(!1,!1,e.renderState),this._closed=defaultValue(e.closed,!1),this._attributeName=t,this._glslDatatype=i}function DebugCameraPrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=defaultValue(e.color,Color.CYAN),this._updateOnChange=defaultValue(e.updateOnChange,!0),this.show=defaultValue(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}CreditDisplay.prototype.addCredit=function(e){if(e._isIon)return defined(this._defaultCredit)||(this._defaultCredit=Credit.clone(getDefaultCredit())),void(this._currentCesiumCredit=this._defaultCredit);(e.showOnScreen?this._currentFrameCredits.screenCredits:this._currentFrameCredits.lightboxCredits).set(e.id,e)},CreditDisplay.prototype.addDefaultCredit=function(e){var t=this._defaultCredits;contains$1(t,e)||t.push(e)},CreditDisplay.prototype.removeDefaultCredit=function(e){var t=this._defaultCredits;-1!==(e=t.indexOf(e))&&t.splice(e,1)},CreditDisplay.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},CreditDisplay.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},CreditDisplay.prototype.update=function(){this._expanded&&styleLightboxContainer(this)},CreditDisplay.prototype.beginFrame=function(){var e=this._currentFrameCredits,t=e.screenCredits;t.removeAll();for(var i=this._defaultCredits,r=0;r<i.length;++r){var n=i[r];t.set(n.id,n)}e.lightboxCredits.removeAll(),Credit.equals(CreditDisplay.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=Credit.clone(CreditDisplay.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit},CreditDisplay.prototype.endFrame=function(){var e=this._currentFrameCredits.screenCredits.values;displayCredits(this._screenContainer,e,this._delimiter,void 0),e=this._currentFrameCredits.lightboxCredits.values,this._expandLink.style.display=0<e.length?"inline":"none",displayCredits(this._creditList,e,void 0,"li"),swapCesiumCredit(this)},CreditDisplay.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),destroyObject(this)},CreditDisplay.prototype.isDestroyed=function(){return!1},CreditDisplay._cesiumCredit=void 0,CreditDisplay._cesiumCreditInitialized=!1,Object.defineProperties(CreditDisplay,{cesiumCredit:{get:function(){return getDefaultCredit(),CreditDisplay._cesiumCredit},set:function(e){CreditDisplay._cesiumCredit=e,CreditDisplay._cesiumCreditInitialized=!0}}}),Object.defineProperties(DebugAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}}),DebugAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,DebugAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,DebugAppearance.prototype.getRenderState=Appearance.prototype.getRenderState;var scratchRight$1=new Cartesian3,scratchRotation$2=new Matrix3,scratchOrientation=new Quaternion,scratchPerspective=new PerspectiveFrustum,scratchPerspectiveOffCenter=new PerspectiveOffCenterFrustum,scratchOrthographic=new OrthographicFrustum,scratchOrthographicOffCenter=new OrthographicOffCenterFrustum,scratchColor$k=new Color,scratchSplits=[1,1e5];function DebugInspector(){this._cachedShowFrustumsShaders={}}function getAttributeLocations$2(e){var t,i={},r=e.vertexAttributes;for(t in r)r.hasOwnProperty(t)&&(i[t]=r[t].index);return i}function createDebugShowFrustumsShaderProgram(e,t){var i=e.context,r=t,n=(e=r.fragmentShaderSource.clone(),[]);e.sources=e.sources.map((function(e){e=ShaderSource.replaceMain(e,"czm_Debug_main");for(var t,i=/gl_FragData\[(\d+)\]/g;null!==(t=i.exec(e));)-1===n.indexOf(t[1])&&n.push(t[1]);return e}));var a,o=n.length,s="";if(s+="uniform vec3 debugShowCommandsColor;\n",s+="uniform vec3 debugShowFrustumsColor;\n",s+="void main() \n{ \n    czm_Debug_main(); \n",0<o)for(a=0;a<o;++a)s+="    gl_FragData["+n[a]+"].rgb *= debugShowCommandsColor;\n",s+="    gl_FragData["+n[a]+"].rgb *= debugShowFrustumsColor;\n";else s+="    gl_FragColor.rgb *= debugShowCommandsColor;\n",s+="    gl_FragColor.rgb *= debugShowFrustumsColor;\n";return s+="}",e.sources.push(s),t=getAttributeLocations$2(r),ShaderProgram.fromCache({context:i,vertexShaderSource:r.vertexShaderSource,fragmentShaderSource:e,attributeLocations:t})}DebugCameraPrimitive.prototype.update=function(e){if(this.show){var t,i,r=this._planesPrimitives,n=this._outlinePrimitives;if(this._updateOnChange){for(i=r.length,t=0;t<i;++t)n[t]=n[t]&&n[t].destroy(),r[t]=r[t]&&r[t].destroy();r.length=0,n.length=0}if(0===r.length){var a=(d=(h=this._camera).frustum)instanceof PerspectiveFrustum?scratchPerspective:d instanceof PerspectiveOffCenterFrustum?scratchPerspectiveOffCenter:d instanceof OrthographicFrustum?scratchOrthographic:scratchOrthographicOffCenter;a=d.clone(a);var o=this._frustumSplits,s=!defined(o)||o.length<=1?((o=scratchSplits)[0]=this._camera.frustum.near,o[1]=this._camera.frustum.far,1):o.length-1,l=h.positionWC,c=h.directionWC,u=h.upWC,d=h.rightWC,h=(d=Cartesian3.negate(d,scratchRight$1),scratchRotation$2);Matrix3.setColumn(h,0,d,h),Matrix3.setColumn(h,1,u,h),Matrix3.setColumn(h,2,c,h);var p=Quaternion.fromRotationMatrix(h,scratchOrientation);for(r.length=n.length=s,t=0;t<s;++t)a.near=o[t],a.far=o[t+1],r[t]=new Primitive({geometryInstances:new GeometryInstance({geometry:new FrustumGeometry({origin:l,orientation:p,frustum:a,_drawNearPlane:0===t}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(Color.fromAlpha(this._color,.1,scratchColor$k))},id:this.id,pickPrimitive:this}),appearance:new PerInstanceColorAppearance({translucent:!0,flat:!0}),asynchronous:!1}),n[t]=new Primitive({geometryInstances:new GeometryInstance({geometry:new FrustumOutlineGeometry({origin:l,orientation:p,frustum:a,_drawNearPlane:0===t}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})}for(i=r.length,t=0;t<i;++t)n[t].update(e),r[t].update(e)}},DebugCameraPrimitive.prototype.isDestroyed=function(){return!1},DebugCameraPrimitive.prototype.destroy=function(){for(var e=this._planesPrimitives.length,t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return destroyObject(this)};var scratchFrustumColor=new Color;function createDebugShowFrustumsUniformMap(e,t){var i=defined(t.uniformMap)?t.uniformMap:{};return defined(i.debugShowCommandsColor)||defined(i.debugShowFrustumsColor)||(i.debugShowCommandsColor=function(){return e.debugShowCommands?(defined(t._debugColor)||(t._debugColor=Color.fromRandom()),t._debugColor):Color.WHITE},i.debugShowFrustumsColor=function(){return e.debugShowFrustums?(scratchFrustumColor.red=1&t.debugOverlappingFrustums?1:0,scratchFrustumColor.green=2&t.debugOverlappingFrustums?1:0,scratchFrustumColor.blue=4&t.debugOverlappingFrustums?1:0,scratchFrustumColor.alpha=1,scratchFrustumColor):Color.WHITE}),i}var scratchShowFrustumCommand=new DrawCommand;function DebugModelMatrixPrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.length=defaultValue(e.length,1e7),this._length=void 0,this.width=defaultValue(e.width,2),this._width=void 0,this.show=defaultValue(e.show,!0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=new Matrix4,this.id=e.id,this._id=void 0,this._primitive=void 0}DebugInspector.prototype.executeDebugShowFrustumsCommand=function(e,t,i){var r=t.shaderProgram.id,n=this._cachedShowFrustumsShaders[r];defined(n)||(n=createDebugShowFrustumsShaderProgram(e,t.shaderProgram),this._cachedShowFrustumsShaders[r]=n),(r=DrawCommand.shallowClone(t,scratchShowFrustumCommand)).shaderProgram=n,r.uniformMap=createDebugShowFrustumsUniformMap(e,t),r.execute(e.context,i)},DebugModelMatrixPrimitive.prototype.update=function(e){var t,i,r;this.show&&(defined(this._primitive)&&Matrix4.equals(this._modelMatrix,this.modelMatrix)&&this._length===this.length&&this._width===this.width&&this._id===this.id||(this._modelMatrix=Matrix4.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,defined(this._primitive)&&this._primitive.destroy(),0===this.modelMatrix[12]&&0===this.modelMatrix[13]&&0===this.modelMatrix[14]&&(this.modelMatrix[14]=.01),t=new GeometryInstance({geometry:new PolylineGeometry({positions:[Cartesian3.ZERO,Cartesian3.UNIT_X],width:this.width,vertexFormat:PolylineColorAppearance.VERTEX_FORMAT,colors:[Color.RED,Color.RED],arcType:ArcType$1.NONE}),modelMatrix:Matrix4.multiplyByUniformScale(this.modelMatrix,this.length,new Matrix4),id:this.id,pickPrimitive:this}),i=new GeometryInstance({geometry:new PolylineGeometry({positions:[Cartesian3.ZERO,Cartesian3.UNIT_Y],width:this.width,vertexFormat:PolylineColorAppearance.VERTEX_FORMAT,colors:[Color.GREEN,Color.GREEN],arcType:ArcType$1.NONE}),modelMatrix:Matrix4.multiplyByUniformScale(this.modelMatrix,this.length,new Matrix4),id:this.id,pickPrimitive:this}),r=new GeometryInstance({geometry:new PolylineGeometry({positions:[Cartesian3.ZERO,Cartesian3.UNIT_Z],width:this.width,vertexFormat:PolylineColorAppearance.VERTEX_FORMAT,colors:[Color.BLUE,Color.BLUE],arcType:ArcType$1.NONE}),modelMatrix:Matrix4.multiplyByUniformScale(this.modelMatrix,this.length,new Matrix4),id:this.id,pickPrimitive:this}),this._primitive=new Primitive({geometryInstances:[t,i,r],appearance:new PolylineColorAppearance,asynchronous:!1})),this._primitive.update(e))},DebugModelMatrixPrimitive.prototype.isDestroyed=function(){return!1},DebugModelMatrixPrimitive.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)};var DepthPlaneFS="varying vec4 positionEC;\nvoid main()\n{\nvec3 position;\nvec3 direction;\nif (czm_orthographicIn3D == 1.0)\n{\nvec2 uv = (gl_FragCoord.xy -  czm_viewport.xy) / czm_viewport.zw;\nvec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y);\nvec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x);\nposition = vec3(mix(minPlane, maxPlane, uv), 0.0);\ndirection = vec3(0.0, 0.0, -1.0);\n}\nelse\n{\nposition = vec3(0.0);\ndirection = normalize(positionEC.xyz);\n}\nczm_ray ray = czm_ray(position, direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nif (!czm_isEmpty(intersection))\n{\ngl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n}\nelse\n{\ndiscard;\n}\nczm_writeLogDepth();\n}\n",DepthPlaneVS="attribute vec4 position;\nvarying vec4 positionEC;\nvoid main()\n{\npositionEC = czm_modelView * position;\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n}\n";function DepthPlane(){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1}var depthQuadScratch=FeatureDetection.supportsTypedArrays()?new Float32Array(12):[],scratchCartesian1$7=new Cartesian3,scratchCartesian2$a=new Cartesian3,scratchCartesian3$d=new Cartesian3,scratchCartesian4$5=new Cartesian3,scratchCartesian5$2=new Cartesian3;function computeDepthQuad(e,t){var i,r,n=e.radii,a=t.camera;s=a.frustum instanceof OrthographicFrustum?(i=Cartesian3.ZERO,r=a.rightWC,a.upWC):(o=a.positionWC,t=Cartesian3.multiplyComponents(e.oneOverRadii,o,scratchCartesian1$7),a=Cartesian3.normalize(t,scratchCartesian2$a),e=Cartesian3.normalize(Cartesian3.cross(Cartesian3.UNIT_Z,t,scratchCartesian3$d),scratchCartesian3$d),s=Cartesian3.normalize(Cartesian3.cross(a,e,scratchCartesian4$5),scratchCartesian4$5),o=Cartesian3.magnitude(t),t=Math.sqrt(o*o-1),i=Cartesian3.multiplyByScalar(a,1/o,scratchCartesian1$7),o=t/o,r=Cartesian3.multiplyByScalar(e,o,scratchCartesian2$a),Cartesian3.multiplyByScalar(s,o,scratchCartesian3$d));var o=Cartesian3.add(i,s,scratchCartesian5$2);Cartesian3.subtract(o,r,o),Cartesian3.multiplyComponents(n,o,o),Cartesian3.pack(o,depthQuadScratch,0),o=Cartesian3.subtract(i,s,scratchCartesian5$2),Cartesian3.subtract(o,r,o),Cartesian3.multiplyComponents(n,o,o),Cartesian3.pack(o,depthQuadScratch,3),o=Cartesian3.add(i,s,scratchCartesian5$2),Cartesian3.add(o,r,o),Cartesian3.multiplyComponents(n,o,o),Cartesian3.pack(o,depthQuadScratch,6);var s=Cartesian3.subtract(i,s,scratchCartesian5$2);return Cartesian3.add(s,r,s),Cartesian3.multiplyComponents(n,s,s),Cartesian3.pack(s,depthQuadScratch,9),depthQuadScratch}function DerivedCommand(){}DepthPlane.prototype.update=function(e){var t,i,r,n,a;this._mode=e.mode,e.mode===SceneMode$1.SCENE3D&&(t=e.context,i=e.mapProjection.ellipsoid,r=e.useLogDepth,defined(this._command)||(this._rs=RenderState.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new DrawCommand({renderState:this._rs,boundingVolume:new BoundingSphere(Cartesian3.ZERO,i.maximumRadius),pass:Pass$1.OPAQUE,owner:this})),defined(this._sp)&&this._useLogDepth===r||(this._useLogDepth=r,n=new ShaderSource({sources:[DepthPlaneVS]}),a=new ShaderSource({sources:[DepthPlaneFS]}),r&&(a.sources.push("#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),a.defines.push("LOG_DEPTH"),n.defines.push("LOG_DEPTH")),this._sp=ShaderProgram.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:n,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp),e=computeDepthQuad(i,e),defined(this._va)?this._va.getAttribute(0).vertexBuffer.copyFromArrayView(e):(e=new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:e})},indices:[0,1,2,2,1,3],primitiveType:PrimitiveType$1.TRIANGLES}),this._va=VertexArray.fromGeometry({context:t,geometry:e,attributeLocations:{position:0},bufferUsage:BufferUsage$1.DYNAMIC_DRAW}),this._command.vertexArray=this._va))},DepthPlane.prototype.execute=function(e,t){this._mode===SceneMode$1.SCENE3D&&this._command.execute(e,t)},DepthPlane.prototype.isDestroyed=function(){return!1},DepthPlane.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var fragDepthRegex=/\bgl_FragDepthEXT\b/,discardRegex=/\bdiscard\b/;function getDepthOnlyShaderProgram(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!defined(i)){for(var r=t._attributeLocations,n=t.fragmentShaderSource,a=!1,o=n.sources,s=o.length,l=0;l<s;++l)if(fragDepthRegex.test(o[l])||discardRegex.test(o[l])){a=!0;break}var c=!1,u=n.defines;s=u.length;for(l=0;l<s;++l)if("LOG_DEPTH"===u[l]){c=!0;break}a||c?!a&&c&&(n=new ShaderSource({defines:["LOG_DEPTH"],sources:["#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n    gl_FragColor = vec4(1.0); \n    czm_writeLogDepth(); \n} \n"]})):n=new ShaderSource({sources:["void main() \n{ \n    gl_FragColor = vec4(1.0); \n} \n"]}),i=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:r})}return i}function getDepthOnlyRenderState(e,t){var i=e._depthOnlyRenderStateCache,r=i[t.id];return defined(r)||((e=RenderState.getState(t)).depthMask=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1},r=RenderState.fromCache(e),i[t.id]=r),r}DerivedCommand.createDepthOnlyDerivedCommand=function(e,t,i,r){var n,a;return defined(r)||(r={}),defined(r.depthOnlyCommand)&&(n=r.depthOnlyCommand.shaderProgram,a=r.depthOnlyCommand.renderState),r.depthOnlyCommand=DrawCommand.shallowClone(t,r.depthOnlyCommand),defined(n)&&r.shaderProgramId===t.shaderProgram.id?(r.depthOnlyCommand.shaderProgram=n,r.depthOnlyCommand.renderState=a):(r.depthOnlyCommand.shaderProgram=getDepthOnlyShaderProgram(i,t.shaderProgram),r.depthOnlyCommand.renderState=getDepthOnlyRenderState(e,t.renderState),r.shaderProgramId=t.shaderProgram.id),r};var writeLogDepthRegex=/\s+czm_writeLogDepth\(/,vertexlogDepthRegex=/\s+czm_vertexLogDepth\(/,extensionRegex=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function getLogDepthShaderProgram(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!defined(i)){var r=t._attributeLocations,n=t.vertexShaderSource.clone(),a=t.fragmentShaderSource.clone();n.defines=defined(n.defines)?n.defines.slice(0):[],n.defines.push("LOG_DEPTH"),a.defines=defined(a.defines)?a.defines.slice(0):[],a.defines.push("LOG_DEPTH");for(var o=!1,s=n.sources,l=s.length,c=0;c<l;++c)if(vertexlogDepthRegex.test(s[c])){o=!0;break}if(!o){for(c=0;c<l;++c)s[c]=ShaderSource.replaceMain(s[c],"czm_log_depth_main");s.push("\n\nvoid main() \n{ \n    czm_log_depth_main(); \n    czm_vertexLogDepth(); \n} \n")}for(l=(s=a.sources).length,o=!1,c=0;c<l;++c)writeLogDepthRegex.test(s[c])&&(o=!0);-1!==a.defines.indexOf("LOG_DEPTH_WRITE")&&(o=!0);var u=!0;for(c=0;c<l;++c)extensionRegex.test(s[c])&&(u=!1);var d="";if(u&&(d+="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),!o){for(c=0;c<l;c++)s[c]=ShaderSource.replaceMain(s[c],"czm_log_depth_main");d+="\nvoid main() \n{ \n    czm_log_depth_main(); \n    czm_writeLogDepth(); \n} \n"}s.push(d),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:n,fragmentShaderSource:a,attributeLocations:r})}return i}function getPickShaderProgram(e,t,i){var r=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!defined(r)){for(var n=t._attributeLocations,a=t.fragmentShaderSource,o=a.sources,s=o.length,l=(i="void main() \n{ \n    czm_non_pick_main(); \n    if (gl_FragColor.a == 0.0) { \n        discard; \n    } \n    gl_FragColor = "+i+"; \n} \n",new Array(s+1)),c=0;c<s;++c)l[c]=ShaderSource.replaceMain(o[c],"czm_non_pick_main");l[s]=i,a=new ShaderSource({sources:l,defines:a.defines}),r=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:n})}return r}function getPickRenderState(e,t){var i=e.picking.pickRenderStateCache,r=i[t.id];return defined(r)||((e=RenderState.getState(t)).blending.enabled=!1,e.depthMask=!0,r=RenderState.fromCache(e),i[t.id]=r),r}function getHdrShaderProgram(e,t){var i,r,n,a=e.shaderCache.getDerivedShaderProgram(t,"HDR");return defined(a)||(i=t._attributeLocations,r=t.vertexShaderSource.clone(),n=t.fragmentShaderSource.clone(),r.defines=defined(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),n.defines=defined(n.defines)?n.defines.slice(0):[],n.defines.push("HDR"),a=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:i})),a}function DeviceOrientationCameraController(e){this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var t=this;function i(e){var i=e.alpha;if(!defined(i))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=CesiumMath.toRadians(i),t._beta=CesiumMath.toRadians(e.beta),t._gamma=CesiumMath.toRadians(e.gamma)}window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}DerivedCommand.createLogDepthCommand=function(e,t,i){var r;return defined(i)||(i={}),defined(i.command)&&(r=i.command.shaderProgram),i.command=DrawCommand.shallowClone(e,i.command),defined(r)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=r:(i.command.shaderProgram=getLogDepthShaderProgram(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},DerivedCommand.createPickDerivedCommand=function(e,t,i,r){var n,a;return defined(r)||(r={}),defined(r.pickCommand)&&(n=r.pickCommand.shaderProgram,a=r.pickCommand.renderState),r.pickCommand=DrawCommand.shallowClone(t,r.pickCommand),defined(n)&&r.shaderProgramId===t.shaderProgram.id?(r.pickCommand.shaderProgram=n,r.pickCommand.renderState=a):(r.pickCommand.shaderProgram=getPickShaderProgram(i,t.shaderProgram,t.pickId),r.pickCommand.renderState=getPickRenderState(e,t.renderState),r.shaderProgramId=t.shaderProgram.id),r},DerivedCommand.createHdrCommand=function(e,t,i){var r;return defined(i)||(i={}),defined(i.command)&&(r=i.command.shaderProgram),i.command=DrawCommand.shallowClone(e,i.command),defined(r)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=r:(i.command.shaderProgram=getHdrShaderProgram(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i};var scratchQuaternion1=new Quaternion,scratchQuaternion2=new Quaternion,scratchMatrix3$1=new Matrix3;function rotate(e,t,i,r){var n=e.direction,a=e.right;e=e.up,i=Quaternion.fromAxisAngle(n,i,scratchQuaternion2),r=Quaternion.fromAxisAngle(a,r,scratchQuaternion1),r=Quaternion.multiply(r,i,r),t=Quaternion.fromAxisAngle(e,t,scratchQuaternion2);Quaternion.multiply(t,r,r),r=Matrix3.fromQuaternion(r,scratchMatrix3$1),Matrix3.multiplyByVector(r,a,a),Matrix3.multiplyByVector(r,e,e),Matrix3.multiplyByVector(r,n,n)}function DirectionalLight(e){this.direction=Cartesian3.clone(e.direction),this.color=Color.clone(defaultValue(e.color,Color.WHITE)),this.intensity=defaultValue(e.intensity,1)}DeviceOrientationCameraController.prototype.update=function(){var e,t,i;defined(this._alpha)&&(defined(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma),e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,i=this._lastGamma-this._gamma,rotate(this._scene.camera,-e,t,i),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma)},DeviceOrientationCameraController.prototype.isDestroyed=function(){return!1},DeviceOrientationCameraController.prototype.destroy=function(){return this._removeListener(),destroyObject(this)};var EllipsoidFS="#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\nuniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\nvarying vec3 v_positionEC;\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\nvec3 positionEC = czm_pointAlongRay(ray, intersection);\nvec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\nvec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\nvec3 sphericalNormal = normalize(positionMC / u_radii);\nvec3 normalMC = geodeticNormal * side;\nvec3 normalEC = normalize(czm_normal * normalMC);\nvec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\nvec3 positionToEyeEC = -positionEC;\nczm_materialInput materialInput;\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = (positionMC + u_radii) / u_radii;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef ONLY_SUN_LIGHTING\nreturn czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);\n#else\nreturn czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\nvoid main()\n{\nfloat maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\nvec3 direction = normalize(v_positionEC);\nvec3 ellipsoidCenter = czm_modelView[3].xyz;\nfloat t1 = -1.0;\nfloat t2 = -1.0;\nfloat b = -2.0 * dot(direction, ellipsoidCenter);\nfloat c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\nfloat discriminant = b * b - 4.0 * c;\nif (discriminant >= 0.0) {\nt1 = (-b - sqrt(discriminant)) * 0.5;\nt2 = (-b + sqrt(discriminant)) * 0.5;\n}\nif (t1 < 0.0 && t2 < 0.0) {\ndiscard;\n}\nfloat t = min(t1, t2);\nif (t < 0.0) {\nt = 0.0;\n}\nczm_ray ray = czm_ray(t * direction, direction);\nvec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\nif (czm_isEmpty(intersection))\n{\ndiscard;\n}\nvec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\nvec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\ngl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\ngl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\nt = (intersection.start != 0.0) ? intersection.start : intersection.stop;\nvec3 positionEC = czm_pointAlongRay(ray, t);\nvec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + positionCC.w);\n#else\nfloat z = positionCC.z / positionCC.w;\nfloat n = czm_depthRange.near;\nfloat f = czm_depthRange.far;\ngl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n#endif\n}\n",EllipsoidVS="attribute vec3 position;\nuniform vec3 u_radii;\nvarying vec3 v_positionEC;\nvoid main()\n{\nvec4 p = vec4(u_radii * position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\ngl_Position = czm_modelViewProjection * p;\ngl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\nczm_vertexLogDepth();\n}\n",attributeLocations$4={position:0};function EllipsoidPrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.center=Cartesian3.clone(defaultValue(e.center,Cartesian3.ZERO)),this._center=new Cartesian3,this.radii=Cartesian3.clone(e.radii),this._radii=new Cartesian3,this._oneOverEllipsoidRadiiSquared=new Cartesian3,this._boundingSphere=new BoundingSphere,this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=new Matrix4,this._computedModelMatrix=new Matrix4,this.show=defaultValue(e.show,!0),this.material=defaultValue(e.material,Material.fromType(Material.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.onlySunLighting=defaultValue(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=defaultValue(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new DrawCommand({owner:defaultValue(e._owner,this)}),this._pickCommand=new DrawCommand({owner:defaultValue(e._owner,this),pickOnly:!0});var t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function getVertexArray(e){if(defined(i=e.cache.ellipsoidPrimitive_vertexArray))return i;var t=BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2),vertexFormat:VertexFormat.POSITION_ONLY})),i=VertexArray.fromGeometry({context:e,geometry:t,attributeLocations:attributeLocations$4,bufferUsage:BufferUsage$1.STATIC_DRAW,interleave:!0});return e.cache.ellipsoidPrimitive_vertexArray=i}var logDepthExtension="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n";EllipsoidPrimitive.prototype.update=function(e){var t,i,r,n,a,o,s,l,c;this.show&&e.mode===SceneMode$1.SCENE3D&&defined(this.center)&&defined(this.radii)&&(t=e.context,i=this.material.isTranslucent(),c=this._translucent!==i,defined(this._rs)&&!c||(this._translucent=i,this._rs=RenderState.fromCache({cull:{enabled:!0,face:CullFace$1.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!i&&t.fragmentDepth,blending:i?BlendingState$1.ALPHA_BLEND:void 0})),defined(this._va)||(this._va=getVertexArray(t)),o=!1,a=this.radii,Cartesian3.equals(this._radii,a)||(Cartesian3.clone(a,this._radii),(n=this._oneOverEllipsoidRadiiSquared).x=1/(a.x*a.x),n.y=1/(a.y*a.y),n.z=1/(a.z*a.z),o=!0),Matrix4.equals(this.modelMatrix,this._modelMatrix)&&Cartesian3.equals(this.center,this._center)||(Matrix4.clone(this.modelMatrix,this._modelMatrix),Cartesian3.clone(this.center,this._center),Matrix4.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(Cartesian3.clone(Cartesian3.ZERO,this._boundingSphere.center),this._boundingSphere.radius=Cartesian3.maximumComponent(a),BoundingSphere.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere)),r=this._material!==this.material,this._material=this.material,this._material.update(t),n=this.onlySunLighting!==this._onlySunLighting,this._onlySunLighting=this.onlySunLighting,o=e.useLogDepth,a=this._useLogDepth!==o,this._useLogDepth=o,o=this._colorCommand,(r||n||c||a)&&(s=new ShaderSource({sources:[EllipsoidVS]}),l=new ShaderSource({sources:[this.material.shaderSource,EllipsoidFS]}),this.onlySunLighting&&l.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&l.defines.push("WRITE_DEPTH"),this._useLogDepth&&(s.defines.push("LOG_DEPTH"),l.defines.push("LOG_DEPTH"),l.sources.push(logDepthExtension)),this._sp=ShaderProgram.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:attributeLocations$4}),o.vertexArray=this._va,o.renderState=this._rs,o.shaderProgram=this._sp,o.uniformMap=combine(this._uniforms,this.material._uniforms),o.executeInClosestFrustum=i),c=e.commandList,(e=e.passes).render&&(o.boundingVolume=this._boundingSphere,o.debugShowBoundingVolume=this.debugShowBoundingVolume,o.modelMatrix=this._computedModelMatrix,o.pass=i?Pass$1.TRANSLUCENT:Pass$1.OPAQUE,c.push(o)),e.pick&&(e=this._pickCommand,defined(this._pickId)&&this._id===this.id||(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(r||n||!defined(this._pickSP)||a)&&(s=new ShaderSource({sources:[EllipsoidVS]}),l=new ShaderSource({sources:[this.material.shaderSource,EllipsoidFS],pickColorQualifier:"uniform"}),this.onlySunLighting&&l.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&l.defines.push("WRITE_DEPTH"),this._useLogDepth&&(s.defines.push("LOG_DEPTH"),l.defines.push("LOG_DEPTH"),l.sources.push(logDepthExtension)),this._pickSP=ShaderProgram.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:attributeLocations$4}),e.vertexArray=this._va,e.renderState=this._rs,e.shaderProgram=this._pickSP,e.uniformMap=combine(combine(this._uniforms,this._pickUniforms),this.material._uniforms),e.executeInClosestFrustum=i),e.boundingVolume=this._boundingSphere,e.modelMatrix=this._computedModelMatrix,e.pass=i?Pass$1.TRANSLUCENT:Pass$1.OPAQUE,c.push(e)))},EllipsoidPrimitive.prototype.isDestroyed=function(){return!1},EllipsoidPrimitive.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),destroyObject(this)};var EllipsoidSurfaceAppearanceFS="varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nczm_materialInput materialInput;\nvec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nmaterialInput.s = v_st.s;\nmaterialInput.st = v_st;\nmaterialInput.str = vec3(v_st, 0.0);\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\nvec3 positionToEyeEC = -v_positionEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",EllipsoidSurfaceAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionMC = position3DHigh + position3DLow;\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function EllipsoidSurfaceAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=defaultValue(e.aboveGround,!1);this.material=defined(e.material)?e.material:Material.fromType(Material.ColorType),this.translucent=defaultValue(e.translucent,!0),this._vertexShaderSource=defaultValue(e.vertexShaderSource,EllipsoidSurfaceAppearanceVS),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,EllipsoidSurfaceAppearanceFS),this._renderState=Appearance.getDefaultRenderState(t,!i,e.renderState),this._closed=!1,this._flat=defaultValue(e.flat,!1),this._faceForward=defaultValue(e.faceForward,i),this._aboveGround=i}function Fog(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(EllipsoidSurfaceAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return EllipsoidSurfaceAppearance.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}}),EllipsoidSurfaceAppearance.VERTEX_FORMAT=VertexFormat.POSITION_AND_ST,EllipsoidSurfaceAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,EllipsoidSurfaceAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,EllipsoidSurfaceAppearance.prototype.getRenderState=Appearance.prototype.getRenderState;for(var heightsTable=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],densityTable=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7],i$3=0;i$3<densityTable.length;++i$3)densityTable[i$3]*=1e6;for(var tableStartDensity=densityTable[1],tableEndDensity=densityTable[densityTable.length-1],j=0;j<densityTable.length;++j)densityTable[j]=(densityTable[j]-tableEndDensity)/(tableStartDensity-tableEndDensity);var tableLastIndex=0;function findInterval(e){var t,i=heightsTable,r=i.length;if(e<i[0])return tableLastIndex=0;if(e>i[r-1])return tableLastIndex=r-2;if(e>=i[tableLastIndex]){if(tableLastIndex+1<r&&e<i[tableLastIndex+1])return tableLastIndex;if(tableLastIndex+2<r&&e<i[tableLastIndex+2])return++tableLastIndex}else if(0<=tableLastIndex-1&&e>=i[tableLastIndex-1])return--tableLastIndex;for(t=0;t<r-2&&!(e>=i[t]&&e<i[t+1]);++t);return tableLastIndex=t}var scratchPositionNormal$1=new Cartesian3;function FrameRateMonitor(e){this._scene=e.scene,this.samplingWindow=defaultValue(e.samplingWindow,FrameRateMonitor.defaultSettings.samplingWindow),this.quietPeriod=defaultValue(e.quietPeriod,FrameRateMonitor.defaultSettings.quietPeriod),this.warmupPeriod=defaultValue(e.warmupPeriod,FrameRateMonitor.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=defaultValue(e.minimumFrameRateDuringWarmup,FrameRateMonitor.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=defaultValue(e.minimumFrameRateAfterWarmup,FrameRateMonitor.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new Event,this._nominalFrameRate=new Event,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;var t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener((function(e,i){update$5(t)})),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var i=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;function r(){visibilityChanged(t)}this._visibilityChangeRemoveListener=void 0,defined(i)&&(document.addEventListener(i,r,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(i,r,!1)})}function update$5(e,t){if(!(0<e._pauseCount)){var i=getTimestamp$1();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/TimeConstants$1.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/TimeConstants$1.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var r=i-e.samplingWindow/TimeConstants$1.SECONDS_PER_MILLISECOND;if(2<=e._frameTimes.length&&e._frameTimes[0]<=r){for(;2<=e._frameTimes.length&&e._frameTimes[1]<r;)e._frameTimes.shift();var n=(i-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/n,1e3/(i>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup)<n?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}}function visibilityChanged(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}function FrameState(e,t,i){this.context=e,this.commandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=SceneMode$1.SCENE3D,this.morphTime=SceneMode$1.getMorphTime(SceneMode$1.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=i,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.imagerySplitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0}function FrustumCommands(e,t){this.near=defaultValue(e,0),this.far=defaultValue(t,0);for(var i=Pass$1.NUMBER_OF_PASSES,r=new Array(i),n=new Array(i),a=0;a<i;++a)r[a]=[],n[a]=0;this.commands=r,this.indices=n}function GetFeatureInfoFormat(e,t,i){this.type=e,defined(t)||("json"===e?t="application/json":"xml"===e?t="text/xml":"html"===e?t="text/html":"text"===e&&(t="text/plain")),this.format=t,defined(i)||("json"===e?i=geoJsonToFeatureInfo:"xml"===e?i=xmlToFeatureInfo:"html"!==e&&"text"!==e||(i=textToFeatureInfo)),this.callback=i}function geoJsonToFeatureInfo(e){for(var t=[],i=e.features,r=0;r<i.length;++r){var n,a=i[r],o=new ImageryLayerFeatureInfo;o.data=a,o.properties=a.properties,o.configureNameFromProperties(a.properties),o.configureDescriptionFromProperties(a.properties),defined(a.geometry)&&"Point"===a.geometry.type&&(n=a.geometry.coordinates[0],a=a.geometry.coordinates[1],o.position=Cartographic.fromDegrees(n,a)),t.push(o)}return t}Fog.prototype.update=function(e){var t,i,r;(e.fog.enabled=this.enabled)&&(!defined(i=(t=e.camera).positionCartographic)||8e5<i.height||e.mode!==SceneMode$1.SCENE3D?e.fog.enabled=!1:(i=findInterval(r=i.height),r=CesiumMath.clamp((r-heightsTable[i])/(heightsTable[i+1]-heightsTable[i]),0,1),i=(i=CesiumMath.lerp(densityTable[i],densityTable[i+1],r))*((r=1e6*this.density)-r/tableStartDensity*tableEndDensity)*1e-6,r=Cartesian3.normalize(t.positionWC,scratchPositionNormal$1),i*=1-Math.abs(Cartesian3.dot(t.directionWC,r)),e.fog.density=i,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness))},FrameRateMonitor.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},FrameRateMonitor.fromScene=function(e){return defined(e._frameRateMonitor)&&!e._frameRateMonitor.isDestroyed()||(e._frameRateMonitor=new FrameRateMonitor({scene:e})),e._frameRateMonitor},Object.defineProperties(FrameRateMonitor.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),FrameRateMonitor.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},FrameRateMonitor.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},FrameRateMonitor.prototype.isDestroyed=function(){return!1},FrameRateMonitor.prototype.destroy=function(){return this._preUpdateRemoveListener(),defined(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),destroyObject(this)};var mapInfoMxpNamespace="http://www.mapinfo.com/mxp",esriWmsNamespace="http://www.esri.com/wms",wfsNamespace="http://www.opengis.net/wfs",gmlNamespace="http://www.opengis.net/gml";function xmlToFeatureInfo(e){var t=e.documentElement;if("MultiFeatureCollection"===t.localName&&t.namespaceURI===mapInfoMxpNamespace)return mapInfoXmlToFeatureInfo(e);if("FeatureInfoResponse"===t.localName&&t.namespaceURI===esriWmsNamespace)return esriXmlToFeatureInfo(e);if("FeatureCollection"===t.localName&&t.namespaceURI===wfsNamespace)return gmlToFeatureInfo(e);if("ServiceExceptionReport"===t.localName)throw new RuntimeError((new XMLSerializer).serializeToString(t));return("msGMLOutput"===t.localName?msGmlToFeatureInfo:unknownXmlToFeatureInfo)(e)}function mapInfoXmlToFeatureInfo(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(mapInfoMxpNamespace,"Feature"),r=0;r<i.length;++r){for(var n=i[r],a={},o=n.getElementsByTagNameNS(mapInfoMxpNamespace,"Val"),s=0;s<o.length;++s){var l,c=o[s];c.hasAttribute("ref")&&(l=c.getAttribute("ref"),c=c.textContent.trim(),a[l]=c)}var u=new ImageryLayerFeatureInfo;u.data=n,u.properties=a,u.configureNameFromProperties(a),u.configureDescriptionFromProperties(a),t.push(u)}return t}function esriXmlToFeatureInfo(e){var t=[],i=(e=e.documentElement).getElementsByTagNameNS("*","FIELDS");if(0<i.length)for(var r=0;r<i.length;++r){for(var n=i[r],a={},o=n.attributes,s=0;s<o.length;++s){var l=o[s];a[l.name]=l.value}t.push(imageryLayerFeatureInfoFromDataAndProperties(n,a))}else for(var c=e.getElementsByTagNameNS("*","FeatureInfo"),u=0;u<c.length;++u){var d=c[u];a={};for(var h=d.childNodes,p=0;p<h.length;++p){var f=h[p];f.nodeType===Node.ELEMENT_NODE&&(a[f.localName]=f.textContent)}t.push(imageryLayerFeatureInfoFromDataAndProperties(d,a))}return t}function gmlToFeatureInfo(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(gmlNamespace,"featureMember"),r=0;r<i.length;++r){var n=i[r],a={};getGmlPropertiesRecursively(n,a),t.push(imageryLayerFeatureInfoFromDataAndProperties(n,a))}return t}function msGmlToFeatureInfo(e){for(var t,i=[],r=e.documentElement.childNodes,n=0;n<r.length;n++)if(r[n].nodeType===Node.ELEMENT_NODE){t=r[n];break}if(!defined(t))throw new RuntimeError("Unable to find first child of the feature info xml document");for(var a=t.childNodes,o=0;o<a.length;++o){var s,l=a[o];l.nodeType===Node.ELEMENT_NODE&&(getGmlPropertiesRecursively(l,s={}),i.push(imageryLayerFeatureInfoFromDataAndProperties(l,s)))}return i}function getGmlPropertiesRecursively(e,t){for(var i=!0,r=0;r<e.childNodes.length;++r){var n=e.childNodes[r];n.nodeType===Node.ELEMENT_NODE&&(i=!1),"Point"!==n.localName&&"LineString"!==n.localName&&"Polygon"!==n.localName&&"boundedBy"!==n.localName&&n.hasChildNodes()&&getGmlPropertiesRecursively(n,t)&&(t[n.localName]=n.textContent)}return i}function imageryLayerFeatureInfoFromDataAndProperties(e,t){var i=new ImageryLayerFeatureInfo;return i.data=e,i.properties=t,i.configureNameFromProperties(t),i.configureDescriptionFromProperties(t),i}function unknownXmlToFeatureInfo(e){var t=(new XMLSerializer).serializeToString(e),i=document.createElement("div"),r=document.createElement("pre");return r.textContent=t,i.appendChild(r),(r=new ImageryLayerFeatureInfo).data=e,r.description=i.innerHTML,[r]}var emptyBodyRegex=/<body>\s*<\/body>/im,wmsServiceExceptionReportRegex=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,titleRegex=/<title>([\s\S]*)<\/title>/im;function textToFeatureInfo(e){if(!emptyBodyRegex.test(e)&&!wmsServiceExceptionReportRegex.test(e)){var t,i=titleRegex.exec(e);return i&&1<i.length&&(t=i[1]),(i=new ImageryLayerFeatureInfo).name=t,i.description=e,i.data=e,[i]}}var GlobeFS="uniform vec4 u_initialColor;\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_DAY_NIGHT_ALPHA\nuniform float u_dayTextureNightAlpha[TEXTURE_UNITS];\nuniform float u_dayTextureDayAlpha[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SPLIT\nuniform float u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_COLOR_TO_ALPHA\nuniform vec4 u_colorsToAlpha[TEXTURE_UNITS];\n#endif\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n#endif\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nuniform highp sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n#if defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\n#ifdef HIGHLIGHT_FILL_TILE\nuniform vec4 u_fillHighlightColor;\n#endif\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\nuniform vec4 u_translucencyRectangle;\n#endif\n#ifdef UNDERGROUND_COLOR\nuniform vec4 u_undergroundColor;\nuniform vec4 u_undergroundColorAlphaByDistance;\n#endif\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef APPLY_MATERIAL\nvarying float v_height;\nvarying float v_slope;\nvarying float v_aspect;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvarying vec3 v_fogRayleighColor;\nvarying vec3 v_fogMieColor;\n#endif\n#ifdef GROUND_ATMOSPHERE\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\n#endif\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\nfloat startDistance = nearFarScalar.x;\nfloat startValue = nearFarScalar.y;\nfloat endDistance = nearFarScalar.z;\nfloat endValue = nearFarScalar.w;\nfloat t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\nreturn mix(startValue, endValue, t);\n}\n#endif\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\nreturn sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\n#ifdef TRANSLUCENT\nbool inTranslucencyRectangle()\n{\nreturn\nv_textureCoordinates.x > u_translucencyRectangle.x &&\nv_textureCoordinates.x < u_translucencyRectangle.z &&\nv_textureCoordinates.y > u_translucencyRectangle.y &&\nv_textureCoordinates.y < u_translucencyRectangle.w;\n}\n#endif\nvec4 sampleAndBlend(\nvec4 previousColor,\nsampler2D textureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale,\nfloat textureAlpha,\nfloat textureNightAlpha,\nfloat textureDayAlpha,\nfloat textureBrightness,\nfloat textureContrast,\nfloat textureHue,\nfloat textureSaturation,\nfloat textureOneOverGamma,\nfloat split,\nvec4 colorToAlpha,\nfloat nightBlend)\n{\nvec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\ntextureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);\n#endif\nvec2 translation = textureCoordinateTranslationAndScale.xy;\nvec2 scale = textureCoordinateTranslationAndScale.zw;\nvec2 textureCoordinates = tileTextureCoordinates * scale + translation;\nvec4 value = texture2D(textureToSample, textureCoordinates);\nvec3 color = value.rgb;\nfloat alpha = value.a;\n#ifdef APPLY_COLOR_TO_ALPHA\nvec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);\ncolorDiff.r = max(max(colorDiff.r, colorDiff.g), colorDiff.b);\nalpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);\n#endif\n#if !defined(APPLY_GAMMA)\nvec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nfloat splitPosition = czm_imagerySplitPosition;\nif (split < 0.0 && gl_FragCoord.x > splitPosition) {\nalpha = 0.0;\n}\nelse if (split > 0.0 && gl_FragCoord.x < splitPosition) {\nalpha = 0.0;\n}\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\noutAlpha += sign(outAlpha) - 1.0;\nvec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, max(outAlpha, 0.0));\n}\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\nrgb = czm_HSBToRGB(hsb);\n#endif\nreturn rgb;\n}\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\n#ifdef GROUND_ATMOSPHERE\nvec3 computeGroundAtmosphereColor(vec3 fogColor, vec4 finalColor, vec3 atmosphereLightDirection, float cameraDist);\n#endif\nconst float fExposure = 2.0;\nvoid main()\n{\n#ifdef TILE_LIMIT_RECTANGLE\nif (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\nv_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n{\ndiscard;\n}\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nfloat clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\nvec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0));\nvec3 normalEC = czm_normal3D * normalMC;\n#endif\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\nfloat nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);\n#else\nfloat nightBlend = 0.0;\n#endif\nvec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);\n#ifdef SHOW_TILE_BOUNDARIES\nif (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\nv_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n{\ncolor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nfloat cameraDist;\nif (czm_sceneMode == czm_sceneMode2D)\n{\ncameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n}\nelse if (czm_sceneMode == czm_sceneModeColumbusView)\n{\ncameraDist = -czm_view[3].z;\n}\nelse\n{\ncameraDist = length(czm_view[3]);\n}\nfloat fadeOutDist = u_lightingFadeDistance.x;\nfloat fadeInDist = u_lightingFadeDistance.y;\nif (czm_sceneMode != czm_sceneMode3D) {\nvec3 radii = czm_ellipsoidRadii;\nfloat maxRadii = max(radii.x, max(radii.y, radii.z));\nfadeOutDist -= maxRadii;\nfadeInDist -= maxRadii;\n}\nfloat fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\nfloat fade = 0.0;\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\nvec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\nvec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\nvec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\nwaterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\nfloat mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\nif (mask > 0.0)\n{\nmat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);\nvec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\nvec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\nvec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\ncolor = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);\n}\n#endif\n#ifdef APPLY_MATERIAL\nczm_materialInput materialInput;\nmaterialInput.st = v_textureCoordinates.st;\nmaterialInput.normalEC = normalize(v_normalEC);\nmaterialInput.slope = v_slope;\nmaterialInput.height = v_height;\nmaterialInput.aspect = v_aspect;\nczm_material material = czm_getMaterial(materialInput);\nvec4 materialColor = vec4(material.diffuse, material.alpha);\ncolor = alphaBlend(materialColor, color);\n#endif\n#ifdef ENABLE_VERTEX_LIGHTING\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * 0.9 + 0.3, 0.0, 1.0);\nvec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#elif defined(ENABLE_DAYNIGHT_SHADING)\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);\ndiffuseIntensity = mix(1.0, diffuseIntensity, fade);\nvec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#else\nvec4 finalColor = color;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nvec4 clippingPlanesEdgeColor = vec4(1.0);\nclippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\nfloat clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\nif (clipDistance < clippingPlanesEdgeWidth)\n{\nfinalColor = clippingPlanesEdgeColor;\n}\n#endif\n#ifdef HIGHLIGHT_FILL_TILE\nfinalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);\n#ifndef HDR\nfogColor = vec3(1.0) - exp(-fExposure * fogColor);\n#endif\n#endif\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\nvec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\nvec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n#ifdef FOG\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nfloat darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);\nfogColor *= darken;\n#endif\n#ifdef HDR\nconst float modifier = 0.15;\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);\n#else\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#endif\n#endif\n#ifdef GROUND_ATMOSPHERE\nif (!czm_backFacing())\n{\nvec3 groundAtmosphereColor = computeGroundAtmosphereColor(fogColor, finalColor, atmosphereLightDirection, cameraDist);\nfinalColor = vec4(mix(finalColor.rgb, groundAtmosphereColor, fade), finalColor.a);\n}\n#endif\n#ifdef UNDERGROUND_COLOR\nif (czm_backFacing())\n{\nfloat distanceFromEllipsoid = max(czm_eyeHeight, 0.0);\nfloat distance = max(v_distance - distanceFromEllipsoid, 0.0);\nfloat blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);\nvec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);\nfinalColor = alphaBlend(undergroundColor, finalColor);\n}\n#endif\n#ifdef TRANSLUCENT\nif (inTranslucencyRectangle())\n{\nvec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\nfinalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n}\n#endif\ngl_FragColor = finalColor;\n}\n#ifdef GROUND_ATMOSPHERE\nvec3 computeGroundAtmosphereColor(vec3 fogColor, vec4 finalColor, vec3 atmosphereLightDirection, float cameraDist)\n{\n#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\nfloat mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\nvec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\nxy *= czm_viewport.zw * mpp * 0.5;\nvec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\nczm_ray ray = czm_ray(vec3(0.0), direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nvec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\nellipsoidPosition = (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\nAtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(ellipsoidPosition, true, atmosphereLightDirection);\nvec3 groundAtmosphereColor = colorCorrect(atmosColor.mie) + finalColor.rgb * colorCorrect(atmosColor.rayleigh);\n#ifndef HDR\ngroundAtmosphereColor = vec3(1.0) - exp(-fExposure * groundAtmosphereColor);\n#endif\nfloat fadeInDist = u_nightFadeDistance.x;\nfloat fadeOutDist = u_nightFadeDistance.y;\nfloat sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#ifdef HDR\nsunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);\n#endif\ngroundAtmosphereColor = mix(groundAtmosphereColor, fogColor, sunlitAtmosphereIntensity);\n#else\nvec3 groundAtmosphereColor = fogColor;\n#endif\n#ifdef HDR\ngroundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);\n#endif\nreturn groundAtmosphereColor;\n}\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\nfloat waveFade(float edge0, float edge1, float x)\n{\nfloat y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\nreturn pow(1.0 - y, 5.0);\n}\nfloat linearFade(float edge0, float edge1, float x)\n{\nreturn clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\nvec3 positionToEyeEC = -positionEyeCoordinates;\nfloat positionToEyeECLength = length(positionToEyeEC);\nvec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));\nfloat waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n#ifdef SHOW_OCEAN_WAVES\nfloat time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\nvec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\nvec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\ntime = czm_frameNumber * oceanAnimationSpeedLowAltitude;\nnoise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\nvec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\nfloat highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\nfloat lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\nvec3 normalTangentSpace =\n(highAltitudeFade * normalTangentSpaceHighAltitude) +\n(lowAltitudeFade * normalTangentSpaceLowAltitude);\nnormalTangentSpace = normalize(normalTangentSpace);\nnormalTangentSpace.xy *= waveIntensity;\nnormalTangentSpace = normalize(normalTangentSpace);\n#else\nvec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\nvec3 normalEC = enuToEye * normalTangentSpace;\nconst vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\nfloat diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;\nvec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n#ifdef SHOW_OCEAN_WAVES\nfloat tsPerturbationRatio = normalTangentSpace.z;\nvec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\nvec3 nonDiffuseHighlight = vec3(0.0);\n#endif\nfloat specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);\nfloat surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\nfloat specular = specularIntensity * surfaceReflectance;\n#ifdef HDR\nspecular *= 1.4;\nfloat e = 0.2;\nfloat d = 3.3;\nfloat c = 1.7;\nvec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\nvec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\nreturn vec4(color, imageryColor.a);\n}\n#endif // #ifdef SHOW_REFLECTIVE_OCEAN\n",GlobeVS="#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed0;\nattribute float compressed1;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec4 textureCoordAndEncodedNormals;\n#endif\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_tileRectangle;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef APPLY_MATERIAL\nvarying float v_slope;\nvarying float v_aspect;\nvarying float v_height;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvarying vec3 v_fogMieColor;\nvarying vec3 v_fogRayleighColor;\n#endif\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn u_modifiedModelViewProjection * vec4(position, 1.0);\n}\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\nconst float maxTileWidth = 0.003068;\nfloat positionFraction = textureCoordinates.y;\nfloat southLatitude = u_southAndNorthLatitude.x;\nfloat northLatitude = u_southAndNorthLatitude.y;\nif (northLatitude - southLatitude > maxTileWidth)\n{\nfloat southMercatorY = u_southMercatorYAndOneOverHeight.x;\nfloat oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\nfloat currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\ncurrentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\npositionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n}\nreturn positionFraction;\n}\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\nreturn textureCoordinates.y;\n}\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nreturn u_modifiedModelViewProjection * rtcPosition2D;\n}\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, height, textureCoordinates);\n}\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\nvec3 position3DWC = position + u_center3D;\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nvec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\nreturn czm_modelViewProjection * morphPosition;\n}\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\nvec2 xy = czm_decompressTextureCoordinates(compressed0.x);\nvec2 zh = czm_decompressTextureCoordinates(compressed0.y);\nvec3 position = vec3(xy, zh.x);\nfloat height = zh.y;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\nheight = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\nposition = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = compressed0.w;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#else\nvec3 position = position3DAndHeight.xyz;\nfloat height = position3DAndHeight.w;\nvec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = 0.0;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#endif\nvec3 position3DWC = position + u_center3D;\ngl_Position = getPosition(position, height, textureCoordinates);\nv_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\nvec3 normalMC = czm_octDecode(encodedNormal);\nv_normalMC = normalMC;\nv_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION) || defined(HDR)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nAtmosphereColor atmosFogColor = computeGroundAtmosphereFromSpace(position3DWC, false, vec3(0.0));\nv_fogMieColor = atmosFogColor.mie;\nv_fogRayleighColor = atmosFogColor.rayleigh;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nv_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);\n#endif\n#ifdef APPLY_MATERIAL\nfloat northPoleZ = czm_ellipsoidRadii.z;\nvec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);\nvec3 ellipsoidNormal = normalize(v_positionMC);\nvec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));\nfloat dotProd = abs(dot(ellipsoidNormal, v_normalMC));\nv_slope = acos(dotProd);\nvec3 normalRejected = ellipsoidNormal * dotProd;\nvec3 normalProjected = v_normalMC - normalRejected;\nvec3 aspectVector = normalize(normalProjected);\nv_aspect = acos(dot(aspectVector, vectorEastMC));\nfloat determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);\nv_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);\nv_height = height;\n#endif\n}\n",GroundAtmosphere="const float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\nconst vec3 v3InvWavelength = vec3(5.60204474633241, 9.473284437923038, 19.64380261047721);\nconst float fScaleDepth = 0.25;\nstruct AtmosphereColor\n{\nvec3 mie;\nvec3 rayleigh;\n};\nconst int nSamples = 2;\nconst float fSamples = 2.0;\nfloat scale(float fCos)\n{\nfloat x = 1.0 - fCos;\nreturn fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos, bool dynamicLighting, vec3 lightDirectionWC)\n{\nfloat fInnerRadius = czm_ellipsoidRadii.x;\nfloat fOuterRadius = czm_ellipsoidRadii.x * 1.025;\nfloat fOuterRadius2 = fOuterRadius * fOuterRadius;\nfloat fScale = 1.0 / (fOuterRadius - fInnerRadius);\nfloat fScaleOverScaleDepth = fScale / fScaleDepth;\nvec3 v3Ray = v3Pos - czm_viewerPositionWC;\nfloat fFar = length(v3Ray);\nv3Ray /= fFar;\nfloat fCameraHeight = length(czm_viewerPositionWC);\nfloat fCameraHeight2 = fCameraHeight * fCameraHeight;\nfloat B = 2.0 * length(czm_viewerPositionWC) * dot(normalize(czm_viewerPositionWC), v3Ray);\nfloat C = fCameraHeight2 - fOuterRadius2;\nfloat fDet = max(0.0, B*B - 4.0 * C);\nfloat fNear = 0.5 * (-B - sqrt(fDet));\nvec3 v3Start = czm_viewerPositionWC + v3Ray * fNear;\nfFar -= fNear;\nfloat fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\nfloat fLightAngle = czm_branchFreeTernary(dynamicLighting, dot(lightDirectionWC, v3Pos) / length(v3Pos), 1.0);\nfloat fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\nfloat fCameraScale = scale(fCameraAngle);\nfloat fLightScale = scale(fLightAngle);\nfloat fCameraOffset = fDepth*fCameraScale;\nfloat fTemp = (fLightScale + fCameraScale);\nfloat fSampleLength = fFar / fSamples;\nfloat fScaledLength = fSampleLength * fScale;\nvec3 v3SampleRay = v3Ray * fSampleLength;\nvec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\nvec3 v3FrontColor = vec3(0.0);\nvec3 v3Attenuate = vec3(0.0);\nfor(int i=0; i<nSamples; i++)\n{\nfloat fHeight = length(v3SamplePoint);\nfloat fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\nfloat fScatter = fDepth*fTemp - fCameraOffset;\nv3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\nv3FrontColor += v3Attenuate * (fDepth * fScaledLength);\nv3SamplePoint += v3SampleRay;\n}\nAtmosphereColor color;\ncolor.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\ncolor.rayleigh = v3Attenuate;\nreturn color;\n}\n";function GlobeSurfaceShader(e,t,i,r,n){this.numberOfDayTextures=e,this.flags=t,this.material=i,this.shaderProgram=r,this.clippingShaderState=n}function GlobeSurfaceShaderSet(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function getPositionMode(e){var t;switch(e){case SceneMode$1.SCENE3D:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case SceneMode$1.SCENE2D:case SceneMode$1.COLUMBUS_VIEW:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case SceneMode$1.MORPHING:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return t}function get2DYPositionFraction(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}GlobeSurfaceShaderSet.prototype.getShaderProgram=function(e){var t=e.frameState,i=e.surfaceTile,r=e.numberOfDayTextures,n=e.applyBrightness,a=e.applyContrast,o=e.applyHue,s=e.applySaturation,l=e.applyGamma,c=e.applyAlpha,u=e.applyDayNightAlpha,d=e.applySplit,h=e.showReflectiveOcean,p=e.showOceanWaves,f=e.enableLighting,m=e.dynamicAtmosphereLighting,g=e.dynamicAtmosphereLightingFromSun,y=e.showGroundAtmosphere,_=e.perFragmentGroundAtmosphere,v=e.hasVertexNormals,C=e.useWebMercatorProjection,x=e.enableFog,b=e.enableClippingPlanes,S=e.clippingPlanes,T=e.clippedByBoundaries,E=e.hasImageryLayerCutout,w=e.colorCorrect,A=e.highlightFillTile,P=e.colorToAlpha,D=e.showUndergroundColor,M=e.translucent,I=0,R="",O=i.renderedMesh.encoding;O.quantization===TerrainQuantization$1.BITS12&&(I=1,R="QUANTIZATION_BITS12");var L=0,N="";T&&(L=1,N="TILE_LIMIT_RECTANGLE");var F=0,B="";E&&(F=1,B="APPLY_IMAGERY_CUTOUT");var V=t.mode,k=V|n<<2|a<<3|o<<4|s<<5|l<<6|c<<7|h<<8|p<<9|f<<10|m<<11|g<<12|y<<13|_<<14|v<<15|C<<16|x<<17|I<<18|d<<19|b<<20|L<<21|F<<22|w<<23|A<<24|P<<25|D<<26|M<<27|u<<28;e=0;if(defined(S)&&0<S.length&&(e=b?S.clippingPlanesState:0),defined(T=i.surfaceShader)&&T.numberOfDayTextures===r&&T.flags===k&&T.material===this.material&&T.clippingShaderState===e)return T.shaderProgram;if(defined(I=this._shadersByTexturesFlags[r])||(I=this._shadersByTexturesFlags[r]=[]),!defined(T=I[k])||T.material!==this.material||T.clippingShaderState!==e){L=this.baseVertexShaderSource.clone(),F=this.baseFragmentShaderSource.clone(),0!==e&&F.sources.unshift(getClippingFunction(S,t.context)),L.defines.push(R),F.defines.push("TEXTURE_UNITS "+r,N,B),n&&F.defines.push("APPLY_BRIGHTNESS"),a&&F.defines.push("APPLY_CONTRAST"),o&&F.defines.push("APPLY_HUE"),s&&F.defines.push("APPLY_SATURATION"),l&&F.defines.push("APPLY_GAMMA"),c&&F.defines.push("APPLY_ALPHA"),u&&F.defines.push("APPLY_DAY_NIGHT_ALPHA"),h&&(F.defines.push("SHOW_REFLECTIVE_OCEAN"),L.defines.push("SHOW_REFLECTIVE_OCEAN")),p&&F.defines.push("SHOW_OCEAN_WAVES"),P&&F.defines.push("APPLY_COLOR_TO_ALPHA"),D&&(L.defines.push("UNDERGROUND_COLOR"),F.defines.push("UNDERGROUND_COLOR")),M&&(L.defines.push("TRANSLUCENT"),F.defines.push("TRANSLUCENT")),f&&(v?(L.defines.push("ENABLE_VERTEX_LIGHTING"),F.defines.push("ENABLE_VERTEX_LIGHTING")):(L.defines.push("ENABLE_DAYNIGHT_SHADING"),F.defines.push("ENABLE_DAYNIGHT_SHADING"))),m&&(F.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),g&&F.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN")),y&&(L.defines.push("GROUND_ATMOSPHERE"),F.defines.push("GROUND_ATMOSPHERE"),_&&F.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE")),L.defines.push("INCLUDE_WEB_MERCATOR_Y"),F.defines.push("INCLUDE_WEB_MERCATOR_Y"),x&&(L.defines.push("FOG"),F.defines.push("FOG")),d&&F.defines.push("APPLY_SPLIT"),b&&F.defines.push("ENABLE_CLIPPING_PLANES"),w&&F.defines.push("COLOR_CORRECT"),A&&F.defines.push("HIGHLIGHT_FILL_TILE");var z="    vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)\n    {\n        vec4 color = initialColor;\n";E&&(z+="        vec4 cutoutAndColorResult;\n        bool texelUnclipped;\n");for(var G=0;G<r;++G)z+=E?"        cutoutAndColorResult = u_dayTextureCutoutRectangles["+G+"];\n        texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n        cutoutAndColorResult = sampleAndBlend(\n":"        color = sampleAndBlend(\n",z+="            color,\n            u_dayTextures["+G+"],\n            u_dayTextureUseWebMercatorT["+G+"] ? textureCoordinates.xz : textureCoordinates.xy,\n            u_dayTextureTexCoordsRectangle["+G+"],\n            u_dayTextureTranslationAndScale["+G+"],\n            "+(c?"u_dayTextureAlpha["+G+"]":"1.0")+",\n            "+(u?"u_dayTextureNightAlpha["+G+"]":"1.0")+",\n"+(u?"u_dayTextureDayAlpha["+G+"]":"1.0")+",\n"+(n?"u_dayTextureBrightness["+G+"]":"0.0")+",\n            "+(a?"u_dayTextureContrast["+G+"]":"0.0")+",\n            "+(o?"u_dayTextureHue["+G+"]":"0.0")+",\n            "+(s?"u_dayTextureSaturation["+G+"]":"0.0")+",\n            "+(l?"u_dayTextureOneOverGamma["+G+"]":"0.0")+",\n            "+(d?"u_dayTextureSplit["+G+"]":"0.0")+",\n            "+(P?"u_colorsToAlpha["+G+"]":"vec4(0.0)")+",\n        nightBlend        );\n",E&&(z+="        color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");z+="        return color;\n    }",F.sources.push(z),L.sources.push(getPositionMode(V)),L.sources.push(get2DYPositionFraction(C)),O=ShaderProgram.fromCache({context:t.context,vertexShaderSource:L,fragmentShaderSource:F,attributeLocations:O.getAttributeLocations()}),T=I[k]=new GlobeSurfaceShader(r,k,this.material,O,e)}return(i.surfaceShader=T).shaderProgram},GlobeSurfaceShaderSet.prototype.destroy=function(){var e,t,i,r=this._shadersByTexturesFlags;for(i in r)if(r.hasOwnProperty(i)){var n=r[i];if(defined(n))for(e in n)n.hasOwnProperty(e)&&defined(t=n[e])&&t.shaderProgram.destroy()}return destroyObject(this)};var ImageryState={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7},ImageryState$1=Object.freeze(ImageryState),QuadtreeTileLoadState={START:0,LOADING:1,DONE:2,FAILED:3},QuadtreeTileLoadState$1=Object.freeze(QuadtreeTileLoadState),TerrainState$1={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},TerrainState$2=Object.freeze(TerrainState$1);function GlobeSurfaceTile(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new Cartesian4(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.orientedBoundingBox=void 0,this.boundingVolumeSourceTile=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new Cartesian3,this.terrainState=TerrainState$2.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new BoundingSphere,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}function getPosition$2(e,t,i,r,n,a){return e.decodePosition(r,n,a),defined(t)&&t!==SceneMode$1.SCENE3D&&(t=i.ellipsoid.cartesianToCartographic(a),i.project(t,a),Cartesian3.fromElements(a.z,a.x,a.y,a)),a}Object.defineProperties(GlobeSurfaceTile.prototype,{eligibleForUnloading:{get:function(){for(var e=this.terrainState,t=!(e===TerrainState$2.RECEIVING||e===TerrainState$2.TRANSFORMING),i=this.imagery,r=0,n=i.length;t&&r<n;++r){var a=i[r];t=!defined(a.loadingImagery)||a.loadingImagery.state!==ImageryState$1.TRANSITIONING}return t}},renderedMesh:{get:function(){return defined(this.vertexArray)?this.mesh:defined(this.fill)?this.fill.mesh:void 0}}});var scratchV0=new Cartesian3,scratchV1=new Cartesian3,scratchV2=new Cartesian3;function prepareNewTile(e,t,i){var r,n,a=t.getTileDataAvailable(e.x,e.y,e.level);defined(a)||!defined(e.parent)||defined(n=(r=e.parent).data)&&defined(n.terrainData)&&(a=n.terrainData.isChildAvailable(r.x,r.y,e.x,e.y)),!1===a&&(e.data.terrainState=TerrainState$2.FAILED);for(var o=0,s=i.length;o<s;++o){var l=i.get(o);l.show&&l._createTileImagerySkeletons(e,t)}}function processTerrainStateMachine(e,t,i,r,n){var a=e.data,o=e.parent;a.terrainState===TerrainState$2.FAILED&&void 0!==o&&(void 0!==o.data&&void 0!==o.data.terrainData&&!1!==o.data.terrainData.canUpsample||GlobeSurfaceTile.processStateMachine(o,t,i,r,!0)),a.terrainState===TerrainState$2.FAILED&&upsample(a,e,t,i,e.x,e.y,e.level),a.terrainState===TerrainState$2.UNLOADED&&requestTileGeometry$1(a,i,e.x,e.y,e.level),a.terrainState===TerrainState$2.RECEIVED&&transform$1(a,t,i,e.x,e.y,e.level),a.terrainState===TerrainState$2.TRANSFORMED&&createResources$4(a,t.context,i,e.x,e.y,e.level,n),a.terrainState>=TerrainState$2.RECEIVED&&void 0===a.waterMaskTexture&&i.hasWaterMask&&(void 0!==a.terrainData.waterMask?createWaterMaskTextureIfNeeded(t.context,a):defined(t=a._findAncestorTileWithTerrainData(e))&&defined(t.data.waterMaskTexture)&&(a.waterMaskTexture=t.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,t,a.waterMaskTranslationAndScale)))}function upsample(e,t,i,r,n,a,o){var s,l,c,u=t.parent;u?(s=u.data.terrainData,l=u.x,c=u.y,u=u.level,!defined(s)||defined(o=s.upsample(r.tilingScheme,l,c,u,n,a,o))&&(e.terrainState=TerrainState$2.RECEIVING,when(o,(function(t){e.terrainData=t,e.terrainState=TerrainState$2.RECEIVED}),(function(){e.terrainState=TerrainState$2.FAILED})))):t.state=QuadtreeTileLoadState$1.FAILED}function requestTileGeometry$1(e,t,i,r,n){function a(t){e.terrainData=t,e.terrainState=TerrainState$2.RECEIVED,e.request=void 0}function o(){if(e.request.state===RequestState$1.CANCELLED)return e.terrainData=void 0,e.terrainState=TerrainState$2.UNLOADED,void(e.request=void 0);e.terrainState=TerrainState$2.FAILED,e.request=void 0;var a="Failed to obtain terrain tile X: "+i+" Y: "+r+" Level: "+n+".";t._requestError=TileProviderError.handleError(t._requestError,t,t.errorEvent,a,i,r,n,s)}function s(){var s=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.TERRAIN});e.request=s,defined(s=t.requestTileGeometry(i,r,n,s))?(e.terrainState=TerrainState$2.RECEIVING,when(s,a,o)):(e.terrainState=TerrainState$2.UNLOADED,e.request=void 0)}s()}function transform$1(e,t,i,r,n,a){i=i.tilingScheme,defined(t=e.terrainData.createMesh(i,r,n,a,t.terrainExaggeration))&&(e.terrainState=TerrainState$2.TRANSFORMING,when(t,(function(t){e.mesh=t,e.orientedBoundingBox=OrientedBoundingBox.clone(t.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=Cartesian3.clone(t.occludeePointInScaledSpace,e.occludeePointInScaledSpace),e.terrainState=TerrainState$2.TRANSFORMED}),(function(){e.terrainState=TerrainState$2.FAILED})))}function createResources$4(e,t,i,r,n,a,o){e.vertexArray=GlobeSurfaceTile._createVertexArrayForMesh(t,e.mesh),e.terrainState=TerrainState$2.READY,e.fill=e.fill&&e.fill.destroy(o)}function getContextWaterMaskData(e){var t,i=e.cache.tile_waterMaskData;return defined(i)||((t=Texture.create({context:e,pixelFormat:PixelFormat$1.LUMINANCE,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}})).referenceCount=1,i={allWaterTexture:t,sampler:new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=i),i}function createWaterMaskTextureIfNeeded(e,t){var i=t.terrainData.waterMask,r=getContextWaterMaskData(e);if(1===(a=i.length)){if(0===i[0])return;n=r.allWaterTexture}else{var n,a=Math.sqrt(a);(n=Texture.create({context:e,pixelFormat:PixelFormat$1.LUMINANCE,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{width:a,height:a,arrayBufferView:i},sampler:r.sampler,flipY:!1})).referenceCount=0}++n.referenceCount,t.waterMaskTexture=n,Cartesian4.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}GlobeSurfaceTile.prototype.pick=function(e,t,i,r,n){var a=this.renderedMesh;if(defined(a)){for(var o=a.vertices,s=a.indices,l=a.encoding,c=s.length,u=Number.MAX_VALUE,d=0;d<c;d+=3){var h=s[d],p=s[d+1],f=s[d+2];h=getPosition$2(l,t,i,o,h,scratchV0),p=getPosition$2(l,t,i,o,p,scratchV1),f=getPosition$2(l,t,i,o,f,scratchV2);defined(f=IntersectionTests.rayTriangleParametric(e,h,p,f,r))&&f<u&&0<=f&&(u=f)}return u!==Number.MAX_VALUE?Ray.getPoint(e,u,n):void 0}},GlobeSurfaceTile.prototype.freeResources=function(){defined(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=TerrainState$2.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();for(var e=this.imagery,t=0,i=e.length;t<i;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()},GlobeSurfaceTile.prototype.freeVertexArray=function(){GlobeSurfaceTile._freeVertexArray(this.vertexArray),this.vertexArray=void 0,GlobeSurfaceTile._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0},GlobeSurfaceTile.initialize=function(e,t,i){defined(e.data)||(e.data=new GlobeSurfaceTile),e.state===QuadtreeTileLoadState$1.START&&(prepareNewTile(e,t,i),e.state=QuadtreeTileLoadState$1.LOADING)},GlobeSurfaceTile.processStateMachine=function(e,t,i,r,n,a){GlobeSurfaceTile.initialize(e,i,r);var o=e.data;if(e.state===QuadtreeTileLoadState$1.LOADING&&processTerrainStateMachine(e,t,i,r,n),!a){if(n=e.renderable,e.renderable=defined(o.vertexArray),a=o.terrainState===TerrainState$2.READY,e.upsampledFromParent=defined(o.terrainData)&&o.terrainData.wasCreatedByUpsampling(),t=o.processImagery(e,i,t),a&&t){var s,l=e._loadedCallbacks,c={};for(s in l)l.hasOwnProperty(s)&&(l[s](e)||(c[s]=l[s]));e._loadedCallbacks=c,e.state=QuadtreeTileLoadState$1.DONE}n&&(e.renderable=!0)}},GlobeSurfaceTile.prototype.processImagery=function(e,t,i,r){for(var n=e.data,a=e.upsampledFromParent,o=!1,s=!0,l=n.imagery,c=0,u=l.length;c<u;++c){var d=l[c];if(defined(d.loadingImagery)){if(d.loadingImagery.state===ImageryState$1.PLACEHOLDER){var h=d.loadingImagery.imageryLayer;if(h.imageryProvider.ready){d.freeResources(),l.splice(c,1),h._createTileImagerySkeletons(e,t,c),--c,u=l.length;continue}a=!1}h=d.processStateMachine(e,i,r),s=s&&h,o=o||h||defined(d.readyImagery),a=a&&defined(d.loadingImagery)&&(d.loadingImagery.state===ImageryState$1.FAILED||d.loadingImagery.state===ImageryState$1.INVALID)}else a=!1}return e.upsampledFromParent=a,e.renderable=e.renderable&&(o||s),s},GlobeSurfaceTile._createVertexArrayForMesh=function(e,t){var i=t.vertices,r=Buffer$1.createVertexBuffer({context:e,typedArray:i,usage:BufferUsage$1.STATIC_DRAW}),n=t.encoding.getAttributes(r),a=t.indices.indexBuffers||{};return!defined(i=a[e.id])||i.isDestroyed()?(r=t.indices,(i=Buffer$1.createIndexBuffer({context:e,typedArray:r,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.fromSizeInBytes(r.BYTES_PER_ELEMENT)})).vertexArrayDestroyable=!1,i.referenceCount=1,a[e.id]=i,t.indices.indexBuffers=a):++i.referenceCount,new VertexArray({context:e,attributes:n,indexBuffer:i})},GlobeSurfaceTile._freeVertexArray=function(e){var t;defined(e)&&(t=e.indexBuffer,e.destroy(),defined(t)&&!t.isDestroyed()&&defined(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy()))},GlobeSurfaceTile.prototype._findAncestorTileWithTerrainData=function(e){for(var t=e.parent;defined(t)&&(!defined(t.data)||!defined(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},GlobeSurfaceTile.prototype._computeWaterMaskTranslationAndScale=function(e,t,i){var r=t.rectangle,n=e.rectangle,a=n.width,o=n.height;t=a/r.width,e=o/r.height;return i.x=t*(n.west-r.west)/a,i.y=e*(n.south-r.south)/o,i.z=t,i.w=e,i};var ReprojectWebMercatorFS="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",ReprojectWebMercatorVS="attribute vec4 position;\nattribute float webMercatorT;\nuniform vec2 u_textureDimensions;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nv_textureCoordinates = vec2(position.x, webMercatorT);\ngl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n";function Imagery(e,t,i,r,n){var a,o,s;this.imageryLayer=e,this.x=t,this.y=i,this.level=r,this.request=void 0,0!==r&&(a=t/2|0,o=i/2|0,s=r-1,this.parent=e.getImageryFromCache(a,o,s)),this.state=ImageryState$1.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!defined(n)&&e.imageryProvider.ready&&(n=e.imageryProvider.tilingScheme.tileXYToRectangle(t,i,r)),this.rectangle=n}Imagery.createPlaceholder=function(e){return(e=new Imagery(e,0,0,0)).addReference(),e.state=ImageryState$1.PLACEHOLDER,e},Imagery.prototype.addReference=function(){++this.referenceCount},Imagery.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.imageryLayer.removeImageryFromCache(this),defined(this.parent)&&this.parent.releaseReference(),defined(this.image)&&defined(this.image.destroy)&&this.image.destroy(),defined(this.texture)&&this.texture.destroy(),defined(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),destroyObject(this),0):this.referenceCount},Imagery.prototype.processStateMachine=function(e,t,i){this.state!==ImageryState$1.UNLOADED||i||(this.state=ImageryState$1.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===ImageryState$1.RECEIVED&&(this.state=ImageryState$1.TRANSITIONING,this.imageryLayer._createTexture(e.context,this)),i=this.state===ImageryState$1.READY&&t&&!this.texture,this.state!==ImageryState$1.TEXTURE_LOADED&&!i||(this.state=ImageryState$1.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var ImagerySplitDirection={LEFT:-1,NONE:0,RIGHT:1},ImagerySplitDirection$1=Object.freeze(ImagerySplitDirection);function TileImagery(e,t,i){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i}function ImageryLayer(e,t){this._imageryProvider=e,t=defaultValue(t,defaultValue.EMPTY_OBJECT),this.alpha=defaultValue(t.alpha,defaultValue(e.defaultAlpha,1)),this.nightAlpha=defaultValue(t.nightAlpha,defaultValue(e.defaultNightAlpha,1)),this.dayAlpha=defaultValue(t.dayAlpha,defaultValue(e.defaultDayAlpha,1)),this.brightness=defaultValue(t.brightness,defaultValue(e.defaultBrightness,ImageryLayer.DEFAULT_BRIGHTNESS)),this.contrast=defaultValue(t.contrast,defaultValue(e.defaultContrast,ImageryLayer.DEFAULT_CONTRAST)),this.hue=defaultValue(t.hue,defaultValue(e.defaultHue,ImageryLayer.DEFAULT_HUE)),this.saturation=defaultValue(t.saturation,defaultValue(e.defaultSaturation,ImageryLayer.DEFAULT_SATURATION)),this.gamma=defaultValue(t.gamma,defaultValue(e.defaultGamma,ImageryLayer.DEFAULT_GAMMA)),this.splitDirection=defaultValue(t.splitDirection,defaultValue(e.defaultSplit,ImageryLayer.DEFAULT_SPLIT)),this.minificationFilter=defaultValue(t.minificationFilter,defaultValue(e.defaultMinificationFilter,ImageryLayer.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=defaultValue(t.magnificationFilter,defaultValue(e.defaultMagnificationFilter,ImageryLayer.DEFAULT_MAGNIFICATION_FILTER)),this.show=defaultValue(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=defaultValue(t.rectangle,Rectangle.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new TileImagery(Imagery.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=defaultValue(t.colorToAlphaThreshold,ImageryLayer.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD)}TileImagery.prototype.freeResources=function(){defined(this.readyImagery)&&this.readyImagery.releaseReference(),defined(this.loadingImagery)&&this.loadingImagery.releaseReference()},TileImagery.prototype.processStateMachine=function(e,t,i){var r=this.loadingImagery,n=r.imageryLayer;if(r.processStateMachine(t,!this.useWebMercatorT,i),r.state===ImageryState$1.READY)return defined(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=n._calculateTextureTranslationAndScale(e,this),!0;for(var a,o=r.parent;defined(o)&&(o.state!==ImageryState$1.READY||!this.useWebMercatorT&&!defined(o.texture));)o.state!==ImageryState$1.FAILED&&o.state!==ImageryState$1.INVALID&&(a=a||o),o=o.parent;return this.readyImagery!==o&&(defined(this.readyImagery)&&this.readyImagery.releaseReference(),defined(this.readyImagery=o)&&(o.addReference(),this.textureTranslationAndScale=n._calculateTextureTranslationAndScale(e,this))),!(r.state!==ImageryState$1.FAILED&&r.state!==ImageryState$1.INVALID||defined(a)&&(a.processStateMachine(t,!this.useWebMercatorT,i),1))},Object.defineProperties(ImageryLayer.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}}}),ImageryLayer.DEFAULT_BRIGHTNESS=1,ImageryLayer.DEFAULT_CONTRAST=1,ImageryLayer.DEFAULT_HUE=0,ImageryLayer.DEFAULT_SATURATION=1,ImageryLayer.DEFAULT_GAMMA=1,ImageryLayer.DEFAULT_SPLIT=ImagerySplitDirection$1.NONE,ImageryLayer.DEFAULT_MINIFICATION_FILTER=TextureMinificationFilter$1.LINEAR,ImageryLayer.DEFAULT_MAGNIFICATION_FILTER=TextureMagnificationFilter$1.LINEAR,ImageryLayer.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,ImageryLayer.prototype.isBaseLayer=function(){return this._isBaseLayer},ImageryLayer.prototype.isDestroyed=function(){return!1},ImageryLayer.prototype.destroy=function(){return destroyObject(this)};var imageryBoundsScratch=new Rectangle,tileImageryBoundsScratch=new Rectangle,clippedRectangleScratch=new Rectangle,terrainRectangleScratch=new Rectangle;function getSamplerKey(e,t,i){return e+":"+t+":"+i}function getImageryCacheKey(e,t,i){return JSON.stringify([e,t,i])}ImageryLayer.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then((function(){return Rectangle.intersection(e.rectangle,t)}))},ImageryLayer.prototype._createTileImagerySkeletons=function(e,t,i){var r=e.data;if(defined(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel)return!1;if(defined(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;var n=this._imageryProvider;if(defined(i)||(i=r.imagery.length),!n.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),r.imagery.splice(i,0,this._skeletonPlaceholder),!0;var a=n.tilingScheme.projection instanceof WebMercatorProjection&&e.rectangle.north<WebMercatorProjection.MaximumLatitude&&e.rectangle.south>-WebMercatorProjection.MaximumLatitude,o=Rectangle.intersection(n.rectangle,this._rectangle,imageryBoundsScratch);if(!defined(c=Rectangle.intersection(e.rectangle,o,tileImageryBoundsScratch))){if(!this.isBaseLayer())return!1;var s=o,l=e.rectangle,c=tileImageryBoundsScratch;l.south>=s.north?c.north=c.south=s.north:l.north<=s.south?c.north=c.south=s.south:(c.south=Math.max(l.south,s.south),c.north=Math.min(l.north,s.north)),l.west>=s.east?c.west=c.east=s.east:l.east<=s.west?c.west=c.east=s.west:(c.west=Math.max(l.west,s.west),c.east=Math.min(l.east,s.east))}s=0,0<c.south?s=c.south:c.north<0&&(s=c.north);var u=getLevelWithMaximumTexelSpacing(this,+t.getLevelMaximumGeometricError(e.level),s);u=Math.max(0,u);(s=n.maximumLevel)<u&&(u=s),!defined(n.minimumLevel)||u<(s=n.minimumLevel)&&(u=s);var d=(n=n.tilingScheme).positionToTileXY(Rectangle.northwest(c),u),h=n.positionToTileXY(Rectangle.southeast(c),u),p=e.rectangle.width/512,f=e.rectangle.height/512;c=n.tileXYToRectangle(d.x,d.y,u);Math.abs(c.south-e.rectangle.north)<f&&d.y<h.y&&++d.y,Math.abs(c.east-e.rectangle.west)<p&&d.x<h.x&&++d.x,c=n.tileXYToRectangle(h.x,h.y,u),Math.abs(c.north-e.rectangle.south)<f&&h.y>d.y&&--h.y,Math.abs(c.west-e.rectangle.east)<p&&h.x>d.x&&--h.x;var m,g,y=Rectangle.clone(e.rectangle,terrainRectangleScratch),_=n.tileXYToRectangle(d.x,d.y,u),v=Rectangle.intersection(_,o,clippedRectangleScratch);a?(n.rectangleToNativeRectangle(y,y),n.rectangleToNativeRectangle(_,_),n.rectangleToNativeRectangle(v,v),n.rectangleToNativeRectangle(o,o),m=n.tileXYToNativeRectangle.bind(n),p=y.width/512,f=y.height/512):m=n.tileXYToRectangle.bind(n);var C=0,x=1;!this.isBaseLayer()&&Math.abs(v.west-y.west)>=p&&(C=Math.min(1,(v.west-y.west)/y.width)),!this.isBaseLayer()&&Math.abs(v.north-y.north)>=f&&(x=Math.max(0,(v.north-y.south)/y.height));for(var b=x,S=d.x;S<=h.x;S++)if(g=C,_=m(S,d.y,u),defined(v=Rectangle.simpleIntersection(_,o,clippedRectangleScratch))){C=Math.min(1,(v.east-y.west)/y.width),S===h.x&&(this.isBaseLayer()||Math.abs(v.east-y.east)<p)&&(C=1),x=b;for(var T=d.y;T<=h.y;T++){var E,w=x;_=m(S,T,u);defined(v=Rectangle.simpleIntersection(_,o,clippedRectangleScratch))&&(x=Math.max(0,(v.south-y.south)/y.height),T===h.y&&(this.isBaseLayer()||Math.abs(v.south-y.south)<f)&&(x=0),E=new Cartesian4(g,x,C,w),w=this.getImageryFromCache(S,T,u),r.imagery.splice(i,0,new TileImagery(w,E,a)),++i)}}return!0},ImageryLayer.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyImagery.rectangle,r=e.rectangle;t.useWebMercatorT&&(i=(a=t.readyImagery.imageryLayer.imageryProvider.tilingScheme).rectangleToNativeRectangle(i,imageryBoundsScratch),r=a.rectangleToNativeRectangle(r,terrainRectangleScratch));var n=r.width,a=(e=r.height,t=n/i.width,e/i.height);return new Cartesian4(t*(r.west-i.west)/n,a*(r.south-i.south)/e,t,a)},ImageryLayer.prototype._requestImagery=function(e){var t=this._imageryProvider,i=this;function r(t){if(!defined(t))return n();e.image=t,e.state=ImageryState$1.RECEIVED,e.request=void 0,TileProviderError.handleSuccess(i._requestImageError)}function n(r){if(e.request.state===RequestState$1.CANCELLED)return e.state=ImageryState$1.UNLOADED,void(e.request=void 0);e.state=ImageryState$1.FAILED,e.request=void 0;var n="Failed to obtain image tile X: "+e.x+" Y: "+e.y+" Level: "+e.level+".";i._requestImageError=TileProviderError.handleError(i._requestImageError,t,t.errorEvent,n,e.x,e.y,e.level,a,r)}function a(){var i=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.IMAGERY});if(e.request=i,e.state=ImageryState$1.TRANSITIONING,!defined(i=t.requestImage(e.x,e.y,e.level,i)))return e.state=ImageryState$1.UNLOADED,void(e.request=void 0);defined(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),when(i,r,n)}a()},ImageryLayer.prototype._createTextureWebGL=function(e,t){var i=new Sampler({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter});return defined((t=t.image).internalFormat)?new Texture({context:e,pixelFormat:t.internalFormat,width:t.width,height:t.height,source:{arrayBufferView:t.bufferView},sampler:i}):new Texture({context:e,source:t,pixelFormat:this._imageryProvider.hasAlphaChannel?PixelFormat$1.RGBA:PixelFormat$1.RGB,sampler:i})},ImageryLayer.prototype._createTexture=function(e,t){var i=this._imageryProvider,r=t.image;if(defined(i.tileDiscardPolicy)){var n=i.tileDiscardPolicy;if(defined(n)){if(!n.isReady())return void(t.state=ImageryState$1.RECEIVED);if(n.shouldDiscardImage(r))return void(t.state=ImageryState$1.INVALID)}}e=this._createTextureWebGL(e,t),i.tilingScheme.projection instanceof WebMercatorProjection?t.textureWebMercator=e:t.texture=e,t.image=void 0,t.state=ImageryState$1.TEXTURE_LOADED},ImageryLayer.prototype._finalizeReprojectTexture=function(e,t){var i,r,n,a,o=this.minificationFilter,s=this.magnificationFilter;o===TextureMinificationFilter$1.LINEAR&&s===TextureMagnificationFilter$1.LINEAR&&!PixelFormat$1.isCompressedFormat(t.pixelFormat)&&CesiumMath.isPowerOfTwo(t.width)&&CesiumMath.isPowerOfTwo(t.height)?(o=TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR,a=ContextLimits.maximumTextureFilterAnisotropy,i=getSamplerKey(o,s,n=Math.min(a,defaultValue(this._maximumAnisotropy,a))),defined(r=e.cache.imageryLayerMipmapSamplers)||(r={},e.cache.imageryLayerMipmapSamplers=r),defined(a=r[i])||(a=r[i]=new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:o,magnificationFilter:s,maximumAnisotropy:n})),t.generateMipmap(MipmapHint$1.NICEST),t.sampler=a):(n=getSamplerKey(o,s,0),defined(a=e.cache.imageryLayerNonMipmapSamplers)||(a={},e.cache.imageryLayerNonMipmapSamplers=a),defined(e=a[n])||(e=a[n]=new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:o,magnificationFilter:s})),t.sampler=e)},ImageryLayer.prototype._reprojectTexture=function(e,t,i){var r,n=t.textureWebMercator||t.texture,a=t.rectangle,o=e.context;(i=defaultValue(i,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof GeographicProjection)&&1e-5<a.width/n.width?(r=this,t.addReference(),a=new ComputeCommand({persists:!0,owner:this,preExecute:function(e){reprojectToGeographic(e,o,n,t.rectangle)},postExecute:function(e){t.texture=e,r._finalizeReprojectTexture(o,e),t.state=ImageryState$1.READY,t.releaseReference()},canceled:function(){t.state=ImageryState$1.TEXTURE_LOADED,t.releaseReference()}}),this._reprojectComputeCommands.push(a)):(i&&(t.texture=n),this._finalizeReprojectTexture(o,n),t.state=ImageryState$1.READY)},ImageryLayer.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,r=0;r<i;++r)e.commandList.push(t[r]);t.length=0},ImageryLayer.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach((function(e){defined(e.canceled)&&e.canceled()})),this._reprojectComputeCommands.length=0},ImageryLayer.prototype.getImageryFromCache=function(e,t,i,r){var n=getImageryCacheKey(e,t,i),a=this._imageryCache[n];return defined(a)||(a=new Imagery(this,e,t,i,r),this._imageryCache[n]=a),a.addReference(),a},ImageryLayer.prototype.removeImageryFromCache=function(e){e=getImageryCacheKey(e.x,e.y,e.level),delete this._imageryCache[e]};var uniformMap={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new Cartesian2,texture:void 0},float32ArrayScratch=FeatureDetection.supportsTypedArrays()?new Float32Array(128):void 0;function reprojectToGeographic(e,t,i,r){var n=t.cache.imageryLayer_reproject;if(!defined(n)){n=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){defined(this.framebuffer)&&this.framebuffer.destroy(),defined(this.vertexArray)&&this.vertexArray.destroy(),defined(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var a=new Float32Array(256),o=0,s=0;s<64;++s){var l=s/63;a[o++]=0,a[o++]=l,a[o++]=1,a[o++]=l}var c={position:0,webMercatorT:1},u=TerrainProvider.getRegularGridIndices(2,64);u=Buffer$1.createIndexBuffer({context:t,typedArray:u,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT});n.vertexArray=new VertexArray({context:t,attributes:[{index:c.position,vertexBuffer:Buffer$1.createVertexBuffer({context:t,typedArray:a,usage:BufferUsage$1.STATIC_DRAW}),componentsPerAttribute:2},{index:c.webMercatorT,vertexBuffer:Buffer$1.createVertexBuffer({context:t,sizeInBytes:512,usage:BufferUsage$1.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:u}),u=new ShaderSource({sources:[ReprojectWebMercatorVS]}),n.shaderProgram=ShaderProgram.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:ReprojectWebMercatorFS,attributeLocations:c}),n.sampler=new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR})}i.sampler=n.sampler,u=i.width,c=i.height,uniformMap.textureDimensions.x=u,uniformMap.textureDimensions.y=c,uniformMap.texture=i;var d=Math.sin(r.south),h=.5*Math.log((1+d)/(1-d));d=Math.sin(r.north);var p=1/(.5*Math.log((1+d)/(1-d))-h);i=new Texture({context:t,width:u,height:c,pixelFormat:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha});CesiumMath.isPowerOfTwo(u)&&CesiumMath.isPowerOfTwo(c)&&i.generateMipmap(MipmapHint$1.NICEST);for(var f=r.south,m=r.north,g=float32ArrayScratch,y=0,_=0;_<64;++_){var v=_/63;v=CesiumMath.lerp(f,m,v),d=Math.sin(v),v=(.5*Math.log((1+d)/(1-d))-h)*p;g[y++]=v,g[y++]=v}n.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(g),e.shaderProgram=n.shaderProgram,e.outputTexture=i,e.uniformMap=uniformMap,e.vertexArray=n.vertexArray}function getLevelWithMaximumTexelSpacing(e,t,i){var r=e._imageryProvider,n=r.tilingScheme,a=n.ellipsoid;e=e._imageryProvider.tilingScheme.projection instanceof GeographicProjection?1:Math.cos(i),i=n.rectangle,t=a.maximumRadius*i.width*e/(r.tileWidth*n.getNumberOfXTilesAtLevel(0))/t,t=Math.log(t)/Math.log(2);return 0|Math.round(t)}var TileSelectionResult={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=TileSelectionResult.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}};function TerrainFillMesh(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new Cartesian4}TerrainFillMesh.prototype.update=function(e,t,i){this.changedThisFrame&&(createFillMesh(e,t,this.tile,i),this.changedThisFrame=!1)},TerrainFillMesh.prototype.destroy=function(e){defined(this.vertexArray)&&(defined(e)?e.push(this.vertexArray):GlobeSurfaceTile._freeVertexArray(this.vertexArray,e),this.vertexArray=void 0),defined(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};var traversalQueueScratch=new Queue;function visitRenderedTiles(e,t,i,r,n,a,o,s,l){if(void 0!==r){for(var c=r;c&&(c._lastSelectionResultFrame!==n||TileSelectionResult.wasKicked(c._lastSelectionResult)||TileSelectionResult.originalResult(c._lastSelectionResult)===TileSelectionResult.CULLED);){if(o)return;var u=c.parent;if(a>=TileEdge.NORTHWEST&&void 0!==u)switch(a){case TileEdge.NORTHWEST:c=c===u.northwestChild?u:void 0;break;case TileEdge.NORTHEAST:c=c===u.northeastChild?u:void 0;break;case TileEdge.SOUTHWEST:c=c===u.southwestChild?u:void 0;break;case TileEdge.SOUTHEAST:c=c===u.southeastChild?u:void 0}else c=u}if(void 0!==c){if(c._lastSelectionResult===TileSelectionResult.RENDERED)return!defined(c.data.vertexArray)&&void visitTile$2(e,t,i,c,a,n,s,l);if(TileSelectionResult.originalResult(r._lastSelectionResult)!==TileSelectionResult.CULLED)switch(a){case TileEdge.WEST:visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l);break;case TileEdge.EAST:visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l);break;case TileEdge.SOUTH:visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l);break;case TileEdge.NORTH:visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l);break;case TileEdge.NORTHWEST:visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l);break;case TileEdge.NORTHEAST:visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l);break;case TileEdge.SOUTHWEST:visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l);break;case TileEdge.SOUTHEAST:visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l);break;default:throw new DeveloperError("Invalid edge")}}}}function visitTile$2(e,t,i,r,n,a,o,s){var l=r.data;if(void 0===l.fill)l.fill=new TerrainFillMesh(r);else if(l.fill.visitedFrame===a)return;l.fill.enqueuedFrame!==a&&(l.fill.enqueuedFrame=a,l.fill.changedThisFrame=!1,o.enqueue(r)),propagateEdge(e,t,i,r,n,s)}function propagateEdge(e,t,i,r,n,a){var o,s,l,c,u,d=r.data.fill,h=defined(h=i.data.fill)?(h.visitedFrame=t.frameNumber,h.changedThisFrame&&(createFillMesh(e,t,i,a),h.changedThisFrame=!1),i.data.fill.mesh):i.data.mesh;switch(n){case TileEdge.WEST:o=d.westMeshes,s=d.westTiles;break;case TileEdge.SOUTH:o=d.southMeshes,s=d.southTiles;break;case TileEdge.EAST:o=d.eastMeshes,s=d.eastTiles;break;case TileEdge.NORTH:o=d.northMeshes,s=d.northTiles;break;case TileEdge.NORTHWEST:return d.changedThisFrame=d.changedThisFrame||d.northwestMesh!==h,d.northwestMesh=h,void(d.northwestTile=i);case TileEdge.NORTHEAST:return d.changedThisFrame=d.changedThisFrame||d.northeastMesh!==h,d.northeastMesh=h,void(d.northeastTile=i);case TileEdge.SOUTHWEST:return d.changedThisFrame=d.changedThisFrame||d.southwestMesh!==h,d.southwestMesh=h,void(d.southwestTile=i);case TileEdge.SOUTHEAST:return d.changedThisFrame=d.changedThisFrame||d.southeastMesh!==h,d.southeastMesh=h,void(d.southeastTile=i)}if(i.level<=r.level)return d.changedThisFrame=d.changedThisFrame||o[0]!==h||1!==o.length,o[0]=h,s[0]=i,o.length=1,void(s.length=1);var p,f=i.rectangle;r=r.rectangle;switch(n){case TileEdge.WEST:for(p=(r.north-r.south)*CesiumMath.EPSILON5,l=0;l<s.length&&(u=s[l].rectangle,!CesiumMath.greaterThan(f.north,u.south,p));++l);for(c=l;c<s.length&&(u=s[c].rectangle,!CesiumMath.greaterThanOrEquals(f.south,u.north,p));++c);break;case TileEdge.SOUTH:for(p=(r.east-r.west)*CesiumMath.EPSILON5,l=0;l<s.length&&(u=s[l].rectangle,!CesiumMath.lessThan(f.west,u.east,p));++l);for(c=l;c<s.length&&(u=s[c].rectangle,!CesiumMath.lessThanOrEquals(f.east,u.west,p));++c);break;case TileEdge.EAST:for(p=(r.north-r.south)*CesiumMath.EPSILON5,l=0;l<s.length&&(u=s[l].rectangle,!CesiumMath.lessThan(f.south,u.north,p));++l);for(c=l;c<s.length&&(u=s[c].rectangle,!CesiumMath.lessThanOrEquals(f.north,u.south,p));++c);break;case TileEdge.NORTH:for(p=(r.east-r.west)*CesiumMath.EPSILON5,l=0;l<s.length&&(u=s[l].rectangle,!CesiumMath.greaterThan(f.east,u.west,p));++l);for(c=l;c<s.length&&(u=s[c].rectangle,!CesiumMath.greaterThanOrEquals(f.west,u.east,p));++c);}c-l==1?(d.changedThisFrame=d.changedThisFrame||o[l]!==h,o[l]=h,s[l]=i):(d.changedThisFrame=!0,o.splice(l,c-l,h),s.splice(l,c-l,i))}TerrainFillMesh.updateFillTiles=function(e,t,i,r){var n=e._quadtree,a=n._levelZeroTiles,o=n._lastSelectionFrameNumber,s=traversalQueueScratch;s.clear();for(var l=0;l<t.length;++l)defined(t[l].data.vertexArray)&&s.enqueue(t[l]);for(var c=s.dequeue();void 0!==c;){var u=c.findTileToWest(a),d=c.findTileToSouth(a),h=c.findTileToEast(a),p=c.findTileToNorth(a);visitRenderedTiles(e,i,c,u,o,TileEdge.EAST,!1,s,r),visitRenderedTiles(e,i,c,d,o,TileEdge.NORTH,!1,s,r),visitRenderedTiles(e,i,c,h,o,TileEdge.WEST,!1,s,r),visitRenderedTiles(e,i,c,p,o,TileEdge.SOUTH,!1,s,r),d=u.findTileToNorth(a),p=u.findTileToSouth(a),u=h.findTileToNorth(a),h=h.findTileToSouth(a),visitRenderedTiles(e,i,c,d,o,TileEdge.SOUTHEAST,!1,s,r),visitRenderedTiles(e,i,c,u,o,TileEdge.SOUTHWEST,!1,s,r),visitRenderedTiles(e,i,c,p,o,TileEdge.NORTHEAST,!1,s,r),visitRenderedTiles(e,i,c,h,o,TileEdge.NORTHWEST,!1,s,r),c=s.dequeue()}};var cartographicScratch$3=new Cartographic,centerCartographicScratch=new Cartographic,cartesianScratch=new Cartesian3,normalScratch$5=new Cartesian3,octEncodedNormalScratch=new Cartesian2,uvScratch2=new Cartesian2,uvScratch=new Cartesian2;function HeightAndNormal(){this.height=0,this.encodedNormal=new Cartesian2}function fillMissingCorner(e,t,i,r,n,a,o,s,l){if(defined(n))return n;var c=defined(a)&&defined(o)?.5*(a.height+o.height):defined(a)?a.height:defined(o)?o.height:defined(s)?s.height:(c=o=0,defined(s=e.tile.data.tileBoundingRegion)&&(o=s.minimumHeight,c=s.maximumHeight),.5*(o+c));return getVertexWithHeightAtCorner(e,t,i,r,c,l),l}var heightRangeScratch={minimumHeight:0,maximumHeight:0},swVertexScratch=new HeightAndNormal,seVertexScratch=new HeightAndNormal,nwVertexScratch=new HeightAndNormal,neVertexScratch=new HeightAndNormal,heightmapBuffer="undefined"!=typeof Uint8Array?new Uint8Array(81):void 0;function createFillMesh(e,t,i,r){GlobeSurfaceTile.initialize(i,e.terrainProvider,e._imageryLayers);var n=i.data,a=n.fill,o=i.rectangle,s=getCorner(a,A=i.tilingScheme.ellipsoid,0,1,a.northwestTile,a.northwestMesh,a.northTiles,a.northMeshes,a.westTiles,a.westMeshes,nwVertexScratch),l=getCorner(a,A,0,0,a.southwestTile,a.southwestMesh,a.westTiles,a.westMeshes,a.southTiles,a.southMeshes,swVertexScratch),c=getCorner(a,A,1,0,a.southeastTile,a.southeastMesh,a.southTiles,a.southMeshes,a.eastTiles,a.eastMeshes,seVertexScratch),u=(s=fillMissingCorner(a,A,0,1,s,l,u=getCorner(a,A,1,1,a.northeastTile,a.northeastMesh,a.eastTiles,a.eastMeshes,a.northTiles,a.northMeshes,neVertexScratch),c,nwVertexScratch),l=fillMissingCorner(a,A,0,0,l,s,c,u,swVertexScratch),c=fillMissingCorner(a,A,1,1,c,l,u,s,seVertexScratch),fillMissingCorner(a,A,1,1,u,c,s,l,neVertexScratch)),d=l.height,h=c.height,p=s.height,f=u.height,m=Math.min(d,h,p,f),g=Math.max(d,h,p,f),y=.5*(m+g);d=e.getLevelMaximumGeometricError(i.level),h=A.maximumRadius-d,p=4*Math.acos(h/A.maximumRadius);if(p*=1.5,o.width>p&&g-m<=d){var _=new HeightmapTerrainData({width:9,height:9,buffer:heightmapBuffer,structure:{heightOffset:g}});a.mesh=_._createMeshSync(i.tilingScheme,i.x,i.y,i.level,1)}else{var v=new TerrainEncoding(void 0,void 0,void 0,void 0,!0,!0);(f=centerCartographicScratch).longitude=.5*(o.east+o.west),f.latitude=.5*(o.north+o.south),f.height=y,v.center=A.cartographicToCartesian(f,v.center);for(var C=5,x=a.westMeshes,b=0,S=x.length;b<S;++b)C+=x[b].eastIndicesNorthToSouth.length;for(b=0,S=(x=a.southMeshes).length;b<S;++b)C+=x[b].northIndicesWestToEast.length;for(b=0,S=(x=a.eastMeshes).length;b<S;++b)C+=x[b].westIndicesSouthToNorth.length;for(b=0,S=(x=a.northMeshes).length;b<S;++b)C+=x[b].southIndicesEastToWest.length;(h=heightRangeScratch).minimumHeight=m,h.maximumHeight=g;p=v.getStride(),_=0;var T=_=addEdge(a,A,v,d=new Float32Array(C*p),_=addVertexWithComputedPosition(A,o,v,d,0,0,1,s.height,s.encodedNormal,1,h),a.westTiles,a.westMeshes,TileEdge.EAST,h),E=_=addEdge(a,A,v,d,_=addVertexWithComputedPosition(A,o,v,d,_,0,0,l.height,l.encodedNormal,0,h),a.southTiles,a.southMeshes,TileEdge.NORTH,h),w=_=addEdge(a,A,v,d,_=addVertexWithComputedPosition(A,o,v,d,_,1,0,c.height,c.encodedNormal,0,h),a.eastTiles,a.eastMeshes,TileEdge.WEST,h);_=addEdge(a,A,v,d,_=addVertexWithComputedPosition(A,o,v,d,_,1,1,u.height,u.encodedNormal,1,h),a.northTiles,a.northMeshes,TileEdge.SOUTH,h),m=h.minimumHeight,g=h.maximumHeight,c=OrientedBoundingBox.fromRectangle(o,m,g,i.tilingScheme.ellipsoid),u=WebMercatorProjection.geodeticLatitudeToMercatorAngle(o.south),h=1/(WebMercatorProjection.geodeticLatitudeToMercatorAngle(o.north)-u),h=(WebMercatorProjection.geodeticLatitudeToMercatorAngle(f.latitude)-u)*h,A.geodeticSurfaceNormalCartographic(cartographicScratch$3,normalScratch$5);var A=AttributeCompression.octEncode(normalScratch$5,octEncodedNormalScratch),P=_;v.encode(d,_*p,c.center,Cartesian2.fromElements(.5,.5,uvScratch),y,A,h);var D,M=++_;D=(h=3*(M-1))*(M<256?1:2)<=(d.length-M*p)*Float32Array.BYTES_PER_ELEMENT?(_=M*p*Float32Array.BYTES_PER_ELEMENT,new(M<256?Uint8Array:Uint16Array)(d.buffer,_,h)):new(M<256?Uint8Array:Uint16Array)(h),d=new Float32Array(d.buffer,0,M*p);var I=0;for(b=0;b<M-2;++b)D[I++]=P,D[I++]=b,D[I++]=b+1;D[I++]=P,D[I++]=b,D[I++]=0;var R=[];for(b=T;0<=b;--b)R.push(b);var O=[];for(b=E;T<=b;--b)O.push(b);var L=[];for(b=w;E<=b;--b)L.push(b);var N=[];for(N.push(0),b=P-1;w<=b;--b)N.push(b);a.mesh=new TerrainMesh(v.center,d,D,h,M,m,g,BoundingSphere.fromOrientedBoundingBox(c),computeOccludeePoint(e,c.center,o,m,g),v.getStride(),c,v,t.terrainExaggeration,R,O,L,N)}v=t.context,defined(a.vertexArray)&&(defined(r)?r.push(a.vertexArray):GlobeSurfaceTile._freeVertexArray(a.vertexArray)),a.vertexArray=GlobeSurfaceTile._createVertexArrayForMesh(v,a.mesh),n.processImagery(i,e.terrainProvider,t,!0),t=a.waterMaskTexture,a.waterMaskTexture=void 0,!e.terrainProvider.hasWaterMask||defined(e=n._findAncestorTileWithTerrainData(i))&&defined(e.data.waterMaskTexture)&&(a.waterMaskTexture=e.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,n._computeWaterMaskTranslationAndScale(i,e,a.waterMaskTranslationAndScale)),defined(t)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}function addVertexWithComputedPosition(e,t,i,r,n,a,o,s,l,c,u){var d=cartographicScratch$3;return d.longitude=CesiumMath.lerp(t.west,t.east,a),d.latitude=CesiumMath.lerp(t.south,t.north,o),d.height=s,e=e.cartographicToCartesian(d,cartesianScratch),(d=uvScratch2).x=a,d.y=o,i.encode(r,n*i.getStride(),e,d,s,l,c),u.minimumHeight=Math.min(u.minimumHeight,s),u.maximumHeight=Math.max(u.maximumHeight,s),n+1}var sourceRectangleScratch=new Rectangle;function transformTextureCoordinates(e,t,i,r){var n=e.rectangle,a=t.rectangle;0===t.x&&1===i.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?((n=Rectangle.clone(e.rectangle,sourceRectangleScratch)).west-=CesiumMath.TWO_PI,n.east-=CesiumMath.TWO_PI):0===e.x&&0===i.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&((n=Rectangle.clone(e.rectangle,sourceRectangleScratch)).west+=CesiumMath.TWO_PI,n.east+=CesiumMath.TWO_PI);var o=n.east-n.west,s=(a.west-n.west)/o;t=(a.east-n.west)/o,e=n.north-n.south,o=(a.south-n.south)/e,e=(a.north-n.south)/e,s=(i.x-s)/(t-s),o=(i.y-o)/(e-o);return Math.abs(s)<Math.EPSILON5?s=0:Math.abs(s-1)<Math.EPSILON5&&(s=1),Math.abs(o)<Math.EPSILON5?o=0:Math.abs(o-1)<Math.EPSILON5&&(o=1),r.x=s,r.y=o,r}var encodedNormalScratch=new Cartesian2;function getVertexFromTileAtCorner(e,t,i,r,n){var a=e.encoding;e=e.vertices;n.height=a.decodeHeight(e,t),a.hasVertexNormals?a.getOctEncodedNormal(e,t,n.encodedNormal):((n=n.encodedNormal).x=0,n.y=0)}var encodedNormalScratch2=new Cartesian2,cartesianScratch2=new Cartesian3;function getInterpolatedVertexAtCorner(e,t,i,r,n,a,o,s,l,c){var u,d=r.encoding,h=r.vertices;r=transformTextureCoordinates(t,i,d.decodeTextureCoordinates(h,n,uvScratch),uvScratch),t=transformTextureCoordinates(t,i,d.decodeTextureCoordinates(h,a,uvScratch2),uvScratch2),l=l?(o-r.x)/(t.x-r.x):(s-r.y)/(t.y-r.y),t=d.decodeHeight(h,n),r=d.decodeHeight(h,a),i=i.rectangle;cartographicScratch$3.longitude=CesiumMath.lerp(i.west,i.east,o),cartographicScratch$3.latitude=CesiumMath.lerp(i.south,i.north,s),c.height=cartographicScratch$3.height=CesiumMath.lerp(t,r,l),d.hasVertexNormals?(n=d.getOctEncodedNormal(h,n,encodedNormalScratch),u=d.getOctEncodedNormal(h,a,encodedNormalScratch2),n=AttributeCompression.octDecode(n.x,n.y,cartesianScratch),u=AttributeCompression.octDecode(u.x,u.y,cartesianScratch2),u=Cartesian3.lerp(n,u,l,cartesianScratch),Cartesian3.normalize(u,u)):u=e.geodeticSurfaceNormalCartographic(cartographicScratch$3,cartesianScratch),AttributeCompression.octEncode(u,c.encodedNormal)}function getVertexWithHeightAtCorner(e,t,i,r,n,a){a.height=n,t=t.geodeticSurfaceNormalCartographic(cartographicScratch$3,cartesianScratch),AttributeCompression.octEncode(t,a.encodedNormal)}function getCorner(e,t,i,r,n,a,o,s,l,c,u){return getCornerFromEdge(e,t,s,o,!1,i,r,u)||getCornerFromEdge(e,t,c,l,!0,i,r,u)?u:meshIsUsable(n,a)?(getVertexFromTileAtCorner(a,(0===i?0===r?a.eastIndicesNorthToSouth:a.southIndicesEastToWest:0===r?a.northIndicesWestToEast:a.westIndicesSouthToNorth)[0],i,r,u),u):defined(a=0===i?0===r?getClosestHeightToCorner(e.westMeshes,e.westTiles,TileEdge.EAST,e.southMeshes,e.southTiles,TileEdge.NORTH):getClosestHeightToCorner(e.northMeshes,e.northTiles,TileEdge.SOUTH,e.westMeshes,e.westTiles,TileEdge.EAST):0===r?getClosestHeightToCorner(e.southMeshes,e.southTiles,TileEdge.NORTH,e.eastMeshes,e.eastTiles,TileEdge.WEST):getClosestHeightToCorner(e.eastMeshes,e.eastTiles,TileEdge.WEST,e.northMeshes,e.northTiles,TileEdge.SOUTH))?(getVertexWithHeightAtCorner(e,t,i,r,a,u),u):void 0}function getClosestHeightToCorner(e,t,i,r,n,a,o,s){return i=getNearestHeightOnEdge(e,t,!1,i),a=getNearestHeightOnEdge(r,n,!0,a),defined(i)&&defined(a)?.5*(i+a):defined(i)?i:a}function addEdge(e,t,i,r,n,a,o,s,l){for(var c=0;c<a.length;++c)n=addEdgeMesh(e,t,i,r,n,a[c],o[c],s,l);return n}function addEdgeMesh(e,t,i,r,n,a,o,s,l){var c=a.rectangle;s===TileEdge.EAST&&0===e.tile.x?((c=Rectangle.clone(a.rectangle,sourceRectangleScratch)).west-=CesiumMath.TWO_PI,c.east-=CesiumMath.TWO_PI):s===TileEdge.WEST&&0===a.x&&((c=Rectangle.clone(a.rectangle,sourceRectangleScratch)).west+=CesiumMath.TWO_PI,c.east+=CesiumMath.TWO_PI);var u,d,h,p,f=e.tile.rectangle;switch(0<n&&(i.decodeTextureCoordinates(r,n-1,uvScratch),u=uvScratch.x,d=uvScratch.y),s){case TileEdge.WEST:h=o.westIndicesSouthToNorth,p=!1;break;case TileEdge.NORTH:h=o.northIndicesWestToEast,p=!0;break;case TileEdge.EAST:h=o.eastIndicesNorthToSouth,p=!1;break;case TileEdge.SOUTH:h=o.southIndicesEastToWest,p=!0}var m,g,y=a,_=e.tile,v=o.encoding,C=o.vertices,x=i.getStride();v.hasWebMercatorT&&(m=WebMercatorProjection.geodeticLatitudeToMercatorAngle(f.south),g=1/(WebMercatorProjection.geodeticLatitudeToMercatorAngle(f.north)-m));for(var b=0;b<h.length;++b){var S=h[b],T=v.decodeTextureCoordinates(C,S,uvScratch);transformTextureCoordinates(y,_,T,T);var E,w=T.x,A=T.y,P=p?w:A;P<0||1<P||Math.abs(w-u)<CesiumMath.EPSILON5&&Math.abs(A-d)<CesiumMath.EPSILON5||(P=Math.abs(w)<CesiumMath.EPSILON5||Math.abs(w-1)<CesiumMath.EPSILON5,w=Math.abs(A)<CesiumMath.EPSILON5||Math.abs(A-1)<CesiumMath.EPSILON5,P&&w||(P=v.decodePosition(C,S,cartesianScratch),w=v.decodeHeight(C,S),v.hasVertexNormals?E=v.getOctEncodedNormal(C,S,octEncodedNormalScratch):((E=octEncodedNormalScratch).x=0,E.y=0),S=A,v.hasWebMercatorT&&(A=CesiumMath.lerp(f.south,f.north,A),S=(WebMercatorProjection.geodeticLatitudeToMercatorAngle(A)-m)*g),i.encode(r,n*x,P,T,w,E,S),l.minimumHeight=Math.min(l.minimumHeight,w),l.maximumHeight=Math.max(l.maximumHeight,w),++n))}return n}function getNearestHeightOnEdge(e,t,i,r,n,a){for(var o,s,l=i?(o=0,s=e.length,1):(o=e.length-1,s=-1),c=o;c!==s;c+=l){var u,d=e[c];if(meshIsUsable(t[c],d)){switch(r){case TileEdge.WEST:u=d.westIndicesSouthToNorth;break;case TileEdge.SOUTH:u=d.southIndicesEastToWest;break;case TileEdge.EAST:u=d.eastIndicesNorthToSouth;break;case TileEdge.NORTH:u=d.northIndicesWestToEast}var h=u[i?0:u.length-1];if(defined(h))return d.encoding.decodeHeight(d.vertices,h)}}}function meshIsUsable(e,t){return defined(t)&&(!defined(e.data.fill)||!e.data.fill.changedThisFrame)}function getCornerFromEdge(e,t,i,r,n,a,o,s){var l,c,u,d=r[n?0:i.length-1],h=i[n?0:i.length-1];if(meshIsUsable(d,h)&&(u=0===a?0===o?(l=n?h.northIndicesWestToEast:h.eastIndicesNorthToSouth,c=n):(l=n?h.eastIndicesNorthToSouth:h.southIndicesEastToWest,c=!n,!1):0===o?(l=n?h.westIndicesSouthToNorth:h.northIndicesWestToEast,c=!n,!0):(l=n?h.southIndicesEastToWest:h.westIndicesSouthToNorth,!(c=n)),0<l.length)){if(i=l[r=n?0:l.length-1],h.encoding.decodeTextureCoordinates(h.vertices,i,uvScratch),(n=transformTextureCoordinates(d,e.tile,uvScratch,uvScratch)).x===a&&n.y===o)return getVertexFromTileAtCorner(h,i,a,o,s),!0;if(!((r=binarySearch(l,c?a:o,(function(t,i){return h.encoding.decodeTextureCoordinates(h.vertices,t,uvScratch),t=transformTextureCoordinates(d,e.tile,uvScratch,uvScratch),u?c?t.x-a:t.y-o:c?a-t.x:o-t.y})))<0))return getVertexFromTileAtCorner(h,l[r],a,o,s),!0;if(0<(r=~r)&&r<l.length)return getInterpolatedVertexAtCorner(t,d,e.tile,h,l[r-1],l[r],a,o,c,s),!0}return!1}var cornerPositionsScratch=[new Cartesian3,new Cartesian3,new Cartesian3,new Cartesian3];function computeOccludeePoint(e,t,i,r,n,a){var o=e.quadtree._occluders.ellipsoid,s=o.ellipsoid;e=cornerPositionsScratch;return Cartesian3.fromRadians(i.west,i.south,n,s,e[0]),Cartesian3.fromRadians(i.east,i.south,n,s,e[1]),Cartesian3.fromRadians(i.west,i.north,n,s,e[2]),Cartesian3.fromRadians(i.east,i.north,n,s,e[3]),o.computeHorizonCullingPointPossiblyUnderEllipsoid(t,e,r,a)}function GlobeSurfaceTileProvider(e){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=ShadowMode$1.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new Event,this._imageryLayers.layerAdded.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new Event,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new Color(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=Rectangle.clone(Rectangle.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1}function sortTileImageryByLayerIndex(e,t){var i=e.loadingImagery;return defined(i)||(i=e.readyImagery),defined(e=t.loadingImagery)||(e=t.readyImagery),i.imageryLayer._layerIndex-e.imageryLayer._layerIndex}function updateCredits(e,t){var i=t.creditDisplay;e._terrainProvider.ready&&defined(e._terrainProvider.credit)&&i.addCredit(e._terrainProvider.credit);for(var r=e._imageryLayers,n=0,a=r.length;n<a;++n){var o=r.get(n).imageryProvider;o.ready&&defined(o.credit)&&i.addCredit(o.credit)}}function pushCommand(e,t){var i,r=t.globeTranslucencyState;r.translucent?(i=e.renderState.blending.enabled,r.pushDerivedCommands(e,i,t)):t.commandList.push(e)}Object.defineProperties(GlobeSurfaceTileProvider.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=Cartesian4.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,defined(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ClippingPlaneCollection.setOwner(e,this,"_clippingPlanes")}}}),GlobeSurfaceTileProvider.prototype.update=function(e){this._imageryLayers._update()},GlobeSurfaceTileProvider.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile((function(e){e.data.imagery.sort(sortTileImageryByLayerIndex)}))),updateCredits(this,e);for(var t=this._vertexArraysToDestroy,i=t.length,r=0;r<i;++r)GlobeSurfaceTile._freeVertexArray(t[r]);t.length=0},GlobeSurfaceTileProvider.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,r=t.length;i<r;++i){var n=t[i];defined(n)&&(n.length=0)}var a=this._clippingPlanes;defined(a)&&a.enabled&&a.update(e),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1},GlobeSurfaceTileProvider.prototype.endUpdate=function(e){var t;defined(this._renderState)||(this._renderState=RenderState.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:DepthFunction$1.LESS}}),this._blendRenderState=RenderState.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:DepthFunction$1.LESS_OR_EQUAL},blending:BlendingState$1.ALPHA_BLEND}),(t=clone(this._renderState,!0)).cull.enabled=!1,this._disableCullingRenderState=RenderState.fromCache(t),(t=clone(this._blendRenderState,!0)).cull.enabled=!1,this._disableCullingBlendRenderState=RenderState.fromCache(t)),this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&TerrainFillMesh.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);for(var i=this._tilesToRenderByTextureCount,r=0,n=i.length;r<n;++r){var a=i[r];if(defined(a))for(var o=0,s=a.length;o<s;++o){var l=a[o],c=l.data.tileBoundingRegion;addDrawCommandsForTile(this,l,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,c.minimumHeight)}}},GlobeSurfaceTileProvider.prototype.updateForPick=function(e){for(var t=this._drawCommands,i=0,r=this._usedDrawCommands;i<r;++i)pushCommand(t[i],e)},GlobeSurfaceTileProvider.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},GlobeSurfaceTileProvider.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},GlobeSurfaceTileProvider.prototype.loadTile=function(e,t){var i,r=t.data,n=!0;defined(r)&&(n=r.boundingVolumeSourceTile!==t||t._lastSelectionResult===TileSelectionResult.CULLED_BUT_NEEDED,i=r.terrainState),GlobeSurfaceTile.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this._vertexArraysToDestroy,n),r=t.data,n&&i!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==Visibility$1.NONE&&r.boundingVolumeSourceTile===t&&(n=!1,GlobeSurfaceTile.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this._vertexArraysToDestroy,n))};var boundingSphereScratch$1=new BoundingSphere,rectangleIntersectionScratch=new Rectangle,splitCartographicLimitRectangleScratch=new Rectangle,rectangleCenterScratch$3=new Cartographic;function clipRectangleAntimeridian(e,t){return t.west<t.east||(t=Rectangle.clone(t,splitCartographicLimitRectangleScratch),0<Rectangle.center(e,rectangleCenterScratch$3).longitude?t.east=CesiumMath.PI:t.west=-CesiumMath.PI),t}function isUndergroundVisible(e,t){return!!t.cameraUnderground||(!!t.globeTranslucencyState.translucent||!e.backFaceCulling&&(!(!defined(t=e._clippingPlanes)||!t.enabled)||!Rectangle.equals(e.cartographicLimitRectangle,Rectangle.MAX_VALUE)))}GlobeSurfaceTileProvider.prototype.computeTileVisibility=function(e,t,i){var r=this.computeDistanceToTile(e,t);e._distance=r;var n=isUndergroundVisible(this,t);if(t.fog.enabled&&!n&&1<=CesiumMath.fog(r,t.fog.density))return Visibility$1.NONE;var a=e.data,o=a.tileBoundingRegion;if(void 0===a.boundingVolumeSourceTile)return Visibility$1.PARTIAL;var s,l=t.cullingVolume,c=a.orientedBoundingBox;return!defined(c)&&defined(a.renderedMesh)&&(c=a.renderedMesh.boundingSphere3D),a.clippedByBoundaries=!1,r=clipRectangleAntimeridian(e.rectangle,this.cartographicLimitRectangle),defined(r=Rectangle.simpleIntersection(r,e.rectangle,rectangleIntersectionScratch))?(Rectangle.equals(r,e.rectangle)||(a.clippedByBoundaries=!0),t.mode!==SceneMode$1.SCENE3D&&(c=boundingSphereScratch$1,BoundingSphere.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,o.minimumHeight,o.maximumHeight,c),Cartesian3.fromElements(c.center.z,c.center.x,c.center.y,c.center),t.mode===SceneMode$1.MORPHING&&defined(a.renderedMesh)&&(c=BoundingSphere.union(a.renderedMesh.boundingSphere3D,c,c))),defined(c)?defined(r=this._clippingPlanes)&&r.enabled&&(r=r.computeIntersectionWithBoundingVolume(c),e.isClipped=r!==Intersect$1.INSIDE,r===Intersect$1.OUTSIDE)?Visibility$1.NONE:((c=l.computeVisibility(c))===Intersect$1.OUTSIDE?s=Visibility$1.NONE:c===Intersect$1.INTERSECTING?s=Visibility$1.PARTIAL:c===Intersect$1.INSIDE&&(s=Visibility$1.FULL),s===Visibility$1.NONE?s:(c=t.mode===SceneMode$1.SCENE3D&&t.camera.frustum instanceof OrthographicFrustum,t.mode!==SceneMode$1.SCENE3D||c||!defined(i)||n||!defined(a=a.occludeePointInScaledSpace)||i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(a,o.minimumHeight)?s:Visibility$1.NONE)):Visibility$1.PARTIAL):Visibility$1.NONE},GlobeSurfaceTileProvider.prototype.canRefine=function(e){return!!defined(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};var readyImageryScratch=[],canRenderTraversalStack=[];GlobeSurfaceTileProvider.prototype.canRenderWithoutLosingDetail=function(e,t){var i=e.data,r=readyImageryScratch;r.length=this._imageryLayers.length;var n,a=!1,o=!1;for(defined(i)&&(a=i.terrainState===TerrainState$2.READY,o=!0,n=i.imagery),f=0,m=r.length;f<m;++f)r[f]=o;if(defined(n))for(f=0,m=n.length;f<m;++f){var s,l=!defined(l=(s=n[f]).loadingImagery)||l.state===ImageryState$1.FAILED||l.state===ImageryState$1.INVALID;r[s=(s.loadingImagery||s.readyImagery).imageryLayer._layerIndex]=l&&r[s]}var c=this.quadtree._lastSelectionFrameNumber,u=canRenderTraversalStack;for(u.length=0,u.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);0<u.length;){var d=u.pop(),h=d._lastSelectionResultFrame===c?d._lastSelectionResult:TileSelectionResult.NONE;if(h===TileSelectionResult.RENDERED){if(defined(d.data)){if(!a&&d.data.terrainState===TerrainState$2.READY)return!1;for(var p=d.data.imagery,f=0,m=p.length;f<m;++f){var g=!defined(g=(y=p[f]).loadingImagery)||g.state===ImageryState$1.FAILED||g.state===ImageryState$1.INVALID,y=(y.loadingImagery||y.readyImagery).imageryLayer._layerIndex;if(g&&!r[y])return!1}}}else h===TileSelectionResult.REFINED&&u.push(d.southwestChild,d.southeastChild,d.northwestChild,d.northeastChild)}return!0};var tileDirectionScratch=new Cartesian3;GlobeSurfaceTileProvider.prototype.computeTileLoadPriority=function(e,t){var i=e.data;if(void 0===i)return 0;var r=i.orientedBoundingBox;return void 0===r?0:(i=t.camera.positionWC,t=t.camera.directionWC,r=Cartesian3.subtract(r.center,i,tileDirectionScratch),(i=Cartesian3.magnitude(r))<CesiumMath.EPSILON5?0:(Cartesian3.divideByScalar(r,i,r),(1-Cartesian3.dot(r,t))*e._distance))};var modifiedModelViewScratch$3=new Matrix4,modifiedModelViewProjectionScratch=new Matrix4,tileRectangleScratch=new Cartesian4,localizedCartographicLimitRectangleScratch=new Cartesian4,localizedTranslucencyRectangleScratch=new Cartesian4,rtcScratch$3=new Cartesian3,centerEyeScratch=new Cartesian3,southwestScratch=new Cartesian3,northeastScratch=new Cartesian3;GlobeSurfaceTileProvider.prototype.showTileThisFrame=function(e,t){for(var i=0,r=e.data.imagery,n=0,a=r.length;n<a;++n){var o=r[n];defined(o.readyImagery)&&0!==o.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];defined(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e),defined(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0,++(e=this._debug).tilesRendered,e.texturesRendered+=i};var cornerPositionsScratch$1=[new Cartesian3,new Cartesian3,new Cartesian3,new Cartesian3];function computeOccludeePoint$1(e,t,i,r,n,a){var o=e.quadtree._occluders.ellipsoid,s=o.ellipsoid;e=cornerPositionsScratch$1;return Cartesian3.fromRadians(i.west,i.south,n,s,e[0]),Cartesian3.fromRadians(i.east,i.south,n,s,e[1]),Cartesian3.fromRadians(i.west,i.north,n,s,e[2]),Cartesian3.fromRadians(i.east,i.north,n,s,e[3]),o.computeHorizonCullingPointPossiblyUnderEllipsoid(t,e,r,a)}function updateTileBoundingRegion(e,t,i){var r=e.data;void 0===r&&(r=e.data=new GlobeSurfaceTile),void 0===r.tileBoundingRegion&&(r.tileBoundingRegion=new TileBoundingRegion({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:e.tilingScheme.ellipsoid,minimumHeight:0,maximumHeight:0}));var n=r.terrainData,a=r.mesh,o=r.tileBoundingRegion;if(void 0!==a&&void 0!==a.minimumHeight&&void 0!==a.maximumHeight)return o.minimumHeight=a.minimumHeight,o.maximumHeight=a.maximumHeight,e;if(void 0!==n&&void 0!==n._minimumHeight&&void 0!==n._maximumHeight)return o.minimumHeight=n._minimumHeight*i.terrainExaggeration,o.maximumHeight=n._maximumHeight*i.terrainExaggeration,e;o.minimumHeight=Number.NaN,o.maximumHeight=Number.NaN;for(var s=e.parent;void 0!==s;){var l=s.data;if(void 0!==l){var c=l.mesh;if(void 0!==c&&void 0!==c.minimumHeight&&void 0!==c.maximumHeight)return o.minimumHeight=c.minimumHeight,o.maximumHeight=c.maximumHeight,s;if(void 0!==(l=l.terrainData)&&void 0!==l._minimumHeight&&void 0!==l._maximumHeight)return o.minimumHeight=l._minimumHeight*i.terrainExaggeration,o.maximumHeight=l._maximumHeight*i.terrainExaggeration,s}s=s.parent}}function getTileReadyCallback(e,t,i){return function(r){for(var n=-1,a=r.data.imagery,o=a.length,s=0;s<o;++s)if((u=defaultValue((l=a[s]).readyImagery,l.loadingImagery)).imageryLayer===t){n=s;break}if(-1!==n){var l,c=n+e,u=defined(l=a[c])?defaultValue(l.readyImagery,l.loadingImagery):void 0;if(!defined(u)||u.imageryLayer!==t)return!t._createTileImagerySkeletons(r,i,c);for(s=n;s<c;++s)a[s].freeResources();a.splice(n,e)}return!0}}GlobeSurfaceTileProvider.prototype.computeDistanceToTile=function(e,t){var i=updateTileBoundingRegion(e,this.terrainProvider,t),r=e.data,n=r.tileBoundingRegion;if(void 0===i)return 9999999999;r.boundingVolumeSourceTile!==i&&(r.boundingVolumeSourceTile=i,defined(e.rectangle)&&(r.orientedBoundingBox=OrientedBoundingBox.fromRectangle(e.rectangle,n.minimumHeight,n.maximumHeight,e.tilingScheme.ellipsoid,r.orientedBoundingBox),r.occludeePointInScaledSpace=computeOccludeePoint$1(this,r.orientedBoundingBox.center,e.rectangle,n.minimumHeight,n.maximumHeight,r.occludeePointInScaledSpace)));var a=n.minimumHeight;i=n.maximumHeight;return r.boundingVolumeSourceTile!==e&&(r=t.camera.positionCartographic.height,e=Math.abs(r-a),Math.abs(r-i)<e?(n.minimumHeight=a,n.maximumHeight=a):(n.minimumHeight=i,n.maximumHeight=i)),t=n.distanceToCamera(t),n.minimumHeight=a,n.maximumHeight=i,t},GlobeSurfaceTileProvider.prototype.isDestroyed=function(){return!1},GlobeSurfaceTileProvider.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),destroyObject(this)},GlobeSurfaceTileProvider.prototype._onLayerAdded=function(e,t){var i,r,n,a;e.show&&(i=this._terrainProvider,r=this,n=e.imageryProvider,a=this._imageryLayersUpdatedEvent,n._reload=function(){e._imageryCache={},r._quadtree.forEachLoadedTile((function(t){if(!defined(t._loadedCallbacks[e._layerIndex])){for(var r,n=t.data.imagery,a=n.length,o=-1,s=0,l=0;l<a;++l){var c=n[l];if(defaultValue(c.readyImagery,c.loadingImagery).imageryLayer===e)-1===o&&(o=l),++s;else if(-1!==o)break}-1!==o&&(r=o+s,e._createTileImagerySkeletons(t,i,r)&&(t._loadedCallbacks[e._layerIndex]=getTileReadyCallback(s,e,i),t.state=QuadtreeTileLoadState$1.LOADING))}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=QuadtreeTileLoadState$1.LOADING,0===t.level||t._lastSelectionResultFrame===r.quadtree._lastSelectionFrameNumber&&t._lastSelectionResult===TileSelectionResult.RENDERED||(t.renderable=!1))})),this._layerOrderChanged=!0,a.raiseEvent())},GlobeSurfaceTileProvider.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.imagery,r=-1,n=0,a=0,o=i.length;a<o;++a){var s=i[a],l=s.loadingImagery;if(defined(l)||(l=s.readyImagery),l.imageryLayer===e)-1===r&&(r=a),s.freeResources(),++n;else if(-1!==r)break}-1!==r&&i.splice(r,n)})),defined(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()},GlobeSurfaceTileProvider.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},GlobeSurfaceTileProvider.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var scratchClippingPlanesMatrix$2=new Matrix4,scratchInverseTransposeClippingPlanesMatrix$1=new Matrix4,getDebugOrientedBoundingBox,getDebugBoundingSphere,debugDestroyPrimitive,omi,pmi,lmi,mmi,nmi;function createTileUniformMap(e,t){var i={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view,i=Matrix4.multiplyByPoint(t,this.properties.rtc,centerEyeScratch);return Matrix4.setTranslation(t,i,modifiedModelViewScratch$3),modifiedModelViewScratch$3},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection,r=Matrix4.multiplyByPoint(t,this.properties.rtc,centerEyeScratch);return Matrix4.setTranslation(t,r,modifiedModelViewProjectionScratch),Matrix4.multiply(i,modifiedModelViewProjectionScratch,modifiedModelViewProjectionScratch),modifiedModelViewProjectionScratch},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){var i=t._clippingPlanes;return defined(i)&&defined(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){var i=defined(i=t._clippingPlanes)?Matrix4.multiply(e.context.uniformState.view,i.modelMatrix,scratchClippingPlanesMatrix$2):Matrix4.IDENTITY;return Matrix4.inverseTranspose(i,scratchInverseTransposeClippingPlanesMatrix$1)},u_clippingPlanesEdgeStyle:function(){var e=this.properties.clippingPlanesEdgeColor;return e.alpha=this.properties.clippingPlanesEdgeWidth,e},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},properties:{initialColor:new Cartesian4(0,0,.5,1),fillHighlightColor:new Color(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new Cartesian2(65e5,9e6),nightFadeDistance:new Cartesian2(1e7,4e7),hsbShift:new Cartesian3,center3D:void 0,rtc:new Cartesian3,modifiedModelView:new Matrix4,tileRectangle:new Cartesian4,dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new Cartesian2,southMercatorYAndOneOverHeight:new Cartesian2,waterMask:void 0,waterMaskTranslationAndScale:new Cartesian4,minMaxHeight:new Cartesian2,scaleAndBias:new Matrix4,clippingPlanesEdgeColor:Color.clone(Color.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new Cartesian4,frontFaceAlphaByDistance:new Cartesian4,backFaceAlphaByDistance:new Cartesian4,localizedTranslucencyRectangle:new Cartesian4,undergroundColor:Color.clone(Color.TRANSPARENT),undergroundColorAlphaByDistance:new Cartesian4}};return defined(t.materialUniformMap)?combine(i,t.materialUniformMap):i}function createWireframeVertexArrayIfNecessary(e,t,i){var r,n;if(defined((i=i.data).vertexArray)?(r=i.mesh,n=i.vertexArray):defined(i.fill)&&defined(i.fill.vertexArray)&&(r=i.fill.mesh,n=i.fill.vertexArray),defined(r)&&defined(n)){if(defined(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===r)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=createWireframeVertexArray(e,n,r),i.wireframeVertexArray.mesh=r}}function createWireframeVertexArray(e,t,i){return i={indices:i.indices,primitiveType:PrimitiveType$1.TRIANGLES},GeometryPipeline.toWireframe(i),i=i.indices,i=Buffer$1.createIndexBuffer({context:e,typedArray:i,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.fromSizeInBytes(i.BYTES_PER_ELEMENT)}),new VertexArray({context:e,attributes:t._attributes,indexBuffer:i})}function qmi(e){return new Primitive({geometryInstances:e,appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})}lmi=new GeometryInstance({geometry:BoxOutlineGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2)})}),mmi=new GeometryInstance({geometry:new SphereOutlineGeometry({radius:1})}),nmi=new Matrix4,getDebugOrientedBoundingBox=function(e,t){return e===omi?pmi:(debugDestroyPrimitive(),omi=e,nmi=Matrix4.fromRotationTranslation(e.halfAxes,e.center,nmi),lmi.modelMatrix=nmi,lmi.attributes.color=ColorGeometryInstanceAttribute.fromColor(t),pmi=qmi(lmi))},getDebugBoundingSphere=function(e,t){return e===omi?pmi:(debugDestroyPrimitive(),omi=e,nmi=Matrix4.fromTranslation(e.center,nmi),nmi=Matrix4.multiplyByUniformScale(nmi,e.radius,nmi),mmi.modelMatrix=nmi,mmi.attributes.color=ColorGeometryInstanceAttribute.fromColor(t),pmi=qmi(mmi))},debugDestroyPrimitive=function(){defined(pmi)&&(pmi.destroy(),omi=pmi=void 0)};var otherPassesInitialColor=new Cartesian4(0,0,0,0),surfaceShaderSetOptionsScratch={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0},defaultUndergroundColor=Color.TRANSPARENT,defaultundergroundColorAlphaByDistance=new NearFarScalar;function addDrawCommandsForTile(e,t,i){var r=t.data;defined(r.vertexArray)||(void 0===r.fill&&(r.fill=new TerrainFillMesh(t)),r.fill.update(e,i));var n=i.creditDisplay,a=r.terrainData;if(defined(a)&&defined(a.credits))for(var o=a.credits,s=0,l=o.length;s<l;++s)n.addCredit(o[s]);var c=ContextLimits.maximumTextureImageUnits,u=r.waterMaskTexture,d=r.waterMaskTranslationAndScale;!defined(u)&&defined(r.fill)&&(u=r.fill.waterMaskTexture,d=r.fill.waterMaskTranslationAndScale);var h=i.cameraUnderground,p=i.globeTranslucencyState,f=p.translucent,m=p.frontFaceAlphaByDistance,g=p.backFaceAlphaByDistance,y=p.rectangle,_=defaultValue(e.undergroundColor,defaultUndergroundColor),v=defaultValue(e.undergroundColorAlphaByDistance,defaultundergroundColorAlphaByDistance),C=isUndergroundVisible(e,i)&&i.mode===SceneMode$1.SCENE3D&&0<_.alpha&&(0<v.nearValue||0<v.farValue),x=e.hasWaterMask&&defined(u),b=e.oceanNormalMap,S=x&&defined(b),T=e.terrainProvider.ready&&e.terrainProvider.hasVertexNormals,E=i.fog.enabled&&!h,w=e.showGroundAtmosphere&&i.mode===SceneMode$1.SCENE3D,A=ShadowMode$1.castShadows(e.shadows)&&!f,P=ShadowMode$1.receiveShadows(e.shadows)&&!f,D=e.hueShift,M=e.saturationShift,I=e.brightnessShift,R=!(CesiumMath.equalsEpsilon(D,0,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(M,0,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(I,0,CesiumMath.EPSILON7)),O=!1;w&&(N=Cartesian3.magnitude(i.camera.positionWC),O=e.nightFadeOutDistance<N),x&&--c,S&&--c,defined(i.shadowState)&&i.shadowState.shadowsEnabled&&--c,defined(e.clippingPlanes)&&e.clippingPlanes.enabled&&--c,c-=p.numberOfTextureUniforms;var L,N,F=r.renderedMesh,B=F.center,V=F.encoding,k=tileRectangleScratch,z=0,G=0,U=0,$=0,H=!1;i.mode!==SceneMode$1.SCENE3D&&(a=(L=i.mapProjection).project(Rectangle.southwest(t.rectangle),southwestScratch),N=L.project(Rectangle.northeast(t.rectangle),northeastScratch),k.x=a.x,k.y=a.y,k.z=N.x,k.w=N.y,i.mode!==SceneMode$1.MORPHING&&((B=rtcScratch$3).x=0,B.y=.5*(k.z+k.x),B.z=.5*(k.w+k.y),k.x-=B.y,k.y-=B.z,k.z-=B.y,k.w-=B.z),i.mode===SceneMode$1.SCENE2D&&V.quantization===TerrainQuantization$1.BITS12&&(a=1/(Math.pow(2,12)-1)*.5,N=(k.z-k.x)*a,a=(k.w-k.y)*a,k.x-=N,k.y-=a,k.z+=N,k.w+=a),L instanceof WebMercatorProjection&&(z=t.rectangle.south,G=t.rectangle.north,U=WebMercatorProjection.geodeticLatitudeToMercatorAngle(z),$=1/(WebMercatorProjection.geodeticLatitudeToMercatorAngle(G)-U),H=!0));var W=surfaceShaderSetOptionsScratch;W.frameState=i,W.surfaceTile=r,W.showReflectiveOcean=x,W.showOceanWaves=S,W.enableLighting=e.enableLighting,W.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,W.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,W.showGroundAtmosphere=w,W.perFragmentGroundAtmosphere=O,W.hasVertexNormals=T,W.useWebMercatorProjection=H,W.clippedByBoundaries=r.clippedByBoundaries;var j=r.imagery,q=0,Y=j.length,X=e.showSkirts&&!h&&!f,Q=(H=(T=e.backFaceCulling&&!h&&!f)?e._renderState:e._disableCullingRenderState,T?e._blendRenderState:e._disableCullingBlendRenderState),Z=H,J=e._firstPassInitialColor,K=i.context;if(defined(e._debug.boundingSphereTile)||debugDestroyPrimitive(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;for(var ee=e._drawCommands.length,te=0;te<ee;++te)e._uniformMaps[te]=createTileUniformMap(i,e)}do{var ie,re,ne=0;e._drawCommands.length<=e._usedDrawCommands?((ie=new DrawCommand).owner=t,ie.cull=!1,ie.boundingVolume=new BoundingSphere,ie.orientedBoundingBox=void 0,re=createTileUniformMap(i,e),e._drawCommands.push(ie),e._uniformMaps.push(re)):(ie=e._drawCommands[e._usedDrawCommands],re=e._uniformMaps[e._usedDrawCommands]),ie.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile&&(defined(ce=r.orientedBoundingBox)?getDebugOrientedBoundingBox(ce,Color.RED).update(i):defined(F)&&defined(F.boundingSphere3D)&&getDebugBoundingSphere(F.boundingSphere3D,Color.RED).update(i));var ae=re.properties;Cartesian4.clone(J,ae.initialColor),ae.oceanNormalMap=b,ae.lightingFadeDistance.x=e.lightingFadeOutDistance,ae.lightingFadeDistance.y=e.lightingFadeInDistance,ae.nightFadeDistance.x=e.nightFadeOutDistance,ae.nightFadeDistance.y=e.nightFadeInDistance,ae.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;var oe=h?m:g;defined(ue=h?g:m)&&(Cartesian4.fromElements(ue.near,ue.nearValue,ue.far,ue.farValue,ae.frontFaceAlphaByDistance),Cartesian4.fromElements(oe.near,oe.nearValue,oe.far,oe.farValue,ae.backFaceAlphaByDistance)),Cartesian4.fromElements(v.near,v.nearValue,v.far,v.farValue,ae.undergroundColorAlphaByDistance),Color.clone(_,ae.undergroundColor);var se=!defined(r.vertexArray)&&defined(e.fillHighlightColor)&&0<e.fillHighlightColor.alpha;se&&Color.clone(e.fillHighlightColor,ae.fillHighlightColor),ae.center3D=F.center,Cartesian3.clone(B,ae.rtc),Cartesian4.clone(k,ae.tileRectangle),ae.southAndNorthLatitude.x=z,ae.southAndNorthLatitude.y=G,ae.southMercatorYAndOneOverHeight.x=U,ae.southMercatorYAndOneOverHeight.y=$;var le=localizedCartographicLimitRectangleScratch,ce=clipRectangleAntimeridian(t.rectangle,e.cartographicLimitRectangle),ue=localizedTranslucencyRectangleScratch;oe=clipRectangleAntimeridian(t.rectangle,y);Cartesian3.fromElements(D,M,I,ae.hsbShift);var de=t.rectangle,he=1/de.width,pe=1/de.height;le.x=(ce.west-de.west)*he,le.y=(ce.south-de.south)*pe,le.z=(ce.east-de.west)*he,le.w=(ce.north-de.south)*pe,Cartesian4.clone(le,ae.localizedCartographicLimitRectangle),ue.x=(oe.west-de.west)*he,ue.y=(oe.south-de.south)*pe,ue.z=(oe.east-de.west)*he,ue.w=(oe.north-de.south)*pe,Cartesian4.clone(ue,ae.localizedTranslucencyRectangle);le=E&&CesiumMath.fog(t._distance,i.fog.density)>CesiumMath.EPSILON3,R=R&&(le||w);for(var fe=!1,me=!1,ge=!1,ye=!1,_e=!1,ve=!1,Ce=!1,xe=!1,be=!1,Se=!1;ne<c&&q<Y;){var Te=j[q],Ee=Te.readyImagery;if(++q,defined(Ee)&&0!==Ee.imageryLayer.alpha){var we=Te.useWebMercatorT?Ee.textureWebMercator:Ee.texture,Ae=Ee.imageryLayer;defined(Te.textureTranslationAndScale)||(Te.textureTranslationAndScale=Ae._calculateTextureTranslationAndScale(t,Te)),ae.dayTextures[ne]=we,ae.dayTextureTranslationAndScale[ne]=Te.textureTranslationAndScale,ae.dayTextureTexCoordsRectangle[ne]=Te.textureCoordinateRectangle,ae.dayTextureUseWebMercatorT[ne]=Te.useWebMercatorT,ae.dayTextureAlpha[ne]=Ae.alpha,ve=ve||1!==ae.dayTextureAlpha[ne],ae.dayTextureNightAlpha[ne]=Ae.nightAlpha,Ce=Ce||1!==ae.dayTextureNightAlpha[ne],ae.dayTextureDayAlpha[ne]=Ae.dayAlpha,Ce=Ce||1!==ae.dayTextureDayAlpha[ne],ae.dayTextureBrightness[ne]=Ae.brightness,fe=fe||ae.dayTextureBrightness[ne]!==ImageryLayer.DEFAULT_BRIGHTNESS,ae.dayTextureContrast[ne]=Ae.contrast,me=me||ae.dayTextureContrast[ne]!==ImageryLayer.DEFAULT_CONTRAST,ae.dayTextureHue[ne]=Ae.hue,ge=ge||ae.dayTextureHue[ne]!==ImageryLayer.DEFAULT_HUE,ae.dayTextureSaturation[ne]=Ae.saturation,ye=ye||ae.dayTextureSaturation[ne]!==ImageryLayer.DEFAULT_SATURATION,ae.dayTextureOneOverGamma[ne]=1/Ae.gamma,_e=_e||ae.dayTextureOneOverGamma[ne]!==1/ImageryLayer.DEFAULT_GAMMA,ae.dayTextureSplit[ne]=Ae.splitDirection,xe=xe||0!==ae.dayTextureSplit[ne],defined(Te=ae.dayTextureCutoutRectangles[ne])||(Te=ae.dayTextureCutoutRectangles[ne]=new Cartesian4),Cartesian4.clone(Cartesian4.ZERO,Te),defined(Ae.cutoutRectangle)&&(Pe=clipRectangleAntimeridian(de,Ae.cutoutRectangle),be=defined(Rectangle.simpleIntersection(Pe,de,rectangleIntersectionScratch))||be,Te.x=(Pe.west-de.west)*he,Te.y=(Pe.south-de.south)*pe,Te.z=(Pe.east-de.west)*he,Te.w=(Pe.north-de.south)*pe),defined(Te=ae.colorsToAlpha[ne])||(Te=ae.colorsToAlpha[ne]=new Cartesian4);var Pe=defined(Ae.colorToAlpha)&&0<Ae.colorToAlphaThreshold;Se=Se||Pe;if(Pe?(Pe=Ae.colorToAlpha,Te.x=Pe.red,Te.y=Pe.green,Te.z=Pe.blue,Te.w=Ae.colorToAlphaThreshold):Te.w=-1,defined(Ee.credits))for(var De=Ee.credits,Me=0,Ie=De.length;Me<Ie;++Me)n.addCredit(De[Me]);++ne}}ae.dayTextures.length=ne,ae.waterMask=u,Cartesian4.clone(d,ae.waterMaskTranslationAndScale),ae.minMaxHeight.x=V.minimumHeight,ae.minMaxHeight.y=V.maximumHeight,Matrix4.clone(V.matrix,ae.scaleAndBias),(ue=defined(oe=e._clippingPlanes)&&oe.enabled&&t.isClipped)&&(ae.clippingPlanesEdgeColor=Color.clone(oe.edgeColor,ae.clippingPlanesEdgeColor),ae.clippingPlanesEdgeWidth=oe.edgeWidth),W.numberOfDayTextures=ne,W.applyBrightness=fe,W.applyContrast=me,W.applyHue=ge,W.applySaturation=ye,W.applyGamma=_e,W.applyAlpha=ve,W.applyDayNightAlpha=Ce,W.applySplit=xe,W.enableFog=le,W.enableClippingPlanes=ue,W.clippingPlanes=oe,W.hasImageryLayerCutout=be,W.colorCorrect=R,W.highlightFillTile=se,W.colorToAlpha=Se,W.showUndergroundColor=C,W.translucent=f,ue=r.renderedMesh.indices.length,X||(ue=r.renderedMesh.indexCountWithoutSkirts),ie.shaderProgram=e._surfaceShaderSet.getShaderProgram(W),ie.castShadows=A,ie.receiveShadows=P,ie.renderState=Z,ie.primitiveType=PrimitiveType$1.TRIANGLES,ie.vertexArray=r.vertexArray||r.fill.vertexArray,ie.count=ue,ie.uniformMap=re,ie.pass=Pass$1.GLOBE,e._debug.wireframe&&(createWireframeVertexArrayIfNecessary(K,e,t),defined(r.wireframeVertexArray)&&(ie.vertexArray=r.wireframeVertexArray,ie.primitiveType=PrimitiveType$1.LINES,ie.count=2*ue)),oe=ie.boundingVolume,se=ie.orientedBoundingBox,i.mode!==SceneMode$1.SCENE3D?(ue=r.tileBoundingRegion,BoundingSphere.fromRectangleWithHeights2D(t.rectangle,i.mapProjection,ue.minimumHeight,ue.maximumHeight,oe),Cartesian3.fromElements(oe.center.z,oe.center.x,oe.center.y,oe.center),i.mode===SceneMode$1.MORPHING&&(oe=BoundingSphere.union(F.boundingSphere3D,oe,oe))):(ie.boundingVolume=BoundingSphere.clone(F.boundingSphere3D,oe),ie.orientedBoundingBox=OrientedBoundingBox.clone(r.orientedBoundingBox,se)),ie.dirty=!0,f&&p.updateDerivedCommands(ie,i),pushCommand(ie,i),Z=Q,J=otherPassesInitialColor}while(q<Y)}function GlobeTranslucency(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=Rectangle.clone(Rectangle.MAX_VALUE)}function ImageryLayerCollection(){this._layers=[],this.layerAdded=new Event,this.layerRemoved=new Event,this.layerMoved=new Event,this.layerShownOrHidden=new Event}function getLayerIndex(e,t){return e.indexOf(t)}function swapLayers(e,t,i){var r,n=e._layers;(t=CesiumMath.clamp(t,0,n.length-1))!==(i=CesiumMath.clamp(i,0,n.length-1))&&(r=n[t],n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t))}Object.defineProperties(GlobeTranslucency.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){this._frontFaceAlphaByDistance=NearFarScalar.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){this._backFaceAlphaByDistance=NearFarScalar.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){defined(e)||(e=Rectangle.clone(Rectangle.MAX_VALUE)),Rectangle.clone(e,this._rectangle)}}}),Object.defineProperties(ImageryLayerCollection.prototype,{length:{get:function(){return this._layers.length}}}),ImageryLayerCollection.prototype.add=function(e,t){defined(t)?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t)},ImageryLayerCollection.prototype.addImageryProvider=function(e,t){return e=new ImageryLayer(e),this.add(e,t),e},ImageryLayerCollection.prototype.remove=function(e,t){t=defaultValue(t,!0);var i=this._layers.indexOf(e);return-1!==i&&(this._layers.splice(i,1),this._update(),this.layerRemoved.raiseEvent(e,i),t&&e.destroy(),!0)},ImageryLayerCollection.prototype.removeAll=function(e){e=defaultValue(e,!0);for(var t=this._layers,i=0,r=t.length;i<r;i++){var n=t[i];this.layerRemoved.raiseEvent(n,i),e&&n.destroy()}this._layers=[]},ImageryLayerCollection.prototype.contains=function(e){return-1!==this.indexOf(e)},ImageryLayerCollection.prototype.indexOf=function(e){return this._layers.indexOf(e)},ImageryLayerCollection.prototype.get=function(e){return this._layers[e]},ImageryLayerCollection.prototype.raise=function(e){swapLayers(this,e=getLayerIndex(this._layers,e),e+1)},ImageryLayerCollection.prototype.lower=function(e){swapLayers(this,e=getLayerIndex(this._layers,e),e-1)},ImageryLayerCollection.prototype.raiseToTop=function(e){var t=getLayerIndex(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},ImageryLayerCollection.prototype.lowerToBottom=function(e){var t=getLayerIndex(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var applicableRectangleScratch=new Rectangle,comparisonPoint;function QuadtreeOccluders(e){this._ellipsoid=new EllipsoidalOccluder(e.ellipsoid,Cartesian3.ZERO)}function QuadtreeTile(e){this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=TileSelectionResult.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=QuadtreeTileLoadState$1.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}function freeTile(e){defined(e)&&e.freeResources()}function TileReplacementQueue(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function remove$1(e,t){var i=t.replacementPrevious,r=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=r),t===e.head?e.head=r:i.replacementNext=r,t===e.tail?e.tail=i:r.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}function QuadtreePrimitive(e){this._tileProvider=e.tileProvider,(this._tileProvider.quadtree=this)._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new TileReplacementQueue,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=defaultValue(e.maximumScreenSpaceError,2),this.tileCacheSize=defaultValue(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new QuadtreeOccluders({ellipsoid:t}),this._tileLoadProgressEvent=new Event,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}function invalidateAllTiles(e){var t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,clearTileLoadQueue(e);var i=e._levelZeroTiles;if(defined(i))for(var r=0;r<i.length;++r){for(var n=i[r].customData,a=n.length,o=0;o<a;++o){var s=n[o];s.level=0,e._addHeightCallbacks.push(s)}i[r].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}function clearTileLoadQueue(e){var t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}function updateTileLoadProgress(e,t){var i=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;i===e._lastTileLoadQueueLength&&!e._tilesInvalidated||(t.afterRender.push(Event.prototype.raiseEvent.bind(e._tileLoadProgressEvent,i)),e._lastTileLoadQueueLength=i),(i=e._debug).enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce((function(e,t){return Math.max(e,t.level)}),-1),i.tilesRendered=e._tilesToRender.length,i.tilesVisited===i.lastTilesVisited&&i.tilesRendered===i.lastTilesRendered&&i.tilesCulled===i.lastTilesCulled&&i.maxDepth===i.lastMaxDepth&&i.tilesWaitingForChildren===i.lastTilesWaitingForChildren&&i.maxDepthVisited===i.lastMaxDepthVisited||(console.log("Visited "+i.tilesVisited+", Rendered: "+i.tilesRendered+", Culled: "+i.tilesCulled+", Max Depth Rendered: "+i.maxDepth+", Max Depth Visited: "+i.maxDepthVisited+", Waiting for children: "+i.tilesWaitingForChildren),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren,i.lastMaxDepthVisited=i.maxDepthVisited))}ImageryLayerCollection.prototype.pickImageryLayerFeatures=function(e,t){if(defined(e=t.globe.pick(e,t))){for(var i,r=t.globe.ellipsoid.cartesianToCartographic(e),n=t.globe._surface._tilesToRender,a=0;!defined(i)&&a<n.length;++a){var o=n[a];Rectangle.contains(o.rectangle,r)&&(i=o)}if(defined(i)){for(var s=i.data.imagery,l=[],c=[],u=s.length-1;0<=u;--u){var d,h,p,f=s[u],m=f.readyImagery;defined(m)&&defined((p=m.imageryLayer.imageryProvider).pickFeatures)&&Rectangle.contains(m.rectangle,r)&&(h=1/1024,(d=applicableRectangleScratch).west=CesiumMath.lerp(i.rectangle.west,i.rectangle.east,f.textureCoordinateRectangle.x-h),d.east=CesiumMath.lerp(i.rectangle.west,i.rectangle.east,f.textureCoordinateRectangle.z+h),d.south=CesiumMath.lerp(i.rectangle.south,i.rectangle.north,f.textureCoordinateRectangle.y-h),d.north=CesiumMath.lerp(i.rectangle.south,i.rectangle.north,f.textureCoordinateRectangle.w+h),!Rectangle.contains(d,r)||defined(p=p.pickFeatures(m.x,m.y,m.level,r.longitude,r.latitude))&&(l.push(p),c.push(m.imageryLayer)))}if(0!==l.length)return when.all(l,(function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],a=c[i];if(defined(n)&&0<n.length)for(var o=0;o<n.length;++o){var s=n[o];s.imageryLayer=a,defined(s.position)||(s.position=r),t.push(s)}}return t}))}}},ImageryLayerCollection.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,r=t.length;i<r;++i)t[i].queueReprojectionCommands(e)},ImageryLayerCollection.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;t<i;++t)e[t].cancelReprojections()},ImageryLayerCollection.prototype.isDestroyed=function(){return!1},ImageryLayerCollection.prototype.destroy=function(){return this.removeAll(!0),destroyObject(this)},ImageryLayerCollection.prototype._update=function(){for(var e,t,i=!0,r=this._layers,n=0,a=r.length;n<a;++n)(t=r[n])._layerIndex=n,t.show?(t._isBaseLayer=i,i=!1):t._isBaseLayer=!1,t.show!==t._show&&(defined(t._show)&&(defined(e)||(e=[]),e.push(t)),t._show=t.show);if(defined(e))for(n=0,a=e.length;n<a;++n)t=e[n],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},Object.defineProperties(QuadtreeOccluders.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),QuadtreeTile.createLevelZeroTiles=function(e){for(var t=e.getNumberOfXTilesAtLevel(0),i=e.getNumberOfYTilesAtLevel(0),r=new Array(t*i),n=0,a=0;a<i;++a)for(var o=0;o<t;++o)r[n++]=new QuadtreeTile({tilingScheme:e,x:o,y:a,level:0});return r},QuadtreeTile.prototype._updateCustomData=function(e,t,i){var r,n,a=this.customData;if(defined(t)&&defined(i)){for(a=a.filter((function(e){return-1===i.indexOf(e)})),this._customData=a,n=this._rectangle,s=0;s<t.length;++s)r=t[s],Rectangle.contains(n,r.positionCartographic)&&a.push(r);this._frameUpdated=e}else if(defined(e=this._parent)&&this._frameUpdated!==e._frameUpdated){a.length=0,n=this._rectangle;for(var o=e.customData,s=0;s<o.length;++s)r=o[s],Rectangle.contains(n,r.positionCartographic)&&a.push(r);this._frameUpdated=e._frameUpdated}},Object.defineProperties(QuadtreeTile.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return defined(this._southwestChild)||(this._southwestChild=new QuadtreeTile({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return defined(this._southeastChild)||(this._southeastChild=new QuadtreeTile({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return defined(this._northwestChild)||(this._northwestChild=new QuadtreeTile({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return defined(this._northeastChild)||(this._northeastChild=new QuadtreeTile({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<QuadtreeTileLoadState$1.DONE}},eligibleForUnloading:{get:function(){var e=!0;return defined(this.data)&&(defined(e=this.data.eligibleForUnloading)||(e=!0)),e}}}),QuadtreeTile.prototype.findLevelZeroTile=function(e,t,i){var r=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=r:r<=t&&(t-=r),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter((function(e){return e.x===t&&e.y===i}))[0]},QuadtreeTile.prototype.findTileToWest=function(e){var t=this.parent;return void 0===t?this.findLevelZeroTile(e,this.x-1,this.y):t.southeastChild===this?t.southwestChild:t.northeastChild===this?t.northwestChild:void 0!==(e=t.findTileToWest(e))?t.southwestChild===this?e.southeastChild:e.northeastChild:void 0},QuadtreeTile.prototype.findTileToEast=function(e){var t=this.parent;return void 0===t?this.findLevelZeroTile(e,this.x+1,this.y):t.southwestChild===this?t.southeastChild:t.northwestChild===this?t.northeastChild:void 0!==(e=t.findTileToEast(e))?t.southeastChild===this?e.southwestChild:e.northwestChild:void 0},QuadtreeTile.prototype.findTileToSouth=function(e){var t=this.parent;return void 0===t?this.findLevelZeroTile(e,this.x,this.y+1):t.northwestChild===this?t.southwestChild:t.northeastChild===this?t.southeastChild:void 0!==(e=t.findTileToSouth(e))?t.southwestChild===this?e.northwestChild:e.northeastChild:void 0},QuadtreeTile.prototype.findTileToNorth=function(e){var t=this.parent;return void 0===t?this.findLevelZeroTile(e,this.x,this.y-1):t.southwestChild===this?t.northwestChild:t.southeastChild===this?t.northeastChild:void 0!==(e=t.findTileToNorth(e))?t.northwestChild===this?e.southwestChild:e.southeastChild:void 0},QuadtreeTile.prototype.freeResources=function(){this.state=QuadtreeTileLoadState$1.START,this.renderable=!1,this.upsampledFromParent=!1,defined(this.data)&&defined(this.data.freeResources)&&this.data.freeResources(),freeTile(this._southwestChild),this._southwestChild=void 0,freeTile(this._southeastChild),this._southeastChild=void 0,freeTile(this._northwestChild),this._northwestChild=void 0,freeTile(this._northeastChild),this._northeastChild=void 0},TileReplacementQueue.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},TileReplacementQueue.prototype.trimTiles=function(e){for(var t=this.tail,i=!0;i&&defined(this._lastBeforeStartOfFrame)&&this.count>e&&defined(t);){i=t!==this._lastBeforeStartOfFrame;var r=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),remove$1(this,t)),t=r}},TileReplacementQueue.prototype.markTileRendered=function(e){var t=this.head;if(t!==e){if(++this.count,!defined(t))return e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e);(defined(e.replacementPrevious)||defined(e.replacementNext))&&remove$1(this,e),e.replacementPrevious=void 0,(e.replacementNext=t).replacementPrevious=e,this.head=e}else e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)},Object.defineProperties(QuadtreePrimitive.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),QuadtreePrimitive.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0},QuadtreePrimitive.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;defined(t);)t.state!==QuadtreeTileLoadState$1.START&&e(t),t=t.replacementNext},QuadtreePrimitive.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,r=t.length;i<r;++i)e(t[i])},QuadtreePrimitive.prototype.updateHeight=function(e,t){var i=this,r={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,removeFunc:function(){for(var e=i._addHeightCallbacks,t=e.length,n=0;n<t;++n)if(e[n]===r){e.splice(n,1);break}i._removeHeightCallbacks.push(r)}};return i._addHeightCallbacks.push(r),r.removeFunc},QuadtreePrimitive.prototype.update=function(e){defined(this._tileProvider.update)&&this._tileProvider.update(e)},QuadtreePrimitive.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(invalidateAllTiles(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),clearTileLoadQueue(this),this._debug.suspendLodUpdate||this._tileReplacementQueue.markStartOfRenderFrame())},QuadtreePrimitive.prototype.render=function(e){var t=e.passes,i=this._tileProvider;t.render&&(i.beginUpdate(e),selectTilesForRendering(this,e),createRenderCommandsForSelectedTiles(this,e),i.endUpdate(e)),t.pick&&0<this._tilesToRender.length&&i.updateForPick(e)},QuadtreePrimitive.prototype.endFrame=function(e){e.passes.render&&e.mode!==SceneMode$1.MORPHING&&(processTileLoadQueue(this,e),updateHeights(this,e),updateTileLoadProgress(this,e))},QuadtreePrimitive.prototype.isDestroyed=function(){return!1},QuadtreePrimitive.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var centerScratch$5=new Cartographic;function compareDistanceToPoint(e,t){var i,r=(i=Rectangle.center(e.rectangle,centerScratch$5)).longitude-comparisonPoint.longitude;return r*r+(e=i.latitude-comparisonPoint.latitude)*e-((t=(i=Rectangle.center(t.rectangle,centerScratch$5)).longitude-comparisonPoint.longitude)*t+(i=i.latitude-comparisonPoint.latitude)*i)}var cameraOriginScratch=new Cartesian3,rootTraversalDetails=[];function selectTilesForRendering(e,t){var i,r=e._debug;if(!r.suspendLodUpdate){e._tilesToRender.length=0;var n,a=e._tileProvider;if(!defined(e._levelZeroTiles)){if(!a.ready)return;var o=a.tilingScheme;e._levelZeroTiles=QuadtreeTile.createLevelZeroTiles(o);var s=e._levelZeroTiles.length;if(rootTraversalDetails.length<s)for(rootTraversalDetails=new Array(s),i=0;i<s;++i)void 0===rootTraversalDetails[i]&&(rootTraversalDetails[i]=new TraversalDetails)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var l=e._levelZeroTiles,c=1<l.length?e._occluders:void 0;comparisonPoint=t.camera.positionCartographic,l.sort(compareDistanceToPoint);var u,d=e._addHeightCallbacks,h=e._removeHeightCallbacks,p=t.frameNumber;if(0<d.length||0<h.length){for(i=0,u=l.length;i<u;++i)(n=l[i])._updateCustomData(p,d,h);d.length=0,h.length=0}for(o=t.camera,e._cameraPositionCartographic=o.positionCartographic,o=Matrix4.getTranslation(o.transform,cameraOriginScratch),e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(o,e._cameraReferenceFrameOriginCartographic),i=0,u=l.length;i<u;++i)n=l[i],e._tileReplacementQueue.markTileRendered(n),n.renderable?visitIfVisible(e,n,a,t,c,!1,rootTraversalDetails[i]):(queueTileLoad(e,e._tileLoadQueueHigh,n,t),++r.tilesWaitingForChildren);e._lastSelectionFrameNumber=p}}function queueTileLoad(e,t,i,r){i.needsLoading&&(void 0!==e.tileProvider.computeTileLoadPriority&&(i._loadPriority=e.tileProvider.computeTileLoadPriority(i,r)),t.push(i))}function TraversalDetails(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function TraversalQuadDetails(){this.southwest=new TraversalDetails,this.southeast=new TraversalDetails,this.northwest=new TraversalDetails,this.northeast=new TraversalDetails}TraversalQuadDetails.prototype.combine=function(e){var t=this.southwest,i=this.southeast,r=this.northwest,n=this.northeast;e.allAreRenderable=t.allAreRenderable&&i.allAreRenderable&&r.allAreRenderable&&n.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||r.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+i.notYetRenderableCount+r.notYetRenderableCount+n.notYetRenderableCount};for(var traversalQuadsByLevel=new Array(31),i$4=0;i$4<traversalQuadsByLevel.length;++i$4)traversalQuadsByLevel[i$4]=new TraversalQuadDetails;function visitTile$3(e,t,i,r,n){var a=e._debug;++a.tilesVisited,e._tileReplacementQueue.markTileRendered(i),i._updateCustomData(t.frameNumber),i.level>a.maxDepthVisited&&(a.maxDepthVisited=i.level);var o=screenSpaceError(e,t,i)<e.maximumScreenSpaceError,s=i.southwestChild,l=i.southeastChild,c=i.northwestChild,u=i.northeastChild,d=e._lastSelectionFrameNumber,h=i._lastSelectionResultFrame===d?i._lastSelectionResult:TileSelectionResult.NONE;d=e.tileProvider;if(o||r){var p=TileSelectionResult.originalResult(h)===TileSelectionResult.RENDERED,f=TileSelectionResult.originalResult(h)===TileSelectionResult.CULLED||h===TileSelectionResult.NONE,m=i.state===QuadtreeTileLoadState$1.DONE;if((p=p||f||m)||defined(d.canRenderWithoutLosingDetail)&&(p=d.canRenderWithoutLosingDetail(i)),p)return o&&queueTileLoad(e,e._tileLoadQueueMedium,i,t),addTileToRenderList(e,i),n.allAreRenderable=i.renderable,n.anyWereRenderedLastFrame=h===TileSelectionResult.RENDERED,n.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=TileSelectionResult.RENDERED,void(n.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));r=!0,o&&queueTileLoad(e,e._tileLoadQueueHigh,i,t)}if(d.canRefine(i)){if(s.upsampledFromParent&&l.upsampledFromParent&&c.upsampledFromParent&&u.upsampledFromParent)return addTileToRenderList(e,i),queueTileLoad(e,e._tileLoadQueueMedium,i,t),e._tileReplacementQueue.markTileRendered(s),e._tileReplacementQueue.markTileRendered(l),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(u),n.allAreRenderable=i.renderable,n.anyWereRenderedLastFrame=h===TileSelectionResult.RENDERED,n.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=TileSelectionResult.RENDERED,void(n.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));if(i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=TileSelectionResult.REFINED,f=e._tilesToRender.length,m=e._tileLoadQueueLow.length,p=e._tileLoadQueueMedium.length,o=e._tileLoadQueueHigh.length,d=e._tileToUpdateHeights.length,visitVisibleChildrenNearToFar(e,s,l,c,u,t,r,n),f!==e._tilesToRender.length){if(l=n.allAreRenderable,c=n.anyWereRenderedLastFrame,u=n.notYetRenderableCount,r=!1,!l&&!c){for(var g=e._tilesToRender,y=f;y<g.length;++y)for(var _=g[y];void 0!==_&&_._lastSelectionResult!==TileSelectionResult.KICKED&&_!==i;)_._lastSelectionResult=TileSelectionResult.kick(_._lastSelectionResult),_=_.parent;e._tilesToRender.length=f,e._tileToUpdateHeights.length=d,addTileToRenderList(e,i),i._lastSelectionResult=TileSelectionResult.RENDERED,!(d=h===TileSelectionResult.RENDERED)&&u>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=m,e._tileLoadQueueMedium.length=p,e._tileLoadQueueHigh.length=o,queueTileLoad(e,e._tileLoadQueueMedium,i,t),n.notYetRenderableCount=i.renderable?0:1,r=!0),n.allAreRenderable=i.renderable,(n.anyWereRenderedLastFrame=d)||e._tileToUpdateHeights.push(i),++a.tilesWaitingForChildren}e.preloadAncestors&&!r&&queueTileLoad(e,e._tileLoadQueueLow,i,t)}}else i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=TileSelectionResult.RENDERED,addTileToRenderList(e,i),queueTileLoad(e,e._tileLoadQueueHigh,i,t),n.allAreRenderable=i.renderable,n.anyWereRenderedLastFrame=h===TileSelectionResult.RENDERED,n.notYetRenderableCount=i.renderable?0:1}function visitVisibleChildrenNearToFar(e,t,i,r,n,a,o,s){var l=a.camera.positionCartographic,c=e._tileProvider,u=e._occluders,d=traversalQuadsByLevel[t.level],h=d.southwest,p=d.southeast,f=d.northwest,m=d.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(visitIfVisible(e,t,c,a,u,o,h),visitIfVisible(e,i,c,a,u,o,p),visitIfVisible(e,r,c,a,u,o,f),visitIfVisible(e,n,c,a,u,o,m)):(visitIfVisible(e,r,c,a,u,o,f),visitIfVisible(e,t,c,a,u,o,h),visitIfVisible(e,n,c,a,u,o,m),visitIfVisible(e,i,c,a,u,o,p)):l.latitude<t.rectangle.north?(visitIfVisible(e,i,c,a,u,o,p),visitIfVisible(e,t,c,a,u,o,h),visitIfVisible(e,n,c,a,u,o,m),visitIfVisible(e,r,c,a,u,o,f)):(visitIfVisible(e,n,c,a,u,o,m),visitIfVisible(e,r,c,a,u,o,f),visitIfVisible(e,i,c,a,u,o,p),visitIfVisible(e,t,c,a,u,o,h)),d.combine(s)}function containsNeededPosition(e,t){return t=t.rectangle,defined(e._cameraPositionCartographic)&&Rectangle.contains(t,e._cameraPositionCartographic)||defined(e._cameraReferenceFrameOriginCartographic)&&Rectangle.contains(t,e._cameraReferenceFrameOriginCartographic)}function visitIfVisible(e,t,i,r,n,a,o){if(i.computeTileVisibility(t,r,n)!==Visibility$1.NONE)return visitTile$3(e,r,t,a,o);++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),o.allAreRenderable=!0,o.anyWereRenderedLastFrame=!1,o.notYetRenderableCount=0,containsNeededPosition(e,t)?(defined(t.data)&&defined(t.data.vertexArray)||queueTileLoad(e,e._tileLoadQueueMedium,t,r),o=e._lastSelectionFrameNumber,(o=t._lastSelectionResultFrame===o?t._lastSelectionResult:TileSelectionResult.NONE)!==TileSelectionResult.CULLED_BUT_NEEDED&&o!==TileSelectionResult.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=TileSelectionResult.CULLED_BUT_NEEDED):(!e.preloadSiblings&&0!==t.level||queueTileLoad(e,e._tileLoadQueueLow,t,r),t._lastSelectionResult=TileSelectionResult.CULLED),t._lastSelectionResultFrame=r.frameNumber}function screenSpaceError(e,t,i){return t.mode===SceneMode$1.SCENE2D||t.camera.frustum instanceof OrthographicFrustum||t.camera.frustum instanceof OrthographicOffCenterFrustum?screenSpaceError2D(e,t,i):(e=e._tileProvider.getLevelMaximumGeometricError(i.level),i=i._distance,e=e*t.context.drawingBufferHeight/(i*t.camera.frustum.sseDenominator),t.fog.enabled&&(e-=CesiumMath.fog(i,t.fog.density)*t.fog.sse),e/t.pixelRatio)}function screenSpaceError2D(e,t,i){var r=t.camera.frustum;defined(r._offCenterFrustum)&&(r=r._offCenterFrustum);var n=(a=t.context).drawingBufferWidth,a=a.drawingBufferHeight;a=e._tileProvider.getLevelMaximumGeometricError(i.level)/(Math.max(r.top-r.bottom,r.right-r.left)/Math.max(n,a));return t.fog.enabled&&t.mode!==SceneMode$1.SCENE2D&&(a-=CesiumMath.fog(i._distance,t.fog.density)*t.fog.sse),a/t.pixelRatio}function addTileToRenderList(e,t){e._tilesToRender.push(t)}function processTileLoadQueue(e,t){var i,r,n=e._tileLoadQueueHigh,a=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;0===n.length&&0===a.length&&0===o.length||(e._tileReplacementQueue.trimTiles(e.tileCacheSize),i=getTimestamp$1()+e._loadQueueTimeSlice,n=processSinglePriorityLoadQueue(e,t,r=e._tileProvider,i,n,!1),n=processSinglePriorityLoadQueue(e,t,r,i,a,n),processSinglePriorityLoadQueue(e,t,r,i,o,n))}function sortByLoadPriority(e,t){return e._loadPriority-t._loadPriority}function processSinglePriorityLoadQueue(e,t,i,r,n,a){void 0!==i.computeTileLoadPriority&&n.sort(sortByLoadPriority);for(var o=0,s=n.length;o<s&&(getTimestamp$1()<r||!a);++o){var l=n[o];e._tileReplacementQueue.markTileRendered(l),i.loadTile(t,l),a=!0}return a}var scratchRay=new Ray,scratchCartographic$d=new Cartographic,scratchPosition$a=new Cartesian3,scratchArray=[];function updateHeights(e,t){if(e.tileProvider.ready){var i=scratchArray;i.length=0;for(var r=e._tileToUpdateHeights,n=e._tileProvider.terrainProvider,a=getTimestamp$1()+e._updateHeightsTimeSlice,o=t.mode,s=t.mapProjection,l=e.tileProvider.tilingScheme.ellipsoid;0<r.length;){var c=r[0];if(defined(c.data)&&defined(c.data.mesh)){for(var u=c.customData,d=u.length,h=!1,p=e._lastTileIndex;p<d;++p){var f,m,g=u[p];if(c.level>g.level)defined(g.positionOnEllipsoidSurface)||(g.positionOnEllipsoidSurface=Cartesian3.fromRadians(g.positionCartographic.longitude,g.positionCartographic.latitude,0,l)),o===SceneMode$1.SCENE3D?(f=l.geodeticSurfaceNormal(g.positionOnEllipsoidSurface,scratchRay.direction),defined(l.getSurfaceNormalIntersectionWithZAxis(g.positionOnEllipsoidSurface,11500,scratchRay.origin))||(defined(c.data.tileBoundingRegion)&&(m=c.data.tileBoundingRegion.minimumHeight),b=Math.min(defaultValue(m,0),-11500),x=Cartesian3.multiplyByScalar(f,Math.abs(b)+1,scratchPosition$a),Cartesian3.subtract(g.positionOnEllipsoidSurface,x,scratchRay.origin))):(Cartographic.clone(g.positionCartographic,scratchCartographic$d),scratchCartographic$d.height=-11500,s.project(scratchCartographic$d,scratchPosition$a),Cartesian3.fromElements(scratchPosition$a.z,scratchPosition$a.x,scratchPosition$a.y,scratchPosition$a),Cartesian3.clone(scratchPosition$a,scratchRay.origin),Cartesian3.clone(Cartesian3.UNIT_X,scratchRay.direction)),defined(b=c.data.pick(scratchRay,o,s,!1,scratchPosition$a))&&(g.callback(b),g.level=c.level);else if(c.level===g.level){for(var y,_=c.children,v=_.length,C=0;C<v&&(y=_[C],!Rectangle.contains(y.rectangle,g.positionCartographic));++C);var x=n.getTileDataAvailable(y.x,y.y,y.level),b=c.parent;(defined(x)&&!x||defined(b)&&defined(b.data)&&defined(b.data.terrainData)&&!b.data.terrainData.isChildAvailable(b.x,b.y,y.x,y.y))&&g.removeFunc()}if(getTimestamp$1()>=a){h=!0;break}}if(h){e._lastTileIndex=p;break}e._lastTileIndex=0,r.shift()}else{var S=c._lastSelectionResultFrame===e._lastSelectionFrameNumber?c._lastSelectionResult:TileSelectionResult.NONE;S!==TileSelectionResult.RENDERED&&S!==TileSelectionResult.CULLED_BUT_NEEDED||i.push(c),r.shift(),e._lastTileIndex=0}}for(p=0;p<i.length;p++)r.push(i[p])}}function createRenderCommandsForSelectedTiles(e,t){for(var i=e._tileProvider,r=e._tilesToRender,n=0,a=r.length;n<a;++n){var o=r[n];i.showTileThisFrame(o,t)}}function Globe(e){var t=new EllipsoidTerrainProvider({ellipsoid:e=defaultValue(e,Ellipsoid.WGS84)}),i=new ImageryLayerCollection;this._ellipsoid=e,this._imageryLayerCollection=i,this._surfaceShaderSet=new GlobeSurfaceShaderSet,this._material=void 0,this._surface=new QuadtreePrimitive({tileProvider:new GlobeSurfaceTileProvider({terrainProvider:t,imageryLayers:i,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new Event,this._undergroundColor=Color.clone(Color.BLACK),this._undergroundColorAlphaByDistance=new NearFarScalar(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new GlobeTranslucency,makeShadersDirty(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new Resource({url:buildModuleUrl("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=ShadowMode$1.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0}function makeShadersDirty(e){var t=[],i=defined(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),r=[GroundAtmosphere];!defined(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.materialUniformMap=void 0:(r.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms),r.push(GlobeFS),e._surfaceShaderSet.baseVertexShaderSource=new ShaderSource({sources:[GroundAtmosphere,GlobeVS],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new ShaderSource({sources:r,defines:t}),e._surfaceShaderSet.material=e._material}function createComparePickTileFunction(e){return function(t,i){return BoundingSphere.distanceSquaredTo(t.pickBoundingSphere,e)-BoundingSphere.distanceSquaredTo(i.pickBoundingSphere,e)}}Object.defineProperties(Globe.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return!defined(this._surface)||this._surface.tileProvider.ready&&0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){defined(e)||(e=Rectangle.clone(Rectangle.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),defined(this._material)&&makeShadersDirty(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,makeShadersDirty(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=Color.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){this._undergroundColorAlphaByDistance=NearFarScalar.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});var scratchArray$1=[],scratchSphereIntersectionResult={start:0,stop:0};Globe.prototype.pickWorldCoordinates=function(e,t,i,r){i=defaultValue(i,!0);var n=t.mode,a=t.mapProjection,o=scratchArray$1;o.length=0;for(var s,l,c=this._surface._tilesToRender,u=c.length,d=0;d<u;++d){var h=(s=c[d]).data;if(defined(h)){var p=h.pickBoundingSphere;if(n!==SceneMode$1.SCENE3D)h.pickBoundingSphere=p=BoundingSphere.fromRectangleWithHeights2D(s.rectangle,a,h.tileBoundingRegion.minimumHeight,h.tileBoundingRegion.maximumHeight,p),Cartesian3.fromElements(p.center.z,p.center.x,p.center.y,p.center);else{if(!defined(h.renderedMesh))continue;BoundingSphere.clone(h.renderedMesh.boundingSphere3D,p)}defined(IntersectionTests.raySphere(e,p,scratchSphereIntersectionResult))&&o.push(h)}}for(o.sort(createComparePickTileFunction(e.origin)),u=o.length,d=0;d<u&&!defined(l=o[d].pick(e,t.mode,t.mapProjection,i,r));++d);return l};var cartoScratch$2=new Cartographic;Globe.prototype.pick=function(e,t,i){return defined(i=this.pickWorldCoordinates(e,t,!0,i))&&t.mode!==SceneMode$1.SCENE3D&&(i=Cartesian3.fromElements(i.y,i.z,i.x,i),e=t.mapProjection.unproject(i,cartoScratch$2),i=t.globe.ellipsoid.cartographicToCartesian(e,i)),i};var scratchGetHeightCartesian=new Cartesian3,scratchGetHeightIntersection=new Cartesian3,scratchGetHeightCartographic=new Cartographic,scratchGetHeightRay=new Ray;function tileIfContainsCartographic(e,t){return defined(e)&&Rectangle.contains(e.rectangle,t)?e:void 0}Globe.prototype.getHeight=function(e){var t=this._surface._levelZeroTiles;if(defined(t)){for(var i,r=t.length,n=0;n<r&&(i=t[n],!Rectangle.contains(i.rectangle,e));++n);if(!(r<=n)){for(var a=i;defined(i);)defined(i=tileIfContainsCartographic(i._southwestChild,e)||tileIfContainsCartographic(i._southeastChild,e)||tileIfContainsCartographic(i._northwestChild,e)||i._northeastChild)&&defined(i.data)&&defined(i.data.renderedMesh)&&(a=i);if(defined(i=a)&&defined(i.data)&&defined(i.data.renderedMesh)){var o,s=this._surface._tileProvider.tilingScheme.ellipsoid,l=Cartesian3.fromRadians(e.longitude,e.latitude,0,s,scratchGetHeightCartesian),c=scratchGetHeightRay,u=s.geodeticSurfaceNormal(l,c.direction);if(defined(s.getSurfaceNormalIntersectionWithZAxis(l,11500,c.origin))||(defined(i.data.tileBoundingRegion)&&(o=i.data.tileBoundingRegion.minimumHeight),o=Math.min(defaultValue(o,0),-11500),o=Cartesian3.multiplyByScalar(u,Math.abs(o)+1,scratchGetHeightIntersection),Cartesian3.subtract(l,o,c.origin)),defined(c=i.data.pick(c,void 0,void 0,!1,scratchGetHeightIntersection)))return s.cartesianToCartographic(c,scratchGetHeightCartographic).height}}}},Globe.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)},Globe.prototype.beginFrame=function(e){var t,i,r=this._surface,n=r.tileProvider,a=this.terrainProvider,o=this.showWaterEffect&&a.ready&&a.hasWaterMask;o&&this._oceanNormalMapResourceDirty&&(this._oceanNormalMapResourceDirty=!1,s=this._oceanNormalMapResource,defined(t=s.url)?(i=this,when(s.fetchImage(),(function(r){t===i._oceanNormalMapResource.url&&(i._oceanNormalMap=i._oceanNormalMap&&i._oceanNormalMap.destroy(),i._oceanNormalMap=new Texture({context:e.context,source:r}))}))):this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy());a=e.passes;var s=e.mode;a.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,r.maximumScreenSpaceError=this.maximumScreenSpaceError,r.tileCacheSize=this.tileCacheSize,r.loadingDescendantLimit=this.loadingDescendantLimit,r.preloadAncestors=this.preloadAncestors,r.preloadSiblings=this.preloadSiblings,n.terrainProvider=this.terrainProvider,n.lightingFadeOutDistance=this.lightingFadeOutDistance,n.lightingFadeInDistance=this.lightingFadeInDistance,n.nightFadeOutDistance=this.nightFadeOutDistance,n.nightFadeInDistance=this.nightFadeInDistance,n.zoomedOutOceanSpecularIntensity=s===SceneMode$1.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=o,n.oceanNormalMap=this._oceanNormalMap,n.enableLighting=this.enableLighting,n.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,n.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,n.showGroundAtmosphere=this.showGroundAtmosphere,n.shadows=this.shadows,n.hueShift=this.atmosphereHueShift,n.saturationShift=this.atmosphereSaturationShift,n.brightnessShift=this.atmosphereBrightnessShift,n.fillHighlightColor=this.fillHighlightColor,n.showSkirts=this.showSkirts,n.backFaceCulling=this.backFaceCulling,n.undergroundColor=this._undergroundColor,n.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,r.beginFrame(e))},Globe.prototype.render=function(e){this.show&&(defined(this._material)&&this._material.update(e.context),this._surface.render(e))},Globe.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)},Globe.prototype.isDestroyed=function(){return!1},Globe.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),destroyObject(this)};var PassThrough="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n}\n",PassThroughDepth="uniform highp sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = czm_packDepth(texture2D(u_depthTexture, v_textureCoordinates).r);\n}\n";function GlobeDepth(){this._globeColorTexture=void 0,this._primitiveColorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this._tempGlobeDepthTexture=void 0,this._tempCopyDepthTexture=void 0,this._globeColorFramebuffer=void 0,this._primitiveColorFramebuffer=void 0,this._copyDepthFramebuffer=void 0,this._tempCopyDepthFramebuffer=void 0,this._updateDepthFramebuffer=void 0,this._clearGlobeColorCommand=void 0,this._clearPrimitiveColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._mergeColorCommand=void 0,this._viewport=new BoundingRectangle,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useLogDepth=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0,this._debugGlobeDepthViewportCommand=void 0}function executeDebugGlobeDepth(e,t,i,r){var n;defined(e._debugGlobeDepthViewportCommand)&&r===e._useLogDepth||(n=new ShaderSource({defines:[r?"LOG_DEPTH":""],sources:["uniform highp sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    float z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\n    z_window = czm_reverseLogDepth(z_window); \n    float n_range = czm_depthRange.near;\n    float f_range = czm_depthRange.far;\n    float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n    float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n    gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]}),e._debugGlobeDepthViewportCommand=t.createViewportQuadCommand(n,{uniformMap:{u_depthTexture:function(){return e._globeDepthTexture}},owner:e}),e._useLogDepth=r),e._debugGlobeDepthViewportCommand.execute(t,i)}function destroyTextures(e){e._globeColorTexture=e._globeColorTexture&&!e._globeColorTexture.isDestroyed()&&e._globeColorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function destroyFramebuffers$1(e){e._globeColorFramebuffer=e._globeColorFramebuffer&&!e._globeColorFramebuffer.isDestroyed()&&e._globeColorFramebuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function destroyUpdateDepthResources(e){e._tempCopyDepthFramebuffer=e._tempCopyDepthFramebuffer&&!e._tempCopyDepthFramebuffer.isDestroyed()&&e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer=e._updateDepthFramebuffer&&!e._updateDepthFramebuffer.isDestroyed()&&e._updateDepthFramebuffer.destroy(),e._tempGlobeDepthTexture=e._tempGlobeDepthTexture&&!e._tempGlobeDepthTexture.isDestroyed()&&e._tempGlobeDepthTexture.destroy()}function createUpdateDepthResources(e,t,i,r,n){e._tempGlobeDepthTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),e._tempCopyDepthFramebuffer=new Framebuffer({context:t,colorTextures:[e._tempGlobeDepthTexture],destroyAttachments:!1}),e._updateDepthFramebuffer=new Framebuffer({context:t,colorTextures:[e._globeDepthTexture],depthStencilTexture:n.framebuffer.depthStencilTexture,destroyAttachments:!1})}function createTextures$1(e,t,i,r,n){n=n?t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,e._globeColorTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:n,sampler:Sampler.NEAREST}),e._depthStencilTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8}),e._globeDepthTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST})}function createFramebuffers$1(e,t){e._globeColorFramebuffer=new Framebuffer({context:t,colorTextures:[e._globeColorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new Framebuffer({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function createPrimitiveFramebuffer(e,t,i,r,n){n=n?t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,e._primitiveColorTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:n,sampler:Sampler.NEAREST}),e._primitiveColorFramebuffer=new Framebuffer({context:t,colorTextures:[e._primitiveColorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1})}function destroyPrimitiveFramebuffer(e){e._primitiveColorTexture=e._primitiveColorTexture&&!e._primitiveColorTexture.isDestroyed()&&e._primitiveColorTexture.destroy(),e._primitiveColorFramebuffer=e._primitiveColorFramebuffer&&!e._primitiveColorFramebuffer.isDestroyed()&&e._primitiveColorFramebuffer.destroy()}function updateFramebuffers(e,t,i,r,n,a){var o;(o=!defined(o=e._globeColorTexture)||o.width!==i||o.height!==r||n!==e._useHdr)&&(destroyTextures(e),destroyFramebuffers$1(e),createTextures$1(e,t,i,r,n),createFramebuffers$1(e,t)),!o&&a===e._clearGlobeDepth||(destroyPrimitiveFramebuffer(e),a&&createPrimitiveFramebuffer(e,t,i,r,n))}function updateCopyCommands(e,t,i,r,n){e._viewport.width=i,e._viewport.height=r,r=(i=!BoundingRectangle.equals(e._viewport,n.viewport))!==e._useScissorTest,e._useScissorTest=i,BoundingRectangle.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=BoundingRectangle.clone(n.viewport,e._scissorRectangle),r=!0),defined(e._rs)&&BoundingRectangle.equals(e._viewport,e._rs.viewport)&&!r||(e._rs=RenderState.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=RenderState.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:BlendingState$1.ALPHA_BLEND}),e._rsUpdate=RenderState.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:StencilFunction$1.EQUAL,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},backFunction:StencilFunction$1.NEVER,reference:StencilConstants$1.CESIUM_3D_TILE_MASK,mask:StencilConstants$1.CESIUM_3D_TILE_MASK}})),defined(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(PassThroughDepth,{uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer,e._copyDepthCommand.renderState=e._rs,defined(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return e._globeColorTexture}},owner:e})),e._copyColorCommand.renderState=e._rs,defined(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(PassThroughDepth,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer,e._tempCopyDepthCommand.renderState=e._rs,defined(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return e._tempGlobeDepthTexture}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer,e._updateDepthCommand.renderState=e._rsUpdate,defined(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new ClearCommand({color:new Color(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e._globeColorFramebuffer,defined(e._clearPrimitiveColorCommand)||(e._clearPrimitiveColorCommand=new ClearCommand({color:new Color(0,0,0,0),stencil:0,owner:e})),e._clearPrimitiveColorCommand.framebuffer=e._primitiveColorFramebuffer,defined(e._mergeColorCommand)||(e._mergeColorCommand=t.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return e._primitiveColorTexture}},owner:e})),e._mergeColorCommand.framebuffer=e._globeColorFramebuffer,e._mergeColorCommand.renderState=e._rsBlend}function GlobeTranslucencyFramebuffer(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._packedDepthTexture=void 0,this._packedDepthFramebuffer=void 0,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new BoundingRectangle,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}function destroyResources(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&!e._depthStencilRenderbuffer.isDestroyed()&&e._depthStencilRenderbuffer.destroy(),e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy(),e._packedDepthTexture=e._packedDepthTexture&&!e._packedDepthTexture.isDestroyed()&&e._packedDepthTexture.destroy(),e._packedDepthFramebuffer=e._packedDepthFramebuffer&&!e._packedDepthFramebuffer.isDestroyed()&&e._packedDepthFramebuffer.destroy()}function createResources$5(e,t,i,r,n){n=n?t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,e._colorTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:n,sampler:Sampler.NEAREST}),t.depthTexture?e._depthStencilTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8}):e._depthStencilRenderbuffer=new Renderbuffer({context:t,width:i,height:r,format:RenderbufferFormat$1.DEPTH_STENCIL}),e._framebuffer=new Framebuffer({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,depthStencilRenderbuffer:e._depthStencilRenderbuffer,destroyAttachments:!1}),e._packedDepthTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),e._packedDepthFramebuffer=new Framebuffer({context:t,colorTextures:[e._packedDepthTexture],destroyAttachments:!1})}function updateResources(e,t,i,r,n){var a=e._colorTexture;defined(a)&&a.width===i&&a.height===r&&n===e._useHdr||(destroyResources(e),createResources$5(e,t,i,r,n))}function updateCommands(e,t,i,r,n){e._viewport.width=i,e._viewport.height=r,r=(i=!BoundingRectangle.equals(e._viewport,n.viewport))!==e._useScissorTest,e._useScissorTest=i,BoundingRectangle.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=BoundingRectangle.clone(n.viewport,e._scissorRectangle),r=!0),defined(e._renderState)&&BoundingRectangle.equals(e._viewport,e._renderState.viewport)&&!r||(e._renderState=RenderState.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),defined(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(PassThroughDepth,{uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),defined(e._clearCommand)||(e._clearCommand=new ClearCommand({color:new Color(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e._framebuffer,e._clearCommand.renderState=e._renderState}Object.defineProperties(GlobeDepth.prototype,{framebuffer:{get:function(){return this._globeColorFramebuffer}},primitiveFramebuffer:{get:function(){return this._primitiveColorFramebuffer}}}),GlobeDepth.prototype.executeDebugGlobeDepth=function(e,t,i){executeDebugGlobeDepth(this,e,t,i)},GlobeDepth.prototype.update=function(e,t,i,r,n){var a=i.width;updateFramebuffers(this,e,a,i=i.height,r,n),updateCopyCommands(this,e,a,i,t),e.uniformState.globeDepthTexture=void 0,this._useHdr=r,this._clearGlobeDepth=n},GlobeDepth.prototype.executeCopyDepth=function(e,t){defined(this._copyDepthCommand)&&(this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},GlobeDepth.prototype.executeUpdateDepth=function(e,t,i){var r,n=t.framebuffer.depthStencilTexture;i||n!==this._depthStencilTexture?defined(this._updateDepthCommand)&&(defined(this._updateDepthFramebuffer)&&this._updateDepthFramebuffer.depthStencilTexture===n&&this._updateDepthFramebuffer.getColorTexture(0)===this._globeDepthTexture||(r=this._globeDepthTexture.width,i=this._globeDepthTexture.height,destroyUpdateDepthResources(this),createUpdateDepthResources(this,e,r,i,t),updateCopyCommands(this,e,r,i,t)),this._tempCopyDepthTexture=n,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)):defined(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},GlobeDepth.prototype.executeCopyColor=function(e,t){defined(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},GlobeDepth.prototype.executeMergeColor=function(e,t){defined(this._mergeColorCommand)&&this._mergeColorCommand.execute(e,t)},GlobeDepth.prototype.clear=function(e,t,i){var r=this._clearGlobeColorCommand;defined(r)&&(Color.clone(i,r.color),r.execute(e,t)),defined(r=this._clearPrimitiveColorCommand)&&defined(this._primitiveColorFramebuffer)&&r.execute(e,t)},GlobeDepth.prototype.isDestroyed=function(){return!1},GlobeDepth.prototype.destroy=function(){return destroyTextures(this),destroyFramebuffers$1(this),destroyPrimitiveFramebuffer(this),destroyUpdateDepthResources(this),defined(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),defined(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),defined(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),defined(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),defined(this._mergeColorCommand)&&(this._mergeColorCommand.shaderProgram=this._mergeColorCommand.shaderProgram.destroy()),defined(this._debugGlobeDepthViewportCommand)&&(this._debugGlobeDepthViewportCommand.shaderProgram=this._debugGlobeDepthViewportCommand.shaderProgram.destroy()),destroyObject(this)},Object.defineProperties(GlobeTranslucencyFramebuffer.prototype,{classificationTexture:{get:function(){return this._colorTexture}},classificationFramebuffer:{get:function(){return this._framebuffer}}}),GlobeTranslucencyFramebuffer.prototype.updateAndClear=function(e,t,i,r){var n=t.width;updateResources(this,i,n,t=t.height,e),updateCommands(this,i,n,t,r),this._useHdr=e},GlobeTranslucencyFramebuffer.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},GlobeTranslucencyFramebuffer.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this._packedDepthTexture},GlobeTranslucencyFramebuffer.prototype.isDestroyed=function(){return!1},GlobeTranslucencyFramebuffer.prototype.destroy=function(){return destroyResources(this),destroyObject(this)};var DerivedCommandType={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},derivedCommandsMaximumLength=DerivedCommandType.DERIVED_COMMANDS_MAXIMUM_LENGTH,DerivedCommandNames=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function GlobeTranslucencyState(){this._frontFaceAlphaByDistance=new NearFarScalar(0,1,0,1),this._backFaceAlphaByDistance=new NearFarScalar(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=Rectangle.clone(Rectangle.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(derivedCommandsMaximumLength),this._derivedBlendCommandTypes=new Array(derivedCommandsMaximumLength),this._derivedPickCommandTypes=new Array(derivedCommandsMaximumLength),this._derivedCommandTypesToUpdate=new Array(derivedCommandsMaximumLength),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function updateAlphaByDistance(e,t,i,r){return e?defined(i)?(NearFarScalar.clone(i,r),r.nearValue*=t,r.farValue*=t):(r.nearValue=t,r.farValue=t):(r.nearValue=1,r.farValue=1),r}function isFaceTranslucent(e,t,i){return e&&(i.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function isSunVisibleThroughGlobe(e,t){var i=e._frontFaceTranslucent;e=e._backFaceTranslucent;return i&&(t.cameraUnderground||e)}function isEnvironmentVisible(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function useDepthPlane(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function requiresManualDepthTest(e,t,i){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!i.depthTestAgainstTerrain&&t.mode!==SceneMode$1.SCENE2D&&t.context.depthTexture}function getNumberOfTextureUniforms(e){var t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function gatherDerivedCommandRequirements(e,t){e._derivedCommandsLength=getDerivedCommandTypes(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=getDerivedCommandTypes(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=getDerivedCommandTypes(e,t,!1,!0,e._derivedPickCommandTypes);for(var i=0,r=0;r<e._derivedCommandsLength;++r)i|=1<<e._derivedCommandTypes[r];for(r=0;r<e._derivedBlendCommandsLength;++r)i|=1<<e._derivedBlendCommandTypes[r];for(r=0;r<e._derivedPickCommandsLength;++r)i|=1<<e._derivedPickCommandTypes[r];var n=0;for(r=0;r<derivedCommandsMaximumLength;++r)0<(i&1<<r)&&(e._derivedCommandTypesToUpdate[n++]=r);e._derivedCommandsToUpdateLength=n,t=i!==e._derivedCommandKey,e._derivedCommandKey=i,e._derivedCommandsDirty=t,!defined(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=createDerivedCommandPacks())}function getDerivedCommandTypes(e,t,i,r,n){var a=0,o=e._frontFaceTranslucent,s=e._backFaceTranslucent;if(!o)return a;var l=t.cameraUnderground;o=e._requiresManualDepthTest,e=r?DerivedCommandType.PICK_FRONT_FACE:o?DerivedCommandType.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:DerivedCommandType.TRANSLUCENT_FRONT_FACE,o=r?DerivedCommandType.PICK_BACK_FACE:o?DerivedCommandType.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:DerivedCommandType.TRANSLUCENT_BACK_FACE;return t.mode===SceneMode$1.SCENE2D?(n[a++]=DerivedCommandType.DEPTH_ONLY_FRONT_FACE,n[a++]=e):s?(i||(n[a++]=DerivedCommandType.DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(n[a++]=e,n[a++]=o):(n[a++]=o,n[a++]=e)):l?(i||(n[a++]=DerivedCommandType.DEPTH_ONLY_BACK_FACE),n[a++]=DerivedCommandType.OPAQUE_FRONT_FACE,n[a++]=o):(i||(n[a++]=DerivedCommandType.DEPTH_ONLY_FRONT_FACE),n[a++]=DerivedCommandType.OPAQUE_BACK_FACE,n[a++]=e),a}function removeDefine(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function hasDefine(e,t){return-1<e.indexOf(t)}function getOpaqueFrontFaceShaderProgram(e,t){removeDefine(e.defines,"TRANSLUCENT"),removeDefine(t.defines,"TRANSLUCENT")}function getOpaqueBackFaceShaderProgram(e,t){removeDefine(e.defines,"GROUND_ATMOSPHERE"),removeDefine(t.defines,"GROUND_ATMOSPHERE"),removeDefine(e.defines,"FOG"),removeDefine(t.defines,"FOG"),removeDefine(e.defines,"TRANSLUCENT"),removeDefine(t.defines,"TRANSLUCENT")}function getDepthOnlyShaderProgram$1(e,t){hasDefine(t.defines,"TILE_LIMIT_RECTANGLE")||hasDefine(t.defines,"ENABLE_CLIPPING_PLANES")||(t.sources=["void main() \n{ \n    gl_FragColor = vec4(1.0); \n} \n"])}function getTranslucentShaderProgram(e,t){for(var i=t.sources,r=i.length,n=0;n<r;++n)i[n]=ShaderSource.replaceMain(i[n],"czm_globe_translucency_main");i.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n    vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n    float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st)); \n    if (logDepthOrDepth != 0.0) \n    { \n        vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n        float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n        if (v_positionEC.z < depthEC) \n        { \n            discard; \n        } \n    } \n#endif \n    czm_globe_translucency_main(); \n    vec4 classificationColor = texture2D(u_classificationTexture, st); \n    if (classificationColor.a > 0.0) \n    { \n        // Reverse premultiplication process to get the correct composited result of the classification primitives \n        classificationColor.rgb /= classificationColor.a; \n    } \n    gl_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + gl_FragColor * (1.0 - classificationColor.a); \n} \n")}function getTranslucentBackFaceShaderProgram(e,t){getTranslucentShaderProgram(e,t),removeDefine(e.defines,"GROUND_ATMOSPHERE"),removeDefine(t.defines,"GROUND_ATMOSPHERE"),removeDefine(e.defines,"FOG"),removeDefine(t.defines,"FOG")}function getTranslucentFrontFaceManualDepthTestShaderProgram(e,t){getTranslucentShaderProgram(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function getTranslucentBackFaceManualDepthTestShaderProgram(e,t){getTranslucentBackFaceShaderProgram(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function getPickShaderProgram$1(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n    vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n    vec4 pickColor = texture2D(u_classificationTexture, st); \n    if (pickColor == vec4(0.0)) \n    { \n        discard; \n    } \n    gl_FragColor = pickColor; \n} \n"]}function getDerivedShaderProgram(e,t,i,r,n,a){if(!defined(n))return t;if(!r&&defined(i))return i;var o,s=e.shaderCache.getDerivedShaderProgram(t,a);return defined(s)||(o=t._attributeLocations,r=t.vertexShaderSource.clone(),i=t.fragmentShaderSource.clone(),r.defines=defined(r.defines)?r.defines.slice(0):[],i.defines=defined(i.defines)?i.defines.slice(0):[],n(r,i),s=e.shaderCache.createDerivedShaderProgram(t,a,{vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:o})),s}function getOpaqueFrontFaceRenderState(e){e.cull.face=CullFace$1.BACK,e.cull.enabled=!0}function getOpaqueBackFaceRenderState(e){e.cull.face=CullFace$1.FRONT,e.cull.enabled=!0}function getDepthOnlyFrontFaceRenderState(e){e.cull.face=CullFace$1.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function getDepthOnlyBackFaceRenderState(e){e.cull.face=CullFace$1.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function getDepthOnlyFrontAndBackFaceRenderState(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function getTranslucentFrontFaceRenderState(e){e.cull.face=CullFace$1.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND}function getTranslucentBackFaceRenderState(e){e.cull.face=CullFace$1.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND}function getPickFrontFaceRenderState(e){e.cull.face=CullFace$1.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function getPickBackFaceRenderState(e){e.cull.face=CullFace$1.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function getDerivedRenderState(e,t,i,r,n){return defined(r)?(!i&&defined(t)||defined(t=n[e.id])||(r(r=RenderState.getState(e)),t=RenderState.fromCache(r),n[e.id]=t),t):e}function getTranslucencyUniformMap(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function getDerivedUniformMap(e,t,i,r,n){return defined(n)?!r&&defined(i)?i:combine(t,n(e),!1):t}function DerivedCommandPack(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function createDerivedCommandPacks(){return[new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getOpaqueFrontFaceShaderProgram,getRenderStateFunction:getOpaqueFrontFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getOpaqueBackFaceShaderProgram,getRenderStateFunction:getOpaqueBackFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getDepthOnlyShaderProgram$1,getRenderStateFunction:getDepthOnlyFrontFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getDepthOnlyShaderProgram$1,getRenderStateFunction:getDepthOnlyBackFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getDepthOnlyShaderProgram$1,getRenderStateFunction:getDepthOnlyFrontAndBackFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:getTranslucentShaderProgram,getRenderStateFunction:getTranslucentFrontFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:getTranslucentBackFaceShaderProgram,getRenderStateFunction:getTranslucentBackFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:getTranslucentFrontFaceManualDepthTestShaderProgram,getRenderStateFunction:getTranslucentFrontFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:getTranslucentBackFaceManualDepthTestShaderProgram,getRenderStateFunction:getTranslucentBackFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:getPickShaderProgram$1,getRenderStateFunction:getPickFrontFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:getPickShaderProgram$1,getRenderStateFunction:getPickBackFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap})]}Object.defineProperties(GlobeTranslucencyState.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}}),GlobeTranslucencyState.prototype.update=function(e){var t=e.globe;if(!defined(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=updateAlphaByDistance(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=updateAlphaByDistance(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=isFaceTranslucent(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=isFaceTranslucent(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=requiresManualDepthTest(this,e,t),this._sunVisibleThroughGlobe=isSunVisibleThroughGlobe(this,e),this._environmentVisible=isEnvironmentVisible(this,e),this._useDepthPlane=useDepthPlane(this,e),this._numberOfTextureUniforms=getNumberOfTextureUniforms(this),this._rectangle=Rectangle.clone(t.translucency.rectangle,this._rectangle),gatherDerivedCommandRequirements(this,e)};var derivedCommandNames=new Array(derivedCommandsMaximumLength),derivedCommandPacks=new Array(derivedCommandsMaximumLength);function updateDerivedCommands(e,t,i,r,n,a,o){var s=t.derivedCommands.globeTranslucency,l=e._derivedCommandsDirty;if(t.dirty||!defined(s)||l){t.dirty=!1,defined(s)||(s={},t.derivedCommands.globeTranslucency=s);var c=o.frameNumber,u=defaultValue(s.uniformMapDirtyFrame,0),d=defaultValue(s.shaderProgramDirtyFrame,0),h=defaultValue(s.renderStateDirtyFrame,0),p=s.uniformMap!==t.uniformMap,f=s.shaderProgramId!==t.shaderProgram.id,m=s.renderStateId!==t.renderState.id;p&&(s.uniformMapDirtyFrame=c),f&&(s.shaderProgramDirtyFrame=c),m&&(s.renderStateDirtyFrame=c),s.uniformMap=t.uniformMap,s.shaderProgramId=t.shaderProgram.id,s.renderStateId=t.renderState.id;for(var g=0;g<i;++g){var y,_,v=a[g],C=r[g],x=n[g],b=defined(S=s[x])?(y=S.uniformMap,_=S.shaderProgram,S.renderState):_=y=void 0,S=DrawCommand.shallowClone(t,S),T=defaultValue((s[x]=S).derivedCommands.uniformMapDirtyFrame,0),E=defaultValue(S.derivedCommands.shaderProgramDirtyFrame,0),w=defaultValue(S.derivedCommands.renderStateDirtyFrame,0);E=f||E<d,w=m||w<h;(T=p||T<u)&&(S.derivedCommands.uniformMapDirtyFrame=c),E&&(S.derivedCommands.shaderProgramDirtyFrame=c),w&&(S.derivedCommands.renderStateDirtyFrame=c),S.derivedCommands.type=C,S.pass=v.pass,S.pickOnly=v.pickOnly,S.uniformMap=getDerivedUniformMap(e,t.uniformMap,y,T,v.getUniformMapFunction),S.shaderProgram=getDerivedShaderProgram(o.context,t.shaderProgram,_,E,v.getShaderProgramFunction,x),S.renderState=getDerivedRenderState(t.renderState,b,w,v.getRenderStateFunction,v.renderStateCache)}}}function executeCommandsMatchingType(e,t,i,r,n,a,o){for(var s=0;s<t;++s){var l=e[s],c=l.derivedCommands.type;(!defined(o)||-1<o.indexOf(c))&&i(l,r,n,a)}}function executeCommands(e,t,i,r,n,a){for(var o=0;o<t;++o)i(e[o],r,n,a)}GlobeTranslucencyState.prototype.updateDerivedCommands=function(e,t){var i=this._derivedCommandTypesToUpdate,r=this._derivedCommandsToUpdateLength;if(0!==r){for(var n=0;n<r;++n)derivedCommandPacks[n]=this._derivedCommandPacks[i[n]],derivedCommandNames[n]=DerivedCommandNames[i[n]];updateDerivedCommands(this,e,r,i,derivedCommandNames,derivedCommandPacks,t)}},GlobeTranslucencyState.prototype.pushDerivedCommands=function(e,t,i){var r=i.passes.pick;if(!r||!t){var n=this._derivedCommandTypes,a=this._derivedCommandsLength;if(r?(n=this._derivedPickCommandTypes,a=this._derivedPickCommandsLength):t&&(n=this._derivedBlendCommandTypes,a=this._derivedBlendCommandsLength),0!==a)for(var o=e.derivedCommands.globeTranslucency,s=0;s<a;++s){var l=DerivedCommandNames[n[s]];i.commandList.push(o[l])}else i.commandList.push(e)}};var opaqueTypes=[DerivedCommandType.OPAQUE_FRONT_FACE,DerivedCommandType.OPAQUE_BACK_FACE],depthOnlyTypes=[DerivedCommandType.DEPTH_ONLY_FRONT_FACE,DerivedCommandType.DEPTH_ONLY_BACK_FACE,DerivedCommandType.DEPTH_ONLY_FRONT_AND_BACK_FACE];function GoogleEarthEnterpriseDiscardPolicy(){this._image=new Image}function GoogleEarthEnterpriseImageryProvider(e){var t;e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,t=defined(e.metadata)?e.metadata:new GoogleEarthEnterpriseMetadata(Resource.createIfNeeded(e.url)),this._metadata=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new GeographicTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Rectangle(-CesiumMath.PI,-CesiumMath.PI,CesiumMath.PI,CesiumMath.PI),ellipsoid:e.ellipsoid}),"string"==typeof(e=e.credit)&&(e=new Credit(e)),this._credit=e,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,defined(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new GoogleEarthEnterpriseDiscardPolicy),this._errorEvent=new Event,this._ready=!1;var i,r=this;this._readyPromise=t.readyPromise.then((function(e){return t.imageryPresent?(TileProviderError.handleSuccess(i),r._ready=e):(e=new RuntimeError("The server "+t.url+" doesn't have imagery"),i=TileProviderError.handleError(i,r,r._errorEvent,e.message,void 0,void 0,void 0,e),when.reject(e))})).otherwise((function(e){return i=TileProviderError.handleError(i,r,r._errorEvent,e.message,void 0,void 0,void 0,e),when.reject(e)}))}function buildImageResource$2(e,t,i,r,n,a){return n=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(i,r,n),t=defined(t=t.imageryVersion)&&0<t?t:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1-0"+n+"-i."+t.toString(),request:a})}function getImageType(e){var t="JFIF";return e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3)?"image/jpeg":e[1]==="PNG".charCodeAt(0)&&e[2]==="PNG".charCodeAt(1)&&e[3]==="PNG".charCodeAt(2)?"image/png":void 0}function decodeEarthImageryPacket(e){for(var t=protobuf.Reader.create(e),i=t.len,r={};t.pos<i;){var n=t.uint32();switch(n>>>3){case 1:r.imageType=t.uint32();break;case 2:r.imageData=t.bytes();break;case 3:r.alphaType=t.uint32();break;case 4:r.imageAlpha=t.bytes();break;case 5:var a=r.copyrightIds;if(defined(a)||(a=r.copyrightIds=[]),2==(7&n))for(var o=t.uint32()+t.pos;t.pos<o;)a.push(t.uint32());else a.push(t.uint32());break;default:t.skipType(7&n)}}if(defined(e=r.imageType))switch(e){case 0:r.imageType="image/jpeg";break;case 4:r.imageType="image/png";break;default:throw new RuntimeError("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}return defined(e=r.alphaType)&&0!==e&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete r.alphaType,delete r.imageAlpha),r}function GoogleEarthEnterpriseMapsProvider(e){e=defaultValue(e,{}),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=1.9,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=e.url,i=defaultValue(e.path,"/default_map"),r=Resource.createIfNeeded(t).getDerivedResource({url:"/"===i[0]?i.substring(1):i});r.appendForwardSlash(),this._resource=r,this._url=t,this._path=i,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new Credit('<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="'+GoogleEarthEnterpriseMapsProvider.logoUrl+'" title="Google Imagery"/></a>'),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer();var n,a=r.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),o=this;function s(t){var i,r;try{i=JSON.parse(t)}catch(r){i=JSON.parse(t.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var a,s=0;s<i.layers.length;s++)if(i.layers[s].id===o._channel){r=i.layers[s];break}if(!defined(r))throw a="Could not find layer with channel (id) of "+o._channel+".",n=TileProviderError.handleError(n,o,o._errorEvent,a,void 0,void 0,void 0,c),new RuntimeError(a);if(!defined(r.version))throw a="Could not find a version in channel (id) "+o._channel+".",n=TileProviderError.handleError(n,o,o._errorEvent,a,void 0,void 0,void 0,c),new RuntimeError(a);if(o._version=r.version,defined(i.projection)&&"flat"===i.projection)o._tilingScheme=new GeographicTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Rectangle(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:e.ellipsoid});else{if(defined(i.projection)&&"mercator"!==i.projection)throw a="Unsupported projection "+i.projection+".",n=TileProviderError.handleError(n,o,o._errorEvent,a,void 0,void 0,void 0,c),new RuntimeError(a);o._tilingScheme=new WebMercatorTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid})}o._ready=!0,o._readyPromise.resolve(!0),TileProviderError.handleSuccess(n)}function l(e){var t="An error occurred while accessing "+a.url+".";n=TileProviderError.handleError(n,o,o._errorEvent,t,void 0,void 0,void 0,c),o._readyPromise.reject(new RuntimeError(t))}function c(){when(a.fetchText(),s,l)}c()}GlobeTranslucencyState.prototype.executeGlobeCommands=function(e,t,i,r,n){var a=r.context,o=e.commands[Pass$1.GLOBE];0!==(e=e.indices[Pass$1.GLOBE])&&((this._globeTranslucencyFramebuffer=i).clearClassification(a,n),executeCommandsMatchingType(o,e,t,r,a,n,opaqueTypes))},GlobeTranslucencyState.prototype.executeGlobeClassificationCommands=function(e,t,i,r,n){var a,o=r.context,s=e.commands[Pass$1.GLOBE],l=e.indices[Pass$1.GLOBE],c=e.commands[Pass$1.TERRAIN_CLASSIFICATION],u=e.indices[Pass$1.TERRAIN_CLASSIFICATION];0!==l&&0!==u&&(a=this._frontFaceTranslucent,e=this._backFaceTranslucent,a&&e||executeCommands(c,u,t,r,o,n),(a||e)&&(this._globeTranslucencyFramebuffer=i,a=o.uniformState.globeDepthTexture,e=n.framebuffer,n.framebuffer=i.classificationFramebuffer,executeCommandsMatchingType(s,l,t,r,o,n,depthOnlyTypes),o.depthTexture&&(i=i.packDepth(o,n),o.uniformState.globeDepthTexture=i),executeCommands(c,u,t,r,o,n),o.uniformState.globeDepthTexture=a,n.framebuffer=e))},GoogleEarthEnterpriseDiscardPolicy.prototype.isReady=function(){return!0},GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage=function(e){return e===this._image},Object.defineProperties(GoogleEarthEnterpriseImageryProvider.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}}),GoogleEarthEnterpriseImageryProvider.prototype.getTileCredits=function(e,t,i){var r=this._metadata;if(defined(i=r.getTileInformation(e,t,i))&&defined(i=r.providers[i.imageryProvider]))return[i]},GoogleEarthEnterpriseImageryProvider.prototype.requestImage=function(e,t,i,r){var n=this._tileDiscardPolicy._image,a=this._metadata,o=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),s=a.getTileInformation(e,t,i);return defined(s)?s.hasImagery()?defined(r=buildImageResource$2(this,s,e,t,i,r).fetchArrayBuffer())?r.then((function(e){decodeGoogleEarthEnterpriseData(a.key,e);var t,i=new Uint8Array(e);return defined(e=a.protoImagery)&&e||(t=getImageType(i)),defined(t)||defined(e)&&!e||(t=(e=decodeEarthImageryPacket(i)).imageType,i=e.imageData),defined(t)&&defined(i)?loadImageFromTypedArray({uint8Array:i,format:t,flipY:!0}):n})):void 0:n:a.isValid(o)?(o=new Request({throttle:r.throttle,throttleByServer:r.throttleByServer,type:r.type,priorityFunction:r.priorityFunction}),void a.populateSubtree(e,t,i,o)):n},GoogleEarthEnterpriseImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),GoogleEarthEnterpriseMapsProvider.prototype.getTileCredits=function(e,t,i){},GoogleEarthEnterpriseMapsProvider.prototype.requestImage=function(e,t,i,r){return i=this._resource.getDerivedResource({url:"query",request:r,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:i+1}}),ImageryProvider.loadImage(this,i)},GoogleEarthEnterpriseMapsProvider.prototype.pickFeatures=function(e,t,i,r,n){},GoogleEarthEnterpriseMapsProvider._logoUrl=void 0,Object.defineProperties(GoogleEarthEnterpriseMapsProvider,{logoUrl:{get:function(){return defined(GoogleEarthEnterpriseMapsProvider._logoUrl)||(GoogleEarthEnterpriseMapsProvider._logoUrl=buildModuleUrl("Assets/Images/google_earth_credit.png")),GoogleEarthEnterpriseMapsProvider._logoUrl},set:function(e){GoogleEarthEnterpriseMapsProvider._logoUrl=e}}});var defaultColor$8=new Color(1,1,1,.4),defaultGlowColor=new Color(0,1,0,.05),defaultBackgroundColor$2=new Color(0,.5,0,.2);function GridImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._tilingScheme=defined(e.tilingScheme)?e.tilingScheme:new GeographicTilingScheme({ellipsoid:e.ellipsoid}),this._cells=defaultValue(e.cells,8),this._color=defaultValue(e.color,defaultColor$8),this._glowColor=defaultValue(e.glowColor,defaultGlowColor),this._glowWidth=defaultValue(e.glowWidth,6),this._backgroundColor=defaultValue(e.backgroundColor,defaultBackgroundColor$2),this._errorEvent=new Event,this._tileWidth=defaultValue(e.tileWidth,256),this._tileHeight=defaultValue(e.tileHeight,256),this._canvasSize=defaultValue(e.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=when.resolve(!0)}function InvertClassification(){this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._texture=void 0,this._classifiedTexture=void 0,this._depthStencilTexture=void 0,this._fbo=void 0,this._fboClassified=void 0,this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new ClearCommand({color:new Color(0,0,0,0),owner:this}),this._clearCommand=new ClearCommand({color:new Color(0,0,0,0),depth:1,stencil:0});var e=this;this._uniformMap={colorTexture:function(){return e._texture},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._classifiedTexture}}}Object.defineProperties(GridImageryProvider.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),GridImageryProvider.prototype._drawGrid=function(e){for(var t=this._canvasSize,i=0;i<=this._cells;++i){var r=1+i/this._cells*(t-1);e.moveTo(r,0),e.lineTo(r,t),e.moveTo(0,r),e.lineTo(t,r)}e.stroke()},GridImageryProvider.prototype._createGridCanvas=function(){var e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;var t=this._canvasSize,i=e.getContext("2d"),r=this._backgroundColor.toCssColorString();return i.fillStyle=r,i.fillRect(0,0,t,t),r=this._glowColor.toCssColorString(),i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),i.lineWidth=.5*this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),r=this._color.toCssColorString(),i.strokeStyle=r,i.lineWidth=2,i.strokeRect(0,0,t,t),i.lineWidth=1,this._drawGrid(i),e},GridImageryProvider.prototype.getTileCredits=function(e,t,i){},GridImageryProvider.prototype.requestImage=function(e,t,i,r){return this._canvas},GridImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},Object.defineProperties(InvertClassification.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),InvertClassification.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var rsUnclassified={depthMask:!1,stencilTest:{enabled:!0,frontFunction:StencilFunction$1.EQUAL,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},backFunction:StencilFunction$1.NEVER,reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},blending:BlendingState$1.ALPHA_BLEND},rsClassified={depthMask:!1,stencilTest:{enabled:!0,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},backFunction:StencilFunction$1.NEVER,reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},blending:BlendingState$1.ALPHA_BLEND},rsDefault={depthMask:!0,depthTest:{enabled:!0},stencilTest:StencilConstants$1.setCesium3DTileBit(),stencilMask:StencilConstants$1.CESIUM_3D_TILE_MASK,blending:BlendingState$1.ALPHA_BLEND},translucentFS="#extension GL_EXT_frag_depth : enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    vec4 color = texture2D(colorTexture, v_textureCoordinates);\n    if (color.a == 0.0)\n    {\n        discard;\n    }\n    bool isClassified = all(equal(texture2D(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n    vec4 highlightColor = czm_invertClassificationColor;\n    if (isClassified)\n    {\n        discard;\n    }\n#else\n    vec4 highlightColor = vec4(1.0);\n    if (!isClassified)\n    {\n        discard;\n    }\n#endif\n    gl_FragColor = color * highlightColor;\n    gl_FragDepthEXT = texture2D(depthTexture, v_textureCoordinates).r;\n}\n",opaqueFS="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    vec4 color = texture2D(colorTexture, v_textureCoordinates);\n    if (color.a == 0.0)\n    {\n        discard;\n    }\n#ifdef UNCLASSIFIED\n    gl_FragColor = color * czm_invertClassificationColor;\n#else\n    gl_FragColor = color;\n#endif\n}\n";InvertClassification.prototype.update=function(e){var t=!defined(n=this._texture)||this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;var i,r,n,a=e.drawingBufferWidth,o=e.drawingBufferHeight;((n=!defined(n)||n.width!==a||n.height!==o)||t)&&(this._texture=this._texture&&this._texture.destroy(),this._classifiedTexture=this._classifiedTexture&&this._classifiedTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._texture=new Texture({context:e,width:a,height:o,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR})}),defined(this._previousFramebuffer)||(this._classifiedTexture=new Texture({context:e,width:a,height:o,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR})}),this._depthStencilTexture=new Texture({context:e,width:a,height:o,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8}))),defined(this._fbo)&&!n&&!t||(this._fbo=this._fbo&&this._fbo.destroy(),this._fboClassified=this._fboClassified&&this._fboClassified.destroy(),defined(this._previousFramebuffer)?(r=this._previousFramebuffer.depthStencilTexture,i=this._previousFramebuffer.depthStencilRenderbuffer):r=this._depthStencilTexture,this._fbo=new Framebuffer({context:e,colorTextures:[this._texture],depthStencilTexture:r,depthStencilRenderbuffer:i,destroyAttachments:!1}),defined(this._previousFramebuffer)||(this._fboClassified=new Framebuffer({context:e,colorTextures:[this._classifiedTexture],depthStencilTexture:r,destroyAttachments:!1}))),defined(this._rsUnclassified)||(this._rsUnclassified=RenderState.fromCache(rsUnclassified),this._rsClassified=RenderState.fromCache(rsClassified),this._rsDefault=RenderState.fromCache(rsDefault)),defined(this._unclassifiedCommand)&&!t||(defined(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),t=new ShaderSource({defines:["UNCLASSIFIED"],sources:[r=defined(this._previousFramebuffer)?opaqueFS:translucentFS]}),r=new ShaderSource({sources:[r]}),this._unclassifiedCommand=e.createViewportQuadCommand(t,{renderState:defined(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(r,{renderState:defined(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),defined(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),defined(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(PassThrough,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this})))},InvertClassification.prototype.clear=function(e,t){var i=t.framebuffer;defined(this._previousFramebuffer)?(t.framebuffer=this._fbo,this._clearColorCommand.execute(e,t)):(t.framebuffer=this._fbo,this._clearCommand.execute(e,t),t.framebuffer=this._fboClassified,this._clearCommand.execute(e,t)),t.framebuffer=i},InvertClassification.prototype.executeClassified=function(e,t){var i;defined(this._previousFramebuffer)||(i=t.framebuffer,t.framebuffer=this._fboClassified,this._translucentCommand.execute(e,t),t.framebuffer=i),this._classifiedCommand.execute(e,t)},InvertClassification.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},InvertClassification.prototype.isDestroyed=function(){return!1},InvertClassification.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._texture=this._texture&&this._texture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),defined(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),destroyObject(this)};var templateRegex=/{[^}]+}/g,tags={x:xTag,y:yTag,z:zTag,s:sTag,reverseX:reverseXTag,reverseY:reverseYTag,reverseZ:reverseZTag,westDegrees:westDegreesTag,southDegrees:southDegreesTag,eastDegrees:eastDegreesTag,northDegrees:northDegreesTag,westProjected:westProjectedTag,southProjected:southProjectedTag,eastProjected:eastProjectedTag,northProjected:northProjectedTag,width:widthTag,height:heightTag},pickFeaturesTags=combine(tags,{i:iTag,j:jTag,reverseI:reverseITag,reverseJ:reverseJTag,longitudeDegrees:longitudeDegreesTag,latitudeDegrees:latitudeDegreesTag,longitudeProjected:longitudeProjectedTag,latitudeProjected:latitudeProjectedTag,format:formatTag});function UrlTemplateImageryProvider(e){this._errorEvent=new Event,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this.enablePickFeatures=!0,this.reinitialize(e)}Object.defineProperties(UrlTemplateImageryProvider.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return defined(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}}),UrlTemplateImageryProvider.prototype.reinitialize=function(e){var t=this;t._readyPromise=when(e).then((function(e){var i=e.customTags,r=combine(tags,i),n=combine(pickFeaturesTags,i),a=Resource.createIfNeeded(e.url);i=Resource.createIfNeeded(e.pickFeaturesUrl);return t.enablePickFeatures=defaultValue(e.enablePickFeatures,t.enablePickFeatures),t._urlSchemeZeroPadding=defaultValue(e.urlSchemeZeroPadding,t.urlSchemeZeroPadding),t._tileDiscardPolicy=e.tileDiscardPolicy,t._getFeatureInfoFormats=e.getFeatureInfoFormats,t._subdomains=e.subdomains,Array.isArray(t._subdomains)?t._subdomains=t._subdomains.slice():defined(t._subdomains)&&0<t._subdomains.length?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=defaultValue(e.tileWidth,256),t._tileHeight=defaultValue(e.tileHeight,256),t._minimumLevel=defaultValue(e.minimumLevel,0),t._maximumLevel=e.maximumLevel,t._tilingScheme=defaultValue(e.tilingScheme,new WebMercatorTilingScheme({ellipsoid:e.ellipsoid})),t._rectangle=defaultValue(e.rectangle,t._tilingScheme.rectangle),t._rectangle=Rectangle.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=defaultValue(e.hasAlphaChannel,!0),"string"==typeof(e=e.credit)&&(e=new Credit(e)),t._credit=e,t._resource=a,t._tags=r,t._pickFeaturesResource=i,t._pickFeaturesTags=n,!0}))},UrlTemplateImageryProvider.prototype.getTileCredits=function(e,t,i){},UrlTemplateImageryProvider.prototype.requestImage=function(e,t,i,r){return ImageryProvider.loadImage(this,buildImageResource$3(this,e,t,i,r))},UrlTemplateImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){if(this.enablePickFeatures&&defined(this._pickFeaturesResource)&&0!==this._getFeatureInfoFormats.length){var a=0,o=this;return function s(){if(a>=o._getFeatureInfoFormats.length)return when([]);var l=o._getFeatureInfoFormats[a],c=buildPickFeaturesResource(o,e,t,i,r,n,l.format);return++a,("json"===l.type?c.fetchJson().then(l.callback):"xml"===l.type?c.fetchXML().then(l.callback):"text"===l.type||"html"===l.type?c.fetchText().then(l.callback):c.fetch({responseType:l.format}).then(function(e,t){return e.callback(t)}.bind(void 0,l))).otherwise(s)}()}};var degreesScratchComputed=!1,degreesScratch=new Rectangle,projectedScratchComputed=!1,projectedScratch=new Rectangle;function buildImageResource$3(e,t,i,r,n){projectedScratchComputed=degreesScratchComputed=!1;var a=e._resource,o=a.getUrlComponent(!0),s=e._tags,l={};return defined(o=o.match(templateRegex))&&o.forEach((function(n){n=n.substring(1,n.length-1),defined(s[n])&&(l[n]=s[n](e,t,i,r))})),a.getDerivedResource({request:n,templateValues:l})}var ijScratchComputed=!1,ijScratch=new Cartesian2,longitudeLatitudeProjectedScratchComputed=!1;function buildPickFeaturesResource(e,t,i,r,n,a,o){longitudeLatitudeProjectedScratchComputed=ijScratchComputed=projectedScratchComputed=degreesScratchComputed=!1;var s=e._pickFeaturesResource,l=s.getUrlComponent(!0),c=e._pickFeaturesTags,u={};return defined(l=l.match(templateRegex))&&l.forEach((function(s){s=s.substring(1,s.length-1),defined(c[s])&&(u[s]=c[s](e,t,i,r,n,a,o))})),s.getDerivedResource({templateValues:u})}function padWithZerosIfNecessary(e,t,i){return e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)&&("string"!=typeof(t=e.urlSchemeZeroPadding[t])||1<(t=t.length)&&(i=i.length>=t?i:new Array(t-i.toString().length+1).join("0")+i)),i}function xTag(e,t,i,r){return padWithZerosIfNecessary(e,"{x}",t)}function reverseXTag(e,t,i,r){return t=e.tilingScheme.getNumberOfXTilesAtLevel(r)-t-1,padWithZerosIfNecessary(e,"{reverseX}",t)}function yTag(e,t,i,r){return padWithZerosIfNecessary(e,"{y}",i)}function reverseYTag(e,t,i,r){return i=e.tilingScheme.getNumberOfYTilesAtLevel(r)-i-1,padWithZerosIfNecessary(e,"{reverseY}",i)}function reverseZTag(e,t,i,r){var n=e.maximumLevel;return padWithZerosIfNecessary(e,"{reverseZ}",defined(n)&&r<n?n-r-1:r)}function zTag(e,t,i,r){return padWithZerosIfNecessary(e,"{z}",r)}function sTag(e,t,i,r){return r=(t+i+r)%e._subdomains.length,e._subdomains[r]}function computeDegrees(e,t,i,r){degreesScratchComputed||(e.tilingScheme.tileXYToRectangle(t,i,r,degreesScratch),degreesScratch.west=CesiumMath.toDegrees(degreesScratch.west),degreesScratch.south=CesiumMath.toDegrees(degreesScratch.south),degreesScratch.east=CesiumMath.toDegrees(degreesScratch.east),degreesScratch.north=CesiumMath.toDegrees(degreesScratch.north),degreesScratchComputed=!0)}function westDegreesTag(e,t,i,r){return computeDegrees(e,t,i,r),degreesScratch.west}function southDegreesTag(e,t,i,r){return computeDegrees(e,t,i,r),degreesScratch.south}function eastDegreesTag(e,t,i,r){return computeDegrees(e,t,i,r),degreesScratch.east}function northDegreesTag(e,t,i,r){return computeDegrees(e,t,i,r),degreesScratch.north}function computeProjected(e,t,i,r){projectedScratchComputed||(e.tilingScheme.tileXYToNativeRectangle(t,i,r,projectedScratch),projectedScratchComputed=!0)}function westProjectedTag(e,t,i,r){return computeProjected(e,t,i,r),projectedScratch.west}function southProjectedTag(e,t,i,r){return computeProjected(e,t,i,r),projectedScratch.south}function eastProjectedTag(e,t,i,r){return computeProjected(e,t,i,r),projectedScratch.east}function northProjectedTag(e,t,i,r){return computeProjected(e,t,i,r),projectedScratch.north}function widthTag(e,t,i,r){return e.tileWidth}function heightTag(e,t,i,r){return e.tileHeight}function iTag(e,t,i,r,n,a,o){return computeIJ(e,t,i,r,n,a),ijScratch.x}function jTag(e,t,i,r,n,a,o){return computeIJ(e,t,i,r,n,a),ijScratch.y}function reverseITag(e,t,i,r,n,a,o){return computeIJ(e,t,i,r,n,a),e.tileWidth-ijScratch.x-1}function reverseJTag(e,t,i,r,n,a,o){return computeIJ(e,t,i,r,n,a),e.tileHeight-ijScratch.y-1}var rectangleScratch$6=new Rectangle,longitudeLatitudeProjectedScratch=new Cartesian3;function computeIJ(e,t,i,r,n,a,o){ijScratchComputed||(computeLongitudeLatitudeProjected(e,t,i,r,n,a),a=longitudeLatitudeProjectedScratch,r=e.tilingScheme.tileXYToNativeRectangle(t,i,r,rectangleScratch$6),ijScratch.x=e.tileWidth*(a.x-r.west)/r.width|0,ijScratch.y=e.tileHeight*(r.north-a.y)/r.height|0,ijScratchComputed=!0)}function longitudeDegreesTag(e,t,i,r,n,a,o){return CesiumMath.toDegrees(n)}function latitudeDegreesTag(e,t,i,r,n,a,o){return CesiumMath.toDegrees(a)}function longitudeProjectedTag(e,t,i,r,n,a,o){return computeLongitudeLatitudeProjected(e,t,i,r,n,a),longitudeLatitudeProjectedScratch.x}function latitudeProjectedTag(e,t,i,r,n,a,o){return computeLongitudeLatitudeProjected(e,t,i,r,n,a),longitudeLatitudeProjectedScratch.y}var cartographicScratch$4=new Cartographic;function computeLongitudeLatitudeProjected(e,t,i,r,n,a,o){var s;longitudeLatitudeProjectedScratchComputed||(e.tilingScheme.projection instanceof GeographicProjection?(longitudeLatitudeProjectedScratch.x=CesiumMath.toDegrees(n),longitudeLatitudeProjectedScratch.y=CesiumMath.toDegrees(a)):((s=cartographicScratch$4).longitude=n,s.latitude=a,e.tilingScheme.projection.project(s,longitudeLatitudeProjectedScratch)),longitudeLatitudeProjectedScratchComputed=!0)}function formatTag(e,t,i,r,n,a,o){return o}function TileMapServiceImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t,i=when.defer();UrlTemplateImageryProvider.call(this,i.promise),this._tmsResource=void 0,this._xmlResource=void 0,this._options=e,this._deferred=i,this._metadataError=void 0,this._metadataSuccess=this._metadataSuccess.bind(this),this._metadataFailure=this._metadataFailure.bind(this),this._requestMetadata=this._requestMetadata.bind(this);var r=this;when(e.url).then((function(e){(t=Resource.createIfNeeded(e)).appendForwardSlash(),r._tmsResource=t,r._xmlResource=t.getDerivedResource({url:"tilemapresource.xml"}),r._requestMetadata()})).otherwise((function(e){i.reject(e)}))}function confineRectangleToTilingScheme(e,t){return e.west<t.rectangle.west&&(e.west=t.rectangle.west),e.east>t.rectangle.east&&(e.east=t.rectangle.east),e.south<t.rectangle.south&&(e.south=t.rectangle.south),e.north>t.rectangle.north&&(e.north=t.rectangle.north),e}function calculateSafeMinimumDetailLevel(e,t,i){var r=e.positionToTileXY(Rectangle.southwest(t),i);t=e.positionToTileXY(Rectangle.northeast(t),i);return 4<(Math.abs(t.x-r.x)+1)*(Math.abs(t.y-r.y)+1)?0:i}defined(Object.create)&&(TileMapServiceImageryProvider.prototype=Object.create(UrlTemplateImageryProvider.prototype),TileMapServiceImageryProvider.prototype.constructor=TileMapServiceImageryProvider),TileMapServiceImageryProvider.prototype._requestMetadata=function(){this._xmlResource.fetchXML().then(this._metadataSuccess).otherwise(this._metadataFailure)},TileMapServiceImageryProvider.prototype._metadataSuccess=function(e){for(var t,i,r,n=/tileformat/i,a=/tileset/i,o=/tilesets/i,s=/boundingbox/i,l=[],c=this._xmlResource,u=this._metadataError,d=this._deferred,h=this._requestMetadata,p=e.childNodes[0].childNodes,f=0;f<p.length;f++)if(n.test(p.item(f).nodeName))t=p.item(f);else if(o.test(p.item(f).nodeName)){r=p.item(f);for(var m=p.item(f).childNodes,g=0;g<m.length;g++)a.test(m.item(g).nodeName)&&l.push(m.item(g))}else s.test(p.item(f).nodeName)&&(i=p.item(f));if(!defined(r)||!defined(i))return w="Unable to find expected tilesets or bbox attributes in "+c.url+".",(u=TileProviderError.handleError(u,this,this.errorEvent,w,void 0,void 0,void 0,h)).retry||d.reject(new RuntimeError(w)),void(this._metadataError=u);var y=this._options,_=defaultValue(y.fileExtension,t.getAttribute("extension")),v=defaultValue(y.tileWidth,parseInt(t.getAttribute("width"),10)),C=defaultValue(y.tileHeight,parseInt(t.getAttribute("height"),10)),x=defaultValue(y.minimumLevel,parseInt(l[0].getAttribute("order"),10)),b=defaultValue(y.maximumLevel,parseInt(l[l.length-1].getAttribute("order"),10)),S=r.getAttribute("profile");if(!defined(e=y.tilingScheme))if("geodetic"===S||"global-geodetic"===S)e=new GeographicTilingScheme({ellipsoid:y.ellipsoid});else{if("mercator"!==S&&"global-mercator"!==S)return w=c.url+"specifies an unsupported profile attribute, "+S+".",(u=TileProviderError.handleError(u,this,this.errorEvent,w,void 0,void 0,void 0,h)).retry||d.reject(new RuntimeError(w)),void(this._metadataError=u);e=new WebMercatorTilingScheme({ellipsoid:y.ellipsoid})}var T,E,w=Rectangle.clone(y.rectangle);defined(w)||(u=defaultValue(y.flipXY,!1)?(T=new Cartesian2(parseFloat(i.getAttribute("miny")),parseFloat(i.getAttribute("minx"))),new Cartesian2(parseFloat(i.getAttribute("maxy")),parseFloat(i.getAttribute("maxx")))):(T=new Cartesian2(parseFloat(i.getAttribute("minx")),parseFloat(i.getAttribute("miny"))),new Cartesian2(parseFloat(i.getAttribute("maxx")),parseFloat(i.getAttribute("maxy")))),S="geodetic"===S||"mercator"===S,u=e.projection instanceof GeographicProjection||S?(E=Cartographic.fromDegrees(T.x,T.y),Cartographic.fromDegrees(u.x,u.y)):(E=(S=e.projection).unproject(T),S.unproject(u)),w=new Rectangle(E.longitude,E.latitude,u.longitude,u.latitude)),x=calculateSafeMinimumDetailLevel(e,w=confineRectangleToTilingScheme(w,e),x),_=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+_}),d.resolve({url:_,tilingScheme:e,rectangle:w,tileWidth:v,tileHeight:C,minimumLevel:x,maximumLevel:b,tileDiscardPolicy:y.tileDiscardPolicy,credit:y.credit})},TileMapServiceImageryProvider.prototype._metadataFailure=function(e){var t=this._options,i=defaultValue(t.fileExtension,"png"),r=defaultValue(t.tileWidth,256),n=defaultValue(t.tileHeight,256),a=t.maximumLevel,o=defined(t.tilingScheme)?t.tilingScheme:new WebMercatorTilingScheme({ellipsoid:t.ellipsoid}),s=defaultValue(t.rectangle,o.rectangle),l=calculateSafeMinimumDetailLevel(o,s=confineRectangleToTilingScheme(s,o),t.maximumLevel);i=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+i});this._deferred.resolve({url:i,tilingScheme:o,rectangle:s,tileWidth:r,tileHeight:n,minimumLevel:l,maximumLevel:a,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit})};var trailingSlashRegex=/\/$/,defaultCredit$1=new Credit('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function MapboxImageryProvider(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).mapId,i=e.accessToken;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var r=Resource.createIfNeeded(defaultValue(e.url,"https://{s}.tiles.mapbox.com/v4/"));this._mapId=t,this._accessToken=i;var n=defaultValue(e.format,"png");/\./.test(n)||(n="."+n),this._format=n;var a;n=r.getUrlComponent();trailingSlashRegex.test(n)||(n+="/"),n+=t+"/{z}/{x}/{y}"+this._format,r.url=n,r.setQueryParameters({access_token:i}),defined(e.credit)?"string"==typeof(a=e.credit)&&(a=new Credit(a)):a=defaultCredit$1,this._resource=r,this._imageryProvider=new UrlTemplateImageryProvider({url:r,credit:a,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function SingleTileImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=Resource.createIfNeeded(e.url),i=new GeographicTilingScheme({rectangle:defaultValue(e.rectangle,Rectangle.MAX_VALUE),numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=i,this._resource=t,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer(),"string"==typeof(e=e.credit)&&(e=new Credit(e)),this._credit=e;var r,n=this;function a(e){n._image=e,n._tileWidth=e.width,n._tileHeight=e.height,n._ready=!0,n._readyPromise.resolve(!0),TileProviderError.handleSuccess(n._errorEvent)}function o(e){var i="Failed to load image "+t.url+".";r=TileProviderError.handleError(r,n,n._errorEvent,i,0,0,0,s,e),n._readyPromise.reject(new RuntimeError(i))}function s(){ImageryProvider.loadImage(null,t).then(a).otherwise(o)}s()}function TimeDynamicImagery(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._tileCache={},this._tilesRequestedForInterval=[];var t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}function getKey$1(e,t,i){return e+"-"+t+"-"+i}function getKeyElements(e){if(3===(e=e.split("-")).length)return{x:Number(e[0]),y:Number(e[1]),level:Number(e[2])}}function getApproachingInterval(e){var t=e._times;if(defined(t)){var i,r,n=(r=e._clock).currentTime,a=r.canAnimate&&r.shouldAnimate;e=r.multiplier;if(a||0===e)if(!((r=t.indexOf(n))<0))return a=t.get(r),0<e?(i=JulianDate.secondsDifference(a.stop,n),++r):(i=JulianDate.secondsDifference(a.start,n),--r),i/=e,0<=r&&i<=5?t.get(r):void 0}}function addToCache(e,t,i){var r=e._times.indexOf(i.start),n=e._tileCache,a=n[r];return defined(a)||(a=n[r]={}),!!defined(a[n=t.key])||(r=getKeyElements(n),t=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.IMAGERY,priorityFunction:t.priorityFunction}),!!defined(i=e._requestImageFunction(r.x,r.y,r.level,t,i))&&(a[n]={promise:i,request:t},!0))}function WebMapServiceImageryProvider(e){if(defined((e=defaultValue(e,defaultValue.EMPTY_OBJECT)).times)&&!defined(e.clock))throw new DeveloperError("options.times was specified, so options.clock is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=Resource.createIfNeeded(e.url),i=t.clone();t.setQueryParameters(WebMapServiceImageryProvider.DefaultParameters,!0),i.setQueryParameters(WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters,!0),defined(e.parameters)&&t.setQueryParameters(objectToLowercase(e.parameters)),defined(e.getFeatureInfoParameters)&&i.setQueryParameters(objectToLowercase(e.getFeatureInfoParameters));var r=this;this._reload=void 0,defined(e.times)&&(this._timeDynamicImagery=new TimeDynamicImagery({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,a){return requestImage(r,e,t,i,n,a)},reloadFunction:function(){defined(r._reload)&&r._reload()}}));var n={};n.layers=e.layers,n.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",n.width="{width}",n.height="{height}",1.3<=parseFloat(t.queryParameters.version)?n.crs=defaultValue(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof WebMercatorProjection?"EPSG:3857":"CRS:84"):n.srs=defaultValue(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof WebMercatorProjection?"EPSG:3857":"EPSG:4326"),t.setQueryParameters(n,!0),i.setQueryParameters(n,!0),n={query_layers:e.layers,info_format:"{format}"},1.3<=parseFloat(i.queryParameters.version)?(n.i="{i}",n.j="{j}"):(n.x="{i}",n.y="{j}"),i.setQueryParameters(n,!0),this._resource=t,this._pickFeaturesResource=i,this._layers=e.layers,this._tileProvider=new UrlTemplateImageryProvider({url:t,pickFeaturesUrl:i,tilingScheme:defaultValue(e.tilingScheme,new GeographicTilingScheme({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:defaultValue(e.getFeatureInfoFormats,WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures})}function requestImage(e,t,i,r,n,a){return a=defined(a)?a.data:void 0,e=e._tileProvider,defined(a)&&e._resource.setQueryParameters(a),e.requestImage(t,i,r,n)}function pickFeatures(e,t,i,r,n,a,o){return o=defined(o)?o.data:void 0,e=e._tileProvider,defined(o)&&e._pickFeaturesResource.setQueryParameters(o),e.pickFeatures(t,i,r,n,a)}function objectToLowercase(e){var t,i={};for(t in e)e.hasOwnProperty(t)&&(i[t.toLowerCase()]=e[t]);return i}Object.defineProperties(MapboxImageryProvider.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),MapboxImageryProvider.prototype.getTileCredits=function(e,t,i){},MapboxImageryProvider.prototype.requestImage=function(e,t,i,r){return this._imageryProvider.requestImage(e,t,i,r)},MapboxImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){return this._imageryProvider.pickFeatures(e,t,i,r,n)},MapboxImageryProvider._defaultCredit=defaultCredit$1,Object.defineProperties(SingleTileImageryProvider.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),SingleTileImageryProvider.prototype.getTileCredits=function(e,t,i){},SingleTileImageryProvider.prototype.requestImage=function(e,t,i,r){return this._image},SingleTileImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},Object.defineProperties(TimeDynamicImagery.prototype,{clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),TimeDynamicImagery.prototype.getFromCache=function(e,t,i,r){var n,a;t=getKey$1(e,t,i);return defined(i=this._tileCache[this._currentIntervalIndex])&&defined(i[t])&&(a=(n=i[t]).promise.otherwise((function(e){throw r.state=n.request.state,e})),delete i[t]),a},TimeDynamicImagery.prototype.checkApproachingInterval=function(e,t,i,r){e=getKey$1(e,t,i),t=this._tilesRequestedForInterval,i=getApproachingInterval(this),r={key:e,priorityFunction:r.priorityFunction},defined(i)&&addToCache(this,r,i)||t.push(r),512<=t.length&&t.splice(0,256)},TimeDynamicImagery.prototype._clockOnTick=function(e){var t=e.currentTime;if((e=this._times.indexOf(t))!==(t=this._currentIntervalIndex)){var i,r=this._tileCache[t];for(i in r)r.hasOwnProperty(i)&&r[i].request.cancel();return delete this._tileCache[t],this._tilesRequestedForInterval=[],this._currentIntervalIndex=e,void this._reloadFunction()}var n=getApproachingInterval(this);if(defined(n))for(var a=this._tilesRequestedForInterval,o=!0;o&&0!==a.length;){var s=a.pop();(o=addToCache(this,s,n))||a.push(s)}},Object.defineProperties(WebMapServiceImageryProvider.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}}}),WebMapServiceImageryProvider.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},WebMapServiceImageryProvider.prototype.requestImage=function(e,t,i,r){var n,a,o=this._timeDynamicImagery;return defined(o)&&(a=o.currentInterval,n=o.getFromCache(e,t,i,r)),defined(n)||(n=requestImage(this,e,t,i,r,a)),defined(n)&&defined(o)&&o.checkApproachingInterval(e,t,i,r),n},WebMapServiceImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){var a=this._timeDynamicImagery;return pickFeatures(this,e,t,i,r,n,defined(a)?a.currentInterval:void 0)},WebMapServiceImageryProvider.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new GetFeatureInfoFormat("json","application/json")),Object.freeze(new GetFeatureInfoFormat("xml","text/xml")),Object.freeze(new GetFeatureInfoFormat("text","text/html"))]);var defaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function WebMapTileServiceImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t,i=Resource.createIfNeeded(e.url),r=e.style,n=e.tileMatrixSetID;0<=i.url.indexOf("{")?(t={style:r,Style:r,TileMatrixSet:n},i.setTemplateValues(t),this._useKvp=!1):(i.setQueryParameters(defaultParameters),this._useKvp=!0),this._resource=i,this._layer=e.layer,this._style=r,this._tileMatrixSetID=n,this._tileMatrixLabels=e.tileMatrixLabels,this._format=defaultValue(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=defined(e.tilingScheme)?e.tilingScheme:new WebMercatorTilingScheme({ellipsoid:e.ellipsoid}),this._tileWidth=defaultValue(e.tileWidth,256),this._tileHeight=defaultValue(e.tileHeight,256),this._minimumLevel=defaultValue(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=defaultValue(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;var a=this;this._reload=void 0,defined(e.times)&&(this._timeDynamicImagery=new TimeDynamicImagery({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,r,n){return requestImage$1(a,e,t,i,r,n)},reloadFunction:function(){defined(a._reload)&&a._reload()}})),this._readyPromise=when.resolve(!0),r=this._tilingScheme.positionToTileXY(Rectangle.southwest(this._rectangle),this._minimumLevel),n=this._tilingScheme.positionToTileXY(Rectangle.northeast(this._rectangle),this._minimumLevel),Math.abs(n.x-r.x),Math.abs(n.y-r.y),this._errorEvent=new Event,r=e.credit,this._credit="string"==typeof r?new Credit(r):r,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():defined(this._subdomains)&&0<this._subdomains.length?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"]}function requestImage$1(e,t,i,r,n,a){var o,s=defined(c=e._tileMatrixLabels)?c[r]:r.toString(),l=e._subdomains,c=e._dimensions;a=defined(a)?a.data:void 0;return e._useKvp?((o={}).tilematrix=s,o.layer=e._layer,o.style=e._style,o.tilerow=i,o.tilecol=t,o.tilematrixset=e._tileMatrixSetID,o.format=e._format,defined(c)&&(o=combine(o,c)),defined(a)&&(o=combine(o,a)),o=e._resource.getDerivedResource({queryParameters:o,request:n})):(l={TileMatrix:s,TileRow:i.toString(),TileCol:t.toString(),s:l[(t+i+r)%l.length]},(o=e._resource.getDerivedResource({request:n})).setTemplateValues(l),defined(c)&&o.setTemplateValues(c),defined(a)&&o.setTemplateValues(a)),ImageryProvider.loadImage(e,o)}function createFactory(e){return function(t){return new e(t)}}Object.defineProperties(WebMapTileServiceImageryProvider.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,defined(this._reload)&&this._reload())}}}),WebMapTileServiceImageryProvider.prototype.getTileCredits=function(e,t,i){},WebMapTileServiceImageryProvider.prototype.requestImage=function(e,t,i,r){var n,a,o=this._timeDynamicImagery;return defined(o)&&(a=o.currentInterval,n=o.getFromCache(e,t,i,r)),defined(n)||(n=requestImage$1(this,e,t,i,r,a)),defined(n)&&defined(o)&&o.checkApproachingInterval(e,t,i,r),n},WebMapTileServiceImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){};var ImageryProviderMapping={ARCGIS_MAPSERVER:createFactory(ArcGisMapServerImageryProvider),BING:createFactory(BingMapsImageryProvider),GOOGLE_EARTH:createFactory(GoogleEarthEnterpriseMapsProvider),MAPBOX:createFactory(MapboxImageryProvider),SINGLE_TILE:createFactory(SingleTileImageryProvider),TMS:createFactory(TileMapServiceImageryProvider),URL_TEMPLATE:createFactory(UrlTemplateImageryProvider),WMS:createFactory(WebMapServiceImageryProvider),WMTS:createFactory(WebMapTileServiceImageryProvider)};function IonImageryProvider(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).assetId;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._ready=!1,this._tileCredits=void 0,this._errorEvent=new Event;var i=this,r=IonResource._createEndpointResource(t,e),n=e.assetId.toString()+e.accessToken+e.server;defined(e=IonImageryProvider._endpointCache[n])||(e=r.fetchJson(),IonImageryProvider._endpointCache[n]=e),this._readyPromise=e.then((function(e){if("IMAGERY"!==e.type)return when.reject(new RuntimeError("Cesium ion asset "+t+" is not an imagery asset."));var n=e.externalType;if(defined(n)){var a=ImageryProviderMapping[n];if(!defined(a))return when.reject(new RuntimeError("Unrecognized Cesium ion imagery type: "+n));a=a(e.options)}else a=new TileMapServiceImageryProvider({url:new IonResource(e,r)});return i._tileCredits=IonResource.getCreditsFromEndpoint(e,r),a.errorEvent.addEventListener((function(e){(e.provider=i)._errorEvent.raiseEvent(e)})),(i._imageryProvider=a).readyPromise.then((function(){return i._ready=!0}))}))}Object.defineProperties(IonImageryProvider.prototype,{ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel},proxy:{get:function(){}}}}),IonImageryProvider.prototype.getTileCredits=function(e,t,i){return defined(i=this._imageryProvider.getTileCredits(e,t,i))?this._tileCredits.concat(i):this._tileCredits},IonImageryProvider.prototype.requestImage=function(e,t,i,r){return this._imageryProvider.requestImage(e,t,i,r)},IonImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){return this._imageryProvider.pickFeatures(e,t,i,r,n)},IonImageryProvider._endpointCache={};var IonWorldImageryStyle={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},IonWorldImageryStyle$1=Object.freeze(IonWorldImageryStyle);function JobTypeBudget(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function JobScheduler(e){var t=new Array(JobType$1.NUMBER_OF_JOB_TYPES);t[JobType$1.TEXTURE]=new JobTypeBudget(defined(e)?e[JobType$1.TEXTURE]:10),t[JobType$1.PROGRAM]=new JobTypeBudget(defined(e)?e[JobType$1.PROGRAM]:10),t[JobType$1.BUFFER]=new JobTypeBudget(defined(e)?e[JobType$1.BUFFER]:30);for(var i=t.length,r=0,n=0;n<i;++n)r+=t[n].total;var a=new Array(i);for(n=0;n<i;++n)a[n]=!1;this._totalBudget=r,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=a}function Light(){}Object.defineProperties(JobTypeBudget.prototype,{total:{get:function(){return this._total}}}),JobScheduler.getTimestamp=getTimestamp$1,Object.defineProperties(JobScheduler.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),JobScheduler.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},JobScheduler.prototype.resetBudgets=function(){for(var e=this._budgets,t=e.length,i=0;i<t;++i){var r=e[i];r.starvedLastFrame=r.starvedThisFrame,r.starvedThisFrame=!1,r.usedThisFrame=0,r.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},JobScheduler.prototype.execute=function(e,t){var i,r=this._budgets,n=r[t],a=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&a)return!(n.starvedThisFrame=!0);if(n.usedThisFrame+n.stolenFromMeThisFrame>=n.total){for(var o=r.length,s=0;s<o&&(!((i=r[s]).usedThisFrame+i.stolenFromMeThisFrame<i.total)||i.starvedLastFrame);++s);if(s===o&&a)return!1;a&&(n.starvedThisFrame=!0)}return a=JobScheduler.getTimestamp(),e.execute(),a=JobScheduler.getTimestamp()-a,this._totalUsedThisFrame+=a,i?i.stolenFromMeThisFrame+=a:n.usedThisFrame+=a,this._executedThisFrame[t]=!0},Object.defineProperties(Light.prototype,{color:{get:DeveloperError.throwInstantiationError},intensity:{get:DeveloperError.throwInstantiationError}});var trailingSlashRegex$1=/\/$/,defaultCredit$2=new Credit('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function MapboxStyleImageryProvider(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).styleId,i=e.accessToken;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var r=Resource.createIfNeeded(defaultValue(e.url,"https://api.mapbox.com/styles/v1/"));this._styleId=t,this._accessToken=i;var n=defaultValue(e.tilesize,512);this._tilesize=n;var a=defaultValue(e.username,"mapbox");this._username=a;var o;n=defined(e.scaleFactor)?"@2x":"",a=r.getUrlComponent();trailingSlashRegex$1.test(a)||(a+="/"),a+=this._username+"/"+t+"/tiles/"+this._tilesize+"/{z}/{x}/{y}"+n,r.url=a,r.setQueryParameters({access_token:i}),defined(e.credit)?"string"==typeof(o=e.credit)&&(o=new Credit(o)):o=defaultCredit$2,this._resource=r,this._imageryProvider=new UrlTemplateImageryProvider({url:r,credit:o,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function Moon(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).textureUrl;defined(t)||(t=buildModuleUrl("Assets/Textures/moonSmall.jpg")),this.show=defaultValue(e.show,!0),this.textureUrl=t,this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.MOON),this.onlySunLighting=defaultValue(e.onlySunLighting,!0),this._ellipsoidPrimitive=new EllipsoidPrimitive({radii:this.ellipsoid.radii,material:Material.fromType(Material.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new IauOrientationAxes}Object.defineProperties(MapboxStyleImageryProvider.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),MapboxStyleImageryProvider.prototype.getTileCredits=function(e,t,i){},MapboxStyleImageryProvider.prototype.requestImage=function(e,t,i,r){return this._imageryProvider.requestImage(e,t,i,r)},MapboxStyleImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){return this._imageryProvider.pickFeatures(e,t,i,r,n)},MapboxStyleImageryProvider._defaultCredit=defaultCredit$2,Object.defineProperties(Moon.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var icrfToFixed=new Matrix3,rotationScratch$1=new Matrix3,translationScratch=new Cartesian3,scratchCommandList$1=[];function NeverTileDiscardPolicy(e){}Moon.prototype.update=function(e){if(this.show){var t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;var i=e.time;defined(Transforms.computeIcrfToFixedMatrix(i,icrfToFixed))||Transforms.computeTemeToPseudoFixedMatrix(i,icrfToFixed);var r=this._axes.evaluate(i,rotationScratch$1);return Matrix3.transpose(r,r),Matrix3.multiply(icrfToFixed,r,r),i=Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(i,translationScratch),Matrix3.multiplyByVector(icrfToFixed,i,i),Matrix4.fromRotationTranslation(r,i,t.modelMatrix),i=e.commandList,(e.commandList=scratchCommandList$1).length=0,t.update(e),e.commandList=i,1===scratchCommandList$1.length?scratchCommandList$1[0]:void 0}},Moon.prototype.isDestroyed=function(){return!1},Moon.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),destroyObject(this)},NeverTileDiscardPolicy.prototype.isReady=function(){return!0},NeverTileDiscardPolicy.prototype.shouldDiscardImage=function(e){return!1};var AdjustTranslucentFS="#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nif (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n{\n#ifdef MRT\ngl_FragData[0] = u_bgColor;\ngl_FragData[1] = vec4(u_bgColor.a);\n#else\ngl_FragColor = u_bgColor;\n#endif\nreturn;\n}\ndiscard;\n}\n",CompositeOITFS="uniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 opaque = texture2D(u_opaque, v_textureCoordinates);\nvec4 accum = texture2D(u_accumulation, v_textureCoordinates);\nfloat r = texture2D(u_revealage, v_textureCoordinates).r;\n#ifdef MRT\nvec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\nvec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\ngl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\nif (opaque != czm_backgroundColor)\n{\ngl_FragColor.a = 1.0;\n}\n}\n";function OIT(e){this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var t=e.colorBufferFloat&&e.depthTexture;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new ClearCommand({color:new Color(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ClearCommand({color:new Color(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ClearCommand({color:new Color(0,0,0,0),owner:this}),this._alphaClearCommand=new ClearCommand({color:new Color(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new BoundingRectangle,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function destroyTextures$1(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function destroyFramebuffers$2(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function destroyResources$1(e){destroyTextures$1(e),destroyFramebuffers$2(e)}function updateTextures(e,t,i,r){destroyTextures$1(e),e._accumulationTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.FLOAT});var n=new Float32Array(i*r*4);e._revealageTexture=new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.FLOAT,source:{arrayBufferView:n,width:i,height:r},flipY:!1})}function updateFramebuffers$1(e,t){destroyFramebuffers$2(e);var i,r,n=WebGLConstants$1.FRAMEBUFFER_COMPLETE,a=!0;return e._translucentMRTSupport&&(e._translucentFBO=new Framebuffer({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new Framebuffer({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),e._translucentFBO.status===n&&e._adjustTranslucentFBO.status===n||(destroyFramebuffers$2(e),e._translucentMRTSupport=!1)),e._translucentMRTSupport||(e._translucentFBO=new Framebuffer({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new Framebuffer({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new Framebuffer({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new Framebuffer({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1}),i=e._translucentFBO.status===n,r=e._alphaFBO.status===n,t=e._adjustTranslucentFBO.status===n,n=e._adjustAlphaFBO.status===n,i&&r&&t&&n||(destroyResources$1(e),a=e._translucentMultipassSupport=!1)),a}OIT.prototype.update=function(e,t,i,r){var n,a,o,s,l;this.isSupported()&&(this._opaqueFBO=i,this._opaqueTexture=i.getColorTexture(0),this._depthStencilTexture=i.depthStencilTexture,s=this._opaqueTexture.width,l=this._opaqueTexture.height,(i=!defined(i=this._accumulationTexture)||i.width!==s||i.height!==l||r!==this._useHDR)&&updateTextures(this,e,s,l),(defined(this._translucentFBO)&&!i||updateFramebuffers$1(this,e))&&(this._useHDR=r,defined((n=this)._compositeCommand)||(a=new ShaderSource({sources:[CompositeOITFS]}),this._translucentMRTSupport&&a.defines.push("MRT"),o={u_opaque:function(){return n._opaqueTexture},u_accumulation:function(){return n._accumulationTexture},u_revealage:function(){return n._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(a,{uniformMap:o,owner:this})),defined(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(a=new ShaderSource({defines:["MRT"],sources:[AdjustTranslucentFS]}),o={u_bgColor:function(){return n._translucentMRTClearCommand.color},u_depthTexture:function(){return n._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(a,{uniformMap:o,owner:this})):this._translucentMultipassSupport&&(a=new ShaderSource({sources:[AdjustTranslucentFS]}),o={u_bgColor:function(){return n._translucentMultipassClearCommand.color},u_depthTexture:function(){return n._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(a,{uniformMap:o,owner:this}),o={u_bgColor:function(){return n._alphaClearCommand.color},u_depthTexture:function(){return n._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(a,{uniformMap:o,owner:this}))),this._viewport.width=s,this._viewport.height=l,l=(s=!BoundingRectangle.equals(this._viewport,t.viewport))!==this._useScissorTest,this._useScissorTest=s,BoundingRectangle.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=BoundingRectangle.clone(t.viewport,this._scissorRectangle),l=!0),defined(this._rs)&&BoundingRectangle.equals(this._viewport,this._rs.viewport)&&!l||(this._rs=RenderState.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),defined(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),defined(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)))};var translucentMRTBlend={enabled:!0,color:new Color(0,0,0,0),equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE,functionSourceAlpha:BlendFunction$1.ZERO,functionDestinationAlpha:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA},translucentColorBlend={enabled:!0,color:new Color(0,0,0,0),equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE,functionSourceAlpha:BlendFunction$1.ONE,functionDestinationAlpha:BlendFunction$1.ONE},translucentAlphaBlend={enabled:!0,color:new Color(0,0,0,0),equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.ZERO,functionDestinationRgb:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:BlendFunction$1.ZERO,functionDestinationAlpha:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA};function getTranslucentRenderState$2(e,t,i,r){var n,a=i[r.id];return defined(a)||((n=RenderState.getState(r)).depthMask=!1,n.blending=t,a=RenderState.fromCache(n),i[r.id]=a),a}function getTranslucentMRTRenderState(e,t,i){return getTranslucentRenderState$2(t,translucentMRTBlend,e._translucentRenderStateCache,i)}function getTranslucentColorRenderState(e,t,i){return getTranslucentRenderState$2(t,translucentColorBlend,e._translucentRenderStateCache,i)}function getTranslucentAlphaRenderState(e,t,i){return getTranslucentRenderState$2(t,translucentAlphaBlend,e._alphaRenderStateCache,i)}var mrtShaderSource="    vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n    float ai = czm_gl_FragColor.a;\n    float wzi = czm_alphaWeight(ai);\n    gl_FragData[0] = vec4(Ci * wzi, ai);\n    gl_FragData[1] = vec4(ai * wzi);\n",colorShaderSource="    vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n    float ai = czm_gl_FragColor.a;\n    float wzi = czm_alphaWeight(ai);\n    gl_FragColor = vec4(Ci, ai) * wzi;\n",alphaShaderSource="    float ai = czm_gl_FragColor.a;\n    gl_FragColor = vec4(ai);\n";function getTranslucentShaderProgram$1(e,t,i,r){var n,a,o=e.shaderCache.getDerivedShaderProgram(t,i);return defined(o)||(n=t._attributeLocations,(a=t.fragmentShaderSource.clone()).sources=a.sources.map((function(e){return(e=(e=(e=ShaderSource.replaceMain(e,"czm_translucent_main")).replace(/gl_FragColor/g,"czm_gl_FragColor")).replace(/\bdiscard\b/g,"czm_discard = true")).replace(/czm_phong/g,"czm_translucentPhong")})),a.sources.splice(0,0,(-1!==r.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n":"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),a.sources.push("void main()\n{\n    czm_translucent_main();\n    if (czm_discard)\n    {\n        discard;\n    }\n"+r+"}\n"),o=e.shaderCache.createDerivedShaderProgram(t,i,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:n})),o}function getTranslucentMRTShaderProgram(e,t){return getTranslucentShaderProgram$1(e,t,"translucentMRT",mrtShaderSource)}function getTranslucentColorShaderProgram(e,t){return getTranslucentShaderProgram$1(e,t,"translucentMultipass",colorShaderSource)}function getTranslucentAlphaShaderProgram(e,t){return getTranslucentShaderProgram$1(e,t,"alphaMultipass",alphaShaderSource)}function executeTranslucentCommandsSortedMultipass(e,t,i,r,n,a){var o,s,l=t.context,c=t.frameState.useLogDepth,u=t._hdr,d=r.framebuffer,h=n.length,p=t.frameState.shadowState.lightShadowsEnabled;r.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(l,r),r.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(l,r);var f=e._opaqueFBO;for(r.framebuffer=e._translucentFBO,s=0;s<h;++s)o=n[s],o=c?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,i((p&&o.receiveShadows?o.derivedCommands.oit.shadows:o.derivedCommands.oit).translucentCommand,t,l,r,f);for(defined(a)&&(o=a.unclassifiedCommand,i((p&&o.receiveShadows?o.derivedCommands.oit.shadows:o.derivedCommands.oit).translucentCommand,t,l,r,f)),r.framebuffer=e._alphaFBO,s=0;s<h;++s)o=n[s],o=c?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,i((p&&o.receiveShadows?o.derivedCommands.oit.shadows:o.derivedCommands.oit).alphaCommand,t,l,r,f);defined(a)&&(o=a.unclassifiedCommand,i((p&&o.receiveShadows?o.derivedCommands.oit.shadows:o.derivedCommands.oit).alphaCommand,t,l,r,f)),r.framebuffer=d}function executeTranslucentCommandsSortedMRT(e,t,i,r,n,a){var o=t.context,s=t.frameState.useLogDepth,l=t._hdr,c=r.framebuffer,u=n.length,d=t.frameState.shadowState.lightShadowsEnabled;r.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(o,r);var h,p=e._opaqueFBO;r.framebuffer=e._translucentFBO;for(var f=0;f<u;++f)h=n[f],h=s?h.derivedCommands.logDepth.command:h,h=l?h.derivedCommands.hdr.command:h,i((d&&h.receiveShadows?h.derivedCommands.oit.shadows:h.derivedCommands.oit).translucentCommand,t,o,r,p);defined(a)&&(h=a.unclassifiedCommand,i((d&&h.receiveShadows?h.derivedCommands.oit.shadows:h.derivedCommands.oit).translucentCommand,t,o,r,p)),r.framebuffer=c}OIT.prototype.createDerivedCommands=function(e,t,i){var r,n,a,o,s,l;return defined(i)||(i={}),this._translucentMRTSupport?(defined(i.translucentCommand)&&(r=i.translucentCommand.shaderProgram,n=i.translucentCommand.renderState),i.translucentCommand=DrawCommand.shallowClone(e,i.translucentCommand),defined(r)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=r,i.translucentCommand.renderState=n):(i.translucentCommand.shaderProgram=getTranslucentMRTShaderProgram(t,e.shaderProgram),i.translucentCommand.renderState=getTranslucentMRTRenderState(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)):(defined(i.translucentCommand)&&(a=i.translucentCommand.shaderProgram,o=i.translucentCommand.renderState,s=i.alphaCommand.shaderProgram,l=i.alphaCommand.renderState),i.translucentCommand=DrawCommand.shallowClone(e,i.translucentCommand),i.alphaCommand=DrawCommand.shallowClone(e,i.alphaCommand),defined(a)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=a,i.translucentCommand.renderState=o,i.alphaCommand.shaderProgram=s,i.alphaCommand.renderState=l):(i.translucentCommand.shaderProgram=getTranslucentColorShaderProgram(t,e.shaderProgram),i.translucentCommand.renderState=getTranslucentColorRenderState(this,t,e.renderState),i.alphaCommand.shaderProgram=getTranslucentAlphaShaderProgram(t,e.shaderProgram),i.alphaCommand.renderState=getTranslucentAlphaRenderState(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)),i},OIT.prototype.executeCommands=function(e,t,i,r,n){(this._translucentMRTSupport?executeTranslucentCommandsSortedMRT:executeTranslucentCommandsSortedMultipass)(this,e,t,i,r,n)},OIT.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},OIT.prototype.clear=function(e,t,i){var r=t.framebuffer;t.framebuffer=this._opaqueFBO,Color.clone(i,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,t)),t.framebuffer=r},OIT.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},OIT.prototype.isDestroyed=function(){return!1},OIT.prototype.destroy=function(){return destroyResources$1(this),defined(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),defined(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),defined(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),destroyObject(this)};var defaultCredit$3=new Credit("MapQuest, Open Street Map and contributors, CC-BY-SA");function OpenStreetMapImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=Resource.createIfNeeded(defaultValue(e.url,"https://a.tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+="{z}/{x}/{y}."+defaultValue(e.fileExtension,"png");var i=new WebMercatorTilingScheme({ellipsoid:e.ellipsoid}),r=defaultValue(e.minimumLevel,0),n=e.maximumLevel,a=defaultValue(e.rectangle,i.rectangle),o=i.positionToTileXY(Rectangle.southwest(a),r),s=i.positionToTileXY(Rectangle.northeast(a),r);"string"==typeof(e=(Math.abs(s.x-o.x),Math.abs(s.y-o.y),defaultValue(e.credit,defaultCredit$3)))&&(e=new Credit(e)),UrlTemplateImageryProvider.call(this,{url:t,credit:e,tilingScheme:i,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:n,rectangle:a})}defined(Object.create)&&(OpenStreetMapImageryProvider.prototype=Object.create(UrlTemplateImageryProvider.prototype),OpenStreetMapImageryProvider.prototype.constructor=OpenStreetMapImageryProvider);var defaultSize=new Cartesian2(1,1);function Particle(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.mass=defaultValue(e.mass,1),this.position=Cartesian3.clone(defaultValue(e.position,Cartesian3.ZERO)),this.velocity=Cartesian3.clone(defaultValue(e.velocity,Cartesian3.ZERO)),this.life=defaultValue(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=Color.clone(defaultValue(e.startColor,Color.WHITE)),this.endColor=Color.clone(defaultValue(e.endColor,Color.WHITE)),this.startScale=defaultValue(e.startScale,1),this.endScale=defaultValue(e.endScale,1),this.imageSize=Cartesian2.clone(defaultValue(e.imageSize,defaultSize)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(Particle.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var deltaScratch=new Cartesian3;function ParticleBurst(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.time=defaultValue(e.time,0),this.minimum=defaultValue(e.minimum,0),this.maximum=defaultValue(e.maximum,50),this._complete=!1}function ParticleEmitter(e){}Particle.prototype.update=function(e,t){return Cartesian3.multiplyByScalar(this.velocity,e,deltaScratch),Cartesian3.add(this.position,deltaScratch,this.position),defined(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life},Object.defineProperties(ParticleBurst.prototype,{complete:{get:function(){return this._complete}}}),ParticleEmitter.prototype.emit=function(e){DeveloperError.throwInstantiationError()};var defaultImageSize=new Cartesian2(1,1);function ParticleSystem(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.show=defaultValue(e.show,!0),this.updateCallback=e.updateCallback,this.loop=defaultValue(e.loop,!0),this.image=defaultValue(e.image,void 0);var t=e.emitter;defined(t)||(t=new CircleEmitter(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._emitterModelMatrix=Matrix4.clone(defaultValue(e.emitterModelMatrix,Matrix4.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new Matrix4,this._startColor=Color.clone(defaultValue(e.color,defaultValue(e.startColor,Color.WHITE))),this._endColor=Color.clone(defaultValue(e.color,defaultValue(e.endColor,Color.WHITE))),this._startScale=defaultValue(e.scale,defaultValue(e.startScale,1)),this._endScale=defaultValue(e.scale,defaultValue(e.endScale,1)),this._emissionRate=defaultValue(e.emissionRate,5),this._minimumSpeed=defaultValue(e.speed,defaultValue(e.minimumSpeed,1)),this._maximumSpeed=defaultValue(e.speed,defaultValue(e.maximumSpeed,1)),this._minimumParticleLife=defaultValue(e.particleLife,defaultValue(e.minimumParticleLife,5)),this._maximumParticleLife=defaultValue(e.particleLife,defaultValue(e.maximumParticleLife,5)),this._minimumMass=defaultValue(e.mass,defaultValue(e.minimumMass,1)),this._maximumMass=defaultValue(e.mass,defaultValue(e.maximumMass,1)),this._minimumImageSize=Cartesian2.clone(defaultValue(e.imageSize,defaultValue(e.minimumImageSize,defaultImageSize))),this._maximumImageSize=Cartesian2.clone(defaultValue(e.imageSize,defaultValue(e.maximumImageSize,defaultImageSize))),this._sizeInMeters=defaultValue(e.sizeInMeters,!1),this._lifetime=defaultValue(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new Event,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}function updateParticlePool(e){var t=e._emissionRate,i=e._maximumParticleLife,r=0,n=e._bursts;if(defined(n))for(var a=n.length,o=0;o<a;++o)r+=n[o].maximum;for(var s=e._billboardCollection,l=e.image,c=(t=Math.ceil(t*i+r),i=e._particles,e._particlePool),u=Math.max(t-i.length-c.length,0),d=0;d<u;++d){var h=new Particle;h._billboard=s.add({image:l}),c.push(h)}e._particleEstimate=t}function getOrCreateParticle(e){return defined(e=e._particlePool.pop())||(e=new Particle),e}function addParticleToPool(e,t){e._particlePool.push(t)}function freeParticlePool(e){for(var t=e._particles,i=e._particlePool,r=e._billboardCollection,n=(t=t.length,i.length),a=(e=e._particleEstimate,t=n-Math.max(e-t-n,0));a<n;++a){var o=i[a];r.remove(o._billboard)}i.length=t}function removeBillboard(e){defined(e._billboard)&&(e._billboard.show=!1)}function updateBillboard(e,t){var i=t._billboard;defined(i)||(i=t._billboard=e._billboardCollection.add({image:t.image})),i.width=t.imageSize.x,i.height=t.imageSize.y,i.position=t.position,i.sizeInMeters=e.sizeInMeters,i.show=!0;var r=CesiumMath.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),n=CesiumMath.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),a=CesiumMath.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge);e=CesiumMath.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);i.color=new Color(r,n,a,e),i.scale=CesiumMath.lerp(t.startScale,t.endScale,t.normalizedAge)}function addParticle(e,t){t.startColor=Color.clone(e._startColor,t.startColor),t.endColor=Color.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=CesiumMath.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=CesiumMath.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=CesiumMath.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=CesiumMath.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;var i=CesiumMath.randomBetween(e._minimumSpeed,e._maximumSpeed);Cartesian3.multiplyByScalar(t.velocity,i,t.velocity),e._particles.push(t)}function calculateNumberToEmit(e,t){if(e._isComplete)return 0;t=(t=CesiumMath.mod(t,e._lifetime))*e._emissionRate;var i=Math.floor(t);if(e._carryOver+=t-i,1<e._carryOver&&(i++,--e._carryOver),defined(e.bursts))for(var r=e.bursts.length,n=0;n<r;n++){var a=e.bursts[n],o=e._currentTime;defined(a)&&!a._complete&&o>a.time&&(i+=CesiumMath.randomBetween(a.minimum,a.maximum),a._complete=!0)}return i}Object.defineProperties(ParticleSystem.prototype,{emitter:{get:function(){return this._emitter},set:function(e){this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!Matrix4.equals(this._modelMatrix,e),Matrix4.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!Matrix4.equals(this._emitterModelMatrix,e),Matrix4.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){Color.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){Color.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});var rotatedVelocityScratch=new Cartesian3;function getElement(e){return"string"==typeof e&&(e=document.getElementById(e)),e}function PerformanceDisplay(e){var t=getElement((e=defaultValue(e,defaultValue.EMPTY_OBJECT)).container);this._container=t;var i=document.createElement("div");i.className="cesium-performanceDisplay",(e=document.createElement("div")).className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),e.appendChild(this._fpsText),(t=document.createElement("div")).className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),t.appendChild(this._msText),i.appendChild(t),i.appendChild(e),this._container.appendChild(i),this._lastFpsSampleTime=getTimestamp$1(),this._lastMsSampleTime=getTimestamp$1(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1,(e=document.createElement("div")).className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),e.appendChild(this._throttledText),i.appendChild(e)}function PickDepth(){this._framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._useLogDepth=void 0,this._debugPickDepthViewportCommand=void 0}function executeDebugPickDepth(e,t,i,r){var n;defined(e._debugPickDepthViewportCommand)&&r===e._useLogDepth||(n=new ShaderSource({defines:[r?"LOG_DEPTH":""],sources:["uniform highp sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n    z_window = czm_reverseLogDepth(z_window); \n    float n_range = czm_depthRange.near;\n    float f_range = czm_depthRange.far;\n    float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n    float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n    gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]}),e._debugPickDepthViewportCommand=t.createViewportQuadCommand(n,{uniformMap:{u_texture:function(){return e._depthTexture}},owner:e}),e._useLogDepth=r),e._debugPickDepthViewportCommand.execute(t,i)}function destroyTextures$2(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function destroyFramebuffers$3(e){e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy()}function createTextures$2(e,t,i,r){e._depthTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE})}function createFramebuffers$2(e,t,i,r){destroyTextures$2(e),destroyFramebuffers$3(e),createTextures$2(e,t,i,r),e._framebuffer=new Framebuffer({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function updateFramebuffers$2(e,t,i){var r=i.width,n=i.height;i=!defined(i=e._depthTexture)||i.width!==r||i.height!==n;defined(e._framebuffer)&&!i||createFramebuffers$2(e,t,r,n)}function updateCopyCommands$1(e,t,i){defined(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand("uniform highp sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n",{renderState:RenderState.fromCache(),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._framebuffer}ParticleSystem.prototype.update=function(e){if(this.show){defined(this._billboardCollection)||(this._billboardCollection=new BillboardCollection),this._updateParticlePool&&(updateParticlePool(this),this._updateParticlePool=!1);var t=0;this._previousTime&&(t=JulianDate.secondsDifference(e.time,this._previousTime)),t<0&&(t=0);var i,r=this._particles,n=this._emitter,a=this.updateCallback,o=r.length;for(c=0;c<o;++c)(i=r[c]).update(t,a)?updateBillboard(this,i):(removeBillboard(i),addParticleToPool(this,i),r[c]=r[o-1],--c,--o);r.length=o;var s=calculateNumberToEmit(this,t);if(0<s&&defined(n)){this._matrixDirty&&(this._combinedMatrix=Matrix4.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);for(var l=this._combinedMatrix,c=0;c<s;c++)i=getOrCreateParticle(this),this._emitter.emit(i),Cartesian3.add(i.position,i.velocity,rotatedVelocityScratch),Matrix4.multiplyByPoint(l,rotatedVelocityScratch,rotatedVelocityScratch),i.position=Matrix4.multiplyByPoint(l,i.position,i.position),Cartesian3.subtract(rotatedVelocityScratch,i.position,i.velocity),Cartesian3.normalize(i.velocity,i.velocity),addParticle(this,i),updateBillboard(this,i)}if(this._billboardCollection.update(e),this._previousTime=JulianDate.clone(e.time,this._previousTime),this._currentTime+=t,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=CesiumMath.mod(this._currentTime,this._lifetime),this.bursts){var u=this.bursts.length;for(c=0;c<u;c++)this.bursts[c]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120==0&&freeParticlePool(this)}},ParticleSystem.prototype.isDestroyed=function(){return!1},ParticleSystem.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),destroyObject(this)},Object.defineProperties(PerformanceDisplay.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}}}),PerformanceDisplay.prototype.update=function(e){var t,i=getTimestamp$1(),r=defaultValue(e,!0);this._fpsFrameCount++,1e3<(e=i-this._lastFpsSampleTime)&&(t="N/A",r&&(t=1e3*this._fpsFrameCount/e|0),this._fpsText.nodeValue=t+" FPS",this._lastFpsSampleTime=i,this._fpsFrameCount=0),this._msFrameCount++,200<(e=i-this._lastMsSampleTime)&&(t="N/A",r&&(t=(e/this._msFrameCount).toFixed(2)),this._msText.nodeValue=t+" MS",this._lastMsSampleTime=i,this._msFrameCount=0)},PerformanceDisplay.prototype.destroy=function(){return destroyObject(this)},PickDepth.prototype.executeDebugPickDepth=function(e,t,i){executeDebugPickDepth(this,e,t,i)},PickDepth.prototype.update=function(e,t){updateFramebuffers$2(this,e,t),updateCopyCommands$1(this,e,t)};var scratchPackedDepth=new Cartesian4,packedDepthScale=new Cartesian4(1,1/255,1/65025,1/16581375);function PickDepthFramebuffer(){this._depthStencilTexture=void 0,this._framebuffer=void 0,this._passState=void 0}function destroyResources$2(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy()}function createResources$6(e,t){var i=t.drawingBufferWidth,r=t.drawingBufferHeight;e._depthStencilTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8}),e._framebuffer=new Framebuffer({context:t,depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),(t=new PassState(t)).blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new BoundingRectangle},t.viewport=new BoundingRectangle,e._passState=t}function PickFramebuffer(e){var t=new PassState(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new BoundingRectangle},t.viewport=new BoundingRectangle,this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}PickDepth.prototype.getDepth=function(e,t,i){if(defined(this._framebuffer))return i=e.readPixels({x:t,y:i,width:1,height:1,framebuffer:this._framebuffer}),i=Cartesian4.unpack(i,0,scratchPackedDepth),Cartesian4.divideByScalar(i,255,i),Cartesian4.dot(i,packedDepthScale)},PickDepth.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},PickDepth.prototype.isDestroyed=function(){return!1},PickDepth.prototype.destroy=function(){return destroyTextures$2(this),destroyFramebuffers$3(this),defined(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=defined(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),destroyObject(this)},PickDepthFramebuffer.prototype.update=function(e,t,i){var r=i.width,n=i.height;return defined(this._framebuffer)&&r===this._depthStencilTexture.width&&n===this._depthStencilTexture.height||(destroyResources$2(this),createResources$6(this,e)),i=this._framebuffer,(e=this._passState).framebuffer=i,e.viewport.width=r,e.viewport.height=n,e.scissorTest.rectangle.x=t.x,e.scissorTest.rectangle.y=n-t.y,e.scissorTest.rectangle.width=1,e.scissorTest.rectangle.height=1,e},PickDepthFramebuffer.prototype.isDestroyed=function(){return!1},PickDepthFramebuffer.prototype.destroy=function(){return destroyResources$2(this),destroyObject(this)},PickFramebuffer.prototype.begin=function(e,t){var i=this._context,r=t.width;t=t.height;return BoundingRectangle.clone(e,this._passState.scissorTest.rectangle),defined(this._fb)&&this._width===r&&this._height===t||(this._width=r,this._height=t,this._fb=this._fb&&this._fb.destroy(),this._fb=new Framebuffer({context:i,colorTextures:[new Texture({context:i,width:r,height:t})],depthStencilRenderbuffer:new Renderbuffer({context:i,width:r,height:t,format:RenderbufferFormat$1.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=r,this._passState.viewport.height=t,this._passState};var colorScratch$7=new Color;function SceneFramebuffer(){this._colorTexture=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._idFramebuffer=void 0,this._idClearColor=new Color(0,0,0,0),this._useHdr=void 0,this._clearCommand=new ClearCommand({color:new Color(0,0,0,0),depth:1,owner:this})}function destroyResources$3(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._idFramebuffer=e._idFramebuffer&&e._idFramebuffer.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy(),e._idTexture=e._idTexture&&e._idTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&e._depthStencilRenderbuffer.destroy(),e._depthStencilIdTexture=e._depthStencilIdTexture&&e._depthStencilIdTexture.destroy(),e._depthStencilIdRenderbuffer=e._depthStencilIdRenderbuffer&&e._depthStencilIdRenderbuffer.destroy(),e._framebuffer=void 0,e._idFramebuffer=void 0,e._colorTexture=void 0,e._idTexture=void 0,e._depthStencilTexture=void 0,e._depthStencilRenderbuffer=void 0,e._depthStencilIdTexture=void 0,e._depthStencilIdRenderbuffer=void 0}function ShadowMapShader(){}function ShadowMap(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context;this._enabled=defaultValue(e.enabled,!0),this._softShadows=defaultValue(e.softShadows,!1),this._normalOffset=defaultValue(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=defaultValue(e.fromLightSource,!0),this.darkness=defaultValue(e.darkness,.3),this._darkness=this.darkness,this.maximumDistance=defaultValue(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1;var i,r=this._needsUpdate=!0;(FeatureDetection.isInternetExplorer()||FeatureDetection.isEdge()||(FeatureDetection.isChrome()||FeatureDetection.isFirefox())&&FeatureDetection.isWindows()&&!t.depthTexture)&&(r=!1),this._polygonOffsetSupported=r,this._terrainBias={polygonOffset:r,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:r,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new Matrix4,this._shadowMapTexture=void 0,this._lightDirectionEC=new Cartesian3,this._lightPositionEC=new Cartesian4,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new ShadowMapCamera,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new BoundingSphere,this._isPointLight=defaultValue(e.isPointLight,!1),this._pointLightRadius=defaultValue(e.pointLightRadius,100),this._cascadesEnabled=!this._isPointLight&&defaultValue(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?defaultValue(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new Cartesian2,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new OrthographicOffCenterFrustum:defined(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new Cartesian4,new Cartesian4],this._cascadeMatrices=[new Matrix4,new Matrix4,new Matrix4,new Matrix4],this._cascadeDistances=new Cartesian4,i=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(i);for(var n=0;n<i;++n)this._passes[n]=new ShadowPass(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,createRenderStates$5(this),this._clearCommand=new ClearCommand({depth:1,color:new Color}),this._clearPassState=new PassState(t),this._size=defaultValue(e.size,2048),this.size=this._size}function ShadowPass(e){this.camera=new ShadowMapCamera,this.passState=new PassState(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function createRenderState$1(e,t){return RenderState.fromCache({cull:{enabled:!0,face:CullFace$1.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function createRenderStates$5(e){var t=!e._usesDepthTexture;e._primitiveRenderState=createRenderState$1(t,e._primitiveBias),e._terrainRenderState=createRenderState$1(t,e._terrainBias),e._pointRenderState=createRenderState$1(t,e._pointBias)}function destroyFramebuffer$1(e){for(var t=e._passes.length,i=0;i<t;++i){var r=e._passes[i],n=r.framebuffer;defined(n)&&!n.isDestroyed()&&n.destroy(),r.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function createFramebufferColor(e,t){for(var i=new Renderbuffer({context:t,width:e._textureSize.x,height:e._textureSize.y,format:RenderbufferFormat$1.DEPTH_COMPONENT16}),r=new Texture({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),n=new Framebuffer({context:t,depthRenderbuffer:i,colorTextures:[r],destroyAttachments:!1}),a=e._passes.length,o=0;o<a;++o){var s=e._passes[o];s.framebuffer=n,s.passState.framebuffer=n}e._shadowMapTexture=r,e._depthAttachment=i,e._colorAttachment=r}function createFramebufferDepth(e,t){for(var i=new Texture({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8,sampler:Sampler.NEAREST}),r=new Framebuffer({context:t,depthStencilTexture:i,destroyAttachments:!1}),n=e._passes.length,a=0;a<n;++a){var o=e._passes[a];o.framebuffer=r,o.passState.framebuffer=r}e._shadowMapTexture=i,e._depthAttachment=i}function createFramebufferCube(e,t){for(var i=new Renderbuffer({context:t,width:e._textureSize.x,height:e._textureSize.y,format:RenderbufferFormat$1.DEPTH_COMPONENT16}),r=new CubeMap({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),n=[r.negativeX,r.negativeY,r.negativeZ,r.positiveX,r.positiveY,r.positiveZ],a=0;a<6;++a){var o=new Framebuffer({context:t,depthRenderbuffer:i,colorTextures:[n[a]],destroyAttachments:!1}),s=e._passes[a];s.framebuffer=o,s.passState.framebuffer=o}e._shadowMapTexture=r,e._depthAttachment=i,e._colorAttachment=r}function createFramebuffer$3(e,t){(e._isPointLight?createFramebufferCube:e._usesDepthTexture?createFramebufferDepth:createFramebufferColor)(e,t)}function checkFramebuffer(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==WebGLConstants$1.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,createRenderStates$5(e),destroyFramebuffer$1(e),createFramebuffer$3(e,t))}function updateFramebuffer(e,t){defined(e._passes[0].framebuffer)&&e._shadowMapTexture.width===e._textureSize.x||(destroyFramebuffer$1(e),createFramebuffer$3(e,t),checkFramebuffer(e,t),clearFramebuffer(e,t))}function clearFramebuffer(e,t,i){i=defaultValue(i,0),!e._isPointLight&&0!==i||(e._clearCommand.framebuffer=e._passes[i].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function resize(e,t){e._size=t;var i,r=e._passes,n=r.length,a=e._textureSize;e._isPointLight?(t=ContextLimits.maximumCubeMapSize>=t?t:ContextLimits.maximumCubeMapSize,a.x=t,i=new BoundingRectangle(0,0,a.y=t,t),r[0].passState.viewport=i,r[1].passState.viewport=i,r[2].passState.viewport=i,r[3].passState.viewport=i,r[4].passState.viewport=i,r[5].passState.viewport=i):1===n?(t=ContextLimits.maximumTextureSize>=t?t:ContextLimits.maximumTextureSize,a.x=t,a.y=t,r[0].passState.viewport=new BoundingRectangle(0,0,t,t)):4===n&&(t=ContextLimits.maximumTextureSize>=2*t?t:ContextLimits.maximumTextureSize/2,a.x=2*t,a.y=2*t,r[0].passState.viewport=new BoundingRectangle(0,0,t,t),r[1].passState.viewport=new BoundingRectangle(t,0,t,t),r[2].passState.viewport=new BoundingRectangle(0,t,t,t),r[3].passState.viewport=new BoundingRectangle(t,t,t,t)),e._clearPassState.viewport=new BoundingRectangle(0,0,a.x,a.y);for(var o=0;o<n;++o){var s=r[o],l=(d=s.passState.viewport).x/a.x,c=d.y/a.y,u=d.width/a.x,d=d.height/a.y;s.textureOffsets=new Matrix4(u,0,0,l,0,d,0,c,0,0,1,0,0,0,0,1)}}PickFramebuffer.prototype.end=function(e){for(var t=defaultValue(e.width,1),i=defaultValue(e.height,1),r=this._context,n=r.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb}),a=(e=Math.max(t,i))*e,o=Math.floor(.5*t),s=Math.floor(.5*i),l=0,c=0,u=0,d=-1,h=0;h<a;++h){if(-o<=l&&l<=o&&-s<=c&&c<=s){var p=4*((s-c)*t+l+o);if(colorScratch$7.red=Color.byteToFloat(n[p]),colorScratch$7.green=Color.byteToFloat(n[1+p]),colorScratch$7.blue=Color.byteToFloat(n[2+p]),colorScratch$7.alpha=Color.byteToFloat(n[3+p]),defined(p=r.getObjectByPickColor(colorScratch$7)))return p}(l===c||l<0&&-l===c||0<l&&l===1-c)&&(p=u,u=-d,d=p),l+=u,c+=d}},PickFramebuffer.prototype.isDestroyed=function(){return!1},PickFramebuffer.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),destroyObject(this)},SceneFramebuffer.prototype.update=function(e,t,i){var r=t.width,n=t.height;defined(t=this._colorTexture)&&t.width===r&&t.height===n&&i===this._useHdr||(destroyResources$3(this),i=(this._useHdr=i)?e.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,this._colorTexture=new Texture({context:e,width:r,height:n,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:i,sampler:Sampler.NEAREST}),this._idTexture=new Texture({context:e,width:r,height:n,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),e.depthTexture?(this._depthStencilTexture=new Texture({context:e,width:r,height:n,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8,sampler:Sampler.NEAREST}),this._depthStencilIdTexture=new Texture({context:e,width:r,height:n,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8,sampler:Sampler.NEAREST})):(this._depthStencilRenderbuffer=new Renderbuffer({context:e,width:r,height:n,format:RenderbufferFormat$1.DEPTH_STENCIL}),this._depthStencilIdRenderbuffer=new Renderbuffer({context:e,width:r,height:n,format:RenderbufferFormat$1.DEPTH_STENCIL})),this._framebuffer=new Framebuffer({context:e,colorTextures:[this._colorTexture],depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}),this._idFramebuffer=new Framebuffer({context:e,colorTextures:[this._idTexture],depthStencilTexture:this._depthStencilIdTexture,depthStencilRenderbuffer:this._depthStencilIdRenderbuffer,destroyAttachments:!1}))},SceneFramebuffer.prototype.clear=function(e,t,i){var r=t.framebuffer;t.framebuffer=this._framebuffer,Color.clone(i,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=this._idFramebuffer,Color.clone(this._idClearColor,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=r},SceneFramebuffer.prototype.getFramebuffer=function(){return this._framebuffer},SceneFramebuffer.prototype.getIdFramebuffer=function(){return this._idFramebuffer},SceneFramebuffer.prototype.isDestroyed=function(){return!1},SceneFramebuffer.prototype.destroy=function(){return destroyResources$3(this),destroyObject(this)},ShadowMapShader.getShadowCastShaderKeyword=function(e,t,i,r){return"castShadow "+e+" "+t+" "+i+" "+r},ShadowMapShader.createShadowCastVertexShader=function(e,t,i){var r=e.defines.slice(0),n=e.sources.slice(0);if(r.push("SHADOW_MAP"),i&&r.push("GENERATE_POSITION"),e=defined(ShaderSource.findPositionVarying(e)),t&&!e){for(var a=n.length,o=0;o<a;++o)n[o]=ShaderSource.replaceMain(n[o],"czm_shadow_cast_main");n.push("varying vec3 v_positionEC; \nvoid main() \n{ \n    czm_shadow_cast_main(); \n    v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}")}return new ShaderSource({defines:r,sources:n})},ShadowMapShader.createShadowCastFragmentShader=function(e,t,i,r){var n=e.defines.slice(0),a=e.sources.slice(0),o=ShaderSource.findPositionVarying(e),s=defined(o);s||(o="v_positionEC");for(var l=a.length,c=0;c<l;++c)a[c]=ShaderSource.replaceMain(a[c],"czm_shadow_cast_main");return e="",t&&(s||(e+="varying vec3 v_positionEC; \n"),e+="uniform vec4 shadowMap_lightPositionEC; \n"),e+=r?"void main() \n{ \n":"void main() \n{ \n    czm_shadow_cast_main(); \n    if (gl_FragColor.a == 0.0) \n    { \n       discard; \n    } \n",e+=t?"    float distance = length("+o+"); \n    if (distance >= shadowMap_lightPositionEC.w) \n    { \n        discard; \n    } \n    distance /= shadowMap_lightPositionEC.w; // radius \n    gl_FragColor = czm_packDepth(distance); \n":i?"    gl_FragColor = vec4(1.0); \n":"    gl_FragColor = czm_packDepth(gl_FragCoord.z); \n",e+="} \n",a.push(e),new ShaderSource({defines:n,sources:a})},ShadowMapShader.getShadowReceiveShaderKeyword=function(e,t,i,r){return"receiveShadow "+e._usesDepthTexture+e._polygonOffsetSupported+e._isPointLight+e._isSpotLight+(1<e._numberOfCascades)+e.debugCascadeColors+e.softShadows+t+i+r},ShadowMapShader.createShadowReceiveVertexShader=function(e,t,i){var r=e.defines.slice(0);e=e.sources.slice(0);return r.push("SHADOW_MAP"),t&&(i?r.push("GENERATE_POSITION_AND_NORMAL"):r.push("GENERATE_POSITION")),new ShaderSource({defines:r,sources:e})},ShadowMapShader.createShadowReceiveFragmentShader=function(e,t,i,r,n){for(var a=ShaderSource.findNormalVarying(e),o=!r&&defined(a)||r&&n,s=ShaderSource.findPositionVarying(e),l=defined(s),c=t._usesDepthTexture,u=t._polygonOffsetSupported,d=t._isPointLight,h=t._isSpotLight,p=1<t._numberOfCascades,f=t.debugCascadeColors,m=t.softShadows,g=(n=d?t._pointBias:r?t._terrainBias:t._primitiveBias,t=e.defines.slice(0),e.sources.slice(0)),y=g.length,_=0;_<y;++_)g[_]=ShaderSource.replaceMain(g[_],"czm_shadow_receive_main");return d?t.push("USE_CUBE_MAP_SHADOW"):c&&t.push("USE_SHADOW_DEPTH_TEXTURE"),m&&!d&&t.push("USE_SOFT_SHADOWS"),p&&i&&r&&(o?t.push("ENABLE_VERTEX_LIGHTING"):t.push("ENABLE_DAYNIGHT_SHADING")),i&&n.normalShading&&o&&(t.push("USE_NORMAL_SHADING"),0<n.normalShadingSmooth&&t.push("USE_NORMAL_SHADING_SMOOTH")),i="",i+=d?"uniform samplerCube shadowMap_textureCube; \n":"uniform sampler2D shadowMap_texture; \n",i+="uniform mat4 shadowMap_matrix; \nuniform vec3 shadowMap_lightDirectionEC; \nuniform vec4 shadowMap_lightPositionEC; \nuniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; \nuniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; \n#ifdef LOG_DEPTH \nvarying vec3 v_logPositionEC; \n#endif \nvec4 getPositionEC() \n{ \n"+(l?"    return vec4("+s+", 1.0); \n":"#ifndef LOG_DEPTH \n    return czm_windowToEyeCoordinates(gl_FragCoord); \n#else \n    return vec4(v_logPositionEC, 1.0); \n#endif \n")+"} \nvec3 getNormalEC() \n{ \n"+(o?"    return normalize("+a+"); \n":"    return vec3(1.0); \n")+"} \nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) \n{ \n"+(n.normalOffset&&o?"    float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; \n    float normalOffsetScale = 1.0 - nDotL; \n    vec3 offset = normalOffset * normalOffsetScale * normalEC; \n    positionEC.xyz += offset; \n":"")+"} \n",i+="void main() \n{ \n    czm_shadow_receive_main(); \n    vec4 positionEC = getPositionEC(); \n    vec3 normalEC = getNormalEC(); \n    float depth = -positionEC.z; \n",i+="    czm_shadowParameters shadowParameters; \n    shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; \n    shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; \n    shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; \n    shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; \n",r?i+="    shadowParameters.depthBias *= max(depth * 0.01, 1.0); \n":u||(i+="    shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); \n"),i+=d?"    vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; \n    float distance = length(directionEC); \n    directionEC = normalize(directionEC); \n    float radius = shadowMap_lightPositionEC.w; \n    // Stop early if the fragment is beyond the point light radius \n    if (distance > radius) \n    { \n        return; \n    } \n    vec3 directionWC  = czm_inverseViewRotation * directionEC; \n    shadowParameters.depth = distance / radius; \n    shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n    shadowParameters.texCoords = directionWC; \n    float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); \n":h?"    vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); \n    float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n    applyNormalOffset(positionEC, normalEC, nDotL); \n    vec4 shadowPosition = shadowMap_matrix * positionEC; \n    // Spot light uses a perspective projection, so perform the perspective divide \n    shadowPosition /= shadowPosition.w; \n    // Stop early if the fragment is not in the shadow bounds \n    if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n    { \n        return; \n    } \n    shadowParameters.texCoords = shadowPosition.xy; \n    shadowParameters.depth = shadowPosition.z; \n    shadowParameters.nDotL = nDotL; \n    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n":p?"    float maxDepth = shadowMap_cascadeSplits[1].w; \n    // Stop early if the eye depth exceeds the last cascade \n    if (depth > maxDepth) \n    { \n        return; \n    } \n    // Get the cascade based on the eye-space depth \n    vec4 weights = czm_cascadeWeights(depth); \n    // Apply normal offset \n    float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n    applyNormalOffset(positionEC, normalEC, nDotL); \n    // Transform position into the cascade \n    vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC; \n    // Get visibility \n    shadowParameters.texCoords = shadowPosition.xy; \n    shadowParameters.depth = shadowPosition.z; \n    shadowParameters.nDotL = nDotL; \n    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n    // Fade out shadows that are far away \n    float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z; \n    float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0); \n    visibility = mix(visibility, 1.0, fade); \n"+(f?"    // Draw cascade colors for debugging \n    gl_FragColor *= czm_cascadeColor(weights); \n":""):"    float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n    applyNormalOffset(positionEC, normalEC, nDotL); \n    vec4 shadowPosition = shadowMap_matrix * positionEC; \n    // Stop early if the fragment is not in the shadow bounds \n    if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n    { \n        return; \n    } \n    shadowParameters.texCoords = shadowPosition.xy; \n    shadowParameters.depth = shadowPosition.z; \n    shadowParameters.nDotL = nDotL; \n    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n",i+="    gl_FragColor.rgb *= visibility; \n} \n",g.push(i),new ShaderSource({defines:t,sources:g})},ShadowMap.MAXIMUM_DISTANCE=2e4,ShadowMap.prototype.debugCreateRenderStates=function(){createRenderStates$5(this)},Object.defineProperties(ShadowMap.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){resize(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});var scratchViewport$2=new BoundingRectangle;function createDebugShadowViewCommand(e,t){var i=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n    vec2 uv = v_textureCoordinates; \n    vec3 dir; \n \n    if (uv.y < 0.5) \n    { \n        if (uv.x < 0.333) \n        { \n            dir.x = -1.0; \n            dir.y = uv.x * 6.0 - 1.0; \n            dir.z = uv.y * 4.0 - 1.0; \n        } \n        else if (uv.x < 0.666) \n        { \n            dir.y = -1.0; \n            dir.x = uv.x * 6.0 - 3.0; \n            dir.z = uv.y * 4.0 - 1.0; \n        } \n        else \n        { \n            dir.z = -1.0; \n            dir.x = uv.x * 6.0 - 5.0; \n            dir.y = uv.y * 4.0 - 1.0; \n        } \n    } \n    else \n    { \n        if (uv.x < 0.333) \n        { \n            dir.x = 1.0; \n            dir.y = uv.x * 6.0 - 1.0; \n            dir.z = uv.y * 4.0 - 3.0; \n        } \n        else if (uv.x < 0.666) \n        { \n            dir.y = 1.0; \n            dir.x = uv.x * 6.0 - 3.0; \n            dir.z = uv.y * 4.0 - 3.0; \n        } \n        else \n        { \n            dir.z = 1.0; \n            dir.x = uv.x * 6.0 - 5.0; \n            dir.y = uv.y * 4.0 - 3.0; \n        } \n    } \n \n    float shadow = czm_unpackDepth(textureCube(shadowMap_textureCube, dir)); \n    gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n":"uniform sampler2D shadowMap_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n"+(e._usesDepthTexture?"    float shadow = texture2D(shadowMap_texture, v_textureCoordinates).r; \n":"    float shadow = czm_unpackDepth(texture2D(shadowMap_texture, v_textureCoordinates)); \n")+"    gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n";return(i=t.createViewportQuadCommand(i,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}})).pass=Pass$1.OVERLAY,i}function updateDebugShadowViewCommand(e,t){var i=t.context,r=t.context.drawingBufferWidth,n=t.context.drawingBufferHeight,a=.3*Math.min(r,n);(n=scratchViewport$2).x=r-a,n.y=0,n.width=a,n.height=a,defined(a=e._debugShadowViewCommand)||(a=createDebugShadowViewCommand(e,i),e._debugShadowViewCommand=a),defined(a.renderState)&&BoundingRectangle.equals(a.renderState.viewport,n)||(a.renderState=RenderState.fromCache({viewport:BoundingRectangle.clone(n)})),t.commandList.push(e._debugShadowViewCommand)}var frustumCornersNDC$1=new Array(8);frustumCornersNDC$1[0]=new Cartesian4(-1,-1,-1,1),frustumCornersNDC$1[1]=new Cartesian4(1,-1,-1,1),frustumCornersNDC$1[2]=new Cartesian4(1,1,-1,1),frustumCornersNDC$1[3]=new Cartesian4(-1,1,-1,1),frustumCornersNDC$1[4]=new Cartesian4(-1,-1,1,1),frustumCornersNDC$1[5]=new Cartesian4(1,-1,1,1),frustumCornersNDC$1[6]=new Cartesian4(1,1,1,1),frustumCornersNDC$1[7]=new Cartesian4(-1,1,1,1);for(var scratchMatrix$4=new Matrix4,scratchFrustumCorners$1=new Array(8),i$5=0;i$5<8;++i$5)scratchFrustumCorners$1[i$5]=new Cartesian4;function createDebugPointLight(e,t){return new Primitive({geometryInstances:[new GeometryInstance({geometry:new BoxOutlineGeometry({minimum:new Cartesian3(-.5,-.5,-.5),maximum:new Cartesian3(.5,.5,.5)}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(t)}}),new GeometryInstance({geometry:new SphereOutlineGeometry({radius:.5}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(t)}})],appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var debugOutlineColors=[Color.RED,Color.GREEN,Color.BLUE,Color.MAGENTA],scratchScale$8=new Cartesian3;function applyDebugSettings$1(e,t){updateDebugShadowViewCommand(e,t);var i,r,n,a=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(a&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new DebugCameraPrimitive({camera:e._sceneCamera,color:Color.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){a&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new DebugCameraPrimitive({camera:e._shadowMapCamera,color:Color.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(var o=0;o<e._numberOfCascades;++o)a&&(e._debugCascadeFrustums[o]=e._debugCascadeFrustums[o]&&e._debugCascadeFrustums[o].destroy(),e._debugCascadeFrustums[o]=new DebugCameraPrimitive({camera:e._passes[o].camera,color:debugOutlineColors[o],updateOnChange:!1})),e._debugCascadeFrustums[o].update(t)}}else e._isPointLight?defined(e._debugLightFrustum)&&!e._needsUpdate||(i=e._shadowMapCamera.positionWC,r=Quaternion.IDENTITY,n=2*e._pointLightRadius,n=Cartesian3.fromElements(n,n,n,scratchScale$8),n=Matrix4.fromTranslationQuaternionRotationScale(i,r,n,scratchMatrix$4),e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=createDebugPointLight(n,Color.YELLOW)):defined(e._debugLightFrustum)&&!e._needsUpdate||(e._debugLightFrustum=new DebugCameraPrimitive({camera:e._shadowMapCamera,color:Color.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function ShadowMapCamera(){this.viewMatrix=new Matrix4,this.inverseViewMatrix=new Matrix4,this.frustum=void 0,this.positionCartographic=new Cartographic,this.positionWC=new Cartesian3,this.directionWC=Cartesian3.clone(Cartesian3.UNIT_Z),this.upWC=Cartesian3.clone(Cartesian3.UNIT_Y),this.rightWC=Cartesian3.clone(Cartesian3.UNIT_X),this.viewProjectionMatrix=new Matrix4}ShadowMapCamera.prototype.clone=function(e){Matrix4.clone(e.viewMatrix,this.viewMatrix),Matrix4.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),Cartographic.clone(e.positionCartographic,this.positionCartographic),Cartesian3.clone(e.positionWC,this.positionWC),Cartesian3.clone(e.directionWC,this.directionWC),Cartesian3.clone(e.upWC,this.upWC),Cartesian3.clone(e.rightWC,this.rightWC)};var scaleBiasMatrix=new Matrix4(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);ShadowMapCamera.prototype.getViewProjection=function(){var e=this.viewMatrix,t=this.frustum.projectionMatrix;return Matrix4.multiply(t,e,this.viewProjectionMatrix),Matrix4.multiply(scaleBiasMatrix,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var scratchSplits$1=new Array(5),scratchFrustum=new PerspectiveFrustum,scratchCascadeDistances=new Array(4),scratchMin$3=new Cartesian3,scratchMax$3=new Cartesian3;function computeCascades(e,t){var i=e._shadowMapCamera,r=e._sceneCamera,n=r.frustum.near,a=r.frustum.far,o=e._numberOfCascades,s=a-n,l=a/n,c=.9,u=!1;t.shadowState.closestObjectSize<200&&(u=!0,c=.9);var d=scratchCascadeDistances,h=scratchSplits$1;for(h[0]=n,h[o]=a,g=0;g<o;++g){var p=(g+1)/o,f=n*Math.pow(l,p);p=n+s*p,f=CesiumMath.lerp(p,f,c);h[g+1]=f,d[g]=f-h[g]}if(u){for(g=0;g<o;++g)d[g]=Math.min(d[g],e._maximumCascadeDistances[g]);for(var m=h[0],g=0;g<o-1;++g)m+=d[g],h[g+1]=m}Cartesian4.unpack(h,0,e._cascadeSplits[0]),Cartesian4.unpack(h,1,e._cascadeSplits[1]),Cartesian4.unpack(d,0,e._cascadeDistances);var y=(u=i.frustum).left,_=u.right,v=u.bottom,C=u.top,x=u.near,b=u.far,S=i.positionWC,T=i.directionWC,E=i.upWC,w=r.frustum.clone(scratchFrustum),A=i.getViewProjection();for(g=0;g<o;++g){w.near=h[g],w.far=h[g+1];for(var P=Matrix4.multiply(w.projectionMatrix,r.viewMatrix,scratchMatrix$4),D=Matrix4.inverse(P,scratchMatrix$4),M=Matrix4.multiply(A,D,scratchMatrix$4),I=Cartesian3.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,scratchMin$3),R=Cartesian3.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,scratchMax$3),O=0;O<8;++O){var L=Cartesian4.clone(frustumCornersNDC$1[O],scratchFrustumCorners$1[O]);Matrix4.multiplyByVector(M,L,L),Cartesian3.divideByScalar(L,L.w,L),Cartesian3.minimumByComponent(L,I,I),Cartesian3.maximumByComponent(L,R,R)}I.x=Math.max(I.x,0),I.y=Math.max(I.y,0),I.z=0,R.x=Math.min(R.x,1),R.y=Math.min(R.y,1),R.z=Math.min(R.z,1);var N=e._passes[g];(P=N.camera).clone(i),(D=P.frustum).left=y+I.x*(_-y),D.right=y+R.x*(_-y),D.bottom=v+I.y*(C-v),D.top=v+R.y*(C-v),D.near=x+I.z*(b-x),D.far=x+R.z*(b-x),N.cullingVolume=P.frustum.computeCullingVolume(S,T,E),D=e._cascadeMatrices[g],Matrix4.multiply(P.getViewProjection(),r.inverseViewMatrix,D),Matrix4.multiply(N.textureOffsets,D,D)}}var scratchLightView=new Matrix4,scratchRight$2=new Cartesian3,scratchUp$1=new Cartesian3,scratchTranslation$1=new Cartesian3;function fitShadowMapToScene(e,t){var i=e._shadowMapCamera,r=e._sceneCamera,n=Matrix4.multiply(r.frustum.projectionMatrix,r.viewMatrix,scratchMatrix$4),a=Matrix4.inverse(n,scratchMatrix$4),o=i.directionWC,s=r.directionWC;Cartesian3.equalsEpsilon(o,s,CesiumMath.EPSILON10)&&(s=r.upWC);var l=Cartesian3.cross(o,s,scratchRight$2);s=Cartesian3.cross(l,o,scratchUp$1);Cartesian3.normalize(s,s),Cartesian3.normalize(l,l);for(var c=Cartesian3.fromElements(0,0,0,scratchTranslation$1),u=(e=Matrix4.computeView(c,o,s,l,scratchLightView),Matrix4.multiply(e,a,scratchMatrix$4)),d=Cartesian3.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,scratchMin$3),h=Cartesian3.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,scratchMax$3),p=0;p<8;++p){var f=Cartesian4.clone(frustumCornersNDC$1[p],scratchFrustumCorners$1[p]);Matrix4.multiplyByVector(u,f,f),Cartesian3.divideByScalar(f,f.w,f),Cartesian3.minimumByComponent(f,d,d),Cartesian3.maximumByComponent(f,h,h)}h.z+=1e3,d.z-=10,(n=scratchTranslation$1).x=-.5*(d.x+h.x),n.y=-.5*(d.y+h.y),n.z=-h.z,r=Matrix4.fromTranslation(n,scratchMatrix$4),e=Matrix4.multiply(r,e,e),c=.5*(h.x-d.x),a=.5*(h.y-d.y),n=h.z-d.z,(r=i.frustum).left=-c,r.right=c,r.bottom=-a,r.top=a,r.near=.01,r.far=n,Matrix4.clone(e,i.viewMatrix),Matrix4.inverse(e,i.inverseViewMatrix),Matrix4.getTranslation(i.inverseViewMatrix,i.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(i.positionWC,i.positionCartographic),Cartesian3.clone(o,i.directionWC),Cartesian3.clone(s,i.upWC),Cartesian3.clone(l,i.rightWC)}var directions=[new Cartesian3(-1,0,0),new Cartesian3(0,-1,0),new Cartesian3(0,0,-1),new Cartesian3(1,0,0),new Cartesian3(0,1,0),new Cartesian3(0,0,1)],ups=[new Cartesian3(0,-1,0),new Cartesian3(0,0,-1),new Cartesian3(0,-1,0),new Cartesian3(0,-1,0),new Cartesian3(0,0,1),new Cartesian3(0,-1,0)],rights=[new Cartesian3(0,0,1),new Cartesian3(1,0,0),new Cartesian3(-1,0,0),new Cartesian3(0,0,-1),new Cartesian3(1,0,0),new Cartesian3(1,0,0)];function computeOmnidirectional(e,t){var i=new PerspectiveFrustum;i.fov=CesiumMath.PI_OVER_TWO,i.near=1,i.far=e._pointLightRadius,i.aspectRatio=1;for(var r=0;r<6;++r){var n=e._passes[r].camera;n.positionWC=e._shadowMapCamera.positionWC,n.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),n.directionWC=directions[r],n.upWC=ups[r],n.rightWC=rights[r],Matrix4.computeView(n.positionWC,n.directionWC,n.upWC,n.rightWC,n.viewMatrix),Matrix4.inverse(n.viewMatrix,n.inverseViewMatrix),n.frustum=i}}var scratchCartesian1$8=new Cartesian3,scratchCartesian2$b=new Cartesian3,scratchBoundingSphere$4=new BoundingSphere,scratchCenter$5=scratchBoundingSphere$4.center;function checkVisibility(e,t){var i=e._sceneCamera,r=e._shadowMapCamera,n=scratchBoundingSphere$4;if(e._cascadesEnabled){if(i.frustum.near>=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);var a=t.mapProjection.ellipsoid.geodeticSurfaceNormal(i.positionWC,scratchCartesian1$8);i=Cartesian3.negate(r.directionWC,scratchCartesian2$b),a=Cartesian3.dot(a,i),i=CesiumMath.clamp(a/.1,0,1);if(e._darkness=CesiumMath.lerp(1,e.darkness,i),a<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else e._isPointLight?(n.center=r.positionWC,n.radius=e._pointLightRadius):(a=r.frustum.far/2,r=Cartesian3.add(r.positionWC,Cartesian3.multiplyByScalar(r.directionWC,a,scratchCenter$5),scratchCenter$5),n.center=r,n.radius=a),e._outOfView=t.cullingVolume.computeVisibility(n)===Intersect$1.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(n),BoundingSphere.clone(n,e._boundingSphere)}function updateCameras(e,t){var i=t.camera,r=e._lightCamera,n=e._sceneCamera,a=e._shadowMapCamera;e._cascadesEnabled?Cartesian3.clone(r.directionWC,a.directionWC):e._isPointLight?Cartesian3.clone(r.positionWC,a.positionWC):a.clone(r);var o,s;r=e._lightDirectionEC;Matrix4.multiplyByPointAsVector(i.viewMatrix,a.directionWC,r),Cartesian3.normalize(r,r),Cartesian3.negate(r,r),Matrix4.multiplyByPoint(i.viewMatrix,a.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,s=e._fitNearFar?(o=Math.min(t.shadowState.nearPlane,e.maximumDistance),s=Math.min(t.shadowState.farPlane,e.maximumDistance),Math.max(s,o+1)):(o=i.frustum.near,e.maximumDistance),e._sceneCamera=Camera.clone(i,n),i.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=o,e._sceneCamera.frustum.far=s,e._distance=s-o,checkVisibility(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}ShadowMap.prototype.update=function(e){var t,i,r,n;updateCameras(this,e),this._needsUpdate&&(updateFramebuffer(this,e.context),this._isPointLight&&computeOmnidirectional(this,e),this._cascadesEnabled&&(fitShadowMapToScene(this,e),1<this._numberOfCascades&&computeCascades(this,e)),this._isPointLight?this._shadowMapCullingVolume=CullingVolume.fromBoundingSphere(this._boundingSphere):(t=(n=this._shadowMapCamera).positionWC,i=n.directionWC,r=n.upWC,this._shadowMapCullingVolume=n.frustum.computeCullingVolume(t,i,r),1===this._passes.length&&this._passes[0].camera.clone(n))),1===this._passes.length&&(n=this._sceneCamera.inverseViewMatrix,Matrix4.multiply(this._shadowMapCamera.getViewProjection(),n,this._shadowMapMatrix)),this.debugShow&&applyDebugSettings$1(this,e)},ShadowMap.prototype.updatePass=function(e,t){clearFramebuffer(this,e,t)};var scratchTexelStepSize=new Cartesian2;function combineUniforms(e,t,i){var r=e._isPointLight?e._pointBias:i?e._terrainBias:e._primitiveBias;return combine(t,{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){var t=scratchTexelStepSize;return t.x=1/e._textureSize.x,t.y=1/e._textureSize.y,Cartesian4.fromElements(t.x,t.y,r.depthBias,r.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return Cartesian4.fromElements(r.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new Cartesian4,combinedUniforms2:new Cartesian4},!1)}function createCastDerivedCommand(e,t,i,r,n,a){var o,s,l,c,u,d,h,p,f;return defined(a)&&(f=a.shaderProgram,o=a.renderState,s=a.uniformMap),(a=DrawCommand.shallowClone(i,a)).castShadows=!0,a.receiveShadows=!1,defined(f)&&n===i.shaderProgram.id&&!t||(l=i.shaderProgram,c=i.pass===Pass$1.GLOBE,p=i.pass!==Pass$1.TRANSLUCENT,u=e._isPointLight,d=e._usesDepthTexture,h=ShadowMapShader.getShadowCastShaderKeyword(u,c,d,p),defined(f=r.shaderCache.getDerivedShaderProgram(l,h))||(n=l.vertexShaderSource,t=l.fragmentShaderSource,n=ShadowMapShader.createShadowCastVertexShader(n,u,c),p=ShadowMapShader.createShadowCastFragmentShader(t,u,d,p),f=r.shaderCache.createDerivedShaderProgram(l,h,{vertexShaderSource:n,fragmentShaderSource:p,attributeLocations:l._attributeLocations})),o=e._primitiveRenderState,u?o=e._pointRenderState:c&&(o=e._terrainRenderState),i.renderState.cull.enabled||((o=clone(o,!1)).cull=clone(o.cull,!1),o.cull.enabled=!1,o=RenderState.fromCache(o)),s=combineUniforms(e,i.uniformMap,c)),a.shaderProgram=f,a.renderState=o,a.uniformMap=s,a}function CommandExtent(){this.command=void 0,this.near=void 0,this.far=void 0}function View(e,t,i){var r,n,a=e.context;a.depthTexture&&(r=new GlobeDepth),e._useOIT&&a.depthTexture&&(n=new OIT(a)),(e=new PassState(a)).viewport=BoundingRectangle.clone(i),this.camera=t,this._cameraClone=Camera.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=i,this.passState=e,this.pickFramebuffer=new PickFramebuffer(a),this.pickDepthFramebuffer=new PickDepthFramebuffer,this.sceneFramebuffer=new SceneFramebuffer,this.globeDepth=r,this.globeTranslucencyFramebuffer=new GlobeTranslucencyFramebuffer,this.oit=n,this.pickDepths=[],this.debugGlobeDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}ShadowMap.createReceiveDerivedCommand=function(e,t,i,r,n){defined(n)||(n={});var a,o,s,l=0<e.length,c=t.shaderProgram,u=c.vertexShaderSource,d=c.fragmentShaderSource,h=t.pass===Pass$1.GLOBE,p=!1;return h&&(p=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&l&&(defined(n.receiveCommand)&&(s=n.receiveCommand.shaderProgram,a=n.receiveCommand.uniformMap),n.receiveCommand=DrawCommand.shallowClone(t,n.receiveCommand),n.castShadows=!1,n.receiveShadows=!0,o=n.receiveShaderCastShadows!==t.castShadows,l=n.receiveShaderProgramId!==t.shaderProgram.id,(!defined(s)||l||i||o)&&(o=ShadowMapShader.getShadowReceiveShaderKeyword(e[0],t.castShadows,h,p),defined(s=r.shaderCache.getDerivedShaderProgram(c,o))||(u=ShadowMapShader.createShadowReceiveVertexShader(u,h,p),p=ShadowMapShader.createShadowReceiveFragmentShader(d,e[0],t.castShadows,h,p),s=r.shaderCache.createDerivedShaderProgram(c,o,{vertexShaderSource:u,fragmentShaderSource:p,attributeLocations:c._attributeLocations})),a=combineUniforms(e[0],t.uniformMap,h)),n.receiveCommand.shaderProgram=s,n.receiveCommand.uniformMap=a,n.receiveShaderProgramId=t.shaderProgram.id,n.receiveShaderCastShadows=t.castShadows),n},ShadowMap.createCastDerivedCommand=function(e,t,i,r,n){if(defined(n)||(n={}),t.castShadows){var a=n.castCommands;defined(a)||(a=n.castCommands=[]);var o=n.castShaderProgramId,s=e.length;a.length=s;for(var l=0;l<s;++l)a[l]=createCastDerivedCommand(e[l],i,t,r,o,a[l]);n.castShaderProgramId=t.shaderProgram.id}return n},ShadowMap.prototype.isDestroyed=function(){return!1},ShadowMap.prototype.destroy=function(){destroyFramebuffer$1(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(var e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return destroyObject(this)};var scratchPosition0=new Cartesian3,scratchPosition1=new Cartesian3;function maxComponent(e,t){var i=Math.max(Math.abs(e.x),Math.abs(t.x)),r=Math.max(Math.abs(e.y),Math.abs(t.y));t=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(i,r),t)}function cameraEqual(e,t,i){var r=1/Math.max(1,maxComponent(e.position,t.position));return Cartesian3.multiplyByScalar(e.position,r,scratchPosition0),Cartesian3.multiplyByScalar(t.position,r,scratchPosition1),Cartesian3.equalsEpsilon(scratchPosition0,scratchPosition1,i)&&Cartesian3.equalsEpsilon(e.direction,t.direction,i)&&Cartesian3.equalsEpsilon(e.up,t.up,i)&&Cartesian3.equalsEpsilon(e.right,t.right,i)&&Matrix4.equalsEpsilon(e.transform,t.transform,i)&&e.frustum.equalsEpsilon(t.frustum,i)}function updateFrustums(e,t,i,r){var n,a=t.frameState,o=a.camera,s=a.useLogDepth?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,l=t.mode===SceneMode$1.SCENE2D,c=t.nearToFarDistance2D;r*=1+CesiumMath.EPSILON2,i=Math.min(Math.max(i,o.frustum.near),o.frustum.far),r=Math.max(Math.min(r,o.frustum.far),i),n=l?(r=Math.min(r,o.position.z+t.nearToFarDistance2D),i=Math.min(i,r),Math.ceil(Math.max(1,r-i)/t.nearToFarDistance2D)):Math.ceil(Math.log(r/i)/Math.log(s));var u=e.frustumCommandsList;u.length=n;for(var d=0;d<n;++d){var h,p=l?(h=Math.min(r-c,i+d*c),Math.min(r,h+c)):(h=Math.max(i,Math.pow(s,d)*i),Math.min(r,s*h)),f=u[d];defined(f)?(f.near=h,f.far=p):f=u[d]=new FrustumCommands(h,p)}}function insertIntoBin(e,t,i,r,n){t.debugShowFrustums&&(i.debugOverlappingFrustums=0);for(var a,o=e.frustumCommandsList,s=o.length,l=0;l<s;++l){var c=o[l],u=c.near;if(!(c.far<r)){if(n<u)break;var d=i.pass;u=c.indices[d]++;if(c.commands[d][u]=i,t.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<l),i.executeInClosestFrustum)break}}t.debugShowFrustums&&((a=e.debugFrustumStatistics.commandsInFrustums)[i.debugOverlappingFrustums]=defined(a[i.debugOverlappingFrustums])?a[i.debugOverlappingFrustums]+1:1,++e.debugFrustumStatistics.totalCommands),t.updateDerivedCommands(i)}View.prototype.checkForCameraUpdates=function(e){var t=this.camera,i=this._cameraClone;return cameraEqual(t,i,CesiumMath.EPSILON15)?(this._cameraStartFired&&getTimestamp$1()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=getTimestamp$1(),Camera.clone(t,i),!0)};var scratchCullingVolume=new CullingVolume,scratchNearFarInterval=new Interval;View.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,r=i.directionWC,n=i.positionWC,a=e._computeCommandList,o=e._overlayCommandList,s=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var l=this.frustumCommandsList,c=l.length,u=Pass$1.NUMBER_OF_PASSES,d=0;d<c;++d)for(var h=0;h<u;++h)l[d].indices[h]=0;a.length=0,o.length=0;for(var p=this._commandExtents,f=p.length,m=0,g=+Number.MAX_VALUE,y=-Number.MAX_VALUE,_=t.shadowState.shadowsEnabled,v=+Number.MAX_VALUE,C=-Number.MAX_VALUE,x=Number.MAX_VALUE,b=t.mode===SceneMode$1.SCENE3D?t.occluder:void 0,S=t.cullingVolume,T=scratchCullingVolume.planes,E=0;E<5;++E)T[E]=S.planes[E];S=scratchCullingVolume;for(var w,A,P=s.length,D=0;D<P;++D){var M=s[D],I=M.pass;if(I===Pass$1.COMPUTE)a.push(M);else if(I===Pass$1.OVERLAY)o.push(M);else{var R=M.boundingVolume;if(defined(R)){if(!e.isVisible(M,S,b))continue;var O=(L=R.computePlaneDistances(n,r,scratchNearFarInterval)).start,L=L.stop;g=Math.min(g,O),y=Math.max(y,L);_&&M.receiveShadows&&O<ShadowMap.MAXIMUM_DISTANCE&&!(I===Pass$1.GLOBE&&O<-100&&100<L)&&(N=L-O,I!==Pass$1.GLOBE&&O<100&&(x=Math.min(x,N)),v=Math.min(v,O),C=Math.max(C,L))}else M instanceof ClearCommand?(O=i.frustum.near,L=i.frustum.far):(O=i.frustum.near,L=i.frustum.far,g=Math.min(g,O),y=Math.max(y,L));var N=p[m];defined(N)||(N=p[m]=new CommandExtent),N.command=M,N.near=O,N.far=L,m++}}for(_&&(v=Math.min(Math.max(v,i.frustum.near),i.frustum.far),C=Math.max(Math.min(C,i.frustum.far),v)),_&&(t.shadowState.nearPlane=v,t.shadowState.farPlane=C,t.shadowState.closestObjectSize=x),updateFrustums(this,e,g,y),w=0;w<m;w++)insertIntoBin(this,e,(A=p[w]).command,A.near,A.far);if(m<f)for(w=m;w<f&&defined((A=p[w]).command);w++)A.command=void 0;var F=l.length,B=t.frustumSplits;B.length=F+1;for(var V=0;V<F;++V)B[V]=l[V].near,V===F-1&&(B[V+1]=l[V].far)},View.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();for(var e=this.pickDepths,t=this.debugGlobeDepths,i=e.length,r=0;r<i;++r)e[r].destroy();for(i=t.length,r=0;r<i;++r)t[r].destroy()};var offscreenDefaultWidth=.1,mostDetailedPreloadTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.MOST_DETAILED_PRELOAD}),mostDetailedPickTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.MOST_DETAILED_PICK}),pickTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.PICK});function Picking(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;var t=new BoundingRectangle(0,0,1,1),i=new Camera(e);i.frustum=new OrthographicFrustum({width:offscreenDefaultWidth,aspectRatio:1,near:.1}),this._pickOffscreenView=new View(e,i,t)}Picking.prototype.update=function(){this._pickPositionCacheDirty=!0},Picking.prototype.getPickDepth=function(e,t){var i=e.view.pickDepths;return defined(e=i[t])||(e=new PickDepth,i[t]=e),e};var scratchOrthoPickingFrustum=new OrthographicOffCenterFrustum,scratchOrthoOrigin=new Cartesian3,scratchOrthoDirection=new Cartesian3,scratchOrthoPixelSize=new Cartesian2,scratchOrthoPickVolumeMatrix4=new Matrix4;function getPickOrthographicCullingVolume(e,t,i,r,n){var a=e.camera,o=a.frustum;defined(o._offCenterFrustum)&&(o=o._offCenterFrustum);var s=2*(t.x-n.x)/n.width-1;s*=.5*(o.right-o.left);var l=2*(n.height-t.y-n.y)/n.height-1;l*=.5*(o.top-o.bottom);var c=Matrix4.clone(a.transform,scratchOrthoPickVolumeMatrix4);return a._setTransform(Matrix4.IDENTITY),t=Cartesian3.clone(a.position,scratchOrthoOrigin),Cartesian3.multiplyByScalar(a.right,s,scratchOrthoDirection),Cartesian3.add(scratchOrthoDirection,t,t),Cartesian3.multiplyByScalar(a.up,l,scratchOrthoDirection),Cartesian3.add(scratchOrthoDirection,t,t),a._setTransform(c),e.mode===SceneMode$1.SCENE2D&&Cartesian3.fromElements(t.z,t.x,t.y,t),e=o.getPixelDimensions(n.width,n.height,1,1,scratchOrthoPixelSize),(n=scratchOrthoPickingFrustum).right=.5*e.x,n.left=-n.right,n.top=.5*e.y,n.bottom=-n.top,n.near=o.near,n.far=o.far,n.computeCullingVolume(t,a.directionWC,a.upWC)}var scratchPerspPickingFrustum=new PerspectiveOffCenterFrustum,scratchPerspPixelSize=new Cartesian2;function getPickPerspectiveCullingVolume(e,t,i,r,n){var a=e.camera,o=a.frustum,s=o.near,l=Math.tan(.5*o.fovy);e=o.aspectRatio*l,e=(2*(t.x-n.x)/n.width-1)*s*e,l=(2*(n.height-t.y-n.y)/n.height-1)*s*l,i=(n=o.getPixelDimensions(n.width,n.height,1,1,scratchPerspPixelSize)).x*i*.5,n=n.y*r*.5;return(r=scratchPerspPickingFrustum).top=l+n,r.bottom=l-n,r.right=e+i,r.left=e-i,r.near=s,r.far=o.far,r.computeCullingVolume(a.positionWC,a.directionWC,a.upWC)}function getPickCullingVolume(e,t,i,r,n){var a=e.camera.frustum;return(a instanceof OrthographicFrustum||a instanceof OrthographicOffCenterFrustum?getPickOrthographicCullingVolume:getPickPerspectiveCullingVolume)(e,t,i,r,n)}var scratchRectangleWidth=3,scratchRectangleHeight=3,scratchRectangle$7=new BoundingRectangle(0,0,scratchRectangleWidth,scratchRectangleHeight),scratchPosition$b=new Cartesian2,scratchColorZero=new Color(0,0,0,0);function renderTranslucentDepthForPick(e,t){var i=e.context,r=e.frameState,n=e.environmentState,a=e.defaultView,o=(e.view=a).viewport;o.x=0,o.y=0,o.width=i.drawingBufferWidth,o.height=i.drawingBufferHeight;var s=a.passState;s.viewport=BoundingRectangle.clone(o,s.viewport),e.clearPasses(r.passes),r.passes.pick=!0,r.passes.depth=!0,r.cullingVolume=getPickCullingVolume(e,t,1,1,o),r.tilesetPassState=pickTilesetPassState,e.updateEnvironment(),n.renderTranslucentDepthForPick=!0,s=a.pickDepthFramebuffer.update(i,t,o),e.updateAndExecuteCommands(s,scratchColorZero),e.resolveFramebuffers(s),i.endFrame()}Picking.prototype.pick=function(e,t,i,r){scratchRectangleWidth=defaultValue(i,3),scratchRectangleHeight=defaultValue(r,scratchRectangleWidth);var n=e.context,a=n.uniformState,o=e.frameState,s=e.defaultView;return(i=(e.view=s).viewport).x=0,i.y=0,i.width=n.drawingBufferWidth,i.height=n.drawingBufferHeight,(r=s.passState).viewport=BoundingRectangle.clone(i,r.viewport),t=SceneTransforms.transformWindowToDrawingBuffer(e,t,scratchPosition$b),e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=getPickCullingVolume(e,t,scratchRectangleWidth,scratchRectangleHeight,i),o.invertClassification=!1,o.passes.pick=!0,o.tilesetPassState=pickTilesetPassState,a.update(o),e.updateEnvironment(),scratchRectangle$7.x=t.x-.5*(scratchRectangleWidth-1),scratchRectangle$7.y=e.drawingBufferHeight-t.y-.5*(scratchRectangleHeight-1),scratchRectangle$7.width=scratchRectangleWidth,scratchRectangle$7.height=scratchRectangleHeight,r=s.pickFramebuffer.begin(scratchRectangle$7,s.viewport),e.updateAndExecuteCommands(r,scratchColorZero),e.resolveFramebuffers(r),s=s.pickFramebuffer.end(scratchRectangle$7),n.endFrame(),s};var scratchPerspectiveFrustum=new PerspectiveFrustum,scratchPerspectiveOffCenterFrustum=new PerspectiveOffCenterFrustum,scratchOrthographicFrustum=new OrthographicFrustum,scratchOrthographicOffCenterFrustum=new OrthographicOffCenterFrustum;Picking.prototype.pickPositionWorldCoordinates=function(e,t,i){if(e.useDepthPicking){var r=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(r))return Cartesian3.clone(this._pickPositionCache[r],i);var n=e.frameState,a=e.context,o=a.uniformState,s=e.defaultView;e.view=s;var l=SceneTransforms.transformWindowToDrawingBuffer(e,t,scratchPosition$b);e.pickTranslucentDepth?renderTranslucentDepthForPick(e,l):(e.updateFrameState(),o.update(n),e.updateEnvironment()),l.y=e.drawingBufferHeight-l.y;for(var c=e.camera,u=defined(c.frustum.fov)?c.frustum.clone(scratchPerspectiveFrustum):defined(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(scratchPerspectiveOffCenterFrustum):defined(c.frustum.width)?c.frustum.clone(scratchOrthographicFrustum):c.frustum.clone(scratchOrthographicOffCenterFrustum),d=s.frustumCommandsList,h=d.length,p=0;p<h;++p){var f=this.getPickDepth(e,p).getDepth(a,l.x,l.y);if(defined(f)&&0<f&&f<1){var m,g=d[p];return e.mode===SceneMode$1.SCENE2D?(m=c.position.z,c.position.z=m-g.near+1,u.far=Math.max(1,g.far-g.near),u.near=1,o.update(n)):(u.near=g.near*(0!==p?e.opaqueFrustumNearOffset:1),u.far=g.far),o.updateFrustum(u),i=SceneTransforms.drawingBufferToWgs84Coordinates(e,l,f,i),e.mode===SceneMode$1.SCENE2D&&(c.position.z=m,o.update(n)),this._pickPositionCache[r]=Cartesian3.clone(i),i}}this._pickPositionCache[r]=void 0}};var scratchPickPositionCartographic=new Cartographic;function drillPick(e,t){var i,r,n=[],a=[],o=[],s=[];defined(e)||(e=Number.MAX_VALUE);for(var l=t();defined(l);){var c=l.object,u=l.position,d=l.exclude;if(defined(u)&&!defined(c)){n.push(l);break}if(!defined(c)||!defined(c.primitive))break;if(!d&&(n.push(l),--e<=0))break;d=!1,"function"==typeof(u=c.primitive).getGeometryInstanceAttributes&&defined(c.id)&&defined(r=u.getGeometryInstanceAttributes(c.id))&&defined(r.show)&&(d=!0,r.show=ShowGeometryInstanceAttribute.toValue(!1,r.show),o.push(r)),c instanceof Cesium3DTileFeature&&(d=!0,c.show=!1,s.push(c)),d||(u.show=!1,a.push(u)),l=t()}for(i=0;i<a.length;++i)a[i].show=!0;for(i=0;i<o.length;++i)(r=o[i]).show=ShowGeometryInstanceAttribute.toValue(!0,r.show);for(i=0;i<s.length;++i)s[i].show=!0;return n}Picking.prototype.pickPosition=function(e,t,i){return defined(i=this.pickPositionWorldCoordinates(e,t,i))&&e.mode!==SceneMode$1.SCENE3D&&(Cartesian3.fromElements(i.y,i.z,i.x,i),e=(t=e.mapProjection).ellipsoid,t=t.unproject(i,scratchPickPositionCartographic),e.cartographicToCartesian(t,i)),i},Picking.prototype.drillPick=function(e,t,i,r,n){var a=this;return drillPick(i,(function(){var i=a.pick(e,t,r,n);if(defined(i))return{object:i,position:void 0,exclude:!1}})).map((function(e){return e.object}))};var scratchRight$3=new Cartesian3,scratchUp$2=new Cartesian3;function MostDetailedRayPick(e,t,i){this.ray=e,this.width=t,this.tilesets=i,this.ready=!1,this.deferred=when.defer(),this.promise=this.deferred.promise}function updateOffscreenCameraFromRay(e,t,i,r){var n=t.direction,a=Cartesian3.mostOrthogonalAxis(n,scratchRight$3),o=Cartesian3.cross(n,a,scratchRight$3);a=Cartesian3.cross(n,o,scratchUp$2);return r.position=t.origin,r.direction=n,r.up=a,r.right=o,r.frustum.width=defaultValue(i,offscreenDefaultWidth),r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function updateMostDetailedRayPick(e,t,i){var r=t.frameState,n=i.ray,a=i.width,o=i.tilesets,s=e._pickOffscreenView.camera,l=(a=updateOffscreenCameraFromRay(e,n,a,s),mostDetailedPreloadTilesetPassState);l.camera=s,l.cullingVolume=a;for(var c=!0,u=o.length,d=0;d<u;++d){var h=o[d];h.show&&t.primitives.contains(h)&&(h.updateForPass(r,l),c=c&&l.ready)}return c&&i.deferred.resolve(),c}function getTilesets(e,t,i){for(var r=e.length,n=0;n<r;++n){var a=e.get(n);a.show&&(defined(a.isCesium3DTileset)?defined(t)&&-1!==t.indexOf(a)||i.push(a):a instanceof PrimitiveCollection&&getTilesets(a,t,i))}}function launchMostDetailedRayPick(e,t,i,r,n,a){var o=[];return getTilesets(t.primitives,r,o),0===o.length?when.resolve(a()):(o=new MostDetailedRayPick(i,n,o),e._mostDetailedRayPicks.push(o),o.promise.then((function(){return a()})))}function isExcluded(e,t){return!(!defined(e)||!defined(t)||0===t.length)&&(-1<t.indexOf(e)||-1<t.indexOf(e.primitive)||-1<t.indexOf(e.id))}function getRayIntersection(e,t,i,r,n,a,o){var s=t.context,l=s.uniformState,c=t.frameState,u=e._pickOffscreenView;if(updateOffscreenCameraFromRay(e,i,n,(t.view=u).camera),scratchRectangle$7=BoundingRectangle.clone(u.viewport,scratchRectangle$7),n=u.pickFramebuffer.begin(scratchRectangle$7,u.viewport),t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,c.tilesetPassState=o?mostDetailedPickTilesetPassState:pickTilesetPassState,l.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(n,scratchColorZero),t.resolveFramebuffers(n),n=u.pickFramebuffer.end(s),t.context.depthTexture)for(var d=u.frustumCommandsList.length,h=0;h<d;++h){var p=e.getPickDepth(t,h).getDepth(s,0,0);if(defined(p)&&0<p&&p<1){var f=u.frustumCommandsList[h],m=(m=f.near*(0!==h?t.opaqueFrustumNearOffset:1))+p*(f.far-m),g=Ray.getPoint(i,m);break}}if(t.view=t.defaultView,s.endFrame(),defined(n)||defined(g))return{object:n,position:g,exclude:!defined(g)&&a||isExcluded(n,r)}}function getRayIntersections(e,t,i,r,n,a,o,s){return drillPick(r,(function(){return getRayIntersection(e,t,i,n,a,o,s)}))}function pickFromRay(e,t,i,r,n,a,o){if(0<(o=getRayIntersections(e,t,i,1,r,n,a,o)).length)return o[0]}function drillPickFromRay(e,t,i,r,n,a,o,s){return getRayIntersections(e,t,i,r,n,a,o,s)}function deferPromiseUntilPostRender(e,t){var i=when.defer();return t.then((function(t){var r=e.postRender.addEventListener((function(){i.resolve(t),r()}));e.requestRender()})).otherwise((function(e){i.reject(e)})),i.promise}Picking.prototype.updateMostDetailedRayPicks=function(e){for(var t=this._mostDetailedRayPicks,i=0;i<t.length;++i)updateMostDetailedRayPick(this,e,t[i])&&t.splice(i--,1)},Picking.prototype.pickFromRay=function(e,t,i,r){return pickFromRay(this,e,t,i,r,!1,!1)},Picking.prototype.drillPickFromRay=function(e,t,i,r,n){return drillPickFromRay(this,e,t,i,r,n,!1,!1)},Picking.prototype.pickFromRayMostDetailed=function(e,t,i,r){var n=this;return t=Ray.clone(t),i=defined(i)?i.slice():i,deferPromiseUntilPostRender(e,launchMostDetailedRayPick(n,e,t,i,r,(function(){return pickFromRay(n,e,t,i,r,!1,!0)})))},Picking.prototype.drillPickFromRayMostDetailed=function(e,t,i,r,n){var a=this;return t=Ray.clone(t),r=defined(r)?r.slice():r,deferPromiseUntilPostRender(e,launchMostDetailedRayPick(a,e,t,r,n,(function(){return drillPickFromRay(a,e,t,i,r,n,!1,!0)})))};var scratchSurfacePosition=new Cartesian3,scratchSurfaceNormal=new Cartesian3,scratchSurfaceRay=new Ray,scratchCartographic$e=new Cartographic;function getRayForSampleHeight(e,t){var i=(defined(r=e.globe)?r:e.mapProjection).ellipsoid,r=ApproximateTerrainHeights._defaultMaxTerrainHeight;e=i.geodeticSurfaceNormalCartographic(t,scratchSurfaceNormal),t=Cartographic.toCartesian(t,i,scratchSurfacePosition);return(i=scratchSurfaceRay).origin=t,i.direction=e,t=new Ray,Ray.getPoint(i,r,t.origin),Cartesian3.negate(e,t.direction),t}function getRayForClampToHeight(e,t){var i=(defined(i=e.globe)?i:e.mapProjection).ellipsoid;return getRayForSampleHeight(e,Cartographic.fromCartesian(t,i,scratchCartographic$e))}function getHeightFromCartesian(e,t){var i=e.globe;e=(defined(i)?i:e.mapProjection).ellipsoid;return Cartographic.fromCartesian(t,e,scratchCartographic$e).height}function sampleHeightMostDetailed(e,t,i,r,n){var a=getRayForSampleHeight(t,i);return launchMostDetailedRayPick(e,t,a,r,n,(function(){var i=pickFromRay(e,t,a,r,n,!0,!0);if(defined(i))return getHeightFromCartesian(t,i.position)}))}function clampToHeightMostDetailed(e,t,i,r,n,a){var o=getRayForClampToHeight(t,i);return launchMostDetailedRayPick(e,t,o,r,n,(function(){var i=pickFromRay(e,t,o,r,n,!0,!0);if(defined(i))return Cartesian3.clone(i.position,a)}))}Picking.prototype.sampleHeight=function(e,t,i,r){if(defined(r=pickFromRay(this,e,getRayForSampleHeight(e,t),i,r,!0,!1)))return getHeightFromCartesian(e,r.position)},Picking.prototype.clampToHeight=function(e,t,i,r,n){if(defined(r=pickFromRay(this,e,getRayForClampToHeight(e,t),i,r,!0,!1)))return Cartesian3.clone(r.position,n)},Picking.prototype.sampleHeightMostDetailed=function(e,t,i,r){i=defined(i)?i.slice():i;for(var n=t.length,a=new Array(n),o=0;o<n;++o)a[o]=sampleHeightMostDetailed(this,e,t[o],i,r);return deferPromiseUntilPostRender(e,when.all(a).then((function(e){for(var i=e.length,r=0;r<i;++r)t[r].height=e[r];return t})))},Picking.prototype.clampToHeightMostDetailed=function(e,t,i,r){i=defined(i)?i.slice():i;for(var n=t.length,a=new Array(n),o=0;o<n;++o)a[o]=clampToHeightMostDetailed(this,e,t[o],i,r,t[o]);return deferPromiseUntilPostRender(e,when.all(a).then((function(e){for(var i=e.length,r=0;r<i;++r)t[r]=e[r];return t})))},Picking.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var PostProcessStageSampleMode={NEAREST:0,LINEAR:1};function PostProcessStage(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).fragmentShader,i=defaultValue(e.textureScale,1),r=defaultValue(e.pixelFormat,PixelFormat$1.RGBA);this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=i,this._forcePowerOfTwo=defaultValue(e.forcePowerOfTwo,!1),this._sampleMode=defaultValue(e.sampleMode,PostProcessStageSampleMode.NEAREST),this._pixelFormat=r,this._pixelDatatype=defaultValue(e.pixelDatatype,PixelDatatype$1.UNSIGNED_BYTE),this._clearColor=defaultValue(e.clearColor,Color.BLACK),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0,(r=new PassState).scissorTest={enabled:!0,rectangle:defined(e.scissorRectangle)?BoundingRectangle.clone(e.scissorRectangle):new BoundingRectangle},this._passState=r,this._ready=!1,defined(e=e.name)||(e=createGuid()),this._name=e,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(PostProcessStage.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(defined(this._textureCache)){var e=this._textureCache.getFramebuffer(this._name);if(defined(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var depthTextureRegex=/uniform\s+sampler2D\s+depthTexture/g;function getUniformValueGetterAndSetter(e,t,i){var r=t[i];return("string"==typeof r||r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof HTMLVideoElement||r instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(r){var n=t[i];t[i]=r;var a=e._actualUniforms,o=a[i];defined(o)&&o!==n&&o instanceof Texture&&!defined(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(o),delete a[i],delete a[i+"Dimensions"]),n instanceof Texture&&e._texturesToRelease.push(n),"string"==typeof r||r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof HTMLVideoElement||r instanceof ImageData?e._dirtyUniforms.push(i):a[i]=r}}}function getUniformMapFunction(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function getUniformMapDimensionsFunction(e,t){return function(){var i=e[t]();if(defined(i))return i.dimensions}}function createUniformMap$5(e){if(!defined(e._uniformMap)){var t,i,r={},n={},a=e._uniforms,o=e._actualUniforms;for(t in a)a.hasOwnProperty(t)&&("function"!=typeof a[t]?(r[t]=getUniformMapFunction(e,t),n[t]=getUniformValueGetterAndSetter(e,a,t)):(r[t]=a[t],n[t]=a[t]),o[t]=a[t],("string"==typeof(i=r[t]())||i instanceof Texture||i instanceof HTMLImageElement||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement)&&(r[t+"Dimensions"]=getUniformMapDimensionsFunction(r,t)));e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=combine(r,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width}})}}function createDrawCommand(e,t){var i;defined(e._command)&&!e._logDepthChanged&&!e._selectedDirty||(i=e._fragmentShader,defined(e._selectedIdTexture)&&(i="#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nvarying vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n    bool selected = false;\n    vec4 id = texture2D(czm_idTexture, v_textureCoordinates + offset); \n    for (int i = 0; i < "+e._selectedIdTexture.width+"; ++i) \n    { \n        vec4 selectedId = texture2D(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5)); \n        if (all(equal(id, selectedId))) \n        { \n            return true; \n        } \n    } \n    return false; \n} \n\nbool czm_selected() \n{ \n    return czm_selected(vec2(0.0)); \n} \n\n"+(i=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""))),i=new ShaderSource({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i]}),e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e}))}function createSampler(e){var t,i=e._sampleMode===PostProcessStageSampleMode.LINEAR?(t=TextureMinificationFilter$1.LINEAR,TextureMagnificationFilter$1.LINEAR):(t=TextureMinificationFilter$1.NEAREST,TextureMagnificationFilter$1.NEAREST),r=e._sampler;defined(r)&&r.minificationFilter===t&&r.magnificationFilter===i||(e._sampler=new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}function createLoadImageFunction(e,t){return function(i){e._texturesToCreate.push({name:t,source:i})}}function createStageOutputTextureFunction(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function updateUniformTextures(e,t){var i,r=e._texturesToRelease,n=r.length;for(d=0;d<n;++d)i=(i=r[d])&&i.destroy();r.length=0;var a=e._texturesToCreate;n=a.length;for(d=0;d<n;++d){var o=(s=a[d]).name,s=s.source;e._actualUniforms[o]=new Texture({context:t,source:s})}a.length=0;var l=e._dirtyUniforms;if(0!==l.length||defined(e._texturePromise)){if(0!==l.length&&!defined(e._texturePromise)){n=l.length;for(var c=e._uniforms,u=[],d=0;d<n;++d){var h,p=c[o=l[d]];defined(e._textureCache.getStageByName(p))?e._actualUniforms[o]=createStageOutputTextureFunction(e,p):"string"==typeof p?(h=new Resource({url:p}),u.push(h.fetchImage().then(createLoadImageFunction(e,o)))):e._texturesToCreate.push({name:o,source:p})}(l.length=0)<u.length?(e._ready=!1,e._texturePromise=when.all(u).then((function(){e._ready=!0,e._texturePromise=void 0}))):e._ready=!0}}else e._ready=!0}function releaseResources(e){defined(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();var t=e._textureCache;if(defined(t)){var i,r=e._uniforms,n=e._actualUniforms;for(i in n)n.hasOwnProperty(i)&&n[i]instanceof Texture&&(defined(t.getStageByName(r[i]))||n[i].destroy(),e._dirtyUniforms.push(i))}}function isSelectedTextureDirty(e){var t=defined(e._selected)?e._selected.length:0,i=defined(e._parentSelected)?e._parentSelected:0,r=(r=e._selected!==e._selectedShadow||t!==e._selectedLength)||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength;if(defined(e._selected)&&defined(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):defined(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!r&&defined(e._combinedSelected)){if(!defined(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var n=0;n<t;++n)if(e._combinedSelected[n]!==e._combinedSelectedShadow[n])return!0}return r}function createSelectedTexture(e,t){if(e._selectedDirty){e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;var i=e._combinedSelected;if(defined(i)){for(var r,n,a=0,o=i.length,s=0;s<o;++s)defined((r=i[s]).pickIds)?a+=r.pickIds.length:defined(r.pickId)&&++a;if(0===o||0===a){var l=new Uint8Array(4);return l[0]=255,l[1]=255,l[2]=255,l[3]=255,void(e._selectedIdTexture=new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{arrayBufferView:l,width:1,height:1},sampler:Sampler.NEAREST}))}var c=0,u=new Uint8Array(4*a);for(s=0;s<o;++s)if(defined((r=i[s]).pickIds))for(var d=r.pickIds,h=d.length,p=0;p<h;++p)n=d[p].color,u[c]=Color.floatToByte(n.red),u[c+1]=Color.floatToByte(n.green),u[c+2]=Color.floatToByte(n.blue),u[c+3]=Color.floatToByte(n.alpha),c+=4;else defined(r.pickId)&&(n=r.pickId.color,u[c]=Color.floatToByte(n.red),u[c+1]=Color.floatToByte(n.green),u[c+2]=Color.floatToByte(n.blue),u[c+3]=Color.floatToByte(n.alpha),c+=4);e._selectedIdTexture=new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{arrayBufferView:u,width:a,height:1},sampler:Sampler.NEAREST})}}}PostProcessStage.prototype._isSupported=function(e){return!depthTextureRegex.test(this._fragmentShader)||e.depthTexture},PostProcessStage.prototype.update=function(e,t){var i;this.enabled===this._enabled||this.enabled||releaseResources(this),this._enabled=this.enabled,this._enabled&&(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=isSelectedTextureDirty(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=defined(this._selected)?this._selected.length:0,this._parentSelectedLength=defined(this._parentSelected)?this._parentSelected.length:0,createSelectedTexture(this,e),createUniformMap$5(this),updateUniformTextures(this,e),createDrawCommand(this,e),createSampler(this),this._selectedDirty=!1,this._ready&&(t=this._textureCache.getFramebuffer(this._name),defined(this._command.framebuffer=t)&&((t=t.getColorTexture(0)).width===e.drawingBufferWidth&&t.height===e.drawingBufferHeight||defined(i=this._renderState)&&t.width===i.viewport.width&&t.height===i.viewport.height||(this._renderState=RenderState.fromCache({viewport:new BoundingRectangle(0,0,t.width,t.height)})),this._command.renderState=i)))},PostProcessStage.prototype.execute=function(e,t,i,r){defined(this._command)&&defined(this._command.framebuffer)&&this._ready&&this._enabled&&(this._colorTexture=t,this._depthTexture=i,this._idTexture=r,Sampler.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler),defined(r=0<this.scissorRectangle.width&&0<this.scissorRectangle.height?this._passState:void 0)&&(r.context=e),this._command.execute(e,r))},PostProcessStage.prototype.isDestroyed=function(){return!1},PostProcessStage.prototype.destroy=function(){return releaseResources(this),destroyObject(this)};var AcesTonemapping="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\ncolor /= texture2D(autoExposure, vec2(0.5)).r;\n#endif\ncolor = czm_acesTonemapping(color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",AmbientOcclusionGenerate="uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\nvarying vec2 v_textureCoordinates;\nvec4 clipToEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\nposEC = posEC / posEC.w;\nreturn posEC;\n}\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\nvec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\nvec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\nvec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\nvec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\nvec3 up = posInCamera.xyz - posInCameraUp.xyz;\nvec3 down = posInCameraDown.xyz - posInCamera.xyz;\nvec3 left = posInCamera.xyz - posInCameraLeft.xyz;\nvec3 right = posInCameraRight.xyz - posInCamera.xyz;\nvec3 DX = length(left) < length(right) ? left : right;\nvec3 DY = length(up) < length(down) ? up : down;\nreturn normalize(cross(DY, DX));\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = clipToEye(v_textureCoordinates, depth);\nif (posInCamera.z > frustumLength)\n{\ngl_FragColor = vec4(1.0);\nreturn;\n}\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nfloat depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\nfloat depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\nfloat depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\nfloat depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\nvec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\nfloat ao = 0.0;\nvec2 sampleDirection = vec2(1.0, 0.0);\nfloat gapAngle = 90.0 * czm_radiansPerDegree;\nfloat randomVal = texture2D(randomTexture, v_textureCoordinates).x;\nfor (int i = 0; i < 4; i++)\n{\nfloat newGapAngle = gapAngle * (float(i) + randomVal);\nfloat cosVal = cos(newGapAngle);\nfloat sinVal = sin(newGapAngle);\nvec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\nfloat localAO = 0.0;\nfloat localStepSize = stepSize;\nfor (int j = 0; j < 6; j++)\n{\nvec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\nif(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n{\nbreak;\n}\nfloat stepDepthInfo = czm_readDepth(depthTexture, newCoords);\nvec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\nvec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\nfloat len = length(diffVec);\nif (len > lengthCap)\n{\nbreak;\n}\nfloat dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\nfloat weight = len / lengthCap;\nweight = 1.0 - weight * weight;\nif (dotVal < bias)\n{\ndotVal = 0.0;\n}\nlocalAO = max(localAO, dotVal * weight);\nlocalStepSize += stepSize;\n}\nao += localAO;\n}\nao /= 4.0;\nao = 1.0 - clamp(ao, 0.0, 1.0);\nao = pow(ao, intensity);\ngl_FragColor = vec4(vec3(ao), 1.0);\n}\n",AmbientOcclusionModulate="uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 color = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 ao = texture2D(ambientOcclusionTexture, v_textureCoordinates).rgb;\ngl_FragColor.rgb = ambientOcclusionOnly ? ao : ao * color;\n}\n",BlackAndWhite="uniform sampler2D colorTexture;\nuniform float gradations;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = vec4(rgb, 1.0);\nreturn;\n}\n#endif\nfloat luminance = czm_luminance(rgb);\nfloat darkness = luminance * gradations;\ndarkness = (darkness - fract(darkness)) / gradations;\ngl_FragColor = vec4(vec3(darkness), 1.0);\n}\n",BloomComposite="uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = color;\nreturn;\n}\n#endif\nvec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\ngl_FragColor = glowOnly ? bloom : bloom + color;\n}\n",Brightness="uniform sampler2D colorTexture;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 target = vec3(0.0);\ngl_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",ContrastBias="uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 sceneColor = texture2D(colorTexture, v_textureCoordinates).xyz;\nsceneColor = czm_RGBToHSB(sceneColor);\nsceneColor.z += brightness;\nsceneColor = czm_HSBToRGB(sceneColor);\nfloat factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\nsceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\ngl_FragColor = vec4(sceneColor, 1.0);\n}\n",DepthOfField="uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\nvarying vec2 v_textureCoordinates;\nvec4 toEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\nposInCamera = posInCamera / posInCamera.w;\nreturn posInCamera;\n}\nfloat computeDepthBlur(float depth)\n{\nfloat f;\nif (depth < focalDistance)\n{\nf = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n}\nelse\n{\nf = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\nf = pow(f, 0.1);\n}\nf *= f;\nf = clamp(f, 0.0, 1.0);\nreturn pow(f, 0.5);\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = toEye(v_textureCoordinates, depth);\nfloat d = computeDepthBlur(-posInCamera.z);\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), texture2D(blurTexture, v_textureCoordinates), d);\n}\n",DepthView="uniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\ngl_FragColor = vec4(vec3(depth), 1.0);\n}\n",EdgeDetection="uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat directions[3];\ndirections[0] = -1.0;\ndirections[1] = 0.0;\ndirections[2] = 1.0;\nfloat scalars[3];\nscalars[0] = 3.0;\nscalars[1] = 10.0;\nscalars[2] = 3.0;\nfloat padx = czm_pixelRatio / czm_viewport.z;\nfloat pady = czm_pixelRatio / czm_viewport.w;\n#ifdef CZM_SELECTED_FEATURE\nbool selected = false;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nselected = selected || czm_selected(vec2(-padx, dir * pady));\nselected = selected || czm_selected(vec2(padx, dir * pady));\nselected = selected || czm_selected(vec2(dir * padx, -pady));\nselected = selected || czm_selected(vec2(dir * padx, pady));\nif (selected)\n{\nbreak;\n}\n}\nif (!selected)\n{\ngl_FragColor = vec4(color.rgb, 0.0);\nreturn;\n}\n#endif\nfloat horizEdge = 0.0;\nfloat vertEdge = 0.0;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nfloat scale = scalars[i];\nhorizEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\nhorizEdge += texture2D(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\nvertEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\nvertEdge += texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n}\nfloat len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\ngl_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",FilmicTonemapping="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\nconst float A = 0.22;\nconst float B = 0.30;\nconst float C = 0.10;\nconst float D = 0.20;\nconst float E = 0.01;\nconst float F = 0.30;\nconst float white = 11.2;\nvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\nfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\nc = czm_inverseGamma(c / w);\ngl_FragColor = vec4(c, fragmentColor.a);\n}\n",FXAA="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\nvec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\nvec4 color = FxaaPixelShader(\nv_textureCoordinates,\ncolorTexture,\nfxaaQualityRcpFrame,\nfxaaQualitySubpix,\nfxaaQualityEdgeThreshold,\nfxaaQualityEdgeThresholdMin);\nfloat alpha = texture2D(colorTexture, v_textureCoordinates).a;\ngl_FragColor = vec4(color.rgb, alpha);\n}\n",GaussianBlur1D="#define SAMPLES 8\nuniform float delta;\nuniform float sigma;\nuniform float direction;\nuniform sampler2D colorTexture;\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nvec2 dir = vec2(1.0 - direction, direction);\n#ifdef USE_STEP_SIZE\nvec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\nvec2 step = step;\n#endif\nvec3 g;\ng.x = 1.0 / (sqrt(czm_twoPi) * sigma);\ng.y = exp((-0.5 * delta * delta) / (sigma * sigma));\ng.z = g.y * g.y;\nvec4 result = texture2D(colorTexture, st) * g.x;\nfor (int i = 1; i < SAMPLES; ++i)\n{\ng.xy *= g.yz;\nvec2 offset = float(i) * dir * step;\nresult += texture2D(colorTexture, st - offset) * g.x;\nresult += texture2D(colorTexture, st + offset) * g.x;\n}\ngl_FragColor = result;\n}\n",LensFlare="uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\nvarying vec2 v_textureCoordinates;\n#define DISTANCE_TO_SPACE 6500000.0\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\nvec4 positionEC = czm_view * vec4(WC, 1.0);\npositionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nreturn czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\nvec2 NDC = texcoord * 2.0 - 1.0;\nvec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\nvec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\nNDC.xy -= earthPosSC.xy;\nfloat X = abs(NDC.x) * sceneSize.x;\nfloat Y = abs(NDC.y) * sceneSize.y;\nreturn clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\nvec2 sceneSize = czm_viewport.zw;\nvec3 color;\nif(isSpace)\n{\ncolor.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture2D(tex, texcoord + direction * distortion.b).b;\n}\nelse\n{\ncolor.r = texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = texture2D(tex, texcoord + direction * distortion.b).b;\n}\nreturn vec4(clamp(color, 0.0, 1.0), 0.0);\n}\nvoid main(void)\n{\nvec4 originalColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 rgb = originalColor.rgb;\nbool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\nvec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\nvec4 sunPositionEC = czm_view * sunPos;\nvec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\nsunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\nif(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n{\ngl_FragColor = originalColor;\nreturn;\n}\nvec2 texcoord = vec2(1.0) - v_textureCoordinates;\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nvec2 invPixelSize = 1.0 / pixelSize;\nvec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\nvec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\nvec3 direction = normalize(vec3(ghostVec, 0.0));\nvec4 result = vec4(0.0);\nvec4 ghost = vec4(0.0);\nfor (int i = 0; i < 4; ++i)\n{\nvec2 offset = fract(texcoord + ghostVec * float(i));\nghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n}\nresult += ghost;\nvec2 haloVec = normalize(ghostVec) * haloWidth;\nfloat weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\nweightForHalo = pow(1.0 - weightForHalo, 5.0);\nresult += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\nvec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\nif (dirtTexCoords.x > 1.0)\n{\ndirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) :  fract(dirtTexCoords.x);\n}\nif (dirtTexCoords.y > 1.0)\n{\ndirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) :  fract(dirtTexCoords.y);\n}\nresult += dirtAmount * texture2D(dirtTexture, dirtTexCoords);\nfloat camrot = czm_view[0].z + czm_view[1].y;\nfloat cosValue = cos(camrot);\nfloat sinValue = sin(camrot);\nmat3 rotation = mat3(\ncosValue, -sinValue, 0.0,\nsinValue, cosValue, 0.0,\n0.0, 0.0, 1.0\n);\nvec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\nvec3 st2 = vec3((rotation * st1).xy, 1.0);\nvec3 st3 = st2 * 0.5 + vec3(0.5);\nvec2 lensStarTexcoord = st3.xy;\nfloat weightForLensFlare = length(vec3(sunPos.xy, 0.0));\nfloat oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\nif (!isSpace)\n{\nresult *= oneMinusWeightForLensFlare * intensity * 0.2;\n}\nelse\n{\nresult *= oneMinusWeightForLensFlare * intensity;\nresult *= texture2D(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n}\nresult += texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = result;\n}\n",ModifiedReinhardTonemapping="uniform sampler2D colorTexture;\nuniform vec3 white;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = (color * (1.0 + color / white)) / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",NightVision="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nfloat rand(vec2 co)\n{\nreturn fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\nvoid main(void)\n{\nfloat noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 green = vec3(0.0, 1.0, 0.0);\ngl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n",ReinhardTonemapping="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = color / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",Silhouette="uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n",FXAA3_11="#if (FXAA_QUALITY_PRESET == 10)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 3.0\n#define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 3.0\n#define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 4.0\n#define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 4.0\n#define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 4.0\n#define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 2.0\n#define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 3.0\n#define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n#define FXAA_QUALITY_PS 9\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 4.0\n#define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n#define FXAA_QUALITY_PS 10\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 4.0\n#define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n#define FXAA_QUALITY_PS 11\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 4.0\n#define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.0\n#define FXAA_QUALITY_P2 1.0\n#define FXAA_QUALITY_P3 1.0\n#define FXAA_QUALITY_P4 1.0\n#define FXAA_QUALITY_P5 1.5\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\nFxaaFloat4 FxaaPixelShader(\nFxaaFloat2 pos,\nFxaaTex tex,\nFxaaFloat2 fxaaQualityRcpFrame,\nFxaaFloat fxaaQualitySubpix,\nFxaaFloat fxaaQualityEdgeThreshold,\nFxaaFloat fxaaQualityEdgeThresholdMin\n) {\nFxaaFloat2 posM;\nposM.x = pos.x;\nposM.y = pos.y;\nFxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n#define lumaM rgbyM.y\nFxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat maxSM = max(lumaS, lumaM);\nFxaaFloat minSM = min(lumaS, lumaM);\nFxaaFloat maxESM = max(lumaE, maxSM);\nFxaaFloat minESM = min(lumaE, minSM);\nFxaaFloat maxWN = max(lumaN, lumaW);\nFxaaFloat minWN = min(lumaN, lumaW);\nFxaaFloat rangeMax = max(maxWN, maxESM);\nFxaaFloat rangeMin = min(minWN, minESM);\nFxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\nFxaaFloat range = rangeMax - rangeMin;\nFxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\nFxaaBool earlyExit = range < rangeMaxClamped;\nif(earlyExit)\nreturn rgbyM;\nFxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNS = lumaN + lumaS;\nFxaaFloat lumaWE = lumaW + lumaE;\nFxaaFloat subpixRcpRange = 1.0/range;\nFxaaFloat subpixNSWE = lumaNS + lumaWE;\nFxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\nFxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\nFxaaFloat lumaNESE = lumaNE + lumaSE;\nFxaaFloat lumaNWNE = lumaNW + lumaNE;\nFxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\nFxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\nFxaaFloat lumaNWSW = lumaNW + lumaSW;\nFxaaFloat lumaSWSE = lumaSW + lumaSE;\nFxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\nFxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\nFxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\nFxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\nFxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\nFxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\nFxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\nFxaaFloat lengthSign = fxaaQualityRcpFrame.x;\nFxaaBool horzSpan = edgeHorz >= edgeVert;\nFxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\nif(!horzSpan) lumaN = lumaW;\nif(!horzSpan) lumaS = lumaE;\nif(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\nFxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\nFxaaFloat gradientN = lumaN - lumaM;\nFxaaFloat gradientS = lumaS - lumaM;\nFxaaFloat lumaNN = lumaN + lumaM;\nFxaaFloat lumaSS = lumaS + lumaM;\nFxaaBool pairN = abs(gradientN) >= abs(gradientS);\nFxaaFloat gradient = max(abs(gradientN), abs(gradientS));\nif(pairN) lengthSign = -lengthSign;\nFxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\nFxaaFloat2 posB;\nposB.x = posM.x;\nposB.y = posM.y;\nFxaaFloat2 offNP;\noffNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\noffNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\nif(!horzSpan) posB.x += lengthSign * 0.5;\nif( horzSpan) posB.y += lengthSign * 0.5;\nFxaaFloat2 posN;\nposN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\nposN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\nFxaaFloat2 posP;\nposP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\nposP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\nFxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\nFxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\nFxaaFloat subpixE = subpixC * subpixC;\nFxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\nif(!pairN) lumaNN = lumaSS;\nFxaaFloat gradientScaled = gradient * 1.0/4.0;\nFxaaFloat lumaMM = lumaM - lumaNN * 0.5;\nFxaaFloat subpixF = subpixD * subpixE;\nFxaaBool lumaMLTZero = lumaMM < 0.0;\nlumaEndN -= lumaNN * 0.5;\nlumaEndP -= lumaNN * 0.5;\nFxaaBool doneN = abs(lumaEndN) >= gradientScaled;\nFxaaBool doneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\nFxaaBool doneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n#if (FXAA_QUALITY_PS > 3)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n#if (FXAA_QUALITY_PS > 4)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n#if (FXAA_QUALITY_PS > 5)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n#if (FXAA_QUALITY_PS > 6)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n#if (FXAA_QUALITY_PS > 7)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n#if (FXAA_QUALITY_PS > 8)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n#if (FXAA_QUALITY_PS > 9)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n#if (FXAA_QUALITY_PS > 10)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n#if (FXAA_QUALITY_PS > 11)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n#if (FXAA_QUALITY_PS > 12)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\nFxaaFloat dstN = posM.x - posN.x;\nFxaaFloat dstP = posP.x - posM.x;\nif(!horzSpan) dstN = posM.y - posN.y;\nif(!horzSpan) dstP = posP.y - posM.y;\nFxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\nFxaaFloat spanLength = (dstP + dstN);\nFxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\nFxaaFloat spanLengthRcp = 1.0/spanLength;\nFxaaBool directionN = dstN < dstP;\nFxaaFloat dst = min(dstN, dstP);\nFxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\nFxaaFloat subpixG = subpixF * subpixF;\nFxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\nFxaaFloat subpixH = subpixG * fxaaQualitySubpix;\nFxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\nFxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\nif(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\nif( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\nreturn FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n";function PostProcessStageComposite(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._stages=e.stages,this._inputPreviousStageTexture=defaultValue(e.inputPreviousStageTexture,!0);var t=e.name;defined(t)||(t=createGuid()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}function isSelectedTextureDirty$1(e){var t=defined(e._selected)?e._selected.length:0,i=defined(e._parentSelected)?e._parentSelected:0,r=(r=e._selected!==e._selectedShadow||t!==e._selectedLength)||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength;if(defined(e._selected)&&defined(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):defined(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!r&&defined(e._combinedSelected)){if(!defined(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var n=0;n<t;++n)if(e._combinedSelected[n]!==e._combinedSelectedShadow[n])return!0}return r}Object.defineProperties(PostProcessStageComposite.prototype,{ready:{get:function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)if(!e[i].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){for(var t=this._stages,i=t.length,r=0;r<i;++r)t[r].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}}),PostProcessStageComposite.prototype._isSupported=function(e){for(var t=this._stages,i=t.length,r=0;r<i;++r)if(!t[r]._isSupported(e))return!1;return!0},PostProcessStageComposite.prototype.get=function(e){return this._stages[e]},PostProcessStageComposite.prototype.update=function(e,t){this._selectedDirty=isSelectedTextureDirty$1(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=defined(this._selected)?this._selected.length:0,this._parentSelectedLength=defined(this._parentSelected)?this._parentSelected.length:0;for(var i=this._stages,r=i.length,n=0;n<r;++n){var a=i[n];this._selectedDirty&&(a.parentSelected=this._combinedSelected),a.update(e,t)}},PostProcessStageComposite.prototype.isDestroyed=function(){return!1},PostProcessStageComposite.prototype.destroy=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)e[i].destroy();return destroyObject(this)};var PostProcessStageLibrary={};function createBlur(e){var t=new PostProcessStage({name:e+"_x_direction",fragmentShader:r="#define USE_STEP_SIZE\n"+GaussianBlur1D,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:PostProcessStageSampleMode.LINEAR}),i=new PostProcessStage({name:e+"_y_direction",fragmentShader:r,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:PostProcessStageSampleMode.LINEAR}),r={};return Object.defineProperties(r,{delta:{get:function(){return t.uniforms.delta},set:function(e){var r=t.uniforms,n=i.uniforms;r.delta=n.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){var r=t.uniforms,n=i.uniforms;r.sigma=n.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){var r=t.uniforms,n=i.uniforms;r.stepSize=n.stepSize=e}}}),new PostProcessStageComposite({name:e,stages:[t,i],uniforms:r})}function getSilhouetteEdgeDetection(e){if(!defined(e))return PostProcessStageLibrary.createEdgeDetectionStage();for(var t=new PostProcessStageComposite({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),i={},r="",n="",a=0;a<e.length;++a)r+="uniform sampler2D edgeTexture"+a+"; \n",n+="        vec4 edge"+a+" = texture2D(edgeTexture"+a+", v_textureCoordinates); \n        if (edge"+a+".a > 0.0) \n        { \n            color = edge"+a+"; \n            break; \n        } \n",i["edgeTexture"+a]=e[a].name;return new PostProcessStageComposite({name:"czm_edge_detection_composite",stages:[t,new PostProcessStage({name:"czm_edge_detection_combine",fragmentShader:r+"varying vec2 v_textureCoordinates; \nvoid main() { \n    vec4 color = vec4(0.0); \n    for (int i = 0; i < "+e.length+"; i++) \n    { \n"+n+"    } \n    gl_FragColor = color; \n} \n",uniforms:i})]})}PostProcessStageLibrary.createBlurStage=function(){return createBlur("czm_blur")},PostProcessStageLibrary.createDepthOfFieldStage=function(){var e=createBlur("czm_depth_of_field_blur"),t=new PostProcessStage({name:"czm_depth_of_field_composite",fragmentShader:DepthOfField,uniforms:{focalDistance:5,blurTexture:e.name}}),i={};return Object.defineProperties(i,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(e){t.uniforms.focalDistance=e}},delta:{get:function(){return e.uniforms.delta},set:function(t){e.uniforms.delta=t}},sigma:{get:function(){return e.uniforms.sigma},set:function(t){e.uniforms.sigma=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}}}),new PostProcessStageComposite({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:i})},PostProcessStageLibrary.isDepthOfFieldSupported=function(e){return e.context.depthTexture},PostProcessStageLibrary.createEdgeDetectionStage=function(){return new PostProcessStage({name:"czm_edge_detection_"+createGuid(),fragmentShader:EdgeDetection,uniforms:{length:.25,color:Color.clone(Color.BLACK)}})},PostProcessStageLibrary.isEdgeDetectionSupported=function(e){return e.context.depthTexture},PostProcessStageLibrary.createSilhouetteStage=function(e){return new PostProcessStageComposite({name:"czm_silhouette",stages:[e=getSilhouetteEdgeDetection(e),new PostProcessStage({name:"czm_silhouette_color_edges",fragmentShader:Silhouette,uniforms:{silhouetteTexture:e.name}})],inputPreviousStageTexture:!1,uniforms:e.uniforms})},PostProcessStageLibrary.isSilhouetteSupported=function(e){return e.context.depthTexture},PostProcessStageLibrary.createBloomStage=function(){var e=new PostProcessStage({name:"czm_bloom_contrast_bias",fragmentShader:ContrastBias,uniforms:{contrast:128,brightness:-.3}}),t=createBlur("czm_bloom_blur"),i=new PostProcessStageComposite({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),r=new PostProcessStage({name:"czm_bloom_generate_composite",fragmentShader:BloomComposite,uniforms:{glowOnly:!1,bloomTexture:i.name}}),n={};return Object.defineProperties(n,{glowOnly:{get:function(){return r.uniforms.glowOnly},set:function(e){r.uniforms.glowOnly=e}},contrast:{get:function(){return e.uniforms.contrast},set:function(t){e.uniforms.contrast=t}},brightness:{get:function(){return e.uniforms.brightness},set:function(t){e.uniforms.brightness=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}}}),new PostProcessStageComposite({name:"czm_bloom",stages:[i,r],inputPreviousStageTexture:!1,uniforms:n})},PostProcessStageLibrary.createAmbientOcclusionStage=function(){var e=new PostProcessStage({name:"czm_ambient_occlusion_generate",fragmentShader:AmbientOcclusionGenerate,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=createBlur("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;var i=new PostProcessStageComposite({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),r=new PostProcessStage({name:"czm_ambient_occlusion_composite",fragmentShader:AmbientOcclusionModulate,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:i.name}}),n={};return Object.defineProperties(n,{intensity:{get:function(){return e.uniforms.intensity},set:function(t){e.uniforms.intensity=t}},bias:{get:function(){return e.uniforms.bias},set:function(t){e.uniforms.bias=t}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(t){e.uniforms.lengthCap=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(t){e.uniforms.frustumLength=t}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(t){e.uniforms.randomTexture=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},ambientOcclusionOnly:{get:function(){return r.uniforms.ambientOcclusionOnly},set:function(e){r.uniforms.ambientOcclusionOnly=e}}}),new PostProcessStageComposite({name:"czm_ambient_occlusion",stages:[i,r],inputPreviousStageTexture:!1,uniforms:n})},PostProcessStageLibrary.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var fxaaFS="#define FXAA_QUALITY_PRESET 39 \n"+FXAA3_11+"\n"+FXAA;function PostProcessStageTextureCache(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function getLastStageName(e){for(;defined(e.length);)e=e.get(e.length-1);return e.name}function getStageDependencies(e,t,i,r,n){if(!r.enabled||!r._isSupported(t))return n;var a=i[r.name]={};defined(n)&&(a[getLastStageName(e.getStageByName(n))]=!0);var o=r.uniforms;if(defined(o))for(var s=Object.getOwnPropertyNames(o),l=s.length,c=0;c<l;++c){var u=o[s[c]];"string"!=typeof u||defined(u=e.getStageByName(u))&&(a[getLastStageName(u)]=!0)}return r.name}function getCompositeDependencies(e,t,i,r,n){if(defined(r.enabled)&&!r.enabled||defined(r._isSupported)&&!r._isSupported(t))return n;for(var a,o,s=n,l=!defined(r.inputPreviousStageTexture)||r.inputPreviousStageTexture,c=n,u=r.length,d=0;d<u;++d){var h=r.get(d);c=(defined(h.length)?getCompositeDependencies:getStageDependencies)(e,t,i,h,n);l&&(n=c)}if(l)for(a=1;a<u;++a)defined(i[o=getLastStageName(r.get(a))])||(i[o]={}),i[o][s]=!0;else for(a=1;a<u;++a)for(var p=i[o=getLastStageName(r.get(a))],f=0;f<a;++f)p[getLastStageName(r.get(f))]=!0;return c}function getDependencies(e,t){var i,r,n,a,o={};return defined(e.ambientOcclusion)?(a=e.ambientOcclusion,i=e.bloom,r=e._tonemapping,n=e.fxaa,a=getCompositeDependencies(e,t,o,a,void 0),a=getStageDependencies(e,t,o,r,a=getCompositeDependencies(e,t,o,i,a)),getStageDependencies(e,t,o,n,a=getCompositeDependencies(e,t,o,e,a))):getCompositeDependencies(e,t,o,e,void 0),o}function getFramebuffer(e,t,i){for(var r,n=e._collection.getStageByName(t),a=n._textureScale,o=n._forcePowerOfTwo,s=n._pixelFormat,l=n._pixelDatatype,c=n._clearColor,u=e._framebuffers,d=u.length,h=0;h<d;++h)if(a===(r=u[h]).textureScale&&o===r.forcePowerOfTwo&&s===r.pixelFormat&&l===r.pixelDatatype&&Color.equals(c,r.clearColor)){for(var p=r.stages,f=p.length,m=!1,g=0;g<f;++g)if(i[p[g]]){m=!0;break}if(!m)break}return defined(r)&&h<d?r.stages.push(t):(r={textureScale:a,forcePowerOfTwo:o,pixelFormat:s,pixelDatatype:l,clearColor:c,stages:[t],buffer:void 0,clear:void 0},u.push(r)),r}function createFramebuffers$3(e,t){var i,r=getDependencies(e._collection,t);for(i in r)r.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=getFramebuffer(e,i,r[i]))}function releaseResources$1(e){for(var t=e._framebuffers,i=t.length,r=0;r<i;++r){var n=t[r];n.buffer=n.buffer&&n.buffer.destroy(),n.buffer=void 0}}function updateFramebuffers$3(e,t){for(var i=e._width,r=e._height,n=e._framebuffers,a=n.length,o=0;o<a;++o){var s=n[o],l=s.textureScale,c=Math.ceil(i*l),u=Math.ceil(r*l);l=Math.min(c,u);s.forcePowerOfTwo&&(CesiumMath.isPowerOfTwo(l)||(l=CesiumMath.nextPowerOfTwo(l)),u=c=l),s.buffer=new Framebuffer({context:t,colorTextures:[new Texture({context:t,width:c,height:u,pixelFormat:s.pixelFormat,pixelDatatype:s.pixelDatatype})]}),s.clear=new ClearCommand({color:s.clearColor,framebuffer:s.buffer})}}PostProcessStageLibrary.createFXAAStage=function(){return new PostProcessStage({name:"czm_FXAA",fragmentShader:fxaaFS,sampleMode:PostProcessStageSampleMode.LINEAR})},PostProcessStageLibrary.createAcesTonemappingStage=function(e){return e=e?"#define AUTO_EXPOSURE\n":"",new PostProcessStage({name:"czm_aces",fragmentShader:e+=AcesTonemapping,uniforms:{autoExposure:void 0}})},PostProcessStageLibrary.createFilmicTonemappingStage=function(e){return e=e?"#define AUTO_EXPOSURE\n":"",new PostProcessStage({name:"czm_filmic",fragmentShader:e+=FilmicTonemapping,uniforms:{autoExposure:void 0}})},PostProcessStageLibrary.createReinhardTonemappingStage=function(e){return e=e?"#define AUTO_EXPOSURE\n":"",new PostProcessStage({name:"czm_reinhard",fragmentShader:e+=ReinhardTonemapping,uniforms:{autoExposure:void 0}})},PostProcessStageLibrary.createModifiedReinhardTonemappingStage=function(e){return e=e?"#define AUTO_EXPOSURE\n":"",new PostProcessStage({name:"czm_modified_reinhard",fragmentShader:e+=ModifiedReinhardTonemapping,uniforms:{white:Color.WHITE,autoExposure:void 0}})},PostProcessStageLibrary.createAutoExposureStage=function(){return new AutoExposure},PostProcessStageLibrary.createBlackAndWhiteStage=function(){return new PostProcessStage({name:"czm_black_and_white",fragmentShader:BlackAndWhite,uniforms:{gradations:5}})},PostProcessStageLibrary.createBrightnessStage=function(){return new PostProcessStage({name:"czm_brightness",fragmentShader:Brightness,uniforms:{brightness:.5}})},PostProcessStageLibrary.createNightVisionStage=function(){return new PostProcessStage({name:"czm_night_vision",fragmentShader:NightVision})},PostProcessStageLibrary.createDepthViewStage=function(){return new PostProcessStage({name:"czm_depth_view",fragmentShader:DepthView})},PostProcessStageLibrary.createLensFlareStage=function(){return new PostProcessStage({name:"czm_lens_flare",fragmentShader:LensFlare,uniforms:{dirtTexture:buildModuleUrl("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:buildModuleUrl("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:Ellipsoid.WGS84.maximumRadius}})},PostProcessStageTextureCache.prototype.updateDependencies=function(){this._updateDependencies=!0},PostProcessStageTextureCache.prototype.update=function(e){var t=this._collection,i=this._updateDependencies,r=defined(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),n=defined(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),a=defined(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),o=defined(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e);n=!defined(t._activeStages)||0<t._activeStages.length||r||n||a||o;(i||!n&&0<this._framebuffers.length)&&(releaseResources$1(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),(i||n)&&(0===this._framebuffers.length&&createFramebuffers$3(this,e),a=e.drawingBufferWidth,o=e.drawingBufferHeight,n=this._width!==a||this._height!==o,(i||n)&&(this._width=a,this._height=o,this._updateDependencies=!1,releaseResources$1(this),updateFramebuffers$3(this,e)))},PostProcessStageTextureCache.prototype.clear=function(e){for(var t=this._framebuffers,i=0;i<t.length;++i)t[i].clear.execute(e)},PostProcessStageTextureCache.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},PostProcessStageTextureCache.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},PostProcessStageTextureCache.prototype.getFramebuffer=function(e){if(defined(e=this._stageNameToFramebuffer[e]))return e.buffer},PostProcessStageTextureCache.prototype.isDestroyed=function(){return!1},PostProcessStageTextureCache.prototype.destroy=function(){return releaseResources$1(this),destroyObject(this)};var Tonemapper={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===Tonemapper.REINHARD||e===Tonemapper.MODIFIED_REINHARD||e===Tonemapper.FILMIC||e===Tonemapper.ACES}},Tonemapper$1=Object.freeze(Tonemapper),stackScratch=[];function PostProcessStageCollection(){var e=PostProcessStageLibrary.createFXAAStage(),t=PostProcessStageLibrary.createAmbientOcclusionStage(),i=PostProcessStageLibrary.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=PostProcessStageLibrary.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=Tonemapper$1.ACES;var r=this._tonemapping;e.enabled=!1,t.enabled=!1,i.enabled=!1,r.enabled=!1;var n=new PostProcessStageTextureCache(this),a={},o=stackScratch;for(o.push(e,t,i,r);0<o.length;){var s=o.pop();(a[s.name]=s)._textureCache=n;var l=s.length;if(defined(l))for(var c=0;c<l;++c)o.push(s.get(c))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var u=this;t.uniforms.randomTexture=function(){return u._randomTexture},this._ao=t,this._bloom=i,this._fxaa=e,this._lastLength=void 0,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=a,this._textureCache=n}function removeStages(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,r=i.length,n=0,a=0;n<r;++n){var o=i[n];o&&(o._index=a++,t.push(o))}e._stages=t}}function getOutputTexture(e){for(;defined(e.length);)e=e.get(e.length-1);return e.outputTexture}function execute(e,t,i,r,n){if(defined(e.execute))e.execute(t,i,r,n);else{var a,o=e.length;if(e.inputPreviousStageTexture)for(execute(e.get(0),t,i,r,n),a=1;a<o;++a)execute(e.get(a),t,getOutputTexture(e.get(a-1)),r,n);else for(a=0;a<o;++a)execute(e.get(a),t,i,r,n)}}function QuadtreeTileProvider(){DeveloperError.throwInstantiationError()}function SceneTransitioner(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}Object.defineProperties(PostProcessStageCollection.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length-1;0<=i;--i){var r=t[i];e=e||r.ready&&r.enabled}var n=this._fxaa,a=this._ao,o=this._bloom,s=this._tonemapping;return(e=(e=(e=e||n.ready&&n.enabled)||a.ready&&a.enabled)||o.ready&&o.enabled)||s.ready&&s.enabled}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return removeStages(this),this._stages.length}},outputTexture:{get:function(){var e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);for(var t=this._stages,i=t.length-1;0<=i;--i){var r=t[i];if(defined(r)&&r.ready&&r.enabled)return this.getOutputTexture(r.name)}return(e=this._tonemapping).enabled&&e.ready||(e=this._bloom).enabled&&e.ready||(e=this._ao).enabled&&e.ready?this.getOutputTexture(e.name):void 0}},hasSelected:{get:function(){for(var e=arraySlice(this._stages);0<e.length;){var t=e.pop();if(defined(t)){if(defined(t.selected))return!0;var i=t.length;if(defined(i))for(var r=0;r<i;++r)e.push(t.get(r))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){defined(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i,r=this._autoExposureEnabled;switch(e){case Tonemapper$1.REINHARD:t=PostProcessStageLibrary.createReinhardTonemappingStage(r);break;case Tonemapper$1.MODIFIED_REINHARD:t=PostProcessStageLibrary.createModifiedReinhardTonemappingStage(r);break;case Tonemapper$1.FILMIC:t=PostProcessStageLibrary.createFilmicTonemappingStage(r);break;default:t=PostProcessStageLibrary.createAcesTonemappingStage(r)}r&&(i=this._autoExposure,t.uniforms.autoExposure=function(){return i.outputTexture}),this._tonemapper=e,this._tonemapping=t,defined(this._stageNames)&&((this._stageNames[t.name]=t)._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),PostProcessStageCollection.prototype.add=function(e){var t=this._stageNames,i=stackScratch;for(i.push(e);0<i.length;){var r=i.pop();(t[r.name]=r)._textureCache=this._textureCache;var n=r.length;if(defined(n))for(var a=0;a<n;++a)i.push(r.get(a))}var o=this._stages;return e._index=o.length,o.push(e),this._textureCacheDirty=!0,e},PostProcessStageCollection.prototype.remove=function(e){if(!this.contains(e))return!1;var t=this._stageNames,i=stackScratch;for(i.push(e);0<i.length;){var r=i.pop();delete t[r.name];var n=r.length;if(defined(n))for(var a=0;a<n;++a)i.push(r.get(a))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0},PostProcessStageCollection.prototype.contains=function(e){return defined(e)&&defined(e._index)&&e._textureCache===this._textureCache},PostProcessStageCollection.prototype.get=function(e){return removeStages(this),this._stages[e]},PostProcessStageCollection.prototype.removeAll=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)this.remove(e[i]);e.length=0},PostProcessStageCollection.prototype.getStageByName=function(e){return this._stageNames[e]},PostProcessStageCollection.prototype.update=function(e,t,i){removeStages(this);var r=this._activeStages,n=this._activeStages=this._previousActiveStages;this._previousActiveStages=r;var a,o=this._stages,s=n.length=o.length,l=0;for(v=0;v<s;++v)(a=o[v]).ready&&a.enabled&&a._isSupported(e)&&(n[l++]=a);var c=(n.length=l)!==r.length;if(!c)for(v=0;v<l;++v)if(n[v]!==r[v]){c=!0;break}var u=this._ao,d=this._bloom,h=this._autoExposure,p=this._tonemapping,f=this._fxaa;p.enabled=i;var m=u.enabled&&u._isSupported(e),g=d.enabled&&d._isSupported(e),y=p.enabled&&p._isSupported(e);i=f.enabled&&f._isSupported(e);if((c||this._textureCacheDirty||l!==this._lastLength||m!==this._aoEnabled||g!==this._bloomEnabled||y!==this._tonemappingEnabled||i!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._lastLength=l,this._aoEnabled=m,this._bloomEnabled=g,this._tonemappingEnabled=y,this._fxaaEnabled=i,this._textureCacheDirty=!1),defined(this._randomTexture)&&!m&&(this._randomTexture.destroy(),this._randomTexture=void 0),!defined(this._randomTexture)&&m){s=196608;for(var _=new Uint8Array(s),v=0;v<s;v+=3)_[v]=Math.floor(255*Math.random());this._randomTexture=new Texture({context:e,pixelFormat:PixelFormat$1.RGB,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{arrayBufferView:_,width:256,height:256},sampler:new Sampler({wrapS:TextureWrap$1.REPEAT,wrapT:TextureWrap$1.REPEAT,minificationFilter:TextureMinificationFilter$1.NEAREST,magnificationFilter:TextureMagnificationFilter$1.NEAREST})})}for(this._textureCache.update(e),f.update(e,t),u.update(e,t),d.update(e,t),p.update(e,t),this._autoExposureEnabled&&h.update(e,t),s=o.length,v=0;v<s;++v)o[v].update(e,t)},PostProcessStageCollection.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},PostProcessStageCollection.prototype.getOutputTexture=function(e){if(defined(e=this.getStageByName(e)))return getOutputTexture(e)},PostProcessStageCollection.prototype.execute=function(e,t,i,r){var n=this._activeStages,a=n.length,o=this._fxaa,s=this._ao,l=this._bloom,c=this._autoExposure,u=this._tonemapping,d=s.enabled&&s._isSupported(e),h=l.enabled&&l._isSupported(e),p=this._autoExposureEnabled,f=u.enabled&&u._isSupported(e),m=o.enabled&&o._isSupported(e);if(m||d||h||f||0!==a){if(t=t,d&&s.ready&&(execute(s,e,t,i,r),t=getOutputTexture(s)),h&&l.ready&&(execute(l,e,t,i,r),t=getOutputTexture(l)),p&&c.ready&&execute(c,e,t,i,r),f&&u.ready&&(execute(u,e,t,i,r),t=getOutputTexture(u)),u=t,0<a){execute(n[0],e,t,i,r);for(var g=1;g<a;++g)execute(n[g],e,getOutputTexture(n[g-1]),i,r);u=getOutputTexture(n[a-1])}m&&o.ready&&execute(o,e,u,i,r)}},PostProcessStageCollection.prototype.copy=function(e,t){var i;defined(this._copyColorCommand)||((i=this)._copyColorCommand=e.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return i.outputTexture}},owner:this})),this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},PostProcessStageCollection.prototype.isDestroyed=function(){return!1},PostProcessStageCollection.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),destroyObject(this)},QuadtreeTileProvider.computeDefaultLevelZeroMaximumGeometricError=function(e){return 2*e.ellipsoid.maximumRadius*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))},Object.defineProperties(QuadtreeTileProvider.prototype,{quadtree:{get:DeveloperError.throwInstantiationError,set:DeveloperError.throwInstantiationError},ready:{get:DeveloperError.throwInstantiationError},tilingScheme:{get:DeveloperError.throwInstantiationError},errorEvent:{get:DeveloperError.throwInstantiationError}}),QuadtreeTileProvider.prototype.update=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.beginUpdate=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.endUpdate=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.getLevelMaximumGeometricError=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.loadTile=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.computeTileVisibility=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.showTileThisFrame=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.computeDistanceToTile=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.isDestroyed=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.destroy=DeveloperError.throwInstantiationError,SceneTransitioner.prototype.completeMorph=function(){defined(this._completeMorph)&&this._completeMorph()},SceneTransitioner.prototype.morphTo2D=function(e,t){defined(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._morphToOrthographic=i.camera.frustum instanceof OrthographicFrustum,this._previousMode!==SceneMode$1.SCENE2D&&this._previousMode!==SceneMode$1.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,SceneMode$1.SCENE2D,!0),i._mode=SceneMode$1.MORPHING,i.camera._setTransform(Matrix4.IDENTITY),this._previousMode===SceneMode$1.COLUMBUS_VIEW?morphFromColumbusViewTo2D(this,e):morphFrom3DTo2D(this,e,t),0===e&&defined(this._completeMorph)&&this._completeMorph())};var scratchToCVPosition=new Cartesian3,scratchToCVDirection=new Cartesian3,scratchToCVUp=new Cartesian3,scratchToCVPosition2D=new Cartesian3,scratchToCVDirection2D=new Cartesian3,scratchToCVUp2D=new Cartesian3,scratchToCVSurfacePosition=new Cartesian3,scratchToCVCartographic=new Cartographic,scratchToCVToENU=new Matrix4,scratchToCVFrustumPerspective=new PerspectiveFrustum,scratchToCVFrustumOrthographic=new OrthographicFrustum,scratchToCVCamera={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};SceneTransitioner.prototype.morphToColumbusView=function(e,t){defined(this._completeMorph)&&this._completeMorph();var i,r,n,a,o,s,l=this._scene;this._previousMode=l.mode,this._previousMode!==SceneMode$1.COLUMBUS_VIEW&&this._previousMode!==SceneMode$1.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,SceneMode$1.COLUMBUS_VIEW,!0),l.camera._setTransform(Matrix4.IDENTITY),i=scratchToCVPosition,r=scratchToCVDirection,n=scratchToCVUp,0<e?(i.x=0,i.y=-1,i.z=1,i=Cartesian3.multiplyByScalar(Cartesian3.normalize(i,i),5*t.maximumRadius,i),Cartesian3.negate(Cartesian3.normalize(i,r),r),Cartesian3.cross(Cartesian3.UNIT_X,r,n)):(a=l.camera,this._previousMode===SceneMode$1.SCENE2D?(Cartesian3.clone(a.position,i),i.z=a.frustum.right-a.frustum.left,Cartesian3.negate(Cartesian3.UNIT_Z,r),Cartesian3.clone(Cartesian3.UNIT_Y,n)):(Cartesian3.clone(a.positionWC,i),Cartesian3.clone(a.directionWC,r),Cartesian3.clone(a.upWC,n),o=t.scaleToGeodeticSurface(i,scratchToCVSurfacePosition),o=Transforms.eastNorthUpToFixedFrame(o,t,scratchToCVToENU),Matrix4.inverseTransformation(o,o),l.mapProjection.project(t.cartesianToCartographic(i,scratchToCVCartographic),i),Matrix4.multiplyByPointAsVector(o,r,r),Matrix4.multiplyByPointAsVector(o,n,n))),this._morphToOrthographic?((s=scratchToCVFrustumOrthographic).width=l.camera.frustum.right-l.camera.frustum.left,s.aspectRatio=l.drawingBufferWidth/l.drawingBufferHeight):((s=scratchToCVFrustumPerspective).aspectRatio=l.drawingBufferWidth/l.drawingBufferHeight,s.fov=CesiumMath.toRadians(60)),(o=scratchToCVCamera).position=i,o.direction=r,o.up=n,o.frustum=s,createMorphHandler(this,s=completeColumbusViewCallback(o)),this._previousMode===SceneMode$1.SCENE2D?morphFrom2DToColumbusView(this,e,o,s):(o.position2D=Matrix4.multiplyByPoint(Camera.TRANSFORM_2D,i,scratchToCVPosition2D),o.direction2D=Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,r,scratchToCVDirection2D),o.up2D=Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,n,scratchToCVUp2D),l._mode=SceneMode$1.MORPHING,morphFrom3DToColumbusView(this,e,o,s)),0===e&&defined(this._completeMorph)&&this._completeMorph())};var scratchCVTo3DCamera={position:new Cartesian3,direction:new Cartesian3,up:new Cartesian3,frustum:void 0},scratch2DTo3DFrustumPersp=new PerspectiveFrustum;function createMorphHandler(e,t){var i;e._scene.completeMorphOnUserInput&&(e._morphHandler=new ScreenSpaceEventHandler(e._scene.canvas),i=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)},e._completeMorph=i,e._morphHandler.setInputAction(i,ScreenSpaceEventType$1.LEFT_DOWN),e._morphHandler.setInputAction(i,ScreenSpaceEventType$1.MIDDLE_DOWN),e._morphHandler.setInputAction(i,ScreenSpaceEventType$1.RIGHT_DOWN),e._morphHandler.setInputAction(i,ScreenSpaceEventType$1.WHEEL))}function destroyMorphHandler(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}SceneTransitioner.prototype.morphTo3D=function(e,t){defined(this._completeMorph)&&this._completeMorph();var i,r,n=this._scene;this._previousMode=n.mode,this._previousMode!==SceneMode$1.SCENE3D&&this._previousMode!==SceneMode$1.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,SceneMode$1.SCENE3D,!0),n._mode=SceneMode$1.MORPHING,n.camera._setTransform(Matrix4.IDENTITY),this._previousMode===SceneMode$1.SCENE2D?morphFrom2DTo3D(this,e,t):(0<e?(i=scratchCVTo3DCamera,Cartesian3.fromDegrees(0,0,5*t.maximumRadius,t,i.position),Cartesian3.negate(i.position,i.direction),Cartesian3.normalize(i.direction,i.direction),Cartesian3.clone(Cartesian3.UNIT_Z,i.up)):i=getColumbusViewTo3DCamera(this,t),(t=n.camera).frustum instanceof OrthographicFrustum?r=t.frustum.clone():((r=scratch2DTo3DFrustumPersp).aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,r.fov=CesiumMath.toRadians(60)),i.frustum=r,createMorphHandler(this,r=complete3DCallback(i)),morphFromColumbusViewTo3D(this,e,i,r)),0===e&&defined(this._completeMorph)&&this._completeMorph())},SceneTransitioner.prototype.isDestroyed=function(){return!1},SceneTransitioner.prototype.destroy=function(){return destroyMorphHandler(this),destroyObject(this)};var scratchCVTo3DCartographic=new Cartographic,scratchCVTo3DSurfacePoint=new Cartesian3,scratchCVTo3DFromENU=new Matrix4;function getColumbusViewTo3DCamera(e,t){var i=(o=e._scene).camera,r=scratchCVTo3DCamera,n=r.position,a=r.direction,o=(e=r.up,o.mapProjection.unproject(i.position,scratchCVTo3DCartographic));return t.cartographicToCartesian(o,n),n=t.scaleToGeodeticSurface(n,scratchCVTo3DSurfacePoint),t=Transforms.eastNorthUpToFixedFrame(n,t,scratchCVTo3DFromENU),Matrix4.multiplyByPointAsVector(t,i.direction,a),Matrix4.multiplyByPointAsVector(t,i.up,e),r}var scratchCVTo3DStartPos=new Cartesian3,scratchCVTo3DStartDir=new Cartesian3,scratchCVTo3DStartUp=new Cartesian3,scratchCVTo3DEndPos=new Cartesian3,scratchCVTo3DEndDir=new Cartesian3,scratchCVTo3DEndUp=new Cartesian3;function morphFromColumbusViewTo3D(e,t,i,r){t*=.5;var n=e._scene,a=n.camera,o=Cartesian3.clone(a.position,scratchCVTo3DStartPos),s=Cartesian3.clone(a.direction,scratchCVTo3DStartDir),l=Cartesian3.clone(a.up,scratchCVTo3DStartUp),c=Matrix4.multiplyByPoint(Camera.TRANSFORM_2D_INVERSE,i.position,scratchCVTo3DEndPos),u=Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D_INVERSE,i.direction,scratchCVTo3DEndDir),d=Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D_INVERSE,i.up,scratchCVTo3DEndUp);i=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){columbusViewMorph(o,c,e.time,a.position),columbusViewMorph(s,u,e.time,a.direction),columbusViewMorph(l,d,e.time,a.up),Cartesian3.cross(a.direction,a.up,a.right),Cartesian3.normalize(a.right,a.right)},complete:function(){addMorphTimeAnimations(e,n,0,1,t,r)}}),e._currentTweens.push(i)}var scratch2DTo3DFrustumOrtho=new OrthographicFrustum,scratch3DToCVStartPos=new Cartesian3,scratch3DToCVStartDir=new Cartesian3,scratch3DToCVStartUp=new Cartesian3,scratch3DToCVEndPos=new Cartesian3,scratch3DToCVEndDir=new Cartesian3,scratch3DToCVEndUp=new Cartesian3;function morphFrom2DTo3D(e,t,i){t/=3;var r,n,a=e._scene,o=a.camera;0<t?(r=scratchCVTo3DCamera,Cartesian3.fromDegrees(0,0,5*i.maximumRadius,i,r.position),Cartesian3.negate(r.position,r.direction),Cartesian3.normalize(r.direction,r.direction),Cartesian3.clone(Cartesian3.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=getColumbusViewTo3DCamera(e,i)),e._morphToOrthographic?((n=scratch2DTo3DFrustumOrtho).aspectRatio=a.drawingBufferWidth/a.drawingBufferHeight,n.width=o.frustum.right-o.frustum.left):((n=scratch2DTo3DFrustumPersp).aspectRatio=a.drawingBufferWidth/a.drawingBufferHeight,n.fov=CesiumMath.toRadians(60)),r.frustum=n;var s,l=complete3DCallback(r);createMorphHandler(e,l),s=e._morphToOrthographic?function(){morphFromColumbusViewTo3D(e,t,r,l)}:function(){morphOrthographicToPerspective(e,t,r,(function(){morphFromColumbusViewTo3D(e,t,r,l)}))},0<t?(a._mode=SceneMode$1.SCENE2D,o.flyTo({duration:t,destination:Cartesian3.fromDegrees(0,0,5*i.maximumRadius,i,scratch3DToCVEndPos),complete:function(){a._mode=SceneMode$1.MORPHING,s()}})):s()}function columbusViewMorph(e,t,i,r){return Cartesian3.lerp(e,t,i,r)}function morphPerspectiveToOrthographic(e,t,i,r,n){var a,o,s,l=e._scene,c=l.camera;c.frustum instanceof OrthographicFrustum||(a=c.frustum.fov,o=.5*CesiumMath.RADIANS_PER_DEGREE,s=i.position.z*Math.tan(.5*a),c.frustum.far=s/Math.tan(.5*o)+1e7,t=l.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){c.frustum.fov=CesiumMath.lerp(a,o,e.time),e=s/Math.tan(.5*c.frustum.fov),r(c,e)},complete:function(){c.frustum=i.frustum.clone(),n(e)}}),e._currentTweens.push(t))}var scratchCVTo2DStartPos=new Cartesian3,scratchCVTo2DStartDir=new Cartesian3,scratchCVTo2DStartUp=new Cartesian3,scratchCVTo2DEndPos=new Cartesian3,scratchCVTo2DEndDir=new Cartesian3,scratchCVTo2DEndUp=new Cartesian3,scratchCVTo2DFrustum=new OrthographicOffCenterFrustum,scratchCVTo2DRay=new Ray,scratchCVTo2DPickPos=new Cartesian3,scratchCVTo2DCamera={position:void 0,direction:void 0,up:void 0,frustum:void 0};function morphFromColumbusViewTo2D(e,t){t*=.5;var i,r,n=e._scene,a=n.camera,o=Cartesian3.clone(a.position,scratchCVTo2DStartPos),s=Cartesian3.clone(a.direction,scratchCVTo2DStartDir),l=Cartesian3.clone(a.up,scratchCVTo2DStartUp),c=Cartesian3.negate(Cartesian3.UNIT_Z,scratchCVTo2DEndDir),u=Cartesian3.clone(Cartesian3.UNIT_Y,scratchCVTo2DEndUp),d=scratchCVTo2DEndPos;0<t?(Cartesian3.clone(Cartesian3.ZERO,scratchCVTo2DEndPos),d.z=5*n.mapProjection.ellipsoid.maximumRadius):(Cartesian3.clone(o,scratchCVTo2DEndPos),i=scratchCVTo2DRay,Matrix4.multiplyByPoint(Camera.TRANSFORM_2D,o,i.origin),Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,s,i.direction),!defined(r=n.globe)||defined(h=r.pickWorldCoordinates(i,n,!0,scratchCVTo2DPickPos))&&(Matrix4.multiplyByPoint(Camera.TRANSFORM_2D_INVERSE,h,d),d.z+=Cartesian3.distance(o,d)));var h=scratchCVTo2DFrustum;h.right=.5*d.z,h.left=-h.right,h.top=h.right*(n.drawingBufferHeight/n.drawingBufferWidth),h.bottom=-h.top;var p=scratchCVTo2DCamera;p.position=d,p.direction=c,p.up=u,p.frustum=h;var f=complete2DCallback(p);function m(e,t){e.position.z=t}createMorphHandler(e,f),n=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){columbusViewMorph(o,d,e.time,a.position),columbusViewMorph(s,c,e.time,a.direction),columbusViewMorph(l,u,e.time,a.up),Cartesian3.cross(a.direction,a.up,a.right),Cartesian3.normalize(a.right,a.right),a._adjustOrthographicFrustum(!0)},complete:function(){morphPerspectiveToOrthographic(e,t,p,m,f)}}),e._currentTweens.push(n)}var scratch3DTo2DCartographic=new Cartographic,scratch3DTo2DCamera={position:new Cartesian3,direction:new Cartesian3,up:new Cartesian3,position2D:new Cartesian3,direction2D:new Cartesian3,up2D:new Cartesian3,frustum:new OrthographicOffCenterFrustum},scratch3DTo2DEndCamera={position:new Cartesian3,direction:new Cartesian3,up:new Cartesian3,frustum:void 0},scratch3DTo2DPickPosition=new Cartesian3,scratch3DTo2DRay=new Ray,scratch3DTo2DToENU=new Matrix4,scratch3DTo2DSurfacePoint=new Cartesian3;function morphFrom3DTo2D(e,t,i){t*=.5;var r,n,a=e._scene,o=a.camera,s=scratch3DTo2DCamera;function l(e,t){e.position.x=t}0<t?(Cartesian3.clone(Cartesian3.ZERO,s.position),s.position.z=5*i.maximumRadius,Cartesian3.negate(Cartesian3.UNIT_Z,s.direction),Cartesian3.clone(Cartesian3.UNIT_Y,s.up)):(i.cartesianToCartographic(o.positionWC,scratch3DTo2DCartographic),a.mapProjection.project(scratch3DTo2DCartographic,s.position),Cartesian3.negate(Cartesian3.UNIT_Z,s.direction),Cartesian3.clone(Cartesian3.UNIT_Y,s.up),n=scratch3DTo2DRay,Cartesian3.clone(s.position2D,n.origin),r=Cartesian3.clone(o.directionWC,n.direction),o=i.scaleToGeodeticSurface(o.positionWC,scratch3DTo2DSurfacePoint),i=Transforms.eastNorthUpToFixedFrame(o,i,scratch3DTo2DToENU),Matrix4.inverseTransformation(i,i),Matrix4.multiplyByPointAsVector(i,r,r),Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,r,r),!defined(r=a.globe)||defined(c=r.pickWorldCoordinates(n,a,!0,scratch3DTo2DPickPosition))&&(n=Cartesian3.distance(s.position2D,c),c.x+=n,Cartesian3.clone(c,s.position2D))),Matrix4.multiplyByPoint(Camera.TRANSFORM_2D,s.position,s.position2D),Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,s.direction,s.direction2D),Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,s.up,s.up2D);var c=s.frustum;c.right=.5*s.position.z,c.left=-c.right,c.top=c.right*(a.drawingBufferHeight/a.drawingBufferWidth),c.bottom=-c.top,a=scratch3DTo2DEndCamera,Matrix4.multiplyByPoint(Camera.TRANSFORM_2D_INVERSE,s.position2D,a.position),Cartesian3.clone(s.direction,a.direction),Cartesian3.clone(s.up,a.up),a.frustum=c;var u=complete2DCallback(a);createMorphHandler(e,u),morphFrom3DToColumbusView(e,t,s,(function(){morphPerspectiveToOrthographic(e,t,s,l,u)}))}function morphOrthographicToPerspective(e,t,i,r){var n=e._scene,a=n.camera,o=a.frustum.right-a.frustum.left;a.frustum=i.frustum.clone();var s=a.frustum.fov,l=.5*CesiumMath.RADIANS_PER_DEGREE,c=o*Math.tan(.5*s);a.frustum.far=c/Math.tan(.5*l)+1e7,a.frustum.fov=l,t=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){a.frustum.fov=CesiumMath.lerp(l,s,e.time),a.position.z=c/Math.tan(.5*a.frustum.fov)},complete:function(){r(e)}}),e._currentTweens.push(t)}function morphFrom2DToColumbusView(e,t,i,r){t*=.5;var n=e._scene,a=n.camera,o=Cartesian3.clone(i.position,scratch3DToCVEndPos),s=Cartesian3.clone(i.direction,scratch3DToCVEndDir),l=Cartesian3.clone(i.up,scratch3DToCVEndUp);function c(){a.frustum=i.frustum.clone();var c=Cartesian3.clone(a.position,scratch3DToCVStartPos),u=Cartesian3.clone(a.direction,scratch3DToCVStartDir),d=Cartesian3.clone(a.up,scratch3DToCVStartUp);c.z=o.z;var h=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){columbusViewMorph(c,o,e.time,a.position),columbusViewMorph(u,s,e.time,a.direction),columbusViewMorph(d,l,e.time,a.up),Cartesian3.cross(a.direction,a.up,a.right),Cartesian3.normalize(a.right,a.right)},complete:function(){r(e)}});e._currentTweens.push(h)}n._mode=SceneMode$1.MORPHING,e._morphToOrthographic?c():morphOrthographicToPerspective(e,0,i,c)}function morphFrom3DToColumbusView(e,t,i,r){var n=e._scene,a=n.camera,o=Cartesian3.clone(a.position,scratch3DToCVStartPos),s=Cartesian3.clone(a.direction,scratch3DToCVStartDir),l=Cartesian3.clone(a.up,scratch3DToCVStartUp),c=Cartesian3.clone(i.position2D,scratch3DToCVEndPos),u=Cartesian3.clone(i.direction2D,scratch3DToCVEndDir),d=Cartesian3.clone(i.up2D,scratch3DToCVEndUp);i=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){columbusViewMorph(o,c,e.time,a.position),columbusViewMorph(s,u,e.time,a.direction),columbusViewMorph(l,d,e.time,a.up),Cartesian3.cross(a.direction,a.up,a.right),Cartesian3.normalize(a.right,a.right),a._adjustOrthographicFrustum(!0)},complete:function(){addMorphTimeAnimations(e,n,1,0,t,r)}}),e._currentTweens.push(i)}function addMorphTimeAnimations(e,t,i,r,n,a){n={object:t,property:"morphTime",startValue:i,stopValue:r,duration:n,easingFunction:EasingFunction$1.QUARTIC_OUT},defined(a)&&(n.complete=function(){a(e)}),n=t.tweens.addProperty(n),e._currentTweens.push(n)}function complete3DCallback(e){return function(t){var i=t._scene;i._mode=SceneMode$1.SCENE3D,i.morphTime=SceneMode$1.getMorphTime(SceneMode$1.SCENE3D),destroyMorphHandler(t);var r=i.camera;t._previousMode===SceneMode$1.MORPHING&&!t._morphCancelled||(t._morphCancelled=!1,Cartesian3.clone(e.position,r.position),Cartesian3.clone(e.direction,r.direction),Cartesian3.clone(e.up,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.normalize(r.right,r.right),r.frustum=e.frustum.clone()),r=r.frustum,i.frameState.useLogDepth&&(r.near=.1,r.far=1e10),r=defined(t._completeMorph),t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,SceneMode$1.SCENE3D,r)}}function complete2DCallback(e){return function(t){var i=t._scene;i._mode=SceneMode$1.SCENE2D,i.morphTime=SceneMode$1.getMorphTime(SceneMode$1.SCENE2D),destroyMorphHandler(t);var r=i.camera;Cartesian3.clone(e.position,r.position),r.position.z=2*i.mapProjection.ellipsoid.maximumRadius,Cartesian3.clone(e.direction,r.direction),Cartesian3.clone(e.up,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.normalize(r.right,r.right),r.frustum=e.frustum.clone(),r=defined(t._completeMorph),t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,SceneMode$1.SCENE2D,r)}}function completeColumbusViewCallback(e){return function(t){var i=t._scene;i._mode=SceneMode$1.COLUMBUS_VIEW,i.morphTime=SceneMode$1.getMorphTime(SceneMode$1.COLUMBUS_VIEW),destroyMorphHandler(t);var r=i.camera;t._previousModeMode===SceneMode$1.MORPHING&&!t._morphCancelled||(t._morphCancelled=!1,Cartesian3.clone(e.position,r.position),Cartesian3.clone(e.direction,r.direction),Cartesian3.clone(e.up,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.normalize(r.right,r.right)),r=r.frustum,i.frameState.useLogDepth&&(r.near=.1,r.far=1e10),r=defined(t._completeMorph),t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,SceneMode$1.COLUMBUS_VIEW,r)}}function Tween(e,t,i,r,n,a,o,s,l,c){this._tweens=e,this._tweenjs=t,this._startObject=clone(i),this._stopObject=clone(r),this._duration=n,this._delay=a,this._easingFunction=o,this._update=s,this._complete=l,this.cancel=c,this.needsStart=!0}function TweenCollection(){this._tweens=[]}function ScreenSpaceCameraController(e){this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=CameraEventType$1.LEFT_DRAG,this.zoomEventTypes=[CameraEventType$1.RIGHT_DRAG,CameraEventType$1.WHEEL,CameraEventType$1.PINCH],this.rotateEventTypes=CameraEventType$1.LEFT_DRAG,this.tiltEventTypes=[CameraEventType$1.MIDDLE_DRAG,CameraEventType$1.PINCH,{eventType:CameraEventType$1.LEFT_DRAG,modifier:KeyboardEventModifier$1.CTRL},{eventType:CameraEventType$1.RIGHT_DRAG,modifier:KeyboardEventModifier$1.CTRL}],this.lookEventTypes={eventType:CameraEventType$1.LEFT_DRAG,modifier:KeyboardEventModifier$1.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e3,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new CameraEventAggregator(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new TweenCollection,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new Cartesian2(-1,-1),this._tiltCenter=new Cartesian3,this._rotateMousePosition=new Cartesian2(-1,-1),this._rotateStartPosition=new Cartesian3,this._strafeStartPosition=new Cartesian3,this._strafeMousePosition=new Cartesian2,this._strafeEndMousePosition=new Cartesian2,this._zoomMouseStart=new Cartesian2(-1,-1),this._zoomWorldPosition=new Cartesian3,this._useZoomWorldPosition=!1,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1,e=e.mapProjection,this._maxCoord=e.project(new Cartographic(Math.PI,CesiumMath.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=2e-4,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function decay(e,t){return e<0?0:(t=25*(1-t),Math.exp(-t*e))}function sameMousePosition(e){return Cartesian2.equalsEpsilon(e.startPosition,e.endPosition,CesiumMath.EPSILON14)}Object.defineProperties(Tween.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}}),Tween.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(TweenCollection.prototype,{length:{get:function(){return this._tweens.length}}}),TweenCollection.prototype.add=function(e){if(0===(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).duration)return defined(e.complete)&&e.complete(),new Tween(this);var t=e.duration/TimeConstants$1.SECONDS_PER_MILLISECOND,i=defaultValue(e.delay,0),r=i/TimeConstants$1.SECONDS_PER_MILLISECOND,n=defaultValue(e.easingFunction,EasingFunction$1.LINEAR_NONE),a=e.startObject,o=new TWEEN.Tween(a);return o.to(clone(e.stopObject),t),o.delay(r),o.easing(n),defined(e.update)&&o.onUpdate((function(){e.update(a)})),o.onComplete(defaultValue(e.complete,null)),o.repeat(defaultValue(e._repeat,0)),n=new Tween(this,o,e.startObject,e.stopObject,e.duration,i,n,e.update,e.complete,e.cancel),this._tweens.push(n),n},TweenCollection.prototype.addProperty=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).object,i=e.property,r=e.startValue,n=e.stopValue;return this.add({startObject:{value:r},stopObject:{value:n},duration:defaultValue(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){t[i]=e.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},TweenCollection.prototype.addAlpha=function(e){var t,i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).material,r=[];for(t in i.uniforms)i.uniforms.hasOwnProperty(t)&&defined(i.uniforms[t])&&defined(i.uniforms[t].alpha)&&r.push(t);return this.add({startObject:{alpha:defaultValue(e.startValue,0)},stopObject:{alpha:defaultValue(e.stopValue,1)},duration:defaultValue(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){for(var t=r.length,n=0;n<t;++n)i.uniforms[r[n]].alpha=e.alpha},complete:e.complete,cancel:e.cancel})},TweenCollection.prototype.addOffsetIncrement=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).material.uniforms;return this.addProperty({object:t,property:"offset",startValue:t.offset,stopValue:t.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})},TweenCollection.prototype.remove=function(e){if(!defined(e))return!1;var t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),defined(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},TweenCollection.prototype.removeAll=function(){for(var e=this._tweens,t=0;t<e.length;++t){var i=e[t];i.tweenjs.stop(),defined(i.cancel)&&i.cancel()}e.length=0},TweenCollection.prototype.contains=function(e){return defined(e)&&-1!==this._tweens.indexOf(e)},TweenCollection.prototype.get=function(e){return this._tweens[e]},TweenCollection.prototype.update=function(e){var t=this._tweens,i=0;for(e=defined(e)?e/TimeConstants$1.SECONDS_PER_MILLISECOND:getTimestamp$1();i<t.length;){var r=t[i],n=r.tweenjs;r.needsStart?(r.needsStart=!1,n.start(e)):n.update(e)?i++:(n.stop(),t.splice(i,1))}};var inertiaMaxClickTimeThreshold=.4;function maintainInertia(e,t,i,r,n,a,o){var s=a[o];defined(s)||(s=a[o]={startPosition:new Cartesian2,endPosition:new Cartesian2,motion:new Cartesian2,inertiaEnabled:!0});var l=e.getButtonPressTime(t,i),c=e.getButtonReleaseTime(t,i),u=l&&c&&(c.getTime()-l.getTime())/1e3;o=new Date,o=c&&(o.getTime()-c.getTime())/1e3;if(l&&c&&u<inertiaMaxClickTimeThreshold){if(o=decay(o,r),!defined(r=e.getLastMovement(t,i))||sameMousePosition(r)||!s.inertiaEnabled)return;if(s.motion.x=.5*(r.endPosition.x-r.startPosition.x),s.motion.y=.5*(r.endPosition.y-r.startPosition.y),s.startPosition=Cartesian2.clone(r.startPosition,s.startPosition),s.endPosition=Cartesian2.multiplyByScalar(s.motion,o,s.endPosition),s.endPosition=Cartesian2.add(s.startPosition,s.endPosition,s.endPosition),isNaN(s.endPosition.x)||isNaN(s.endPosition.y)||Cartesian2.distance(s.startPosition,s.endPosition)<.5)return;e.isButtonDown(t,i)||n(a,e.getStartMousePosition(t,i),s)}}function activateInertia(e,t){if(defined(t)){var i=e[t];defined(i)&&(i.inertiaEnabled=!0);var r=e._inertiaDisablers[t];if(defined(r))for(var n=r.length,a=0;a<n;++a)defined(i=e[r[a]])&&(i.inertiaEnabled=!1)}}var scratchEventTypeArray=[];function reactToInput(e,t,i,r,n,a){if(defined(i)){var o=e._aggregator;Array.isArray(i)||(scratchEventTypeArray[0]=i,i=scratchEventTypeArray);for(var s=i.length,l=0;l<s;++l){var c=defined((h=i[l]).eventType)?h.eventType:h,u=h.modifier,d=o.isMoving(c,u)&&o.getMovement(c,u),h=o.getStartMousePosition(c,u);e.enableInputs&&t&&(d?(r(e,h,d),activateInertia(e,a)):n<1&&maintainInertia(o,c,u,n,r,e,a))}}}var scratchZoomPickRay=new Ray,scratchPickCartesian=new Cartesian3,scratchZoomOffset=new Cartesian2,scratchZoomDirection=new Cartesian3,scratchCenterPixel=new Cartesian2,scratchCenterPosition=new Cartesian3,scratchPositionNormal$2=new Cartesian3,scratchPickNormal=new Cartesian3,scratchZoomAxis=new Cartesian3,scratchCameraPositionNormal=new Cartesian3,scratchTargetNormal=new Cartesian3,scratchCameraPosition$1=new Cartesian3,scratchCameraUpNormal=new Cartesian3,scratchCameraRightNormal=new Cartesian3,scratchForwardNormal=new Cartesian3,scratchPositionToTarget=new Cartesian3,scratchPositionToTargetNormal=new Cartesian3,scratchPan=new Cartesian3,scratchCenterMovement=new Cartesian3,scratchCenter$6=new Cartesian3,scratchCartesian$9=new Cartesian3,scratchCartesianTwo=new Cartesian3,scratchCartesianThree=new Cartesian3,scratchZoomViewOptions={orientation:new HeadingPitchRoll};function handleZoom(e,t,i,r,n,a){var o=1;defined(a)&&(o=CesiumMath.clamp(Math.abs(a),.25,1));var s=e.minimumZoomDistance*o,l=e.maximumZoomDistance,c=r*(n-s);c=CesiumMath.clamp(c,e._minimumZoomRate,e._maximumZoomRate),a=(i.endPosition.y-i.startPosition.y)/e._scene.canvas.clientHeight,o=c*(a=Math.min(a,e.maximumMovementRatio));if(e.enableCollisionDetection||0===e.minimumZoomDistance||!defined(e._globe)){if(0<o&&Math.abs(n-s)<1)return;if(o<0&&Math.abs(n-l)<1)return;n-o<s?o=n-s-1:l<n-o&&(o=n-l)}if(i=(r=e._scene).camera,c=r.mode,(a=scratchZoomViewOptions.orientation).heading=i.heading,a.pitch=i.pitch,a.roll=i.roll,i.frustum instanceof OrthographicFrustum)0<Math.abs(o)&&(i.zoomIn(o),i._adjustOrthographicFrustum());else if(s=Cartesian2.equals(t,e._zoomMouseStart),n=e._zoomingOnVector,l=e._rotatingZoom,s||(e._zoomMouseStart=Cartesian2.clone(t,e._zoomMouseStart),defined(e._globe)&&(y=c===SceneMode$1.SCENE2D?(y=i.getPickRay(t,scratchZoomPickRay).origin,Cartesian3.fromElements(y.y,y.z,y.x)):pickGlobe(e,t,scratchPickCartesian)),defined(y)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=Cartesian3.clone(y,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,n=e._zoomingOnVector=!1,l=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),e._useZoomWorldPosition){if(a=c===SceneMode$1.COLUMBUS_VIEW,i.positionCartographic.height<2e6&&(l=!0),!s||l){if(c===SceneMode$1.SCENE2D){var u=e._zoomWorldPosition,d=i.position;!Cartesian3.equals(u,d)&&i.positionCartographic.height<2*e._maxCoord.x&&(m=i.position.x,h=Cartesian3.subtract(u,d,scratchZoomDirection),Cartesian3.normalize(h,h),f=Cartesian3.distance(u,d)*o/(.5*i.getMagnitude()),i.move(h,.5*f),(i.position.x<0&&0<m||0<i.position.x&&m<0)&&(y=i.getPickRay(t,scratchZoomPickRay).origin,y=Cartesian3.fromElements(y.y,y.z,y.x),e._zoomWorldPosition=Cartesian3.clone(y,e._zoomWorldPosition)))}else if(c===SceneMode$1.SCENE3D)if(l=Cartesian3.normalize(i.position,scratchCameraPositionNormal),e._cameraUnderground||e._zoomingUnderground||i.positionCartographic.height<3e3&&Math.abs(Cartesian3.dot(i.direction,l))<.6)a=!0;else{u=r.canvas,(d=scratchCenterPixel).x=u.clientWidth/2,d.y=u.clientHeight/2;var h=pickGlobe(e,d,scratchCenterPosition);if(defined(h))if(i.positionCartographic.height<1e6){if(!(-.5<=Cartesian3.dot(i.direction,l))){var p=scratchCameraPosition$1;Cartesian3.clone(i.position,p);var f=e._zoomWorldPosition,m=scratchTargetNormal;m=Cartesian3.normalize(f,m);if(Cartesian3.dot(m,l)<0)return;var g=scratchCenter$6,y=scratchForwardNormal;return Cartesian3.clone(i.direction,y),Cartesian3.add(p,Cartesian3.multiplyByScalar(y,1e3,scratchCartesian$9),g),u=scratchPositionToTarget,d=scratchPositionToTargetNormal,Cartesian3.subtract(f,p,u),Cartesian3.normalize(u,d),0<=(m=Cartesian3.dot(l,d))?void(e._zoomMouseStart.x=-1):(l=Math.acos(-m),m=Cartesian3.magnitude(p),f=Cartesian3.magnitude(f),m-=o,u=Cartesian3.magnitude(u),u=Math.asin(CesiumMath.clamp(u/f*Math.sin(l),-1,1))-Math.asin(CesiumMath.clamp(m/f*Math.sin(l),-1,1))+l,f=scratchCameraUpNormal,Cartesian3.normalize(p,f),l=scratchCameraRightNormal,l=Cartesian3.cross(d,f,l),l=Cartesian3.normalize(l,l),Cartesian3.normalize(Cartesian3.cross(f,l,scratchCartesian$9),y),Cartesian3.multiplyByScalar(Cartesian3.normalize(g,scratchCartesian$9),Cartesian3.magnitude(g)-o,g),Cartesian3.normalize(p,p),Cartesian3.multiplyByScalar(p,m,p),d=scratchPan,Cartesian3.multiplyByScalar(Cartesian3.add(Cartesian3.multiplyByScalar(f,Math.cos(u)-1,scratchCartesianTwo),Cartesian3.multiplyByScalar(y,Math.sin(u),scratchCartesianThree),scratchCartesian$9),m,d),Cartesian3.add(p,d,p),Cartesian3.normalize(g,f),Cartesian3.normalize(Cartesian3.cross(f,l,scratchCartesian$9),y),l=scratchCenterMovement,Cartesian3.multiplyByScalar(Cartesian3.add(Cartesian3.multiplyByScalar(f,Math.cos(u)-1,scratchCartesianTwo),Cartesian3.multiplyByScalar(y,Math.sin(u),scratchCartesianThree),scratchCartesian$9),Cartesian3.magnitude(g),l),Cartesian3.add(g,l,g),Cartesian3.clone(p,i.position),Cartesian3.normalize(Cartesian3.subtract(g,p,scratchCartesian$9),i.direction),Cartesian3.clone(i.direction,i.direction),Cartesian3.cross(i.direction,i.up,i.right),Cartesian3.cross(i.right,i.direction,i.up),void i.setView(scratchZoomViewOptions))}a=!0}else g=Cartesian3.normalize(h,scratchPositionNormal$2),p=Cartesian3.normalize(e._zoomWorldPosition,scratchPickNormal),0<(h=Cartesian3.dot(p,g))&&h<1&&(h=CesiumMath.acosClamped(h),p=Cartesian3.cross(p,g,scratchZoomAxis),g=o/(Math.abs(h)>CesiumMath.toRadians(20)?.75*i.positionCartographic.height:i.positionCartographic.height-o),i.rotate(p,h*g));else a=!0}e._rotatingZoom=!a}!s&&a||n?(r=SceneTransforms.wgs84ToWindowCoordinates(r,e._zoomWorldPosition,scratchZoomOffset),t=(c!==SceneMode$1.COLUMBUS_VIEW&&Cartesian2.equals(t,e._zoomMouseStart)&&defined(r)?i.getPickRay(r,scratchZoomPickRay):i.getPickRay(t,scratchZoomPickRay)).direction,c!==SceneMode$1.COLUMBUS_VIEW&&c!==SceneMode$1.SCENE2D||Cartesian3.fromElements(t.y,t.z,t.x,t),i.move(t,o),e._zoomingOnVector=!0):i.zoomIn(o),e._cameraUnderground||i.setView(scratchZoomViewOptions)}else i.zoomIn(o)}var translate2DStart=new Ray,translate2DEnd=new Ray,scratchTranslateP0=new Cartesian3;function translate2D(e,t,i){var r=e._scene.camera;e=r.getPickRay(i.startPosition,translate2DStart).origin,i=r.getPickRay(i.endPosition,translate2DEnd).origin,e=Cartesian3.fromElements(e.y,e.z,e.x,e),i=Cartesian3.fromElements(i.y,i.z,i.x,i),e=Cartesian3.subtract(e,i,scratchTranslateP0);0<(i=Cartesian3.magnitude(e))&&(Cartesian3.normalize(e,e),r.move(e,i))}function zoom2D$1(e,t,i){defined(i.distance)&&(i=i.distance);var r=e._scene.camera;handleZoom(e,t,i,e._zoomFactor,r.getMagnitude())}var twist2DStart=new Cartesian2,twist2DEnd=new Cartesian2;function twist2D(e,t,i){var r,n,a;defined(i.angleAndHeight)?singleAxisTwist2D(e,t,i.angleAndHeight):(r=(a=e._scene).camera,t=(n=a.canvas).clientWidth,e=n.clientHeight,(a=twist2DStart).x=2/t*i.startPosition.x-1,a.y=2/e*(e-i.startPosition.y)-1,a=Cartesian2.normalize(a,a),(n=twist2DEnd).x=2/t*i.endPosition.x-1,n.y=2/e*(e-i.endPosition.y)-1,n=Cartesian2.normalize(n,n),i=CesiumMath.acosClamped(a.x),a.y<0&&(i=CesiumMath.TWO_PI-i),a=CesiumMath.acosClamped(n.x),n.y<0&&(a=CesiumMath.TWO_PI-a),i=a-i,r.twistRight(i))}function singleAxisTwist2D(e,t,i){var r=e._rotateFactor*e._rotateRateRangeAdjustment;r>e._maximumRotateRate&&(r=e._maximumRotateRate),r<e._minimumRotateRate&&(r=e._minimumRotateRate);var n=(a=e._scene).camera,a=a.canvas;a=(i.endPosition.x-i.startPosition.x)/a.clientWidth,a=r*(a=Math.min(a,e.maximumMovementRatio))*Math.PI*4;n.twistRight(a)}function update2D(e){var t=e._scene.mapMode2D===MapMode2D$1.ROTATE;Matrix4.equals(Matrix4.IDENTITY,e._scene.camera.transform)?(reactToInput(e,e.enableTranslate,e.translateEventTypes,translate2D,e.inertiaTranslate,"_lastInertiaTranslateMovement"),reactToInput(e,e.enableZoom,e.zoomEventTypes,zoom2D$1,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&reactToInput(e,e.enableRotate,e.tiltEventTypes,twist2D,e.inertiaSpin,"_lastInertiaTiltMovement")):(reactToInput(e,e.enableZoom,e.zoomEventTypes,zoom2D$1,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&reactToInput(e,e.enableRotate,e.translateEventTypes,twist2D,e.inertiaSpin,"_lastInertiaSpinMovement"))}var pickGlobeScratchRay=new Ray,scratchDepthIntersection$1=new Cartesian3,scratchRayIntersection$1=new Cartesian3;function pickGlobe(e,t,i){var r=e._scene,n=e._globe,a=r.camera;if(defined(n)){var o;e=!e._cameraUnderground;return r.pickPositionSupported&&(o=r.pickPositionWorldCoordinates(t,scratchDepthIntersection$1)),t=a.getPickRay(t,pickGlobeScratchRay),e=n.pickWorldCoordinates(t,r,e,scratchRayIntersection$1),(defined(o)?Cartesian3.distance(o,a.positionWC):Number.POSITIVE_INFINITY)<(defined(e)?Cartesian3.distance(e,a.positionWC):Number.POSITIVE_INFINITY)?Cartesian3.clone(o,i):Cartesian3.clone(e,i)}}var scratchDistanceCartographic=new Cartographic;function getDistanceFromSurface(e){var t=e._ellipsoid,i=e._scene,r=i.camera,n=0;return i.mode===SceneMode$1.SCENE3D?defined(t=t.cartesianToCartographic(r.position,scratchDistanceCartographic))&&(n=t.height):n=r.position.z,e=defaultValue(e._scene.globeHeight,0),Math.abs(e-n)}var scratchSurfaceNormal$1=new Cartesian3;function getZoomDistanceUnderground(e,t){var i=t.origin;t=t.direction,e=getDistanceFromSurface(e),i=Cartesian3.normalize(i,scratchSurfaceNormal$1),t=Math.abs(Cartesian3.dot(i,t));return e*(2*Math.max(t,.5))}function getTiltCenterUnderground(e,t,i,r){var n=Cartesian3.distance(t.origin,i);i=getDistanceFromSurface(e);return CesiumMath.clamp(5*i,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance)<n&&(n=Math.min(n,i/5),n=Math.max(n,100)),Ray.getPoint(t,n,r)}function getStrafeStartPositionUnderground(e,t,i,r){var n;return(!defined(i)||(n=Cartesian3.distance(t.origin,i))>e._maximumUndergroundPickDistance)&&(n=getDistanceFromSurface(e)),Ray.getPoint(t,n,r)}var scratchInertialDelta=new Cartesian2;function continueStrafing(e,t){var i=t.endPosition,r=Cartesian2.subtract(t.endPosition,t.startPosition,scratchInertialDelta),n=e._strafeEndMousePosition;Cartesian2.add(n,r,n),t.endPosition=n,strafe(e,t,e._strafeStartPosition),t.endPosition=i}var translateCVStartRay=new Ray,translateCVEndRay=new Ray,translateCVStartPos=new Cartesian3,translateCVEndPos=new Cartesian3,translateCVDifference=new Cartesian3,translateCVOrigin=new Cartesian3,translateCVPlane=new Plane(Cartesian3.UNIT_X,0),translateCVStartMouse=new Cartesian2,translateCVEndMouse=new Cartesian2;function translateCV(e,t,i){if(Cartesian3.equals(t,e._translateMousePosition)||(e._looking=!1),Cartesian3.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking)look3D(e,t,i);else if(e._strafing)continueStrafing(e,i);else{var r,n=e._scene.camera,a=e._cameraUnderground,o=Cartesian2.clone(i.startPosition,translateCVStartMouse),s=Cartesian2.clone(i.endPosition,translateCVEndMouse),l=n.getPickRay(o,translateCVStartRay),c=Cartesian3.clone(Cartesian3.ZERO,translateCVOrigin),u=Cartesian3.UNIT_X;if(n.position.z<e._minimumPickingTerrainHeight&&defined(r=pickGlobe(e,o,translateCVStartPos))&&(c.x=r.x),a||c.x>n.position.z&&defined(r)){var d=r;return a&&(d=getStrafeStartPositionUnderground(e,l,r,translateCVStartPos)),Cartesian2.clone(t,e._strafeMousePosition),Cartesian2.clone(t,e._strafeEndMousePosition),Cartesian3.clone(d,e._strafeStartPosition),e._strafing=!0,void strafe(e,i,e._strafeStartPosition)}if(u=Plane.fromPointNormal(c,u,translateCVPlane),l=n.getPickRay(o,translateCVStartRay),l=IntersectionTests.rayPlane(l,u,translateCVStartPos),s=n.getPickRay(s,translateCVEndRay),u=IntersectionTests.rayPlane(s,u,translateCVEndPos),!defined(l)||!defined(u))return e._looking=!0,look3D(e,t,i),void Cartesian2.clone(t,e._translateMousePosition);u=(l=Cartesian3.subtract(l,u,translateCVDifference)).x,l.x=l.y,l.y=l.z,l.z=u,(u=Cartesian3.magnitude(l))>CesiumMath.EPSILON6&&(Cartesian3.normalize(l,l),n.move(l,u))}}var rotateCVWindowPos=new Cartesian2,rotateCVWindowRay=new Ray,rotateCVCenter=new Cartesian3,rotateCVVerticalCenter=new Cartesian3,rotateCVTransform=new Matrix4,rotateCVVerticalTransform=new Matrix4,rotateCVOrigin=new Cartesian3,rotateCVPlane=new Plane(Cartesian3.UNIT_X,0),rotateCVCartesian3=new Cartesian3,rotateCVCart=new Cartographic,rotateCVOldTransform=new Matrix4,rotateCVQuaternion=new Quaternion,rotateCVMatrix=new Matrix3,tilt3DCartesian3=new Cartesian3;function rotateCV(e,t,i){var r;defined(i.angleAndHeight)&&(i=i.angleAndHeight),Cartesian2.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking?look3D(e,t,i):(r=e._scene.camera,e._tiltCVOffMap||!e.onMap()||Math.abs(r.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,rotateCVOnPlane(e,t,i)):rotateCVOnTerrain(e,t,i))}function rotateCVOnPlane(e,t,i){var r=e._scene,n=r.camera,a=r.canvas;(l=rotateCVWindowPos).x=a.clientWidth/2,l.y=a.clientHeight/2;var o=n.getPickRay(l,rotateCVWindowRay),s=Cartesian3.UNIT_X,l=(a=o.origin,o.direction);o=Cartesian3.dot(s,l);if(Math.abs(o)>CesiumMath.EPSILON6&&(c=-Cartesian3.dot(s,a)/o),!defined(c)||c<=0)return e._looking=!0,look3D(e,t,i),void Cartesian2.clone(t,e._tiltCenterMousePosition);l=Cartesian3.multiplyByScalar(l,c,rotateCVCenter),Cartesian3.add(a,l,l);var c=r.mapProjection;a=c.ellipsoid;Cartesian3.fromElements(l.y,l.z,l.x,l),r=c.unproject(l,rotateCVCart),a.cartographicToCartesian(r,l),c=Transforms.eastNorthUpToFixedFrame(l,a,rotateCVTransform),r=e._globe,l=e._ellipsoid,e._globe=void 0,e._ellipsoid=Ellipsoid.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1,a=Matrix4.clone(n.transform,rotateCVOldTransform),n._setTransform(c),rotate3D(e,t,i,Cartesian3.UNIT_Z),n._setTransform(a),e._globe=r,l=(e._ellipsoid=l).maximumRadius,e._rotateFactor=1/l,e._rotateRateRangeAdjustment=l}function rotateCVOnTerrain(e,t,i){var r=(h=e._scene).camera,n=e._cameraUnderground,a=Cartesian3.UNIT_X;if(Cartesian2.equals(t,e._tiltCenterMousePosition))d=Cartesian3.clone(e._tiltCenter,rotateCVCenter);else{if(r.position.z<e._minimumPickingTerrainHeight&&(d=pickGlobe(e,t,rotateCVCenter)),!defined(d)){var o=(u=r.getPickRay(t,rotateCVWindowRay)).origin,s=u.direction,l=Cartesian3.dot(a,s);if(Math.abs(l)>CesiumMath.EPSILON6&&(c=-Cartesian3.dot(a,o)/l),!defined(c)||c<=0)return e._looking=!0,look3D(e,t,i),void Cartesian2.clone(t,e._tiltCenterMousePosition);d=Cartesian3.multiplyByScalar(s,c,rotateCVCenter),Cartesian3.add(o,d,d)}n&&(defined(u)||(u=r.getPickRay(t,rotateCVWindowRay)),getTiltCenterUnderground(e,u,d,d)),Cartesian2.clone(t,e._tiltCenterMousePosition),Cartesian3.clone(d,e._tiltCenter)}var c=h.canvas;(o=rotateCVWindowPos).x=c.clientWidth/2,o.y=e._tiltCenterMousePosition.y,u=r.getPickRay(o,rotateCVWindowRay),(h=Cartesian3.clone(Cartesian3.ZERO,rotateCVOrigin)).x=d.x,c=Plane.fromPointNormal(h,a,rotateCVPlane),o=IntersectionTests.rayPlane(u,c,rotateCVVerticalCenter),a=(h=r._projection).ellipsoid,Cartesian3.fromElements(d.y,d.z,d.x,d);var u=h.unproject(d,rotateCVCart);a.cartographicToCartesian(u,d);c=Transforms.eastNorthUpToFixedFrame(d,a,rotateCVTransform);var d=defined(o)?(Cartesian3.fromElements(o.y,o.z,o.x,o),u=h.unproject(o,rotateCVCart),a.cartographicToCartesian(u,o),Transforms.eastNorthUpToFixedFrame(o,a,rotateCVVerticalTransform)):c,h=e._globe;u=e._ellipsoid;e._globe=void 0,e._ellipsoid=Ellipsoid.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1,o=Cartesian3.UNIT_Z,a=Matrix4.clone(r.transform,rotateCVOldTransform),r._setTransform(c),c=Cartesian3.cross(Cartesian3.UNIT_Z,Cartesian3.normalize(r.position,rotateCVCartesian3),rotateCVCartesian3),c=Cartesian3.dot(r.right,c),rotate3D(e,t,i,o,!1,!0),r._setTransform(d),c<0?(c=i.startPosition.y-i.endPosition.y,(n&&c<0||!n&&0<c)&&(o=void 0),c=r.constrainedAxis,rotate3D(e,t,i,o,!(r.constrainedAxis=void 0),!1),r.constrainedAxis=c):rotate3D(e,t,i,o,!0,!1),defined(r.constrainedAxis)&&(o=Cartesian3.cross(r.direction,r.constrainedAxis,tilt3DCartesian3),Cartesian3.equalsEpsilon(o,Cartesian3.ZERO,CesiumMath.EPSILON6)||(Cartesian3.dot(o,r.right)<0&&Cartesian3.negate(o,o),Cartesian3.cross(o,r.direction,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.normalize(r.up,r.up),Cartesian3.normalize(r.right,r.right))),r._setTransform(a),e._globe=h,u=(e._ellipsoid=u).maximumRadius,e._rotateFactor=1/u,e._rotateRateRangeAdjustment=u,u=Cartesian3.clone(r.positionWC,rotateCVCartesian3),e.enableCollisionDetection&&adjustHeightForTerrain(e),Cartesian3.equals(r.positionWC,u)||(r._setTransform(d),r.worldToCameraCoordinatesPoint(u,u),d=Cartesian3.magnitudeSquared(u),Cartesian3.magnitudeSquared(r.position)>d&&(Cartesian3.normalize(r.position,r.position),Cartesian3.multiplyByScalar(r.position,Math.sqrt(d),r.position)),d=Cartesian3.angleBetween(u,r.position),u=Cartesian3.cross(u,r.position,u),Cartesian3.normalize(u,u),d=Quaternion.fromAxisAngle(u,d,rotateCVQuaternion),d=Matrix3.fromQuaternion(d,rotateCVMatrix),Matrix3.multiplyByVector(d,r.direction,r.direction),Matrix3.multiplyByVector(d,r.up,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.cross(r.right,r.direction,r.up),r._setTransform(a))}var zoomCVWindowPos=new Cartesian2,zoomCVWindowRay=new Ray,zoomCVIntersection=new Cartesian3;function zoomCV(e,t,i){defined(i.distance)&&(i=i.distance);var r,n=(d=e._scene).camera,a=d.canvas,o=e._cameraUnderground;o?r=t:((r=zoomCVWindowPos).x=a.clientWidth/2,r.y=a.clientHeight/2);var s,l,c,u=n.getPickRay(r,zoomCVWindowRay),d=u.origin;a=u.direction;n.position.z<e._minimumPickingTerrainHeight&&(s=pickGlobe(e,r,zoomCVIntersection)),defined(s)&&(l=Cartesian3.distance(d,s)),o&&(c=getZoomDistanceUnderground(e,u),l=defined(l)?Math.min(l,c):c),defined(l)||(c=Cartesian3.UNIT_X,l=-Cartesian3.dot(c,d)/Cartesian3.dot(c,a)),handleZoom(e,t,i,e._zoomFactor,l)}function updateCV(e){var t,i=e._scene.camera;Matrix4.equals(Matrix4.IDENTITY,i.transform)?(t=e._tweens,e._aggregator.anyButtonDown&&t.removeAll(),reactToInput(e,e.enableTilt,e.tiltEventTypes,rotateCV,e.inertiaSpin,"_lastInertiaTiltMovement"),reactToInput(e,e.enableTranslate,e.translateEventTypes,translateCV,e.inertiaTranslate,"_lastInertiaTranslateMovement"),reactToInput(e,e.enableZoom,e.zoomEventTypes,zoomCV,e.inertiaZoom,"_lastInertiaZoomMovement"),reactToInput(e,e.enableLook,e.lookEventTypes,look3D),e._aggregator.anyButtonDown||t.contains(e._tween)||defined(i=i.createCorrectPositionTween(e.bounceAnimationTime))&&(e._tween=t.add(i)),t.update()):(reactToInput(e,e.enableRotate,e.rotateEventTypes,rotate3D,e.inertiaSpin,"_lastInertiaSpinMovement"),reactToInput(e,e.enableZoom,e.zoomEventTypes,zoom3D$1,e.inertiaZoom,"_lastInertiaZoomMovement"))}var scratchStrafeRay=new Ray,scratchStrafePlane=new Plane(Cartesian3.UNIT_X,0),scratchStrafeIntersection=new Cartesian3,scratchStrafeDirection=new Cartesian3,scratchMousePos=new Cartesian3;function strafe(e,t,i){var r=e._scene,n=r.camera,a=n.getPickRay(t.endPosition,scratchStrafeRay);e=Cartesian3.clone(n.direction,scratchStrafeDirection);r.mode===SceneMode$1.COLUMBUS_VIEW&&Cartesian3.fromElements(e.z,e.x,e.y,e),t=Plane.fromPointNormal(i,e,scratchStrafePlane),defined(t=IntersectionTests.rayPlane(a,t,scratchStrafeIntersection))&&(e=Cartesian3.subtract(i,t,e),r.mode===SceneMode$1.COLUMBUS_VIEW&&Cartesian3.fromElements(e.y,e.z,e.x,e),Cartesian3.add(n.position,e,n.position))}var spin3DPick=new Cartesian3,scratchCartographic$f=new Cartographic,scratchRadii$2=new Cartesian3,scratchEllipsoid$e=new Ellipsoid,scratchLookUp=new Cartesian3,scratchNormal$7=new Cartesian3;function spin3D(e,t,i){var r=e._scene.camera,n=e._cameraUnderground,a=e._ellipsoid;if(Matrix4.equals(r.transform,Matrix4.IDENTITY)){var o,s,l=a.geodeticSurfaceNormal(r.position,scratchLookUp);if(Cartesian2.equals(t,e._rotateMousePosition))if(e._looking)look3D(e,t,i,l);else if(e._rotating)rotate3D(e,t,i);else if(e._strafing)continueStrafing(e,i);else{if(Cartesian3.magnitude(r.position)<Cartesian3.magnitude(e._rotateStartPosition))return;o=Cartesian3.magnitude(e._rotateStartPosition),(s=scratchRadii$2).x=s.y=s.z=o,pan3D(e,t,i,a=Ellipsoid.fromCartesian3(s,scratchEllipsoid$e))}else{e._looking=!1,e._rotating=!1,e._strafing=!1;var c,u,d,h=a.cartesianToCartographic(r.positionWC,scratchCartographic$f).height;defined(e._globe)&&h<e._minimumPickingTerrainHeight?defined(c=pickGlobe(e,i.startPosition,scratchMousePos))?(d=!1,u=r.getPickRay(i.startPosition,pickGlobeScratchRay),n?(d=!0,getStrafeStartPositionUnderground(e,u,c,c)):(n=a.geodeticSurfaceNormal(c,scratchNormal$7),d=Math.abs(Cartesian3.dot(u.direction,n))<.05||Cartesian3.magnitude(r.position)<Cartesian3.magnitude(c)),d?(Cartesian2.clone(t,e._strafeEndMousePosition),Cartesian3.clone(c,e._strafeStartPosition),e._strafing=!0,strafe(e,i,e._strafeStartPosition)):(o=Cartesian3.magnitude(c),(s=scratchRadii$2).x=s.y=s.z=o,pan3D(e,t,i,a=Ellipsoid.fromCartesian3(s,scratchEllipsoid$e)),Cartesian3.clone(c,e._rotateStartPosition))):(e._looking=!0,look3D(e,t,i,l)):defined(r.pickEllipsoid(i.startPosition,e._ellipsoid,spin3DPick))?(pan3D(e,t,i,e._ellipsoid),Cartesian3.clone(spin3DPick,e._rotateStartPosition)):h>e._minimumTrackBallHeight?(e._rotating=!0,rotate3D(e,t,i)):(e._looking=!0,look3D(e,t,i,l)),Cartesian2.clone(t,e._rotateMousePosition)}}else rotate3D(e,t,i)}function rotate3D(e,t,i,r,n,a){n=defaultValue(n,!1),a=defaultValue(a,!1);var o=e._scene,s=o.camera,l=o.canvas,c=s.constrainedAxis;defined(r)&&(s.constrainedAxis=r),o=Cartesian3.magnitude(s.position),(r=e._rotateFactor*(o-e._rotateRateRangeAdjustment))>e._maximumRotateRate&&(r=e._maximumRotateRate),r<e._minimumRotateRate&&(r=e._minimumRotateRate),o=(i.startPosition.x-i.endPosition.x)/l.clientWidth,l=(i.startPosition.y-i.endPosition.y)/l.clientHeight,o=Math.min(o,e.maximumMovementRatio),l=Math.min(l,e.maximumMovementRatio),o=r*o*Math.PI*2,l=r*l*Math.PI,n||s.rotateRight(o),a||s.rotateUp(l),s.constrainedAxis=c}var pan3DP0=Cartesian4.clone(Cartesian4.UNIT_W),pan3DP1=Cartesian4.clone(Cartesian4.UNIT_W),pan3DTemp0=new Cartesian3,pan3DTemp1=new Cartesian3,pan3DTemp2=new Cartesian3,pan3DTemp3=new Cartesian3,pan3DStartMousePosition=new Cartesian2,pan3DEndMousePosition=new Cartesian2;function pan3D(e,t,i,r){var n,a,o=e._scene.camera,s=Cartesian2.clone(i.startPosition,pan3DStartMousePosition),l=Cartesian2.clone(i.endPosition,pan3DEndMousePosition),c=o.pickEllipsoid(s,r,pan3DP0),u=o.pickEllipsoid(l,r,pan3DP1);if(!defined(c)||!defined(u))return e._rotating=!0,void rotate3D(e,t,i);c=o.worldToCameraCoordinates(c,c),u=o.worldToCameraCoordinates(u,u),defined(o.constrainedAxis)?(n=o.constrainedAxis,s=Cartesian3.mostOrthogonalAxis(n,pan3DTemp0),Cartesian3.cross(s,n,s),Cartesian3.normalize(s,s),l=Cartesian3.cross(n,s,pan3DTemp1),r=Cartesian3.magnitude(c),a=Cartesian3.dot(n,c),e=Math.acos(a/r),t=Cartesian3.multiplyByScalar(n,a,pan3DTemp2),Cartesian3.subtract(c,t,t),Cartesian3.normalize(t,t),i=Cartesian3.magnitude(u),r=Cartesian3.dot(n,u),a=Math.acos(r/i),i=Cartesian3.multiplyByScalar(n,r,pan3DTemp3),Cartesian3.subtract(u,i,i),Cartesian3.normalize(i,i),r=Math.acos(Cartesian3.dot(t,s)),Cartesian3.dot(t,l)<0&&(r=CesiumMath.TWO_PI-r),s=Math.acos(Cartesian3.dot(i,s)),Cartesian3.dot(i,l)<0&&(s=CesiumMath.TWO_PI-s),l=r-s,r=Cartesian3.equalsEpsilon(n,o.position,CesiumMath.EPSILON2)?o.right:Cartesian3.cross(n,o.position,pan3DTemp0),s=Cartesian3.cross(n,r,pan3DTemp0),r=Cartesian3.dot(s,Cartesian3.subtract(c,n,pan3DTemp1)),s=Cartesian3.dot(s,Cartesian3.subtract(u,n,pan3DTemp1)),a=0<r&&0<s?a-e:0<r&&s<=0?0<Cartesian3.dot(o.position,n)?-e-a:e+a:e-a,o.rotateRight(l),o.rotateUp(a)):(Cartesian3.normalize(c,c),Cartesian3.normalize(u,u),a=Cartesian3.dot(c,u),u=Cartesian3.cross(c,u,pan3DTemp0),a<1&&!Cartesian3.equalsEpsilon(u,Cartesian3.ZERO,CesiumMath.EPSILON14)&&(a=Math.acos(a),o.rotate(u,a)))}var zoom3DUnitPosition=new Cartesian3,zoom3DCartographic=new Cartographic;function zoom3D$1(e,t,i){defined(i.distance)&&(i=i.distance);var r,n,a=e._ellipsoid,o=(n=e._scene).camera,s=n.canvas;(n=e._cameraUnderground)?r=t:((r=zoomCVWindowPos).x=s.clientWidth/2,r.y=s.clientHeight/2);var l,c;s=o.getPickRay(r,zoomCVWindowRay);(a=a.cartesianToCartographic(o.position,zoom3DCartographic).height)<e._minimumPickingTerrainHeight&&(l=pickGlobe(e,r,zoomCVIntersection)),defined(l)&&(c=Cartesian3.distance(s.origin,l)),n&&(s=getZoomDistanceUnderground(e,s),c=defined(c)?Math.min(c,s):s),defined(c)||(c=a),a=Cartesian3.normalize(o.position,zoom3DUnitPosition),handleZoom(e,t,i,e._zoomFactor,c,Cartesian3.dot(a,o.direction))}var tilt3DWindowPos=new Cartesian2,tilt3DRay=new Ray,tilt3DCenter=new Cartesian3,tilt3DVerticalCenter=new Cartesian3,tilt3DTransform=new Matrix4,tilt3DVerticalTransform=new Matrix4,tilt3DOldTransform=new Matrix4,tilt3DQuaternion=new Quaternion,tilt3DMatrix=new Matrix3,tilt3DCart=new Cartographic,tilt3DLookUp=new Cartesian3;function tilt3D(e,t,i){var r,n=e._scene.camera;Matrix4.equals(n.transform,Matrix4.IDENTITY)&&(defined(i.angleAndHeight)&&(i=i.angleAndHeight),Cartesian2.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking?(r=e._ellipsoid.geodeticSurfaceNormal(n.position,tilt3DLookUp),look3D(e,t,i,r)):(n=e._ellipsoid.cartesianToCartographic(n.position,tilt3DCart),e._tiltOnEllipsoid||n.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,tilt3DOnEllipsoid(e,t,i)):tilt3DOnTerrain(e,t,i)))}var tilt3DOnEllipsoidCartographic=new Cartographic;function tilt3DOnEllipsoid(e,t,i){var r=e._ellipsoid,n=e._scene,a=n.camera,o=.25*e.minimumZoomDistance,s=r.cartesianToCartographic(a.positionWC,tilt3DOnEllipsoidCartographic).height;if(!(s-o-1<CesiumMath.EPSILON3&&i.endPosition.y-i.startPosition.y<0)){if(o=n.canvas,(n=tilt3DWindowPos).x=o.clientWidth/2,n.y=o.clientHeight/2,o=a.getPickRay(n,tilt3DRay),defined(n=IntersectionTests.rayEllipsoid(o,r)))u=Ray.getPoint(o,n.start,tilt3DCenter);else{if(!(s>e._minimumTrackBallHeight)){e._looking=!0;var l=e._ellipsoid.geodeticSurfaceNormal(a.position,tilt3DLookUp);return look3D(e,t,i,l),void Cartesian2.clone(t,e._tiltCenterMousePosition)}if(!defined(c=IntersectionTests.grazingAltitudeLocation(o,r)))return;(l=r.cartesianToCartographic(c,tilt3DCart)).height=0,u=r.cartographicToCartesian(l,tilt3DCenter)}var c=Transforms.eastNorthUpToFixedFrame(u,r,tilt3DTransform),u=(l=e._globe,e._ellipsoid);e._globe=void 0,e._ellipsoid=Ellipsoid.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1,r=Matrix4.clone(a.transform,tilt3DOldTransform),a._setTransform(c),rotate3D(e,t,i,Cartesian3.UNIT_Z),a._setTransform(r),e._globe=l,u=(e._ellipsoid=u).maximumRadius,e._rotateFactor=1/u,e._rotateRateRangeAdjustment=u}}function tilt3DOnTerrain(e,t,i){var r=e._ellipsoid,n=(u=e._scene).camera,a=e._cameraUnderground;if(Cartesian2.equals(t,e._tiltCenterMousePosition))c=Cartesian3.clone(e._tiltCenter,tilt3DCenter);else{if(!defined(c=pickGlobe(e,t,tilt3DCenter))){var o=n.getPickRay(t,tilt3DRay);if(!defined(l=IntersectionTests.rayEllipsoid(o,r)))return void(r.cartesianToCartographic(n.position,tilt3DCart).height<=e._minimumTrackBallHeight&&(e._looking=!0,d=e._ellipsoid.geodeticSurfaceNormal(n.position,tilt3DLookUp),look3D(e,t,i,d),Cartesian2.clone(t,e._tiltCenterMousePosition)));c=Ray.getPoint(o,l.start,tilt3DCenter)}a&&(defined(o)||(o=n.getPickRay(t,tilt3DRay)),getTiltCenterUnderground(e,o,c,c)),Cartesian2.clone(t,e._tiltCenterMousePosition),Cartesian3.clone(c,e._tiltCenter)}var s=u.canvas;(d=tilt3DWindowPos).x=s.clientWidth/2,d.y=e._tiltCenterMousePosition.y,o=n.getPickRay(d,tilt3DRay);var l,c,u=Cartesian3.magnitude(c),d=(s=Cartesian3.fromElements(u,u,u,scratchRadii$2),Ellipsoid.fromCartesian3(s,scratchEllipsoid$e));defined(l=IntersectionTests.rayEllipsoid(o,d))&&(s=Cartesian3.magnitude(o.origin)>u?l.start:l.stop,u=Ray.getPoint(o,s,tilt3DVerticalCenter),l=Transforms.eastNorthUpToFixedFrame(c,r,tilt3DTransform),o=Transforms.eastNorthUpToFixedFrame(u,d,tilt3DVerticalTransform),s=e._globe,c=e._ellipsoid,e._globe=void 0,e._ellipsoid=Ellipsoid.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1,r=Cartesian3.UNIT_Z,d=Matrix4.clone(n.transform,tilt3DOldTransform),n._setTransform(l),u=Cartesian3.cross(u,n.positionWC,tilt3DCartesian3),u=Cartesian3.dot(n.rightWC,u),rotate3D(e,t,i,r,!1,!0),n._setTransform(o),u<0?(u=i.startPosition.y-i.endPosition.y,(a&&u<0||!a&&0<u)&&(r=void 0),u=n.constrainedAxis,rotate3D(e,t,i,r,!(n.constrainedAxis=void 0),!1),n.constrainedAxis=u):rotate3D(e,t,i,r,!0,!1),defined(n.constrainedAxis)&&(r=Cartesian3.cross(n.direction,n.constrainedAxis,tilt3DCartesian3),Cartesian3.equalsEpsilon(r,Cartesian3.ZERO,CesiumMath.EPSILON6)||(Cartesian3.dot(r,n.right)<0&&Cartesian3.negate(r,r),Cartesian3.cross(r,n.direction,n.up),Cartesian3.cross(n.direction,n.up,n.right),Cartesian3.normalize(n.up,n.up),Cartesian3.normalize(n.right,n.right))),n._setTransform(d),e._globe=s,c=(e._ellipsoid=c).maximumRadius,e._rotateFactor=1/c,e._rotateRateRangeAdjustment=c,c=Cartesian3.clone(n.positionWC,tilt3DCartesian3),e.enableCollisionDetection&&adjustHeightForTerrain(e),Cartesian3.equals(n.positionWC,c)||(n._setTransform(o),n.worldToCameraCoordinatesPoint(c,c),o=Cartesian3.magnitudeSquared(c),Cartesian3.magnitudeSquared(n.position)>o&&(Cartesian3.normalize(n.position,n.position),Cartesian3.multiplyByScalar(n.position,Math.sqrt(o),n.position)),o=Cartesian3.angleBetween(c,n.position),c=Cartesian3.cross(c,n.position,c),Cartesian3.normalize(c,c),o=Quaternion.fromAxisAngle(c,o,tilt3DQuaternion),o=Matrix3.fromQuaternion(o,tilt3DMatrix),Matrix3.multiplyByVector(o,n.direction,n.direction),Matrix3.multiplyByVector(o,n.up,n.up),Cartesian3.cross(n.direction,n.up,n.right),Cartesian3.cross(n.right,n.direction,n.up),n._setTransform(d)))}var look3DStartPos=new Cartesian2,look3DEndPos=new Cartesian2,look3DStartRay=new Ray,look3DEndRay=new Ray,look3DNegativeRot=new Cartesian3,look3DTan=new Cartesian3;function look3D(e,t,i,r){var n=e._scene.camera,a=look3DStartPos;a.x=i.startPosition.x,a.y=0;var o=look3DEndPos;o.x=i.endPosition.x,o.y=0;var s=n.getPickRay(a,look3DStartRay),l=n.getPickRay(o,look3DEndRay),c=0;n.frustum instanceof OrthographicFrustum?(h=s.origin,d=l.origin,Cartesian3.add(n.direction,h,h),Cartesian3.add(n.direction,d,d),Cartesian3.subtract(h,n.position,h),Cartesian3.subtract(d,n.position,d),Cartesian3.normalize(h,h),Cartesian3.normalize(d,d)):(h=s.direction,d=l.direction);var u=Cartesian3.dot(h,d);u<1&&(c=Math.acos(u)),c=i.startPosition.x>i.endPosition.x?-c:c;var d,h;e=e._horizontalRotationAxis;defined(r)?n.look(r,-c):defined(e)?n.look(e,-c):n.lookLeft(c),a.x=0,a.y=i.startPosition.y,o.x=0,o.y=i.endPosition.y,s=n.getPickRay(a,look3DStartRay),l=n.getPickRay(o,look3DEndRay),c=0,n.frustum instanceof OrthographicFrustum?(h=s.origin,d=l.origin,Cartesian3.add(n.direction,h,h),Cartesian3.add(n.direction,d,d),Cartesian3.subtract(h,n.position,h),Cartesian3.subtract(d,n.position,d),Cartesian3.normalize(h,h),Cartesian3.normalize(d,d)):(h=s.direction,d=l.direction),(u=Cartesian3.dot(h,d))<1&&(c=Math.acos(u)),c=i.startPosition.y>i.endPosition.y?-c:c,defined(r=defaultValue(r,e))?(h=n.direction,d=Cartesian3.negate(r,look3DNegativeRot),i=Cartesian3.equalsEpsilon(h,r,CesiumMath.EPSILON2),e=Cartesian3.equalsEpsilon(h,d,CesiumMath.EPSILON2),i||e?(i&&c<0||e&&0<c)&&n.look(n.right,-c):(u=Cartesian3.dot(h,r),e=CesiumMath.acosClamped(u),0<c&&e<c&&(c=e-CesiumMath.EPSILON4),u=Cartesian3.dot(h,d),e=CesiumMath.acosClamped(u),c<0&&e<-c&&(c=-e+CesiumMath.EPSILON4),h=Cartesian3.cross(r,h,look3DTan),n.look(h,c))):n.lookUp(c)}function update3D(e){reactToInput(e,e.enableRotate,e.rotateEventTypes,spin3D,e.inertiaSpin,"_lastInertiaSpinMovement"),reactToInput(e,e.enableZoom,e.zoomEventTypes,zoom3D$1,e.inertiaZoom,"_lastInertiaZoomMovement"),reactToInput(e,e.enableTilt,e.tiltEventTypes,tilt3D,e.inertiaSpin,"_lastInertiaTiltMovement"),reactToInput(e,e.enableLook,e.lookEventTypes,look3D)}var scratchAdjustHeightTransform=new Matrix4,scratchAdjustHeightCartographic=new Cartographic;function adjustHeightForTerrain(e){e._adjustedHeightForTerrain=!0;var t,i,r,n,a,o,s=e._scene,l=s.mode,c=s.globe;defined(c)&&l!==SceneMode$1.SCENE2D&&l!==SceneMode$1.MORPHING&&(t=s.camera,i=c.ellipsoid,r=s.mapProjection,Matrix4.equals(t.transform,Matrix4.IDENTITY)||(n=Matrix4.clone(t.transform,scratchAdjustHeightTransform),a=Cartesian3.magnitude(t.position),t._setTransform(Matrix4.IDENTITY)),o=scratchAdjustHeightCartographic,l===SceneMode$1.SCENE3D?i.cartesianToCartographic(t.position,o):r.unproject(t.position,o),c=!1,o.height<e._minimumCollisionTerrainHeight&&defined(s=e._scene.globeHeight)&&(s+=e.minimumZoomDistance,o.height<s&&(o.height=s,l===SceneMode$1.SCENE3D?i.cartographicToCartesian(o,t.position):r.project(o,t.position),c=!0)),defined(n)&&(t._setTransform(n),c&&(Cartesian3.normalize(t.position,t.position),Cartesian3.negate(t.position,t.direction),Cartesian3.multiplyByScalar(t.position,Math.max(a,e.minimumZoomDistance),t.position),Cartesian3.normalize(t.direction,t.direction),Cartesian3.cross(t.direction,t.up,t.right),Cartesian3.cross(t.right,t.direction,t.up))))}ScreenSpaceCameraController.prototype.onMap=function(){var e=(t=this._scene).mode,t=t.camera;return e!==SceneMode$1.COLUMBUS_VIEW||Math.abs(t.position.x)-this._maxCoord.x<0&&Math.abs(t.position.y)-this._maxCoord.y<0};var scratchPreviousPosition=new Cartesian3,scratchPreviousDirection=new Cartesian3;ScreenSpaceCameraController.prototype.update=function(){var e=this._scene,t=e.camera,i=e.globe,r=e.mode;Matrix4.equals(t.transform,Matrix4.IDENTITY)?(this._globe=i,this._ellipsoid=(defined(this._globe)?this._globe:e.mapProjection).ellipsoid):(this._globe=void 0,this._ellipsoid=Ellipsoid.UNIT_SPHERE),this._cameraUnderground=e.cameraUnderground&&defined(this._globe),this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight*e.terrainExaggeration,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight*e.terrainExaggeration,this._minimumTrackBallHeight=this.minimumTrackBallHeight*e.terrainExaggeration,i=this._ellipsoid.maximumRadius,this._rotateFactor=1/i,this._rotateRateRangeAdjustment=i,this._adjustedHeightForTerrain=!1,e=Cartesian3.clone(t.positionWC,scratchPreviousPosition),i=Cartesian3.clone(t.directionWC,scratchPreviousDirection),r===SceneMode$1.SCENE2D?update2D(this):r===SceneMode$1.COLUMBUS_VIEW?(this._horizontalRotationAxis=Cartesian3.UNIT_Z,updateCV(this)):r===SceneMode$1.SCENE3D&&(this._horizontalRotationAxis=void 0,update3D(this)),!this.enableCollisionDetection||this._adjustedHeightForTerrain||Cartesian3.equals(e,t.positionWC)&&Cartesian3.equals(i,t.directionWC)||adjustHeightForTerrain(this),this._aggregator.reset()},ScreenSpaceCameraController.prototype.isDestroyed=function(){return!1},ScreenSpaceCameraController.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),destroyObject(this)};var AdditiveBlend="uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\nuniform vec2 center;\nuniform float radius;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color0 = texture2D(colorTexture, v_textureCoordinates);\nvec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\nfloat x = length(gl_FragCoord.xy - center) / radius;\nfloat t = smoothstep(0.5, 0.8, x);\ngl_FragColor = mix(color0 + color1, color1, t);\n}\n",BrightPass="uniform sampler2D colorTexture;\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\nvarying vec2 v_textureCoordinates;\nfloat key(float avg)\n{\nfloat guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\nreturn max(0.0, guess) + 0.1;\n}\nvoid main()\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\nvec3 xyz = czm_RGBToXYZ(color.rgb);\nfloat luminance = xyz.r;\nfloat scaledLum = key(avgLuminance) * luminance / avgLuminance;\nfloat brightLum = max(scaledLum - threshold, 0.0);\nfloat brightness = brightLum / (offset + brightLum);\nxyz.r = brightness;\ngl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n";function SunPostProcess(){this._sceneFramebuffer=new SceneFramebuffer;var e=new Array(6);e[0]=new PostProcessStage({fragmentShader:PassThrough,textureScale:.125,forcePowerOfTwo:!0,sampleMode:PostProcessStageSampleMode.LINEAR});var t=e[1]=new PostProcessStage({fragmentShader:BrightPass,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:.125,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new Cartesian2,e[2]=new PostProcessStage({fragmentShader:GaussianBlur1D,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/t.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:.125,forcePowerOfTwo:!0}),e[3]=new PostProcessStage({fragmentShader:GaussianBlur1D,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/t.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:.125,forcePowerOfTwo:!0}),e[4]=new PostProcessStage({fragmentShader:PassThrough,sampleMode:PostProcessStageSampleMode.LINEAR}),this._uCenter=new Cartesian2,this._uRadius=void 0,e[5]=new PostProcessStage({fragmentShader:AdditiveBlend,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.getFramebuffer().getColorTexture(0)}}}),this._stages=new PostProcessStageComposite({stages:e});for(var r=new PostProcessStageTextureCache(this),n=e.length,a=0;a<n;++a)e[a]._textureCache=r;this._textureCache=r,this.length=e.length}SunPostProcess.prototype.get=function(e){return this._stages.get(e)},SunPostProcess.prototype.getStageByName=function(e){for(var t=this._stages.length,i=0;i<t;++i){var r=this._stages.get(i);if(r.name===e)return r}};var sunPositionECScratch=new Cartesian4,sunPositionWCScratch=new Cartesian2,sizeScratch=new Cartesian2,postProcessMatrix4Scratch=new Matrix4;function updateSunPosition(e,t,i){var r=(u=t.uniformState).sunPositionWC,n=u.view,a=u.viewProjection,o=u.projection,s=Matrix4.computeViewportTransformation(i,0,1,postProcessMatrix4Scratch),l=Matrix4.multiplyByPoint(n,r,sunPositionECScratch),c=Transforms.pointToGLWindowCoordinates(a,s,r,sunPositionWCScratch);l.x+=CesiumMath.SOLAR_RADIUS,u=Transforms.pointToGLWindowCoordinates(o,s,l,l),i=30*Cartesian2.magnitude(Cartesian2.subtract(u,c,u))*2,(n=sizeScratch).x=i,n.y=i,e._uCenter=Cartesian2.clone(c,e._uCenter),e._uRadius=.15*Math.max(n.x,n.y);o=t.drawingBufferWidth,l=t.drawingBufferHeight;var u,d=e._stages;i=(u=d.get(0)).outputTexture.width,t=u.outputTexture.height;(e=new BoundingRectangle).width=i,e.height=t,s=Matrix4.computeViewportTransformation(e,0,1,postProcessMatrix4Scratch),c=Transforms.pointToGLWindowCoordinates(a,s,r,sunPositionWCScratch),n.x*=i/o,n.y*=t/l;var h=u.scissorRectangle;h.x=Math.max(c.x-.5*n.x,0),h.y=Math.max(c.y-.5*n.y,0),h.width=Math.min(n.x,o),h.height=Math.min(n.y,l);for(var p=1;p<4;++p)BoundingRectangle.clone(h,d.get(p).scissorRectangle)}SunPostProcess.prototype.clear=function(e,t,i){this._sceneFramebuffer.clear(e,t,i),this._textureCache.clear(e)},SunPostProcess.prototype.update=function(e){var t=e.context,i=e.viewport;return(e=this._sceneFramebuffer).update(t,i),e=e.getFramebuffer(),this._textureCache.update(t),this._stages.update(t,!1),updateSunPosition(this,t,i),e},SunPostProcess.prototype.execute=function(e){var t=this._sceneFramebuffer.getFramebuffer().getColorTexture(0),i=this._stages,r=i.length;i.get(0).execute(e,t);for(var n=1;n<r;++n)i.get(n).execute(e,i.get(n-1).outputTexture)},SunPostProcess.prototype.copy=function(e,t){var i;defined(this._copyColorCommand)||((i=this)._copyColorCommand=e.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return i._stages.get(i._stages.length-1).outputTexture}},owner:this})),this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},SunPostProcess.prototype.isDestroyed=function(){return!1},SunPostProcess.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),destroyObject(this)};var requestRenderAfterFrame=function(e){return function(){e.frameState.afterRender.push((function(){e.requestRender()}))}};function Scene(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).canvas,i=e.creditContainer,r=e.creditViewport;defined(a=clone(e.contextOptions))||(a={}),defined(a.webgl)||(a.webgl={}),a.webgl.powerPreference=defaultValue(a.webgl.powerPreference,"high-performance");var n=defined(i),a=new Context(t,a);n||((i=document.createElement("div")).style.position="absolute",i.style.bottom="0",i.style["text-shadow"]="0 0 2px #000000",i.style.color="#ffffff",i.style["font-size"]="10px",i.style["padding-right"]="5px",t.parentNode.appendChild(i)),defined(r)||(r=t.parentNode),this._id=createGuid(),this._jobScheduler=new JobScheduler,this._frameState=new FrameState(a,new CreditDisplay(i," • ",r),this._jobScheduler),this._frameState.scene3DOnly=defaultValue(e.scene3DOnly,!1),this._removeCreditContainer=!n,this._creditContainer=i,this._canvas=t,this._context=a,this._computeEngine=new ComputeEngine(a),this._globe=void 0,this._globeTranslucencyState=new GlobeTranslucencyState,this._primitives=new PrimitiveCollection,this._groundPrimitives=new PrimitiveCollection,this._globeHeight=void 0,this._cameraUnderground=!1,this._logDepthBuffer=a.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new TweenCollection,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=defaultValue(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new DepthPlane,this._clearColorCommand=new ClearCommand({color:new Color,stencil:0,owner:this}),this._depthClearCommand=new ClearCommand({depth:1,owner:this}),this._stencilClearCommand=new ClearCommand({stencil:0}),this._classificationStencilClearCommand=new ClearCommand({stencil:0,renderState:RenderState.fromCache({stencilMask:StencilConstants$1.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new SceneTransitioner(this),this._preUpdate=new Event,this._postUpdate=new Event,this._renderError=new Event,this._preRender=new Event,this._postRender=new Event,this._minimumDisableDepthTestDistance=0,this._debugInspector=new DebugInspector,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new Event,this.morphComplete=new Event,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=Color.clone(Color.BLACK),this._mode=SceneMode$1.SCENE3D,this._mapProjection=defined(e.mapProjection)?e.mapProjection:new GeographicProjection,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowGlobeDepth=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new Fog,this._shadowMapCamera=new Camera(this),this.shadowMap=new ShadowMap({context:a,lightCamera:this._shadowMapCamera,enabled:defaultValue(e.shadows,!1)}),this.invertClassification=!1,this.invertClassificationColor=Color.clone(Color.WHITE),this._actualInvertClassificationColor=Color.clone(this._invertClassificationColor),this._invertClassification=new InvertClassification,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new PostProcessStageCollection,this._brdfLutGenerator=new BrdfLutGenerator,this._terrainExaggeration=defaultValue(e.terrainExaggeration,1),this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new ScreenSpaceCameraController(this),this._cameraUnderground=!1,this._mapMode2D=defaultValue(e.mapMode2D,MapMode2D$1.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,separatePrimitiveFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=defaultValue(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=defaultValue(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=RequestScheduler.requestCompletedEvent.addEventListener(requestRenderAfterFrame(this)),this._removeTaskProcessorListenerCallback=TaskProcessor.taskCompletedEvent.addEventListener(requestRenderAfterFrame(this)),this._removeGlobeCallbacks=[],e=new BoundingRectangle(0,0,a.drawingBufferWidth,a.drawingBufferHeight),a=new Camera(this),this._logDepthBuffer&&(a.frustum.near=.1,a.frustum.far=1e10),this.preloadFlightCamera=new Camera(this),this.preloadFlightCullingVolume=void 0,this._picking=new Picking(this),this._defaultView=new View(this,a,e),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this.light=new SunLight,updateFrameNumber(this,0,JulianDate.now()),this.updateFrameState(),this.initializeFrame()}function updateGlobeListeners(e,t){for(var i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;var r=[];defined(t)&&(r.push(t.imageryLayersUpdatedEvent.addEventListener(requestRenderAfterFrame(e))),r.push(t.terrainProviderChanged.addEventListener(requestRenderAfterFrame(e)))),e._removeGlobeCallbacks=r}function updateDerivedCommands$1(e,t,i){var r=e._frameState,n=e._context,a=e._view.oit,o=r.shadowState.lightShadowMaps,s=r.shadowState.lightShadowsEnabled;r=t.derivedCommands;defined(t.pickId)&&(r.picking=DerivedCommand.createPickDerivedCommand(e,t,n,r.picking)),t.pickOnly||(r.depth=DerivedCommand.createDepthOnlyDerivedCommand(e,t,n,r.depth)),r.originalCommand=t,e._hdr&&(r.hdr=DerivedCommand.createHdrCommand(t,n,r.hdr),r=(t=r.hdr.command).derivedCommands),s&&t.receiveShadows&&(r.shadows=ShadowMap.createReceiveDerivedCommand(o,t,i,n,r.shadows)),t.pass===Pass$1.TRANSLUCENT&&defined(a)&&a.isSupported()&&(s&&t.receiveShadows?(r.oit=defined(r.oit)?r.oit:{},r.oit.shadows=a.createDerivedCommands(r.shadows.receiveCommand,n,r.oit.shadows)):r.oit=a.createDerivedCommands(t,n,r.oit))}Object.defineProperties(Scene.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return ContextLimits.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return ContextLimits.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return OctahedralProjectedCubeMap.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,updateGlobeListeners(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(defined(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(defined(this.globe))return this.globe.terrainProvider},set:function(e){defined(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(defined(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){e===SceneMode$1.SCENE2D?this.morphTo2D(0):e===SceneMode$1.SCENE3D?this.morphTo3D(0):e===SceneMode$1.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},terrainExaggeration:{get:function(){return this._terrainExaggeration}},useWebVR:{get:function(){return this._useWebVR},set:function(e){this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new Camera(this),defined(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new DeviceOrientationCameraController(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},imagerySplitPosition:{get:function(){return this._frameState.imagerySplitPosition},set:function(e){this._frameState.imagerySplitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){var t=this._context;t=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=t!==this._hdr,this._hdr=t}},highDynamicRangeSupported:{get:function(){var e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return.9999}},globeHeight:{get:function(){return this._globeHeight}}}),Scene.prototype.getCompressedTextureFormatSupported=function(e){var t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1},Scene.prototype.updateDerivedCommands=function(e){var t,i,r,n,a,o,s,l,c,u;defined(e.derivedCommands)&&(t=this._frameState,i=this._context,r=!1,l=t.shadowState.lastDirtyTime,e.lastDirtyTime!==l&&(e.lastDirtyTime=l,r=e.dirty=!0),n=t.useLogDepth,c=this._hdr,o=defined((a=e.derivedCommands).logDepth),u=defined(a.hdr),s=defined(a.originalCommand),l=n&&!o,u=c&&!u,c=!(n&&c||s),e.dirty=e.dirty||l||u||c,e.dirty&&(e.dirty=!1,u=t.shadowState.shadowMaps,t.shadowState.shadowsEnabled&&e.castShadows&&(a.shadows=ShadowMap.createCastDerivedCommand(u,e,r,i,a.shadows)),(o||l)&&(a.logDepth=DerivedCommand.createLogDepthCommand(e,i,a.logDepth),updateDerivedCommands$1(this,a.logDepth.command,r)),(s||c)&&updateDerivedCommands$1(this,e,r)))};var renderTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.RENDER}),preloadTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.PRELOAD}),preloadFlightTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.PRELOAD_FLIGHT}),requestRenderModeDeferCheckPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.REQUEST_RENDER_MODE_DEFER_CHECK}),scratchOccluderBoundingSphere=new BoundingSphere,scratchOccluder;function getOccluder(e){var t=e.globe;if(e._mode===SceneMode$1.SCENE3D&&defined(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){var i=t.ellipsoid;t=e.frameState.minimumTerrainHeight;return scratchOccluderBoundingSphere.radius=i.minimumRadius+t,scratchOccluder=Occluder.fromBoundingSphere(scratchOccluderBoundingSphere,e.camera.positionWC,scratchOccluder)}}function updateFrameNumber(e,t,i){(e=e._frameState).frameNumber=t,e.time=JulianDate.clone(i,e.time)}Scene.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1},Scene.prototype.updateFrameState=function(){var e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=getOccluder(this),t.terrainExaggeration=this._terrainExaggeration,t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof OrthographicFrustum||this.camera.frustum instanceof OrthographicOffCenterFrustum),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState,defined(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready?(t.specularEnvironmentMaps=this._specularEnvironmentMapAtlas.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentMapAtlas.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=Color.clone(this.invertClassificationColor,this._actualInvertClassificationColor),InvertClassification.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,defined(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0},Scene.prototype.isVisible=function(e,t,i){return defined(e)&&(!defined(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Intersect$1.OUTSIDE&&(!defined(i)||!e.occlude||!e.boundingVolume.isOccluded(i)))};var transformFrom2D=new Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function debugShowBoundingVolume(e,t,i,r){var n=t._frameState,a=n.context,o=e.boundingVolume;defined(t._debugVolume)&&t._debugVolume.destroy();var s,l,c,u=Cartesian3.clone(o.center);n.mode!==SceneMode$1.SCENE3D&&(u=Matrix4.multiplyByPoint(transformFrom2D,u,u),l=(s=n.mapProjection).unproject(u),u=s.ellipsoid.cartographicToCartesian(l)),defined(o.radius)?(c=o.radius,c=GeometryPipeline.toWireframe(EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new Cartesian3(c,c,c),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:c,modelMatrix:Matrix4.fromTranslation(u),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})):(h=o.halfAxes,c=GeometryPipeline.toWireframe(BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:c,modelMatrix:Matrix4.fromRotationTranslation(h,u,new Matrix4),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1}));var d,h=n.commandList;u=n.commandList=[];t._debugVolume.update(n),e=u[0],n.useLogDepth&&(e=DerivedCommand.createLogDepthCommand(e,a).command),defined(r)&&(d=i.framebuffer,i.framebuffer=r),e.execute(a,i),defined(d)&&(i.framebuffer=d),n.commandList=h}function executeCommand(e,t,i,r,n){var a=t._frameState;if(!defined(t.debugCommandFilter)||t.debugCommandFilter(e))if(e instanceof ClearCommand)e.execute(i,r);else{if(e.debugShowBoundingVolume&&defined(e.boundingVolume)&&debugShowBoundingVolume(e,t,r,n),a.useLogDepth&&defined(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command),!(n=a.passes).pick&&!n.depth&&t._hdr&&defined(e.derivedCommands)&&defined(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),n.pick||n.depth){if(n.pick&&!n.depth&&defined(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(i,r);if(defined(e.derivedCommands.depth))return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(i,r)}t.debugShowCommands||t.debugShowFrustums?t._debugInspector.executeDebugShowFrustumsCommand(t,e,r):(a.shadowState.lightShadowsEnabled&&e.receiveShadows&&defined(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand:e).execute(i,r)}}function executeIdCommand(e,t,i,r){var n=t._frameState;defined(t=e.derivedCommands)&&(n.useLogDepth&&defined(t.logDepth)&&(e=t.logDepth.command),defined((t=e.derivedCommands).picking)?(e=t.picking.pickCommand).execute(i,r):defined(t.depth)&&(e=t.depth.depthOnlyCommand).execute(i,r))}function backToFront(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function frontToBack(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+CesiumMath.EPSILON12}function executeTranslucentCommandsBackToFront(e,t,i,r,n){var a=e.context;mergeSort(r,backToFront,e.camera.positionWC),defined(n)&&t(n.unclassifiedCommand,e,a,i);for(var o=r.length,s=0;s<o;++s)t(r[s],e,a,i)}function executeTranslucentCommandsFrontToBack(e,t,i,r,n){var a=e.context;mergeSort(r,frontToBack,e.camera.positionWC),defined(n)&&t(n.unclassifiedCommand,e,a,i);for(var o=r.length,s=0;s<o;++s)t(r[s],e,a,i)}function getDebugGlobeDepth(e,t){var i=e._view.debugGlobeDepths,r=i[t];return!defined(r)&&e.context.depthTexture&&(r=new GlobeDepth,i[t]=r),r}transformFrom2D=Matrix4.inverseTransformation(transformFrom2D,transformFrom2D);var scratchPerspectiveFrustum$1=new PerspectiveFrustum,scratchPerspectiveOffCenterFrustum$1=new PerspectiveOffCenterFrustum,scratchOrthographicFrustum$1=new OrthographicFrustum,scratchOrthographicOffCenterFrustum$1=new OrthographicOffCenterFrustum;function executeCommands$1(e,t){var i,r=e.camera,n=e.context,a=e.frameState,o=n.uniformState;o.updateCamera(r),(i=defined(r.frustum.fov)?r.frustum.clone(scratchPerspectiveFrustum$1):defined(r.frustum.infiniteProjectionMatrix)?r.frustum.clone(scratchPerspectiveOffCenterFrustum$1):defined(r.frustum.width)?r.frustum.clone(scratchOrthographicFrustum$1):r.frustum.clone(scratchOrthographicOffCenterFrustum$1)).near=r.frustum.near,i.far=r.frustum.far,o.updateFrustum(i),o.updatePass(Pass$1.ENVIRONMENT);var s,l,c=a.passes,u=c.pick,d=e._environmentState,h=e._view,p=d.renderTranslucentDepthForPick,f=d.useWebVR;u||(defined(s=d.skyBoxCommand)&&executeCommand(s,e,n,t),d.isSkyAtmosphereVisible&&executeCommand(d.skyAtmosphereCommand,e,n,t),d.isSunVisible&&(d.sunDrawCommand.execute(n,t),e.sunBloom&&!f&&(f=d.useGlobeDepthFramebuffer?h.globeDepth.framebuffer:d.usePostProcess?h.sceneFramebuffer.getFramebuffer():d.originalFramebuffer,e._sunPostProcess.execute(n),e._sunPostProcess.copy(n,f),t.framebuffer=f)),d.isMoonVisible&&d.moonCommand.execute(n,t)),l=d.useOIT?(defined(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,r,n){h.oit.executeCommands(e,t,i,r,n)}),e._executeOITFunction):c.render?executeTranslucentCommandsBackToFront:executeTranslucentCommandsFrontToBack;for(var m,g=h.frustumCommandsList,y=g.length,_=d.clearGlobeDepth,v=d.useDepthPlane,C=e._globeTranslucencyState,x=C.translucent,b=e._view.globeTranslucencyFramebuffer,S=(d.separatePrimitiveFramebuffer=!1,e._depthClearCommand),T=e._stencilClearCommand,E=e._classificationStencilClearCommand,w=e._depthPlane,A=d.usePostProcessSelected,P=r.position.z,D=0;D<y;++D){var M=y-D-1,I=g[M];e.mode===SceneMode$1.SCENE2D?(r.position.z=P-I.near+1,i.far=Math.max(1,I.far-I.near),i.near=1,o.update(a)):(i.near=0!=M?I.near*e.opaqueFrustumNearOffset:I.near,i.far=I.far),o.updateFrustum(i);var R,O=e.debugShowGlobeDepth?getDebugGlobeDepth(e,M):h.globeDepth;e.debugShowGlobeDepth&&defined(O)&&d.useGlobeDepthFramebuffer&&(O.update(n,t,h.viewport,e._hdr,_),O.clear(n,t,e._clearColorCommand.color),R=t.framebuffer,t.framebuffer=O.framebuffer),S.execute(n,t),n.stencilBuffer&&T.execute(n,t),o.updatePass(Pass$1.GLOBE);var L,N=I.commands[Pass$1.GLOBE],F=I.indices[Pass$1.GLOBE];if(x)C.executeGlobeCommands(I,executeCommand,b,e,t);else for(m=0;m<F;++m)executeCommand(N[m],e,n,t);if(defined(O)&&d.useGlobeDepthFramebuffer&&O.executeCopyDepth(n,t),e.debugShowGlobeDepth&&defined(O)&&d.useGlobeDepthFramebuffer&&(t.framebuffer=R),!d.renderTranslucentDepthForPick)if(o.updatePass(Pass$1.TERRAIN_CLASSIFICATION),N=I.commands[Pass$1.TERRAIN_CLASSIFICATION],F=I.indices[Pass$1.TERRAIN_CLASSIFICATION],x)C.executeGlobeClassificationCommands(I,executeCommand,b,e,t);else for(m=0;m<F;++m)executeCommand(N[m],e,n,t);if(_&&(S.execute(n,t),v&&w.execute(n,t)),!d.useInvertClassification||u||d.renderTranslucentDepthForPick){for(o.updatePass(Pass$1.CESIUM_3D_TILE),N=I.commands[Pass$1.CESIUM_3D_TILE],F=I.indices[Pass$1.CESIUM_3D_TILE],m=0;m<F;++m)executeCommand(N[m],e,n,t);if(0<F&&(defined(O)&&d.useGlobeDepthFramebuffer&&O.executeUpdateDepth(n,t,_),!d.renderTranslucentDepthForPick))for(o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION),N=I.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION],F=I.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION],m=0;m<F;++m)executeCommand(N[m],e,n,t)}else{e._invertClassification.clear(n,t);var B=t.framebuffer;for(t.framebuffer=e._invertClassification._fbo,o.updatePass(Pass$1.CESIUM_3D_TILE),N=I.commands[Pass$1.CESIUM_3D_TILE],F=I.indices[Pass$1.CESIUM_3D_TILE],m=0;m<F;++m)executeCommand(N[m],e,n,t);for(defined(O)&&d.useGlobeDepthFramebuffer&&O.executeUpdateDepth(n,t,_),o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),N=I.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],F=I.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],m=0;m<F;++m)executeCommand(N[m],e,n,t);for(t.framebuffer=B,e._invertClassification.executeClassified(n,t),1===a.invertClassificationColor.alpha&&e._invertClassification.executeUnclassified(n,t),0<F&&n.stencilBuffer&&E.execute(n,t),o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION),N=I.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION],F=I.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION],m=0;m<F;++m)executeCommand(N[m],e,n,t)}for(0<F&&n.stencilBuffer&&T.execute(n,t),o.updatePass(Pass$1.OPAQUE),N=I.commands[Pass$1.OPAQUE],F=I.indices[Pass$1.OPAQUE],m=0;m<F;++m)executeCommand(N[m],e,n,t);if(0!=M&&e.mode!==SceneMode$1.SCENE2D&&(i.near=I.near,o.updateFrustum(i)),!u&&d.useInvertClassification&&a.invertClassificationColor.alpha<1&&(L=e._invertClassification),o.updatePass(Pass$1.TRANSLUCENT),(N=I.commands[Pass$1.TRANSLUCENT]).length=I.indices[Pass$1.TRANSLUCENT],l(e,executeCommand,t,N,L),n.depthTexture&&e.useDepthPicking&&(d.useGlobeDepthFramebuffer||p)&&(O=(p?t:O).framebuffer.depthStencilTexture,(V=e._picking.getPickDepth(e,M)).update(n,O),V.executeCopyDepth(n,t)),!u&&A){var V=t.framebuffer;if(t.framebuffer=h.sceneFramebuffer.getIdFramebuffer(),i.near=0!=M?I.near*e.opaqueFrustumNearOffset:I.near,i.far=I.far,o.updateFrustum(i),o.updatePass(Pass$1.GLOBE),N=I.commands[Pass$1.GLOBE],F=I.indices[Pass$1.GLOBE],x)C.executeGlobeCommands(I,executeIdCommand,b,e,t);else for(m=0;m<F;++m)executeIdCommand(N[m],e,n,t);for(_&&(S.framebuffer=t.framebuffer,S.execute(n,t),S.framebuffer=void 0),_&&v&&w.execute(n,t),o.updatePass(Pass$1.CESIUM_3D_TILE),N=I.commands[Pass$1.CESIUM_3D_TILE],F=I.indices[Pass$1.CESIUM_3D_TILE],m=0;m<F;++m)executeIdCommand(N[m],e,n,t);for(o.updatePass(Pass$1.OPAQUE),N=I.commands[Pass$1.OPAQUE],F=I.indices[Pass$1.OPAQUE],m=0;m<F;++m)executeIdCommand(N[m],e,n,t);for(o.updatePass(Pass$1.TRANSLUCENT),N=I.commands[Pass$1.TRANSLUCENT],F=I.indices[Pass$1.TRANSLUCENT],m=0;m<F;++m)executeIdCommand(N[m],e,n,t);t.framebuffer=V}}}function executeComputeCommands(e){e.context.uniformState.updatePass(Pass$1.COMPUTE);var t=e._environmentState.sunComputeCommand;defined(t)&&t.execute(e._computeEngine);for(var i=e._computeCommandList,r=i.length,n=0;n<r;++n)i[n].execute(e._computeEngine)}function executeOverlayCommands(e,t){e.context.uniformState.updatePass(Pass$1.OVERLAY);for(var i=e.context,r=e._overlayCommandList,n=r.length,a=0;a<n;++a)r[a].execute(i,t)}function insertShadowCastCommands(e,t,i){for(var r=i.shadowMapCullingVolume,n=i.isPointLight,a=i.passes,o=a.length,s=t.length,l=0;l<s;++l){var c=t[l];if(e.updateDerivedCommands(c),c.castShadows&&(c.pass===Pass$1.GLOBE||c.pass===Pass$1.CESIUM_3D_TILE||c.pass===Pass$1.OPAQUE||c.pass===Pass$1.TRANSLUCENT)&&e.isVisible(c,r))if(n)for(var u=0;u<o;++u)a[u].commandList.push(c);else if(1===o)a[0].commandList.push(c);else for(var d=!1,h=o-1;0<=h;--h){var p=a[h].cullingVolume;if(e.isVisible(c,p))a[h].commandList.push(c),d=!0;else if(d)break}}}function executeShadowMapCastCommands(e){var t=e.frameState,i=t.shadowState.shadowMaps,r=i.length;if(t.shadowState.shadowsEnabled)for(var n=e.context,a=n.uniformState,o=0;o<r;++o){var s=i[o];if(!s.outOfView){for(var l=s.passes,c=l.length,u=0;u<c;++u)l[u].commandList.length=0;for(insertShadowCastCommands(e,e.frameState.commandList,s),u=0;u<c;++u){var d=s.passes[u];a.updateCamera(d.camera),s.updatePass(n,u);for(var h=d.commandList.length,p=0;p<h;++p){var f=d.commandList[p];a.updatePass(f.pass),executeCommand(f.derivedCommands.shadows.castCommands[o],e,n,d.passState)}}}}}var scratchEyeTranslation=new Cartesian3;function executeWebVRCommands(e,t,i){var r=(l=e._view).camera,n=e._environmentState.renderTranslucentDepthForPick;updateAndClearFramebuffers(e,t,i),n||updateAndRenderPrimitives(e),l.createPotentiallyVisibleSet(e),n||(executeComputeCommands(e),executeShadowMapCastCommands(e));var a=t.viewport;a.x=0,a.y=0,a.width=.5*a.width;var o=Camera.clone(r,e._cameraVR);o.frustum=r.frustum;var s=r.frustum.near,l=(i=s*defaultValue(e.focalLength,5),defaultValue(e.eyeSeparation,i/30));n=Cartesian3.multiplyByScalar(o.right,.5*l,scratchEyeTranslation);r.frustum.aspectRatio=a.width/a.height,i=.5*l*s/i,Cartesian3.add(o.position,n,r.position),r.frustum.xOffset=i,executeCommands$1(e,t),a.x=a.width,Cartesian3.subtract(o.position,n,r.position),r.frustum.xOffset=-i,executeCommands$1(e,t),Camera.clone(o,r)}Scene.prototype.updateAndExecuteCommands=function(e,t){var i=this._frameState.mode;this._environmentState.useWebVR?executeWebVRCommands(this,e,t):i!==SceneMode$1.SCENE2D||this._mapMode2D===MapMode2D$1.ROTATE?executeCommandsInViewport(!0,this,e,t):(updateAndClearFramebuffers(this,e,t),execute2DViewportCommands(this,e))};var scratch2DViewportCartographic=new Cartographic(Math.PI,CesiumMath.PI_OVER_TWO),scratch2DViewportMaxCoord=new Cartesian3,scratch2DViewportSavedPosition=new Cartesian3,scratch2DViewportTransform=new Matrix4,scratch2DViewportCameraTransform=new Matrix4,scratch2DViewportEyePoint=new Cartesian3,scratch2DViewportWindowCoords=new Cartesian3,scratch2DViewport=new BoundingRectangle;function execute2DViewportCommands(e,t){var i=e.context,r=e.frameState,n=e.camera,a=t.viewport,o=BoundingRectangle.clone(a,scratch2DViewport);t.viewport=o;var s=scratch2DViewportMaxCoord;e.mapProjection.project(scratch2DViewportCartographic,s);var l=Cartesian3.clone(n.position,scratch2DViewportSavedPosition),c=Matrix4.clone(n.transform,scratch2DViewportCameraTransform),u=n.frustum.clone();n._setTransform(Matrix4.IDENTITY);var d=Matrix4.computeViewportTransformation(o,0,1,scratch2DViewportTransform),h=n.frustum.projectionMatrix,p=n.positionWC.y,f=Cartesian3.fromElements(CesiumMath.sign(p)*s.x-p,0,-n.positionWC.x,scratch2DViewportEyePoint),m=Transforms.pointToGLWindowCoordinates(h,d,f,scratch2DViewportWindowCoords);m.x=Math.floor(m.x),h=o.x,d=o.width,0===p||m.x<=h||m.x>=h+d?executeCommandsInViewport(!0,e,t):(Math.abs(h+.5*d-m.x)<1?(o.width=m.x-o.x,n.position.x*=CesiumMath.sign(n.position.x),n.frustum.right=0,r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),i.uniformState.update(r),executeCommandsInViewport(!0,e,t),o.x=m.x,n.position.x=-n.position.x,n.frustum.right=-n.frustum.left,n.frustum.left=0):m.x>h+.5*d?(o.width=m.x-h,f=n.frustum.right,n.frustum.right=s.x-p,r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),i.uniformState.update(r),executeCommandsInViewport(!0,e,t),o.x=m.x,o.width=h+d-m.x,n.position.x=-n.position.x,n.frustum.left=-n.frustum.right,n.frustum.right=f-2*n.frustum.right):(o.x=m.x,o.width=h+d-m.x,d=n.frustum.left,n.frustum.left=-s.x-p,r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),i.uniformState.update(r),executeCommandsInViewport(!0,e,t),o.x=h,o.width=m.x-h,n.position.x=-n.position.x,n.frustum.right=-n.frustum.left,n.frustum.left=d-2*n.frustum.left),r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),i.uniformState.update(r),executeCommandsInViewport(!1,e,t)),n._setTransform(c),Cartesian3.clone(l,n.position),n.frustum=u.clone(),t.viewport=a}function executeCommandsInViewport(e,t,i,r){var n=t._environmentState,a=t._view;n=n.renderTranslucentDepthForPick;e||n||(t.frameState.commandList.length=0),n||updateAndRenderPrimitives(t),a.createPotentiallyVisibleSet(t),e&&(defined(r)&&updateAndClearFramebuffers(t,i,r),n||(executeComputeCommands(t),executeShadowMapCastCommands(t))),executeCommands$1(t,i)}var scratchCullingVolume$1=new CullingVolume;function updateDebugFrustumPlanes(e){var t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new DebugCameraPrimitive({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),defined(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function updateShadowMaps(e){var t=e._frameState,i=t.shadowMaps,r=i.length;if((e=0<r&&!t.passes.pick&&e.mode===SceneMode$1.SCENE3D)!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=e),t.shadowState.lightShadowsEnabled=!1,e){for(var n=0;n<r;++n)if(i[n]!==t.shadowState.shadowMaps[n]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0;for(var a=t.shadowState.lightShadowMaps.length=0;a<r;++a){var o=i[a];o.update(t),t.shadowState.shadowMaps.push(o),o.fromLightSource&&(t.shadowState.lightShadowMaps.push(o),t.shadowState.lightShadowsEnabled=!0),o.dirty&&(++t.shadowState.lastDirtyTime,o.dirty=!1)}}}function updateAndRenderPrimitives(e){var t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),updateDebugFrustumPlanes(e),updateShadowMaps(e),e._globe&&e._globe.render(t)}function updateAndClearFramebuffers(e,t,i){var r=e._context,n=e._frameState,a=e._environmentState,o=e._view,s=e._frameState.passes.pick,l=a.useWebVR;a.originalFramebuffer=t.framebuffer,defined(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!l?e._sunPostProcess=new SunPostProcess:defined(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!defined(e.sun)&&defined(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);var c=e._clearColorCommand;Color.clone(i,c.color),c.execute(r,t);var u=a.useGlobeDepthFramebuffer=defined(o.globeDepth);u&&(o.globeDepth.update(r,t,o.viewport,e._hdr,a.clearGlobeDepth),o.globeDepth.clear(r,t,i));var d=o.oit,h=a.useOIT=!s&&defined(d)&&d.isSupported();h&&(d.update(r,t,o.globeDepth.framebuffer,e._hdr),d.clear(r,t,i),a.useOIT=d.isSupported());var p,f=e.postProcessStages,m=a.usePostProcess=!s&&(e._hdr||0<f.length||f.ambientOcclusion.enabled||f.fxaa.enabled||f.bloom.enabled);a.usePostProcessSelected=!1,m&&(o.sceneFramebuffer.update(r,o.viewport,e._hdr),o.sceneFramebuffer.clear(r,t,i),f.update(r,n.useLogDepth,e._hdr),f.clear(r),m=a.usePostProcess=f.ready,a.usePostProcessSelected=m&&f.hasSelected),a.isSunVisible&&e.sunBloom&&!l?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(r,t,i)):u?t.framebuffer=o.globeDepth.framebuffer:m&&(t.framebuffer=o.sceneFramebuffer.getFramebuffer()),defined(t.framebuffer)&&c.execute(r,t),(a.useInvertClassification=!s&&defined(t.framebuffer)&&e.invertClassification)&&(1===e.frameState.invertClassificationColor.alpha&&a.useGlobeDepthFramebuffer&&(p=o.globeDepth.framebuffer),defined(p)||r.depthTexture?(e._invertClassification.previousFramebuffer=p,e._invertClassification.update(r),e._invertClassification.clear(r,t),e.frameState.invertClassificationColor.alpha<1&&h&&((h=(p=e._invertClassification.unclassifiedCommand).derivedCommands).oit=d.createDerivedCommands(p,r,h.oit))):a.useInvertClassification=!1),e._globeTranslucencyState.translucent&&o.globeTranslucencyFramebuffer.updateAndClear(e._hdr,o.viewport,r,t)}function callAfterRenderFunctions(e){for(var t=e._frameState.afterRender,i=0,r=t.length;i<r;++i)t[i](),e.requestRender();t.length=0}function getGlobeHeight(e){var t=e._globe;e=e.camera.positionCartographic;if(defined(t)&&t.show&&defined(e))return t.getHeight(e)}function isCameraUnderground(e){var t=e.camera,i=e._mode,r=e.globe,n=e._screenSpaceCameraController;return!!defined(t=t.positionCartographic)&&(!n.onMap()&&t.height<0||!(!defined(r)||!r.show||i===SceneMode$1.SCENE2D||i===SceneMode$1.MORPHING)&&(defined(e=e._globeHeight)&&t.height<e))}function updateDebugShowFramesPerSecond(e,t){var i,r;e.debugShowFramesPerSecond?(defined(e._performanceDisplay)||((i=document.createElement("div")).className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(i),r=new PerformanceDisplay({container:i}),e._performanceDisplay=r,e._performanceContainer=i),e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)):defined(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function prePassesUpdate(e){e._jobScheduler.resetBudgets();var t=e._frameState;e.primitives.prePassesUpdate(t),defined(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function postPassesUpdate(e){var t=e._frameState;e.primitives.postPassesUpdate(t),RequestScheduler.update()}Scene.prototype.updateEnvironment=function(){var e=this._frameState,t=this._view,i=this._environmentState,r=e.passes.render,n=e.passes.offscreen,a=this.skyAtmosphere,o=this.globe,s=this._globeTranslucencyState;!r||this._mode!==SceneMode$1.SCENE2D&&t.camera.frustum instanceof OrthographicFrustum||!s.environmentVisible?(i.skyAtmosphereCommand=void 0,i.skyBoxCommand=void 0,i.sunDrawCommand=void 0,i.sunComputeCommand=void 0,i.moonCommand=void 0):(defined(a)?(defined(o)&&(a.setDynamicAtmosphereColor(o.enableLighting&&o.dynamicAtmosphereLighting,o.dynamicAtmosphereLightingFromSun),i.isReadyForAtmosphere=i.isReadyForAtmosphere||0<o._surface._tilesToRender.length),i.skyAtmosphereCommand=a.update(e,o),defined(i.skyAtmosphereCommand)&&this.updateDerivedCommands(i.skyAtmosphereCommand)):i.skyAtmosphereCommand=void 0,i.skyBoxCommand=defined(this.skyBox)?this.skyBox.update(e,this._hdr):void 0,t=defined(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0,i.sunDrawCommand=defined(t)?t.drawCommand:void 0,i.sunComputeCommand=defined(t)?t.computeCommand:void 0,i.moonCommand=defined(this.moon)?this.moon.update(e):void 0),o=i.clearGlobeDepth=defined(o)&&o.show&&(!o.depthTestAgainstTerrain||this.mode===SceneMode$1.SCENE2D),(i.useDepthPlane=o&&this.mode===SceneMode$1.SCENE3D&&s.useDepthPlane)&&this._depthPlane.update(e),i.renderTranslucentDepthForPick=!1,i.useWebVR=this._useWebVR&&this.mode!==SceneMode$1.SCENE2D&&!n;s=e.mode!==SceneMode$1.SCENE3D||s.sunVisibleThroughGlobe?void 0:e.occluder;for(var l=e.cullingVolume,c=scratchCullingVolume$1.planes,u=0;u<5;++u)c[u]=l.planes[u];l=scratchCullingVolume$1,i.isSkyAtmosphereVisible=defined(i.skyAtmosphereCommand)&&i.isReadyForAtmosphere,i.isSunVisible=this.isVisible(i.sunDrawCommand,l,s),i.isMoonVisible=this.isVisible(i.moonCommand,l,s),i=this.specularEnvironmentMaps,s=this._specularEnvironmentMapAtlas,!defined(i)||defined(s)&&s.url===i?!defined(i)&&defined(s)&&(s.destroy(),this._specularEnvironmentMapAtlas=void 0):(s=s&&s.destroy(),this._specularEnvironmentMapAtlas=new OctahedralProjectedCubeMap(i)),defined(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e)},Scene.prototype.resolveFramebuffers=function(e){var t=this._context,i=this._frameState,r=this._environmentState,n=this._view,a=n.globeDepth,o=r.useOIT,s=r.useGlobeDepthFramebuffer,l=r.usePostProcess,c=r.originalFramebuffer,u=s?a.framebuffer:void 0,d=n.sceneFramebuffer.getFramebuffer(),h=n.sceneFramebuffer.getIdFramebuffer();r.separatePrimitiveFramebuffer&&a.executeMergeColor(t,e),o&&(e.framebuffer=l?d:c,n.oit.execute(t,e)),l&&(r=s&&!o?u:d,n=this.postProcessStages,r=r.getColorTexture(0),h=h.getColorTexture(0),d=defaultValue(u,d).depthStencilTexture,n.execute(t,r,d,h),n.copy(t,c)),o||l||!s||(e.framebuffer=c,a.executeCopyColor(t,e)),i=i.useLogDepth,this.debugShowGlobeDepth&&s&&getDebugGlobeDepth(this,this.debugShowDepthFrustum-1).executeDebugGlobeDepth(t,e,i),this.debugShowPickDepth&&s&&this._picking.getPickDepth(this,this.debugShowDepthFrustum-1).executeDebugPickDepth(t,e,i)},Scene.prototype.initializeFrame=function(){120==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=getGlobeHeight(this),this._cameraUnderground=isCameraUnderground(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),defined(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};var scratchBackgroundColor=new Color;function render(e){var t=e._frameState,i=e.context,r=i.uniformState,n=e._defaultView;e._view=n,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=renderTilesetPassState;var a=defaultValue(e.backgroundColor,Color.BLACK);e._hdr&&((a=Color.clone(a,scratchBackgroundColor)).red=Math.pow(a.red,e.gamma),a.green=Math.pow(a.green,e.gamma),a.blue=Math.pow(a.blue,e.gamma)),t.backgroundColor=a,e.fog.update(t),r.update(t);var o=e.shadowMap;defined(o)&&o.enabled&&(!defined(e.light)||e.light instanceof SunLight?Cartesian3.negate(r.sunDirectionWC,e._shadowMapCamera.direction):Cartesian3.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(o)),e._computeCommandList.length=0,e._overlayCommandList.length=0,(o=n.viewport).x=0,o.y=0,o.width=i.drawingBufferWidth,o.height=i.drawingBufferHeight,(n=n.passState).framebuffer=void 0,n.blendingEnabled=void 0,n.scissorTest=void 0,n.viewport=BoundingRectangle.clone(o,n.viewport),defined(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(n,a),e.resolveFramebuffers(n),n.framebuffer=void 0,executeOverlayCommands(e,n),defined(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),i.endFrame()}function tryAndCatchError(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function updateMostDetailedRayPicks(e){return e._picking.updateMostDetailedRayPicks(e)}function updatePreloadPass(e){var t=e._frameState;preloadTilesetPassState.camera=t.camera,preloadTilesetPassState.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,preloadTilesetPassState)}function updatePreloadFlightPass(e){var t=e._frameState;t.camera.canPreloadFlight()&&(preloadFlightTilesetPassState.camera=e.preloadFlightCamera,preloadFlightTilesetPassState.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,preloadFlightTilesetPassState))}function updateRequestRenderModeDeferCheckPass(e){e.primitives.updateForPass(e._frameState,requestRenderModeDeferCheckPassState)}Scene.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);var t=this._frameState;t.newFrame=!1,defined(e)||(e=JulianDate.now());var i=this._view.checkForCameraUpdates(this),r=!this.requestRenderMode||this._renderRequested||i||this._logDepthBufferDirty||this._hdrDirty||this.mode===SceneMode$1.MORPHING;!r&&defined(this.maximumRenderTimeChange)&&defined(this._lastRenderTime)&&(i=Math.abs(JulianDate.secondsDifference(this._lastRenderTime,e)),r=r||i>this.maximumRenderTimeChange),r&&(this._lastRenderTime=JulianDate.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1,updateFrameNumber(this,CesiumMath.incrementWrap(t.frameNumber,15e6,1),e),t.newFrame=!0),tryAndCatchError(this,prePassesUpdate),this.primitives.show&&(tryAndCatchError(this,updateMostDetailedRayPicks),tryAndCatchError(this,updatePreloadPass),tryAndCatchError(this,updatePreloadFlightPass),r||tryAndCatchError(this,updateRequestRenderModeDeferCheckPass)),this._postUpdate.raiseEvent(this,e),r&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),tryAndCatchError(this,render)),updateDebugShowFramesPerSecond(this,r),tryAndCatchError(this,postPassesUpdate),callAfterRenderFunctions(this),r&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())},Scene.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},Scene.prototype.requestRender=function(){this._renderRequested=!0},Scene.prototype.clampLineWidth=function(e){return Math.max(ContextLimits.minimumAliasedLineWidth,Math.min(e,ContextLimits.maximumAliasedLineWidth))},Scene.prototype.pick=function(e,t,i){return this._picking.pick(this,e,t,i)},Scene.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)},Scene.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)},Scene.prototype.drillPick=function(e,t,i,r){return this._picking.drillPick(this,e,t,i,r)},Scene.prototype.pickFromRay=function(e,t,i){return this._picking.pickFromRay(this,e,t,i)},Scene.prototype.drillPickFromRay=function(e,t,i,r){return this._picking.drillPickFromRay(this,e,t,i,r)},Scene.prototype.pickFromRayMostDetailed=function(e,t,i){return this._picking.pickFromRayMostDetailed(this,e,t,i)},Scene.prototype.drillPickFromRayMostDetailed=function(e,t,i,r){return this._picking.drillPickFromRayMostDetailed(this,e,t,i,r)},Scene.prototype.sampleHeight=function(e,t,i){return this._picking.sampleHeight(this,e,t,i)},Scene.prototype.clampToHeight=function(e,t,i,r){return this._picking.clampToHeight(this,e,t,i,r)},Scene.prototype.sampleHeightMostDetailed=function(e,t,i){return this._picking.sampleHeightMostDetailed(this,e,t,i)},Scene.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},Scene.prototype.cartesianToCanvasCoordinates=function(e,t){return SceneTransforms.wgs84ToWindowCoordinates(this,e,t)},Scene.prototype.completeMorph=function(){this._transitioner.completeMorph()},Scene.prototype.morphTo2D=function(e){var t=(defined(t=this.globe)?t:this.mapProjection).ellipsoid;e=defaultValue(e,2),this._transitioner.morphTo2D(e,t)},Scene.prototype.morphToColumbusView=function(e){var t=(defined(t=this.globe)?t:this.mapProjection).ellipsoid;e=defaultValue(e,2),this._transitioner.morphToColumbusView(e,t)},Scene.prototype.morphTo3D=function(e){var t=(defined(t=this.globe)?t:this.mapProjection).ellipsoid;e=defaultValue(e,2),this._transitioner.morphTo3D(e,t)},Scene.prototype.isDestroyed=function(){return!1},Scene.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),defined(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(var e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,destroyObject(this)};var SkyAtmosphereCommon="const float Kr = 0.0025;\nconst float Kr4PI = Kr * 4.0 * czm_pi;\nconst float Km = 0.0015;\nconst float Km4PI = Km * 4.0 * czm_pi;\nconst float ESun = 15.0;\nconst float KmESun = Km * ESun;\nconst float KrESun = Kr * ESun;\nconst vec3 InvWavelength = vec3(\n5.60204474633241,\n9.473284437923038,\n19.643802610477206);\nconst float rayleighScaleDepth = 0.25;\nconst int nSamples = 2;\nconst float fSamples = 2.0;\nconst float g = -0.95;\nconst float g2 = g * g;\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\nuniform vec3 u_radiiAndDynamicAtmosphereColor;\nfloat scale(float cosAngle)\n{\nfloat x = 1.0 - cosAngle;\nreturn rayleighScaleDepth  * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\nvec3 getLightDirection(vec3 positionWC)\n{\nfloat lightEnum = u_radiiAndDynamicAtmosphereColor.z;\nvec3 lightDirection =\npositionWC * float(lightEnum == 0.0) +\nczm_lightDirectionWC * float(lightEnum == 1.0) +\nczm_sunDirectionWC * float(lightEnum == 2.0);\nreturn normalize(lightDirection);\n}\nvoid calculateRayScatteringFromSpace(in vec3 positionWC, in vec3 ray, in float innerRadius, in float outerRadius, inout float far, out vec3 start, out float startOffset)\n{\nfloat cameraHeight = length(positionWC);\nfloat B = 2.0 * dot(positionWC, ray);\nfloat C = cameraHeight * cameraHeight - outerRadius * outerRadius;\nfloat det = max(0.0, B * B - 4.0 * C);\nfloat near = 0.5 * (-B - sqrt(det));\nstart = positionWC + ray * near;\nfar -= near;\nfloat startAngle = dot(ray, start) / outerRadius;\nfloat startDepth = exp(-1.0 / rayleighScaleDepth);\nstartOffset = startDepth * scale(startAngle);\n}\nvoid calculateRayScatteringFromGround(in vec3 positionWC, in vec3 ray, in float atmosphereScale, in float innerRadius, out vec3 start, out float startOffset)\n{\nfloat cameraHeight = length(positionWC);\nstart = positionWC;\nfloat height = length(start);\nfloat depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - cameraHeight));\nfloat startAngle = dot(ray, start) / height;\nstartOffset = depth*scale(startAngle);\n}\nczm_raySegment rayEllipsoidIntersection(czm_ray ray, vec3 inverseRadii)\n{\nvec3 o = inverseRadii * (czm_inverseView * vec4(ray.origin, 1.0)).xyz;\nvec3 d = inverseRadii * (czm_inverseView * vec4(ray.direction, 0.0)).xyz;\nfloat a = dot(d, d);\nfloat b = dot(d, o);\nfloat c = dot(o, o) - 1.0;\nfloat discriminant = b * b - a * c;\nif (discriminant < 0.0)\n{\nreturn czm_emptyRaySegment;\n}\ndiscriminant = sqrt(discriminant);\nfloat t1 = (-b - discriminant) / a;\nfloat t2 = (-b + discriminant) / a;\nif (t1 < 0.0 && t2 < 0.0)\n{\nreturn czm_emptyRaySegment;\n}\nif (t1 < 0.0 && t2 >= 0.0)\n{\nt1 = 0.0;\n}\nreturn czm_raySegment(t1, t2);\n}\nvec3 getAdjustedPosition(vec3 positionWC, float innerRadius)\n{\nfloat cameraHeight = czm_eyeHeight + innerRadius;\nreturn normalize(positionWC) * cameraHeight;\n}\nvec3 getTranslucentPosition(vec3 positionWC, vec3 outerPositionWC, float innerRadius, out bool intersectsEllipsoid)\n{\nvec3 directionWC = normalize(outerPositionWC - positionWC);\nvec3 directionEC = czm_viewRotation * directionWC;\nczm_ray viewRay = czm_ray(vec3(0.0), directionEC);\nczm_raySegment raySegment = rayEllipsoidIntersection(viewRay, czm_ellipsoidInverseRadii);\nintersectsEllipsoid = raySegment.start >= 0.0;\nif (intersectsEllipsoid)\n{\nreturn positionWC + raySegment.stop * directionWC;\n}\nreturn getAdjustedPosition(positionWC, innerRadius);\n}\nvoid calculateMieColorAndRayleighColor(vec3 outerPositionWC, out vec3 mieColor, out vec3 rayleighColor)\n{\nfloat outerRadius = u_radiiAndDynamicAtmosphereColor.x;\nfloat innerRadius = u_radiiAndDynamicAtmosphereColor.y;\n#ifdef GLOBE_TRANSLUCENT\nbool intersectsEllipsoid = false;\nvec3 startPositionWC = getTranslucentPosition(czm_viewerPositionWC, outerPositionWC, innerRadius, intersectsEllipsoid);\n#else\nvec3 startPositionWC = getAdjustedPosition(czm_viewerPositionWC, innerRadius);\n#endif\nvec3 lightDirection = getLightDirection(startPositionWC);\nvec3 ray = outerPositionWC - startPositionWC;\nfloat far = length(ray);\nray /= far;\nfloat atmosphereScale = 1.0 / (outerRadius - innerRadius);\nvec3 start;\nfloat startOffset;\n#ifdef SKY_FROM_SPACE\n#ifdef GLOBE_TRANSLUCENT\nif (intersectsEllipsoid)\n{\ncalculateRayScatteringFromGround(startPositionWC, ray, atmosphereScale, innerRadius, start, startOffset);\n}\nelse\n{\ncalculateRayScatteringFromSpace(startPositionWC, ray, innerRadius, outerRadius, far, start, startOffset);\n}\n#else\ncalculateRayScatteringFromSpace(startPositionWC, ray, innerRadius, outerRadius, far, start, startOffset);\n#endif\n#else\ncalculateRayScatteringFromGround(startPositionWC, ray, atmosphereScale, innerRadius, start, startOffset);\n#endif\nfloat sampleLength = far / fSamples;\nfloat scaledLength = sampleLength * atmosphereScale;\nvec3 sampleRay = ray * sampleLength;\nvec3 samplePoint = start + sampleRay * 0.5;\nvec3 frontColor = vec3(0.0, 0.0, 0.0);\nfor (int i = 0; i<nSamples; i++)\n{\nfloat height = length(samplePoint);\nfloat depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - height));\nfloat fLightAngle = dot(lightDirection, samplePoint) / height;\nfloat fCameraAngle = dot(ray, samplePoint) / height;\nfloat fScatter = (startOffset + depth*(scale(fLightAngle) - scale(fCameraAngle)));\nvec3 attenuate = exp(-fScatter * (InvWavelength * Kr4PI + Km4PI));\nfrontColor += attenuate * (depth * scaledLength);\nsamplePoint += sampleRay;\n}\nmieColor = frontColor * KmESun;\nrayleighColor = frontColor * (InvWavelength * KrESun);\nmieColor = min(mieColor, vec3(10000000.0));\nrayleighColor = min(rayleighColor, vec3(10000000.0));\n}\nvec4 calculateFinalColor(vec3 positionWC, vec3 toCamera, vec3 lightDirection, vec3 mieColor, vec3 rayleighColor)\n{\nfloat cosAngle = dot(lightDirection, normalize(toCamera)) / length(toCamera);\nfloat rayleighPhase = 0.75 * (1.0 + cosAngle * cosAngle);\nfloat miePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + cosAngle * cosAngle) / pow(1.0 + g2 - 2.0 * g * cosAngle, 1.5);\nvec3 rgb = rayleighPhase * rayleighColor + miePhase * mieColor;\nconst float exposure = 2.0;\nvec3 rgbExposure = vec3(1.0) - exp(-exposure * rgb);\n#ifndef HDR\nrgb = rgbExposure;\n#endif\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\nrgb = czm_HSBToRGB(hsb);\n#endif\nfloat outerRadius = u_radiiAndDynamicAtmosphereColor.x;\nfloat innerRadius = u_radiiAndDynamicAtmosphereColor.y;\nfloat lightEnum = u_radiiAndDynamicAtmosphereColor.z;\nfloat cameraHeight = czm_eyeHeight + innerRadius;\nfloat atmosphereAlpha = clamp((outerRadius - cameraHeight) / (outerRadius - innerRadius), 0.0, 1.0);\nfloat nightAlpha = (lightEnum != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\natmosphereAlpha *= pow(nightAlpha, 0.5);\nvec4 finalColor = vec4(rgb, mix(clamp(rgbExposure.b, 0.0, 1.0), 1.0, atmosphereAlpha) * smoothstep(0.0, 1.0, czm_morphTime));\nif (mieColor.b > 1.0)\n{\nfloat strength = mieColor.b;\nfloat minDistance = outerRadius;\nfloat maxDistance = outerRadius * 3.0;\nfloat maxStrengthLerp = 1.0 - clamp((maxDistance - cameraHeight) / (maxDistance - minDistance), 0.0, 1.0);\nfloat maxStrength = mix(100.0, 10000.0, maxStrengthLerp);\nstrength = min(strength, maxStrength);\nfloat alpha = 1.0 - (strength / maxStrength);\nfinalColor.a = alpha;\n}\nreturn finalColor;\n}\n",SkyAtmosphereFS="varying vec3 v_outerPositionWC;\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\n#endif\nvoid main (void)\n{\nvec3 toCamera = czm_viewerPositionWC - v_outerPositionWC;\nvec3 lightDirection = getLightDirection(czm_viewerPositionWC);\nvec3 mieColor;\nvec3 rayleighColor;\n#ifdef PER_FRAGMENT_ATMOSPHERE\ncalculateMieColorAndRayleighColor(v_outerPositionWC, mieColor, rayleighColor);\n#else\nmieColor = v_mieColor;\nrayleighColor = v_rayleighColor;\n#endif\ngl_FragColor = calculateFinalColor(czm_viewerPositionWC, toCamera, lightDirection, mieColor, rayleighColor);\n}\n",SkyAtmosphereVS="attribute vec4 position;\nvarying vec3 v_outerPositionWC;\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\n#endif\nvoid main(void)\n{\nvec4 positionWC = czm_model * position;\n#ifndef PER_FRAGMENT_ATMOSPHERE\ncalculateMieColorAndRayleighColor(positionWC.xyz, v_mieColor, v_rayleighColor);\n#endif\nv_outerPositionWC = positionWC.xyz;\ngl_Position = czm_modelViewProjection * position;\n}\n";function SkyAtmosphere(e){e=defaultValue(e,Ellipsoid.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;var t=Cartesian3.multiplyByScalar(e.radii,1.025,new Cartesian3);this._scaleMatrix=Matrix4.fromScale(t),this._modelMatrix=new Matrix4,this._command=new DrawCommand({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new Cartesian3,(t=new Cartesian3).x=1.025*e.maximumRadius,t.y=e.maximumRadius,t.z=0,this._radiiAndDynamicAtmosphereColor=t;var i=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return i._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return i._hueSaturationBrightness.x=i.hueShift,i._hueSaturationBrightness.y=i.saturationShift,i._hueSaturationBrightness.z=i.brightnessShift,i._hueSaturationBrightness}}}Object.defineProperties(SkyAtmosphere.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),SkyAtmosphere.prototype.setDynamicAtmosphereColor=function(e,t){t=e?t?2:1:0,this._radiiAndDynamicAtmosphereColor.z=t};var scratchModelMatrix=new Matrix4;function hasColorCorrection(e){return!(CesiumMath.equalsEpsilon(e.hueShift,0,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(e.saturationShift,0,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(e.brightnessShift,0,CesiumMath.EPSILON7))}SkyAtmosphere.prototype.update=function(e,t){if(this.show){var i=e.mode;if((i===SceneMode$1.SCENE3D||i===SceneMode$1.MORPHING)&&e.passes.render){var r=Matrix4.fromRotationTranslation(e.context.uniformState.inverseViewRotation,Cartesian3.ZERO,scratchModelMatrix),n=Matrix4.multiplyTransformation(r,Axis$1.Y_UP_TO_Z_UP,scratchModelMatrix),a=Matrix4.multiply(this._scaleMatrix,n,scratchModelMatrix);Matrix4.clone(a,this._modelMatrix),i=e.context,r=hasColorCorrection(this),n=e.globeTranslucencyState.translucent,a=this.perFragmentAtmosphere||n||!defined(t)||!t.show,defined((t=this._command).vertexArray)||(o=EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new Cartesian3(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:VertexFormat.POSITION_ONLY})),t.vertexArray=VertexArray.fromGeometry({context:i,geometry:o,attributeLocations:GeometryPipeline.createAttributeLocations(o),bufferUsage:BufferUsage$1.STATIC_DRAW}),t.renderState=RenderState.fromCache({cull:{enabled:!0,face:CullFace$1.FRONT},blending:BlendingState$1.ALPHA_BLEND,depthMask:!1}));var o=r|a<<2|n<<3;return o!==this._flags&&(this._flags=o,o=[],r&&o.push("COLOR_CORRECT"),a&&o.push("PER_FRAGMENT_ATMOSPHERE"),n&&o.push("GLOBE_TRANSLUCENT"),a=new ShaderSource({defines:o.concat("SKY_FROM_SPACE"),sources:[SkyAtmosphereCommon,SkyAtmosphereVS]}),n=new ShaderSource({defines:o.concat("SKY_FROM_SPACE"),sources:[SkyAtmosphereCommon,SkyAtmosphereFS]}),this._spSkyFromSpace=ShaderProgram.fromCache({context:i,vertexShaderSource:a,fragmentShaderSource:n}),a=new ShaderSource({defines:o.concat("SKY_FROM_ATMOSPHERE"),sources:[SkyAtmosphereCommon,SkyAtmosphereVS]}),n=new ShaderSource({defines:o.concat("SKY_FROM_ATMOSPHERE"),sources:[SkyAtmosphereCommon,SkyAtmosphereFS]}),this._spSkyFromAtmosphere=ShaderProgram.fromCache({context:i,vertexShaderSource:a,fragmentShaderSource:n})),e=e.camera.positionWC,Cartesian3.magnitude(e)>this._radiiAndDynamicAtmosphereColor.x?t.shaderProgram=this._spSkyFromSpace:t.shaderProgram=this._spSkyFromAtmosphere,t}}},SkyAtmosphere.prototype.isDestroyed=function(){return!1},SkyAtmosphere.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyFromSpace=this._spSkyFromSpace&&this._spSkyFromSpace.destroy(),this._spSkyFromAtmosphere=this._spSkyFromAtmosphere&&this._spSkyFromAtmosphere.destroy(),destroyObject(this)};var SkyBoxFS="uniform samplerCube u_cubeMap;\nvarying vec3 v_texCoord;\nvoid main()\n{\nvec4 color = textureCube(u_cubeMap, normalize(v_texCoord));\ngl_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}\n",SkyBoxVS="attribute vec3 position;\nvarying vec3 v_texCoord;\nvoid main()\n{\nvec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\ngl_Position = czm_projection * vec4(p, 1.0);\nv_texCoord = position.xyz;\n}\n";function SkyBox(e){this.sources=e.sources,this._sources=void 0,this.show=defaultValue(e.show,!0),this._command=new DrawCommand({modelMatrix:Matrix4.clone(Matrix4.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}function SphereEmitter(e){e=defaultValue(e,1),this._radius=defaultValue(e,1)}function StyleExpression(){}SkyBox.prototype.update=function(e,t){var i=this;if(this.show&&(e.mode===SceneMode$1.SCENE3D||e.mode===SceneMode$1.MORPHING)&&e.passes.render){var r,n,a=e.context;if(this._sources!==this.sources&&(this._sources=this.sources,"string"==typeof(r=this.sources).positiveX?loadCubeMap(a,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new CubeMap({context:a,source:r}))),defined((e=this._command).vertexArray)||(e.uniformMap={u_cubeMap:function(){return i._cubeMap}},r=BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2),vertexFormat:VertexFormat.POSITION_ONLY})),n=this._attributeLocations=GeometryPipeline.createAttributeLocations(r),e.vertexArray=VertexArray.fromGeometry({context:a,geometry:r,attributeLocations:n,bufferUsage:BufferUsage$1.STATIC_DRAW}),e.renderState=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND})),defined(e.shaderProgram)&&this._useHdr===t||(n=new ShaderSource({defines:[t?"HDR":""],sources:[SkyBoxFS]}),e.shaderProgram=ShaderProgram.fromCache({context:a,vertexShaderSource:SkyBoxVS,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._useHdr=t),defined(this._cubeMap))return e}},SkyBox.prototype.isDestroyed=function(){return!1},SkyBox.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),destroyObject(this)},Object.defineProperties(SphereEmitter.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}}),SphereEmitter.prototype.emit=function(e){var t=CesiumMath.randomBetween(0,CesiumMath.TWO_PI),i=CesiumMath.randomBetween(0,CesiumMath.PI),r=CesiumMath.randomBetween(0,this._radius),n=r*Math.cos(t)*Math.sin(i);t=r*Math.sin(t)*Math.sin(i),i=r*Math.cos(i);e.position=Cartesian3.fromElements(n,t,i,e.position),e.velocity=Cartesian3.normalize(e.position,e.velocity)},StyleExpression.prototype.evaluate=function(e,t){DeveloperError.throwInstantiationError()},StyleExpression.prototype.evaluateColor=function(e,t){DeveloperError.throwInstantiationError()},StyleExpression.prototype.getShaderFunction=function(e,t,i,r){DeveloperError.throwInstantiationError()};var SunFS="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color = texture2D(u_texture, v_textureCoordinates);\ngl_FragColor = czm_gammaCorrect(color);\n}\n",SunTextureFS="uniform float u_radiusTS;\nvarying vec2 v_textureCoordinates;\nvec2 rotate(vec2 p, vec2 direction)\n{\nreturn vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\nvec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\nfloat radius = length(rotatedPosition) * lengthScalar;\nfloat burst = 1.0 - smoothstep(0.0, 0.55, radius);\nreturn vec4(burst);\n}\nvoid main()\n{\nfloat lengthScalar = 2.0 / sqrt(2.0);\nvec2 position = v_textureCoordinates - vec2(0.5);\nfloat radius = length(position) * lengthScalar;\nfloat surface = step(radius, u_radiusTS);\nvec4 color = vec4(vec2(1.0), surface + 0.2, surface);\nfloat glow = 1.0 - smoothstep(0.0, 0.55, radius);\ncolor.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\nvec4 burst = vec4(0.0);\nburst += 0.4 * addBurst(position, vec2(0.38942,  0.92106), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.99235,  0.12348), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.31457,  0.94924), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.97931,  0.20239), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar);\ncolor += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\ngl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n",SunVS="attribute vec2 direction;\nuniform float u_size;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 position;\nif (czm_morphTime == 1.0)\n{\nposition = vec4(czm_sunPositionWC, 1.0);\n}\nelse\n{\nposition = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n}\nvec4 positionEC = czm_view * position;\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nvec2 halfSize = vec2(u_size * 0.5);\nhalfSize *= ((direction * 2.0) - 1.0);\ngl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\nv_textureCoordinates = direction;\n}\n";function Sun(){this.show=!0,this._drawCommand=new DrawCommand({primitiveType:PrimitiveType$1.TRIANGLES,boundingVolume:new BoundingSphere,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new BoundingSphere,this._boundingVolume2D=new BoundingSphere,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;var e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(Sun.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var scratchPositionWC=new Cartesian2,scratchLimbWC=new Cartesian2,scratchPositionEC=new Cartesian4,scratchCartesian4$6=new Cartesian4;function TileBoundingVolume(){}function TileCoordinatesImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._tilingScheme=defined(e.tilingScheme)?e.tilingScheme:new GeographicTilingScheme({ellipsoid:e.ellipsoid}),this._color=defaultValue(e.color,Color.YELLOW),this._errorEvent=new Event,this._tileWidth=defaultValue(e.tileWidth,256),this._tileHeight=defaultValue(e.tileHeight,256),this._readyPromise=when.resolve(!0),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0}function TileDiscardPolicy(e){DeveloperError.throwInstantiationError()}Sun.prototype.update=function(e,t,i){if(this.show){var r=e.mode;if(r!==SceneMode$1.SCENE2D&&r!==SceneMode$1.MORPHING&&e.passes.render){var n,a=e.context,o=t.viewport.width,s=t.viewport.height;defined(this._texture)&&o===this._drawingBufferWidth&&s===this._drawingBufferHeight&&!this._glowFactorDirty&&i===this._useHdr||(this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=o,this._drawingBufferHeight=s,this._glowFactorDirty=!1,this._useHdr=i,s=Math.max(o,s),s=Math.pow(2,Math.ceil(Math.log(s)/Math.log(2))-2),s=Math.max(1,s),l=i?a.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,this._texture=new Texture({context:a,width:s,height:s,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:l}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5,l={u_radiusTS:function(){return n._radiusTS}},(n=this)._commands.computeCommand=new ComputeCommand({fragmentShaderSource:SunTextureFS,outputTexture:this._texture,uniformMap:l,persists:!1,owner:this,postExecute:function(){n._commands.computeCommand=void 0}}));var l=this._drawCommand;defined(l.vertexArray)||(h={direction:0},(d=new Uint8Array(8))[0]=0,d[1]=0,d[2]=255,d[3]=0,d[4]=255,d[5]=255,d[6]=0,d[7]=255,c=Buffer$1.createVertexBuffer({context:a,typedArray:d,usage:BufferUsage$1.STATIC_DRAW}),u=[{index:h.direction,vertexBuffer:c,componentsPerAttribute:2,normalize:!0,componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE}],d=Buffer$1.createIndexBuffer({context:a,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT}),l.vertexArray=new VertexArray({context:a,attributes:u,indexBuffer:d}),l.shaderProgram=ShaderProgram.fromCache({context:a,vertexShaderSource:SunVS,fragmentShaderSource:SunFS,attributeLocations:h}),l.renderState=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND}),l.uniformMap=this._uniformMap);var c=a.uniformState.sunPositionWC,u=a.uniformState.sunPositionColumbusView,d=this._boundingVolume,h=this._boundingVolume2D;return Cartesian3.clone(c,d.center),h.center.x=u.z,h.center.y=u.x,h.center.z=u.y,d.radius=CesiumMath.SOLAR_RADIUS+CesiumMath.SOLAR_RADIUS*this._glowLengthTS,h.radius=d.radius,r===SceneMode$1.SCENE3D?BoundingSphere.clone(d,l.boundingVolume):r===SceneMode$1.COLUMBUS_VIEW&&BoundingSphere.clone(h,l.boundingVolume),c=SceneTransforms.computeActualWgs84Position(e,c,scratchCartesian4$6),c=Cartesian3.magnitude(Cartesian3.subtract(c,e.camera.position,scratchCartesian4$6)),e=a.uniformState.projection,(a=scratchPositionEC).x=0,a.y=0,a.z=-c,a.w=1,c=Matrix4.multiplyByVector(e,a,scratchCartesian4$6),c=SceneTransforms.clipToGLWindowCoordinates(t.viewport,c,scratchPositionWC),a.x=CesiumMath.SOLAR_RADIUS,a=Matrix4.multiplyByVector(e,a,scratchCartesian4$6),a=SceneTransforms.clipToGLWindowCoordinates(t.viewport,a,scratchLimbWC),this._size=Cartesian2.magnitude(Cartesian2.subtract(a,c,scratchCartesian4$6)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands}}},Sun.prototype.isDestroyed=function(){return!1},Sun.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),destroyObject(this)},TileBoundingVolume.prototype.boundingVolume=void 0,TileBoundingVolume.prototype.boundingSphere=void 0,TileBoundingVolume.prototype.distanceToCamera=function(e){DeveloperError.throwInstantiationError()},TileBoundingVolume.prototype.intersectPlane=function(e){DeveloperError.throwInstantiationError()},TileBoundingVolume.prototype.createDebugVolume=function(e){DeveloperError.throwInstantiationError()},Object.defineProperties(TileCoordinatesImageryProvider.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),TileCoordinatesImageryProvider.prototype.getTileCredits=function(e,t,i){},TileCoordinatesImageryProvider.prototype.requestImage=function(e,t,i,r){var n=document.createElement("canvas");n.width=256,n.height=256;var a=n.getContext("2d"),o=this._color.toCssColorString();return a.strokeStyle=o,a.lineWidth=2,a.strokeRect(1,1,255,255),a.font="bold 25px Arial",a.textAlign="center",a.fillStyle=o,a.fillText("L: "+i,124,86),a.fillText("X: "+e,124,136),a.fillText("Y: "+t,124,186),n},TileCoordinatesImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},TileDiscardPolicy.prototype.isReady=DeveloperError.throwInstantiationError,TileDiscardPolicy.prototype.shouldDiscardImage=DeveloperError.throwInstantiationError;var TileState={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},TileState$1=Object.freeze(TileState);function TimeDynamicPointCloud(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.show=defaultValue(e.show,!0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this.shadows=defaultValue(e.shadows,ShadowMode$1.ENABLED),this.maximumMemoryUsage=defaultValue(e.maximumMemoryUsage,256),this.shading=new PointCloudShading(e.shading),this.style=e.style,this.frameFailed=new Event,this.frameChanged=new Event,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new PointCloudEyeDomeLighting,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._readyPromise=when.defer(),this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=arrayFill(new Array(5),0),this._runningAverage=0}function getFragmentShaderLoaded$1(e){return"uniform vec4 czm_pickColor;\n"+e}function getUniformMapLoaded$1(e){return function(t){return combine(t,{czm_pickColor:function(){return e._pickId.color}})}}function getPickIdLoaded$1(){return"czm_pickColor"}Object.defineProperties(TimeDynamicPointCloud.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ClippingPlaneCollection.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(defined(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}},readyPromise:{get:function(){return this._readyPromise.promise}}}),TimeDynamicPointCloud.prototype.makeStyleDirty=function(){this._styleDirty=!0},TimeDynamicPointCloud.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};var scratchDate$1=new JulianDate;function getClockMultiplier(e){e=(t=e._clock).canAnimate&&t.shouldAnimate;var t=t.multiplier;return e?t:0}function getIntervalIndex(e,t){return e._intervals.indexOf(t.start)}function getNextInterval(e,t){var i=e._intervals,r=e._clock,n=getClockMultiplier(e);if(0!==n){var a=e._getAverageLoadTime();a=JulianDate.addSeconds(r.currentTime,a*n,scratchDate$1);return(a=i.indexOf(a))===getIntervalIndex(e,t)&&(0<=n?++a:--a),i.get(a)}}function getCurrentInterval(e){var t=e._intervals;e=e._clock.currentTime,e=t.indexOf(e);return t.get(e)}function reachedInterval(e,t,i){var r=getClockMultiplier(e);t=getIntervalIndex(e,t),i=getIntervalIndex(e,i);return 0<=r?i<=t:t<=i}function handleFrameFailure(e,t){return function(i){i=defined(i.message)?i.message:i.toString(),0<e.frameFailed.numberOfListeners?e.frameFailed.raiseEvent({uri:t,message:i}):(console.log("A frame failed to load: "+t),console.log("Error: "+i))}}function requestFrame(e,t,i){var r,n=getIntervalIndex(e,t),a=e._frames,o=a[n];return defined(o)||(r=defined(r=t.data.transform)?Matrix4.fromArray(r):void 0,t=t.data.uri,o={pointCloud:void 0,transform:r,timestamp:getTimestamp$1(),sequential:!0,ready:!1,touchedFrameNumber:i.frameNumber},a[n]=o,Resource.fetchArrayBuffer({url:t}).then((function(t){return o.pointCloud=new PointCloud({arrayBuffer:t,cull:!0,fragmentShaderLoaded:getFragmentShaderLoaded$1,uniformMapLoaded:getUniformMapLoaded$1(e),pickIdLoaded:getPickIdLoaded$1}),o.pointCloud.readyPromise})).otherwise(handleFrameFailure(e,t))),o}function updateAverageLoadTime(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function prepareFrame(e,t,i,r){t.touchedFrameNumber<r.frameNumber-1&&(t.sequential=!1);var n,a,o=t.pointCloud;defined(o)&&!t.ready&&(a=(n=r.commandList).length,renderFrame(e,t,i,r),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,n.length=a,t.sequential&&updateAverageLoadTime(e,(getTimestamp$1()-t.timestamp)/1e3))),t.touchedFrameNumber=r.frameNumber}var scratchModelMatrix$1=new Matrix4;function getGeometricError$1(e,t){return defined(e=e.shading)&&defined(e.baseResolution)?e.baseResolution:defined(t.boundingSphere)?CesiumMath.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function getMaximumAttenuation(e){return defined(e=e.shading)&&defined(e.maximumAttenuation)?e.maximumAttenuation:10}var defaultShading$1=new PointCloudShading;function renderFrame(e,t,i,r){var n=defaultValue(e.shading,defaultShading$1),a=t.pointCloud,o=defaultValue(t.transform,Matrix4.IDENTITY);a.modelMatrix=Matrix4.multiplyTransformation(e.modelMatrix,o,scratchModelMatrix$1),a.style=e.style,a.time=i.timeSinceLoad,a.shadows=e.shadows,a.clippingPlanes=e._clippingPlanes,a.isClipped=i.isClipped,a.attenuation=n.attenuation,a.backFaceCulling=n.backFaceCulling,a.normalShading=n.normalShading,a.geometricError=getGeometricError$1(e,a),a.geometricErrorScale=n.geometricErrorScale,a.maximumAttenuation=getMaximumAttenuation(e),a.update(r),t.touchedFrameNumber=r.frameNumber}function loadFrame(e,t,i,r){prepareFrame(e,requestFrame(e,t,r),i,r)}function getUnloadCondition(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function unloadFrames(e,t){for(var i=e._frames,r=i.length,n=0;n<r;++n){var a,o=i[n];defined(o)&&(defined(t)&&!t(o)||(a=o.pointCloud,o.ready&&(e._totalMemoryUsageInBytes-=a.geometryByteLength),defined(a)&&a.destroy(),o===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),i[n]=void 0))}}function getFrame(e,t){if(t=getIntervalIndex(e,t),defined(t=e._frames[t])&&t.ready)return t}function updateInterval(e,t,i,r,n){return defined(i)&&(i.ready||(loadFrame(e,t,r,n),i.ready))}function getNearestReadyInterval(e,t,i,r,n){var a,o,s=e._intervals,l=e._frames,c=(i=getIntervalIndex(e,i),getIntervalIndex(e,t));if(c<=i){for(a=i;c<=a;--a)if(updateInterval(e,o=s.get(a),l[a],r,n))return o}else for(a=i;a<=c;++a)if(updateInterval(e,o=s.get(a),l[a],r,n))return o;return t}function setFramesDirty(e,t,i){for(var r=e._frames,n=r.length,a=0;a<n;++a){var o=r[a];defined(o)&&defined(o.pointCloud)&&(o.pointCloud.clippingPlanesDirty=t,o.pointCloud.styleDirty=i)}}var updateState={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};TimeDynamicPointCloud.prototype.update=function(e){var t,i,r,n,a,o,s,l,c,u,d;e.mode!==SceneMode$1.MORPHING&&this.show&&(defined(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),defined(this._loadTimestamp)||(this._loadTimestamp=JulianDate.clone(e.time)),s=Math.max(1e3*JulianDate.secondsDifference(e.time,this._loadTimestamp),0),a=0,u=!1,(l=defined(n=this._clippingPlanes)&&n.enabled)&&(n.update(e),a=n.clippingPlanesState),this._clippingPlanesState!==a&&(this._clippingPlanesState=a,u=!0),o=this._styleDirty,this._styleDirty=!1,(u||o)&&setFramesDirty(this,u,o),updateState.timeSinceLoad=s,updateState.isClipped=l,t=this.shading,i=this._pointCloudEyeDomeLighting,r=(d=e.commandList).length,n=this._previousInterval,a=this._nextInterval,defined(u=getCurrentInterval(this))&&(o=!1,l=0===(s=getClockMultiplier(this)),s!==this._clockMultiplier&&(o=!0,this._clockMultiplier=s),defined(n)&&!l||(n=u),defined(a)&&!o&&!reachedInterval(this,u,a)||(a=getNextInterval(this,u)),defined(u=getFrame(this,n=getNearestReadyInterval(this,n,u,updateState,e)))||(loadFrame(this,n,updateState,e),u=this._lastRenderedFrame),defined(u)&&renderFrame(this,u,updateState,e),defined(a)&&loadFrame(this,a,updateState,e),c=this,defined(u)&&!defined(this._lastRenderedFrame)&&e.afterRender.push((function(){c._readyPromise.resolve(c)})),defined(u)&&u!==this._lastRenderedFrame&&0<c.frameChanged.numberOfListeners&&e.afterRender.push((function(){c.frameChanged.raiseEvent(c)})),this._previousInterval=n,this._nextInterval=a,this._lastRenderedFrame=u,u=this._totalMemoryUsageInBytes,1024*this.maximumMemoryUsage*1024<u&&unloadFrames(this,getUnloadCondition(e)),d=d.length-r,defined(t)&&t.attenuation&&t.eyeDomeLighting&&0<d&&i.update(e,r,t,this.boundingSphere)))},TimeDynamicPointCloud.prototype.isDestroyed=function(){return!1},TimeDynamicPointCloud.prototype.destroy=function(){return unloadFrames(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),destroyObject(this)};var ViewportQuadFS="varying vec2 v_textureCoordinates;\nvoid main()\n{\nczm_materialInput materialInput;\nmaterialInput.s = v_textureCoordinates.s;\nmaterialInput.st = v_textureCoordinates;\nmaterialInput.str = vec3(v_textureCoordinates, 0.0);\nmaterialInput.normalEC = vec3(0.0, 0.0, -1.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}\n";function ViewportQuad(e,t){this.show=!0,defined(e)||(e=new BoundingRectangle),this.rectangle=BoundingRectangle.clone(e),defined(t)||(t=Material.fromType(Material.ColorType,{color:new Color(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}function computeFlyToLocationForRectangle(e,t){var i=t.terrainProvider,r=t.mapProjection,n=r.ellipsoid,a=t.camera.getRectangleCameraCoordinates(e),o=t.mode===SceneMode$1.SCENE3D?n.cartesianToCartographic(a):r.unproject(a);return defined(i)?i.readyPromise.then((function(){if(!defined(i.availability)||t.mode===SceneMode$1.SCENE2D)return o;var r=[Rectangle.center(e),Rectangle.southeast(e),Rectangle.southwest(e),Rectangle.northeast(e),Rectangle.northwest(e)];return computeFlyToLocationForRectangle._sampleTerrainMostDetailed(i,r).then((function(e){var t=e.reduce((function(e,t){return Math.max(t.height,e)}),-Number.MAX_VALUE);return(e=o).height+=t,e}))})):when.resolve(o)}function createOsmBuildings(e){var t=new Cesium3DTileset(e=combine(e,{url:IonResource.fromAssetId(96188)})),i=e.style;return defined(i)||(i=new Cesium3DTileStyle({color:"Boolean(${feature['cesium#color']}) ? color(${feature['cesium#color']}) : "+defaultValue(e.defaultColor,Color.WHITE).toCssColorString()})),t.style=i,t}function createTangentSpaceDebugPrimitive(e){var t=[],i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).geometry;defined(i.attributes)&&defined(i.primitiveType)||(i=i.constructor.createGeometry(i));var r=i.attributes,n=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY));e=defaultValue(e.length,1e4);if(defined(r.normal)&&t.push(new GeometryInstance({geometry:GeometryPipeline.createLineSegmentsForVectors(i,"normal",e),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)},modelMatrix:n})),defined(r.tangent)&&t.push(new GeometryInstance({geometry:GeometryPipeline.createLineSegmentsForVectors(i,"tangent",e),attributes:{color:new ColorGeometryInstanceAttribute(0,1,0,1)},modelMatrix:n})),defined(r.bitangent)&&t.push(new GeometryInstance({geometry:GeometryPipeline.createLineSegmentsForVectors(i,"bitangent",e),attributes:{color:new ColorGeometryInstanceAttribute(0,0,1,1)},modelMatrix:n})),0<t.length)return new Primitive({asynchronous:!1,geometryInstances:t,appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1})})}function createWorldImagery(e){return e=defaultValue(e,defaultValue.EMPTY_OBJECT),new IonImageryProvider({assetId:defaultValue(e.style,IonWorldImageryStyle$1.AERIAL)})}ViewportQuad.prototype.update=function(e){var t,i;this.show&&(defined(i=this._rs)&&BoundingRectangle.equals(i.viewport,this.rectangle)||(this._rs=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render&&(t=e.context,this._material===this.material&&defined(this._overlayCommand)||(this._material=this.material,defined(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy(),i=new ShaderSource({sources:[this._material.shaderSource,ViewportQuadFS]}),this._overlayCommand=t.createViewportQuadCommand(i,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Pass$1.OVERLAY),this._material.update(t),this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)))},ViewportQuad.prototype.isDestroyed=function(){return!1},ViewportQuad.prototype.destroy=function(){return defined(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),destroyObject(this)},computeFlyToLocationForRectangle._sampleTerrainMostDetailed=sampleTerrainMostDetailed;var tmp$6={},uEj,vEj,wEj,xEj,yEj,zEj,eGj_unstuff,eGj_unstuffLUT,eGj_unstuff2,eGj_unstuffLUT2,eGj_originalUnstuff,eGj_originalUnstuff2,fGj,gGj,xMj,qEj,rEj,sEj,tEj;uEj={defaultNoDataValue:-34027999387901484e22,decode:function(e,t){var i=(t=t||{}).encodedMaskData||null===t.encodedMaskData,r=yEj(e,t.inputOffset||0,i);e=null!==t.noDataValue?t.noDataValue:uEj.defaultNoDataValue,i=vEj(r,t.pixelType||Float32Array,t.encodedMaskData,e,t.returnMask),e={width:r.width,height:r.height,pixelData:i.resultPixels,minValue:i.minValue,maxValue:r.pixels.maxValue,noDataValue:e};return i.resultMask&&(e.maskData=i.resultMask),t.returnEncodedMask&&r.mask&&(e.encodedMaskData=r.mask.bitset?r.mask.bitset:null),t.returnFileInfo&&(e.fileInfo=wEj(r),t.computeUsedBitDepths&&(e.fileInfo.bitDepths=xEj(r))),e}},vEj=function(e,t,i,r,n){var a,o,s,l=0,c=e.pixels.numBlocksX,u=e.pixels.numBlocksY,d=Math.floor(e.width/c),h=Math.floor(e.height/u),p=2*e.maxZError,f=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),o=new t(e.width*e.height),n&&i&&(s=new Uint8Array(e.width*e.height));for(var m,g,y=new Float32Array(d*h),_=0;_<=u;_++){var v=_!==u?h:e.height%u;if(0!==v)for(var C=0;C<=c;C++){var x=C!==c?d:e.width%c;if(0!==x){var b,S,T,E,w=_*e.width*h+C*d,A=e.width-x,P=e.pixels.blocks[l];if(P.encoding<2?(b=0===P.encoding?P.rawData:(zEj(P.stuffedData,P.bitsPerPixel,P.numValidPixels,P.offset,p,y,e.pixels.maxValue),y),S=0):T=2===P.encoding?0:P.offset,i)for(g=0;g<v;g++){for(7&w&&(E=i[w>>3],E<<=7&w),m=0;m<x;m++)7&w||(E=i[w>>3]),128&E?(s&&(s[w]=1),f=(a=P.encoding<2?b[S++]:T)<f?a:f,o[w++]=a):(s&&(s[w]=0),o[w++]=r),E<<=1;w+=A}else if(P.encoding<2)for(g=0;g<v;g++){for(m=0;m<x;m++)f=(a=b[S++])<f?a:f,o[w++]=a;w+=A}else for(f=T<f?T:f,g=0;g<v;g++){for(m=0;m<x;m++)o[w++]=T;w+=A}if(1===P.encoding&&S!==P.numValidPixels)throw"Block and Mask do not match";l++}}}return{resultPixels:o,resultMask:s,minValue:f}},wEj=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},xEj=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},r=0;r<t;r++){var n=e.pixels.blocks[r];0===n.encoding?i.float32=!0:1===n.encoding?i[n.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},yEj=function(e,t,i){var r={},n=new Uint8Array(e,t,10);if(r.fileIdentifierString=String.fromCharCode.apply(null,n),"CntZImage"!==r.fileIdentifierString.trim())throw"Unexpected file identifier string: "+r.fileIdentifierString;t+=10;var a=new DataView(e,t,24);if(r.fileVersion=a.getInt32(0,!0),r.imageType=a.getInt32(4,!0),r.height=a.getUint32(8,!0),r.width=a.getUint32(12,!0),r.maxZError=a.getFloat64(16,!0),t+=24,!i)if(a=new DataView(e,t,16),r.mask={},r.mask.numBlocksY=a.getUint32(0,!0),r.mask.numBlocksX=a.getUint32(4,!0),r.mask.numBytes=a.getUint32(8,!0),r.mask.maxValue=a.getFloat32(12,!0),t+=16,0<r.mask.numBytes){var o=new Uint8Array(Math.ceil(r.width*r.height/8)),s=(a=new DataView(e,t,r.mask.numBytes)).getInt16(0,!0),l=2,c=0;do{if(0<s)for(;s--;)o[c++]=a.getUint8(l++);else{var u=a.getUint8(l++);for(s=-s;s--;)o[c++]=u}s=a.getInt16(l,!0),l+=2}while(l<r.mask.numBytes);if(-32768!==s||c<o.length)throw"Unexpected end of mask RLE encoding";r.mask.bitset=o,t+=r.mask.numBytes}else 0==(r.mask.numBytes|r.mask.numBlocksY|r.mask.maxValue)&&(r.mask.bitset=new Uint8Array(Math.ceil(r.width*r.height/8)));a=new DataView(e,t,16),r.pixels={},r.pixels.numBlocksY=a.getUint32(0,!0),r.pixels.numBlocksX=a.getUint32(4,!0),r.pixels.numBytes=a.getUint32(8,!0),r.pixels.maxValue=a.getFloat32(12,!0),t+=16;n=r.pixels.numBlocksX,i=r.pixels.numBlocksY;var d=n+(0<r.width%n?1:0),h=i+(0<r.height%i?1:0);r.pixels.blocks=new Array(d*h);for(var p=0,f=0;f<h;f++)for(var m=0;m<d;m++){var g=0,y=e.byteLength-t;a=new DataView(e,t,Math.min(10,y));var _={};r.pixels.blocks[p++]=_;var v;y=a.getUint8(0);if(g++,_.encoding=63&y,3<_.encoding)throw"Invalid block encoding ("+_.encoding+")";if(2!==_.encoding){if(0!==y&&2!==y){if(y>>=6,2===(_.offsetType=y))_.offset=a.getInt8(1),g++;else if(1===y)_.offset=a.getInt16(1,!0),g+=2;else{if(0!==y)throw"Invalid block offset type";_.offset=a.getFloat32(1,!0),g+=4}if(1===_.encoding)if(y=a.getUint8(g),g++,_.bitsPerPixel=63&y,y>>=6,2===(_.numValidPixelsType=y))_.numValidPixels=a.getUint8(g),g++;else if(1===y)_.numValidPixels=a.getUint16(g,!0),g+=2;else{if(0!==y)throw"Invalid valid pixel count type";_.numValidPixels=a.getUint32(g,!0),g+=4}}if(t+=g,3!==_.encoding)if(0===_.encoding){var C=(r.pixels.numBytes-1)/4;if(C!==Math.floor(C))throw"uncompressed block has invalid length";v=new ArrayBuffer(4*C),new Uint8Array(v).set(new Uint8Array(e,t,4*C));var x=new Float32Array(v);_.rawData=x,t+=4*C}else 1===_.encoding&&(x=Math.ceil(_.numValidPixels*_.bitsPerPixel/8),C=Math.ceil(x/4),v=new ArrayBuffer(4*C),new Uint8Array(v).set(new Uint8Array(e,t,x)),_.stuffedData=new Uint32Array(v),t+=x)}else t++}return r.eofOffset=t,r},zEj=function(e,t,i,r,n,a,o){var s,l,c,u,d=(1<<t)-1,h=0,p=0,f=Math.ceil((o-r)/n),m=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*m,s=0;s<i;s++)0===p&&(u=e[h++],p=32),t<=p?(c=u>>>p-t&d,p-=t):(c=(u&d)<<(l=t-p)&d,c+=(u=e[h++])>>>(p=32-l)),a[s]=c<f?r+c*n:o;return a},qEj=uEj,eGj_unstuff=function(e,t,i,r,n,a,o,s){var l,c,u,d,h,p=(1<<i)-1,f=0,m=0,g=4*e.length-Math.ceil(i*r/8);if(e[e.length-1]<<=8*g,n)for(l=0;l<r;l++)0===m&&(u=e[f++],m=32),i<=m?(c=u>>>m-i&p,m-=i):(c=(u&p)<<(d=i-m)&p,c+=(u=e[f++])>>>(m=32-d)),t[l]=n[c];else for(h=Math.ceil((s-a)/o),l=0;l<r;l++)0===m&&(u=e[f++],m=32),i<=m?(c=u>>>m-i&p,m-=i):(c=(u&p)<<(d=i-m)&p,c+=(u=e[f++])>>>(m=32-d)),t[l]=c<h?a+c*o:s},eGj_unstuffLUT=function(e,t,i,r,n,a){var o,s,l=(1<<t)-1,c=0,u=0,d=0,h=0,p=[],f=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*f;var m=Math.ceil((a-r)/n);for(u=0;u<i;u++)0===d&&(s=e[c++],d=32),t<=d?(h=s>>>d-t&l,d-=t):(h=(s&l)<<(o=t-d)&l,h+=(s=e[c++])>>>(d=32-o)),p[u]=h<m?r+h*n:a;return p.unshift(r),p},eGj_unstuff2=function(e,t,i,r,n,a,o,s){var l,c,u,d=(1<<i)-1,h=0,p=0,f=0;if(n)for(g=0;g<r;g++)0===p&&(c=e[h++],p=32,f=0),i<=p?(l=c>>>f&d,p-=i,f+=i):(l=c>>>f&d,p=32-(u=i-p),l|=((c=e[h++])&(1<<u)-1)<<i-u,f=u),t[g]=n[l];else for(var m=Math.ceil((s-a)/o),g=0;g<r;g++)0===p&&(c=e[h++],p=32,f=0),i<=p?(l=c>>>f&d,p-=i,f+=i):(l=c>>>f&d,p=32-(u=i-p),l|=((c=e[h++])&(1<<u)-1)<<i-u,f=u),t[g]=l<m?a+l*o:s;return t},eGj_unstuffLUT2=function(e,t,i,r,n,a){var o,s,l=(1<<t)-1,c=0,u=0,d=0,h=0,p=0,f=[],m=Math.ceil((a-r)/n);for(u=0;u<i;u++)0===d&&(s=e[c++],d=32,p=0),t<=d?(h=s>>>p&l,d-=t,p+=t):(h=s>>>p&l,d=32-(o=t-d),h|=((s=e[c++])&(1<<o)-1)<<t-o,p=o),f[u]=h<m?r+h*n:a;return f.unshift(r),f},eGj_originalUnstuff=function(e,t,i,r){var n,a,o,s,l=(1<<i)-1,c=0,u=0,d=4*e.length-Math.ceil(i*r/8);for(e[e.length-1]<<=8*d,n=0;n<r;n++)0===u&&(o=e[c++],u=32),i<=u?(a=o>>>u-i&l,u-=i):(a=(o&l)<<(s=i-u)&l,a+=(o=e[c++])>>>(u=32-s)),t[n]=a;return t},eGj_originalUnstuff2=function(e,t,i,r){for(var n,a,o,s=(1<<i)-1,l=0,c=0,u=0,d=0;d<r;d++)0===c&&(a=e[l++],c=32,u=0),i<=c?(n=a>>>u&s,c-=i,u+=i):(n=a>>>u&s,c=32-(o=i-c),n|=((a=e[l++])&(1<<o)-1)<<i-o,u=o),t[d]=n;return t},fGj={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,r=e.length,n=Math.floor(r/2),a=0;n;){var o=359<=n?359:n;for(n-=o;t+=e[a++]<<8,i+=t+=e[a++],--o;);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&r&&(i+=t+=e[a]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,r=new Uint8Array(e,i,6),n={};if(n.fileIdentifierString=String.fromCharCode.apply(null,r),0!==n.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+n.fileIdentifierString;i+=6;var a=new DataView(e,i,8);r=a.getInt32(0,!0);if(i+=4,3<=(n.fileVersion=r)&&(n.checksum=a.getUint32(4,!0),i+=4),a=new DataView(e,i,12),n.height=a.getUint32(0,!0),n.width=a.getUint32(4,!0),i+=8,4<=r?(n.numDims=a.getUint32(8,!0),i+=4):n.numDims=1,a=new DataView(e,i,40),n.numValidPixel=a.getUint32(0,!0),n.microBlockSize=a.getInt32(4,!0),n.blobSize=a.getInt32(8,!0),n.imageType=a.getInt32(12,!0),n.maxZError=a.getFloat64(16,!0),n.zMin=a.getFloat64(24,!0),n.zMax=a.getFloat64(32,!0),i+=40,t.headerInfo=n,t.ptr=i,3<=r&&(r=4<=r?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-r,n.blobSize-14))!==n.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,r=this.getDataTypeArray(i.imageType),n=i.numDims*this.getDataTypeSize(i.imageType),a=this.readSubArray(e,t.ptr,r,n),o=this.readSubArray(e,t.ptr+n,r,n);t.ptr+=2*n;for(var s=!0,l=0;l<i.numDims;l++)if(a[l]!==o[l]){s=!1;break}return i.minValues=a,i.maxValues=o,s},readSubArray:function(e,t,i,r){var n=i===Uint8Array?new Uint8Array(e,t,r):(n=new ArrayBuffer(r),new Uint8Array(n).set(new Uint8Array(e,t,r)),new i(n));return n},readMask:function(e,t){var i,r,n=t.ptr,a=(o=t.headerInfo).width*o.height,o=o.numValidPixel,s=new DataView(e,n,4),l={};if(l.numBytes=s.getUint32(0,!0),n+=4,(0===o||a===o)&&0!==l.numBytes)throw"invalid mask";if(0===o)i=new Uint8Array(Math.ceil(a/8)),l.bitset=i,r=new Uint8Array(a),t.pixels.resultMask=r,n+=l.numBytes;else if(0<l.numBytes){i=new Uint8Array(Math.ceil(a/8));var c,u=(s=new DataView(e,n,l.numBytes)).getInt16(0,!0),d=2,h=0;do{if(0<u)for(;u--;)i[h++]=s.getUint8(d++);else for(c=s.getUint8(d++),u=-u;u--;)i[h++]=c;u=s.getInt16(d,!0),d+=2}while(d<l.numBytes);if(-32768!==u||h<i.length)throw"Unexpected end of mask RLE encoding";r=new Uint8Array(a);var p=0,f=0;for(f=0;f<a;f++)7&f?(p=i[f>>3],p<<=7&f):p=i[f>>3],128&p&&(r[f]=1);t.pixels.resultMask=r,l.bitset=i,n+=l.numBytes}return t.ptr=n,t.mask=l,!0},readDataOneSweep:function(e,t,i){var r=t.ptr,n=(s=t.headerInfo).numDims,a=s.width*s.height,o=s.imageType,s=s.numValidPixel*fGj.getDataTypeSize(o)*n,l=t.pixels.resultMask,c=i===Uint8Array?new Uint8Array(e,r,s):(o=new ArrayBuffer(s),new Uint8Array(o).set(new Uint8Array(e,r,s)),new i(o));if(c.length===a*n)t.pixels.resultPixels=c;else{t.pixels.resultPixels=new i(a*n);var u,d=0,h=0,p=0;if(1<n)for(p=0;p<n;p++)for(u=p*a,h=0;h<a;h++)l[h]&&(t.pixels.resultPixels[u+h]=c[d++]);else for(h=0;h<a;h++)l[h]&&(t.pixels.resultPixels[h]=c[d++])}return r+=s,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,r=new DataView(e,t.ptr,16);if(t.ptr+=16,r.getInt32(0,!0)<2)throw"unsupported Huffman version";var n=r.getInt32(4,!0),a=r.getInt32(8,!0),o=r.getInt32(12,!0);if(o<=a)return!1;var s=new Uint32Array(o-a);fGj.decodeBits(e,t,s);for(var l,c,u,d=[],h=a;h<o;h++)d[l=h-(h<n?0:n)]={first:s[h-a],second:null};var p=e.byteLength-t.ptr;r=Math.ceil(p/4),r=new ArrayBuffer(4*r);new Uint8Array(r).set(new Uint8Array(e,t.ptr,p));var f=new Uint32Array(r),m=0,g=0,y=f[0];for(h=a;h<o;h++)0<(u=d[l=h-(h<n?0:n)].first)&&(d[l].second=y<<m>>>32-u,u<=32-m?32===(m+=u)&&(m=0,y=f[++g]):(m+=u-32,y=f[++g],d[l].second|=y>>>32-m));var _,v=0,C=new gGj;for(h=0;h<d.length;h++)void 0!==d[h]&&(v=Math.max(v,d[h].first));_=i<=v?i:v,30<=v&&console.log("WARning, large NUM LUT BITS IS "+v);var x,b,S,T,E,w=[];for(h=a;h<o;h++)if(0<(u=d[l=h-(h<n?0:n)].first))if(x=[u,l],u<=_)for(b=d[l].second<<_-u,S=1<<_-u,c=0;c<S;c++)w[b|c]=x;else for(b=d[l].second,E=C,T=u-1;0<=T;T--)E=b>>>T&1?(E.right||(E.right=new gGj),E.right):(E.left||(E.left=new gGj),E.left),0!==T||E.val||(E.val=x[1]);return{decodeLut:w,numBitsLUTQick:_,numBitsLUT:v,tree:C,stuffedData:f,srcPtr:g,bitPos:m}},readHuffman:function(e,t,i){var r,n,a,o,s,l,c,u,d,h=t.headerInfo,p=h.numDims,f=t.headerInfo.height,m=t.headerInfo.width,g=m*f,y=(e=this.readHuffmanTree(e,t)).decodeLut,_=e.tree,v=e.stuffedData,C=e.srcPtr,x=e.bitPos,b=e.numBitsLUTQick,S=e.numBitsLUT,T=0===t.headerInfo.imageType?128:0,E=t.pixels.resultMask,w=0;0<x&&(C++,x=0);for(var A=v[C],P=1===t.encodeMode,D=new i(g*p),M=D,I=0;I<h.numDims;I++){if(1<p&&(M=new i(D.buffer,g*I,g),w=0),t.headerInfo.numValidPixel===m*f)for(l=u=0;l<f;l++)for(c=0;c<m;c++,u++){if(n=0,s=o=A<<x>>>32-b,32-x<b&&(s=o|=v[C+1]>>>64-x-b),y[s])n=y[s][1],x+=y[s][0];else for(s=o=A<<x>>>32-S,32-x<S&&(s=o|=v[C+1]>>>64-x-S),r=_,d=0;d<S;d++)if(!(r=o>>>S-d-1&1?r.right:r.left).left&&!r.right){n=r.val,x=x+d+1;break}32<=x&&(x-=32,A=v[++C]),a=n-T,P?(a+=!(0<c)&&0<l?M[u-m]:w,a&=255,w=M[u]=a):M[u]=a}else for(l=u=0;l<f;l++)for(c=0;c<m;c++,u++)if(E[u]){if(n=0,s=o=A<<x>>>32-b,32-x<b&&(s=o|=v[C+1]>>>64-x-b),y[s])n=y[s][1],x+=y[s][0];else for(s=o=A<<x>>>32-S,32-x<S&&(s=o|=v[C+1]>>>64-x-S),r=_,d=0;d<S;d++)if(!(r=o>>>S-d-1&1?r.right:r.left).left&&!r.right){n=r.val,x=x+d+1;break}32<=x&&(x-=32,A=v[++C]),a=n-T,P?(!(0<c&&E[u-1])&&0<l&&E[u-m]?a+=M[u-m]:a+=w,a&=255,w=M[u]=a):M[u]=a}t.ptr=t.ptr+4*(C+1)+(0<x?4:0)}t.pixels.resultPixels=D},decodeBits:function(e,t,i,r,n){var a=(v=t.headerInfo).fileVersion,o=0,s=5<=e.byteLength-t.ptr?5:e.byteLength-t.ptr,l=new DataView(e,t.ptr,s);o++;var c=0==(u=(d=l.getUint8(0))>>6)?4:3-u,u=(s=0<(32&d),31&d),d=0;if(1==c)d=l.getUint8(o),o++;else if(2==c)d=l.getUint16(o,!0),o+=2;else{if(4!=c)throw"Invalid valid pixel count type";d=l.getUint32(o,!0),o+=4}c=2*v.maxZError;var h,p,f,m,g,y,_,v=1<v.numDims?v.maxValues[n]:v.zMax;if(s){for(t.counter.lut++,y=l.getUint8(o),o++,m=Math.ceil((y-1)*u/8),g=Math.ceil(m/4),p=new ArrayBuffer(4*g),f=new Uint8Array(p),t.ptr+=o,f.set(new Uint8Array(e,t.ptr,m)),l=new Uint32Array(p),t.ptr+=m,_=0;y-1>>>_;)_++;m=Math.ceil(d*_/8),g=Math.ceil(m/4),p=new ArrayBuffer(4*g),(f=new Uint8Array(p)).set(new Uint8Array(e,t.ptr,m)),h=new Uint32Array(p),t.ptr+=m,l=(3<=a?eGj_unstuffLUT2:eGj_unstuffLUT)(l,u,y-1,r,c,v),(3<=a?eGj_unstuff2:eGj_unstuff)(h,i,_,d,l)}else t.counter.bitstuffer++,_=u,t.ptr+=o,0<_&&(m=Math.ceil(d*_/8),g=Math.ceil(m/4),p=new ArrayBuffer(4*g),(f=new Uint8Array(p)).set(new Uint8Array(e,t.ptr,m)),h=new Uint32Array(p),t.ptr+=m,3<=a?null===r?eGj_originalUnstuff2(h,i,_,d):eGj_unstuff2(h,i,_,d,!1,r,c,v):null===r?eGj_originalUnstuff(h,i,_,d):eGj_unstuff(h,i,_,d,!1,r,c,v))},readTiles:function(e,t,i){var r=t.headerInfo,n=r.width,a=r.height,o=r.microBlockSize,s=r.imageType,l=fGj.getDataTypeSize(s),c=Math.ceil(n/o),u=Math.ceil(a/o);t.pixels.numBlocksY=u,t.pixels.numBlocksX=c;var d,h,p,f,m,g,y,_,v,C,x,b,S,T,E=t.pixels.ptr=0,w=0,A=0,P=0,D=0,M=0,I=0,R=0,O=new i(o*o),L=a%o||o,N=n%o||o,F=r.numDims,B=t.pixels.resultMask,V=t.pixels.resultPixels;for(A=0;A<u;A++)for(d=A!==u-1?o:L,P=0;P<c;P++)for(D=A*n*o+P*o,g=n-(h=P!==c-1?o:N),T=0;T<F;T++){if(1<F&&(V=new i(t.pixels.resultPixels.buffer,n*a*T*l,n*a)),p=e.byteLength-t.ptr,v={},R=0,R++,m=(f=(_=new DataView(e,t.ptr,Math.min(10,p))).getUint8(0))>>6&255,(f>>2&15)!=(P*o>>3&15))throw"integrity issue";if(3<(x=3&f))throw t.ptr+=R,"Invalid block encoding ("+x+")";if(2!=x)if(0==x){if(t.counter.uncompressed++,t.ptr+=R,M=(M=d*h*l)<(y=e.byteLength-t.ptr)?M:y,b=new ArrayBuffer(M%l==0?M:M+l-M%l),new Uint8Array(b).set(new Uint8Array(e,t.ptr,M)),C=new i(b),I=0,B)for(E=0;E<d;E++){for(w=0;w<h;w++)B[D]&&(V[D]=C[I++]),D++;D+=g}else for(E=0;E<d;E++){for(w=0;w<h;w++)V[D++]=C[I++];D+=g}t.ptr+=I*l}else if(b=fGj.getDataTypeUsed(s,m),S=fGj.getOnePixel(v,R,b,_),R+=fGj.getDataTypeSize(b),3==x)if(t.ptr+=R,t.counter.constantoffset++,B)for(E=0;E<d;E++){for(w=0;w<h;w++)B[D]&&(V[D]=S),D++;D+=g}else for(E=0;E<d;E++){for(w=0;w<h;w++)V[D++]=S;D+=g}else if(t.ptr+=R,fGj.decodeBits(e,t,O,S,T),R=0,B)for(E=0;E<d;E++){for(w=0;w<h;w++)B[D]&&(V[D]=O[R++]),D++;D+=g}else for(E=0;E<d;E++){for(w=0;w<h;w++)V[D++]=O[R++];D+=g}else t.counter.constant++,t.ptr+=R}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:fGj.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t,i=e.headerInfo.zMax,r=e.headerInfo.numDims,n=e.headerInfo.height*e.headerInfo.width,a=n*r,o=0,s=0,l=e.pixels.resultMask;if(l)if(1<r)for(o=0;o<r;o++)for(t=o*n,s=0;s<n;s++)l[s]&&(e.pixels.resultPixels[t+s]=i);else for(s=0;s<n;s++)l[s]&&(e.pixels.resultPixels[s]=i);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(i);else for(s=0;s<a;s++)e.pixels.resultPixels[s]=i},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:t=Float32Array;break;case 7:t=Float64Array;break;default:t=Float32Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:t="F32";break;case 7:t="F64";break;default:t="F32"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=-128<=t&&t<=127;break;case 1:i=0<=t&&t<=255;break;case 2:i=-32768<=t&&t<=32767;break;case 3:i=0<=t&&t<=65536;break;case 4:i=-2147483648<=t&&t<=2147483647;break;case 5:i=0<=t&&t<=4294967296;break;case 6:i=-34027999387901484e22<=t&&t<=34027999387901484e22;break;case 7:i=5e-324<=t&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,r){var n=0;switch(i){case 0:n=r.getInt8(t);break;case 1:n=r.getUint8(t);break;case 2:n=r.getInt16(t,!0);break;case 3:n=r.getUint16(t,!0);break;case 4:n=r.getInt32(t,!0);break;case 5:n=r.getUInt32(t,!0);break;case 6:n=r.getFloat32(t,!0);break;case 7:n=r.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return n}},gGj=function(e,t,i){this.val=e,this.left=t,this.right=i},rEj={decode:function(e,t){var i=(t=t||{}).noDataValue,r=0,n={};if(n.ptr=t.inputOffset||0,n.pixels={},fGj.readHeaderInfo(e,n)){var a=n.headerInfo,o=a.fileVersion,s=fGj.getDataTypeArray(a.imageType);fGj.readMask(e,n),a.numValidPixel===a.width*a.height||n.pixels.resultMask||(n.pixels.resultMask=t.maskData);var l,c=a.width*a.height;if(n.pixels.resultPixels=new s(c*a.numDims),n.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==a.numValidPixel)if(a.zMax===a.zMin)fGj.constructConstantSurface(n);else if(4<=o&&fGj.checkMinMaxRanges(e,n))fGj.constructConstantSurface(n);else{var u=new DataView(e,n.ptr,2),d=u.getUint8(0);if(n.ptr++,d)fGj.readDataOneSweep(e,n,s);else if(1<o&&a.imageType<=1&&Math.abs(a.maxZError-.5)<1e-5){if(u=u.getUint8(1),n.ptr++,2<(n.encodeMode=u)||o<4&&1<u)throw"Invalid Huffman flag "+u;u?fGj.readHuffman(e,n,s):fGj.readTiles(e,n,s)}else fGj.readTiles(e,n,s)}n.eofOffset=n.ptr,t.inputOffset?(l=n.headerInfo.blobSize+t.inputOffset-n.ptr,1<=Math.abs(l)&&(n.eofOffset=t.inputOffset+n.headerInfo.blobSize)):(l=n.headerInfo.blobSize-n.ptr,1<=Math.abs(l)&&(n.eofOffset=n.headerInfo.blobSize));var h={width:a.width,height:a.height,pixelData:n.pixels.resultPixels,minValue:a.zMin,maxValue:a.zMax,validPixelCount:a.numValidPixel,dimCount:a.numDims,dimStats:{minValues:a.minValues,maxValues:a.maxValues},maskData:n.pixels.resultMask};if(n.pixels.resultMask&&fGj.isValidPixelValue(a.imageType,i)){var p=n.pixels.resultMask;for(r=0;r<c;r++)p[r]||(h.pixelData[r]=i);h.noDataValue=i}return n.noDataValue=i,t.returnFileInfo&&(h.fileInfo=fGj.formatFileInfo(n)),h}},getBandCount:function(e){for(var t=0,i=0,r={ptr:0,pixels:{}};i<e.byteLength-58;)fGj.readHeaderInfo(e,r),i+=r.headerInfo.blobSize,t++,r.ptr=i;return t}},xMj=new ArrayBuffer(4),tEj=new Uint8Array(xMj),sEj=(new Uint32Array(xMj)[0]=1)===tEj[0],tEj={decode:function(e,t){if(!sEj)throw"Big endian system is not supported.";var i,r,n=(t=t||{}).inputOffset||0,a=new Uint8Array(e,n,10);if("CntZImage"===(a=String.fromCharCode.apply(null,a)).trim())i=qEj,r=1;else{if("Lerc2"!==a.substring(0,5))throw"Unexpected file identifier string: "+a;i=rEj,r=2}for(var o,s,l,c,u,d,h=0,p=e.byteLength-10,f=[],m={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};n<p;){var g=i.decode(e,{inputOffset:n,encodedMaskData:o,maskData:l,returnMask:0===h,returnEncodedMask:0===h,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});n=g.fileInfo.eofOffset;0===h&&(o=g.encodedMaskData,l=g.maskData,m.width=g.width,m.height=g.height,m.dimCount=g.dimCount||1,m.pixelType=g.pixelType||g.fileInfo.pixelType,m.mask=g.maskData),1<r&&g.fileInfo.mask&&0<g.fileInfo.mask.numBytes&&f.push(g.maskData),h++,m.pixels.push(g.pixelData),m.statistics.push({minValue:g.minValue,maxValue:g.maxValue,noDataValue:g.noDataValue,dimStats:g.dimStats})}if(1<r&&1<f.length){for(d=m.width*m.height,m.bandMasks=f,(l=new Uint8Array(d)).set(f[0]),c=1;c<f.length;c++)for(s=f[c],u=0;u<d;u++)l[u]=l[u]&s[u];m.maskData=l}return m}},tmp$6.Lerc=tEj;var LercDecode=tmp$6.Lerc,tmp$7={},TMj,UMj;TMj=tmp$7,UMj=function(){return i={},e.m=t=[function(e,t,i){var r=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e};function n(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=(i=i(1)).webm,o=i.mp4,s="undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream;r(l,[{key:"_addSourceToVideo",value:function(e,t,i){var r=document.createElement("source");r.src=i,r.type="video/"+t,e.appendChild(r)}},{key:"enable",value:function(){s?(this.disable(),console.warn("\n        NoSleep enabled for older iOS devices. This can interrupt\n        active or long-running network requests from completing successfully.\n        See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n      "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){s?this.noSleepTimer&&(console.warn("\n          NoSleep now disabled for older iOS devices.\n        "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),r=l;function l(){var e=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("muted",""),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",a),this._addSourceToVideo(this.noSleepVideo,"mp4",o),this.noSleepVideo.addEventListener("loadedmetadata",(function(){e.noSleepVideo.duration<=1?e.noSleepVideo.setAttribute("loop",""):e.noSleepVideo.addEventListener("timeupdate",(function(){.5<e.noSleepVideo.currentTime&&(e.noSleepVideo.currentTime=Math.random())}))})))}e.exports=r},function(e,t,i){e.exports={webm:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",mp4:"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}}],e.c=i,e.d=function(t,i,r){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.p="",e(e.s=0);function e(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var t,i},TMj.NoSleep=UMj();var NoSleep=tmp$7.NoSleep,oldValue;"undefined"!=typeof ko&&(oldValue=ko),function(e){var t=this||(0,eval)("this"),i=t.document,r=t.navigator,n=t.jQuery,a=t.JSON;n||"undefined"==typeof jQuery||(n=jQuery),function(o,s){function l(e,t){return(null===e||typeof e in m)&&e===t}function c(t,i){var r;return function(){r||(r=f.a.setTimeout((function(){r=e,t()}),i))}}function u(e,t){var i;return function(){clearTimeout(i),i=f.a.setTimeout(e,t)}}function d(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function h(e,t){null!==t&&t.s&&t.s()}function p(e,t){var i=this.qd,r=i[C];r.ra||(this.Qb&&this.mb[t]?(i.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):r.I[t]||i.uc(t,e,r.J?{da:e}:i.$c(e)),e.Ja&&e.gd())}var f=void 0!==o?o:{};f.b=function(e,t){for(var i=e.split("."),r=f,n=0;n<i.length-1;n++)r=r[i[n]];r[i[i.length-1]]=t},f.L=function(e,t,i){e[t]=i},f.version="3.5.1",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},f.a=function(){function o(e,t){for(var i in e)u.call(e,i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)u.call(t,i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function c(e,t,i,r){var n=e[t].match(v)||[];f.a.D(i.match(v),(function(e){f.a.Na(n,e,r)})),e[t]=n.join(" ")}var u=Object.prototype.hasOwnProperty,d={__proto__:[]}instanceof Array,h="function"==typeof Symbol,p={},m={};p[r&&/Firefox\/2/i.test(r.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],p.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),o(p,(function(e,t){if(t.length)for(var i=0,r=t.length;i<r;i++)m[t[i]]=e}));var g,y={propertychange:!0},_=i&&function(){for(var t=3,r=i.createElement("div"),n=r.getElementsByTagName("i");r.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",n[0];);return 4<t?t:e}(),v=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,i){for(var r=0,n=e.length;r<n;r++)t.call(i,e[r],r,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1},Lb:function(t,i,r){for(var n=0,a=t.length;n<a;n++)if(i.call(r,t[n],n,t))return t[n];return e},Pa:function(e,t){var i=f.a.A(e,t);0<i?e.splice(i,1):0===i&&e.shift()},wc:function(e){var t=[];return e&&f.a.D(e,(function(e){0>f.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,i){var r=[];if(e)for(var n=0,a=e.length;n<a;n++)r.push(t.call(i,e[n],n));return r},jb:function(e,t,i){var r=[];if(e)for(var n=0,a=e.length;n<a;n++)t.call(i,e[n],n)&&r.push(e[n]);return r},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,r=t.length;i<r;i++)e.push(t[i]);return e},Na:function(e,t,i){var r=f.a.A(f.a.bc(e),t);0>r?i&&e.push(t):i||e.splice(r,1)},Ba:d,extend:s,setPrototypeOf:l,Ab:d?l:s,P:o,Ga:function(e,t,i){if(!e)return e;var r,n={};for(r in e)u.call(e,r)&&(n[r]=t.call(i,e[r],r,e));return n},Tb:function(e){for(;e.firstChild;)f.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=f.a.la(e))[0]&&e[0].ownerDocument||i).createElement("div"),r=0,n=e.length;r<n;r++)t.appendChild(f.oa(e[r]));return t},Ca:function(e,t){for(var i=0,r=e.length,n=[];i<r;i++){var a=e[i].cloneNode(!0);n.push(t?f.oa(a):a)}return n},va:function(e,t){if(f.a.Tb(e),t)for(var i=0,r=t.length;i<r;i++)e.appendChild(t[i])},Xc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var r=i[0],n=r.parentNode,a=0,o=t.length;a<o;a++)n.insertBefore(t[a],r);for(a=0,o=i.length;a<o;a++)f.removeNode(i[a])}},Ua:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],r=e[e.length-1];for(e.length=0;i!==r;)e.push(i),i=i.nextSibling;e.push(r)}}return e},Zc:function(e,t){7>_?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return f.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!f.a.Lb(e,f.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return f.onError?function(){try{return e.apply(this,arguments)}catch(e){throw f.onError&&f.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(f.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw f.onError&&f.onError(e),e}),0)},B:function(e,t,i){var r=f.a.Ac(i);if(i=y[t],f.options.useOnlyNativeEvents||i||!n)if(i||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var a=function(t){r.call(e,t)},o="on"+t;e.attachEvent(o,a),f.a.K.za(e,(function(){e.detachEvent(o,a)}))}else e.addEventListener(t,r,!1);else g||(g="function"==typeof n(e).on?"on":"bind"),n(e)[g](t,r)},Fb:function(e,r){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var a;if("input"===f.a.R(e)&&e.type&&"click"==r.toLowerCase()?a="checkbox"==(a=e.type)||"radio"==a:a=!1,f.options.useOnlyNativeEvents||!n||a)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(a=i.createEvent(m[r]||"HTMLEvents")).initEvent(r,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(a)}else if(a&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+r)}else n(e).trigger(r)},f:function(e){return f.O(e)?e():e},bc:function(e){return f.O(e)?e.v():e},Eb:function(e,t,i){var r;t&&("object"==typeof e.classList?(r=e.classList[i?"add":"remove"],f.a.D(t.match(v),(function(t){r.call(e.classList,t)}))):"string"==typeof e.className.baseVal?c(e.className,"baseVal",t,i):c(e,"className",t,i))},Bb:function(t,i){var r=f.a.f(i);null!==r&&r!==e||(r="");var n=f.h.firstChild(t);!n||3!=n.nodeType||f.h.nextSibling(n)?f.h.va(t,[t.ownerDocument.createTextNode(r)]):n.data=r,f.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=_)try{var r=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(i.createElement("<input name='"+r+"'/>"),!1)}catch(e){}},Ad:function(e){9<=_&&((e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom))},wd:function(e){if(_){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=f.a.f(e),t=f.a.f(t);for(var i=[],r=e;r<=t;r++)i.push(r);return i},la:function(e){for(var t=[],i=0,r=e.length;i<r;i++)t.push(e[i]);return t},Da:function(e){return h?Symbol(e):e},Zd:6===_,$d:7===_,W:_,Lc:function(e,t){for(var i=f.a.la(e.getElementsByTagName("input")).concat(f.a.la(e.getElementsByTagName("textarea"))),r="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},n=[],a=i.length-1;0<=a;a--)r(i[a])&&n.push(i[a]);return n},Nd:function(e){return"string"==typeof e&&(e=f.a.Db(e))?a&&a.parse?a.parse(e):new Function("return "+e)():null},hc:function(e,t,i){if(!a||!a.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return a.stringify(f.a.f(e),t,i)},Od:function(e,t,r){var n=(r=r||{}).params||{},a=r.includeFields||this.Jc,s=e;if("object"==typeof e&&"form"===f.a.R(e)){s=e.action;for(var l=a.length-1;0<=l;l--)for(var c=f.a.Lc(e,a[l]),u=c.length-1;0<=u;u--)n[c[u].name]=c[u].value}t=f.a.f(t);var d=i.createElement("form");for(var h in d.style.display="none",d.action=s,d.method="post",t)(e=i.createElement("input")).type="hidden",e.name=h,e.value=f.a.hc(f.a.f(t[h])),d.appendChild(e);o(n,(function(e,t){var r=i.createElement("input");r.type="hidden",r.name=e,r.value=t,d.appendChild(r)})),i.body.appendChild(d),r.submitter?r.submitter(d):d.submit(),setTimeout((function(){d.parentNode.removeChild(d)}),0)}}}(),f.b("utils",f.a),f.b("utils.arrayForEach",f.a.D),f.b("utils.arrayFirst",f.a.Lb),f.b("utils.arrayFilter",f.a.jb),f.b("utils.arrayGetDistinctValues",f.a.wc),f.b("utils.arrayIndexOf",f.a.A),f.b("utils.arrayMap",f.a.Mb),f.b("utils.arrayPushAll",f.a.Nb),f.b("utils.arrayRemoveItem",f.a.Pa),f.b("utils.cloneNodes",f.a.Ca),f.b("utils.createSymbolOrString",f.a.Da),f.b("utils.extend",f.a.extend),f.b("utils.fieldsIncludedWithJsonPost",f.a.Jc),f.b("utils.getFormFields",f.a.Lc),f.b("utils.objectMap",f.a.Ga),f.b("utils.peekObservable",f.a.bc),f.b("utils.postJson",f.a.Od),f.b("utils.parseJson",f.a.Nd),f.b("utils.registerEventHandler",f.a.B),f.b("utils.stringifyJson",f.a.hc),f.b("utils.range",f.a.Pd),f.b("utils.toggleDomNodeCssClass",f.a.Eb),f.b("utils.triggerEvent",f.a.Fb),f.b("utils.unwrapObservable",f.a.f),f.b("utils.objectForEach",f.a.P),f.b("utils.addOrRemoveItem",f.a.Na),f.b("utils.setTextContent",f.a.Bb),f.b("unwrap",f.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var r=i.slice(0);return r.push.apply(r,arguments),t.apply(e,r)}}),f.a.g=new function(){var t,i,r=0,n="__ko__"+(new Date).getTime(),a={};return f.a.W?(t=function(t,i){var o=t[n];if(!o||"null"===o||!a[o]){if(!i)return e;o=t[n]="ko"+r++,a[o]={}}return a[o]},i=function(e){var t=e[n];return!!t&&(delete a[t],e[n]=null,!0)}):(t=function(e,t){var i=e[n];return!i&&t&&(i=e[n]={}),i},i=function(e){return!!e[n]&&(delete e[n],!0)}),{get:function(e,i){var r=t(e,!1);return r&&r[i]},set:function(i,r,n){(i=t(i,n!==e))&&(i[r]=n)},Ub:function(e,i,r){return(e=t(e,!0))[i]||(e[i]=r)},clear:i,Z:function(){return r+++n}}},f.b("utils.domData",f.a.g),f.b("utils.domData.clear",f.a.g.clear),f.a.K=new function(){function t(t,i){var r=f.a.g.get(t,a);return r===e&&i&&(r=[],f.a.g.set(t,a,r)),r}function i(e){if(i=t(e,!1))for(var i=i.slice(0),n=0;n<i.length;n++)i[n](e);f.a.g.clear(e),f.a.K.cleanExternalData(e),s[e.nodeType]&&r(e.childNodes,!0)}function r(e,t){for(var r,n=[],a=0;a<e.length;a++)if((!t||8===e[a].nodeType)&&(i(n[n.length]=r=e[a]),e[a]!==r))for(;a--&&-1==f.a.A(n,e[a]););}var a=f.a.g.Z(),o={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{za:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},yb:function(i,r){var n=t(i,!1);n&&(f.a.Pa(n,r),0==n.length&&f.a.g.set(i,a,e))},oa:function(e){return f.u.G((function(){o[e.nodeType]&&(i(e),s[e.nodeType]&&r(e.getElementsByTagName("*")))})),e},removeNode:function(e){f.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){n&&"function"==typeof n.cleanData&&n.cleanData([e])}}},f.oa=f.a.K.oa,f.removeNode=f.a.K.removeNode,f.b("cleanNode",f.oa),f.b("removeNode",f.removeNode),f.b("utils.domNodeDisposal",f.a.K),f.b("utils.domNodeDisposal.addDisposeCallback",f.a.K.za),f.b("utils.domNodeDisposal.removeDisposeCallback",f.a.K.yb),function(){var r=[0,"",""],a=[1,"<table>","</table>"],o=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:a,tbody:a,tfoot:a,tr:[2,"<table><tbody>","</tbody></table>"],td:o,th:o,option:s,optgroup:s},c=8>=f.a.W;f.a.ua=function(e,a){var o;if(n){if(n.parseHTML)o=n.parseHTML(e,a)||[];else if((o=n.clean([e],a))&&o[0]){for(var s=o[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(o=a)||(o=i);s=o.parentWindow||o.defaultView||t;var u,d=f.a.Db(e).toLowerCase(),h=o.createElement("div");for(u=(d=d.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[d[1]]||r,d=u[0],u="ignored<div>"+u[1]+e+u[2]+"</div>","function"==typeof s.innerShiv?h.appendChild(s.innerShiv(u)):(c&&o.body.appendChild(h),h.innerHTML=u,c&&h.parentNode.removeChild(h));d--;)h=h.lastChild;o=f.a.la(h.lastChild.childNodes)}return o},f.a.Md=function(e,t){var i=f.a.ua(e,t);return i.length&&i[0].parentElement||f.a.Yb(i)},f.a.fc=function(t,i){if(f.a.Tb(t),null!==(i=f.a.f(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),n)n(t).html(i);else for(var r=f.a.ua(i,t.ownerDocument),a=0;a<r.length;a++)t.appendChild(r[a])}}(),f.b("utils.parseHtmlFragment",f.a.ua),f.b("utils.setHtml",f.a.fc),f.aa=function(){var t={};return{Xb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var i=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return t[i]=e,"\x3c!--[ko_memo:"+i+"]--\x3e"},bd:function(i,r){var n=t[i];if(n===e)throw Error("Couldn't find any memo with ID "+i+". Perhaps it's already been unmemoized.");try{return n.apply(null,r||[]),!0}finally{delete t[i]}},cd:function(e,t){var i=[];!function e(t,i){if(t)if(8==t.nodeType){null!=(r=f.aa.Uc(t.nodeValue))&&i.push({ud:t,Kd:r})}else if(1==t.nodeType)for(var r=0,n=t.childNodes,a=n.length;r<a;r++)e(n[r],i)}(e,i);for(var r=0,n=i.length;r<n;r++){var a=i[r].ud,o=[a];t&&f.a.Nb(o,t),f.aa.bd(i[r].Kd,o),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),f.b("memoization",f.aa),f.b("memoization.memoize",f.aa.Xb),f.b("memoization.unmemoize",f.aa.bd),f.b("memoization.parseMemoText",f.aa.Uc),f.b("memoization.unmemoizeDomNodeAndDescendants",f.aa.cd),f.na=function(){function e(){if(a)for(var e,t=a,i=0;s<a;)if(e=n[s++]){if(s>t){if(5e3<=++i){s=a,f.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=a}try{e()}catch(t){f.a.Gc(t)}}}function r(){e(),s=a=n.length=0}var n=[],a=0,o=1,s=0;return{scheduler:t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(r):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},zb:function(e){return a||f.na.scheduler(r),n[a++]=e,o++},cancel:function(e){(e-=o-a)>=s&&e<a&&(n[e]=null)},resetForTesting:function(){var e=a-s;return s=a=n.length=0,e},Sd:e}}(),f.b("tasks",f.na),f.b("tasks.schedule",f.na.zb),f.b("tasks.runEarly",f.na.Sd),f.Ta={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return f.$({read:e,write:function(r){clearTimeout(i),i=f.a.setTimeout((function(){e(r)}),t)}})},rateLimit:function(e,t){var i,r,n;"number"==typeof t?i=t:(i=t.timeout,r=t.method),e.Hb=!1,n="function"==typeof r?r:"notifyWhenChangesStop"==r?u:c,e.ub((function(e){return n(e,i,t)}))},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.Hb||(t.Hb=!0,t.ub((function(i){var r,n=!1;return function(){if(!n){f.na.cancel(r),r=f.na.zb(i);try{n=!0,t.notifySubscribers(e,"dirty")}finally{n=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var m={undefined:1,boolean:1,number:1,string:1};f.b("extenders",f.Ta),f.ic=function(e,t,i){this.da=e,this.lc=t,this.mc=i,this.Ib=!1,this.fb=this.Jb=null,f.L(this,"dispose",this.s),f.L(this,"disposeWhenNodeIsRemoved",this.l)},f.ic.prototype.s=function(){this.Ib||(this.fb&&f.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},f.ic.prototype.l=function(e){this.Jb=e,f.a.K.za(e,this.fb=this.s.bind(this))},f.T=function(){f.a.Ab(this,g),g.qb(this)};var g={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,i){var r=this;i=i||"change";var n=new f.ic(r,t?e.bind(t):e,(function(){f.a.Pa(r.U[i],n),r.hb&&r.hb(i)}));return r.Qa&&r.Qa(i),r.U[i]||(r.U[i]=[]),r.U[i].push(n),n},notifySubscribers:function(e,t){if("change"===(t=t||"change")&&this.Gb(),this.Wa(t)){var i="change"===t&&this.ed||this.U[t].slice(0);try{f.u.xc();for(var r,n=0;r=i[n];++n)r.Ib||r.lc(e)}finally{f.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,i,r,n,a,o=this,s=f.O(o);o.gb||(o.gb=o.notifySubscribers,o.notifySubscribers=d);var l=e((function(){o.Ja=!1,s&&n===o&&(n=o.nc?o.nc():o());var e=i||a&&o.sb(r,n);a=i=t=!1,e&&o.gb(r=n)}));o.qc=function(e,i){i&&o.Ja||(a=!i),o.ed=o.U.change.slice(0),o.Ja=t=!0,n=e,l()},o.pc=function(e){t||(r=e,o.gb(e,"beforeChange"))},o.rc=function(){a=!0},o.gd=function(){o.sb(r,o.v(!0))&&(i=!0)}},Wa:function(e){return this.U[e]&&this.U[e].length},Bd:function(e){if(e)return this.U[e]&&this.U[e].length||0;var t=0;return f.a.P(this.U,(function(e,i){"dirty"!==e&&(t+=i.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&f.a.P(e,(function(e,i){var r=f.Ta[e];"function"==typeof r&&(t=r(t,i)||t)})),t}};f.L(g,"init",g.qb),f.L(g,"subscribe",g.subscribe),f.L(g,"extend",g.extend),f.L(g,"getSubscriptionsCount",g.Bd),f.a.Ba&&f.a.setPrototypeOf(g,Function.prototype),f.T.fn=g,f.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},f.b("subscribable",f.T),f.b("isSubscribable",f.Qc),f.S=f.u=function(){function e(e){r.push(i),i=e}function t(){i=r.pop()}var i,r=[],n=0;return{xc:e,end:t,cc:function(e){if(i){if(!f.Qc(e))throw Error("Only subscribable things can act as dependencies");i.od.call(i.pd,e,e.fd||(e.fd=++n))}},G:function(i,r,n){try{return e(),i.apply(r,n||[])}finally{t()}},qa:function(){if(i)return i.o.qa()},Va:function(){if(i)return i.o.Va()},Ya:function(){if(i)return i.Ya},o:function(){if(i)return i.o}}}(),f.b("computedContext",f.S),f.b("computedContext.getDependenciesCount",f.S.qa),f.b("computedContext.getDependencies",f.S.Va),f.b("computedContext.isInitial",f.S.Ya),f.b("computedContext.registerDependency",f.S.cc),f.b("ignoreDependencies",f.Yd=f.u.G);var y=f.a.Da("_latestValue");f.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[y],arguments[0])&&(t.ya(),t[y]=arguments[0],t.xa()),this):(f.u.cc(t),t[y])}return t[y]=e,f.a.Ba||f.a.extend(t,f.T.fn),f.T.fn.qb(t),f.a.Ab(t,_),f.options.deferUpdates&&f.Ta.deferred(t,!0),t};var _={equalityComparer:l,v:function(){return this[y]},xa:function(){this.notifySubscribers(this[y],"spectate"),this.notifySubscribers(this[y])},ya:function(){this.notifySubscribers(this[y],"beforeChange")}};f.a.Ba&&f.a.setPrototypeOf(_,f.T.fn);var v=f.ta.Ma="__ko_proto__";_[v]=f.ta,f.O=function(e){if((e="function"==typeof e&&e[v])&&e!==_[v]&&e!==f.o.fn[v])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},f.Za=function(e){return"function"==typeof e&&(e[v]===_[v]||e[v]===f.o.fn[v]&&e.Nc)},f.b("observable",f.ta),f.b("isObservable",f.O),f.b("isWriteableObservable",f.Za),f.b("isWritableObservable",f.Za),f.b("observable.fn",_),f.L(_,"peek",_.v),f.L(_,"valueHasMutated",_.xa),f.L(_,"valueWillMutate",_.ya),f.Ha=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=f.ta(e),f.a.Ab(e,f.Ha.fn),e.extend({trackArrayChanges:!0})},f.Ha.fn={remove:function(e){for(var t=this.v(),i=[],r="function"!=typeof e||f.O(e)?function(t){return t===e}:e,n=0;n<t.length;n++){var a=t[n];if(r(a)){if(0===i.length&&this.ya(),t[n]!==a)throw Error("Array modified during remove; cannot remove item");i.push(a),t.splice(n,1),n--}}return i.length&&this.xa(),i},removeAll:function(t){if(t===e){var i=this.v(),r=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),r}return t?this.remove((function(e){return 0<=f.a.A(t,e)})):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||f.O(e)?function(t){return t===e}:e;this.ya();for(var r=t.length-1;0<=r;r--){var n=t[r];i(n)&&(n._destroy=!0)}this.xa()},destroyAll:function(t){return t===e?this.destroy((function(){return!0})):t?this.destroy((function(e){return 0<=f.a.A(t,e)})):[]},indexOf:function(e){var t=this();return f.a.A(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(e){var t=this().slice(0);return e?t.sort(e):t.sort()},reversed:function(){return this().slice(0).reverse()}},f.a.Ba&&f.a.setPrototypeOf(f.Ha.fn,f.ta.fn),f.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){f.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var i=t[e].apply(t,arguments);return this.xa(),i===t?this:i}})),f.a.D(["slice"],(function(e){f.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),f.Pc=function(e){return f.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},f.b("observableArray",f.Ha),f.b("isObservableArray",f.Pc),f.Ta.trackArrayChanges=function(t,i){if(t.Ob={},i&&"object"==typeof i&&f.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var r,n,a,o=!1,s=null,l=0,c=t.Qa,u=t.hb;t.Qa=function(e){c&&c.call(t,e),"arrayChange"===e&&function(){function e(){if(l){var e,i=[].concat(t.v()||[]);t.Wa("arrayChange")&&((!s||1<l)&&(s=f.a.Pb(a,i,t.Ob)),e=s),a=i,s=null,l=0,e&&e.length&&t.notifySubscribers(e,"arrayChange")}}o?e():(o=!0,n=t.subscribe((function(){++l}),null,"spectate"),a=[].concat(t.v()||[]),s=null,r=t.subscribe(e))}()},t.hb=function(i){u&&u.call(t,i),"arrayChange"!==i||t.Wa("arrayChange")||(r&&r.s(),n&&n.s(),n=r=null,o=!1,a=e)},t.zc=function(e,t,i){function r(e,t,i){return n[n.length]={status:e,value:t,index:i}}if(o&&!l){var n=[],a=e.length,c=i.length,u=0;switch(t){case"push":u=a;case"unshift":for(t=0;t<c;t++)r("added",i[t],u+t);break;case"pop":u=a-1;case"shift":a&&r("deleted",e[u],u);break;case"splice":t=Math.min(Math.max(0,0>i[0]?a+i[0]:i[0]),a);a=1===c?a:Math.min(t+(i[1]||0),a),c=t+c-2,u=Math.max(a,c);for(var d=[],h=[],p=2;t<u;++t,++p)t<a&&h.push(r("deleted",e[t],t)),t<c&&d.push(r("added",i[p],t));f.a.Kc(h,d);break;default:return}s=n}}}};var C=f.a.Da("_state");f.o=f.$=function(t,i,r){function n(){if(0<arguments.length){if("function"!=typeof a)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return a.apply(o.nb,arguments),this}return o.ra||f.u.cc(n),(o.ka||o.J&&n.Xa())&&n.ha(),o.X}if("object"==typeof t?r=t:(r=r||{},t&&(r.read=t)),"function"!=typeof r.read)throw Error("Pass a function that returns the value of the ko.computed");var a=r.write,o={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:r.read,nb:i||r.owner,l:r.disposeWhenNodeIsRemoved||r.l||null,Sa:r.disposeWhen||r.Sa,Rb:null,I:{},V:0,Ic:null};return n[C]=o,n.Nc="function"==typeof a,f.a.Ba||f.a.extend(n,f.T.fn),f.T.fn.qb(n),f.a.Ab(n,x),r.pure?(o.wb=!0,o.J=!0,f.a.extend(n,b)):r.deferEvaluation&&f.a.extend(n,S),f.options.deferUpdates&&f.Ta.deferred(n,!0),o.l&&(o.jc=!0,o.l.nodeType||(o.l=null)),o.J||r.deferEvaluation||n.ha(),o.l&&n.ja()&&f.a.K.za(o.l,o.Rb=function(){n.s()}),n};var x={equalityComparer:l,qa:function(){return this[C].V},Va:function(){var e=[];return f.a.P(this[C].I,(function(t,i){e[i.Ka]=i.da})),e},Vb:function(e){if(!this[C].V)return!1;var t=this.Va();return-1!==f.a.A(t,e)||!!f.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,i){if(this[C].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[C].I[e]=i,i.Ka=this[C].V++,i.La=t.ob()},Xa:function(){var e,t,i=this[C].I;for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&(t=i[e],this.Ia&&t.da.Ja||t.da.Dd(t.La)))return!0},Jd:function(){this.Ia&&!this[C].rb&&this.Ia(!1)},ja:function(){var e=this[C];return e.ka||0<e.V},Rd:function(){this.Ja?this[C].ka&&(this[C].sa=!0):this.Hc()},$c:function(e){if(e.Hb){var t=e.subscribe(this.Jd,this,"dirty"),i=e.subscribe(this.Rd,this);return{da:e,s:function(){t.s(),i.s()}}}return e.subscribe(this.Hc,this)},Hc:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[C].Ic),this[C].Ic=f.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[C],i=t.Sa,r=!1;if(!t.rb&&!t.ra){if(t.l&&!f.a.Sb(t.l)||i&&i()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{r=this.zd(e)}finally{t.rb=!1}return r}},zd:function(t){var i=this[C],r=!1,n=i.wb?e:!i.V;r={qd:this,mb:i.I,Qb:i.V};f.u.xc({pd:r,od:p,o:this,Ya:n}),i.I={},i.V=0;var a=this.yd(i,r);return i.V?r=this.sb(i.X,a):(this.s(),r=!0),r&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=a,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),n&&this.notifySubscribers(i.X,"awake"),r},yd:function(e,t){try{var i=e.Wc;return e.nb?i.call(e.nb):i()}finally{f.u.end(),t.Qb&&!e.J&&f.a.P(t.mb,h),e.sa=e.ka=!1}},v:function(e){var t=this[C];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){f.T.fn.ub.call(this,e),this.nc=function(){return this[C].J||(this[C].sa?this.ha():this[C].ka=!1),this[C].X},this.Ia=function(e){this.pc(this[C].X),this[C].ka=!0,e&&(this[C].sa=!0),this.qc(this,!e)}},s:function(){var t=this[C];!t.J&&t.I&&f.a.P(t.I,(function(e,t){t.s&&t.s()})),t.l&&t.Rb&&f.a.K.yb(t.l,t.Rb),t.I=e,t.V=0,t.ra=!0,t.sa=!1,t.ka=!1,t.J=!1,t.l=e,t.Sa=e,t.Wc=e,this.Nc||(t.nb=e)}},b={Qa:function(e){var t=this,i=t[C];if(!i.ra&&i.J&&"change"==e){if(i.J=!1,i.sa||t.Xa())i.I=null,i.V=0,t.ha()&&t.Gb();else{var r=[];f.a.P(i.I,(function(e,t){r[t.Ka]=e})),f.a.D(r,(function(e,r){var n=i.I[e],a=t.$c(n.da);a.Ka=r,a.La=n.La,i.I[e]=a})),t.Xa()&&t.ha()&&t.Gb()}i.ra||t.notifySubscribers(i.X,"awake")}},hb:function(t){var i=this[C];i.ra||"change"!=t||this.Wa("change")||(f.a.P(i.I,(function(e,t){t.s&&(i.I[e]={da:t.da,Ka:t.Ka,La:t.La},t.s())})),i.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var e=this[C];return e.J&&(e.sa||this.Xa())&&this.ha(),f.T.fn.ob.call(this)}},S={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};f.a.Ba&&f.a.setPrototypeOf(x,f.T.fn);var T=f.ta.Ma;x[T]=f.o,f.Oc=function(e){return"function"==typeof e&&e[T]===x[T]},f.Fd=function(e){return f.Oc(e)&&e[C]&&e[C].wb},f.b("computed",f.o),f.b("dependentObservable",f.o),f.b("isComputed",f.Oc),f.b("isPureComputed",f.Fd),f.b("computed.fn",x),f.L(x,"peek",x.v),f.L(x,"dispose",x.s),f.L(x,"isActive",x.ja),f.L(x,"getDependenciesCount",x.qa),f.L(x,"getDependencies",x.Va),f.xb=function(e,t){return"function"==typeof e?f.o(e,t,{pure:!0}):((e=f.a.extend({},e)).pure=!0,f.o(e,t))},f.b("pureComputed",f.xb),function(){function t(r,n,a){if(a=a||new i,"object"!=typeof(r=n(r))||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var o=r instanceof Array?[]:{};return a.save(r,o),function(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}(r,(function(i){var s=n(r[i]);switch(typeof s){case"boolean":case"number":case"string":case"function":o[i]=s;break;case"object":case"undefined":var l=a.get(s);o[i]=l!==e?l:t(s,n,a)}})),o}function i(){this.keys=[],this.values=[]}f.ad=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,(function(e){for(var t=0;f.O(e)&&10>t;t++)e=e();return e}))},f.toJSON=function(e,t,i){return e=f.ad(e),f.a.hc(e,t,i)},i.prototype={constructor:i,save:function(e,t){var i=f.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=f.a.A(this.keys,t))?this.values[t]:e}}}(),f.b("toJS",f.ad),f.b("toJSON",f.toJSON),f.Wd=function(e,t,i){function r(t){var r=f.xb(e,i).extend({ma:"always"}),n=r.subscribe((function(e){e&&(n.s(),t(e))}));return r.notifySubscribers(r.v()),n}return"function"!=typeof Promise||t?r(t.bind(i)):new Promise(r)},f.b("when",f.Wd),f.w={M:function(t){switch(f.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?f.a.g.get(t,f.c.options.$b):7>=f.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?f.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,i,r){switch(f.a.R(t)){case"option":"string"==typeof i?(f.a.g.set(t,f.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(f.a.g.set(t,f.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":""!==i&&null!==i||(i=e);for(var n,a=-1,o=0,s=t.options.length;o<s;++o)if((n=f.w.M(t.options[o]))==i||""===n&&i===e){a=o;break}(r||0<=a||i===e&&1<t.size)&&(t.selectedIndex=a,6===f.a.W&&f.a.setTimeout((function(){t.selectedIndex=a}),0));break;default:null!==i&&i!==e||(i=""),t.value=i}}},f.b("selectExtensions",f.w),f.b("selectExtensions.readValue",f.w.M),f.b("selectExtensions.writeValue",f.w.cb),f.m=function(){function e(e){123===(e=f.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],o=(e+="\n,").match(r),s=[],l=0;if(1<o.length){for(var c,u=0;c=o[u];++u){var d=c.charCodeAt(0);if(44===d){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===d){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===d&&1<c.length&&(47===c.charCodeAt(1)||42===c.charCodeAt(1)))continue;47===d&&u&&1<c.length?(d=o[u-1].match(n))&&!a[d[0]]&&(o=(e=e.substr(e.indexOf(c)+1)).match(r),u=-1,c="/"):40===d||123===d||91===d?++l:41===d||125===d||93===d?--l:t||s.length||34!==d&&39!==d||(c=c.slice(1,-1))}s.push(c)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,r=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),n=/[\])"'A-Za-z0-9_$]+$/,a={in:1,return:1,typeof:1},o={};return{Ra:[],wa:o,ac:e,vb:function(r,n){function a(e,r){var n;if(!u){var d=f.getBindingHandler(e);if(d&&d.preprocess&&!(r=d.preprocess(r,e,a)))return;(d=o[e])&&(n=r,0<=f.a.A(t,n)?n=!1:(d=n.match(i),n=null!==d&&(d[1]?"Object("+d[1]+")"+d[2]:n)),d=n),d&&l.push("'"+("string"==typeof o[e]?o[e]:e)+"':function(_z){"+n+"=_z}")}c&&(r="function(){return "+r+" }"),s.push("'"+e+"':"+r)}var s=[],l=[],c=(n=n||{}).valueAccessors,u=n.bindingParams,d="string"==typeof r?e(r):r;return f.a.D(d,(function(e){a(e.key||e.unknown,e.value)})),l.length&&a("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},Id:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},eb:function(e,t,i,r,n){e&&f.O(e)?!f.Za(e)||n&&e.v()===r||e(r):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](r)}}}(),f.b("expressionRewriting",f.m),f.b("expressionRewriting.bindingRewriteValidators",f.m.Ra),f.b("expressionRewriting.parseObjectLiteral",f.m.ac),f.b("expressionRewriting.preProcessBindings",f.m.vb),f.b("expressionRewriting._twoWayBindings",f.m.wa),f.b("jsonExpressionRewriting",f.m),f.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",f.m.vb),function(){function e(e){return 8==e.nodeType&&o.test(a?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(a?e.text:e.nodeValue)}function r(i,r){for(var n=i,a=1,o=[];n=n.nextSibling;){if(t(n)&&(f.a.g.set(n,c,!0),0===--a))return o;o.push(n),e(n)&&a++}if(!r)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function n(e,t){var i=r(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var a=i&&"\x3c!--test--\x3e"===i.createComment("test").text,o=a?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=a?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},c="__ko_matchedEndComment__";f.h={ea:{},childNodes:function(t){return e(t)?r(t):t.childNodes},Ea:function(t){if(e(t))for(var i=0,r=(t=f.h.childNodes(t)).length;i<r;i++)f.removeNode(t[i]);else f.a.Tb(t)},va:function(t,i){if(e(t)){f.h.Ea(t);for(var r=t.nextSibling,n=0,a=i.length;n<a;n++)r.parentNode.insertBefore(i[n],r)}else f.a.va(t,i)},Vc:function(t,i){var r;e(t)?(r=t.nextSibling,t=t.parentNode):r=t.firstChild,r?i!==r&&t.insertBefore(i,r):t.appendChild(i)},Wb:function(t,i,r){r?(r=r.nextSibling,e(t)&&(t=t.parentNode),r?i!==r&&t.insertBefore(i,r):t.appendChild(i)):f.h.Vc(t,i)},firstChild:function(i){if(e(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(e(i)&&(i=n(i)),i.nextSibling&&t(i.nextSibling)){var r=i.nextSibling;if(t(r)&&!f.a.g.get(r,c))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:e,Vd:function(e){return(e=(a?e.text:e.nodeValue).match(o))?e[1]:null},Sc:function(i){if(l[f.a.R(i)]){var r=i.firstChild;if(r)do{if(1===r.nodeType){var a,o=null;if(a=r.firstChild)do{if(o)o.push(a);else if(e(a)){var s=n(a,!0);s?a=s:o=[a]}else t(a)&&(o=[a])}while(a=a.nextSibling);if(a=o)for(o=r.nextSibling,s=0;s<a.length;s++)o?i.insertBefore(a[s],o):i.appendChild(a[s])}}while(r=r.nextSibling)}}}}(),f.b("virtualElements",f.h),f.b("virtualElements.allowedBindings",f.h.ea),f.b("virtualElements.emptyNode",f.h.Ea),f.b("virtualElements.insertAfter",f.h.Wb),f.b("virtualElements.prepend",f.h.Vc),f.b("virtualElements.setDomNodeChildren",f.h.va),f.ga=function(){this.nd={}},f.a.extend(f.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||f.j.getComponentNameForNode(e);case 8:return f.h.Cd(e);default:return!1}},getBindings:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e):null;return f.j.tc(i,e,t,!1)},getBindingAccessors:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return f.j.tc(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return f.h.Vd(e);default:return null}},parseBindingsString:function(e,t,i,r){try{var n,a=this.nd,o=e+(r&&r.valueAccessors||"");if(!(n=a[o])){var s,l="with($context){with($data||{}){return{"+f.m.vb(e,r)+"}}}";s=new Function("$context","$element",l),n=a[o]=s}return n(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),f.ga.instance=new f.ga,f.b("bindingProvider",f.ga),function(){function r(e){var t=(e=f.a.g.get(e,C))&&e.N;t&&(e.N=null,t.Tc())}function a(e,t,i){this.node=e,this.yc=t,this.kb=[],this.H=!1,t.N||f.a.K.za(e,r),i&&i.N&&(i.N.kb.push(e),this.Kb=i)}function o(e){return function(){return e}}function s(e){return e()}function l(e){return f.a.Ga(f.u.G(e),(function(t,i){return function(){return e()[i]}}))}function c(e,t){return l(this.getBindings.bind(this,e,t))}function u(e,t){var i=f.h.firstChild(t);if(i){var r,n=f.ga.instance,a=n.preprocessNode;if(a){for(;r=i;)i=f.h.nextSibling(r),a.call(n,r);i=f.h.firstChild(t)}for(;r=i;)i=f.h.nextSibling(r),d(e,r)}f.i.ma(t,f.i.H)}function d(e,t){var i=e,r=1===t.nodeType;r&&f.h.Sc(t),(r||f.ga.instance.nodeHasBindings(t))&&(i=h(t,null,e).bindingContextForDescendants),i&&!_[f.a.R(t)]&&u(i,t)}function h(t,i,r){var n,a=f.a.g.Ub(t,C,{}),o=a.hd;if(!i){if(o)throw Error("You cannot apply bindings multiple times to the same element.");a.hd=!0}if(o||(a.context=r),a.Zb||(a.Zb={}),i&&"function"!=typeof i)n=i;else{var l=f.ga.instance,u=l.getBindingAccessors||c,d=f.$((function(){return(n=i?i(r,t):u.call(l,t,r))&&(r[m]&&r[m](),r[y]&&r[y]()),n}),null,{l:t});n&&d.ja()||(d=null)}var h,p=r;if(n){var g=function(){return f.a.Ga(d?d():n,s)},_=d?function(e){return function(){return s(d()[e])}}:function(e){return n[e]};g.get=function(e){return n[e]&&s(_(e))},g.has=function(e){return e in n},f.i.H in n&&f.i.subscribe(t,f.i.H,(function(){var e=(0,n[f.i.H])();if(e){var i=f.h.childNodes(t);i.length&&e(i,f.Ec(i[0]))}})),f.i.pa in n&&(p=f.i.Cb(t,r),f.i.subscribe(t,f.i.pa,(function(){var e=(0,n[f.i.pa])();e&&f.h.firstChild(t)&&e(t)}))),a=function(e){var t=[],i={},r=[];return f.a.P(e,(function n(a){if(!i[a]){var o=f.getBindingHandler(a);o&&(o.after&&(r.push(a),f.a.D(o.after,(function(t){if(e[t]){if(-1!==f.a.A(r,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+r.join(", "));n(t)}})),r.length--),t.push({key:a,Mc:o})),i[a]=!0}})),t}(n),f.a.D(a,(function(i){var r=i.Mc.init,a=i.Mc.update,o=i.key;if(8===t.nodeType&&!f.h.ea[o])throw Error("The binding '"+o+"' cannot be used with virtual elements");try{"function"==typeof r&&f.u.G((function(){var i=r(t,_(o),g,p.$data,p);if(i&&i.controlsDescendantBindings){if(h!==e)throw Error("Multiple bindings ("+h+" and "+o+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");h=o}})),"function"==typeof a&&f.$((function(){a(t,_(o),g,p.$data,p)}),null,{l:t})}catch(i){throw i.message='Unable to process binding "'+o+": "+n[o]+'"\nMessage: '+i.message,i}}))}return{shouldBindDescendants:a=h===e,bindingContextForDescendants:a&&p}}function p(t,i){return t&&t instanceof f.fa?t:new f.fa(t,e,e,i)}var m=f.a.Da("_subscribable"),g=f.a.Da("_ancestorBindingInfo"),y=f.a.Da("_dataDependency");f.c={};var _={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(e){return f.c[e]};var v={};f.fa=function(t,i,r,n,a){function o(){var e=d?u():u,t=f.a.f(e);return i?(f.a.extend(l,i),g in i&&(l[g]=i[g])):(l.$parents=[],l.$root=t,l.ko=f),l[m]=s,c?t=l.$data:(l.$rawData=e,l.$data=t),r&&(l[r]=t),n&&n(l,i,t),i&&i[m]&&!f.S.o().Vb(i[m])&&i[m](),h&&(l[y]=h),l.$data}var s,l=this,c=t===v,u=c?e:t,d="function"==typeof u&&!f.O(u),h=a&&a.dataDependency;a&&a.exportDependencies?o():((s=f.xb(o)).v(),s.ja()?s.equalityComparer=null:l[m]=e)},f.fa.prototype.createChildContext=function(e,t,i,r){if(!r&&t&&"object"==typeof t&&(t=(r=t).as,i=r.extend),t&&r&&r.noChildContext){var n="function"==typeof e&&!f.O(e);return new f.fa(v,this,null,(function(r){i&&i(r),r[t]=n?e():e}),r)}return new f.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)}),r)},f.fa.prototype.extend=function(e,t){return new f.fa(v,this,null,(function(t){f.a.extend(t,"function"==typeof e?e(t):e)}),t)};var C=f.a.g.Z();a.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},a.prototype.sd=function(e){f.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},a.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,f.a.K.yb(this.node,r),f.i.ma(this.node,f.i.pa),this.Tc())},f.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,i,r,n){var a=f.a.g.Ub(e,C,{});return a.Fa||(a.Fa=new f.T),n&&n.notifyImmediately&&a.Zb[t]&&f.u.G(i,r,[e]),a.Fa.subscribe(i,r,t)},ma:function(t,i){var r=f.a.g.get(t,C);if(r&&(r.Zb[i]=!0,r.Fa&&r.Fa.notifySubscribers(t,i),i==f.i.H))if(r.N)r.N.Cc();else if(r.N===e&&r.Fa&&r.Fa.Wa(f.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,t){var i=f.a.g.Ub(e,C,{});return i.N||(i.N=new a(e,i,t[g])),t[g]==i?t:t.extend((function(e){e[g]=i}))}},f.Td=function(e){return(e=f.a.g.get(e,C))&&e.context},f.ib=function(e,t,i){return 1===e.nodeType&&f.h.Sc(e),h(e,t,p(i))},f.ld=function(e,t,i){return i=p(i),f.ib(e,function(e,t,i){return"function"==typeof e?l(e.bind(null,t,i)):f.a.Ga(e,o)}(t,i,e),i)},f.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||u(p(e),t)},f.vc=function(e,r,a){if(!n&&t.jQuery&&(n=t.jQuery),2>arguments.length){if(!(r=i.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!r||1!==r.nodeType&&8!==r.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(p(e,a),r)},f.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:f.Td(t)},f.Ec=function(t){return(t=f.Dc(t))?t.$data:e},f.b("bindingHandlers",f.c),f.b("bindingEvent",f.i),f.b("bindingEvent.subscribe",f.i.subscribe),f.b("bindingEvent.startPossiblyAsyncContentBinding",f.i.Cb),f.b("applyBindings",f.vc),f.b("applyBindingsToDescendants",f.Oa),f.b("applyBindingAccessorsToNode",f.ib),f.b("applyBindingsToNode",f.ld),f.b("contextFor",f.Dc),f.b("dataFor",f.Ec)}(),function(e){function t(t,a){var o,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(a):((s=r[t]=new f.T).subscribe(a),function(e,t){i("getConfig",[e],(function(r){r?i("loadComponent",[e,r],(function(e){t(e,r)})):t(null,null)}))}(t,(function(e,i){var a=!(!i||!i.synchronous);n[t]={definition:e,Gd:a},delete r[t],o||a?s.notifySubscribers(e):f.na.zb((function(){s.notifySubscribers(e)}))})),o=!0)}function i(t,r,n,a){a||(a=f.j.loaders.slice(0));var o=a.shift();if(o){var s=o[t];if(s){var l=!1;if(s.apply(o,r.concat((function(e){l?n(null):null!==e?n(e):i(t,r,n,a)})))!==e&&(l=!0,!o.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else i(t,r,n,a)}else n(null)}var r={},n={};f.j={get:function(i,r){var a=Object.prototype.hasOwnProperty.call(n,i)?n[i]:e;a?a.Gd?f.u.G((function(){r(a.definition)})):f.na.zb((function(){r(a.definition)})):t(i,r)},Bc:function(e){delete n[e]},oc:i},f.j.loaders=[],f.b("components",f.j),f.b("components.get",f.j.get),f.b("components.clearCachedDefinition",f.j.Bc)}(),function(){function e(e){switch(f.a.R(e)){case"script":return f.a.ua(e.text);case"textarea":return f.a.ua(e.value);case"template":if(r(e.content))return f.a.Ca(e.content.childNodes)}return f.a.Ca(e.childNodes)}function r(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function n(e,i,r){"string"==typeof i.require?t.require?(0,t.require)([i.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),r(e)})):e("Uses require, but no AMD loader is present"):r(i)}function a(e){return function(t){throw Error("Component '"+e+"': "+t)}}var o={};f.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(f.j.tb(e))throw Error("Component "+e+" is already registered");o[e]=t},f.j.tb=function(e){return Object.prototype.hasOwnProperty.call(o,e)},f.j.unregister=function(e){delete o[e],f.j.Bc(e)},f.j.Fc={getConfig:function(e,t){t(f.j.tb(e)?o[e]:null)},loadComponent:function(e,t,i){var r=a(e);n(r,t,(function(t){!function(e,t,i,r){function a(){0==--l&&r(o)}var o={},l=2,c=i.template;i=i.viewModel,c?n(t,c,(function(t){f.j.oc("loadTemplate",[e,t],(function(e){o.template=e,a()}))})):a(),i?n(t,i,(function(t){f.j.oc("loadViewModel",[e,t],(function(e){o[s]=e,a()}))})):a()}(e,r,t,i)}))},loadTemplate:function(n,o,s){if(n=a(n),"string"==typeof o)s(f.a.ua(o));else if(o instanceof Array)s(o);else if(r(o))s(f.a.la(o.childNodes));else if(o.element)if(o=o.element,t.HTMLElement?o instanceof HTMLElement:o&&o.tagName&&1===o.nodeType)s(e(o));else if("string"==typeof o){var l=i.getElementById(o);l?s(e(l)):n("Cannot find element with ID "+o)}else n("Unknown element type: "+o);else n("Unknown template value: "+o)},loadViewModel:function(e,t,i){!function e(t,i,r){if("function"==typeof i)r((function(e){return new i(e)}));else if("function"==typeof i[s])r(i[s]);else if("instance"in i){var n=i.instance;r((function(){return n}))}else"viewModel"in i?e(t,i.viewModel,r):t("Unknown viewModel value: "+i)}(a(e),t,i)}};var s="createViewModel";f.b("components.register",f.j.register),f.b("components.isRegistered",f.j.tb),f.b("components.unregister",f.j.unregister),f.b("components.defaultLoader",f.j.Fc),f.j.loaders.push(f.j.Fc),f.j.dd=o}(),function(){function e(e,i){if(r=e.getAttribute("params")){var r=t.parseBindingsString(r,i,e,{valueAccessors:!0,bindingParams:!0}),n=(r=f.a.Ga(r,(function(t){return f.o(t,null,{l:e})})),f.a.Ga(r,(function(t){var i=t.v();return t.ja()?f.o({read:function(){return f.a.f(t())},write:f.Za(i)&&function(e){t()(e)},l:e}):i})));return Object.prototype.hasOwnProperty.call(n,"$raw")||(n.$raw=r),n}return{$raw:{}}}f.j.getComponentNameForNode=function(e){var t=f.a.R(e);if(f.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=f.a.W&&e.tagName===t))return t},f.j.tc=function(t,i,r,n){if(1===i.nodeType){var a=f.j.getComponentNameForNode(i);if(a){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var o={name:a,params:e(i,r)};t.component=n?function(){return o}:o}}return t};var t=new f.ga;9>f.a.W&&(f.j.register=function(e){return function(t){return e.apply(this,arguments)}}(f.j.register),i.createDocumentFragment=function(e){return function(){var t=e();f.j.dd;return t}}(i.createDocumentFragment))}(),function(){var e=0;f.c.component={init:function(t,i,r,n,a){function o(){var e=s&&s.dispose;"function"==typeof e&&e.call(s),c&&c.s(),l=s=c=null}var s,l,c,u=f.a.la(f.h.childNodes(t));return f.h.Ea(t),f.a.K.za(t,o),f.o((function(){var r,n,d=f.a.f(i());if("string"==typeof d?r=d:(r=f.a.f(d.name),n=f.a.f(d.params)),!r)throw Error("No component name specified");var h=f.i.Cb(t,a),p=l=++e;f.j.get(r,(function(e){if(l===p){if(o(),!e)throw Error("Unknown component '"+r+"'");!function(e,t,i){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=f.a.Ca(t),f.h.va(i,e)}(r,e,t);var i=function(e,t,i){var r=e.createViewModel;return r?r.call(e,t,i):t}(e,n,{element:t,templateNodes:u});e=h.createChildContext(i,{extend:function(e){e.$component=i,e.$componentTemplateNodes=u}}),i&&i.koDescendantsComplete&&(c=f.i.subscribe(t,f.i.pa,i.koDescendantsComplete,i)),s=i,f.Oa(e,t)}}))}),null,{l:t}),{controlsDescendantBindings:!0}}},f.h.ea.component=!0}();var E={class:"className",for:"htmlFor"};f.c.attr={update:function(t,i){var r=f.a.f(i())||{};f.a.P(r,(function(i,r){r=f.a.f(r);var n=i.indexOf(":"),a=(n="lookupNamespaceURI"in t&&0<n&&t.lookupNamespaceURI(i.substr(0,n)),!1===r||null===r||r===e);a?n?t.removeAttributeNS(n,i):t.removeAttribute(i):r=r.toString(),8>=f.a.W&&i in E?(i=E[i],a?t.removeAttribute(i):t[i]=r):a||(n?t.setAttributeNS(n,i,r):t.setAttribute(i,r)),"name"===i&&f.a.Yc(t,a?"":r)}))}},f.c.checked={after:["value","attr"],init:function(t,i,r){function n(){var n=t.checked,l=a();if(!f.S.Ya()&&(n||!s&&!f.S.qa())){var d=f.u.G(i);if(c){var p=u?d.v():d,m=h;h=l,m!==l?n&&(f.a.Na(p,l,!0),f.a.Na(p,m,!1)):f.a.Na(p,l,n),u&&f.Za(d)&&d(p)}else o&&(l===e?l=n:n||(l=e)),f.m.eb(d,r,"checked",l,!0)}}var a=f.xb((function(){return r.has("checkedValue")?f.a.f(r.get("checkedValue")):d?r.has("value")?f.a.f(r.get("value")):t.value:void 0})),o="checkbox"==t.type,s="radio"==t.type;if(o||s){var l=i(),c=o&&f.a.f(l)instanceof Array,u=!(c&&l.push&&l.splice),d=s||c,h=c?a():e;s&&!t.name&&f.c.uniqueName.init(t,(function(){return!0})),f.o(n,null,{l:t}),f.a.B(t,"click",n),f.o((function(){var r=f.a.f(i()),n=a();c?(t.checked=0<=f.a.A(r,n),h=n):t.checked=o&&n===e?!!r:a()===r}),null,{l:t}),l=e}}},f.m.wa.checked=!0,f.c.checkedValue={update:function(e,t){e.value=f.a.f(t())}},f.c.class={update:function(e,t){var i=f.a.Db(f.a.f(t()));f.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,f.a.Eb(e,i,!0)}},f.c.css={update:function(e,t){var i=f.a.f(t());null!==i&&"object"==typeof i?f.a.P(i,(function(t,i){i=f.a.f(i),f.a.Eb(e,t,i)})):f.c.class.update(e,t)}},f.c.enable={update:function(e,t){var i=f.a.f(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},f.c.disable={update:function(e,t){f.c.enable.update(e,(function(){return!f.a.f(t())}))}},f.c.event={init:function(e,t,i,r,n){var a=t()||{};f.a.P(a,(function(a){"string"==typeof a&&f.a.B(e,a,(function(e){var o,s=t()[a];if(s){try{var l=f.a.la(arguments);r=n.$data,l.unshift(r),o=s.apply(r,l)}finally{!0!==o&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(a+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},f.c.foreach={Rc:function(e){return function(){var t=e(),i=f.a.bc(t);return i&&"number"!=typeof i.length?(f.a.f(t),{foreach:i.data,as:i.as,noChildContext:i.noChildContext,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:f.ba.Ma}):{foreach:t,templateEngine:f.ba.Ma}}},init:function(e,t){return f.c.template.init(e,f.c.foreach.Rc(t))},update:function(e,t,i,r,n){return f.c.template.update(e,f.c.foreach.Rc(t),i,r,n)}},f.m.Ra.foreach=!1,f.h.ea.foreach=!0,f.c.hasfocus={init:function(e,t,i){function r(r){e.__ko_hasfocusUpdating=!0;var n=e.ownerDocument;if("activeElement"in n){var a;try{a=n.activeElement}catch(r){a=n.body}r=a===e}n=t(),f.m.eb(n,i,"hasfocus",r,!0),e.__ko_hasfocusLastValue=r,e.__ko_hasfocusUpdating=!1}var n=r.bind(null,!0),a=r.bind(null,!1);f.a.B(e,"focus",n),f.a.B(e,"focusin",n),f.a.B(e,"blur",a),f.a.B(e,"focusout",a),e.__ko_hasfocusLastValue=!1},update:function(e,t){var i=!!f.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),f.u.G(f.a.Fb,null,[e,i?"focusin":"focusout"]))}},f.m.wa.hasfocus=!0,f.c.hasFocus=f.c.hasfocus,f.m.wa.hasFocus="hasfocus",f.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){f.a.fc(e,t())}},function(){function e(e,t,i){f.c[e]={init:function(e,r,n,a,o){var s,l,c,u,d,h={};if(t){a=n.get("as");var p=n.get("noChildContext");h={as:a,noChildContext:p,exportDependencies:d=!(a&&p)}}return u=(c="render"==n.get("completeOn"))||n.has(f.i.pa),f.o((function(){var n,a=f.a.f(r()),p=!i!=!a,m=!l;(d||p!==s)&&(u&&(o=f.i.Cb(e,o)),p&&(t&&!d||(h.dataDependency=f.S.o()),n=t?o.createChildContext("function"==typeof a?a:r,h):f.S.qa()?o.extend(null,h):o),m&&f.S.qa()&&(l=f.a.Ca(f.h.childNodes(e),!0)),p?(m||f.h.va(e,f.a.Ca(l)),f.Oa(n,e)):(f.h.Ea(e),c||f.i.ma(e,f.i.H)),s=p)}),null,{l:e}),{controlsDescendantBindings:!0}}},f.m.Ra[e]=!1,f.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),f.c.let={init:function(e,t,i,r,n){return t=n.extend(t),f.Oa(t,e),{controlsDescendantBindings:!0}}},f.h.ea.let=!0;var w={};f.c.options={init:function(e){if("select"!==f.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,r){function n(){return f.a.jb(t.options,(function(e){return e.selected}))}function a(e,t,i){var r=typeof t;return"function"==r?t(e):"string"==r?e[t]:i}function o(e,i){if(m&&u)f.i.ma(t,f.i.H);else if(p.length){var r=0<=f.a.A(p,f.w.M(i[0]));f.a.Zc(i[0],r),m&&!r&&f.u.G(f.a.Fb,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,c=f.a.f(i()),u=r.get("valueAllowUnset")&&r.has("value"),d=r.get("optionsIncludeDestroyed");i={};var h,p=[];u||(s?p=f.a.Mb(n(),f.w.M):0<=t.selectedIndex&&p.push(f.w.M(t.options[t.selectedIndex]))),c&&(void 0===c.length&&(c=[c]),h=f.a.jb(c,(function(t){return d||t===e||null===t||!f.a.f(t._destroy)})),r.has("optionsCaption")&&(null!==(c=f.a.f(r.get("optionsCaption")))&&c!==e&&h.unshift(w)));var m=!1;(i.beforeRemove=function(e){t.removeChild(e)},c=o,r.has("optionsAfterRender")&&"function"==typeof r.get("optionsAfterRender")&&(c=function(t,i){o(0,i),f.u.G(r.get("optionsAfterRender"),null,[i[0],t!==w?t:e])}),f.a.ec(t,h,(function(i,n,o){return o.length&&(p=!u&&o[0].selected?[f.w.M(o[0])]:[],m=!0),n=t.ownerDocument.createElement("option"),i===w?(f.a.Bb(n,r.get("optionsCaption")),f.w.cb(n,e)):(o=a(i,r.get("optionsValue"),i),f.w.cb(n,f.a.f(o)),i=a(i,r.get("optionsText"),o),f.a.Bb(n,i)),[n]}),i,c),u)||(s?p.length&&n().length<p.length:p.length&&0<=t.selectedIndex?f.w.M(t.options[t.selectedIndex])!==p[0]:p.length||0<=t.selectedIndex)&&f.u.G(f.a.Fb,null,[t,"change"]);(u||f.S.Ya())&&f.i.ma(t,f.i.H),f.a.wd(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},f.c.options.$b=f.a.g.Z(),f.c.selectedOptions={init:function(e,t,i){function r(){var r=t(),n=[];f.a.D(e.getElementsByTagName("option"),(function(e){e.selected&&n.push(f.w.M(e))})),f.m.eb(r,i,"selectedOptions",n)}function n(){var i=f.a.f(t()),r=e.scrollTop;i&&"number"==typeof i.length&&f.a.D(e.getElementsByTagName("option"),(function(e){var t=0<=f.a.A(i,f.w.M(e));e.selected!=t&&f.a.Zc(e,t)})),e.scrollTop=r}if("select"!=f.a.R(e))throw Error("selectedOptions binding applies only to SELECT elements");var a;f.i.subscribe(e,f.i.H,(function(){a?r():(f.a.B(e,"change",r),a=f.o(n,null,{l:e}))}),null,{notifyImmediately:!0})},update:function(){}},f.m.wa.selectedOptions=!0,f.c.style={update:function(t,i){var r=f.a.f(i()||{});f.a.P(r,(function(i,r){if(null!==(r=f.a.f(r))&&r!==e&&!1!==r||(r=""),n)n(t).css(i,r);else if(/^--/.test(i))t.style.setProperty(i,r);else{i=i.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));var a=t.style[i];t.style[i]=r,r===a||t.style[i]!=a||isNaN(r)||(t.style[i]=r+"px")}}))}},f.c.submit={init:function(e,t,i,r,n){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");f.a.B(e,"submit",(function(i){var r,a=t();try{r=a.call(n.$data,e)}finally{!0!==r&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}}))}},f.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){f.a.Bb(e,t())}},f.h.ea.text=!0,function(){if(t&&t.navigator){var i,r,n,a,o,s=function(e){if(e)return parseFloat(e[1])},l=t.navigator.userAgent;(i=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(o=s(l.match(/Edge\/([^ ]+)$/)))||s(l.match(/Chrome\/([^ ]+)/))||(r=s(l.match(/Version\/([^ ]+) Safari/)))||(n=s(l.match(/Firefox\/([^ ]+)/)))||(a=f.a.W||s(l.match(/MSIE ([^ ]+)/)))||(a=s(l.match(/rv:([^ )]+)/)))}if(8<=a&&10>a)var c=f.a.g.Z(),u=f.a.g.Z(),d=function(e){var t=this.activeElement;(t=t&&f.a.g.get(t,u))&&t(e)},h=function(e,t){var i=e.ownerDocument;f.a.g.get(i,c)||(f.a.g.set(i,c,!0),f.a.B(i,"selectionchange",d)),f.a.g.set(e,u,t)};f.c.textInput={init:function(t,s,l){function c(e,i){f.a.B(t,e,i)}function u(){p||(m=t.value,p=f.a.setTimeout(d,4))}function d(){clearTimeout(p),m=p=e;var i=t.value;g!==i&&(g=i,f.m.eb(s(),l,"textInput",i))}var p,m,g=t.value,y=9==f.a.W?u:d,_=!1;a&&c("keypress",d),11>a&&c("propertychange",(function(e){_||"value"!==e.propertyName||y()})),8==a&&(c("keyup",d),c("keydown",d)),h&&(h(t,y),c("dragend",u)),(!a||9<=a)&&c("input",y),5>r&&"textarea"===f.a.R(t)?(c("keydown",u),c("paste",u),c("cut",u)):11>i?c("keydown",u):4>n?(c("DOMAutoComplete",d),c("dragdrop",d),c("drop",d)):o&&"number"===t.type&&c("keydown",u),c("change",d),c("blur",d),f.o((function i(){var r=f.a.f(s());null!==r&&r!==e||(r=""),m!==e&&r===m?f.a.setTimeout(i,4):t.value!==r&&(_=!0,t.value=r,_=!1,g=t.value)}),null,{l:t})}},f.m.wa.textInput=!0,f.c.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),f.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++f.c.uniqueName.rd;f.a.Yc(e,i)}}},f.c.uniqueName.rd=0,f.c.using={init:function(e,t,i,r,n){var a;return i.has("as")&&(a={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=n.createChildContext(t,a),f.Oa(t,e),{controlsDescendantBindings:!0}}},f.h.ea.using=!0,f.c.value={init:function(t,i,r){var n=f.a.R(t),a="input"==n;if(!a||"checkbox"!=t.type&&"radio"!=t.type){var o=[],s=r.get("valueUpdate"),l=!1,c=null;s&&(o="string"==typeof s?[s]:f.a.wc(s),f.a.Pa(o,"change"));var u,d,h=function(){c=null,l=!1;var e=i(),n=f.w.M(t);f.m.eb(e,r,"value",n)};if(!f.a.W||!a||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=f.a.A(o,"propertychange")||(f.a.B(t,"propertychange",(function(){l=!0})),f.a.B(t,"focus",(function(){l=!1})),f.a.B(t,"blur",(function(){l&&h()}))),f.a.D(o,(function(e){var i=h;f.a.Ud(e,"after")&&(i=function(){c=f.w.M(t),f.a.setTimeout(h,0)},e=e.substring(5)),f.a.B(t,e,i)})),u=a&&"file"==t.type?function(){var r=f.a.f(i());null===r||r===e||""===r?t.value="":f.u.G(h)}:function(){var a=f.a.f(i()),o=f.w.M(t);null!==c&&a===c?f.a.setTimeout(u,0):a===o&&o!==e||("select"===n?(o=r.get("valueAllowUnset"),f.w.cb(t,a,o),o||a===f.w.M(t)||f.u.G(h)):f.w.cb(t,a))},"select"===n)f.i.subscribe(t,f.i.H,(function(){d?r.get("valueAllowUnset")?u():h():(f.a.B(t,"change",h),d=f.o(u,null,{l:t}))}),null,{notifyImmediately:!0});else f.a.B(t,"change",h),f.o(u,null,{l:t})}else f.ib(t,{checkedValue:i})},update:function(){}},f.m.wa.value=!0,f.c.visible={update:function(e,t){var i=f.a.f(t()),r="none"!=e.style.display;i&&!r?e.style.display="":!i&&r&&(e.style.display="none")}},f.c.hidden={update:function(e,t){f.c.visible.update(e,(function(){return!f.a.f(t())}))}},function(e){f.c[e]={init:function(t,i,r,n,a){return f.c.event.init.call(this,t,(function(){var t={};return t[e]=i(),t}),r,n,a)}}}("click"),f.ca=function(){},f.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},f.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},f.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var r=(t=t||i).getElementById(e);if(!r)throw Error("Cannot find template with ID "+e);return new f.C.F(r)}if(1==e.nodeType||8==e.nodeType)return new f.C.ia(e);throw Error("Unknown template type: "+e)},f.ca.prototype.renderTemplate=function(e,t,i,r){return e=this.makeTemplateSource(e,r),this.renderTemplateSource(e,t,i,r)},f.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},f.ca.prototype.rewriteTemplate=function(e,t,i){t=t((e=this.makeTemplateSource(e,i)).text()),e.text(t),e.data("isRewritten",!0)},f.b("templateEngine",f.ca),f.kc=function(){function e(e,t,i,r){e=f.m.ac(e);for(var n=f.m.Ra,a=0;a<e.length;a++){var o=e[a].key;if(Object.prototype.hasOwnProperty.call(n,o)){var s=n[o];if("function"==typeof s){if(o=s(e[a].value))throw Error(o)}else if(!s)throw Error("This template engine does not support the '"+o+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+f.m.vb(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",r.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,(function(e){return f.kc.Ld(e,t)}),i)},Ld:function(r,n){return r.replace(t,(function(t,i,r,a,o){return e(o,i,r,n)})).replace(i,(function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",n)}))},md:function(e,t){return f.aa.Xb((function(i,r){var n=i.nextSibling;n&&n.nodeName.toLowerCase()===t&&f.ib(n,e,r)}))}}}(),f.b("__tr_ambtns",f.kc.md),function(){f.C={},f.C.F=function(e){if(this.F=e){var t=f.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},f.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?f.a.fc(this.F,t):this.F[e]=t};var t=f.a.g.Z()+"_";f.C.F.prototype.data=function(e){if(1===arguments.length)return f.a.g.get(this.F,t+e);f.a.g.set(this.F,t+e,arguments[1])};var i=f.a.g.Z();f.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var r=f.a.g.get(t,i)||{},n=r.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!n||r.jd){var a=this.text();a&&a!==r.bb&&(n=f.a.Md(a,t.ownerDocument),f.a.g.set(t,i,{lb:n,bb:a,jd:!0}))}return n}r=arguments[0],this.ab!==e&&this.text(""),f.a.g.set(t,i,{lb:r})},f.C.ia=function(e){this.F=e},f.C.ia.prototype=new f.C.F,f.C.ia.prototype.constructor=f.C.ia,f.C.ia.prototype.text=function(){if(0==arguments.length){var t=f.a.g.get(this.F,i)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}f.a.g.set(this.F,i,{bb:arguments[0]})},f.b("templateSources",f.C),f.b("templateSources.domElement",f.C.F),f.b("templateSources.anonymousTemplate",f.C.ia)}(),function(){function t(e,t,i){var r;for(t=f.h.nextSibling(t);e&&(r=e)!==t;)i(r,e=f.h.nextSibling(r))}function i(e,i){if(e.length){var r=e[0],n=e[e.length-1],a=r.parentNode,o=f.ga.instance,s=o.preprocessNode;if(s){if(t(r,n,(function(e,t){var i=e.previousSibling,a=s.call(o,e);a&&(e===r&&(r=a[0]||t),e===n&&(n=a[a.length-1]||i))})),e.length=0,!r)return;r===n?e.push(r):(e.push(r,n),f.a.Ua(e,a))}t(r,n,(function(e){1!==e.nodeType&&8!==e.nodeType||f.vc(i,e)})),t(r,n,(function(e){1!==e.nodeType&&8!==e.nodeType||f.aa.cd(e,[i])})),f.a.Ua(e,a)}}function r(e){return e.nodeType?e:0<e.length?e[0]:null}function n(e,t,n,a,s){s=s||{};var l=(e&&r(e)||n||{}).ownerDocument,c=s.templateEngine||o;if(f.kc.xd(n,c,l),"number"!=typeof(n=c.renderTemplate(n,a,s,l)).length||0<n.length&&"number"!=typeof n[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":f.h.va(e,n),l=!0;break;case"replaceNode":f.a.Xc(e,n),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(n,a),s.afterRender&&f.u.G(s.afterRender,null,[n,a[s.as||"$data"]]),"replaceChildren"==t&&f.i.ma(e,f.i.H)),n}function a(e,t,i){return f.O(e)?e():"function"==typeof e?e(t,i):e}var o;f.gc=function(t){if(t!=e&&!(t instanceof f.ca))throw Error("templateEngine must inherit from ko.templateEngine");o=t},f.dc=function(t,i,s,l,c){if(((s=s||{}).templateEngine||o)==e)throw Error("Set a template engine before calling renderTemplate");if(c=c||"replaceChildren",l){var u=r(l);return f.$((function(){var e=i&&i instanceof f.fa?i:new f.fa(i,null,null,null,{exportDependencies:!0}),o=a(t,e.$data,e);e=n(l,c,o,e,s);"replaceNode"==c&&(u=r(l=e))}),null,{Sa:function(){return!u||!f.a.Sb(u)},l:u&&"replaceNode"==c?u.parentNode:u})}return f.aa.Xb((function(e){f.dc(t,i,s,e,"replaceNode")}))},f.Qd=function(t,r,o,s,l){function c(e,t){f.u.G(f.a.ec,null,[s,e,d,o,u,t]),f.i.ma(s,f.i.H)}function u(e,t){i(t,h),o.afterRender&&o.afterRender(t,e),h=null}function d(e,i){h=l.createChildContext(e,{as:p,noChildContext:o.noChildContext,extend:function(e){e.$index=i,p&&(e[p+"Index"]=i)}});var r=a(t,e,h);return n(s,"ignoreTargetNode",r,h,o)}var h,p=o.as,m=!1===o.includeDestroyed||f.options.foreachHidesDestroyed&&!o.includeDestroyed;if(m||o.beforeRemove||!f.Pc(r))return f.$((function(){var t=f.a.f(r)||[];void 0===t.length&&(t=[t]),m&&(t=f.a.jb(t,(function(t){return t===e||null===t||!f.a.f(t._destroy)}))),c(t)}),null,{l:s});c(r.v());var g=r.subscribe((function(e){c(r(),e)}),null,"arrayChange");return g.l(s),g};var s=f.a.g.Z(),l=f.a.g.Z();f.c.template={init:function(e,t){var i=f.a.f(t());if("string"==typeof i||"name"in i)f.h.Ea(e);else if("nodes"in i){if(i=i.nodes||[],f.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');var r=i[0]&&i[0].parentNode;r&&f.a.g.get(r,l)||(r=f.a.Yb(i),f.a.g.set(r,l,!0)),new f.C.ia(e).nodes(r)}else{if(!(0<(i=f.h.childNodes(e)).length))throw Error("Anonymous template defined, but no template content was provided");r=f.a.Yb(i),new f.C.ia(e).nodes(r)}return{controlsDescendantBindings:!0}},update:function(t,i,r,n,a){var o=i();r=!0,n=null,"string"==typeof(i=f.a.f(o))?i={}:(o="name"in i?i.name:t,"if"in i&&(r=f.a.f(i.if)),r&&"ifnot"in i&&(r=!f.a.f(i.ifnot)),r&&!o&&(r=!1)),"foreach"in i?n=f.Qd(o,r&&i.foreach||[],i,t,a):r?(r=a,"data"in i&&(r=a.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),n=f.dc(o,r,i,t)):f.h.Ea(t),a=n,(i=f.a.g.get(t,s))&&"function"==typeof i.s&&i.s(),f.a.g.set(t,s,!a||a.ja&&!a.ja()?e:a)}},f.m.Ra.template=function(e){return 1==(e=f.m.ac(e)).length&&e[0].unknown||f.m.Id(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},f.h.ea.template=!0}(),f.b("setTemplateEngine",f.gc),f.b("renderTemplate",f.dc),f.a.Kc=function(e,t,i){var r,n,a,o,s;if(e.length&&t.length)for(r=n=0;(!i||r<i)&&(o=e[n]);++n){for(a=0;s=t[a];++a)if(o.value===s.value){o.moved=s.index,s.moved=o.index,t.splice(a,1),r=a=0;break}r+=a}},f.a.Pb=function(){function e(e,t,i,r,n){var a,o,s,l,c,u=Math.min,d=Math.max,h=[],p=e.length,m=t.length,g=m-p||1,y=p+m+1;for(a=0;a<=p;a++)for(l=s,h.push(s=[]),c=u(m,a+g),o=d(0,a-1);o<=c;o++)s[o]=o?a?e[a-1]===t[o-1]?l[o-1]:u(l[o]||y,s[o-1]||y)+1:o+1:a+1;for(u=[],d=[],g=[],a=p,o=m;a||o;)m=h[a][o]-1,o&&m===h[a][o-1]?d.push(u[u.length]={status:i,value:t[--o],index:o}):a&&m===h[a-1][o]?g.push(u[u.length]={status:r,value:e[--a],index:a}):(--o,--a,n.sparse||u.push({status:"retained",value:t[o]}));return f.a.Kc(g,d,!n.dontLimitMoves&&10*p),u.reverse()}return function(t,i,r){return r="boolean"==typeof r?{dontLimitMoves:r}:r||{},i=i||[],(t=t||[]).length<i.length?e(t,i,"added","deleted",r):e(i,t,"deleted","added",r)}}(),f.b("utils.compareArrays",f.a.Pb),function(){function t(t,i,r,n,a){var o=[],s=f.$((function(){var e=i(r,a,f.a.Ua(o,t))||[];0<o.length&&(f.a.Xc(o,e),n&&f.u.G(n,null,[r,e,a])),o.length=0,f.a.Nb(o,e)}),null,{l:t,Sa:function(){return!f.a.kd(o)}});return{Y:o,$:s.ja()?s:e}}var i=f.a.g.Z(),r=f.a.g.Z();f.a.ec=function(n,a,o,s,l,c){function u(e){p={Aa:e,pb:f.ta(b++)},C.push(p),v||A.push(p)}function d(e){p=_[e],b!==p.pb.v()&&w.push(p),p.pb(b++),f.a.Ua(p.Y,n),C.push(p)}function h(e,t){if(e)for(var i=0,r=t.length;i<r;i++)f.a.D(t[i].Y,(function(r){e(r,i,t[i].Aa)}))}void 0===(a=a||[]).length&&(a=[a]),s=s||{};var p,m,g,y,_=f.a.g.get(n,i),v=!_,C=[],x=0,b=0,S=[],T=[],E=[],w=[],A=[],P=0;if(v)f.a.D(a,u);else{if(!c||_&&_._countWaitingForRemove){var D=f.a.Mb(_,(function(e){return e.Aa}));c=f.a.Pb(D,a,{dontLimitMoves:s.dontLimitMoves,sparse:!0})}var M,I,R;for(D=0;M=c[D];D++)switch(I=M.moved,R=M.index,M.status){case"deleted":for(;x<R;)d(x++);I===e&&((p=_[x]).$&&(p.$.s(),p.$=e),f.a.Ua(p.Y,n).length&&(s.beforeRemove&&(C.push(p),P++,p.Aa===r?p=null:E.push(p)),p&&S.push.apply(S,p.Y))),x++;break;case"added":for(;b<R;)d(x++);I!==e?(T.push(C.length),d(I)):u(M.value)}for(;b<a.length;)d(x++);C._countWaitingForRemove=P}f.a.g.set(n,i,C),h(s.beforeMove,w),f.a.D(S,s.beforeRemove?f.oa:f.removeNode);try{y=n.ownerDocument.activeElement}catch(a){}if(T.length)for(;(D=T.shift())!=e;){for(p=C[D],m=e;D;)if((g=C[--D].Y)&&g.length){m=g[g.length-1];break}for(a=0;x=p.Y[a];m=x,a++)f.h.Wb(n,x,m)}for(D=0;p=C[D];D++){for(p.Y||f.a.extend(p,t(n,o,p.Aa,l,p.pb)),a=0;x=p.Y[a];m=x,a++)f.h.Wb(n,x,m);!p.Ed&&l&&(l(p.Aa,p.Y,p.pb),p.Ed=!0,m=p.Y[p.Y.length-1])}for(y&&n.ownerDocument.activeElement!=y&&y.focus(),h(s.beforeRemove,E),D=0;D<E.length;++D)E[D].Aa=r;h(s.afterMove,w),h(s.afterAdd,A)}}(),f.b("utils.setDomNodeChildrenFromArrayMapping",f.a.ec),f.ba=function(){this.allowTemplateRewriting=!1},f.ba.prototype=new f.ca,f.ba.prototype.constructor=f.ba,f.ba.prototype.renderTemplateSource=function(e,t,i,r){return(t=9>f.a.W||!e.nodes?null:e.nodes())?f.a.la(t.cloneNode(!0).childNodes):(e=e.text(),f.a.ua(e,r))},f.ba.Ma=new f.ba,f.gc(f.ba.Ma),f.b("nativeTemplateEngine",f.ba),function(){f.$a=function(){var e=this.Hd=function(){if(!n||!n.tmpl)return 0;try{if(0<=n.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,r,a,o){if(o=o||i,a=a||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=n.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[r.$data],r=n.extend({koBindingContext:r},a.templateOptions),(r=n.tmpl(s,t,r)).appendTo(o.createElement("div")),n.fragments={},r},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(n.tmpl.tag.ko_code={open:"__.push($1 || '');"},n.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},f.$a.prototype=new f.ca,f.$a.prototype.constructor=f.$a;var e=new f.$a;0<e.Hd&&f.gc(e),f.b("jqueryTmplTemplateEngine",f.$a)}()}(t.ko={})}();var knockout=ko;"undefined"!=typeof window?(ko=window.ko,void 0!==oldValue?window.ko=oldValue:delete window.ko):(ko=global.ko,void 0!==oldValue?global.ko=oldValue:delete global.ko);var OBSERVABLES_PROPERTY="__knockoutObservables",SUBSCRIBABLE_PROPERTY="__knockoutSubscribable";function track(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,r=getAllObservablesForObject(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach((function(t){var n,a;t!==OBSERVABLES_PROPERTY&&t!==SUBSCRIBABLE_PROPERTY&&(t in r||(n=(a=e[t])instanceof Array,a=i.isObservable(a)?a:n?i.observableArray(a):i.observable(a),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),r[t]=a,n&&notifyWhenPresentOrFutureArrayValuesMutate(i,a)))})),e}function getAllObservablesForObject(e,t){var i=e[OBSERVABLES_PROPERTY];return!i&&t&&(i={},Object.defineProperty(e,OBSERVABLES_PROPERTY,{value:i})),i}function defineComputedProperty(e,t,i){var r={owner:e,deferEvaluation:!0};if("function"==typeof i)r.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');r.read=i.get,r.write=i.set}return e[t]=this.computed(r),track.call(this,e,[t]),e}function notifyWhenPresentOrFutureArrayValuesMutate(e,t){var i=null;e.computed((function(){i&&(i.dispose(),i=null);var r=t();r instanceof Array&&(i=startWatchingArrayInstance(e,t,r))}))}function startWatchingArrayInstance(e,t,i){return getSubscribableForArray(e,i).subscribe(t)}function getSubscribableForArray(e,t){var i,r=t[SUBSCRIBABLE_PROPERTY];return r||(r=new e.subscribable,Object.defineProperty(t,SUBSCRIBABLE_PROPERTY,{value:r}),wrapStandardArrayMutators(t,r,i={}),addKnockoutArrayMutators(e,t,r,i)),r}function wrapStandardArrayMutators(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(r){var n=e[r];e[r]=function(){var e=n.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}}))}function addKnockoutArrayMutators(e,t,i,r){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(n){Object.defineProperty(t,n,{enumerable:!1,value:function(){var a;r.pause=!0;try{a=e.observableArray.fn[n].apply(e.observableArray(t),arguments)}finally{r.pause=!1}return i.notifySubscribers(t),a}})}))}function getObservable(e,t){return e&&(e=getAllObservablesForObject(e,!1))&&e[t]||null}function valueHasMutated(e,t){(t=getObservable(e,t))&&t.valueHasMutated()}function attachToKo(e){e.track=track,e.getObservable=getObservable,e.valueHasMutated=valueHasMutated,e.defineProperty=defineComputedProperty}var knockout_es5={attachToKo:attachToKo},svgNS="http://www.w3.org/2000/svg",svgClassName="cesium-svgPath-svg",SvgPathBindingHandler={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){var r=document.createElementNS(svgNS,"svg:svg");r.setAttribute("class",svgClassName);var n=document.createElementNS(svgNS,"path");return r.appendChild(n),e.virtualElements.setDomNodeChildren(t,[r]),e.computed({read:function(){var t=e.unwrap(i());n.setAttribute("d",e.unwrap(t.path));var a=e.unwrap(t.width),o=e.unwrap(t.height);r.setAttribute("width",a),r.setAttribute("height",o),r.setAttribute("viewBox","0 0 "+a+" "+o),t.css&&r.setAttribute("class",svgClassName+" "+e.unwrap(t.css))},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};function quickselect$1(e,t,i,r,n){quickselectStep$1(e,t,i||0,r||e.length-1,n||defaultCompare$1)}function quickselectStep$1(e,t,i,r,n){for(;i<r;){var a,o,s,l;600<r-i&&(a=r-i+1,o=t-i+1,l=Math.log(a),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(a-s)/a)*(o-a/2<0?-1:1),quickselectStep$1(e,t,Math.max(i,Math.floor(t-o*s/a+l)),Math.min(r,Math.floor(t+(a-o)*s/a+l)),n));var c=e[t],u=i,d=r;for(swap$3(e,i,t),0<n(e[r],c)&&swap$3(e,i,r);u<d;){for(swap$3(e,u,d),u++,d--;n(e[u],c)<0;)u++;for(;0<n(e[d],c);)d--}0===n(e[i],c)?swap$3(e,i,d):swap$3(e,++d,r),d<=t&&(i=d+1),t<=d&&(r=d-1)}}function swap$3(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function defaultCompare$1(e,t){return e<t?-1:t<e?1:0}function ClockViewModel(e){defined(e)||(e=new Clock),this._clock=e,this._eventHelper=new EventHelper,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=knockout.observable(JulianDate.now()),this.systemTime.equalityComparer=JulianDate.equals,this.startTime=knockout.observable(e.startTime),this.startTime.equalityComparer=JulianDate.equals,this.startTime.subscribe((function(t){e.startTime=t,this.synchronize()}),this),this.stopTime=knockout.observable(e.stopTime),this.stopTime.equalityComparer=JulianDate.equals,this.stopTime.subscribe((function(t){e.stopTime=t,this.synchronize()}),this),this.currentTime=knockout.observable(e.currentTime),this.currentTime.equalityComparer=JulianDate.equals,this.currentTime.subscribe((function(t){e.currentTime=t,this.synchronize()}),this),this.multiplier=knockout.observable(e.multiplier),this.multiplier.subscribe((function(t){e.multiplier=t,this.synchronize()}),this),this.clockStep=knockout.observable(e.clockStep),this.clockStep.subscribe((function(t){e.clockStep=t,this.synchronize()}),this),this.clockRange=knockout.observable(e.clockRange),this.clockRange.subscribe((function(t){e.clockRange=t,this.synchronize()}),this),this.canAnimate=knockout.observable(e.canAnimate),this.canAnimate.subscribe((function(t){e.canAnimate=t,this.synchronize()}),this),this.shouldAnimate=knockout.observable(e.shouldAnimate),this.shouldAnimate.subscribe((function(t){e.shouldAnimate=t,this.synchronize()}),this),knockout.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function Command(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,DeveloperError.throwInstantiationError()}knockout_es5.attachToKo(knockout),SvgPathBindingHandler.register(knockout),Object.defineProperties(ClockViewModel.prototype,{clock:{get:function(){return this._clock}}}),ClockViewModel.prototype.synchronize=function(){var e=this._clock;this.systemTime=JulianDate.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},ClockViewModel.prototype.isDestroyed=function(){return!1},ClockViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject(this)};var InspectorShared={};function ToggleButtonViewModel(e,t){this._command=e,t=defaultValue(t,defaultValue.EMPTY_OBJECT),this.toggled=defaultValue(t.toggled,!1),this.tooltip=defaultValue(t.tooltip,""),knockout.track(this,["toggled","tooltip"])}function createCommand$2(e,t){t=defaultValue(t,!0);var i=new Event,r=new Event;function n(){var t,n={args:arguments,cancel:!1};return i.raiseEvent(n),n.cancel||(t=e.apply(null,arguments),r.raiseEvent(t)),t}return n.canExecute=t,knockout.track(n,["canExecute"]),Object.defineProperties(n,{beforeExecute:{value:i},afterExecute:{value:r}}),n}function subscribeAndEvaluate(e,t,i,r,n){return i.call(r,e[t]),knockout.getObservable(e,t).subscribe(i,r,n)}InspectorShared.createCheckbox=function(e,t,i){var r=document.createElement("div"),n=document.createElement("label"),a=document.createElement("input");return a.type="checkbox",t="checked: "+t,defined(i)&&(t+=", enable: "+i),a.setAttribute("data-bind",t),n.appendChild(a),n.appendChild(document.createTextNode(e)),r.appendChild(n),r},InspectorShared.createSection=function(e,t,i,r){var n=document.createElement("div");return n.className="cesium-cesiumInspector-section",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-section-collapsed": !'+i+" }"),e.appendChild(n),(e=document.createElement("h3")).className="cesium-cesiumInspector-sectionHeader",e.appendChild(document.createTextNode(t)),e.setAttribute("data-bind","click: "+r),n.appendChild(e),(e=document.createElement("div")).className="cesium-cesiumInspector-sectionContent",n.appendChild(e),e},Object.defineProperties(ToggleButtonViewModel.prototype,{command:{get:function(){return this._command}}});var DepthViewPacked="uniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nfloat z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\nz_window = czm_reverseLogDepth(z_window);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nfloat z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\nfloat scale = pow(z_ndc * 0.5 + 0.5, 8.0);\ngl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n";function removePipelineExtras(e){return ForEach.shader(e,(function(e){removeExtras(e)})),ForEach.buffer(e,(function(e){removeExtras(e)})),ForEach.image(e,(function(e){removeExtras(e),ForEach.compressedImage(e,(function(e){removeExtras(e)}))})),removeExtras(e),e}function removeExtras(e){defined(e.extras)&&(defined(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}var svgNS$1="http://www.w3.org/2000/svg",xlinkNS="http://www.w3.org/1999/xlink",widgetForDrag,gradientEnabledColor0=Color.fromCssColorString("rgba(247,250,255,0.384)"),gradientEnabledColor1=Color.fromCssColorString("rgba(143,191,255,0.216)"),gradientEnabledColor2=Color.fromCssColorString("rgba(153,197,255,0.098)"),gradientEnabledColor3=Color.fromCssColorString("rgba(255,255,255,0.086)"),gradientDisabledColor0=Color.fromCssColorString("rgba(255,255,255,0.267)"),gradientDisabledColor1=Color.fromCssColorString("rgba(255,255,255,0)"),gradientKnobColor=Color.fromCssColorString("rgba(66,67,68,0.3)"),gradientPointerColor=Color.fromCssColorString("rgba(0,0,0,0.5)");function getElementColor(e){return Color.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var svgIconsById={animation_pathReset:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},animation_pathPause:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},animation_pathPlay:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathPlayReverse:{tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathLoop:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},animation_pathClock:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},animation_pathWingButton:{tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},animation_pathPointer:{tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},animation_pathSwooshFX:{tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}};function svgFromObject(e){var t,i=document.createElementNS(svgNS$1,e.tagName);for(t in e)if(e.hasOwnProperty(t)&&"tagName"!==t)if("children"===t)for(var r=e.children.length,n=0;n<r;++n)i.appendChild(svgFromObject(e.children[n]));else 0===t.indexOf("xlink:")?i.setAttributeNS(xlinkNS,t.substring(6),e[t]):"textContent"===t?i.textContent=e[t]:i.setAttribute(t,e[t]);return i}function svgText(e,t,i){var r=document.createElementNS(svgNS$1,"text");return r.setAttribute("x",e),r.setAttribute("y",t),r.setAttribute("class","cesium-animation-svgText"),(t=document.createElementNS(svgNS$1,"tspan")).textContent=i,r.appendChild(t),r}function setShuttleRingPointer(e,t,i){e.setAttribute("transform","translate(100,100) rotate("+i+")"),t.setAttribute("transform","rotate("+i+")")}var makeColorStringScratch=new Color;function makeColorString(e,t){var i=t.alpha,r=1-i;return makeColorStringScratch.red=e.red*r+t.red*i,makeColorStringScratch.green=e.green*r+t.green*i,makeColorStringScratch.blue=e.blue*r+t.blue*i,makeColorStringScratch.toCssColorString()}function rectButton(e,t,i){var r=svgIconsById[i];return svgFromObject({tagName:"g",class:"cesium-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"rect",class:"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{class:"cesium-animation-buttonPath",id:i,tagName:r.tagName,transform:r.transform,d:r.d},{tagName:"title",textContent:""}]})}function wingButton(e,t,i){var r=svgIconsById[i],n=svgIconsById.animation_pathWingButton;return svgFromObject({tagName:"g",class:"cesium-animation-rectButton",transform:"translate("+e+","+t+")",children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:n.tagName,d:n.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:n.tagName,d:n.d},{class:"cesium-animation-buttonPath",id:i,tagName:r.tagName,transform:r.transform,d:r.d},{tagName:"title",textContent:""}]})}function setShuttleRingFromMouseOrTouch(e,t){var i=e._viewModel,r=i.shuttleRingDragging;if(!r||widgetForDrag===e)if("mousedown"===t.type||r&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||r&&"touchmove"===t.type&&1===t.touches.length){var n,a=e._centerX,o=e._centerY,s=e._svgNode.getBoundingClientRect(),l="touchstart"===t.type||"touchmove"===t.type?(n=t.touches[0].clientX,t.touches[0].clientY):(n=t.clientX,t.clientY);if(!r&&(n>s.right||n<s.left||l<s.top||l>s.bottom))return;var c=e._shuttleRingPointer.getBoundingClientRect();a=n-a-s.left,s=l-o-s.top;180<(s=180*Math.atan2(s,a)/Math.PI+90)&&(s-=360),a=i.shuttleRingAngle,r||n<c.right&&n>c.left&&l>c.top&&l<c.bottom?(widgetForDrag=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=s):s<a?i.slower():a<s&&i.faster(),t.preventDefault()}else e===widgetForDrag&&(widgetForDrag=void 0),i.shuttleRingDragging=!1}function SvgButton(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;var i=this;this._clickFunction=function(){var e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[subscribeAndEvaluate(t,"toggled",this.setToggled,this),subscribeAndEvaluate(t,"tooltip",this.setTooltip,this),subscribeAndEvaluate(t.command,"canExecute",this.setEnabled,this)]}function Animation(e,t){e=getElement(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;var i=e.ownerDocument,r=document.createElement("style");r.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",i.head.insertBefore(r,i.head.childNodes[0]);var n=document.createElement("div");n.className="cesium-animation-theme",n.innerHTML='<div class="cesium-animation-themeNormal"></div><div class="cesium-animation-themeHover"></div><div class="cesium-animation-themeSelect"></div><div class="cesium-animation-themeDisabled"></div><div class="cesium-animation-themeKnob"></div><div class="cesium-animation-themePointer"></div><div class="cesium-animation-themeSwoosh"></div><div class="cesium-animation-themeSwooshHover"></div>',this._theme=n,this._themeNormal=n.childNodes[0],this._themeHover=n.childNodes[1],this._themeSelect=n.childNodes[2],this._themeDisabled=n.childNodes[3],this._themeKnob=n.childNodes[4],this._themePointer=n.childNodes[5],this._themeSwoosh=n.childNodes[6],this._themeSwooshHover=n.childNodes[7];var a=document.createElementNS(svgNS$1,"svg:svg");(this._svgNode=a).setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",xlinkNS);var o=document.createElementNS(svgNS$1,"g");this._topG=o,this._realtimeSVG=new SvgButton(wingButton(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new SvgButton(rectButton(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new SvgButton(rectButton(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new SvgButton(rectButton(84,99,"animation_pathPause"),t.pauseViewModel);var s=document.createElementNS(svgNS$1,"g");s.appendChild(this._realtimeSVG.svgElement),s.appendChild(this._playReverseSVG.svgElement),s.appendChild(this._playForwardSVG.svgElement),s.appendChild(this._pauseSVG.svgElement);var l=svgFromObject({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=l;var c=svgIconsById.animation_pathSwooshFX,u=svgIconsById.animation_pathPointer,d=svgFromObject({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:c.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:c.d},{tagName:c.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:c.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=d,this._shuttleRingPointer=svgFromObject({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:u.tagName,d:u.d});var h=svgFromObject({tagName:"g",transform:"translate(100,100)"});this._knobOuter=svgFromObject({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71}),r=svgFromObject({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:61}),this._knobDate=svgText(0,-24,""),this._knobTime=svgText(0,-7,""),this._knobStatus=svgText(0,-41,""),c=svgFromObject({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:61}),(u=document.createElementNS(svgNS$1,"g")).setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(n),o.appendChild(u),o.appendChild(h),o.appendChild(s),u.appendChild(l),u.appendChild(d),u.appendChild(this._shuttleRingPointer),h.appendChild(this._knobOuter),h.appendChild(r),h.appendChild(this._knobDate),h.appendChild(this._knobTime),h.appendChild(this._knobStatus),h.appendChild(c),a.appendChild(o),e.appendChild(a);var p=this;function f(e){setShuttleRingFromMouseOrTouch(p,e)}this._mouseCallback=f,l.addEventListener("mousedown",f,!0),l.addEventListener("touchstart",f,!0),d.addEventListener("mousedown",f,!0),d.addEventListener("touchstart",f,!0),i.addEventListener("mousemove",f,!0),i.addEventListener("touchmove",f,!0),i.addEventListener("mouseup",f,!0),i.addEventListener("touchend",f,!0),i.addEventListener("touchcancel",f,!0),this._shuttleRingPointer.addEventListener("mousedown",f,!0),this._shuttleRingPointer.addEventListener("touchstart",f,!0),this._knobOuter.addEventListener("mousedown",f,!0),this._knobOuter.addEventListener("touchstart",f,!0);var m,g=this._knobTime.childNodes[0],y=this._knobDate.childNodes[0],_=this._knobStatus.childNodes[0];this._subscriptions=[subscribeAndEvaluate(t.pauseViewModel,"toggled",(function(e){m!==e&&((m=e)?p._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):p._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))})),subscribeAndEvaluate(t,"shuttleRingAngle",(function(e){setShuttleRingPointer(p._shuttleRingPointer,p._knobOuter,e)})),subscribeAndEvaluate(t,"dateLabel",(function(e){y.textContent!==e&&(y.textContent=e)})),subscribeAndEvaluate(t,"timeLabel",(function(e){g.textContent!==e&&(g.textContent=e)})),subscribeAndEvaluate(t,"multiplierLabel",(function(e){_.textContent!==e&&(_.textContent=e)}))],this.applyThemeChanges(),this.resize()}SvgButton.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;t<i;t++)e[t].dispose();destroyObject(this)},SvgButton.prototype.isDestroyed=function(){return!1},SvgButton.prototype.setEnabled=function(e){if(this._enabled!==e){if(!(this._enabled=e))return void this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");this.svgElement.setAttribute("class","cesium-animation-rectButton")}},SvgButton.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))},SvgButton.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(Animation.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Animation.prototype.isDestroyed=function(){return!1},Animation.prototype.destroy=function(){defined(this._observer)&&(this._observer.disconnect(),this._observer=void 0);var e=this._container.ownerDocument,t=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",t,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",t,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",t,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",t,!0),e.removeEventListener("mousemove",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("mouseup",t,!0),e.removeEventListener("touchend",t,!0),e.removeEventListener("touchcancel",t,!0),this._shuttleRingPointer.removeEventListener("mousedown",t,!0),this._shuttleRingPointer.removeEventListener("touchstart",t,!0),this._knobOuter.removeEventListener("mousedown",t,!0),this._knobOuter.removeEventListener("touchstart",t,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();for(var i=this._subscriptions,r=0,n=i.length;r<n;r++)i[r].dispose();return destroyObject(this)},Animation.prototype.resize=function(){var e,t,i,r,n,a=this._container.clientWidth,o=this._container.clientHeight;a===this._lastWidth&&o===this._lastHeight||(i=o,0===(t=a)&&0===o?(t=200,i=132):0===a?t=(i=o)/132*200:0===o&&(i=(t=a)/200*132),r=t/200,n=i/132,(e=this._svgNode).style.cssText="width: "+t+"px; height: "+i+"px; position: absolute; bottom: 0; left: 0; overflow: hidden;",e.setAttribute("width",t),e.setAttribute("height",i),e.setAttribute("viewBox","0 0 "+t+" "+i),this._topG.setAttribute("transform","scale("+r+","+n+")"),this._centerX=Math.max(1,100*r),this._centerY=Math.max(1,100*n),this._lastHeight=a,this._lastWidth=o)},Animation.prototype.applyThemeChanges=function(){var e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(defined(this._observer))return;var t=this;return t._observer=new MutationObserver((function(){e.body.contains(t._container)&&(t._observer.disconnect(),t._observer=void 0,t.applyThemeChanges())})),void t._observer.observe(e,{childList:!0,subtree:!0})}var i=getElementColor(this._themeNormal),r=getElementColor(this._themeHover),n=getElementColor(this._themeSelect),a=getElementColor(this._themeDisabled),o=getElementColor(this._themeKnob),s=getElementColor(this._themePointer),l=getElementColor(this._themeSwoosh),c=getElementColor(this._themeSwooshHover);o=svgFromObject({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(i,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(i,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(i,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(i,gradientEnabledColor3)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(r,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(r,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(r,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(r,gradientEnabledColor3)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(n,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(n,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(n,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(n,gradientEnabledColor3)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(a,gradientDisabledColor0)},{tagName:"stop",offset:"75%","stop-color":makeColorString(a,gradientDisabledColor1)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":makeColorString(s,gradientPointerColor)},{tagName:"stop",offset:"100%","stop-color":makeColorString(s,gradientPointerColor)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":makeColorString(o,gradientEnabledColor0)},{tagName:"stop",offset:"60%","stop-color":makeColorString(o,gradientKnobColor)},{tagName:"stop",offset:"85%","stop-color":makeColorString(o,gradientEnabledColor1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":makeColorString(o,gradientKnobColor)},{tagName:"stop",offset:"60%","stop-color":makeColorString(o,gradientEnabledColor0)},{tagName:"stop",offset:"85%","stop-color":makeColorString(o,gradientEnabledColor3)}]}]});defined(this._defsElement)?this._svgNode.replaceChild(o,this._defsElement):this._svgNode.appendChild(o),this._defsElement=o};var monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],realtimeShuttleRingAngle=15,maxShuttleRingAngle=105;function numberComparator(e,t){return e-t}function getTypicalMultiplierIndex(e,t){return(e=binarySearch(t,e,numberComparator))<0?~e:e}function angleToMultiplier(e,t){if(Math.abs(e)<=realtimeShuttleRingAngle)return e/realtimeShuttleRingAngle;var i,r=realtimeShuttleRingAngle,n=maxShuttleRingAngle;return 0<e?(i=+Math.log(t[t.length-1])/(n-r),Math.exp(0+i*(e-r))):(i=+Math.log(-t[0])/(n-r),-Math.exp(0+i*(Math.abs(e)-r)))}function multiplierToAngle(e,t,i){if(i.clockStep===ClockStep$1.SYSTEM_CLOCK)return realtimeShuttleRingAngle;if(Math.abs(e)<=1)return e*realtimeShuttleRingAngle;var r=t[t.length-1];r<e?e=r:e<-r&&(e=-r);var n,a=realtimeShuttleRingAngle;i=maxShuttleRingAngle;return 0<e?(n=+Math.log(r)/(i-a),+Math.log(e)/n+a):(n=+Math.log(-t[0])/(i-a),-(+Math.log(Math.abs(e))/n+a))}function AnimationViewModel(e){var t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=AnimationViewModel.defaultDateFormatter,this._timeFormatter=AnimationViewModel.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,knockout.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(AnimationViewModel.defaultTicks),this.timeLabel=void 0,knockout.defineProperty(this,"timeLabel",(function(){return t._timeFormatter(t._clockViewModel.currentTime,t)})),this.dateLabel=void 0,knockout.defineProperty(this,"dateLabel",(function(){return t._dateFormatter(t._clockViewModel.currentTime,t)})),this.multiplierLabel=void 0,knockout.defineProperty(this,"multiplierLabel",(function(){var e=t._clockViewModel;return e.clockStep===ClockStep$1.SYSTEM_CLOCK?"Today":(e=e.multiplier)%1==0?e.toFixed(0)+"x":e.toFixed(3).replace(/0{0,3}$/,"")+"x"})),this.shuttleRingAngle=void 0,knockout.defineProperty(this,"shuttleRingAngle",{get:function(){return multiplierToAngle(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,maxShuttleRingAngle),-maxShuttleRingAngle);var i,r,n,a=t._allShuttleRingTicks,o=t._clockViewModel;o.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)!==maxShuttleRingAngle?(n=angleToMultiplier(e,a),t.snapToTicks?n=a[getTypicalMultiplierIndex(n,a)]:0!==n&&(100<(i=Math.abs(n))?(r=i.toFixed(0).length-2,r=Math.pow(10,r),n=Math.round(n/r)*r|0):realtimeShuttleRingAngle<i?n=Math.round(n):1<i?n=+n.toFixed(1):0<i&&(n=+n.toFixed(2))),o.multiplier=n):o.multiplier=0<e?a[a.length-1]:a[0]}}),this._canAnimate=void 0,knockout.defineProperty(this,"_canAnimate",(function(){var e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===ClockRange$1.UNBOUNDED)return!0;var r,n=e.multiplier,a=e.currentTime,o=e.startTime;return(r=i===ClockRange$1.LOOP_STOP?JulianDate.greaterThan(a,o)||a.equals(o)&&0<n:(i=e.stopTime,JulianDate.greaterThan(a,o)&&JulianDate.lessThan(a,i)||a.equals(o)&&0<n||a.equals(i)&&n<0))||(e.shouldAnimate=!1),r})),this._isSystemTimeAvailable=void 0,knockout.defineProperty(this,"_isSystemTimeAvailable",(function(){var e=t._clockViewModel;if(e.clockRange===ClockRange$1.UNBOUNDED)return!0;var i=e.systemTime;return JulianDate.greaterThanOrEquals(i,e.startTime)&&JulianDate.lessThanOrEquals(i,e.stopTime)})),this._isAnimating=void 0,knockout.defineProperty(this,"_isAnimating",(function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)}));var i=createCommand$2((function(){var e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)}));this._pauseViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed((function(){return!t._isAnimating})),tooltip:"Pause"}),i=createCommand$2((function(){var e=t._clockViewModel,i=e.multiplier;0<i&&(e.multiplier=-i),e.shouldAnimate=!0})),this._playReverseViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed((function(){return t._isAnimating&&e.multiplier<0})),tooltip:"Play Reverse"}),i=createCommand$2((function(){var e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0})),this._playForwardViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed((function(){return t._isAnimating&&0<e.multiplier&&e.clockStep!==ClockStep$1.SYSTEM_CLOCK})),tooltip:"Play Forward"}),i=createCommand$2((function(){t._clockViewModel.clockStep=ClockStep$1.SYSTEM_CLOCK}),knockout.getObservable(this,"_isSystemTimeAvailable")),this._playRealtimeViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed((function(){return e.clockStep===ClockStep$1.SYSTEM_CLOCK})),tooltip:knockout.computed((function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"}))}),this._slower=createCommand$2((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,r=getTypicalMultiplierIndex(e.multiplier,i)-1;0<=r&&(e.multiplier=i[r])})),this._faster=createCommand$2((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,r=getTypicalMultiplierIndex(e.multiplier,i)+1;r<i.length&&(e.multiplier=i[r])}))}function BaseLayerPickerViewModel(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).globe,i=defaultValue(e.imageryProviderViewModels,[]),r=defaultValue(e.terrainProviderViewModels,[]);this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=r.slice(0),this.dropDownVisible=!1,knockout.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);var n=knockout.getObservable(this,"imageryProviderViewModels");t=knockout.pureComputed((function(){for(var e=n(),t={},i=0;i<e.length;i++){var r=e[i],a=r.category;defined(t[a])?t[a].push(r):t[a]=[r]}var o=Object.keys(t),s=[];for(i=0;i<o.length;i++){var l=o[i];s.push({name:l,providers:t[l]})}return s}));this._imageryProviders=t;var a=knockout.getObservable(this,"terrainProviderViewModels");t=knockout.pureComputed((function(){for(var e=a(),t={},i=0;i<e.length;i++){var r=e[i],n=r.category;defined(t[n])?t[n].push(r):t[n]=[r]}var o=Object.keys(t),s=[];for(i=0;i<o.length;i++){var l=o[i];s.push({name:l,providers:t[l]})}return s}));this._terrainProviders=t,this.buttonTooltip=void 0,knockout.defineProperty(this,"buttonTooltip",(function(){var e=this.selectedImagery,t=this.selectedTerrain;e=defined(e)?e.name:void 0,t=defined(t)?t.name:void 0;return defined(e)&&defined(t)?e+"\n"+t:defined(e)?e:t})),this.buttonImageUrl=void 0,knockout.defineProperty(this,"buttonImageUrl",(function(){var e=this.selectedImagery;if(defined(e))return e.iconUrl})),this.selectedImagery=void 0;var o=knockout.observable();this._currentImageryProviders=[],knockout.defineProperty(this,"selectedImagery",{get:function(){return o()},set:function(e){if(o()!==e){var t=this._currentImageryProviders,i=t.length,r=this._globe.imageryLayers,n=!1;for(d=0;d<i;d++)for(var a=r.length,s=0;s<a;s++){var l=r.get(s);if(l.imageryProvider===t[d]){r.remove(l),n=!0;break}}if(defined(e)){var c,u=e.creationCommand();if(Array.isArray(u)){for(var d=u.length-1;0<=d;d--)r.addImageryProvider(u[d],0);this._currentImageryProviders=u.slice(0)}else this._currentImageryProviders=[u],n||defined(c=r.get(0))&&r.remove(c),r.addImageryProvider(u,0)}o(e),this.dropDownVisible=!1}else this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var s=knockout.observable();knockout.defineProperty(this,"selectedTerrain",{get:function(){return s()},set:function(e){var t;s()!==e&&(defined(e)&&(t=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(t instanceof EllipsoidTerrainProvider),this._globe.terrainProvider=t,s(e)),this.dropDownVisible=!1}});var l=this;this._toggleDropDown=createCommand$2((function(){l.dropDownVisible=!l.dropDownVisible})),this.selectedImagery=defaultValue(e.selectedImageryProviderViewModel,i[0]),this.selectedTerrain=defaultValue(e.selectedTerrainProviderViewModel,r[0])}function BaseLayerPicker(e,t){e=getElement(e);var i=new BaseLayerPickerViewModel(t),r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(r);var n=document.createElement("img");n.setAttribute("draggable","false"),n.className="cesium-baseLayerPicker-selected",n.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),r.appendChild(n);var a=document.createElement("div");a.className="cesium-baseLayerPicker-dropDown",a.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(a),(t=document.createElement("div")).className="cesium-baseLayerPicker-sectionTitle",t.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),t.innerHTML="Imagery",a.appendChild(t),(n=document.createElement("div")).className="cesium-baseLayerPicker-section",n.setAttribute("data-bind","foreach: _imageryProviders"),a.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-category",n.appendChild(t),(n=document.createElement("div")).className="cesium-baseLayerPicker-categoryTitle",n.setAttribute("data-bind","text: name"),t.appendChild(n),(n=document.createElement("div")).className="cesium-baseLayerPicker-choices",n.setAttribute("data-bind","foreach: providers"),t.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-item",t.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),n.appendChild(t),(n=document.createElement("img")).className="cesium-baseLayerPicker-itemIcon",n.setAttribute("data-bind","attr: { src: iconUrl }"),n.setAttribute("draggable","false"),t.appendChild(n),(n=document.createElement("div")).className="cesium-baseLayerPicker-itemLabel",n.setAttribute("data-bind","text: name"),t.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-sectionTitle",t.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),t.innerHTML="Terrain",a.appendChild(t),(n=document.createElement("div")).className="cesium-baseLayerPicker-section",n.setAttribute("data-bind","foreach: _terrainProviders"),a.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-category",n.appendChild(t),(n=document.createElement("div")).className="cesium-baseLayerPicker-categoryTitle",n.setAttribute("data-bind","text: name"),t.appendChild(n),(n=document.createElement("div")).className="cesium-baseLayerPicker-choices",n.setAttribute("data-bind","foreach: providers"),t.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-item",t.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),n.appendChild(t),(n=document.createElement("img")).className="cesium-baseLayerPicker-itemIcon",n.setAttribute("data-bind","attr: { src: iconUrl }"),n.setAttribute("draggable","false"),t.appendChild(n),(n=document.createElement("div")).className="cesium-baseLayerPicker-itemLabel",n.setAttribute("data-bind","text: name"),t.appendChild(n),knockout.applyBindings(i,r),knockout.applyBindings(i,a),this._viewModel=i,this._container=e,this._element=r,this._dropPanel=a,this._closeDropDown=function(e){r.contains(e.target)||a.contains(e.target)||(i.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function ProviderViewModel(e){var t=e.creationFunction;defined(t.canExecute)||(t=createCommand$2(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=defaultValue(e.category,""),knockout.track(this,["name","tooltip","iconUrl"])}function createDefaultImageryProviderViewModels(){var e=[];return e.push(new ProviderViewModel({name:"Bing Maps Aerial",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImagery({style:IonWorldImageryStyle$1.AERIAL})}})),e.push(new ProviderViewModel({name:"Bing Maps Aerial with Labels",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImagery({style:IonWorldImageryStyle$1.AERIAL_WITH_LABELS})}})),e.push(new ProviderViewModel({name:"Bing Maps Roads",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImagery({style:IonWorldImageryStyle$1.ROAD})}})),e.push(new ProviderViewModel({name:"ESRI World Imagery",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide.  The map includes NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal.  Additionally, imagery at different resolutions has been contributed by the GIS User Community.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new ArcGisMapServerImageryProvider({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"ESRI World Street Map",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new ArcGisMapServerImageryProvider({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"ESRI National Geographic",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new ArcGisMapServerImageryProvider({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"Open­Street­Map",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return new OpenStreetMapImageryProvider({url:"https://a.tile.openstreetmap.org/"})}})),e.push(new ProviderViewModel({name:"Stamen Watercolor",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\nhttp://maps.stamen.com",category:"Other",creationFunction:function(){return new OpenStreetMapImageryProvider({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new ProviderViewModel({name:"Stamen Toner",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\nhttp://maps.stamen.com",category:"Other",creationFunction:function(){return new OpenStreetMapImageryProvider({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new ProviderViewModel({name:"Sentinel-2",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return new IonImageryProvider({assetId:3954})}})),e.push(new ProviderViewModel({name:"Blue Marble",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return new IonImageryProvider({assetId:3845})}})),e.push(new ProviderViewModel({name:"Earth at night",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return new IonImageryProvider({assetId:3812})}})),e.push(new ProviderViewModel({name:"Natural Earth II",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",category:"Cesium ion",creationFunction:function(){return new TileMapServiceImageryProvider({url:buildModuleUrl("Assets/Textures/NaturalEarthII")})}})),e}function createDefaultTerrainProviderViewModels(){var e=[];return e.push(new ProviderViewModel({name:"WGS84 Ellipsoid",iconUrl:buildModuleUrl("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new EllipsoidTerrainProvider}})),e.push(new ProviderViewModel({name:"Cesium World Terrain",iconUrl:buildModuleUrl("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldTerrain({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function getPickTileset(e){return function(t){defined(t=e._scene.pick(t.position))&&t.primitive instanceof Cesium3DTileset&&(e.tileset=t.primitive),e.pickActive=!1}}function selectTilesetOnHover(e,t){t?e._eventHandler.setInputAction((function(t){defined(t=e._scene.pick(t.endPosition))&&t.primitive instanceof Cesium3DTileset&&(e.tileset=t.primitive)}),ScreenSpaceEventType$1.MOUSE_MOVE):(e._eventHandler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE),e.picking=e.picking)}AnimationViewModel.defaultDateFormatter=function(e,t){return e=JulianDate.toGregorianDate(e),monthNames[e.month-1]+" "+e.day+" "+e.year},AnimationViewModel.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800],AnimationViewModel.defaultTimeFormatter=function(e,t){var i=JulianDate.toGregorianDate(e);e=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?sprintf("%02d:%02d:%02d.%03d",i.hour,i.minute,i.second,e):sprintf("%02d:%02d:%02d UTC",i.hour,i.minute,i.second)},AnimationViewModel.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},AnimationViewModel.prototype.setShuttleRingTicks=function(e){var t,i={},r=this._sortedFilteredPositiveTicks;for(o=r.length=0,n=e.length;o<n;++o)t=e[o],i.hasOwnProperty(t)||(i[t]=!0,r.push(t));r.sort(numberComparator);for(var n,a=[],o=(n=r.length)-1;0<=o;--o)0!==(t=r[o])&&a.push(-t);Array.prototype.push.apply(a,r),this._allShuttleRingTicks=a},Object.defineProperties(AnimationViewModel.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){this._timeFormatter=e}}}),AnimationViewModel._maxShuttleRingAngle=maxShuttleRingAngle,AnimationViewModel._realtimeShuttleRingAngle=realtimeShuttleRingAngle,Object.defineProperties(BaseLayerPickerViewModel.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(BaseLayerPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),BaseLayerPicker.prototype.isDestroyed=function(){return!1},BaseLayerPicker.prototype.destroy=function(){return FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._element),knockout.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),destroyObject(this)},Object.defineProperties(ProviderViewModel.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var stringOptions$1={maximumFractionDigits:3};function formatMemoryString$1(e){return(e/=1048576)<1?e.toLocaleString(void 0,stringOptions$1):Math.round(e).toLocaleString()}function getStatistics(e,t){if(!defined(e))return"";var i=t?e._statisticsPerPass[Cesium3DTilePass$1.PICK]:e._statisticsPerPass[Cesium3DTilePass$1.RENDER];e='<ul class="cesium-cesiumInspector-statistics">';return e+="<li><strong>Visited: </strong>"+i.visited.toLocaleString()+"</li><li><strong>Selected: </strong>"+i.selected.toLocaleString()+"</li><li><strong>Commands: </strong>"+i.numberOfCommands.toLocaleString()+"</li>",e+="</ul>",t||(e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Requests: </strong>"+i.numberOfPendingRequests.toLocaleString()+"</li><li><strong>Attempted: </strong>"+i.numberOfAttemptedRequests.toLocaleString()+"</li><li><strong>Processing: </strong>"+i.numberOfTilesProcessing.toLocaleString()+"</li><li><strong>Content Ready: </strong>"+i.numberOfTilesWithContentReady.toLocaleString()+"</li><li><strong>Total: </strong>"+i.numberOfTilesTotal.toLocaleString()+"</li>",e+="</ul>",e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Features Selected: </strong>"+i.numberOfFeaturesSelected.toLocaleString()+"</li><li><strong>Features Loaded: </strong>"+i.numberOfFeaturesLoaded.toLocaleString()+"</li><li><strong>Points Selected: </strong>"+i.numberOfPointsSelected.toLocaleString()+"</li><li><strong>Points Loaded: </strong>"+i.numberOfPointsLoaded.toLocaleString()+"</li><li><strong>Triangles Selected: </strong>"+i.numberOfTrianglesSelected.toLocaleString()+"</li>",e+="</ul>",e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Tiles styled: </strong>"+i.numberOfTilesStyled.toLocaleString()+"</li><li><strong>Features styled: </strong>"+i.numberOfFeaturesStyled.toLocaleString()+"</li>",e+="</ul>",e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Children Union Culled: </strong>"+i.numberOfTilesCulledWithChildrenUnion.toLocaleString()+"</li>",e+="</ul>",e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Geometry Memory (MB): </strong>"+formatMemoryString$1(i.geometryByteLength)+"</li><li><strong>Texture Memory (MB): </strong>"+formatMemoryString$1(i.texturesByteLength)+"</li><li><strong>Batch Table Memory (MB): </strong>"+formatMemoryString$1(i.batchTableByteLength)+"</li>",e+="</ul>"),e}var colorBlendModes=[{text:"Highlight",value:Cesium3DTileColorBlendMode$1.HIGHLIGHT},{text:"Replace",value:Cesium3DTileColorBlendMode$1.REPLACE},{text:"Mix",value:Cesium3DTileColorBlendMode$1.MIX}],highlightColor$1=new Color(1,1,0,.4),scratchColor$l=new Color,oldColor=new Color;function Cesium3DTilesInspectorViewModel(e,t){var i=this,r=e.canvas;this._eventHandler=new ScreenSpaceEventHandler(r),this._scene=e,this._performanceContainer=t,this._canvas=r,this._performanceDisplay=new PerformanceDisplay({container:t}),this._statisticsText="",this._pickStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this._tileset=void 0,this._feature=void 0,this._tile=void 0,knockout.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_editorError","showPickStatistics","showStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile"]),this._properties=knockout.observable({}),this.properties=[],knockout.defineProperty(this,"properties",(function(){var e,t=[],r=i._properties();for(e in r)r.hasOwnProperty(e)&&t.push(e);return t}));var n=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return n()},set:function(e){n(e),defined(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;var a=knockout.observable();knockout.defineProperty(this,"colorBlendMode",{get:function(){return a()},set:function(e){a(e),defined(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=Cesium3DTileColorBlendMode$1.HIGHLIGHT;var o=knockout.observable(),s=knockout.observable();knockout.defineProperty(this,"picking",{get:function(){return s()},set:function(t){s(t),t?i._eventHandler.setInputAction((function(t){var r,n=e.pick(t.endPosition);n instanceof Cesium3DTileFeature?(i.feature=n,i.tile=n.content.tile):defined(n)&&defined(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),defined(i._tileset)&&(o&&defined(n)&&defined(n.content)?(e.pickPositionSupported&&defined(r=e.pickPosition(t.endPosition))&&(i._tileset.debugPickPosition=r),i._tileset.debugPickedTile=n.content.tile):i._tileset.debugPickedTile=void 0,i._scene.requestRender())}),ScreenSpaceEventType$1.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE))}}),this.picking=!0;var l=knockout.observable();knockout.defineProperty(this,"colorize",{get:function(){return l()},set:function(e){l(e),defined(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;var c=knockout.observable();knockout.defineProperty(this,"wireframe",{get:function(){return c()},set:function(e){c(e),defined(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;var u=knockout.observable();knockout.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(e){u(e),defined(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;var d=knockout.observable();knockout.defineProperty(this,"showContentBoundingVolumes",{get:function(){return d()},set:function(e){d(e),defined(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;var h=knockout.observable();knockout.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),defined(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;var p=knockout.observable();knockout.defineProperty(this,"freezeFrame",{get:function(){return p()},set:function(e){p(e),defined(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1,knockout.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return o()},set:function(e){o(e),defined(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;var f=knockout.observable();knockout.defineProperty(this,"showGeometricError",{get:function(){return f()},set:function(e){f(e),defined(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;var m=knockout.observable();knockout.defineProperty(this,"showRenderingStatistics",{get:function(){return m()},set:function(e){m(e),defined(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;var g=knockout.observable();knockout.defineProperty(this,"showMemoryUsage",{get:function(){return g()},set:function(e){g(e),defined(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;var y=knockout.observable();knockout.defineProperty(this,"showUrl",{get:function(){return y()},set:function(e){y(e),defined(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;var _=knockout.observable();knockout.defineProperty(this,"maximumScreenSpaceError",{get:function(){return _()},set:function(e){e=Number(e),isNaN(e)||(_(e),defined(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;var v=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),defined(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,knockout.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(v(),1/6)},set:function(e){v(Math.pow(e,6))}});var C=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),defined(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=4;var x=getPickTileset(this),b=knockout.observable();knockout.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction(x,ScreenSpaceEventType$1.LEFT_CLICK):i._eventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)}});var S=knockout.observable();knockout.defineProperty(this,"pointCloudShading",{get:function(){return S()},set:function(e){S(e),defined(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;var T=knockout.observable();knockout.defineProperty(this,"geometricErrorScale",{get:function(){return T()},set:function(e){e=Number(e),isNaN(e)||(T(e),defined(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;var E=knockout.observable();knockout.defineProperty(this,"maximumAttenuation",{get:function(){return E()},set:function(e){e=Number(e),isNaN(e)||(E(e),defined(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;var w=knockout.observable();knockout.defineProperty(this,"baseResolution",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),defined(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;var A=knockout.observable();knockout.defineProperty(this,"eyeDomeLighting",{get:function(){return A()},set:function(e){A(e),defined(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;var P=knockout.observable();knockout.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),defined(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;var D=knockout.observable();knockout.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return D()},set:function(e){e=Number(e),isNaN(e)||(D(e),defined(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;var M=knockout.observable();knockout.defineProperty(this,"skipLevelOfDetail",{get:function(){return M()},set:function(e){M(e),defined(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;var I=knockout.observable();knockout.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return I()},set:function(e){e=Number(e),isNaN(e)||(I(e),defined(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;var R=knockout.observable();knockout.defineProperty(this,"baseScreenSpaceError",{get:function(){return R()},set:function(e){e=Number(e),isNaN(e)||(R(e),defined(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;var O=knockout.observable();knockout.defineProperty(this,"skipLevels",{get:function(){return O()},set:function(e){e=Number(e),isNaN(e)||(O(e),defined(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;var L=knockout.observable();knockout.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return L()},set:function(e){L(e),defined(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;var N=knockout.observable();knockout.defineProperty(this,"loadSiblings",{get:function(){return N()},set:function(e){N(e),defined(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()})),defined(this._tileset)||selectTilesetOnHover(this,!0)}function hasFeatures(e){if(0<e.featuresLength)return 1;var t=e.innerContents;if(defined(t)){for(var i=t.length,r=0;r<i;++r)if(!hasFeatures(t[r]))return;return 1}}function Cesium3DTilesInspector(e,t){e=getElement(e);var i=document.createElement("div"),r=document.createElement("div");r.setAttribute("data-bind","visible: performance");var n=new Cesium3DTilesInspectorViewModel(t,r);this._viewModel=n,this._container=e,this._element=i,(p=document.createElement("div")).textContent="3D Tiles Inspector",p.className="cesium-cesiumInspector-button",p.setAttribute("data-bind","click: toggleInspector"),i.appendChild(p),i.className="cesium-cesiumInspector cesium-3DTilesInspector",i.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);var a=document.createElement("div");(this._panel=a).className="cesium-cesiumInspector-dropDown",i.appendChild(a);var o=InspectorShared.createSection,s=InspectorShared.createCheckbox,l=o(a,"Tileset","tilesetVisible","toggleTileset"),c=o(a,"Display","displayVisible","toggleDisplay"),u=o(a,"Update","updateVisible","toggleUpdate"),d=o(a,"Logging","loggingVisible","toggleLogging"),h=o(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),p=(t=o(a,"Style","styleVisible","toggleStyle"),o(a,"Optimization","optimizationVisible","toggleOptimization"));(e=document.createElement("div")).className="field-group",(o=document.createElement("label")).className="field-label",o.appendChild(document.createTextNode("Properties: ")),(a=document.createElement("div")).setAttribute("data-bind","text: properties"),e.appendChild(o),e.appendChild(a),l.appendChild(e),l.appendChild(makeButton("togglePickTileset","Pick Tileset","pickActive")),l.appendChild(makeButton("trimTilesCache","Trim Tiles Cache")),l.appendChild(s("Enable Picking","picking")),c.appendChild(s("Colorize","colorize")),c.appendChild(s("Wireframe","wireframe")),c.appendChild(s("Bounding Volumes","showBoundingVolumes")),c.appendChild(s("Content Volumes","showContentBoundingVolumes")),c.appendChild(s("Request Volumes","showRequestVolumes")),c.appendChild(s("Point Cloud Shading","pointCloudShading")),(l=document.createElement("div")).setAttribute("data-bind","visible: pointCloudShading"),l.appendChild(makeRangeInput("geometricErrorScale",0,2,.01,"Geometric Error Scale")),l.appendChild(makeRangeInput("maximumAttenuation",0,32,1,"Maximum Attenuation")),l.appendChild(makeRangeInput("baseResolution",0,1,.01,"Base Resolution")),l.appendChild(s("Eye Dome Lighting (EDL)","eyeDomeLighting")),c.appendChild(l),(c=document.createElement("div")).setAttribute("data-bind","visible: eyeDomeLighting"),c.appendChild(makeRangeInput("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),c.appendChild(makeRangeInput("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),l.appendChild(c),u.appendChild(s("Freeze Frame","freezeFrame")),u.appendChild(s("Dynamic Screen Space Error","dynamicScreenSpaceError")),(c=document.createElement("div")).appendChild(makeRangeInput("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),u.appendChild(c),(c=document.createElement("div")).setAttribute("data-bind","visible: dynamicScreenSpaceError"),c.appendChild(makeRangeInput("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),c.appendChild(makeRangeInput("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),u.appendChild(c),d.appendChild(s("Performance","performance")),d.appendChild(r),d.appendChild(s("Statistics","showStatistics")),(r=document.createElement("div")).className="cesium-3dTilesInspector-statistics",r.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),d.appendChild(r),d.appendChild(s("Pick Statistics","showPickStatistics")),(r=document.createElement("div")).className="cesium-3dTilesInspector-statistics",r.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),d.appendChild(r),r=document.createElement("div"),t.appendChild(r),r.appendChild(document.createTextNode("Color Blend Mode: ")),(t=document.createElement("select")).setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),r.appendChild(t),(t=document.createElement("textarea")).setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),r.className="cesium-cesiumInspector-styleEditor",r.appendChild(t),t=makeButton("compileStyle","Compile (Ctrl+Enter)"),r.appendChild(t),(t=document.createElement("div")).className="cesium-cesiumInspector-error",t.setAttribute("data-bind","text: editorError"),r.appendChild(t),h.appendChild(s("Show Picked Only","showOnlyPickedTileDebugLabel")),h.appendChild(s("Geometric Error","showGeometricError")),h.appendChild(s("Rendering Statistics","showRenderingStatistics")),h.appendChild(s("Memory Usage (MB)","showMemoryUsage")),h.appendChild(s("Url","showUrl")),p.appendChild(s("Skip Tile LODs","skipLevelOfDetail")),(h=document.createElement("div")).appendChild(makeRangeInput("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),p.appendChild(h),(h=document.createElement("div")).appendChild(makeRangeInput("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),p.appendChild(h),(h=document.createElement("div")).appendChild(makeRangeInput("skipLevels",0,10,1,"Min. levels to skip")),p.appendChild(h),p.appendChild(s("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),p.appendChild(s("Load siblings of visible tiles","loadSiblings")),knockout.applyBindings(n,i)}function makeRangeInput(e,t,i,r,n,a){a=defaultValue(a,e);var o=document.createElement("input");return o.setAttribute("data-bind","value: "+a),o.type="number",(a=document.createElement("input")).type="range",a.min=t,a.max=i,a.step=r,a.setAttribute("data-bind",'valueUpdate: "input", value: '+e),(e=document.createElement("div")).appendChild(a),(a=document.createElement("div")).className="cesium-cesiumInspector-slider",a.appendChild(document.createTextNode(n)),a.appendChild(o),a.appendChild(e),a}function makeButton(e,t,i){var r=document.createElement("button");return r.type="button",r.textContent=t,r.className="cesium-cesiumInspector-pickButton",e="click: "+e,defined(i)&&(e+=', css: {"cesium-cesiumInspector-pickButtonHighlight" : '+i+"}"),r.setAttribute("data-bind",e),r}function frustumStatisticsToString(e){var t;if(defined(e)){t="Command Statistics";var i,r=e.commandsInFrustums;for(i in r)if(r.hasOwnProperty(i)){var n,a=parseInt(i,10);if(7===a)n="1, 2 and 3";else{for(var o=[],s=2;0<=s;s--){var l=Math.pow(2,s);l<=a&&(o.push(s+1),a-=l)}n=o.reverse().join(" and ")}t+="<br>&nbsp;&nbsp;&nbsp;&nbsp;"+r[i]+" in frustum "+n}t+="<br>Total: "+e.totalCommands}return t}function boundDepthFrustum(e,t,i){return t=Math.min(i,t),Math.max(t,e)}Object.defineProperties(Cesium3DTilesInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},colorBlendModes:{get:function(){return colorBlendModes}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,defined(e)){var t=this;e.readyPromise.then((function(e){t.isDestroyed()||t._properties(e.properties)}));for(var i=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],r=i.length,n=0;n<r;++n){var a=i[n];this[a]=this[a]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings;var o=e.pointCloudShading;this.pointCloudShading=o.attenuation,this.geometricErrorScale=o.geometricErrorScale,this.maximumAttenuation=o.maximumAttenuation?o.maximumAttenuation:0,this.baseResolution=o.baseResolution?o.baseResolution:0,this.eyeDomeLighting=o.eyeDomeLighting,this.eyeDomeLightingStrength=o.eyeDomeLightingStrength,this.eyeDomeLightingRadius=o.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=getStatistics(e,!1),this._pickStatisticsText=getStatistics(e,!0),selectTilesetOnHover(this,!1)}},feature:{get:function(){return this._feature},set:function(e){var t;this._feature!==e&&(defined(t=this._feature)&&!t.content.isDestroyed()&&(!this.colorize&&defined(this._style)?t.color=defined(this._style.color)?this._style.color.evaluateColor(t,scratchColor$l):Color.WHITE:t.color=oldColor,this._scene.requestRender()),defined(e)&&(Color.clone(e.color,oldColor),e.color=highlightColor$1,this._scene.requestRender()),this._feature=e)}},tile:{get:function(){return this._tile},set:function(e){var t;this._tile!==e&&(!defined(t=this._tile)||t.isDestroyed()||hasFeatures(t.content)||(t.color=oldColor,this._scene.requestRender()),defined(e)&&!hasFeatures(e.content)&&(Color.clone(e.color,oldColor),e.color=highlightColor$1,this._scene.requestRender()),this._tile=e)}}}),Cesium3DTilesInspectorViewModel.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},Cesium3DTilesInspectorViewModel.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},Cesium3DTilesInspectorViewModel.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},Cesium3DTilesInspectorViewModel.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},Cesium3DTilesInspectorViewModel.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},Cesium3DTilesInspectorViewModel.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},Cesium3DTilesInspectorViewModel.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},Cesium3DTilesInspectorViewModel.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},Cesium3DTilesInspectorViewModel.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},Cesium3DTilesInspectorViewModel.prototype.trimTilesCache=function(){defined(this._tileset)&&this._tileset.trimLoadedTiles()},Cesium3DTilesInspectorViewModel.prototype.compileStyle=function(){var e=this._tileset;if(defined(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new Cesium3DTileStyle(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},Cesium3DTilesInspectorViewModel.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();var i,r=t.target,n=r.selectionStart,a=r.selectionEnd,o=a,s=r.value.slice(n,a).split("\n"),l=s.length;if(t.shiftKey)for(i=0;i<l;++i)" "===s[i][0]&&(" "===s[i][1]?(s[i]=s[i].substr(2),o-=2):(s[i]=s[i].substr(1),--o));else for(i=0;i<l;++i)s[i]="  "+s[i],o+=2;var c=s.join("\n");r.value=r.value.slice(0,n)+c+r.value.slice(a),r.selectionStart=n!==a?n:o,r.selectionEnd=o}else!t.ctrlKey||10!==t.keyCode&&13!==t.keyCode||this.compileStyle();return!0},Cesium3DTilesInspectorViewModel.prototype._update=function(){var e=this._tileset;if(this.performance&&this._performanceDisplay.update(),defined(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);var t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null,"  ")))}this.showStatistics&&(this._statisticsText=getStatistics(e,!1),this._pickStatisticsText=getStatistics(e,!0))},Cesium3DTilesInspectorViewModel.prototype.isDestroyed=function(){return!1},Cesium3DTilesInspectorViewModel.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();var e=this;return this._definedProperties.forEach((function(t){knockout.getObservable(e,t).dispose()})),destroyObject(this)},Cesium3DTilesInspectorViewModel.getStatistics=getStatistics,Object.defineProperties(Cesium3DTilesInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Cesium3DTilesInspector.prototype.isDestroyed=function(){return!1},Cesium3DTilesInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject(this)};var scratchPickRay$1=new Ray,scratchPickCartesian$1=new Cartesian3;function CesiumInspectorViewModel(e,t){var i=this,r=e.canvas,n=new ScreenSpaceEventHandler(r);this._eventHandler=n,this._scene=e,this._canvas=r,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;var a,o=this._scene.globe;function s(e){defined(e=i._scene.pick({x:e.position.x,y:e.position.y}))&&(i.primitive=defined(e.collection)?e.collection:e.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function l(e){var t,r=o.ellipsoid;e=i._scene.camera.getPickRay(e.position,scratchPickRay$1);if(defined(e=o.pick(e,i._scene,scratchPickCartesian$1)))for(var n=r.cartesianToCartographic(e),a=o._surface.tileProvider._tilesToRenderByTextureCount,s=0;!t&&s<a.length;++s){var l=a[s];if(defined(l))for(var c=0;!t&&c<l.length;++c){var u=l[c];Rectangle.contains(u.rectangle,n)&&(t=u)}}i.tile=t,i.pickTileActive=!1}o.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.globeDepth=!1,this.pickDepth=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",knockout.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","globeDepth","pickDepth","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=createCommand$2((function(){i.dropDownVisible=!i.dropDownVisible})),this._toggleGeneral=createCommand$2((function(){i.generalVisible=!i.generalVisible})),this._togglePrimitives=createCommand$2((function(){i.primitivesVisible=!i.primitivesVisible})),this._toggleTerrain=createCommand$2((function(){i.terrainVisible=!i.terrainVisible})),this._frustumsSubscription=knockout.getObservable(this,"frustums").subscribe((function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()})),this._frustumPlanesSubscription=knockout.getObservable(this,"frustumPlanes").subscribe((function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()})),this._performanceSubscription=knockout.getObservable(this,"performance").subscribe((function(e){e?i._performanceDisplay=new PerformanceDisplay({container:i._performanceContainer}):i._performanceContainer.innerHTML=""})),this._showPrimitiveBoundingSphere=createCommand$2((function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0})),this._primitiveBoundingSphereSubscription=knockout.getObservable(this,"primitiveBoundingSphere").subscribe((function(){i._showPrimitiveBoundingSphere()})),this._showPrimitiveReferenceFrame=createCommand$2((function(){var e;return i.primitiveReferenceFrame?(e=i._primitive.modelMatrix,i._modelMatrixPrimitive=new DebugModelMatrixPrimitive({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)):defined(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0),i._scene.requestRender(),!0})),this._primitiveReferenceFrameSubscription=knockout.getObservable(this,"primitiveReferenceFrame").subscribe((function(){i._showPrimitiveReferenceFrame()})),this._doFilterPrimitive=createCommand$2((function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!defined(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!defined(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0})),this._filterPrimitiveSubscription=knockout.getObservable(this,"filterPrimitive").subscribe((function(){i._doFilterPrimitive(),i._scene.requestRender()})),this._wireframeSubscription=knockout.getObservable(this,"wireframe").subscribe((function(e){o._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()})),this._globeDepthSubscription=knockout.getObservable(this,"globeDepth").subscribe((function(e){i._scene.debugShowGlobeDepth=e,i._scene.requestRender()})),this._pickDepthSubscription=knockout.getObservable(this,"pickDepth").subscribe((function(e){i._scene.debugShowPickDepth=e,i._scene.requestRender()})),this._depthFrustumSubscription=knockout.getObservable(this,"depthFrustum").subscribe((function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()})),this._incrementDepthFrustum=createCommand$2((function(){var e=i.depthFrustum+1;return i.depthFrustum=boundDepthFrustum(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._decrementDepthFrustum=createCommand$2((function(){var e=i.depthFrustum-1;return i.depthFrustum=boundDepthFrustum(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._suspendUpdatesSubscription=knockout.getObservable(this,"suspendUpdates").subscribe((function(e){(o._surface._debug.suspendLodUpdate=e)||(i.filterTile=!1)})),this._showTileCoordinates=createCommand$2((function(){return i.tileCoordinates&&!defined(a)?a=e.imageryLayers.addImageryProvider(new TileCoordinatesImageryProvider({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&defined(a)&&(e.imageryLayers.remove(a),a=void 0),!0})),this._tileCoordinatesSubscription=knockout.getObservable(this,"tileCoordinates").subscribe((function(){i._showTileCoordinates(),i._scene.requestRender()})),this._tileBoundingSphereSubscription=knockout.getObservable(this,"tileBoundingSphere").subscribe((function(){i._showTileBoundingSphere(),i._scene.requestRender()})),this._showTileBoundingSphere=createCommand$2((function(){return i.tileBoundingSphere?o._surface.tileProvider._debug.boundingSphereTile=i._tile:o._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0})),this._doFilterTile=createCommand$2((function(){return i.filterTile?(i.suspendUpdates=!0,o._surface._tilesToRender=[],defined(i._tile)&&i._tile.renderable&&o._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0})),this._filterTileSubscription=knockout.getObservable(this,"filterTile").subscribe((function(){i.doFilterTile(),i._scene.requestRender()})),this._pickPrimitive=createCommand$2((function(){i.pickPrimitiveActive=!i.pickPrimitiveActive})),this._pickPrimitiveActiveSubscription=knockout.getObservable(this,"pickPrimitiveActive").subscribe((function(e){e?n.setInputAction(s,ScreenSpaceEventType$1.LEFT_CLICK):n.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)})),this._pickTile=createCommand$2((function(){i.pickTileActive=!i.pickTileActive})),this._pickTileActiveSubscription=knockout.getObservable(this,"pickTileActive").subscribe((function(e){e?n.setInputAction(l,ScreenSpaceEventType$1.LEFT_CLICK):n.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)})),this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()}))}function CesiumInspector(e,t){e=getElement(e);var i=document.createElement("div"),r=new CesiumInspectorViewModel(t,i);this._viewModel=r,this._container=e;var n=document.createElement("div");this._element=n;var a=document.createElement("div");a.textContent="Cesium Inspector",a.className="cesium-cesiumInspector-button",a.setAttribute("data-bind","click: toggleDropDown"),n.appendChild(a),n.className="cesium-cesiumInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);var o=document.createElement("div");(this._panel=o).className="cesium-cesiumInspector-dropDown",n.appendChild(o);var s=InspectorShared.createSection,l=InspectorShared.createCheckbox,c=s(o,"General","generalVisible","toggleGeneral"),u=l("Show Frustums","frustums"),d=document.createElement("div");d.className="cesium-cesiumInspector-frustumStatistics",d.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),u.appendChild(d),c.appendChild(u),c.appendChild(l("Show Frustum Planes","frustumPlanes")),c.appendChild(l("Performance Display","performance")),i.className="cesium-cesiumInspector-performanceDisplay",c.appendChild(i);var h=document.createElement("div");h.className="cesium-cesiumInspector-shaderCache",h.setAttribute("data-bind","html: shaderCacheText"),c.appendChild(h);var p=document.createElement("div");c.appendChild(p),(t=document.createElement("span")).setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),p.appendChild(t),(a=document.createElement("span")).setAttribute("data-bind","text: depthFrustumText"),p.appendChild(a),(e=document.createElement("input")).type="button",e.value="-",e.className="cesium-cesiumInspector-pickButton",e.setAttribute("data-bind","click: decrementDepthFrustum"),p.appendChild(e),(n=document.createElement("input")).type="button",n.value="+",n.className="cesium-cesiumInspector-pickButton",n.setAttribute("data-bind","click: incrementDepthFrustum"),p.appendChild(n),d=s(o,"Primitives","primitivesVisible","togglePrimitives"),(u=document.createElement("div")).className="cesium-cesiumInspector-pickSection",d.appendChild(u),(i=document.createElement("input")).type="button",i.value="Pick a primitive",i.className="cesium-cesiumInspector-pickButton",i.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive'),(h=document.createElement("div")).className="cesium-cesiumInspector-center",h.appendChild(i),u.appendChild(h),u.appendChild(l("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),u.appendChild(l("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=l("Show only selected","filterPrimitive","hasPickedPrimitive"),u.appendChild(this._primitiveOnly),c=s(o,"Terrain","terrainVisible","toggleTerrain"),(t=document.createElement("div")).className="cesium-cesiumInspector-pickSection",c.appendChild(t),(a=document.createElement("input")).type="button",a.value="Pick a tile",a.className="cesium-cesiumInspector-pickButton",a.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),(h=document.createElement("div")).appendChild(a),h.className="cesium-cesiumInspector-center",t.appendChild(h),e=document.createElement("div"),t.appendChild(e),(p=document.createElement("input")).type="button",p.value="Parent",p.className="cesium-cesiumInspector-pickButton",p.setAttribute("data-bind","click: selectParent"),(n=document.createElement("input")).type="button",n.value="NW",n.className="cesium-cesiumInspector-pickButton",n.setAttribute("data-bind","click: selectNW"),(d=document.createElement("input")).type="button",d.value="NE",d.className="cesium-cesiumInspector-pickButton",d.setAttribute("data-bind","click: selectNE"),(i=document.createElement("input")).type="button",i.value="SW",i.className="cesium-cesiumInspector-pickButton",i.setAttribute("data-bind","click: selectSW"),(u=document.createElement("input")).type="button",u.value="SE",u.className="cesium-cesiumInspector-pickButton",u.setAttribute("data-bind","click: selectSE"),(s=document.createElement("div")).className="cesium-cesiumInspector-tileText",e.className="cesium-cesiumInspector-frustumStatistics",e.appendChild(s),e.setAttribute("data-bind","visible: hasPickedTile"),s.setAttribute("data-bind","html: tileText"),(o=document.createElement("div")).className="cesium-cesiumInspector-relativeText",o.textContent="Select relative:",e.appendChild(o),a=document.createElement("table"),h=document.createElement("tr"),s=document.createElement("tr"),(o=document.createElement("td")).appendChild(p),(p=document.createElement("td")).appendChild(n),(n=document.createElement("td")).appendChild(d),h.appendChild(o),h.appendChild(p),h.appendChild(n),p=document.createElement("td"),(n=document.createElement("td")).appendChild(i),(i=document.createElement("td")).appendChild(u),s.appendChild(p),s.appendChild(n),s.appendChild(i),a.appendChild(h),a.appendChild(s),e.appendChild(a),t.appendChild(l("Show bounding volume","tileBoundingSphere","hasPickedTile")),t.appendChild(l("Show only selected","filterTile","hasPickedTile")),c.appendChild(l("Wireframe","wireframe")),c.appendChild(l("Suspend LOD update","suspendUpdates")),c.appendChild(l("Show tile coordinates","tileCoordinates")),knockout.applyBindings(r,this._element)}function getDefaultSkyBoxUrl(e){return buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_"+e+".jpg")}function startRenderLoop(e){e._renderLoopRunning=!0;var t=0;requestAnimationFramePolyFill((function i(r){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var n,a=e._targetFrameRate;defined(a)?(n=1e3/a)<(a=r-t)&&(e.resize(),e.render(),t=r-a%n):(e.resize(),e.render()),requestAnimationFramePolyFill(i)}catch(i){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering.  Rendering has stopped.",void 0,i)}else e._renderLoopRunning=!1}))}function configurePixelRatio(e){var t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,defined(e._scene)&&(e._scene.pixelRatio=t),t}function configureCanvasSize(e){var t=e._canvas,i=t.clientWidth,r=t.clientHeight,n=configurePixelRatio(e);e._canvasClientWidth=i,e._canvasClientHeight=r,i*=n,r*=n,t.width=i,t.height=r,e._canRender=0!=i&&0!=r,e._lastDevicePixelRatio=window.devicePixelRatio}function configureCameraFrustum(e){var t=(i=e._canvas).width,i=i.height;0!==t&&0!==i&&(defined((e=e._scene.camera.frustum).aspectRatio)?e.aspectRatio=t/i:(e.top=e.right*(i/t),e.bottom=-e.top))}function CesiumWidget(e,t){e=getElement(e),t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=document.createElement("div");i.className="cesium-widget",e.appendChild(i);var r=document.createElement("canvas"),n=FeatureDetection.supportsImageRenderingPixelated();function a(){r!==r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()}(this._supportsImageRenderingPixelated=n)&&(r.style.imageRendering=FeatureDetection.imageRenderingValue()),r.oncontextmenu=function(){return!1},r.onselectstart=function(){return!1},r.addEventListener("mousedown",a),r.addEventListener("pointerdown",a),i.appendChild(r);var o=document.createElement("div");o.className="cesium-widget-credits";var s=defined(t.creditContainer)?getElement(t.creditContainer):i;s.appendChild(o);var l=defined(t.creditViewport)?getElement(t.creditViewport):i,c=defaultValue(t.showRenderLoopErrors,!0);n=defaultValue(t.useBrowserRecommendedResolution,!0);this._element=i,this._container=e,this._canvas=r,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=l,this._creditContainer=s,this._innerCreditContainer=o,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=c,this._resolutionScale=1,this._useBrowserRecommendedResolution=n,this._forceResize=!1,this._clock=defined(t.clock)?t.clock:new Clock,configureCanvasSize(this);try{var u=new Scene({canvas:r,contextOptions:t.contextOptions,creditContainer:o,creditViewport:l,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:defaultValue(t.scene3DOnly,!1),terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange});(this._scene=u).camera.constrainedAxis=Cartesian3.UNIT_Z,configurePixelRatio(this),configureCameraFrustum(this);var d=defaultValue(u.mapProjection.ellipsoid,Ellipsoid.WGS84),h=t.globe;defined(h)||(h=new Globe(d)),!1!==h&&(u.globe=h,u.globe.shadows=defaultValue(t.terrainShadows,ShadowMode$1.RECEIVE_ONLY)),defined(h=t.skyBox)||(h=new SkyBox({sources:{positiveX:getDefaultSkyBoxUrl("px"),negativeX:getDefaultSkyBoxUrl("mx"),positiveY:getDefaultSkyBoxUrl("py"),negativeY:getDefaultSkyBoxUrl("my"),positiveZ:getDefaultSkyBoxUrl("pz"),negativeZ:getDefaultSkyBoxUrl("mz")}})),!1!==h&&(u.skyBox=h,u.sun=new Sun,u.moon=new Moon),defined(h=t.skyAtmosphere)||(h=new SkyAtmosphere(d)),!1!==h&&(u.skyAtmosphere=h),defined(h=!1!==t.globe&&t.imageryProvider)||(h=createWorldImagery()),!1!==h&&u.imageryLayers.addImageryProvider(h),defined(t.terrainProvider)&&!1!==t.globe&&(u.terrainProvider=t.terrainProvider),this._screenSpaceEventHandler=new ScreenSpaceEventHandler(r),defined(t.sceneMode)&&(t.sceneMode===SceneMode$1.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===SceneMode$1.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=defaultValue(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;var p=this;this._onRenderError=function(e,t){p._useDefaultRenderLoop=!1,p._renderLoopRunning=!1,p._showRenderLoopErrors&&p.showErrorPanel("An error occurred while rendering.  Rendering has stopped.",void 0,t)},u.renderError.addEventListener(this._onRenderError)}catch(e){throw c&&this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL.  Consider trying a different web browser or updating your video drivers.  Detailed error information is below:',e),e}}function FullscreenButtonViewModel(e,t){defined(t)||(t=document.body),t=getElement(t);var i=this,r=knockout.observable(Fullscreen.fullscreen),n=knockout.observable(Fullscreen.enabled);t=t.ownerDocument;this.isFullscreen=void 0,knockout.defineProperty(this,"isFullscreen",{get:function(){return r()}}),this.isFullscreenEnabled=void 0,knockout.defineProperty(this,"isFullscreenEnabled",{get:function(){return n()},set:function(e){n(e&&Fullscreen.enabled)}}),this.tooltip=void 0,knockout.defineProperty(this,"tooltip",(function(){return this.isFullscreenEnabled?r()?"Exit full screen":"Full screen":"Full screen unavailable"})),this._command=createCommand$2((function(){Fullscreen.fullscreen?Fullscreen.exitFullscreen():Fullscreen.requestFullscreen(i._fullscreenElement)}),knockout.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=defaultValue(getElement(e),t.body),this._callback=function(){r(Fullscreen.fullscreen)},t.addEventListener(Fullscreen.changeEventName,this._callback)}Object.defineProperties(CesiumInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.parent}))}},selectNW:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.northwestChild}))}},selectNE:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.northeastChild}))}},selectSW:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.southwestChild}))}},selectSE:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.southeastChild}))}},primitive:{get:function(){return this._primitive},set:function(e){var t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,defined(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,defined(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),(this._primitive=e).show=!1,setTimeout((function(){e.show=!0}),50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){var t;defined(e)?(this.hasPickedTile=!0,e!==this._tile&&(this.tileText="L: "+e.level+" X: "+e.x+" Y: "+e.y,this.tileText+="<br>SW corner: "+e.rectangle.west+", "+e.rectangle.south,this.tileText+="<br>NE corner: "+e.rectangle.east+", "+e.rectangle.north,defined(t=e.data)&&defined(t.tileBoundingRegion)?this.tileText+="<br>Min: "+t.tileBoundingRegion.minimumHeight+" Max: "+t.tileBoundingRegion.maximumHeight:this.tileText+="<br>(Tile is not loaded)"),this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()):(this.hasPickedTile=!1,this._tile=void 0)}}}),CesiumInspectorViewModel.prototype._update=function(){this.frustums&&(this.frustumStatisticText=frustumStatisticsToString(this._scene.debugFrustumStatistics));var e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=boundDepthFrustum(1,e,this.depthFrustum),this.depthFrustumText=this.depthFrustum+" of "+e,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText="Cached shaders: "+this._scene.context.shaderCache.numberOfShaders},CesiumInspectorViewModel.prototype.isDestroyed=function(){return!1},CesiumInspectorViewModel.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._globeDepthSubscription.dispose(),this._pickDepthSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),destroyObject(this)},Object.defineProperties(CesiumInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),CesiumInspector.prototype.isDestroyed=function(){return!1},CesiumInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject(this)},Object.defineProperties(CesiumWidget.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e)&&!this._renderLoopRunning&&startRenderLoop(this)}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}}}),CesiumWidget.prototype.showErrorPanel=function(e,t,i){var r=this._element,n=document.createElement("div");n.className="cesium-widget-errorPanel";var a=document.createElement("div");a.className="cesium-widget-errorPanel-content",n.appendChild(a),(h=document.createElement("div")).className="cesium-widget-errorPanel-header",h.appendChild(document.createTextNode(e)),a.appendChild(h);var o=document.createElement("div");function s(){o.style.maxHeight=Math.max(Math.round(.9*r.clientHeight-100),30)+"px"}o.className="cesium-widget-errorPanel-scroll",a.appendChild(o),s(),defined(window.addEventListener)&&window.addEventListener("resize",s,!1);var l,c,u,d=defined(t),h=defined(i);(d||h)&&((p=document.createElement("div")).className="cesium-widget-errorPanel-message",o.appendChild(p),h&&(l=formatError(i),d||("string"==typeof i&&(i=new Error(i)),t=formatError({name:i.name,message:i.message}),l=i.stack),"undefined"!=typeof console&&console.error(e+"\n"+t+"\n"+l),(c=document.createElement("div")).className="cesium-widget-errorPanel-message-details collapsed",(u=document.createElement("span")).className="cesium-widget-errorPanel-more-details",u.appendChild(document.createTextNode("See more...")),c.appendChild(u),c.onclick=function(e){c.removeChild(u),c.appendChild(document.createTextNode(l)),c.className="cesium-widget-errorPanel-message-details",a.className="cesium-widget-errorPanel-content expanded",c.onclick=void 0},o.appendChild(c)),p.innerHTML="<p>"+t+"</p>");var p=document.createElement("div");p.className="cesium-widget-errorPanel-buttonPanel",a.appendChild(p),(t=document.createElement("button")).setAttribute("type","button"),t.className="cesium-button",t.appendChild(document.createTextNode("OK")),t.onclick=function(){defined(s)&&defined(window.removeEventListener)&&window.removeEventListener("resize",s,!1),r.removeChild(n)},p.appendChild(t),r.appendChild(n)},CesiumWidget.prototype.isDestroyed=function(){return!1},CesiumWidget.prototype.destroy=function(){defined(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),destroyObject(this)},CesiumWidget.prototype.resize=function(){var e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,configureCanvasSize(this),configureCameraFrustum(this),this._scene.requestRender())},CesiumWidget.prototype.render=function(){var e;this._canRender?(this._scene.initializeFrame(),e=this._clock.tick(),this._scene.render(e)):this._clock.tick()},Object.defineProperties(FullscreenButtonViewModel.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}}),FullscreenButtonViewModel.prototype.isDestroyed=function(){return!1},FullscreenButtonViewModel.prototype.destroy=function(){document.removeEventListener(Fullscreen.changeEventName,this._callback),destroyObject(this)};var enterFullScreenPath="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",exitFullScreenPath="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function FullscreenButton(e,t){var i=new FullscreenButtonViewModel(t,e=getElement(e));i._exitFullScreenPath=exitFullScreenPath,i._enterFullScreenPath=enterFullScreenPath,(t=document.createElement("button")).type="button",t.className="cesium-button cesium-fullscreenButton",t.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(t),knockout.applyBindings(i,t),this._container=e,this._viewModel=i,this._element=t}Object.defineProperties(FullscreenButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),FullscreenButton.prototype.isDestroyed=function(){return!1},FullscreenButton.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)};var DEFAULT_HEIGHT=1e3;function GeocoderViewModel(e){defined(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new CartographicGeocoderService,new IonGeocoderService({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new Event,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=handleArrowDown,this._handleArrowUp=handleArrowUp;var t=this;this._suggestionsVisible=knockout.pureComputed((function(){var e=0<knockout.getObservable(t,"_suggestions")().length,i=knockout.getObservable(t,"_showSuggestions")();return e&&i})),this._searchCommand=createCommand$2((function(e){return e=defaultValue(e,GeocodeType$1.SEARCH),t._focusTextbox=!1,defined(t._selectedSuggestion)?(t.activateSuggestion(t._selectedSuggestion),!1):(t.hideSuggestions(),void(t.isSearchInProgress?cancelGeocode(t):geocode(t,t._geocoderServices,e)))})),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(e,t){var i="ArrowDown"===t.key||"Down"===t.key||40===t.keyCode,r="ArrowUp"===t.key||"Up"===t.key||38===t.keyCode;return(i||r)&&t.preventDefault(),!0},this.handleKeyUp=function(e,i){var r="ArrowDown"===i.key||"Down"===i.key||40===i.keyCode,n="ArrowUp"===i.key||"Up"===i.key||38===i.keyCode;i="Enter"===i.key||13===i.keyCode;return n?handleArrowUp(t):r?handleArrowDown(t):i&&t._searchCommand(),!0},this.activateSuggestion=function(e){t.hideSuggestions(),t._searchText=e.displayName,e=e.destination,clearSuggestions(t),t.destinationFound(t,e)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(e,i){e!==t._selectedSuggestion&&(t._selectedSuggestion=e)},this.keepExpanded=!1,this.autoComplete=defaultValue(e.autocomplete,!0),this.destinationFound=defaultValue(e.destinationFound,GeocoderViewModel.flyToDestination),this._focusTextbox=!1,knockout.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]),(e=knockout.getObservable(this,"_searchText")).extend({rateLimit:{timeout:500}}),this._suggestionSubscription=e.subscribe((function(){GeocoderViewModel._updateSearchSuggestions(t)})),this.isSearchInProgress=void 0,knockout.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,knockout.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){this._searchText=e}}),this.flightDuration=void 0,knockout.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){this._flightDuration=e}})}function handleArrowUp(e){var t;0!==e._suggestions.length&&(-1!==(t=e._suggestions.indexOf(e._selectedSuggestion))&&0!==t?(t-=1,e._selectedSuggestion=e._suggestions[t],GeocoderViewModel._adjustSuggestionsScroll(e,t)):e._selectedSuggestion=void 0)}function handleArrowDown(e){var t;0!==e._suggestions.length&&(t=e._suggestions.length,t=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t,e._selectedSuggestion=e._suggestions[t],GeocoderViewModel._adjustSuggestionsScroll(e,t))}function computeFlyToLocationForCartographic(e,t){var i=defined(t)?t.availability:void 0;return defined(i)?sampleTerrainMostDetailed(t,[e]).then((function(t){return(e=t[0]).height+=DEFAULT_HEIGHT,e})):(e.height+=DEFAULT_HEIGHT,when.resolve(e))}function flyToDestination(e,t){var i,r=e._scene,n=r.mapProjection.ellipsoid,a=r.camera,o=r.terrainProvider,s=t;t instanceof Rectangle?CesiumMath.equalsEpsilon(t.south,t.north,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(t.east,t.west,CesiumMath.EPSILON7)?t=Rectangle.center(t):i=computeFlyToLocationForRectangle(t,r):t=n.cartesianToCartographic(t),defined(i)||(i=computeFlyToLocationForCartographic(t,o)),i.then((function(e){s=n.cartographicToCartesian(e)})).always((function(){a.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:Matrix4.IDENTITY})}))}function chainPromise(e,t,i,r){return e.then((function(e){return defined(e)&&"fulfilled"===e.state&&0<e.value.length?e:t.geocode(i,r).then((function(e){return{state:"fulfilled",value:e}})).otherwise((function(e){return{state:"rejected",reason:e}}))}))}function geocode(e,t,i){var r=e._searchText;if(hasOnlyWhitespace(r))e.showSuggestions();else{e._isSearchInProgress=!0;for(var n=when.resolve(),a=0;a<t.length;a++)n=chainPromise(n,t[a],r,i);(e._geocodePromise=n).then((function(t){if(!n.cancel){e._isSearchInProgress=!1;var i=t.value;if("fulfilled"===t.state&&defined(i)&&0<i.length)return e._searchText=i[0].displayName,void e.destinationFound(e,i[0].destination);e._searchText=r+" (not found)"}}))}}function adjustSuggestionsScroll(e,t){e=(i=getElement(e._viewContainer)).getElementsByClassName("search-results")[0];var i=i.getElementsByTagName("li")[t];0!==t?(t=i.offsetTop)+i.clientHeight>e.clientHeight?e.scrollTop=t+i.clientHeight:t<e.scrollTop&&(e.scrollTop=t):e.scrollTop=0}function cancelGeocode(e){e._isSearchInProgress=!1,defined(e._geocodePromise)&&(e._geocodePromise.cancel=!0,e._geocodePromise=void 0)}function hasOnlyWhitespace(e){return/^\s*$/.test(e)}function clearSuggestions(e){knockout.getObservable(e,"_suggestions").removeAll()}function updateSearchSuggestions(e){var t,i;e.autoComplete&&(t=e._searchText,clearSuggestions(e),hasOnlyWhitespace(t)||(i=when.resolve([]),e._geocoderServices.forEach((function(e){i=i.then((function(i){return 5<=i.length?i:e.geocode(t,GeocodeType$1.AUTOCOMPLETE).then((function(e){return i=i.concat(e)}))}))})),i.then((function(t){for(var i=e._suggestions,r=0;r<t.length;r++)i.push(t[r])}))))}Object.defineProperties(GeocoderViewModel.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}}),GeocoderViewModel.prototype.destroy=function(){this._suggestionSubscription.dispose()},GeocoderViewModel.flyToDestination=flyToDestination,GeocoderViewModel._updateSearchSuggestions=updateSearchSuggestions,GeocoderViewModel._adjustSuggestionsScroll=adjustSuggestionsScroll;var startSearchPath="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",stopSearchPath="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Geocoder(e){var t=getElement(e.container),i=new GeocoderViewModel(e);i._startSearchPath=startSearchPath,i._stopSearchPath=stopSearchPath;var r=document.createElement("form");r.setAttribute("data-bind","submit: search");var n=document.createElement("input");n.type="search",n.className="cesium-geocoder-input",n.setAttribute("placeholder","Enter an address or landmark..."),n.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout((function(){n.select()}),0)},n.addEventListener("focus",this._onTextBoxFocus,!1),r.appendChild(n),this._textBox=n;var a=document.createElement("span");a.className="cesium-geocoder-searchButton",a.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),r.appendChild(a),t.appendChild(r);var o=document.createElement("div");o.className="search-results",o.setAttribute("data-bind","visible: _suggestionsVisible"),(e=document.createElement("ul")).setAttribute("data-bind","foreach: _suggestions"),a=document.createElement("li"),e.appendChild(a),a.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),o.appendChild(e),t.appendChild(o),knockout.applyBindings(i,r),knockout.applyBindings(i,o),this._container=t,this._searchSuggestionsContainer=o,this._viewModel=i,this._form=r,this._onInputBegin=function(e){var r=e.target;"function"==typeof e.composedPath&&(r=e.composedPath()[0]),t.contains(r)||(i._focusTextbox=!1,i.hideSuggestions())},this._onInputEnd=function(e){i._focusTextbox=!0,i.showSuggestions()},FeatureDetection.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}function HomeButtonViewModel(e,t){this._scene=e,this._duration=t;var i=this;this._command=createCommand$2((function(){i._scene.camera.flyHome(i._duration)})),this.tooltip="View Home",knockout.track(this,["tooltip"])}function HomeButton(e,t,i){e=getElement(e),(t=new HomeButtonViewModel(t,i))._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z",(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button cesium-home-button",i.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(i),knockout.applyBindings(t,i),this._container=e,this._viewModel=t,this._element=i}Object.defineProperties(Geocoder.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}}),Geocoder.prototype.isDestroyed=function(){return!1},Geocoder.prototype.destroy=function(){var e=this._container;return FeatureDetection.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),knockout.cleanNode(this._form),knockout.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),destroyObject(this)},Object.defineProperties(HomeButtonViewModel.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}}),Object.defineProperties(HomeButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),HomeButton.prototype.isDestroyed=function(){return!1},HomeButton.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)};var cameraEnabledPath="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",cameraDisabledPath="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function InfoBoxViewModel(){this._cameraClicked=new Event,this._closeClicked=new Event,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",knockout.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,knockout.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?cameraDisabledPath:cameraEnabledPath}}),knockout.defineProperty(this,"_bodyless",{get:function(){return!defined(this.description)||0===this.description.length}})}function InfoBox(e){e=getElement(e);var t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);var i=document.createElement("div");i.className="cesium-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-infoBox-camera",i.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-infoBox-close",i.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),i.innerHTML="&times;",t.appendChild(i);var r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);var n=new InfoBoxViewModel;knockout.applyBindings(n,t),this._container=e,this._element=t,this._frame=r,this._viewModel=n,this._descriptionSubscription=void 0;var a=this;r.addEventListener("load",(function(){var e=r.contentDocument,i=e.createElement("link");i.href=buildModuleUrl("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";var o=e.createElement("div");o.className="cesium-infoBox-description",e.head.appendChild(i),e.body.appendChild(o),a._descriptionSubscription=subscribeAndEvaluate(n,"description",(function(e){r.style.height="5px",o.innerHTML=e;var i=null,n=o.firstElementChild;null===n||1!==o.childNodes.length||null!==(e=window.getComputedStyle(n))&&(n=e["background-color"],defined(n=Color.fromCssColorString(n))&&0!==n.alpha&&(i=e["background-color"])),t.style["background-color"]=i,i=o.getBoundingClientRect().height,r.style.height=i+"px"}))})),r.setAttribute("src","about:blank")}function NavigationHelpButtonViewModel(){this.showInstructions=!1;var e=this;this._command=createCommand$2((function(){e.showInstructions=!e.showInstructions})),this._showClick=createCommand$2((function(){e._touch=!1})),this._showTouch=createCommand$2((function(){e._touch=!0})),this._touch=!1,this.tooltip="Navigation Instructions",knockout.track(this,["tooltip","showInstructions","_touch"])}function NavigationHelpButton(e){var t=getElement(e.container),i=new NavigationHelpButtonViewModel,r=defaultValue(e.instructionsInitiallyVisible,!1);i.showInstructions=r,i._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var n=document.createElement("span");n.className="cesium-navigationHelpButton-wrapper",t.appendChild(n);var a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",a.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),n.appendChild(a);var o=document.createElement("div");o.className="cesium-navigation-help",o.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),n.appendChild(o),(e=document.createElement("button")).type="button",e.className="cesium-navigation-button cesium-navigation-button-left",e.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}'),(r=document.createElement("img")).src=buildModuleUrl("Widgets/Images/NavigationHelp/Mouse.svg"),r.className="cesium-navigation-button-icon",r.style.width="25px",r.style.height="25px",e.appendChild(r),e.appendChild(document.createTextNode("Mouse")),(a=document.createElement("button")).type="button",a.className="cesium-navigation-button cesium-navigation-button-right",a.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}'),(r=document.createElement("img")).src=buildModuleUrl("Widgets/Images/NavigationHelp/Touch.svg"),r.className="cesium-navigation-button-icon",r.style.width="25px",r.style.height="25px",a.appendChild(r),a.appendChild(document.createTextNode("Touch")),o.appendChild(e),o.appendChild(a),(a=document.createElement("div")).className="cesium-click-navigation-help cesium-navigation-help-instructions",a.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),a.innerHTML='            <table>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/MouseLeft.svg")+'" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">Left click + drag</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/MouseRight.svg")+'" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Right click + drag, or</div>                        <div class="cesium-navigation-help-details">Mouse wheel scroll</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/MouseMiddle.svg")+'" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Rotate view</div>                        <div class="cesium-navigation-help-details">Middle click + drag, or</div>                        <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div>                    </td>                </tr>            </table>',o.appendChild(a),(a=document.createElement("div")).className="cesium-touch-navigation-help cesium-navigation-help-instructions",a.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),a.innerHTML='            <table>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/TouchDrag.svg")+'" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">One finger drag</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/TouchZoom.svg")+'" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Two finger pinch</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/TouchTilt.svg")+'" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Tilt view</div>                        <div class="cesium-navigation-help-details">Two finger drag, same direction</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/TouchRotate.svg")+'" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-tilt">Rotate view</div>                        <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div>                    </td>                </tr>            </table>',o.appendChild(a),knockout.applyBindings(i,n),this._container=t,this._viewModel=i,this._wrapper=n,this._closeInstructions=function(e){n.contains(e.target)||(i.showInstructions=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function PerformanceWatchdogViewModel(e){this._scene=e.scene,this.lowFrameRateMessage=defaultValue(e.lowFrameRateMessage,"This application appears to be performing poorly on your system.  Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,knockout.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var t=this;this._dismissMessage=createCommand$2((function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0})),e=FrameRateMonitor.fromScene(e.scene),this._unsubscribeLowFrameRate=e.lowFrameRate.addEventListener((function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=e.nominalFrameRate.addEventListener((function(){t.showingLowFrameRateMessage=!1}))}function PerformanceWatchdog(e){var t=getElement(e.container),i=new PerformanceWatchdogViewModel(e),r=document.createElement("div");r.className="cesium-performance-watchdog-message-area",r.setAttribute("data-bind","visible: showingLowFrameRateMessage"),(e=document.createElement("button")).setAttribute("type","button"),e.className="cesium-performance-watchdog-message-dismiss",e.innerHTML="&times;",e.setAttribute("data-bind","click: dismissMessage"),r.appendChild(e),(e=document.createElement("div")).className="cesium-performance-watchdog-message",e.setAttribute("data-bind","html: lowFrameRateMessage"),r.appendChild(e),t.appendChild(r),knockout.applyBindings(i,r),this._container=t,this._viewModel=i,this._element=r}function ProjectionPickerViewModel(e){this._scene=e,this._orthographic=e.camera.frustum instanceof OrthographicFrustum,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,knockout.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);var t=this;knockout.defineProperty(this,"selectedTooltip",(function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective})),this._toggleDropDown=createCommand$2((function(){t.sceneMode===SceneMode$1.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)})),this._eventHelper=new EventHelper,this._eventHelper.add(e.morphComplete,(function(e,i,r,n){t.sceneMode=r,t._orthographic=r===SceneMode$1.SCENE2D||t._scene.camera.frustum instanceof OrthographicFrustum})),this._eventHelper.add(e.preRender,(function(){t._flightInProgress=defined(e.camera._currentFlight)})),this._switchToPerspective=createCommand$2((function(){t.sceneMode!==SceneMode$1.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)})),this._switchToOrthographic=createCommand$2((function(){t.sceneMode!==SceneMode$1.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)})),this._sceneMode=SceneMode$1}InfoBoxViewModel.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(InfoBoxViewModel.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(InfoBox.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),InfoBox.prototype.isDestroyed=function(){return!1},InfoBox.prototype.destroy=function(){var e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),defined(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),destroyObject(this)},Object.defineProperties(NavigationHelpButtonViewModel.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(NavigationHelpButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),NavigationHelpButton.prototype.isDestroyed=function(){return!1},NavigationHelpButton.prototype.destroy=function(){return FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject(this)},Object.defineProperties(PerformanceWatchdogViewModel.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),PerformanceWatchdogViewModel.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),destroyObject(this)},Object.defineProperties(PerformanceWatchdog.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),PerformanceWatchdog.prototype.isDestroyed=function(){return!1},PerformanceWatchdog.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)},Object.defineProperties(ProjectionPickerViewModel.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),ProjectionPickerViewModel.prototype.isDestroyed=function(){return!1},ProjectionPickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject(this)};var perspectivePath="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",orthographicPath="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function ProjectionPicker(e,t){e=getElement(e);var i=new ProjectionPickerViewModel(t);i._perspectivePath=perspectivePath,i._orthographicPath=orthographicPath;var r=document.createElement("span");r.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(r),(t=document.createElement("button")).type="button",t.className="cesium-button cesium-toolbar-button",t.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic,       "cesium-projectionPicker-buttonOrthographic": _orthographic,       "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress,        "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),t.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',r.appendChild(t),(t=document.createElement("button")).type="button",t.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",t.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic),       "cesium-projectionPicker-none" : !_orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),r.appendChild(t),(t=document.createElement("button")).type="button",t.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",t.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic),       "cesium-projectionPicker-none" : _orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),r.appendChild(t),knockout.applyBindings(i,r),this._viewModel=i,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(i.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function SceneModePickerViewModel(e,t){this._scene=e;var i=this;this._eventHelper=new EventHelper,this._eventHelper.add(e.morphStart,(function(e,t,r,n){i.sceneMode=r,i.dropDownVisible=!1})),this._duration=defaultValue(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",knockout.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,knockout.defineProperty(this,"selectedTooltip",(function(){var e=i.sceneMode;return e===SceneMode$1.SCENE2D?i.tooltip2D:e===SceneMode$1.SCENE3D?i.tooltip3D:i.tooltipColumbusView})),this._toggleDropDown=createCommand$2((function(){i.dropDownVisible=!i.dropDownVisible})),this._morphTo2D=createCommand$2((function(){e.morphTo2D(i._duration)})),this._morphTo3D=createCommand$2((function(){e.morphTo3D(i._duration)})),this._morphToColumbusView=createCommand$2((function(){e.morphToColumbusView(i._duration)})),this._sceneMode=SceneMode$1}Object.defineProperties(ProjectionPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),ProjectionPicker.prototype.isDestroyed=function(){return!1},ProjectionPicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject(this)},Object.defineProperties(SceneModePickerViewModel.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),SceneModePickerViewModel.prototype.isDestroyed=function(){return!1},SceneModePickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject(this)};var globePath="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878         -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132         -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285         11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z         M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201         5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461         -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",flatMapPath="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",columbusViewPath="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function SceneModePicker(e,t,i){e=getElement(e);var r=new SceneModePickerViewModel(t,i);r._globePath=globePath,r._flatMapPath=flatMapPath,r._columbusViewPath=columbusViewPath;var n=document.createElement("span");n.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(n),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button",i.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),i.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',n.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",i.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),n.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",i.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),n.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",i.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),n.appendChild(i),knockout.applyBindings(r,n),this._viewModel=r,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(r.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(SceneModePicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SceneModePicker.prototype.isDestroyed=function(){return!1},SceneModePicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject(this)};var screenSpacePos=new Cartesian2,offScreen="-1000px";function SelectionIndicatorViewModel(e,t,i){this._scene=e,this._screenPositionX=offScreen,this._screenPositionY=offScreen,this._tweens=e.tweens,this._container=defaultValue(i,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,knockout.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,knockout.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&defined(this.position)}}),knockout.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return SceneTransforms.wgs84ToWindowCoordinates(e,t,i)}}function SelectionIndicator(e,t){e=getElement(e),this._container=e;var i=document.createElement("div");i.className="cesium-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var r="http://www.w3.org/2000/svg",n=document.createElementNS(r,"svg:svg");n.setAttribute("width",160),n.setAttribute("height",160),n.setAttribute("viewBox","0 0 160 160"),(e=document.createElementNS(r,"g")).setAttribute("transform","translate(80,80)"),n.appendChild(e),(r=document.createElementNS(r,"path")).setAttribute("data-bind","attr: { transform: _transform }"),r.setAttribute("d","M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z"),e.appendChild(r),i.appendChild(n),t=new SelectionIndicatorViewModel(t,this._element,this._container),this._viewModel=t,knockout.applyBindings(this._viewModel,this._element)}function TimelineHighlightRange(e,t,i){this._color=e,this._height=t,this._base=defaultValue(i,0)}function TimelineTrack(e,t,i,r){this.interval=e,this.height=t,this.color=i||new Color(.5,.5,.5,1),this.backgroundColor=r||new Color(0,0,0,0)}SelectionIndicatorViewModel.prototype.update=function(){var e,t,i,r,n;this.showSelection&&defined(this.position)&&(defined(e=this.computeScreenSpacePosition(this.position,screenSpacePos))?(t=(n=this._container).parentNode.clientWidth,i=n.parentNode.clientHeight,n=.5*(r=this._selectionIndicatorElement.clientWidth),e.x=Math.min(Math.max(e.x,-r),t+r)-n,e.y=Math.min(Math.max(e.y,-r),i+r)-n,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"):(this._screenPositionX=offScreen,this._screenPositionY=offScreen))},SelectionIndicatorViewModel.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:EasingFunction$1.EXPONENTIAL_OUT})},SelectionIndicatorViewModel.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:EasingFunction$1.EXPONENTIAL_OUT})},Object.defineProperties(SelectionIndicatorViewModel.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(SelectionIndicator.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SelectionIndicator.prototype.isDestroyed=function(){return!1},SelectionIndicator.prototype.destroy=function(){var e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),destroyObject(this)},TimelineHighlightRange.prototype.getHeight=function(){return this._height},TimelineHighlightRange.prototype.getBase=function(){return this._base},TimelineHighlightRange.prototype.getStartTime=function(){return this._start},TimelineHighlightRange.prototype.getStopTime=function(){return this._stop},TimelineHighlightRange.prototype.setRange=function(e,t){this._start=e,this._stop=t},TimelineHighlightRange.prototype.render=function(e){var t,i,r="";return this._start&&this._stop&&this._color&&(i=JulianDate.secondsDifference(this._start,e.epochJulian),t=Math.round(e.timeBarWidth*e.getAlpha(i)),i=JulianDate.secondsDifference(this._stop,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(i))-t,t<0&&(i+=t,t=0),t+i>e.timeBarWidth&&(i=e.timeBarWidth-t),0<i&&(r='<span class="cesium-timeline-highlight" style="left: '+t.toString()+"px; width: "+i.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+this._color+';"></span>')),r},TimelineTrack.prototype.render=function(e,t){var i=this.interval.start,r=this.interval.stop,n=t.startJulian,a=JulianDate.addSeconds(t.startJulian,t.duration,new JulianDate);if(JulianDate.lessThan(i,n)&&JulianDate.greaterThan(r,a))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(JulianDate.lessThanOrEquals(i,a)&&JulianDate.greaterThanOrEquals(r,n)){for(var o,s,l=0;l<t.timeBarWidth;++l){var c=JulianDate.addSeconds(t.startJulian,l/t.timeBarWidth*t.duration,new JulianDate);!defined(o)&&JulianDate.greaterThanOrEquals(c,i)?o=l:!defined(s)&&JulianDate.greaterThanOrEquals(c,r)&&(s=l)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),defined(o)&&(defined(s)||(s=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(o,t.y,Math.max(s-o,1),this.height))}};var timelineWheelDelta=1e12,timelineMouseMode={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},timelineTouchMode={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},timelineTicScales=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],timelineMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Timeline(e,t){var i=(e=getElement(e)).ownerDocument;this.container=e;var r=i.createElement("div");r.className="cesium-timeline-main",e.appendChild(r),this._topDiv=r,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=timelineMouseMode.none,this._touchMode=timelineTouchMode.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=createMouseDownCallback(this),this._onMouseUp=createMouseUpCallback(this),this._onMouseMove=createMouseMoveCallback(this),this._onMouseWheel=createMouseWheelCallback(this),this._onTouchStart=createTouchStartCallback(this),this._onTouchMove=createTouchMoveCallback(this),this._onTouchEnd=createTouchEndCallback(this),r=this._timeBarEle,i.addEventListener("mouseup",this._onMouseUp,!1),i.addEventListener("mousemove",this._onMouseMove,!1),r.addEventListener("mousedown",this._onMouseDown,!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),r.addEventListener("mousewheel",this._onMouseWheel,!1),r.addEventListener("touchstart",this._onTouchStart,!1),r.addEventListener("touchmove",this._onTouchMove,!1),r.addEventListener("touchend",this._onTouchEnd,!1),r.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function twoDigits(e){return e<10?"0"+e.toString():e.toString()}function createMouseDownCallback(e){return function(t){e._mouseMode!==timelineMouseMode.touchOnly&&(0===t.button?(e._mouseMode=timelineMouseMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=timelineMouseMode.zoom:e._mouseMode=timelineMouseMode.slide)),t.preventDefault()}}function createMouseUpCallback(e){return function(t){e._mouseMode=timelineMouseMode.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function createMouseMoveCallback(e){return function(t){var i,r;e._mouseMode===timelineMouseMode.scrub?(t.preventDefault(),(i=t.clientX-e._topDiv.getBoundingClientRect().left)<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._mouseMode===timelineMouseMode.slide?(r=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==r&&(i=r*e._timeBarSecondsSpan/e._topDiv.clientWidth,e.zoomTo(JulianDate.addSeconds(e._startJulian,i,new JulianDate),JulianDate.addSeconds(e._endJulian,i,new JulianDate)))):e._mouseMode===timelineMouseMode.zoom&&(r=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==r&&e.zoomFrom(Math.pow(1.01,r)))}}function createMouseWheelCallback(e){return function(t){t=t.wheelDeltaY||t.wheelDelta||-t.detail,t/=timelineWheelDelta=Math.max(Math.min(Math.abs(t),timelineWheelDelta),1),e.zoomFrom(Math.pow(1.05,-t))}}function createTouchStartCallback(e){return function(t){var i,r=t.touches.length,n=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=timelineMouseMode.touchOnly,1===r?(i=JulianDate.secondsDifference(e._scrubJulian,e._startJulian),i=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+n),Math.abs(t.touches[0].clientX-i)<50?(e._touchMode=timelineTouchMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===r?"-16px 0":"0 0")):(e._touchMode=timelineTouchMode.singleTap,e._touchState.centerX=t.touches[0].clientX-n)):2===r?(e._touchMode=timelineTouchMode.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-n,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=timelineTouchMode.ignore}}function createTouchEndCallback(e){return function(t){var i=t.touches.length,r=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap?(e._touchMode=timelineTouchMode.scrub,e._onTouchMove(t)):e._touchMode===timelineTouchMode.scrub&&e._onTouchMove(t),e._mouseMode=timelineMouseMode.touchOnly,1!==i?e._touchMode=0<i?timelineTouchMode.ignore:timelineTouchMode.none:e._touchMode===timelineTouchMode.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-r),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function createTouchMoveCallback(e){return function(t){var i,r,n,a,o=1,s=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap&&(e._touchMode=timelineTouchMode.slideZoom),e._mouseMode=timelineMouseMode.touchOnly,e._touchMode===timelineTouchMode.scrub?(t.preventDefault(),1===t.changedTouches.length&&0<=(i=t.changedTouches[0].clientX-s)&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth)):e._touchMode===timelineTouchMode.slideZoom&&(2===(i=t.touches.length)?(r=.5*(t.touches[0].clientX+t.touches[1].clientX)-s,n=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===i&&(r=t.touches[0].clientX-s,n=0),defined(r)&&(a=0<n&&0<e._touchState.spanX?(o=e._touchState.spanX/n,JulianDate.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*o)/e._topDiv.clientWidth,new JulianDate)):(a=e._touchState.centerX-r,JulianDate.addSeconds(e._startJulian,a*e._timeBarSecondsSpan/e._topDiv.clientWidth,new JulianDate)),e.zoomTo(a,JulianDate.addSeconds(a,e._timeBarSecondsSpan*o,new JulianDate)),e._touchState.centerX=r,e._touchState.spanX=n))}}function lockScreen(e){var t=!1,i=window.screen;return defined(i)&&(defined(i.lockOrientation)?t=i.lockOrientation(e):defined(i.mozLockOrientation)?t=i.mozLockOrientation(e):defined(i.msLockOrientation)?t=i.msLockOrientation(e):defined(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function unlockScreen(){var e=window.screen;defined(e)&&(defined(e.unlockOrientation)?e.unlockOrientation():defined(e.mozUnlockOrientation)?e.mozUnlockOrientation():defined(e.msUnlockOrientation)?e.msUnlockOrientation():defined(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function toggleVR(e,t,i,r){r()||(i()?(t.useWebVR=!1,e._locked&&(unlockScreen(),e._locked=!1),e._noSleep.disable(),Fullscreen.exitFullscreen(),i(!1)):(Fullscreen.fullscreen||Fullscreen.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=lockScreen("landscape")),i(t.useWebVR=!0)))}function VRButtonViewModel(e,t){var i=this,r=knockout.observable(Fullscreen.enabled),n=knockout.observable(!1);this.isVRMode=void 0,knockout.defineProperty(this,"isVRMode",{get:function(){return n()}}),this.isVREnabled=void 0,knockout.defineProperty(this,"isVREnabled",{get:function(){return r()},set:function(e){r(e&&Fullscreen.enabled)}}),this.tooltip=void 0,knockout.defineProperty(this,"tooltip",(function(){return r()?n()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}));var a=knockout.observable(!1);this._isOrthographic=void 0,knockout.defineProperty(this,"_isOrthographic",{get:function(){return a()}}),this._eventHelper=new EventHelper,this._eventHelper.add(e.preRender,(function(){a(e.camera.frustum instanceof OrthographicFrustum)})),this._locked=!1,this._noSleep=new NoSleep,this._command=createCommand$2((function(){toggleVR(i,e,n,a)}),knockout.getObservable(this,"isVREnabled")),this._vrElement=defaultValue(getElement(t),document.body),this._callback=function(){!Fullscreen.fullscreen&&n()&&(e.useWebVR=!1,i._locked&&(unlockScreen(),i._locked=!1),i._noSleep.disable(),n(!1))},document.addEventListener(Fullscreen.changeEventName,this._callback)}Timeline.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},Timeline.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},Timeline.prototype.isDestroyed=function(){return!1},Timeline.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);var e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1),(e=this._timeBarEle).removeEventListener("mousedown",this._onMouseDown,!1),e.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),e.removeEventListener("mousewheel",this._onMouseWheel,!1),e.removeEventListener("touchstart",this._onTouchStart,!1),e.removeEventListener("touchmove",this._onTouchMove,!1),e.removeEventListener("touchend",this._onTouchEnd,!1),e.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),destroyObject(this)},Timeline.prototype.addHighlightRange=function(e,t,i){return i=new TimelineHighlightRange(e,t,i),this._highlightRanges.push(i),this.resize(),i},Timeline.prototype.addTrack=function(e,t,i,r){return r=new TimelineTrack(e,t,i,r),this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},Timeline.prototype.zoomTo=function(e,t){var i,r;this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=JulianDate.secondsDifference(t,e),this._clock&&this._clock.clockRange!==ClockRange$1.UNBOUNDED&&(i=this._clock.startTime,n=this._clock.stopTime,r=JulianDate.secondsDifference(n,i),t=JulianDate.secondsDifference(i,this._startJulian),e=JulianDate.secondsDifference(n,this._endJulian),this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):0<t?(this._endJulian=JulianDate.addSeconds(this._endJulian,t,new JulianDate),this._startJulian=i,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian)):e<0&&(this._startJulian=JulianDate.addSeconds(this._startJulian,e,new JulianDate),this._endJulian=n,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian))),this._makeTics();var n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)},Timeline.prototype.zoomFrom=function(e){var t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian);1<e||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(JulianDate.addSeconds(this._startJulian,t-t*e,new JulianDate),JulianDate.addSeconds(this._endJulian,i*e-i,new JulianDate))},Timeline.prototype.makeLabel=function(e){var t=JulianDate.toGregorianDate(e),i=" UTC";if(0<(e=t.millisecond)&&this._timeBarSecondsSpan<3600){for(i=Math.floor(e).toString();i.length<3;)i="0"+i;i="."+i}return timelineMonthNames[t.month-1]+" "+t.day+" "+t.year+" "+twoDigits(t.hour)+":"+twoDigits(t.minute)+":"+twoDigits(t.second)+i},Timeline.prototype.smallestTicInPixels=7,Timeline.prototype._makeTics=function(){var e,t=this._timeBarEle,i=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),r=(u=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan))-8,n=this;this._needleEle.style.left=u.toString()+"px";var a="",o=(i=31536e6,0),s=this._timeBarSecondsSpan;s<.01?(s=.01,this._timeBarSecondsSpan=.01,this._endJulian=JulianDate.addSeconds(this._startJulian,.01,new JulianDate)):i<s&&(s=i,this._timeBarSecondsSpan=i,this._endJulian=JulianDate.addSeconds(this._startJulian,i,new JulianDate));var l=this._timeBarEle.clientWidth;l<10&&(l=10);var c=this._startJulian,u=Math.min(s/l*1e-5,.4),d=(i=JulianDate.toGregorianDate(c),i=31536e4<s?JulianDate.fromDate(new Date(Date.UTC(100*Math.floor(i.year/100),0))):31536e3<s?JulianDate.fromDate(new Date(Date.UTC(10*Math.floor(i.year/10),0))):86400<s?JulianDate.fromDate(new Date(Date.UTC(i.year,0))):JulianDate.fromDate(new Date(Date.UTC(i.year,i.month,i.day))),JulianDate.secondsDifference(this._startJulian,JulianDate.addSeconds(i,u,new JulianDate))),h=d+s;function p(e){return Math.floor(d/e)*e}function f(e,t){return Math.ceil(e/t+.5)*t}function m(e){return(e-d)/s}function g(e,t){return e-t*Math.round(e/t)}this._epochJulian=i,this._rulerEle.innerHTML=this.makeLabel(JulianDate.addSeconds(this._endJulian,-.01,new JulianDate));var y=this._rulerEle.offsetWidth+20;y<30&&(y=180),u=o,o-=1e-10;var _={startTime:d,startJulian:c,epochJulian:i,duration:s,timeBarWidth:l,getAlpha:m};this._highlightRanges.forEach((function(e){a+=e.render(_)}));var v=0,C=0,x=0,b=y/l;1<b&&(b=1),b*=this._timeBarSecondsSpan;for(var S=-1,T=-1,E=timelineTicScales.length,w=0;w<E;++w){var A=timelineTicScales[w];if(++S,b<(v=A)&&o<A)break;T<0&&l*(A/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(T=S)}if(0<S){for(;0<S;)if(--S,Math.abs(g(v,timelineTicScales[S]))<1e-5){timelineTicScales[S]>=o&&(C=timelineTicScales[S]);break}if(0<=T)for(;T<S;){if(Math.abs(g(C,timelineTicScales[T]))<1e-5&&timelineTicScales[T]>=o){x=timelineTicScales[T];break}++T}}1e-10<(o=u)&&x<1e-5&&1e-10<Math.abs(o-v)&&(x=o)<=v+1e-10&&(C=0);var P=-999999;if(3<=l*(x/this._timeBarSecondsSpan))for(e=p(x);e<=h;e=f(e,x))a+='<span class="cesium-timeline-ticTiny" style="left: '+Math.round(l*m(e)).toString()+'px;"></span>';if(3<=l*(C/this._timeBarSecondsSpan))for(e=p(C);e<=h;e=f(e,C))a+='<span class="cesium-timeline-ticSub" style="left: '+Math.round(l*m(e)).toString()+'px;"></span>';if(2<=l*(v/this._timeBarSecondsSpan)){h+=this._mainTicSpan=v,e=p(v);for(var D=JulianDate.computeTaiMinusUtc(i);e<=h;){var M,I=JulianDate.addSeconds(c,e-d,new JulianDate);2.1<v&&(M=JulianDate.computeTaiMinusUtc(I),.1<Math.abs(M-D)&&(e+=M-D,I=JulianDate.addSeconds(c,e-d,new JulianDate)));var R=Math.round(l*m(e)),O=this.makeLabel(I);this._rulerEle.innerHTML=O,(M=this._rulerEle.offsetWidth)<10&&(M=y),P<(I=R-(M/2-1))?(P=I+M+5,a+='<span class="cesium-timeline-ticMain" style="left: '+R.toString()+'px;"></span><span class="cesium-timeline-ticLabel" style="left: '+I.toString()+'px;">'+O+"</span>"):a+='<span class="cesium-timeline-ticSub" style="left: '+R.toString()+'px;"></span>',e=f(e,v)}}else this._mainTicSpan=-1;a+='<span class="cesium-timeline-icon16" style="left:'+r+'px;bottom:0;background-position: 0 0;"></span>',t.innerHTML=a,this._scrubElement=t.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),_.y=0,this._trackList.forEach((function(e){e.render(n._context,_),_.y+=e.height}))},Timeline.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e,t=this._scrubElement;defined(this._scrubElement)&&(e=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),e=Math.round(e*this._topDiv.clientWidth/this._timeBarSecondsSpan),this._lastXPos!==e&&(this._lastXPos=e,t.style.left=e-8+"px",this._needleEle.style.left=e+"px")),defined(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(JulianDate.addSeconds(this._startJulian,this._timelineDrag,new JulianDate),JulianDate.addSeconds(this._endJulian,this._timelineDrag,new JulianDate)))},Timeline.prototype._setTimeBarTime=function(e,t){e=Math.round(e),this._scrubJulian=JulianDate.addSeconds(this._startJulian,t,new JulianDate),this._scrubElement&&(i=e-8,this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px");var i=document.createEvent("Event");i.initEvent("settime",!0,!0),i.clientX=e,i.timeSeconds=t,i.timeJulian=this._scrubJulian,i.clock=this._clock,this._topDiv.dispatchEvent(i)},Timeline.prototype.resize=function(){var e,t=this.container.clientWidth,i=this.container.clientHeight;t===this._lastWidth&&i===this._lastHeight||(this._trackContainer.style.height=i+"px",e=1,this._trackList.forEach((function(t){e+=t.height})),this._trackListEle.style.height=e.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=e,this._makeTics(),this._lastXPos=void 0,this._lastWidth=t,this._lastHeight=i)},Object.defineProperties(VRButtonViewModel.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}}),VRButtonViewModel.prototype.isDestroyed=function(){return!1},VRButtonViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Fullscreen.changeEventName,this._callback),destroyObject(this)};var enterVRPath="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",exitVRPath="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function VRButton(e,t,i){e=getElement(e),(t=new VRButtonViewModel(t,i))._exitVRPath=exitVRPath,t._enterVRPath=enterVRPath,(i=document.createElement("button")).type="button",i.className="cesium-button cesium-vrButton",i.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(i),knockout.applyBindings(t,i),this._container=e,this._viewModel=t,this._element=i}Object.defineProperties(VRButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),VRButton.prototype.isDestroyed=function(){return!1},VRButton.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)};var boundingSphereScratch$2=new BoundingSphere;function onTimelineScrubfunction(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function getCesium3DTileFeatureDescription(e){var t=e.getPropertyNames(),i="";return t.forEach((function(t){var r=e.getProperty(t);defined(r)&&(i+="<tr><th>"+t+"</th><td>"+r+"</td></tr>")})),0<i.length&&(i='<table class="cesium-infoBox-defaultTable"><tbody>'+i+"</tbody></table>"),i}function getCesium3DTileFeatureName(e){for(var t=[],i=e.getPropertyNames(),r=0;r<i.length;r++){var n=i[r];/^name$/i.test(n)?t[0]=e.getProperty(n):/name/i.test(n)?t[1]=e.getProperty(n):/^title$/i.test(n)?t[2]=e.getProperty(n):/^(id|identifier)$/i.test(n)?t[3]=e.getProperty(n):/element/i.test(n)?t[4]=e.getProperty(n):/(id|identifier)$/i.test(n)&&(t[5]=e.getProperty(n))}var a=t.length;for(r=0;r<a;r++){var o=t[r];if(defined(o)&&""!==o)return o}return"Unnamed Feature"}function pickEntity(e,t){var i=e.scene.pick(t.position);if(defined(i)){var r=defaultValue(i.id,i.primitive.id);if(r instanceof Entity)return r;if(i instanceof Cesium3DTileFeature)return new Entity({name:getCesium3DTileFeatureName(i),description:getCesium3DTileFeatureDescription(i),feature:i})}if(defined(e.scene.globe))return pickImageryLayerFeature(e,t.position)}function trackDataSourceClock(e,t,i){!defined(i)||defined(i=i.clock)&&(i.getValue(t),defined(e)&&(e.updateFromClock(),e.zoomTo(i.startTime,i.stopTime)))}var cartesian3Scratch$3=new Cartesian3;function pickImageryLayerFeature(e,t){var i;t=(i=e.scene).camera.getPickRay(t);if(defined(i=i.imageryLayers.pickImageryLayerFeatures(t,i))){var r=new Entity({id:"Loading...",description:"Loading feature information..."});return when(i,(function(t){var i;e.selectedEntity===r&&(defined(t)&&0!==t.length?(t=new Entity({id:(i=t[0]).name,description:i.description}),defined(i.position)&&(i=e.scene.globe.ellipsoid.cartographicToCartesian(i.position,cartesian3Scratch$3),t.position=new ConstantPositionProperty(i)),e.selectedEntity=t):e.selectedEntity=createNoFeaturesEntity())}),(function(){e.selectedEntity===r&&(e.selectedEntity=createNoFeaturesEntity())})),r}}function createNoFeaturesEntity(){return new Entity({id:"None",description:"No features found."})}function enableVRUI(e,t){var i=e._geocoder,r=e._homeButton,n=e._sceneModePicker,a=e._projectionPicker,o=e._baseLayerPicker,s=e._animation,l=e._timeline,c=e._fullscreenButton,u=e._infoBox,d=e._selectionIndicator,h=t?"hidden":"visible";defined(i)&&(i.container.style.visibility=h),defined(r)&&(r.container.style.visibility=h),defined(n)&&(n.container.style.visibility=h),defined(a)&&(a.container.style.visibility=h),defined(o)&&(o.container.style.visibility=h),defined(s)&&(s.container.style.visibility=h),defined(l)&&(l.container.style.visibility=h),defined(c)&&c.viewModel.isFullscreenEnabled&&(c.container.style.visibility=h),defined(u)&&(u.container.style.visibility=h),defined(d)&&(d.container.style.visibility=h),e._container&&(c=t||!defined(c)?0:c.container.clientWidth,e._vrButton.container.style.right=c+"px",e.forceResize())}function Viewer(e,t){e=getElement(e);var i=!(defined((t=defaultValue(t,defaultValue.EMPTY_OBJECT)).globe)&&!1===t.globe||defined(t.baseLayerPicker)&&!1===t.baseLayerPicker),r=this,n=document.createElement("div");n.className="cesium-viewer",e.appendChild(n),(m=document.createElement("div")).className="cesium-viewer-cesiumWidgetContainer",n.appendChild(m);var a=document.createElement("div");a.className="cesium-viewer-bottom",n.appendChild(a);var o,s,l=defaultValue(t.scene3DOnly,!1),c=!1;defined(t.clockViewModel)?o=(s=t.clockViewModel).clock:(s=new ClockViewModel(o=new Clock),c=!0),defined(t.shouldAnimate)&&(o.shouldAnimate=t.shouldAnimate);var u=new CesiumWidget(m,{imageryProvider:!i&&!defined(t.imageryProvider)&&void 0,clock:o,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:defined(t.creditContainer)?t.creditContainer:a,creditViewport:t.creditViewport,scene3DOnly:l,terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange}),d=t.dataSources,h=!1;defined(d)||(d=new DataSourceCollection,h=!0);var p,f,m,g=u.scene,y=new DataSourceDisplay({scene:g,dataSourceCollection:d});(m=new EventHelper).add(o.onTick,Viewer.prototype._onTick,this),m.add(g.morphStart,Viewer.prototype._clearTrackedObject,this),defined(t.selectionIndicator)&&!1===t.selectionIndicator||((p=document.createElement("div")).className="cesium-viewer-selectionIndicatorContainer",n.appendChild(p),p=new SelectionIndicator(p,g)),defined(t.infoBox)&&!1===t.infoBox||((B=document.createElement("div")).className="cesium-viewer-infoBoxContainer",n.appendChild(B),v=(f=new InfoBox(B)).viewModel,m.add(v.cameraClicked,Viewer.prototype._onInfoBoxCameraClicked,this),m.add(v.closeClicked,Viewer.prototype._onInfoBoxClockClicked,this));var _,v,C,x,b,S,T,E,w,A,P,D,M,I,R,O,L,N,F,B=document.createElement("div");if(B.className="cesium-viewer-toolbar",n.appendChild(B),defined(t.geocoder)&&!1===t.geocoder||((v=document.createElement("div")).className="cesium-viewer-geocoderContainer",B.appendChild(v),defined(t.geocoder)&&"boolean"!=typeof t.geocoder&&(C=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),_=new Geocoder({container:v,geocoderServices:C,scene:g}),m.add(_.viewModel.search.beforeExecute,Viewer.prototype._clearObjects,this)),defined(t.homeButton)&&!1===t.homeButton||(x=new HomeButton(B,g),defined(_)&&m.add(x.viewModel.command.afterExecute,(function(){var e=_.viewModel;e.searchText="",e.isSearchInProgress&&e.search()})),m.add(x.viewModel.command.beforeExecute,Viewer.prototype._clearTrackedObject,this)),l||defined(t.sceneModePicker)&&!1===t.sceneModePicker||(b=new SceneModePicker(B,g)),t.projectionPicker&&(S=new ProjectionPicker(B,g)),i&&(T=defaultValue(t.imageryProviderViewModels,createDefaultImageryProviderViewModels()),E=defaultValue(t.terrainProviderViewModels,createDefaultTerrainProviderViewModels()),T=new BaseLayerPicker(B,{globe:g.globe,imageryProviderViewModels:T,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:E,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),E=B.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]),defined(t.imageryProvider)&&!1!==t.imageryProvider&&(i&&(T.viewModel.selectedImagery=void 0),g.imageryLayers.removeAll(),g.imageryLayers.addImageryProvider(t.imageryProvider)),defined(t.terrainProvider)&&(i&&(T.viewModel.selectedTerrain=void 0),g.terrainProvider=t.terrainProvider),!defined(t.navigationHelpButton)||!1!==t.navigationHelpButton){var V,k=!0;try{defined(window.localStorage)&&(defined(V=window.localStorage.getItem("cesium-hasSeenNavHelp"))&&Boolean(V)?k=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true"))}catch(e){}w=new NavigationHelpButton({container:B,instructionsInitiallyVisible:defaultValue(t.navigationInstructionsInitiallyVisible,k)})}defined(t.animation)&&!1===t.animation||((D=document.createElement("div")).className="cesium-viewer-animationContainer",n.appendChild(D),A=new Animation(D,new AnimationViewModel(s))),defined(t.timeline)&&!1===t.timeline||((D=document.createElement("div")).className="cesium-viewer-timelineContainer",n.appendChild(D),(P=new Timeline(D,o)).addEventListener("settime",onTimelineScrubfunction,!1),P.zoomTo(o.startTime,o.stopTime)),defined(t.fullscreenButton)&&!1===t.fullscreenButton||((R=document.createElement("div")).className="cesium-viewer-fullscreenContainer",n.appendChild(R),I=subscribeAndEvaluate((M=new FullscreenButton(R,t.fullscreenElement)).viewModel,"isFullscreenEnabled",(function(e){R.style.display=e?"block":"none",defined(P)&&(P.container.style.right=R.clientWidth+"px",P.resize())}))),t.vrButton&&((F=document.createElement("div")).className="cesium-viewer-vrContainer",n.appendChild(F),L=subscribeAndEvaluate((O=new VRButton(F,g,t.fullScreenElement)).viewModel,"isVREnabled",(function(e){F.style.display=e?"block":"none",defined(M)&&(F.style.right=R.clientWidth+"px"),defined(P)&&(P.container.style.right=F.clientWidth+"px",P.resize())})),N=subscribeAndEvaluate(O.viewModel,"isVRMode",(function(e){enableVRUI(r,e)}))),this._baseLayerPickerDropDown=E,this._fullscreenSubscription=I,this._vrSubscription=L,this._vrModeSubscription=N,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=defaultValue(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=a,this._element=n,this._cesiumWidget=u,this._selectionIndicator=p,this._infoBox=f,this._dataSourceCollection=d,this._destroyDataSourceCollection=h,this._dataSourceDisplay=y,this._clockViewModel=s,this._destroyClockViewModel=c,this._toolbar=B,this._homeButton=x,this._sceneModePicker=b,this._projectionPicker=S,this._baseLayerPicker=T,this._navigationHelpButton=w,this._animation=A,this._timeline=P,this._fullscreenButton=M,this._vrButton=O,this._geocoder=_,this._eventHelper=m,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=defined(f)||defined(p),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new Event,this._trackedEntityChanged=new Event,knockout.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),m.add(d.dataSourceAdded,Viewer.prototype._onDataSourceAdded,this),m.add(d.dataSourceRemoved,Viewer.prototype._onDataSourceRemoved,this),m.add(g.postUpdate,Viewer.prototype.resize,this),m.add(g.postRender,Viewer.prototype._postRender,this);for(var z=d.length,G=0;G<z;G++)this._dataSourceAdded(d,d.get(G));this._dataSourceAdded(void 0,y.defaultDataSource),m.add(d.dataSourceAdded,Viewer.prototype._dataSourceAdded,this),m.add(d.dataSourceRemoved,Viewer.prototype._dataSourceRemoved,this),u.screenSpaceEventHandler.setInputAction((function(e){r.selectedEntity=pickEntity(r,e)}),ScreenSpaceEventType$1.LEFT_CLICK),u.screenSpaceEventHandler.setInputAction((function(e){defined(e=pickEntity(r,e))?Property.getValueOrUndefined(e.position,r.clock.currentTime)?r.trackedEntity=e:r.zoomTo(e):defined(r.trackedEntity)&&(r.trackedEntity=void 0)}),ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK)}function zoomToOrFly(e,t,i,r){cancelZoom(e);var n=when.defer();return e._zoomPromise=n,e._zoomIsFlight=r,e._zoomOptions=i,when(t,(function(t){var i;e._zoomPromise===n&&(t instanceof ImageryLayer?t.getViewableRectangle().then((function(t){return computeFlyToLocationForRectangle(t,e.scene)})).then((function(t){e._zoomPromise===n&&(e._zoomTarget=t)})):t instanceof Cesium3DTileset||t instanceof TimeDynamicPointCloud?e._zoomTarget=t:t.isLoading&&defined(t.loadingEvent)?i=t.loadingEvent.addEventListener((function(){i(),e._zoomPromise===n&&(e._zoomTarget=t.entities.values.slice(0))})):Array.isArray(t)?e._zoomTarget=t.slice(0):(defined((t=defaultValue(t.values,t)).entities)&&(t=t.entities.values),Array.isArray(t)?e._zoomTarget=t.slice(0):e._zoomTarget=[t]))})),e.scene.requestRender(),n.promise}function clearZoom(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function cancelZoom(e){var t=e._zoomPromise;defined(t)&&(clearZoom(e),t.resolve(!1))}function updateZoomTarget(e){var t=e._zoomTarget;if(defined(t)&&e.scene.mode!==SceneMode$1.MORPHING){var i,r=e.scene,n=r.camera,a=e._zoomPromise,o=defaultValue(e._zoomOptions,{});if(t instanceof Cesium3DTileset)return t.readyPromise.then((function(){var r=t.boundingSphere;defined(o.offset)||(o.offset=new HeadingPitchRange(0,-.5,r.radius)),i={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){a.resolve(!0)},cancel:function(){a.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(t.boundingSphere,i):(n.viewBoundingSphere(r,o.offset),n.lookAtTransform(Matrix4.IDENTITY),a.resolve(!0)),clearZoom(e)}));if(t instanceof TimeDynamicPointCloud)return t.readyPromise.then((function(){var r=t.boundingSphere;defined(o.offset)||(o.offset=new HeadingPitchRange(0,-.5,r.radius)),i={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){a.resolve(!0)},cancel:function(){a.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(r,i):(n.viewBoundingSphere(r,o.offset),n.lookAtTransform(Matrix4.IDENTITY),a.resolve(!0)),clearZoom(e)}));if(t instanceof Cartographic)return i={destination:r.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){a.resolve(!0)},cancel:function(){a.resolve(!1)}},e._zoomIsFlight?n.flyTo(i):(n.setView(i),a.resolve(!0)),void clearZoom(e);for(var s=t,l=[],c=0,u=s.length;c<u;c++){var d=e._dataSourceDisplay.getBoundingSphere(s[c],!1,boundingSphereScratch$2);if(d===BoundingSphereState$1.PENDING)return;d!==BoundingSphereState$1.FAILED&&l.push(BoundingSphere.clone(boundingSphereScratch$2))}0!==l.length?(e.trackedEntity=void 0,r=BoundingSphere.fromBoundingSpheres(l),e._zoomIsFlight?(clearZoom(e),n.flyToBoundingSphere(r,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){a.resolve(!0)},cancel:function(){a.resolve(!1)},offset:o.offset})):(n.viewBoundingSphere(r,o.offset),n.lookAtTransform(Matrix4.IDENTITY),clearZoom(e),a.resolve(!0))):cancelZoom(e)}}function updateTrackedEntity(e){var t,i,r,n,a;e._needTrackedEntityUpdate&&(t=e._trackedEntity,i=e.clock.currentTime,defined(Property.getValueOrUndefined(t.position,i))&&(r=e.scene,(a=e._dataSourceDisplay.getBoundingSphere(t,!1,boundingSphereScratch$2))!==BoundingSphereState$1.PENDING&&((n=r.mode)!==SceneMode$1.COLUMBUS_VIEW&&n!==SceneMode$1.SCENE2D||(r.screenSpaceCameraController.enableTranslate=!1),n!==SceneMode$1.COLUMBUS_VIEW&&n!==SceneMode$1.SCENE3D||(r.screenSpaceCameraController.enableTilt=!1),a=a!==BoundingSphereState$1.FAILED?boundingSphereScratch$2:void 0,e._entityView=new EntityView(t,r,r.mapProjection.ellipsoid),e._entityView.update(i,a),e._needTrackedEntityUpdate=!1)))}function viewerCesium3DTilesInspectorMixin(e){var t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);var i=new Cesium3DTilesInspector(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function viewerCesiumInspectorMixin(e){var t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);var i=new CesiumInspector(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function viewerDragDropMixin(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=!0,r=defaultValue(t.flyToOnDrop,!0),n=new Event,a=defaultValue(t.clearOnDrop,!0),o=defaultValue(t.dropTarget,e.container),s=defaultValue(t.clampToGround,!0),l=t.proxy;function c(t){stop(t),a&&(e.entities.removeAll(),e.dataSources.removeAll());for(var i=t.dataTransfer.files,r=i.length,n=0;n<r;n++){var o=i[n],c=new FileReader;c.onload=createOnLoadCallback(e,o,l,s),c.onerror=createDropErrorCallback(e,o),c.readAsText(o)}}o=getElement(o),Object.defineProperties(e,{dropTarget:{get:function(){return o},set:function(e){unsubscribe(o,c),subscribe(o=e,c)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&((e?subscribe:unsubscribe)(o,c),i=e)}},dropError:{get:function(){return n}},clearOnDrop:{get:function(){return a},set:function(e){a=e}},flyToOnDrop:{get:function(){return r},set:function(e){r=e}},proxy:{get:function(){return l},set:function(e){l=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),subscribe(o,c),e.destroy=wrapFunction(e,e.destroy,(function(){e.dropEnabled=!1})),e._handleDrop=c}function stop(e){e.stopPropagation(),e.preventDefault()}function unsubscribe(e,t){defined(e)&&(e.removeEventListener("drop",t,!1),e.removeEventListener("dragenter",stop,!1),e.removeEventListener("dragover",stop,!1),e.removeEventListener("dragexit",stop,!1))}function subscribe(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",stop,!1),e.addEventListener("dragover",stop,!1),e.addEventListener("dragexit",stop,!1)}function createOnLoadCallback(e,t,i,r){var n=e.scene;return function(a){var o,s=t.name;try{if(/\.czml$/i.test(s))o=CzmlDataSource.load(JSON.parse(a.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))o=GeoJsonDataSource.load(JSON.parse(a.target.result),{sourceUri:s,clampToGround:r});else{if(!/\.(kml|kmz)$/i.test(s))return void e.dropError.raiseEvent(e,s,"Unrecognized file: "+s);o=KmlDataSource.load(t,{sourceUri:s,proxy:i,camera:n.camera,canvas:n.canvas,clampToGround:r})}defined(o)&&e.dataSources.add(o).then((function(t){e.flyToOnDrop&&e.flyTo(t)})).otherwise((function(t){e.dropError.raiseEvent(e,s,t)}))}catch(a){e.dropError.raiseEvent(e,s,a)}}}function createDropErrorCallback(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function viewerPerformanceWatchdogMixin(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=new PerformanceWatchdog({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}function callAndWrap(e,t,i){try{return e(t,i)}catch(e){return when.reject(e)}}function createTaskProcessorWorker(e){var t;return function(i){var r=i.data,n=[],a={id:r.id,result:void 0,error:void 0};return when(callAndWrap(e,r.parameters,n)).then((function(e){a.result=e})).otherwise((function(e){e instanceof Error?a.error={name:e.name,message:e.message,stack:e.stack}:a.error=e})).always((function(){defined(t)||(t=defaultValue(self.webkitPostMessage,self.postMessage)),r.canTransferArrayBuffer||(n.length=0);try{t(a,n)}catch(e){a.result=void 0,a.error="postMessage failed with error: "+formatError(e)+"\n  with responseMessage: "+JSON.stringify(a),t(a)}}))}}Object.defineProperties(Viewer.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){var t,i;this._trackedEntity!==e&&(this._trackedEntity=e,cancelZoom(this),i=(t=this.scene).mode,defined(e)&&defined(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,i!==SceneMode$1.COLUMBUS_VIEW&&i!==SceneMode$1.SCENE2D||(t.screenSpaceCameraController.enableTranslate=!0),i!==SceneMode$1.COLUMBUS_VIEW&&i!==SceneMode$1.SCENE3D||(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Matrix4.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender())}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){var t;this._selectedEntity!==e&&(this._selectedEntity=e,t=defined(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0,defined(e)?defined(t)&&t.animateAppear():defined(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e))}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,trackDataSourceClock(this._timeline,this.clock,e))}}}),Viewer.prototype.extend=function(e,t){e(this,t)},Viewer.prototype.resize=function(){var e,t,i,r,n=this._cesiumWidget,a=this._container,o=a.clientWidth,s=a.clientHeight,l=defined(this._animation),c=defined(this._timeline);n.resize(),o===this._lastWidth&&s===this._lastHeight||(r=s-125,defined(e=this._baseLayerPickerDropDown)&&(e.style.maxHeight=r+"px"),defined(this._geocoder)&&(this._geocoder.searchSuggestionsContainer.style.maxHeight=r+"px"),defined(this._infoBox)&&(this._infoBox.viewModel.maxHeight=r),a=this._timeline,r=e=n=0,l&&"hidden"!==window.getComputedStyle(this._animation.container).visibility&&(t=this._lastWidth,i=this._animation.container,900<o?(n=169,t<=900&&(i.style.width="169px",i.style.height="112px",this._animation.resize())):600<=o?(n=136,(t<600||900<t)&&(i.style.width="136px",i.style.height="90px",this._animation.resize())):(n=106,(600<t||0===t)&&(i.style.width="106px",i.style.height="70px",this._animation.resize())),e=n+5),c&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility&&(l=this._fullscreenButton,t=this._vrButton,c=(i=a.container).style,r=i.clientHeight+3,c.left=n+"px",n=0,defined(l)&&(n+=l.container.clientWidth),defined(t)&&(n+=t.container.clientWidth),c.right=n+"px",a.resize()),this._bottomContainer.style.left=e+"px",this._bottomContainer.style.bottom=r+"px",this._lastWidth=o,this._lastHeight=s)},Viewer.prototype.forceResize=function(){this._lastWidth=0,this.resize()},Viewer.prototype.render=function(){this._cesiumWidget.render()},Viewer.prototype.isDestroyed=function(){return!1},Viewer.prototype.destroy=function(){this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK);for(var e=this.dataSources,t=e.length,i=0;i<t;i++)this._dataSourceRemoved(e,e.get(i));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),defined(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),defined(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),defined(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),defined(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),defined(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),defined(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),defined(this._timeline)&&(this._timeline.removeEventListener("settime",onTimelineScrubfunction,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),defined(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),defined(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),defined(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),defined(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),destroyObject(this)},Viewer.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Viewer.prototype._onEntityCollectionChanged,this)},Viewer.prototype._dataSourceRemoved=function(e,t){(t=t.entities).collectionChanged.removeEventListener(Viewer.prototype._onEntityCollectionChanged,this),defined(this.trackedEntity)&&t.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),defined(this.selectedEntity)&&t.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)},Viewer.prototype._onTick=function(e){var t=e.currentTime,i=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=i);var r,n=this._entityView;defined(n)&&(a=this._trackedEntity,this._dataSourceDisplay.getBoundingSphere(a,!1,boundingSphereScratch$2)===BoundingSphereState$1.DONE&&n.update(t,boundingSphereScratch$2));e=!1;var a=defined(i=this.selectedEntity)&&this._enableInfoOrSelection;a&&i.isShowing&&i.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(i,!0,boundingSphereScratch$2)!==BoundingSphereState$1.FAILED?r=boundingSphereScratch$2.center:defined(i.position)&&(r=i.position.getValue(t,r)),e=defined(r)),n=defined(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0,defined(n)&&(n.position=Cartesian3.clone(r,n.position),n.showSelection=a&&e,n.update()),n=defined(this._infoBox)?this._infoBox.viewModel:void 0,defined(n)&&(n.showInfo=a,n.enableCamera=e,n.isCameraTracking=this.trackedEntity===this.selectedEntity,a?(n.titleText=defaultValue(i.name,i.id),n.description=Property.getValueOrDefault(i.description,t,"")):(n.titleText="",n.description=""))},Viewer.prototype._onEntityCollectionChanged=function(e,t,i){for(var r=i.length,n=0;n<r;n++){var a=i[n];this.trackedEntity===a&&(this.trackedEntity=void 0),this.selectedEntity===a&&(this.selectedEntity=void 0)}},Viewer.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:defined(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},Viewer.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},Viewer.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},Viewer.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},Viewer.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&trackDataSourceClock(this.timeline,this.clock,e)},Viewer.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);var i=t.entities.id;t=this._eventHelper.add(t.changedEvent,Viewer.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=t},Viewer.prototype._onDataSourceRemoved=function(e,t){var i=this.clockTrackedDataSource===t;t=t.entities.id;this._dataSourceChangedListeners[t](),this._dataSourceChangedListeners[t]=void 0,i&&(i=e.length,this._automaticallyTrackDataSourceClocks&&0<i?this.clockTrackedDataSource=e.get(i-1):this.clockTrackedDataSource=void 0)},Viewer.prototype.zoomTo=function(e,t){return zoomToOrFly(this,e,{offset:t},!1)},Viewer.prototype.flyTo=function(e,t){return zoomToOrFly(this,e,t,!0)},Viewer.prototype._postRender=function(){updateZoomTarget(this),updateTrackedEntity(this)};var VERSION="1.74";exports.Animation=Animation,exports.AnimationViewModel=AnimationViewModel,exports.Appearance=Appearance,exports.ApproximateTerrainHeights=ApproximateTerrainHeights,exports.ArcGISTiledElevationTerrainProvider=ArcGISTiledElevationTerrainProvider,exports.ArcGisMapServerImageryProvider=ArcGisMapServerImageryProvider,exports.ArcType=ArcType$1,exports.AssociativeArray=AssociativeArray,exports.AttributeCompression=AttributeCompression,exports.AttributeType=AttributeType$1,exports.AutoExposure=AutoExposure,exports.Autolinker=Autolinker,exports.AutomaticUniforms=AutomaticUniforms,exports.Axis=Axis$1,exports.AxisAlignedBoundingBox=AxisAlignedBoundingBox,exports.BaseLayerPicker=BaseLayerPicker,exports.BaseLayerPickerViewModel=BaseLayerPickerViewModel,exports.BatchTable=BatchTable,exports.Batched3DModel3DTileContent=Batched3DModel3DTileContent,exports.Billboard=Billboard,exports.BillboardCollection=BillboardCollection,exports.BillboardGraphics=BillboardGraphics,exports.BillboardVisualizer=BillboardVisualizer,exports.BingMapsGeocoderService=BingMapsGeocoderService,exports.BingMapsImageryProvider=BingMapsImageryProvider,exports.BingMapsStyle=BingMapsStyle$1,exports.BlendEquation=BlendEquation$1,exports.BlendFunction=BlendFunction$1,exports.BlendOption=BlendOption$1,exports.BlendingState=BlendingState$1,exports.BoundingRectangle=BoundingRectangle,exports.BoundingSphere=BoundingSphere,exports.BoundingSphereState=BoundingSphereState$1,exports.BoxEmitter=BoxEmitter,exports.BoxGeometry=BoxGeometry,exports.BoxGeometryUpdater=BoxGeometryUpdater,exports.BoxGraphics=BoxGraphics,exports.BoxOutlineGeometry=BoxOutlineGeometry,exports.BrdfLutGenerator=BrdfLutGenerator,exports.Buffer=Buffer$1,exports.BufferUsage=BufferUsage$1,exports.CallbackProperty=CallbackProperty,exports.Camera=Camera,exports.CameraEventAggregator=CameraEventAggregator,exports.CameraEventType=CameraEventType$1,exports.CameraFlightPath=CameraFlightPath,exports.Cartesian2=Cartesian2,exports.Cartesian3=Cartesian3,exports.Cartesian4=Cartesian4,exports.Cartographic=Cartographic,exports.CartographicGeocoderService=CartographicGeocoderService,exports.CatmullRomSpline=CatmullRomSpline,exports.Cesium3DTile=Cesium3DTile,exports.Cesium3DTileBatchTable=Cesium3DTileBatchTable,exports.Cesium3DTileColorBlendMode=Cesium3DTileColorBlendMode$1,exports.Cesium3DTileContent=Cesium3DTileContent,exports.Cesium3DTileContentFactory=Cesium3DTileContentFactory,exports.Cesium3DTileContentState=Cesium3DTileContentState$1,exports.Cesium3DTileFeature=Cesium3DTileFeature,exports.Cesium3DTileFeatureTable=Cesium3DTileFeatureTable,exports.Cesium3DTileOptimizationHint=Cesium3DTileOptimizationHint$1,exports.Cesium3DTileOptimizations=Cesium3DTileOptimizations,exports.Cesium3DTilePass=Cesium3DTilePass$1,exports.Cesium3DTilePassState=Cesium3DTilePassState,exports.Cesium3DTilePointFeature=Cesium3DTilePointFeature,exports.Cesium3DTileRefine=Cesium3DTileRefine$1,exports.Cesium3DTileStyle=Cesium3DTileStyle,exports.Cesium3DTileStyleEngine=Cesium3DTileStyleEngine,exports.Cesium3DTilesInspector=Cesium3DTilesInspector,exports.Cesium3DTilesInspectorViewModel=Cesium3DTilesInspectorViewModel,exports.Cesium3DTileset=Cesium3DTileset,exports.Cesium3DTilesetCache=Cesium3DTilesetCache,exports.Cesium3DTilesetGraphics=Cesium3DTilesetGraphics,exports.Cesium3DTilesetHeatmap=Cesium3DTilesetHeatmap,exports.Cesium3DTilesetMostDetailedTraversal=Cesium3DTilesetMostDetailedTraversal,exports.Cesium3DTilesetStatistics=Cesium3DTilesetStatistics,exports.Cesium3DTilesetTraversal=Cesium3DTilesetTraversal,exports.Cesium3DTilesetVisualizer=Cesium3DTilesetVisualizer,exports.CesiumInspector=CesiumInspector,exports.CesiumInspectorViewModel=CesiumInspectorViewModel,exports.CesiumTerrainProvider=CesiumTerrainProvider,exports.CesiumWidget=CesiumWidget,exports.Check=Check,exports.CheckerboardMaterialProperty=CheckerboardMaterialProperty,exports.CircleEmitter=CircleEmitter,exports.CircleGeometry=CircleGeometry,exports.CircleOutlineGeometry=CircleOutlineGeometry,exports.ClassificationModel=ClassificationModel,exports.ClassificationPrimitive=ClassificationPrimitive,exports.ClassificationType=ClassificationType$1,exports.ClearCommand=ClearCommand,exports.ClippingPlane=ClippingPlane,exports.ClippingPlaneCollection=ClippingPlaneCollection,exports.Clock=Clock,exports.ClockRange=ClockRange$1,exports.ClockStep=ClockStep$1,exports.ClockViewModel=ClockViewModel,exports.Color=Color,exports.ColorBlendMode=ColorBlendMode$1,exports.ColorGeometryInstanceAttribute=ColorGeometryInstanceAttribute,exports.ColorMaterialProperty=ColorMaterialProperty,exports.Command=Command,exports.ComponentDatatype=ComponentDatatype$1,exports.Composite3DTileContent=Composite3DTileContent,exports.CompositeEntityCollection=CompositeEntityCollection,exports.CompositeMaterialProperty=CompositeMaterialProperty,exports.CompositePositionProperty=CompositePositionProperty,exports.CompositeProperty=CompositeProperty,exports.CompressedTextureBuffer=CompressedTextureBuffer,exports.ComputeCommand=ComputeCommand,exports.ComputeEngine=ComputeEngine,exports.ConditionsExpression=ConditionsExpression,exports.ConeEmitter=ConeEmitter,exports.ConstantPositionProperty=ConstantPositionProperty,exports.ConstantProperty=ConstantProperty,exports.Context=Context,exports.ContextLimits=ContextLimits,exports.CoplanarPolygonGeometry=CoplanarPolygonGeometry,exports.CoplanarPolygonGeometryLibrary=CoplanarPolygonGeometryLibrary,exports.CoplanarPolygonOutlineGeometry=CoplanarPolygonOutlineGeometry,exports.CornerType=CornerType$1,exports.CorridorGeometry=CorridorGeometry,exports.CorridorGeometryLibrary=CorridorGeometryLibrary,exports.CorridorGeometryUpdater=CorridorGeometryUpdater,exports.CorridorGraphics=CorridorGraphics,exports.CorridorOutlineGeometry=CorridorOutlineGeometry,exports.Credit=Credit,exports.CreditDisplay=CreditDisplay,exports.CubeMap=CubeMap,exports.CubeMapFace=CubeMapFace,exports.CubicRealPolynomial=CubicRealPolynomial,exports.CullFace=CullFace$1,exports.CullingVolume=CullingVolume,exports.CustomDataSource=CustomDataSource,exports.CylinderGeometry=CylinderGeometry,exports.CylinderGeometryLibrary=CylinderGeometryLibrary,exports.CylinderGeometryUpdater=CylinderGeometryUpdater,exports.CylinderGraphics=CylinderGraphics,exports.CylinderOutlineGeometry=CylinderOutlineGeometry,exports.CzmlDataSource=CzmlDataSource,exports.DataSource=DataSource,exports.DataSourceClock=DataSourceClock,exports.DataSourceCollection=DataSourceCollection,exports.DataSourceDisplay=DataSourceDisplay,exports.DebugAppearance=DebugAppearance,exports.DebugCameraPrimitive=DebugCameraPrimitive,exports.DebugInspector=DebugInspector,exports.DebugModelMatrixPrimitive=DebugModelMatrixPrimitive,exports.DefaultProxy=DefaultProxy,exports.DepthFunction=DepthFunction$1,exports.DepthPlane=DepthPlane,exports.DerivedCommand=DerivedCommand,exports.DeveloperError=DeveloperError,exports.DeviceOrientationCameraController=DeviceOrientationCameraController,exports.DirectionalLight=DirectionalLight,exports.DiscardEmptyTileImagePolicy=DiscardEmptyTileImagePolicy,exports.DiscardMissingTileImagePolicy=DiscardMissingTileImagePolicy,exports.DistanceDisplayCondition=DistanceDisplayCondition,exports.DistanceDisplayConditionGeometryInstanceAttribute=DistanceDisplayConditionGeometryInstanceAttribute,exports.DoublyLinkedList=DoublyLinkedList,exports.DracoLoader=DracoLoader,exports.DrawCommand=DrawCommand,exports.DynamicGeometryBatch=DynamicGeometryBatch,exports.DynamicGeometryUpdater=DynamicGeometryUpdater,exports.EarthOrientationParameters=EarthOrientationParameters,exports.EarthOrientationParametersSample=EarthOrientationParametersSample,exports.EasingFunction=EasingFunction$1,exports.EllipseGeometry=EllipseGeometry,exports.EllipseGeometryLibrary=EllipseGeometryLibrary,exports.EllipseGeometryUpdater=EllipseGeometryUpdater,exports.EllipseGraphics=EllipseGraphics,exports.EllipseOutlineGeometry=EllipseOutlineGeometry,exports.Ellipsoid=Ellipsoid,exports.EllipsoidGeodesic=EllipsoidGeodesic,exports.EllipsoidGeometry=EllipsoidGeometry,exports.EllipsoidGeometryUpdater=EllipsoidGeometryUpdater,exports.EllipsoidGraphics=EllipsoidGraphics,exports.EllipsoidOutlineGeometry=EllipsoidOutlineGeometry,exports.EllipsoidPrimitive=EllipsoidPrimitive,exports.EllipsoidRhumbLine=EllipsoidRhumbLine,exports.EllipsoidSurfaceAppearance=EllipsoidSurfaceAppearance,exports.EllipsoidTangentPlane=EllipsoidTangentPlane,exports.EllipsoidTerrainProvider=EllipsoidTerrainProvider,exports.EllipsoidalOccluder=EllipsoidalOccluder,exports.Empty3DTileContent=Empty3DTileContent,exports.EncodedCartesian3=EncodedCartesian3,exports.Entity=Entity,exports.EntityCluster=EntityCluster,exports.EntityCollection=EntityCollection,exports.EntityView=EntityView,exports.Event=Event,exports.EventHelper=EventHelper,exports.Expression=Expression,exports.ExpressionNodeType=ExpressionNodeType$1,exports.ExtrapolationType=ExtrapolationType$1,exports.FXAA3_11=FXAA3_11,exports.FeatureDetection=FeatureDetection,exports.Fog=Fog,exports.ForEach=ForEach,exports.FrameRateMonitor=FrameRateMonitor,exports.FrameState=FrameState,exports.Framebuffer=Framebuffer,exports.FrustumCommands=FrustumCommands,exports.FrustumGeometry=FrustumGeometry,exports.FrustumOutlineGeometry=FrustumOutlineGeometry,exports.Fullscreen=Fullscreen,exports.FullscreenButton=FullscreenButton,exports.FullscreenButtonViewModel=FullscreenButtonViewModel,exports.GeoJsonDataSource=GeoJsonDataSource,exports.GeocodeType=GeocodeType$1,exports.Geocoder=Geocoder,exports.GeocoderService=GeocoderService,exports.GeocoderViewModel=GeocoderViewModel,exports.GeographicProjection=GeographicProjection,exports.GeographicTilingScheme=GeographicTilingScheme,exports.Geometry=Geometry,exports.Geometry3DTileContent=Geometry3DTileContent,exports.GeometryAttribute=GeometryAttribute,exports.GeometryAttributes=GeometryAttributes,exports.GeometryFactory=GeometryFactory,exports.GeometryInstance=GeometryInstance,exports.GeometryInstanceAttribute=GeometryInstanceAttribute,exports.GeometryOffsetAttribute=GeometryOffsetAttribute$1,exports.GeometryPipeline=GeometryPipeline,exports.GeometryType=GeometryType$1,exports.GeometryUpdater=GeometryUpdater,exports.GeometryVisualizer=GeometryVisualizer,exports.GetFeatureInfoFormat=GetFeatureInfoFormat,exports.Globe=Globe,exports.GlobeDepth=GlobeDepth,exports.GlobeSurfaceShaderSet=GlobeSurfaceShaderSet,exports.GlobeSurfaceTile=GlobeSurfaceTile,exports.GlobeSurfaceTileProvider=GlobeSurfaceTileProvider,exports.GlobeTranslucency=GlobeTranslucency,exports.GlobeTranslucencyFramebuffer=GlobeTranslucencyFramebuffer,exports.GlobeTranslucencyState=GlobeTranslucencyState,exports.GoogleEarthEnterpriseImageryProvider=GoogleEarthEnterpriseImageryProvider,exports.GoogleEarthEnterpriseMapsProvider=GoogleEarthEnterpriseMapsProvider,exports.GoogleEarthEnterpriseMetadata=GoogleEarthEnterpriseMetadata,exports.GoogleEarthEnterpriseTerrainData=GoogleEarthEnterpriseTerrainData,exports.GoogleEarthEnterpriseTerrainProvider=GoogleEarthEnterpriseTerrainProvider,exports.GoogleEarthEnterpriseTileInformation=GoogleEarthEnterpriseTileInformation,exports.GregorianDate=GregorianDate,exports.GridImageryProvider=GridImageryProvider,exports.GridMaterialProperty=GridMaterialProperty,exports.GroundGeometryUpdater=GroundGeometryUpdater,exports.GroundPolylineGeometry=GroundPolylineGeometry,exports.GroundPolylinePrimitive=GroundPolylinePrimitive,exports.GroundPrimitive=GroundPrimitive,exports.HeadingPitchRange=HeadingPitchRange,exports.HeadingPitchRoll=HeadingPitchRoll,exports.Heap=Heap,exports.HeightReference=HeightReference$1,exports.HeightmapEncoding=HeightmapEncoding$1,exports.HeightmapTerrainData=HeightmapTerrainData,exports.HeightmapTessellator=HeightmapTessellator,exports.HermitePolynomialApproximation=HermitePolynomialApproximation,exports.HermiteSpline=HermiteSpline,exports.HomeButton=HomeButton,exports.HomeButtonViewModel=HomeButtonViewModel,exports.HorizontalOrigin=HorizontalOrigin$1,exports.Iau2000Orientation=Iau2000Orientation,exports.Iau2006XysData=Iau2006XysData,exports.Iau2006XysSample=Iau2006XysSample,exports.IauOrientationAxes=IauOrientationAxes,exports.IauOrientationParameters=IauOrientationParameters,exports.ImageMaterialProperty=ImageMaterialProperty,exports.Imagery=Imagery,exports.ImageryLayer=ImageryLayer,exports.ImageryLayerCollection=ImageryLayerCollection,exports.ImageryLayerFeatureInfo=ImageryLayerFeatureInfo,exports.ImageryProvider=ImageryProvider,exports.ImagerySplitDirection=ImagerySplitDirection$1,exports.ImageryState=ImageryState$1,exports.IndexDatatype=IndexDatatype$1,exports.InfoBox=InfoBox,exports.InfoBoxViewModel=InfoBoxViewModel,exports.InspectorShared=InspectorShared,exports.Instanced3DModel3DTileContent=Instanced3DModel3DTileContent,exports.InterpolationAlgorithm=InterpolationAlgorithm,exports.Intersect=Intersect$1,exports.IntersectionTests=IntersectionTests,exports.Intersections2D=Intersections2D,exports.Interval=Interval,exports.InvertClassification=InvertClassification,exports.Ion=Ion,exports.IonGeocoderService=IonGeocoderService,exports.IonImageryProvider=IonImageryProvider,exports.IonResource=IonResource,exports.IonWorldImageryStyle=IonWorldImageryStyle$1,exports.Iso8601=Iso8601,exports.JobScheduler=JobScheduler,exports.JobType=JobType$1,exports.JulianDate=JulianDate,exports.KeyboardEventModifier=KeyboardEventModifier$1,exports.KmlCamera=KmlCamera,exports.KmlDataSource=KmlDataSource,exports.KmlLookAt=KmlLookAt,exports.KmlTour=KmlTour,exports.KmlTourFlyTo=KmlTourFlyTo,exports.KmlTourWait=KmlTourWait,exports.Label=Label,exports.LabelCollection=LabelCollection,exports.LabelGraphics=LabelGraphics,exports.LabelStyle=LabelStyle$1,exports.LabelVisualizer=LabelVisualizer,exports.LagrangePolynomialApproximation=LagrangePolynomialApproximation,exports.LeapSecond=LeapSecond,exports.LercDecode=LercDecode,exports.Light=Light,exports.LinearApproximation=LinearApproximation,exports.LinearSpline=LinearSpline,exports.ManagedArray=ManagedArray,exports.MapMode2D=MapMode2D$1,exports.MapProjection=MapProjection,exports.MapboxImageryProvider=MapboxImageryProvider,exports.MapboxStyleImageryProvider=MapboxStyleImageryProvider,exports.Material=Material,exports.MaterialAppearance=MaterialAppearance,exports.MaterialProperty=MaterialProperty,exports.Math=CesiumMath,exports.Matrix2=Matrix2,exports.Matrix3=Matrix3,exports.Matrix4=Matrix4,exports.MipmapHint=MipmapHint$1,exports.Model=Model,exports.ModelAnimation=ModelAnimation,exports.ModelAnimationCache=ModelAnimationCache,exports.ModelAnimationCollection=ModelAnimationCollection,exports.ModelAnimationLoop=ModelAnimationLoop$1,exports.ModelAnimationState=ModelAnimationState,exports.ModelGraphics=ModelGraphics,exports.ModelInstance=ModelInstance,exports.ModelInstanceCollection=ModelInstanceCollection,exports.ModelLoadResources=ModelLoadResources,exports.ModelMaterial=ModelMaterial,exports.ModelMesh=ModelMesh,exports.ModelNode=ModelNode,exports.ModelOutlineLoader=ModelOutlineLoader,exports.ModelUtility=ModelUtility,exports.ModelVisualizer=ModelVisualizer,exports.Moon=Moon,exports.NavigationHelpButton=NavigationHelpButton,exports.NavigationHelpButtonViewModel=NavigationHelpButtonViewModel,exports.NearFarScalar=NearFarScalar,exports.NeverTileDiscardPolicy=NeverTileDiscardPolicy,exports.NoSleep=NoSleep,exports.NodeTransformationProperty=NodeTransformationProperty,exports.OIT=OIT,exports.Occluder=Occluder,exports.OctahedralProjectedCubeMap=OctahedralProjectedCubeMap,exports.OffsetGeometryInstanceAttribute=OffsetGeometryInstanceAttribute,exports.OpenCageGeocoderService=OpenCageGeocoderService,exports.OpenStreetMapImageryProvider=OpenStreetMapImageryProvider,exports.OrderedGroundPrimitiveCollection=OrderedGroundPrimitiveCollection,exports.OrientedBoundingBox=OrientedBoundingBox,exports.OrthographicFrustum=OrthographicFrustum,exports.OrthographicOffCenterFrustum=OrthographicOffCenterFrustum,exports.Packable=Packable,exports.PackableForInterpolation=PackableForInterpolation,exports.Particle=Particle,exports.ParticleBurst=ParticleBurst,exports.ParticleEmitter=ParticleEmitter,exports.ParticleSystem=ParticleSystem,exports.Pass=Pass$1,exports.PassState=PassState,exports.PathGraphics=PathGraphics,exports.PathVisualizer=PathVisualizer,exports.PeliasGeocoderService=PeliasGeocoderService,exports.PerInstanceColorAppearance=PerInstanceColorAppearance,exports.PerformanceDisplay=PerformanceDisplay,exports.PerformanceWatchdog=PerformanceWatchdog,exports.PerformanceWatchdogViewModel=PerformanceWatchdogViewModel,exports.PerspectiveFrustum=PerspectiveFrustum,exports.PerspectiveOffCenterFrustum=PerspectiveOffCenterFrustum,exports.PickDepth=PickDepth,exports.PickDepthFramebuffer=PickDepthFramebuffer,exports.PickFramebuffer=PickFramebuffer,exports.Picking=Picking,exports.PinBuilder=PinBuilder,exports.PixelDatatype=PixelDatatype$1,exports.PixelFormat=PixelFormat$1,exports.Plane=Plane,exports.PlaneGeometry=PlaneGeometry,exports.PlaneGeometryUpdater=PlaneGeometryUpdater,exports.PlaneGraphics=PlaneGraphics,exports.PlaneOutlineGeometry=PlaneOutlineGeometry,exports.PointCloud=PointCloud,exports.PointCloud3DTileContent=PointCloud3DTileContent,exports.PointCloudEyeDomeLighting=PointCloudEyeDomeLighting,exports.PointCloudShading=PointCloudShading,exports.PointGraphics=PointGraphics,exports.PointPrimitive=PointPrimitive,exports.PointPrimitiveCollection=PointPrimitiveCollection,exports.PointVisualizer=PointVisualizer,exports.PolygonGeometry=PolygonGeometry,exports.PolygonGeometryLibrary=PolygonGeometryLibrary,exports.PolygonGeometryUpdater=PolygonGeometryUpdater,exports.PolygonGraphics=PolygonGraphics,exports.PolygonHierarchy=PolygonHierarchy,exports.PolygonOutlineGeometry=PolygonOutlineGeometry,exports.PolygonPipeline=PolygonPipeline,exports.Polyline=Polyline,exports.PolylineArrowMaterialProperty=PolylineArrowMaterialProperty,exports.PolylineCollection=PolylineCollection,exports.PolylineColorAppearance=PolylineColorAppearance,exports.PolylineDashMaterialProperty=PolylineDashMaterialProperty,exports.PolylineGeometry=PolylineGeometry,exports.PolylineGeometryUpdater=PolylineGeometryUpdater,exports.PolylineGlowMaterialProperty=PolylineGlowMaterialProperty,exports.PolylineGraphics=PolylineGraphics,exports.PolylineMaterialAppearance=PolylineMaterialAppearance,exports.PolylineOutlineMaterialProperty=PolylineOutlineMaterialProperty,exports.PolylinePipeline=PolylinePipeline,exports.PolylineVisualizer=PolylineVisualizer,exports.PolylineVolumeGeometry=PolylineVolumeGeometry,exports.PolylineVolumeGeometryLibrary=PolylineVolumeGeometryLibrary,exports.PolylineVolumeGeometryUpdater=PolylineVolumeGeometryUpdater,exports.PolylineVolumeGraphics=PolylineVolumeGraphics,exports.PolylineVolumeOutlineGeometry=PolylineVolumeOutlineGeometry,exports.PositionProperty=PositionProperty,exports.PositionPropertyArray=PositionPropertyArray,exports.PostProcessStage=PostProcessStage,exports.PostProcessStageCollection=PostProcessStageCollection,exports.PostProcessStageComposite=PostProcessStageComposite,exports.PostProcessStageLibrary=PostProcessStageLibrary,exports.PostProcessStageSampleMode=PostProcessStageSampleMode,exports.PostProcessStageTextureCache=PostProcessStageTextureCache,exports.Primitive=Primitive,exports.PrimitiveCollection=PrimitiveCollection,exports.PrimitivePipeline=PrimitivePipeline,exports.PrimitiveState=PrimitiveState$1,exports.PrimitiveType=PrimitiveType$1,exports.ProjectionPicker=ProjectionPicker,exports.ProjectionPickerViewModel=ProjectionPickerViewModel,exports.Property=Property,exports.PropertyArray=PropertyArray,exports.PropertyBag=PropertyBag,exports.ProviderViewModel=ProviderViewModel,exports.Proxy=Proxy,exports.QuadraticRealPolynomial=QuadraticRealPolynomial,exports.QuadtreeOccluders=QuadtreeOccluders,exports.QuadtreePrimitive=QuadtreePrimitive,exports.QuadtreeTile=QuadtreeTile,exports.QuadtreeTileLoadState=QuadtreeTileLoadState$1,exports.QuadtreeTileProvider=QuadtreeTileProvider,exports.QuantizedMeshTerrainData=QuantizedMeshTerrainData,exports.QuarticRealPolynomial=QuarticRealPolynomial,exports.Quaternion=Quaternion,exports.QuaternionSpline=QuaternionSpline,exports.Queue=Queue,exports.Ray=Ray,exports.Rectangle=Rectangle,exports.RectangleCollisionChecker=RectangleCollisionChecker,exports.RectangleGeometry=RectangleGeometry,exports.RectangleGeometryLibrary=RectangleGeometryLibrary,exports.RectangleGeometryUpdater=RectangleGeometryUpdater,exports.RectangleGraphics=RectangleGraphics,exports.RectangleOutlineGeometry=RectangleOutlineGeometry,exports.ReferenceFrame=ReferenceFrame$1,exports.ReferenceProperty=ReferenceProperty,exports.RenderState=RenderState,exports.Renderbuffer=Renderbuffer,exports.RenderbufferFormat=RenderbufferFormat$1,exports.Request=Request,exports.RequestErrorEvent=RequestErrorEvent,exports.RequestScheduler=RequestScheduler,exports.RequestState=RequestState$1,exports.RequestType=RequestType$1,exports.Resource=Resource,exports.Rotation=Rotation,exports.RuntimeError=RuntimeError,exports.SDFSettings=SDFSettings$1,exports.SampledPositionProperty=SampledPositionProperty,exports.SampledProperty=SampledProperty,exports.Sampler=Sampler,exports.ScaledPositionProperty=ScaledPositionProperty,exports.Scene=Scene,exports.SceneFramebuffer=SceneFramebuffer,exports.SceneMode=SceneMode$1,exports.SceneModePicker=SceneModePicker,exports.SceneModePickerViewModel=SceneModePickerViewModel,exports.SceneTransforms=SceneTransforms,exports.SceneTransitioner=SceneTransitioner,exports.ScreenSpaceCameraController=ScreenSpaceCameraController,exports.ScreenSpaceEventHandler=ScreenSpaceEventHandler,exports.ScreenSpaceEventType=ScreenSpaceEventType$1,exports.SelectionIndicator=SelectionIndicator,exports.SelectionIndicatorViewModel=SelectionIndicatorViewModel,exports.ShaderCache=ShaderCache,exports.ShaderProgram=ShaderProgram,exports.ShaderSource=ShaderSource,exports.ShadowMap=ShadowMap,exports.ShadowMapShader=ShadowMapShader,exports.ShadowMode=ShadowMode$1,exports.ShadowVolumeAppearance=ShadowVolumeAppearance,exports.ShowGeometryInstanceAttribute=ShowGeometryInstanceAttribute,exports.Simon1994PlanetaryPositions=Simon1994PlanetaryPositions,exports.SimplePolylineGeometry=SimplePolylineGeometry,exports.SingleTileImageryProvider=SingleTileImageryProvider,exports.SkyAtmosphere=SkyAtmosphere,exports.SkyBox=SkyBox,exports.SphereEmitter=SphereEmitter,exports.SphereGeometry=SphereGeometry,exports.SphereOutlineGeometry=SphereOutlineGeometry,exports.Spherical=Spherical,exports.Spline=Spline,exports.StaticGeometryColorBatch=StaticGeometryColorBatch,exports.StaticGeometryPerMaterialBatch=StaticGeometryPerMaterialBatch,exports.StaticGroundGeometryColorBatch=StaticGroundGeometryColorBatch,exports.StaticGroundGeometryPerMaterialBatch=StaticGroundGeometryPerMaterialBatch,exports.StaticGroundPolylinePerMaterialBatch=StaticGroundPolylinePerMaterialBatch,exports.StaticOutlineGeometryBatch=StaticOutlineGeometryBatch,exports.StencilConstants=StencilConstants$1,exports.StencilFunction=StencilFunction$1,exports.StencilOperation=StencilOperation$1,exports.StripeMaterialProperty=StripeMaterialProperty,exports.StripeOrientation=StripeOrientation$1,exports.StyleExpression=StyleExpression,exports.Sun=Sun,exports.SunLight=SunLight,exports.SunPostProcess=SunPostProcess,exports.SvgPathBindingHandler=SvgPathBindingHandler,exports.TaskProcessor=TaskProcessor,exports.TerrainData=TerrainData,exports.TerrainEncoding=TerrainEncoding,exports.TerrainFillMesh=TerrainFillMesh,exports.TerrainMesh=TerrainMesh,exports.TerrainOffsetProperty=TerrainOffsetProperty,exports.TerrainProvider=TerrainProvider,exports.TerrainQuantization=TerrainQuantization$1,exports.TerrainState=TerrainState$2,exports.Texture=Texture,exports.TextureAtlas=TextureAtlas,exports.TextureCache=TextureCache,exports.TextureMagnificationFilter=TextureMagnificationFilter$1,exports.TextureMinificationFilter=TextureMinificationFilter$1,exports.TextureWrap=TextureWrap$1,exports.TileAvailability=TileAvailability,exports.TileBoundingRegion=TileBoundingRegion,exports.TileBoundingSphere=TileBoundingSphere,exports.TileBoundingVolume=TileBoundingVolume,exports.TileCoordinatesImageryProvider=TileCoordinatesImageryProvider,exports.TileDiscardPolicy=TileDiscardPolicy,exports.TileEdge=TileEdge,exports.TileImagery=TileImagery,exports.TileMapServiceImageryProvider=TileMapServiceImageryProvider,exports.TileOrientedBoundingBox=TileOrientedBoundingBox,exports.TileProviderError=TileProviderError,exports.TileReplacementQueue=TileReplacementQueue,exports.TileSelectionResult=TileSelectionResult,exports.TileState=TileState$1,exports.Tileset3DTileContent=Tileset3DTileContent,exports.TilingScheme=TilingScheme,exports.TimeConstants=TimeConstants$1,exports.TimeDynamicImagery=TimeDynamicImagery,exports.TimeDynamicPointCloud=TimeDynamicPointCloud,exports.TimeInterval=TimeInterval,exports.TimeIntervalCollection=TimeIntervalCollection,exports.TimeIntervalCollectionPositionProperty=TimeIntervalCollectionPositionProperty,exports.TimeIntervalCollectionProperty=TimeIntervalCollectionProperty,exports.TimeStandard=TimeStandard$1,exports.Timeline=Timeline,exports.TimelineHighlightRange=TimelineHighlightRange,exports.TimelineTrack=TimelineTrack,exports.Tipsify=Tipsify,exports.ToggleButtonViewModel=ToggleButtonViewModel,exports.Tonemapper=Tonemapper$1,exports.Transforms=Transforms,exports.TranslationRotationScale=TranslationRotationScale,exports.TridiagonalSystemSolver=TridiagonalSystemSolver,exports.TrustedServers=TrustedServers,exports.Tween=TWEEN,exports.TweenCollection=TweenCollection,exports.UniformState=UniformState,exports.Uri=URI,exports.UrlTemplateImageryProvider=UrlTemplateImageryProvider,exports.VERSION=VERSION,exports.VRButton=VRButton,exports.VRButtonViewModel=VRButtonViewModel,exports.VRTheWorldTerrainProvider=VRTheWorldTerrainProvider,exports.Vector3DTileBatch=Vector3DTileBatch,exports.Vector3DTileContent=Vector3DTileContent,exports.Vector3DTileGeometry=Vector3DTileGeometry,exports.Vector3DTilePoints=Vector3DTilePoints,exports.Vector3DTilePolygons=Vector3DTilePolygons,exports.Vector3DTilePolylines=Vector3DTilePolylines,exports.Vector3DTilePrimitive=Vector3DTilePrimitive,exports.VelocityOrientationProperty=VelocityOrientationProperty,exports.VelocityVectorProperty=VelocityVectorProperty,exports.VertexArray=VertexArray,exports.VertexArrayFacade=VertexArrayFacade,exports.VertexFormat=VertexFormat,exports.VerticalOrigin=VerticalOrigin$1,exports.VideoSynchronizer=VideoSynchronizer,exports.View=View,exports.Viewer=Viewer,exports.ViewportQuad=ViewportQuad,exports.Visibility=Visibility$1,exports.Visualizer=Visualizer,exports.WallGeometry=WallGeometry,exports.WallGeometryLibrary=WallGeometryLibrary,exports.WallGeometryUpdater=WallGeometryUpdater,exports.WallGraphics=WallGraphics,exports.WallOutlineGeometry=WallOutlineGeometry,exports.WebGLConstants=WebGLConstants$1,exports.WebMapServiceImageryProvider=WebMapServiceImageryProvider,exports.WebMapTileServiceImageryProvider=WebMapTileServiceImageryProvider,exports.WebMercatorProjection=WebMercatorProjection,exports.WebMercatorTilingScheme=WebMercatorTilingScheme,exports.WeightSpline=WeightSpline,exports.WindingOrder=WindingOrder$1,exports._shadersAcesTonemappingStage=AcesTonemapping,exports._shadersAdditiveBlend=AdditiveBlend,exports._shadersAdjustTranslucentFS=AdjustTranslucentFS,exports._shadersAllMaterialAppearanceFS=AllMaterialAppearanceFS,exports._shadersAllMaterialAppearanceVS=AllMaterialAppearanceVS,exports._shadersAmbientOcclusionGenerate=AmbientOcclusionGenerate,exports._shadersAmbientOcclusionModulate=AmbientOcclusionModulate,exports._shadersAspectRampMaterial=AspectRampMaterial,exports._shadersBasicMaterialAppearanceFS=BasicMaterialAppearanceFS,exports._shadersBasicMaterialAppearanceVS=BasicMaterialAppearanceVS,exports._shadersBillboardCollectionFS=BillboardCollectionFS,exports._shadersBillboardCollectionVS=BillboardCollectionVS,exports._shadersBlackAndWhite=BlackAndWhite,exports._shadersBloomComposite=BloomComposite,exports._shadersBrdfLutGeneratorFS=BrdfLutGeneratorFS,exports._shadersBrightPass=BrightPass,exports._shadersBrightness=Brightness,exports._shadersBumpMapMaterial=BumpMapMaterial,exports._shadersCheckerboardMaterial=CheckerboardMaterial,exports._shadersCompositeOITFS=CompositeOITFS,exports._shadersContrastBias=ContrastBias,exports._shadersCzmBuiltins=CzmBuiltins,exports._shadersDepthOfField=DepthOfField,exports._shadersDepthPlaneFS=DepthPlaneFS,exports._shadersDepthPlaneVS=DepthPlaneVS,exports._shadersDepthView=DepthView,exports._shadersDepthViewPacked=DepthViewPacked,exports._shadersDotMaterial=DotMaterial,exports._shadersEdgeDetection=EdgeDetection,exports._shadersElevationContourMaterial=ElevationContourMaterial,exports._shadersElevationRampMaterial=ElevationRampMaterial,exports._shadersEllipsoidFS=EllipsoidFS,exports._shadersEllipsoidSurfaceAppearanceFS=EllipsoidSurfaceAppearanceFS,exports._shadersEllipsoidSurfaceAppearanceVS=EllipsoidSurfaceAppearanceVS,exports._shadersEllipsoidVS=EllipsoidVS,exports._shadersFXAA=FXAA,exports._shadersFadeMaterial=FadeMaterial,exports._shadersFilmicTonemapping=FilmicTonemapping,exports._shadersGaussianBlur1D=GaussianBlur1D,exports._shadersGlobeFS=GlobeFS,exports._shadersGlobeVS=GlobeVS,exports._shadersGridMaterial=GridMaterial,exports._shadersGroundAtmosphere=GroundAtmosphere,exports._shadersHSBToRGB=czm_HSBToRGB,exports._shadersHSLToRGB=czm_HSLToRGB,exports._shadersLensFlare=LensFlare,exports._shadersModifiedReinhardTonemapping=ModifiedReinhardTonemapping,exports._shadersNightVision=NightVision,exports._shadersNormalMapMaterial=NormalMapMaterial,exports._shadersOctahedralProjectionAtlasFS=OctahedralProjectionAtlasFS,exports._shadersOctahedralProjectionFS=OctahedralProjectionFS,exports._shadersOctahedralProjectionVS=OctahedralProjectionVS,exports._shadersPassThrough=PassThrough,exports._shadersPassThroughDepth=PassThroughDepth,exports._shadersPerInstanceColorAppearanceFS=PerInstanceColorAppearanceFS,exports._shadersPerInstanceColorAppearanceVS=PerInstanceColorAppearanceVS,exports._shadersPerInstanceFlatColorAppearanceFS=PerInstanceFlatColorAppearanceFS,exports._shadersPerInstanceFlatColorAppearanceVS=PerInstanceFlatColorAppearanceVS,exports._shadersPointCloudEyeDomeLighting=PointCloudEyeDomeLightingShader,exports._shadersPointPrimitiveCollectionFS=PointPrimitiveCollectionFS,exports._shadersPointPrimitiveCollectionVS=PointPrimitiveCollectionVS,exports._shadersPolylineArrowMaterial=PolylineArrowMaterial,exports._shadersPolylineColorAppearanceVS=PolylineColorAppearanceVS,exports._shadersPolylineCommon=PolylineCommon,exports._shadersPolylineDashMaterial=PolylineDashMaterial,exports._shadersPolylineFS=PolylineFS,exports._shadersPolylineGlowMaterial=PolylineGlowMaterial,exports._shadersPolylineMaterialAppearanceVS=PolylineMaterialAppearanceVS,exports._shadersPolylineOutlineMaterial=PolylineOutlineMaterial,exports._shadersPolylineShadowVolumeFS=PolylineShadowVolumeFS,exports._shadersPolylineShadowVolumeMorphFS=PolylineShadowVolumeMorphFS,exports._shadersPolylineShadowVolumeMorphVS=PolylineShadowVolumeMorphVS,exports._shadersPolylineShadowVolumeVS=PolylineShadowVolumeVS,exports._shadersPolylineVS=PolylineVS,exports._shadersRGBToHSB=czm_RGBToHSB,exports._shadersRGBToHSL=czm_RGBToHSL,exports._shadersRGBToXYZ=czm_RGBToXYZ,exports._shadersReinhardTonemapping=ReinhardTonemapping,exports._shadersReprojectWebMercatorFS=ReprojectWebMercatorFS,exports._shadersReprojectWebMercatorVS=ReprojectWebMercatorVS,exports._shadersRimLightingMaterial=RimLightingMaterial,exports._shadersShadowVolumeAppearanceFS=ShadowVolumeAppearanceFS,exports._shadersShadowVolumeAppearanceVS=ShadowVolumeAppearanceVS,exports._shadersShadowVolumeFS=ShadowVolumeFS,exports._shadersSilhouette=Silhouette,exports._shadersSkyAtmosphereCommon=SkyAtmosphereCommon,exports._shadersSkyAtmosphereFS=SkyAtmosphereFS,exports._shadersSkyAtmosphereVS=SkyAtmosphereVS,exports._shadersSkyBoxFS=SkyBoxFS,exports._shadersSkyBoxVS=SkyBoxVS,exports._shadersSlopeRampMaterial=SlopeRampMaterial,exports._shadersStripeMaterial=StripeMaterial,exports._shadersSunFS=SunFS,exports._shadersSunTextureFS=SunTextureFS,exports._shadersSunVS=SunVS,exports._shadersTexturedMaterialAppearanceFS=TexturedMaterialAppearanceFS,exports._shadersTexturedMaterialAppearanceVS=TexturedMaterialAppearanceVS,exports._shadersVector3DTilePolylinesVS=Vector3DTilePolylinesVS,exports._shadersVectorTileVS=VectorTileVS,exports._shadersViewportQuadFS=ViewportQuadFS,exports._shadersViewportQuadVS=ViewportQuadVS,exports._shadersWater=WaterMaterial,exports._shadersXYZToRGB=czm_XYZToRGB,exports._shadersacesTonemapping=czm_acesTonemapping,exports._shadersalphaWeight=czm_alphaWeight,exports._shadersantialias=czm_antialias,exports._shadersapproximateSphericalCoordinates=czm_approximateSphericalCoordinates,exports._shadersbackFacing=czm_backFacing,exports._shadersbranchFreeTernary=czm_branchFreeTernary,exports._shaderscascadeColor=czm_cascadeColor,exports._shaderscascadeDistance=czm_cascadeDistance,exports._shaderscascadeMatrix=czm_cascadeMatrix,exports._shaderscascadeWeights=czm_cascadeWeights,exports._shaderscolumbusViewMorph=czm_columbusViewMorph,exports._shaderscomputePosition=czm_computePosition,exports._shaderscosineAndSine=czm_cosineAndSine,exports._shadersdecompressTextureCoordinates=czm_decompressTextureCoordinates,exports._shadersdegreesPerRadian=czm_degreesPerRadian,exports._shadersdepthClamp=czm_depthClamp,exports._shadersdepthRange=czm_depthRange,exports._shadersdepthRangeStruct=czm_depthRangeStruct,exports._shaderseastNorthUpToEyeCoordinates=czm_eastNorthUpToEyeCoordinates,exports._shadersellipsoidContainsPoint=czm_ellipsoidContainsPoint,exports._shadersellipsoidWgs84TextureCoordinates=czm_ellipsoidWgs84TextureCoordinates,exports._shadersepsilon1=czm_epsilon1,exports._shadersepsilon2=czm_epsilon2,exports._shadersepsilon3=czm_epsilon3,exports._shadersepsilon4=czm_epsilon4,exports._shadersepsilon5=czm_epsilon5,exports._shadersepsilon6=czm_epsilon6,exports._shadersepsilon7=czm_epsilon7,exports._shadersequalsEpsilon=czm_equalsEpsilon,exports._shaderseyeOffset=czm_eyeOffset,exports._shaderseyeToWindowCoordinates=czm_eyeToWindowCoordinates,exports._shadersfastApproximateAtan=czm_fastApproximateAtan,exports._shadersfog=czm_fog,exports._shadersgammaCorrect=czm_gammaCorrect,exports._shadersgeodeticSurfaceNormal=czm_geodeticSurfaceNormal,exports._shadersgetDefaultMaterial=czm_getDefaultMaterial,exports._shadersgetLambertDiffuse=czm_getLambertDiffuse,exports._shadersgetSpecular=czm_getSpecular,exports._shadersgetWaterNoise=czm_getWaterNoise,exports._shadershue=czm_hue,exports._shadersinfinity=czm_infinity,exports._shadersinverseGamma=czm_inverseGamma,exports._shadersisEmpty=czm_isEmpty,exports._shadersisFull=czm_isFull,exports._shaderslatitudeToWebMercatorFraction=czm_latitudeToWebMercatorFraction,exports._shaderslineDistance=czm_lineDistance,exports._shadersluminance=czm_luminance,exports._shadersmaterial=czm_material,exports._shadersmaterialInput=czm_materialInput,exports._shadersmetersPerPixel=czm_metersPerPixel,exports._shadersmodelToWindowCoordinates=czm_modelToWindowCoordinates,exports._shadersmultiplyWithColorBalance=czm_multiplyWithColorBalance,exports._shadersnearFarScalar=czm_nearFarScalar,exports._shadersoctDecode=czm_octDecode,exports._shadersoneOverPi=czm_oneOverPi,exports._shadersoneOverTwoPi=czm_oneOverTwoPi,exports._shaderspackDepth=czm_packDepth,exports._shaderspassCesium3DTile=czm_passCesium3DTile,exports._shaderspassCesium3DTileClassification=czm_passCesium3DTileClassification,exports._shaderspassCesium3DTileClassificationIgnoreShow=czm_passCesium3DTileClassificationIgnoreShow,exports._shaderspassClassification=czm_passClassification,exports._shaderspassCompute=czm_passCompute,exports._shaderspassEnvironment=czm_passEnvironment,exports._shaderspassGlobe=czm_passGlobe,exports._shaderspassOpaque=czm_passOpaque,exports._shaderspassOverlay=czm_passOverlay,exports._shaderspassTerrainClassification=czm_passTerrainClassification,exports._shaderspassTranslucent=czm_passTranslucent,exports._shadersphong=czm_phong,exports._shaderspi=czm_pi,exports._shaderspiOverFour=czm_piOverFour,exports._shaderspiOverSix=czm_piOverSix,exports._shaderspiOverThree=czm_piOverThree,exports._shaderspiOverTwo=czm_piOverTwo,exports._shadersplaneDistance=czm_planeDistance,exports._shaderspointAlongRay=czm_pointAlongRay,exports._shadersradiansPerDegree=czm_radiansPerDegree,exports._shadersray=czm_ray,exports._shadersrayEllipsoidIntersectionInterval=czm_rayEllipsoidIntersectionInterval,exports._shadersraySegment=czm_raySegment,exports._shadersreadDepth=czm_readDepth,exports._shadersreadNonPerspective=czm_readNonPerspective,exports._shadersreverseLogDepth=czm_reverseLogDepth,exports._shaderssampleOctahedralProjection=czm_sampleOctahedralProjection,exports._shaderssaturation=czm_saturation;exports._shaderssceneMode2D=czm_sceneMode2D,exports._shaderssceneMode3D=czm_sceneMode3D,exports._shaderssceneModeColumbusView=czm_sceneModeColumbusView,exports._shaderssceneModeMorphing=czm_sceneModeMorphing,exports._shadersshadowDepthCompare=czm_shadowDepthCompare,exports._shadersshadowParameters=czm_shadowParameters,exports._shadersshadowVisibility=czm_shadowVisibility,exports._shaderssignNotZero=czm_signNotZero,exports._shaderssolarRadius=czm_solarRadius,exports._shaderssphericalHarmonics=czm_sphericalHarmonics,exports._shaderstangentToEyeSpaceMatrix=czm_tangentToEyeSpaceMatrix,exports._shadersthreePiOver2=czm_threePiOver2,exports._shaderstransformPlane=czm_transformPlane,exports._shaderstranslateRelativeToEye=czm_translateRelativeToEye,exports._shaderstranslucentPhong=czm_translucentPhong,exports._shaderstranspose=czm_transpose,exports._shaderstwoPi=czm_twoPi,exports._shadersunpackDepth=czm_unpackDepth,exports._shadersunpackFloat=czm_unpackFloat,exports._shadersvertexLogDepth=czm_vertexLogDepth,exports._shaderswebMercatorMaxLatitude=czm_webMercatorMaxLatitude,exports._shaderswindowToEyeCoordinates=czm_windowToEyeCoordinates,exports._shaderswriteDepthClamp=czm_writeDepthClamp,exports._shaderswriteLogDepth=czm_writeLogDepth,exports._shaderswriteNonPerspective=czm_writeNonPerspective,exports.addBuffer=addBuffer,exports.addDefaults=addDefaults,exports.addExtensionsRequired=addExtensionsRequired,exports.addExtensionsUsed=addExtensionsUsed,exports.addPipelineExtras=addPipelineExtras,exports.addToArray=addToArray,exports.appendForwardSlash=appendForwardSlash,exports.arrayFill=arrayFill,exports.arrayRemoveDuplicates=arrayRemoveDuplicates,exports.arraySlice=arraySlice,exports.barycentricCoordinates=barycentricCoordinates,exports.binarySearch=binarySearch,exports.bitmap_sdf=calcSDF,exports.buildModuleUrl=buildModuleUrl,exports.cancelAnimationFrame=cancelAnimationFramePolyfill,exports.clone=clone,exports.combine=combine,exports.computeFlyToLocationForRectangle=computeFlyToLocationForRectangle,exports.createBillboardPointCallback=createBillboardPointCallback,exports.createCommand=createCommand$2,exports.createDefaultImageryProviderViewModels=createDefaultImageryProviderViewModels,exports.createDefaultTerrainProviderViewModels=createDefaultTerrainProviderViewModels,exports.createGuid=createGuid,exports.createMaterialPropertyDescriptor=createMaterialPropertyDescriptor,exports.createOsmBuildings=createOsmBuildings,exports.createPropertyDescriptor=createPropertyDescriptor,exports.createRawPropertyDescriptor=createRawPropertyDescriptor,exports.createTangentSpaceDebugPrimitive=createTangentSpaceDebugPrimitive,exports.createTaskProcessorWorker=createTaskProcessorWorker,exports.createUniform=createUniform$1,exports.createUniformArray=createUniformArray,exports.createWorldImagery=createWorldImagery,exports.createWorldTerrain=createWorldTerrain,exports.decodeGoogleEarthEnterpriseData=decodeGoogleEarthEnterpriseData,exports.defaultValue=defaultValue,exports.defined=defined,exports.deprecationWarning=deprecationWarning,exports.destroyObject=destroyObject,exports.earcut_2_2_1=earcut,exports.exportKml=exportKml,exports.findAccessorMinMax=findAccessorMinMax,exports.formatError=formatError,exports.freezeRenderState=freezeRenderState,exports.getAbsoluteUri=getAbsoluteUri,exports.getAccessorByteStride=getAccessorByteStride,exports.getBaseUri=getBaseUri,exports.getBinaryAccessor=getBinaryAccessor,exports.getClipAndStyleCode=getClipAndStyleCode,exports.getClippingFunction=getClippingFunction,exports.getComponentReader=getComponentReader,exports.getElement=getElement,exports.getExtensionFromUri=getExtensionFromUri,exports.getFilenameFromUri=getFilenameFromUri,exports.getImagePixels=getImagePixels,exports.getMagic=getMagic,exports.getStringFromTypedArray=getStringFromTypedArray,exports.getTimestamp=getTimestamp$1,exports.graphemesplitter=GraphemeSplitter,exports.hasExtension=hasExtension,exports.heightReferenceOnEntityPropertyChanged=heightReferenceOnEntityPropertyChanged,exports.isBitSet=isBitSet,exports.isBlobUri=isBlobUri,exports.isCrossOriginUrl=isCrossOriginUrl,exports.isDataUri=isDataUri,exports.isLeapYear=isLeapYear,exports.jsep=jsep,exports.kdbush=kdbush,exports.knockout=knockout,exports.knockout_3_5_1=knockout,exports.knockout_es5=knockout_es5,exports.loadAndExecuteScript=loadAndExecuteScript,exports.loadCRN=loadCRN,exports.loadCubeMap=loadCubeMap,exports.loadImageFromTypedArray=loadImageFromTypedArray,exports.loadKTX=loadKTX,exports.measureText=measureText,exports.mergeSort=mergeSort,exports.mersenne_twister=MersenneTwister,exports.modernizeShader=modernizeShader,exports.moveTechniqueRenderStates=moveTechniqueRenderStates,exports.moveTechniquesToExtension=moveTechniquesToExtension,exports.numberOfComponentsForType=numberOfComponentsForType,exports.objectToQuery=objectToQuery,exports.oneTimeWarning=oneTimeWarning,exports.parseGlb=parseGlb,exports.parseResponseHeaders=parseResponseHeaders,exports.pointInsideTriangle=pointInsideTriangle,exports.processModelMaterialsCommon=processModelMaterialsCommon,exports.processPbrMaterials=processPbrMaterials,exports.protobuf_minimal=protobuf,exports.purify=purify,exports.queryToObject=queryToObject,exports.quickselect=quickselect$1,exports.rbush=RBush,exports.readAccessorPacked=readAccessorPacked,exports.removeExtensionsRequired=removeExtensionsRequired,exports.removeExtensionsUsed=removeExtensionsUsed,exports.removePipelineExtras=removePipelineExtras,exports.removeUnusedElements=removeUnusedElements,exports.requestAnimationFrame=requestAnimationFramePolyFill,exports.sampleTerrain=sampleTerrain,exports.sampleTerrainMostDetailed=sampleTerrainMostDetailed,exports.scaleToGeodeticSurface=scaleToGeodeticSurface,exports.sprintf=sprintf,exports.subdivideArray=subdivideArray,exports.subscribeAndEvaluate=subscribeAndEvaluate,exports.topojson=topojson,exports.updateAccessorComponentTypes=updateAccessorComponentTypes,exports.updateVersion=updateVersion,exports.viewerCesium3DTilesInspectorMixin=viewerCesium3DTilesInspectorMixin,exports.viewerCesiumInspectorMixin=viewerCesiumInspectorMixin,exports.viewerDragDropMixin=viewerDragDropMixin,exports.viewerPerformanceWatchdogMixin=viewerPerformanceWatchdogMixin,exports.webGLConstantToGlslType=webGLConstantToGlslType,exports.when=when,exports.wrapFunction=wrapFunction,exports.writeTextToCanvas=writeTextToCanvas,exports.zip=zip,Object.defineProperty(exports,"__esModule",{value:!0})}))}).call(this,__webpack_require__(26).Buffer,__webpack_require__(16))},function(e,t,i){"use strict";t.byteLength=function(e){var t=c(e),i=t[0],r=t[1];return 3*(i+r)/4-r},t.toByteArray=function(e){var t,i,r=c(e),o=r[0],s=r[1],l=new a(function(e,t,i){return 3*(t+i)/4-i}(0,o,s)),u=0,d=s>0?o-4:o;for(i=0;i<d;i+=4)t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,l[u++]=255&t);1===s&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],o=0,s=i-n;o<s;o+=16383)a.push(u(e,o,o+16383>s?s:o+16383));1===n?(t=e[i-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s<l;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function u(e,t,i){for(var n,a,o=[],s=t;s<i;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=n)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,i,r,n){var a,o,s=8*n-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=i?n-1:0,h=i?-1:1,p=e[t+d];for(d+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=c}return(p?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,i,r,n,a){var o,s,l,c=8*a-n-1,u=(1<<c)-1,d=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,n),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;e[i+p]=255&s,p+=f,s/=256,n-=8);for(o=o<<n|s,c+=n;c>0;e[i+p]=255&o,p+=f,o/=256,c-=8);e[i+p-f]|=128*m}},function(e,t,i){(function(e,r){var n;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r&&r;o.global!==o&&o.window!==o&&o.self;var s,l=2147483647,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(e){throw new RangeError(h[e])}function g(e,t){for(var i=e.length,r=[];i--;)r[i]=t(e[i]);return r}function y(e,t){var i=e.split("@"),r="";return i.length>1&&(r=i[0]+"@",e=i[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function _(e){for(var t,i,r=[],n=0,a=e.length;n<a;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<a?56320==(64512&(i=e.charCodeAt(n++)))?r.push(((1023&t)<<10)+(1023&i)+65536):(r.push(t),n--):r.push(t);return r}function v(e){return g(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=f(e)})).join("")}function C(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,i){var r=0;for(e=i?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function b(e){var t,i,r,n,a,o,s,c,u,d,h,f=[],g=e.length,y=0,_=128,C=72;for((i=e.lastIndexOf("-"))<0&&(i=0),r=0;r<i;++r)e.charCodeAt(r)>=128&&m("not-basic"),f.push(e.charCodeAt(r));for(n=i>0?i+1:0;n<g;){for(a=y,o=1,s=36;n>=g&&m("invalid-input"),((c=(h=e.charCodeAt(n++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>p((l-y)/o))&&m("overflow"),y+=c*o,!(c<(u=s<=C?1:s>=C+26?26:s-C));s+=36)o>p(l/(d=36-u))&&m("overflow"),o*=d;C=x(y-a,t=f.length+1,0==a),p(y/t)>l-_&&m("overflow"),_+=p(y/t),y%=t,f.splice(y++,0,_)}return v(f)}function S(e){var t,i,r,n,a,o,s,c,u,d,h,g,y,v,b,S=[];for(g=(e=_(e)).length,t=128,i=0,a=72,o=0;o<g;++o)(h=e[o])<128&&S.push(f(h));for(r=n=S.length,n&&S.push("-");r<g;){for(s=l,o=0;o<g;++o)(h=e[o])>=t&&h<s&&(s=h);for(s-t>p((l-i)/(y=r+1))&&m("overflow"),i+=(s-t)*y,t=s,o=0;o<g;++o)if((h=e[o])<t&&++i>l&&m("overflow"),h==t){for(c=i,u=36;!(c<(d=u<=a?1:u>=a+26?26:u-a));u+=36)b=c-d,v=36-d,S.push(f(C(d+b%v,0))),c=p(b/v);S.push(f(C(c,0))),a=x(i,y,r==n),i=0,++r}++i,++t}return S.join("")}s={version:"1.4.1",ucs2:{decode:_,encode:v},decode:b,encode:S,toASCII:function(e){return y(e,(function(e){return u.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?b(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,i,t,e))||(e.exports=n)}()}).call(this,i(238)(e),i(16))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,i){"use strict";t.decode=t.parse=i(241),t.encode=t.stringify=i(242)},function(e,t,i){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,i,a){t=t||"&",i=i||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var l=1e3;a&&"number"==typeof a.maxKeys&&(l=a.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,h,p,f,m=e[u].replace(s,"%20"),g=m.indexOf(i);g>=0?(d=m.substr(0,g),h=m.substr(g+1)):(d=m,h=""),p=decodeURIComponent(d),f=decodeURIComponent(h),r(o,p)?n(o[p])?o[p].push(f):o[p]=[o[p],f]:o[p]=f}return o};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,i){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,i,s){return t=t||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?a(o(e),(function(o){var s=encodeURIComponent(r(o))+i;return n(e[o])?a(e[o],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[o]))})).join(t):s?encodeURIComponent(r(s))+i+encodeURIComponent(r(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var i=[],r=0;r<e.length;r++)i.push(t(e[r],r));return i}var o=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t}},function(e,t,i){var r=i(135),n=i(97),a=e.exports;for(var o in r)r.hasOwnProperty(o)&&(a[o]=r[o]);function s(e){if("string"==typeof e&&(e=n.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}a.request=function(e,t){return e=s(e),r.request.call(this,e,t)},a.get=function(e,t){return e=s(e),r.get.call(this,e,t)}},function(e,t,i){(function(t,r,n){var a=i(136),o=i(31),s=i(137),l=i(58),c=i(252),u=s.IncomingMessage,d=s.readyStates;var h=e.exports=function(e){var i,r=this;l.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new t(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!a.abortController)n=!1,i=!0;else if("prefer-streaming"===e.mode)i=!1;else if("allow-wrong-content-type"===e.mode)i=!a.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");i=!0}r._mode=function(e,t){return a.fetch&&t?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":a.vbArray&&e?"text:vbarray":"text"}(i,n),r._fetchTimer=null,r.on("finish",(function(){r._onFinish()}))};o(h,l.Writable),h.prototype.setHeader=function(e,t){var i=e.toLowerCase();-1===p.indexOf(i)&&(this._headers[i]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var i=e._opts,o=e._headers,s=null;"GET"!==i.method&&"HEAD"!==i.method&&(s=a.arraybuffer?c(t.concat(e._body)):a.blobConstructor?new r.Blob(e._body.map((function(e){return c(e)})),{type:(o["content-type"]||{}).value||""}):t.concat(e._body).toString());var l=[];if(Object.keys(o).forEach((function(e){var t=o[e].name,i=o[e].value;Array.isArray(i)?i.forEach((function(e){l.push([t,e])})):l.push([t,i])})),"fetch"===e._mode){var u=null;if(a.abortController){var h=new AbortController;u=h.signal,e._fetchAbortController=h,"requestTimeout"in i&&0!==i.requestTimeout&&(e._fetchTimer=r.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),i.requestTimeout))}r.fetch(e._opts.url,{method:e._opts.method,headers:l,body:s||void 0,mode:"cors",credentials:i.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){r.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var p=e._xhr=new r.XMLHttpRequest;try{p.open(e._opts.method,e._opts.url,!0)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}"responseType"in p&&(p.responseType=e._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!i.withCredentials),"text"===e._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in i&&(p.timeout=i.requestTimeout,p.ontimeout=function(){e.emit("requestTimeout")}),l.forEach((function(e){p.setRequestHeader(e[0],e[1])})),e._response=null,p.onreadystatechange=function(){switch(p.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(p.onprogress=function(){e._onXHRProgress()}),p.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{p.send(s)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}}}},h.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,i){this._body.push(e),i()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,r.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,i){"function"==typeof e&&(i=e,e=void 0),l.Writable.prototype.end.call(this,e,t,i)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,i(26).Buffer,i(16),i(27))},function(e,t){},function(e,t,i){"use strict";var r=i(76).Buffer,n=i(247);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,i,n,a=r.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,i=a,n=s,t.copy(i,n),s+=o.data.length,o=o.next;return a},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,i){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(n.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(n.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i(249),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,i(16))},function(e,t,i){(function(e,t){!function(e,i){"use strict";if(!e.setImmediate){var r,n,a,o,s,l=1,c={},u=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){a.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(n=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&f(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var n={callback:e,args:t};return c[l]=n,r(l),l++},h.clearImmediate=p}function p(e){delete c[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(void 0,i)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,i(16),i(27))},function(e,t,i){(function(t){function i(e){try{if(!t.localStorage)return!1}catch(e){return!1}var i=t.localStorage[e];return null!=i&&"true"===String(i).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,i(16))},function(e,t,i){"use strict";e.exports=a;var r=i(142),n=Object.create(i(59));function a(e){if(!(this instanceof a))return new a(e);r.call(this,e)}n.inherits=i(31),n.inherits(a,r),a.prototype._transform=function(e,t,i){i(null,e)}},function(e,t,i){var r=i(26).Buffer;e.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),i=e.length,n=0;n<i;n++)t[n]=e[n];return t.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)i.call(r,n)&&(e[n]=r[n])}return e};var i=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,i){"use strict";(function(e){var r=i(26).Buffer,n=i(256).Transform,a=i(261),o=i(144),s=i(143).ok,l=i(26).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+l.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var u=Object.keys(a),d=0;d<u.length;d++){var h=u[d];h.match(/^Z/)&&Object.defineProperty(t,h,{enumerable:!0,value:a[h],writable:!1})}for(var p={Z_OK:a.Z_OK,Z_STREAM_END:a.Z_STREAM_END,Z_NEED_DICT:a.Z_NEED_DICT,Z_ERRNO:a.Z_ERRNO,Z_STREAM_ERROR:a.Z_STREAM_ERROR,Z_DATA_ERROR:a.Z_DATA_ERROR,Z_MEM_ERROR:a.Z_MEM_ERROR,Z_BUF_ERROR:a.Z_BUF_ERROR,Z_VERSION_ERROR:a.Z_VERSION_ERROR},f=Object.keys(p),m=0;m<f.length;m++){var g=f[m];p[p[g]]=g}function y(e,t,i){var n=[],a=0;function o(){for(var t;null!==(t=e.read());)n.push(t),a+=t.length;e.once("readable",o)}function s(){var t,o=null;a>=l?o=new RangeError(c):t=r.concat(n,a),n=[],e.close(),i(o,t)}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",o),i(t)})),e.on("end",s),e.end(t),o()}function _(e,t){if("string"==typeof t&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Not a string or buffer");var i=e._finishFlushFlag;return e._processChunk(t,i)}function v(e){if(!(this instanceof v))return new v(e);A.call(this,e,a.DEFLATE)}function C(e){if(!(this instanceof C))return new C(e);A.call(this,e,a.INFLATE)}function x(e){if(!(this instanceof x))return new x(e);A.call(this,e,a.GZIP)}function b(e){if(!(this instanceof b))return new b(e);A.call(this,e,a.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);A.call(this,e,a.DEFLATERAW)}function T(e){if(!(this instanceof T))return new T(e);A.call(this,e,a.INFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);A.call(this,e,a.UNZIP)}function w(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function A(e,i){var o=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,n.call(this,e),e.flush&&!w(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!w(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!r.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(i);var s=this;this._hadError=!1,this._handle.onerror=function(e,i){P(s),s._hadError=!0;var r=new Error(e);r.errno=i,r.code=t.codes[i],s.emit("error",r)};var l=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(l=e.level);var c=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(c=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,l,e.memLevel||t.Z_DEFAULT_MEMLEVEL,c,e.dictionary),this._buffer=r.allocUnsafe(this._chunkSize),this._offset=0,this._level=l,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function P(t,i){i&&e.nextTick(i),t._handle&&(t._handle.close(),t._handle=null)}function D(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=v,t.Inflate=C,t.Gzip=x,t.Gunzip=b,t.DeflateRaw=S,t.InflateRaw=T,t.Unzip=E,t.createDeflate=function(e){return new v(e)},t.createInflate=function(e){return new C(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new T(e)},t.createGzip=function(e){return new x(e)},t.createGunzip=function(e){return new b(e)},t.createUnzip=function(e){return new E(e)},t.deflate=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new v(t),e,i)},t.deflateSync=function(e,t){return _(new v(t),e)},t.gzip=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new x(t),e,i)},t.gzipSync=function(e,t){return _(new x(t),e)},t.deflateRaw=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new S(t),e,i)},t.deflateRawSync=function(e,t){return _(new S(t),e)},t.unzip=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new E(t),e,i)},t.unzipSync=function(e,t){return _(new E(t),e)},t.inflate=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new C(t),e,i)},t.inflateSync=function(e,t){return _(new C(t),e)},t.gunzip=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new b(t),e,i)},t.gunzipSync=function(e,t){return _(new b(t),e)},t.inflateRaw=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new T(t),e,i)},t.inflateRawSync=function(e,t){return _(new T(t),e)},o.inherits(A,n),A.prototype.params=function(i,r,n){if(i<t.Z_MIN_LEVEL||i>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+i);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==i||this._strategy!==r){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){s(o._handle,"zlib binding closed"),o._handle.params(i,r),o._hadError||(o._level=i,o._strategy=r,n&&n())}))}else e.nextTick(n)},A.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(e){this._transform(r.alloc(0),"",e)},A.prototype.flush=function(t,i){var n=this,o=this._writableState;("function"==typeof t||void 0===t&&!i)&&(i=t,t=a.Z_FULL_FLUSH),o.ended?i&&e.nextTick(i):o.ending?i&&this.once("end",i):o.needDrain?i&&this.once("drain",(function(){return n.flush(t,i)})):(this._flushFlag=t,this.write(r.alloc(0),"",i))},A.prototype.close=function(t){P(this,t),e.nextTick(D,this)},A.prototype._transform=function(e,t,i){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||r.isBuffer(e)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,n,i)):i(new Error("zlib binding closed")):i(new Error("invalid input"))},A.prototype._processChunk=function(e,t,i){var n=e&&e.length,a=this._chunkSize-this._offset,o=0,u=this,d="function"==typeof i;if(!d){var h,p=[],f=0;this.on("error",(function(e){h=e})),s(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(t,e,o,n,this._buffer,this._offset,a)}while(!this._hadError&&_(m[0],m[1]));if(this._hadError)throw h;if(f>=l)throw P(this),new RangeError(c);var g=r.concat(p,f);return P(this),g}s(this._handle,"zlib binding closed");var y=this._handle.write(t,e,o,n,this._buffer,this._offset,a);function _(l,c){if(this&&(this.buffer=null,this.callback=null),!u._hadError){var h=a-c;if(s(h>=0,"have should not go down"),h>0){var m=u._buffer.slice(u._offset,u._offset+h);u._offset+=h,d?u.push(m):(p.push(m),f+=m.length)}if((0===c||u._offset>=u._chunkSize)&&(a=u._chunkSize,u._offset=0,u._buffer=r.allocUnsafe(u._chunkSize)),0===c){if(o+=n-l,n=l,!d)return!0;var g=u._handle.write(t,e,o,n,u._buffer,u._offset,u._chunkSize);return g.callback=_,void(g.buffer=e)}if(!d)return!1;i()}}y.buffer=e,y.callback=_},o.inherits(v,A),o.inherits(C,A),o.inherits(x,A),o.inherits(b,A),o.inherits(S,A),o.inherits(T,A),o.inherits(E,A)}).call(this,i(27))},function(e,t,i){e.exports=n;var r=i(98).EventEmitter;function n(){r.call(this)}i(31)(n,r),n.Readable=i(58),n.Writable=i(257),n.Duplex=i(258),n.Transform=i(259),n.PassThrough=i(260),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",s),i.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",s),i.removeListener("close",l),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",c),e.on("error",c),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}},function(e,t,i){e.exports=i(99)},function(e,t,i){e.exports=i(38)},function(e,t,i){e.exports=i(58).Transform},function(e,t,i){e.exports=i(58).PassThrough},function(e,t,i){"use strict";(function(e,r){var n=i(143),a=i(265),o=i(266),s=i(269),l=i(272);for(var c in l)t[c]=l[c];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function u(e){if("number"!=typeof e||e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||s.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},u.prototype.write=function(e,t,i,r,n,a,o){return this._write(!0,e,t,i,r,n,a,o)},u.prototype.writeSync=function(e,t,i,r,n,a,o){return this._write(!1,e,t,i,r,n,a,o)},u.prototype._write=function(i,a,o,s,l,c,u,d){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==t.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==t.Z_NO_FLUSH&&a!==t.Z_PARTIAL_FLUSH&&a!==t.Z_SYNC_FLUSH&&a!==t.Z_FULL_FLUSH&&a!==t.Z_FINISH&&a!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=e.alloc(0),l=0,s=0),this.strm.avail_in=l,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=d,this.strm.output=c,this.strm.next_out=u,this.flush=a,!i)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return r.nextTick((function(){h._process(),h._after()})),this},u.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},u.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},u.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(e,i,r,a,o){n(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(e>=8&&e<=15,"invalid windowBits"),n(i>=-1&&i<=9,"invalid compression level"),n(r>=1&&r<=9,"invalid memlevel"),n(a===t.Z_FILTERED||a===t.Z_HUFFMAN_ONLY||a===t.Z_RLE||a===t.Z_FIXED||a===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(i,e,r,a,o),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(e,i,r,n,l){switch(this.level=e,this.windowBits=i,this.memLevel=r,this.strategy=n,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=l,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=u}).call(this,i(26).Buffer,i(27))},function(e,t,i){"use strict";
 */function n(e,t){if(e===t)return 0;for(var i=e.length,r=t.length,n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0}function a(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=i(144),s=Object.prototype.hasOwnProperty,l=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function d(e){return!a(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var h=e.exports=_,p=/\s*function\s+([^\(\s]*)\s*/;function f(e){if(o.isFunction(e)){if(c)return e.name;var t=e.toString().match(p);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(c||!o.isFunction(e))return o.inspect(e);var t=f(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,i,r,n){throw new h.AssertionError({message:i,actual:e,expected:t,operator:r,stackStartFunction:n})}function _(e,t){e||y(e,!0,t,"==",h.ok)}function v(e,t,i,r){if(e===t)return!0;if(a(e)&&a(t))return 0===n(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(d(e)&&d(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(a(e)!==a(t))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,i,r){if(null==e||null==t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(i&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var n=C(e),a=C(t);if(n&&!a||!n&&a)return!1;if(n)return e=l.call(e),t=l.call(t),v(e,t,i);var s,c,u=S(e),d=S(t);if(u.length!==d.length)return!1;for(u.sort(),d.sort(),c=u.length-1;c>=0;c--)if(u[c]!==d[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!v(e[s],t[s],i,r))return!1;return!0}(e,t,i,r))}return i?e===t:e==t}function C(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e,t,i,r){var n;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(r=i,i=null),n=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(i&&i.name?" ("+i.name+").":".")+(r?" "+r:"."),e&&!n&&y(n,i,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&n&&!i;if((!e&&o.isError(n)&&a&&x(n,i)||s)&&y(n,i,"Got unwanted exception"+r),e&&n&&i&&!x(n,i)||!e&&n)throw n}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var i=new Error;if(i.stack){var r=i.stack,n=f(t),a=r.indexOf("\n"+n);if(a>=0){var o=r.indexOf("\n",a+1);r=r.substring(o+1)}this.stack=r}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=_,h.equal=function(e,t,i){e!=t&&y(e,t,i,"==",h.equal)},h.notEqual=function(e,t,i){e==t&&y(e,t,i,"!=",h.notEqual)},h.deepEqual=function(e,t,i){v(e,t,!1)||y(e,t,i,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,i){v(e,t,!0)||y(e,t,i,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,i){v(e,t,!1)&&y(e,t,i,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,i,r){v(t,i,!0)&&y(t,i,r,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,i){e!==t&&y(e,t,i,"===",h.strictEqual)},h.notStrictEqual=function(e,t,i){e===t&&y(e,t,i,"!==",h.notStrictEqual)},h.throws=function(e,t,i){b(!0,e,t,i)},h.doesNotThrow=function(e,t,i){b(!1,e,t,i)},h.ifError=function(e){if(e)throw e},h.strict=r((function e(t,i){t||y(t,!0,i,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var S=Object.keys||function(e){var t=[];for(var i in e)s.call(e,i)&&t.push(i);return t}}).call(this,i(16))},function(e,t,i){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),i={},r=0;r<t.length;r++)i[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return i},n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],i=0;i<arguments.length;i++)t.push(s(arguments[i]));return t.join(" ")}i=1;for(var r=arguments,a=r.length,o=String(e).replace(n,(function(e){if("%%"===e)return"%";if(i>=a)return e;switch(e){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(e){return"[Circular]"}default:return e}})),l=r[i];i<a;l=r[++i])m(l)||!C(l)?o+=" "+l:o+=" "+s(l);return o},t.deprecate=function(i,r){if(void 0!==e&&!0===e.noDeprecation)return i;if(void 0===e)return function(){return t.deprecate(i,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),n=!0}return i.apply(this,arguments)}};var a,o={};function s(e,i){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),f(i)?r.showHidden=i:i&&t._extend(r,i),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,e,r.depth)}function l(e,t){var i=s.styles[t];return i?"["+s.colors[i][0]+"m"+e+"["+s.colors[i][1]+"m":e}function c(e,t){return e}function u(e,i,r){if(e.customInspect&&i&&S(i.inspect)&&i.inspect!==t.inspect&&(!i.constructor||i.constructor.prototype!==i)){var n=i.inspect(r,e);return y(n)||(n=u(e,n,r)),n}var a=function(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}if(g(t))return e.stylize(""+t,"number");if(f(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,i);if(a)return a;var o=Object.keys(i),s=function(e){var t={};return e.forEach((function(e,i){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(i)),b(i)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return d(i);if(0===o.length){if(S(i)){var l=i.name?": "+i.name:"";return e.stylize("[Function"+l+"]","special")}if(v(i))return e.stylize(RegExp.prototype.toString.call(i),"regexp");if(x(i))return e.stylize(Date.prototype.toString.call(i),"date");if(b(i))return d(i)}var c,C="",T=!1,E=["{","}"];(p(i)&&(T=!0,E=["[","]"]),S(i))&&(C=" [Function"+(i.name?": "+i.name:"")+"]");return v(i)&&(C=" "+RegExp.prototype.toString.call(i)),x(i)&&(C=" "+Date.prototype.toUTCString.call(i)),b(i)&&(C=" "+d(i)),0!==o.length||T&&0!=i.length?r<0?v(i)?e.stylize(RegExp.prototype.toString.call(i),"regexp"):e.stylize("[Object]","special"):(e.seen.push(i),c=T?function(e,t,i,r,n){for(var a=[],o=0,s=t.length;o<s;++o)P(t,String(o))?a.push(h(e,t,i,r,String(o),!0)):a.push("");return n.forEach((function(n){n.match(/^\d+$/)||a.push(h(e,t,i,r,n,!0))})),a}(e,i,r,s,o):o.map((function(t){return h(e,i,r,s,t,T)})),e.seen.pop(),function(e,t,i){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+i[1];return i[0]+t+" "+e.join(", ")+" "+i[1]}(c,C,E)):E[0]+C+E[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,i,r,n,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),P(r,n)||(o="["+n+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(i)?u(e,l.value,null):u(e,l.value,i-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),_(o)){if(a&&n.match(/^\d+$/))return s;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function p(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function _(e){return void 0===e}function v(e){return C(e)&&"[object RegExp]"===T(e)}function C(e){return"object"==typeof e&&null!==e}function x(e){return C(e)&&"[object Date]"===T(e)}function b(e){return C(e)&&("[object Error]"===T(e)||e instanceof Error)}function S(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(i){if(_(a)&&(a=e.env.NODE_DEBUG||""),i=i.toUpperCase(),!o[i])if(new RegExp("\\b"+i+"\\b","i").test(a)){var r=e.pid;o[i]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",i,r,e)}}else o[i]=function(){};return o[i]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=f,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=_,t.isRegExp=v,t.isObject=C,t.isDate=x,t.isError=b,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=i(264);var w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),w[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",A(),t.format.apply(t,arguments))},t.inherits=i(265),t._extend=function(e,t){if(!t||!C(t))return e;for(var i=Object.keys(t),r=i.length;r--;)e[i[r]]=t[i[r]];return e};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var i=new Error("Promise was rejected with a falsy value");i.reason=e,e=i}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(D&&e[D]){var t;if("function"!=typeof(t=e[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,i,r=new Promise((function(e,r){t=e,i=r})),n=[],a=0;a<arguments.length;a++)n.push(arguments[a]);n.push((function(e,r){e?i(e):t(r)}));try{e.apply(this,n)}catch(e){i(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),D&&Object.defineProperty(t,D,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=D,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function i(){for(var i=[],r=0;r<arguments.length;r++)i.push(arguments[r]);var n=i.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var a=this,o=function(){return n.apply(a,arguments)};t.apply(this,i).then((function(t){e.nextTick(o,null,t)}),(function(t){e.nextTick(M,t,o)}))}return Object.setPrototypeOf(i,Object.getPrototypeOf(t)),Object.defineProperties(i,r(t)),i}}).call(this,i(27))},function(e,t,i){"use strict";e.exports=function(e,t,i,r){for(var n=65535&e|0,a=e>>>16&65535|0,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{a=a+(n=n+t[r++]|0)|0}while(--o);n%=65521,a%=65521}return n|a<<16|0}},function(e,t,i){"use strict";var r=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();e.exports=function(e,t,i,n){var a=r,o=n+i;e^=-1;for(var s=n;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},function(e,t){var i=2311;e.exports=function(){return i++}},function(e,t,i){var r=i(11),n=i(278).buildTransformer,a=[];function o(e,t,i,a,o){if(t.getBoundingClientRect&&r.domSupported&&!s(t)){var l=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),c=function(e,t,i){for(var r=i?"invTrans":"trans",a=t[r],o=t.srcCoords,s=!0,l=[],c=[],u=0;u<4;u++){var d=e[u].getBoundingClientRect(),h=2*u,p=d.left,f=d.top;l.push(p,f),s=s&&o&&p===o[h]&&f===o[h+1],c.push(e[u].offsetLeft,e[u].offsetTop)}return s&&a?a:(t.srcCoords=l,t[r]=i?n(c,l):n(l,c))}(function(e,t){var i=t.markers;if(i)return i;i=t.markers=[];for(var r=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,c=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",n[c]+":0",r[1-l]+":auto",n[1-c]+":auto",""].join("!important;"),e.appendChild(o),i.push(o)}return i}(t,l),l,o);if(c)return c(e,i,a),!0}return!1}function s(e){return"CANVAS"===e.nodeName.toUpperCase()}t.transformLocalCoord=function(e,t,i,r,n){return o(a,t,r,n,!0)&&o(e,i,a[0],a[1])},t.transformCoordWithViewport=o,t.isCanvasEl=s},function(e,t,i){var r=i(147),n=i(39),a=i(78),o=i(281),s=i(0),l=function(e){a.call(this,e),n.call(this,e),o.call(this,e),this.id=e.id||r()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var i=this[e];i||(i=this[e]=[]),i[0]=t[0],i[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(s.isObject(e))for(var i in e)e.hasOwnProperty(i)&&this.attrKV(i,e[i]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),this.clipPath=e,e.__zr=t,e.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.addAnimator(t[i]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.removeAnimator(t[i]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},s.mixin(l,o),s.mixin(l,a),s.mixin(l,n);var c=l;e.exports=c},function(e,t,i){var r=i(282),n=i(24),a=i(0).isArrayLike,o=Array.prototype.slice;function s(e,t){return e[t]}function l(e,t,i){e[t]=i}function c(e,t,i){return(t-e)*i+e}function u(e,t,i){return i>.5?t:e}function d(e,t,i,r,n){var a=e.length;if(1===n)for(var o=0;o<a;o++)r[o]=c(e[o],t[o],i);else{var s=a&&e[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)r[o][l]=c(e[o][l],t[o][l],i)}}function h(e,t,i){var r=e.length,n=t.length;if(r!==n)if(r>n)e.length=n;else for(var a=r;a<n;a++)e.push(1===i?t[a]:o.call(t[a]));var s=e[0]&&e[0].length;for(a=0;a<e.length;a++)if(1===i)isNaN(e[a])&&(e[a]=t[a]);else for(var l=0;l<s;l++)isNaN(e[a][l])&&(e[a][l]=t[a][l])}function p(e,t,i){if(e===t)return!0;var r=e.length;if(r!==t.length)return!1;if(1===i){for(var n=0;n<r;n++)if(e[n]!==t[n])return!1}else{var a=e[0].length;for(n=0;n<r;n++)for(var o=0;o<a;o++)if(e[n][o]!==t[n][o])return!1}return!0}function f(e,t,i,r,n,a,o,s,l){var c=e.length;if(1===l)for(var u=0;u<c;u++)s[u]=m(e[u],t[u],i[u],r[u],n,a,o);else{var d=e[0].length;for(u=0;u<c;u++)for(var h=0;h<d;h++)s[u][h]=m(e[u][h],t[u][h],i[u][h],r[u][h],n,a,o)}}function m(e,t,i,r,n,a,o){var s=.5*(i-e),l=.5*(r-t);return(2*(t-i)+s+l)*o+(-3*(t-i)-2*s-l)*a+s*n+t}function g(e){if(a(e)){var t=e.length;if(a(e[0])){for(var i=[],r=0;r<t;r++)i.push(o.call(e[r]));return i}return o.call(e)}return e}function y(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function _(e,t,i,o,s,l){var g=e._getter,_=e._setter,v="spline"===t,C=o.length;if(C){var x,b=o[0].value,S=a(b),T=!1,E=!1,w=S?function(e){var t=e[e.length-1].value;return a(t&&t[0])?2:1}(o):0;o.sort((function(e,t){return e.time-t.time})),x=o[C-1].time;for(var A=[],P=[],D=o[0].value,M=!0,I=0;I<C;I++){A.push(o[I].time/x);var R=o[I].value;if(S&&p(R,D,w)||!S&&R===D||(M=!1),D=R,"string"==typeof R){var O=n.parse(R);O?(R=O,T=!0):E=!0}P.push(R)}if(l||!M){var L=P[C-1];for(I=0;I<C-1;I++)S?h(P[I],L,w):!isNaN(P[I])||isNaN(L)||E||T||(P[I]=L);S&&h(g(e._target,s),L,w);var N,F,B,V,k,z=0,G=0;if(T)var U=[0,0,0,0];var $=new r({target:e._target,life:x,loop:e._loop,delay:e._delay,onframe:function(e,t){var i;if(t<0)i=0;else if(t<G){for(i=Math.min(z+1,C-1);i>=0&&!(A[i]<=t);i--);i=Math.min(i,C-2)}else{for(i=z;i<C&&!(A[i]>t);i++);i=Math.min(i-1,C-2)}z=i,G=t;var r=A[i+1]-A[i];if(0!==r)if(N=(t-A[i])/r,v)if(B=P[i],F=P[0===i?i:i-1],V=P[i>C-2?C-1:i+1],k=P[i>C-3?C-1:i+2],S)f(F,B,V,k,N,N*N,N*N*N,g(e,s),w);else{if(T)n=f(F,B,V,k,N,N*N,N*N*N,U,1),n=y(U);else{if(E)return u(B,V,N);n=m(F,B,V,k,N,N*N,N*N*N)}_(e,s,n)}else if(S)d(P[i],P[i+1],N,g(e,s),w);else{var n;if(T)d(P[i],P[i+1],N,U,1),n=y(U);else{if(E)return u(P[i],P[i+1],N);n=c(P[i],P[i+1],N)}_(e,s,n)}},ondestroy:i});return t&&"spline"!==t&&($.easing=t),$}}}var v=function(e,t,i,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=i||s,this._setter=r||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};v.prototype={when:function(e,t){var i=this._tracks;for(var r in t)if(t.hasOwnProperty(r)){if(!i[r]){i[r]=[];var n=this._getter(this._target,r);if(null==n)continue;0!==e&&i[r].push({time:0,value:g(n)})}i[r].push({time:e,value:t[r]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,i=0;i<t;i++)e[i].call(this)},start:function(e,t){var i,r=this,n=0,a=function(){--n||r._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=_(this,e,a,this._tracks[o],o,t);s&&(this._clipList.push(s),n++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(e,t){l(e,t);for(var i=0;i<r._onframeList.length;i++)r._onframeList[i](e,t)}}return n||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,i=this.animation,r=0;r<t.length;r++){var n=t[r];e&&n.onframe(this._target,1),i&&i.removeClip(n)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var C=v;e.exports=C},function(e,t){var i=function(){this.head=null,this.tail=null,this._len=0},r=i.prototype;r.insert=function(e){var t=new n(e);return this.insertEntry(t),t},r.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.len=function(){return this._len},r.clear=function(){this.head=this.tail=null,this._len=0};var n=function(e){this.value=e,this.next,this.prev},a=function(e){this._list=new i,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},o=a.prototype;o.put=function(e,t){var i=this._list,r=this._map,a=null;if(null==r[e]){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new n(t),s.key=e,i.insertEntry(s),r[e]=s}return a},o.get=function(e){var t=this._map[e],i=this._list;if(null!=t)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;e.exports=s},function(e,t){var i={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};e.exports=function(e,t,r){return i.hasOwnProperty(t)?r*e.dpr:r}},function(e,t){var i=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};i.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var r=i;e.exports=r},function(e,t){var i="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)};e.exports=i},function(e,t,i){var r=i(81),n=i(9),a=i(80).WILL_BE_RESTORED,o=new n,s=function(){};s.prototype={constructor:s,drawRectText:function(e,t){var i=this.style;t=i.textRect||t,this.__dirty&&r.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),r.needDrawText(n,i)){e.save();var s=this.transform;i.transformText?this.setTransform(e):s&&(o.copy(t),o.applyTransform(s),t=o),r.renderText(this,e,n,i,t,a),e.restore()}}};var l=s;e.exports=l},function(e,t){t.buildPath=function(e,t){var i,r,n,a,o,s=t.x,l=t.y,c=t.width,u=t.height,d=t.r;c<0&&(s+=c,c=-c),u<0&&(l+=u,u=-u),"number"==typeof d?i=r=n=a=d:d instanceof Array?1===d.length?i=r=n=a=d[0]:2===d.length?(i=n=d[0],r=a=d[1]):3===d.length?(i=d[0],r=a=d[1],n=d[2]):(i=d[0],r=d[1],n=d[2],a=d[3]):i=r=n=a=0,i+r>c&&(i*=c/(o=i+r),r*=c/o),n+a>c&&(n*=c/(o=n+a),a*=c/o),r+n>u&&(r*=u/(o=r+n),n*=u/o),i+a>u&&(i*=u/(o=i+a),a*=u/o),e.moveTo(s+i,l),e.lineTo(s+c-r,l),0!==r&&e.arc(s+c-r,l+r,r,-Math.PI/2,0),e.lineTo(s+c,l+u-n),0!==n&&e.arc(s+c-n,l+u-n,n,0,Math.PI/2),e.lineTo(s+a,l+u),0!==a&&e.arc(s+a,l+u-a,a,Math.PI/2,Math.PI),e.lineTo(s,l+i),0!==i&&e.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.each,a=r.filter,o=r.map,s=r.isArray,l=r.indexOf,c=r.isObject,u=r.isString,d=r.createHashMap,h=r.assert,p=r.clone,f=r.merge,m=r.extend,g=r.mixin,y=i(4),_=i(12),v=i(13),C=i(305),x=i(169),b=i(29).resetSourceDefaulter,S=_.extend({init:function(e,t,i,r){i=i||{},this.option=null,this._theme=new _(i),this._optionManager=r},setOption:function(e,t){h(!("\0_ec_inner"in e),"please use chart.getOption()"),this._optionManager.setOption(e,t),this.resetOption(null)},resetOption:function(e){var t=!1,i=this._optionManager;if(!e||"recreate"===e){var r=i.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this.mergeOption(r)):T.call(this,r),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),t=!0)}if(!e||"recreate"===e||"media"===e){var o=i.getMediaOption(this,this._api);o.length&&n(o,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,i=this._componentsMap,r=[];b(this),n(e,(function(e,i){null!=e&&(v.hasClass(i)?i&&r.push(i):t[i]=null==t[i]?p(e):f(t[i],e,!0))})),v.topologicalTravel(r,v.getAllClassMainTypes(),(function(r,a){var o=y.normalizeToArray(e[r]),l=y.mappingToExists(i.get(r),o);y.makeIdAndName(l),n(l,(function(e,t){var i=e.option;c(i)&&(e.keyInfo.mainType=r,e.keyInfo.subType=function(e,t,i){return t.type?t.type:i?i.subType:v.determineSubType(e,t)}(r,i,e.exist))}));var u=function(e,t){s(t)||(t=t?[t]:[]);var i={};return n(t,(function(t){i[t]=(e.get(t)||[]).slice()})),i}(i,a);t[r]=[],i.set(r,[]),n(l,(function(e,n){var a=e.exist,o=e.option;if(h(c(o)||a,"Empty component definition"),o){var s=v.getClass(r,e.keyInfo.subType,!0);if(a&&a.constructor===s)a.name=e.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var l=m({dependentModels:u,componentIndex:n},e.keyInfo);a=new s(o,this,this,l),m(a,l),a.init(o,this,this,l),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(r)[n]=a,t[r][n]=a.option}),this),"series"===r&&E(this,i.get("series"))}),this),this._seriesIndicesMap=d(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=p(this.option);return n(e,(function(t,i){if(v.hasClass(i)){for(var r=(t=y.normalizeToArray(t)).length-1;r>=0;r--)y.isIdInner(t[r])&&t.splice(r,1);e[i]=t}})),delete e["\0_ec_inner"],e},getTheme:function(){return this._theme},getComponent:function(e,t){var i=this._componentsMap.get(e);if(i)return i[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var i,r=e.index,n=e.id,c=e.name,u=this._componentsMap.get(t);if(!u||!u.length)return[];if(null!=r)s(r)||(r=[r]),i=a(o(r,(function(e){return u[e]})),(function(e){return!!e}));else if(null!=n){var d=s(n);i=a(u,(function(e){return d&&l(n,e.id)>=0||!d&&e.id===n}))}else if(null!=c){var h=s(c);i=a(u,(function(e){return h&&l(c,e.name)>=0||!h&&e.name===c}))}else i=u.slice();return w(i,e)},findComponents:function(e){var t,i,r,n,o,s=e.query,l=e.mainType,c=(i=l+"Index",r=l+"Id",n=l+"Name",!(t=s)||null==t[i]&&null==t[r]&&null==t[n]?null:{mainType:l,index:t[i],id:t[r],name:t[n]}),u=c?this.queryComponents(c):this._componentsMap.get(l);return o=w(u,e),e.filter?a(o,e.filter):o},eachComponent:function(e,t,i){var r=this._componentsMap;if("function"==typeof e)i=t,t=e,r.each((function(e,r){n(e,(function(e,n){t.call(i,r,e,n)}))}));else if(u(e))n(r.get(e),t,i);else if(c(e)){var a=this.findComponents(e);n(a,t,i)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return a(t,(function(t){return t.name===e}))},getSeriesByIndex:function(e){return this._componentsMap.get("series")[e]},getSeriesByType:function(e){var t=this._componentsMap.get("series");return a(t,(function(t){return t.subType===e}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(e,t){n(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];e.call(t,r,i)}),this)},eachRawSeries:function(e,t){n(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,i){n(this._seriesIndices,(function(r){var n=this._componentsMap.get("series")[r];n.subType===e&&t.call(i,n,r)}),this)},eachRawSeriesByType:function(e,t,i){return n(this.getSeriesByType(e),t,i)},isSeriesFiltered:function(e){return null==this._seriesIndicesMap.get(e.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(e,t){E(this,a(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;E(this,t.get("series"));var i=[];t.each((function(e,t){i.push(t)})),v.topologicalTravel(i,v.getAllClassMainTypes(),(function(i,r){n(t.get(i),(function(t){("series"!==i||!function(e,t){if(t){var i=t.seiresIndex,r=t.seriesId,n=t.seriesName;return null!=i&&e.componentIndex!==i||null!=r&&e.id!==r||null!=n&&e.name!==n}}(t,e))&&t.restoreData()}))}))}});function T(e){var t,i,r;e=e,this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=d({series:[]}),this._seriesIndices,this._seriesIndicesMap,t=e,i=this._theme.option,r=t.color&&!t.colorLayer,n(i,(function(e,i){"colorLayer"===i&&r||v.hasClass(i)||("object"==typeof e?t[i]=t[i]?f(t[i],e,!1):p(e):null==t[i]&&(t[i]=e))})),f(e,C,!1),this.mergeOption(e)}function E(e,t){e._seriesIndicesMap=d(e._seriesIndices=o(t,(function(e){return e.componentIndex}))||[])}function w(e,t){return t.hasOwnProperty("subType")?a(e,(function(e){return e.subType===t.subType})):e}g(S,x);var A=S;e.exports=A},function(e,t,i){var r=i(10),n=i(50),a=i(294),o=Math.sqrt,s=Math.sin,l=Math.cos,c=Math.PI,u=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},d=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(u(e)*u(t))},h=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(d(e,t))};function p(e,t,i,r,n,a,u,p,f,m,g){var y=f*(c/180),_=l(y)*(e-i)/2+s(y)*(t-r)/2,v=-1*s(y)*(e-i)/2+l(y)*(t-r)/2,C=_*_/(u*u)+v*v/(p*p);C>1&&(u*=o(C),p*=o(C));var x=(n===a?-1:1)*o((u*u*(p*p)-u*u*(v*v)-p*p*(_*_))/(u*u*(v*v)+p*p*(_*_)))||0,b=x*u*v/p,S=x*-p*_/u,T=(e+i)/2+l(y)*b-s(y)*S,E=(t+r)/2+s(y)*b+l(y)*S,w=h([1,0],[(_-b)/u,(v-S)/p]),A=[(_-b)/u,(v-S)/p],P=[(-1*_-b)/u,(-1*v-S)/p],D=h(A,P);d(A,P)<=-1&&(D=c),d(A,P)>=1&&(D=0),0===a&&D>0&&(D-=2*c),1===a&&D<0&&(D+=2*c),g.addData(m,T,E,u,p,w,D,y,a)}var f=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,m=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function g(e,t){var i=function(e){if(!e)return new n;for(var t,i=0,r=0,a=i,o=r,s=new n,l=n.CMD,c=e.match(f),u=0;u<c.length;u++){for(var d,h=c[u],g=h.charAt(0),y=h.match(m)||[],_=y.length,v=0;v<_;v++)y[v]=parseFloat(y[v]);for(var C=0;C<_;){var x,b,S,T,E,w,A,P=i,D=r;switch(g){case"l":i+=y[C++],r+=y[C++],d=l.L,s.addData(d,i,r);break;case"L":i=y[C++],r=y[C++],d=l.L,s.addData(d,i,r);break;case"m":i+=y[C++],r+=y[C++],d=l.M,s.addData(d,i,r),a=i,o=r,g="l";break;case"M":i=y[C++],r=y[C++],d=l.M,s.addData(d,i,r),a=i,o=r,g="L";break;case"h":i+=y[C++],d=l.L,s.addData(d,i,r);break;case"H":i=y[C++],d=l.L,s.addData(d,i,r);break;case"v":r+=y[C++],d=l.L,s.addData(d,i,r);break;case"V":r=y[C++],d=l.L,s.addData(d,i,r);break;case"C":d=l.C,s.addData(d,y[C++],y[C++],y[C++],y[C++],y[C++],y[C++]),i=y[C-2],r=y[C-1];break;case"c":d=l.C,s.addData(d,y[C++]+i,y[C++]+r,y[C++]+i,y[C++]+r,y[C++]+i,y[C++]+r),i+=y[C-2],r+=y[C-1];break;case"S":x=i,b=r;var M=s.len(),I=s.data;t===l.C&&(x+=i-I[M-4],b+=r-I[M-3]),d=l.C,P=y[C++],D=y[C++],i=y[C++],r=y[C++],s.addData(d,x,b,P,D,i,r);break;case"s":x=i,b=r;M=s.len(),I=s.data;t===l.C&&(x+=i-I[M-4],b+=r-I[M-3]),d=l.C,P=i+y[C++],D=r+y[C++],i+=y[C++],r+=y[C++],s.addData(d,x,b,P,D,i,r);break;case"Q":P=y[C++],D=y[C++],i=y[C++],r=y[C++],d=l.Q,s.addData(d,P,D,i,r);break;case"q":P=y[C++]+i,D=y[C++]+r,i+=y[C++],r+=y[C++],d=l.Q,s.addData(d,P,D,i,r);break;case"T":x=i,b=r;M=s.len(),I=s.data;t===l.Q&&(x+=i-I[M-4],b+=r-I[M-3]),i=y[C++],r=y[C++],d=l.Q,s.addData(d,x,b,i,r);break;case"t":x=i,b=r;M=s.len(),I=s.data;t===l.Q&&(x+=i-I[M-4],b+=r-I[M-3]),i+=y[C++],r+=y[C++],d=l.Q,s.addData(d,x,b,i,r);break;case"A":S=y[C++],T=y[C++],E=y[C++],w=y[C++],A=y[C++],p(P=i,D=r,i=y[C++],r=y[C++],w,A,S,T,E,d=l.A,s);break;case"a":S=y[C++],T=y[C++],E=y[C++],w=y[C++],A=y[C++],p(P=i,D=r,i+=y[C++],r+=y[C++],w,A,S,T,E,d=l.A,s)}}"z"!==g&&"Z"!==g||(d=l.Z,s.addData(d),i=a,r=o),t=d}return s.toStatic(),s}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(i.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;i.rebuildPath(t)}},t.applyTransform=function(e){a(i,e),this.dirty(!0)},t}t.createFromString=function(e,t){return new r(g(e,t))},t.extendFromString=function(e,t){return r.extend(g(e,t))},t.mergePath=function(e,t){for(var i=[],n=e.length,a=0;a<n;a++){var o=e[a];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var s=new r(t);return s.createPathProxy(),s.buildPath=function(e){e.appendPath(i);var t=e.getContext();t&&e.rebuildPath(t)},s}},function(e,t){t.containStroke=function(e,t,i,r,n,a,o){if(0===n)return!1;var s=n,l=0;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>i+s||a<e-s&&a<i-s)return!1;if(e===i)return Math.abs(a-e)<=s/2;var c=(l=(t-r)/(e-i))*a-o+(e*r-i*t)/(e-i);return c*c/(l*l+1)<=s/2*s/2}},function(e,t,i){var r=i(32).quadraticProjectPoint;t.containStroke=function(e,t,i,n,a,o,s,l,c){if(0===s)return!1;var u=s;return!(c>t+u&&c>n+u&&c>o+u||c<t-u&&c<n-u&&c<o-u||l>e+u&&l>i+u&&l>a+u||l<e-u&&l<i-u&&l<a-u)&&r(e,t,i,n,a,o,l,c,null)<=u/2}},function(e,t){var i=2*Math.PI;t.normalizeRadian=function(e){return(e%=i)<0&&(e+=i),e}},function(e,t){e.exports=function(e,t,i,r,n,a){if(a>t&&a>r||a<t&&a<r)return 0;if(r===t)return 0;var o=r<t?1:-1,s=(a-t)/(r-t);1!==s&&0!==s||(o=r<t?.5:-.5);var l=s*(i-e)+e;return l===n?1/0:l>n?o:0}},function(e,t,i){var r=i(10).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,i){i&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}});e.exports=r},function(e,t,i){var r=i(11),n=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];e.exports=function(e){return r.browser.ie&&r.browser.version>=11?function(){var t,i=this.__clipPaths,r=this.style;if(i)for(var a=0;a<i.length;a++){var o=i[a],s=o&&o.shape,l=o&&o.type;if(s&&("sector"===l&&s.startAngle===s.endAngle||"rect"===l&&(!s.width||!s.height))){for(var c=0;c<n.length;c++)n[c][2]=r[n[c][0]],r[n[c][0]]=n[c][1];t=!0;break}}if(e.apply(this,arguments),t)for(c=0;c<n.length;c++)r[n[c][0]]=n[c][2]}:e}},function(e,t,i){var r=i(10),n=i(166),a=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){n.buildPath(e,t,!0)}});e.exports=a},function(e,t,i){var r=i(297),n=i(298);t.buildPath=function(e,t,i){var a=t.points,o=t.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=n(a,o,i,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var l=a.length,c=0;c<(i?l:l-1);c++){var u=s[2*c],d=s[2*c+1],h=a[(c+1)%l];e.bezierCurveTo(u[0],u[1],d[0],d[1],h[0],h[1])}}else{"spline"===o&&(a=r(a,i)),e.moveTo(a[0][0],a[0][1]);c=1;for(var p=a.length;c<p;c++)e.lineTo(a[c][0],a[c][1])}i&&e.closePath()}}},function(e,t,i){var r=i(10),n=i(166),a=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){n.buildPath(e,t,!1)}});e.exports=a},function(e,t,i){var r=i(10),n=i(104).subPixelOptimizeLine,a={},o=r.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i,r,o,s;this.subPixelOptimize?(n(a,t,this.style),i=a.x1,r=a.y1,o=a.x2,s=a.y2):(i=t.x1,r=t.y1,o=t.x2,s=t.y2);var l=t.percent;0!==l&&(e.moveTo(i,r),l<1&&(o=i*(1-l)+o*l,s=r*(1-l)+s*l),e.lineTo(o,s))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}});e.exports=o},function(e,t,i){var r=i(4),n=r.makeInner,a=r.normalizeToArray,o=n();var s={clearColorPalette:function(){o(this).colorIdx=0,o(this).colorNameMap={}},getColorFromPalette:function(e,t,i){var r=o(t=t||this),n=r.colorIdx||0,s=r.colorNameMap=r.colorNameMap||{};if(s.hasOwnProperty(e))return s[e];var l=a(this.get("color",!0)),c=this.get("colorLayer",!0),u=null!=i&&c?function(e,t){for(var i=e.length,r=0;r<i;r++)if(e[r].length>t)return e[r];return e[i-1]}(c,i):l;if((u=u||l)&&u.length){var d=u[n];return e&&(s[e]=d),r.colorIdx=(n+1)%u.length,d}}};e.exports=s},function(e,t,i){var r=i(0),n=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var a=function(e){r.each(n,(function(t){this[t]=r.bind(e[t],e)}),this)};e.exports=a},function(e,t,i){var r=i(13),n=i(83),a=i(29).detectSourceFormat,o=i(65).SERIES_LAYOUT_BY_COLUMN;r.extend({type:"dataset",defaultOption:{seriesLayoutBy:o,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){a(this)}}),n.extend({type:"dataset"})},function(e,t,i){var r=i(40),n=i(48),a=i(41),o=i(163),s=i(103),l=i(316),c=i(168),u=i(10),d=i(165),h=i(167),p=i(105),f=i(101),m=i(15),g=i(158).createFromString,y=i(0),_=y.isString,v=y.extend,C=y.defaults,x=y.trim,b=y.each,S=/[\s,]+/;function T(e){_(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function E(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}E.prototype.parse=function(e,t){t=t||{};var i=T(e);if(!i)throw new Error("Illegal svg");var n=new r;this._root=n;var a=i.getAttribute("viewBox")||"",o=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(o)&&(o=null),isNaN(l)&&(l=null),I(i,n,null,!0);for(var c,u,d=i.firstChild;d;)this._parseNode(d,n),d=d.nextSibling;if(a){var h=x(a).split(S);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&null!=o&&null!=l&&(u=F(c,o,l),!t.ignoreViewBox)){var p=n;(n=new r).add(p),p.scale=u.scale.slice(),p.position=u.position.slice()}return t.ignoreRootClip||null==o||null==l||n.setClipPath(new s({shape:{x:0,y:0,width:o,height:l}})),{root:n,width:o,height:l,viewBoxRect:c,viewBoxTransform:u}},E.prototype._parseNode=function(e,t){var i,r,n=e.nodeName.toLowerCase();if("defs"===n?this._isDefine=!0:"text"===n&&(this._isText=!0),this._isDefine){if(r=A[n]){var a=r.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=a)}}else(r=w[n])&&(i=r.call(this,e,t),t.add(i));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===n?this._isDefine=!1:"text"===n&&(this._isText=!1)},E.prototype._parseText=function(e,t){if(1===e.nodeType){var i=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(r)}var n=new a({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});P(t,n),I(e,n,this._defs);var o=n.style.fontSize;o&&o<9&&(n.style.fontSize=9,n.scale=n.scale||[1,1],n.scale[0]*=o/9,n.scale[1]*=o/9);var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n};var w={g:function(e,t){var i=new r;return P(t,i),I(e,i,this._defs),i},rect:function(e,t){var i=new s;return P(t,i),I(e,i,this._defs),i.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),i},circle:function(e,t){var i=new o;return P(t,i),I(e,i,this._defs),i.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),i},line:function(e,t){var i=new c;return P(t,i),I(e,i,this._defs),i.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),i},ellipse:function(e,t){var i=new l;return P(t,i),I(e,i,this._defs),i.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),i},polygon:function(e,t){var i=e.getAttribute("points");i&&(i=D(i));var r=new d({shape:{points:i||[]}});return P(t,r),I(e,r,this._defs),r},polyline:function(e,t){var i=new u;P(t,i),I(e,i,this._defs);var r=e.getAttribute("points");return r&&(r=D(r)),new h({shape:{points:r||[]}})},image:function(e,t){var i=new n;return P(t,i),I(e,i,this._defs),i.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),i},text:function(e,t){var i=e.getAttribute("x")||0,n=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var s=new r;return P(t,s),I(e,s,this._defs),s},tspan:function(e,t){var i=e.getAttribute("x"),n=e.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0,s=new r;return P(t,s),I(e,s,this._defs),this._textX+=a,this._textY+=o,s},path:function(e,t){var i=e.getAttribute("d")||"",r=g(i);return P(t,r),I(e,r,this._defs),r}},A={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),i=parseInt(e.getAttribute("y1")||0,10),r=parseInt(e.getAttribute("x2")||10,10),n=parseInt(e.getAttribute("y2")||0,10),a=new p(t,i,r,n);return function(e,t){var i=e.firstChild;for(;i;){if(1===i.nodeType){var r=i.getAttribute("offset");r=r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var n=i.getAttribute("stop-color")||"#000000";t.addColorStop(r,n)}i=i.nextSibling}}(e,a),a},radialgradient:function(e){}};function P(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),C(t.__inheritedStyle,e.__inheritedStyle))}function D(e){for(var t=x(e).split(S),i=[],r=0;r<t.length;r+=2){var n=parseFloat(t[r]),a=parseFloat(t[r+1]);i.push([n,a])}return i}var M={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function I(e,t,i,r){var n=t.__inheritedStyle||{},a="text"===t.type;if(1===e.nodeType&&(function(e,t){var i=e.getAttribute("transform");if(i){i=i.replace(/,/g," ");var r=null,n=[];i.replace(L,(function(e,t,i){n.push(t,i)}));for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1];switch(r=r||m.create(),s){case"translate":o=x(o).split(S),m.translate(r,r,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=x(o).split(S),m.scale(r,r,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=x(o).split(S),m.rotate(r,r,parseFloat(o[0]));break;case"skew":o=x(o).split(S),console.warn("Skew transform is not supported yet");break;case"matrix":o=x(o).split(S);r[0]=parseFloat(o[0]),r[1]=parseFloat(o[1]),r[2]=parseFloat(o[2]),r[3]=parseFloat(o[3]),r[4]=parseFloat(o[4]),r[5]=parseFloat(o[5])}}t.setLocalTransform(r)}}(e,t),v(n,function(e){var t=e.getAttribute("style"),i={};if(!t)return i;var r,n={};N.lastIndex=0;for(;null!=(r=N.exec(t));)n[r[1]]=r[2];for(var a in M)M.hasOwnProperty(a)&&null!=n[a]&&(i[M[a]]=n[a]);return i}(e)),!r))for(var o in M)if(M.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(n[M[o]]=s)}var l=a?"textFill":"fill",c=a?"textStroke":"stroke";t.style=t.style||new f;var u=t.style;null!=n.fill&&u.set(l,O(n.fill,i)),null!=n.stroke&&u.set(c,O(n.stroke,i)),b(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&a?"textStrokeWidth":e;null!=n[e]&&u.set(t,parseFloat(n[e]))})),n.textBaseline&&"auto"!==n.textBaseline||(n.textBaseline="alphabetic"),"alphabetic"===n.textBaseline&&(n.textBaseline="bottom"),"start"===n.textAlign&&(n.textAlign="left"),"end"===n.textAlign&&(n.textAlign="right"),b(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=n[e]&&u.set(e,n[e])})),n.lineDash&&(t.style.lineDash=x(n.lineDash).split(S)),u[c]&&"none"!==u[c]&&(t[c]=!0),t.__inheritedStyle=n}var R=/url\(\s*#(.*?)\)/;function O(e,t){var i=t&&e&&e.match(R);return i?t[x(i[1])]:e}var L=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var N=/([^\s:;]+)\s*:\s*([^:;]+)/g;function F(e,t,i){var r=t/e.width,n=i/e.height,a=Math.min(r,n);return{scale:[a,a],position:[-(e.x+e.width/2)*a+t/2,-(e.y+e.height/2)*a+i/2]}}t.parseXML=T,t.makeViewBoxTransform=F,t.parseSVG=function(e,t){return(new E).parse(e,t)}},function(e,t,i){var r=i(77);t.zrender=r;var n=i(15);t.matrix=n;var a=i(8);t.vector=a;var o=i(0),s=i(24);t.color=s;var l=i(2),c=i(3);t.number=c;var u=i(7);t.format=u;var d=i(33);d.throttle;t.throttle=d.throttle;var h=i(317);t.helper=h;var p=i(179);t.parseGeoJSON=p;var f=i(18);t.List=f;var m=i(12);t.Model=m;var g=i(35);t.Axis=g;var y=i(11);t.env=y;var _=p,v={};o.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){v[e]=o[e]}));var C={};o.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(e){C[e]=l[e]})),t.parseGeoJson=_,t.util=v,t.graphic=C},function(e,t,i){var r=i(0);var n=function(e){null!=e&&r.extend(this,e),this.otherDims={}};e.exports=n},function(e,t,i){var r=i(0),n=r.createHashMap,a=r.each,o=r.isString,s=r.defaults,l=r.extend,c=r.isObject,u=r.clone,d=i(4).normalizeToArray,h=i(29),p=h.guessOrdinal,f=h.BE_ORDINAL,m=i(64),g=i(66).OTHER_DIMENSIONS,y=i(174);function _(e,t,i){if(i||null!=t.get(e)){for(var r=0;null!=t.get(e+r);)r++;e+=r}return t.set(e,!0),e}var v=function(e,t,i){m.isInstance(t)||(t=m.seriesDataToSource(t)),i=i||{},e=(e||[]).slice();for(var r=(i.dimsDef||[]).slice(),h=n(),v=n(),C=[],x=function(e,t,i,r){var n=Math.max(e.dimensionsDetectCount||1,t.length,i.length,r||0);return a(t,(function(e){var t=e.dimsDef;t&&(n=Math.max(n,t.length))})),n}(t,e,r,i.dimCount),b=0;b<x;b++){var S=r[b]=l({},c(r[b])?r[b]:{name:r[b]}),T=S.name,E=C[b]=new y;null!=T&&null==h.get(T)&&(E.name=E.displayName=T,h.set(T,b)),null!=S.type&&(E.type=S.type),null!=S.displayName&&(E.displayName=S.displayName)}var w=i.encodeDef;!w&&i.encodeDefaulter&&(w=i.encodeDefaulter(t,x)),(w=n(w)).each((function(e,t){if(1===(e=d(e).slice()).length&&!o(e[0])&&e[0]<0)w.set(t,!1);else{var i=w.set(t,[]);a(e,(function(e,r){o(e)&&(e=h.get(e)),null!=e&&e<x&&(i[r]=e,P(C[e],t,r))}))}}));var A=0;function P(e,t,i){null!=g.get(t)?e.otherDims[t]=i:(e.coordDim=t,e.coordDimIndex=i,v.set(t,!0))}a(e,(function(e,t){var i,r,n;if(o(e))i=e,e={};else{i=e.name;var l=e.ordinalMeta;e.ordinalMeta=null,(e=u(e)).ordinalMeta=l,r=e.dimsDef,n=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(h=w.get(i))){var h;if(!(h=d(h)).length)for(var p=0;p<(r&&r.length||1);p++){for(;A<C.length&&null!=C[A].coordDim;)A++;A<C.length&&h.push(A++)}a(h,(function(t,a){var o=C[t];if(P(s(o,e),i,a),null==o.name&&r){var l=r[a];!c(l)&&(l={name:l}),o.name=o.displayName=l.name,o.defaultTooltip=l.defaultTooltip}n&&s(o.otherDims,n)}))}}));var D=i.generateCoord,M=i.generateCoordCount,I=null!=M;M=D?M||1:0;for(var R=D||"value",O=0;O<x;O++){null==(E=C[O]=C[O]||new y).coordDim&&(E.coordDim=_(R,v,I),E.coordDimIndex=0,(!D||M<=0)&&(E.isExtraCoord=!0),M--),null==E.name&&(E.name=_(E.coordDim,h)),null!=E.type||p(t,O,E.name)!==f.Must&&(!E.isExtraCoord||null==E.otherDims.itemName&&null==E.otherDims.seriesName)||(E.type="ordinal")}return C};e.exports=v},function(e,t,i){var r=i(0),n=r.createHashMap,a=r.isObject,o=r.map;function s(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}s.createByAxisModel=function(e){var t=e.option,i=t.data,r=i&&o(i,u);return new s({categories:r,needCollect:!r,deduplication:!1!==t.dedplication})};var l=s.prototype;function c(e){return e._map||(e._map=n(e.categories))}function u(e){return a(e)&&null!=e.value?e.value:e+""}l.getOrdinal=function(e){return c(this).get(e)},l.parseAndCollect=function(e){var t,i=this._needCollect;if("string"!=typeof e&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=c(this);return null==(t=r.get(e))&&(i?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t};var d=s;e.exports=d},function(e,t,i){var r=i(3),n=r.round;function a(e){return r.getPrecisionSafe(e)+2}function o(e,t,i){e[t]=Math.max(Math.min(e[t],i[1]),i[0])}function s(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),o(e,0,t),o(e,1,t),e[0]>e[1]&&(e[0]=e[1])}t.intervalScaleNiceTicks=function(e,t,i,o){var l={},c=e[1]-e[0],u=l.interval=r.nice(c/t,!0);null!=i&&u<i&&(u=l.interval=i),null!=o&&u>o&&(u=l.interval=o);var d=l.intervalPrecision=a(u);return s(l.niceTickExtent=[n(Math.ceil(e[0]/u)*u,d),n(Math.floor(e[1]/u)*u,d)],e),l},t.getIntervalPrecision=a,t.fixExtent=s},function(e,t,i){var r=i(0),n=i(84),a=i(3),o=i(85),s=n.prototype,l=o.prototype,c=a.getPrecisionSafe,u=a.round,d=Math.floor,h=Math.ceil,p=Math.pow,f=Math.log,m=n.extend({type:"log",base:10,$constructor:function(){n.apply(this,arguments),this._originalScale=new o},getTicks:function(e){var t=this._originalScale,i=this._extent,n=t.getExtent();return r.map(l.getTicks.call(this,e),(function(e){var r=a.round(p(this.base,e));return r=e===i[0]&&t.__fixMin?g(r,n[0]):r,r=e===i[1]&&t.__fixMax?g(r,n[1]):r}),this)},getMinorTicks:l.getMinorTicks,getLabel:l.getLabel,scale:function(e){return e=s.scale.call(this,e),p(this.base,e)},setExtent:function(e,t){var i=this.base;e=f(e)/f(i),t=f(t)/f(i),l.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=s.getExtent.call(this);t[0]=p(e,t[0]),t[1]=p(e,t[1]);var i=this._originalScale,r=i.getExtent();return i.__fixMin&&(t[0]=g(t[0],r[0])),i.__fixMax&&(t[1]=g(t[1],r[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=f(e[0])/f(t),e[1]=f(e[1])/f(t),s.unionExtent.call(this,e)},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},niceTicks:function(e){e=e||10;var t=this._extent,i=t[1]-t[0];if(!(i===1/0||i<=0)){var r=a.quantity(i);for(e/i*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var n=[a.round(h(t[0]/r)*r),a.round(d(t[1]/r)*r)];this._interval=r,this._niceExtent=n}},niceExtent:function(e){l.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function g(e,t){return u(e,c(t))}r.each(["contain","normalize"],(function(e){m.prototype[e]=function(t){return t=f(t)/f(this.base),s[e].call(this,t)}})),m.create=function(){return new m};var y=m;e.exports=y},function(e,t,i){var r=i(0),n=i(180);function a(e,t,i){for(var r=[],n=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),n=s+=n,a=l+=a,r.push([s/i,l/i])}return r}e.exports=function(e,t){return function(e){if(!e.UTF8Encoding)return e;var t=e.UTF8Scale;null==t&&(t=1024);for(var i=e.features,r=0;r<i.length;r++)for(var n=i[r].geometry,o=n.coordinates,s=n.encodeOffsets,l=0;l<o.length;l++){var c=o[l];if("Polygon"===n.type)o[l]=a(c,s[l],t);else if("MultiPolygon"===n.type)for(var u=0;u<c.length;u++){var d=c[u];c[u]=a(d,s[l][u],t)}}e.UTF8Encoding=!1}(e),r.map(r.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var i=e.properties,a=e.geometry,o=a.coordinates,s=[];"Polygon"===a.type&&s.push({type:"polygon",exterior:o[0],interiors:o.slice(1)}),"MultiPolygon"===a.type&&r.each(o,(function(e){e[0]&&s.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var l=new n(i[t||"name"],s,i.cp);return l.properties=i,l}))}},function(e,t,i){var r=i(9),n=i(62),a=i(8),o=i(181);function s(e,t,i){if(this.name=e,this.geometries=t,i)i=[i[0],i[1]];else{var r=this.getBoundingRect();i=[r.x+r.width/2,r.y+r.height/2]}this.center=i}s.prototype={constructor:s,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,i=[t,t],o=[-t,-t],s=[],l=[],c=this.geometries,u=0;u<c.length;u++)if("polygon"===c[u].type){var d=c[u].exterior;n.fromPoints(d,s,l),a.min(i,i,s),a.max(o,o,l)}return 0===u&&(i[0]=i[1]=o[0]=o[1]=0),this._rect=new r(i[0],i[1],o[0]-i[0],o[1]-i[1])},contain:function(e){var t=this.getBoundingRect(),i=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var r=0,n=i.length;r<n;r++)if("polygon"===i[r].type){var a=i[r].exterior,s=i[r].interiors;if(o.contain(a,e[0],e[1])){for(var l=0;l<(s?s.length:0);l++)if(o.contain(s[l]))continue e;return!0}}return!1},transformTo:function(e,t,i,n){var o=this.getBoundingRect(),s=o.width/o.height;i?n||(n=i/s):i=s*n;for(var l=new r(e,t,i,n),c=o.calculateTransform(l),u=this.geometries,d=0;d<u.length;d++)if("polygon"===u[d].type){for(var h=u[d].exterior,p=u[d].interiors,f=0;f<h.length;f++)a.applyTransform(h[f],h[f],c);for(var m=0;m<(p?p.length:0);m++)for(f=0;f<p[m].length;f++)a.applyTransform(p[m][f],p[m][f],c)}(o=this._rect).copy(l),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(e){null==e&&(e=this.name);var t=new s(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var l=s;e.exports=l},function(e,t,i){var r=i(162);function n(e,t){return Math.abs(e-t)<1e-8}t.contain=function(e,t,i){var a=0,o=e[0];if(!o)return!1;for(var s=1;s<e.length;s++){var l=e[s];a+=r(o[0],o[1],l[0],l[1],t,i),o=l}var c=e[0];return n(o[0],c[0])&&n(o[1],c[1])||(a+=r(o[0],o[1],c[0],c[1],t,i)),0!==a}},function(e,t,i){var r=i(26).isDimensionStacked,n=i(0).map;t.prepareDataCoordInfo=function(e,t,i){var a,o=e.getBaseAxis(),s=e.getOtherAxis(o),l=function(e,t){var i=0,r=e.scale.getExtent();"start"===t?i=r[0]:"end"===t?i=r[1]:r[0]>0?i=r[0]:r[1]<0&&(i=r[1]);return i}(s,i),c=o.dim,u=s.dim,d=t.mapDimension(u),h=t.mapDimension(c),p="x"===u||"radius"===u?1:0,f=n(e.dimensions,(function(e){return t.mapDimension(e)})),m=t.getCalculationInfo("stackResultDimension");return(a|=r(t,f[0]))&&(f[0]=m),(a|=r(t,f[1]))&&(f[1]=m),{dataDimsForPoint:f,valueStart:l,valueAxisDim:u,baseAxisDim:c,stacked:!!a,valueDim:d,baseDim:h,baseDataOffset:p,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}},t.getStackedOnPoint=function(e,t,i,r){var n=NaN;e.stacked&&(n=i.get(i.getCalculationInfo("stackedOverDimension"),r)),isNaN(n)&&(n=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=i.get(e.baseDim,r),o[1-a]=n,t.dataToPoint(o)}},function(e,t,i){var r=i(10),n=i(8),a=i(164),o=n.min,s=n.max,l=n.scaleAndAdd,c=n.copy,u=[],d=[],h=[];function p(e){return isNaN(e[0])||isNaN(e[1])}function f(e,t,i,r,n,a,o,s,l,c,u){return"none"!==c&&c?m.apply(this,arguments):g.apply(this,arguments)}function m(e,t,i,r,n,a,o,s,l,u,f){for(var m=0,g=i,y=0;y<r;y++){var _=t[g];if(g>=n||g<0)break;if(p(_)){if(f){g+=a;continue}break}if(g===i)e[a>0?"moveTo":"lineTo"](_[0],_[1]);else if(l>0){var v=t[m],C="y"===u?1:0,x=(_[C]-v[C])*l;c(d,v),d[C]=v[C]+x,c(h,_),h[C]=_[C]-x,e.bezierCurveTo(d[0],d[1],h[0],h[1],_[0],_[1])}else e.lineTo(_[0],_[1]);m=g,g+=a}return y}function g(e,t,i,r,a,f,m,g,y,_,v){for(var C=0,x=i,b=0;b<r;b++){var S=t[x];if(x>=a||x<0)break;if(p(S)){if(v){x+=f;continue}break}if(x===i)e[f>0?"moveTo":"lineTo"](S[0],S[1]),c(d,S);else if(y>0){var T=x+f,E=t[T];if(v)for(;E&&p(t[T]);)E=t[T+=f];var w=.5,A=t[C];if(!(E=t[T])||p(E))c(h,S);else{var P,D;if(p(E)&&!v&&(E=S),n.sub(u,E,A),"x"===_||"y"===_){var M="x"===_?0:1;P=Math.abs(S[M]-A[M]),D=Math.abs(S[M]-E[M])}else P=n.dist(S,A),D=n.dist(S,E);l(h,S,u,-y*(1-(w=D/(D+P))))}o(d,d,g),s(d,d,m),o(h,h,g),s(h,h,m),e.bezierCurveTo(d[0],d[1],h[0],h[1],S[0],S[1]),l(d,S,u,y*w)}else e.lineTo(S[0],S[1]);C=x,x+=f}return b}function y(e,t){var i=[1/0,1/0],r=[-1/0,-1/0];if(t)for(var n=0;n<e.length;n++){var a=e[n];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])}return{min:t?i:r,max:t?r:i}}var _=r.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:a(r.prototype.brush),buildPath:function(e,t){var i=t.points,r=0,n=i.length,a=y(i,t.smoothConstraint);if(t.connectNulls){for(;n>0&&p(i[n-1]);n--);for(;r<n&&p(i[r]);r++);}for(;r<n;)r+=f(e,i,r,n,n,1,a.min,a.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),v=r.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:a(r.prototype.brush),buildPath:function(e,t){var i=t.points,r=t.stackedOnPoints,n=0,a=i.length,o=t.smoothMonotone,s=y(i,t.smoothConstraint),l=y(r,t.smoothConstraint);if(t.connectNulls){for(;a>0&&p(i[a-1]);a--);for(;n<a&&p(i[n]);n++);}for(;n<a;){var c=f(e,i,n,a,a,1,s.min,s.max,t.smooth,o,t.connectNulls);f(e,r,n+c-1,c,a,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),n+=c+1,e.closePath()}}});t.Polyline=_,t.Polygon=v},function(e,t,i){var r=i(0),n=i(13),a=i(88),o=i(53),s=n.extend({type:"cartesian2dAxis",axis:null,init:function(){s.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){s.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){s.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function l(e,t){return t.type||(t.data?"category":"value")}r.merge(s.prototype,o);var c={offset:0};a("x",s,l,c),a("y",s,l,c);var u=s;e.exports=u},function(e,t,i){var r=i(0),n={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},a={};a.categoryAxis=r.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},n),a.valueAxis=r.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},n),a.timeAxis=r.defaults({scale:!0,min:"dataMin",max:"dataMax"},a.valueAxis),a.logAxis=r.defaults({scale:!0,logBase:10},a.valueAxis);var o=a;e.exports=o},function(e,t,i){var r=i(0);t.layout=function(e,t,i){i=i||{};var n=e.coordinateSystem,a=t.axis,o={},s=a.getAxesOnZeroOf()[0],l=a.position,c=s?"onZero":l,u=a.dim,d=n.getRect(),h=[d.x,d.x+d.width,d.y,d.y+d.height],p={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,m="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(s){var g=s.toGlobalCoord(s.dataToCoord(0));m[p.onZero]=Math.max(Math.min(g,m[1]),m[0])}o.position=["y"===u?m[p[c]]:h[0],"x"===u?m[p[c]]:h[3]],o.rotation=Math.PI/2*("x"===u?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],o.labelOffset=s?m[p[l]]-m[p.onZero]:0,t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),r.retrieve(i.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var y=t.get("axisLabel.rotate");return o.labelRotate="top"===c?-y:y,o.z2=1,o}},function(e,t,i){var r=i(0),n=i(2);t.rectCoordAxisBuildSplitArea=function(e,t,i,a){var o=i.axis;if(!o.scale.isBlank()){var s=i.getModel("splitArea"),l=s.getModel("areaStyle"),c=l.get("color"),u=a.coordinateSystem.getRect(),d=o.getTicksCoords({tickModel:s,clamp:!0});if(d.length){var h=c.length,p=e.__splitAreaColors,f=r.createHashMap(),m=0;if(p)for(var g=0;g<d.length;g++){var y=p.get(d[g].tickValue);if(null!=y){m=(y+(h-1)*g)%h;break}}var _=o.toGlobalCoord(d[0].coord),v=l.getAreaStyle();c=r.isArray(c)?c:[c];for(g=1;g<d.length;g++){var C,x,b,S,T=o.toGlobalCoord(d[g].coord);o.isHorizontal()?(C=_,x=u.y,b=T-C,S=u.height,_=C+b):(C=u.x,x=_,b=u.width,_=x+(S=T-x));var E=d[g-1].tickValue;null!=E&&f.set(E,m),t.add(new n.Rect({anid:null!=E?"area_"+E:null,shape:{x:C,y:x,width:b,height:S},style:r.defaults({fill:c[m]},v),silent:!0})),m=(m+1)%h}e.__splitAreaColors=f}}},t.rectCoordAxisHandleRemove=function(e){e.__splitAreaColors=null}},function(e,t,i){var r=i(14),n=i(30),a=r.extend({type:"series.__base_bar__",getInitialData:function(e,t){return n(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var i=t.dataToPoint(t.clampData(e)),r=this.getData(),n=r.getLayout("offset"),a=r.getLayout("size");return i[t.getBaseAxis().isHorizontal()?0:1]+=n+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});e.exports=a},function(e,t,i){var r=i(2),n=i(110).getDefaultLabel;function a(e,t){"outside"===e.textPosition&&(e.textPosition=t)}t.setLabel=function(e,t,i,o,s,l,c){var u=i.getModel("label"),d=i.getModel("emphasis.label");r.setLabelStyle(e,t,u,d,{labelFetcher:s,labelDataIndex:l,defaultText:n(s.getData(),l),isRectText:!0,autoColor:o}),a(e),a(t)}},function(e,t,i){var r=i(1),n=i(0);e.exports=function(e,t){n.each(t,(function(t){t.update="updateView",r.registerAction(t,(function(i,r){var n={};return r.eachComponent({mainType:"series",subType:e,query:i},(function(e){e[t.method]&&e[t.method](i.name,i.dataIndex);var r=e.getData();r.each((function(t){var i=r.getName(t);n[i]=e.isSelected(i)||!1}))})),{name:i.name,selected:n,seriesId:i.seriesId}}))}))}},function(e,t,i){var r=i(0),n=i(73),a=i(113),o=i(92).onIrrelevantElement,s=i(2),l=i(91),c=i(63).getUID,u=i(78);function d(e){var t=e.getItemStyle(),i=e.get("areaColor");return null!=i&&(t.fill=i),t}function h(e,t){t.eachChild((function(t){r.each(t.__regions,(function(i){t.trigger(e.isSelected(i.name)?"emphasis":"normal")}))}))}function p(e,t){var i=new s.Group;this.uid=c("ec_map_draw"),this._controller=new n(e.getZr()),this._controllerHost={target:t?i:null},this.group=i,this._updateGroup=t,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new s.Group),i.add(this._backgroundGroup=new s.Group)}p.prototype={constructor:p,draw:function(e,t,i,n,a){var o="geo"===e.mainType,l=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},(function(t){l||t.getHostGeoModel()!==e||(l=t.getData())}));var c=e.coordinateSystem;this._updateBackground(c);var p,f=this._regionsGroup,m=this.group,g=c.getTransformInfo(),y=!f.childAt(0)||a;if(y)m.transform=g.roamTransform,m.decomposeTransform(),m.dirty();else{var _=new u;_.transform=g.roamTransform,_.decomposeTransform();var v={scale:_.scale,position:_.position};p=_.scale,s.updateProps(m,v,e)}var C=g.rawScale,x=g.rawPosition;f.removeAll();var b=["itemStyle"],S=["emphasis","itemStyle"],T=["label"],E=["emphasis","label"],w=r.createHashMap();r.each(c.regions,(function(t){var i=w.get(t.name)||w.set(t.name,new s.Group),n=new s.CompoundPath({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var a,c=(B=e.getRegionModel(t.name)||e).getModel(b),u=B.getModel(S),h=d(c),g=d(u),_=B.getModel(T),v=B.getModel(E);if(l){a=l.indexOfName(t.name);var A=l.getItemVisual(a,"color",!0);A&&(h.fill=A)}var P=function(e){return[e[0]*C[0]+x[0],e[1]*C[1]+x[1]]};r.each(t.geometries,(function(e){if("polygon"===e.type){for(var t=[],i=0;i<e.exterior.length;++i)t.push(P(e.exterior[i]));n.shape.paths.push(new s.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}));for(i=0;i<(e.interiors?e.interiors.length:0);++i){for(var r=e.interiors[i],a=(t=[],0);a<r.length;++a)t.push(P(r[a]));n.shape.paths.push(new s.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}))}}})),n.setStyle(h),n.style.strokeNoScale=!0,n.culling=!0;var D=_.get("show"),M=v.get("show"),I=l&&isNaN(l.get(l.mapDimension("value"),a)),R=l&&l.getItemLayout(a);if(o||I&&(D||M)||R&&R.showLabel){var O,L=o?t.name:a;(!l||a>=0)&&(O=e);var N=new s.Text({position:P(t.center.slice()),scale:[1/m.scale[0],1/m.scale[1]],z2:10,silent:!0});if(s.setLabelStyle(N.style,N.hoverStyle={},_,v,{labelFetcher:O,labelDataIndex:L,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!y){var F=[1/p[0],1/p[1]];s.updateProps(N,{scale:F},e)}i.add(N)}if(l)l.setItemGraphicEl(a,i);else{var B=e.getRegionModel(t.name);n.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:t.name,region:B&&B.option||{}}}(i.__regions||(i.__regions=[])).push(t),i.highDownSilentOnTouch=!!e.get("selectedMode"),s.setHoverStyle(i,g),f.add(i)})),this._updateController(e,t,i),function(e,t,i,n,a){i.off("click"),i.off("mousedown"),t.get("selectedMode")&&(i.on("mousedown",(function(){e._mouseDownFlag=!0})),i.on("click",(function(o){if(e._mouseDownFlag){e._mouseDownFlag=!1;for(var s=o.target;!s.__regions;)s=s.parent;if(s){var l={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",batch:r.map(s.__regions,(function(e){return{name:e.name,from:a.uid}}))};l[t.mainType+"Id"]=t.id,n.dispatchAction(l),h(t,i)}}})))}(this,e,f,i,n),h(e,f)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&l.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var t=e.map;this._mapName!==t&&r.each(l.makeGraphic(t,this.uid),(function(e){this._backgroundGroup.add(e)}),this),this._mapName=t},_updateController:function(e,t,i){var n=e.coordinateSystem,s=this._controller,l=this._controllerHost;l.zoomLimit=e.get("scaleLimit"),l.zoom=n.getZoom(),s.enable(e.get("roam")||!1);var c=e.mainType;function u(){var t={type:"geoRoam",componentType:c};return t[c+"Id"]=e.id,t}s.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,a.updateViewOnPan(l,e.dx,e.dy),i.dispatchAction(r.extend(u(),{dx:e.dx,dy:e.dy}))}),this),s.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,a.updateViewOnZoom(l,e.scale,e.originX,e.originY),i.dispatchAction(r.extend(u(),{zoom:e.scale,originX:e.originX,originY:e.originY})),this._updateGroup){var t=this.group.scale;this._regionsGroup.traverse((function(e){"text"===e.type&&e.attr("scale",[1/t[0],1/t[1]])}))}}),this),s.setPointerChecker((function(t,r,a){return n.getViewRectAfterRoam().contain(r,a)&&!o(t,i,e)}))}};var f=p;e.exports=f},function(e,t,i){var r=i(1),n="\0_ec_interaction_mutex";function a(e){return e[n]||(e[n]={})}r.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),t.take=function(e,t,i){a(e)[t]=i},t.release=function(e,t,i){var r=a(e);r[t]===i&&(r[t]=null)},t.isTaken=function(e,t){return!!a(e)[t]}},function(e,t,i){var r=i(1),n=i(0),a=i(114).updateCenterAndZoom;r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},(function(t){var r=t.coordinateSystem;if("geo"===r.type){var o=a(r,e,t.get("scaleLimit"));t.setCenter&&t.setCenter(o.center),t.setZoom&&t.setZoom(o.zoom),"series"===i&&n.each(t.seriesGroup,(function(e){e.setCenter(o.center),e.setZoom(o.zoom)}))}}))}))},function(e,t,i){var r=i(0),n=r.each,a="\0__link_datas",o="\0__link_mainData";function s(e,t){if((n=this)[o]===n){var i=r.extend({},this[a]);i[this.dataType]=t,d(t,i,e)}else h(t,this.dataType,this[o],e);var n;return t}function l(e,t){return e.struct&&e.struct.update(this),t}function c(e,t){return n(t[a],(function(i,r){i!==t&&h(i.cloneShallow(),r,t,e)})),t}function u(e){var t=this[o];return null==e||null==t?t:t[a][e]}function d(e,t,i){e[a]={},n(t,(function(t,r){h(t,r,e,i)}))}function h(e,t,i,r){i[a][t]=e,e[o]=i,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=u}var p=function(e){var t=e.mainData,i=e.datas;i||(i={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,d(t,i,e),n(i,(function(i){n(t.TRANSFERABLE_METHODS,(function(t){i.wrapMethod(t,r.curry(s,e))}))})),t.wrapMethod("cloneShallow",r.curry(c,e)),n(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,r.curry(l,e))})),r.assert(i[t.dataType]===t)};e.exports=p},function(e,t,i){var r=i(6);function n(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function a(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function o(e,t,i){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:i}function s(e,t,i){var r=i/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=i,t.hierNode.modifier+=i,t.hierNode.prelim+=i,e.hierNode.change+=r}function l(e,t){return e.parentNode===t.parentNode?1:2}t.init=function(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t,i,r=[e];t=r.pop();)if(i=t.children,t.isExpand&&i.length)for(var n=i.length-1;n>=0;n--){var a=i[n];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null},r.push(a)}},t.firstWalk=function(e,t){var i=e.isExpand?e.children:[],r=e.parentNode.children,l=e.hierNode.i?r[e.hierNode.i-1]:null;if(i.length){!function(e){var t=e.children,i=t.length,r=0,n=0;for(;--i>=0;){var a=t[i];a.hierNode.prelim+=r,a.hierNode.modifier+=r,n+=a.hierNode.change,r+=a.hierNode.shift+n}}(e);var c=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;l?(e.hierNode.prelim=l.hierNode.prelim+t(e,l),e.hierNode.modifier=e.hierNode.prelim-c):e.hierNode.prelim=c}else l&&(e.hierNode.prelim=l.hierNode.prelim+t(e,l));e.parentNode.hierNode.defaultAncestor=function(e,t,i,r){if(t){for(var l=e,c=e,u=c.parentNode.children[0],d=t,h=l.hierNode.modifier,p=c.hierNode.modifier,f=u.hierNode.modifier,m=d.hierNode.modifier;d=n(d),c=a(c),d&&c;){l=n(l),u=a(u),l.hierNode.ancestor=e;var g=d.hierNode.prelim+m-c.hierNode.prelim-p+r(d,c);g>0&&(s(o(d,e,i),e,g),p+=g,h+=g),m+=d.hierNode.modifier,p+=c.hierNode.modifier,h+=l.hierNode.modifier,f+=u.hierNode.modifier}d&&!n(l)&&(l.hierNode.thread=d,l.hierNode.modifier+=m-h),c&&!a(u)&&(u.hierNode.thread=c,u.hierNode.modifier+=p-f,i=e)}return i}(e,l,e.parentNode.hierNode.defaultAncestor||r[0],t)},t.secondWalk=function(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier},t.separation=function(e){return arguments.length?e:l},t.radialCoordinate=function(e,t){var i={};return e-=Math.PI/2,i.x=t*Math.cos(e),i.y=t*Math.sin(e),i},t.getViewRect=function(e,t){return r.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}},function(e,t,i){var r=i(0),n=i(18),a=i(387),o=i(194),s=i(52),l=i(20),c=i(30);e.exports=function(e,t,i,u,d){for(var h=new a(u),p=0;p<e.length;p++)h.addNode(r.retrieve(e[p].id,e[p].name,p),p);var f=[],m=[],g=0;for(p=0;p<t.length;p++){var y=t[p],_=y.source,v=y.target;h.addEdge(_,v,g)&&(m.push(y),f.push(r.retrieve(y.id,_+" > "+v)),g++)}var C,x=i.get("coordinateSystem");if("cartesian2d"===x||"polar"===x)C=c(e,i);else{var b=l.get(x),S=b&&"view"!==b.type&&b.dimensions||[];r.indexOf(S,"value")<0&&S.concat(["value"]);var T=s(e,{coordDimensions:S});(C=new n(T,i)).initData(e)}var E=new n(["value"],i);return E.initData(m,f),d&&d(C,E),o({mainData:C,struct:h,structAttr:"graph",datas:{node:C,edge:E},datasAttr:{node:"data",edge:"edgeData"}}),h.update(),h}},function(e,t,i){var r=i(1);r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}))},function(e,t,i){var r=i(8),n=i(0),a=i(93).getCurvenessForEdge;function o(e,t){e.eachEdge((function(e,i){var o=n.retrieve3(e.getModel().get("lineStyle.curveness"),-a(e,t,i,!0),0),s=r.clone(e.node1.getLayout()),l=r.clone(e.node2.getLayout()),c=[s,l];+o&&c.push([(s[0]+l[0])/2-(s[1]-l[1])*o,(s[1]+l[1])/2-(l[0]-s[0])*o]),e.setLayout(c)}))}t.simpleLayout=function(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var i=e.getGraph();i.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),o(i,e)}},t.simpleLayoutEdge=o},function(e,t,i){var r=i(8),n=i(120),a=n.getSymbolSize,o=n.getNodeGlobalScale,s=i(0),l=i(93).getCurvenessForEdge,c=Math.PI,u=[];var d={value:function(e,t,i,r,n,a,o,s){var l=0,c=r.getSum("value"),u=2*Math.PI/(c||s);i.eachNode((function(e){var t=e.getValue("value"),i=u*(c?t:1)/2;l+=i,e.setLayout([n*Math.cos(l)+a,n*Math.sin(l)+o]),l+=i}))},symbolSize:function(e,t,i,r,n,s,l,d){var h=0;u.length=d;var p=o(e);i.eachNode((function(e){var t=a(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=p;var i=Math.asin(t/2/n);isNaN(i)&&(i=c/2),u[e.dataIndex]=i,h+=2*i}));var f=(2*c-h)/d/2,m=0;i.eachNode((function(e){var t=f+u[e.dataIndex];m+=t,e.setLayout([n*Math.cos(m)+s,n*Math.sin(m)+l]),m+=t}))}};t.circularLayout=function(e,t){var i=e.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),a=e.getData(),o=a.graph,c=n.width/2+n.x,u=n.height/2+n.y,h=Math.min(n.width,n.height)/2,p=a.count();a.setLayout({cx:c,cy:u}),p&&(d[t](e,i,o,a,h,c,u,p),o.eachEdge((function(t,i){var n,a=s.retrieve3(t.getModel().get("lineStyle.curveness"),l(t,e,i),0),o=r.clone(t.node1.getLayout()),d=r.clone(t.node2.getLayout()),h=(o[0]+d[0])/2,p=(o[1]+d[1])/2;+a&&(n=[c*(a*=3)+h*(1-a),u*a+p*(1-a)]),t.setLayout([o,d,n])})))}}},function(e,t,i){var r=i(1),n=i(0),a=i(33),o=i(409);i(201),i(412),i(414);r.extendComponentView({type:"parallel",render:function(e,t,i){this._model=e,this._api=i,this._handlers||(this._handlers={},n.each(s,(function(e,t){i.getZr().on(t,this._handlers[t]=n.bind(e,this))}),this)),a.createOrUpdate(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},dispose:function(e,t){n.each(this._handlers,(function(e,i){t.getZr().off(i,e)})),this._handlers=null},_throttledDispatchExpand:function(e){this._dispatchExpand(e)},_dispatchExpand:function(e){e&&this._api.dispatchAction(n.extend({type:"parallelAxisExpand"},e))}});var s={mousedown:function(e){l(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(l(this,"click")&&t){var i=[e.offsetX,e.offsetY];if(Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2)>5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&l(this,"mousemove")){var t=this._model,i=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=i.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===r&&null})}}};function l(e,t){var i=e._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===t}r.registerPreprocessor(o)},function(e,t,i){var r=i(410);i(20).register("parallel",{create:function(e,t){var i=[];return e.eachComponent("parallel",(function(n,a){var o=new r(n,e,t);o.name="parallel_"+a,o.resize(n,t),n.coordinateSystem=o,o.model=n,i.push(o)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=i.coordinateSystem}})),i}})},function(e,t,i){var r=i(9),n=i(92).onIrrelevantElement,a=i(2);function o(e){return r.create(e)}t.makeRectPanelClipPath=function(e){return e=o(e),function(t,i){return a.clipPointsByRect(t,e)}},t.makeLinearBrushOtherExtent=function(e,t){return e=o(e),function(i){var r=null!=t?t:i,n=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(n||0)]}},t.makeRectIsTargetByCursor=function(e,t,i){return e=o(e),function(r,a,o){return e.contain(a[0],a[1])&&!n(r,t,i)}}},function(e,t,i){var r=i(54),n=i(0),a=i(66).getDimensionTypeByAxis,o=i(29).makeSeriesEncodeForAxisCoordSys,s={_baseAxisDim:null,getInitialData:function(e,t){var i,s,l=t.getComponent("xAxis",this.get("xAxisIndex")),c=t.getComponent("yAxis",this.get("yAxisIndex")),u=l.get("type"),d=c.get("type");"category"===u?(e.layout="horizontal",i=l.getOrdinalMeta(),s=!0):"category"===d?(e.layout="vertical",i=c.getOrdinalMeta(),s=!0):e.layout=e.layout||"horizontal";var h=["x","y"],p="horizontal"===e.layout?0:1,f=this._baseAxisDim=h[p],m=h[1-p],g=[l,c],y=g[p].get("type"),_=g[1-p].get("type"),v=e.data;if(v&&s){var C=[];n.each(v,(function(e,t){var i;e.value&&n.isArray(e.value)?(i=e.value.slice(),e.value.unshift(t)):n.isArray(e)?(i=e.slice(),e.unshift(t)):i=e,C.push(i)})),e.data=C}var x=this.defaultValueDimensions,b=[{name:f,type:a(y),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:m,type:a(_),dimsDef:x.slice()}];return r(this,{coordDimensions:b,dimensionsCount:x.length+1,encodeDefaulter:n.curry(o,b,this)})},getBaseAxis:function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis}};t.seriesModelMixin=s},function(e,t,i){var r=i(2),n=i(119),a=i(0),o=i(19).createSymbol,s=i(8),l=i(32);function c(e,t,i){r.Group.call(this),this.add(this.createLine(e,t,i)),this._updateEffectSymbol(e,t)}var u=c.prototype;u.createLine=function(e,t,i){return new n(e,t,i)},u._updateEffectSymbol=function(e,t){var i=e.getItemModel(t).getModel("effect"),r=i.get("symbolSize"),n=i.get("symbol");a.isArray(r)||(r=[r,r]);var s=i.get("color")||e.getItemVisual(t,"color"),l=this.childAt(1);this._symbolType!==n&&(this.remove(l),(l=o(n,-.5,-.5,1,1,s)).z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",s),l.setStyle(i.getItemStyle(["color"])),l.attr("scale",r),l.setColor(s),l.attr("scale",r),this._symbolType=n,this._symbolScale=r,this._updateEffectAnimation(e,i,t))},u._updateEffectAnimation=function(e,t,i){var r=this.childAt(1);if(r){var n=this,o=e.getItemLayout(i),s=1e3*t.get("period"),l=t.get("loop"),c=t.get("constantSpeed"),u=a.retrieve(t.get("delay"),(function(t){return t/e.count()*s/3})),d="function"==typeof u;if(r.ignore=!0,this.updateAnimationPoints(r,o),c>0&&(s=this.getLineLength(r)/c*1e3),s!==this._period||l!==this._loop){r.stopAnimation();var h=u;d&&(h=u(i)),r.__t>0&&(h=-s*r.__t),r.__t=0;var p=r.animate("",l).when(s,{__t:1}).delay(h).during((function(){n.updateSymbolPosition(r)}));l||p.done((function(){n.remove(r)})),p.start()}this._period=s,this._loop=l}},u.getLineLength=function(e){return s.dist(e.__p1,e.__cp1)+s.dist(e.__cp1,e.__p2)},u.updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},u.updateData=function(e,t,i){this.childAt(0).updateData(e,t,i),this._updateEffectSymbol(e,t)},u.updateSymbolPosition=function(e){var t=e.__p1,i=e.__p2,r=e.__cp1,n=e.__t,a=e.position,o=[a[0],a[1]],c=l.quadraticAt,u=l.quadraticDerivativeAt;a[0]=c(t[0],r[0],i[0],n),a[1]=c(t[1],r[1],i[1],n);var d=u(t[0],r[0],i[0],n),h=u(t[1],r[1],i[1],n);if(e.rotation=-Math.atan2(h,d)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==e.__lastT&&e.__lastT<e.__t){var p=1.05*s.dist(o,a);e.attr("scale",[e.scale[0],p]),1===n&&(a[0]=o[0]+(a[0]-o[0])/2,a[1]=o[1]+(a[1]-o[1])/2)}else if(1===e.__lastT){p=2*s.dist(t,a);e.attr("scale",[e.scale[0],p])}else e.attr("scale",this._symbolScale);e.__lastT=e.__t,e.ignore=!1},u.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var i=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,i,t)},a.inherits(c,r.Group);var d=c;e.exports=d},function(e,t,i){var r=i(2),n=i(0);function a(e,t,i){r.Group.call(this),this._createPolyline(e,t,i)}var o=a.prototype;o._createPolyline=function(e,t,i){var n=e.getItemLayout(t),a=new r.Polyline({shape:{points:n}});this.add(a),this._updateCommonStl(e,t,i)},o.updateData=function(e,t,i){var n=e.hostModel,a=this.childAt(0),o={shape:{points:e.getItemLayout(t)}};r.updateProps(a,o,n,t),this._updateCommonStl(e,t,i)},o._updateCommonStl=function(e,t,i){var a=this.childAt(0),o=e.getItemModel(t),s=e.getItemVisual(t,"color"),l=i&&i.lineStyle,c=i&&i.hoverLineStyle;i&&!e.hasItemOption||(l=o.getModel("lineStyle").getLineStyle(),c=o.getModel("emphasis.lineStyle").getLineStyle()),a.useStyle(n.defaults({strokeNoScale:!0,fill:"none",stroke:s},l)),a.hoverStyle=c,r.setHoverStyle(this)},o.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},n.inherits(a,r.Group);var s=a;e.exports=s},function(e,t,i){var r={seriesType:"lines",plan:i(51)(),reset:function(e){var t=e.coordinateSystem,i=e.get("polyline"),r=e.pipelineContext.large;return{progress:function(n,a){var o=[];if(r){var s,l=n.end-n.start;if(i){for(var c=0,u=n.start;u<n.end;u++)c+=e.getLineCoordsCount(u);s=new Float32Array(l+2*c)}else s=new Float32Array(4*l);var d=0,h=[];for(u=n.start;u<n.end;u++){var p=e.getLineCoords(u,o);i&&(s[d++]=p);for(var f=0;f<p;f++)h=t.dataToPoint(o[f],!1,h),s[d++]=h[0],s[d++]=h[1]}a.setLayout("linesPoints",s)}else for(u=n.start;u<n.end;u++){var m=a.getItemModel(u),g=(p=e.getLineCoords(u,o),[]);if(i)for(var y=0;y<p;y++)g.push(t.dataToPoint(o[y]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var _=m.get("lineStyle.curveness");+_&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*_,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*_])}a.setItemLayout(u,g)}}}}};e.exports=r},function(e,t,i){var r=i(1);i(455),i(458),i(459),i(74),i(463),r.extendComponentView({type:"single"})},function(e,t,i){var r=i(0);t.layout=function(e,t){t=t||{};var i=e.coordinateSystem,n=e.axis,a={},o=n.position,s=n.orient,l=i.getRect(),c=[l.x,l.x+l.width,l.y,l.y+l.height],u={horizontal:{top:c[2],bottom:c[3]},vertical:{left:c[0],right:c[1]}};a.position=["vertical"===s?u.vertical[o]:c[0],"horizontal"===s?u.horizontal[o]:c[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[s],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),r.retrieve(t.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var d=t.rotate;return null==d&&(d=e.get("axisLabel.rotate")),a.labelRotation="top"===o?-d:d,a.z2=1,a}},function(e,t,i){var r=i(0),n=i(4);e.exports=function(e,t){var i,a=[],o=e.seriesIndex;if(null==o||!(i=t.getSeriesByIndex(o)))return{point:[]};var s=i.getData(),l=n.queryDataIndex(s,e);if(null==l||l<0||r.isArray(l))return{point:[]};var c=s.getItemGraphicEl(l),u=i.coordinateSystem;if(i.getTooltipPosition)a=i.getTooltipPosition(l)||[];else if(u&&u.dataToPoint)a=u.dataToPoint(s.getValues(r.map(u.dimensions,(function(e){return s.mapDimension(e)})),l,!0))||[];else if(c){var d=c.getBoundingRect().clone();d.applyTransform(c.transform),a=[d.x+d.width/2,d.y+d.height/2]}return{point:a,el:c}}},function(e,t,i){var r=i(0),n=i(11),a=(0,i(4).makeInner)(),o=r.each;function s(e,t,i){e.handler("leave",null,i)}function l(e,t,i,r){t.handler(e,i,r)}t.register=function(e,t,i){if(!n.node){var c=t.getZr();a(c).records||(a(c).records={}),function(e,t){if(a(e).initialized)return;function i(i,r){e.on(i,(function(i){var n=function(e){var t={showTip:[],hideTip:[]},i=function(r){var n=t[r.type];n?n.push(r):(r.dispatchAction=i,e.dispatchAction(r))};return{dispatchAction:i,pendings:t}}(t);o(a(e).records,(function(e){e&&r(e,i,n.dispatchAction)})),function(e,t){var i,r=e.showTip.length,n=e.hideTip.length;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]);i&&(i.dispatchAction=null,t.dispatchAction(i))}(n.pendings,t)}))}a(e).initialized=!0,i("click",r.curry(l,"click")),i("mousemove",r.curry(l,"mousemove")),i("globalout",s)}(c,t),(a(c).records[e]||(a(c).records[e]={})).handler=i}},t.unregister=function(e,t){if(!n.node){var i=t.getZr();(a(i).records||{})[e]&&(a(i).records[e]=null)}}},function(e,t,i){var r=i(122),n=i(94),a=i(186),o=i(45),s=r.extend({makeElOption:function(e,t,i,r,o){var s=i.axis,u=s.grid,d=r.get("type"),h=l(u,s).getOtherAxis(s).getGlobalExtent(),p=s.toGlobalCoord(s.dataToCoord(t,!0));if(d&&"none"!==d){var f=n.buildElStyle(r),m=c[d](s,p,h);m.style=f,e.graphicKey=m.type,e.pointer=m}var g=a.layout(u.model,i);n.buildCartesianSingleLabelElOption(t,e,g,i,r,o)},getHandleTransform:function(e,t,i){var r=a.layout(t.axis.grid.model,t,{labelInside:!1});return r.labelMargin=i.get("handle.margin"),{position:n.getTransformedPosition(t.axis,e,r),rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,i,r){var n=i.axis,a=n.grid,o=n.getGlobalExtent(!0),s=l(a,n).getOtherAxis(n).getGlobalExtent(),c="x"===n.dim?0:1,u=e.position;u[c]+=t[c],u[c]=Math.min(o[1],u[c]),u[c]=Math.max(o[0],u[c]);var d=(s[1]+s[0])/2,h=[d,d];h[c]=u[c];return{position:u,rotation:e.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][c]}}});function l(e,t){var i={};return i[t.dim+"AxisIndex"]=t.index,e.getCartesian(i)}var c={line:function(e,t,i){return{type:"Line",subPixelOptimize:!0,shape:n.makeLineShape([t,i[0]],[t,i[1]],u(e))}},shadow:function(e,t,i){var r=Math.max(1,e.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:n.makeRectShape([t-r/2,i[0]],[r,a],u(e))}}};function u(e){return"x"===e.dim?0:1}o.registerAxisPointerClass("CartesianAxisPointer",s);var d=s;e.exports=d},function(e,t,i){var r=i(6),n=r.getLayoutRect,a=r.box,o=r.positionElement,s=i(7),l=i(2);t.layout=function(e,t,i){var r=t.getBoxLayoutParams(),s=t.get("padding"),l={width:i.getWidth(),height:i.getHeight()},c=n(r,l,s);a(t.get("orient"),e,t.get("itemGap"),c.width,c.height),o(e,r,l,s)},t.makeBackground=function(e,t){var i=s.normalizeCssArray(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new l.Rect({shape:{x:e.x-i[3],y:e.y-i[0],width:e.width+i[1]+i[3],height:e.height+i[0]+i[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(2),a=i(4),o=i(202),s=r.each,l=r.indexOf,c=r.curry,u=["dataToPoint","pointToData"],d=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function h(e,t,i){var r=this._targetInfoList=[],n={},a=m(t,e);s(g,(function(e,t){(!i||!i.include||l(i.include,t)>=0)&&e(a,r,n)}))}var p=h.prototype;function f(e){return e[0]>e[1]&&e.reverse(),e}function m(e,t){return a.parseFinder(e,t,{includeMainTypes:d})}p.setOutputRanges=function(e,t){this.matchOutputRanges(e,t,(function(e,t,i){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=v[e.brushType](0,i,t);e.__rangeOffset={offset:x[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}))},p.matchOutputRanges=function(e,t,i){s(e,(function(e){var n=this.findTargetInfo(e,t);n&&!0!==n&&r.each(n.coordSyses,(function(r){var n=v[e.brushType](1,r,e.range);i(e,n.values,r,t)}))}),this)},p.setInputRanges=function(e,t){s(e,(function(e){var i,r,n,a,o,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=v[e.brushType](0,s.coordSys,e.coordRange),c=e.__rangeOffset;e.range=c?x[e.brushType](l.values,c.offset,(i=l.xyMinMax,r=c.xyMinMax,n=S(i),a=S(r),o=[n[0]/a[0],n[1]/a[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},p.makePanelOpts=function(e,t){return r.map(this._targetInfoList,(function(i){var r=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t&&t(i),clipPath:o.makeRectPanelClipPath(r),isTargetByCursor:o.makeRectIsTargetByCursor(r,e,i.coordSysModel),getLinearBrushOtherExtent:o.makeLinearBrushOtherExtent(r)}}))},p.controlSeries=function(e,t,i){var r=this.findTargetInfo(e,i);return!0===r||r&&l(r.coordSyses,t.coordinateSystem)>=0},p.findTargetInfo=function(e,t){for(var i=this._targetInfoList,r=m(t,e),n=0;n<i.length;n++){var a=i[n],o=e.panelId;if(o){if(a.panelId===o)return a}else for(n=0;n<y.length;n++)if(y[n](r,a))return a}return!0};var g={grid:function(e,t){var i=e.xAxisModels,n=e.yAxisModels,a=e.gridModels,o=r.createHashMap(),c={},u={};(i||n||a)&&(s(i,(function(e){var t=e.axis.grid.model;o.set(t.id,t),c[t.id]=!0})),s(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),u[t.id]=!0})),s(a,(function(e){o.set(e.id,e),c[e.id]=!0,u[e.id]=!0})),o.each((function(e){var r=e.coordinateSystem,a=[];s(r.getCartesians(),(function(e,t){(l(i,e.getAxis("x").model)>=0||l(n,e.getAxis("y").model)>=0)&&a.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:_.grid,xAxisDeclared:c[e.id],yAxisDeclared:u[e.id]})})))},geo:function(e,t){s(e.geoModels,(function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:_.geo})}))}},y=[function(e,t){var i=e.xAxisModel,r=e.yAxisModel,n=e.gridModel;return!n&&i&&(n=i.axis.grid.model),!n&&r&&(n=r.axis.grid.model),n&&n===t.gridModel},function(e,t){var i=e.geoModel;return i&&i===t.geoModel}],_={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(n.getTransform(e)),t}},v={lineX:c(C,0),lineY:c(C,1),rect:function(e,t,i){var r=t[u[e]]([i[0][0],i[1][0]]),n=t[u[e]]([i[0][1],i[1][1]]),a=[f([r[0],n[0]]),f([r[1],n[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:r.map(i,(function(i){var r=t[u[e]](i);return n[0][0]=Math.min(n[0][0],r[0]),n[1][0]=Math.min(n[1][0],r[1]),n[0][1]=Math.max(n[0][1],r[0]),n[1][1]=Math.max(n[1][1],r[1]),r})),xyMinMax:n}}};function C(e,t,i,n){var a=i.getAxis(["x","y"][e]),o=f(r.map([0,1],(function(e){return t?a.coordToData(a.toLocalCoord(n[e])):a.toGlobalCoord(a.dataToCoord(n[e]))}))),s=[];return s[e]=o,s[1-e]=[NaN,NaN],{values:o,xyMinMax:s}}var x={lineX:c(b,0),lineY:c(b,1),rect:function(e,t,i){return[[e[0][0]-i[0]*t[0][0],e[0][1]-i[0]*t[0][1]],[e[1][0]-i[1]*t[1][0],e[1][1]-i[1]*t[1][1]]]},polygon:function(e,t,i){return r.map(e,(function(e,r){return[e[0]-i[0]*t[r][0],e[1]-i[1]*t[r][1]]}))}};function b(e,t,i,r){return[t[0]-r[e]*i[0],t[1]-r[e]*i[1]]}function S(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var T=h;e.exports=T},function(e,t,i){var r=i(0).each,n="\0_ec_hist_store";function a(e){var t=e[n];return t||(t=e[n]=[{}]),t}t.push=function(e,t){var i=a(e);r(t,(function(t,r){for(var n=i.length-1;n>=0;n--){if(i[n][r])break}if(n<0){var a=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(a){var o=a.getPercentRange();i[0][r]={dataZoomId:r,start:o[0],end:o[1]}}}})),i.push(t)},t.pop=function(e){var t=a(e),i=t[t.length-1];t.length>1&&t.pop();var n={};return r(i,(function(e,i){for(var r=t.length-1;r>=0;r--){if(e=t[r][i]){n[i]=e;break}}})),n},t.clear=function(e){e[n]=null},t.count=function(e){return a(e).length}},function(e,t,i){var r=i(1),n=i(0),a=i(9),o=i(95),s=i(520),l=i(33),c=i(213),u=["inBrush","outOfBrush"],d=r.PRIORITY.VISUAL.BRUSH;function h(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new c(t.option,e)).setInputRanges(t.areas,e)}))}function p(e,t){if(!e.isDisposed()){var i=e.getZr();i.__ecInBrushSelectEvent=!0,e.dispatchAction({type:"brushSelect",batch:t}),i.__ecInBrushSelectEvent=!1}}function f(e,t,i,r){for(var n=0,a=t.length;n<a;n++){var o=t[n];if(e[o.brushType](r,i,o.selectors,o))return!0}}function m(e){var t=e.brushSelector;if(n.isString(t)){var i=[];return n.each(s,(function(e,r){i[r]=function(i,r,n,a){var o=r.getItemLayout(i);return e[t](o,n,a)}})),i}if(n.isFunction(t)){var r={};return n.each(s,(function(e,i){r[i]=t})),r}return t}r.registerLayout(d,(function(e,t,i){e.eachComponent({mainType:"brush"},(function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})})),h(e)})),r.registerVisual(d,(function(e,t,i){var r,a,c=[];e.eachComponent({mainType:"brush"},(function(t,i){var l={brushId:t.id,brushIndex:i,brushName:t.name,areas:n.clone(t.areas),selected:[]};c.push(l);var d=t.option,h=d.brushLink,p=[],y=[],_=[],v=0;i||(r=d.throttleType,a=d.throttleDelay);var C=n.map(t.areas,(function(e){return function(e){var t=e.selectors={};return n.each(s[e.brushType],(function(i,r){t[r]=function(r){return i(r,t,e)}})),e}(n.defaults({boundingRect:g[e.brushType](e)},e))})),x=o.createVisualMappings(t.option,u,(function(e){e.mappingMethod="fixed"}));function b(e){return"all"===h||p[e]}function S(e){return!!e.length}n.isArray(h)&&n.each(h,(function(e){p[e]=1})),e.eachSeries((function(i,r){var a=_[r]=[];"parallel"===i.subType?function(e,t){var i=e.coordinateSystem;v|=i.hasAxisBrushed(),b(t)&&i.eachActiveState(e.getData(),(function(e,t){"active"===e&&(y[t]=1)}))}(i,r):function(i,r,a){var o=m(i);if(!o||function(e,t){var i=e.option.seriesIndex;return null!=i&&"all"!==i&&(n.isArray(i)?n.indexOf(i,t)<0:t!==i)}(t,r))return;if(n.each(C,(function(r){o[r.brushType]&&t.brushTargetManager.controlSeries(r,i,e)&&a.push(r),v|=S(a)})),b(r)&&S(a)){var s=i.getData();s.each((function(e){f(o,a,s,e)&&(y[e]=1)}))}}(i,r,a)})),e.eachSeries((function(e,t){var i={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};l.selected.push(i);var r=m(e),n=_[t],a=e.getData(),s=b(t)?function(e){return y[e]?(i.dataIndex.push(a.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(e){return f(r,n,a,e)?(i.dataIndex.push(a.getRawIndex(e)),"inBrush"):"outOfBrush"};(b(t)?v:S(n))&&o.applyVisual(u,x,a,s)}))})),function(e,t,i,r,n){if(!n)return;var a=e.getZr();if(a.__ecInBrushSelectEvent)return;a.__ecBrushSelect||(a.__ecBrushSelect=p);l.createOrUpdate(a,"__ecBrushSelect",i,t)(e,r)}(t,r,a,c,i)}));var g={lineX:n.noop,lineY:n.noop,rect:function(e){return y(e.range)},polygon:function(e){for(var t,i=e.range,r=0,n=i.length;r<n;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=i[r];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&y(t)}};function y(e){return new a(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}t.layoutCovers=h},function(e,t,i){var r=i(1);i(217),i(545),i(218);var n=i(546),a=i(13);r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,n),a.registerSubTypeDefaulter("legend",(function(){return"plain"}))},function(e,t,i){var r=i(1),n=i(0),a=i(12),o=i(4).isNameSpecified,s=i(34).legend.selector,l={all:{type:"all",title:n.clone(s.all)},inverse:{type:"inverse",title:n.clone(s.inverse)}},c=r.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(e,t,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},mergeOption:function(e){c.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),n.isArray(t)&&n.each(t,(function(e,i){n.isString(e)&&(e={type:e}),t[i]=n.merge(e,l[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,i=0;i<e.length;i++){var r=e[i].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},_updateData:function(e){var t=[],i=[];e.eachRawSeries((function(r){var n,a=r.name;if(i.push(a),r.legendVisualProvider){var s=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(i=i.concat(s)),s.length?t=t.concat(s):n=!0}else n=!0;n&&o(r)&&t.push(r.name)})),this._availableNames=i;var r=this.get("data")||t,s=n.map(r,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new a(e,this,this.ecModel)}),this);this._data=s},getData:function(){return this._data},select:function(e){var t=this.option.selected;if("single"===this.get("selectedMode")){var i=this._data;n.each(i,(function(e){t[e.get("name")]=!1}))}t[e]=!0},unSelect:function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},toggleSelected:function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},allSelect:function(){var e=this._data,t=this.option.selected;n.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;n.each(e,(function(e){var i=e.get("name",!0);t.hasOwnProperty(i)||(t[i]=!0),t[i]=!t[i]}))},isSelected:function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&n.indexOf(this._availableNames,e)>=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}}),u=c;e.exports=u},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(19).createSymbol,o=i(2),s=i(212).makeBackground,l=i(6),c=n.curry,u=n.each,d=o.Group,h=r.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new d),this._backgroundEl,this.group.add(this._selectorGroup=new d),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,i){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var a=e.get("align"),o=e.get("orient");a&&"auto"!==a||(a="right"===e.get("left")&&"vertical"===o?"right":"left");var c=e.get("selector",!0),u=e.get("selectorPosition",!0);!c||u&&"auto"!==u||(u="horizontal"===o?"end":"start"),this.renderInner(a,e,t,i,c,o,u);var d=e.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},p=e.get("padding"),f=l.getLayoutRect(d,h,p),m=this.layoutInner(e,a,f,r,c,u),g=l.getLayoutRect(n.defaults({width:m.width,height:m.height},d),h,p);this.group.attr("position",[g.x-m.x,g.y-m.y]),this.group.add(this._backgroundEl=s(m,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,i,r,a,o,s){var l=this.getContentGroup(),h=n.createHashMap(),p=t.get("selectedMode"),y=[];i.eachRawSeries((function(e){!e.get("legendHoverLink")&&y.push(e.id)})),u(t.getData(),(function(n,a){var o=n.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var s=i.getSeriesByName(o)[0];if(!h.get(o))if(s){var u=s.getData(),_=u.getVisual("color"),v=u.getVisual("borderColor");"function"==typeof _&&(_=_(s.getDataParams(0))),"function"==typeof v&&(v=v(s.getDataParams(0)));var C=u.getVisual("legendSymbol")||"roundRect",x=u.getVisual("symbol");this._createItem(o,a,n,t,C,x,e,_,v,p).on("click",c(f,o,null,r,y)).on("mouseover",c(m,s.name,null,r,y)).on("mouseout",c(g,s.name,null,r,y)),h.set(o,!0)}else i.eachRawSeries((function(i){if(!h.get(o)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(o))return;var l=s.indexOfName(o),u=s.getItemVisual(l,"color"),d=s.getItemVisual(l,"borderColor");this._createItem(o,a,n,t,"roundRect",null,e,u,d,p).on("click",c(f,null,o,r,y)).on("mouseover",c(m,null,o,r,y)).on("mouseout",c(g,null,o,r,y)),h.set(o,!0)}}),this)}else l.add(new d({newline:!0}))}),this),a&&this._createSelector(a,t,r,o,s)},_createSelector:function(e,t,i,r,n){var a=this.getSelectorGroup();u(e,(function(e){!function(e){var r=e.type,n=new o.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});a.add(n);var s=t.getModel("selectorLabel"),l=t.getModel("emphasis.selectorLabel");o.setLabelStyle(n.style,n.hoverStyle={},s,l,{defaultText:e.title,isRectText:!1}),o.setHoverStyle(n)}(e)}))},_createItem:function(e,t,i,r,s,l,c,u,h,f){var m=r.get("itemWidth"),g=r.get("itemHeight"),y=r.get("inactiveColor"),_=r.get("inactiveBorderColor"),v=r.get("symbolKeepAspect"),C=r.getModel("itemStyle"),x=r.isSelected(e),b=new d,S=i.getModel("textStyle"),T=i.get("icon"),E=i.getModel("tooltip"),w=E.parentModel,A=a(s=T||s,0,0,m,g,x?u:y,null==v||v);if(b.add(p(A,s,C,h,_,x)),!T&&l&&(l!==s||"none"===l)){var P=.8*g;"none"===l&&(l="circle");var D=a(l,(m-P)/2,(g-P)/2,P,P,x?u:y,null==v||v);b.add(p(D,l,C,h,_,x))}var M="left"===c?m+5:-5,I=c,R=r.get("formatter"),O=e;"string"==typeof R&&R?O=R.replace("{name}",null!=e?e:""):"function"==typeof R&&(O=R(e)),b.add(new o.Text({style:o.setTextStyle({},S,{text:O,x:M,y:g/2,textFill:x?S.getTextColor():y,textAlign:I,textVerticalAlign:"middle"})}));var L=new o.Rect({shape:b.getBoundingRect(),invisible:!0,tooltip:E.get("show")?n.extend({content:e,formatter:w.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:r.componentIndex,name:e,$vars:["name"]}},E.option):null});return b.add(L),b.eachChild((function(e){e.silent=!0})),L.silent=!f,this.getContentGroup().add(b),o.setHoverStyle(b),b.__legendDataIndex=t,b},layoutInner:function(e,t,i,r,n,a){var o=this.getContentGroup(),s=this.getSelectorGroup();l.box(e.get("orient"),o,e.get("itemGap"),i.width,i.height);var c=o.getBoundingRect(),u=[-c.x,-c.y];if(n){l.box("horizontal",s,e.get("selectorItemGap",!0));var d=s.getBoundingRect(),h=[-d.x,-d.y],p=e.get("selectorButtonGap",!0),f=e.getOrient().index,m=0===f?"width":"height",g=0===f?"height":"width",y=0===f?"y":"x";"end"===a?h[f]+=c[m]+p:u[f]+=d[m]+p,h[1-f]+=c[g]/2-d[g]/2,s.attr("position",h),o.attr("position",u);var _={x:0,y:0};return _[m]=c[m]+p+d[m],_[g]=Math.max(c[g],d[g]),_[y]=Math.min(0,d[y]+h[1-f]),_}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function p(e,t,i,r,n,a){var o;return"line"!==t&&t.indexOf("empty")<0?(o=i.getItemStyle(),e.style.stroke=r,a||(o.stroke=n)):o=i.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function f(e,t,i,r){g(e,t,i,r),i.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),m(e,t,i,r)}function m(e,t,i,r){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function g(e,t,i,r){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}e.exports=h},function(e,t,i){i(124),i(56),i(57),i(551),i(552),i(126),i(127)},function(e,t,i){i(124),i(56),i(57),i(553),i(554),i(126),i(127)},function(e,t,i){var r=i(1),n=i(222);i(223),i(224),i(557),i(558),i(229),r.registerPreprocessor(n)},function(e,t,i){var r=i(0),n=r.each;function a(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}e.exports=function(e){var t=e&&e.visualMap;r.isArray(t)||(t=t?[t]:[]),n(t,(function(e){if(e){a(e,"splitList")&&!a(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&r.isArray(t)&&n(t,(function(e){r.isObject(e)&&(a(e,"start")&&!a(e,"min")&&(e.min=e.start),a(e,"end")&&!a(e,"max")&&(e.max=e.end))}))}}))}},function(e,t,i){i(13).registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}))},function(e,t,i){var r=i(1),n=i(0),a=i(95),o=i(47),s=r.PRIORITY.VISUAL.COMPONENT;function l(e,t,i,r){for(var n=t.targetVisuals[r],a=o.prepareVisualTypes(n),s={color:e.getData().getVisual("color")},l=0,c=a.length;l<c;l++){var u=a[l],d=n["opacity"===u?"__alphaForOpacity":u];d&&d.applyVisual(i,h,p)}return s.color;function h(e){return s[e]}function p(e,t){s[e]=t}}r.registerVisual(s,{createOnAllSeries:!0,reset:function(e,t){var i=[];return t.eachComponent("visualMap",(function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||i.push(a.incrementalApplyVisual(t.stateList,t.targetVisuals,n.bind(t.getValueState,t),t.getDataDimension(e.getData())))})),i}}),r.registerVisual(s,{createOnAllSeries:!0,reset:function(e,t){var i=e.getData(),r=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(n.bind(l,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimension(i),s=i.getDimensionInfo(o);null!=s&&(a.dimension=s.index,r.push(a))}})),e.getData().setVisual("visualMeta",r)}})},function(e,t,i){var r=i(1),n=i(0),a=i(11),o=i(226),s=i(47),l=i(95),c=i(4),u=i(3),d=s.mapVisual,h=s.eachVisual,p=n.isArray,f=n.each,m=u.asc,g=u.linearMap,y=n.noop,_=r.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(e,t,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(e,i)},optionUpdated:function(e,t){var i=this.option;a.canvasSupported||(i.realtime=!1),!t&&l.replaceVisualOption(i,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(e){var t=this.stateList;e=n.bind(e,this),this.controllerVisuals=l.createVisualMappings(this.option.controller,t,e),this.targetVisuals=l.createVisualMappings(this.option.target,t,e)},getTargetSeriesIndices:function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,i){t.push(i)})):t=c.normalizeToArray(e),t},eachTargetSeries:function(e,t){n.each(this.getTargetSeriesIndices(),(function(i){e.call(t,this.ecModel.getSeriesByIndex(i))}),this)},isTargetSeries:function(e){var t=!1;return this.eachTargetSeries((function(i){i===e&&(t=!0)})),t},formatValueText:function(e,t,i){var r,a,o=this.option,s=o.precision,l=this.dataBound,c=o.formatter;return i=i||["<",">"],n.isArray(e)&&(e=e.slice(),r=!0),a=t?e:r?[u(e[0]),u(e[1])]:u(e),n.isString(c)?c.replace("{value}",r?a[0]:a).replace("{value2}",r?a[1]:a):n.isFunction(c)?r?c(e[0],e[1]):c(e):r?e[0]===l[0]?i[0]+" "+a[1]:e[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;function u(e){return e===l[0]?"min":e===l[1]?"max":(+e).toFixed(Math.min(s,20))}},resetExtent:function(){var e=this.option,t=m([e.min,e.max]);this._dataExtent=t},getDataDimension:function(e){var t=this.option.dimension,i=e.dimensions;if(null!=t||i.length){if(null!=t)return e.getDimension(t);for(var r=e.dimensions,n=r.length-1;n>=0;n--){var a=r[n];if(!e.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var e=this.ecModel,t=this.option,i={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),a=t.controller||(t.controller={});n.merge(r,i),n.merge(a,i);var l=this.isCategory();function c(i){p(t.color)&&!i.inRange&&(i.inRange={color:t.color.slice().reverse()}),i.inRange=i.inRange||{color:e.get("gradientColor")},f(this.stateList,(function(e){var t=i[e];if(n.isString(t)){var r=o.get(t,"active",l);r?(i[e]={},i[e][t]=r):delete i[e]}}),this)}c.call(this,r),c.call(this,a),function(e,t,i){var r=e[t],n=e[i];r&&!n&&(n=e[i]={},f(r,(function(e,t){if(s.isValidType(t)){var i=o.get(t,"inactive",l);null!=i&&(n[t]=i,"color"!==t||n.hasOwnProperty("opacity")||n.hasOwnProperty("colorAlpha")||(n.opacity=[0,0]))}})))}.call(this,r,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,i=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor");f(this.stateList,(function(a){var o=this.itemSize,s=e[a];s||(s=e[a]={color:l?r:[r]}),null==s.symbol&&(s.symbol=t&&n.clone(t)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n.clone(i)||(l?o[0]:[o[0],o[0]])),s.symbol=d(s.symbol,(function(e){return"none"===e||"square"===e?"roundRect":e}));var c=s.symbolSize;if(null!=c){var u=-1/0;h(c,(function(e){e>u&&(u=e)})),s.symbolSize=d(c,(function(e){return g(e,[0,u],[0,o[0]],!0)}))}}),this)}.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:y,getValueState:y,getVisualMeta:y});e.exports=_},function(e,t,i){var r=i(0),n={get:function(e,t,i){var n=r.clone((a[e]||{})[t]);return i&&r.isArray(n)?n[n.length-1]:n}},a={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},o=n;e.exports=o},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(7),s=i(6),l=i(47),c=r.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(e,t){this.ecModel=e,this.api=t,this.visualMapModel},render:function(e,t,i,r){this.visualMapModel=e,!1!==e.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(e){var t=this.visualMapModel,i=o.normalizeCssArray(t.get("padding")||0),r=e.getBoundingRect();e.add(new a.Rect({z2:-1,silent:!0,shape:{x:r.x-i[3],y:r.y-i[0],width:r.width+i[3]+i[1],height:r.height+i[0]+i[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},getControllerVisual:function(e,t,i){var r=(i=i||{}).forceState,a=this.visualMapModel,o={};if("symbol"===t&&(o.symbol=a.get("itemSymbol")),"color"===t){var s=a.get("contentColor");o.color=s}function c(e){return o[e]}function u(e,t){o[e]=t}var d=a.controllerVisuals[r||a.getValueState(e)],h=l.prepareVisualTypes(d);return n.each(h,(function(r){var n=d[r];i.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",n=d.__alphaForOpacity),l.dependsOn(r,t)&&n&&n.applyVisual(e,c,u)})),o[t]},positionGroup:function(e){var t=this.visualMapModel,i=this.api;s.positionElement(e,t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:n.noop});e.exports=c},function(e,t,i){var r=i(0),n=i(6).getLayoutRect;t.getItemAlign=function(e,t,i){var r=e.option,a=r.align;if(null!=a&&"auto"!==a)return a;for(var o={width:t.getWidth(),height:t.getHeight()},s="horizontal"===r.orient?1:0,l=[["left","right","width"],["top","bottom","height"]],c=l[s],u=[0,null,10],d={},h=0;h<3;h++)d[l[1-s][h]]=u[h],d[c[h]]=2===h?i[0]:r[c[h]];var p=[["x","width",3],["y","height",0]][s],f=n(d,o,r.padding);return c[(f.margin[p[2]]||0)+f[p[0]]+.5*f[p[1]]<.5*o[p[1]]?0:1]},t.makeHighDownBatch=function(e,t){return r.each(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}},function(e,t,i){i(1).registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))}))},function(e,t,i){var r=i(1),n=i(222);i(223),i(224),i(559),i(560),i(229),r.registerPreprocessor(n)},function(e,t,i){var r,n=i(11),a="urn:schemas-microsoft-com:vml",o="undefined"==typeof window?null:window,s=!1,l=o&&o.document;if(l&&!n.canvasSupported)try{!l.namespaces.zrvml&&l.namespaces.add("zrvml",a),r=function(e){return l.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){r=function(e){return l.createElement("<"+e+' xmlns="'+a+'" class="zrvml">')}}t.doc=l,t.createNode=function(e){return r(e)},t.initVML=function(){if(!s&&l){s=!0;var e=l.styleSheets;e.length<31?l.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},function(e,t,i){e.exports=i(571)},function(e,t){console.clear(),console.log("%c \n DC-SDK \n  %c \n 用数字描绘世界之美  %c \n\n    版本:".concat("1.11.0","\n    编译日期:").concat("2020-11-02 09:05:01","\n    Cesium版本:1.74\n    作者:").concat("Caven Chen <cavencj@gmail.com>","\n    主页: ").concat("https://www.dvgis.cn","\n    github:").concat("https://github.com/dvgis/dc-sdk.git","\n    授权信息:授权-永久使用此软件当前版本。 \n\n\n    版权声明:\n    1.框架作为一个基础平台,完全开源,任何个人和机构可以修改、重构,无需经过我方授权。\n    2.后期会添加一些行业性的插件和工具,代码会适量的开源。\n    3.任何个人和机构在遵守下列条件的前提下可以永久免费使用:\n     1)程序包完整引用\n     2)保留此版权信息在控制台输出\n    我方保留对此版权信息的最终解释权。"),"font-size:20px;padding-left:70px;color:#EEB422","font-size:14px;padding-left:50px;color:#EEB422;font-style:oblique","font-size:12px;color:#0865ba")},function(module,exports,__webpack_require__){(function(Buffer,global){!function(e,t){t(exports)}(0,(function(exports){"use strict";function defined(e){return null!=e}function DeveloperError(e){var t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}defined(Object.create)&&(DeveloperError.prototype=Object.create(Error.prototype),DeveloperError.prototype.constructor=DeveloperError),DeveloperError.prototype.toString=function(){var e=this.name+": "+this.message;return defined(this.stack)&&(e+="\n"+this.stack.toString()),e},DeveloperError.throwInstantiationError=function(){throw new DeveloperError("This function defines an interface and should not be called directly.")};var Check={};function getUndefinedErrorMessage(e){return e+" is required, actual value was undefined"}function getFailedTypeErrorMessage(e,t,i){return"Expected "+i+" to be typeof "+t+", actual typeof was "+e}function defaultValue(e,t){return null!=e?e:t}function MersenneTwister(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)}Check.typeOf={},Check.defined=function(e,t){if(!defined(t))throw new DeveloperError(getUndefinedErrorMessage(e))},Check.typeOf.func=function(e,t){if("function"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"function",e))},Check.typeOf.string=function(e,t){if("string"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"string",e))},Check.typeOf.number=function(e,t){if("number"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"number",e))},Check.typeOf.number.lessThan=function(e,t,i){if(Check.typeOf.number(e,t),i<=t)throw new DeveloperError("Expected "+e+" to be less than "+i+", actual value was "+t)},Check.typeOf.number.lessThanOrEquals=function(e,t,i){if(Check.typeOf.number(e,t),i<t)throw new DeveloperError("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},Check.typeOf.number.greaterThan=function(e,t,i){if(Check.typeOf.number(e,t),t<=i)throw new DeveloperError("Expected "+e+" to be greater than "+i+", actual value was "+t)},Check.typeOf.number.greaterThanOrEquals=function(e,t,i){if(Check.typeOf.number(e,t),t<i)throw new DeveloperError("Expected "+e+" to be greater than or equal to"+i+", actual value was "+t)},Check.typeOf.object=function(e,t){if("object"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"object",e))},Check.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new DeveloperError(getFailedTypeErrorMessage(typeof t,"boolean",e))},Check.typeOf.number.equals=function(e,t,i,r){if(Check.typeOf.number(e,i),Check.typeOf.number(t,r),i!==r)throw new DeveloperError(e+" must be equal to "+t+", the actual values are "+i+" and "+r)},defaultValue.EMPTY_OBJECT=Object.freeze({}),MersenneTwister.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++)e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0},MersenneTwister.prototype.genrand_int32=function(){var e,t,i=new Array(0,this.MATRIX_A);if(this.mti>=this.N){for(this.mti==this.N+1&&this.init_genrand(5489),t=0;t<this.N-this.M;t++)e=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+this.M]^e>>>1^i[1&e];for(;t<this.N-1;t++)e=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+(this.M-this.N)]^e>>>1^i[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^i[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},MersenneTwister.prototype.random=function(){return this.genrand_int32()*(1/4294967296)};var CesiumMath={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296};CesiumMath.sign=defaultValue(Math.sign,(function(e){return 0==(e=+e)||e!=e?e:0<e?1:-1})),CesiumMath.signNotZero=function(e){return e<0?-1:1},CesiumMath.toSNorm=function(e,t){return t=defaultValue(t,255),Math.round((.5*CesiumMath.clamp(e,-1,1)+.5)*t)},CesiumMath.fromSNorm=function(e,t){return t=defaultValue(t,255),CesiumMath.clamp(e,0,t)/t*2-1},CesiumMath.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:CesiumMath.clamp((e-t)/i,0,1)},CesiumMath.sinh=defaultValue(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),CesiumMath.cosh=defaultValue(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),CesiumMath.lerp=function(e,t,i){return(1-i)*e+i*t},CesiumMath.PI=Math.PI,CesiumMath.ONE_OVER_PI=1/Math.PI,CesiumMath.PI_OVER_TWO=Math.PI/2,CesiumMath.PI_OVER_THREE=Math.PI/3,CesiumMath.PI_OVER_FOUR=Math.PI/4,CesiumMath.PI_OVER_SIX=Math.PI/6,CesiumMath.THREE_PI_OVER_TWO=3*Math.PI/2,CesiumMath.TWO_PI=2*Math.PI,CesiumMath.ONE_OVER_TWO_PI=1/(2*Math.PI),CesiumMath.RADIANS_PER_DEGREE=Math.PI/180,CesiumMath.DEGREES_PER_RADIAN=180/Math.PI,CesiumMath.RADIANS_PER_ARCSECOND=CesiumMath.RADIANS_PER_DEGREE/3600,CesiumMath.toRadians=function(e){return e*CesiumMath.RADIANS_PER_DEGREE},CesiumMath.toDegrees=function(e){return e*CesiumMath.DEGREES_PER_RADIAN},CesiumMath.convertLongitudeRange=function(e){var t=CesiumMath.TWO_PI;return(e=e-Math.floor(e/t)*t)<-Math.PI?e+t:e>=Math.PI?e-t:e},CesiumMath.clampToLatitudeRange=function(e){return CesiumMath.clamp(e,-1*CesiumMath.PI_OVER_TWO,CesiumMath.PI_OVER_TWO)},CesiumMath.negativePiToPi=function(e){return CesiumMath.zeroToTwoPi(e+CesiumMath.PI)-CesiumMath.PI},CesiumMath.zeroToTwoPi=function(e){var t=CesiumMath.mod(e,CesiumMath.TWO_PI);return Math.abs(t)<CesiumMath.EPSILON14&&Math.abs(e)>CesiumMath.EPSILON14?CesiumMath.TWO_PI:t},CesiumMath.mod=function(e,t){return(e%t+t)%t},CesiumMath.equalsEpsilon=function(e,t,i,r){i=defaultValue(i,0),r=defaultValue(r,i);var n=Math.abs(e-t);return n<=r||n<=i*Math.max(Math.abs(e),Math.abs(t))},CesiumMath.lessThan=function(e,t,i){return e-t<-i},CesiumMath.lessThanOrEquals=function(e,t,i){return e-t<i},CesiumMath.greaterThan=function(e,t,i){return i<e-t},CesiumMath.greaterThanOrEquals=function(e,t,i){return-i<e-t};var factorials=[1];CesiumMath.factorial=function(e){var t=factorials.length;if(t<=e)for(var i=factorials[t-1],r=t;r<=e;r++){var n=i*r;factorials.push(n),i=n}return factorials[e]},CesiumMath.incrementWrap=function(e,t,i){return i=defaultValue(i,0),t<++e&&(e=i),e},CesiumMath.isPowerOfTwo=function(e){return 0!==e&&0==(e&e-1)},CesiumMath.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},CesiumMath.clamp=function(e,t,i){return e<t?t:i<e?i:e};var randomNumberGenerator=new MersenneTwister;function Cartesian3(e,t,i){this.x=defaultValue(e,0),this.y=defaultValue(t,0),this.z=defaultValue(i,0)}CesiumMath.setRandomNumberSeed=function(e){randomNumberGenerator=new MersenneTwister(e)},CesiumMath.nextRandomNumber=function(){return randomNumberGenerator.random()},CesiumMath.randomBetween=function(e,t){return CesiumMath.nextRandomNumber()*(t-e)+e},CesiumMath.acosClamped=function(e){return Math.acos(CesiumMath.clamp(e,-1,1))},CesiumMath.asinClamped=function(e){return Math.asin(CesiumMath.clamp(e,-1,1))},CesiumMath.chordLength=function(e,t){return 2*t*Math.sin(.5*e)},CesiumMath.logBase=function(e,t){return Math.log(e)/Math.log(t)},CesiumMath.cbrt=defaultValue(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),1/3);return e<0?-t:t})),CesiumMath.log2=defaultValue(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),CesiumMath.fog=function(e,t){return t*=e,1-Math.exp(-t*t)},CesiumMath.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},CesiumMath.fastApproximateAtan2=function(e,t){var i=Math.abs(e),r=Math.abs(t),n=Math.max(i,r);n=Math.min(i,r)/n,i=CesiumMath.fastApproximateAtan(n);return i=Math.abs(t)>Math.abs(e)?CesiumMath.PI_OVER_TWO-i:i,i=e<0?CesiumMath.PI-i:i,t<0?-i:i},Cartesian3.fromSpherical=function(e,t){defined(t)||(t=new Cartesian3);var i=e.clock,r=e.cone,n=defaultValue(e.magnitude,1);e=n*Math.sin(r);return t.x=e*Math.cos(i),t.y=e*Math.sin(i),t.z=n*Math.cos(r),t},Cartesian3.fromElements=function(e,t,i,r){return defined(r)?(r.x=e,r.y=t,r.z=i,r):new Cartesian3(e,t,i)},Cartesian3.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new Cartesian3(e.x,e.y,e.z)},Cartesian3.fromCartesian4=Cartesian3.clone,Cartesian3.packedLength=3,Cartesian3.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},Cartesian3.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Cartesian3),i.x=e[t++],i.y=e[t++],i.z=e[t],i},Cartesian3.packArray=function(e,t){var i=e.length,r=3*i;if(defined(t)){if(!Array.isArray(t)&&t.length!==r)throw new DeveloperError("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(var n=0;n<i;++n)Cartesian3.pack(e[n],t,3*n);return t},Cartesian3.unpackArray=function(e,t){var i=e.length;defined(t)?t.length=i/3:t=new Array(i/3);for(var r=0;r<i;r+=3){var n=r/3;t[n]=Cartesian3.unpack(e,r,t[n])}return t},Cartesian3.fromArray=Cartesian3.unpack,Cartesian3.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},Cartesian3.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},Cartesian3.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},Cartesian3.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},Cartesian3.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},Cartesian3.magnitude=function(e){return Math.sqrt(Cartesian3.magnitudeSquared(e))};var distanceScratch=new Cartesian3;Cartesian3.distance=function(e,t){return Cartesian3.subtract(e,t,distanceScratch),Cartesian3.magnitude(distanceScratch)},Cartesian3.distanceSquared=function(e,t){return Cartesian3.subtract(e,t,distanceScratch),Cartesian3.magnitudeSquared(distanceScratch)},Cartesian3.normalize=function(e,t){var i=Cartesian3.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t},Cartesian3.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},Cartesian3.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},Cartesian3.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},Cartesian3.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},Cartesian3.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},Cartesian3.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},Cartesian3.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},Cartesian3.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},Cartesian3.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var lerpScratch=new Cartesian3;Cartesian3.lerp=function(e,t,i,r){return Cartesian3.multiplyByScalar(t,i,lerpScratch),r=Cartesian3.multiplyByScalar(e,1-i,r),Cartesian3.add(lerpScratch,r,r)};var angleBetweenScratch=new Cartesian3,angleBetweenScratch2=new Cartesian3;Cartesian3.angleBetween=function(e,t){return Cartesian3.normalize(e,angleBetweenScratch),Cartesian3.normalize(t,angleBetweenScratch2),e=Cartesian3.dot(angleBetweenScratch,angleBetweenScratch2),t=Cartesian3.magnitude(Cartesian3.cross(angleBetweenScratch,angleBetweenScratch2,angleBetweenScratch)),Math.atan2(t,e)};var mostOrthogonalAxisScratch=new Cartesian3;Cartesian3.mostOrthogonalAxis=function(e,t){return e=Cartesian3.normalize(e,mostOrthogonalAxisScratch),Cartesian3.abs(e,e),e.x<=e.y?e.x<=e.z?Cartesian3.clone(Cartesian3.UNIT_X,t):Cartesian3.clone(Cartesian3.UNIT_Z,t):e.y<=e.z?Cartesian3.clone(Cartesian3.UNIT_Y,t):Cartesian3.clone(Cartesian3.UNIT_Z,t)},Cartesian3.projectVector=function(e,t,i){return e=Cartesian3.dot(e,t)/Cartesian3.dot(t,t),Cartesian3.multiplyByScalar(t,e,i)},Cartesian3.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},Cartesian3.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},Cartesian3.equalsEpsilon=function(e,t,i,r){return e===t||defined(e)&&defined(t)&&CesiumMath.equalsEpsilon(e.x,t.x,i,r)&&CesiumMath.equalsEpsilon(e.y,t.y,i,r)&&CesiumMath.equalsEpsilon(e.z,t.z,i,r)},Cartesian3.cross=function(e,t,i){var r=e.x,n=e.y,a=e.z,o=t.x,s=t.y;t=n*(e=t.z)-a*s,e=a*o-r*e,o=r*s-n*o;return i.x=t,i.y=e,i.z=o,i},Cartesian3.midpoint=function(e,t,i){return i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},Cartesian3.fromDegrees=function(e,t,i,r,n){return e=CesiumMath.toRadians(e),t=CesiumMath.toRadians(t),Cartesian3.fromRadians(e,t,i,r,n)};var scratchN=new Cartesian3,scratchK=new Cartesian3,wgs84RadiiSquared=new Cartesian3(40680631590769,40680631590769,40408299984661.445);Cartesian3.fromRadians=function(e,t,i,r,n){i=defaultValue(i,0);var a=defined(r)?r.radiiSquared:wgs84RadiiSquared;r=Math.cos(t);return scratchN.x=r*Math.cos(e),scratchN.y=r*Math.sin(e),scratchN.z=Math.sin(t),scratchN=Cartesian3.normalize(scratchN,scratchN),Cartesian3.multiplyComponents(a,scratchN,scratchK),a=Math.sqrt(Cartesian3.dot(scratchN,scratchK)),scratchK=Cartesian3.divideByScalar(scratchK,a,scratchK),scratchN=Cartesian3.multiplyByScalar(scratchN,i,scratchN),defined(n)||(n=new Cartesian3),Cartesian3.add(scratchK,scratchN,n)},Cartesian3.fromDegreesArray=function(e,t,i){var r=e.length;defined(i)?i.length=r/2:i=new Array(r/2);for(var n=0;n<r;n+=2){var a=e[n],o=e[n+1],s=n/2;i[s]=Cartesian3.fromDegrees(a,o,0,t,i[s])}return i},Cartesian3.fromRadiansArray=function(e,t,i){var r=e.length;defined(i)?i.length=r/2:i=new Array(r/2);for(var n=0;n<r;n+=2){var a=e[n],o=e[n+1],s=n/2;i[s]=Cartesian3.fromRadians(a,o,0,t,i[s])}return i},Cartesian3.fromDegreesArrayHeights=function(e,t,i){var r=e.length;defined(i)?i.length=r/3:i=new Array(r/3);for(var n=0;n<r;n+=3){var a=e[n],o=e[n+1],s=e[n+2],l=n/3;i[l]=Cartesian3.fromDegrees(a,o,s,t,i[l])}return i},Cartesian3.fromRadiansArrayHeights=function(e,t,i){var r=e.length;defined(i)?i.length=r/3:i=new Array(r/3);for(var n=0;n<r;n+=3){var a=e[n],o=e[n+1],s=e[n+2],l=n/3;i[l]=Cartesian3.fromRadians(a,o,s,t,i[l])}return i},Cartesian3.ZERO=Object.freeze(new Cartesian3(0,0,0)),Cartesian3.UNIT_X=Object.freeze(new Cartesian3(1,0,0)),Cartesian3.UNIT_Y=Object.freeze(new Cartesian3(0,1,0)),Cartesian3.UNIT_Z=Object.freeze(new Cartesian3(0,0,1)),Cartesian3.prototype.clone=function(e){return Cartesian3.clone(this,e)},Cartesian3.prototype.equals=function(e){return Cartesian3.equals(this,e)},Cartesian3.prototype.equalsEpsilon=function(e,t,i){return Cartesian3.equalsEpsilon(this,e,t,i)},Cartesian3.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};var scaleToGeodeticSurfaceIntersection=new Cartesian3,scaleToGeodeticSurfaceGradient=new Cartesian3;function scaleToGeodeticSurface(e,t,i,r,n){var a=e.x,o=e.y,s=e.z,l=a*a*(d=t.x)*d,c=o*o*(h=t.y)*h,u=s*s*(t=t.z)*t,d=l+c+u,h=Math.sqrt(1/d);t=Cartesian3.multiplyByScalar(e,h,scaleToGeodeticSurfaceIntersection);if(d<r)return isFinite(h)?Cartesian3.clone(t,n):void 0;var p=i.x,f=i.y,m=i.z;(i=scaleToGeodeticSurfaceGradient).x=t.x*p*2,i.y=t.y*f*2,i.z=t.z*m*2;var g,y,_,v,C,x,b,S=(1-h)*Cartesian3.magnitude(e)/(.5*Cartesian3.magnitude(i)),T=0;do{T=(g=l*(C=(y=1/(1+(S-=T)*p))*y)+c*(x=(_=1/(1+S*f))*_)+u*(b=(v=1/(1+S*m))*v)-1)/(-2*(l*(C*y)*p+c*(x*_)*f+u*(b*v)*m))}while(Math.abs(g)>CesiumMath.EPSILON12);return defined(n)?(n.x=a*y,n.y=o*_,n.z=s*v,n):new Cartesian3(a*y,o*_,s*v)}function Cartographic(e,t,i){this.longitude=defaultValue(e,0),this.latitude=defaultValue(t,0),this.height=defaultValue(i,0)}Cartographic.fromRadians=function(e,t,i,r){return i=defaultValue(i,0),defined(r)?(r.longitude=e,r.latitude=t,r.height=i,r):new Cartographic(e,t,i)},Cartographic.fromDegrees=function(e,t,i,r){return e=CesiumMath.toRadians(e),t=CesiumMath.toRadians(t),Cartographic.fromRadians(e,t,i,r)};var cartesianToCartographicN=new Cartesian3,cartesianToCartographicP=new Cartesian3,cartesianToCartographicH=new Cartesian3,wgs84OneOverRadii=new Cartesian3(1/6378137,1/6378137,1/6356752.314245179),wgs84OneOverRadiiSquared=new Cartesian3(1/40680631590769,1/40680631590769,1/40408299984661.445),wgs84CenterToleranceSquared=CesiumMath.EPSILON1;function initialize(e,t,i,r){t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,0),e._radii=new Cartesian3(t,i,r),e._radiiSquared=new Cartesian3(t*t,i*i,r*r),e._radiiToTheFourth=new Cartesian3(t*t*t*t,i*i*i*i,r*r*r*r),e._oneOverRadii=new Cartesian3(0===t?0:1/t,0===i?0:1/i,0===r?0:1/r),e._oneOverRadiiSquared=new Cartesian3(0===t?0:1/(t*t),0===i?0:1/(i*i),0===r?0:1/(r*r)),e._minimumRadius=Math.min(t,i,r),e._maximumRadius=Math.max(t,i,r),e._centerToleranceSquared=CesiumMath.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function Ellipsoid(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,initialize(this,e,t,i)}Cartographic.fromCartesian=function(e,t,i){var r=defined(t)?t.oneOverRadii:wgs84OneOverRadii,n=defined(t)?t.oneOverRadiiSquared:wgs84OneOverRadiiSquared;r=scaleToGeodeticSurface(e,r,n,defined(t)?t._centerToleranceSquared:wgs84CenterToleranceSquared,cartesianToCartographicP);if(defined(r))return t=Cartesian3.multiplyComponents(r,n,cartesianToCartographicN),t=Cartesian3.normalize(t,t),n=Cartesian3.subtract(e,r,cartesianToCartographicH),r=Math.atan2(t.y,t.x),t=Math.asin(t.z),n=CesiumMath.sign(Cartesian3.dot(n,e))*Cartesian3.magnitude(n),defined(i)?(i.longitude=r,i.latitude=t,i.height=n,i):new Cartographic(r,t,n)},Cartographic.toCartesian=function(e,t,i){return Cartesian3.fromRadians(e.longitude,e.latitude,e.height,t,i)},Cartographic.clone=function(e,t){if(defined(e))return defined(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Cartographic(e.longitude,e.latitude,e.height)},Cartographic.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},Cartographic.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},Cartographic.ZERO=Object.freeze(new Cartographic(0,0,0)),Cartographic.prototype.clone=function(e){return Cartographic.clone(this,e)},Cartographic.prototype.equals=function(e){return Cartographic.equals(this,e)},Cartographic.prototype.equalsEpsilon=function(e,t){return Cartographic.equalsEpsilon(this,e,t)},Cartographic.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(Ellipsoid.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),Ellipsoid.clone=function(e,t){if(defined(e)){var i=e._radii;return defined(t)?(Cartesian3.clone(i,t._radii),Cartesian3.clone(e._radiiSquared,t._radiiSquared),Cartesian3.clone(e._radiiToTheFourth,t._radiiToTheFourth),Cartesian3.clone(e._oneOverRadii,t._oneOverRadii),Cartesian3.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Ellipsoid(i.x,i.y,i.z)}},Ellipsoid.fromCartesian3=function(e,t){return defined(t)||(t=new Ellipsoid),defined(e)&&initialize(t,e.x,e.y,e.z),t},Ellipsoid.WGS84=Object.freeze(new Ellipsoid(6378137,6378137,6356752.314245179)),Ellipsoid.UNIT_SPHERE=Object.freeze(new Ellipsoid(1,1,1)),Ellipsoid.MOON=Object.freeze(new Ellipsoid(CesiumMath.LUNAR_RADIUS,CesiumMath.LUNAR_RADIUS,CesiumMath.LUNAR_RADIUS)),Ellipsoid.prototype.clone=function(e){return Ellipsoid.clone(this,e)},Ellipsoid.packedLength=Cartesian3.packedLength,Ellipsoid.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._radii,t,i),t},Ellipsoid.unpack=function(e,t,i){return t=defaultValue(t,0),t=Cartesian3.unpack(e,t),Ellipsoid.fromCartesian3(t,i)},Ellipsoid.prototype.geocentricSurfaceNormal=Cartesian3.normalize,Ellipsoid.prototype.geodeticSurfaceNormalCartographic=function(e,t){var i=e.longitude,r=e.latitude,n=Math.cos(r);e=n*Math.cos(i),i=n*Math.sin(i),r=Math.sin(r);return defined(t)||(t=new Cartesian3),t.x=e,t.y=i,t.z=r,Cartesian3.normalize(t,t)},Ellipsoid.prototype.geodeticSurfaceNormal=function(e,t){if(!Cartesian3.equalsEpsilon(e,Cartesian3.ZERO,CesiumMath.EPSILON14))return defined(t)||(t=new Cartesian3),t=Cartesian3.multiplyComponents(e,this._oneOverRadiiSquared,t),Cartesian3.normalize(t,t)};var cartographicToCartesianNormal=new Cartesian3,cartographicToCartesianK=new Cartesian3;Ellipsoid.prototype.cartographicToCartesian=function(e,t){var i=cartographicToCartesianNormal,r=cartographicToCartesianK;this.geodeticSurfaceNormalCartographic(e,i),Cartesian3.multiplyComponents(this._radiiSquared,i,r);var n=Math.sqrt(Cartesian3.dot(i,r));return Cartesian3.divideByScalar(r,n,r),Cartesian3.multiplyByScalar(i,e.height,i),defined(t)||(t=new Cartesian3),Cartesian3.add(r,i,t)},Ellipsoid.prototype.cartographicArrayToCartesianArray=function(e,t){var i=e.length;defined(t)?t.length=i:t=new Array(i);for(var r=0;r<i;r++)t[r]=this.cartographicToCartesian(e[r],t[r]);return t};var cartesianToCartographicN$1=new Cartesian3,cartesianToCartographicP$1=new Cartesian3,cartesianToCartographicH$1=new Cartesian3;Ellipsoid.prototype.cartesianToCartographic=function(e,t){if(defined(n=this.scaleToGeodeticSurface(e,cartesianToCartographicP$1))){var i=this.geodeticSurfaceNormal(n,cartesianToCartographicN$1),r=Cartesian3.subtract(e,n,cartesianToCartographicH$1),n=Math.atan2(i.y,i.x);i=Math.asin(i.z),r=CesiumMath.sign(Cartesian3.dot(r,e))*Cartesian3.magnitude(r);return defined(t)?(t.longitude=n,t.latitude=i,t.height=r,t):new Cartographic(n,i,r)}},Ellipsoid.prototype.cartesianArrayToCartographicArray=function(e,t){var i=e.length;defined(t)?t.length=i:t=new Array(i);for(var r=0;r<i;++r)t[r]=this.cartesianToCartographic(e[r],t[r]);return t},Ellipsoid.prototype.scaleToGeodeticSurface=function(e,t){return scaleToGeodeticSurface(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},Ellipsoid.prototype.scaleToGeocentricSurface=function(e,t){defined(t)||(t=new Cartesian3);var i=e.x,r=e.y,n=e.z,a=this._oneOverRadiiSquared;a=1/Math.sqrt(i*i*a.x+r*r*a.y+n*n*a.z);return Cartesian3.multiplyByScalar(e,a,t)},Ellipsoid.prototype.transformPositionToScaledSpace=function(e,t){return defined(t)||(t=new Cartesian3),Cartesian3.multiplyComponents(e,this._oneOverRadii,t)},Ellipsoid.prototype.transformPositionFromScaledSpace=function(e,t){return defined(t)||(t=new Cartesian3),Cartesian3.multiplyComponents(e,this._radii,t)},Ellipsoid.prototype.equals=function(e){return this===e||defined(e)&&Cartesian3.equals(this._radii,e._radii)},Ellipsoid.prototype.toString=function(){return this._radii.toString()},Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){t=defaultValue(t,0);var r=this._squaredXOverSquaredZ;if(defined(i)||(i=new Cartesian3),i.x=0,i.y=0,i.z=e.z*(1-r),!(Math.abs(i.z)>=this._radii.z-t))return i};var abscissas=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],weights=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function gaussLegendreQuadrature(e,t,i){for(var r=.5*(t+e),n=.5*(t-e),a=0,o=0;o<5;o++){var s=n*abscissas[o];a+=weights[o]*(i(r+s)+i(r-s))}return a*n}function GeographicProjection(e){this._ellipsoid=defaultValue(e,Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Ellipsoid.prototype.surfaceArea=function(e){for(var t=e.west,i=e.east,r=e.south,n=e.north;i<t;)i+=CesiumMath.TWO_PI;var a=(e=this._radiiSquared).x,o=e.y,s=e.z,l=a*o;return gaussLegendreQuadrature(r,n,(function(e){var r=Math.cos(e),n=Math.sin(e);return Math.cos(e)*gaussLegendreQuadrature(t,i,(function(e){var t=Math.cos(e);e=Math.sin(e);return Math.sqrt(l*n*n+s*(o*t*t+a*e*e)*r*r)}))}))},Object.defineProperties(GeographicProjection.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),GeographicProjection.prototype.project=function(e,t){var i=this._semimajorAxis,r=e.longitude*i;i=e.latitude*i,e=e.height;return defined(t)?(t.x=r,t.y=i,t.z=e,t):new Cartesian3(r,i,e)},GeographicProjection.prototype.unproject=function(e,t){var i=this._oneOverSemimajorAxis,r=e.x*i;i=e.y*i,e=e.z;return defined(t)?(t.longitude=r,t.latitude=i,t.height=e,t):new Cartographic(r,i,e)};var Intersect={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Intersect$1=Object.freeze(Intersect);function Interval(e,t){this.start=defaultValue(e,0),this.stop=defaultValue(t,0)}function Matrix3(e,t,i,r,n,a,o,s,l){this[0]=defaultValue(e,0),this[1]=defaultValue(r,0),this[2]=defaultValue(o,0),this[3]=defaultValue(t,0),this[4]=defaultValue(n,0),this[5]=defaultValue(s,0),this[6]=defaultValue(i,0),this[7]=defaultValue(a,0),this[8]=defaultValue(l,0)}Matrix3.packedLength=9,Matrix3.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t},Matrix3.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix3),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i},Matrix3.clone=function(e,t){if(defined(e))return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new Matrix3(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},Matrix3.fromArray=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix3),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i[4]=e[t+4],i[5]=e[t+5],i[6]=e[t+6],i[7]=e[t+7],i[8]=e[t+8],i},Matrix3.fromColumnMajorArray=function(e,t){return Matrix3.clone(e,t)},Matrix3.fromRowMajorArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new Matrix3(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},Matrix3.fromQuaternion=function(e,t){var i=e.x*e.x,r=e.x*e.y,n=e.x*e.z,a=e.x*e.w,o=e.y*e.y,s=e.y*e.z,l=e.y*e.w,c=e.z*e.z,u=e.z*e.w,d=i-o-c+(f=e.w*e.w),h=2*(r-u),p=2*(n+l),f=(e=2*(r+u),r=o-i-c+f,u=2*(s-a),l=2*(n-l),a=2*(s+a),-i-o+c+f);return defined(t)?(t[0]=d,t[1]=e,t[2]=l,t[3]=h,t[4]=r,t[5]=a,t[6]=p,t[7]=u,t[8]=f,t):new Matrix3(d,h,p,e,r,u,l,a,f)},Matrix3.fromHeadingPitchRoll=function(e,t){var i=Math.cos(-e.pitch),r=Math.cos(-e.heading),n=Math.cos(e.roll),a=Math.sin(-e.pitch),o=i*r,s=-n*(u=Math.sin(-e.heading))+(d=Math.sin(e.roll))*a*r,l=d*u+n*a*r,c=i*u,u=(e=n*r+d*a*u,-d*r+n*a*u),d=(a=-a,d*i);i*=n;return defined(t)?(t[0]=o,t[1]=c,t[2]=a,t[3]=s,t[4]=e,t[5]=d,t[6]=l,t[7]=u,t[8]=i,t):new Matrix3(o,s,l,c,e,u,a,d,i)},Matrix3.fromScale=function(e,t){return defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new Matrix3(e.x,0,0,0,e.y,0,0,0,e.z)},Matrix3.fromUniformScale=function(e,t){return defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new Matrix3(e,0,0,0,e,0,0,0,e)},Matrix3.fromCrossProduct=function(e,t){return defined(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new Matrix3(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},Matrix3.fromRotationX=function(e,t){var i=Math.cos(e);e=Math.sin(e);return defined(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=i,t[5]=e,t[6]=0,t[7]=-e,t[8]=i,t):new Matrix3(1,0,0,0,i,-e,0,e,i)},Matrix3.fromRotationY=function(e,t){var i=Math.cos(e);e=Math.sin(e);return defined(t)?(t[0]=i,t[1]=0,t[2]=-e,t[3]=0,t[4]=1,t[5]=0,t[6]=e,t[7]=0,t[8]=i,t):new Matrix3(i,0,e,0,1,0,-e,0,i)},Matrix3.fromRotationZ=function(e,t){var i=Math.cos(e);e=Math.sin(e);return defined(t)?(t[0]=i,t[1]=e,t[2]=0,t[3]=-e,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Matrix3(i,-e,0,e,i,0,0,0,1)},Matrix3.toArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},Matrix3.getElementIndex=function(e,t){return 3*e+t},Matrix3.getColumn=function(e,t,i){var r=e[n=3*t],n=(t=e[1+n],e[2+n]);return i.x=r,i.y=t,i.z=n,i},Matrix3.setColumn=function(e,t,i,r){return t*=3,(r=Matrix3.clone(e,r))[t]=i.x,r[1+t]=i.y,r[2+t]=i.z,r},Matrix3.getRow=function(e,t,i){var r=e[t],n=e[t+3];t=e[t+6];return i.x=r,i.y=n,i.z=t,i},Matrix3.setRow=function(e,t,i,r){return(r=Matrix3.clone(e,r))[t]=i.x,r[t+3]=i.y,r[t+6]=i.z,r};var scratchColumn=new Cartesian3;Matrix3.getScale=function(e,t){return t.x=Cartesian3.magnitude(Cartesian3.fromElements(e[0],e[1],e[2],scratchColumn)),t.y=Cartesian3.magnitude(Cartesian3.fromElements(e[3],e[4],e[5],scratchColumn)),t.z=Cartesian3.magnitude(Cartesian3.fromElements(e[6],e[7],e[8],scratchColumn)),t};var scratchScale=new Cartesian3;Matrix3.getMaximumScale=function(e){return Matrix3.getScale(e,scratchScale),Cartesian3.maximumComponent(scratchScale)},Matrix3.multiply=function(e,t,i){var r=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],n=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],a=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],o=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],c=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],u=e[1]*t[6]+e[4]*t[7]+e[7]*t[8];t=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return i[0]=r,i[1]=n,i[2]=a,i[3]=o,i[4]=s,i[5]=l,i[6]=c,i[7]=u,i[8]=t,i},Matrix3.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i},Matrix3.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i},Matrix3.multiplyByVector=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=e[0]*r+e[3]*n+e[6]*a;t=e[1]*r+e[4]*n+e[7]*a,a=e[2]*r+e[5]*n+e[8]*a;return i.x=o,i.y=t,i.z=a,i},Matrix3.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i},Matrix3.multiplyByScale=function(e,t,i){return i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.x,i[3]=e[3]*t.y,i[4]=e[4]*t.y,i[5]=e[5]*t.y,i[6]=e[6]*t.z,i[7]=e[7]*t.z,i[8]=e[8]*t.z,i},Matrix3.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},Matrix3.transpose=function(e,t){var i=e[0],r=e[3],n=e[6],a=e[1],o=e[4],s=e[7],l=e[2],c=e[5];e=e[8];return t[0]=i,t[1]=r,t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=l,t[7]=c,t[8]=e,t};var UNIT=new Cartesian3(1,1,1);function computeFrobeniusNorm(e){for(var t=0,i=0;i<9;++i){var r=e[i];t+=r*r}return Math.sqrt(t)}Matrix3.getRotation=function(e,t){var i=Cartesian3.divideComponents(UNIT,Matrix3.getScale(e,scratchScale),scratchScale);return Matrix3.multiplyByScale(e,i,t)};var rowVal=[1,0,0],colVal=[2,2,1];function offDiagonalFrobeniusNorm(e){for(var t=0,i=0;i<3;++i){var r=e[Matrix3.getElementIndex(colVal[i],rowVal[i])];t+=2*r*r}return Math.sqrt(t)}function shurDecomposition(e,t){for(var i=CesiumMath.EPSILON15,r=0,n=1,a=0;a<3;++a){var o=Math.abs(e[Matrix3.getElementIndex(colVal[a],rowVal[a])]);r<o&&(n=a,r=o)}var s=1,l=0,c=rowVal[n],u=colVal[n];return Math.abs(e[Matrix3.getElementIndex(u,c)])>i&&(l=(i=(i=(e[Matrix3.getElementIndex(u,u)]-e[Matrix3.getElementIndex(c,c)])/2/e[Matrix3.getElementIndex(u,c)])<0?-1/(-i+Math.sqrt(1+i*i)):1/(i+Math.sqrt(1+i*i)))*(s=1/Math.sqrt(1+i*i))),(t=Matrix3.clone(Matrix3.IDENTITY,t))[Matrix3.getElementIndex(c,c)]=t[Matrix3.getElementIndex(u,u)]=s,t[Matrix3.getElementIndex(u,c)]=l,t[Matrix3.getElementIndex(c,u)]=-l,t}var jMatrix=new Matrix3,jMatrixTranspose=new Matrix3;Matrix3.computeEigenDecomposition=function(e,t){var i=CesiumMath.EPSILON20,r=0,n=0;defined(t)||(t={});for(var a=t.unitary=Matrix3.clone(Matrix3.IDENTITY,t.unitary),o=t.diagonal=Matrix3.clone(e,t.diagonal),s=i*computeFrobeniusNorm(o);n<10&&offDiagonalFrobeniusNorm(o)>s;)shurDecomposition(o,jMatrix),Matrix3.transpose(jMatrix,jMatrixTranspose),Matrix3.multiply(o,jMatrix,o),Matrix3.multiply(jMatrixTranspose,o,o),Matrix3.multiply(a,jMatrix,a),2<++r&&(++n,r=0);return t},Matrix3.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},Matrix3.determinant=function(e){var t=e[0],i=e[3],r=e[6],n=e[1],a=e[4],o=e[7],s=e[2],l=e[5];return t*(a*(e=e[8])-l*o)+n*(l*r-i*e)+s*(i*o-a*r)},Matrix3.inverse=function(e,t){var i=e[0],r=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8];e=Matrix3.determinant(e);return t[0]=o*u-c*s,t[1]=c*n-r*u,t[2]=r*s-o*n,t[3]=l*s-a*u,t[4]=i*u-l*n,t[5]=a*n-i*s,t[6]=a*c-l*o,t[7]=l*r-i*c,t[8]=i*o-a*r,e=1/e,Matrix3.multiplyByScalar(t,e,t)};var scratchTransposeMatrix=new Matrix3;function Cartesian4(e,t,i,r){this.x=defaultValue(e,0),this.y=defaultValue(t,0),this.z=defaultValue(i,0),this.w=defaultValue(r,0)}Matrix3.inverseTranspose=function(e,t){return Matrix3.inverse(Matrix3.transpose(e,scratchTransposeMatrix),t)},Matrix3.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},Matrix3.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i},Matrix3.IDENTITY=Object.freeze(new Matrix3(1,0,0,0,1,0,0,0,1)),Matrix3.ZERO=Object.freeze(new Matrix3(0,0,0,0,0,0,0,0,0)),Matrix3.COLUMN0ROW0=0,Matrix3.COLUMN0ROW1=1,Matrix3.COLUMN0ROW2=2,Matrix3.COLUMN1ROW0=3,Matrix3.COLUMN1ROW1=4,Matrix3.COLUMN1ROW2=5,Matrix3.COLUMN2ROW0=6,Matrix3.COLUMN2ROW1=7,Matrix3.COLUMN2ROW2=8,Object.defineProperties(Matrix3.prototype,{length:{get:function(){return Matrix3.packedLength}}}),Matrix3.prototype.clone=function(e){return Matrix3.clone(this,e)},Matrix3.prototype.equals=function(e){return Matrix3.equals(this,e)},Matrix3.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},Matrix3.prototype.equalsEpsilon=function(e,t){return Matrix3.equalsEpsilon(this,e,t)},Matrix3.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},Cartesian4.fromElements=function(e,t,i,r,n){return defined(n)?(n.x=e,n.y=t,n.z=i,n.w=r,n):new Cartesian4(e,t,i,r)},Cartesian4.fromColor=function(e,t){return defined(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Cartesian4(e.red,e.green,e.blue,e.alpha)},Cartesian4.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Cartesian4(e.x,e.y,e.z,e.w)},Cartesian4.packedLength=4,Cartesian4.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Cartesian4.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Cartesian4),i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i},Cartesian4.packArray=function(e,t){var i=e.length,r=4*i;if(defined(t)){if(!Array.isArray(t)&&t.length!==r)throw new DeveloperError("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(var n=0;n<i;++n)Cartesian4.pack(e[n],t,4*n);return t},Cartesian4.unpackArray=function(e,t){var i=e.length;defined(t)?t.length=i/4:t=new Array(i/4);for(var r=0;r<i;r+=4){var n=r/4;t[n]=Cartesian4.unpack(e,r,t[n])}return t},Cartesian4.fromArray=Cartesian4.unpack,Cartesian4.maximumComponent=function(e){return Math.max(e.x,e.y,e.z,e.w)},Cartesian4.minimumComponent=function(e){return Math.min(e.x,e.y,e.z,e.w)},Cartesian4.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},Cartesian4.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},Cartesian4.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Cartesian4.magnitude=function(e){return Math.sqrt(Cartesian4.magnitudeSquared(e))};var distanceScratch$1=new Cartesian4;Cartesian4.distance=function(e,t){return Cartesian4.subtract(e,t,distanceScratch$1),Cartesian4.magnitude(distanceScratch$1)},Cartesian4.distanceSquared=function(e,t){return Cartesian4.subtract(e,t,distanceScratch$1),Cartesian4.magnitudeSquared(distanceScratch$1)},Cartesian4.normalize=function(e,t){var i=Cartesian4.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,t},Cartesian4.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Cartesian4.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},Cartesian4.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},Cartesian4.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},Cartesian4.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},Cartesian4.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},Cartesian4.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},Cartesian4.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Cartesian4.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var lerpScratch$1=new Cartesian4;Cartesian4.lerp=function(e,t,i,r){return Cartesian4.multiplyByScalar(t,i,lerpScratch$1),r=Cartesian4.multiplyByScalar(e,1-i,r),Cartesian4.add(lerpScratch$1,r,r)};var mostOrthogonalAxisScratch$1=new Cartesian4;Cartesian4.mostOrthogonalAxis=function(e,t){return e=Cartesian4.normalize(e,mostOrthogonalAxisScratch$1),Cartesian4.abs(e,e),e.x<=e.y?e.x<=e.z?e.x<=e.w?Cartesian4.clone(Cartesian4.UNIT_X,t):Cartesian4.clone(Cartesian4.UNIT_W,t):e.z<=e.w?Cartesian4.clone(Cartesian4.UNIT_Z,t):Cartesian4.clone(Cartesian4.UNIT_W,t):e.y<=e.z?e.y<=e.w?Cartesian4.clone(Cartesian4.UNIT_Y,t):Cartesian4.clone(Cartesian4.UNIT_W,t):e.z<=e.w?Cartesian4.clone(Cartesian4.UNIT_Z,t):Cartesian4.clone(Cartesian4.UNIT_W,t)},Cartesian4.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Cartesian4.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},Cartesian4.equalsEpsilon=function(e,t,i,r){return e===t||defined(e)&&defined(t)&&CesiumMath.equalsEpsilon(e.x,t.x,i,r)&&CesiumMath.equalsEpsilon(e.y,t.y,i,r)&&CesiumMath.equalsEpsilon(e.z,t.z,i,r)&&CesiumMath.equalsEpsilon(e.w,t.w,i,r)},Cartesian4.ZERO=Object.freeze(new Cartesian4(0,0,0,0)),Cartesian4.UNIT_X=Object.freeze(new Cartesian4(1,0,0,0)),Cartesian4.UNIT_Y=Object.freeze(new Cartesian4(0,1,0,0)),Cartesian4.UNIT_Z=Object.freeze(new Cartesian4(0,0,1,0)),Cartesian4.UNIT_W=Object.freeze(new Cartesian4(0,0,0,1)),Cartesian4.prototype.clone=function(e){return Cartesian4.clone(this,e)},Cartesian4.prototype.equals=function(e){return Cartesian4.equals(this,e)},Cartesian4.prototype.equalsEpsilon=function(e,t,i){return Cartesian4.equalsEpsilon(this,e,t,i)},Cartesian4.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var scratchFloatArray=new Float32Array(1),SHIFT_LEFT_8=256,SHIFT_LEFT_16=65536,SHIFT_LEFT_24=16777216,SHIFT_RIGHT_8=1/SHIFT_LEFT_8,SHIFT_RIGHT_16=1/SHIFT_LEFT_16,SHIFT_RIGHT_24=1/SHIFT_LEFT_24,BIAS=38;function RuntimeError(e){var t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}function Matrix4(e,t,i,r,n,a,o,s,l,c,u,d,h,p,f,m){this[0]=defaultValue(e,0),this[1]=defaultValue(n,0),this[2]=defaultValue(l,0),this[3]=defaultValue(h,0),this[4]=defaultValue(t,0),this[5]=defaultValue(a,0),this[6]=defaultValue(c,0),this[7]=defaultValue(p,0),this[8]=defaultValue(i,0),this[9]=defaultValue(o,0),this[10]=defaultValue(u,0),this[11]=defaultValue(f,0),this[12]=defaultValue(r,0),this[13]=defaultValue(s,0),this[14]=defaultValue(d,0),this[15]=defaultValue(m,0)}Cartesian4.packFloat=function(e,t){if(defined(t)||(t=new Cartesian4),scratchFloatArray[0]=e,0===(e=scratchFloatArray[0]))return Cartesian4.clone(Cartesian4.ZERO,t);var i,r=e<0?1:0;return isFinite(e)?(e=Math.abs(e),i=Math.floor(CesiumMath.logBase(e,10))+1,e/=Math.pow(10,i)):(e=.1,i=BIAS),e*=SHIFT_LEFT_8,t.x=Math.floor(e),e=(e-t.x)*SHIFT_LEFT_8,t.y=Math.floor(e),e=(e-t.y)*SHIFT_LEFT_8,t.z=Math.floor(e),t.w=2*(i+BIAS)+r,t},Cartesian4.unpackFloat=function(e){var t=e.w/2,i=Math.floor(t),r=-(r=2*(r=2*(t-i))-1);return BIAS<=(i-=BIAS)?r<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY:(t=r*e.x*SHIFT_RIGHT_8,t+=r*e.y*SHIFT_RIGHT_16,(t+=r*e.z*SHIFT_RIGHT_24)*Math.pow(10,i))},defined(Object.create)&&(RuntimeError.prototype=Object.create(Error.prototype),RuntimeError.prototype.constructor=RuntimeError),RuntimeError.prototype.toString=function(){var e=this.name+": "+this.message;return defined(this.stack)&&(e+="\n"+this.stack.toString()),e},Matrix4.packedLength=16,Matrix4.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t[i++]=e[9],t[i++]=e[10],t[i++]=e[11],t[i++]=e[12],t[i++]=e[13],t[i++]=e[14],t[i]=e[15],t},Matrix4.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix4),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i[9]=e[t++],i[10]=e[t++],i[11]=e[t++],i[12]=e[t++],i[13]=e[t++],i[14]=e[t++],i[15]=e[t],i},Matrix4.clone=function(e,t){if(defined(e))return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new Matrix4(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},Matrix4.fromArray=Matrix4.unpack,Matrix4.fromColumnMajorArray=function(e,t){return Matrix4.clone(e,t)},Matrix4.fromRowMajorArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new Matrix4(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},Matrix4.fromRotationTranslation=function(e,t,i){return t=defaultValue(t,Cartesian3.ZERO),defined(i)?(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=0,i[4]=e[3],i[5]=e[4],i[6]=e[5],i[7]=0,i[8]=e[6],i[9]=e[7],i[10]=e[8],i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i):new Matrix4(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},Matrix4.fromTranslationQuaternionRotationScale=function(e,t,i,r){defined(r)||(r=new Matrix4);var n=i.x,a=i.y,o=i.z,s=t.x*t.x,l=t.x*t.y,c=t.x*t.z,u=t.x*t.w,d=t.y*t.y,h=t.y*t.z,p=t.y*t.w,f=t.z*t.z,m=t.z*t.w,g=s-d-f+(_=t.w*t.w),y=2*(l-m),_=(i=2*(c+p),t=2*(l+m),l=d-s-f+_,m=2*(h-u),p=2*(c-p),u=2*(h+u),-s-d+f+_);return r[0]=g*n,r[1]=t*n,r[2]=p*n,r[3]=0,r[4]=y*a,r[5]=l*a,r[6]=u*a,r[7]=0,r[8]=i*o,r[9]=m*o,r[10]=_*o,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,r},Matrix4.fromTranslationRotationScale=function(e,t){return Matrix4.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},Matrix4.fromTranslation=function(e,t){return Matrix4.fromRotationTranslation(Matrix3.IDENTITY,e,t)},Matrix4.fromScale=function(e,t){return defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new Matrix4(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},Matrix4.fromUniformScale=function(e,t){return defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new Matrix4(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var fromCameraF=new Cartesian3,fromCameraR=new Cartesian3,fromCameraU=new Cartesian3;Matrix4.fromCamera=function(e,t){var i=e.position,r=e.direction,n=e.up;Cartesian3.normalize(r,fromCameraF),Cartesian3.normalize(Cartesian3.cross(fromCameraF,n,fromCameraR),fromCameraR),Cartesian3.normalize(Cartesian3.cross(fromCameraR,fromCameraF,fromCameraU),fromCameraU);var a=fromCameraR.x,o=fromCameraR.y,s=fromCameraR.z,l=fromCameraF.x,c=fromCameraF.y,u=fromCameraF.z,d=fromCameraU.x,h=fromCameraU.y,p=fromCameraU.z,f=i.x;n=a*-f+o*-(e=i.y)+s*-(r=i.z),i=d*-f+h*-e+p*-r,r=l*f+c*e+u*r;return defined(t)?(t[0]=a,t[1]=d,t[2]=-l,t[3]=0,t[4]=o,t[5]=h,t[6]=-c,t[7]=0,t[8]=s,t[9]=p,t[10]=-u,t[11]=0,t[12]=n,t[13]=i,t[14]=r,t[15]=1,t):new Matrix4(a,o,s,n,d,h,p,i,-l,-c,-u,r,0,0,0,1)},Matrix4.computePerspectiveFieldOfView=function(e,t,i,r,n){var a=1/Math.tan(.5*e);e=a/t,t=(r+i)/(i-r),r=2*r*i/(i-r);return n[0]=e,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=a,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t,n[11]=-1,n[12]=0,n[13]=0,n[14]=r,n[15]=0,n},Matrix4.computeOrthographicOffCenter=function(e,t,i,r,n,a,o){var s=1/(t-e),l=1/(r-i),c=1/(a-n);e=-(t+e)*s,i=-(r+i)*l,n=-(a+n)*c;return s*=2,l*=2,c*=-2,o[0]=s,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=l,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=c,o[11]=0,o[12]=e,o[13]=i,o[14]=n,o[15]=1,o},Matrix4.computePerspectiveOffCenter=function(e,t,i,r,n,a,o){var s=2*n/(t-e),l=2*n/(r-i);e=(t+e)/(t-e),r=(r+i)/(r-i),i=-(a+n)/(a-n),n=-2*a*n/(a-n);return o[0]=s,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=l,o[6]=0,o[7]=0,o[8]=e,o[9]=r,o[10]=i,o[11]=-1,o[12]=0,o[13]=0,o[14]=n,o[15]=0,o},Matrix4.computeInfinitePerspectiveOffCenter=function(e,t,i,r,n,a){var o=2*n/(t-e),s=2*n/(r-i);e=(t+e)/(t-e),i=(r+i)/(r-i),n*=-2;return a[0]=o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=s,a[6]=0,a[7]=0,a[8]=e,a[9]=i,a[10]=-1,a[11]=-1,a[12]=0,a[13]=0,a[14]=n,a[15]=0,a},Matrix4.computeViewportTransformation=function(e,t,i,r){defined(r)||(r=new Matrix4),e=defaultValue(e,defaultValue.EMPTY_OBJECT);var n=defaultValue(e.x,0),a=defaultValue(e.y,0),o=defaultValue(e.width,0),s=defaultValue(e.height,0);t=defaultValue(t,0);var l=.5*o;s=e=.5*s,i=o=.5*((i=defaultValue(i,1))-t),n+=l,e=a+e,o=t+o;return r[0]=l,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=i,r[11]=0,r[12]=n,r[13]=e,r[14]=o,r[15]=1,r},Matrix4.computeView=function(e,t,i,r,n){return n[0]=r.x,n[1]=i.x,n[2]=-t.x,n[3]=0,n[4]=r.y,n[5]=i.y,n[6]=-t.y,n[7]=0,n[8]=r.z,n[9]=i.z,n[10]=-t.z,n[11]=0,n[12]=-Cartesian3.dot(r,e),n[13]=-Cartesian3.dot(i,e),n[14]=Cartesian3.dot(t,e),n[15]=1,n},Matrix4.toArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},Matrix4.getElementIndex=function(e,t){return 4*e+t},Matrix4.getColumn=function(e,t,i){var r=e[a=4*t],n=e[1+a],a=(t=e[2+a],e[3+a]);return i.x=r,i.y=n,i.z=t,i.w=a,i},Matrix4.setColumn=function(e,t,i,r){return t*=4,(r=Matrix4.clone(e,r))[t]=i.x,r[1+t]=i.y,r[2+t]=i.z,r[3+t]=i.w,r},Matrix4.setTranslation=function(e,t,i){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i};var scaleScratch=new Cartesian3;Matrix4.setScale=function(e,t,i){var r=Matrix4.getScale(e,scaleScratch);r=Cartesian3.divideComponents(t,r,scaleScratch);return Matrix4.multiplyByScale(e,r,i)},Matrix4.getRow=function(e,t,i){var r=e[t],n=e[t+4],a=e[t+8];t=e[t+12];return i.x=r,i.y=n,i.z=a,i.w=t,i},Matrix4.setRow=function(e,t,i,r){return(r=Matrix4.clone(e,r))[t]=i.x,r[t+4]=i.y,r[t+8]=i.z,r[t+12]=i.w,r};var scratchColumn$1=new Cartesian3;Matrix4.getScale=function(e,t){return t.x=Cartesian3.magnitude(Cartesian3.fromElements(e[0],e[1],e[2],scratchColumn$1)),t.y=Cartesian3.magnitude(Cartesian3.fromElements(e[4],e[5],e[6],scratchColumn$1)),t.z=Cartesian3.magnitude(Cartesian3.fromElements(e[8],e[9],e[10],scratchColumn$1)),t};var scratchScale$1=new Cartesian3;Matrix4.getMaximumScale=function(e){return Matrix4.getScale(e,scratchScale$1),Cartesian3.maximumComponent(scratchScale$1)},Matrix4.multiply=function(e,t,i){var r=e[0],n=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=e[9],p=e[10],f=e[11],m=e[12],g=e[13],y=e[14],_=e[15],v=t[0],C=t[1],x=t[2],b=t[3],S=t[4],T=t[5],E=t[6],w=t[7],A=t[8],P=t[9],D=t[10],M=t[11],I=t[12],R=t[13],O=t[14],L=t[15],N=r*v+s*C+d*x+m*b;e=n*v+l*C+h*x+g*b,t=a*v+c*C+p*x+y*b,v=o*v+u*C+f*x+_*b,C=r*S+s*T+d*E+m*w,x=n*S+l*T+h*E+g*w,b=a*S+c*T+p*E+y*w,S=o*S+u*T+f*E+_*w,T=r*A+s*P+d*D+m*M,E=n*A+l*P+h*D+g*M,w=a*A+c*P+p*D+y*M,M=o*A+u*P+f*D+_*M,m=r*I+s*R+d*O+m*L,g=n*I+l*R+h*O+g*L,y=a*I+c*R+p*O+y*L,L=o*I+u*R+f*O+_*L;return i[0]=N,i[1]=e,i[2]=t,i[3]=v,i[4]=C,i[5]=x,i[6]=b,i[7]=S,i[8]=T,i[9]=E,i[10]=w,i[11]=M,i[12]=m,i[13]=g,i[14]=y,i[15]=L,i},Matrix4.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},Matrix4.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},Matrix4.multiplyTransformation=function(e,t,i){var r=e[0],n=e[1],a=e[2],o=e[4],s=e[5],l=e[6],c=e[8],u=e[9],d=e[10],h=e[12],p=e[13],f=e[14],m=t[0],g=t[1],y=t[2],_=t[4],v=t[5],C=t[6],x=t[8],b=t[9],S=t[10],T=t[12],E=t[13],w=t[14];e=r*m+o*g+c*y,t=n*m+s*g+u*y,m=a*m+l*g+d*y,g=r*_+o*v+c*C,y=n*_+s*v+u*C,_=a*_+l*v+d*C,v=r*x+o*b+c*S,C=n*x+s*b+u*S,S=a*x+l*b+d*S,h=r*T+o*E+c*w+h,p=n*T+s*E+u*w+p,f=a*T+l*E+d*w+f;return i[0]=e,i[1]=t,i[2]=m,i[3]=0,i[4]=g,i[5]=y,i[6]=_,i[7]=0,i[8]=v,i[9]=C,i[10]=S,i[11]=0,i[12]=h,i[13]=p,i[14]=f,i[15]=1,i},Matrix4.multiplyByMatrix3=function(e,t,i){var r=e[0],n=e[1],a=e[2],o=e[4],s=e[5],l=e[6],c=e[8],u=e[9],d=e[10],h=t[0],p=t[1],f=t[2],m=t[3],g=t[4],y=t[5],_=t[6],v=t[7],C=t[8],x=r*h+o*p+c*f;t=n*h+s*p+u*f,h=a*h+l*p+d*f,p=r*m+o*g+c*y,f=n*m+s*g+u*y,y=a*m+l*g+d*y,c=r*_+o*v+c*C,u=n*_+s*v+u*C,C=a*_+l*v+d*C;return i[0]=x,i[1]=t,i[2]=h,i[3]=0,i[4]=p,i[5]=f,i[6]=y,i[7]=0,i[8]=c,i[9]=u,i[10]=C,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},Matrix4.multiplyByTranslation=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=r*e[0]+n*e[4]+a*e[8]+e[12];t=r*e[1]+n*e[5]+a*e[9]+e[13],a=r*e[2]+n*e[6]+a*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=o,i[13]=t,i[14]=a,i[15]=e[15],i};var uniformScaleScratch=new Cartesian3;Matrix4.multiplyByUniformScale=function(e,t,i){return uniformScaleScratch.x=t,uniformScaleScratch.y=t,uniformScaleScratch.z=t,Matrix4.multiplyByScale(e,uniformScaleScratch,i)},Matrix4.multiplyByScale=function(e,t,i){var r=t.x,n=t.y;t=t.z;return 1===r&&1===n&&1===t?Matrix4.clone(e,i):(i[0]=r*e[0],i[1]=r*e[1],i[2]=r*e[2],i[3]=0,i[4]=n*e[4],i[5]=n*e[5],i[6]=n*e[6],i[7]=0,i[8]=t*e[8],i[9]=t*e[9],i[10]=t*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},Matrix4.multiplyByVector=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=t.w,s=e[0]*r+e[4]*n+e[8]*a+e[12]*o,l=e[1]*r+e[5]*n+e[9]*a+e[13]*o;t=e[2]*r+e[6]*n+e[10]*a+e[14]*o,o=e[3]*r+e[7]*n+e[11]*a+e[15]*o;return i.x=s,i.y=l,i.z=t,i.w=o,i},Matrix4.multiplyByPointAsVector=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=e[0]*r+e[4]*n+e[8]*a;t=e[1]*r+e[5]*n+e[9]*a,a=e[2]*r+e[6]*n+e[10]*a;return i.x=o,i.y=t,i.z=a,i},Matrix4.multiplyByPoint=function(e,t,i){var r=t.x,n=t.y,a=t.z,o=e[0]*r+e[4]*n+e[8]*a+e[12];t=e[1]*r+e[5]*n+e[9]*a+e[13],e=e[2]*r+e[6]*n+e[10]*a+e[14];return i.x=o,i.y=t,i.z=e,i},Matrix4.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},Matrix4.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},Matrix4.transpose=function(e,t){var i=e[1],r=e[2],n=e[3],a=e[6],o=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[10]=e[10],t[11]=e[14],t[12]=n,t[13]=o,t[14]=s,t[15]=e[15],t},Matrix4.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},Matrix4.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},Matrix4.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},Matrix4.getTranslation=function(e,t){return t.x=e[12],t.y=e[13],t.z=e[14],t},Matrix4.getMatrix3=function(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var scratchInverseRotation=new Matrix3,scratchMatrix3Zero=new Matrix3,scratchBottomRow=new Cartesian4,scratchExpectedBottomRow=new Cartesian4(0,0,0,1);Matrix4.inverse=function(e,t){var i=e[0],r=e[4],n=e[8],a=e[12],o=e[1],s=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],p=e[14],f=e[3],m=e[7],g=e[11],y=h*(F=e[15]),_=d*F,v=p*m,C=d*g,x=h*m,b=u*F,S=u*g,T=h*f,E=u*m,w=d*f,A=y*s+v*l+C*c-((B=p*g)*s+_*l+x*c),P=B*o+b*l+T*c-(y*o+(V=p*f)*l+S*c),D=_*o+V*s+E*c-(v*o+b*s+w*c),M=x*o+S*s+w*l-(C*o+T*s+E*l),I=B*r+_*n+x*a-(y*r+v*n+C*a),R=y*i+V*n+S*a-(B*i+b*n+T*a),O=v*i+b*r+w*a-(_*i+V*r+E*a),L=C*i+T*r+E*n-(x*i+S*r+w*n),N=(y=n*c)*m+(v=a*s)*g+(C=r*l)*F-((B=a*l)*m+(_=r*c)*g+(x=n*s)*F),F=(l=B*f+(b=i*c)*g+(T=n*o)*F-(y*f+(V=a*o)*g+(S=i*l)*F),_*f+V*m+(E=i*s)*F-(v*f+b*m+(w=r*o)*F)),B=(m=x*f+S*m+w*g-(C*f+T*m+E*g),g=_*h+x*p+B*d-(C*p+y*d+v*h),S*p+y*u+V*h-(b*h+T*p+B*u)),V=b*d+w*p+v*u-(E*p+_*u+V*d);u=E*h+C*u+T*d-(S*d+w*h+x*u),a=i*A+r*P+n*D+a*M;if(Math.abs(a)<CesiumMath.EPSILON21){if(Matrix3.equalsEpsilon(Matrix4.getMatrix3(e,scratchInverseRotation),scratchMatrix3Zero,CesiumMath.EPSILON7)&&Cartesian4.equals(Matrix4.getRow(e,3,scratchBottomRow),scratchExpectedBottomRow))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new RuntimeError("matrix is not invertible because its determinate is zero.")}return a=1/a,t[0]=A*a,t[1]=P*a,t[2]=D*a,t[3]=M*a,t[4]=I*a,t[5]=R*a,t[6]=O*a,t[7]=L*a,t[8]=N*a,t[9]=l*a,t[10]=F*a,t[11]=m*a,t[12]=g*a,t[13]=B*a,t[14]=V*a,t[15]=u*a,t},Matrix4.inverseTransformation=function(e,t){var i=e[0],r=e[1],n=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],u=e[10],d=e[12],h=e[13],p=-i*d-r*h-n*(f=e[14]),f=(e=-a*d-o*h-s*f,-l*d-c*h-u*f);return t[0]=i,t[1]=a,t[2]=l,t[3]=0,t[4]=r,t[5]=o,t[6]=c,t[7]=0,t[8]=n,t[9]=s,t[10]=u,t[11]=0,t[12]=p,t[13]=e,t[14]=f,t[15]=1,t};var scratchTransposeMatrix$1=new Matrix4;function Rectangle(e,t,i,r){this.west=defaultValue(e,0),this.south=defaultValue(t,0),this.east=defaultValue(i,0),this.north=defaultValue(r,0)}Matrix4.inverseTranspose=function(e,t){return Matrix4.inverse(Matrix4.transpose(e,scratchTransposeMatrix$1),t)},Matrix4.IDENTITY=Object.freeze(new Matrix4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),Matrix4.ZERO=Object.freeze(new Matrix4(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),Matrix4.COLUMN0ROW0=0,Matrix4.COLUMN0ROW1=1,Matrix4.COLUMN0ROW2=2,Matrix4.COLUMN0ROW3=3,Matrix4.COLUMN1ROW0=4,Matrix4.COLUMN1ROW1=5,Matrix4.COLUMN1ROW2=6,Matrix4.COLUMN1ROW3=7,Matrix4.COLUMN2ROW0=8,Matrix4.COLUMN2ROW1=9,Matrix4.COLUMN2ROW2=10,Matrix4.COLUMN2ROW3=11,Matrix4.COLUMN3ROW0=12,Matrix4.COLUMN3ROW1=13,Matrix4.COLUMN3ROW2=14,Matrix4.COLUMN3ROW3=15,Object.defineProperties(Matrix4.prototype,{length:{get:function(){return Matrix4.packedLength}}}),Matrix4.prototype.clone=function(e){return Matrix4.clone(this,e)},Matrix4.prototype.equals=function(e){return Matrix4.equals(this,e)},Matrix4.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]&&e[9]===t[i+9]&&e[10]===t[i+10]&&e[11]===t[i+11]&&e[12]===t[i+12]&&e[13]===t[i+13]&&e[14]===t[i+14]&&e[15]===t[i+15]},Matrix4.prototype.equalsEpsilon=function(e,t){return Matrix4.equalsEpsilon(this,e,t)},Matrix4.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},Object.defineProperties(Rectangle.prototype,{width:{get:function(){return Rectangle.computeWidth(this)}},height:{get:function(){return Rectangle.computeHeight(this)}}}),Rectangle.packedLength=4,Rectangle.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},Rectangle.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Rectangle),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},Rectangle.computeWidth=function(e){var t=e.east;return t<(e=e.west)&&(t+=CesiumMath.TWO_PI),t-e},Rectangle.computeHeight=function(e){return e.north-e.south},Rectangle.fromDegrees=function(e,t,i,r,n){return e=CesiumMath.toRadians(defaultValue(e,0)),t=CesiumMath.toRadians(defaultValue(t,0)),i=CesiumMath.toRadians(defaultValue(i,0)),r=CesiumMath.toRadians(defaultValue(r,0)),defined(n)?(n.west=e,n.south=t,n.east=i,n.north=r,n):new Rectangle(e,t,i,r)},Rectangle.fromRadians=function(e,t,i,r,n){return defined(n)?(n.west=defaultValue(e,0),n.south=defaultValue(t,0),n.east=defaultValue(i,0),n.north=defaultValue(r,0),n):new Rectangle(e,t,i,r)},Rectangle.fromCartographicArray=function(e,t){for(var i=Number.MAX_VALUE,r=-Number.MAX_VALUE,n=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0,c=e.length;l<c;l++){var u=e[l];i=Math.min(i,u.longitude),r=Math.max(r,u.longitude),o=Math.min(o,u.latitude),s=Math.max(s,u.latitude),u=0<=u.longitude?u.longitude:u.longitude+CesiumMath.TWO_PI,n=Math.min(n,u),a=Math.max(a,u)}return a-n<r-i&&(i=n,(r=a)>CesiumMath.PI&&(r-=CesiumMath.TWO_PI),i>CesiumMath.PI&&(i-=CesiumMath.TWO_PI)),defined(t)?(t.west=i,t.south=o,t.east=r,t.north=s,t):new Rectangle(i,o,r,s)},Rectangle.fromCartesianArray=function(e,t,i){t=defaultValue(t,Ellipsoid.WGS84);for(var r=Number.MAX_VALUE,n=-Number.MAX_VALUE,a=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,c=0,u=e.length;c<u;c++){var d=t.cartesianToCartographic(e[c]);r=Math.min(r,d.longitude),n=Math.max(n,d.longitude),s=Math.min(s,d.latitude),l=Math.max(l,d.latitude),d=0<=d.longitude?d.longitude:d.longitude+CesiumMath.TWO_PI,a=Math.min(a,d),o=Math.max(o,d)}return o-a<n-r&&(r=a,(n=o)>CesiumMath.PI&&(n-=CesiumMath.TWO_PI),r>CesiumMath.PI&&(r-=CesiumMath.TWO_PI)),defined(i)?(i.west=r,i.south=s,i.east=n,i.north=l,i):new Rectangle(r,s,n,l)},Rectangle.clone=function(e,t){if(defined(e))return defined(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Rectangle(e.west,e.south,e.east,e.north)},Rectangle.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},Rectangle.prototype.clone=function(e){return Rectangle.clone(this,e)},Rectangle.prototype.equals=function(e){return Rectangle.equals(this,e)},Rectangle.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},Rectangle.prototype.equalsEpsilon=function(e,t){return Rectangle.equalsEpsilon(this,e,t)},Rectangle.validate=function(e){},Rectangle.southwest=function(e,t){return defined(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Cartographic(e.west,e.south)},Rectangle.northwest=function(e,t){return defined(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Cartographic(e.west,e.north)},Rectangle.northeast=function(e,t){return defined(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Cartographic(e.east,e.north)},Rectangle.southeast=function(e,t){return defined(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Cartographic(e.east,e.south)},Rectangle.center=function(e,t){var i=e.east,r=e.west;return i<r&&(i+=CesiumMath.TWO_PI),i=CesiumMath.negativePiToPi(.5*(r+i)),e=.5*(e.south+e.north),defined(t)?(t.longitude=i,t.latitude=e,t.height=0,t):new Cartographic(i,e)},Rectangle.intersection=function(e,t,i){var r=e.east,n=e.west,a=t.east,o=t.west;if(r<n&&0<a?r+=CesiumMath.TWO_PI:a<o&&0<r&&(a+=CesiumMath.TWO_PI),r<n&&o<0?o+=CesiumMath.TWO_PI:a<o&&n<0&&(n+=CesiumMath.TWO_PI),o=CesiumMath.negativePiToPi(Math.max(n,o)),r=CesiumMath.negativePiToPi(Math.min(r,a)),!((e.west<e.east||t.west<t.east)&&r<=o||(a=Math.max(e.south,t.south),(t=Math.min(e.north,t.north))<=a)))return defined(i)?(i.west=o,i.south=a,i.east=r,i.north=t,i):new Rectangle(o,a,r,t)},Rectangle.simpleIntersection=function(e,t,i){var r=Math.max(e.west,t.west),n=Math.max(e.south,t.south),a=Math.min(e.east,t.east);if(!((t=Math.min(e.north,t.north))<=n||a<=r))return defined(i)?(i.west=r,i.south=n,i.east=a,i.north=t,i):new Rectangle(r,n,a,t)},Rectangle.union=function(e,t,i){defined(i)||(i=new Rectangle);var r=e.east,n=e.west,a=t.east,o=t.west;return r<n&&0<a?r+=CesiumMath.TWO_PI:a<o&&0<r&&(a+=CesiumMath.TWO_PI),r<n&&o<0?o+=CesiumMath.TWO_PI:a<o&&n<0&&(n+=CesiumMath.TWO_PI),o=CesiumMath.convertLongitudeRange(Math.min(n,o)),a=CesiumMath.convertLongitudeRange(Math.max(r,a)),i.west=o,i.south=Math.min(e.south,t.south),i.east=a,i.north=Math.max(e.north,t.north),i},Rectangle.expand=function(e,t,i){return defined(i)||(i=new Rectangle),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},Rectangle.contains=function(e,t){var i=t.longitude,r=t.latitude,n=e.west;return(t=e.east)<n&&(t+=CesiumMath.TWO_PI,i<0&&(i+=CesiumMath.TWO_PI)),(n<i||CesiumMath.equalsEpsilon(i,n,CesiumMath.EPSILON14))&&(i<t||CesiumMath.equalsEpsilon(i,t,CesiumMath.EPSILON14))&&r>=e.south&&r<=e.north};var subsampleLlaScratch=new Cartographic;function BoundingSphere(e,t){this.center=Cartesian3.clone(defaultValue(e,Cartesian3.ZERO)),this.radius=defaultValue(t,0)}Rectangle.subsample=function(e,t,i,r){t=defaultValue(t,Ellipsoid.WGS84),i=defaultValue(i,0),defined(r)||(r=[]);var n=0,a=e.north,o=e.south,s=e.east,l=e.west,c=subsampleLlaScratch;c.height=i,c.longitude=l,c.latitude=a,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.longitude=s,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.latitude=o,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.longitude=l,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.latitude=a<0?a:0<o?o:0;for(var u=1;u<8;++u)c.longitude=-Math.PI+u*CesiumMath.PI_OVER_TWO,Rectangle.contains(e,c)&&(r[n]=t.cartographicToCartesian(c,r[n]),n++);return 0===c.latitude&&(c.longitude=l,r[n]=t.cartographicToCartesian(c,r[n]),n++,c.longitude=s,r[n]=t.cartographicToCartesian(c,r[n]),n++),r.length=n,r},Rectangle.MAX_VALUE=Object.freeze(new Rectangle(-Math.PI,-CesiumMath.PI_OVER_TWO,Math.PI,CesiumMath.PI_OVER_TWO));var fromPointsXMin=new Cartesian3,fromPointsYMin=new Cartesian3,fromPointsZMin=new Cartesian3,fromPointsXMax=new Cartesian3,fromPointsYMax=new Cartesian3,fromPointsZMax=new Cartesian3,fromPointsCurrentPos=new Cartesian3,fromPointsScratch=new Cartesian3,fromPointsRitterCenter=new Cartesian3,fromPointsMinBoxPt=new Cartesian3,fromPointsMaxBoxPt=new Cartesian3,fromPointsNaiveCenterScratch=new Cartesian3,volumeConstant=4/3*CesiumMath.PI;BoundingSphere.fromPoints=function(e,t){if(defined(t)||(t=new BoundingSphere),!defined(e)||0===e.length)return t.center=Cartesian3.clone(Cartesian3.ZERO,t.center),t.radius=0,t;for(var i=Cartesian3.clone(e[0],fromPointsCurrentPos),r=Cartesian3.clone(i,fromPointsXMin),n=Cartesian3.clone(i,fromPointsYMin),a=Cartesian3.clone(i,fromPointsZMin),o=Cartesian3.clone(i,fromPointsXMax),s=Cartesian3.clone(i,fromPointsYMax),l=Cartesian3.clone(i,fromPointsZMax),c=e.length,u=1;u<c;u++){Cartesian3.clone(e[u],i);var d=i.x,h=i.y,p=i.z;d<r.x&&Cartesian3.clone(i,r),d>o.x&&Cartesian3.clone(i,o),h<n.y&&Cartesian3.clone(i,n),h>s.y&&Cartesian3.clone(i,s),p<a.z&&Cartesian3.clone(i,a),p>l.z&&Cartesian3.clone(i,l)}var f=Cartesian3.magnitudeSquared(Cartesian3.subtract(o,r,fromPointsScratch)),m=Cartesian3.magnitudeSquared(Cartesian3.subtract(s,n,fromPointsScratch)),g=Cartesian3.magnitudeSquared(Cartesian3.subtract(l,a,fromPointsScratch)),y=r,_=o;(f=f)<m&&(f=m,y=n,_=s),f<g&&(f=g,y=a,_=l);var v=fromPointsRitterCenter;v.x=.5*(y.x+_.x),v.y=.5*(y.y+_.y),v.z=.5*(y.z+_.z);var C=Cartesian3.magnitudeSquared(Cartesian3.subtract(_,v,fromPointsScratch)),x=Math.sqrt(C);(y=fromPointsMinBoxPt).x=r.x,y.y=n.y,y.z=a.z,(_=fromPointsMaxBoxPt).x=o.x,_.y=s.y,_.z=l.z;var b=Cartesian3.midpoint(y,_,fromPointsNaiveCenterScratch),S=0;for(u=0;u<c;u++){Cartesian3.clone(e[u],i);var T=Cartesian3.magnitude(Cartesian3.subtract(i,b,fromPointsScratch));S<T&&(S=T);var E=Cartesian3.magnitudeSquared(Cartesian3.subtract(i,v,fromPointsScratch));C<E&&(C=(x=.5*(x+(T=Math.sqrt(E))))*x,E=T-x,v.x=(x*v.x+E*i.x)/T,v.y=(x*v.y+E*i.y)/T,v.z=(x*v.z+E*i.z)/T)}return x<S?(Cartesian3.clone(v,t.center),t.radius=x):(Cartesian3.clone(b,t.center),t.radius=S),t};var defaultProjection=new GeographicProjection,fromRectangle2DLowerLeft=new Cartesian3,fromRectangle2DUpperRight=new Cartesian3,fromRectangle2DSouthwest=new Cartographic,fromRectangle2DNortheast=new Cartographic;BoundingSphere.fromRectangle2D=function(e,t,i){return BoundingSphere.fromRectangleWithHeights2D(e,t,0,0,i)},BoundingSphere.fromRectangleWithHeights2D=function(e,t,i,r,n){if(defined(n)||(n=new BoundingSphere),!defined(e))return n.center=Cartesian3.clone(Cartesian3.ZERO,n.center),n.radius=0,n;t=defaultValue(t,defaultProjection),Rectangle.southwest(e,fromRectangle2DSouthwest),fromRectangle2DSouthwest.height=i,Rectangle.northeast(e,fromRectangle2DNortheast),fromRectangle2DNortheast.height=r;var a=t.project(fromRectangle2DSouthwest,fromRectangle2DLowerLeft);e=(i=t.project(fromRectangle2DNortheast,fromRectangle2DUpperRight)).x-a.x,r=i.y-a.y,t=i.z-a.z;return n.radius=.5*Math.sqrt(e*e+r*r+t*t),(i=n.center).x=a.x+.5*e,i.y=a.y+.5*r,i.z=a.z+.5*t,n};var fromRectangle3DScratch=[];BoundingSphere.fromRectangle3D=function(e,t,i,r){return t=defaultValue(t,Ellipsoid.WGS84),i=defaultValue(i,0),defined(r)||(r=new BoundingSphere),defined(e)?(i=Rectangle.subsample(e,t,i,fromRectangle3DScratch),BoundingSphere.fromPoints(i,r)):(r.center=Cartesian3.clone(Cartesian3.ZERO,r.center),r.radius=0,r)},BoundingSphere.fromVertices=function(e,t,i,r){if(defined(r)||(r=new BoundingSphere),!defined(e)||0===e.length)return r.center=Cartesian3.clone(Cartesian3.ZERO,r.center),r.radius=0,r;t=defaultValue(t,Cartesian3.ZERO),i=defaultValue(i,3);var n=fromPointsCurrentPos;n.x=e[0]+t.x,n.y=e[1]+t.y,n.z=e[2]+t.z;for(var a=Cartesian3.clone(n,fromPointsXMin),o=Cartesian3.clone(n,fromPointsYMin),s=Cartesian3.clone(n,fromPointsZMin),l=Cartesian3.clone(n,fromPointsXMax),c=Cartesian3.clone(n,fromPointsYMax),u=Cartesian3.clone(n,fromPointsZMax),d=e.length,h=0;h<d;h+=i){var p=e[h]+t.x,f=e[h+1]+t.y,m=e[h+2]+t.z;n.x=p,n.y=f,n.z=m,p<a.x&&Cartesian3.clone(n,a),p>l.x&&Cartesian3.clone(n,l),f<o.y&&Cartesian3.clone(n,o),f>c.y&&Cartesian3.clone(n,c),m<s.z&&Cartesian3.clone(n,s),m>u.z&&Cartesian3.clone(n,u)}var g=Cartesian3.magnitudeSquared(Cartesian3.subtract(l,a,fromPointsScratch)),y=Cartesian3.magnitudeSquared(Cartesian3.subtract(c,o,fromPointsScratch)),_=Cartesian3.magnitudeSquared(Cartesian3.subtract(u,s,fromPointsScratch)),v=a,C=l;(g=g)<y&&(g=y,v=o,C=c),g<_&&(g=_,v=s,C=u);var x=fromPointsRitterCenter;x.x=.5*(v.x+C.x),x.y=.5*(v.y+C.y),x.z=.5*(v.z+C.z);var b=Cartesian3.magnitudeSquared(Cartesian3.subtract(C,x,fromPointsScratch)),S=Math.sqrt(b);(v=fromPointsMinBoxPt).x=a.x,v.y=o.y,v.z=s.z,(C=fromPointsMaxBoxPt).x=l.x,C.y=c.y,C.z=u.z;var T=Cartesian3.midpoint(v,C,fromPointsNaiveCenterScratch),E=0;for(h=0;h<d;h+=i){n.x=e[h]+t.x,n.y=e[h+1]+t.y,n.z=e[h+2]+t.z;var w=Cartesian3.magnitude(Cartesian3.subtract(n,T,fromPointsScratch));E<w&&(E=w);var A=Cartesian3.magnitudeSquared(Cartesian3.subtract(n,x,fromPointsScratch));b<A&&(b=(S=.5*(S+(w=Math.sqrt(A))))*S,A=w-S,x.x=(S*x.x+A*n.x)/w,x.y=(S*x.y+A*n.y)/w,x.z=(S*x.z+A*n.z)/w)}return S<E?(Cartesian3.clone(x,r.center),r.radius=S):(Cartesian3.clone(T,r.center),r.radius=E),r},BoundingSphere.fromEncodedCartesianVertices=function(e,t,i){if(defined(i)||(i=new BoundingSphere),!defined(e)||!defined(t)||e.length!==t.length||0===e.length)return i.center=Cartesian3.clone(Cartesian3.ZERO,i.center),i.radius=0,i;var r=fromPointsCurrentPos;r.x=e[0]+t[0],r.y=e[1]+t[1],r.z=e[2]+t[2];for(var n=Cartesian3.clone(r,fromPointsXMin),a=Cartesian3.clone(r,fromPointsYMin),o=Cartesian3.clone(r,fromPointsZMin),s=Cartesian3.clone(r,fromPointsXMax),l=Cartesian3.clone(r,fromPointsYMax),c=Cartesian3.clone(r,fromPointsZMax),u=e.length,d=0;d<u;d+=3){var h=e[d]+t[d],p=e[d+1]+t[d+1],f=e[d+2]+t[d+2];r.x=h,r.y=p,r.z=f,h<n.x&&Cartesian3.clone(r,n),h>s.x&&Cartesian3.clone(r,s),p<a.y&&Cartesian3.clone(r,a),p>l.y&&Cartesian3.clone(r,l),f<o.z&&Cartesian3.clone(r,o),f>c.z&&Cartesian3.clone(r,c)}var m=Cartesian3.magnitudeSquared(Cartesian3.subtract(s,n,fromPointsScratch)),g=Cartesian3.magnitudeSquared(Cartesian3.subtract(l,a,fromPointsScratch)),y=Cartesian3.magnitudeSquared(Cartesian3.subtract(c,o,fromPointsScratch)),_=n,v=s;(m=m)<g&&(m=g,_=a,v=l),m<y&&(m=y,_=o,v=c);var C=fromPointsRitterCenter;C.x=.5*(_.x+v.x),C.y=.5*(_.y+v.y),C.z=.5*(_.z+v.z);var x=Cartesian3.magnitudeSquared(Cartesian3.subtract(v,C,fromPointsScratch)),b=Math.sqrt(x);(_=fromPointsMinBoxPt).x=n.x,_.y=a.y,_.z=o.z,(v=fromPointsMaxBoxPt).x=s.x,v.y=l.y,v.z=c.z;var S=Cartesian3.midpoint(_,v,fromPointsNaiveCenterScratch),T=0;for(d=0;d<u;d+=3){r.x=e[d]+t[d],r.y=e[d+1]+t[d+1],r.z=e[d+2]+t[d+2];var E=Cartesian3.magnitude(Cartesian3.subtract(r,S,fromPointsScratch));T<E&&(T=E);var w=Cartesian3.magnitudeSquared(Cartesian3.subtract(r,C,fromPointsScratch));x<w&&(x=(b=.5*(b+(E=Math.sqrt(w))))*b,w=E-b,C.x=(b*C.x+w*r.x)/E,C.y=(b*C.y+w*r.y)/E,C.z=(b*C.z+w*r.z)/E)}return b<T?(Cartesian3.clone(C,i.center),i.radius=b):(Cartesian3.clone(S,i.center),i.radius=T),i},BoundingSphere.fromCornerPoints=function(e,t,i){return defined(i)||(i=new BoundingSphere),e=Cartesian3.midpoint(e,t,i.center),i.radius=Cartesian3.distance(e,t),i},BoundingSphere.fromEllipsoid=function(e,t){return defined(t)||(t=new BoundingSphere),Cartesian3.clone(Cartesian3.ZERO,t.center),t.radius=e.maximumRadius,t};var fromBoundingSpheresScratch=new Cartesian3;BoundingSphere.fromBoundingSpheres=function(e,t){if(defined(t)||(t=new BoundingSphere),!defined(e)||0===e.length)return t.center=Cartesian3.clone(Cartesian3.ZERO,t.center),t.radius=0,t;var i=e.length;if(1===i)return BoundingSphere.clone(e[0],t);if(2===i)return BoundingSphere.union(e[0],e[1],t);for(var r=[],n=0;n<i;n++)r.push(e[n].center);var a=(t=BoundingSphere.fromPoints(r,t)).center,o=t.radius;for(n=0;n<i;n++){var s=e[n];o=Math.max(o,Cartesian3.distance(a,s.center,fromBoundingSpheresScratch)+s.radius)}return t.radius=o,t};var fromOrientedBoundingBoxScratchU=new Cartesian3,fromOrientedBoundingBoxScratchV=new Cartesian3,fromOrientedBoundingBoxScratchW=new Cartesian3;BoundingSphere.fromOrientedBoundingBox=function(e,t){defined(t)||(t=new BoundingSphere);var i=e.halfAxes,r=Matrix3.getColumn(i,0,fromOrientedBoundingBoxScratchU),n=Matrix3.getColumn(i,1,fromOrientedBoundingBoxScratchV);i=Matrix3.getColumn(i,2,fromOrientedBoundingBoxScratchW);return Cartesian3.add(r,n,r),Cartesian3.add(r,i,r),t.center=Cartesian3.clone(e.center,t.center),t.radius=Cartesian3.magnitude(r),t},BoundingSphere.clone=function(e,t){if(defined(e))return defined(t)?(t.center=Cartesian3.clone(e.center,t.center),t.radius=e.radius,t):new BoundingSphere(e.center,e.radius)},BoundingSphere.packedLength=4,BoundingSphere.pack=function(e,t,i){i=defaultValue(i,0);var r=e.center;return t[i++]=r.x,t[i++]=r.y,t[i++]=r.z,t[i]=e.radius,t},BoundingSphere.unpack=function(e,t,i){t=defaultValue(t,0),defined(i)||(i=new BoundingSphere);var r=i.center;return r.x=e[t++],r.y=e[t++],r.z=e[t++],i.radius=e[t],i};var unionScratch=new Cartesian3,unionScratchCenter=new Cartesian3;BoundingSphere.union=function(e,t,i){defined(i)||(i=new BoundingSphere);var r=e.center,n=e.radius,a=t.center,o=t.radius,s=Cartesian3.subtract(a,r,unionScratch);return(a=Cartesian3.magnitude(s))+o<=n?(e.clone(i),i):a+n<=o?(t.clone(i),i):(o=.5*(n+a+o),a=Cartesian3.multiplyByScalar(s,(o-n)/a,unionScratchCenter),Cartesian3.add(a,r,a),Cartesian3.clone(a,i.center),i.radius=o,i)};var expandScratch=new Cartesian3;BoundingSphere.expand=function(e,t,i){return i=BoundingSphere.clone(e,i),(t=Cartesian3.magnitude(Cartesian3.subtract(t,i.center,expandScratch)))>i.radius&&(i.radius=t),i},BoundingSphere.intersectPlane=function(e,t){var i=e.center,r=e.radius;e=t.normal;return(t=Cartesian3.dot(e,i)+t.distance)<-r?Intersect$1.OUTSIDE:t<r?Intersect$1.INTERSECTING:Intersect$1.INSIDE},BoundingSphere.transform=function(e,t,i){return defined(i)||(i=new BoundingSphere),i.center=Matrix4.multiplyByPoint(t,e.center,i.center),i.radius=Matrix4.getMaximumScale(t)*e.radius,i};var distanceSquaredToScratch=new Cartesian3;BoundingSphere.distanceSquaredTo=function(e,t){return t=Cartesian3.subtract(e.center,t,distanceSquaredToScratch),Cartesian3.magnitudeSquared(t)-e.radius*e.radius},BoundingSphere.transformWithoutScale=function(e,t,i){return defined(i)||(i=new BoundingSphere),i.center=Matrix4.multiplyByPoint(t,e.center,i.center),i.radius=e.radius,i};var scratchCartesian3=new Cartesian3;BoundingSphere.computePlaneDistances=function(e,t,i,r){return defined(r)||(r=new Interval),t=Cartesian3.subtract(e.center,t,scratchCartesian3),t=Cartesian3.dot(i,t),r.start=t-e.radius,r.stop=t+e.radius,r};for(var projectTo2DNormalScratch=new Cartesian3,projectTo2DEastScratch=new Cartesian3,projectTo2DNorthScratch=new Cartesian3,projectTo2DWestScratch=new Cartesian3,projectTo2DSouthScratch=new Cartesian3,projectTo2DCartographicScratch=new Cartographic,projectTo2DPositionsScratch=new Array(8),n=0;n<8;++n)projectTo2DPositionsScratch[n]=new Cartesian3;var projectTo2DProjection=new GeographicProjection;function URI(e){e instanceof URI?(this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment):e&&(e=parseRegex.exec(e),this.scheme=e[1],this.authority=e[2],this.path=e[3],this.query=e[4],this.fragment=e[5])}BoundingSphere.projectTo2D=function(e,t,i){var r=(t=defaultValue(t,projectTo2DProjection)).ellipsoid,n=e.center,a=e.radius,o=Cartesian3.equals(n,Cartesian3.ZERO)?Cartesian3.clone(Cartesian3.UNIT_X,projectTo2DNormalScratch):r.geodeticSurfaceNormal(n,projectTo2DNormalScratch),s=Cartesian3.cross(Cartesian3.UNIT_Z,o,projectTo2DEastScratch);Cartesian3.normalize(s,s);var l=Cartesian3.cross(o,s,projectTo2DNorthScratch);Cartesian3.normalize(l,l),Cartesian3.multiplyByScalar(o,a,o),Cartesian3.multiplyByScalar(l,a,l),Cartesian3.multiplyByScalar(s,a,s);var c=Cartesian3.negate(l,projectTo2DSouthScratch),u=(e=Cartesian3.negate(s,projectTo2DWestScratch),projectTo2DPositionsScratch);a=u[0];Cartesian3.add(o,l,a),Cartesian3.add(a,s,a),a=u[1],Cartesian3.add(o,l,a),Cartesian3.add(a,e,a),a=u[2],Cartesian3.add(o,c,a),Cartesian3.add(a,e,a),a=u[3],Cartesian3.add(o,c,a),Cartesian3.add(a,s,a),Cartesian3.negate(o,o),a=u[4],Cartesian3.add(o,l,a),Cartesian3.add(a,s,a),a=u[5],Cartesian3.add(o,l,a),Cartesian3.add(a,e,a),a=u[6],Cartesian3.add(o,c,a),Cartesian3.add(a,e,a),a=u[7],Cartesian3.add(o,c,a),Cartesian3.add(a,s,a);for(var d=u.length,h=0;h<d;++h){var p=u[h];Cartesian3.add(n,p,p);var f=r.cartesianToCartographic(p,projectTo2DCartographicScratch);t.project(f,p)}return c=(n=(i=BoundingSphere.fromPoints(u,i)).center).x,s=n.y,a=n.z,n.x=a,n.y=c,n.z=s,i},BoundingSphere.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)},BoundingSphere.equals=function(e,t){return e===t||defined(e)&&defined(t)&&Cartesian3.equals(e.center,t.center)&&e.radius===t.radius},BoundingSphere.prototype.intersectPlane=function(e){return BoundingSphere.intersectPlane(this,e)},BoundingSphere.prototype.distanceSquaredTo=function(e){return BoundingSphere.distanceSquaredTo(this,e)},BoundingSphere.prototype.computePlaneDistances=function(e,t,i){return BoundingSphere.computePlaneDistances(this,e,t,i)},BoundingSphere.prototype.isOccluded=function(e){return BoundingSphere.isOccluded(this,e)},BoundingSphere.prototype.equals=function(e){return BoundingSphere.equals(this,e)},BoundingSphere.prototype.clone=function(e){return BoundingSphere.clone(this,e)},BoundingSphere.prototype.volume=function(){var e=this.radius;return volumeConstant*e*e*e},URI.prototype.scheme=null,URI.prototype.authority=null,URI.prototype.path="",URI.prototype.query=null,URI.prototype.fragment=null;var parseRegex=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");URI.prototype.getScheme=function(){return this.scheme},URI.prototype.getAuthority=function(){return this.authority},URI.prototype.getPath=function(){return this.path},URI.prototype.getQuery=function(){return this.query},URI.prototype.getFragment=function(){return this.fragment},URI.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},URI.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},URI.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},URI.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(authorityRegex,replaceAuthority).replace(caseRegex,replaceCase)),this.path&&(this.path=this.path.replace(caseRegex,replaceCase)),this.query&&(this.query=this.query.replace(caseRegex,replaceCase)),this.fragment&&(this.fragment=this.fragment.replace(caseRegex,replaceCase))};var caseRegex=/%[0-9a-z]{2}/gi,percentRegex=/[a-zA-Z0-9\-\._~]/,authorityRegex=/(.*@)?([^@:]*)(:.*)?/,reduceArray,slice,undef;function replaceCase(e){var t=unescape(e);return percentRegex.test(t)?t:e.toUpperCase()}function replaceAuthority(e,t,i,r){return(t||"")+i.toLowerCase()+(r||"")}function getAbsoluteUri(e,t){var i;return"undefined"!=typeof document&&(i=document),getAbsoluteUri._implementation(e,t,i)}function when(e,t,i,r){return resolve(e).then(t,i,r)}function resolve(e){var t;return e=e instanceof Promise$1?e:isPromise(e)?(t=defer(),e.then((function(e){t.resolve(e)}),(function(e){t.reject(e)}),(function(e){t.progress(e)})),t.promise):fulfilled(e)}function reject(e){return when(e,rejected)}function Promise$1(e){this.then=e}function fulfilled(e){return new Promise$1((function(t){try{return resolve(t?t(e):e)}catch(t){return rejected(t)}}))}function rejected(e){return new Promise$1((function(t,i){try{return i?resolve(i(e)):rejected(e)}catch(t){return rejected(t)}}))}function defer(){var e=new Promise$1(o),t=[],i=[],r=function(e,r,n){var a=defer(),o="function"==typeof n?function(e){try{a.progress(n(e))}catch(e){a.progress(e)}}:function(e){a.progress(e)};return t.push((function(t){t.then(e,r).then(a.resolve,a.reject,o)})),i.push(o),a.promise},n=function(e){return processQueue(i,e),e},a=function(e){return e=resolve(e),r=e.then,a=resolve,n=noop,processQueue(t,e),i=t=undef,e};return{then:o,resolve:s,reject:l,progress:c,promise:e,resolver:{resolve:s,reject:l,progress:c}};function o(e,t,i){return r(e,t,i)}function s(e){return a(e)}function l(e){return a(rejected(e))}function c(e){return n(e)}}function isPromise(e){return e&&"function"==typeof e.then}function some(e,t,i,r,n){return checkCallbacks(2,arguments),when(e,(function(e){var a,o,s,l,c=e.length>>>0,u=Math.max(0,Math.min(t,c)),d=[],h=c-u+1,p=[],f=defer();if(u)for(s=f.progress,o=function(e){p.push(e),--h||(a=o=noop,f.reject(p))},a=function(e){d.push(e),--u||(a=o=noop,f.resolve(d))},l=0;l<c;++l)l in e&&when(e[l],g,m,s);else f.resolve(d);return f.then(i,r,n);function m(e){o(e)}function g(e){a(e)}}))}function any(e,t,i,r){return some(e,1,(function(e){return t?t(e[0]):e[0]}),i,r)}function all(e,t,i,r){return checkCallbacks(1,arguments),map(e,identity).then(t,i,r)}function join(){return map(arguments,identity)}function map(e,t){return when(e,(function(e){var i,r,n,a=i=e.length>>>0,o=[],s=defer();if(a)for(r=function(e,i){when(e,t).then((function(e){o[i]=e,--a||s.resolve(o)}),s.reject)},n=0;n<i;n++)n in e?r(e[n],n):--a;else s.resolve(o);return s.promise}))}function reduce(e,t){var i=slice.call(arguments,1);return when(e,(function(e){var r=e.length;return i[0]=function(e,i,n){return when(e,(function(e){return when(i,(function(i){return t(e,i,n,r)}))}))},reduceArray.apply(e,i)}))}function chain(e,t,i){var r=2<arguments.length;return when(e,(function(e){return e=r?i:e,t.resolve(e),e}),(function(e){return t.reject(e),rejected(e)}),t.progress)}function processQueue(e,t){for(var i,r=0;i=e[r++];)i(t)}function checkCallbacks(e,t){for(var i,r=t.length;e<r;)if(null!=(i=t[--r])&&"function"!=typeof i)throw new Error("arg "+r+" must be a function")}function noop(){}function identity(e){return e}function appendForwardSlash(e){return 0!==e.length&&"/"===e[e.length-1]||(e+="/"),e}function clone(e,t){if(null===e||"object"!=typeof e)return e;t=defaultValue(t,!1);var i,r,n=new e.constructor;for(i in e)e.hasOwnProperty(i)&&(r=e[i],t&&(r=clone(r,t)),n[i]=r);return n}function combine(e,t,i){i=defaultValue(i,!1);var r,n,a,o={},s=defined(e),l=defined(t);if(s)for(r in e)e.hasOwnProperty(r)&&(n=e[r],l&&i&&"object"==typeof n&&t.hasOwnProperty(r)?(a=t[r],o[r]="object"==typeof a?combine(n,a,i):n):o[r]=n);if(l)for(r in t)t.hasOwnProperty(r)&&!o.hasOwnProperty(r)&&(a=t[r],o[r]=a);return o}function getBaseUri(e,t){var i="",r=e.lastIndexOf("/");return-1!==r&&(i=e.substring(0,r+1)),t&&(defined((e=new URI(e)).query)&&(i+="?"+e.query),defined(e.fragment)&&(i+="#"+e.fragment)),i}function getExtensionFromUri(e){var t=new URI(e);return t.normalize(),-1!==(t=(e=t.path).lastIndexOf("/"))&&(e=e.substr(t+1)),-1===(t=e.lastIndexOf("."))?"":e.substr(t+1)}URI.prototype.resolve=function(e){var t=new URI;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?t.path=this.path:e.authority&&""==e.path?t.path="/"+this.path:t.path=e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments(),t.query=this.query))),t.fragment=this.fragment,t},URI.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),i=[],r=""==t[0];for(r&&t.shift(),""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?i.pop():"."!=e&&i.push(e);"."!=e&&".."!=e||i.push(""),r&&i.unshift(""),this.path=i.join("/")},URI.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},getAbsoluteUri._implementation=function(e,t,i){if(!defined(t)){if(void 0===i)return e;t=defaultValue(i.baseURI,i.location.href)}return t=new URI(t),new URI(e).resolve(t).toString()},when.defer=defer,when.resolve=resolve,when.reject=reject,when.join=join,when.all=all,when.map=map,when.reduce=reduce,when.any=any,when.some=some,when.chain=chain,when.isPromise=isPromise,Promise$1.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(undef,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return all(t,(function(t){return e.apply(undef,t)}))}))}},slice=[].slice,reduceArray=[].reduce||function(e){var t,i=0,r=Object(this),n=r.length>>>0,a=arguments;if(a.length<=1)for(;;){if(i in r){t=r[i++];break}if(++i>=n)throw new TypeError}else t=a[1];for(;i<n;++i)i in r&&(t=e(t,r[i],i,r));return t};var blobUriRegex=/^blob:/i,a;function isBlobUri(e){return blobUriRegex.test(e)}function isCrossOriginUrl(e){defined(a)||(a=document.createElement("a")),a.href=window.location.href;var t=a.host,i=a.protocol;return a.href=e,a.href=a.href,i!==a.protocol||t!==a.host}var dataUriRegex=/^data:/i;function isDataUri(e){return dataUriRegex.test(e)}function loadAndExecuteScript(e){var t=when.defer(),i=document.createElement("script");i.async=!0,i.src=e;var r=document.getElementsByTagName("head")[0];return i.onload=function(){i.onload=void 0,r.removeChild(i),t.resolve()},i.onerror=function(e){t.reject(e)},r.appendChild(i),t.promise}function objectToQuery(e){var t,i="";for(t in e)if(e.hasOwnProperty(t)){var r=e[t],n=encodeURIComponent(t)+"=";if(Array.isArray(r))for(var a=0,o=r.length;a<o;++a)i+=n+encodeURIComponent(r[a])+"&";else i+=n+encodeURIComponent(r)+"&"}return i.slice(0,-1)}function queryToObject(e){var t={};if(""===e)return t;for(var i=e.replace(/\+/g,"%20").split(/[&;]/),r=0,n=i.length;r<n;++r){var a=i[r].split("="),o=decodeURIComponent(a[0]),s=defined(s=a[1])?decodeURIComponent(s):"";"string"==typeof(a=t[o])?t[o]=[a,s]:Array.isArray(a)?a.push(s):t[o]=s}return t}var RequestState={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},RequestState$1=Object.freeze(RequestState),RequestType={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},RequestType$1=Object.freeze(RequestType);function Request(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.throttleByServer,!1),i=defaultValue(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=defaultValue(e.priority,0),this.throttle=i,this.throttleByServer=t,this.type=defaultValue(e.type,RequestType$1.OTHER),this.serverKey=void 0,this.state=RequestState$1.UNISSUED,this.deferred=void 0,this.cancelled=!1}function parseResponseHeaders(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),r=0;r<i.length;++r){var n,a=i[r],o=a.indexOf(": ");0<o&&(n=a.substring(0,o),o=a.substring(o+2),t[n]=o)}return t}function RequestErrorEvent(e,t,i){this.statusCode=e,this.response=t,this.responseHeaders=i,"string"==typeof this.responseHeaders&&(this.responseHeaders=parseResponseHeaders(this.responseHeaders))}function Event(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function compareNumber(e,t){return t-e}function Heap(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function swap(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function sortRequests(e,t){return e.priority-t.priority}Request.prototype.cancel=function(){this.cancelled=!0},Request.prototype.clone=function(e){return defined(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new Request(this)},RequestErrorEvent.prototype.toString=function(){var e="Request has failed.";return defined(this.statusCode)&&(e+=" Status Code: "+this.statusCode),e},Object.defineProperties(Event.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),Event.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},Event.prototype.removeEventListener=function(e,t){for(var i=this._listeners,r=this._scopes,n=-1,a=0;a<i.length;a++)if(i[a]===e&&r[a]===t){n=a;break}return-1!==n&&(this._insideRaiseEvent?(this._toRemove.push(n),i[n]=void 0,r[n]=void 0):(i.splice(n,1),r.splice(n,1)),!0)},Event.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;for(var e=this._listeners,t=this._scopes,i=e.length,r=0;r<i;r++)defined(e[r])&&e[r].apply(t[r],arguments);var n=this._toRemove;if(0<(i=n.length)){for(n.sort(compareNumber),r=0;r<i;r++){var a=n[r];e.splice(a,1),t.splice(a,1)}n.length=0}this._insideRaiseEvent=!1},Object.defineProperties(Heap.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){var t=this._length;if(e<t){for(var i=this._array,r=e;r<t;++r)i[r]=void 0;this._length=e,i.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}}),Heap.prototype.reserve=function(e){e=defaultValue(e,this._length),this._array.length=e},Heap.prototype.heapify=function(e){e=defaultValue(e,0);for(var t=this._length,i=this._comparator,r=this._array,n=-1,a=!0;a;){var o=2*(e+1),s=o-1;n=s<t&&i(r[s],r[e])<0?s:e;o<t&&i(r[o],r[n])<0&&(n=o),n!==e?(swap(r,n,e),e=n):a=!1}},Heap.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);0<=t;--t)this.heapify(t)},Heap.prototype.insert=function(e){var t,i=this._array,r=this._comparator,n=this._maximumLength,a=this._length++;for(a<i.length?i[a]=e:i.push(e);0!==a;){var o=Math.floor((a-1)/2);if(!(r(i[a],i[o])<0))break;swap(i,a,o),a=o}return defined(n)&&this._length>n&&(t=i[n],this._length=n),t},Heap.prototype.pop=function(e){if(e=defaultValue(e,0),0!==this._length){var t=this._array,i=t[e];return swap(t,e,--this._length),this.heapify(e),t[this._length]=void 0,i}};var statistics={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},priorityHeapLength=20,requestHeap=new Heap({comparator:sortRequests});requestHeap.maximumLength=priorityHeapLength,requestHeap.reserve(priorityHeapLength);var activeRequests=[],numberOfActiveRequestsByServer={},pageUri="undefined"!=typeof document?new URI(document.location.href):new URI,requestCompletedEvent=new Event;function RequestScheduler(){}function updatePriority(e){defined(e.priorityFunction)&&(e.priority=e.priorityFunction())}function serverHasOpenSlots(e){var t=defaultValue(RequestScheduler.requestsByServer[e],RequestScheduler.maximumRequestsPerServer);return numberOfActiveRequestsByServer[e]<t}function issueRequest(e){return e.state===RequestState$1.UNISSUED&&(e.state=RequestState$1.ISSUED,e.deferred=when.defer()),e.deferred.promise}function getRequestReceivedFunction(e){return function(t){var i;e.state!==RequestState$1.CANCELLED&&(i=e.deferred,--statistics.numberOfActiveRequests,--numberOfActiveRequestsByServer[e.serverKey],requestCompletedEvent.raiseEvent(),e.state=RequestState$1.RECEIVED,e.deferred=void 0,i.resolve(t))}}function getRequestFailedFunction(e){return function(t){e.state!==RequestState$1.CANCELLED&&(++statistics.numberOfFailedRequests,--statistics.numberOfActiveRequests,--numberOfActiveRequestsByServer[e.serverKey],requestCompletedEvent.raiseEvent(t),e.state=RequestState$1.FAILED,e.deferred.reject(t))}}function startRequest(e){var t=issueRequest(e);return e.state=RequestState$1.ACTIVE,activeRequests.push(e),++statistics.numberOfActiveRequests,++statistics.numberOfActiveRequestsEver,++numberOfActiveRequestsByServer[e.serverKey],e.requestFunction().then(getRequestReceivedFunction(e)).otherwise(getRequestFailedFunction(e)),t}function cancelRequest(e){var t,i=e.state===RequestState$1.ACTIVE;e.state=RequestState$1.CANCELLED,++statistics.numberOfCancelledRequests,defined(e.deferred)&&(t=e.deferred,e.deferred=void 0,t.reject()),i&&(--statistics.numberOfActiveRequests,--numberOfActiveRequestsByServer[e.serverKey],++statistics.numberOfCancelledActiveRequests),defined(e.cancelFunction)&&e.cancelFunction()}function updateStatistics(){RequestScheduler.debugShowStatistics&&(0===statistics.numberOfActiveRequests&&0<statistics.lastNumberOfActiveRequests&&(0<statistics.numberOfAttemptedRequests&&(console.log("Number of attempted requests: "+statistics.numberOfAttemptedRequests),statistics.numberOfAttemptedRequests=0),0<statistics.numberOfCancelledRequests&&(console.log("Number of cancelled requests: "+statistics.numberOfCancelledRequests),statistics.numberOfCancelledRequests=0),0<statistics.numberOfCancelledActiveRequests&&(console.log("Number of cancelled active requests: "+statistics.numberOfCancelledActiveRequests),statistics.numberOfCancelledActiveRequests=0),0<statistics.numberOfFailedRequests&&(console.log("Number of failed requests: "+statistics.numberOfFailedRequests),statistics.numberOfFailedRequests=0)),statistics.lastNumberOfActiveRequests=statistics.numberOfActiveRequests)}RequestScheduler.maximumRequests=50,RequestScheduler.maximumRequestsPerServer=6,RequestScheduler.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},RequestScheduler.throttleRequests=!0,RequestScheduler.debugShowStatistics=!1,RequestScheduler.requestCompletedEvent=requestCompletedEvent,Object.defineProperties(RequestScheduler,{statistics:{get:function(){return statistics}},priorityHeapLength:{get:function(){return priorityHeapLength},set:function(e){if(e<priorityHeapLength)for(;requestHeap.length>e;)cancelRequest(requestHeap.pop());priorityHeapLength=e,requestHeap.maximumLength=e,requestHeap.reserve(e)}}}),RequestScheduler.update=function(){for(var e,t=0,i=activeRequests.length,r=0;r<i;++r)(e=activeRequests[r]).cancelled&&cancelRequest(e),e.state===RequestState$1.ACTIVE?0<t&&(activeRequests[r-t]=e):++t;activeRequests.length-=t;var n=requestHeap.internalArray,a=requestHeap.length;for(r=0;r<a;++r)updatePriority(n[r]);requestHeap.resort();for(var o=Math.max(RequestScheduler.maximumRequests-activeRequests.length,0),s=0;s<o&&0<requestHeap.length;)(e=requestHeap.pop()).cancelled||e.throttleByServer&&!serverHasOpenSlots(e.serverKey)?cancelRequest(e):(startRequest(e),++s);updateStatistics()},RequestScheduler.getServerKey=function(e){var t=new URI(e).resolve(pageUri);return t.normalize(),e=t.authority,/:/.test(e)||(e=e+":"+("https"===t.scheme?"443":"80")),defined(numberOfActiveRequestsByServer[e])||(numberOfActiveRequestsByServer[e]=0),e},RequestScheduler.request=function(e){if(isDataUri(e.url)||isBlobUri(e.url))return requestCompletedEvent.raiseEvent(),e.state=RequestState$1.RECEIVED,e.requestFunction();if(++statistics.numberOfAttemptedRequests,defined(e.serverKey)||(e.serverKey=RequestScheduler.getServerKey(e.url)),!RequestScheduler.throttleRequests||!e.throttleByServer||serverHasOpenSlots(e.serverKey)){if(!RequestScheduler.throttleRequests||!e.throttle)return startRequest(e);if(!(activeRequests.length>=RequestScheduler.maximumRequests)){updatePriority(e);var t=requestHeap.insert(e);if(defined(t)){if(t===e)return;cancelRequest(t)}return issueRequest(e)}}},RequestScheduler.clearForSpecs=function(){for(;0<requestHeap.length;)cancelRequest(requestHeap.pop());for(var e=activeRequests.length,t=0;t<e;++t)cancelRequest(activeRequests[t]);activeRequests.length=0,numberOfActiveRequestsByServer={},statistics.numberOfAttemptedRequests=0,statistics.numberOfActiveRequests=0,statistics.numberOfCancelledRequests=0,statistics.numberOfCancelledActiveRequests=0,statistics.numberOfFailedRequests=0,statistics.numberOfActiveRequestsEver=0,statistics.lastNumberOfActiveRequests=0},RequestScheduler.numberOfActiveRequestsByServer=function(e){return numberOfActiveRequestsByServer[e]},RequestScheduler.requestHeap=requestHeap;var TrustedServers={},_servers={};function getAuthority(e){var t=new URI(e);if(t.normalize(),defined(e=t.getAuthority())){if(-1!==e.indexOf("@")&&(e=e.split("@")[1]),-1===e.indexOf(":"))if(defined(t=t.getScheme())||(t=(t=window.location.protocol).substring(0,t.length-1)),"http"===t)e+=":80";else{if("https"!==t)return;e+=":443"}return e}}TrustedServers.add=function(e,t){t=e.toLowerCase()+":"+t,defined(_servers[t])||(_servers[t]=!0)},TrustedServers.remove=function(e,t){t=e.toLowerCase()+":"+t,defined(_servers[t])&&delete _servers[t]},TrustedServers.contains=function(e){return!(!defined(e=getAuthority(e))||!defined(_servers[e]))},TrustedServers.clear=function(){_servers={}};var xhrBlobSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),(e.responseType="blob")===e.responseType}catch(e){return!1}}(),supportsImageBitmapOptionsPromise;function parseQuery(e,t,i,r){var n,a=e.query;if(!defined(a)||0===a.length)return 1;a=-1===a.indexOf("=")?((n={})[a]=void 0,n):queryToObject(a),t._queryParameters=i?combineQueryParameters(a,t._queryParameters,r):a,e.query=void 0}function stringifyQuery(e,t){var i=t._queryParameters;1!==(t=Object.keys(i)).length||defined(i[t[0]])?e.query=objectToQuery(i):e.query=t[0]}function defaultClone(e,t){return defined(e)?defined(e.clone)?e.clone():clone(e):t}function checkAndResetRequest(e){if(e.state===RequestState$1.ISSUED||e.state===RequestState$1.ACTIVE)throw new RuntimeError("The Resource is already being fetched.");e.state=RequestState$1.UNISSUED,e.deferred=void 0}function combineQueryParameters(e,t,i){if(!i)return combine(e,t);var r,n,a,o=clone(e,!0);for(r in t)t.hasOwnProperty(r)&&(n=o[r],a=t[r],defined(n)?(Array.isArray(n)||(n=o[r]=[n]),o[r]=n.concat(a)):o[r]=Array.isArray(a)?a.slice():a);return o}function Resource(e){"string"==typeof(e=defaultValue(e,defaultValue.EMPTY_OBJECT))&&(e={url:e}),this._url=void 0,this._templateValues=defaultClone(e.templateValues,{}),this._queryParameters=defaultClone(e.queryParameters,{}),this.headers=defaultClone(e.headers,{}),this.request=defaultValue(e.request,new Request),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=defaultValue(e.retryAttempts,0),this._retryCount=0,parseQuery(e=new URI(e.url),this,!0,!0),e.fragment=void 0,this._url=e.toString()}function fetchImage(e){var t=e.resource,i=e.flipY,r=e.preferImageBitmap,n=t.request;if(n.url=t.url,n.requestFunction=function(){var e=!1;t.isDataUri||t.isBlobUri||(e=t.isCrossOriginUrl);var a=when.defer();return Resource._Implementations.createImage(n,e,a,i,r),a.promise},defined(e=RequestScheduler.request(n)))return e.otherwise((function(e){return n.state!==RequestState$1.FAILED?when.reject(e):t.retryOnError(e).then((function(a){return a?(n.state=RequestState$1.UNISSUED,n.deferred=void 0,fetchImage({resource:t,flipY:i,preferImageBitmap:r})):when.reject(e)}))}))}function fetchJsonp(e,t,i){var r={};r[t]=i,e.setQueryParameters(r);var n=e.request;if(n.url=e.url,n.requestFunction=function(){var t=when.defer();return window[i]=function(e){t.resolve(e);try{delete window[i]}catch(e){window[i]=void 0}},Resource._Implementations.loadAndExecuteScript(e.url,i,t),t.promise},defined(r=RequestScheduler.request(n)))return r.otherwise((function(r){return n.state!==RequestState$1.FAILED?when.reject(r):e.retryOnError(r).then((function(a){return a?(n.state=RequestState$1.UNISSUED,n.deferred=void 0,fetchJsonp(e,t,i)):when.reject(r)}))}))}Resource.createIfNeeded=function(e){return e instanceof Resource?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new Resource({url:e})},Resource.supportsImageBitmapOptions=function(){return defined(supportsImageBitmapOptionsPromise)?supportsImageBitmapOptionsPromise:supportsImageBitmapOptionsPromise="function"!=typeof createImageBitmap?when.resolve(!1):Resource.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none"})})).then((function(e){return!0})).otherwise((function(){return!1}))},Object.defineProperties(Resource,{isBlobSupported:{get:function(){return xhrBlobSupported}}}),Object.defineProperties(Resource.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){parseQuery(e=new URI(e),this,!1),e.fragment=void 0,this._url=e.toString()}},extension:{get:function(){return getExtensionFromUri(this._url)}},isDataUri:{get:function(){return isDataUri(this._url)}},isBlobUri:{get:function(){return isBlobUri(this._url)}},isCrossOriginUrl:{get:function(){return isCrossOriginUrl(this._url)}},hasHeaders:{get:function(){return 0<Object.keys(this.headers).length}}}),Resource.prototype.toString=function(){return this.getUrlComponent(!0,!0)},Resource.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var i=new URI(this._url);e&&stringifyQuery(i,this);i=i.toString().replace(/%7B/g,"{").replace(/%7D/g,"}");var r=this._templateValues;i=i.replace(/{(.*?)}/g,(function(e,t){return defined(t=r[t])?encodeURIComponent(t):e}));return t&&defined(this.proxy)&&(i=this.proxy.getURL(i)),i},Resource.prototype.setQueryParameters=function(e,t){this._queryParameters=t?combineQueryParameters(this._queryParameters,e,!1):combineQueryParameters(e,this._queryParameters,!1)},Resource.prototype.appendQueryParameters=function(e){this._queryParameters=combineQueryParameters(e,this._queryParameters,!0)},Resource.prototype.setTemplateValues=function(e,t){this._templateValues=t?combine(this._templateValues,e):combine(e,this._templateValues)},Resource.prototype.getDerivedResource=function(e){var t,i=this.clone();return i._retryCount=0,defined(e.url)&&(parseQuery(t=new URI(e.url),i,!0,defaultValue(e.preserveQueryParameters,!1)),t.fragment=void 0,i._url=t.resolve(new URI(getAbsoluteUri(this._url))).toString()),defined(e.queryParameters)&&(i._queryParameters=combine(e.queryParameters,i._queryParameters)),defined(e.templateValues)&&(i._templateValues=combine(e.templateValues,i.templateValues)),defined(e.headers)&&(i.headers=combine(e.headers,i.headers)),defined(e.proxy)&&(i.proxy=e.proxy),defined(e.request)&&(i.request=e.request),defined(e.retryCallback)&&(i.retryCallback=e.retryCallback),defined(e.retryAttempts)&&(i.retryAttempts=e.retryAttempts),i},Resource.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return when(!1);var i=this;return when(t(this,e)).then((function(e){return++i._retryCount,e}))},Resource.prototype.clone=function(e){return defined(e)||(e=new Resource({url:this._url})),e._url=this._url,e._queryParameters=clone(this._queryParameters),e._templateValues=clone(this._templateValues),e.headers=clone(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},Resource.prototype.getBaseUri=function(e){return getBaseUri(this.getUrlComponent(e),e)},Resource.prototype.appendForwardSlash=function(){this._url=appendForwardSlash(this._url)},Resource.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},Resource.fetchArrayBuffer=function(e){return new Resource(e).fetchArrayBuffer()},Resource.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},Resource.fetchBlob=function(e){return new Resource(e).fetchBlob()},Resource.prototype.fetchImage=function(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.preferImageBitmap,!1),i=defaultValue(e.preferBlob,!1),r=defaultValue(e.flipY,!1);if(checkAndResetRequest(this.request),!xhrBlobSupported||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!i)return fetchImage({resource:this,flipY:r,preferImageBitmap:t});var n,a,o,s=this.fetchBlob();return defined(s)?Resource.supportsImageBitmapOptions().then((function(e){return n=e&&t,s})).then((function(e){if(defined(e))return o=e,n?Resource.createImageBitmapFromBlob(e,{flipY:r,premultiplyAlpha:!1}):(e=window.URL.createObjectURL(e),fetchImage({resource:a=new Resource({url:e}),flipY:r,preferImageBitmap:!1}))})).then((function(e){if(defined(e))return e.blob=o,n||window.URL.revokeObjectURL(a.url),e})).otherwise((function(e){return defined(a)&&window.URL.revokeObjectURL(a.url),e.blob=o,when.reject(e)})):void 0},Resource.fetchImage=function(e){return new Resource(e).fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},Resource.prototype.fetchText=function(){return this.fetch({responseType:"text"})},Resource.fetchText=function(e){return new Resource(e).fetchText()},Resource.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(defined(e))return e.then((function(e){if(defined(e))return JSON.parse(e)}))},Resource.fetchJson=function(e){return new Resource(e).fetchJson()},Resource.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},Resource.fetchXML=function(e){return new Resource(e).fetchXML()},Resource.prototype.fetchJsonp=function(e){var t;for(e=defaultValue(e,"callback"),checkAndResetRequest(this.request);t="loadJsonp"+Math.random().toString().substring(2,8),defined(window[t]););return fetchJsonp(this,e,t)},Resource.fetchJsonp=function(e){return new Resource(e).fetchJsonp(e.callbackParameterName)},Resource.prototype._makeRequest=function(e){var t=this;checkAndResetRequest(t.request);var i=t.request;i.url=t.url,i.requestFunction=function(){var r=e.responseType,n=combine(e.headers,t.headers),a=e.overrideMimeType,o=e.method,s=e.data,l=when.defer(),c=Resource._Implementations.loadWithXhr(t.url,r,o,s,n,l,a);return defined(c)&&defined(c.abort)&&(i.cancelFunction=function(){c.abort()}),l.promise};var r=RequestScheduler.request(i);if(defined(r))return r.then((function(e){return i.cancelFunction=void 0,e})).otherwise((function(r){return i.cancelFunction=void 0,i.state!==RequestState$1.FAILED?when.reject(r):t.retryOnError(r).then((function(n){return n?(i.state=RequestState$1.UNISSUED,i.deferred=void 0,t.fetch(e)):when.reject(r)}))}))};var dataUriRegex$1=/^data:(.*?)(;base64)?,(.*)$/;function decodeDataUriText(e,t){return t=decodeURIComponent(t),e?atob(t):t}function decodeDataUriArrayBuffer(e,t){for(var i=decodeDataUriText(e,t),r=(t=new ArrayBuffer(i.length),new Uint8Array(t)),n=0;n<i.length;n++)r[n]=i.charCodeAt(n);return t}function decodeDataUri(e,t){t=defaultValue(t,"");var i=e[1],r=!!e[2];e=e[3];switch(t){case"":case"text":return decodeDataUriText(r,e);case"arraybuffer":return decodeDataUriArrayBuffer(r,e);case"blob":return t=decodeDataUriArrayBuffer(r,e),new Blob([t],{type:i});case"document":return(new DOMParser).parseFromString(decodeDataUriText(r,e),i);case"json":return JSON.parse(decodeDataUriText(r,e))}}function loadImageElement(e,t,i){var r=new Image;r.onload=function(){i.resolve(r)},r.onerror=function(e){i.reject(e)},t&&(TrustedServers.contains(e)?r.crossOrigin="use-credentials":r.crossOrigin=""),r.src=e}function decodeResponse(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function loadWithHttpRequest(e,t,i,r,n,a,o){var s=__webpack_require__(96).parse(e),l=(e="https:"===s.protocol?__webpack_require__(243):__webpack_require__(135),__webpack_require__(256));n={protocol:s.protocol,hostname:s.hostname,port:s.port,path:s.path,query:s.query,method:i,headers:n};e.request(n).on("response",(function(e){var i;e.statusCode<200||300<=e.statusCode?a.reject(new RequestErrorEvent(e.statusCode,e,e.headers)):(i=[],e.on("data",(function(e){i.push(e)})),e.on("end",(function(){var r=Buffer.concat(i);"gzip"===e.headers["content-encoding"]?l.gunzip(r,(function(e,i){e?a.reject(new RuntimeError("Error decompressing response.")):a.resolve(decodeResponse(i,t))})):a.resolve(decodeResponse(r,t))})))})).on("error",(function(e){a.reject(new RequestErrorEvent)})).end()}Resource.prototype.fetch=function(e){return(e=defaultClone(e,{})).method="GET",this._makeRequest(e)},Resource.fetch=function(e){return new Resource(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.delete=function(e){return(e=defaultClone(e,{})).method="DELETE",this._makeRequest(e)},Resource.delete=function(e){return new Resource(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},Resource.prototype.head=function(e){return(e=defaultClone(e,{})).method="HEAD",this._makeRequest(e)},Resource.head=function(e){return new Resource(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.options=function(e){return(e=defaultClone(e,{})).method="OPTIONS",this._makeRequest(e)},Resource.options=function(e){return new Resource(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.post=function(e,t){return Check.defined("data",e),(t=defaultClone(t,{})).method="POST",t.data=e,this._makeRequest(t)},Resource.post=function(e){return new Resource(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.put=function(e,t){return Check.defined("data",e),(t=defaultClone(t,{})).method="PUT",t.data=e,this._makeRequest(t)},Resource.put=function(e){return new Resource(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource.prototype.patch=function(e,t){return Check.defined("data",e),(t=defaultClone(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},Resource.patch=function(e){return new Resource(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},Resource._Implementations={},Resource._Implementations.createImage=function(e,t,i,r,n){var a=e.url;Resource.supportsImageBitmapOptions().then((function(o){if(o&&n){o=when.defer();var s=Resource._Implementations.loadWithXhr(a,"blob","GET",void 0,void 0,o,void 0,void 0,void 0);return defined(s)&&defined(s.abort)&&(e.cancelFunction=function(){s.abort()}),o.promise.then((function(e){return defined(e)?Resource.createImageBitmapFromBlob(e,{flipY:r,premultiplyAlpha:!1}):void i.reject(new RuntimeError("Successfully retrieved "+a+" but it contained no content."))})).then(i.resolve)}loadImageElement(a,t,i)})).otherwise(i.reject)},Resource.createImageBitmapFromBlob=function(e,t){return Check.defined("options",t),Check.typeOf.bool("options.flipY",t.flipY),Check.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none"})};var noXMLHttpRequest="undefined"==typeof XMLHttpRequest;Resource._Implementations.loadWithXhr=function(e,t,i,r,n,a,o){var s=dataUriRegex$1.exec(e);if(null===s){if(!noXMLHttpRequest){var l=new XMLHttpRequest;if(TrustedServers.contains(e)&&(l.withCredentials=!0),l.open(i,e,!0),defined(o)&&defined(l.overrideMimeType)&&l.overrideMimeType(o),defined(n))for(var c in n)n.hasOwnProperty(c)&&l.setRequestHeader(c,n[c]);defined(t)&&(l.responseType=t);var u=!1;return"string"==typeof e&&(u=0===e.indexOf("file://")||"undefined"!=typeof window&&"file://"===window.location.origin),l.onload=function(){if(!(l.status<200||300<=l.status)||u&&0===l.status){var e=l.response,r=l.responseType;if("HEAD"===i||"OPTIONS"===i){var n=l.getAllResponseHeaders().trim().split(/[\r\n]+/),o={};return n.forEach((function(e){var t=e.split(": ");e=t.shift();o[e]=t.join(": ")})),void a.resolve(o)}if(204===l.status)a.resolve();else if(!defined(e)||defined(t)&&r!==t)if("json"===t&&"string"==typeof e)try{a.resolve(JSON.parse(e))}catch(e){a.reject(e)}else(""===r||"document"===r)&&defined(l.responseXML)&&l.responseXML.hasChildNodes()?a.resolve(l.responseXML):""!==r&&"text"!==r||!defined(l.responseText)?a.reject(new RuntimeError("Invalid XMLHttpRequest response type.")):a.resolve(l.responseText);else a.resolve(e)}else a.reject(new RequestErrorEvent(l.status,l.response,l.getAllResponseHeaders()))},l.onerror=function(e){a.reject(new RequestErrorEvent)},l.send(r),l}loadWithHttpRequest(e,t,i,r,n,a)}else a.resolve(decodeDataUri(s,t))},Resource._Implementations.loadAndExecuteScript=function(e,t,i){return loadAndExecuteScript(e).otherwise(i.reject)},Resource._DefaultImplementations={},Resource._DefaultImplementations.createImage=Resource._Implementations.createImage,Resource._DefaultImplementations.loadWithXhr=Resource._Implementations.loadWithXhr,Resource._DefaultImplementations.loadAndExecuteScript=Resource._Implementations.loadAndExecuteScript,Resource.DEFAULT=Object.freeze(new Resource({url:"undefined"==typeof document?"":document.location.href.split("?")[0]}));var cesiumScriptRegex=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/,a$1,baseResource,implementation;function getBaseUrlFromCesiumScript(){for(var e=document.getElementsByTagName("script"),t=0,i=e.length;t<i;++t){var r=e[t].getAttribute("src");if(null!==(r=cesiumScriptRegex.exec(r)))return r[1]}}function tryMakeAbsolute(e){return"undefined"==typeof document?e:(defined(a$1)||(a$1=document.createElement("a")),a$1.href=e,a$1.href=a$1.href,a$1.href)}function getCesiumBaseUrl(){if(defined(baseResource))return baseResource;return(baseResource=new Resource({url:tryMakeAbsolute("./libs/Cesium/resources/")})).appendForwardSlash(),baseResource}function buildModuleUrlFromRequireToUrl(e){return tryMakeAbsolute(__webpack_require__(274).toUrl("../"+e))}function buildModuleUrlFromBaseUrl(e){return getCesiumBaseUrl().getDerivedResource({url:e}).url}function buildModuleUrl(e){return defined(implementation)||(implementation=buildModuleUrlFromBaseUrl),implementation(e)}function Cartesian2(e,t){this.x=defaultValue(e,0),this.y=defaultValue(t,0)}buildModuleUrl._cesiumScriptRegex=cesiumScriptRegex,buildModuleUrl._buildModuleUrlFromBaseUrl=buildModuleUrlFromBaseUrl,buildModuleUrl._clearBaseResource=function(){baseResource=void 0},buildModuleUrl.setBaseUrl=function(e){baseResource=Resource.DEFAULT.getDerivedResource({url:e})},buildModuleUrl.getCesiumBaseUrl=getCesiumBaseUrl,Cartesian2.fromElements=function(e,t,i){return defined(i)?(i.x=e,i.y=t,i):new Cartesian2(e,t)},Cartesian2.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t):new Cartesian2(e.x,e.y)},Cartesian2.fromCartesian3=Cartesian2.clone,Cartesian2.fromCartesian4=Cartesian2.clone,Cartesian2.packedLength=2,Cartesian2.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i]=e.y,t},Cartesian2.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Cartesian2),i.x=e[t++],i.y=e[t],i},Cartesian2.packArray=function(e,t){var i=e.length,r=2*i;if(defined(t)){if(!Array.isArray(t)&&t.length!==r)throw new DeveloperError("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(var n=0;n<i;++n)Cartesian2.pack(e[n],t,2*n);return t},Cartesian2.unpackArray=function(e,t){var i=e.length;defined(t)?t.length=i/2:t=new Array(i/2);for(var r=0;r<i;r+=2){var n=r/2;t[n]=Cartesian2.unpack(e,r,t[n])}return t},Cartesian2.fromArray=Cartesian2.unpack,Cartesian2.maximumComponent=function(e){return Math.max(e.x,e.y)},Cartesian2.minimumComponent=function(e){return Math.min(e.x,e.y)},Cartesian2.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},Cartesian2.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},Cartesian2.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},Cartesian2.magnitude=function(e){return Math.sqrt(Cartesian2.magnitudeSquared(e))};var distanceScratch$2=new Cartesian2;Cartesian2.distance=function(e,t){return Cartesian2.subtract(e,t,distanceScratch$2),Cartesian2.magnitude(distanceScratch$2)},Cartesian2.distanceSquared=function(e,t){return Cartesian2.subtract(e,t,distanceScratch$2),Cartesian2.magnitudeSquared(distanceScratch$2)},Cartesian2.normalize=function(e,t){var i=Cartesian2.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t},Cartesian2.dot=function(e,t){return e.x*t.x+e.y*t.y},Cartesian2.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i},Cartesian2.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i},Cartesian2.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i},Cartesian2.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i},Cartesian2.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i},Cartesian2.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i},Cartesian2.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t},Cartesian2.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var lerpScratch$2=new Cartesian2;Cartesian2.lerp=function(e,t,i,r){return Cartesian2.multiplyByScalar(t,i,lerpScratch$2),r=Cartesian2.multiplyByScalar(e,1-i,r),Cartesian2.add(lerpScratch$2,r,r)};var angleBetweenScratch$1=new Cartesian2,angleBetweenScratch2$1=new Cartesian2;Cartesian2.angleBetween=function(e,t){return Cartesian2.normalize(e,angleBetweenScratch$1),Cartesian2.normalize(t,angleBetweenScratch2$1),CesiumMath.acosClamped(Cartesian2.dot(angleBetweenScratch$1,angleBetweenScratch2$1))};var mostOrthogonalAxisScratch$2=new Cartesian2;function GeographicTilingScheme(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._rectangle=defaultValue(e.rectangle,Rectangle.MAX_VALUE),this._projection=new GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=defaultValue(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=defaultValue(e.numberOfLevelZeroTilesY,1)}Cartesian2.mostOrthogonalAxis=function(e,t){return e=Cartesian2.normalize(e,mostOrthogonalAxisScratch$2),Cartesian2.abs(e,e),e.x<=e.y?Cartesian2.clone(Cartesian2.UNIT_X,t):Cartesian2.clone(Cartesian2.UNIT_Y,t)},Cartesian2.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y},Cartesian2.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},Cartesian2.equalsEpsilon=function(e,t,i,r){return e===t||defined(e)&&defined(t)&&CesiumMath.equalsEpsilon(e.x,t.x,i,r)&&CesiumMath.equalsEpsilon(e.y,t.y,i,r)},Cartesian2.ZERO=Object.freeze(new Cartesian2(0,0)),Cartesian2.UNIT_X=Object.freeze(new Cartesian2(1,0)),Cartesian2.UNIT_Y=Object.freeze(new Cartesian2(0,1)),Cartesian2.prototype.clone=function(e){return Cartesian2.clone(this,e)},Cartesian2.prototype.equals=function(e){return Cartesian2.equals(this,e)},Cartesian2.prototype.equalsEpsilon=function(e,t,i){return Cartesian2.equalsEpsilon(this,e,t,i)},Cartesian2.prototype.toString=function(){return"("+this.x+", "+this.y+")"},Object.defineProperties(GeographicTilingScheme.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),GeographicTilingScheme.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},GeographicTilingScheme.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},GeographicTilingScheme.prototype.rectangleToNativeRectangle=function(e,t){var i=CesiumMath.toDegrees(e.west),r=CesiumMath.toDegrees(e.south),n=CesiumMath.toDegrees(e.east);e=CesiumMath.toDegrees(e.north);return defined(t)?(t.west=i,t.south=r,t.east=n,t.north=e,t):new Rectangle(i,r,n,e)},GeographicTilingScheme.prototype.tileXYToNativeRectangle=function(e,t,i,r){return(r=this.tileXYToRectangle(e,t,i,r)).west=CesiumMath.toDegrees(r.west),r.south=CesiumMath.toDegrees(r.south),r.east=CesiumMath.toDegrees(r.east),r.north=CesiumMath.toDegrees(r.north),r},GeographicTilingScheme.prototype.tileXYToRectangle=function(e,t,i,r){var n=this._rectangle,a=this.getNumberOfXTilesAtLevel(i),o=this.getNumberOfYTilesAtLevel(i);a=e*(i=n.width/a)+n.west,e=(e+1)*i+n.west,i=n.height/o,o=n.north-t*i,i=n.north-(t+1)*i;return defined(r)||(r=new Rectangle(a,i,e,o)),r.west=a,r.south=i,r.east=e,r.north=o,r},GeographicTilingScheme.prototype.positionToTileXY=function(e,t,i){var r=this._rectangle;if(Rectangle.contains(r,e)){var n=this.getNumberOfXTilesAtLevel(t),a=this.getNumberOfYTilesAtLevel(t),o=r.width/n,s=r.height/a;t=e.longitude;return r.east<r.west&&(t+=CesiumMath.TWO_PI),n<=(o=(t-r.west)/o|0)&&(o=n-1),a<=(s=(r.north-e.latitude)/s|0)&&(s=a-1),defined(i)?(i.x=o,i.y=s,i):new Cartesian2(o,s)}};var scratchDiagonalCartesianNE=new Cartesian3,scratchDiagonalCartesianSW=new Cartesian3,scratchDiagonalCartographic=new Cartographic,scratchCenterCartesian=new Cartesian3,scratchSurfaceCartesian=new Cartesian3,scratchBoundingSphere=new BoundingSphere,tilingScheme=new GeographicTilingScheme,scratchCorners=[new Cartographic,new Cartographic,new Cartographic,new Cartographic],scratchTileXY=new Cartesian2,ApproximateTerrainHeights={};function getTileXYLevel(e){Cartographic.fromRadians(e.east,e.north,0,scratchCorners[0]),Cartographic.fromRadians(e.west,e.north,0,scratchCorners[1]),Cartographic.fromRadians(e.east,e.south,0,scratchCorners[2]),Cartographic.fromRadians(e.west,e.south,0,scratchCorners[3]);for(var t=0,i=0,r=0,n=0,a=ApproximateTerrainHeights._terrainHeightsMaxLevel,o=0;o<=a;++o){for(var s=!1,l=0;l<4;++l){var c=scratchCorners[l];if(tilingScheme.positionToTileXY(c,o,scratchTileXY),0===l)r=scratchTileXY.x,n=scratchTileXY.y;else if(r!==scratchTileXY.x||n!==scratchTileXY.y){s=!0;break}}if(s)break;t=r,i=n}if(0!==o)return{x:t,y:i,level:a<o?a:o-1}}ApproximateTerrainHeights.initialize=function(){var e=ApproximateTerrainHeights._initPromise;return defined(e)?e:(e=Resource.fetchJson(buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){ApproximateTerrainHeights._terrainHeights=e})),ApproximateTerrainHeights._initPromise=e)},ApproximateTerrainHeights.getMinimumMaximumHeights=function(e,t){t=defaultValue(t,Ellipsoid.WGS84);var i=getTileXYLevel(e),r=ApproximateTerrainHeights._defaultMinTerrainHeight,n=ApproximateTerrainHeights._defaultMaxTerrainHeight;return defined(i)&&(i=i.level+"-"+i.x+"-"+i.y,defined(i=ApproximateTerrainHeights._terrainHeights[i])&&(r=i[0],n=i[1]),t.cartographicToCartesian(Rectangle.northeast(e,scratchDiagonalCartographic),scratchDiagonalCartesianNE),t.cartographicToCartesian(Rectangle.southwest(e,scratchDiagonalCartographic),scratchDiagonalCartesianSW),Cartesian3.midpoint(scratchDiagonalCartesianSW,scratchDiagonalCartesianNE,scratchCenterCartesian),r=defined(t=t.scaleToGeodeticSurface(scratchCenterCartesian,scratchSurfaceCartesian))?(t=Cartesian3.distance(scratchCenterCartesian,t),Math.min(r,-t)):ApproximateTerrainHeights._defaultMinTerrainHeight),{minimumTerrainHeight:r=Math.max(ApproximateTerrainHeights._defaultMinTerrainHeight,r),maximumTerrainHeight:n}},ApproximateTerrainHeights.getBoundingSphere=function(e,t){t=defaultValue(t,Ellipsoid.WGS84);var i=getTileXYLevel(e),r=ApproximateTerrainHeights._defaultMaxTerrainHeight;defined(i)&&(n=i.level+"-"+i.x+"-"+i.y,defined(n=ApproximateTerrainHeights._terrainHeights[n])&&(r=n[1]));var n=BoundingSphere.fromRectangle3D(e,t,0);return BoundingSphere.fromRectangle3D(e,t,r,scratchBoundingSphere),BoundingSphere.union(n,scratchBoundingSphere,n)},ApproximateTerrainHeights._terrainHeightsMaxLevel=6,ApproximateTerrainHeights._defaultMaxTerrainHeight=9e3,ApproximateTerrainHeights._defaultMinTerrainHeight=-1e5,ApproximateTerrainHeights._terrainHeights=void 0,ApproximateTerrainHeights._initPromise=void 0,Object.defineProperties(ApproximateTerrainHeights,{initialized:{get:function(){return defined(ApproximateTerrainHeights._terrainHeights)}}});var html=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],svg=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],svgFilters=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],mathMl=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],text=["#text"],html$1=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],svg$1=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],mathMl$1=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],xml=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function addToSet(e,t){for(var i=t.length;i--;)"string"==typeof t[i]&&(t[i]=t[i].toLowerCase()),e[t[i]]=!0;return e}function clone$1(e){var t={},i=void 0;for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}var MUSTACHE_EXPR=/\{\{[\s\S]*|[\s\S]*\}\}/gm,ERB_EXPR=/<%[\s\S]*|[\s\S]*%>/gm,DATA_ATTR=/^data-[\-\w.\u00B7-\uFFFF]/,ARIA_ATTR=/^aria-[\-\w]+$/,IS_ALLOWED_URI=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,IS_SCRIPT_OR_DATA=/^(?:\w+script|data):/i,ATTR_WHITESPACE=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var getGlobal=function(){return"undefined"==typeof window?null:window};function createDOMPurify(){function e(e){return createDOMPurify(e)}var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:getGlobal();if(e.version="1.0.8",e.removed=[],!t||!t.document||9!==t.document.nodeType)return e.isSupported=!1,e;var i=t.document,r=!1,n=!1,a=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,l=t.Node,c=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.Text,p=t.Comment,f=t.DOMParser;"function"!=typeof s||(s=a.createElement("template")).content&&s.content.ownerDocument&&(a=s.content.ownerDocument);var m=a.implementation,g=a.createNodeIterator,y=a.getElementsByTagName,_=a.createDocumentFragment,v=i.importNode,C={};function x(e){"object"!==(void 0===e?"undefined":_typeof(e))&&(e={}),O="ALLOWED_TAGS"in e?addToSet({},e.ALLOWED_TAGS):L,N="ALLOWED_ATTR"in e?addToSet({},e.ALLOWED_ATTR):F,B="FORBID_TAGS"in e?addToSet({},e.FORBID_TAGS):{},V="FORBID_ATTR"in e?addToSet({},e.FORBID_ATTR):{},E="USE_PROFILES"in e&&e.USE_PROFILES,k=!1!==e.ALLOW_ARIA_ATTR,z=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,U=e.SAFE_FOR_JQUERY||!1,$=e.SAFE_FOR_TEMPLATES||!1,H=e.WHOLE_DOCUMENT||!1,q=e.RETURN_DOM||!1,Y=e.RETURN_DOM_FRAGMENT||!1,X=e.RETURN_DOM_IMPORT||!1,j=e.FORCE_BODY||!1,Q=!1!==e.SANITIZE_DOM,Z=!1!==e.KEEP_CONTENT,J=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||R,$&&(z=!1),Y&&(q=!0),E&&(O=addToSet({},[].concat(_toConsumableArray(text))),N=[],!0===E.html&&(addToSet(O,html),addToSet(N,html$1)),!0===E.svg&&(addToSet(O,svg),addToSet(N,svg$1),addToSet(N,xml)),!0===E.svgFilters&&(addToSet(O,svgFilters),addToSet(N,svg$1),addToSet(N,xml)),!0===E.mathMl&&(addToSet(O,mathMl),addToSet(N,mathMl$1),addToSet(N,xml))),e.ADD_TAGS&&(O===L&&(O=clone$1(O)),addToSet(O,e.ADD_TAGS)),e.ADD_ATTR&&(N===F&&(N=clone$1(N)),addToSet(N,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&addToSet(te,e.ADD_URI_SAFE_ATTR),Z&&(O["#text"]=!0),H&&addToSet(O,["html","head","body"]),O.table&&addToSet(O,["tbody"]),Object&&"freeze"in Object&&Object.freeze(e),ie=e}function b(t){e.removed.push({element:t});try{t.parentNode.removeChild(t)}catch(e){t.outerHTML=""}}function S(t,i){try{e.removed.push({attribute:i.getAttributeNode(t),from:i})}catch(t){e.removed.push({attribute:null,from:i})}i.removeAttribute(t)}function T(e){var t,i=void 0,o=void 0;if(j?e="<remove></remove>"+e:(o=(t=e.match(/^[\s]+/))&&t[0])&&(e=e.slice(o.length)),r)try{i=(new f).parseFromString(e,"text/html")}catch(e){}return n&&addToSet(B,["title"]),i&&i.documentElement||((t=(i=m.createHTMLDocument("")).body).parentNode.removeChild(t.parentNode.firstElementChild),t.outerHTML=e),o&&i.body.insertBefore(a.createTextNode(o),i.body.childNodes[0]||null),y.call(i,H?"html":"body")[0]}e.isSupported=m&&void 0!==m.createHTMLDocument&&9!==a.documentMode;var E,w=MUSTACHE_EXPR,A=ERB_EXPR,P=DATA_ATTR,D=ARIA_ATTR,M=IS_SCRIPT_OR_DATA,I=ATTR_WHITESPACE,R=IS_ALLOWED_URI,O=null,L=addToSet({},[].concat(_toConsumableArray(html),_toConsumableArray(svg),_toConsumableArray(svgFilters),_toConsumableArray(mathMl),_toConsumableArray(text))),N=null,F=addToSet({},[].concat(_toConsumableArray(html$1),_toConsumableArray(svg$1),_toConsumableArray(mathMl$1),_toConsumableArray(xml))),B=null,V=null,k=!0,z=!0,G=!1,U=!1,$=!1,H=!1,W=!1,j=!1,q=!1,Y=!1,X=!1,Q=!0,Z=!0,J=!1,K=addToSet({},["audio","head","math","script","style","template","svg","video"]),ee=addToSet({},["audio","video","img","source","image"]),te=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ie=null,re=a.createElement("form");function ne(e){return g.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,(function(){return c.FILTER_ACCEPT}),!1)}function ae(e){return"object"===(void 0===l?"undefined":_typeof(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":_typeof(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}function oe(t,i,r){C[t]&&C[t].forEach((function(t){t.call(e,i,r,ie)}))}function se(t){var i=void 0;if(oe("beforeSanitizeElements",t,null),!((r=t)instanceof h||r instanceof p||"string"==typeof r.nodeName&&"string"==typeof r.textContent&&"function"==typeof r.removeChild&&r.attributes instanceof d&&"function"==typeof r.removeAttribute&&"function"==typeof r.setAttribute))return b(t),1;var r=t.nodeName.toLowerCase();if(oe("uponSanitizeElement",t,{tagName:r,allowedTags:O}),O[r]&&!B[r])return!U||t.firstElementChild||t.content&&t.content.firstElementChild||!/</g.test(t.textContent)||(e.removed.push({element:t.cloneNode()}),t.innerHTML?t.innerHTML=t.innerHTML.replace(/</g,"&lt;"):t.innerHTML=t.textContent.replace(/</g,"&lt;")),$&&3===t.nodeType&&(i=(i=(i=t.textContent).replace(w," ")).replace(A," "),t.textContent!==i&&(e.removed.push({element:t.cloneNode()}),t.textContent=i)),oe("afterSanitizeElements",t,null),0;if(Z&&!K[r]&&"function"==typeof t.insertAdjacentHTML)try{t.insertAdjacentHTML("AfterEnd",t.innerHTML)}catch(t){}return b(t),1}function le(e,t,i){if(Q&&("id"===t||"name"===t)&&(i in a||i in re))return!1;if($&&(i=(i=i.replace(w," ")).replace(A," ")),!(z&&P.test(t)||k&&D.test(t))){if(!N[t]||V[t])return!1;if(!te[t]&&!R.test(i.replace(I,""))&&("src"!==t&&"xlink:href"!==t||"script"===e||0!==i.indexOf("data:")||!ee[e])&&(!G||M.test(i.replace(I,"")))&&i)return!1}return!0}function ce(t){var i=void 0,r=void 0;oe("beforeSanitizeAttributes",t,null);var n=t.attributes;if(n){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};for(r=n.length;r--;){var o=(i=n[r]).name,s=i.namespaceURI,l=i.value.trim(),c=o.toLowerCase();if(a.attrName=c,a.attrValue=l,a.keepAttr=!0,oe("uponSanitizeAttribute",t,a),l=a.attrValue,"name"===c&&"IMG"===t.nodeName&&n.id)u=n.id,n=Array.prototype.slice.apply(n),S("id",t),S(o,t),n.indexOf(u)>r&&t.setAttribute("id",u.value);else{if("INPUT"===t.nodeName&&"type"===c&&"file"===l&&(N[c]||!V[c]))continue;"id"===o&&t.setAttribute(o,""),S(o,t)}if(a.keepAttr){var u=t.nodeName.toLowerCase();if(le(u,c,l))try{s?t.setAttributeNS(s,o,l):t.setAttribute(o,l),e.removed.pop()}catch(t){}}}oe("afterSanitizeAttributes",t,null)}}function ue(e){var t,i=ne(e);for(oe("beforeSanitizeShadowDOM",e,null);t=i.nextNode();)oe("uponSanitizeShadowNode",t,null),se(t)||(t.content instanceof o&&ue(t.content),ce(t));oe("afterSanitizeShadowDOM",e,null)}return e.isSupported&&(function(){try{T('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">').querySelector("svg img")&&(r=!0)}catch(e){}}(),function(){try{T("<x/><title>&lt;/title&gt;&lt;img&gt;").querySelector("title").textContent.match(/<\/title/)&&(n=!0)}catch(e){}}()),e.sanitize=function(r,n){var a,s,c=void 0,u=void 0,d=void 0;if("string"!=typeof(r=r||"\x3c!--\x3e")&&!ae(r)){if("function"!=typeof r.toString)throw new TypeError("toString is not a function");if("string"!=typeof(r=r.toString()))throw new TypeError("dirty is not a string, aborting")}if(!e.isSupported){if("object"===_typeof(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof r)return t.toStaticHTML(r);if(ae(r))return t.toStaticHTML(r.outerHTML)}return r}if(W||x(n),e.removed=[],!J)if(r instanceof l)1===(a=(c=T("\x3c!--\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===a.nodeName?c=a:c.appendChild(a);else{if(!q&&!H&&-1===r.indexOf("<"))return r;if(!(c=T(r)))return q?null:""}c&&j&&b(c.firstChild);for(var h=ne(J?r:c);s=h.nextNode();)3===s.nodeType&&s===u||se(s)||(s.content instanceof o&&ue(s.content),ce(s),u=s);if(J)return r;if(q){if(Y)for(d=_.call(c.ownerDocument);c.firstChild;)d.appendChild(c.firstChild);else d=c;return X&&(d=v.call(i,d,!0)),d}return H?c.outerHTML:c.innerHTML},e.setConfig=function(e){x(e),W=!0},e.clearConfig=function(){ie=null,W=!1},e.isValidAttribute=function(e,t,i){return ie||x({}),le(e=e.toLowerCase(),t=t.toLowerCase(),i)},e.addHook=function(e,t){"function"==typeof t&&(C[e]=C[e]||[],C[e].push(t))},e.removeHook=function(e){C[e]&&C[e].pop()},e.removeHooks=function(e){C[e]&&(C[e]=[])},e.removeAllHooks=function(){C={}},e}var purify=createDOMPurify(),nextCreditId=0,creditToId={};function Credit(e,t){var i,r=e;defined(creditToId[r])?i=creditToId[r]:(i=nextCreditId++,creditToId[r]=i),t=defaultValue(t,!1),this._id=i,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Credit.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen}},element:{get:function(){if(!defined(this._element)){var e=purify.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;for(var i=t.querySelectorAll("a"),r=0;r<i.length;r++)i[r].setAttribute("target","_blank");this._element=t}return this._element}}}),Credit.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e._id===t._id},Credit.prototype.equals=function(e){return Credit.equals(this,e)},Credit.getIonCredit=function(e){var t=defined(e.collapsible)&&!e.collapsible;return(t=new Credit(e.html,t))._isIon=-1!==t.html.indexOf("ion-credit.png"),t},Credit.clone=function(e){if(defined(e))return new Credit(e.html,e.showOnScreen)};var HeightmapEncoding={NONE:0,LERC:1},HeightmapEncoding$1=Object.freeze(HeightmapEncoding);function AxisAlignedBoundingBox(e,t,i){this.minimum=Cartesian3.clone(defaultValue(e,Cartesian3.ZERO)),this.maximum=Cartesian3.clone(defaultValue(t,Cartesian3.ZERO)),i=defined(i)?Cartesian3.clone(i):Cartesian3.midpoint(this.minimum,this.maximum,new Cartesian3),this.center=i}AxisAlignedBoundingBox.fromPoints=function(e,t){if(defined(t)||(t=new AxisAlignedBoundingBox),!defined(e)||0===e.length)return t.minimum=Cartesian3.clone(Cartesian3.ZERO,t.minimum),t.maximum=Cartesian3.clone(Cartesian3.ZERO,t.maximum),t.center=Cartesian3.clone(Cartesian3.ZERO,t.center),t;for(var i=e[0].x,r=e[0].y,n=e[0].z,a=e[0].x,o=e[0].y,s=e[0].z,l=e.length,c=1;c<l;c++){var u=(h=e[c]).x,d=h.y,h=h.z;i=Math.min(u,i),a=Math.max(u,a),r=Math.min(d,r),o=Math.max(d,o),n=Math.min(h,n),s=Math.max(h,s)}var p=t.minimum;p.x=i,p.y=r,p.z=n;var f=t.maximum;return f.x=a,f.y=o,f.z=s,t.center=Cartesian3.midpoint(p,f,t.center),t},AxisAlignedBoundingBox.clone=function(e,t){if(defined(e))return defined(t)?(t.minimum=Cartesian3.clone(e.minimum,t.minimum),t.maximum=Cartesian3.clone(e.maximum,t.maximum),t.center=Cartesian3.clone(e.center,t.center),t):new AxisAlignedBoundingBox(e.minimum,e.maximum,e.center)},AxisAlignedBoundingBox.equals=function(e,t){return e===t||defined(e)&&defined(t)&&Cartesian3.equals(e.center,t.center)&&Cartesian3.equals(e.minimum,t.minimum)&&Cartesian3.equals(e.maximum,t.maximum)};var intersectScratch=new Cartesian3;function EllipsoidalOccluder(e,t){this._ellipsoid=e,this._cameraPosition=new Cartesian3,this._cameraPositionInScaledSpace=new Cartesian3,this._distanceToLimbInScaledSpaceSquared=0,defined(t)&&(this.cameraPosition=t)}AxisAlignedBoundingBox.intersectPlane=function(e,t){intersectScratch=Cartesian3.subtract(e.maximum,e.minimum,intersectScratch);var i=Cartesian3.multiplyByScalar(intersectScratch,.5,intersectScratch),r=t.normal;i=i.x*Math.abs(r.x)+i.y*Math.abs(r.y)+i.z*Math.abs(r.z);return 0<(t=Cartesian3.dot(e.center,r)+t.distance)-i?Intersect$1.INSIDE:t+i<0?Intersect$1.OUTSIDE:Intersect$1.INTERSECTING},AxisAlignedBoundingBox.prototype.clone=function(e){return AxisAlignedBoundingBox.clone(this,e)},AxisAlignedBoundingBox.prototype.intersectPlane=function(e){return AxisAlignedBoundingBox.intersectPlane(this,e)},AxisAlignedBoundingBox.prototype.equals=function(e){return AxisAlignedBoundingBox.equals(this,e)},Object.defineProperties(EllipsoidalOccluder.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var t=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=Cartesian3.magnitudeSquared(t)-1;Cartesian3.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=t,this._distanceToLimbInScaledSpaceSquared=i}}});var scratchCartesian=new Cartesian3;EllipsoidalOccluder.prototype.isPointVisible=function(e){return isScaledSpacePointVisible(this._ellipsoid.transformPositionToScaledSpace(e,scratchCartesian),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},EllipsoidalOccluder.prototype.isScaledSpacePointVisible=function(e){return isScaledSpacePointVisible(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var scratchCameraPositionInScaledSpaceShrunk=new Cartesian3;EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){var i,r=this._ellipsoid;t=defined(t)&&t<0&&r.minimumRadius>-t?((i=scratchCameraPositionInScaledSpaceShrunk).x=this._cameraPosition.x/(r.radii.x+t),i.y=this._cameraPosition.y/(r.radii.y+t),i.z=this._cameraPosition.z/(r.radii.z+t),i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared);return isScaledSpacePointVisible(e,i,t)},EllipsoidalOccluder.prototype.computeHorizonCullingPoint=function(e,t,i){return computeHorizonCullingPointFromPositions(this._ellipsoid,e,t,i)};var scratchEllipsoidShrunk=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE);EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,i,r){return computeHorizonCullingPointFromPositions(getPossiblyShrunkEllipsoid(this._ellipsoid,i,scratchEllipsoidShrunk),e,t,r)},EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices=function(e,t,i,r,n){return computeHorizonCullingPointFromVertices(this._ellipsoid,e,t,i,r,n)},EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,i,r,n,a){return computeHorizonCullingPointFromVertices(getPossiblyShrunkEllipsoid(this._ellipsoid,n,scratchEllipsoidShrunk),e,t,i,r,a)};var subsampleScratch=[];EllipsoidalOccluder.prototype.computeHorizonCullingPointFromRectangle=function(e,t,i){var r=Rectangle.subsample(e,t,0,subsampleScratch);e=BoundingSphere.fromPoints(r);if(!(Cartesian3.magnitude(e.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(e.center,r,i)};var scratchEllipsoidShrunkRadii=new Cartesian3;function getPossiblyShrunkEllipsoid(e,t,i){return defined(t)&&t<0&&e.minimumRadius>-t&&(t=Cartesian3.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,scratchEllipsoidShrunkRadii),e=Ellipsoid.fromCartesian3(t,i)),e}function computeHorizonCullingPointFromPositions(e,t,i,r){defined(r)||(r=new Cartesian3);for(var n=computeScaledSpaceDirectionToPoint(e,t),a=0,o=0,s=i.length;o<s;++o){var l=computeMagnitude(e,i[o],n);if(l<0)return;a=Math.max(a,l)}return magnitudeToPoint(n,a,r)}var positionScratch=new Cartesian3;function computeHorizonCullingPointFromVertices(e,t,i,r,n,a){defined(a)||(a=new Cartesian3),r=defaultValue(r,3),n=defaultValue(n,Cartesian3.ZERO);for(var o=computeScaledSpaceDirectionToPoint(e,t),s=0,l=0,c=i.length;l<c;l+=r){positionScratch.x=i[l]+n.x,positionScratch.y=i[l+1]+n.y,positionScratch.z=i[l+2]+n.z;var u=computeMagnitude(e,positionScratch,o);if(u<0)return;s=Math.max(s,u)}return magnitudeToPoint(o,s,a)}function isScaledSpacePointVisible(e,t,i){return e=Cartesian3.subtract(e,t,scratchCartesian),t=-Cartesian3.dot(e,t),!(i<0?0<t:i<t&&t*t/Cartesian3.magnitudeSquared(e)>i)}var scaledSpaceScratch=new Cartesian3,directionScratch=new Cartesian3;function computeMagnitude(e,t,i){var r=e.transformPositionToScaledSpace(t,scaledSpaceScratch);e=Cartesian3.magnitudeSquared(r),t=Math.sqrt(e),r=Cartesian3.divideByScalar(r,t,directionScratch),e=Math.max(1,e),t=1/(t=Math.max(1,t));return 1/(Cartesian3.dot(r,i)*t-Cartesian3.magnitude(Cartesian3.cross(r,i,r))*(Math.sqrt(e-1)*t))}function magnitudeToPoint(e,t,i){if(!(t<=0||t===1/0||t!=t))return Cartesian3.multiplyByScalar(e,t,i)}var directionToPointScratch=new Cartesian3;function computeScaledSpaceDirectionToPoint(e,t){return Cartesian3.equals(t,Cartesian3.ZERO)?t:(e.transformPositionToScaledSpace(t,directionToPointScratch),Cartesian3.normalize(directionToPointScratch,directionToPointScratch))}var QuadraticRealPolynomial={};function addWithCancellationCheck(e,t,i){var r=e+t;return CesiumMath.sign(e)!==CesiumMath.sign(t)&&Math.abs(r/Math.max(Math.abs(e),Math.abs(t)))<i?0:r}QuadraticRealPolynomial.computeDiscriminant=function(e,t,i){return t*t-4*e*i},QuadraticRealPolynomial.computeRealRoots=function(e,t,i){if(0===e)return 0===t?[]:[-i/t];if(0===t){if(0===i)return[0,0];var r=Math.abs(i),n=Math.abs(e);return r<n&&r/n<CesiumMath.EPSILON14?[0,0]:n<r&&n/r<CesiumMath.EPSILON14||(n=-i/e)<0?[]:[-(r=Math.sqrt(n)),r]}return 0===i?(n=-t/e)<0?[n,0]:[0,n]:(n=addWithCancellationCheck(t*t,-4*e*i,CesiumMath.EPSILON14))<0?[]:(n=-.5*addWithCancellationCheck(t,CesiumMath.sign(t)*Math.sqrt(n),CesiumMath.EPSILON14),0<t?[n/e,i/n]:[i/n,n/e])};var CubicRealPolynomial={};function computeRealRoots(e,t,i,r){var n=t/3,a=i/3,o=(m=e)*a,s=n*(u=r);if((i=4*(f=m*a-(p=n*n))*(t=n*u-(h=a*a))-(e=m*u-n*a)*e)<0){r=o*h<=p*s?-2*n*(d=f)+(l=m)*e:-(l=u)*e+2*a*(d=t);var l=(l=(g=(c=-(r<0?-1:1)*Math.abs(l)*Math.sqrt(-i))-r)/2)<0?-Math.pow(-l,1/3):Math.pow(l,1/3),c=g===c?-l:-d/l;c=d<=0?l+c:-r/(l*l+c*c+d);return o*h<=p*s?[(c-n)/m]:[-u/(c+a)]}var u,d=f,h=(o=-2*n*f+m*e,t),p=-u*e+2*a*t,f=(s=Math.sqrt(i),Math.sqrt(3)/2),m=(e=Math.abs(Math.atan2(m*s,-o)/3),(o=2*n<(g=(c=2*Math.sqrt(-d))*(t=Math.cos(e)))+(i=c*(-t/2-f*Math.sin(e)))?g-n:i-n)/(d=m)),g=(e=Math.abs(Math.atan2(u*s,-p)/3),(u=-u)/(e=(g=(c=2*Math.sqrt(-h))*(t=Math.cos(e)))+(i=c*(-t/2-f*Math.sin(e)))<2*a?g+a:i+a));return m<=(e=(a*(i=-o*e-d*u)-n*(o*u))/(-n*i+a*(d*e)))?m<=g?e<=g?[m,e,g]:[m,g,e]:[g,m,e]:m<=g?[e,m,g]:e<=g?[e,g,m]:[g,e,m]}CubicRealPolynomial.computeDiscriminant=function(e,t,i,r){var n=t*t,a=i*i;return 18*e*t*i*r+n*a-e*e*27*(r*r)-4*(e*a*i+n*t*r)},CubicRealPolynomial.computeRealRoots=function(e,t,i,r){var n;if(0===e)return QuadraticRealPolynomial.computeRealRoots(t,i,r);if(0!==t)return 0===i?0===r?(a=-t/e)<0?[a,0,0]:[0,0,a]:computeRealRoots(e,t,0,r):0===r?0===(n=QuadraticRealPolynomial.computeRealRoots(e,t,i)).length?[0]:n[1]<=0?[n[0],n[1],0]:0<=n[0]?[0,n[0],n[1]]:[n[0],0,n[1]]:computeRealRoots(e,t,i,r);if(0!==i)return 0===r?0===(n=QuadraticRealPolynomial.computeRealRoots(e,0,i)).Length?[0]:[n[0],0,n[1]]:computeRealRoots(e,0,i,r);if(0===r)return[0,0,0];var a=(a=-r/e)<0?-Math.pow(-a,1/3):Math.pow(a,1/3);return[a,a,a]};var QuarticRealPolynomial={};function original(e,t,i,r){var n=e*e,a=t-3*n/8,o=i-t*e/2+n*e/8;r=r-i*e/4+t*n/16-3*n*n/256;if(0<(i=CubicRealPolynomial.computeRealRoots(1,2*a,a*a-4*r,-o*o)).length){if(t=-e/4,n=i[i.length-1],Math.abs(n)<CesiumMath.EPSILON14){if(2===(e=QuadraticRealPolynomial.computeRealRoots(1,a,r)).length){i=e[0];var s=e[1];if(0<=i&&0<=s)return r=Math.sqrt(i),[t-(e=Math.sqrt(s)),t-r,t+r,t+e];if(0<=i&&s<0)return[t-(l=Math.sqrt(i)),t+l];if(i<0&&0<=s)return[t-(l=Math.sqrt(s)),t+l]}return[]}if(0<n){var l=(a+n-o/(s=Math.sqrt(n)))/2;o=(a+n+o/s)/2,l=QuadraticRealPolynomial.computeRealRoots(1,s,l),o=QuadraticRealPolynomial.computeRealRoots(1,-s,o);return 0!==l.length?(l[0]+=t,l[1]+=t,0!==o.length?(o[0]+=t,o[1]+=t,l[1]<=o[0]?[l[0],l[1],o[0],o[1]]:o[1]<=l[0]?[o[0],o[1],l[0],l[1]]:l[0]>=o[0]&&l[1]<=o[1]?[o[0],l[0],l[1],o[1]]:o[0]>=l[0]&&o[1]<=l[1]?[l[0],o[0],o[1],l[1]]:l[0]>o[0]&&l[0]<o[1]?[o[0],l[0],o[1],l[1]]:[l[0],o[0],l[1],o[1]]):l):0!==o.length?(o[0]+=t,o[1]+=t,o):[]}}return[]}function neumark(e,t,i,r){var n=-2*t,a=i*e+t*t-4*r,o=(p=e*e)*r-i*t*e+i*i;if(0<(h=CubicRealPolynomial.computeRealRoots(1,n,a,o)).length){var s,l,c,u,d=h[0],h=(o=e/2,(n=t-d)/2),p=(t=(a=n*n)-4*r,n=a+4*Math.abs(r),a=p-4*d,p+4*Math.abs(d));l=d<0||t*p<a*n?(s=(a=Math.sqrt(a))/2,0===a?0:(e*h-i)/a):(s=0===(l=Math.sqrt(t))?0:(e*h-i)/l,l/2),0==o&&0===s?u=c=0:CesiumMath.sign(o)===CesiumMath.sign(s)?u=d/(c=o+s):c=d/(u=o-s),0==h&&0===l?m=f=0:CesiumMath.sign(h)===CesiumMath.sign(l)?m=r/(f=h+l):f=r/(m=h-l);var f=QuadraticRealPolynomial.computeRealRoots(1,c,f),m=QuadraticRealPolynomial.computeRealRoots(1,u,m);if(0!==f.length)return 0!==m.length?f[1]<=m[0]?[f[0],f[1],m[0],m[1]]:m[1]<=f[0]?[m[0],m[1],f[0],f[1]]:f[0]>=m[0]&&f[1]<=m[1]?[m[0],f[0],f[1],m[1]]:m[0]>=f[0]&&m[1]<=f[1]?[f[0],m[0],m[1],f[1]]:f[0]>m[0]&&f[0]<m[1]?[m[0],f[0],m[1],f[1]]:[f[0],m[0],f[1],m[1]]:f;if(0!==m.length)return m}return[]}function Ray(e,t){t=Cartesian3.clone(defaultValue(t,Cartesian3.ZERO)),Cartesian3.equals(t,Cartesian3.ZERO)||Cartesian3.normalize(t,t),this.origin=Cartesian3.clone(defaultValue(e,Cartesian3.ZERO)),this.direction=t}QuarticRealPolynomial.computeDiscriminant=function(e,t,i,r,n){var a=e*e,o=t*t,s=o*t,l=i*i,c=l*i,u=r*r,d=u*r,h=n*n;return o*l*u-4*s*d-4*e*c*u+18*e*t*i*d-27*a*u*u+a*e*256*(h*n)+n*(18*s*i*r-4*o*c+16*e*l*l-80*e*t*l*r-6*e*o*u+144*a*i*u)+h*(144*e*o*i-27*o*o-128*a*l-192*a*t*r)},QuarticRealPolynomial.computeRealRoots=function(e,t,i,r,n){if(Math.abs(e)<CesiumMath.EPSILON15)return CubicRealPolynomial.computeRealRoots(t,i,r,n);switch(i/=e,r/=e,n/=e,e=(t/=e)<0?1:0,e+=i<0?e+1:e,e+=r<0?e+1:e,e+=n<0?e+1:e){case 0:return original(t,i,r,n);case 1:case 2:return neumark(t,i,r,n);case 3:case 4:return original(t,i,r,n);case 5:return neumark(t,i,r,n);case 6:case 7:return original(t,i,r,n);case 8:return neumark(t,i,r,n);case 9:case 10:return original(t,i,r,n);case 11:return neumark(t,i,r,n);case 12:case 13:case 14:case 15:return original(t,i,r,n);default:return}},Ray.clone=function(e,t){if(defined(e))return defined(t)?(t.origin=Cartesian3.clone(e.origin),t.direction=Cartesian3.clone(e.direction),t):new Ray(e.origin,e.direction)},Ray.getPoint=function(e,t,i){return defined(i)||(i=new Cartesian3),i=Cartesian3.multiplyByScalar(e.direction,t,i),Cartesian3.add(e.origin,i,i)};var IntersectionTests={rayPlane:function(e,t,i){defined(i)||(i=new Cartesian3);var r=e.origin,n=e.direction,a=t.normal;e=Cartesian3.dot(a,n);if(!(Math.abs(e)<CesiumMath.EPSILON15||(e=(-t.distance-Cartesian3.dot(a,r))/e)<0))return i=Cartesian3.multiplyByScalar(n,e,i),Cartesian3.add(r,i,i)}},scratchEdge0=new Cartesian3,scratchEdge1=new Cartesian3,scratchPVec=new Cartesian3,scratchTVec=new Cartesian3,scratchQVec=new Cartesian3;IntersectionTests.rayTriangleParametric=function(e,t,i,r,n){n=defaultValue(n,!1);var a,o,s,l=e.origin,c=e.direction,u=Cartesian3.subtract(i,t,scratchEdge0);e=Cartesian3.subtract(r,t,scratchEdge1),i=Cartesian3.cross(c,e,scratchPVec),r=Cartesian3.dot(u,i);if(n){if(r<CesiumMath.EPSILON6)return;if(h=Cartesian3.subtract(l,t,scratchTVec),(d=Cartesian3.dot(h,i))<0||r<d)return;if(a=Cartesian3.cross(h,u,scratchQVec),(o=Cartesian3.dot(c,a))<0||r<d+o)return;s=Cartesian3.dot(e,a)/r}else{if(Math.abs(r)<CesiumMath.EPSILON6)return;r=1/r;var d,h=Cartesian3.subtract(l,t,scratchTVec);if((d=Cartesian3.dot(h,i)*r)<0||1<d)return;if(a=Cartesian3.cross(h,u,scratchQVec),(o=Cartesian3.dot(c,a)*r)<0||1<d+o)return;s=Cartesian3.dot(e,a)*r}return s},IntersectionTests.rayTriangle=function(e,t,i,r,n,a){if(defined(n=IntersectionTests.rayTriangleParametric(e,t,i,r,n))&&!(n<0))return defined(a)||(a=new Cartesian3),Cartesian3.multiplyByScalar(e.direction,n,a),Cartesian3.add(e.origin,a,a)};var scratchLineSegmentTriangleRay=new Ray;function solveQuadratic(e,t,i,r){if(!((n=t*t-4*e*i)<0)){if(0<n){var n,a=1/(2*e);return(n=(-t+(i=Math.sqrt(n)))*a)<(a=(-t-i)*a)?(r.root0=n,r.root1=a):(r.root0=a,r.root1=n),r}if(0!=(e=-t/(2*e)))return r.root0=r.root1=e,r}}IntersectionTests.lineSegmentTriangle=function(e,t,i,r,n,a,o){var s=scratchLineSegmentTriangleRay;if(Cartesian3.clone(e,s.origin),Cartesian3.subtract(t,e,s.direction),Cartesian3.normalize(s.direction,s.direction),!(!defined(a=IntersectionTests.rayTriangleParametric(s,i,r,n,a))||a<0||a>Cartesian3.distance(e,t)))return defined(o)||(o=new Cartesian3),Cartesian3.multiplyByScalar(s.direction,a,o),Cartesian3.add(s.origin,o,o)};var raySphereRoots={root0:0,root1:0};function raySphere(e,t,i){defined(i)||(i=new Interval);var r=e.origin,n=e.direction;e=t.center,t=t.radius*t.radius,e=Cartesian3.subtract(r,e,scratchPVec);if(defined(t=solveQuadratic(Cartesian3.dot(n,n),2*Cartesian3.dot(n,e),Cartesian3.magnitudeSquared(e)-t,raySphereRoots)))return i.start=t.root0,i.stop=t.root1,i}IntersectionTests.raySphere=function(e,t,i){if(defined(i=raySphere(e,t,i))&&!(i.stop<0))return i.start=Math.max(i.start,0),i};var scratchLineSegmentRay=new Ray;IntersectionTests.lineSegmentSphere=function(e,t,i,r){var n=scratchLineSegmentRay;if(Cartesian3.clone(e,n.origin),t=Cartesian3.subtract(t,e,n.direction),e=Cartesian3.magnitude(t),Cartesian3.normalize(t,t),!(!defined(r=raySphere(n,i,r))||r.stop<0||r.start>e))return r.start=Math.max(r.start,0),r.stop=Math.min(r.stop,e),r};var scratchQ=new Cartesian3,scratchW=new Cartesian3;function addWithCancellationCheck$1(e,t,i){var r=e+t;return CesiumMath.sign(e)!==CesiumMath.sign(t)&&Math.abs(r/Math.max(Math.abs(e),Math.abs(t)))<i?0:r}function quadraticVectorExpression(e,t,i,r,n){var a,o=r*r,s=n*n,l=(e[Matrix3.COLUMN1ROW1]-e[Matrix3.COLUMN2ROW2])*s,c=n*(r*addWithCancellationCheck$1(e[Matrix3.COLUMN1ROW0],e[Matrix3.COLUMN0ROW1],CesiumMath.EPSILON15)+t.y),u=e[Matrix3.COLUMN0ROW0]*o+e[Matrix3.COLUMN2ROW2]*s+r*t.x+i,d=s*addWithCancellationCheck$1(e[Matrix3.COLUMN2ROW1],e[Matrix3.COLUMN1ROW2],CesiumMath.EPSILON15),h=n*(r*addWithCancellationCheck$1(e[Matrix3.COLUMN2ROW0],e[Matrix3.COLUMN0ROW2])+t.z),p=[];if(0==h&&0==d){if(0===(a=QuadraticRealPolynomial.computeRealRoots(l,c,u)).length)return p;var f=a[0],m=Math.sqrt(Math.max(1-f*f,0));return p.push(new Cartesian3(r,n*f,n*-m)),p.push(new Cartesian3(r,n*f,n*m)),2===a.length&&(g=a[1],y=Math.sqrt(Math.max(1-g*g,0)),p.push(new Cartesian3(r,n*g,n*-y)),p.push(new Cartesian3(r,n*g,n*y))),p}var g=l*l+(f=d*d),y=2*(c*l+(m=h*d));f=2*u*l+c*c-f+(t=h*h),m=2*(u*c-m),t=u*u-t;if(0==g&&0==y&&0==f&&0==m)return p;var _=(a=QuarticRealPolynomial.computeRealRoots(g,y,f,m,t)).length;if(0===_)return p;for(var v=0;v<_;++v){var C=a[v],x=C*C,b=Math.max(1-x,0);b=Math.sqrt(b);(x=(x=CesiumMath.sign(l)===CesiumMath.sign(u)?addWithCancellationCheck$1(l*x+u,c*C,CesiumMath.EPSILON12):CesiumMath.sign(u)===CesiumMath.sign(c*C)?addWithCancellationCheck$1(l*x,c*C+u,CesiumMath.EPSILON12):addWithCancellationCheck$1(l*x+c*C,u,CesiumMath.EPSILON12))*addWithCancellationCheck$1(d*C,h,CesiumMath.EPSILON15))<0?p.push(new Cartesian3(r,n*C,n*b)):0<x?p.push(new Cartesian3(r,n*C,n*-b)):0!==b?(p.push(new Cartesian3(r,n*C,n*-b)),p.push(new Cartesian3(r,n*C,n*b)),++v):p.push(new Cartesian3(r,n*C,n*b))}return p}IntersectionTests.rayEllipsoid=function(e,t){var i,r,n=t.oneOverRadii,a=Cartesian3.multiplyComponents(n,e.origin,scratchQ);t=Cartesian3.multiplyComponents(n,e.direction,scratchW),n=Cartesian3.magnitudeSquared(a),e=Cartesian3.dot(a,t);if(1<n){if(0<=e)return;var o,s,l=n-1;if((a=e*e)<(s=(o=Cartesian3.magnitudeSquared(t))*l))return;if(s<a){i=e*e-s;var c=(r=-e+Math.sqrt(i))/o;return c<(a=l/r)?new Interval(c,a):{start:a,stop:c}}return new Interval(c=Math.sqrt(l/o),c)}return n<1?(l=n-1,i=e*e-(s=(o=Cartesian3.magnitudeSquared(t))*l),new Interval(0,(r=-e+Math.sqrt(i))/o)):e<0?new Interval(0,-e/(o=Cartesian3.magnitudeSquared(t))):void 0};var firstAxisScratch=new Cartesian3,secondAxisScratch=new Cartesian3,thirdAxisScratch=new Cartesian3,referenceScratch=new Cartesian3,bCart=new Cartesian3,bScratch=new Matrix3,btScratch=new Matrix3,diScratch=new Matrix3,dScratch=new Matrix3,cScratch=new Matrix3,tempMatrix=new Matrix3,aScratch=new Matrix3,sScratch=new Cartesian3,closestScratch=new Cartesian3,surfPointScratch=new Cartographic;IntersectionTests.grazingAltitudeLocation=function(e,t){var i=e.origin,r=e.direction;if(!Cartesian3.equals(i,Cartesian3.ZERO)){var n=t.geodeticSurfaceNormal(i,firstAxisScratch);if(0<=Cartesian3.dot(r,n))return i}var a=defined(this.rayEllipsoid(e,t)),o=t.transformPositionToScaledSpace(r,firstAxisScratch),s=(n=Cartesian3.normalize(o,o),e=Cartesian3.mostOrthogonalAxis(o,referenceScratch),o=Cartesian3.normalize(Cartesian3.cross(e,n,secondAxisScratch),secondAxisScratch),e=Cartesian3.normalize(Cartesian3.cross(n,o,thirdAxisScratch),thirdAxisScratch),bScratch);s[0]=n.x,s[1]=n.y,s[2]=n.z,s[3]=o.x,s[4]=o.y,s[5]=o.z,s[6]=e.x,s[7]=e.y,s[8]=e.z;n=Matrix3.transpose(s,btScratch);var l=Matrix3.fromScale(t.radii,diScratch);o=Matrix3.fromScale(t.oneOverRadii,dScratch);(e=cScratch)[0]=0,e[1]=-r.z,e[2]=r.y,e[3]=r.z,e[4]=0,e[5]=-r.x,e[6]=-r.y,e[7]=r.x,e[8]=0;o=Matrix3.multiply(Matrix3.multiply(n,o,tempMatrix),e,tempMatrix),e=Matrix3.multiply(Matrix3.multiply(o,l,aScratch),s,aScratch),o=Matrix3.multiplyByVector(o,i,bCart);var c,u=quadraticVectorExpression(e,Cartesian3.negate(o,firstAxisScratch),0,0,1),d=u.length;if(0<d){for(var h=Cartesian3.clone(Cartesian3.ZERO,closestScratch),p=Number.NEGATIVE_INFINITY,f=0;f<d;++f){c=Matrix3.multiplyByVector(l,Matrix3.multiplyByVector(s,u[f],sScratch),sScratch);var m=Cartesian3.normalize(Cartesian3.subtract(c,i,referenceScratch),referenceScratch);p<(m=Cartesian3.dot(m,r))&&(p=m,h=Cartesian3.clone(c,h))}return e=t.cartesianToCartographic(h,surfPointScratch),p=CesiumMath.clamp(p,0,1),o=Cartesian3.magnitude(Cartesian3.subtract(h,i,referenceScratch))*Math.sqrt(1-p*p),o=a?-o:o,e.height=o,t.cartographicToCartesian(e,new Cartesian3)}};var lineSegmentPlaneDifference=new Cartesian3;function Plane(e,t){this.normal=Cartesian3.clone(e),this.distance=t}IntersectionTests.lineSegmentPlane=function(e,t,i,r){defined(r)||(r=new Cartesian3);var n=Cartesian3.subtract(t,e,lineSegmentPlaneDifference),a=i.normal;t=Cartesian3.dot(a,n);if(!(Math.abs(t)<CesiumMath.EPSILON6||(a=Cartesian3.dot(a,e),(t=-(i.distance+a)/t)<0||1<t)))return Cartesian3.multiplyByScalar(n,t,r),Cartesian3.add(e,r,r),r},IntersectionTests.trianglePlaneIntersection=function(e,t,i,r){var n,a,o=r.normal,s=r.distance,l=Cartesian3.dot(o,e)+s<0,c=Cartesian3.dot(o,t)+s<0;o=Cartesian3.dot(o,i)+s<0,s=0;if(s+=l?1:0,s+=c?1:0,1!=(s+=o?1:0)&&2!=s||(n=new Cartesian3,a=new Cartesian3),1==s){if(l)return IntersectionTests.lineSegmentPlane(e,t,r,n),IntersectionTests.lineSegmentPlane(e,i,r,a),{positions:[e,t,i,n,a],indices:[0,3,4,1,2,4,1,4,3]};if(c)return IntersectionTests.lineSegmentPlane(t,i,r,n),IntersectionTests.lineSegmentPlane(t,e,r,a),{positions:[e,t,i,n,a],indices:[1,3,4,2,0,4,2,4,3]};if(o)return IntersectionTests.lineSegmentPlane(i,e,r,n),IntersectionTests.lineSegmentPlane(i,t,r,a),{positions:[e,t,i,n,a],indices:[2,3,4,0,1,4,0,4,3]}}else if(2==s){if(!l)return IntersectionTests.lineSegmentPlane(t,e,r,n),IntersectionTests.lineSegmentPlane(i,e,r,a),{positions:[e,t,i,n,a],indices:[1,2,4,1,4,3,0,3,4]};if(!c)return IntersectionTests.lineSegmentPlane(i,t,r,n),IntersectionTests.lineSegmentPlane(e,t,r,a),{positions:[e,t,i,n,a],indices:[2,0,4,2,4,3,1,3,4]};if(!o)return IntersectionTests.lineSegmentPlane(e,i,r,n),IntersectionTests.lineSegmentPlane(t,i,r,a),{positions:[e,t,i,n,a],indices:[0,1,4,0,4,3,2,3,4]}}},Plane.fromPointNormal=function(e,t,i){return e=-Cartesian3.dot(t,e),defined(i)?(Cartesian3.clone(t,i.normal),i.distance=e,i):new Plane(t,e)};var scratchNormal=new Cartesian3;Plane.fromCartesian4=function(e,t){var i=Cartesian3.fromCartesian4(e,scratchNormal);e=e.w;return defined(t)?(Cartesian3.clone(i,t.normal),t.distance=e,t):new Plane(i,e)},Plane.getPointDistance=function(e,t){return Cartesian3.dot(e.normal,t)+e.distance};var scratchCartesian$1=new Cartesian3;Plane.projectPointOntoPlane=function(e,t,i){defined(i)||(i=new Cartesian3);var r=Plane.getPointDistance(e,t);r=Cartesian3.multiplyByScalar(e.normal,r,scratchCartesian$1);return Cartesian3.subtract(t,r,i)};var scratchInverseTranspose=new Matrix4,scratchPlaneCartesian4=new Cartesian4,scratchTransformNormal=new Cartesian3;function binarySearch(e,t,i){for(var r,n,a=0,o=e.length-1;a<=o;)if((n=i(e[r=~~((a+o)/2)],t))<0)a=1+r;else{if(!(0<n))return r;o=r-1}return~(o+1)}function EarthOrientationParametersSample(e,t,i,r,n){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=r,this.ut1MinusUtc=n}function sprintf(){function e(e,t,i,r){return i=i||" ",i=e.length>=t?"":Array(1+t-e.length>>>0).join(i),r?e+i:i+e}function t(t,i,r,n,a,o){var s=n-t.length;return 0<s&&(t=r||!a?e(t,n,o,r):t.slice(0,i.length)+e("",s,"0",!0)+t.slice(i.length)),t}function i(i,r,n,a,o,s,l){var c=i>>>0;return t(i=(n=n&&c&&{2:"0b",8:"0",16:"0x"}[r]||"")+e(c.toString(r),s||0,"0",!1),n,a,o,l)}function r(e,i,r,n,a,o){return null!=n&&(e=e.slice(0,n)),t(e,"",i,r,a,o)}var n=arguments,a=0,o=n[a++];return o.replace(/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,(function(o,s,l,c,u,d,h){var p,f,m;if("%%"==o)return"%";for(var g=!1,y="",_=!1,v=!1,C=" ",x=l.length,b=0;l&&b<x;b++)switch(l.charAt(b)){case" ":y=" ";break;case"+":y="+";break;case"-":g=!0;break;case"'":C=l.charAt(b+1);break;case"0":_=!0;break;case"#":v=!0}if((c=c?"*"==c?+n[a++]:"*"==c.charAt(0)?+n[c.slice(1,-1)]:+c:0)<0&&(c=-c,g=!0),!isFinite(c))throw new Error("sprintf: (minimum-)width must be finite");switch(d=d?"*"==d?+n[a++]:"*"==d.charAt(0)?+n[d.slice(1,-1)]:+d:-1<"fFeE".indexOf(h)?6:"d"==h?0:void 0,m=s?n[s.slice(0,-1)]:n[a++],h){case"s":return r(String(m),g,c,d,_,C);case"c":return r(String.fromCharCode(+m),g,c,d,_);case"b":return i(m,2,v,g,c,d,_);case"o":return i(m,8,v,g,c,d,_);case"x":return i(m,16,v,g,c,d,_);case"X":return i(m,16,v,g,c,d,_).toUpperCase();case"u":return i(m,10,v,g,c,d,_);case"i":case"d":return p=+m||0,t(m=(f=(p=Math.round(p-p%1))<0?"-":y)+e(String(Math.abs(p)),d,"0",!1),f,g,c,_);case"e":case"E":case"f":case"F":case"g":case"G":return f=(p=+m)<0?"-":y,s=["toExponential","toFixed","toPrecision"]["efg".indexOf(h.toLowerCase())],h=["toString","toUpperCase"]["eEfFgG".indexOf(h)%2],t(m=f+Math.abs(p)[s](d),f,g,c,_)[h]();default:return o}}))}function GregorianDate(e,t,i,r,n,a,o,s){this.year=e,this.month=t,this.day=i,this.hour=r,this.minute=n,this.second=a,this.millisecond=o,this.isLeapSecond=s}function isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}function LeapSecond(e,t){this.julianDate=e,this.offset=t}Plane.transform=function(e,t,i){var r=e.normal;e=e.distance,t=Matrix4.inverseTranspose(t,scratchInverseTranspose),e=Cartesian4.fromElements(r.x,r.y,r.z,e,scratchPlaneCartesian4),e=Matrix4.multiplyByVector(t,e,e),t=Cartesian3.fromCartesian4(e,scratchTransformNormal);return e=Cartesian4.divideByScalar(e,Cartesian3.magnitude(t),e),Plane.fromCartesian4(e,i)},Plane.clone=function(e,t){return defined(t)?(Cartesian3.clone(e.normal,t.normal),t.distance=e.distance,t):new Plane(e.normal,e.distance)},Plane.equals=function(e,t){return e.distance===t.distance&&Cartesian3.equals(e.normal,t.normal)},Plane.ORIGIN_XY_PLANE=Object.freeze(new Plane(Cartesian3.UNIT_Z,0)),Plane.ORIGIN_YZ_PLANE=Object.freeze(new Plane(Cartesian3.UNIT_X,0)),Plane.ORIGIN_ZX_PLANE=Object.freeze(new Plane(Cartesian3.UNIT_Y,0));var TimeConstants={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5},TimeConstants$1=Object.freeze(TimeConstants),TimeStandard={UTC:0,TAI:1},TimeStandard$1=Object.freeze(TimeStandard),gregorianDateScratch=new GregorianDate,daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],daysInLeapFeburary=29;function compareLeapSecondDates(e,t){return JulianDate.compare(e.julianDate,t.julianDate)}var binarySearchScratchLeapSecond=new LeapSecond;function convertUtcToTai(e){binarySearchScratchLeapSecond.julianDate=e;var t=JulianDate.leapSeconds,i=binarySearch(t,binarySearchScratchLeapSecond,compareLeapSecondDates);i<0&&(i=~i),i>=t.length&&(i=t.length-1);var r=t[i].offset;0<i&&r<JulianDate.secondsDifference(t[i].julianDate,e)&&(r=t[--i].offset),JulianDate.addSeconds(e,r,e)}function convertTaiToUtc(e,t){binarySearchScratchLeapSecond.julianDate=e;var i=JulianDate.leapSeconds,r=binarySearch(i,binarySearchScratchLeapSecond,compareLeapSecondDates);if(r<0&&(r=~r),0===r)return JulianDate.addSeconds(e,-i[0].offset,t);if(r>=i.length)return JulianDate.addSeconds(e,-i[r-1].offset,t);var n=JulianDate.secondsDifference(i[r].julianDate,e);return 0===n?JulianDate.addSeconds(e,-i[r].offset,t):n<=1?void 0:JulianDate.addSeconds(e,-i[--r].offset,t)}function setComponents(e,t,i){var r=t/TimeConstants$1.SECONDS_PER_DAY|0;return e+=r,(t-=TimeConstants$1.SECONDS_PER_DAY*r)<0&&(e--,t+=TimeConstants$1.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function computeJulianDateComponents(e,t,i,r,n,a,o){var s=(t-14)/12|0;i=(1461*(e=e+4800+s)/4|0)+(367*(t-2-12*s)/12|0)-(3*((e+100)/100|0)/4|0)+i-32075;return(r-=12)<0&&(r+=24),43200<=(o=a+(r*TimeConstants$1.SECONDS_PER_HOUR+n*TimeConstants$1.SECONDS_PER_MINUTE+o*TimeConstants$1.SECONDS_PER_MILLISECOND))&&--i,[i,o]}var matchCalendarYear=/^(\d{4})$/,matchCalendarMonth=/^(\d{4})-(\d{2})$/,matchOrdinalDate=/^(\d{4})-?(\d{3})$/,matchWeekDate=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,matchCalendarDate=/^(\d{4})-?(\d{2})-?(\d{2})$/,utcOffset=/([Z+\-])?(\d{2})?:?(\d{2})?$/,matchHours=/^(\d{2})(\.\d+)?/.source+utcOffset.source,matchHoursMinutes=/^(\d{2}):?(\d{2})(\.\d+)?/.source+utcOffset.source,matchHoursMinutesSeconds=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+utcOffset.source;function JulianDate(e,t,i){this.dayNumber=void 0,this.secondsOfDay=void 0,e=defaultValue(e,0),t=defaultValue(t,0),i=defaultValue(i,TimeStandard$1.UTC);var r=0|e;setComponents(r,t+=(e-r)*TimeConstants$1.SECONDS_PER_DAY,this),i===TimeStandard$1.UTC&&convertUtcToTai(this)}JulianDate.fromGregorianDate=function(e,t){return e=computeJulianDateComponents(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond),defined(t)?(setComponents(e[0],e[1],t),convertUtcToTai(t),t):new JulianDate(e[0],e[1],TimeStandard$1.UTC)},JulianDate.fromDate=function(e,t){return e=computeJulianDateComponents(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),defined(t)?(setComponents(e[0],e[1],t),convertUtcToTai(t),t):new JulianDate(e[0],e[1],TimeStandard$1.UTC)},JulianDate.fromIso8601=function(e,t){var i,r,n,a=(e=e.replace(",",".")).split("T"),o=1,s=1,l=0,c=0,u=0,d=0,h=a[0];e=a[1];if(null!==(a=h.match(matchCalendarDate))?(i=+a[1],o=+a[2],s=+a[3]):null!==(a=h.match(matchCalendarMonth))?(i=+a[1],o=+a[2]):null!==(a=h.match(matchCalendarYear))?i=+a[1]:(null!==(a=h.match(matchOrdinalDate))?(i=+a[1],p=+a[2],n=isLeapYear(i)):null!==(a=h.match(matchWeekDate))&&(i=+a[1],p=7*+a[2]+(+a[3]||0)-new Date(Date.UTC(i,0,4)).getUTCDay()-3),(r=new Date(Date.UTC(i,0,1))).setUTCDate(p),o=r.getUTCMonth()+1,s=r.getUTCDate()),n=isLeapYear(i),defined(e)){null!==(a=e.match(matchHoursMinutesSeconds))?(l=+a[1],c=+a[2],u=+a[3],d=1e3*+(a[4]||0),f=5):null!==(a=e.match(matchHoursMinutes))?(l=+a[1],c=+a[2],u=60*+(a[3]||0),f=4):null!==(a=e.match(matchHours))&&(l=+a[1],c=60*+(a[2]||0),f=3);var p=a[f],f=(e=+a[f+1],+(a[f+2]||0));switch(p){case"+":l-=e,c-=f;break;case"-":l+=e,c+=f;break;case"Z":break;default:c+=new Date(Date.UTC(i,o-1,s,l,c)).getTimezoneOffset()}}for((f=60===u)&&u--;60<=c;)c-=60,l++;for(;24<=l;)l-=24,s++;for(r=n&&2===o?daysInLeapFeburary:daysInMonth[o-1];r<s;)s-=r,12<++o&&(o-=12,i++),r=n&&2===o?daysInLeapFeburary:daysInMonth[o-1];for(;c<0;)c+=60,l--;for(;l<0;)l+=24,s--;for(;s<1;)--o<1&&(o+=12,i--),s+=r=n&&2===o?daysInLeapFeburary:daysInMonth[o-1];return d=computeJulianDateComponents(i,o,s,l,c,u,d),defined(t)?(setComponents(d[0],d[1],t),convertUtcToTai(t)):t=new JulianDate(d[0],d[1],TimeStandard$1.UTC),f&&JulianDate.addSeconds(t,1,t),t},JulianDate.now=function(e){return JulianDate.fromDate(new Date,e)};var toGregorianDateScratch=new JulianDate(0,0,TimeStandard$1.TAI);function EarthOrientationParameters(e){var t,i;e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=defaultValue(e.addNewLeapSeconds,!0),defined(e.data)?onDataReady(this,e.data):defined(e.url)?(t=Resource.createIfNeeded(e.url),(i=this)._downloadPromise=t.fetchJson().then((function(e){onDataReady(i,e)})).otherwise((function(){i._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))):onDataReady(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function compareLeapSecondDates$1(e,t){return JulianDate.compare(e.julianDate,t)}function onDataReady(e,t){if(defined(t.columnNames))if(defined(t.samples)){var i=t.columnNames.indexOf("modifiedJulianDateUtc"),r=t.columnNames.indexOf("xPoleWanderRadians"),n=t.columnNames.indexOf("yPoleWanderRadians"),a=t.columnNames.indexOf("ut1MinusUtcSeconds"),o=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(i<0||r<0||n<0||a<0||o<0||s<0||l<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var c,u=e._samples=t.samples,d=e._dates=[];e._dateColumn=i,e._xPoleWanderRadiansColumn=r,e._yPoleWanderRadiansColumn=n,e._ut1MinusUtcSecondsColumn=a,e._xCelestialPoleOffsetRadiansColumn=o,e._yCelestialPoleOffsetRadiansColumn=s,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var h=e._addNewLeapSeconds,p=0,f=u.length;p<f;p+=e._columnCount){var m,g=u[p+i],y=u[p+l],_=new JulianDate(g+TimeConstants$1.MODIFIED_JULIAN_DATE_DIFFERENCE,y,TimeStandard$1.TAI);d.push(_),h&&(y===c||!defined(c)||(g=binarySearch(m=JulianDate.leapSeconds,_,compareLeapSecondDates$1))<0&&(_=new LeapSecond(_,y),m.splice(~g,0,_)),c=y)}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function fillResultFromIndex(e,t,i,r,n){r*=i,n.xPoleWander=t[r+e._xPoleWanderRadiansColumn],n.yPoleWander=t[r+e._yPoleWanderRadiansColumn],n.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],n.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],n.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function linearInterp(e,t,i){return t+e*(i-t)}function interpolate(e,t,i,r,n,a,o){var s=e._columnCount;if(a>t.length-1)return o.xPoleWander=0,o.yPoleWander=0,o.xPoleOffset=0,o.yPoleOffset=0,o.ut1MinusUtc=0,o;var l=t[n],c=t[a];if(l.equals(c)||r.equals(l))return fillResultFromIndex(e,i,n,s,o),o;if(r.equals(c))return fillResultFromIndex(e,i,a,s,o),o;var u=JulianDate.secondsDifference(r,l)/JulianDate.secondsDifference(c,l),d=n*s;t=a*s,l=i[d+e._ut1MinusUtcSecondsColumn];return!(.5<(a=(n=i[t+e._ut1MinusUtcSecondsColumn])-l)||a<-.5)||(s=i[d+e._taiMinusUtcSecondsColumn])!==(a=i[t+e._taiMinusUtcSecondsColumn])&&(c.equals(r)?l=n:n-=a-s),o.xPoleWander=linearInterp(u,i[d+e._xPoleWanderRadiansColumn],i[t+e._xPoleWanderRadiansColumn]),o.yPoleWander=linearInterp(u,i[d+e._yPoleWanderRadiansColumn],i[t+e._yPoleWanderRadiansColumn]),o.xPoleOffset=linearInterp(u,i[d+e._xCelestialPoleOffsetRadiansColumn],i[t+e._xCelestialPoleOffsetRadiansColumn]),o.yPoleOffset=linearInterp(u,i[d+e._yCelestialPoleOffsetRadiansColumn],i[t+e._yCelestialPoleOffsetRadiansColumn]),o.ut1MinusUtc=linearInterp(u,l,n),o}function HeadingPitchRoll(e,t,i){this.heading=defaultValue(e,0),this.pitch=defaultValue(t,0),this.roll=defaultValue(i,0)}function Iau2006XysSample(e,t,i){this.x=e,this.y=t,this.s=i}function Iau2006XysData(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._xysFileUrlTemplate=Resource.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=defaultValue(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=defaultValue(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new JulianDate(this._sampleZeroJulianEphemerisDate,0,TimeStandard$1.TAI),this._stepSizeDays=defaultValue(e.stepSizeDays,1),this._samplesPerXysFile=defaultValue(e.samplesPerXysFile,1e3),this._totalSamples=defaultValue(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,i=this._denominators=new Array(t+1),r=this._xTable=new Array(t+1),n=Math.pow(this._stepSizeDays,t),a=0;a<=t;++a){i[a]=n,r[a]=a*this._stepSizeDays;for(var o=0;o<=t;++o)o!==a&&(i[a]*=a-o);i[a]=1/i[a]}this._work=new Array(t+1),this._coef=new Array(t+1)}JulianDate.toGregorianDate=function(e,t){var i=!1;defined(s=convertTaiToUtc(e,toGregorianDateScratch))||(JulianDate.addSeconds(e,-1,toGregorianDateScratch),s=convertTaiToUtc(toGregorianDateScratch,toGregorianDateScratch),i=!0);var r=s.dayNumber;43200<=(l=s.secondsOfDay)&&(r+=1);var n,a,o=4e3*(1+(a=(a=r+68569|0)-((146097*(n=4*a/146097|0)+3)/4|0)|0))/1461001|0,s=(e=80*(a=a-(1461*o/4|0)+31|0)/2447|0,a-(2447*e/80|0)|0),l=(r=2+e-12*(a=e/11|0)|0,e=100*(n-49)+o+a|0,o=l-(n=l/TimeConstants$1.SECONDS_PER_HOUR|0)*TimeConstants$1.SECONDS_PER_HOUR,0|(o-=(a=o/TimeConstants$1.SECONDS_PER_MINUTE|0)*TimeConstants$1.SECONDS_PER_MINUTE));o=(o-l)/TimeConstants$1.SECONDS_PER_MILLISECOND;return 23<(n+=12)&&(n-=24),i&&(l+=1),defined(t)?(t.year=e,t.month=r,t.day=s,t.hour=n,t.minute=a,t.second=l,t.millisecond=o,t.isLeapSecond=i,t):new GregorianDate(e,r,s,n,a,l,o,i)},JulianDate.toDate=function(e){var t=JulianDate.toGregorianDate(e,gregorianDateScratch);e=t.second;return t.isLeapSecond&&--e,new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,e,t.millisecond))},JulianDate.toIso8601=function(e,t){var i=(s=JulianDate.toGregorianDate(e,gregorianDateScratch)).year,r=s.month,n=s.day,a=s.hour,o=s.minute,s=(e=s.second,s.millisecond);return 1e4===i&&1===r&&1===n&&0===a&&0===o&&0===e&&0===s&&(i=9999,r=12,n=31,a=24),defined(t)||0===s?defined(t)&&0!==t?sprintf("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",i,r,n,a,o,e,(.01*s).toFixed(t).replace(".","").slice(0,t)):sprintf("%04d-%02d-%02dT%02d:%02d:%02dZ",i,r,n,a,o,e):sprintf("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",i,r,n,a,o,e,(.01*s).toString().replace(".",""))},JulianDate.clone=function(e,t){if(defined(e))return defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new JulianDate(e.dayNumber,e.secondsOfDay,TimeStandard$1.TAI)},JulianDate.compare=function(e,t){var i=e.dayNumber-t.dayNumber;return 0!=i?i:e.secondsOfDay-t.secondsOfDay},JulianDate.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},JulianDate.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(JulianDate.secondsDifference(e,t))<=i},JulianDate.totalDays=function(e){return e.dayNumber+e.secondsOfDay/TimeConstants$1.SECONDS_PER_DAY},JulianDate.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*TimeConstants$1.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},JulianDate.daysDifference=function(e,t){return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/TimeConstants$1.SECONDS_PER_DAY},JulianDate.computeTaiMinusUtc=function(e){binarySearchScratchLeapSecond.julianDate=e;var t=JulianDate.leapSeconds;return(e=binarySearch(t,binarySearchScratchLeapSecond,compareLeapSecondDates))<0&&(e=~e,--e<0&&(e=0)),t[e].offset},JulianDate.addSeconds=function(e,t,i){return setComponents(e.dayNumber,e.secondsOfDay+t,i)},JulianDate.addMinutes=function(e,t,i){return t=e.secondsOfDay+t*TimeConstants$1.SECONDS_PER_MINUTE,setComponents(e.dayNumber,t,i)},JulianDate.addHours=function(e,t,i){return t=e.secondsOfDay+t*TimeConstants$1.SECONDS_PER_HOUR,setComponents(e.dayNumber,t,i)},JulianDate.addDays=function(e,t,i){return setComponents(e.dayNumber+t,e.secondsOfDay,i)},JulianDate.lessThan=function(e,t){return JulianDate.compare(e,t)<0},JulianDate.lessThanOrEquals=function(e,t){return JulianDate.compare(e,t)<=0},JulianDate.greaterThan=function(e,t){return 0<JulianDate.compare(e,t)},JulianDate.greaterThanOrEquals=function(e,t){return 0<=JulianDate.compare(e,t)},JulianDate.prototype.clone=function(e){return JulianDate.clone(this,e)},JulianDate.prototype.equals=function(e){return JulianDate.equals(this,e)},JulianDate.prototype.equalsEpsilon=function(e,t){return JulianDate.equalsEpsilon(this,e,t)},JulianDate.prototype.toString=function(){return JulianDate.toIso8601(this)},JulianDate.leapSeconds=[new LeapSecond(new JulianDate(2441317,43210,TimeStandard$1.TAI),10),new LeapSecond(new JulianDate(2441499,43211,TimeStandard$1.TAI),11),new LeapSecond(new JulianDate(2441683,43212,TimeStandard$1.TAI),12),new LeapSecond(new JulianDate(2442048,43213,TimeStandard$1.TAI),13),new LeapSecond(new JulianDate(2442413,43214,TimeStandard$1.TAI),14),new LeapSecond(new JulianDate(2442778,43215,TimeStandard$1.TAI),15),new LeapSecond(new JulianDate(2443144,43216,TimeStandard$1.TAI),16),new LeapSecond(new JulianDate(2443509,43217,TimeStandard$1.TAI),17),new LeapSecond(new JulianDate(2443874,43218,TimeStandard$1.TAI),18),new LeapSecond(new JulianDate(2444239,43219,TimeStandard$1.TAI),19),new LeapSecond(new JulianDate(2444786,43220,TimeStandard$1.TAI),20),new LeapSecond(new JulianDate(2445151,43221,TimeStandard$1.TAI),21),new LeapSecond(new JulianDate(2445516,43222,TimeStandard$1.TAI),22),new LeapSecond(new JulianDate(2446247,43223,TimeStandard$1.TAI),23),new LeapSecond(new JulianDate(2447161,43224,TimeStandard$1.TAI),24),new LeapSecond(new JulianDate(2447892,43225,TimeStandard$1.TAI),25),new LeapSecond(new JulianDate(2448257,43226,TimeStandard$1.TAI),26),new LeapSecond(new JulianDate(2448804,43227,TimeStandard$1.TAI),27),new LeapSecond(new JulianDate(2449169,43228,TimeStandard$1.TAI),28),new LeapSecond(new JulianDate(2449534,43229,TimeStandard$1.TAI),29),new LeapSecond(new JulianDate(2450083,43230,TimeStandard$1.TAI),30),new LeapSecond(new JulianDate(2450630,43231,TimeStandard$1.TAI),31),new LeapSecond(new JulianDate(2451179,43232,TimeStandard$1.TAI),32),new LeapSecond(new JulianDate(2453736,43233,TimeStandard$1.TAI),33),new LeapSecond(new JulianDate(2454832,43234,TimeStandard$1.TAI),34),new LeapSecond(new JulianDate(2456109,43235,TimeStandard$1.TAI),35),new LeapSecond(new JulianDate(2457204,43236,TimeStandard$1.TAI),36),new LeapSecond(new JulianDate(2457754,43237,TimeStandard$1.TAI),37)],EarthOrientationParameters.NONE=Object.freeze({getPromiseToLoad:function(){return when.resolve()},compute:function(e,t){return defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new EarthOrientationParametersSample(0,0,0,0,0),t}}),EarthOrientationParameters.prototype.getPromiseToLoad=function(){return when(this._downloadPromise)},EarthOrientationParameters.prototype.compute=function(e,t){if(defined(this._samples)){if(defined(t)||(t=new EarthOrientationParametersSample(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var i=this._dates,r=this._lastIndex,n=0,a=0;if(defined(r)){var o=i[r],s=i[r+1],l=JulianDate.lessThanOrEquals(o,e),c=!defined(s);o=c||JulianDate.greaterThanOrEquals(s,e);if(l&&o)return n=r,!c&&s.equals(e)&&++n,a=n+1,interpolate(this,i,this._samples,e,n,a,t),t}return 0<=(s=binarySearch(i,e,JulianDate.compare,this._dateColumn))?(s<i.length-1&&i[s+1].equals(e)&&++s,a=n=s):(n=(a=~s)-1)<0&&(n=0),this._lastIndex=n,interpolate(this,i,this._samples,e,n,a,t),t}if(defined(this._dataError))throw new RuntimeError(this._dataError)},HeadingPitchRoll.fromQuaternion=function(e,t){defined(t)||(t=new HeadingPitchRoll);var i=2*(e.w*e.y-e.z*e.x),r=1-2*(e.x*e.x+e.y*e.y),n=2*(e.w*e.x+e.y*e.z),a=1-2*(e.y*e.y+e.z*e.z);e=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(e,a),t.roll=Math.atan2(n,r),t.pitch=-CesiumMath.asinClamped(i),t},HeadingPitchRoll.fromDegrees=function(e,t,i,r){return defined(r)||(r=new HeadingPitchRoll),r.heading=e*CesiumMath.RADIANS_PER_DEGREE,r.pitch=t*CesiumMath.RADIANS_PER_DEGREE,r.roll=i*CesiumMath.RADIANS_PER_DEGREE,r},HeadingPitchRoll.clone=function(e,t){if(defined(e))return defined(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new HeadingPitchRoll(e.heading,e.pitch,e.roll)},HeadingPitchRoll.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},HeadingPitchRoll.equalsEpsilon=function(e,t,i,r){return e===t||defined(e)&&defined(t)&&CesiumMath.equalsEpsilon(e.heading,t.heading,i,r)&&CesiumMath.equalsEpsilon(e.pitch,t.pitch,i,r)&&CesiumMath.equalsEpsilon(e.roll,t.roll,i,r)},HeadingPitchRoll.prototype.clone=function(e){return HeadingPitchRoll.clone(this,e)},HeadingPitchRoll.prototype.equals=function(e){return HeadingPitchRoll.equals(this,e)},HeadingPitchRoll.prototype.equalsEpsilon=function(e,t,i){return HeadingPitchRoll.equalsEpsilon(this,e,t,i)},HeadingPitchRoll.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"};var julianDateScratch=new JulianDate(0,0,TimeStandard$1.TAI),_supportsFullscreen;function getDaysSinceEpoch(e,t,i){var r=julianDateScratch;return r.dayNumber=t,r.secondsOfDay=i,JulianDate.daysDifference(r,e._sampleZeroDateTT)}function requestXysChunk(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var i=when.defer();e._chunkDownloadsInProgress[t]=i;var r=e._xysFileUrlTemplate;return when((defined(r)?r.getDerivedResource({templateValues:{0:t}}):new Resource({url:buildModuleUrl("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")})).fetchJson(),(function(r){e._chunkDownloadsInProgress[t]=!1;for(var n=e._samples,a=r.samples,o=t*e._samplesPerXysFile*3,s=0,l=a.length;s<l;++s)n[o+s]=a[s];i.resolve()})),i.promise}Iau2006XysData.prototype.preload=function(e,t,i,r){t=getDaysSinceEpoch(this,e,t),r=getDaysSinceEpoch(this,i,r),(t=t/this._stepSizeDays-this._interpolationOrder/2|0)<0&&(t=0),(r=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder)>=this._totalSamples&&(r=this._totalSamples-1);t=t/this._samplesPerXysFile|0;for(var n=r/this._samplesPerXysFile|0,a=[],o=t;o<=n;++o)a.push(requestXysChunk(this,o));return when.all(a)},Iau2006XysData.prototype.computeXysRadians=function(e,t,i){var r=getDaysSinceEpoch(this,e,t);if(!(r<0||(e=r/this._stepSizeDays|0)>=this._totalSamples)){var n=this._interpolationOrder,a=e-(n/2|0);a<0&&(a=0),(t=a+n)>=this._totalSamples&&(a=(t=this._totalSamples-1)-n)<0&&(a=0);e=!1;var o=this._samples;if(defined(o[3*a])||(requestXysChunk(this,a/this._samplesPerXysFile|0),e=!0),defined(o[3*t])||(requestXysChunk(this,t/this._samplesPerXysFile|0),e=!0),!e){defined(i)?(i.x=0,i.y=0,i.s=0):i=new Iau2006XysSample(0,0,0);for(var s,l=r-a*this._stepSizeDays,c=this._work,u=this._denominators,d=this._coef,h=this._xTable,p=0;p<=n;++p)c[p]=l-h[p];for(p=0;p<=n;++p){for(d[p]=1,s=0;s<=n;++s)s!==p&&(d[p]*=c[s]);d[p]*=u[p];var f=3*(a+p);i.x+=d[p]*o[f++],i.y+=d[p]*o[f++],i.s+=d[p]*o[f]}return i}}};var _names={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Fullscreen={},theNavigator,isChromeResult,chromeVersionResult,isSafariResult,safariVersionResult,isWebkitResult,webkitVersionResult,isInternetExplorerResult,internetExplorerVersionResult,isEdgeResult,edgeVersionResult,isFirefoxResult,firefoxVersionResult,isWindowsResult,hasPointerEvents,imageRenderingValueResult,supportsImageRenderingPixelatedResult;function extractVersion(e){for(var t=e.split("."),i=0,r=t.length;i<r;++i)t[i]=parseInt(t[i],10);return t}function isChrome(){var e;return defined(isChromeResult)||(isChromeResult=!1,isEdge()||null!==(e=/ Chrome\/([\.0-9]+)/.exec(theNavigator.userAgent))&&(isChromeResult=!0,chromeVersionResult=extractVersion(e[1]))),isChromeResult}function chromeVersion(){return isChrome()&&chromeVersionResult}function isSafari(){var e;return defined(isSafariResult)||(isSafariResult=!1,isChrome()||isEdge()||!/ Safari\/[\.0-9]+/.test(theNavigator.userAgent)||null!==(e=/ Version\/([\.0-9]+)/.exec(theNavigator.userAgent))&&(isSafariResult=!0,safariVersionResult=extractVersion(e[1]))),isSafariResult}function safariVersion(){return isSafari()&&safariVersionResult}function isWebkit(){var e;return defined(isWebkitResult)||(isWebkitResult=!1,null!==(e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(theNavigator.userAgent))&&(isWebkitResult=!0,(webkitVersionResult=extractVersion(e[1])).isNightly=!!e[2])),isWebkitResult}function webkitVersion(){return isWebkit()&&webkitVersionResult}function isInternetExplorer(){var e;return defined(isInternetExplorerResult)||(isInternetExplorerResult=!1,"Microsoft Internet Explorer"===theNavigator.appName?null!==(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent))&&(isInternetExplorerResult=!0,internetExplorerVersionResult=extractVersion(e[1])):"Netscape"===theNavigator.appName&&null!==(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent))&&(isInternetExplorerResult=!0,internetExplorerVersionResult=extractVersion(e[1]))),isInternetExplorerResult}function internetExplorerVersion(){return isInternetExplorer()&&internetExplorerVersionResult}function isEdge(){var e;return defined(isEdgeResult)||(isEdgeResult=!1,null!==(e=/ Edge\/([\.0-9]+)/.exec(theNavigator.userAgent))&&(isEdgeResult=!0,edgeVersionResult=extractVersion(e[1]))),isEdgeResult}function edgeVersion(){return isEdge()&&edgeVersionResult}function isFirefox(){var e;return defined(isFirefoxResult)||(isFirefoxResult=!1,null!==(e=/Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent))&&(isFirefoxResult=!0,firefoxVersionResult=extractVersion(e[1]))),isFirefoxResult}function isWindows(){return defined(isWindowsResult)||(isWindowsResult=/Windows/i.test(theNavigator.appVersion)),isWindowsResult}function firefoxVersion(){return isFirefox()&&firefoxVersionResult}function supportsPointerEvents(){return defined(hasPointerEvents)||(hasPointerEvents=!isFirefox()&&"undefined"!=typeof PointerEvent&&(!defined(theNavigator.pointerEnabled)||theNavigator.pointerEnabled)),hasPointerEvents}function supportsImageRenderingPixelated(){var e;return defined(supportsImageRenderingPixelatedResult)||((e=document.createElement("canvas")).setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;"),e=e.style.imageRendering,(supportsImageRenderingPixelatedResult=defined(e)&&""!==e)&&(imageRenderingValueResult=e)),supportsImageRenderingPixelatedResult}function imageRenderingValue(){return supportsImageRenderingPixelated()?imageRenderingValueResult:void 0}function supportsWebP(){return supportsWebP._result}Object.defineProperties(Fullscreen,{element:{get:function(){if(Fullscreen.supportsFullscreen())return document[_names.fullscreenElement]}},changeEventName:{get:function(){if(Fullscreen.supportsFullscreen())return _names.fullscreenchange}},errorEventName:{get:function(){if(Fullscreen.supportsFullscreen())return _names.fullscreenerror}},enabled:{get:function(){if(Fullscreen.supportsFullscreen())return document[_names.fullscreenEnabled]}},fullscreen:{get:function(){if(Fullscreen.supportsFullscreen())return null!==Fullscreen.element}}}),Fullscreen.supportsFullscreen=function(){if(defined(_supportsFullscreen))return _supportsFullscreen;_supportsFullscreen=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return _names.requestFullscreen="requestFullscreen",_names.exitFullscreen="exitFullscreen",_names.fullscreenEnabled="fullscreenEnabled",_names.fullscreenElement="fullscreenElement",_names.fullscreenchange="fullscreenchange",_names.fullscreenerror="fullscreenerror",_supportsFullscreen=!0;for(var t=["webkit","moz","o","ms","khtml"],i=0,r=t.length;i<r;++i){var n,a=t[i];"function"!=typeof e[n=a+"RequestFullscreen"]&&"function"!=typeof e[n=a+"RequestFullScreen"]||(_names.requestFullscreen=n,_supportsFullscreen=!0),n=a+"ExitFullscreen","function"==typeof document[n]?_names.exitFullscreen=n:(n=a+"CancelFullScreen","function"==typeof document[n]&&(_names.exitFullscreen=n)),n=a+"FullscreenEnabled",void 0!==document[n]?_names.fullscreenEnabled=n:(n=a+"FullScreenEnabled",void 0!==document[n]&&(_names.fullscreenEnabled=n)),n=a+"FullscreenElement",void 0!==document[n]?_names.fullscreenElement=n:(n=a+"FullScreenElement",void 0!==document[n]&&(_names.fullscreenElement=n)),n=a+"fullscreenchange",void 0!==document["on"+n]&&("ms"===a&&(n="MSFullscreenChange"),_names.fullscreenchange=n),n=a+"fullscreenerror",void 0!==document["on"+n]&&("ms"===a&&(n="MSFullscreenError"),_names.fullscreenerror=n)}return _supportsFullscreen},Fullscreen.requestFullscreen=function(e,t){Fullscreen.supportsFullscreen()&&e[_names.requestFullscreen]({vrDisplay:t})},Fullscreen.exitFullscreen=function(){Fullscreen.supportsFullscreen()&&document[_names.exitFullscreen]()},Fullscreen._names=_names,theNavigator="undefined"!=typeof navigator?navigator:{},supportsWebP._promise=void 0,supportsWebP._result=void 0,supportsWebP.initialize=function(){if(defined(supportsWebP._promise))return supportsWebP._promise;var e=when.defer();if(supportsWebP._promise=e.promise,isEdge())return supportsWebP._result=!1,e.resolve(supportsWebP._result),e.promise;var t=new Image;return t.onload=function(){supportsWebP._result=0<t.width&&0<t.height,e.resolve(supportsWebP._result)},t.onerror=function(){supportsWebP._result=!1,e.resolve(supportsWebP._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.promise},Object.defineProperties(supportsWebP,{initialized:{get:function(){return defined(supportsWebP._result)}}});var typedArrayTypes=[];"undefined"!=typeof ArrayBuffer&&(typedArrayTypes.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&typedArrayTypes.push(Uint8ClampedArray),"undefined"!=typeof Uint8ClampedArray&&typedArrayTypes.push(Uint8ClampedArray));var FeatureDetection={isChrome:isChrome,chromeVersion:chromeVersion,isSafari:isSafari,safariVersion:safariVersion,isWebkit:isWebkit,webkitVersion:webkitVersion,isInternetExplorer:isInternetExplorer,internetExplorerVersion:internetExplorerVersion,isEdge:isEdge,edgeVersion:edgeVersion,isFirefox:isFirefox,firefoxVersion:firefoxVersion,isWindows:isWindows,hardwareConcurrency:defaultValue(theNavigator.hardwareConcurrency,3),supportsPointerEvents:supportsPointerEvents,supportsImageRenderingPixelated:supportsImageRenderingPixelated,supportsWebP:supportsWebP,imageRenderingValue:imageRenderingValue,typedArrayTypes:typedArrayTypes};function Quaternion(e,t,i,r){this.x=defaultValue(e,0),this.y=defaultValue(t,0),this.z=defaultValue(i,0),this.w=defaultValue(r,0)}FeatureDetection.supportsFullscreen=function(){return Fullscreen.supportsFullscreen()},FeatureDetection.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},FeatureDetection.supportsWebWorkers=function(){return"undefined"!=typeof Worker},FeatureDetection.supportsWebAssembly=function(){return"undefined"!=typeof WebAssembly&&!FeatureDetection.isEdge()};var fromAxisAngleScratch=new Cartesian3;Quaternion.fromAxisAngle=function(e,t,i){var r=t/2,n=Math.sin(r);t=(fromAxisAngleScratch=Cartesian3.normalize(e,fromAxisAngleScratch)).x*n,e=fromAxisAngleScratch.y*n,n=fromAxisAngleScratch.z*n,r=Math.cos(r);return defined(i)?(i.x=t,i.y=e,i.z=n,i.w=r,i):new Quaternion(t,e,n,r)};var fromRotationMatrixNext=[1,2,0],fromRotationMatrixQuat=new Array(3);Quaternion.fromRotationMatrix=function(e,t){var i,r,n,a,o=e[Matrix3.COLUMN0ROW0],s=e[Matrix3.COLUMN1ROW1],l=e[Matrix3.COLUMN2ROW2],c=o+s+l,u=0<c?(n=.5*(a=Math.sqrt(c+1)),a=.5/a,i=(e[Matrix3.COLUMN1ROW2]-e[Matrix3.COLUMN2ROW1])*a,r=(e[Matrix3.COLUMN2ROW0]-e[Matrix3.COLUMN0ROW2])*a,(e[Matrix3.COLUMN0ROW1]-e[Matrix3.COLUMN1ROW0])*a):(o=fromRotationMatrixNext[l=o<l&&s<l?2:o<s?1:0],s=fromRotationMatrixNext[o],a=Math.sqrt(e[Matrix3.getElementIndex(l,l)]-e[Matrix3.getElementIndex(o,o)]-e[Matrix3.getElementIndex(s,s)]+1),(u=fromRotationMatrixQuat)[l]=.5*a,a=.5/a,n=(e[Matrix3.getElementIndex(s,o)]-e[Matrix3.getElementIndex(o,s)])*a,u[o]=(e[Matrix3.getElementIndex(o,l)]+e[Matrix3.getElementIndex(l,o)])*a,u[s]=(e[Matrix3.getElementIndex(s,l)]+e[Matrix3.getElementIndex(l,s)])*a,i=-u[0],r=-u[1],-u[2]);return defined(t)?(t.x=i,t.y=r,t.z=u,t.w=n,t):new Quaternion(i,r,u,n)};var scratchHPRQuaternion=new Quaternion,scratchHeadingQuaternion=new Quaternion,scratchPitchQuaternion=new Quaternion,scratchRollQuaternion=new Quaternion;Quaternion.fromHeadingPitchRoll=function(e,t){return scratchRollQuaternion=Quaternion.fromAxisAngle(Cartesian3.UNIT_X,e.roll,scratchHPRQuaternion),scratchPitchQuaternion=Quaternion.fromAxisAngle(Cartesian3.UNIT_Y,-e.pitch,t),t=Quaternion.multiply(scratchPitchQuaternion,scratchRollQuaternion,scratchPitchQuaternion),scratchHeadingQuaternion=Quaternion.fromAxisAngle(Cartesian3.UNIT_Z,-e.heading,scratchHPRQuaternion),Quaternion.multiply(scratchHeadingQuaternion,t,t)};var sampledQuaternionAxis=new Cartesian3,sampledQuaternionRotation=new Cartesian3,sampledQuaternionTempQuaternion=new Quaternion,sampledQuaternionQuaternion0=new Quaternion,sampledQuaternionQuaternion0Conjugate=new Quaternion;Quaternion.packedLength=4,Quaternion.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},Quaternion.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Quaternion),i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3],i},Quaternion.packedInterpolationLength=3,Quaternion.convertPackedArrayForInterpolation=function(e,t,i,r){Quaternion.unpack(e,4*i,sampledQuaternionQuaternion0Conjugate),Quaternion.conjugate(sampledQuaternionQuaternion0Conjugate,sampledQuaternionQuaternion0Conjugate);for(var n=0,a=i-t+1;n<a;n++){var o=3*n;Quaternion.unpack(e,4*(t+n),sampledQuaternionTempQuaternion),Quaternion.multiply(sampledQuaternionTempQuaternion,sampledQuaternionQuaternion0Conjugate,sampledQuaternionTempQuaternion),sampledQuaternionTempQuaternion.w<0&&Quaternion.negate(sampledQuaternionTempQuaternion,sampledQuaternionTempQuaternion),Quaternion.computeAxis(sampledQuaternionTempQuaternion,sampledQuaternionAxis);var s=Quaternion.computeAngle(sampledQuaternionTempQuaternion);defined(r)||(r=[]),r[o]=sampledQuaternionAxis.x*s,r[1+o]=sampledQuaternionAxis.y*s,r[2+o]=sampledQuaternionAxis.z*s}},Quaternion.unpackInterpolationResult=function(e,t,i,r,n){return defined(n)||(n=new Quaternion),Cartesian3.fromArray(e,0,sampledQuaternionRotation),e=Cartesian3.magnitude(sampledQuaternionRotation),Quaternion.unpack(t,4*r,sampledQuaternionQuaternion0),0===e?Quaternion.clone(Quaternion.IDENTITY,sampledQuaternionTempQuaternion):Quaternion.fromAxisAngle(sampledQuaternionRotation,e,sampledQuaternionTempQuaternion),Quaternion.multiply(sampledQuaternionTempQuaternion,sampledQuaternionQuaternion0,n)},Quaternion.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Quaternion(e.x,e.y,e.z,e.w)},Quaternion.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},Quaternion.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Quaternion.magnitude=function(e){return Math.sqrt(Quaternion.magnitudeSquared(e))},Quaternion.normalize=function(e,t){var i=1/Quaternion.magnitude(e),r=e.x*i,n=e.y*i,a=e.z*i;i=e.w*i;return t.x=r,t.y=n,t.z=a,t.w=i,t},Quaternion.inverse=function(e,t){var i=Quaternion.magnitudeSquared(e);return t=Quaternion.conjugate(e,t),Quaternion.multiplyByScalar(t,1/i,t)},Quaternion.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},Quaternion.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},Quaternion.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Quaternion.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Quaternion.multiply=function(e,t,i){var r=e.x,n=e.y,a=e.z,o=e.w,s=t.x,l=t.y,c=t.z,u=t.w,d=o*s+r*u+n*c-a*l;e=o*l-r*c+n*u+a*s,t=o*c+r*l-n*s+a*u,c=o*u-r*s-n*l-a*c;return i.x=d,i.y=e,i.z=t,i.w=c,i},Quaternion.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},Quaternion.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},Quaternion.computeAxis=function(e,t){var i=e.w;return Math.abs(i-1)<CesiumMath.EPSILON6?(t.x=t.y=t.z=0,t):(i=1/Math.sqrt(1-i*i),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t)},Quaternion.computeAngle=function(e){return Math.abs(e.w-1)<CesiumMath.EPSILON6?0:2*Math.acos(e.w)};var lerpScratch$3=new Quaternion;Quaternion.lerp=function(e,t,i,r){return lerpScratch$3=Quaternion.multiplyByScalar(t,i,lerpScratch$3),r=Quaternion.multiplyByScalar(e,1-i,r),Quaternion.add(lerpScratch$3,r,r)};var slerpEndNegated=new Quaternion,slerpScaledP=new Quaternion,slerpScaledR=new Quaternion;Quaternion.slerp=function(e,t,i,r){var n=Quaternion.dot(e,t),a=t;return n<0&&(n=-n,a=slerpEndNegated=Quaternion.negate(t,slerpEndNegated)),1-n<CesiumMath.EPSILON6?Quaternion.lerp(e,a,i,r):(n=Math.acos(n),slerpScaledP=Quaternion.multiplyByScalar(e,Math.sin((1-i)*n),slerpScaledP),slerpScaledR=Quaternion.multiplyByScalar(a,Math.sin(i*n),slerpScaledR),r=Quaternion.add(slerpScaledP,slerpScaledR,r),Quaternion.multiplyByScalar(r,1/Math.sin(n),r))},Quaternion.log=function(e,t){var i=CesiumMath.acosClamped(e.w),r=0;return 0!==i&&(r=i/Math.sin(i)),Cartesian3.multiplyByScalar(e,r,t)},Quaternion.exp=function(e,t){var i=Cartesian3.magnitude(e),r=0;return 0!==i&&(r=Math.sin(i)/i),t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t.w=Math.cos(i),t};var squadScratchCartesian0=new Cartesian3,squadScratchCartesian1=new Cartesian3,squadScratchQuaternion0=new Quaternion,squadScratchQuaternion1=new Quaternion;Quaternion.computeInnerQuadrangle=function(e,t,i,r){var n=Quaternion.conjugate(t,squadScratchQuaternion0);return Quaternion.multiply(n,i,squadScratchQuaternion1),i=Quaternion.log(squadScratchQuaternion1,squadScratchCartesian0),Quaternion.multiply(n,e,squadScratchQuaternion1),e=Quaternion.log(squadScratchQuaternion1,squadScratchCartesian1),Cartesian3.add(i,e,i),Cartesian3.multiplyByScalar(i,.25,i),Cartesian3.negate(i,i),Quaternion.exp(i,squadScratchQuaternion0),Quaternion.multiply(t,squadScratchQuaternion0,r)},Quaternion.squad=function(e,t,i,r,n,a){return t=Quaternion.slerp(e,t,n,squadScratchQuaternion0),r=Quaternion.slerp(i,r,n,squadScratchQuaternion1),Quaternion.slerp(t,r,2*n*(1-n),a)};for(var fastSlerpScratchQuaternion=new Quaternion,opmu=1.9011074535173003,u=FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],v=FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],bT=FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],bD=FeatureDetection.supportsTypedArrays()?new Float32Array(8):[],i=0;i<7;++i){var s=i+1,t=2*s+1;u[i]=1/(s*t),v[i]=s/t}u[7]=opmu/136,v[7]=8*opmu/17,Quaternion.fastSlerp=function(e,t,i,r){var n;0<=(a=Quaternion.dot(e,t))?n=1:(n=-1,a=-a);for(var a,o=a-1,s=i*i,l=(a=1-i)*a,c=7;0<=c;--c)bT[c]=(u[c]*s-v[c])*o,bD[c]=(u[c]*l-v[c])*o;return i=n*i*(1+bT[0]*(1+bT[1]*(1+bT[2]*(1+bT[3]*(1+bT[4]*(1+bT[5]*(1+bT[6]*(1+bT[7])))))))),a*=1+bD[0]*(1+bD[1]*(1+bD[2]*(1+bD[3]*(1+bD[4]*(1+bD[5]*(1+bD[6]*(1+bD[7]))))))),a=Quaternion.multiplyByScalar(e,a,fastSlerpScratchQuaternion),Quaternion.multiplyByScalar(t,i,r),Quaternion.add(a,r,r)},Quaternion.fastSquad=function(e,t,i,r,n,a){return t=Quaternion.fastSlerp(e,t,n,squadScratchQuaternion0),r=Quaternion.fastSlerp(i,r,n,squadScratchQuaternion1),Quaternion.fastSlerp(t,r,2*n*(1-n),a)},Quaternion.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Quaternion.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e.x-t.x)<=i&&Math.abs(e.y-t.y)<=i&&Math.abs(e.z-t.z)<=i&&Math.abs(e.w-t.w)<=i},Quaternion.ZERO=Object.freeze(new Quaternion(0,0,0,0)),Quaternion.IDENTITY=Object.freeze(new Quaternion(0,0,0,1)),Quaternion.prototype.clone=function(e){return Quaternion.clone(this,e)},Quaternion.prototype.equals=function(e){return Quaternion.equals(this,e)},Quaternion.prototype.equalsEpsilon=function(e,t){return Quaternion.equalsEpsilon(this,e,t)},Quaternion.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var Transforms={},vectorProductLocalFrame={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},degeneratePositionLocalFrame={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},localFrameToFixedFrameCache={},scratchCalculateCartesian={east:new Cartesian3,north:new Cartesian3,up:new Cartesian3,west:new Cartesian3,south:new Cartesian3,down:new Cartesian3},scratchFirstCartesian=new Cartesian3,scratchSecondCartesian=new Cartesian3,scratchThirdCartesian=new Cartesian3;Transforms.localFrameToFixedFrameGenerator=function(e,t){if(!vectorProductLocalFrame.hasOwnProperty(e)||!vectorProductLocalFrame[e].hasOwnProperty(t))throw new DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,r=vectorProductLocalFrame[e][t],n=e+t;return defined(localFrameToFixedFrameCache[n])?i=localFrameToFixedFrameCache[n]:(i=function(i,n,a){var o;return defined(a)||(a=new Matrix4),Cartesian3.equalsEpsilon(i,Cartesian3.ZERO,CesiumMath.EPSILON14)?(Cartesian3.unpack(degeneratePositionLocalFrame[e],0,scratchFirstCartesian),Cartesian3.unpack(degeneratePositionLocalFrame[t],0,scratchSecondCartesian),Cartesian3.unpack(degeneratePositionLocalFrame[r],0,scratchThirdCartesian)):CesiumMath.equalsEpsilon(i.x,0,CesiumMath.EPSILON14)&&CesiumMath.equalsEpsilon(i.y,0,CesiumMath.EPSILON14)?(o=CesiumMath.sign(i.z),Cartesian3.unpack(degeneratePositionLocalFrame[e],0,scratchFirstCartesian),"east"!==e&&"west"!==e&&Cartesian3.multiplyByScalar(scratchFirstCartesian,o,scratchFirstCartesian),Cartesian3.unpack(degeneratePositionLocalFrame[t],0,scratchSecondCartesian),"east"!==t&&"west"!==t&&Cartesian3.multiplyByScalar(scratchSecondCartesian,o,scratchSecondCartesian),Cartesian3.unpack(degeneratePositionLocalFrame[r],0,scratchThirdCartesian),"east"!==r&&"west"!==r&&Cartesian3.multiplyByScalar(scratchThirdCartesian,o,scratchThirdCartesian)):((n=defaultValue(n,Ellipsoid.WGS84)).geodeticSurfaceNormal(i,scratchCalculateCartesian.up),o=scratchCalculateCartesian.up,(n=scratchCalculateCartesian.east).x=-i.y,n.y=i.x,n.z=0,Cartesian3.normalize(n,scratchCalculateCartesian.east),Cartesian3.cross(o,n,scratchCalculateCartesian.north),Cartesian3.multiplyByScalar(scratchCalculateCartesian.up,-1,scratchCalculateCartesian.down),Cartesian3.multiplyByScalar(scratchCalculateCartesian.east,-1,scratchCalculateCartesian.west),Cartesian3.multiplyByScalar(scratchCalculateCartesian.north,-1,scratchCalculateCartesian.south),scratchFirstCartesian=scratchCalculateCartesian[e],scratchSecondCartesian=scratchCalculateCartesian[t],scratchThirdCartesian=scratchCalculateCartesian[r]),a[0]=scratchFirstCartesian.x,a[1]=scratchFirstCartesian.y,a[2]=scratchFirstCartesian.z,a[3]=0,a[4]=scratchSecondCartesian.x,a[5]=scratchSecondCartesian.y,a[6]=scratchSecondCartesian.z,a[7]=0,a[8]=scratchThirdCartesian.x,a[9]=scratchThirdCartesian.y,a[10]=scratchThirdCartesian.z,a[11]=0,a[12]=i.x,a[13]=i.y,a[14]=i.z,a[15]=1,a},localFrameToFixedFrameCache[n]=i),i},Transforms.eastNorthUpToFixedFrame=Transforms.localFrameToFixedFrameGenerator("east","north"),Transforms.northEastDownToFixedFrame=Transforms.localFrameToFixedFrameGenerator("north","east"),Transforms.northUpEastToFixedFrame=Transforms.localFrameToFixedFrameGenerator("north","up"),Transforms.northWestUpToFixedFrame=Transforms.localFrameToFixedFrameGenerator("north","west");var scratchHPRQuaternion$1=new Quaternion,scratchScale$2=new Cartesian3(1,1,1),scratchHPRMatrix4=new Matrix4;Transforms.headingPitchRollToFixedFrame=function(e,t,i,r,n){return r=defaultValue(r,Transforms.eastNorthUpToFixedFrame),t=Quaternion.fromHeadingPitchRoll(t,scratchHPRQuaternion$1),t=Matrix4.fromTranslationQuaternionRotationScale(Cartesian3.ZERO,t,scratchScale$2,scratchHPRMatrix4),n=r(e,i,n),Matrix4.multiply(n,t,n)};var scratchENUMatrix4=new Matrix4,scratchHPRMatrix3=new Matrix3;Transforms.headingPitchRollQuaternion=function(e,t,i,r,n){return r=Transforms.headingPitchRollToFixedFrame(e,t,i,r,scratchENUMatrix4),r=Matrix4.getMatrix3(r,scratchHPRMatrix3),Quaternion.fromRotationMatrix(r,n)};var noScale=new Cartesian3(1,1,1),hprCenterScratch=new Cartesian3,ffScratch=new Matrix4,hprTransformScratch=new Matrix4,hprRotationScratch=new Matrix3,hprQuaternionScratch=new Quaternion;Transforms.fixedFrameToHeadingPitchRoll=function(e,t,i,r){t=defaultValue(t,Ellipsoid.WGS84),i=defaultValue(i,Transforms.eastNorthUpToFixedFrame),defined(r)||(r=new HeadingPitchRoll);var n=Matrix4.getTranslation(e,hprCenterScratch);return Cartesian3.equals(n,Cartesian3.ZERO)?(r.heading=0,r.pitch=0,r.roll=0,r):(t=Matrix4.inverseTransformation(i(n,t,ffScratch),ffScratch),e=Matrix4.setScale(e,noScale,hprTransformScratch),e=Matrix4.setTranslation(e,Cartesian3.ZERO,e),t=Matrix4.multiply(t,e,t),t=Quaternion.fromRotationMatrix(Matrix4.getMatrix3(t,hprRotationScratch),hprQuaternionScratch),t=Quaternion.normalize(t,t),HeadingPitchRoll.fromQuaternion(t,r))};var gmstConstant0=24110.54841,gmstConstant1=8640184.812866,gmstConstant2=.093104,gmstConstant3=-62e-7,rateCoef=11772758384668e-32,wgs84WRPrecessing=72921158553e-15,twoPiOverSecondsInDay=CesiumMath.TWO_PI/86400,dateInUtc=new JulianDate;Transforms.computeTemeToPseudoFixedMatrix=function(e,t){e=(i=(dateInUtc=JulianDate.addSeconds(e,-JulianDate.computeTaiMinusUtc(e),dateInUtc)).dayNumber)-2451545,e=43200<=(r=dateInUtc.secondsOfDay)?(.5+e)/TimeConstants$1.DAYS_PER_JULIAN_CENTURY:(e-.5)/TimeConstants$1.DAYS_PER_JULIAN_CENTURY;var i=(gmstConstant0+e*(gmstConstant1+e*(gmstConstant2+e*gmstConstant3)))*twoPiOverSecondsInDay%CesiumMath.TWO_PI+(wgs84WRPrecessing+rateCoef*(i-2451545.5))*((r+.5*TimeConstants$1.SECONDS_PER_DAY)%TimeConstants$1.SECONDS_PER_DAY),r=Math.cos(i);i=Math.sin(i);return defined(t)?(t[0]=r,t[1]=-i,t[2]=0,t[3]=i,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Matrix3(r,i,0,-i,r,0,0,0,1)},Transforms.iau2006XysData=new Iau2006XysData,Transforms.earthOrientationParameters=EarthOrientationParameters.NONE;var ttMinusTai=32.184,j2000ttDays=2451545;Transforms.preloadIcrfFixed=function(e){var t=e.start.dayNumber,i=e.start.secondsOfDay+ttMinusTai,r=e.stop.dayNumber;e=e.stop.secondsOfDay+ttMinusTai,r=Transforms.iau2006XysData.preload(t,i,r,e),e=Transforms.earthOrientationParameters.getPromiseToLoad();return when.all([r,e])},Transforms.computeIcrfToFixedMatrix=function(e,t){if(defined(t)||(t=new Matrix3),defined(e=Transforms.computeFixedToIcrfMatrix(e,t)))return Matrix3.transpose(e,t)};var xysScratch=new Iau2006XysSample(0,0,0),eopScratch=new EarthOrientationParametersSample(0,0,0,0,0,0),rotation1Scratch=new Matrix3,rotation2Scratch=new Matrix3;Transforms.computeFixedToIcrfMatrix=function(e,t){defined(t)||(t=new Matrix3);var i=Transforms.earthOrientationParameters.compute(e,eopScratch);if(defined(i)){var r=e.dayNumber,n=e.secondsOfDay+ttMinusTai,a=Transforms.iau2006XysData.computeXysRadians(r,n,xysScratch);if(defined(a)){var o=a.x+i.xPoleOffset,s=a.y+i.yPoleOffset,l=1/(1+Math.sqrt(1-o*o-s*s)),c=rotation1Scratch;return c[0]=1-l*o*o,c[3]=-l*o*s,c[6]=o,c[1]=-l*o*s,c[4]=1-l*s*s,c[7]=s,c[2]=-o,c[5]=-s,c[8]=1-l*(o*o+s*s),o=Matrix3.fromRotationZ(-a.s,rotation2Scratch),s=Matrix3.multiply(c,o,rotation1Scratch),a=e.dayNumber-2451545,o=(o=.779057273264+(c=(e.secondsOfDay-JulianDate.computeTaiMinusUtc(e)+i.ut1MinusUtc)/TimeConstants$1.SECONDS_PER_DAY)+.00273781191135448*(a+c))%1*CesiumMath.TWO_PI,e=Matrix3.fromRotationZ(o,rotation2Scratch),a=Matrix3.multiply(s,e,rotation1Scratch),c=Math.cos(i.xPoleWander),o=Math.cos(i.yPoleWander),s=Math.sin(i.xPoleWander),e=Math.sin(i.yPoleWander),i=r-j2000ttDays+n/TimeConstants$1.SECONDS_PER_DAY,r=-47e-6*(i/=36525)*CesiumMath.RADIANS_PER_DEGREE/3600,n=Math.cos(r),i=Math.sin(r),(r=rotation2Scratch)[0]=c*n,r[1]=c*i,r[2]=s,r[3]=-o*i+e*s*n,r[4]=o*n+e*s*i,r[5]=-e*c,r[6]=-e*i-o*s*n,r[7]=e*n-o*s*i,r[8]=o*c,Matrix3.multiply(a,r,t)}}};var pointToWindowCoordinatesTemp=new Cartesian4;Transforms.pointToWindowCoordinates=function(e,t,i,r){return(r=Transforms.pointToGLWindowCoordinates(e,t,i,r)).y=2*t[5]-r.y,r},Transforms.pointToGLWindowCoordinates=function(e,t,i,r){defined(r)||(r=new Cartesian2);var n=pointToWindowCoordinatesTemp;return Matrix4.multiplyByVector(e,Cartesian4.fromElements(i.x,i.y,i.z,1,n),n),Cartesian4.multiplyByScalar(n,1/n.w,n),Matrix4.multiplyByVector(t,n,n),Cartesian2.fromCartesian4(n,r)};var normalScratch=new Cartesian3,rightScratch=new Cartesian3,upScratch=new Cartesian3;Transforms.rotationMatrixFromPositionVelocity=function(e,t,i,r){return i=defaultValue(i,Ellipsoid.WGS84).geodeticSurfaceNormal(e,normalScratch),e=Cartesian3.cross(t,i,rightScratch),Cartesian3.equalsEpsilon(e,Cartesian3.ZERO,CesiumMath.EPSILON6)&&(e=Cartesian3.clone(Cartesian3.UNIT_X,e)),i=Cartesian3.cross(e,t,upScratch),Cartesian3.normalize(i,i),Cartesian3.cross(t,i,e),Cartesian3.negate(e,e),Cartesian3.normalize(e,e),defined(r)||(r=new Matrix3),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=e.x,r[4]=e.y,r[5]=e.z,r[6]=i.x,r[7]=i.y,r[8]=i.z,r};var swizzleMatrix=new Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),scratchCartographic=new Cartographic,scratchCartesian3Projection=new Cartesian3,scratchCenter=new Cartesian3,scratchRotation=new Matrix3,scratchFromENU=new Matrix4,scratchToENU=new Matrix4;Transforms.basisTo2D=function(e,t,i){var r=Matrix4.getTranslation(t,scratchCenter),n=e.ellipsoid,a=n.cartesianToCartographic(r,scratchCartographic);a=e.project(a,scratchCartesian3Projection);return Cartesian3.fromElements(a.z,a.x,a.y,a),n=Transforms.eastNorthUpToFixedFrame(r,n,scratchFromENU),n=Matrix4.inverseTransformation(n,scratchToENU),t=Matrix4.getMatrix3(t,scratchRotation),t=Matrix4.multiplyByMatrix3(n,t,i),Matrix4.multiply(swizzleMatrix,t,i),Matrix4.setTranslation(i,a,i),i},Transforms.wgs84To2DModelMatrix=function(e,t,i){var r=e.ellipsoid,n=Transforms.eastNorthUpToFixedFrame(t,r,scratchFromENU);n=Matrix4.inverseTransformation(n,scratchToENU),t=r.cartesianToCartographic(t,scratchCartographic),t=e.project(t,scratchCartesian3Projection);return Cartesian3.fromElements(t.z,t.x,t.y,t),t=Matrix4.fromTranslation(t,scratchFromENU),Matrix4.multiply(swizzleMatrix,n,i),Matrix4.multiply(t,i,i),i};var scratchCart4=new Cartesian4;function EllipsoidTangentPlane(e,t){e=(t=defaultValue(t,Ellipsoid.WGS84)).scaleToGeodeticSurface(e);var i=Transforms.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=Cartesian3.fromCartesian4(Matrix4.getColumn(i,0,scratchCart4)),this._yAxis=Cartesian3.fromCartesian4(Matrix4.getColumn(i,1,scratchCart4)),i=Cartesian3.fromCartesian4(Matrix4.getColumn(i,2,scratchCart4)),this._plane=Plane.fromPointNormal(e,i)}Object.defineProperties(EllipsoidTangentPlane.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var tmp=new AxisAlignedBoundingBox;EllipsoidTangentPlane.fromPoints=function(e,t){return new EllipsoidTangentPlane(AxisAlignedBoundingBox.fromPoints(e,tmp).center,t)};var scratchProjectPointOntoPlaneRay=new Ray,scratchProjectPointOntoPlaneCartesian3=new Cartesian3;EllipsoidTangentPlane.prototype.projectPointOntoPlane=function(e,t){var i=scratchProjectPointOntoPlaneRay;if(i.origin=e,Cartesian3.normalize(e,i.direction),defined(e=IntersectionTests.rayPlane(i,this._plane,scratchProjectPointOntoPlaneCartesian3))||(Cartesian3.negate(i.direction,i.direction),e=IntersectionTests.rayPlane(i,this._plane,scratchProjectPointOntoPlaneCartesian3)),defined(e))return i=Cartesian3.subtract(e,this._origin,e),e=Cartesian3.dot(this._xAxis,i),i=Cartesian3.dot(this._yAxis,i),defined(t)?(t.x=e,t.y=i,t):new Cartesian2(e,i)},EllipsoidTangentPlane.prototype.projectPointsOntoPlane=function(e,t){defined(t)||(t=[]);for(var i=0,r=e.length,n=0;n<r;n++){var a=this.projectPointOntoPlane(e[n],t[i]);defined(a)&&(t[i]=a,i++)}return t.length=i,t},EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane=function(e,t){defined(t)||(t=new Cartesian2);var i=scratchProjectPointOntoPlaneRay;return i.origin=e,Cartesian3.clone(this._plane.normal,i.direction),defined(e=IntersectionTests.rayPlane(i,this._plane,scratchProjectPointOntoPlaneCartesian3))||(Cartesian3.negate(i.direction,i.direction),e=IntersectionTests.rayPlane(i,this._plane,scratchProjectPointOntoPlaneCartesian3)),i=Cartesian3.subtract(e,this._origin,e),e=Cartesian3.dot(this._xAxis,i),i=Cartesian3.dot(this._yAxis,i),t.x=e,t.y=i,t},EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane=function(e,t){defined(t)||(t=[]);var i=e.length;t.length=i;for(var r=0;r<i;r++)t[r]=this.projectPointToNearestOnPlane(e[r],t[r]);return t};var projectPointsOntoEllipsoidScratch=new Cartesian3;function OrientedBoundingBox(e,t){this.center=Cartesian3.clone(defaultValue(e,Cartesian3.ZERO)),this.halfAxes=Matrix3.clone(defaultValue(t,Matrix3.ZERO))}EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid=function(e,t){defined(t)||(t=new Cartesian3);var i=this._ellipsoid,r=this._origin,n=this._xAxis,a=this._yAxis,o=projectPointsOntoEllipsoidScratch;return Cartesian3.multiplyByScalar(n,e.x,o),t=Cartesian3.add(r,o,t),Cartesian3.multiplyByScalar(a,e.y,o),Cartesian3.add(t,o,t),i.scaleToGeocentricSurface(t,t),t},EllipsoidTangentPlane.prototype.projectPointsOntoEllipsoid=function(e,t){var i=e.length;defined(t)?t.length=i:t=new Array(i);for(var r=0;r<i;++r)t[r]=this.projectPointOntoEllipsoid(e[r],t[r]);return t},OrientedBoundingBox.packedLength=Cartesian3.packedLength+Matrix3.packedLength,OrientedBoundingBox.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e.center,t,i),Matrix3.pack(e.halfAxes,t,i+Cartesian3.packedLength),t},OrientedBoundingBox.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new OrientedBoundingBox),Cartesian3.unpack(e,t,i.center),Matrix3.unpack(e,t+Cartesian3.packedLength,i.halfAxes),i};var scratchCartesian1=new Cartesian3,scratchCartesian2=new Cartesian3,scratchCartesian3$1=new Cartesian3,scratchCartesian4=new Cartesian3,scratchCartesian5=new Cartesian3,scratchCartesian6=new Cartesian3,scratchCovarianceResult=new Matrix3,scratchEigenResult={unitary:new Matrix3,diagonal:new Matrix3};OrientedBoundingBox.fromPoints=function(e,t){if(defined(t)||(t=new OrientedBoundingBox),!defined(e)||0===e.length)return t.halfAxes=Matrix3.ZERO,t.center=Cartesian3.ZERO,t;for(var i=e.length,r=Cartesian3.clone(e[0],scratchCartesian1),n=1;n<i;n++)Cartesian3.add(r,e[n],r);var a=1/i;Cartesian3.multiplyByScalar(r,a,r);var o,s=0,l=0,c=0,u=0,d=0,h=0;for(n=0;n<i;n++)s+=(o=Cartesian3.subtract(e[n],r,scratchCartesian2)).x*o.x,l+=o.x*o.y,c+=o.x*o.z,u+=o.y*o.y,d+=o.y*o.z,h+=o.z*o.z;s*=a,l*=a,c*=a,u*=a,d*=a,h*=a,(a=scratchCovarianceResult)[0]=s,a[1]=l,a[2]=c,a[3]=l,a[4]=u,a[5]=d,a[6]=c,a[7]=d,a[8]=h;a=Matrix3.computeEigenDecomposition(a,scratchEigenResult),a=Matrix3.clone(a.unitary,t.halfAxes);var p=Matrix3.getColumn(a,0,scratchCartesian4),f=Matrix3.getColumn(a,1,scratchCartesian5),m=Matrix3.getColumn(a,2,scratchCartesian6),g=-Number.MAX_VALUE,y=-Number.MAX_VALUE,_=-Number.MAX_VALUE,v=Number.MAX_VALUE,C=Number.MAX_VALUE,x=Number.MAX_VALUE;for(n=0;n<i;n++)o=e[n],g=Math.max(Cartesian3.dot(p,o),g),y=Math.max(Cartesian3.dot(f,o),y),_=Math.max(Cartesian3.dot(m,o),_),v=Math.min(Cartesian3.dot(p,o),v),C=Math.min(Cartesian3.dot(f,o),C),x=Math.min(Cartesian3.dot(m,o),x);return p=Cartesian3.multiplyByScalar(p,.5*(v+g),p),f=Cartesian3.multiplyByScalar(f,.5*(C+y),f),m=Cartesian3.multiplyByScalar(m,.5*(x+_),m),a=Cartesian3.add(p,f,t.center),Cartesian3.add(a,m,a),(a=scratchCartesian3$1).x=g-v,a.y=y-C,a.z=_-x,Cartesian3.multiplyByScalar(a,.5,a),Matrix3.multiplyByScale(t.halfAxes,a,t.halfAxes),t};var scratchOffset=new Cartesian3,scratchScale$3=new Cartesian3;function fromPlaneExtents(e,t,i,r,n,a,o,s,l,c,u){defined(u)||(u=new OrientedBoundingBox);var d=u.halfAxes;return Matrix3.setColumn(d,0,t,d),Matrix3.setColumn(d,1,i,d),Matrix3.setColumn(d,2,r,d),(i=scratchOffset).x=(n+a)/2,i.y=(o+s)/2,i.z=(l+c)/2,(r=scratchScale$3).x=(a-n)/2,r.y=(s-o)/2,r.z=(c-l)/2,l=u.center,i=Matrix3.multiplyByVector(d,i,i),Cartesian3.add(e,i,l),Matrix3.multiplyByScale(d,r,d),u}var scratchRectangleCenterCartographic=new Cartographic,scratchRectangleCenter=new Cartesian3,scratchPerimeterCartographicNC=new Cartographic,scratchPerimeterCartographicNW=new Cartographic,scratchPerimeterCartographicCW=new Cartographic,scratchPerimeterCartographicSW=new Cartographic,scratchPerimeterCartographicSC=new Cartographic,scratchPerimeterCartesianNC=new Cartesian3,scratchPerimeterCartesianNW=new Cartesian3,scratchPerimeterCartesianCW=new Cartesian3,scratchPerimeterCartesianSW=new Cartesian3,scratchPerimeterCartesianSC=new Cartesian3,scratchPerimeterProjectedNC=new Cartesian2,scratchPerimeterProjectedNW=new Cartesian2,scratchPerimeterProjectedCW=new Cartesian2,scratchPerimeterProjectedSW=new Cartesian2,scratchPerimeterProjectedSC=new Cartesian2,scratchPlaneOrigin=new Cartesian3,scratchPlaneNormal=new Cartesian3,scratchPlaneXAxis=new Cartesian3,scratchHorizonCartesian=new Cartesian3,scratchHorizonProjected=new Cartesian2,scratchMaxY=new Cartesian3,scratchMinY=new Cartesian3,scratchZ=new Cartesian3,scratchPlane=new Plane(Cartesian3.UNIT_X,0);OrientedBoundingBox.fromRectangle=function(e,t,i,r,n){if(t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,Ellipsoid.WGS84),e.width<=CesiumMath.PI){var a=Rectangle.center(e,scratchRectangleCenterCartographic),o=new EllipsoidTangentPlane(r.cartographicToCartesian(a,scratchRectangleCenter),r),s=o.plane,l=a.longitude,c=e.south<0&&0<e.north?0:a.latitude,u=Cartographic.fromRadians(l,e.north,i,scratchPerimeterCartographicNC),d=Cartographic.fromRadians(e.west,e.north,i,scratchPerimeterCartographicNW),h=Cartographic.fromRadians(e.west,c,i,scratchPerimeterCartographicCW),p=Cartographic.fromRadians(e.west,e.south,i,scratchPerimeterCartographicSW),f=Cartographic.fromRadians(l,e.south,i,scratchPerimeterCartographicSC),m=r.cartographicToCartesian(u,scratchPerimeterCartesianNC),g=r.cartographicToCartesian(d,scratchPerimeterCartesianNW),y=r.cartographicToCartesian(h,scratchPerimeterCartesianCW),_=r.cartographicToCartesian(p,scratchPerimeterCartesianSW),v=r.cartographicToCartesian(f,scratchPerimeterCartesianSC);a=o.projectPointToNearestOnPlane(m,scratchPerimeterProjectedNC),c=o.projectPointToNearestOnPlane(g,scratchPerimeterProjectedNW),l=o.projectPointToNearestOnPlane(y,scratchPerimeterProjectedCW),u=o.projectPointToNearestOnPlane(_,scratchPerimeterProjectedSW),h=o.projectPointToNearestOnPlane(v,scratchPerimeterProjectedSC),m=-(f=Math.min(c.x,l.x,u.x)),y=Math.max(c.y,a.y),v=Math.min(u.y,h.y);return d.height=p.height=t,g=r.cartographicToCartesian(d,scratchPerimeterCartesianNW),_=r.cartographicToCartesian(p,scratchPerimeterCartesianSW),l=Math.min(Plane.getPointDistance(s,g),Plane.getPointDistance(s,_)),c=i,fromPlaneExtents(o.origin,o.xAxis,o.yAxis,o.zAxis,f,m,v,y,l,c,n)}return a=0<e.south,u=e.north<0,h=a?e.south:u?e.north:0,d=Rectangle.center(e,scratchRectangleCenterCartographic).longitude,(p=Cartesian3.fromRadians(d,h,i,r,scratchPlaneOrigin)).z=0,g=Math.abs(p.x)<CesiumMath.EPSILON10&&Math.abs(p.y)<CesiumMath.EPSILON10?Cartesian3.UNIT_X:Cartesian3.normalize(p,scratchPlaneNormal),_=Cartesian3.UNIT_Z,o=Cartesian3.cross(g,_,scratchPlaneXAxis),s=Plane.fromPointNormal(p,g,scratchPlane),d=Cartesian3.fromRadians(d+CesiumMath.PI_OVER_TWO,h,i,r,scratchHorizonCartesian),f=-(m=Cartesian3.dot(Plane.projectPointOntoPlane(s,d,scratchHorizonProjected),o)),y=Cartesian3.fromRadians(0,e.north,u?t:i,r,scratchMaxY).z,v=Cartesian3.fromRadians(0,e.south,a?t:i,r,scratchMinY).z,r=Cartesian3.fromRadians(e.east,h,i,r,scratchZ),fromPlaneExtents(p,o,_,g,f,m,v,y,l=Plane.getPointDistance(s,r),c=0,n)},OrientedBoundingBox.clone=function(e,t){if(defined(e))return defined(t)?(Cartesian3.clone(e.center,t.center),Matrix3.clone(e.halfAxes,t.halfAxes),t):new OrientedBoundingBox(e.center,e.halfAxes)},OrientedBoundingBox.intersectPlane=function(e,t){var i=e.center,r=t.normal,n=e.halfAxes,a=r.x,o=r.y;e=r.z,n=Math.abs(a*n[Matrix3.COLUMN0ROW0]+o*n[Matrix3.COLUMN0ROW1]+e*n[Matrix3.COLUMN0ROW2])+Math.abs(a*n[Matrix3.COLUMN1ROW0]+o*n[Matrix3.COLUMN1ROW1]+e*n[Matrix3.COLUMN1ROW2])+Math.abs(a*n[Matrix3.COLUMN2ROW0]+o*n[Matrix3.COLUMN2ROW1]+e*n[Matrix3.COLUMN2ROW2]);return(t=Cartesian3.dot(r,i)+t.distance)<=-n?Intersect$1.OUTSIDE:n<=t?Intersect$1.INSIDE:Intersect$1.INTERSECTING};var scratchCartesianU=new Cartesian3,scratchCartesianV=new Cartesian3,scratchCartesianW=new Cartesian3,scratchPPrime=new Cartesian3;OrientedBoundingBox.distanceSquaredTo=function(e,t){var i=Cartesian3.subtract(t,e.center,scratchOffset),r=e.halfAxes,n=Matrix3.getColumn(r,0,scratchCartesianU),a=Matrix3.getColumn(r,1,scratchCartesianV),o=Matrix3.getColumn(r,2,scratchCartesianW),s=Cartesian3.magnitude(n);t=Cartesian3.magnitude(a),e=Cartesian3.magnitude(o);Cartesian3.normalize(n,n),Cartesian3.normalize(a,a),Cartesian3.normalize(o,o),(r=scratchPPrime).x=Cartesian3.dot(i,n),r.y=Cartesian3.dot(i,a),r.z=Cartesian3.dot(i,o);var l;o=0;return r.x<-s?o+=(l=r.x+s)*l:r.x>s&&(o+=(l=r.x-s)*l),r.y<-t?o+=(l=r.y+t)*l:r.y>t&&(o+=(l=r.y-t)*l),r.z<-e?o+=(l=r.z+e)*l:r.z>e&&(o+=(l=r.z-e)*l),o};var scratchCorner=new Cartesian3,scratchToCenter=new Cartesian3;OrientedBoundingBox.computePlaneDistances=function(e,t,i,r){defined(r)||(r=new Interval);var n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=e.center,s=e.halfAxes,l=Matrix3.getColumn(s,0,scratchCartesianU),c=Matrix3.getColumn(s,1,scratchCartesianV),u=Matrix3.getColumn(s,2,scratchCartesianW),d=Cartesian3.add(l,c,scratchCorner);return Cartesian3.add(d,u,d),Cartesian3.add(d,o,d),e=Cartesian3.subtract(d,t,scratchToCenter),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.add(o,l,d),Cartesian3.add(d,c,d),Cartesian3.subtract(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.add(o,l,d),Cartesian3.subtract(d,c,d),Cartesian3.add(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.add(o,l,d),Cartesian3.subtract(d,c,d),Cartesian3.subtract(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.subtract(o,l,d),Cartesian3.add(d,c,d),Cartesian3.add(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.subtract(o,l,d),Cartesian3.add(d,c,d),Cartesian3.subtract(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.subtract(o,l,d),Cartesian3.subtract(d,c,d),Cartesian3.add(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),Cartesian3.subtract(o,l,d),Cartesian3.subtract(d,c,d),Cartesian3.subtract(d,u,d),Cartesian3.subtract(d,t,e),s=Cartesian3.dot(i,e),n=Math.min(s,n),a=Math.max(s,a),r.start=n,r.stop=a,r};var scratchBoundingSphere$1=new BoundingSphere;OrientedBoundingBox.isOccluded=function(e,t){return e=BoundingSphere.fromOrientedBoundingBox(e,scratchBoundingSphere$1),!t.isBoundingSphereVisible(e)},OrientedBoundingBox.prototype.intersectPlane=function(e){return OrientedBoundingBox.intersectPlane(this,e)},OrientedBoundingBox.prototype.distanceSquaredTo=function(e){return OrientedBoundingBox.distanceSquaredTo(this,e)},OrientedBoundingBox.prototype.computePlaneDistances=function(e,t,i){return OrientedBoundingBox.computePlaneDistances(this,e,t,i)},OrientedBoundingBox.prototype.isOccluded=function(e){return OrientedBoundingBox.isOccluded(this,e)},OrientedBoundingBox.equals=function(e,t){return e===t||defined(e)&&defined(t)&&Cartesian3.equals(e.center,t.center)&&Matrix3.equals(e.halfAxes,t.halfAxes)},OrientedBoundingBox.prototype.clone=function(e){return OrientedBoundingBox.clone(this,e)},OrientedBoundingBox.prototype.equals=function(e){return OrientedBoundingBox.equals(this,e)};var RIGHT_SHIFT=1/256,LEFT_SHIFT=256,AttributeCompression={octEncodeInRange:function(e,t,i){var r;return i.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),i.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0&&(r=i.x,e=i.y,i.x=(1-Math.abs(e))*CesiumMath.signNotZero(r),i.y=(1-Math.abs(r))*CesiumMath.signNotZero(e)),i.x=CesiumMath.toSNorm(i.x,t),i.y=CesiumMath.toSNorm(i.y,t),i},octEncode:function(e,t){return AttributeCompression.octEncodeInRange(e,255,t)}},octEncodeScratch=new Cartesian2,uint8ForceArray=new Uint8Array(1);function forceUint8(e){return uint8ForceArray[0]=e,uint8ForceArray[0]}AttributeCompression.octEncodeToCartesian4=function(e,t){return AttributeCompression.octEncodeInRange(e,65535,octEncodeScratch),t.x=forceUint8(octEncodeScratch.x*RIGHT_SHIFT),t.y=forceUint8(octEncodeScratch.x),t.z=forceUint8(octEncodeScratch.y*RIGHT_SHIFT),t.w=forceUint8(octEncodeScratch.y),t},AttributeCompression.octDecodeInRange=function(e,t,i,r){return r.x=CesiumMath.fromSNorm(e,i),r.y=CesiumMath.fromSNorm(t,i),r.z=1-(Math.abs(r.x)+Math.abs(r.y)),r.z<0&&(i=r.x,r.x=(1-Math.abs(r.y))*CesiumMath.signNotZero(i),r.y=(1-Math.abs(i))*CesiumMath.signNotZero(r.y)),Cartesian3.normalize(r,r)},AttributeCompression.octDecode=function(e,t,i){return AttributeCompression.octDecodeInRange(e,t,255,i)},AttributeCompression.octDecodeFromCartesian4=function(e,t){var i=e.x,r=e.y,n=e.z;e=e.w,r=i*LEFT_SHIFT+r,e=n*LEFT_SHIFT+e;return AttributeCompression.octDecodeInRange(r,e,65535,t)},AttributeCompression.octPackFloat=function(e){return 256*e.x+e.y};var scratchEncodeCart2=new Cartesian2;function zigZagDecode(e){return e>>1^-(1&e)}AttributeCompression.octEncodeFloat=function(e){return AttributeCompression.octEncode(e,scratchEncodeCart2),AttributeCompression.octPackFloat(scratchEncodeCart2)},AttributeCompression.octDecodeFloat=function(e,t){var i=256*((i=e/256)-(e=Math.floor(i)));return AttributeCompression.octDecode(e,i,t)},AttributeCompression.octPack=function(e,t,i,r){return e=AttributeCompression.octEncodeFloat(e),t=AttributeCompression.octEncodeFloat(t),i=AttributeCompression.octEncode(i,scratchEncodeCart2),r.x=65536*i.x+e,r.y=65536*i.y+t,r},AttributeCompression.octUnpack=function(e,t,i,r){var n=e.x/65536,a=Math.floor(n),o=65536*(n-a);n=65536*((n=e.y/65536)-(e=Math.floor(n)));AttributeCompression.octDecodeFloat(o,t),AttributeCompression.octDecodeFloat(n,i),AttributeCompression.octDecode(a,e,r)},AttributeCompression.compressTextureCoordinates=function(e){return 4096*(4095*e.x|0)+(4095*e.y|0)},AttributeCompression.decompressTextureCoordinates=function(e,t){var i=e/4096;i=Math.floor(i);return t.x=i/4095,t.y=(e-4096*i)/4095,t},AttributeCompression.zigZagDeltaDecode=function(e,t,i){for(var r=e.length,n=0,a=0,o=0,s=0;s<r;++s)n+=zigZagDecode(e[s]),a+=zigZagDecode(t[s]),e[s]=n,t[s]=a,defined(i)&&(o+=zigZagDecode(i[s]),i[s]=o)};var WebGLConstants={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},WebGLConstants$1=Object.freeze(WebGLConstants),ComponentDatatype={BYTE:WebGLConstants$1.BYTE,UNSIGNED_BYTE:WebGLConstants$1.UNSIGNED_BYTE,SHORT:WebGLConstants$1.SHORT,UNSIGNED_SHORT:WebGLConstants$1.UNSIGNED_SHORT,INT:WebGLConstants$1.INT,UNSIGNED_INT:WebGLConstants$1.UNSIGNED_INT,FLOAT:WebGLConstants$1.FLOAT,DOUBLE:WebGLConstants$1.DOUBLE,getSizeInBytes:function(e){switch(e){case ComponentDatatype.BYTE:return Int8Array.BYTES_PER_ELEMENT;case ComponentDatatype.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case ComponentDatatype.SHORT:return Int16Array.BYTES_PER_ELEMENT;case ComponentDatatype.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case ComponentDatatype.INT:return Int32Array.BYTES_PER_ELEMENT;case ComponentDatatype.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case ComponentDatatype.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case ComponentDatatype.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}},fromTypedArray:function(e){return e instanceof Int8Array?ComponentDatatype.BYTE:e instanceof Uint8Array?ComponentDatatype.UNSIGNED_BYTE:e instanceof Int16Array?ComponentDatatype.SHORT:e instanceof Uint16Array?ComponentDatatype.UNSIGNED_SHORT:e instanceof Int32Array?ComponentDatatype.INT:e instanceof Uint32Array?ComponentDatatype.UNSIGNED_INT:e instanceof Float32Array?ComponentDatatype.FLOAT:e instanceof Float64Array?ComponentDatatype.DOUBLE:void 0},validate:function(e){return defined(e)&&(e===ComponentDatatype.BYTE||e===ComponentDatatype.UNSIGNED_BYTE||e===ComponentDatatype.SHORT||e===ComponentDatatype.UNSIGNED_SHORT||e===ComponentDatatype.INT||e===ComponentDatatype.UNSIGNED_INT||e===ComponentDatatype.FLOAT||e===ComponentDatatype.DOUBLE)},createTypedArray:function(e,t){switch(e){case ComponentDatatype.BYTE:return new Int8Array(t);case ComponentDatatype.UNSIGNED_BYTE:return new Uint8Array(t);case ComponentDatatype.SHORT:return new Int16Array(t);case ComponentDatatype.UNSIGNED_SHORT:return new Uint16Array(t);case ComponentDatatype.INT:return new Int32Array(t);case ComponentDatatype.UNSIGNED_INT:return new Uint32Array(t);case ComponentDatatype.FLOAT:return new Float32Array(t);case ComponentDatatype.DOUBLE:return new Float64Array(t)}},createArrayBufferView:function(e,t,i,r){switch(i=defaultValue(i,0),r=defaultValue(r,(t.byteLength-i)/ComponentDatatype.getSizeInBytes(e)),e){case ComponentDatatype.BYTE:return new Int8Array(t,i,r);case ComponentDatatype.UNSIGNED_BYTE:return new Uint8Array(t,i,r);case ComponentDatatype.SHORT:return new Int16Array(t,i,r);case ComponentDatatype.UNSIGNED_SHORT:return new Uint16Array(t,i,r);case ComponentDatatype.INT:return new Int32Array(t,i,r);case ComponentDatatype.UNSIGNED_INT:return new Uint32Array(t,i,r);case ComponentDatatype.FLOAT:return new Float32Array(t,i,r);case ComponentDatatype.DOUBLE:return new Float64Array(t,i,r)}},fromName:function(e){switch(e){case"BYTE":return ComponentDatatype.BYTE;case"UNSIGNED_BYTE":return ComponentDatatype.UNSIGNED_BYTE;case"SHORT":return ComponentDatatype.SHORT;case"UNSIGNED_SHORT":return ComponentDatatype.UNSIGNED_SHORT;case"INT":return ComponentDatatype.INT;case"UNSIGNED_INT":return ComponentDatatype.UNSIGNED_INT;case"FLOAT":return ComponentDatatype.FLOAT;case"DOUBLE":return ComponentDatatype.DOUBLE}}},ComponentDatatype$1=Object.freeze(ComponentDatatype),TerrainQuantization={NONE:0,BITS12:1},TerrainQuantization$1=Object.freeze(TerrainQuantization),cartesian3Scratch=new Cartesian3,cartesian3DimScratch=new Cartesian3,cartesian2Scratch=new Cartesian2,matrix4Scratch=new Matrix4,matrix4Scratch2=new Matrix4,SHIFT_LEFT_12=Math.pow(2,12);function TerrainEncoding(e,t,i,r,n,a){var o,s,l,c,u,d=TerrainQuantization$1.NONE;defined(e)&&defined(t)&&defined(i)&&defined(r)&&(c=e.minimum,s=e.maximum,u=Cartesian3.subtract(s,c,cartesian3DimScratch),l=i-t,d=Math.max(Cartesian3.maximumComponent(u),l)<SHIFT_LEFT_12-1?TerrainQuantization$1.BITS12:TerrainQuantization$1.NONE,o=e.center,s=Matrix4.inverseTransformation(r,new Matrix4),l=Cartesian3.negate(c,cartesian3Scratch),Matrix4.multiply(Matrix4.fromTranslation(l,matrix4Scratch),s,s),(l=cartesian3Scratch).x=1/u.x,l.y=1/u.y,l.z=1/u.z,Matrix4.multiply(Matrix4.fromScale(l,matrix4Scratch),s,s),l=Matrix4.clone(r),Matrix4.setTranslation(l,Cartesian3.ZERO,l),r=Matrix4.clone(r,new Matrix4),c=Matrix4.fromTranslation(c,matrix4Scratch),u=Matrix4.fromScale(u,matrix4Scratch2),u=Matrix4.multiply(c,u,matrix4Scratch),Matrix4.multiply(r,u,r),Matrix4.multiply(l,u,l)),this.quantization=d,this.minimumHeight=t,this.maximumHeight=i,this.center=o,this.toScaledENU=s,this.fromScaledENU=r,this.matrix=l,this.hasVertexNormals=n,this.hasWebMercatorT=defaultValue(a,!1)}TerrainEncoding.prototype.encode=function(e,t,i,r,n,a,o){var s,l,c=r.x,u=r.y;return this.quantization===TerrainQuantization$1.BITS12?((i=Matrix4.multiplyByPoint(this.toScaledENU,i,cartesian3Scratch)).x=CesiumMath.clamp(i.x,0,1),i.y=CesiumMath.clamp(i.y,0,1),i.z=CesiumMath.clamp(i.z,0,1),s=this.maximumHeight-this.minimumHeight,l=CesiumMath.clamp((n-this.minimumHeight)/s,0,1),Cartesian2.fromElements(i.x,i.y,cartesian2Scratch),r=AttributeCompression.compressTextureCoordinates(cartesian2Scratch),Cartesian2.fromElements(i.z,l,cartesian2Scratch),s=AttributeCompression.compressTextureCoordinates(cartesian2Scratch),Cartesian2.fromElements(c,u,cartesian2Scratch),l=AttributeCompression.compressTextureCoordinates(cartesian2Scratch),e[t++]=r,e[t++]=s,e[t++]=l,this.hasWebMercatorT&&(Cartesian2.fromElements(o,0,cartesian2Scratch),l=AttributeCompression.compressTextureCoordinates(cartesian2Scratch),e[t++]=l)):(Cartesian3.subtract(i,this.center,cartesian3Scratch),e[t++]=cartesian3Scratch.x,e[t++]=cartesian3Scratch.y,e[t++]=cartesian3Scratch.z,e[t++]=n,e[t++]=c,e[t++]=u,this.hasWebMercatorT&&(e[t++]=o)),this.hasVertexNormals&&(e[t++]=AttributeCompression.octPackFloat(a)),t},TerrainEncoding.prototype.decodePosition=function(e,t,i){if(defined(i)||(i=new Cartesian3),t*=this.getStride(),this.quantization!==TerrainQuantization$1.BITS12)return i.x=e[t],i.y=e[t+1],i.z=e[t+2],Cartesian3.add(i,this.center,i);var r=AttributeCompression.decompressTextureCoordinates(e[t],cartesian2Scratch);return i.x=r.x,i.y=r.y,t=AttributeCompression.decompressTextureCoordinates(e[t+1],cartesian2Scratch),i.z=t.x,Matrix4.multiplyByPoint(this.fromScaledENU,i,i)},TerrainEncoding.prototype.decodeTextureCoordinates=function(e,t,i){return defined(i)||(i=new Cartesian2),t*=this.getStride(),this.quantization===TerrainQuantization$1.BITS12?AttributeCompression.decompressTextureCoordinates(e[t+2],i):Cartesian2.fromElements(e[t+4],e[t+5],i)},TerrainEncoding.prototype.decodeHeight=function(e,t){return t*=this.getStride(),this.quantization!==TerrainQuantization$1.BITS12?e[t+3]:AttributeCompression.decompressTextureCoordinates(e[t+1],cartesian2Scratch).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight},TerrainEncoding.prototype.decodeWebMercatorT=function(e,t){return t*=this.getStride(),this.quantization===TerrainQuantization$1.BITS12?AttributeCompression.decompressTextureCoordinates(e[t+3],cartesian2Scratch).x:e[t+6]},TerrainEncoding.prototype.getOctEncodedNormal=function(e,t,i){return e=256*((e=e[t=(t+1)*this.getStride()-1]/256)-(t=Math.floor(e))),Cartesian2.fromElements(t,e,i)},TerrainEncoding.prototype.getStride=function(){var e=this.quantization===TerrainQuantization$1.BITS12?3:6;return this.hasWebMercatorT&&++e,this.hasVertexNormals&&++e,e};var attributesNone={position3DAndHeight:0,textureCoordAndEncodedNormals:1},attributes={compressed0:0,compressed1:1};function WebMercatorProjection(e){this._ellipsoid=defaultValue(e,Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}TerrainEncoding.prototype.getAttributes=function(e){var t,i=ComponentDatatype$1.FLOAT,r=ComponentDatatype$1.getSizeInBytes(i);if(this.quantization===TerrainQuantization$1.NONE){var n=2;return this.hasWebMercatorT&&++n,this.hasVertexNormals&&++n,t=(4+n)*r,[{index:attributesNone.position3DAndHeight,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:4,offsetInBytes:0,strideInBytes:t},{index:attributesNone.textureCoordAndEncodedNormals,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:n,offsetInBytes:4*r,strideInBytes:t}]}var a=3;n=0;return(this.hasWebMercatorT||this.hasVertexNormals)&&++a,this.hasWebMercatorT&&this.hasVertexNormals?(++n,t=(a+1)*r,[{index:attributes.compressed0,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a,offsetInBytes:0,strideInBytes:t},{index:attributes.compressed1,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:1,offsetInBytes:a*r,strideInBytes:t}]):[{index:attributes.compressed0,vertexBuffer:e,componentDatatype:i,componentsPerAttribute:a}]},TerrainEncoding.prototype.getAttributeLocations=function(){return this.quantization===TerrainQuantization$1.NONE?attributesNone:attributes},TerrainEncoding.clone=function(e,t){return defined(t)||(t=new TerrainEncoding),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=Cartesian3.clone(e.center),t.toScaledENU=Matrix4.clone(e.toScaledENU),t.fromScaledENU=Matrix4.clone(e.fromScaledENU),t.matrix=Matrix4.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t},Object.defineProperties(WebMercatorProjection.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),WebMercatorProjection.mercatorAngleToGeodeticLatitude=function(e){return CesiumMath.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},WebMercatorProjection.geodeticLatitudeToMercatorAngle=function(e){return e>WebMercatorProjection.MaximumLatitude?e=WebMercatorProjection.MaximumLatitude:e<-WebMercatorProjection.MaximumLatitude&&(e=-WebMercatorProjection.MaximumLatitude),e=Math.sin(e),.5*Math.log((1+e)/(1-e))},WebMercatorProjection.MaximumLatitude=WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI),WebMercatorProjection.prototype.project=function(e,t){var i=this._semimajorAxis,r=e.longitude*i;i=WebMercatorProjection.geodeticLatitudeToMercatorAngle(e.latitude)*i,e=e.height;return defined(t)?(t.x=r,t.y=i,t.z=e,t):new Cartesian3(r,i,e)},WebMercatorProjection.prototype.unproject=function(e,t){var i=this._oneOverSemimajorAxis,r=e.x*i;i=WebMercatorProjection.mercatorAngleToGeodeticLatitude(e.y*i),e=e.z;return defined(t)?(t.longitude=r,t.latitude=i,t.height=e,t):new Cartographic(r,i,e)};var HeightmapTessellator={};HeightmapTessellator.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var cartesian3Scratch$1=new Cartesian3,matrix4Scratch$1=new Matrix4,minimumScratch=new Cartesian3,maximumScratch=new Cartesian3;function returnTrue(){return!0}function destroyObject(e,t){function i(){}for(var r in e)"function"==typeof e[r]&&(e[r]=i);e.isDestroyed=returnTrue}function canTransferArrayBuffer(){if(!defined(TaskProcessor._canTransferArrayBuffer)){var e=new Worker(getWorkerUrl("Workers/transferTypedArrayTest.js"));e.postMessage=defaultValue(e.webkitPostMessage,e.postMessage);var t=new Int8Array([99]);try{e.postMessage({array:t},[t.buffer])}catch(t){return TaskProcessor._canTransferArrayBuffer=!1,TaskProcessor._canTransferArrayBuffer}var i=when.defer();e.onmessage=function(t){t=defined(t=t.data.array)&&99===t[0],i.resolve(t),e.terminate(),TaskProcessor._canTransferArrayBuffer=t},TaskProcessor._canTransferArrayBuffer=i.promise}return TaskProcessor._canTransferArrayBuffer}HeightmapTessellator.computeVertices=function(e){var t,i,r,n=Math.cos,a=Math.sin,o=Math.sqrt,s=Math.atan,l=Math.exp,c=CesiumMath.PI_OVER_TWO,u=CesiumMath.toRadians,d=e.heightmap,h=e.width,p=e.height,f=e.skirtHeight,m=defaultValue(e.isGeographic,!0),g=defaultValue(e.ellipsoid,Ellipsoid.WGS84),y=1/g.maximumRadius,_=e.nativeRectangle,v=e.rectangle,C=defined(v)?(t=v.west,i=v.south,r=v.east,v.north):m?(t=u(_.west),i=u(_.south),r=u(_.east),u(_.north)):(t=_.west*y,i=c-2*s(l(-_.south*y)),r=_.east*y,c-2*s(l(-_.north*y))),x=defined(b=e.relativeToCenter),b=x?b:Cartesian3.ZERO,S=defaultValue(e.exaggeration,1),T=defaultValue(e.includeWebMercatorT,!1),E=defaultValue(e.structure,HeightmapTessellator.DEFAULT_STRUCTURE),w=defaultValue(E.heightScale,HeightmapTessellator.DEFAULT_STRUCTURE.heightScale),A=defaultValue(E.heightOffset,HeightmapTessellator.DEFAULT_STRUCTURE.heightOffset),P=defaultValue(E.elementsPerHeight,HeightmapTessellator.DEFAULT_STRUCTURE.elementsPerHeight),D=defaultValue(E.stride,HeightmapTessellator.DEFAULT_STRUCTURE.stride),M=defaultValue(E.elementMultiplier,HeightmapTessellator.DEFAULT_STRUCTURE.elementMultiplier),I=defaultValue(E.isBigEndian,HeightmapTessellator.DEFAULT_STRUCTURE.isBigEndian),R=Rectangle.computeWidth(_),O=Rectangle.computeHeight(_),L=R/(h-1),N=O/(p-1);m||(R*=y,O*=y);var F,B,V=(e=g.radiiSquared).x,k=e.y,z=e.z,G=65536,U=-65536,$=(E=Transforms.eastNorthUpToFixedFrame(b,g),Matrix4.inverseTransformation(E,matrix4Scratch$1));T&&(F=WebMercatorProjection.geodeticLatitudeToMercatorAngle(i),B=1/(WebMercatorProjection.geodeticLatitudeToMercatorAngle(C)-F));var H=minimumScratch;H.x=Number.POSITIVE_INFINITY,H.y=Number.POSITIVE_INFINITY,H.z=Number.POSITIVE_INFINITY;var W=maximumScratch;W.x=Number.NEGATIVE_INFINITY,W.y=Number.NEGATIVE_INFINITY,W.z=Number.NEGATIVE_INFINITY;var j=Number.POSITIVE_INFINITY,q=h*p,Y=q+(0<f?2*h+2*p:0),X=new Array(Y),Q=new Array(Y),Z=new Array(Y),J=T?new Array(Y):[],K=0,ee=p,te=0,ie=h;0<f&&(--K,++ee,--te,++ie);for(var re=K;re<ee;++re){var ne=re;ne<0&&(ne=0),p<=ne&&(ne=p-1);var ae=_.north-N*ne,oe=((ae=m?u(ae):c-2*s(l(-ae*y)))-i)/(C-i),se=(oe=CesiumMath.clamp(oe,0,1),re===K),le=re===ee-1;0<f&&(se?ae+=1e-5*O:le&&(ae-=1e-5*O));var ce,ue=n(ae),de=a(ae),he=z*de;T&&(ce=(WebMercatorProjection.geodeticLatitudeToMercatorAngle(ae)-F)*B);for(var pe=te;pe<ie;++pe){(Se=pe)<0&&(Se=0),h<=Se&&(Se=h-1);var fe=ne*(h*D)+Se*D;if(1===P)ge=d[fe];else{var me,ge=0;if(I)for(me=0;me<P;++me)ge=ge*M+d[fe+me];else for(me=P-1;0<=me;--me)ge=ge*M+d[fe+me]}ge=(ge*w+A)*S,U=Math.max(U,ge),G=Math.min(G,ge);var ye=_.west+L*Se;m?ye=u(ye):ye*=y;var _e=(ye-t)/(r-t),ve=(_e=CesiumMath.clamp(_e,0,1),ne*h+Se);if(0<f){var Ce=pe===te,xe=pe===ie-1,be=se||le||Ce||xe;if((se||le)&&(Ce||xe))continue;be&&(ge-=f,Ce?(ve=p-ne-1+q,ye-=1e-5*R):le?ve=q+p+(h-Se-1):xe?(ve=q+p+h+ne,ye+=1e-5*R):se&&(ve=q+p+h+p+Se))}var Se,Te=ue*n(ye);ye=(Ce=V*Te)*(Se=1/o(Ce*Te+(xe=k*(be=ue*a(ye)))*be+he*de)),Ce=xe*Se,xe=he*Se;(Se=new Cartesian3).x=ye+Te*ge,Se.y=Ce+be*ge,Se.z=xe+de*ge,X[ve]=Se,Q[ve]=ge,Z[ve]=new Cartesian2(_e,oe),T&&(J[ve]=ce),Matrix4.multiplyByPoint($,Se,cartesian3Scratch$1),Cartesian3.minimumByComponent(cartesian3Scratch$1,H,H),Cartesian3.maximumByComponent(cartesian3Scratch$1,W,W),j=Math.min(j,ge)}}var Ee,we;e=BoundingSphere.fromPoints(X);defined(v)&&(Ee=OrientedBoundingBox.fromRectangle(v,G,U,g)),x&&(we=new EllipsoidalOccluder(g).computeHorizonCullingPointPossiblyUnderEllipsoid(b,X,G));for(var Ae=new TerrainEncoding(new AxisAlignedBoundingBox(H,W,b),j,U,E,!1,T),Pe=new Float32Array(Y*Ae.getStride()),De=0,Me=0;Me<Y;++Me)De=Ae.encode(Pe,De,X[Me],Z[Me],Q[Me],void 0,J[Me]);return{vertices:Pe,maximumHeight:U,minimumHeight:G,encoding:Ae,boundingSphere3D:e,orientedBoundingBox:Ee,occludeePointInScaledSpace:we}};var taskCompletedEvent=new Event,bootstrapperUrlResult;function completeTask(e,t){--e._activeTasks;var i,r,n=t.id;defined(n)&&(r=(i=e._deferreds)[n],defined(t.error)?("RuntimeError"===(e=t.error).name?(e=new RuntimeError(t.error.message)).stack=t.error.stack:"DeveloperError"===e.name&&((e=new DeveloperError(t.error.message)).stack=t.error.stack),taskCompletedEvent.raiseEvent(e),r.reject(e)):(taskCompletedEvent.raiseEvent(),r.resolve(t.result)),delete i[n])}function getWorkerUrl(e){if(isCrossOriginUrl(r=buildModuleUrl(e))){var t,i='importScripts("'+r+'");';try{t=new Blob([i],{type:"application/javascript"})}catch(r){(e=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(i),t=e.getBlob("application/javascript")}var r=(window.URL||window.webkitURL).createObjectURL(t)}return r}function getBootstrapperUrl(){return defined(bootstrapperUrlResult)||(bootstrapperUrlResult=getWorkerUrl("Workers/cesiumWorkerBootstrapper.js")),bootstrapperUrlResult}function createWorker(e){var t=new Worker(getBootstrapperUrl());t.postMessage=defaultValue(t.webkitPostMessage,t.postMessage);var i={loaderConfig:{paths:{Workers:buildModuleUrl("Workers")},baseUrl:buildModuleUrl.getCesiumBaseUrl().url},workerModule:TaskProcessor._workerModulePrefix+e._workerName};return t.postMessage(i),t.onmessage=function(t){completeTask(e,t.data)},t}function getWebAssemblyLoaderConfig(e,t){var i={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(FeatureDetection.supportsWebAssembly())return i.modulePath=buildModuleUrl(t.modulePath),i.wasmBinaryFile=buildModuleUrl(t.wasmBinaryFile),Resource.fetchArrayBuffer({url:i.wasmBinaryFile}).then((function(e){return i.wasmBinary=e,i}));if(!defined(t.fallbackModulePath))throw new RuntimeError("This browser does not support Web Assembly, and no backup module was provided for "+e._workerName);return i.modulePath=buildModuleUrl(t.fallbackModulePath),when.resolve(i)}function TaskProcessor(e,t){this._workerName=e,this._maximumActiveTasks=defaultValue(t,5),this._activeTasks=0,this._deferreds={},this._nextID=0}var emptyTransferableObjectArray=[];function TerrainMesh(e,t,i,r,n,a,o,s,l,c,u,d,h,p,f,m,g){this.center=e,this.vertices=t,this.stride=defaultValue(c,6),this.indices=i,this.indexCountWithoutSkirts=r,this.vertexCountWithoutSkirts=n,this.minimumHeight=a,this.maximumHeight=o,this.boundingSphere3D=s,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=u,this.encoding=d,this.exaggeration=h,this.westIndicesSouthToNorth=p,this.southIndicesEastToWest=f,this.eastIndicesNorthToSouth=m,this.northIndicesWestToEast=g}TaskProcessor.prototype.scheduleTask=function(e,t){if(defined(this._worker)||(this._worker=createWorker(this)),!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var i=this;return when(canTransferArrayBuffer(),(function(r){defined(t)?r||(t.length=0):t=emptyTransferableObjectArray;var n=i._nextID++,a=when.defer();return i._deferreds[n]=a,i._worker.postMessage({id:n,parameters:e,canTransferArrayBuffer:r},t),a.promise}))}},TaskProcessor.prototype.initWebAssemblyModule=function(e){defined(this._worker)||(this._worker=createWorker(this));var t=when.defer(),i=this,r=this._worker;return getWebAssemblyLoaderConfig(this,e).then((function(e){return when(canTransferArrayBuffer(),(function(n){var a,o=e.wasmBinary;defined(o)&&n&&(a=[o]),r.onmessage=function(e){r.onmessage=function(e){completeTask(i,e.data)},t.resolve(e.data)},r.postMessage({webAssemblyConfig:e},a)}))})),t},TaskProcessor.prototype.isDestroyed=function(){return!1},TaskProcessor.prototype.destroy=function(){return defined(this._worker)&&this._worker.terminate(),destroyObject(this)},TaskProcessor.taskCompletedEvent=taskCompletedEvent,TaskProcessor._defaultWorkerModulePrefix="Workers/",TaskProcessor._workerModulePrefix=TaskProcessor._defaultWorkerModulePrefix,TaskProcessor._canTransferArrayBuffer=void 0;var IndexDatatype={UNSIGNED_BYTE:WebGLConstants$1.UNSIGNED_BYTE,UNSIGNED_SHORT:WebGLConstants$1.UNSIGNED_SHORT,UNSIGNED_INT:WebGLConstants$1.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case IndexDatatype.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case IndexDatatype.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case IndexDatatype.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}},fromSizeInBytes:function(e){switch(e){case 2:return IndexDatatype.UNSIGNED_SHORT;case 4:return IndexDatatype.UNSIGNED_INT;case 1:return IndexDatatype.UNSIGNED_BYTE}},validate:function(e){return defined(e)&&(e===IndexDatatype.UNSIGNED_BYTE||e===IndexDatatype.UNSIGNED_SHORT||e===IndexDatatype.UNSIGNED_INT)},createTypedArray:function(e,t){return new(e>=CesiumMath.SIXTY_FOUR_KILOBYTES?Uint32Array:Uint16Array)(t)},createTypedArrayFromArrayBuffer:function(e,t,i,r){return new(e>=CesiumMath.SIXTY_FOUR_KILOBYTES?Uint32Array:Uint16Array)(t,i,r)}},IndexDatatype$1=Object.freeze(IndexDatatype);function TerrainProvider(){DeveloperError.throwInstantiationError()}Object.defineProperties(TerrainProvider.prototype,{errorEvent:{get:DeveloperError.throwInstantiationError},credit:{get:DeveloperError.throwInstantiationError},tilingScheme:{get:DeveloperError.throwInstantiationError},ready:{get:DeveloperError.throwInstantiationError},readyPromise:{get:DeveloperError.throwInstantiationError},hasWaterMask:{get:DeveloperError.throwInstantiationError},hasVertexNormals:{get:DeveloperError.throwInstantiationError},availability:{get:DeveloperError.throwInstantiationError}});var regularGridIndicesCache=[];TerrainProvider.getRegularGridIndices=function(e,t){var i=regularGridIndicesCache[e];defined(i)||(regularGridIndicesCache[e]=i=[]);var r=i[t];return defined(r)||addRegularGridIndices(e,t,r=e*t<CesiumMath.SIXTY_FOUR_KILOBYTES?i[t]=new Uint16Array((e-1)*(t-1)*6):i[t]=new Uint32Array((e-1)*(t-1)*6),0),r};var regularGridAndEdgeIndicesCache=[];TerrainProvider.getRegularGridIndicesAndEdgeIndices=function(e,t){var i=regularGridAndEdgeIndicesCache[e];defined(i)||(regularGridAndEdgeIndicesCache[e]=i=[]);var r,n,a,o,s=i[t];return defined(s)||(r=TerrainProvider.getRegularGridIndices(e,t),n=(o=getEdgeIndices(e,t)).westIndicesSouthToNorth,a=o.southIndicesEastToWest,e=o.eastIndicesNorthToSouth,o=o.northIndicesWestToEast,s=i[t]={indices:r,westIndicesSouthToNorth:n,southIndicesEastToWest:a,eastIndicesNorthToSouth:e,northIndicesWestToEast:o}),s};var regularGridAndSkirtAndEdgeIndicesCache=[];function getEdgeIndices(e,t){for(var i=new Array(t),r=new Array(e),n=new Array(t),a=new Array(e),o=0;o<e;++o)r[a[o]=o]=e*t-1-o;for(o=0;o<t;++o)n[o]=(o+1)*e-1,i[o]=(t-o-1)*e;return{westIndicesSouthToNorth:i,southIndicesEastToWest:r,eastIndicesNorthToSouth:n,northIndicesWestToEast:a}}function addRegularGridIndices(e,t,i,r){for(var n=0,a=0;a<t-1;++a){for(var o=0;o<e-1;++o){var s=n+e,l=s+1,c=n+1;i[r++]=n,i[r++]=s,i[r++]=c,i[r++]=c,i[r++]=s,i[r++]=l,++n}++n}}function addSkirtIndices(e,t,i,r){for(var n=e[0],a=e.length,o=1;o<a;++o){var s=e[o];i[r++]=n,i[r++]=s,i[r++]=t,i[r++]=t,i[r++]=s,i[r++]=t+1,n=s,++t}return r}function HeightmapTerrainData(e){this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=defaultValue(e.childTileMask,15),this._encoding=defaultValue(e.encoding,HeightmapEncoding$1.NONE);var t=HeightmapTessellator.DEFAULT_STRUCTURE,i=e.structure;defined(i)?i!==t&&(i.heightScale=defaultValue(i.heightScale,t.heightScale),i.heightOffset=defaultValue(i.heightOffset,t.heightOffset),i.elementsPerHeight=defaultValue(i.elementsPerHeight,t.elementsPerHeight),i.stride=defaultValue(i.stride,t.stride),i.elementMultiplier=defaultValue(i.elementMultiplier,t.elementMultiplier),i.isBigEndian=defaultValue(i.isBigEndian,t.isBigEndian)):i=t,this._structure=i,this._createdByUpsampling=defaultValue(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===HeightmapEncoding$1.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){var i=regularGridAndSkirtAndEdgeIndicesCache[e];defined(i)||(regularGridAndSkirtAndEdgeIndicesCache[e]=i=[]);var r,n,a,o,s,l,c,u,d=i[t];return defined(d)||(a=(r=e*t)+(l=2*e+2*t),u=(n=(e-1)*(t-1)*6)+6*Math.max(0,l-4),o=(c=getEdgeIndices(e,t)).westIndicesSouthToNorth,s=c.southIndicesEastToWest,l=c.eastIndicesNorthToSouth,c=c.northIndicesWestToEast,addRegularGridIndices(e,t,u=IndexDatatype$1.createTypedArray(a,u),0),TerrainProvider.addSkirtIndices(o,s,l,c,r,u,n),d=i[t]={indices:u,westIndicesSouthToNorth:o,southIndicesEastToWest:s,eastIndicesNorthToSouth:l,northIndicesWestToEast:c,indexCountWithoutSkirts:n}),d},TerrainProvider.addSkirtIndices=function(e,t,i,r,n,a,o){o=addSkirtIndices(e,n,a,o),o=addSkirtIndices(t,n+=e.length,a,o),o=addSkirtIndices(i,n+=t.length,a,o),addSkirtIndices(r,n+=i.length,a,o)},TerrainProvider.heightmapTerrainQuality=.25,TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*TerrainProvider.heightmapTerrainQuality/(t*i)},TerrainProvider.prototype.requestTileGeometry=DeveloperError.throwInstantiationError,TerrainProvider.prototype.getLevelMaximumGeometricError=DeveloperError.throwInstantiationError,TerrainProvider.prototype.getTileDataAvailable=DeveloperError.throwInstantiationError,TerrainProvider.prototype.loadTileDataAvailability=DeveloperError.throwInstantiationError,Object.defineProperties(HeightmapTerrainData.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var taskProcessor=new TaskProcessor("createVerticesFromHeightmap");function interpolateHeight(e,t,i,r,n,a,o,s,l,c){var u=(l-a.west)*(o-1)/(a.east-a.west),d=(c-a.south)*(s-1)/(a.north-a.south),h=0|u;return o<=(l=h+1)&&(l=o-1,h=o-2),s<=(a=(c=0|d)+1)&&(a=s-1,c=s-2),a=s-1-a,triangleInterpolateHeight(u-h,d-c,getHeight(e,t,i,r,n,(c=s-1-c)*o+h),getHeight(e,t,i,r,n,c*o+l),getHeight(e,t,i,r,n,a*o+h),getHeight(e,t,i,r,n,a*o+l))}function interpolateMeshHeight(e,t,i,r,n,a,o,s,l,c){var u=(s-n.west)*(a-1)/(n.east-n.west),d=(l-n.south)*(o-1)/(n.north-n.south),h=0|u;return a<=(s=h+1)&&(s=a-1,h=a-2),o<=(n=1+(l=0|d))&&(n=o-1,l=o-2),d-=l,l=o-1-l,n=o-1-n,triangleInterpolateHeight(u-h,d,(t.decodeHeight(e,l*a+h)/c-i)/r,(t.decodeHeight(e,l*a+s)/c-i)/r,(t.decodeHeight(e,n*a+h)/c-i)/r,(t.decodeHeight(e,n*a+s)/c-i)/r)}function triangleInterpolateHeight(e,t,i,r,n,a){return t<e?i+e*(r-i)+t*(a-r):i+e*(a-n)+t*(n-i)}function getHeight(e,t,i,r,n,a){a*=r;var o,s=0;if(n)for(o=0;o<t;++o)s=s*i+e[a+o];else for(o=t-1;0<=o;--o)s=s*i+e[a+o];return s}function setHeight(e,t,i,r,n,a,o,s){var l;if(o*=n,a)for(l=0;l<t-1;++l)e[o+l]=s/r|0,s-=e[o+l]*r,r/=i;else for(l=t-1;0<l;--l)e[o+l]=s/r|0,s-=e[o+l]*r,r/=i;e[o+l]=s}function TileAvailability(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}HeightmapTerrainData.prototype.createMesh=function(e,t,i,r,n){var a=e.ellipsoid,o=e.tileXYToNativeRectangle(t,i,r);t=e.tileXYToRectangle(t,i,r);n=defaultValue(n,1);var s=a.cartographicToCartesian(Rectangle.center(t));i=this._structure,r=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<r);if(this._skirtHeight=Math.min(4*r,1e3),defined(e=taskProcessor.scheduleTask({heightmap:this._buffer,structure:i,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:o,rectangle:t,relativeToCenter:s,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof GeographicProjection,exaggeration:n,encoding:this._encoding}))){var l=this;return when(e,(function(e){var t=0<l._skirtHeight?TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices(e.gridWidth,e.gridHeight):TerrainProvider.getRegularGridIndicesAndEdgeIndices(e.gridWidth,e.gridHeight),i=e.gridWidth*e.gridHeight;return l._mesh=new TerrainMesh(s,new Float32Array(e.vertices),t.indices,t.indexCountWithoutSkirts,i,e.minimumHeight,e.maximumHeight,BoundingSphere.clone(e.boundingSphere3D),Cartesian3.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,OrientedBoundingBox.clone(e.orientedBoundingBox),TerrainEncoding.clone(e.encoding),n,t.westIndicesSouthToNorth,t.southIndicesEastToWest,t.eastIndicesNorthToSouth,t.northIndicesWestToEast),l._buffer=void 0,l._mesh}))}},HeightmapTerrainData.prototype._createMeshSync=function(e,t,i,r,n){var a=e.ellipsoid,o=e.tileXYToNativeRectangle(t,i,r),s=e.tileXYToRectangle(t,i,r);return n=defaultValue(n,1),t=a.cartographicToCartesian(Rectangle.center(s)),i=this._structure,r=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,e.getNumberOfXTilesAtLevel(0))/(1<<r),this._skirtHeight=Math.min(4*r,1e3),s=HeightmapTessellator.computeVertices({heightmap:this._buffer,structure:i,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:o,rectangle:s,relativeToCenter:t,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:e.projection instanceof GeographicProjection,exaggeration:n}),this._buffer=void 0,a=0<this._skirtHeight?TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):TerrainProvider.getRegularGridIndicesAndEdgeIndices(this._width,this._height),e=s.gridWidth*s.gridHeight,new TerrainMesh(t,s.vertices,a.indices,a.indexCountWithoutSkirts,e,s.minimumHeight,s.maximumHeight,s.boundingSphere3D,s.occludeePointInScaledSpace,s.encoding.getStride(),s.orientedBoundingBox,s.encoding,n,a.westIndicesSouthToNorth,a.southIndicesEastToWest,a.eastIndicesNorthToSouth,a.northIndicesWestToEast)},HeightmapTerrainData.prototype.interpolateHeight=function(e,t,i){var r=this._width,n=this._height,a=(u=this._structure).stride,o=u.elementsPerHeight,s=u.elementMultiplier,l=u.isBigEndian,c=u.heightOffset,u=u.heightScale;return defined(this._mesh)?interpolateMeshHeight(this._mesh.vertices,this._mesh.encoding,c,u,e,r,n,t,i,this._mesh.exaggeration):interpolateHeight(this._buffer,o,s,a,l,e,r,n,t,i)*u+c},HeightmapTerrainData.prototype.upsample=function(e,t,i,r,n,a,o){var s=this._mesh;if(defined(s)){for(var l=this._width,c=this._height,u=this._structure,d=u.stride,h=new this._bufferType(l*c*d),p=s.vertices,f=s.encoding,m=e.tileXYToRectangle(t,i,r),g=e.tileXYToRectangle(n,a,o),y=u.heightOffset,_=u.heightScale,v=s.exaggeration,C=u.elementsPerHeight,x=u.elementMultiplier,b=u.isBigEndian,S=Math.pow(x,C-1),T=0;T<c;++T)for(var E=CesiumMath.lerp(g.north,g.south,T/(c-1)),w=0;w<l;++w){var A=interpolateMeshHeight(p,f,y,_,m,l,c,CesiumMath.lerp(g.west,g.east,w/(l-1)),E,v);setHeight(h,C,x,S,d,b,T*l+w,A=(A=A<u.lowestEncodedHeight?u.lowestEncodedHeight:A)>u.highestEncodedHeight?u.highestEncodedHeight:A)}return new HeightmapTerrainData({buffer:h,width:l,height:c,childTileMask:0,structure:this._structure,createdByUpsampling:!0})}},HeightmapTerrainData.prototype.isChildAvailable=function(e,t,i,r){var n=2;return i!==2*e&&++n,r!==2*t&&(n-=2),0!=(this._childTileMask&1<<n)},HeightmapTerrainData.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var rectangleScratch=new Rectangle;function findNode(e,t,i,r){for(var n=r.length,a=0;a<n;++a){var o=r[a];if(o.x===t&&o.y===i&&o.level===e)return 1}}TileAvailability.prototype.addAvailableTileRange=function(e,t,i,r,n){var a=this._tilingScheme,o=this._rootNodes;if(0===e)for(var s=i;s<=n;++s)for(var l=t;l<=r;++l)findNode(e,l,s,o)||o.push(new QuadtreeNode(a,void 0,0,l,s));a.tileXYToRectangle(t,i,e,rectangleScratch);var c=rectangleScratch.west,u=rectangleScratch.north;a.tileXYToRectangle(r,n,e,rectangleScratch);i=rectangleScratch.east;for(var d=new RectangleWithLevel(e,c,rectangleScratch.south,i,u),h=0;h<o.length;++h){var p=o[h];rectanglesOverlap(p.extent,d)&&putRectangleInQuadtree(this._maximumLevel,p,d)}},TileAvailability.prototype.computeMaximumLevelAtPosition=function(e){for(var t,i=0;i<this._rootNodes.length;++i){var r=this._rootNodes[i];if(rectangleContainsPosition(r.extent,e)){t=r;break}}return defined(t)?findMaxLevelFromNode(void 0,t,e):-1};var rectanglesScratch=[],remainingToCoverByLevelScratch=[],westScratch=new Rectangle,eastScratch=new Rectangle;TileAvailability.prototype.computeBestAvailableLevelOverRectangle=function(e){var t=rectanglesScratch;t.length=0,e.east<e.west?(t.push(Rectangle.fromRadians(-Math.PI,e.south,e.east,e.north,westScratch)),t.push(Rectangle.fromRadians(e.west,e.south,Math.PI,e.north,eastScratch))):t.push(e);for(var i=remainingToCoverByLevelScratch,r=i.length=0;r<this._rootNodes.length;++r)updateCoverageWithNode(i,this._rootNodes[r],t);for(r=i.length-1;0<=r;--r)if(defined(i[r])&&0===i[r].length)return r;return 0};var cartographicScratch=new Cartographic;function QuadtreeNode(e,t,i,r,n){this.tilingScheme=e,this.parent=t,this.level=i,this.x=r,this.y=n,this.extent=e.tileXYToRectangle(r,n,i),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}function RectangleWithLevel(e,t,i,r,n){this.level=e,this.west=t,this.south=i,this.east=r,this.north=n}function rectanglesOverlap(e,t){var i=Math.max(e.west,t.west),r=Math.max(e.south,t.south),n=Math.min(e.east,t.east);return r<Math.min(e.north,t.north)&&i<n}function putRectangleInQuadtree(e,t,i){for(;t.level<e;)if(rectangleFullyContainsRectangle(t.nw.extent,i))t=t.nw;else if(rectangleFullyContainsRectangle(t.ne.extent,i))t=t.ne;else if(rectangleFullyContainsRectangle(t.sw.extent,i))t=t.sw;else{if(!rectangleFullyContainsRectangle(t.se.extent,i))break;t=t.se}var r;0===t.rectangles.length||t.rectangles[t.rectangles.length-1].level<=i.level?t.rectangles.push(i):((r=binarySearch(t.rectangles,i.level,rectangleLevelComparator))<0&&(r=~r),t.rectangles.splice(r,0,i))}function rectangleLevelComparator(e,t){return e.level-t}function rectangleFullyContainsRectangle(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function rectangleContainsPosition(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function findMaxLevelFromNode(e,t,i){for(var r=0,n=!1;!n;){var a=t._nw&&rectangleContainsPosition(t._nw.extent,i),o=t._ne&&rectangleContainsPosition(t._ne.extent,i),s=t._sw&&rectangleContainsPosition(t._sw.extent,i),l=t._se&&rectangleContainsPosition(t._se.extent,i);if(1<a+o+s+l){a&&(r=Math.max(r,findMaxLevelFromNode(t,t._nw,i))),o&&(r=Math.max(r,findMaxLevelFromNode(t,t._ne,i))),s&&(r=Math.max(r,findMaxLevelFromNode(t,t._sw,i))),l&&(r=Math.max(r,findMaxLevelFromNode(t,t._se,i)));break}a?t=t._nw:o?t=t._ne:s?t=t._sw:l?t=t._se:n=!0}for(;t!==e;){for(var c=t.rectangles,u=c.length-1;0<=u&&c[u].level>r;--u){var d=c[u];rectangleContainsPosition(d,i)&&(r=d.level)}t=t.parent}return r}function updateCoverageWithNode(e,t,i){if(t){var r=!1;for(a=0;a<i.length;++a)r=r||rectanglesOverlap(t.extent,i[a]);if(r){for(var n=t.rectangles,a=0;a<n.length;++a){var o=n[a];e[o.level]||(e[o.level]=i),e[o.level]=subtractRectangle(e[o.level],o)}updateCoverageWithNode(e,t._nw,i),updateCoverageWithNode(e,t._ne,i),updateCoverageWithNode(e,t._sw,i),updateCoverageWithNode(e,t._se,i)}}}function subtractRectangle(e,t){for(var i=[],r=0;r<e.length;++r){var n=e[r];rectanglesOverlap(n,t)?(n.west<t.west&&i.push(new Rectangle(n.west,n.south,t.west,n.north)),n.east>t.east&&i.push(new Rectangle(t.east,n.south,n.east,n.north)),n.south<t.south&&i.push(new Rectangle(Math.max(t.west,n.west),n.south,Math.min(t.east,n.east),t.south)),n.north>t.north&&i.push(new Rectangle(Math.max(t.west,n.west),t.north,Math.min(t.east,n.east),n.north))):i.push(n)}return i}function formatError(e){var t=e.name,i=e.message;i=defined(t)&&defined(i)?t+": "+i:e.toString();return defined(e=e.stack)&&(i+="\n"+e),i}function TileProviderError(e,t,i,r,n,a,o){this.provider=e,this.message=t,this.x=i,this.y=r,this.level=n,this.timesRetried=defaultValue(a,0),this.retry=!1,this.error=o}function WebMercatorTilingScheme(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._numberOfLevelZeroTilesX=defaultValue(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=defaultValue(e.numberOfLevelZeroTilesY,1),this._projection=new WebMercatorProjection(this._ellipsoid),defined(e.rectangleSouthwestInMeters)&&defined(e.rectangleNortheastInMeters)?(this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters):(t=this._ellipsoid.maximumRadius*Math.PI,this._rectangleSouthwestInMeters=new Cartesian2(-t,-t),this._rectangleNortheastInMeters=new Cartesian2(t,t));e=this._projection.unproject(this._rectangleSouthwestInMeters);var t=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new Rectangle(e.longitude,e.latitude,t.longitude,t.latitude)}TileAvailability.prototype.isTileAvailable=function(e,t,i){return i=this._tilingScheme.tileXYToRectangle(t,i,e,rectangleScratch),Rectangle.center(i,cartographicScratch),this.computeMaximumLevelAtPosition(cartographicScratch)>=e},TileAvailability.prototype.computeChildMaskForTile=function(e,t,i){var r=e+1;return r>=this._maximumLevel?0:(e=0,e|=this.isTileAvailable(r,2*t,2*i+1)?1:0,e|=this.isTileAvailable(r,2*t+1,2*i+1)?2:0,(e|=this.isTileAvailable(r,2*t,2*i)?4:0)|(this.isTileAvailable(r,2*t+1,2*i)?8:0))},Object.defineProperties(QuadtreeNode.prototype,{nw:{get:function(){return this._nw||(this._nw=new QuadtreeNode(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new QuadtreeNode(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new QuadtreeNode(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new QuadtreeNode(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}}),TileProviderError.handleError=function(e,t,i,r,n,a,o,s,l){var c=e;return defined(e)?(c.provider=t,c.message=r,c.x=n,c.y=a,c.level=o,c.retry=!1,c.error=l,++c.timesRetried):c=new TileProviderError(t,r,n,a,o,0,l),0<i.numberOfListeners?i.raiseEvent(c):console.log('An error occurred in "'+t.constructor.name+'": '+formatError(r)),c.retry&&defined(s)&&s(),c},TileProviderError.handleSuccess=function(e){defined(e)&&(e.timesRetried=-1)},Object.defineProperties(WebMercatorTilingScheme.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),WebMercatorTilingScheme.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},WebMercatorTilingScheme.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},WebMercatorTilingScheme.prototype.rectangleToNativeRectangle=function(e,t){var i=this._projection,r=i.project(Rectangle.southwest(e));e=i.project(Rectangle.northeast(e));return defined(t)?(t.west=r.x,t.south=r.y,t.east=e.x,t.north=e.y,t):new Rectangle(r.x,r.y,e.x,e.y)},WebMercatorTilingScheme.prototype.tileXYToNativeRectangle=function(e,t,i,r){var n=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i);i=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/n,n=this._rectangleSouthwestInMeters.x+e*i,e=this._rectangleSouthwestInMeters.x+(e+1)*i,i=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/a,a=this._rectangleNortheastInMeters.y-t*i,i=this._rectangleNortheastInMeters.y-(t+1)*i;return defined(r)?(r.west=n,r.south=i,r.east=e,r.north=a,r):new Rectangle(n,i,e,a)},WebMercatorTilingScheme.prototype.tileXYToRectangle=function(e,t,i,r){return t=this.tileXYToNativeRectangle(e,t,i,r),r=(i=this._projection).unproject(new Cartesian2(t.west,t.south)),i=i.unproject(new Cartesian2(t.east,t.north)),t.west=r.longitude,t.south=r.latitude,t.east=i.longitude,t.north=i.latitude,t},WebMercatorTilingScheme.prototype.positionToTileXY=function(e,t,i){var r=this._rectangle;if(Rectangle.contains(r,e)){var n=this.getNumberOfXTilesAtLevel(t),a=this.getNumberOfYTilesAtLevel(t);r=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/n,t=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/a;return n<=(r=((e=this._projection.project(e)).x-this._rectangleSouthwestInMeters.x)/r|0)&&(r=n-1),a<=(t=(this._rectangleNortheastInMeters.y-e.y)/t|0)&&(t=a-1),defined(i)?(i.x=r,i.y=t,i):new Cartesian2(r,t)}};var ALL_CHILDREN=15;function ArcGISTiledElevationTerrainProvider(e){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;var t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};var i=this,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84);this._readyPromise=when(e.url).then((function(e){return(e=Resource.createIfNeeded(e)).appendForwardSlash(),defined(t)&&(e=e.getDerivedResource({queryParameters:{token:t}})),(i._resource=e).getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()})).then((function(e){defined(n=e.copyrightText)&&(i._credit=new Credit(n));var t=defaultValue((a=e.spatialReference).latestWkid,a.wkid),n=e.extent,a={ellipsoid:r};if(4326===t)a.rectangle=Rectangle.fromDegrees(n.xmin,n.ymin,n.xmax,n.ymax),i._tilingScheme=new GeographicTilingScheme(a);else{if(3857!==t)return when.reject(new RuntimeError("Invalid spatial reference"));a.rectangleSouthwestInMeters=new Cartesian2(n.xmin,n.ymin),a.rectangleNortheastInMeters=new Cartesian2(n.xmax,n.ymax),i._tilingScheme=new WebMercatorTilingScheme(a)}return defined(a=e.tileInfo)?(i._width=a.rows+1,i._height=a.cols+1,i._encoding="LERC"===a.format?HeightmapEncoding$1.LERC:HeightmapEncoding$1.NONE,i._lodCount=a.lods.length-1,(i._hasAvailability=-1!==e.capabilities.indexOf("Tilemap"))&&(i._tilesAvailable=new TileAvailability(i._tilingScheme,i._lodCount),i._tilesAvailable.addAvailableTileRange(0,0,0,i._tilingScheme.getNumberOfXTilesAtLevel(0),i._tilingScheme.getNumberOfYTilesAtLevel(0)),i._tilesAvailablityLoaded=new TileAvailability(i._tilingScheme,i._lodCount)),i._levelZeroMaximumGeometricError=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(i._tilingScheme.ellipsoid,i._width,i._tilingScheme.getNumberOfXTilesAtLevel(0)),1<e.bandCount&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),i._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:e.minValues[0],highestEncodedHeight:e.maxValues[0]},i._ready=!0):when.reject(new RuntimeError("tileInfo is required"))})).otherwise((function(e){var t="An error occurred while accessing "+i._resource.url+".";return TileProviderError.handleError(void 0,i,i._errorEvent,t),when.reject(e)})),this._errorEvent=new Event}function isTileAvailable(e,t,i,r){if(e._hasAvailability){var n=e._tilesAvailablityLoaded,a=e._tilesAvailable;return!(t>e._lodCount)&&(!!a.isTileAvailable(t,i,r)||!n.isTileAvailable(t,i,r)&&void 0)}}function findRange(e,t,i,r){for(var n=t-1,a=i-1,o=r[e.y*t+e.x],s=[],l={startX:e.x,startY:e.y,endX:0,endY:0},c=new Cartesian2(e.x+1,e.y+1),u=!1,d=!1;!u||!d;){var h=c.x,p=d?c.y+1:c.y;if(!u){for(var f=e.y;f<p;++f)if(r[f*t+c.x]!==o){u=!0;break}u?(s.push(new Cartesian2(c.x,e.y)),--c.x,--h,l.endX=c.x):c.x===n?(l.endX=c.x,u=!0):++c.x}if(!d){for(var m=c.y*t,g=e.x;g<=h;++g)if(r[m+g]!==o){d=!0;break}d?(s.push(new Cartesian2(e.x,c.y)),--c.y,l.endY=c.y):c.y===a?(l.endY=c.y,d=!0):++c.y}}return{endingIndices:s,range:l,value:o}}function computeAvailability(e,t,i,r,n){var a=[];if(n.every((function(e){return e===n[0]})))return 1===n[0]&&a.push({startX:e,startY:t,endX:e+i-1,endY:t+r-1}),a;for(var o=[new Cartesian2(0,0)];0<o.length;){var s,l=findRange(o.pop(),i,r,n);1===l.value&&((s=l.range).startX+=e,s.endX+=e,s.startY+=t,s.endY+=t,a.push(s)),0<(l=l.endingIndices).length&&(o=o.concat(l))}return a}function requestAvailability(e,t,i,r){if(!e._hasAvailability)return{};var n=128*Math.floor(i/128),a=128*Math.floor(r/128),o=Math.min(1<<t,128),s="tilemap/"+t+"/"+a+"/"+n+"/"+o+"/"+o,l=e._availableCache;if(defined(l[s]))return l[s];var c=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.TERRAIN}),u=e._resource.getDerivedResource({url:s,request:c}).fetchJson();return defined(u)?(u=u.then((function(s){var l=computeAvailability(n,a,o,o,s.data);e._tilesAvailablityLoaded.addAvailableTileRange(n,a,n+o,a+o);for(var c=e._tilesAvailable,u=0;u<l.length;++u){var d=l[u];c.addAvailableTileRange(t,d.startX,d.startY,d.endX,d.endY)}return isTileAvailable(e,t,i,r)})),l[s]={promise:u,request:c},{promise:u=u.always((function(e){return delete l[s],e})),request:c}):{}}Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}}),ArcGISTiledElevationTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){var n,a,o=this._resource.getDerivedResource({url:"tile/"+i+"/"+t+"/"+e,request:r}),s=this._hasAvailability,l=when.resolve(!0);if(s&&!defined(isTileAvailable(this,i+1,2*e,2*t))&&(l=(n=requestAvailability(this,i+1,2*e,2*t)).promise,a=n.request),defined(o=o.fetchArrayBuffer())&&defined(l)){var c=this,u=this._tilesAvailable;return when.join(o,l).then((function(r){return new HeightmapTerrainData({buffer:r[0],width:c._width,height:c._height,childTileMask:s?u.computeChildMaskForTile(i,e,t):ALL_CHILDREN,structure:c._terrainDataStructure,encoding:c._encoding})})).otherwise((function(e){return defined(a)&&a.state===RequestState$1.CANCELLED?(r.cancel(),r.deferred.promise.always((function(){return r.state=RequestState$1.CANCELLED,when.reject(e)}))):when.reject(e)}))}},ArcGISTiledElevationTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},ArcGISTiledElevationTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){if(this._hasAvailability){var r=isTileAvailable(this,i,e,t);if(defined(r))return r;requestAvailability(this,i,e,t)}},ArcGISTiledElevationTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){};var ArcType={NONE:0,GEODESIC:1,RHUMB:2},ArcType$1=Object.freeze(ArcType);function AssociativeArray(){this._array=[],this._hash={}}Object.defineProperties(AssociativeArray.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}}),AssociativeArray.prototype.contains=function(e){return defined(this._hash[e])},AssociativeArray.prototype.set=function(e,t){t!==this._hash[e]&&(this.remove(e),this._hash[e]=t,this._array.push(t))},AssociativeArray.prototype.get=function(e){return this._hash[e]},AssociativeArray.prototype.remove=function(e){var t,i=this._hash[e],r=defined(i);return r&&((t=this._array).splice(t.indexOf(i),1),delete this._hash[e]),r},AssociativeArray.prototype.removeAll=function(){var e=this._array;0<e.length&&(this._hash={},e.length=0)};var url="https://dev.virtualearth.net/REST/v1/Locations";function BingMapsGeocoderService(e){e=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).key,this._key=e,this._resource=new Resource({url:url,queryParameters:{key:e}})}function BoundingRectangle(e,t,i,r){this.x=defaultValue(e,0),this.y=defaultValue(t,0),this.width=defaultValue(i,0),this.height=defaultValue(r,0)}Object.defineProperties(BingMapsGeocoderService.prototype,{url:{get:function(){return url}},key:{get:function(){return this._key}}}),BingMapsGeocoderService.prototype.geocode=function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then((function(e){return 0===e.resourceSets.length?[]:e.resourceSets[0].resources.map((function(e){var t=(n=e.bbox)[0],i=n[1],r=n[2],n=n[3];return{displayName:e.name,destination:Rectangle.fromDegrees(i,t,n,r)}}))}))},BoundingRectangle.packedLength=4,BoundingRectangle.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.width,t[i]=e.height,t},BoundingRectangle.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new BoundingRectangle),i.x=e[t++],i.y=e[t++],i.width=e[t++],i.height=e[t],i},BoundingRectangle.fromPoints=function(e,t){if(defined(t)||(t=new BoundingRectangle),!defined(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,r=e[0].x,n=e[0].y,a=e[0].x,o=e[0].y,s=1;s<i;s++){var l=(c=e[s]).x,c=c.y;r=Math.min(l,r),a=Math.max(l,a),n=Math.min(c,n),o=Math.max(c,o)}return t.x=r,t.y=n,t.width=a-r,t.height=o-n,t};var defaultProjection$1=new GeographicProjection,fromRectangleLowerLeft=new Cartographic,fromRectangleUpperRight=new Cartographic;function arrayFill(e,t,i,r){if("function"==typeof e.fill)return e.fill(t,i,r);for(var n=e.length>>>0,a=(i=defaultValue(i,0))<0?Math.max(n+i,0):Math.min(i,n),o=(r=defaultValue(r,n))<0?Math.max(n+r,0):Math.min(r,n);a<o;)e[a]=t,a++;return e}BoundingRectangle.fromRectangle=function(e,t,i){if(defined(i)||(i=new BoundingRectangle),!defined(e))return i.x=0,i.y=0,i.width=0,i.height=0,i;var r=(t=defaultValue(t,defaultProjection$1)).project(Rectangle.southwest(e,fromRectangleLowerLeft));e=t.project(Rectangle.northeast(e,fromRectangleUpperRight));return Cartesian2.subtract(e,r,e),i.x=r.x,i.y=r.y,i.width=e.x,i.height=e.y,i},BoundingRectangle.clone=function(e,t){if(defined(e))return defined(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new BoundingRectangle(e.x,e.y,e.width,e.height)},BoundingRectangle.union=function(e,t,i){defined(i)||(i=new BoundingRectangle);var r=Math.min(e.x,t.x),n=Math.min(e.y,t.y),a=Math.max(e.x+e.width,t.x+t.width);t=Math.max(e.y+e.height,t.y+t.height);return i.x=r,i.y=n,i.width=a-r,i.height=t-n,i},BoundingRectangle.expand=function(e,t,i){i=BoundingRectangle.clone(e,i);var r=t.x-i.x;e=t.y-i.y;return r>i.width?i.width=r:r<0&&(i.width-=r,i.x=t.x),e>i.height?i.height=e:e<0&&(i.height-=e,i.y=t.y),i},BoundingRectangle.intersect=function(e,t){var i=e.x,r=e.y,n=t.x,a=t.y;return i>n+t.width||i+e.width<n||r+e.height<a||r>a+t.height?Intersect$1.OUTSIDE:Intersect$1.INTERSECTING},BoundingRectangle.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},BoundingRectangle.prototype.clone=function(e){return BoundingRectangle.clone(this,e)},BoundingRectangle.prototype.intersect=function(e){return BoundingRectangle.intersect(this,e)},BoundingRectangle.prototype.equals=function(e){return BoundingRectangle.equals(this,e)};var GeometryType={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},GeometryType$1=Object.freeze(GeometryType);function Matrix2(e,t,i,r){this[0]=defaultValue(e,0),this[1]=defaultValue(i,0),this[2]=defaultValue(t,0),this[3]=defaultValue(r,0)}Matrix2.packedLength=4,Matrix2.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t},Matrix2.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix2),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i},Matrix2.clone=function(e,t){if(defined(e))return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new Matrix2(e[0],e[2],e[1],e[3])},Matrix2.fromArray=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Matrix2),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i},Matrix2.fromColumnMajorArray=function(e,t){return Matrix2.clone(e,t)},Matrix2.fromRowMajorArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new Matrix2(e[0],e[1],e[2],e[3])},Matrix2.fromScale=function(e,t){return defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new Matrix2(e.x,0,0,e.y)},Matrix2.fromUniformScale=function(e,t){return defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new Matrix2(e,0,0,e)},Matrix2.fromRotation=function(e,t){var i=Math.cos(e);e=Math.sin(e);return defined(t)?(t[0]=i,t[1]=e,t[2]=-e,t[3]=i,t):new Matrix2(i,-e,e,i)},Matrix2.toArray=function(e,t){return defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},Matrix2.getElementIndex=function(e,t){return 2*e+t},Matrix2.getColumn=function(e,t,i){t=e[r=2*t];var r=e[1+r];return i.x=t,i.y=r,i},Matrix2.setColumn=function(e,t,i,r){return t*=2,(r=Matrix2.clone(e,r))[t]=i.x,r[1+t]=i.y,r},Matrix2.getRow=function(e,t,i){var r=e[t];t=e[t+2];return i.x=r,i.y=t,i},Matrix2.setRow=function(e,t,i,r){return(r=Matrix2.clone(e,r))[t]=i.x,r[t+2]=i.y,r};var scratchColumn$2=new Cartesian2;Matrix2.getScale=function(e,t){return t.x=Cartesian2.magnitude(Cartesian2.fromElements(e[0],e[1],scratchColumn$2)),t.y=Cartesian2.magnitude(Cartesian2.fromElements(e[2],e[3],scratchColumn$2)),t};var scratchScale$4=new Cartesian2;Matrix2.getMaximumScale=function(e){return Matrix2.getScale(e,scratchScale$4),Cartesian2.maximumComponent(scratchScale$4)},Matrix2.multiply=function(e,t,i){var r=e[0]*t[0]+e[2]*t[1],n=e[0]*t[2]+e[2]*t[3],a=e[1]*t[0]+e[3]*t[1];t=e[1]*t[2]+e[3]*t[3];return i[0]=r,i[1]=a,i[2]=n,i[3]=t,i},Matrix2.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i},Matrix2.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i},Matrix2.multiplyByVector=function(e,t,i){var r=e[0]*t.x+e[2]*t.y;t=e[1]*t.x+e[3]*t.y;return i.x=r,i.y=t,i},Matrix2.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i},Matrix2.multiplyByScale=function(e,t,i){return i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.y,i[3]=e[3]*t.y,i},Matrix2.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},Matrix2.transpose=function(e,t){var i=e[0],r=e[2],n=e[1];e=e[3];return t[0]=i,t[1]=r,t[2]=n,t[3]=e,t},Matrix2.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},Matrix2.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},Matrix2.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]},Matrix2.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i},Matrix2.IDENTITY=Object.freeze(new Matrix2(1,0,0,1)),Matrix2.ZERO=Object.freeze(new Matrix2(0,0,0,0)),Matrix2.COLUMN0ROW0=0,Matrix2.COLUMN0ROW1=1,Matrix2.COLUMN1ROW0=2,Matrix2.COLUMN1ROW1=3,Object.defineProperties(Matrix2.prototype,{length:{get:function(){return Matrix2.packedLength}}}),Matrix2.prototype.clone=function(e){return Matrix2.clone(this,e)},Matrix2.prototype.equals=function(e){return Matrix2.equals(this,e)},Matrix2.prototype.equalsEpsilon=function(e,t){return Matrix2.equalsEpsilon(this,e,t)},Matrix2.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"};var PrimitiveType={POINTS:WebGLConstants$1.POINTS,LINES:WebGLConstants$1.LINES,LINE_LOOP:WebGLConstants$1.LINE_LOOP,LINE_STRIP:WebGLConstants$1.LINE_STRIP,TRIANGLES:WebGLConstants$1.TRIANGLES,TRIANGLE_STRIP:WebGLConstants$1.TRIANGLE_STRIP,TRIANGLE_FAN:WebGLConstants$1.TRIANGLE_FAN,validate:function(e){return e===PrimitiveType.POINTS||e===PrimitiveType.LINES||e===PrimitiveType.LINE_LOOP||e===PrimitiveType.LINE_STRIP||e===PrimitiveType.TRIANGLES||e===PrimitiveType.TRIANGLE_STRIP||e===PrimitiveType.TRIANGLE_FAN}},PrimitiveType$1=Object.freeze(PrimitiveType);function Geometry(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=defaultValue(e.primitiveType,PrimitiveType$1.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=defaultValue(e.geometryType,GeometryType$1.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}Geometry.computeNumberOfVertices=function(e){var t,i,r=-1;for(t in e.attributes)e.attributes.hasOwnProperty(t)&&defined(e.attributes[t])&&defined(e.attributes[t].values)&&(r=(i=e.attributes[t]).values.length/i.componentsPerAttribute);return r};var rectangleCenterScratch=new Cartographic,enuCenterScratch=new Cartesian3,fixedFrameToEnuScratch=new Matrix4,boundingRectanglePointsCartographicScratch=[new Cartographic,new Cartographic,new Cartographic],boundingRectanglePointsEnuScratch=[new Cartesian2,new Cartesian2,new Cartesian2],points2DScratch=[new Cartesian2,new Cartesian2,new Cartesian2],pointEnuScratch=new Cartesian3,enuRotationScratch=new Quaternion,enuRotationMatrixScratch=new Matrix4,rotation2DScratch=new Matrix2;function GeometryAttribute(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=defaultValue(e.normalize,!1),this.values=e.values}function GeometryAttributes(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}Geometry._textureCoordinateRotationPoints=function(e,t,i,r){var n=Rectangle.center(r,rectangleCenterScratch),a=Cartographic.toCartesian(n,i,enuCenterScratch),o=(n=Transforms.eastNorthUpToFixedFrame(a,i,fixedFrameToEnuScratch),Matrix4.inverse(n,fixedFrameToEnuScratch)),s=boundingRectanglePointsEnuScratch,l=boundingRectanglePointsCartographicScratch;l[0].longitude=r.west,l[0].latitude=r.south,l[1].longitude=r.west,l[1].latitude=r.north,l[2].longitude=r.east,l[2].latitude=r.south;for(var c=pointEnuScratch,u=0;u<3;u++)Cartographic.toCartesian(l[u],i,c),c=Matrix4.multiplyByPointAsVector(o,c,c),s[u].x=c.x,s[u].y=c.y;a=Quaternion.fromAxisAngle(Cartesian3.UNIT_Z,-t,enuRotationScratch);var d=Matrix3.fromQuaternion(a,enuRotationMatrixScratch),h=e.length,p=Number.POSITIVE_INFINITY,f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=Number.NEGATIVE_INFINITY;for(u=0;u<h;u++)c=Matrix4.multiplyByPointAsVector(o,e[u],c),c=Matrix3.multiplyByVector(d,c,c),p=Math.min(p,c.x),f=Math.min(f,c.y),m=Math.max(m,c.x),g=Math.max(g,c.y);var y=Matrix2.fromRotation(t,rotation2DScratch),_=points2DScratch;_[0].x=p,_[0].y=f,_[1].x=p,_[1].y=g,_[2].x=m,_[2].y=f;var v=s[0],C=s[2].x-v.x,x=s[1].y-v.y;for(u=0;u<3;u++){var b=_[u];Matrix2.multiplyByVector(y,b,b),b.x=(b.x-v.x)/C,b.y=(b.y-v.y)/x}return n=_[0],r=_[1],a=_[2],t=new Array(6),Cartesian2.pack(n,t),Cartesian2.pack(r,t,2),Cartesian2.pack(a,t,4),t};var GeometryOffsetAttribute={NONE:0,TOP:1,ALL:2},GeometryOffsetAttribute$1=Object.freeze(GeometryOffsetAttribute);function VertexFormat(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.position=defaultValue(e.position,!1),this.normal=defaultValue(e.normal,!1),this.st=defaultValue(e.st,!1),this.bitangent=defaultValue(e.bitangent,!1),this.tangent=defaultValue(e.tangent,!1),this.color=defaultValue(e.color,!1)}VertexFormat.POSITION_ONLY=Object.freeze(new VertexFormat({position:!0})),VertexFormat.POSITION_AND_NORMAL=Object.freeze(new VertexFormat({position:!0,normal:!0})),VertexFormat.POSITION_NORMAL_AND_ST=Object.freeze(new VertexFormat({position:!0,normal:!0,st:!0})),VertexFormat.POSITION_AND_ST=Object.freeze(new VertexFormat({position:!0,st:!0})),VertexFormat.POSITION_AND_COLOR=Object.freeze(new VertexFormat({position:!0,color:!0})),VertexFormat.ALL=Object.freeze(new VertexFormat({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),VertexFormat.DEFAULT=VertexFormat.POSITION_NORMAL_AND_ST,VertexFormat.packedLength=6,VertexFormat.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.position?1:0,t[i++]=e.normal?1:0,t[i++]=e.st?1:0,t[i++]=e.tangent?1:0,t[i++]=e.bitangent?1:0,t[i]=e.color?1:0,t},VertexFormat.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new VertexFormat),i.position=1===e[t++],i.normal=1===e[t++],i.st=1===e[t++],i.tangent=1===e[t++],i.bitangent=1===e[t++],i.color=1===e[t],i},VertexFormat.clone=function(e,t){if(defined(e))return defined(t)||(t=new VertexFormat),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var diffScratch=new Cartesian3;function BoxGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).minimum,i=e.maximum,r=defaultValue(e.vertexFormat,VertexFormat.DEFAULT);this._minimum=Cartesian3.clone(t),this._maximum=Cartesian3.clone(i),this._vertexFormat=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}BoxGeometry.fromDimensions=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).dimensions;t=Cartesian3.multiplyByScalar(t,.5,new Cartesian3);return new BoxGeometry({minimum:Cartesian3.negate(t,new Cartesian3),maximum:t,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},BoxGeometry.fromAxisAlignedBoundingBox=function(e){return new BoxGeometry({minimum:e.minimum,maximum:e.maximum})},BoxGeometry.packedLength=2*Cartesian3.packedLength+VertexFormat.packedLength+1,BoxGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._minimum,t,i),Cartesian3.pack(e._maximum,t,i+Cartesian3.packedLength),VertexFormat.pack(e._vertexFormat,t,i+2*Cartesian3.packedLength),t[i+2*Cartesian3.packedLength+VertexFormat.packedLength]=defaultValue(e._offsetAttribute,-1),t};var scratchMin=new Cartesian3,scratchMax=new Cartesian3,scratchVertexFormat=new VertexFormat,scratchOptions={minimum:scratchMin,maximum:scratchMax,vertexFormat:scratchVertexFormat,offsetAttribute:void 0},unitBoxGeometry;BoxGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchMin),n=Cartesian3.unpack(e,t+Cartesian3.packedLength,scratchMax),a=VertexFormat.unpack(e,t+2*Cartesian3.packedLength,scratchVertexFormat);t=e[t+2*Cartesian3.packedLength+VertexFormat.packedLength];return defined(i)?(i._minimum=Cartesian3.clone(r,i._minimum),i._maximum=Cartesian3.clone(n,i._maximum),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions.offsetAttribute=-1===t?void 0:t,new BoxGeometry(scratchOptions))},BoxGeometry.createGeometry=function(e){var t=e._minimum,i=e._maximum,r=e._vertexFormat;if(!Cartesian3.equals(t,i)){var n,a,o,s=new GeometryAttributes;r.position&&(r.st||r.normal||r.tangent||r.bitangent)?(r.position&&((l=new Float64Array(72))[0]=t.x,l[1]=t.y,l[2]=i.z,l[3]=i.x,l[4]=t.y,l[5]=i.z,l[6]=i.x,l[7]=i.y,l[8]=i.z,l[9]=t.x,l[10]=i.y,l[11]=i.z,l[12]=t.x,l[13]=t.y,l[14]=t.z,l[15]=i.x,l[16]=t.y,l[17]=t.z,l[18]=i.x,l[19]=i.y,l[20]=t.z,l[21]=t.x,l[22]=i.y,l[23]=t.z,l[24]=i.x,l[25]=t.y,l[26]=t.z,l[27]=i.x,l[28]=i.y,l[29]=t.z,l[30]=i.x,l[31]=i.y,l[32]=i.z,l[33]=i.x,l[34]=t.y,l[35]=i.z,l[36]=t.x,l[37]=t.y,l[38]=t.z,l[39]=t.x,l[40]=i.y,l[41]=t.z,l[42]=t.x,l[43]=i.y,l[44]=i.z,l[45]=t.x,l[46]=t.y,l[47]=i.z,l[48]=t.x,l[49]=i.y,l[50]=t.z,l[51]=i.x,l[52]=i.y,l[53]=t.z,l[54]=i.x,l[55]=i.y,l[56]=i.z,l[57]=t.x,l[58]=i.y,l[59]=i.z,l[60]=t.x,l[61]=t.y,l[62]=t.z,l[63]=i.x,l[64]=t.y,l[65]=t.z,l[66]=i.x,l[67]=t.y,l[68]=i.z,l[69]=t.x,l[70]=t.y,l[71]=i.z,s.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l})),r.normal&&((n=new Float32Array(72))[0]=0,n[1]=0,n[2]=1,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=1,n[9]=0,n[10]=0,n[11]=1,n[12]=0,n[13]=0,n[14]=-1,n[15]=0,n[16]=0,n[17]=-1,n[18]=0,n[19]=0,n[20]=-1,n[21]=0,n[22]=0,n[23]=-1,n[24]=1,n[25]=0,n[26]=0,n[27]=1,n[28]=0,n[29]=0,n[30]=1,n[31]=0,n[32]=0,n[33]=1,n[34]=0,n[35]=0,n[36]=-1,n[37]=0,n[38]=0,n[39]=-1,n[40]=0,n[41]=0,n[42]=-1,n[43]=0,n[44]=0,n[45]=-1,n[46]=0,n[47]=0,n[48]=0,n[49]=1,n[50]=0,n[51]=0,n[52]=1,n[53]=0,n[54]=0,n[55]=1,n[56]=0,n[57]=0,n[58]=1,n[59]=0,n[60]=0,n[61]=-1,n[62]=0,n[63]=0,n[64]=-1,n[65]=0,n[66]=0,n[67]=-1,n[68]=0,n[69]=0,n[70]=-1,n[71]=0,s.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:n})),r.st&&((a=new Float32Array(48))[0]=0,a[1]=0,a[2]=1,a[3]=0,a[4]=1,a[5]=1,a[6]=0,a[7]=1,a[8]=1,a[9]=0,a[10]=0,a[11]=0,a[12]=0,a[13]=1,a[14]=1,a[15]=1,a[16]=0,a[17]=0,a[18]=1,a[19]=0,a[20]=1,a[21]=1,a[22]=0,a[23]=1,a[24]=1,a[25]=0,a[26]=0,a[27]=0,a[28]=0,a[29]=1,a[30]=1,a[31]=1,a[32]=1,a[33]=0,a[34]=0,a[35]=0,a[36]=0,a[37]=1,a[38]=1,a[39]=1,a[40]=0,a[41]=0,a[42]=1,a[43]=0,a[44]=1,a[45]=1,a[46]=0,a[47]=1,s.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:a})),r.tangent&&((a=new Float32Array(72))[0]=1,a[1]=0,a[2]=0,a[3]=1,a[4]=0,a[5]=0,a[6]=1,a[7]=0,a[8]=0,a[9]=1,a[10]=0,a[11]=0,a[12]=-1,a[13]=0,a[14]=0,a[15]=-1,a[16]=0,a[17]=0,a[18]=-1,a[19]=0,a[20]=0,a[21]=-1,a[22]=0,a[23]=0,a[24]=0,a[25]=1,a[26]=0,a[27]=0,a[28]=1,a[29]=0,a[30]=0,a[31]=1,a[32]=0,a[33]=0,a[34]=1,a[35]=0,a[36]=0,a[37]=-1,a[38]=0,a[39]=0,a[40]=-1,a[41]=0,a[42]=0,a[43]=-1,a[44]=0,a[45]=0,a[46]=-1,a[47]=0,a[48]=-1,a[49]=0,a[50]=0,a[51]=-1,a[52]=0,a[53]=0,a[54]=-1,a[55]=0,a[56]=0,a[57]=-1,a[58]=0,a[59]=0,a[60]=1,a[61]=0,a[62]=0,a[63]=1,a[64]=0,a[65]=0,a[66]=1,a[67]=0,a[68]=0,a[69]=1,a[70]=0,a[71]=0,s.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:a})),r.bitangent&&((o=new Float32Array(72))[0]=0,o[1]=1,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=0,o[7]=1,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=1,o[14]=0,o[15]=0,o[16]=1,o[17]=0,o[18]=0,o[19]=1,o[20]=0,o[21]=0,o[22]=1,o[23]=0,o[24]=0,o[25]=0,o[26]=1,o[27]=0,o[28]=0,o[29]=1,o[30]=0,o[31]=0,o[32]=1,o[33]=0,o[34]=0,o[35]=1,o[36]=0,o[37]=0,o[38]=1,o[39]=0,o[40]=0,o[41]=1,o[42]=0,o[43]=0,o[44]=1,o[45]=0,o[46]=0,o[47]=1,o[48]=0,o[49]=0,o[50]=1,o[51]=0,o[52]=0,o[53]=1,o[54]=0,o[55]=0,o[56]=1,o[57]=0,o[58]=0,o[59]=1,o[60]=0,o[61]=0,o[62]=1,o[63]=0,o[64]=0,o[65]=1,o[66]=0,o[67]=0,o[68]=1,o[69]=0,o[70]=0,o[71]=1,s.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:o})),(o=new Uint16Array(36))[0]=0,o[1]=1,o[2]=2,o[3]=0,o[4]=2,o[5]=3,o[6]=6,o[7]=5,o[8]=4,o[9]=7,o[10]=6,o[11]=4,o[12]=8,o[13]=9,o[14]=10,o[15]=8,o[16]=10,o[17]=11,o[18]=14,o[19]=13,o[20]=12,o[21]=15,o[22]=14,o[23]=12,o[24]=18,o[25]=17,o[26]=16,o[27]=19,o[28]=18,o[29]=16,o[30]=20,o[31]=21,o[32]=22,o[33]=20,o[34]=22,o[35]=23):((l=new Float64Array(24))[0]=t.x,l[1]=t.y,l[2]=t.z,l[3]=i.x,l[4]=t.y,l[5]=t.z,l[6]=i.x,l[7]=i.y,l[8]=t.z,l[9]=t.x,l[10]=i.y,l[11]=t.z,l[12]=t.x,l[13]=t.y,l[14]=i.z,l[15]=i.x,l[16]=t.y,l[17]=i.z,l[18]=i.x,l[19]=i.y,l[20]=i.z,l[21]=t.x,l[22]=i.y,l[23]=i.z,s.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l}),(o=new Uint16Array(36))[0]=4,o[1]=5,o[2]=6,o[3]=4,o[4]=6,o[5]=7,o[6]=1,o[7]=0,o[8]=3,o[9]=1,o[10]=3,o[11]=2,o[12]=1,o[13]=6,o[14]=5,o[15]=1,o[16]=2,o[17]=6,o[18]=2,o[19]=3,o[20]=7,o[21]=2,o[22]=7,o[23]=6,o[24]=3,o[25]=0,o[26]=4,o[27]=3,o[28]=4,o[29]=7,o[30]=0,o[31]=1,o[32]=5,o[33]=0,o[34]=5,o[35]=4);var l;t=Cartesian3.subtract(i,t,diffScratch),t=.5*Cartesian3.magnitude(t);return defined(e._offsetAttribute)&&(l=l.length,arrayFill(l=new Uint8Array(l/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),s.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})),new Geometry({attributes:s,indices:o,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:new BoundingSphere(Cartesian3.ZERO,t),offsetAttribute:e._offsetAttribute})}},BoxGeometry.getUnitBox=function(){return defined(unitBoxGeometry)||(unitBoxGeometry=BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(1,1,1),vertexFormat:VertexFormat.POSITION_ONLY}))),unitBoxGeometry};var diffScratch$1=new Cartesian3;function BoxOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).minimum,i=e.maximum;this._min=Cartesian3.clone(t),this._max=Cartesian3.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}BoxOutlineGeometry.fromDimensions=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).dimensions;t=Cartesian3.multiplyByScalar(t,.5,new Cartesian3);return new BoxOutlineGeometry({minimum:Cartesian3.negate(t,new Cartesian3),maximum:t,offsetAttribute:e.offsetAttribute})},BoxOutlineGeometry.fromAxisAlignedBoundingBox=function(e){return new BoxOutlineGeometry({minimum:e.minimum,maximum:e.maximum})},BoxOutlineGeometry.packedLength=2*Cartesian3.packedLength+1,BoxOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._min,t,i),Cartesian3.pack(e._max,t,i+Cartesian3.packedLength),t[i+2*Cartesian3.packedLength]=defaultValue(e._offsetAttribute,-1),t};var scratchMin$1=new Cartesian3,scratchMax$1=new Cartesian3,scratchOptions$1={minimum:scratchMin$1,maximum:scratchMax$1,offsetAttribute:void 0};function CartographicGeocoderService(){}function Spline(){this.times=void 0,this.points=void 0,DeveloperError.throwInstantiationError()}function LinearSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).points;e=e.times;this._times=e,this._points=t,this._lastTimeIndex=0}BoxOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchMin$1),n=Cartesian3.unpack(e,t+Cartesian3.packedLength,scratchMax$1);t=e[t+2*Cartesian3.packedLength];return defined(i)?(i._min=Cartesian3.clone(r,i._min),i._max=Cartesian3.clone(n,i._max),i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$1.offsetAttribute=-1===t?void 0:t,new BoxOutlineGeometry(scratchOptions$1))},BoxOutlineGeometry.createGeometry=function(e){var t=e._min,i=e._max;if(!Cartesian3.equals(t,i)){var r=new GeometryAttributes,n=new Uint16Array(24),a=new Float64Array(24);return a[0]=t.x,a[1]=t.y,a[2]=t.z,a[3]=i.x,a[4]=t.y,a[5]=t.z,a[6]=i.x,a[7]=i.y,a[8]=t.z,a[9]=t.x,a[10]=i.y,a[11]=t.z,a[12]=t.x,a[13]=t.y,a[14]=i.z,a[15]=i.x,a[16]=t.y,a[17]=i.z,a[18]=i.x,a[19]=i.y,a[20]=i.z,a[21]=t.x,a[22]=i.y,a[23]=i.z,r.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:a}),n[0]=4,n[1]=5,n[2]=5,n[3]=6,n[4]=6,n[5]=7,n[6]=7,n[7]=4,n[8]=0,n[9]=1,n[10]=1,n[11]=2,n[12]=2,n[13]=3,n[14]=3,n[15]=0,n[16]=0,n[17]=4,n[18]=1,n[19]=5,n[20]=2,n[21]=6,n[22]=3,n[23]=7,t=Cartesian3.subtract(i,t,diffScratch$1),t=.5*Cartesian3.magnitude(t),defined(e._offsetAttribute)&&(a=a.length,arrayFill(a=new Uint8Array(a/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),r.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new Geometry({attributes:r,indices:n,primitiveType:PrimitiveType$1.LINES,boundingSphere:new BoundingSphere(Cartesian3.ZERO,t),offsetAttribute:e._offsetAttribute})}},CartographicGeocoderService.prototype.geocode=function(e){var t=e.match(/[^\s,\n]+/g);if(2===t.length||3===t.length){var i=+t[0],r=+t[1],n=3===t.length?+t[2]:300;if(isNaN(i)&&isNaN(r))for(var a=/^(\d+.?\d*)([nsew])/i,o=0;o<t.length;++o){var s=t[o].match(a);a.test(t[o])&&3===s.length&&(/^[ns]/i.test(s[2])?r=/^[n]/i.test(s[2])?+s[1]:-s[1]:/^[ew]/i.test(s[2])&&(i=/^[e]/i.test(s[2])?+s[1]:-s[1]))}if(!isNaN(i)&&!isNaN(r)&&!isNaN(n))return n={displayName:e,destination:Cartesian3.fromDegrees(i,r,n)},when.resolve([n])}return when.resolve([])},Spline.prototype.evaluate=DeveloperError.throwInstantiationError,Spline.prototype.findTimeInterval=function(e,t){var i,r=this.times,n=r.length;if(e>=r[t=defaultValue(t,0)]){if(t+1<n&&e<r[t+1])return t;if(t+2<n&&e<r[t+2])return t+1}else if(0<=t-1&&e>=r[t-1])return t-1;if(e>r[t])for(i=t;i<n-1&&!(e>=r[i]&&e<r[i+1]);++i);else for(i=t-1;0<=i&&!(e>=r[i]&&e<r[i+1]);--i);return i===n-1&&(i=n-2),i},Spline.prototype.wrapTime=function(e){var t=(r=this.times)[r.length-1],i=r[0],r=t-i;return e<i&&(e+=(Math.floor((i-e)/r)+1)*r),t<e&&(e-=(Math.floor((e-t)/r)+1)*r),e},Spline.prototype.clampTime=function(e){var t=this.times;return CesiumMath.clamp(e,t[0],t[t.length-1])},Object.defineProperties(LinearSpline.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),LinearSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,LinearSpline.prototype.wrapTime=Spline.prototype.wrapTime,LinearSpline.prototype.clampTime=Spline.prototype.clampTime,LinearSpline.prototype.evaluate=function(e,t){var i=this.points,r=this.times,n=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);r=(e-r[n])/(r[n+1]-r[n]);return defined(t)||(t=new Cartesian3),Cartesian3.lerp(i[n],i[n+1],r,t)};var TridiagonalSystemSolver={solve:function(e,t,i,r){for(var n,a=new Array(i.length),o=new Array(r.length),s=new Array(r.length),l=0;l<o.length;l++)o[l]=new Cartesian3,s[l]=new Cartesian3;for(a[0]=i[0]/t[0],o[0]=Cartesian3.multiplyByScalar(r[0],1/t[0],o[0]),l=1;l<a.length;++l)n=1/(t[l]-a[l-1]*e[l-1]),a[l]=i[l]*n,o[l]=Cartesian3.subtract(r[l],Cartesian3.multiplyByScalar(o[l-1],e[l-1],o[l]),o[l]),o[l]=Cartesian3.multiplyByScalar(o[l],n,o[l]);for(n=1/(t[l]-a[l-1]*e[l-1]),o[l]=Cartesian3.subtract(r[l],Cartesian3.multiplyByScalar(o[l-1],e[l-1],o[l]),o[l]),o[l]=Cartesian3.multiplyByScalar(o[l],n,o[l]),s[s.length-1]=o[o.length-1],l=s.length-2;0<=l;--l)s[l]=Cartesian3.subtract(o[l],Cartesian3.multiplyByScalar(s[l+1],a[l],s[l]),s[l]);return s}},scratchLower=[],scratchDiagonal=[],scratchUpper=[],scratchRight=[];function generateClamped(e,t,i){var r,n=scratchLower,a=scratchUpper,o=scratchDiagonal,s=scratchRight;n.length=a.length=e.length-1,o.length=s.length=e.length,n[0]=o[0]=1;var l=s[a[0]=0];for(defined(l)||(l=s[0]=new Cartesian3),Cartesian3.clone(t,l),r=1;r<n.length-1;++r)n[r]=a[r]=1,o[r]=4,defined(l=s[r])||(l=s[r]=new Cartesian3),Cartesian3.subtract(e[r+1],e[r-1],l),Cartesian3.multiplyByScalar(l,3,l);return n[r]=0,a[r]=1,o[r]=4,defined(l=s[r])||(l=s[r]=new Cartesian3),Cartesian3.subtract(e[r+1],e[r-1],l),Cartesian3.multiplyByScalar(l,3,l),defined(l=s[r+(o[r+1]=1)])||(l=s[r+1]=new Cartesian3),Cartesian3.clone(i,l),TridiagonalSystemSolver.solve(n,o,a,s)}function generateNatural(e){var t,i=scratchLower,r=scratchUpper,n=scratchDiagonal,a=scratchRight;i.length=r.length=e.length-1,n.length=a.length=e.length,i[0]=r[0]=1,n[0]=2;var o=a[0];for(defined(o)||(o=a[0]=new Cartesian3),Cartesian3.subtract(e[1],e[0],o),Cartesian3.multiplyByScalar(o,3,o),t=1;t<i.length;++t)i[t]=r[t]=1,n[t]=4,defined(o=a[t])||(o=a[t]=new Cartesian3),Cartesian3.subtract(e[t+1],e[t-1],o),Cartesian3.multiplyByScalar(o,3,o);return n[t]=2,defined(o=a[t])||(o=a[t]=new Cartesian3),Cartesian3.subtract(e[t],e[t-1],o),Cartesian3.multiplyByScalar(o,3,o),TridiagonalSystemSolver.solve(i,n,r,a)}function HermiteSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).points,i=e.times,r=e.inTangents;e=e.outTangents;this._times=i,this._points=t,this._inTangents=r,this._outTangents=e,this._lastTimeIndex=0}Object.defineProperties(HermiteSpline.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),HermiteSpline.createC1=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).times,i=e.points,r=e.tangents;e=r.slice(0,r.length-1);return new HermiteSpline({times:t,points:i,inTangents:r.slice(1,r.length),outTangents:e})},HermiteSpline.createNaturalCubic=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).times,i=e.points;if(i.length<3)return new LinearSpline({points:i,times:t});var r=generateNatural(i);e=r.slice(0,r.length-1);return new HermiteSpline({times:t,points:i,inTangents:r.slice(1,r.length),outTangents:e})},HermiteSpline.createClampedCubic=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).times,i=e.points,r=e.firstTangent;e=e.lastTangent;return i.length<3?new LinearSpline({points:i,times:t}):(e=(r=generateClamped(i,r,e)).slice(0,r.length-1),new HermiteSpline({times:t,points:i,inTangents:r.slice(1,r.length),outTangents:e}))},HermiteSpline.hermiteCoefficientMatrix=new Matrix4(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0),HermiteSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval;var scratchTimeVec=new Cartesian4,scratchTemp=new Cartesian3;HermiteSpline.prototype.wrapTime=Spline.prototype.wrapTime,HermiteSpline.prototype.clampTime=Spline.prototype.clampTime,HermiteSpline.prototype.evaluate=function(e,t){defined(t)||(t=new Cartesian3);var i=this.points,r=this.times,n=this.inTangents,a=this.outTangents,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);e=(e-r[o])/(r[o+1]-r[o]);return(r=scratchTimeVec).z=e,r.y=e*e,r.x=r.y*e,r.w=1,r=Matrix4.multiplyByVector(HermiteSpline.hermiteCoefficientMatrix,r,r),t=Cartesian3.multiplyByScalar(i[o],r.x,t),Cartesian3.multiplyByScalar(i[o+1],r.y,scratchTemp),Cartesian3.add(t,scratchTemp,t),Cartesian3.multiplyByScalar(a[o],r.z,scratchTemp),Cartesian3.add(t,scratchTemp,t),Cartesian3.multiplyByScalar(n[o],r.w,scratchTemp),Cartesian3.add(t,scratchTemp,t)};var scratchTimeVec$1=new Cartesian4,scratchTemp0=new Cartesian3,scratchTemp1=new Cartesian3;function createEvaluateFunction(e){var t=e.points,i=e.times;if(t.length<3){var r=i[0],n=1/(i[1]-r),a=t[0],o=t[1];return function(e,t){return defined(t)||(t=new Cartesian3),e=(e-r)*n,Cartesian3.lerp(a,o,e,t)}}return function(r,n){defined(n)||(n=new Cartesian3);var a,o,s,l,c=e._lastTimeIndex=e.findTimeInterval(r,e._lastTimeIndex),u=(r-i[c])/(i[c+1]-i[c]);return(r=scratchTimeVec$1).z=u,r.y=u*u,r.x=r.y*u,r.w=1,r=0===c?(a=t[0],o=t[1],s=e.firstTangent,l=Cartesian3.subtract(t[2],a,scratchTemp0),Cartesian3.multiplyByScalar(l,.5,l),Matrix4.multiplyByVector(HermiteSpline.hermiteCoefficientMatrix,r,r)):c===t.length-2?(a=t[c],o=t[c+1],l=e.lastTangent,s=Cartesian3.subtract(o,t[c-1],scratchTemp0),Cartesian3.multiplyByScalar(s,.5,s),Matrix4.multiplyByVector(HermiteSpline.hermiteCoefficientMatrix,r,r)):(a=t[c-1],o=t[c],s=t[c+1],l=t[c+2],Matrix4.multiplyByVector(CatmullRomSpline.catmullRomCoefficientMatrix,r,r)),n=Cartesian3.multiplyByScalar(a,r.x,n),Cartesian3.multiplyByScalar(o,r.y,scratchTemp1),Cartesian3.add(n,scratchTemp1,n),Cartesian3.multiplyByScalar(s,r.z,scratchTemp1),Cartesian3.add(n,scratchTemp1,n),Cartesian3.multiplyByScalar(l,r.w,scratchTemp1),Cartesian3.add(n,scratchTemp1,n)}}var firstTangentScratch=new Cartesian3,lastTangentScratch=new Cartesian3;function CatmullRomSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).points,i=e.times,r=e.firstTangent,n=e.lastTangent;2<t.length&&(defined(r)||(r=firstTangentScratch,Cartesian3.multiplyByScalar(t[1],2,r),Cartesian3.subtract(r,t[2],r),Cartesian3.subtract(r,t[0],r),Cartesian3.multiplyByScalar(r,.5,r)),defined(n)||(e=t.length-1,n=lastTangentScratch,Cartesian3.multiplyByScalar(t[e-1],2,n),Cartesian3.subtract(t[e],n,n),Cartesian3.add(n,t[e-2],n),Cartesian3.multiplyByScalar(n,.5,n))),this._times=i,this._points=t,this._firstTangent=Cartesian3.clone(r),this._lastTangent=Cartesian3.clone(n),this._evaluateFunction=createEvaluateFunction(this),this._lastTimeIndex=0}function getStringFromTypedArray(e,t,i){return t=defaultValue(t,0),i=defaultValue(i,e.byteLength-t),e=e.subarray(t,t+i),getStringFromTypedArray.decode(e)}function inRange(e,t,i){return t<=e&&e<=i}function utf8Handler(e){for(var t=0,i=0,r=0,n=128,a=191,o=[],s=e.length,l=0;l<s;++l){var c=e[l];if(0===r){if(inRange(c,0,127)){o.push(c);continue}if(inRange(c,194,223)){r=1,t=31&c;continue}if(inRange(c,224,239)){224===c&&(n=160),237===c&&(a=159),r=2,t=15&c;continue}if(inRange(c,240,244)){240===c&&(n=144),244===c&&(a=143),r=3,t=7&c;continue}throw new RuntimeError("String decoding failed.")}inRange(c,n,a)?(n=128,a=191,t=t<<6|63&c,++i===r&&(o.push(t),t=r=i=0)):(t=r=i=0,n=128,a=191,--l)}return o}Object.defineProperties(CatmullRomSpline.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}}),CatmullRomSpline.catmullRomCoefficientMatrix=new Matrix4(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),CatmullRomSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,CatmullRomSpline.prototype.wrapTime=Spline.prototype.wrapTime,CatmullRomSpline.prototype.clampTime=Spline.prototype.clampTime,CatmullRomSpline.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},getStringFromTypedArray.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)},getStringFromTypedArray.decodeWithFromCharCode=function(e){for(var t="",i=utf8Handler(e),r=i.length,n=0;n<r;++n){var a=i[n];a<=65535?t+=String.fromCharCode(a):(a-=65536,t+=String.fromCharCode(55296+(a>>10),56320+(1023&a)))}return t},"undefined"!=typeof TextDecoder?getStringFromTypedArray.decode=getStringFromTypedArray.decodeWithTextDecoder:getStringFromTypedArray.decode=getStringFromTypedArray.decodeWithFromCharCode;var Intersections2D={};function QuantizedMeshTerrainData(e){this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;var t=this._quantizedVertices.length/3,i=this._uValues=this._quantizedVertices.subarray(0,t),r=this._vValues=this._quantizedVertices.subarray(t,2*t);function n(e,t){return r[e]-r[t]}function a(e,t){return i[e]-i[t]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=sortIndicesIfNecessary(e.westIndices,n,t),this._southIndices=sortIndicesIfNecessary(e.southIndices,a,t),this._eastIndices=sortIndicesIfNecessary(e.eastIndices,n,t),this._northIndices=sortIndicesIfNecessary(e.northIndices,a,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=defaultValue(e.childTileMask,15),this._createdByUpsampling=defaultValue(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Intersections2D.clipTriangleAtAxisAlignedThreshold=function(e,t,i,r,n,a){var o,s,l,c,u,d,h,p,f;return defined(a)?a.length=0:a=[],l=t?(o=i<e,s=r<e,n<e):(o=e<i,s=e<r,e<n),1===(t=o+s+l)?o?(c=(e-i)/(r-i),u=(e-i)/(n-i),a.push(1),a.push(2),1!==u&&(a.push(-1),a.push(0),a.push(2),a.push(u)),1!==c&&(a.push(-1),a.push(0),a.push(1),a.push(c))):s?(d=(e-r)/(n-r),h=(e-r)/(i-r),a.push(2),a.push(0),1!==h&&(a.push(-1),a.push(1),a.push(0),a.push(h)),1!==d&&(a.push(-1),a.push(1),a.push(2),a.push(d))):l&&(p=(e-n)/(i-n),f=(e-n)/(r-n),a.push(0),a.push(1),1!==f&&(a.push(-1),a.push(2),a.push(1),a.push(f)),1!==p&&(a.push(-1),a.push(2),a.push(0),a.push(p))):2===t?o||i===e?s||r===e?l||n===e||(u=(e-i)/(n-i),d=(e-r)/(n-r),a.push(2),a.push(-1),a.push(0),a.push(2),a.push(u),a.push(-1),a.push(1),a.push(2),a.push(d)):(f=(e-n)/(r-n),c=(e-i)/(r-i),a.push(1),a.push(-1),a.push(2),a.push(1),a.push(f),a.push(-1),a.push(0),a.push(1),a.push(c)):(h=(e-r)/(i-r),p=(e-n)/(i-n),a.push(0),a.push(-1),a.push(1),a.push(0),a.push(h),a.push(-1),a.push(2),a.push(0),a.push(p)):3!==t&&(a.push(0),a.push(1),a.push(2)),a},Intersections2D.computeBarycentricCoordinates=function(e,t,i,r,n,a,o,s,l){var c=i-o;i=o-n,n=a-s,a=r-s,r=1-(i=(n*(o=e-o)+i*(s=t-s))*(r=1/(n*c+i*a)))-(s=(-a*o+c*s)*r);return defined(l)?(l.x=i,l.y=s,l.z=r,l):new Cartesian3(i,s,r)},Intersections2D.computeLineSegmentLineSegmentIntersection=function(e,t,i,r,n,a,o,s,l){var c=(s-a)*(i-e)-(o-n)*(r-t);if(0!=c)return s=((o-n)*(t-a)-(s-a)*(e-n))/c,c=((i-e)*(t-a)-(r-t)*(e-n))/c,0<=s&&s<=1&&0<=c&&c<=1?(defined(l)||(l=new Cartesian2),l.x=e+s*(i-e),l.y=t+s*(r-t),l):void 0},Object.defineProperties(QuantizedMeshTerrainData.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return defined(this._mesh)}}});var arrayScratch=[];function sortIndicesIfNecessary(e,t,i){arrayScratch.length=e.length;for(var r=!1,n=0,a=e.length;n<a;++n)arrayScratch[n]=e[n],r=r||0<n&&0<t(e[n-1],e[n]);return r?(arrayScratch.sort(t),IndexDatatype$1.createTypedArray(i,arrayScratch)):e}var createMeshTaskProcessor=new TaskProcessor("createVerticesFromQuantizedTerrainMesh");QuantizedMeshTerrainData.prototype.createMesh=function(e,t,i,r,n){var a=e.ellipsoid;r=e.tileXYToRectangle(t,i,r);if(n=defaultValue(n,1),defined(a=createMeshTaskProcessor.scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:r,relativeToCenter:this._boundingSphere.center,ellipsoid:a,exaggeration:n}))){var o=this;return when(a,(function(e){var t=o._quantizedVertices.length/3,i=t+o._westIndices.length+o._southIndices.length+o._eastIndices.length+o._northIndices.length,r=IndexDatatype$1.createTypedArray(i,e.indices),a=new Float32Array(e.vertices),s=e.center,l=e.minimumHeight,c=e.maximumHeight,u=defaultValue(BoundingSphere.clone(e.boundingSphere),o._boundingSphere),d=defaultValue(OrientedBoundingBox.clone(e.orientedBoundingBox),o._orientedBoundingBox),h=defaultValue(Cartesian3.clone(e.occludeePointInScaledSpace),o._horizonOcclusionPoint),p=e.vertexStride;i=TerrainEncoding.clone(e.encoding);return o._mesh=new TerrainMesh(s,a,r,e.indexCountWithoutSkirts,t,l,c,u,h,p,d,i,n,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),o._quantizedVertices=void 0,o._encodedNormals=void 0,o._indices=void 0,o._uValues=void 0,o._vValues=void 0,o._heightValues=void 0,o._westIndices=void 0,o._southIndices=void 0,o._eastIndices=void 0,o._northIndices=void 0,o._mesh}))}};var upsampleTaskProcessor=new TaskProcessor("upsampleQuantizedTerrainMesh");QuantizedMeshTerrainData.prototype.upsample=function(e,t,i,r,n,a,o){var s=this._mesh;if(defined(this._mesh)){var l=2*t!==n;t=2*i===a,i=e.ellipsoid,o=e.tileXYToRectangle(n,a,o);if(defined(i=upsampleTaskProcessor.scheduleTask({vertices:s.vertices,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:t,childRectangle:o,ellipsoid:i,exaggeration:s.exaggeration}))){s=Math.min(this._westSkirtHeight,this._eastSkirtHeight),s=Math.min(s,this._southSkirtHeight),s=Math.min(s,this._northSkirtHeight);var c=l?.5*s:this._westSkirtHeight,u=t?.5*s:this._southSkirtHeight,d=l?this._eastSkirtHeight:.5*s,h=t?this._northSkirtHeight:.5*s,p=this._credits;return when(i).then((function(e){var t,i=new Uint16Array(e.vertices),r=IndexDatatype$1.createTypedArray(i.length/3,e.indices);return defined(e.encodedNormals)&&(t=new Uint8Array(e.encodedNormals)),new QuantizedMeshTerrainData({quantizedVertices:i,indices:r,encodedNormals:t,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:BoundingSphere.clone(e.boundingSphere),orientedBoundingBox:OrientedBoundingBox.clone(e.orientedBoundingBox),horizonOcclusionPoint:Cartesian3.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:c,southSkirtHeight:u,eastSkirtHeight:d,northSkirtHeight:h,childTileMask:0,credits:p,createdByUpsampling:!0})}))}}};var maxShort=32767,barycentricCoordinateScratch=new Cartesian3;function pointInBoundingBox(e,t,i,r,n,a,o,s){var l=Math.min(i,n,o);n=Math.max(i,n,o),o=Math.min(r,a,s),s=Math.max(r,a,s);return l<=e&&e<=n&&o<=t&&t<=s}QuantizedMeshTerrainData.prototype.interpolateHeight=function(e,t,i){return t=CesiumMath.clamp((t-e.west)/e.width,0,1),t*=maxShort,e=CesiumMath.clamp((i-e.south)/e.height,0,1),e*=maxShort,(defined(this._mesh)?interpolateMeshHeight$1:interpolateHeight$1)(this,t,e)};var texCoordScratch0=new Cartesian2,texCoordScratch1=new Cartesian2,texCoordScratch2=new Cartesian2;function interpolateMeshHeight$1(e,t,i){for(var r=(e=e._mesh).vertices,n=e.encoding,a=e.indices,o=0,s=a.length;o<s;o+=3){var l=a[o],c=a[o+1],u=a[o+2],d=n.decodeTextureCoordinates(r,l,texCoordScratch0),h=n.decodeTextureCoordinates(r,c,texCoordScratch1),p=n.decodeTextureCoordinates(r,u,texCoordScratch2);if(pointInBoundingBox(t,i,d.x,d.y,h.x,h.y,p.x,p.y)&&-1e-15<=(p=Intersections2D.computeBarycentricCoordinates(t,i,d.x,d.y,h.x,h.y,p.x,p.y,barycentricCoordinateScratch)).x&&-1e-15<=p.y&&-1e-15<=p.z)return l=n.decodeHeight(r,l),c=n.decodeHeight(r,c),u=n.decodeHeight(r,u),p.x*l+p.y*c+p.z*u}}function interpolateHeight$1(e,t,i){for(var r=e._uValues,n=e._vValues,a=e._heightValues,o=e._indices,s=0,l=o.length;s<l;s+=3){var c=o[s],u=o[s+1],d=o[s+2],h=r[c],p=r[u],f=r[d],m=n[c],g=n[u],y=n[d];if(pointInBoundingBox(t,i,h,m,p,g,f,y)&&-1e-15<=(y=Intersections2D.computeBarycentricCoordinates(t,i,h,m,p,g,f,y,barycentricCoordinateScratch)).x&&-1e-15<=y.y&&-1e-15<=y.z)return d=y.x*a[c]+y.y*a[u]+y.z*a[d],CesiumMath.lerp(e._minimumHeight,e._maximumHeight,d/maxShort)}}function LayerInformation(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.availabilityPromiseCache={}}function CesiumTerrainProvider(e){this._heightmapWidth=65,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=defaultValue(e.requestVertexNormals,!1),this._requestWaterMask=defaultValue(e.requestWaterMask,!1),this._requestMetadata=defaultValue(e.requestMetadata,!0),this._errorEvent=new Event;var t=e.credit;"string"==typeof t&&(t=new Credit(t)),this._credit=t,this._availability=void 0;var i=when.defer();this._ready=!1,this._readyPromise=i,this._tileCredits=void 0;var r,n,a,o=this,s=this._layers=[],l="",c=[],u=0;function d(e){if(!e.format)return x="The tile format is not specified in the layer.json file.",void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));if(!e.tiles||0===e.tiles.length)return x="The layer.json file does not specify any tile URL templates.",void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));var t=!1,i=!1,p=!1,f=!0,g=!1;if("heightmap-1.0"===e.format)g=!0,defined(o._heightmapStructure)||(o._heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:65535}),i=!0,o._requestWaterMask=!0;else if(0!==e.format.indexOf("quantized-mesh-1."))return x='The tile format "'+e.format+'" is invalid or not supported.',void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));var y,_=e.tiles,v=e.maxzoom;if(u=Math.max(u,v),e.projection&&"EPSG:4326"!==e.projection){if("EPSG:3857"!==e.projection)return x='The projection "'+e.projection+'" is invalid or not supported.',void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));o._tilingScheme=new WebMercatorTilingScheme({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:o._ellipsoid})}else o._tilingScheme=new GeographicTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:o._ellipsoid});if(o._levelZeroMaximumGeometricError=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(o._tilingScheme.ellipsoid,o._heightmapWidth,o._tilingScheme.getNumberOfXTilesAtLevel(0)),e.scheme&&"tms"!==e.scheme&&"slippyMap"!==e.scheme)return x='The scheme "'+e.scheme+'" is invalid or not supported.',void(a=TileProviderError.handleError(a,o,o._errorEvent,x,void 0,void 0,void 0,m));o._scheme=e.scheme,defined(e.extensions)&&-1!==e.extensions.indexOf("octvertexnormals")?t=!0:defined(e.extensions)&&-1!==e.extensions.indexOf("vertexnormals")&&(f=!(t=!0)),defined(e.extensions)&&-1!==e.extensions.indexOf("watermask")&&(i=!0),defined(e.extensions)&&-1!==e.extensions.indexOf("metadata")&&(p=!0);var C,x=e.metadataAvailability,b=e.available;if(defined(b)&&!defined(x)){C=new TileAvailability(o._tilingScheme,b.length);for(var S=0;S<b.length;++S){var T=b[S],E=o._tilingScheme.getNumberOfYTilesAtLevel(S);defined(c[S])||(c[S]=[]);for(var w=0;w<T.length;++w){var A=T[w],P=E-A.endY-1,D=E-A.startY-1;c[S].push([A.startX,P,A.endX,D]),C.addAvailableTileRange(S,A.startX,P,A.endX,D)}}}else defined(x)&&(y=new TileAvailability(o._tilingScheme,v),C=new TileAvailability(o._tilingScheme,v),c[0]=[[0,0,1,0]],C.addAvailableTileRange(0,0,0,1,0));return o._hasWaterMask=o._hasWaterMask||i,o._hasVertexNormals=o._hasVertexNormals||t,o._hasMetadata=o._hasMetadata||p,defined(e.attribution)&&(0<l.length&&(l+=" "),l+=e.attribution),s.push(new LayerInformation({resource:r,version:e.version,isHeightmap:g,tileUrlTemplates:_,availability:C,hasVertexNormals:t,hasWaterMask:i,hasMetadata:p,availabilityLevels:x,availabilityTilesLoaded:y,littleEndianExtensionSize:f})),defined(e=e.parentUrl)?defined(C)?((r=r.getDerivedResource({url:e})).appendForwardSlash(),when((n=r.getDerivedResource({url:"layer.json"})).fetchJson(),d,h)):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),when.resolve()):when.resolve()}function h(e){var t="An error occurred while accessing "+n.url+".";a=TileProviderError.handleError(a,o,o._errorEvent,t,void 0,void 0,void 0,m)}function p(e){d(e).then((function(){if(!defined(a)){var e,t=c.length;if(0<t)for(var i=o._availability=new TileAvailability(o._tilingScheme,u),r=0;r<t;++r)for(var n=c[r],s=0;s<n.length;++s){var d=n[s];i.addAvailableTileRange(r,d[0],d[1],d[2],d[3])}0<l.length&&(e=new Credit(l),defined(o._tileCredits)?o._tileCredits.push(e):o._tileCredits=[e]),o._ready=!0,o._readyPromise.resolve(!0)}}))}function f(e){defined(e)&&404===e.statusCode?p({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):h()}function m(){when(n.fetchJson()).then(p).otherwise(f)}when(e.url).then((function(e){(e=Resource.createIfNeeded(e)).appendForwardSlash(),n=(r=e).getDerivedResource({url:"layer.json"}),o._tileCredits=e.credits,m()})).otherwise((function(e){i.reject(e)}))}QuantizedMeshTerrainData.prototype.isChildAvailable=function(e,t,i,r){var n=2;return i!==2*e&&++n,r!==2*t&&(n-=2),0!=(this._childTileMask&1<<n)},QuantizedMeshTerrainData.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var QuantizedMeshExtensionIds={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function getRequestHeader(e){return defined(e)&&0!==e.length?{Accept:"application/vnd.quantized-mesh;extensions="+e.join("-")+",application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function createHeightmapTerrainData(e,t,i,r,n){var a=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new HeightmapTerrainData({buffer:a,childTileMask:new Uint8Array(t,a.byteLength,1)[0],waterMask:new Uint8Array(t,a.byteLength+1,t.byteLength-a.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function createQuantizedMeshTerrainData(e,t,i,r,n,a){var o=a.littleEndianExtensionSize,s=0,l=3*Float64Array.BYTES_PER_ELEMENT,c=4*Float64Array.BYTES_PER_ELEMENT,u=3*Uint16Array.BYTES_PER_ELEMENT,d=Uint16Array.BYTES_PER_ELEMENT,h=3*d,p=new DataView(t),f=new Cartesian3(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0));s+=l;var m=p.getFloat32(s,!0);s+=Float32Array.BYTES_PER_ELEMENT;var g=p.getFloat32(s,!0);s+=Float32Array.BYTES_PER_ELEMENT;var y=new BoundingSphere(new Cartesian3(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0)),p.getFloat64(s+l,!0));s+=c;var _=new Cartesian3(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0));s+=l;var v=p.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var C=new Uint16Array(t,s,3*v);s+=v*u,65536<v&&(h=3*(d=Uint32Array.BYTES_PER_ELEMENT));var x=C.subarray(0,v);c=C.subarray(v,2*v),l=C.subarray(2*v,3*v);AttributeCompression.zigZagDeltaDecode(x,c,l),s%d!=0&&(s+=d-s%d),u=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var b=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,3*u);s+=u*h;for(var S=0,T=b.length,E=0;E<T;++E){var w=b[E];b[E]=S-w,0===w&&++S}x=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT,c=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,x),s+=x*d,l=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT,u=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,l),s+=l*d,h=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT,x=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,h),s+=h*d,l=p.getUint32(s,!0),s+=Uint32Array.BYTES_PER_ELEMENT;var A,P;h=IndexDatatype$1.createTypedArrayFromArrayBuffer(v,t,s,l);for(s+=l*d;s<p.byteLength;){var D=p.getUint8(s,!0);s+=Uint8Array.BYTES_PER_ELEMENT;var M=p.getUint32(s,o);if(s+=Uint32Array.BYTES_PER_ELEMENT,D===QuantizedMeshExtensionIds.OCT_VERTEX_NORMALS&&e._requestVertexNormals)A=new Uint8Array(t,s,2*v);else if(D===QuantizedMeshExtensionIds.WATER_MASK&&e._requestWaterMask)P=new Uint8Array(t,s,M);else if(D===QuantizedMeshExtensionIds.METADATA&&e._requestMetadata){if(0<(D=p.getUint32(s,!0))){D=getStringFromTypedArray(new Uint8Array(t),s+Uint32Array.BYTES_PER_ELEMENT,D);var I=JSON.parse(D).available;if(defined(I))for(var R=0;R<I.length;++R)for(var O=i+R+1,L=I[R],N=e._tilingScheme.getNumberOfYTilesAtLevel(O),F=0;F<L.length;++F){var B=L[F],V=N-B.endY-1,k=N-B.startY-1;e.availability.addAvailableTileRange(O,B.startX,V,B.endX,k),a.availability.addAvailableTileRange(O,B.startX,V,B.endX,k)}}a.availabilityTilesLoaded.addAvailableTileRange(i,r,n,r,n)}s+=M}return l=5*e.getLevelMaximumGeometricError(i),d=e._tilingScheme.tileXYToRectangle(r,n,i),new QuantizedMeshTerrainData({center:f,minimumHeight:m,maximumHeight:g,boundingSphere:y,orientedBoundingBox:OrientedBoundingBox.fromRectangle(d,m,g,e._tilingScheme.ellipsoid),horizonOcclusionPoint:_,quantizedVertices:C,encodedNormals:A,indices:b,westIndices:c,southIndices:u,eastIndices:x,northIndices:h,westSkirtHeight:l,southSkirtHeight:l,eastSkirtHeight:l,northSkirtHeight:l,childTileMask:e.availability.computeChildMaskForTile(i,r,n),waterMask:P,credits:e._tileCredits})}function requestTileGeometry(e,t,i,r,n,a){if(!defined(n))return when.reject(new RuntimeError("Terrain tile doesn't exist"));var o;if(0!==(c=n.tileUrlTemplates).length){o=e._scheme&&"tms"!==e._scheme?i:e._tilingScheme.getNumberOfYTilesAtLevel(r)-i-1;var s,l=[];e._requestVertexNormals&&n.hasVertexNormals&&l.push(n.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&n.hasWaterMask&&l.push("watermask"),e._requestMetadata&&n.hasMetadata&&l.push("metadata");var c,u=c[(t+o+r)%c.length];l=defined((c=n.resource)._ionEndpoint)&&!defined(c._ionEndpoint.externalType)?(0!==l.length&&(s={extensions:l.join("-")}),getRequestHeader(void 0)):getRequestHeader(l);if(defined(a=c.getDerivedResource({url:u,templateValues:{version:n.version,z:r,x:t,y:o},queryParameters:s,headers:l,request:a}).fetchArrayBuffer()))return a.then((function(a){return defined(e._heightmapStructure)?createHeightmapTerrainData(e,a):createQuantizedMeshTerrainData(e,a,r,t,i,n)}))}}function getAvailabilityTile(e,t,i,r){if(0!==r)return{level:e=r%(e=e.availabilityLevels)==0?r-e:(r/e|0)*e,x:t/(r=1<<r-e)|0,y:i/r|0}}function checkLayer(e,t,i,r,n,a){if(!defined(n.availabilityLevels))return{result:!1};for(var o,s,l,c=function(){delete n.availabilityPromiseCache[l]},u=n.availabilityTilesLoaded,d=n.availability,h=getAvailabilityTile(n,t,i,r);defined(h);){if(d.isTileAvailable(h.level,h.x,h.y)&&!u.isTileAvailable(h.level,h.x,h.y))return a||(l=h.level+"-"+h.x+"-"+h.y,defined(s=n.availabilityPromiseCache[l])||(o=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.TERRAIN}),defined(s=requestTileGeometry(e,h.x,h.y,h.level,n,o))&&(n.availabilityPromiseCache[l]=s).then(c))),{result:!0,promise:s};h=getAvailabilityTile(n,h.x,h.y,h.level)}return{result:!1}}CesiumTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){var n,a=this._layers,o=a.length;if(1===o)n=a[0];else for(var s=0;s<o;++s){var l=a[s];if(!defined(l.availability)||l.availability.isTileAvailable(i,e,t)){n=l;break}}return requestTileGeometry(this,e,t,i,n,r)},Object.defineProperties(CesiumTerrainProvider.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}}),CesiumTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},CesiumTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){if(defined(this._availability)){if(i>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(i,e,t))return!0;if(!this._hasMetadata)return!1;for(var r=this._layers,n=r.length,a=0;a<n;++a)if(checkLayer(this,e,t,i,r[a],0===a).result)return;return!1}},CesiumTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){if(!(!defined(this._availability)||i>this._availability._maximumLevel||this._availability.isTileAvailable(i,e,t))&&this._hasMetadata)for(var r=this._layers,n=r.length,a=0;a<n;++a){var o=checkLayer(this,e,t,i,r[a],0===a);if(defined(o.promise))return o.promise}},CesiumTerrainProvider._getAvailabilityTile=getAvailabilityTile;var EllipseGeometryLibrary={},rotAxis=new Cartesian3,tempVec=new Cartesian3,unitQuat=new Quaternion,rotMtx=new Matrix3;function pointOnEllipsoid(e,t,i,r,n,a,o,s,l,c){return t=e+t,Cartesian3.multiplyByScalar(r,Math.cos(t),rotAxis),Cartesian3.multiplyByScalar(i,Math.sin(t),tempVec),Cartesian3.add(rotAxis,tempVec,rotAxis),t=Math.cos(e),t*=t,e=Math.sin(e),e*=e,e=a/Math.sqrt(o*t+n*e)/s,Quaternion.fromAxisAngle(rotAxis,e,unitQuat),Matrix3.fromQuaternion(unitQuat,rotMtx),Matrix3.multiplyByVector(rotMtx,l,c),Cartesian3.normalize(c,c),Cartesian3.multiplyByScalar(c,s,c),c}var scratchCartesian1$1=new Cartesian3,scratchCartesian2$1=new Cartesian3,scratchCartesian3$2=new Cartesian3,scratchNormal$1=new Cartesian3;EllipseGeometryLibrary.raisePositionsToHeight=function(e,t,i){for(var r=t.ellipsoid,n=t.height,a=t.extrudedHeight,o=(t=i?e.length/3*2:e.length/3,new Float64Array(3*t)),s=e.length,l=i?s:0,c=0;c<s;c+=3){var u=c+1,d=c+2,h=Cartesian3.fromArray(e,c,scratchCartesian1$1);r.scaleToGeodeticSurface(h,h);var p=Cartesian3.clone(h,scratchCartesian2$1),f=r.geodeticSurfaceNormal(h,scratchNormal$1),m=Cartesian3.multiplyByScalar(f,n,scratchCartesian3$2);Cartesian3.add(h,m,h),i&&(Cartesian3.multiplyByScalar(f,a,m),Cartesian3.add(p,m,p),o[c+l]=p.x,o[u+l]=p.y,o[d+l]=p.z),o[c]=h.x,o[u]=h.y,o[d]=h.z}return o};var unitPosScratch=new Cartesian3,eastVecScratch=new Cartesian3,northVecScratch=new Cartesian3;function GeometryInstance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}EllipseGeometryLibrary.computeEllipsePositions=function(e,t,i){var r=e.semiMinorAxis,n=e.semiMajorAxis,a=e.rotation,o=e.center,s=(e=8*e.granularity,r*r),l=n*n,c=n*r,u=Cartesian3.magnitude(o),d=Cartesian3.normalize(o,unitPosScratch),h=Cartesian3.cross(Cartesian3.UNIT_Z,o,eastVecScratch),p=(h=Cartesian3.normalize(h,h),Cartesian3.cross(d,h,northVecScratch)),f=1+Math.ceil(CesiumMath.PI_OVER_TWO/e),m=CesiumMath.PI_OVER_TWO/(f-1),g=CesiumMath.PI_OVER_TWO-f*m;g<0&&(f-=Math.ceil(Math.abs(g)/m));var y,_,v,C,x,b=t?new Array(f*(f+2)*2*3):void 0,S=0,T=scratchCartesian1$1,E=scratchCartesian2$1,w=(e=4*f*3)-1,A=0,P=i?new Array(e):void 0;T=pointOnEllipsoid(g=CesiumMath.PI_OVER_TWO,a,p,h,s,c,l,u,d,T);for(t&&(b[S++]=T.x,b[S++]=T.y,b[S++]=T.z),i&&(P[w--]=T.z,P[w--]=T.y,P[w--]=T.x),g=CesiumMath.PI_OVER_TWO-m,y=1;y<f+1;++y){if(T=pointOnEllipsoid(g,a,p,h,s,c,l,u,d,T),E=pointOnEllipsoid(Math.PI-g,a,p,h,s,c,l,u,d,E),t){for(b[S++]=T.x,b[S++]=T.y,b[S++]=T.z,v=2*y+2,_=1;_<v-1;++_)C=_/(v-1),x=Cartesian3.lerp(T,E,C,scratchCartesian3$2),b[S++]=x.x,b[S++]=x.y,b[S++]=x.z;b[S++]=E.x,b[S++]=E.y,b[S++]=E.z}i&&(P[w--]=T.z,P[w--]=T.y,P[w--]=T.x,P[A++]=E.x,P[A++]=E.y,P[A++]=E.z),g=CesiumMath.PI_OVER_TWO-(y+1)*m}for(y=f;1<y;--y){if(T=pointOnEllipsoid(-(g=CesiumMath.PI_OVER_TWO-(y-1)*m),a,p,h,s,c,l,u,d,T),E=pointOnEllipsoid(g+Math.PI,a,p,h,s,c,l,u,d,E),t){for(b[S++]=T.x,b[S++]=T.y,b[S++]=T.z,v=2*(y-1)+2,_=1;_<v-1;++_)C=_/(v-1),x=Cartesian3.lerp(T,E,C,scratchCartesian3$2),b[S++]=x.x,b[S++]=x.y,b[S++]=x.z;b[S++]=E.x,b[S++]=E.y,b[S++]=E.z}i&&(P[w--]=T.z,P[w--]=T.y,P[w--]=T.x,P[A++]=E.x,P[A++]=E.y,P[A++]=E.z)}return T=pointOnEllipsoid(-(g=CesiumMath.PI_OVER_TWO),a,p,h,s,c,l,u,d,T),e={},t&&(b[S++]=T.x,b[S++]=T.y,b[S++]=T.z,e.positions=b,e.numPts=f),i&&(P[w--]=T.z,P[w--]=T.y,P[w--]=T.x,e.outerPositions=P),e};var scratchCartesian1$2=new Cartesian3,scratchCartesian2$2=new Cartesian3,scratchCartesian3$3=new Cartesian3;function barycentricCoordinates(e,t,i,r,n){var a,o,s,l,c,u,d;if(defined(n)||(n=new Cartesian3),defined(t.z)){if(Cartesian3.equalsEpsilon(e,t,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_X,n);if(Cartesian3.equalsEpsilon(e,i,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_Y,n);if(Cartesian3.equalsEpsilon(e,r,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_Z,n);a=Cartesian3.subtract(i,t,scratchCartesian1$2),o=Cartesian3.subtract(r,t,scratchCartesian2$2),s=Cartesian3.subtract(e,t,scratchCartesian3$3),l=Cartesian3.dot(a,a),h=Cartesian3.dot(a,o),c=Cartesian3.dot(a,s),u=Cartesian3.dot(o,o),d=Cartesian3.dot(o,s)}else{if(Cartesian2.equalsEpsilon(e,t,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_X,n);if(Cartesian2.equalsEpsilon(e,i,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_Y,n);if(Cartesian2.equalsEpsilon(e,r,CesiumMath.EPSILON14))return Cartesian3.clone(Cartesian3.UNIT_Z,n);a=Cartesian2.subtract(i,t,scratchCartesian1$2),o=Cartesian2.subtract(r,t,scratchCartesian2$2),s=Cartesian2.subtract(e,t,scratchCartesian3$3),l=Cartesian2.dot(a,a),h=Cartesian2.dot(a,o),c=Cartesian2.dot(a,s),u=Cartesian2.dot(o,o),d=Cartesian2.dot(o,s)}n.y=u*c-h*d,n.z=l*d-h*c;var h=l*u-h*h;return 0!==n.y&&(n.y/=h),0!==n.z&&(n.z/=h),n.x=1-n.y-n.z,n}function EncodedCartesian3(){this.high=Cartesian3.clone(Cartesian3.ZERO),this.low=Cartesian3.clone(Cartesian3.ZERO)}EncodedCartesian3.encode=function(e,t){var i;return defined(t)||(t={high:0,low:0}),0<=e?(i=65536*Math.floor(e/65536),t.high=i,t.low=e-i):(i=65536*Math.floor(-e/65536),t.high=-i,t.low=e+i),t};var scratchEncode={high:0,low:0};EncodedCartesian3.fromCartesian=function(e,t){defined(t)||(t=new EncodedCartesian3);var i=t.high,r=t.low;return EncodedCartesian3.encode(e.x,scratchEncode),i.x=scratchEncode.high,r.x=scratchEncode.low,EncodedCartesian3.encode(e.y,scratchEncode),i.y=scratchEncode.high,r.y=scratchEncode.low,EncodedCartesian3.encode(e.z,scratchEncode),i.z=scratchEncode.high,r.z=scratchEncode.low,t};var encodedP=new EncodedCartesian3;EncodedCartesian3.writeElements=function(e,t,i){EncodedCartesian3.fromCartesian(e,encodedP);var r=encodedP.high;e=encodedP.low;t[i]=r.x,t[i+1]=r.y,t[i+2]=r.z,t[i+3]=e.x,t[i+4]=e.y,t[i+5]=e.z};var Tipsify={calculateACMR:function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).indices,i=e.maximumIndex,r=defaultValue(e.cacheSize,24),n=t.length;if(!defined(i))for(var a=i=0,o=t[a];a<n;)i<o&&(i=o),o=t[++a];for(var s=[],l=0;l<i+1;l++)s[l]=0;for(var c=r+1,u=0;u<n;++u)c-s[t[u]]>r&&(s[t[u]]=c,++c);return(c-r+1)/(n/3)},tipsify:function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).indices,i=e.maximumIndex,r=defaultValue(e.cacheSize,24);function n(e,t,i,r,n,a,o){for(var s,l=-1,c=-1,u=0;u<i.length;){var d=i[u];r[d].numLiveTriangles&&(s=0,n-r[d].timeStamp+2*r[d].numLiveTriangles<=t&&(s=n-r[d].timeStamp),(c<s||-1===c)&&(c=s,l=d)),++u}return-1===l?function(e,t,i){for(;1<=t.length;){var r=t[t.length-1];if(t.splice(t.length-1,1),0<e[r].numLiveTriangles)return r}for(;y<i;){if(0<e[y].numLiveTriangles)return++y-1;++y}return-1}(r,a,o):l}e=t.length;var a=0,o=0,s=t[o],l=e;if(defined(i))a=i+1;else{for(;o<l;)a<s&&(a=s),s=t[++o];if(-1===a)return 0;++a}for(var c=[],u=0;u<a;u++)c[u]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};for(var d=o=0;o<l;)c[t[o]].vertexTriangles.push(d),++c[t[o]].numLiveTriangles,c[t[o+1]].vertexTriangles.push(d),++c[t[o+1]].numLiveTriangles,c[t[o+2]].vertexTriangles.push(d),++c[t[o+2]].numLiveTriangles,++d,o+=3;var h,p,f,m=0,g=r+1,y=1,_=[],v=[],C=0,x=[],b=e/3,S=[];for(u=0;u<b;u++)S[u]=!1;for(;-1!==m;){_=[],f=(h=c[m]).vertexTriangles.length;for(var T=0;T<f;++T)if(!S[d=h.vertexTriangles[T]]){S[d]=!0,o=d+d+d;for(var E=0;E<3;++E)p=t[o],_.push(p),v.push(p),x[C]=p,++C,--(p=c[p]).numLiveTriangles,g-p.timeStamp>r&&(p.timeStamp=g,++g),++o}m=n(0,r,_,c,g,v,a)}return x}},GeometryPipeline={};function addTriangle(e,t,i,r,n){e[t++]=i,e[t++]=r,e[t++]=r,e[t++]=n,e[t++]=n,e[t]=i}function trianglesToLines(e){for(var t=e.length,i=t/3*6,r=IndexDatatype$1.createTypedArray(t,i),n=0,a=0;a<t;a+=3,n+=6)addTriangle(r,n,e[a],e[a+1],e[a+2]);return r}function triangleStripToLines(e){var t=e.length;if(3<=t){var i=6*(t-2),r=IndexDatatype$1.createTypedArray(t,i);addTriangle(r,0,e[0],e[1],e[2]);for(var n=6,a=3;a<t;++a,n+=6)addTriangle(r,n,e[a-1],e[a],e[a-2]);return r}return new Uint16Array}function triangleFanToLines(e){if(0<e.length){for(var t=e.length-1,i=6*(t-1),r=IndexDatatype$1.createTypedArray(t,i),n=e[0],a=0,o=1;o<t;++o,a+=6)addTriangle(r,a,n,e[o],e[o+1]);return r}return new Uint16Array}function copyAttributesDescriptions(e){var t,i,r={};for(t in e)e.hasOwnProperty(t)&&defined(e[t])&&defined(e[t].values)&&(i=e[t],r[t]=new GeometryAttribute({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]}));return r}function copyVertex(e,t,i){for(var r in t)if(t.hasOwnProperty(r)&&defined(t[r])&&defined(t[r].values))for(var n=t[r],a=0;a<n.componentsPerAttribute;++a)e[r].values.push(n.values[i*n.componentsPerAttribute+a])}GeometryPipeline.toWireframe=function(e){var t=e.indices;if(defined(t)){switch(e.primitiveType){case PrimitiveType$1.TRIANGLES:e.indices=trianglesToLines(t);break;case PrimitiveType$1.TRIANGLE_STRIP:e.indices=triangleStripToLines(t);break;case PrimitiveType$1.TRIANGLE_FAN:e.indices=triangleFanToLines(t)}e.primitiveType=PrimitiveType$1.LINES}return e},GeometryPipeline.createLineSegmentsForVectors=function(e,t,i){t=defaultValue(t,"normal"),i=defaultValue(i,1e4);for(var r,n=e.attributes.position.values,a=e.attributes[t].values,o=n.length,s=new Float64Array(2*o),l=0,c=0;c<o;c+=3)s[l++]=n[c],s[l++]=n[c+1],s[l++]=n[c+2],s[l++]=n[c]+a[c]*i,s[l++]=n[c+1]+a[c+1]*i,s[l++]=n[c+2]+a[c+2]*i;return defined(e=e.boundingSphere)&&(r=new BoundingSphere(e.center,e.radius+i)),new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:PrimitiveType$1.LINES,boundingSphere:r})},GeometryPipeline.createAttributeLocations=function(e){for(var t,i=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],r=e.attributes,n={},a=0,o=i.length,s=0;s<o;++s){var l=i[s];defined(r[l])&&(n[l]=a++)}for(t in r)r.hasOwnProperty(t)&&!defined(n[t])&&(n[t]=a++);return n},GeometryPipeline.reorderForPreVertexCache=function(e){var t=Geometry.computeNumberOfVertices(e),i=e.indices;if(defined(i)){for(var r=new Int32Array(t),n=0;n<t;n++)r[n]=-1;for(var a,o=i,s=o.length,l=IndexDatatype$1.createTypedArray(t,s),c=0,u=0,d=0;c<s;)-1!==(a=r[o[c]])?l[u]=a:(r[a=o[c]]=d,l[u]=d,++d),++c,++u;e.indices=l;var h,p=e.attributes;for(h in p)if(p.hasOwnProperty(h)&&defined(p[h])&&defined(p[h].values)){for(var f=p[h],m=f.values,g=0,y=f.componentsPerAttribute,_=ComponentDatatype$1.createTypedArray(f.componentDatatype,d*y);g<t;){var v=r[g];if(-1!==v)for(var C=0;C<y;C++)_[y*v+C]=m[y*g+C];++g}f.values=_}}return e},GeometryPipeline.reorderForPostVertexCache=function(e,t){var i=e.indices;if(e.primitiveType===PrimitiveType$1.TRIANGLES&&defined(i)){for(var r=i.length,n=0,a=0;a<r;a++)i[a]>n&&(n=i[a]);e.indices=Tipsify.tipsify({indices:i,maximumIndex:n,cacheSize:t})}return e},GeometryPipeline.fitToUnsignedShortIndices=function(e){var t=[],i=Geometry.computeNumberOfVertices(e);if(defined(e.indices)&&i>=CesiumMath.SIXTY_FOUR_KILOBYTES){var r,n=[],a=[],o=0,s=copyAttributesDescriptions(e.attributes),l=e.indices,c=l.length;e.primitiveType===PrimitiveType$1.TRIANGLES?r=3:e.primitiveType===PrimitiveType$1.LINES?r=2:e.primitiveType===PrimitiveType$1.POINTS&&(r=1);for(var u=0;u<c;u+=r){for(var d=0;d<r;++d){var h=l[u+d],p=n[h];defined(p)||(p=o++,n[h]=p,copyVertex(s,e.attributes,h)),a.push(p)}o+r>=CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new Geometry({attributes:s,indices:a,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),n=[],a=[],o=0,s=copyAttributesDescriptions(e.attributes))}0!==a.length&&t.push(new Geometry({attributes:s,indices:a,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var scratchProjectTo2DCartesian3=new Cartesian3,scratchProjectTo2DCartographic=new Cartographic;GeometryPipeline.projectTo2D=function(e,t,i,r,n){for(var a=e.attributes[t],o=(n=defined(n)?n:new GeographicProjection).ellipsoid,s=a.values,l=new Float64Array(s.length),c=0,u=0;u<s.length;u+=3){var d=Cartesian3.fromArray(s,u,scratchProjectTo2DCartesian3);d=o.cartesianToCartographic(d,scratchProjectTo2DCartographic),d=n.project(d,scratchProjectTo2DCartesian3);l[c++]=d.x,l[c++]=d.y,l[c++]=d.z}return e.attributes[i]=a,e.attributes[r]=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l}),delete e.attributes[t],e};var encodedResult={high:0,low:0};GeometryPipeline.encodeAttribute=function(e,t,i,r){for(var n=e.attributes[t],a=n.values,o=a.length,s=new Float32Array(o),l=new Float32Array(o),c=0;c<o;++c)EncodedCartesian3.encode(a[c],encodedResult),s[c]=encodedResult.high,l[c]=encodedResult.low;return n=n.componentsPerAttribute,e.attributes[i]=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:n,values:s}),e.attributes[r]=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:n,values:l}),delete e.attributes[t],e};var scratchCartesian3$4=new Cartesian3;function transformPoint(e,t){if(defined(t))for(var i=t.values,r=i.length,n=0;n<r;n+=3)Cartesian3.unpack(i,n,scratchCartesian3$4),Matrix4.multiplyByPoint(e,scratchCartesian3$4,scratchCartesian3$4),Cartesian3.pack(scratchCartesian3$4,i,n)}function transformVector(e,t){if(defined(t))for(var i=t.values,r=i.length,n=0;n<r;n+=3)Cartesian3.unpack(i,n,scratchCartesian3$4),Matrix3.multiplyByVector(e,scratchCartesian3$4,scratchCartesian3$4),scratchCartesian3$4=Cartesian3.normalize(scratchCartesian3$4,scratchCartesian3$4),Cartesian3.pack(scratchCartesian3$4,i,n)}var inverseTranspose=new Matrix4,normalMatrix=new Matrix3;function findAttributesInAllGeometries(e,t){var i,r=e.length,n={},a=e[0][t].attributes;for(i in a)if(a.hasOwnProperty(i)&&defined(a[i])&&defined(a[i].values)){for(var o=a[i],s=o.values.length,l=!0,c=1;c<r;++c){var u=e[c][t].attributes[i];if(!defined(u)||o.componentDatatype!==u.componentDatatype||o.componentsPerAttribute!==u.componentsPerAttribute||o.normalize!==u.normalize){l=!1;break}s+=u.values.length}l&&(n[i]=new GeometryAttribute({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:ComponentDatatype$1.createTypedArray(o.componentDatatype,s)}))}return n}GeometryPipeline.transformToWorldCoordinates=function(e){var t=e.modelMatrix;if(Matrix4.equals(t,Matrix4.IDENTITY))return e;var i=e.geometry.attributes;return transformPoint(t,i.position),transformPoint(t,i.prevPosition),transformPoint(t,i.nextPosition),(defined(i.normal)||defined(i.tangent)||defined(i.bitangent))&&(Matrix4.inverse(t,inverseTranspose),Matrix4.transpose(inverseTranspose,inverseTranspose),Matrix4.getMatrix3(inverseTranspose,normalMatrix),transformVector(normalMatrix,i.normal),transformVector(normalMatrix,i.tangent),transformVector(normalMatrix,i.bitangent)),defined(i=e.geometry.boundingSphere)&&(e.geometry.boundingSphere=BoundingSphere.transform(i,t,i)),e.modelMatrix=Matrix4.clone(Matrix4.IDENTITY),e};var tempScratch=new Cartesian3;function combineGeometries(e,t){var i,r,n,a,o,s=e.length,l=(e[0].modelMatrix,defined(e[0][t].indices)),c=e[0][t].primitiveType,u=findAttributesInAllGeometries(e,t);for(i in u)if(u.hasOwnProperty(i))for(n=u[i].values,h=v=0;h<s;++h)for(o=(a=e[h][t].attributes[i].values).length,r=0;r<o;++r)n[v++]=a[r];if(l){for(var d=0,h=0;h<s;++h)d+=e[h][t].indices.length;var p=Geometry.computeNumberOfVertices(new Geometry({attributes:u,primitiveType:PrimitiveType$1.POINTS})),f=IndexDatatype$1.createTypedArray(p,d),m=0,g=0;for(h=0;h<s;++h){for(var y=e[h][t].indices,_=y.length,v=0;v<_;++v)f[m++]=g+y[v];g+=Geometry.computeNumberOfVertices(e[h][t])}p=f}var C,x=new Cartesian3,b=0;for(h=0;h<s;++h){if(!defined(C=e[h][t].boundingSphere)){x=void 0;break}Cartesian3.add(C.center,x,x)}if(defined(x))for(Cartesian3.divideByScalar(x,s,x),h=0;h<s;++h){C=e[h][t].boundingSphere;var S=Cartesian3.magnitude(Cartesian3.subtract(C.center,x,tempScratch))+C.radius;b<S&&(b=S)}return new Geometry({attributes:u,indices:p,primitiveType:c,boundingSphere:defined(x)?new BoundingSphere(x,b):void 0})}GeometryPipeline.combineInstances=function(e){for(var t=[],i=[],r=e.length,n=0;n<r;++n){var a=e[n];defined(a.geometry)?t.push(a):defined(a.westHemisphereGeometry)&&defined(a.eastHemisphereGeometry)&&i.push(a)}var o=[];return 0<t.length&&o.push(combineGeometries(t,"geometry")),0<i.length&&(o.push(combineGeometries(i,"westHemisphereGeometry")),o.push(combineGeometries(i,"eastHemisphereGeometry"))),o};var normal=new Cartesian3,v0=new Cartesian3,v1=new Cartesian3,v2=new Cartesian3;GeometryPipeline.computeNormal=function(e){for(var t=e.indices,i=e.attributes,r=i.position.values,n=i.position.values.length/3,a=t.length,o=new Array(n),s=new Array(a/3),l=new Array(a),c=0;c<n;c++)o[c]={indexOffset:0,count:0,currentCount:0};var u=0;for(c=0;c<a;c+=3){var d=t[c],h=t[c+1],p=t[c+2],f=3*d,m=3*h,g=3*p;v0.x=r[f],v0.y=r[1+f],v0.z=r[2+f],v1.x=r[m],v1.y=r[1+m],v1.z=r[2+m],v2.x=r[g],v2.y=r[1+g],v2.z=r[2+g],o[d].count++,o[h].count++,o[p].count++,Cartesian3.subtract(v1,v0,v1),Cartesian3.subtract(v2,v0,v2),s[u]=Cartesian3.cross(v1,v2,new Cartesian3),u++}var y=0;for(c=0;c<n;c++)o[c].indexOffset+=y,y+=o[c].count;for(c=u=0;c<a;c+=3){l[(C=o[t[c]]).indexOffset+C.currentCount]=u,C.currentCount++,l[(C=o[t[c+1]]).indexOffset+C.currentCount]=u,C.currentCount++,l[(C=o[t[c+2]]).indexOffset+C.currentCount]=u,C.currentCount++,u++}var _=new Float32Array(3*n);for(c=0;c<n;c++){var v=3*c,C=o[c];if(Cartesian3.clone(Cartesian3.ZERO,normal),0<C.count){for(u=0;u<C.count;u++)Cartesian3.add(normal,s[l[C.indexOffset+u]],normal);Cartesian3.equalsEpsilon(Cartesian3.ZERO,normal,CesiumMath.EPSILON10)&&Cartesian3.clone(s[l[C.indexOffset]],normal)}Cartesian3.equalsEpsilon(Cartesian3.ZERO,normal,CesiumMath.EPSILON10)&&(normal.z=1),Cartesian3.normalize(normal,normal),_[v]=normal.x,_[1+v]=normal.y,_[2+v]=normal.z}return e.attributes.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:_}),e};var normalScratch$1=new Cartesian3,normalScale=new Cartesian3,tScratch=new Cartesian3;GeometryPipeline.computeTangentAndBitangent=function(e){e.attributes;for(var t=e.indices,i=e.attributes.position.values,r=e.attributes.normal.values,n=e.attributes.st.values,a=e.attributes.position.values.length/3,o=t.length,s=new Array(3*a),l=0;l<s.length;l++)s[l]=0;for(l=0;l<o;l+=3){var c,u=t[l],d=3*(_=t[l+1]),h=3*(v=t[l+2]),p=2*u,f=2*_,m=2*v,g=i[c=3*u],y=i[c+1],_=i[c+2],v=n[p];u=n[1+p],p=n[1+f]-u,u=n[1+m]-u,v=1/((n[f]-v)*u-(n[m]-v)*p),g=(u*(i[d]-g)-p*(i[h]-g))*v,y=(u*(i[d+1]-y)-p*(i[h+1]-y))*v,v=(u*(i[d+2]-_)-p*(i[h+2]-_))*v;s[c]+=g,s[c+1]+=y,s[c+2]+=v,s[d]+=g,s[d+1]+=y,s[d+2]+=v,s[h]+=g,s[h+1]+=y,s[h+2]+=v}var C=new Float32Array(3*a),x=new Float32Array(3*a);for(l=0;l<a;l++){d=1+(c=3*l),h=c+2;var b=Cartesian3.fromArray(r,c,normalScratch$1),S=Cartesian3.fromArray(s,c,tScratch),T=Cartesian3.dot(b,S);Cartesian3.multiplyByScalar(b,T,normalScale),Cartesian3.normalize(Cartesian3.subtract(S,normalScale,S),S),C[c]=S.x,C[d]=S.y,C[h]=S.z,Cartesian3.normalize(Cartesian3.cross(b,S,S),S),x[c]=S.x,x[d]=S.y,x[h]=S.z}return e.attributes.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:C}),e.attributes.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:x}),e};var scratchCartesian2$3=new Cartesian2,toEncode1=new Cartesian3,toEncode2=new Cartesian3,toEncode3=new Cartesian3,encodeResult2=new Cartesian2;function indexTriangles(e){if(defined(e.indices))return e;for(var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,t),r=0;r<t;++r)i[r]=r;return e.indices=i,e}function indexTriangleFan(e){var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,3*(t-2));i[0]=1,i[1]=0,i[2]=2;for(var r=3,n=3;n<t;++n)i[r++]=n-1,i[r++]=0,i[r++]=n;return e.indices=i,e.primitiveType=PrimitiveType$1.TRIANGLES,e}function indexTriangleStrip(e){var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,3*(t-2));i[0]=0,i[1]=1,i[2]=2,3<t&&(i[3]=0,i[4]=2,i[5]=3);for(var r=6,n=3;n<t-1;n+=2)i[r++]=n,i[r++]=n-1,i[r++]=n+1,n+2<t&&(i[r++]=n,i[r++]=n+1,i[r++]=n+2);return e.indices=i,e.primitiveType=PrimitiveType$1.TRIANGLES,e}function indexLines(e){if(defined(e.indices))return e;for(var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,t),r=0;r<t;++r)i[r]=r;return e.indices=i,e}function indexLineStrip(e){var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,2*(t-1));i[0]=0,i[1]=1;for(var r=2,n=2;n<t;++n)i[r++]=n-1,i[r++]=n;return e.indices=i,e.primitiveType=PrimitiveType$1.LINES,e}function indexLineLoop(e){var t=Geometry.computeNumberOfVertices(e),i=IndexDatatype$1.createTypedArray(t,2*t);i[0]=0,i[1]=1;for(var r=2,n=2;n<t;++n)i[r++]=n-1,i[r++]=n;return i[r++]=t-1,i[r]=0,e.indices=i,e.primitiveType=PrimitiveType$1.LINES,e}function indexPrimitive(e){switch(e.primitiveType){case PrimitiveType$1.TRIANGLE_FAN:return indexTriangleFan(e);case PrimitiveType$1.TRIANGLE_STRIP:return indexTriangleStrip(e);case PrimitiveType$1.TRIANGLES:return indexTriangles(e);case PrimitiveType$1.LINE_STRIP:return indexLineStrip(e);case PrimitiveType$1.LINE_LOOP:return indexLineLoop(e);case PrimitiveType$1.LINES:return indexLines(e)}return e}function offsetPointFromXZPlane(e,t){Math.abs(e.y)<CesiumMath.EPSILON6&&(e.y=t?-CesiumMath.EPSILON6:CesiumMath.EPSILON6)}function offsetTriangleFromXZPlane(e,t,i){if(0!==e.y&&0!==t.y&&0!==i.y)return offsetPointFromXZPlane(e,e.y<0),offsetPointFromXZPlane(t,t.y<0),void offsetPointFromXZPlane(i,i.y<0);var r=Math.abs(e.y),n=Math.abs(t.y),a=Math.abs(i.y);offsetPointFromXZPlane(e,n=(n=n<r?a<r?CesiumMath.sign(e.y):CesiumMath.sign(i.y):a<n?CesiumMath.sign(t.y):CesiumMath.sign(i.y))<0),offsetPointFromXZPlane(t,n),offsetPointFromXZPlane(i,n)}GeometryPipeline.compressVertices=function(e){if(defined(m=e.attributes.extrudeDirection)){for(var t=m.values,i=t.length/3,r=new Float32Array(2*i),n=0,a=0;a<i;++a)Cartesian3.fromArray(t,3*a,toEncode1),Cartesian3.equals(toEncode1,Cartesian3.ZERO)?n+=2:(encodeResult2=AttributeCompression.octEncodeInRange(toEncode1,65535,encodeResult2),r[n++]=encodeResult2.x,r[n++]=encodeResult2.y);return e.attributes.compressedAttributes=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:r}),delete e.attributes.extrudeDirection,e}var o=e.attributes.normal,s=e.attributes.st,l=defined(o),c=defined(s);if(!l&&!c)return e;var u,d,h,p,f=e.attributes.tangent,m=e.attributes.bitangent,g=defined(f),y=defined(m);l&&(u=o.values),c&&(d=s.values),g&&(h=f.values),y&&(p=m.values),f=i=(l?u:d).length/(l?3:2),m=c&&l?2:1,f*=m+=g||y?1:0;var _=new Float32Array(f),v=0;for(a=0;a<i;++a){c&&(Cartesian2.fromArray(d,2*a,scratchCartesian2$3),_[v++]=AttributeCompression.compressTextureCoordinates(scratchCartesian2$3));var C=3*a;l&&defined(h)&&defined(p)?(Cartesian3.fromArray(u,C,toEncode1),Cartesian3.fromArray(h,C,toEncode2),Cartesian3.fromArray(p,C,toEncode3),AttributeCompression.octPack(toEncode1,toEncode2,toEncode3,scratchCartesian2$3),_[v++]=scratchCartesian2$3.x,_[v++]=scratchCartesian2$3.y):(l&&(Cartesian3.fromArray(u,C,toEncode1),_[v++]=AttributeCompression.octEncodeFloat(toEncode1)),g&&(Cartesian3.fromArray(h,C,toEncode1),_[v++]=AttributeCompression.octEncodeFloat(toEncode1)),y&&(Cartesian3.fromArray(p,C,toEncode1),_[v++]=AttributeCompression.octEncodeFloat(toEncode1)))}return e.attributes.compressedAttributes=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:m,values:_}),l&&delete e.attributes.normal,c&&delete e.attributes.st,y&&delete e.attributes.bitangent,g&&delete e.attributes.tangent,e};var c3=new Cartesian3;function getXZIntersectionOffsetPoints(e,t,i,r){Cartesian3.add(e,Cartesian3.multiplyByScalar(Cartesian3.subtract(t,e,c3),e.y/(e.y-t.y),c3),i),Cartesian3.clone(i,r),offsetPointFromXZPlane(i,!0),offsetPointFromXZPlane(r,!1)}var u1=new Cartesian3,u2=new Cartesian3,q1=new Cartesian3,q2=new Cartesian3,splitTriangleResult={positions:new Array(7),indices:new Array(9)};function splitTriangle(e,t,i){if(!(0<=e.x||0<=t.x||0<=i.x)){offsetTriangleFromXZPlane(e,t,i);var r=e.y<0,n=t.y<0,a=i.y<0,o=0;o+=r?1:0,o+=n?1:0,o+=a?1:0;var s=splitTriangleResult.indices;return 1==o?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,r?(getXZIntersectionOffsetPoints(e,t,u1,q1),getXZIntersectionOffsetPoints(e,i,u2,q2),s[0]=0,s[3]=1,s[4]=2,s[6]=1):n?(getXZIntersectionOffsetPoints(t,i,u1,q1),getXZIntersectionOffsetPoints(t,e,u2,q2),s[0]=1,s[3]=2,s[4]=0,s[6]=2):a&&(getXZIntersectionOffsetPoints(i,e,u1,q1),getXZIntersectionOffsetPoints(i,t,u2,q2),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2==o&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,r?n?a||(getXZIntersectionOffsetPoints(i,e,u1,q1),getXZIntersectionOffsetPoints(i,t,u2,q2),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(getXZIntersectionOffsetPoints(t,i,u1,q1),getXZIntersectionOffsetPoints(t,e,u2,q2),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(getXZIntersectionOffsetPoints(e,t,u1,q1),getXZIntersectionOffsetPoints(e,i,u2,q2),s[0]=1,s[1]=2,s[3]=1,s[6]=0)),(s=splitTriangleResult.positions)[0]=e,s[1]=t,s[2]=i,s.length=3,1!=o&&2!=o||(s[3]=u1,s[4]=u2,s[5]=q1,s[6]=q2,s.length=7),splitTriangleResult}}function updateGeometryAfterSplit(e,t){var i,r=e.attributes;if(0!==r.position.values.length){for(var n in r)r.hasOwnProperty(n)&&defined(r[n])&&defined(r[n].values)&&((i=r[n]).values=ComponentDatatype$1.createTypedArray(i.componentDatatype,i.values));var a=Geometry.computeNumberOfVertices(e);return e.indices=IndexDatatype$1.createTypedArray(a,e.indices),t&&(e.boundingSphere=BoundingSphere.fromVertices(r.position.values)),e}}function copyGeometryForSplit(e){var t,i,r=e.attributes,n={};for(t in r)r.hasOwnProperty(t)&&defined(r[t])&&defined(r[t].values)&&(i=r[t],n[t]=new GeometryAttribute({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]}));return new Geometry({attributes:n,indices:[],primitiveType:e.primitiveType})}function updateInstanceAfterSplit(e,t,i){var r=defined(e.geometry.boundingSphere);t=updateGeometryAfterSplit(t,r),defined(i=updateGeometryAfterSplit(i,r))&&!defined(t)?e.geometry=i:!defined(i)&&defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function generateBarycentricInterpolateFunction(e,t){var i=new e,r=new e,n=new e;return function(a,o,s,l,c,u,d,h){a=e.fromArray(c,a*t,i),o=e.fromArray(c,o*t,r),s=e.fromArray(c,s*t,n),e.multiplyByScalar(a,l.x,a),e.multiplyByScalar(o,l.y,o),e.multiplyByScalar(s,l.z,s),a=e.add(a,o,a),e.add(a,s,a),h&&e.normalize(a,a),e.pack(a,u,d*t)}}var interpolateAndPackCartesian4=generateBarycentricInterpolateFunction(Cartesian4,4),interpolateAndPackCartesian3=generateBarycentricInterpolateFunction(Cartesian3,3),interpolateAndPackCartesian2=generateBarycentricInterpolateFunction(Cartesian2,2),interpolateAndPackBoolean=function(e,t,i,r,n,a,o){e=n[e]*r.x,t=n[t]*r.y,r=n[i]*r.z,a[o]=e+t+r>CesiumMath.EPSILON6?1:0},p0Scratch=new Cartesian3,p1Scratch=new Cartesian3,p2Scratch=new Cartesian3,barycentricScratch=new Cartesian3;function computeTriangleAttributes(e,t,i,r,n,a,o,s,l,c,u,d,h,p,f,m){if(defined(a)||defined(o)||defined(s)||defined(l)||defined(c)||0!==p){var g,y=barycentricCoordinates(r,Cartesian3.fromArray(n,3*e,p0Scratch),Cartesian3.fromArray(n,3*t,p1Scratch),Cartesian3.fromArray(n,3*i,p2Scratch),barycentricScratch);if(defined(a)&&interpolateAndPackCartesian3(e,t,i,y,a,d.normal.values,m,!0),defined(c)&&(n=Cartesian3.fromArray(c,3*e,p0Scratch),a=Cartesian3.fromArray(c,3*t,p1Scratch),c=Cartesian3.fromArray(c,3*i,p2Scratch),Cartesian3.multiplyByScalar(n,y.x,n),Cartesian3.multiplyByScalar(a,y.y,a),Cartesian3.multiplyByScalar(c,y.z,c),Cartesian3.equals(n,Cartesian3.ZERO)&&Cartesian3.equals(a,Cartesian3.ZERO)&&Cartesian3.equals(c,Cartesian3.ZERO)?((g=p0Scratch).x=0,g.y=0,g.z=0):(g=Cartesian3.add(n,a,n),Cartesian3.add(g,c,g),Cartesian3.normalize(g,g)),Cartesian3.pack(g,d.extrudeDirection.values,3*m)),defined(u)&&interpolateAndPackBoolean(e,t,i,y,u,d.applyOffset.values,m),defined(o)&&interpolateAndPackCartesian3(e,t,i,y,o,d.tangent.values,m,!0),defined(s)&&interpolateAndPackCartesian3(e,t,i,y,s,d.bitangent.values,m,!0),defined(l)&&interpolateAndPackCartesian2(e,t,i,y,l,d.st.values,m),0<p)for(var _=0;_<p;_++){var v=h[_];genericInterpolate(e,t,i,y,m,f[v],d[v])}}}function genericInterpolate(e,t,i,r,n,a,o){var s=a.componentsPerAttribute;a=a.values,o=o.values;switch(s){case 4:interpolateAndPackCartesian4(e,t,i,r,a,o,n,!1);break;case 3:interpolateAndPackCartesian3(e,t,i,r,a,o,n,!1);break;case 2:interpolateAndPackCartesian2(e,t,i,r,a,o,n,!1);break;default:o[n]=a[e]*r.x+a[t]*r.y+a[i]*r.z}}function insertSplitPoint(e,t,i,r,n,a){var o=e.position.values.length/3;return-1===n?(e.position.values.push(a.x,a.y,a.z),t.push(o),o):-1===(n=i[r=r[n]])?(i[r]=o,e.position.values.push(a.x,a.y,a.z),t.push(o),o):(t.push(n),n)}var NAMED_ATTRIBUTES={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function splitLongitudeTriangles(e){var t,i=e.geometry,r=i.attributes,n=r.position.values,a=defined(r.normal)?r.normal.values:void 0,o=defined(r.bitangent)?r.bitangent.values:void 0,s=defined(r.tangent)?r.tangent.values:void 0,l=defined(r.st)?r.st.values:void 0,c=defined(r.extrudeDirection)?r.extrudeDirection.values:void 0,u=defined(r.applyOffset)?r.applyOffset.values:void 0,d=i.indices,h=[];for(t in r)r.hasOwnProperty(t)&&!NAMED_ATTRIBUTES[t]&&defined(r[t])&&h.push(t);var p,f,m=h.length,g=copyGeometryForSplit(i),y=copyGeometryForSplit(i),_=[];_.length=n.length/3;var v=[];for(v.length=n.length/3,x=0;x<_.length;++x)_[x]=-1,v[x]=-1;for(var C=d.length,x=0;x<C;x+=3){var b=d[x],S=d[x+1],T=d[x+2],E=Cartesian3.fromArray(n,3*b),w=Cartesian3.fromArray(n,3*S),A=Cartesian3.fromArray(n,3*T),P=splitTriangle(E,w,A);if(defined(P)&&3<P.positions.length)for(var D=P.positions,M=P.indices,I=M.length,R=0;R<I;++R){var O=M[R],L=D[O],N=L.y<0?(p=y.attributes,f=y.indices,_):(p=g.attributes,f=g.indices,v);computeTriangleAttributes(b,S,T,L,n,a,s,o,l,c,u,p,h,m,r,insertSplitPoint(p,f,N,d,O<3?x+O:-1,L))}else defined(P)&&(E=P.positions[0],w=P.positions[1],A=P.positions[2]),N=E.y<0?(p=y.attributes,f=y.indices,_):(p=g.attributes,f=g.indices,v),computeTriangleAttributes(b,S,T,E,n,a,s,o,l,c,u,p,h,m,r,insertSplitPoint(p,f,N,d,x,E)),computeTriangleAttributes(b,S,T,w,n,a,s,o,l,c,u,p,h,m,r,insertSplitPoint(p,f,N,d,x+1,w)),computeTriangleAttributes(b,S,T,A,n,a,s,o,l,c,u,p,h,m,r,insertSplitPoint(p,f,N,d,x+2,A))}updateInstanceAfterSplit(e,y,g)}var xzPlane=Plane.fromPointNormal(Cartesian3.ZERO,Cartesian3.UNIT_Y),offsetScratch=new Cartesian3,offsetPointScratch=new Cartesian3;function computeLineAttributes(e,t,i,r,n,a,o){defined(o)&&(r=Cartesian3.fromArray(r,3*e,p0Scratch),Cartesian3.equalsEpsilon(r,i,CesiumMath.EPSILON10)?a.applyOffset.values[n]=o[e]:a.applyOffset.values[n]=o[t])}function splitLongitudeLines(e){var t,i=e.geometry,r=i.attributes,n=r.position.values,a=defined(r.applyOffset)?r.applyOffset.values:void 0,o=i.indices,s=copyGeometryForSplit(i),l=copyGeometryForSplit(i),c=o.length,u=[];u.length=n.length/3;var d=[];for(d.length=n.length/3,t=0;t<u.length;++t)u[t]=-1,d[t]=-1;for(t=0;t<c;t+=2){var h=o[t],p=o[t+1],f=Cartesian3.fromArray(n,3*h,p0Scratch),m=Cartesian3.fromArray(n,3*p,p1Scratch);Math.abs(f.y)<CesiumMath.EPSILON6&&(f.y<0?f.y=-CesiumMath.EPSILON6:f.y=CesiumMath.EPSILON6),Math.abs(m.y)<CesiumMath.EPSILON6&&(m.y<0?m.y=-CesiumMath.EPSILON6:m.y=CesiumMath.EPSILON6);var g,y,_,v,C=s.attributes,x=s.indices,b=d,S=l.attributes,T=l.indices,E=u,w=IntersectionTests.lineSegmentPlane(f,m,xzPlane,p2Scratch);defined(w)?(g=Cartesian3.multiplyByScalar(Cartesian3.UNIT_Y,5*CesiumMath.EPSILON9,offsetScratch),f.y<0&&(Cartesian3.negate(g,g),C=l.attributes,x=l.indices,b=u,S=s.attributes,T=s.indices,E=d),y=Cartesian3.add(w,g,offsetPointScratch),computeLineAttributes(h,p,f,n,insertSplitPoint(C,x,b,o,t,f),C,a),computeLineAttributes(h,p,y,n,insertSplitPoint(C,x,b,o,-1,y),C,a),Cartesian3.negate(g,g),Cartesian3.add(w,g,y),computeLineAttributes(h,p,y,n,insertSplitPoint(S,T,E,o,-1,y),S,a),computeLineAttributes(h,p,m,n,insertSplitPoint(S,T,E,o,t+1,m),S,a)):(S=f.y<0?(_=l.attributes,v=l.indices,u):(_=s.attributes,v=s.indices,d),computeLineAttributes(h,p,f,n,insertSplitPoint(_,v,S,o,t,f),_,a),computeLineAttributes(h,p,m,n,insertSplitPoint(_,v,S,o,t+1,m),_,a))}updateInstanceAfterSplit(e,l,s)}var cartesian2Scratch0=new Cartesian2,cartesian2Scratch1=new Cartesian2,cartesian3Scratch0=new Cartesian3,cartesian3Scratch2=new Cartesian3,cartesian3Scratch3=new Cartesian3,cartesian3Scratch4=new Cartesian3,cartesian3Scratch5=new Cartesian3,cartesian3Scratch6=new Cartesian3,cartesian4Scratch0=new Cartesian4;function updateAdjacencyAfterSplit(e){for(var t=(e=e.attributes).position.values,i=e.prevPosition.values,r=e.nextPosition.values,n=t.length,a=0;a<n;a+=3){var o,s=Cartesian3.unpack(t,a,cartesian3Scratch0);0<s.x||(o=Cartesian3.unpack(i,a,cartesian3Scratch2),(s.y<0&&0<o.y||0<s.y&&o.y<0)&&(0<a-3?(i[a]=t[a-3],i[a+1]=t[a-2],i[a+2]=t[a-1]):Cartesian3.pack(s,i,a)),o=Cartesian3.unpack(r,a,cartesian3Scratch3),(s.y<0&&0<o.y||0<s.y&&o.y<0)&&(a+3<n?(r[a]=t[a+3],r[a+1]=t[a+4],r[a+2]=t[a+5]):Cartesian3.pack(s,r,a)))}}var offsetScalar=5*CesiumMath.EPSILON9,coplanarOffset=CesiumMath.EPSILON6;function splitLongitudePolyline(e){for(var t=e.geometry,i=t.attributes,r=i.position.values,n=i.prevPosition.values,a=i.nextPosition.values,o=i.expandAndWidth.values,s=defined(i.st)?i.st.values:void 0,l=defined(i.color)?i.color.values:void 0,c=copyGeometryForSplit(t),u=copyGeometryForSplit(t),d=!1,h=r.length/3,p=0;p<h;p+=4){var f=p,m=p+2,g=Cartesian3.fromArray(r,3*f,cartesian3Scratch0),y=Cartesian3.fromArray(r,3*m,cartesian3Scratch2);if(Math.abs(g.y)<coplanarOffset)for(g.y=coplanarOffset*(y.y<0?-1:1),r[3*p+1]=g.y,r[3*(p+1)+1]=g.y,P=3*f;P<3*f+12;P+=3)n[P]=r[3*p],n[P+1]=r[3*p+1],n[P+2]=r[3*p+2];if(Math.abs(y.y)<coplanarOffset)for(y.y=coplanarOffset*(g.y<0?-1:1),r[3*(p+2)+1]=y.y,r[3*(p+3)+1]=y.y,P=3*f;P<3*f+12;P+=3)a[P]=r[3*(p+2)],a[P+1]=r[3*(p+2)+1],a[P+2]=r[3*(p+2)+2];var _=c.attributes,v=c.indices,C=u.attributes,x=u.indices;if(defined(A=IntersectionTests.lineSegmentPlane(g,y,xzPlane,cartesian3Scratch4))){d=!0;var b=Cartesian3.multiplyByScalar(Cartesian3.UNIT_Y,offsetScalar,cartesian3Scratch5);g.y<0&&(Cartesian3.negate(b,b),_=u.attributes,v=u.indices,C=c.attributes,x=c.indices);var S=Cartesian3.add(A,b,cartesian3Scratch6);_.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),_.position.values.push(S.x,S.y,S.z),_.position.values.push(S.x,S.y,S.z),_.prevPosition.values.push(n[3*f],n[3*f+1],n[3*f+2]),_.prevPosition.values.push(n[3*f+3],n[3*f+4],n[3*f+5]),_.prevPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),_.nextPosition.values.push(S.x,S.y,S.z),_.nextPosition.values.push(S.x,S.y,S.z),_.nextPosition.values.push(S.x,S.y,S.z),_.nextPosition.values.push(S.x,S.y,S.z),Cartesian3.negate(b,b),Cartesian3.add(A,b,S),C.position.values.push(S.x,S.y,S.z),C.position.values.push(S.x,S.y,S.z),C.position.values.push(y.x,y.y,y.z,y.x,y.y,y.z),C.prevPosition.values.push(S.x,S.y,S.z),C.prevPosition.values.push(S.x,S.y,S.z),C.prevPosition.values.push(S.x,S.y,S.z),C.prevPosition.values.push(S.x,S.y,S.z),C.nextPosition.values.push(y.x,y.y,y.z,y.x,y.y,y.z),C.nextPosition.values.push(a[3*m],a[3*m+1],a[3*m+2]),C.nextPosition.values.push(a[3*m+3],a[3*m+4],a[3*m+5]);var T=Cartesian2.fromArray(o,2*f,cartesian2Scratch0),E=Math.abs(T.y);if(_.expandAndWidth.values.push(-1,E,1,E),_.expandAndWidth.values.push(-1,-E,1,-E),C.expandAndWidth.values.push(-1,E,1,E),C.expandAndWidth.values.push(-1,-E,1,-E),b=Cartesian3.magnitudeSquared(Cartesian3.subtract(A,g,cartesian3Scratch3)),b/=Cartesian3.magnitudeSquared(Cartesian3.subtract(y,g,cartesian3Scratch3)),defined(l)){S=Cartesian4.fromArray(l,4*f,cartesian4Scratch0);for(var w=Cartesian4.fromArray(l,4*m,cartesian4Scratch0),A=(T=CesiumMath.lerp(S.x,w.x,b),E=CesiumMath.lerp(S.y,w.y,b),CesiumMath.lerp(S.z,w.z,b)),P=(w=CesiumMath.lerp(S.w,w.w,b),4*f);P<4*f+8;++P)_.color.values.push(l[P]);for(_.color.values.push(T,E,A,w),_.color.values.push(T,E,A,w),C.color.values.push(T,E,A,w),C.color.values.push(T,E,A,w),P=4*m;P<4*m+8;++P)C.color.values.push(l[P])}if(defined(s)){w=Cartesian2.fromArray(s,2*f,cartesian2Scratch0);var D=Cartesian2.fromArray(s,2*(p+3),cartesian2Scratch1);b=CesiumMath.lerp(w.x,D.x,b);for(P=2*f;P<2*f+4;++P)_.st.values.push(s[P]);for(_.st.values.push(b,w.y),_.st.values.push(b,D.y),C.st.values.push(b,w.y),C.st.values.push(b,D.y),P=2*m;P<2*m+4;++P)C.st.values.push(s[P])}D=_.position.values.length/3-4,v.push(D,D+2,D+1),v.push(D+1,D+2,D+3),D=C.position.values.length/3-4,x.push(D,D+2,D+1),x.push(D+1,D+2,D+3)}else{var M;x=g.y<0?(M=u.attributes,u.indices):(M=c.attributes,c.indices);for(M.position.values.push(g.x,g.y,g.z),M.position.values.push(g.x,g.y,g.z),M.position.values.push(y.x,y.y,y.z),M.position.values.push(y.x,y.y,y.z),P=3*p;P<3*p+12;++P)M.prevPosition.values.push(n[P]),M.nextPosition.values.push(a[P]);for(P=2*p;P<2*p+8;++P)M.expandAndWidth.values.push(o[P]),defined(s)&&M.st.values.push(s[P]);if(defined(l))for(P=4*p;P<4*p+16;++P)M.color.values.push(l[P]);D=M.position.values.length/3-4,x.push(D,D+2,D+1),x.push(D+1,D+2,D+3)}}d&&(updateAdjacencyAfterSplit(u),updateAdjacencyAfterSplit(c)),updateInstanceAfterSplit(e,u,c)}GeometryPipeline.splitLongitude=function(e){var t=e.geometry,i=t.boundingSphere;if(defined(i)&&(0<i.center.x-i.radius||BoundingSphere.intersectPlane(i,Plane.ORIGIN_ZX_PLANE)!==Intersect$1.INTERSECTING))return e;if(t.geometryType!==GeometryType$1.NONE)switch(t.geometryType){case GeometryType$1.POLYLINES:splitLongitudePolyline(e);break;case GeometryType$1.TRIANGLES:splitLongitudeTriangles(e);break;case GeometryType$1.LINES:splitLongitudeLines(e)}else indexPrimitive(t),t.primitiveType===PrimitiveType$1.TRIANGLES?splitLongitudeTriangles(e):t.primitiveType===PrimitiveType$1.LINES&&splitLongitudeLines(e);return e};var scratchCartesian1$3=new Cartesian3,scratchCartesian2$4=new Cartesian3,scratchCartesian3$5=new Cartesian3,scratchCartesian4$1=new Cartesian3,texCoordScratch=new Cartesian2,textureMatrixScratch=new Matrix3,tangentMatrixScratch=new Matrix3,quaternionScratch=new Quaternion,scratchNormal$2=new Cartesian3,scratchTangent=new Cartesian3,scratchBitangent=new Cartesian3,scratchCartographic$1=new Cartographic,projectedCenterScratch=new Cartesian3,scratchMinTexCoord=new Cartesian2,scratchMaxTexCoord=new Cartesian2;function computeTopBottomAttributes(e,t,i){var r=t.vertexFormat,n=t.center,a=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,c=i?e.length/3*2:e.length/3,u=t.shadowVolume,d=r.st?new Float32Array(2*c):void 0,h=r.normal?new Float32Array(3*c):void 0,p=r.tangent?new Float32Array(3*c):void 0,f=r.bitangent?new Float32Array(3*c):void 0,m=u?new Float32Array(3*c):void 0,g=0,y=scratchNormal$2,_=scratchTangent,v=scratchBitangent,C=new GeographicProjection(s),x=C.project(s.cartesianToCartographic(n,scratchCartographic$1),projectedCenterScratch);n=s.scaleToGeodeticSurface(n,scratchCartesian1$3);s.geodeticSurfaceNormal(n,n);var b=textureMatrixScratch,S=tangentMatrixScratch;S=0!==l?(F=Quaternion.fromAxisAngle(n,l,quaternionScratch),b=Matrix3.fromQuaternion(F,b),F=Quaternion.fromAxisAngle(n,-l,quaternionScratch),Matrix3.fromQuaternion(F,S)):(b=Matrix3.clone(Matrix3.IDENTITY,b),Matrix3.clone(Matrix3.IDENTITY,S));for(var T=Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,scratchMinTexCoord),E=Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,scratchMaxTexCoord),w=e.length,A=i?w:0,P=A/3*2,D=0;D<w;D+=3){var M,I=D+1,R=D+2,O=Cartesian3.fromArray(e,D,scratchCartesian1$3);r.st&&(M=Matrix3.multiplyByVector(b,O,scratchCartesian2$4),M=C.project(s.cartesianToCartographic(M,scratchCartographic$1),scratchCartesian3$5),Cartesian3.subtract(M,x,M),texCoordScratch.x=(M.x+a)/(2*a),texCoordScratch.y=(M.y+o)/(2*o),T.x=Math.min(texCoordScratch.x,T.x),T.y=Math.min(texCoordScratch.y,T.y),E.x=Math.max(texCoordScratch.x,E.x),E.y=Math.max(texCoordScratch.y,E.y),i&&(d[g+P]=texCoordScratch.x,d[g+1+P]=texCoordScratch.y),d[g++]=texCoordScratch.x,d[g++]=texCoordScratch.y),(r.normal||r.tangent||r.bitangent||u)&&(y=s.geodeticSurfaceNormal(O,y),u&&(m[D+A]=-y.x,m[I+A]=-y.y,m[R+A]=-y.z),(r.normal||r.tangent||r.bitangent)&&((r.tangent||r.bitangent)&&(_=Cartesian3.normalize(Cartesian3.cross(Cartesian3.UNIT_Z,y,_),_),Matrix3.multiplyByVector(S,_,_)),r.normal&&(h[D]=y.x,h[I]=y.y,h[R]=y.z,i&&(h[D+A]=-y.x,h[I+A]=-y.y,h[R+A]=-y.z)),r.tangent&&(p[D]=_.x,p[I]=_.y,p[R]=_.z,i&&(p[D+A]=-_.x,p[I+A]=-_.y,p[R+A]=-_.z)),r.bitangent&&(v=Cartesian3.normalize(Cartesian3.cross(y,_,v),v),f[D]=v.x,f[I]=v.y,f[R]=v.z,i&&(f[D+A]=v.x,f[I+A]=v.y,f[R+A]=v.z))))}if(r.st){w=d.length;for(var L=0;L<w;L+=2)d[L]=(d[L]-T.x)/(E.x-T.x),d[L+1]=(d[L+1]-T.y)/(E.y-T.y)}var N,F=new GeometryAttributes;return r.position&&(N=EllipseGeometryLibrary.raisePositionsToHeight(e,t,i),F.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:N})),r.st&&(F.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:d})),r.normal&&(F.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:h})),r.tangent&&(F.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:p})),r.bitangent&&(F.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:f})),u&&(F.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:m})),i&&defined(t.offsetAttribute)&&(N=new Uint8Array(c),N=t.offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(N,1,0,c/2):arrayFill(N,t.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),F.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})),F}function topIndices(e){for(var t,i,r=new Array(e*(e+1)*12-6),n=0,a=0,o=1,s=0;s<3;s++)r[n++]=o++,r[n++]=a,r[n++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,a=(s-1)*s-1,r[n++]=o++,r[n++]=a,r[n++]=o,t=2*s,i=0;i<t-1;++i)r[n++]=o,r[n++]=a++,r[n++]=a,r[n++]=o++,r[n++]=a,r[n++]=o;r[n++]=o++,r[n++]=a,r[n++]=o}for(t=2*e,++o,++a,s=0;s<t-1;++s)r[n++]=o,r[n++]=a++,r[n++]=a,r[n++]=o++,r[n++]=a,r[n++]=o;for(r[n++]=o,r[n++]=a++,r[n++]=a,r[n++]=o++,r[n++]=a++,r[n++]=a,++a,s=e-1;1<s;--s){for(r[n++]=a++,r[n++]=a,r[n++]=o,t=2*s,i=0;i<t-1;++i)r[n++]=o,r[n++]=a++,r[n++]=a,r[n++]=o++,r[n++]=a,r[n++]=o;r[n++]=a++,r[n++]=a++,r[n++]=o++}for(s=0;s<3;s++)r[n++]=a++,r[n++]=a,r[n++]=o;return r}var boundingSphereCenter=new Cartesian3;function computeEllipse(e){var t=e.center;boundingSphereCenter=Cartesian3.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,boundingSphereCenter),e.height,boundingSphereCenter);var i=new BoundingSphere(boundingSphereCenter=Cartesian3.add(t,boundingSphereCenter,boundingSphereCenter),e.semiMajorAxis),r=(t=(r=EllipseGeometryLibrary.computeEllipsePositions(e,!0,!1)).positions,r.numPts);e=computeTopBottomAttributes(t,e,!1),r=topIndices(r);return{boundingSphere:i,attributes:e,indices:r=IndexDatatype$1.createTypedArray(t.length/3,r)}}function computeWallAttributes(e,t){var i=t.vertexFormat,r=t.center,n=t.semiMajorAxis,a=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,c=t.stRotation,u=e.length/3*2,d=new Float64Array(3*u),h=i.st?new Float32Array(2*u):void 0,p=i.normal?new Float32Array(3*u):void 0,f=i.tangent?new Float32Array(3*u):void 0,m=i.bitangent?new Float32Array(3*u):void 0,g=t.shadowVolume,y=g?new Float32Array(3*u):void 0,_=0,v=scratchNormal$2,C=scratchTangent,x=scratchBitangent,b=new GeographicProjection(o),S=b.project(o.cartesianToCartographic(r,scratchCartographic$1),projectedCenterScratch);r=o.scaleToGeodeticSurface(r,scratchCartesian1$3);o.geodeticSurfaceNormal(r,r);r=Quaternion.fromAxisAngle(r,c,quaternionScratch);for(var T=Matrix3.fromQuaternion(r,textureMatrixScratch),E=Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,scratchMinTexCoord),w=Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,scratchMaxTexCoord),A=e.length,P=A/3*2,D=0;D<A;D+=3){var M=D+1,I=D+2,R=Cartesian3.fromArray(e,D,scratchCartesian1$3);i.st&&(L=Matrix3.multiplyByVector(T,R,scratchCartesian2$4),O=b.project(o.cartesianToCartographic(L,scratchCartographic$1),scratchCartesian3$5),Cartesian3.subtract(O,S,O),texCoordScratch.x=(O.x+n)/(2*n),texCoordScratch.y=(O.y+a)/(2*a),E.x=Math.min(texCoordScratch.x,E.x),E.y=Math.min(texCoordScratch.y,E.y),w.x=Math.max(texCoordScratch.x,w.x),w.y=Math.max(texCoordScratch.y,w.y),h[_+P]=texCoordScratch.x,h[_+1+P]=texCoordScratch.y,h[_++]=texCoordScratch.x,h[_++]=texCoordScratch.y),R=o.scaleToGeodeticSurface(R,R),L=Cartesian3.clone(R,scratchCartesian2$4),v=o.geodeticSurfaceNormal(R,v),g&&(y[D+A]=-v.x,y[M+A]=-v.y,y[I+A]=-v.z);var O=Cartesian3.multiplyByScalar(v,s,scratchCartesian4$1),L=(R=Cartesian3.add(R,O,R),O=Cartesian3.multiplyByScalar(v,l,O),Cartesian3.add(L,O,L));i.position&&(d[D+A]=L.x,d[M+A]=L.y,d[I+A]=L.z,d[D]=R.x,d[M]=R.y,d[I]=R.z),(i.normal||i.tangent||i.bitangent)&&(x=Cartesian3.clone(v,x),O=Cartesian3.fromArray(e,(D+3)%A,scratchCartesian4$1),Cartesian3.subtract(O,R,O),R=Cartesian3.subtract(L,R,scratchCartesian3$5),v=Cartesian3.normalize(Cartesian3.cross(R,O,v),v),i.normal&&(p[D]=v.x,p[M]=v.y,p[I]=v.z,p[D+A]=v.x,p[M+A]=v.y,p[I+A]=v.z),i.tangent&&(C=Cartesian3.normalize(Cartesian3.cross(x,v,C),C),f[D]=C.x,f[M]=C.y,f[I]=C.z,f[D+A]=C.x,f[D+1+A]=C.y,f[D+2+A]=C.z),i.bitangent&&(m[D]=x.x,m[M]=x.y,m[I]=x.z,m[D+A]=x.x,m[M+A]=x.y,m[I+A]=x.z))}if(i.st){A=h.length;for(var N=0;N<A;N+=2)h[N]=(h[N]-E.x)/(w.x-E.x),h[N+1]=(h[N+1]-E.y)/(w.y-E.y)}return c=new GeometryAttributes,i.position&&(c.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:d})),i.st&&(c.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:h})),i.normal&&(c.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(c.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:f})),i.bitangent&&(c.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:m})),g&&(c.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:y})),defined(t.offsetAttribute)&&(r=new Uint8Array(u),r=t.offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(r,1,0,u/2):arrayFill(r,t.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),c.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})),c}function computeWallIndices(e){for(var t=e.length/3,i=IndexDatatype$1.createTypedArray(t,6*t),r=0,n=0;n<t;n++){var a=n+t,o=(n+1)%t,s=o+t;i[r++]=n,i[r++]=a,i[r++]=o,i[r++]=o,i[r++]=a,i[r++]=s}return i}var topBoundingSphere=new BoundingSphere,bottomBoundingSphere=new BoundingSphere;function computeExtrudedEllipse(e){var t=e.center,i=e.ellipsoid,r=e.semiMajorAxis,n=Cartesian3.multiplyByScalar(i.geodeticSurfaceNormal(t,scratchCartesian1$3),e.height,scratchCartesian1$3);topBoundingSphere.center=Cartesian3.add(t,n,topBoundingSphere.center),topBoundingSphere.radius=r,n=Cartesian3.multiplyByScalar(i.geodeticSurfaceNormal(t,n),e.extrudedHeight,n),bottomBoundingSphere.center=Cartesian3.add(t,n,bottomBoundingSphere.center),bottomBoundingSphere.radius=r;i=(a=EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)).positions,t=a.numPts,n=a.outerPositions,r=BoundingSphere.union(topBoundingSphere,bottomBoundingSphere);var a=computeTopBottomAttributes(i,e,!0),o=(c=topIndices(t)).length;c.length=2*o;for(var s=i.length/3,l=0;l<o;l+=3)c[l+o]=c[l+2]+s,c[l+1+o]=c[l+1]+s,c[l+2+o]=c[l]+s;a=new Geometry({attributes:a,indices:IndexDatatype$1.createTypedArray(2*s/3,c),primitiveType:PrimitiveType$1.TRIANGLES}),e=computeWallAttributes(n,e);var c=computeWallIndices(n);n=new Geometry({attributes:e,indices:IndexDatatype$1.createTypedArray(2*n.length/3,c),primitiveType:PrimitiveType$1.TRIANGLES});return{boundingSphere:r,attributes:(n=GeometryPipeline.combineInstances([new GeometryInstance({geometry:a}),new GeometryInstance({geometry:n})]))[0].attributes,indices:n[0].indices}}function computeRectangle(e,t,i,r,n,a,o){for(var s=EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:i,rotation:r,granularity:n},!1,!0).outerPositions,l=s.length/3,c=new Array(l),u=0;u<l;++u)c[u]=Cartesian3.fromArray(s,3*u);return(o=Rectangle.fromCartesianArray(c,a,o)).width>CesiumMath.PI&&(o.north=0<o.north?CesiumMath.PI_OVER_TWO-CesiumMath.EPSILON7:o.north,o.south=o.south<0?CesiumMath.EPSILON7-CesiumMath.PI_OVER_TWO:o.south,o.east=CesiumMath.PI,o.west=-CesiumMath.PI),o}function EllipseGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).center,i=defaultValue(e.ellipsoid,Ellipsoid.WGS84),r=e.semiMajorAxis,n=e.semiMinorAxis,a=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),o=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),s=defaultValue(e.height,0),l=defaultValue(e.extrudedHeight,s);this._center=Cartesian3.clone(t),this._semiMajorAxis=r,this._semiMinorAxis=n,this._ellipsoid=Ellipsoid.clone(i),this._rotation=defaultValue(e.rotation,0),this._stRotation=defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=a,this._vertexFormat=VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}EllipseGeometry.packedLength=Cartesian3.packedLength+Ellipsoid.packedLength+VertexFormat.packedLength+9,EllipseGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._center,t,i),i+=Cartesian3.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchCenter$1=new Cartesian3,scratchEllipsoid=new Ellipsoid,scratchVertexFormat$1=new VertexFormat,scratchOptions$2={center:scratchCenter$1,ellipsoid:scratchEllipsoid,vertexFormat:scratchVertexFormat$1,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function textureCoordinateRotationPoints(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var i=EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,r=i.length/3,n=new Array(r),a=0;a<r;++a)n[a]=Cartesian3.fromArray(i,3*a);var o=e._ellipsoid;e=e.rectangle;return Geometry._textureCoordinateRotationPoints(n,t,o,e)}function CircleGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).radius;e={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new EllipseGeometry(e),this._workerName="createCircleGeometry"}EllipseGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchCenter$1);t+=Cartesian3.packedLength;var n=Ellipsoid.unpack(e,t,scratchEllipsoid);t+=Ellipsoid.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$1);t+=VertexFormat.packedLength;var o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++],h=e[t++],p=1===e[t++];t=e[t];return defined(i)?(i._center=Cartesian3.clone(r,i._center),i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._semiMajorAxis=o,i._semiMinorAxis=s,i._rotation=l,i._stRotation=c,i._height=u,i._granularity=d,i._extrudedHeight=h,i._shadowVolume=p,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$2.height=u,scratchOptions$2.extrudedHeight=h,scratchOptions$2.granularity=d,scratchOptions$2.stRotation=c,scratchOptions$2.rotation=l,scratchOptions$2.semiMajorAxis=o,scratchOptions$2.semiMinorAxis=s,scratchOptions$2.shadowVolume=p,scratchOptions$2.offsetAttribute=-1===t?void 0:t,new EllipseGeometry(scratchOptions$2))},EllipseGeometry.computeRectangle=function(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).center,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=e.semiMajorAxis,a=e.semiMinorAxis,o=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE);return computeRectangle(i,n,a,defaultValue(e.rotation,0),o,r,t)},EllipseGeometry.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,r=!CesiumMath.equalsEpsilon(t,i,0,CesiumMath.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var n;t={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation};return r?(t.extrudedHeight=i,t.shadowVolume=e._shadowVolume,t.offsetAttribute=e._offsetAttribute,n=computeExtrudedEllipse(t)):(n=computeEllipse(t),defined(e._offsetAttribute)&&(t=n.attributes.position.values.length,arrayFill(t=new Uint8Array(t/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),n.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t}))),new Geometry({attributes:n.attributes,indices:n.indices,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:n.boundingSphere,offsetAttribute:e._offsetAttribute})}},EllipseGeometry.createShadowVolume=function(e,t,i){var r=e._granularity,n=e._ellipsoid;t=t(r,n),i=i(r,n);return new EllipseGeometry({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:n,rotation:e._rotation,stRotation:e._stRotation,granularity:r,extrudedHeight:t,height:i,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(EllipseGeometry.prototype,{rectangle:{get:function(){return defined(this._rectangle)||(this._rectangle=computeRectangle(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=textureCoordinateRotationPoints(this)),this._textureCoordinateRotationPoints}}}),CircleGeometry.packedLength=EllipseGeometry.packedLength,CircleGeometry.pack=function(e,t,i){return EllipseGeometry.pack(e._ellipseGeometry,t,i)};var scratchEllipseGeometry=new EllipseGeometry({center:new Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),scratchOptions$3={center:new Cartesian3,radius:void 0,ellipsoid:Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};CircleGeometry.unpack=function(e,t,i){return t=EllipseGeometry.unpack(e,t,scratchEllipseGeometry),scratchOptions$3.center=Cartesian3.clone(t._center,scratchOptions$3.center),scratchOptions$3.ellipsoid=Ellipsoid.clone(t._ellipsoid,scratchOptions$3.ellipsoid),scratchOptions$3.height=t._height,scratchOptions$3.extrudedHeight=t._extrudedHeight,scratchOptions$3.granularity=t._granularity,scratchOptions$3.vertexFormat=VertexFormat.clone(t._vertexFormat,scratchOptions$3.vertexFormat),scratchOptions$3.stRotation=t._stRotation,scratchOptions$3.shadowVolume=t._shadowVolume,defined(i)?(scratchOptions$3.semiMajorAxis=t._semiMajorAxis,scratchOptions$3.semiMinorAxis=t._semiMinorAxis,i._ellipseGeometry=new EllipseGeometry(scratchOptions$3),i):(scratchOptions$3.radius=t._semiMajorAxis,new CircleGeometry(scratchOptions$3))},CircleGeometry.createGeometry=function(e){return EllipseGeometry.createGeometry(e._ellipseGeometry)},CircleGeometry.createShadowVolume=function(e,t,i){var r=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid;t=t(r,n),i=i(r,n);return new CircleGeometry({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:t,height:i,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(CircleGeometry.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var scratchCartesian1$4=new Cartesian3,boundingSphereCenter$1=new Cartesian3;function computeEllipse$1(e){var t=e.center;boundingSphereCenter$1=Cartesian3.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,boundingSphereCenter$1),e.height,boundingSphereCenter$1);for(var i=new BoundingSphere(boundingSphereCenter$1=Cartesian3.add(t,boundingSphereCenter$1,boundingSphereCenter$1),e.semiMajorAxis),r=(t=EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions,e=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:EllipseGeometryLibrary.raisePositionsToHeight(t,e,!1)})}),t.length/3),n=IndexDatatype$1.createTypedArray(r,2*r),a=0,o=0;o<r;++o)n[a++]=o,n[a++]=(o+1)%r;return{boundingSphere:i,attributes:e,indices:n}}var topBoundingSphere$1=new BoundingSphere,bottomBoundingSphere$1=new BoundingSphere;function computeExtrudedEllipse$1(e){var t=e.center,i=e.ellipsoid,r=e.semiMajorAxis,n=Cartesian3.multiplyByScalar(i.geodeticSurfaceNormal(t,scratchCartesian1$4),e.height,scratchCartesian1$4);topBoundingSphere$1.center=Cartesian3.add(t,n,topBoundingSphere$1.center),topBoundingSphere$1.radius=r,n=Cartesian3.multiplyByScalar(i.geodeticSurfaceNormal(t,n),e.extrudedHeight,n),bottomBoundingSphere$1.center=Cartesian3.add(t,n,bottomBoundingSphere$1.center),bottomBoundingSphere$1.radius=r;t=EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions,t=(n=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:EllipseGeometryLibrary.raisePositionsToHeight(t,e,!0)})})).position.values,r=BoundingSphere.union(topBoundingSphere$1,bottomBoundingSphere$1);var a=t.length/3;defined(e.offsetAttribute)&&(o=new Uint8Array(a),o=e.offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(o,1,0,a/2):arrayFill(o,e.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),n.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:o}));var o=defaultValue(e.numberOfVerticalLines,16),s=(o=CesiumMath.clamp(o,0,a/2),IndexDatatype$1.createTypedArray(a,2*a+2*o));a/=2;var l=0;for(d=0;d<a;++d)s[l++]=d,s[l++]=(d+1)%a,s[l++]=d+a,s[l++]=(d+1)%a+a;if(0<o){e=Math.min(o,a);for(var c=Math.round(a/e),u=Math.min(c*o,a),d=0;d<u;d+=c)s[l++]=d,s[l++]=d+a}return{boundingSphere:r,attributes:n,indices:s}}function EllipseOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).center,i=defaultValue(e.ellipsoid,Ellipsoid.WGS84),r=e.semiMajorAxis,n=e.semiMinorAxis,a=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),o=defaultValue(e.height,0),s=defaultValue(e.extrudedHeight,o);this._center=Cartesian3.clone(t),this._semiMajorAxis=r,this._semiMinorAxis=n,this._ellipsoid=Ellipsoid.clone(i),this._rotation=defaultValue(e.rotation,0),this._height=Math.max(s,o),this._granularity=a,this._extrudedHeight=Math.min(s,o),this._numberOfVerticalLines=Math.max(defaultValue(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}EllipseOutlineGeometry.packedLength=Cartesian3.packedLength+Ellipsoid.packedLength+8,EllipseOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._center,t,i),i+=Cartesian3.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchCenter$2=new Cartesian3,scratchEllipsoid$1=new Ellipsoid,scratchOptions$4={center:scratchCenter$2,ellipsoid:scratchEllipsoid$1,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};function CircleOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).radius;e={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new EllipseOutlineGeometry(e),this._workerName="createCircleOutlineGeometry"}EllipseOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchCenter$2);t+=Cartesian3.packedLength;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$1);t+=Ellipsoid.packedLength;var a=e[t++],o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++];t=e[t];return defined(i)?(i._center=Cartesian3.clone(r,i._center),i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._semiMajorAxis=a,i._semiMinorAxis=o,i._rotation=s,i._height=l,i._granularity=c,i._extrudedHeight=u,i._numberOfVerticalLines=d,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$4.height=l,scratchOptions$4.extrudedHeight=u,scratchOptions$4.granularity=c,scratchOptions$4.rotation=s,scratchOptions$4.semiMajorAxis=a,scratchOptions$4.semiMinorAxis=o,scratchOptions$4.numberOfVerticalLines=d,scratchOptions$4.offsetAttribute=-1===t?void 0:t,new EllipseOutlineGeometry(scratchOptions$4))},EllipseOutlineGeometry.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){var t=e._height,i=e._extrudedHeight,r=!CesiumMath.equalsEpsilon(t,i,0,CesiumMath.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var n;t={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines};return r?(t.extrudedHeight=i,t.offsetAttribute=e._offsetAttribute,n=computeExtrudedEllipse$1(t)):(n=computeEllipse$1(t),defined(e._offsetAttribute)&&(t=n.attributes.position.values.length,arrayFill(t=new Uint8Array(t/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),n.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t}))),new Geometry({attributes:n.attributes,indices:n.indices,primitiveType:PrimitiveType$1.LINES,boundingSphere:n.boundingSphere,offsetAttribute:e._offsetAttribute})}},CircleOutlineGeometry.packedLength=EllipseOutlineGeometry.packedLength,CircleOutlineGeometry.pack=function(e,t,i){return EllipseOutlineGeometry.pack(e._ellipseGeometry,t,i)};var scratchEllipseGeometry$1=new EllipseOutlineGeometry({center:new Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),scratchOptions$5={center:new Cartesian3,radius:void 0,ellipsoid:Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};CircleOutlineGeometry.unpack=function(e,t,i){return t=EllipseOutlineGeometry.unpack(e,t,scratchEllipseGeometry$1),scratchOptions$5.center=Cartesian3.clone(t._center,scratchOptions$5.center),scratchOptions$5.ellipsoid=Ellipsoid.clone(t._ellipsoid,scratchOptions$5.ellipsoid),scratchOptions$5.height=t._height,scratchOptions$5.extrudedHeight=t._extrudedHeight,scratchOptions$5.granularity=t._granularity,scratchOptions$5.numberOfVerticalLines=t._numberOfVerticalLines,defined(i)?(scratchOptions$5.semiMajorAxis=t._semiMajorAxis,scratchOptions$5.semiMinorAxis=t._semiMinorAxis,i._ellipseGeometry=new EllipseOutlineGeometry(scratchOptions$5),i):(scratchOptions$5.radius=t._semiMajorAxis,new CircleOutlineGeometry(scratchOptions$5))},CircleOutlineGeometry.createGeometry=function(e){return EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)};var ClockRange={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},ClockRange$1=Object.freeze(ClockRange),ClockStep={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},ClockStep$1=Object.freeze(ClockStep),getTimestamp,getTimestamp="undefined"!=typeof performance&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()},getTimestamp$1=getTimestamp,scratchArrayBuffer,scratchUint32Array,scratchUint8Array;function Clock(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).currentTime,i=e.startTime,r=e.stopTime;t=defined(t)?JulianDate.clone(t):defined(i)?JulianDate.clone(i):defined(r)?JulianDate.addDays(r,-1,new JulianDate):JulianDate.now(),i=defined(i)?JulianDate.clone(i):JulianDate.clone(t),r=defined(r)?JulianDate.clone(r):JulianDate.addDays(i,1,new JulianDate);this.startTime=i,this.stopTime=r,this.clockRange=defaultValue(e.clockRange,ClockRange$1.UNBOUNDED),this.canAnimate=defaultValue(e.canAnimate,!0),this.onTick=new Event,this.onStop=new Event,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=getTimestamp$1(),this.currentTime=t,this.multiplier=defaultValue(e.multiplier,1),this.shouldAnimate=defaultValue(e.shouldAnimate,!1),this.clockStep=defaultValue(e.clockStep,ClockStep$1.SYSTEM_CLOCK_MULTIPLIER)}function hue2rgb(e,t,i){return i<0&&(i+=1),1<i&&--i,6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function Color(e,t,i,r){this.red=defaultValue(e,1),this.green=defaultValue(t,1),this.blue=defaultValue(i,1),this.alpha=defaultValue(r,1)}Object.defineProperties(Clock.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){JulianDate.equals(this._currentTime,e)||(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===ClockStep$1.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=JulianDate.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===ClockStep$1.SYSTEM_CLOCK&&(this._clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),Clock.prototype.tick=function(){var e=getTimestamp$1(),t=JulianDate.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var i=this._clockStep;if(i===ClockStep$1.SYSTEM_CLOCK)t=JulianDate.now(t);else{var r=this._multiplier;t=i===ClockStep$1.TICK_DEPENDENT?JulianDate.addSeconds(t,r,t):(n=e-this._lastSystemTime,JulianDate.addSeconds(t,r*(n/1e3),t));var n=this.clockRange,a=this.startTime,o=this.stopTime;if(n===ClockRange$1.CLAMPED)JulianDate.lessThan(t,a)?t=JulianDate.clone(a,t):JulianDate.greaterThan(t,o)&&(t=JulianDate.clone(o,t),this.onStop.raiseEvent(this));else if(n===ClockRange$1.LOOP_STOP)for(JulianDate.lessThan(t,a)&&(t=JulianDate.clone(a,t));JulianDate.greaterThan(t,o);)t=JulianDate.addSeconds(a,JulianDate.secondsDifference(t,o),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t},Color.fromCartesian4=function(e,t){return defined(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new Color(e.x,e.y,e.z,e.w)},Color.fromBytes=function(e,t,i,r,n){return e=Color.byteToFloat(defaultValue(e,255)),t=Color.byteToFloat(defaultValue(t,255)),i=Color.byteToFloat(defaultValue(i,255)),r=Color.byteToFloat(defaultValue(r,255)),defined(n)?(n.red=e,n.green=t,n.blue=i,n.alpha=r,n):new Color(e,t,i,r)},Color.fromAlpha=function(e,t,i){return defined(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new Color(e.red,e.green,e.blue,t)},FeatureDetection.supportsTypedArrays()&&(scratchArrayBuffer=new ArrayBuffer(4),scratchUint32Array=new Uint32Array(scratchArrayBuffer),scratchUint8Array=new Uint8Array(scratchArrayBuffer)),Color.fromRgba=function(e,t){return scratchUint32Array[0]=e,Color.fromBytes(scratchUint8Array[0],scratchUint8Array[1],scratchUint8Array[2],scratchUint8Array[3],t)},Color.fromHsl=function(e,t,i,r,n){e=defaultValue(e,0)%1,t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,1);var a=i,o=i,s=i;return 0!==t&&(a=hue2rgb(t=2*i-(i=i<.5?i*(1+t):i+t-i*t),i,e+1/3),o=hue2rgb(t,i,e),s=hue2rgb(t,i,e-1/3)),defined(n)?(n.red=a,n.green=o,n.blue=s,n.alpha=r,n):new Color(a,o,s,r)},Color.fromRandom=function(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).red;defined(i)||(r=defaultValue(e.minimumRed,0),n=defaultValue(e.maximumRed,1),i=r+CesiumMath.nextRandomNumber()*(n-r));var r,n=e.green;defined(n)||(a=defaultValue(e.minimumGreen,0),r=defaultValue(e.maximumGreen,1),n=a+CesiumMath.nextRandomNumber()*(r-a));var a=e.blue;defined(a)||(o=defaultValue(e.minimumBlue,0),s=defaultValue(e.maximumBlue,1),a=o+CesiumMath.nextRandomNumber()*(s-o));var o,s=e.alpha;return defined(s)||(o=defaultValue(e.minimumAlpha,0),e=defaultValue(e.maximumAlpha,1),s=o+CesiumMath.nextRandomNumber()*(e-o)),defined(t)?(t.red=i,t.green=n,t.blue=a,t.alpha=s,t):new Color(i,n,a,s)};var rgbaMatcher=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,rrggbbaaMatcher=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,rgbParenthesesMatcher=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,hslParenthesesMatcher=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;function ColorGeometryInstanceAttribute(e,t,i,r){e=defaultValue(e,1),t=defaultValue(t,1),i=defaultValue(i,1),r=defaultValue(r,1),this.value=new Uint8Array([Color.floatToByte(e),Color.floatToByte(t),Color.floatToByte(i),Color.floatToByte(r)])}function CompressedTextureBuffer(e,t,i,r){this._format=e,this._width=t,this._height=i,this._buffer=r}Color.fromCssColorString=function(e,t){defined(t)||(t=new Color);var i=Color[(e=e.replace(/\s/g,"")).toUpperCase()];return defined(i)?(Color.clone(i,t),t):null!==(i=rgbaMatcher.exec(e))?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(defaultValue(i[4],"f"),16)/15,t):null!==(i=rrggbbaaMatcher.exec(e))?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(defaultValue(i[4],"ff"),16)/255,t):null!==(i=rgbParenthesesMatcher.exec(e))?(t.red=parseFloat(i[1])/("%"===i[1].substr(-1)?100:255),t.green=parseFloat(i[2])/("%"===i[2].substr(-1)?100:255),t.blue=parseFloat(i[3])/("%"===i[3].substr(-1)?100:255),t.alpha=parseFloat(defaultValue(i[4],"1.0")),t):null!==(i=hslParenthesesMatcher.exec(e))?Color.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(defaultValue(i[4],"1.0")),t):t=void 0},Color.packedLength=4,Color.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},Color.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new Color),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},Color.byteToFloat=function(e){return e/255},Color.floatToByte=function(e){return 1===e?255:256*e|0},Color.clone=function(e,t){if(defined(e))return defined(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new Color(e.red,e.green,e.blue,e.alpha)},Color.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},Color.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},Color.prototype.clone=function(e){return Color.clone(this,e)},Color.prototype.equals=function(e){return Color.equals(this,e)},Color.prototype.equalsEpsilon=function(e,t){return this===e||defined(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},Color.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},Color.prototype.toCssColorString=function(){var e=Color.floatToByte(this.red),t=Color.floatToByte(this.green),i=Color.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},Color.prototype.toCssHexString=function(){var e=Color.floatToByte(this.red).toString(16);e.length<2&&(e="0"+e);var t=Color.floatToByte(this.green).toString(16);t.length<2&&(t="0"+t);var i=Color.floatToByte(this.blue).toString(16);if(i.length<2&&(i="0"+i),this.alpha<1){var r=Color.floatToByte(this.alpha).toString(16);return r.length<2&&(r="0"+r),"#"+e+t+i+r}return"#"+e+t+i},Color.prototype.toBytes=function(e){var t=Color.floatToByte(this.red),i=Color.floatToByte(this.green),r=Color.floatToByte(this.blue),n=Color.floatToByte(this.alpha);return defined(e)?(e[0]=t,e[1]=i,e[2]=r,e[3]=n,e):[t,i,r,n]},Color.prototype.toRgba=function(){return scratchUint8Array[0]=Color.floatToByte(this.red),scratchUint8Array[1]=Color.floatToByte(this.green),scratchUint8Array[2]=Color.floatToByte(this.blue),scratchUint8Array[3]=Color.floatToByte(this.alpha),scratchUint32Array[0]},Color.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},Color.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},Color.prototype.withAlpha=function(e,t){return Color.fromAlpha(this,e,t)},Color.add=function(e,t,i){return i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},Color.subtract=function(e,t,i){return i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},Color.multiply=function(e,t,i){return i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},Color.divide=function(e,t,i){return i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},Color.mod=function(e,t,i){return i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},Color.lerp=function(e,t,i,r){return r.red=CesiumMath.lerp(e.red,t.red,i),r.green=CesiumMath.lerp(e.green,t.green,i),r.blue=CesiumMath.lerp(e.blue,t.blue,i),r.alpha=CesiumMath.lerp(e.alpha,t.alpha,i),r},Color.multiplyByScalar=function(e,t,i){return i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},Color.divideByScalar=function(e,t,i){return i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},Color.ALICEBLUE=Object.freeze(Color.fromCssColorString("#F0F8FF")),Color.ANTIQUEWHITE=Object.freeze(Color.fromCssColorString("#FAEBD7")),Color.AQUA=Object.freeze(Color.fromCssColorString("#00FFFF")),Color.AQUAMARINE=Object.freeze(Color.fromCssColorString("#7FFFD4")),Color.AZURE=Object.freeze(Color.fromCssColorString("#F0FFFF")),Color.BEIGE=Object.freeze(Color.fromCssColorString("#F5F5DC")),Color.BISQUE=Object.freeze(Color.fromCssColorString("#FFE4C4")),Color.BLACK=Object.freeze(Color.fromCssColorString("#000000")),Color.BLANCHEDALMOND=Object.freeze(Color.fromCssColorString("#FFEBCD")),Color.BLUE=Object.freeze(Color.fromCssColorString("#0000FF")),Color.BLUEVIOLET=Object.freeze(Color.fromCssColorString("#8A2BE2")),Color.BROWN=Object.freeze(Color.fromCssColorString("#A52A2A")),Color.BURLYWOOD=Object.freeze(Color.fromCssColorString("#DEB887")),Color.CADETBLUE=Object.freeze(Color.fromCssColorString("#5F9EA0")),Color.CHARTREUSE=Object.freeze(Color.fromCssColorString("#7FFF00")),Color.CHOCOLATE=Object.freeze(Color.fromCssColorString("#D2691E")),Color.CORAL=Object.freeze(Color.fromCssColorString("#FF7F50")),Color.CORNFLOWERBLUE=Object.freeze(Color.fromCssColorString("#6495ED")),Color.CORNSILK=Object.freeze(Color.fromCssColorString("#FFF8DC")),Color.CRIMSON=Object.freeze(Color.fromCssColorString("#DC143C")),Color.CYAN=Object.freeze(Color.fromCssColorString("#00FFFF")),Color.DARKBLUE=Object.freeze(Color.fromCssColorString("#00008B")),Color.DARKCYAN=Object.freeze(Color.fromCssColorString("#008B8B")),Color.DARKGOLDENROD=Object.freeze(Color.fromCssColorString("#B8860B")),Color.DARKGRAY=Object.freeze(Color.fromCssColorString("#A9A9A9")),Color.DARKGREEN=Object.freeze(Color.fromCssColorString("#006400")),Color.DARKGREY=Color.DARKGRAY,Color.DARKKHAKI=Object.freeze(Color.fromCssColorString("#BDB76B")),Color.DARKMAGENTA=Object.freeze(Color.fromCssColorString("#8B008B")),Color.DARKOLIVEGREEN=Object.freeze(Color.fromCssColorString("#556B2F")),Color.DARKORANGE=Object.freeze(Color.fromCssColorString("#FF8C00")),Color.DARKORCHID=Object.freeze(Color.fromCssColorString("#9932CC")),Color.DARKRED=Object.freeze(Color.fromCssColorString("#8B0000")),Color.DARKSALMON=Object.freeze(Color.fromCssColorString("#E9967A")),Color.DARKSEAGREEN=Object.freeze(Color.fromCssColorString("#8FBC8F")),Color.DARKSLATEBLUE=Object.freeze(Color.fromCssColorString("#483D8B")),Color.DARKSLATEGRAY=Object.freeze(Color.fromCssColorString("#2F4F4F")),Color.DARKSLATEGREY=Color.DARKSLATEGRAY,Color.DARKTURQUOISE=Object.freeze(Color.fromCssColorString("#00CED1")),Color.DARKVIOLET=Object.freeze(Color.fromCssColorString("#9400D3")),Color.DEEPPINK=Object.freeze(Color.fromCssColorString("#FF1493")),Color.DEEPSKYBLUE=Object.freeze(Color.fromCssColorString("#00BFFF")),Color.DIMGRAY=Object.freeze(Color.fromCssColorString("#696969")),Color.DIMGREY=Color.DIMGRAY,Color.DODGERBLUE=Object.freeze(Color.fromCssColorString("#1E90FF")),Color.FIREBRICK=Object.freeze(Color.fromCssColorString("#B22222")),Color.FLORALWHITE=Object.freeze(Color.fromCssColorString("#FFFAF0")),Color.FORESTGREEN=Object.freeze(Color.fromCssColorString("#228B22")),Color.FUCHSIA=Object.freeze(Color.fromCssColorString("#FF00FF")),Color.GAINSBORO=Object.freeze(Color.fromCssColorString("#DCDCDC")),Color.GHOSTWHITE=Object.freeze(Color.fromCssColorString("#F8F8FF")),Color.GOLD=Object.freeze(Color.fromCssColorString("#FFD700")),Color.GOLDENROD=Object.freeze(Color.fromCssColorString("#DAA520")),Color.GRAY=Object.freeze(Color.fromCssColorString("#808080")),Color.GREEN=Object.freeze(Color.fromCssColorString("#008000")),Color.GREENYELLOW=Object.freeze(Color.fromCssColorString("#ADFF2F")),Color.GREY=Color.GRAY,Color.HONEYDEW=Object.freeze(Color.fromCssColorString("#F0FFF0")),Color.HOTPINK=Object.freeze(Color.fromCssColorString("#FF69B4")),Color.INDIANRED=Object.freeze(Color.fromCssColorString("#CD5C5C")),Color.INDIGO=Object.freeze(Color.fromCssColorString("#4B0082")),Color.IVORY=Object.freeze(Color.fromCssColorString("#FFFFF0")),Color.KHAKI=Object.freeze(Color.fromCssColorString("#F0E68C")),Color.LAVENDER=Object.freeze(Color.fromCssColorString("#E6E6FA")),Color.LAVENDAR_BLUSH=Object.freeze(Color.fromCssColorString("#FFF0F5")),Color.LAWNGREEN=Object.freeze(Color.fromCssColorString("#7CFC00")),Color.LEMONCHIFFON=Object.freeze(Color.fromCssColorString("#FFFACD")),Color.LIGHTBLUE=Object.freeze(Color.fromCssColorString("#ADD8E6")),Color.LIGHTCORAL=Object.freeze(Color.fromCssColorString("#F08080")),Color.LIGHTCYAN=Object.freeze(Color.fromCssColorString("#E0FFFF")),Color.LIGHTGOLDENRODYELLOW=Object.freeze(Color.fromCssColorString("#FAFAD2")),Color.LIGHTGRAY=Object.freeze(Color.fromCssColorString("#D3D3D3")),Color.LIGHTGREEN=Object.freeze(Color.fromCssColorString("#90EE90")),Color.LIGHTGREY=Color.LIGHTGRAY,Color.LIGHTPINK=Object.freeze(Color.fromCssColorString("#FFB6C1")),Color.LIGHTSEAGREEN=Object.freeze(Color.fromCssColorString("#20B2AA")),Color.LIGHTSKYBLUE=Object.freeze(Color.fromCssColorString("#87CEFA")),Color.LIGHTSLATEGRAY=Object.freeze(Color.fromCssColorString("#778899")),Color.LIGHTSLATEGREY=Color.LIGHTSLATEGRAY,Color.LIGHTSTEELBLUE=Object.freeze(Color.fromCssColorString("#B0C4DE")),Color.LIGHTYELLOW=Object.freeze(Color.fromCssColorString("#FFFFE0")),Color.LIME=Object.freeze(Color.fromCssColorString("#00FF00")),Color.LIMEGREEN=Object.freeze(Color.fromCssColorString("#32CD32")),Color.LINEN=Object.freeze(Color.fromCssColorString("#FAF0E6")),Color.MAGENTA=Object.freeze(Color.fromCssColorString("#FF00FF")),Color.MAROON=Object.freeze(Color.fromCssColorString("#800000")),Color.MEDIUMAQUAMARINE=Object.freeze(Color.fromCssColorString("#66CDAA")),Color.MEDIUMBLUE=Object.freeze(Color.fromCssColorString("#0000CD")),Color.MEDIUMORCHID=Object.freeze(Color.fromCssColorString("#BA55D3")),Color.MEDIUMPURPLE=Object.freeze(Color.fromCssColorString("#9370DB")),Color.MEDIUMSEAGREEN=Object.freeze(Color.fromCssColorString("#3CB371")),Color.MEDIUMSLATEBLUE=Object.freeze(Color.fromCssColorString("#7B68EE")),Color.MEDIUMSPRINGGREEN=Object.freeze(Color.fromCssColorString("#00FA9A")),Color.MEDIUMTURQUOISE=Object.freeze(Color.fromCssColorString("#48D1CC")),Color.MEDIUMVIOLETRED=Object.freeze(Color.fromCssColorString("#C71585")),Color.MIDNIGHTBLUE=Object.freeze(Color.fromCssColorString("#191970")),Color.MINTCREAM=Object.freeze(Color.fromCssColorString("#F5FFFA")),Color.MISTYROSE=Object.freeze(Color.fromCssColorString("#FFE4E1")),Color.MOCCASIN=Object.freeze(Color.fromCssColorString("#FFE4B5")),Color.NAVAJOWHITE=Object.freeze(Color.fromCssColorString("#FFDEAD")),Color.NAVY=Object.freeze(Color.fromCssColorString("#000080")),Color.OLDLACE=Object.freeze(Color.fromCssColorString("#FDF5E6")),Color.OLIVE=Object.freeze(Color.fromCssColorString("#808000")),Color.OLIVEDRAB=Object.freeze(Color.fromCssColorString("#6B8E23")),Color.ORANGE=Object.freeze(Color.fromCssColorString("#FFA500")),Color.ORANGERED=Object.freeze(Color.fromCssColorString("#FF4500")),Color.ORCHID=Object.freeze(Color.fromCssColorString("#DA70D6")),Color.PALEGOLDENROD=Object.freeze(Color.fromCssColorString("#EEE8AA")),Color.PALEGREEN=Object.freeze(Color.fromCssColorString("#98FB98")),Color.PALETURQUOISE=Object.freeze(Color.fromCssColorString("#AFEEEE")),Color.PALEVIOLETRED=Object.freeze(Color.fromCssColorString("#DB7093")),Color.PAPAYAWHIP=Object.freeze(Color.fromCssColorString("#FFEFD5")),Color.PEACHPUFF=Object.freeze(Color.fromCssColorString("#FFDAB9")),Color.PERU=Object.freeze(Color.fromCssColorString("#CD853F")),Color.PINK=Object.freeze(Color.fromCssColorString("#FFC0CB")),Color.PLUM=Object.freeze(Color.fromCssColorString("#DDA0DD")),Color.POWDERBLUE=Object.freeze(Color.fromCssColorString("#B0E0E6")),Color.PURPLE=Object.freeze(Color.fromCssColorString("#800080")),Color.RED=Object.freeze(Color.fromCssColorString("#FF0000")),Color.ROSYBROWN=Object.freeze(Color.fromCssColorString("#BC8F8F")),Color.ROYALBLUE=Object.freeze(Color.fromCssColorString("#4169E1")),Color.SADDLEBROWN=Object.freeze(Color.fromCssColorString("#8B4513")),Color.SALMON=Object.freeze(Color.fromCssColorString("#FA8072")),Color.SANDYBROWN=Object.freeze(Color.fromCssColorString("#F4A460")),Color.SEAGREEN=Object.freeze(Color.fromCssColorString("#2E8B57")),Color.SEASHELL=Object.freeze(Color.fromCssColorString("#FFF5EE")),Color.SIENNA=Object.freeze(Color.fromCssColorString("#A0522D")),Color.SILVER=Object.freeze(Color.fromCssColorString("#C0C0C0")),Color.SKYBLUE=Object.freeze(Color.fromCssColorString("#87CEEB")),Color.SLATEBLUE=Object.freeze(Color.fromCssColorString("#6A5ACD")),Color.SLATEGRAY=Object.freeze(Color.fromCssColorString("#708090")),Color.SLATEGREY=Color.SLATEGRAY,Color.SNOW=Object.freeze(Color.fromCssColorString("#FFFAFA")),Color.SPRINGGREEN=Object.freeze(Color.fromCssColorString("#00FF7F")),Color.STEELBLUE=Object.freeze(Color.fromCssColorString("#4682B4")),Color.TAN=Object.freeze(Color.fromCssColorString("#D2B48C")),Color.TEAL=Object.freeze(Color.fromCssColorString("#008080")),Color.THISTLE=Object.freeze(Color.fromCssColorString("#D8BFD8")),Color.TOMATO=Object.freeze(Color.fromCssColorString("#FF6347")),Color.TURQUOISE=Object.freeze(Color.fromCssColorString("#40E0D0")),Color.VIOLET=Object.freeze(Color.fromCssColorString("#EE82EE")),Color.WHEAT=Object.freeze(Color.fromCssColorString("#F5DEB3")),Color.WHITE=Object.freeze(Color.fromCssColorString("#FFFFFF")),Color.WHITESMOKE=Object.freeze(Color.fromCssColorString("#F5F5F5")),Color.YELLOW=Object.freeze(Color.fromCssColorString("#FFFF00")),Color.YELLOWGREEN=Object.freeze(Color.fromCssColorString("#9ACD32")),Color.TRANSPARENT=Object.freeze(new Color(0,0,0,0)),Object.defineProperties(ColorGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),ColorGeometryInstanceAttribute.fromColor=function(e){return new ColorGeometryInstanceAttribute(e.red,e.green,e.blue,e.alpha)},ColorGeometryInstanceAttribute.toValue=function(e,t){return defined(t)?e.toBytes(t):new Uint8Array(e.toBytes())},ColorGeometryInstanceAttribute.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},Object.defineProperties(CompressedTextureBuffer.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}}),CompressedTextureBuffer.clone=function(e){if(defined(e))return new CompressedTextureBuffer(e._format,e._width,e._height,e._buffer)},CompressedTextureBuffer.prototype.clone=function(){return CompressedTextureBuffer.clone(this)};var removeDuplicatesEpsilon=CesiumMath.EPSILON10;function arrayRemoveDuplicates(e,t,i){if(defined(e)){i=defaultValue(i,!1);var r,n,a,o=e.length;if(o<2)return e;for(r=1;r<o&&!t(n=e[r-1],a=e[r],removeDuplicatesEpsilon);++r);if(r===o)return i&&t(e[0],e[e.length-1],removeDuplicatesEpsilon)?e.slice(1):e;for(var s=e.slice(0,r);r<o;++r)t(n,a=e[r],removeDuplicatesEpsilon)||(s.push(a),n=a);return i&&1<s.length&&t(s[0],s[s.length-1],removeDuplicatesEpsilon)&&s.shift(),s}}var CoplanarPolygonGeometryLibrary={},scratchIntersectionPoint=new Cartesian3,scratchXAxis=new Cartesian3,scratchYAxis=new Cartesian3,scratchZAxis=new Cartesian3,obbScratch=new OrientedBoundingBox;function projectTo2D(e,t,i,r,n){return t=Cartesian3.subtract(e,t,scratchIntersectionPoint),i=Cartesian3.dot(i,t),t=Cartesian3.dot(r,t),Cartesian2.fromElements(i,t,n)}function calculateM(e,t,i){if(0===e)return t*i;var r=e*e,n=r*r,a=n*r,o=a*r,s=o*r;return t*((1-r/4-3*n/64-5*a/256-175*o/16384-441*s/65536-4851*(e=s*r)/1048576)*(i=i)-(3*r/8+3*n/32+45*a/1024+105*o/4096+2205*s/131072+6237*e/524288)*Math.sin(2*i)+(15*n/256+45*a/1024+525*o/16384+1575*s/65536+155925*e/8388608)*Math.sin(4*i)-(35*a/3072+175*o/12288+3675*s/262144+13475*e/1048576)*Math.sin(6*i)+(315*o/131072+2205*s/524288+43659*e/8388608)*Math.sin(8*i)-(693*s/1310720+6237*e/5242880)*Math.sin(10*i)+1001*e/8388608*Math.sin(12*i))}function calculateInverseM(e,t,i){var r=e/i;if(0===t)return r;var n=r*r,a=n*r,o=a*r,s=t*t,l=s*s,c=l*s,u=c*s,d=u*s,h=d*s,p=Math.sin(2*r),f=Math.cos(2*r),m=Math.sin(4*r),g=Math.cos(4*r),y=Math.sin(6*r),_=Math.cos(6*r);e=Math.sin(8*r),i=Math.cos(8*r),t=Math.sin(10*r);return r+r*s/4+7*r*l/64+15*r*c/256+579*r*u/16384+1515*r*d/65536+16837*r*h/1048576+(3*r*l/16+45*r*c/256-r*(32*n-561)*u/4096-r*(232*n-1677)*d/16384+r*(399985-90560*n+512*o)*h/5242880)*f+(21*r*c/256+483*r*u/4096-r*(224*n-1969)*d/16384-r*(33152*n-112599)*h/1048576)*g+(151*r*u/4096+4681*r*d/65536+1479*r*h/16384-453*a*h/32768)*_+(1097*r*d/65536+42783*r*h/1048576)*i+8011*r*h/1048576*Math.cos(10*r)+(3*s/8+3*l/16+213*c/2048-3*n*c/64+255*u/4096-33*n*u/512+20861*d/524288-33*n*d/512+o*d/1024+28273*h/1048576-471*n*h/8192+9*o*h/4096)*p+(21*l/256+21*c/256+533*u/8192-21*n*u/512+197*d/4096-315*n*d/4096+584039*h/16777216-12517*n*h/131072+7*o*h/2048)*m+(151*c/6144+151*u/4096+5019*d/131072-453*n*d/16384+26965*h/786432-8607*n*h/131072)*y+(1097*u/131072+1097*d/65536+225797*h/10485760-1097*n*h/65536)*e+(8011*d/2621440+8011*h/1048576)*t+293393*h/251658240*Math.sin(12*r)}function calculateSigma(e,t){if(0===e)return Math.log(Math.tan(.5*(CesiumMath.PI_OVER_TWO+t)));var i=e*Math.sin(t);return Math.log(Math.tan(.5*(CesiumMath.PI_OVER_TWO+t)))-e/2*Math.log((1+i)/(1-i))}function calculateHeading(e,t,i,r,n){return i=calculateSigma(e._ellipticity,i),n=calculateSigma(e._ellipticity,n),Math.atan2(CesiumMath.negativePiToPi(r-t),n-i)}function calculateArcLength(e,t,i,r,n,a,o){var s=e._heading;a-=r,r=0;return r=CesiumMath.equalsEpsilon(Math.abs(s),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8)?t===i?t*Math.cos(n)*CesiumMath.negativePiToPi(a):(i=Math.sin(n),t*Math.cos(n)*CesiumMath.negativePiToPi(a)/Math.sqrt(1-e._ellipticitySquared*i*i)):(n=calculateM(e._ellipticity,t,n),(calculateM(e._ellipticity,t,o)-n)/Math.cos(s)),Math.abs(r)}CoplanarPolygonGeometryLibrary.validOutline=function(e){var t=OrientedBoundingBox.fromPoints(e,obbScratch).halfAxes,i=Matrix3.getColumn(t,0,scratchXAxis);e=Matrix3.getColumn(t,1,scratchYAxis),t=Matrix3.getColumn(t,2,scratchZAxis),i=Cartesian3.magnitude(i),e=Cartesian3.magnitude(e),t=Cartesian3.magnitude(t);return!(0===i&&(0===e||0===t)||0===e&&0===t)},CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments=function(e,t,i,r){var n,a,o=OrientedBoundingBox.fromPoints(e,obbScratch),s=o.halfAxes,l=Matrix3.getColumn(s,0,scratchXAxis),c=Matrix3.getColumn(s,1,scratchYAxis),u=Matrix3.getColumn(s,2,scratchZAxis),d=Cartesian3.magnitude(l),h=Cartesian3.magnitude(c);e=Cartesian3.magnitude(u),s=Math.min(d,h,e);return(0!==d||0!==h&&0!==e)&&(0!==h||0!==e)&&(s!==h&&s!==e||(n=l),s===d?n=c:s===e&&(a=c),s!==d&&s!==h||(a=u),Cartesian3.normalize(n,i),Cartesian3.normalize(a,r),Cartesian3.clone(o.center,t),!0)},CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction=function(e,t,i){return function(r){for(var n=new Array(r.length),a=0;a<r.length;a++)n[a]=projectTo2D(r[a],e,t,i);return n}},CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction=function(e,t,i){return function(r,n){return projectTo2D(r,e,t,i,n)}};var scratchCart1=new Cartesian3,scratchCart2=new Cartesian3;function computeProperties(e,t,i,r){Cartesian3.normalize(r.cartographicToCartesian(t,scratchCart2),scratchCart1),Cartesian3.normalize(r.cartographicToCartesian(i,scratchCart2),scratchCart2);var n=(n=r.maximumRadius)*n,a=(a=r.minimumRadius)*a;e._ellipticitySquared=(n-a)/n,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=Cartographic.clone(t,e._start),e._start.height=0,e._end=Cartographic.clone(i,e._end),e._end.height=0,e._heading=calculateHeading(e,t.longitude,t.latitude,i.longitude,i.latitude),e._distance=calculateArcLength(e,r.maximumRadius,r.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude)}function interpolateUsingSurfaceDistance(e,t,i,r,n,a){var o,s,l,c=n*n;return l=Math.abs(CesiumMath.PI_OVER_TWO-Math.abs(t))>CesiumMath.EPSILON8?(o=calculateInverseM(calculateM(n,r,e.latitude)+i*Math.cos(t),n,r),l=calculateSigma(n,e.latitude),s=calculateSigma(n,o),l=Math.tan(t)*(s-l),CesiumMath.negativePiToPi(e.longitude+l)):(o=e.latitude,l=i/(0===n?r*Math.cos(e.latitude):(n=Math.sin(e.latitude),r*Math.cos(e.latitude)/Math.sqrt(1-c*n*n))),0<t?CesiumMath.negativePiToPi(e.longitude+l):CesiumMath.negativePiToPi(e.longitude-l)),defined(a)?(a.longitude=l,a.latitude=o,a.height=0,a):new Cartographic(l,o,0)}function EllipsoidRhumbLine(e,t,i){i=defaultValue(i,Ellipsoid.WGS84),this._ellipsoid=i,this._start=new Cartographic,this._end=new Cartographic,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,defined(e)&&defined(t)&&computeProperties(this,e,t,i)}function earcut(e,t,i){i=i||2;var r,n,a,o,s,l,c,u=t&&t.length,d=u?t[0]*i:e.length,h=linkedList(e,0,d,i,!0),p=[];if(!h||h.next===h.prev)return p;if(u&&(h=eliminateHoles(e,t,h,i)),e.length>80*i){r=a=e[0],n=o=e[1];for(var f=i;f<d;f+=i)(s=e[f])<r&&(r=s),(l=e[f+1])<n&&(n=l),a<s&&(a=s),o<l&&(o=l);c=0!==(c=Math.max(a-r,o-n))?1/c:0}return earcutLinked(h,p,i,r,n,c),p}function linkedList(e,t,i,r,n){var a,o;if(n===0<signedArea(e,t,i,r))for(a=t;a<i;a+=r)o=insertNode(a,e[a],e[a+1],o);else for(a=i-r;t<=a;a-=r)o=insertNode(a,e[a],e[a+1],o);return o&&equals(o,o.next)&&(removeNode(o),o=o.next),o}function filterPoints(e,t){if(!e)return e;t=t||e;var i,r=e;do{if(i=!1,r.steiner||!equals(r,r.next)&&0!==area(r.prev,r,r.next))r=r.next;else{if(removeNode(r),(r=t=r.prev)===r.next)break;i=!0}}while(i||r!==t);return t}function earcutLinked(e,t,i,r,n,a,o){if(e){!o&&a&&indexCurve(e,r,n,a);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?isEarHashed(e,r,n,a):isEar(e))t.push(s.i/i),t.push(e.i/i),t.push(l.i/i),removeNode(e),e=l.next,c=l.next;else if((e=l)===c){o?1===o?earcutLinked(e=cureLocalIntersections(filterPoints(e),t,i),t,i,r,n,a,2):2===o&&splitEarcut(e,t,i,r,n,a):earcutLinked(filterPoints(e),t,i,r,n,a,1);break}}}function isEar(e){var t=e.prev,i=e,r=e.next;if(!(0<=area(t,i,r))){for(var n=e.next.next;n!==e.prev;){if(pointInTriangle(t.x,t.y,i.x,i.y,r.x,r.y,n.x,n.y)&&0<=area(n.prev,n,n.next))return;n=n.next}return 1}}function isEarHashed(e,t,i,r){var n=e.prev,a=e,o=e.next;if(!(0<=area(n,a,o))){for(var s=(n.x<a.x?n.x<o.x?n:o:a.x<o.x?a:o).x,l=(n.y<a.y?n.y<o.y?n:o:a.y<o.y?a:o).y,c=(n.x>a.x?n.x>o.x?n:o:a.x>o.x?a:o).x,u=(n.y>a.y?n.y>o.y?n:o:a.y>o.y?a:o).y,d=zOrder(s,l,t,i,r),h=zOrder(c,u,t,i,r),p=e.prevZ,f=e.nextZ;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&pointInTriangle(n.x,n.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=area(p.prev,p,p.next))return;if(p=p.prevZ,f!==e.prev&&f!==e.next&&pointInTriangle(n.x,n.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=area(f.prev,f,f.next))return;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&pointInTriangle(n.x,n.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=area(p.prev,p,p.next))return;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&pointInTriangle(n.x,n.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=area(f.prev,f,f.next))return;f=f.nextZ}return 1}}function cureLocalIntersections(e,t,i){var r=e;do{var n=r.prev,a=r.next.next;!equals(n,a)&&intersects(n,r,r.next,a)&&locallyInside(n,a)&&locallyInside(a,n)&&(t.push(n.i/i),t.push(r.i/i),t.push(a.i/i),removeNode(r),removeNode(r.next),r=e=a),r=r.next}while(r!==e);return filterPoints(r)}function splitEarcut(e,t,i,r,n,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&isValidDiagonal(o,s)){var l=splitPolygon(o,s);o=filterPoints(o,o.next),l=filterPoints(l,l.next);return earcutLinked(o,t,i,r,n,a),void earcutLinked(l,t,i,r,n,a)}s=s.next}o=o.next}while(o!==e)}function eliminateHoles(e,t,i,r){for(var n,a=[],o=0,s=t.length;o<s;o++)(n=linkedList(e,t[o]*r,o<s-1?t[o+1]*r:e.length,r,!1))===n.next&&(n.steiner=!0),a.push(getLeftmost(n));for(a.sort(compareX),o=0;o<a.length;o++)eliminateHole(a[o],i),i=filterPoints(i,i.next);return i}function compareX(e,t){return e.x-t.x}function eliminateHole(e,t){(t=findHoleBridge(e,t))&&filterPoints(e=splitPolygon(t,e),e.next)}function findHoleBridge(e,t){var i,r=t,n=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&o<s){if((o=s)===n){if(a===r.y)return r;if(a===r.next.y)return r.next}i=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!i)return null;if(n===o)return i;var l,c=i,u=i.x,d=i.y,h=1/0;for(r=i;n>=r.x&&r.x>=u&&n!==r.x&&pointInTriangle(a<d?n:o,a,u,d,a<d?o:n,a,r.x,r.y)&&(l=Math.abs(a-r.y)/(n-r.x),locallyInside(r,e)&&(l<h||l===h&&(r.x>i.x||r.x===i.x&&sectorContainsSector(i,r)))&&(i=r,h=l)),(r=r.next)!==c;);return i}function sectorContainsSector(e,t){return area(e.prev,e,t.prev)<0&&area(t.next,e,e.next)<0}function indexCurve(e,t,i,r){for(var n=e;null===n.z&&(n.z=zOrder(n.x,n.y,t,i,r)),n.prevZ=n.prev,n.nextZ=n.next,(n=n.next)!==e;);n.prevZ.nextZ=null,n.prevZ=null,sortLinked(n)}function sortLinked(e){var t,i,r,n,a,o,s,l,c=1;do{for(i=e,a=e=null,o=0;i;){for(o++,r=i,t=s=0;t<c&&(s++,r=r.nextZ);t++);for(l=c;0<s||0<l&&r;)0!==s&&(0===l||!r||i.z<=r.z)?(i=(n=i).nextZ,s--):(r=(n=r).nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;i=r}a.nextZ=null,c*=2}while(1<o);return e}function zOrder(e,t,i,r,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function getLeftmost(e){for(var t=e,i=e;(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),(t=t.next)!==e;);return i}function pointInTriangle(e,t,i,r,n,a,o,s){return 0<=(n-o)*(t-s)-(e-o)*(a-s)&&0<=(e-o)*(r-s)-(i-o)*(t-s)&&0<=(i-o)*(a-s)-(n-o)*(r-s)}function isValidDiagonal(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!intersectsPolygon(e,t)&&(locallyInside(e,t)&&locallyInside(t,e)&&middleInside(e,t)&&(area(e.prev,e,t.prev)||area(e,t.prev,t))||equals(e,t)&&0<area(e.prev,e,e.next)&&0<area(t.prev,t,t.next))}function area(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function equals(e,t){return e.x===t.x&&e.y===t.y}function intersects(e,t,i,r){var n=sign(area(e,t,i)),a=sign(area(e,t,r)),o=sign(area(i,r,e)),s=sign(area(i,r,t));return n!==a&&o!==s||0===n&&onSegment(e,i,t)||0===a&&onSegment(e,r,t)||0===o&&onSegment(i,e,r)||!(0!==s||!onSegment(i,t,r))}function onSegment(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function sign(e){return 0<e?1:e<0?-1:0}function intersectsPolygon(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&intersects(i,i.next,e,t))return 1;i=i.next}while(i!==e)}function locallyInside(e,t){return area(e.prev,e,e.next)<0?0<=area(e,t,e.next)&&0<=area(e,e.prev,t):area(e,t,e.prev)<0||area(e,e.next,t)<0}function middleInside(e,t){for(var i=e,r=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;i.y>a!=i.next.y>a&&i.next.y!==i.y&&n<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(r=!r),(i=i.next)!==e;);return r}function splitPolygon(e,t){var i=new Node$1(e.i,e.x,e.y),r=new Node$1(t.i,t.x,t.y),n=e.next,a=t.prev;return(e.next=t).prev=e,(i.next=n).prev=i,(r.next=i).prev=r,(a.next=r).prev=a,r}function insertNode(e,t,i,r){return i=new Node$1(e,t,i),r?(i.next=r.next,(i.prev=r).next.prev=i,r.next=i):(i.prev=i).next=i,i}function removeNode(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Node$1(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function signedArea(e,t,i,r){for(var n=0,a=t,o=i-r;a<i;a+=r)n+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return n}Object.defineProperties(EllipsoidRhumbLine.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}}),EllipsoidRhumbLine.fromStartHeadingDistance=function(e,t,i,r,n){var a=defaultValue(r,Ellipsoid.WGS84),o=(o=a.maximumRadius)*o,s=(s=a.minimumRadius)*s;o=Math.sqrt((o-s)/o),o=interpolateUsingSurfaceDistance(e,t=CesiumMath.negativePiToPi(t),i,a.maximumRadius,o);return!defined(n)||defined(r)&&!r.equals(n.ellipsoid)?new EllipsoidRhumbLine(e,o,a):(n.setEndPoints(e,o),n)},EllipsoidRhumbLine.prototype.setEndPoints=function(e,t){computeProperties(this,e,t,this._ellipsoid)},EllipsoidRhumbLine.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance=function(e,t){return interpolateUsingSurfaceDistance(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},EllipsoidRhumbLine.prototype.findIntersectionWithLongitude=function(e,t){var i=this._ellipticity,r=this._heading,n=Math.abs(r),a=this._start;if(e=CesiumMath.negativePiToPi(e),CesiumMath.equalsEpsilon(Math.abs(e),Math.PI,CesiumMath.EPSILON14)&&(e=CesiumMath.sign(a.longitude)*Math.PI),defined(t)||(t=new Cartographic),Math.abs(CesiumMath.PI_OVER_TWO-n)<=CesiumMath.EPSILON8)return t.longitude=e,t.latitude=a.latitude,t.height=0,t;if(CesiumMath.equalsEpsilon(Math.abs(CesiumMath.PI_OVER_TWO-n),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8)){if(CesiumMath.equalsEpsilon(e,a.longitude,CesiumMath.EPSILON12))return;return t.longitude=e,t.latitude=CesiumMath.PI_OVER_TWO*CesiumMath.sign(CesiumMath.PI_OVER_TWO-r),t.height=0,t}var o,s=a.latitude,l=(n=i*Math.sin(s),Math.tan(.5*(CesiumMath.PI_OVER_TWO+s))*Math.exp((e-a.longitude)/Math.tan(r))),c=(1+n)/(1-n),u=a.latitude;do{o=u;var d=(1+(d=i*Math.sin(o)))/(1-d);u=2*Math.atan(l*Math.pow(d/c,i/2))-CesiumMath.PI_OVER_TWO}while(!CesiumMath.equalsEpsilon(u,o,CesiumMath.EPSILON12));return t.longitude=e,t.latitude=u,t.height=0,t},EllipsoidRhumbLine.prototype.findIntersectionWithLatitude=function(e,t){var i=this._ellipticity,r=this._heading,n=this._start;if(!CesiumMath.equalsEpsilon(Math.abs(r),CesiumMath.PI_OVER_TWO,CesiumMath.EPSILON8)){var a=calculateSigma(i,n.latitude);i=calculateSigma(i,e),a=Math.tan(r)*(i-a),a=CesiumMath.negativePiToPi(n.longitude+a);return defined(t)?(t.longitude=a,t.latitude=e,t.height=0,t):new Cartographic(a,e,0)}},earcut.deviation=function(e,t,i,r){var n=t&&t.length,a=n?t[0]*i:e.length,o=Math.abs(signedArea(e,0,a,i));if(n)for(var s=0,l=t.length;s<l;s++){var c=t[s]*i,u=s<l-1?t[s+1]*i:e.length;o-=Math.abs(signedArea(e,c,u,i))}var d=0;for(s=0;s<r.length;s+=3){var h=r[s]*i,p=r[s+1]*i,f=r[s+2]*i;d+=Math.abs((e[h]-e[f])*(e[1+p]-e[1+h])-(e[h]-e[p])*(e[1+f]-e[1+h]))}return 0===o&&0===d?0:Math.abs((d-o)/o)},earcut.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},r=0,n=0;n<e.length;n++){for(var a=0;a<e[n].length;a++)for(var o=0;o<t;o++)i.vertices.push(e[n][a][o]);0<n&&(r+=e[n-1].length,i.holes.push(r))}return i};var WindingOrder={CLOCKWISE:WebGLConstants$1.CW,COUNTER_CLOCKWISE:WebGLConstants$1.CCW,validate:function(e){return e===WindingOrder.CLOCKWISE||e===WindingOrder.COUNTER_CLOCKWISE}},WindingOrder$1=Object.freeze(WindingOrder),scaleToGeodeticHeightN=new Cartesian3,scaleToGeodeticHeightP=new Cartesian3,PolygonPipeline={computeArea2D:function(e){for(var t=e.length,i=0,r=t-1,n=0;n<t;r=n++){var a=e[r],o=e[n];i+=a.x*o.y-o.x*a.y}return.5*i},computeWindingOrder2D:function(e){return 0<PolygonPipeline.computeArea2D(e)?WindingOrder$1.COUNTER_CLOCKWISE:WindingOrder$1.CLOCKWISE},triangulate:function(e,t){return earcut(Cartesian2.packArray(e),t,2)}},subdivisionV0Scratch=new Cartesian3,subdivisionV1Scratch=new Cartesian3,subdivisionV2Scratch=new Cartesian3,subdivisionS0Scratch=new Cartesian3,subdivisionS1Scratch=new Cartesian3,subdivisionS2Scratch=new Cartesian3,subdivisionMidScratch=new Cartesian3;PolygonPipeline.computeSubdivision=function(e,t,i,r){r=defaultValue(r,CesiumMath.RADIANS_PER_DEGREE);for(var n=i.slice(0),a=t.length,o=new Array(3*a),s=0,l=0;l<a;l++){var c=t[l];o[s++]=c.x,o[s++]=c.y,o[s++]=c.z}for(var u=[],d={},h=e.maximumRadius,p=(r=CesiumMath.chordLength(r,h))*r;0<n.length;){var f,m,g=n.pop(),y=n.pop(),_=n.pop(),v=Cartesian3.fromArray(o,3*_,subdivisionV0Scratch),C=Cartesian3.fromArray(o,3*y,subdivisionV1Scratch),x=Cartesian3.fromArray(o,3*g,subdivisionV2Scratch),b=Cartesian3.multiplyByScalar(Cartesian3.normalize(v,subdivisionS0Scratch),h,subdivisionS0Scratch),S=Cartesian3.multiplyByScalar(Cartesian3.normalize(C,subdivisionS1Scratch),h,subdivisionS1Scratch),T=Cartesian3.multiplyByScalar(Cartesian3.normalize(x,subdivisionS2Scratch),h,subdivisionS2Scratch),E=Cartesian3.magnitudeSquared(Cartesian3.subtract(b,S,subdivisionMidScratch));S=Cartesian3.magnitudeSquared(Cartesian3.subtract(S,T,subdivisionMidScratch)),T=Cartesian3.magnitudeSquared(Cartesian3.subtract(T,b,subdivisionMidScratch));p<(b=Math.max(E,S,T))?E===b?(defined(l=d[f=Math.min(_,y)+" "+Math.max(_,y)])||(m=Cartesian3.add(v,C,subdivisionMidScratch),Cartesian3.multiplyByScalar(m,.5,m),o.push(m.x,m.y,m.z),l=o.length/3-1,d[f]=l),n.push(_,l,g),n.push(l,y,g)):S===b?(defined(l=d[f=Math.min(y,g)+" "+Math.max(y,g)])||(m=Cartesian3.add(C,x,subdivisionMidScratch),Cartesian3.multiplyByScalar(m,.5,m),o.push(m.x,m.y,m.z),l=o.length/3-1,d[f]=l),n.push(y,l,_),n.push(l,g,_)):T===b&&(defined(l=d[f=Math.min(g,_)+" "+Math.max(g,_)])||(m=Cartesian3.add(x,v,subdivisionMidScratch),Cartesian3.multiplyByScalar(m,.5,m),o.push(m.x,m.y,m.z),l=o.length/3-1,d[f]=l),n.push(g,l,y),n.push(l,_,y)):(u.push(_),u.push(y),u.push(g))}return new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:o})},indices:u,primitiveType:PrimitiveType$1.TRIANGLES})};var subdivisionC0Scratch=new Cartographic,subdivisionC1Scratch=new Cartographic,subdivisionC2Scratch=new Cartographic,subdivisionCartographicScratch=new Cartographic;function Queue(){this._array=[],this._offset=0,this._length=0}PolygonPipeline.computeRhumbLineSubdivision=function(e,t,i,r){r=defaultValue(r,CesiumMath.RADIANS_PER_DEGREE);for(var n=i.slice(0),a=t.length,o=new Array(3*a),s=0,l=0;l<a;l++){var c=t[l];o[s++]=c.x,o[s++]=c.y,o[s++]=c.z}for(var u=[],d={},h=(i=e.maximumRadius,CesiumMath.chordLength(r,i)),p=new EllipsoidRhumbLine(void 0,void 0,e),f=new EllipsoidRhumbLine(void 0,void 0,e),m=new EllipsoidRhumbLine(void 0,void 0,e);0<n.length;){var g=n.pop(),y=n.pop(),_=n.pop(),v=Cartesian3.fromArray(o,3*_,subdivisionV0Scratch),C=Cartesian3.fromArray(o,3*y,subdivisionV1Scratch),x=Cartesian3.fromArray(o,3*g,subdivisionV2Scratch),b=e.cartesianToCartographic(v,subdivisionC0Scratch),S=e.cartesianToCartographic(C,subdivisionC1Scratch),T=e.cartesianToCartographic(x,subdivisionC2Scratch);p.setEndPoints(b,S);var E=p.surfaceDistance;f.setEndPoints(S,T),v=f.surfaceDistance,m.setEndPoints(T,b);var w,A,P,D;C=m.surfaceDistance;h<(x=Math.max(E,v,C))?E===x?(defined(l=d[w=Math.min(_,y)+" "+Math.max(_,y)])||(A=p.interpolateUsingFraction(.5,subdivisionCartographicScratch),P=.5*(b.height+S.height),D=Cartesian3.fromRadians(A.longitude,A.latitude,P,e,subdivisionMidScratch),o.push(D.x,D.y,D.z),l=o.length/3-1,d[w]=l),n.push(_,l,g),n.push(l,y,g)):v===x?(defined(l=d[w=Math.min(y,g)+" "+Math.max(y,g)])||(A=f.interpolateUsingFraction(.5,subdivisionCartographicScratch),P=.5*(S.height+T.height),D=Cartesian3.fromRadians(A.longitude,A.latitude,P,e,subdivisionMidScratch),o.push(D.x,D.y,D.z),l=o.length/3-1,d[w]=l),n.push(y,l,_),n.push(l,g,_)):C===x&&(defined(l=d[w=Math.min(g,_)+" "+Math.max(g,_)])||(A=m.interpolateUsingFraction(.5,subdivisionCartographicScratch),P=.5*(T.height+b.height),D=Cartesian3.fromRadians(A.longitude,A.latitude,P,e,subdivisionMidScratch),o.push(D.x,D.y,D.z),l=o.length/3-1,d[w]=l),n.push(g,l,y),n.push(l,_,y)):(u.push(_),u.push(y),u.push(g))}return new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:o})},indices:u,primitiveType:PrimitiveType$1.TRIANGLES})},PolygonPipeline.scaleToGeodeticHeight=function(e,t,i,r){i=defaultValue(i,Ellipsoid.WGS84);var n=scaleToGeodeticHeightN,a=scaleToGeodeticHeightP;if(t=defaultValue(t,0),r=defaultValue(r,!0),defined(e))for(var o=e.length,s=0;s<o;s+=3)Cartesian3.fromArray(e,s,a),r&&(a=i.scaleToGeodeticSurface(a,a)),0!==t&&(n=i.geodeticSurfaceNormal(a,n),Cartesian3.multiplyByScalar(n,t,n),Cartesian3.add(a,n,a)),e[s]=a.x,e[s+1]=a.y,e[s+2]=a.z;return e},Object.defineProperties(Queue.prototype,{length:{get:function(){return this._length}}}),Queue.prototype.enqueue=function(e){this._array.push(e),this._length++},Queue.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,10<++t&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},Queue.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},Queue.prototype.contains=function(e){return-1!==this._array.indexOf(e)},Queue.prototype.clear=function(){this._array.length=this._offset=this._length=0},Queue.prototype.sort=function(e){0<this._offset&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var PolygonGeometryLibrary={computeHierarchyPackedLength:function(e){for(var t=0,i=[e];0<i.length;){var r=i.pop();if(defined(r)){t+=2;var n=r.positions,a=r.holes;if(defined(n)&&(t+=n.length*Cartesian3.packedLength),defined(a))for(var o=a.length,s=0;s<o;++s)i.push(a[s])}}return t},packPolygonHierarchy:function(e,t,i){for(var r=[e];0<r.length;){var n=r.pop();if(defined(n)){var a=n.positions,o=n.holes;if(t[i++]=defined(a)?a.length:0,t[i++]=defined(o)?o.length:0,defined(a))for(var s=a.length,l=0;l<s;++l,i+=3)Cartesian3.pack(a[l],t,i);if(defined(o))for(var c=o.length,u=0;u<c;++u)r.push(o[u])}}return i},unpackPolygonHierarchy:function(e,t){for(var i=e[t++],r=e[t++],n=new Array(i),a=0<r?new Array(r):void 0,o=0;o<i;++o,t+=Cartesian3.packedLength)n[o]=Cartesian3.unpack(e,t);for(var s=0;s<r;++s)a[s]=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t),t=a[s].startingIndex,delete a[s].startingIndex;return{positions:n,holes:a,startingIndex:t}}},distanceScratch$3=new Cartesian3;function getPointAtDistance(e,t,i,r){return Cartesian3.subtract(t,e,distanceScratch$3),Cartesian3.multiplyByScalar(distanceScratch$3,i/r,distanceScratch$3),Cartesian3.add(e,distanceScratch$3,distanceScratch$3),[distanceScratch$3.x,distanceScratch$3.y,distanceScratch$3.z]}PolygonGeometryLibrary.subdivideLineCount=function(e,t,i){return i=Cartesian3.distance(e,t)/i,i=Math.max(0,Math.ceil(CesiumMath.log2(i))),Math.pow(2,i)};var scratchCartographic0=new Cartographic,scratchCartographic1=new Cartographic,scratchCartographic2=new Cartographic,scratchCartesian0=new Cartesian3;PolygonGeometryLibrary.subdivideRhumbLineCount=function(e,t,i,r){return r=new EllipsoidRhumbLine(e.cartesianToCartographic(t,scratchCartographic0),e.cartesianToCartographic(i,scratchCartographic1),e).surfaceDistance/r,r=Math.max(0,Math.ceil(CesiumMath.log2(r))),Math.pow(2,r)},PolygonGeometryLibrary.subdivideLine=function(e,t,i,r){var n=PolygonGeometryLibrary.subdivideLineCount(e,t,i),a=Cartesian3.distance(e,t),o=a/n;defined(r)||(r=[]);var s=r;s.length=3*n;for(var l=0,c=0;c<n;c++){var u=getPointAtDistance(e,t,c*o,a);s[l++]=u[0],s[l++]=u[1],s[l++]=u[2]}return s},PolygonGeometryLibrary.subdivideRhumbLine=function(e,t,i,r,n){var a=new EllipsoidRhumbLine(e.cartesianToCartographic(t,scratchCartographic0),e.cartesianToCartographic(i,scratchCartographic1),e),o=(r=a.surfaceDistance/r,r=Math.max(0,Math.ceil(CesiumMath.log2(r))),Math.pow(2,r)),s=a.surfaceDistance/o;defined(n)||(n=[]);var l=n;l.length=3*o;for(var c=0,u=0;u<o;u++){var d=a.interpolateUsingSurfaceDistance(u*s,scratchCartographic2);d=e.cartographicToCartesian(d,scratchCartesian0);l[c++]=d.x,l[c++]=d.y,l[c++]=d.z}return l};var scaleToGeodeticHeightN1=new Cartesian3,scaleToGeodeticHeightN2=new Cartesian3,scaleToGeodeticHeightP1=new Cartesian3,scaleToGeodeticHeightP2=new Cartesian3;PolygonGeometryLibrary.scaleToGeodeticHeightExtruded=function(e,t,i,r,n){r=defaultValue(r,Ellipsoid.WGS84);var a=scaleToGeodeticHeightN1,o=scaleToGeodeticHeightN2,s=scaleToGeodeticHeightP1,l=scaleToGeodeticHeightP2;if(defined(e)&&defined(e.attributes)&&defined(e.attributes.position))for(var c=e.attributes.position.values,u=c.length/2,d=0;d<u;d+=3)Cartesian3.fromArray(c,d,s),r.geodeticSurfaceNormal(s,a),l=r.scaleToGeodeticSurface(s,l),o=Cartesian3.multiplyByScalar(a,i,o),o=Cartesian3.add(l,o,o),c[d+u]=o.x,c[d+1+u]=o.y,c[d+2+u]=o.z,n&&(l=Cartesian3.clone(s,l)),o=Cartesian3.multiplyByScalar(a,t,o),o=Cartesian3.add(l,o,o),c[d]=o.x,c[d+1]=o.y,c[d+2]=o.z;return e},PolygonGeometryLibrary.polygonOutlinesFromHierarchy=function(e,t,i){var r,n,a=[],o=new Queue;for(o.enqueue(e);0!==o.length;){var s=o.dequeue(),l=s.positions;if(t)for(n=l.length,u=0;u<n;u++)i.scaleToGeodeticSurface(l[u],l[u]);if(!((l=arrayRemoveDuplicates(l,Cartesian3.equalsEpsilon,!0)).length<3)){for(var c=s.holes?s.holes.length:0,u=0;u<c;u++){var d=s.holes[u],h=d.positions;if(t)for(n=h.length,r=0;r<n;++r)i.scaleToGeodeticSurface(h[r],h[r]);if(!((h=arrayRemoveDuplicates(h,Cartesian3.equalsEpsilon,!0)).length<3)){a.push(h);var p=0;for(defined(d.holes)&&(p=d.holes.length),r=0;r<p;r++)o.enqueue(d.holes[r])}}a.push(l)}}return a},PolygonGeometryLibrary.polygonsFromHierarchy=function(e,t,i,r){var n=[],a=[],o=new Queue;for(o.enqueue(e);0!==o.length;){var s,l=o.dequeue(),c=l.positions,u=l.holes;if(i)for(s=c.length,y=0;y<s;y++)r.scaleToGeodeticSurface(c[y],c[y]);if(!((c=arrayRemoveDuplicates(c,Cartesian3.equalsEpsilon,!0)).length<3)){var d=t(c);if(defined(d)){var h=[];PolygonPipeline.computeWindingOrder2D(d)===WindingOrder$1.CLOCKWISE&&(d.reverse(),c=c.slice().reverse());for(var p,f=c.slice(),m=defined(u)?u.length:0,g=[],y=0;y<m;y++){var _=u[y],v=_.positions;if(i)for(s=v.length,p=0;p<s;++p)r.scaleToGeodeticSurface(v[p],v[p]);if(!((v=arrayRemoveDuplicates(v,Cartesian3.equalsEpsilon,!0)).length<3)){var C=t(v);if(defined(C)){PolygonPipeline.computeWindingOrder2D(C)===WindingOrder$1.CLOCKWISE&&(C.reverse(),v=v.slice().reverse()),g.push(v),h.push(f.length),f=f.concat(v),d=d.concat(C);var x=0;for(defined(_.holes)&&(x=_.holes.length),p=0;p<x;p++)o.enqueue(_.holes[p])}}}n.push({outerRing:c,holes:g}),a.push({positions:f,positions2D:d,holes:h})}}}return{hierarchy:n,polygons:a}};var computeBoundingRectangleCartesian2=new Cartesian2,computeBoundingRectangleCartesian3=new Cartesian3,computeBoundingRectangleQuaternion=new Quaternion,computeBoundingRectangleMatrix3=new Matrix3;PolygonGeometryLibrary.computeBoundingRectangle=function(e,t,i,r,n){r=Quaternion.fromAxisAngle(e,r,computeBoundingRectangleQuaternion);for(var a=Matrix3.fromQuaternion(r,computeBoundingRectangleMatrix3),o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=i.length,d=0;d<u;++d){var h=Cartesian3.clone(i[d],computeBoundingRectangleCartesian3);Matrix3.multiplyByVector(a,h,h),defined(h=t(h,computeBoundingRectangleCartesian2))&&(o=Math.min(o,h.x),s=Math.max(s,h.x),l=Math.min(l,h.y),c=Math.max(c,h.y))}return n.x=o,n.y=l,n.width=s-o,n.height=c-l,n},PolygonGeometryLibrary.createGeometryFromPositions=function(e,t,i,r,n,a){var o=PolygonPipeline.triangulate(t.positions2D,t.holes);o.length<3&&(o=[0,1,2]);var s=t.positions;if(r){for(var l=s.length,c=new Array(3*l),u=0,d=0;d<l;d++){var h=s[d];c[u++]=h.x,c[u++]=h.y,c[u++]=h.z}return r=new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:c})},indices:o,primitiveType:PrimitiveType$1.TRIANGLES}),n.normal?GeometryPipeline.computeNormal(r):r}return a===ArcType$1.GEODESIC?PolygonPipeline.computeSubdivision(e,s,o,i):a===ArcType$1.RHUMB?PolygonPipeline.computeRhumbLineSubdivision(e,s,o,i):void 0};var computeWallIndicesSubdivided=[],p1Scratch$1=new Cartesian3,p2Scratch$1=new Cartesian3;PolygonGeometryLibrary.computeWallGeometry=function(e,t,i,r,n){var a,o,s,l=e.length,c=0;if(r)for(o=3*l*2,a=new Array(2*o),s=0;s<l;s++)p=e[s],f=e[(s+1)%l],a[c]=a[c+o]=p.x,a[++c]=a[c+o]=p.y,a[++c]=a[c+o]=p.z,a[++c]=a[c+o]=f.x,a[++c]=a[c+o]=f.y,a[++c]=a[c+o]=f.z,++c;else{var u=CesiumMath.chordLength(i,t.maximumRadius),d=0;if(n===ArcType$1.GEODESIC)for(s=0;s<l;s++)d+=PolygonGeometryLibrary.subdivideLineCount(e[s],e[(s+1)%l],u);else if(n===ArcType$1.RHUMB)for(s=0;s<l;s++)d+=PolygonGeometryLibrary.subdivideRhumbLineCount(t,e[s],e[(s+1)%l],u);for(o=3*(d+l),a=new Array(2*o),s=0;s<l;s++){var h,p=e[s],f=e[(s+1)%l];n===ArcType$1.GEODESIC?h=PolygonGeometryLibrary.subdivideLine(p,f,u,computeWallIndicesSubdivided):n===ArcType$1.RHUMB&&(h=PolygonGeometryLibrary.subdivideRhumbLine(t,p,f,u,computeWallIndicesSubdivided));for(var m=h.length,g=0;g<m;++g,++c)a[c]=h[g],a[c+o]=h[g];a[c]=f.x,a[c+o]=f.x,a[++c]=f.y,a[c+o]=f.y,a[++c]=f.z,a[c+o]=f.z,++c}}l=a.length;var y=IndexDatatype$1.createTypedArray(l/3,l-6*e.length),_=0;for(l/=6,s=0;s<l;s++){var v=s,C=v+1,x=v+l,b=x+1;p=Cartesian3.fromArray(a,3*v,p1Scratch$1),f=Cartesian3.fromArray(a,3*C,p2Scratch$1),Cartesian3.equalsEpsilon(p,f,CesiumMath.EPSILON10,CesiumMath.EPSILON10)||(y[_++]=v,y[_++]=x,y[_++]=C,y[_++]=C,y[_++]=x,y[_++]=b)}return new Geometry({attributes:new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:a})}),indices:y,primitiveType:PrimitiveType$1.TRIANGLES})};var scratchPosition=new Cartesian3,scratchBR=new BoundingRectangle,stScratch=new Cartesian2,textureCoordinatesOrigin=new Cartesian2,scratchNormal$3=new Cartesian3,scratchTangent$1=new Cartesian3,scratchBitangent$1=new Cartesian3,centerScratch=new Cartesian3,axis1Scratch=new Cartesian3,axis2Scratch=new Cartesian3,quaternionScratch$1=new Quaternion,textureMatrixScratch$1=new Matrix3,tangentRotationScratch=new Matrix3,surfaceNormalScratch=new Cartesian3;function createGeometryFromPolygon(e,t,i,r,n,a,o,s){var l=e.positions,c=PolygonPipeline.triangulate(e.positions2D,e.holes);c.length<3&&(c=[0,1,2]),(e=IndexDatatype$1.createTypedArray(l.length,c.length)).set(c);var u=textureMatrixScratch$1;0!==r?(c=Quaternion.fromAxisAngle(a,r,quaternionScratch$1),u=Matrix3.fromQuaternion(c,u),(t.tangent||t.bitangent)&&(c=Quaternion.fromAxisAngle(a,-r,quaternionScratch$1),p=Matrix3.fromQuaternion(c,tangentRotationScratch),o=Cartesian3.normalize(Matrix3.multiplyByVector(p,o,o),o),t.bitangent&&(s=Cartesian3.normalize(Cartesian3.cross(a,o,s),s)))):u=Matrix3.clone(Matrix3.IDENTITY,u);var d=textureCoordinatesOrigin;t.st&&(d.x=i.x,d.y=i.y);for(var h=l.length,p=3*h,f=new Float64Array(p),m=t.normal?new Float32Array(p):void 0,g=t.tangent?new Float32Array(p):void 0,y=t.bitangent?new Float32Array(p):void 0,_=t.st?new Float32Array(2*h):void 0,v=0,C=0,x=0,b=0,S=0,T=0;T<h;T++){var E,w=l[T];f[v++]=w.x,f[v++]=w.y,f[v++]=w.z,t.st&&(E=n(Matrix3.multiplyByVector(u,w,scratchPosition),stScratch),Cartesian2.subtract(E,d,E),w=CesiumMath.clamp(E.x/i.width,0,1),E=CesiumMath.clamp(E.y/i.height,0,1),_[S++]=w,_[S++]=E),t.normal&&(m[C++]=a.x,m[C++]=a.y,m[C++]=a.z),t.tangent&&(g[b++]=o.x,g[b++]=o.y,g[b++]=o.z),t.bitangent&&(y[x++]=s.x,y[x++]=s.y,y[x++]=s.z)}return p=new GeometryAttributes,t.position&&(p.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:f})),t.normal&&(p.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:m})),t.tangent&&(p.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:g})),t.bitangent&&(p.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:y})),t.st&&(p.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:_})),new Geometry({attributes:p,indices:e,primitiveType:PrimitiveType$1.TRIANGLES})}function CoplanarPolygonGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).polygonHierarchy,i=defaultValue(e.vertexFormat,VertexFormat.DEFAULT);this._vertexFormat=VertexFormat.clone(i),this._polygonHierarchy=t,this._stRotation=defaultValue(e.stRotation,0),this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=PolygonGeometryLibrary.computeHierarchyPackedLength(t)+VertexFormat.packedLength+Ellipsoid.packedLength+2}CoplanarPolygonGeometry.fromPositions=function(e){return new CoplanarPolygonGeometry({polygonHierarchy:{positions:(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},CoplanarPolygonGeometry.pack=function(e,t,i){return i=defaultValue(i,0),i=PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i),Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._stRotation,t[i]=e.packedLength,t};var scratchEllipsoid$2=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$2=new VertexFormat,scratchOptions$6={polygonHierarchy:{}};function createGeometryFromPositions(e){for(var t=e.length,i=new Float64Array(3*t),r=IndexDatatype$1.createTypedArray(t,2*t),n=0,a=0,o=0;o<t;o++){var s=e[o];i[n++]=s.x,i[n++]=s.y,i[n++]=s.z,r[a++]=o,r[a++]=(o+1)%t}return new Geometry({attributes:new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:i})}),indices:r,primitiveType:PrimitiveType$1.LINES})}function CoplanarPolygonOutlineGeometry(e){e=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).polygonHierarchy,this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=PolygonGeometryLibrary.computeHierarchyPackedLength(e)+1}CoplanarPolygonGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$2);t+=Ellipsoid.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$2);t+=VertexFormat.packedLength;var o=e[t++];t=e[t];return defined(i)||(i=new CoplanarPolygonGeometry(scratchOptions$6)),i._polygonHierarchy=r,i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._stRotation=o,i.packedLength=t,i},CoplanarPolygonGeometry.createGeometry=function(e){var t=e._vertexFormat,i=e._polygonHierarchy,r=e._stRotation,n=i.positions;if(!((n=arrayRemoveDuplicates(n,Cartesian3.equalsEpsilon,!0)).length<3)){var a=scratchNormal$3,o=scratchTangent$1,s=scratchBitangent$1,l=axis1Scratch,c=axis2Scratch;if(CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(n,centerScratch,l,c)){a=Cartesian3.cross(l,c,a),a=Cartesian3.normalize(a,a),Cartesian3.equalsEpsilon(centerScratch,Cartesian3.ZERO,CesiumMath.EPSILON6)||(u=e._ellipsoid.geodeticSurfaceNormal(centerScratch,surfaceNormalScratch),Cartesian3.dot(a,u)<0&&(a=Cartesian3.negate(a,a),l=Cartesian3.negate(l,l)));var u=CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(centerScratch,l,c),d=CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(centerScratch,l,c);t.tangent&&(o=Cartesian3.clone(l,o)),t.bitangent&&(s=Cartesian3.clone(c,s));u=(i=PolygonGeometryLibrary.polygonsFromHierarchy(i,u,!1)).hierarchy;var h=i.polygons;if(0!==u.length){n=u[0].outerRing;i=BoundingSphere.fromPoints(n);for(var p=PolygonGeometryLibrary.computeBoundingRectangle(a,d,n,r,scratchBR),f=[],m=0;m<h.length;m++){var g=new GeometryInstance({geometry:createGeometryFromPolygon(h[m],t,p,r,d,a,o,s)});f.push(g)}return(u=GeometryPipeline.combineInstances(f)[0]).attributes.position.values=new Float64Array(u.attributes.position.values),u.indices=IndexDatatype$1.createTypedArray(u.attributes.position.values.length/3,u.indices),n=u.attributes,t.position||delete n.position,new Geometry({attributes:n,indices:u.indices,primitiveType:u.primitiveType,boundingSphere:i})}}}},CoplanarPolygonOutlineGeometry.fromPositions=function(e){return new CoplanarPolygonOutlineGeometry({polygonHierarchy:{positions:(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions}})},CoplanarPolygonOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),t[i=PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i)]=e.packedLength,t};var scratchOptions$7={polygonHierarchy:{}};CoplanarPolygonOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);return t=r.startingIndex,delete r.startingIndex,t=e[t],defined(i)||(i=new CoplanarPolygonOutlineGeometry(scratchOptions$7)),i._polygonHierarchy=r,i.packedLength=t,i},CoplanarPolygonOutlineGeometry.createGeometry=function(e){var t=e._polygonHierarchy;if(!((e=arrayRemoveDuplicates(e=t.positions,Cartesian3.equalsEpsilon,!0)).length<3)&&CoplanarPolygonGeometryLibrary.validOutline(e)){var i=PolygonGeometryLibrary.polygonOutlinesFromHierarchy(t,!1);if(0!==i.length){for(var r=[],n=0;n<i.length;n++){var a=new GeometryInstance({geometry:createGeometryFromPositions(i[n])});r.push(a)}return e=GeometryPipeline.combineInstances(r)[0],t=BoundingSphere.fromPoints(t.positions),new Geometry({attributes:e.attributes,indices:e.indices,primitiveType:e.primitiveType,boundingSphere:t})}}};var CornerType={ROUNDED:0,MITERED:1,BEVELED:2},CornerType$1=Object.freeze(CornerType);function setConstants(e){var t=e._uSquared,i=e._ellipsoid.maximumRadius,r=e._ellipsoid.minimumRadius,n=(i-r)/i,a=Math.cos(e._startHeading),o=Math.sin(e._startHeading),s=(1-n)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+s*s),c=l*s,u=Math.atan2(s,a),d=l*o,h=d*d,p=1-h,f=Math.sqrt(p),m=t/4,g=m*m,y=g*m,_=g*g,v=1+m-3*g/4+5*y/4-175*_/64,C=1-m+15*g/8-35*y/8,x=1-3*m+35*g/4,b=1-5*m;t=v*u-C*Math.sin(2*u)*m/2-x*Math.sin(4*u)*g/16-b*Math.sin(6*u)*y/48-5*Math.sin(8*u)*_/512;(e=e._constants).a=i,e.b=r,e.f=n,e.cosineHeading=a,e.sineHeading=o,e.tanU=s,e.cosineU=l,e.sineU=c,e.sigma=u,e.sineAlpha=d,e.sineSquaredAlpha=h,e.cosineSquaredAlpha=p,e.cosineAlpha=f,e.u2Over4=m,e.u4Over16=g,e.u6Over64=y,e.u8Over256=_,e.a0=v,e.a1=C,e.a2=x,e.a3=b,e.distanceRatio=t}function computeC(e,t){return e*t*(4+e*(4-3*t))/16}function computeDeltaLambda(e,t,i,r,n,a,o){return(1-(i=computeC(e,i)))*e*t*(r+i*n*(o+i*a*(2*o*o-1)))}function vincentyInverseFormula(e,t,i,r,n,a,o){var s=(t-i)/t,l=a-r,c=(r=Math.atan((1-s)*Math.tan(n)),n=Math.atan((1-s)*Math.tan(o)),o=Math.cos(r),r=Math.sin(r),Math.cos(n)),u=o*c,d=o*(n=Math.sin(n)),h=r*n,p=r*c,f=l,m=CesiumMath.TWO_PI,g=Math.cos(f),y=Math.sin(f);do{g=Math.cos(f),y=Math.sin(f);var _,v,C=d-p*g,x=Math.sqrt(c*c*y*y+C*C),b=h+u*g,S=Math.atan2(x,b),T=(m=f,b-2*h/(v=0===x?(_=0,1):1-(_=u*y/x)*_));isNaN(T)&&(T=0),f=l+computeDeltaLambda(s,_,v,S,x,b,T)}while(Math.abs(f-m)>CesiumMath.EPSILON12);r=i*(1+(n=v*(t*t-i*i)/(i*i))*(4096+n*(n*(320-175*n)-768))/16384)*(S-(r=n*(256+n*(n*(74-47*n)-128))/1024)*x*(T+r*(b*(2*(t=T*T)-1)-r*T*(4*x*x-3)*(4*t-3)/6)/4)),t=Math.atan2(c*y,d-p*g),o=Math.atan2(o*y,d*g-p),e._distance=r,e._startHeading=t,e._endHeading=o,e._uSquared=n}var scratchCart1$1=new Cartesian3,scratchCart2$1=new Cartesian3;function computeProperties$1(e,t,i,r){Cartesian3.normalize(r.cartographicToCartesian(t,scratchCart2$1),scratchCart1$1),Cartesian3.normalize(r.cartographicToCartesian(i,scratchCart2$1),scratchCart2$1),vincentyInverseFormula(e,r.maximumRadius,r.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude),e._start=Cartographic.clone(t,e._start),e._end=Cartographic.clone(i,e._end),e._start.height=0,e._end.height=0,setConstants(e)}function EllipsoidGeodesic(e,t,i){i=defaultValue(i,Ellipsoid.WGS84),this._ellipsoid=i,this._start=new Cartographic,this._end=new Cartographic,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,defined(e)&&defined(t)&&computeProperties$1(this,e,t,i)}Object.defineProperties(EllipsoidGeodesic.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),EllipsoidGeodesic.prototype.setEndPoints=function(e,t){computeProperties$1(this,e,t,this._ellipsoid)},EllipsoidGeodesic.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance=function(e,t){var i=this._constants,r=i.distanceRatio+e/i.b,n=Math.cos(2*r),a=Math.cos(4*r),o=Math.cos(6*r),s=Math.sin(2*r),l=Math.sin(4*r),c=Math.sin(6*r),u=Math.sin(8*r),d=r*(m=r*r),h=i.u8Over256,p=i.u2Over4,f=i.u6Over64,m=2*d*h*n/3+r*(1-p+7*(e=i.u4Over16)/4-15*f/4+579*h/64-(e-15*f/4+187*h/16)*n-(5*f/4-115*h/16)*a-29*h*o/16)+(p/2-e+71*f/32-85*h/16)*s+(5*e/16-5*f/4+383*h/96)*l-m*((f-11*h/2)*s+5*h*l/2)+(29*f/96-29*h/16)*c+539*h*u/1536;s=Math.asin(Math.sin(m)*i.cosineAlpha),l=Math.atan(i.a/i.b*Math.tan(s));return m-=i.sigma,f=Math.cos(2*i.sigma+m),c=Math.sin(m),h=Math.cos(m),u=i.cosineU*h,s=i.sineU*c,f=Math.atan2(c*i.sineHeading,u-s*i.cosineHeading)-computeDeltaLambda(i.f,i.sineAlpha,i.cosineSquaredAlpha,m,c,h,f),defined(t)?(t.longitude=this._start.longitude+f,t.latitude=l,t.height=0,t):new Cartographic(this._start.longitude+f,l,0)};var PolylinePipeline={numberOfPoints:function(e,t,i){return t=Cartesian3.distance(e,t),Math.ceil(t/i)},numberOfPointsRhumbLine:function(e,t,i){return t=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2),Math.max(1,Math.ceil(Math.sqrt(t/(i*i))))}},cartoScratch=new Cartographic;PolylinePipeline.extractHeights=function(e,t){for(var i=e.length,r=new Array(i),n=0;n<i;n++){var a=e[n];r[n]=t.cartesianToCartographic(a,cartoScratch).height}return r};var wrapLongitudeInversMatrix=new Matrix4,wrapLongitudeOrigin=new Cartesian3,wrapLongitudeXZNormal=new Cartesian3,wrapLongitudeXZPlane=new Plane(Cartesian3.UNIT_X,0),wrapLongitudeYZNormal=new Cartesian3,wrapLongitudeYZPlane=new Plane(Cartesian3.UNIT_X,0),wrapLongitudeIntersection=new Cartesian3,wrapLongitudeOffset=new Cartesian3,subdivideHeightsScratchArray=[];function subdivideHeights(e,t,i){var r=subdivideHeightsScratchArray;if(r.length=e,t===i){for(a=0;a<e;a++)r[a]=t;return r}for(var n=(i-t)/e,a=0;a<e;a++){var o=t+a*n;r[a]=o}return r}var carto1=new Cartographic,carto2=new Cartographic,cartesian=new Cartesian3,scaleFirst=new Cartesian3,scaleLast=new Cartesian3,ellipsoidGeodesic=new EllipsoidGeodesic,ellipsoidRhumb=new EllipsoidRhumbLine;function generateCartesianArc(e,t,i,r,n,a,o,s){var l=r.scaleToGeodeticSurface(e,scaleFirst),c=r.scaleToGeodeticSurface(t,scaleLast),u=PolylinePipeline.numberOfPoints(e,t,i),d=(l=r.cartesianToCartographic(l,carto1),c=r.cartesianToCartographic(c,carto2),subdivideHeights(u,n,a));ellipsoidGeodesic.setEndPoints(l,c);var h=ellipsoidGeodesic.surfaceDistance/u,p=s;l.height=n;var f=r.cartographicToCartesian(l,cartesian);Cartesian3.pack(f,o,p),p+=3;for(var m=1;m<u;m++){var g=ellipsoidGeodesic.interpolateUsingSurfaceDistance(m*h,carto2);g.height=d[m],f=r.cartographicToCartesian(g,cartesian),Cartesian3.pack(f,o,p),p+=3}return p}function generateCartesianRhumbArc(e,t,i,r,n,a,o,s){e=r.cartesianToCartographic(e,carto1),t=r.cartesianToCartographic(t,carto2);var l=PolylinePipeline.numberOfPointsRhumbLine(e,t,i);e.height=0,t.height=0;var c=subdivideHeights(l,n,a);ellipsoidRhumb.ellipsoid.equals(r)||(ellipsoidRhumb=new EllipsoidRhumbLine(void 0,void 0,r)),ellipsoidRhumb.setEndPoints(e,t);var u=ellipsoidRhumb.surfaceDistance/l,d=s;e.height=n;var h=r.cartographicToCartesian(e,cartesian);Cartesian3.pack(h,o,d),d+=3;for(var p=1;p<l;p++){var f=ellipsoidRhumb.interpolateUsingSurfaceDistance(p*u,carto2);f.height=c[p],h=r.cartographicToCartesian(f,cartesian),Cartesian3.pack(h,o,d),d+=3}return d}PolylinePipeline.wrapLongitude=function(e,t){var i=[],r=[];if(defined(e)&&0<e.length){t=defaultValue(t,Matrix4.IDENTITY);var n=Matrix4.inverseTransformation(t,wrapLongitudeInversMatrix),a=(t=Matrix4.multiplyByPoint(n,Cartesian3.ZERO,wrapLongitudeOrigin),Cartesian3.normalize(Matrix4.multiplyByPointAsVector(n,Cartesian3.UNIT_Y,wrapLongitudeXZNormal),wrapLongitudeXZNormal)),o=Plane.fromPointNormal(t,a,wrapLongitudeXZPlane),s=(n=Cartesian3.normalize(Matrix4.multiplyByPointAsVector(n,Cartesian3.UNIT_X,wrapLongitudeYZNormal),wrapLongitudeYZNormal),Plane.fromPointNormal(t,n,wrapLongitudeYZPlane)),l=1;i.push(Cartesian3.clone(e[0]));for(var c=i[0],u=e.length,d=1;d<u;++d){var h,p,f=e[d];!(Plane.getPointDistance(s,c)<0||Plane.getPointDistance(s,f)<0)||defined(h=IntersectionTests.lineSegmentPlane(c,f,o,wrapLongitudeIntersection))&&(p=Cartesian3.multiplyByScalar(a,5e-9,wrapLongitudeOffset),Plane.getPointDistance(o,c)<0&&Cartesian3.negate(p,p),i.push(Cartesian3.add(h,p,new Cartesian3)),r.push(l+1),Cartesian3.negate(p,p),i.push(Cartesian3.add(h,p,new Cartesian3)),l=1),i.push(Cartesian3.clone(e[d])),l++,c=f}r.push(l)}return{positions:i,lengths:r}},PolylinePipeline.generateArc=function(e){defined(e)||(e={});var t=e.positions,i=t.length,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=defaultValue(e.height,0),a=Array.isArray(n);if(i<1)return[];if(1===i){var o,s=r.scaleToGeodeticSurface(t[0],scaleFirst);return 0!==(n=a?n[0]:n)&&(o=r.geodeticSurfaceNormal(s,cartesian),Cartesian3.multiplyByScalar(o,n,o),Cartesian3.add(s,o,s)),[s.x,s.y,s.z]}var l=e.minDistance;defined(l)||(p=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),l=CesiumMath.chordLength(p,r.maximumRadius));for(var c=0,u=0;u<i-1;u++)c+=PolylinePipeline.numberOfPoints(t[u],t[u+1],l);e=3*(c+1);var d=new Array(e),h=0;for(u=0;u<i-1;u++)h=generateCartesianArc(t[u],t[u+1],l,r,a?n[u]:n,a?n[u+1]:n,d,h);subdivideHeightsScratchArray.length=0;var p=t[i-1];return(p=r.cartesianToCartographic(p,carto1)).height=a?n[i-1]:n,p=r.cartographicToCartesian(p,cartesian),Cartesian3.pack(p,d,e-3),d};var scratchCartographic0$1=new Cartographic,scratchCartographic1$1=new Cartographic;PolylinePipeline.generateRhumbArc=function(e){defined(e)||(e={});var t=e.positions,i=t.length,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=defaultValue(e.height,0),a=Array.isArray(n);if(i<1)return[];if(1===i){var o,s=r.scaleToGeodeticSurface(t[0],scaleFirst);return 0!==(n=a?n[0]:n)&&(o=r.geodeticSurfaceNormal(s,cartesian),Cartesian3.multiplyByScalar(o,n,o),Cartesian3.add(s,o,s)),[s.x,s.y,s.z]}for(var l,c=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),u=0,d=r.cartesianToCartographic(t[0],scratchCartographic0$1),h=0;h<i-1;h++)l=r.cartesianToCartographic(t[h+1],scratchCartographic1$1),u+=PolylinePipeline.numberOfPointsRhumbLine(d,l,c),d=Cartographic.clone(l,scratchCartographic0$1);s=3*(u+1);var p=new Array(s),f=0;for(h=0;h<i-1;h++)f=generateCartesianRhumbArc(t[h],t[h+1],c,r,a?n[h]:n,a?n[h+1]:n,p,f);return subdivideHeightsScratchArray.length=0,e=t[i-1],(e=r.cartesianToCartographic(e,carto1)).height=a?n[i-1]:n,e=r.cartographicToCartesian(e,cartesian),Cartesian3.pack(e,p,s-3),p},PolylinePipeline.generateCartesianArc=function(e){for(var t=PolylinePipeline.generateArc(e),i=t.length/3,r=new Array(i),n=0;n<i;n++)r[n]=Cartesian3.unpack(t,3*n);return r},PolylinePipeline.generateCartesianRhumbArc=function(e){for(var t=PolylinePipeline.generateRhumbArc(e),i=t.length/3,r=new Array(i),n=0;n<i;n++)r[n]=Cartesian3.unpack(t,3*n);return r};var scratch2Array=[new Cartesian3,new Cartesian3],scratchCartesian1$5=new Cartesian3,scratchCartesian2$5=new Cartesian3,scratchCartesian3$6=new Cartesian3,scratchCartesian4$2=new Cartesian3,scratchCartesian5$1=new Cartesian3,scratchCartesian6$1=new Cartesian3,scratchCartesian7=new Cartesian3,scratchCartesian8=new Cartesian3,scratchCartesian9=new Cartesian3,scratch1=new Cartesian3,scratch2=new Cartesian3,PolylineVolumeGeometryLibrary={},cartographic=new Cartographic;function scaleToSurface(e,t){for(var i=new Array(e.length),r=0;r<e.length;r++){var n=e[r];cartographic=t.cartesianToCartographic(n,cartographic),i[r]=cartographic.height,e[r]=t.scaleToGeodeticSurface(n,n)}return i}function subdivideHeights$1(e,t,i,r){var n=e[0],a=(e=e[1],e=Cartesian3.angleBetween(n,e),Math.ceil(e/r)),o=new Array(a);if(t===i){for(l=0;l<a;l++)o[l]=t;return o.push(i),o}for(var s=(i-t)/a,l=1;l<a;l++){var c=t+l*s;o[l]=c}return o[0]=t,o.push(i),o}var nextScratch=new Cartesian3,prevScratch=new Cartesian3;function computeRotationAngle(e,t,i,r){return e=(r=new EllipsoidTangentPlane(i,r)).projectPointOntoPlane(Cartesian3.add(i,e,nextScratch),nextScratch),i=r.projectPointOntoPlane(Cartesian3.add(i,t,prevScratch),prevScratch),t=Cartesian2.angleBetween(e,i),0<=i.x*e.y-i.y*e.x?-t:t}var negativeX=new Cartesian3(-1,0,0),transform=new Matrix4,translation=new Matrix4,rotationZ=new Matrix3,scaleMatrix=Matrix3.IDENTITY.clone(),westScratch$1=new Cartesian3,finalPosScratch=new Cartesian4,heightCartesian=new Cartesian3;function addPosition(e,t,i,r,n,a,o,s){var l=westScratch$1,c=finalPosScratch;transform=Transforms.eastNorthUpToFixedFrame(e,n,transform),l=Matrix4.multiplyByPointAsVector(transform,negativeX,l),n=computeRotationAngle(Cartesian3.normalize(l,l),t,e,n),rotationZ=Matrix3.fromRotationZ(n,rotationZ),heightCartesian.z=a,transform=Matrix4.multiplyTransformation(transform,Matrix4.fromRotationTranslation(rotationZ,heightCartesian,translation),transform);var u=scaleMatrix;u[0]=o;for(var d=0;d<s;d++)for(var h=0;h<i.length;h+=3)c=Cartesian3.fromArray(i,h,c),c=Matrix3.multiplyByVector(u,c,c),c=Matrix4.multiplyByPoint(transform,c,c),r.push(c.x,c.y,c.z);return r}var centerScratch$1=new Cartesian3;function addPositions(e,t,i,r,n,a,o){for(var s=0;s<e.length;s+=3)r=addPosition(Cartesian3.fromArray(e,s,centerScratch$1),t,i,r,n,a[s/3],o,1);return r}function convertShapeTo3DDuplicate(e,t){var i=e.length,r=new Array(6*i),n=0,a=t.x+t.width/2,o=t.y+t.height/2,s=e[0];r[n++]=s.x-a,r[n++]=0,r[n++]=s.y-o;for(var l=1;l<i;l++){var c=(s=e[l]).x-a,u=s.y-o;r[n++]=c,r[n++]=0,r[n++]=u,r[n++]=c,r[n++]=0,r[n++]=u}return s=e[0],r[n++]=s.x-a,r[n++]=0,r[n++]=s.y-o,r}function convertShapeTo3D(e,t){for(var i=e.length,r=new Array(3*i),n=0,a=t.x+t.width/2,o=t.y+t.height/2,s=0;s<i;s++)r[n++]=e[s].x-a,r[n++]=0,r[n++]=e[s].y-o;return r}var quaterion=new Quaternion,startPointScratch=new Cartesian3,rotMatrix=new Matrix3;function computeRoundCorner(e,t,i,r,n,a,o,s,l,c){var u,d=Cartesian3.angleBetween(Cartesian3.subtract(t,e,scratch1),Cartesian3.subtract(i,e,scratch2)),h=r===CornerType$1.BEVELED?0:Math.ceil(d/CesiumMath.toRadians(5)),p=n?Matrix3.fromQuaternion(Quaternion.fromAxisAngle(Cartesian3.negate(e,scratch1),d/(h+1),quaterion),rotMatrix):Matrix3.fromQuaternion(Quaternion.fromAxisAngle(e,d/(h+1),quaterion),rotMatrix);if(t=Cartesian3.clone(t,startPointScratch),0<h)for(var f=c?2:1,m=0;m<h;m++)t=Matrix3.multiplyByVector(p,t,t),u=Cartesian3.subtract(t,e,scratch1),u=Cartesian3.normalize(u,u),n||(u=Cartesian3.negate(u,u)),o=addPosition(a.scaleToGeodeticSurface(t,scratch2),u,s,o,a,l,1,f);else u=Cartesian3.subtract(t,e,scratch1),u=Cartesian3.normalize(u,u),n||(u=Cartesian3.negate(u,u)),o=addPosition(a.scaleToGeodeticSurface(t,scratch2),u,s,o,a,l,1,1),i=Cartesian3.clone(i,startPointScratch),u=Cartesian3.subtract(i,e,scratch1),u=Cartesian3.normalize(u,u),n||(u=Cartesian3.negate(u,u)),o=addPosition(a.scaleToGeodeticSurface(i,scratch2),u,s,o,a,l,1,1);return o}PolylineVolumeGeometryLibrary.removeDuplicatesFromShape=function(e){for(var t=e.length,i=[],r=t-1,n=0;n<t;r=n++){var a=e[r],o=e[n];Cartesian2.equals(a,o)||i.push(o)}return i},PolylineVolumeGeometryLibrary.angleIsGreaterThanPi=function(e,t,i,r){return e=(r=new EllipsoidTangentPlane(i,r)).projectPointOntoPlane(Cartesian3.add(i,e,nextScratch),nextScratch),0<=(t=r.projectPointOntoPlane(Cartesian3.add(i,t,prevScratch),prevScratch)).x*e.y-t.y*e.x};var scratchForwardProjection=new Cartesian3,scratchBackwardProjection=new Cartesian3;PolylineVolumeGeometryLibrary.computePositions=function(e,t,i,r,n){var a=r._ellipsoid,o=scaleToSurface(e,a),s=r._granularity,l=r._cornerType,c=(n?convertShapeTo3DDuplicate:convertShapeTo3D)(t,i),u=(t=n?convertShapeTo3D(t,i):void 0,i.height/2),d=i.width/2,h=e.length,p=[],f=(i=n?[]:void 0,scratchCartesian1$5),m=scratchCartesian2$5,g=scratchCartesian3$6,y=scratchCartesian4$2,_=scratchCartesian5$1,v=scratchCartesian6$1,C=scratchCartesian7,x=scratchCartesian8,b=scratchCartesian9,S=e[0],T=e[1];y=a.geodeticSurfaceNormal(S,y);f=Cartesian3.subtract(T,S,f),f=Cartesian3.normalize(f,f),x=Cartesian3.cross(y,f,x),x=Cartesian3.normalize(x,x);var E,w=o[0],A=o[1];n&&(i=addPosition(S,x,t,i,a,w+u,1,1)),b=Cartesian3.clone(S,b),S=T,m=Cartesian3.negate(f,m);for(var P=1;P<h-1;P++){var D=n?2:1;T=e[P+1],f=Cartesian3.subtract(T,S,f);f=Cartesian3.normalize(f,f),g=Cartesian3.add(f,m,g),g=Cartesian3.normalize(g,g),y=a.geodeticSurfaceNormal(S,y);var M=Cartesian3.multiplyByScalar(y,Cartesian3.dot(f,y),scratchForwardProjection);Cartesian3.subtract(f,M,M),Cartesian3.normalize(M,M);var I=Cartesian3.multiplyByScalar(y,Cartesian3.dot(m,y),scratchBackwardProjection);Cartesian3.subtract(m,I,I),Cartesian3.normalize(I,I),CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(M,I)),1,CesiumMath.EPSILON7)?(p=addPosition(b,x,c,p,a,w+u,1,1),b=S):(g=Cartesian3.cross(g,y,g),g=Cartesian3.cross(y,g,g),g=Cartesian3.normalize(g,g),M=1/Math.max(.25,Cartesian3.magnitude(Cartesian3.cross(g,m,scratch1))),(I=PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(f,m,S,a))?(_=Cartesian3.add(S,Cartesian3.multiplyByScalar(g,M*d,g),_),v=Cartesian3.add(_,Cartesian3.multiplyByScalar(x,d,v),v),scratch2Array[0]=Cartesian3.clone(b,scratch2Array[0]),scratch2Array[1]=Cartesian3.clone(v,scratch2Array[1]),E=subdivideHeights$1(scratch2Array,w+u,A+u,s),p=addPositions(PolylinePipeline.generateArc({positions:scratch2Array,granularity:s,ellipsoid:a}),x,c,p,a,E,1),x=Cartesian3.cross(y,f,x),x=Cartesian3.normalize(x,x),C=Cartesian3.add(_,Cartesian3.multiplyByScalar(x,d,C),C),l===CornerType$1.ROUNDED||l===CornerType$1.BEVELED?computeRoundCorner(_,v,C,l,I,a,p,c,A+u,n):p=addPosition(S,g=Cartesian3.negate(g,g),c,p,a,A+u,M,D)):(_=Cartesian3.add(S,Cartesian3.multiplyByScalar(g,M*d,g),_),v=Cartesian3.add(_,Cartesian3.multiplyByScalar(x,-d,v),v),scratch2Array[0]=Cartesian3.clone(b,scratch2Array[0]),scratch2Array[1]=Cartesian3.clone(v,scratch2Array[1]),E=subdivideHeights$1(scratch2Array,w+u,A+u,s),p=addPositions(PolylinePipeline.generateArc({positions:scratch2Array,granularity:s,ellipsoid:a}),x,c,p,a,E,1),x=Cartesian3.cross(y,f,x),x=Cartesian3.normalize(x,x),C=Cartesian3.add(_,Cartesian3.multiplyByScalar(x,-d,C),C),l===CornerType$1.ROUNDED||l===CornerType$1.BEVELED?computeRoundCorner(_,v,C,l,I,a,p,c,A+u,n):p=addPosition(S,g,c,p,a,A+u,M,D)),b=Cartesian3.clone(C,b),m=Cartesian3.negate(f,m)),w=A,A=o[P+1],S=T}return scratch2Array[0]=Cartesian3.clone(b,scratch2Array[0]),scratch2Array[1]=Cartesian3.clone(S,scratch2Array[1]),E=subdivideHeights$1(scratch2Array,w+u,A+u,s),p=addPositions(PolylinePipeline.generateArc({positions:scratch2Array,granularity:s,ellipsoid:a}),x,c,p,a,E,1),n&&(i=addPosition(S,x,t,i,a,A+u,1,1)),h=p.length,t=n?h+i.length:h,(t=new Float64Array(t)).set(p),n&&t.set(i,h),t};var CorridorGeometryLibrary={},scratch1$1=new Cartesian3,scratch2$1=new Cartesian3,scratch3=new Cartesian3,scratch4=new Cartesian3,scaleArray2=[new Cartesian3,new Cartesian3],cartesian1=new Cartesian3,cartesian2=new Cartesian3,cartesian3=new Cartesian3,cartesian4=new Cartesian3,cartesian5=new Cartesian3,cartesian6=new Cartesian3,cartesian7=new Cartesian3,cartesian8=new Cartesian3,cartesian9=new Cartesian3,cartesian10=new Cartesian3,quaterion$1=new Quaternion,rotMatrix$1=new Matrix3;function computeRoundCorner$1(e,t,i,r,n){var a,o=Cartesian3.angleBetween(Cartesian3.subtract(t,e,scratch1$1),Cartesian3.subtract(i,e,scratch2$1)),s=r===CornerType$1.BEVELED?1:Math.ceil(o/CesiumMath.toRadians(5))+1,l=(r=3*s,new Array(r));l[r-3]=i.x,l[r-2]=i.y,l[r-1]=i.z,a=n?Matrix3.fromQuaternion(Quaternion.fromAxisAngle(Cartesian3.negate(e,scratch1$1),o/s,quaterion$1),rotMatrix$1):Matrix3.fromQuaternion(Quaternion.fromAxisAngle(e,o/s,quaterion$1),rotMatrix$1);var c=0;t=Cartesian3.clone(t,scratch1$1);for(var u=0;u<s;u++)t=Matrix3.multiplyByVector(a,t,t),l[c++]=t.x,l[c++]=t.y,l[c++]=t.z;return l}function addEndCaps(e){var t=cartesian1,i=cartesian2,r=cartesian3,n=e[1],a=(i=Cartesian3.fromArray(e[1],n.length-3,i),r=Cartesian3.fromArray(e[0],0,r),computeRoundCorner$1(t=Cartesian3.midpoint(i,r,t),i,r,CornerType$1.ROUNDED,!1)),o=e.length-1,s=e[o-1];n=e[o];return i=Cartesian3.fromArray(s,s.length-3,i),r=Cartesian3.fromArray(n,0,r),[a,computeRoundCorner$1(t=Cartesian3.midpoint(i,r,t),i,r,CornerType$1.ROUNDED,!1)]}function computeMiteredCorner(e,t,i,r){var n=scratch1$1;return[(r||(t=Cartesian3.negate(t,t)),n=Cartesian3.add(e,t,n)).x,n.y,n.z,i.x,i.y,i.z]}function addShiftedPositions(e,t,i,r){for(var n=new Array(e.length),a=new Array(e.length),o=Cartesian3.multiplyByScalar(t,i,scratch1$1),s=Cartesian3.negate(o,scratch2$1),l=0,c=e.length-1,u=0;u<e.length;u+=3){var d=Cartesian3.fromArray(e,u,scratch3),h=Cartesian3.add(d,s,scratch4);n[l++]=h.x,n[l++]=h.y,n[l++]=h.z,d=Cartesian3.add(d,o,scratch4),a[c--]=d.z,a[c--]=d.y,a[c--]=d.x}return r.push(n,a),r}CorridorGeometryLibrary.addAttribute=function(e,t,i,r){var n=t.x,a=t.y;t=t.z;defined(i)&&(e[i]=n,e[i+1]=a,e[i+2]=t),defined(r)&&(e[r]=t,e[r-1]=a,e[r-2]=n)};var scratchForwardProjection$1=new Cartesian3,scratchBackwardProjection$1=new Cartesian3;CorridorGeometryLibrary.computePositions=function(e){var t=e.granularity,i=e.positions,r=e.ellipsoid,n=e.width/2,a=e.cornerType,o=e.saveAttributes,s=cartesian1,l=cartesian2,c=cartesian3,u=cartesian4,d=cartesian5,h=cartesian6,p=cartesian7,f=cartesian8,m=cartesian9,g=cartesian10,y=[],_=o?[]:void 0,v=o?[]:void 0,C=i[0],x=i[1];l=Cartesian3.normalize(Cartesian3.subtract(x,C,l),l),s=r.geodeticSurfaceNormal(C,s),u=Cartesian3.normalize(Cartesian3.cross(s,l,u),u);o&&(_.push(u.x,u.y,u.z),v.push(s.x,s.y,s.z)),p=Cartesian3.clone(C,p),C=x,c=Cartesian3.negate(l,c);for(var b,S=[],T=i.length,E=1;E<T-1;E++){s=r.geodeticSurfaceNormal(C,s),x=i[E+1],l=Cartesian3.normalize(Cartesian3.subtract(x,C,l),l),d=Cartesian3.normalize(Cartesian3.add(l,c,d),d);var w=Cartesian3.multiplyByScalar(s,Cartesian3.dot(l,s),scratchForwardProjection$1);Cartesian3.subtract(l,w,w),Cartesian3.normalize(w,w);var A=Cartesian3.multiplyByScalar(s,Cartesian3.dot(c,s),scratchBackwardProjection$1);Cartesian3.subtract(c,A,A),Cartesian3.normalize(A,A),CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(w,A)),1,CesiumMath.EPSILON7)||(d=Cartesian3.cross(d,s,d),d=Cartesian3.cross(s,d,d),d=Cartesian3.normalize(d,d),w=n/Math.max(.25,Cartesian3.magnitude(Cartesian3.cross(d,c,scratch1$1))),A=PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(l,c,C,r),d=Cartesian3.multiplyByScalar(d,w,d),A?(f=Cartesian3.add(C,d,f),g=Cartesian3.add(f,Cartesian3.multiplyByScalar(u,n,g),g),m=Cartesian3.add(f,Cartesian3.multiplyByScalar(u,2*n,m),m),scaleArray2[0]=Cartesian3.clone(p,scaleArray2[0]),scaleArray2[1]=Cartesian3.clone(g,scaleArray2[1]),y=addShiftedPositions(PolylinePipeline.generateArc({positions:scaleArray2,granularity:t,ellipsoid:r}),u,n,y),o&&(_.push(u.x,u.y,u.z),v.push(s.x,s.y,s.z)),h=Cartesian3.clone(m,h),u=Cartesian3.normalize(Cartesian3.cross(s,l,u),u),m=Cartesian3.add(f,Cartesian3.multiplyByScalar(u,2*n,m),m),p=Cartesian3.add(f,Cartesian3.multiplyByScalar(u,n,p),p),a===CornerType$1.ROUNDED||a===CornerType$1.BEVELED?S.push({leftPositions:computeRoundCorner$1(f,h,m,a,A)}):S.push({leftPositions:computeMiteredCorner(C,Cartesian3.negate(d,d),m,A)})):(m=Cartesian3.add(C,d,m),g=Cartesian3.add(m,Cartesian3.negate(Cartesian3.multiplyByScalar(u,n,g),g),g),f=Cartesian3.add(m,Cartesian3.negate(Cartesian3.multiplyByScalar(u,2*n,f),f),f),scaleArray2[0]=Cartesian3.clone(p,scaleArray2[0]),scaleArray2[1]=Cartesian3.clone(g,scaleArray2[1]),y=addShiftedPositions(PolylinePipeline.generateArc({positions:scaleArray2,granularity:t,ellipsoid:r}),u,n,y),o&&(_.push(u.x,u.y,u.z),v.push(s.x,s.y,s.z)),h=Cartesian3.clone(f,h),u=Cartesian3.normalize(Cartesian3.cross(s,l,u),u),f=Cartesian3.add(m,Cartesian3.negate(Cartesian3.multiplyByScalar(u,2*n,f),f),f),p=Cartesian3.add(m,Cartesian3.negate(Cartesian3.multiplyByScalar(u,n,p),p),p),a===CornerType$1.ROUNDED||a===CornerType$1.BEVELED?S.push({rightPositions:computeRoundCorner$1(m,h,f,a,A)}):S.push({rightPositions:computeMiteredCorner(C,d,f,A)})),c=Cartesian3.negate(l,c)),C=x}return s=r.geodeticSurfaceNormal(C,s),scaleArray2[0]=Cartesian3.clone(p,scaleArray2[0]),scaleArray2[1]=Cartesian3.clone(C,scaleArray2[1]),y=addShiftedPositions(PolylinePipeline.generateArc({positions:scaleArray2,granularity:t,ellipsoid:r}),u,n,y),o&&(_.push(u.x,u.y,u.z),v.push(s.x,s.y,s.z)),a===CornerType$1.ROUNDED&&(b=addEndCaps(y)),{positions:y,corners:S,lefts:_,normals:v,endPositions:b}};var cartesian1$1=new Cartesian3,cartesian2$1=new Cartesian3,cartesian3$1=new Cartesian3,cartesian4$1=new Cartesian3,cartesian5$1=new Cartesian3,cartesian6$1=new Cartesian3,scratch1$2=new Cartesian3,scratch2$2=new Cartesian3;function scaleToSurface$1(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function addNormals(e,t,i,r,n,a){var o=e.normals,s=e.tangents,l=e.bitangents;e=Cartesian3.normalize(Cartesian3.cross(i,t,scratch1$2),scratch1$2);a.normal&&CorridorGeometryLibrary.addAttribute(o,t,r,n),a.tangent&&CorridorGeometryLibrary.addAttribute(s,e,r,n),a.bitangent&&CorridorGeometryLibrary.addAttribute(l,i,r,n)}function combine$1(e,t,i){var r,n=e.positions,a=e.corners,o=e.endPositions,s=e.lefts,l=e.normals,c=new GeometryAttributes,u=0,d=0,h=0;for(R=0;R<n.length;R+=2)u+=r=n[R].length-3,h+=2*r,d+=n[R+1].length-3;for(u+=3,d+=3,R=0;R<a.length;R++){z=a[R];var p=a[R].leftPositions;defined(p)?u+=r=p.length:d+=r=a[R].rightPositions.length,h+=r}var f,m=defined(o);m&&(u+=f=o[0].length-3,d+=f,h+=6*(f/=3));e=u+d;var g,y,_,v,C,x,b=new Float64Array(e),S={normals:t.normal?new Float32Array(e):void 0,tangents:t.tangent?new Float32Array(e):void 0,bitangents:t.bitangent?new Float32Array(e):void 0},T=0,E=e-1,w=cartesian1$1,A=cartesian2$1,P=f/2,D=IndexDatatype$1.createTypedArray(e/3,h),M=0;if(m){x=cartesian3$1,C=cartesian4$1;for(var I=o[0],R=(w=Cartesian3.fromArray(l,0,w),A=Cartesian3.fromArray(s,0,A),0);R<P;R++)x=Cartesian3.fromArray(I,3*(P-1-R),x),C=Cartesian3.fromArray(I,3*(P+R),C),CorridorGeometryLibrary.addAttribute(b,C,T),CorridorGeometryLibrary.addAttribute(b,x,void 0,E),addNormals(S,w,A,T,E,t),v=1+(y=T/3),_=(g=(E-2)/3)-1,D[M++]=g,D[M++]=y,D[M++]=_,D[M++]=_,D[M++]=y,D[M++]=v,T+=3,E-=3}var O,L,N=0,F=0,B=n[N++],V=n[N++];for(b.set(B,T),b.set(V,E-V.length+1),A=Cartesian3.fromArray(s,F,A),r=V.length-3,R=0;R<r;R+=3)O=i.geodeticSurfaceNormal(Cartesian3.fromArray(B,R,scratch1$2),scratch1$2),L=i.geodeticSurfaceNormal(Cartesian3.fromArray(V,r-R,scratch2$2),scratch2$2),addNormals(S,w=Cartesian3.normalize(Cartesian3.add(O,L,w),w),A,T,E,t),v=1+(y=T/3),_=(g=(E-2)/3)-1,D[M++]=g,D[M++]=y,D[M++]=_,D[M++]=_,D[M++]=y,D[M++]=v,T+=3,E-=3;for(O=i.geodeticSurfaceNormal(Cartesian3.fromArray(B,r,scratch1$2),scratch1$2),L=i.geodeticSurfaceNormal(Cartesian3.fromArray(V,r,scratch2$2),scratch2$2),w=Cartesian3.normalize(Cartesian3.add(O,L,w),w),F+=3,R=0;R<a.length;R++){var k,z,G,U,$=(z=a[R]).leftPositions,H=z.rightPositions,W=cartesian6$1,j=cartesian3$1,q=cartesian4$1;if(w=Cartesian3.fromArray(l,F,w),defined($)){for(addNormals(S,w,A,void 0,E,t),E-=3,G=v,U=_,k=0;k<$.length/3;k++)W=Cartesian3.fromArray($,3*k,W),D[M++]=G,D[M++]=U-k-1,D[M++]=U-k,CorridorGeometryLibrary.addAttribute(b,W,void 0,E),j=Cartesian3.fromArray(b,3*(U-k-1),j),q=Cartesian3.fromArray(b,3*G,q),addNormals(S,w,A=Cartesian3.normalize(Cartesian3.subtract(j,q,A),A),void 0,E,t),E-=3;W=Cartesian3.fromArray(b,3*G,W),j=Cartesian3.subtract(Cartesian3.fromArray(b,3*U,j),W,j),q=Cartesian3.subtract(Cartesian3.fromArray(b,3*(U-k),q),W,q),addNormals(S,w,A=Cartesian3.normalize(Cartesian3.add(j,q,A),A),T,void 0,t),T+=3}else{for(addNormals(S,w,A,T,void 0,t),T+=3,G=_,U=v,k=0;k<H.length/3;k++)W=Cartesian3.fromArray(H,3*k,W),D[M++]=G,D[M++]=U+k,D[M++]=U+k+1,CorridorGeometryLibrary.addAttribute(b,W,T),j=Cartesian3.fromArray(b,3*G,j),q=Cartesian3.fromArray(b,3*(U+k),q),addNormals(S,w,A=Cartesian3.normalize(Cartesian3.subtract(j,q,A),A),T,void 0,t),T+=3;W=Cartesian3.fromArray(b,3*G,W),j=Cartesian3.subtract(Cartesian3.fromArray(b,3*(U+k),j),W,j),q=Cartesian3.subtract(Cartesian3.fromArray(b,3*U,q),W,q),addNormals(S,w,A=Cartesian3.normalize(Cartesian3.negate(Cartesian3.add(q,j,A),A),A),void 0,E,t),E-=3}for(B=n[N++],V=n[N++],B.splice(0,3),V.splice(V.length-3,3),b.set(B,T),b.set(V,E-V.length+1),r=V.length-3,F+=3,A=Cartesian3.fromArray(s,F,A),k=0;k<V.length;k+=3)O=i.geodeticSurfaceNormal(Cartesian3.fromArray(B,k,scratch1$2),scratch1$2),L=i.geodeticSurfaceNormal(Cartesian3.fromArray(V,r-k,scratch2$2),scratch2$2),addNormals(S,w=Cartesian3.normalize(Cartesian3.add(O,L,w),w),A,T,E,t),y=(v=T/3)-1,g=1+(_=(E-2)/3),D[M++]=g,D[M++]=y,D[M++]=_,D[M++]=_,D[M++]=y,D[M++]=v,T+=3,E-=3;T-=3,E+=3}if(addNormals(S,w=Cartesian3.fromArray(l,l.length-3,w),A,T,E,t),m){T+=3,E-=3,x=cartesian3$1,C=cartesian4$1;var Y=o[1];for(R=0;R<P;R++)x=Cartesian3.fromArray(Y,3*(f-R-1),x),C=Cartesian3.fromArray(Y,3*R,C),CorridorGeometryLibrary.addAttribute(b,x,void 0,E),CorridorGeometryLibrary.addAttribute(b,C,T),addNormals(S,w,A,T,E,t),y=(v=T/3)-1,g=1+(_=(E-2)/3),D[M++]=g,D[M++]=y,D[M++]=_,D[M++]=_,D[M++]=y,D[M++]=v,T+=3,E-=3}if(c.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:b}),t.st){var X=new Float32Array(e/3*2),Q=0;if(m){u/=3,d/=3;var Z,J=Math.PI/(f+1),K=1/(u-f+1),ee=1/(d-f+1),te=f/2;for(R=1+te;R<f+1;R++)Z=CesiumMath.PI_OVER_TWO+J*R,X[Q++]=ee*(1+Math.cos(Z)),X[Q++]=.5*(1+Math.sin(Z));for(R=1;R<d-f+1;R++)X[Q++]=R*ee,X[Q++]=0;for(R=f;te<R;R--)Z=CesiumMath.PI_OVER_TWO-R*J,X[Q++]=1-ee*(1+Math.cos(Z)),X[Q++]=.5*(1+Math.sin(Z));for(R=te;0<R;R--)Z=CesiumMath.PI_OVER_TWO-J*R,X[Q++]=1-K*(1+Math.cos(Z)),X[Q++]=.5*(1+Math.sin(Z));for(R=u-f;0<R;R--)X[Q++]=R*K,X[Q++]=1;for(R=1;R<1+te;R++)Z=CesiumMath.PI_OVER_TWO+J*R,X[Q++]=K*(1+Math.cos(Z)),X[Q++]=.5*(1+Math.sin(Z))}else{for(K=1/((u/=3)-1),ee=1/((d/=3)-1),R=0;R<d;R++)X[Q++]=R*ee,X[Q++]=0;for(R=u;0<R;R--)X[Q++]=(R-1)*K,X[Q++]=1}c.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:X})}return t.normal&&(c.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:S.normals})),t.tangent&&(c.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:S.tangents})),t.bitangent&&(c.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:S.bitangents})),{attributes:c,indices:D}}function extrudedAttributes(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;var i,r=e.position.values;(t.normal||t.bitangent)&&(i=e.normal.values,l=e.bitangent.values);var n=e.position.values.length/18,a=3*n,o=2*n,s=2*a;if(t.normal||t.bitangent||t.tangent){for(var l,c=t.normal?new Float32Array(6*a):void 0,u=t.tangent?new Float32Array(6*a):void 0,d=t.bitangent?new Float32Array(6*a):void 0,h=cartesian1$1,p=cartesian2$1,f=cartesian3$1,m=cartesian4$1,g=cartesian5$1,y=cartesian6$1,_=s,v=0;v<a;v+=3){var C=_+s;h=Cartesian3.fromArray(r,v,h),p=Cartesian3.fromArray(r,v+a,p),f=Cartesian3.fromArray(r,(v+3)%a,f);p=Cartesian3.subtract(p,h,p),f=Cartesian3.subtract(f,h,f),m=Cartesian3.normalize(Cartesian3.cross(p,f,m),m),t.normal&&(CorridorGeometryLibrary.addAttribute(c,m,C),CorridorGeometryLibrary.addAttribute(c,m,C+3),CorridorGeometryLibrary.addAttribute(c,m,_),CorridorGeometryLibrary.addAttribute(c,m,_+3)),(t.tangent||t.bitangent)&&(y=Cartesian3.fromArray(i,v,y),t.bitangent&&(CorridorGeometryLibrary.addAttribute(d,y,C),CorridorGeometryLibrary.addAttribute(d,y,C+3),CorridorGeometryLibrary.addAttribute(d,y,_),CorridorGeometryLibrary.addAttribute(d,y,_+3)),t.tangent&&(g=Cartesian3.normalize(Cartesian3.cross(y,m,g),g),CorridorGeometryLibrary.addAttribute(u,g,C),CorridorGeometryLibrary.addAttribute(u,g,C+3),CorridorGeometryLibrary.addAttribute(u,g,_),CorridorGeometryLibrary.addAttribute(u,g,_+3))),_+=6}if(t.normal){for(c.set(i),v=0;v<a;v+=3)c[v+a]=-i[v],c[v+a+1]=-i[v+1],c[v+a+2]=-i[v+2];e.normal.values=c}else e.normal=void 0;t.bitangent?(d.set(l),d.set(l,a),e.bitangent.values=d):e.bitangent=void 0,t.tangent&&(l=e.tangent.values,u.set(l),u.set(l,a),e.tangent.values=u)}if(t.st){var x=e.st.values,b=new Float32Array(6*o);b.set(x),b.set(x,o);for(var S=2*o,T=0;T<2;T++){for(b[S++]=x[0],b[S++]=x[1],v=2;v<o;v+=2){var E=x[v],w=x[v+1];b[S++]=E,b[S++]=w,b[S++]=E,b[S++]=w}b[S++]=x[0],b[S++]=x[1]}e.st.values=b}return e}function addWallPositions(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var r=3;r<e.length;r+=3){var n=e[r],a=e[r+1],o=e[r+2];i[t++]=n,i[t++]=a,i[t++]=o,i[t++]=n,i[t++]=a,i[t++]=o}return i[t++]=e[0],i[t++]=e[1],i[t++]=e[2],i}function computePositionsExtruded(e,t){var i=new VertexFormat({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),r=e.ellipsoid,n=combine$1(CorridorGeometryLibrary.computePositions(e),i,r),a=e.height,o=e.extrudedHeight,s=n.attributes,l=n.indices,c=s.position.values,u=c.length,d=new Float64Array(6*u);(i=new Float64Array(u)).set(c),n=new Float64Array(4*u),n=addWallPositions(c=PolygonPipeline.scaleToGeodeticHeight(c,a,r),0,n),n=addWallPositions(i=PolygonPipeline.scaleToGeodeticHeight(i,o,r),2*u,n),d.set(c),d.set(i,u),d.set(n,2*u),s.position.values=d,s=extrudedAttributes(s,t);var h=u/3;if(e.shadowVolume){for(var p=s.normal.values,f=(u=p.length,n=new Float32Array(6*u),0);f<u;f++)p[f]=-p[f];n.set(p,u),n=addWallPositions(p,4*u,n),s.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:n}),t.normal||(s.normal=void 0)}defined(e.offsetAttribute)&&(t=new Uint8Array(6*h),t=e.offsetAttribute===GeometryOffsetAttribute$1.TOP?(t=arrayFill(t,1,0,h),arrayFill(t,1,2*h,4*h)):arrayFill(t,e.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),s.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t}));var m=l.length,g=h+h,y=IndexDatatype$1.createTypedArray(d.length/3,2*m+3*g);y.set(l);var _,v,C,x,b=m;for(f=0;f<m;f+=3){var S=l[f],T=l[f+1],E=l[f+2];y[b++]=E+h,y[b++]=T+h,y[b++]=S+h}for(f=0;f<g;f+=2)C=(_=f+g)+1,x=(v=_+g)+1,y[b++]=_,y[b++]=v,y[b++]=C,y[b++]=C,y[b++]=v,y[b++]=x;return{attributes:s,indices:y}}var scratchCartesian1$6=new Cartesian3,scratchCartesian2$6=new Cartesian3,scratchCartographic$2=new Cartographic;function computeOffsetPoints(e,t,i,r,n,a){var o=Cartesian3.subtract(t,e,scratchCartesian1$6);Cartesian3.normalize(o,o);var s=i.geodeticSurfaceNormal(e,scratchCartesian2$6),l=Cartesian3.cross(o,s,scratchCartesian1$6);Cartesian3.multiplyByScalar(l,r,l);var c=n.latitude,u=n.longitude;t=a.latitude,o=a.longitude;Cartesian3.add(e,l,scratchCartesian2$6),i.cartesianToCartographic(scratchCartesian2$6,scratchCartographic$2),s=scratchCartographic$2.latitude,r=scratchCartographic$2.longitude,c=Math.min(c,s),u=Math.min(u,r),t=Math.max(t,s),o=Math.max(o,r),Cartesian3.subtract(e,l,scratchCartesian2$6),i.cartesianToCartographic(scratchCartesian2$6,scratchCartographic$2),s=scratchCartographic$2.latitude,r=scratchCartographic$2.longitude,c=Math.min(c,s),u=Math.min(u,r),t=Math.max(t,s),o=Math.max(o,r),n.latitude=c,n.longitude=u,a.latitude=t,a.longitude=o}var scratchCartesianOffset=new Cartesian3,scratchCartesianEnds=new Cartesian3,scratchCartographicMin=new Cartographic,scratchCartographicMax=new Cartographic;function computeRectangle$1(e,t,i,r,n){var a=arrayRemoveDuplicates(e=scaleToSurface$1(e,t),Cartesian3.equalsEpsilon),o=a.length;if(o<2||i<=0)return new Rectangle;var s,l,c=.5*i;scratchCartographicMin.latitude=Number.POSITIVE_INFINITY,scratchCartographicMin.longitude=Number.POSITIVE_INFINITY,scratchCartographicMax.latitude=Number.NEGATIVE_INFINITY,scratchCartographicMax.longitude=Number.NEGATIVE_INFINITY,r===CornerType$1.ROUNDED&&(d=a[0],Cartesian3.subtract(d,a[1],scratchCartesianOffset),Cartesian3.normalize(scratchCartesianOffset,scratchCartesianOffset),Cartesian3.multiplyByScalar(scratchCartesianOffset,c,scratchCartesianOffset),Cartesian3.add(d,scratchCartesianOffset,scratchCartesianEnds),t.cartesianToCartographic(scratchCartesianEnds,scratchCartographic$2),s=scratchCartographic$2.latitude,l=scratchCartographic$2.longitude,scratchCartographicMin.latitude=Math.min(scratchCartographicMin.latitude,s),scratchCartographicMin.longitude=Math.min(scratchCartographicMin.longitude,l),scratchCartographicMax.latitude=Math.max(scratchCartographicMax.latitude,s),scratchCartographicMax.longitude=Math.max(scratchCartographicMax.longitude,l));for(var u=0;u<o-1;++u)computeOffsetPoints(a[u],a[u+1],t,c,scratchCartographicMin,scratchCartographicMax);var d=a[o-1];return Cartesian3.subtract(d,a[o-2],scratchCartesianOffset),Cartesian3.normalize(scratchCartesianOffset,scratchCartesianOffset),Cartesian3.multiplyByScalar(scratchCartesianOffset,c,scratchCartesianOffset),Cartesian3.add(d,scratchCartesianOffset,scratchCartesianEnds),computeOffsetPoints(d,scratchCartesianEnds,t,c,scratchCartographicMin,scratchCartographicMax),r===CornerType$1.ROUNDED&&(t.cartesianToCartographic(scratchCartesianEnds,scratchCartographic$2),s=scratchCartographic$2.latitude,l=scratchCartographic$2.longitude,scratchCartographicMin.latitude=Math.min(scratchCartographicMin.latitude,s),scratchCartographicMin.longitude=Math.min(scratchCartographicMin.longitude,l),scratchCartographicMax.latitude=Math.max(scratchCartographicMax.latitude,s),scratchCartographicMax.longitude=Math.max(scratchCartographicMax.longitude,l)),(n=defined(n)?n:new Rectangle).north=scratchCartographicMax.latitude,n.south=scratchCartographicMin.latitude,n.east=scratchCartographicMax.longitude,n.west=scratchCartographicMin.longitude,n}function CorridorGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.width,r=defaultValue(e.height,0),n=defaultValue(e.extrudedHeight,r);this._positions=t,this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._vertexFormat=VertexFormat.clone(defaultValue(e.vertexFormat,VertexFormat.DEFAULT)),this._width=i,this._height=Math.max(r,n),this._extrudedHeight=Math.min(r,n),this._cornerType=defaultValue(e.cornerType,CornerType$1.ROUNDED),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*Cartesian3.packedLength+Ellipsoid.packedLength+VertexFormat.packedLength+7}CorridorGeometry.pack=function(e,t,i){i=defaultValue(i,0);var r=e._positions,n=r.length;t[i++]=n;for(var a=0;a<n;++a,i+=Cartesian3.packedLength)Cartesian3.pack(r[a],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i++]=e._shadowVolume?1:0,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchEllipsoid$3=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$3=new VertexFormat,scratchOptions$8={positions:void 0,ellipsoid:scratchEllipsoid$3,vertexFormat:scratchVertexFormat$3,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};CorridorGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);var o=Ellipsoid.unpack(e,t,scratchEllipsoid$3);t+=Ellipsoid.packedLength;var s=VertexFormat.unpack(e,t,scratchVertexFormat$3);t+=VertexFormat.packedLength;var l=e[t++],c=e[t++],u=e[t++],d=e[t++],h=e[t++],p=1===e[t++],f=e[t];return defined(i)?(i._positions=n,i._ellipsoid=Ellipsoid.clone(o,i._ellipsoid),i._vertexFormat=VertexFormat.clone(s,i._vertexFormat),i._width=l,i._height=c,i._extrudedHeight=u,i._cornerType=d,i._granularity=h,i._shadowVolume=p,i._offsetAttribute=-1===f?void 0:f,i):(scratchOptions$8.positions=n,scratchOptions$8.width=l,scratchOptions$8.height=c,scratchOptions$8.extrudedHeight=u,scratchOptions$8.cornerType=d,scratchOptions$8.granularity=h,scratchOptions$8.shadowVolume=p,scratchOptions$8.offsetAttribute=-1===f?void 0:f,new CorridorGeometry(scratchOptions$8))},CorridorGeometry.computeRectangle=function(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,r=e.width;return computeRectangle$1(i,defaultValue(e.ellipsoid,Ellipsoid.WGS84),r,defaultValue(e.cornerType,CornerType$1.ROUNDED),t)},CorridorGeometry.createGeometry=function(e){var t=e._positions,i=e._width,r=e._ellipsoid,n=arrayRemoveDuplicates(t=scaleToSurface$1(t,r),Cartesian3.equalsEpsilon);if(!(n.length<2||i<=0)){var a,o=e._height,s=e._extrudedHeight,l=!CesiumMath.equalsEpsilon(o,s,0,CesiumMath.EPSILON2);t=e._vertexFormat,i={ellipsoid:r,positions:n,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};l?(i.height=o,i.extrudedHeight=s,i.shadowVolume=e._shadowVolume,i.offsetAttribute=e._offsetAttribute,a=computePositionsExtruded(i,t)):((a=combine$1(CorridorGeometryLibrary.computePositions(i),t,r)).attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(a.attributes.position.values,o,r),defined(e._offsetAttribute)&&(c=e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1,u=a.attributes.position.values.length,arrayFill(u=new Uint8Array(u/3),c),a.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})));var c=a.attributes,u=BoundingSphere.fromVertices(c.position.values,void 0,3);return t.position||(a.attributes.position.values=void 0),new Geometry({attributes:c,indices:a.indices,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:u,offsetAttribute:e._offsetAttribute})}},CorridorGeometry.createShadowVolume=function(e,t,i){var r=e._granularity,n=e._ellipsoid;t=t(r,n),i=i(r,n);return new CorridorGeometry({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:n,granularity:r,extrudedHeight:t,height:i,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(CorridorGeometry.prototype,{rectangle:{get:function(){return defined(this._rectangle)||(this._rectangle=computeRectangle$1(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var cartesian1$2=new Cartesian3,cartesian2$2=new Cartesian3,cartesian3$2=new Cartesian3;function scaleToSurface$2(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function combine$2(e,t){var i,r=[],n=e.positions,a=e.corners,o=e.endPositions,s=new GeometryAttributes,l=0,c=0,u=0;for(A=0;A<n.length;A+=2)l+=i=n[A].length-3,u+=i/3*4,c+=n[A+1].length-3;for(l+=3,c+=3,A=0;A<a.length;A++){R=a[A];var d=a[A].leftPositions;defined(d)?l+=i=d.length:c+=i=a[A].rightPositions.length,u+=i/3*2}var h,p=defined(o);p&&(l+=h=o[0].length-3,c+=h,u+=4*(h/=3));e=l+c;var f,m,g,y,_,v,C=new Float64Array(e),x=0,b=e-1,S=h/2,T=IndexDatatype$1.createTypedArray(e/3,u+4),E=0;if(T[E++]=x/3,T[E++]=(b-2)/3,p){r.push(x/3),v=cartesian1$2,_=cartesian2$2;for(var w=o[0],A=0;A<S;A++)v=Cartesian3.fromArray(w,3*(S-1-A),v),_=Cartesian3.fromArray(w,3*(S+A),_),CorridorGeometryLibrary.addAttribute(C,_,x),CorridorGeometryLibrary.addAttribute(C,v,void 0,b),y=1+(m=x/3),g=(f=(b-2)/3)-1,T[E++]=f,T[E++]=g,T[E++]=m,T[E++]=y,x+=3,b-=3}var P=0,D=n[P++],M=n[P++];for(C.set(D,x),C.set(M,b-M.length+1),i=M.length-3,r.push(x/3,(b-2)/3),A=0;A<i;A+=3)y=1+(m=x/3),g=(f=(b-2)/3)-1,T[E++]=f,T[E++]=g,T[E++]=m,T[E++]=y,x+=3,b-=3;for(A=0;A<a.length;A++){var I,R,O,L=(R=a[A]).leftPositions,N=R.rightPositions,F=cartesian3$2;if(defined(L)){for(b-=3,O=g,r.push(y),I=0;I<L.length/3;I++)F=Cartesian3.fromArray(L,3*I,F),T[E++]=O-I-1,T[E++]=O-I,CorridorGeometryLibrary.addAttribute(C,F,void 0,b),b-=3;r.push(O-Math.floor(L.length/6)),t===CornerType$1.BEVELED&&r.push((b-2)/3+1),x+=3}else{for(x+=3,O=y,r.push(g),I=0;I<N.length/3;I++)F=Cartesian3.fromArray(N,3*I,F),T[E++]=O+I,T[E++]=O+I+1,CorridorGeometryLibrary.addAttribute(C,F,x),x+=3;r.push(O+Math.floor(N.length/6)),t===CornerType$1.BEVELED&&r.push(x/3-1),b-=3}for(D=n[P++],M=n[P++],D.splice(0,3),M.splice(M.length-3,3),C.set(D,x),C.set(M,b-M.length+1),i=M.length-3,I=0;I<M.length;I+=3)m=(y=x/3)-1,f=1+(g=(b-2)/3),T[E++]=f,T[E++]=g,T[E++]=m,T[E++]=y,x+=3,b-=3;x-=3,b+=3,r.push(x/3,(b-2)/3)}if(p){x+=3,b-=3,v=cartesian1$2,_=cartesian2$2;var B=o[1];for(A=0;A<S;A++)v=Cartesian3.fromArray(B,3*(h-A-1),v),_=Cartesian3.fromArray(B,3*A,_),CorridorGeometryLibrary.addAttribute(C,v,void 0,b),CorridorGeometryLibrary.addAttribute(C,_,x),m=(y=x/3)-1,f=1+(g=(b-2)/3),T[E++]=f,T[E++]=g,T[E++]=m,T[E++]=y,x+=3,b-=3;r.push(x/3)}else r.push(x/3,(b-2)/3);return T[E++]=x/3,T[E++]=(b-2)/3,s.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:C}),{attributes:s,indices:T,wallIndices:r}}function computePositionsExtruded$1(e){var t=e.ellipsoid,i=(l=combine$2(CorridorGeometryLibrary.computePositions(e),e.cornerType)).wallIndices,r=e.height,n=e.extrudedHeight,a=l.attributes,o=l.indices,s=(c=a.position.values).length;(u=new Float64Array(s)).set(c);var l=new Float64Array(2*s),c=PolygonPipeline.scaleToGeodeticHeight(c,r,t),u=PolygonPipeline.scaleToGeodeticHeight(u,n,t);l.set(c),l.set(u,s),a.position.values=l,s/=3,defined(e.offsetAttribute)&&(u=new Uint8Array(2*s),u=e.offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(u,1,0,s):arrayFill(u,e.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:u}));var d=o.length,h=IndexDatatype$1.createTypedArray(l.length/3,2*(d+i.length));h.set(o);for(var p,f,m=d,g=0;g<d;g+=2){var y=o[g],_=o[g+1];h[m++]=y+s,h[m++]=_+s}for(g=0;g<i.length;g++)f=(p=i[g])+s,h[m++]=p,h[m++]=f;return{attributes:a,indices:h}}function CorridorOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.width,r=defaultValue(e.height,0),n=defaultValue(e.extrudedHeight,r);this._positions=t,this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._width=i,this._height=Math.max(r,n),this._extrudedHeight=Math.min(r,n),this._cornerType=defaultValue(e.cornerType,CornerType$1.ROUNDED),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*Cartesian3.packedLength+Ellipsoid.packedLength+6}CorridorOutlineGeometry.pack=function(e,t,i){i=defaultValue(i,0);var r=e._positions,n=r.length;t[i++]=n;for(var a=0;a<n;++a,i+=Cartesian3.packedLength)Cartesian3.pack(r[a],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchEllipsoid$4=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$9={positions:void 0,ellipsoid:scratchEllipsoid$4,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};function CullingVolume(e){this.planes=defaultValue(e,[])}CorridorOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);var o=Ellipsoid.unpack(e,t,scratchEllipsoid$4);t+=Ellipsoid.packedLength;var s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++],h=e[t];return defined(i)?(i._positions=n,i._ellipsoid=Ellipsoid.clone(o,i._ellipsoid),i._width=s,i._height=l,i._extrudedHeight=c,i._cornerType=u,i._granularity=d,i._offsetAttribute=-1===h?void 0:h,i):(scratchOptions$9.positions=n,scratchOptions$9.width=s,scratchOptions$9.height=l,scratchOptions$9.extrudedHeight=c,scratchOptions$9.cornerType=u,scratchOptions$9.granularity=d,scratchOptions$9.offsetAttribute=-1===h?void 0:h,new CorridorOutlineGeometry(scratchOptions$9))},CorridorOutlineGeometry.createGeometry=function(e){var t=e._positions,i=e._width,r=e._ellipsoid,n=arrayRemoveDuplicates(t=scaleToSurface$2(t,r),Cartesian3.equalsEpsilon);if(!(n.length<2||i<=0)){var a,o=e._height,s=e._extrudedHeight;t=!CesiumMath.equalsEpsilon(o,s,0,CesiumMath.EPSILON2),i={ellipsoid:r,positions:n,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};t?(i.height=o,i.extrudedHeight=s,i.offsetAttribute=e._offsetAttribute,a=computePositionsExtruded$1(i)):((a=combine$2(CorridorGeometryLibrary.computePositions(i),i.cornerType)).attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(a.attributes.position.values,o,r),defined(e._offsetAttribute)&&(l=a.attributes.position.values.length,arrayFill(c=new Uint8Array(l/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})));var l=a.attributes,c=BoundingSphere.fromVertices(l.position.values,void 0,3);return new Geometry({attributes:l,indices:a.indices,primitiveType:PrimitiveType$1.LINES,boundingSphere:c,offsetAttribute:e._offsetAttribute})}};var faces=[new Cartesian3,new Cartesian3,new Cartesian3];Cartesian3.clone(Cartesian3.UNIT_X,faces[0]),Cartesian3.clone(Cartesian3.UNIT_Y,faces[1]),Cartesian3.clone(Cartesian3.UNIT_Z,faces[2]);var scratchPlaneCenter=new Cartesian3,scratchPlaneNormal$1=new Cartesian3,scratchPlane$1=new Plane(new Cartesian3(1,0,0),0);CullingVolume.fromBoundingSphere=function(e,t){defined(t)||(t=new CullingVolume);var i=faces.length,r=t.planes;r.length=2*i;for(var n=e.center,a=e.radius,o=0,s=0;s<i;++s){var l=faces[s],c=r[o],u=r[o+1];defined(c)||(c=r[o]=new Cartesian4),defined(u)||(u=r[o+1]=new Cartesian4),Cartesian3.multiplyByScalar(l,-a,scratchPlaneCenter),Cartesian3.add(n,scratchPlaneCenter,scratchPlaneCenter),c.x=l.x,c.y=l.y,c.z=l.z,c.w=-Cartesian3.dot(l,scratchPlaneCenter),Cartesian3.multiplyByScalar(l,a,scratchPlaneCenter),Cartesian3.add(n,scratchPlaneCenter,scratchPlaneCenter),u.x=-l.x,u.y=-l.y,u.z=-l.z,u.w=-Cartesian3.dot(Cartesian3.negate(l,scratchPlaneNormal$1),scratchPlaneCenter),o+=2}return t},CullingVolume.prototype.computeVisibility=function(e){for(var t=this.planes,i=!1,r=0,n=t.length;r<n;++r){var a=e.intersectPlane(Plane.fromCartesian4(t[r],scratchPlane$1));if(a===Intersect$1.OUTSIDE)return Intersect$1.OUTSIDE;a===Intersect$1.INTERSECTING&&(i=!0)}return i?Intersect$1.INTERSECTING:Intersect$1.INSIDE},CullingVolume.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===CullingVolume.MASK_OUTSIDE||t===CullingVolume.MASK_INSIDE)return t;for(var i=CullingVolume.MASK_INSIDE,r=this.planes,n=0,a=r.length;n<a;++n){var o=n<31?1<<n:0;if(!(n<31&&0==(t&o))){var s=e.intersectPlane(Plane.fromCartesian4(r[n],scratchPlane$1));if(s===Intersect$1.OUTSIDE)return CullingVolume.MASK_OUTSIDE;s===Intersect$1.INTERSECTING&&(i|=o)}}return i},CullingVolume.MASK_OUTSIDE=4294967295,CullingVolume.MASK_INSIDE=0,CullingVolume.MASK_INDETERMINATE=2147483647;var CylinderGeometryLibrary={computePositions:function(e,t,i,r,n){for(var a=.5*e,o=-a,s=(e=r+r,new Float64Array(3*(n?2*e:e))),l=0,c=0,u=n?3*e:0,d=n?3*(e+r):3*r,h=0;h<r;h++){var p=h/r*CesiumMath.TWO_PI,f=(m=Math.cos(p))*i,m=(p=(g=Math.sin(p))*i,m*t),g=g*t;s[c+u]=f,s[c+u+1]=p,s[c+u+2]=o,s[c+d]=m,s[c+d+1]=g,s[c+d+2]=a,c+=3,n&&(s[l++]=f,s[l++]=p,s[l++]=o,s[l++]=m,s[l++]=g,s[l++]=a)}return s}},radiusScratch=new Cartesian2,normalScratch$2=new Cartesian3,bitangentScratch=new Cartesian3,tangentScratch=new Cartesian3,positionScratch$1=new Cartesian3;function CylinderGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,r=e.bottomRadius,n=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),a=defaultValue(e.slices,128);this._length=t,this._topRadius=i,this._bottomRadius=r,this._vertexFormat=VertexFormat.clone(n),this._slices=a,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}CylinderGeometry.packedLength=VertexFormat.packedLength+5,CylinderGeometry.pack=function(e,t,i){return i=defaultValue(i,0),VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchVertexFormat$4=new VertexFormat,scratchOptions$a={vertexFormat:scratchVertexFormat$4,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0},unitCylinderGeometry;CylinderGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=VertexFormat.unpack(e,t,scratchVertexFormat$4);t+=VertexFormat.packedLength;var n=e[t++],a=e[t++],o=e[t++],s=e[t++];t=e[t];return defined(i)?(i._vertexFormat=VertexFormat.clone(r,i._vertexFormat),i._length=n,i._topRadius=a,i._bottomRadius=o,i._slices=s,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$a.length=n,scratchOptions$a.topRadius=a,scratchOptions$a.bottomRadius=o,scratchOptions$a.slices=s,scratchOptions$a.offsetAttribute=-1===t?void 0:t,new CylinderGeometry(scratchOptions$a))},CylinderGeometry.createGeometry=function(e){var t=e._length,i=e._topRadius,r=e._bottomRadius,n=e._vertexFormat,a=e._slices;if(!(t<=0||i<0||r<0||0===i&&0===r)){var o=a+a,s=a+o,l=o+o,c=CylinderGeometryLibrary.computePositions(t,i,r,a,!0),u=n.st?new Float32Array(2*l):void 0,d=n.normal?new Float32Array(3*l):void 0,h=n.tangent?new Float32Array(3*l):void 0,p=n.bitangent?new Float32Array(3*l):void 0,f=n.normal||n.tangent||n.bitangent;if(f){var m=n.tangent||n.bitangent,g=0,y=0,_=0,v=Math.atan2(r-i,t),C=normalScratch$2;C.z=Math.sin(v);for(var x=Math.cos(v),b=tangentScratch,S=bitangentScratch,T=0;T<a;T++){var E=T/a*CesiumMath.TWO_PI,w=x*Math.cos(E);E=x*Math.sin(E);f&&(C.x=w,C.y=E,m&&(b=Cartesian3.normalize(Cartesian3.cross(Cartesian3.UNIT_Z,C,b),b)),n.normal&&(d[g++]=C.x,d[g++]=C.y,d[g++]=C.z,d[g++]=C.x,d[g++]=C.y,d[g++]=C.z),n.tangent&&(h[y++]=b.x,h[y++]=b.y,h[y++]=b.z,h[y++]=b.x,h[y++]=b.y,h[y++]=b.z),n.bitangent&&(S=Cartesian3.normalize(Cartesian3.cross(C,b,S),S),p[_++]=S.x,p[_++]=S.y,p[_++]=S.z,p[_++]=S.x,p[_++]=S.y,p[_++]=S.z))}for(T=0;T<a;T++)n.normal&&(d[g++]=0,d[g++]=0,d[g++]=-1),n.tangent&&(h[y++]=1,h[y++]=0,h[y++]=0),n.bitangent&&(p[_++]=0,p[_++]=-1,p[_++]=0);for(T=0;T<a;T++)n.normal&&(d[g++]=0,d[g++]=0,d[g++]=1),n.tangent&&(h[y++]=1,h[y++]=0,h[y++]=0),n.bitangent&&(p[_++]=0,p[_++]=1,p[_++]=0)}v=12*a-12;var A=IndexDatatype$1.createTypedArray(l,v),P=0,D=0;for(T=0;T<a-1;T++)A[P++]=D,A[P++]=D+2,A[P++]=D+3,A[P++]=D,A[P++]=D+3,A[P++]=D+1,D+=2;for(A[P++]=o-2,A[P++]=0,A[P++]=1,A[P++]=o-2,A[P++]=1,A[P++]=o-1,T=1;T<a-1;T++)A[P++]=o+T+1,A[P++]=o+T,A[P++]=o;for(T=1;T<a-1;T++)A[P++]=s,A[P++]=s+T,A[P++]=s+T+1;var M=0;if(n.st){var I=Math.max(i,r);for(T=0;T<l;T++){var R=Cartesian3.fromArray(c,3*T,positionScratch$1);u[M++]=(R.x+I)/(2*I),u[M++]=(R.y+I)/(2*I)}}return v=new GeometryAttributes,n.position&&(v.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:c})),n.normal&&(v.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(v.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:h})),n.bitangent&&(v.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:p})),n.st&&(v.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:u})),radiusScratch.x=.5*t,radiusScratch.y=Math.max(r,i),i=new BoundingSphere(Cartesian3.ZERO,Cartesian2.magnitude(radiusScratch)),defined(e._offsetAttribute)&&(t=c.length,arrayFill(t=new Uint8Array(t/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),v.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})),new Geometry({attributes:v,indices:A,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},CylinderGeometry.getUnitCylinder=function(){return defined(unitCylinderGeometry)||(unitCylinderGeometry=CylinderGeometry.createGeometry(new CylinderGeometry({topRadius:1,bottomRadius:1,length:1,vertexFormat:VertexFormat.POSITION_ONLY}))),unitCylinderGeometry};var radiusScratch$1=new Cartesian2;function CylinderOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).length,i=e.topRadius,r=e.bottomRadius,n=defaultValue(e.slices,128),a=Math.max(defaultValue(e.numberOfVerticalLines,16),0);this._length=t,this._topRadius=i,this._bottomRadius=r,this._slices=n,this._numberOfVerticalLines=a,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}CylinderOutlineGeometry.packedLength=6,CylinderOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchOptions$b={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};function DefaultProxy(e){this.proxy=e}function DistanceDisplayCondition(e,t){e=defaultValue(e,0),this._near=e,t=defaultValue(t,Number.MAX_VALUE),this._far=t}function DistanceDisplayConditionGeometryInstanceAttribute(e,t){e=defaultValue(e,0),t=defaultValue(t,Number.MAX_VALUE),this.value=new Float32Array([e,t])}function DoublyLinkedList(){this.head=void 0,this.tail=void 0,this._length=0}function DoublyLinkedListNode(e,t,i){this.item=e,this.previous=t,this.next=i}function remove(e,t){defined(t.previous)&&defined(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):defined(t.previous)?(t.previous.next=void 0,e.tail=t.previous):defined(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}CylinderOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=e[t++],n=e[t++],a=e[t++],o=e[t++],s=e[t++];t=e[t];return defined(i)?(i._length=r,i._topRadius=n,i._bottomRadius=a,i._slices=o,i._numberOfVerticalLines=s,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$b.length=r,scratchOptions$b.topRadius=n,scratchOptions$b.bottomRadius=a,scratchOptions$b.slices=o,scratchOptions$b.numberOfVerticalLines=s,scratchOptions$b.offsetAttribute=-1===t?void 0:t,new CylinderOutlineGeometry(scratchOptions$b))},CylinderOutlineGeometry.createGeometry=function(e){var t=e._length,i=e._topRadius,r=e._bottomRadius,n=e._slices,a=e._numberOfVerticalLines;if(!(t<=0||i<0||r<0||0===i&&0===r)){var o,s,l=2*n,c=CylinderGeometryLibrary.computePositions(t,i,r,n,!1),u=2*n;0<a&&(o=Math.min(a,n),s=Math.round(n/o),u+=o);for(var d=IndexDatatype$1.createTypedArray(l,2*u),h=0,p=0;p<n-1;p++)d[h++]=p,d[h++]=p+1,d[h++]=p+n,d[h++]=p+1+n;if(d[h++]=n-1,d[h++]=0,d[h++]=n+n-1,d[h++]=n,0<a)for(p=0;p<n;p+=s)d[h++]=p,d[h++]=p+n;return(a=new GeometryAttributes).position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:c}),radiusScratch$1.x=.5*t,radiusScratch$1.y=Math.max(r,i),i=new BoundingSphere(Cartesian3.ZERO,Cartesian2.magnitude(radiusScratch$1)),defined(e._offsetAttribute)&&(t=c.length,arrayFill(t=new Uint8Array(t/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})),new Geometry({attributes:a,indices:d,primitiveType:PrimitiveType$1.LINES,boundingSphere:i,offsetAttribute:e._offsetAttribute})}},DefaultProxy.prototype.getURL=function(e){var t=-1===this.proxy.indexOf("?")?"?":"";return this.proxy+t+encodeURIComponent(e)},Object.defineProperties(DistanceDisplayCondition.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}}),DistanceDisplayCondition.packedLength=2,DistanceDisplayCondition.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.near,t[i]=e.far,t},DistanceDisplayCondition.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new DistanceDisplayCondition),i.near=e[t++],i.far=e[t],i},DistanceDisplayCondition.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.near===t.near&&e.far===t.far},DistanceDisplayCondition.clone=function(e,t){if(defined(e))return defined(t)||(t=new DistanceDisplayCondition),t.near=e.near,t.far=e.far,t},DistanceDisplayCondition.prototype.clone=function(e){return DistanceDisplayCondition.clone(this,e)},DistanceDisplayCondition.prototype.equals=function(e){return DistanceDisplayCondition.equals(this,e)},Object.defineProperties(DistanceDisplayConditionGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition=function(e){return new DistanceDisplayConditionGeometryInstanceAttribute(e.near,e.far)},DistanceDisplayConditionGeometryInstanceAttribute.toValue=function(e,t){return defined(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])},Object.defineProperties(DoublyLinkedList.prototype,{length:{get:function(){return this._length}}}),DoublyLinkedList.prototype.add=function(e){return e=new DoublyLinkedListNode(e,this.tail,void 0),defined(this.tail)?this.tail.next=e:this.head=e,this.tail=e,++this._length,e},DoublyLinkedList.prototype.remove=function(e){defined(e)&&(remove(this,e),--this._length)},DoublyLinkedList.prototype.splice=function(e,t){var i;e!==t&&(remove(this,t),i=e.next,e.next=t,this.tail===e?this.tail=t:i.previous=t,t.next=i,t.previous=e)},void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var TWEEN=TWEEN||(uzb=[],{REVISION:"13",getAll:function(){return uzb},removeAll:function(){uzb=[]},add:function(e){uzb.push(e)},remove:function(e){-1!==(e=uzb.indexOf(e))&&uzb.splice(e,1)},update:function(e){if(0===uzb.length)return!1;var t=0;for(e=void 0!==e?e:("undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance:Date).now();t<uzb.length;)uzb[t].update(e)?t++:uzb.splice(t,1);return!0}}),uzb,EBb;TWEEN.Tween=function(e){var t,i=e,r={},n={},a={},o=1e3,s=0,l=!1,c=!1,u=0,d=null,h=TWEEN.Easing.Linear.None,p=TWEEN.Interpolation.Linear,f=[],m=null,g=!1,y=null,_=null,v=null;for(t in e)r[t]=parseFloat(e[t],10);this.to=function(e,t){return void 0!==t&&(o=t),n=e,this},this.start=function(e){for(var t in TWEEN.add(this),g=!(c=!0),d=void 0!==e?e:("undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance:Date).now(),d+=u,n){if(n[t]instanceof Array){if(0===n[t].length)continue;n[t]=[i[t]].concat(n[t])}r[t]=i[t],r[t]instanceof Array==0&&(r[t]*=1),a[t]=r[t]||0}return this},this.stop=function(){return c&&(TWEEN.remove(this),c=!1,null!==v&&v.call(i),this.stopChainedTweens()),this},this.stopChainedTweens=function(){for(var e=0,t=f.length;e<t;e++)f[e].stop()},this.delay=function(e){return u=e,this},this.repeat=function(e){return s=e,this},this.yoyo=function(e){return l=e,this},this.easing=function(e){return h=e,this},this.interpolation=function(e){return p=e,this},this.chain=function(){return f=arguments,this},this.onStart=function(e){return m=e,this},this.onUpdate=function(e){return y=e,this},this.onComplete=function(e){return _=e,this},this.onStop=function(e){return v=e,this},this.update=function(e){if(e<d)return!0;!1===g&&(null!==m&&m.call(i),g=!0);var t,c=(e-d)/o,v=h(c=1<c?1:c);for(var C in n){var x=r[C]||0,b=n[C];b instanceof Array?i[C]=p(b,v):("string"==typeof b&&(b=x+parseFloat(b,10)),"number"==typeof b&&(i[C]=x+(b-x)*v))}if(null!==y&&y.call(i,v),1!=c)return!0;if(0<s){for(C in isFinite(s)&&s--,a)"string"==typeof n[C]&&(a[C]=a[C]+parseFloat(n[C],10)),l&&(t=a[C],a[C]=n[C],n[C]=t),r[C]=a[C];return d=e+u,!0}null!==_&&_.call(i);for(var S=0,T=f.length;S<T;S++)f[S].start(e);return!1}},TWEEN.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,i=.1;return 0===e?0:1===e?1:(t=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*--e)*Math.sin((e-t)*(2*Math.PI)/.4))},Out:function(e){var t,i=.1;return 0===e?0:1===e?1:(t=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},InOut:function(e){var t,i=.1;return 0===e?0:1===e?1:(t=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*--e)*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*--e)*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)}},Back:{In:function(e){return e*e*(2.70158*e-1.70158)},Out:function(e){return--e*e*(2.70158*e+1.70158)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((1+t)*e-t)*.5:.5*((e-=2)*e*((1+t)*e+t)+2)}},Bounce:{In:function(e){return 1-TWEEN.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*TWEEN.Easing.Bounce.In(2*e):.5*TWEEN.Easing.Bounce.Out(2*e-1)+.5}}},TWEEN.Interpolation={Linear:function(e,t){var i=e.length-1,r=i*t,n=Math.floor(r),a=TWEEN.Interpolation.Utils.Linear;return t<0?a(e[0],e[1],r):1<t?a(e[i],e[i-1],i-r):a(e[n],e[i<n+1?i:n+1],r-n)},Bezier:function(e,t){for(var i=0,r=e.length-1,n=Math.pow,a=TWEEN.Interpolation.Utils.Bernstein,o=0;o<=r;o++)i+=n(1-t,r-o)*n(t,o)*e[o]*a(r,o);return i},CatmullRom:function(e,t){var i=e.length-1,r=i*t,n=Math.floor(r),a=TWEEN.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(n=Math.floor(r=i*(1+t))),a(e[(n-1+i)%i],e[n],e[(n+1)%i],e[(n+2)%i],r-n)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):1<t?e[i]-(a(e[i],e[i],e[i-1],e[i-1],r-i)-e[i]):a(e[n?n-1:0],e[n],e[i<n+1?i:n+1],e[i<n+2?i:n+2],r-n)},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(e,t){var i=TWEEN.Interpolation.Utils.Factorial;return i(e)/i(t)/i(e-t)},Factorial:(EBb=[1],function(e){var t,i=1;if(EBb[e])return EBb[e];for(t=e;1<t;t--)i*=t;return EBb[e]=i}),CatmullRom:function(e,t,i,r,n){var a=.5*(i-e);return(2*t-2*i+a+(e=.5*(r-t)))*(n*(r=n*n))+(-3*t+3*i-2*a-e)*r+a*n+t}}};var EasingFunction={LINEAR_NONE:TWEEN.Easing.Linear.None,QUADRACTIC_IN:TWEEN.Easing.Quadratic.In,QUADRACTIC_OUT:TWEEN.Easing.Quadratic.Out,QUADRACTIC_IN_OUT:TWEEN.Easing.Quadratic.InOut,CUBIC_IN:TWEEN.Easing.Cubic.In,CUBIC_OUT:TWEEN.Easing.Cubic.Out,CUBIC_IN_OUT:TWEEN.Easing.Cubic.InOut,QUARTIC_IN:TWEEN.Easing.Quartic.In,QUARTIC_OUT:TWEEN.Easing.Quartic.Out,QUARTIC_IN_OUT:TWEEN.Easing.Quartic.InOut,QUINTIC_IN:TWEEN.Easing.Quintic.In,QUINTIC_OUT:TWEEN.Easing.Quintic.Out,QUINTIC_IN_OUT:TWEEN.Easing.Quintic.InOut,SINUSOIDAL_IN:TWEEN.Easing.Sinusoidal.In,SINUSOIDAL_OUT:TWEEN.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:TWEEN.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:TWEEN.Easing.Exponential.In,EXPONENTIAL_OUT:TWEEN.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:TWEEN.Easing.Exponential.InOut,CIRCULAR_IN:TWEEN.Easing.Circular.In,CIRCULAR_OUT:TWEEN.Easing.Circular.Out,CIRCULAR_IN_OUT:TWEEN.Easing.Circular.InOut,ELASTIC_IN:TWEEN.Easing.Elastic.In,ELASTIC_OUT:TWEEN.Easing.Elastic.Out,ELASTIC_IN_OUT:TWEEN.Easing.Elastic.InOut,BACK_IN:TWEEN.Easing.Back.In,BACK_OUT:TWEEN.Easing.Back.Out,BACK_IN_OUT:TWEEN.Easing.Back.InOut,BOUNCE_IN:TWEEN.Easing.Bounce.In,BOUNCE_OUT:TWEEN.Easing.Bounce.Out,BOUNCE_IN_OUT:TWEEN.Easing.Bounce.InOut},EasingFunction$1=Object.freeze(EasingFunction),scratchPosition$1=new Cartesian3,scratchNormal$4=new Cartesian3,scratchTangent$2=new Cartesian3,scratchBitangent$2=new Cartesian3,scratchNormalST=new Cartesian3,defaultRadii=new Cartesian3(1,1,1),cos=Math.cos,sin=Math.sin;function EllipsoidGeometry(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.radii,defaultRadii),i=defaultValue(e.innerRadii,t),r=defaultValue(e.minimumClock,0),n=defaultValue(e.maximumClock,CesiumMath.TWO_PI),a=defaultValue(e.minimumCone,0),o=defaultValue(e.maximumCone,CesiumMath.PI),s=Math.round(defaultValue(e.stackPartitions,64)),l=Math.round(defaultValue(e.slicePartitions,64)),c=defaultValue(e.vertexFormat,VertexFormat.DEFAULT);this._radii=Cartesian3.clone(t),this._innerRadii=Cartesian3.clone(i),this._minimumClock=r,this._maximumClock=n,this._minimumCone=a,this._maximumCone=o,this._stackPartitions=s,this._slicePartitions=l,this._vertexFormat=VertexFormat.clone(c),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}EllipsoidGeometry.packedLength=2*Cartesian3.packedLength+VertexFormat.packedLength+7,EllipsoidGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._radii,t,i),i+=Cartesian3.packedLength,Cartesian3.pack(e._innerRadii,t,i),i+=Cartesian3.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchRadii=new Cartesian3,scratchInnerRadii=new Cartesian3,scratchVertexFormat$5=new VertexFormat,scratchOptions$c={radii:scratchRadii,innerRadii:scratchInnerRadii,vertexFormat:scratchVertexFormat$5,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0},unitEllipsoidGeometry;EllipsoidGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchRadii);t+=Cartesian3.packedLength;var n=Cartesian3.unpack(e,t,scratchInnerRadii);t+=Cartesian3.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$5);t+=VertexFormat.packedLength;var o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++];t=e[t];return defined(i)?(i._radii=Cartesian3.clone(r,i._radii),i._innerRadii=Cartesian3.clone(n,i._innerRadii),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._minimumClock=o,i._maximumClock=s,i._minimumCone=l,i._maximumCone=c,i._stackPartitions=u,i._slicePartitions=d,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$c.minimumClock=o,scratchOptions$c.maximumClock=s,scratchOptions$c.minimumCone=l,scratchOptions$c.maximumCone=c,scratchOptions$c.stackPartitions=u,scratchOptions$c.slicePartitions=d,scratchOptions$c.offsetAttribute=-1===t?void 0:t,new EllipsoidGeometry(scratchOptions$c))},EllipsoidGeometry.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var r=e._minimumClock,n=e._maximumClock,a=e._minimumCone,o=e._maximumCone,s=e._vertexFormat,l=e._slicePartitions+1,c=e._stackPartitions+1;(l=Math.round(l*Math.abs(n-r)/CesiumMath.TWO_PI))<2&&(l=2),(c=Math.round(c*Math.abs(o-a)/CesiumMath.PI))<2&&(c=2);var u=0,d=[a],h=[r];for(U=0;U<c;U++)d.push(a+U*(o-a)/(c-1));for(d.push(o),N=0;N<l;N++)h.push(r+N*(n-r)/(l-1));h.push(n);var p=d.length,f=h.length,m=0,g=1,y=i.x!==t.x||i.y!==t.y||i.z!==t.z,_=!1,v=!1,C=!1;y&&(g=2,0<a&&(_=!0,m+=l-1),o<Math.PI&&(v=!0,m+=l-1),(n-r)%CesiumMath.TWO_PI?(C=!0,m+=2*(c-1)+1):m+=1);var x=f*p*g,b=new Float64Array(3*x),S=arrayFill(new Array(x),!1),T=arrayFill(new Array(x),!1),E=l*c*g,w=(m=6*(E+m+1-(l+c)*g),IndexDatatype$1.createTypedArray(E,m)),A=s.normal?new Float32Array(3*x):void 0,P=s.tangent?new Float32Array(3*x):void 0,D=s.bitangent?new Float32Array(3*x):void 0,M=s.st?new Float32Array(2*x):void 0,I=new Array(p),R=new Array(p);for(U=0;U<p;U++)I[U]=sin(d[U]),R[U]=cos(d[U]);for(var O=new Array(f),L=new Array(f),N=0;N<f;N++)L[N]=cos(h[N]),O[N]=sin(h[N]);for(U=0;U<p;U++)for(N=0;N<f;N++)b[u++]=t.x*I[U]*L[N],b[u++]=t.y*I[U]*O[N],b[u++]=t.z*R[U];var F,B,V,k,z=x/2;if(y)for(U=0;U<p;U++)for(N=0;N<f;N++)b[u++]=i.x*I[U]*L[N],b[u++]=i.y*I[U]*O[N],b[u++]=i.z*R[U],S[z]=!0,0<U&&U!==p-1&&0!==N&&N!==f-1&&(T[z]=!0),z++;for(u=0,U=1;U<p-2;U++)for(F=U*f,B=(U+1)*f,N=1;N<f-2;N++)w[u++]=B+N,w[u++]=B+N+1,w[u++]=F+N+1,w[u++]=B+N,w[u++]=F+N+1,w[u++]=F+N;if(y)for(var G=p*f,U=1;U<p-2;U++)for(F=G+U*f,B=G+(U+1)*f,N=1;N<f-2;N++)w[u++]=B+N,w[u++]=F+N,w[u++]=F+N+1,w[u++]=B+N,w[u++]=F+N+1,w[u++]=B+N+1;if(y){if(_)for(k=p*f,U=1;U<f-2;U++)w[u++]=U,w[u++]=U+1,w[u++]=k+U+1,w[u++]=U,w[u++]=k+U+1,w[u++]=k+U;if(v)for(V=p*f-f,k=p*f*g-f,U=1;U<f-2;U++)w[u++]=V+U+1,w[u++]=V+U,w[u++]=k+U,w[u++]=V+U+1,w[u++]=k+U,w[u++]=k+U+1}if(C){for(U=1;U<p-2;U++)k=f*p+f*U,V=f*U,w[u++]=k,w[u++]=V+f,w[u++]=V,w[u++]=k,w[u++]=k+f,w[u++]=V+f;for(U=1;U<p-2;U++)k=f*p+f*(U+1)-1,V=f*(U+1)-1,w[u++]=V+f,w[u++]=k,w[u++]=V,w[u++]=V+f,w[u++]=k+f,w[u++]=k}g=new GeometryAttributes,s.position&&(g.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:b}));var $=0,H=0,W=0,j=0,q=x/2,Y=Ellipsoid.fromCartesian3(t),X=Ellipsoid.fromCartesian3(i);if(s.st||s.normal||s.tangent||s.bitangent){for(U=0;U<x;U++){J=S[U]?X:Y;var Q,Z=Cartesian3.fromArray(b,3*U,scratchPosition$1),J=J.geodeticSurfaceNormal(Z,scratchNormal$4);T[U]&&Cartesian3.negate(J,J),s.st&&(Q=Cartesian2.negate(J,scratchNormalST),M[$++]=Math.atan2(Q.y,Q.x)/CesiumMath.TWO_PI+.5,M[$++]=Math.asin(J.z)/Math.PI+.5),s.normal&&(A[H++]=J.x,A[H++]=J.y,A[H++]=J.z),(s.tangent||s.bitangent)&&(Z=scratchTangent$2,Q=0,S[U]&&(Q=q),Q=!_&&Q<=U&&U<Q+2*f?Cartesian3.UNIT_X:Cartesian3.UNIT_Z,Cartesian3.cross(Q,J,Z),Cartesian3.normalize(Z,Z),s.tangent&&(P[W++]=Z.x,P[W++]=Z.y,P[W++]=Z.z),s.bitangent&&(Z=Cartesian3.cross(J,Z,scratchBitangent$2),Cartesian3.normalize(Z,Z),D[j++]=Z.x,D[j++]=Z.y,D[j++]=Z.z))}s.st&&(g.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:M})),s.normal&&(g.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:A})),s.tangent&&(g.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:P})),s.bitangent&&(g.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:D}))}return defined(e._offsetAttribute)&&(C=b.length,arrayFill(C=new Uint8Array(C/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),g.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})),new Geometry({attributes:g,indices:w,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:BoundingSphere.fromEllipsoid(Y),offsetAttribute:e._offsetAttribute})}}},EllipsoidGeometry.getUnitEllipsoid=function(){return defined(unitEllipsoidGeometry)||(unitEllipsoidGeometry=EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new Cartesian3(1,1,1),vertexFormat:VertexFormat.POSITION_ONLY}))),unitEllipsoidGeometry};var defaultRadii$1=new Cartesian3(1,1,1),cos$1=Math.cos,sin$1=Math.sin;function EllipsoidOutlineGeometry(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.radii,defaultRadii$1),i=defaultValue(e.innerRadii,t),r=defaultValue(e.minimumClock,0),n=defaultValue(e.maximumClock,CesiumMath.TWO_PI),a=defaultValue(e.minimumCone,0),o=defaultValue(e.maximumCone,CesiumMath.PI),s=Math.round(defaultValue(e.stackPartitions,10)),l=Math.round(defaultValue(e.slicePartitions,8)),c=Math.round(defaultValue(e.subdivisions,128));this._radii=Cartesian3.clone(t),this._innerRadii=Cartesian3.clone(i),this._minimumClock=r,this._maximumClock=n,this._minimumCone=a,this._maximumCone=o,this._stackPartitions=s,this._slicePartitions=l,this._subdivisions=c,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}EllipsoidOutlineGeometry.packedLength=2*Cartesian3.packedLength+8,EllipsoidOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Cartesian3.pack(e._radii,t,i),i+=Cartesian3.packedLength,Cartesian3.pack(e._innerRadii,t,i),i+=Cartesian3.packedLength,t[i++]=e._minimumClock,t[i++]=e._maximumClock,t[i++]=e._minimumCone,t[i++]=e._maximumCone,t[i++]=e._stackPartitions,t[i++]=e._slicePartitions,t[i++]=e._subdivisions,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchRadii$1=new Cartesian3,scratchInnerRadii$1=new Cartesian3,scratchOptions$d={radii:scratchRadii$1,innerRadii:scratchInnerRadii$1,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};function EllipsoidTerrainProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,defined(this._tilingScheme)||(this._tilingScheme=new GeographicTilingScheme({ellipsoid:defaultValue(e.ellipsoid,Ellipsoid.WGS84)})),this._levelZeroMaximumGeometricError=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new Event,this._readyPromise=when.resolve(!0)}function EventHelper(){this._removalFunctions=[]}EllipsoidOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Cartesian3.unpack(e,t,scratchRadii$1);t+=Cartesian3.packedLength;var n=Cartesian3.unpack(e,t,scratchInnerRadii$1);t+=Cartesian3.packedLength;var a=e[t++],o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=e[t++];t=e[t];return defined(i)?(i._radii=Cartesian3.clone(r,i._radii),i._innerRadii=Cartesian3.clone(n,i._innerRadii),i._minimumClock=a,i._maximumClock=o,i._minimumCone=s,i._maximumCone=l,i._stackPartitions=c,i._slicePartitions=u,i._subdivisions=d,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$d.minimumClock=a,scratchOptions$d.maximumClock=o,scratchOptions$d.minimumCone=s,scratchOptions$d.maximumCone=l,scratchOptions$d.stackPartitions=c,scratchOptions$d.slicePartitions=u,scratchOptions$d.subdivisions=d,scratchOptions$d.offsetAttribute=-1===t?void 0:t,new EllipsoidOutlineGeometry(scratchOptions$d))},EllipsoidOutlineGeometry.createGeometry=function(e){var t=e._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var i=e._innerRadii;if(!(i.x<=0||i.y<=0||i.z<=0)){var r=e._minimumClock,n=e._maximumClock,a=e._minimumCone,o=e._maximumCone,s=e._subdivisions,l=Ellipsoid.fromCartesian3(t),c=e._slicePartitions+1,u=e._stackPartitions+1;(c=Math.round(c*Math.abs(n-r)/CesiumMath.TWO_PI))<2&&(c=2),(u=Math.round(u*Math.abs(o-a)/CesiumMath.PI))<2&&(u=2);var d=0,h=1,p=i.x!==t.x||i.y!==t.y||i.z!==t.z,f=!1,m=!1;p&&(h=2,0<a&&(f=!0,d+=c),o<Math.PI&&(m=!0,d+=c));for(var g,y,_=s*h*(u+c),v=new Float64Array(3*_),C=(d=2*(_+d-(c+u)*h),IndexDatatype$1.createTypedArray(_,d)),x=0,b=new Array(u),S=new Array(u),T=0;T<u;T++)y=a+T*(o-a)/(u-1),b[T]=sin$1(y),S[T]=cos$1(y);var E=new Array(s),w=new Array(s);for(T=0;T<s;T++)g=r+T*(n-r)/(s-1),E[T]=sin$1(g),w[T]=cos$1(g);for(T=0;T<u;T++)for(P=0;P<s;P++)v[x++]=t.x*b[T]*w[P],v[x++]=t.y*b[T]*E[P],v[x++]=t.z*S[T];if(p)for(T=0;T<u;T++)for(P=0;P<s;P++)v[x++]=i.x*b[T]*w[P],v[x++]=i.y*b[T]*E[P],v[x++]=i.z*S[T];for(b.length=s,S.length=s,T=0;T<s;T++)y=a+T*(o-a)/(s-1),b[T]=sin$1(y),S[T]=cos$1(y);for(E.length=c,w.length=c,T=0;T<c;T++)g=r+T*(n-r)/(c-1),E[T]=sin$1(g),w[T]=cos$1(g);for(T=0;T<s;T++)for(P=0;P<c;P++)v[x++]=t.x*b[T]*w[P],v[x++]=t.y*b[T]*E[P],v[x++]=t.z*S[T];if(p)for(T=0;T<s;T++)for(P=0;P<c;P++)v[x++]=i.x*b[T]*w[P],v[x++]=i.y*b[T]*E[P],v[x++]=i.z*S[T];for(T=x=0;T<u*h;T++)for(var A=T*s,P=0;P<s-1;P++)C[x++]=A+P,C[x++]=A+P+1;var D=u*s*h;for(T=0;T<c;T++)for(P=0;P<s-1;P++)C[x++]=D+T+P*c,C[x++]=D+T+(P+1)*c;if(p)for(D=u*s*h+c*s,T=0;T<c;T++)for(P=0;P<s-1;P++)C[x++]=D+T+P*c,C[x++]=D+T+(P+1)*c;if(p){var M=u*s*h,I=M+s*c;if(f)for(T=0;T<c;T++)C[x++]=M+T,C[x++]=I+T;if(m)for(M+=s*c-c,I+=s*c-c,T=0;T<c;T++)C[x++]=M+T,C[x++]=I+T}return f=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:v})}),defined(e._offsetAttribute)&&(m=v.length,arrayFill(m=new Uint8Array(m/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),f.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})),new Geometry({attributes:f,indices:C,primitiveType:PrimitiveType$1.LINES,boundingSphere:BoundingSphere.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})}}},Object.defineProperties(EllipsoidTerrainProvider.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}}),EllipsoidTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){return when.resolve(new HeightmapTerrainData({buffer:new Uint8Array(256),width:16,height:16}))},EllipsoidTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},EllipsoidTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){},EllipsoidTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){},EventHelper.prototype.add=function(e,t,i){var r=e.addEventListener(t,i);this._removalFunctions.push(r);var n=this;return function(){r();var e=n._removalFunctions;e.splice(e.indexOf(r),1)}},EventHelper.prototype.removeAll=function(){for(var e=this._removalFunctions,t=0,i=e.length;t<i;++t)e[t]();e.length=0};var ExtrapolationType={NONE:0,HOLD:1,EXTRAPOLATE:2},ExtrapolationType$1=Object.freeze(ExtrapolationType);function OrthographicOffCenterFrustum(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=defaultValue(e.near,1),this._near=this.near,this.far=defaultValue(e.far,5e8),this._far=this.far,this._cullingVolume=new CullingVolume,this._orthographicMatrix=new Matrix4}function update(e){e.top===e._top&&e.bottom===e._bottom&&e.left===e._left&&e.right===e._right&&e.near===e._near&&e.far===e._far||(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=Matrix4.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(OrthographicOffCenterFrustum.prototype,{projectionMatrix:{get:function(){return update(this),this._orthographicMatrix}}});var getPlanesRight=new Cartesian3,getPlanesNearCenter=new Cartesian3,getPlanesPoint=new Cartesian3,negateScratch=new Cartesian3;function OrthographicFrustum(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._offCenterFrustum=new OrthographicOffCenterFrustum,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=defaultValue(e.near,1),this._near=this.near,this.far=defaultValue(e.far,5e8),this._far=this.far}function update$1(e){var t,i=e._offCenterFrustum;e.width===e._width&&e.aspectRatio===e._aspectRatio&&e.near===e._near&&e.far===e._far||(e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far,t=1/e.aspectRatio,i.right=.5*e.width,i.left=-i.right,i.top=t*i.right,i.bottom=-i.top,i.near=e.near,i.far=e.far)}function PerspectiveOffCenterFrustum(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=defaultValue(e.near,1),this._near=this.near,this.far=defaultValue(e.far,5e8),this._far=this.far,this._cullingVolume=new CullingVolume,this._perspectiveMatrix=new Matrix4,this._infinitePerspective=new Matrix4}function update$2(e){var t=e.top,i=e.bottom,r=e.right,n=e.left,a=e.near,o=e.far;t===e._top&&i===e._bottom&&n===e._left&&r===e._right&&a===e._near&&o===e._far||(e._left=n,e._right=r,e._top=t,e._bottom=i,e._near=a,e._far=o,e._perspectiveMatrix=Matrix4.computePerspectiveOffCenter(n,r,i,t,a,o,e._perspectiveMatrix),e._infinitePerspective=Matrix4.computeInfinitePerspectiveOffCenter(n,r,i,t,a,e._infinitePerspective))}OrthographicOffCenterFrustum.prototype.computeCullingVolume=function(e,t,i){var r=this._cullingVolume.planes,n=this.top,a=this.bottom,o=this.right,s=this.left,l=this.near,c=this.far,u=Cartesian3.cross(t,i,getPlanesRight);Cartesian3.normalize(u,u);var d=getPlanesNearCenter;return Cartesian3.multiplyByScalar(t,l,d),Cartesian3.add(e,d,d),l=getPlanesPoint,Cartesian3.multiplyByScalar(u,s,l),Cartesian3.add(d,l,l),defined(s=r[0])||(s=r[0]=new Cartesian4),s.x=u.x,s.y=u.y,s.z=u.z,s.w=-Cartesian3.dot(u,l),Cartesian3.multiplyByScalar(u,o,l),Cartesian3.add(d,l,l),defined(s=r[1])||(s=r[1]=new Cartesian4),s.x=-u.x,s.y=-u.y,s.z=-u.z,s.w=-Cartesian3.dot(Cartesian3.negate(u,negateScratch),l),Cartesian3.multiplyByScalar(i,a,l),Cartesian3.add(d,l,l),defined(s=r[2])||(s=r[2]=new Cartesian4),s.x=i.x,s.y=i.y,s.z=i.z,s.w=-Cartesian3.dot(i,l),Cartesian3.multiplyByScalar(i,n,l),Cartesian3.add(d,l,l),defined(s=r[3])||(s=r[3]=new Cartesian4),s.x=-i.x,s.y=-i.y,s.z=-i.z,s.w=-Cartesian3.dot(Cartesian3.negate(i,negateScratch),l),defined(s=r[4])||(s=r[4]=new Cartesian4),s.x=t.x,s.y=t.y,s.z=t.z,s.w=-Cartesian3.dot(t,d),Cartesian3.multiplyByScalar(t,c,l),Cartesian3.add(e,l,l),defined(s=r[5])||(s=r[5]=new Cartesian4),s.x=-t.x,s.y=-t.y,s.z=-t.z,s.w=-Cartesian3.dot(Cartesian3.negate(t,negateScratch),l),this._cullingVolume},OrthographicOffCenterFrustum.prototype.getPixelDimensions=function(e,t,i,r,n){return update(this),e=r*(this.right-this.left)/e,t=r*(this.top-this.bottom)/t,n.x=e,n.y=t,n},OrthographicOffCenterFrustum.prototype.clone=function(e){return defined(e)||(e=new OrthographicOffCenterFrustum),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},OrthographicOffCenterFrustum.prototype.equals=function(e){return defined(e)&&e instanceof OrthographicOffCenterFrustum&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},OrthographicOffCenterFrustum.prototype.equalsEpsilon=function(e,t,i){return e===this||defined(e)&&e instanceof OrthographicOffCenterFrustum&&CesiumMath.equalsEpsilon(this.right,e.right,t,i)&&CesiumMath.equalsEpsilon(this.left,e.left,t,i)&&CesiumMath.equalsEpsilon(this.top,e.top,t,i)&&CesiumMath.equalsEpsilon(this.bottom,e.bottom,t,i)&&CesiumMath.equalsEpsilon(this.near,e.near,t,i)&&CesiumMath.equalsEpsilon(this.far,e.far,t,i)},OrthographicFrustum.packedLength=4,OrthographicFrustum.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.width,t[i++]=e.aspectRatio,t[i++]=e.near,t[i]=e.far,t},OrthographicFrustum.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new OrthographicFrustum),i.width=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t],i},Object.defineProperties(OrthographicFrustum.prototype,{projectionMatrix:{get:function(){return update$1(this),this._offCenterFrustum.projectionMatrix}}}),OrthographicFrustum.prototype.computeCullingVolume=function(e,t,i){return update$1(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},OrthographicFrustum.prototype.getPixelDimensions=function(e,t,i,r,n){return update$1(this),this._offCenterFrustum.getPixelDimensions(e,t,i,r,n)},OrthographicFrustum.prototype.clone=function(e){return defined(e)||(e=new OrthographicFrustum),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},OrthographicFrustum.prototype.equals=function(e){return!!(defined(e)&&e instanceof OrthographicFrustum)&&(update$1(this),update$1(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},OrthographicFrustum.prototype.equalsEpsilon=function(e,t,i){return!!(defined(e)&&e instanceof OrthographicFrustum)&&(update$1(this),update$1(e),CesiumMath.equalsEpsilon(this.width,e.width,t,i)&&CesiumMath.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))},Object.defineProperties(PerspectiveOffCenterFrustum.prototype,{projectionMatrix:{get:function(){return update$2(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return update$2(this),this._infinitePerspective}}});var getPlanesRight$1=new Cartesian3,getPlanesNearCenter$1=new Cartesian3,getPlanesFarCenter=new Cartesian3,getPlanesNormal=new Cartesian3;function PerspectiveFrustum(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._offCenterFrustum=new PerspectiveOffCenterFrustum,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=defaultValue(e.near,1),this._near=this.near,this.far=defaultValue(e.far,5e8),this._far=this.far,this.xOffset=defaultValue(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=defaultValue(e.yOffset,0),this._yOffset=this.yOffset}function update$3(e){var t=e._offCenterFrustum;e.fov===e._fov&&e.aspectRatio===e._aspectRatio&&e.near===e._near&&e.far===e._far&&e.xOffset===e._xOffset&&e.yOffset===e._yOffset||(e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}PerspectiveOffCenterFrustum.prototype.computeCullingVolume=function(e,t,i){var r=this._cullingVolume.planes,n=this.top,a=this.bottom,o=this.right,s=this.left,l=this.near,c=this.far,u=Cartesian3.cross(t,i,getPlanesRight$1),d=getPlanesNearCenter$1;return Cartesian3.multiplyByScalar(t,l,d),Cartesian3.add(e,d,d),l=getPlanesFarCenter,Cartesian3.multiplyByScalar(t,c,l),Cartesian3.add(e,l,l),c=getPlanesNormal,Cartesian3.multiplyByScalar(u,s,c),Cartesian3.add(d,c,c),Cartesian3.subtract(c,e,c),Cartesian3.normalize(c,c),Cartesian3.cross(c,i,c),Cartesian3.normalize(c,c),defined(s=r[0])||(s=r[0]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,e),Cartesian3.multiplyByScalar(u,o,c),Cartesian3.add(d,c,c),Cartesian3.subtract(c,e,c),Cartesian3.cross(i,c,c),Cartesian3.normalize(c,c),defined(s=r[1])||(s=r[1]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,e),Cartesian3.multiplyByScalar(i,a,c),Cartesian3.add(d,c,c),Cartesian3.subtract(c,e,c),Cartesian3.cross(u,c,c),Cartesian3.normalize(c,c),defined(s=r[2])||(s=r[2]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,e),Cartesian3.multiplyByScalar(i,n,c),Cartesian3.add(d,c,c),Cartesian3.subtract(c,e,c),Cartesian3.cross(c,u,c),Cartesian3.normalize(c,c),defined(s=r[3])||(s=r[3]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,e),defined(s=r[4])||(s=r[4]=new Cartesian4),s.x=t.x,s.y=t.y,s.z=t.z,s.w=-Cartesian3.dot(t,d),Cartesian3.negate(t,c),defined(s=r[5])||(s=r[5]=new Cartesian4),s.x=c.x,s.y=c.y,s.z=c.z,s.w=-Cartesian3.dot(c,l),this._cullingVolume},PerspectiveOffCenterFrustum.prototype.getPixelDimensions=function(e,t,i,r,n){update$2(this);var a=1/this.near;t=2*r*i*(this.top*a)/t,e=2*r*i*(this.right*a)/e;return n.x=e,n.y=t,n},PerspectiveOffCenterFrustum.prototype.clone=function(e){return defined(e)||(e=new PerspectiveOffCenterFrustum),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},PerspectiveOffCenterFrustum.prototype.equals=function(e){return defined(e)&&e instanceof PerspectiveOffCenterFrustum&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},PerspectiveOffCenterFrustum.prototype.equalsEpsilon=function(e,t,i){return e===this||defined(e)&&e instanceof PerspectiveOffCenterFrustum&&CesiumMath.equalsEpsilon(this.right,e.right,t,i)&&CesiumMath.equalsEpsilon(this.left,e.left,t,i)&&CesiumMath.equalsEpsilon(this.top,e.top,t,i)&&CesiumMath.equalsEpsilon(this.bottom,e.bottom,t,i)&&CesiumMath.equalsEpsilon(this.near,e.near,t,i)&&CesiumMath.equalsEpsilon(this.far,e.far,t,i)},PerspectiveFrustum.packedLength=6,PerspectiveFrustum.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.fov,t[i++]=e.aspectRatio,t[i++]=e.near,t[i++]=e.far,t[i++]=e.xOffset,t[i]=e.yOffset,t},PerspectiveFrustum.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new PerspectiveFrustum),i.fov=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t++],i.xOffset=e[t++],i.yOffset=e[t],i},Object.defineProperties(PerspectiveFrustum.prototype,{projectionMatrix:{get:function(){return update$3(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return update$3(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return update$3(this),this._fovy}},sseDenominator:{get:function(){return update$3(this),this._sseDenominator}}}),PerspectiveFrustum.prototype.computeCullingVolume=function(e,t,i){return update$3(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},PerspectiveFrustum.prototype.getPixelDimensions=function(e,t,i,r,n){return update$3(this),this._offCenterFrustum.getPixelDimensions(e,t,i,r,n)},PerspectiveFrustum.prototype.clone=function(e){return defined(e)||(e=new PerspectiveFrustum),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},PerspectiveFrustum.prototype.equals=function(e){return!!(defined(e)&&e instanceof PerspectiveFrustum)&&(update$3(this),update$3(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},PerspectiveFrustum.prototype.equalsEpsilon=function(e,t,i){return!!(defined(e)&&e instanceof PerspectiveFrustum)&&(update$3(this),update$3(e),CesiumMath.equalsEpsilon(this.fov,e.fov,t,i)&&CesiumMath.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))};var PERSPECTIVE=0,ORTHOGRAPHIC=1;function FrustumGeometry(e){var t,i,r=e.frustum,n=e.orientation,a=e.origin,o=defaultValue(e.vertexFormat,VertexFormat.DEFAULT);e=defaultValue(e._drawNearPlane,!0);r instanceof PerspectiveFrustum?(t=PERSPECTIVE,i=PerspectiveFrustum.packedLength):r instanceof OrthographicFrustum&&(t=ORTHOGRAPHIC,i=OrthographicFrustum.packedLength),this._frustumType=t,this._frustum=r.clone(),this._origin=Cartesian3.clone(a),this._orientation=Quaternion.clone(n),this._drawNearPlane=e,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+i+Cartesian3.packedLength+Quaternion.packedLength+VertexFormat.packedLength}FrustumGeometry.pack=function(e,t,i){i=defaultValue(i,0);var r=e._frustumType,n=e._frustum;return(t[i++]=r)===PERSPECTIVE?(PerspectiveFrustum.pack(n,t,i),i+=PerspectiveFrustum.packedLength):(OrthographicFrustum.pack(n,t,i),i+=OrthographicFrustum.packedLength),Cartesian3.pack(e._origin,t,i),i+=Cartesian3.packedLength,Quaternion.pack(e._orientation,t,i),i+=Quaternion.packedLength,VertexFormat.pack(e._vertexFormat,t,i),t[i+=VertexFormat.packedLength]=e._drawNearPlane?1:0,t};var scratchPackPerspective=new PerspectiveFrustum,scratchPackOrthographic=new OrthographicFrustum,scratchPackQuaternion=new Quaternion,scratchPackorigin=new Cartesian3,scratchVertexFormat$6=new VertexFormat;function getAttributes(e,t,i,r,n,a,o,s){for(var l=e/3*2,c=0;c<4;++c)defined(t)&&(t[e]=a.x,t[e+1]=a.y,t[e+2]=a.z),defined(i)&&(i[e]=o.x,i[e+1]=o.y,i[e+2]=o.z),defined(r)&&(r[e]=s.x,r[e+1]=s.y,r[e+2]=s.z),e+=3;n[l]=0,n[1+l]=0,n[2+l]=1,n[3+l]=0,n[4+l]=1,n[5+l]=1,n[6+l]=0,n[7+l]=1}FrustumGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r,n=e[t++];n===PERSPECTIVE?(r=PerspectiveFrustum.unpack(e,t,scratchPackPerspective),t+=PerspectiveFrustum.packedLength):(r=OrthographicFrustum.unpack(e,t,scratchPackOrthographic),t+=OrthographicFrustum.packedLength);var a=Cartesian3.unpack(e,t,scratchPackorigin);t+=Cartesian3.packedLength;var o=Quaternion.unpack(e,t,scratchPackQuaternion);t+=Quaternion.packedLength;var s=VertexFormat.unpack(e,t,scratchVertexFormat$6);e=1===e[t+=VertexFormat.packedLength];return defined(i)?(t=n===i._frustumType?i._frustum:void 0,i._frustum=r.clone(t),i._frustumType=n,i._origin=Cartesian3.clone(a,i._origin),i._orientation=Quaternion.clone(o,i._orientation),i._vertexFormat=VertexFormat.clone(s,i._vertexFormat),i._drawNearPlane=e,i):new FrustumGeometry({frustum:r,origin:a,orientation:o,vertexFormat:s,_drawNearPlane:e})};var scratchRotationMatrix=new Matrix3,scratchViewMatrix=new Matrix4,scratchInverseMatrix=new Matrix4,scratchXDirection=new Cartesian3,scratchYDirection=new Cartesian3,scratchZDirection=new Cartesian3,scratchNegativeX=new Cartesian3,scratchNegativeY=new Cartesian3,scratchNegativeZ=new Cartesian3,frustumSplits=new Array(3),frustumCornersNDC=new Array(4);frustumCornersNDC[0]=new Cartesian4(-1,-1,1,1),frustumCornersNDC[1]=new Cartesian4(1,-1,1,1),frustumCornersNDC[2]=new Cartesian4(1,1,1,1),frustumCornersNDC[3]=new Cartesian4(-1,1,1,1);for(var scratchFrustumCorners=new Array(4),i$1=0;i$1<4;++i$1)scratchFrustumCorners[i$1]=new Cartesian4;FrustumGeometry._computeNearFarPlanes=function(e,t,i,r,n,a,o,s){t=Matrix3.fromQuaternion(t,scratchRotationMatrix),a=defaultValue(a,scratchXDirection),o=defaultValue(o,scratchYDirection);var l=defaultValue(s,scratchZDirection);a=Matrix3.getColumn(t,0,a),o=Matrix3.getColumn(t,1,o),l=Matrix3.getColumn(t,2,l);Cartesian3.normalize(a,a),Cartesian3.normalize(o,o),Cartesian3.normalize(l,l),Cartesian3.negate(a,a);var c,u;a=Matrix4.computeView(e,l,o,a,scratchViewMatrix);i===PERSPECTIVE?(i=r.projectionMatrix,i=Matrix4.multiply(i,a,scratchInverseMatrix),u=Matrix4.inverse(i,scratchInverseMatrix)):c=Matrix4.inverseTransformation(a,scratchInverseMatrix),defined(u)?(frustumSplits[0]=r.near,frustumSplits[1]=r.far):(frustumSplits[0]=0,frustumSplits[1]=r.near,frustumSplits[2]=r.far);for(var d=0;d<2;++d)for(var h=0;h<4;++h){var p,f,m=Cartesian4.clone(frustumCornersNDC[h],scratchFrustumCorners[h]);defined(u)?(p=1/(m=Matrix4.multiplyByVector(u,m,m)).w,Cartesian3.multiplyByScalar(m,p,m),Cartesian3.subtract(m,e,m),Cartesian3.normalize(m,m),f=Cartesian3.dot(l,m),Cartesian3.multiplyByScalar(m,frustumSplits[d]/f,m),Cartesian3.add(m,e,m)):(defined(r._offCenterFrustum)&&(r=r._offCenterFrustum),p=frustumSplits[d],f=frustumSplits[d+1],m.x=.5*(m.x*(r.right-r.left)+r.left+r.right),m.y=.5*(m.y*(r.top-r.bottom)+r.bottom+r.top),m.z=.5*(m.z*(p-f)-p-f),m.w=1,Matrix4.multiplyByVector(c,m,m)),n[12*d+3*h]=m.x,n[12*d+3*h+1]=m.y,n[12*d+3*h+2]=m.z}},FrustumGeometry.createGeometry=function(e){var t=e._frustumType,i=e._frustum,r=e._origin,n=e._orientation,a=e._drawNearPlane,o=e._vertexFormat,s=a?6:5,l=new Float64Array(72);FrustumGeometry._computeNearFarPlanes(r,n,t,i,l);var c=24;l[c]=l[12],l[c+1]=l[13],l[c+2]=l[14],l[c+3]=l[0],l[c+4]=l[1],l[c+5]=l[2],l[c+6]=l[9],l[c+7]=l[10],l[c+8]=l[11],l[c+9]=l[21],l[c+10]=l[22],l[c+11]=l[23],l[c+=12]=l[15],l[c+1]=l[16],l[c+2]=l[17],l[c+3]=l[3],l[c+4]=l[4],l[c+5]=l[5],l[c+6]=l[0],l[c+7]=l[1],l[c+8]=l[2],l[c+9]=l[12],l[c+10]=l[13],l[c+11]=l[14],l[c+=12]=l[3],l[c+1]=l[4],l[c+2]=l[5],l[c+3]=l[15],l[c+4]=l[16],l[c+5]=l[17],l[c+6]=l[18],l[c+7]=l[19],l[c+8]=l[20],l[c+9]=l[6],l[c+10]=l[7],l[c+11]=l[8],l[c+=12]=l[6],l[c+1]=l[7],l[c+2]=l[8],l[c+3]=l[18],l[c+4]=l[19],l[c+5]=l[20],l[c+6]=l[21],l[c+7]=l[22],l[c+8]=l[23],l[c+9]=l[9],l[c+10]=l[10],l[c+11]=l[11],a||(l=l.subarray(12));var u,d,h,p,f=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l})});(defined(o.normal)||defined(o.tangent)||defined(o.bitangent)||defined(o.st))&&(u=defined(o.normal)?new Float32Array(12*s):void 0,d=defined(o.tangent)?new Float32Array(12*s):void 0,h=defined(o.bitangent)?new Float32Array(12*s):void 0,p=defined(o.st)?new Float32Array(8*s):void 0,e=scratchXDirection,r=scratchYDirection,n=scratchZDirection,t=Cartesian3.negate(e,scratchNegativeX),i=Cartesian3.negate(r,scratchNegativeY),o=Cartesian3.negate(n,scratchNegativeZ),c=0,a&&(getAttributes(c,u,d,h,p,o,e,r),c+=12),getAttributes(c,u,d,h,p,n,t,r),getAttributes(c+=12,u,d,h,p,t,o,r),getAttributes(c+=12,u,d,h,p,i,o,t),getAttributes(c+=12,u,d,h,p,e,n,r),getAttributes(c+=12,u,d,h,p,r,n,t),defined(u)&&(f.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:u})),defined(d)&&(f.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:d})),defined(h)&&(f.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:h})),defined(p)&&(f.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:p})));for(var m=new Uint16Array(6*s),g=0;g<s;++g){var y=6*g,_=4*g;m[y]=_,m[1+y]=1+_,m[2+y]=2+_,m[3+y]=_,m[4+y]=2+_,m[5+y]=3+_}return new Geometry({attributes:f,indices:m,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:BoundingSphere.fromVertices(l)})};var PERSPECTIVE$1=0,ORTHOGRAPHIC$1=1;function FrustumOutlineGeometry(e){var t,i,r=e.frustum,n=e.orientation,a=e.origin;e=defaultValue(e._drawNearPlane,!0);r instanceof PerspectiveFrustum?(t=PERSPECTIVE$1,i=PerspectiveFrustum.packedLength):r instanceof OrthographicFrustum&&(t=ORTHOGRAPHIC$1,i=OrthographicFrustum.packedLength),this._frustumType=t,this._frustum=r.clone(),this._origin=Cartesian3.clone(a),this._orientation=Quaternion.clone(n),this._drawNearPlane=e,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+i+Cartesian3.packedLength+Quaternion.packedLength}FrustumOutlineGeometry.pack=function(e,t,i){i=defaultValue(i,0);var r=e._frustumType,n=e._frustum;return(t[i++]=r)===PERSPECTIVE$1?(PerspectiveFrustum.pack(n,t,i),i+=PerspectiveFrustum.packedLength):(OrthographicFrustum.pack(n,t,i),i+=OrthographicFrustum.packedLength),Cartesian3.pack(e._origin,t,i),i+=Cartesian3.packedLength,Quaternion.pack(e._orientation,t,i),t[i+=Quaternion.packedLength]=e._drawNearPlane?1:0,t};var scratchPackPerspective$1=new PerspectiveFrustum,scratchPackOrthographic$1=new OrthographicFrustum,scratchPackQuaternion$1=new Quaternion,scratchPackorigin$1=new Cartesian3;FrustumOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r,n=e[t++];n===PERSPECTIVE$1?(r=PerspectiveFrustum.unpack(e,t,scratchPackPerspective$1),t+=PerspectiveFrustum.packedLength):(r=OrthographicFrustum.unpack(e,t,scratchPackOrthographic$1),t+=OrthographicFrustum.packedLength);var a=Cartesian3.unpack(e,t,scratchPackorigin$1);t+=Cartesian3.packedLength;var o=Quaternion.unpack(e,t,scratchPackQuaternion$1);e=1===e[t+=Quaternion.packedLength];return defined(i)?(t=n===i._frustumType?i._frustum:void 0,i._frustum=r.clone(t),i._frustumType=n,i._origin=Cartesian3.clone(a,i._origin),i._orientation=Quaternion.clone(o,i._orientation),i._drawNearPlane=e,i):new FrustumOutlineGeometry({frustum:r,origin:a,orientation:o,_drawNearPlane:e})},FrustumOutlineGeometry.createGeometry=function(e){var t=e._frustumType,i=e._frustum,r=e._origin,n=e._orientation,a=e._drawNearPlane;e=new Float64Array(24);FrustumGeometry._computeNearFarPlanes(r,n,t,i,e);i=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:e})});for(var o,s,l=a?2:1,c=new Uint16Array(8*(1+l)),u=a?0:1;u<2;++u)s=4*u,c[o=a?8*u:0]=s,c[o+1]=s+1,c[o+2]=s+1,c[o+3]=s+2,c[o+4]=s+2,c[o+5]=s+3,c[o+6]=s+3,c[o+7]=s;for(u=0;u<2;++u)s=4*u,c[o=8*(l+u)]=s,c[o+1]=s+4,c[o+2]=s+1,c[o+3]=s+5,c[o+4]=s+2,c[o+5]=s+6,c[o+6]=s+3,c[o+7]=s+7;return new Geometry({attributes:i,indices:c,primitiveType:PrimitiveType$1.LINES,boundingSphere:BoundingSphere.fromVertices(e)})};var GeocodeType={SEARCH:0,AUTOCOMPLETE:1},GeocodeType$1=Object.freeze(GeocodeType);function GeocoderService(){}function GeometryFactory(){DeveloperError.throwInstantiationError()}function GeometryInstanceAttribute(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=defaultValue(e.normalize,!1),this.value=e.value}GeocoderService.prototype.geocode=DeveloperError.throwInstantiationError,GeometryFactory.createGeometry=function(e){DeveloperError.throwInstantiationError()};var tmp$1={};!function(global,undefined$1){var rJb,sJb,tJb;rJb={1:[function(e,t,i){t.exports=function(e,t){for(var i=[],r=2;r<arguments.length;)i.push(arguments[r++]);var n=!0;return new Promise((function(r,a){i.push((function(e){if(n)if(n=!1,e)a(e);else{for(var t=[],i=1;i<arguments.length;)t.push(arguments[i++]);r.apply(null,t)}}));try{e.apply(t||this,i)}catch(e){n&&(n=!1,a(e))}}))}},{}],2:[function(e,t,i){i.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;1<--t%4&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var r=new Array(64),n=new Array(123),a=0;a<64;)n[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;i.encode=function(e,t,i){for(var n,a=[],o=0,s=0;t<i;){var l=e[t++];switch(s){case 0:a[o++]=r[l>>2],n=(3&l)<<4,s=1;break;case 1:a[o++]=r[n|l>>4],n=(15&l)<<2,s=2;break;case 2:a[o++]=r[n|l>>6],a[o++]=r[63&l],s=0}}return s&&(a[o++]=r[n],a[o]=61,1===s&&(a[o+1]=61)),String.fromCharCode.apply(String,a)};var o="invalid encoding";i.decode=function(e,t,i){for(var r,a=i,s=0,l=0;l<e.length;){var c=e.charCodeAt(l++);if(61===c&&1<s)break;if((c=n[c])===undefined$1)throw Error(o);switch(s){case 0:r=c,s=1;break;case 1:t[i++]=r<<2|(48&c)>>4,r=c,s=2;break;case 2:t[i++]=(15&r)<<4|(60&c)>>2,r=c,s=3;break;case 3:t[i++]=(3&r)<<6|c,s=0}}if(1===s)throw Error(o);return i-a},i.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,i){function r(){this._listeners={}}(t.exports=r).prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},r.prototype.off=function(e,t){if(e===undefined$1)this._listeners={};else if(t===undefined$1)this._listeners[e]=[];else for(var i=this._listeners[e],r=0;r<i.length;)i[r].fn===t?i.splice(r,1):++r;return this},r.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],r=1;r<arguments.length;)i.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,i)}return this}},{}],4:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],5:[function(e,t,i){t.exports=function(e,t,i){var r=i||8192,n=r>>>1,a=null,o=r;return function(i){return i<1||n<i?e(i):(r<o+i&&(a=e(r),o=0),i=t.call(a,o,o+=i),7&o&&(o=1+(7|o)),i)}}},{}],6:[function(e,t,i){i.length=function(e){for(var t,i=0,r=0;r<e.length;++r)(t=e.charCodeAt(r))<128?i+=1:t<2048?i+=2:55296==(64512&t)&&56320==(64512&e.charCodeAt(r+1))?(++r,i+=4):i+=3;return i},i.read=function(e,t,i){if(i-t<1)return"";for(var r,n=null,a=[],o=0;t<i;)(r=e[t++])<128?a[o++]=r:191<r&&r<224?a[o++]=(31&r)<<6|63&e[t++]:239<r&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,a[o++]=55296+(r>>10),a[o++]=56320+(1023&r)):a[o++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],8191<o&&((n=n||[]).push(String.fromCharCode.apply(String,a)),o=0);return n?(o&&n.push(String.fromCharCode.apply(String,a.slice(0,o))),n.join("")):String.fromCharCode.apply(String,a.slice(0,o))},i.write=function(e,t,i){for(var r,n,a=i,o=0;o<e.length;++o)(r=e.charCodeAt(o))<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(n=e.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&n),++o,t[i++]=r>>18|240,t[i++]=r>>12&63|128):t[i++]=r>>12|224,t[i++]=r>>6&63|128),t[i++]=63&r|128);return i-a}},{}],7:[function(e,t,i){var r=i;function n(){r.Reader._configure(r.BufferReader),r.util._configure()}r.build="minimal",r.roots={},r.Writer=e(14),r.BufferWriter=e(15),r.Reader=e(8),r.BufferReader=e(9),r.util=e(13),r.rpc=e(10),r.configure=n,r.Writer._configure(r.BufferWriter),n()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(e,t,i){t.exports=l;var r,n=e(13),a=n.LongBits,o=n.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var c,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function d(){var e=new a(0,0),t=0;if(!(4<this.len-this.pos)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,4<this.len-this.pos){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw s(this,8);return new a(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}l.create=n.Buffer?function(e){return(l.create=function(e){return n.Buffer.isBuffer(e)?new r(e):u(e)})(e)}:u,l.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,l.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return c}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return h(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|h(this.buf,this.pos+=4)};var f,m,g="undefined"!=typeof Float32Array?(f=new Float32Array(1),m=new Uint8Array(f.buffer),f[0]=-0,m[3]?function(e,t){return m[0]=e[t],m[1]=e[t+1],m[2]=e[t+2],m[3]=e[t+3],f[0]}:function(e,t){return m[0]=e[t+3],m[1]=e[t+2],m[2]=e[t+1],m[3]=e[t],f[0]}):function(e,t){e=2*((i=h(e,t+4))>>31)+1,t=i>>>23&255;var i=8388607&i;return 255==t?i?NaN:1/0*e:0==t?1401298464324817e-60*e*i:e*Math.pow(2,t-150)*(8388608+i)};l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=g(this.buf,this.pos);return this.pos+=4,e};var y,_,v="undefined"!=typeof Float64Array?(y=new Float64Array(1),_=new Uint8Array(y.buffer),y[0]=-0,_[7]?function(e,t){return _[0]=e[t],_[1]=e[t+1],_[2]=e[t+2],_[3]=e[t+3],_[4]=e[t+4],_[5]=e[t+5],_[6]=e[t+6],_[7]=e[t+7],y[0]}:function(e,t){return _[0]=e[t+7],_[1]=e[t+6],_[2]=e[t+5],_[3]=e[t+4],_[4]=e[t+3],_[5]=e[t+2],_[6]=e[t+1],_[7]=e[t],y[0]}):function(e,t){var i=h(e,t+4),r=h(e,t+8);e=2*(r>>31)+1,i=4294967296*(1048575&r)+i;return 2047==(t=r>>>20&2047)?i?NaN:1/0*e:0==t?5e-324*e*i:e*Math.pow(2,t-1075)*(i+4503599627370496)};l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=v(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw s(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){r=e;var t=n.Long?"toLong":"toNumber";n.merge(l.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},{13:13}],9:[function(e,t,i){t.exports=n;var r=e(8);function n(e){r.call(this,e)}(n.prototype=Object.create(r.prototype)).constructor=n,(e=e(13)).Buffer&&(n.prototype._slice=e.Buffer.prototype.slice),n.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{13:13,8:8}],10:[function(e,t,i){i.Service=e(11)},{11:11}],11:[function(e,t,i){t.exports=n;var r=e(13);function n(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}((n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n).prototype.rpcCall=function e(t,i,n,a,o){if(!a)throw TypeError("request must be specified");var s=this;if(!o)return r.asPromise(e,s,t,i,n,a);if(!s.rpcImpl)return setTimeout((function(){o(Error("already ended"))}),0),undefined$1;try{return s.rpcImpl(t,i[s.requestDelimited?"encodeDelimited":"encode"](a).finish(),(function(e,i){if(e)return s.emit("error",e,t),o(e);if(null===i)return s.end(!0),undefined$1;if(!(i instanceof n))try{i=n[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return s.emit("error",e,t),o(e)}return s.emit("data",i,t),o(null,i)}))}catch(e){return s.emit("error",e,t),setTimeout((function(){o(e)}),0),undefined$1}},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(e,t,i){t.exports=n;var r=e(13);function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var a=n.zero=new n(0,0);a.toNumber=function(){return 0},a.zzEncode=a.zzDecode=function(){return this},a.length=function(){return 1},n.zeroHash="\0\0\0\0\0\0\0\0",n.fromNumber=function(e){if(0===e)return a;var t=e<0;t&&(e=-e);var i=e>>>0;e=(e-i)/4294967296>>>0;return t&&(e=~e>>>0,i=~i>>>0,4294967295<++i&&(i=0,4294967295<++e&&(e=0))),new n(i,e)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):a},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0;e=~this.hi>>>0;return t||(e=e+1>>>0),-(t+4294967296*e)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var o=String.prototype.charCodeAt;n.fromHash=function(e){return"\0\0\0\0\0\0\0\0"===e?a:new n((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},n.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0==i?0==t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},{13:13}],13:[function(e,t,i){var r=i;function n(e,t,i){for(var r=Object.keys(t),n=0;n<r.length;++n)e[r[n]]!==undefined$1&&i||(e[r[n]]=t[r[n]]);return e}function a(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&n(this,i)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}r.asPromise=e(1),r.base64=e(2),r.EventEmitter=e(3),r.inquire=e(4),r.utf8=e(6),r.pool=e(5),r.LongBits=e(12),r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isNode=Boolean(global.process&&global.process.versions&&global.process.versions.node),r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=global.dcodeIO&&global.dcodeIO.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){return e=r.LongBits.fromHash(e),r.Long?r.Long.fromBits(e.lo,e.hi,t):e.toNumber(Boolean(t))},r.merge=n,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=a,r.ProtocolError=a("ProtocolError"),r.oneOfGetter=function(e){for(var t={},i=0;i<e.length;++i)t[e[i]]=1;return function(){for(var e=Object.keys(this),i=e.length-1;-1<i;--i)if(1===t[e[i]]&&this[e[i]]!==undefined$1&&null!==this[e[i]])return e[i]}},r.oneOfSetter=function(e){return function(t){for(var i=0;i<e.length;++i)e[i]!==t&&delete this[e[i]]}},r.lazyResolve=function(e,t){for(var i=0;i<t.length;++i)for(var r=Object.keys(t[i]),n=0;n<r.length;++n){for(var a=t[i][r[n]].split("."),o=e;a.length;)o=o[a.shift()];t[i][r[n]]=o}},r.toJSONOptions={longs:String,enums:String,bytes:String},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,i){return new e(t,i)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(e,t,i){t.exports=d;var r,n=e(13),a=n.LongBits,o=n.base64,s=n.utf8;function l(e,t,i){this.fn=e,this.len=t,this.next=undefined$1,this.val=i}function c(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new l(c,0,0),this.tail=this.head,this.states=null}function h(e,t,i){t[i]=255&e}function p(e,t){this.len=e,this.next=undefined$1,this.val=t}function f(e,t,i){for(;e.hi;)t[i++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;127<e.lo;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function m(e,t,i){t[i++]=255&e,t[i++]=e>>>8&255,t[i++]=e>>>16&255,t[i]=e>>>24}d.create=n.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d},d.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(d.alloc=n.pool(d.alloc,n.Array.prototype.subarray)),d.prototype.push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},(p.prototype=Object.create(l.prototype)).fn=function(e,t,i){for(;127<e;)t[i++]=127&e|128,e>>>=7;t[i]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this.push(f,10,a.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.int64=d.prototype.uint64=function(e){return e=a.from(e),this.push(f,e.length(),e)},d.prototype.sint64=function(e){return e=a.from(e).zzEncode(),this.push(f,e.length(),e)},d.prototype.bool=function(e){return this.push(h,1,e?1:0)},d.prototype.sfixed32=d.prototype.fixed32=function(e){return this.push(m,4,e>>>0)},d.prototype.sfixed64=d.prototype.fixed64=function(e){return e=a.from(e),this.push(m,4,e.lo).push(m,4,e.hi)};var g,y,_="undefined"!=typeof Float32Array?(g=new Float32Array(1),y=new Uint8Array(g.buffer),g[0]=-0,y[3]?function(e,t,i){g[0]=e,t[i++]=y[0],t[i++]=y[1],t[i++]=y[2],t[i]=y[3]}:function(e,t,i){g[0]=e,t[i++]=y[3],t[i++]=y[2],t[i++]=y[1],t[i]=y[0]}):function(e,t,i){var r=e<0?1:0;r&&(e=-e),0===e?m(0<1/e?0:2147483648,t,i):isNaN(e)?m(2147483647,t,i):m(34028234663852886e22<e?(r<<31|2139095040)>>>0:e<11754943508222875e-54?(r<<31|Math.round(e/1401298464324817e-60))>>>0:(r<<31|(r=Math.floor(Math.log(e)/Math.LN2))+127<<23|8388607&Math.round(e*Math.pow(2,-r)*8388608))>>>0,t,i)};d.prototype.float=function(e){return this.push(_,4,e)};var v,C,x="undefined"!=typeof Float64Array?(v=new Float64Array(1),C=new Uint8Array(v.buffer),v[0]=-0,C[7]?function(e,t,i){v[0]=e,t[i++]=C[0],t[i++]=C[1],t[i++]=C[2],t[i++]=C[3],t[i++]=C[4],t[i++]=C[5],t[i++]=C[6],t[i]=C[7]}:function(e,t,i){v[0]=e,t[i++]=C[7],t[i++]=C[6],t[i++]=C[5],t[i++]=C[4],t[i++]=C[3],t[i++]=C[2],t[i++]=C[1],t[i]=C[0]}):function(e,t,i){var r,n,a=e<0?1:0;a&&(e=-e),0===e?(m(0,t,i),m(0<1/e?0:2147483648,t,i+4)):isNaN(e)?(m(4294967295,t,i),m(2147483647,t,i+4)):17976931348623157e292<e?(m(0,t,i),m((a<<31|2146435072)>>>0,t,i+4)):e<22250738585072014e-324?(m((r=e/5e-324)>>>0,t,i),m((a<<31|r/4294967296)>>>0,t,i+4)):(1024===(n=Math.floor(Math.log(e)/Math.LN2))&&(n=1023),m(4503599627370496*(r=e*Math.pow(2,-n))>>>0,t,i),m((a<<31|n+1023<<20|1048576*r&1048575)>>>0,t,i+4))};d.prototype.double=function(e){return this.push(x,8,e)};var b=n.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var r=0;r<e.length;++r)t[i+r]=e[r]};d.prototype.bytes=function(e){var t,i=e.length>>>0;return i?(n.isString(e)&&(t=d.alloc(i=o.length(e)),o.decode(e,t,0),e=t),this.uint32(i).push(b,i,e)):this.push(h,1,0)},d.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t).push(s.write,t,e):this.push(h,1,0)},d.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new l(c,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(c,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},d._configure=function(e){r=e}},{13:13}],15:[function(e,t,i){t.exports=o;var r=e(14);(o.prototype=Object.create(r.prototype)).constructor=o;var n=e(13),a=n.Buffer;function o(){r.call(this)}o.alloc=function(e){return(o.alloc=n._Buffer_allocUnsafe)(e)};var s=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var r=0;r<e.length;)t[i++]=e[r++]};function l(e,t,i){e.length<40?n.utf8.write(e,t,i):t.utf8Write(e,i)}o.prototype.bytes=function(e){n.isString(e)&&(e=n._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(s,t,e),this},o.prototype.string=function(e){var t=a.byteLength(e);return this.uint32(t),t&&this.push(l,t,e),this}},{13:13,14:14}]},sJb={},tJb=[7],global.protobuf=function e(t){var i=sJb[t];return i||rJb[t][0].call(i=sJb[t]={exports:{}},e,i,i.exports),i.exports}(tJb[0])}(tmp$1);var protobuf=tmp$1.protobuf;function isBitSet(e,t){return 0!=(e&t)}var childrenBitmasks=[1,2,4,8],anyChildBitmask=15,cacheFlagBitmask=16,imageBitmask=64,terrainBitmask=128;function GoogleEarthEnterpriseTileInformation(e,t,i,r,n,a){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=r,this.imageryProvider=n,this.terrainProvider=a,this.ancestorHasTerrain=!1,this.terrainState=void 0}function stringToBuffer(e){for(var t=e.length,i=new ArrayBuffer(t),r=new Uint8Array(i),n=0;n<t;++n)r[n]=e.charCodeAt(n);return i}GoogleEarthEnterpriseTileInformation.clone=function(e,t){return defined(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new GoogleEarthEnterpriseTileInformation(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},GoogleEarthEnterpriseTileInformation.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},GoogleEarthEnterpriseTileInformation.prototype.hasSubtree=function(){return isBitSet(this._bits,cacheFlagBitmask)},GoogleEarthEnterpriseTileInformation.prototype.hasImagery=function(){return isBitSet(this._bits,imageBitmask)},GoogleEarthEnterpriseTileInformation.prototype.hasTerrain=function(){return isBitSet(this._bits,terrainBitmask)},GoogleEarthEnterpriseTileInformation.prototype.hasChildren=function(){return isBitSet(this._bits,anyChildBitmask)},GoogleEarthEnterpriseTileInformation.prototype.hasChild=function(e){return isBitSet(this._bits,childrenBitmasks[e])},GoogleEarthEnterpriseTileInformation.prototype.getChildBitmask=function(){return this._bits&anyChildBitmask};var defaultKey=stringToBuffer('Eô½\vyâjE"’,ÍqøIFgQ\0B%Æèa,f)\bÆ4Üjb%y\nwmiÖðœk“¡½NuàA[ß@V\fÙ»r›|3SîOlÔq°{ÀEVZ­wUe\v3’*¬l5Å0sø3>mF8J´Ýð.ÝuڌDt"úa"\f3"So¯9D\vŒ9Ù9L¹¿«\\ŒP_Ÿ"uxéq‘h;Áěð<VqH‚\'UfYNe˜u£aF}a?A\0Ÿ×´4M·F°Õ¸Š\'{‹Ü+»Mg0ÈÑö\\Pú[/F›n5/\'C.ë\n\f^¥se4ål.jC\'c#U©?q{gC}:¯ÍâTUœýKÆâŸ/(íË\\Æ-fˆ§;/*"N°k.Ý\r•}}GºC²²+>Mª>}æÎI‰Ææx\fa1-¤O¥~q ˆì\r1èN\v\0nPh}=\b\r•¦n£h—$[kó#ó¶s³\r\v@ÀŸØQ]ú".jßI\0¹ wUÆïj¿{GLƒîÜÜF…©­S+S4ÿ”Yä8è1ƒN¹XFkË-#†’p\x005ˆ"Ï1²&/çÃu-6,rt°#G·ÓÑ&…7râ\0ŒDÏÚ3-Þ`†i#i*|ÍKQ\r•T9w.)ê¦P¢joP™\\>TûïP[\vE‰m(w7ێJfJo™ åpâ¹q~\fmI-zþrÇòY0»]såÉ êx점ðŠB|G`°½&·q¶ÇŸÑ3‚=Ó«îc™È+S D\\qÆÌD2O<ÊÀ)=RÓaX©}e´ÜÏ\rô=ñ\b©BÚ#\tØ¿^PIøMÀËGLO÷{+ØÅ1’;µoÜl\r’ˆўÛ?âéÚ_ԄâFaZÞUϤ\0¾ýÎgñJi—æ HØ]~®q N®ÀV©‘<‚rçvì)IÖ]-ƒãÛ6©;f—‡jÕ¶=P^R¹KÇsWxÉô.Y•“oÐKW>\'\'Ç`Û;íšSD>?’mw¢\në?R¨ÆU^1I7…ôÅ&-©¿‹\'TÚÃj å*x°Öprª‹h½ˆ÷_H±~ÀXL?fù>áeÀp§Ï8i¯ðVldIœ\'­xtO‡ÞV9\0Úw\vË-‰û5Oõ\bQ`Á\nZGM&30xÚÀœFGâ[y`In7gS\n>éìF9²ñ4\rƄSuná\fYÙÞ)…{II¥wy¾IV.6ç\v:»Ob{ÒM1•/½8{¨O!áìFpv•})"xˆ\nÝ\\ÚÞQÏðüYRe|3ßóHÚ»*uÛ`²Ôüíì5¨ÿ(1-È܈F|Š["');function GoogleEarthEnterpriseMetadata(e){var t=e;"string"==typeof t||t instanceof Resource||(t=e.url),(t=Resource.createIfNeeded(t)).appendForwardSlash(),this._resource=t,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=CesiumMath.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var i=this;this._readyPromise=requestDbRoot(this).then((function(){return i.getQuadTreePacket("",i._quadPacketVersion)})).then((function(){return!0})).otherwise((function(e){var t="An error occurred while accessing "+getMetadataResource(i,"",1).url+".";return when.reject(new RuntimeError(t))}))}Object.defineProperties(GoogleEarthEnterpriseMetadata.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}}),GoogleEarthEnterpriseMetadata.tileXYToQuadKey=function(e,t,i){for(var r="",n=i;0<=n;--n){var a=1<<n,o=0;isBitSet(t,a)?isBitSet(e,a)&&(o|=1):(o|=2,isBitSet(e,a)||(o|=1)),r+=o}return r},GoogleEarthEnterpriseMetadata.quadKeyToTileXY=function(e){for(var t=0,i=0,r=e.length-1,n=r;0<=n;--n){var a=1<<n,o=+e[r-n];isBitSet(o,2)?isBitSet(o,1)||(t|=a):(i|=a,isBitSet(o,1)&&(t|=a))}return{x:t,y:i,level:r}},GoogleEarthEnterpriseMetadata.prototype.isValid=function(e){var t=this.getTileInformationFromQuadKey(e);if(defined(t))return null!==t;for(var i,r=!0,n=e;1<n.length;){if(i=n.substring(n.length-1),n=n.substring(0,n.length-1),defined(t=this.getTileInformationFromQuadKey(n))){t.hasSubtree()||t.hasChild(parseInt(i))||(r=!1);break}if(null===t){r=!1;break}}return r};var taskProcessor$1=new TaskProcessor("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY),dbrootParser,dbrootParserPromise;function populateSubtree(e,t,i){var r,n=e._tileInfo,a=t,o=n[a];if(defined(o)&&(!o.hasSubtree()||o.hasChildren()))return o;for(;void 0===o&&1<a.length;)o=n[a=a.substring(0,a.length-1)];var s=e._subtreePromises,l=s[a];return defined(l)?l.then((function(){return r=new Request({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),populateSubtree(e,t,r)})):defined(o)&&o.hasSubtree()?defined(l=e.getQuadTreePacket(a,o.cnodeVersion,i))?(s[a]=l).then((function(){return r=new Request({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),populateSubtree(e,t,r)})).always((function(){delete s[a]})):void 0:when.reject(new RuntimeError("Couldn't load metadata for tile "+t))}function getMetadataResource(e,t,i,r){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+i.toString(),request:r})}function requestDbRoot(e){var t,i,r=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});return defined(dbrootParserPromise)||(t=buildModuleUrl("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser,dbrootParserPromise=loadAndExecuteScript(t).then((function(){dbrootParser=window.cesiumGoogleEarthDbRootParser(protobuf),defined(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser}))),dbrootParserPromise.then((function(){return r.fetchArrayBuffer()})).then((function(t){var i=dbrootParser.EncryptedDbRootProto.decode(new Uint8Array(t)),r=i.encryptionData,n=r.byteOffset,a=n+r.byteLength;t=e.key=r.buffer.slice(n,a),a=(n=(r=i.dbrootData).byteOffset)+r.byteLength,a=r.buffer.slice(n,a);return taskProcessor$1.scheduleTask({buffer:a,type:"DbRoot",key:t},[a])})).then((function(t){var i=dbrootParser.DbRootProto.decode(new Uint8Array(t.buffer));e.imageryPresent=defaultValue(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=defaultValue(i.terrainPresent,e.terrainPresent),defined(i.endSnippet)&&defined(i.endSnippet.model)&&(t=i.endSnippet.model,e.negativeAltitudeExponentBias=defaultValue(t.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=defaultValue(t.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)),defined(i.databaseVersion)&&(e._quadPacketVersion=defaultValue(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));for(var r=e.providers,n=defaultValue(i.providerInfo,[]),a=n.length,o=0;o<a;++o){var s=n[o],l=s.copyrightString;defined(l)&&(r[s.providerId]=new Credit(l.value))}})).otherwise((function(){console.log("Failed to retrieve "+r.url+". Using defaults."),e.key=defaultKey}))}function GoogleEarthEnterpriseTerrainData(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=defaultValue(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=defaultValue(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket=function(e,t,i){if(t=defaultValue(t,1),defined(i=getMetadataResource(this,e=defaultValue(e,""),t,i).fetchArrayBuffer())){var r=this._tileInfo,n=this.key;return i.then((function(t){return taskProcessor$1.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:n},[t]).then((function(t){var i,n,a=-1;""!==e&&(a=e.length+1,i=t[e],(n=r[e])._bits|=i._bits,delete t[e]);var o=Object.keys(t);o.sort((function(e,t){return e.length-t.length}));for(var s=o.length,l=0;l<s;++l){var c,u,d=o[l];null!==t[d]?(c=GoogleEarthEnterpriseTileInformation.clone(t[d]),(u=d.length)===a?c.setParent(n):1<u&&(u=r[d.substring(0,d.length-1)],c.setParent(u)),r[d]=c):r[d]=null}}))}))}},GoogleEarthEnterpriseMetadata.prototype.populateSubtree=function(e,t,i,r){return populateSubtree(this,GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),r)},GoogleEarthEnterpriseMetadata.prototype.getTileInformation=function(e,t,i){return i=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),this._tileInfo[i]},GoogleEarthEnterpriseMetadata.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]},Object.defineProperties(GoogleEarthEnterpriseTerrainData.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var taskProcessor$2=new TaskProcessor("createVerticesFromGoogleEarthEnterpriseBuffer"),nativeRectangleScratch=new Rectangle,rectangleScratch$1=new Rectangle;GoogleEarthEnterpriseTerrainData.prototype.createMesh=function(e,t,i,r,n){var a=e.ellipsoid;e.tileXYToNativeRectangle(t,i,r,nativeRectangleScratch),e.tileXYToRectangle(t,i,r,rectangleScratch$1),n=defaultValue(n,1);var o=a.cartographicToCartesian(Rectangle.center(rectangleScratch$1));r=40075.16/(1<<r);if(this._skirtHeight=Math.min(8*r,1e3),defined(a=taskProcessor$2.scheduleTask({buffer:this._buffer,nativeRectangle:nativeRectangleScratch,rectangle:rectangleScratch$1,relativeToCenter:o,ellipsoid:a,skirtHeight:this._skirtHeight,exaggeration:n,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold}))){var s=this;return a.then((function(e){return s._mesh=new TerrainMesh(o,new Float32Array(e.vertices),new Uint16Array(e.indices),e.indexCountWithoutSkirts,e.vertexCountWithoutSkirts,e.minimumHeight,e.maximumHeight,BoundingSphere.clone(e.boundingSphere3D),Cartesian3.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,OrientedBoundingBox.clone(e.orientedBoundingBox),TerrainEncoding.clone(e.encoding),n,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),s._minimumHeight=e.minimumHeight,s._maximumHeight=e.maximumHeight,s._buffer=void 0,s._mesh}))}},GoogleEarthEnterpriseTerrainData.prototype.interpolateHeight=function(e,t,i){return t=CesiumMath.clamp((t-e.west)/e.width,0,1),i=CesiumMath.clamp((i-e.south)/e.height,0,1),defined(this._mesh)?interpolateMeshHeight$2(this,t,i):interpolateHeight$2(this,t,i,e)};var upsampleTaskProcessor$1=new TaskProcessor("upsampleQuantizedTerrainMesh");GoogleEarthEnterpriseTerrainData.prototype.upsample=function(e,t,i,r,n,a,o){var s=this._mesh;if(defined(this._mesh)){var l=2*t!==n;t=2*i===a,i=e.ellipsoid,o=e.tileXYToRectangle(n,a,o);if(defined(s=upsampleTaskProcessor$1.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:l,isNorthChild:t,childRectangle:o,ellipsoid:i,exaggeration:s.exaggeration}))){var c=this;return s.then((function(e){var t=new Uint16Array(e.vertices),i=IndexDatatype$1.createTypedArray(t.length/3,e.indices),r=c._skirtHeight;return new QuantizedMeshTerrainData({quantizedVertices:t,indices:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:BoundingSphere.clone(e.boundingSphere),orientedBoundingBox:OrientedBoundingBox.clone(e.orientedBoundingBox),horizonOcclusionPoint:Cartesian3.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:r,southSkirtHeight:r,eastSkirtHeight:r,northSkirtHeight:r,childTileMask:0,createdByUpsampling:!0,credits:c._credits})}))}}},GoogleEarthEnterpriseTerrainData.prototype.isChildAvailable=function(e,t,i,r){var n=2;return i!==2*e&&++n,r!==2*t&&(n-=2),0!=(this._childTileMask&1<<n)},GoogleEarthEnterpriseTerrainData.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var texCoordScratch0$1=new Cartesian2,texCoordScratch1$1=new Cartesian2,texCoordScratch2$1=new Cartesian2,barycentricCoordinateScratch$1=new Cartesian3;function interpolateMeshHeight$2(e,t,i){for(var r=(e=e._mesh).vertices,n=e.encoding,a=e.indices,o=0,s=a.length;o<s;o+=3){var l=a[o],c=a[o+1],u=a[o+2],d=n.decodeTextureCoordinates(r,l,texCoordScratch0$1),h=n.decodeTextureCoordinates(r,c,texCoordScratch1$1),p=n.decodeTextureCoordinates(r,u,texCoordScratch2$1);if(-1e-15<=(p=Intersections2D.computeBarycentricCoordinates(t,i,d.x,d.y,h.x,h.y,p.x,p.y,barycentricCoordinateScratch$1)).x&&-1e-15<=p.y&&-1e-15<=p.z)return l=n.decodeHeight(r,l),c=n.decodeHeight(r,c),u=n.decodeHeight(r,u),p.x*l+p.y*c+p.z*u}}var sizeOfUint16=Uint16Array.BYTES_PER_ELEMENT,sizeOfUint32=Uint32Array.BYTES_PER_ELEMENT,sizeOfInt32=Int32Array.BYTES_PER_ELEMENT,sizeOfFloat=Float32Array.BYTES_PER_ELEMENT,sizeOfDouble=Float64Array.BYTES_PER_ELEMENT;function interpolateHeight$2(e,t,i,r){var n=e._buffer,a=0,o=0,s=0;.5<i?(.5<t?(a=2,o=.5):a=3,s=.5):.5<t&&(a=1,o=.5);for(var l=new DataView(n),c=0,u=0;u<a;++u)c+=l.getUint32(c,!0),c+=sizeOfUint32;c+=sizeOfUint32,c+=2*sizeOfDouble,e=CesiumMath.toRadians(180*l.getFloat64(c,!0)),c+=sizeOfDouble,n=CesiumMath.toRadians(180*l.getFloat64(c,!0)),c+=sizeOfDouble;var d=r.width/e/2,h=r.height/n/2,p=l.getInt32(c,!0);c+=sizeOfInt32;var f=3*l.getInt32(c,!0);c+=sizeOfInt32,c+=sizeOfInt32;for(var m=new Array(p),g=new Array(p),y=new Array(p),_=0;_<p;++_)m[_]=o+l.getUint8(c++)*d,g[_]=s+l.getUint8(c++)*h,y[_]=6371010*l.getFloat32(c,!0),c+=sizeOfFloat;var v=new Array(f);for(_=0;_<f;++_)v[_]=l.getUint16(c,!0),c+=sizeOfUint16;for(_=0;_<f;_+=3){var C=v[_],x=v[_+1],b=v[_+2],S=m[C],T=m[x],E=m[b],w=g[C],A=g[x],P=g[b];if(-1e-15<=(P=Intersections2D.computeBarycentricCoordinates(t,i,S,w,T,A,E,P,barycentricCoordinateScratch$1)).x&&-1e-15<=P.y&&-1e-15<=P.z)return P.x*y[C]+P.y*y[x]+P.z*y[b]}}var TerrainState={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},julianDateScratch$1=new JulianDate;function TerrainCache(){this._terrainCache={},this._lastTidy=JulianDate.now()}function GoogleEarthEnterpriseTerrainProvider(e){var t;e=defaultValue(e,defaultValue.EMPTY_OBJECT),t=defined(e.metadata)?e.metadata:new GoogleEarthEnterpriseMetadata(Resource.createIfNeeded(e.url)),this._metadata=t,this._tilingScheme=new GeographicTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Rectangle(-CesiumMath.PI,-CesiumMath.PI,CesiumMath.PI,CesiumMath.PI),ellipsoid:e.ellipsoid}),"string"==typeof(e=e.credit)&&(e=new Credit(e)),this._credit=e,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new TerrainCache,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new Event,this._ready=!1;var i,r=this;this._readyPromise=t.readyPromise.then((function(e){return t.terrainPresent?(TileProviderError.handleSuccess(i),r._ready=e):(e=new RuntimeError("The server "+t.url+" doesn't have terrain"),i=TileProviderError.handleError(i,r,r._errorEvent,e.message,void 0,void 0,void 0,e),when.reject(e))})).otherwise((function(e){return i=TileProviderError.handleError(i,r,r._errorEvent,e.message,void 0,void 0,void 0,e),when.reject(e)}))}TerrainCache.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:JulianDate.now()}},TerrainCache.prototype.get=function(e){var t=this._terrainCache[e];if(defined(t))return delete this._terrainCache[e],t.buffer},TerrainCache.prototype.tidy=function(){if(JulianDate.now(julianDateScratch$1),10<JulianDate.secondsDifference(julianDateScratch$1,this._lastTidy)){for(var e=this._terrainCache,t=Object.keys(e),i=t.length,r=0;r<i;++r){var n=t[r],a=e[n];10<JulianDate.secondsDifference(julianDateScratch$1,a.timestamp)&&delete e[n]}JulianDate.clone(julianDateScratch$1,this._lastTidy)}},Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var taskProcessor$3=new TaskProcessor("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);function computeChildMask(e,t,i){var r=t.getChildBitmask();if(t.terrainState===TerrainState.PARENT)for(var n=r=0;n<4;++n){var a=i.getTileInformationFromQuadKey(e+n.toString());defined(a)&&a.hasTerrain()&&(r|=1<<n)}return r}function buildTerrainResource(e,t,i,r){return i=defined(i)&&0<i?i:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+i.toString(),request:r})}GoogleEarthEnterpriseTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){var n,a=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),o=this._terrainCache,s=this._metadata,l=s.getTileInformationFromQuadKey(a);if(!defined(l))return when.reject(new RuntimeError("Terrain tile doesn't exist"));if(defined(t=l.terrainState)||(t=l.terrainState=TerrainState.UNKNOWN),defined(i=o.get(a))){var c=s.providers[l.terrainProvider];return when.resolve(new GoogleEarthEnterpriseTerrainData({buffer:i,childTileMask:computeChildMask(a,l,s),credits:defined(c)?[c]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(o.tidy(),!l.ancestorHasTerrain)return when.resolve(new HeightmapTerrainData({buffer:new Uint8Array(256),width:16,height:16}));if(t===TerrainState.NONE)return when.reject(new RuntimeError("Terrain tile doesn't exist"));var u=a;c=-1;switch(t){case TerrainState.SELF:c=l.terrainVersion;break;case TerrainState.PARENT:u=u.substring(0,u.length-1),c=(n=s.getTileInformationFromQuadKey(u)).terrainVersion;break;case TerrainState.UNKNOWN:l.hasTerrain()?c=l.terrainVersion:(u=u.substring(0,u.length-1),defined(n=s.getTileInformationFromQuadKey(u))&&n.hasTerrain()&&(c=n.terrainVersion))}if(c<0)return when.reject(new RuntimeError("Terrain tile doesn't exist"));var d,h,p=this._terrainPromises,f=this._terrainRequests;if(defined(p[u]))d=p[u],h=f[u];else{if(!defined(c=buildTerrainResource(this,u,c,h=r).fetchArrayBuffer()))return;d=c.then((function(e){return defined(e)?taskProcessor$3.scheduleTask({buffer:e,type:"Terrain",key:s.key},[e]).then((function(e){var t=s.getTileInformationFromQuadKey(u);t.terrainState=TerrainState.SELF,o.add(u,e[0]);for(var i=t.terrainProvider,r=e.length-1,n=0;n<r;++n){var a=u+n.toString(),l=s.getTileInformationFromQuadKey(a);defined(l)&&(o.add(a,e[n+1]),l.terrainState=TerrainState.PARENT,0===l.terrainProvider&&(l.terrainProvider=i))}})):when.reject(new RuntimeError("Failed to load terrain."))})),p[u]=d,f[u]=h,d=d.always((function(){delete p[u],delete f[u]}))}return d.then((function(){var e=o.get(a);if(defined(e)){var t=s.providers[l.terrainProvider];return new GoogleEarthEnterpriseTerrainData({buffer:e,childTileMask:computeChildMask(a,l,s),credits:defined(t)?[t]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return when.reject(new RuntimeError("Failed to load terrain."))})).otherwise((function(e){return h.state===RequestState$1.CANCELLED?r.state=h.state:l.terrainState=TerrainState.NONE,when.reject(e)}))},GoogleEarthEnterpriseTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},GoogleEarthEnterpriseTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){var r=this._metadata,n=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),a=r.getTileInformation(e,t,i);if(null===a)return!1;if(defined(a)){if(!a.ancestorHasTerrain)return!0;var o=a.terrainState;return o!==TerrainState.NONE&&!!(defined(o)&&o!==TerrainState.UNKNOWN||(a.terrainState=TerrainState.UNKNOWN,a.hasTerrain())||(n=n.substring(0,n.length-1),defined(a=r.getTileInformationFromQuadKey(n))&&a.hasTerrain()))}return r.isValid(n)&&(n=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.TERRAIN}),r.populateSubtree(e,t,i,n)),!1},GoogleEarthEnterpriseTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){};var PROJECTIONS=[GeographicProjection,WebMercatorProjection],PROJECTION_COUNT=PROJECTIONS.length,MITER_BREAK_SMALL=Math.cos(CesiumMath.toRadians(30)),MITER_BREAK_LARGE=Math.cos(CesiumMath.toRadians(150)),WALL_INITIAL_MIN_HEIGHT=0,WALL_INITIAL_MAX_HEIGHT=1e3;function GroundPolylineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions;this.width=defaultValue(e.width,1),this._positions=t,this.granularity=defaultValue(e.granularity,9999),this.loop=defaultValue(e.loop,!1),this.arcType=defaultValue(e.arcType,ArcType$1.GEODESIC),this._ellipsoid=Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(GroundPolylineGeometry.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+Ellipsoid.packedLength+1+1}}}),GroundPolylineGeometry.setProjectionAndEllipsoid=function(e,t){for(var i=0,r=0;r<PROJECTION_COUNT;r++)if(t instanceof PROJECTIONS[r]){i=r;break}e._projectionIndex=i,e._ellipsoid=t.ellipsoid};var cart3Scratch1=new Cartesian3,cart3Scratch2=new Cartesian3,cart3Scratch3=new Cartesian3;function computeRightNormal(e,t,i,r,n){var a=getPosition(r,e,0,cart3Scratch1);i=getPosition(r,e,i,cart3Scratch2),t=getPosition(r,t,0,cart3Scratch3),i=direction(i,a,cart3Scratch2),a=direction(t,a,cart3Scratch3);return Cartesian3.cross(a,i,n),Cartesian3.normalize(n,n)}var interpolatedCartographicScratch=new Cartographic,interpolatedBottomScratch=new Cartesian3,interpolatedTopScratch=new Cartesian3,interpolatedNormalScratch=new Cartesian3;function interpolateSegment(e,t,i,r,n,a,o,s,l,c,u){var d;if(0!==n&&(a===ArcType$1.GEODESIC?d=new EllipsoidGeodesic(e,t,o):a===ArcType$1.RHUMB&&(d=new EllipsoidRhumbLine(e,t,o)),!((a=d.surfaceDistance)<n)))for(var h=computeRightNormal(e,t,r,o,interpolatedNormalScratch),p=a/(n=Math.ceil(a/n)),f=p,m=n-1,g=s.length,y=0;y<m;y++){var _=d.interpolateUsingSurfaceDistance(f,interpolatedCartographicScratch),v=getPosition(o,_,i,interpolatedBottomScratch),C=getPosition(o,_,r,interpolatedTopScratch);Cartesian3.pack(h,s,g),Cartesian3.pack(v,l,g),Cartesian3.pack(C,c,g),u.push(_.latitude),u.push(_.longitude),g+=3,f+=p}}var heightlessCartographicScratch=new Cartographic;function getPosition(e,t,i,r){return Cartographic.clone(t,heightlessCartographicScratch),heightlessCartographicScratch.height=i,Cartographic.toCartesian(heightlessCartographicScratch,e,r)}function direction(e,t,i){return Cartesian3.subtract(e,t,i),Cartesian3.normalize(i,i),i}function tangentDirection(e,t,i,r){return r=direction(e,t,r),r=Cartesian3.cross(r,i,r),r=Cartesian3.normalize(r,r),Cartesian3.cross(i,r,r)}GroundPolylineGeometry.pack=function(e,t,i){var r=defaultValue(i,0),n=e._positions,a=n.length;t[r++]=a;for(var o=0;o<a;++o){var s=n[o];Cartesian3.pack(s,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,Ellipsoid.pack(e._ellipsoid,t,r),r+=Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},GroundPolylineGeometry.unpack=function(e,t,i){for(var r=defaultValue(t,0),n=e[r++],a=new Array(n),o=0;o<n;o++)a[o]=Cartesian3.unpack(e,r),r+=3;var s=e[r++],l=1===e[r++],c=e[r++],u=Ellipsoid.unpack(e,r);r+=Ellipsoid.packedLength;var d=e[r++];t=1===e[r++];return defined(i)||(i=new GroundPolylineGeometry({positions:a})),i._positions=a,i.granularity=s,i.loop=l,i.arcType=c,i._ellipsoid=u,i._projectionIndex=d,i._scene3DOnly=t,i};var toPreviousScratch=new Cartesian3,toNextScratch=new Cartesian3,forwardScratch=new Cartesian3,vertexUpScratch=new Cartesian3,cosine90=0,cosine180=-1;function computeVertexMiterNormal(e,t,i,r,n){return e=tangentDirection(e,t,i=direction(i,t,vertexUpScratch),toPreviousScratch),t=tangentDirection(r,t,i,toNextScratch),CesiumMath.equalsEpsilon(Cartesian3.dot(e,t),cosine180,CesiumMath.EPSILON5)?(n=Cartesian3.cross(i,e,n),Cartesian3.normalize(n,n)):(n=Cartesian3.add(t,e,n),n=Cartesian3.normalize(n,n),i=Cartesian3.cross(i,n,forwardScratch),Cartesian3.dot(t,i)<cosine90&&(n=Cartesian3.negate(n,n)),n)}var XZ_PLANE=Plane.fromPointNormal(Cartesian3.ZERO,Cartesian3.UNIT_Y),previousBottomScratch=new Cartesian3,vertexBottomScratch=new Cartesian3,vertexTopScratch=new Cartesian3,nextBottomScratch=new Cartesian3,vertexNormalScratch=new Cartesian3,intersectionScratch=new Cartesian3,cartographicScratch0=new Cartographic,cartographicScratch1=new Cartographic,cartographicIntersectionScratch=new Cartographic;GroundPolylineGeometry.createGeometry=function(e){var t,i,r,n,a,o=!e._scene3DOnly,s=e.loop,l=e._ellipsoid,c=e.granularity,u=e.arcType,d=new PROJECTIONS[e._projectionIndex](l),h=WALL_INITIAL_MIN_HEIGHT,p=WALL_INITIAL_MAX_HEIGHT,f=e._positions,m=f.length;2===m&&(s=!1);for(var g,y,_,v=new EllipsoidRhumbLine(void 0,void 0,l),C=[f[0]],x=0;x<m-1;x++)i=f[x],r=f[x+1],!defined(g=IntersectionTests.lineSegmentPlane(i,r,XZ_PLANE,intersectionScratch))||Cartesian3.equalsEpsilon(g,i,CesiumMath.EPSILON7)||Cartesian3.equalsEpsilon(g,r,CesiumMath.EPSILON7)||(e.arcType===ArcType$1.GEODESIC?C.push(Cartesian3.clone(g)):e.arcType===ArcType$1.RHUMB&&(_=l.cartesianToCartographic(g,cartographicScratch0).longitude,n=l.cartesianToCartographic(i,cartographicScratch0),a=l.cartesianToCartographic(r,cartographicScratch1),v.setEndPoints(n,a),y=v.findIntersectionWithLongitude(_,cartographicIntersectionScratch),!defined(g=l.cartographicToCartesian(y,intersectionScratch))||Cartesian3.equalsEpsilon(g,i,CesiumMath.EPSILON7)||Cartesian3.equalsEpsilon(g,r,CesiumMath.EPSILON7)||C.push(Cartesian3.clone(g)))),C.push(r);s&&(i=f[m-1],r=f[0],!defined(g=IntersectionTests.lineSegmentPlane(i,r,XZ_PLANE,intersectionScratch))||Cartesian3.equalsEpsilon(g,i,CesiumMath.EPSILON7)||Cartesian3.equalsEpsilon(g,r,CesiumMath.EPSILON7)||(e.arcType===ArcType$1.GEODESIC?C.push(Cartesian3.clone(g)):e.arcType===ArcType$1.RHUMB&&(_=l.cartesianToCartographic(g,cartographicScratch0).longitude,n=l.cartesianToCartographic(i,cartographicScratch0),a=l.cartesianToCartographic(r,cartographicScratch1),v.setEndPoints(n,a),y=v.findIntersectionWithLongitude(_,cartographicIntersectionScratch),!defined(g=l.cartographicToCartesian(y,intersectionScratch))||Cartesian3.equalsEpsilon(g,i,CesiumMath.EPSILON7)||Cartesian3.equalsEpsilon(g,r,CesiumMath.EPSILON7)||C.push(Cartesian3.clone(g)))));var b=C.length,S=new Array(b);for(x=0;x<b;x++){var T=Cartographic.fromCartesian(C[x],l);T.height=0,S[x]=T}if(!((b=(S=arrayRemoveDuplicates(S,Cartographic.equalsEpsilon)).length)<2)){var E=[],w=[],A=[],P=[],D=previousBottomScratch,M=vertexBottomScratch,I=vertexTopScratch,R=nextBottomScratch,O=vertexNormalScratch,L=S[0],N=S[1];for(D=getPosition(l,S[b-1],h,D),R=getPosition(l,N,h,R),M=getPosition(l,L,h,M),I=getPosition(l,L,p,I),O=s?computeVertexMiterNormal(D,M,I,R,O):computeRightNormal(L,N,p,l,O),Cartesian3.pack(O,w,0),Cartesian3.pack(M,A,0),Cartesian3.pack(I,P,0),E.push(L.latitude),E.push(L.longitude),interpolateSegment(L,N,h,p,c,u,l,w,A,P,E),x=1;x<b-1;++x){D=Cartesian3.clone(M,D),M=Cartesian3.clone(R,M);var F=S[x];getPosition(l,F,p,I),getPosition(l,S[x+1],h,R),computeVertexMiterNormal(D,M,I,R,O),t=w.length,Cartesian3.pack(O,w,t),Cartesian3.pack(M,A,t),Cartesian3.pack(I,P,t),E.push(F.latitude),E.push(F.longitude),interpolateSegment(S[x],S[x+1],h,p,c,u,l,w,A,P,E)}var B=S[b-1],V=S[b-2];M=getPosition(l,B,h,M),I=getPosition(l,B,p,I);if(O=s?(N=S[0],computeVertexMiterNormal(D=getPosition(l,V,h,D),M,I,R=getPosition(l,N,h,R),O)):computeRightNormal(V,B,p,l,O),t=w.length,Cartesian3.pack(O,w,t),Cartesian3.pack(M,A,t),Cartesian3.pack(I,P,t),E.push(B.latitude),E.push(B.longitude),s){for(interpolateSegment(B,L,h,p,c,u,l,w,A,P,E),t=w.length,x=0;x<3;++x)w[t+x]=w[x],A[t+x]=A[x],P[t+x]=P[x];E.push(L.latitude),E.push(L.longitude)}return generateGeometryAttributes(s,d,A,P,w,E,o)}};var lineDirectionScratch=new Cartesian3,matrix3Scratch=new Matrix3,quaternionScratch$2=new Quaternion;function breakMiter(e,t,i,r){return t=direction(i,t,lineDirectionScratch),t=Cartesian3.dot(t,e),(MITER_BREAK_SMALL<t||t<MITER_BREAK_LARGE)&&(i=direction(r,i,vertexUpScratch),t=t<MITER_BREAK_LARGE?CesiumMath.PI_OVER_TWO:-CesiumMath.PI_OVER_TWO,t=Quaternion.fromAxisAngle(i,t,quaternionScratch$2),t=Matrix3.fromQuaternion(t,matrix3Scratch),Matrix3.multiplyByVector(t,e,e),!0)}var endPosCartographicScratch=new Cartographic,normalStartpointScratch=new Cartesian3,normalEndpointScratch=new Cartesian3;function projectNormal(e,t,i,r,n){var a=Cartographic.toCartesian(t,e._ellipsoid,normalStartpointScratch),o=Cartesian3.add(a,i,normalEndpointScratch),s=!1,l=e._ellipsoid,c=l.cartesianToCartographic(o,endPosCartographicScratch);return Math.abs(t.longitude-c.longitude)>CesiumMath.PI_OVER_TWO&&(s=!0,o=Cartesian3.subtract(a,i,normalEndpointScratch),c=l.cartesianToCartographic(o,endPosCartographicScratch)),c.height=0,c=e.project(c,n),(n=Cartesian3.subtract(c,r,n)).z=0,n=Cartesian3.normalize(n,n),s&&Cartesian3.negate(n,n),n}var adjustHeightNormalScratch=new Cartesian3,adjustHeightOffsetScratch=new Cartesian3;function adjustHeights(e,t,i,r,n,a){var o=Cartesian3.subtract(t,e,adjustHeightNormalScratch);Cartesian3.normalize(o,o),i-=WALL_INITIAL_MIN_HEIGHT,i=Cartesian3.multiplyByScalar(o,i,adjustHeightOffsetScratch),Cartesian3.add(e,i,n),r-=WALL_INITIAL_MAX_HEIGHT,i=Cartesian3.multiplyByScalar(o,r,adjustHeightOffsetScratch),Cartesian3.add(t,i,a)}var nudgeDirectionScratch=new Cartesian3;function nudgeXZ(e,t){var i=Plane.getPointDistance(XZ_PLANE,e),r=Plane.getPointDistance(XZ_PLANE,t),n=nudgeDirectionScratch;CesiumMath.equalsEpsilon(i,0,CesiumMath.EPSILON2)?(n=direction(t,e,n),Cartesian3.multiplyByScalar(n,CesiumMath.EPSILON2,n),Cartesian3.add(e,n,e)):CesiumMath.equalsEpsilon(r,0,CesiumMath.EPSILON2)&&(n=direction(e,t,n),Cartesian3.multiplyByScalar(n,CesiumMath.EPSILON2,n),Cartesian3.add(t,n,t))}function nudgeCartographic(e,t){var i=Math.abs(e.longitude),r=Math.abs(t.longitude);if(CesiumMath.equalsEpsilon(i,CesiumMath.PI,CesiumMath.EPSILON11)){var n=CesiumMath.sign(t.longitude);return e.longitude=n*(i-CesiumMath.EPSILON11),1}return CesiumMath.equalsEpsilon(r,CesiumMath.PI,CesiumMath.EPSILON11)?(e=CesiumMath.sign(e.longitude),t.longitude=e*(r-CesiumMath.EPSILON11),2):0}var startCartographicScratch=new Cartographic,endCartographicScratch=new Cartographic,segmentStartTopScratch=new Cartesian3,segmentEndTopScratch=new Cartesian3,segmentStartBottomScratch=new Cartesian3,segmentEndBottomScratch=new Cartesian3,segmentStartNormalScratch=new Cartesian3,segmentEndNormalScratch=new Cartesian3,getHeightCartographics=[startCartographicScratch,endCartographicScratch],getHeightRectangleScratch=new Rectangle,adjustHeightStartTopScratch=new Cartesian3,adjustHeightEndTopScratch=new Cartesian3,adjustHeightStartBottomScratch=new Cartesian3,adjustHeightEndBottomScratch=new Cartesian3,segmentStart2DScratch=new Cartesian3,segmentEnd2DScratch=new Cartesian3,segmentStartNormal2DScratch=new Cartesian3,segmentEndNormal2DScratch=new Cartesian3,offsetScratch$1=new Cartesian3,startUpScratch=new Cartesian3,endUpScratch=new Cartesian3,rightScratch$1=new Cartesian3,startPlaneNormalScratch=new Cartesian3,endPlaneNormalScratch=new Cartesian3,encodeScratch=new EncodedCartesian3,encodeScratch2D=new EncodedCartesian3,forwardOffset2DScratch=new Cartesian3,right2DScratch=new Cartesian3,normalNudgeScratch=new Cartesian3,scratchBoundingSpheres=[new BoundingSphere,new BoundingSphere],REFERENCE_INDICES=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],REFERENCE_INDICES_LENGTH=REFERENCE_INDICES.length;function generateGeometryAttributes(e,t,i,r,n,a,o){var s,l,c,u,d=t._ellipsoid,h=i.length/3-1,p=8*h,f=4*p,m=new(65535<p?Uint32Array:Uint16Array)(36*h),g=new Float64Array(3*p),y=new Float32Array(f),_=new Float32Array(f),v=new Float32Array(f),C=new Float32Array(f),x=new Float32Array(f);o&&(s=new Float32Array(f),l=new Float32Array(f),c=new Float32Array(f),u=new Float32Array(2*p));var b=a.length/2,S=0,T=startCartographicScratch;T.height=0;var E=endCartographicScratch;E.height=0;var w=segmentStartTopScratch,A=segmentEndTopScratch;if(o)for(I=0,R=1;R<b;R++)T.latitude=a[I],T.longitude=a[I+1],E.latitude=a[I+2],E.longitude=a[I+3],w=t.project(T,w),A=t.project(E,A),S+=Cartesian3.distance(w,A),I+=2;for(var P,D=r.length/3,M=(A=Cartesian3.unpack(r,0,A),0),I=3,R=1;R<D;R++)w=Cartesian3.clone(A,w),A=Cartesian3.unpack(r,I,A),M+=Cartesian3.distance(w,A),I+=3;var O=0,L=0,N=0,F=0,B=!(I=3),V=Cartesian3.unpack(i,0,segmentEndBottomScratch),k=Cartesian3.unpack(r,0,segmentEndTopScratch),z=Cartesian3.unpack(n,0,segmentEndNormalScratch);e&&breakMiter(z,Cartesian3.unpack(i,i.length-6,segmentStartBottomScratch),V,k)&&(z=Cartesian3.negate(z,z));var G=0,U=0,$=0;for(R=0;R<h;R++){var H,W,j,q,Y=Cartesian3.clone(V,segmentStartBottomScratch),X=Cartesian3.clone(k,segmentStartTopScratch),Q=Cartesian3.clone(z,segmentStartNormalScratch);B&&(Q=Cartesian3.negate(Q,Q)),V=Cartesian3.unpack(i,I,segmentEndBottomScratch),k=Cartesian3.unpack(r,I,segmentEndTopScratch),B=breakMiter(z=Cartesian3.unpack(n,I,segmentEndNormalScratch),Y,V,k),T.latitude=a[O],T.longitude=a[O+1],E.latitude=a[O+2],E.longitude=a[O+3],o&&(xe=nudgeCartographic(T,E),j=t.project(T,segmentStart2DScratch),(de=direction(q=t.project(E,segmentEnd2DScratch),j,forwardOffset2DScratch)).y=Math.abs(de.y),H=segmentStartNormal2DScratch,W=segmentEndNormal2DScratch,0===xe||Cartesian3.dot(de,Cartesian3.UNIT_Y)>MITER_BREAK_SMALL?(H=projectNormal(t,T,Q,j,segmentStartNormal2DScratch),W=projectNormal(t,E,z,q,segmentEndNormal2DScratch)):1===xe?(W=projectNormal(t,E,z,q,segmentEndNormal2DScratch),H.x=0,H.y=CesiumMath.sign(T.longitude-Math.abs(E.longitude)),H.z=0):(H=projectNormal(t,T,Q,j,segmentStartNormal2DScratch),W.x=0,W.y=CesiumMath.sign(T.longitude-E.longitude),W.z=0));var Z,J,K,ee=Cartesian3.distance(X,k),te=EncodedCartesian3.fromCartesian(Y,encodeScratch),ie=Cartesian3.subtract(V,Y,offsetScratch$1),re=Cartesian3.normalize(ie,rightScratch$1),ne=Cartesian3.subtract(X,Y,startUpScratch),ae=(ne=Cartesian3.normalize(ne,ne),Cartesian3.cross(re,ne,rightScratch$1)),oe=(ae=Cartesian3.normalize(ae,ae),Cartesian3.cross(ne,Q,startPlaneNormalScratch)),se=(oe=Cartesian3.normalize(oe,oe),Cartesian3.subtract(k,V,endUpScratch)),le=(se=Cartesian3.normalize(se,se),Cartesian3.cross(z,se,endPlaneNormalScratch)),ce=(le=Cartesian3.normalize(le,le),ee/M),ue=G/M,de=0,he=0,pe=0;for(o&&(de=Cartesian3.distance(j,q),Z=EncodedCartesian3.fromCartesian(j,encodeScratch2D),J=Cartesian3.subtract(q,j,forwardOffset2DScratch),Ce=(K=Cartesian3.normalize(J,right2DScratch)).x,K.x=K.y,K.y=-Ce,he=de/S,pe=U/S),P=0;P<8;P++){var fe=F+4*P,me=L+2*P,ge=fe+3,ye=P<4?1:-1,_e=2===P||3===P||6===P||7===P?1:-1;Cartesian3.pack(te.high,y,fe),y[ge]=ie.x,Cartesian3.pack(te.low,_,fe),_[ge]=ie.y,Cartesian3.pack(oe,v,fe),v[ge]=ie.z,Cartesian3.pack(le,C,fe),C[ge]=ce*ye,Cartesian3.pack(ae,x,fe);var ve=ue*_e;0===ve&&_e<0&&(ve=9),x[ge]=ve,o&&(s[fe]=Z.high.x,s[fe+1]=Z.high.y,s[fe+2]=Z.low.x,s[fe+3]=Z.low.y,c[fe]=-H.y,c[fe+1]=H.x,c[fe+2]=W.y,c[fe+3]=-W.x,l[fe]=J.x,l[fe+1]=J.y,l[fe+2]=K.x,l[fe+3]=K.y,u[me]=he*ye,0==(ve=pe*_e)&&_e<0&&(ve=9),u[me+1]=ve)}var Ce,xe=adjustHeightStartBottomScratch;re=adjustHeightEndBottomScratch,ne=adjustHeightStartTopScratch,Q=adjustHeightEndTopScratch,se=Rectangle.fromCartographicArray(getHeightCartographics,getHeightRectangleScratch);$+=se=(Ce=ApproximateTerrainHeights.getMinimumMaximumHeights(se,d)).minimumTerrainHeight,$+=Ce=Ce.maximumTerrainHeight,adjustHeights(Y,X,se,Ce,xe,ne),adjustHeights(V,k,se,Ce,re,Q),Ce=Cartesian3.multiplyByScalar(ae,CesiumMath.EPSILON5,normalNudgeScratch),Cartesian3.add(xe,Ce,xe),Cartesian3.add(re,Ce,re),Cartesian3.add(ne,Ce,ne),Cartesian3.add(Q,Ce,Q),nudgeXZ(xe,re),nudgeXZ(ne,Q),Cartesian3.pack(xe,g,N),Cartesian3.pack(re,g,N+3),Cartesian3.pack(Q,g,N+6),Cartesian3.pack(ne,g,N+9),Ce=Cartesian3.multiplyByScalar(ae,-2*CesiumMath.EPSILON5,normalNudgeScratch),Cartesian3.add(xe,Ce,xe),Cartesian3.add(re,Ce,re),Cartesian3.add(ne,Ce,ne),Cartesian3.add(Q,Ce,Q),nudgeXZ(xe,re),nudgeXZ(ne,Q),Cartesian3.pack(xe,g,N+12),Cartesian3.pack(re,g,N+15),Cartesian3.pack(Q,g,N+18),Cartesian3.pack(ne,g,N+21),O+=2,I+=3,L+=16,N+=24,F+=32,G+=ee,U+=de}var be=I=0;for(R=0;R<h;R++){for(P=0;P<REFERENCE_INDICES_LENGTH;P++)m[I+P]=REFERENCE_INDICES[P]+be;be+=8,I+=REFERENCE_INDICES_LENGTH}return p=scratchBoundingSpheres,BoundingSphere.fromVertices(i,Cartesian3.ZERO,3,p[0]),BoundingSphere.fromVertices(r,Cartesian3.ZERO,3,p[1]),(e=BoundingSphere.fromBoundingSpheres(p)).radius+=$/(2*h),p={position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,normalize:!1,values:g}),startHiAndForwardOffsetX:getVec4GeometryAttribute(y),startLoAndForwardOffsetY:getVec4GeometryAttribute(_),startNormalAndForwardOffsetZ:getVec4GeometryAttribute(v),endNormalAndTextureCoordinateNormalizationX:getVec4GeometryAttribute(C),rightNormalAndTextureCoordinateNormalizationY:getVec4GeometryAttribute(x)},o&&(p.startHiLo2D=getVec4GeometryAttribute(s),p.offsetAndRight2D=getVec4GeometryAttribute(l),p.startEndNormals2D=getVec4GeometryAttribute(c),p.texcoordNormalization2D=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,normalize:!1,values:u})),new Geometry({attributes:p,indices:m,boundingSphere:e})}function getVec4GeometryAttribute(e){return new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}function HeadingPitchRange(e,t,i){this.heading=defaultValue(e,0),this.pitch=defaultValue(t,0),this.range=defaultValue(i,0)}GroundPolylineGeometry._projectNormal=projectNormal,HeadingPitchRange.clone=function(e,t){if(defined(e))return defined(t)||(t=new HeadingPitchRange),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var factorial=CesiumMath.factorial;function calculateCoefficientTerm(e,t,i,r,n,a){var o,s,l,c=0;if(0<r){for(s=0;s<n;s++){for(o=!1,l=0;l<a.length&&!o;l++)s===a[l]&&(o=!0);o||(a.push(s),c+=calculateCoefficientTerm(e,t,i,r-1,n,a),a.splice(a.length-1,1))}return c}for(c=1,s=0;s<n;s++){for(o=!1,l=0;l<a.length&&!o;l++)s===a[l]&&(o=!0);o||(c*=e-i[t[s]])}return c}var HermitePolynomialApproximation={type:"Hermite",getRequiredDataPoints:function(e,t){return t=defaultValue(t,0),Math.max(Math.floor((e+1)/(t+1)),2)},interpolateOrderZero:function(e,t,i,r,n){var a,o;defined(n)||(n=new Array(r));for(var s=t.length,l=new Array(r),c=0;c<r;c++){n[c]=0;var u=new Array(s);for(l[c]=u,m=0;m<s;m++)u[m]=[]}var d=s,h=new Array(d);for(c=0;c<d;c++)h[c]=c;var p=s-1;for(C=0;C<r;C++){for(m=0;m<d;m++)o=h[m]*r+C,l[C][0].push(i[o]);for(c=1;c<d;c++){for(var f=!1,m=0;m<d-c;m++){var g,y=t[h[m]],_=t[h[m+c]];_-y<=0?(g=i[o=h[m]*r+r*c+C],l[C][c].push(g/factorial(c))):(g=l[C][c-1][m+1]-l[C][c-1][m],l[C][c].push(g/(_-y))),f=f||0!==g}f||(p=c-1)}}for(a=0;a<=0;a++)for(c=a;c<=p;c++)for(var v=calculateCoefficientTerm(e,h,t,a,c,[]),C=0;C<r;C++){var x=l[C][c][0];n[C+a*r]+=x*v}return n}},arrayScratch$1=[];function fillCoefficientList(e,t,i,r,n,a){for(var o,s=-1,l=t.length,c=l*(l+1)/2,u=0;u<n;u++){var d=Math.floor(u*c);for(g=0;g<l;g++)o=t[g]*n*(a+1)+u,e[d+g]=r[o];for(var h=1;h<l;h++){for(var p=0,f=Math.floor(h*(1-h)/2)+l*h,m=!1,g=0;g<l-h;g++){var y,_,v=i[t[g]],C=i[t[g+h]];v=C-v<=0?(_=r[o=t[g]*n*(a+1)+n*h+u])/CesiumMath.factorial(h):(_=e[d+(y=Math.floor((h-1)*(2-h)/2)+l*(h-1))+g+1]-e[d+y+g])/(C-v),e[d+f+p]=v,p++,m=m||0!==_}m&&(s=Math.max(s,h))}}return s}function IauOrientationParameters(e,t,i,r){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=r}HermitePolynomialApproximation.interpolate=function(e,t,i,r,n,a,o){var s=r*(a+1);defined(o)||(o=new Array(s));for(var l=0;l<s;l++)o[l]=0;for(var c=t.length,u=new Array(c*(n+1)),d=0;d<c;d++)for(var h=0;h<n+1;h++)u[d*(n+1)+h]=d;for(var p=u.length,f=arrayScratch$1,m=fillCoefficientList(f,u,t,i,r,n),g=[],y=p*(p+1)/2,_=Math.min(m,a),v=0;v<=_;v++)for(d=v;d<=m;d++){g.length=0;for(var C=calculateCoefficientTerm(e,u,t,v,d,g),x=Math.floor(d*(1-d)/2)+p*d,b=0;b<r;b++){var S=f[Math.floor(b*y)+x];o[b+v*r]+=S*C}}return o};var Iau2000Orientation={},TdtMinusTai=32.184,J2000d=2451545,c1=-.0529921,c2=-.1059842,c3$1=13.0120009,c4=13.3407154,c5=.9856003,c6=26.4057084,c7=13.064993,c8=.3287146,c9=1.7484877,c10=-.1589763,c11=.0036096,c12=.1643573,c13=12.9590088,dateTT=new JulianDate;function IauOrientationAxes(e){defined(e)&&"function"==typeof e||(e=Iau2000Orientation.ComputeMoon),this._computeFunction=e}Iau2000Orientation.ComputeMoon=function(e,t){defined(e)||(e=JulianDate.now()),dateTT=JulianDate.addSeconds(e,TdtMinusTai,dateTT);var i=JulianDate.totalDays(dateTT)-J2000d,r=i/TimeConstants$1.DAYS_PER_JULIAN_CENTURY,n=(125.045+c1*i)*CesiumMath.RADIANS_PER_DEGREE,a=(250.089+c2*i)*CesiumMath.RADIANS_PER_DEGREE,o=(260.008+c3$1*i)*CesiumMath.RADIANS_PER_DEGREE,s=(176.625+c4*i)*CesiumMath.RADIANS_PER_DEGREE,l=(357.529+c5*i)*CesiumMath.RADIANS_PER_DEGREE,c=(311.589+c6*i)*CesiumMath.RADIANS_PER_DEGREE,u=(134.963+c7*i)*CesiumMath.RADIANS_PER_DEGREE,d=(276.617+c8*i)*CesiumMath.RADIANS_PER_DEGREE,h=(34.226+c9*i)*CesiumMath.RADIANS_PER_DEGREE,p=(15.134+c10*i)*CesiumMath.RADIANS_PER_DEGREE,f=(119.743+c11*i)*CesiumMath.RADIANS_PER_DEGREE,m=(239.961+c12*i)*CesiumMath.RADIANS_PER_DEGREE,g=(25.053+c13*i)*CesiumMath.RADIANS_PER_DEGREE,y=Math.sin(n),_=Math.sin(a),v=Math.sin(o),C=Math.sin(s),x=Math.sin(l),b=Math.sin(c),S=Math.sin(u),T=Math.sin(d),E=Math.sin(h),w=Math.sin(p),A=Math.sin(f),P=Math.sin(m),D=Math.sin(g);e=Math.cos(n),n=Math.cos(a),a=Math.cos(o),o=Math.cos(s),s=Math.cos(l),l=Math.cos(c),c=Math.cos(u),u=Math.cos(d),d=Math.cos(h),h=Math.cos(p),p=Math.cos(f),f=Math.cos(m),m=Math.cos(g),g=(269.9949+.0031*r-3.8787*y-.1204*_+.07*v-.0172*C+.0072*b-.0052*w+.0043*D)*CesiumMath.RADIANS_PER_DEGREE,r=(66.5392+.013*r+1.5419*e+.0239*n-.0278*a+.0068*o-.0029*l+9e-4*c+8e-4*h-9e-4*m)*CesiumMath.RADIANS_PER_DEGREE,D=(38.3213+13.17635815*i-14e-13*i*i+3.561*y+.1208*_-.0642*v+.0158*C+.0252*x-.0066*b-.0047*S-.0046*T+.0028*E+.0052*w+.004*A+.0019*P-.0044*D)*CesiumMath.RADIANS_PER_DEGREE,m=(13.17635815-2*i*14e-13+3.561*e*c1+.1208*n*c2-.0642*a*c3$1+.0158*o*c4+.0252*s*c5-.0066*l*c6-.0047*c*c7-.0046*u*c8+.0028*d*c9+.0052*h*c10+.004*p*c11+.0019*f*c12-.0044*m*c13)/86400*CesiumMath.RADIANS_PER_DEGREE;return defined(t)||(t=new IauOrientationParameters),t.rightAscension=g,t.declination=r,t.rotation=D,t.rotationRate=m,t};var xAxisScratch=new Cartesian3,yAxisScratch=new Cartesian3,zAxisScratch=new Cartesian3;function computeRotationMatrix(e,t,i){var r=xAxisScratch;r.x=Math.cos(e+CesiumMath.PI_OVER_TWO),r.y=Math.sin(e+CesiumMath.PI_OVER_TWO),r.z=0;var n=Math.cos(t),a=zAxisScratch;return a.x=n*Math.cos(e),a.y=n*Math.sin(e),a.z=Math.sin(t),t=Cartesian3.cross(a,r,yAxisScratch),defined(i)||(i=new Matrix3),i[0]=r.x,i[1]=t.x,i[2]=a.x,i[3]=r.y,i[4]=t.y,i[5]=a.y,i[6]=r.z,i[7]=t.z,i[8]=a.z,i}var rotMtxScratch=new Matrix3,quatScratch=new Quaternion;IauOrientationAxes.prototype.evaluate=function(e,t){return defined(e)||(e=JulianDate.now()),t=computeRotationMatrix((e=this._computeFunction(e)).rightAscension,e.declination,t),e=CesiumMath.zeroToTwoPi(e.rotation),e=Quaternion.fromAxisAngle(Cartesian3.UNIT_Z,e,quatScratch),e=Matrix3.fromQuaternion(Quaternion.conjugate(e,e),rotMtxScratch),Matrix3.multiply(e,t,t)};var InterpolationAlgorithm={type:void 0},defaultTokenCredit;InterpolationAlgorithm.getRequiredDataPoints=DeveloperError.throwInstantiationError,InterpolationAlgorithm.interpolateOrderZero=DeveloperError.throwInstantiationError,InterpolationAlgorithm.interpolate=DeveloperError.throwInstantiationError;var defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlNzMyOGZjZC1jMWUzLTQxNDctOGQxYi03YTYyZDQ1OTIxMjkiLCJpZCI6MjU5LCJpYXQiOjE2MDE1Njk1NDN9.X1a0DCM6F539g9MDSs_ldZ0gwgruxLAZiBl60JwG1ck",Ion={};function PeliasGeocoderService(e){this._url=Resource.createIfNeeded(e),this._url.appendForwardSlash()}function IonGeocoderService(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.accessToken,Ion.defaultAccessToken),i=Resource.createIfNeeded(defaultValue(e.server,Ion.defaultServer));i.appendForwardSlash();var r=Ion.getDefaultTokenCredit(t);defined(r)&&e.scene.frameState.creditDisplay.addDefaultCredit(Credit.clone(r)),r=i.getDerivedResource({url:"v1/geocode"}),defined(t)&&r.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=i,this._pelias=new PeliasGeocoderService(r)}function IonResource(e,t){var i,r=e.externalType,n=defined(r);if(n){if("3DTILES"!==r&&"STK_TERRAIN_SERVER"!==r)throw new RuntimeError("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");i={url:e.options.url}}else i={url:e.url,retryAttempts:1,retryCallback:retryCallback};Resource.call(this,i),this._ionEndpoint=e,this._ionEndpointDomain=n?void 0:new URI(e.url).authority,this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=n}function retryCallback(e,t){var i=defaultValue(e._ionRoot,e),r=i._ionEndpointResource;return defined(t)&&(401===t.statusCode||t.target instanceof Image)?(defined(i._pendingPromise)||(i._pendingPromise=r.fetchJson().then((function(e){return i._ionEndpoint=e})).always((function(e){return i._pendingPromise=void 0,e}))),i._pendingPromise.then((function(t){return e._ionEndpoint=t,!0}))):when.resolve(!1)}function TimeInterval(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.start=defined(e.start)?JulianDate.clone(e.start):new JulianDate,this.stop=defined(e.stop)?JulianDate.clone(e.stop):new JulianDate,this.data=e.data,this.isStartIncluded=defaultValue(e.isStartIncluded,!0),this.isStopIncluded=defaultValue(e.isStopIncluded,!0)}Ion.defaultAccessToken=defaultAccessToken,Ion.defaultServer=new Resource({url:"https://api.cesium.com/"}),Ion.getDefaultTokenCredit=function(e){if(e===defaultAccessToken)return defined(defaultTokenCredit)||(defaultTokenCredit=new Credit('<b>             This application is using Cesium\'s default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i>             with an access token from your ion account before making any Cesium API calls.             You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>',!0)),defaultTokenCredit},Object.defineProperties(PeliasGeocoderService.prototype,{url:{get:function(){return this._url}}}),PeliasGeocoderService.prototype.geocode=function(e,t){return this._url.getDerivedResource({url:t===GeocodeType$1.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then((function(e){return e.features.map((function(e){var t,i=e.bbox;return t=defined(i)?Rectangle.fromDegrees(i[0],i[1],i[2],i[3]):(i=e.geometry.coordinates[0],t=e.geometry.coordinates[1],Cartesian3.fromDegrees(i,t)),{displayName:e.properties.label,destination:t}}))}))},IonGeocoderService.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)},defined(Object.create)&&(IonResource.prototype=Object.create(Resource.prototype),IonResource.prototype.constructor=IonResource),IonResource.fromAssetId=function(e,t){var i=IonResource._createEndpointResource(e,t);return i.fetchJson().then((function(e){return new IonResource(e,i)}))},Object.defineProperties(IonResource.prototype,{credits:{get:function(){return defined(this._ionRoot)?this._ionRoot.credits:(defined(this._credits)||(this._credits=IonResource.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),IonResource.getCreditsFromEndpoint=function(e,t){return e=e.attributions.map(Credit.getIonCredit),defined(t=Ion.getDefaultTokenCredit(t.queryParameters.access_token))&&e.push(Credit.clone(t)),e},IonResource.prototype.clone=function(e){var t=defaultValue(this._ionRoot,this);return defined(e)||(e=new IonResource(t._ionEndpoint,t._ionEndpointResource)),(e=Resource.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},IonResource.prototype.fetchImage=function(e){var t;return this._isExternal||(t=e,e={preferBlob:!0},defined(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)),Resource.prototype.fetchImage.call(this,e)},IonResource.prototype._makeRequest=function(e){return this._isExternal||new URI(this.url).authority!==this._ionEndpointDomain||(defined(e.headers)||(e.headers={}),e.headers.Authorization="Bearer "+this._ionEndpoint.accessToken),Resource.prototype._makeRequest.call(this,e)},IonResource._createEndpointResource=function(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=defaultValue(t.server,Ion.defaultServer);t=defaultValue(t.accessToken,Ion.defaultAccessToken),i=Resource.createIfNeeded(i),e={url:"v1/assets/"+e+"/endpoint"};return defined(t)&&(e.queryParameters={access_token:t}),i.getDerivedResource(e)},Object.defineProperties(TimeInterval.prototype,{isEmpty:{get:function(){var e=JulianDate.compare(this.stop,this.start);return e<0||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});var scratchInterval={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};TimeInterval.fromIso8601=function(e,t){if(2!==(a=e.iso8601.split("/")).length)throw new DeveloperError("options.iso8601 is an invalid ISO 8601 interval.");var i=JulianDate.fromIso8601(a[0]),r=JulianDate.fromIso8601(a[1]),n=defaultValue(e.isStartIncluded,!0),a=defaultValue(e.isStopIncluded,!0);e=e.data;return defined(t)?(t.start=i,t.stop=r,t.isStartIncluded=n,t.isStopIncluded=a,t.data=e,t):(scratchInterval.start=i,scratchInterval.stop=r,scratchInterval.isStartIncluded=n,scratchInterval.isStopIncluded=a,scratchInterval.data=e,new TimeInterval(scratchInterval))},TimeInterval.toIso8601=function(e,t){return JulianDate.toIso8601(e.start,t)+"/"+JulianDate.toIso8601(e.stop,t)},TimeInterval.clone=function(e,t){if(defined(e))return defined(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new TimeInterval(e)},TimeInterval.equals=function(e,t,i){return e===t||defined(e)&&defined(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&JulianDate.equals(e.start,t.start)&&JulianDate.equals(e.stop,t.stop)&&(e.data===t.data||defined(i)&&i(e.data,t.data)))},TimeInterval.equalsEpsilon=function(e,t,i,r){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&JulianDate.equalsEpsilon(e.start,t.start,i)&&JulianDate.equalsEpsilon(e.stop,t.stop,i)&&(e.data===t.data||defined(r)&&r(e.data,t.data)))},TimeInterval.intersect=function(e,t,i,r){if(!defined(t))return TimeInterval.clone(TimeInterval.EMPTY,i);var n=e.start,a=e.stop,o=t.start,s=t.stop,l=JulianDate.greaterThanOrEquals(o,n)&&JulianDate.greaterThanOrEquals(a,o),c=!l&&JulianDate.lessThanOrEquals(o,n)&&JulianDate.lessThanOrEquals(n,s);if(!l&&!c)return TimeInterval.clone(TimeInterval.EMPTY,i);var u=e.isStartIncluded,d=e.isStopIncluded,h=t.isStartIncluded,p=t.isStopIncluded,f=JulianDate.lessThan(a,s);return defined(i)||(i=new TimeInterval),i.start=l?o:n,i.isStartIncluded=u&&h||!JulianDate.equals(o,n)&&(l&&h||c&&u),i.stop=f?a:s,i.isStopIncluded=f?d:d&&p||!JulianDate.equals(s,a)&&p,i.data=defined(r)?r(e.data,t.data):e.data,i},TimeInterval.contains=function(e,t){if(e.isEmpty)return!1;var i=JulianDate.compare(e.start,t);return 0===i?e.isStartIncluded:0===(t=JulianDate.compare(t,e.stop))?e.isStopIncluded:i<0&&t<0},TimeInterval.prototype.clone=function(e){return TimeInterval.clone(this,e)},TimeInterval.prototype.equals=function(e,t){return TimeInterval.equals(this,e,t)},TimeInterval.prototype.equalsEpsilon=function(e,t,i){return TimeInterval.equalsEpsilon(this,e,t,i)},TimeInterval.prototype.toString=function(){return TimeInterval.toIso8601(this)},TimeInterval.EMPTY=Object.freeze(new TimeInterval({start:new JulianDate,stop:new JulianDate,isStartIncluded:!1,isStopIncluded:!1}));var MINIMUM_VALUE=Object.freeze(JulianDate.fromIso8601("0000-01-01T00:00:00Z")),MAXIMUM_VALUE=Object.freeze(JulianDate.fromIso8601("9999-12-31T24:00:00Z")),MAXIMUM_INTERVAL=Object.freeze(new TimeInterval({start:MINIMUM_VALUE,stop:MAXIMUM_VALUE})),Iso8601={MINIMUM_VALUE:MINIMUM_VALUE,MAXIMUM_VALUE:MAXIMUM_VALUE,MAXIMUM_INTERVAL:MAXIMUM_INTERVAL},KeyboardEventModifier={SHIFT:0,CTRL:1,ALT:2},KeyboardEventModifier$1=Object.freeze(KeyboardEventModifier),LagrangePolynomialApproximation={type:"Lagrange",getRequiredDataPoints:function(e){return Math.max(e+1,2)},interpolateOrderZero:function(e,t,i,r,n){defined(n)||(n=new Array(r));for(var a=t.length,o=0;o<r;o++)n[o]=0;for(o=0;o<a;o++){for(var s,l=1,c=0;c<a;c++)c!==o&&(s=t[o]-t[c],l*=(e-t[c])/s);for(c=0;c<r;c++)n[c]+=l*i[o*r+c]}return n}},LinearApproximation={type:"Linear"};function ManagedArray(e){e=defaultValue(e,0),this._array=new Array(e),this._length=e}function MapProjection(){DeveloperError.throwInstantiationError()}function NearFarScalar(e,t,i,r){this.near=defaultValue(e,0),this.nearValue=defaultValue(t,0),this.far=defaultValue(i,1),this.farValue=defaultValue(r,0)}LinearApproximation.getRequiredDataPoints=function(e){return 2},LinearApproximation.interpolateOrderZero=function(e,t,i,r,n){var a,o;defined(n)||(n=new Array(r));for(var s=t[0],l=t[1],c=0;c<r;c++)a=i[c],o=i[c+r],n[c]=((o-a)*e+l*a-s*o)/(l-s);return n},Object.defineProperties(ManagedArray.prototype,{length:{get:function(){return this._length},set:function(e){var t=this._array,i=this._length;if(e<i)for(var r=e;r<i;++r)t[r]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}}),ManagedArray.prototype.get=function(e){return this._array[e]},ManagedArray.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t},ManagedArray.prototype.peek=function(){return this._array[this._length-1]},ManagedArray.prototype.push=function(e){var t=this.length++;this._array[t]=e},ManagedArray.prototype.pop=function(){if(0!==this._length){var e=this._array[this._length-1];return--this.length,e}},ManagedArray.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)},ManagedArray.prototype.resize=function(e){this.length=e},ManagedArray.prototype.trim=function(e){e=defaultValue(e,this._length),this._array.length=e},Object.defineProperties(MapProjection.prototype,{ellipsoid:{get:DeveloperError.throwInstantiationError}}),MapProjection.prototype.project=DeveloperError.throwInstantiationError,MapProjection.prototype.unproject=DeveloperError.throwInstantiationError,NearFarScalar.clone=function(e,t){if(defined(e))return defined(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new NearFarScalar(e.near,e.nearValue,e.far,e.farValue)},NearFarScalar.packedLength=4,NearFarScalar.pack=function(e,t,i){return i=defaultValue(i,0),t[i++]=e.near,t[i++]=e.nearValue,t[i++]=e.far,t[i]=e.farValue,t},NearFarScalar.unpack=function(e,t,i){return t=defaultValue(t,0),defined(i)||(i=new NearFarScalar),i.near=e[t++],i.nearValue=e[t++],i.far=e[t++],i.farValue=e[t],i},NearFarScalar.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue},NearFarScalar.prototype.clone=function(e){return NearFarScalar.clone(this,e)},NearFarScalar.prototype.equals=function(e){return NearFarScalar.equals(this,e)};var Visibility={NONE:-1,PARTIAL:0,FULL:1},Visibility$1=Object.freeze(Visibility);function Occluder(e,t){this._occluderPosition=Cartesian3.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var scratchCartesian3$7=new Cartesian3;Object.defineProperties(Occluder.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=Cartesian3.clone(e,this._cameraPosition);var t,i,r,n=Cartesian3.subtract(this._occluderPosition,e,scratchCartesian3$7),a=Cartesian3.magnitudeSquared(n),o=this._occluderRadius*this._occluderRadius;o<a?(t=Math.sqrt(a-o),a=1/Math.sqrt(a),i=Cartesian3.multiplyByScalar(n,a,scratchCartesian3$7),r=t*t*a,r=Cartesian3.add(e,Cartesian3.multiplyByScalar(i,r,scratchCartesian3$7),scratchCartesian3$7)):t=Number.MAX_VALUE,this._horizonDistance=t,this._horizonPlaneNormal=i,this._horizonPlanePosition=r,this._cameraPosition=e}}}),Occluder.fromBoundingSphere=function(e,t,i){return defined(i)?(Cartesian3.clone(e.center,i._occluderPosition),i._occluderRadius=e.radius,i.cameraPosition=t,i):new Occluder(e,t)};var tempVecScratch=new Cartesian3;Occluder.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var t=Cartesian3.subtract(e,this._occluderPosition,tempVecScratch),i=this._occluderRadius;if(0<(i=Cartesian3.magnitudeSquared(t)-i*i))return i=Math.sqrt(i)+this._horizonDistance,t=Cartesian3.subtract(e,this._cameraPosition,t),i*i>Cartesian3.magnitudeSquared(t)}return!1};var occludeePositionScratch=new Cartesian3;Occluder.prototype.isBoundingSphereVisible=function(e){var t=Cartesian3.clone(e.center,occludeePositionScratch),i=e.radius;if(this._horizonDistance===Number.MAX_VALUE)return!1;var r=Cartesian3.subtract(t,this._occluderPosition,tempVecScratch);e=this._occluderRadius-i,e=Cartesian3.magnitudeSquared(r)-e*e;return i<this._occluderRadius?0<e&&(e=Math.sqrt(e)+this._horizonDistance,r=Cartesian3.subtract(t,this._cameraPosition,r),e*e+i*i>Cartesian3.magnitudeSquared(r)):!(0<e)||(r=Cartesian3.subtract(t,this._cameraPosition,r),t=Cartesian3.magnitudeSquared(r),r=this._occluderRadius*this._occluderRadius,i*=i,(this._horizonDistance*this._horizonDistance+r)*i>t*r||t<(e=Math.sqrt(e)+this._horizonDistance)*e+i)};var tempScratch$1=new Cartesian3;Occluder.prototype.computeVisibility=function(e){var t=Cartesian3.clone(e.center),i=e.radius;if(i>this._occluderRadius)return Visibility$1.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var r=Cartesian3.subtract(t,this._occluderPosition,tempScratch$1),n=this._occluderRadius-i,a=Cartesian3.magnitudeSquared(r);if(0<(n=a-n*n))return n=Math.sqrt(n)+this._horizonDistance,r=Cartesian3.subtract(t,this._cameraPosition,r),n*n+i*i<(e=Cartesian3.magnitudeSquared(r))?Visibility$1.NONE:0<(n=a-(n=this._occluderRadius+i)*n)?e<(n=Math.sqrt(n)+this._horizonDistance)*n+i*i?Visibility$1.FULL:Visibility$1.PARTIAL:(r=Cartesian3.subtract(t,this._horizonPlanePosition,r),Cartesian3.dot(r,this._horizonPlaneNormal)>-i?Visibility$1.PARTIAL:Visibility$1.FULL)}return Visibility$1.NONE};var occludeePointScratch=new Cartesian3;Occluder.computeOccludeePoint=function(e,t,i){var r=Cartesian3.clone(t),n=Cartesian3.clone(e.center),a=(t=e.radius,i.length),o=Cartesian3.normalize(Cartesian3.subtract(r,n,occludeePointScratch),occludeePointScratch),s=-Cartesian3.dot(o,n),l=Occluder._anyRotationVector(n,o,s),c=Occluder._horizonToPlaneNormalDotProduct(e,o,s,l,i[0]);if(c){for(var u,d=1;d<a;++d){if(!(u=Occluder._horizonToPlaneNormalDotProduct(e,o,s,l,i[d])))return;u<c&&(c=u)}if(!(c<.0017453283658983088))return t/=c,Cartesian3.add(n,Cartesian3.multiplyByScalar(o,t,occludeePointScratch),occludeePointScratch)}};var computeOccludeePointFromRectangleScratch=[];Occluder.computeOccludeePointFromRectangle=function(e,t){t=defaultValue(t,Ellipsoid.WGS84);var i=Rectangle.subsample(e,t,0,computeOccludeePointFromRectangleScratch),r=BoundingSphere.fromPoints(i);e=Cartesian3.ZERO;if(!Cartesian3.equals(e,r.center))return Occluder.computeOccludeePoint(new BoundingSphere(e,t.minimumRadius),r.center,i)};var tempVec0Scratch=new Cartesian3;Occluder._anyRotationVector=function(e,t,i){var r=Cartesian3.abs(t,tempVec0Scratch);(0===(a=r.x>r.y?0:1)&&r.z>r.x||1===a&&r.z>r.y)&&(a=2);var n=new Cartesian3,a=0===a?(r.x=e.x,r.y=e.y+1,r.z=e.z+1,Cartesian3.UNIT_X):1===a?(r.x=e.x+1,r.y=e.y,r.z=e.z+1,Cartesian3.UNIT_Y):(r.x=e.x+1,r.y=e.y+1,r.z=e.z,Cartesian3.UNIT_Z);t=(Cartesian3.dot(t,r)+i)/-Cartesian3.dot(t,a);return Cartesian3.normalize(Cartesian3.subtract(Cartesian3.add(r,Cartesian3.multiplyByScalar(a,t,n),r),e,r),r)};var posDirectionScratch=new Cartesian3;Occluder._rotationVector=function(e,t,i,r,n){return e=Cartesian3.subtract(r,e,posDirectionScratch),e=Cartesian3.normalize(e,e),Cartesian3.dot(t,e)<.9999999847691291&&(e=Cartesian3.cross(t,e,e),Cartesian3.magnitude(e)>CesiumMath.EPSILON13)?Cartesian3.normalize(e,new Cartesian3):n};var posScratch1=new Cartesian3,occluerPosScratch=new Cartesian3,posScratch2=new Cartesian3,horizonPlanePosScratch=new Cartesian3;function OffsetGeometryInstanceAttribute(e,t,i){e=defaultValue(e,0),t=defaultValue(t,0),i=defaultValue(i,0),this.value=new Float32Array([e,t,i])}function OpenCageGeocoderService(e,t,i){(e=Resource.createIfNeeded(e)).appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=defaultValue(i,{})}Occluder._horizonToPlaneNormalDotProduct=function(e,t,i,r,n){var a=Cartesian3.clone(n,posScratch1),o=Cartesian3.clone(e.center,occluerPosScratch),s=e.radius,l=Cartesian3.subtract(o,a,posScratch2);return!((n=Cartesian3.magnitudeSquared(l))<(e=s*s))&&(s=n-e,n=(e=Math.sqrt(s))*(1/Math.sqrt(n))*e,l=Cartesian3.normalize(l,l),e=Cartesian3.add(a,Cartesian3.multiplyByScalar(l,n,horizonPlanePosScratch),horizonPlanePosScratch),n=Math.sqrt(s-n*n),r=this._rotationVector(o,t,i,a,r),l=Cartesian3.fromElements(r.x*r.x*l.x+(r.x*r.y-r.z)*l.y+(r.x*r.z+r.y)*l.z,(r.x*r.y+r.z)*l.x+r.y*r.y*l.y+(r.y*r.z-r.x)*l.z,(r.x*r.z-r.y)*l.x+(r.y*r.z+r.x)*l.y+r.z*r.z*l.z,posScratch1),l=Cartesian3.normalize(l,l),l=Cartesian3.multiplyByScalar(l,n,posScratch1),r=Cartesian3.normalize(Cartesian3.subtract(Cartesian3.add(e,l,posScratch2),o,posScratch2),posScratch2),n=Cartesian3.dot(t,r),r=Cartesian3.normalize(Cartesian3.subtract(Cartesian3.subtract(e,l,r),o,r),r),n<(r=Cartesian3.dot(t,r))?n:r)},Object.defineProperties(OffsetGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),OffsetGeometryInstanceAttribute.fromCartesian3=function(e){return new OffsetGeometryInstanceAttribute(e.x,e.y,e.z)},OffsetGeometryInstanceAttribute.toValue=function(e,t){return defined(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t},Object.defineProperties(OpenCageGeocoderService.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}}),OpenCageGeocoderService.prototype.geocode=function(e){return this._url.getDerivedResource({url:"json",queryParameters:combine(this._params,{q:e})}).fetchJson().then((function(e){return e.results.map((function(e){var t,i=e.bounds;return t=defined(i)?Rectangle.fromDegrees(i.southwest.lng,i.southwest.lat,i.northeast.lng,i.northeast.lat):(i=e.geometry.lat,t=e.geometry.lng,Cartesian3.fromDegrees(i,t)),{displayName:e.formatted,destination:t}}))}))};var Packable={packedLength:void 0,pack:DeveloperError.throwInstantiationError,unpack:DeveloperError.throwInstantiationError},PackableForInterpolation={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:DeveloperError.throwInstantiationError,unpackInterpolationResult:DeveloperError.throwInstantiationError},getCSSValue=function(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},measureText=function(e,t,i,r){var n=e.measureText(t),a=getCSSValue(e.canvas,"font-family"),o=getCSSValue(e.canvas,"font-size").replace("px",""),s=getCSSValue(e.canvas,"font-style"),l=getCSSValue(e.canvas,"font-weight"),c=!/\S/.test(t);n.fontsize=o;var u=document.createElement("div");u.style.position="absolute",u.style.opacity=0,u.style.font=s+" "+l+" "+o+"px "+a,u.innerHTML=t+"<br/>"+t,document.body.appendChild(u),n.leading=1.2*o;var d=getCSSValue(u,"height");if(2*o<=(d=d.replace("px",""))&&(n.leading=d/2|0),document.body.removeChild(u),c)n.ascent=0,n.descent=0,n.bounds={minx:0,maxx:n.width,miny:0,maxy:0},n.height=0;else{(u=document.createElement("canvas")).width=n.width+100,u.height=3*o,u.style.opacity=1,u.style.fontFamily=a,u.style.fontSize=o,u.style.fontStyle=s,u.style.fontWeight=l,(c=u.getContext("2d")).font=s+" "+l+" "+o+"px "+a,o=u.width,u=(a=u.height)/2,c.fillStyle="white",c.fillRect(-1,-1,o+2,a+2),i&&(c.strokeStyle="black",c.lineWidth=e.lineWidth,c.strokeText(t,50,u)),r&&(c.fillStyle="black",c.fillText(t,50,u));for(var h=c.getImageData(0,0,o,a).data,p=0,f=4*o,m=h.length;++p<m&&255===h[p];);for(t=p/f|0,p=m-1;0<--p&&255===h[p];);for(c=p/f|0,p=0;p<m&&255===h[p];)m<=(p+=f)&&(p=p-m+4);a=p%f/4|0;var g=1;for(p=m-3;0<=p&&255===h[p];)(p-=f)<0&&(p=m-3-4*g++);o=p%f/4+1|0,n.ascent=u-t,n.descent=c-u,n.bounds={minx:a-50,maxx:o-50,miny:0,maxy:c-t},n.height=c-t+1}return n},imageSmoothingEnabledName;function writeTextToCanvas(e,t){if(""!==e){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=defaultValue(t.font,"10px sans-serif"),r=defaultValue(t.stroke,!1),n=defaultValue(t.fill,!0),a=defaultValue(t.strokeWidth,1),o=defaultValue(t.backgroundColor,Color.TRANSPARENT),s=defaultValue(t.padding,0),l=2*s,c=document.createElement("canvas");c.width=1,c.height=1,c.style.font=i;var u=c.getContext("2d");defined(imageSmoothingEnabledName)||(defined(u.imageSmoothingEnabled)?imageSmoothingEnabledName="imageSmoothingEnabled":defined(u.mozImageSmoothingEnabled)?imageSmoothingEnabledName="mozImageSmoothingEnabled":defined(u.webkitImageSmoothingEnabled)?imageSmoothingEnabledName="webkitImageSmoothingEnabled":defined(u.msImageSmoothingEnabled)&&(imageSmoothingEnabledName="msImageSmoothingEnabled")),u.font=i,u.lineJoin="round",u.lineWidth=a,u[imageSmoothingEnabledName]=!1,u.textBaseline=defaultValue(t.textBaseline,"bottom"),c.style.visibility="hidden",document.body.appendChild(c);var d=measureText(u,e,r,n);c.dimensions=d,document.body.removeChild(c),c.style.visibility="";var h=-d.bounds.minx,p=Math.ceil(d.width)+h+l,f=d.height+l;l=f-(f-d.ascent+s)+l;return c.width=p,c.height=f,u.font=i,u.lineJoin="round",u.lineWidth=a,u[imageSmoothingEnabledName]=!1,o!==Color.TRANSPARENT&&(u.fillStyle=o.toCssColorString(),u.fillRect(0,0,c.width,c.height)),r&&(r=defaultValue(t.strokeColor,Color.BLACK),u.strokeStyle=r.toCssColorString(),u.strokeText(e,h+s,l)),n&&(t=defaultValue(t.fillColor,Color.WHITE),u.fillStyle=t.toCssColorString(),u.fillText(e,h+s,l)),c}}function PinBuilder(){this._cache={}}PinBuilder.prototype.fromColor=function(e,t){return createPin(void 0,void 0,e,t,this._cache)},PinBuilder.prototype.fromUrl=function(e,t,i){return createPin(e,void 0,t,i,this._cache)},PinBuilder.prototype.fromMakiIconId=function(e,t,i){return createPin(buildModuleUrl("Assets/Textures/maki/"+encodeURIComponent(e)+".png"),void 0,t,i,this._cache)},PinBuilder.prototype.fromText=function(e,t,i){return createPin(void 0,e,t,i,this._cache)};var colorScratch=new Color;function drawPin(e,t,i){e.save(),e.scale(i/24,i/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,colorScratch).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function drawIcon(e,t,i){var r=i/2.5,n=r,a=r;t.width>t.height?a=r*(t.height/t.width):t.width<t.height&&(n=r*(t.width/t.height)),r=Math.round((i-n)/2),i=Math.round(7/24*i-a/2),e.globalCompositeOperation="destination-out",e.drawImage(t,r-1,i,n,a),e.drawImage(t,r,i-1,n,a),e.drawImage(t,r+1,i,n,a),e.drawImage(t,r,i+1,n,a),e.globalCompositeOperation="destination-over",e.fillStyle=Color.BLACK.toCssColorString(),e.fillRect(r-1,i-1,n+2,a+2),e.globalCompositeOperation="destination-out",e.drawImage(t,r,i,n,a),e.globalCompositeOperation="destination-over",e.fillStyle=Color.WHITE.toCssColorString(),e.fillRect(r-1,i-2,n+2,a+2)}var stringifyScratch=new Array(4);function createPin(e,t,i,r,n){stringifyScratch[0]=e,stringifyScratch[1]=t,stringifyScratch[2]=i,stringifyScratch[3]=r;var a=JSON.stringify(stringifyScratch),o=n[a];if(defined(o))return o;var s=document.createElement("canvas");s.width=r,s.height=r;var l=s.getContext("2d");return drawPin(l,i,r),defined(e)?(e=Resource.createIfNeeded(e).fetchImage().then((function(e){return drawIcon(l,e,r),n[a]=s})),n[a]=e):(defined(t)&&(t=writeTextToCanvas(t,{font:"bold "+r+"px sans-serif"}),drawIcon(l,t,r)),n[a]=s)}var PixelDatatype={UNSIGNED_BYTE:WebGLConstants$1.UNSIGNED_BYTE,UNSIGNED_SHORT:WebGLConstants$1.UNSIGNED_SHORT,UNSIGNED_INT:WebGLConstants$1.UNSIGNED_INT,FLOAT:WebGLConstants$1.FLOAT,HALF_FLOAT:WebGLConstants$1.HALF_FLOAT_OES,UNSIGNED_INT_24_8:WebGLConstants$1.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:WebGLConstants$1.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:WebGLConstants$1.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:WebGLConstants$1.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(e,t){switch(e){case PixelDatatype.UNSIGNED_BYTE:return WebGLConstants$1.UNSIGNED_BYTE;case PixelDatatype.UNSIGNED_SHORT:return WebGLConstants$1.UNSIGNED_SHORT;case PixelDatatype.UNSIGNED_INT:return WebGLConstants$1.UNSIGNED_INT;case PixelDatatype.FLOAT:return WebGLConstants$1.FLOAT;case PixelDatatype.HALF_FLOAT:return t.webgl2?WebGLConstants$1.HALF_FLOAT:WebGLConstants$1.HALF_FLOAT_OES;case PixelDatatype.UNSIGNED_INT_24_8:return WebGLConstants$1.UNSIGNED_INT_24_8;case PixelDatatype.UNSIGNED_SHORT_4_4_4_4:return WebGLConstants$1.UNSIGNED_SHORT_4_4_4_4;case PixelDatatype.UNSIGNED_SHORT_5_5_5_1:return WebGLConstants$1.UNSIGNED_SHORT_5_5_5_1;case PixelDatatype.UNSIGNED_SHORT_5_6_5:return PixelDatatype.UNSIGNED_SHORT_5_6_5}},isPacked:function(e){return e===PixelDatatype.UNSIGNED_INT_24_8||e===PixelDatatype.UNSIGNED_SHORT_4_4_4_4||e===PixelDatatype.UNSIGNED_SHORT_5_5_5_1||e===PixelDatatype.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case PixelDatatype.UNSIGNED_BYTE:return 1;case PixelDatatype.UNSIGNED_SHORT:case PixelDatatype.UNSIGNED_SHORT_4_4_4_4:case PixelDatatype.UNSIGNED_SHORT_5_5_5_1:case PixelDatatype.UNSIGNED_SHORT_5_6_5:case PixelDatatype.HALF_FLOAT:return 2;case PixelDatatype.UNSIGNED_INT:case PixelDatatype.FLOAT:case PixelDatatype.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===PixelDatatype.UNSIGNED_BYTE||e===PixelDatatype.UNSIGNED_SHORT||e===PixelDatatype.UNSIGNED_INT||e===PixelDatatype.FLOAT||e===PixelDatatype.HALF_FLOAT||e===PixelDatatype.UNSIGNED_INT_24_8||e===PixelDatatype.UNSIGNED_SHORT_4_4_4_4||e===PixelDatatype.UNSIGNED_SHORT_5_5_5_1||e===PixelDatatype.UNSIGNED_SHORT_5_6_5}},PixelDatatype$1=Object.freeze(PixelDatatype),PixelFormat={DEPTH_COMPONENT:WebGLConstants$1.DEPTH_COMPONENT,DEPTH_STENCIL:WebGLConstants$1.DEPTH_STENCIL,ALPHA:WebGLConstants$1.ALPHA,RGB:WebGLConstants$1.RGB,RGBA:WebGLConstants$1.RGBA,LUMINANCE:WebGLConstants$1.LUMINANCE,LUMINANCE_ALPHA:WebGLConstants$1.LUMINANCE_ALPHA,RGB_DXT1:WebGLConstants$1.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:WebGLConstants$1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:WebGLConstants$1.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:WebGLConstants$1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:WebGLConstants$1.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGB_ETC1:WebGLConstants$1.COMPRESSED_RGB_ETC1_WEBGL,componentsLength:function(e){switch(e){case PixelFormat.RGB:return 3;case PixelFormat.RGBA:return 4;case PixelFormat.LUMINANCE_ALPHA:return 2;case PixelFormat.ALPHA:case PixelFormat.LUMINANCE:default:return 1}},validate:function(e){return e===PixelFormat.DEPTH_COMPONENT||e===PixelFormat.DEPTH_STENCIL||e===PixelFormat.ALPHA||e===PixelFormat.RGB||e===PixelFormat.RGBA||e===PixelFormat.LUMINANCE||e===PixelFormat.LUMINANCE_ALPHA||e===PixelFormat.RGB_DXT1||e===PixelFormat.RGBA_DXT1||e===PixelFormat.RGBA_DXT3||e===PixelFormat.RGBA_DXT5||e===PixelFormat.RGB_PVRTC_4BPPV1||e===PixelFormat.RGB_PVRTC_2BPPV1||e===PixelFormat.RGBA_PVRTC_4BPPV1||e===PixelFormat.RGBA_PVRTC_2BPPV1||e===PixelFormat.RGB_ETC1},isColorFormat:function(e){return e===PixelFormat.ALPHA||e===PixelFormat.RGB||e===PixelFormat.RGBA||e===PixelFormat.LUMINANCE||e===PixelFormat.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===PixelFormat.DEPTH_COMPONENT||e===PixelFormat.DEPTH_STENCIL},isCompressedFormat:function(e){return e===PixelFormat.RGB_DXT1||e===PixelFormat.RGBA_DXT1||e===PixelFormat.RGBA_DXT3||e===PixelFormat.RGBA_DXT5||e===PixelFormat.RGB_PVRTC_4BPPV1||e===PixelFormat.RGB_PVRTC_2BPPV1||e===PixelFormat.RGBA_PVRTC_4BPPV1||e===PixelFormat.RGBA_PVRTC_2BPPV1||e===PixelFormat.RGB_ETC1},isDXTFormat:function(e){return e===PixelFormat.RGB_DXT1||e===PixelFormat.RGBA_DXT1||e===PixelFormat.RGBA_DXT3||e===PixelFormat.RGBA_DXT5},isPVRTCFormat:function(e){return e===PixelFormat.RGB_PVRTC_4BPPV1||e===PixelFormat.RGB_PVRTC_2BPPV1||e===PixelFormat.RGBA_PVRTC_4BPPV1||e===PixelFormat.RGBA_PVRTC_2BPPV1},isETC1Format:function(e){return e===PixelFormat.RGB_ETC1},compressedTextureSizeInBytes:function(e,t,i){switch(e){case PixelFormat.RGB_DXT1:case PixelFormat.RGBA_DXT1:case PixelFormat.RGB_ETC1:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8;case PixelFormat.RGBA_DXT3:case PixelFormat.RGBA_DXT5:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16;case PixelFormat.RGB_PVRTC_4BPPV1:case PixelFormat.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case PixelFormat.RGB_PVRTC_2BPPV1:case PixelFormat.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);default:return 0}},textureSizeInBytes:function(e,t,i,r){return e=PixelFormat.componentsLength(e),PixelDatatype$1.isPacked(t)&&(e=1),e*PixelDatatype$1.sizeInBytes(t)*i*r},alignmentInBytes:function(e,t,i){return 0==(i=PixelFormat.textureSizeInBytes(e,t,i,1)%4)?4:2==i?2:1},createTypedArray:function(e,t,i,r){var n=PixelDatatype$1.sizeInBytes(t);return new(t=n===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:n===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:n===Float32Array.BYTES_PER_ELEMENT&&t===PixelDatatype$1.FLOAT?Float32Array:Uint32Array)(PixelFormat.componentsLength(e)*i*r)},flipY:function(e,t,i,r,n){if(1===n)return e;for(var a=PixelFormat.createTypedArray(t,i,r,n),o=PixelFormat.componentsLength(t),s=r*o,l=0;l<n;++l)for(var c=l*r*o,u=(n-l-1)*r*o,d=0;d<s;++d)a[u+d]=e[c+d];return a},toInternalFormat:function(e,t,i){if(!i.webgl2)return e;if(e===PixelFormat.DEPTH_STENCIL)return WebGLConstants$1.DEPTH24_STENCIL8;if(e===PixelFormat.DEPTH_COMPONENT){if(t===PixelDatatype$1.UNSIGNED_SHORT)return WebGLConstants$1.DEPTH_COMPONENT16;if(t===PixelDatatype$1.UNSIGNED_INT)return WebGLConstants$1.DEPTH_COMPONENT24}if(t===PixelDatatype$1.FLOAT)switch(e){case PixelFormat.RGBA:return WebGLConstants$1.RGBA32F;case PixelFormat.RGB:return WebGLConstants$1.RGB32F;case PixelFormat.RG:return WebGLConstants$1.RG32F;case PixelFormat.R:return WebGLConstants$1.R32F}if(t===PixelDatatype$1.HALF_FLOAT)switch(e){case PixelFormat.RGBA:return WebGLConstants$1.RGBA16F;case PixelFormat.RGB:return WebGLConstants$1.RGB16F;case PixelFormat.RG:return WebGLConstants$1.RG16F;case PixelFormat.R:return WebGLConstants$1.R16F}return e}},PixelFormat$1=Object.freeze(PixelFormat);function PlaneGeometry(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),e=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),this._vertexFormat=e,this._workerName="createPlaneGeometry"}PlaneGeometry.packedLength=VertexFormat.packedLength,PlaneGeometry.pack=function(e,t,i){return i=defaultValue(i,0),VertexFormat.pack(e._vertexFormat,t,i),t};var scratchVertexFormat$7=new VertexFormat,scratchOptions$e={vertexFormat:scratchVertexFormat$7};PlaneGeometry.unpack=function(e,t,i){return t=defaultValue(t,0),t=VertexFormat.unpack(e,t,scratchVertexFormat$7),defined(i)?(i._vertexFormat=VertexFormat.clone(t,i._vertexFormat),i):new PlaneGeometry(scratchOptions$e)};var min=new Cartesian3(-.5,-.5,0),max=new Cartesian3(.5,.5,0);function PlaneOutlineGeometry(){this._workerName="createPlaneOutlineGeometry"}PlaneGeometry.createGeometry=function(e){var t,i,r=e._vertexFormat,n=new GeometryAttributes;return r.position&&((e=new Float64Array(12))[0]=min.x,e[1]=min.y,e[2]=0,e[3]=max.x,e[4]=min.y,e[5]=0,e[6]=max.x,e[7]=max.y,e[8]=0,e[9]=min.x,e[10]=max.y,e[11]=0,n.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:e}),r.normal&&((e=new Float32Array(12))[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=1,e[9]=0,e[10]=0,e[11]=1,n.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:e})),r.st&&((t=new Float32Array(8))[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,n.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:t})),r.tangent&&((t=new Float32Array(12))[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,n.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:t})),r.bitangent&&((i=new Float32Array(12))[0]=0,i[1]=1,i[2]=0,i[3]=0,i[4]=1,i[5]=0,i[6]=0,i[7]=1,i[8]=0,i[9]=0,i[10]=1,i[11]=0,n.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:i})),(i=new Uint16Array(6))[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3),new Geometry({attributes:n,indices:i,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:new BoundingSphere(Cartesian3.ZERO,Math.sqrt(2))})},PlaneOutlineGeometry.packedLength=0,PlaneOutlineGeometry.pack=function(e,t){return t},PlaneOutlineGeometry.unpack=function(e,t,i){return defined(i)?i:new PlaneOutlineGeometry};var min$1=new Cartesian3(-.5,-.5,0),max$1=new Cartesian3(.5,.5,0);PlaneOutlineGeometry.createGeometry=function(){var e=new GeometryAttributes,t=new Uint16Array(8),i=new Float64Array(12);return i[0]=min$1.x,i[1]=min$1.y,i[2]=min$1.z,i[3]=max$1.x,i[4]=min$1.y,i[5]=min$1.z,i[6]=max$1.x,i[7]=max$1.y,i[8]=min$1.z,i[9]=min$1.x,i[10]=max$1.y,i[11]=min$1.z,e.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:i}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new Geometry({attributes:e,indices:t,primitiveType:PrimitiveType$1.LINES,boundingSphere:new BoundingSphere(Cartesian3.ZERO,Math.sqrt(2))})};var scratchCarto1=new Cartographic,scratchCarto2=new Cartographic;function adjustPosHeightsForNormal(e,t,i,r){var n=r.cartesianToCartographic(e,scratchCarto1).height;(e=r.cartesianToCartographic(t,scratchCarto2)).height=n,r.cartographicToCartesian(e,t),(t=r.cartesianToCartographic(i,scratchCarto2)).height=n-100,r.cartographicToCartesian(t,i)}var scratchBoundingRectangle=new BoundingRectangle,scratchPosition$2=new Cartesian3,scratchNormal$5=new Cartesian3,scratchTangent$3=new Cartesian3,scratchBitangent$3=new Cartesian3,p1Scratch$2=new Cartesian3,p2Scratch$2=new Cartesian3,scratchPerPosNormal=new Cartesian3,scratchPerPosTangent=new Cartesian3,scratchPerPosBitangent=new Cartesian3,appendTextureCoordinatesOrigin=new Cartesian2,appendTextureCoordinatesCartesian2=new Cartesian2,appendTextureCoordinatesCartesian3=new Cartesian3,appendTextureCoordinatesQuaternion=new Quaternion,appendTextureCoordinatesMatrix3=new Matrix3,tangentMatrixScratch$1=new Matrix3;function computeAttributes(e){var t=e.vertexFormat,i=e.geometry,r=e.shadowVolume,n=i.attributes.position.values,a=n.length,o=e.wall,s=e.top||o,l=e.bottom||o;if(t.st||t.normal||t.tangent||t.bitangent||r){var c=e.boundingRectangle,u=e.tangentPlane,d=e.ellipsoid,h=e.stRotation,p=e.perPositionHeight,f=appendTextureCoordinatesOrigin;f.x=c.x,f.y=c.y;var m,g=t.st?new Float32Array(a/3*2):void 0;t.normal&&(m=p&&s&&!o?i.attributes.normal.values:new Float32Array(a));var y,_=t.tangent?new Float32Array(a):void 0,v=t.bitangent?new Float32Array(a):void 0,C=r?new Float32Array(a):void 0,x=0,b=0,S=scratchNormal$5,T=scratchTangent$3,E=scratchBitangent$3,w=!0,A=appendTextureCoordinatesMatrix3,P=tangentMatrixScratch$1;P=0!==h?(y=Quaternion.fromAxisAngle(u._plane.normal,h,appendTextureCoordinatesQuaternion),A=Matrix3.fromQuaternion(y,A),y=Quaternion.fromAxisAngle(u._plane.normal,-h,appendTextureCoordinatesQuaternion),Matrix3.fromQuaternion(y,P)):(A=Matrix3.clone(Matrix3.IDENTITY,A),Matrix3.clone(Matrix3.IDENTITY,P));var D=0,M=0;s&&l&&(D=a/2,M=a/3,a/=2);for(var I=0;I<a;I+=3){var R,O,L,N,F=Cartesian3.fromArray(n,I,appendTextureCoordinatesCartesian3);t.st&&(R=Matrix3.multiplyByVector(A,F,scratchPosition$2),R=d.scaleToGeodeticSurface(R,R),O=u.projectPointOntoPlane(R,appendTextureCoordinatesCartesian2),Cartesian2.subtract(O,f,O),L=CesiumMath.clamp(O.x/c.width,0,1),N=CesiumMath.clamp(O.y/c.height,0,1),l&&(g[x+M]=L,g[x+1+M]=N),s&&(g[x]=L,g[x+1]=N),x+=2),(t.normal||t.tangent||t.bitangent||r)&&(R=b+1,O=b+2,o?(I+3<a&&(L=Cartesian3.fromArray(n,I+3,p1Scratch$2),w&&(N=Cartesian3.fromArray(n,I+a,p2Scratch$2),p&&adjustPosHeightsForNormal(F,L,N,d),Cartesian3.subtract(L,F,L),Cartesian3.subtract(N,F,N),S=Cartesian3.normalize(Cartesian3.cross(N,L,S),S),w=!1),Cartesian3.equalsEpsilon(L,F,CesiumMath.EPSILON10)&&(w=!0)),(t.tangent||t.bitangent)&&(E=d.geodeticSurfaceNormal(F,E),t.tangent&&(T=Cartesian3.normalize(Cartesian3.cross(E,S,T),T)))):(S=d.geodeticSurfaceNormal(F,S),(t.tangent||t.bitangent)&&(p&&(scratchPerPosNormal=Cartesian3.fromArray(m,b,scratchPerPosNormal),scratchPerPosTangent=Cartesian3.cross(Cartesian3.UNIT_Z,scratchPerPosNormal,scratchPerPosTangent),scratchPerPosTangent=Cartesian3.normalize(Matrix3.multiplyByVector(P,scratchPerPosTangent,scratchPerPosTangent),scratchPerPosTangent),t.bitangent&&(scratchPerPosBitangent=Cartesian3.normalize(Cartesian3.cross(scratchPerPosNormal,scratchPerPosTangent,scratchPerPosBitangent),scratchPerPosBitangent))),T=Cartesian3.cross(Cartesian3.UNIT_Z,S,T),T=Cartesian3.normalize(Matrix3.multiplyByVector(P,T,T),T),t.bitangent&&(E=Cartesian3.normalize(Cartesian3.cross(S,T,E),E)))),t.normal&&(e.wall?(m[b+D]=S.x,m[R+D]=S.y,m[O+D]=S.z):l&&(m[b+D]=-S.x,m[R+D]=-S.y,m[O+D]=-S.z),(s&&!p||o)&&(m[b]=S.x,m[R]=S.y,m[O]=S.z)),r&&(o&&(S=d.geodeticSurfaceNormal(F,S)),C[b+D]=-S.x,C[R+D]=-S.y,C[O+D]=-S.z),t.tangent&&(e.wall?(_[b+D]=T.x,_[R+D]=T.y,_[O+D]=T.z):l&&(_[b+D]=-T.x,_[R+D]=-T.y,_[O+D]=-T.z),s&&(p?(_[b]=scratchPerPosTangent.x,_[R]=scratchPerPosTangent.y,_[O]=scratchPerPosTangent.z):(_[b]=T.x,_[R]=T.y,_[O]=T.z))),t.bitangent&&(l&&(v[b+D]=E.x,v[R+D]=E.y,v[O+D]=E.z),s&&(p?(v[b]=scratchPerPosBitangent.x,v[R]=scratchPerPosBitangent.y,v[O]=scratchPerPosBitangent.z):(v[b]=E.x,v[R]=E.y,v[O]=E.z))),b+=3)}t.st&&(i.attributes.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:g})),t.normal&&(i.attributes.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:m})),t.tangent&&(i.attributes.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:_})),t.bitangent&&(i.attributes.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:v})),r&&(i.attributes.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:C}))}return e.extrude&&defined(e.offsetAttribute)&&(h=n.length/3,y=new Uint8Array(h),e.offsetAttribute===GeometryOffsetAttribute$1.TOP?s&&l||o?y=arrayFill(y,1,0,h/2):s&&(y=arrayFill(y,1)):y=arrayFill(y,e.offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),i.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})),i}var startCartographicScratch$1=new Cartographic,endCartographicScratch$1=new Cartographic,idlCross={westOverIDL:0,eastOverIDL:0},ellipsoidGeodesic$1=new EllipsoidGeodesic;function computeRectangle$2(e,t,i,r,n){if(n=defaultValue(n,new Rectangle),!defined(e)||e.length<3)return n.west=0,n.north=0,n.south=0,n.east=0,n;if(i===ArcType$1.RHUMB)return Rectangle.fromCartesianArray(e,t,n);ellipsoidGeodesic$1.ellipsoid.equals(t)||(ellipsoidGeodesic$1=new EllipsoidGeodesic(void 0,void 0,t)),n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,idlCross.westOverIDL=Number.POSITIVE_INFINITY,idlCross.eastOverIDL=Number.NEGATIVE_INFINITY;for(var a,o=1/CesiumMath.chordLength(r,t.maximumRadius),s=e.length,l=t.cartesianToCartographic(e[0],endCartographicScratch$1),c=startCartographicScratch$1,u=1;u<s;u++)a=c,c=l,l=t.cartesianToCartographic(e[u],a),ellipsoidGeodesic$1.setEndPoints(c,l),interpolateAndGrowRectangle(ellipsoidGeodesic$1,o,n,idlCross);return a=c,c=l,l=t.cartesianToCartographic(e[0],a),ellipsoidGeodesic$1.setEndPoints(c,l),interpolateAndGrowRectangle(ellipsoidGeodesic$1,o,n,idlCross),n.east-n.west>idlCross.eastOverIDL-idlCross.westOverIDL&&(n.west=idlCross.westOverIDL,n.east=idlCross.eastOverIDL,n.east>CesiumMath.PI&&(n.east=n.east-CesiumMath.TWO_PI),n.west>CesiumMath.PI&&(n.west=n.west-CesiumMath.TWO_PI)),n}var interpolatedCartographicScratch$1=new Cartographic;function interpolateAndGrowRectangle(e,t,i,r){for(var n=e.surfaceDistance,a=Math.ceil(n*t),o=0<a?n/(a-1):Number.POSITIVE_INFINITY,s=0,l=0;l<a;l++){var c=e.interpolateUsingSurfaceDistance(s,interpolatedCartographicScratch$1);s+=o;var u=c.longitude;c=c.latitude;i.west=Math.min(i.west,u),i.east=Math.max(i.east,u),i.south=Math.min(i.south,c),i.north=Math.max(i.north,c),u=0<=u?u:u+CesiumMath.TWO_PI,r.westOverIDL=Math.min(r.westOverIDL,u),r.eastOverIDL=Math.max(r.eastOverIDL,u)}}var createGeometryFromPositionsExtrudedPositions=[];function createGeometryFromPositionsExtruded(e,t,i,r,n,a,o,s,l){var c={walls:[]};if(a||o){t=(v=PolygonGeometryLibrary.createGeometryFromPositions(e,t,i,n,s,l)).attributes.position.values;var u=v.indices;if(a&&o){var d,h=(a=t.concat(t)).length/3;(d=IndexDatatype$1.createTypedArray(h,2*u.length)).set(u);for(var p=u.length,f=h/2,m=0;m<p;m+=3){var g=d[m]+f,y=d[m+1]+f,_=d[m+2]+f;d[m+p]=_,d[m+1+p]=y,d[m+2+p]=g}v.attributes.position.values=a,n&&s.normal&&(s=v.attributes.normal.values,v.attributes.normal.values=new Float32Array(a.length),v.attributes.normal.values.set(s)),v.indices=d}else if(o){for(h=t.length/3,d=IndexDatatype$1.createTypedArray(h,u.length),m=0;m<u.length;m+=3)d[m]=u[m+2],d[m+1]=u[m+1],d[m+2]=u[m];v.indices=d}c.topAndBottom=new GeometryInstance({geometry:v})}var v=r.outerRing,C=EllipsoidTangentPlane.fromPoints(v,e).projectPointsOntoPlane(v,createGeometryFromPositionsExtrudedPositions);PolygonPipeline.computeWindingOrder2D(C)===WindingOrder$1.CLOCKWISE&&(v=v.slice().reverse());var x=PolygonGeometryLibrary.computeWallGeometry(v,e,i,n,l);c.walls.push(new GeometryInstance({geometry:x}));var b=r.holes;for(m=0;m<b.length;m++){var S=b[m];C=EllipsoidTangentPlane.fromPoints(S,e).projectPointsOntoPlane(S,createGeometryFromPositionsExtrudedPositions);PolygonPipeline.computeWindingOrder2D(C)===WindingOrder$1.COUNTER_CLOCKWISE&&(S=S.slice().reverse()),x=PolygonGeometryLibrary.computeWallGeometry(S,e,i,n,l),c.walls.push(new GeometryInstance({geometry:x}))}return c}function PolygonGeometry(e){var t,i=e.polygonHierarchy,r=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),n=defaultValue(e.ellipsoid,Ellipsoid.WGS84),a=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),o=defaultValue(e.stRotation,0),s=defaultValue(e.perPositionHeight,!1),l=s&&defined(e.extrudedHeight),c=defaultValue(e.height,0),u=defaultValue(e.extrudedHeight,c);l||(t=Math.max(c,u),u=Math.min(c,u),c=t),this._vertexFormat=VertexFormat.clone(r),this._ellipsoid=Ellipsoid.clone(n),this._granularity=a,this._stRotation=o,this._height=c,this._extrudedHeight=u,this._closeTop=defaultValue(e.closeTop,!0),this._closeBottom=defaultValue(e.closeBottom,!0),this._polygonHierarchy=i,this._perPositionHeight=s,this._perPositionHeightExtrude=l,this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=defaultValue(e.arcType,ArcType$1.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=PolygonGeometryLibrary.computeHierarchyPackedLength(i)+Ellipsoid.packedLength+VertexFormat.packedLength+12}PolygonGeometry.fromPositions=function(e){return new PolygonGeometry({polygonHierarchy:{positions:(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType})},PolygonGeometry.pack=function(e,t,i){return i=defaultValue(i,0),i=PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i),Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._stRotation,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._closeTop?1:0,t[i++]=e._closeBottom?1:0,t[i++]=e._shadowVolume?1:0,t[i++]=defaultValue(e._offsetAttribute,-1),t[i++]=e._arcType,t[i]=e.packedLength,t};var scratchEllipsoid$5=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$8=new VertexFormat,dummyOptions={polygonHierarchy:{}};function textureCoordinateRotationPoints$1(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];var i=e._ellipsoid,r=e._polygonHierarchy.positions;e=e.rectangle;return Geometry._textureCoordinateRotationPoints(r,t,i,e)}function PolygonHierarchy(e,t){this.positions=defined(e)?e:[],this.holes=defined(t)?t:[]}PolygonGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$5);t+=Ellipsoid.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$8);t+=VertexFormat.packedLength;var o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=1===e[t++],d=1===e[t++],h=1===e[t++],p=1===e[t++],f=1===e[t++],m=e[t++],g=e[t++];t=e[t];return defined(i)||(i=new PolygonGeometry(dummyOptions)),i._polygonHierarchy=r,i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._height=o,i._extrudedHeight=s,i._granularity=l,i._stRotation=c,i._perPositionHeightExtrude=u,i._perPositionHeight=d,i._closeTop=h,i._closeBottom=p,i._shadowVolume=f,i._offsetAttribute=-1===m?void 0:m,i._arcType=g,i.packedLength=t,i},PolygonGeometry.computeRectangle=function(e,t){var i=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),r=defaultValue(e.arcType,ArcType$1.GEODESIC),n=e.polygonHierarchy;e=defaultValue(e.ellipsoid,Ellipsoid.WGS84);return computeRectangle$2(n.positions,e,r,i,t)},PolygonGeometry.createGeometry=function(e){var t=e._vertexFormat,i=e._ellipsoid,r=e._granularity,n=e._stRotation,a=e._polygonHierarchy,o=e._perPositionHeight,s=e._closeTop,l=e._closeBottom,c=e._arcType;if(!((f=a.positions).length<3)){var u=EllipsoidTangentPlane.fromPoints(f,i),d=(a=PolygonGeometryLibrary.polygonsFromHierarchy(a,u.projectPointsOntoPlane.bind(u),!o,i)).hierarchy,h=a.polygons;if(0!==d.length){f=d[0].outerRing;var p,f=PolygonGeometryLibrary.computeBoundingRectangle(u.plane.normal,u.projectPointOntoPlane.bind(u),f,n,scratchBoundingRectangle),m=[],g=e._height,y=e._extrudedHeight,_={perPositionHeight:o,vertexFormat:t,geometry:void 0,tangentPlane:u,boundingRectangle:f,ellipsoid:i,stRotation:n,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:c};if(e._perPositionHeightExtrude||!CesiumMath.equalsEpsilon(g,y,0,CesiumMath.EPSILON2))for(_.extrude=!0,_.top=s,_.bottom=l,_.shadowVolume=e._shadowVolume,_.offsetAttribute=e._offsetAttribute,p=0;p<h.length;p++){var v,C=createGeometryFromPositionsExtruded(i,h[p],r,d[p],o,s,l,t,c);s&&l?(v=C.topAndBottom,_.geometry=PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(v.geometry,g,y,i,o)):s?((v=C.topAndBottom).geometry.attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(v.geometry.attributes.position.values,g,i,!o),_.geometry=v.geometry):l&&((v=C.topAndBottom).geometry.attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(v.geometry.attributes.position.values,y,i,!0),_.geometry=v.geometry),(s||l)&&(_.wall=!1,v.geometry=computeAttributes(_),m.push(v));var x=C.walls;_.wall=!0;for(var b=0;b<x.length;b++){var S=x[b];_.geometry=PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(S.geometry,g,y,i,o),S.geometry=computeAttributes(_),m.push(S)}}else for(p=0;p<h.length;p++){var T,E=new GeometryInstance({geometry:PolygonGeometryLibrary.createGeometryFromPositions(i,h[p],r,o,t,c)});E.geometry.attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(E.geometry.attributes.position.values,g,i,!o),_.geometry=E.geometry,E.geometry=computeAttributes(_),defined(e._offsetAttribute)&&(T=E.geometry.attributes.position.values.length,arrayFill(T=new Uint8Array(T/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),E.geometry.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})),m.push(E)}return(u=GeometryPipeline.combineInstances(m)[0]).attributes.position.values=new Float64Array(u.attributes.position.values),u.indices=IndexDatatype$1.createTypedArray(u.attributes.position.values.length/3,u.indices),f=u.attributes,n=BoundingSphere.fromVertices(f.position.values),t.position||delete f.position,new Geometry({attributes:f,indices:u.indices,primitiveType:u.primitiveType,boundingSphere:n,offsetAttribute:e._offsetAttribute})}}},PolygonGeometry.createShadowVolume=function(e,t,i){var r=e._granularity,n=e._ellipsoid;t=t(r,n),i=i(r,n);return new PolygonGeometry({polygonHierarchy:e._polygonHierarchy,ellipsoid:n,stRotation:e._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:t,height:i,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(PolygonGeometry.prototype,{rectangle:{get:function(){var e;return defined(this._rectangle)||(e=this._polygonHierarchy.positions,this._rectangle=computeRectangle$2(e,this._ellipsoid,this._arcType,this._granularity)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=textureCoordinateRotationPoints$1(this)),this._textureCoordinateRotationPoints}}});var createGeometryFromPositionsPositions=[],createGeometryFromPositionsSubdivided=[];function createGeometryFromPositions$1(e,t,i,r,n){var a,o=EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,createGeometryFromPositionsPositions);PolygonPipeline.computeWindingOrder2D(o)===WindingOrder$1.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var s=t.length,l=0;if(r)for(a=new Float64Array(2*s*3),g=0;g<s;g++){var c=t[g],u=t[(g+1)%s];a[l++]=c.x,a[l++]=c.y,a[l++]=c.z,a[l++]=u.x,a[l++]=u.y,a[l++]=u.z}else{var d,h=0;if(n===ArcType$1.GEODESIC)for(g=0;g<s;g++)h+=PolygonGeometryLibrary.subdivideLineCount(t[g],t[(g+1)%s],i);else if(n===ArcType$1.RHUMB)for(g=0;g<s;g++)h+=PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[g],t[(g+1)%s],i);for(a=new Float64Array(3*h),g=0;g<s;g++){n===ArcType$1.GEODESIC?d=PolygonGeometryLibrary.subdivideLine(t[g],t[(g+1)%s],i,createGeometryFromPositionsSubdivided):n===ArcType$1.RHUMB&&(d=PolygonGeometryLibrary.subdivideRhumbLine(e,t[g],t[(g+1)%s],i,createGeometryFromPositionsSubdivided));for(var p=d.length,f=0;f<p;++f)a[l++]=d[f]}}r=2*(s=a.length/3);for(var m=IndexDatatype$1.createTypedArray(s,r),g=(l=0,0);g<s-1;g++)m[l++]=g,m[l++]=g+1;return m[l++]=s-1,m[l++]=0,new GeometryInstance({geometry:new Geometry({attributes:new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:a})}),indices:m,primitiveType:PrimitiveType$1.LINES})})}function createGeometryFromPositionsExtruded$1(e,t,i,r,n){var a,o=EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,createGeometryFromPositionsPositions);PolygonPipeline.computeWindingOrder2D(o)===WindingOrder$1.CLOCKWISE&&(o.reverse(),t=t.slice().reverse());var s=t.length,l=new Array(s),c=0;if(r)for(a=new Float64Array(2*s*3*2),_=0;_<s;++_){l[_]=c/3;var u=t[_],d=t[(_+1)%s];a[c++]=u.x,a[c++]=u.y,a[c++]=u.z,a[c++]=d.x,a[c++]=d.y,a[c++]=d.z}else{var h,p=0;if(n===ArcType$1.GEODESIC)for(_=0;_<s;_++)p+=PolygonGeometryLibrary.subdivideLineCount(t[_],t[(_+1)%s],i);else if(n===ArcType$1.RHUMB)for(_=0;_<s;_++)p+=PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[_],t[(_+1)%s],i);for(a=new Float64Array(3*p*2),_=0;_<s;++_){l[_]=c/3,n===ArcType$1.GEODESIC?h=PolygonGeometryLibrary.subdivideLine(t[_],t[(_+1)%s],i,createGeometryFromPositionsSubdivided):n===ArcType$1.RHUMB&&(h=PolygonGeometryLibrary.subdivideRhumbLine(e,t[_],t[(_+1)%s],i,createGeometryFromPositionsSubdivided));for(var f=h.length,m=0;m<f;++m)a[c++]=h[m]}}s=a.length/6;for(var g=l.length,y=(r=2*(2*s+g),IndexDatatype$1.createTypedArray(s+g,r)),_=(c=0,0);_<s;++_)y[c++]=_,y[c++]=(_+1)%s,y[c++]=_+s,y[c++]=(_+1)%s+s;for(_=0;_<g;_++){var v=l[_];y[c++]=v,y[c++]=v+s}return new GeometryInstance({geometry:new Geometry({attributes:new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:a})}),indices:y,primitiveType:PrimitiveType$1.LINES})})}function PolygonOutlineGeometry(e){var t,i=e.polygonHierarchy,r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),a=defaultValue(e.perPositionHeight,!1),o=a&&defined(e.extrudedHeight),s=defaultValue(e.arcType,ArcType$1.GEODESIC),l=defaultValue(e.height,0),c=defaultValue(e.extrudedHeight,l);o||(t=Math.max(l,c),c=Math.min(l,c),l=t),this._ellipsoid=Ellipsoid.clone(r),this._granularity=n,this._height=l,this._extrudedHeight=c,this._arcType=s,this._polygonHierarchy=i,this._perPositionHeight=a,this._perPositionHeightExtrude=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=PolygonGeometryLibrary.computeHierarchyPackedLength(i)+Ellipsoid.packedLength+8}PolygonOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),i=PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,i),Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=defaultValue(e._offsetAttribute,-1),t[i]=e.packedLength,t};var scratchEllipsoid$6=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),dummyOptions$1={polygonHierarchy:{}};PolygonOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$6);t+=Ellipsoid.packedLength;var a=e[t++],o=e[t++],s=e[t++],l=1===e[t++],c=1===e[t++],u=e[t++],d=e[t++];t=e[t];return defined(i)||(i=new PolygonOutlineGeometry(dummyOptions$1)),i._polygonHierarchy=r,i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._height=a,i._extrudedHeight=o,i._granularity=s,i._perPositionHeight=c,i._perPositionHeightExtrude=l,i._arcType=u,i._offsetAttribute=-1===d?void 0:d,i.packedLength=t,i},PolygonOutlineGeometry.fromPositions=function(e){return new PolygonOutlineGeometry({polygonHierarchy:{positions:(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},PolygonOutlineGeometry.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,r=e._polygonHierarchy,n=e._perPositionHeight,a=e._arcType,o=PolygonGeometryLibrary.polygonOutlinesFromHierarchy(r,!n,t);if(0!==o.length){var s,l,c,u,d,h=[],p=CesiumMath.chordLength(i,t.maximumRadius),f=e._height,m=e._extrudedHeight;if(e._perPositionHeightExtrude||!CesiumMath.equalsEpsilon(f,m,0,CesiumMath.EPSILON2))for(s=0;s<o.length;s++)(u=createGeometryFromPositionsExtruded$1(t,o[s],p,n,a)).geometry=PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(u.geometry,f,m,t,n),defined(e._offsetAttribute)&&(l=u.geometry.attributes.position.values.length/3,c=new Uint8Array(l),c=e._offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(c,1,0,l/2):arrayFill(c,e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),u.geometry.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})),h.push(u);else for(s=0;s<o.length;s++)(u=createGeometryFromPositions$1(t,o[s],p,n,a)).geometry.attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(u.geometry.attributes.position.values,f,t,!n),defined(e._offsetAttribute)&&(d=u.geometry.attributes.position.values.length,arrayFill(d=new Uint8Array(d/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),u.geometry.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})),h.push(u);return r=GeometryPipeline.combineInstances(h)[0],i=BoundingSphere.fromVertices(r.attributes.position.values),new Geometry({attributes:r.attributes,indices:r.indices,primitiveType:r.primitiveType,boundingSphere:i,offsetAttribute:e._offsetAttribute})}};var scratchInterpolateColorsArray=[];function interpolateColors(e,t,i,r,n){var a=scratchInterpolateColorsArray;a.length=n;var o=i.red,s=i.green,l=i.blue,c=i.alpha,u=r.red,d=r.green,h=r.blue,p=r.alpha;if(Color.equals(i,r)){for(_=0;_<n;_++)a[_]=Color.clone(i);return a}for(var f=(u-o)/n,m=(d-s)/n,g=(h-l)/n,y=(p-c)/n,_=0;_<n;_++)a[_]=new Color(o+_*f,s+_*m,l+_*g,c+_*y);return a}function PolylineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.colors,r=defaultValue(e.width,1),n=defaultValue(e.colorsPerVertex,!1);this._positions=t,this._colors=i,this._width=r,this._colorsPerVertex=n,this._vertexFormat=VertexFormat.clone(defaultValue(e.vertexFormat,VertexFormat.DEFAULT)),this._arcType=defaultValue(e.arcType,ArcType$1.GEODESIC),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._workerName="createPolylineGeometry",t=1+t.length*Cartesian3.packedLength,t+=defined(i)?1+i.length*Color.packedLength:1,this.packedLength=t+Ellipsoid.packedLength+VertexFormat.packedLength+4}PolylineGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._colors;a=defined(o)?o.length:0;for(t[i++]=a,r=0;r<a;++r,i+=Color.packedLength)Color.pack(o[r],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._width,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t};var scratchEllipsoid$7=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$9=new VertexFormat,scratchOptions$f={positions:void 0,colors:void 0,ellipsoid:scratchEllipsoid$7,vertexFormat:scratchVertexFormat$9,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};PolylineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);var o=0<(r=e[t++])?new Array(r):void 0;for(a=0;a<r;++a,t+=Color.packedLength)o[a]=Color.unpack(e,t);var s=Ellipsoid.unpack(e,t,scratchEllipsoid$7);t+=Ellipsoid.packedLength;var l=VertexFormat.unpack(e,t,scratchVertexFormat$9);t+=VertexFormat.packedLength;var c=e[t++],u=1===e[t++],d=e[t++],h=e[t];return defined(i)?(i._positions=n,i._colors=o,i._ellipsoid=Ellipsoid.clone(s,i._ellipsoid),i._vertexFormat=VertexFormat.clone(l,i._vertexFormat),i._width=c,i._colorsPerVertex=u,i._arcType=d,i._granularity=h,i):(scratchOptions$f.positions=n,scratchOptions$f.colors=o,scratchOptions$f.width=c,scratchOptions$f.colorsPerVertex=u,scratchOptions$f.arcType=d,scratchOptions$f.granularity=h,new PolylineGeometry(scratchOptions$f))};var scratchCartesian3$8=new Cartesian3,scratchPosition$3=new Cartesian3,scratchPrevPosition=new Cartesian3,scratchNextPosition=new Cartesian3;PolylineGeometry.createGeometry=function(e){var t=e._width,i=e._vertexFormat,r=e._colors,n=e._colorsPerVertex,a=e._arcType,o=e._granularity,s=e._ellipsoid,l=arrayRemoveDuplicates(e._positions,Cartesian3.equalsEpsilon),c=l.length;if(!(c<2||t<=0)){if(a===ArcType$1.GEODESIC||a===ArcType$1.RHUMB){var u,d=a===ArcType$1.GEODESIC?(u=CesiumMath.chordLength(o,s.maximumRadius),PolylinePipeline.numberOfPoints):(u=o,PolylinePipeline.numberOfPointsRhumbLine),h=PolylinePipeline.extractHeights(l,s);if(defined(r)){for(var p=1,f=0;f<c-1;++f)p+=d(l[f],l[f+1],u);var m=new Array(p),g=0;for(f=0;f<c-1;++f){var y=l[f],_=l[f+1],v=r[f],C=d(y,_,u);if(n&&f<p)for(var x=interpolateColors(y,_,v,r[f+1],C),b=x.length,S=0;S<b;++S)m[g++]=x[S];else for(S=0;S<C;++S)m[g++]=Color.clone(v)}m[g]=Color.clone(r[r.length-1]),r=m,scratchInterpolateColorsArray.length=0}l=a===ArcType$1.GEODESIC?PolylinePipeline.generateCartesianArc({positions:l,minDistance:u,ellipsoid:s,height:h}):PolylinePipeline.generateCartesianRhumbArc({positions:l,granularity:u,ellipsoid:s,height:h})}s=4*(c=l.length)-4;var T,E,w,A=new Float64Array(3*s),P=new Float64Array(3*s),D=new Float64Array(3*s),M=new Float32Array(2*s),I=i.st?new Float32Array(2*s):void 0,R=defined(r)?new Uint8Array(4*s):void 0,O=0,L=0,N=0,F=0;for(S=0;S<c;++S){0===S?(T=scratchCartesian3$8,Cartesian3.subtract(l[0],l[1],T),Cartesian3.add(l[0],T,T)):T=l[S-1],Cartesian3.clone(T,scratchPrevPosition),Cartesian3.clone(l[S],scratchPosition$3),S===c-1?(T=scratchCartesian3$8,Cartesian3.subtract(l[c-1],l[c-2],T),Cartesian3.add(l[c-1],T,T)):T=l[S+1],Cartesian3.clone(T,scratchNextPosition),defined(R)&&(E=0===S||n?r[S]:r[S-1],S!==c-1&&(w=r[S]));for(var B=S===c-1?2:4,V=0===S?2:0;V<B;++V){Cartesian3.pack(scratchPosition$3,A,O),Cartesian3.pack(scratchPrevPosition,P,O),Cartesian3.pack(scratchNextPosition,D,O),O+=3;var k=V-2<0?-1:1;M[L++]=V%2*2-1,M[L++]=k*t,i.st&&(I[N++]=S/(c-1),I[N++]=Math.max(M[L-2],0)),defined(R)&&(k=V<2?E:w,R[F++]=Color.floatToByte(k.red),R[F++]=Color.floatToByte(k.green),R[F++]=Color.floatToByte(k.blue),R[F++]=Color.floatToByte(k.alpha))}}(h=new GeometryAttributes).position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:A}),h.prevPosition=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:P}),h.nextPosition=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:D}),h.expandAndWidth=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:M}),i.st&&(h.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:I})),defined(R)&&(h.color=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:4,values:R,normalize:!0}));var z=IndexDatatype$1.createTypedArray(s,6*c-6),G=0,U=0,$=c-1;for(S=0;S<$;++S)z[U++]=G,z[U++]=G+2,z[U++]=G+1,z[U++]=G+1,z[U++]=G+2,z[U++]=G+3,G+=4;return new Geometry({attributes:h,indices:z,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:BoundingSphere.fromPoints(l),geometryType:GeometryType$1.POLYLINES})}};var warnings={};function oneTimeWarning(e,t){defined(warnings[e])||(warnings[e]=!0,console.warn(defaultValue(t,e)))}function computeAttributes$1(e,t,i,r){var n=new GeometryAttributes;r.position&&(n.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:e}));var a,o,s,l,c,u=t.length,d=e.length/3,h=(d-2*u)/(2*u),p=PolygonPipeline.triangulate(t),f=(h-1)*u*6+2*p.length,m=IndexDatatype$1.createTypedArray(d,f),g=2*u,y=0;for(E=0;E<h-1;E++){for(a=0;a<u-1;a++)c=(o=2*a+E*u*2)+g,l=(s=o+1)+g,m[y++]=s,m[y++]=o,m[y++]=l,m[y++]=l,m[y++]=o,m[y++]=c;l=(s=1+(o=2*u-2+E*u*2))+g,c=o+g,m[y++]=s,m[y++]=o,m[y++]=l,m[y++]=l,m[y++]=o,m[y++]=c}if(r.st||r.tangent||r.bitangent){for(var _,v,C=new Float32Array(2*d),x=1/(h-1),b=1/i.height,S=i.height/2,T=0,E=0;E<h;E++){for(_=E*x,v=b*(t[0].y+S),C[T++]=_,C[T++]=v,a=1;a<u;a++)v=b*(t[a].y+S),C[T++]=_,C[T++]=v,C[T++]=_,C[T++]=v;v=b*(t[0].y+S),C[T++]=_,C[T++]=v}for(a=0;a<u;a++)_=0,v=b*(t[a].y+S),C[T++]=_,C[T++]=v;for(a=0;a<u;a++)_=(h-1)*x,v=b*(t[a].y+S),C[T++]=_,C[T++]=v;n.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:new Float32Array(C)})}var w=d-2*u;for(E=0;E<p.length;E+=3){var A=p[E]+w,P=p[E+1]+w,D=p[E+2]+w;m[y++]=A,m[y++]=P,m[y++]=D,m[y++]=D+u,m[y++]=P+u,m[y++]=A+u}var M=new Geometry({attributes:n,indices:m,boundingSphere:BoundingSphere.fromVertices(e),primitiveType:PrimitiveType$1.TRIANGLES});if(r.normal&&(M=GeometryPipeline.computeNormal(M)),r.tangent||r.bitangent){try{M=GeometryPipeline.computeTangentAndBitangent(M)}catch(e){oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}r.tangent||(M.attributes.tangent=void 0),r.bitangent||(M.attributes.bitangent=void 0),r.st||(M.attributes.st=void 0)}return M}function PolylineVolumeGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;this._positions=t,this._shape=i,this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._cornerType=defaultValue(e.cornerType,CornerType$1.ROUNDED),this._vertexFormat=VertexFormat.clone(defaultValue(e.vertexFormat,VertexFormat.DEFAULT)),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry",t=1+t.length*Cartesian3.packedLength,t+=1+i.length*Cartesian2.packedLength,this.packedLength=t+Ellipsoid.packedLength+VertexFormat.packedLength+2}oneTimeWarning.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",oneTimeWarning.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined.  zIndex will be ignored",oneTimeWarning.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height.  heightReference will be ignored",oneTimeWarning.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight.  extrudedHeightReference will be ignored",PolylineVolumeGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._shape;a=o.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian2.packedLength)Cartesian2.pack(o[r],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var scratchEllipsoid$8=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$a=new VertexFormat,scratchOptions$g={polylinePositions:void 0,shapePositions:void 0,ellipsoid:scratchEllipsoid$8,vertexFormat:scratchVertexFormat$a,cornerType:void 0,granularity:void 0};PolylineVolumeGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);r=e[t++];var o=new Array(r);for(a=0;a<r;++a,t+=Cartesian2.packedLength)o[a]=Cartesian2.unpack(e,t);var s=Ellipsoid.unpack(e,t,scratchEllipsoid$8);t+=Ellipsoid.packedLength;var l=VertexFormat.unpack(e,t,scratchVertexFormat$a);t+=VertexFormat.packedLength;var c=e[t++],u=e[t];return defined(i)?(i._positions=n,i._shape=o,i._ellipsoid=Ellipsoid.clone(s,i._ellipsoid),i._vertexFormat=VertexFormat.clone(l,i._vertexFormat),i._cornerType=c,i._granularity=u,i):(scratchOptions$g.polylinePositions=n,scratchOptions$g.shapePositions=o,scratchOptions$g.cornerType=c,scratchOptions$g.granularity=u,new PolylineVolumeGeometry(scratchOptions$g))};var brScratch=new BoundingRectangle;function computeAttributes$2(e,t){var i=new GeometryAttributes;i.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:e});var r=t.length,n=(t=i.position.values.length/3,e.length/3/r),a=IndexDatatype$1.createTypedArray(t,2*r*(1+n)),o=0,s=0,l=s*r;for(d=0;d<r-1;d++)a[o++]=d+l,a[o++]=d+l+1;for(a[o++]=r-1+l,a[o++]=l,l=(s=n-1)*r,d=0;d<r-1;d++)a[o++]=d+l,a[o++]=d+l+1;for(a[o++]=r-1+l,a[o++]=l,s=0;s<n-1;s++)for(var c=r*s,u=c+r,d=0;d<r;d++)a[o++]=d+c,a[o++]=d+u;return new Geometry({attributes:i,indices:IndexDatatype$1.createTypedArray(t,a),boundingSphere:BoundingSphere.fromVertices(e),primitiveType:PrimitiveType$1.LINES})}function PolylineVolumeOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;this._positions=t,this._shape=i,this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._cornerType=defaultValue(e.cornerType,CornerType$1.ROUNDED),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry",t=1+t.length*Cartesian3.packedLength,t+=1+i.length*Cartesian2.packedLength,this.packedLength=t+Ellipsoid.packedLength+2}PolylineVolumeGeometry.createGeometry=function(e){var t=arrayRemoveDuplicates(e._positions,Cartesian3.equalsEpsilon),i=e._shape;i=PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(i);if(!(t.length<2||i.length<3)){PolygonPipeline.computeWindingOrder2D(i)===WindingOrder$1.CLOCKWISE&&i.reverse();var r=BoundingRectangle.fromPoints(i,brScratch);return computeAttributes$1(PolylineVolumeGeometryLibrary.computePositions(t,i,r,e,!0),i,r,e._vertexFormat)}},PolylineVolumeOutlineGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._shape;a=o.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian2.packedLength)Cartesian2.pack(o[r],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var scratchEllipsoid$9=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$h={polylinePositions:void 0,shapePositions:void 0,ellipsoid:scratchEllipsoid$9,height:void 0,cornerType:void 0,granularity:void 0};PolylineVolumeOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);r=e[t++];var o=new Array(r);for(a=0;a<r;++a,t+=Cartesian2.packedLength)o[a]=Cartesian2.unpack(e,t);var s=Ellipsoid.unpack(e,t,scratchEllipsoid$9);t+=Ellipsoid.packedLength;var l=e[t++],c=e[t];return defined(i)?(i._positions=n,i._shape=o,i._ellipsoid=Ellipsoid.clone(s,i._ellipsoid),i._cornerType=l,i._granularity=c,i):(scratchOptions$h.polylinePositions=n,scratchOptions$h.shapePositions=o,scratchOptions$h.cornerType=l,scratchOptions$h.granularity=c,new PolylineVolumeOutlineGeometry(scratchOptions$h))};var brScratch$1=new BoundingRectangle;function Proxy(){DeveloperError.throwInstantiationError()}function createEvaluateFunction$1(e){var t=e.points,i=e.times;return function(r,n){defined(n)||(n=new Quaternion);var a=e._lastTimeIndex=e.findTimeInterval(r,e._lastTimeIndex),o=(r-i[a])/(i[a+1]-i[a]);r=t[a],a=t[a+1];return Quaternion.fastSlerp(r,a,o,n)}}function QuaternionSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).points;e=e.times;this._times=e,this._points=t,this._evaluateFunction=createEvaluateFunction$1(this),this._lastTimeIndex=0}function quickselect(e,t,i,r,n){quickselectStep(e,t,i||0,r||e.length-1,n||defaultCompare)}function quickselectStep(e,t,i,r,n){for(;i<r;){var a,o,s,l;600<r-i&&(a=r-i+1,o=t-i+1,l=Math.log(a),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(a-s)/a)*(o-a/2<0?-1:1),quickselectStep(e,t,Math.max(i,Math.floor(t-o*s/a+l)),Math.min(r,Math.floor(t+(a-o)*s/a+l)),n));var c=e[t],u=i,d=r;for(swap$1(e,i,t),0<n(e[r],c)&&swap$1(e,i,r);u<d;){for(swap$1(e,u,d),u++,d--;n(e[u],c)<0;)u++;for(;0<n(e[d],c);)d--}0===n(e[i],c)?swap$1(e,i,d):swap$1(e,++d,r),d<=t&&(i=d+1),t<=d&&(r=d-1)}}function swap$1(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function defaultCompare(e,t){return e<t?-1:t<e?1:0}function RBush(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function findItem(e,t,i){if(!i)return t.indexOf(e);for(var r=0;r<t.length;r++)if(i(e,t[r]))return r;return-1}function calcBBox(e,t){distBBox(e,0,e.children.length,t,e)}function distBBox(e,t,i,r,n){(n=n||createNode(null)).minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var a=t;a<i;a++){var o=e.children[a];extend(n,e.leaf?r(o):o)}return n}function extend(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function compareNodeMinX(e,t){return e.minX-t.minX}function compareNodeMinY(e,t){return e.minY-t.minY}function bboxArea(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function bboxMargin(e){return e.maxX-e.minX+(e.maxY-e.minY)}function enlargedArea(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function intersectionArea(e,t){var i=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX);t=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,t-r)}function contains(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function intersects$1(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function createNode(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(e,t,i,r,n){for(var a,o=[t,i];o.length;)(i=o.pop())-(t=o.pop())<=r||(quickselect(e,a=t+Math.ceil((i-t)/r/2)*r,t,i,n),o.push(t,a,a,i))}function RectangleCollisionChecker(){this._tree=new RBush}function RectangleWithId(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}function idCompare(e,t){return e.id===t.id}PolylineVolumeOutlineGeometry.createGeometry=function(e){var t=arrayRemoveDuplicates(e._positions,Cartesian3.equalsEpsilon),i=e._shape;i=PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(i);if(!(t.length<2||i.length<3)){PolygonPipeline.computeWindingOrder2D(i)===WindingOrder$1.CLOCKWISE&&i.reverse();var r=BoundingRectangle.fromPoints(i,brScratch$1);return computeAttributes$2(PolylineVolumeGeometryLibrary.computePositions(t,i,r,e,!1),i)}},Proxy.prototype.getURL=DeveloperError.throwInstantiationError,Object.defineProperties(QuaternionSpline.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),QuaternionSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,QuaternionSpline.prototype.wrapTime=Spline.prototype.wrapTime,QuaternionSpline.prototype.clampTime=Spline.prototype.clampTime,QuaternionSpline.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},RBush.prototype.all=function(){return this._all(this.data,[])},RBush.prototype.search=function(e){var t=this.data,i=[];if(!intersects$1(e,t))return i;for(var r=this.toBBox,n=[];t;){for(var a=0;a<t.children.length;a++){var o=t.children[a],s=t.leaf?r(o):o;intersects$1(e,s)&&(t.leaf?i.push(o):contains(e,s)?this._all(o,i):n.push(o))}t=n.pop()}return i},RBush.prototype.collides=function(e){var t=this.data;if(!intersects$1(e,t))return!1;for(var i=[];t;){for(var r=0;r<t.children.length;r++){var n=t.children[r],a=t.leaf?this.toBBox(n):n;if(intersects$1(e,a)){if(t.leaf||contains(e,a))return!0;i.push(n)}}t=i.pop()}return!1},RBush.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var i,r=this._build(e.slice(),0,e.length-1,0);return this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(i=this.data,this.data=r,r=i),this._insert(r,this.data.height-r.height-1,!0)):this.data=r,this},RBush.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},RBush.prototype.clear=function(){return this.data=createNode([]),this},RBush.prototype.remove=function(e,t){if(!e)return this;for(var i,r,n,a=this.data,o=this.toBBox(e),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],i=l.pop(),n=!0),a.leaf){var c=findItem(e,a.children,t);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}n||a.leaf||!contains(a,o)?r?(i++,a=r.children[i],n=!1):a=null:(s.push(a),l.push(i),i=0,a=(r=a).children[0])}return this},RBush.prototype.toBBox=function(e){return e},RBush.prototype.compareMinX=function(e,t){return e.minX-t.minX},RBush.prototype.compareMinY=function(e,t){return e.minY-t.minY},RBush.prototype.toJSON=function(){return this.data},RBush.prototype.fromJSON=function(e){return this.data=e,this},RBush.prototype._all=function(e,t){for(var i=[];e;)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},RBush.prototype._build=function(e,t,i,r){var n,a=i-t+1,o=this._maxEntries;if(a<=o)return calcBBox(n=createNode(e.slice(t,i+1)),this.toBBox),n;r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(n=createNode([])).leaf=!1,n.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));multiSelect(e,t,i,l,this.compareMinX);for(var c=t;c<=i;c+=l){var u=Math.min(c+l-1,i);multiSelect(e,c,u,s,this.compareMinY);for(var d=c;d<=u;d+=s){var h=Math.min(d+s-1,u);n.children.push(this._build(e,d,h,r-1))}}return calcBBox(n,this.toBBox),n},RBush.prototype._chooseSubtree=function(e,t,i,r){for(;r.push(t),!t.leaf&&r.length-1!==i;){for(var n=1/0,a=1/0,o=void 0,s=0;s<t.children.length;s++){var l=t.children[s],c=bboxArea(l),u=enlargedArea(e,l)-c;u<a?(a=u,n=c<n?c:n,o=l):u===a&&c<n&&(n=c,o=l)}t=o||t.children[0]}return t},RBush.prototype._insert=function(e,t,i){var r=i?e:this.toBBox(e),n=[];for((i=this._chooseSubtree(r,this.data,t,n)).children.push(e),extend(i,r);0<=t&&n[t].children.length>this._maxEntries;)this._split(n,t),t--;this._adjustParentBBoxes(r,n,t)},RBush.prototype._split=function(e,t){var i=e[t],r=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,r),r=this._chooseSplitIndex(i,n,r),(r=createNode(i.children.splice(r,i.children.length-r))).height=i.height,r.leaf=i.leaf,calcBBox(i,this.toBBox),calcBBox(r,this.toBBox),t?e[t-1].children.push(r):this._splitRoot(i,r)},RBush.prototype._splitRoot=function(e,t){this.data=createNode([e,t]),this.data.height=e.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)},RBush.prototype._chooseSplitIndex=function(e,t,i){for(var r,n=1/0,a=1/0,o=t;o<=i-t;o++){var s=distBBox(e,0,o,this.toBBox),l=intersectionArea(s,c=distBBox(e,o,i,this.toBBox)),c=bboxArea(s)+bboxArea(c);l<n?(n=l,r=o,a=c<a?c:a):l===n&&c<a&&(a=c,r=o)}return r||i-t},RBush.prototype._chooseSplitAxis=function(e,t,i){var r=e.leaf?this.compareMinX:compareNodeMinX,n=e.leaf?this.compareMinY:compareNodeMinY;this._allDistMargin(e,t,i,r)<this._allDistMargin(e,t,i,n)&&e.children.sort(r)},RBush.prototype._allDistMargin=function(e,t,i,r){e.children.sort(r);for(var n=this.toBBox,a=distBBox(e,0,t,n),o=distBBox(e,i-t,i,n),s=bboxMargin(a)+bboxMargin(o),l=t;l<i-t;l++){var c=e.children[l];extend(a,e.leaf?n(c):c),s+=bboxMargin(a)}for(var u=i-t-1;t<=u;u--){var d=e.children[u];extend(o,e.leaf?n(d):d),s+=bboxMargin(o)}return s},RBush.prototype._adjustParentBBoxes=function(e,t,i){for(var r=i;0<=r;r--)extend(t[r],e)},RBush.prototype._condense=function(e){for(var t=e.length-1,i=void 0;0<=t;t--)0===e[t].children.length?0<t?(i=e[t-1].children).splice(i.indexOf(e[t]),1):this.clear():calcBBox(e[t],this.toBBox)},RectangleWithId.fromRectangleAndId=function(e,t,i){return i.minX=t.west,i.minY=t.south,i.maxX=t.east,i.maxY=t.north,i.id=e,i},RectangleCollisionChecker.prototype.insert=function(e,t){t=RectangleWithId.fromRectangleAndId(e,t,new RectangleWithId),this._tree.insert(t)};var removalScratch=new RectangleWithId;RectangleCollisionChecker.prototype.remove=function(e,t){t=RectangleWithId.fromRectangleAndId(e,t,removalScratch),this._tree.remove(t,idCompare)};var collisionScratch=new RectangleWithId;RectangleCollisionChecker.prototype.collides=function(e){return e=RectangleWithId.fromRectangleAndId("",e,collisionScratch),this._tree.collides(e)};var cos$2=Math.cos,sin$2=Math.sin,sqrt=Math.sqrt,RectangleGeometryLibrary={computePosition:function(e,t,i,r,n,a,o){var s=t.radiiSquared,l=e.nwCorner,c=e.boundingRectangle,u=l.latitude-e.granYCos*r+n*e.granXSin,d=cos$2(u),h=sin$2(u),p=s.z*h,f=l.longitude+r*e.granYSin+n*e.granXCos;t=d*cos$2(f),l=d*sin$2(f),d=s.x*t,s=s.y*l,h=sqrt(d*t+s*l+p*h);a.x=d/h,a.y=s/h,a.z=p/h,i&&(defined(i=e.stNwCorner)?(u=i.latitude-e.stGranYCos*r+n*e.stGranXSin,f=i.longitude+r*e.stGranYSin+n*e.stGranXCos,o.x=(f-e.stWest)*e.lonScalar,o.y=(u-e.stSouth)*e.latScalar):(o.x=(f-c.west)*e.lonScalar,o.y=(u-c.south)*e.latScalar))}},rotationMatrixScratch=new Matrix2,nwCartesian=new Cartesian3,centerScratch$2=new Cartographic,centerCartesian=new Cartesian3,proj=new GeographicProjection;function getRotationOptions(e,t,i,r,n,a,o){var s=Math.cos(t),l=r*s,c=i*s,u=Math.sin(t),d=r*u,h=i*u;return nwCartesian=proj.project(e,nwCartesian),nwCartesian=Cartesian3.subtract(nwCartesian,centerCartesian,nwCartesian),s=Matrix2.fromRotation(t,rotationMatrixScratch),nwCartesian=Matrix2.multiplyByVector(s,nwCartesian,nwCartesian),nwCartesian=Cartesian3.add(nwCartesian,centerCartesian,nwCartesian),--a,--o,i=(r=(e=proj.unproject(nwCartesian,e)).latitude)+a*h,u=r-l*o,t=r-l*o+a*h,s=Math.max(r,i,u,t),r=Math.min(r,i,u,t),u=(i=e.longitude)+a*c,t=i+o*d,a=i+o*d+a*c,{north:s,south:r,east:Math.max(i,u,t,a),west:Math.min(i,u,t,a),granYCos:l,granYSin:d,granXCos:c,granXSin:h,nwCorner:e}}RectangleGeometryLibrary.computeOptions=function(e,t,i,r,n,a,o){var s=e.east,l=e.west,c=e.north,u=e.south,d=!1,h=!1;c===CesiumMath.PI_OVER_TWO&&(d=!0),u===-CesiumMath.PI_OVER_TWO&&(h=!0);var p,f=c-u,m=(y=s<l?CesiumMath.TWO_PI-l+s:s-l)/((p=Math.ceil(y/t)+1)-1),g=f/((_=Math.ceil(f/t)+1)-1),y=Rectangle.northwest(e,a);f=Rectangle.center(e,centerScratch$2);0===i&&0===r||(f.longitude<y.longitude&&(f.longitude+=CesiumMath.TWO_PI),centerCartesian=proj.project(f,centerCartesian));var _;h={granYCos:t=g,granYSin:0,granXCos:a=m,granXSin:0,nwCorner:y,boundingRectangle:n=Rectangle.clone(e,n),width:p,height:_,northCap:d,southCap:h};return 0!==i&&(c=(y=getRotationOptions(y,i,m,g,f,p,_)).north,u=y.south,s=y.east,l=y.west,h.granYCos=y.granYCos,h.granYSin=y.granYSin,h.granXCos=y.granXCos,h.granXSin=y.granXSin,n.north=c,n.south=u,n.east=s,n.west=l),0!==r&&(i-=r,_=getRotationOptions(o=Rectangle.northwest(n,o),i,m,g,f,p,_),h.stGranYCos=_.granYCos,h.stGranXCos=_.granXCos,h.stGranYSin=_.granYSin,h.stGranXSin=_.granXSin,h.stNwCorner=o,h.stWest=_.west,h.stSouth=_.south),h};var positionScratch$2=new Cartesian3,normalScratch$3=new Cartesian3,tangentScratch$1=new Cartesian3,bitangentScratch$1=new Cartesian3,rectangleScratch$2=new Rectangle,stScratch$1=new Cartesian2,bottomBoundingSphere$2=new BoundingSphere,topBoundingSphere$2=new BoundingSphere;function createAttributes(e,t){var i=new Geometry({attributes:new GeometryAttributes,primitiveType:PrimitiveType$1.TRIANGLES});return i.attributes.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(i.attributes.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:t.bitangents})),i}function calculateAttributes(e,t,i,r){var n=e.length,a=t.normal?new Float32Array(n):void 0,o=t.tangent?new Float32Array(n):void 0,s=t.bitangent?new Float32Array(n):void 0,l=0,c=bitangentScratch$1,u=tangentScratch$1,d=normalScratch$3;if(t.normal||t.tangent||t.bitangent)for(var h=0;h<n;h+=3){var p=Cartesian3.fromArray(e,h,positionScratch$2),f=l+1,m=l+2;d=i.geodeticSurfaceNormal(p,d);(t.tangent||t.bitangent)&&(Cartesian3.cross(Cartesian3.UNIT_Z,d,u),Matrix3.multiplyByVector(r,u,u),Cartesian3.normalize(u,u),t.bitangent&&Cartesian3.normalize(Cartesian3.cross(d,u,c),c)),t.normal&&(a[l]=d.x,a[f]=d.y,a[m]=d.z),t.tangent&&(o[l]=u.x,o[f]=u.y,o[m]=u.z),t.bitangent&&(s[l]=c.x,s[f]=c.y,s[m]=c.z),l+=3}return createAttributes(t,{positions:e,normals:a,tangents:o,bitangents:s})}var v1Scratch=new Cartesian3,v2Scratch=new Cartesian3;function calculateAttributesWall(e,t,i){var r=e.length,n=t.normal?new Float32Array(r):void 0,a=t.tangent?new Float32Array(r):void 0,o=t.bitangent?new Float32Array(r):void 0,s=0,l=0,c=0,u=!0,d=bitangentScratch$1,h=tangentScratch$1,p=normalScratch$3;if(t.normal||t.tangent||t.bitangent)for(var f=0;f<r;f+=6){var m,g=Cartesian3.fromArray(e,f,positionScratch$2),y=Cartesian3.fromArray(e,(f+6)%r,v1Scratch);u&&(m=Cartesian3.fromArray(e,(f+3)%r,v2Scratch),Cartesian3.subtract(y,g,y),Cartesian3.subtract(m,g,m),p=Cartesian3.normalize(Cartesian3.cross(m,y,p),p),u=!1),Cartesian3.equalsEpsilon(y,g,CesiumMath.EPSILON10)&&(u=!0),(t.tangent||t.bitangent)&&(d=i.geodeticSurfaceNormal(g,d),t.tangent&&(h=Cartesian3.normalize(Cartesian3.cross(d,p,h),h))),t.normal&&(n[s++]=p.x,n[s++]=p.y,n[s++]=p.z,n[s++]=p.x,n[s++]=p.y,n[s++]=p.z),t.tangent&&(a[l++]=h.x,a[l++]=h.y,a[l++]=h.z,a[l++]=h.x,a[l++]=h.y,a[l++]=h.z),t.bitangent&&(o[c++]=d.x,o[c++]=d.y,o[c++]=d.z,o[c++]=d.x,o[c++]=d.y,o[c++]=d.z)}return createAttributes(t,{positions:e,normals:n,tangents:a,bitangents:o})}function constructRectangle(e,t){var i=e._vertexFormat,r=e._ellipsoid,n=t.height,a=t.width,o=t.northCap,s=t.southCap,l=0,c=n,u=n;e=0;o&&(--u,e+=l=1),s&&(--c,--u,e+=1),e+=a*u;for(var d=i.position?new Float64Array(3*e):void 0,h=i.st?new Float32Array(2*e):void 0,p=0,f=0,m=positionScratch$2,g=stScratch$1,y=Number.MAX_VALUE,_=Number.MAX_VALUE,v=-Number.MAX_VALUE,C=-Number.MAX_VALUE,x=l;x<c;++x)for(var b=0;b<a;++b)RectangleGeometryLibrary.computePosition(t,r,i.st,x,b,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(h[f++]=g.x,h[f++]=g.y,y=Math.min(y,g.x),_=Math.min(_,g.y),v=Math.max(v,g.x),C=Math.max(C,g.y));if(o&&(RectangleGeometryLibrary.computePosition(t,r,i.st,0,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p++]=m.z,i.st&&(h[f++]=g.x,h[f++]=g.y,y=g.x,_=g.y,v=g.x,C=g.y)),s&&(RectangleGeometryLibrary.computePosition(t,r,i.st,n-1,0,m,g),d[p++]=m.x,d[p++]=m.y,d[p]=m.z,i.st&&(h[f++]=g.x,h[f]=g.y,y=Math.min(y,g.x),_=Math.min(_,g.y),v=Math.max(v,g.x),C=Math.max(C,g.y))),i.st&&(y<0||_<0||1<v||1<C))for(var S=0;S<h.length;S+=2)h[S]=(h[S]-y)/(v-y),h[S+1]=(h[S+1]-_)/(C-_);l=calculateAttributes(d,i,r,t.tangentRotationMatrix),n=6*(a-1)*(u-1),o&&(n+=3*(a-1)),s&&(n+=3*(a-1));for(var T=IndexDatatype$1.createTypedArray(e,n),E=0,w=0,A=0;A<u-1;++A){for(var P=0;P<a-1;++P){var D=E+a,M=D+1,I=E+1;T[w++]=E,T[w++]=D,T[w++]=I,T[w++]=I,T[w++]=D,T[w++]=M,++E}++E}if(o||s){var R,O,L=e-1,N=e-1;if(o&&s&&(L=e-2),E=0,o)for(A=0;A<a-1;A++)O=(R=E)+1,T[w++]=L,T[w++]=R,T[w++]=O,++E;if(s)for(E=(u-1)*a,A=0;A<a-1;A++)O=(R=E)+1,T[w++]=R,T[w++]=N,T[w++]=O,++E}return l.indices=T,i.st&&(l.attributes.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:h})),l}function addWallPositions$1(e,t,i,r,n){return e[t++]=r[i],e[t++]=r[i+1],e[t++]=r[i+2],e[t++]=n[i],e[t++]=n[i+1],e[t]=n[i+2],e}function addWallTextureCoordinates(e,t,i,r){return e[t++]=r[i],e[t++]=r[i+1],e[t++]=r[i],e[t]=r[i+1],e}var scratchVertexFormat$b=new VertexFormat;function constructExtrudedRectangle(e,t){var i=e._shadowVolume,r=e._offsetAttribute,n=e._vertexFormat,a=e._extrudedHeight,o=e._surfaceHeight,s=e._ellipsoid,l=t.height,c=t.width;i&&((y=VertexFormat.clone(n,scratchVertexFormat$b)).normal=!0,e._vertexFormat=y);var u=constructRectangle(e,t);i&&(e._vertexFormat=n);var d=PolygonPipeline.scaleToGeodeticHeight(u.attributes.position.values,o,s,!1),h=2*(U=(d=new Float64Array(d)).length),p=new Float64Array(h);p.set(d);var f=PolygonPipeline.scaleToGeodeticHeight(u.attributes.position.values,a,s);p.set(f,U),u.attributes.position.values=p;var m,g,y=n.normal?new Float32Array(h):void 0;e=n.tangent?new Float32Array(h):void 0,o=n.bitangent?new Float32Array(h):void 0,a=n.st?new Float32Array(h/3*2):void 0;if(n.normal){for(g=u.attributes.normal.values,y.set(g),v=0;v<U;v++)g[v]=-g[v];y.set(g,U),u.attributes.normal.values=y}if(i){g=u.attributes.normal.values,n.normal||(u.attributes.normal=void 0);for(var _=new Float32Array(h),v=0;v<U;v++)g[v]=-g[v];_.set(g,U),u.attributes.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:_})}if((p=defined(r))&&(y=U/3*2,_=new Uint8Array(y),_=r===GeometryOffsetAttribute$1.TOP?arrayFill(_,1,0,y/2):arrayFill(_,r===GeometryOffsetAttribute$1.NONE?0:1),u.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})),n.tangent){var C=u.attributes.tangent.values;for(e.set(C),v=0;v<U;v++)C[v]=-C[v];e.set(C,U),u.attributes.tangent.values=e}n.bitangent&&(E=u.attributes.bitangent.values,o.set(E),o.set(E,U),u.attributes.bitangent.values=o),n.st&&(m=u.attributes.st.values,a.set(m),a.set(m,U/3*2),u.attributes.st.values=a);var x=u.indices,b=x.length,S=U/3,T=IndexDatatype$1.createTypedArray(h/3,2*b);for(T.set(x),v=0;v<b;v+=3)T[v+b]=x[v+2]+S,T[v+1+b]=x[v+1]+S,T[v+2+b]=x[v]+S;u.indices=T;e=t.northCap;var E=t.southCap;o=l,a=2,h=0,t=4,l=4;e&&(--a,--o,h+=1,t-=2,--l),E&&(--a,--o,h+=1,t-=2,--l);l=2*((h+=a*c+2*o-t)+l);var w=new Float64Array(3*l),A=i?new Float32Array(3*l):void 0,P=p?new Uint8Array(l):void 0,D=n.st?new Float32Array(2*l):void 0,M=r===GeometryOffsetAttribute$1.TOP;p&&!M&&(P=arrayFill(P,r===GeometryOffsetAttribute$1.ALL?1:0));var I=0,R=0,O=0,L=0,N=c*o;for(v=0;v<N;v+=c)w=addWallPositions$1(w,I,B=3*v,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*v,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1);if(E){var F=e?1+N:N,B=3*F;for(v=0;v<2;v++)w=addWallPositions$1(w,I,B,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*F,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1)}else for(v=N-c;v<N;v++)w=addWallPositions$1(w,I,B=3*v,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*v,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1);for(v=N-1;0<v;v-=c)w=addWallPositions$1(w,I,B=3*v,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*v,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1);if(e){var V=N;for(B=3*V,v=0;v<2;v++)w=addWallPositions$1(w,I,B,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*V,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1)}else for(v=c-1;0<=v;v--)w=addWallPositions$1(w,I,B=3*v,d,f),I+=6,n.st&&(D=addWallTextureCoordinates(D,R,2*v,m),R+=4),i&&(O+=3,A[O++]=g[B],A[O++]=g[B+1],A[O++]=g[B+2]),M&&(P[L++]=1,L+=1);s=calculateAttributesWall(w,n,s),n.st&&(s.attributes.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:D})),i&&(s.attributes.extrudeDirection=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:A})),p&&(s.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:P}));var k,z,G=IndexDatatype$1.createTypedArray(l,6*h),U=w.length/3,$=0;for(v=0;v<U-1;v+=2){z=((k=v)+2)%U;var H=Cartesian3.fromArray(w,3*k,v1Scratch),W=Cartesian3.fromArray(w,3*z,v2Scratch);Cartesian3.equalsEpsilon(H,W,CesiumMath.EPSILON10)||(W=(2+(H=(k+1)%U))%U,G[$++]=k,G[$++]=H,G[$++]=z,G[$++]=z,G[$++]=H,G[$++]=W)}return s.indices=G,(s=GeometryPipeline.combineInstances([new GeometryInstance({geometry:u}),new GeometryInstance({geometry:s})]))[0]}var scratchRectanglePoints=[new Cartesian3,new Cartesian3,new Cartesian3,new Cartesian3],nwScratch=new Cartographic,stNwScratch=new Cartographic;function computeRectangle$3(e,t,i,r,n){if(0===i)return Rectangle.clone(e,n);var a=RectangleGeometryLibrary.computeOptions(e,t,i,0,rectangleScratch$2,nwScratch);e=a.height,t=a.width,i=scratchRectanglePoints;return RectangleGeometryLibrary.computePosition(a,r,!1,0,0,i[0]),RectangleGeometryLibrary.computePosition(a,r,!1,0,t-1,i[1]),RectangleGeometryLibrary.computePosition(a,r,!1,e-1,0,i[2]),RectangleGeometryLibrary.computePosition(a,r,!1,e-1,t-1,i[3]),Rectangle.fromCartesianArray(i,r,n)}function RectangleGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).rectangle,i=defaultValue(e.height,0),r=defaultValue(e.extrudedHeight,i);this._rectangle=Rectangle.clone(t),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=Ellipsoid.clone(defaultValue(e.ellipsoid,Ellipsoid.WGS84)),this._surfaceHeight=Math.max(i,r),this._rotation=defaultValue(e.rotation,0),this._stRotation=defaultValue(e.stRotation,0),this._vertexFormat=VertexFormat.clone(defaultValue(e.vertexFormat,VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(i,r),this._shadowVolume=defaultValue(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}RectangleGeometry.packedLength=Rectangle.packedLength+Ellipsoid.packedLength+VertexFormat.packedLength+7,RectangleGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Rectangle.pack(e._rectangle,t,i),i+=Rectangle.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),i+=VertexFormat.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._extrudedHeight,t[i++]=e._shadowVolume?1:0,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchRectangle=new Rectangle,scratchEllipsoid$a=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$i={rectangle:scratchRectangle,ellipsoid:scratchEllipsoid$a,vertexFormat:scratchVertexFormat$b,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};RectangleGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Rectangle.unpack(e,t,scratchRectangle);t+=Rectangle.packedLength;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$a);t+=Ellipsoid.packedLength;var a=VertexFormat.unpack(e,t,scratchVertexFormat$b);t+=VertexFormat.packedLength;var o=e[t++],s=e[t++],l=e[t++],c=e[t++],u=e[t++],d=1===e[t++];t=e[t];return defined(i)?(i._rectangle=Rectangle.clone(r,i._rectangle),i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._vertexFormat=VertexFormat.clone(a,i._vertexFormat),i._granularity=o,i._surfaceHeight=s,i._rotation=l,i._stRotation=c,i._extrudedHeight=u,i._shadowVolume=d,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$i.granularity=o,scratchOptions$i.height=s,scratchOptions$i.rotation=l,scratchOptions$i.stRotation=c,scratchOptions$i.extrudedHeight=u,scratchOptions$i.shadowVolume=d,scratchOptions$i.offsetAttribute=-1===t?void 0:t,new RectangleGeometry(scratchOptions$i))},RectangleGeometry.computeRectangle=function(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).rectangle,r=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),n=defaultValue(e.ellipsoid,Ellipsoid.WGS84);return computeRectangle$3(i,r,defaultValue(e.rotation,0),n,t)};var tangentRotationMatrixScratch=new Matrix3,quaternionScratch$3=new Quaternion,centerScratch$3=new Cartographic;RectangleGeometry.createGeometry=function(e){if(!CesiumMath.equalsEpsilon(e._rectangle.north,e._rectangle.south,CesiumMath.EPSILON10)&&!CesiumMath.equalsEpsilon(e._rectangle.east,e._rectangle.west,CesiumMath.EPSILON10)){var t=e._rectangle,i=e._ellipsoid,r=e._rotation,n=e._stRotation,a=e._vertexFormat,o=RectangleGeometryLibrary.computeOptions(t,e._granularity,r,n,rectangleScratch$2,nwScratch,stNwScratch),s=tangentRotationMatrixScratch;0!==n||0!==r?(c=Rectangle.center(t,centerScratch$3),u=i.geodeticSurfaceNormalCartographic(c,v1Scratch),Quaternion.fromAxisAngle(u,-n,quaternionScratch$3),Matrix3.fromQuaternion(quaternionScratch$3,s)):Matrix3.clone(Matrix3.IDENTITY,s);var l,c=e._surfaceHeight,u=e._extrudedHeight;n=!CesiumMath.equalsEpsilon(c,u,0,CesiumMath.EPSILON2);return o.lonScalar=1/e._rectangle.width,o.latScalar=1/e._rectangle.height,o.tangentRotationMatrix=s,t=e._rectangle,c=n?(l=constructExtrudedRectangle(e,o),n=BoundingSphere.fromRectangle3D(t,i,c,topBoundingSphere$2),u=BoundingSphere.fromRectangle3D(t,i,u,bottomBoundingSphere$2),BoundingSphere.union(n,u)):((l=constructRectangle(e,o)).attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,c,i,!1),defined(e._offsetAttribute)&&(o=l.attributes.position.values.length,arrayFill(o=new Uint8Array(o/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),l.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})),BoundingSphere.fromRectangle3D(t,i,c)),a.position||delete l.attributes.position,new Geometry({attributes:l.attributes,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:c,offsetAttribute:e._offsetAttribute})}},RectangleGeometry.createShadowVolume=function(e,t,i){var r=e._granularity,n=e._ellipsoid;t=t(r,n),i=i(r,n);return new RectangleGeometry({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:n,stRotation:e._stRotation,granularity:r,extrudedHeight:i,height:t,vertexFormat:VertexFormat.POSITION_ONLY,shadowVolume:!0})};var unrotatedTextureRectangleScratch=new Rectangle,points2DScratch$1=[new Cartesian2,new Cartesian2,new Cartesian2],rotation2DScratch$1=new Matrix2,rectangleCenterScratch$1=new Cartographic;function textureCoordinateRotationPoints$2(e){if(0===e._stRotation)return[0,0,0,1,1,0];var t=Rectangle.clone(e._rectangle,unrotatedTextureRectangleScratch),i=e._granularity,r=e._ellipsoid,n=(t=computeRectangle$3(t,i,e._rotation-e._stRotation,r,unrotatedTextureRectangleScratch),points2DScratch$1);n[0].x=t.west,n[0].y=t.south,n[1].x=t.west,n[1].y=t.north,n[2].x=t.east,n[2].y=t.south;for(var a=e.rectangle,o=Matrix2.fromRotation(e._stRotation,rotation2DScratch$1),s=Rectangle.center(a,rectangleCenterScratch$1),l=0;l<3;++l){var c=n[l];c.x-=s.longitude,c.y-=s.latitude,Matrix2.multiplyByVector(o,c,c),c.x+=s.longitude,c.y+=s.latitude,c.x=(c.x-a.west)/a.width,c.y=(c.y-a.south)/a.height}return i=n[0],r=n[1],t=n[2],e=new Array(6),Cartesian2.pack(i,e),Cartesian2.pack(r,e,2),Cartesian2.pack(t,e,4),e}Object.defineProperties(RectangleGeometry.prototype,{rectangle:{get:function(){return defined(this._rotatedRectangle)||(this._rotatedRectangle=computeRectangle$3(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=textureCoordinateRotationPoints$2(this)),this._textureCoordinateRotationPoints}}});var bottomBoundingSphere$3=new BoundingSphere,topBoundingSphere$3=new BoundingSphere,positionScratch$3=new Cartesian3,rectangleScratch$3=new Rectangle;function constructRectangle$1(e,t){var i=e._ellipsoid,r=t.height,n=t.width,a=t.northCap,o=r,s=2,l=0;e=4;a&&(--s,--o,l+=1,e-=2),(f=t.southCap)&&(--s,--o,l+=1,e-=2),l+=s*n+2*o-e;var c,u=new Float64Array(3*l),d=0,h=0,p=positionScratch$3;if(a)RectangleGeometryLibrary.computePosition(t,i,!1,h,0,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;else for(c=0;c<n;c++)RectangleGeometryLibrary.computePosition(t,i,!1,h,c,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;for(c=n-1,h=1;h<r;h++)RectangleGeometryLibrary.computePosition(t,i,!1,h,c,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;if(h=r-1,!f)for(c=n-2;0<=c;c--)RectangleGeometryLibrary.computePosition(t,i,!1,h,c,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;for(c=0,h=r-2;0<h;h--)RectangleGeometryLibrary.computePosition(t,i,!1,h,c,p),u[d++]=p.x,u[d++]=p.y,u[d++]=p.z;for(var f=u.length/3*2,m=IndexDatatype$1.createTypedArray(u.length/3,f),g=0,y=0;y<u.length/3-1;y++)m[g++]=y,m[g++]=y+1;return m[g++]=u.length/3-1,m[g++]=0,(f=new Geometry({attributes:new GeometryAttributes,primitiveType:PrimitiveType$1.LINES})).attributes.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:u}),f.indices=m,f}function constructExtrudedRectangle$1(e,t){var i=e._surfaceHeight,r=e._extrudedHeight,n=e._ellipsoid,a=r,o=i,s=constructRectangle$1(e,t),l=(r=t.height,i=t.width,(e=PolygonPipeline.scaleToGeodeticHeight(s.attributes.position.values,o,n,!1)).length);(o=new Float64Array(2*l)).set(e),a=PolygonPipeline.scaleToGeodeticHeight(s.attributes.position.values,a,n),o.set(a,l),s.attributes.position.values=o,n=t.northCap,a=t.southCap,t=4,n&&--t,a&&--t;t=2*(o.length/3+t);for(var c=IndexDatatype$1.createTypedArray(o.length/3,t),u=(l=o.length/6,0),d=0;d<l-1;d++)c[u++]=d,c[u++]=d+1,c[u++]=d+l,c[u++]=d+l+1;return c[u++]=l-1,c[u++]=0,c[u++]=l+l-1,c[u++]=l,c[u++]=0,c[u++]=l,r=n?r-1:(n=i-1,c[u++]=n,c[u++]=n+l,i+r-2),c[u++]=r,c[u++]=r+l,a||(r=i+r-1,c[u++]=r,c[u]=r+l),s.indices=c,s}function RectangleOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).rectangle,i=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),r=defaultValue(e.ellipsoid,Ellipsoid.WGS84),n=defaultValue(e.rotation,0),a=defaultValue(e.height,0),o=defaultValue(e.extrudedHeight,a);this._rectangle=Rectangle.clone(t),this._granularity=i,this._ellipsoid=r,this._surfaceHeight=Math.max(a,o),this._rotation=n,this._extrudedHeight=Math.min(a,o),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}RectangleOutlineGeometry.packedLength=Rectangle.packedLength+Ellipsoid.packedLength+5,RectangleOutlineGeometry.pack=function(e,t,i){return i=defaultValue(i,0),Rectangle.pack(e._rectangle,t,i),i+=Rectangle.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._extrudedHeight,t[i]=defaultValue(e._offsetAttribute,-1),t};var scratchRectangle$1=new Rectangle,scratchEllipsoid$b=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$j={rectangle:scratchRectangle$1,ellipsoid:scratchEllipsoid$b,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};RectangleOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);var r=Rectangle.unpack(e,t,scratchRectangle$1);t+=Rectangle.packedLength;var n=Ellipsoid.unpack(e,t,scratchEllipsoid$b);t+=Ellipsoid.packedLength;var a=e[t++],o=e[t++],s=e[t++],l=e[t++];t=e[t];return defined(i)?(i._rectangle=Rectangle.clone(r,i._rectangle),i._ellipsoid=Ellipsoid.clone(n,i._ellipsoid),i._surfaceHeight=o,i._rotation=s,i._extrudedHeight=l,i._offsetAttribute=-1===t?void 0:t,i):(scratchOptions$j.granularity=a,scratchOptions$j.height=o,scratchOptions$j.rotation=s,scratchOptions$j.extrudedHeight=l,scratchOptions$j.offsetAttribute=-1===t?void 0:t,new RectangleOutlineGeometry(scratchOptions$j))};var nwScratch$1=new Cartographic;RectangleOutlineGeometry.createGeometry=function(e){var t=e._rectangle,i=e._ellipsoid,r=RectangleGeometryLibrary.computeOptions(t,e._granularity,e._rotation,0,rectangleScratch$3,nwScratch$1);if(!CesiumMath.equalsEpsilon(t.north,t.south,CesiumMath.EPSILON10)&&!CesiumMath.equalsEpsilon(t.east,t.west,CesiumMath.EPSILON10)){var n,a,o,s=e._surfaceHeight,l=e._extrudedHeight;return s=CesiumMath.equalsEpsilon(s,l,0,CesiumMath.EPSILON2)?((a=constructRectangle$1(e,r)).attributes.position.values=PolygonPipeline.scaleToGeodeticHeight(a.attributes.position.values,s,i,!1),defined(e._offsetAttribute)&&(r=a.attributes.position.values.length,arrayFill(r=new Uint8Array(r/3),e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})),BoundingSphere.fromRectangle3D(t,i,s)):(a=constructExtrudedRectangle$1(e,r),defined(e._offsetAttribute)&&(n=a.attributes.position.values.length/3,o=new Uint8Array(n),o=e._offsetAttribute===GeometryOffsetAttribute$1.TOP?arrayFill(o,1,0,n/2):arrayFill(o,e._offsetAttribute===GeometryOffsetAttribute$1.NONE?0:1),a.attributes.applyOffset=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})),o=BoundingSphere.fromRectangle3D(t,i,s,topBoundingSphere$3),l=BoundingSphere.fromRectangle3D(t,i,l,bottomBoundingSphere$3),BoundingSphere.union(o,l)),new Geometry({attributes:a.attributes,indices:a.indices,primitiveType:PrimitiveType$1.LINES,boundingSphere:s,offsetAttribute:e._offsetAttribute})}};var ReferenceFrame={FIXED:0,INERTIAL:1},ReferenceFrame$1=Object.freeze(ReferenceFrame),ScreenSpaceEventType={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},ScreenSpaceEventType$1=Object.freeze(ScreenSpaceEventType);function getPosition$1(e,t,i){return(e=e._element)===document?(i.x=t.clientX,i.y=t.clientY,i):(e=e.getBoundingClientRect(),i.x=t.clientX-e.left,i.y=t.clientY-e.top,i)}function getInputEventKey(e,t){return defined(t)&&(e+="+"+t),e}function getModifier(e){return e.shiftKey?KeyboardEventModifier$1.SHIFT:e.ctrlKey?KeyboardEventModifier$1.CTRL:e.altKey?KeyboardEventModifier$1.ALT:void 0}var MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};function registerListener(e,t,i,r){function n(t){r(e,t)}FeatureDetection.isInternetExplorer()?i.addEventListener(t,n,!1):i.addEventListener(t,n,{capture:!1,passive:!1}),e._removalFunctions.push((function(){i.removeEventListener(t,n,!1)}))}function registerListeners(e){var t=e._element,i=defined(t.disableRootEvents)?t:document;FeatureDetection.supportsPointerEvents()?(registerListener(e,"pointerdown",t,handlePointerDown),registerListener(e,"pointerup",t,handlePointerUp),registerListener(e,"pointermove",t,handlePointerMove),registerListener(e,"pointercancel",t,handlePointerUp)):(registerListener(e,"mousedown",t,handleMouseDown),registerListener(e,"mouseup",i,handleMouseUp),registerListener(e,"mousemove",i,handleMouseMove),registerListener(e,"touchstart",t,handleTouchStart),registerListener(e,"touchend",i,handleTouchEnd),registerListener(e,"touchmove",i,handleTouchMove),registerListener(e,"touchcancel",i,handleTouchEnd)),registerListener(e,"dblclick",t,handleDblClick),registerListener(e,"onwheel"in t?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",t,handleWheel)}function unregisterListeners(e){for(var t=e._removalFunctions,i=0;i<t.length;++i)t[i]()}var mouseDownEvent={position:new Cartesian2};function gotTouchEvent(e){e._lastSeenTouchEvent=getTimestamp$1()}function canProcessMouseEvent(e){return getTimestamp$1()-e._lastSeenTouchEvent>ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds}function checkPixelTolerance(e,t,i){var r=e.x-t.x;t=e.y-t.y;return Math.sqrt(r*r+t*t)<i}function handleMouseDown(e,t){if(canProcessMouseEvent(e)){var i,r=t.button;if(e._buttonDown[r]=!0,r===MouseButton.LEFT)i=ScreenSpaceEventType$1.LEFT_DOWN;else if(r===MouseButton.MIDDLE)i=ScreenSpaceEventType$1.MIDDLE_DOWN;else{if(r!==MouseButton.RIGHT)return;i=ScreenSpaceEventType$1.RIGHT_DOWN}var n=getPosition$1(e,t,e._primaryPosition);Cartesian2.clone(n,e._primaryStartPosition),Cartesian2.clone(n,e._primaryPreviousPosition),r=getModifier(t),defined(r=e.getInputAction(i,r))&&(Cartesian2.clone(n,mouseDownEvent.position),r(mouseDownEvent),t.preventDefault())}}var mouseUpEvent={position:new Cartesian2},mouseClickEvent={position:new Cartesian2};function cancelMouseEvent(e,t,i,r){var n=getModifier(r);t=e.getInputAction(t,n),n=e.getInputAction(i,n);(defined(t)||defined(n))&&(r=getPosition$1(e,r,e._primaryPosition),defined(t)&&(Cartesian2.clone(r,mouseUpEvent.position),t(mouseUpEvent)),defined(n)&&checkPixelTolerance(e._primaryStartPosition,r,e._clickPixelTolerance)&&(Cartesian2.clone(r,mouseClickEvent.position),n(mouseClickEvent)))}function handleMouseUp(e,t){var i;canProcessMouseEvent(e)&&((i=t.button)!==MouseButton.LEFT&&i!==MouseButton.MIDDLE&&i!==MouseButton.RIGHT||(e._buttonDown[MouseButton.LEFT]&&(cancelMouseEvent(e,ScreenSpaceEventType$1.LEFT_UP,ScreenSpaceEventType$1.LEFT_CLICK,t),e._buttonDown[MouseButton.LEFT]=!1),e._buttonDown[MouseButton.MIDDLE]&&(cancelMouseEvent(e,ScreenSpaceEventType$1.MIDDLE_UP,ScreenSpaceEventType$1.MIDDLE_CLICK,t),e._buttonDown[MouseButton.MIDDLE]=!1),e._buttonDown[MouseButton.RIGHT]&&(cancelMouseEvent(e,ScreenSpaceEventType$1.RIGHT_UP,ScreenSpaceEventType$1.RIGHT_CLICK,t),e._buttonDown[MouseButton.RIGHT]=!1)))}var mouseMoveEvent={startPosition:new Cartesian2,endPosition:new Cartesian2};function handleMouseMove(e,t){var i,r,n;canProcessMouseEvent(e)&&(n=getModifier(t),i=getPosition$1(e,t,e._primaryPosition),r=e._primaryPreviousPosition,defined(n=e.getInputAction(ScreenSpaceEventType$1.MOUSE_MOVE,n))&&(Cartesian2.clone(r,mouseMoveEvent.startPosition),Cartesian2.clone(i,mouseMoveEvent.endPosition),n(mouseMoveEvent)),Cartesian2.clone(i,r),(e._buttonDown[MouseButton.LEFT]||e._buttonDown[MouseButton.MIDDLE]||e._buttonDown[MouseButton.RIGHT])&&t.preventDefault())}var mouseDblClickEvent={position:new Cartesian2};function handleDblClick(e,t){var i,r;t.button===MouseButton.LEFT&&(i=ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK,r=getModifier(t),defined(r=e.getInputAction(i,r))&&(getPosition$1(e,t,mouseDblClickEvent.position),r(mouseDblClickEvent)))}function handleWheel(e,t){var i,r;i=defined(t.deltaY)?(r=t.deltaMode)===t.DOM_DELTA_PIXEL?-t.deltaY:r===t.DOM_DELTA_LINE?40*-t.deltaY:120*-t.deltaY:0<t.detail?-120*t.detail:t.wheelDelta,defined(i)&&(r=getModifier(t),defined(r=e.getInputAction(ScreenSpaceEventType$1.WHEEL,r))&&(r(i),t.preventDefault()))}function handleTouchStart(e,t){gotTouchEvent(e);for(var i,r,n=t.changedTouches,a=n.length,o=e._positions,s=0;s<a;++s)r=(i=n[s]).identifier,o.set(r,getPosition$1(e,i,new Cartesian2));fireTouchEvents(e,t);var l=e._previousPositions;for(s=0;s<a;++s)r=(i=n[s]).identifier,l.set(r,Cartesian2.clone(o.get(r)))}function handleTouchEnd(e,t){gotTouchEvent(e);for(var i,r=t.changedTouches,n=r.length,a=e._positions,o=0;o<n;++o)i=r[o].identifier,a.remove(i);fireTouchEvents(e,t);var s=e._previousPositions;for(o=0;o<n;++o)i=r[o].identifier,s.remove(i)}var touchStartEvent={position:new Cartesian2},touch2StartEvent={position1:new Cartesian2,position2:new Cartesian2},touchEndEvent={position:new Cartesian2},touchClickEvent={position:new Cartesian2},touchHoldEvent={position:new Cartesian2};function fireTouchEvents(e,t){var i,r,n,a=getModifier(t),o=e._positions,s=o.length,l=e._isPinching;1!==s&&e._buttonDown[MouseButton.LEFT]&&(e._buttonDown[MouseButton.LEFT]=!1,defined(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),defined(i=e.getInputAction(ScreenSpaceEventType$1.LEFT_UP,a))&&(Cartesian2.clone(e._primaryPosition,touchEndEvent.position),i(touchEndEvent)),0!==s||e._isTouchHolding||defined(r=e.getInputAction(ScreenSpaceEventType$1.LEFT_CLICK,a))&&checkPixelTolerance(e._primaryStartPosition,e._previousPositions.values[0],e._clickPixelTolerance)&&(Cartesian2.clone(e._primaryPosition,touchClickEvent.position),r(touchClickEvent)),e._isTouchHolding=!1),0===s&&l&&(e._isPinching=!1,defined(i=e.getInputAction(ScreenSpaceEventType$1.PINCH_END,a))&&i()),1!==s||l||(n=o.values[0],Cartesian2.clone(n,e._primaryPosition),Cartesian2.clone(n,e._primaryStartPosition),Cartesian2.clone(n,e._primaryPreviousPosition),e._buttonDown[MouseButton.LEFT]=!0,defined(i=e.getInputAction(ScreenSpaceEventType$1.LEFT_DOWN,a))&&(Cartesian2.clone(n,touchStartEvent.position),i(touchStartEvent)),e._touchHoldTimer=setTimeout((function(){e.isDestroyed()||(e._touchHoldTimer=void 0,e._isTouchHolding=!0,defined(r=e.getInputAction(ScreenSpaceEventType$1.RIGHT_CLICK,a))&&checkPixelTolerance(e._primaryStartPosition,e._previousPositions.values[0],e._holdPixelTolerance)&&(Cartesian2.clone(e._primaryPosition,touchHoldEvent.position),r(touchHoldEvent)))}),ScreenSpaceEventHandler.touchHoldDelayMilliseconds),t.preventDefault()),2!==s||l||(e._isPinching=!0,defined(i=e.getInputAction(ScreenSpaceEventType$1.PINCH_START,a))&&(Cartesian2.clone(o.values[0],touch2StartEvent.position1),Cartesian2.clone(o.values[1],touch2StartEvent.position2),i(touch2StartEvent),t.preventDefault()))}function handleTouchMove(e,t){gotTouchEvent(e);for(var i,r,n=t.changedTouches,a=n.length,o=e._positions,s=0;s<a;++s){r=(i=n[s]).identifier;var l=o.get(r);defined(l)&&getPosition$1(e,i,l)}fireTouchMoveEvents(e,t);var c=e._previousPositions;for(s=0;s<a;++s)r=(i=n[s]).identifier,Cartesian2.clone(o.get(r),c.get(r))}var touchMoveEvent={startPosition:new Cartesian2,endPosition:new Cartesian2},touchPinchMovementEvent={distance:{startPosition:new Cartesian2,endPosition:new Cartesian2},angleAndHeight:{startPosition:new Cartesian2,endPosition:new Cartesian2}};function fireTouchMoveEvents(e,t){var i,r,n,a,o,s=getModifier(t),l=e._positions,c=e._previousPositions,u=l.length;1===u&&e._buttonDown[MouseButton.LEFT]?(o=l.values[0],Cartesian2.clone(o,e._primaryPosition),n=e._primaryPreviousPosition,defined(i=e.getInputAction(ScreenSpaceEventType$1.MOUSE_MOVE,s))&&(Cartesian2.clone(n,touchMoveEvent.startPosition),Cartesian2.clone(o,touchMoveEvent.endPosition),i(touchMoveEvent)),Cartesian2.clone(o,n),t.preventDefault()):2===u&&e._isPinching&&defined(i=e.getInputAction(ScreenSpaceEventType$1.PINCH_MOVE,s))&&(a=l.values[0],r=l.values[1],o=c.values[0],n=c.values[1],t=r.x-a.x,u=r.y-a.y,e=.25*Math.sqrt(t*t+u*u),s=n.x-o.x,l=n.y-o.y,c=.25*Math.sqrt(s*s+l*l),a=.125*(r.y+a.y),o=.125*(n.y+o.y),t=Math.atan2(u,t),s=Math.atan2(l,s),Cartesian2.fromElements(0,c,touchPinchMovementEvent.distance.startPosition),Cartesian2.fromElements(0,e,touchPinchMovementEvent.distance.endPosition),Cartesian2.fromElements(s,o,touchPinchMovementEvent.angleAndHeight.startPosition),Cartesian2.fromElements(t,a,touchPinchMovementEvent.angleAndHeight.endPosition),i(touchPinchMovementEvent))}function handlePointerDown(e,t){var i,r;t.target.setPointerCapture(t.pointerId),"touch"===t.pointerType?(i=e._positions,r=t.pointerId,i.set(r,getPosition$1(e,t,new Cartesian2)),fireTouchEvents(e,t),e._previousPositions.set(r,Cartesian2.clone(i.get(r)))):handleMouseDown(e,t)}function handlePointerUp(e,t){var i,r;"touch"===t.pointerType?(i=e._positions,r=t.pointerId,i.remove(r),fireTouchEvents(e,t),e._previousPositions.remove(r)):handleMouseUp(e,t)}function handlePointerMove(e,t){if("touch"===t.pointerType){var i=e._positions,r=t.pointerId,n=i.get(r);if(!defined(n))return;getPosition$1(e,t,n),fireTouchMoveEvents(e,t),n=e._previousPositions,Cartesian2.clone(i.get(r),n.get(r))}else handleMouseMove(e,t)}function ScreenSpaceEventHandler(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new Cartesian2,this._primaryPosition=new Cartesian2,this._primaryPreviousPosition=new Cartesian2,this._positions=new AssociativeArray,this._previousPositions=new AssociativeArray,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=defaultValue(e,document),registerListeners(this)}function ShowGeometryInstanceAttribute(e){e=defaultValue(e,!0),this.value=ShowGeometryInstanceAttribute.toValue(e)}ScreenSpaceEventHandler.prototype.setInputAction=function(e,t,i){i=getInputEventKey(t,i),this._inputEvents[i]=e},ScreenSpaceEventHandler.prototype.getInputAction=function(e,t){return t=getInputEventKey(e,t),this._inputEvents[t]},ScreenSpaceEventHandler.prototype.removeInputAction=function(e,t){t=getInputEventKey(e,t),delete this._inputEvents[t]},ScreenSpaceEventHandler.prototype.isDestroyed=function(){return!1},ScreenSpaceEventHandler.prototype.destroy=function(){return unregisterListeners(this),destroyObject(this)},ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds=800,ScreenSpaceEventHandler.touchHoldDelayMilliseconds=1500,Object.defineProperties(ShowGeometryInstanceAttribute.prototype,{componentDatatype:{get:function(){return ComponentDatatype$1.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),ShowGeometryInstanceAttribute.toValue=function(e,t){return defined(t)?(t[0]=e,t):new Uint8Array([e])};var Simon1994PlanetaryPositions={};function computeTdbMinusTtSpice(e){return e=6.239996+.0172019696544*e,.001657*Math.sin(e+.01671*Math.sin(e))}var TdtMinusTai$1=32.184,J2000d$1=2451545;function taiToTdb(e,t){return t=JulianDate.addSeconds(e,TdtMinusTai$1,t),e=JulianDate.totalDays(t)-J2000d$1,JulianDate.addSeconds(t,computeTdbMinusTtSpice(e),t)}var epoch=new JulianDate(2451545,0,TimeStandard$1.TAI),MetersPerKilometer=1e3,RadiansPerDegree=CesiumMath.RADIANS_PER_DEGREE,RadiansPerArcSecond=CesiumMath.RADIANS_PER_ARCSECOND,MetersPerAstronomicalUnit=14959787e4,perifocalToEquatorial=new Matrix3;function elementsToCartesian(e,t,i,r,n,a,o){i<0&&(i=-i,n+=CesiumMath.PI);var s=e*(1-t);e=r-n,n=n,r=meanAnomalyToTrueAnomaly(a-r,t);return perifocalToCartesianMatrix(e,i,n,perifocalToEquatorial),n=s*(1+t),s=Math.cos(r),r=Math.sin(r),t=n/(1+t*s),defined(o)?(o.x=t*s,o.y=t*r,o.z=0):o=new Cartesian3(t*s,t*r,0),Matrix3.multiplyByVector(perifocalToEquatorial,o,o)}function meanAnomalyToTrueAnomaly(e,t){return eccentricAnomalyToTrueAnomaly(meanAnomalyToEccentricAnomaly(e,t),t)}var maxIterationCount=50,keplerEqConvergence=CesiumMath.EPSILON8;function meanAnomalyToEccentricAnomaly(e,t){for(var i=Math.floor(e/CesiumMath.TWO_PI),r=(e-=i*CesiumMath.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),n=Number.MAX_VALUE,a=0;a<maxIterationCount&&Math.abs(n-r)>keplerEqConvergence;++a)r=(n=r)-(n-t*Math.sin(n)-e)/(1-t*Math.cos(n));return r+i*CesiumMath.TWO_PI}function eccentricAnomalyToTrueAnomaly(e,t){var i=Math.floor(e/CesiumMath.TWO_PI);e-=i*CesiumMath.TWO_PI;var r=Math.cos(e)-t;t=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(t,r),r=CesiumMath.zeroToTwoPi(r);return e<0&&(r-=CesiumMath.TWO_PI),r+i*CesiumMath.TWO_PI}function perifocalToCartesianMatrix(e,t,i,r){var n=Math.cos(e),a=Math.sin(e),o=Math.cos(t);e=Math.sin(t),t=Math.cos(i),i=Math.sin(i);return defined(r)?(r[0]=t*n-i*a*o,r[1]=i*n+t*a*o,r[2]=a*e,r[3]=-t*a-i*n*o,r[4]=-i*a+t*n*o,r[5]=n*e,r[6]=i*e,r[7]=-t*e,r[8]=o):r=new Matrix3(t*n-i*a*o,-t*a-i*n*o,i*e,i*n+t*a*o,-i*a+t*n*o,-t*e,a*e,n*e,o),r}var semiMajorAxis0=1.0000010178*MetersPerAstronomicalUnit,meanLongitude0=100.46645683*RadiansPerDegree,meanLongitude1=1295977422.83429*RadiansPerArcSecond,p1u=16002,p2u=21863,p3u=32004,p4u=10931,p5u=14529,p6u=16368,p7u=15318,p8u=32794,Ca1=64e-7*MetersPerAstronomicalUnit,Ca2=-152e-7*MetersPerAstronomicalUnit,Ca3=62e-7*MetersPerAstronomicalUnit,Ca4=-8e-7*MetersPerAstronomicalUnit,Ca5=32e-7*MetersPerAstronomicalUnit,Ca6=-41e-7*MetersPerAstronomicalUnit,Ca7=19e-7*MetersPerAstronomicalUnit,Ca8=-11e-7*MetersPerAstronomicalUnit,Sa1=1e-7*-150*MetersPerAstronomicalUnit,Sa2=-46e-7*MetersPerAstronomicalUnit,Sa3=68*1e-7*MetersPerAstronomicalUnit,Sa4=54e-7*MetersPerAstronomicalUnit,Sa5=14e-7*MetersPerAstronomicalUnit,Sa6=24e-7*MetersPerAstronomicalUnit,Sa7=-28e-7*MetersPerAstronomicalUnit,Sa8=22e-7*MetersPerAstronomicalUnit,q1u=10,q2u=16002,q3u=21863,q4u=10931,q5u=1473,q6u=32004,q7u=4387,q8u=73,Cl1=-325e-7,Cl2=-322e-7,Cl3=1e-7*-79,Cl4=232*1e-7,Cl5=1e-7*-52,Cl6=97e-7,Cl7=55e-7,Cl8=-41e-7,Sl1=-105e-7,Sl2=-137e-7,Sl3=258e-7,Sl4=35e-7,Sl5=1e-7*-116,Sl6=-88e-7,Sl7=-112e-7,Sl8=-8e-6,scratchDate=new JulianDate(0,0,TimeStandard$1.TAI);function computeSimonEarthMoonBarycenter(e,t){taiToTdb(e,scratchDate);var i=(scratchDate.dayNumber-epoch.dayNumber+(scratchDate.secondsOfDay-epoch.secondsOfDay)/TimeConstants$1.SECONDS_PER_DAY)/(10*TimeConstants$1.DAYS_PER_JULIAN_CENTURY),r=.3595362*i;e=semiMajorAxis0+Ca1*Math.cos(p1u*r)+Sa1*Math.sin(p1u*r)+Ca2*Math.cos(p2u*r)+Sa2*Math.sin(p2u*r)+Ca3*Math.cos(p3u*r)+Sa3*Math.sin(p3u*r)+Ca4*Math.cos(p4u*r)+Sa4*Math.sin(p4u*r)+Ca5*Math.cos(p5u*r)+Sa5*Math.sin(p5u*r)+Ca6*Math.cos(p6u*r)+Sa6*Math.sin(p6u*r)+Ca7*Math.cos(p7u*r)+Sa7*Math.sin(p7u*r)+Ca8*Math.cos(p8u*r)+Sa8*Math.sin(p8u*r),r=meanLongitude0+meanLongitude1*i+Cl1*Math.cos(q1u*r)+Sl1*Math.sin(q1u*r)+Cl2*Math.cos(q2u*r)+Sl2*Math.sin(q2u*r)+Cl3*Math.cos(q3u*r)+Sl3*Math.sin(q3u*r)+Cl4*Math.cos(q4u*r)+Sl4*Math.sin(q4u*r)+Cl5*Math.cos(q5u*r)+Sl5*Math.sin(q5u*r)+Cl6*Math.cos(q6u*r)+Sl6*Math.sin(q6u*r)+Cl7*Math.cos(q7u*r)+Sl7*Math.sin(q7u*r)+Cl8*Math.cos(q8u*r)+Sl8*Math.sin(q8u*r);return elementsToCartesian(e,.0167086342-.0004203654*i,469.97289*RadiansPerArcSecond*i,102.93734808*RadiansPerDegree+11612.3529*RadiansPerArcSecond*i,174.87317577*RadiansPerDegree-8679.27034*RadiansPerArcSecond*i,r,t)}function computeSimonMoon(e,t){taiToTdb(e,scratchDate);var i=(scratchDate.dayNumber-epoch.dayNumber+(scratchDate.secondsOfDay-epoch.secondsOfDay)/TimeConstants$1.SECONDS_PER_DAY)/TimeConstants$1.DAYS_PER_JULIAN_CENTURY,r=i*i,n=r*i,a=383397.7725+.004*i,o=.055545526-16e-9*i,s=5.15668983*RadiansPerDegree,l=-8e-5*i+.02966*r-42e-6*n-13e-8*(T=n*i),c=83.35324312*RadiansPerDegree,u=14643420.2669*i-38.2702*r-.045047*n+21301e-8*T,d=125.04455501*RadiansPerDegree,h=-6967919.3631*i+6.3602*r+.007625*n-3586e-8*T,p=218.31664563*RadiansPerDegree,f=1732559343.4847*i-6.391*r+.006588*n-3169e-8*T,m=297.85019547*RadiansPerDegree+RadiansPerArcSecond*(1602961601.209*i-6.3706*r+.006593*n-3169e-8*T),g=134.96340251*RadiansPerDegree+RadiansPerArcSecond*(1717915923.2178*i+31.8792*r+.051635*n-2447e-7*T),y=357.52910918*RadiansPerDegree+RadiansPerArcSecond*(129596581.0481*i-.5532*r+136e-6*n-1149e-8*T),_=310.17137918*RadiansPerDegree-RadiansPerArcSecond*(6967051.436*i+6.2068*r+.007618*n-3219e-8*T),v=2*m,C=4*m,x=6*m,b=2*g,S=3*g,T=(e=4*g,2*(93.27209062*RadiansPerDegree+RadiansPerArcSecond*(1739527262.8478*i-12.7512*r-.001037*n+417e-8*T)));return a+=3400.4*Math.cos(v)-635.6*Math.cos(v-g)-235.6*Math.cos(g)+218.1*Math.cos(v-y)+181*Math.cos(v+g),o+=.014216*Math.cos(v-g)+.008551*Math.cos(v-b)-.001383*Math.cos(g)+.001356*Math.cos(v+g)-.001147*Math.cos(C-S)-914e-6*Math.cos(C-b)+869e-6*Math.cos(v-y-g)-627e-6*Math.cos(v)-394e-6*Math.cos(C-e)+282e-6*Math.cos(v-y-b)-279e-6*Math.cos(m-g)-236e-6*Math.cos(b)+231e-6*Math.cos(C)+229e-6*Math.cos(x-e)-201e-6*Math.cos(b-T),l+=486.26*Math.cos(v-T)-40.13*Math.cos(v)+37.51*Math.cos(T)+25.73*Math.cos(b-T)+19.97*Math.cos(v-y-T),u+=-55609*Math.sin(v-g)-34711*Math.sin(v-b)-9792*Math.sin(g)+9385*Math.sin(C-S)+7505*Math.sin(C-b)+5318*Math.sin(v+g)+3484*Math.sin(C-e)-3417*Math.sin(v-y-g)-2530*Math.sin(x-e)-2376*Math.sin(v)-2075*Math.sin(v-S)-1883*Math.sin(b)-1736*Math.sin(x-5*g)+1626*Math.sin(y)-1370*Math.sin(x-S),h+=-5392*Math.sin(v-T)-540*Math.sin(y)-441*Math.sin(v)+423*Math.sin(T)-288*Math.sin(b-T),f+=-3332.9*Math.sin(v)+1197.4*Math.sin(v-g)-662.5*Math.sin(y)+396.3*Math.sin(g)-218*Math.sin(v-y),b=2*_,g=3*_,l+=46.997*Math.cos(_)*i-.614*Math.cos(v-T+_)*i+.614*Math.cos(v-T-_)*i-.0297*Math.cos(b)*r-.0335*Math.cos(_)*r+.0012*Math.cos(v-T+b)*r-16e-5*Math.cos(_)*n+4e-5*Math.cos(g)*n+4e-5*Math.cos(b)*n,u+=y=2.116*Math.sin(_)*i-.111*Math.sin(v-T-_)*i-.0015*Math.sin(_)*r,f+=y,h+=-520.77*Math.sin(_)*i+13.66*Math.sin(v-T+_)*i+1.12*Math.sin(v-_)*i-1.06*Math.sin(T-_)*i+.66*Math.sin(b)*r+.371*Math.sin(_)*r-.035*Math.sin(v-T+b)*r-.015*Math.sin(v-T+_)*r+.0014*Math.sin(_)*n-.0011*Math.sin(g)*n-9e-4*Math.sin(b)*n,elementsToCartesian(a*=MetersPerKilometer,o,s+l*RadiansPerArcSecond,c+u*RadiansPerArcSecond,d+h*RadiansPerArcSecond,p+f*RadiansPerArcSecond,t)}var moonEarthMassRatio=.012300034,factor=moonEarthMassRatio/(moonEarthMassRatio+1)*-1;function computeSimonEarth(e,t){return t=computeSimonMoon(e,t),Cartesian3.multiplyByScalar(t,factor,t)}var axesTransformation=new Matrix3(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),translation$1=new Cartesian3;function interpolateColors$1(e,t,i,r,n,a,o){var s=PolylinePipeline.numberOfPoints(e,t,n),l=i.red,c=i.green,u=i.blue,d=i.alpha,h=r.red;e=r.green,t=r.blue,n=r.alpha;if(Color.equals(i,r)){for(_=0;_<s;_++)a[o++]=Color.floatToByte(l),a[o++]=Color.floatToByte(c),a[o++]=Color.floatToByte(u),a[o++]=Color.floatToByte(d);return o}for(var p=(h-l)/s,f=(e-c)/s,m=(t-u)/s,g=(n-d)/s,y=o,_=0;_<s;_++)a[y++]=Color.floatToByte(l+_*p),a[y++]=Color.floatToByte(c+_*f),a[y++]=Color.floatToByte(u+_*m),a[y++]=Color.floatToByte(d+_*g);return y}function SimplePolylineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.colors,r=defaultValue(e.colorsPerVertex,!1);this._positions=t,this._colors=i,this._colorsPerVertex=r,this._arcType=defaultValue(e.arcType,ArcType$1.GEODESIC),this._granularity=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry",t=1+t.length*Cartesian3.packedLength,t+=defined(i)?1+i.length*Color.packedLength:1,this.packedLength=t+Ellipsoid.packedLength+3}Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame=function(e,t){return defined(e)||(e=JulianDate.now()),defined(t)||(t=new Cartesian3),translation$1=computeSimonEarthMoonBarycenter(e,translation$1),t=Cartesian3.negate(translation$1,t),computeSimonEarth(e,translation$1),Cartesian3.subtract(t,translation$1,t),Matrix3.multiplyByVector(axesTransformation,t,t),t},Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame=function(e,t){return defined(e)||(e=JulianDate.now()),t=computeSimonMoon(e,t),Matrix3.multiplyByVector(axesTransformation,t,t),t},SimplePolylineGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._colors;a=defined(o)?o.length:0;for(t[i++]=a,r=0;r<a;++r,i+=Color.packedLength)Color.pack(o[r],t,i);return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,t[i++]=e._colorsPerVertex?1:0,t[i++]=e._arcType,t[i]=e._granularity,t},SimplePolylineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r=e[t++],n=new Array(r),a=0;a<r;++a,t+=Cartesian3.packedLength)n[a]=Cartesian3.unpack(e,t);var o=0<(r=e[t++])?new Array(r):void 0;for(a=0;a<r;++a,t+=Color.packedLength)o[a]=Color.unpack(e,t);var s=Ellipsoid.unpack(e,t);t+=Ellipsoid.packedLength;var l=1===e[t++],c=e[t++],u=e[t];return defined(i)?(i._positions=n,i._colors=o,i._ellipsoid=s,i._colorsPerVertex=l,i._arcType=c,i._granularity=u,i):new SimplePolylineGeometry({positions:n,colors:o,ellipsoid:s,colorsPerVertex:l,arcType:c,granularity:u})};var scratchArray1=new Array(2),scratchArray2=new Array(2),generateArcOptionsScratch={positions:scratchArray1,height:scratchArray2,ellipsoid:void 0,minDistance:void 0,granularity:void 0};function SphereGeometry(e){var t=defaultValue(e.radius,1);e={radii:new Cartesian3(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new EllipsoidGeometry(e),this._workerName="createSphereGeometry"}SimplePolylineGeometry.createGeometry=function(e){var t,i,r,n=e._positions,a=e._colors,o=e._colorsPerVertex,s=e._arcType,l=e._granularity,c=(e=e._ellipsoid,CesiumMath.chordLength(l,e.maximumRadius)),u=defined(a)&&!o,d=n.length,h=0;if(s===ArcType$1.GEODESIC||s===ArcType$1.RHUMB){var p,f,m=s===ArcType$1.GEODESIC?(p=CesiumMath.chordLength(l,e.maximumRadius),f=PolylinePipeline.numberOfPoints,PolylinePipeline.generateArc):(p=l,f=PolylinePipeline.numberOfPointsRhumbLine,PolylinePipeline.generateRhumbArc),g=PolylinePipeline.extractHeights(n,e),y=generateArcOptionsScratch;if(s===ArcType$1.GEODESIC?y.minDistance=c:y.granularity=l,y.ellipsoid=e,u){for(var _=0,v=0;v<d-1;v++)_+=f(n[v],n[v+1],p)+1;t=new Float64Array(3*_),r=new Uint8Array(4*_),y.positions=scratchArray1,y.height=scratchArray2;var C=0;for(v=0;v<d-1;++v){scratchArray1[0]=n[v],scratchArray1[1]=n[v+1],scratchArray2[0]=g[v],scratchArray2[1]=g[v+1];var x=m(y);if(defined(a))for(var b=x.length/3,S=a[v],T=0;T<b;++T)r[C++]=Color.floatToByte(S.red),r[C++]=Color.floatToByte(S.green),r[C++]=Color.floatToByte(S.blue),r[C++]=Color.floatToByte(S.alpha);t.set(x,h),h+=x.length}}else if(y.positions=n,y.height=g,t=new Float64Array(m(y)),defined(a)){for(r=new Uint8Array(t.length/3*4),v=0;v<d-1;++v)h=interpolateColors$1(n[v],n[v+1],a[v],a[v+1],c,r,h);var E=a[d-1];r[h++]=Color.floatToByte(E.red),r[h++]=Color.floatToByte(E.green),r[h++]=Color.floatToByte(E.blue),r[h++]=Color.floatToByte(E.alpha)}}else{i=u?2*d-2:d,t=new Float64Array(3*i),r=defined(a)?new Uint8Array(4*i):void 0;var w=0,A=0;for(v=0;v<d;++v){var P=n[v];if(u&&0<v&&(Cartesian3.pack(P,t,w),w+=3,S=a[v-1],r[A++]=Color.floatToByte(S.red),r[A++]=Color.floatToByte(S.green),r[A++]=Color.floatToByte(S.blue),r[A++]=Color.floatToByte(S.alpha)),u&&v===d-1)break;Cartesian3.pack(P,t,w),w+=3,defined(a)&&(S=a[v],r[A++]=Color.floatToByte(S.red),r[A++]=Color.floatToByte(S.green),r[A++]=Color.floatToByte(S.blue),r[A++]=Color.floatToByte(S.alpha))}}(e=new GeometryAttributes).position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:t}),defined(a)&&(e.color=new GeometryAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:4,values:r,normalize:!0}));E=2*((i=t.length/3)-1);var D=IndexDatatype$1.createTypedArray(i,E),M=0;for(v=0;v<i-1;++v)D[M++]=v,D[M++]=v+1;return new Geometry({attributes:e,indices:D,primitiveType:PrimitiveType$1.LINES,boundingSphere:BoundingSphere.fromPoints(n)})},SphereGeometry.packedLength=EllipsoidGeometry.packedLength,SphereGeometry.pack=function(e,t,i){return EllipsoidGeometry.pack(e._ellipsoidGeometry,t,i)};var scratchEllipsoidGeometry=new EllipsoidGeometry,scratchOptions$k={radius:void 0,radii:new Cartesian3,vertexFormat:new VertexFormat,stackPartitions:void 0,slicePartitions:void 0};function SphereOutlineGeometry(e){var t=defaultValue(e.radius,1);e={radii:new Cartesian3(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new EllipsoidOutlineGeometry(e),this._workerName="createSphereOutlineGeometry"}SphereGeometry.unpack=function(e,t,i){return t=EllipsoidGeometry.unpack(e,t,scratchEllipsoidGeometry),scratchOptions$k.vertexFormat=VertexFormat.clone(t._vertexFormat,scratchOptions$k.vertexFormat),scratchOptions$k.stackPartitions=t._stackPartitions,scratchOptions$k.slicePartitions=t._slicePartitions,defined(i)?(Cartesian3.clone(t._radii,scratchOptions$k.radii),i._ellipsoidGeometry=new EllipsoidGeometry(scratchOptions$k),i):(scratchOptions$k.radius=t._radii.x,new SphereGeometry(scratchOptions$k))},SphereGeometry.createGeometry=function(e){return EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},SphereOutlineGeometry.packedLength=EllipsoidOutlineGeometry.packedLength,SphereOutlineGeometry.pack=function(e,t,i){return EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,t,i)};var scratchEllipsoidGeometry$1=new EllipsoidOutlineGeometry,scratchOptions$l={radius:void 0,radii:new Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};function Spherical(e,t,i){this.clock=defaultValue(e,0),this.cone=defaultValue(t,0),this.magnitude=defaultValue(i,1)}function TerrainData(){DeveloperError.throwInstantiationError()}SphereOutlineGeometry.unpack=function(e,t,i){return t=EllipsoidOutlineGeometry.unpack(e,t,scratchEllipsoidGeometry$1),scratchOptions$l.stackPartitions=t._stackPartitions,scratchOptions$l.slicePartitions=t._slicePartitions,scratchOptions$l.subdivisions=t._subdivisions,defined(i)?(Cartesian3.clone(t._radii,scratchOptions$l.radii),i._ellipsoidGeometry=new EllipsoidOutlineGeometry(scratchOptions$l),i):(scratchOptions$l.radius=t._radii.x,new SphereOutlineGeometry(scratchOptions$l))},SphereOutlineGeometry.createGeometry=function(e){return EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},Spherical.fromCartesian3=function(e,t){var i=e.x,r=e.y,n=e.z;e=i*i+r*r;return defined(t)||(t=new Spherical),t.clock=Math.atan2(r,i),t.cone=Math.atan2(Math.sqrt(e),n),t.magnitude=Math.sqrt(e+n*n),t},Spherical.clone=function(e,t){if(defined(e))return defined(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new Spherical(e.clock,e.cone,e.magnitude)},Spherical.normalize=function(e,t){return defined(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new Spherical(e.clock,e.cone,1)},Spherical.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude},Spherical.equalsEpsilon=function(e,t,i){return i=defaultValue(i,0),e===t||defined(e)&&defined(t)&&Math.abs(e.clock-t.clock)<=i&&Math.abs(e.cone-t.cone)<=i&&Math.abs(e.magnitude-t.magnitude)<=i},Spherical.prototype.equals=function(e){return Spherical.equals(this,e)},Spherical.prototype.clone=function(e){return Spherical.clone(this,e)},Spherical.prototype.equalsEpsilon=function(e,t){return Spherical.equalsEpsilon(this,e,t)},Spherical.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},Object.defineProperties(TerrainData.prototype,{credits:{get:DeveloperError.throwInstantiationError},waterMask:{get:DeveloperError.throwInstantiationError}}),TerrainData.prototype.interpolateHeight=DeveloperError.throwInstantiationError,TerrainData.prototype.isChildAvailable=DeveloperError.throwInstantiationError,TerrainData.prototype.createMesh=DeveloperError.throwInstantiationError,TerrainData.prototype.upsample=DeveloperError.throwInstantiationError,TerrainData.prototype.wasCreatedByUpsampling=DeveloperError.throwInstantiationError;var TileEdge={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7};function TilingScheme(e){}function compareIntervalStartTimes(e,t){return JulianDate.compare(e.start,t.start)}function TimeIntervalCollection(e){if(this._intervals=[],this._changedEvent=new Event,defined(e))for(var t=e.length,i=0;i<t;i++)this.addInterval(e[i])}Object.defineProperties(TilingScheme.prototype,{ellipsoid:{get:DeveloperError.throwInstantiationError},rectangle:{get:DeveloperError.throwInstantiationError},projection:{get:DeveloperError.throwInstantiationError}}),TilingScheme.prototype.getNumberOfXTilesAtLevel=DeveloperError.throwInstantiationError,TilingScheme.prototype.getNumberOfYTilesAtLevel=DeveloperError.throwInstantiationError,TilingScheme.prototype.rectangleToNativeRectangle=DeveloperError.throwInstantiationError,TilingScheme.prototype.tileXYToNativeRectangle=DeveloperError.throwInstantiationError,TilingScheme.prototype.tileXYToRectangle=DeveloperError.throwInstantiationError,TilingScheme.prototype.positionToTileXY=DeveloperError.throwInstantiationError,Object.defineProperties(TimeIntervalCollection.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){var e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){var e=this._intervals;return 0!==e.length&&e[0].isStartIncluded}},stop:{get:function(){var e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){var e=this._intervals,t=e.length;return 0!==t&&e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),TimeIntervalCollection.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof TimeIntervalCollection))return!1;var i=this._intervals,r=e._intervals,n=i.length;if(n!==r.length)return!1;for(var a=0;a<n;a++)if(!TimeInterval.equals(i[a],r[a],t))return!1;return!0},TimeIntervalCollection.prototype.get=function(e){return this._intervals[e]},TimeIntervalCollection.prototype.removeAll=function(){0<this._intervals.length&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},TimeIntervalCollection.prototype.findIntervalContainingDate=function(e){return 0<=(e=this.indexOf(e))?this._intervals[e]:void 0},TimeIntervalCollection.prototype.findDataForIntervalContainingDate=function(e){return 0<=(e=this.indexOf(e))?this._intervals[e].data:void 0},TimeIntervalCollection.prototype.contains=function(e){return 0<=this.indexOf(e)};var indexOfScratch=new TimeInterval;TimeIntervalCollection.prototype.indexOf=function(e){var t=this._intervals;indexOfScratch.start=e,indexOfScratch.stop=e;var i=binarySearch(t,indexOfScratch,compareIntervalStartTimes);return 0<=i?t[i].isStartIncluded?i:0<i&&t[i-1].stop.equals(e)&&t[i-1].isStopIncluded?i-1:~i:0<(i=~i)&&i-1<t.length&&TimeInterval.contains(t[i-1],e)?i-1:~i},TimeIntervalCollection.prototype.findInterval=function(e){for(var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).start,i=e.stop,r=e.isStartIncluded,n=e.isStopIncluded,a=this._intervals,o=0,s=a.length;o<s;o++){var l=a[o];if((!defined(t)||l.start.equals(t))&&(!defined(i)||l.stop.equals(i))&&(!defined(r)||l.isStartIncluded===r)&&(!defined(n)||l.isStopIncluded===n))return a[o]}},TimeIntervalCollection.prototype.addInterval=function(e,t){if(!e.isEmpty){var i=this._intervals;if(0===i.length||JulianDate.greaterThan(e.start,i[i.length-1].stop))return i.push(e),void this._changedEvent.raiseEvent(this);var r,n=binarySearch(i,e,compareIntervalStartTimes);for(n<0?n=~n:0<n&&e.isStartIncluded&&i[n-1].isStartIncluded&&i[n-1].start.equals(e.start)?--n:n<i.length&&!e.isStartIncluded&&i[n].isStartIncluded&&i[n].start.equals(e.start)&&++n,0<n&&(0<(r=JulianDate.compare(i[n-1].stop,e.start))||0===r&&(i[n-1].isStopIncluded||e.isStartIncluded))&&((defined(t)?t(i[n-1].data,e.data):i[n-1].data===e.data)?(e=JulianDate.greaterThan(e.stop,i[n-1].stop)?new TimeInterval({start:i[n-1].start,stop:e.stop,isStartIncluded:i[n-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new TimeInterval({start:i[n-1].start,stop:i[n-1].stop,isStartIncluded:i[n-1].isStartIncluded,isStopIncluded:i[n-1].isStopIncluded||e.stop.equals(i[n-1].stop)&&e.isStopIncluded,data:e.data}),i.splice(n-1,1),--n):((0<(r=JulianDate.compare(i[n-1].stop,e.stop))||0===r&&i[n-1].isStopIncluded&&!e.isStopIncluded)&&i.splice(n,0,new TimeInterval({start:e.stop,stop:i[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[n-1].isStopIncluded,data:i[n-1].data})),i[n-1]=new TimeInterval({start:i[n-1].start,stop:e.start,isStartIncluded:i[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:i[n-1].data})));n<i.length&&(0<(r=JulianDate.compare(e.stop,i[n].start))||0===r&&(e.isStopIncluded||i[n].isStartIncluded));)if(defined(t)?t(i[n].data,e.data):i[n].data===e.data)e=new TimeInterval({start:e.start,stop:(JulianDate.greaterThan(i[n].stop,e.stop)?i[n]:e).stop,isStartIncluded:e.isStartIncluded,isStopIncluded:(JulianDate.greaterThan(i[n].stop,e.stop)?i[n]:e).isStopIncluded,data:e.data}),i.splice(n,1);else{if(i[n]=new TimeInterval({start:e.stop,stop:i[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[n].isStopIncluded,data:i[n].data}),!i[n].isEmpty)break;i.splice(n,1)}i.splice(n,0,e),this._changedEvent.raiseEvent(this)}},TimeIntervalCollection.prototype.removeInterval=function(e){if(e.isEmpty)return!1;var t=this._intervals,i=binarySearch(t,e,compareIntervalStartTimes);i<0&&(i=~i);var r=!1;for(0<i&&(JulianDate.greaterThan(t[i-1].stop,e.start)||t[i-1].stop.equals(e.start)&&t[i-1].isStopIncluded&&e.isStartIncluded)&&(r=!0,(JulianDate.greaterThan(t[i-1].stop,e.stop)||t[i-1].isStopIncluded&&!e.isStopIncluded&&t[i-1].stop.equals(e.stop))&&t.splice(i,0,new TimeInterval({start:e.stop,stop:t[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i-1].isStopIncluded,data:t[i-1].data})),t[i-1]=new TimeInterval({start:t[i-1].start,stop:e.start,isStartIncluded:t[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[i-1].data})),i<t.length&&!e.isStartIncluded&&t[i].isStartIncluded&&e.start.equals(t[i].start)&&(r=!0,t.splice(i,0,new TimeInterval({start:t[i].start,stop:t[i].start,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data})),++i);i<t.length&&JulianDate.greaterThan(e.stop,t[i].stop);)r=!0,t.splice(i,1);return i<t.length&&e.stop.equals(t[i].stop)&&(r=!0,!e.isStopIncluded&&t[i].isStopIncluded?i+1<t.length&&t[i+1].start.equals(e.stop)&&t[i].data===t[i+1].data?(t.splice(i,1),t[i]=new TimeInterval({start:t[i].start,stop:t[i].stop,isStartIncluded:!0,isStopIncluded:t[i].isStopIncluded,data:t[i].data})):t[i]=new TimeInterval({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[i].data}):t.splice(i,1)),i<t.length&&(JulianDate.greaterThan(e.stop,t[i].start)||e.stop.equals(t[i].start)&&e.isStopIncluded&&t[i].isStartIncluded)&&(r=!0,t[i]=new TimeInterval({start:e.stop,stop:t[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i].isStopIncluded,data:t[i].data})),r&&this._changedEvent.raiseEvent(this),r},TimeIntervalCollection.prototype.intersect=function(e,t,i){for(var r=new TimeIntervalCollection,n=0,a=0,o=this._intervals,s=e._intervals;n<o.length&&a<s.length;){var l,c=o[n],u=s[a];JulianDate.lessThan(c.stop,u.start)?++n:JulianDate.lessThan(u.stop,c.start)?++a:((defined(i)||defined(t)&&t(c.data,u.data)||!defined(t)&&u.data===c.data)&&((l=TimeInterval.intersect(c,u,new TimeInterval,i)).isEmpty||r.addInterval(l,t)),JulianDate.lessThan(c.stop,u.stop)||c.stop.equals(u.stop)&&!c.isStopIncluded&&u.isStopIncluded?++n:++a)}return r},TimeIntervalCollection.fromJulianDateArray=function(e,t){defined(t)||(t=new TimeIntervalCollection);var i=e.julianDates,r=i.length,n=e.dataCallback,a=defaultValue(e.isStartIncluded,!0),o=defaultValue(e.isStopIncluded,!0),s=defaultValue(e.leadingInterval,!1),l=(e=defaultValue(e.trailingInterval,!1),0);s&&(++l,(u=new TimeInterval({start:Iso8601.MINIMUM_VALUE,stop:i[0],isStartIncluded:!0,isStopIncluded:!a})).data=defined(n)?n(u,t.length):t.length,t.addInterval(u));for(var c=0;c<r-1;++c){var u;(u=new TimeInterval({start:i[c],stop:i[c+1],isStartIncluded:t.length!==l||a,isStopIncluded:c===r-2&&o})).data=defined(n)?n(u,t.length):t.length,t.addInterval(u)}return e&&((u=new TimeInterval({start:i[r-1],stop:Iso8601.MAXIMUM_VALUE,isStartIncluded:!o,isStopIncluded:!0})).data=defined(n)?n(u,t.length):t.length,t.addInterval(u)),t};var scratchGregorianDate=new GregorianDate,monthLengths=[0,31,28,31,30,31,30,31,31,30,31,30,31];function addToDate(e,t,i){defined(i)||(i=new JulianDate),JulianDate.toGregorianDate(e,scratchGregorianDate);var r=scratchGregorianDate.millisecond+t.millisecond,n=scratchGregorianDate.second+t.second,a=scratchGregorianDate.minute+t.minute,o=(e=scratchGregorianDate.hour+t.hour,scratchGregorianDate.day+t.day),s=scratchGregorianDate.month+t.month,l=scratchGregorianDate.year+t.year;for(1e3<=r&&(n+=Math.floor(r/1e3),r%=1e3),60<=n&&(a+=Math.floor(n/60),n%=60),60<=a&&(e+=Math.floor(a/60),a%=60),24<=e&&(o+=Math.floor(e/24),e%=24),monthLengths[2]=isLeapYear(l)?29:28;o>monthLengths[s]||13<=s;)o>monthLengths[s]&&(o-=monthLengths[s],++s),13<=s&&(--s,l+=Math.floor(s/12),s%=12,++s),monthLengths[2]=isLeapYear(l)?29:28;return scratchGregorianDate.millisecond=r,scratchGregorianDate.second=n,scratchGregorianDate.minute=a,scratchGregorianDate.hour=e,scratchGregorianDate.day=o,scratchGregorianDate.month=s,scratchGregorianDate.year=l,JulianDate.fromGregorianDate(scratchGregorianDate,i)}var scratchJulianDate=new JulianDate,durationRegex=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function parseDuration(e,t){if(defined(e)&&0!==e.length){if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,"P"===e[t.millisecond=0]){var i=e.match(durationRegex);if(!defined(i))return;defined(i[1])&&(t.year=Number(i[1].replace(",","."))),defined(i[2])&&(t.month=Number(i[2].replace(",","."))),defined(i[3])&&(t.day=7*Number(i[3].replace(",","."))),defined(i[4])&&(t.day+=Number(i[4].replace(",","."))),defined(i[5])&&(t.hour=Number(i[5].replace(",","."))),defined(i[6])&&(t.minute=Number(i[6].replace(",","."))),defined(i[7])&&(i=Number(i[7].replace(",",".")),t.second=Math.floor(i),t.millisecond=i%1*1e3)}else"Z"!==e[e.length-1]&&(e+="Z"),JulianDate.toGregorianDate(JulianDate.fromIso8601(e,scratchJulianDate),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}}var scratchDuration=new GregorianDate;TimeIntervalCollection.fromIso8601=function(e,t){var i=e.iso8601.split("/"),r=JulianDate.fromIso8601(i[0]),n=JulianDate.fromIso8601(i[1]),a=[];if(parseDuration(i[2],scratchDuration)){var o=JulianDate.clone(r);for(a.push(o);JulianDate.compare(o,n)<0;)o=addToDate(o,scratchDuration),JulianDate.compare(n,o)<=0&&JulianDate.clone(n,o),a.push(o)}else a.push(r,n);return TimeIntervalCollection.fromJulianDateArray({julianDates:a,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},TimeIntervalCollection.fromIso8601DateArray=function(e,t){return TimeIntervalCollection.fromJulianDateArray({julianDates:e.iso8601Dates.map((function(e){return JulianDate.fromIso8601(e)})),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},TimeIntervalCollection.fromIso8601DurationArray=function(e,t){for(var i,r,n=e.epoch,a=e.iso8601Durations,o=defaultValue(e.relativeToPrevious,!1),s=[],l=a.length,c=0;c<l;++c)!parseDuration(a[c],scratchDuration)&&0!==c||(i=o&&defined(r)?addToDate(r,scratchDuration):addToDate(n,scratchDuration),s.push(i),r=i);return TimeIntervalCollection.fromJulianDateArray({julianDates:s,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var defaultScale=new Cartesian3(1,1,1),defaultTranslation=Cartesian3.ZERO,defaultRotation=Quaternion.IDENTITY;function TranslationRotationScale(e,t,i){this.translation=Cartesian3.clone(defaultValue(e,defaultTranslation)),this.rotation=Quaternion.clone(defaultValue(t,defaultRotation)),this.scale=Cartesian3.clone(defaultValue(i,defaultScale))}TranslationRotationScale.prototype.equals=function(e){return this===e||defined(e)&&Cartesian3.equals(this.translation,e.translation)&&Quaternion.equals(this.rotation,e.rotation)&&Cartesian3.equals(this.scale,e.scale)};var context2DsByWidthAndHeight={};function getImagePixels(e,t,i){defined(t)||(t=e.width),defined(i)||(i=e.height);var r=context2DsByWidthAndHeight[t];defined(r)||(r={},context2DsByWidthAndHeight[t]=r);var n,a=r[i];return defined(a)||((n=document.createElement("canvas")).width=t,n.height=i,(a=n.getContext("2d")).globalCompositeOperation="copy",r[i]=a),a.drawImage(e,0,0,t,i),a.getImageData(0,0,t,i).data}function DataRectangle(e,t){this.rectangle=e,this.maxLevel=t}function VRTheWorldTerrainProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=Resource.createIfNeeded(e.url);this._resource=t,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer(),this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:16777215},"string"==typeof(t=e.credit)&&(t=new Credit(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[];var i,r=this,n=defaultValue(e.ellipsoid,Ellipsoid.WGS84);function a(e){var t=e.getElementsByTagName("SRS")[0].textContent;if("EPSG:4326"===t){r._tilingScheme=new GeographicTilingScheme({ellipsoid:n});var i=e.getElementsByTagName("TileFormat")[0];r._heightmapWidth=parseInt(i.getAttribute("width"),10),r._heightmapHeight=parseInt(i.getAttribute("height"),10),r._levelZeroMaximumGeometricError=TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(n,Math.min(r._heightmapWidth,r._heightmapHeight),r._tilingScheme.getNumberOfXTilesAtLevel(0));for(var a=e.getElementsByTagName("DataExtent"),s=0;s<a.length;++s){var l=a[s],c=CesiumMath.toRadians(parseFloat(l.getAttribute("minx"))),u=CesiumMath.toRadians(parseFloat(l.getAttribute("miny"))),d=CesiumMath.toRadians(parseFloat(l.getAttribute("maxx"))),h=CesiumMath.toRadians(parseFloat(l.getAttribute("maxy")));l=parseInt(l.getAttribute("maxlevel"),10);r._rectangles.push(new DataRectangle(new Rectangle(c,u,d,h),l))}r._ready=!0,r._readyPromise.resolve(!0)}else o("SRS "+t+" is not supported.")}function o(e){e=defaultValue(e,"An error occurred while accessing "+r._resource.url+"."),i=TileProviderError.handleError(i,r,r._errorEvent,e,void 0,void 0,void 0,s)}function s(){when(r._resource.fetchXML(),a,o)}s()}Object.defineProperties(VRTheWorldTerrainProvider.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}}),VRTheWorldTerrainProvider.prototype.requestTileGeometry=function(e,t,i,r){var n=this._tilingScheme.getNumberOfYTilesAtLevel(i);if(defined(r=this._resource.getDerivedResource({url:i+"/"+e+"/"+(n-t-1)+".tif",queryParameters:{cesium:!0},request:r}).fetchImage({preferImageBitmap:!0}))){var a=this;return when(r).then((function(r){return new HeightmapTerrainData({buffer:getImagePixels(r),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:getChildMask(a,e,t,i),structure:a._terrainDataStructure})}))}},VRTheWorldTerrainProvider.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var rectangleScratch$4=new Rectangle;function getChildMask(e,t,i,r){for(var n=e._tilingScheme,a=e._rectangles,o=n.tileXYToRectangle(t,i,r),s=0,l=0;l<a.length&&15!==s;++l){var c=a[l];c.maxLevel<=r||(c=c.rectangle,defined(Rectangle.intersection(c,o,rectangleScratch$4))&&(isTileInRectangle(n,c,2*t,2*i,r+1)&&(s|=4),isTileInRectangle(n,c,2*t+1,2*i,r+1)&&(s|=8),isTileInRectangle(n,c,2*t,2*i+1,r+1)&&(s|=1),isTileInRectangle(n,c,2*t+1,2*i+1,r+1)&&(s|=2)))}return s}function isTileInRectangle(e,t,i,r,n){return n=e.tileXYToRectangle(i,r,n),defined(Rectangle.intersection(n,t,rectangleScratch$4))}function VideoSynchronizer(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=defaultValue(e.epoch,Iso8601.MINIMUM_VALUE),this.tolerance=defaultValue(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}function createSeekFunction(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}VRTheWorldTerrainProvider.prototype.getTileDataAvailable=function(e,t,i){},VRTheWorldTerrainProvider.prototype.loadTileDataAvailability=function(e,t,i){},Object.defineProperties(VideoSynchronizer.prototype,{clock:{get:function(){return this._clock},set:function(e){var t=this._clock;t!==e&&(defined(t)&&(this._clockSubscription(),this._clockSubscription=void 0),defined(e)&&(this._clockSubscription=e.onTick.addEventListener(VideoSynchronizer.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){var t=this._element;t!==e&&(defined(t)&&t.removeEventListener("seeked",this._seekFunction,!1),defined(e)&&(this._seeking=!1,this._seekFunction=createSeekFunction(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}}),VideoSynchronizer.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,destroyObject(this)},VideoSynchronizer.prototype.isDestroyed=function(){return!1},VideoSynchronizer.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate!==e.multiplier){var t=this._element;try{t.playbackRate=e.multiplier}catch(e){t.playbackRate=0}this._lastPlaybackRate=e.multiplier}},VideoSynchronizer.prototype._onTick=function(e){var t,i,r,n=this._element;!defined(n)||n.readyState<2||(i=n.paused,(r=e.shouldAnimate)===i&&(r?n.play():n.pause()),this._seeking||this._firstTickAfterSeek?this._firstTickAfterSeek=!1:(this._trySetPlaybackRate(e),t=e.currentTime,i=defaultValue(this.epoch,Iso8601.MINIMUM_VALUE),e=JulianDate.secondsDifference(t,i),t=n.duration,i=n.currentTime,e=n.loop?((e%=t)<0&&(e=t-e),e):t<e?t:e<0?0:e,r=r?defaultValue(this.tolerance,1):.001,Math.abs(e-i)>r&&(this._seeking=!0,n.currentTime=e)))};var WallGeometryLibrary={};function latLonEquals(e,t){return CesiumMath.equalsEpsilon(e.latitude,t.latitude,CesiumMath.EPSILON10)&&CesiumMath.equalsEpsilon(e.longitude,t.longitude,CesiumMath.EPSILON10)}var scratchCartographic1$2=new Cartographic,scratchCartographic2$1=new Cartographic;function removeDuplicates(e,t,i,r){var n=(t=arrayRemoveDuplicates(t,Cartesian3.equalsEpsilon)).length;if(!(n<2)){var a=defined(r),o=defined(i),s=new Array(n),l=new Array(n),c=new Array(n),u=t[0];s[0]=u;var d=e.cartesianToCartographic(u,scratchCartographic1$2);o&&(d.height=i[0]),l[0]=d.height,c[0]=a?r[0]:0;for(var h=l[0]===c[0],p=1,f=1;f<n;++f){var m=t[f],g=e.cartesianToCartographic(m,scratchCartographic2$1);o&&(g.height=i[f]),h=h&&0===g.height,latLonEquals(d,g)?d.height<g.height&&(l[p-1]=g.height):(s[p]=m,l[p]=g.height,c[p]=a?r[f]:0,h=h&&l[p]===c[p],Cartographic.clone(g,d),++p)}if(!(h||p<2))return s.length=p,l.length=p,c.length=p,{positions:s,topHeights:l,bottomHeights:c}}}var positionsArrayScratch=new Array(2),heightsArrayScratch=new Array(2),generateArcOptionsScratch$1={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};WallGeometryLibrary.computePositions=function(e,t,i,r,n,a){if(defined(c=removeDuplicates(e,t,i,r))){t=c.positions,i=c.topHeights,r=c.bottomHeights;var o,s,l=t.length,c=l-2,u=CesiumMath.chordLength(n,e.maximumRadius),d=generateArcOptionsScratch$1;if(d.minDistance=u,d.ellipsoid=e,a){for(var h=0,p=0;p<l-1;p++)h+=PolylinePipeline.numberOfPoints(t[p],t[p+1],u)+1;o=new Float64Array(3*h),s=new Float64Array(3*h);var f=positionsArrayScratch,m=heightsArrayScratch;d.positions=f,d.height=m;var g=0;for(p=0;p<l-1;p++){f[0]=t[p],f[1]=t[p+1],m[0]=i[p],m[1]=i[p+1];var y=PolylinePipeline.generateArc(d);o.set(y,g),m[0]=r[p],m[1]=r[p+1],s.set(PolylinePipeline.generateArc(d),g),g+=y.length}}else d.positions=t,d.height=i,o=new Float64Array(PolylinePipeline.generateArc(d)),d.height=r,s=new Float64Array(PolylinePipeline.generateArc(d));return{bottomPositions:s,topPositions:o,numCorners:c}}};var scratchCartesian3Position1=new Cartesian3,scratchCartesian3Position2=new Cartesian3,scratchCartesian3Position4=new Cartesian3,scratchCartesian3Position5=new Cartesian3,scratchBitangent$4=new Cartesian3,scratchTangent$4=new Cartesian3,scratchNormal$6=new Cartesian3;function WallGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.maximumHeights,r=e.minimumHeights,n=defaultValue(e.vertexFormat,VertexFormat.DEFAULT),a=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE);e=defaultValue(e.ellipsoid,Ellipsoid.WGS84);this._positions=t,this._minimumHeights=r,this._maximumHeights=i,this._vertexFormat=VertexFormat.clone(n),this._granularity=a,this._ellipsoid=Ellipsoid.clone(e),this._workerName="createWallGeometry",t=1+t.length*Cartesian3.packedLength+2,defined(r)&&(t+=r.length),defined(i)&&(t+=i.length),this.packedLength=t+Ellipsoid.packedLength+VertexFormat.packedLength+1}WallGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._minimumHeights;a=defined(o)?o.length:0;if(t[i++]=a,defined(o))for(r=0;r<a;++r)t[i++]=o[r];var s=e._maximumHeights;if(a=defined(s)?s.length:0,t[i++]=a,defined(s))for(r=0;r<a;++r)t[i++]=s[r];return Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,VertexFormat.pack(e._vertexFormat,t,i),t[i+=VertexFormat.packedLength]=e._granularity,t};var scratchEllipsoid$c=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchVertexFormat$c=new VertexFormat,scratchOptions$m={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:scratchEllipsoid$c,vertexFormat:scratchVertexFormat$c,granularity:void 0};WallGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r,n,a=e[t++],o=new Array(a),s=0;s<a;++s,t+=Cartesian3.packedLength)o[s]=Cartesian3.unpack(e,t);if(0<(a=e[t++]))for(r=new Array(a),s=0;s<a;++s)r[s]=e[t++];if(0<(a=e[t++]))for(n=new Array(a),s=0;s<a;++s)n[s]=e[t++];var l=Ellipsoid.unpack(e,t,scratchEllipsoid$c);t+=Ellipsoid.packedLength;var c=VertexFormat.unpack(e,t,scratchVertexFormat$c),u=e[t+=VertexFormat.packedLength];return defined(i)?(i._positions=o,i._minimumHeights=r,i._maximumHeights=n,i._ellipsoid=Ellipsoid.clone(l,i._ellipsoid),i._vertexFormat=VertexFormat.clone(c,i._vertexFormat),i._granularity=u,i):(scratchOptions$m.positions=o,scratchOptions$m.minimumHeights=r,scratchOptions$m.maximumHeights=n,scratchOptions$m.granularity=u,new WallGeometry(scratchOptions$m))},WallGeometry.fromConstantHeights=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.minimumHeight,r=e.maximumHeight,n=defined(i),a=defined(r);if(n||a)for(var o=t.length,s=n?new Array(o):void 0,l=a?new Array(o):void 0,c=0;c<o;++c)n&&(s[c]=i),a&&(l[c]=r);return new WallGeometry({positions:t,maximumHeights:l,minimumHeights:s,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},WallGeometry.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,r=e._maximumHeights,n=e._vertexFormat,a=e._granularity,o=e._ellipsoid;if(defined(r=WallGeometryLibrary.computePositions(o,t,r,i,a,!0))){for(var s=r.bottomPositions,l=r.topPositions,c=(i=r.numCorners,l.length),u=(a=2*c,n.position?new Float64Array(a):void 0),d=n.normal?new Float32Array(a):void 0,h=n.tangent?new Float32Array(a):void 0,p=n.bitangent?new Float32Array(a):void 0,f=n.st?new Float32Array(a/3*2):void 0,m=0,g=0,y=0,_=0,v=0,C=scratchNormal$6,x=scratchTangent$4,b=scratchBitangent$4,S=!0,T=0,E=1/((c/=3)-i-1),w=0;w<c;++w){var A,P=3*w,D=Cartesian3.fromArray(l,P,scratchCartesian3Position1),M=Cartesian3.fromArray(s,P,scratchCartesian3Position2);n.position&&(u[m++]=M.x,u[m++]=M.y,u[m++]=M.z,u[m++]=D.x,u[m++]=D.y,u[m++]=D.z),n.st&&(f[v++]=T,f[v++]=0,f[v++]=T,f[v++]=1),(n.normal||n.tangent||n.bitangent)&&(A=Cartesian3.clone(Cartesian3.ZERO,scratchCartesian3Position5),M=Cartesian3.subtract(D,o.geodeticSurfaceNormal(D,scratchCartesian3Position2),scratchCartesian3Position2),w+1<c&&(A=Cartesian3.fromArray(l,3+P,scratchCartesian3Position5)),S&&(P=Cartesian3.subtract(A,D,scratchCartesian3Position4),M=Cartesian3.subtract(M,D,scratchCartesian3Position1),C=Cartesian3.normalize(Cartesian3.cross(M,P,C),C),S=!1),Cartesian3.equalsEpsilon(D,A,CesiumMath.EPSILON10)?S=!0:(T+=E,n.tangent&&(x=Cartesian3.normalize(Cartesian3.subtract(A,D,x),x)),n.bitangent&&(b=Cartesian3.normalize(Cartesian3.cross(C,x,b),b))),n.normal&&(d[g++]=C.x,d[g++]=C.y,d[g++]=C.z,d[g++]=C.x,d[g++]=C.y,d[g++]=C.z),n.tangent&&(h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,h[_++]=x.x,h[_++]=x.y,h[_++]=x.z),n.bitangent&&(p[y++]=b.x,p[y++]=b.y,p[y++]=b.z,p[y++]=b.x,p[y++]=b.y,p[y++]=b.z))}r=new GeometryAttributes,n.position&&(r.position=new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(r.normal=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(r.tangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:h})),n.bitangent&&(r.bitangent=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:p})),n.st&&(r.st=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:f}));var I=a/3;a-=6*(i+1);var R=IndexDatatype$1.createTypedArray(I,a),O=0;for(w=0;w<I-2;w+=2){var L=w,N=w+2,F=Cartesian3.fromArray(u,3*L,scratchCartesian3Position1),B=Cartesian3.fromArray(u,3*N,scratchCartesian3Position2);Cartesian3.equalsEpsilon(F,B,CesiumMath.EPSILON10)||(F=w+1,B=w+3,R[O++]=F,R[O++]=L,R[O++]=B,R[O++]=B,R[O++]=L,R[O++]=N)}return new Geometry({attributes:r,indices:R,primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:new BoundingSphere.fromVertices(u)})}};var scratchCartesian3Position1$1=new Cartesian3,scratchCartesian3Position2$1=new Cartesian3;function WallOutlineGeometry(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.maximumHeights,r=e.minimumHeights,n=defaultValue(e.granularity,CesiumMath.RADIANS_PER_DEGREE);e=defaultValue(e.ellipsoid,Ellipsoid.WGS84);this._positions=t,this._minimumHeights=r,this._maximumHeights=i,this._granularity=n,this._ellipsoid=Ellipsoid.clone(e),this._workerName="createWallOutlineGeometry",t=1+t.length*Cartesian3.packedLength+2,defined(r)&&(t+=r.length),defined(i)&&(t+=i.length),this.packedLength=t+Ellipsoid.packedLength+1}WallOutlineGeometry.pack=function(e,t,i){var r;i=defaultValue(i,0);var n=e._positions,a=n.length;for(t[i++]=a,r=0;r<a;++r,i+=Cartesian3.packedLength)Cartesian3.pack(n[r],t,i);var o=e._minimumHeights;a=defined(o)?o.length:0;if(t[i++]=a,defined(o))for(r=0;r<a;++r)t[i++]=o[r];var s=e._maximumHeights;if(a=defined(s)?s.length:0,t[i++]=a,defined(s))for(r=0;r<a;++r)t[i++]=s[r];return Ellipsoid.pack(e._ellipsoid,t,i),t[i+=Ellipsoid.packedLength]=e._granularity,t};var scratchEllipsoid$d=Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),scratchOptions$n={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:scratchEllipsoid$d,granularity:void 0},implementation$1;function WeightSpline(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).weights;e=e.times;this._times=e,this._weights=t,this._count=t.length/e.length,this._lastTimeIndex=0}function arraySlice(e,t,i){if("function"==typeof e.slice)return e.slice(t,i);for(var r=Array.prototype.slice.call(e,t,i),n=FeatureDetection.typedArrayTypes,a=n.length,o=0;o<a;++o)if(e instanceof n[o]){r=new n[o](r);break}return r}function cancelAnimationFramePolyfill(e){implementation$1(e)}function createGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function createWorldTerrain(e){return e=defaultValue(e,defaultValue.EMPTY_OBJECT),new CesiumTerrainProvider({url:IonResource.fromAssetId(1),requestVertexNormals:defaultValue(e.requestVertexNormals,!1),requestWaterMask:defaultValue(e.requestWaterMask,!1)})}WallOutlineGeometry.unpack=function(e,t,i){t=defaultValue(t,0);for(var r,n,a=e[t++],o=new Array(a),s=0;s<a;++s,t+=Cartesian3.packedLength)o[s]=Cartesian3.unpack(e,t);if(0<(a=e[t++]))for(r=new Array(a),s=0;s<a;++s)r[s]=e[t++];if(0<(a=e[t++]))for(n=new Array(a),s=0;s<a;++s)n[s]=e[t++];var l=Ellipsoid.unpack(e,t,scratchEllipsoid$d),c=e[t+=Ellipsoid.packedLength];return defined(i)?(i._positions=o,i._minimumHeights=r,i._maximumHeights=n,i._ellipsoid=Ellipsoid.clone(l,i._ellipsoid),i._granularity=c,i):(scratchOptions$n.positions=o,scratchOptions$n.minimumHeights=r,scratchOptions$n.maximumHeights=n,scratchOptions$n.granularity=c,new WallOutlineGeometry(scratchOptions$n))},WallOutlineGeometry.fromConstantHeights=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).positions,i=e.minimumHeight,r=e.maximumHeight,n=defined(i),a=defined(r);if(n||a)for(var o=t.length,s=n?new Array(o):void 0,l=a?new Array(o):void 0,c=0;c<o;++c)n&&(s[c]=i),a&&(l[c]=r);return new WallOutlineGeometry({positions:t,maximumHeights:l,minimumHeights:s,ellipsoid:e.ellipsoid})},WallOutlineGeometry.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,r=e._maximumHeights,n=e._granularity;e=e._ellipsoid;if(defined(i=WallGeometryLibrary.computePositions(e,t,r,i,n,!1))){var a=i.bottomPositions,o=i.topPositions,s=o.length,l=(n=2*s,new Float64Array(n)),c=0;for(s/=3,m=0;m<s;++m){var u=3*m,d=Cartesian3.fromArray(o,u,scratchCartesian3Position1$1);u=Cartesian3.fromArray(a,u,scratchCartesian3Position2$1);l[c++]=u.x,l[c++]=u.y,l[c++]=u.z,l[c++]=d.x,l[c++]=d.y,l[c++]=d.z}i=new GeometryAttributes({position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:l})});for(var h=n/3,p=(n=2*h-4+h,IndexDatatype$1.createTypedArray(h,n)),f=0,m=0;m<h-2;m+=2){var g=m,y=m+2,_=Cartesian3.fromArray(l,3*g,scratchCartesian3Position1$1),v=Cartesian3.fromArray(l,3*y,scratchCartesian3Position2$1);Cartesian3.equalsEpsilon(_,v,CesiumMath.EPSILON10)||(_=m+1,v=m+3,p[f++]=_,p[f++]=g,p[f++]=_,p[f++]=v,p[f++]=g,p[f++]=y)}return p[f++]=h-2,p[f++]=h-1,new Geometry({attributes:i,indices:p,primitiveType:PrimitiveType$1.LINES,boundingSphere:new BoundingSphere.fromVertices(l)})}},Object.defineProperties(WeightSpline.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}}),WeightSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,WeightSpline.prototype.wrapTime=Spline.prototype.wrapTime,WeightSpline.prototype.clampTime=Spline.prototype.clampTime,WeightSpline.prototype.evaluate=function(e,t){var i=this.weights,r=this.times,n=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),a=(e-r[n])/(r[n+1]-r[n]);defined(t)||(t=new Array(this._count));for(var o=0;o<this._count;o++){var s=n*this._count+o;t[o]=i[s]*(1-a)+i[s+this._count]*a}return t},"undefined"!=typeof cancelAnimationFrame&&(implementation$1=cancelAnimationFrame),function(){if(!defined(implementation$1)&&"undefined"!=typeof window)for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!defined(implementation$1);)defined(implementation$1=window[e[t]+"CancelAnimationFrame"])||(implementation$1=window[e[t]+"CancelRequestAnimationFrame"]),++t;defined(implementation$1)||(implementation$1=clearTimeout)}();var compressedMagic=1953029805,compressedMagicSwap=2917034100;function decodeGoogleEarthEnterpriseData(e,t){if(decodeGoogleEarthEnterpriseData.passThroughDataForTesting)return t;var i=e.byteLength;if(0===i||i%4!=0)throw new RuntimeError("The length of key must be greater than 0 and a multiple of 4.");var r=new DataView(t),n=r.getUint32(0,!0);if(n===compressedMagic||n===compressedMagicSwap)return t;for(var a,o=new DataView(e),s=0,l=t.byteLength,c=l-l%8,u=i,d=8;s<c;)for(a=d=(d+8)%24;s<c&&a<u;)r.setUint32(s,r.getUint32(s,!0)^o.getUint32(a,!0),!0),r.setUint32(s+4,r.getUint32(s+4,!0)^o.getUint32(a+4,!0),!0),s+=8,a+=24;if(s<l)for(u<=a&&(a=d=(d+8)%24);s<l;)r.setUint8(s,r.getUint8(s)^o.getUint8(a)),s++,a++}function deprecationWarning(e,t){oneTimeWarning(e,t)}function getFilenameFromUri(e){var t=new URI(e);return t.normalize(),-1!==(t=(e=t.path).lastIndexOf("/"))&&(e=e.substr(t+1)),e}function getMagic(e,t){return getStringFromTypedArray(e,t=defaultValue(t,0),Math.min(4,e.length))}decodeGoogleEarthEnterpriseData.passThroughDataForTesting=!1;var transcodeTaskProcessor=new TaskProcessor("transcodeCRNToDXT",Number.POSITIVE_INFINITY);function loadCRN(e){if(defined(e=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?when.resolve(e):Resource.createIfNeeded(e).fetchArrayBuffer()))return e.then((function(e){if(defined(e)){var t=[];return e instanceof ArrayBuffer?t.push(e):(0===e.byteOffset&&e.byteLength===e.buffer.byteLength||(e=e.slice(0,e.length)),t.push(e.buffer)),transcodeTaskProcessor.scheduleTask(e,t)}})).then((function(e){return CompressedTextureBuffer.clone(e)}))}function loadImageFromTypedArray(e){var t,i=e.uint8Array,r=e.format,n=e.request,a=defaultValue(e.flipY,!1),o=new Blob([i],{type:r});return Resource.supportsImageBitmapOptions().then((function(e){return e?when(Resource.createImageBitmapFromBlob(o,{flipY:a,premultiplyAlpha:!1})):new Resource({url:t=window.URL.createObjectURL(o),request:n}).fetchImage({flipY:a})})).then((function(e){return defined(t)&&window.URL.revokeObjectURL(t),e})).otherwise((function(e){return defined(t)&&window.URL.revokeObjectURL(t),when.reject(e)}))}function loadKTX(e){if(defined(e=e instanceof ArrayBuffer||ArrayBuffer.isView(e)?when.resolve(e):Resource.createIfNeeded(e).fetchArrayBuffer()))return e.then((function(e){if(defined(e))return parseKTX(e)}))}var fileIdentifier=[171,75,84,88,32,49,49,187,13,10,26,10],endiannessTest=67305985,faceOrder=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],sizeOfUint32$1=4;function parseKTX(e){for(var t,i=new Uint8Array(e),r=!0,n=0;n<fileIdentifier.length;++n)if(fileIdentifier[n]!==i[n]){r=!1;break}if(!r)throw new RuntimeError("Invalid KTX file.");t=defined(e.buffer)?(_=new DataView(e.buffer),e.byteOffset):(_=new DataView(e),0),t+=12;var a=_.getUint32(t,!0);if(t+=sizeOfUint32$1,a!==endiannessTest)throw new RuntimeError("File is the wrong endianness.");var o=_.getUint32(t,!0);t+=sizeOfUint32$1;var s=_.getUint32(t,!0);t+=sizeOfUint32$1;var l=_.getUint32(t,!0);t+=sizeOfUint32$1;var c=_.getUint32(t,!0);t+=sizeOfUint32$1;var u=_.getUint32(t,!0);t+=sizeOfUint32$1;var d=_.getUint32(t,!0);t+=sizeOfUint32$1;var h=_.getUint32(t,!0);t+=sizeOfUint32$1;var p=_.getUint32(t,!0);t+=sizeOfUint32$1;var f=_.getUint32(t,!0);t+=sizeOfUint32$1;var m=_.getUint32(t,!0);t+=sizeOfUint32$1;var g=_.getUint32(t,!0);t+=sizeOfUint32$1,a=_.getUint32(t,!0),t+=sizeOfUint32$1,t+=a;var y,_=_.getUint32(t,!0);if(t+=sizeOfUint32$1,y=defined(e.buffer)?new Uint8Array(e.buffer,t,_):new Uint8Array(e,t,_),c===WebGLConstants$1.RGB8?c=PixelFormat$1.RGB:c===WebGLConstants$1.RGBA8&&(c=PixelFormat$1.RGBA),!PixelFormat$1.validate(c))throw new RuntimeError("glInternalFormat is not a valid format.");if(PixelFormat$1.isCompressedFormat(c)){if(0!==o)throw new RuntimeError("glType must be zero when the texture is compressed.");if(1!==s)throw new RuntimeError("The type size for compressed textures must be 1.");if(0!==l)throw new RuntimeError("glFormat must be zero when the texture is compressed.")}else{if(o!==WebGLConstants$1.UNSIGNED_BYTE)throw new RuntimeError("Only unsigned byte buffers are supported.");if(u!==l)throw new RuntimeError("The base internal format must be the same as the format for uncompressed textures.")}if(0!==p)throw new RuntimeError("3D textures are unsupported.");if(0!==f)throw new RuntimeError("Texture arrays are unsupported.");var v=y.byteOffset,C=new Array(g);for(n=0;n<g;++n){for(var x=C[n]={},b=0;b<m;++b){var S=d>>n,T=h>>n,E=PixelFormat$1.isCompressedFormat(c)?PixelFormat$1.compressedTextureSizeInBytes(c,S,T):PixelFormat$1.textureSizeInBytes(c,o,S,T),w=new Uint8Array(y.buffer,v,E);x[faceOrder[b]]=new CompressedTextureBuffer(c,S,T,w),v+=E}v+=3-(v+3)%4+4}var A=C;if(1===m)for(n=0;n<g;++n)A[n]=A[n][faceOrder[0]];return 1===g&&(A=A[0]),A}var leftScratchArray=[],rightScratchArray=[];function merge(e,t,i,r,n,a){for(var o,s=n-r+1,l=a-n,c=leftScratchArray,u=rightScratchArray,d=0;d<s;++d)c[d]=e[r+d];for(o=0;o<l;++o)u[o]=e[n+o+1];o=d=0;for(var h=r;h<=a;++h){var p=c[d],f=u[o];d<s&&(l<=o||t(p,f,i)<=0)?(e[h]=p,++d):o<l&&(e[h]=f,++o)}}function sort(e,t,i,r,n){var a;n<=r||(sort(e,t,i,r,a=Math.floor(.5*(r+n))),sort(e,t,i,a+1,n),merge(e,t,i,r,a,n))}function mergeSort(e,t,i){var r=e.length,n=Math.ceil(.5*r);leftScratchArray.length=n,rightScratchArray.length=n,sort(e,t,i,0,r-1),leftScratchArray.length=0,rightScratchArray.length=0}var coords=new Cartesian3,implementation$2;function pointInsideTriangle(e,t,i,r){return barycentricCoordinates(e,t,i,r,coords),0<coords.x&&0<coords.y&&0<coords.z}function requestAnimationFramePolyFill(e){return implementation$2(e)}function sampleTerrain(e,t,i){return e.readyPromise.then((function(){return doSampling(e,t,i)}))}function doSampling(e,t,i){for(var r=e.tilingScheme,n=[],a={},o=0;o<i.length;++o){var s=r.positionToTileXY(i[o],t),l=s.toString();a.hasOwnProperty(l)||(s={x:s.x,y:s.y,level:t,tilingScheme:r,terrainProvider:e,positions:[]},a[l]=s,n.push(s)),a[l].positions.push(i[o])}var c=[];for(o=0;o<n.length;++o){var u=(u=n[o]).terrainProvider.requestTileGeometry(u.x,u.y,u.level).then(createInterpolateFunction(u)).otherwise(createMarkFailedFunction(u));c.push(u)}return when.all(c,(function(){return i}))}function createInterpolateFunction(e){var t=e.positions,i=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(e){for(var r=0;r<t.length;++r){var n=t[r];n.height=e.interpolateHeight(i,n.longitude,n.latitude)}}}function createMarkFailedFunction(e){var t=e.positions;return function(){for(var e=0;e<t.length;++e)t[e].height=void 0}}"undefined"!=typeof requestAnimationFrame&&(implementation$2=requestAnimationFrame),function(){if(!defined(implementation$2)&&"undefined"!=typeof window)for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t<i&&!defined(implementation$2);)implementation$2=window[e[t]+"RequestAnimationFrame"],++t;var r;defined(implementation$2)||(r=0,implementation$2=function(e){var t=getTimestamp$1(),i=Math.max(1e3/60-(t-r),0);return r=t+i,setTimeout((function(){e(r)}),i)})}();var scratchCartesian2$7=new Cartesian2;function sampleTerrainMostDetailed(e,t){return e.readyPromise.then((function(){for(var i=[],r=[],n=e.availability,a=[],o=0;o<t.length;++o){var s=t[o],l=n.computeMaximumLevelAtPosition(s);0===(r[o]=l)&&(e.tilingScheme.positionToTileXY(s,1,scratchCartesian2$7),defined(c=e.loadTileDataAvailability(scratchCartesian2$7.x,scratchCartesian2$7.y,1))&&a.push(c));var c=i[l];defined(c)||(i[l]=c=[]),c.push(s)}return when.all(a).then((function(){return when.all(i.map((function(t,i){if(defined(t))return sampleTerrain(e,i,t)})))})).then((function(){for(var i=[],a=0;a<t.length;++a){var o=t[a];n.computeMaximumLevelAtPosition(o)!==r[a]&&i.push(o)}if(0<i.length)return sampleTerrainMostDetailed(e,i)})).then((function(){return t}))}))}function subdivideArray(e,t){for(var i=[],r=e.length,n=0;n<r;){var a=Math.ceil((r-n)/t--);i.push(e.slice(n,n+a)),n+=a}return i}function webGLConstantToGlslType(e){switch(e){case WebGLConstants$1.FLOAT:return"float";case WebGLConstants$1.FLOAT_VEC2:return"vec2";case WebGLConstants$1.FLOAT_VEC3:return"vec3";case WebGLConstants$1.FLOAT_VEC4:return"vec4";case WebGLConstants$1.FLOAT_MAT2:return"mat2";case WebGLConstants$1.FLOAT_MAT3:return"mat3";case WebGLConstants$1.FLOAT_MAT4:return"mat4";case WebGLConstants$1.SAMPLER_2D:return"sampler2D";case WebGLConstants$1.BOOL:return"bool"}}function wrapFunction(e,t,i){return function(){i.apply(e,arguments),t.apply(e,arguments)}}function ConstantProperty(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new Event,this.setValue(e)}function createProperty(e,t,i,r,n){return{configurable:r,get:function(){return this[t]},set:function(r){var a=this[t],o=this[i];defined(o)&&(o(),this[i]=void 0),!(void 0!==r)||defined(r)&&defined(r.getValue)||!defined(n)||(r=n(r)),a!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,a)),defined(r)&&defined(r.definitionChanged)&&(this[i]=r.definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this,e,r,r)}),this))}}}function createConstantProperty(e){return new ConstantProperty(e)}function createPropertyDescriptor(e,t,i){return createProperty(e,"_"+e.toString(),"_"+e.toString()+"Subscription",defaultValue(t,!1),defaultValue(i,createConstantProperty))}function BillboardGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}Object.defineProperties(ConstantProperty.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),ConstantProperty.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},ConstantProperty.prototype.setValue=function(e){var t,i,r=this._value;r!==e&&(t=(i=defined(e))&&"function"==typeof e.clone,(i=i&&"function"==typeof e.equals)&&e.equals(r)||(this._hasClone=t,this._hasEquals=i,this._value=t?e.clone(this._value):e,this._definitionChanged.raiseEvent(this)))},ConstantProperty.prototype.equals=function(e){return this===e||e instanceof ConstantProperty&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},ConstantProperty.prototype.valueOf=function(){return this._value},ConstantProperty.prototype.toString=function(){return String(this._value)},Object.defineProperties(BillboardGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),image:createPropertyDescriptor("image"),scale:createPropertyDescriptor("scale"),pixelOffset:createPropertyDescriptor("pixelOffset"),eyeOffset:createPropertyDescriptor("eyeOffset"),horizontalOrigin:createPropertyDescriptor("horizontalOrigin"),verticalOrigin:createPropertyDescriptor("verticalOrigin"),heightReference:createPropertyDescriptor("heightReference"),color:createPropertyDescriptor("color"),rotation:createPropertyDescriptor("rotation"),alignedAxis:createPropertyDescriptor("alignedAxis"),sizeInMeters:createPropertyDescriptor("sizeInMeters"),width:createPropertyDescriptor("width"),height:createPropertyDescriptor("height"),scaleByDistance:createPropertyDescriptor("scaleByDistance"),translucencyByDistance:createPropertyDescriptor("translucencyByDistance"),pixelOffsetScaleByDistance:createPropertyDescriptor("pixelOffsetScaleByDistance"),imageSubRegion:createPropertyDescriptor("imageSubRegion"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),disableDepthTestDistance:createPropertyDescriptor("disableDepthTestDistance")}),BillboardGraphics.prototype.clone=function(e){return defined(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new BillboardGraphics(this)},BillboardGraphics.prototype.merge=function(e){this.show=defaultValue(this._show,e.show),this.image=defaultValue(this._image,e.image),this.scale=defaultValue(this._scale,e.scale),this.pixelOffset=defaultValue(this._pixelOffset,e.pixelOffset),this.eyeOffset=defaultValue(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=defaultValue(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=defaultValue(this._verticalOrigin,e.verticalOrigin),this.heightReference=defaultValue(this._heightReference,e.heightReference),this.color=defaultValue(this._color,e.color),this.rotation=defaultValue(this._rotation,e.rotation),this.alignedAxis=defaultValue(this._alignedAxis,e.alignedAxis),this.sizeInMeters=defaultValue(this._sizeInMeters,e.sizeInMeters),this.width=defaultValue(this._width,e.width),this.height=defaultValue(this._height,e.height),this.scaleByDistance=defaultValue(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=defaultValue(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=defaultValue(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=defaultValue(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=defaultValue(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=defaultValue(this._disableDepthTestDistance,e.disableDepthTestDistance)};var HeightReference={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2},HeightReference$1=Object.freeze(HeightReference),HorizontalOrigin={CENTER:0,LEFT:1,RIGHT:-1},HorizontalOrigin$1=Object.freeze(HorizontalOrigin),VerticalOrigin={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},VerticalOrigin$1=Object.freeze(VerticalOrigin),BoundingSphereState={DONE:0,PENDING:1,FAILED:2},BoundingSphereState$1=Object.freeze(BoundingSphereState);function Property(){DeveloperError.throwInstantiationError()}Object.defineProperties(Property.prototype,{isConstant:{get:DeveloperError.throwInstantiationError},definitionChanged:{get:DeveloperError.throwInstantiationError}}),Property.prototype.getValue=DeveloperError.throwInstantiationError,Property.prototype.equals=DeveloperError.throwInstantiationError,Property.equals=function(e,t){return e===t||defined(e)&&e.equals(t)},Property.arrayEquals=function(e,t){if(e===t)return!0;if(!defined(e)||!defined(t)||e.length!==t.length)return!1;for(var i=e.length,r=0;r<i;r++)if(!Property.equals(e[r],t[r]))return!1;return!0},Property.isConstant=function(e){return!defined(e)||e.isConstant},Property.getValueOrUndefined=function(e,t,i){return defined(e)?e.getValue(t,i):void 0},Property.getValueOrDefault=function(e,t,i,r){return defined(e)?defaultValue(e.getValue(t,r),i):i},Property.getValueOrClonedDefault=function(e,t,i,r){var n;return defined(e)&&(n=e.getValue(t,r)),defined(n)||(n=i.clone(n)),n};var defaultColor=Color.WHITE,defaultEyeOffset=Cartesian3.ZERO,defaultHeightReference=HeightReference$1.NONE,defaultPixelOffset=Cartesian2.ZERO,defaultScale$1=1,defaultRotation$1=0,defaultAlignedAxis=Cartesian3.ZERO,defaultHorizontalOrigin=HorizontalOrigin$1.CENTER,defaultVerticalOrigin=VerticalOrigin$1.CENTER,defaultSizeInMeters=!1,positionScratch$4=new Cartesian3,colorScratch$1=new Color,eyeOffsetScratch=new Cartesian3,pixelOffsetScratch=new Cartesian2,scaleByDistanceScratch=new NearFarScalar,translucencyByDistanceScratch=new NearFarScalar,pixelOffsetScaleByDistanceScratch=new NearFarScalar,boundingRectangleScratch=new BoundingRectangle,distanceDisplayConditionScratch=new DistanceDisplayCondition;function EntityData(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function BillboardVisualizer(e,t){t.collectionChanged.addEventListener(BillboardVisualizer.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function returnPrimitive(e,t,i){defined(e)&&(e.billboard=void 0,i.removeBillboard(t))}BillboardVisualizer.prototype.update=function(e){for(var t=this._items.values,i=this._cluster,r=0,n=t.length;r<n;r++){var a,o,s=t[r],l=s.entity,c=l._billboard,u=s.billboard,d=l.isShowing&&l.isAvailable(e)&&Property.getValueOrDefault(c._show,e,!0);d&&(o=Property.getValueOrUndefined(l._position,e,positionScratch$4),a=Property.getValueOrUndefined(c._image,e),d=defined(o)&&defined(a)),d?(Property.isConstant(l._position)||(i._clusterDirty=!0),defined(u)||((u=i.getBillboard(l)).id=l,u.image=void 0,s.billboard=u),u.show=d,defined(u.image)&&s.textureValue===a||(u.image=a,s.textureValue=a),u.position=o,u.color=Property.getValueOrDefault(c._color,e,defaultColor,colorScratch$1),u.eyeOffset=Property.getValueOrDefault(c._eyeOffset,e,defaultEyeOffset,eyeOffsetScratch),u.heightReference=Property.getValueOrDefault(c._heightReference,e,defaultHeightReference),u.pixelOffset=Property.getValueOrDefault(c._pixelOffset,e,defaultPixelOffset,pixelOffsetScratch),u.scale=Property.getValueOrDefault(c._scale,e,defaultScale$1),u.rotation=Property.getValueOrDefault(c._rotation,e,defaultRotation$1),u.alignedAxis=Property.getValueOrDefault(c._alignedAxis,e,defaultAlignedAxis),u.horizontalOrigin=Property.getValueOrDefault(c._horizontalOrigin,e,defaultHorizontalOrigin),u.verticalOrigin=Property.getValueOrDefault(c._verticalOrigin,e,defaultVerticalOrigin),u.width=Property.getValueOrUndefined(c._width,e),u.height=Property.getValueOrUndefined(c._height,e),u.scaleByDistance=Property.getValueOrUndefined(c._scaleByDistance,e,scaleByDistanceScratch),u.translucencyByDistance=Property.getValueOrUndefined(c._translucencyByDistance,e,translucencyByDistanceScratch),u.pixelOffsetScaleByDistance=Property.getValueOrUndefined(c._pixelOffsetScaleByDistance,e,pixelOffsetScaleByDistanceScratch),u.sizeInMeters=Property.getValueOrDefault(c._sizeInMeters,e,defaultSizeInMeters),u.distanceDisplayCondition=Property.getValueOrUndefined(c._distanceDisplayCondition,e,distanceDisplayConditionScratch),u.disableDepthTestDistance=Property.getValueOrUndefined(c._disableDepthTestDistance,e),defined(c=Property.getValueOrUndefined(c._imageSubRegion,e,boundingRectangleScratch))&&u.setImageSubRegion(u._imageId,c)):returnPrimitive(s,l,i)}return!0},BillboardVisualizer.prototype.getBoundingSphere=function(e,t){if(!defined(e=this._items.get(e.id))||!defined(e.billboard))return BoundingSphereState$1.FAILED;if((e=e.billboard).heightReference===HeightReference$1.NONE)t.center=Cartesian3.clone(e.position,t.center);else{if(!defined(e._clampedPosition))return BoundingSphereState$1.PENDING;t.center=Cartesian3.clone(e._clampedPosition,t.center)}return t.radius=0,BoundingSphereState$1.DONE},BillboardVisualizer.prototype.isDestroyed=function(){return!1},BillboardVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(BillboardVisualizer.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return destroyObject(this)},BillboardVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._items,o=this._cluster,s=t.length-1;-1<s;s--)defined((n=t[s])._billboard)&&defined(n._position)&&a.set(n.id,new EntityData(n));for(s=r.length-1;-1<s;s--)defined((n=r[s])._billboard)&&defined(n._position)?a.contains(n.id)||a.set(n.id,new EntityData(n)):(returnPrimitive(a.get(n.id),n,o),a.remove(n.id));for(s=i.length-1;-1<s;s--)n=i[s],returnPrimitive(a.get(n.id),n,o),a.remove(n.id)};var AllMaterialAppearanceFS="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nmat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = tangentToEyeMatrix;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",AllMaterialAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 bitangent;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_tangentEC = czm_normal * tangent;\nv_bitangentEC = czm_normal * bitangent;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",BasicMaterialAppearanceFS="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",BasicMaterialAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",TexturedMaterialAppearanceFS="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nmaterialInput.st = v_st;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",TexturedMaterialAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",BlendEquation={ADD:WebGLConstants$1.FUNC_ADD,SUBTRACT:WebGLConstants$1.FUNC_SUBTRACT,REVERSE_SUBTRACT:WebGLConstants$1.FUNC_REVERSE_SUBTRACT,MIN:WebGLConstants$1.MIN,MAX:WebGLConstants$1.MAX},BlendEquation$1=Object.freeze(BlendEquation),BlendFunction={ZERO:WebGLConstants$1.ZERO,ONE:WebGLConstants$1.ONE,SOURCE_COLOR:WebGLConstants$1.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:WebGLConstants$1.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:WebGLConstants$1.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:WebGLConstants$1.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:WebGLConstants$1.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:WebGLConstants$1.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:WebGLConstants$1.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:WebGLConstants$1.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:WebGLConstants$1.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:WebGLConstants$1.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:WebGLConstants$1.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:WebGLConstants$1.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:WebGLConstants$1.SRC_ALPHA_SATURATE},BlendFunction$1=Object.freeze(BlendFunction),BlendingState={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.SOURCE_ALPHA,functionSourceAlpha:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.ONE,functionSourceAlpha:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.SOURCE_ALPHA,functionSourceAlpha:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE,functionDestinationAlpha:BlendFunction$1.ONE})},BlendingState$1=Object.freeze(BlendingState),CullFace={FRONT:WebGLConstants$1.FRONT,BACK:WebGLConstants$1.BACK,FRONT_AND_BACK:WebGLConstants$1.FRONT_AND_BACK},CullFace$1=Object.freeze(CullFace);function Appearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.material=e.material,this.translucent=defaultValue(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=defaultValue(e.closed,!1)}Object.defineProperties(Appearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}}),Appearance.prototype.getFragmentShaderSource=function(){var e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),defined(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join("\n")},Appearance.prototype.isTranslucent=function(){return defined(this.material)&&this.material.isTranslucent()||!defined(this.material)&&this.translucent},Appearance.prototype.getRenderState=function(){var e=this.isTranslucent(),t=clone(this.renderState,!1);return e?(t.depthMask=!1,t.blending=BlendingState$1.ALPHA_BLEND):t.depthMask=!0,t},Appearance.getDefaultRenderState=function(e,t,i){var r={depthTest:{enabled:!0}};return e&&(r.depthMask=!1,r.blending=BlendingState$1.ALPHA_BLEND),t&&(r.cull={enabled:!0,face:CullFace$1.BACK}),defined(i)&&(r=combine(i,r,!0)),r};var ContextLimits={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1};function CubeMapFace(e,t,i,r,n,a,o,s,l,c,u){this._context=e,this._texture=t,this._textureTarget=i,this._targetFace=r,this._pixelDatatype=o,this._internalFormat=n,this._pixelFormat=a,this._size=s,this._preMultiplyAlpha=l,this._flipY=c,this._initialized=u}Object.defineProperties(ContextLimits,{maximumCombinedTextureImageUnits:{get:function(){return ContextLimits._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return ContextLimits._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return ContextLimits._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return ContextLimits._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return ContextLimits._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return ContextLimits._maximumTextureSize}},maximumVaryingVectors:{get:function(){return ContextLimits._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return ContextLimits._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return ContextLimits._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return ContextLimits._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return ContextLimits._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return ContextLimits._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return ContextLimits._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return ContextLimits._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return ContextLimits._maximumViewportWidth}},maximumViewportHeight:{get:function(){return ContextLimits._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return ContextLimits._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return ContextLimits._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return ContextLimits._maximumColorAttachments}},highpFloatSupported:{get:function(){return ContextLimits._highpFloatSupported}},highpIntSupported:{get:function(){return ContextLimits._highpIntSupported}}}),Object.defineProperties(CubeMapFace.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),CubeMapFace.prototype.copyFrom=function(e,t,i){t=defaultValue(t,0),i=defaultValue(i,0);var r=this._context._gl,n=this._textureTarget,a=this._targetFace;r.activeTexture(r.TEXTURE0),r.bindTexture(n,this._texture);var o=e.width,s=e.height,l=e.arrayBufferView,c=this._size,u=this._pixelFormat,d=this._internalFormat,h=this._pixelDatatype,p=this._preMultiplyAlpha,f=this._flipY,m=4;defined(l)&&(m=PixelFormat$1.alignmentInBytes(u,h,o)),r.pixelStorei(r.UNPACK_ALIGNMENT,m);var g=!1;this._initialized||(0===t&&0===i&&o===c&&s===c?(defined(l)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),f&&(l=PixelFormat$1.flipY(l,u,h,c,c)),r.texImage2D(a,0,d,c,c,0,u,PixelDatatype$1.toWebGLConstant(h,this._context),l)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,f),r.texImage2D(a,0,d,u,PixelDatatype$1.toWebGLConstant(h,this._context),e)),g=!0):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),m=PixelFormat$1.createTypedArray(u,h,c,c),r.texImage2D(a,0,d,c,c,0,u,PixelDatatype$1.toWebGLConstant(h,this._context),m)),this._initialized=!0),g||(defined(l)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),f&&(l=PixelFormat$1.flipY(l,u,h,o,s)),r.texSubImage2D(a,0,t,i,o,s,u,PixelDatatype$1.toWebGLConstant(h,this._context),l)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,f),r.texSubImage2D(a,0,t,i,u,PixelDatatype$1.toWebGLConstant(h,this._context),e))),r.bindTexture(n,null)},CubeMapFace.prototype.copyFromFramebuffer=function(e,t,i,r,n,a){e=defaultValue(e,0),t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,0),n=defaultValue(n,this._size),a=defaultValue(a,this._size);var o=this._context._gl,s=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(s,this._texture),o.copyTexSubImage2D(this._targetFace,0,e,t,i,r,n,a),o.bindTexture(s,null),this._initialized=!0};var MipmapHint={DONT_CARE:WebGLConstants$1.DONT_CARE,FASTEST:WebGLConstants$1.FASTEST,NICEST:WebGLConstants$1.NICEST,validate:function(e){return e===MipmapHint.DONT_CARE||e===MipmapHint.FASTEST||e===MipmapHint.NICEST}},MipmapHint$1=Object.freeze(MipmapHint),TextureMagnificationFilter={NEAREST:WebGLConstants$1.NEAREST,LINEAR:WebGLConstants$1.LINEAR,validate:function(e){return e===TextureMagnificationFilter.NEAREST||e===TextureMagnificationFilter.LINEAR}},TextureMagnificationFilter$1=Object.freeze(TextureMagnificationFilter),TextureMinificationFilter={NEAREST:WebGLConstants$1.NEAREST,LINEAR:WebGLConstants$1.LINEAR,NEAREST_MIPMAP_NEAREST:WebGLConstants$1.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:WebGLConstants$1.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:WebGLConstants$1.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:WebGLConstants$1.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===TextureMinificationFilter.NEAREST||e===TextureMinificationFilter.LINEAR||e===TextureMinificationFilter.NEAREST_MIPMAP_NEAREST||e===TextureMinificationFilter.LINEAR_MIPMAP_NEAREST||e===TextureMinificationFilter.NEAREST_MIPMAP_LINEAR||e===TextureMinificationFilter.LINEAR_MIPMAP_LINEAR}},TextureMinificationFilter$1=Object.freeze(TextureMinificationFilter),TextureWrap={CLAMP_TO_EDGE:WebGLConstants$1.CLAMP_TO_EDGE,REPEAT:WebGLConstants$1.REPEAT,MIRRORED_REPEAT:WebGLConstants$1.MIRRORED_REPEAT,validate:function(e){return e===TextureWrap.CLAMP_TO_EDGE||e===TextureWrap.REPEAT||e===TextureWrap.MIRRORED_REPEAT}},TextureWrap$1=Object.freeze(TextureWrap);function Sampler(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.wrapS,TextureWrap$1.CLAMP_TO_EDGE),i=defaultValue(e.wrapT,TextureWrap$1.CLAMP_TO_EDGE),r=defaultValue(e.minificationFilter,TextureMinificationFilter$1.LINEAR),n=defaultValue(e.magnificationFilter,TextureMagnificationFilter$1.LINEAR);e=defined(e.maximumAnisotropy)?e.maximumAnisotropy:1;this._wrapS=t,this._wrapT=i,this._minificationFilter=r,this._magnificationFilter=n,this._maximumAnisotropy=e}function CubeMap(e){var t,i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,r=e.source;defined(r)?(p=[r.positiveX,r.negativeX,r.positiveY,r.negativeY,r.positiveZ,r.negativeZ],t=p[0].width,p[0].height):(t=e.width,e.height);var n=t,a=defaultValue(e.pixelDatatype,PixelDatatype$1.UNSIGNED_BYTE),o=defaultValue(e.pixelFormat,PixelFormat$1.RGBA),s=PixelFormat$1.toInternalFormat(o,a,i),l=6*PixelFormat$1.textureSizeInBytes(o,a,n,n),c=e.preMultiplyAlpha||o===PixelFormat$1.RGB||o===PixelFormat$1.LUMINANCE,u=defaultValue(e.flipY,!0),d=i._gl,h=d.TEXTURE_CUBE_MAP,p=d.createTexture();function f(e,r,l,c){var u=r.arrayBufferView;defined(u)||(u=r.bufferView);var h=4;defined(u)&&(h=PixelFormat$1.alignmentInBytes(o,a,t)),d.pixelStorei(d.UNPACK_ALIGNMENT,h),defined(u)?(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1),c&&(u=PixelFormat$1.flipY(u,o,a,n,n)),d.texImage2D(e,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),u)):(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,c),d.texImage2D(e,0,s,o,PixelDatatype$1.toWebGLConstant(a,i),r))}d.activeTexture(d.TEXTURE0),d.bindTexture(h,p),defined(r)?(f(d.TEXTURE_CUBE_MAP_POSITIVE_X,r.positiveX,c,u),f(d.TEXTURE_CUBE_MAP_NEGATIVE_X,r.negativeX,c,u),f(d.TEXTURE_CUBE_MAP_POSITIVE_Y,r.positiveY,c,u),f(d.TEXTURE_CUBE_MAP_NEGATIVE_Y,r.negativeY,c,u),f(d.TEXTURE_CUBE_MAP_POSITIVE_Z,r.positiveZ,c,u),f(d.TEXTURE_CUBE_MAP_NEGATIVE_Z,r.negativeZ,c,u)):(d.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_X,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_NEGATIVE_X,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_Y,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_POSITIVE_Z,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null),d.texImage2D(d.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,s,n,n,0,o,PixelDatatype$1.toWebGLConstant(a,i),null)),d.bindTexture(h,null),this._context=i,this._textureFilterAnisotropic=i._textureFilterAnisotropic,this._textureTarget=h,this._texture=p,this._pixelFormat=o,this._pixelDatatype=a,this._size=n,this._hasMipmap=!1,this._sizeInBytes=l,this._preMultiplyAlpha=c,this._flipY=u,this._sampler=void 0,r=defined(r),this._positiveX=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_POSITIVE_X,s,o,a,n,c,u,r),this._negativeX=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_NEGATIVE_X,s,o,a,n,c,u,r),this._positiveY=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_POSITIVE_Y,s,o,a,n,c,u,r),this._negativeY=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_NEGATIVE_Y,s,o,a,n,c,u,r),this._positiveZ=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_POSITIVE_Z,s,o,a,n,c,u,r),this._negativeZ=new CubeMapFace(i,p,h,d.TEXTURE_CUBE_MAP_NEGATIVE_Z,s,o,a,n,c,u,r),this.sampler=defined(e.sampler)?e.sampler:new Sampler}function Texture(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,i=e.width,r=e.height,n=e.source;defined(n)&&(defined(i)||(i=defaultValue(n.videoWidth,n.width)),defined(r)||(r=defaultValue(n.videoHeight,n.height)));var a=defaultValue(e.pixelFormat,PixelFormat$1.RGBA),o=defaultValue(e.pixelDatatype,PixelDatatype$1.UNSIGNED_BYTE),s=PixelFormat$1.toInternalFormat(a,o,t),l=PixelFormat$1.isCompressedFormat(s),c=e.preMultiplyAlpha||a===PixelFormat$1.RGB||a===PixelFormat$1.LUMINANCE,u=defaultValue(e.flipY,!0),d=!0,h=t._gl,p=h.TEXTURE_2D,f=h.createTexture();h.activeTexture(h.TEXTURE0),h.bindTexture(p,f);var m=4;if(defined(n)&&defined(n.arrayBufferView)&&!l&&(m=PixelFormat$1.alignmentInBytes(a,o,i)),h.pixelStorei(h.UNPACK_ALIGNMENT,m),defined(n))if(defined(n.arrayBufferView)){if(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1),m=n.arrayBufferView,l)h.compressedTexImage2D(p,0,s,i,r,0,m);else if(u&&(m=PixelFormat$1.flipY(m,a,o,i,r)),h.texImage2D(p,0,s,i,r,0,a,PixelDatatype$1.toWebGLConstant(o,t),m),defined(n.mipLevels))for(var g=i,y=r,_=0;_<n.mipLevels.length;++_)(g=0|Math.floor(g/2))<1&&(g=1),(y=0|Math.floor(y/2))<1&&(y=1),h.texImage2D(p,_+1,s,g,y,0,a,PixelDatatype$1.toWebGLConstant(o,t),n.mipLevels[_])}else defined(n.framebuffer)?(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1),n.framebuffer!==t.defaultFramebuffer&&n.framebuffer._bind(),h.copyTexImage2D(p,0,s,n.xOffset,n.yOffset,i,r,0),n.framebuffer!==t.defaultFramebuffer&&n.framebuffer._unBind()):(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,c),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,u),h.texImage2D(p,0,s,a,PixelDatatype$1.toWebGLConstant(o,t),n));else h.texImage2D(p,0,s,i,r,0,a,PixelDatatype$1.toWebGLConstant(o,t),null),d=!1;h.bindTexture(p,null),l=l?PixelFormat$1.compressedTextureSizeInBytes(a,i,r):PixelFormat$1.textureSizeInBytes(a,o,i,r),this._id=createGuid(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p,this._texture=f,this._internalFormat=s,this._pixelFormat=a,this._pixelDatatype=o,this._width=i,this._height=r,this._dimensions=new Cartesian2(i,r),this._hasMipmap=!1,this._sizeInBytes=l,this._preMultiplyAlpha=c,this._flipY=u,this._initialized=d,this._sampler=void 0,this.sampler=defined(e.sampler)?e.sampler:new Sampler}Object.defineProperties(Sampler.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),Sampler.equals=function(e,t){return e===t||defined(e)&&defined(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},Sampler.NEAREST=Object.freeze(new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.NEAREST,magnificationFilter:TextureMagnificationFilter$1.NEAREST})),Object.defineProperties(CubeMap.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,r=t===TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST||t===TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR||t===TextureMinificationFilter$1.LINEAR_MIPMAP_NEAREST||t===TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR,n=this._context,a=this._pixelDatatype;(a===PixelDatatype$1.FLOAT&&!n.textureFloatLinear||a===PixelDatatype$1.HALF_FLOAT&&!n.textureHalfFloatLinear)&&(t=r?TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST:TextureMinificationFilter$1.NEAREST,i=TextureMagnificationFilter$1.NEAREST),r=n._gl,n=this._textureTarget,r.activeTexture(r.TEXTURE0),r.bindTexture(n,this._texture),r.texParameteri(n,r.TEXTURE_MIN_FILTER,t),r.texParameteri(n,r.TEXTURE_MAG_FILTER,i),r.texParameteri(n,r.TEXTURE_WRAP_S,e.wrapS),r.texParameteri(n,r.TEXTURE_WRAP_T,e.wrapT),defined(this._textureFilterAnisotropic)&&r.texParameteri(n,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),r.bindTexture(n,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),CubeMap.prototype.generateMipmap=function(e){e=defaultValue(e,MipmapHint$1.DONT_CARE),this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},CubeMap.prototype.isDestroyed=function(){return!1},CubeMap.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=destroyObject(this._positiveX),this._negativeX=destroyObject(this._negativeX),this._positiveY=destroyObject(this._positiveY),this._negativeY=destroyObject(this._negativeY),this._positiveZ=destroyObject(this._positiveZ),this._negativeZ=destroyObject(this._negativeZ),destroyObject(this)},Texture.create=function(e){return new Texture(e)},Texture.fromFramebuffer=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,i=t._gl,r=defaultValue(e.pixelFormat,PixelFormat$1.RGB),n=defaultValue(e.framebufferXOffset,0),a=defaultValue(e.framebufferYOffset,0),o=defaultValue(e.width,i.drawingBufferWidth);return new Texture({context:t,width:o,height:i=defaultValue(e.height,i.drawingBufferHeight),pixelFormat:r,source:{framebuffer:defined(e=e.framebuffer)?e:t.defaultFramebuffer,xOffset:n,yOffset:a,width:o,height:i}})},Object.defineProperties(Texture.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,r=this._context,n=this._pixelFormat,a=this._pixelDatatype,o=t===TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST||t===TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR||t===TextureMinificationFilter$1.LINEAR_MIPMAP_NEAREST||t===TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR;(a===PixelDatatype$1.FLOAT&&!r.textureFloatLinear||a===PixelDatatype$1.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(t=o?TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST:TextureMinificationFilter$1.NEAREST,i=TextureMagnificationFilter$1.NEAREST),r.webgl2&&PixelFormat$1.isDepthFormat(n)&&(t=TextureMinificationFilter$1.NEAREST,i=TextureMagnificationFilter$1.NEAREST),n=r._gl,r=this._textureTarget,n.activeTexture(n.TEXTURE0),n.bindTexture(r,this._texture),n.texParameteri(r,n.TEXTURE_MIN_FILTER,t),n.texParameteri(r,n.TEXTURE_MAG_FILTER,i),n.texParameteri(r,n.TEXTURE_WRAP_S,e.wrapS),n.texParameteri(r,n.TEXTURE_WRAP_T,e.wrapT),defined(this._textureFilterAnisotropic)&&n.texParameteri(r,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),n.bindTexture(r,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),Texture.prototype.copyFrom=function(e,t,i){t=defaultValue(t,0),i=defaultValue(i,0);var r=this._context,n=r._gl,a=this._textureTarget;n.activeTexture(n.TEXTURE0),n.bindTexture(a,this._texture);var o=e.width,s=e.height,l=e.arrayBufferView,c=this._width,u=this._height,d=this._internalFormat,h=this._pixelFormat,p=this._pixelDatatype,f=this._preMultiplyAlpha,m=this._flipY,g=4;defined(l)&&(g=PixelFormat$1.alignmentInBytes(h,p,o)),n.pixelStorei(n.UNPACK_ALIGNMENT,g);var y=!1;this._initialized||(0===t&&0===i&&o===c&&s===u?(defined(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),m&&(l=PixelFormat$1.flipY(l,h,p,c,u)),n.texImage2D(a,0,d,c,u,0,h,PixelDatatype$1.toWebGLConstant(p,r),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,m),n.texImage2D(a,0,d,h,PixelDatatype$1.toWebGLConstant(p,r),e)),y=!0):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),g=PixelFormat$1.createTypedArray(h,p,c,u),n.texImage2D(a,0,d,c,u,0,h,PixelDatatype$1.toWebGLConstant(p,r),g)),this._initialized=!0),y||(defined(l)?(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),m&&(l=PixelFormat$1.flipY(l,h,p,o,s)),n.texSubImage2D(a,0,t,i,o,s,h,PixelDatatype$1.toWebGLConstant(p,r),l)):(n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,f),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,m),n.texSubImage2D(a,0,t,i,h,PixelDatatype$1.toWebGLConstant(p,r),e))),n.bindTexture(a,null)},Texture.prototype.copyFromFramebuffer=function(e,t,i,r,n,a){e=defaultValue(e,0),t=defaultValue(t,0),i=defaultValue(i,0),r=defaultValue(r,0),n=defaultValue(n,this._width),a=defaultValue(a,this._height);var o=this._context._gl,s=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(s,this._texture),o.copyTexSubImage2D(s,0,e,t,i,r,n,a),o.bindTexture(s,null),this._initialized=!0},Texture.prototype.generateMipmap=function(e){e=defaultValue(e,MipmapHint$1.DONT_CARE),this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},Texture.prototype.isDestroyed=function(){return!1},Texture.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),destroyObject(this)};var AspectRampMaterial="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",BumpMapMaterial="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nvec2 centerPixel = fract(repeat * st);\nfloat centerBump = texture2D(image, centerPixel).channel;\nfloat imageWidth = float(imageDimensions.x);\nvec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\nfloat rightBump = texture2D(image, rightPixel).channel;\nfloat imageHeight = float(imageDimensions.y);\nvec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\nfloat topBump = texture2D(image, leftPixel).channel;\nvec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nmaterial.diffuse = vec3(0.01);\nreturn material;\n}\n",CheckerboardMaterial="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0);\nfloat scaledWidth = fract(repeat.s * st.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(repeat.t * st.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value = min(scaledWidth, scaledHeight);\nvec4 currentColor = mix(lightColor, darkColor, b);\nvec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",DotMaterial="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5));\nvec4 color = mix(lightColor, darkColor, b);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",ElevationContourMaterial="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float spacing;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat distanceToContour = mod(materialInput.height, spacing);\n#ifdef GL_OES_standard_derivatives\nfloat dxc = abs(dFdx(materialInput.height));\nfloat dyc = abs(dFdy(materialInput.height));\nfloat dF = max(dxc, dyc) * czm_pixelRatio * width;\nfloat alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\nfloat alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\nvec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",ElevationRampMaterial="uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\nvec4 rampColor = texture2D(image, vec2(scaledHeight, 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",FadeMaterial="uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\nfloat getTime(float t, float coord)\n{\nfloat scalar = 1.0 / maximumDistance;\nfloat q  = distance(t, coord) * scalar;\nif (repeat)\n{\nfloat r = distance(t, coord + 1.0) * scalar;\nfloat s = distance(t, coord - 1.0) * scalar;\nq = min(min(r, s), q);\n}\nreturn clamp(q, 0.0, 1.0);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat s = getTime(time.x, st.s) * fadeDirection.s;\nfloat t = getTime(time.y, st.t) * fadeDirection.t;\nfloat u = length(vec2(s, t));\nvec4 color = mix(fadeInColor, fadeOutColor, u);\ncolor = czm_gammaCorrect(color);\nmaterial.emission = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",GridMaterial="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\nscaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\nfloat scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\nscaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\nfloat value;\n#ifdef GL_OES_standard_derivatives\nconst float fuzz = 1.2;\nvec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\nvec2 dx = abs(dFdx(st));\nvec2 dy = abs(dFdy(st));\nvec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\nvalue = min(\nsmoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\nsmoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\nconst float fuzz = 0.05;\nvec2 range = 0.5 - (lineThickness * 0.05);\nvalue = min(\n1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\nfloat dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\nfloat sRim = smoothstep(0.8, 1.0, dRim);\nvalue *= (1.0 - sRim);\nvec4 halfColor;\nhalfColor.rgb = color.rgb * 0.5;\nhalfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\nhalfColor = czm_gammaCorrect(halfColor);\nmaterial.diffuse = halfColor.rgb;\nmaterial.emission = halfColor.rgb;\nmaterial.alpha = halfColor.a;\nreturn material;\n}\n",NormalMapMaterial="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 textureValue = texture2D(image, fract(repeat * materialInput.st));\nvec3 normalTangentSpace = textureValue.channels;\nnormalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\nnormalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\nnormalTangentSpace = normalize(normalTangentSpace);\nvec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\nmaterial.normal = normalEC;\nreturn material;\n}\n",PolylineArrowMaterial="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform vec4 color;\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\nfloat slope = (p0.y - p1.y) / (p0.x - p1.x);\nreturn slope * (x - p0.x) + p0.y;\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\n#ifdef GL_OES_standard_derivatives\nfloat base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\nfloat base = 0.975;\n#endif\nvec2 center = vec2(1.0, 0.5);\nfloat ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\nfloat ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\nfloat halfWidth = 0.15;\nfloat s = step(0.5 - halfWidth, st.t);\ns *= 1.0 - step(0.5 + halfWidth, st.t);\ns *= 1.0 - step(base, st.s);\nfloat t = step(base, materialInput.st.s);\nt *= 1.0 - step(ptOnUpperLine, st.t);\nt *= step(ptOnLowerLine, st.t);\nfloat dist;\nif (st.s < base)\n{\nfloat d1 = abs(st.t - (0.5 - halfWidth));\nfloat d2 = abs(st.t - (0.5 + halfWidth));\ndist = min(d1, d2);\n}\nelse\n{\nfloat d1 = czm_infinity;\nif (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n{\nd1 = abs(st.s - base);\n}\nfloat d2 = abs(st.t - ptOnUpperLine);\nfloat d3 = abs(st.t - ptOnLowerLine);\ndist = min(min(d1, d2), d3);\n}\nvec4 outsideColor = vec4(0.0);\nvec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\nvec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",PolylineDashMaterial="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nvarying float v_polylineAngle;\nconst float maskLength = 16.0;\nmat2 rotate(float rad) {\nfloat c = cos(rad);\nfloat s = sin(rad);\nreturn mat2(\nc, s,\n-s, c\n);\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\nfloat dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\nfloat maskIndex = floor(dashPosition * maskLength);\nfloat maskTest = floor(dashPattern / pow(2.0, maskIndex));\nvec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\nif (fragColor.a < 0.005) {\ndiscard;\n}\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",PolylineGlowMaterial="uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\nif (taperPower <= 0.99999) {\nglow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n}\nvec4 fragColor;\nfragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\nfragColor.a = clamp(0.0, 1.0, glow) * color.a;\nfragColor = czm_gammaCorrect(fragColor);\nmaterial.emission = fragColor.rgb;\nmaterial.alpha = fragColor.a;\nreturn material;\n}\n",PolylineOutlineMaterial="uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\nvarying float v_width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nfloat halfInteriorWidth =  0.5 * (v_width - outlineWidth) / v_width;\nfloat b = step(0.5 - halfInteriorWidth, st.t);\nb *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\nfloat d1 = abs(st.t - (0.5 - halfInteriorWidth));\nfloat d2 = abs(st.t - (0.5 + halfInteriorWidth));\nfloat dist = min(d1, d2);\nvec4 currentColor = mix(outlineColor, color, b);\nvec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\noutColor = czm_gammaCorrect(outColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.alpha = outColor.a;\nreturn material;\n}\n",RimLightingMaterial="uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\nfloat s = smoothstep(1.0 - width, 1.0, d);\nvec4 outColor = czm_gammaCorrect(color);\nvec4 outRimColor = czm_gammaCorrect(rimColor);\nmaterial.diffuse = outColor.rgb;\nmaterial.emission = outRimColor.rgb * s;\nmaterial.alpha = mix(outColor.a, outRimColor.a, s);\nreturn material;\n}\n",SlopeRampMaterial="uniform sampler2D image;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec4 rampColor = texture2D(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\nrampColor = czm_gammaCorrect(rampColor);\nmaterial.diffuse = rampColor.rgb;\nmaterial.alpha = rampColor.a;\nreturn material;\n}\n",StripeMaterial="uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\nfloat value = fract((coord - offset) * (repeat * 0.5));\nfloat dist = min(value, min(abs(value - 0.5), 1.0 - value));\nvec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\nvec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\ncolor = czm_gammaCorrect(color);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\nreturn material;\n}\n",WaterMaterial="uniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nfloat time = czm_frameNumber * animationSpeed;\nfloat fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\nfloat specularMapValue = texture2D(specularMap, materialInput.st).r;\nvec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\nvec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\nnormalTangentSpace.xy /= fade;\nnormalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\nnormalTangentSpace = normalize(normalTangentSpace);\nfloat tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\nmaterial.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\nmaterial.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\nmaterial.diffuse += (0.1 * tsPerturbationRatio);\nmaterial.diffuse = material.diffuse;\nmaterial.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\nmaterial.specular = specularIntensity;\nmaterial.shininess = 10.0;\nreturn material;\n}\n";function Material(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=defaultValue(e.minificationFilter,TextureMinificationFilter$1.LINEAR),this._magnificationFilter=defaultValue(e.magnificationFilter,TextureMagnificationFilter$1.LINEAR),this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,initializeMaterial(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),defined(Material._uniformList[this.type])||(Material._uniformList[this.type]=Object.keys(this._uniforms))}function initializeMaterial(e,t){var i;e=defaultValue(e,defaultValue.EMPTY_OBJECT),t._strict=defaultValue(e.strict,!1),t._count=defaultValue(e.count,0),t._template=clone(defaultValue(e.fabric,defaultValue.EMPTY_OBJECT)),t._template.uniforms=clone(defaultValue(t._template.uniforms,defaultValue.EMPTY_OBJECT)),t._template.materials=clone(defaultValue(t._template.materials,defaultValue.EMPTY_OBJECT)),t.type=defined(t._template.type)?t._template.type:createGuid(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[],defined(r=Material._materialCache.getMaterial(t.type))&&(i=clone(r.fabric,!0),t._template=combine(t._template,i,!0),n=r.translucent),checkForTemplateErrors(t),defined(r)||Material._materialCache.addMaterial(t.type,t),createMethodDefinition(t),createUniforms(t),createSubMaterials(t);var r=0===t._translucentFunctions.length||void 0,n=defaultValue(n,r);defined(n=defaultValue(e.translucent,n))&&("function"==typeof n?t._translucentFunctions.push((function(){return n(t)})):t._translucentFunctions.push(n))}function checkForValidProperties(e,t,i,r){if(defined(e))for(var n in e){var a;e.hasOwnProperty(n)&&(a=-1!==t.indexOf(n),(r&&!a||!r&&a)&&i(n,t))}}function invalidNameError(e,t){}function duplicateNameError(e,t){}Material._uniformList={},Material.fromType=function(e,t){var i=new Material({fabric:{type:e}});if(defined(t))for(var r in t)t.hasOwnProperty(r)&&(i.uniforms[r]=t[r]);return i},Material.prototype.isTranslucent=function(){if(defined(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;for(var e=!0,t=this._translucentFunctions,i=t.length,r=0;r<i;++r){var n=t[r];if(!(e="function"==typeof n?e&&n():e&&n))break}return e},Material.prototype.update=function(e){for(var t=this._loadedImages,i=t.length,r=0;r<i;++r){var n=(o=t[r]).id,a=o.image,o=new Sampler({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter});a=defined(a.internalFormat)?new Texture({context:e,pixelFormat:a.internalFormat,width:a.width,height:a.height,source:{arrayBufferView:a.bufferView},sampler:o}):new Texture({context:e,source:a,sampler:o});this._textures[n]=a,o=n+"Dimensions",this.uniforms.hasOwnProperty(o)&&((o=this.uniforms[o]).x=a._width,o.y=a._height)}t.length=0;var s=this._loadedCubeMaps;i=s.length;for(r=0;r<i;++r){var l=s[r];n=l.id,l=new CubeMap({context:e,source:{positiveX:(l=l.images)[0],negativeX:l[1],positiveY:l[2],negativeY:l[3],positiveZ:l[4],negativeZ:l[5]},sampler:new Sampler({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})}),this._textures[n]=l}s.length=0;var c=this._updateFunctions;for(i=c.length,r=0;r<i;++r)c[r](this,e);var u,d=this.materials;for(u in d)d.hasOwnProperty(u)&&d[u].update(e)},Material.prototype.isDestroyed=function(){return!1},Material.prototype.destroy=function(){var e,t,i=this._textures;for(e in i)!i.hasOwnProperty(e)||(t=i[e])!==this._defaultTexture&&t.destroy();var r,n=this.materials;for(r in n)n.hasOwnProperty(r)&&n[r].destroy();return destroyObject(this)};var templateProperties=["type","materials","uniforms","components","source"],componentProperties=["diffuse","specular","shininess","normal","emission","alpha"];function checkForTemplateErrors(e){var t=e._template,i=t.uniforms,r=t.materials;e=t.components;checkForValidProperties(t,templateProperties,invalidNameError,!0),checkForValidProperties(e,componentProperties,invalidNameError,!0);var n,a=[];for(n in r)r.hasOwnProperty(n)&&a.push(n);checkForValidProperties(i,a,duplicateNameError,!1)}function isMaterialFused(e,t){var i,r=t._template.materials;for(i in r)if(r.hasOwnProperty(i)&&-1<e.indexOf(i))return!0;return!1}function createMethodDefinition(e){var t=e._template.components,i=e._template.source;if(defined(i))e.shaderSource+=i+"\n";else{if(e.shaderSource+="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n",e.shaderSource+="czm_material material = czm_getDefaultMaterial(materialInput);\n",defined(t)){var r,n,a=0<Object.keys(e._template.materials).length;for(r in t)t.hasOwnProperty(r)&&("diffuse"===r||"emission"===r?(n=a&&isMaterialFused(t[r],e)?t[r]:"czm_gammaCorrect("+t[r]+")",e.shaderSource+="material."+r+" = "+n+"; \n"):e.shaderSource+="alpha"===r?"material.alpha = "+t.alpha+"; \n":"material."+r+" = "+t[r]+";\n")}e.shaderSource+="return material;\n}\n"}}var matrixMap={mat2:Matrix2,mat3:Matrix3,mat4:Matrix4},ktxRegex=/\.ktx$/i,crnRegex=/\.crn$/i;function createTexture2DUpdateFunction(e){var t;return function(i,r){var n=i.uniforms,a=n[e],o=t!==a;t=a;var s,l=i._textures[e];if(a instanceof HTMLVideoElement)if(2<=a.readyState){if(o&&defined(l)&&(l!==r.defaultTexture&&l.destroy(),l=void 0),!defined(l)||l===r.defaultTexture){l=new Texture({context:r,source:a,sampler:new Sampler({minificationFilter:i._minificationFilter,magnificationFilter:i._magnificationFilter})});return void(i._textures[e]=l)}l.copyFrom(a)}else defined(l)||(i._textures[e]=r.defaultTexture);else{if(a instanceof Texture&&a!==l){i._texturePaths[e]=void 0;var c=i._textures[e];return c!==i._defaultTexture&&c.destroy(),i._textures[e]=a,c=e+"Dimensions",void(n.hasOwnProperty(c)&&((s=n[c]).x=a._width,s.y=a._height))}defined(l)||(i._texturePaths[e]=void 0,defined(i._defaultTexture)||(i._defaultTexture=r.defaultTexture),l=i._textures[e]=i._defaultTexture,c=e+"Dimensions",n.hasOwnProperty(c)&&((s=n[c]).x=l._width,s.y=l._height)),a!==Material.DefaultImageId&&(l=a instanceof Resource,(!defined(i._texturePaths[e])||l&&a.url!==i._texturePaths[e].url||!l&&a!==i._texturePaths[e])&&("string"==typeof a||l?(l=l?a:Resource.createIfNeeded(a),when(ktxRegex.test(l.url)?loadKTX(l):crnRegex.test(l.url)?loadCRN(l):l.fetchImage(),(function(t){i._loadedImages.push({id:e,image:t})}))):(a instanceof HTMLCanvasElement||a instanceof HTMLImageElement)&&i._loadedImages.push({id:e,image:a}),i._texturePaths[e]=a))}}}function createCubeMapUpdateFunction(e){return function(t,i){var r=t.uniforms[e];if(r instanceof CubeMap){var n=t._textures[e];return n!==t._defaultTexture&&n.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=r)}defined(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),r===Material.DefaultCubeMapId||(i=r.positiveX+r.negativeX+r.positiveY+r.negativeY+r.positiveZ+r.negativeZ)!==t._texturePaths[e]&&(r=[Resource.createIfNeeded(r.positiveX).fetchImage(),Resource.createIfNeeded(r.negativeX).fetchImage(),Resource.createIfNeeded(r.positiveY).fetchImage(),Resource.createIfNeeded(r.negativeY).fetchImage(),Resource.createIfNeeded(r.positiveZ).fetchImage(),Resource.createIfNeeded(r.negativeZ).fetchImage()],when.all(r).then((function(i){t._loadedCubeMaps.push({id:e,images:i})})),t._texturePaths[e]=i)}}function createUniforms(e){var t,i=e._template.uniforms;for(t in i)i.hasOwnProperty(t)&&createUniform(e,t)}function createUniform(e,t){e._strict;var i,r,n,a=e._template.uniforms,o=a[t],s=getUniformType(o);"channels"===s?replaceToken(e,t,o,!1):("sampler2D"!==s||0<getNumberOfTokens(e,i=t+"Dimensions")&&(a[i]={type:"ivec3",x:1,y:1},createUniform(e,i)),new RegExp("uniform\\s+"+s+"\\s+"+t+"\\s*;").test(e.shaderSource)||(r="uniform "+s+" "+t+";",e.shaderSource=r+e.shaderSource),r=t+"_"+e._count++,replaceToken(e,t,r),e.uniforms[t]=o,"sampler2D"===s?(e._uniforms[r]=function(){return e._textures[t]},e._updateFunctions.push(createTexture2DUpdateFunction(t))):"samplerCube"===s?(e._uniforms[r]=function(){return e._textures[t]},e._updateFunctions.push(createCubeMapUpdateFunction(t))):-1!==s.indexOf("mat")?(n=new matrixMap[s],e._uniforms[r]=function(){return matrixMap[s].fromColumnMajorArray(e.uniforms[t],n)}):e._uniforms[r]=function(){return e.uniforms[t]})}function getUniformType(e){var t=e.type;if(!defined(t)){var i=typeof e;if("number"==i)t="float";else if("boolean"==i)t="bool";else if("string"==i||e instanceof Resource||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===Material.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"==i)if(Array.isArray(e))4!==e.length&&9!==e.length&&16!==e.length||(t="mat"+Math.sqrt(e.length));else{var r,n=0;for(r in e)e.hasOwnProperty(r)&&(n+=1);2<=n&&n<=4?t="vec"+n:6===n&&(t="samplerCube")}}return t}function createSubMaterials(e){var t,i,r,n=e._strict,a=e._template.materials;for(t in a)a.hasOwnProperty(t)&&(i=new Material({strict:n,fabric:a[t],count:e._count}),e._count=i._count,e._uniforms=combine(e._uniforms,i._uniforms,!0),e.materials[t]=i,e._translucentFunctions=e._translucentFunctions.concat(i._translucentFunctions),replaceToken(i,r="czm_getMaterial",r=r+"_"+e._count++),e.shaderSource=i.shaderSource+e.shaderSource,replaceToken(e,t,r+"(materialInput)"))}function replaceToken(e,t,i,r){r=defaultValue(r,!0);var n=0;t=new RegExp("([\\w"+(r?".":"")+"])?"+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(t,(function(e,t,r){return t||r?e:(n+=1,i)})),n}function getNumberOfTokens(e,t,i){return replaceToken(e,t,t,i)}function MaterialAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=defaultValue(e.closed,!1),r=defaultValue(e.materialSupport,MaterialAppearance.MaterialSupport.TEXTURED);this.material=defined(e.material)?e.material:Material.fromType(Material.ColorType),this.translucent=t,this._vertexShaderSource=defaultValue(e.vertexShaderSource,r.vertexShaderSource),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,r.fragmentShaderSource),this._renderState=Appearance.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._materialSupport=r,this._vertexFormat=r.vertexFormat,this._flat=defaultValue(e.flat,!1),this._faceForward=defaultValue(e.faceForward,!i)}Material._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},Material.DefaultImageId="czm_defaultImage",Material.DefaultCubeMapId="czm_defaultCubeMap",Material.ColorType="Color",Material._materialCache.addMaterial(Material.ColorType,{fabric:{type:Material.ColorType,uniforms:{color:new Color(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),Material.ImageType="Image",Material._materialCache.addMaterial(Material.ImageType,{fabric:{type:Material.ImageType,uniforms:{image:Material.DefaultImageId,repeat:new Cartesian2(1,1),color:new Color(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),Material.DiffuseMapType="DiffuseMap",Material._materialCache.addMaterial(Material.DiffuseMapType,{fabric:{type:Material.DiffuseMapType,uniforms:{image:Material.DefaultImageId,channels:"rgb",repeat:new Cartesian2(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),Material.AlphaMapType="AlphaMap",Material._materialCache.addMaterial(Material.AlphaMapType,{fabric:{type:Material.AlphaMapType,uniforms:{image:Material.DefaultImageId,channel:"a",repeat:new Cartesian2(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),Material.SpecularMapType="SpecularMap",Material._materialCache.addMaterial(Material.SpecularMapType,{fabric:{type:Material.SpecularMapType,uniforms:{image:Material.DefaultImageId,channel:"r",repeat:new Cartesian2(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),Material.EmissionMapType="EmissionMap",Material._materialCache.addMaterial(Material.EmissionMapType,{fabric:{type:Material.EmissionMapType,uniforms:{image:Material.DefaultImageId,channels:"rgb",repeat:new Cartesian2(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),Material.BumpMapType="BumpMap",Material._materialCache.addMaterial(Material.BumpMapType,{fabric:{type:Material.BumpMapType,uniforms:{image:Material.DefaultImageId,channel:"r",strength:.8,repeat:new Cartesian2(1,1)},source:BumpMapMaterial},translucent:!1}),Material.NormalMapType="NormalMap",Material._materialCache.addMaterial(Material.NormalMapType,{fabric:{type:Material.NormalMapType,uniforms:{image:Material.DefaultImageId,channels:"rgb",strength:.8,repeat:new Cartesian2(1,1)},source:NormalMapMaterial},translucent:!1}),Material.GridType="Grid",Material._materialCache.addMaterial(Material.GridType,{fabric:{type:Material.GridType,uniforms:{color:new Color(0,1,0,1),cellAlpha:.1,lineCount:new Cartesian2(8,8),lineThickness:new Cartesian2(1,1),lineOffset:new Cartesian2(0,0)},source:GridMaterial},translucent:function(e){return(e=e.uniforms).color.alpha<1||e.cellAlpha<1}}),Material.StripeType="Stripe",Material._materialCache.addMaterial(Material.StripeType,{fabric:{type:Material.StripeType,uniforms:{horizontal:!0,evenColor:new Color(1,1,1,.5),oddColor:new Color(0,0,1,.5),offset:0,repeat:5},source:StripeMaterial},translucent:function(e){return(e=e.uniforms).evenColor.alpha<1||e.oddColor.alpha<1}}),Material.CheckerboardType="Checkerboard",Material._materialCache.addMaterial(Material.CheckerboardType,{fabric:{type:Material.CheckerboardType,uniforms:{lightColor:new Color(1,1,1,.5),darkColor:new Color(0,0,0,.5),repeat:new Cartesian2(5,5)},source:CheckerboardMaterial},translucent:function(e){return(e=e.uniforms).lightColor.alpha<1||e.darkColor.alpha<1}}),Material.DotType="Dot",Material._materialCache.addMaterial(Material.DotType,{fabric:{type:Material.DotType,uniforms:{lightColor:new Color(1,1,0,.75),darkColor:new Color(0,1,1,.75),repeat:new Cartesian2(5,5)},source:DotMaterial},translucent:function(e){return(e=e.uniforms).lightColor.alpha<1||e.darkColor.alpha<1}}),Material.WaterType="Water",Material._materialCache.addMaterial(Material.WaterType,{fabric:{type:Material.WaterType,uniforms:{baseWaterColor:new Color(.2,.3,.6,1),blendColor:new Color(0,1,.699,1),specularMap:Material.DefaultImageId,normalMap:Material.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:WaterMaterial},translucent:function(e){return(e=e.uniforms).baseWaterColor.alpha<1||e.blendColor.alpha<1}}),Material.RimLightingType="RimLighting",Material._materialCache.addMaterial(Material.RimLightingType,{fabric:{type:Material.RimLightingType,uniforms:{color:new Color(1,0,0,.7),rimColor:new Color(1,1,1,.4),width:.3},source:RimLightingMaterial},translucent:function(e){return(e=e.uniforms).color.alpha<1||e.rimColor.alpha<1}}),Material.FadeType="Fade",Material._materialCache.addMaterial(Material.FadeType,{fabric:{type:Material.FadeType,uniforms:{fadeInColor:new Color(1,0,0,1),fadeOutColor:new Color(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new Cartesian2(.5,.5)},source:FadeMaterial},translucent:function(e){return(e=e.uniforms).fadeInColor.alpha<1||e.fadeOutColor.alpha<1}}),Material.PolylineArrowType="PolylineArrow",Material._materialCache.addMaterial(Material.PolylineArrowType,{fabric:{type:Material.PolylineArrowType,uniforms:{color:new Color(1,1,1,1)},source:PolylineArrowMaterial},translucent:!0}),Material.PolylineDashType="PolylineDash",Material._materialCache.addMaterial(Material.PolylineDashType,{fabric:{type:Material.PolylineDashType,uniforms:{color:new Color(1,0,1,1),gapColor:new Color(0,0,0,0),dashLength:16,dashPattern:255},source:PolylineDashMaterial},translucent:!0}),Material.PolylineGlowType="PolylineGlow",Material._materialCache.addMaterial(Material.PolylineGlowType,{fabric:{type:Material.PolylineGlowType,uniforms:{color:new Color(0,.5,1,1),glowPower:.25,taperPower:1},source:PolylineGlowMaterial},translucent:!0}),Material.PolylineOutlineType="PolylineOutline",Material._materialCache.addMaterial(Material.PolylineOutlineType,{fabric:{type:Material.PolylineOutlineType,uniforms:{color:new Color(1,1,1,1),outlineColor:new Color(1,0,0,1),outlineWidth:1},source:PolylineOutlineMaterial},translucent:function(e){return(e=e.uniforms).color.alpha<1||e.outlineColor.alpha<1}}),Material.ElevationContourType="ElevationContour",Material._materialCache.addMaterial(Material.ElevationContourType,{fabric:{type:Material.ElevationContourType,uniforms:{spacing:100,color:new Color(1,0,0,1),width:1},source:ElevationContourMaterial},translucent:!1}),Material.ElevationRampType="ElevationRamp",Material._materialCache.addMaterial(Material.ElevationRampType,{fabric:{type:Material.ElevationRampType,uniforms:{image:Material.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:ElevationRampMaterial},translucent:!1}),Material.SlopeRampMaterialType="SlopeRamp",Material._materialCache.addMaterial(Material.SlopeRampMaterialType,{fabric:{type:Material.SlopeRampMaterialType,uniforms:{image:Material.DefaultImageId},source:SlopeRampMaterial},translucent:!1}),Material.AspectRampMaterialType="AspectRamp",Material._materialCache.addMaterial(Material.AspectRampMaterialType,{fabric:{type:Material.AspectRampMaterialType,uniforms:{image:Material.DefaultImageId},source:AspectRampMaterial},translucent:!1}),Object.defineProperties(MaterialAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),MaterialAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,MaterialAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,MaterialAppearance.prototype.getRenderState=Appearance.prototype.getRenderState,MaterialAppearance.MaterialSupport={BASIC:Object.freeze({vertexFormat:VertexFormat.POSITION_AND_NORMAL,vertexShaderSource:BasicMaterialAppearanceVS,fragmentShaderSource:BasicMaterialAppearanceFS}),TEXTURED:Object.freeze({vertexFormat:VertexFormat.POSITION_NORMAL_AND_ST,vertexShaderSource:TexturedMaterialAppearanceVS,fragmentShaderSource:TexturedMaterialAppearanceFS}),ALL:Object.freeze({vertexFormat:VertexFormat.ALL,vertexShaderSource:AllMaterialAppearanceVS,fragmentShaderSource:AllMaterialAppearanceFS})};var PerInstanceColorAppearanceFS="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec3 positionToEyeEC = -v_positionEC;\nvec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nvec4 color = czm_gammaCorrect(v_color);\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\n",PerInstanceColorAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec4 color;\nattribute float batchId;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_normalEC = czm_normal * normal;\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n",PerInstanceFlatColorAppearanceFS="varying vec4 v_color;\nvoid main()\n{\ngl_FragColor = czm_gammaCorrect(v_color);\n}\n",PerInstanceFlatColorAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_color = color;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function PerInstanceColorAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=defaultValue(e.closed,!1),r=defaultValue(e.flat,!1),n=r?PerInstanceFlatColorAppearanceVS:PerInstanceColorAppearanceVS,a=r?PerInstanceFlatColorAppearanceFS:PerInstanceColorAppearanceFS,o=r?PerInstanceColorAppearance.FLAT_VERTEX_FORMAT:PerInstanceColorAppearance.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=defaultValue(e.vertexShaderSource,n),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,a),this._renderState=Appearance.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._vertexFormat=o,this._flat=r,this._faceForward=defaultValue(e.faceForward,!i)}function ColorMaterialProperty(e){this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this.color=e}function DrawCommand(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._cull=defaultValue(e.cull,!0),this._occlude=defaultValue(e.occlude,!0),this._modelMatrix=e.modelMatrix,this._primitiveType=defaultValue(e.primitiveType,PrimitiveType$1.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=defaultValue(e.offset,0),this._instanceCount=defaultValue(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._executeInClosestFrustum=defaultValue(e.executeInClosestFrustum,!1),this._owner=e.owner,this._debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugOverlappingFrustums=0,this._castShadows=defaultValue(e.castShadows,!1),this._receiveShadows=defaultValue(e.receiveShadows,!1),this._pickId=e.pickId,this._pickOnly=defaultValue(e.pickOnly,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}Object.defineProperties(PerInstanceColorAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),PerInstanceColorAppearance.VERTEX_FORMAT=VertexFormat.POSITION_AND_NORMAL,PerInstanceColorAppearance.FLAT_VERTEX_FORMAT=VertexFormat.POSITION_ONLY,PerInstanceColorAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,PerInstanceColorAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,PerInstanceColorAppearance.prototype.getRenderState=Appearance.prototype.getRenderState,Object.defineProperties(ColorMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color")}),ColorMaterialProperty.prototype.getType=function(e){return"Color"},ColorMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,Color.WHITE,t.color),t},ColorMaterialProperty.prototype.equals=function(e){return this===e||e instanceof ColorMaterialProperty&&Property.equals(this._color,e._color)},Object.defineProperties(DrawCommand.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},occlude:{get:function(){return this._occlude},set:function(e){this._occlude!==e&&(this._occlude=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return this._pickOnly},set:function(e){this._pickOnly!==e&&(this._pickOnly=e,this.dirty=!0)}}}),DrawCommand.shallowClone=function(e,t){if(defined(e))return defined(t)||(t=new DrawCommand),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._cull=e._cull,t._occlude=e._occlude,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._executeInClosestFrustum=e._executeInClosestFrustum,t._owner=e._owner,t._debugShowBoundingVolume=e._debugShowBoundingVolume,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._castShadows=e._castShadows,t._receiveShadows=e._receiveShadows,t._pickId=e._pickId,t._pickOnly=e._pickOnly,t.dirty=!0,t.lastDirtyTime=0,t},DrawCommand.prototype.execute=function(e,t){e.draw(this,t)};var Pass={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,OPAQUE:7,TRANSLUCENT:8,OVERLAY:9,NUMBER_OF_PASSES:10},Pass$1=Object.freeze(Pass);function freezeRenderState(e){if("object"!=typeof e||null===e)return e;for(var t,i=Object.keys(e),r=0;r<i.length;r++)t=i[r],e.hasOwnProperty(t)&&"_applyFunctions"!==t&&(e[t]=freezeRenderState(e[t]));return Object.freeze(e)}function RenderState(e){var t=defaultValue(e,defaultValue.EMPTY_OBJECT),i=defaultValue(t.cull,defaultValue.EMPTY_OBJECT),r=defaultValue(t.polygonOffset,defaultValue.EMPTY_OBJECT),n=defaultValue(t.scissorTest,defaultValue.EMPTY_OBJECT),a=defaultValue(n.rectangle,defaultValue.EMPTY_OBJECT),o=defaultValue(t.depthRange,defaultValue.EMPTY_OBJECT),s=defaultValue(t.depthTest,defaultValue.EMPTY_OBJECT),l=defaultValue(t.colorMask,defaultValue.EMPTY_OBJECT),c=defaultValue(t.blending,defaultValue.EMPTY_OBJECT),u=defaultValue(c.color,defaultValue.EMPTY_OBJECT),d=defaultValue(t.stencilTest,defaultValue.EMPTY_OBJECT),h=defaultValue(d.frontOperation,defaultValue.EMPTY_OBJECT),p=defaultValue(d.backOperation,defaultValue.EMPTY_OBJECT),f=defaultValue(t.sampleCoverage,defaultValue.EMPTY_OBJECT);e=t.viewport;this.frontFace=defaultValue(t.frontFace,WindingOrder$1.COUNTER_CLOCKWISE),this.cull={enabled:defaultValue(i.enabled,!1),face:defaultValue(i.face,WebGLConstants$1.BACK)},this.lineWidth=defaultValue(t.lineWidth,1),this.polygonOffset={enabled:defaultValue(r.enabled,!1),factor:defaultValue(r.factor,0),units:defaultValue(r.units,0)},this.scissorTest={enabled:defaultValue(n.enabled,!1),rectangle:BoundingRectangle.clone(a)},this.depthRange={near:defaultValue(o.near,0),far:defaultValue(o.far,1)},this.depthTest={enabled:defaultValue(s.enabled,!1),func:defaultValue(s.func,WebGLConstants$1.LESS)},this.colorMask={red:defaultValue(l.red,!0),green:defaultValue(l.green,!0),blue:defaultValue(l.blue,!0),alpha:defaultValue(l.alpha,!0)},this.depthMask=defaultValue(t.depthMask,!0),this.stencilMask=defaultValue(t.stencilMask,-1),this.blending={enabled:defaultValue(c.enabled,!1),color:new Color(defaultValue(u.red,0),defaultValue(u.green,0),defaultValue(u.blue,0),defaultValue(u.alpha,0)),equationRgb:defaultValue(c.equationRgb,WebGLConstants$1.FUNC_ADD),equationAlpha:defaultValue(c.equationAlpha,WebGLConstants$1.FUNC_ADD),functionSourceRgb:defaultValue(c.functionSourceRgb,WebGLConstants$1.ONE),functionSourceAlpha:defaultValue(c.functionSourceAlpha,WebGLConstants$1.ONE),functionDestinationRgb:defaultValue(c.functionDestinationRgb,WebGLConstants$1.ZERO),functionDestinationAlpha:defaultValue(c.functionDestinationAlpha,WebGLConstants$1.ZERO)},this.stencilTest={enabled:defaultValue(d.enabled,!1),frontFunction:defaultValue(d.frontFunction,WebGLConstants$1.ALWAYS),backFunction:defaultValue(d.backFunction,WebGLConstants$1.ALWAYS),reference:defaultValue(d.reference,0),mask:defaultValue(d.mask,-1),frontOperation:{fail:defaultValue(h.fail,WebGLConstants$1.KEEP),zFail:defaultValue(h.zFail,WebGLConstants$1.KEEP),zPass:defaultValue(h.zPass,WebGLConstants$1.KEEP)},backOperation:{fail:defaultValue(p.fail,WebGLConstants$1.KEEP),zFail:defaultValue(p.zFail,WebGLConstants$1.KEEP),zPass:defaultValue(p.zPass,WebGLConstants$1.KEEP)}},this.sampleCoverage={enabled:defaultValue(f.enabled,!1),value:defaultValue(f.value,1),invert:defaultValue(f.invert,!1)},this.viewport=defined(e)?new BoundingRectangle(e.x,e.y,e.width,e.height):void 0,this.id=0,this._applyFunctions=[]}var nextRenderStateId=0,renderStateCache={};function enableOrDisable(e,t,i){i?e.enable(t):e.disable(t)}function applyFrontFace(e,t){e.frontFace(t.frontFace)}function applyCull(e,t){var i=t.cull;t=i.enabled;enableOrDisable(e,e.CULL_FACE,t),t&&e.cullFace(i.face)}function applyLineWidth(e,t){e.lineWidth(t.lineWidth)}function applyPolygonOffset(e,t){var i=t.polygonOffset;t=i.enabled;enableOrDisable(e,e.POLYGON_OFFSET_FILL,t),t&&e.polygonOffset(i.factor,i.units)}function applyScissorTest(e,t,i){var r=t.scissorTest;t=(defined(i.scissorTest)?i.scissorTest:r).enabled;enableOrDisable(e,e.SCISSOR_TEST,t),t&&(r=(defined(i.scissorTest)?i.scissorTest:r).rectangle,e.scissor(r.x,r.y,r.width,r.height))}function applyDepthRange(e,t){t=t.depthRange,e.depthRange(t.near,t.far)}function applyDepthTest(e,t){var i=t.depthTest;t=i.enabled;enableOrDisable(e,e.DEPTH_TEST,t),t&&e.depthFunc(i.func)}function applyColorMask(e,t){t=t.colorMask,e.colorMask(t.red,t.green,t.blue,t.alpha)}function applyDepthMask(e,t){e.depthMask(t.depthMask)}function applyStencilMask(e,t){e.stencilMask(t.stencilMask)}function applyBlendingColor(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function applyBlending(e,t,i){t=t.blending,i=defined(i.blendingEnabled)?i.blendingEnabled:t.enabled,enableOrDisable(e,e.BLEND,i),i&&(applyBlendingColor(e,t.color),e.blendEquationSeparate(t.equationRgb,t.equationAlpha),e.blendFuncSeparate(t.functionSourceRgb,t.functionDestinationRgb,t.functionSourceAlpha,t.functionDestinationAlpha))}function applyStencilTest(e,t){var i,r,n=t.stencilTest,a=n.enabled;enableOrDisable(e,e.STENCIL_TEST,a),a&&(r=n.frontFunction,i=n.backFunction,t=n.reference,a=n.mask,e.stencilFunc(r,t,a),e.stencilFuncSeparate(e.BACK,i,t,a),e.stencilFuncSeparate(e.FRONT,r,t,a),t=(r=n.frontOperation).fail,a=r.zFail,r=r.zPass,e.stencilOpSeparate(e.FRONT,t,a,r),r=(a=n.backOperation).fail,n=a.zFail,a=a.zPass,e.stencilOpSeparate(e.BACK,r,n,a))}function applySampleCoverage(e,t){var i=t.sampleCoverage;t=i.enabled;enableOrDisable(e,e.SAMPLE_COVERAGE,t),t&&e.sampleCoverage(i.value,i.invert)}RenderState.fromCache=function(e){var t=JSON.stringify(e),i=renderStateCache[t];if(defined(i))return++i.referenceCount,i.state;var r=new RenderState(e);e=JSON.stringify(r);return defined(i=renderStateCache[e])||(r.id=nextRenderStateId++,i={referenceCount:0,state:r},renderStateCache[e]=i),++i.referenceCount,renderStateCache[t]={referenceCount:1,state:i.state},i.state},RenderState.removeFromCache=function(e){var t=new RenderState(e),i=JSON.stringify(t),r=renderStateCache[i];t=JSON.stringify(e);defined(e=renderStateCache[t])&&(--e.referenceCount,0===e.referenceCount&&(delete renderStateCache[t],defined(r)&&--r.referenceCount)),defined(r)&&0===r.referenceCount&&delete renderStateCache[i]},RenderState.getCache=function(){return renderStateCache},RenderState.clearCache=function(){renderStateCache={}};var scratchViewport=new BoundingRectangle;function applyViewport(e,t,i){defined(t=defaultValue(t.viewport,i.viewport))||((t=scratchViewport).width=i.context.drawingBufferWidth,t.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=t,e.viewport(t.x,t.y,t.width,t.height)}function createFuncs(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(applyFrontFace),e.cull.enabled===t.cull.enabled&&e.cull.face===t.cull.face||i.push(applyCull),e.lineWidth!==t.lineWidth&&i.push(applyLineWidth),e.polygonOffset.enabled===t.polygonOffset.enabled&&e.polygonOffset.factor===t.polygonOffset.factor&&e.polygonOffset.units===t.polygonOffset.units||i.push(applyPolygonOffset),e.depthRange.near===t.depthRange.near&&e.depthRange.far===t.depthRange.far||i.push(applyDepthRange),e.depthTest.enabled===t.depthTest.enabled&&e.depthTest.func===t.depthTest.func||i.push(applyDepthTest),e.colorMask.red===t.colorMask.red&&e.colorMask.green===t.colorMask.green&&e.colorMask.blue===t.colorMask.blue&&e.colorMask.alpha===t.colorMask.alpha||i.push(applyColorMask),e.depthMask!==t.depthMask&&i.push(applyDepthMask),e.stencilMask!==t.stencilMask&&i.push(applyStencilMask),e.stencilTest.enabled===t.stencilTest.enabled&&e.stencilTest.frontFunction===t.stencilTest.frontFunction&&e.stencilTest.backFunction===t.stencilTest.backFunction&&e.stencilTest.reference===t.stencilTest.reference&&e.stencilTest.mask===t.stencilTest.mask&&e.stencilTest.frontOperation.fail===t.stencilTest.frontOperation.fail&&e.stencilTest.frontOperation.zFail===t.stencilTest.frontOperation.zFail&&e.stencilTest.backOperation.fail===t.stencilTest.backOperation.fail&&e.stencilTest.backOperation.zFail===t.stencilTest.backOperation.zFail&&e.stencilTest.backOperation.zPass===t.stencilTest.backOperation.zPass||i.push(applyStencilTest),e.sampleCoverage.enabled===t.sampleCoverage.enabled&&e.sampleCoverage.value===t.sampleCoverage.value&&e.sampleCoverage.invert===t.sampleCoverage.invert||i.push(applySampleCoverage),i}RenderState.apply=function(e,t,i){applyFrontFace(e,t),applyCull(e,t),applyLineWidth(e,t),applyPolygonOffset(e,t),applyDepthRange(e,t),applyDepthTest(e,t),applyColorMask(e,t),applyDepthMask(e,t),applyStencilMask(e,t),applyStencilTest(e,t),applySampleCoverage(e,t),applyScissorTest(e,t,i),applyBlending(e,t,i),applyViewport(e,t,i)},RenderState.partialApply=function(e,t,i,r,n,a){if(t!==i){var o=i._applyFunctions[t.id];defined(o)||(o=createFuncs(t,i),i._applyFunctions[t.id]=o);for(var s=o.length,l=0;l<s;++l)o[l](e,i)}(defined(r.scissorTest)?r:t).scissorTest===(defined(n.scissorTest)?n:i).scissorTest&&!a||applyScissorTest(e,i,n),((defined(r.blendingEnabled)?r.blendingEnabled:t.blending.enabled)!==(a=defined(n.blendingEnabled)?n.blendingEnabled:i.blending.enabled)||a&&t.blending!==i.blending)&&applyBlending(e,i,n),t===i&&r===n&&r.context===n.context||applyViewport(e,i,n)},RenderState.getState=function(e){return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:BoundingRectangle.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:Color.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:defined(e.viewport)?BoundingRectangle.clone(e.viewport):void 0}};var viewerPositionWCScratch=new Cartesian3;function AutomaticUniform(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var datatypeToGlsl={};datatypeToGlsl[WebGLConstants$1.FLOAT]="float",datatypeToGlsl[WebGLConstants$1.FLOAT_VEC2]="vec2",datatypeToGlsl[WebGLConstants$1.FLOAT_VEC3]="vec3",datatypeToGlsl[WebGLConstants$1.FLOAT_VEC4]="vec4",datatypeToGlsl[WebGLConstants$1.INT]="int",datatypeToGlsl[WebGLConstants$1.INT_VEC2]="ivec2",datatypeToGlsl[WebGLConstants$1.INT_VEC3]="ivec3",datatypeToGlsl[WebGLConstants$1.INT_VEC4]="ivec4",datatypeToGlsl[WebGLConstants$1.BOOL]="bool",datatypeToGlsl[WebGLConstants$1.BOOL_VEC2]="bvec2",datatypeToGlsl[WebGLConstants$1.BOOL_VEC3]="bvec3",datatypeToGlsl[WebGLConstants$1.BOOL_VEC4]="bvec4",datatypeToGlsl[WebGLConstants$1.FLOAT_MAT2]="mat2",datatypeToGlsl[WebGLConstants$1.FLOAT_MAT3]="mat3",datatypeToGlsl[WebGLConstants$1.FLOAT_MAT4]="mat4",datatypeToGlsl[WebGLConstants$1.SAMPLER_2D]="sampler2D",datatypeToGlsl[WebGLConstants$1.SAMPLER_CUBE]="samplerCube",AutomaticUniform.prototype.getDeclaration=function(e){return"uniform "+datatypeToGlsl[this._datatype]+" "+e+(1===(e=this._size)?";":"["+e.toString()+"];")};var AutomaticUniforms={czm_viewport:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new AutomaticUniform({size:1,datatype:WebGLConstants$1.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return Matrix4.getTranslation(e.inverseView,viewerPositionWCScratch)}}),czm_frameNumber:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new AutomaticUniform({size:1,datatype:WebGLConstants$1.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new AutomaticUniform({size:1,datatype:WebGLConstants$1.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new AutomaticUniform({size:1,datatype:WebGLConstants$1.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapSize:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC2,getValue:function(e){return e.specularEnvironmentMapsDimensions}}),czm_specularEnvironmentMapsMaximumLOD:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new AutomaticUniform({size:9,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.fogDensity}}),czm_imagerySplitPosition:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.imagerySplitPosition}}),czm_geometricToleranceOverMeter:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new AutomaticUniform({size:1,datatype:WebGLConstants$1.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})};function createUniform$1(e,t,i,r){switch(t.type){case e.FLOAT:return new UniformFloat(e,t,i,r);case e.FLOAT_VEC2:return new UniformFloatVec2(e,t,i,r);case e.FLOAT_VEC3:return new UniformFloatVec3(e,t,i,r);case e.FLOAT_VEC4:return new UniformFloatVec4(e,t,i,r);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new UniformSampler(e,t,i,r);case e.INT:case e.BOOL:return new UniformInt(e,t,i,r);case e.INT_VEC2:case e.BOOL_VEC2:return new UniformIntVec2(e,t,i,r);case e.INT_VEC3:case e.BOOL_VEC3:return new UniformIntVec3(e,t,i,r);case e.INT_VEC4:case e.BOOL_VEC4:return new UniformIntVec4(e,t,i,r);case e.FLOAT_MAT2:return new UniformMat2(e,t,i,r);case e.FLOAT_MAT3:return new UniformMat3(e,t,i,r);case e.FLOAT_MAT4:return new UniformMat4(e,t,i,r);default:throw new RuntimeError("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function UniformFloat(e,t,i,r){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=r}function UniformFloatVec2(e,t,i,r){this.name=i,this.value=void 0,this._value=new Cartesian2,this._gl=e,this._location=r}function UniformFloatVec3(e,t,i,r){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=r}function UniformFloatVec4(e,t,i,r){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=r}function UniformSampler(e,t,i,r){this.name=i,this.value=void 0,this._gl=e,this._location=r,this.textureUnitIndex=void 0}function UniformInt(e,t,i,r){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=r}function UniformIntVec2(e,t,i,r){this.name=i,this.value=void 0,this._value=new Cartesian2,this._gl=e,this._location=r}function UniformIntVec3(e,t,i,r){this.name=i,this.value=void 0,this._value=new Cartesian3,this._gl=e,this._location=r}function UniformIntVec4(e,t,i,r){this.name=i,this.value=void 0,this._value=new Cartesian4,this._gl=e,this._location=r}UniformFloat.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},UniformFloatVec2.prototype.set=function(){var e=this.value;Cartesian2.equals(e,this._value)||(Cartesian2.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},UniformFloatVec3.prototype.set=function(){var e=this.value;defined(e.red)?Color.equals(e,this._value)||(this._value=Color.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue)):defined(e.x)&&(Cartesian3.equals(e,this._value)||(this._value=Cartesian3.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z)))},UniformFloatVec4.prototype.set=function(){var e=this.value;defined(e.red)?Color.equals(e,this._value)||(this._value=Color.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha)):defined(e.x)&&(Cartesian4.equals(e,this._value)||(this._value=Cartesian4.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w)))},UniformSampler.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},UniformSampler.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},UniformInt.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},UniformIntVec2.prototype.set=function(){var e=this.value;Cartesian2.equals(e,this._value)||(Cartesian2.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},UniformIntVec3.prototype.set=function(){var e=this.value;Cartesian3.equals(e,this._value)||(Cartesian3.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},UniformIntVec4.prototype.set=function(){var e=this.value;Cartesian4.equals(e,this._value)||(Cartesian4.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var scratchUniformArray=new Float32Array(4);function UniformMat2(e,t,i,r){this.name=i,this.value=void 0,this._value=new Matrix2,this._gl=e,this._location=r}UniformMat2.prototype.set=function(){var e;Matrix2.equalsArray(this.value,this._value,0)||(Matrix2.clone(this.value,this._value),e=Matrix2.toArray(this.value,scratchUniformArray),this._gl.uniformMatrix2fv(this._location,!1,e))};var scratchMat3Array=new Float32Array(9);function UniformMat3(e,t,i,r){this.name=i,this.value=void 0,this._value=new Matrix3,this._gl=e,this._location=r}UniformMat3.prototype.set=function(){var e;Matrix3.equalsArray(this.value,this._value,0)||(Matrix3.clone(this.value,this._value),e=Matrix3.toArray(this.value,scratchMat3Array),this._gl.uniformMatrix3fv(this._location,!1,e))};var scratchMat4Array=new Float32Array(16);function UniformMat4(e,t,i,r){this.name=i,this.value=void 0,this._value=new Matrix4,this._gl=e,this._location=r}function createUniformArray(e,t,i,r){switch(t.type){case e.FLOAT:return new UniformArrayFloat(e,t,i,r);case e.FLOAT_VEC2:return new UniformArrayFloatVec2(e,t,i,r);case e.FLOAT_VEC3:return new UniformArrayFloatVec3(e,t,i,r);case e.FLOAT_VEC4:return new UniformArrayFloatVec4(e,t,i,r);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new UniformArraySampler(e,t,i,r);case e.INT:case e.BOOL:return new UniformArrayInt(e,t,i,r);case e.INT_VEC2:case e.BOOL_VEC2:return new UniformArrayIntVec2(e,t,i,r);case e.INT_VEC3:case e.BOOL_VEC3:return new UniformArrayIntVec3(e,t,i,r);case e.INT_VEC4:case e.BOOL_VEC4:return new UniformArrayIntVec4(e,t,i,r);case e.FLOAT_MAT2:return new UniformArrayMat2(e,t,i,r);case e.FLOAT_MAT3:return new UniformArrayMat3(e,t,i,r);case e.FLOAT_MAT4:return new UniformArrayMat4(e,t,i,r);default:throw new RuntimeError("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function UniformArrayFloat(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(n),this._gl=e,this._location=r[0]}function UniformArrayFloatVec2(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(2*n),this._gl=e,this._location=r[0]}function UniformArrayFloatVec3(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(3*n),this._gl=e,this._location=r[0]}function UniformArrayFloatVec4(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(4*n),this._gl=e,this._location=r[0]}function UniformArraySampler(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(n),this._gl=e,this._locations=r,this.textureUnitIndex=void 0}function UniformArrayInt(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Int32Array(n),this._gl=e,this._location=r[0]}function UniformArrayIntVec2(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Int32Array(2*n),this._gl=e,this._location=r[0]}function UniformArrayIntVec3(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Int32Array(3*n),this._gl=e,this._location=r[0]}function UniformArrayIntVec4(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Int32Array(4*n),this._gl=e,this._location=r[0]}function UniformArrayMat2(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(4*n),this._gl=e,this._location=r[0]}function UniformArrayMat3(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(9*n),this._gl=e,this._location=r[0]}function UniformArrayMat4(e,t,i,r){var n=r.length;this.name=i,this.value=new Array(n),this._value=new Float32Array(16*n),this._gl=e,this._location=r[0]}UniformMat4.prototype.set=function(){var e;Matrix4.equalsArray(this.value,this._value,0)||(Matrix4.clone(this.value,this._value),e=Matrix4.toArray(this.value,scratchMat4Array),this._gl.uniformMatrix4fv(this._location,!1,e))},UniformArrayFloat.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0;n<t;++n){var a=e[n];a!==i[n]&&(i[n]=a,r=!0)}r&&this._gl.uniform1fv(this._location,i)},UniformArrayFloatVec2.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Cartesian2.equalsArray(o,i,n)||(Cartesian2.pack(o,i,n),r=!0),n+=2}r&&this._gl.uniform2fv(this._location,i)},UniformArrayFloatVec3.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];defined(o.red)?o.red===i[n]&&o.green===i[n+1]&&o.blue===i[n+2]||(i[n]=o.red,i[n+1]=o.green,i[n+2]=o.blue,r=!0):defined(o.x)&&(Cartesian3.equalsArray(o,i,n)||(Cartesian3.pack(o,i,n),r=!0)),n+=3}r&&this._gl.uniform3fv(this._location,i)},UniformArrayFloatVec4.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];defined(o.red)?Color.equalsArray(o,i,n)||(Color.pack(o,i,n),r=!0):defined(o.x)&&(Cartesian4.equalsArray(o,i,n)||(Cartesian4.pack(o,i,n),r=!0)),n+=4}r&&this._gl.uniform4fv(this._location,i)},UniformArraySampler.prototype.set=function(){for(var e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,i=this.value,r=i.length,n=0;n<r;++n){var a=i[n];e.activeTexture(t+n),e.bindTexture(a._target,a._texture)}},UniformArraySampler.prototype._setSampler=function(e){this.textureUnitIndex=e;for(var t=this._locations,i=t.length,r=0;r<i;++r){var n=e+r;this._gl.uniform1i(t[r],n)}return e+i},UniformArrayInt.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0;n<t;++n){var a=e[n];a!==i[n]&&(i[n]=a,r=!0)}r&&this._gl.uniform1iv(this._location,i)},UniformArrayIntVec2.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Cartesian2.equalsArray(o,i,n)||(Cartesian2.pack(o,i,n),r=!0),n+=2}r&&this._gl.uniform2iv(this._location,i)},UniformArrayIntVec3.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Cartesian3.equalsArray(o,i,n)||(Cartesian3.pack(o,i,n),r=!0),n+=3}r&&this._gl.uniform3iv(this._location,i)},UniformArrayIntVec4.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Cartesian4.equalsArray(o,i,n)||(Cartesian4.pack(o,i,n),r=!0),n+=4}r&&this._gl.uniform4iv(this._location,i)},UniformArrayMat2.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Matrix2.equalsArray(o,i,n)||(Matrix2.pack(o,i,n),r=!0),n+=4}r&&this._gl.uniformMatrix2fv(this._location,!1,i)},UniformArrayMat3.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Matrix3.equalsArray(o,i,n)||(Matrix3.pack(o,i,n),r=!0),n+=9}r&&this._gl.uniformMatrix3fv(this._location,!1,i)},UniformArrayMat4.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,r=!1,n=0,a=0;a<t;++a){var o=e[a];Matrix4.equalsArray(o,i,n)||(Matrix4.pack(o,i,n),r=!0),n+=16}r&&this._gl.uniformMatrix4fv(this._location,!1,i)};var nextShaderProgramId=0;function ShaderProgram(e){var t=e.vertexShaderText,i=e.fragmentShaderText;"undefined"!=typeof spector&&(t=t.replace(/^#line/gm,"//#line"),i=i.replace(/^#line/gm,"//#line")),i=handleUniformPrecisionMismatches(t,i),this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=i.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=i.fragmentShaderText,this.id=nextShaderProgramId++}function extractUniforms(e){var t=[],i=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(defined(i))for(var r=i.length,n=0;n<r;n++){var a=(a=i[n].trim()).slice(a.lastIndexOf(" ")+1);t.push(a)}return t}function handleUniformPrecisionMismatches(e,t){var i={};if(!ContextLimits.highpFloatSupported||!ContextLimits.highpIntSupported)for(var r,n,a,o,s=extractUniforms(e),l=extractUniforms(t),c=s.length,u=l.length,d=0;d<c;d++)for(r=0;r<u;r++)s[d]===l[r]&&(a="czm_mediump_"+(n=s[d]),o=new RegExp(n+"\\b","g"),t=t.replace(o,a),i[a]=n);return{fragmentShaderText:t,duplicateUniformNames:i}}ShaderProgram.fromCache=function(e){return(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context.shaderCache.getShaderProgram(e)},ShaderProgram.replaceCache=function(e){return(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context.shaderCache.replaceShaderProgram(e)},Object.defineProperties(ShaderProgram.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return initialize$1(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return initialize$1(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return initialize$1(this),this._uniformsByName}}});var consolePrefix="[Cesium WebGL] ";function createAndLinkProgram(e,t){var i=t._vertexShaderText,r=t._fragmentShaderText,n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,i),e.compileShader(n),i=e.createShader(e.FRAGMENT_SHADER),e.shaderSource(i,r),e.compileShader(i);var a=e.createProgram();e.attachShader(a,n),e.attachShader(a,i),e.deleteShader(n),e.deleteShader(i);var o=t._attributeLocations;if(defined(o))for(var s in o)o.hasOwnProperty(s)&&e.bindAttribLocation(a,o[s],s);if(e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){if(r=t._debugShaders,!e.getShaderParameter(i,e.COMPILE_STATUS)){var l,c=e.getShaderInfoLog(i);throw console.error(consolePrefix+"Fragment shader compile log: "+c),defined(r)&&(""!==(l=r.getTranslatedShaderSource(i))?console.error(consolePrefix+"Translated fragment shader source:\n"+l):console.error(consolePrefix+"Fragment shader translation failed.")),e.deleteProgram(a),new RuntimeError("Fragment shader failed to compile.  Compile log: "+c)}if(!e.getShaderParameter(n,e.COMPILE_STATUS))throw c=e.getShaderInfoLog(n),console.error(consolePrefix+"Vertex shader compile log: "+c),defined(r)&&(""!==(l=r.getTranslatedShaderSource(n))?console.error(consolePrefix+"Translated vertex shader source:\n"+l):console.error(consolePrefix+"Vertex shader translation failed.")),e.deleteProgram(a),new RuntimeError("Vertex shader failed to compile.  Compile log: "+c);throw c=e.getProgramInfoLog(a),console.error(consolePrefix+"Shader program link log: "+c),defined(r)&&(console.error(consolePrefix+"Translated vertex shader source:\n"+r.getTranslatedShaderSource(n)),console.error(consolePrefix+"Translated fragment shader source:\n"+r.getTranslatedShaderSource(i))),e.deleteProgram(a),new RuntimeError("Program failed to link.  Link log: "+c)}return(t=t._logShaderCompilation)&&defined(c=e.getShaderInfoLog(n))&&0<c.length&&console.log(consolePrefix+"Vertex shader compile log: "+c),t&&defined(c=e.getShaderInfoLog(i))&&0<c.length&&console.log(consolePrefix+"Fragment shader compile log: "+c),t&&defined(c=e.getProgramInfoLog(a))&&0<c.length&&console.log(consolePrefix+"Shader program link log: "+c),a}function findVertexAttributes(e,t,i){for(var r={},n=0;n<i;++n){var a=e.getActiveAttrib(t,n),o=e.getAttribLocation(t,a.name);r[a.name]={name:a.name,type:a.type,index:o}}return r}function findUniforms(e,t){for(var i={},r=[],n=[],a=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),o=0;o<a;++o){var s=e.getActiveUniform(t,o),l=-1!==s.name.indexOf("[0]",s.name.length-"[0]".length)?s.name.slice(0,s.name.length-3):s.name;if(0!==l.indexOf("gl_"))if(s.name.indexOf("[")<0){var c=e.getUniformLocation(t,l);null!==c&&(p=createUniform$1(e,s,l,c),i[l]=p,r.push(p),p._setSampler&&n.push(p))}else{var u,d,h,p=l.indexOf("[");if(0<=p)defined(u=i[l.slice(0,p)])&&(d=u._locations).length<=1&&(p=u.value,null!==(h=e.getUniformLocation(t,l))&&(d.push(h),p.push(e.getUniform(t,h))));else{d=[];for(var f=0;f<s.size;++f)null!==(h=e.getUniformLocation(t,l+"["+f+"]"))&&d.push(h);u=createUniformArray(e,s,l,d),i[l]=u,r.push(u),u._setSampler&&n.push(u)}}}return{uniformsByName:i,uniforms:r,samplerUniforms:n}}function partitionUniforms(e,t){var i,r,n,a,o=[],s=[];for(i in t)t.hasOwnProperty(i)&&(r=t[i],a=i,defined(n=e._duplicateUniformNames[a])&&(a=r.name=n),defined(a=AutomaticUniforms[a])?o.push({uniform:r,automaticUniform:a}):s.push(r));return{automaticUniforms:o,manualUniforms:s}}function setSamplerUniforms(e,t,i){e.useProgram(t);for(var r=0,n=i.length,a=0;a<n;++a)r=i[a]._setSampler(r);return e.useProgram(null),r}function initialize$1(e){defined(e._program)||reinitialize(e)}function reinitialize(e){var t=e._program,i=e._gl,r=createAndLinkProgram(i,e,e._debugShaders),n=i.getProgramParameter(r,i.ACTIVE_ATTRIBUTES),a=findUniforms(i,r),o=partitionUniforms(e,a.uniformsByName);e._program=r,e._numberOfVertexAttributes=n,e._vertexAttributes=findVertexAttributes(i,r,n),e._uniformsByName=a.uniformsByName,e._uniforms=a.uniforms,e._automaticUniforms=o.automaticUniforms,e._manualUniforms=o.manualUniforms,e.maximumTextureUnitIndex=setSamplerUniforms(i,r,a.samplerUniforms),t&&e._gl.deleteProgram(t),"undefined"!=typeof spector&&(e._program.__SPECTOR_rebuildProgram=function(t,i,r,n){var a=e._vertexShaderText,o=e._fragmentShaderText,s=/ ! = /g;e._vertexShaderText=t.replace(s," != "),e._fragmentShaderText=i.replace(s," != ");try{reinitialize(e),r(e._program)}catch(t){e._vertexShaderText=a,e._fragmentShaderText=o,n((o=/(?:Compile|Link) error: ([^]*)/.exec(t.message))?o[1]:t.message)}})}function modernizeShader(e,t){var i=/#define OUTPUT_DECLARATION/,r=e.split("\n");if(/#version 300 es/g.test(e))return e;for(var n,a=-1,o=0;o<r.length;++o)if(n=r[o],i.test(n)){a=o;break}if(-1===a)throw new DeveloperError("Could not find a #define OUTPUT_DECLARATION!");var s=[];for(o=0;o<10;o++){var l="gl_FragData\\["+o+"\\]",c="czm_out"+o;new RegExp(l,"g").test(e)&&(setAdd(c,s),replaceInSourceString(l,c,r),r.splice(a,0,"layout(location = "+o+") out vec4 "+c+";"),a+=1)}var u="czm_fragColor";findInSource("gl_FragColor",r)&&(setAdd(u,s),replaceInSourceString("gl_FragColor",u,r),r.splice(a,0,"layout(location = 0) out vec4 czm_fragColor;"),a+=1);var d,h=getVariablePreprocessorBranch(s,r),p={};for(o=0;o<r.length;o++)for(var f in n=r[o],h)h.hasOwnProperty(f)&&new RegExp("(layout)[^]+(out)[^]+("+f+")[^]+","g").test(n)&&(p[n]=f);for(d in p)if(p.hasOwnProperty(d)){for(var m=p[d],g=r.indexOf(d),y=h[m],_=y.length,v=0;v<_;v++)r.splice(g,0,y[v]);for(g+=_+1,v=_-1;0<=v;v--)r.splice(g,0,"#endif //"+y[v])}u="WEBGL_2";var C="#version 300 es",x=!1;for(o=0;o<r.length;o++)if(/#version/.test(r[o])){r[o]=C,x=!0;break}return x||r.splice(0,0,C),r.splice(1,0,"#define WEBGL_2"),removeExtension("EXT_draw_buffers",u,r),removeExtension("EXT_frag_depth",u,r),removeExtension("OES_standard_derivatives",u,r),replaceInSourceString("texture2D","texture",r),replaceInSourceString("texture3D","texture",r),replaceInSourceString("textureCube","texture",r),replaceInSourceString("gl_FragDepthEXT","gl_FragDepth",r),t?replaceInSourceString("varying","in",r):(replaceInSourceString("attribute","in",r),replaceInSourceString("varying","out",r)),compileSource(r)}function replaceInSourceString(e,t,i){for(var r=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=i.length,a=0;a<n;++a){var o=i[a];i[a]=o.replace(r,"$1"+t+"$3")}}function replaceInSourceRegex(e,t,i){for(var r=i.length,n=0;n<r;++n){var a=i[n];i[n]=a.replace(e,t)}}function findInSource(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),r=t.length,n=0;n<r;++n){var a=t[n];if(i.test(a))return 1}}function compileSource(e){for(var t="",i=e.length,r=0;r<i;++r)t+=e[r]+"\n";return t}function setAdd(e,t){-1===t.indexOf(e)&&t.push(e)}function getVariablePreprocessorBranch(e,t){for(var i={},r=e.length,n=[],a=0;a<t.length;++a){var o=t[a],s=/(#ifdef|#if)/g.test(o),l=/#else/g.test(o),c=/#endif/g.test(o);if(s)n.push(o);else if(l)l=n[n.length-1].replace("ifdef","ifndef"),/if/g.test(l)&&(l=l.replace(/(#if\s+)(\S*)([^]*)/,"$1!($2)$3")),n.pop(),n.push(l);else if(c)n.pop();else if(!/layout/g.test(o))for(var u=0;u<r;++u){var d=e[u];-1!==o.indexOf(d)&&(defined(i[d])?i[d]=i[d].filter((function(e){return 0<=n.indexOf(e)})):i[d]=n.slice())}}return i}function removeExtension(e,t,i){replaceInSourceRegex(new RegExp("#extension\\s+GL_"+e+"\\s+:\\s+[a-zA-Z0-9]+\\s*$","g"),"",i),replaceInSourceString("GL_"+e,t,i)}ShaderProgram.prototype._bind=function(){initialize$1(this),this._gl.useProgram(this._program)},ShaderProgram.prototype._setUniforms=function(e,t,i){if(defined(e))for(var r=this._manualUniforms,n=r.length,a=0;a<n;++a){var o=r[a];o.value=e[o.name]()}var s=this._automaticUniforms;for(n=s.length,a=0;a<n;++a){var l=s[a];l.uniform.value=l.automaticUniform.getValue(t)}var c,u=this._uniforms;for(n=u.length,a=0;a<n;++a)u[a].set();i&&(c=this._gl,i=this._program,c.validateProgram(i))},ShaderProgram.prototype.isDestroyed=function(){return!1},ShaderProgram.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},ShaderProgram.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),destroyObject(this)};var czm_degreesPerRadian="const float czm_degreesPerRadian = 57.29577951308232;\n",czm_depthRange="const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n",czm_epsilon1="const float czm_epsilon1 = 0.1;\n",czm_epsilon2="const float czm_epsilon2 = 0.01;\n",czm_epsilon3="const float czm_epsilon3 = 0.001;\n",czm_epsilon4="const float czm_epsilon4 = 0.0001;\n",czm_epsilon5="const float czm_epsilon5 = 0.00001;\n",czm_epsilon6="const float czm_epsilon6 = 0.000001;\n",czm_epsilon7="const float czm_epsilon7 = 0.0000001;\n",czm_infinity="const float czm_infinity = 5906376272000.0;\n",czm_oneOverPi="const float czm_oneOverPi = 0.3183098861837907;\n",czm_oneOverTwoPi="const float czm_oneOverTwoPi = 0.15915494309189535;\n",czm_passCesium3DTile="const float czm_passCesium3DTile = 4.0;\n",czm_passCesium3DTileClassification="const float czm_passCesium3DTileClassification = 5.0;\n",czm_passCesium3DTileClassificationIgnoreShow="const float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n",czm_passClassification="const float czm_passClassification = 7.0;\n",czm_passCompute="const float czm_passCompute = 1.0;\n",czm_passEnvironment="const float czm_passEnvironment = 0.0;\n",czm_passGlobe="const float czm_passGlobe = 2.0;\n",czm_passOpaque="const float czm_passOpaque = 7.0;\n",czm_passOverlay="const float czm_passOverlay = 9.0;\n",czm_passTerrainClassification="const float czm_passTerrainClassification = 3.0;\n",czm_passTranslucent="const float czm_passTranslucent = 8.0;\n",czm_pi="const float czm_pi = 3.141592653589793;\n",czm_piOverFour="const float czm_piOverFour = 0.7853981633974483;\n",czm_piOverSix="const float czm_piOverSix = 0.5235987755982988;\n",czm_piOverThree="const float czm_piOverThree = 1.0471975511965976;\n",czm_piOverTwo="const float czm_piOverTwo = 1.5707963267948966;\n",czm_radiansPerDegree="const float czm_radiansPerDegree = 0.017453292519943295;\n",czm_sceneMode2D="const float czm_sceneMode2D = 2.0;\n",czm_sceneMode3D="const float czm_sceneMode3D = 3.0;\n",czm_sceneModeColumbusView="const float czm_sceneModeColumbusView = 1.0;\n",czm_sceneModeMorphing="const float czm_sceneModeMorphing = 0.0;\n",czm_solarRadius="const float czm_solarRadius = 695500000.0;\n",czm_threePiOver2="const float czm_threePiOver2 = 4.71238898038469;\n",czm_twoPi="const float czm_twoPi = 6.283185307179586;\n",czm_webMercatorMaxLatitude="const float czm_webMercatorMaxLatitude = 1.4844222297453324;\n",czm_depthRangeStruct="struct czm_depthRangeStruct\n{\nfloat near;\nfloat far;\n};\n",czm_material="struct czm_material\n{\nvec3 diffuse;\nfloat specular;\nfloat shininess;\nvec3 normal;\nvec3 emission;\nfloat alpha;\n};\n",czm_materialInput="struct czm_materialInput\n{\nfloat s;\nvec2 st;\nvec3 str;\nvec3 normalEC;\nmat3 tangentToEyeMatrix;\nvec3 positionToEyeEC;\nfloat height;\nfloat slope;\nfloat aspect;\n};\n",czm_ray="struct czm_ray\n{\nvec3 origin;\nvec3 direction;\n};\n",czm_raySegment="struct czm_raySegment\n{\nfloat start;\nfloat stop;\n};\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n",czm_shadowParameters="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\nvec3 texCoords;\n#else\nvec2 texCoords;\n#endif\nfloat depthBias;\nfloat depth;\nfloat nDotL;\nvec2 texelStepSize;\nfloat normalShadingSmooth;\nfloat darkness;\n};\n",czm_HSBToRGB="const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 czm_HSBToRGB(vec3 hsb)\n{\nvec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\nreturn hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n",czm_HSLToRGB="vec3 hueToRGB(float hue)\n{\nfloat r = abs(hue * 6.0 - 3.0) - 1.0;\nfloat g = 2.0 - abs(hue * 6.0 - 2.0);\nfloat b = 2.0 - abs(hue * 6.0 - 4.0);\nreturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\nvec3 czm_HSLToRGB(vec3 hsl)\n{\nvec3 rgb = hueToRGB(hsl.x);\nfloat c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\nreturn (rgb - 0.5) * c + hsl.z;\n}\n",czm_RGBToHSB="const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec3 czm_RGBToHSB(vec3 rgb)\n{\nvec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\nvec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\nfloat d = q.x - min(q.w, q.y);\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n",czm_RGBToHSL="vec3 RGBtoHCV(vec3 rgb)\n{\nvec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\nvec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\nfloat c = q.x - min(q.w, q.y);\nfloat h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\nreturn vec3(h, c, q.x);\n}\nvec3 czm_RGBToHSL(vec3 rgb)\n{\nvec3 hcv = RGBtoHCV(rgb);\nfloat l = hcv.z - hcv.y * 0.5;\nfloat s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\nreturn vec3(hcv.x, s, l);\n}\n",czm_RGBToXYZ="vec3 czm_RGBToXYZ(vec3 rgb)\n{\nconst mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n0.3576, 0.7152, 0.1192,\n0.1805, 0.0722, 0.9505);\nvec3 xyz = RGB2XYZ * rgb;\nvec3 Yxy;\nYxy.r = xyz.g;\nfloat temp = dot(vec3(1.0), xyz);\nYxy.gb = xyz.rg / temp;\nreturn Yxy;\n}\n",czm_XYZToRGB="vec3 czm_XYZToRGB(vec3 Yxy)\n{\nconst mat3 XYZ2RGB = mat3( 3.2405, -0.9693,  0.0556,\n-1.5371,  1.8760, -0.2040,\n-0.4985,  0.0416,  1.0572);\nvec3 xyz;\nxyz.r = Yxy.r * Yxy.g / Yxy.b;\nxyz.g = Yxy.r;\nxyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\nreturn XYZ2RGB * xyz;\n}\n",czm_acesTonemapping="vec3 czm_acesTonemapping(vec3 color) {\nfloat g = 0.985;\nfloat a = 0.065;\nfloat b = 0.0001;\nfloat c = 0.433;\nfloat d = 0.238;\ncolor = (color * (color + a) - b) / (color * (g * color + c) + d);\ncolor = clamp(color, 0.0, 1.0);\nreturn color;\n}\n",czm_alphaWeight="float czm_alphaWeight(float a)\n{\nfloat z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nreturn pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n",czm_antialias="vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\nfloat val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\nfloat val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\nval1 = val1 * (1.0 - val2);\nval1 = val1 * val1 * (3.0 - (2.0 * val1));\nval1 = pow(val1, 0.5);\nvec4 midColor = (color1 + color2) * 0.5;\nreturn mix(midColor, currentColor, val1);\n}\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\nreturn czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n",czm_approximateSphericalCoordinates="vec2 czm_approximateSphericalCoordinates(vec3 normal) {\nfloat latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\nfloat longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\nreturn vec2(latitudeApproximation, longitudeApproximation);\n}\n",czm_backFacing="bool czm_backFacing()\n{\nreturn gl_FrontFacing == false;\n}\n",czm_branchFreeTernary="float czm_branchFreeTernary(bool comparison, float a, float b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\n",czm_cascadeColor="vec4 czm_cascadeColor(vec4 weights)\n{\nreturn vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\nvec4(0.0, 1.0, 0.0, 1.0) * weights.y +\nvec4(0.0, 0.0, 1.0, 1.0) * weights.z +\nvec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n",czm_cascadeDistance="uniform vec4 shadowMap_cascadeDistances;\nfloat czm_cascadeDistance(vec4 weights)\n{\nreturn dot(shadowMap_cascadeDistances, weights);\n}\n",czm_cascadeMatrix="uniform mat4 shadowMap_cascadeMatrices[4];\nmat4 czm_cascadeMatrix(vec4 weights)\n{\nreturn shadowMap_cascadeMatrices[0] * weights.x +\nshadowMap_cascadeMatrices[1] * weights.y +\nshadowMap_cascadeMatrices[2] * weights.z +\nshadowMap_cascadeMatrices[3] * weights.w;\n}\n",czm_cascadeWeights="uniform vec4 shadowMap_cascadeSplits[2];\nvec4 czm_cascadeWeights(float depthEye)\n{\nvec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\nvec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\nreturn near * far;\n}\n",czm_columbusViewMorph="vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\nvec3 p = mix(position2D.xyz, position3D.xyz, time);\nreturn vec4(p, 1.0);\n}\n",czm_computePosition="vec4 czm_computePosition();\n",czm_cosineAndSine="vec2 cordic(float angle)\n{\nvec2 vector = vec2(6.0725293500888267e-1, 0.0);\nfloat sense = (angle < 0.0) ? -1.0 : 1.0;\nmat2 rotation = mat2(1.0, sense, -sense, 1.0);\nvector = rotation * vector;\nangle -= sense * 7.8539816339744828e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfloat factor = sense * 5.0e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.6364760900080609e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.5e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4497866312686414e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.25e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2435499454676144e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.25e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.2418809995957350e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.125e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.1239833430268277e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.5625e-2;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5623728620476831e-2;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.8125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.8123410601011111e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.90625e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.9062301319669718e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.953125e-3;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9531225164788188e-3;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.765625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.7656218955931946e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.8828125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.8828121119489829e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.44140625e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4414062014936177e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.220703125e-4;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2207031189367021e-4;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 6.103515625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 6.1035156174208773e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.0517578125e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.0517578115526096e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.52587890625e-5;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.5258789061315762e-5;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 7.62939453125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 7.6293945311019700e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 3.814697265625e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 3.8146972656064961e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.9073486328125e-6;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.9073486328101870e-6;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 9.5367431640625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 9.5367431640596084e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 4.76837158203125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.7683715820308884e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.384185791015625e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.3841857910155797e-7;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.1920928955078125e-7;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nreturn vector;\n}\nvec2 czm_cosineAndSine(float angle)\n{\nif (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n{\nif (angle < 0.0)\n{\nreturn -cordic(angle + czm_pi);\n}\nelse\n{\nreturn -cordic(angle - czm_pi);\n}\n}\nelse\n{\nreturn cordic(angle);\n}\n}\n",czm_decompressTextureCoordinates="vec2 czm_decompressTextureCoordinates(float encoded)\n{\nfloat temp = encoded / 4096.0;\nfloat xZeroTo4095 = floor(temp);\nfloat stx = xZeroTo4095 / 4095.0;\nfloat sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\nreturn vec2(stx, sty);\n}\n",czm_depthClamp="#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\nvarying float v_WindowZ;\n#endif\nvec4 czm_depthClamp(vec4 coords)\n{\n#ifndef LOG_DEPTH\n#ifdef GL_EXT_frag_depth\nv_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\ncoords.z = 0.0;\n#else\ncoords.z = min(coords.z, coords.w);\n#endif\n#endif\nreturn coords;\n}\n",czm_eastNorthUpToEyeCoordinates="mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\nvec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0));\nvec3 tangentEC = normalize(czm_normal3D * tangentMC);\nvec3 bitangentEC = normalize(cross(normalEC, tangentEC));\nreturn mat3(\ntangentEC.x,   tangentEC.y,   tangentEC.z,\nbitangentEC.x, bitangentEC.y, bitangentEC.z,\nnormalEC.x,    normalEC.y,    normalEC.z);\n}\n",czm_ellipsoidContainsPoint="bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\nvec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\nreturn (dot(scaled, scaled) <= 1.0);\n}\n",czm_ellipsoidWgs84TextureCoordinates="vec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\nreturn vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n",czm_equalsEpsilon="bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\nreturn all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\nreturn (abs(left - right) <= epsilon);\n}\n",czm_eyeOffset="vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\nvec4 p = positionEC;\nvec4 zEyeOffset = normalize(p) * eyeOffset.z;\np.xy += eyeOffset.xy + zEyeOffset.xy;\np.z += zEyeOffset.z;\nreturn p;\n}\n",czm_eyeToWindowCoordinates="vec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\nvec4 q = czm_projection * positionEC;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_fastApproximateAtan="float czm_fastApproximateAtan(float x) {\nreturn x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\nfloat czm_fastApproximateAtan(float x, float y) {\nfloat t = abs(x);\nfloat opposite = abs(y);\nfloat adjacent = max(t, opposite);\nopposite = min(t, opposite);\nt = czm_fastApproximateAtan(opposite / adjacent);\nt = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\nt = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\nt = czm_branchFreeTernary(y < 0.0, -t, t);\nreturn t;\n}\n",czm_fog="vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-(scalar * scalar));\nreturn mix(color, fogColor, fog);\n}\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\nfloat scalar = distanceToCamera * czm_fogDensity;\nfloat fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\nreturn mix(color, fogColor, fog);\n}\n",czm_gammaCorrect="vec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\ncolor = pow(color, vec3(czm_gamma));\n#endif\nreturn color;\n}\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\ncolor.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\nreturn color;\n}\n",czm_geodeticSurfaceNormal="vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\nreturn normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n",czm_getDefaultMaterial="czm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\nczm_material material;\nmaterial.diffuse = vec3(0.0);\nmaterial.specular = 0.0;\nmaterial.shininess = 1.0;\nmaterial.normal = materialInput.normalEC;\nmaterial.emission = vec3(0.0);\nmaterial.alpha = 1.0;\nreturn material;\n}\n",czm_getLambertDiffuse="float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\nreturn max(dot(lightDirectionEC, normalEC), 0.0);\n}\n",czm_getSpecular="float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\nvec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\nfloat specular = max(dot(toReflectedLight, toEyeEC), 0.0);\nreturn pow(specular, max(shininess, czm_epsilon2));\n}\n",czm_getWaterNoise="vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\nfloat cosAngle = cos(angleInRadians);\nfloat sinAngle = sin(angleInRadians);\nvec2 s0 = vec2(1.0/17.0, 0.0);\nvec2 s1 = vec2(-1.0/29.0, 0.0);\nvec2 s2 = vec2(1.0/101.0, 1.0/59.0);\nvec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\ns0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\ns1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\ns2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\ns3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\nvec2 uv0 = (uv/103.0) + (time * s0);\nvec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\nvec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\nvec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\nuv0 = fract(uv0);\nuv1 = fract(uv1);\nuv2 = fract(uv2);\nuv3 = fract(uv3);\nvec4 noise = (texture2D(normalMap, uv0)) +\n(texture2D(normalMap, uv1)) +\n(texture2D(normalMap, uv2)) +\n(texture2D(normalMap, uv3));\nreturn ((noise / 4.0) - 0.5) * 2.0;\n}\n",czm_hue="vec3 czm_hue(vec3 rgb, float adjustment)\n{\nconst mat3 toYIQ = mat3(0.299,     0.587,     0.114,\n0.595716, -0.274453, -0.321263,\n0.211456, -0.522591,  0.311135);\nconst mat3 toRGB = mat3(1.0,  0.9563,  0.6210,\n1.0, -0.2721, -0.6474,\n1.0, -1.107,   1.7046);\nvec3 yiq = toYIQ * rgb;\nfloat hue = atan(yiq.z, yiq.y) + adjustment;\nfloat chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\nvec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\nreturn toRGB * color;\n}\n",czm_inverseGamma="vec3 czm_inverseGamma(vec3 color) {\nreturn pow(color, vec3(1.0 / czm_gamma));\n}\n",czm_isEmpty="bool czm_isEmpty(czm_raySegment interval)\n{\nreturn (interval.stop < 0.0);\n}\n",czm_isFull="bool czm_isFull(czm_raySegment interval)\n{\nreturn (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n",czm_latitudeToWebMercatorFraction="float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\nfloat sinLatitude = sin(latitude);\nfloat mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\nreturn (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n",czm_lineDistance="float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\nreturn abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n",czm_luminance="float czm_luminance(vec3 rgb)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nreturn dot(rgb, W);\n}\n",czm_metersPerPixel="float czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\nfloat width = czm_viewport.z;\nfloat height = czm_viewport.w;\nfloat pixelWidth;\nfloat pixelHeight;\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nif (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n{\nfloat frustumWidth = right - left;\nfloat frustumHeight = top - bottom;\npixelWidth = frustumWidth / width;\npixelHeight = frustumHeight / height;\n}\nelse\n{\nfloat distanceToPixel = -positionEC.z;\nfloat inverseNear = 1.0 / czm_currentFrustum.x;\nfloat tanTheta = top * inverseNear;\npixelHeight = 2.0 * distanceToPixel * tanTheta / height;\ntanTheta = right * inverseNear;\npixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n}\nreturn max(pixelWidth, pixelHeight) * pixelRatio;\n}\nfloat czm_metersPerPixel(vec4 positionEC)\n{\nreturn czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n",czm_modelToWindowCoordinates="vec4 czm_modelToWindowCoordinates(vec4 position)\n{\nvec4 q = czm_modelViewProjection * position;\nq.xyz /= q.w;\nq.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;\nreturn q;\n}\n",czm_multiplyWithColorBalance="vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 target = left * right;\nfloat leftLuminance = dot(left, W);\nfloat rightLuminance = dot(right, W);\nfloat targetLuminance = dot(target, W);\nreturn ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n",czm_nearFarScalar="float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\nfloat valueAtMin = nearFarScalar.y;\nfloat valueAtMax = nearFarScalar.w;\nfloat nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\nfloat farDistanceSq = nearFarScalar.z * nearFarScalar.z;\nfloat t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\nt = pow(clamp(t, 0.0, 1.0), 0.2);\nreturn mix(valueAtMin, valueAtMax, t);\n}\n",czm_octDecode="vec3 czm_octDecode(vec2 encoded, float range)\n{\nif (encoded.x == 0.0 && encoded.y == 0.0) {\nreturn vec3(0.0, 0.0, 0.0);\n}\nencoded = encoded / range * 2.0 - 1.0;\nvec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\nif (v.z < 0.0)\n{\nv.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n}\nreturn normalize(v);\n}\nvec3 czm_octDecode(vec2 encoded)\n{\nreturn czm_octDecode(encoded, 255.0);\n}\nvec3 czm_octDecode(float encoded)\n{\nfloat temp = encoded / 256.0;\nfloat x = floor(temp);\nfloat y = (temp - x) * 256.0;\nreturn czm_octDecode(vec2(x, y));\n}\nvoid czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n{\nfloat temp = encoded.x / 65536.0;\nfloat x = floor(temp);\nfloat encodedFloat1 = (temp - x) * 65536.0;\ntemp = encoded.y / 65536.0;\nfloat y = floor(temp);\nfloat encodedFloat2 = (temp - y) * 65536.0;\nvector1 = czm_octDecode(encodedFloat1);\nvector2 = czm_octDecode(encodedFloat2);\nvector3 = czm_octDecode(vec2(x, y));\n}\n",czm_packDepth="vec4 czm_packDepth(float depth)\n{\nvec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\nenc = fract(enc);\nenc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\nreturn enc;\n}\n",czm_phong="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\nreturn czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\nreturn czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n}\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\nfloat specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\nvec3 ambient = vec3(0.0);\nvec3 color = ambient + material.emission;\ncolor += material.diffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_planeDistance="float czm_planeDistance(vec4 plane, vec3 point) {\nreturn (dot(plane.xyz, point) + plane.w);\n}\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\nreturn (dot(planeNormal, point) + planeDistance);\n}\n",czm_pointAlongRay="vec3 czm_pointAlongRay(czm_ray ray, float time)\n{\nreturn ray.origin + (time * ray.direction);\n}\n",czm_rayEllipsoidIntersectionInterval="czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\nvec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\nvec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\nq = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\nfloat q2 = dot(q, q);\nfloat qw = dot(q, w);\nif (q2 > 1.0)\n{\nif (qw >= 0.0)\n{\nreturn czm_emptyRaySegment;\n}\nelse\n{\nfloat qw2 = qw * qw;\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nif (qw2 < product)\n{\nreturn czm_emptyRaySegment;\n}\nelse if (qw2 > product)\n{\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nfloat root0 = temp / w2;\nfloat root1 = difference / temp;\nif (root0 < root1)\n{\nczm_raySegment i = czm_raySegment(root0, root1);\nreturn i;\n}\nelse\n{\nczm_raySegment i = czm_raySegment(root1, root0);\nreturn i;\n}\n}\nelse\n{\nfloat root = sqrt(difference / w2);\nczm_raySegment i = czm_raySegment(root, root);\nreturn i;\n}\n}\n}\nelse if (q2 < 1.0)\n{\nfloat difference = q2 - 1.0;\nfloat w2 = dot(w, w);\nfloat product = w2 * difference;\nfloat discriminant = qw * qw - product;\nfloat temp = -qw + sqrt(discriminant);\nczm_raySegment i = czm_raySegment(0.0, temp / w2);\nreturn i;\n}\nelse\n{\nif (qw < 0.0)\n{\nfloat w2 = dot(w, w);\nczm_raySegment i = czm_raySegment(0.0, -qw / w2);\nreturn i;\n}\nelse\n{\nreturn czm_emptyRaySegment;\n}\n}\n}\n",czm_readDepth="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\nreturn czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n",czm_readNonPerspective="float czm_readNonPerspective(float value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\nreturn value * oneOverW;\n}\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\nreturn value * oneOverW;\n}\n",czm_reverseLogDepth="float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nreturn far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\nreturn logZ;\n}\n",czm_sampleOctahedralProjection="vec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\ndirection /= dot(vec3(1.0), abs(direction));\nvec2 rev = abs(direction.zx) - vec2(1.0);\nvec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\ndirection.z < 0.0 ? rev.y : -rev.y);\nvec2 uv = direction.y < 0.0 ? neg : direction.xz;\nvec2 coord = 0.5 * uv + vec2(0.5);\nvec2 pixel = 1.0 / textureSize;\nif (lod > 0.0)\n{\nfloat scale = 1.0 / pow(2.0, lod);\nfloat offset = ((textureSize.y + 1.0) / textureSize.x);\ncoord.x *= offset;\ncoord *= scale;\ncoord.x += offset + pixel.x;\ncoord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n}\nelse\n{\ncoord.x *= (textureSize.y / textureSize.x);\n}\n#ifndef OES_texture_float_linear\nvec3 color1 = texture2D(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\nvec3 color2 = texture2D(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\nvec3 color3 = texture2D(projectedMap, coord + pixel).rgb;\nvec3 color4 = texture2D(projectedMap, coord).rgb;\nvec2 texturePosition = coord * textureSize;\nfloat fu = fract(texturePosition.x);\nfloat fv = fract(texturePosition.y);\nvec3 average1 = mix(color4, color2, fu);\nvec3 average2 = mix(color1, color3, fu);\nvec3 color = mix(average1, average2, fv);\n#else\nvec3 color = texture2D(projectedMap, coord).rgb;\n#endif\nreturn color;\n}\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\nfloat currentLod = floor(lod + 0.5);\nfloat nextLod = min(currentLod + 1.0, maxLod);\nvec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\nvec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\nreturn mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n",czm_saturation="vec3 czm_saturation(vec3 rgb, float adjustment)\n{\nconst vec3 W = vec3(0.2125, 0.7154, 0.0721);\nvec3 intensity = vec3(dot(rgb, W));\nreturn mix(intensity, rgb, adjustment);\n}\n",czm_shadowDepthCompare="float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)\n{\nreturn czm_unpackDepth(textureCube(shadowMap, d));\n}\nfloat czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\nreturn texture2D(shadowMap, uv).r;\n#else\nreturn czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\nreturn step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n",czm_shadowVisibility="float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\nfloat strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\nfloat strength = step(0.0, nDotL);\n#endif\nvisibility *= strength;\n#endif\nvisibility = max(visibility, darkness);\nreturn visibility;\n}\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec3 uvw = shadowParameters.texCoords;\ndepth -= depthBias;\nfloat visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec2 uv = shadowParameters.texCoords;\ndepth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\nvec2 texelStepSize = shadowParameters.texelStepSize;\nfloat radius = 1.0;\nfloat dx0 = -texelStepSize.x * radius;\nfloat dy0 = -texelStepSize.y * radius;\nfloat dx1 = texelStepSize.x * radius;\nfloat dy1 = texelStepSize.y * radius;\nfloat visibility = (\nczm_shadowDepthCompare(shadowMap, uv, depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n) * (1.0 / 9.0);\n#else\nfloat visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n",czm_signNotZero="float czm_signNotZero(float value)\n{\nreturn value >= 0.0 ? 1.0 : -1.0;\n}\nvec2 czm_signNotZero(vec2 value)\n{\nreturn vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\nvec3 czm_signNotZero(vec3 value)\n{\nreturn vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\nvec4 czm_signNotZero(vec4 value)\n{\nreturn vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n",czm_sphericalHarmonics="vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\nconst float c1 = 0.429043;\nconst float c2 = 0.511664;\nconst float c3 = 0.743125;\nconst float c4 = 0.886227;\nconst float c5 = 0.247708;\nvec3 L00 = coefficients[0];\nvec3 L1_1 = coefficients[1];\nvec3 L10 = coefficients[2];\nvec3 L11 = coefficients[3];\nvec3 L2_2 = coefficients[4];\nvec3 L2_1 = coefficients[5];\nvec3 L20 = coefficients[6];\nvec3 L21 = coefficients[7];\nvec3 L22 = coefficients[8];\nfloat x = normal.x;\nfloat y = normal.y;\nfloat z = normal.z;\nreturn c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n",czm_tangentToEyeSpaceMatrix="mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\nvec3 normal = normalize(normalEC);\nvec3 tangent = normalize(tangentEC);\nvec3 bitangent = normalize(bitangentEC);\nreturn mat3(tangent.x  , tangent.y  , tangent.z,\nbitangent.x, bitangent.y, bitangent.z,\nnormal.x   , normal.y   , normal.z);\n}\n",czm_transformPlane="vec4 czm_transformPlane(vec4 plane, mat4 transform) {\nvec4 transformedPlane = transform * plane;\nfloat normalMagnitude = length(transformedPlane.xyz);\nreturn transformedPlane / normalMagnitude;\n}\n",czm_translateRelativeToEye="vec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\nvec3 highDifference = high - czm_encodedCameraPositionMCHigh;\nvec3 lowDifference = low - czm_encodedCameraPositionMCLow;\nreturn vec4(highDifference + lowDifference, 1.0);\n}\n",czm_translucentPhong="vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\nfloat diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\nif (czm_sceneMode == czm_sceneMode3D) {\ndiffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n}\ndiffuse = clamp(diffuse, 0.0, 1.0);\nfloat specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\nvec3 materialDiffuse = material.diffuse * 0.5;\nvec3 ambient = materialDiffuse;\nvec3 color = ambient + material.emission;\ncolor += materialDiffuse * diffuse * czm_lightColor;\ncolor += material.specular * specular * czm_lightColor;\nreturn vec4(color, material.alpha);\n}\n",czm_transpose="mat2 czm_transpose(mat2 matrix)\n{\nreturn mat2(\nmatrix[0][0], matrix[1][0],\nmatrix[0][1], matrix[1][1]);\n}\nmat3 czm_transpose(mat3 matrix)\n{\nreturn mat3(\nmatrix[0][0], matrix[1][0], matrix[2][0],\nmatrix[0][1], matrix[1][1], matrix[2][1],\nmatrix[0][2], matrix[1][2], matrix[2][2]);\n}\nmat4 czm_transpose(mat4 matrix)\n{\nreturn mat4(\nmatrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\nmatrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\nmatrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\nmatrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n",czm_unpackDepth="float czm_unpackDepth(vec4 packedDepth)\n{\nreturn dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n}\n",czm_unpackFloat="#define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0\n#define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0\n#define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0\n#define BIAS 38.0\nfloat czm_unpackFloat(vec4 packedFloat)\n{\npackedFloat *= 255.0;\nfloat temp = packedFloat.w / 2.0;\nfloat exponent = floor(temp);\nfloat sign = (temp - exponent) * 2.0;\nexponent = exponent - float(BIAS);\nsign = sign * 2.0 - 1.0;\nsign = -sign;\nfloat unpacked = sign * packedFloat.x * float(SHIFT_RIGHT_8);\nunpacked += sign * packedFloat.y * float(SHIFT_RIGHT_16);\nunpacked += sign * packedFloat.z * float(SHIFT_RIGHT_24);\nreturn unpacked * pow(10.0, exponent);\n}\n",czm_vertexLogDepth="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n#ifdef SHADOW_MAP\nvec3 logPositionEC = (czm_inverseProjection * coords).xyz;\nv_logPositionEC = logPositionEC;\n#endif\ncoords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\nreturn coords;\n}\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;\ngl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;\nczm_updatePositionDepth(clipCoords);\n#endif\n}\n",czm_windowToEyeCoordinates="vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\nfloat x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\nfloat y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\nfloat z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\nvec4 q = vec4(x, y, z, 1.0);\nq /= fragmentCoordinate.w;\nif (!(czm_inverseProjection == mat4(0.0)))\n{\nq = czm_inverseProjection * q;\n}\nelse\n{\nfloat top = czm_frustumPlanes.x;\nfloat bottom = czm_frustumPlanes.y;\nfloat left = czm_frustumPlanes.z;\nfloat right = czm_frustumPlanes.w;\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nq.x = (q.x * (right - left) + left + right) * 0.5;\nq.y = (q.y * (top - bottom) + bottom + top) * 0.5;\nq.z = (q.z * (near - far) - near - far) * 0.5;\nq.w = 1.0;\n}\nreturn q;\n}\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n#ifdef LOG_DEPTH\nfloat near = czm_currentFrustum.x;\nfloat far = czm_currentFrustum.y;\nfloat log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\nfloat depthFromNear = pow(2.0, log2Depth) - 1.0;\nfloat depthFromCamera = depthFromNear + near;\nvec4 windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\neyeCoordinate.w = 1.0 / depthFromCamera;\nreturn eyeCoordinate;\n#else\nvec4 windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\nreturn eyeCoordinate;\n}\n",czm_writeDepthClamp="#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\nvarying float v_WindowZ;\n#endif\nvoid czm_writeDepthClamp()\n{\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\ngl_FragDepthEXT = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);\n#endif\n}\n",czm_writeLogDepth="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n#endif\nvoid czm_writeLogDepth(float depth)\n{\n#if defined(GL_EXT_frag_depth) && defined(LOG_DEPTH)\nif (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\ndiscard;\n}\n#ifdef POLYGON_OFFSET\nfloat factor = u_polygonOffset[0];\nfloat units = u_polygonOffset[1];\n#ifdef GL_OES_standard_derivatives\nfloat x = dFdx(depth);\nfloat y = dFdy(depth);\nfloat m = sqrt(x * x + y * y);\ndepth += m * factor;\n#endif\n#endif\ngl_FragDepthEXT = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n#ifdef POLYGON_OFFSET\ngl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n#endif\n}\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\nczm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n",czm_writeNonPerspective="float czm_writeNonPerspective(float value, float w) {\nreturn value * w;\n}\nvec2 czm_writeNonPerspective(vec2 value, float w) {\nreturn value * w;\n}\nvec3 czm_writeNonPerspective(vec3 value, float w) {\nreturn value * w;\n}\nvec4 czm_writeNonPerspective(vec4 value, float w) {\nreturn value * w;\n}\n",CzmBuiltins={czm_degreesPerRadian:czm_degreesPerRadian,czm_depthRange:czm_depthRange,czm_epsilon1:czm_epsilon1,czm_epsilon2:czm_epsilon2,czm_epsilon3:czm_epsilon3,czm_epsilon4:czm_epsilon4,czm_epsilon5:czm_epsilon5,czm_epsilon6:czm_epsilon6,czm_epsilon7:czm_epsilon7,czm_infinity:czm_infinity,czm_oneOverPi:czm_oneOverPi,czm_oneOverTwoPi:czm_oneOverTwoPi,czm_passCesium3DTile:czm_passCesium3DTile,czm_passCesium3DTileClassification:czm_passCesium3DTileClassification,czm_passCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,czm_passClassification:czm_passClassification,czm_passCompute:czm_passCompute,czm_passEnvironment:czm_passEnvironment,czm_passGlobe:czm_passGlobe,czm_passOpaque:czm_passOpaque,czm_passOverlay:czm_passOverlay,czm_passTerrainClassification:czm_passTerrainClassification,czm_passTranslucent:czm_passTranslucent,czm_pi:czm_pi,czm_piOverFour:czm_piOverFour,czm_piOverSix:czm_piOverSix,czm_piOverThree:czm_piOverThree,czm_piOverTwo:czm_piOverTwo,czm_radiansPerDegree:czm_radiansPerDegree,czm_sceneMode2D:czm_sceneMode2D,czm_sceneMode3D:czm_sceneMode3D,czm_sceneModeColumbusView:czm_sceneModeColumbusView,czm_sceneModeMorphing:czm_sceneModeMorphing,czm_solarRadius:czm_solarRadius,czm_threePiOver2:czm_threePiOver2,czm_twoPi:czm_twoPi,czm_webMercatorMaxLatitude:czm_webMercatorMaxLatitude,czm_depthRangeStruct:czm_depthRangeStruct,czm_material:czm_material,czm_materialInput:czm_materialInput,czm_ray:czm_ray,czm_raySegment:czm_raySegment,czm_shadowParameters:czm_shadowParameters,czm_HSBToRGB:czm_HSBToRGB,czm_HSLToRGB:czm_HSLToRGB,czm_RGBToHSB:czm_RGBToHSB,czm_RGBToHSL:czm_RGBToHSL,czm_RGBToXYZ:czm_RGBToXYZ,czm_XYZToRGB:czm_XYZToRGB,czm_acesTonemapping:czm_acesTonemapping,czm_alphaWeight:czm_alphaWeight,czm_antialias:czm_antialias,czm_approximateSphericalCoordinates:czm_approximateSphericalCoordinates,czm_backFacing:czm_backFacing,czm_branchFreeTernary:czm_branchFreeTernary,czm_cascadeColor:czm_cascadeColor,czm_cascadeDistance:czm_cascadeDistance,czm_cascadeMatrix:czm_cascadeMatrix,czm_cascadeWeights:czm_cascadeWeights,czm_columbusViewMorph:czm_columbusViewMorph,czm_computePosition:czm_computePosition,czm_cosineAndSine:czm_cosineAndSine,czm_decompressTextureCoordinates:czm_decompressTextureCoordinates,czm_depthClamp:czm_depthClamp,czm_eastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,czm_ellipsoidContainsPoint:czm_ellipsoidContainsPoint,czm_ellipsoidWgs84TextureCoordinates:czm_ellipsoidWgs84TextureCoordinates,czm_equalsEpsilon:czm_equalsEpsilon,czm_eyeOffset:czm_eyeOffset,czm_eyeToWindowCoordinates:czm_eyeToWindowCoordinates,czm_fastApproximateAtan:czm_fastApproximateAtan,czm_fog:czm_fog,czm_gammaCorrect:czm_gammaCorrect,czm_geodeticSurfaceNormal:czm_geodeticSurfaceNormal,czm_getDefaultMaterial:czm_getDefaultMaterial,czm_getLambertDiffuse:czm_getLambertDiffuse,czm_getSpecular:czm_getSpecular,czm_getWaterNoise:czm_getWaterNoise,czm_hue:czm_hue,czm_inverseGamma:czm_inverseGamma,czm_isEmpty:czm_isEmpty,czm_isFull:czm_isFull,czm_latitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,czm_lineDistance:czm_lineDistance,czm_luminance:czm_luminance,czm_metersPerPixel:czm_metersPerPixel,czm_modelToWindowCoordinates:czm_modelToWindowCoordinates,czm_multiplyWithColorBalance:czm_multiplyWithColorBalance,czm_nearFarScalar:czm_nearFarScalar,czm_octDecode:czm_octDecode,czm_packDepth:czm_packDepth,czm_phong:czm_phong,czm_planeDistance:czm_planeDistance,czm_pointAlongRay:czm_pointAlongRay,czm_rayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,czm_readDepth:czm_readDepth,czm_readNonPerspective:czm_readNonPerspective,czm_reverseLogDepth:czm_reverseLogDepth,czm_sampleOctahedralProjection:czm_sampleOctahedralProjection,czm_saturation:czm_saturation,czm_shadowDepthCompare:czm_shadowDepthCompare,czm_shadowVisibility:czm_shadowVisibility,czm_signNotZero:czm_signNotZero,czm_sphericalHarmonics:czm_sphericalHarmonics,czm_tangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,czm_transformPlane:czm_transformPlane,czm_translateRelativeToEye:czm_translateRelativeToEye,czm_translucentPhong:czm_translucentPhong,czm_transpose:czm_transpose,czm_unpackDepth:czm_unpackDepth,czm_unpackFloat:czm_unpackFloat,czm_vertexLogDepth:czm_vertexLogDepth,czm_windowToEyeCoordinates:czm_windowToEyeCoordinates,czm_writeDepthClamp:czm_writeDepthClamp,czm_writeLogDepth:czm_writeLogDepth,czm_writeNonPerspective:czm_writeNonPerspective},builtinName,uniformName,uniform;function removeComments(e){return(e=e.replace(/\/\/.*/g,"")).replace(/\/\*\*[\s\S]*?\*\//gm,(function(e){for(var t=e.match(/\n/gm).length,i="",r=0;r<t;++r)i+="\n";return i}))}function getDependencyNode(e,t,i){for(var r,n=0;n<i.length;++n)i[n].name===e&&(r=i[n]);return defined(r)||(r={name:e,glslSource:t=removeComments(t),dependsOn:[],requiredBy:[],evaluated:!1},i.push(r)),r}function generateDependencies(e,t){var i;e.evaluated||(e.evaluated=!0,defined(i=e.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g))&&null!==i&&(i=i.filter((function(e,t){return i.indexOf(e)===t}))).forEach((function(i){i!==e.name&&ShaderSource._czmBuiltinsAndUniforms.hasOwnProperty(i)&&(i=getDependencyNode(i,ShaderSource._czmBuiltinsAndUniforms[i],t),e.dependsOn.push(i),i.requiredBy.push(e),generateDependencies(i,t))})))}function sortDependencies(e){for(var t=[],i=[];0<e.length;){var r=e.pop();i.push(r),0===r.requiredBy.length&&t.push(r)}for(;0<t.length;){var n=t.shift();e.push(n);for(var a=0;a<n.dependsOn.length;++a){var o=n.dependsOn[a],s=o.requiredBy.indexOf(n);o.requiredBy.splice(s,1),0===o.requiredBy.length&&t.push(o)}}for(var l=0;l<i.length;++l)i[l].requiredBy.length}function getBuiltinsAndAutomaticUniforms(e){var t=[];generateDependencies(e=getDependencyNode("main",e,t),t),sortDependencies(t);for(var i="",r=t.length-1;0<=r;--r)i=i+t[r].glslSource+"\n";return i.replace(e.glslSource,"")}function combineShader(e,t,i){var r,n,a="",o=e.sources;if(defined(o))for(d=0,r=o.length;d<r;++d)a+="\n#line 0\n"+o[d];a=(a=removeComments(a)).replace(/#version\s+(.*?)\n/gm,(function(e,t){return n=t,"\n"}));var s=[];a=(a=a.replace(/#extension.*\n/gm,(function(e){return s.push(e),"\n"}))).replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");var l=e.pickColorQualifier;defined(l)&&(a=ShaderSource.createPickFragmentShaderSource(a,l));var c="";defined(n)&&(c="#version "+n+"\n");for(var u=s.length,d=0;d<u;d++)c+=s[d];t&&(c+="#ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n#else\n    precision mediump float;\n    #define highp mediump\n#endif\n\n");var h=e.defines;if(defined(h))for(d=0,r=h.length;d<r;++d){var p=h[d];0!==p.length&&(c+="#define "+p+"\n")}return i.webgl2&&(c+="#define OUTPUT_DECLARATION\n\n"),i.textureFloatLinear&&(c+="#define OES_texture_float_linear\n\n"),e.includeBuiltIns&&(c+=getBuiltinsAndAutomaticUniforms(a)),c+="\n#line 0\n",c+=a,i.webgl2&&(c=modernizeShader(c,t)),c}function ShaderSource(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).pickColorQualifier;this.defines=defined(e.defines)?e.defines.slice(0):[],this.sources=defined(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=defaultValue(e.includeBuiltIns,!0)}for(builtinName in ShaderSource.prototype.clone=function(){return new ShaderSource({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})},ShaderSource.replaceMain=function(e,t){return t="void "+t+"()",e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)},ShaderSource.prototype.createCombinedVertexShader=function(e){return combineShader(this,!1,e)},ShaderSource.prototype.createCombinedFragmentShader=function(e){return combineShader(this,!0,e)},ShaderSource._czmBuiltinsAndUniforms={},CzmBuiltins)CzmBuiltins.hasOwnProperty(builtinName)&&(ShaderSource._czmBuiltinsAndUniforms[builtinName]=CzmBuiltins[builtinName]);for(uniformName in AutomaticUniforms)AutomaticUniforms.hasOwnProperty(uniformName)&&(uniform=AutomaticUniforms[uniformName],"function"==typeof uniform.getDeclaration&&(ShaderSource._czmBuiltinsAndUniforms[uniformName]=uniform.getDeclaration(uniformName)));ShaderSource.createPickVertexShaderSource=function(e){return ShaderSource.replaceMain(e,"czm_old_main")+"\nattribute vec4 pickColor; \nvarying vec4 czm_pickColor; \nvoid main() \n{ \n    czm_old_main(); \n    czm_pickColor = pickColor; \n}"},ShaderSource.createPickFragmentShaderSource=function(e,t){return ShaderSource.replaceMain(e,"czm_old_main")+"\n"+t+" vec4 czm_pickColor; \nvoid main() \n{ \n    czm_old_main(); \n    if (gl_FragColor.a == 0.0) { \n       discard; \n    } \n    gl_FragColor = czm_pickColor; \n}"},ShaderSource.findVarying=function(e,t){for(var i=e.sources,r=t.length,n=0;n<r;++n)for(var a=t[n],o=i.length,s=0;s<o;++s)if(-1!==i[s].indexOf(a))return a};var normalVaryingNames=["v_normalEC","v_normal"];ShaderSource.findNormalVarying=function(e){return ShaderSource.findVarying(e,normalVaryingNames)};var positionVaryingNames=["v_positionEC"];ShaderSource.findPositionVarying=function(e){return ShaderSource.findVarying(e,positionVaryingNames)};var ShadowVolumeAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n#ifdef EXTRUDED_GEOMETRY\nattribute vec3 extrudeDirection;\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\nvoid main()\n{\nvec4 position = czm_computePosition();\n#ifdef EXTRUDED_GEOMETRY\nfloat delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\ndelta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\nposition = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nv_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\nv_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\nvec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\nvec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\nvec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\nbool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\nplanes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\nplanes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\nidlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\nidlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\nplanes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\nplanes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\nvec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\nvec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\nvec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\nvec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\nvec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // COLUMBUS_VIEW_2D\nvec3 eastWard = southEastCorner - southWestCorner;\nfloat eastExtent = length(eastWard);\neastWard /= eastExtent;\nvec3 northWard = northWestCorner - southWestCorner;\nfloat northExtent = length(northWard);\nnorthWard /= northExtent;\nv_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\nv_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\nv_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\nvec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\nvec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\nv_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\nv_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\nv_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif\ngl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);\n}\n",ShadowVolumeFS="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvoid main(void)\n{\n#ifdef VECTOR_TILE\ngl_FragColor = czm_gammaCorrect(u_highlightColor);\n#else\ngl_FragColor = vec4(1.0);\n#endif\nczm_writeDepthClamp();\n}\n",ClassificationType={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2,NUMBER_OF_CLASSIFICATION_TYPES:3},ClassificationType$1=Object.freeze(ClassificationType),DepthFunction={NEVER:WebGLConstants$1.NEVER,LESS:WebGLConstants$1.LESS,EQUAL:WebGLConstants$1.EQUAL,LESS_OR_EQUAL:WebGLConstants$1.LEQUAL,GREATER:WebGLConstants$1.GREATER,NOT_EQUAL:WebGLConstants$1.NOTEQUAL,GREATER_OR_EQUAL:WebGLConstants$1.GEQUAL,ALWAYS:WebGLConstants$1.ALWAYS},DepthFunction$1=Object.freeze(DepthFunction),BufferUsage={STREAM_DRAW:WebGLConstants$1.STREAM_DRAW,STATIC_DRAW:WebGLConstants$1.STATIC_DRAW,DYNAMIC_DRAW:WebGLConstants$1.DYNAMIC_DRAW,validate:function(e){return e===BufferUsage.STREAM_DRAW||e===BufferUsage.STATIC_DRAW||e===BufferUsage.DYNAMIC_DRAW}},BufferUsage$1=Object.freeze(BufferUsage);function Buffer$1(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context._gl,i=e.bufferTarget,r=e.typedArray,n=e.sizeInBytes,a=e.usage,o=defined(r);o&&(n=r.byteLength);var s=t.createBuffer();t.bindBuffer(i,s),t.bufferData(i,o?r:n,a),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=n,this._usage=a,this._buffer=s,this.vertexArrayDestroyable=!0}function addAttribute(e,t,i,r){var n=defined(t.vertexBuffer),a=defined(t.value),o=t.value?t.value.length:t.componentsPerAttribute;t={index:defaultValue(t.index,i),enabled:defaultValue(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:a?t.value.slice(0):void 0,componentsPerAttribute:o,componentDatatype:defaultValue(t.componentDatatype,ComponentDatatype$1.FLOAT),normalize:defaultValue(t.normalize,!1),offsetInBytes:defaultValue(t.offsetInBytes,0),strideInBytes:defaultValue(t.strideInBytes,0),instanceDivisor:defaultValue(t.instanceDivisor,0)};if(n)t.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),0<this.instanceDivisor&&(r.glVertexAttribDivisor(t,this.instanceDivisor),r._vertexAttribDivisors[t]=this.instanceDivisor,r._previousDrawInstanced=!0)},t.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),0<this.instanceDivisor&&r.glVertexAttribDivisor(i,0)};else{switch(t.componentsPerAttribute){case 1:t.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:t.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:t.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:t.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}t.disableVertexAttribArray=function(e){}}e.push(t)}function bind(e,t,i){for(var r=0;r<t.length;++r){var n=t[r];n.enabled&&n.vertexAttrib(e)}defined(i)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i._getBuffer())}function VertexArray(e){for(var t,i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,r=i._gl,n=e.attributes,a=(e=e.indexBuffer,[]),o=1,s=!1,l=!1,c=n.length,u=0;u<c;++u)addAttribute(a,n[u],u,i);for(c=a.length,u=0;u<c;++u){var d=a[u];if(defined(d.vertexBuffer)&&0===d.instanceDivisor){var h=d.strideInBytes||d.componentsPerAttribute*ComponentDatatype$1.getSizeInBytes(d.componentDatatype);o=d.vertexBuffer.sizeInBytes/h;break}}for(u=0;u<c;++u)0<a[u].instanceDivisor&&(s=!0),defined(a[u].value)&&(l=!0);i.vertexArrayObject&&(t=i.glCreateVertexArray(),i.glBindVertexArray(t),bind(r,a,e),i.glBindVertexArray(null)),this._numberOfVertices=o,this._hasInstancedAttributes=s,this._hasConstantAttributes=l,this._context=i,this._gl=r,this._vao=t,this._attributes=a,this._indexBuffer=e}function computeNumberOfVertices(e){return e.values.length/e.componentsPerAttribute}function computeAttributeSizeInBytes(e){return ComponentDatatype$1.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function interleaveAttributes(e){var t,i,r,n=[];for(t in e)e.hasOwnProperty(t)&&defined(e[t])&&defined(e[t].values)&&(n.push(t),e[t].componentDatatype===ComponentDatatype$1.DOUBLE&&(e[t].componentDatatype=ComponentDatatype$1.FLOAT,e[t].values=ComponentDatatype$1.createTypedArray(ComponentDatatype$1.FLOAT,e[t].values)));var a=n.length;if(0<a)for(r=computeNumberOfVertices(e[n[0]]),p=1;p<a;++p){var o=computeNumberOfVertices(e[n[p]]);if(o!==r)throw new RuntimeError("Each attribute list must have the same number of vertices.  Attribute "+n[p]+" has a different number of vertices ("+o.toString()+") than attribute "+n[0]+" ("+r.toString()+").")}n.sort((function(t,i){return ComponentDatatype$1.getSizeInBytes(e[i].componentDatatype)-ComponentDatatype$1.getSizeInBytes(e[t].componentDatatype)}));var s=0,l={};for(p=0;p<a;++p)t=n[p],i=e[t],l[t]=s,s+=computeAttributeSizeInBytes(i);if(0<s){var c=ComponentDatatype$1.getSizeInBytes(e[n[0]].componentDatatype),u=s%c;0!=u&&(s+=c-u);for(var d=new ArrayBuffer(r*s),h={},p=0;p<a;++p){t=n[p];var f=ComponentDatatype$1.getSizeInBytes(e[t].componentDatatype);h[t]={pointer:ComponentDatatype$1.createTypedArray(e[t].componentDatatype,d),index:l[t]/f,strideInComponentType:s/f}}for(p=0;p<r;++p)for(var m=0;m<a;++m){t=n[m];for(var g=(i=e[t]).values,y=h[t],_=y.pointer,v=i.componentsPerAttribute,C=0;C<v;++C)_[y.index+C]=g[p*v+C];y.index+=y.strideInComponentType}return{buffer:d,offsetsInBytes:l,vertexSizeInBytes:s}}}function setVertexAttribDivisor(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var r=t._vertexAttribDivisors,n=e._attributes,a=ContextLimits.maximumVertexAttributes;if(i)for(var o=n.length,s=0;s<o;++s){var l,c=n[s];!c.enabled||(l=c.instanceDivisor)!==r[c=c.index]&&(t.glVertexAttribDivisor(c,l),r[c]=l)}else for(s=0;s<a;++s)0<r[s]&&(t.glVertexAttribDivisor(s,0),r[s]=0)}}function setConstantAttributes(e,t){for(var i=e._attributes,r=i.length,n=0;n<r;++n){var a=i[n];a.enabled&&defined(a.value)&&a.vertexAttrib(t)}}function BatchTable(e,t,i){var r,n,a,o,s,l,c;this._attributes=t,this._numberOfInstances=i,0!==t.length&&(r=getDatatype(t),s=e.floatingPointTexture,o=getStride(a=createOffsets(t,n=r===PixelDatatype$1.FLOAT&&!s),t,n),c=Math.floor(ContextLimits.maximumTextureSize/o),t=.5*(s=1/(e=o*(l=Math.min(i,c)))),l=.5*(i=1/(c=Math.ceil(i/l))),this._textureDimensions=new Cartesian2(e,c),this._textureStep=new Cartesian4(s,t,i,l),this._pixelDatatype=n?PixelDatatype$1.UNSIGNED_BYTE:r,this._packFloats=n,this._offsets=a,this._stride=o,this._texture=void 0,c*=4*e,this._batchValues=new(r!==PixelDatatype$1.FLOAT||n?Uint8Array:Float32Array)(c),this._batchValuesDirty=!1)}function getDatatype(e){for(var t=!1,i=e.length,r=0;r<i;++r)if(e[r].componentDatatype!==ComponentDatatype$1.UNSIGNED_BYTE){t=!0;break}return t?PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE}function getAttributeType(e,t){return 2===(t=e[t].componentsPerAttribute)?Cartesian2:3===t?Cartesian3:4===t?Cartesian4:Number}function createOffsets(e,t){for(var i=new Array(e.length),r=0,n=e.length,a=0;a<n;++a){var o=e[a].componentDatatype;i[a]=r,o!==ComponentDatatype$1.UNSIGNED_BYTE&&t?r+=4:++r}return i}function getStride(e,t,i){var r=e.length;e=e[r-1];return t[r-1].componentDatatype!==ComponentDatatype$1.UNSIGNED_BYTE&&i?e+4:e+1}Buffer$1.createVertexBuffer=function(e){return new Buffer$1({context:e.context,bufferTarget:WebGLConstants$1.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},Buffer$1.createIndexBuffer=function(e){var t=e.context,i=e.indexDatatype,r=IndexDatatype$1.getSizeInBytes(i),n=(e=new Buffer$1({context:t,bufferTarget:WebGLConstants$1.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})).sizeInBytes/r;return Object.defineProperties(e,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return r}},numberOfIndices:{get:function(){return n}}}),e},Object.defineProperties(Buffer$1.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),Buffer$1.prototype._getBuffer=function(){return this._buffer},Buffer$1.prototype.copyFromArrayView=function(e,t){t=defaultValue(t,0);var i=this._gl,r=this._bufferTarget;i.bindBuffer(r,this._buffer),i.bufferSubData(r,t,e),i.bindBuffer(r,null)},Buffer$1.prototype.copyFromBuffer=function(e,t,i,r){var n=WebGLConstants$1.COPY_READ_BUFFER,a=WebGLConstants$1.COPY_WRITE_BUFFER,o=this._gl;o.bindBuffer(a,this._buffer),o.bindBuffer(n,e._buffer),o.copyBufferSubData(n,a,t,i,r),o.bindBuffer(a,null),o.bindBuffer(n,null)},Buffer$1.prototype.getBufferData=function(e,t,i,r){t=defaultValue(t,0),i=defaultValue(i,0);var n=this._gl,a=WebGLConstants$1.COPY_READ_BUFFER;n.bindBuffer(a,this._buffer),n.getBufferSubData(a,t,e,i,r),n.bindBuffer(a,null)},Buffer$1.prototype.isDestroyed=function(){return!1},Buffer$1.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),destroyObject(this)},VertexArray.fromGeometry=function(e){var t,i,r,n,a,o=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context,s=defaultValue(e.geometry,defaultValue.EMPTY_OBJECT),l=defaultValue(e.bufferUsage,BufferUsage$1.DYNAMIC_DRAW),c=defaultValue(e.attributeLocations,defaultValue.EMPTY_OBJECT),u=defaultValue(e.interleave,!1),d=defined(e=e.vertexArrayAttributes)?e:[],h=s.attributes;if(u){var p=interleaveAttributes(h);if(defined(p)){r=Buffer$1.createVertexBuffer({context:o,typedArray:p.buffer,usage:l});var f=p.offsetsInBytes,m=p.vertexSizeInBytes;for(t in h)h.hasOwnProperty(t)&&defined(h[t])&&(defined((i=h[t]).values)?d.push({index:c[t],vertexBuffer:r,componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,offsetInBytes:f[t],strideInBytes:m}):d.push({index:c[t],value:i.value,componentDatatype:i.componentDatatype,normalize:i.normalize}))}}else for(t in h)h.hasOwnProperty(t)&&defined(h[t])&&((n=(i=h[t]).componentDatatype)===ComponentDatatype$1.DOUBLE&&(n=ComponentDatatype$1.FLOAT),r=void 0,defined(i.values)&&(r=Buffer$1.createVertexBuffer({context:o,typedArray:ComponentDatatype$1.createTypedArray(n,i.values),usage:l})),d.push({index:c[t],vertexBuffer:r,value:i.value,componentDatatype:n,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize}));return defined(p=s.indices)&&(a=Geometry.computeNumberOfVertices(s)>=CesiumMath.SIXTY_FOUR_KILOBYTES&&o.elementIndexUint?Buffer$1.createIndexBuffer({context:o,typedArray:new Uint32Array(p),usage:l,indexDatatype:IndexDatatype$1.UNSIGNED_INT}):Buffer$1.createIndexBuffer({context:o,typedArray:new Uint16Array(p),usage:l,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT})),new VertexArray({context:o,attributes:d,indexBuffer:a})},Object.defineProperties(VertexArray.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),VertexArray.prototype.getAttribute=function(e){return this._attributes[e]},VertexArray.prototype._bind=function(){defined(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&setVertexAttribDivisor(this),this._hasConstantAttributes&&setConstantAttributes(this,this._gl)):bind(this._gl,this._attributes,this._indexBuffer)},VertexArray.prototype._unBind=function(){if(defined(this._vao))this._context.glBindVertexArray(null);else{for(var e=this._attributes,t=this._gl,i=0;i<e.length;++i){var r=e[i];r.enabled&&r.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}},VertexArray.prototype.isDestroyed=function(){return!1},VertexArray.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;defined(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var r=this._indexBuffer;return defined(r)&&!r.isDestroyed()&&r.vertexArrayDestroyable&&r.destroy(),defined(this._vao)&&this._context.glDeleteVertexArray(this._vao),destroyObject(this)},Object.defineProperties(BatchTable.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});var scratchPackedFloatCartesian4=new Cartesian4;function getPackedFloat(e,t,i){var r=Cartesian4.unpack(e,t,scratchPackedFloatCartesian4),n=Cartesian4.unpackFloat(r),a=(r=Cartesian4.unpack(e,t+4,scratchPackedFloatCartesian4),Cartesian4.unpackFloat(r));r=Cartesian4.unpack(e,t+8,scratchPackedFloatCartesian4);var o=Cartesian4.unpackFloat(r);return r=Cartesian4.unpack(e,t+12,scratchPackedFloatCartesian4),r=Cartesian4.unpackFloat(r),Cartesian4.fromElements(n,a,o,r,i)}function setPackedAttribute(e,t,i){var r=Cartesian4.packFloat(e.x,scratchPackedFloatCartesian4);Cartesian4.pack(r,t,i),r=Cartesian4.packFloat(e.y,r),Cartesian4.pack(r,t,i+4),r=Cartesian4.packFloat(e.z,r),Cartesian4.pack(r,t,i+8),r=Cartesian4.packFloat(e.w,r),Cartesian4.pack(r,t,i+12)}var scratchGetAttributeCartesian4=new Cartesian4;BatchTable.prototype.getBatchedAttribute=function(e,t,i){var r=this._attributes,n=this._offsets[t];n=4*this._stride*e+4*n,n=this._packFloats&&r[t].componentDatatype!==PixelDatatype$1.UNSIGNED_BYTE?getPackedFloat(this._batchValues,n,scratchGetAttributeCartesian4):Cartesian4.unpack(this._batchValues,n,scratchGetAttributeCartesian4);return defined((t=getAttributeType(r,t)).fromCartesian4)?t.fromCartesian4(n,i):defined(t.clone)?t.clone(n,i):n.x};var setAttributeScratchValues=[void 0,void 0,new Cartesian2,new Cartesian3,new Cartesian4],setAttributeScratchCartesian4=new Cartesian4;function createTexture(e,t){var i=e._textureDimensions;e._texture=new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:e._pixelDatatype,width:i.x,height:i.y,sampler:Sampler.NEAREST,flipY:!1})}function updateTexture(e){var t=e._textureDimensions;e._texture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function getGlslComputeSt(e){var t=e._stride;return 1===e._textureDimensions.y?"uniform vec4 batchTextureStep; \nvec2 computeSt(float batchId) \n{ \n    float stepX = batchTextureStep.x; \n    float centerX = batchTextureStep.y; \n    float numberOfAttributes = float("+t+"); \n    return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n":"uniform vec4 batchTextureStep; \nuniform vec2 batchTextureDimensions; \nvec2 computeSt(float batchId) \n{ \n    float stepX = batchTextureStep.x; \n    float centerX = batchTextureStep.y; \n    float stepY = batchTextureStep.z; \n    float centerY = batchTextureStep.w; \n    float numberOfAttributes = float("+t+"); \n    float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x); \n    float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x); \n    return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function getComponentType(e){return 1===e?"float":"vec"+e}function getComponentSwizzle(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}function getGlslAttributeFunction(e,t){var i=e._attributes[t],r=i.componentsPerAttribute,n=i.functionName,a=getComponentType(r);r=getComponentSwizzle(r),t=a+" "+n+"(float batchId) \n{ \n    vec2 st = computeSt(batchId); \n    st.x += batchTextureStep.x * float("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==PixelDatatype$1.UNSIGNED_BYTE?t+="vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture2D(batchTexture, st)); \ntextureValue.y = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0))); \n":t+="    vec4 textureValue = texture2D(batchTexture, st); \n",t+="    "+a+" value = textureValue"+r+"; \n",e._pixelDatatype!==PixelDatatype$1.UNSIGNED_BYTE||i.componentDatatype!==ComponentDatatype$1.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===PixelDatatype$1.FLOAT&&i.componentDatatype===ComponentDatatype$1.UNSIGNED_BYTE&&i.normalize&&(t+="value /= 255.0; \n"):t+="value *= 255.0; \n",t+"    return value; \n} \n"}function transformToWorldCoordinates(e,t,i){var r=!i,n=e.length;if(!r&&1<n)for(var a=e[0].modelMatrix,o=1;o<n;++o)if(!Matrix4.equals(a,e[o].modelMatrix)){r=!0;break}if(r)for(o=0;o<n;++o)defined(e[o].geometry)&&GeometryPipeline.transformToWorldCoordinates(e[o]);else Matrix4.multiplyTransformation(t,e[0].modelMatrix,t)}function addGeometryBatchId(e,t){var i=e.attributes,r=(e=i.position).values.length/e.componentsPerAttribute;i.batchId=new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});for(var n=i.batchId.values,a=0;a<r;++a)n[a]=t}function addBatchIds(e){for(var t=e.length,i=0;i<t;++i){var r=e[i];defined(r.geometry)?addGeometryBatchId(r.geometry,i):defined(r.westHemisphereGeometry)&&defined(r.eastHemisphereGeometry)&&(addGeometryBatchId(r.westHemisphereGeometry,i),addGeometryBatchId(r.eastHemisphereGeometry,i))}}function geometryPipeline(e){var t,i=e.instances,r=e.projection,n=e.elementIndexUintSupported,a=e.scene3DOnly,o=e.vertexCacheOptimize,s=e.compressVertices,l=(e=e.modelMatrix,i.length);for(g=0;g<l;++g)if(defined(i[g].geometry)){i[g].geometry.primitiveType;break}if(transformToWorldCoordinates(i,e,a),!a)for(g=0;g<l;++g)defined(i[g].geometry)&&GeometryPipeline.splitLongitude(i[g]);if(addBatchIds(i),o)for(g=0;g<l;++g){var c=i[g];defined(c.geometry)?(GeometryPipeline.reorderForPostVertexCache(c.geometry),GeometryPipeline.reorderForPreVertexCache(c.geometry)):defined(c.westHemisphereGeometry)&&defined(c.eastHemisphereGeometry)&&(GeometryPipeline.reorderForPostVertexCache(c.westHemisphereGeometry),GeometryPipeline.reorderForPreVertexCache(c.westHemisphereGeometry),GeometryPipeline.reorderForPostVertexCache(c.eastHemisphereGeometry),GeometryPipeline.reorderForPreVertexCache(c.eastHemisphereGeometry))}var u=GeometryPipeline.combineInstances(i);for(l=u.length,g=0;g<l;++g){var d,h,p,f=(t=u[g]).attributes;if(a)for(d in f)f.hasOwnProperty(d)&&f[d].componentDatatype===ComponentDatatype$1.DOUBLE&&GeometryPipeline.encodeAttribute(t,d,d+"3DHigh",d+"3DLow");else for(d in f)f.hasOwnProperty(d)&&f[d].componentDatatype===ComponentDatatype$1.DOUBLE&&(h=d+"3D",p=d+"2D",GeometryPipeline.projectTo2D(t,d,h,p,r),defined(t.boundingSphere)&&"position"===d&&(t.boundingSphereCV=BoundingSphere.fromVertices(t.attributes.position2D.values)),GeometryPipeline.encodeAttribute(t,h,h+"High",h+"Low"),GeometryPipeline.encodeAttribute(t,p,p+"High",p+"Low"));s&&GeometryPipeline.compressVertices(t)}if(!n){for(var m=[],g=(l=u.length,0);g<l;++g)t=u[g],m=m.concat(GeometryPipeline.fitToUnsignedShortIndices(t));u=m}return u}function createPickOffsets(e,t,i,r){var n,a,o,s=r.length-1;o=0<=s?(n=(s=r[s]).offset+s.count,i[a=s.index].indices.length):i[a=n=0].indices.length;for(var l=e.length,c=0;c<l;++c){var u=e[c][t];defined(u)&&(o<n+(u=u.indices.length)&&(n=0,o=i[++a].indices.length),r.push({index:a,offset:n,count:u}),n+=u)}}function createInstancePickOffsets(e,t){var i=[];return createPickOffsets(e,"geometry",t,i),createPickOffsets(e,"westHemisphereGeometry",t,i),createPickOffsets(e,"eastHemisphereGeometry",t,i),i}BatchTable.prototype.setBatchedAttribute=function(e,t,i){var r=this._attributes,n=setAttributeScratchValues[r[t].componentsPerAttribute],a=this.getBatchedAttribute(e,t,n);(defined((n=getAttributeType(this._attributes,t)).equals)?n.equals(a,i):a===i)||((a=setAttributeScratchCartesian4).x=defined(i.x)?i.x:i,a.y=defined(i.y)?i.y:0,a.z=defined(i.z)?i.z:0,a.w=defined(i.w)?i.w:0,i=this._offsets[t],i=4*this._stride*e+4*i,this._packFloats&&r[t].componentDatatype!==PixelDatatype$1.UNSIGNED_BYTE?setPackedAttribute(a,this._batchValues,i):Cartesian4.pack(a,this._batchValues,i),this._batchValuesDirty=!0)},BatchTable.prototype.update=function(e){defined(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,defined(this._texture)||createTexture(this,e.context),updateTexture(this))},BatchTable.prototype.getUniformMapCallback=function(){var e=this;return function(t){return 0===e._attributes.length?t:combine(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}},BatchTable.prototype.getVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t="uniform highp sampler2D batchTexture; \n";t+=getGlslComputeSt(this)+"\n";for(var i=e.length,r=0;r<i;++r)t+=getGlslAttributeFunction(this,r);return function(e){var i=e.indexOf("void main"),r=e.substring(0,i);i=e.substring(i);return r+"\n"+t+"\n"+i}},BatchTable.prototype.isDestroyed=function(){return!1},BatchTable.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),destroyObject(this)};var PrimitivePipeline={};function transferGeometry(e,t){var i,r,n=e.attributes;for(i in n)!n.hasOwnProperty(i)||defined(r=n[i])&&defined(r.values)&&t.push(r.values.buffer);defined(e.indices)&&t.push(e.indices.buffer)}function transferGeometries(e,t){for(var i=e.length,r=0;r<i;++r)transferGeometry(e[r],t)}function countCreateGeometryResults(e){for(var t=1,i=e.length,r=0;r<i;r++){var n=e[r];if(++t,defined(n)){var a,o=n.attributes;for(a in t+=7+2*BoundingSphere.packedLength+(defined(n.indices)?n.indices.length:0),o)o.hasOwnProperty(a)&&defined(o[a])&&(t+=5+o[a].values.length)}}return t}function packInstancesForCombine(e,t){var i=e.length,r=new Float64Array(1+19*i),n=0;r[n++]=i;for(var a=0;a<i;a++){var o=e[a];Matrix4.pack(o.modelMatrix,r,n),n+=Matrix4.packedLength,defined(o.attributes)&&defined(o.attributes.offset)&&(o=o.attributes.offset.value,r[n]=o[0],r[n+1]=o[1],r[n+2]=o[2]),n+=3}return t.push(r.buffer),r}function unpackInstancesForCombine(e){for(var t=e,i=new Array(t[0]),r=0,n=1;n<t.length;){var a,o=Matrix4.unpack(t,n);defined(t[n+=Matrix4.packedLength])&&(a={offset:new OffsetGeometryInstanceAttribute(t[n],t[n+1],t[n+2])}),n+=3,i[r++]={modelMatrix:o,attributes:a}}return i}function packBoundingSpheres(e){var t=e.length,i=1+(BoundingSphere.packedLength+1)*t,r=new Float32Array(i),n=0;r[n++]=t;for(var a=0;a<t;++a)defined(e[a])?(r[n++]=1,BoundingSphere.pack(e[a],r,n)):r[n++]=0,n+=BoundingSphere.packedLength;return r}function unpackBoundingSpheres(e){for(var t=new Array(e[0]),i=0,r=1;r<e.length;)1===e[r++]&&(t[i]=BoundingSphere.unpack(e,r)),++i,r+=BoundingSphere.packedLength;return t}PrimitivePipeline.combineGeometry=function(e){var t,i,r,n,a=e.instances,o=a.length,s=!1;0<o&&(0<(t=geometryPipeline(e)).length&&(i=GeometryPipeline.createAttributeLocations(t[0]),e.createPickOffsets&&(r=createInstancePickOffsets(a,t))),defined(a[0].attributes)&&defined(a[0].attributes.offset)&&(n=new Array(o),s=!0));for(var l=new Array(o),c=new Array(o),u=0;u<o;++u){var d=a[u],h=d.geometry;defined(h)&&(l[u]=h.boundingSphere,c[u]=h.boundingSphereCV,s&&(n[u]=d.geometry.offsetAttribute)),h=d.eastHemisphereGeometry,d=d.westHemisphereGeometry,defined(h)&&defined(d)&&(defined(h.boundingSphere)&&defined(d.boundingSphere)&&(l[u]=BoundingSphere.union(h.boundingSphere,d.boundingSphere)),defined(h.boundingSphereCV)&&defined(d.boundingSphereCV)&&(c[u]=BoundingSphere.union(h.boundingSphereCV,d.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:i,pickOffsets:r,offsetInstanceExtend:n,boundingSpheres:l,boundingSpheresCV:c}},PrimitivePipeline.packCreateGeometryResults=function(e,t){var i=new Float64Array(countCreateGeometryResults(e)),r=[],n={},a=e.length,o=0;i[o++]=a;for(var s=0;s<a;s++){var l=e[s],c=defined(l);if(i[o++]=c?1:0,c){i[o++]=l.primitiveType,i[o++]=l.geometryType,i[o++]=defaultValue(l.offsetAttribute,-1),c=defined(l.boundingSphere)?1:0,(i[o++]=c)&&BoundingSphere.pack(l.boundingSphere,i,o),o+=BoundingSphere.packedLength,c=defined(l.boundingSphereCV)?1:0,(i[o++]=c)&&BoundingSphere.pack(l.boundingSphereCV,i,o),o+=BoundingSphere.packedLength;var u,d=l.attributes,h=[];for(u in d)d.hasOwnProperty(u)&&defined(d[u])&&(h.push(u),defined(n[u])||(n[u]=r.length,r.push(u)));i[o++]=h.length;for(var p=0;p<h.length;p++){var f=h[p],m=d[f];i[o++]=n[f],i[o++]=m.componentDatatype,i[o++]=m.componentsPerAttribute,i[o++]=m.normalize?1:0,i[o++]=m.values.length,i.set(m.values,o),o+=m.values.length}c=defined(l.indices)?l.indices.length:0,0<(i[o++]=c)&&(i.set(l.indices,o),o+=c)}}return t.push(i.buffer),{stringTable:r,packedData:i}},PrimitivePipeline.unpackCreateGeometryResults=function(e){for(var t=e.stringTable,i=e.packedData,r=new Array(i[0]),n=0,a=1;a<i.length;)if(1===i[a++]){var o,s,l=i[a++],c=i[a++],u=i[a++];-1===u&&(u=void 0),1===i[a++]&&(o=BoundingSphere.unpack(i,a)),a+=BoundingSphere.packedLength,1===i[a++]&&(s=BoundingSphere.unpack(i,a)),a+=BoundingSphere.packedLength;var d=new GeometryAttributes,h=i[a++];for(b=0;b<h;b++){for(var p=t[i[a++]],f=i[a++],m=i[a++],g=0!==i[a++],y=i[a++],_=ComponentDatatype$1.createTypedArray(f,y),v=0;v<y;v++)_[v]=i[a++];d[p]=new GeometryAttribute({componentDatatype:f,componentsPerAttribute:m,normalize:g,values:_})}if(0<(y=i[a++]))for(var C=_.length/m,x=IndexDatatype$1.createTypedArray(C,y),b=0;b<y;b++)x[b]=i[a++];r[n++]=new Geometry({primitiveType:l,geometryType:c,boundingSphere:o,boundingSphereCV:s,indices:x,attributes:d,offsetAttribute:u})}else r[n++]=void 0;return r},PrimitivePipeline.packCombineGeometryParameters=function(e,t){for(var i=e.createGeometryResults,r=i.length,n=0;n<r;n++)t.push(i[n].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:packInstancesForCombine(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof GeographicProjection,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},PrimitivePipeline.unpackCombineGeometryParameters=function(e){for(var t=unpackInstancesForCombine(e.packedInstances),i=e.createGeometryResults,r=i.length,n=0,a=0;a<r;a++)for(var o=PrimitivePipeline.unpackCreateGeometryResults(i[a]),s=o.length,l=0;l<s;l++){var c=o[l];t[n].geometry=c,++n}var u=Ellipsoid.clone(e.ellipsoid);return{instances:t,ellipsoid:u,projection:new(e.isGeographic?GeographicProjection:WebMercatorProjection)(u),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:Matrix4.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},PrimitivePipeline.packCombineGeometryResults=function(e,t){defined(e.geometries)&&transferGeometries(e.geometries,t);var i=packBoundingSpheres(e.boundingSpheres),r=packBoundingSpheres(e.boundingSpheresCV);return t.push(i.buffer,r.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:i,boundingSpheresCV:r}},PrimitivePipeline.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:unpackBoundingSpheres(e.boundingSpheres),boundingSpheresCV:unpackBoundingSpheres(e.boundingSpheresCV)}};var PrimitiveState={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6},PrimitiveState$1=Object.freeze(PrimitiveState),SceneMode={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===SceneMode.SCENE3D?1:e!==SceneMode.MORPHING?0:void 0}},SceneMode$1=Object.freeze(SceneMode),ShadowMode={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===ShadowMode.ENABLED||e===ShadowMode.CAST_ONLY},receiveShadows:function(e){return e===ShadowMode.ENABLED||e===ShadowMode.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?ShadowMode.ENABLED:e?ShadowMode.CAST_ONLY:t?ShadowMode.RECEIVE_ONLY:ShadowMode.DISABLED}},ShadowMode$1=Object.freeze(ShadowMode);function Primitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=new Matrix4,this.show=defaultValue(e.show,!0),this._vertexCacheOptimize=defaultValue(e.vertexCacheOptimize,!1),this._interleave=defaultValue(e.interleave,!1),this._releaseGeometryInstances=defaultValue(e.releaseGeometryInstances,!0),this._allowPicking=defaultValue(e.allowPicking,!0),this._asynchronous=defaultValue(e.asynchronous,!0),this._compressVertices=defaultValue(e.compressVertices,!0),this.cull=defaultValue(e.cull,!0),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,this.shadows=defaultValue(e.shadows,ShadowMode$1.DISABLED),this._translucent=void 0,this._state=PrimitiveState$1.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=[],this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._readyPromise=when.defer(),this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0}function getCommonPerInstanceAttributeNames(e){var t,i=e.length,r=[],n=e[0].attributes;for(t in n)if(n.hasOwnProperty(t)&&defined(n[t])){for(var a=n[t],o=!0,s=1;s<i;++s){var l=e[s].attributes[t];if(!defined(l)||a.componentDatatype!==l.componentDatatype||a.componentsPerAttribute!==l.componentsPerAttribute||a.normalize!==l.normalize){o=!1;break}}o&&r.push(t)}return r}Object.defineProperties(Primitive.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}});var scratchGetAttributeCartesian2=new Cartesian2,scratchGetAttributeCartesian3=new Cartesian3,scratchGetAttributeCartesian4$1=new Cartesian4;function getAttributeValue(e){var t=e.length;return 1===t?e[0]:2===t?Cartesian2.unpack(e,0,scratchGetAttributeCartesian2):3===t?Cartesian3.unpack(e,0,scratchGetAttributeCartesian3):4===t?Cartesian4.unpack(e,0,scratchGetAttributeCartesian4$1):void 0}function createBatchTable(e,t){var i=e.geometryInstances,r=Array.isArray(i)?i:[i],n=r.length;if(0!==n){for(var a,o,s,l=getCommonPerInstanceAttributeNames(r),c=l.length,u=[],d={},h=(i={},r[0].attributes),p=0;p<c;++p)s=h[o=l[p]],d[o]=p,u.push({functionName:"czm_batchTable_"+o,componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize});-1!==l.indexOf("distanceDisplayCondition")&&(u.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:1}),i.center3DHigh=u.length-5,i.center3DLow=u.length-4,i.center2DHigh=u.length-3,i.center2DLow=u.length-2,i.radius=u.length-1),-1!==l.indexOf("offset")&&(u.push({functionName:"czm_batchTable_offset2D",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3}),a=u.length-1),u.push({functionName:"czm_batchTable_pickColor",componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});var f=u.length,m=new BatchTable(t,u,n);for(p=0;p<n;++p){for(var g=r[p],y=(h=g.attributes,0);y<c;++y){var _=getAttributeValue((s=h[o=l[y]]).value),v=d[o];m.setBatchedAttribute(p,v,_)}var C={primitive:defaultValue(g.pickPrimitive,e)};defined(g.id)&&(C.id=g.id),g=t.createPickId(C),e._pickIds.push(g),C=g.color,(g=scratchGetAttributeCartesian4$1).x=Color.floatToByte(C.red),g.y=Color.floatToByte(C.green),g.z=Color.floatToByte(C.blue),g.w=Color.floatToByte(C.alpha),m.setBatchedAttribute(p,f-1,g)}e._batchTable=m,e._batchTableAttributeIndices=d,e._batchTableBoundingSphereAttributeIndices=i,e._batchTableOffsetAttribute2DIndex=a}}function cloneAttribute(e){var t=Array.isArray(e.values)?e.values.slice(0):new e.values.constructor(e.values);return new GeometryAttribute({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function cloneGeometry(e){var t,i,r=e.attributes,n=new GeometryAttributes;for(t in r)r.hasOwnProperty(t)&&defined(r[t])&&(n[t]=cloneAttribute(r[t]));return defined(e.indices)&&(i=e.indices,i=Array.isArray(i)?i.slice(0):new i.constructor(i)),new Geometry({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:BoundingSphere.clone(e.boundingSphere)})}function cloneInstance(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:Matrix4.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var positionRegex=/attribute\s+vec(?:3|4)\s+(.*)3DHigh;/g;function appendPickToVertexShader(e){return ShaderSource.replaceMain(e,"czm_non_pick_main")+"\nvarying vec4 v_pickColor; \nvoid main() \n{ \n    czm_non_pick_main(); \n    v_pickColor = czm_batchTable_pickColor(batchId); \n}"}function appendPickToFragmentShader(e){return"varying vec4 v_pickColor;\n"+e}function modifyForEncodedNormals(e,t){if(!e.compressVertices)return t;var i=-1!==t.search(/attribute\s+vec3\s+normal;/g),r=-1!==t.search(/attribute\s+vec2\s+st;/g);if(!i&&!r)return t;var n=-1!==t.search(/attribute\s+vec3\s+tangent;/g),a=-1!==t.search(/attribute\s+vec3\s+bitangent;/g),o=r&&i?2:1,s="compressedAttributes",l="attribute "+(1<(o+=n||a?1:0)?"vec"+o:"float")+" "+s+";",c="";e="";return r&&(c+="vec2 st;\n",e+="    st = czm_decompressTextureCoordinates("+(1<o?s+".x":s)+");\n"),i&&n&&a?(c+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",e+="    czm_octDecode("+s+"."+(r?"yz":"xy")+", normal, tangent, bitangent);\n"):(i&&(c+="vec3 normal;\n",e+="    normal = czm_octDecode("+s+(1<o?"."+(r?"y":"x"):"")+");\n"),n&&(c+="vec3 tangent;\n",e+="    tangent = czm_octDecode("+s+"."+(r&&i?"z":"y")+");\n"),a&&(c+="vec3 bitangent;\n",e+="    bitangent = czm_octDecode("+s+"."+(r&&i?"z":"y")+");\n")),t=(t=(t=(t=t.replace(/attribute\s+vec3\s+normal;/g,"")).replace(/attribute\s+vec2\s+st;/g,"")).replace(/attribute\s+vec3\s+tangent;/g,"")).replace(/attribute\s+vec3\s+bitangent;/g,""),[l,c,t=ShaderSource.replaceMain(t,"czm_non_compressed_main"),"void main() \n{ \n"+e+"    czm_non_compressed_main(); \n}"].join("\n")}function depthClampVS(e){return(e=ShaderSource.replaceMain(e,"czm_non_depth_clamp_main"))+"void main() {\n    czm_non_depth_clamp_main();\n    gl_Position = czm_depthClamp(gl_Position);}\n"}function depthClampFS(e){return"#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n"+(e=ShaderSource.replaceMain(e,"czm_non_depth_clamp_main"))+"void main() {\n    czm_non_depth_clamp_main();\n#if defined(GL_EXT_frag_depth)\n    #if defined(LOG_DEPTH)\n        czm_writeLogDepth();\n    #else\n        czm_writeDepthClamp();\n    #endif\n#endif\n}\n"}function validateShaderMatching(e,t){e.vertexAttributes}function getUniformFunction(e,t){return function(){return e[t]}}Primitive._modifyShaderPosition=function(e,t,i){for(var r="",n="",a="";null!==(s=positionRegex.exec(t));){var o=s[1],s="vec4 czm_compute"+o[0].toUpperCase()+o.substr(1)+"()";"vec4 czm_computePosition()"!=s&&(r+=s+";\n"),defined(e.rtcCenter)?(r+="uniform mat4 u_modifiedModelView;\n",n+="attribute vec4 position;\n",a+=s+"\n{\n    return u_modifiedModelView * position;\n}\n\n",t=(t=(t=(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?a+=s+"\n{\n    return czm_translateRelativeToEye("+o+"3DHigh, "+o+"3DLow);\n}\n\n":(n+="attribute vec3 "+o+"2DHigh;\nattribute vec3 "+o+"2DLow;\n",a+=s+"\n{\n    vec4 p;\n    if (czm_morphTime == 1.0)\n    {\n        p = czm_translateRelativeToEye("+o+"3DHigh, "+o+"3DLow);\n    }\n    else if (czm_morphTime == 0.0)\n    {\n        p = czm_translateRelativeToEye("+o+"2DHigh.zxy, "+o+"2DLow.zxy);\n    }\n    else\n    {\n        p = czm_columbusViewMorph(\n                czm_translateRelativeToEye("+o+"2DHigh.zxy, "+o+"2DLow.zxy),\n                czm_translateRelativeToEye("+o+"3DHigh, "+o+"3DLow),\n                czm_morphTime);\n    }\n    return p;\n}\n\n")}return[r,n,t,a].join("\n")},Primitive._appendShowToShader=function(e,t){return defined(e._batchTableAttributeIndices.show)?ShaderSource.replaceMain(t,"czm_non_show_main")+"\nvoid main() \n{ \n    czm_non_show_main(); \n    gl_Position *= czm_batchTable_show(batchId); \n}":t},Primitive._updateColorAttribute=function(e,t,i){return defined(e._batchTableAttributeIndices.color)||defined(e._batchTableAttributeIndices.depthFailColor)?-1===t.search(/attribute\s+vec4\s+color;/g)?t:(t=(t=t).replace(/attribute\s+vec4\s+color;/g,""),i?t.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):t.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2")):t},Primitive._updatePickColorAttribute=function(e){return e.replace(/attribute\s+vec4\s+pickColor;/g,"").replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2")},Primitive._appendOffsetToShader=function(e,t){return defined(e._batchTableAttributeIndices.offset)?(e="attribute float batchId;\n",e+="attribute float applyOffset;",e=t.replace(/attribute\s+float\s+batchId;/g,"attribute float batchId;\nattribute float applyOffset;"),t="vec4 $1 = czm_computePosition();\n",t+="    if (czm_sceneMode == czm_sceneMode3D)\n",t+="    {\n",t+="        $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",t+="    }\n",t+="    else\n",t+="    {\n",t+="        $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",t+="    }\n",e.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n    if (czm_sceneMode == czm_sceneMode3D)\n    {\n        $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);    }\n    else\n    {\n        $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);    }\n")):t},Primitive._appendDistanceDisplayConditionToShader=function(e,t,i){return defined(e._batchTableAttributeIndices.distanceDisplayCondition)?(e="void main() \n{ \n    czm_non_distanceDisplayCondition_main(); \n    vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n    vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n    vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n    float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n",e+=i?"    vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":"    vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n    vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n    vec4 centerRTE;\n    if (czm_morphTime == 1.0)\n    {\n        centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n    }\n    else if (czm_morphTime == 0.0)\n    {\n        centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n    }\n    else\n    {\n        centerRTE = czm_columbusViewMorph(\n                czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n                czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n                czm_morphTime);\n    }\n",ShaderSource.replaceMain(t,"czm_non_distanceDisplayCondition_main")+"\n"+e+"    float radiusSq = boundingSphereRadius * boundingSphereRadius; \n    float distanceSq; \n    if (czm_sceneMode == czm_sceneMode2D) \n    { \n        distanceSq = czm_eyeHeight2D.y - radiusSq; \n    } \n    else \n    { \n        distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n    } \n    distanceSq = max(distanceSq, 0.0); \n    float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n    float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n    float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n    gl_Position *= show; \n}"):t};var numberOfCreationWorkers=Math.max(FeatureDetection.hardwareConcurrency-1,1),createGeometryTaskProcessors,combineGeometryTaskProcessor=new TaskProcessor("combineGeometry",Number.POSITIVE_INFINITY);function loadAsynchronous(e,t){var i,r,n,a,o,s=e._instanceIds;if(e._state===PrimitiveState$1.READY){r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];for(var l,c=e._numberOfInstances=r.length,u=[],d=[],h=0;h<c;++h)i=r[h].geometry,s.push(r[h].id),d.push({moduleName:i._workerName,geometry:i});if(!defined(createGeometryTaskProcessors))for(createGeometryTaskProcessors=new Array(numberOfCreationWorkers),h=0;h<numberOfCreationWorkers;h++)createGeometryTaskProcessors[h]=new TaskProcessor("createGeometry",Number.POSITIVE_INFINITY);for(d=subdivideArray(d,numberOfCreationWorkers),h=0;h<d.length;h++){var p=0,f=d[h],m=f.length;for(_=0;_<m;++_)defined((i=(l=f[_]).geometry).constructor.pack)&&(l.offset=p,p+=defaultValue(i.constructor.packedLength,i.packedLength));if(0<p)for(var g=new Float64Array(p),y=[g.buffer],_=0;_<m;++_)defined((i=(l=f[_]).geometry).constructor.pack)&&(i.constructor.pack(i,g,l.offset),l.geometry=g);u.push(createGeometryTaskProcessors[h].scheduleTask({subTasks:d[h]},y))}e._state=PrimitiveState$1.CREATING,when.all(u,(function(t){e._createGeometryResults=t,e._state=PrimitiveState$1.CREATED})).otherwise((function(i){setReady(e,t,PrimitiveState$1.FAILED,i)}))}else e._state===PrimitiveState$1.CREATED&&(o=[],r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],n=t.scene3DOnly,a=t.mapProjection,o=combineGeometryTaskProcessor.scheduleTask(PrimitivePipeline.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:r,ellipsoid:a.ellipsoid,projection:a,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:n,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},o),o),e._createGeometryResults=void 0,e._state=PrimitiveState$1.COMBINING,when(o,(function(i){i=PrimitivePipeline.unpackCombineGeometryResults(i),e._geometries=i.geometries,e._attributeLocations=i.attributeLocations,e.modelMatrix=Matrix4.clone(i.modelMatrix,e.modelMatrix),e._pickOffsets=i.pickOffsets,e._offsetInstanceExtend=i.offsetInstanceExtend,e._instanceBoundingSpheres=i.boundingSpheres,e._instanceBoundingSpheresCV=i.boundingSpheresCV,defined(e._geometries)&&0<e._geometries.length?(e._recomputeBoundingSpheres=!0,e._state=PrimitiveState$1.COMBINED):setReady(e,t,PrimitiveState$1.FAILED,void 0)})).otherwise((function(i){setReady(e,t,PrimitiveState$1.FAILED,i)})))}function loadSynchronous(e,t){for(var i,r=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],n=e._numberOfInstances=r.length,a=new Array(n),o=e._instanceIds,s=0,l=0;l<n;l++){var c=defined((c=(i=r[l]).geometry).attributes)&&defined(c.primitiveType)?cloneGeometry(c):c.constructor.createGeometry(c);a[s++]=cloneInstance(i,c),o.push(i.id)}a.length=s;var u=t.scene3DOnly,d=t.mapProjection;u=PrimitivePipeline.combineGeometry({instances:a,ellipsoid:d.ellipsoid,projection:d,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:u,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=u.geometries,e._attributeLocations=u.attributeLocations,e.modelMatrix=Matrix4.clone(u.modelMatrix,e.modelMatrix),e._pickOffsets=u.pickOffsets,e._offsetInstanceExtend=u.offsetInstanceExtend,e._instanceBoundingSpheres=u.boundingSpheres,e._instanceBoundingSpheresCV=u.boundingSpheresCV,defined(e._geometries)&&0<e._geometries.length?(e._recomputeBoundingSpheres=!0,e._state=PrimitiveState$1.COMBINED):setReady(e,t,PrimitiveState$1.FAILED,void 0)}function recomputeBoundingSpheres(e,t){var i=e._batchTableAttributeIndices.offset;if(e._recomputeBoundingSpheres&&defined(i)){var r=e._offsetInstanceExtend,n=e._instanceBoundingSpheres,a=n.length,o=e._tempBoundingSpheres;if(!defined(o)){for(o=new Array(a),h=0;h<a;h++)o[h]=new BoundingSphere;e._tempBoundingSpheres=o}for(h=0;h<a;++h){var s=o[h],l=e._batchTable.getBatchedAttribute(h,i,new Cartesian3);transformBoundingSphere(s=n[h].clone(s),l,r[h])}for(var c=[],u=[],d=[],h=0;h<a;++h){var p=o[h];0<p.center.x-p.radius||BoundingSphere.intersectPlane(p,Plane.ORIGIN_ZX_PLANE)!==Intersect$1.INTERSECTING?c.push(p):(u.push(p),d.push(p))}var f=c[0],m=d[0],g=u[0];for(h=1;h<c.length;h++)f=BoundingSphere.union(f,c[h]);for(h=1;h<d.length;h++)m=BoundingSphere.union(m,d[h]);for(h=1;h<u.length;h++)g=BoundingSphere.union(g,u[h]);var y=[];for(defined(f)&&y.push(f),defined(m)&&y.push(m),defined(g)&&y.push(g),h=0;h<y.length;h++){var _=y[h].clone(e._boundingSpheres[h]);e._boundingSpheres[h]=_,e._boundingSphereCV[h]=BoundingSphere.projectTo2D(_,t.mapProjection,e._boundingSphereCV[h])}Primitive._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}else e._recomputeBoundingSpheres=!1}var scratchBoundingSphereCenterEncoded=new EncodedCartesian3,scratchBoundingSphereCartographic=new Cartographic,scratchBoundingSphereCenter2D=new Cartesian3,scratchBoundingSphere$2=new BoundingSphere;function updateBatchTableBoundingSpheres(e,t){if(defined(e._batchTableAttributeIndices.distanceDisplayCondition)&&!e._batchTableBoundingSpheresUpdated){for(var i=e._batchTableBoundingSphereAttributeIndices,r=i.center3DHigh,n=i.center3DLow,a=i.center2DHigh,o=i.center2DLow,s=i.radius,l=t.mapProjection,c=l.ellipsoid,u=e._batchTable,d=e._instanceBoundingSpheres,h=d.length,p=0;p<h;++p){var f,m,g=d[p];defined(g)&&(defined(f=e.modelMatrix)&&(g=BoundingSphere.transform(g,f,scratchBoundingSphere$2)),m=g.center,f=g.radius,g=EncodedCartesian3.fromCartesian(m,scratchBoundingSphereCenterEncoded),u.setBatchedAttribute(p,r,g.high),u.setBatchedAttribute(p,n,g.low),t.scene3DOnly||(m=c.cartesianToCartographic(m,scratchBoundingSphereCartographic),m=l.project(m,scratchBoundingSphereCenter2D),g=EncodedCartesian3.fromCartesian(m,scratchBoundingSphereCenterEncoded),u.setBatchedAttribute(p,a,g.high),u.setBatchedAttribute(p,o,g.low)),u.setBatchedAttribute(p,s,f))}e._batchTableBoundingSpheresUpdated=!0}}var offsetScratchCartesian=new Cartesian3,offsetCenterScratch=new Cartesian3;function updateBatchTableOffsets(e,t){if(defined(e._batchTableAttributeIndices.offset)&&!e._batchTableOffsetsUpdated&&!t.scene3DOnly){for(var i=e._batchTableOffsetAttribute2DIndex,r=t.mapProjection,n=r.ellipsoid,a=e._batchTable,o=e._instanceBoundingSpheres,s=o.length,l=0;l<s;++l){var c,u,d,h=o[l];defined(h)&&(c=a.getBatchedAttribute(l,e._batchTableAttributeIndices.offset),Cartesian3.equals(c,Cartesian3.ZERO)?a.setBatchedAttribute(l,i,Cartesian3.ZERO):(defined(d=e.modelMatrix)&&(h=BoundingSphere.transform(h,d,scratchBoundingSphere$2)),u=h.center,u=n.scaleToGeodeticSurface(u,offsetCenterScratch),d=n.cartesianToCartographic(u,scratchBoundingSphereCartographic),h=r.project(d,scratchBoundingSphereCenter2D),u=Cartesian3.add(c,u,offsetScratchCartesian),d=n.cartesianToCartographic(u,d),d=r.project(d,offsetScratchCartesian),h=(d=Cartesian3.subtract(d,h,offsetScratchCartesian)).x,d.x=d.z,d.z=d.y,d.y=h,a.setBatchedAttribute(l,i,d)))}e._batchTableOffsetsUpdated=!0}}function createVertexArray(e,t){for(var i=e._attributeLocations,r=e._geometries,n=t.scene3DOnly,a=t.context,o=[],s=r.length,l=0;l<s;++l){var c,u,d,h,p=r[l];o.push(VertexArray.fromGeometry({context:a,geometry:p,attributeLocations:i,bufferUsage:BufferUsage$1.STATIC_DRAW,interleave:e._interleave})),defined(e._createBoundingVolumeFunction)?e._createBoundingVolumeFunction(t,p):(e._boundingSpheres.push(BoundingSphere.clone(p.boundingSphere)),e._boundingSphereWC.push(new BoundingSphere),n||(u=(c=p.boundingSphereCV.center).x,d=c.y,h=c.z,c.x=h,c.y=u,c.z=d,e._boundingSphereCV.push(BoundingSphere.clone(p.boundingSphereCV)),e._boundingSphere2D.push(new BoundingSphere),e._boundingSphereMorph.push(new BoundingSphere)))}e._va=o,e._primitiveType=r[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,setReady(e,t,PrimitiveState$1.COMPLETE,void 0)}function createRenderStates(e,t,i,r){var n;i=i.getRenderState();r?((n=clone(i,!1)).cull={enabled:!0,face:CullFace$1.BACK},e._frontFaceRS=RenderState.fromCache(n),n.cull.face=CullFace$1.FRONT,e._backFaceRS=RenderState.fromCache(n)):(e._frontFaceRS=RenderState.fromCache(i),e._backFaceRS=e._frontFaceRS),n=clone(i,!1),defined(e._depthFailAppearance)&&(n.depthTest.enabled=!1),defined(e._depthFailAppearance)&&((n=clone(i=e._depthFailAppearance.getRenderState(),!1)).depthTest.func=DepthFunction$1.GREATER,r?(n.cull={enabled:!0,face:CullFace$1.BACK},e._frontFaceDepthFailRS=RenderState.fromCache(n),n.cull.face=CullFace$1.FRONT,e._backFaceDepthFailRS=RenderState.fromCache(n)):(e._frontFaceDepthFailRS=RenderState.fromCache(n),e._backFaceDepthFailRS=e._frontFaceRS))}function createShaderProgram(e,t,i){var r=t.context,n=e._attributeLocations,a=e._batchTable.getVertexShaderCallback()(i.vertexShaderSource);a=Primitive._appendOffsetToShader(e,a);a=Primitive._appendShowToShader(e,a),a=appendPickToVertexShader(Primitive._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=modifyForEncodedNormals(e,Primitive._updateColorAttribute(e,a,!1)),a=Primitive._modifyShaderPosition(e,a,t.scene3DOnly),i=appendPickToFragmentShader(i=i.getFragmentShaderSource()),e._sp=ShaderProgram.replaceCache({context:r,shaderProgram:e._sp,vertexShaderSource:a,fragmentShaderSource:i,attributeLocations:n}),validateShaderMatching(e._sp),defined(e._depthFailAppearance)&&(a=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),a=Primitive._appendShowToShader(e,a),a=appendPickToVertexShader(Primitive._appendDistanceDisplayConditionToShader(e,a,t.scene3DOnly)),a=modifyForEncodedNormals(e,Primitive._updateColorAttribute(e,a,!0)),a=depthClampVS(Primitive._modifyShaderPosition(e,a,t.scene3DOnly)),i=depthClampFS(i=appendPickToFragmentShader(i=e._depthFailAppearance.getFragmentShaderSource())),e._spDepthFail=ShaderProgram.replaceCache({context:r,shaderProgram:e._spDepthFail,vertexShaderSource:a,fragmentShaderSource:i,attributeLocations:n}),validateShaderMatching(e._spDepthFail))}var modifiedModelViewScratch=new Matrix4,rtcScratch=new Cartesian3;function getUniforms(e,t,i,r){i=defined(i)?i._uniforms:void 0;var n={},a=t.uniforms;if(defined(a))for(var o in a)a.hasOwnProperty(o)&&(n[o]=getUniformFunction(a,o));return i=combine(n,i),i=e._batchTable.getUniformMapCallback()(i),defined(e.rtcCenter)&&(i.u_modifiedModelView=function(){var t=r.context.uniformState.view;return Matrix4.multiply(t,e._modelMatrix,modifiedModelViewScratch),Matrix4.multiplyByPoint(modifiedModelViewScratch,e.rtcCenter,rtcScratch),Matrix4.setTranslation(modifiedModelViewScratch,rtcScratch,modifiedModelViewScratch),modifiedModelViewScratch}),i}function createCommands(e,t,i,r,n,a,o,s){var l,c=getUniforms(e,t,i,s);defined(e._depthFailAppearance)&&(l=getUniforms(e,e._depthFailAppearance,e._depthFailAppearance.material,s));var u=r?Pass$1.TRANSLUCENT:Pass$1.OPAQUE;r=n?2:1;r*=defined(e._depthFailAppearance)?2:1,a.length=e._va.length*r;for(var d,h=a.length,p=0,f=0;f<h;++f)n&&(defined(d=a[f])||(d=a[f]=new DrawCommand({owner:e,primitiveType:e._primitiveType})),d.vertexArray=e._va[p],d.renderState=e._backFaceRS,d.shaderProgram=e._sp,d.uniformMap=c,d.pass=u,++f),defined(d=a[f])||(d=a[f]=new DrawCommand({owner:e,primitiveType:e._primitiveType})),d.vertexArray=e._va[p],d.renderState=e._frontFaceRS,d.shaderProgram=e._sp,d.uniformMap=c,d.pass=u,defined(e._depthFailAppearance)&&(n&&(defined(d=a[++f])||(d=a[f]=new DrawCommand({owner:e,primitiveType:e._primitiveType})),d.vertexArray=e._va[p],d.renderState=e._backFaceDepthFailRS,d.shaderProgram=e._spDepthFail,d.uniformMap=l,d.pass=u),defined(d=a[++f])||(d=a[f]=new DrawCommand({owner:e,primitiveType:e._primitiveType})),d.vertexArray=e._va[p],d.renderState=e._frontFaceDepthFailRS,d.shaderProgram=e._spDepthFail,d.uniformMap=l,d.pass=u),++p}function updateAndQueueCommands(e,t,i,r,n,a,o,s){var l;Primitive._updateBoundingVolumes(e,t,n),t.mode===SceneMode$1.SCENE3D?l=e._boundingSphereWC:t.mode===SceneMode$1.COLUMBUS_VIEW?l=e._boundingSphereCV:t.mode===SceneMode$1.SCENE2D&&defined(e._boundingSphere2D)?l=e._boundingSphere2D:defined(e._boundingSphereMorph)&&(l=e._boundingSphereMorph);var c=t.commandList;if((t=t.passes).render||t.pick){var u=e.allowPicking,d=ShadowMode$1.castShadows(e.shadows),h=ShadowMode$1.receiveShadows(e.shadows),p=i.length,f=s?2:1;f*=defined(e._depthFailAppearance)?2:1;for(var m=0;m<p;++m){var g=Math.floor(m/f),y=i[m];y.modelMatrix=n,y.boundingVolume=l[g],y.cull=a,y.debugShowBoundingVolume=o,y.castShadows=d,y.receiveShadows=h,y.pickId=u?"v_pickColor":void 0,c.push(y)}}}Primitive._updateBoundingVolumes=function(e,t,i,r){var n,a,o;if(r||!Matrix4.equals(i,e._modelMatrix))for(Matrix4.clone(i,e._modelMatrix),a=e._boundingSpheres.length,n=0;n<a;++n)defined(o=e._boundingSpheres[n])&&(e._boundingSphereWC[n]=BoundingSphere.transform(o,i,e._boundingSphereWC[n]),t.scene3DOnly||(e._boundingSphere2D[n]=BoundingSphere.clone(e._boundingSphereCV[n],e._boundingSphere2D[n]),e._boundingSphere2D[n].center.x=0,e._boundingSphereMorph[n]=BoundingSphere.union(e._boundingSphereWC[n],e._boundingSphereCV[n])));var s=e.appearance.pixelSize;if(defined(s))for(a=e._boundingSpheres.length,n=0;n<a;++n){o=e._boundingSpheres[n];var l=e._boundingSphereWC[n],c=t.camera.getPixelSize(o,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*s;l.radius=o.radius+c}},Primitive.prototype.update=function(e){if(!(!defined(this.geometryInstances)&&0===this._va.length||defined(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&0===this.geometryInstances.length||!defined(this.appearance)||e.mode!==SceneMode$1.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)){if(defined(this._error))throw this._error;if(this._state!==PrimitiveState$1.FAILED){var t,i,r,n,a,o,s=e.context;if(defined(this._batchTable)||createBatchTable(this,s),0<this._batchTable.attributes.length){if(0===ContextLimits.maximumVertexTextureImageUnits)throw new RuntimeError("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}this._state!==PrimitiveState$1.COMPLETE&&this._state!==PrimitiveState$1.COMBINED&&(this.asynchronous?loadAsynchronous:loadSynchronous)(this,e),this._state===PrimitiveState$1.COMBINED&&(updateBatchTableBoundingSpheres(this,e),updateBatchTableOffsets(this,e),createVertexArray(this,e)),this.show&&this._state===PrimitiveState$1.COMPLETE&&(this._batchTableOffsetsUpdated||updateBatchTableOffsets(this,e),this._recomputeBoundingSpheres&&recomputeBoundingSpheres(this,e),i=(t=this.appearance).material,n=r=!1,this._appearance!==t?(this._appearance=t,this._material=i,n=r=!0):this._material!==i&&(this._material=i,n=!0),o=defined(a=this.depthFailAppearance)?a.material:void 0,this._depthFailAppearance!==a?(this._depthFailAppearance=a,this._depthFailMaterial=o,n=r=!0):this._depthFailMaterial!==o&&(this._depthFailMaterial=o,n=!0),a=this._appearance.isTranslucent(),this._translucent!==a&&(this._translucent=a,r=!0),defined(this._material)&&this._material.update(s),o=t.closed&&a,r&&defaultValue(this._createRenderStatesFunction,createRenderStates)(this,s,t,o),n&&defaultValue(this._createShaderProgramFunction,createShaderProgram)(this,e,t),(r||n)&&defaultValue(this._createCommandsFunction,createCommands)(this,t,i,a,o,this._colorCommands,this._pickCommands,e),defaultValue(this._updateAndQueueCommandsFunction,updateAndQueueCommands)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,o))}}};var offsetBoundingSphereScratch1=new BoundingSphere,offsetBoundingSphereScratch2=new BoundingSphere;function transformBoundingSphere(e,t,i){var r,n;return i===GeometryOffsetAttribute$1.TOP?(r=BoundingSphere.clone(e,offsetBoundingSphereScratch1),(n=BoundingSphere.clone(e,offsetBoundingSphereScratch2)).center=Cartesian3.add(n.center,t,n.center),e=BoundingSphere.union(r,n,e)):i===GeometryOffsetAttribute$1.ALL&&(e.center=Cartesian3.add(e.center,t,e.center)),e}function createGetFunction(e,t,i){return function(){var r=e.getBatchedAttribute(t,i),n=e.attributes[i],a=n.componentsPerAttribute;a=ComponentDatatype$1.createTypedArray(n.componentDatatype,a);return defined(r.constructor.pack)?r.constructor.pack(r,a,0):a[0]=r,a}}function createSetFunction(e,t,i,r,n){return function(a){a=getAttributeValue(a),e.setBatchedAttribute(t,i,a),"offset"===n&&(r._recomputeBoundingSpheres=!0,r._batchTableOffsetsUpdated=!1)}}var offsetScratch$2=new Cartesian3;function createBoundingSphereProperties(e,t,i){t.boundingSphere={get:function(){var r,n,a=e._instanceBoundingSpheres[i];return defined(a)&&(a=a.clone(),r=e.modelMatrix,defined(n=t.offset)&&transformBoundingSphere(a,Cartesian3.fromArray(n.get(),0,offsetScratch$2),e._offsetInstanceExtend[i]),defined(r)&&(a=BoundingSphere.transform(a,r))),a}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[i]}}}function createPickIdProperty(e,t,i){t.pickId={get:function(){return e._pickIds[i]}}}function setReady(e,t,i,r){e._error=r,e._state=i,t.afterRender.push((function(){e._ready=e._state===PrimitiveState$1.COMPLETE||e._state===PrimitiveState$1.FAILED,defined(r)?e._readyPromise.reject(r):e._readyPromise.resolve(e)}))}Primitive.prototype.getGeometryInstanceAttributes=function(e){for(var t=-1,i=this._lastPerInstanceAttributeIndex,r=this._instanceIds,n=r.length,a=0;a<n;++a){var o=(i+a)%n;if(e===r[o]){t=o;break}}if(-1!==t){if(defined(d=this._perInstanceAttributeCache[t]))return d;var s,l,c=this._batchTable,u=this._batchTableAttributeIndices,d={},h={};for(s in u)u.hasOwnProperty(s)&&(l=u[s],h[s]={get:createGetFunction(c,t,l),set:createSetFunction(c,t,l,this,s)});return createBoundingSphereProperties(this,h,t),createPickIdProperty(this,h,t),Object.defineProperties(d,h),this._lastPerInstanceAttributeIndex=t,this._perInstanceAttributeCache[t]=d}},Primitive.prototype.isDestroyed=function(){return!1},Primitive.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._spDepthFail=this._spDepthFail&&this._spDepthFail.destroy();for(var e=this._va,t=e.length,i=0;i<t;++i)e[i].destroy();this._va=void 0;var r=this._pickIds;for(t=r.length,i=0;i<t;++i)r[i].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,destroyObject(this)};var ShadowVolumeAppearanceFS="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\nreturn eyeCoordinate.xyz / eyeCoordinate.w;\n}\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {\nvec2 glFragCoordXY = gl_FragCoord.xy;\nfloat upOrRightLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\nfloat downOrLeftLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\nbvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\nfloat useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\nfloat useDownOrLeft = float(useUpOrRight == 0.0);\nvec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\nvec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\nreturn (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\nvoid main(void)\n{\n#ifdef REQUIRES_EC\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n#ifdef REQUIRES_WC\nvec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\nvec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n#ifdef TEXTURE_COORDINATES\nvec2 uv;\n#ifdef SPHERICAL\nvec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\nsphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\nsphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\nuv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\nuv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\nuv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\nuv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\nif (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0) {\ngl_FragColor.a = 1.0;\nczm_writeDepthClamp();\n}\n#else // CULL_FRAGMENTS\ngl_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n#ifdef CULL_FRAGMENTS\nif (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y) {\ndiscard;\n}\n#endif\n#ifdef NORMAL_EC\nvec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\nvec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\nvec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n#ifdef PER_INSTANCE_COLOR\nvec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\ngl_FragColor = color;\n#else // FLAT\nczm_materialInput materialInput;\nmaterialInput.normalEC = normalEC;\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\nczm_material material = czm_getDefaultMaterial(materialInput);\nmaterial.diffuse = color.rgb;\nmaterial.alpha = color.a;\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\ngl_FragColor.rgb *= gl_FragColor.a;\n#else // PER_INSTANCE_COLOR\nczm_materialInput materialInput;\n#ifdef USES_NORMAL_EC\nmaterialInput.normalEC = normalEC;\n#endif\n#ifdef USES_POSITION_TO_EYE_EC\nmaterialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n#ifdef USES_TANGENT_TO_EYE\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n#ifdef USES_ST\nmaterialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\nmaterialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\ngl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\ngl_FragColor.rgb *= gl_FragColor.a;\n#endif // PER_INSTANCE_COLOR\nczm_writeDepthClamp();\n#endif // PICK\n}\n";function ShadowVolumeAppearance(e,t,i){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};var r=new ShaderDependencies;r.requiresTextureCoordinates=e,r.requiresEC=!i.flat;var n,a=new ShaderDependencies;a.requiresTextureCoordinates=e,i instanceof PerInstanceColorAppearance?r.requiresNormalEC=!i.flat:(n=i.material.shaderSource+"\n"+i.fragmentShaderSource,r.normalEC=-1!==n.indexOf("materialInput.normalEC")||-1!==n.indexOf("czm_getDefaultMaterial"),r.positionToEyeEC=-1!==n.indexOf("materialInput.positionToEyeEC"),r.tangentToEyeMatrix=-1!==n.indexOf("materialInput.tangentToEyeMatrix"),r.st=-1!==n.indexOf("materialInput.st")),this._colorShaderDependencies=r,this._pickShaderDependencies=a,this._appearance=i,this._extentsCulling=e,this._planarExtents=t}ShadowVolumeAppearance.prototype.createFragmentShader=function(e){var t=this._appearance,i=this._colorShaderDependencies,r=[];return e||this._planarExtents||r.push("SPHERICAL"),i.requiresEC&&r.push("REQUIRES_EC"),i.requiresWC&&r.push("REQUIRES_WC"),i.requiresTextureCoordinates&&r.push("TEXTURE_COORDINATES"),this._extentsCulling&&r.push("CULL_FRAGMENTS"),i.requiresNormalEC&&r.push("NORMAL_EC"),t instanceof PerInstanceColorAppearance&&r.push("PER_INSTANCE_COLOR"),i.normalEC&&r.push("USES_NORMAL_EC"),i.positionToEyeEC&&r.push("USES_POSITION_TO_EYE_EC"),i.tangentToEyeMatrix&&r.push("USES_TANGENT_TO_EYE"),i.st&&r.push("USES_ST"),t.flat&&r.push("FLAT"),i="",t instanceof PerInstanceColorAppearance||(i=t.material.shaderSource),new ShaderSource({defines:r,sources:[i,ShadowVolumeAppearanceFS]})},ShadowVolumeAppearance.prototype.createPickFragmentShader=function(e){var t=this._pickShaderDependencies,i=["PICK"];return e||this._planarExtents||i.push("SPHERICAL"),t.requiresEC&&i.push("REQUIRES_EC"),t.requiresWC&&i.push("REQUIRES_WC"),t.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),new ShaderSource({defines:i,sources:[ShadowVolumeAppearanceFS],pickColorQualifier:"varying"})},ShadowVolumeAppearance.prototype.createVertexShader=function(e,t,i,r){return createShadowVolumeAppearanceVS(this._colorShaderDependencies,this._planarExtents,i,e,t,this._appearance,r,this._projectionExtentDefines)},ShadowVolumeAppearance.prototype.createPickVertexShader=function(e,t,i,r){return createShadowVolumeAppearanceVS(this._pickShaderDependencies,this._planarExtents,i,e,t,void 0,r,this._projectionExtentDefines)};var longitudeExtentsCartesianScratch=new Cartesian3,longitudeExtentsCartographicScratch=new Cartographic,longitudeExtentsEncodeScratch={high:0,low:0};function createShadowVolumeAppearanceVS(e,t,i,r,n,a,o,s){var l,c=r.slice();return""===s.eastMostYhighDefine&&((l=longitudeExtentsCartographicScratch).longitude=CesiumMath.PI,l.latitude=0,l.height=0,r=o.project(l,longitudeExtentsCartesianScratch),l=EncodedCartesian3.encode(r.x,longitudeExtentsEncodeScratch),s.eastMostYhighDefine="EAST_MOST_X_HIGH "+l.high.toFixed((l.high+"").length+1),s.eastMostYlowDefine="EAST_MOST_X_LOW "+l.low.toFixed((l.low+"").length+1),(r=longitudeExtentsCartographicScratch).longitude=-CesiumMath.PI,r.latitude=0,r.height=0,r=o.project(r,longitudeExtentsCartesianScratch),l=EncodedCartesian3.encode(r.x,longitudeExtentsEncodeScratch),s.westMostYhighDefine="WEST_MOST_X_HIGH "+l.high.toFixed((l.high+"").length+1),s.westMostYlowDefine="WEST_MOST_X_LOW "+l.low.toFixed((l.low+"").length+1)),i&&(c.push(s.eastMostYhighDefine),c.push(s.eastMostYlowDefine),c.push(s.westMostYhighDefine),c.push(s.westMostYlowDefine)),defined(a)&&a instanceof PerInstanceColorAppearance&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||i||c.push("SPHERICAL"),i&&c.push("COLUMBUS_VIEW_2D")),new ShaderSource({defines:c,sources:[n]})}function ShaderDependencies(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}function pointLineDistance(e,t,i){return Math.abs((t.y-e.y)*i.x-(t.x-e.x)*i.y+t.x*e.y-t.y*e.x)/Cartesian2.distance(t,e)}Object.defineProperties(ShaderDependencies.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});var points2DScratch$2=[new Cartesian2,new Cartesian2,new Cartesian2,new Cartesian2];function addTextureCoordinateRotationAttributes(e,t){var i=points2DScratch$2,r=Cartesian2.unpack(t,0,i[0]),n=Cartesian2.unpack(t,2,i[1]);t=Cartesian2.unpack(t,4,i[2]);e.uMaxVmax=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:[n.x,n.y,t.x,t.y]}),i=1/pointLineDistance(r,n,t),n=1/pointLineDistance(r,t,n),e.uvMinAndExtents=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r.x,r.y,i,n]})}var cartographicScratch$1=new Cartographic,cornerScratch=new Cartesian3,northWestScratch=new Cartesian3,southEastScratch=new Cartesian3,highLowScratch={high:0,low:0};function add2DTextureCoordinateAttributes(e,t,i){(o=cartographicScratch$1).height=0,o.longitude=e.west,o.latitude=e.south;var r=t.project(o,cornerScratch);o.latitude=e.north;var n=t.project(o,northWestScratch);o.longitude=e.east,o.latitude=e.south;var a=t.project(o,southEastScratch),o=(e=[0,0,0,0],t=[0,0,0,0],EncodedCartesian3.encode(r.x,highLowScratch));e[0]=o.high,t[0]=o.low,o=EncodedCartesian3.encode(r.y,highLowScratch),e[1]=o.high,t[1]=o.low,o=EncodedCartesian3.encode(n.y,highLowScratch),e[2]=o.high,t[2]=o.low,o=EncodedCartesian3.encode(a.x,highLowScratch),e[3]=o.high,t[3]=o.low,i.planes2D_HIGH=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:e}),i.planes2D_LOW=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:t})}var enuMatrixScratch=new Matrix4,inverseEnuScratch=new Matrix4,rectanglePointCartesianScratch=new Cartesian3,rectangleCenterScratch$2=new Cartographic,pointsCartographicScratch=[new Cartographic,new Cartographic,new Cartographic,new Cartographic,new Cartographic,new Cartographic,new Cartographic,new Cartographic];function computeRectangleBounds(e,t,i,r,n,a){(h=Rectangle.center(e,rectangleCenterScratch$2)).height=i;var o=Cartographic.toCartesian(h,t,rectanglePointCartesianScratch),s=Transforms.eastNorthUpToFixedFrame(o,t,enuMatrixScratch),l=Matrix4.inverse(s,inverseEnuScratch),c=e.west,u=e.east,d=e.north,h=e.south,p=pointsCartographicScratch;p[0].latitude=h,p[0].longitude=c,p[1].latitude=d,p[1].longitude=c,p[2].latitude=d,p[2].longitude=u,p[3].latitude=h,o=.5*(c+(p[3].longitude=u)),e=.5*(d+h),p[4].latitude=h,p[4].longitude=o,p[5].latitude=d,p[5].longitude=o,p[6].latitude=e,p[6].longitude=c,p[7].latitude=e,p[7].longitude=u;for(var f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,_=0;_<8;_++){p[_].height=i;var v=Cartographic.toCartesian(p[_],t,rectanglePointCartesianScratch);Matrix4.multiplyByPoint(l,v,v),v.z=0,f=Math.min(f,v.x),m=Math.max(m,v.x),g=Math.min(g,v.y),y=Math.max(y,v.y)}(u=r).x=f,u.y=g,u.z=0,Matrix4.multiplyByPoint(s,u,u),(r=n).x=m,r.y=g,r.z=0,Matrix4.multiplyByPoint(s,r,r),Cartesian3.subtract(r,u,n),(n=a).x=f,n.y=y,n.z=0,Matrix4.multiplyByPoint(s,n,n),Cartesian3.subtract(n,u,a)}var eastwardScratch=new Cartesian3,northwardScratch=new Cartesian3,encodeScratch$1=new EncodedCartesian3;ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes=function(e,t,i,r,n){var a=cornerScratch,o=eastwardScratch,s=northwardScratch;return computeRectangleBounds(e,i,defaultValue(n,0),a,o,s),addTextureCoordinateRotationAttributes(n={},t),a=EncodedCartesian3.fromCartesian(a,encodeScratch$1),n.southWest_HIGH=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,normalize:!1,value:Cartesian3.pack(a.high,[0,0,0])}),n.southWest_LOW=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,normalize:!1,value:Cartesian3.pack(a.low,[0,0,0])}),n.eastward=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,normalize:!1,value:Cartesian3.pack(o,[0,0,0])}),n.northward=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,normalize:!1,value:Cartesian3.pack(s,[0,0,0])}),add2DTextureCoordinateAttributes(e,r,n),n};var spherePointScratch=new Cartesian3;function latLongToSpherical(e,t,i,r){var n=cartographicScratch$1;return n.latitude=e,n.longitude=t,n.height=0,n=Cartographic.toCartesian(n,i,spherePointScratch),i=Math.sqrt(n.x*n.x+n.y*n.y),i=CesiumMath.fastApproximateAtan2(i,n.z),n=CesiumMath.fastApproximateAtan2(n.x,n.y),r.x=i,r.y=n,r}var sphericalScratch=new Cartesian2;function shouldUseSpherical(e){return Math.max(e.width,e.height)>ShadowVolumeAppearance.MAX_WIDTH_FOR_PLANAR_EXTENTS}ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes=function(e,t,i,r){var n=(o=latLongToSpherical(e.south,e.west,i,sphericalScratch)).x,a=o.y,o=(s=latLongToSpherical(e.north,e.east,i,sphericalScratch)).x,s=(i=s.y,0);return i<a&&(s=CesiumMath.PI-a,a=-CesiumMath.PI,i+=s),n-=CesiumMath.EPSILON5,a-=CesiumMath.EPSILON5,o+=CesiumMath.EPSILON5,i=1/((i+=CesiumMath.EPSILON5)-a),o=1/(o-n),addTextureCoordinateRotationAttributes(s={sphericalExtents:new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4,normalize:!1,value:[n,a,o,i]}),longitudeRotation:new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:1,normalize:!1,value:[s]})},t),add2DTextureCoordinateAttributes(e,r,s),s},ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes=function(e){return defined(e.southWest_HIGH)&&defined(e.southWest_LOW)&&defined(e.northward)&&defined(e.eastward)&&defined(e.planes2D_HIGH)&&defined(e.planes2D_LOW)&&defined(e.uMaxVmax)&&defined(e.uvMinAndExtents)},ShadowVolumeAppearance.hasAttributesForSphericalExtents=function(e){return defined(e.sphericalExtents)&&defined(e.longitudeRotation)&&defined(e.planes2D_HIGH)&&defined(e.planes2D_LOW)&&defined(e.uMaxVmax)&&defined(e.uvMinAndExtents)},ShadowVolumeAppearance.shouldUseSphericalCoordinates=function(e){return shouldUseSpherical(e)},ShadowVolumeAppearance.MAX_WIDTH_FOR_PLANAR_EXTENTS=CesiumMath.toRadians(1);var StencilFunction={NEVER:WebGLConstants$1.NEVER,LESS:WebGLConstants$1.LESS,EQUAL:WebGLConstants$1.EQUAL,LESS_OR_EQUAL:WebGLConstants$1.LEQUAL,GREATER:WebGLConstants$1.GREATER,NOT_EQUAL:WebGLConstants$1.NOTEQUAL,GREATER_OR_EQUAL:WebGLConstants$1.GEQUAL,ALWAYS:WebGLConstants$1.ALWAYS},StencilFunction$1=Object.freeze(StencilFunction),StencilOperation={ZERO:WebGLConstants$1.ZERO,KEEP:WebGLConstants$1.KEEP,REPLACE:WebGLConstants$1.REPLACE,INCREMENT:WebGLConstants$1.INCR,DECREMENT:WebGLConstants$1.DECR,INVERT:WebGLConstants$1.INVERT,INCREMENT_WRAP:WebGLConstants$1.INCR_WRAP,DECREMENT_WRAP:WebGLConstants$1.DECR_WRAP},StencilOperation$1=Object.freeze(StencilOperation),StencilConstants={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:StencilFunction$1.ALWAYS,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.REPLACE},backFunction:StencilFunction$1.ALWAYS,backOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.REPLACE},reference:StencilConstants.CESIUM_3D_TILE_MASK,mask:StencilConstants.CESIUM_3D_TILE_MASK}}},StencilConstants$1=Object.freeze(StencilConstants);function ClassificationPrimitive(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).geometryInstances;this.geometryInstances=t,this.show=defaultValue(e.show,!0),this.classificationType=defaultValue(e.classificationType,ClassificationType$1.BOTH),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=defaultValue(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=defaultValue(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._readyPromise=when.defer(),this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:defaultValue(e.vertexCacheOptimize,!1),interleave:defaultValue(e.interleave,!1),releaseGeometryInstances:defaultValue(e.releaseGeometryInstances,!0),allowPicking:defaultValue(e.allowPicking,!0),asynchronous:defaultValue(e.asynchronous,!0),compressVertices:defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}function getStencilDepthRenderState(e,t){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:t=t?StencilFunction$1.EQUAL:StencilFunction$1.ALWAYS,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.DECREMENT_WRAP,zPass:StencilOperation$1.KEEP},backFunction:t,backOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.INCREMENT_WRAP,zPass:StencilOperation$1.KEEP},reference:StencilConstants$1.CESIUM_3D_TILE_MASK,mask:StencilConstants$1.CESIUM_3D_TILE_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:DepthFunction$1.LESS_OR_EQUAL},depthMask:!1}}function getColorRenderState(e){return{stencilTest:{enabled:e,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},backFunction:StencilFunction$1.NOT_EQUAL,backOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND}}Object.defineProperties(ClassificationPrimitive.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}}),ClassificationPrimitive.isSupported=function(e){return e.context.stencilBuffer};var pickRenderState={stencilTest:{enabled:!0,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},backFunction:StencilFunction$1.NOT_EQUAL,backOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function createRenderStates$1(e,t,i,r){var n;defined(e._rsStencilDepthPass)||(n=!e.debugShowShadowVolume,e._rsStencilDepthPass=RenderState.fromCache(getStencilDepthRenderState(n,!1)),e._rsStencilDepthPass3DTiles=RenderState.fromCache(getStencilDepthRenderState(n,!0)),e._rsColorPass=RenderState.fromCache(getColorRenderState(n)),e._rsPickPass=RenderState.fromCache(pickRenderState))}function modifyForEncodedNormals$1(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){e="attribute vec2 compressedAttributes;",t=(t=t).replace(/attribute\s+vec3\s+extrudeDirection;/g,"");return[e,"vec3 extrudeDirection;\n",t=ShaderSource.replaceMain(t,"czm_non_compressed_main"),"void main() \n{ \n    extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n    czm_non_compressed_main(); \n}"].join("\n")}}function createShaderProgram$1(e,t){var i=t.context,r=e._primitive,n=ShadowVolumeAppearanceVS;n=e._primitive._batchTable.getVertexShaderCallback()(n);n=Primitive._appendDistanceDisplayConditionToShader(r,n),n=Primitive._modifyShaderPosition(e,n,t.scene3DOnly),n=Primitive._updateColorAttribute(r,n);var a=e._hasPlanarExtentsAttributes,o=a||e._hasSphericalExtentsAttribute;e._extruded&&(n=modifyForEncodedNormals$1(r,n));var s,l,c=e._extruded?"EXTRUDED_GEOMETRY":"",u=new ShaderSource({defines:[c],sources:[n]}),d=new ShaderSource({sources:[ShadowVolumeFS]}),h=e._primitive._attributeLocations,p=new ShadowVolumeAppearance(o,a,e.appearance);e._spStencil=ShaderProgram.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:h}),e._primitive.allowPicking?(l=ShaderSource.createPickVertexShaderSource(n),l=Primitive._appendShowToShader(r,l),l=Primitive._updatePickColorAttribute(l),s=p.createPickFragmentShader(!1),a=p.createPickVertexShader([c],l,!1,t.mapProjection),e._spPick=ShaderProgram.replaceCache({context:i,shaderProgram:e._spPick,vertexShaderSource:a,fragmentShaderSource:s,attributeLocations:h}),o&&(defined(a=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick"))||(s=p.createPickFragmentShader(!0),l=p.createPickVertexShader([c],l,!0,t.mapProjection),a=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:l,fragmentShaderSource:s,attributeLocations:h})),e._spPick2D=a)):e._spPick=ShaderProgram.fromCache({context:i,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:h}),u=new ShaderSource({defines:[c],sources:[n=Primitive._appendShowToShader(r,n)]}),e._sp=ShaderProgram.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:h}),u=p.createFragmentShader(!1),d=p.createVertexShader([c],n,!1,t.mapProjection),e._spColor=ShaderProgram.replaceCache({context:i,shaderProgram:e._spColor,vertexShaderSource:d,fragmentShaderSource:u,attributeLocations:h}),o&&(defined(u=i.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor"))||(o=p.createFragmentShader(!0),t=p.createVertexShader([c],n,!0,t.mapProjection),u=i.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:t,fragmentShaderSource:o,attributeLocations:h})),e._spColor2D=u)}function createColorCommands(e,t){var i,r=e._primitive,n=2*r._va.length;t.length=n;for(var a=0,o=r._batchTable.getUniformMapCallback()(e._uniformMap),s=e._needs2DShader,l=0;l<n;l+=2){var c,u=r._va[a++];defined(c=t[l])||(c=t[l]=new DrawCommand({owner:e,primitiveType:r._primitiveType})),c.vertexArray=u,c.renderState=e._rsStencilDepthPass,c.shaderProgram=e._sp,c.uniformMap=o,c.pass=Pass$1.TERRAIN_CLASSIFICATION,(i=DrawCommand.shallowClone(c,c.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,i.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,c.derivedCommands.tileset=i,defined(c=t[l+1])||(c=t[l+1]=new DrawCommand({owner:e,primitiveType:r._primitiveType})),c.vertexArray=u,c.renderState=e._rsColorPass,c.shaderProgram=e._spColor,c.pass=Pass$1.TERRAIN_CLASSIFICATION,defined(u=e.appearance.material)&&(o=combine(o,u._uniforms)),c.uniformMap=o,(i=DrawCommand.shallowClone(c,c.derivedCommands.tileset)).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,c.derivedCommands.tileset=i,s&&((u=DrawCommand.shallowClone(c,c.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,c.derivedCommands.appearance2D=u,(u=DrawCommand.shallowClone(i,i.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,i.derivedCommands.appearance2D=u)}for(var d=e._commandsIgnoreShow,h=e._spStencil,p=0,f=(n=d.length=n/2,0);f<n;++f){var m=d[f]=DrawCommand.shallowClone(t[p],d[f]);m.shaderProgram=h,m.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,p+=2}}function createPickCommands(e,t){var i,r,n,a,o=e._usePickOffsets,s=e._primitive,l=2*s._va.length,c=0;o&&(l=2*(i=s._pickOffsets).length),t.length=l;for(var u=0,d=s._batchTable.getUniformMapCallback()(e._uniformMap),h=e._needs2DShader,p=0;p<l;p+=2){var f=s._va[u++];o&&(r=i[c++],f=s._va[r.index]),defined(n=t[p])||(n=t[p]=new DrawCommand({owner:e,primitiveType:s._primitiveType,pickOnly:!0})),n.vertexArray=f,n.renderState=e._rsStencilDepthPass,n.shaderProgram=e._sp,n.uniformMap=d,n.pass=Pass$1.TERRAIN_CLASSIFICATION,o&&(n.offset=r.offset,n.count=r.count),(a=DrawCommand.shallowClone(n,n.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,a.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=a,defined(n=t[p+1])||(n=t[p+1]=new DrawCommand({owner:e,primitiveType:s._primitiveType,pickOnly:!0})),n.vertexArray=f,n.renderState=e._rsPickPass,n.shaderProgram=e._spPick,n.uniformMap=d,n.pass=Pass$1.TERRAIN_CLASSIFICATION,o&&(n.offset=r.offset,n.count=r.count),(a=DrawCommand.shallowClone(n,n.derivedCommands.tileset)).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=a,h&&((f=DrawCommand.shallowClone(n,n.derivedCommands.pick2D)).shaderProgram=e._spPick2D,n.derivedCommands.pick2D=f,(f=DrawCommand.shallowClone(a,a.derivedCommands.pick2D)).shaderProgram=e._spPick2D,a.derivedCommands.pick2D=f)}}function createCommands$1(e,t,i,r,n,a,o){createColorCommands(e,a),createPickCommands(e,o)}function boundingVolumeIndex(e,t){return Math.floor(e%t/2)}function updateAndQueueRenderCommand(e,t,i,r,n,a){e.modelMatrix=i,e.boundingVolume=n,e.cull=r,e.debugShowBoundingVolume=a,t.commandList.push(e)}function updateAndQueuePickCommand(e,t,i,r,n){e.modelMatrix=i,e.boundingVolume=n,e.cull=r,t.commandList.push(e)}function updateAndQueueCommands$1(e,t,i,r,n,a,o,s){var l,c=e._primitive;Primitive._updateBoundingVolumes(c,t,n),t.mode===SceneMode$1.SCENE3D?l=c._boundingSphereWC:t.mode===SceneMode$1.COLUMBUS_VIEW?l=c._boundingSphereCV:t.mode===SceneMode$1.SCENE2D&&defined(c._boundingSphere2D)?l=c._boundingSphere2D:defined(c._boundingSphereMorph)&&(l=c._boundingSphereMorph);var u,d=(u=e.classificationType)!==ClassificationType$1.CESIUM_3D_TILE,h=u!==ClassificationType$1.TERRAIN;if((u=t.passes).render){var p=i.length;for(g=0;g<p;++g)v=l[boundingVolumeIndex(g,p)],d&&updateAndQueueRenderCommand(i[g],t,n,a,v,o),h&&updateAndQueueRenderCommand(i[g].derivedCommands.tileset,t,n,a,v,o);if(t.invertClassification)for(var f=e._commandsIgnoreShow,m=f.length,g=0;g<m;++g)v=l[g],updateAndQueueRenderCommand(f[g],t,n,a,v,o)}if(u.pick){var y=r.length,_=c._pickOffsets;for(g=0;g<y;++g){var v=l[_[boundingVolumeIndex(g,y)].index];d&&updateAndQueuePickCommand(r[g],t,n,a,v),h&&updateAndQueuePickCommand(r[g].derivedCommands.tileset,t,n,a,v)}}}ClassificationPrimitive.prototype.update=function(e){if(defined(this._primitive)||defined(this.geometryInstances)){var t=this.appearance;defined(t)&&defined(t.material)&&t.material.update(e.context);var i=this,r=this._primitiveOptions;if(!defined(this._primitive)){var n,a,o,s=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],l=s.length,c=!1,u=!0,d=!1,h=!1;for(0<l&&(a=s[0].attributes,d=ShadowVolumeAppearance.hasAttributesForSphericalExtents(a),h=ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes(a),o=a.color),m=0;m<l;m++){var p=(n=s[m]).attributes.color;defined(p)&&(c=!0),u=u&&defined(p)&&ColorGeometryInstanceAttribute.equals(o,p)}if(!u&&!d&&!h)throw new DeveloperError("All GeometryInstances must have the same color attribute except via GroundPrimitives");c&&!defined(t)&&(t=new PerInstanceColorAppearance({flat:!0}),this.appearance=t),this._usePickOffsets=!d&&!h,this._hasSphericalExtentsAttribute=d,this._hasPlanarExtentsAttributes=h,this._hasPerColorAttribute=c;for(var f=new Array(l),m=0;m<l;++m)n=s[m],f[m]=new GeometryInstance({geometry:n.geometry,attributes:n.attributes,modelMatrix:n.modelMatrix,id:n.id,pickPrimitive:defaultValue(this._pickPrimitive,i)});r.appearance=t,r.geometryInstances=f,defined(this._createBoundingVolumeFunction)&&(r._createBoundingVolumeFunction=function(e,t){i._createBoundingVolumeFunction(e,t)}),r._createRenderStatesFunction=function(e,t,r,n){createRenderStates$1(i)},r._createShaderProgramFunction=function(e,t,r){createShaderProgram$1(i,t)},r._createCommandsFunction=function(e,t,r,n,a,o,s){createCommands$1(i,void 0,void 0,!0,!1,o,s)},defined(this._updateAndQueueCommandsFunction)?r._updateAndQueueCommandsFunction=function(e,t,r,n,a,o,s,l){i._updateAndQueueCommandsFunction(e,t,r,n,a,o,s,l)}:r._updateAndQueueCommandsFunction=function(e,t,r,n,a,o,s,l){updateAndQueueCommands$1(i,t,r,n,a,o,s)},this._primitive=new Primitive(r),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0),defined(e=e._error)?i._readyPromise.reject(e):i._readyPromise.resolve(i)}))}this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=RenderState.fromCache(getStencilDepthRenderState(!1,!1)),this._rsStencilDepthPass3DTiles=RenderState.fromCache(getStencilDepthRenderState(!1,!0)),this._rsColorPass=RenderState.fromCache(getColorRenderState(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=RenderState.fromCache(getStencilDepthRenderState(!0,!1)),this._rsStencilDepthPass3DTiles=RenderState.fromCache(getStencilDepthRenderState(!0,!0)),this._rsColorPass=RenderState.fromCache(getColorRenderState(!0))),this._primitive.appearance!==t&&(this._primitive.appearance=t),this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},ClassificationPrimitive.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)},ClassificationPrimitive.prototype.isDestroyed=function(){return!1},ClassificationPrimitive.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,destroyObject(this)};var GroundPrimitiveUniformMap={u_globeMinimumAltitude:function(){return 55e3}};function GroundPrimitive(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!defined(t)&&defined(i))for(var r=Array.isArray(i)?i:[i],n=r.length,a=0;a<n;a++){var o=r[a].attributes;if(defined(o)&&defined(o.color)){t=new PerInstanceColorAppearance({flat:!0});break}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=defaultValue(e.show,!0),this.classificationType=defaultValue(e.classificationType,ClassificationType$1.BOTH),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=defaultValue(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=when.defer(),this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=ApproximateTerrainHeights._defaultMaxTerrainHeight,this._minTerrainHeight=ApproximateTerrainHeights._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0,this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:defaultValue(e.vertexCacheOptimize,!1),interleave:defaultValue(e.interleave,!1),releaseGeometryInstances:defaultValue(e.releaseGeometryInstances,!0),allowPicking:defaultValue(e.allowPicking,!0),asynchronous:defaultValue(e.asynchronous,!0),compressVertices:defaultValue(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:this,_extruded:!0,_uniformMap:GroundPrimitiveUniformMap}}function getComputeMaximumHeightFunction(e){return function(t,i){return i=(i=i.maximumRadius)/Math.cos(.5*t)-i,e._maxHeight+i}}function getComputeMinimumHeightFunction(e){return function(t,i){return e._minHeight}}Object.defineProperties(GroundPrimitive.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),GroundPrimitive.isSupported=ClassificationPrimitive.isSupported;var scratchBVCartesianHigh=new Cartesian3,scratchBVCartesianLow=new Cartesian3,scratchBVCartesian=new Cartesian3,scratchBVCartographic=new Cartographic,scratchBVRectangle=new Rectangle;function getRectangle(e,t){var i=e.mapProjection.ellipsoid;if(!defined(t.attributes)||!defined(t.attributes.position3DHigh))return defined(t.rectangle)?t.rectangle:void 0;for(var r=t.attributes.position3DHigh.values,n=t.attributes.position3DLow.values,a=r.length,o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=0;u<a;u+=3){var d=Cartesian3.unpack(r,u,scratchBVCartesianHigh),h=Cartesian3.unpack(n,u,scratchBVCartesianLow);d=Cartesian3.add(d,h,scratchBVCartesian),d=(h=i.cartesianToCartographic(d,scratchBVCartographic)).latitude,h=h.longitude,o=Math.min(o,d),s=Math.min(s,h),l=Math.max(l,d),c=Math.max(c,h)}return(t=scratchBVRectangle).north=l,t.south=o,t.east=c,t.west=s,t}function setMinMaxTerrainHeights(e,t,i){i=ApproximateTerrainHeights.getMinimumMaximumHeights(t,i),e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function createBoundingVolume(e,t,i){var r=t.mapProjection.ellipsoid;i=getRectangle(t,i),r=OrientedBoundingBox.fromRectangle(i,e._minHeight,e._maxHeight,r);e._boundingVolumes.push(r),t.scene3DOnly||(t=t.mapProjection,t=BoundingSphere.fromRectangleWithHeights2D(i,t,e._maxHeight,e._minHeight),Cartesian3.fromElements(t.center.z,t.center.x,t.center.y,t.center),e._boundingVolumes2D.push(t))}function boundingVolumeIndex$1(e,t){return Math.floor(e%t/2)}function updateAndQueueRenderCommand$1(e,t,i,r,n,a,o){var s=e._primitive;i.mode!==SceneMode$1.SCENE3D&&t.shaderProgram===s._spColor&&s._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=r,t.boundingVolume=a,t.cull=n,t.debugShowBoundingVolume=o,i.commandList.push(t)}function updateAndQueuePickCommand$1(e,t,i,r,n,a){var o=e._primitive;i.mode!==SceneMode$1.SCENE3D&&t.shaderProgram===o._spPick&&o._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=r,t.boundingVolume=a,t.cull=n,i.commandList.push(t)}function updateAndQueueCommands$2(e,t,i,r,n,a,o,s){var l=t.mode===SceneMode$1.SCENE3D?e._boundingVolumes:e._boundingVolumes2D,c=(h=e.classificationType)!==ClassificationType$1.CESIUM_3D_TILE,u=h!==ClassificationType$1.TERRAIN,d=t.passes,h=e._primitive;if(d.render){var p=i.length;for(g=0;g<p;++g)_=l[boundingVolumeIndex$1(g,p)],c&&updateAndQueueRenderCommand$1(e,i[g],t,n,a,_,o),u&&updateAndQueueRenderCommand$1(e,i[g].derivedCommands.tileset,t,n,a,_,o);if(t.invertClassification)for(var f=h._commandsIgnoreShow,m=f.length,g=0;g<m;++g)_=l[g],updateAndQueueRenderCommand$1(e,f[g],t,n,a,_,o)}if(d.pick){var y,_,v=r.length;for(e._useFragmentCulling||(y=h._primitive._pickOffsets),g=0;g<v;++g)_=l[boundingVolumeIndex$1(g,v)],e._useFragmentCulling||(_=l[y[boundingVolumeIndex$1(g,v)].index]),c&&updateAndQueuePickCommand$1(e,r[g],t,n,a,_),u&&updateAndQueuePickCommand$1(e,r[g].derivedCommands.tileset,t,n,a,_)}}function MaterialProperty(){DeveloperError.throwInstantiationError()}function DynamicGeometryUpdater(e,t,i){this._primitives=t,this._orderedGroundPrimitives=i,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}GroundPrimitive.initializeTerrainHeights=function(){return ApproximateTerrainHeights.initialize()},GroundPrimitive.prototype.update=function(e){if(defined(this._primitive)||defined(this.geometryInstances))if(ApproximateTerrainHeights.initialized){var t=this,i=this._classificationPrimitiveOptions;if(!defined(this._primitive)){var r,n,a,o,s=e.mapProjection.ellipsoid,l=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=l.length,u=new Array(c);for(m=0;m<c;++m){var d=getRectangle(e,n=(r=l[m]).geometry);defined(o)?defined(d)&&Rectangle.union(o,d,o):o=Rectangle.clone(d);var h=r.id;defined(h)&&defined(d)&&(d=ApproximateTerrainHeights.getBoundingSphere(d,s),this._boundingSpheresKeys.push(h),this._boundingSpheres.push(d)),defined(a=n.constructor)&&defined(a.createShadowVolume)}setMinMaxTerrainHeights(this,o,s);var p=e.terrainExaggeration;if(this._minHeight=this._minTerrainHeight*p,this._maxHeight=this._maxTerrainHeight*p,p=GroundPrimitive._supportsMaterials(e.context),this._useFragmentCulling=p){for(var f=!0,m=0;m<c;++m)if(o=getRectangle(e,n=(r=l[m]).geometry),ShadowVolumeAppearance.shouldUseSphericalCoordinates(o)){f=!1;break}for(m=0;m<c;++m){a=(n=(r=l[m]).geometry).constructor;var g,y=getRectangle(e,n),_=n.textureCoordinateRotationPoints,v=f?ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(y,_,s,e.mapProjection,this._maxHeight):ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(y,_,s,e.mapProjection),C=r.attributes;for(g in C)C.hasOwnProperty(g)&&(v[g]=C[g]);u[m]=new GeometryInstance({geometry:a.createShadowVolume(n,getComputeMinimumHeightFunction(this),getComputeMaximumHeightFunction(this)),attributes:v,id:r.id})}}else for(m=0;m<c;++m)a=(n=(r=l[m]).geometry).constructor,u[m]=new GeometryInstance({geometry:a.createShadowVolume(n,getComputeMinimumHeightFunction(this),getComputeMaximumHeightFunction(this)),attributes:r.attributes,id:r.id});i.geometryInstances=u,i.appearance=this.appearance,i._createBoundingVolumeFunction=function(e,i){createBoundingVolume(t,e,i)},i._updateAndQueueCommandsFunction=function(e,i,r,n,a,o,s,l){updateAndQueueCommands$2(t,i,r,n,a,o,s)},this._primitive=new ClassificationPrimitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0),defined(e=e._error)?t._readyPromise.reject(e):t._readyPromise.resolve(t)}))}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}else GroundPrimitive.initializeTerrainHeights()},GroundPrimitive.prototype.getBoundingSphere=function(e){if(-1!==(e=this._boundingSpheresKeys.indexOf(e)))return this._boundingSpheres[e]},GroundPrimitive.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)},GroundPrimitive.prototype.isDestroyed=function(){return!1},GroundPrimitive.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)},GroundPrimitive._supportsMaterials=function(e){return e.depthTexture},GroundPrimitive.supportsMaterials=function(e){return GroundPrimitive._supportsMaterials(e.frameState.context)},Object.defineProperties(MaterialProperty.prototype,{isConstant:{get:DeveloperError.throwInstantiationError},definitionChanged:{get:DeveloperError.throwInstantiationError}}),MaterialProperty.prototype.getType=DeveloperError.throwInstantiationError,MaterialProperty.prototype.getValue=DeveloperError.throwInstantiationError,MaterialProperty.prototype.equals=DeveloperError.throwInstantiationError,MaterialProperty.getValue=function(e,t,i){var r;return defined(t)&&defined(r=t.getType(e))?(defined(i)&&i.type===r||(i=Material.fromType(r)),t.getValue(e,i.uniforms)):(defined(i)&&i.type===Material.ColorType||(i=Material.fromType(Material.ColorType)),Color.clone(Color.WHITE,i.uniforms.color)),i},DynamicGeometryUpdater.prototype._isHidden=function(e,t,i){return!e.isShowing||!e.isAvailable(i)||!Property.getValueOrDefault(t.show,i,!0)},DynamicGeometryUpdater.prototype._setOptions=DeveloperError.throwInstantiationError,DynamicGeometryUpdater.prototype.update=function(e){var t=this._geometryUpdater,i=t._onTerrain,r=this._primitives,n=this._orderedGroundPrimitives;i?n.remove(this._primitive):(r.removeAndDestroy(this._primitive),r.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;var a,o,s,l,c=this._entity,u=c[this._geometryUpdater._geometryPropertyName];this._setOptions(c,u,e),this._isHidden(c,u,e)||(a=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options,defined(u.fill)&&!u.fill.getValue(e)||(o=(s=t.fillMaterialProperty)instanceof ColorMaterialProperty,c=t._getIsClosed(l),c=o?new PerInstanceColorAppearance({closed:c,flat:i&&!t._supportsMaterialsforEntitiesOnTerrain}):(s=MaterialProperty.getValue(e,s,this._material),new MaterialAppearance({material:this._material=s,translucent:s.isTranslucent(),closed:c})),i?(l.vertexFormat=PerInstanceColorAppearance.VERTEX_FORMAT,this._primitive=n.add(new GroundPrimitive({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:c,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),Property.getValueOrUndefined(this._geometryUpdater.zIndex,e))):(l.vertexFormat=c.vertexFormat,l=this._geometryUpdater.createFillGeometryInstance(e),o&&(c.translucent=255!==l.attributes.color.value[3]),this._primitive=r.add(new Primitive({geometryInstances:l,appearance:c,asynchronous:!1,shadows:a})))),!i&&defined(u.outline)&&u.outline.getValue(e)&&(i=this._geometryUpdater.createOutlineGeometryInstance(e),e=Property.getValueOrDefault(u.outlineWidth,e,1),this._outlinePrimitive=r.add(new Primitive({geometryInstances:i,appearance:new PerInstanceColorAppearance({flat:!0,translucent:255!==i.attributes.color.value[3],renderState:{lineWidth:t._scene.clampLineWidth(e)}}),asynchronous:!1,shadows:a}))))},DynamicGeometryUpdater.prototype.getBoundingSphere=function(e){var t,i=this._entity,r=this._primitive,n=this._outlinePrimitive;return defined(r)&&r.show&&r.ready&&defined(t=r.getGeometryInstanceAttributes(i))&&defined(t.boundingSphere)||defined(n)&&n.show&&n.ready&&defined(t=n.getGeometryInstanceAttributes(i))&&defined(t.boundingSphere)?(BoundingSphere.clone(t.boundingSphere,e),BoundingSphereState$1.DONE):defined(r)&&!r.ready||defined(n)&&!n.ready?BoundingSphereState$1.PENDING:BoundingSphereState$1.FAILED},DynamicGeometryUpdater.prototype.isDestroyed=function(){return!1},DynamicGeometryUpdater.prototype.destroy=function(){var e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),destroyObject(this)};var PolylineShadowVolumeFS="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main(void)\n{\nfloat logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));\nvec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\nif (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\nfloat widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\nfloat distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\nfloat distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\nif (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\ngl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\nreturn;\n#else // DEBUG_SHOW_VOLUME\ndiscard;\n#endif // DEBUG_SHOW_VOLUME\n}\nvec3 alignedPlaneNormal;\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\nalignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\nalignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\ndistanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\ns = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\nfloat t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, t);\nmaterialInput.str = vec3(s, t, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\ngl_FragColor.rgb *= gl_FragColor.a;\nczm_writeDepthClamp();\n}\n",PolylineShadowVolumeMorphFS="varying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\nreturn (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\nvoid main(void)\n{\nvec4 eyeCoordinate = gl_FragCoord;\neyeCoordinate /= eyeCoordinate.w;\n#ifdef PER_INSTANCE_COLOR\ngl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\nfloat distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\nfloat distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\ndistanceFromStart = max(0.0, distanceFromStart);\ndistanceFromEnd = max(0.0, distanceFromEnd);\nfloat s = distanceFromStart / (distanceFromStart + distanceFromEnd);\ns = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\nczm_materialInput materialInput;\nmaterialInput.s = s;\nmaterialInput.st = vec2(s, v_texcoordT);\nmaterialInput.str = vec3(s, v_texcoordT, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n",PolylineShadowVolumeMorphVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\nattribute float batchId;\nvarying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nvoid main()\n{\nv_batchId = batchId;\nvec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\nvec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\nvec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nvec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nvec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec4 startPlane2D;\nvec4 startPlane3D;\nstartPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\nstartPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\nvec4 rightPlane2D;\nvec4 rightPlane3D;\nrightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nrightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nrightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\nrightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\nposRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\nposRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\nposRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nposEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nposEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\nvec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\nvec4 endPlane2D;\nvec4 endPlane3D;\nendPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\nendPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\nv_forwardDirectionEC = normalize(endEC - startEC);\nvec2 cleanTexcoordNormalization2D;\ncleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\ncleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\nvec2 cleanTexcoordNormalization3D;\ncleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\ncleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\ncleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\nv_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\nv_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\nv_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n#ifdef WIDTH_VARYING\nfloat width = czm_batchTable_width(batchId);\nfloat halfWidth = width * 0.5;\nv_width = width;\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\nfloat halfWidth = 0.5 * czm_batchTable_width(batchId);\nv_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\nvec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\nvec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nvec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\ngeodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc3D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\npositionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC;\nvec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\nabsStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\nabsEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\nplaneDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\nupOrDown = normalize(cross(rightPlane2D.xyz, planeDirection));\nnormalEC = normalize(cross(planeDirection, upOrDown));\ngeodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\ngeodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\ngeodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\npositionEc2D.xyz += geodeticSurfaceNormal;\nnormalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\nv_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\npositionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC;\ngl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",PolylineShadowVolumeVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n#ifndef COLUMBUS_VIEW_2D\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n#endif\nattribute float batchId;\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\nvec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\nvec3 ecEnd = forwardDirectionEC + ecStart;\nforwardDirectionEC = normalize(forwardDirectionEC);\nv_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nvec4 startPlaneEC;\nstartPlaneEC.xyz =  czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz =  czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\nv_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n#else // COLUMBUS_VIEW_2D\nvec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\nvec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\nvec3 ecEnd = ecStart + offset;\nvec3 forwardDirectionEC = normalize(offset);\nvec4 startPlaneEC;\nstartPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\nvec4 endPlaneEC;\nendPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\nv_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nv_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\nv_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\nv_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n#endif // COLUMBUS_VIEW_2D\nv_endEcAndStartEcX.xyz = ecEnd;\nv_endEcAndStartEcX.w = ecStart.x;\nv_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\nvec4 positionRelativeToEye = czm_computePosition();\nvec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;\nfloat absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\nfloat absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\nvec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\nvec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));\nvec3 normalEC = normalize(cross(planeDirection, upOrDown));\nupOrDown = cross(forwardDirectionEC, normalEC);\nupOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\nupOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\nupOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\npositionEC.xyz += upOrDown;\nv_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\nfloat width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\nv_width = width;\n#endif\nv_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\nv_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\nv_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\nv_endPlaneNormalEcAndBatchId.w = batchId;\nwidth = width * max(0.0, czm_metersPerPixel(positionEC));\nwidth = width / dot(normalEC, v_rightPlaneEC.xyz);\n#ifdef COLUMBUS_VIEW_2D\nnormalEC *= sign(texcoordNormalization2D.x);\n#else\nnormalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\npositionEC.xyz += width * normalEC;\ngl_Position = czm_depthClamp(czm_projection * positionEC);\n#ifdef ANGLE_VARYING\nvec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\napproxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\nv_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n",PolylineColorAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\nattribute float batchId;\nvarying vec4 v_color;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_color = color;\n}\n",PolylineCommon="void clipLineSegmentToNearPlane(\nvec3 p0,\nvec3 p1,\nout vec4 positionWC,\nout bool clipped,\nout bool culledByNearPlane,\nout vec4 clippedPositionEC)\n{\nculledByNearPlane = false;\nclipped = false;\nvec3 p0ToP1 = p1 - p0;\nfloat magnitude = length(p0ToP1);\nvec3 direction = normalize(p0ToP1);\nfloat endPoint0Distance =  czm_currentFrustum.x + p0.z;\nfloat denominator = -direction.z;\nif (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)\n{\nculledByNearPlane = true;\n}\nelse if (endPoint0Distance > 0.0)\n{\nfloat t = endPoint0Distance / denominator;\nif (t < 0.0 || t > magnitude)\n{\nculledByNearPlane = true;\n}\nelse\n{\np0 = p0 + t * direction;\np0.z = min(p0.z, -czm_currentFrustum.x);\nclipped = true;\n}\n}\nclippedPositionEC = vec4(p0, 1.0);\npositionWC = czm_eyeToWindowCoordinates(clippedPositionEC);\n}\nvec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)\n{\n#ifdef POLYLINE_DASH\nvec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);\nvec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);\nvec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);\nvec2 lineDir;\nif (usePrevious) {\nlineDir = normalize(positionWindow.xy - previousWindow.xy);\n}\nelse {\nlineDir = normalize(nextWindow.xy - positionWindow.xy);\n}\nangle = atan(lineDir.x, lineDir.y) - 1.570796327;\nangle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;\n#endif\nvec4 clippedPrevWC, clippedPrevEC;\nbool prevSegmentClipped, prevSegmentCulled;\nclipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);\nvec4 clippedNextWC, clippedNextEC;\nbool nextSegmentClipped, nextSegmentCulled;\nclipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);\nbool segmentClipped, segmentCulled;\nvec4 clippedPositionWC, clippedPositionEC;\nclipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);\nif (segmentCulled)\n{\nreturn vec4(0.0, 0.0, 0.0, 1.0);\n}\nvec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);\nvec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);\nif (prevSegmentCulled)\n{\ndirectionToPrevWC = -directionToNextWC;\n}\nelse if (nextSegmentCulled)\n{\ndirectionToNextWC = -directionToPrevWC;\n}\nvec2 thisSegmentForwardWC, otherSegmentForwardWC;\nif (usePrevious)\n{\nthisSegmentForwardWC = -directionToPrevWC;\notherSegmentForwardWC = directionToNextWC;\n}\nelse\n{\nthisSegmentForwardWC = directionToNextWC;\notherSegmentForwardWC =  -directionToPrevWC;\n}\nvec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);\nvec2 leftWC = thisSegmentLeftWC;\nfloat expandWidth = width * 0.5;\nif (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))\n{\nvec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);\nvec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;\nfloat leftSumLength = length(leftSumWC);\nleftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);\nvec2 u = -thisSegmentForwardWC;\nvec2 v = leftWC;\nfloat sinAngle = abs(u.x * v.y - u.y * v.x);\nexpandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n}\nvec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;\nreturn vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;\n}\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)\n{\nvec4 positionEC = czm_modelViewRelativeToEye * position;\nvec4 prevEC = czm_modelViewRelativeToEye * previous;\nvec4 nextEC = czm_modelViewRelativeToEye * next;\nreturn getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);\n}\n",defaultVertexShaderSource=PolylineCommon+"\n"+PolylineColorAppearanceVS,defaultFragmentShaderSource=PerInstanceFlatColorAppearanceFS;function PolylineColorAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=PolylineColorAppearance.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=defaultValue(e.vertexShaderSource,defaultVertexShaderSource),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,defaultFragmentShaderSource),this._renderState=Appearance.getDefaultRenderState(t,!1,e.renderState),this._closed=!1,this._vertexFormat=i}FeatureDetection.isInternetExplorer()||(defaultVertexShaderSource="#define CLIP_POLYLINE \n"+defaultVertexShaderSource),Object.defineProperties(PolylineColorAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),PolylineColorAppearance.VERTEX_FORMAT=VertexFormat.POSITION_ONLY,PolylineColorAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,PolylineColorAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,PolylineColorAppearance.prototype.getRenderState=Appearance.prototype.getRenderState;var PolylineMaterialAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\nattribute float batchId;\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = czm_computePosition();\nvec4 prev = czm_computePrevPosition();\nvec4 next = czm_computeNextPosition();\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\nv_width = width;\nv_st.s = st.s;\nv_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\nv_polylineAngle = angle;\n}\n",PolylineFS="#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying vec2 v_st;\nvoid main()\n{\nczm_materialInput materialInput;\nvec2 st = v_st;\nst.t = czm_readNonPerspective(st.t, gl_FragCoord.w);\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = vec3(st, 0.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#ifdef VECTOR_TILE\ngl_FragColor *= u_highlightColor;\n#endif\nczm_writeLogDepth();\n}\n",defaultVertexShaderSource$1=PolylineCommon+"\n"+PolylineMaterialAppearanceVS,defaultFragmentShaderSource$1=PolylineFS;function PolylineMaterialAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=PolylineMaterialAppearance.VERTEX_FORMAT;this.material=defined(e.material)?e.material:Material.fromType(Material.ColorType),this.translucent=t,this._vertexShaderSource=defaultValue(e.vertexShaderSource,defaultVertexShaderSource$1),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,defaultFragmentShaderSource$1),this._renderState=Appearance.getDefaultRenderState(t,!1,e.renderState),this._closed=!1,this._vertexFormat=i}function GroundPolylinePrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;var t=e.appearance;defined(t)||(t=new PolylineMaterialAppearance),this.appearance=t,this.show=defaultValue(e.show,!0),this.classificationType=defaultValue(e.classificationType,ClassificationType$1.BOTH),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=defaultValue(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:defaultValue(e.interleave,!1),releaseGeometryInstances:defaultValue(e.releaseGeometryInstances,!0),allowPicking:defaultValue(e.allowPicking,!0),asynchronous:defaultValue(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._readyPromise=when.defer(),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=getRenderState(!1),this._renderState3DTiles=getRenderState(!0),this._renderStateMorph=RenderState.fromCache({cull:{enabled:!0,face:CullFace$1.FRONT},depthTest:{enabled:!0},blending:BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}function createShaderProgram$2(e,t,i){var r=t.context,n=e._primitive,a=n._attributeLocations,o=n._batchTable.getVertexShaderCallback()(PolylineShadowVolumeVS);o=Primitive._appendShowToShader(n,o);o=Primitive._appendDistanceDisplayConditionToShader(n,o),o=Primitive._modifyShaderPosition(e,o,t.scene3DOnly);var s=n._batchTable.getVertexShaderCallback()(PolylineShadowVolumeMorphVS);s=Primitive._appendShowToShader(n,s);s=Primitive._appendDistanceDisplayConditionToShader(n,s),s=Primitive._modifyShaderPosition(e,s,t.scene3DOnly);var l=n._batchTable.getVertexShaderCallback()(PolylineShadowVolumeFS),c=["GLOBE_MINIMUM_ALTITUDE "+t.mapProjection.ellipsoid.minimumRadius.toFixed(1)],u="",d="";defined(i.material)?(-1!==(d=defined(i.material)?i.material.shaderSource:"").search(/varying\s+float\s+v_polylineAngle;/g)&&c.push("ANGLE_VARYING"),-1!==d.search(/varying\s+float\s+v_width;/g)&&c.push("WIDTH_VARYING")):u="PER_INSTANCE_COLOR",c.push(u),t=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",u]:[u],i=new ShaderSource({defines:c,sources:[o]}),u=new ShaderSource({defines:t,sources:[d,l]}),e._sp=ShaderProgram.replaceCache({context:r,shaderProgram:n._sp,vertexShaderSource:i,fragmentShaderSource:u,attributeLocations:a}),defined(i=r.shaderCache.getDerivedShaderProgram(e._sp,"2dColor"))||(o=new ShaderSource({defines:c.concat(["COLUMBUS_VIEW_2D"]),sources:[o]}),i=r.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:r,shaderProgram:e._sp2D,vertexShaderSource:o,fragmentShaderSource:u,attributeLocations:a})),e._sp2D=i,defined(i=r.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor"))||(s=new ShaderSource({defines:c.concat(["MAX_TERRAIN_HEIGHT "+ApproximateTerrainHeights._defaultMaxTerrainHeight.toFixed(1)]),sources:[s]}),l=new ShaderSource({defines:t,sources:[d,l=n._batchTable.getVertexShaderCallback()(PolylineShadowVolumeMorphFS)]}),i=r.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:r,shaderProgram:e._spMorph,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:a})),e._spMorph=i}function getRenderState(e){return RenderState.fromCache({cull:{enabled:!0},blending:BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:StencilFunction$1.EQUAL,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},backFunction:StencilFunction$1.EQUAL,backOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},reference:StencilConstants$1.CESIUM_3D_TILE_MASK,mask:StencilConstants$1.CESIUM_3D_TILE_MASK}})}function createCommands$2(e,t,i,r,n,a){var o=e._primitive,s=o._va.length;n.length=s,a.length=s;i=t instanceof PolylineColorAppearance?{}:i._uniforms;for(var l=o._batchTable.getUniformMapCallback()(i),c=0;c<s;c++){var u=o._va[c],d=n[c];defined(d)||(d=n[c]=new DrawCommand({owner:e,primitiveType:o._primitiveType})),d.vertexArray=u,d.renderState=e._renderState,d.shaderProgram=e._sp,d.uniformMap=l,d.pass=Pass$1.TERRAIN_CLASSIFICATION,d.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";var h=DrawCommand.shallowClone(d,d.derivedCommands.tileset);h.renderState=e._renderState3DTiles,h.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=h,(u=DrawCommand.shallowClone(d,d.derivedCommands.color2D)).shaderProgram=e._sp2D,d.derivedCommands.color2D=u,(u=DrawCommand.shallowClone(h,h.derivedCommands.color2D)).shaderProgram=e._sp2D,h.derivedCommands.color2D=u,(u=DrawCommand.shallowClone(d,d.derivedCommands.colorMorph)).renderState=e._renderStateMorph,u.shaderProgram=e._spMorph,u.pickId="czm_batchTable_pickColor(v_batchId)",d.derivedCommands.colorMorph=u}}function updateAndQueueCommand(e,t,i,r,n,a,o){i.mode===SceneMode$1.MORPHING?t=t.derivedCommands.colorMorph:i.mode!==SceneMode$1.SCENE3D&&(t=t.derivedCommands.color2D),t.modelMatrix=r,t.boundingVolume=a,t.cull=n,t.debugShowBoundingVolume=o,i.commandList.push(t)}function updateAndQueueCommands$3(e,t,i,r,n,a,o){var s,l=e._primitive;Primitive._updateBoundingVolumes(l,t,n),t.mode===SceneMode$1.SCENE3D?s=l._boundingSphereWC:t.mode===SceneMode$1.COLUMBUS_VIEW?s=l._boundingSphereCV:t.mode===SceneMode$1.SCENE2D&&defined(l._boundingSphere2D)?s=l._boundingSphere2D:defined(l._boundingSphereMorph)&&(s=l._boundingSphereMorph);var c=t.mode===SceneMode$1.MORPHING,u=e.classificationType,d=u!==ClassificationType$1.CESIUM_3D_TILE,h=u!==ClassificationType$1.TERRAIN&&!c;if((c=t.passes).render||c.pick&&l.allowPicking)for(var p=i.length,f=0;f<p;++f){var m=s[f];d&&updateAndQueueCommand(e,i[f],t,n,a,m,o),h&&updateAndQueueCommand(e,i[f].derivedCommands.tileset,t,n,a,m,o)}}FeatureDetection.isInternetExplorer()||(defaultVertexShaderSource$1="#define CLIP_POLYLINE \n"+defaultVertexShaderSource$1),Object.defineProperties(PolylineMaterialAppearance.prototype,{vertexShaderSource:{get:function(){var e=this._vertexShaderSource;return-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&(e="#define POLYLINE_DASH\n"+e),e}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),PolylineMaterialAppearance.VERTEX_FORMAT=VertexFormat.POSITION_AND_ST,PolylineMaterialAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,PolylineMaterialAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,PolylineMaterialAppearance.prototype.getRenderState=Appearance.prototype.getRenderState,Object.defineProperties(GroundPolylinePrimitive.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),GroundPolylinePrimitive.initializeTerrainHeights=function(){return ApproximateTerrainHeights.initialize()},GroundPolylinePrimitive.prototype.update=function(e){if(defined(this._primitive)||defined(this.geometryInstances))if(ApproximateTerrainHeights.initialized){var t=this,i=this._primitiveOptions;if(!defined(this._primitive)){for(var r=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],n=r.length,a=new Array(n),o=0;o<n;++o)if(!defined(c=r[o].attributes)||!defined(c.color)){this._hasPerInstanceColors=!1;break}for(o=0;o<n;++o){var s,l=r[o],c={},u=l.attributes;for(s in u)u.hasOwnProperty(s)&&(c[s]=u[s]);defined(c.width)||(c.width=new GeometryInstanceAttribute({componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,GroundPolylineGeometry.setProjectionAndEllipsoid(l.geometry,e.mapProjection),a[o]=new GeometryInstance({geometry:l.geometry,attributes:c,id:l.id,pickPrimitive:t})}i.geometryInstances=a,i.appearance=this.appearance,i._createShaderProgramFunction=function(e,i,r){createShaderProgram$2(t,i,r)},i._createCommandsFunction=function(e,i,r,n,a,o,s){createCommands$2(t,i,r,n,o,s)},i._updateAndQueueCommandsFunction=function(e,i,r,n,a,o,s,l){updateAndQueueCommands$3(t,i,r,n,a,o,s)},this._primitive=new Primitive(i),this._primitive.readyPromise.then((function(e){t._ready=!0,t.releaseGeometryInstances&&(t.geometryInstances=void 0),defined(e=e._error)?t._readyPromise.reject(e):t._readyPromise.resolve(t)}))}if(this.appearance instanceof PolylineColorAppearance&&!this._hasPerInstanceColors)throw new DeveloperError("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}else GroundPolylinePrimitive.initializeTerrainHeights()},GroundPolylinePrimitive.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)},GroundPolylinePrimitive.isSupported=function(e){return e.frameState.context.depthTexture},GroundPolylinePrimitive.prototype.isDestroyed=function(){return!1},GroundPolylinePrimitive.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,destroyObject(this)};var defaultRepeat=new Cartesian2(1,1),defaultTransparent=!1,defaultColor$1=Color.WHITE;function ImageMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}function createMaterialProperty(e){if(e instanceof Color)return new ColorMaterialProperty(e);if("string"==typeof e||e instanceof Resource||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){var t=new ImageMaterialProperty;return t.image=e,t}}function createMaterialPropertyDescriptor(e,t){return createPropertyDescriptor(e,t,createMaterialProperty)}function BoxGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PositionProperty(){DeveloperError.throwInstantiationError()}Object.defineProperties(ImageMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._image)&&Property.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:createPropertyDescriptor("image"),repeat:createPropertyDescriptor("repeat"),color:createPropertyDescriptor("color"),transparent:createPropertyDescriptor("transparent")}),ImageMaterialProperty.prototype.getType=function(e){return"Image"},ImageMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.image=Property.getValueOrUndefined(this._image,e),t.repeat=Property.getValueOrClonedDefault(this._repeat,e,defaultRepeat,t.repeat),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$1,t.color),Property.getValueOrDefault(this._transparent,e,defaultTransparent)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},ImageMaterialProperty.prototype.equals=function(e){return this===e||e instanceof ImageMaterialProperty&&Property.equals(this._image,e._image)&&Property.equals(this._repeat,e._repeat)&&Property.equals(this._color,e._color)&&Property.equals(this._transparent,e._transparent)},Object.defineProperties(BoxGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),dimensions:createPropertyDescriptor("dimensions"),heightReference:createPropertyDescriptor("heightReference"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),BoxGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new BoxGraphics(this)},BoxGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.dimensions=defaultValue(this.dimensions,e.dimensions),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(PositionProperty.prototype,{isConstant:{get:DeveloperError.throwInstantiationError},definitionChanged:{get:DeveloperError.throwInstantiationError},referenceFrame:{get:DeveloperError.throwInstantiationError}}),PositionProperty.prototype.getValue=DeveloperError.throwInstantiationError,PositionProperty.prototype.getValueInReferenceFrame=DeveloperError.throwInstantiationError,PositionProperty.prototype.equals=DeveloperError.throwInstantiationError;var scratchMatrix3=new Matrix3;function ConstantPositionProperty(e,t){this._definitionChanged=new Event,this._value=Cartesian3.clone(e),this._referenceFrame=defaultValue(t,ReferenceFrame$1.FIXED)}function CorridorGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function createRawProperty(e){return e}function createRawPropertyDescriptor(e,t){return createPropertyDescriptor(e,t,createRawProperty)}function CylinderGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function EllipseGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function EllipsoidGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function LabelGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}PositionProperty.convertToReferenceFrame=function(e,t,i,r,n){return defined(t)?(defined(n)||(n=new Cartesian3),i===r?Cartesian3.clone(t,n):(defined(r=Transforms.computeIcrfToFixedMatrix(e,scratchMatrix3))||(r=Transforms.computeTemeToPseudoFixedMatrix(e,scratchMatrix3)),i===ReferenceFrame$1.INERTIAL?Matrix3.multiplyByVector(r,t,n):i===ReferenceFrame$1.FIXED?Matrix3.multiplyByVector(Matrix3.transpose(r,scratchMatrix3),t,n):void 0)):t},Object.defineProperties(ConstantPositionProperty.prototype,{isConstant:{get:function(){return!defined(this._value)||this._referenceFrame===ReferenceFrame$1.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),ConstantPositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},ConstantPositionProperty.prototype.setValue=function(e,t){var i=!1;Cartesian3.equals(this._value,e)||(i=!0,this._value=Cartesian3.clone(e)),defined(t)&&this._referenceFrame!==t&&(i=!0,this._referenceFrame=t),i&&this._definitionChanged.raiseEvent(this)},ConstantPositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){return PositionProperty.convertToReferenceFrame(e,this._value,this._referenceFrame,t,i)},ConstantPositionProperty.prototype.equals=function(e){return this===e||e instanceof ConstantPositionProperty&&Cartesian3.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame},Object.defineProperties(CorridorGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),positions:createPropertyDescriptor("positions"),width:createPropertyDescriptor("width"),height:createPropertyDescriptor("height"),heightReference:createPropertyDescriptor("heightReference"),extrudedHeight:createPropertyDescriptor("extrudedHeight"),extrudedHeightReference:createPropertyDescriptor("extrudedHeightReference"),cornerType:createPropertyDescriptor("cornerType"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),CorridorGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new CorridorGraphics(this)},CorridorGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.positions=defaultValue(this.positions,e.positions),this.width=defaultValue(this.width,e.width),this.height=defaultValue(this.height,e.height),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.extrudedHeight=defaultValue(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=defaultValue(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=defaultValue(this.cornerType,e.cornerType),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(CylinderGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),length:createPropertyDescriptor("length"),topRadius:createPropertyDescriptor("topRadius"),bottomRadius:createPropertyDescriptor("bottomRadius"),heightReference:createPropertyDescriptor("heightReference"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),numberOfVerticalLines:createPropertyDescriptor("numberOfVerticalLines"),slices:createPropertyDescriptor("slices"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),CylinderGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new CylinderGraphics(this)},CylinderGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.length=defaultValue(this.length,e.length),this.topRadius=defaultValue(this.topRadius,e.topRadius),this.bottomRadius=defaultValue(this.bottomRadius,e.bottomRadius),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=defaultValue(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=defaultValue(this.slices,e.slices),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(EllipseGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),semiMajorAxis:createPropertyDescriptor("semiMajorAxis"),semiMinorAxis:createPropertyDescriptor("semiMinorAxis"),height:createPropertyDescriptor("height"),heightReference:createPropertyDescriptor("heightReference"),extrudedHeight:createPropertyDescriptor("extrudedHeight"),extrudedHeightReference:createPropertyDescriptor("extrudedHeightReference"),rotation:createPropertyDescriptor("rotation"),stRotation:createPropertyDescriptor("stRotation"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),numberOfVerticalLines:createPropertyDescriptor("numberOfVerticalLines"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),EllipseGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new EllipseGraphics(this)},EllipseGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.semiMajorAxis=defaultValue(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=defaultValue(this.semiMinorAxis,e.semiMinorAxis),this.height=defaultValue(this.height,e.height),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.extrudedHeight=defaultValue(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=defaultValue(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=defaultValue(this.rotation,e.rotation),this.stRotation=defaultValue(this.stRotation,e.stRotation),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=defaultValue(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(EllipsoidGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),radii:createPropertyDescriptor("radii"),innerRadii:createPropertyDescriptor("innerRadii"),minimumClock:createPropertyDescriptor("minimumClock"),maximumClock:createPropertyDescriptor("maximumClock"),minimumCone:createPropertyDescriptor("minimumCone"),maximumCone:createPropertyDescriptor("maximumCone"),heightReference:createPropertyDescriptor("heightReference"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),stackPartitions:createPropertyDescriptor("stackPartitions"),slicePartitions:createPropertyDescriptor("slicePartitions"),subdivisions:createPropertyDescriptor("subdivisions"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),EllipsoidGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new EllipsoidGraphics(this)},EllipsoidGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.radii=defaultValue(this.radii,e.radii),this.innerRadii=defaultValue(this.innerRadii,e.innerRadii),this.minimumClock=defaultValue(this.minimumClock,e.minimumClock),this.maximumClock=defaultValue(this.maximumClock,e.maximumClock),this.minimumCone=defaultValue(this.minimumCone,e.minimumCone),this.maximumCone=defaultValue(this.maximumCone,e.maximumCone),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.stackPartitions=defaultValue(this.stackPartitions,e.stackPartitions),this.slicePartitions=defaultValue(this.slicePartitions,e.slicePartitions),this.subdivisions=defaultValue(this.subdivisions,e.subdivisions),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(LabelGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),text:createPropertyDescriptor("text"),font:createPropertyDescriptor("font"),style:createPropertyDescriptor("style"),scale:createPropertyDescriptor("scale"),showBackground:createPropertyDescriptor("showBackground"),backgroundColor:createPropertyDescriptor("backgroundColor"),backgroundPadding:createPropertyDescriptor("backgroundPadding"),pixelOffset:createPropertyDescriptor("pixelOffset"),eyeOffset:createPropertyDescriptor("eyeOffset"),horizontalOrigin:createPropertyDescriptor("horizontalOrigin"),verticalOrigin:createPropertyDescriptor("verticalOrigin"),heightReference:createPropertyDescriptor("heightReference"),fillColor:createPropertyDescriptor("fillColor"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),translucencyByDistance:createPropertyDescriptor("translucencyByDistance"),pixelOffsetScaleByDistance:createPropertyDescriptor("pixelOffsetScaleByDistance"),scaleByDistance:createPropertyDescriptor("scaleByDistance"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),disableDepthTestDistance:createPropertyDescriptor("disableDepthTestDistance")}),LabelGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new LabelGraphics(this)},LabelGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.text=defaultValue(this.text,e.text),this.font=defaultValue(this.font,e.font),this.style=defaultValue(this.style,e.style),this.scale=defaultValue(this.scale,e.scale),this.showBackground=defaultValue(this.showBackground,e.showBackground),this.backgroundColor=defaultValue(this.backgroundColor,e.backgroundColor),this.backgroundPadding=defaultValue(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=defaultValue(this.pixelOffset,e.pixelOffset),this.eyeOffset=defaultValue(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=defaultValue(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=defaultValue(this.verticalOrigin,e.verticalOrigin),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.fillColor=defaultValue(this.fillColor,e.fillColor),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=defaultValue(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=defaultValue(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=defaultValue(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=defaultValue(this.disableDepthTestDistance,e.disableDepthTestDistance)};var defaultNodeTransformation=new TranslationRotationScale;function NodeTransformationProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale}function PropertyBag(e,t){this._propertyNames=[],this._definitionChanged=new Event,defined(e)&&this.merge(e,t)}function createConstantProperty$1(e){return new ConstantProperty(e)}function propertiesEqual(e,t){var i=e._propertyNames,r=t._propertyNames,n=i.length;if(n!==r.length)return!1;for(var a=0;a<n;++a){var o=i[a];if(-1===r.indexOf(o))return!1;if(!Property.equals(e[o],t[o]))return!1}return!0}function createNodeTransformationProperty(e){return new NodeTransformationProperty(e)}function createNodeTransformationPropertyBag(e){return new PropertyBag(e,createNodeTransformationProperty)}function createArticulationStagePropertyBag(e){return new PropertyBag(e)}function ModelGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._clampAnimations=void 0,this._clampAnimationsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._articulations=void 0,this._articulationsSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function Cesium3DTilesetGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PathGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PlaneGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PointGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function createPolygonHierarchyProperty(e){return Array.isArray(e)&&(e=new PolygonHierarchy(e)),new ConstantProperty(e)}function PolygonGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PolylineGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function PolylineVolumeGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function RectangleGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}function WallGraphics(e){this._definitionChanged=new Event,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(defaultValue(e,defaultValue.EMPTY_OBJECT))}Object.defineProperties(NodeTransformationProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._translation)&&Property.isConstant(this._rotation)&&Property.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:createPropertyDescriptor("translation"),rotation:createPropertyDescriptor("rotation"),scale:createPropertyDescriptor("scale")}),NodeTransformationProperty.prototype.getValue=function(e,t){return defined(t)||(t=new TranslationRotationScale),t.translation=Property.getValueOrClonedDefault(this._translation,e,defaultNodeTransformation.translation,t.translation),t.rotation=Property.getValueOrClonedDefault(this._rotation,e,defaultNodeTransformation.rotation,t.rotation),t.scale=Property.getValueOrClonedDefault(this._scale,e,defaultNodeTransformation.scale,t.scale),t},NodeTransformationProperty.prototype.equals=function(e){return this===e||e instanceof NodeTransformationProperty&&Property.equals(this._translation,e._translation)&&Property.equals(this._rotation,e._rotation)&&Property.equals(this._scale,e._scale)},Object.defineProperties(PropertyBag.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){for(var e=this._propertyNames,t=0,i=e.length;t<i;t++)if(!Property.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),PropertyBag.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},PropertyBag.prototype.addProperty=function(e,t,i){this._propertyNames.push(e),Object.defineProperty(this,e,createPropertyDescriptor(e,!0,defaultValue(i,createConstantProperty$1))),defined(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)},PropertyBag.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);this._propertyNames.splice(t,1),delete this[e],this._definitionChanged.raiseEvent(this)},PropertyBag.prototype.getValue=function(e,t){defined(t)||(t={});for(var i=this._propertyNames,r=0,n=i.length;r<n;r++){var a=i[r];t[a]=Property.getValueOrUndefined(this[a],e,t[a])}return t},PropertyBag.prototype.merge=function(e,t){for(var i=this._propertyNames,r=defined(e._propertyNames)?e._propertyNames:Object.keys(e),n=0,a=r.length;n<a;n++){var o=r[n],s=this[o],l=e[o];void 0===s&&-1===i.indexOf(o)&&this.addProperty(o,void 0,t),void 0!==l&&(void 0!==s?defined(s)&&defined(s.merge)&&s.merge(l):defined(l)&&defined(l.merge)&&defined(l.clone)?this[o]=l.clone():this[o]=l)}},PropertyBag.prototype.equals=function(e){return this===e||e instanceof PropertyBag&&propertiesEqual(this,e)},Object.defineProperties(ModelGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),uri:createPropertyDescriptor("uri"),scale:createPropertyDescriptor("scale"),minimumPixelSize:createPropertyDescriptor("minimumPixelSize"),maximumScale:createPropertyDescriptor("maximumScale"),incrementallyLoadTextures:createPropertyDescriptor("incrementallyLoadTextures"),runAnimations:createPropertyDescriptor("runAnimations"),clampAnimations:createPropertyDescriptor("clampAnimations"),shadows:createPropertyDescriptor("shadows"),heightReference:createPropertyDescriptor("heightReference"),silhouetteColor:createPropertyDescriptor("silhouetteColor"),silhouetteSize:createPropertyDescriptor("silhouetteSize"),color:createPropertyDescriptor("color"),colorBlendMode:createPropertyDescriptor("colorBlendMode"),colorBlendAmount:createPropertyDescriptor("colorBlendAmount"),imageBasedLightingFactor:createPropertyDescriptor("imageBasedLightingFactor"),lightColor:createPropertyDescriptor("lightColor"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),nodeTransformations:createPropertyDescriptor("nodeTransformations",void 0,createNodeTransformationPropertyBag),articulations:createPropertyDescriptor("articulations",void 0,createArticulationStagePropertyBag),clippingPlanes:createPropertyDescriptor("clippingPlanes")}),ModelGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.uri=this.uri,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.heightReference=this._heightReference,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e.distanceDisplayCondition=this.distanceDisplayCondition,e.nodeTransformations=this.nodeTransformations,e.articulations=this.articulations,e.clippingPlanes=this.clippingPlanes,e):new ModelGraphics(this)},ModelGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.uri=defaultValue(this.uri,e.uri),this.scale=defaultValue(this.scale,e.scale),this.minimumPixelSize=defaultValue(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=defaultValue(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=defaultValue(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.runAnimations=defaultValue(this.runAnimations,e.runAnimations),this.clampAnimations=defaultValue(this.clampAnimations,e.clampAnimations),this.shadows=defaultValue(this.shadows,e.shadows),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.silhouetteColor=defaultValue(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=defaultValue(this.silhouetteSize,e.silhouetteSize),this.color=defaultValue(this.color,e.color),this.colorBlendMode=defaultValue(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=defaultValue(this.colorBlendAmount,e.colorBlendAmount),this.imageBasedLightingFactor=defaultValue(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=defaultValue(this.lightColor,e.lightColor),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.clippingPlanes=defaultValue(this.clippingPlanes,e.clippingPlanes);var t,i=e.nodeTransformations;defined(i)&&(defined(t=this.nodeTransformations)?t.merge(i):this.nodeTransformations=new PropertyBag(i,createNodeTransformationProperty)),defined(i=e.articulations)&&(defined(e=this.articulations)?e.merge(i):this.articulations=new PropertyBag(i))},Object.defineProperties(Cesium3DTilesetGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),uri:createPropertyDescriptor("uri"),maximumScreenSpaceError:createPropertyDescriptor("maximumScreenSpaceError")}),Cesium3DTilesetGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new Cesium3DTilesetGraphics(this)},Cesium3DTilesetGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.uri=defaultValue(this.uri,e.uri),this.maximumScreenSpaceError=defaultValue(this.maximumScreenSpaceError,e.maximumScreenSpaceError)},Object.defineProperties(PathGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),leadTime:createPropertyDescriptor("leadTime"),trailTime:createPropertyDescriptor("trailTime"),width:createPropertyDescriptor("width"),resolution:createPropertyDescriptor("resolution"),material:createMaterialPropertyDescriptor("material"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),PathGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new PathGraphics(this)},PathGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.leadTime=defaultValue(this.leadTime,e.leadTime),this.trailTime=defaultValue(this.trailTime,e.trailTime),this.width=defaultValue(this.width,e.width),this.resolution=defaultValue(this.resolution,e.resolution),this.material=defaultValue(this.material,e.material),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(PlaneGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),plane:createPropertyDescriptor("plane"),dimensions:createPropertyDescriptor("dimensions"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),PlaneGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new PlaneGraphics(this)},PlaneGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.plane=defaultValue(this.plane,e.plane),this.dimensions=defaultValue(this.dimensions,e.dimensions),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(PointGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),pixelSize:createPropertyDescriptor("pixelSize"),heightReference:createPropertyDescriptor("heightReference"),color:createPropertyDescriptor("color"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),scaleByDistance:createPropertyDescriptor("scaleByDistance"),translucencyByDistance:createPropertyDescriptor("translucencyByDistance"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),disableDepthTestDistance:createPropertyDescriptor("disableDepthTestDistance")}),PointGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new PointGraphics(this)},PointGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.pixelSize=defaultValue(this.pixelSize,e.pixelSize),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.color=defaultValue(this.color,e.color),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.scaleByDistance=defaultValue(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=defaultValue(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=defaultValue(this.disableDepthTestDistance,e.disableDepthTestDistance)},Object.defineProperties(PolygonGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),hierarchy:createPropertyDescriptor("hierarchy",void 0,createPolygonHierarchyProperty),height:createPropertyDescriptor("height"),heightReference:createPropertyDescriptor("heightReference"),extrudedHeight:createPropertyDescriptor("extrudedHeight"),extrudedHeightReference:createPropertyDescriptor("extrudedHeightReference"),stRotation:createPropertyDescriptor("stRotation"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),perPositionHeight:createPropertyDescriptor("perPositionHeight"),closeTop:createPropertyDescriptor("closeTop"),closeBottom:createPropertyDescriptor("closeBottom"),arcType:createPropertyDescriptor("arcType"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),PolygonGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new PolygonGraphics(this)},PolygonGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.hierarchy=defaultValue(this.hierarchy,e.hierarchy),this.height=defaultValue(this.height,e.height),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.extrudedHeight=defaultValue(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=defaultValue(this.extrudedHeightReference,e.extrudedHeightReference),this.stRotation=defaultValue(this.stRotation,e.stRotation),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.perPositionHeight=defaultValue(this.perPositionHeight,e.perPositionHeight),this.closeTop=defaultValue(this.closeTop,e.closeTop),this.closeBottom=defaultValue(this.closeBottom,e.closeBottom),this.arcType=defaultValue(this.arcType,e.arcType),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(PolylineGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),positions:createPropertyDescriptor("positions"),width:createPropertyDescriptor("width"),granularity:createPropertyDescriptor("granularity"),material:createMaterialPropertyDescriptor("material"),depthFailMaterial:createMaterialPropertyDescriptor("depthFailMaterial"),arcType:createPropertyDescriptor("arcType"),clampToGround:createPropertyDescriptor("clampToGround"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),PolylineGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new PolylineGraphics(this)},PolylineGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.positions=defaultValue(this.positions,e.positions),this.width=defaultValue(this.width,e.width),this.granularity=defaultValue(this.granularity,e.granularity),this.material=defaultValue(this.material,e.material),this.depthFailMaterial=defaultValue(this.depthFailMaterial,e.depthFailMaterial),this.arcType=defaultValue(this.arcType,e.arcType),this.clampToGround=defaultValue(this.clampToGround,e.clampToGround),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(PolylineVolumeGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),positions:createPropertyDescriptor("positions"),shape:createPropertyDescriptor("shape"),cornerType:createPropertyDescriptor("cornerType"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),PolylineVolumeGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.positions=this.positions,e.shape=this.shape,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new PolylineVolumeGraphics(this)},PolylineVolumeGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.positions=defaultValue(this.positions,e.positions),this.shape=defaultValue(this.shape,e.shape),this.cornerType=defaultValue(this.cornerType,e.cornerType),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)},Object.defineProperties(RectangleGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),coordinates:createPropertyDescriptor("coordinates"),height:createPropertyDescriptor("height"),heightReference:createPropertyDescriptor("heightReference"),extrudedHeight:createPropertyDescriptor("extrudedHeight"),extrudedHeightReference:createPropertyDescriptor("extrudedHeightReference"),rotation:createPropertyDescriptor("rotation"),stRotation:createPropertyDescriptor("stRotation"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition"),classificationType:createPropertyDescriptor("classificationType"),zIndex:createPropertyDescriptor("zIndex")}),RectangleGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new RectangleGraphics(this)},RectangleGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.coordinates=defaultValue(this.coordinates,e.coordinates),this.height=defaultValue(this.height,e.height),this.heightReference=defaultValue(this.heightReference,e.heightReference),this.extrudedHeight=defaultValue(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=defaultValue(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=defaultValue(this.rotation,e.rotation),this.stRotation=defaultValue(this.stRotation,e.stRotation),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=defaultValue(this.classificationType,e.classificationType),this.zIndex=defaultValue(this.zIndex,e.zIndex)},Object.defineProperties(WallGraphics.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:createPropertyDescriptor("show"),positions:createPropertyDescriptor("positions"),minimumHeights:createPropertyDescriptor("minimumHeights"),maximumHeights:createPropertyDescriptor("maximumHeights"),granularity:createPropertyDescriptor("granularity"),fill:createPropertyDescriptor("fill"),material:createMaterialPropertyDescriptor("material"),outline:createPropertyDescriptor("outline"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth"),shadows:createPropertyDescriptor("shadows"),distanceDisplayCondition:createPropertyDescriptor("distanceDisplayCondition")}),WallGraphics.prototype.clone=function(e){return defined(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new WallGraphics(this)},WallGraphics.prototype.merge=function(e){this.show=defaultValue(this.show,e.show),this.positions=defaultValue(this.positions,e.positions),this.minimumHeights=defaultValue(this.minimumHeights,e.minimumHeights),this.maximumHeights=defaultValue(this.maximumHeights,e.maximumHeights),this.granularity=defaultValue(this.granularity,e.granularity),this.fill=defaultValue(this.fill,e.fill),this.material=defaultValue(this.material,e.material),this.outline=defaultValue(this.outline,e.outline),this.outlineColor=defaultValue(this.outlineColor,e.outlineColor),this.outlineWidth=defaultValue(this.outlineWidth,e.outlineWidth),this.shadows=defaultValue(this.shadows,e.shadows),this.distanceDisplayCondition=defaultValue(this.distanceDisplayCondition,e.distanceDisplayCondition)};var cartoScratch$1=new Cartographic;function createConstantPositionProperty(e){return new ConstantPositionProperty(e)}function createPositionPropertyDescriptor(e){return createPropertyDescriptor(e,void 0,createConstantPositionProperty)}function createPropertyTypeDescriptor(e,t){return createPropertyDescriptor(e,void 0,(function(e){return e instanceof t?e:new t(e)}))}function Entity(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).id;defined(t)||(t=createGuid()),this._availability=void 0,this._id=t,this._definitionChanged=new Event,this._name=e.name,this._show=defaultValue(e.show,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function updateShow(e,t,i){for(var r=t.length,n=0;n<r;n++){var a=t[n],o=a._show;(!i&&o)!==(i&&o)&&updateShow(a,a._children,i)}e._definitionChanged.raiseEvent(e,"isShowing",i,!i)}Object.defineProperties(Entity.prototype,{availability:createRawPropertyDescriptor("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:createRawPropertyDescriptor("name"),show:{get:function(){return this._show},set:function(e){var t;e!==this._show&&(t=this.isShowing,this._show=e,t!==(t=this.isShowing)&&updateShow(this,this._children,t),this._definitionChanged.raiseEvent(this,"show",e,!e))}},isShowing:{get:function(){return this._show&&(!defined(this.entityCollection)||this.entityCollection.show)&&(!defined(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){var t,i,r=this._parent;r!==e&&(i=this.isShowing,defined(r)&&(t=r._children.indexOf(this),r._children.splice(t,1)),defined(this._parent=e)&&e._children.push(this),i!==(i=this.isShowing)&&updateShow(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,r))}},propertyNames:{get:function(){return this._propertyNames}},billboard:createPropertyTypeDescriptor("billboard",BillboardGraphics),box:createPropertyTypeDescriptor("box",BoxGraphics),corridor:createPropertyTypeDescriptor("corridor",CorridorGraphics),cylinder:createPropertyTypeDescriptor("cylinder",CylinderGraphics),description:createPropertyDescriptor("description"),ellipse:createPropertyTypeDescriptor("ellipse",EllipseGraphics),ellipsoid:createPropertyTypeDescriptor("ellipsoid",EllipsoidGraphics),label:createPropertyTypeDescriptor("label",LabelGraphics),model:createPropertyTypeDescriptor("model",ModelGraphics),tileset:createPropertyTypeDescriptor("tileset",Cesium3DTilesetGraphics),orientation:createPropertyDescriptor("orientation"),path:createPropertyTypeDescriptor("path",PathGraphics),plane:createPropertyTypeDescriptor("plane",PlaneGraphics),point:createPropertyTypeDescriptor("point",PointGraphics),polygon:createPropertyTypeDescriptor("polygon",PolygonGraphics),polyline:createPropertyTypeDescriptor("polyline",PolylineGraphics),polylineVolume:createPropertyTypeDescriptor("polylineVolume",PolylineVolumeGraphics),properties:createPropertyTypeDescriptor("properties",PropertyBag),position:createPositionPropertyDescriptor("position"),rectangle:createPropertyTypeDescriptor("rectangle",RectangleGraphics),viewFrom:createPropertyDescriptor("viewFrom"),wall:createPropertyTypeDescriptor("wall",WallGraphics)}),Entity.prototype.isAvailable=function(e){var t=this._availability;return!defined(t)||t.contains(e)},Entity.prototype.addProperty=function(e){this._propertyNames.push(e),Object.defineProperty(this,e,createRawPropertyDescriptor(e,!0))},Entity.prototype.removeProperty=function(e){var t=this._propertyNames.indexOf(e);this._propertyNames.splice(t,1),delete this[e]},Entity.prototype.merge=function(e){this.name=defaultValue(this.name,e.name),this.availability=defaultValue(this.availability,e.availability);for(var t=this._propertyNames,i=defined(e._propertyNames)?e._propertyNames:Object.keys(e),r=i.length,n=0;n<r;n++){var a,o,s=i[n];"parent"!==s&&"name"!==s&&"availability"!==s&&(a=this[s],o=e[s],defined(a)||-1!==t.indexOf(s)||this.addProperty(s),defined(o)&&(defined(a)?defined(a.merge)&&a.merge(o):defined(o.merge)&&defined(o.clone)?this[s]=o.clone():this[s]=o))}};var matrix3Scratch$1=new Matrix3,positionScratch$5=new Cartesian3,orientationScratch=new Quaternion;Entity.prototype.computeModelMatrix=function(e,t){var i=Property.getValueOrUndefined(this._position,e,positionScratch$5);if(defined(i))return defined(e=Property.getValueOrUndefined(this._orientation,e,orientationScratch))?Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(e,matrix3Scratch$1),i,t):Transforms.eastNorthUpToFixedFrame(i,void 0,t)},Entity.prototype.computeModelMatrixForHeightReference=function(e,t,i,r,n){var a=Property.getValueOrDefault(t,e,HeightReference$1.NONE),o=Property.getValueOrUndefined(this._position,e,positionScratch$5);return a===HeightReference$1.NONE||!defined(o)||Cartesian3.equalsEpsilon(o,Cartesian3.ZERO,CesiumMath.EPSILON8)?this.computeModelMatrix(e,n):(t=r.cartesianToCartographic(o,cartoScratch$1),a===HeightReference$1.CLAMP_TO_GROUND?t.height=i:t.height+=i,o=r.cartographicToCartesian(t,o),defined(e=Property.getValueOrUndefined(this._orientation,e,orientationScratch))?Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(e,matrix3Scratch$1),o,n):Transforms.eastNorthUpToFixedFrame(o,void 0,n))},Entity.supportsMaterialsforEntitiesOnTerrain=function(e){return GroundPrimitive.supportsMaterials(e)},Entity.supportsPolylinesOnTerrain=function(e){return GroundPolylinePrimitive.isSupported(e)};var defaultMaterial=new ColorMaterialProperty(Color.WHITE),defaultShow=new ConstantProperty(!0),defaultFill=new ConstantProperty(!0),defaultOutline=new ConstantProperty(!1),defaultOutlineColor=new ConstantProperty(Color.BLACK),defaultShadows=new ConstantProperty(ShadowMode$1.DISABLED),defaultDistanceDisplayCondition=new ConstantProperty(new DistanceDisplayCondition),defaultClassificationType=new ConstantProperty(ClassificationType$1.BOTH);function GeometryUpdater(e){var t=e.entity,i=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new Event,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=i,this._id=i+"-"+t.id,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=Entity.supportsMaterialsforEntitiesOnTerrain(e.scene)}function CallbackProperty(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new Event,this.setCallback(e,t)}Object.defineProperties(GeometryUpdater.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!defined(this._entity.availability)&&Property.isConstant(this._showProperty)&&Property.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!defined(this._entity.availability)&&Property.isConstant(this._showProperty)&&Property.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),GeometryUpdater.prototype.isOutlineVisible=function(e){var t=this._entity;return defaultValue(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e),!1)},GeometryUpdater.prototype.isFilled=function(e){var t=this._entity;return defaultValue(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e),!1)},GeometryUpdater.prototype.createFillGeometryInstance=DeveloperError.throwInstantiationError,GeometryUpdater.prototype.createOutlineGeometryInstance=DeveloperError.throwInstantiationError,GeometryUpdater.prototype.isDestroyed=function(){return!1},GeometryUpdater.prototype.destroy=function(){destroyObject(this)},GeometryUpdater.prototype._isHidden=function(e,t){return defined(t=t.show)&&t.isConstant&&!t.getValue(Iso8601.MINIMUM_VALUE)},GeometryUpdater.prototype._isOnTerrain=function(e,t){return!1},GeometryUpdater.prototype._getIsClosed=function(e){return!0},GeometryUpdater.prototype._isDynamic=DeveloperError.throwInstantiationError,GeometryUpdater.prototype._setStaticOptions=DeveloperError.throwInstantiationError,GeometryUpdater.prototype._onEntityPropertyChanged=function(e,t,i,r){var n,a,o,s;-1!==this._observedPropertyNames.indexOf(t)&&(defined(s=this._entity[this._geometryPropertyName])?(o=!defined(n=s.fill)||!n.isConstant||n.getValue(Iso8601.MINIMUM_VALUE),(t=defined(a=s.outline))&&a.isConstant&&(t=a.getValue(Iso8601.MINIMUM_VALUE)),o||t?(a=s.show,this._isHidden(e,s)?(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)):(this._materialProperty=defaultValue(s.material,defaultMaterial),this._fillProperty=defaultValue(n,defaultFill),this._showProperty=defaultValue(a,defaultShow),this._showOutlineProperty=defaultValue(s.outline,defaultOutline),this._outlineColorProperty=t?defaultValue(s.outlineColor,defaultOutlineColor):void 0,this._shadowsProperty=defaultValue(s.shadows,defaultShadows),this._distanceDisplayConditionProperty=defaultValue(s.distanceDisplayCondition,defaultDistanceDisplayCondition),this._classificationTypeProperty=defaultValue(s.classificationType,defaultClassificationType),this._fillEnabled=o,o=this._isOnTerrain(e,s)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof ColorMaterialProperty),t&&o&&(oneTimeWarning(oneTimeWarning.geometryOutlines),t=!1),this._onTerrain=o,this._outlineEnabled=t,this._isDynamic(e,s)?this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this)):(this._setStaticOptions(e,s),this._isClosed=this._getIsClosed(this._options),s=s.outlineWidth,this._outlineWidth=defined(s)?s.getValue(Iso8601.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)))):(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this))):(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)))},GeometryUpdater.prototype.createDynamicUpdater=function(e,t){return new this.constructor.DynamicGeometryUpdater(this,e,t)},Object.defineProperties(CallbackProperty.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),CallbackProperty.prototype.getValue=function(e,t){return this._callback(e,t)},CallbackProperty.prototype.setCallback=function(e,t){var i=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,i&&this._definitionChanged.raiseEvent(this)},CallbackProperty.prototype.equals=function(e){return this===e||e instanceof CallbackProperty&&this._callback===e._callback&&this._isConstant===e._isConstant};var scratchPosition$4=new Cartesian3,scratchCarto=new Cartographic;function TerrainOffsetProperty(e,t,i,r){this._scene=e,this._heightReference=i,this._extrudedHeightReference=r,this._positionProperty=t,this._position=new Cartesian3,this._cartographicPosition=new Cartographic,this._normal=new Cartesian3,this._definitionChanged=new Event,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;var n=this;if(defined(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener((function(){n._updateClamping()})),this._removeModeListener=e.morphComplete.addEventListener((function(){n._updateClamping()}))),t.isConstant){if(!defined(t=t.getValue(Iso8601.MINIMUM_VALUE,scratchPosition$4))||Cartesian3.equals(t,Cartesian3.ZERO)||!defined(e.globe))return;this._position=Cartesian3.clone(t,this._position),this._updateClamping(),this._normal=e.globe.ellipsoid.geodeticSurfaceNormal(t,this._normal)}}function heightReferenceOnEntityPropertyChanged(e,t,i,r){GeometryUpdater.prototype._onEntityPropertyChanged.call(this,e,t,i,r),-1===this._observedPropertyNames.indexOf(t)||defined(r=this._entity[this._geometryPropertyName])&&(defined(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),defined(t=r.heightReference)&&(r=new CallbackProperty(this._computeCenter.bind(this),!this._dynamic),this._terrainOffsetProperty=new TerrainOffsetProperty(this._scene,r,t)))}Object.defineProperties(TerrainOffsetProperty.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),TerrainOffsetProperty.prototype._updateClamping=function(){defined(this._removeCallbackFunc)&&this._removeCallbackFunc();var e,t,i,r=this._scene,n=r.globe,a=this._position;defined(n)&&!Cartesian3.equals(a,Cartesian3.ZERO)?(e=n.ellipsoid,t=n._surface,i=this,a=e.cartesianToCartographic(a,this._cartographicPosition),defined(n=n.getHeight(a))?this._terrainHeight=n:this._terrainHeight=0,this._removeCallbackFunc=t.updateHeight(a,(function(t){var n;r.mode===SceneMode$1.SCENE3D?(n=e.cartesianToCartographic(t,scratchCarto),i._terrainHeight=n.height):i._terrainHeight=t.x,i.definitionChanged.raiseEvent()}))):this._terrainHeight=0},TerrainOffsetProperty.prototype.getValue=function(e,t){var i=Property.getValueOrDefault(this._heightReference,e,HeightReference$1.NONE),r=Property.getValueOrDefault(this._extrudedHeightReference,e,HeightReference$1.NONE);return i===HeightReference$1.NONE&&r!==HeightReference$1.RELATIVE_TO_GROUND?(this._position=Cartesian3.clone(Cartesian3.ZERO,this._position),Cartesian3.clone(Cartesian3.ZERO,t)):this._positionProperty.isConstant?Cartesian3.multiplyByScalar(this._normal,this._terrainHeight,t):(r=this._scene,defined(e=this._positionProperty.getValue(e,scratchPosition$4))&&!Cartesian3.equals(e,Cartesian3.ZERO)&&defined(r.globe)?Cartesian3.equalsEpsilon(this._position,e,CesiumMath.EPSILON10)?Cartesian3.multiplyByScalar(this._normal,this._terrainHeight,t):(this._position=Cartesian3.clone(e,this._position),this._updateClamping(),e=r.globe.ellipsoid.geodeticSurfaceNormal(e,this._normal),Cartesian3.multiplyByScalar(e,this._terrainHeight,t)):Cartesian3.clone(Cartesian3.ZERO,t))},TerrainOffsetProperty.prototype.isDestroyed=function(){return!1},TerrainOffsetProperty.prototype.destroy=function(){return defined(this._removeEventListener)&&this._removeEventListener(),defined(this._removeModeListener)&&this._removeModeListener(),defined(this._removeCallbackFunc)&&this._removeCallbackFunc(),destroyObject(this)};var defaultOffset=Cartesian3.ZERO,offsetScratch$3=new Cartesian3,positionScratch$6=new Cartesian3,scratchColor=new Color;function BoxGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function BoxGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new BoxGeometryOptions(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function DynamicBoxGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}function ClearCommand(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}defined(Object.create)&&(BoxGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),BoxGeometryUpdater.prototype.constructor=BoxGeometryUpdater),Object.defineProperties(BoxGeometryUpdater.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),BoxGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a={show:n,distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),color:void 0,offset:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor)),defined(t)||(t=Color.WHITE),a.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(a.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset,offsetScratch$3))),new GeometryInstance({id:i,geometry:BoxGeometry.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:a})},BoxGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor),n=this._distanceDisplayConditionProperty.getValue(e);n={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n),offset:void 0};return defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset,offsetScratch$3))),new GeometryInstance({id:t,geometry:BoxOutlineGeometry.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:n})},BoxGeometryUpdater.prototype._computeCenter=function(e,t){return Property.getValueOrUndefined(this._entity.position,e,t)},BoxGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.dimensions)||!defined(e.position)||GeometryUpdater.prototype._isHidden.call(this,e,t)},BoxGeometryUpdater.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&Property.isConstant(e.orientation)&&t.dimensions.isConstant&&Property.isConstant(t.outlineWidth))},BoxGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),r=this._options;r.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,r.dimensions=t.dimensions.getValue(Iso8601.MINIMUM_VALUE,r.dimensions),r.offsetAttribute=i!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},BoxGeometryUpdater.prototype._onEntityPropertyChanged=heightReferenceOnEntityPropertyChanged,BoxGeometryUpdater.DynamicGeometryUpdater=DynamicBoxGeometryUpdater,defined(Object.create)&&(DynamicBoxGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicBoxGeometryUpdater.prototype.constructor=DynamicBoxGeometryUpdater),DynamicBoxGeometryUpdater.prototype._isHidden=function(e,t,i){var r=Property.getValueOrUndefined(e.position,i,positionScratch$6),n=this._options.dimensions;return!defined(r)||!defined(n)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicBoxGeometryUpdater.prototype._setOptions=function(e,t,i){var r=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),n=this._options;n.dimensions=Property.getValueOrUndefined(t.dimensions,i,n.dimensions),n.offsetAttribute=r!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},ClearCommand.ALL=Object.freeze(new ClearCommand({color:new Color(0,0,0,0),depth:1,stencil:0})),ClearCommand.prototype.execute=function(e,t){e.clear(this,t)};var Axis={X:0,Y:1,Z:2};Axis.Y_UP_TO_Z_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationX(CesiumMath.PI_OVER_TWO)),Axis.Z_UP_TO_Y_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationX(-CesiumMath.PI_OVER_TWO)),Axis.X_UP_TO_Z_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationY(-CesiumMath.PI_OVER_TWO)),Axis.Z_UP_TO_X_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationY(CesiumMath.PI_OVER_TWO)),Axis.X_UP_TO_Y_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationZ(CesiumMath.PI_OVER_TWO)),Axis.Y_UP_TO_X_UP=Matrix4.fromRotationTranslation(Matrix3.fromRotationZ(-CesiumMath.PI_OVER_TWO)),Axis.fromName=function(e){return Axis[e]};var Axis$1=Object.freeze(Axis),AttributeType={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"},AttributeType$1=Object.freeze(AttributeType),Cesium3DTileColorBlendMode={HIGHLIGHT:0,REPLACE:1,MIX:2},Cesium3DTileColorBlendMode$1=Object.freeze(Cesium3DTileColorBlendMode),ComponentsPerAttribute={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ClassPerType={SCALAR:void 0,VEC2:Cartesian2,VEC3:Cartesian3,VEC4:Cartesian4,MAT2:Matrix2,MAT3:Matrix3,MAT4:Matrix4};function getBinaryAccessor(e){var t=e.componentType,i="string"==typeof t?ComponentDatatype$1.fromName(t):t,r=ComponentsPerAttribute[e.type];e=ClassPerType[e.type];return{componentsPerAttribute:r,classType:e,createArrayBufferView:function(e,t,n){return ComponentDatatype$1.createArrayBufferView(i,e,t,r*n)}}}var DEFAULT_COLOR_VALUE=Color.WHITE,DEFAULT_SHOW_VALUE=!0;function Cesium3DTileBatchTable(e,t,i,r,n){this.featuresLength=t,this._translucentFeaturesLength=0,defined(i)&&(s=i.extensions),this._extensions=defaultValue(s,{});var a,o,s=initializeProperties(i);this._properties=s,this._batchTableHierarchy=initializeHierarchy(this,i,r),this._batchTableBinaryProperties=getBinaryProperties(t,s,r),this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[],this._content=e,this._colorChangedCallback=n,0<t&&(n=.5*(e=1/(r=Math.min(t,ContextLimits.maximumTextureSize))),o=.5*(t=1/(a=Math.ceil(t/ContextLimits.maximumTextureSize))),a=new Cartesian2(r,a),o=new Cartesian4(e,n,t,o)),this._textureDimensions=a,this._textureStep=o}function initializeProperties(e){var t,i={};if(!defined(e))return i;for(t in e)e.hasOwnProperty(t)&&"HIERARCHY"!==t&&"extensions"!==t&&"extras"!==t&&(i[t]=clone(e[t],!0));return i}function initializeHierarchy(e,t,i){if(defined(t)){var r=e._extensions["3DTILES_batch_table_hierarchy"];if(defined(t=t.HIERARCHY)&&(Cesium3DTileBatchTable._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),r=e._extensions["3DTILES_batch_table_hierarchy"]=t),defined(r))return initializeHierarchyValues(r,i)}}function initializeHierarchyValues(e,t){var i,r,n=e.instancesLength,a=e.classes,o=e.classIds,s=e.parentCounts,l=(e=e.parentIds,n);if(defined(o.byteOffset)&&(o.componentType=defaultValue(o.componentType,ComponentDatatype$1.UNSIGNED_SHORT),o.type=AttributeType$1.SCALAR,o=getBinaryAccessor(o).createArrayBufferView(t.buffer,t.byteOffset+o.byteOffset,n)),defined(s))for(defined(s.byteOffset)&&(s.componentType=defaultValue(s.componentType,ComponentDatatype$1.UNSIGNED_SHORT),s.type=AttributeType$1.SCALAR,s=getBinaryAccessor(s).createArrayBufferView(t.buffer,t.byteOffset+s.byteOffset,n)),r=new Uint16Array(n),u=l=0;u<n;++u)r[u]=l,l+=s[u];defined(e)&&defined(e.byteOffset)&&(e.componentType=defaultValue(e.componentType,ComponentDatatype$1.UNSIGNED_SHORT),e.type=AttributeType$1.SCALAR,e=getBinaryAccessor(e).createArrayBufferView(t.buffer,t.byteOffset+e.byteOffset,l));for(var c=a.length,u=0;u<c;++u){var d=a[u].length,h=a[u].instances;d=getBinaryProperties(d,h,t);a[u].instances=combine(d,h)}var p=arrayFill(new Array(c),0),f=new Uint16Array(n);for(u=0;u<n;++u)i=o[u],f[u]=p[i],++p[i];return{classes:a,classIds:o,classIndexes:f,parentCounts:s,parentIndexes:r,parentIds:e}}function getBinaryProperties(e,t,i){var r,n;for(n in t)if(t.hasOwnProperty(n)){var a=t[n],o=a.byteOffset;if(defined(o)){var s=a.componentType,l=a.type;if(!defined(s))throw new RuntimeError("componentType is required.");if(!defined(l))throw new RuntimeError("type is required.");if(!defined(i))throw new RuntimeError("Property "+n+" requires a batch table binary.");l=(s=getBinaryAccessor(a)).componentsPerAttribute,a=s.classType,o=s.createArrayBufferView(i.buffer,i.byteOffset+o,e),defined(r)||(r={}),r[n]={typedArray:o,componentCount:l,type:a}}}return r}function getByteLength(e){return(e=e._textureDimensions).x*e.y*4}function getBatchValues(e){var t;return defined(e._batchValues)||(t=getByteLength(e),arrayFill(t=new Uint8Array(t),255),e._batchValues=t),e._batchValues}function getShowAlphaProperties(e){var t;return defined(e._showAlphaProperties)||(t=2*e.featuresLength,arrayFill(t=new Uint8Array(t),255),e._showAlphaProperties=t),e._showAlphaProperties}Cesium3DTileBatchTable._deprecationWarning=deprecationWarning,Object.defineProperties(Cesium3DTileBatchTable.prototype,{memorySizeInBytes:{get:function(){var e=0;return defined(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),defined(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}}}),Cesium3DTileBatchTable.getBinaryProperties=function(e,t,i){return getBinaryProperties(e,t,i)},Cesium3DTileBatchTable.prototype.setShow=function(e,t){var i,r,n;t&&!defined(this._showAlphaProperties)||(n=t?255:0,(i=getShowAlphaProperties(this))[r=2*e]!==n&&(i[r]=n,getBatchValues(this)[4*e+3]=t?i[1+r]:0,this._batchValuesDirty=!0))},Cesium3DTileBatchTable.prototype.setAllShow=function(e){for(var t=this.featuresLength,i=0;i<t;++i)this.setShow(i,e)},Cesium3DTileBatchTable.prototype.getShow=function(e){return!defined(this._showAlphaProperties)||(e*=2,255===this._showAlphaProperties[e])};var scratchColorBytes=new Array(4);Cesium3DTileBatchTable.prototype.setColor=function(e,t){var i,r,n,a,o,s,l;Color.equals(t,DEFAULT_COLOR_VALUE)&&!defined(this._batchValues)||(l=(s=t.toBytes(scratchColorBytes))[3],i=getBatchValues(this),r=4*e,n=getShowAlphaProperties(this),a=2*e,i[r]===s[0]&&i[1+r]===s[1]&&i[2+r]===s[2]&&n[1+a]===l||(i[r]=s[0],i[1+r]=s[1],i[2+r]=s[2],o=255!==n[1+a],s=0!==n[a],i[3+r]=s?l:0,(l=255!==(n[1+a]=l))&&!o?++this._translucentFeaturesLength:!l&&o&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,defined(this._colorChangedCallback)&&this._colorChangedCallback(e,t)))},Cesium3DTileBatchTable.prototype.setAllColor=function(e){for(var t=this.featuresLength,i=0;i<t;++i)this.setColor(i,e)},Cesium3DTileBatchTable.prototype.getColor=function(e,t){if(!defined(this._batchValues))return Color.clone(DEFAULT_COLOR_VALUE,t);var i=this._batchValues,r=4*e,n=this._showAlphaProperties;e*=2;return Color.fromBytes(i[r],i[1+r],i[2+r],n[1+e],t)},Cesium3DTileBatchTable.prototype.getPickColor=function(e){return this._pickIds[e]};var scratchColor$1=new Color;function getBinaryProperty(e,t){var i=e.typedArray,r=e.componentCount;return 1===r?i[t]:e.type.unpack(i,t*r)}function setBinaryProperty(e,t,i){var r=e.typedArray,n=e.componentCount;1===n?r[t]=i:e.type.pack(i,r,t*n)}Cesium3DTileBatchTable.prototype.applyStyle=function(e){if(!defined(e))return this.setAllColor(DEFAULT_COLOR_VALUE),void this.setAllShow(DEFAULT_SHOW_VALUE);for(var t=this._content,i=this.featuresLength,r=0;r<i;++r){var n=t.getFeature(r),a=defined(e.color)?e.color.evaluateColor(n,scratchColor$1):DEFAULT_COLOR_VALUE;n=defined(e.show)?e.show.evaluate(n):DEFAULT_SHOW_VALUE;this.setColor(r,a),this.setShow(r,n)}};var scratchVisited=[],scratchStack=[],marker=0;function traverseHierarchyMultipleParents(e,t,i){var r=e.classIds,n=e.parentCounts,a=e.parentIds,o=e.parentIndexes,s=(r=r.length,scratchVisited);s.length=Math.max(s.length,r);var l=++marker,c=scratchStack;for(c.length=0,c.push(t);0<c.length;)if(s[t=c.pop()]!==l){s[t]=l;var u=i(e,t);if(defined(u))return u;for(var d=n[t],h=o[t],p=0;p<d;++p){var f=a[h+p];f!==t&&c.push(f)}}}function traverseHierarchySingleParent(e,t,i){for(var r=!0;r;){var n=i(e,t);if(defined(n))return n;r=(n=e.parentIds[t])!==t,t=n}}function traverseHierarchy(e,t,i){var r=e.parentCounts;return defined(e.parentIds)?(defined(r)?traverseHierarchyMultipleParents:traverseHierarchySingleParent)(e,t,i):i(e,t)}function hasPropertyInHierarchy(e,t,i){return t=traverseHierarchy(e._batchTableHierarchy,t,(function(e,t){if(t=e.classIds[t],defined(e.classes[t].instances[i]))return!0})),defined(t)}function getPropertyNamesInHierarchy(e,t,i){traverseHierarchy(e._batchTableHierarchy,t,(function(e,t){t=e.classIds[t];var r,n=e.classes[t].instances;for(r in n)n.hasOwnProperty(r)&&-1===i.indexOf(r)&&i.push(r)}))}function getHierarchyProperty(e,t,i){return traverseHierarchy(e._batchTableHierarchy,t,(function(e,t){var r=e.classIds[t];r=e.classes[r],t=e.classIndexes[t];if(defined(r=r.instances[i]))return defined(r.typedArray)?getBinaryProperty(r,t):clone(r[t],!0)}))}function setHierarchyProperty(e,t,i,r){return t=traverseHierarchy(e._batchTableHierarchy,t,(function(e,t){var n=e.classIds[t];n=e.classes[n],t=e.classIndexes[t];if(defined(n=n.instances[i]))return defined(n.typedArray)?setBinaryProperty(n,t,r):n[t]=clone(r,!0),!0})),defined(t)}function getGlslComputeSt$1(e){return 1===e._textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n    float stepX = tile_textureStep.x; \n    float centerX = tile_textureStep.y; \n    return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n    float stepX = tile_textureStep.x; \n    float centerX = tile_textureStep.y; \n    float stepY = tile_textureStep.z; \n    float centerY = tile_textureStep.w; \n    float xId = mod(batchId, tile_textureDimensions.x); \n    float yId = floor(batchId / tile_textureDimensions.x); \n    return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n"}function getDefaultShader(e,t){return e=ShaderSource.replaceMain(e,"tile_main"),t?e+"uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n    tile_main(); \n    tile_featureColor = czm_gammaCorrect(tile_featureColor); \n    gl_FragColor.a *= tile_featureColor.a; \n    float highlight = ceil(tile_colorBlend); \n    gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n":e+"void tile_color(vec4 tile_featureColor) \n{ \n    tile_main(); \n} \n"}function replaceDiffuseTextureCalls(e,t){for(var i,r,n="texture2D("+t,a=e.indexOf(n,0);-1<a;){for(var o=0,s=a;s<e.length;++s){var l=e.charAt(s);if("("===l)++o;else if(")"===l&&0==--o){r=s+1;break}}var c="tile_diffuse_final("+e.slice(a,r)+", tile_diffuse)";e=e.slice(0,a)+c+e.slice(r),i=a+c.length,a=e.indexOf(n,i)}return e}function modifyDiffuse(e,t,i){if(!defined(t))return getDefaultShader(e,i);var r=new RegExp("(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+"+t+";"),n=e.match(r);if(!defined(n))return getDefaultShader(e,i);var a,o=n[0],s=n[2];return e=(e=ShaderSource.replaceMain(e,"tile_main")).replace(o,""),"vec3"===s||"vec4"===s?(a="vec3"===s?"vec4("+t+", 1.0)":t,n="vec3"===s?"tile_diffuse.xyz":"tile_diffuse",r=new RegExp(t,"g"),e=e.replace(r,n),a="    vec4 source = "+a+"; \n    tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n    tile_main(); \n"):"sampler2D"===s&&(e=replaceDiffuseTextureCalls(e,t),a="    tile_diffuse = tile_featureColor; \n    tile_main(); \n"),e="uniform float tile_colorBlend; \nvec4 tile_diffuse = vec4(1.0); \nbool isWhite(vec3 color) \n{ \n    return all(greaterThan(color, vec3(1.0 - czm_epsilon3))); \n} \nvec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse) \n{ \n    vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend); \n    vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse; \n    return vec4(diffuse.rgb, sourceDiffuse.a); \n} \n"+o+"\n"+e+"\nvoid tile_color(vec4 tile_featureColor) \n{ \n"+a,i&&(e+="    tile_featureColor = czm_gammaCorrect(tile_featureColor); \n    gl_FragColor.a *= tile_featureColor.a; \n    float highlight = ceil(tile_colorBlend); \n    gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n"),e+"} \n"}function getColorBlend(e){e=(t=e._content.tileset).colorBlendMode;var t=t.colorBlendAmount;return e===Cesium3DTileColorBlendMode$1.HIGHLIGHT?0:e===Cesium3DTileColorBlendMode$1.REPLACE?1:e===Cesium3DTileColorBlendMode$1.MIX?CesiumMath.clamp(t,CesiumMath.EPSILON4,1):void 0}Cesium3DTileBatchTable.prototype.isClass=function(e,t){var i=this._batchTableHierarchy;return!!defined(i)&&defined(traverseHierarchy(i,e,(function(e,i){if(i=e.classIds[i],e.classes[i].name===t)return!0})))},Cesium3DTileBatchTable.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t},Cesium3DTileBatchTable.prototype.getExactClassName=function(e){var t=this._batchTableHierarchy;if(defined(t))return e=t.classIds[e],t.classes[e].name},Cesium3DTileBatchTable.prototype.hasProperty=function(e,t){return defined(this._properties[t])||defined(this._batchTableHierarchy)&&hasPropertyInHierarchy(this,e,t)},Cesium3DTileBatchTable.prototype.getPropertyNames=function(e,t){(t=defined(t)?t:[]).length=0;var i=Object.keys(this._properties);return t.push.apply(t,i),defined(this._batchTableHierarchy)&&getPropertyNamesInHierarchy(this,e,t),t},Cesium3DTileBatchTable.prototype.getProperty=function(e,t){if(defined(this._batchTableBinaryProperties)){var i=this._batchTableBinaryProperties[t];if(defined(i))return getBinaryProperty(i,e)}return defined(i=this._properties[t])?clone(i[e],!0):defined(this._batchTableHierarchy)&&defined(t=getHierarchyProperty(this,e,t))?t:void 0},Cesium3DTileBatchTable.prototype.setProperty=function(e,t,i){var r=this.featuresLength;if(defined(this._batchTableBinaryProperties)){var n=this._batchTableBinaryProperties[t];if(defined(n))return void setBinaryProperty(n,e,i)}defined(this._batchTableHierarchy)&&setHierarchyProperty(this,e,t,i)||(defined(n=this._properties[t])||(this._properties[t]=new Array(r),n=this._properties[t]),n[e]=clone(i,!0))},Cesium3DTileBatchTable.prototype.getVertexShaderCallback=function(e,t,i){if(0!==this.featuresLength){var r=this;return function(n){var a;n=modifyDiffuse(n,i,!1);return 0<ContextLimits.maximumVertexTextureImageUnits?(a="",e&&(a+="uniform bool tile_translucentCommand; \n"),a+="uniform sampler2D tile_batchTexture; \nvarying vec4 tile_featureColor; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n    vec2 st = computeSt("+t+"); \n    vec4 featureProperties = texture2D(tile_batchTexture, st); \n    tile_color(featureProperties); \n    float show = ceil(featureProperties.a); \n    gl_Position *= show; \n",e&&(a+="    bool isStyleTranslucent = (featureProperties.a != 1.0); \n    if (czm_pass == czm_passTranslucent) \n    { \n        if (!isStyleTranslucent && !tile_translucentCommand) \n        { \n            gl_Position *= 0.0; \n        } \n    } \n    else \n    { \n        if (isStyleTranslucent) \n        { \n            gl_Position *= 0.0; \n        } \n    } \n"),a+="    tile_featureColor = featureProperties; \n    tile_featureSt = st; \n}"):a="varying vec2 tile_featureSt; \nvoid main() \n{ \n    tile_color(vec4(1.0)); \n    tile_featureSt = computeSt("+t+"); \n}",n+"\n"+getGlslComputeSt$1(r)+a}}},Cesium3DTileBatchTable.prototype.getFragmentShaderCallback=function(e,t){if(0!==this.featuresLength)return function(i){return i=modifyDiffuse(i,t,!0),0<ContextLimits.maximumVertexTextureImageUnits?i+="uniform sampler2D tile_pickTexture; \nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n    tile_color(tile_featureColor); \n}":(e&&(i+="uniform bool tile_translucentCommand; \n"),i+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n    vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n    if (featureProperties.a == 0.0) { \n        discard; \n    } \n",e&&(i+="    bool isStyleTranslucent = (featureProperties.a != 1.0); \n    if (czm_pass == czm_passTranslucent) \n    { \n        if (!isStyleTranslucent && !tile_translucentCommand) \n        { \n            discard; \n        } \n    } \n    else \n    { \n        if (isStyleTranslucent) \n        { \n            discard; \n        } \n    } \n"),i+="    tile_color(featureProperties); \n} \n"),i}},Cesium3DTileBatchTable.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return e=ShaderSource.replaceMain(e,"tile_main"),0<ContextLimits.maximumVertexTextureImageUnits?e+="uniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n    tile_main(); \n    gl_FragColor = tile_featureColor; \n}":e+="uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvoid main() \n{ \n    tile_main(); \n    vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n    if (featureProperties.a == 0.0) { \n        discard; \n    } \n    gl_FragColor = featureProperties; \n} \n",e}},Cesium3DTileBatchTable.prototype.getUniformMapCallback=function(){if(0!==this.featuresLength){var e=this;return function(t){return combine(t,{tile_batchTexture:function(){return defaultValue(e._batchTexture,e._defaultTexture)},tile_textureDimensions:function(){return e._textureDimensions},tile_textureStep:function(){return e._textureStep},tile_colorBlend:function(){return getColorBlend(e)},tile_pickTexture:function(){return e._pickTexture}})}}},Cesium3DTileBatchTable.prototype.getPickId=function(){return"texture2D(tile_pickTexture, tile_featureSt)"};var StyleCommandsNeeded={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};function getStyleCommandsNeeded(e){var t=e._translucentFeaturesLength;return 0===t?StyleCommandsNeeded.ALL_OPAQUE:t===e.featuresLength?StyleCommandsNeeded.ALL_TRANSLUCENT:StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT}function deriveCommand(e){var t=(e=DrawCommand.shallowClone(e)).pass===Pass$1.TRANSLUCENT;return e.uniformMap=defined(e.uniformMap)?e.uniformMap:{},e.uniformMap.tile_translucentCommand=function(){return t},e}function deriveTranslucentCommand(e){var t=DrawCommand.shallowClone(e);return t.pass=Pass$1.TRANSLUCENT,t.renderState=getTranslucentRenderState(e.renderState),t}function deriveOpaqueCommand(e){var t=DrawCommand.shallowClone(e);return t.renderState=getOpaqueRenderState(e.renderState),t}function getLogDepthPolygonOffsetFragmentShaderProgram(e,t){var i,r=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");return defined(r)||((i=t.fragmentShaderSource.clone()).defines=defined(i.defines)?i.defines.slice(0):[],i.defines.push("POLYGON_OFFSET"),i.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),r=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})),r}function deriveZBackfaceCommand(e,t){var i=DrawCommand.shallowClone(t),r=clone(i.renderState,!0);r.cull.enabled=!0,r.cull.face=CullFace$1.FRONT,r.colorMask={red:!1,green:!1,blue:!1,alpha:!1},r.polygonOffset={enabled:!0,factor:5,units:5},r.stencilTest=StencilConstants$1.setCesium3DTileBit(),r.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK,i.renderState=RenderState.fromCache(r),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=clone(t.uniformMap);var n=new Cartesian2(5,5);return i.uniformMap.u_polygonOffset=function(){return n},i.shaderProgram=getLogDepthPolygonOffsetFragmentShaderProgram(e,t.shaderProgram),i}function deriveStencilCommand(e,t){var i=DrawCommand.shallowClone(e);return(e=clone(i.renderState,!0)).stencilTest.enabled=!0,e.stencilTest.mask=StencilConstants$1.SKIP_LOD_MASK,e.stencilTest.reference=StencilConstants$1.CESIUM_3D_TILE_MASK|t<<StencilConstants$1.SKIP_LOD_BIT_SHIFT,e.stencilTest.frontFunction=StencilFunction$1.GREATER_OR_EQUAL,e.stencilTest.frontOperation.zPass=StencilOperation$1.REPLACE,e.stencilTest.backFunction=StencilFunction$1.GREATER_OR_EQUAL,e.stencilTest.backOperation.zPass=StencilOperation$1.REPLACE,e.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK|StencilConstants$1.SKIP_LOD_MASK,i.renderState=RenderState.fromCache(e),i}function getLastSelectionDepth(e){return(e.renderState.stencilTest.reference&StencilConstants$1.SKIP_LOD_MASK)>>>StencilConstants$1.SKIP_LOD_BIT_SHIFT}function getTranslucentRenderState(e){return(e=clone(e,!0)).cull.enabled=!1,e.depthTest.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND,RenderState.fromCache(e)}function getOpaqueRenderState(e){return(e=clone(e,!0)).stencilTest=StencilConstants$1.setCesium3DTileBit(),e.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK,RenderState.fromCache(e)}function createTexture$1(e,t,i){return e=e._textureDimensions,new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{width:e.x,height:e.y,arrayBufferView:i},flipY:!1,sampler:Sampler.NEAREST})}function createPickTexture(e,t){var i=e.featuresLength;if(!defined(e._pickTexture)&&0<i){for(var r=e._pickIds,n=getByteLength(e),a=new Uint8Array(n),o=e._content,s=0;s<i;++s){var l=t.createPickId(o.getFeature(s));r.push(l);var c=l.color;a[l=4*s]=Color.floatToByte(c.red),a[1+l]=Color.floatToByte(c.green),a[2+l]=Color.floatToByte(c.blue),a[3+l]=Color.floatToByte(c.alpha)}e._pickTexture=createTexture$1(e,t,a),o.tileset._statistics.batchTableByteLength+=e._pickTexture.sizeInBytes}}function updateBatchTexture(e){var t=e._textureDimensions;e._batchTexture.copyFrom({width:t.x,height:t.y,arrayBufferView:e._batchValues})}function Cesium3DTileFeature(e,t){this._content=e,this._batchId=t,this._color=void 0}function Cesium3DTileFeatureTable(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function getTypedArrayFromBinary(e,t,i,r,n,a){var o=e._cachedTypedArrays,s=o[t];return defined(s)||(s=ComponentDatatype$1.createArrayBufferView(i,e.buffer.buffer,e.buffer.byteOffset+a,n*r),o[t]=s),s}function getTypedArrayFromArray(e,t,i,r){var n=e._cachedTypedArrays;return defined(e=n[t])||(e=ComponentDatatype$1.createTypedArray(i,r),n[t]=e),e}function addToArray(e,t,i){return(i=defaultValue(i,!1))&&-1<(i=e.indexOf(t))?i:(e.push(t),e.length-1)}function hasExtension(e,t){return defined(e.extensionsUsed)&&0<=e.extensionsUsed.indexOf(t)}function ForEach(){}function numberOfComponentsForType(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}function getAccessorByteStride(e,t){var i=t.bufferView;return defined(i)&&defined((i=e.bufferViews[i]).byteStride)&&0<i.byteStride?i.byteStride:ComponentDatatype$1.getSizeInBytes(t.componentType)*numberOfComponentsForType(t.type)}function addDefaults(e){ForEach.accessor(e,(function(e){defined(e.bufferView)&&(e.byteOffset=defaultValue(e.byteOffset,0))})),ForEach.bufferView(e,(function(e){defined(e.buffer)&&(e.byteOffset=defaultValue(e.byteOffset,0))})),ForEach.mesh(e,(function(t){ForEach.meshPrimitive(t,(function(t){t.mode=defaultValue(t.mode,WebGLConstants$1.TRIANGLES),defined(t.material)||(defined(e.materials)||(e.materials=[]),t.material=addToArray(e.materials,{name:"default"}))}))})),ForEach.accessorContainingVertexAttributeData(e,(function(t){var i=e.accessors[t];t=i.bufferView;i.normalized=defaultValue(i.normalized,!1),defined(t)&&((t=e.bufferViews[t]).byteStride=getAccessorByteStride(e,i),t.target=WebGLConstants$1.ARRAY_BUFFER)})),ForEach.accessorContainingIndexData(e,(function(t){defined(t=e.accessors[t].bufferView)&&(e.bufferViews[t].target=WebGLConstants$1.ELEMENT_ARRAY_BUFFER)})),ForEach.material(e,(function(e){var t=defaultValue(e.extensions,defaultValue.EMPTY_OBJECT),i=t.KHR_materials_common;if(defined(i)){var r=i.technique,n=defined(i.values)?i.values:{};return(i.values=n).ambient=defined(n.ambient)?n.ambient:[0,0,0,1],n.emission=defined(n.emission)?n.emission:[0,0,0,1],n.transparency=defaultValue(n.transparency,1),n.transparent=defaultValue(n.transparent,!1),n.doubleSided=defaultValue(n.doubleSided,!1),void("CONSTANT"!==r&&(n.diffuse=defined(n.diffuse)?n.diffuse:[0,0,0,1],"LAMBERT"!==r&&(n.specular=defined(n.specular)?n.specular:[0,0,0,1],n.shininess=defaultValue(n.shininess,0))))}e.emissiveFactor=defaultValue(e.emissiveFactor,[0,0,0]),e.alphaMode=defaultValue(e.alphaMode,"OPAQUE"),e.doubleSided=defaultValue(e.doubleSided,!1),"MASK"===e.alphaMode&&(e.alphaCutoff=defaultValue(e.alphaCutoff,.5)),defined(t.KHR_techniques_webgl)&&ForEach.materialValue(e,(function(e){defined(e.index)&&addTextureDefaults(e)})),addTextureDefaults(e.emissiveTexture),addTextureDefaults(e.normalTexture),addTextureDefaults(e.occlusionTexture),defined(e=e.pbrMetallicRoughness)&&(e.baseColorFactor=defaultValue(e.baseColorFactor,[1,1,1,1]),e.metallicFactor=defaultValue(e.metallicFactor,1),e.roughnessFactor=defaultValue(e.roughnessFactor,1),addTextureDefaults(e.baseColorTexture),addTextureDefaults(e.metallicRoughnessTexture)),defined(t=t.pbrSpecularGlossiness)&&(t.diffuseFactor=defaultValue(t.diffuseFactor,[1,1,1,1]),t.specularFactor=defaultValue(t.specularFactor,[1,1,1]),t.glossinessFactor=defaultValue(t.glossinessFactor,1),addTextureDefaults(t.specularGlossinessTexture))})),ForEach.animation(e,(function(e){ForEach.animationSampler(e,(function(e){e.interpolation=defaultValue(e.interpolation,"LINEAR")}))}));var t=getAnimatedNodes(e);return ForEach.node(e,(function(e,i){defined(t[i])||defined(e.translation)||defined(e.rotation)||defined(e.scale)?(e.translation=defaultValue(e.translation,[0,0,0]),e.rotation=defaultValue(e.rotation,[0,0,0,1]),e.scale=defaultValue(e.scale,[1,1,1])):e.matrix=defaultValue(e.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])})),ForEach.sampler(e,(function(e){e.wrapS=defaultValue(e.wrapS,WebGLConstants$1.REPEAT),e.wrapT=defaultValue(e.wrapT,WebGLConstants$1.REPEAT)})),defined(e.scenes)&&!defined(e.scene)&&(e.scene=0),e}function getAnimatedNodes(e){var t={};return ForEach.animation(e,(function(e){ForEach.animationChannel(e,(function(e){var i;e=(i=e.target).node;"translation"!==(i=i.path)&&"rotation"!==i&&"scale"!==i||(t[e]=!0)}))})),t}function addTextureDefaults(e){defined(e)&&(e.texCoord=defaultValue(e.texCoord,0))}function addPipelineExtras(e){return ForEach.shader(e,(function(e){addExtras(e)})),ForEach.buffer(e,(function(e){addExtras(e)})),ForEach.image(e,(function(e){addExtras(e),ForEach.compressedImage(e,(function(e){addExtras(e)}))})),addExtras(e),e}function addExtras(e){e.extras=defined(e.extras)?e.extras:{},e.extras._pipeline=defined(e.extras._pipeline)?e.extras._pipeline:{}}function removeExtensionsRequired(e,t){var i=e.extensionsRequired;defined(i)&&(0<=(t=i.indexOf(t))&&i.splice(t,1),0===i.length&&delete e.extensionsRequired)}function removeExtensionsUsed(e,t){var i,r=e.extensionsUsed;defined(r)&&(0<=(i=r.indexOf(t))&&r.splice(i,1),removeExtensionsRequired(e,t),0===r.length&&delete e.extensionsUsed)}Cesium3DTileBatchTable.prototype.addDerivedCommands=function(e,t){for(var i=e.commandList,r=i.length,n=this._content._tile,a=n._finalResolution,o=n.tileset,s=o._skipLevelOfDetail&&o._hasMixedContent&&e.context.stencilBuffer,l=getStyleCommandsNeeded(this),c=t;c<r;++c){var u=i[c];defined(p=u.derivedCommands.tileset)&&!u.dirty||(p={},(u.derivedCommands.tileset=p).originalCommand=deriveCommand(u),u.dirty=!1);var d=p.originalCommand;l!==StyleCommandsNeeded.ALL_OPAQUE&&u.pass!==Pass$1.TRANSLUCENT&&(defined(p.translucent)||(p.translucent=deriveTranslucentCommand(d))),l!==StyleCommandsNeeded.ALL_TRANSLUCENT&&u.pass!==Pass$1.TRANSLUCENT&&(defined(p.opaque)||(p.opaque=deriveOpaqueCommand(d)),s&&(a||(defined(p.zback)||(p.zback=deriveZBackfaceCommand(e.context,d)),o._backfaceCommands.push(p.zback)),defined(p.stencil)&&n._selectionDepth===getLastSelectionDepth(p.stencil)||(u.renderState.depthMask?p.stencil=deriveStencilCommand(d,n._selectionDepth):p.stencil=p.opaque)));var h=s?p.stencil:p.opaque,p=p.translucent;u.pass!==Pass$1.TRANSLUCENT?(l===StyleCommandsNeeded.ALL_OPAQUE&&(i[c]=h),l===StyleCommandsNeeded.ALL_TRANSLUCENT&&(i[c]=p),l===StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT&&(i[c]=h,i.push(p))):i[c]=d}},Cesium3DTileBatchTable.prototype.update=function(e,t){var i=t.context;this._defaultTexture=i.defaultTexture,((t=t.passes).pick||t.postProcess)&&createPickTexture(this,i),this._batchValuesDirty&&(this._batchValuesDirty=!1,defined(this._batchTexture)||(this._batchTexture=createTexture$1(this,i,this._batchValues),e._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes),updateBatchTexture(this))},Cesium3DTileBatchTable.prototype.isDestroyed=function(){return!1},Cesium3DTileBatchTable.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();return destroyObject(this)},Object.defineProperties(Cesium3DTileFeature.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return defined(this._color)||(this._color=new Color),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}}),Cesium3DTileFeature.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},Cesium3DTileFeature.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},Cesium3DTileFeature.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},Cesium3DTileFeature.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},Cesium3DTileFeature.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},Cesium3DTileFeature.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},Cesium3DTileFeature.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},Cesium3DTileFeatureTable.prototype.getGlobalProperty=function(e,t,i){var r=this.json[e];if(defined(r))return defined(r.byteOffset)?getTypedArrayFromBinary(this,e,t=defaultValue(t,ComponentDatatype$1.UNSIGNED_INT),i=defaultValue(i,1),1,r.byteOffset):r},Cesium3DTileFeatureTable.prototype.getPropertyArray=function(e,t,i){var r=this.json[e];if(defined(r))return defined(r.byteOffset)?(defined(r.componentType)&&(t=ComponentDatatype$1.fromName(r.componentType)),getTypedArrayFromBinary(this,e,t,i,this.featuresLength,r.byteOffset)):getTypedArrayFromArray(this,e,t,r)},Cesium3DTileFeatureTable.prototype.getProperty=function(e,t,i,r,n){if(defined(this.json[e])){var a=this.getPropertyArray(e,t,i);if(1===i)return a[r];for(var o=0;o<i;++o)n[o]=a[i*r+o];return n}},ForEach.objectLegacy=function(e,t){if(defined(e))for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=t(e[i],i);if(defined(r))return r}},ForEach.object=function(e,t){if(defined(e))for(var i=e.length,r=0;r<i;r++){var n=t(e[r],r);if(defined(n))return n}},ForEach.topLevel=function(e,t,i){return defined(t=e[t])&&!Array.isArray(t)?ForEach.objectLegacy(t,i):ForEach.object(t,i)},ForEach.accessor=function(e,t){return ForEach.topLevel(e,"accessors",t)},ForEach.accessorWithSemantic=function(e,t,i){var r={};return ForEach.mesh(e,(function(e){return ForEach.meshPrimitive(e,(function(e){var n=ForEach.meshPrimitiveAttribute(e,(function(e,n){if(0===n.indexOf(t)&&!defined(r[e])&&(r[e]=!0,defined(e=i(e))))return e}));return defined(n)?n:ForEach.meshPrimitiveTarget(e,(function(e){return ForEach.meshPrimitiveTargetAttribute(e,(function(e,n){if(0===n.indexOf(t)&&!defined(r[e])&&(r[e]=!0,defined(e=i(e))))return e}))}))}))}))},ForEach.accessorContainingVertexAttributeData=function(e,t){var i={};return ForEach.mesh(e,(function(e){return ForEach.meshPrimitive(e,(function(e){var r=ForEach.meshPrimitiveAttribute(e,(function(e){if(!defined(i[e])&&(i[e]=!0,defined(e=t(e))))return e}));return defined(r)?r:ForEach.meshPrimitiveTarget(e,(function(e){return ForEach.meshPrimitiveTargetAttribute(e,(function(e){if(!defined(i[e])&&(i[e]=!0,defined(e=t(e))))return e}))}))}))}))},ForEach.accessorContainingIndexData=function(e,t){var i={};return ForEach.mesh(e,(function(e){return ForEach.meshPrimitive(e,(function(e){if(defined(e=e.indices)&&!defined(i[e])&&(i[e]=!0,defined(e=t(e))))return e}))}))},ForEach.animation=function(e,t){return ForEach.topLevel(e,"animations",t)},ForEach.animationChannel=function(e,t){return e=e.channels,ForEach.object(e,t)},ForEach.animationSampler=function(e,t){return e=e.samplers,ForEach.object(e,t)},ForEach.buffer=function(e,t){return ForEach.topLevel(e,"buffers",t)},ForEach.bufferView=function(e,t){return ForEach.topLevel(e,"bufferViews",t)},ForEach.camera=function(e,t){return ForEach.topLevel(e,"cameras",t)},ForEach.image=function(e,t){return ForEach.topLevel(e,"images",t)},ForEach.compressedImage=function(e,t){if(defined(e.extras)){var i,r=e.extras.compressedImage3DTiles;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}}},ForEach.material=function(e,t){return ForEach.topLevel(e,"materials",t)},ForEach.materialValue=function(e,t){var i,r=e.values;for(i in defined(e.extensions)&&defined(e.extensions.KHR_techniques_webgl)&&(r=e.extensions.KHR_techniques_webgl.values),r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.mesh=function(e,t){return ForEach.topLevel(e,"meshes",t)},ForEach.meshPrimitive=function(e,t){var i=e.primitives;if(defined(i))for(var r=i.length,n=0;n<r;n++){var a=t(i[n],n);if(defined(a))return a}},ForEach.meshPrimitiveAttribute=function(e,t){var i,r=e.attributes;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.meshPrimitiveTarget=function(e,t){var i=e.targets;if(defined(i))for(var r=i.length,n=0;n<r;++n){var a=t(i[n],n);if(defined(a))return a}},ForEach.meshPrimitiveTargetAttribute=function(e,t){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=t(e[i],i);if(defined(r))return r}},ForEach.node=function(e,t){return ForEach.topLevel(e,"nodes",t)},ForEach.nodeInTree=function(e,t,i){var r=e.nodes;if(defined(r))for(var n=t.length,a=0;a<n;a++){var o=t[a],s=r[o];if(defined(s)){if(defined(o=i(s,o)))return o;if(defined(s=s.children)&&defined(o=ForEach.nodeInTree(e,s,i)))return o}}},ForEach.nodeInScene=function(e,t,i){if(defined(t=t.nodes))return ForEach.nodeInTree(e,t,i)},ForEach.program=function(e,t){return hasExtension(e,"KHR_techniques_webgl")?ForEach.object(e.extensions.KHR_techniques_webgl.programs,t):ForEach.topLevel(e,"programs",t)},ForEach.sampler=function(e,t){return ForEach.topLevel(e,"samplers",t)},ForEach.scene=function(e,t){return ForEach.topLevel(e,"scenes",t)},ForEach.shader=function(e,t){return hasExtension(e,"KHR_techniques_webgl")?ForEach.object(e.extensions.KHR_techniques_webgl.shaders,t):ForEach.topLevel(e,"shaders",t)},ForEach.skin=function(e,t){return ForEach.topLevel(e,"skins",t)},ForEach.skinJoint=function(e,t){var i=e.joints;if(defined(i))for(var r=i.length,n=0;n<r;n++){var a=t(i[n]);if(defined(a))return a}},ForEach.techniqueAttribute=function(e,t){var i,r=e.attributes;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.techniqueUniform=function(e,t){var i,r=e.uniforms;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.techniqueParameter=function(e,t){var i,r=e.parameters;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=t(r[i],i);if(defined(n))return n}},ForEach.technique=function(e,t){return hasExtension(e,"KHR_techniques_webgl")?ForEach.object(e.extensions.KHR_techniques_webgl.techniques,t):ForEach.topLevel(e,"techniques",t)},ForEach.texture=function(e,t){return ForEach.topLevel(e,"textures",t)};var sizeOfUint32$2=4;function parseGlb(e){if("glTF"!==getMagic(e))throw new RuntimeError("File is not valid binary glTF");var t=readHeader(e,0,5),i=t[1];if(1!==i&&2!==i)throw new RuntimeError("Binary glTF version is not 1 or 2");return(1===i?parseGlbVersion1:parseGlbVersion2)(e,t)}function readHeader(e,t,i){for(var r=new DataView(e.buffer),n=new Array(i),a=0;a<i;++a)n[a]=r.getUint32(e.byteOffset+t+a*sizeOfUint32$2,!0);return n}function parseGlbVersion1(e,t){var i=t[2],r=t[3];if(0!==t[4])throw new RuntimeError("Binary glTF scene format is not JSON");return t=20+r,r=getStringFromTypedArray(e,20,r),addPipelineExtras(r=JSON.parse(r)),t=e.subarray(t,i),defined(i=r.buffers)&&0<Object.keys(i).length&&defined(i=defaultValue(i.binary_glTF,i.KHR_binary_glTF))&&(i.extras._pipeline.source=t),removeExtensionsUsed(r,"KHR_binary_glTF"),r}function parseGlbVersion2(e,t){for(var i,r=t[2],n=12;n<r;){var a=(l=readHeader(e,n,2))[0],o=l[1];n+=8;var s,l=e.subarray(n,n+a);n+=a,1313821514===o?(a=getStringFromTypedArray(l),addPipelineExtras(s=JSON.parse(a))):5130562===o&&(i=l)}return defined(s)&&defined(i)&&defined(t=s.buffers)&&0<t.length&&(t[0].extras._pipeline.source=i),s}function addExtensionsUsed(e,t){var i=e.extensionsUsed;defined(i)||(i=[],e.extensionsUsed=i),addToArray(i,t,!0)}function getComponentReader(e){switch(e){case ComponentDatatype$1.BYTE:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getInt8(t+a*r)};case ComponentDatatype$1.UNSIGNED_BYTE:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getUint8(t+a*r)};case ComponentDatatype$1.SHORT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getInt16(t+a*r,!0)};case ComponentDatatype$1.UNSIGNED_SHORT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getUint16(t+a*r,!0)};case ComponentDatatype$1.INT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getInt32(t+a*r,!0)};case ComponentDatatype$1.UNSIGNED_INT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getUint32(t+a*r,!0)};case ComponentDatatype$1.FLOAT:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getFloat32(t+a*r,!0)};case ComponentDatatype$1.DOUBLE:return function(e,t,i,r,n){for(var a=0;a<i;++a)n[a]=e.getFloat64(t+a*r,!0)}}}function findAccessorMinMax(e,t){var i=e.bufferViews,r=e.buffers,n=t.bufferView,a=numberOfComponentsForType(t.type);if(!defined(t.bufferView))return{min:arrayFill(new Array(a),0),max:arrayFill(new Array(a),0)};for(var o=arrayFill(new Array(a),Number.POSITIVE_INFINITY),s=arrayFill(new Array(a),Number.NEGATIVE_INFINITY),l=(r=r[(n=i[n]).buffer].extras._pipeline.source,t.count),c=getAccessorByteStride(e,t),u=t.byteOffset+n.byteOffset+r.byteOffset,d=(t=t.componentType,ComponentDatatype$1.getSizeInBytes(t)),h=new DataView(r.buffer),p=new Array(a),f=getComponentReader(t),m=0;m<l;m++){f(h,u,a,d,p);for(var g=0;g<a;g++){var y=p[g];o[g]=Math.min(o[g],y),s[g]=Math.max(s[g],y)}u+=c}return{min:o,max:s}}var defaultBlendEquation=[WebGLConstants$1.FUNC_ADD,WebGLConstants$1.FUNC_ADD],defaultBlendFactors=[WebGLConstants$1.ONE,WebGLConstants$1.ZERO,WebGLConstants$1.ONE,WebGLConstants$1.ZERO];function isStateEnabled(e,t){return defined(e=e.enable)&&-1<e.indexOf(t)}var supportedBlendFactors=[WebGLConstants$1.ZERO,WebGLConstants$1.ONE,WebGLConstants$1.SRC_COLOR,WebGLConstants$1.ONE_MINUS_SRC_COLOR,WebGLConstants$1.SRC_ALPHA,WebGLConstants$1.ONE_MINUS_SRC_ALPHA,WebGLConstants$1.DST_ALPHA,WebGLConstants$1.ONE_MINUS_DST_ALPHA,WebGLConstants$1.DST_COLOR,WebGLConstants$1.ONE_MINUS_DST_COLOR];function getSupportedBlendFactors(e,t){if(!defined(e))return t;for(var i=0;i<4;i++)if(-1===supportedBlendFactors.indexOf(e[i]))return t;return e}function moveTechniqueRenderStates(e){var t={},i={};return defined(e.techniques)&&(ForEach.technique(e,(function(e,r){var n,a,o=e.states;defined(o)&&(n=i[r]={},isStateEnabled(o,WebGLConstants$1.BLEND)&&(n.alphaMode="BLEND",defined(a=o.functions)&&(defined(a.blendEquationSeparate)||defined(a.blendFuncSeparate))&&(t[r]={blendEquation:defaultValue(a.blendEquationSeparate,defaultBlendEquation),blendFactors:getSupportedBlendFactors(a.blendFuncSeparate,defaultBlendFactors)})),isStateEnabled(o,WebGLConstants$1.CULL_FACE)||(n.doubleSided=!0),delete e.states)})),0<Object.keys(t).length&&(defined(e.extensions)||(e.extensions={}),addExtensionsUsed(e,"KHR_blend")),ForEach.material(e,(function(e){var r;defined(e.technique)&&(r=i[e.technique],ForEach.objectLegacy(r,(function(t,i){e[i]=t})),defined(r=t[e.technique])&&(defined(e.extensions)||(e.extensions={}),e.extensions.KHR_blend=r))}))),e}function addExtensionsRequired(e,t){var i=e.extensionsRequired;defined(i)||(i=[],e.extensionsRequired=i),addToArray(i,t,!0),addExtensionsUsed(e,t)}function moveTechniquesToExtension(e){var t,i,r=e.techniques,n={},a={};return defined(r)&&(t={programs:[],shaders:[],techniques:[]},i=e.glExtensionsUsed,delete e.glExtensionsUsed,ForEach.technique(e,(function(r,o){var s,l={name:r.name,program:void 0,attributes:{},uniforms:{}};ForEach.techniqueAttribute(r,(function(e,t){s=r.parameters[e],l.attributes[t]={semantic:s.semantic}})),ForEach.techniqueUniform(r,(function(e,t){s=r.parameters[e],l.uniforms[t]={count:s.count,node:s.node,type:s.type,semantic:s.semantic,value:s.value},n[e]=t}));var c=e.programs[r.program],u={name:c.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:i},d=e.shaders[c.fragmentShader];u.fragmentShader=addToArray(t.shaders,d,!0),c=e.shaders[c.vertexShader],u.vertexShader=addToArray(t.shaders,c,!0),l.program=addToArray(t.programs,u),a[o]=addToArray(t.techniques,l)})),0<t.techniques.length&&(defined(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t,addExtensionsUsed(e,"KHR_techniques_webgl"),addExtensionsRequired(e,"KHR_techniques_webgl"))),ForEach.material(e,(function(e){var t;defined(e.technique)&&(t={technique:a[e.technique]},ForEach.objectLegacy(e.values,(function(e,i){defined(t.values)||(t.values={}),i=n[i],t.values[i]=e})),defined(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t),delete e.technique,delete e.values})),delete e.techniques,delete e.programs,delete e.shaders,e}var allElementTypes=["mesh","node","material","accessor","bufferView","buffer"];function removeUnusedElements(e,t){return t=defaultValue(t,allElementTypes),allElementTypes.forEach((function(i){-1<t.indexOf(i)&&removeUnusedElementsByType(e,i)})),e}var TypeToGltfElementName={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",node:"nodes",material:"materials",mesh:"meshes"};function removeUnusedElementsByType(e,t){var i=e[TypeToGltfElementName[t]];if(defined(i))for(var r=0,n=getListOfElementsIdsInUse[t](e),a=i.length,o=0;o<a;++o)n[o]||(Remove[t](e,o-r),r++)}function Remove(){}function getListOfElementsIdsInUse(){}function nodeIsEmpty(e,t){return!(defined(t.mesh)||defined(t.camera)||defined(t.skin)||defined(t.weights)||defined(t.extras)||defined(t.extensions)&&0!==t.extensions.length||defined(t.children)&&0!==t.children.filter((function(t){return!nodeIsEmpty(e,e.nodes[t])})).length)}function addBuffer(e,t){var i={byteLength:t.length,extras:{_pipeline:{source:t}}};t={buffer:addToArray(e.buffers,i),byteOffset:0,byteLength:t.length};return addToArray(e.bufferViews,t)}function readAccessorPacked(e,t){var i=getAccessorByteStride(e,t),r=ComponentDatatype$1.getSizeInBytes(t.componentType),n=numberOfComponentsForType(t.type),a=t.count,o=new Array(n*a);if(!defined(t.bufferView))return arrayFill(o,0),o;for(var s=e.bufferViews[t.bufferView],l=(e=e.buffers[s.buffer].extras._pipeline.source,t.byteOffset+s.byteOffset+e.byteOffset),c=new DataView(e.buffer),u=new Array(n),d=getComponentReader(t.componentType),h=0;h<a;++h){d(c,l,n,r,u);for(var p=0;p<n;++p)o[h*n+p]=u[p];l+=i}return o}function updateAccessorComponentTypes(e){var t;return ForEach.accessorWithSemantic(e,"JOINTS_0",(function(i){i=e.accessors[i],(t=i.componentType)===WebGLConstants$1.BYTE?convertType(e,i,ComponentDatatype$1.UNSIGNED_BYTE):t!==WebGLConstants$1.UNSIGNED_BYTE&&t!==WebGLConstants$1.UNSIGNED_SHORT&&convertType(e,i,ComponentDatatype$1.UNSIGNED_SHORT)})),ForEach.accessorWithSemantic(e,"WEIGHTS_0",(function(i){i=e.accessors[i],(t=i.componentType)===WebGLConstants$1.BYTE?convertType(e,i,ComponentDatatype$1.UNSIGNED_BYTE):t===WebGLConstants$1.SHORT&&convertType(e,i,ComponentDatatype$1.UNSIGNED_SHORT)})),e}function convertType(e,t,i){var r=ComponentDatatype$1.createTypedArray(i,readAccessorPacked(e,t));r=new Uint8Array(r.buffer);t.bufferView=addBuffer(e,r),t.componentType=i,t.byteOffset=0}Remove.accessor=function(e,t){e.accessors.splice(t,1),ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){ForEach.meshPrimitiveAttribute(e,(function(i,r){t<i&&e.attributes[r]--})),ForEach.meshPrimitiveTarget(e,(function(e){ForEach.meshPrimitiveTargetAttribute(e,(function(i,r){t<i&&e[r]--}))}));var i=e.indices;defined(i)&&t<i&&e.indices--}))})),ForEach.skin(e,(function(e){defined(e.inverseBindMatrices)&&e.inverseBindMatrices>t&&e.inverseBindMatrices--})),ForEach.animation(e,(function(e){ForEach.animationSampler(e,(function(e){defined(e.input)&&e.input>t&&e.input--,defined(e.output)&&e.output>t&&e.output--}))}))},Remove.buffer=function(e,t){e.buffers.splice(t,1),ForEach.bufferView(e,(function(e){defined(e.buffer)&&e.buffer>t&&e.buffer--}))},Remove.bufferView=function(e,t){e.bufferViews.splice(t,1),ForEach.accessor(e,(function(e){defined(e.bufferView)&&e.bufferView>t&&e.bufferView--})),ForEach.shader(e,(function(e){defined(e.bufferView)&&e.bufferView>t&&e.bufferView--})),ForEach.image(e,(function(e){defined(e.bufferView)&&e.bufferView>t&&e.bufferView--,ForEach.compressedImage(e,(function(e){var i=e.bufferView;defined(i)&&t<i&&e.bufferView--}))})),hasExtension(e,"KHR_draco_mesh_compression")&&ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.extensions)&&defined(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>t&&e.extensions.KHR_draco_mesh_compression.bufferView--}))}))},Remove.mesh=function(e,t){e.meshes.splice(t,1),ForEach.node(e,(function(e){defined(e.mesh)&&(e.mesh>t?e.mesh--:e.mesh===t&&delete e.mesh)}))},Remove.node=function(e,t){e.nodes.splice(t,1),ForEach.skin(e,(function(e){defined(e.skeleton)&&e.skeleton>t&&e.skeleton--,e.joints=e.joints.map((function(e){return t<e?e-1:e}))})),ForEach.animation(e,(function(e){ForEach.animationChannel(e,(function(e){defined(e.target)&&defined(e.target.node)&&e.target.node>t&&e.target.node--}))})),ForEach.technique(e,(function(e){ForEach.techniqueUniform(e,(function(e){defined(e.node)&&e.node>t&&e.node--}))})),ForEach.node(e,(function(e){defined(e.children)&&(e.children=e.children.filter((function(e){return e!==t})).map((function(e){return t<e?e-1:e})))})),ForEach.scene(e,(function(e){e.nodes=e.nodes.filter((function(e){return e!==t})).map((function(e){return t<e?e-1:e}))}))},Remove.material=function(e,t){e.materials.splice(t,1),ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.material)&&e.material>t&&e.material--}))}))},getListOfElementsIdsInUse.accessor=function(e){var t={};return ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){ForEach.meshPrimitiveAttribute(e,(function(e){t[e]=!0})),ForEach.meshPrimitiveTarget(e,(function(e){ForEach.meshPrimitiveTargetAttribute(e,(function(e){t[e]=!0}))})),defined(e=e.indices)&&(t[e]=!0)}))})),ForEach.skin(e,(function(e){defined(e.inverseBindMatrices)&&(t[e.inverseBindMatrices]=!0)})),ForEach.animation(e,(function(e){ForEach.animationSampler(e,(function(e){defined(e.input)&&(t[e.input]=!0),defined(e.output)&&(t[e.output]=!0)}))})),t},getListOfElementsIdsInUse.buffer=function(e){var t={};return ForEach.bufferView(e,(function(e){defined(e.buffer)&&(t[e.buffer]=!0)})),t},getListOfElementsIdsInUse.bufferView=function(e){var t={};return ForEach.accessor(e,(function(e){defined(e.bufferView)&&(t[e.bufferView]=!0)})),ForEach.shader(e,(function(e){defined(e.bufferView)&&(t[e.bufferView]=!0)})),ForEach.image(e,(function(e){defined(e.bufferView)&&(t[e.bufferView]=!0),ForEach.compressedImage(e,(function(e){defined(e.bufferView)&&(t[e.bufferView]=!0)}))})),hasExtension(e,"KHR_draco_mesh_compression")&&ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.extensions)&&defined(e.extensions.KHR_draco_mesh_compression)&&(t[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)}))})),t},getListOfElementsIdsInUse.mesh=function(e){var t={};return ForEach.node(e,(function(i){var r;!defined(i.mesh&&defined(e.meshes))||defined(r=e.meshes[i.mesh])&&defined(r.primitives)&&0<r.primitives.length&&(t[i.mesh]=!0)})),t},getListOfElementsIdsInUse.node=function(e){var t={};return ForEach.node(e,(function(i,r){nodeIsEmpty(e,i)||(t[r]=!0)})),ForEach.skin(e,(function(e){defined(e.skeleton)&&(t[e.skeleton]=!0),ForEach.skinJoint(e,(function(e){t[e]=!0}))})),ForEach.animation(e,(function(e){ForEach.animationChannel(e,(function(e){defined(e.target)&&defined(e.target.node)&&(t[e.target.node]=!0)}))})),ForEach.technique(e,(function(e){ForEach.techniqueUniform(e,(function(e){defined(e.node)&&(t[e.node]=!0)}))})),t},getListOfElementsIdsInUse.material=function(e){var t={};return ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.material)&&(t[e.material]=!0)}))})),t};var updateFunctions={.8:glTF08to10,"1.0":glTF10to20,"2.0":void 0};function updateVersion(e,t){var i=(t=defaultValue(t,defaultValue.EMPTY_OBJECT)).targetVersion,r=e.version;e.asset=defaultValue(e.asset,{version:"1.0"}),e.asset.version=defaultValue(e.asset.version,"1.0"),r=defaultValue(r,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(updateFunctions,r)||(defined(r)&&(r=r.substring(0,3)),Object.prototype.hasOwnProperty.call(updateFunctions,r)||(r="1.0"));for(var n=updateFunctions[r];defined(n)&&r!==i;)n(e,t),r=e.asset.version,n=updateFunctions[r];return e}function updateInstanceTechniques(e){var t,i,r,n=e.materials;for(t in n)!Object.prototype.hasOwnProperty.call(n,t)||defined(r=(i=n[t]).instanceTechnique)&&(i.technique=r.technique,i.values=r.values,delete i.instanceTechnique)}function setPrimitiveModes(e){var t,i=e.meshes;for(t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var r=i[t].primitives;if(defined(r))for(var n=r.length,a=0;a<n;++a){var o=r[a],s=defaultValue(o.primitive,WebGLConstants$1.TRIANGLES);o.mode=defaultValue(o.mode,s),delete o.primitive}}}function updateNodes(e){var t,i,r,n=e.nodes,a=new Cartesian3,o=new Quaternion;for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(defined((i=n[t]).rotation)&&(r=i.rotation,Cartesian3.fromArray(r,0,a),Quaternion.fromAxisAngle(a,r[3],o),i.rotation=[o.x,o.y,o.z,o.w]),defined(r=i.instanceSkin)&&(i.skeletons=r.skeletons,i.skin=r.skin,i.meshes=r.meshes,delete i.instanceSkin))}function updateAnimations(e){var t,i=e.animations,r=e.accessors,n=e.bufferViews,a=e.buffers,o={},s=new Cartesian3,l=new Quaternion;for(t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var c=i[t],u=c.channels,d=c.parameters,h=c.samplers;if(defined(u))for(var p=u.length,f=0;f<p;++f){if("rotation"===(m=u[f]).target.path)if(!defined(o[g=d[h[m.sampler].output]])){o[g]=!0;for(var m,g=(m=a[(y=n[(C=r[g]).bufferView]).buffer].extras._pipeline.source).byteOffset+y.byteOffset+C.byteOffset,y=C.componentType,_=C.count,v=numberOfComponentsForType(C.type),C=C.count*v,x=ComponentDatatype$1.createArrayBufferView(y,m.buffer,g,C),b=0;b<_;b++){var S=b*v;Cartesian3.unpack(x,S,s);var T=x[3+S];Quaternion.fromAxisAngle(s,T,l),Quaternion.pack(l,x,S)}}}}}function removeTechniquePasses(e){var t,i,r,n,a=e.techniques;for(t in a)!Object.prototype.hasOwnProperty.call(a,t)||defined(r=(i=a[t]).passes)&&(n=defaultValue(i.pass,"defaultPass"),Object.prototype.hasOwnProperty.call(r,n)&&(n=(r=r[n]).instanceProgram,i.attributes=defaultValue(i.attributes,n.attributes),i.program=defaultValue(i.program,n.program),i.uniforms=defaultValue(i.uniforms,n.uniforms),i.states=defaultValue(i.states,r.states)),delete i.passes,delete i.pass)}function glTF08to10(e){defined(e.asset)||(e.asset={});var t,i=e.asset;i.version="1.0","string"==typeof i.profile?(t=i.profile.split(" "),i.profile={api:t[0],version:t[1]}):i.profile={},defined(e.version)&&delete e.version,updateInstanceTechniques(e),setPrimitiveModes(e),updateNodes(e),updateAnimations(e),removeTechniquePasses(e),defined(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),defined(e.lights)&&(t=defaultValue(e.extensions,{}),i=defaultValue((e.extensions=t).KHR_materials_common,{}),(t.KHR_materials_common=i).lights=e.lights,delete e.lights,addExtensionsUsed(e,"KHR_materials_common"))}function removeAnimationSamplersIndirection(e){var t,i=e.animations;for(t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var r=i[t],n=r.parameters;if(defined(n)){var a,o,s=r.samplers;for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&((o=s[a]).input=n[o.input],o.output=n[o.output]);delete r.parameters}}}function objectToArray(e,t){var i,r,n=[];for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r=e[i],t[i]=n.length,n.push(r),defined(r.name)||(r.name=i));return n}function objectsToArrays(e){var t,i,r,n,a,o,s={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},l={},c=e.nodes;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&defined(i=c[r].jointName)&&(l[i]=r);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&defined(s[n])&&(a={},o=e[n],e[n]=objectToArray(o,a),s[n]=a);for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(l[i]=s.nodes[l[i]]);defined(e.scene)&&(e.scene=s.scenes[e.scene]),ForEach.bufferView(e,(function(e){defined(e.buffer)&&(e.buffer=s.buffers[e.buffer])})),ForEach.accessor(e,(function(e){defined(e.bufferView)&&(e.bufferView=s.bufferViews[e.bufferView])})),ForEach.shader(e,(function(e){var t,i=e.extensions;defined(i)&&(defined(t=i.KHR_binary_glTF)&&(e.bufferView=s.bufferViews[t.bufferView],delete i.KHR_binary_glTF),0===Object.keys(i).length&&delete e.extensions)})),ForEach.program(e,(function(e){defined(e.vertexShader)&&(e.vertexShader=s.shaders[e.vertexShader]),defined(e.fragmentShader)&&(e.fragmentShader=s.shaders[e.fragmentShader])})),ForEach.technique(e,(function(e){defined(e.program)&&(e.program=s.programs[e.program]),ForEach.techniqueParameter(e,(function(e){defined(e.node)&&(e.node=s.nodes[e.node]);var t=e.value;"string"==typeof t&&(e.value={index:s.textures[t]})}))})),ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){defined(e.indices)&&(e.indices=s.accessors[e.indices]),ForEach.meshPrimitiveAttribute(e,(function(t,i){e.attributes[i]=s.accessors[t]})),defined(e.material)&&(e.material=s.materials[e.material])}))})),ForEach.node(e,(function(i){var r,n=i.children;if(defined(n)){var a=n.length;for(t=0;t<a;++t)n[t]=s.nodes[n[t]]}if(defined(i.meshes)){var o=i.meshes,l=o.length;if(0<l)for(i.mesh=s.meshes[o[0]],t=1;t<l;++t){var c={mesh:s.meshes[o[t]]};c=addToArray(e.nodes,c);defined(n)||(n=[],i.children=n),n.push(c)}delete i.meshes}defined(i.camera)&&(i.camera=s.cameras[i.camera]),defined(i.skin)&&(i.skin=s.skins[i.skin]),defined(i.skeletons)&&(0<(r=i.skeletons).length&&defined(i.skin)&&(e.skins[i.skin].skeleton=s.nodes[r[0]]),delete i.skeletons),defined(i.jointName)&&delete i.jointName})),ForEach.skin(e,(function(e){defined(e.inverseBindMatrices)&&(e.inverseBindMatrices=s.accessors[e.inverseBindMatrices]);var i=e.jointNames;if(defined(i)){var r=[],n=i.length;for(t=0;t<n;++t)r[t]=l[i[t]];e.joints=r,delete e.jointNames}})),ForEach.scene(e,(function(e){var i=e.nodes;if(defined(i)){var r=i.length;for(t=0;t<r;++t)i[t]=s.nodes[i[t]]}})),ForEach.animation(e,(function(e){var t={};e.samplers=objectToArray(e.samplers,t),ForEach.animationSampler(e,(function(e){e.input=s.accessors[e.input],e.output=s.accessors[e.output]})),ForEach.animationChannel(e,(function(e){e.sampler=t[e.sampler],defined(e=e.target)&&(e.node=s.nodes[e.id],delete e.id)}))})),ForEach.material(e,(function(e){defined(e.technique)&&(e.technique=s.techniques[e.technique]),ForEach.materialValue(e,(function(t,i){"string"==typeof t&&(e.values[i]={index:s.textures[t]})}));var t,i=e.extensions;!defined(i)||defined(t=i.KHR_materials_common)&&ForEach.materialValue(t,(function(e,i){"string"==typeof e&&(t.values[i]={index:s.textures[e]})}))})),ForEach.image(e,(function(e){var t,i=e.extensions;defined(i)&&(defined(t=i.KHR_binary_glTF)&&(e.bufferView=s.bufferViews[t.bufferView],e.mimeType=t.mimeType,delete i.KHR_binary_glTF),0===Object.keys(i).length&&delete e.extensions),ForEach.compressedImage(e,(function(e){var t,r=e.extensions;defined(r)&&(defined(t=r.KHR_binary_glTF)&&(e.bufferView=s.bufferViews[t.bufferView],e.mimeType=t.mimeType,delete r.KHR_binary_glTF),0===Object.keys(i).length&&delete e.extensions)}))})),ForEach.texture(e,(function(e){defined(e.sampler)&&(e.sampler=s.samplers[e.sampler]),defined(e.source)&&(e.source=s.images[e.source])}))}function removeAnimationSamplerNames(e){ForEach.animation(e,(function(e){ForEach.animationSampler(e,(function(e){delete e.name}))}))}function removeEmptyArrays(e){for(var t in e){var i;Object.prototype.hasOwnProperty.call(e,t)&&(i=e[t],Array.isArray(i)&&0===i.length&&delete e[t])}ForEach.node(e,(function(e){defined(e.children)&&0===e.children.length&&delete e.children}))}function stripAsset(e){delete(e=e.asset).profile,delete e.premultipliedAlpha}var knownExtensions={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function requireKnownExtensions(e){var t=e.extensionsUsed;if(e.extensionsRequired=defaultValue(e.extensionsRequired,[]),defined(t))for(var i=t.length,r=0;r<i;++r){var n=t[r];defined(knownExtensions[n])&&e.extensionsRequired.push(n)}}function removeBufferType(e){ForEach.buffer(e,(function(e){delete e.type}))}function removeTextureProperties(e){ForEach.texture(e,(function(e){delete e.format,delete e.internalFormat,delete e.target,delete e.type}))}function requireAttributeSetIndex(e){ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){ForEach.meshPrimitiveAttribute(e,(function(t,i){"TEXCOORD"===i?e.attributes.TEXCOORD_0=t:"COLOR"===i&&(e.attributes.COLOR_0=t)})),delete e.attributes.TEXCOORD,delete e.attributes.COLOR}))})),ForEach.technique(e,(function(e){ForEach.techniqueParameter(e,(function(e){var t=e.semantic;defined(t)&&("TEXCOORD"===t?e.semantic="TEXCOORD_0":"COLOR"===t&&(e.semantic="COLOR_0"))}))}))}var knownSemantics={POSITION:!0,NORMAL:!0,TANGENT:!0},indexedSemantics={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function underscoreApplicationSpecificSemantics(e){var t={};ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){for(var i in ForEach.meshPrimitiveAttribute(e,(function(e,i){var r,n,a,o;"_"!==i.charAt(0)&&(o=i.search(/_[0-9]+/g),r=i,n="_0",0<=o&&(r=i.substring(0,o),n=i.substring(o)),defined(o=indexedSemantics[r])?(a=o+n,t[i]=a):defined(knownSemantics[r])||(a="_"+i,t[i]=a))})),t){var r,n;Object.prototype.hasOwnProperty.call(t,i)&&(r=t[i],defined(n=e.attributes[i])&&(delete e.attributes[i],e.attributes[r]=n))}}))})),ForEach.technique(e,(function(e){ForEach.techniqueParameter(e,(function(e){var i=t[e.semantic];defined(i)&&(e.semantic=i)}))}))}function clampCameraParameters(e){ForEach.camera(e,(function(e){var t=e.perspective;defined(t)&&(defined(e=t.aspectRatio)&&0===e&&delete t.aspectRatio,defined(e=t.yfov)&&0===e&&(t.yfov=1))}))}function computeAccessorByteStride(e,t){return defined(t.byteStride)&&0!==t.byteStride?t.byteStride:getAccessorByteStride(e,t)}function requireByteLength(e){ForEach.buffer(e,(function(e){defined(e.byteLength)||(e.byteLength=e.extras._pipeline.source.length)})),ForEach.accessor(e,(function(t){var i,r=t.bufferView;defined(r)&&(i=e.bufferViews[r],r=computeAccessorByteStride(e,t),r=t.byteOffset+t.count*r,i.byteLength=Math.max(defaultValue(i.byteLength,0),r))}))}function moveByteStrideToBufferView(e){var t,i=e.bufferViews,r={};ForEach.accessorContainingVertexAttributeData(e,(function(t){defined((t=e.accessors[t]).bufferView)&&(r[t.bufferView]=!0)}));var n,a={};for(n in ForEach.accessor(e,(function(e){defined(e.bufferView)&&(a[e.bufferView]=defaultValue(a[e.bufferView],[]),a[e.bufferView].push(e))})),a)if(Object.prototype.hasOwnProperty.call(a,n)){t=i[n];var o=a[n];o.sort((function(e,t){return e.byteOffset-t.byteOffset}));for(var s=0,l=0,c=o.length,u=0;u<c;++u){var d=o[u],h=computeAccessorByteStride(e,d),p=d.byteOffset,f=d.count*h;delete d.byteStride;var m=u<c-1;if(h!==(m?computeAccessorByteStride(e,o[u+1]):void 0)){var g=clone(t,!0);r[n]&&(g.byteStride=h),g.byteOffset+=s,g.byteLength=p+f-s;for(var y=addToArray(i,g),_=l;_<=u;++_)(d=o[_]).bufferView=y,d.byteOffset=d.byteOffset-s;s=m?o[u+1].byteOffset:void 0,l=u+1}}}removeUnusedElements(e,["accessor","bufferView","buffer"])}function requirePositionAccessorMinMax(e){ForEach.accessorWithSemantic(e,"POSITION",(function(t){var i=e.accessors[t];defined(i.min)&&defined(i.max)||(t=findAccessorMinMax(e,i),i.min=t.min,i.max=t.max)}))}function isNodeEmpty(e){return(!defined(e.children)||0===e.children.length)&&(!defined(e.meshes)||0===e.meshes.length)&&!defined(e.camera)&&!defined(e.skin)&&!defined(e.skeletons)&&!defined(e.jointName)&&(!defined(e.translation)||Cartesian3.fromArray(e.translation).equals(Cartesian3.ZERO))&&(!defined(e.scale)||Cartesian3.fromArray(e.scale).equals(new Cartesian3(1,1,1)))&&(!defined(e.rotation)||Cartesian4.fromArray(e.rotation).equals(new Cartesian4(0,0,0,1)))&&(!defined(e.matrix)||Matrix4.fromColumnMajorArray(e.matrix).equals(Matrix4.IDENTITY))&&!defined(e.extensions)&&!defined(e.extras)}function deleteNode(e,t){ForEach.scene(e,(function(e){var i=e.nodes;if(defined(i))for(var r=i.length;0<=r;--r)if(i[r]===t)return void i.splice(r,1)})),ForEach.node(e,(function(i,r){var n;!defined(i.children)||-1<(n=i.children.indexOf(t))&&(i.children.splice(n,1),isNodeEmpty(i)&&deleteNode(e,r))})),delete e.nodes[t]}function removeEmptyNodes(e){return ForEach.node(e,(function(t,i){isNodeEmpty(t)&&deleteNode(e,i)})),e}function requireAnimationAccessorMinMax(e){ForEach.animation(e,(function(t){ForEach.animationSampler(t,(function(t){var i=e.accessors[t.input];defined(i.min)&&defined(i.max)||(t=findAccessorMinMax(e,i),i.min=t.min,i.max=t.max)}))}))}function glTF10to20(e){e.asset=defaultValue(e.asset,{}),e.asset.version="2.0",updateInstanceTechniques(e),removeAnimationSamplersIndirection(e),removeEmptyNodes(e),objectsToArrays(e),removeAnimationSamplerNames(e),stripAsset(e),requireKnownExtensions(e),requireByteLength(e),moveByteStrideToBufferView(e),requirePositionAccessorMinMax(e),requireAnimationAccessorMinMax(e),removeBufferType(e),removeTextureProperties(e),requireAttributeSetIndex(e),underscoreApplicationSpecificSemantics(e),updateAccessorComponentTypes(e),clampCameraParameters(e),moveTechniqueRenderStates(e),moveTechniquesToExtension(e),removeEmptyArrays(e)}function ModelLoadResources(){this.initialized=!1,this.resourcesParsed=!1,this.vertexBuffersToCreate=new Queue,this.indexBuffersToCreate=new Queue,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new Queue,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new Queue,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new Queue,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.createdBufferViews={},this.primitivesToDecode=new Queue,this.activeDecodingTasks=0,this.pendingDecodingCache=!1,this.skinnedNodesIds=[]}function getSubarray(e,t,i){return e.subarray(t,t+i)}ModelLoadResources.prototype.getBuffer=function(e){return getSubarray(this.buffers[e.buffer],e.byteOffset,e.byteLength)},ModelLoadResources.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},ModelLoadResources.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length},ModelLoadResources.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},ModelLoadResources.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},ModelLoadResources.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return this.finishedDecoding()&&e&&t},ModelLoadResources.prototype.finishedDecoding=function(){return 0===this.primitivesToDecode.length&&0===this.activeDecodingTasks&&!this.pendingDecodingCache},ModelLoadResources.prototype.finished=function(){return this.finishedDecoding()&&this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()};var ModelUtility={updateForwardAxis:function(e){var t=e.gltf.extras.sourceVersion;(defined(t)&&"2.0"!==t||"2.0"!==ModelUtility.getAssetVersion(e.gltf))&&(e._gltfForwardAxis=Axis$1.X)},getAssetVersion:function(e){return defined(e.asset)&&defined(e.asset.version)?e.asset.version:"1.0"},splitIncompatibleMaterials:function(e){var t=e.accessors,i=e.materials,r={};return ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){var n,a=e.material,o=i[a];defined(f=e.attributes.JOINTS_0)&&(n=(p=t[f]).componentType,m=p.type);var s=defined(f)&&"VEC4"===m,l=defined(e.attributes.COLOR_0),c=defined(e.targets),u=defined(e.attributes.NORMAL),d=defined(e.attributes.TANGENT),h=defined(e.attributes.TEXCOORD_0),p=h&&defined(e.attributes.TEXCOORD_1),f=defined(e.extensions)&&defined(e.extensions.CESIUM_primitive_outline),m=r[a];defined(m)?m.skinning.skinned===s&&m.hasVertexColors===l&&m.hasMorphTargets===c&&m.hasNormals===u&&m.hasTangents===d&&m.hasTexCoords===h&&m.hasTexCoord1===p&&m.hasOutline===f||(o=clone(o,!0),a=addToArray(i,o),e.material=a,r[a]={skinning:{skinned:s,componentType:n},hasVertexColors:l,hasMorphTargets:c,hasNormals:u,hasTangents:d,hasTexCoords:h,hasTexCoord1:p,hasOutline:f}):r[a]={skinning:{skinned:s,componentType:n},hasVertexColors:l,hasMorphTargets:c,hasNormals:u,hasTangents:d,hasTexCoords:h,hasTexCoord1:p,hasOutline:f}}))})),r},getShaderVariable:function(e){return"SCALAR"===e?"float":e.toLowerCase()},ModelState:{NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},getFailedLoadFunction:function(e,t,i){return function(r){e._state=ModelUtility.ModelState.FAILED;var n="Failed to load "+t+": "+i;defined(r)&&(n+="\n"+r.message),e._readyPromise.reject(new RuntimeError(n))}},parseBuffers:function(e,t){var i=e._loadResources;ForEach.buffer(e.gltf,(function(r,n){defined(r.extras._pipeline.source)?i.buffers[n]=r.extras._pipeline.source:defined(t)&&(r=e._resource.getDerivedResource({url:r.uri}),++i.pendingBufferLoads,r.fetchArrayBuffer().then(t(e,n)).otherwise(ModelUtility.getFailedLoadFunction(e,"buffer",r.url)))}))}},aMinScratch=new Cartesian3,aMaxScratch=new Cartesian3;function techniqueAttributeForSemantic(e,t){return ForEach.techniqueAttribute(e,(function(e,i){if(e.semantic===t)return i}))}function ensureSemanticExistenceForPrimitive(e,t){var i,r=e.accessors,n=e.materials,a=(o=e.extensions.KHR_techniques_webgl).techniques,o=(e=o.programs,o.shaders),s=t.targets,l=t.attributes;for(i in s)if(s.hasOwnProperty(i)){var c,u=s[i];for(c in u)"extras"!==c&&(l[c+"_"+i]=u[c])}var d,h,p,f,m,g=a[n[t.material].extensions.KHR_techniques_webgl.technique],y=o[e[g.program].vertexShader];for(d in l)l.hasOwnProperty(d)&&(defined(techniqueAttributeForSemantic(g,d))||(h=r[l[d]],"_"===(m=d.toLowerCase()).charAt(0)&&(m=m.slice(1)),p="a_"+m,g.attributes[p]={semantic:d,type:h.componentType},m=(f=y.extras._pipeline).source,m="attribute "+ModelUtility.getShaderVariable(h.type)+" "+p+";\n"+m,f.source=m))}function getTechniqueAttributeOrUniformFunction(e,t,i,r){return hasExtension(e,"KHR_techniques_webgl")?function(e,t){if(!(e.semantic!==i||r&&defined(e.node)))return t}:function(e,n){if(!((e=t.parameters[e]).semantic!==i||r&&defined(e.node)))return n}}ModelUtility.computeBoundingSphere=function(e){for(var t=e.gltf,i=t.nodes,r=t.meshes,n=t.scenes[t.scene].nodes,a=n.length,o=[],s=new Cartesian3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),l=new Cartesian3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),c=0;c<a;++c){var u=i[n[c]];for(u._transformToRoot=ModelUtility.getTransform(u),o.push(u);0<o.length;){var d=(u=o.pop())._transformToRoot,h=u.mesh;if(defined(h))for(var p=r[h].primitives,f=p.length,m=0;m<f;++m){var g,y=p[m].attributes.POSITION;!defined(y)||defined((g=ModelUtility.getAccessorMinMax(t,y)).min)&&defined(g.max)&&(y=Cartesian3.fromArray(g.min,0,aMinScratch),g=Cartesian3.fromArray(g.max,0,aMaxScratch),Matrix4.multiplyByPoint(d,y,y),Matrix4.multiplyByPoint(d,g,g),Cartesian3.minimumByComponent(s,y,s),Cartesian3.maximumByComponent(l,g,l))}var _=u.children;if(defined(_))for(var v=_.length,C=0;C<v;++C){var x=i[_[C]];x._transformToRoot=ModelUtility.getTransform(x),Matrix4.multiplyTransformation(d,x._transformToRoot,x._transformToRoot),o.push(x)}delete u._transformToRoot}}var b=BoundingSphere.fromCornerPoints(s,l);return e._forwardAxis===Axis$1.Z&&BoundingSphere.transformWithoutScale(b,Axis$1.Z_UP_TO_X_UP,b),e._upAxis===Axis$1.Y?BoundingSphere.transformWithoutScale(b,Axis$1.Y_UP_TO_Z_UP,b):e._upAxis===Axis$1.X&&BoundingSphere.transformWithoutScale(b,Axis$1.X_UP_TO_Z_UP,b),b},ModelUtility.ensureSemanticExistence=function(e){return ForEach.mesh(e,(function(t){ForEach.meshPrimitive(t,(function(t){ensureSemanticExistenceForPrimitive(e,t)}))})),e},ModelUtility.createAttributeLocations=function(e,t){var i={},r=!1,n=1;if(ForEach.techniqueAttribute(e,(function(e,t){/pos/i.test(t)&&!r?(i[t]=0,r=!0):i[t]=n++})),defined(t))for(var a in t)t.hasOwnProperty(a)&&(i[a]=n++);return i},ModelUtility.getAccessorMinMax=function(e,t){e=(i=e.accessors[t]).extensions,t=i.min;var i=i.max;return!defined(e)||defined(e=e.WEB3D_quantized_attributes)&&(t=e.decodedMin,i=e.decodedMax),{min:t,max:i}},ModelUtility.getAttributeOrUniformBySemantic=function(e,t,i,r){return ForEach.technique(e,(function(n){if(!defined(i)||n.program===i){var a=ForEach.techniqueAttribute(n,getTechniqueAttributeOrUniformFunction(e,n,t,r));return defined(a)?a:ForEach.techniqueUniform(n,getTechniqueAttributeOrUniformFunction(e,n,t,r))}}))},ModelUtility.getDiffuseAttributeOrUniform=function(e,t){var i=ModelUtility.getAttributeOrUniformBySemantic(e,"COLOR_0",t);return defined(i)||(i=ModelUtility.getAttributeOrUniformBySemantic(e,"_3DTILESDIFFUSE",t)),i};var nodeTranslationScratch=new Cartesian3,nodeQuaternionScratch=new Quaternion,nodeScaleScratch=new Cartesian3;function replaceAllButFirstInString(e,t,i){t+="(?!\\w)",t=new RegExp(t,"g");var r=e.search(t);return e.replace(t,(function(e,t){return r===t?e:i}))}function getQuantizedAttributes(e,t){if(defined(t=e.accessors[t].extensions))return t.WEB3D_quantized_attributes}function getAttributeVariableName(e,t,i){if(t=t.material,t=e.materials[t],hasExtension(e,"KHR_techniques_webgl")&&defined(t.extensions)&&defined(t.extensions.KHR_techniques_webgl))return t=t.extensions.KHR_techniques_webgl.technique,t=e.extensions.KHR_techniques_webgl.techniques[t],ForEach.techniqueAttribute(t,(function(e,t){if(e.semantic===i)return t}))}function getScalarUniformFunction(e){var t={value:e,clone:function(e,t){return e},func:function(){return t.value}};return t}function getVec2UniformFunction(e){var t={value:Cartesian2.fromArray(e),clone:Cartesian2.clone,func:function(){return t.value}};return t}function getVec3UniformFunction(e){var t={value:Cartesian3.fromArray(e),clone:Cartesian3.clone,func:function(){return t.value}};return t}function getVec4UniformFunction(e){var t={value:Cartesian4.fromArray(e),clone:Cartesian4.clone,func:function(){return t.value}};return t}function getMat2UniformFunction(e){var t={value:Matrix2.fromColumnMajorArray(e),clone:Matrix2.clone,func:function(){return t.value}};return t}function getMat3UniformFunction(e){var t={value:Matrix3.fromColumnMajorArray(e),clone:Matrix3.clone,func:function(){return t.value}};return t}function getMat4UniformFunction(e){var t={value:Matrix4.fromColumnMajorArray(e),clone:Matrix4.clone,func:function(){return t.value}};return t}function DelayLoadedTextureUniform(e,t,i){this._value=void 0,this._textureId=e.index,this._textures=t,this._defaultTexture=i}function getTextureUniformFunction(e,t,i){var r=new DelayLoadedTextureUniform(e,t,i);return r.func=function(){return r.value},r}ModelUtility.getTransform=function(e,t){return defined(e.matrix)?Matrix4.fromColumnMajorArray(e.matrix,t):Matrix4.fromTranslationQuaternionRotationScale(Cartesian3.fromArray(e.translation,0,nodeTranslationScratch),Quaternion.unpack(e.rotation,0,nodeQuaternionScratch),Cartesian3.fromArray(e.scale,0,nodeScaleScratch),t)},ModelUtility.getUsedExtensions=function(e){var t=e.extensionsUsed,i={};if(defined(t))for(var r=t.length,n=0;n<r;n++)i[t[n]]=!0;return i},ModelUtility.getRequiredExtensions=function(e){var t=e.extensionsRequired,i={};if(defined(t))for(var r=t.length,n=0;n<r;n++)i[t[n]]=!0;return i},ModelUtility.supportedExtensions={AGI_articulations:!0,CESIUM_RTC:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_binary_glTF:!0,KHR_draco_mesh_compression:!0,KHR_materials_common:!0,KHR_techniques_webgl:!0,KHR_materials_unlit:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0},ModelUtility.checkSupportedExtensions=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){if(!ModelUtility.supportedExtensions[i])throw new RuntimeError("Unsupported glTF Extension: "+i);if("EXT_texture_webp"===i&&!1===t)throw new RuntimeError("Loaded model requires WebP but browser does not support it.")}},ModelUtility.checkSupportedGlExtensions=function(e,t){if(defined(e))for(var i=e.length,r=0;r<i;r++){var n=e[r];if("OES_element_index_uint"!==n)throw new RuntimeError("Unsupported WebGL Extension: "+n);if(!t.elementIndexUint)throw new RuntimeError("OES_element_index_uint WebGL extension is not enabled.")}},ModelUtility.modifyShaderForDracoQuantizedAttributes=function(e,t,i,r){var n,a,o,s,l,c,u,d,h,p,f={};for(n in r)!r.hasOwnProperty(n)||defined(a=(u=r[n]).quantization)&&(o=getAttributeVariableName(e,t,n),"_"===n.charAt(0)&&(n=n.substring(1)),defined(f[h="gltf_u_dec_"+n.toLowerCase()])||(s="gltf_decoded_"+n,l=o.replace("a_","gltf_a_dec_"),p=u.componentsPerAttribute,i=replaceAllButFirstInString(i,o,l),i=(c=a.octEncoded?"vec3":1<p?"vec"+p:"float")+" "+l+";\n"+i,(u=3===p&&"COLOR_0"===n)&&(i=replaceAllButFirstInString(i,l,"vec4("+l+", 1.0)")),p="",p=a.octEncoded?(i="uniform float "+(d=h+"_rangeConstant")+";\n"+i,"\nvoid main() {\n    "+l+" = czm_octDecode("+o+".xy, "+d+").zxy;\n    "+s+"();\n}\n"):(i="uniform float "+(d=h+"_normConstant")+";\nuniform "+c+" "+(h+="_min")+";\n"+i,"\nvoid main() {\n    "+l+" = "+h+" + "+o+(u?".xyz":"")+" * "+d+";\n    "+s+"();\n}\n"),i=ShaderSource.replaceMain(i,s),i+=p));return{shader:i}},ModelUtility.modifyShaderForQuantizedAttributes=function(e,t,i){var r,n,a,o,s,l,c,u,d,h,p={},f=t.attributes;for(r in f)f.hasOwnProperty(r)&&(n=getAttributeVariableName(e,t,r),u=t.attributes[r],"_"===r.charAt(0)&&(r=r.substring(1)),o=(a="gltf_u_dec_"+r.toLowerCase())+"_scale",s=a+"_translate",defined(p[a])||defined(p[o])||defined(d=getQuantizedAttributes(e,u))&&(h=d.decodeMatrix,l="gltf_decoded_"+r,c=n.replace("a_","gltf_a_dec_"),i=(d=2<(u=Math.floor(Math.sqrt(h.length)))?"vec"+(u-1):"float")+" "+c+";\n"+(i=replaceAllButFirstInString(i,n,c)),h="",5===u?(i="uniform vec4 "+s+";\n"+(i="uniform mat4 "+o+";\n"+i),h="\nvoid main() {\n    "+c+" = "+o+" * "+n+" + "+s+";\n    "+l+"();\n}\n",p[o]={mat:4},p[s]={vec:4}):(i="uniform mat"+u+" "+a+";\n"+i,h="\nvoid main() {\n    "+c+" = "+d+"("+a+" * vec"+u+"("+n+",1.0));\n    "+l+"();\n}\n",p[a]={mat:u}),i=ShaderSource.replaceMain(i,l),i+=h));return{shader:i,uniforms:p}},Object.defineProperties(DelayLoadedTextureUniform.prototype,{value:{get:function(){if(!defined(this._value)){var e=this._textures[this._textureId];if(!defined(e))return this._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),DelayLoadedTextureUniform.prototype.clone=function(e){return e},DelayLoadedTextureUniform.prototype.func=void 0;var gltfUniformFunctions={};function scaleFromMatrix5Array(e){return[e[0],e[1],e[2],e[3],e[5],e[6],e[7],e[8],e[10],e[11],e[12],e[13],e[15],e[16],e[17],e[18]]}function translateFromMatrix5Array(e){return[e[20],e[21],e[22],e[23]]}gltfUniformFunctions[WebGLConstants$1.FLOAT]=getScalarUniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_VEC2]=getVec2UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_VEC3]=getVec3UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_VEC4]=getVec4UniformFunction,gltfUniformFunctions[WebGLConstants$1.INT]=getScalarUniformFunction,gltfUniformFunctions[WebGLConstants$1.INT_VEC2]=getVec2UniformFunction,gltfUniformFunctions[WebGLConstants$1.INT_VEC3]=getVec3UniformFunction,gltfUniformFunctions[WebGLConstants$1.INT_VEC4]=getVec4UniformFunction,gltfUniformFunctions[WebGLConstants$1.BOOL]=getScalarUniformFunction,gltfUniformFunctions[WebGLConstants$1.BOOL_VEC2]=getVec2UniformFunction,gltfUniformFunctions[WebGLConstants$1.BOOL_VEC3]=getVec3UniformFunction,gltfUniformFunctions[WebGLConstants$1.BOOL_VEC4]=getVec4UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_MAT2]=getMat2UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_MAT3]=getMat3UniformFunction,gltfUniformFunctions[WebGLConstants$1.FLOAT_MAT4]=getMat4UniformFunction,gltfUniformFunctions[WebGLConstants$1.SAMPLER_2D]=getTextureUniformFunction,ModelUtility.createUniformFunction=function(e,t,i,r){return gltfUniformFunctions[e](t,i,r)},ModelUtility.createUniformsForDracoQuantizedAttributes=function(e){var t,i={};for(t in e)if(e.hasOwnProperty(t)){var r=e[t],n=r.quantization;if(defined(n)){"_"===t.charAt(0)&&(t=t.substring(1));var a="gltf_u_dec_"+t.toLowerCase();if(n.octEncoded){var o=a+"_rangeConstant",s=(1<<n.quantizationBits)-1;i[o]=getScalarUniformFunction(s).func}else switch(o=a+"_normConstant",s=n.range/(1<<n.quantizationBits),i[o]=getScalarUniformFunction(s).func,a+="_min",r.componentsPerAttribute){case 1:i[a]=getScalarUniformFunction(n.minValues).func;break;case 2:i[a]=getVec2UniformFunction(n.minValues).func;break;case 3:i[a]=getVec3UniformFunction(n.minValues).func;break;case 4:i[a]=getVec4UniformFunction(n.minValues).func}}}return i},ModelUtility.createUniformsForQuantizedAttributes=function(e,t,i){var r,n,a,o=e.accessors,s={},l={},c=t.attributes;for(r in c)if(c.hasOwnProperty(r)){var u=o[c[r]],d=u.extensions;if("_"===r.charAt(0)&&(r=r.substring(1)),defined(d)){var h=d.WEB3D_quantized_attributes;if(defined(h))switch(d=h.decodeMatrix,h="gltf_u_dec_"+r.toLowerCase(),u.type){case AttributeType$1.SCALAR:l[h]=getMat2UniformFunction(d).func,s[h]=!0;break;case AttributeType$1.VEC2:l[h]=getMat3UniformFunction(d).func,s[h]=!0;break;case AttributeType$1.VEC3:l[h]=getMat4UniformFunction(d).func,s[h]=!0;break;case AttributeType$1.VEC4:u=h+"_scale",h+="_translate",l[u]=getMat4UniformFunction(scaleFromMatrix5Array(d)).func,l[h]=getVec4UniformFunction(translateFromMatrix5Array(d)).func,s[u]=!0,s[h]=!0}}}for(n in i)i.hasOwnProperty(n)&&(s[n]||(defined((a=i[n]).mat)&&(2===a.mat?l[n]=getMat2UniformFunction(Matrix2.IDENTITY).func:3===a.mat?l[n]=getMat3UniformFunction(Matrix3.IDENTITY).func:4===a.mat&&(l[n]=getMat4UniformFunction(Matrix4.IDENTITY).func)),defined(a.vec)&&4===a.vec&&(l[n]=getVec4UniformFunction([0,0,0,0]).func)));return l};var scratchTranslationRtc=new Cartesian3,gltfSemanticUniforms={MODEL:function(e,t){return function(){return e.model}},VIEW:function(e,t){return function(){return e.view}},PROJECTION:function(e,t){return function(){return e.projection}},MODELVIEW:function(e,t){return function(){return e.modelView}},CESIUM_RTC_MODELVIEW:function(e,t){var i=new Matrix4;return function(){return defined(t._rtcCenter)?(Matrix4.getTranslation(e.model,scratchTranslationRtc),Cartesian3.add(scratchTranslationRtc,t._rtcCenter,scratchTranslationRtc),Matrix4.multiplyByPoint(e.view,scratchTranslationRtc,scratchTranslationRtc),Matrix4.setTranslation(e.modelView,scratchTranslationRtc,i)):e.modelView}},MODELVIEWPROJECTION:function(e,t){return function(){return e.modelViewProjection}},MODELINVERSE:function(e,t){return function(){return e.inverseModel}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t){return function(){return e.inverseModelView}},MODELVIEWPROJECTIONINVERSE:function(e,t){return function(){return e.inverseModelViewProjection}},MODELINVERSETRANSPOSE:function(e,t){return function(){return e.inverseTransposeModel}},MODELVIEWINVERSETRANSPOSE:function(e,t){return function(){return e.normal}},VIEWPORT:function(e,t){return function(){return e.viewportCartesian4}}};function processModelMaterialsCommon(e,t){if(t=defaultValue(t,defaultValue.EMPTY_OBJECT),defined(e)&&hasExtension(e,"KHR_materials_common")){hasExtension(e,"KHR_techniques_webgl")||(defined(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl"));var i=e.extensions.KHR_techniques_webgl;lightDefaults(e);var r=generateLightParameters(e),n=ModelUtility.splitIncompatibleMaterials(e),a={},o=!1;return ForEach.material(e,(function(s,l){if(defined(s.extensions)&&defined(s.extensions.KHR_materials_common)){var c=s.extensions.KHR_materials_common,u=n[l],d=getTechniqueKey(c,u);defined(l=a[d])||(l=generateTechnique(e,i,u,c,r,t.addBatchIdToGeneratedShaders),a[d]=l,o=!0);var h,p={},f=c.values;for(h in f)f.hasOwnProperty(h)&&"transparent"!==h&&"doubleSided"!==h&&(p["u_"+h.toLowerCase()]=f[h]);s.extensions.KHR_techniques_webgl={technique:l,values:p},s.alphaMode="OPAQUE",c.transparent&&(s.alphaMode="BLEND"),c.doubleSided&&(s.doubleSided=!0)}})),o?(ModelUtility.ensureSemanticExistence(e),e):e}}function generateLightParameters(e){var t,i={};if(defined(e.extensions)&&defined(e.extensions.KHR_materials_common)&&(t=e.extensions.KHR_materials_common.lights),defined(t)){var r,n,a,o=e.nodes;for(r in o)!o.hasOwnProperty(r)||defined((n=o[r]).extensions)&&defined(n.extensions.KHR_materials_common)&&(defined(a=n.extensions.KHR_materials_common.light)&&defined(t[a])&&(t[a].node=r),delete n.extensions.KHR_materials_common);var s,l=0;for(s in t)if(t.hasOwnProperty(s)){var c=t[s],u=c.type;if("ambient"===u||defined(c.node)){var d="light"+l.toString();switch(c.baseName=d,u){case"ambient":var h=c.ambient;i[d+"Color"]={type:WebGLConstants$1.FLOAT_VEC3,value:h.color};break;case"directional":h=c.directional,i[d+"Color"]={type:WebGLConstants$1.FLOAT_VEC3,value:h.color},defined(c.node)&&(i[d+"Transform"]={node:c.node,semantic:"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4});break;case"point":var p=c.point;i[d+"Color"]={type:WebGLConstants$1.FLOAT_VEC3,value:p.color},defined(c.node)&&(i[d+"Transform"]={node:c.node,semantic:"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4}),i[d+"Attenuation"]={type:WebGLConstants$1.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]};break;case"spot":p=c.spot,i[d+"Color"]={type:WebGLConstants$1.FLOAT_VEC3,value:p.color},defined(c.node)&&(i[d+"Transform"]={node:c.node,semantic:"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4},i[d+"InverseTransform"]={node:c.node,semantic:"MODELVIEWINVERSE",type:WebGLConstants$1.FLOAT_MAT4,useInFragment:!0}),i[d+"Attenuation"]={type:WebGLConstants$1.FLOAT_VEC3,value:[p.constantAttenuation,p.linearAttenuation,p.quadraticAttenuation]},i[d+"FallOff"]={type:WebGLConstants$1.FLOAT_VEC2,value:[p.fallOffAngle,p.fallOffExponent]}}++l}else delete t[s]}}return i}function generateTechnique(e,t,i,r,n,a){defined(r)||(r={}),a=defaultValue(a,!1);var o,s=t.techniques,l=t.shaders,c=t.programs,u=r.technique.toUpperCase();defined(e.extensions)&&defined(e.extensions.KHR_materials_common)&&(o=e.extensions.KHR_materials_common.lights);var d=r.values,h=defaultValue(r.jointCount,0),p=!1;t=!1;defined(i)&&(p=i.skinning.skinned,t=i.hasVertexColors);var f="precision highp float;\n",m="precision highp float;\n",g="CONSTANT"!==u,y={u_modelViewMatrix:{semantic:hasExtension(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:WebGLConstants$1.FLOAT_MAT4}};g&&(y.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:WebGLConstants$1.FLOAT_MAT3}),p&&(y.u_jointMatrix={count:h,semantic:"JOINTMATRIX",type:WebGLConstants$1.FLOAT_MAT4});var _,v,C,x,b,S=!1;for(_ in d)d.hasOwnProperty(_)&&"transparent"!==_&&"doubleSided"!==_&&(v=getKHRMaterialsCommonValueType(_,d[_]),C="u_"+_.toLowerCase(),S||v!==WebGLConstants$1.SAMPLER_2D||(S=!0),y[C]={type:v});if(defined(y.u_diffuse)&&(y.u_diffuse.semantic="_3DTILESDIFFUSE"),defined(n))for(var T in n)n.hasOwnProperty(T)&&(y[C="u_"+T]=n[T]);for(C in y)y.hasOwnProperty(C)&&(b=defined((x=y[C]).count)?"["+x.count+"]":"",x.type!==WebGLConstants$1.FLOAT_MAT3&&x.type!==WebGLConstants$1.FLOAT_MAT4||x.useInFragment?(m+="uniform "+webGLConstantToGlslType(x.type)+" "+C+b+";\n",delete x.useInFragment):f+="uniform "+webGLConstantToGlslType(x.type)+" "+C+b+";\n");var E="";p&&(E+="    mat4 skinMatrix =\n        a_weight.x * u_jointMatrix[int(a_joint.x)] +\n        a_weight.y * u_jointMatrix[int(a_joint.y)] +\n        a_weight.z * u_jointMatrix[int(a_joint.z)] +\n        a_weight.w * u_jointMatrix[int(a_joint.w)];\n");var w;h={a_position:{semantic:"POSITION"}};f+="attribute vec3 a_position;\n",f+="varying vec3 v_positionEC;\n",E+=p?"  vec4 pos = u_modelViewMatrix * skinMatrix * vec4(a_position,1.0);\n":"  vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n",E+="  v_positionEC = pos.xyz;\n",E+="  gl_Position = u_projectionMatrix * pos;\n",m+="varying vec3 v_positionEC;\n",g&&(h.a_normal={semantic:"NORMAL"},f+="attribute vec3 a_normal;\n",f+="varying vec3 v_normal;\n",E+=p?"  v_normal = u_normalMatrix * mat3(skinMatrix) * a_normal;\n":"  v_normal = u_normalMatrix * a_normal;\n",m+="varying vec3 v_normal;\n"),S&&(h.a_texcoord_0={semantic:"TEXCOORD_0"},f+="attribute vec2 a_texcoord_0;\n",f+="varying vec2 "+(w="v_texcoord_0")+";\n",E+="  "+w+" = a_texcoord_0;\n",m+="varying vec2 "+w+";\n"),p&&(h.a_joint={semantic:"JOINTS_0"},h.a_weight={semantic:"WEIGHTS_0"},f+="attribute vec4 a_joint;\n",f+="attribute vec4 a_weight;\n"),t&&(h.a_vertexColor={semantic:"COLOR_0"},f+="attribute vec4 a_vertexColor;\n",f+="varying vec4 v_vertexColor;\n",E+="  v_vertexColor = a_vertexColor;\n",m+="varying vec4 v_vertexColor;\n"),a&&(h.a_batchId={semantic:"_BATCHID"},f+="attribute float a_batchId;\n");var A,P,D,M,I,R,O=g&&("BLINN"===u||"PHONG"===u)&&defined(y.u_specular)&&defined(y.u_shininess)&&0<y.u_shininess,L=!1,N=!1,F="";for(A in o)o.hasOwnProperty(A)&&(P=(R=o[A]).type.toLowerCase(),F+="  {\n",M="u_"+(D=R.baseName)+"Color","ambient"===P?(N=!0,F+="    ambientLight += "+M+";\n"):g&&(L=!0,I="v_"+D+"Direction",R="v_"+D+"Position","point"!==P&&(f+="varying vec3 "+I+";\n",m+="varying vec3 "+I+";\n",E+="  "+I+" = mat3(u_"+D+"Transform) * vec3(0.,0.,1.);\n","directional"===P&&(F+="    vec3 l = normalize("+I+");\n")),"directional"!==P?(f+="varying vec3 "+R+";\n",m+="varying vec3 "+R+";\n",E+="  "+R+" = u_"+D+"Transform[3].xyz;\n",F+="    vec3 VP = "+R+" - v_positionEC;\n",F+="    vec3 l = normalize(VP);\n",F+="    float range = length(VP);\n",F+="    float attenuation = 1.0 / (u_"+D+"Attenuation.x + ",F+="(u_"+D+"Attenuation.y * range) + ",F+="(u_"+D+"Attenuation.z * range * range));\n"):F+="    float attenuation = 1.0;\n","spot"===P&&(F+="    float spotDot = dot(l, normalize("+I+"));\n",F+="    if (spotDot < cos(u_"+D+"FallOff.x * 0.5))\n",F+="    {\n",F+="      attenuation = 0.0;\n",F+="    }\n",F+="    else\n",F+="    {\n",F+="        attenuation *= max(0.0, pow(spotDot, u_"+D+"FallOff.y));\n",F+="    }\n"),F+="    diffuseLight += "+M+"* max(dot(normal,l), 0.) * attenuation;\n",O&&("BLINN"===u?(F+="    vec3 h = normalize(l + viewDir);\n",F+="    float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(F+="    vec3 reflectDir = reflect(-l, normal);\n",F+="    float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),F+="    specularLight += "+M+" * specularIntensity;\n")),F+="  }\n");return N||(F+="  ambientLight += vec3(0.2, 0.2, 0.2);\n"),L||"CONSTANT"===u||(m+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",m+="uniform vec3 gltf_lightColor; \n",m+="#endif \n",F+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",F+="    vec3 lightColor = czm_lightColor;\n",F+="#else \n",F+="    vec3 lightColor = gltf_lightColor;\n",F+="#endif \n",F+="  vec3 l = normalize(czm_lightDirectionEC);\n",F+="  diffuseLight += lightColor * max(dot(normal,l), 0.2);\n",O&&("BLINN"===u?(F+="  vec3 h = normalize(l + viewDir);\n",F+="  float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(F+="  vec3 reflectDir = reflect(-l, normal);\n",F+="  float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),F+="  specularLight += lightColor * specularIntensity;\n")),f+="void main(void) {\n",f+=E,f+="}\n",m+="void main(void) {\n",a="  vec3 color = vec3(0.0, 0.0, 0.0);\n",g&&(m+="  vec3 normal = normalize(v_normal);\n",r.doubleSided&&(m+="  if (czm_backFacing())\n",m+="  {\n",m+="    normal = -normal;\n",m+="  }\n")),r="CONSTANT"!==u?(defined(y.u_diffuse)&&(y.u_diffuse.type===WebGLConstants$1.SAMPLER_2D?m+="  vec4 diffuse = texture2D(u_diffuse, "+w+");\n":m+="  vec4 diffuse = u_diffuse;\n",m+="  vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",a+="  color += diffuse.rgb * diffuseLight;\n"),O&&(y.u_specular.type===WebGLConstants$1.SAMPLER_2D?m+="  vec3 specular = texture2D(u_specular, "+w+").rgb;\n":m+="  vec3 specular = u_specular.rgb;\n",m+="  vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",a+="  color += specular * specularLight;\n"),defined(y.u_transparency)?"  gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency);\n":"  gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):defined(y.u_transparency)?"  gl_FragColor = vec4(color * u_transparency, u_transparency);\n":"  gl_FragColor = vec4(color, 1.0);\n",t&&(a+="  color *= v_vertexColor.rgb;\n"),defined(y.u_emission)&&(y.u_emission.type===WebGLConstants$1.SAMPLER_2D?m+="  vec3 emission = texture2D(u_emission, "+w+").rgb;\n":m+="  vec3 emission = u_emission.rgb;\n",a+="  color += emission;\n"),!defined(y.u_ambient)&&"CONSTANT"===u||(defined(y.u_ambient)?y.u_ambient.type===WebGLConstants$1.SAMPLER_2D?m+="  vec3 ambient = texture2D(u_ambient, "+w+").rgb;\n":m+="  vec3 ambient = u_ambient.rgb;\n":m+="  vec3 ambient = diffuse.rgb;\n",a+="  color += ambient * ambientLight;\n"),m+="  vec3 viewDir = -normalize(v_positionEC);\n",m+="  vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",m+=F,m+=a,m+=r,m+="}\n",r=addToArray(l,{type:WebGLConstants$1.VERTEX_SHADER,extras:{_pipeline:{source:f,extension:".glsl"}}}),l=addToArray(l,{type:WebGLConstants$1.FRAGMENT_SHADER,extras:{_pipeline:{source:m,extension:".glsl"}}}),r=addToArray(c,{fragmentShader:l,vertexShader:r}),addToArray(s,{attributes:h,program:r,uniforms:y})}function getKHRMaterialsCommonValueType(e,t){switch(t=defined(t.value)?t.value:defined(t.index)?[t.index]:t,e){case"ambient":case"diffuse":case"emission":case"specular":return 1===t.length?WebGLConstants$1.SAMPLER_2D:WebGLConstants$1.FLOAT_VEC4;case"shininess":case"transparency":return WebGLConstants$1.FLOAT;case"transparent":case"doubleSided":return WebGLConstants$1.BOOL}}function getTechniqueKey(e,t){var i="";i+="technique:"+e.technique+";";for(var r=e.values,n=Object.keys(r).sort(),a=n.length,o=0;o<a;++o){var s=n[o];r.hasOwnProperty(s)&&(i+=s+":"+getKHRMaterialsCommonValueType(s,r[s]),i+=";")}var l=defaultValue(e.jointCount,0);return i+=l.toString()+";",defined(t)&&(e=t.skinning,0<l&&(i+=e.type+";"),i+=t.hasVertexColors),i}function lightDefaults(e){if(defined(e=e.extensions.KHR_materials_common)&&defined(e.lights))for(var t=e.lights,i=t.length,r=0;r<i;r++){var n,a,o=t[r];"ambient"===o.type?(defined(o.ambient)||(o.ambient={}),defined((n=o.ambient).color)||(n.color=[1,1,1])):"directional"===o.type?(defined(o.directional)||(o.directional={}),defined((a=o.directional).color)||(a.color=[1,1,1])):"point"===o.type?(defined(o.point)||(o.point={}),defined((a=o.point).color)||(a.color=[1,1,1]),a.constantAttenuation=defaultValue(a.constantAttenuation,1),a.linearAttenuation=defaultValue(a.linearAttenuation,0),a.quadraticAttenuation=defaultValue(a.quadraticAttenuation,0)):"spot"===o.type&&(defined(o.spot)||(o.spot={}),defined((o=o.spot).color)||(o.color=[1,1,1]),o.constantAttenuation=defaultValue(o.constantAttenuation,1),o.fallOffAngle=defaultValue(o.fallOffAngle,3.14159265),o.fallOffExponent=defaultValue(o.fallOffExponent,0),o.linearAttenuation=defaultValue(o.linearAttenuation,0),o.quadraticAttenuation=defaultValue(o.quadraticAttenuation,0))}}function processPbrMaterials(e,t){if(t=defaultValue(t,defaultValue.EMPTY_OBJECT),hasExtension(e,"KHR_techniques_webgl"))return e;if(!defined(e.materials)||0===e.materials.length)return e;defined(e.extensions)||(e.extensions={}),defined(e.extensionsUsed)||(e.extensionsUsed=[]),defined(e.extensionsRequired)||(e.extensionsRequired=[]),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl");var i=ModelUtility.splitIncompatibleMaterials(e);return ForEach.material(e,(function(r,n){var a={};n=generateTechnique$1(e,r,n,a,i,t);defined(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl={values:a,technique:n}})),ModelUtility.ensureSemanticExistence(e),e}function isSpecularGlossinessMaterial(e){return defined(e.extensions)&&defined(e.extensions.KHR_materials_pbrSpecularGlossiness)}function addTextureCoordinates(e,t,i,r,n){var a,o=i[t];return defined(o)&&defined(o.texCoord)&&1===o.texCoord&&(r=r.replace("0","1")),defined(i[t+"Offset"])?(a=t+"Coord",n.fragmentShaderMain+="    vec2 "+a+" = computeTexCoord("+r+", "+t+"Offset, "+t+"Rotation, "+t+"Scale);\n"):a=r,a}ModelUtility.getGltfSemanticUniforms=function(){return gltfSemanticUniforms};var DEFAULT_TEXTURE_OFFSET=[0,0],DEFAULT_TEXTURE_ROTATION=[0],DEFAULT_TEXTURE_SCALE=[1,1];function handleKHRTextureTransform(e,t,i){var r;-1!==e.indexOf("Texture")&&defined(t.extensions)&&defined(t.extensions.KHR_texture_transform)&&(r="u_"+e,e=t.extensions.KHR_texture_transform,i[r+"Offset"]=defaultValue(e.offset,DEFAULT_TEXTURE_OFFSET),i[r+"Rotation"]=defaultValue(e.rotation,DEFAULT_TEXTURE_ROTATION),i[r+"Scale"]=defaultValue(e.scale,DEFAULT_TEXTURE_SCALE),defined(t.texCoord)&&defined(e.texCoord)&&(i[r].texCoord=e.texCoord))}function generateTechnique$1(e,t,i,r,n,a){var o,s,l,c,u=defaultValue(a.addBatchIdToGeneratedShaders,!1),d=(P=e.extensions.KHR_techniques_webgl).techniques,h=P.shaders,p=P.programs,f=isSpecularGlossinessMaterial(t),m=t.pbrMetallicRoughness;if(defined(m)&&!f)for(s in m)m.hasOwnProperty(s)&&(l=m[s],handleKHRTextureTransform(s,r[o="u_"+s]=l,r));if(f){var g=t.extensions.KHR_materials_pbrSpecularGlossiness;for(s in g)g.hasOwnProperty(s)&&(l=g[s],handleKHRTextureTransform(s,r[o="u_"+s]=l,r))}for(c in t)t.hasOwnProperty(c)&&(0<=c.indexOf("Texture")||0<=c.indexOf("Factor"))&&(l=t[c],handleKHRTextureTransform(c,r[o="u_"+c]=l,r));var y="precision highp float;\n",_="precision highp float;\n";defined(e.skins)&&(D=e.skins[0]);var v,C=defined(D)?D.joints:[],x=C.length,b=n[i],S=!1,T=!1,E=!1,w=!1,A=!1,P=(a=!1,!1),D=!1;n=!1;defined(b)&&(S=b.skinning.skinned&&0<C.length,T=b.hasVertexColors,E=b.hasMorphTargets,w=b.hasNormals,A=b.hasTangents,a=b.hasTexCoords,P=b.hasTexCoord1,D=b.hasOutline),E&&ForEach.mesh(e,(function(e){ForEach.meshPrimitive(e,(function(e){e.material!==i||defined(e=e.targets)&&(v=e)}))}));var M={u_modelViewMatrix:{semantic:hasExtension(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:WebGLConstants$1.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:WebGLConstants$1.FLOAT_MAT4}};for(o in defined(t.extensions)&&defined(t.extensions.KHR_materials_unlit)&&(A=w=!(n=!0)),w&&(M.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:WebGLConstants$1.FLOAT_MAT3}),S&&(M.u_jointMatrix={count:x,semantic:"JOINTMATRIX",type:WebGLConstants$1.FLOAT_MAT4}),E&&(M.u_morphWeights={count:v.length,semantic:"MORPHWEIGHTS",type:WebGLConstants$1.FLOAT}),defined(b=t.alphaMode)&&"MASK"===b&&(M.u_alphaCutoff={semantic:"ALPHACUTOFF",type:WebGLConstants$1.FLOAT}),r)r.hasOwnProperty(o)&&(M[o]={type:getPBRValueType(o)});var I,R;x=defaultValue(M.u_baseColorTexture,M.u_baseColorFactor);for(o in defined(x)&&(x.semantic="_3DTILESDIFFUSE"),M)M.hasOwnProperty(o)&&(R=defined((I=M[o]).count)?"["+I.count+"]":"",I.type!==WebGLConstants$1.FLOAT_MAT3&&I.type!==WebGLConstants$1.FLOAT_MAT4&&"u_morphWeights"!==o||I.useInFragment?(_+="uniform "+webGLConstantToGlslType(I.type)+" "+o+R+";\n",delete I.useInFragment):y+="uniform "+webGLConstantToGlslType(I.type)+" "+o+R+";\n");D&&(_+="uniform sampler2D u_outlineTexture;\n");var O="";S&&(O+="    mat4 skinMatrix =\n        a_weight.x * u_jointMatrix[int(a_joint.x)] +\n        a_weight.y * u_jointMatrix[int(a_joint.y)] +\n        a_weight.z * u_jointMatrix[int(a_joint.z)] +\n        a_weight.w * u_jointMatrix[int(a_joint.w)];\n");var L={a_position:{semantic:"POSITION"}};if(D&&(L.a_outlineCoordinates={semantic:"_OUTLINE_COORDINATES"}),y+="attribute vec3 a_position;\n",w&&(y+="varying vec3 v_positionEC;\n"),D&&(y+="attribute vec3 a_outlineCoordinates;\n",y+="varying vec3 v_outlineCoordinates;\n"),O+="    vec3 weightedPosition = a_position;\n",w&&(O+="    vec3 weightedNormal = a_normal;\n"),A&&(O+="    vec4 weightedTangent = a_tangent;\n"),E)for(var N=0;N<v.length;N++){var F,B,V=v[N];for(F in V)V.hasOwnProperty(F)&&"extras"!==F&&(L[B="a_"+F+"_"+N]={semantic:F+"_"+N},y+="attribute vec3 "+B+";\n","POSITION"===F?O+="    weightedPosition += u_morphWeights["+N+"] * "+B+";\n":"NORMAL"===F?O+="    weightedNormal += u_morphWeights["+N+"] * "+B+";\n":A&&"TANGENT"===F&&(O+="    weightedTangent.xyz += u_morphWeights["+N+"] * "+B+";\n"))}O+=S?"    vec4 position = skinMatrix * vec4(weightedPosition, 1.0);\n":"    vec4 position = vec4(weightedPosition, 1.0);\n",O+="    position = u_modelViewMatrix * position;\n",w&&(O+="    v_positionEC = position.xyz;\n"),O+="    gl_Position = u_projectionMatrix * position;\n",D&&(O+="    v_outlineCoordinates = a_outlineCoordinates;\n"),w&&(L.a_normal={semantic:"NORMAL"},y+="attribute vec3 a_normal;\n",y+="varying vec3 v_normal;\n",O+=S?"    v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n":"    v_normal = u_normalMatrix * weightedNormal;\n",_+="varying vec3 v_normal;\n",_+="varying vec3 v_positionEC;\n"),A&&(L.a_tangent={semantic:"TANGENT"},y+="attribute vec4 a_tangent;\n",y+="varying vec4 v_tangent;\n",O+="    v_tangent.xyz = u_normalMatrix * weightedTangent.xyz;\n",O+="    v_tangent.w = weightedTangent.w;\n",_+="varying vec4 v_tangent;\n"),D&&(_+="varying vec3 v_outlineCoordinates;\n");var k,z,G,U,$,H,W;E="";return a&&(L.a_texcoord_0={semantic:"TEXCOORD_0"},y+="attribute vec2 a_texcoord_0;\n",y+="varying vec2 "+(W="v_texcoord_0")+";\n",O+="    "+W+" = a_texcoord_0;\n",_+="varying vec2 "+W+";\n",P&&(L.a_texcoord_1={semantic:"TEXCOORD_1"},y+="attribute vec2 a_texcoord_1;\n",y+="varying vec2 "+(H=W.replace("0","1"))+";\n",O+="    "+H+" = a_texcoord_1;\n",_+="varying vec2 "+H+";\n"),k=addTextureCoordinates(e,"u_normalTexture",r,W,P={fragmentShaderMain:E}),z=addTextureCoordinates(e,"u_baseColorTexture",r,W,P),G=addTextureCoordinates(e,"u_specularGlossinessTexture",r,W,P),U=addTextureCoordinates(e,"u_diffuseTexture",r,W,P),$=addTextureCoordinates(e,"u_metallicRoughnessTexture",r,W,P),H=addTextureCoordinates(e,"u_occlusionTexture",r,W,P),W=addTextureCoordinates(e,"u_emissiveTexture",r,W,P),E=P.fragmentShaderMain),S&&(L.a_joint={semantic:"JOINTS_0"},L.a_weight={semantic:"WEIGHTS_0"},y+="attribute vec4 a_joint;\n",y+="attribute vec4 a_weight;\n"),T&&(L.a_vertexColor={semantic:"COLOR_0"},y+="attribute vec4 a_vertexColor;\n",y+="varying vec4 v_vertexColor;\n",O+="  v_vertexColor = a_vertexColor;\n",_+="varying vec4 v_vertexColor;\n"),u&&(L.a_batchId={semantic:"_BATCHID"},y+="attribute float a_batchId;\n"),y+="void main(void) \n{\n",y+=O,y+="}\n",w&&(_+="const float M_PI = 3.141592653589793;\n",_+="vec3 lambertianDiffuse(vec3 diffuseColor) \n{\n    return diffuseColor / M_PI;\n}\n\n",_+="vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n{\n    return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\n",_+="vec3 fresnelSchlick(float metalness, float VdotH) \n{\n    return metalness + (vec3(1.0) - metalness) * pow(1.0 - VdotH, 5.0);\n}\n\n",_+="float smithVisibilityG1(float NdotV, float roughness) \n{\n    float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n    return NdotV / (NdotV * (1.0 - k) + k);\n}\n\n",_+="float smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n{\n    return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n}\n\n",_+="float GGX(float roughness, float NdotH) \n{\n    float roughnessSquared = roughness * roughness;\n    float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n    return roughnessSquared / (M_PI * f * f);\n}\n\n"),_+="vec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n    return pow(srgbIn, vec3(2.2));\n}\n\n",_+="vec4 SRGBtoLINEAR4(vec4 srgbIn) \n{\n    vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n    return vec4(linearOut, srgbIn.a);\n}\n\n",_+="vec3 applyTonemapping(vec3 linearIn) \n{\n#ifndef HDR \n    return czm_acesTonemapping(linearIn);\n#else \n    return linearIn;\n#endif \n}\n\n",_+="vec3 LINEARtoSRGB(vec3 linearIn) \n{\n#ifndef HDR \n    return pow(linearIn, vec3(1.0/2.2));\n#else \n    return linearIn;\n#endif \n}\n\n",_+="vec2 computeTexCoord(vec2 texCoords, vec2 offset, float rotation, vec2 scale) \n{\n    rotation = -rotation; \n    mat3 transform = mat3(\n        cos(rotation) * scale.x, sin(rotation) * scale.x, 0.0, \n       -sin(rotation) * scale.y, cos(rotation) * scale.y, 0.0, \n        offset.x, offset.y, 1.0); \n    vec2 transformedTexCoords = (transform * vec3(fract(texCoords), 1.0)).xy; \n    return transformedTexCoords; \n}\n\n",_+="#ifdef USE_IBL_LIGHTING \n",_+="uniform vec2 gltf_iblFactor; \n",_+="#endif \n",_+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",_+="uniform vec3 gltf_lightColor; \n",_+="#endif \n",_+="void main(void) \n{\n",_+=E,w&&(_+="    vec3 ng = normalize(v_normal);\n",_+="    vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n",defined(r.u_normalTexture)?A?(_+="    vec3 t = normalize(v_tangent.xyz);\n",_+="    vec3 b = normalize(cross(ng, t) * v_tangent.w);\n",_+="    mat3 tbn = mat3(t, b, ng);\n",_+="    vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",_+="    n = normalize(tbn * (2.0 * n - 1.0));\n"):(_="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"+_,_+="#ifdef GL_OES_standard_derivatives\n",_+="    vec3 pos_dx = dFdx(v_positionEC);\n",_+="    vec3 pos_dy = dFdy(v_positionEC);\n",_+="    vec3 tex_dx = dFdx(vec3("+k+",0.0));\n",_+="    vec3 tex_dy = dFdy(vec3("+k+",0.0));\n",_+="    vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n",_+="    t = normalize(t - ng * dot(ng, t));\n",_+="    vec3 b = normalize(cross(ng, t));\n",_+="    mat3 tbn = mat3(t, b, ng);\n",_+="    vec3 n = texture2D(u_normalTexture, "+k+").rgb;\n",_+="    n = normalize(tbn * (2.0 * n - 1.0));\n",_+="#else\n",_+="    vec3 n = ng;\n",_+="#endif\n"):_+="    vec3 n = ng;\n",t.doubleSided&&(_+="    if (czm_backFacing())\n",_+="    {\n",_+="        n = -n;\n",_+="    }\n")),defined(r.u_baseColorTexture)?(_+="    vec4 baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, "+z+"));\n",defined(r.u_baseColorFactor)&&(_+="    baseColorWithAlpha *= u_baseColorFactor;\n")):defined(r.u_baseColorFactor)?_+="    vec4 baseColorWithAlpha = u_baseColorFactor;\n":_+="    vec4 baseColorWithAlpha = vec4(1.0);\n",T&&(_+="    baseColorWithAlpha *= v_vertexColor;\n"),_+="    vec3 baseColor = baseColorWithAlpha.rgb;\n",w?(f?(defined(r.u_specularGlossinessTexture)?(_+="    vec4 specularGlossiness = SRGBtoLINEAR4(texture2D(u_specularGlossinessTexture, "+G+"));\n",_+="    vec3 specular = specularGlossiness.rgb;\n",_+="    float glossiness = specularGlossiness.a;\n",defined(r.u_specularFactor)&&(_+="    specular *= u_specularFactor;\n"),defined(r.u_glossinessFactor)&&(_+="    glossiness *= u_glossinessFactor;\n")):(defined(r.u_specularFactor)?_+="    vec3 specular = clamp(u_specularFactor, vec3(0.0), vec3(1.0));\n":_+="    vec3 specular = vec3(1.0);\n",defined(r.u_glossinessFactor)?_+="    float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n":_+="    float glossiness = 1.0;\n"),defined(r.u_diffuseTexture)?(_+="    vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, "+U+"));\n",defined(r.u_diffuseFactor)&&(_+="    diffuse *= u_diffuseFactor;\n")):defined(r.u_diffuseFactor)?_+="    vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n":_+="    vec4 diffuse = vec4(1.0);\n"):defined(r.u_metallicRoughnessTexture)?(_+="    vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, "+$+").rgb;\n",_+="    float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n",_+="    float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n",defined(r.u_metallicFactor)&&(_+="    metalness *= u_metallicFactor;\n"),defined(r.u_roughnessFactor)&&(_+="    roughness *= u_roughnessFactor;\n")):(defined(r.u_metallicFactor)?_+="    float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n":_+="    float metalness = 1.0;\n",defined(r.u_roughnessFactor)?_+="    float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n":_+="    float roughness = 1.0;\n"),_+="    vec3 v = -normalize(v_positionEC);\n",_+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",_+="    vec3 lightColorHdr = czm_lightColorHdr;\n",_+="#else \n",_+="    vec3 lightColorHdr = gltf_lightColor;\n",_+="#endif \n",_+="    vec3 l = normalize(czm_lightDirectionEC);\n",_+="    vec3 h = normalize(v + l);\n",_+="    float NdotL = clamp(dot(n, l), 0.001, 1.0);\n",_+="    float NdotV = abs(dot(n, v)) + 0.001;\n",_+="    float NdotH = clamp(dot(n, h), 0.0, 1.0);\n",_+="    float LdotH = clamp(dot(l, h), 0.0, 1.0);\n",_+="    float VdotH = clamp(dot(v, h), 0.0, 1.0);\n",_+="    vec3 f0 = vec3(0.04);\n",f?(_+="    float roughness = 1.0 - glossiness;\n",_+="    vec3 diffuseColor = diffuse.rgb * (1.0 - max(max(specular.r, specular.g), specular.b));\n",_+="    vec3 specularColor = specular;\n"):(_+="    vec3 diffuseColor = baseColor * (1.0 - metalness) * (1.0 - f0);\n",_+="    vec3 specularColor = mix(f0, baseColor, metalness);\n"),_+="    float alpha = roughness * roughness;\n",_+="    float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n",_+="    vec3 r90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n",_+="    vec3 r0 = specularColor.rgb;\n",_+="    vec3 F = fresnelSchlick2(r0, r90, VdotH);\n",_+="    float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n",_+="    float D = GGX(alpha, NdotH);\n",_+="    vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n",_+="    vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n",_+="    vec3 color = NdotL * lightColorHdr * (diffuseContribution + specularContribution);\n",_+="#if defined(USE_IBL_LIGHTING) && !defined(DIFFUSE_IBL) && !defined(SPECULAR_IBL) \n",_+="    vec3 r = normalize(czm_inverseViewRotation * normalize(reflect(v, n)));\n",_+="    float vertexRadius = length(positionWC);\n",_+="    float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / vertexRadius);\n",_+="    float reflectionDotNadir = dot(r, normalize(positionWC));\n",_+="    r.x = -r.x;\n",_+="    r = -normalize(czm_temeToPseudoFixed * r);\n",_+="    r.x = -r.x;\n",_+="    float inverseRoughness = 1.04 - roughness;\n",_+="    inverseRoughness *= inverseRoughness;\n",_+="    vec3 sceneSkyBox = textureCube(czm_environmentMap, r).rgb * inverseRoughness;\n",_+="    float atmosphereHeight = 0.05;\n",_+="    float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - horizonDotNadir);\n",_+="    float blendRegionOffset = roughness * -1.0;\n",_+="    float farAboveHorizon = clamp(horizonDotNadir - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);\n",_+="    float aroundHorizon = clamp(horizonDotNadir + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);\n",_+="    float farBelowHorizon = clamp(horizonDotNadir + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);\n",_+="    float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);\n",_+="    vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), smoothstepHeight);\n",_+="    vec3 nadirColor = belowHorizonColor * 0.5;\n",_+="    vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);\n",_+="    vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, reflectionDotNadir * inverseRoughness * 0.5 + 0.75);\n",_+="    vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, smoothstepHeight);\n",_+="    vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);\n",_+="    float diffuseIrradianceFromEarth = (1.0 - horizonDotNadir) * (reflectionDotNadir * 0.25 + 0.75) * smoothstepHeight;\n",_+="    float diffuseIrradianceFromSky = (1.0 - smoothstepHeight) * (1.0 - (reflectionDotNadir * 0.25 + 0.25));\n",_+="    vec3 diffuseIrradiance = blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);\n",_+="    float notDistantRough = (1.0 - horizonDotNadir * roughness * 0.8);\n",_+="    vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, reflectionDotNadir) * notDistantRough);\n",_+="    specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, reflectionDotNadir) * inverseRoughness);\n",_+="    specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, reflectionDotNadir) * inverseRoughness);\n",_+="#ifdef USE_SUN_LUMINANCE \n",_+="    float LdotZenith = clamp(dot(normalize(czm_inverseViewRotation * l), normalize(positionWC * -1.0)), 0.001, 1.0);\n",_+="    float S = acos(LdotZenith);\n",_+="    float NdotZenith = clamp(dot(normalize(czm_inverseViewRotation * n), normalize(positionWC * -1.0)), 0.001, 1.0);\n",_+="    float gamma = acos(NdotL);\n",_+="    float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * pow(NdotL, 2.0)) * (1.0 - exp(-0.32 / NdotZenith)));\n",_+="    float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * pow(LdotZenith,2.0)) * (1.0 - exp(-0.32));\n",_+="    float luminance = gltf_luminanceAtZenith * (numerator / denominator);\n",_+="#endif \n",_+="    vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",_+="    vec3 IBLColor = (diffuseIrradiance * diffuseColor * gltf_iblFactor.x) + (specularIrradiance * SRGBtoLINEAR3(specularColor * brdfLut.x + brdfLut.y) * gltf_iblFactor.y);\n",_+="    float maximumComponent = max(max(lightColorHdr.x, lightColorHdr.y), lightColorHdr.z);\n",_+="    vec3 lightColor = lightColorHdr / max(maximumComponent, 1.0);\n",_+="    IBLColor *= lightColor;\n",_+="#ifdef USE_SUN_LUMINANCE \n",_+="    color += IBLColor * luminance;\n",_+="#else \n",_+="    color += IBLColor; \n",_+="#endif \n",_+="#elif defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) \n",_+="    const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0); \n",_+="    vec3 cubeDir = normalize(yUpToZUp * gltf_iblReferenceFrameMatrix * normalize(reflect(-v, n))); \n",_+="#ifdef DIFFUSE_IBL \n",_+="#ifdef CUSTOM_SPHERICAL_HARMONICS \n",_+="    vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, gltf_sphericalHarmonicCoefficients); \n",_+="#else \n",_+="    vec3 diffuseIrradiance = czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients); \n",_+="#endif \n",_+="#else \n",_+="    vec3 diffuseIrradiance = vec3(0.0); \n",_+="#endif \n",_+="#ifdef SPECULAR_IBL \n",_+="    vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, roughness)).rg;\n",_+="#ifdef CUSTOM_SPECULAR_IBL \n",_+="    vec3 specularIBL = czm_sampleOctahedralProjection(gltf_specularMap, gltf_specularMapSize, cubeDir,  roughness * gltf_maxSpecularLOD, gltf_maxSpecularLOD);\n",_+="#else \n",_+="    vec3 specularIBL = czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir,  roughness * czm_specularEnvironmentMapsMaximumLOD, czm_specularEnvironmentMapsMaximumLOD);\n",_+="#endif \n",_+="    specularIBL *= F * brdfLut.x + brdfLut.y;\n",_+="#else \n",_+="    vec3 specularIBL = vec3(0.0); \n",_+="#endif \n",_+="    color += diffuseIrradiance * diffuseColor + specularColor * specularIBL;\n",_+="#endif \n"):_+="    vec3 color = baseColor;\n",n||(defined(r.u_occlusionTexture)&&(_+="    color *= texture2D(u_occlusionTexture, "+H+").r;\n"),defined(r.u_emissiveTexture)?(_+="    vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, "+W+").rgb);\n",defined(r.u_emissiveFactor)&&(_+="    emissive *= u_emissiveFactor;\n"),_+="    color += emissive;\n"):defined(r.u_emissiveFactor)&&(_+="    color += u_emissiveFactor;\n")),n||(_+="    color = applyTonemapping(color);\n"),_+="    color = LINEARtoSRGB(color);\n",D&&(_+="    float outlineness = max(\n",_+="        texture2D(u_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r,\n",_+="        max(\n",_+="          texture2D(u_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r,\n",_+="          texture2D(u_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r));\n",_+="    color = mix(color, vec3(0.0, 0.0, 0.0), outlineness);\n"),defined(b)?"MASK"===b?(_+="    if (baseColorWithAlpha.a < u_alphaCutoff) {\n",_+="        discard;\n",_+="    }\n",_+="    gl_FragColor = vec4(color, 1.0);\n"):_+="BLEND"===b?"    gl_FragColor = vec4(color, baseColorWithAlpha.a);\n":"    gl_FragColor = vec4(color, 1.0);\n":_+="    gl_FragColor = vec4(color, 1.0);\n",_+="}\n",b=addToArray(h,{type:WebGLConstants$1.VERTEX_SHADER,extras:{_pipeline:{source:y,extension:".glsl"}}}),h=addToArray(h,{type:WebGLConstants$1.FRAGMENT_SHADER,extras:{_pipeline:{source:_,extension:".glsl"}}}),b=addToArray(p,{fragmentShader:h,vertexShader:b}),addToArray(d,{attributes:L,program:b,uniforms:M})}function getPBRValueType(e){if(-1!==e.indexOf("Offset"))return WebGLConstants$1.FLOAT_VEC2;if(-1!==e.indexOf("Rotation"))return WebGLConstants$1.FLOAT;if(-1!==e.indexOf("Scale"))return WebGLConstants$1.FLOAT_VEC2;if(-1!==e.indexOf("Texture"))return WebGLConstants$1.SAMPLER_2D;switch(e){case"u_baseColorFactor":return WebGLConstants$1.FLOAT_VEC4;case"u_metallicFactor":case"u_roughnessFactor":return WebGLConstants$1.FLOAT;case"u_emissiveFactor":return WebGLConstants$1.FLOAT_VEC3;case"u_diffuseFactor":return WebGLConstants$1.FLOAT_VEC4;case"u_specularFactor":return WebGLConstants$1.FLOAT_VEC3;case"u_glossinessFactor":return WebGLConstants$1.FLOAT}}function Vector3DTileBatch(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var VectorTileVS="attribute vec3 position;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelViewProjection;\nvoid main()\n{\ngl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n",tmp$2={},b2d,e2d,f2d,A2d,B2d,D2d,E2d,F2d;function y2d(e,t){var i=new Error(e+" at character "+t);throw i.index=t,i.description=e,i}function C2d(e){var t,i,r=0;for(i in e)(t=i.length)>r&&e.hasOwnProperty(i)&&(r=t);return r}function H2d(e){return B2d[e]||0}function I2d(e,t,i){return{type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}}function J2d(e){return 48<=e&&e<=57}function K2d(e){return 36===e||95===e||65<=e&&e<=90||97<=e&&e<=122||128<=e&&!B2d[String.fromCharCode(e)]}function M2d(e){for(var t,i=0,r=e.charAt,n=e.charCodeAt,a=function(t){return r.call(e,t)},o=function(t){return n.call(e,t)},s=e.length,l=function(){for(var e=o(i);32===e||9===e;)e=o(++i)},c=function(){var e,t,r=d();return l(),63!==o(i)?r:(i++,(e=c())||y2d("Expected expression",i),l(),58===o(i)?(i++,(t=c())||y2d("Expected expression",i),{type:"ConditionalExpression",test:r,consequent:e,alternate:t}):void y2d("Expected :",i))},u=function(){l();for(var t=e.substr(i,E2d),r=t.length;0<r;){if(B2d.hasOwnProperty(t))return i+=r,t;t=t.substr(0,--r)}return!1},d=function(){var e,t,r,n,a,o,s=h(),l=u();if(!l)return s;for(n={value:l,prec:H2d(l)},(a=h())||y2d("Expected expression after "+l,i),r=[s,n,a];(l=u())&&0!==(t=H2d(l));){for(n={value:l,prec:t};2<r.length&&t<=r[r.length-2].prec;)a=r.pop(),e=I2d(l=r.pop().value,s=r.pop(),a),r.push(e);(e=h())||y2d("Expected expression after "+l,i),r.push(n,e)}for(e=r[o=r.length-1];1<o;)e=I2d(r[o-1].value,r[o-2],e),o-=2;return e},h=function(){var t,r,n;if(l(),J2d(t=o(i))||46===t)return p();if(39===t||34===t)return f();if(K2d(t)||40===t)return y();if(91===t)return v();for(n=(r=e.substr(i,D2d)).length;0<n;){if(A2d.hasOwnProperty(r))return i+=n,{type:"UnaryExpression",operator:r,argument:h(),prefix:!0};r=r.substr(0,--n)}return!1},p=function(){for(var e,t="";J2d(o(i));)t+=a(i++);if(46===o(i))for(t+=a(i++);J2d(o(i));)t+=a(i++);if("e"===(e=a(i))||"E"===e){for(t+=a(i++),"+"!==(e=a(i))&&"-"!==e||(t+=a(i++));J2d(o(i));)t+=a(i++);J2d(o(i-1))||y2d("Expected exponent ("+t+a(i)+")",i)}return K2d(e=o(i))?y2d("Variable names cannot start with a number ("+t+a(i)+")",i):46===e&&y2d("Unexpected period",i),{type:f2d,value:parseFloat(t),raw:t}},f=function(){for(var e,t="",r=a(i++),n=!1;i<s;){if((e=a(i++))===r){n=!0;break}if("\\"===e)switch(e=a(i++)){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+="\\"+e}else t+=e}return n||y2d('Unclosed quote after "'+t+'"',i),{type:f2d,value:t,raw:r+t+r}},m=function(){var t,r=o(i),n=i;for(K2d(r)?i++:y2d("Unexpected "+a(i),i);i<s&&(36===(t=r=o(i))||95===t||65<=t&&t<=90||97<=t&&t<=122||48<=t&&t<=57||128<=t&&!B2d[String.fromCharCode(t)]);)i++;return n=e.slice(n,i),F2d.hasOwnProperty(n)?{type:f2d,value:F2d[n],raw:n}:"this"===n?{type:"ThisExpression"}:{type:"Identifier",name:n}},g=function(e){for(var t,r=[],n=!1;i<s;){if(l(),(t=o(i))===e){n=!0,i++;break}44===t?i++:((t=c())&&"Compound"!==t.type||y2d("Expected comma",i),r.push(t))}return n||y2d("Expected "+String.fromCharCode(e),i),r},y=function(){var e=o(i),t=(40===e?_:m)();for(l(),e=o(i);46===e||91===e||40===e;)i++,46===e?(l(),t={type:e2d,computed:!1,object:t,property:m()}):91===e?(t={type:e2d,computed:!0,object:t,property:c()},l(),93!==(e=o(i))&&y2d("Unclosed [",i),i++):40===e&&(t={type:"CallExpression",arguments:g(41),callee:t}),l(),e=o(i);return t},_=function(){i++;var e=c();if(l(),41===o(i))return i++,e;y2d("Unclosed (",i)},v=function(){return i++,{type:"ArrayExpression",elements:g(93)}},C=[];i<s;)59===(t=o(i))||44===t?i++:(t=c())?C.push(t):i<s&&y2d('Unexpected "'+a(i)+'"',i);return 1===C.length?C[0]:{type:"Compound",body:C}}b2d=tmp$2,e2d="MemberExpression",f2d="Literal",A2d={"-":!0,"!":!0,"~":!0,"+":!0},B2d={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},D2d=C2d(A2d),E2d=C2d(B2d),F2d={true:!0,false:!1,null:null},M2d.version="0.3.1",M2d.toString=function(){return"JavaScript Expression Parser (JSEP) v"+M2d.version},M2d.addUnaryOp=function(e){return D2d=Math.max(e.length,D2d),A2d[e]=!0,this},M2d.addBinaryOp=function(e,t){return E2d=Math.max(e.length,E2d),B2d[e]=t,this},M2d.addLiteral=function(e,t){return F2d[e]=t,this},M2d.removeUnaryOp=function(e){return delete A2d[e],e.length===D2d&&(D2d=C2d(A2d)),this},M2d.removeAllUnaryOps=function(){return A2d={},D2d=0,this},M2d.removeBinaryOp=function(e){return delete B2d[e],e.length===E2d&&(E2d=C2d(B2d)),this},M2d.removeAllBinaryOps=function(){return B2d={},E2d=0,this},M2d.removeLiteral=function(e){return delete F2d[e],this},M2d.removeAllLiterals=function(){return F2d={},this},b2d.jsep=M2d;var jsep=tmp$2.jsep,ExpressionNodeType={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},ExpressionNodeType$1=Object.freeze(ExpressionNodeType);function Expression(e,t){var i;e=replaceVariables(removeBackslashes(e=replaceDefines(this._expression=e,t))),jsep.addBinaryOp("=~",0),jsep.addBinaryOp("!~",0);try{i=jsep(e)}catch(e){throw new RuntimeError(e)}this._runtimeAst=createRuntimeAst(this,i)}Object.defineProperties(Expression.prototype,{expression:{get:function(){return this._expression}}});var scratchStorage={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new Cartesian2],cartesian3Array:[new Cartesian3],cartesian4Array:[new Cartesian4],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);var e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new Cartesian2),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new Cartesian3),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new Cartesian4),this.cartesian4Array[this.cartesian4Index++]}};Expression.prototype.evaluate=function(e,t){return scratchStorage.reset(),e=this._runtimeAst.evaluate(e),t instanceof Color&&e instanceof Cartesian4?Color.fromCartesian4(e,t):e instanceof Cartesian2||e instanceof Cartesian3||e instanceof Cartesian4?e.clone(t):e},Expression.prototype.evaluateColor=function(e,t){return scratchStorage.reset(),e=this._runtimeAst.evaluate(e),Color.fromCartesian4(e,t)},Expression.prototype.getShaderFunction=function(e,t,i,r){return r+" "+e+"() \n{ \n    return "+this.getShaderExpression(t,i)+"; \n} \n"},Expression.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};var unaryOperators=["!","-","+"],binaryOperators=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],variableRegex=/\${(.*?)}/g,backslashRegex=/\\/g,backslashReplacement="@#%",replacementRegex=/@#%/g,scratchColor$2=new Color,unaryFunctions={abs:getEvaluateUnaryComponentwise(Math.abs),sqrt:getEvaluateUnaryComponentwise(Math.sqrt),cos:getEvaluateUnaryComponentwise(Math.cos),sin:getEvaluateUnaryComponentwise(Math.sin),tan:getEvaluateUnaryComponentwise(Math.tan),acos:getEvaluateUnaryComponentwise(Math.acos),asin:getEvaluateUnaryComponentwise(Math.asin),atan:getEvaluateUnaryComponentwise(Math.atan),radians:getEvaluateUnaryComponentwise(CesiumMath.toRadians),degrees:getEvaluateUnaryComponentwise(CesiumMath.toDegrees),sign:getEvaluateUnaryComponentwise(CesiumMath.sign),floor:getEvaluateUnaryComponentwise(Math.floor),ceil:getEvaluateUnaryComponentwise(Math.ceil),round:getEvaluateUnaryComponentwise(Math.round),exp:getEvaluateUnaryComponentwise(Math.exp),exp2:getEvaluateUnaryComponentwise(exp2),log:getEvaluateUnaryComponentwise(Math.log),log2:getEvaluateUnaryComponentwise(log2),fract:getEvaluateUnaryComponentwise(fract),length:length,normalize:normalize},binaryFunctions={atan2:getEvaluateBinaryComponentwise(Math.atan2,!1),pow:getEvaluateBinaryComponentwise(Math.pow,!1),min:getEvaluateBinaryComponentwise(Math.min,!0),max:getEvaluateBinaryComponentwise(Math.max,!0),distance:distance,dot:dot,cross:cross},ternaryFunctions={clamp:getEvaluateTernaryComponentwise(CesiumMath.clamp,!0),mix:getEvaluateTernaryComponentwise(CesiumMath.lerp,!0)};function fract(e){return e-Math.floor(e)}function exp2(e){return Math.pow(2,e)}function log2(e){return CesiumMath.log2(e)}function getEvaluateUnaryComponentwise(e){return function(t,i){if("number"==typeof i)return e(i);if(i instanceof Cartesian2)return Cartesian2.fromElements(e(i.x),e(i.y),scratchStorage.getCartesian2());if(i instanceof Cartesian3)return Cartesian3.fromElements(e(i.x),e(i.y),e(i.z),scratchStorage.getCartesian3());if(i instanceof Cartesian4)return Cartesian4.fromElements(e(i.x),e(i.y),e(i.z),e(i.w),scratchStorage.getCartesian4());throw new RuntimeError('Function "'+t+'" requires a vector or number argument. Argument is '+i+".")}}function getEvaluateBinaryComponentwise(e,t){return function(i,r,n){if(t&&"number"==typeof n){if("number"==typeof r)return e(r,n);if(r instanceof Cartesian2)return Cartesian2.fromElements(e(r.x,n),e(r.y,n),scratchStorage.getCartesian2());if(r instanceof Cartesian3)return Cartesian3.fromElements(e(r.x,n),e(r.y,n),e(r.z,n),scratchStorage.getCartesian3());if(r instanceof Cartesian4)return Cartesian4.fromElements(e(r.x,n),e(r.y,n),e(r.z,n),e(r.w,n),scratchStorage.getCartesian4())}if("number"==typeof r&&"number"==typeof n)return e(r,n);if(r instanceof Cartesian2&&n instanceof Cartesian2)return Cartesian2.fromElements(e(r.x,n.x),e(r.y,n.y),scratchStorage.getCartesian2());if(r instanceof Cartesian3&&n instanceof Cartesian3)return Cartesian3.fromElements(e(r.x,n.x),e(r.y,n.y),e(r.z,n.z),scratchStorage.getCartesian3());if(r instanceof Cartesian4&&n instanceof Cartesian4)return Cartesian4.fromElements(e(r.x,n.x),e(r.y,n.y),e(r.z,n.z),e(r.w,n.w),scratchStorage.getCartesian4());throw new RuntimeError('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+r+" and "+n+".")}}function getEvaluateTernaryComponentwise(e,t){return function(i,r,n,a){if(t&&"number"==typeof a){if("number"==typeof r&&"number"==typeof n)return e(r,n,a);if(r instanceof Cartesian2&&n instanceof Cartesian2)return Cartesian2.fromElements(e(r.x,n.x,a),e(r.y,n.y,a),scratchStorage.getCartesian2());if(r instanceof Cartesian3&&n instanceof Cartesian3)return Cartesian3.fromElements(e(r.x,n.x,a),e(r.y,n.y,a),e(r.z,n.z,a),scratchStorage.getCartesian3());if(r instanceof Cartesian4&&n instanceof Cartesian4)return Cartesian4.fromElements(e(r.x,n.x,a),e(r.y,n.y,a),e(r.z,n.z,a),e(r.w,n.w,a),scratchStorage.getCartesian4())}if("number"==typeof r&&"number"==typeof n&&"number"==typeof a)return e(r,n,a);if(r instanceof Cartesian2&&n instanceof Cartesian2&&a instanceof Cartesian2)return Cartesian2.fromElements(e(r.x,n.x,a.x),e(r.y,n.y,a.y),scratchStorage.getCartesian2());if(r instanceof Cartesian3&&n instanceof Cartesian3&&a instanceof Cartesian3)return Cartesian3.fromElements(e(r.x,n.x,a.x),e(r.y,n.y,a.y),e(r.z,n.z,a.z),scratchStorage.getCartesian3());if(r instanceof Cartesian4&&n instanceof Cartesian4&&a instanceof Cartesian4)return Cartesian4.fromElements(e(r.x,n.x,a.x),e(r.y,n.y,a.y),e(r.z,n.z,a.z),e(r.w,n.w,a.w),scratchStorage.getCartesian4());throw new RuntimeError('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+r+", "+n+", and "+a+".")}}function length(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof Cartesian2)return Cartesian2.magnitude(t);if(t instanceof Cartesian3)return Cartesian3.magnitude(t);if(t instanceof Cartesian4)return Cartesian4.magnitude(t);throw new RuntimeError('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function normalize(e,t){if("number"==typeof t)return 1;if(t instanceof Cartesian2)return Cartesian2.normalize(t,scratchStorage.getCartesian2());if(t instanceof Cartesian3)return Cartesian3.normalize(t,scratchStorage.getCartesian3());if(t instanceof Cartesian4)return Cartesian4.normalize(t,scratchStorage.getCartesian4());throw new RuntimeError('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}function distance(e,t,i){if("number"==typeof t&&"number"==typeof i)return Math.abs(t-i);if(t instanceof Cartesian2&&i instanceof Cartesian2)return Cartesian2.distance(t,i);if(t instanceof Cartesian3&&i instanceof Cartesian3)return Cartesian3.distance(t,i);if(t instanceof Cartesian4&&i instanceof Cartesian4)return Cartesian4.distance(t,i);throw new RuntimeError('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function dot(e,t,i){if("number"==typeof t&&"number"==typeof i)return t*i;if(t instanceof Cartesian2&&i instanceof Cartesian2)return Cartesian2.dot(t,i);if(t instanceof Cartesian3&&i instanceof Cartesian3)return Cartesian3.dot(t,i);if(t instanceof Cartesian4&&i instanceof Cartesian4)return Cartesian4.dot(t,i);throw new RuntimeError('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")}function cross(e,t,i){if(t instanceof Cartesian3&&i instanceof Cartesian3)return Cartesian3.cross(t,i,scratchStorage.getCartesian3());throw new RuntimeError('Function "'+e+'" requires vec3 arguments. Arguments are '+t+" and "+i+".")}function Node$2(e,t,i,r,n){this._type=e,this._value=t,this._left=i,this._right=r,this._test=n,this.evaluate=void 0,setEvaluateFunction(this)}function replaceDefines(e,t){if(!defined(t))return e;for(var i in t){var r,n;t.hasOwnProperty(i)&&(r=new RegExp("\\$\\{"+i+"\\}","g"),defined(n="("+t[i]+")")&&(e=e.replace(r,n)))}return e}function removeBackslashes(e){return e.replace(backslashRegex,backslashReplacement)}function replaceBackslashes(e){return e.replace(replacementRegex,"\\")}function replaceVariables(e){for(var t=e,i="",r=t.indexOf("${");0<=r;){var n,a=t.indexOf("'"),o=t.indexOf('"');if(0<=a&&a<r)n=t.indexOf("'",a+1),i+=t.substr(0,n+1),r=(t=t.substr(n+1)).indexOf("${");else if(0<=o&&o<r)n=t.indexOf('"',o+1),i+=t.substr(0,n+1),r=(t=t.substr(n+1)).indexOf("${");else{if(i+=t.substr(0,r),(o=t.indexOf("}"))<0)throw new RuntimeError("Unmatched {.");i+="czm_"+t.substr(r+2,o-(r+2)),r=(t=t.substr(o+1)).indexOf("${")}}return i+t}function parseLiteral(e){var t=typeof e.value;return null===e.value?new Node$2(ExpressionNodeType$1.LITERAL_NULL,null):"boolean"==t?new Node$2(ExpressionNodeType$1.LITERAL_BOOLEAN,e.value):"number"==t?new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,e.value):"string"==t?0<=e.value.indexOf("${")?new Node$2(ExpressionNodeType$1.VARIABLE_IN_STRING,e.value):new Node$2(ExpressionNodeType$1.LITERAL_STRING,replaceBackslashes(e.value)):void 0}function parseCall(e,t){var i,r,n,a,o=t.arguments,s=o.length;if("MemberExpression"===t.callee.type){i=t.callee.property.name;var l=t.callee.object;if("test"===i||"exec"===i){if("regExp"!==l.callee.name)throw new RuntimeError(i+" is not a function.");return 0===s?"test"===i?new Node$2(ExpressionNodeType$1.LITERAL_BOOLEAN,!1):new Node$2(ExpressionNodeType$1.LITERAL_NULL,null):(n=createRuntimeAst(e,l),a=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.FUNCTION_CALL,i,n,a))}if("toString"===i)return r=createRuntimeAst(e,l),new Node$2(ExpressionNodeType$1.FUNCTION_CALL,i,r);throw new RuntimeError('Unexpected function call "'+i+'".')}if("color"===(i=t.callee.name)){if(0===s)return new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i);if(r=createRuntimeAst(e,o[0]),defined(o[1])){var c=createRuntimeAst(e,o[1]);return new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i,[r,c])}return new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i,[r])}if("rgb"===i||"hsl"===i){if(s<3)throw new RuntimeError(i+" requires three arguments.");return r=[createRuntimeAst(e,o[0]),createRuntimeAst(e,o[1]),createRuntimeAst(e,o[2])],new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i,r)}if("rgba"===i||"hsla"===i){if(s<4)throw new RuntimeError(i+" requires four arguments.");return r=[createRuntimeAst(e,o[0]),createRuntimeAst(e,o[1]),createRuntimeAst(e,o[2]),createRuntimeAst(e,o[3])],new Node$2(ExpressionNodeType$1.LITERAL_COLOR,i,r)}if("vec2"===i||"vec3"===i||"vec4"===i){r=new Array(s);for(var u=0;u<s;++u)r[u]=createRuntimeAst(e,o[u]);return new Node$2(ExpressionNodeType$1.LITERAL_VECTOR,i,r)}if("isNaN"===i||"isFinite"===i)return 0===s?new Node$2(ExpressionNodeType$1.LITERAL_BOOLEAN,"isNaN"===i):(r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r));if("isExactClass"===i||"isClass"===i){if(s<1||1<s)throw new RuntimeError(i+" requires exactly one argument.");return r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r)}if("getExactClassName"===i){if(0<s)throw new RuntimeError(i+" does not take any argument.");return new Node$2(ExpressionNodeType$1.UNARY,i)}if(defined(unaryFunctions[i])){if(1!==s)throw new RuntimeError(i+" requires exactly one argument.");return r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r)}if(defined(binaryFunctions[i])){if(2!==s)throw new RuntimeError(i+" requires exactly two arguments.");return n=createRuntimeAst(e,o[0]),a=createRuntimeAst(e,o[1]),new Node$2(ExpressionNodeType$1.BINARY,i,n,a)}if(defined(ternaryFunctions[i])){if(3!==s)throw new RuntimeError(i+" requires exactly three arguments.");return n=createRuntimeAst(e,o[0]),a=createRuntimeAst(e,o[1]),c=createRuntimeAst(e,o[2]),new Node$2(ExpressionNodeType$1.TERNARY,i,n,a,c)}if("Boolean"===i)return 0===s?new Node$2(ExpressionNodeType$1.LITERAL_BOOLEAN,!1):(r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r));if("Number"===i)return 0===s?new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,0):(r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r));if("String"===i)return 0===s?new Node$2(ExpressionNodeType$1.LITERAL_STRING,""):(r=createRuntimeAst(e,o[0]),new Node$2(ExpressionNodeType$1.UNARY,i,r));if("regExp"===i)return parseRegex$1(e,t);throw new RuntimeError('Unexpected function call "'+i+'".')}function parseRegex$1(e,t){if(0===(t=t.arguments).length)return new Node$2(ExpressionNodeType$1.LITERAL_REGEX,new RegExp);var i,r=createRuntimeAst(e,t[0]);if(1<t.length){var n=createRuntimeAst(e,t[1]);if(isLiteralType(r)&&isLiteralType(n)){try{i=new RegExp(replaceBackslashes(String(r._value)),n._value)}catch(e){throw new RuntimeError(e)}return new Node$2(ExpressionNodeType$1.LITERAL_REGEX,i)}return new Node$2(ExpressionNodeType$1.REGEX,r,n)}if(isLiteralType(r)){try{i=new RegExp(replaceBackslashes(String(r._value)))}catch(e){throw new RuntimeError(e)}return new Node$2(ExpressionNodeType$1.LITERAL_REGEX,i)}return new Node$2(ExpressionNodeType$1.REGEX,r)}function parseKeywordsAndVariables(e){if(isVariable(e.name)){var t=getPropertyName(e.name);return"tiles3d_"===t.substr(0,8)?new Node$2(ExpressionNodeType$1.BUILTIN_VARIABLE,t):new Node$2(ExpressionNodeType$1.VARIABLE,t)}if("NaN"===e.name)return new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new Node$2(ExpressionNodeType$1.LITERAL_UNDEFINED,void 0);throw new RuntimeError(e.name+" is not defined.")}function parseMathConstant(e){return"PI"===(e=e.property.name)?new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,Math.PI):"E"===e?new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,Math.E):void 0}function parseNumberConstant(e){if("POSITIVE_INFINITY"===e.property.name)return new Node$2(ExpressionNodeType$1.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function parseMemberExpression(e,t){if("Math"===t.object.name)return parseMathConstant(t);if("Number"===t.object.name)return parseNumberConstant(t);var i,r=createRuntimeAst(e,t.object);return t.computed?(i=createRuntimeAst(e,t.property),new Node$2(ExpressionNodeType$1.MEMBER,"brackets",r,i)):(i=new Node$2(ExpressionNodeType$1.LITERAL_STRING,t.property.name),new Node$2(ExpressionNodeType$1.MEMBER,"dot",r,i))}function isLiteralType(e){return e._type>=ExpressionNodeType$1.LITERAL_NULL}function isVariable(e){return"czm_"===e.substr(0,4)}function getPropertyName(e){return e.substr(4)}function createRuntimeAst(e,t){if("Literal"===t.type)o=parseLiteral(t);else if("CallExpression"===t.type)o=parseCall(e,t);else if("Identifier"===t.type)o=parseKeywordsAndVariables(t);else if("UnaryExpression"===t.type){r=t.operator;var i=createRuntimeAst(e,t.argument);if(!(-1<unaryOperators.indexOf(r)))throw new RuntimeError('Unexpected operator "'+r+'".');o=new Node$2(ExpressionNodeType$1.UNARY,r,i)}else if("BinaryExpression"===t.type){if(r=t.operator,n=createRuntimeAst(e,t.left),a=createRuntimeAst(e,t.right),!(-1<binaryOperators.indexOf(r)))throw new RuntimeError('Unexpected operator "'+r+'".');o=new Node$2(ExpressionNodeType$1.BINARY,r,n,a)}else if("LogicalExpression"===t.type)r=t.operator,n=createRuntimeAst(e,t.left),a=createRuntimeAst(e,t.right),-1<binaryOperators.indexOf(r)&&(o=new Node$2(ExpressionNodeType$1.BINARY,r,n,a));else if("ConditionalExpression"===t.type)var r=createRuntimeAst(e,t.test),n=createRuntimeAst(e,t.consequent),a=createRuntimeAst(e,t.alternate),o=new Node$2(ExpressionNodeType$1.CONDITIONAL,"?",n,a,r);else if("MemberExpression"===t.type)o=parseMemberExpression(e,t);else{if("ArrayExpression"!==t.type)throw"Compound"===t.type?new RuntimeError("Provide exactly one expression."):new RuntimeError("Cannot parse expression.");for(var s=[],l=0;l<t.elements.length;l++)s[l]=createRuntimeAst(e,t.elements[l]);o=new Node$2(ExpressionNodeType$1.ARRAY,s)}return o}function setEvaluateFunction(e){e._type===ExpressionNodeType$1.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===ExpressionNodeType$1.FUNCTION_CALL?"test"===e._value?e.evaluate=e._evaluateRegExpTest:"exec"===e._value?e.evaluate=e._evaluateRegExpExec:"toString"===e._value&&(e.evaluate=e._evaluateToString):e._type===ExpressionNodeType$1.UNARY?"!"===e._value?e.evaluate=e._evaluateNot:"-"===e._value?e.evaluate=e._evaluateNegative:"+"===e._value?e.evaluate=e._evaluatePositive:"isNaN"===e._value?e.evaluate=e._evaluateNaN:"isFinite"===e._value?e.evaluate=e._evaluateIsFinite:"isExactClass"===e._value?e.evaluate=e._evaluateIsExactClass:"isClass"===e._value?e.evaluate=e._evaluateIsClass:"getExactClassName"===e._value?e.evaluate=e._evaluateGetExactClassName:"Boolean"===e._value?e.evaluate=e._evaluateBooleanConversion:"Number"===e._value?e.evaluate=e._evaluateNumberConversion:"String"===e._value?e.evaluate=e._evaluateStringConversion:defined(unaryFunctions[e._value])&&(e.evaluate=getEvaluateUnaryFunction(e._value)):e._type===ExpressionNodeType$1.BINARY?"+"===e._value?e.evaluate=e._evaluatePlus:"-"===e._value?e.evaluate=e._evaluateMinus:"*"===e._value?e.evaluate=e._evaluateTimes:"/"===e._value?e.evaluate=e._evaluateDivide:"%"===e._value?e.evaluate=e._evaluateMod:"==="===e._value?e.evaluate=e._evaluateEqualsStrict:"!=="===e._value?e.evaluate=e._evaluateNotEqualsStrict:"<"===e._value?e.evaluate=e._evaluateLessThan:"<="===e._value?e.evaluate=e._evaluateLessThanOrEquals:">"===e._value?e.evaluate=e._evaluateGreaterThan:">="===e._value?e.evaluate=e._evaluateGreaterThanOrEquals:"&&"===e._value?e.evaluate=e._evaluateAnd:"||"===e._value?e.evaluate=e._evaluateOr:"=~"===e._value?e.evaluate=e._evaluateRegExpMatch:"!~"===e._value?e.evaluate=e._evaluateRegExpNotMatch:defined(binaryFunctions[e._value])&&(e.evaluate=getEvaluateBinaryFunction(e._value)):e._type===ExpressionNodeType$1.TERNARY?e.evaluate=getEvaluateTernaryFunction(e._value):e._type===ExpressionNodeType$1.MEMBER?"brackets"===e._value?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===ExpressionNodeType$1.ARRAY?e.evaluate=e._evaluateArray:e._type===ExpressionNodeType$1.VARIABLE?e.evaluate=e._evaluateVariable:e._type===ExpressionNodeType$1.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===ExpressionNodeType$1.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===ExpressionNodeType$1.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===ExpressionNodeType$1.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===ExpressionNodeType$1.REGEX?e.evaluate=e._evaluateRegExp:e._type===ExpressionNodeType$1.BUILTIN_VARIABLE?"tiles3d_tileset_time"===e._value&&(e.evaluate=evaluateTilesetTime):e.evaluate=e._evaluateLiteral}function evaluateTilesetTime(e){return defined(e)?e.content.tileset.timeSinceLoad:0}function getEvaluateUnaryFunction(e){var t=unaryFunctions[e];return function(i){return i=this._left.evaluate(i),t(e,i)}}function getEvaluateBinaryFunction(e){var t=binaryFunctions[e];return function(i){var r=this._left.evaluate(i);i=this._right.evaluate(i);return t(e,r,i)}}function getEvaluateTernaryFunction(e){var t=ternaryFunctions[e];return function(i){var r=this._left.evaluate(i),n=this._right.evaluate(i);i=this._test.evaluate(i);return t(e,r,n,i)}}function getFeatureProperty(e,t){if(defined(e))return e.getProperty(t)}function checkFeature(e){return"feature"===e._value}function convertHSLToRGB(e){for(var t=e._left,i=t.length,r=0;r<i;++r)if(t[r]._type!==ExpressionNodeType$1.LITERAL_NUMBER)return;var n=t[0]._value,a=t[1]._value,o=t[2]._value;e=4===i?t[3]._value:1;return Color.fromHsl(n,a,o,e,scratchColor$2)}function convertRGBToColor(e){for(var t=e._left,i=t.length,r=0;r<i;++r)if(t[r]._type!==ExpressionNodeType$1.LITERAL_NUMBER)return;return(e=scratchColor$2).red=t[0]._value/255,e.green=t[1]._value/255,e.blue=t[2]._value/255,e.alpha=4===i?t[3]._value:1,e}function numberToString(e){return e%1==0?e.toFixed(1):e.toString()}function colorToVec3(e){return"vec3("+numberToString(e.red)+", "+numberToString(e.green)+", "+numberToString(e.blue)+")"}function colorToVec4(e){return"vec4("+numberToString(e.red)+", "+numberToString(e.green)+", "+numberToString(e.blue)+", "+numberToString(e.alpha)+")"}function getExpressionArray(e,t,i,r){for(var n=e.length,a=new Array(n),o=0;o<n;++o)a[o]=e[o].getShaderExpression(t,i,r);return a}function getVariableName(e,t){if(!defined(t[e]))throw new RuntimeError('Style references a property "'+e+'" that does not exist or is not styleable.');return t[e]}Node$2.prototype._evaluateLiteral=function(){return this._value},Node$2.prototype._evaluateLiteralColor=function(e){var t,i=scratchColor$2,r=this._left;return"color"===this._value?defined(r)?1<r.length?(Color.fromCssColorString(r[0].evaluate(e),i),i.alpha=r[1].evaluate(e)):Color.fromCssColorString(r[0].evaluate(e),i):Color.fromBytes(255,255,255,255,i):"rgb"===this._value?Color.fromBytes(r[0].evaluate(e),r[1].evaluate(e),r[2].evaluate(e),255,i):"rgba"===this._value?(t=255*r[3].evaluate(e),Color.fromBytes(r[0].evaluate(e),r[1].evaluate(e),r[2].evaluate(e),t,i)):"hsl"===this._value?Color.fromHsl(r[0].evaluate(e),r[1].evaluate(e),r[2].evaluate(e),1,i):"hsla"===this._value&&Color.fromHsl(r[0].evaluate(e),r[1].evaluate(e),r[2].evaluate(e),r[3].evaluate(e),i),Cartesian4.fromColor(i,scratchStorage.getCartesian4())},Node$2.prototype._evaluateLiteralVector=function(e){for(var t=scratchStorage.getArray(),i=this._value,r=this._left,n=r.length,a=0;a<n;++a){var o=r[a].evaluate(e);if("number"==typeof o)t.push(o);else if(o instanceof Cartesian2)t.push(o.x,o.y);else if(o instanceof Cartesian3)t.push(o.x,o.y,o.z);else{if(!(o instanceof Cartesian4))throw new RuntimeError(i+" argument must be a vector or number. Argument is "+o+".");t.push(o.x,o.y,o.z,o.w)}}var s=t.length,l=parseInt(i.charAt(3));if(0===s)throw new RuntimeError("Invalid "+i+" constructor. No valid arguments.");if(s<l&&1<s)throw new RuntimeError("Invalid "+i+" constructor. Not enough arguments.");if(l<s&&1<n)throw new RuntimeError("Invalid "+i+" constructor. Too many arguments.");return 1===s&&(s=t[0],t.push(s,s,s)),"vec2"===i?Cartesian2.fromArray(t,0,scratchStorage.getCartesian2()):"vec3"===i?Cartesian3.fromArray(t,0,scratchStorage.getCartesian3()):"vec4"===i?Cartesian4.fromArray(t,0,scratchStorage.getCartesian4()):void 0},Node$2.prototype._evaluateLiteralString=function(){return this._value},Node$2.prototype._evaluateVariableString=function(e){for(var t=this._value,i=variableRegex.exec(t);null!==i;){var r=i[0],n=getFeatureProperty(e,i[1]);defined(n)||(n=""),t=t.replace(r,n),i=variableRegex.exec(t)}return t},Node$2.prototype._evaluateVariable=function(e){return getFeatureProperty(e,this._value)},Node$2.prototype._evaluateMemberDot=function(e){if(checkFeature(this._left))return getFeatureProperty(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(defined(t)){if(e=this._right.evaluate(e),t instanceof Cartesian2||t instanceof Cartesian3||t instanceof Cartesian4){if("r"===e)return t.x;if("g"===e)return t.y;if("b"===e)return t.z;if("a"===e)return t.w}return t[e]}},Node$2.prototype._evaluateMemberBrackets=function(e){if(checkFeature(this._left))return getFeatureProperty(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(defined(t)){if(e=this._right.evaluate(e),t instanceof Cartesian2||t instanceof Cartesian3||t instanceof Cartesian4){if(0===e||"r"===e)return t.x;if(1===e||"g"===e)return t.y;if(2===e||"b"===e)return t.z;if(3===e||"a"===e)return t.w}return t[e]}},Node$2.prototype._evaluateArray=function(e){for(var t=[],i=0;i<this._value.length;i++)t[i]=this._value[i].evaluate(e);return t},Node$2.prototype._evaluateNot=function(e){if("boolean"!=typeof(e=this._left.evaluate(e)))throw new RuntimeError('Operator "!" requires a boolean argument. Argument is '+e+".");return!e},Node$2.prototype._evaluateNegative=function(e){if((e=this._left.evaluate(e))instanceof Cartesian2)return Cartesian2.negate(e,scratchStorage.getCartesian2());if(e instanceof Cartesian3)return Cartesian3.negate(e,scratchStorage.getCartesian3());if(e instanceof Cartesian4)return Cartesian4.negate(e,scratchStorage.getCartesian4());if("number"==typeof e)return-e;throw new RuntimeError('Operator "-" requires a vector or number argument. Argument is '+e+".")},Node$2.prototype._evaluatePositive=function(e){if(!((e=this._left.evaluate(e))instanceof Cartesian2||e instanceof Cartesian3||e instanceof Cartesian4||"number"==typeof e))throw new RuntimeError('Operator "+" requires a vector or number argument. Argument is '+e+".");return e},Node$2.prototype._evaluateLessThan=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof e)throw new RuntimeError('Operator "<" requires number arguments. Arguments are '+t+" and "+e+".");return t<e},Node$2.prototype._evaluateLessThanOrEquals=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof e)throw new RuntimeError('Operator "<=" requires number arguments. Arguments are '+t+" and "+e+".");return t<=e},Node$2.prototype._evaluateGreaterThan=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof e)throw new RuntimeError('Operator ">" requires number arguments. Arguments are '+t+" and "+e+".");return e<t},Node$2.prototype._evaluateGreaterThanOrEquals=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof e)throw new RuntimeError('Operator ">=" requires number arguments. Arguments are '+t+" and "+e+".");return e<=t},Node$2.prototype._evaluateOr=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new RuntimeError('Operator "||" requires boolean arguments. First argument is '+t+".");if(t)return!0;if("boolean"!=typeof(e=this._right.evaluate(e)))throw new RuntimeError('Operator "||" requires boolean arguments. Second argument is '+e+".");return t||e},Node$2.prototype._evaluateAnd=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new RuntimeError('Operator "&&" requires boolean arguments. First argument is '+t+".");if(!t)return!1;if("boolean"!=typeof(e=this._right.evaluate(e)))throw new RuntimeError('Operator "&&" requires boolean arguments. Second argument is '+e+".");return t&&e},Node$2.prototype._evaluatePlus=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.add(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.add(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.add(t,e,scratchStorage.getCartesian4());if("string"==typeof t||"string"==typeof e)return t+e;if("number"==typeof t&&"number"==typeof e)return t+e;throw new RuntimeError('Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateMinus=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.subtract(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.subtract(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.subtract(t,e,scratchStorage.getCartesian4());if("number"==typeof t&&"number"==typeof e)return t-e;throw new RuntimeError('Operator "-" requires vector or number arguments of matching types. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateTimes=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.multiplyComponents(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian2&&"number"==typeof t)return Cartesian2.multiplyByScalar(e,t,scratchStorage.getCartesian2());if(t instanceof Cartesian2&&"number"==typeof e)return Cartesian2.multiplyByScalar(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.multiplyComponents(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian3&&"number"==typeof t)return Cartesian3.multiplyByScalar(e,t,scratchStorage.getCartesian3());if(t instanceof Cartesian3&&"number"==typeof e)return Cartesian3.multiplyByScalar(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.multiplyComponents(t,e,scratchStorage.getCartesian4());if(e instanceof Cartesian4&&"number"==typeof t)return Cartesian4.multiplyByScalar(e,t,scratchStorage.getCartesian4());if(t instanceof Cartesian4&&"number"==typeof e)return Cartesian4.multiplyByScalar(t,e,scratchStorage.getCartesian4());if("number"==typeof t&&"number"==typeof e)return t*e;throw new RuntimeError('Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateDivide=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.divideComponents(t,e,scratchStorage.getCartesian2());if(t instanceof Cartesian2&&"number"==typeof e)return Cartesian2.divideByScalar(t,e,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.divideComponents(t,e,scratchStorage.getCartesian3());if(t instanceof Cartesian3&&"number"==typeof e)return Cartesian3.divideByScalar(t,e,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.divideComponents(t,e,scratchStorage.getCartesian4());if(t instanceof Cartesian4&&"number"==typeof e)return Cartesian4.divideByScalar(t,e,scratchStorage.getCartesian4());if("number"==typeof t&&"number"==typeof e)return t/e;throw new RuntimeError('Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateMod=function(e){var t=this._left.evaluate(e);if((e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2)return Cartesian2.fromElements(t.x%e.x,t.y%e.y,scratchStorage.getCartesian2());if(e instanceof Cartesian3&&t instanceof Cartesian3)return Cartesian3.fromElements(t.x%e.x,t.y%e.y,t.z%e.z,scratchStorage.getCartesian3());if(e instanceof Cartesian4&&t instanceof Cartesian4)return Cartesian4.fromElements(t.x%e.x,t.y%e.y,t.z%e.z,t.w%e.w,scratchStorage.getCartesian4());if("number"==typeof t&&"number"==typeof e)return t%e;throw new RuntimeError('Operator "%" requires vector or number arguments of matching types. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateEqualsStrict=function(e){var t=this._left.evaluate(e);return(e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2||e instanceof Cartesian3&&t instanceof Cartesian3||e instanceof Cartesian4&&t instanceof Cartesian4?t.equals(e):t===e},Node$2.prototype._evaluateNotEqualsStrict=function(e){var t=this._left.evaluate(e);return(e=this._right.evaluate(e))instanceof Cartesian2&&t instanceof Cartesian2||e instanceof Cartesian3&&t instanceof Cartesian3||e instanceof Cartesian4&&t instanceof Cartesian4?!t.equals(e):t!==e},Node$2.prototype._evaluateConditional=function(e){var t=this._test.evaluate(e);if("boolean"!=typeof t)throw new RuntimeError("Conditional argument of conditional expression must be a boolean. Argument is "+t+".");return(t?this._left:this._right).evaluate(e)},Node$2.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},Node$2.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},Node$2.prototype._evaluateIsExactClass=function(e){return!!defined(e)&&e.isExactClass(this._left.evaluate(e))},Node$2.prototype._evaluateIsClass=function(e){return!!defined(e)&&e.isClass(this._left.evaluate(e))},Node$2.prototype._evaluateGetExactClassName=function(e){if(defined(e))return e.getExactClassName()},Node$2.prototype._evaluateBooleanConversion=function(e){return Boolean(this._left.evaluate(e))},Node$2.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},Node$2.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},Node$2.prototype._evaluateRegExp=function(e){var t,i=this._value.evaluate(e),r="";defined(this._left)&&(r=this._left.evaluate(e));try{t=new RegExp(i,r)}catch(e){throw new RuntimeError(e)}return t},Node$2.prototype._evaluateRegExpTest=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof e))throw new RuntimeError("RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+e+".");return t.test(e)},Node$2.prototype._evaluateRegExpMatch=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof e)return t.test(e);if(e instanceof RegExp&&"string"==typeof t)return e.test(t);throw new RuntimeError('Operator "=~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateRegExpNotMatch=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof e)return!t.test(e);if(e instanceof RegExp&&"string"==typeof t)return!e.test(t);throw new RuntimeError('Operator "!~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+e+".")},Node$2.prototype._evaluateRegExpExec=function(e){var t=this._left.evaluate(e);e=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof e))throw new RuntimeError("RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+e+".");return defined(e=t.exec(e))?e[1]:null},Node$2.prototype._evaluateToString=function(e){if((e=this._left.evaluate(e))instanceof RegExp||e instanceof Cartesian2||e instanceof Cartesian3||e instanceof Cartesian4)return String(e);throw new RuntimeError('Unexpected function call "'+this._value+'".')};var nullSentinel="czm_infinity";function Vector3DTilePrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=defaultValue(e.center,Cartesian3.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=Color.clone(Color.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=defaultValue(e.classificationType,ClassificationType$1.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};for(var t=this._batchIds.length,i=0;i<t;++i){var r=this._batchIds[i];this._batchIdLookUp[r]=i}}Node$2.prototype.getShaderExpression=function(e,t,i){var r,n,a,o=this._type,s=this._value;switch(defined(this._left)&&(n=Array.isArray(this._left)?getExpressionArray(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),defined(this._right)&&(l=this._right.getShaderExpression(e,t,this)),defined(this._test)&&(a=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(s=getExpressionArray(this._value,e,t,this)),o){case ExpressionNodeType$1.VARIABLE:if(checkFeature(this))return;return getVariableName(s,e);case ExpressionNodeType$1.UNARY:if("Boolean"===s)return"bool("+n+")";if("Number"===s)return"float("+n+")";if("round"===s)return"floor("+n+" + 0.5)";if(defined(unaryFunctions[s]))return s+"("+n+")";if("isNaN"===s)return"("+n+" != "+n+")";if("isFinite"===s)return"(abs("+n+") < czm_infinity)";if("String"===s||"isExactClass"===s||"isClass"===s||"getExactClassName"===s)throw new RuntimeError('Error generating style shader: "'+s+'" is not supported.');return s+n;case ExpressionNodeType$1.BINARY:return"%"===s?"mod("+n+", "+l+")":"==="===s?"("+n+" == "+l+")":"!=="===s?"("+n+" != "+l+")":"atan2"===s?"atan("+n+", "+l+")":defined(binaryFunctions[s])?s+"("+n+", "+l+")":"("+n+" "+s+" "+l+")";case ExpressionNodeType$1.TERNARY:if(defined(ternaryFunctions[s]))return s+"("+n+", "+l+", "+a+")";break;case ExpressionNodeType$1.CONDITIONAL:return"("+a+" ? "+n+" : "+l+")";case ExpressionNodeType$1.MEMBER:return checkFeature(this._left)?getVariableName(l,e):"r"===l||"x"===l||"0.0"===l?n+"[0]":"g"===l||"y"===l||"1.0"===l?n+"[1]":"b"===l||"z"===l||"2.0"===l?n+"[2]":"a"===l||"w"===l||"3.0"===l?n+"[3]":n+"[int("+l+")]";case ExpressionNodeType$1.FUNCTION_CALL:throw new RuntimeError('Error generating style shader: "'+s+'" is not supported.');case ExpressionNodeType$1.ARRAY:if(4===s.length)return"vec4("+s[0]+", "+s[1]+", "+s[2]+", "+s[3]+")";if(3===s.length)return"vec3("+s[0]+", "+s[1]+", "+s[2]+")";if(2===s.length)return"vec2("+s[0]+", "+s[1]+")";throw new RuntimeError("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case ExpressionNodeType$1.REGEX:throw new RuntimeError("Error generating style shader: Regular expressions are not supported.");case ExpressionNodeType$1.VARIABLE_IN_STRING:throw new RuntimeError("Error generating style shader: Converting a variable to a string is not supported.");case ExpressionNodeType$1.LITERAL_NULL:return nullSentinel;case ExpressionNodeType$1.LITERAL_BOOLEAN:return s?"true":"false";case ExpressionNodeType$1.LITERAL_NUMBER:return numberToString(s);case ExpressionNodeType$1.LITERAL_STRING:if(defined(i)&&i._type===ExpressionNodeType$1.MEMBER&&("r"===s||"g"===s||"b"===s||"a"===s||"x"===s||"y"===s||"z"===s||"w"===s||checkFeature(i._left)))return s;if(defined(r=Color.fromCssColorString(s,scratchColor$2)))return colorToVec3(r);throw new RuntimeError("Error generating style shader: String literals are not supported.");case ExpressionNodeType$1.LITERAL_COLOR:if(e=n,"color"===s){if(!defined(e))return"vec4(1.0)";if(1<e.length){var l=e[0];return"1.0"!==(i=e[1])&&(t.translucent=!0),"vec4("+l+", "+i+")"}return"vec4("+e[0]+", 1.0)"}if("rgb"===s)return defined(r=convertRGBToColor(this))?colorToVec4(r):"vec4("+e[0]+" / 255.0, "+e[1]+" / 255.0, "+e[2]+" / 255.0, 1.0)";if("rgba"===s)return"1.0"!==e[3]&&(t.translucent=!0),defined(r=convertRGBToColor(this))?colorToVec4(r):"vec4("+e[0]+" / 255.0, "+e[1]+" / 255.0, "+e[2]+" / 255.0, "+e[3]+")";if("hsl"===s)return defined(r=convertHSLToRGB(this))?colorToVec4(r):"vec4(czm_HSLToRGB(vec3("+e[0]+", "+e[1]+", "+e[2]+")), 1.0)";if("hsla"===s)return defined(r=convertHSLToRGB(this))?(1!==r.alpha&&(t.translucent=!0),colorToVec4(r)):("1.0"!==e[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+e[0]+", "+e[1]+", "+e[2]+")), "+e[3]+")");break;case ExpressionNodeType$1.LITERAL_VECTOR:for(var c=n.length,u=s+"(",d=0;d<c;++d)u+=n[d],d<c-1&&(u+=", ");return u+")";case ExpressionNodeType$1.LITERAL_REGEX:throw new RuntimeError("Error generating style shader: Regular expressions are not supported.");case ExpressionNodeType$1.LITERAL_UNDEFINED:return nullSentinel;case ExpressionNodeType$1.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===s)return"u_time"}},Object.defineProperties(Vector3DTilePrimitive.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var defaultAttributeLocations={position:0,a_batchId:1};function createVertexArray$1(e,t){var i,r,n;defined(e._va)||(i=Buffer$1.createVertexBuffer({context:t,typedArray:e._positions,usage:BufferUsage$1.STATIC_DRAW}),n=Buffer$1.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:BufferUsage$1.STATIC_DRAW}),r=Buffer$1.createIndexBuffer({context:t,typedArray:e._indices,usage:BufferUsage$1.DYNAMIC_DRAW,indexDatatype:2===e._indices.BYTES_PER_ELEMENT?IndexDatatype$1.UNSIGNED_SHORT:IndexDatatype$1.UNSIGNED_INT}),n=[{index:0,vertexBuffer:i,componentDatatype:ComponentDatatype$1.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:n,componentDatatype:ComponentDatatype$1.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}],e._va=new VertexArray({context:t,attributes:n,indexBuffer:r}),t.webgl2&&(e._vaSwap=new VertexArray({context:t,attributes:n,indexBuffer:Buffer$1.createIndexBuffer({context:t,sizeInBytes:r.sizeInBytes,usage:BufferUsage$1.DYNAMIC_DRAW,indexDatatype:r.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._verticesPromise=void 0)}function createShaders(e,t){if(!defined(e._sp)){var i=e._batchTable,r=defaultValue(e._attributeLocations,defaultAttributeLocations),n=e._pickId,a=e._vertexShaderSource,o=e._fragmentShaderSource;if(defined(a))return e._sp=ShaderProgram.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:r}),e._spStencil=e._sp,o=ShaderSource.replaceMain(o,"czm_non_pick_main")+"void main() \n{ \n    czm_non_pick_main(); \n    gl_FragColor = "+n+"; \n} \n",void(e._spPick=ShaderProgram.fromCache({context:t,vertexShaderSource:a,fragmentShaderSource:o,attributeLocations:r}));var s=i.getVertexShaderCallback(!1,"a_batchId",void 0)(VectorTileVS);a=i.getFragmentShaderCallback()(ShadowVolumeFS,!1,void 0),n=i.getPickId(),o=new ShaderSource({sources:[s]}),i=new ShaderSource({defines:["VECTOR_TILE"],sources:[a]});e._sp=ShaderProgram.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:i,attributeLocations:r}),o=new ShaderSource({sources:[VectorTileVS]}),i=new ShaderSource({defines:["VECTOR_TILE"],sources:[ShadowVolumeFS]}),e._spStencil=ShaderProgram.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:i,attributeLocations:r}),a=ShaderSource.replaceMain(a,"czm_non_pick_main")+"\nvoid main() \n{ \n    czm_non_pick_main(); \n    gl_FragColor = "+n+"; \n} \n",s=new ShaderSource({sources:[s]}),a=new ShaderSource({defines:["VECTOR_TILE"],sources:[a]}),e._spPick=ShaderProgram.fromCache({context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:r})}}function getStencilDepthRenderState$1(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e=e?StencilFunction$1.EQUAL:StencilFunction$1.ALWAYS,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.DECREMENT_WRAP,zPass:StencilOperation$1.KEEP},backFunction:e,backOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.INCREMENT_WRAP,zPass:StencilOperation$1.KEEP},reference:StencilConstants$1.CESIUM_3D_TILE_MASK,mask:StencilConstants$1.CESIUM_3D_TILE_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:DepthFunction$1.LESS_OR_EQUAL},depthMask:!1}}var colorRenderState={stencilTest:{enabled:!0,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},backFunction:StencilFunction$1.NOT_EQUAL,backOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:BlendingState$1.ALPHA_BLEND},pickRenderState$1={stencilTest:{enabled:!0,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},backFunction:StencilFunction$1.NOT_EQUAL,backOperation:{fail:StencilOperation$1.ZERO,zFail:StencilOperation$1.ZERO,zPass:StencilOperation$1.ZERO},reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},stencilMask:StencilConstants$1.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function createRenderStates$2(e){defined(e._rsStencilDepthPass)||(e._rsStencilDepthPass=RenderState.fromCache(getStencilDepthRenderState$1(!1)),e._rsStencilDepthPass3DTiles=RenderState.fromCache(getStencilDepthRenderState$1(!0)),e._rsColorPass=RenderState.fromCache(colorRenderState),e._rsPickPass=RenderState.fromCache(pickRenderState$1))}var modifiedModelViewScratch$1=new Matrix4,rtcScratch$1=new Cartesian3;function createUniformMap(e,t){var i;defined(e._uniformMap)||(i={u_modifiedModelViewProjection:function(){var i=t.uniformState.view,r=t.uniformState.projection;return Matrix4.clone(i,modifiedModelViewScratch$1),Matrix4.multiplyByPoint(modifiedModelViewScratch$1,e._center,rtcScratch$1),Matrix4.setTranslation(modifiedModelViewScratch$1,rtcScratch$1,modifiedModelViewScratch$1),Matrix4.multiply(r,modifiedModelViewScratch$1,modifiedModelViewScratch$1),modifiedModelViewScratch$1},u_highlightColor:function(){return e._highlightColor}},e._uniformMap=e._batchTable.getUniformMapCallback()(i))}function copyIndicesCPU(e,t,i,r,n,a,o){for(var s=e.constructor.BYTES_PER_ELEMENT,l=a.length,c=0;c<l;++c){var u=o[a[c]],d=r[u],h=n[u];d=new e.constructor(e.buffer,s*d,h);t.set(d,i),r[u]=i,i+=h}return i}function rebatchCPU(e,t){var i=e._indices,r=e._indexOffsets,n=e._indexCounts,a=e._batchIdLookUp,o=new i.constructor(i.length),s=t.pop(),l=[s],c=copyIndicesCPU(i,o,0,r,n,s.batchIds,a);for(s.offset=0,s.count=c;0<t.length;){var u,d=t.pop();Color.equals(d.color,s.color)?(c=copyIndicesCPU(i,o,c,r,n,d.batchIds,a),s.batchIds=s.batchIds.concat(d.batchIds),s.count=c-s.offset):(c=copyIndicesCPU(i,o,u=c,r,n,d.batchIds,a),d.offset=u,d.count=c-u,l.push(d),s=d)}e._va.indexBuffer.copyFromArrayView(o),e._indices=o,e._batchedIndices=l}function copyIndicesGPU(e,t,i,r,n,a,o){for(var s=e.bytesPerIndex,l=a.length,c=0;c<l;++c){var u=o[a[c]],d=r[u],h=n[u];t.copyFromBuffer(e,d*s,i*s,h*s),r[u]=i,i+=h}return i}function rebatchGPU(e,t){var i=e._indexOffsets,r=e._indexCounts,n=e._batchIdLookUp,a=t.pop(),o=[a],s=e._va.indexBuffer,l=e._vaSwap.indexBuffer,c=copyIndicesGPU(s,l,0,i,r,a.batchIds,n);for(a.offset=0,a.count=c;0<t.length;){var u,d=t.pop();Color.equals(d.color,a.color)?(c=copyIndicesGPU(s,l,c,i,r,d.batchIds,n),a.batchIds=a.batchIds.concat(d.batchIds),a.count=c-a.offset):(c=copyIndicesGPU(s,l,u=c,i,r,d.batchIds,n),d.offset=u,d.count=c-u,o.push(d),a=d)}var h=e._va;e._va=e._vaSwap,e._vaSwap=h,e._batchedIndices=o}function compareColors(e,t){return t.color.toRgba()-e.color.toRgba()}function rebatchCommands(e,t){if(!e._batchDirty)return!1;for(var i=e._batchedIndices,r=i.length,n=!1,a={},o=0;o<r;++o){var s=i[o].color.toRgba();if(defined(a[s])){n=!0;break}a[s]=!0}return n?n&&!e.forceRebatch&&e._framesSinceLastRebatch<120?void++e._framesSinceLastRebatch:(i.sort(compareColors),(t.webgl2?rebatchGPU:rebatchCPU)(e,i),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0):e._batchDirty=!1}function createColorCommands$1(e,t){var i=rebatchCommands(e,t),r=e._commands,n=e._batchedIndices,a=n.length;t=2*a;if(!defined(r)||i||r.length!==t){r.length=t;for(var o=e._va,s=e._sp,l=defaultValue(e._modelMatrix,Matrix4.IDENTITY),c=e._uniformMap,u=e._boundingVolume,d=0;d<a;++d){var h=n[d].offset,p=n[d].count,f=r[2*d];defined(f)||(f=r[2*d]=new DrawCommand({owner:e})),f.vertexArray=o,f.modelMatrix=l,f.offset=h,f.count=p,f.renderState=e._rsStencilDepthPass,f.shaderProgram=s,f.uniformMap=c,f.boundingVolume=u,f.cull=!1,f.pass=Pass$1.TERRAIN_CLASSIFICATION;var m=DrawCommand.shallowClone(f,f.derivedCommands.tileset);m.renderState=e._rsStencilDepthPass3DTiles,m.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,f.derivedCommands.tileset=m,defined(m=r[2*d+1])||(m=r[2*d+1]=new DrawCommand({owner:e})),m.vertexArray=o,m.modelMatrix=l,m.offset=h,m.count=p,m.renderState=e._rsColorPass,m.shaderProgram=s,m.uniformMap=c,m.boundingVolume=u,m.cull=!1,m.pass=Pass$1.TERRAIN_CLASSIFICATION,(p=DrawCommand.shallowClone(m,m.derivedCommands.tileset)).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=p}e._commandsDirty=!0}}function createColorCommandsIgnoreShow(e,t){if(e.classificationType!==ClassificationType$1.TERRAIN&&t.invertClassification&&(!defined(e._commandsIgnoreShow)||e._commandsDirty)){for(var i=e._commands,r=e._commandsIgnoreShow,n=e._spStencil,a=(t=i.length,r.length=t/2),o=0,s=0;s<a;++s){var l=r[s]=DrawCommand.shallowClone(i[o],r[s]);l.shaderProgram=n,l.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,o+=2}e._commandsDirty=!1}}function createPickCommands$1(e){if(e._pickCommandsDirty){var t=e._indexOffsets.length,i=e._pickCommands;i.length=2*t;for(var r=e._va,n=e._spStencil,a=e._spPick,o=defaultValue(e._modelMatrix,Matrix4.IDENTITY),s=e._uniformMap,l=0;l<t;++l){var c=e._indexOffsets[l],u=e._indexCounts[l],d=defined(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume,h=i[2*l];defined(h)||(h=i[2*l]=new DrawCommand({owner:e,pickOnly:!0})),h.vertexArray=r,h.modelMatrix=o,h.offset=c,h.count=u,h.renderState=e._rsStencilDepthPass,h.shaderProgram=n,h.uniformMap=s,h.boundingVolume=d,h.pass=Pass$1.TERRAIN_CLASSIFICATION;var p=DrawCommand.shallowClone(h,h.derivedCommands.tileset);p.renderState=e._rsStencilDepthPass3DTiles,p.pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,h.derivedCommands.tileset=p,defined(p=i[2*l+1])||(p=i[2*l+1]=new DrawCommand({owner:e,pickOnly:!0})),p.vertexArray=r,p.modelMatrix=o,p.offset=c,p.count=u,p.renderState=e._rsPickPass,p.shaderProgram=a,p.uniformMap=s,p.boundingVolume=d,p.pass=Pass$1.TERRAIN_CLASSIFICATION,(d=DrawCommand.shallowClone(p,p.derivedCommands.tileset)).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=d}e._pickCommandsDirty=!1}}function clearStyle(e,t){e._updatingAllCommands=!0;for(var i=e._batchIds,r=i.length,n=0;n<r;++n){var a=t[i[n]];a.show=!0,a.color=Color.WHITE}var o=e._batchedIndices;r=o.length;for(n=0;n<r;++n)o[n].color=Color.clone(Color.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}Vector3DTilePrimitive.prototype.createFeatures=function(e,t){for(var i=this._batchIds,r=i.length,n=0;n<r;++n){var a=i[n];t[a]=new Cesium3DTileFeature(e,a)}},Vector3DTilePrimitive.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var scratchColor$3=new Color,DEFAULT_COLOR_VALUE$1=Color.WHITE,DEFAULT_SHOW_VALUE$1=!0,complexExpressionReg=/\$/;function queueCommands(e,t,i,r){for(var n,a=(e=e.classificationType)!==ClassificationType$1.CESIUM_3D_TILE,o=e!==ClassificationType$1.TERRAIN,s=t.commandList,l=i.length,c=0;c<l;++c)a&&((n=i[c]).pass=Pass$1.TERRAIN_CLASSIFICATION,s.push(n)),o&&((n=i[c].derivedCommands.tileset).pass=Pass$1.CESIUM_3D_TILE_CLASSIFICATION,s.push(n));if(t.invertClassification&&defined(r))for(l=r.length,c=0;c<l;++c)s.push(r[c])}function queueWireframeCommands(e,t){for(var i=e.commandList,r=t.length,n=0;n<r;n+=2){var a=t[n+1];a.pass=Pass$1.OPAQUE,i.push(a)}}function updateWireframe(e){var t,i;if(e.debugWireframe!==e._debugWireframe||e.debugWireframe&&e._wireframeDirty){defined(e._rsWireframe)||(e._rsWireframe=RenderState.fromCache({})),i=e.debugWireframe?(t=e._rsWireframe,PrimitiveType$1.LINES):(t=e._rsColorPass,PrimitiveType$1.TRIANGLES);for(var r=e._commands,n=r.length,a=0;a<n;a+=2){var o=r[a+1];o.renderState=t,o.primitiveType=i}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}}Vector3DTilePrimitive.prototype.applyStyle=function(e,t){if(defined(e)){var i=(i=e.color)instanceof Expression&&!complexExpressionReg.test(i.expression);this._updatingAllCommands=i;var r=this._batchIds,n=r.length;for(s=0;s<n;++s){var a=t[r[s]];a.color=defined(e.color)?e.color.evaluateColor(a,scratchColor$3):DEFAULT_COLOR_VALUE$1,a.show=defined(e.show)?e.show.evaluate(a):DEFAULT_SHOW_VALUE$1}if(i){for(var o=this._batchedIndices,s=(n=o.length,0);s<n;++s)o[s].color=Color.clone(Color.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}}else clearStyle(this,t)},Vector3DTilePrimitive.prototype.updateCommands=function(e,t){if(!this._updatingAllCommands){var i=this._batchIdLookUp;if(defined(o=i[e])){for(var r=this._indexOffsets,n=this._indexCounts,a=r[o],o=n[o],s=this._batchedIndices,l=s.length,c=0;c<l;++c){var u=s[c].offset,d=s[c].count;if(u<=a&&a<u+d)break}s.push(new Vector3DTileBatch({color:Color.clone(t),offset:a,count:o,batchIds:[e]}));for(var h=[],p=[],f=s[c].batchIds,m=f.length,g=0;g<m;++g){var y=f[g];y!==e&&(r[i[y]]<a?h:p).push(y)}0!==p.length&&s.push(new Vector3DTileBatch({color:Color.clone(s[c].color),offset:a+o,count:s[c].offset+s[c].count-(a+o),batchIds:p})),0!==h.length?(s[c].count=a-s[c].offset,s[c].batchIds=h):s.splice(c,1),this._batchDirty=!0}}},Vector3DTilePrimitive.prototype.update=function(e){var t=e.context;createVertexArray$1(this,t),createShaders(this,t),createRenderStates$2(this),createUniformMap(this,t);var i=e.passes;i.render&&(createColorCommands$1(this,t),createColorCommandsIgnoreShow(this,e),updateWireframe(this),this._debugWireframe?queueWireframeCommands(e,this._commands):queueCommands(this,e,this._commands,this._commandsIgnoreShow)),i.pick&&(createPickCommands$1(this),queueCommands(this,e,this._pickCommands))},Vector3DTilePrimitive.prototype.isDestroyed=function(){return!1},Vector3DTilePrimitive.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),destroyObject(this)};var boundingSphereCartesian3Scratch=new Cartesian3,ModelState=ModelUtility.ModelState;function ClassificationModel(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).gltf;if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t instanceof Uint8Array))throw new RuntimeError("Only binary glTF is supported as a classifier.");updateVersion(t=parseGlb(t)),addDefaults(t),processModelMaterialsCommon(t),processPbrMaterials(t),ForEach.buffer(t,(function(e){if(!defined(e.extras._pipeline.source))throw new RuntimeError("Buffer data must be embedded in the binary gltf.")}));var i=t.nodes,r=t.meshes,n=i[0].mesh;if(1!==i.length||!defined(n))throw new RuntimeError("Only one node is supported for classification and it must have a mesh.");if(1!==r.length)throw new RuntimeError("Only one mesh is supported when using b3dm for classification.");if(1!==(r=r[0].primitives).length)throw new RuntimeError("Only one primitive per mesh is supported when using b3dm for classification.");if(!defined(r[0].attributes.POSITION))throw new RuntimeError("The mesh must have a position attribute.");if(!defined(r[0].attributes._BATCHID))throw new RuntimeError("The mesh must have a batch id attribute.");this._gltf=t,this.show=defaultValue(e.show,!0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(this.modelMatrix),this._ready=!1,this._readyPromise=when.defer(),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=defaultValue(e.debugWireframe,!1),this._debugWireframe=!1,this._classificationType=e.classificationType,this._vertexShaderLoaded=e.vertexShaderLoaded,this._classificationShaderLoaded=e.classificationShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=defaultValue(e.ignoreCommands,!1),this._upAxis=defaultValue(e.upAxis,Axis$1.Y),this._batchTable=e.batchTable,this._computedModelMatrix=new Matrix4,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new BoundingSphere,this._state=ModelState.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._dirty=!1,this._nodeMatrix=new Matrix4,this._primitive=void 0,this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms=void 0,this._buffers={},this._vertexArray=void 0,this._shaderProgram=void 0,this._uniformMap=void 0,this._geometryByteLength=0,this._trianglesLength=0,this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0}function addBuffersToLoadResources(e){var t=e.gltf,i=e._loadResources;ForEach.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function parseBufferViews(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;ForEach.bufferView(e.gltf,(function(e,t){e.target===WebGLConstants$1.ARRAY_BUFFER&&i.enqueue(t)}));var r=e._loadResources.indexBuffersToCreate,n={};ForEach.accessor(e.gltf,(function(e){var i=e.bufferView;t[i].target!==WebGLConstants$1.ELEMENT_ARRAY_BUFFER||defined(n[i])||(n[i]=!0,r.enqueue({id:i,componentType:e.componentType}))}))}function createVertexBuffer(e,t){var i=t._loadResources,r=t.gltf.bufferViews[e];r=i.getBuffer(r);t._buffers[e]=r,t._geometryByteLength+=r.byteLength}function createIndexBuffer(e,t,i){var r=i._loadResources,n=i.gltf.bufferViews[e];t={typedArray:r.getBuffer(n),indexDatatype:t};i._buffers[e]=t,i._geometryByteLength+=t.typedArray.byteLength}function createBuffers(e){var t=e._loadResources;if(0===t.pendingBufferLoads){for(var i=t.vertexBuffersToCreate,r=t.indexBuffersToCreate;0<i.length;)createVertexBuffer(i.dequeue(),e);for(;0<r.length;){var n=r.dequeue();createIndexBuffer(n.id,n.componentType,e)}}}function modifyShaderForQuantizedAttributes(e,t){var i=t.gltf.meshes[0].primitives[0];e=ModelUtility.modifyShaderForQuantizedAttributes(t.gltf,i,e);return t._quantizedUniforms=e.uniforms,e.shader}function modifyShader(e,t){return defined(t)&&(e=t(e)),e}function createProgram(e){var t=e.gltf,i=ModelUtility.getAttributeOrUniformBySemantic(t,"POSITION"),r=ModelUtility.getAttributeOrUniformBySemantic(t,"_BATCHID"),n={};n[i]=0,n[r]=1;var a=ModelUtility.getAttributeOrUniformBySemantic(t,"MODELVIEWPROJECTION"),o=defined(a)?(s="uniform mat4 "+a+";\n",a+" * vec4("+i+", 1.0)"):(a=ModelUtility.getAttributeOrUniformBySemantic(t,"PROJECTION"),defined(o=ModelUtility.getAttributeOrUniformBySemantic(t,"MODELVIEW"))||(o=ModelUtility.getAttributeOrUniformBySemantic(t,"CESIUM_RTC_MODELVIEW")),s="uniform mat4 "+o+";\nuniform mat4 "+a+";\n",a+" * "+o+" * vec4("+i+", 1.0)"),s="attribute vec3 "+i+";\nattribute float "+r+";\n"+s+"void main() {\n    vec4 positionInClipCoords = "+o+";\n    gl_Position = czm_depthClamp(positionInClipCoords);\n}\n";e.extensionsUsed.WEB3D_quantized_attributes&&(s=modifyShaderForQuantizedAttributes(s,e)),o=modifyShader(s,e._vertexShaderLoaded),s=modifyShader("#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvoid main() \n{ \n    gl_FragColor = vec4(1.0); \n    czm_writeDepthClamp();\n}\n",e._classificationShaderLoaded),e._shaderProgram={vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:n}}function getAttributeLocations(){return{POSITION:0,_BATCHID:1}}function createVertexArray$2(e){var t,i,r,n,a,o,s;e._loadResources.finishedBuffersCreation()&&!defined(e._vertexArray)&&(t=e._buffers,i=e.gltf,r=i.accessors,n=i.meshes[0].primitives[0],a=getAttributeLocations(),o={},ForEach.meshPrimitiveAttribute(n,(function(e,n){var s=a[n];defined(s)&&(e=r[e],o[n]={index:s,vertexBuffer:t[e.bufferView],componentsPerAttribute:numberOfComponentsForType(e.type),componentDatatype:e.componentType,offsetInBytes:e.byteOffset,strideInBytes:getAccessorByteStride(i,e)})})),defined(n.indices)&&(s=r[n.indices],s=t[s.bufferView]),e._vertexArray={attributes:o,indexBuffer:s})}Object.defineProperties(ClassificationModel.prototype,{gltf:{get:function(){return this._gltf}},boundingSphere:{get:function(){var e=this.modelMatrix,t=Matrix4.getScale(e,boundingSphereCartesian3Scratch);return(e=this._scaledBoundingSphere).center=Cartesian3.multiplyComponents(this._boundingSphere.center,t,e.center),e.radius=Cartesian3.maximumComponent(t)*this._initialRadius,defined(this._rtcCenter)&&Cartesian3.add(this._rtcCenter,e.center,e.center),e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},dirty:{get:function(){return this._dirty}},extensionsUsed:{get:function(){return defined(this._extensionsUsed)||(this._extensionsUsed=ModelUtility.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return defined(this._extensionsRequired)||(this._extensionsRequired=ModelUtility.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return 0}},classificationType:{get:function(){return this._classificationType}}});var gltfSemanticUniforms$1={PROJECTION:function(e,t){return ModelUtility.getGltfSemanticUniforms().PROJECTION(e,t)},MODELVIEW:function(e,t){return ModelUtility.getGltfSemanticUniforms().MODELVIEW(e,t)},CESIUM_RTC_MODELVIEW:function(e,t){return ModelUtility.getGltfSemanticUniforms().CESIUM_RTC_MODELVIEW(e,t)},MODELVIEWPROJECTION:function(e,t){return ModelUtility.getGltfSemanticUniforms().MODELVIEWPROJECTION(e,t)}};function createUniformMap$1(e,t){var i;defined(e._uniformMap)||(i={},ForEach.technique(e.gltf,(function(r){ForEach.techniqueUniform(r,(function(r,n){defined(r.semantic)&&defined(gltfSemanticUniforms$1[r.semantic])&&(i[n]=gltfSemanticUniforms$1[r.semantic](t.uniformState,e))}))})),e._uniformMap=i)}function createUniformsForQuantizedAttributes(e,t){return ModelUtility.createUniformsForQuantizedAttributes(e.gltf,t,e._quantizedUniforms)}function triangleCountFromPrimitiveIndices(e,t){switch(e.mode){case PrimitiveType$1.TRIANGLES:return t/3;case PrimitiveType$1.TRIANGLE_STRIP:case PrimitiveType$1.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function createPrimitive(e){var t=e._batchTable,i=e._uniformMap,r=e._vertexArray,n=(h=(d=e.gltf).accessors)[(p=d.meshes[0].primitives[0]).indices],a=p.attributes.POSITION,o=ModelUtility.getAccessorMinMax(d,a),s=BoundingSphere.fromCornerPoints(Cartesian3.fromArray(o.min),Cartesian3.fromArray(o.max));S=defined(n)?(T=n.count,n.byteOffset/IndexDatatype$1.getSizeInBytes(n.componentType)):(T=h[p.attributes.POSITION].count,0),e._trianglesLength+=triangleCountFromPrimitiveIndices(p,T),defined(e._uniformMapLoaded)&&(i=e._uniformMapLoaded(i)),e.extensionsUsed.WEB3D_quantized_attributes&&(i=combine(i,createUniformsForQuantizedAttributes(e,p)));a=(d=r.attributes.POSITION).componentDatatype,n=(o=d.vertexBuffer).byteOffset;var l,c,u,d,h=o.byteLength/ComponentDatatype$1.getSizeInBytes(a),p=ComponentDatatype$1.createArrayBufferView(a,o.buffer,n,h),f=(a=(d=r.attributes._BATCHID).componentDatatype,n=(o=d.vertexBuffer).byteOffset,h=o.byteLength/ComponentDatatype$1.getSizeInBytes(a),ComponentDatatype$1.createArrayBufferView(a,o.buffer,n,h)),m=(h=r.indexBuffer.typedArray,r.indexBuffer.indexDatatype===IndexDatatype$1.UNSIGNED_SHORT?new Uint16Array(h.buffer,h.byteOffset,h.byteLength/Uint16Array.BYTES_PER_ELEMENT):new Uint32Array(h.buffer,h.byteOffset,h.byteLength/Uint32Array.BYTES_PER_ELEMENT)),g=(p=arraySlice(p),[]),y=[],_=[],v=[],C=(f=arraySlice(f))[(m=arraySlice(m,S,S+T))[0]];g.push(C),_.push(0);for(var x=m.length,b=1;b<x;++b)(l=f[m[b]])!==C&&(u=b-(c=_[_.length-1]),g.push(l),y.push(u),_.push(b),v.push(new Vector3DTileBatch({offset:c,count:u,batchIds:[C],color:Color.WHITE})),C=l);u=x-(c=_[_.length-1]),y.push(u),v.push(new Vector3DTileBatch({offset:c,count:u,batchIds:[C],color:Color.WHITE}));h=(r=e._shaderProgram).vertexShaderSource;var S=r.fragmentShaderSource,T=r.attributeLocations;r=defined(e._pickIdLoaded)?e._pickIdLoaded():void 0;e._primitive=new Vector3DTilePrimitive({classificationType:e._classificationType,positions:p,indices:m,indexOffsets:_,indexCounts:y,batchIds:g,vertexBatchIds:f,batchedIndices:v,batchTable:t,boundingVolume:new BoundingSphere,_vertexShaderSource:h,_fragmentShaderSource:S,_attributeLocations:T,_uniformMap:i,_pickId:r,_modelMatrix:new Matrix4,_boundingSphere:s}),e._buffers=void 0,e._vertexArray=void 0,e._shaderProgram=void 0,e._uniformMap=void 0}function createRuntimeNodes(e){var t;e._loadResources.finished()&&(defined(e._primitive)||(t=e.gltf.nodes[0],e._nodeMatrix=ModelUtility.getTransform(t,e._nodeMatrix),createPrimitive(e)))}function createResources(e,t){t=t.context,ModelUtility.checkSupportedGlExtensions(e.gltf.glExtensionsUsed,t),createBuffers(e),createProgram(e),createVertexArray$2(e),createUniformMap$1(e,t),createRuntimeNodes(e)}var scratchComputedTranslation=new Cartesian4,scratchComputedMatrixIn2D=new Matrix4;function updateNodeModelMatrix(e,t,i,r){var n,a=e._computedModelMatrix;e._mode===SceneMode$1.SCENE3D||e._ignoreCommands||(n=Matrix4.getColumn(a,3,scratchComputedTranslation),Cartesian4.equals(n,Cartesian4.UNIT_W)?(n=e.boundingSphere.center,n=Transforms.wgs84To2DModelMatrix(r,n,scratchComputedMatrixIn2D),a=Matrix4.multiply(n,a,scratchComputedMatrixIn2D),defined(e._rtcCenter)&&(Matrix4.setTranslation(a,Cartesian4.UNIT_W,a),e._rtcCenter=e._rtcCenter2D)):(a=Transforms.basisTo2D(r,a,scratchComputedMatrixIn2D),e._rtcCenter=e._rtcCenter3D)),r=e._primitive,(t||i)&&(Matrix4.multiplyTransformation(a,e._nodeMatrix,r._modelMatrix),BoundingSphere.transform(r._boundingSphere,r._modelMatrix,r._boundingVolume),defined(e._rtcCenter)&&Cartesian3.add(e._rtcCenter,r._boundingVolume.center,r._boundingVolume.center))}function ClippingPlane(e,t){this._distance=t,this._normal=new UpdateChangedCartesian3(e,this),this.onChangeCallback=void 0,this.index=-1}function UpdateChangedCartesian3(e,t){this._clippingPlane=t,this._cartesian3=Cartesian3.clone(e)}function ClippingPlaneCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=defaultValue(e.enabled,!0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this.edgeColor=Color.clone(defaultValue(e.edgeColor,Color.WHITE)),this.edgeWidth=defaultValue(e.edgeWidth,0),this.planeAdded=new Event,this.planeRemoved=new Event,this._owner=void 0;var t=defaultValue(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?unionIntersectFunction:defaultIntersectFunction,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;var i=e.planes;if(defined(i))for(var r=i.length,n=0;n<r;++n)this.add(i[n])}function unionIntersectFunction(e){return e===Intersect$1.OUTSIDE}function defaultIntersectFunction(e){return e===Intersect$1.INSIDE}function setIndexDirty(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||-1!==e._dirtyIndex&&e._dirtyIndex!==t,e._dirtyIndex=t}function indexOf(e,t){for(var i=e.length,r=0;r<i;++r)if(Plane.equals(e[r],t))return r;return-1}ClassificationModel.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},ClassificationModel.prototype.update=function(e){var t,i,r,n,a,o,s;e.mode!==SceneMode$1.MORPHING&&(FeatureDetection.supportsWebP.initialized?(o=FeatureDetection.supportsWebP(),this._state===ModelState.NEEDS_LOAD&&defined(this.gltf)&&(this._state=ModelState.LOADING,this._state!==ModelState.FAILED&&(defined(t=this.gltf.extensions)&&defined(t.CESIUM_RTC)&&(a=Cartesian3.fromArray(t.CESIUM_RTC.center),Cartesian3.equals(a,Cartesian3.ZERO)||(this._rtcCenter3D=a,r=(i=e.mapProjection).ellipsoid.cartesianToCartographic(this._rtcCenter3D),n=i.project(r),Cartesian3.fromElements(n.z,n.x,n.y,n),this._rtcCenter2D=n,this._rtcCenterEye=new Cartesian3,this._rtcCenter=this._rtcCenter3D)),this._loadResources=new ModelLoadResources,ModelUtility.parseBuffers(this))),a=this._loadResources,i=!1,this._state===ModelState.LOADING&&(0===a.pendingBufferLoads&&(ModelUtility.checkSupportedExtensions(this.extensionsRequired,o),addBuffersToLoadResources(this),parseBufferViews(this),this._boundingSphere=ModelUtility.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,createResources(this,e)),a.finished()&&(this._state=ModelState.LOADED,i=!0)),defined(a)&&this._state===ModelState.LOADED&&(i||createResources(this,e),a.finished()&&(this._loadResources=void 0)),((r=this.show)&&this._state===ModelState.LOADED||i)&&(this._dirty=!1,n=this.modelMatrix,o=e.mode!==this._mode,this._mode=e.mode,((a=!Matrix4.equals(this._modelMatrix,n)||o)||i)&&(Matrix4.clone(n,this._modelMatrix),o=this._computedModelMatrix,Matrix4.clone(n,o),this._upAxis===Axis$1.Y?Matrix4.multiplyTransformation(o,Axis$1.Y_UP_TO_Z_UP,o):this._upAxis===Axis$1.X&&Matrix4.multiplyTransformation(o,Axis$1.X_UP_TO_Z_UP,o)),(a||i)&&(updateNodeModelMatrix(this,a,i,e.mapProjection),this._dirty=!0)),i?(s=this,e.afterRender.push((function(){s._ready=!0,s._readyPromise.resolve(s)}))):r&&!this._ignoreCommands&&(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.debugWireframe=this.debugWireframe,this._primitive.update(e))):FeatureDetection.supportsWebP.initialize())},ClassificationModel.prototype.isDestroyed=function(){return!1},ClassificationModel.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)},Object.defineProperties(ClippingPlane.prototype,{distance:{get:function(){return this._distance},set:function(e){defined(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){defined(this.onChangeCallback)&&!Cartesian3.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),Cartesian3.clone(e,this._normal._cartesian3)}}}),ClippingPlane.fromPlane=function(e,t){return defined(t)?(t.normal=e.normal,t.distance=e.distance):t=new ClippingPlane(e.normal,e.distance),t},ClippingPlane.clone=function(e,t){return defined(t)?(t.normal=e.normal,t.distance=e.distance,t):new ClippingPlane(e.normal,e.distance)},Object.defineProperties(UpdateChangedCartesian3.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){defined(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){defined(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){defined(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}}),Object.defineProperties(ClippingPlaneCollection.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?unionIntersectFunction:defaultIntersectFunction)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}}),ClippingPlaneCollection.prototype.add=function(e){var t=this._planes.length,i=this;e.onChangeCallback=function(e){setIndexDirty(i,e)},setIndexDirty(this,e.index=t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)},ClippingPlaneCollection.prototype.get=function(e){return this._planes[e]},ClippingPlaneCollection.prototype.contains=function(e){return-1!==indexOf(this._planes,e)},ClippingPlaneCollection.prototype.remove=function(e){var t=this._planes,i=indexOf(t,e);if(-1===i)return!1;e instanceof ClippingPlane&&(e.onChangeCallback=void 0,e.index=-1);for(var r=t.length-1,n=i;n<r;++n){var a=t[n+1];(t[n]=a)instanceof ClippingPlane&&(a.index=n)}return this._multipleDirtyPlanes=!0,t.length=r,this.planeRemoved.raiseEvent(e,i),!0},ClippingPlaneCollection.prototype.removeAll=function(){for(var e=this._planes,t=e.length,i=0;i<t;++i){var r=e[i];r instanceof ClippingPlane&&(r.onChangeCallback=void 0,r.index=-1),this.planeRemoved.raiseEvent(r,i)}this._multipleDirtyPlanes=!0,this._planes=[]};var distanceEncodeScratch=new Cartesian4,oct32EncodeScratch=new Cartesian4;function packPlanesAsUint8(e,t,i){for(var r=e._uint8View,n=e._planes,a=0,o=t;o<i;++o){var s=n[o],l=AttributeCompression.octEncodeToCartesian4(s.normal,oct32EncodeScratch);r[a]=l.x,r[a+1]=l.y,r[a+2]=l.z,r[a+3]=l.w,s=Cartesian4.packFloat(s.distance,distanceEncodeScratch),r[a+4]=s.x,r[a+5]=s.y,r[a+6]=s.z,r[a+7]=s.w,a+=8}}function packPlanesAsFloats(e,t,i){for(var r=e._float32View,n=e._planes,a=0,o=t;o<i;++o){var s=n[o],l=s.normal;r[a]=l.x,r[a+1]=l.y,r[a+2]=l.z,r[a+3]=s.distance,a+=4}}function computeTextureResolution(e,t){var i=ContextLimits.maximumTextureSize;return t.x=Math.min(e,i),t.y=Math.ceil(e/t.x),t}var textureResolutionScratch=new Cartesian2;ClippingPlaneCollection.prototype.update=function(e){var t,i=this._clippingPlanesTexture,r=e.context,n=ClippingPlaneCollection.useFloatTexture(r),a=n?this.length:2*this.length;!defined(i)||((e=i.width*i.height)<a||a<.25*e)&&(i.destroy(),i=void 0,this._clippingPlanesTexture=void 0),0!==this.length&&(defined(i)||((t=computeTextureResolution(a,textureResolutionScratch)).y*=2,n?(i=new Texture({context:r,width:t.x,height:t.y,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.FLOAT,sampler:Sampler.NEAREST,flipY:!1}),this._float32View=new Float32Array(t.x*t.y*4)):(i=new Texture({context:r,width:t.x,height:t.y,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST,flipY:!1}),this._uint8View=new Uint8Array(t.x*t.y*4)),this._clippingPlanesTexture=i,this._multipleDirtyPlanes=!0),a=this._dirtyIndex,!this._multipleDirtyPlanes&&-1===a||(this._multipleDirtyPlanes?n?(packPlanesAsFloats(this,0,this._planes.length),i.copyFrom({width:i.width,height:i.height,arrayBufferView:this._float32View})):(packPlanesAsUint8(this,0,this._planes.length),i.copyFrom({width:i.width,height:i.height,arrayBufferView:this._uint8View})):(t=r=0,n?(t=Math.floor(a/i.width),r=Math.floor(a-t*i.width),packPlanesAsFloats(this,a,a+1),i.copyFrom({width:1,height:1,arrayBufferView:this._float32View},r,t)):(t=Math.floor(2*a/i.width),r=Math.floor(2*a-t*i.width),packPlanesAsUint8(this,a,a+1),i.copyFrom({width:2,height:1,arrayBufferView:this._uint8View},r,t))),this._multipleDirtyPlanes=!1,this._dirtyIndex=-1))};var scratchMatrix=new Matrix4,scratchPlane$2=new Plane(Cartesian3.UNIT_X,0);ClippingPlaneCollection.prototype.computeIntersectionWithBoundingVolume=function(e,t){var i=this._planes,r=i.length,n=this.modelMatrix;defined(t)&&(n=Matrix4.multiply(t,n,scratchMatrix));var a=Intersect$1.INSIDE;!this.unionClippingRegions&&0<r&&(a=Intersect$1.OUTSIDE);for(var o=0;o<r;++o){var s=i[o];if(Plane.transform(s,n,scratchPlane$2),(s=e.intersectPlane(scratchPlane$2))===Intersect$1.INTERSECTING)a=s;else if(this._testIntersection(s))return s}return a},ClippingPlaneCollection.setOwner=function(e,t,i){e!==t[i]&&(t[i]=t[i]&&t[i].destroy(),defined(e)&&((e._owner=t)[i]=e))},ClippingPlaneCollection.useFloatTexture=function(e){return e.floatingPointTexture},ClippingPlaneCollection.getTextureResolution=function(e,t,i){var r=e.texture;return defined(r)?(i.x=r.width,i.y=r.height,i):((i=computeTextureResolution(ClippingPlaneCollection.useFloatTexture(t)?e.length:2*e.length,i)).y*=2,i)},ClippingPlaneCollection.prototype.isDestroyed=function(){return!1},ClippingPlaneCollection.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),destroyObject(this)};var ColorBlendMode={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===ColorBlendMode.HIGHLIGHT?0:e===ColorBlendMode.REPLACE?1:e===ColorBlendMode.MIX?CesiumMath.clamp(t,CesiumMath.EPSILON4,1):void 0}},ColorBlendMode$1=Object.freeze(ColorBlendMode);function DracoLoader(){}function addBufferToLoadResources(e,t){var i="runtime."+Object.keys(e.createdBufferViews).length,r=e.buffers,n=Object.keys(r).length;return r[n]=t,e.createdBufferViews[i]={buffer:n,byteOffset:0,byteLength:t.byteLength},i}function addNewVertexBuffer(e,t,i){return e=addBufferToLoadResources(t=t._loadResources,e),t.vertexBuffersToCreate.enqueue(e),e}function addNewIndexBuffer(e,t,i){var r=e.typedArray,n=t._loadResources;t=addBufferToLoadResources(n,r);return n.indexBuffersToCreate.enqueue({id:t,componentType:ComponentDatatype$1.fromTypedArray(r)}),{bufferViewId:t,numberOfIndices:e.numberOfIndices}}function scheduleDecodingTask(e,t,i,r){if(DracoLoader._taskProcessorReady){var n=i.primitivesToDecode.peek();if(defined(n)&&defined(e=e.scheduleTask(n,[n.array.buffer])))return i.activeDecodingTasks++,i.primitivesToDecode.dequeue(),e.then((function(e){i.activeDecodingTasks--;var r,a,o,s=addNewIndexBuffer(e.indexArray,t),l={},c=e.attributeData;for(r in c)c.hasOwnProperty(r)&&(a=addNewVertexBuffer((o=c[r]).array,t),(o=o.data).bufferView=a,l[r]=o);t._decodedData[n.mesh+".primitive."+n.primitive]={bufferView:s.bufferViewId,numberOfIndices:s.numberOfIndices,attributes:l}}))}}function getClipAndStyleCode(e,t,i){return"    float clipDistance = clip(gl_FragCoord, "+e+", "+t+"); \n    vec4 clippingPlanesEdgeColor = vec4(1.0); \n    clippingPlanesEdgeColor.rgb = "+i+".rgb; \n    float clippingPlanesEdgeWidth = "+i+".a; \n    if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n    { \n        gl_FragColor = clippingPlanesEdgeColor;\n    } \n"}DracoLoader._maxDecodingConcurrency=Math.max(FeatureDetection.hardwareConcurrency-1,1),DracoLoader._decoderTaskProcessor=void 0,DracoLoader._taskProcessorReady=!1,DracoLoader._getDecoderTaskProcessor=function(){var e;return defined(DracoLoader._decoderTaskProcessor)||((e=new TaskProcessor("decodeDraco",DracoLoader._maxDecodingConcurrency)).initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_wasm_wrapper.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm",fallbackModulePath:"ThirdParty/Workers/draco_decoder.js"}).then((function(){DracoLoader._taskProcessorReady=!0})),DracoLoader._decoderTaskProcessor=e),DracoLoader._decoderTaskProcessor},DracoLoader.hasExtension=function(e){return defined(e.extensionsRequired.KHR_draco_mesh_compression)||defined(e.extensionsUsed.KHR_draco_mesh_compression)},DracoLoader._decodedModelResourceCache=void 0,DracoLoader.parse=function(e,t){if(DracoLoader.hasExtension(e)){var i=e._loadResources,r=e.cacheKey;if(defined(r)&&(defined(DracoLoader._decodedModelResourceCache)||(defined(t.cache.modelDecodingCache)||(t.cache.modelDecodingCache={}),DracoLoader._decodedModelResourceCache=t.cache.modelDecodingCache),defined(r=DracoLoader._decodedModelResourceCache[r])))return r.count++,void(i.pendingDecodingCache=!0);var n=e._dequantizeInShader,a=e.gltf;ForEach.mesh(a,(function(e,t){ForEach.meshPrimitive(e,(function(e,r){var o,s;!defined(e.extensions)||defined(o=e.extensions.KHR_draco_mesh_compression)&&(s=a.bufferViews[o.bufferView],e=arraySlice(a.buffers[s.buffer].extras._pipeline.source,s.byteOffset,s.byteOffset+s.byteLength),i.primitivesToDecode.enqueue({mesh:t,primitive:r,array:e,bufferView:s,compressedAttributes:o.attributes,dequantizeInShader:n}))}))}))}},DracoLoader.decodeModel=function(e,t){if(!DracoLoader.hasExtension(e))return when.resolve();var i=e._loadResources,r=e.cacheKey;if(defined(r)&&defined(DracoLoader._decodedModelResourceCache)){var n=DracoLoader._decodedModelResourceCache[r];if(defined(n)&&i.pendingDecodingCache)return when(n.ready,(function(){e._decodedData=n.data,i.pendingDecodingCache=!1}));DracoLoader._decodedModelResourceCache[r]={ready:!1,count:1,data:void 0}}if(0===i.primitivesToDecode.length)return when.resolve();for(var a=DracoLoader._getDecoderTaskProcessor(),o=[],s=scheduleDecodingTask(a,e,i);defined(s);)o.push(s),s=scheduleDecodingTask(a,e,i);return when.all(o)},DracoLoader.decodePointCloud=function(e){var t=DracoLoader._getDecoderTaskProcessor();if(DracoLoader._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},DracoLoader.cacheDataForModel=function(e){var t=e.cacheKey;defined(t)&&defined(DracoLoader._decodedModelResourceCache)&&defined(t=DracoLoader._decodedModelResourceCache[t])&&(t.ready=!0,t.data=e._decodedData)},DracoLoader.destroyCachedDataForModel=function(e){var t=e.cacheKey;defined(t)&&defined(DracoLoader._decodedModelResourceCache)&&defined(e=DracoLoader._decodedModelResourceCache[t])&&0==--e.count&&delete DracoLoader._decodedModelResourceCache[t]};var textureResolutionScratch$1=new Cartesian2;function getClippingFunction(e,t){var i=e.unionClippingRegions,r=e.length;e=(ClippingPlaneCollection.useFloatTexture(t)?getClippingPlaneFloat:getClippingPlaneUint8)(t=(e=ClippingPlaneCollection.getTextureResolution(e,t,textureResolutionScratch$1)).x,e=e.y);return(e+="\n")+(i?clippingFunctionUnion:clippingFunctionIntersect)(r)}function clippingFunctionUnion(e){return"float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n    vec4 position = czm_windowToEyeCoordinates(fragCoord);\n    vec3 clipNormal = vec3(0.0);\n    vec3 clipPosition = vec3(0.0);\n    float clipAmount;\n    float pixelWidth = czm_metersPerPixel(position);\n    bool breakAndDiscard = false;\n    for (int i = 0; i < "+e+"; ++i)\n    {\n        vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n        clipNormal = clippingPlane.xyz;\n        clipPosition = -clippingPlane.w * clipNormal;\n        float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n        clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));\n        if (amount <= 0.0)\n        {\n           breakAndDiscard = true;\n           break;\n        }\n    }\n    if (breakAndDiscard) {\n        discard;\n    }\n    return clipAmount;\n}\n"}function clippingFunctionIntersect(e){return"float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n{\n    bool clipped = true;\n    vec4 position = czm_windowToEyeCoordinates(fragCoord);\n    vec3 clipNormal = vec3(0.0);\n    vec3 clipPosition = vec3(0.0);\n    float clipAmount = 0.0;\n    float pixelWidth = czm_metersPerPixel(position);\n    for (int i = 0; i < "+e+"; ++i)\n    {\n        vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n        clipNormal = clippingPlane.xyz;\n        clipPosition = -clippingPlane.w * clipNormal;\n        float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n        clipAmount = max(amount, clipAmount);\n        clipped = clipped && (amount <= 0.0);\n    }\n    if (clipped)\n    {\n        discard;\n    }\n    return clipAmount;\n}\n"}function getClippingPlaneFloat(e,t){var i=1/t;return-1===(t=1/e+"").indexOf(".")&&(t+=".0"),-1===(i+="").indexOf(".")&&(i+=".0"),"vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n    int pixY = clippingPlaneNumber / "+e+";\n    int pixX = clippingPlaneNumber - (pixY * "+e+");\n    float u = (float(pixX) + 0.5) * "+t+";\n    float v = (float(pixY) + 0.5) * "+i+";\n    vec4 plane = texture2D(packedClippingPlanes, vec2(u, v));\n    return czm_transformPlane(plane, transform);\n}\n"}function getClippingPlaneUint8(e,t){var i=1/t;return-1===(t=1/e+"").indexOf(".")&&(t+=".0"),-1===(i+="").indexOf(".")&&(i+=".0"),"vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n{\n    int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n    int pixY = clippingPlaneStartIndex / "+e+";\n    int pixX = clippingPlaneStartIndex - (pixY * "+e+");\n    float u = (float(pixX) + 0.5) * "+t+";\n    float v = (float(pixY) + 0.5) * "+i+";\n    vec4 oct32 = texture2D(packedClippingPlanes, vec2(u, v)) * 255.0;\n    vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n    vec4 plane;\n    plane.xyz = czm_octDecode(oct, 65535.0);\n    plane.w = czm_unpackFloat(texture2D(packedClippingPlanes, vec2(u + "+t+", v)));\n    return czm_transformPlane(plane, transform);\n}\n"}var JobType={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},JobType$1=Object.freeze(JobType);function ModelAnimationCache(){}var dataUriRegex$2=/^data\:/i;function getAccessorKey(e,t){var i=(i=(r=e.gltf).buffers)[(r=r.bufferViews[t.bufferView]).buffer],r=r.byteOffset+t.byteOffset;t=t.count*numberOfComponentsForType(t.type),i=dataUriRegex$2.test(i.uri)?"":i.uri;return e.cacheKey+"//"+i+"/"+r+"/"+t}var cachedAnimationParameters={};ModelAnimationCache.getAnimationParameterValues=function(e,t){var i=getAccessorKey(e,t);if(!defined(h=cachedAnimationParameters[i])){for(var r=e.gltf,n=r.buffers,a=r.bufferViews[t.bufferView],o=n[a.buffer].extras._pipeline.source,s=t.componentType,l=t.type,c=numberOfComponentsForType(l),u=t.count,d=getAccessorByteStride(r,t),h=new Array(u),p=(t=defaultValue(t.byteOffset,0),a.byteOffset+t),f=0;f<u;f++){var m=ComponentDatatype$1.createArrayBufferView(s,o.buffer,o.byteOffset+p,c);"SCALAR"===l?h[f]=m[0]:"VEC3"===l?h[f]=Cartesian3.fromArray(m):"VEC4"===l&&(h[f]=Quaternion.unpack(m)),p+=d}defined(e.cacheKey)&&(cachedAnimationParameters[i]=h)}return h};var cachedAnimationSplines={};function getAnimationSplineKey(e,t,i){return e.cacheKey+"//"+t+"/"+i}function ConstantSpline(e){this._value=e}function SteppedSpline(e){this._spline=e,this._lastTimeIndex=0}ConstantSpline.prototype.evaluate=function(e,t){return this._value},ConstantSpline.prototype.wrapTime=function(e){return 0},ConstantSpline.prototype.clampTime=function(e){return 0},SteppedSpline.prototype.findTimeInterval=Spline.prototype.findTimeInterval,SteppedSpline.prototype.evaluate=function(e,t){var i=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=this._spline.times;i=e>=r[i+1]?r[i+1]:r[i];return this._spline.evaluate(i,t)},Object.defineProperties(SteppedSpline.prototype,{times:{get:function(){return this._spline.times}}}),SteppedSpline.prototype.wrapTime=function(e){return this._spline.wrapTime(e)},SteppedSpline.prototype.clampTime=function(e){return this._spline.clampTime(e)},ModelAnimationCache.getAnimationSpline=function(e,t,i,r,n,a,o,s){return t=getAnimationSplineKey(e,t,r),defined(r=cachedAnimationSplines[t])||(s=s,1===(a=a).length&&1===s.length?r=new ConstantSpline(s[0]):"LINEAR"!==n.interpolation&&"STEP"!==n.interpolation||("translation"===o||"scale"===o?r=new LinearSpline({times:a,points:s}):"rotation"===o?r=new QuaternionSpline({times:a,points:s}):"weights"===o&&(r=new WeightSpline({times:a,weights:s})),defined(r)&&"STEP"===n.interpolation&&(r=new SteppedSpline(r))),defined(e.cacheKey)&&(cachedAnimationSplines[t]=r)),r};var cachedSkinInverseBindMatrices={};ModelAnimationCache.getSkinInverseBindMatrices=function(e,t){var i=getAccessorKey(e,t);if(!defined(d=cachedSkinInverseBindMatrices[i])){var r=e.gltf,n=(o=r.buffers)[(e=r.bufferViews[t.bufferView]).buffer].extras._pipeline.source,a=t.componentType,o=t.type,s=t.count,l=getAccessorByteStride(r,t),c=e.byteOffset+t.byteOffset,u=numberOfComponentsForType(o),d=new Array(s);if(a===WebGLConstants$1.FLOAT&&o===AttributeType$1.MAT4)for(var h=0;h<s;++h){var p=ComponentDatatype$1.createArrayBufferView(a,n.buffer,n.byteOffset+c,u);d[h]=Matrix4.fromArray(p),c+=l}cachedSkinInverseBindMatrices[i]=d}return d};var ModelAnimationLoop={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},ModelAnimationLoop$1=Object.freeze(ModelAnimationLoop),ModelAnimationState=Object.freeze({STOPPED:0,ANIMATING:1});function ModelAnimation(e,t,i){this._name=i.name,this._startTime=JulianDate.clone(e.startTime),this._delay=defaultValue(e.delay,0),this._stopTime=e.stopTime,this.removeOnStop=defaultValue(e.removeOnStop,!1),this._multiplier=defaultValue(e.multiplier,1),this._reverse=defaultValue(e.reverse,!1),this._loop=defaultValue(e.loop,ModelAnimationLoop$1.NONE),this.start=new Event,this.update=new Event,this.stop=new Event,this._state=ModelAnimationState.STOPPED,this._runtimeAnimation=i,this._computedStartTime=void 0,this._duration=void 0;var r=this;this._raiseStartEvent=function(){r.start.raiseEvent(t,r)},this._updateEventTime=0,this._raiseUpdateEvent=function(){r.update.raiseEvent(t,r,r._updateEventTime)},this._raiseStopEvent=function(){r.stop.raiseEvent(t,r)}}function ModelAnimationCollection(e){this.animationAdded=new Event,this.animationRemoved=new Event,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function add(e,t,i){var r=e._model;t=new ModelAnimation(i,r,r._runtime.animations[t]);return e._scheduledAnimations.push(t),e.animationAdded.raiseEvent(r,t),t}function animateChannels(e,t){for(var i=e.channelEvaluators,r=i.length,n=0;n<r;++n)i[n](t)}Object.defineProperties(ModelAnimation.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),Object.defineProperties(ModelAnimationCollection.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),ModelAnimationCollection.prototype.add=function(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t,i=this._model._runtime.animations;if(defined(e.index))return add(this,e.index,e);for(var r=i.length,n=0;n<r;++n)if(i[n].name===e.name){t=n;break}return add(this,t,e)},ModelAnimationCollection.prototype.addAll=function(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);for(var t=[],i=this._model._runtime.animations.length,r=0;r<i;++r)t.push(add(this,r,e));return t},ModelAnimationCollection.prototype.remove=function(e){if(defined(e)){var t=this._scheduledAnimations,i=t.indexOf(e);if(-1!==i)return t.splice(i,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},ModelAnimationCollection.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var r=0;r<i;++r)this.animationRemoved.raiseEvent(e,t[r])},ModelAnimationCollection.prototype.contains=function(e){return!!defined(e)&&-1!==this._scheduledAnimations.indexOf(e)},ModelAnimationCollection.prototype.get=function(e){return this._scheduledAnimations[e]};var animationsToRemove=[];function createAnimationRemovedFunction(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}function ModelMaterial(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i],this._technique=void 0,this._program=void 0,this._values=void 0}function ModelMesh(e,t,i){for(var r=[],n=e.primitives,a=n.length,o=0;o<a;++o){var s=n[o];r[o]=t[s.material]}this._name=e.name,this._materials=r,this._id=i}function ModelNode(e,t,i,r,n){this._model=e,this._runtimeNode=i,this._name=t.name,this._id=r,this.useMatrix=!1,this._show=!0,this._matrix=Matrix4.clone(n),this._originalMatrix=Matrix4.clone(n)}ModelAnimationCollection.prototype.update=function(e){var t=this._scheduledAnimations,i=t.length;if(0===i)return this._previousTime=void 0,!1;if(JulianDate.equals(e.time,this._previousTime))return!1;this._previousTime=JulianDate.clone(e.time,this._previousTime);for(var r=!1,n=e.time,a=this._model,o=0;o<i;++o){var s=t[o],l=s._runtimeAnimation;defined(s._computedStartTime)||(s._computedStartTime=JulianDate.addSeconds(defaultValue(s.startTime,n),s.delay,new JulianDate)),defined(s._duration)||(s._duration=l.stopTime*(1/s.multiplier));var c=s._computedStartTime,u=s._duration,d=s.stopTime,h=0!==u?JulianDate.secondsDifference(n,c)/u:0;0!==u&&defined(d)&&JulianDate.greaterThan(n,d)&&(h=JulianDate.secondsDifference(d,c)/u);var p=0<=h;c=s.loop===ModelAnimationLoop$1.REPEAT||s.loop===ModelAnimationLoop$1.MIRRORED_REPEAT;!(p=(p||c&&!defined(s.startTime))&&(h<=1||c)&&(!defined(d)||JulianDate.lessThanOrEquals(n,d)))&&s._state!==ModelAnimationState.ANIMATING||(p&&s._state===ModelAnimationState.STOPPED&&(s._state=ModelAnimationState.ANIMATING,0<s.start.numberOfListeners&&e.afterRender.push(s._raiseStartEvent)),s.loop===ModelAnimationLoop$1.REPEAT?h-=Math.floor(h):s.loop===ModelAnimationLoop$1.MIRRORED_REPEAT&&(d=h-(c=Math.floor(h)),h=c%2==1?1-d:d),s.reverse&&(h=1-h),u=h*u*s.multiplier,animateChannels(l,u=CesiumMath.clamp(u,l.startTime,l.stopTime)),0<s.update.numberOfListeners&&(s._updateEventTime=u,e.afterRender.push(s._raiseUpdateEvent)),r=!0,p||(s._state=ModelAnimationState.STOPPED,0<s.stop.numberOfListeners&&e.afterRender.push(s._raiseStopEvent),s.removeOnStop&&animationsToRemove.push(s)))}i=animationsToRemove.length;for(var f=0;f<i;++f){var m=animationsToRemove[f];t.splice(t.indexOf(m),1),e.afterRender.push(createAnimationRemovedFunction(this,a,m))}return animationsToRemove.length=0,r},Object.defineProperties(ModelMaterial.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),ModelMaterial.prototype.setValue=function(e,t){e="u_"+e,(e=this._uniformMap.values[e]).value=e.clone(t,e.value)},ModelMaterial.prototype.getValue=function(e){if(e="u_"+e,defined(e=this._uniformMap.values[e]))return e.value},Object.defineProperties(ModelMesh.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),Object.defineProperties(ModelNode.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=Matrix4.clone(e,this._matrix),this.useMatrix=!0,(e=this._model)._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=e._maxDirtyNumber}},originalMatrix:{get:function(){return this._originalMatrix}}}),ModelNode.prototype.setMatrix=function(e){Matrix4.clone(e,this._matrix)};var MAX_GLTF_UINT16_INDEX=65534;function ModelOutlineLoader(){}function addOutline(e,t,i,r,n){var a,o,s=n.vertexCopies,l=n.extraVertices,c=n.outlineCoordinates,u=e.gltf,d=u.meshes[t].primitives[i],h=u.accessors;t=u.bufferViews;for(o in d.attributes)if(d.attributes.hasOwnProperty(o)){var p=h[d.attributes[o]];if(defined(p)){a=p.count;break}}if(defined(a)){for(var f=h[d.indices],m=t[f.bufferView],g=(r=t[(i=h[r]).bufferView],e._loadResources),y=(t=g.getBuffer(m),r=g.getBuffer(r),new(5123===f.componentType?Uint16Array:Uint32Array)(t.buffer,t.byteOffset+f.byteOffset,f.count)),_=new(5123===i.componentType?Uint16Array:Uint32Array)(r.buffer,r.byteOffset+i.byteOffset,i.count),v=a,C=[v],x=0;x<_.length;x+=2){var b=_[x],S=_[x+1];C[Math.min(b,S)*v+Math.max(b,S)]=1}for(x=0;x<y.length;x+=3)for(var T=y[x],E=y[x+1],w=y[x+2],A=isHighlighted(C,T,E),P=isHighlighted(C,E,w),D=isHighlighted(C,w,T),M=matchAndStoreCoordinates(c,T,E,w,A,P,D);0<=M;){var I=M===T?s[T]:M===E?s[E]:s[w];if(void 0===I){I=a+l.length;for(var R=M;a<=R;)R=l[R-a];l.push(R),s[M]=I}MAX_GLTF_UINT16_INDEX<I&&y instanceof Uint16Array&&(y=new Uint32Array(y),f.componentType=5125,m.buffer=u.buffers.push({byteLength:y.byteLength,extras:{_pipeline:{source:y.buffer}}})-1,m.byteLength=y.byteLength,m.byteOffset=0,e._loadResources.buffers[m.buffer]=new Uint8Array(y.buffer,0,y.byteLength),g.indexBuffersToCreate._array.forEach((function(e){e.id===f.bufferView&&(e.componentType=f.componentType)}))),M===T?(T=I,y[x]=I):M===E?(E=I,y[x+1]=I):(w=I,y[x+2]=I),defined(f.max)&&(f.max[0]=Math.max(f.max[0],I)),M=matchAndStoreCoordinates(c,T,E,w,A,P,D)}}}function computeOrderMask(e,t,i,r,n){var a=e[o=3*t],o=(t=e[1+o],e[2+o]);return void 0===a?63:((a===i&&t===r&&o===n)<<0)+((a===i&&t===n&&o===r)<<1)+((a===r&&t===i&&o===n)<<2)+((a===r&&t===n&&o===i)<<3)+((a===n&&t===i&&o===r)<<4)+((a===n&&t===r&&o===i)<<5)}function popcount0to63(e){return(1&e)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}function matchAndStoreCoordinates(e,t,i,r,n,a,o){var s=o?1:0,l=n?1:0,c=computeOrderMask(e,t,s,l,0);if(0===c)return t;var u=n?1:0,d=a?1:0,h=computeOrderMask(e,i,0,u,d);if(0===h)return i;var p,f,m,g=o?1:0;if(0===(o=computeOrderMask(e,r,g,0,n=a?1:0)))return r;if(1&(a=c&h&o))p=0,f=1,m=2;else if(2&a)p=0,m=1,f=2;else if(4&a)f=0,p=1,m=2;else if(8&a)f=0,m=1,p=2;else if(16&a)m=0,p=1,f=2;else{if(!(32&a))return c=popcount0to63(c),h=popcount0to63(h),o=popcount0to63(o),c<h&&c<o?t:h<o?i:r;m=0,f=1,p=2}return e[(t*=3)+p]=s,e[t+f]=l,e[t+m]=0,e[(i*=3)+p]=0,e[i+f]=u,e[i+m]=d,e[(r*=3)+p]=g,e[r+f]=0,e[r+m]=n,-1}function isHighlighted(e,t,i){var r=e[0];return 1===e[Math.min(t,i)*r+Math.max(t,i)]}function createTexture$2(e){var t=new Uint8Array(e);return t[e-1]=192,8===e?t[e-1]=96:4===e?t[e-1]=48:2===e?t[e-1]=24:1===e&&(t[e-1]=12),t}function updateBufferViewsWithNewVertices(e,t){for(var i=e.gltf,r=e._loadResources,n=0;n<t.length;++n){var a=(y=t[n]).extras._pipeline.vertexNumberingScope;y.extras._pipeline.vertexNumberingScope=void 0;var o=a.extraVertices,s=r.getBuffer(y),l=y.byteStride||4,c=o.length,u=new Uint8Array(s.byteLength+c*l);for(u.set(s),C=0;C<c;++C)for(var d=o[C]*l,h=s.length+C*l,p=0;p<l;++p)u[h+p]=u[d+p];y.byteOffset=0,y.byteLength=u.byteLength;var f=i.buffers.push({byteLength:u.byteLength,extras:{_pipeline:{source:u.buffer}}})-1;y.buffer=f,r.buffers[f]=u;var m=a.accessors;for(C=0;C<m.length;++C){var g=m[C];i.accessors[g].count+=c}if(!a.createdOutlines){y=a.outlineCoordinates,f=new Float32Array(y),y=e.gltf.buffers.push({byteLength:f.byteLength,extras:{_pipeline:{source:f.buffer}}})-1,r.buffers[y]=new Uint8Array(f.buffer,0,f.byteLength);for(var y=e.gltf.bufferViews.push({buffer:y,byteLength:f.byteLength,byteOffset:0,byteStride:3*Float32Array.BYTES_PER_ELEMENT,target:34962})-1,_=e.gltf.accessors.push({bufferView:y,byteOffset:0,componentType:5126,count:f.length/3,type:"VEC3",min:[0,0,0],max:[1,1,1]})-1,v=a.primitives,C=0;C<v.length;++C)v[C].attributes._OUTLINE_COORDINATES=_;r.vertexBuffersToCreate.enqueue(y),a.createdOutlines=!0}}}function compactBuffers(e){for(var t=e.gltf,i=e._loadResources,r=0;r<t.buffers.length;++r){var n=t.buffers[r],a=t.bufferViews.filter(usesBuffer.bind(void 0,r)),o=a.reduce((function(e,t){return e+t.byteLength}),0);if(o!==n.byteLength){for(var s=new Uint8Array(o),l=0,c=0;c<a.length;++c){var u=a[c],d=i.getBuffer(u);s.set(d,l),u.byteOffset=l,l+=d.byteLength}i.buffers[r]=s,n.extras._pipeline.source=s.buffer,n.byteLength=o}}}function usesBuffer(e,t){return t.buffer===e}function getVertexNumberingScope(e,t){var i=t.attributes;if(void 0!==i){var r,n,a=e.gltf;for(n in i)if(i.hasOwnProperty(n)){var o=i[n],s=a.accessors[o].bufferView;if(defined((s=a.bufferViews[s]).extras)||(s.extras={}),defined(s.extras._pipeline)||(s.extras._pipeline={}),defined(s.extras._pipeline.vertexNumberingScope)){if(void 0!==r&&s.extras._pipeline.vertexNumberingScope!==r)return}else s.extras._pipeline.vertexNumberingScope=r||{vertexCopies:[],extraVertices:[],outlineCoordinates:[],accessors:[],bufferViews:[],primitives:[],createdOutlines:!1};(r=s.extras._pipeline.vertexNumberingScope).bufferViews.indexOf(s)<0&&r.bufferViews.push(s),r.accessors.indexOf(o)<0&&r.accessors.push(o)}return r.primitives.push(t),r}}function ComputeCommand(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=defaultValue(e.persists,!1),this.pass=Pass$1.COMPUTE,this.owner=e.owner}ModelOutlineLoader.hasExtension=function(e){return defined(e.extensionsRequired.CESIUM_primitive_outline)||defined(e.extensionsUsed.CESIUM_primitive_outline)},ModelOutlineLoader.outlinePrimitives=function(e){if(ModelOutlineLoader.hasExtension(e)){var t=e.gltf,i=[];ForEach.mesh(t,(function(t,r){ForEach.meshPrimitive(t,(function(t,n){var a;defined(t.extensions)&&(!defined(a=t.extensions.CESIUM_primitive_outline)||void 0!==(t=getVertexNumberingScope(e,t))&&(i.indexOf(t)<0&&i.push(t),addOutline(e,r,n,a.indices,t)))}))}));for(var r=0;r<i.length;++r)updateBufferViewsWithNewVertices(e,i[r].bufferViews);compactBuffers(e)}},ModelOutlineLoader.createTexture=function(e,t){var i=t.cache.modelOutliningCache;if(defined(i)||(i=t.cache.modelOutliningCache={}),defined(i.outlineTexture))return i.outlineTexture;for(var r=Math.min(4096,ContextLimits.maximumTextureSize),n=r,a=createTexture$2(n),o=[];1<n;)n>>=1,o.push(createTexture$2(n));return r=new Texture({context:t,source:{arrayBufferView:a,mipLevels:o},width:r,height:1,pixelFormat:PixelFormat$1.LUMINANCE,sampler:new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR})}),i.outlineTexture=r},ComputeCommand.prototype.execute=function(e){e.execute(this)};var OctahedralProjectionAtlasFS="varying vec2 v_textureCoordinates;\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\nvoid main()\n{\nvec2 uv = v_textureCoordinates;\nvec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\nvec2 pixel = 1.0 / textureSize;\nfloat mipLevel = 0.0;\nif (uv.x - pixel.x > (textureSize.y / textureSize.x))\n{\nmipLevel = 1.0;\nif (uv.y - pixel.y > yMipLevel1)\n{\nmipLevel = 2.0;\nif (uv.y - pixel.y * 3.0 > yMipLevel2)\n{\nmipLevel = 3.0;\nif (uv.y - pixel.y * 5.0 > yMipLevel3)\n{\nmipLevel = 4.0;\nif (uv.y - pixel.y * 7.0 > yMipLevel4)\n{\nmipLevel = 5.0;\n}\n}\n}\n}\n}\nif (mipLevel > 0.0)\n{\nfloat scale = pow(2.0, mipLevel);\nuv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\nuv.x *= ((textureSize.x - 2.0) / textureSize.y);\nuv.x -= 1.0 + pixel.x;\nuv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\nuv *= scale;\n}\nelse\n{\nuv.x *= (textureSize.x / textureSize.y);\n}\nif(mipLevel == 0.0)\n{\ngl_FragColor = texture2D(texture0, uv);\n}\nelse if(mipLevel == 1.0)\n{\ngl_FragColor = texture2D(texture1, uv);\n}\nelse if(mipLevel == 2.0)\n{\ngl_FragColor = texture2D(texture2, uv);\n}\nelse if(mipLevel == 3.0)\n{\ngl_FragColor = texture2D(texture3, uv);\n}\nelse if(mipLevel == 4.0)\n{\ngl_FragColor = texture2D(texture4, uv);\n}\nelse if(mipLevel == 5.0)\n{\ngl_FragColor = texture2D(texture5, uv);\n}\nelse\n{\ngl_FragColor = vec4(0.0);\n}\n}\n",OctahedralProjectionFS="varying vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\nvoid main()\n{\nvec4 rgbm = textureCube(cubeMap, v_cubeMapCoordinates);\nfloat m = rgbm.a * 16.0;\nvec3 r = rgbm.rgb * m;\ngl_FragColor = vec4(r * r, 1.0);\n}\n",OctahedralProjectionVS="attribute vec4 position;\nattribute vec3 cubeMapCoordinates;\nvarying vec3 v_cubeMapCoordinates;\nvoid main()\n{\ngl_Position = position;\nv_cubeMapCoordinates = cubeMapCoordinates;\n}\n";function OctahedralProjectedCubeMap(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._readyPromise=when.defer()}Object.defineProperties(OctahedralProjectedCubeMap.prototype,{url:{get:function(){return this._url}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),OctahedralProjectedCubeMap.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};for(var v1$1=new Cartesian3(1,0,0),v2$1=new Cartesian3(0,0,1),v3=new Cartesian3(-1,0,0),v4=new Cartesian3(0,0,-1),v5=new Cartesian3(0,1,0),v6=new Cartesian3(0,-1,0),cubeMapCoordinates=[v5,v3,v2$1,v6,v1$1,v5,v4,v5,v5],length$1=cubeMapCoordinates.length,flatCubeMapCoordinates=new Float32Array(3*length$1),offset=0,i$2=0;i$2<length$1;++i$2,offset+=3)Cartesian3.pack(cubeMapCoordinates[i$2],flatCubeMapCoordinates,offset);var flatPositions=new Float32Array([-1,1,-1,0,0,1,0,0,1,0,1,1,0,-1,-1,-1,1,-1]),indices=new Uint16Array([0,1,2,2,3,1,7,6,1,3,6,1,2,5,4,3,4,2,4,8,6,3,4,6]);function createVertexArray$3(e){var t=Buffer$1.createVertexBuffer({context:e,typedArray:flatPositions,usage:BufferUsage$1.STATIC_DRAW}),i=Buffer$1.createVertexBuffer({context:e,typedArray:flatCubeMapCoordinates,usage:BufferUsage$1.STATIC_DRAW}),r=Buffer$1.createIndexBuffer({context:e,typedArray:indices,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT});return new VertexArray({context:e,attributes:[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:ComponentDatatype$1.FLOAT},{index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT}],indexBuffer:r})}function createUniformTexture(e){return function(){return e}}function cleanupResources(e){var t,i;e._va=e._va&&e._va.destroy(),e._sp=e._sp&&e._sp.destroy();var r=e._cubeMaps;if(defined(r))for(i=r.length,t=0;t<i;++t)r[t].destroy();var n=e._mipTextures;if(defined(n))for(i=n.length,t=0;t<i;++t)n[t].destroy();e._va=void 0,e._sp=void 0,e._cubeMaps=void 0,e._cubeMapBuffers=void 0,e._mipTextures=void 0}OctahedralProjectedCubeMap.prototype.update=function(e){var t=e.context;if(OctahedralProjectedCubeMap.isSupported(t)&&(defined(this._texture)&&defined(this._va)&&cleanupResources(this),!defined(this._texture))){if(!defined(this._texture)&&!this._loading){var i=t.textureCache.getTexture(this._url);if(defined(i))return cleanupResources(this),this._texture=i,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0,void this._readyPromise.resolve()}var r,n=this._cubeMapBuffers;if(defined(n)||this._loading||(loadKTX((r=this)._url).then((function(e){r._cubeMapBuffers=e,r._loading=!1})).otherwise(this._readyPromise.reject),this._loading=!0),defined(this._cubeMapBuffers)){this._va=createVertexArray$3(t),this._sp=ShaderProgram.fromCache({context:t,vertexShaderSource:OctahedralProjectionVS,fragmentShaderSource:OctahedralProjectionFS,attributeLocations:{position:0,cubeMapCoordinates:1}});var a=Math.min(n.length,6);this._maximumMipmapLevel=a-1;for(var o=this._cubeMaps=new Array(a),s=this._mipTextures=new Array(a),l=2*n[0].positiveX.width,c={originalSize:function(){return l}},u=t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT,d=PixelFormat$1.RGBA,h=0;h<a;++h){var p=n[h].positiveY;n[h].positiveY=n[h].negativeY,n[h].negativeY=p;var f=o[h]=new CubeMap({context:t,source:n[h]});p=2*o[h].width,p=s[h]=new Texture({context:t,width:p,height:p,pixelDatatype:u,pixelFormat:d}),f=new ComputeCommand({vertexArray:this._va,shaderProgram:this._sp,uniformMap:{cubeMap:createUniformTexture(f)},outputTexture:p,persists:!0,owner:this});e.commandList.push(f),c["texture"+h]=createUniformTexture(p)}this._texture=new Texture({context:t,width:1.5*l+2,height:l,pixelDatatype:u,pixelFormat:d}),this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),i=new ComputeCommand({fragmentShaderSource:OctahedralProjectionAtlasFS,uniformMap:c,outputTexture:this._texture,persists:!1,owner:this}),e.commandList.push(i),this._ready=!0,this._readyPromise.resolve()}}},OctahedralProjectedCubeMap.prototype.isDestroyed=function(){return!1},OctahedralProjectedCubeMap.prototype.destroy=function(){return cleanupResources(this),this._texture=this._texture&&this._texture.destroy(),destroyObject(this)};var boundingSphereCartesian3Scratch$1=new Cartesian3,ModelState$1=ModelUtility.ModelState,defaultModelAccept="model/gltf-binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01",articulationEpsilon=CesiumMath.EPSILON16;function setCachedGltf(e,t){e._cachedGltf=t}function CachedGltf(e){this._gltf=e.gltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}Object.defineProperties(CachedGltf.prototype,{gltf:{set:function(e){this._gltf=e},get:function(){return this._gltf}}}),CachedGltf.prototype.makeReady=function(e){this.gltf=e;for(var t=this.modelsToLoad,i=t.length,r=0;r<i;++r){var n=t[r];n.isDestroyed()||setCachedGltf(n,this)}this.modelsToLoad=void 0,this.ready=!0};var gltfCache={},uriToGuid={};function Model(e){var t,i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).cacheKey;this._cacheKey=i,this._cachedGltf=void 0,this._releaseGltfJson=defaultValue(e.releaseGltfJson,!1),defined(i)&&defined(gltfCache[i])&&gltfCache[i].ready?++(r=gltfCache[i]).count:defined(t=e.gltf)&&(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(r=t instanceof Uint8Array?new CachedGltf({gltf:parseGlb(t),ready:!0}):new CachedGltf({gltf:e.gltf,ready:!0})).count=1,defined(i)&&(gltfCache[i]=r)),setCachedGltf(this,r);var r=defaultValue(e.basePath,"");this._resource=Resource.createIfNeeded(r),"string"==typeof(r=e.credit)&&(r=new Credit(r)),this._credit=r,this._resourceCredits=[],this.show=defaultValue(e.show,!0),this.silhouetteColor=defaultValue(e.silhouetteColor,Color.RED),this._silhouetteColor=new Color,this._silhouetteColorPreviousAlpha=1,this._normalAttributeName=void 0,this.silhouetteSize=defaultValue(e.silhouetteSize,0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=defaultValue(e.scale,1),this._scale=this.scale,this.minimumPixelSize=defaultValue(e.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=e.maximumScale,this._maximumScale=this.maximumScale,this.id=e.id,this._id=e.id,this.heightReference=defaultValue(e.heightReference,HeightReference$1.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0,r=e.scene,defined(this._scene=r)&&defined(r.terrainProviderChanged)&&(this._terrainProviderChangedCallback=r.terrainProviderChanged.addEventListener((function(){this._heightChanged=!0}),this)),this._pickObject=e.pickObject,this._allowPicking=defaultValue(e.allowPicking,!0),this._ready=!1,this._readyPromise=when.defer(),this.activeAnimations=new ModelAnimationCollection(this),this.clampAnimations=defaultValue(e.clampAnimations,!0),this._defaultTexture=void 0,this._incrementallyLoadTextures=defaultValue(e.incrementallyLoadTextures,!0),this._asynchronous=defaultValue(e.asynchronous,!0),this.shadows=defaultValue(e.shadows,ShadowMode$1.ENABLED),this._shadows=this.shadows,this.color=Color.clone(defaultValue(e.color,Color.WHITE)),this._colorPreviousAlpha=1,this.colorBlendMode=defaultValue(e.colorBlendMode,ColorBlendMode$1.HIGHLIGHT),this.colorBlendAmount=defaultValue(e.colorBlendAmount,.5),this._colorShadingEnabled=!1,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._clippingPlanesState=0,this.referenceMatrix=void 0,this.backFaceCulling=defaultValue(e.backFaceCulling,!0),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=defaultValue(e.debugWireframe,!1),this._debugWireframe=!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._addBatchIdToGeneratedShaders=e.addBatchIdToGeneratedShaders,this._precreatedAttributes=e.precreatedAttributes,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=defaultValue(e.ignoreCommands,!1),this._requestType=e.requestType,this._upAxis=defaultValue(e.upAxis,Axis$1.Y),this._gltfForwardAxis=Axis$1.Z,this._forwardAxis=e.forwardAxis,this.cull=defaultValue(e.cull,!0),this.opaquePass=defaultValue(e.opaquePass,Pass$1.OPAQUE),this._computedModelMatrix=new Matrix4,this._clippingPlanesMatrix=Matrix4.clone(Matrix4.IDENTITY),this._iblReferenceFrameMatrix=Matrix3.clone(Matrix3.IDENTITY),this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new BoundingSphere,this._state=ModelState$1.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._perNodeShowDirty=!1,this._cesiumAnimationsDirty=!1,this._dirty=!1,this._maxDirtyNumber=0,this._runtime={animations:void 0,articulationsByName:void 0,articulationsByStageKey:void 0,stagesByKey:void 0,rootNodes:void 0,nodes:void 0,nodesByName:void 0,skinnedNodes:void 0,meshesByName:void 0,materialsByName:void 0,materialsById:void 0},this._uniformMaps={},this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms={},this._programPrimitives={},this._rendererResources={buffers:{},vertexArrays:{},programs:{},sourceShaders:{},silhouettePrograms:{},textures:{},samplers:{},renderStates:{}},this._cachedRendererResources=void 0,this._loadRendererResourcesFromCache=!1,this._dequantizeInShader=defaultValue(e.dequantizeInShader,!0),this._decodedData={},this._cachedGeometryByteLength=0,this._cachedTexturesByteLength=0,this._geometryByteLength=0,this._texturesByteLength=0,this._trianglesLength=0,this._sourceTechniques={},this._sourcePrograms={},this._quantizedVertexShaders={},this._nodeCommands=[],this._pickIds=[],this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0,this._sourceVersion=void 0,this._sourceKHRTechniquesWebGL=void 0,this._imageBasedLightingFactor=new Cartesian2(1,1),Cartesian2.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this._lightColor=Cartesian3.clone(e.lightColor),this._luminanceAtZenith=void 0,this.luminanceAtZenith=defaultValue(e.luminanceAtZenith,.2),this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._shouldUpdateSpecularMapAtlas=!0,this._specularEnvironmentMapAtlas=void 0,this._useDefaultSphericalHarmonics=!1,this._useDefaultSpecularMaps=!1,this._shouldRegenerateShaders=!1}function silhouetteSupported(e){return e.stencilBuffer}function isColorShadingEnabled(e){return!Color.equals(e.color,Color.WHITE)||e.colorBlendMode!==ColorBlendMode$1.HIGHLIGHT}function isClippingEnabled(e){return defined(e=e._clippingPlanes)&&e.enabled&&0!==e.length}function containsGltfMagic(e){return"glTF"===getMagic(e)}function getRuntime(e,t,i){return e._runtime[t][i]}Object.defineProperties(Model.prototype,{gltf:{get:function(){return defined(this._cachedGltf)?this._cachedGltf.gltf:void 0}},releaseGltfJson:{get:function(){return this._releaseGltfJson}},cacheKey:{get:function(){return this._cacheKey}},basePath:{get:function(){return this._resource.url}},boundingSphere:{get:function(){var e=this.modelMatrix;this.heightReference!==HeightReference$1.NONE&&this._clampedModelMatrix&&(e=this._clampedModelMatrix);var t=Matrix4.getScale(e,boundingSphereCartesian3Scratch$1);e=defined(this.maximumScale)?Math.min(this.maximumScale,this.scale):this.scale;return Cartesian3.multiplyByScalar(t,e,t),(e=this._scaledBoundingSphere).center=Cartesian3.multiplyComponents(this._boundingSphere.center,t,e.center),e.radius=Cartesian3.maximumComponent(t)*this._initialRadius,defined(this._rtcCenter)&&Cartesian3.add(this._rtcCenter,e.center,e.center),e}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},asynchronous:{get:function(){return this._asynchronous}},allowPicking:{get:function(){return this._allowPicking}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},pendingTextureLoads:{get:function(){return defined(this._loadResources)?this._loadResources.pendingTextureLoads:0}},dirty:{get:function(){return this._dirty}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition)}},extensionsUsed:{get:function(){return defined(this._extensionsUsed)||(this._extensionsUsed=ModelUtility.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return defined(this._extensionsRequired)||(this._extensionsRequired=ModelUtility.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},forwardAxis:{get:function(){return defined(this._forwardAxis)?this._forwardAxis:this._gltfForwardAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return this._texturesByteLength}},cachedGeometryByteLength:{get:function(){return this._cachedGeometryByteLength}},cachedTexturesByteLength:{get:function(){return this._cachedTexturesByteLength}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&ClippingPlaneCollection.setOwner(e,this,"_clippingPlanes")}},pickIds:{get:function(){return this._pickIds}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){var t=this._imageBasedLightingFactor;e===t||Cartesian2.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||0<this._imageBasedLightingFactor.x&&0===e.x||0===this._imageBasedLightingFactor.x&&0<e.x,this._shouldRegenerateShaders=this._shouldRegenerateShaders||0<this._imageBasedLightingFactor.y&&0===e.y||0===this._imageBasedLightingFactor.y&&0<e.y,Cartesian2.clone(e,this._imageBasedLightingFactor))}},lightColor:{get:function(){return this._lightColor},set:function(e){var t=this._lightColor;e===t||Cartesian3.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||defined(t)&&!defined(e)||defined(e)&&!defined(t),this._lightColor=Cartesian3.clone(e,t))}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){var t=this._luminanceAtZenith;e!==t&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||defined(t)&&!defined(e)||defined(e)&&!defined(t),this._luminanceAtZenith=e)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){e!==this._sphericalHarmonicCoefficients&&(this._sphericalHarmonicCoefficients=e,this._shouldRegenerateShaders=!0)}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){this._shouldUpdateSpecularMapAtlas=this._shouldUpdateSpecularMapAtlas||e!==this._specularEnvironmentMaps,this._specularEnvironmentMaps=e}},credit:{get:function(){return this._credit}}}),Model.silhouetteSupported=function(e){return silhouetteSupported(e.context)},Model.fromGltf=function(e){var t=e.url;e=clone(e);var i=Resource.createIfNeeded(t),r=defaultValue(e.basePath,i.clone());t=Resource.createIfNeeded(r);defined(r=defaultValue(e.cacheKey,uriToGuid[getAbsoluteUri(i.url)]))||(r=createGuid(),uriToGuid[getAbsoluteUri(i.url)]=r),defined(e.basePath)&&!defined(e.cacheKey)&&(r+=t.url),e.cacheKey=r,e.basePath=t;var n=new Model(e),a=gltfCache[r];return defined(a)?a.ready||(++a.count,a.modelsToLoad.push(n)):((a=new CachedGltf({ready:!1})).count=1,a.modelsToLoad.push(n),setCachedGltf(n,a),gltfCache[r]=a,defined(i.headers.Accept)||(i.headers.Accept=defaultModelAccept),i.fetchArrayBuffer().then((function(e){var t=new Uint8Array(e);containsGltfMagic(t)?(e=parseGlb(t),a.makeReady(e)):(t=getStringFromTypedArray(t),a.makeReady(JSON.parse(t)));var r=n._resourceCredits,o=i.credits;if(defined(o))for(var s=o.length,l=0;l<s;l++)r.push(o[l])})).otherwise(ModelUtility.getFailedLoadFunction(n,"model",i.url))),n},Model._gltfCache=gltfCache,Model.prototype.getNode=function(e){return defined(e=getRuntime(this,"nodesByName",e))?e.publicNode:void 0},Model.prototype.getMesh=function(e){return getRuntime(this,"meshesByName",e)},Model.prototype.getMaterial=function(e){return getRuntime(this,"materialsByName",e)},Model.prototype.setArticulationStage=function(e,t){var i=getRuntime(this,"stagesByKey",e);e=getRuntime(this,"articulationsByStageKey",e);defined(i)&&defined(e)&&(t=CesiumMath.clamp(t,i.minimumValue,i.maximumValue),CesiumMath.equalsEpsilon(i.currentValue,t,articulationEpsilon)||(i.currentValue=t,e.isDirty=!0))};var scratchArticulationCartesian=new Cartesian3,scratchArticulationRotation=new Matrix3;function applyArticulationStageMatrix(e,t){var i,r=e.currentValue,n=scratchArticulationCartesian;switch(e.type){case"xRotate":i=Matrix3.fromRotationX(CesiumMath.toRadians(r),scratchArticulationRotation),Matrix4.multiplyByMatrix3(t,i,t);break;case"yRotate":i=Matrix3.fromRotationY(CesiumMath.toRadians(r),scratchArticulationRotation),Matrix4.multiplyByMatrix3(t,i,t);break;case"zRotate":i=Matrix3.fromRotationZ(CesiumMath.toRadians(r),scratchArticulationRotation),Matrix4.multiplyByMatrix3(t,i,t);break;case"xTranslate":n.x=r,n.y=0,n.z=0,Matrix4.multiplyByTranslation(t,n,t);break;case"yTranslate":n.x=0,n.y=r,n.z=0,Matrix4.multiplyByTranslation(t,n,t);break;case"zTranslate":n.x=0,n.y=0,n.z=r,Matrix4.multiplyByTranslation(t,n,t);break;case"xScale":n.x=r,n.y=1,n.z=1,Matrix4.multiplyByScale(t,n,t);break;case"yScale":n.x=1,n.y=r,n.z=1,Matrix4.multiplyByScale(t,n,t);break;case"zScale":n.x=1,n.y=1,n.z=r,Matrix4.multiplyByScale(t,n,t);break;case"uniformScale":Matrix4.multiplyByUniformScale(t,r,t)}return t}var scratchApplyArticulationTransform=new Matrix4;function addBuffersToLoadResources$1(e){var t=e.gltf,i=e._loadResources;ForEach.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}function bufferLoad(e,t){return function(i){var r=e._loadResources;i=new Uint8Array(i);--r.pendingBufferLoads,e.gltf.buffers[t].extras._pipeline.source=i}}function parseBufferViews$1(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;ForEach.bufferView(e.gltf,(function(e,t){e.target===WebGLConstants$1.ARRAY_BUFFER&&i.enqueue(t)}));var r=e._loadResources.indexBuffersToCreate,n={};ForEach.accessor(e.gltf,(function(e){var i=e.bufferView;defined(i)&&(t[i].target!==WebGLConstants$1.ELEMENT_ARRAY_BUFFER||defined(n[i])||(n[i]=!0,r.enqueue({id:i,componentType:e.componentType})))}))}function parseTechniques(e){var t,i,r,n=e.gltf;hasExtension(n,"KHR_techniques_webgl")&&(t=e._sourcePrograms,i=e._sourceTechniques,r=n.extensions.KHR_techniques_webgl.programs,ForEach.technique(n,(function(e,n){i[n]=clone(e),e=e.program,defined(t[e])||(t[e]=clone(r[e]))})))}function shaderLoad(e,t,i){return function(r){var n=e._loadResources;n.shaders[i]={source:r,type:t,bufferView:void 0},--n.pendingShaderLoads,e._rendererResources.sourceShaders[i]=r}}function parseShaders(e){var t=e.gltf,i=t.buffers,r=t.bufferViews,n=e._rendererResources.sourceShaders;ForEach.shader(t,(function(t,a){var o,s;defined(t.bufferView)?(o=t.bufferView,o=(s=r[o]).buffer,s=getStringFromTypedArray(i[o].extras._pipeline.source,s.byteOffset,s.byteLength),n[a]=s):defined(t.extras._pipeline.source)?n[a]=t.extras._pipeline.source:(++e._loadResources.pendingShaderLoads,(s=e._resource.getDerivedResource({url:t.uri})).fetchText().then(shaderLoad(e,t.type,a)).otherwise(ModelUtility.getFailedLoadFunction(e,"shader",s.url)))}))}function parsePrograms(e){var t,i,r=e._sourceTechniques;for(t in r)r.hasOwnProperty(t)&&(i=r[t],e._loadResources.programsToCreate.enqueue({programId:i.program,techniqueId:t}))}function parseArticulations(e){var t={},i={},r={};if(e._runtime.articulationsByName=t,e._runtime.articulationsByStageKey=i,e._runtime.stagesByKey=r,hasExtension(e=e.gltf,"AGI_articulations")&&defined(e.extensions)&&defined(e.extensions.AGI_articulations)){var n=e.extensions.AGI_articulations.articulations;if(defined(n))for(var a=n.length,o=0;o<a;++o){var s=clone(n[o]);s.nodes=[],s.isDirty=!0;for(var l=(t[s.name]=s).stages.length,c=0;c<l;++c){var u=s.stages[c];u.currentValue=u.initialValue;var d=s.name+" "+u.name;i[d]=s,r[d]=u}}}}function imageLoad(e,t){return function(i){var r=e._loadResources;--r.pendingTextureLoads,r.texturesToCreate.enqueue({id:t,image:i,bufferView:i.bufferView,width:i.width,height:i.height,internalFormat:i.internalFormat})}}Model.prototype.applyArticulations=function(){var e,t=this._runtime.articulationsByName;for(e in t)if(t.hasOwnProperty(e)){var i=t[e];if(i.isDirty){i.isDirty=!1;for(var r=i.nodes.length,n=0;n<r;++n){for(var a=i.nodes[n],o=Matrix4.clone(a.originalMatrix,scratchApplyArticulationTransform),s=i.stages.length,l=0;l<s;++l)o=applyArticulationStageMatrix(i.stages[l],o);a.matrix=o}}}};var ktxRegex$1=/(^data:image\/ktx)|(\.ktx$)/i,crnRegex$1=/(^data:image\/crn)|(\.crn$)/i;function parseTextures(e,t,i){var r,n=e.gltf,a=n.images;ForEach.texture(n,(function(n,o){var s=n.source;defined(n.extensions)&&defined(n.extensions.EXT_texture_webp)&&i&&(s=n.extensions.EXT_texture_webp.source);var l=a[s],c=l.extras,u=l.bufferView,d=l.mimeType;r=l.uri,defined(c)&&defined(c.compressedImage3DTiles)&&(n=c.compressedImage3DTiles.crunch,s=c.compressedImage3DTiles.s3tc,l=c.compressedImage3DTiles.pvrtc1,c=c.compressedImage3DTiles.etc1,t.s3tc&&defined(n)?(d=n.mimeType,defined(n.bufferView)?u=n.bufferView:r=n.uri):t.s3tc&&defined(s)?(d=s.mimeType,defined(s.bufferView)?u=s.bufferView:r=s.uri):t.pvrtc&&defined(l)?(d=l.mimeType,defined(l.bufferView)?u=l.bufferView:r=l.uri):t.etc1&&defined(c)&&(d=c.mimeType,defined(c.bufferView)?u=c.bufferView:r=c.uri)),defined(u)?e._loadResources.texturesToCreateFromBufferView.enqueue({id:o,image:void 0,bufferView:u,mimeType:d}):(++e._loadResources.pendingTextureLoads,d=e._resource.getDerivedResource({url:r}),(ktxRegex$1.test(r)?loadKTX(d):crnRegex$1.test(r)?loadCRN(d):d.fetchImage()).then(imageLoad(e,o)).otherwise(ModelUtility.getFailedLoadFunction(e,"image",d.url)))}))}var scratchArticulationStageInitialTransform=new Matrix4;function parseNodes(e){var t={},i={},r=[],n=e._loadResources.skinnedNodesIds,a=e._runtime.articulationsByName;ForEach.node(e.gltf,(function(o,s){var l={matrix:void 0,translation:void 0,rotation:void 0,scale:void 0,computedShow:!0,transformToRoot:new Matrix4,computedMatrix:new Matrix4,dirtyNumber:0,commands:[],inverseBindMatrices:void 0,bindShapeMatrix:void 0,joints:[],computedJointMatrices:[],jointName:o.jointName,weights:[],children:[],parents:[],publicNode:void 0};if(l.publicNode=new ModelNode(e,o,l,s,ModelUtility.getTransform(o)),t[s]=l,i[o.name]=l,defined(o.skin)&&(n.push(s),r.push(l)),defined(o.extensions)&&defined(o.extensions.AGI_articulations)&&defined(o=o.extensions.AGI_articulations.articulationName)){var c=Matrix4.clone(l.publicNode.originalMatrix,scratchArticulationStageInitialTransform),u=a[o];u.nodes.push(l.publicNode);for(var d=u.stages.length,h=0;h<d;++h)c=applyArticulationStageMatrix(u.stages[h],c);l.publicNode.matrix=c}})),e._runtime.nodes=t,e._runtime.nodesByName=i,e._runtime.skinnedNodes=r}function parseMaterials(e){var t=e.gltf,i=e._sourceTechniques,r={},n={},a=e._uniformMaps;ForEach.material(t,(function(t,o){a[o]={uniformMap:void 0,values:void 0,jointMatrixUniformName:void 0,morphWeightsUniformName:void 0};var s,l=new ModelMaterial(e,t,o);defined(t.extensions)&&defined(t.extensions.KHR_techniques_webgl)&&(s=t.extensions.KHR_techniques_webgl.technique,l._technique=s,l._program=i[s].program,ForEach.materialValue(t,(function(e,t){defined(l._values)||(l._values={}),l._values[t]=clone(e)}))),r[t.name]=l,n[o]=l})),e._runtime.materialsByName=r,e._runtime.materialsById=n}function parseMeshes(e){var t={},i=e._runtime.materialsById;ForEach.mesh(e.gltf,(function(r,n){t[r.name]=new ModelMesh(r,i,n),(defined(e.extensionsUsed.WEB3D_quantized_attributes)||e._dequantizeInShader)&&ForEach.meshPrimitive(r,(function(t,i){var r=getProgramForPrimitive(e,t),a=e._programPrimitives[r];defined(a)||(a={},e._programPrimitives[r]=a),a[n+".primitive."+i]=t}))})),e._runtime.meshesByName=t}var CreateVertexBufferJob=function(){this.id=void 0,this.model=void 0,this.context=void 0};function createVertexBuffer$1(e,t,i){var r=t._loadResources,n=t.gltf.bufferViews[e];defined(n)||(n=r.createdBufferViews[e]),(n=Buffer$1.createVertexBuffer({context:i,typedArray:r.getBuffer(n),usage:BufferUsage$1.STATIC_DRAW})).vertexArrayDestroyable=!1,t._rendererResources.buffers[e]=n,t._geometryByteLength+=n.sizeInBytes}CreateVertexBufferJob.prototype.set=function(e,t,i){this.id=e,this.model=t,this.context=i},CreateVertexBufferJob.prototype.execute=function(){createVertexBuffer$1(this.id,this.model,this.context)};var CreateIndexBufferJob=function(){this.id=void 0,this.componentType=void 0,this.model=void 0,this.context=void 0};function createIndexBuffer$1(e,t,i,r){var n=i._loadResources,a=i.gltf.bufferViews[e];defined(a)||(a=n.createdBufferViews[e]),(t=Buffer$1.createIndexBuffer({context:r,typedArray:n.getBuffer(a),usage:BufferUsage$1.STATIC_DRAW,indexDatatype:t})).vertexArrayDestroyable=!1,i._rendererResources.buffers[e]=t,i._geometryByteLength+=t.sizeInBytes}CreateIndexBufferJob.prototype.set=function(e,t,i,r){this.id=e,this.componentType=t,this.model=i,this.context=r},CreateIndexBufferJob.prototype.execute=function(){createIndexBuffer$1(this.id,this.componentType,this.model,this.context)};var scratchVertexBufferJob=new CreateVertexBufferJob,scratchIndexBufferJob=new CreateIndexBufferJob;function createBuffers$1(e,t){var i=e._loadResources;if(0===i.pendingBufferLoads){var r,n=t.context,a=i.vertexBuffersToCreate,o=i.indexBuffersToCreate;if(e.asynchronous){for(;0<a.length&&(scratchVertexBufferJob.set(a.peek(),e,n),t.jobScheduler.execute(scratchVertexBufferJob,JobType$1.BUFFER));)a.dequeue();for(;0<o.length&&(r=o.peek(),scratchIndexBufferJob.set(r.id,r.componentType,e,n),t.jobScheduler.execute(scratchIndexBufferJob,JobType$1.BUFFER));)o.dequeue()}else{for(;0<a.length;)createVertexBuffer$1(a.dequeue(),e,n);for(;0<o.length;)createIndexBuffer$1((r=o.dequeue()).id,r.componentType,e,n)}}}function getProgramForPrimitive(e,t){if(defined(t=e._runtime.materialsById[t.material]))return t._program}function modifyShaderForQuantizedAttributes$1(e,t,i){var r,n,a,o=i._programPrimitives[t];if(!defined(o))return e;for(n in o)if(o.hasOwnProperty(n)&&getProgramForPrimitive(i,r=o[n])===t)break;if(i._programPrimitives[t]=void 0,i.extensionsUsed.WEB3D_quantized_attributes)a=ModelUtility.modifyShaderForQuantizedAttributes(i.gltf,r,e),i._quantizedUniforms[t]=a.uniforms;else{var s=i._decodedData[n];if(!defined(s))return e;a=ModelUtility.modifyShaderForDracoQuantizedAttributes(i.gltf,r,e,s.attributes)}return a.shader}function modifyShaderForColor(e){return(e=ShaderSource.replaceMain(e,"gltf_blend_main"))+"uniform vec4 gltf_color; \nuniform float gltf_colorBlend; \nvoid main() \n{ \n    gltf_blend_main(); \n    gl_FragColor.rgb = mix(gl_FragColor.rgb, gltf_color.rgb, gltf_colorBlend); \n    float highlight = ceil(gltf_colorBlend); \n    gl_FragColor.rgb *= mix(gltf_color.rgb, vec3(1.0), highlight); \n    gl_FragColor.a *= gltf_color.a; \n} \n"}function modifyShader$1(e,t,i){return defined(i)&&(e=i(e,t)),e}var CreateProgramJob=function(){this.programToCreate=void 0,this.model=void 0,this.context=void 0};function createProgram$1(e,t,i){var r=e.programId,n=e.techniqueId,a=t._sourcePrograms[r],o=(s=t._rendererResources.sourceShaders)[a.vertexShader],s=(e=s[a.fragmentShader],t._quantizedVertexShaders);(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(defined(l=s[r])||(l=modifyShaderForQuantizedAttributes$1(o,r,t),s[r]=l),o=l),a=modifyShader$1(o,r,t._vertexShaderLoaded),s=modifyShader$1(e,r,t._fragmentShaderLoaded),defined(t._uniformMapLoaded)||(s="uniform vec4 czm_pickColor;\n"+s);var l=0<t._imageBasedLightingFactor.x||0<t._imageBasedLightingFactor.y;l&&(s="#define USE_IBL_LIGHTING \n\n"+s),defined(t._lightColor)&&(s="#define USE_CUSTOM_LIGHT_COLOR \n\n"+s),"2.0"===t._sourceVersion&&!t._sourceKHRTechniquesWebGL||(s=ShaderSource.replaceMain(s,"non_gamma_corrected_main"),s+="\nvoid main() { \n    non_gamma_corrected_main(); \n    gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),OctahedralProjectedCubeMap.isSupported(i)&&(o=defined(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,e=defined(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps,(o||e||l)&&(s="uniform mat3 gltf_iblReferenceFrameMatrix; \n"+s),defined(t._sphericalHarmonicCoefficients)?s="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+s:t._useDefaultSphericalHarmonics&&(s="#define DIFFUSE_IBL \n"+s),defined(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?s="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+s:t._useDefaultSpecularMaps&&(s="#define SPECULAR_IBL \n"+s)),defined(t._luminanceAtZenith)&&(s="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+s),createAttributesAndProgram(r,n,s,a,t,i)}function recreateProgram(e,t,i){var r=e.programId,n=e.techniqueId,a=t._sourcePrograms[r],o=t._rendererResources.sourceShaders,s=t._quantizedVertexShaders,l=t.clippingPlanes,c=isClippingEnabled(t);e=o[a.vertexShader],a=o[a.fragmentShader];(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(e=s[r]),s=a,isColorShadingEnabled(t)&&(s=Model._modifyShaderForColor(s)),c&&(s=modifyShaderForClippingPlanes(s,l,i)),a=modifyShader$1(e,r,t._vertexShaderLoaded),c=modifyShader$1(s,r,t._fragmentShaderLoaded),defined(t._uniformMapLoaded)||(c="uniform vec4 czm_pickColor;\n"+c),(l=0<t._imageBasedLightingFactor.x||0<t._imageBasedLightingFactor.y)&&(c="#define USE_IBL_LIGHTING \n\n"+c),defined(t._lightColor)&&(c="#define USE_CUSTOM_LIGHT_COLOR \n\n"+c),"2.0"===t._sourceVersion&&!t._sourceKHRTechniquesWebGL||(c=ShaderSource.replaceMain(c,"non_gamma_corrected_main"),c+="\nvoid main() { \n    non_gamma_corrected_main(); \n    gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),OctahedralProjectedCubeMap.isSupported(i)&&(e=defined(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,s=defined(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps,(e||s||l)&&(c="uniform mat3 gltf_iblReferenceFrameMatrix; \n"+c),defined(t._sphericalHarmonicCoefficients)?c="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+c:t._useDefaultSphericalHarmonics&&(c="#define DIFFUSE_IBL \n"+c),defined(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?c="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+c:t._useDefaultSpecularMaps&&(c="#define SPECULAR_IBL \n"+c)),defined(t._luminanceAtZenith)&&(c="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+c),createAttributesAndProgram(r,n,c,a,t,i)}function createAttributesAndProgram(e,t,i,r,n,a){t=n._sourceTechniques[t],t=ModelUtility.createAttributeLocations(t,n._precreatedAttributes),n._rendererResources.programs[e]=ShaderProgram.fromCache({context:a,vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:t})}CreateProgramJob.prototype.set=function(e,t,i){this.programToCreate=e,this.model=t,this.context=i},CreateProgramJob.prototype.execute=function(){createProgram$1(this.programToCreate,this.model,this.context)};var scratchCreateProgramJob=new CreateProgramJob;function createPrograms(e,t){var i=e._loadResources,r=i.programsToCreate;if(0===i.pendingShaderLoads&&0===i.pendingBufferLoads){var n=t.context;if(e.asynchronous)for(;0<r.length&&(scratchCreateProgramJob.set(r.peek(),e,n),t.jobScheduler.execute(scratchCreateProgramJob,JobType$1.PROGRAM));)r.dequeue();else for(;0<r.length;)createProgram$1(r.dequeue(),e,n)}}function getOnImageCreatedFromTypedArray(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}function loadTexturesFromBufferViews(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;0<t.texturesToCreateFromBufferView.length;){var i=t.texturesToCreateFromBufferView.dequeue(),r=e.gltf,n=r.bufferViews[i.bufferView],a=(r.textures[i.id].source,ModelUtility.getFailedLoadFunction(e,"image","id: "+i.id+", bufferView: "+i.bufferView));"image/ktx"===i.mimeType?(loadKTX(t.getBuffer(n)).then(imageLoad(e,i.id)).otherwise(a),++e._loadResources.pendingTextureLoads):"image/crn"===i.mimeType?(loadCRN(t.getBuffer(n)).then(imageLoad(e,i.id)).otherwise(a),++e._loadResources.pendingTextureLoads):(r=getOnImageCreatedFromTypedArray(t,i),loadImageFromTypedArray({uint8Array:t.getBuffer(n),format:i.mimeType,flipY:!1}).then(r).otherwise(a),++t.pendingBufferViewToImage)}}function createSamplers(e){var t,i=e._loadResources;i.createSamplers&&(i.createSamplers=!1,t=e._rendererResources.samplers,ForEach.sampler(e.gltf,(function(e,i){t[i]=new Sampler({wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:e.minFilter,magnificationFilter:e.magFilter})})))}var CreateTextureJob=function(){this.gltfTexture=void 0,this.model=void 0,this.context=void 0};function createTexture$3(e,t,i){var r=t.gltf.textures[e.id],n=t._rendererResources.samplers[r.sampler];defined(n)||(n=new Sampler({wrapS:TextureWrap$1.REPEAT,wrapT:TextureWrap$1.REPEAT}));for(var a=!1,o=t.gltf.materials,s=o.length,l=0;l<s;++l){var c=o[l];if(defined(c.extensions)&&defined(c.extensions.KHR_techniques_webgl)){var u,d=c.extensions.KHR_techniques_webgl.values;for(u in d)if(d.hasOwnProperty(u)&&-1!==u.indexOf("Texture")){var h=d[u];if(h.index===e.id&&defined(h.extensions)&&defined(h.extensions.KHR_texture_transform)){a=!0;break}}}if(a)break}var p=n.wrapS,f=n.wrapT,m=n.minificationFilter;a&&m!==TextureMinificationFilter$1.LINEAR&&m!==TextureMinificationFilter$1.NEAREST&&(m=m===TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST||m===TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR?TextureMinificationFilter$1.NEAREST:TextureMinificationFilter$1.LINEAR,n=new Sampler({wrapS:n.wrapS,wrapT:n.wrapT,textureMinificationFilter:m,textureMagnificationFilter:n.magnificationFilter}));var g,y=e.internalFormat;p=(m=!(defined(y)&&PixelFormat$1.isCompressedFormat(y)||m!==TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST&&m!==TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR&&m!==TextureMinificationFilter$1.LINEAR_MIPMAP_NEAREST&&m!==TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR))||p===TextureWrap$1.REPEAT||p===TextureWrap$1.MIRRORED_REPEAT||f===TextureWrap$1.REPEAT||f===TextureWrap$1.MIRRORED_REPEAT,f=e.image;defined(y)?g=new Texture({context:i,source:{arrayBufferView:e.bufferView},width:e.width,height:e.height,pixelFormat:y,sampler:n}):defined(f)&&(y=!CesiumMath.isPowerOfTwo(f.width)||!CesiumMath.isPowerOfTwo(f.height),p&&y&&((y=document.createElement("canvas")).width=CesiumMath.nextPowerOfTwo(f.width),y.height=CesiumMath.nextPowerOfTwo(f.height),y.getContext("2d").drawImage(f,0,0,f.width,f.height,0,0,y.width,y.height),f=y),g=new Texture({context:i,source:f,pixelFormat:r.internalFormat,pixelDatatype:r.type,sampler:n,flipY:!1}),m&&g.generateMipmap()),defined(g)&&(t._rendererResources.textures[e.id]=g,t._texturesByteLength+=g.sizeInBytes)}CreateTextureJob.prototype.set=function(e,t,i){this.gltfTexture=e,this.model=t,this.context=i},CreateTextureJob.prototype.execute=function(){createTexture$3(this.gltfTexture,this.model,this.context)};var scratchCreateTextureJob=new CreateTextureJob;function createTextures(e,t){var i=t.context,r=e._loadResources.texturesToCreate;if(e.asynchronous)for(;0<r.length&&(scratchCreateTextureJob.set(r.peek(),e,i),t.jobScheduler.execute(scratchCreateTextureJob,JobType$1.TEXTURE));)r.dequeue();else for(;0<r.length;)createTexture$3(r.dequeue(),e,i)}function getAttributeLocations$1(e,t){var i,r,n=e._sourceTechniques,a={};if(!defined(t=e._runtime.materialsById[t.material]))return a;if(!defined(t=n[t._technique]))return a;var o,s=t.attributes,l=(t=e._rendererResources.programs[t.program]).vertexAttributes,c=t._attributeLocations;for(i in l)!l.hasOwnProperty(i)||defined(o=s[i])&&(r=c[i],a[o.semantic]=r);var u=e._precreatedAttributes;if(defined(u))for(i in u)u.hasOwnProperty(i)&&(r=c[i],a[i]=r);return a}function createJoints(e,t){for(var i=e.gltf,r=i.skins,n=i.nodes,a=e._runtime.nodes,o=e._loadResources.skinnedNodesIds,s=o.length,l=0;l<s;++l){var c=a[d=o[l]],u=n[d],d=t[u.skin];c.inverseBindMatrices=d.inverseBindMatrices,c.bindShapeMatrix=d.bindShapeMatrix;for(var h=r[u.skin].joints,p=h.length,f=0;f<p;++f){var m=a[h[f]];c.joints.push(m)}}}function createSkins(e){var t,i,r=e._loadResources;0===r.pendingBufferLoads&&r.createSkins&&(r.createSkins=!1,r=e.gltf,t=r.accessors,i={},ForEach.skin(r,(function(r,n){var a,o=t[r.inverseBindMatrices];Matrix4.equals(r.bindShapeMatrix,Matrix4.IDENTITY)||(a=Matrix4.clone(r.bindShapeMatrix)),i[n]={inverseBindMatrices:ModelAnimationCache.getSkinInverseBindMatrices(e,o),bindShapeMatrix:a}})),createJoints(e,i))}function getChannelEvaluator(e,t,i,r){return function(n){defined(r)&&(n=e.clampAnimations?r.clampTime(n):r.wrapTime(n),t[i]=r.evaluate(n,t[i]),t.dirtyNumber=e._maxDirtyNumber)}}function createRuntimeAnimations(e){var t,i,r=e._loadResources;r.finishedPendingBufferLoads()&&r.createRuntimeAnimations&&(r.createRuntimeAnimations=!1,e._runtime.animations=[],t=e._runtime.nodes,i=e.gltf.accessors,ForEach.animation(e.gltf,(function(r,n){for(var a=r.channels,o=r.samplers,s=Number.MAX_VALUE,l=-Number.MAX_VALUE,c=a.length,u=new Array(c),d=0;d<c;++d){var h=a[d],p=h.target,f=p.path,m=o[h.sampler],g=ModelAnimationCache.getAnimationParameterValues(e,i[m.input]),y=ModelAnimationCache.getAnimationParameterValues(e,i[m.output]);s=Math.min(s,g[0]),l=Math.max(l,g[g.length-1]),y=ModelAnimationCache.getAnimationSpline(e,n,r,h.sampler,m,g,f,y);u[d]=getChannelEvaluator(e,t[p.node],p.path,y)}e._runtime.animations[n]={name:r.name,startTime:s,stopTime:l,channelEvaluators:u}})))}function createVertexArrays(e,t){var i,r,n,a,o=e._loadResources;o.finishedBuffersCreation()&&o.finishedProgramCreation()&&o.createVertexArrays&&(o.createVertexArrays=!1,i=e._rendererResources.buffers,r=e._rendererResources.vertexArrays,n=e.gltf,a=n.accessors,ForEach.mesh(n,(function(o,s){ForEach.meshPrimitive(o,(function(o,l){var c,u,d,h=[],p=getAttributeLocations$1(e,o),f=e._decodedData[s+".primitive."+l];ForEach.meshPrimitiveAttribute(o,(function(e,t){if(defined(c=p[t])){if(defined(f)){var r=f.attributes;if(r.hasOwnProperty(t)){var o=r[t];return void h.push({index:c,vertexBuffer:i[o.bufferView],componentsPerAttribute:o.componentsPerAttribute,componentDatatype:o.componentDatatype,normalize:o.normalized,offsetInBytes:o.byteOffset,strideInBytes:o.byteStride})}}e=defined((o=a[e]).normalized)&&o.normalized,h.push({index:c,vertexBuffer:i[o.bufferView],componentsPerAttribute:numberOfComponentsForType(o.type),componentDatatype:o.componentType,normalize:e,offsetInBytes:o.byteOffset,strideInBytes:getAccessorByteStride(n,o)})}}));var m,g=e._precreatedAttributes;if(defined(g))for(d in g)g.hasOwnProperty(d)&&defined(c=p[d])&&((u=g[d]).index=c,h.push(u));defined(o.indices)&&(m=a[o.indices].bufferView,defined(f)&&(m=f.bufferView),m=i[m]),r[s+".primitive."+l]=new VertexArray({context:t,attributes:h,indexBuffer:m})}))})))}function createRenderStates$3(e){var t=e._loadResources;t.createRenderStates&&(t.createRenderStates=!1,ForEach.material(e.gltf,(function(t,i){createRenderStateForMaterial(e,t,i)})))}function createRenderStateForMaterial(e,t,i){var r=e._rendererResources.renderStates,n=[WebGLConstants$1.FUNC_ADD,WebGLConstants$1.FUNC_ADD],a=[WebGLConstants$1.ONE,WebGLConstants$1.ONE_MINUS_SRC_ALPHA,WebGLConstants$1.ONE,WebGLConstants$1.ONE_MINUS_SRC_ALPHA];defined(t.extensions)&&defined(t.extensions.KHR_blend)&&(n=t.extensions.KHR_blend.blendEquation,a=t.extensions.KHR_blend.blendFactors),e=!t.doubleSided,t="BLEND"===t.alphaMode,r[i]=RenderState.fromCache({cull:{enabled:e},depthTest:{enabled:!0,func:DepthFunction$1.LESS_OR_EQUAL},depthMask:!t,blending:{enabled:t,equationRgb:n[0],equationAlpha:n[1],functionSourceRgb:a[0],functionDestinationRgb:a[1],functionSourceAlpha:a[2],functionDestinationAlpha:a[3]}})}var gltfUniformsFromNode={MODEL:function(e,t,i){return function(){return i.computedMatrix}},VIEW:function(e,t,i){return function(){return e.view}},PROJECTION:function(e,t,i){return function(){return e.projection}},MODELVIEW:function(e,t,i){var r=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r)}},CESIUM_RTC_MODELVIEW:function(e,t,i){var r=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.setTranslation(r,t._rtcCenterEye,r)}},MODELVIEWPROJECTION:function(e,t,i){var r=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.multiply(e._projection,r,r)}},MODELINVERSE:function(e,t,i){var r=new Matrix4;return function(){return Matrix4.inverse(i.computedMatrix,r)}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t,i){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t,i){var r=new Matrix4,n=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.inverse(r,n)}},MODELVIEWPROJECTIONINVERSE:function(e,t,i){var r=new Matrix4,n=new Matrix4;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.multiply(e._projection,r,r),Matrix4.inverse(r,n)}},MODELINVERSETRANSPOSE:function(e,t,i){var r=new Matrix4,n=new Matrix3;return function(){return Matrix4.inverse(i.computedMatrix,r),Matrix4.getMatrix3(r,n),Matrix3.transpose(n,n)}},MODELVIEWINVERSETRANSPOSE:function(e,t,i){var r=new Matrix4,n=new Matrix4,a=new Matrix3;return function(){return Matrix4.multiplyTransformation(e.view,i.computedMatrix,r),Matrix4.inverse(r,n),Matrix4.getMatrix3(n,a),Matrix3.transpose(a,a)}},VIEWPORT:function(e,t,i){return function(){return e.viewportCartesian4}}};function getUniformFunctionFromSource(e,t,i,r){return e=t._runtime.nodes[e],gltfUniformsFromNode[i](r,t,e)}function createUniformsForMaterial(e,t,i,r,n,a,o){var s,l,c={},u={};return ForEach.techniqueUniform(i,(function(i,d){var h,p;defined(r)&&defined(r[d])?(p=ModelUtility.createUniformFunction(i.type,r[d],a,o),c[d]=p.func,u[d]=p):defined(i.node)?c[d]=getUniformFunctionFromSource(i.node,e,i.semantic,n.uniformState):defined(i.semantic)?"JOINTMATRIX"===i.semantic?s=d:"MORPHWEIGHTS"===i.semantic?l=d:"ALPHACUTOFF"===i.semantic?defined(h=t.alphaMode)&&"MASK"===h&&(h=defaultValue(t.alphaCutoff,.5),p=ModelUtility.createUniformFunction(i.type,h,a,o),c[d]=p.func,u[d]=p):c[d]=ModelUtility.getGltfSemanticUniforms()[i.semantic](n.uniformState,e):defined(i.value)&&(i=ModelUtility.createUniformFunction(i.type,i.value,a,o),c[d]=i.func,u[d]=i)})),{map:c,values:u,jointMatrixUniformName:s,morphWeightsUniformName:l}}function createUniformMaps(e,t){var i,r,n,a,o=e._loadResources;o.finishedProgramCreation()&&o.createUniformMaps&&(o.createUniformMaps=!1,o=e.gltf,i=e._sourceTechniques,r=e._uniformMaps,n=e._rendererResources.textures,a=e._defaultTexture,ForEach.material(o,(function(o,s){var l,c=e._runtime.materialsById[s],u=i[c._technique];c=c._values,c=createUniformsForMaterial(e,o,u,c,t,n,a);(s=r[s]).uniformMap=c.map,s.values=c.values,s.jointMatrixUniformName=c.jointMatrixUniformName,s.morphWeightsUniformName=c.morphWeightsUniformName,defined(u.attributes.a_outlineCoordinates)&&(l=ModelOutlineLoader.createTexture(e,t),s.uniformMap.u_outlineTexture=function(){return l})})))}function createUniformsForDracoQuantizedAttributes(e){return ModelUtility.createUniformsForDracoQuantizedAttributes(e.attributes)}function createUniformsForQuantizedAttributes$1(e,t){var i=getProgramForPrimitive(e,t);i=e._quantizedUniforms[i];return ModelUtility.createUniformsForQuantizedAttributes(e.gltf,t,i)}function createPickColorFunction(e){return function(){return e}}function createJointMatricesFunction(e){return function(){return e.computedJointMatrices}}function createMorphWeightsFunction(e){return function(){return e.weights}}function createSilhouetteColorFunction(e){return function(){return e.silhouetteColor}}function createSilhouetteSizeFunction(e){return function(){return e.silhouetteSize}}function createColorFunction(e){return function(){return e.color}}function createClippingPlanesMatrixFunction(e){return function(){return e._clippingPlanesMatrix}}function createIBLReferenceFrameMatrixFunction(e){return function(){return e._iblReferenceFrameMatrix}}function createClippingPlanesFunction(e){return function(){var t=e.clippingPlanes;return defined(t)&&t.enabled?t.texture:e._defaultTexture}}function createClippingPlanesEdgeStyleFunction(e){return function(){var t=e.clippingPlanes;if(!defined(t))return Color.WHITE.withAlpha(0);var i=Color.clone(t.edgeColor);return i.alpha=t.edgeWidth,i}}function createColorBlendFunction(e){return function(){return ColorBlendMode$1.getColorBlend(e.colorBlendMode,e.colorBlendAmount)}}function createIBLFactorFunction(e){return function(){return e._imageBasedLightingFactor}}function createLightColorFunction(e){return function(){return e._lightColor}}function createLuminanceAtZenithFunction(e){return function(){return e.luminanceAtZenith}}function createSphericalHarmonicCoefficientsFunction(e){return function(){return e._sphericalHarmonicCoefficients}}function createSpecularEnvironmentMapFunction(e){return function(){return e._specularEnvironmentMapAtlas.texture}}function createSpecularEnvironmentMapSizeFunction(e){return function(){return e._specularEnvironmentMapAtlas.texture.dimensions}}function createSpecularEnvironmentMapLOD(e){return function(){return e._specularEnvironmentMapAtlas.maximumMipmapLevel}}function triangleCountFromPrimitiveIndices$1(e,t){switch(e.mode){case PrimitiveType$1.TRIANGLES:return t/3;case PrimitiveType$1.TRIANGLE_STRIP:case PrimitiveType$1.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function createCommand(e,t,i,r,n){for(var a=e._nodeCommands,o=e._pickIds,s=e.allowPicking,l=e._runtime.meshesByName,c=(m=e._rendererResources).vertexArrays,u=m.programs,d=m.renderStates,h=e._uniformMaps,p=e.gltf,f=p.accessors,m=p.meshes,g=t.mesh,y=m[g],_=y.primitives,v=_.length,C=0;C<v;++C){var x,b=_[C],S=f[b.indices],T=e._runtime.materialsById[b.material]._program,E=e._decodedData[g+".primitive."+C];defined(I=b.attributes.POSITION)&&(D=ModelUtility.getAccessorMinMax(p,I),x=BoundingSphere.fromCornerPoints(Cartesian3.fromArray(D.min),Cartesian3.fromArray(D.max)));var w,A,P=c[g+".primitive."+C];A=defined(E)?(w=E.numberOfIndices,0):defined(S)?(w=S.count,S.byteOffset/IndexDatatype$1.getSizeInBytes(S.componentType)):(w=f[b.attributes.POSITION].count,0),e._trianglesLength+=triangleCountFromPrimitiveIndices$1(b,w);var D=(I=h[b.material]).uniformMap;defined(I.jointMatrixUniformName)&&((M={})[I.jointMatrixUniformName]=createJointMatricesFunction(i),D=combine(D,M)),defined(I.morphWeightsUniformName)&&((R={})[I.morphWeightsUniformName]=createMorphWeightsFunction(i),D=combine(D,R)),D=combine(D,{gltf_color:createColorFunction(e),gltf_colorBlend:createColorBlendFunction(e),gltf_clippingPlanes:createClippingPlanesFunction(e),gltf_clippingPlanesEdgeStyle:createClippingPlanesEdgeStyleFunction(e),gltf_clippingPlanesMatrix:createClippingPlanesMatrixFunction(e),gltf_iblReferenceFrameMatrix:createIBLReferenceFrameMatrixFunction(e),gltf_iblFactor:createIBLFactorFunction(e),gltf_lightColor:createLightColorFunction(e),gltf_sphericalHarmonicCoefficients:createSphericalHarmonicCoefficientsFunction(e),gltf_specularMap:createSpecularEnvironmentMapFunction(e),gltf_specularMapSize:createSpecularEnvironmentMapSizeFunction(e),gltf_maxSpecularLOD:createSpecularEnvironmentMapLOD(e),gltf_luminanceAtZenith:createLuminanceAtZenithFunction(e)}),defined(e._uniformMapLoaded)&&(D=e._uniformMapLoaded(D,T,i)),S={},e.extensionsUsed.WEB3D_quantized_attributes?S=createUniformsForQuantizedAttributes$1(e,b):e._dequantizeInShader&&defined(E)&&(S=createUniformsForDracoQuantizedAttributes(E)),D=combine(D,S);var M=d[b.material],I=M.blending.enabled,R=e._pickObject;defined(R)||(R={primitive:e,id:e.id,node:i.publicNode,mesh:l[y.name]});var O;E=ShadowMode$1.castShadows(e._shadows),S=ShadowMode$1.receiveShadows(e._shadows);s&&!defined(e._uniformMapLoaded)&&(O=r.createPickId(R),o.push(O),D=combine(D,{czm_pickColor:createPickColorFunction(O.color)})),s&&(O=defined(e._pickIdLoaded)&&defined(e._uniformMapLoaded)?e._pickIdLoaded():"czm_pickColor");var L;I=new DrawCommand({boundingVolume:new BoundingSphere,cull:e.cull,modelMatrix:new Matrix4,primitiveType:b.mode,vertexArray:P,count:w,offset:A,shaderProgram:u[T],castShadows:E,receiveShadows:S,uniformMap:D,renderState:M,owner:R,pass:I?Pass$1.TRANSLUCENT:e.opaquePass,pickId:O});n||((L=DrawCommand.shallowClone(I)).boundingVolume=new BoundingSphere,L.modelMatrix=new Matrix4),T={show:!0,boundingSphere:x,command:I,command2D:L,silhouetteModelCommand:void 0,silhouetteModelCommand2D:void 0,silhouetteColorCommand:void 0,silhouetteColorCommand2D:void 0,translucentCommand:void 0,translucentCommand2D:void 0,disableCullingCommand:void 0,disableCullingCommand2D:void 0,programId:T},i.commands.push(T),a.push(T)}}function createRuntimeNodes$1(e,t,i){if((r=e._loadResources).finishedEverythingButTextureCreation()&&r.createRuntimeNodes){r.createRuntimeNodes=!1;for(var r,n=[],a=e._runtime.nodes,o=(r=e.gltf).nodes,s=r.scenes[r.scene].nodes,l=s.length,c=[],u={},d=0;d<l;++d)for(c.push({parentRuntimeNode:void 0,gltfNode:o[s[d]],id:s[d]});0<c.length;){var h=c.pop();u[h.id]=!0;var p=h.parentRuntimeNode,f=h.gltfNode,m=a[h.id];0===m.parents.length&&(defined(f.matrix)?m.matrix=Matrix4.fromColumnMajorArray(f.matrix):(h=f.rotation,m.translation=Cartesian3.fromArray(f.translation),m.rotation=Quaternion.unpack(h),m.scale=Cartesian3.fromArray(f.scale))),defined(p)?(p.children.push(m),m.parents.push(p)):n.push(m),defined(f.mesh)&&createCommand(e,f,m,t,i);var g=f.children;if(defined(g))for(var y=g.length,_=0;_<y;_++){var v=g[_];u[v]||c.push({parentRuntimeNode:m,gltfNode:o[v],id:g[_]})}}e._runtime.rootNodes=n,e._runtime.nodes=a}}function getGeometryByteLength(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&(i+=e[t].sizeInBytes);return i}function getTexturesByteLength(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&(i+=e[t].sizeInBytes);return i}function createResources$1(e,t){var i,r,n,a,o,s=t.context,l=t.scene3DOnly,c=e._quantizedVertexShaders,u=e._sourceTechniques,d=e._sourcePrograms,h=e._rendererResources,p=h.sourceShaders;for(i in e._loadRendererResourcesFromCache&&(p=h.sourceShaders=e._cachedRendererResources.sourceShaders),u)u.hasOwnProperty(i)&&(n=p[(a=d[r=u[i].program]).vertexShader],ModelUtility.checkSupportedGlExtensions(a.glExtensions,s),(e.extensionsUsed.WEB3D_quantized_attributes||e._dequantizeInShader)&&(defined(a=c[r])||(a=modifyShaderForQuantizedAttributes$1(n,r,e),c[r]=a),n=a),n=modifyShader$1(n,r,e._vertexShaderLoaded));e._loadRendererResourcesFromCache?(o=e._cachedRendererResources,h.buffers=o.buffers,h.vertexArrays=o.vertexArrays,h.programs=o.programs,h.silhouettePrograms=o.silhouettePrograms,h.textures=o.textures,h.samplers=o.samplers,h.renderStates=o.renderStates,defined(e._precreatedAttributes)&&createVertexArrays(e,s),e._cachedGeometryByteLength+=getGeometryByteLength(o.buffers),e._cachedTexturesByteLength+=getTexturesByteLength(o.textures)):(createBuffers$1(e,t),createPrograms(e,t),createSamplers(e),loadTexturesFromBufferViews(e),createTextures(e,t)),createSkins(e),createRuntimeAnimations(e),e._loadRendererResourcesFromCache||(createVertexArrays(e,s),createRenderStates$3(e)),createUniformMaps(e,s),createRuntimeNodes$1(e,s,l)}function getNodeMatrix(e,t){var i=e.publicNode,r=i.matrix;i.useMatrix&&defined(r)?Matrix4.clone(r,t):defined(e.matrix)?Matrix4.clone(e.matrix,t):(Matrix4.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}var scratchNodeStack=[],scratchComputedTranslation$1=new Cartesian4,scratchComputedMatrixIn2D$1=new Matrix4;function updateNodeHierarchyModelMatrix(e,t,i,r){var n,a=e._maxDirtyNumber,o=e._runtime.rootNodes,s=o.length,l=scratchNodeStack,c=e._computedModelMatrix;e._mode===SceneMode$1.SCENE3D||e._ignoreCommands||(n=Matrix4.getColumn(c,3,scratchComputedTranslation$1),Cartesian4.equals(n,Cartesian4.UNIT_W)?(n=e.boundingSphere.center,n=Transforms.wgs84To2DModelMatrix(r,n,scratchComputedMatrixIn2D$1),c=Matrix4.multiply(n,c,scratchComputedMatrixIn2D$1),defined(e._rtcCenter)&&(Matrix4.setTranslation(c,Cartesian4.UNIT_W,c),e._rtcCenter=e._rtcCenter2D)):(c=Transforms.basisTo2D(r,c,scratchComputedMatrixIn2D$1),e._rtcCenter=e._rtcCenter3D));for(var u=0;u<s;++u){var d=o[u];for(getNodeMatrix(d,d.transformToRoot),l.push(d);0<l.length;){var h=(d=l.pop()).transformToRoot,p=d.commands;if(d.dirtyNumber===a||t||i){var f=Matrix4.multiplyTransformation(c,h,d.computedMatrix),m=p.length;if(0<m)for(var g=0;g<m;++g){var y=p[g],_=y.command;Matrix4.clone(f,_.modelMatrix),BoundingSphere.transform(y.boundingSphere,_.modelMatrix,_.boundingVolume),defined(e._rtcCenter)&&Cartesian3.add(e._rtcCenter,_.boundingVolume.center,_.boundingVolume.center),defined(_=y.command2D)&&e._mode===SceneMode$1.SCENE2D&&(Matrix4.clone(f,_.modelMatrix),_.modelMatrix[13]-=2*CesiumMath.sign(_.modelMatrix[13])*CesiumMath.PI*r.ellipsoid.maximumRadius,BoundingSphere.transform(y.boundingSphere,_.modelMatrix,_.boundingVolume))}}var v=d.children;if(defined(v))for(var C=v.length,x=0;x<C;++x){var b=v[x];b.dirtyNumber=Math.max(b.dirtyNumber,d.dirtyNumber),b.dirtyNumber!==a&&!i||(getNodeMatrix(b,b.transformToRoot),Matrix4.multiplyTransformation(h,b.transformToRoot,b.transformToRoot)),l.push(b)}}}++e._maxDirtyNumber}var scratchObjectSpace=new Matrix4;function applySkins(e){for(var t=e._runtime.skinnedNodes,i=t.length,r=0;r<i;++r){var n=t[r];scratchObjectSpace=Matrix4.inverseTransformation(n.transformToRoot,scratchObjectSpace);for(var a=n.computedJointMatrices,o=n.joints,s=n.bindShapeMatrix,l=n.inverseBindMatrices,c=l.length,u=0;u<c;++u)defined(a[u])||(a[u]=new Matrix4),a[u]=Matrix4.multiplyTransformation(scratchObjectSpace,o[u].transformToRoot,a[u]),a[u]=Matrix4.multiplyTransformation(a[u],l[u],a[u]),defined(s)&&(a[u]=Matrix4.multiplyTransformation(a[u],s,a[u]))}}function updatePerNodeShow(e){for(var t=e._runtime.rootNodes,i=t.length,r=scratchNodeStack,n=0;n<i;++n){var a=t[n];for(a.computedShow=a.publicNode.show,r.push(a);0<r.length;){for(var o=(a=r.pop()).computedShow,s=a.commands,l=s.length,c=0;c<l;++c)s[c].show=o;var u=a.children;if(defined(u))for(var d=u.length,h=0;h<d;++h){var p=u[h];p.computedShow=o&&p.publicNode.show,r.push(p)}}}}function updatePickIds(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var r=e._pickIds,n=r.length,a=0;a<n;++a)r[a].object.id=i}}function updateWireframe$1(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?PrimitiveType$1.LINES:PrimitiveType$1.TRIANGLES,i=e._nodeCommands,r=i.length,n=0;n<r;++n)i[n].command.primitiveType=t}}function updateShowBoundingVolume(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,r=i.length,n=0;n<r;++n)i[n].command.debugShowBoundingVolume=t}}function updateShadows(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=ShadowMode$1.castShadows(e.shadows),i=ShadowMode$1.receiveShadows(e.shadows),r=e._nodeCommands,n=r.length,a=0;a<n;a++){var o=r[a];o.command.castShadows=t,o.command.receiveShadows=i}}}function getTranslucentRenderState$1(e){return(e=clone(e,!0)).cull.enabled=!1,e.depthTest.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND,RenderState.fromCache(e)}function deriveTranslucentCommand$1(e){var t=DrawCommand.shallowClone(e);return t.pass=Pass$1.TRANSLUCENT,t.renderState=getTranslucentRenderState$1(e.renderState),t}function updateColor(e,t,i){var r=t.scene3DOnly;if(0<(t=e.color.alpha)&&t<1){var n=e._nodeCommands,a=n.length;if(!defined(n[0].translucentCommand)||i)for(var o=0;o<a;++o){var s=n[o],l=s.command;s.translucentCommand=deriveTranslucentCommand$1(l),r||(l=s.command2D,s.translucentCommand2D=deriveTranslucentCommand$1(l))}}}function getDisableCullingRenderState(e){return(e=clone(e,!0)).cull.enabled=!1,RenderState.fromCache(e)}function deriveDisableCullingCommand(e){var t=DrawCommand.shallowClone(e);return t.renderState=getDisableCullingRenderState(e.renderState),t}function updateBackFaceCulling(e,t,i){var r=t.scene3DOnly;if(!e.backFaceCulling){var n=e._nodeCommands,a=n.length;if(!defined(n[0].disableCullingCommand)||i)for(var o=0;o<a;++o){var s=n[o],l=s.command;s.disableCullingCommand=deriveDisableCullingCommand(l),r||(l=s.command2D,s.disableCullingCommand2D=deriveDisableCullingCommand(l))}}}function getProgramId(e,t){var i,r=e._rendererResources.programs;for(i in r)if(r.hasOwnProperty(i)&&r[i]===t)return i}function createSilhouetteProgram(e,t,i){var r=t.vertexShaderSource.sources[0];t=t._attributeLocations,e=e._normalAttributeName,r=ShaderSource.replaceMain(r,"gltf_silhouette_main");return r+="uniform float gltf_silhouetteSize; \nvoid main() \n{ \n    gltf_silhouette_main(); \n    vec3 n = normalize(czm_normal3D * "+e+"); \n    n.x *= czm_projection[0][0]; \n    n.y *= czm_projection[1][1]; \n    vec4 clip = gl_Position; \n    clip.xy += n.xy * clip.w * gltf_silhouetteSize * czm_pixelRatio / czm_viewport.z; \n    gl_Position = clip; \n}",ShaderProgram.fromCache({context:i.context,vertexShaderSource:r,fragmentShaderSource:"uniform vec4 gltf_silhouetteColor; \nvoid main() \n{ \n    gl_FragColor = czm_gammaCorrect(gltf_silhouetteColor); \n}",attributeLocations:t})}function hasSilhouette(e,t){return silhouetteSupported(t.context)&&0<e.silhouetteSize&&0<e.silhouetteColor.alpha&&defined(e._normalAttributeName)}function hasTranslucentCommands(e){for(var t=e._nodeCommands,i=t.length,r=0;r<i;++r)if(t[r].command.pass===Pass$1.TRANSLUCENT)return!0;return!1}function isTranslucent(e){return 0<e.color.alpha&&e.color.alpha<1}function isInvisible(e){return 0===e.color.alpha}function alphaDirty(e,t){return Math.floor(e)!==Math.floor(t)||Math.ceil(e)!==Math.ceil(t)}var silhouettesLength=0;function createSilhouetteCommands(e,t){for(var i=++silhouettesLength%255,r=hasTranslucentCommands(e)||isTranslucent(e)||e.silhouetteColor.alpha<1,n=e._rendererResources.silhouettePrograms,a=t.scene3DOnly,o=e._nodeCommands,s=o.length,l=0;l<s;++l){var c=o[l],u=c.command,d=isTranslucent(e)?c.translucentCommand:u,h=DrawCommand.shallowClone(d),p=clone(d.renderState);p.stencilTest={enabled:!0,frontFunction:WebGLConstants$1.ALWAYS,backFunction:WebGLConstants$1.ALWAYS,reference:i,mask:-1,frontOperation:{fail:WebGLConstants$1.KEEP,zFail:WebGLConstants$1.KEEP,zPass:WebGLConstants$1.REPLACE},backOperation:{fail:WebGLConstants$1.KEEP,zFail:WebGLConstants$1.KEEP,zPass:WebGLConstants$1.REPLACE}},isInvisible(e)&&(p.colorMask={red:!1,green:!1,blue:!1,alpha:!1},p.depthMask=!1),p=RenderState.fromCache(p),h.renderState=p,c.silhouetteModelCommand=h;var f=DrawCommand.shallowClone(u);(p=clone(u.renderState,!0)).depthTest.enabled=!0,p.cull.enabled=!1,r&&(f.pass=Pass$1.TRANSLUCENT,p.depthMask=!1,p.blending=BlendingState$1.ALPHA_BLEND),p.stencilTest={enabled:!0,frontFunction:WebGLConstants$1.NOTEQUAL,backFunction:WebGLConstants$1.NOTEQUAL,reference:i,mask:-1,frontOperation:{fail:WebGLConstants$1.KEEP,zFail:WebGLConstants$1.KEEP,zPass:WebGLConstants$1.KEEP},backOperation:{fail:WebGLConstants$1.KEEP,zFail:WebGLConstants$1.KEEP,zPass:WebGLConstants$1.KEEP}},p=RenderState.fromCache(p);var m=u.shaderProgram,g=getProgramId(e,m);defined(d=n[g])||(d=createSilhouetteProgram(e,m,t),n[g]=d),u=combine(u.uniformMap,{gltf_silhouetteColor:createSilhouetteColorFunction(e),gltf_silhouetteSize:createSilhouetteSizeFunction(e)}),f.renderState=p,f.shaderProgram=d,f.uniformMap=u,f.castShadows=!1,f.receiveShadows=!1,c.silhouetteColorCommand=f,a||(u=c.command2D,(h=DrawCommand.shallowClone(h)).boundingVolume=u.boundingVolume,h.modelMatrix=u.modelMatrix,c.silhouetteModelCommand2D=h,f=DrawCommand.shallowClone(f),h.boundingVolume=u.boundingVolume,h.modelMatrix=u.modelMatrix,c.silhouetteColorCommand2D=f)}}function modifyShaderForClippingPlanes(e,t,i){return e=ShaderSource.replaceMain(e,"gltf_clip_main"),(e+=Model._getClippingFunction(t,i)+"\n")+"uniform highp sampler2D gltf_clippingPlanes; \nuniform mat4 gltf_clippingPlanesMatrix; \nuniform vec4 gltf_clippingPlanesEdgeStyle; \nvoid main() \n{ \n    gltf_clip_main(); \n"+getClipAndStyleCode("gltf_clippingPlanes","gltf_clippingPlanesMatrix","gltf_clippingPlanesEdgeStyle")+"} \n"}function updateSilhouette(e,t,i){var r;hasSilhouette(e,t)&&(r=e._nodeCommands,r=alphaDirty(e.color.alpha,e._colorPreviousAlpha)||alphaDirty(e.silhouetteColor.alpha,e._silhouetteColorPreviousAlpha)||!defined(r[0].silhouetteModelCommand),e._colorPreviousAlpha=e.color.alpha,e._silhouetteColorPreviousAlpha=e.silhouetteColor.alpha,(r||i)&&createSilhouetteCommands(e,t))}function updateClippingPlanes(e,t){var i=e._clippingPlanes;defined(i)&&i.owner===e&&i.enabled&&i.update(t)}var scratchBoundingSphere$3=new BoundingSphere;function scaleInPixels(e,t,i){return scratchBoundingSphere$3.center=e,scratchBoundingSphere$3.radius=t,i.camera.getPixelSize(scratchBoundingSphere$3,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}var scratchPosition$5=new Cartesian3,scratchCartographic$3=new Cartographic;function getScale(e,t){var i,r,n,a,o=e.scale;return 0!==e.minimumPixelSize&&(r=t.context,i=Math.max(r.drawingBufferWidth,r.drawingBufferHeight),r=defined(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,scratchPosition$5.x=r[12],scratchPosition$5.y=r[13],scratchPosition$5.z=r[14],defined(e._rtcCenter)&&Cartesian3.add(e._rtcCenter,scratchPosition$5,scratchPosition$5),e._mode!==SceneMode$1.SCENE3D&&(a=(n=t.mapProjection).ellipsoid.cartesianToCartographic(scratchPosition$5,scratchCartographic$3),n.project(a,scratchPosition$5),Cartesian3.fromElements(scratchPosition$5.z,scratchPosition$5.x,scratchPosition$5.y,scratchPosition$5)),n=e.boundingSphere.radius,t=1/(a=scaleInPixels(scratchPosition$5,n,t)),Math.min(2*n*t,i)<e.minimumPixelSize&&(o=e.minimumPixelSize*a/(2*e._initialRadius))),defined(e.maximumScale)?Math.min(e.maximumScale,o):o}function releaseCachedGltf(e){defined(e._cacheKey)&&defined(e._cachedGltf)&&0==--e._cachedGltf.count&&delete gltfCache[e._cacheKey],e._cachedGltf=void 0}function CachedRendererResources(e,t){this.buffers=void 0,this.vertexArrays=void 0,this.programs=void 0,this.sourceShaders=void 0,this.silhouettePrograms=void 0,this.textures=void 0,this.samplers=void 0,this.renderStates=void 0,this.ready=!1,this.context=e,this.cacheKey=t,this.count=0}function destroy(e){for(var t in e)e.hasOwnProperty(t)&&e[t].destroy()}function destroyCachedRendererResources(e){destroy(e.buffers),destroy(e.vertexArrays),destroy(e.programs),destroy(e.silhouettePrograms),destroy(e.textures)}function getUpdateHeightCallback(e,t,i){return function(r){e.heightReference===HeightReference$1.RELATIVE_TO_GROUND&&((n=t.cartesianToCartographic(r,scratchCartographic$3)).height+=i.height,t.cartographicToCartesian(n,r));var n=e._clampedModelMatrix;Matrix4.clone(e.modelMatrix,n),n[12]=r.x,n[13]=r.y,n[14]=r.z,e._heightChanged=!0}}function updateClamping(e){defined(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t,i,r,n=e._scene;defined(n)&&defined(n.globe)&&e.heightReference!==HeightReference$1.NONE?(t=(r=n.globe).ellipsoid,i=e.modelMatrix,scratchPosition$5.x=i[12],scratchPosition$5.y=i[13],scratchPosition$5.z=i[14],n=t.cartesianToCartographic(scratchPosition$5),defined(e._clampedModelMatrix)||(e._clampedModelMatrix=Matrix4.clone(i,new Matrix4)),i=r._surface,e._removeUpdateHeightCallback=i.updateHeight(n,getUpdateHeightCallback(e,t,n)),defined(i=r.getHeight(n))&&(r=getUpdateHeightCallback(e,t,n),Cartographic.clone(n,scratchCartographic$3),scratchCartographic$3.height=i,t.cartographicToCartesian(scratchCartographic$3,scratchPosition$5),r(scratchPosition$5))):e._clampedModelMatrix=void 0}CachedRendererResources.prototype.release=function(){if(0==--this.count)return defined(this.cacheKey)&&delete this.context.cache.modelRendererResourceCache[this.cacheKey],destroyCachedRendererResources(this),destroyObject(this)};var scratchDisplayConditionCartesian=new Cartesian3,scratchDistanceDisplayConditionCartographic=new Cartographic;function distanceDisplayConditionVisible(e,t){var i,r,n=e.distanceDisplayCondition,a=n.near*n.near,o=n.far*n.far;return t.mode===SceneMode$1.SCENE2D?(i=.5*(t.camera.frustum.right-t.camera.frustum.left),i*=i):(r=Matrix4.getTranslation(e.modelMatrix,scratchDisplayConditionCartesian),t.mode===SceneMode$1.COLUMBUS_VIEW&&(e=(n=t.mapProjection).ellipsoid.cartesianToCartographic(r,scratchDistanceDisplayConditionCartographic),r=n.project(e,r),Cartesian3.fromElements(r.z,r.x,r.y,r)),i=Cartesian3.distanceSquared(r,t.camera.positionWC)),a<=i&&i<=o}var scratchClippingPlanesMatrix=new Matrix4,scratchIBLReferenceFrameMatrix4=new Matrix4,scratchIBLReferenceFrameMatrix3=new Matrix3;function destroyIfNotCached(e,t){e.programs!==t.programs&&destroy(e.programs),e.silhouettePrograms!==t.silhouettePrograms&&destroy(e.silhouettePrograms)}function regenerateShaders(e,t){var i=e._rendererResources,r=e._cachedRendererResources;if(destroyIfNotCached(i,r),isClippingEnabled(e)||isColorShadingEnabled(e)||e._shouldRegenerateShaders){e._shouldRegenerateShaders=!1,i.programs={},i.silhouettePrograms={};var n,a={},o=e._sourceTechniques;for(n in o)o.hasOwnProperty(n)&&(a[d=o[n].program]||(a[d]=!0,recreateProgram({programId:d,techniqueId:n},e,t.context)))}else i.programs=r.programs,i.silhouettePrograms=r.silhouettePrograms;for(var s=i.programs,l=e._nodeCommands,c=l.length,u=0;u<c;++u){var d,h=l[u],p=s[d=h.programId];h.command.shaderProgram=p,defined(h.command2D)&&(h.command2D.shaderProgram=p)}updateColor(e,t,!0),updateBackFaceCulling(e,t,!0),updateSilhouette(e,t,!0)}function Batched3DModel3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._batchTable=void 0,this._features=void 0,this._batchIdAttributeName=void 0,this._diffuseAttributeOrUniformName={},this._rtcCenterTransform=void 0,this._contentModelMatrix=void 0,this.featurePropertiesDirty=!1,initialize$2(this,r,n)}Model.prototype.update=function(e){if(e.mode!==SceneMode$1.MORPHING)if(FeatureDetection.supportsWebP.initialized){var t=FeatureDetection.supportsWebP(),i=e.context;if(this._defaultTexture=i.defaultTexture,this._state===ModelState$1.NEEDS_LOAD&&defined(this.gltf)){var r=this.cacheKey;if(defined(r)){i.cache.modelRendererResourceCache=defaultValue(i.cache.modelRendererResourceCache,{});var n,a=i.cache.modelRendererResourceCache;if(defined(n=a[this.cacheKey])){if(!n.ready)return;++n.count,this._loadRendererResourcesFromCache=!0}else(n=new CachedRendererResources(i,r)).count=1,a[this.cacheKey]=n;this._cachedRendererResources=n}else(n=new CachedRendererResources(i)).count=1,this._cachedRendererResources=n;this._state=ModelState$1.LOADING,this._state!==ModelState$1.FAILED&&(defined(l=this.gltf.extensions)&&defined(l.CESIUM_RTC)&&(c=Cartesian3.fromArray(l.CESIUM_RTC.center),Cartesian3.equals(c,Cartesian3.ZERO)||(this._rtcCenter3D=c,o=(u=e.mapProjection).ellipsoid.cartesianToCartographic(this._rtcCenter3D),s=u.project(o),Cartesian3.fromElements(s.z,s.x,s.y,s),this._rtcCenter2D=s,this._rtcCenterEye=new Cartesian3,this._rtcCenter=this._rtcCenter3D)),addPipelineExtras(this.gltf),this._loadResources=new ModelLoadResources,this._loadRendererResourcesFromCache||ModelUtility.parseBuffers(this,bufferLoad))}var o,s,l=this._loadResources,c=this._incrementallyLoadTextures,u=!1;this._state===ModelState$1.LOADING&&(0===l.pendingBufferLoads&&(l.initialized||(e.brdfLutGenerator.update(e),ModelUtility.checkSupportedExtensions(this.extensionsRequired,t),ModelUtility.updateForwardAxis(this),defined(this.gltf.extras.sourceVersion)||((o=this.gltf).extras.sourceVersion=ModelUtility.getAssetVersion(o),o.extras.sourceKHRTechniquesWebGL=defined(ModelUtility.getUsedExtensions(o).KHR_techniques_webgl),this._sourceVersion=o.extras.sourceVersion,this._sourceKHRTechniquesWebGL=o.extras.sourceKHRTechniquesWebGL,updateVersion(o),addDefaults(o),processModelMaterialsCommon(o,s={addBatchIdToGeneratedShaders:this._addBatchIdToGeneratedShaders}),processPbrMaterials(o,s)),this._sourceVersion=this.gltf.extras.sourceVersion,this._sourceKHRTechniquesWebGL=this.gltf.extras.sourceKHRTechniquesWebGL,this._dequantizeInShader=this._dequantizeInShader&&DracoLoader.hasExtension(this),addBuffersToLoadResources$1(this),parseArticulations(this),parseTechniques(this),this._loadRendererResourcesFromCache||(parseBufferViews$1(this),parseShaders(this),parsePrograms(this),parseTextures(this,i,t)),parseMaterials(this),parseMeshes(this),parseNodes(this),DracoLoader.parse(this,i),l.initialized=!0),l.finishedDecoding()||DracoLoader.decodeModel(this,i).otherwise(ModelUtility.getFailedLoadFunction(this,"model",this.basePath)),l.finishedDecoding()&&!l.resourcesParsed&&(this._boundingSphere=ModelUtility.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,DracoLoader.cacheDataForModel(this),l.resourcesParsed=!0),l.resourcesParsed&&0===l.pendingShaderLoads&&(ModelOutlineLoader.outlinePrimitives(this),createResources$1(this,e))),(l.finished()||c&&l.finishedEverythingButTextureCreation())&&(this._state=ModelState$1.LOADED,u=!0)),defined(l)&&this._state===ModelState$1.LOADED&&(c&&!u&&createResources$1(this,e),l.finished()&&(this._loadResources=void 0,h=this._rendererResources,(p=this._cachedRendererResources).buffers=h.buffers,p.vertexArrays=h.vertexArrays,p.programs=h.programs,p.sourceShaders=h.sourceShaders,p.silhouettePrograms=h.silhouettePrograms,p.textures=h.textures,p.samplers=h.samplers,p.renderStates=h.renderStates,p.ready=!0,this._normalAttributeName=ModelUtility.getAttributeOrUniformBySemantic(this.gltf,"NORMAL"),defined(this._precreatedAttributes)&&(p.vertexArrays={}),this.releaseGltfJson&&releaseCachedGltf(this)));var d;t=OctahedralProjectedCubeMap.isSupported(i);this._shouldUpdateSpecularMapAtlas&&t&&(this._shouldUpdateSpecularMapAtlas=!1,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),this._specularEnvironmentMapAtlas=void 0,defined(this._specularEnvironmentMaps)&&(this._specularEnvironmentMapAtlas=new OctahedralProjectedCubeMap(this._specularEnvironmentMaps),(d=this)._specularEnvironmentMapAtlas.readyPromise.then((function(){d._shouldRegenerateShaders=!0})).otherwise((function(e){console.error("Error loading specularEnvironmentMaps: "+e)}))),this._shouldRegenerateShaders=!0),defined(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e);c=!defined(this._specularEnvironmentMapAtlas)&&defined(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,l=!defined(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps;var h=!defined(this._sphericalHarmonicCoefficients)&&defined(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,p=!defined(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||c||l||h||p,this._useDefaultSpecularMaps=!defined(this._specularEnvironmentMapAtlas)&&defined(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!defined(this._sphericalHarmonicCoefficients)&&defined(e.sphericalHarmonicCoefficients);var f,m,g,y=hasSilhouette(this,e),_=isTranslucent(this),v=(t=isInvisible(this),this.backFaceCulling);c=!defined(this.distanceDisplayCondition)||distanceDisplayConditionVisible(this,e);if(((l=this.show&&c&&0!==this.scale&&(!t||y))&&this._state===ModelState$1.LOADED||u)&&(h=this.activeAnimations.update(e)||this._cesiumAnimationsDirty,this._cesiumAnimationsDirty=!1,this._dirty=!1,p=this.modelMatrix,c=e.mode!==this._mode,this._mode=e.mode,((t=!Matrix4.equals(this._modelMatrix,p)||this._scale!==this.scale||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||c)||u)&&(Matrix4.clone(p,this._modelMatrix),updateClamping(this),defined(this._clampedModelMatrix)&&(p=this._clampedModelMatrix),this._scale=this.scale,this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1,c=getScale(this,e),g=this._computedModelMatrix,Matrix4.multiplyByUniformScale(p,c,g),this._upAxis===Axis$1.Y?Matrix4.multiplyTransformation(g,Axis$1.Y_UP_TO_Z_UP,g):this._upAxis===Axis$1.X&&Matrix4.multiplyTransformation(g,Axis$1.X_UP_TO_Z_UP,g),this.forwardAxis===Axis$1.Z&&Matrix4.multiplyTransformation(g,Axis$1.Z_UP_TO_X_UP,g)),(h||t||u)&&(updateNodeHierarchyModelMatrix(this,t,u,e.mapProjection),this._dirty=!0,(h||u)&&applySkins(this)),this._perNodeShowDirty&&(this._perNodeShowDirty=!1,updatePerNodeShow(this)),updatePickIds(this),updateWireframe$1(this),updateShowBoundingVolume(this),updateShadows(this),updateClippingPlanes(this,e),g=0,h=defined(t=this._clippingPlanes)&&t.enabled&&0<t.length,p=defaultValue(this.referenceMatrix,p),h&&(f=scratchClippingPlanesMatrix,f=Matrix4.multiply(i.uniformState.view3D,p,f),f=Matrix4.multiply(f,t.modelMatrix,f),this._clippingPlanesMatrix=Matrix4.inverseTranspose(f,this._clippingPlanesMatrix),g=t.clippingPlanesState),f=defined(this._sphericalHarmonicCoefficients)||this._useDefaultSphericalHarmonics,t=defined(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready||this._useDefaultSpecularMaps,(f||t)&&(m=scratchIBLReferenceFrameMatrix3,t=scratchIBLReferenceFrameMatrix4,t=Matrix4.multiply(i.uniformState.view3D,p,t),m=Matrix4.getMatrix3(t,m),m=Matrix3.getRotation(m,m),this._iblReferenceFrameMatrix=Matrix3.transpose(m,this._iblReferenceFrameMatrix)),m=(m=this._shouldRegenerateShaders)||this._clippingPlanesState!==g,this._clippingPlanesState=g,(g=isColorShadingEnabled(this))!==this._colorShadingEnabled&&(this._colorShadingEnabled=g,m=!0),m?regenerateShaders(this,e):(updateColor(this,e,!1),updateBackFaceCulling(this,e,!1),updateSilhouette(this,e,!1))),u){var C=this;e.afterRender.push((function(){C._ready=!0,C._readyPromise.resolve(C)}))}else{if(l&&!this._ignoreCommands){var x,b,S,T,E=e.commandList,w=e.passes,A=this._nodeCommands,P=A.length,D=e.mapProjection.ellipsoid.maximumRadius*CesiumMath.PI;if(w.render||w.pick&&this.allowPicking){for(x=0;x<P;++x)(T=A[x]).show&&(S=T.command,y?S=T.silhouetteModelCommand:_?S=T.translucentCommand:v||(S=T.disableCullingCommand),E.push(S),b=T.command.boundingVolume,e.mode===SceneMode$1.SCENE2D&&(b.center.y+b.radius>D||b.center.y-b.radius<D)&&(S=T.command2D,y?S=T.silhouetteModelCommand2D:_?S=T.translucentCommand2D:v||(S=T.disableCullingCommand2D),E.push(S)));if(y&&!w.pick)for(x=0;x<P;++x)(T=A[x]).show&&(E.push(T.silhouetteColorCommand),b=T.command.boundingVolume,e.mode===SceneMode$1.SCENE2D&&(b.center.y+b.radius>D||b.center.y-b.radius<D)&&E.push(T.silhouetteColorCommand2D))}}defined(w=this._credit)&&e.creditDisplay.addCredit(w);for(var M=this._resourceCredits,I=M.length,R=0;R<I;R++)e.creditDisplay.addCredit(M[R])}}else FeatureDetection.supportsWebP.initialize()},Model.prototype.isDestroyed=function(){return!1},Model.prototype.destroy=function(){defined(this._precreatedAttributes)&&destroy(this._rendererResources.vertexArrays),defined(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),defined(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0),defined(this._cachedRendererResources)&&destroyIfNotCached(this._rendererResources,this._cachedRendererResources),this._rendererResources=void 0,this._cachedRendererResources=this._cachedRendererResources&&this._cachedRendererResources.release(),DracoLoader.destroyCachedDataForModel(this);for(var e=this._pickIds,t=e.length,i=0;i<t;++i)e[i].destroy();releaseCachedGltf(this),this._quantizedVertexShaders=void 0;var r=this._clippingPlanes;return defined(r)&&!r.isDestroyed()&&r.owner===this&&r.destroy(),this._clippingPlanes=void 0,this._specularEnvironmentMapAtlas=this._specularEnvironmentMapAtlas&&this._specularEnvironmentMapAtlas.destroy(),destroyObject(this)},Model._getClippingFunction=getClippingFunction,Model._modifyShaderForColor=modifyShaderForColor,Batched3DModel3DTileContent._deprecationWarning=deprecationWarning,Object.defineProperties(Batched3DModel3DTileContent.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var sizeOfUint32$3=Uint32Array.BYTES_PER_ELEMENT;function getBatchIdAttributeName(e){var t=ModelUtility.getAttributeOrUniformBySemantic(e,"_BATCHID");return defined(t)||defined(t=ModelUtility.getAttributeOrUniformBySemantic(e,"BATCHID"))&&Batched3DModel3DTileContent._deprecationWarning("b3dm-legacy-batchid","The glTF in this b3dm uses the semantic `BATCHID`. Application-specific semantics should be prefixed with an underscore: `_BATCHID`."),t}function getVertexShaderCallback(e){return function(t,i){var r=e._batchTable,n=!defined(e._tileset.classificationType),a=e._model.gltf;return defined(a)&&(e._batchIdAttributeName=getBatchIdAttributeName(a),e._diffuseAttributeOrUniformName[i]=ModelUtility.getDiffuseAttributeOrUniform(a,i)),defined(i=r.getVertexShaderCallback(n,e._batchIdAttributeName,e._diffuseAttributeOrUniformName[i]))?i(t):t}}function getFragmentShaderCallback(e){return function(t,i){var r=e._batchTable,n=!defined(e._tileset.classificationType),a=e._model.gltf;return defined(a)&&(e._diffuseAttributeOrUniformName[i]=ModelUtility.getDiffuseAttributeOrUniform(a,i)),defined(i=r.getFragmentShaderCallback(n,e._diffuseAttributeOrUniformName[i]))?i(t):t}}function getPickIdCallback(e){return function(){return e._batchTable.getPickId()}}function getClassificationFragmentShaderCallback(e){return function(t){var i=e._batchTable.getClassificationFragmentShaderCallback();return defined(i)?i(t):t}}function createColorChangedCallback(e){return function(t,i){e._model.updateCommands(t,i)}}function initialize$2(e,t,i){var r=e._tileset,n=e._tile,a=e._resource,o=defaultValue(i,0);i=o;var s=new Uint8Array(t),l=new DataView(t);if(i+=sizeOfUint32$3,1!==(f=l.getUint32(i,!0)))throw new RuntimeError("Only Batched 3D Model version 1 is supported.  Version "+f+" is not.");i+=sizeOfUint32$3;var c=l.getUint32(i,!0);i+=sizeOfUint32$3;var u=l.getUint32(i,!0);i+=sizeOfUint32$3;var d=l.getUint32(i,!0);i+=sizeOfUint32$3;var h=l.getUint32(i,!0);i+=sizeOfUint32$3;var p,f=l.getUint32(i,!0);i+=sizeOfUint32$3,570425344<=h?(i-=2*sizeOfUint32$3,y=u,h=d,d=u=f=0,Batched3DModel3DTileContent._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/master/specification/TileFormats/Batched3DModel.")):570425344<=f&&(i-=sizeOfUint32$3,y=h,h=u,f=d,d=u=0,Batched3DModel3DTileContent._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/master/specification/TileFormats/Batched3DModel.")),0===u?p={BATCH_LENGTH:defaultValue(y,0)}:(l=getStringFromTypedArray(s,i,u),p=JSON.parse(l),i+=u),u=new Uint8Array(t,i,d),i+=d;var m,g,y=(u=new Cesium3DTileFeatureTable(p,u)).getGlobalProperty("BATCH_LENGTH");u.featuresLength=y,0<h&&(g=getStringFromTypedArray(s,i,h),g=JSON.parse(g),i+=h,0<f&&(m=new Uint8Array(t,i,f),m=new Uint8Array(m),i+=f)),defined(r.classificationType)&&(_=createColorChangedCallback(e));var _=new Cesium3DTileBatchTable(e,y,g,m,_);if(e._batchTable=_,0==(c=o+c-i))throw new RuntimeError("glTF byte length must be greater than 0.");i=i%4==0?new Uint8Array(t,i,c):(Batched3DModel3DTileContent._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),new Uint8Array(s.subarray(i,i+c))),c={content:e,primitive:r},e._rtcCenterTransform=Matrix4.IDENTITY,defined(u=u.getGlobalProperty("RTC_CENTER",ComponentDatatype$1.FLOAT,3))&&(e._rtcCenterTransform=Matrix4.fromTranslation(Cartesian3.fromArray(u))),e._contentModelMatrix=Matrix4.multiply(n.computedTransform,e._rtcCenterTransform,new Matrix4),defined(r.classificationType)?e._model=new ClassificationModel({gltf:i,cull:!1,basePath:a,requestType:RequestType$1.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:r._gltfUpAxis,forwardAxis:Axis$1.X,debugWireframe:r.debugWireframe,vertexShaderLoaded:getVertexShaderCallback(e),classificationShaderLoaded:getClassificationFragmentShaderCallback(e),uniformMapLoaded:_.getUniformMapCallback(),pickIdLoaded:getPickIdCallback(e),classificationType:r._classificationType,batchTable:_}):(e._model=new Model({gltf:i,cull:!1,releaseGltfJson:!0,opaquePass:Pass$1.CESIUM_3D_TILE,basePath:a,requestType:RequestType$1.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:r._gltfUpAxis,forwardAxis:Axis$1.X,shadows:r.shadows,debugWireframe:r.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:getVertexShaderCallback(e),fragmentShaderLoaded:getFragmentShaderCallback(e),uniformMapLoaded:_.getUniformMapCallback(),pickIdLoaded:getPickIdCallback(e),addBatchIdToGeneratedShaders:0<y,pickObject:c,imageBasedLightingFactor:r.imageBasedLightingFactor,lightColor:r.lightColor,luminanceAtZenith:r.luminanceAtZenith,sphericalHarmonicCoefficients:r.sphericalHarmonicCoefficients,specularEnvironmentMaps:r.specularEnvironmentMaps,backFaceCulling:r.backFaceCulling}),e._model.readyPromise.then((function(e){e.activeAnimations.addAll({loop:ModelAnimationLoop$1.REPEAT})})))}function createFeatures(e){var t=e.featuresLength;if(!defined(e._features)&&0<t){for(var i=new Array(t),r=0;r<t;++r)i[r]=new Cesium3DTileFeature(e,r);e._features=i}}function Composite3DTileContent(e,t,i,r,n,a){this._tileset=e,this._tile=t,this._resource=i,this._contents=[],this._readyPromise=when.defer(),initialize$3(this,r,n,a)}Batched3DModel3DTileContent.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Batched3DModel3DTileContent.prototype.getFeature=function(e){return createFeatures(this),this._features[e]},Batched3DModel3DTileContent.prototype.applyDebugSettings=function(e,t){t=e?t:Color.WHITE,0===this.featuresLength?this._model.color=t:this._batchTable.setAllColor(t)},Batched3DModel3DTileContent.prototype.applyStyle=function(e){var t,i;0===this.featuresLength?(t=defined(e)&&defined(e.color),i=defined(e)&&defined(e.show),this._model.color=t?e.color.evaluateColor(void 0,this._model.color):Color.clone(Color.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)):this._batchTable.applyStyle(e)},Batched3DModel3DTileContent.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._contentModelMatrix=Matrix4.multiply(this._tile.computedTransform,this._rtcCenterTransform,this._contentModelMatrix),this._model.modelMatrix=this._contentModelMatrix,this._model.shadows=this._tileset.shadows,this._model.imageBasedLightingFactor=this._tileset.imageBasedLightingFactor,this._model.lightColor=this._tileset.lightColor,this._model.luminanceAtZenith=this._tileset.luminanceAtZenith,this._model.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._model.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._model.backFaceCulling=this._tileset.backFaceCulling,this._model.debugWireframe=this._tileset.debugWireframe;var r=this._tileset.clippingPlanes;this._model.referenceMatrix=this._tileset.clippingPlanesOriginMatrix,defined(r)&&this._tile.clippingPlanesDirty&&(this._model._clippingPlanes=r.enabled&&this._tile._isClipped?r:void 0),defined(r)&&defined(this._model._clippingPlanes)&&this._model._clippingPlanes!==r&&(this._model._clippingPlanes=r),this._model.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&!defined(e.classificationType)&&this._batchTable.addDerivedCommands(t,i)},Batched3DModel3DTileContent.prototype.isDestroyed=function(){return!1},Batched3DModel3DTileContent.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)},Object.defineProperties(Composite3DTileContent.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,r=0;r<i;++r)t[r].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}});var sizeOfUint32$4=Uint32Array.BYTES_PER_ELEMENT;function initialize$3(e,t,i,r){i=defaultValue(i,0);var n=new Uint8Array(t),a=new DataView(t);i+=sizeOfUint32$4;var o=a.getUint32(i,!0);if(1!==o)throw new RuntimeError("Only Composite Tile version 1 is supported. Version "+o+" is not.");i+=sizeOfUint32$4,i+=sizeOfUint32$4;var s=a.getUint32(i,!0);i+=sizeOfUint32$4;for(var l=[],c=0;c<s;++c){var u=getMagic(n,i),d=a.getUint32(i+2*sizeOfUint32$4,!0),h=r[u];if(!defined(h))throw new RuntimeError("Unknown tile content type, "+u+", inside Composite tile");h=h(e._tileset,e._tile,e._resource,t,i),e._contents.push(h),l.push(h.readyPromise),i+=d}when.all(l).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}function Vector3DTileGeometry(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,defined(this._center)||(defined(this._boundingVolume)?this._center=Cartesian3.clone(this._boundingVolume.center):this._center=Cartesian3.clone(Cartesian3.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=when.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=ClassificationType$1.BOTH}function packBuffer(e){var t=new Float64Array(Matrix4.packedLength+Cartesian3.packedLength),i=0;return Cartesian3.pack(e._center,t,0),i+=Cartesian3.packedLength,Matrix4.pack(e._modelMatrix,t,i),t}function unpackBuffer(e,t){for(var i=0,r=t[i++],n=t[i++],a=e._boundingVolumes=new Array(n),o=0;o<n;++o)a[o]=BoundingSphere.unpack(t,i),i+=BoundingSphere.packedLength;for(var s=t[i++],l=e._batchedIndices=new Array(s),c=0;c<s;++c){var u=Color.unpack(t,i);i+=Color.packedLength;for(var d=t[i++],h=t[i++],p=t[i++],f=new Array(p),m=0;m<p;++m)f[m]=t[i++];l[c]=new Vector3DTileBatch({color:u,offset:d,count:h,batchIds:f})}return r}Composite3DTileContent.prototype.hasProperty=function(e,t){return!1},Composite3DTileContent.prototype.getFeature=function(e){},Composite3DTileContent.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,r=i.length,n=0;n<r;++n)i[n].applyDebugSettings(e,t)},Composite3DTileContent.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,r=0;r<i;++r)t[r].applyStyle(e)},Composite3DTileContent.prototype.update=function(e,t){for(var i=this._contents,r=i.length,n=0;n<r;++n)i[n].update(e,t)},Composite3DTileContent.prototype.isDestroyed=function(){return!1},Composite3DTileContent.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return destroyObject(this)},Object.defineProperties(Vector3DTileGeometry.prototype,{trianglesLength:{get:function(){return defined(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return defined(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}}),Vector3DTileGeometry.packedBoxLength=Matrix4.packedLength+Cartesian3.packedLength,Vector3DTileGeometry.packedCylinderLength=Matrix4.packedLength+2,Vector3DTileGeometry.packedEllipsoidLength=Matrix4.packedLength+Cartesian3.packedLength,Vector3DTileGeometry.packedSphereLength=Cartesian3.packedLength+1;var createVerticesTaskProcessor=new TaskProcessor("createVectorTileGeometries"),scratchColor$4=new Color;function createPrimitive$1(e){if(!defined(e._primitive)){if(!defined(e._verticesPromise)){var t=e._boxes,i=e._boxBatchIds,r=e._cylinders,n=e._cylinderBatchIds,a=e._ellipsoids,o=e._ellipsoidBatchIds,s=e._spheres,l=e._sphereBatchIds,c=e._batchTableColors,u=e._packedBuffer;if(!defined(c)){var d=0;defined(e._boxes)&&(t=e._boxes=arraySlice(t),d+=(i=e._boxBatchIds=arraySlice(i)).length),defined(e._cylinders)&&(r=e._cylinders=arraySlice(r),d+=(n=e._cylinderBatchIds=arraySlice(n)).length),defined(e._ellipsoids)&&(a=e._ellipsoids=arraySlice(a),d+=(o=e._ellipsoidBatchIds=arraySlice(o)).length),defined(e._spheres)&&(s=e._sphere=arraySlice(s),d+=(l=e._sphereBatchIds=arraySlice(l)).length),c=e._batchTableColors=new Uint32Array(d);for(var h=e._batchTable,p=0;p<d;++p){var f=h.getColor(p,scratchColor$4);c[p]=f.toRgba()}u=e._packedBuffer=packBuffer(e)}var m=[];if(defined(t)&&m.push(t.buffer,i.buffer),defined(r)&&m.push(r.buffer,n.buffer),defined(a)&&m.push(a.buffer,o.buffer),defined(s)&&m.push(s.buffer,l.buffer),m.push(c.buffer,u.buffer),u={boxes:defined(t)?t.buffer:void 0,boxBatchIds:defined(t)?i.buffer:void 0,cylinders:defined(r)?r.buffer:void 0,cylinderBatchIds:defined(r)?n.buffer:void 0,ellipsoids:defined(a)?a.buffer:void 0,ellipsoidBatchIds:defined(a)?o.buffer:void 0,spheres:defined(s)?s.buffer:void 0,sphereBatchIds:defined(s)?l.buffer:void 0,batchTableColors:c.buffer,packedBuffer:u.buffer},!defined(m=e._verticesPromise=createVerticesTaskProcessor.scheduleTask(u,m)))return;m.then((function(t){var i=new Float64Array(t.packedBuffer);i=unpackBuffer(e,i);e._indices=new(2===i?Uint16Array:Uint32Array)(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._positions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.vertexBatchIds),e._batchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!defined(e._primitive)&&(e._primitive=new Vector3DTilePrimitive({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:defaultValue(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}function Geometry3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._geometries=void 0,this._contentReadyPromise=void 0,this._readyPromise=when.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,initialize$4(this,r,n)}function createColorChangedCallback$1(e){return function(t,i){defined(e._geometries)&&e._geometries.updateCommands(t,i)}}function getBatchIds(e,t){var i,r,n,a,o,s,l,c=defaultValue(e.BOXES_LENGTH,0),u=defaultValue(e.CYLINDERS_LENGTH,0),d=defaultValue(e.ELLIPSOIDS_LENGTH,0),h=defaultValue(e.SPHERES_LENGTH,0);0<c&&defined(e.BOX_BATCH_IDS)&&(r=t.byteOffset+e.BOX_BATCH_IDS.byteOffset,n=new Uint16Array(t.buffer,r,c)),0<u&&defined(e.CYLINDER_BATCH_IDS)&&(o=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset,a=new Uint16Array(t.buffer,o,u)),0<d&&defined(e.ELLIPSOID_BATCH_IDS)&&(o=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset,s=new Uint16Array(t.buffer,o,d)),0<h&&defined(e.SPHERE_BATCH_IDS)&&(p=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset,l=new Uint16Array(t.buffer,p,h));t=defined(n)||defined(a)||defined(s)||defined(l);var p=0<c&&!defined(n)||0<u&&!defined(a)||0<d&&!defined(s)||0<h&&!defined(l);if(t&&p)throw new RuntimeError("If one group of batch ids is defined, then all batch ids must be defined.");if(!(defined(n)||defined(a)||defined(s)||defined(l))){var f=0;if(!defined(n)&&0<c)for(n=new Uint16Array(c),i=0;i<c;++i)n[i]=f++;if(!defined(a)&&0<u)for(a=new Uint16Array(u),i=0;i<u;++i)a[i]=f++;if(!defined(s)&&0<d)for(s=new Uint16Array(d),i=0;i<d;++i)s[i]=f++;if(!defined(l)&&0<h)for(l=new Uint16Array(h),i=0;i<h;++i)l[i]=f++}return{boxes:n,cylinders:a,ellipsoids:s,spheres:l}}Vector3DTileGeometry.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},Vector3DTileGeometry.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},Vector3DTileGeometry.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},Vector3DTileGeometry.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},Vector3DTileGeometry.prototype.update=function(e){createPrimitive$1(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},Vector3DTileGeometry.prototype.isDestroyed=function(){return!1},Vector3DTileGeometry.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)},Object.defineProperties(Geometry3DTileContent.prototype,{featuresLength:{get:function(){return defined(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return defined(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return defined(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return defined(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var sizeOfUint32$5=Uint32Array.BYTES_PER_ELEMENT;function initialize$4(e,t,i){i=defaultValue(i,0);var r=new Uint8Array(t),n=new DataView(t);if(i+=sizeOfUint32$5,1!==(f=n.getUint32(i,!0)))throw new RuntimeError("Only Geometry tile version 1 is supported.  Version "+f+" is not.");i+=sizeOfUint32$5;var a=n.getUint32(i,!0);if(i+=sizeOfUint32$5,0!==a){var o=n.getUint32(i,!0);if(i+=sizeOfUint32$5,0===o)throw new RuntimeError("Feature table must have a byte length greater than zero");var s=n.getUint32(i,!0);i+=sizeOfUint32$5,f=n.getUint32(i,!0),i+=sizeOfUint32$5,a=n.getUint32(i,!0),n=getStringFromTypedArray(r,i+=sizeOfUint32$5,o),n=JSON.parse(n),i+=o,o=new Uint8Array(t,i,s),i+=s,0<f&&(m=getStringFromTypedArray(r,i,f),g=JSON.parse(m),i+=f,0<a&&(l=new Uint8Array(t,i,a),l=new Uint8Array(l)));var l,c,u,d,h,p,f,m=defaultValue(n.BOXES_LENGTH,0),g=new Cesium3DTileBatchTable(e,a=m+(f=defaultValue(n.CYLINDERS_LENGTH,0))+(t=defaultValue(n.ELLIPSOIDS_LENGTH,0))+(i=defaultValue(n.SPHERES_LENGTH,0)),g,l,createColorChangedCallback$1(e));e._batchTable=g,0!==a&&(l=e.tile.computedTransform,defined(n.RTC_CENTER)&&(c=Cartesian3.unpack(n.RTC_CENTER),Matrix4.multiplyByPoint(l,c,c)),a=getBatchIds(n,o),(0<m||0<f||0<t||0<i)&&(0<m&&(u=o.byteOffset+n.BOXES.byteOffset,u=new Float32Array(o.buffer,u,Vector3DTileGeometry.packedBoxLength*m)),0<f&&(d=o.byteOffset+n.CYLINDERS.byteOffset,d=new Float32Array(o.buffer,d,Vector3DTileGeometry.packedCylinderLength*f)),0<t&&(h=o.byteOffset+n.ELLIPSOIDS.byteOffset,h=new Float32Array(o.buffer,h,Vector3DTileGeometry.packedEllipsoidLength*t)),0<i&&(p=o.byteOffset+n.SPHERES.byteOffset,p=new Float32Array(o.buffer,p,Vector3DTileGeometry.packedSphereLength*i)),e._geometries=new Vector3DTileGeometry({boxes:u,boxBatchIds:a.boxes,cylinders:d,cylinderBatchIds:a.cylinders,ellipsoids:h,ellipsoidBatchIds:a.ellipsoids,spheres:p,sphereBatchIds:a.spheres,center:c,modelMatrix:l,batchTable:g,boundingVolume:e.tile.boundingVolume.boundingVolume})))}else e._readyPromise.resolve(e)}function createFeatures$1(e){var t=e.featuresLength;!defined(e._features)&&0<t&&(t=new Array(t),defined(e._geometries)&&e._geometries.createFeatures(e,t),e._features=t)}function ModelInstance(e,t,i){this.primitive=e,this._modelMatrix=Matrix4.clone(t),this._instanceId=i}Geometry3DTileContent.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Geometry3DTileContent.prototype.getFeature=function(e){return createFeatures$1(this),this._features[e]},Geometry3DTileContent.prototype.applyDebugSettings=function(e,t){defined(this._geometries)&&this._geometries.applyDebugSettings(e,t)},Geometry3DTileContent.prototype.applyStyle=function(e){createFeatures$1(this),defined(this._geometries)&&this._geometries.applyStyle(e,this._features)},Geometry3DTileContent.prototype.update=function(e,t){var i;defined(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),defined(this._batchTable)&&this._geometries._ready&&this._batchTable.update(e,t),defined(this._contentReadyPromise)||((i=this)._contentReadyPromise=this._geometries.readyPromise.then((function(){i._readyPromise.resolve(i)})))},Geometry3DTileContent.prototype.isDestroyed=function(){return!1},Geometry3DTileContent.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)},Object.defineProperties(ModelInstance.prototype,{instanceId:{get:function(){return this._instanceId}},model:{get:function(){return this.primitive._model}},modelMatrix:{get:function(){return Matrix4.clone(this._modelMatrix)},set:function(e){Matrix4.clone(e,this._modelMatrix),this.primitive.expandBoundingSphere(this._modelMatrix),this.primitive._dirty=!0}}});var LoadState={NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3};function ModelInstanceCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.show=defaultValue(e.show,!0),this._instancingSupported=!1,this._dynamic=defaultValue(e.dynamic,!1),this._allowPicking=defaultValue(e.allowPicking,!0),this._ready=!1,this._readyPromise=when.defer(),this._state=LoadState.NEEDS_LOAD,this._dirty=!1,this._cull=defaultValue(e.cull,!0),this._opaquePass=defaultValue(e.opaquePass,Pass$1.OPAQUE),this._instances=createInstances(this,e.instances),this._batchTable=e.batchTable,this._model=void 0,this._vertexBufferTypedArray=void 0,this._vertexBuffer=void 0,this._batchIdBuffer=void 0,this._instancedUniformsByProgram=void 0,this._drawCommands=[],this._modelCommands=void 0,this._renderStates=void 0,this._disableCullingRenderStates=void 0,this._boundingSphere=createBoundingSphere(this),this._center=Cartesian3.clone(this._boundingSphere.center),this._rtcTransform=new Matrix4,this._rtcModelView=new Matrix4,this._mode=void 0,this.modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this._modelMatrix=Matrix4.clone(this.modelMatrix),this._url=Resource.createIfNeeded(e.url),this._requestType=e.requestType,this._gltf=e.gltf,this._basePath=Resource.createIfNeeded(e.basePath),this._asynchronous=e.asynchronous,this._incrementallyLoadTextures=e.incrementallyLoadTextures,this._upAxis=e.upAxis,this._forwardAxis=e.forwardAxis,this.shadows=defaultValue(e.shadows,ShadowMode$1.ENABLED),this._shadows=this.shadows,this._pickIdLoaded=e.pickIdLoaded,this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=defaultValue(e.debugWireframe,!1),this._debugWireframe=!1,this._imageBasedLightingFactor=new Cartesian2(1,1),Cartesian2.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e.luminanceAtZenith,this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.backFaceCulling=defaultValue(e.backFaceCulling,!0),this._backFaceCulling=this.backFaceCulling}function createInstances(e,t){for(var i=(t=defaultValue(t,[])).length,r=new Array(i),n=0;n<i;++n){var a=(o=t[n]).modelMatrix,o=defaultValue(o.batchId,n);r[n]=new ModelInstance(e,a,o)}return r}function createBoundingSphere(e){for(var t=e.length,i=new Array(t),r=0;r<t;++r)i[r]=Matrix4.getTranslation(e._instances[r]._modelMatrix,new Cartesian3);return BoundingSphere.fromPoints(i)}Object.defineProperties(ModelInstanceCollection.prototype,{allowPicking:{get:function(){return this._allowPicking}},length:{get:function(){return this._instances.length}},activeAnimations:{get:function(){return this._model.activeAnimations}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){Cartesian2.clone(e,this._imageBasedLightingFactor)}}});var scratchCartesian$2=new Cartesian3,scratchMatrix$1=new Matrix4;function getCheckUniformSemanticFunction(e,t,i,r){return function(n,a){if(defined(n=n.semantic)&&-1<e.indexOf(n)){if(!(-1<t.indexOf(n)))throw new RuntimeError('Shader program cannot be optimized for instancing. Uniform "'+a+'" in program "'+i+'" uses unsupported semantic "'+n+'"');r[a]=n}}}function getInstancedUniforms(e,t){if(defined(e._instancedUniformsByProgram))return e._instancedUniformsByProgram[t];var i={};e._instancedUniformsByProgram=i;var r,n,a,o,s=["MODEL","MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELINVERSE","MODELVIEWINVERSE","MODELVIEWPROJECTIONINVERSE","MODELINVERSETRANSPOSE","MODELVIEWINVERSETRANSPOSE"],l=["MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELVIEWINVERSETRANSPOSE"],c=e._model._sourceTechniques;for(r in c)c.hasOwnProperty(r)&&(defined(i[a=(n=c[r]).program])||(o={},i[a]=o,ForEach.techniqueUniform(n,getCheckUniformSemanticFunction(s,l,t,o))));return i[t]}function getVertexShaderCallback$1(e){return function(t,i){var r,n,a,o=getInstancedUniforms(e,i),s=defined(e._batchTable),l=ShaderSource.replaceMain(t,"czm_instancing_main"),c="",u="";for(r in o)o.hasOwnProperty(r)&&("MODELVIEW"===(a=o[r])||"CESIUM_RTC_MODELVIEW"===a?n="czm_instanced_modelView":"MODELVIEWPROJECTION"===a?(n="czm_instanced_modelViewProjection",c+="mat4 czm_instanced_modelViewProjection;\n",u+="czm_instanced_modelViewProjection = czm_projection * czm_instanced_modelView;\n"):"MODELVIEWINVERSETRANSPOSE"===a&&(n="czm_instanced_modelViewInverseTranspose",c+="mat3 czm_instanced_modelViewInverseTranspose;\n",u+="czm_instanced_modelViewInverseTranspose = mat3(czm_instanced_modelView);\n"),a=new RegExp("uniform.*"+r+".*"),l=l.replace(a,""),a=new RegExp(r+"\\b","g"),l=l.replace(a,n));var d,h;t=s?(d="attribute float a_batchId;\n",h=""):(d="",h="attribute vec4 pickColor;\nvarying vec4 v_pickColor;\n","    v_pickColor = pickColor;\n"),t="uniform mat4 czm_instanced_modifiedModelView;\nuniform mat4 czm_instanced_nodeTransform;\n"+c+"mat4 czm_instanced_modelView;\nattribute vec4 czm_modelMatrixRow0;\nattribute vec4 czm_modelMatrixRow1;\nattribute vec4 czm_modelMatrixRow2;\n"+d+h+l+"void main()\n{\n    mat4 czm_instanced_model = mat4(czm_modelMatrixRow0.x, czm_modelMatrixRow1.x, czm_modelMatrixRow2.x, 0.0, czm_modelMatrixRow0.y, czm_modelMatrixRow1.y, czm_modelMatrixRow2.y, 0.0, czm_modelMatrixRow0.z, czm_modelMatrixRow1.z, czm_modelMatrixRow2.z, 0.0, czm_modelMatrixRow0.w, czm_modelMatrixRow1.w, czm_modelMatrixRow2.w, 1.0);\n    czm_instanced_modelView = czm_instanced_modifiedModelView * czm_instanced_model * czm_instanced_nodeTransform;\n"+u+"    czm_instancing_main();\n"+t+"}\n";return s&&(s=e._model.gltf,i=ModelUtility.getDiffuseAttributeOrUniform(s,i),t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",i)(t)),t}}function getFragmentShaderCallback$1(e){return function(t,i){var r,n=e._batchTable;return defined(n)?(r=e._model.gltf,i=ModelUtility.getDiffuseAttributeOrUniform(r,i),n.getFragmentShaderCallback(!0,i)(t)):"varying vec4 v_pickColor;\n"+t}}function createModifiedModelView(e,t){return function(){return Matrix4.multiply(t.uniformState.view,e._rtcTransform,e._rtcModelView)}}function createNodeTransformFunction(e){return function(){return e.computedMatrix}}function getUniformMapCallback(e,t){return function(i,r,n){(i=clone(i)).czm_instanced_modifiedModelView=createModifiedModelView(e,t),i.czm_instanced_nodeTransform=createNodeTransformFunction(n);var a,o=getInstancedUniforms(e,r);for(a in o)o.hasOwnProperty(a)&&delete i[a];return defined(e._batchTable)&&(i=e._batchTable.getUniformMapCallback()(i)),i}}function getVertexShaderNonInstancedCallback(e){return function(t,i){var r;return defined(e._batchTable)&&(r=e._model.gltf,i=ModelUtility.getDiffuseAttributeOrUniform(r,i),t="uniform float a_batchId\n;"+(t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",i)(t))),t}}function getFragmentShaderNonInstancedCallback(e){return function(t,i){var r,n=e._batchTable;return defined(n)?(r=e._model.gltf,i=ModelUtility.getDiffuseAttributeOrUniform(r,i),n.getFragmentShaderCallback(!0,i)(t)):"uniform vec4 czm_pickColor;\n"+t}}function getUniformMapNonInstancedCallback(e){return function(t){return defined(e._batchTable)&&(t=e._batchTable.getUniformMapCallback()(t)),t}}function getVertexBufferTypedArray(e){var t=e._instances,i=e.length,r=e._center,n=e._vertexBufferTypedArray;defined(n)||(n=new Float32Array(12*i)),e._dynamic&&(e._vertexBufferTypedArray=n);for(var a=0;a<i;++a){var o=t[a]._modelMatrix,s=Matrix4.clone(o,scratchMatrix$1);s[12]-=r.x,s[13]-=r.y,s[14]-=r.z,n[0+(o=12*a)]=s[0],n[1+o]=s[4],n[2+o]=s[8],n[3+o]=s[12],n[4+o]=s[1],n[5+o]=s[5],n[6+o]=s[9],n[7+o]=s[13],n[8+o]=s[2],n[9+o]=s[6],n[10+o]=s[10],n[11+o]=s[14]}return n}function createVertexBuffer$2(e,t){var i=e._instances,r=e.length,n=e._dynamic,a=defined(e._batchTable);if(a){for(var o=new Uint16Array(r),s=0;s<r;++s)o[s]=i[s]._instanceId;e._batchIdBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:o,usage:BufferUsage$1.STATIC_DRAW})}if(!a){var l=new Uint8Array(4*r);for(s=0;s<r;++s){var c=e._pickIds[s].color,u=4*s;l[u]=Color.floatToByte(c.red),l[1+u]=Color.floatToByte(c.green),l[2+u]=Color.floatToByte(c.blue),l[3+u]=Color.floatToByte(c.alpha)}e._pickIdBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:l,usage:BufferUsage$1.STATIC_DRAW})}a=getVertexBufferTypedArray(e),e._vertexBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:a,usage:n?BufferUsage$1.STREAM_DRAW:BufferUsage$1.STATIC_DRAW})}function updateVertexBuffer(e){var t=getVertexBufferTypedArray(e);e._vertexBuffer.copyFromArrayView(t)}function createPickIds(e,t){for(var i=e._instances,r=i.length,n=new Array(r),a=0;a<r;++a)n[a]=t.createPickId(i[a]);return n}function createModel(e,t){var i=e._instancingSupported,r=defined(e._batchTable),n=e._allowPicking;n={url:e._url,requestType:e._requestType,gltf:e._gltf,basePath:e._basePath,shadows:e._shadows,cacheKey:void 0,asynchronous:e._asynchronous,allowPicking:n,incrementallyLoadTextures:e._incrementallyLoadTextures,upAxis:e._upAxis,forwardAxis:e._forwardAxis,precreatedAttributes:void 0,vertexShaderLoaded:void 0,fragmentShaderLoaded:void 0,uniformMapLoaded:void 0,pickIdLoaded:e._pickIdLoaded,ignoreCommands:!0,opaquePass:e._opaquePass,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps};r||(e._pickIds=createPickIds(e,t)),i?(createVertexBuffer$2(e,t),i=ComponentDatatype$1.getSizeInBytes(ComponentDatatype$1.FLOAT),i={czm_modelMatrixRow0:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*i,instanceDivisor:1},czm_modelMatrixRow1:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,normalize:!1,offsetInBytes:4*i,strideInBytes:12*i,instanceDivisor:1},czm_modelMatrixRow2:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,normalize:!1,offsetInBytes:8*i,strideInBytes:12*i,instanceDivisor:1}},r&&(i.a_batchId={index:0,vertexBuffer:e._batchIdBuffer,componentsPerAttribute:1,componentDatatype:ComponentDatatype$1.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),r||(i.pickColor={index:0,vertexBuffer:e._pickIdBuffer,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),n.precreatedAttributes=i,n.vertexShaderLoaded=getVertexShaderCallback$1(e),n.fragmentShaderLoaded=getFragmentShaderCallback$1(e),n.uniformMapLoaded=getUniformMapCallback(e,t),defined(e._url)&&(n.cacheKey=e._url.getUrlComponent()+"#instanced")):(n.vertexShaderLoaded=getVertexShaderNonInstancedCallback(e),n.fragmentShaderLoaded=getFragmentShaderNonInstancedCallback(e),n.uniformMapLoaded=getUniformMapNonInstancedCallback(e)),defined(e._url)?e._model=Model.fromGltf(n):e._model=new Model(n)}function updateWireframe$2(e,t){if(e._debugWireframe!==e.debugWireframe||t){e._debugWireframe=e.debugWireframe;for(var i=e.debugWireframe?PrimitiveType$1.LINES:PrimitiveType$1.TRIANGLES,r=e._drawCommands,n=r.length,a=0;a<n;++a)r[a].primitiveType=i}}function getDisableCullingRenderState$1(e){return(e=clone(e,!0)).cull.enabled=!1,RenderState.fromCache(e)}function updateBackFaceCulling$1(e,t){if(e._backFaceCulling!==e.backFaceCulling||t){e._backFaceCulling=e.backFaceCulling;var i,r=e._drawCommands,n=r.length;if(!defined(e._disableCullingRenderStates))for(e._disableCullingRenderStates=new Array(n),e._renderStates=new Array(n),i=0;i<n;++i){var a=r[i].renderState,o=getDisableCullingRenderState$1(a);e._disableCullingRenderStates[i]=o,e._renderStates[i]=a}for(i=0;i<n;++i)r[i].renderState=(e._backFaceCulling?e._renderStates:e._disableCullingRenderStates)[i]}}function updateShowBoundingVolume$1(e,t){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume||t){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var i=e._drawCommands,r=i.length,n=0;n<r;++n)i[n].debugShowBoundingVolume=e.debugShowBoundingVolume}}function createCommands$3(e,t){for(var i=t.length,r=e.length,n=e._boundingSphere,a=e._cull,o=0;o<i;++o){var s=DrawCommand.shallowClone(t[o]);s.instanceCount=r,s.boundingVolume=n,s.cull=a,defined(e._batchTable)?s.pickId=e._batchTable.getPickId():s.pickId="v_pickColor",e._drawCommands.push(s)}}function createBatchIdFunction(e){return function(){return e}}function createPickColorFunction$1(e){return function(){return e}}function createCommandsNonInstanced(e,t){for(var i=e._instances,r=t.length,n=e.length,a=defined(e._batchTable),o=e._cull,s=0;s<r;++s)for(var l=0;l<n;++l){var c,u=DrawCommand.shallowClone(t[s]);u.modelMatrix=new Matrix4,u.boundingVolume=new BoundingSphere,u.cull=o,u.uniformMap=clone(u.uniformMap),a?u.uniformMap.a_batchId=createBatchIdFunction(i[l]._instanceId):(c=e._pickIds[l],u.uniformMap.czm_pickColor=createPickColorFunction$1(c.color)),e._drawCommands.push(u)}}function updateCommandsNonInstanced(e){for(var t=e._modelCommands,i=t.length,r=e.length,n=e._rtcTransform,a=e._center,o=0;o<i;++o)for(var s=t[o],l=0;l<r;++l){var c=o*r+l,u=e._drawCommands[c],d=Matrix4.clone(e._instances[l]._modelMatrix,scratchMatrix$1);d[12]-=a.x,d[13]-=a.y,d[14]-=a.z,d=Matrix4.multiply(n,d,scratchMatrix$1);var h=s.modelMatrix;c=u.modelMatrix;Matrix4.multiply(d,h,c),c=s.boundingVolume,u=u.boundingVolume,BoundingSphere.transform(c,d,u)}}function getModelCommands(e){for(var t=e._nodeCommands,i=t.length,r=[],n=0;n<i;++n){var a=t[n];a.show&&r.push(a.command)}return r}function commandsDirty(e){for(var t=e._nodeCommands,i=t.length,r=!1,n=0;n<i;n++){var a=t[n];a.command.dirty&&(r=!(a.command.dirty=!1))}return r}function generateModelCommands(e,t){e._drawCommands=[];var i=getModelCommands(e._model);t?createCommands$3(e,i):(createCommandsNonInstanced(e,i),updateCommandsNonInstanced(e))}function updateShadows$1(e,t){if(e.shadows!==e._shadows||t){e._shadows=e.shadows;for(var i=ShadowMode$1.castShadows(e.shadows),r=ShadowMode$1.receiveShadows(e.shadows),n=e._drawCommands,a=n.length,o=0;o<a;++o){var s=n[o];s.castShadows=i,s.receiveShadows=r}}}function Instanced3DModel3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._modelInstanceCollection=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,initialize$5(this,r,n)}function getPickIdCallback$1(e){return function(){return e._batchTable.getPickId()}}ModelInstanceCollection.prototype.expandBoundingSphere=function(e){e=Matrix4.getTranslation(e,scratchCartesian$2),BoundingSphere.expand(this._boundingSphere,e,this._boundingSphere)},ModelInstanceCollection.prototype.update=function(e){if(e.mode!==SceneMode$1.MORPHING&&this.show&&0!==this.length){var t,i=e.context;this._state===LoadState.NEEDS_LOAD&&(this._state=LoadState.LOADING,this._instancingSupported=i.instancedArrays,createModel(this,i),(t=this)._model.readyPromise.otherwise((function(e){t._state=LoadState.FAILED,t._readyPromise.reject(e)})));var r=this._instancingSupported,n=this._model;if(n.imageBasedLightingFactor=this.imageBasedLightingFactor,n.lightColor=this.lightColor,n.luminanceAtZenith=this.luminanceAtZenith,n.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,n.specularEnvironmentMaps=this.specularEnvironmentMaps,n.update(e),n.ready&&this._state===LoadState.LOADING){this._state=LoadState.LOADED,this._ready=!0;var a=n.boundingSphere.radius+Cartesian3.magnitude(n.boundingSphere.center);return this._boundingSphere.radius+=a,this._modelCommands=getModelCommands(n),generateModelCommands(this,r),void this._readyPromise.resolve(this)}if(this._state===LoadState.LOADED){var o=e.mode!==this._mode;i=this.modelMatrix,a=!Matrix4.equals(this._modelMatrix,i);(o||a)&&(this._mode=e.mode,Matrix4.clone(i,this._modelMatrix),s=Matrix4.multiplyByTranslation(this._modelMatrix,this._center,this._rtcTransform),this._mode!==SceneMode$1.SCENE3D&&(s=Transforms.basisTo2D(e.mapProjection,s,s)),Matrix4.getTranslation(s,this._boundingSphere.center)),r&&this._dirty&&(this._dynamic=!0,this._dirty=!1,updateVertexBuffer(this));var s=commandsDirty(n);if(s&&generateModelCommands(this,r),!r&&(n.dirty||this._dirty||o||a)&&updateCommandsNonInstanced(this),updateShadows$1(this,s),updateWireframe$2(this,s),updateBackFaceCulling$1(this,s),updateShowBoundingVolume$1(this,s),(s=e.passes).render||s.pick)for(var l=e.commandList,c=this._drawCommands,u=c.length,d=0;d<u;++d)l.push(c[d])}}},ModelInstanceCollection.prototype.isDestroyed=function(){return!1},ModelInstanceCollection.prototype.destroy=function(){this._model=this._model&&this._model.destroy();var e=this._pickIds;if(defined(e))for(var t=e.length,i=0;i<t;++i)e[i].destroy();return destroyObject(this)},Instanced3DModel3DTileContent._deprecationWarning=deprecationWarning,Object.defineProperties(Instanced3DModel3DTileContent.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){var e=this._modelInstanceCollection._model;return defined(e)?e.trianglesLength:0}},geometryByteLength:{get:function(){var e=this._modelInstanceCollection._model;return defined(e)?e.geometryByteLength:0}},texturesByteLength:{get:function(){var e=this._modelInstanceCollection._model;return defined(e)?e.texturesByteLength:0}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._modelInstanceCollection.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var sizeOfUint32$6=Uint32Array.BYTES_PER_ELEMENT,propertyScratch1=new Array(4),propertyScratch2=new Array(4);function initialize$5(e,t,i){var r=defaultValue(i,0);i=r;var n=new Uint8Array(t),a=new DataView(t);i+=sizeOfUint32$6;var o=a.getUint32(i,!0);if(1!==o)throw new RuntimeError("Only Instanced 3D Model version 1 is supported. Version "+o+" is not.");i+=sizeOfUint32$6;var s=a.getUint32(i,!0);i+=sizeOfUint32$6;var l=a.getUint32(i,!0);if(0===l)throw new RuntimeError("featureTableJsonByteLength is zero, the feature table must be defined.");i+=sizeOfUint32$6;var c=a.getUint32(i,!0);i+=sizeOfUint32$6;var u=a.getUint32(i,!0);i+=sizeOfUint32$6;var d=a.getUint32(i,!0);if(i+=sizeOfUint32$6,1!==(o=a.getUint32(i,!0))&&0!==o)throw new RuntimeError("Only glTF format 0 (uri) or 1 (embedded) are supported. Format "+o+" is not.");a=getStringFromTypedArray(n,i+=sizeOfUint32$6,l),a=JSON.parse(a),i+=l,l=new Uint8Array(t,i,c),i+=c;var h,p,f=new Cesium3DTileFeatureTable(a,l),m=f.getGlobalProperty("INSTANCES_LENGTH");if(!defined(f.featuresLength=m))throw new RuntimeError("Feature table global property: INSTANCES_LENGTH must be defined");if(0<u&&(p=getStringFromTypedArray(n,i,u),p=JSON.parse(p),i+=u,0<d&&(h=new Uint8Array(t,i,d),h=new Uint8Array(h),i+=d)),e._batchTable=new Cesium3DTileBatchTable(e,m,p,h),0==(s=r+s-i))throw new RuntimeError("glTF byte length is zero, i3dm must have a glTF to instance.");i=i%4==0?new Uint8Array(t,i,s):(Instanced3DModel3DTileContent._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),new Uint8Array(n.subarray(i,i+s))),s=e._tileset,s={instances:new Array(m),batchTable:e._batchTable,cull:!1,url:void 0,requestType:RequestType$1.TILES3D,gltf:void 0,basePath:void 0,incrementallyLoadTextures:!1,upAxis:s._gltfUpAxis,forwardAxis:Axis$1.X,opaquePass:Pass$1.CESIUM_3D_TILE,pickIdLoaded:getPickIdCallback$1(e),imageBasedLightingFactor:s.imageBasedLightingFactor,lightColor:s.lightColor,luminanceAtZenith:s.luminanceAtZenith,sphericalHarmonicCoefficients:s.sphericalHarmonicCoefficients,specularEnvironmentMaps:s.specularEnvironmentMaps,backFaceCulling:s.backFaceCulling},0===o?(o=(o=getStringFromTypedArray(i)).replace(/[\s\0]+$/,""),s.url=e._resource.getDerivedResource({url:o})):(s.gltf=i,s.basePath=e._resource.clone());var g,y=f.getGlobalProperty("EAST_NORTH_UP");defined(i=f.getGlobalProperty("RTC_CENTER",ComponentDatatype$1.FLOAT,3))&&(g=Cartesian3.unpack(i));for(var _=s.instances,v=new Cartesian3,C=new Array(3),x=new Cartesian3,b=new Cartesian3,S=new Cartesian3,T=new Matrix3,E=new Quaternion,w=new Cartesian3,A=new TranslationRotationScale,P=new Matrix4,D=0;D<m;D++){var M=f.getProperty("POSITION",ComponentDatatype$1.FLOAT,3,D,propertyScratch1);if(!defined(M)){M=C;var I=f.getProperty("POSITION_QUANTIZED",ComponentDatatype$1.UNSIGNED_SHORT,3,D,propertyScratch1);if(!defined(I))throw new RuntimeError("Either POSITION or POSITION_QUANTIZED must be defined for each instance.");var R=f.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",ComponentDatatype$1.FLOAT,3);if(!defined(R))throw new RuntimeError("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var O=f.getGlobalProperty("QUANTIZED_VOLUME_SCALE",ComponentDatatype$1.FLOAT,3);if(!defined(O))throw new RuntimeError("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var L=0;L<3;L++)M[L]=I[L]/65535*O[L]+R[L]}Cartesian3.unpack(M,0,v),defined(g)&&Cartesian3.add(v,g,v),A.translation=v;var N=f.getProperty("NORMAL_UP",ComponentDatatype$1.FLOAT,3,D,propertyScratch1),F=f.getProperty("NORMAL_RIGHT",ComponentDatatype$1.FLOAT,3,D,propertyScratch2),B=!1;if(defined(N)){if(!defined(F))throw new RuntimeError("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");Cartesian3.unpack(N,0,b),Cartesian3.unpack(F,0,x),B=!0}else{F=f.getProperty("NORMAL_UP_OCT32P",ComponentDatatype$1.UNSIGNED_SHORT,2,D,propertyScratch1);var V=f.getProperty("NORMAL_RIGHT_OCT32P",ComponentDatatype$1.UNSIGNED_SHORT,2,D,propertyScratch2);if(defined(F)){if(!defined(V))throw new RuntimeError("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");AttributeCompression.octDecodeInRange(F[0],F[1],65535,b),AttributeCompression.octDecodeInRange(V[0],V[1],65535,x),B=!0}else y?(Transforms.eastNorthUpToFixedFrame(v,Ellipsoid.WGS84,P),Matrix4.getMatrix3(P,T)):Matrix3.clone(Matrix3.IDENTITY,T)}B&&(Cartesian3.cross(x,b,S),Cartesian3.normalize(S,S),Matrix3.setColumn(T,0,x,T),Matrix3.setColumn(T,1,b,T),Matrix3.setColumn(T,2,S,T)),Quaternion.fromRotationMatrix(T,E),A.rotation=E,w=Cartesian3.fromElements(1,1,1,w),defined(V=f.getProperty("SCALE",ComponentDatatype$1.FLOAT,1,D))&&Cartesian3.multiplyByScalar(w,V,w),defined(B=f.getProperty("SCALE_NON_UNIFORM",ComponentDatatype$1.FLOAT,3,D,propertyScratch1))&&(w.x*=B[0],w.y*=B[1],w.z*=B[2]),A.scale=w,defined(V=f.getProperty("BATCH_ID",ComponentDatatype$1.UNSIGNED_SHORT,1,D))||(V=D),Matrix4.fromTranslationRotationScale(A,P),B=P.clone(),_[D]={modelMatrix:B,batchId:V}}e._modelInstanceCollection=new ModelInstanceCollection(s),e._modelInstanceCollection.readyPromise.then((function(e){e.activeAnimations.addAll({loop:ModelAnimationLoop$1.REPEAT})}))}function createFeatures$2(e){var t=e.featuresLength;if(!defined(e._features)&&0<t){for(var i=new Array(t),r=0;r<t;++r)i[r]=new Cesium3DTileFeature(e,r);e._features=i}}Instanced3DModel3DTileContent.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Instanced3DModel3DTileContent.prototype.getFeature=function(e){return this.featuresLength,createFeatures$2(this),this._features[e]},Instanced3DModel3DTileContent.prototype.applyDebugSettings=function(e,t){t=e?t:Color.WHITE,this._batchTable.setAllColor(t)},Instanced3DModel3DTileContent.prototype.applyStyle=function(e){this._batchTable.applyStyle(e)},Instanced3DModel3DTileContent.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._modelInstanceCollection.modelMatrix=this._tile.computedTransform,this._modelInstanceCollection.shadows=this._tileset.shadows,this._modelInstanceCollection.lightColor=this._tileset.lightColor,this._modelInstanceCollection.luminanceAtZenith=this._tileset.luminanceAtZenith,this._modelInstanceCollection.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._modelInstanceCollection.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._modelInstanceCollection.backFaceCulling=this._tileset.backFaceCulling,this._modelInstanceCollection.debugWireframe=this._tileset.debugWireframe;var r=this._modelInstanceCollection._model;defined(r)&&(e=this._tileset.clippingPlanes,r.referenceMatrix=this._tileset.clippingPlanesOriginMatrix,defined(e)&&this._tile.clippingPlanesDirty&&(r._clippingPlanes=e.enabled&&this._tile._isClipped?e:void 0),defined(e)&&defined(r._clippingPlanes)&&r._clippingPlanes!==e&&(r._clippingPlanes=e)),this._modelInstanceCollection.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&this._batchTable.addDerivedCommands(t,i,!1)},Instanced3DModel3DTileContent.prototype.isDestroyed=function(){return!1},Instanced3DModel3DTileContent.prototype.destroy=function(){return this._modelInstanceCollection=this._modelInstanceCollection&&this._modelInstanceCollection.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)};var Cesium3DTileRefine={ADD:0,REPLACE:1},Cesium3DTileRefine$1=Object.freeze(Cesium3DTileRefine),DecodingState={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function PointCloud(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=Color.clone(Color.DARKGRAY),this._highlightColor=Color.clone(Color.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=DecodingState.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._readyPromise=when.defer(),this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=defaultValue(e.opaquePass,Pass$1.OPAQUE),this._cull=defaultValue(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this._modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this.time=0,this.shadows=ShadowMode$1.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,initialize$6(this,e)}Object.defineProperties(PointCloud.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},color:{get:function(){return Color.clone(this._highlightColor)},set:function(e){this._highlightColor=Color.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(defined(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=BoundingSphere.clone(e,this._boundingSphere)}}});var sizeOfUint32$7=Uint32Array.BYTES_PER_ELEMENT;function initialize$6(e,t){var i=t.arrayBuffer,r=defaultValue(t.byteOffset,0),n=new Uint8Array(i),a=new DataView(i);r+=sizeOfUint32$7;var o=a.getUint32(r,!0);if(1!==o)throw new RuntimeError("Only Point Cloud tile version 1 is supported.  Version "+o+" is not.");if(r+=sizeOfUint32$7,r+=sizeOfUint32$7,0===(b=a.getUint32(r,!0)))throw new RuntimeError("Feature table must have a byte length greater than zero");r+=sizeOfUint32$7;var s=a.getUint32(r,!0);r+=sizeOfUint32$7;var l=a.getUint32(r,!0);r+=sizeOfUint32$7;var c=a.getUint32(r,!0),u=getStringFromTypedArray(n,r+=sizeOfUint32$7,b),d=JSON.parse(u);r+=b;var h,p,f,m,g,y,_=new Uint8Array(i,r,s);if(r+=s,0<l&&(S=getStringFromTypedArray(n,r,l),p=JSON.parse(S),r+=l,0<c&&(h=new Uint8Array(i,r,c))),o=(t=new Cesium3DTileFeatureTable(d,_)).getGlobalProperty("POINTS_LENGTH"),!defined(t.featuresLength=o))throw new RuntimeError("Feature table global property: POINTS_LENGTH must be defined");defined(a=t.getGlobalProperty("RTC_CENTER",ComponentDatatype$1.FLOAT,3))&&(e._rtcCenter=Cartesian3.unpack(a));u=!1;var v,C,x,b=!1,S=(s=!1,n=!1,!1);l=!1,i=!1,c=!1,r=defined(d.extensions)?d.extensions["3DTILES_draco_point_compression"]:void 0,a=defined(p)&&defined(p.extensions)?p.extensions["3DTILES_draco_point_compression"]:void 0;if(defined(a)&&(E=a.properties),defined(r)){v=r.properties;a=r.byteOffset;var T=r.byteLength;if(!defined(v)||!defined(a)||!defined(T))throw new RuntimeError("Draco properties, byteOffset, and byteLength must be defined");T=arraySlice(_,a,a+T),u=defined(v.POSITION),b=defined(v.RGB)||defined(v.RGBA),s=defined(v.NORMAL),n=defined(v.BATCH_ID),l=defined(v.RGBA),e._decodingState=DecodingState.NEEDS_DECODE}if(defined(T)&&(C={buffer:T,featureTableProperties:v,batchTableProperties:E,properties:combine(v,E),dequantizeInShader:e._dequantizeInShader}),!u)if(defined(d.POSITION))f=t.getPropertyArray("POSITION",ComponentDatatype$1.FLOAT,3),u=!0;else if(defined(d.POSITION_QUANTIZED)){f=t.getPropertyArray("POSITION_QUANTIZED",ComponentDatatype$1.UNSIGNED_SHORT,3),u=S=!0;var E=t.getGlobalProperty("QUANTIZED_VOLUME_SCALE",ComponentDatatype$1.FLOAT,3);if(!defined(E))throw new RuntimeError("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(e._quantizedVolumeScale=Cartesian3.unpack(E),e._quantizedRange=65535,!defined(E=t.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",ComponentDatatype$1.FLOAT,3)))throw new RuntimeError("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e._quantizedVolumeOffset=Cartesian3.unpack(E)}if(b||(defined(d.RGBA)?(m=t.getPropertyArray("RGBA",ComponentDatatype$1.UNSIGNED_BYTE,4),b=l=!0):defined(d.RGB)?(m=t.getPropertyArray("RGB",ComponentDatatype$1.UNSIGNED_BYTE,3),b=!0):defined(d.RGB565)&&(m=t.getPropertyArray("RGB565",ComponentDatatype$1.UNSIGNED_SHORT,1),b=i=!0)),s||(defined(d.NORMAL)?(g=t.getPropertyArray("NORMAL",ComponentDatatype$1.FLOAT,3),s=!0):defined(d.NORMAL_OCT16P)&&(g=t.getPropertyArray("NORMAL_OCT16P",ComponentDatatype$1.UNSIGNED_BYTE,2),s=c=!0)),n||defined(d.BATCH_ID)&&(y=t.getPropertyArray("BATCH_ID",ComponentDatatype$1.UNSIGNED_SHORT,1),n=!0),!u)throw new RuntimeError("Either POSITION or POSITION_QUANTIZED must be defined.");if(defined(d.CONSTANT_RGBA)&&(d=t.getGlobalProperty("CONSTANT_RGBA",ComponentDatatype$1.UNSIGNED_BYTE,4),e._constantColor=Color.fromBytes(d[0],d[1],d[2],d[3],e._constantColor)),n){if(!defined(t=t.getGlobalProperty("BATCH_LENGTH")))throw new RuntimeError("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");defined(h)&&(h=new Uint8Array(h)),defined(e._batchTableLoaded)&&e._batchTableLoaded(t,p,h)}!n&&defined(h)&&(x=Cesium3DTileBatchTable.getBinaryProperties(o,p,h)),e._parsedContent={positions:f,colors:m,normals:g,batchIds:y,styleableProperties:x,draco:C},e._pointsLength=o,e._isQuantized=S,e._isOctEncoded16P=c,e._isRGB565=i,e._isTranslucent=l,e._hasColors=b,e._hasNormals=s,e._hasBatchIds=n}var scratchMin$2=new Cartesian3,scratchMax$2=new Cartesian3,scratchPosition$6=new Cartesian3,randomValues;function getRandomValues(e){if(!defined(randomValues)){CesiumMath.setRandomNumberSeed(0),randomValues=new Array(e);for(var t=0;t<e;++t)randomValues[t]=CesiumMath.nextRandomNumber()}return randomValues}function computeApproximateBoundingSphereFromPositions(e){for(var t=e.length/3,i=Math.min(t,20),r=getRandomValues(20),n=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=Cartesian3.fromElements(n,n,n,scratchMin$2),s=Cartesian3.fromElements(a,a,a,scratchMax$2),l=0;l<i;++l){var c=Math.floor(r[l]*t);c=Cartesian3.unpack(e,3*c,scratchPosition$6);Cartesian3.minimumByComponent(o,c,o),Cartesian3.maximumByComponent(s,c,s)}return(a=BoundingSphere.fromCornerPoints(o,s)).radius+=CesiumMath.EPSILON2,a}function prepareVertexAttribute(e,t){var i=ComponentDatatype$1.fromTypedArray(e);return i===ComponentDatatype$1.INT||i===ComponentDatatype$1.UNSIGNED_INT||i===ComponentDatatype$1.DOUBLE?(oneTimeWarning("Cast pnts property to floats",'Point cloud property "'+t+'" will be casted to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.'),new Float32Array(e)):e}var scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier=new Cartesian4,scratchQuantizedVolumeScaleAndOctEncodedRange=new Cartesian4,scratchColor$5=new Color,positionLocation=0,colorLocation=1,normalLocation=2,batchIdLocation=3,numberOfAttributes=4,scratchClippingPlanesMatrix$1=new Matrix4,scratchInverseTransposeClippingPlanesMatrix=new Matrix4;function createResources$2(e,t){var i=t.context,r=e._parsedContent,n=e._pointsLength,a=r.positions,o=r.colors,s=r.normals,l=r.batchIds,c=r.styleableProperties,u=defined(c),d=e._isQuantized,h=e._isQuantizedDraco,p=e._isOctEncoded16P,f=e._isOctEncodedDraco,m=e._quantizedRange,g=e._octEncodedRange,y=e._isRGB565,_=e._isTranslucent,v=e._hasColors,C=e._hasNormals,x=(t=e._hasBatchIds,[]),b={};if(e._styleableShaderAttributes=b,u){var S,T,E,w,A,P=numberOfAttributes;for(S in c)c.hasOwnProperty(S)&&(A=prepareVertexAttribute((T=c[S]).typedArray,S),E=T.componentCount,w=ComponentDatatype$1.fromTypedArray(A),A=Buffer$1.createVertexBuffer({context:i,typedArray:A,usage:BufferUsage$1.STATIC_DRAW}),e._geometryByteLength+=A.sizeInBytes,A={index:P,vertexBuffer:A,componentsPerAttribute:E,componentDatatype:w,normalize:!1,offsetInBytes:0,strideInBytes:0},x.push(A),b[S]={location:P,componentCount:E},++P)}var D,M,I;r=Buffer$1.createVertexBuffer({context:i,typedArray:a,usage:BufferUsage$1.STATIC_DRAW});e._geometryByteLength+=r.sizeInBytes,v&&(D=Buffer$1.createVertexBuffer({context:i,typedArray:o,usage:BufferUsage$1.STATIC_DRAW}),e._geometryByteLength+=D.sizeInBytes),C&&(M=Buffer$1.createVertexBuffer({context:i,typedArray:s,usage:BufferUsage$1.STATIC_DRAW}),e._geometryByteLength+=M.sizeInBytes),t&&(l=prepareVertexAttribute(l,"batchIds"),I=Buffer$1.createVertexBuffer({context:i,typedArray:l,usage:BufferUsage$1.STATIC_DRAW}),e._geometryByteLength+=I.sizeInBytes),s=[],w=d?ComponentDatatype$1.UNSIGNED_SHORT:h?m<=255?ComponentDatatype$1.UNSIGNED_BYTE:ComponentDatatype$1.UNSIGNED_SHORT:ComponentDatatype$1.FLOAT,s.push({index:positionLocation,vertexBuffer:r,componentsPerAttribute:3,componentDatatype:w,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(e._boundingSphere=d||h?BoundingSphere.fromCornerPoints(Cartesian3.ZERO,e._quantizedVolumeScale):computeApproximateBoundingSphereFromPositions(a)),v&&(y?s.push({index:colorLocation,vertexBuffer:D,componentsPerAttribute:1,componentDatatype:ComponentDatatype$1.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0}):(y=_?4:3,s.push({index:colorLocation,vertexBuffer:D,componentsPerAttribute:y,componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0}))),C&&(w=p?(E=2,ComponentDatatype$1.UNSIGNED_BYTE):f?(E=2,g<=255?ComponentDatatype$1.UNSIGNED_BYTE:ComponentDatatype$1.UNSIGNED_SHORT):(E=3,ComponentDatatype$1.FLOAT),s.push({index:normalLocation,vertexBuffer:M,componentsPerAttribute:E,componentDatatype:w,normalize:!1,offsetInBytes:0,strideInBytes:0})),t&&s.push({index:batchIdLocation,vertexBuffer:I,componentsPerAttribute:1,componentDatatype:ComponentDatatype$1.fromTypedArray(l),normalize:!1,offsetInBytes:0,strideInBytes:0}),u&&(s=s.concat(x)),u=new VertexArray({context:i,attributes:s}),s={depthTest:{enabled:!0}},e._opaquePass===Pass$1.CESIUM_3D_TILE&&(s.stencilTest=StencilConstants$1.setCesium3DTileBit(),s.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK),e._opaqueRenderState=RenderState.fromCache(s),e._translucentRenderState=RenderState.fromCache({depthTest:{enabled:!0},depthMask:!1,blending:BlendingState$1.ALPHA_BLEND}),e._drawCommand=new DrawCommand({boundingVolume:new BoundingSphere,cull:e._cull,modelMatrix:new Matrix4,primitiveType:PrimitiveType$1.POINTS,vertexArray:u,count:n,shaderProgram:void 0,uniformMap:void 0,renderState:_?e._translucentRenderState:e._opaqueRenderState,pass:_?Pass$1.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function createUniformMap$2(e,t){var i=t.context,r=e._isQuantized,n=e._isQuantizedDraco,a=e._isOctEncodedDraco,o={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){var r,n=scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier;return n.x=e._attenuation?e.maximumAttenuation:e._pointSize,n.x*=t.pixelRatio,n.y=e.time,e._attenuation&&(r=t.camera.frustum,r=t.mode===SceneMode$1.SCENE2D||r instanceof OrthographicFrustum?Number.POSITIVE_INFINITY:i.drawingBufferHeight/t.camera.frustum.sseDenominator,n.z=e.geometricError*e.geometricErrorScale,n.w=r),n},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){var t=e.clippingPlanes;return e.isClipped?t.texture:i.defaultTexture},u_clippingPlanesEdgeStyle:function(){var t=e.clippingPlanes;if(!defined(t))return Color.TRANSPARENT;var i=Color.clone(t.edgeColor,scratchColor$5);return i.alpha=t.edgeWidth,i},u_clippingPlanesMatrix:function(){var t=e.clippingPlanes;if(!defined(t))return Matrix4.IDENTITY;var r=defaultValue(e.clippingPlanesOriginMatrix,e._modelMatrix);return Matrix4.multiply(i.uniformState.view3D,r,scratchClippingPlanesMatrix$1),t=Matrix4.multiply(scratchClippingPlanesMatrix$1,t.modelMatrix,scratchClippingPlanesMatrix$1),Matrix4.inverseTranspose(t,scratchInverseTransposeClippingPlanesMatrix)}};(r||n||a)&&(o=combine(o,{u_quantizedVolumeScaleAndOctEncodedRange:function(){var t,i=scratchQuantizedVolumeScaleAndOctEncodedRange;return defined(e._quantizedVolumeScale)&&(t=Cartesian3.clone(e._quantizedVolumeScale,i),Cartesian3.divideByScalar(t,e._quantizedRange,i)),i.w=e._octEncodedRange,i}})),defined(e._uniformMapLoaded)&&(o=e._uniformMapLoaded(o)),e._drawCommand.uniformMap=o}function getStyleablePropertyIds(e,t){for(var i=/czm_3dtiles_property_(\d+)/g,r=i.exec(e);null!==r;){var n=parseInt(r[1]);-1===t.indexOf(n)&&t.push(n),r=i.exec(e)}}function getBuiltinPropertyNames(e,t){for(var i=/czm_3dtiles_builtin_property_(\w+)/g,r=i.exec(e);null!==r;){var n=r[1];-1===t.indexOf(n)&&t.push(n),r=i.exec(e)}}function getVertexAttribute(e,t){for(var i=e.numberOfAttributes,r=0;r<i;++r){var n=e.getAttribute(r);if(n.index===t)return n}}var builtinPropertyNameMap={POSITION:"czm_3dtiles_builtin_property_POSITION",POSITION_ABSOLUTE:"czm_3dtiles_builtin_property_POSITION_ABSOLUTE",COLOR:"czm_3dtiles_builtin_property_COLOR",NORMAL:"czm_3dtiles_builtin_property_NORMAL"};function modifyStyleFunction(e){return e.replace("()","(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)")}function createShaders$1(e,t,i){var r,n,a,o,s=t.context,l=defined(i),c=e._isQuantized,u=e._isQuantizedDraco,d=e._isOctEncoded16P,h=e._isOctEncodedDraco,p=e._isRGB565,f=e._isTranslucent,m=e._hasColors,g=e._hasNormals,y=e._hasBatchIds,_=e._backFaceCulling,v=e._normalShading,C=e._drawCommand.vertexArray,x=e.clippingPlanes,b=e._attenuation,S=f,T=clone(builtinPropertyNameMap),E={},w=e._styleableShaderAttributes;for(r in w)w.hasOwnProperty(r)&&(F=w[r],T[r]="czm_3dtiles_property_"+F.location,E[F.location]=F);l&&(M={translucent:!1},n=i.getColorShaderFunction("getColorFromStyle",T,M),a=i.getShowShaderFunction("getShowFromStyle",T,M),o=i.getPointSizeShaderFunction("getPointSizeFromStyle",T,M),defined(n)&&M.translucent&&(S=!0)),e._styleTranslucent=S;var A=defined(n),P=defined(a),D=(l=defined(o),i=e.isClipped,[]),M=[];A&&(getStyleablePropertyIds(n,D),getBuiltinPropertyNames(n,M),n=modifyStyleFunction(n)),P&&(getStyleablePropertyIds(a,D),getBuiltinPropertyNames(a,M),a=modifyStyleFunction(a)),l&&(getStyleablePropertyIds(o,D),getBuiltinPropertyNames(o,M),o=modifyStyleFunction(o));var I;S=0<=M.indexOf("COLOR");if((M=0<=M.indexOf("NORMAL"))&&!g)throw new RuntimeError("Style references the NORMAL semantic but the point cloud does not have normals");for(r in w)w.hasOwnProperty(r)&&(F=w[r],I=0<=D.indexOf(F.location),getVertexAttribute(C,F.location).enabled=I);S=m&&(!A||S),m&&(getVertexAttribute(C,colorLocation).enabled=S),M=g&&(v||_||M),g&&(getVertexAttribute(C,normalLocation).enabled=M);var R={a_position:positionLocation};S&&(R.a_color=colorLocation),M&&(R.a_normal=normalLocation),y&&(R.a_batchId=batchIdLocation);for(var O="",L=D.length,N=0;N<L;++N){var F,B,V;O+="attribute "+(V=1===(V=(F=E[B=D[N]]).componentCount)?"float":"vec"+V)+" "+(B="czm_3dtiles_property_"+B)+"; \n",R[B]=F.location}createUniformMap$2(e,t),t="attribute vec3 a_position; \nvarying vec4 v_color; \nuniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; \nuniform vec4 u_constantColor; \nuniform vec4 u_highlightColor; \n",t+="float u_pointSize; \nfloat u_time; \n",b&&(t+="float u_geometricError; \nfloat u_depthMultiplier; \n"),t+=O,S&&(t+=f?"attribute vec4 a_color; \n":p?"attribute float a_color; \nconst float SHIFT_RIGHT_11 = 1.0 / 2048.0; \nconst float SHIFT_RIGHT_5 = 1.0 / 32.0; \nconst float SHIFT_LEFT_11 = 2048.0; \nconst float SHIFT_LEFT_5 = 32.0; \nconst float NORMALIZE_6 = 1.0 / 64.0; \nconst float NORMALIZE_5 = 1.0 / 32.0; \n":"attribute vec3 a_color; \n"),M&&(t+=d||h?"attribute vec2 a_normal; \n":"attribute vec3 a_normal; \n"),y&&(t+="attribute float a_batchId; \n"),(c||u||h)&&(t+="uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; \n"),A&&(t+=n),P&&(t+=a),l&&(t+=o),t+="void main() \n{ \n    u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; \n    u_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; \n",b&&(t+="    u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; \n    u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; \n"),t+=S?f?"    vec4 color = a_color; \n":p?"    float compressed = a_color; \n    float r = floor(compressed * SHIFT_RIGHT_11); \n    compressed -= r * SHIFT_LEFT_11; \n    float g = floor(compressed * SHIFT_RIGHT_5); \n    compressed -= g * SHIFT_LEFT_5; \n    float b = compressed; \n    vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5); \n    vec4 color = vec4(rgb, 1.0); \n":"    vec4 color = vec4(a_color, 1.0); \n":"    vec4 color = u_constantColor; \n",t+=c||u?"    vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; \n":"    vec3 position = a_position; \n",t+="    vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); \n",M?(t+=d?"    vec3 normal = czm_octDecode(a_normal); \n":h?"    vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; \n":"    vec3 normal = a_normal; \n",t+="    vec3 normalEC = czm_normal * normal; \n"):t+="    vec3 normal = vec3(1.0); \n",A&&(t+="    color = getColorFromStyle(position, position_absolute, color, normal); \n"),P&&(t+="    float show = float(getShowFromStyle(position, position_absolute, color, normal)); \n"),t+=l?"    gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; \n":b?"    vec4 positionEC = czm_modelView * vec4(position, 1.0); \n    float depth = -positionEC.z; \n    gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); \n":"    gl_PointSize = u_pointSize; \n",t+="    color = color * u_highlightColor; \n",M&&v&&(t+="    float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); \n    diffuseStrength = max(diffuseStrength, 0.4); \n    color.xyz *= diffuseStrength * czm_lightColor; \n"),t+="    v_color = color; \n    gl_Position = czm_modelViewProjection * vec4(position, 1.0); \n",M&&_&&(t+="    float visible = step(-normalEC.z, 0.0); \n    gl_Position *= visible; \n    gl_PointSize *= visible; \n"),P&&(t+="    gl_Position.w *= float(show); \n    gl_PointSize *= float(show); \n"),t+="} \n",P="varying vec4 v_color; \n",i&&(P+="uniform highp sampler2D u_clippingPlanes; \nuniform mat4 u_clippingPlanesMatrix; \nuniform vec4 u_clippingPlanesEdgeStyle; \n",P+="\n",P+=getClippingFunction(x,s),P+="\n"),P+="void main() \n{ \n    gl_FragColor = czm_gammaCorrect(v_color); \n",i&&(P+=getClipAndStyleCode("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),P+="} \n",defined(e._vertexShaderLoaded)&&(t=e._vertexShaderLoaded(t)),defined(e._fragmentShaderLoaded)&&(P=e._fragmentShaderLoaded(P));var k=e._drawCommand;defined(k.shaderProgram)&&k.shaderProgram.destroy(),k.shaderProgram=ShaderProgram.fromCache({context:s,vertexShaderSource:t,fragmentShaderSource:P,attributeLocations:R});try{k.shaderProgram._bind()}catch(e){throw new RuntimeError("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function decodeDraco(e,t){return e._decodingState!==DecodingState.READY&&(e._decodingState===DecodingState.NEEDS_DECODE&&(i=e._parsedContent,r=i.draco,defined(t=DracoLoader.decodePointCloud(r,t))&&(e._decodingState=DecodingState.DECODING,t.then((function(t){e._decodingState=DecodingState.READY;var n,a=defined(t.POSITION)?t.POSITION.array:void 0,o=defined(t.RGB)?t.RGB.array:void 0,s=defined(t.RGBA)?t.RGBA.array:void 0,l=defined(t.NORMAL)?t.NORMAL.array:void 0,c=defined(t.BATCH_ID)?t.BATCH_ID.array:void 0,u=defined(a)&&defined(t.POSITION.data.quantization),d=defined(l)&&defined(t.NORMAL.data.quantization);u&&(u=(n=t.POSITION.data.quantization).range,e._quantizedVolumeScale=Cartesian3.fromElements(u,u,u),e._quantizedVolumeOffset=Cartesian3.unpack(n.minValues),e._quantizedRange=(1<<n.quantizationBits)-1,e._isQuantizedDraco=!0),d&&(e._octEncodedRange=(1<<t.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);var h,p,f=i.styleableProperties,m=r.batchTableProperties;for(h in m)m.hasOwnProperty(h)&&(p=t[h],defined(f)||(f={}),f[h]={typedArray:p.array,componentCount:p.data.componentsPerAttribute});i.positions=defaultValue(a,i.positions),i.colors=defaultValue(defaultValue(s,o),i.colors),i.normals=defaultValue(l,i.normals),i.batchIds=defaultValue(c,i.batchIds),i.styleableProperties=f})).otherwise((function(t){e._decodingState=DecodingState.FAILED,e._readyPromise.reject(t)})))),!0);var i,r}var scratchComputedTranslation$2=new Cartesian4,scratchScale$5=new Cartesian3;function attachTexture(e,t,i){(e=e._gl).framebufferTexture2D(e.FRAMEBUFFER,t,i._target,i._texture,0)}function attachRenderbuffer(e,t,i){(e=e._gl).framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,i._getRenderbuffer())}function Framebuffer(e){var t,i,r,n=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context._gl;if(this._gl=n,this._framebuffer=n.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=defaultValue(e.destroyAttachments,!0),defined(e.depthTexture)||defined(e.depthRenderbuffer),defined(e.depthStencilTexture)||defined(e.depthStencilRenderbuffer),this._bind(),defined(e.colorTextures))for(var a=e.colorTextures,o=this._colorTextures.length=this._activeColorAttachments.length=a.length,s=0;s<o;++s)t=a[s],attachTexture(this,r=this._gl.COLOR_ATTACHMENT0+s,t),this._activeColorAttachments[s]=r,this._colorTextures[s]=t;if(defined(e.colorRenderbuffers)){var l=e.colorRenderbuffers;for(o=this._colorRenderbuffers.length=this._activeColorAttachments.length=l.length,s=0;s<o;++s)i=l[s],attachRenderbuffer(this,r=this._gl.COLOR_ATTACHMENT0+s,i),this._activeColorAttachments[s]=r,this._colorRenderbuffers[s]=i}defined(e.depthTexture)&&(t=e.depthTexture,attachTexture(this,this._gl.DEPTH_ATTACHMENT,t),this._depthTexture=t),defined(e.depthRenderbuffer)&&(i=e.depthRenderbuffer,attachRenderbuffer(this,this._gl.DEPTH_ATTACHMENT,i),this._depthRenderbuffer=i),defined(e.stencilRenderbuffer)&&(i=e.stencilRenderbuffer,attachRenderbuffer(this,this._gl.STENCIL_ATTACHMENT,i),this._stencilRenderbuffer=i),defined(e.depthStencilTexture)&&(t=e.depthStencilTexture,attachTexture(this,this._gl.DEPTH_STENCIL_ATTACHMENT,t),this._depthStencilTexture=t),defined(e.depthStencilRenderbuffer)&&(i=e.depthStencilRenderbuffer,attachRenderbuffer(this,this._gl.DEPTH_STENCIL_ATTACHMENT,i),this._depthStencilRenderbuffer=i),this._unBind()}PointCloud.prototype.update=function(e){var t,i,r,n;decodeDraco(this,e.context)||(n=!1,r=!Matrix4.equals(this._modelMatrix,this.modelMatrix),this._mode!==e.mode&&(this._mode=e.mode,r=!0),defined(this._drawCommand)||(createResources$2(this,e),n=r=!0,this._ready=!0,this._readyPromise.resolve(this),this._parsedContent=void 0),r&&(Matrix4.clone(this.modelMatrix,this._modelMatrix),r=this._drawCommand.modelMatrix,Matrix4.clone(this._modelMatrix,r),defined(this._rtcCenter)&&Matrix4.multiplyByTranslation(r,this._rtcCenter,r),defined(this._quantizedVolumeOffset)&&Matrix4.multiplyByTranslation(r,this._quantizedVolumeOffset,r),e.mode!==SceneMode$1.SCENE3D&&(i=e.mapProjection,t=Matrix4.getColumn(r,3,scratchComputedTranslation$2),Cartesian4.equals(t,Cartesian4.UNIT_W)||Transforms.basisTo2D(i,r,r)),t=this._drawCommand.boundingVolume,BoundingSphere.clone(this._boundingSphere,t),this._cull&&(i=t.center,Matrix4.multiplyByPoint(r,i,i),r=Matrix4.getScale(r,scratchScale$5),t.radius*=Cartesian3.maximumComponent(r))),this.clippingPlanesDirty&&(n=!(this.clippingPlanesDirty=!1)),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,n=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,n=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,n=!0),this._style===this.style&&!this.styleDirty||(this._style=this.style,n=!(this.styleDirty=!1)),n&&createShaders$1(this,e,this._style),this._drawCommand.castShadows=ShadowMode$1.castShadows(this.shadows),this._drawCommand.receiveShadows=ShadowMode$1.receiveShadows(this.shadows),n=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent,this._drawCommand.renderState=n?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=n?Pass$1.TRANSLUCENT:this._opaquePass,n=e.commandList,((e=e.passes).render||e.pick)&&n.push(this._drawCommand))},PointCloud.prototype.isDestroyed=function(){return!1},PointCloud.prototype.destroy=function(){var e=this._drawCommand;return defined(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),destroyObject(this)},Object.defineProperties(Framebuffer.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),Framebuffer.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},Framebuffer.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},Framebuffer.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},Framebuffer.prototype.getColorTexture=function(e){return this._colorTextures[e]},Framebuffer.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]},Framebuffer.prototype.isDestroyed=function(){return!1},Framebuffer.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,i=t.length;e<i;++e){var r=t[e];defined(r)&&r.destroy()}var n=this._colorRenderbuffers;for(i=n.length,e=0;e<i;++e){var a=n[e];defined(a)&&a.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),destroyObject(this)};var PointCloudEyeDomeLightingShader="#extension GL_EXT_frag_depth : enable\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec2 u_distanceAndEdlStrength;\nvarying vec2 v_textureCoordinates;\nvec2 neighborContribution(float log2Depth, vec2 offset)\n{\nfloat dist = u_distanceAndEdlStrength.x;\nvec2 texCoordOrig = v_textureCoordinates + offset * dist;\nvec2 texCoord0 = v_textureCoordinates + offset * floor(dist);\nvec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);\nfloat depthOrLogDepth0 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord0));\nfloat depthOrLogDepth1 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord1));\nif (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {\nreturn vec2(0.0);\n}\nfloat depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, v_textureCoordinates));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 0.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\nvec2 texelSize = 1.0 / czm_viewport.zw;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));\nresponseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));\nfloat response = responseAndCount.x / responseAndCount.y;\nfloat strength = u_distanceAndEdlStrength.y;\nfloat shade = exp(-response * 300.0 * strength);\ncolor.rgb *= shade;\ngl_FragColor = vec4(color);\ngl_FragDepthEXT = depthOrLogDepth;\n}\n";function PointCloudEyeDomeLighting(){this._framebuffer=void 0,this._colorGBuffer=void 0,this._depthGBuffer=void 0,this._depthTexture=void 0,this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}function destroyFramebuffer(e){var t=e._framebuffer;defined(t)&&(e._colorGBuffer.destroy(),e._depthGBuffer.destroy(),e._depthTexture.destroy(),t.destroy(),e._framebuffer=void 0,e._colorGBuffer=void 0,e._depthGBuffer=void 0,e._depthTexture=void 0,e._drawCommand=void 0,e._clearCommand=void 0)}function createFramebuffer(e,t){var i=t.drawingBufferWidth,r=new Texture({context:t,width:i,height:a=t.drawingBufferHeight,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),n=new Texture({context:t,width:i,height:a,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),a=new Texture({context:t,width:i,height:a,pixelFormat:PixelFormat$1.DEPTH_COMPONENT,pixelDatatype:PixelDatatype$1.UNSIGNED_INT,sampler:Sampler.NEAREST});e._framebuffer=new Framebuffer({context:t,colorTextures:[r,n],depthTexture:a,destroyAttachments:!1}),e._colorGBuffer=r,e._depthGBuffer=n,e._depthTexture=a}var distanceAndEdlStrengthScratch=new Cartesian2;function createCommands$4(e,t){var i=new ShaderSource({defines:["LOG_DEPTH_WRITE"],sources:[PointCloudEyeDomeLightingShader]}),r={u_pointCloud_colorGBuffer:function(){return e._colorGBuffer},u_pointCloud_depthGBuffer:function(){return e._depthGBuffer},u_distanceAndEdlStrength:function(){return distanceAndEdlStrengthScratch.x=e._radius,distanceAndEdlStrengthScratch.y=e._strength,distanceAndEdlStrengthScratch}},n=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:StencilConstants$1.setCesium3DTileBit(),stencilMask:StencilConstants$1.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(i,{uniformMap:r,renderState:n,pass:Pass$1.CESIUM_3D_TILE,owner:e}),e._clearCommand=new ClearCommand({framebuffer:e._framebuffer,color:new Color(0,0,0,0),depth:1,renderState:RenderState.fromCache(),pass:Pass$1.CESIUM_3D_TILE,owner:e})}function createResources$3(e,t){var i=t.drawingBufferWidth,r=t.drawingBufferHeight,n=e._colorGBuffer,a=!1;r=defined(n)&&(n.width!==i||n.height!==r);return defined(n)&&!r||(destroyFramebuffer(e),createFramebuffer(e,t),createCommands$4(e,t),a=!0),a}function isSupported(e){return e.drawBuffers&&e.fragmentDepth}function getECShaderProgram(e,t){var i,r,n=e.shaderCache.getDerivedShaderProgram(t,"EC");return defined(n)||(i=t._attributeLocations,(r=t.fragmentShaderSource.clone()).sources=r.sources.map((function(e){return(e=ShaderSource.replaceMain(e,"czm_point_cloud_post_process_main")).replace(/gl_FragColor/g,"gl_FragData[0]")})),r.sources.unshift("#extension GL_EXT_draw_buffers : enable \n"),r.sources.push("void main() \n{ \n    czm_point_cloud_post_process_main(); \n#ifdef LOG_DEPTH\n    czm_writeLogDepth();\n    gl_FragData[1] = czm_packDepth(gl_FragDepthEXT); \n#else\n    gl_FragData[1] = czm_packDepth(gl_FragCoord.z);\n#endif\n}"),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:i})),n}function PointCloudShading(e){e=defaultValue(e,{}),this.attenuation=defaultValue(e.attenuation,!1),this.geometricErrorScale=defaultValue(e.geometricErrorScale,1),this.maximumAttenuation=e.maximumAttenuation,this.baseResolution=e.baseResolution,this.eyeDomeLighting=defaultValue(e.eyeDomeLighting,!0),this.eyeDomeLightingStrength=defaultValue(e.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=defaultValue(e.eyeDomeLightingRadius,1),this.backFaceCulling=defaultValue(e.backFaceCulling,!1),this.normalShading=defaultValue(e.normalShading,!0)}function PointCloud3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._pickId=void 0,this._batchTable=void 0,this._styleDirty=!1,this._features=void 0,this.featurePropertiesDirty=!1,this._pointCloud=new PointCloud({arrayBuffer:r,byteOffset:n,cull:!1,opaquePass:Pass$1.CESIUM_3D_TILE,vertexShaderLoaded:getVertexShaderLoaded(this),fragmentShaderLoaded:getFragmentShaderLoaded(this),uniformMapLoaded:getUniformMapLoaded(this),batchTableLoaded:getBatchTableLoaded(this),pickIdLoaded:getPickIdLoaded(this)})}function getVertexShaderLoaded(e){return function(t){return defined(e._batchTable)?e._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(t):t}}function getFragmentShaderLoaded(e){return function(t){return defined(e._batchTable)?e._batchTable.getFragmentShaderCallback(!1,void 0)(t):"uniform vec4 czm_pickColor;\n"+t}}function getUniformMapLoaded(e){return function(t){return defined(e._batchTable)?e._batchTable.getUniformMapCallback()(t):combine(t,{czm_pickColor:function(){return e._pickId.color}})}}function getBatchTableLoaded(e){return function(t,i,r){e._batchTable=new Cesium3DTileBatchTable(e,t,i,r)}}function getPickIdLoaded(e){return function(){return defined(e._batchTable)?e._batchTable.getPickId():"czm_pickColor"}}function getGeometricError(e){var t=e._tileset.pointCloudShading,i=e._tile.contentBoundingVolume.boundingSphere.volume();i=CesiumMath.cbrt(i/e.pointsLength);return 0===(e=e._tile.geometricError)&&(e=defined(t)&&defined(t.baseResolution)?t.baseResolution:i),e}function createFeatures$3(e){var t=e.featuresLength;if(!defined(e._features)&&0<t){for(var i=new Array(t),r=0;r<t;++r)i[r]=new Cesium3DTileFeature(e,r);e._features=i}}PointCloudEyeDomeLighting.isSupported=isSupported,PointCloudEyeDomeLighting.prototype.update=function(e,t,i,r){if(isSupported(e.context)){this._strength=i.eyeDomeLightingStrength,this._radius=i.eyeDomeLightingRadius*e.pixelRatio;for(var n=createResources$3(this,e.context),a=e.commandList,o=a.length,s=t;s<o;++s){var l,c=a[s];c.primitiveType===PrimitiveType$1.POINTS&&c.pass!==Pass$1.TRANSLUCENT&&(defined(l=c.derivedCommands.pointCloudProcessor)&&!c.dirty&&!n&&l.framebuffer===this._framebuffer||(l=DrawCommand.shallowClone(c),(c.derivedCommands.pointCloudProcessor=l).framebuffer=this._framebuffer,l.shaderProgram=getECShaderProgram(e.context,c.shaderProgram),l.castShadows=!1,l.receiveShadows=!1),a[s]=l)}i=this._clearCommand,(t=this._drawCommand).boundingVolume=r,a.push(t),a.push(i)}},PointCloudEyeDomeLighting.prototype.isDestroyed=function(){return!1},PointCloudEyeDomeLighting.prototype.destroy=function(){return destroyFramebuffer(this),destroyObject(this)},PointCloudShading.isSupported=function(e){return PointCloudEyeDomeLighting.isSupported(e.context)},Object.defineProperties(PointCloud3DTileContent.prototype,{featuresLength:{get:function(){return defined(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return this._pointCloud.pointsLength}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this._pointCloud.geometryByteLength}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return defined(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._pointCloud.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}}),PointCloud3DTileContent.prototype.hasProperty=function(e,t){return!!defined(this._batchTable)&&this._batchTable.hasProperty(e,t)},PointCloud3DTileContent.prototype.getFeature=function(e){if(defined(this._batchTable))return this.featuresLength,createFeatures$3(this),this._features[e]},PointCloud3DTileContent.prototype.applyDebugSettings=function(e,t){this._pointCloud.color=e?t:Color.WHITE},PointCloud3DTileContent.prototype.applyStyle=function(e){defined(this._batchTable)?this._batchTable.applyStyle(e):this._styleDirty=!0};var defaultShading=new PointCloudShading;function Tileset3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=when.defer(),this.featurePropertiesDirty=!1,initialize$7(this,r,n)}function initialize$7(e,t,i){i=defaultValue(i,0);var r,n=getStringFromTypedArray(new Uint8Array(t),i);try{r=JSON.parse(n)}catch(t){return void e._readyPromise.reject(new RuntimeError("Invalid tile content."))}e._tileset.loadTileset(e._resource,r,e._tile),e._readyPromise.resolve(e)}function VertexArrayFacade(e,t,i,r){var n=VertexArrayFacade._verifyAttributes(t);i=defaultValue(i,0);for(var a,o,s,l=[],c={},u=n.length,d=0;d<u;++d){var h=n[d];h.vertexBuffer?l.push(h):(defined(a=c[o=h.usage])||(a=c[o]=[]),a.push(h))}function p(e,t){return ComponentDatatype$1.getSizeInBytes(t.componentDatatype)-ComponentDatatype$1.getSizeInBytes(e.componentDatatype)}for(o in this._allBuffers=[],c)c.hasOwnProperty(o)&&((a=c[o]).sort(p),s={vertexSizeInBytes:s=VertexArrayFacade._vertexSizeInBytes(a),vertexBuffer:void 0,usage:a[0].usage,needsCommit:!1,arrayBuffer:void 0,arrayViews:VertexArrayFacade._createArrayViews(a,s)},this._allBuffers.push(s));this._size=0,this._instanced=defaultValue(r,!1),this._precreated=l,this._context=e,this.writers=void 0,this.va=void 0,this.resize(i)}PointCloud3DTileContent.prototype.update=function(e,t){var i,r=this._pointCloud,n=defaultValue(e.pointCloudShading,defaultShading),a=this._tile,o=this._batchTable,s=t.mode,l=e.clippingPlanes;defined(this._pickId)||defined(o)||(this._pickId=t.context.createPickId({primitive:e,content:this})),defined(o)&&o.update(e,t),i=(defined(a._contentBoundingVolume)?s===SceneMode$1.SCENE3D?a._contentBoundingVolume:a._contentBoundingVolume2D:s===SceneMode$1.SCENE3D?a._boundingVolume:a._boundingVolume2D).boundingSphere,s=this._styleDirty,this._styleDirty=!1,r.clippingPlanesOriginMatrix=e.clippingPlanesOriginMatrix,r.style=defined(o)?void 0:e.style,r.styleDirty=s,r.modelMatrix=a.computedTransform,r.time=e.timeSinceLoad,r.shadows=e.shadows,r.boundingSphere=i,r.clippingPlanes=l,r.isClipped=defined(l)&&l.enabled&&a._isClipped,r.clippingPlanesDirty=a.clippingPlanesDirty,r.attenuation=n.attenuation,r.backFaceCulling=n.backFaceCulling,r.normalShading=n.normalShading,r.geometricError=getGeometricError(this),r.geometricErrorScale=n.geometricErrorScale,defined(n)&&defined(n.maximumAttenuation)?r.maximumAttenuation=n.maximumAttenuation:a.refine===Cesium3DTileRefine$1.ADD?r.maximumAttenuation=5:r.maximumAttenuation=e.maximumScreenSpaceError,r.update(t)},PointCloud3DTileContent.prototype.isDestroyed=function(){return!1},PointCloud3DTileContent.prototype.destroy=function(){return this._pickId=this._pickId&&this._pickId.destroy(),this._pointCloud=this._pointCloud&&this._pointCloud.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)},Object.defineProperties(Tileset3DTileContent.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}}}),Tileset3DTileContent.prototype.hasProperty=function(e,t){return!1},Tileset3DTileContent.prototype.getFeature=function(e){},Tileset3DTileContent.prototype.applyDebugSettings=function(e,t){},Tileset3DTileContent.prototype.applyStyle=function(e){},Tileset3DTileContent.prototype.update=function(e,t){},Tileset3DTileContent.prototype.isDestroyed=function(){return!1},Tileset3DTileContent.prototype.destroy=function(){return destroyObject(this)},VertexArrayFacade._verifyAttributes=function(e){for(var t=[],i=0;i<e.length;++i){var r={index:defaultValue((r=e[i]).index,i),enabled:defaultValue(r.enabled,!0),componentsPerAttribute:r.componentsPerAttribute,componentDatatype:defaultValue(r.componentDatatype,ComponentDatatype$1.FLOAT),normalize:defaultValue(r.normalize,!1),vertexBuffer:r.vertexBuffer,usage:defaultValue(r.usage,BufferUsage$1.STATIC_DRAW)};t.push(r)}for(var n=new Array(t.length),a=0;a<t.length;++a)n[t[a].index]=!0;return t},VertexArrayFacade._vertexSizeInBytes=function(e){for(var t=0,i=e.length,r=0;r<i;++r){var n=e[r];t+=n.componentsPerAttribute*ComponentDatatype$1.getSizeInBytes(n.componentDatatype)}var a=0<i?ComponentDatatype$1.getSizeInBytes(e[0].componentDatatype):0,o=0<a?t%a:0;return t+(0==o?0:a-o)},VertexArrayFacade._createArrayViews=function(e,t){for(var i=[],r=0,n=e.length,a=0;a<n;++a){var o=e[a],s=o.componentDatatype;i.push({index:o.index,enabled:o.enabled,componentsPerAttribute:o.componentsPerAttribute,componentDatatype:s,normalize:o.normalize,offsetInBytes:r,vertexSizeInComponentType:t/ComponentDatatype$1.getSizeInBytes(s),view:void 0}),r+=o.componentsPerAttribute*ComponentDatatype$1.getSizeInBytes(s)}return i},VertexArrayFacade.prototype.resize=function(e){this._size=e;var t=this._allBuffers;this.writers=[];for(var i=0,r=t.length;i<r;++i){var n=t[i];VertexArrayFacade._resize(n,this._size),VertexArrayFacade._appendWriters(this.writers,n)}destroyVA(this)},VertexArrayFacade._resize=function(e,t){if(0<e.vertexSizeInBytes){var i=new ArrayBuffer(t*e.vertexSizeInBytes);if(defined(e.arrayBuffer))for(var r=new Uint8Array(i),n=new Uint8Array(e.arrayBuffer),a=n.length,o=0;o<a;++o)r[o]=n[o];for(var s=e.arrayViews,l=s.length,c=0;c<l;++c){var u=s[c];u.view=ComponentDatatype$1.createArrayBufferView(u.componentDatatype,i,u.offsetInBytes)}e.arrayBuffer=i}};var createWriters=[function(e,t,i){return function(r,n){t[r*i]=n,e.needsCommit=!0}},function(e,t,i){return function(r,n,a){t[r*=i]=n,t[1+r]=a,e.needsCommit=!0}},function(e,t,i){return function(r,n,a,o){t[r*=i]=n,t[1+r]=a,t[2+r]=o,e.needsCommit=!0}},function(e,t,i){return function(r,n,a,o,s){t[r*=i]=n,t[1+r]=a,t[2+r]=o,t[3+r]=s,e.needsCommit=!0}}];function commit(e,t){if(t.needsCommit&&0<t.vertexSizeInBytes){t.needsCommit=!1;var i=t.vertexBuffer,r=e._size*t.vertexSizeInBytes,n=defined(i);if(!n||i.sizeInBytes<r)return n&&i.destroy(),t.vertexBuffer=Buffer$1.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),!(t.vertexBuffer.vertexArrayDestroyable=!1);t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}function subCommit(e,t,i){e.needsCommit&&0<e.vertexSizeInBytes&&(t=e.vertexSizeInBytes*t,i=e.vertexSizeInBytes*i,e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,t,i),t))}function destroyVA(e){var t=e.va;if(defined(t)){for(var i=t.length,r=0;r<i;++r)t[r].va.destroy();e.va=void 0}}VertexArrayFacade._appendWriters=function(e,t){for(var i=t.arrayViews,r=i.length,n=0;n<r;++n){var a=i[n];e[a.index]=createWriters[a.componentsPerAttribute-1](t,a.view,a.vertexSizeInComponentType)}},VertexArrayFacade.prototype.commit=function(e){var t,i=!1,r=this._allBuffers;for(c=0,u=r.length;c<u;++c)i=commit(this,t=r[c])||i;if(i||!defined(this.va)){destroyVA(this);for(var n=this.va=[],a=CesiumMath.SIXTY_FOUR_KILOBYTES-4,o=defined(e)&&!this._instanced?Math.ceil(this._size/a):1,s=0;s<o;++s){for(var l=[],c=0,u=r.length;c<u;++c){var d=s*((t=r[c]).vertexSizeInBytes*a);VertexArrayFacade._appendAttributes(l,t,d,this._instanced)}l=l.concat(this._precreated),n.push({va:new VertexArray({context:this._context,attributes:l,indexBuffer:e}),indicesCount:1.5*(s!==o-1?a:this._size%a)})}}},VertexArrayFacade._appendAttributes=function(e,t,i,r){for(var n=t.arrayViews,a=n.length,o=0;o<a;++o){var s=n[o];e.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:i+s.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:r?1:0})}},VertexArrayFacade.prototype.subCommit=function(e,t){for(var i=this._allBuffers,r=0,n=i.length;r<n;++r)subCommit(i[r],e,t)},VertexArrayFacade.prototype.endSubCommits=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t)e[t].needsCommit=!1},VertexArrayFacade.prototype.isDestroyed=function(){return!1},VertexArrayFacade.prototype.destroy=function(){for(var e=this._allBuffers,t=0,i=e.length;t<i;++t){var r=e[t];r.vertexBuffer=r.vertexBuffer&&r.vertexBuffer.destroy()}return destroyVA(this),destroyObject(this)};var BillboardCollectionFS="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\nuniform sampler2D u_atlas;\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\nvarying vec2 v_textureCoordinates;\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\nvec2 lookupVector = imageSize * (depthLookupST - adjustedST);\nlookupVector = v_rotationMatrix * lookupVector;\nvec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y));\nvec2 translation = v_originTextureCoordinateAndTranslate.zw;\nif (applyTranslate)\n{\ntranslation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n}\nvec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\nfloat logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st));\nif (logDepthOrDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n#ifdef SDF\nfloat getDistance(vec2 position)\n{\nreturn texture2D(u_atlas, position).r;\n}\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\nfloat distance = getDistance(position);\nif (outlineWidth > 0.0)\n{\nfloat outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\nfloat outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nvec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\nfloat alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\nreturn vec4(sdfColor.rgb, sdfColor.a * alpha);\n}\nelse\n{\nfloat alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\nreturn vec4(v_color.rgb, v_color.a * alpha);\n}\n}\n#endif\nvoid main()\n{\nvec4 color = texture2D(u_atlas, v_textureCoordinates);\n#ifdef SDF\nfloat outlineWidth = v_outlineWidth;\nvec4 outlineColor = v_outlineColor;\nfloat distance = getDistance(v_textureCoordinates);\n#ifdef GL_OES_standard_derivatives\nfloat smoothing = fwidth(distance);\nvec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\nvec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\nvec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\nvec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\ncolor = (center + color1 + color2 + color3 + color4)/5.0;\n#else\nfloat smoothing = 1.0/32.0;\ncolor = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\ncolor = czm_gammaCorrect(color);\n#else\ncolor = czm_gammaCorrect(color);\ncolor *= czm_gammaCorrect(v_color);\n#endif\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\n#ifdef VECTOR_TILE\ncolor *= u_highlightColor;\n#endif\ngl_FragColor = color;\n#ifdef LOG_DEPTH\nczm_writeLogDepth();\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat temp = v_compressed.y;\ntemp = temp * SHIFT_RIGHT1;\nfloat temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\nbool enableDepthTest = temp2 != 0.0;\nbool applyTranslate = floor(temp) != 0.0;\nif (enableDepthTest) {\ntemp = v_compressed.z;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\ntemp = v_compressed.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 imageSize;\nimageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\nimageSize.x = floor(temp);\nvec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\nadjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\nfloat epsilonEyeDepth = v_compressed.x + czm_epsilon1;\nfloat globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\nif (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n{\nfloat globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n{\nfloat globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize);\nif (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n{\ndiscard;\n}\n}\n}\n}\n#endif\n}\n",BillboardCollectionVS="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 compressedAttribute2;\nattribute vec4 eyeOffset;\nattribute vec4 scaleByDistance;\nattribute vec4 pixelOffsetScaleByDistance;\nattribute vec4 compressedAttribute3;\nattribute vec2 sdf;\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nattribute vec4 textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef VECTOR_TILE\nattribute float a_batchId;\n#endif\nvarying vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed;\nvarying mat2 v_rotationMatrix;\n#endif\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\nconst float UPPER_BOUND = 32768.0;\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\nvec2 halfSize = imageSize * scale * 0.5;\nhalfSize *= ((direction * 2.0) - 1.0);\nvec2 originTranslate = origin * abs(halfSize);\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nif (validAlignedAxis || rotation != 0.0)\n{\nfloat angle = rotation;\nif (validAlignedAxis)\n{\nvec4 projectedAlignedAxis = czm_modelViewProjection * vec4(alignedAxis, 0.0);\nangle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n}\nfloat cosTheta = cos(angle);\nfloat sinTheta = sin(angle);\nrotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\nhalfSize = rotationMatrix * halfSize;\n}\nelse\n{\nrotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n}\n#endif\nmpp = czm_metersPerPixel(positionEC);\npositionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\npositionEC.xy += (translate + pixelOffset) * mpp;\nreturn positionEC;\n}\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\nvec4 posWC = czm_eyeToWindowCoordinates(positionEC);\nfloat globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\nif (globeDepth == 0.0)\n{\nreturn 0.0;\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\nreturn eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\nvec3 positionHigh = positionHighAndScale.xyz;\nvec3 positionLow = positionLowAndRotation.xyz;\nfloat scale = positionHighAndScale.w;\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nfloat rotation = positionLowAndRotation.w;\n#else\nfloat rotation = 0.0;\n#endif\nfloat compressed = compressedAttribute0.x;\nvec2 pixelOffset;\npixelOffset.x = floor(compressed * SHIFT_RIGHT7);\ncompressed -= pixelOffset.x * SHIFT_LEFT7;\npixelOffset.x -= UPPER_BOUND;\nvec2 origin;\norigin.x = floor(compressed * SHIFT_RIGHT5);\ncompressed -= origin.x * SHIFT_LEFT5;\norigin.y = floor(compressed * SHIFT_RIGHT3);\ncompressed -= origin.y * SHIFT_LEFT3;\n#ifdef FRAGMENT_DEPTH_CHECK\nvec2 depthOrigin = origin.xy;\n#endif\norigin -= vec2(1.0);\nfloat show = floor(compressed * SHIFT_RIGHT2);\ncompressed -= show * SHIFT_LEFT2;\n#ifdef INSTANCED\nvec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\nvec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\nvec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#else\nvec2 direction;\ndirection.x = floor(compressed * SHIFT_RIGHT1);\ndirection.y = compressed - direction.x * SHIFT_LEFT1;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\nfloat temp = compressedAttribute0.y  * SHIFT_RIGHT8;\npixelOffset.y = -(floor(temp) - UPPER_BOUND);\nvec2 translate;\ntranslate.y = (temp - floor(temp)) * SHIFT_LEFT16;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\ntranslate.x = floor(temp) - UPPER_BOUND;\ntranslate.y += (temp - floor(temp)) * SHIFT_LEFT8;\ntranslate.y -= UPPER_BOUND;\ntemp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\nvec2 imageSize = vec2(floor(temp), temp2);\n#ifdef FRAGMENT_DEPTH_CHECK\nfloat labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\nfloat applyTranslate = 0.0;\nif (labelHorizontalOrigin != 0.0)\n{\napplyTranslate = 1.0;\nlabelHorizontalOrigin -= 2.0;\ndepthOrigin.x = labelHorizontalOrigin + 1.0;\n}\ndepthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\ntemp = compressedAttribute3.w;\ntemp = temp * SHIFT_RIGHT12;\nvec2 dimensions;\ndimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\ndimensions.x = floor(temp);\n#endif\n#ifdef ALIGNED_AXIS\nvec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\ntemp = compressedAttribute2.z * SHIFT_RIGHT5;\nbool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\nvec3 alignedAxis = vec3(0.0);\nbool validAlignedAxis = false;\n#endif\nvec4 pickColor;\nvec4 color;\ntemp = compressedAttribute2.y;\ntemp = temp * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute2.x;\ntemp = temp * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute2.z * SHIFT_RIGHT8;\nbool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\nfloat eyeDepth = positionEC.z;\n#endif\npositionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\npositionEC.xyz *= show;\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\nfloat distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\nscale *= distanceScale;\ntranslate *= distanceScale;\nif (scale == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency == 0.0)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\nfloat pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\npixelOffset *= pixelOffsetScale;\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = compressedAttribute3.x;\nfloat farSq = compressedAttribute3.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\nmat2 rotationMatrix;\nfloat mpp;\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = compressedAttribute3.z;\n#endif\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\nfloat depthsilon = 10.0;\nvec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\nvec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth1 = getGlobeDepth(pEC1);\nif (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n{\nvec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth2 = getGlobeDepth(pEC2);\nif (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n{\nvec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\nfloat globeDepth3 = getGlobeDepth(pEC3);\nif (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n{\npositionEC.xyz = vec3(0.0);\n}\n}\n}\n}\n#endif\npositionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\ngl_Position = czm_projection * positionEC;\nv_textureCoordinates = textureCoordinates;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth();\n#endif\n#ifdef DISABLE_DEPTH_DISTANCE\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\nbool clipped = (zclip < -1.0 || zclip > 1.0);\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\ngl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\nv_depthFromNearPlusOne = 1.0;\n#endif\n}\n}\n#endif\n#ifdef FRAGMENT_DEPTH_CHECK\nif (sizeInMeters) {\ntranslate /= mpp;\ndimensions /= mpp;\nimageSize /= mpp;\n}\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\nv_rotationMatrix = rotationMatrix;\n#else\nv_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\nfloat enableDepthCheck = 0.0;\nif (lengthSq < disableDepthTestDistance)\n{\nenableDepthCheck = 1.0;\n}\nfloat dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\nfloat dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\nfloat iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\nfloat ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\nv_compressed.x = eyeDepth;\nv_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\nv_compressed.z = dw * SHIFT_LEFT12 + dh;\nv_compressed.w = iw * SHIFT_LEFT12 + ih;\nv_originTextureCoordinateAndTranslate.xy = depthOrigin;\nv_originTextureCoordinateAndTranslate.zw = translate;\nv_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n#endif\n#ifdef SDF\nvec4 outlineColor;\nfloat outlineWidth;\ntemp = sdf.x;\ntemp = temp * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = sdf.y;\ntemp = temp * SHIFT_RIGHT8;\nfloat temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.a = floor(temp);\noutlineColor /= 255.0;\nv_outlineWidth = outlineWidth / 255.0;\nv_outlineColor = outlineColor;\nv_outlineColor.a *= translucency;\n#endif\nv_pickColor = pickColor;\nv_color = color;\nv_color.a *= translucency;\n}\n",SceneTransforms={},actualPositionScratch=new Cartesian4(0,0,0,1),positionCC=new Cartesian4,scratchViewport$1=new BoundingRectangle,scratchWindowCoord0=new Cartesian2,scratchWindowCoord1=new Cartesian2;SceneTransforms.wgs84ToWindowCoordinates=function(e,t,i){return SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates(e,t,Cartesian3.ZERO,i)};var scratchCartesian4$3=new Cartesian4,scratchEyeOffset=new Cartesian3;function worldToClip(e,t,i,r){var n=i.viewMatrix;n=Matrix4.multiplyByVector(n,Cartesian4.fromElements(e.x,e.y,e.z,1,scratchCartesian4$3),scratchCartesian4$3),e=Cartesian3.multiplyComponents(t,Cartesian3.normalize(n,scratchEyeOffset),scratchEyeOffset);return n.x+=t.x+e.x,n.y+=t.y+e.y,n.z+=e.z,Matrix4.multiplyByVector(i.frustum.projectionMatrix,n,r)}var scratchMaxCartographic=new Cartographic(Math.PI,CesiumMath.PI_OVER_TWO),scratchProjectedCartesian=new Cartesian3,scratchCameraPosition=new Cartesian3;SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates=function(e,t,i,r){var n=e.frameState,a=SceneTransforms.computeActualWgs84Position(n,t,actualPositionScratch);if(defined(a)){var o=e.canvas,s=scratchViewport$1;s.x=0,s.y=0,s.width=o.clientWidth,s.height=o.clientHeight;var l,c,u,d,h,p=e.camera,f=!1;if(n.mode===SceneMode$1.SCENE2D&&(l=e.mapProjection.project(scratchMaxCartographic,scratchProjectedCartesian),c=Cartesian3.clone(p.position,scratchCameraPosition),u=p.frustum.clone(),h=Matrix4.computeViewportTransformation(s,0,1,new Matrix4),d=p.frustum.projectionMatrix,t=p.positionWC.y,e=Cartesian3.fromElements(CesiumMath.sign(t)*l.x-t,0,-p.positionWC.x),h=Transforms.pointToGLWindowCoordinates(d,h,e),0===t||h.x<=0||h.x>=o.clientWidth?f=!0:(h.x>.5*o.clientWidth?(s.width=h.x,p.frustum.right=l.x-t,positionCC=worldToClip(a,i,p,positionCC),SceneTransforms.clipToGLWindowCoordinates(s,positionCC,scratchWindowCoord0),s.x+=h.x,p.position.x=-p.position.x,e=p.frustum.right,p.frustum.right=-p.frustum.left,p.frustum.left=-e):(s.x+=h.x,s.width-=h.x,p.frustum.left=-l.x-t,positionCC=worldToClip(a,i,p,positionCC),SceneTransforms.clipToGLWindowCoordinates(s,positionCC,scratchWindowCoord0),s.x=s.x-s.width,p.position.x=-p.position.x,t=p.frustum.left,p.frustum.left=-p.frustum.right,p.frustum.right=-t),positionCC=worldToClip(a,i,p,positionCC),SceneTransforms.clipToGLWindowCoordinates(s,positionCC,scratchWindowCoord1),Cartesian3.clone(c,p.position),p.frustum=u.clone(),((r=Cartesian2.clone(scratchWindowCoord0,r)).x<0||r.x>o.clientWidth)&&(r.x=scratchWindowCoord1.x))),n.mode!==SceneMode$1.SCENE2D||f){if((positionCC=worldToClip(a,i,p,positionCC)).z<0&&!(p.frustum instanceof OrthographicFrustum)&&!(p.frustum instanceof OrthographicOffCenterFrustum))return;r=SceneTransforms.clipToGLWindowCoordinates(s,positionCC,r)}return r.y=o.clientHeight-r.y,r}},SceneTransforms.wgs84ToDrawingBufferCoordinates=function(e,t,i){if(defined(i=SceneTransforms.wgs84ToWindowCoordinates(e,t,i)))return SceneTransforms.transformWindowToDrawingBuffer(e,i,i)};var projectedPosition=new Cartesian3,positionInCartographic=new Cartographic;SceneTransforms.computeActualWgs84Position=function(e,t,i){var r=e.mode;if(r===SceneMode$1.SCENE3D)return Cartesian3.clone(t,i);var n=e.mapProjection,a=n.ellipsoid.cartesianToCartographic(t,positionInCartographic);return defined(a)?(n.project(a,projectedPosition),r===SceneMode$1.COLUMBUS_VIEW?Cartesian3.fromElements(projectedPosition.z,projectedPosition.x,projectedPosition.y,i):r===SceneMode$1.SCENE2D?Cartesian3.fromElements(0,projectedPosition.x,projectedPosition.y,i):(e=e.morphTime,Cartesian3.fromElements(CesiumMath.lerp(projectedPosition.z,t.x,e),CesiumMath.lerp(projectedPosition.x,t.y,e),CesiumMath.lerp(projectedPosition.y,t.z,e),i))):void 0};var positionNDC=new Cartesian3,positionWC=new Cartesian3,viewportTransform=new Matrix4;SceneTransforms.clipToGLWindowCoordinates=function(e,t,i){return Cartesian3.divideByScalar(t,t.w,positionNDC),Matrix4.computeViewportTransformation(e,0,1,viewportTransform),Matrix4.multiplyByPoint(viewportTransform,positionNDC,positionWC),Cartesian2.fromCartesian3(positionWC,i)},SceneTransforms.transformWindowToDrawingBuffer=function(e,t,i){var r=e.canvas,n=e.drawingBufferWidth/r.clientWidth;r=e.drawingBufferHeight/r.clientHeight;return Cartesian2.fromElements(t.x*n,t.y*r,i)};var scratchNDC=new Cartesian4,scratchWorldCoords=new Cartesian4;function Billboard(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).translucencyByDistance,r=e.pixelOffsetScaleByDistance,n=e.scaleByDistance,a=e.distanceDisplayCondition;defined(i)&&(i=NearFarScalar.clone(i)),defined(r)&&(r=NearFarScalar.clone(r)),defined(n)&&(n=NearFarScalar.clone(n)),defined(a)&&(a=DistanceDisplayCondition.clone(a)),this._show=defaultValue(e.show,!0),this._position=Cartesian3.clone(defaultValue(e.position,Cartesian3.ZERO)),this._actualPosition=Cartesian3.clone(this._position),this._pixelOffset=Cartesian2.clone(defaultValue(e.pixelOffset,Cartesian2.ZERO)),this._translate=new Cartesian2(0,0),this._eyeOffset=Cartesian3.clone(defaultValue(e.eyeOffset,Cartesian3.ZERO)),this._heightReference=defaultValue(e.heightReference,HeightReference$1.NONE),this._verticalOrigin=defaultValue(e.verticalOrigin,VerticalOrigin$1.CENTER),this._horizontalOrigin=defaultValue(e.horizontalOrigin,HorizontalOrigin$1.CENTER),this._scale=defaultValue(e.scale,1),this._color=Color.clone(defaultValue(e.color,Color.WHITE)),this._rotation=defaultValue(e.rotation,0),this._alignedAxis=Cartesian3.clone(defaultValue(e.alignedAxis,Cartesian3.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=n,this._translucencyByDistance=i,this._pixelOffsetScaleByDistance=r,this._sizeInMeters=defaultValue(e.sizeInMeters,!1),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=defaultValue(e.collection,t),this._pickId=void 0,this._pickPrimitive=defaultValue(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=void 0,this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0,a=e.image,t=e.imageId,defined(a)&&(defined(t)||(t="string"==typeof a?a:defined(a.src)?a.src:createGuid()),this._imageId=t,this._image=a),defined(e.imageSubRegion)&&(this._imageId=t,this._imageSubRegion=e.imageSubRegion),defined(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=SceneMode$1.SCENE3D,this._clusterShow=!0,this._outlineColor=Color.clone(defaultValue(e.outlineColor,Color.BLACK)),this._outlineWidth=defaultValue(e.outlineWidth,0),this._updateClamping()}SceneTransforms.drawingBufferToWgs84Coordinates=function(e,t,i,r){var n=e.context.uniformState,a=(l=n.currentFrustum).x,o=l.y;e.frameState.useLogDepth&&(c=i*n.log2FarDepthFromNearPlusOne,i=o*(1-a/(Math.pow(2,c)-1+a))/(o-a));var s,l=e.view.passState.viewport,c=Cartesian4.clone(Cartesian4.UNIT_W,scratchNDC);return c.x=(t.x-l.x)/l.width*2-1,c.y=(t.y-l.y)/l.height*2-1,c.z=2*i-1,c.w=1,defined((i=e.camera.frustum).fovy)?(e=1/(s=Matrix4.multiplyByVector(n.inverseViewProjection,c,scratchWorldCoords)).w,Cartesian3.multiplyByScalar(s,e,s)):(defined(i._offCenterFrustum)&&(i=i._offCenterFrustum),(s=scratchWorldCoords).x=.5*(c.x*(i.right-i.left)+i.left+i.right),s.y=.5*(c.y*(i.top-i.bottom)+i.bottom+i.top),s.z=.5*(c.z*(a-o)-a-o),s.w=1,s=Matrix4.multiplyByVector(n.inverseView,s,s)),Cartesian3.fromCartesian4(s,r)};var SHOW_INDEX=Billboard.SHOW_INDEX=0,POSITION_INDEX=Billboard.POSITION_INDEX=1,PIXEL_OFFSET_INDEX=Billboard.PIXEL_OFFSET_INDEX=2,EYE_OFFSET_INDEX=Billboard.EYE_OFFSET_INDEX=3,HORIZONTAL_ORIGIN_INDEX=Billboard.HORIZONTAL_ORIGIN_INDEX=4,VERTICAL_ORIGIN_INDEX=Billboard.VERTICAL_ORIGIN_INDEX=5,SCALE_INDEX=Billboard.SCALE_INDEX=6,IMAGE_INDEX_INDEX=Billboard.IMAGE_INDEX_INDEX=7,COLOR_INDEX=Billboard.COLOR_INDEX=8,ROTATION_INDEX=Billboard.ROTATION_INDEX=9,ALIGNED_AXIS_INDEX=Billboard.ALIGNED_AXIS_INDEX=10,SCALE_BY_DISTANCE_INDEX=Billboard.SCALE_BY_DISTANCE_INDEX=11,TRANSLUCENCY_BY_DISTANCE_INDEX=Billboard.TRANSLUCENCY_BY_DISTANCE_INDEX=12,PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=Billboard.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,DISTANCE_DISPLAY_CONDITION=Billboard.DISTANCE_DISPLAY_CONDITION=14,DISABLE_DEPTH_DISTANCE=Billboard.DISABLE_DEPTH_DISTANCE=15;Billboard.TEXTURE_COORDINATE_BOUNDS=16;var SDF_INDEX=Billboard.SDF_INDEX=17;function makeDirty(e,t){var i=e._billboardCollection;defined(i)&&(i._updateBillboard(e,t),e._dirty=!0)}Billboard.NUMBER_OF_PROPERTIES=18,Object.defineProperties(Billboard.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,makeDirty(this,SHOW_INDEX))}},position:{get:function(){return this._position},set:function(e){var t=this._position;Cartesian3.equals(t,e)||(Cartesian3.clone(e,t),Cartesian3.clone(e,this._actualPosition),this._updateClamping(),makeDirty(this,POSITION_INDEX))}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),makeDirty(this,POSITION_INDEX))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){var t=this._pixelOffset;Cartesian2.equals(t,e)||(Cartesian2.clone(e,t),makeDirty(this,PIXEL_OFFSET_INDEX))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;NearFarScalar.equals(t,e)||(this._scaleByDistance=NearFarScalar.clone(e,t),makeDirty(this,SCALE_BY_DISTANCE_INDEX))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;NearFarScalar.equals(t,e)||(this._translucencyByDistance=NearFarScalar.clone(e,t),makeDirty(this,TRANSLUCENCY_BY_DISTANCE_INDEX))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){var t=this._pixelOffsetScaleByDistance;NearFarScalar.equals(t,e)||(this._pixelOffsetScaleByDistance=NearFarScalar.clone(e,t),makeDirty(this,PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){var t=this._eyeOffset;Cartesian3.equals(t,e)||(Cartesian3.clone(e,t),makeDirty(this,EYE_OFFSET_INDEX))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,makeDirty(this,HORIZONTAL_ORIGIN_INDEX))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,makeDirty(this,VERTICAL_ORIGIN_INDEX))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,makeDirty(this,SCALE_INDEX))}},color:{get:function(){return this._color},set:function(e){var t=this._color;Color.equals(t,e)||(Color.clone(e,t),makeDirty(this,COLOR_INDEX))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,makeDirty(this,ROTATION_INDEX))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){var t=this._alignedAxis;Cartesian3.equals(t,e)||(Cartesian3.clone(e,t),makeDirty(this,ALIGNED_AXIS_INDEX))}},width:{get:function(){return defaultValue(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,makeDirty(this,IMAGE_INDEX_INDEX))}},height:{get:function(){return defaultValue(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,makeDirty(this,IMAGE_INDEX_INDEX))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,makeDirty(this,COLOR_INDEX))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){DistanceDisplayCondition.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition),makeDirty(this,DISTANCE_DISPLAY_CONDITION))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,makeDirty(this,DISABLE_DEPTH_DISTANCE))}},id:{get:function(){return this._id},set:function(e){this._id=e,defined(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,defined(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){defined(e)?"string"==typeof e?this.setImage(e,e):e instanceof Resource?this.setImage(e.url,e):defined(e.src)?this.setImage(e.src,e):this.setImage(createGuid(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,makeDirty(this,IMAGE_INDEX_INDEX))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=Cartesian3.clone(e,this._actualClampedPosition),makeDirty(this,POSITION_INDEX)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,makeDirty(this,SHOW_INDEX))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;Color.equals(t,e)||(Color.clone(e,t),makeDirty(this,SDF_INDEX))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,makeDirty(this,SDF_INDEX))}}}),Billboard.prototype.getPickId=function(e){return defined(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},Billboard.prototype._updateClamping=function(){Billboard._updateClamping(this._billboardCollection,this)};var scratchCartographic$4=new Cartographic,scratchPosition$7=new Cartesian3;Billboard._updateClamping=function(e,t){var i,r,n,a,o=e._scene;function s(e){var r;t._heightReference===HeightReference$1.RELATIVE_TO_GROUND&&(t._mode===SceneMode$1.SCENE3D?((r=i.cartesianToCartographic(e,scratchCartographic$4)).height+=n.height,i.cartographicToCartesian(r,e)):e.x+=n.height),t._clampedPosition=Cartesian3.clone(e,t._clampedPosition)}defined(o)&&defined(o.globe)&&(a=o.globe,i=a.ellipsoid,r=a._surface,o=(e=o.frameState.mode)!==t._mode,t._mode=e,(t._heightReference===HeightReference$1.NONE||o)&&defined(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==HeightReference$1.NONE&&defined(t._position)&&(defined(n=i.cartesianToCartographic(t._position))?(defined(t._removeCallbackFunc)&&t._removeCallbackFunc(),t._removeCallbackFunc=r.updateHeight(n,s),Cartographic.clone(n,scratchCartographic$4),defined(a=a.getHeight(n))&&(scratchCartographic$4.height=a),i.cartographicToCartesian(scratchCartographic$4,scratchPosition$7),s(scratchPosition$7)):t._actualClampedPosition=void 0))},Billboard.prototype._loadImage=function(){var e,t,i=this._billboardCollection._textureAtlas,r=this._imageId,n=this._image,a=this._imageSubRegion;defined(n)&&(e=i.addImage(r,n)),defined(a)&&(e=i.addSubRegion(r,a)),defined(this._imageIndexPromise=e)&&(t=this,e.then((function(e){var o;t._imageId===r&&t._image===n&&BoundingRectangle.equals(t._imageSubRegion,a)&&(o=i.textureCoordinates[e],t._imageWidth=i.texture.width*o.width,t._imageHeight=i.texture.height*o.height,t._imageIndex=e,t._ready=!0,t._image=void 0,t._imageIndexPromise=void 0,makeDirty(t,IMAGE_INDEX_INDEX))})).otherwise((function(e){console.error("Error loading image for billboard: "+e),t._imageIndexPromise=void 0})))},Billboard.prototype.setImage=function(e,t){this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,defined(this._billboardCollection._textureAtlas)&&this._loadImage())},Billboard.prototype.setImageSubRegion=function(e,t){this._imageId===e&&BoundingRectangle.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=BoundingRectangle.clone(t),defined(this._billboardCollection._textureAtlas)&&this._loadImage())},Billboard.prototype._setTranslate=function(e){var t=this._translate;Cartesian2.equals(t,e)||(Cartesian2.clone(e,t),makeDirty(this,PIXEL_OFFSET_INDEX))},Billboard.prototype._getActualPosition=function(){return defined(this._clampedPosition)?this._clampedPosition:this._actualPosition},Billboard.prototype._setActualPosition=function(e){defined(this._clampedPosition)||Cartesian3.clone(e,this._actualPosition),makeDirty(this,POSITION_INDEX)};var tempCartesian3=new Cartesian4;Billboard._computeActualPosition=function(e,t,i,r){return defined(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===SceneMode$1.SCENE3D?t:(Matrix4.multiplyByPoint(r,t,tempCartesian3),SceneTransforms.computeActualWgs84Position(i,tempCartesian3))};var scratchCartesian3$9=new Cartesian3;Billboard._computeScreenSpacePosition=function(e,t,i,r,n,a){if(t=Matrix4.multiplyByPoint(e,t,scratchCartesian3$9),defined(a=SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates(n,t,i,a)))return Cartesian2.add(a,r,a),a};var scratchPixelOffset=new Cartesian2(0,0);Billboard.prototype.computeScreenSpacePosition=function(e,t){var i=this._billboardCollection;defined(t)||(t=new Cartesian2),Cartesian2.clone(this._pixelOffset,scratchPixelOffset),Cartesian2.add(scratchPixelOffset,this._translate,scratchPixelOffset);var r,n=i.modelMatrix,a=this._position;return defined(this._clampedPosition)&&(a=this._clampedPosition,e.mode!==SceneMode$1.SCENE3D&&(i=(r=e.mapProjection).ellipsoid,r=r.unproject(a,scratchCartographic$4),a=i.cartographicToCartesian(r,scratchCartesian3$9),n=Matrix4.IDENTITY)),Billboard._computeScreenSpacePosition(n,a,this._eyeOffset,scratchPixelOffset,e,t)},Billboard.getScreenSpaceBoundingBox=function(e,t,i){var r=e.width,n=e.height,a=e.scale;return r*=a,n*=a,a=t.x,e.horizontalOrigin===HorizontalOrigin$1.RIGHT?a-=r:e.horizontalOrigin===HorizontalOrigin$1.CENTER&&(a-=.5*r),t=t.y,e.verticalOrigin===VerticalOrigin$1.BOTTOM||e.verticalOrigin===VerticalOrigin$1.BASELINE?t-=n:e.verticalOrigin===VerticalOrigin$1.CENTER&&(t-=.5*n),defined(i)||(i=new BoundingRectangle),i.x=a,i.y=t,i.width=r,i.height=n,i},Billboard.prototype.equals=function(e){return this===e||defined(e)&&this._id===e._id&&Cartesian3.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&BoundingRectangle.equals(this._imageSubRegion,e._imageSubRegion)&&Color.equals(this._color,e._color)&&Cartesian2.equals(this._pixelOffset,e._pixelOffset)&&Cartesian2.equals(this._translate,e._translate)&&Cartesian3.equals(this._eyeOffset,e._eyeOffset)&&NearFarScalar.equals(this._scaleByDistance,e._scaleByDistance)&&NearFarScalar.equals(this._translucencyByDistance,e._translucencyByDistance)&&NearFarScalar.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&DistanceDisplayCondition.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},Billboard.prototype._destroy=function(){defined(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),defined(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};var BlendOption={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},BlendOption$1=Object.freeze(BlendOption),SDFSettings={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},SDFSettings$1=Object.freeze(SDFSettings);function TextureAtlasNode(e,t,i,r,n){this.bottomLeft=defaultValue(e,Cartesian2.ZERO),this.topRight=defaultValue(t,Cartesian2.ZERO),this.childNode1=i,this.childNode2=r,this.imageIndex=n}var defaultInitialSize=new Cartesian2(16,16);function TextureAtlas(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.borderWidthInPixels,1),i=defaultValue(e.initialSize,defaultInitialSize);this._context=e.context,this._pixelFormat=defaultValue(e.pixelFormat,PixelFormat$1.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=createGuid(),this._idHash={},this._initialSize=i,this._root=void 0}function resizeAtlas(e,t){var i=e._context,r=e.numberOfImages,n=e._borderWidthInPixels;if(0<r){for(var a=e._texture.width,o=e._texture.height,s=2*(a+t.width+n),l=a/s,c=o/(r=2*(o+t.height+n)),u=(a=new TextureAtlasNode(new Cartesian2(a+n,n),new Cartesian2(s,o)),a=new TextureAtlasNode(new Cartesian2,new Cartesian2(s,o),e._root,a),o=new TextureAtlasNode(new Cartesian2(n,o+n),new Cartesian2(s,r)),a=new TextureAtlasNode(new Cartesian2,new Cartesian2(s,r),a,o),0);u<e._textureCoordinates.length;u++){var d=e._textureCoordinates[u];defined(d)&&(d.x*=l,d.y*=c,d.width*=l,d.height*=c)}o=new Texture({context:e._context,width:s,height:r,pixelFormat:e._pixelFormat}),(i=new Framebuffer({context:i,colorTextures:[e._texture],destroyAttachments:!1}))._bind(),o.copyFromFramebuffer(0,0,0,0,s,r),i._unBind(),i.destroy(),e._texture=e._texture&&e._texture.destroy(),e._texture=o,e._root=a}else a=2*(t.width+2*n),t=2*(t.height+2*n),a<e._initialSize.x&&(a=e._initialSize.x),t<e._initialSize.y&&(t=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new Texture({context:e._context,width:a,height:t,pixelFormat:e._pixelFormat}),e._root=new TextureAtlasNode(new Cartesian2(n,n),new Cartesian2(a,t))}function findNode$1(e,t,i){if(defined(t)){if(defined(t.childNode1)||defined(t.childNode2))return findNode$1(e,t.childNode1,i)||findNode$1(e,t.childNode2,i);if(defined(t.imageIndex))return;var r,n=t.topRight.x-t.bottomLeft.x,a=t.topRight.y-t.bottomLeft.y;n=n-i.width,a=a-i.height;if(n<0||a<0)return;return 0==n&&0==a?t:(a<n?(t.childNode1=new TextureAtlasNode(new Cartesian2(t.bottomLeft.x,t.bottomLeft.y),new Cartesian2(t.bottomLeft.x+i.width,t.topRight.y)),(r=t.bottomLeft.x+i.width+e._borderWidthInPixels)<t.topRight.x&&(t.childNode2=new TextureAtlasNode(new Cartesian2(r,t.bottomLeft.y),new Cartesian2(t.topRight.x,t.topRight.y)))):(t.childNode1=new TextureAtlasNode(new Cartesian2(t.bottomLeft.x,t.bottomLeft.y),new Cartesian2(t.topRight.x,t.bottomLeft.y+i.height)),(r=t.bottomLeft.y+i.height+e._borderWidthInPixels)<t.topRight.y&&(t.childNode2=new TextureAtlasNode(new Cartesian2(t.bottomLeft.x,r),new Cartesian2(t.topRight.x,t.topRight.y)))),findNode$1(e,t.childNode1,i))}}function addImage(e,t,i){var r,n,a,o,s,l,c=findNode$1(e,e._root,t);defined(c)?(c.imageIndex=i,s=e._texture.width,l=e._texture.height,r=c.topRight.x-c.bottomLeft.x,n=c.topRight.y-c.bottomLeft.y,a=c.bottomLeft.x/s,o=c.bottomLeft.y/l,s=r/s,l=n/l,e._textureCoordinates[i]=new BoundingRectangle(a,o,s,l),e._texture.copyFrom(t,c.bottomLeft.x,c.bottomLeft.y)):(resizeAtlas(e,t),addImage(e,t,i)),e._guid=createGuid()}Object.defineProperties(TextureAtlas.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return defined(this._texture)||(this._texture=new Texture({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}}),TextureAtlas.prototype.addImage=function(e,t){if(defined(r=this._idHash[e]))return r;"function"==typeof t?t=t(e):("string"==typeof t||t instanceof Resource)&&(t=Resource.createIfNeeded(t).fetchImage());var i=this,r=when(t,(function(e){if(i.isDestroyed())return-1;var t=i.numberOfImages;return addImage(i,e,t),t}));return this._idHash[e]=r},TextureAtlas.prototype.addSubRegion=function(e,t){var i=this._idHash[e];if(!defined(i))throw new RuntimeError('image with id "'+e+'" not found in the atlas.');var r=this;return when(i,(function(e){if(-1===e)return-1;var i=r._texture.width,n=r._texture.height,a=r.numberOfImages,o=(e=(o=r._textureCoordinates[e]).x+t.x/i,o.y+t.y/n);i=t.width/i,n=t.height/n;return r._textureCoordinates.push(new BoundingRectangle(e,o,i,n)),r._guid=createGuid(),a}))},TextureAtlas.prototype.isDestroyed=function(){return!1},TextureAtlas.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),destroyObject(this)};var SHOW_INDEX$1=Billboard.SHOW_INDEX,POSITION_INDEX$1=Billboard.POSITION_INDEX,PIXEL_OFFSET_INDEX$1=Billboard.PIXEL_OFFSET_INDEX,EYE_OFFSET_INDEX$1=Billboard.EYE_OFFSET_INDEX,HORIZONTAL_ORIGIN_INDEX$1=Billboard.HORIZONTAL_ORIGIN_INDEX,VERTICAL_ORIGIN_INDEX$1=Billboard.VERTICAL_ORIGIN_INDEX,SCALE_INDEX$1=Billboard.SCALE_INDEX,IMAGE_INDEX_INDEX$1=Billboard.IMAGE_INDEX_INDEX,COLOR_INDEX$1=Billboard.COLOR_INDEX,ROTATION_INDEX$1=Billboard.ROTATION_INDEX,ALIGNED_AXIS_INDEX$1=Billboard.ALIGNED_AXIS_INDEX,SCALE_BY_DISTANCE_INDEX$1=Billboard.SCALE_BY_DISTANCE_INDEX,TRANSLUCENCY_BY_DISTANCE_INDEX$1=Billboard.TRANSLUCENCY_BY_DISTANCE_INDEX,PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX$1=Billboard.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,DISTANCE_DISPLAY_CONDITION_INDEX=Billboard.DISTANCE_DISPLAY_CONDITION,DISABLE_DEPTH_DISTANCE$1=Billboard.DISABLE_DEPTH_DISTANCE,TEXTURE_COORDINATE_BOUNDS=Billboard.TEXTURE_COORDINATE_BOUNDS,SDF_INDEX$1=Billboard.SDF_INDEX,NUMBER_OF_PROPERTIES=Billboard.NUMBER_OF_PROPERTIES,attributeLocations,attributeLocationsBatched={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11},attributeLocationsInstanced={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12},getIndexBuffer;function BillboardCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(NUMBER_OF_PROPERTIES),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new BoundingSphere,this._baseVolumeWC=new BoundingSphere,this._baseVolume2D=new BoundingSphere,this._boundingVolume=new BoundingSphere,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.debugShowTextureAtlas=defaultValue(e.debugShowTextureAtlas,!1),this.blendOption=defaultValue(e.blendOption,BlendOption$1.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=SceneMode$1.SCENE3D,this._buffersUsage=[BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW],this._highlightColor=Color.clone(Color.WHITE);var t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture},u_highlightColor:function(){return t._highlightColor}},defined(e=this._scene)&&defined(e.terrainProviderChanged)&&(this._removeCallbackFunc=e.terrainProviderChanged.addEventListener((function(){for(var e=this._billboards,t=e.length,i=0;i<t;++i)defined(e[i])&&e[i]._updateClamping()}),this))}function destroyBillboards(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function removeBillboards(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,r=i.length,n=0,a=0;n<r;++n){var o=i[n];o&&(o._index=a++,t.push(o))}e._billboards=t}}function getIndexBufferBatched(e){var t=e.cache.billboardCollection_indexBufferBatched;if(defined(t))return t;for(var i=new Uint16Array(98298),r=0,n=0;r<98298;r+=6,n+=4)i[r]=n,i[r+1]=n+1,i[r+2]=n+2,i[r+3]=n+0,i[r+4]=n+2,i[r+5]=n+3;return(t=Buffer$1.createIndexBuffer({context:e,typedArray:i,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=t}function getIndexBufferInstanced(e){var t=e.cache.billboardCollection_indexBufferInstanced;return defined(t)?t:((t=Buffer$1.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT})).vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t)}function getVertexBufferInstanced(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return defined(t)?t:((t=Buffer$1.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:BufferUsage$1.STATIC_DRAW})).vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t)}function createVAF(e,t,i,r,n,a){var o=[{index:attributeLocations.positionHighAndScale,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[POSITION_INDEX$1]},{index:attributeLocations.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[POSITION_INDEX$1]},{index:attributeLocations.compressedAttribute0,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[PIXEL_OFFSET_INDEX$1]},{index:attributeLocations.compressedAttribute1,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[TRANSLUCENCY_BY_DISTANCE_INDEX$1]},{index:attributeLocations.compressedAttribute2,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[COLOR_INDEX$1]},{index:attributeLocations.eyeOffset,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[EYE_OFFSET_INDEX$1]},{index:attributeLocations.scaleByDistance,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[SCALE_BY_DISTANCE_INDEX$1]},{index:attributeLocations.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX$1]},{index:attributeLocations.compressedAttribute3,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[DISTANCE_DISPLAY_CONDITION_INDEX]},{index:attributeLocations.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[TEXTURE_COORDINATE_BOUNDS]}];return r&&o.push({index:attributeLocations.direction,componentsPerAttribute:2,componentDatatype:ComponentDatatype$1.FLOAT,vertexBuffer:getVertexBufferInstanced(e)}),defined(n)&&o.push({index:attributeLocations.a_batchId,componentsPerAttribute:1,componentDatatype:ComponentDatatype$1.FLOAT,bufferUsage:BufferUsage$1.STATIC_DRAW}),a&&o.push({index:attributeLocations.sdf,componentsPerAttribute:2,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[SDF_INDEX$1]}),new VertexArrayFacade(e,o,r?t:4*t,r)}Object.defineProperties(BillboardCollection.prototype,{length:{get:function(){return removeBillboards(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),BillboardCollection.prototype.add=function(e){return(e=new Billboard(e,this))._index=this._billboards.length,this._billboards.push(e),this._createVertexArray=!0,e},BillboardCollection.prototype.remove=function(e){return!!this.contains(e)&&(this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},BillboardCollection.prototype.removeAll=function(){destroyBillboards(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},BillboardCollection.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},BillboardCollection.prototype.contains=function(e){return defined(e)&&e._billboardCollection===this},BillboardCollection.prototype.get=function(e){return removeBillboards(this),this._billboards[e]},BillboardCollection.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,r=0;r<NUMBER_OF_PROPERTIES;++r){var n=0===i[r]?BufferUsage$1.STATIC_DRAW:BufferUsage$1.STREAM_DRAW;t=t||e[r]!==n;e[r]=n}return t};var writePositionScratch=new EncodedCartesian3;function writePositionScaleAndRotation(e,t,i,r,n){var a,o=r[attributeLocations.positionHighAndScale],s=r[attributeLocations.positionLowAndRotation],l=n._getActualPosition();e._mode===SceneMode$1.SCENE3D&&(BoundingSphere.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),EncodedCartesian3.fromCartesian(l,writePositionScratch);var c=n.scale,u=n.rotation;0!==u&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,c),r=writePositionScratch.high,l=writePositionScratch.low,e._instanced?(o(a=n._index,r.x,r.y,r.z,c),s(a,l.x,l.y,l.z,u)):(o(0+(a=4*n._index),r.x,r.y,r.z,c),o(a+1,r.x,r.y,r.z,c),o(a+2,r.x,r.y,r.z,c),o(a+3,r.x,r.y,r.z,c),s(a+0,l.x,l.y,l.z,u),s(a+1,l.x,l.y,l.z,u),s(a+2,l.x,l.y,l.z,u),s(a+3,l.x,l.y,l.z,u))}var scratchCartesian2$8=new Cartesian2,UPPER_BOUND=32768,LEFT_SHIFT16=65536,LEFT_SHIFT12=4096,LEFT_SHIFT8=256,LEFT_SHIFT7=128,LEFT_SHIFT5=32,LEFT_SHIFT3=8,LEFT_SHIFT2=4,RIGHT_SHIFT8=1/256,LOWER_LEFT=0,LOWER_RIGHT=2,UPPER_RIGHT=3,UPPER_LEFT=1;function writeCompressedAttrib0(e,t,i,r,n){var a,o=r[attributeLocations.compressedAttribute0],s=(y=n.pixelOffset).x,l=y.y,c=(f=n._translate).x,u=f.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(s+c),Math.abs(-l+u));var d=n.horizontalOrigin,h=n._verticalOrigin,p=n.show&&n.clusterShow;0===n.color.alpha&&(p=!1),h===VerticalOrigin$1.BASELINE&&(h=VerticalOrigin$1.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&d===HorizontalOrigin$1.CENTER,e._allVerticalCenter=e._allVerticalCenter&&h===VerticalOrigin$1.CENTER;var f,m=0,g=0,y=(r=0,0);-1!==(f=n._imageIndex)&&(m=(f=i[f]).x,g=f.y,r=f.width,y=f.height),r=m+r,y=g+y,s=Math.floor(CesiumMath.clamp(s,-UPPER_BOUND,UPPER_BOUND)+UPPER_BOUND)*LEFT_SHIFT7,s+=(d+1)*LEFT_SHIFT5,s+=(h+1)*LEFT_SHIFT3,s+=(p?1:0)*LEFT_SHIFT2,p=Math.floor(CesiumMath.clamp(l,-UPPER_BOUND,UPPER_BOUND)+UPPER_BOUND)*LEFT_SHIFT8,l=Math.floor(CesiumMath.clamp(c,-UPPER_BOUND,UPPER_BOUND)+UPPER_BOUND)*LEFT_SHIFT8,c=(CesiumMath.clamp(u,-UPPER_BOUND,UPPER_BOUND)+UPPER_BOUND)*RIGHT_SHIFT8,p+=u=Math.floor(c),l+=Math.floor((c-u)*LEFT_SHIFT8),scratchCartesian2$8.x=m,scratchCartesian2$8.y=g,g=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),scratchCartesian2$8.x=r,r=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),scratchCartesian2$8.y=y,y=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),scratchCartesian2$8.x=m,m=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),e._instanced?o(a=n._index,s,p,l,g):(o(0+(a=4*n._index),s+LOWER_LEFT,p,l,g),o(a+1,s+LOWER_RIGHT,p,l,r),o(a+2,s+UPPER_RIGHT,p,l,y),o(a+3,s+UPPER_LEFT,p,l,m))}function writeCompressedAttrib1(e,t,i,r,n){var a,o=r[attributeLocations.compressedAttribute1],s=n.alignedAxis;Cartesian3.equals(s,Cartesian3.ZERO)||(e._shaderAlignedAxis=!0);var l=0,c=1,u=1,d=1,h=n.translucencyByDistance;defined(h)&&(l=h.near,c=h.nearValue,u=h.far,d=h.farValue,1===c&&1===d||(e._shaderTranslucencyByDistance=!0)),r=0,-1!==(h=n._imageIndex)&&(r=i[h].width),h=e._textureAtlas.texture.width,h=Math.round(defaultValue(n.width,h*r)),e._maxSize=Math.max(e._maxSize,h),r=CesiumMath.clamp(h,0,LEFT_SHIFT16),h=0,Math.abs(Cartesian3.magnitudeSquared(s)-1)<CesiumMath.EPSILON6&&(h=AttributeCompression.octEncodeFloat(s)),c=CesiumMath.clamp(c,0,1),r=r*LEFT_SHIFT8+(c=1===c?255:255*c|0),d=CesiumMath.clamp(d,0,1),h=h*LEFT_SHIFT8+(d=1===d?255:255*d|0),e._instanced?o(a=n._index,r,h,l,u):(o(0+(a=4*n._index),r,h,l,u),o(a+1,r,h,l,u),o(a+2,r,h,l,u),o(a+3,r,h,l,u))}function writeCompressedAttrib2(e,t,i,r,n){var a,o=r[attributeLocations.compressedAttribute2],s=n.color,l=defined(e._batchTable)?Color.WHITE:n.getPickId(t.context).color,c=n.sizeInMeters?1:0,u=Math.abs(Cartesian3.magnitudeSquared(n.alignedAxis)-1)<CesiumMath.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&1==c;var d=0,h=n._imageIndex;-1!==h&&(d=i[h].height),r=e._textureAtlas.texture.dimensions,t=Math.round(defaultValue(n.height,r.y*d)),e._maxSize=Math.max(e._maxSize,t),i=defaultValue(n._labelHorizontalOrigin,-2),h=t*LEFT_SHIFT2+(i+=2),r=Color.floatToByte(s.red),d=Color.floatToByte(s.green),t=Color.floatToByte(s.blue),i=r*LEFT_SHIFT16+d*LEFT_SHIFT8+t,r=Color.floatToByte(l.red),d=Color.floatToByte(l.green),t=Color.floatToByte(l.blue),t=r*LEFT_SHIFT16+d*LEFT_SHIFT8+t,l=Color.floatToByte(s.alpha)*LEFT_SHIFT16+Color.floatToByte(l.alpha)*LEFT_SHIFT8,l+=2*c+u,e._instanced?o(a=n._index,i,t,l,h):(o(0+(a=4*n._index),i,t,l,h),o(a+1,i,t,l,h),o(a+2,i,t,l,h),o(a+3,i,t,l,h))}function writeEyeOffset(e,t,i,r,n){var a,o=r[attributeLocations.eyeOffset],s=n.eyeOffset,l=s.z;n._heightReference!==HeightReference$1.NONE&&(l*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(s.x),Math.abs(s.y),Math.abs(l)),e._instanced?(a=r=0,-1!==(e=n._imageIndex)&&(r=(e=i[e]).width,a=e.height),scratchCartesian2$8.x=r,scratchCartesian2$8.y=a,r=AttributeCompression.compressTextureCoordinates(scratchCartesian2$8),o(a=n._index,s.x,s.y,l,r)):(o(0+(a=4*n._index),s.x,s.y,l,0),o(a+1,s.x,s.y,l,0),o(a+2,s.x,s.y,l,0),o(a+3,s.x,s.y,l,0))}function writeScaleByDistance(e,t,i,r,n){var a,o=r[attributeLocations.scaleByDistance],s=0,l=1,c=1,u=1;defined(r=n.scaleByDistance)&&(s=r.near,l=r.nearValue,c=r.far,u=r.farValue,1===l&&1===u||(e._shaderScaleByDistance=!0)),e._instanced?o(a=n._index,s,l,c,u):(o(0+(a=4*n._index),s,l,c,u),o(a+1,s,l,c,u),o(a+2,s,l,c,u),o(a+3,s,l,c,u))}function writePixelOffsetScaleByDistance(e,t,i,r,n){var a,o=r[attributeLocations.pixelOffsetScaleByDistance],s=0,l=1,c=1,u=1;defined(r=n.pixelOffsetScaleByDistance)&&(s=r.near,l=r.nearValue,c=r.far,u=r.farValue,1===l&&1===u||(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?o(a=n._index,s,l,c,u):(o(0+(a=4*n._index),s,l,c,u),o(a+1,s,l,c,u),o(a+2,s,l,c,u),o(a+3,s,l,c,u))}function writeCompressedAttribute3(e,t,i,r,n){var a,o=r[attributeLocations.compressedAttribute3],s=0,l=Number.MAX_VALUE,c=n.distanceDisplayCondition;defined(c)&&(s=c.near,l=c.far,s*=s,l*=l,e._shaderDistanceDisplayCondition=!0);var u=n.disableDepthTestDistance;r=n.heightReference===HeightReference$1.CLAMP_TO_GROUND&&t.context.depthTexture;defined(u)||(u=r?5e3:0),u*=u,(r||0<u)&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1)),defined(n._labelDimensions)?(d=n._labelDimensions.x,h=n._labelDimensions.y):(t=c=0,-1!==(r=n._imageIndex)&&(c=(r=i[r]).height,t=r.width),h=Math.round(defaultValue(n.height,e._textureAtlas.texture.dimensions.y*c)),c=e._textureAtlas.texture.width,d=Math.round(defaultValue(n.width,c*t)));var d=Math.floor(CesiumMath.clamp(d,0,LEFT_SHIFT12)),h=Math.floor(CesiumMath.clamp(h,0,LEFT_SHIFT12));h=d*LEFT_SHIFT12+h;e._instanced?o(a=n._index,s,l,u,h):(o(0+(a=4*n._index),s,l,u,h),o(a+1,s,l,u,h),o(a+2,s,l,u,h),o(a+3,s,l,u,h))}function writeTextureCoordinateBoundsOrLabelTranslate(e,t,i,r,n){var a;n.heightReference===HeightReference$1.CLAMP_TO_GROUND&&(u=e._scene,o=t.context,c=t.globeTranslucencyState.translucent,u=defined(u.globe)&&u.globe.depthTestAgainstTerrain,e._shaderClampToGround=o.depthTexture&&!c&&u);var o=r[attributeLocations.textureCoordinateBoundsOrLabelTranslate];if(0<ContextLimits.maximumVertexTextureImageUnits){var s=0,l=0;return defined(n._labelTranslate)&&(s=n._labelTranslate.x,l=n._labelTranslate.y),void(e._instanced?o(a=n._index,s,l,0,0):(o(0+(a=4*n._index),s,l,0,0),o(a+1,s,l,0,0),o(a+2,s,l,0,0),o(a+3,s,l,0,0)))}var c=0,u=0;r=0,s=0;-1!==(l=n._imageIndex)&&(c=(l=i[l]).x,u=l.y,r=l.width,s=l.height),r=c+r,s=u+s,e._instanced?o(a=n._index,c,u,r,s):(o(0+(a=4*n._index),c,u,r,s),o(a+1,c,u,r,s),o(a+2,c,u,r,s),o(a+3,c,u,r,s))}function writeBatchId(e,t,i,r,n){var a,o;defined(e._batchTable)&&(a=r[attributeLocations.a_batchId],r=n._batchIndex,e._instanced?a(o=n._index,r):(a(0+(o=4*n._index),r),a(o+1,r),a(o+2,r),a(o+3,r)))}function writeSDF(e,t,i,r,n){var a,o,s,l,c,u;e._sdf&&(o=r[attributeLocations.sdf],s=n.outlineColor,u=n.outlineWidth,l=Color.floatToByte(s.red),c=Color.floatToByte(s.green),r=Color.floatToByte(s.blue),r=l*LEFT_SHIFT16+c*LEFT_SHIFT8+r,u/=SDFSettings$1.RADIUS,u=Color.floatToByte(s.alpha)*LEFT_SHIFT16+Color.floatToByte(u)*LEFT_SHIFT8,e._instanced?o(a=n._index,r,u):(o(0+(a=4*n._index),r+LOWER_LEFT,u),o(a+1,r+LOWER_RIGHT,u),o(a+2,r+UPPER_RIGHT,u),o(a+3,r+UPPER_LEFT,u)))}function writeBillboard(e,t,i,r,n){writePositionScaleAndRotation(e,t,i,r,n),writeCompressedAttrib0(e,t,i,r,n),writeCompressedAttrib1(e,t,i,r,n),writeCompressedAttrib2(e,t,i,r,n),writeEyeOffset(e,t,i,r,n),writeScaleByDistance(e,t,i,r,n),writePixelOffsetScaleByDistance(e,t,i,r,n),writeCompressedAttribute3(e,t,i,r,n),writeTextureCoordinateBoundsOrLabelTranslate(e,t,i,r,n),writeBatchId(e,t,i,r,n),writeSDF(e,t,i,r,n)}function recomputeActualPositions(e,t,i,r,n,a){var o;r.mode===SceneMode$1.SCENE3D?(o=e._baseVolume,e._boundingVolumeDirty=!0):o=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var c=t[l],u=c.position;defined(u=Billboard._computeActualPosition(c,u,r,n))&&(c._setActualPosition(u),a?s.push(u):BoundingSphere.expand(o,u,o))}a&&BoundingSphere.fromPoints(s,o)}function updateMode(e,t){var i=t.mode,r=e._billboards,n=e._billboardsToUpdate,a=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==SceneMode$1.SCENE3D&&!Matrix4.equals(a,e.modelMatrix)?(e._mode=i,Matrix4.clone(e.modelMatrix,a),e._createVertexArray=!0,i!==SceneMode$1.SCENE3D&&i!==SceneMode$1.SCENE2D&&i!==SceneMode$1.COLUMBUS_VIEW||recomputeActualPositions(e,r,r.length,t,a,!0)):i===SceneMode$1.MORPHING?recomputeActualPositions(e,r,r.length,t,a,!0):i!==SceneMode$1.SCENE2D&&i!==SceneMode$1.COLUMBUS_VIEW||recomputeActualPositions(e,n,e._billboardsToUpdateIndex,t,a,!1)}function updateBoundingVolume(e,t,i){var r=1;e._allSizedInMeters&&0===e._maxPixelOffset||(r=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)),t=r*e._maxScale*e._maxSize*2,e._allHorizontalCenter&&e._allVerticalCenter&&(t*=.5),e=r*e._maxPixelOffset+e._maxEyeOffset,i.radius+=t+e}function createDebugCommand(e,t){return(t=t.createViewportQuadCommand("uniform sampler2D billboard_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n    gl_FragColor = texture2D(billboard_texture, v_textureCoordinates); \n} \n",{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}})).pass=Pass$1.OVERLAY,t}var scratchWriterArray=[];function createBillboardPointCallback(e,t,i,r,n){return function(){var a=document.createElement("canvas"),o=n+2*r;a.height=a.width=o;var s=a.getContext("2d");return s.clearRect(0,0,o,o),0!==r&&(s.beginPath(),s.arc(o/2,o/2,o/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=i,s.fill(),e<1&&(s.save(),s.globalCompositeOperation="destination-out",s.beginPath(),s.arc(o/2,o/2,n/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(o/2,o/2,n/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),a}}function Cesium3DTilePointFeature(e,t,i,r,n){this._content=e,this._billboard=i,this._label=r,this._polyline=n,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),setBillboardImage(this)}BillboardCollection.prototype.update=function(e){removeBillboards(this);var t=this._billboards,i=t.length,r=e.context;if(this._instanced=r.instancedArrays,attributeLocations=this._instanced?attributeLocationsInstanced:attributeLocationsBatched,getIndexBuffer=this._instanced?getIndexBufferInstanced:getIndexBufferBatched,!defined(A=this._textureAtlas)){A=this._textureAtlas=new TextureAtlas({context:r});for(var n=0;n<i;++n)t[n]._loadImage()}var a=A.textureCoordinates;if(0!==a.length){updateMode(this,e),i=(t=this._billboards).length;var o=this._billboardsToUpdate,s=this._billboardsToUpdateIndex,l=this._propertiesChanged,c=A.guid,u=this._createVertexArray||this._textureAtlasGUID!==c;this._textureAtlasGUID=c;var d=(L=e.passes).pick;if(u||!d&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var h=0;h<NUMBER_OF_PROPERTIES;++h)l[h]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),0<i){this._vaf=createVAF(r,i,this._buffersUsage,this._instanced,this._batchTable,this._sdf),y=this._vaf.writers;for(var p=0;p<i;++p){var f=this._billboards[p];f._dirty=!1,writeBillboard(this,e,a,y,f)}this._vaf.commit(getIndexBuffer(r))}this._billboardsToUpdateIndex=0}else if(0<s){var m=scratchWriterArray;m.length=0,(l[POSITION_INDEX$1]||l[ROTATION_INDEX$1]||l[SCALE_INDEX$1])&&m.push(writePositionScaleAndRotation),(l[IMAGE_INDEX_INDEX$1]||l[PIXEL_OFFSET_INDEX$1]||l[HORIZONTAL_ORIGIN_INDEX$1]||l[VERTICAL_ORIGIN_INDEX$1]||l[SHOW_INDEX$1])&&(m.push(writeCompressedAttrib0),this._instanced&&m.push(writeEyeOffset)),(l[IMAGE_INDEX_INDEX$1]||l[ALIGNED_AXIS_INDEX$1]||l[TRANSLUCENCY_BY_DISTANCE_INDEX$1])&&(m.push(writeCompressedAttrib1),m.push(writeCompressedAttrib2)),(l[IMAGE_INDEX_INDEX$1]||l[COLOR_INDEX$1])&&m.push(writeCompressedAttrib2),l[EYE_OFFSET_INDEX$1]&&m.push(writeEyeOffset),l[SCALE_BY_DISTANCE_INDEX$1]&&m.push(writeScaleByDistance),l[PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX$1]&&m.push(writePixelOffsetScaleByDistance),(l[DISTANCE_DISPLAY_CONDITION_INDEX]||l[DISABLE_DEPTH_DISTANCE$1]||l[IMAGE_INDEX_INDEX$1]||l[POSITION_INDEX$1])&&m.push(writeCompressedAttribute3),(l[IMAGE_INDEX_INDEX$1]||l[POSITION_INDEX$1])&&m.push(writeTextureCoordinateBoundsOrLabelTranslate),l[SDF_INDEX$1]&&m.push(writeSDF);var g=m.length,y=this._vaf.writers;if(.1<s/i){for(var _=0;_<s;++_){var v=o[_];v._dirty=!1;for(var C=0;C<g;++C)m[C](this,e,a,y,v)}this._vaf.commit(getIndexBuffer(r))}else{for(var x=0;x<s;++x){var b=o[x];b._dirty=!1;for(var S=0;S<g;++S)m[S](this,e,a,y,b);this._instanced?this._vaf.subCommit(b._index,1):this._vaf.subCommit(4*b._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(1.5*i<s&&(o.length=i),defined(this._vaf)&&defined(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,BoundingSphere.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var T,E=Matrix4.IDENTITY;updateBoundingVolume(this,e,T=e.mode===SceneMode$1.SCENE3D?(E=this.modelMatrix,BoundingSphere.clone(this._baseVolumeWC,this._boundingVolume)):BoundingSphere.clone(this._baseVolume2D,this._boundingVolume));var w,A=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,A&&(this._blendOption===BlendOption$1.OPAQUE||this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=RenderState.fromCache({depthTest:{enabled:!0,func:WebGLConstants$1.LESS},depthMask:!0}):this._rsOpaque=void 0,P=this._blendOption===BlendOption$1.TRANSLUCENT,this._blendOption===BlendOption$1.TRANSLUCENT||this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=RenderState.fromCache({depthTest:{enabled:!0,func:P?WebGLConstants$1.LEQUAL:WebGLConstants$1.LESS},depthMask:P,blending:BlendingState$1.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;var P;c=0<ContextLimits.maximumVertexTextureImageUnits;!A&&this._shaderRotation===this._compiledShaderRotation&&this._shaderAlignedAxis===this._compiledShaderAlignedAxis&&this._shaderScaleByDistance===this._compiledShaderScaleByDistance&&this._shaderTranslucencyByDistance===this._compiledShaderTranslucencyByDistance&&this._shaderPixelOffsetScaleByDistance===this._compiledShaderPixelOffsetScaleByDistance&&this._shaderDistanceDisplayCondition===this._compiledShaderDistanceDisplayCondition&&this._shaderDisableDepthDistance===this._compiledShaderDisableDepthDistance&&this._shaderClampToGround===this._compiledShaderClampToGround&&this._sdf===this._compiledSDF||(u=BillboardCollectionVS,d=BillboardCollectionFS,P=[],defined(this._batchTable)&&(P.push("VECTOR_TILE"),u=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(u),d=this._batchTable.getFragmentShaderCallback(!1,void 0)(d)),A=new ShaderSource({defines:P,sources:[u]}),this._instanced&&A.defines.push("INSTANCED"),this._shaderRotation&&A.defines.push("ROTATION"),this._shaderAlignedAxis&&A.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&A.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&A.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&A.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&A.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&A.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(c?A.defines.push("VERTEX_DEPTH_CHECK"):A.defines.push("FRAGMENT_DEPTH_CHECK")),P=1-SDFSettings$1.CUTOFF,this._sdf&&A.defines.push("SDF"),u=defined(this._batchTable)?"VECTOR_TILE":"",this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT&&(w=new ShaderSource({defines:["OPAQUE",u],sources:[d]}),this._shaderClampToGround&&(c?w.defines.push("VERTEX_DEPTH_CHECK"):w.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(w.defines.push("SDF"),w.defines.push("SDF_EDGE "+P)),this._sp=ShaderProgram.replaceCache({context:r,shaderProgram:this._sp,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:attributeLocations}),w=new ShaderSource({defines:["TRANSLUCENT",u],sources:[d]}),this._shaderClampToGround&&(c?w.defines.push("VERTEX_DEPTH_CHECK"):w.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(w.defines.push("SDF"),w.defines.push("SDF_EDGE "+P)),this._spTranslucent=ShaderProgram.replaceCache({context:r,shaderProgram:this._spTranslucent,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:attributeLocations})),this._blendOption===BlendOption$1.OPAQUE&&(w=new ShaderSource({defines:[u],sources:[d]}),this._shaderClampToGround&&(c?w.defines.push("VERTEX_DEPTH_CHECK"):w.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(w.defines.push("SDF"),w.defines.push("SDF_EDGE "+P)),this._sp=ShaderProgram.replaceCache({context:r,shaderProgram:this._sp,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:attributeLocations})),this._blendOption===BlendOption$1.TRANSLUCENT&&(w=new ShaderSource({defines:[u],sources:[d]}),this._shaderClampToGround&&(c?w.defines.push("VERTEX_DEPTH_CHECK"):w.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(w.defines.push("SDF"),w.defines.push("SDF_EDGE "+P)),this._spTranslucent=ShaderProgram.replaceCache({context:r,shaderProgram:this._spTranslucent,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:attributeLocations})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf);var D=e.commandList;if(L.render||L.pick){var M=this._colorCommands,I=this._blendOption===BlendOption$1.OPAQUE,R=this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT,O=this._vaf.va,L=O.length,N=this._uniforms,F=defined(this._batchTable)?(N=this._batchTable.getUniformMapCallback()(N),this._batchTable.getPickId()):"v_pickColor";M.length=L;for(var B=R?2*L:L,V=0;V<B;++V){var k=M[V];defined(k)||(k=M[V]=new DrawCommand);var z=I||R&&V%2==0;k.pass=z||!R?Pass$1.OPAQUE:Pass$1.TRANSLUCENT,k.owner=this;var G=R?Math.floor(V/2):V;k.boundingVolume=T,k.modelMatrix=E,k.count=O[G].indicesCount,k.shaderProgram=z?this._sp:this._spTranslucent,k.uniformMap=N,k.vertexArray=O[G].va,k.renderState=z?this._rsOpaque:this._rsTranslucent,k.debugShowBoundingVolume=this.debugShowBoundingVolume,k.pickId=F,this._instanced&&(k.count=6,k.instanceCount=i),D.push(k)}this.debugShowTextureAtlas&&(defined(this.debugCommand)||(this.debugCommand=createDebugCommand(this,e.context)),D.push(this.debugCommand))}}}},BillboardCollection.prototype.isDestroyed=function(){return!1},BillboardCollection.prototype.destroy=function(){return defined(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),destroyBillboards(this._billboards),destroyObject(this)};var scratchCartographic$5=new Cartographic;function setBillboardImage(e){var t,i,r,n,a,o,s,l,c=e._billboard;defined(e._billboardImage)&&e._billboardImage!==c.image?c.image=e._billboardImage:defined(e._billboardImage)||(s=defaultValue(e._color,Cesium3DTilePointFeature.defaultColor),l=defaultValue(e._pointOutlineColor,Cesium3DTilePointFeature.defaultPointOutlineColor),t=defaultValue(e._pointOutlineWidth,Cesium3DTilePointFeature.defaultPointOutlineWidth),i=defaultValue(e._pointSize,Cesium3DTilePointFeature.defaultPointSize),r=e._billboardColor,n=e._billboardOutlineColor,a=e._billboardOutlineWidth,o=e._billboardSize,Color.equals(s,r)&&Color.equals(l,n)&&t===a&&i===o||(e._billboardColor=Color.clone(s,e._billboardColor),e._billboardOutlineColor=Color.clone(l,e._billboardOutlineColor),e._billboardOutlineWidth=t,e._billboardSize=i,o=s.alpha,e=s.toCssColorString(),s=l.toCssColorString(),l=JSON.stringify([e,i,s,t]),c.setImage(l,createBillboardPointCallback(o,e,s,t,i))))}Object.defineProperties(Cesium3DTilePointFeature.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=Color.clone(e,this._color),setBillboardImage(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,setBillboardImage(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=Color.clone(e,this._pointOutlineColor),setBillboardImage(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,setBillboardImage(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&0<e.alpha}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){defined(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){var t=defaultValue(this._heightOffset,0),i=this._content.tileset.ellipsoid,r=i.cartesianToCartographic(this._billboard.position,scratchCartographic$5);r.height=r.height-t+e,r=i.cartographicToCartesian(r),this._billboard.position=r,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],r],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=Color.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){var t=this._billboardImage!==e;this._billboardImage=e,t&&setBillboardImage(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){var e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),Cesium3DTilePointFeature.defaultColor=Color.WHITE,Cesium3DTilePointFeature.defaultPointOutlineColor=Color.BLACK,Cesium3DTilePointFeature.defaultPointOutlineWidth=0,Cesium3DTilePointFeature.defaultPointSize=8,Cesium3DTilePointFeature.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},Cesium3DTilePointFeature.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},Cesium3DTilePointFeature.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},Cesium3DTilePointFeature.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},Cesium3DTilePointFeature.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},Cesium3DTilePointFeature.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},Cesium3DTilePointFeature.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var INF=1e20;function clamp(e,t,i){return t<i?e<t?t:i<e?i:e:e<i?i:t<e?t:e}function calcSDF(e,t){var i,r,n,a,o,s=null==(t=t||{}).cutoff?.25:t.cutoff,l=null==t.radius?8:t.radius,c=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,r=t.height,n=e,o=t.stride?t.stride:Math.floor(e.length/i/r)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=(f=e).getContext("2d"),i=f.width,r=f.height,n=(p=h.getImageData(0,0,i,r)).data,o=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(i=(f=(h=e).canvas).width,r=f.height,n=(p=h.getImageData(0,0,i,r)).data,o=4):window.ImageData&&e instanceof window.ImageData&&(i=(p=e).width,r=e.height,n=p.data,o=4);if(f=Math.max(i,r),window.Uint8ClampedArray&&n instanceof window.Uint8ClampedArray||window.Uint8Array&&n instanceof window.Uint8Array)for(a=n,n=Array(i*r),m=0,g=a.length;m<g;m++)n[m]=a[m*o+c]/255;else if(1!==o)throw Error("Raw data can have only 1 value per pixel");for(var u=Array(i*r),d=Array(i*r),h=Array(f),p=(e=Array(f),Array(f+1)),f=Array(f),m=0,g=i*r;m<g;m++){var y=n[m];u[m]=1===y?0:0===y?INF:Math.pow(Math.max(0,.5-y),2),d[m]=1===y?INF:0===y?0:Math.pow(Math.max(0,y-.5),2)}edt(u,i,r,h,e,f,p),edt(d,i,r,h,e,f,p);var _=new(window.Float32Array?Float32Array:Array)(i*r);for(m=0,g=i*r;m<g;m++)_[m]=clamp(1-((u[m]-d[m])/l+s),0,1);return _}function edt(e,t,i,r,n,a,o){for(var s=0;s<t;s++){for(var l=0;l<i;l++)r[l]=e[l*t+s];for(edt1d(r,n,a,o,i),l=0;l<i;l++)e[l*t+s]=n[l]}for(l=0;l<i;l++){for(s=0;s<t;s++)r[s]=e[l*t+s];for(edt1d(r,n,a,o,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(n[s])}}function edt1d(e,t,i,r,n){r[i[0]=0]=-INF,r[1]=+INF;for(var a=1,o=0;a<n;a++){for(var s=(e[a]+a*a-(e[i[o]]+i[o]*i[o]))/(2*a-2*i[o]);s<=r[o];)o--,s=(e[a]+a*a-(e[i[o]]+i[o]*i[o]))/(2*a-2*i[o]);i[++o]=a,r[o]=s,r[o+1]=+INF}for(o=a=0;a<n;a++){for(;r[o+1]<a;)o++;t[a]=(a-i[o])*(a-i[o])+e[i[o]]}}var LabelStyle={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},LabelStyle$1=Object.freeze(LabelStyle),fontInfoCache={},fontInfoCacheLength=0,fontInfoCacheMaxSize=256,defaultBackgroundColor=new Color(.165,.165,.165,.8),defaultBackgroundPadding=new Cartesian2(7,5),textTypes=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function rebindAllGlyphs(e){e._rebindAllGlyphs||e._repositionAllGlyphs||e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function repositionAllGlyphs(e){e._rebindAllGlyphs||e._repositionAllGlyphs||e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function getCSSValue$1(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function parseFont(e){var t,i,r=fontInfoCache[e._font];defined(r)||((t=document.createElement("div")).style.position="absolute",t.style.opacity=0,t.style.font=e._font,document.body.appendChild(t),i=Number.parseFloat(getCSSValue$1(t,"line-height")),isNaN(i)&&(i=void 0),r={family:getCSSValue$1(t,"font-family"),size:getCSSValue$1(t,"font-size").replace("px",""),style:getCSSValue$1(t,"font-style"),weight:getCSSValue$1(t,"font-weight"),lineHeight:i},document.body.removeChild(t),fontInfoCacheLength<fontInfoCacheMaxSize&&(fontInfoCache[e._font]=r,fontInfoCacheLength++)),e._fontFamily=r.family,e._fontSize=r.size,e._fontStyle=r.style,e._fontWeight=r.weight,e._lineHeight=r.lineHeight}function Label(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).translucencyByDistance,r=e.pixelOffsetScaleByDistance,n=e.scaleByDistance,a=e.distanceDisplayCondition;defined(i)&&(i=NearFarScalar.clone(i)),defined(r)&&(r=NearFarScalar.clone(r)),defined(n)&&(n=NearFarScalar.clone(n)),defined(a)&&(a=DistanceDisplayCondition.clone(a)),this._renderedText=void 0,this._text=void 0,this._show=defaultValue(e.show,!0),this._font=defaultValue(e.font,"30px sans-serif"),this._fillColor=Color.clone(defaultValue(e.fillColor,Color.WHITE)),this._outlineColor=Color.clone(defaultValue(e.outlineColor,Color.BLACK)),this._outlineWidth=defaultValue(e.outlineWidth,1),this._showBackground=defaultValue(e.showBackground,!1),this._backgroundColor=Color.clone(defaultValue(e.backgroundColor,defaultBackgroundColor)),this._backgroundPadding=Cartesian2.clone(defaultValue(e.backgroundPadding,defaultBackgroundPadding)),this._style=defaultValue(e.style,LabelStyle$1.FILL),this._verticalOrigin=defaultValue(e.verticalOrigin,VerticalOrigin$1.BASELINE),this._horizontalOrigin=defaultValue(e.horizontalOrigin,HorizontalOrigin$1.LEFT),this._pixelOffset=Cartesian2.clone(defaultValue(e.pixelOffset,Cartesian2.ZERO)),this._eyeOffset=Cartesian3.clone(defaultValue(e.eyeOffset,Cartesian3.ZERO)),this._position=Cartesian3.clone(defaultValue(e.position,Cartesian3.ZERO)),this._scale=defaultValue(e.scale,1),this._id=e.id,this._translucencyByDistance=i,this._pixelOffsetScaleByDistance=r,this._scaleByDistance=n,this._heightReference=defaultValue(e.heightReference,HeightReference$1.NONE),this._distanceDisplayCondition=a,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=defaultValue(e.text,""),this._relativeSize=1,parseFont(this),this._updateClamping()}function convertTextToTypes(e,t){for(var i=/[a-zA-Z0-9]/,r=/[()[\]{}<>]/,n=[],a="",o=textTypes.LTR,s="",l=e.length,c=0;c<l;++c){var u=e.charAt(c);s=t.test(u)?textTypes.RTL:i.test(u)?textTypes.LTR:r.test(u)?textTypes.BRACKETS:textTypes.WEAK;0===c&&(o=s),o===s&&s!==textTypes.BRACKETS?a+=u:(""!==a&&n.push({Type:o,Word:a}),o=s,a=u)}return n.push({Type:s,Word:a}),n}function reverseWord(e){return e.split("").reverse().join("")}function spliceWord(e,t,i){return e.slice(0,t)+i+e.slice(t)}function reverseBrackets(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}Object.defineProperties(Label.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i].billboard;defined(n)&&(n.show=e)}var a=this._backgroundBillboard;defined(a)&&(a.show=e)}}},position:{get:function(){return this._position},set:function(e){var t=this._position;if(!Cartesian3.equals(t,e)){Cartesian3.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r].billboard;defined(a)&&(a.position=e)}defined(t=this._backgroundBillboard)&&(t.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i].billboard;defined(n)&&(n.heightReference=e)}var a=this._backgroundBillboard;defined(a)&&(a.heightReference=e),repositionAllGlyphs(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){this._text!==e&&(this._text=e,this._renderedText=Label.enableRightToLeftDetection?reverseRtl(e):e,rebindAllGlyphs(this))}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,rebindAllGlyphs(this),parseFont(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){var t=this._fillColor;Color.equals(t,e)||(Color.clone(e,t),rebindAllGlyphs(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;Color.equals(t,e)||(Color.clone(e,t),rebindAllGlyphs(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,rebindAllGlyphs(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,rebindAllGlyphs(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){var t=this._backgroundColor;Color.equals(t,e)||(Color.clone(e,t),defined(e=this._backgroundBillboard)&&(e.color=t))}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){var t=this._backgroundPadding;Cartesian2.equals(t,e)||(Cartesian2.clone(e,t),repositionAllGlyphs(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,rebindAllGlyphs(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){var t=this._pixelOffset;if(!Cartesian2.equals(t,e)){Cartesian2.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.pixelOffset=e)}defined(t=this._backgroundBillboard)&&(t.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;if(!NearFarScalar.equals(t,e)){this._translucencyByDistance=NearFarScalar.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.translucencyByDistance=e)}defined(t=this._backgroundBillboard)&&(t.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){var t=this._pixelOffsetScaleByDistance;if(!NearFarScalar.equals(t,e)){this._pixelOffsetScaleByDistance=NearFarScalar.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.pixelOffsetScaleByDistance=e)}defined(t=this._backgroundBillboard)&&(t.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;if(!NearFarScalar.equals(t,e)){this._scaleByDistance=NearFarScalar.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.scaleByDistance=e)}defined(t=this._backgroundBillboard)&&(t.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){var t=this._eyeOffset;if(!Cartesian3.equals(t,e)){Cartesian3.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];defined(a.billboard)&&(a.billboard.eyeOffset=e)}defined(t=this._backgroundBillboard)&&(t.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,repositionAllGlyphs(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(this._verticalOrigin!==e){this._verticalOrigin=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.verticalOrigin=e)}var a=this._backgroundBillboard;defined(a)&&(a.verticalOrigin=e),repositionAllGlyphs(this)}}},scale:{get:function(){return this._scale},set:function(e){if(this._scale!==e){this._scale=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.scale=e*this._relativeSize)}var a=this._backgroundBillboard;defined(a)&&(a.scale=e*this._relativeSize),repositionAllGlyphs(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!DistanceDisplayCondition.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition);for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.distanceDisplayCondition=e)}var a=this._backgroundBillboard;defined(a)&&(a.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){this._disableDepthTestDistance=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.disableDepthTestDistance=e)}var a=this._backgroundBillboard;defined(a)&&(a.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.id=e)}var a=this._backgroundBillboard;defined(a)&&(a.id=e)}}},pickId:{get:function(){if(0!==this._glyphs.length&&defined(this._glyphs[0].billboard))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=Cartesian3.clone(e,this._actualClampedPosition);for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard._clampedPosition=e)}var a=this._backgroundBillboard;defined(a)&&(a._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i];defined(n.billboard)&&(n.billboard.clusterShow=e)}var a=this._backgroundBillboard;defined(a)&&(a.clusterShow=e)}}}}),Label.prototype._updateClamping=function(){Billboard._updateClamping(this._labelCollection,this)},Label.prototype.computeScreenSpacePosition=function(e,t){defined(t)||(t=new Cartesian2);var i=this._labelCollection.modelMatrix,r=defined(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Billboard._computeScreenSpacePosition(i,r,this._eyeOffset,this._pixelOffset,e,t)},Label.getScreenSpaceBoundingBox=function(e,t,i){var r=0,n=0,a=0,o=0,s=e.totalScale,l=e._backgroundBillboard;if(defined(l))r=t.x+l._translate.x,n=t.y-l._translate.y,a=l.width*s,o=l.height*s,e.verticalOrigin===VerticalOrigin$1.BOTTOM||e.verticalOrigin===VerticalOrigin$1.BASELINE?n-=o:e.verticalOrigin===VerticalOrigin$1.CENTER&&(n-=.5*o);else{r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(var c=0,u=0,d=e._glyphs,h=d.length,p=0;p<h;++p){var f,m,g=d[p],y=g.billboard;defined(y)&&(f=t.x+y._translate.x,m=t.y-y._translate.y,y=g.dimensions.width*s,g=g.dimensions.height*s,e.verticalOrigin===VerticalOrigin$1.BOTTOM||e.verticalOrigin===VerticalOrigin$1.BASELINE?m-=g:e.verticalOrigin===VerticalOrigin$1.CENTER&&(m-=.5*g),e._verticalOrigin===VerticalOrigin$1.TOP?m+=SDFSettings$1.PADDING*s:e._verticalOrigin!==VerticalOrigin$1.BOTTOM&&e._verticalOrigin!==VerticalOrigin$1.BASELINE||(m-=SDFSettings$1.PADDING*s),r=Math.min(r,f),n=Math.min(n,m),c=Math.max(c,f+y),u=Math.max(u,m+g))}a=c-r,o=u-n}return defined(i)||(i=new BoundingRectangle),i.x=r,i.y=n,i.width=a,i.height=o,i},Label.prototype.equals=function(e){return this===e||defined(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&Cartesian3.equals(this._position,e._position)&&Color.equals(this._fillColor,e._fillColor)&&Color.equals(this._outlineColor,e._outlineColor)&&Color.equals(this._backgroundColor,e._backgroundColor)&&Cartesian2.equals(this._backgroundPadding,e._backgroundPadding)&&Cartesian2.equals(this._pixelOffset,e._pixelOffset)&&Cartesian3.equals(this._eyeOffset,e._eyeOffset)&&NearFarScalar.equals(this._translucencyByDistance,e._translucencyByDistance)&&NearFarScalar.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&NearFarScalar.equals(this._scaleByDistance,e._scaleByDistance)&&DistanceDisplayCondition.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id},Label.prototype.isDestroyed=function(){return!1},Label.enableRightToLeftDetection=!1;var hebrew="א-ת",arabic="؀-ۿݐ-ݿࢠ-ࣿ",rtlChars=new RegExp("["+hebrew+arabic+"]");function reverseRtl(e){for(var t=e.split("\n"),i="",r=0;r<t.length;r++){for(var n=t[r],a=rtlChars.test(n.charAt(0)),o=convertTextToTypes(n,rtlChars),s=0,l="",c=0;c<o.length;++c){var u=o[c],d=(u.Type===textTypes.BRACKETS?reverseBrackets:reverseWord)(u.Word);a?u.Type===textTypes.RTL?(l=d+l,s=0):u.Type===textTypes.LTR?(l=spliceWord(l,s,u.Word),s+=u.Word.length):u.Type!==textTypes.WEAK&&u.Type!==textTypes.BRACKETS||(u.Type===textTypes.WEAK&&o[c-1].Type===textTypes.BRACKETS?l=d+l:o[c-1].Type===textTypes.RTL?(l=d+l,s=0):o.length>c+1?o[c+1].Type===textTypes.RTL?(l=d+l,s=0):(l=spliceWord(l,s,u.Word),s+=u.Word.length):l=spliceWord(l,0,d)):u.Type===textTypes.RTL?l=spliceWord(l,s,d):u.Type===textTypes.LTR?s=(l+=u.Word).length:u.Type!==textTypes.WEAK&&u.Type!==textTypes.BRACKETS||(0<c&&o[c-1].Type===textTypes.RTL?o.length>c+1?o[c+1].Type===textTypes.RTL?l=spliceWord(l,s,d):s=(l+=u.Word).length:l+=u.Word:s=(l+=u.Word).length)}i+=l,r<t.length-1&&(i+="\n")}return i}function GraphemeSplitter(){var e=3,t=4,i=12,r=13,n=16,a=17;function o(e,t){void 0===t&&(t=0);var i=e.charCodeAt(t);if(55296<=i&&i<=56319&&t<e.length-1){var r=i;return 56320<=(n=e.charCodeAt(t+1))&&n<=57343?1024*(r-55296)+(n-56320)+65536:r}if(56320<=i&&i<=57343&&1<=t){var n=i;return 55296<=(r=e.charCodeAt(t-1))&&r<=56319?1024*(r-55296)+(n-56320)+65536:n}return i}function s(o){return 1536<=o&&o<=1541||1757==o||1807==o||2274==o||3406==o||69821==o||70082<=o&&o<=70083||72250==o||72326<=o&&o<=72329||73030==o?i:13==o?0:10==o?1:0<=o&&o<=9||11<=o&&o<=12||14<=o&&o<=31||127<=o&&o<=159||173==o||1564==o||6158==o||8203==o||8206<=o&&o<=8207||8232==o||8233==o||8234<=o&&o<=8238||8288<=o&&o<=8292||8293==o||8294<=o&&o<=8303||55296<=o&&o<=57343||65279==o||65520<=o&&o<=65528||65529<=o&&o<=65531||113824<=o&&o<=113827||119155<=o&&o<=119162||917504==o||917505==o||917506<=o&&o<=917535||917632<=o&&o<=917759||918e3<=o&&o<=921599?2:768<=o&&o<=879||1155<=o&&o<=1159||1160<=o&&o<=1161||1425<=o&&o<=1469||1471==o||1473<=o&&o<=1474||1476<=o&&o<=1477||1479==o||1552<=o&&o<=1562||1611<=o&&o<=1631||1648==o||1750<=o&&o<=1756||1759<=o&&o<=1764||1767<=o&&o<=1768||1770<=o&&o<=1773||1809==o||1840<=o&&o<=1866||1958<=o&&o<=1968||2027<=o&&o<=2035||2070<=o&&o<=2073||2075<=o&&o<=2083||2085<=o&&o<=2087||2089<=o&&o<=2093||2137<=o&&o<=2139||2260<=o&&o<=2273||2275<=o&&o<=2306||2362==o||2364==o||2369<=o&&o<=2376||2381==o||2385<=o&&o<=2391||2402<=o&&o<=2403||2433==o||2492==o||2494==o||2497<=o&&o<=2500||2509==o||2519==o||2530<=o&&o<=2531||2561<=o&&o<=2562||2620==o||2625<=o&&o<=2626||2631<=o&&o<=2632||2635<=o&&o<=2637||2641==o||2672<=o&&o<=2673||2677==o||2689<=o&&o<=2690||2748==o||2753<=o&&o<=2757||2759<=o&&o<=2760||2765==o||2786<=o&&o<=2787||2810<=o&&o<=2815||2817==o||2876==o||2878==o||2879==o||2881<=o&&o<=2884||2893==o||2902==o||2903==o||2914<=o&&o<=2915||2946==o||3006==o||3008==o||3021==o||3031==o||3072==o||3134<=o&&o<=3136||3142<=o&&o<=3144||3146<=o&&o<=3149||3157<=o&&o<=3158||3170<=o&&o<=3171||3201==o||3260==o||3263==o||3266==o||3270==o||3276<=o&&o<=3277||3285<=o&&o<=3286||3298<=o&&o<=3299||3328<=o&&o<=3329||3387<=o&&o<=3388||3390==o||3393<=o&&o<=3396||3405==o||3415==o||3426<=o&&o<=3427||3530==o||3535==o||3538<=o&&o<=3540||3542==o||3551==o||3633==o||3636<=o&&o<=3642||3655<=o&&o<=3662||3761==o||3764<=o&&o<=3769||3771<=o&&o<=3772||3784<=o&&o<=3789||3864<=o&&o<=3865||3893==o||3895==o||3897==o||3953<=o&&o<=3966||3968<=o&&o<=3972||3974<=o&&o<=3975||3981<=o&&o<=3991||3993<=o&&o<=4028||4038==o||4141<=o&&o<=4144||4146<=o&&o<=4151||4153<=o&&o<=4154||4157<=o&&o<=4158||4184<=o&&o<=4185||4190<=o&&o<=4192||4209<=o&&o<=4212||4226==o||4229<=o&&o<=4230||4237==o||4253==o||4957<=o&&o<=4959||5906<=o&&o<=5908||5938<=o&&o<=5940||5970<=o&&o<=5971||6002<=o&&o<=6003||6068<=o&&o<=6069||6071<=o&&o<=6077||6086==o||6089<=o&&o<=6099||6109==o||6155<=o&&o<=6157||6277<=o&&o<=6278||6313==o||6432<=o&&o<=6434||6439<=o&&o<=6440||6450==o||6457<=o&&o<=6459||6679<=o&&o<=6680||6683==o||6742==o||6744<=o&&o<=6750||6752==o||6754==o||6757<=o&&o<=6764||6771<=o&&o<=6780||6783==o||6832<=o&&o<=6845||6846==o||6912<=o&&o<=6915||6964==o||6966<=o&&o<=6970||6972==o||6978==o||7019<=o&&o<=7027||7040<=o&&o<=7041||7074<=o&&o<=7077||7080<=o&&o<=7081||7083<=o&&o<=7085||7142==o||7144<=o&&o<=7145||7149==o||7151<=o&&o<=7153||7212<=o&&o<=7219||7222<=o&&o<=7223||7376<=o&&o<=7378||7380<=o&&o<=7392||7394<=o&&o<=7400||7405==o||7412==o||7416<=o&&o<=7417||7616<=o&&o<=7673||7675<=o&&o<=7679||8204==o||8400<=o&&o<=8412||8413<=o&&o<=8416||8417==o||8418<=o&&o<=8420||8421<=o&&o<=8432||11503<=o&&o<=11505||11647==o||11744<=o&&o<=11775||12330<=o&&o<=12333||12334<=o&&o<=12335||12441<=o&&o<=12442||42607==o||42608<=o&&o<=42610||42612<=o&&o<=42621||42654<=o&&o<=42655||42736<=o&&o<=42737||43010==o||43014==o||43019==o||43045<=o&&o<=43046||43204<=o&&o<=43205||43232<=o&&o<=43249||43302<=o&&o<=43309||43335<=o&&o<=43345||43392<=o&&o<=43394||43443==o||43446<=o&&o<=43449||43452==o||43493==o||43561<=o&&o<=43566||43569<=o&&o<=43570||43573<=o&&o<=43574||43587==o||43596==o||43644==o||43696==o||43698<=o&&o<=43700||43703<=o&&o<=43704||43710<=o&&o<=43711||43713==o||43756<=o&&o<=43757||43766==o||44005==o||44008==o||44013==o||64286==o||65024<=o&&o<=65039||65056<=o&&o<=65071||65438<=o&&o<=65439||66045==o||66272==o||66422<=o&&o<=66426||68097<=o&&o<=68099||68101<=o&&o<=68102||68108<=o&&o<=68111||68152<=o&&o<=68154||68159==o||68325<=o&&o<=68326||69633==o||69688<=o&&o<=69702||69759<=o&&o<=69761||69811<=o&&o<=69814||69817<=o&&o<=69818||69888<=o&&o<=69890||69927<=o&&o<=69931||69933<=o&&o<=69940||70003==o||70016<=o&&o<=70017||70070<=o&&o<=70078||70090<=o&&o<=70092||70191<=o&&o<=70193||70196==o||70198<=o&&o<=70199||70206==o||70367==o||70371<=o&&o<=70378||70400<=o&&o<=70401||70460==o||70462==o||70464==o||70487==o||70502<=o&&o<=70508||70512<=o&&o<=70516||70712<=o&&o<=70719||70722<=o&&o<=70724||70726==o||70832==o||70835<=o&&o<=70840||70842==o||70845==o||70847<=o&&o<=70848||70850<=o&&o<=70851||71087==o||71090<=o&&o<=71093||71100<=o&&o<=71101||71103<=o&&o<=71104||71132<=o&&o<=71133||71219<=o&&o<=71226||71229==o||71231<=o&&o<=71232||71339==o||71341==o||71344<=o&&o<=71349||71351==o||71453<=o&&o<=71455||71458<=o&&o<=71461||71463<=o&&o<=71467||72193<=o&&o<=72198||72201<=o&&o<=72202||72243<=o&&o<=72248||72251<=o&&o<=72254||72263==o||72273<=o&&o<=72278||72281<=o&&o<=72283||72330<=o&&o<=72342||72344<=o&&o<=72345||72752<=o&&o<=72758||72760<=o&&o<=72765||72767==o||72850<=o&&o<=72871||72874<=o&&o<=72880||72882<=o&&o<=72883||72885<=o&&o<=72886||73009<=o&&o<=73014||73018==o||73020<=o&&o<=73021||73023<=o&&o<=73029||73031==o||92912<=o&&o<=92916||92976<=o&&o<=92982||94095<=o&&o<=94098||113821<=o&&o<=113822||119141==o||119143<=o&&o<=119145||119150<=o&&o<=119154||119163<=o&&o<=119170||119173<=o&&o<=119179||119210<=o&&o<=119213||119362<=o&&o<=119364||121344<=o&&o<=121398||121403<=o&&o<=121452||121461==o||121476==o||121499<=o&&o<=121503||121505<=o&&o<=121519||122880<=o&&o<=122886||122888<=o&&o<=122904||122907<=o&&o<=122913||122915<=o&&o<=122916||122918<=o&&o<=122922||125136<=o&&o<=125142||125252<=o&&o<=125258||917536<=o&&o<=917631||917760<=o&&o<=917999?e:127462<=o&&o<=127487?t:2307==o||2363==o||2366<=o&&o<=2368||2377<=o&&o<=2380||2382<=o&&o<=2383||2434<=o&&o<=2435||2495<=o&&o<=2496||2503<=o&&o<=2504||2507<=o&&o<=2508||2563==o||2622<=o&&o<=2624||2691==o||2750<=o&&o<=2752||2761==o||2763<=o&&o<=2764||2818<=o&&o<=2819||2880==o||2887<=o&&o<=2888||2891<=o&&o<=2892||3007==o||3009<=o&&o<=3010||3014<=o&&o<=3016||3018<=o&&o<=3020||3073<=o&&o<=3075||3137<=o&&o<=3140||3202<=o&&o<=3203||3262==o||3264<=o&&o<=3265||3267<=o&&o<=3268||3271<=o&&o<=3272||3274<=o&&o<=3275||3330<=o&&o<=3331||3391<=o&&o<=3392||3398<=o&&o<=3400||3402<=o&&o<=3404||3458<=o&&o<=3459||3536<=o&&o<=3537||3544<=o&&o<=3550||3570<=o&&o<=3571||3635==o||3763==o||3902<=o&&o<=3903||3967==o||4145==o||4155<=o&&o<=4156||4182<=o&&o<=4183||4228==o||6070==o||6078<=o&&o<=6085||6087<=o&&o<=6088||6435<=o&&o<=6438||6441<=o&&o<=6443||6448<=o&&o<=6449||6451<=o&&o<=6456||6681<=o&&o<=6682||6741==o||6743==o||6765<=o&&o<=6770||6916==o||6965==o||6971==o||6973<=o&&o<=6977||6979<=o&&o<=6980||7042==o||7073==o||7078<=o&&o<=7079||7082==o||7143==o||7146<=o&&o<=7148||7150==o||7154<=o&&o<=7155||7204<=o&&o<=7211||7220<=o&&o<=7221||7393==o||7410<=o&&o<=7411||7415==o||43043<=o&&o<=43044||43047==o||43136<=o&&o<=43137||43188<=o&&o<=43203||43346<=o&&o<=43347||43395==o||43444<=o&&o<=43445||43450<=o&&o<=43451||43453<=o&&o<=43456||43567<=o&&o<=43568||43571<=o&&o<=43572||43597==o||43755==o||43758<=o&&o<=43759||43765==o||44003<=o&&o<=44004||44006<=o&&o<=44007||44009<=o&&o<=44010||44012==o||69632==o||69634==o||69762==o||69808<=o&&o<=69810||69815<=o&&o<=69816||69932==o||70018==o||70067<=o&&o<=70069||70079<=o&&o<=70080||70188<=o&&o<=70190||70194<=o&&o<=70195||70197==o||70368<=o&&o<=70370||70402<=o&&o<=70403||70463==o||70465<=o&&o<=70468||70471<=o&&o<=70472||70475<=o&&o<=70477||70498<=o&&o<=70499||70709<=o&&o<=70711||70720<=o&&o<=70721||70725==o||70833<=o&&o<=70834||70841==o||70843<=o&&o<=70844||70846==o||70849==o||71088<=o&&o<=71089||71096<=o&&o<=71099||71102==o||71216<=o&&o<=71218||71227<=o&&o<=71228||71230==o||71340==o||71342<=o&&o<=71343||71350==o||71456<=o&&o<=71457||71462==o||72199<=o&&o<=72200||72249==o||72279<=o&&o<=72280||72343==o||72751==o||72766==o||72873==o||72881==o||72884==o||94033<=o&&o<=94078||119142==o||119149==o?5:4352<=o&&o<=4447||43360<=o&&o<=43388?6:4448<=o&&o<=4519||55216<=o&&o<=55238?7:4520<=o&&o<=4607||55243<=o&&o<=55291?8:44032==o||44060==o||44088==o||44116==o||44144==o||44172==o||44200==o||44228==o||44256==o||44284==o||44312==o||44340==o||44368==o||44396==o||44424==o||44452==o||44480==o||44508==o||44536==o||44564==o||44592==o||44620==o||44648==o||44676==o||44704==o||44732==o||44760==o||44788==o||44816==o||44844==o||44872==o||44900==o||44928==o||44956==o||44984==o||45012==o||45040==o||45068==o||45096==o||45124==o||45152==o||45180==o||45208==o||45236==o||45264==o||45292==o||45320==o||45348==o||45376==o||45404==o||45432==o||45460==o||45488==o||45516==o||45544==o||45572==o||45600==o||45628==o||45656==o||45684==o||45712==o||45740==o||45768==o||45796==o||45824==o||45852==o||45880==o||45908==o||45936==o||45964==o||45992==o||46020==o||46048==o||46076==o||46104==o||46132==o||46160==o||46188==o||46216==o||46244==o||46272==o||46300==o||46328==o||46356==o||46384==o||46412==o||46440==o||46468==o||46496==o||46524==o||46552==o||46580==o||46608==o||46636==o||46664==o||46692==o||46720==o||46748==o||46776==o||46804==o||46832==o||46860==o||46888==o||46916==o||46944==o||46972==o||47e3==o||47028==o||47056==o||47084==o||47112==o||47140==o||47168==o||47196==o||47224==o||47252==o||47280==o||47308==o||47336==o||47364==o||47392==o||47420==o||47448==o||47476==o||47504==o||47532==o||47560==o||47588==o||47616==o||47644==o||47672==o||47700==o||47728==o||47756==o||47784==o||47812==o||47840==o||47868==o||47896==o||47924==o||47952==o||47980==o||48008==o||48036==o||48064==o||48092==o||48120==o||48148==o||48176==o||48204==o||48232==o||48260==o||48288==o||48316==o||48344==o||48372==o||48400==o||48428==o||48456==o||48484==o||48512==o||48540==o||48568==o||48596==o||48624==o||48652==o||48680==o||48708==o||48736==o||48764==o||48792==o||48820==o||48848==o||48876==o||48904==o||48932==o||48960==o||48988==o||49016==o||49044==o||49072==o||49100==o||49128==o||49156==o||49184==o||49212==o||49240==o||49268==o||49296==o||49324==o||49352==o||49380==o||49408==o||49436==o||49464==o||49492==o||49520==o||49548==o||49576==o||49604==o||49632==o||49660==o||49688==o||49716==o||49744==o||49772==o||49800==o||49828==o||49856==o||49884==o||49912==o||49940==o||49968==o||49996==o||50024==o||50052==o||50080==o||50108==o||50136==o||50164==o||50192==o||50220==o||50248==o||50276==o||50304==o||50332==o||50360==o||50388==o||50416==o||50444==o||50472==o||50500==o||50528==o||50556==o||50584==o||50612==o||50640==o||50668==o||50696==o||50724==o||50752==o||50780==o||50808==o||50836==o||50864==o||50892==o||50920==o||50948==o||50976==o||51004==o||51032==o||51060==o||51088==o||51116==o||51144==o||51172==o||51200==o||51228==o||51256==o||51284==o||51312==o||51340==o||51368==o||51396==o||51424==o||51452==o||51480==o||51508==o||51536==o||51564==o||51592==o||51620==o||51648==o||51676==o||51704==o||51732==o||51760==o||51788==o||51816==o||51844==o||51872==o||51900==o||51928==o||51956==o||51984==o||52012==o||52040==o||52068==o||52096==o||52124==o||52152==o||52180==o||52208==o||52236==o||52264==o||52292==o||52320==o||52348==o||52376==o||52404==o||52432==o||52460==o||52488==o||52516==o||52544==o||52572==o||52600==o||52628==o||52656==o||52684==o||52712==o||52740==o||52768==o||52796==o||52824==o||52852==o||52880==o||52908==o||52936==o||52964==o||52992==o||53020==o||53048==o||53076==o||53104==o||53132==o||53160==o||53188==o||53216==o||53244==o||53272==o||53300==o||53328==o||53356==o||53384==o||53412==o||53440==o||53468==o||53496==o||53524==o||53552==o||53580==o||53608==o||53636==o||53664==o||53692==o||53720==o||53748==o||53776==o||53804==o||53832==o||53860==o||53888==o||53916==o||53944==o||53972==o||54e3==o||54028==o||54056==o||54084==o||54112==o||54140==o||54168==o||54196==o||54224==o||54252==o||54280==o||54308==o||54336==o||54364==o||54392==o||54420==o||54448==o||54476==o||54504==o||54532==o||54560==o||54588==o||54616==o||54644==o||54672==o||54700==o||54728==o||54756==o||54784==o||54812==o||54840==o||54868==o||54896==o||54924==o||54952==o||54980==o||55008==o||55036==o||55064==o||55092==o||55120==o||55148==o||55176==o?9:44033<=o&&o<=44059||44061<=o&&o<=44087||44089<=o&&o<=44115||44117<=o&&o<=44143||44145<=o&&o<=44171||44173<=o&&o<=44199||44201<=o&&o<=44227||44229<=o&&o<=44255||44257<=o&&o<=44283||44285<=o&&o<=44311||44313<=o&&o<=44339||44341<=o&&o<=44367||44369<=o&&o<=44395||44397<=o&&o<=44423||44425<=o&&o<=44451||44453<=o&&o<=44479||44481<=o&&o<=44507||44509<=o&&o<=44535||44537<=o&&o<=44563||44565<=o&&o<=44591||44593<=o&&o<=44619||44621<=o&&o<=44647||44649<=o&&o<=44675||44677<=o&&o<=44703||44705<=o&&o<=44731||44733<=o&&o<=44759||44761<=o&&o<=44787||44789<=o&&o<=44815||44817<=o&&o<=44843||44845<=o&&o<=44871||44873<=o&&o<=44899||44901<=o&&o<=44927||44929<=o&&o<=44955||44957<=o&&o<=44983||44985<=o&&o<=45011||45013<=o&&o<=45039||45041<=o&&o<=45067||45069<=o&&o<=45095||45097<=o&&o<=45123||45125<=o&&o<=45151||45153<=o&&o<=45179||45181<=o&&o<=45207||45209<=o&&o<=45235||45237<=o&&o<=45263||45265<=o&&o<=45291||45293<=o&&o<=45319||45321<=o&&o<=45347||45349<=o&&o<=45375||45377<=o&&o<=45403||45405<=o&&o<=45431||45433<=o&&o<=45459||45461<=o&&o<=45487||45489<=o&&o<=45515||45517<=o&&o<=45543||45545<=o&&o<=45571||45573<=o&&o<=45599||45601<=o&&o<=45627||45629<=o&&o<=45655||45657<=o&&o<=45683||45685<=o&&o<=45711||45713<=o&&o<=45739||45741<=o&&o<=45767||45769<=o&&o<=45795||45797<=o&&o<=45823||45825<=o&&o<=45851||45853<=o&&o<=45879||45881<=o&&o<=45907||45909<=o&&o<=45935||45937<=o&&o<=45963||45965<=o&&o<=45991||45993<=o&&o<=46019||46021<=o&&o<=46047||46049<=o&&o<=46075||46077<=o&&o<=46103||46105<=o&&o<=46131||46133<=o&&o<=46159||46161<=o&&o<=46187||46189<=o&&o<=46215||46217<=o&&o<=46243||46245<=o&&o<=46271||46273<=o&&o<=46299||46301<=o&&o<=46327||46329<=o&&o<=46355||46357<=o&&o<=46383||46385<=o&&o<=46411||46413<=o&&o<=46439||46441<=o&&o<=46467||46469<=o&&o<=46495||46497<=o&&o<=46523||46525<=o&&o<=46551||46553<=o&&o<=46579||46581<=o&&o<=46607||46609<=o&&o<=46635||46637<=o&&o<=46663||46665<=o&&o<=46691||46693<=o&&o<=46719||46721<=o&&o<=46747||46749<=o&&o<=46775||46777<=o&&o<=46803||46805<=o&&o<=46831||46833<=o&&o<=46859||46861<=o&&o<=46887||46889<=o&&o<=46915||46917<=o&&o<=46943||46945<=o&&o<=46971||46973<=o&&o<=46999||47001<=o&&o<=47027||47029<=o&&o<=47055||47057<=o&&o<=47083||47085<=o&&o<=47111||47113<=o&&o<=47139||47141<=o&&o<=47167||47169<=o&&o<=47195||47197<=o&&o<=47223||47225<=o&&o<=47251||47253<=o&&o<=47279||47281<=o&&o<=47307||47309<=o&&o<=47335||47337<=o&&o<=47363||47365<=o&&o<=47391||47393<=o&&o<=47419||47421<=o&&o<=47447||47449<=o&&o<=47475||47477<=o&&o<=47503||47505<=o&&o<=47531||47533<=o&&o<=47559||47561<=o&&o<=47587||47589<=o&&o<=47615||47617<=o&&o<=47643||47645<=o&&o<=47671||47673<=o&&o<=47699||47701<=o&&o<=47727||47729<=o&&o<=47755||47757<=o&&o<=47783||47785<=o&&o<=47811||47813<=o&&o<=47839||47841<=o&&o<=47867||47869<=o&&o<=47895||47897<=o&&o<=47923||47925<=o&&o<=47951||47953<=o&&o<=47979||47981<=o&&o<=48007||48009<=o&&o<=48035||48037<=o&&o<=48063||48065<=o&&o<=48091||48093<=o&&o<=48119||48121<=o&&o<=48147||48149<=o&&o<=48175||48177<=o&&o<=48203||48205<=o&&o<=48231||48233<=o&&o<=48259||48261<=o&&o<=48287||48289<=o&&o<=48315||48317<=o&&o<=48343||48345<=o&&o<=48371||48373<=o&&o<=48399||48401<=o&&o<=48427||48429<=o&&o<=48455||48457<=o&&o<=48483||48485<=o&&o<=48511||48513<=o&&o<=48539||48541<=o&&o<=48567||48569<=o&&o<=48595||48597<=o&&o<=48623||48625<=o&&o<=48651||48653<=o&&o<=48679||48681<=o&&o<=48707||48709<=o&&o<=48735||48737<=o&&o<=48763||48765<=o&&o<=48791||48793<=o&&o<=48819||48821<=o&&o<=48847||48849<=o&&o<=48875||48877<=o&&o<=48903||48905<=o&&o<=48931||48933<=o&&o<=48959||48961<=o&&o<=48987||48989<=o&&o<=49015||49017<=o&&o<=49043||49045<=o&&o<=49071||49073<=o&&o<=49099||49101<=o&&o<=49127||49129<=o&&o<=49155||49157<=o&&o<=49183||49185<=o&&o<=49211||49213<=o&&o<=49239||49241<=o&&o<=49267||49269<=o&&o<=49295||49297<=o&&o<=49323||49325<=o&&o<=49351||49353<=o&&o<=49379||49381<=o&&o<=49407||49409<=o&&o<=49435||49437<=o&&o<=49463||49465<=o&&o<=49491||49493<=o&&o<=49519||49521<=o&&o<=49547||49549<=o&&o<=49575||49577<=o&&o<=49603||49605<=o&&o<=49631||49633<=o&&o<=49659||49661<=o&&o<=49687||49689<=o&&o<=49715||49717<=o&&o<=49743||49745<=o&&o<=49771||49773<=o&&o<=49799||49801<=o&&o<=49827||49829<=o&&o<=49855||49857<=o&&o<=49883||49885<=o&&o<=49911||49913<=o&&o<=49939||49941<=o&&o<=49967||49969<=o&&o<=49995||49997<=o&&o<=50023||50025<=o&&o<=50051||50053<=o&&o<=50079||50081<=o&&o<=50107||50109<=o&&o<=50135||50137<=o&&o<=50163||50165<=o&&o<=50191||50193<=o&&o<=50219||50221<=o&&o<=50247||50249<=o&&o<=50275||50277<=o&&o<=50303||50305<=o&&o<=50331||50333<=o&&o<=50359||50361<=o&&o<=50387||50389<=o&&o<=50415||50417<=o&&o<=50443||50445<=o&&o<=50471||50473<=o&&o<=50499||50501<=o&&o<=50527||50529<=o&&o<=50555||50557<=o&&o<=50583||50585<=o&&o<=50611||50613<=o&&o<=50639||50641<=o&&o<=50667||50669<=o&&o<=50695||50697<=o&&o<=50723||50725<=o&&o<=50751||50753<=o&&o<=50779||50781<=o&&o<=50807||50809<=o&&o<=50835||50837<=o&&o<=50863||50865<=o&&o<=50891||50893<=o&&o<=50919||50921<=o&&o<=50947||50949<=o&&o<=50975||50977<=o&&o<=51003||51005<=o&&o<=51031||51033<=o&&o<=51059||51061<=o&&o<=51087||51089<=o&&o<=51115||51117<=o&&o<=51143||51145<=o&&o<=51171||51173<=o&&o<=51199||51201<=o&&o<=51227||51229<=o&&o<=51255||51257<=o&&o<=51283||51285<=o&&o<=51311||51313<=o&&o<=51339||51341<=o&&o<=51367||51369<=o&&o<=51395||51397<=o&&o<=51423||51425<=o&&o<=51451||51453<=o&&o<=51479||51481<=o&&o<=51507||51509<=o&&o<=51535||51537<=o&&o<=51563||51565<=o&&o<=51591||51593<=o&&o<=51619||51621<=o&&o<=51647||51649<=o&&o<=51675||51677<=o&&o<=51703||51705<=o&&o<=51731||51733<=o&&o<=51759||51761<=o&&o<=51787||51789<=o&&o<=51815||51817<=o&&o<=51843||51845<=o&&o<=51871||51873<=o&&o<=51899||51901<=o&&o<=51927||51929<=o&&o<=51955||51957<=o&&o<=51983||51985<=o&&o<=52011||52013<=o&&o<=52039||52041<=o&&o<=52067||52069<=o&&o<=52095||52097<=o&&o<=52123||52125<=o&&o<=52151||52153<=o&&o<=52179||52181<=o&&o<=52207||52209<=o&&o<=52235||52237<=o&&o<=52263||52265<=o&&o<=52291||52293<=o&&o<=52319||52321<=o&&o<=52347||52349<=o&&o<=52375||52377<=o&&o<=52403||52405<=o&&o<=52431||52433<=o&&o<=52459||52461<=o&&o<=52487||52489<=o&&o<=52515||52517<=o&&o<=52543||52545<=o&&o<=52571||52573<=o&&o<=52599||52601<=o&&o<=52627||52629<=o&&o<=52655||52657<=o&&o<=52683||52685<=o&&o<=52711||52713<=o&&o<=52739||52741<=o&&o<=52767||52769<=o&&o<=52795||52797<=o&&o<=52823||52825<=o&&o<=52851||52853<=o&&o<=52879||52881<=o&&o<=52907||52909<=o&&o<=52935||52937<=o&&o<=52963||52965<=o&&o<=52991||52993<=o&&o<=53019||53021<=o&&o<=53047||53049<=o&&o<=53075||53077<=o&&o<=53103||53105<=o&&o<=53131||53133<=o&&o<=53159||53161<=o&&o<=53187||53189<=o&&o<=53215||53217<=o&&o<=53243||53245<=o&&o<=53271||53273<=o&&o<=53299||53301<=o&&o<=53327||53329<=o&&o<=53355||53357<=o&&o<=53383||53385<=o&&o<=53411||53413<=o&&o<=53439||53441<=o&&o<=53467||53469<=o&&o<=53495||53497<=o&&o<=53523||53525<=o&&o<=53551||53553<=o&&o<=53579||53581<=o&&o<=53607||53609<=o&&o<=53635||53637<=o&&o<=53663||53665<=o&&o<=53691||53693<=o&&o<=53719||53721<=o&&o<=53747||53749<=o&&o<=53775||53777<=o&&o<=53803||53805<=o&&o<=53831||53833<=o&&o<=53859||53861<=o&&o<=53887||53889<=o&&o<=53915||53917<=o&&o<=53943||53945<=o&&o<=53971||53973<=o&&o<=53999||54001<=o&&o<=54027||54029<=o&&o<=54055||54057<=o&&o<=54083||54085<=o&&o<=54111||54113<=o&&o<=54139||54141<=o&&o<=54167||54169<=o&&o<=54195||54197<=o&&o<=54223||54225<=o&&o<=54251||54253<=o&&o<=54279||54281<=o&&o<=54307||54309<=o&&o<=54335||54337<=o&&o<=54363||54365<=o&&o<=54391||54393<=o&&o<=54419||54421<=o&&o<=54447||54449<=o&&o<=54475||54477<=o&&o<=54503||54505<=o&&o<=54531||54533<=o&&o<=54559||54561<=o&&o<=54587||54589<=o&&o<=54615||54617<=o&&o<=54643||54645<=o&&o<=54671||54673<=o&&o<=54699||54701<=o&&o<=54727||54729<=o&&o<=54755||54757<=o&&o<=54783||54785<=o&&o<=54811||54813<=o&&o<=54839||54841<=o&&o<=54867||54869<=o&&o<=54895||54897<=o&&o<=54923||54925<=o&&o<=54951||54953<=o&&o<=54979||54981<=o&&o<=55007||55009<=o&&o<=55035||55037<=o&&o<=55063||55065<=o&&o<=55091||55093<=o&&o<=55119||55121<=o&&o<=55147||55149<=o&&o<=55175||55177<=o&&o<=55203?10:9757==o||9977==o||9994<=o&&o<=9997||127877==o||127938<=o&&o<=127940||127943==o||127946<=o&&o<=127948||128066<=o&&o<=128067||128070<=o&&o<=128080||128110==o||128112<=o&&o<=128120||128124==o||128129<=o&&o<=128131||128133<=o&&o<=128135||128170==o||128372<=o&&o<=128373||128378==o||128400==o||128405<=o&&o<=128406||128581<=o&&o<=128583||128587<=o&&o<=128591||128675==o||128692<=o&&o<=128694||128704==o||128716==o||129304<=o&&o<=129308||129310<=o&&o<=129311||129318==o||129328<=o&&o<=129337||129341<=o&&o<=129342||129489<=o&&o<=129501?r:127995<=o&&o<=127999?14:8205==o?15:9792==o||9794==o||9877<=o&&o<=9878||9992==o||10084==o||127752==o||127806==o||127859==o||127891==o||127908==o||127912==o||127979==o||127981==o||128139==o||128187<=o&&o<=128188||128295==o||128300==o||128488==o||128640==o||128658==o?n:128102<=o&&o<=128105?a:11}return this.nextBreak=function(l,c){if(void 0===c&&(c=0),c<0)return 0;if(c>=l.length-1)return l.length;for(var u,d,h,p,f,m,g=s(o(l,c)),y=[],_=c+1;_<l.length;_++)if(m=_-1,!(55296<=(f=l).charCodeAt(m)&&f.charCodeAt(m)<=56319&&56320<=f.charCodeAt(m+1)&&f.charCodeAt(m+1)<=57343)){var v=s(o(l,_));if(u=v,d=void 0,h=(d=[f=g].concat(m=y).concat([u]))[d.length-2],p=u,1<(u=d.lastIndexOf(14))&&d.slice(1,u).every((function(t){return t==e}))&&-1==[e,r,a].indexOf(f)||(0<(f=d.lastIndexOf(t))&&d.slice(1,f).every((function(e){return e==t}))&&-1==[i,t].indexOf(h)?d.filter((function(e){return e==t})).length%2==1||4:(0!=h||1!=p)&&(2==h||0==h||1==h?14==p&&m.every((function(t){return t==e}))||1:2==p||0==p||1==p||(6!=h||6!=p&&7!=p&&9!=p&&10!=p)&&(9!=h&&7!=h||7!=p&&8!=p)&&(10!=h&&8!=h||8!=p)&&p!=e&&15!=p&&5!=p&&h!=i&&(f=-1!=d.indexOf(e)?d.lastIndexOf(e)-1:d.length-2,!(-1!=[r,a].indexOf(d[f])&&d.slice(1+f,-1).every((function(t){return t==e}))&&14==p||15==h&&-1!=[n,a].indexOf(p))&&(-1!=m.indexOf(t)||(h!=t||p!=t))))))return _;y.push(v)}return l.length},this.splitGraphemes=function(e){for(var t,i=[],r=0;(t=this.nextBreak(e,r))<e.length;)i.push(e.slice(r,t)),r=t;return r<e.length&&i.push(e.slice(r)),i},this.iterateGraphemes=function(e){var t=0,i={next:function(){var i,r;return(r=this.nextBreak(e,t))<e.length?(i=e.slice(t,r),t=r,{value:i,done:!1}):t<e.length?(i=e.slice(t),t=e.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return"undefined"!=typeof Symbol&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(e){for(var t,i=0,r=0;(t=this.nextBreak(e,r))<e.length;)r=t,i++;return r<e.length&&i++,i},this}function Glyph(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function GlyphTextureInfo(e,t,i){this.labelCollection=e,this.index=t,this.dimensions=i}var defaultLineSpacingPercent=1.2,whitePixelCanvasId="ID_WHITE_PIXEL",whitePixelSize=new Cartesian2(4,4),whitePixelBoundingRegion=new BoundingRectangle(1,1,1,1);function addWhitePixelCanvas(e,t){var i=document.createElement("canvas");i.width=whitePixelSize.x,i.height=whitePixelSize.y;var r=i.getContext("2d");r.fillStyle="#fff",r.fillRect(0,0,i.width,i.height),e.addImage(whitePixelCanvasId,i).then((function(e){t._whitePixelIndex=e}))}var writeTextToCanvasParameters={};function createGlyphCanvas(e,t,i,r,n,a,o){return writeTextToCanvasParameters.font=t,writeTextToCanvasParameters.fillColor=i,writeTextToCanvasParameters.strokeColor=r,writeTextToCanvasParameters.strokeWidth=n,writeTextToCanvasParameters.padding=SDFSettings$1.PADDING,o===VerticalOrigin$1.CENTER?writeTextToCanvasParameters.textBaseline="middle":o===VerticalOrigin$1.TOP?writeTextToCanvasParameters.textBaseline="top":writeTextToCanvasParameters.textBaseline="bottom",writeTextToCanvasParameters.fill=a===LabelStyle$1.FILL||a===LabelStyle$1.FILL_AND_OUTLINE,writeTextToCanvasParameters.stroke=a===LabelStyle$1.OUTLINE||a===LabelStyle$1.FILL_AND_OUTLINE,writeTextToCanvasParameters.backgroundColor=Color.BLACK,writeTextToCanvas(e,writeTextToCanvasParameters)}function unbindGlyph(e,t){t.textureInfo=void 0,t.dimensions=void 0;var i=t.billboard;defined(i)&&(i.show=!1,i.image=void 0,defined(i._removeCallbackFunc)&&(i._removeCallbackFunc(),i._removeCallbackFunc=void 0),e._spareBillboards.push(i),t.billboard=void 0)}function addGlyphToTextureAtlas(e,t,i,r){e.addImage(t,i).then((function(e){r.index=e}))}var splitter=new GraphemeSplitter;function rebindAllGlyphs$1(e,t){var i,r=t._renderedText,n=splitter.splitGraphemes(r),a=n.length,o=t._glyphs,s=o.length;if(t._relativeSize=t._fontSize/SDFSettings$1.FONT_SIZE,a<s)for(i=a;i<s;++i)unbindGlyph(e,o[i]);o.length=a;var l=t._showBackground&&0<r.split("\n").join("").length,c=t._backgroundBillboard;r=e._backgroundBillboardCollection;l?(defined(c)||(c=r.add({collection:e,image:whitePixelCanvasId,imageSubRegion:whitePixelBoundingRegion}),t._backgroundBillboard=c),c.color=t._backgroundColor,c.show=t._show,c.position=t._position,c.eyeOffset=t._eyeOffset,c.pixelOffset=t._pixelOffset,c.horizontalOrigin=HorizontalOrigin$1.LEFT,c.verticalOrigin=t._verticalOrigin,c.heightReference=t._heightReference,c.scale=t.totalScale,c.pickPrimitive=t,c.id=t._id,c.translucencyByDistance=t._translucencyByDistance,c.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,c.scaleByDistance=t._scaleByDistance,c.distanceDisplayCondition=t._distanceDisplayCondition,c.disableDepthTestDistance=t._disableDepthTestDistance):defined(c)&&(r.remove(c),t._backgroundBillboard=c=void 0);for(var u=e._glyphTextureCache,d=0;d<a;++d){var h=n[d],p=t._verticalOrigin,f=JSON.stringify([h,t._fontFamily,t._fontStyle,t._fontWeight,+p]);if(!defined(g=u[f])){var m=createGlyphCanvas(h,t._fontStyle+" "+t._fontWeight+" "+SDFSettings$1.FONT_SIZE+"px "+t._fontFamily,Color.WHITE,Color.WHITE,0,LabelStyle$1.FILL,p),g=new GlyphTextureInfo(e,-1,m.dimensions);if(u[f]=g,0<m.width&&0<m.height){for(var y=calcSDF(m,{cutoff:SDFSettings$1.CUTOFF,radius:SDFSettings$1.RADIUS}),_=(p=m.getContext("2d"),m.width),v=m.height,C=p.getImageData(0,0,_,v),x=0;x<_;x++)for(var b=0;b<v;b++){var S=255*y[T=b*_+x],T=4*T;C.data[0+T]=S,C.data[1+T]=S,C.data[2+T]=S,C.data[3+T]=S}p.putImageData(C,0,0)," "!==h&&addGlyphToTextureAtlas(e._textureAtlas,f,m,g)}}defined(h=o[d])?-1===g.index?unbindGlyph(e,h):defined(h.textureInfo)&&(h.textureInfo=void 0):(h=new Glyph,o[d]=h),h.textureInfo=g,h.dimensions=g.dimensions,-1!==g.index&&(m=h.billboard,g=e._spareBillboards,defined(m)||(0<g.length?m=g.pop():((m=e._billboardCollection.add({collection:e}))._labelDimensions=new Cartesian2,m._labelTranslate=new Cartesian2),h.billboard=m),m.show=t._show,m.position=t._position,m.eyeOffset=t._eyeOffset,m.pixelOffset=t._pixelOffset,m.horizontalOrigin=HorizontalOrigin$1.LEFT,m.verticalOrigin=t._verticalOrigin,m.heightReference=t._heightReference,m.scale=t.totalScale,m.pickPrimitive=t,m.id=t._id,m.image=f,m.translucencyByDistance=t._translucencyByDistance,m.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,m.scaleByDistance=t._scaleByDistance,m.distanceDisplayCondition=t._distanceDisplayCondition,m.disableDepthTestDistance=t._disableDepthTestDistance,m._batchIndex=t._batchIndex,m.outlineColor=t.outlineColor,t.style===LabelStyle$1.FILL_AND_OUTLINE?(m.color=t._fillColor,m.outlineWidth=t.outlineWidth):t.style===LabelStyle$1.FILL?(m.color=t._fillColor,m.outlineWidth=0):t.style===LabelStyle$1.OUTLINE&&(m.color=Color.TRANSPARENT,m.outlineWidth=t.outlineWidth))}t._repositionAllGlyphs=!0}function calculateWidthOffset(e,t,i){return t===HorizontalOrigin$1.CENTER?-e/2:t===HorizontalOrigin$1.RIGHT?-(e+i.x):i.x}var glyphPixelOffset=new Cartesian2,scratchBackgroundPadding=new Cartesian2;function repositionAllGlyphs$1(e){var t=e._glyphs,i=e._renderedText,r=0,n=0,a=[],o=Number.NEGATIVE_INFINITY,s=0,l=1,c=t.length,u=e._backgroundBillboard,d=Cartesian2.clone(defined(u)?e._backgroundPadding:Cartesian2.ZERO,scratchBackgroundPadding);for(d.x/=e._relativeSize,d.y/=e._relativeSize,A=0;A<c;++A)"\n"===i.charAt(A)?(a.push(r),++l,r=0):(T=(S=t[A]).dimensions,s=Math.max(s,T.height-T.descent),o=Math.max(o,T.descent),r+=T.width-T.bounds.minx,A<c-1&&(r+=t[A+1].dimensions.bounds.minx),n=Math.max(n,r));a.push(r);var h=s+o,p=e.totalScale,f=e._horizontalOrigin,m=e._verticalOrigin,g=0,y=calculateWidthOffset(a[g],f,d),_=(defined(e._lineHeight)?e._lineHeight:defaultLineSpacingPercent*e._fontSize)/e._relativeSize,v=_*(l-1),C=n,x=h+v;defined(u)&&(C+=2*d.x,x+=2*d.y,u._labelHorizontalOrigin=f),glyphPixelOffset.x=y*p;for(var b,S,T,E=!(glyphPixelOffset.y=0),w=0,A=0;A<c;++A)"\n"===i.charAt(A)?(w+=_,y=calculateWidthOffset(a[++g],f,d),glyphPixelOffset.x=y*p,E=!0):(T=(S=t[A]).dimensions,m===VerticalOrigin$1.TOP?(glyphPixelOffset.y=T.height-s-d.y,glyphPixelOffset.y+=SDFSettings$1.PADDING):m===VerticalOrigin$1.CENTER?glyphPixelOffset.y=(v+T.height-s)/2:(m===VerticalOrigin$1.BASELINE?glyphPixelOffset.y=v:glyphPixelOffset.y=v+o+d.y,glyphPixelOffset.y-=SDFSettings$1.PADDING),glyphPixelOffset.y=(glyphPixelOffset.y-T.descent-w)*p,E&&(glyphPixelOffset.x-=SDFSettings$1.PADDING*p,E=!1),defined(S.billboard)&&(S.billboard._setTranslate(glyphPixelOffset),S.billboard._labelDimensions.x=C,S.billboard._labelDimensions.y=x,S.billboard._labelHorizontalOrigin=f),A<c-1&&(b=t[A+1],glyphPixelOffset.x+=(T.width-T.bounds.minx+b.dimensions.bounds.minx)*p));if(defined(u)&&0<i.split("\n").join("").length&&(y=f===HorizontalOrigin$1.CENTER?-n/2-d.x:f===HorizontalOrigin$1.RIGHT?-(n+2*d.x):0,glyphPixelOffset.x=y*p,m===VerticalOrigin$1.TOP?glyphPixelOffset.y=h-s-o:m===VerticalOrigin$1.CENTER?glyphPixelOffset.y=(h-s)/2-o:m===VerticalOrigin$1.BASELINE?glyphPixelOffset.y=-d.y-o:glyphPixelOffset.y=0,glyphPixelOffset.y=glyphPixelOffset.y*p,u.width=C,u.height=x,u._setTranslate(glyphPixelOffset),u._labelTranslate=Cartesian2.clone(glyphPixelOffset,u._labelTranslate)),e.heightReference===HeightReference$1.CLAMP_TO_GROUND)for(A=0;A<c;++A){var P=(S=t[A]).billboard;defined(P)&&(P._labelTranslate=Cartesian2.clone(glyphPixelOffset,P._labelTranslate))}}function destroyLabel(e,t){for(var i=t._glyphs,r=0,n=i.length;r<n;++r)unbindGlyph(e,i[r]);defined(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,defined(t._removeCallbackFunc)&&t._removeCallbackFunc(),destroyObject(t)}function LabelCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._backgroundTextureAtlas=void 0,this._whitePixelIndex=void 0,this._backgroundBillboardCollection=new BillboardCollection({scene:this._scene}),this._backgroundBillboardCollection.destroyTextureAtlas=!1,this._billboardCollection=new BillboardCollection({scene:this._scene,batchTable:this._batchTable}),this._billboardCollection.destroyTextureAtlas=!1,this._billboardCollection._sdf=!0,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=Color.clone(Color.WHITE),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.blendOption=defaultValue(e.blendOption,BlendOption$1.OPAQUE_AND_TRANSLUCENT)}Object.defineProperties(LabelCollection.prototype,{length:{get:function(){return this._labels.length}}}),LabelCollection.prototype.add=function(e){return e=new Label(e,this),this._labels.push(e),this._labelsToUpdate.push(e),e},LabelCollection.prototype.remove=function(e){if(defined(e)&&e._labelCollection===this){var t=this._labels.indexOf(e);if(-1!==t)return this._labels.splice(t,1),destroyLabel(this,e),!0}return!1},LabelCollection.prototype.removeAll=function(){for(var e=this._labels,t=0,i=e.length;t<i;++t)destroyLabel(this,e[t]);e.length=0},LabelCollection.prototype.contains=function(e){return defined(e)&&e._labelCollection===this},LabelCollection.prototype.get=function(e){return this._labels[e]},LabelCollection.prototype.update=function(e){var t=this._billboardCollection,i=this._backgroundBillboardCollection;t.modelMatrix=this.modelMatrix,t.debugShowBoundingVolume=this.debugShowBoundingVolume,i.modelMatrix=this.modelMatrix,i.debugShowBoundingVolume=this.debugShowBoundingVolume;var r=e.context;defined(this._textureAtlas)||(this._textureAtlas=new TextureAtlas({context:r}),t.textureAtlas=this._textureAtlas),defined(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new TextureAtlas({context:r,initialSize:whitePixelSize}),i.textureAtlas=this._backgroundTextureAtlas,addWhitePixelCanvas(this._backgroundTextureAtlas,this));for(var n=this._labelsToUpdate.length,a=0;a<n;++a){var o,s=this._labelsToUpdate[a];s.isDestroyed()||(o=s._glyphs.length,s._rebindAllGlyphs&&(rebindAllGlyphs$1(this,s),s._rebindAllGlyphs=!1),s._repositionAllGlyphs&&(repositionAllGlyphs$1(s),s._repositionAllGlyphs=!1),o=s._glyphs.length-o,this._totalGlyphCount+=o)}r=0<i.length?BlendOption$1.TRANSLUCENT:this.blendOption,t.blendOption=r,i.blendOption=r,t._highlightColor=this._highlightColor,i._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,i.update(e),t.update(e)},LabelCollection.prototype.isDestroyed=function(){return!1},LabelCollection.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),destroyObject(this)};var PolylineVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 position2DHigh;\nattribute vec3 position2DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 prevPosition2DHigh;\nattribute vec3 prevPosition2DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec3 nextPosition2DHigh;\nattribute vec3 nextPosition2DLow;\nattribute vec4 texCoordExpandAndBatchIndex;\nvarying vec2  v_st;\nvarying float v_width;\nvarying vec4 v_pickColor;\nvarying float v_polylineAngle;\nvoid main()\n{\nfloat texCoord = texCoordExpandAndBatchIndex.x;\nfloat expandDir = texCoordExpandAndBatchIndex.y;\nbool usePrev = texCoordExpandAndBatchIndex.z < 0.0;\nfloat batchTableIndex = texCoordExpandAndBatchIndex.w;\nvec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\nfloat width = widthAndShow.x + 0.5;\nfloat show = widthAndShow.y;\nif (width < 1.0)\n{\nshow = 0.0;\n}\nvec4 pickColor = batchTable_getPickColor(batchTableIndex);\nvec4 p, prev, next;\nif (czm_morphTime == 1.0)\n{\np = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);\nprev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);\nnext = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);\n}\nelse if (czm_morphTime == 0.0)\n{\np = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\nprev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);\nnext = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);\n}\nelse\n{\np = czm_columbusViewMorph(\nczm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),\nczm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),\nczm_morphTime);\nprev = czm_columbusViewMorph(\nczm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),\nczm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),\nczm_morphTime);\nnext = czm_columbusViewMorph(\nczm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),\nczm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),\nczm_morphTime);\n}\n#ifdef DISTANCE_DISPLAY_CONDITION\nvec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\nvec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);\nvec3 centerLow = centerLowAndRadius.xyz;\nfloat radius = centerLowAndRadius.w;\nvec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nvec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);\nlengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);\n}\nfloat nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;\nfloat farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\nshow = 0.0;\n}\n#endif\nfloat polylineAngle;\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\ngl_Position = czm_viewportOrthographic * positionWC * show;\nv_st.s = texCoord;\nv_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\nv_width = width;\nv_pickColor = pickColor;\nv_polylineAngle = polylineAngle;\n}\n";function Polyline(e,t){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._show=defaultValue(e.show,!0),this._width=defaultValue(e.width,1),this._loop=defaultValue(e.loop,!1),this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,defined(this._material)||(this._material=Material.fromType(Material.ColorType,{color:new Color(1,1,1,1)}));var i,r=e.positions;defined(r)||(r=[]),this._positions=r,this._actualPositions=arrayRemoveDuplicates(r,Cartesian3.equalsEpsilon),this._loop&&2<this._actualPositions.length&&(this._actualPositions===this._positions&&(this._actualPositions=r.slice()),this._actualPositions.push(Cartesian3.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,defined(t)&&(i=Matrix4.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=PolylinePipeline.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(NUMBER_OF_PROPERTIES$1),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=BoundingSphere.fromPoints(this._actualPositions),this._boundingVolumeWC=BoundingSphere.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new BoundingSphere}var POSITION_INDEX$2=Polyline.POSITION_INDEX=0,SHOW_INDEX$2=Polyline.SHOW_INDEX=1,WIDTH_INDEX=Polyline.WIDTH_INDEX=2,MATERIAL_INDEX=Polyline.MATERIAL_INDEX=3,POSITION_SIZE_INDEX=Polyline.POSITION_SIZE_INDEX=4,DISTANCE_DISPLAY_CONDITION$1=Polyline.DISTANCE_DISPLAY_CONDITION=5,NUMBER_OF_PROPERTIES$1=Polyline.NUMBER_OF_PROPERTIES=6;function makeDirty$1(e,t){++e._propertiesChanged[t];var i=e._polylineCollection;defined(i)&&(i._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(Polyline.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,makeDirty$1(this,SHOW_INDEX$2))}},positions:{get:function(){return this._positions},set:function(e){var t=arrayRemoveDuplicates(e,Cartesian3.equalsEpsilon);this._loop&&2<t.length&&(t===e&&(t=e.slice()),t.push(Cartesian3.clone(t[0]))),this._actualPositions.length===t.length&&this._actualPositions.length===this._length||makeDirty$1(this,POSITION_SIZE_INDEX),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=BoundingSphere.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=BoundingSphere.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),makeDirty$1(this,POSITION_INDEX$2),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,makeDirty$1(this,MATERIAL_INDEX))}},width:{get:function(){return this._width},set:function(e){e!==this._width&&(this._width=e,makeDirty$1(this,WIDTH_INDEX))}},loop:{get:function(){return this._loop},set:function(e){var t;e!==this._loop&&(t=this._actualPositions,e?2<t.length&&!Cartesian3.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(Cartesian3.clone(t[0]))):2<t.length&&Cartesian3.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,makeDirty$1(this,POSITION_SIZE_INDEX))}},id:{get:function(){return this._id},set:function(e){this._id=e,defined(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!defined(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){DistanceDisplayCondition.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition),makeDirty$1(this,DISTANCE_DISPLAY_CONDITION$1))}}}),Polyline.prototype.update=function(){var e=Matrix4.IDENTITY;defined(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var t=this._segments.positions.length,i=this._segments.lengths,r=0<this._propertiesChanged[POSITION_INDEX$2]||0<this._propertiesChanged[POSITION_SIZE_INDEX];if(Matrix4.equals(e,this._modelMatrix)&&!r||(this._segments=PolylinePipeline.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=BoundingSphere.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=Matrix4.clone(e,this._modelMatrix),this._segments.positions.length!==t)makeDirty$1(this,POSITION_SIZE_INDEX);else for(var n=i.length,a=0;a<n;++a)if(i[a]!==this._segments.lengths[a]){makeDirty$1(this,POSITION_SIZE_INDEX);break}},Polyline.prototype.getPickId=function(e){return defined(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId},Polyline.prototype._clean=function(){this._dirty=!1;for(var e=this._propertiesChanged,t=0;t<NUMBER_OF_PROPERTIES$1-1;++t)e[t]=0},Polyline.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var SHOW_INDEX$3=Polyline.SHOW_INDEX,WIDTH_INDEX$1=Polyline.WIDTH_INDEX,POSITION_INDEX$3=Polyline.POSITION_INDEX,MATERIAL_INDEX$1=Polyline.MATERIAL_INDEX,POSITION_SIZE_INDEX$1=Polyline.POSITION_SIZE_INDEX,DISTANCE_DISPLAY_CONDITION$2=Polyline.DISTANCE_DISPLAY_CONDITION,NUMBER_OF_PROPERTIES$2=Polyline.NUMBER_OF_PROPERTIES,attributeLocations$1={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function PolylineCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(NUMBER_OF_PROPERTIES$2),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:BufferUsage$1.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=Color.clone(Color.WHITE);var t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}function createBatchTable$1(e,t){defined(e._batchTable)&&e._batchTable.destroy();var i=[{functionName:"batchTable_getWidthAndShow",componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2}];e._batchTable=new BatchTable(t,i,e._polylines.length)}Object.defineProperties(PolylineCollection.prototype,{length:{get:function(){return removePolylines(this),this._polylines.length}}}),PolylineCollection.prototype.add=function(e){return(e=new Polyline(e,this))._index=this._polylines.length,this._polylines.push(e),this._createVertexArray=!0,this._createBatchTable=!0,e},PolylineCollection.prototype.remove=function(e){var t;return!!this.contains(e)&&(this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,defined(e._bucket)&&((t=e._bucket).shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),e._destroy(),!0)},PolylineCollection.prototype.removeAll=function(){releaseShaders(this),destroyPolylines(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},PolylineCollection.prototype.contains=function(e){return defined(e)&&e._polylineCollection===this},PolylineCollection.prototype.get=function(e){return removePolylines(this),this._polylines[e]};var scratchUpdatePolylineEncodedCartesian=new EncodedCartesian3,scratchUpdatePolylineCartesian4=new Cartesian4,scratchNearFarCartesian2=new Cartesian2;PolylineCollection.prototype.update=function(e){if(removePolylines(this),0!==this._polylines.length){updateMode$1(this,e);var t,i=e.context,r=e.mapProjection,n=this._propertiesChanged;if(this._createBatchTable){if(0===ContextLimits.maximumVertexTextureImageUnits)throw new RuntimeError("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");createBatchTable$1(this,i),this._createBatchTable=!1}if(this._createVertexArray||computeNewBuffersUsage(this))createVertexArrays$1(this,i,r);else if(this._polylinesUpdated){var a=this._polylinesToUpdate;if(this._mode!==SceneMode$1.SCENE3D)for(var o=a.length,s=0;s<o;++s)(t=a[s]).update();if(n[POSITION_SIZE_INDEX$1]||n[MATERIAL_INDEX$1])createVertexArrays$1(this,i,r);else for(var l=a.length,c=this._polylineBuckets,u=0;u<l;++u){n=(t=a[u])._propertiesChanged;var d,h,p,f=t._bucket,m=0;for(d in c)if(c.hasOwnProperty(d)){if(c[d]===f){n[POSITION_INDEX$3]&&f.writeUpdate(m,t,this._positionBuffer,r);break}m+=c[d].lengthOfPositions}(n[SHOW_INDEX$3]||n[WIDTH_INDEX$1])&&this._batchTable.setBatchedAttribute(t._index,0,new Cartesian2(t._width,t._show)),2<this._batchTable.attributes.length&&((n[POSITION_INDEX$3]||n[POSITION_SIZE_INDEX$1])&&(p=e.mode===SceneMode$1.SCENE2D?t._boundingVolume2D:t._boundingVolumeWC,h=EncodedCartesian3.fromCartesian(p.center,scratchUpdatePolylineEncodedCartesian),p=Cartesian4.fromElements(h.low.x,h.low.y,h.low.z,p.radius,scratchUpdatePolylineCartesian4),this._batchTable.setBatchedAttribute(t._index,2,h.high),this._batchTable.setBatchedAttribute(t._index,3,p)),n[DISTANCE_DISPLAY_CONDITION$2]&&((h=scratchNearFarCartesian2).x=0,h.y=Number.MAX_VALUE,defined(p=t.distanceDisplayCondition)&&(h.x=p.near,h.y=p.far),this._batchTable.setBatchedAttribute(t._index,4,h))),t._clean()}a.length=0,this._polylinesUpdated=!1}n=this._propertiesChanged;for(var g=0;g<NUMBER_OF_PROPERTIES$2;++g)n[g]=0;var y=Matrix4.IDENTITY;e.mode===SceneMode$1.SCENE3D&&(y=this.modelMatrix);var _=e.passes;i=0!==e.morphTime;defined(this._opaqueRS)&&this._opaqueRS.depthTest.enabled===i||(this._opaqueRS=RenderState.fromCache({depthMask:i,depthTest:{enabled:i}})),defined(this._translucentRS)&&this._translucentRS.depthTest.enabled===i||(this._translucentRS=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND,depthMask:!i,depthTest:{enabled:i}})),this._batchTable.update(e),(_.render||_.pick)&&createCommandLists(this,e,this._colorCommands,y)}};var boundingSphereScratch=new BoundingSphere,boundingSphereScratch2=new BoundingSphere;function createCommandLists(e,t,i,r){for(var n=t.context,a=t.commandList,o=i.length,s=0,l=!0,c=e._vertexArrays,u=e.debugShowBoundingVolume,d=e._batchTable.getUniformMapCallback(),h=c.length,p=0;p<h;++p)for(var f=c[p],m=f.buckets,g=m.length,y=0;y<g;++y){for(var _,v,C,x,b=m[y],S=b.offset,T=b.bucket.shaderProgram,E=b.bucket.polylines,w=E.length,A=0,P=0;P<w;++P){var D,M=E[P],I=createMaterialId(M._material);I!==_&&(defined(_)&&0<A&&(D=v.isTranslucent(),o<=s?(C=new DrawCommand({owner:e}),i.push(C)):C=i[s],++s,x=combine(d(v._uniforms),e._uniformMap),C.boundingVolume=BoundingSphere.clone(boundingSphereScratch,C.boundingVolume),C.modelMatrix=r,C.shaderProgram=T,C.vertexArray=f.va,C.renderState=D?e._translucentRS:e._opaqueRS,C.pass=D?Pass$1.TRANSLUCENT:Pass$1.OPAQUE,C.debugShowBoundingVolume=u,C.pickId="v_pickColor",C.uniformMap=x,C.count=A,C.offset=S,S+=A,l=!(A=0),a.push(C)),(v=M._material).update(n),_=I);for(var R,O=M._locatorBuckets,L=O.length,N=0;N<L;++N){var F=O[N];F.locator===b&&(A+=F.count)}t.mode===SceneMode$1.SCENE3D?R=M._boundingVolumeWC:t.mode===SceneMode$1.COLUMBUS_VIEW?R=M._boundingVolume2D:t.mode===SceneMode$1.SCENE2D?defined(M._boundingVolume2D)&&((R=BoundingSphere.clone(M._boundingVolume2D,boundingSphereScratch2)).center.x=0):defined(M._boundingVolumeWC)&&defined(M._boundingVolume2D)&&(R=BoundingSphere.union(M._boundingVolumeWC,M._boundingVolume2D,boundingSphereScratch2)),l?(l=!1,BoundingSphere.clone(R,boundingSphereScratch)):BoundingSphere.union(R,boundingSphereScratch,boundingSphereScratch)}defined(_)&&0<A&&(o<=s?(C=new DrawCommand({owner:e}),i.push(C)):C=i[s],++s,x=combine(d(v._uniforms),e._uniformMap),C.boundingVolume=BoundingSphere.clone(boundingSphereScratch,C.boundingVolume),C.modelMatrix=r,C.shaderProgram=T,C.vertexArray=f.va,C.renderState=v.isTranslucent()?e._translucentRS:e._opaqueRS,C.pass=v.isTranslucent()?Pass$1.TRANSLUCENT:Pass$1.OPAQUE,C.debugShowBoundingVolume=u,C.pickId="v_pickColor",C.uniformMap=x,C.count=A,C.offset=S,l=!0,a.push(C)),_=void 0}i.length=s}function computeNewBuffersUsage(e){var t=!1,i=e._propertiesChanged;e=e._positionBufferUsage;return i[POSITION_INDEX$3]?(e.bufferUsage!==BufferUsage$1.STREAM_DRAW&&(t=!0,e.bufferUsage=BufferUsage$1.STREAM_DRAW),e.frameCount=100):e.bufferUsage!==BufferUsage$1.STATIC_DRAW&&(0===e.frameCount?(t=!0,e.bufferUsage=BufferUsage$1.STATIC_DRAW):e.frameCount--),t}PolylineCollection.prototype.isDestroyed=function(){return!1},PolylineCollection.prototype.destroy=function(){return destroyVertexArrays(this),releaseShaders(this),destroyPolylines(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)};var emptyVertexBuffer=[0,0,0];function createVertexArrays$1(e,t,i){e._createVertexArray=!1,releaseShaders(e),destroyVertexArrays(e),sortPolylinesIntoBuckets(e);var r,n,a=[[]],o=a[0],s=e._batchTable,l=e._useHighlightColor,c=[0],u=0,d=[[]],h=0,p=e._polylineBuckets;for(r in p)p.hasOwnProperty(r)&&((n=p[r]).updateShader(t,s,l),h+=n.lengthOfPositions);if(0<h){var f,m,g=e._mode,y=new Float32Array(6*h*3),_=new Float32Array(4*h),v=0,C=0,x=0;for(r in p)p.hasOwnProperty(r)&&((n=p[r]).write(y,_,v,C,x,s,t,i),g===SceneMode$1.MORPHING&&(defined(f)||(f=new Float32Array(6*h*3)),n.writeForMorph(f,v)),v+=6*(m=n.lengthOfPositions)*3,C+=4*m,x+=4*m,u=n.updateIndices(a,c,d,u));var b,S=e._positionBufferUsage.bufferUsage,T=BufferUsage$1.STATIC_DRAW;e._positionBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:y,usage:S}),defined(f)&&(b=Buffer$1.createVertexBuffer({context:t,typedArray:f,usage:S})),e._texCoordExpandAndBatchIndexBuffer=Buffer$1.createVertexBuffer({context:t,typedArray:_,usage:T});for(var E,w,A,P,D,M,I,R,O,L,N,F=3*Float32Array.BYTES_PER_ELEMENT,B=4*Float32Array.BYTES_PER_ELEMENT,V=0,k=a.length,z=0;z<k;++z)0<(o=a[z]).length&&(L=new Uint16Array(o),N=Buffer$1.createIndexBuffer({context:t,typedArray:L,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT}),V+=c[z],M=F+(D=F+(P=F+(A=F+(w=F+(E=6*(z*(F*CesiumMath.SIXTY_FOUR_KILOBYTES)-V*F)))))),L=z*(B*CesiumMath.SIXTY_FOUR_KILOBYTES)-V*B,M=[{index:attributeLocations$1.position3DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:E,strideInBytes:6*F},{index:attributeLocations$1.position3DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:w,strideInBytes:6*F},{index:attributeLocations$1.position2DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:E,strideInBytes:6*F},{index:attributeLocations$1.position2DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:w,strideInBytes:6*F},{index:attributeLocations$1.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:A,strideInBytes:6*F},{index:attributeLocations$1.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:P,strideInBytes:6*F},{index:attributeLocations$1.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:A,strideInBytes:6*F},{index:attributeLocations$1.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:P,strideInBytes:6*F},{index:attributeLocations$1.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:D,strideInBytes:6*F},{index:attributeLocations$1.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:M,strideInBytes:6*F},{index:attributeLocations$1.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:D,strideInBytes:6*F},{index:attributeLocations$1.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,offsetInBytes:M,strideInBytes:6*F},{index:attributeLocations$1.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:L}],L=g===SceneMode$1.SCENE3D?(I=e._positionBuffer,R="vertexBuffer",O=emptyVertexBuffer,"value"):(R=g===SceneMode$1.SCENE2D||g===SceneMode$1.COLUMBUS_VIEW?(I=emptyVertexBuffer,"value"):(I=b,"vertexBuffer"),O=e._positionBuffer,"vertexBuffer"),M[0][R]=I,M[1][R]=I,M[2][L]=O,M[3][L]=O,M[4][R]=I,M[5][R]=I,M[6][L]=O,M[7][L]=O,M[8][R]=I,M[9][R]=I,M[10][L]=O,M[11][L]=O,N=new VertexArray({context:t,attributes:M,indexBuffer:N}),e._vertexArrays.push({va:N,buckets:d[z]}))}}function replacer(e,t){return t instanceof Texture?t.id:t}var scratchUniformArray$1=[];function createMaterialId(e){var t=Material._uniformList[e.type],i=t.length;scratchUniformArray$1.length=2*i;for(var r=0,n=0;n<i;++n){var a=t[n];scratchUniformArray$1[r]=a,scratchUniformArray$1[r+1]=e._uniforms[a](),r+=2}return e.type+":"+JSON.stringify(scratchUniformArray$1,replacer)}function sortPolylinesIntoBuckets(e){for(var t=e._mode,i=e._modelMatrix,r=e._polylineBuckets={},n=e._polylines,a=n.length,o=0;o<a;++o){var s,l,c=n[o];1<c._actualPositions.length&&(c.update(),defined(l=r[(s=c.material).type])||(l=r[s.type]=new PolylineBucket(s,t,i)),l.addPolyline(c))}}function updateMode$1(e,t){t=t.mode,e._mode===t&&Matrix4.equals(e._modelMatrix,e.modelMatrix)||(e._mode=t,e._modelMatrix=Matrix4.clone(e.modelMatrix),e._createVertexArray=!0)}function removePolylines(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;for(var t,i=[],r=[],n=0,a=e._polylines.length,o=0;o<a;++o)(t=e._polylines[o]).isDestroyed||(t._index=n++,r.push(t),i.push(t));e._polylines=i,e._polylinesToUpdate=r}}function releaseShaders(e){for(var t,i=e._polylines,r=i.length,n=0;n<r;++n)i[n].isDestroyed||defined(t=i[n]._bucket)&&(t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy())}function destroyVertexArrays(e){for(var t=e._vertexArrays.length,i=0;i<t;++i)e._vertexArrays[i].va.destroy();e._vertexArrays.length=0}function destroyPolylines(e){for(var t=e._polylines,i=t.length,r=0;r<i;++r)t[r].isDestroyed||t[r]._destroy()}function VertexArrayBucketLocator(e,t,i){this.count=e,this.offset=t,this.bucket=i}function PolylineBucket(e,t,i){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=i}function intersectsIDL(e){return Cartesian3.dot(Cartesian3.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(Plane.ORIGIN_ZX_PLANE)===Intersect$1.INTERSECTING}PolylineCollection.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]},PolylineBucket.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this},PolylineBucket.prototype.updateShader=function(e,t,i){var r;defined(this.shaderProgram)||(r=["DISTANCE_DISPLAY_CONDITION"],i&&r.push("VECTOR_TILE"),-1!==this.material.shaderSource.search(/varying\s+float\s+v_polylineAngle;/g)&&r.push("POLYLINE_DASH"),FeatureDetection.isInternetExplorer()||r.push("CLIP_POLYLINE"),i=new ShaderSource({defines:r,sources:["varying vec4 v_pickColor;\n",this.material.shaderSource,PolylineFS]}),t=t.getVertexShaderCallback()(PolylineVS),t=new ShaderSource({defines:r,sources:[PolylineCommon,t]}),this.shaderProgram=ShaderProgram.fromCache({context:e,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:attributeLocations$1}))},PolylineBucket.prototype.getPolylinePositionsLength=function(e){if(this.mode===SceneMode$1.SCENE3D||!intersectsIDL(e))return 4*(r=e._actualPositions.length)-4;for(var t=0,i=e._segments.lengths,r=i.length,n=0;n<r;++n)t+=4*i[n]-4;return t};var scratchWritePosition=new Cartesian3,scratchWritePrevPosition=new Cartesian3,scratchWriteNextPosition=new Cartesian3,scratchWriteVector=new Cartesian3,scratchPickColorCartesian=new Cartesian4,scratchWidthShowCartesian=new Cartesian2;PolylineBucket.prototype.write=function(e,t,i,r,n,a,o,s){for(var l=this.mode,c=s.ellipsoid.maximumRadius*CesiumMath.PI,u=this.polylines,d=u.length,h=0;h<d;++h){for(var p,f=u[h],m=f.width,g=f.show&&0<m,y=f._index,_=this.getSegments(f,s),v=_.positions,C=_.lengths,x=v.length,b=f.getPickId(o).color,S=0,T=0,E=0;E<x;++E){0===E?f._loop?p=v[x-2]:(p=scratchWriteVector,Cartesian3.subtract(v[0],v[1],p),Cartesian3.add(v[0],p,p)):p=v[E-1],Cartesian3.clone(p,scratchWritePrevPosition),Cartesian3.clone(v[E],scratchWritePosition),E===x-1?f._loop?p=v[1]:(p=scratchWriteVector,Cartesian3.subtract(v[x-1],v[x-2],p),Cartesian3.add(v[x-1],p,p)):p=v[E+1],Cartesian3.clone(p,scratchWriteNextPosition),E===T+(A=C[S])&&(T+=A,++S);var w=E-T==0,A=E===T+C[S]-1;l===SceneMode$1.SCENE2D&&(scratchWritePrevPosition.z=0,scratchWritePosition.z=0,scratchWriteNextPosition.z=0),l!==SceneMode$1.SCENE2D&&l!==SceneMode$1.MORPHING||(w||A)&&c-Math.abs(scratchWritePosition.x)<1&&((scratchWritePosition.x<0&&0<scratchWritePrevPosition.x||0<scratchWritePosition.x&&scratchWritePrevPosition.x<0)&&Cartesian3.clone(scratchWritePosition,scratchWritePrevPosition),(scratchWritePosition.x<0&&0<scratchWriteNextPosition.x||0<scratchWritePosition.x&&scratchWriteNextPosition.x<0)&&Cartesian3.clone(scratchWritePosition,scratchWriteNextPosition));for(var P=A?2:4,D=w?2:0;D<P;++D){EncodedCartesian3.writeElements(scratchWritePosition,e,i),EncodedCartesian3.writeElements(scratchWritePrevPosition,e,i+6),EncodedCartesian3.writeElements(scratchWriteNextPosition,e,i+12);var M=D-2<0?-1:1;t[n]=E/(x-1),t[n+1]=D%2*2-1,t[n+2]=M,t[n+3]=y,i+=18,n+=4}}var I=scratchPickColorCartesian;I.x=Color.floatToByte(b.red),I.y=Color.floatToByte(b.green),I.z=Color.floatToByte(b.blue),I.w=Color.floatToByte(b.alpha);var R=scratchWidthShowCartesian;R.x=m,R.y=g?1:0,_=l===SceneMode$1.SCENE2D?f._boundingVolume2D:f._boundingVolumeWC,m=(b=EncodedCartesian3.fromCartesian(_.center,scratchUpdatePolylineEncodedCartesian)).high,g=Cartesian4.fromElements(b.low.x,b.low.y,b.low.z,_.radius,scratchUpdatePolylineCartesian4),(b=scratchNearFarCartesian2).x=0,b.y=Number.MAX_VALUE,defined(_=f.distanceDisplayCondition)&&(b.x=_.near,b.y=_.far),a.setBatchedAttribute(y,0,R),a.setBatchedAttribute(y,1,I),2<a.attributes.length&&(a.setBatchedAttribute(y,2,m),a.setBatchedAttribute(y,3,g),a.setBatchedAttribute(y,4,b))}};var morphPositionScratch=new Cartesian3,morphPrevPositionScratch=new Cartesian3,morphNextPositionScratch=new Cartesian3,morphVectorScratch=new Cartesian3;PolylineBucket.prototype.writeForMorph=function(e,t){for(var i=this.modelMatrix,r=this.polylines,n=r.length,a=0;a<n;++a)for(var o,s=r[a],l=s._segments.positions,c=s._segments.lengths,u=l.length,d=0,h=0,p=0;p<u;++p){0===p?s._loop?o=l[u-2]:(o=morphVectorScratch,Cartesian3.subtract(l[0],l[1],o),Cartesian3.add(l[0],o,o)):o=l[p-1],o=Matrix4.multiplyByPoint(i,o,morphPrevPositionScratch);var f,m=Matrix4.multiplyByPoint(i,l[p],morphPositionScratch);p===u-1?s._loop?f=l[1]:(f=morphVectorScratch,Cartesian3.subtract(l[u-1],l[u-2],f),Cartesian3.add(l[u-1],f,f)):f=l[p+1],f=Matrix4.multiplyByPoint(i,f,morphNextPositionScratch),p===h+(g=c[d])&&(h+=g,++d);for(var g=p-h==0,y=p===h+c[d]-1?2:4,_=g?2:0;_<y;++_)EncodedCartesian3.writeElements(m,e,t),EncodedCartesian3.writeElements(o,e,t+6),EncodedCartesian3.writeElements(f,e,t+12),t+=18}};var scratchSegmentLengths=new Array(1);PolylineBucket.prototype.updateIndices=function(e,t,i,r){var n=i.length-1,a=new VertexArrayBucketLocator(0,r,this);i[n].push(a);var o=0,s=e[e.length-1],l=0;0<s.length&&(l=s[s.length-1]+1);for(var c=this.polylines,u=c.length,d=0;d<u;++d){var h,p=c[d];if(p._locatorBuckets=[],this.mode===SceneMode$1.SCENE3D){h=scratchSegmentLengths;var f=p._actualPositions.length;if(!(0<f))continue;h[0]=f}else h=p._segments.lengths;var m=h.length;if(0<m){for(var g=0,y=0;y<m;++y)for(var _=h[y]-1,v=0;v<_;++v)l+4>CesiumMath.SIXTY_FOUR_KILOBYTES&&(p._locatorBuckets.push({locator:a,count:g}),g=0,t.push(4),s=[],e.push(s),l=0,a.count=o,a=new VertexArrayBucketLocator(r=o=0,0,this),i[++n]=[a]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),g+=6,o+=6,r+=6,l+=4;p._locatorBuckets.push({locator:a,count:g}),l+4>CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),l=0,a.count=o,a=new VertexArrayBucketLocator(o=r=0,0,this),i[++n]=[a])}p._clean()}return a.count=o,r},PolylineBucket.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,r=t.length,n=0;n<r;++n){var a=t[n];if(a===e)break;i+=a._actualLength}return i};var scratchSegments={positions:void 0,lengths:void 0},scratchLengths=new Array(1),pscratch=new Cartesian3,scratchCartographic$6=new Cartographic,scratchPositionsArray;function Vector3DTilePoints(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=void 0,this._labelCollection=void 0,this._polylineCollection=void 0,this._verticesPromise=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=when.defer(),this._resolvedPromise=!1}function packBuffer$1(e,t){var i=e._rectangle,r=e._minHeight,n=e._maxHeight,a=2+Rectangle.packedLength+Ellipsoid.packedLength;e=new Float64Array(a),a=0;return e[a++]=r,e[a++]=n,Rectangle.pack(i,e,2),a+=Rectangle.packedLength,Ellipsoid.pack(t,e,a),e}PolylineBucket.prototype.getSegments=function(e,t){var i=e._actualPositions;if(this.mode===SceneMode$1.SCENE3D)return scratchLengths[0]=i.length,scratchSegments.positions=i,scratchSegments.lengths=scratchLengths,scratchSegments;intersectsIDL(e)&&(i=e._segments.positions);for(var r,n,a=t.ellipsoid,o=[],s=this.modelMatrix,l=i.length,c=pscratch,u=0;u<l;++u)r=i[u],c=Matrix4.multiplyByPoint(s,r,c),o.push(t.project(a.cartesianToCartographic(c,scratchCartographic$6)));return 0<o.length&&(e._boundingVolume2D=BoundingSphere.fromPoints(o,e._boundingVolume2D),n=e._boundingVolume2D.center,e._boundingVolume2D.center=new Cartesian3(n.z,n.x,n.y)),scratchSegments.positions=o,scratchSegments.lengths=e._segments.lengths,scratchSegments},PolylineBucket.prototype.writeUpdate=function(e,t,i,r){var n=this.mode,a=r.ellipsoid.maximumRadius*CesiumMath.PI;if(f=t._actualLength){e+=this.getPolylineStartIndex(t);var o=scratchPositionsArray,s=6*f*3;!defined(o)||o.length<s?o=scratchPositionsArray=new Float32Array(s):o.length>s&&(o=new Float32Array(o.buffer,0,s));for(var l,c=(r=this.getSegments(t,r)).positions,u=r.lengths,d=0,h=0,p=0,f=c.length,m=0;m<f;++m){0===m?t._loop?l=c[f-2]:(l=scratchWriteVector,Cartesian3.subtract(c[0],c[1],l),Cartesian3.add(c[0],l,l)):l=c[m-1],Cartesian3.clone(l,scratchWritePrevPosition),Cartesian3.clone(c[m],scratchWritePosition),m===f-1?t._loop?l=c[1]:(l=scratchWriteVector,Cartesian3.subtract(c[f-1],c[f-2],l),Cartesian3.add(c[f-1],l,l)):l=c[m+1],Cartesian3.clone(l,scratchWriteNextPosition),m===p+(y=u[h])&&(p+=y,++h);var g=m-p==0,y=m===p+u[h]-1;n===SceneMode$1.SCENE2D&&(scratchWritePrevPosition.z=0,scratchWritePosition.z=0,scratchWriteNextPosition.z=0),n!==SceneMode$1.SCENE2D&&n!==SceneMode$1.MORPHING||(g||y)&&a-Math.abs(scratchWritePosition.x)<1&&((scratchWritePosition.x<0&&0<scratchWritePrevPosition.x||0<scratchWritePosition.x&&scratchWritePrevPosition.x<0)&&Cartesian3.clone(scratchWritePosition,scratchWritePrevPosition),(scratchWritePosition.x<0&&0<scratchWriteNextPosition.x||0<scratchWritePosition.x&&scratchWriteNextPosition.x<0)&&Cartesian3.clone(scratchWritePosition,scratchWriteNextPosition));for(var _=y?2:4,v=g?2:0;v<_;++v)EncodedCartesian3.writeElements(scratchWritePosition,o,d),EncodedCartesian3.writeElements(scratchWritePrevPosition,o,d+6),EncodedCartesian3.writeElements(scratchWriteNextPosition,o,d+12),d+=18}i.copyFromArrayView(o,18*Float32Array.BYTES_PER_ELEMENT*e)}},Object.defineProperties(Vector3DTilePoints.prototype,{pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}},readyPromise:{get:function(){return this._readyPromise.promise}}});var createVerticesTaskProcessor$1=new TaskProcessor("createVectorTilePoints"),scratchPosition$8=new Cartesian3;function createPoints(e,t){if(!defined(e._billboardCollection)){var i;if(!defined(e._verticesPromise)){i=e._positions,defined(n=e._packedBuffer)||(i=e._positions=arraySlice(i),e._batchIds=arraySlice(e._batchIds),n=e._packedBuffer=packBuffer$1(e,t));var r=[i.buffer,n.buffer],n={positions:i.buffer,packedBuffer:n.buffer};if(!defined(r=e._verticesPromise=createVerticesTaskProcessor$1.scheduleTask(n,r)))return;r.then((function(t){e._positions=new Float64Array(t.positions),e._ready=!0}))}if(e._ready&&!defined(e._billboardCollection)){i=e._positions;r=e._batchTable;var a=e._batchIds,o=e._billboardCollection=new BillboardCollection({batchTable:r}),s=e._labelCollection=new LabelCollection({batchTable:r}),l=e._polylineCollection=new PolylineCollection;l._useHighlightColor=!0;for(var c=i.length/3,u=0;u<c;++u){var d=a[u],h=Cartesian3.unpack(i,3*u,scratchPosition$8),p=o.add();p.position=h,p._batchIndex=d,(p=s.add()).text=" ",p.position=h,p._batchIndex=d,l.add().positions=[Cartesian3.clone(h),Cartesian3.clone(h)]}e._positions=void 0,e._packedBuffer=void 0}}}function clearStyle$1(e,t){for(var i=e._batchIds,r=i.length,n=0;n<r;++n){var a=t[i[n]];a.show=!0,a.pointSize=Cesium3DTilePointFeature.defaultPointSize,a.color=Cesium3DTilePointFeature.defaultColor,a.pointOutlineColor=Cesium3DTilePointFeature.defaultPointOutlineColor,a.pointOutlineWidth=Cesium3DTilePointFeature.defaultPointOutlineWidth,a.labelColor=Color.WHITE,a.labelOutlineColor=Color.WHITE,a.labelOutlineWidth=1,a.font="30px sans-serif",a.labelStyle=LabelStyle$1.FILL,a.labelText=void 0,a.backgroundColor=new Color(.165,.165,.165,.8),a.backgroundPadding=new Cartesian2(7,5),a.backgroundEnabled=!1,a.scaleByDistance=void 0,a.translucencyByDistance=void 0,a.distanceDisplayCondition=void 0,a.heightOffset=0,a.anchorLineEnabled=!1,a.anchorLineColor=Color.WHITE,a.image=void 0,a.disableDepthTestDistance=0,a.horizontalOrigin=HorizontalOrigin$1.CENTER,a.verticalOrigin=VerticalOrigin$1.CENTER,a.labelHorizontalOrigin=HorizontalOrigin$1.RIGHT,a.labelVerticalOrigin=VerticalOrigin$1.BASELINE}}Vector3DTilePoints.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,r=this._labelCollection,n=this._polylineCollection,a=this._batchIds,o=a.length,s=0;s<o;++s){var l=a[s],c=i.get(s),u=r.get(s),d=n.get(s);t[l]=new Cesium3DTilePointFeature(e,l,c,u,d)}},Vector3DTilePoints.prototype.applyDebugSettings=function(e,t){e?(Color.clone(t,this._billboardCollection._highlightColor),Color.clone(t,this._labelCollection._highlightColor),Color.clone(t,this._polylineCollection._highlightColor)):(Color.clone(Color.WHITE,this._billboardCollection._highlightColor),Color.clone(Color.WHITE,this._labelCollection._highlightColor),Color.clone(Color.WHITE,this._polylineCollection._highlightColor))};var scratchColor$6=new Color,scratchColor2=new Color,scratchColor3=new Color,scratchColor4=new Color,scratchColor5=new Color,scratchColor6=new Color,scratchScaleByDistance=new NearFarScalar,scratchTranslucencyByDistance=new NearFarScalar,scratchDistanceDisplayCondition=new DistanceDisplayCondition;function Vector3DTilePolygons(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=defaultValue(e.center,Cartesian3.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._readyPromise=when.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=ClassificationType$1.BOTH}function packBuffer$2(e){var t=new Float64Array(3+Cartesian3.packedLength+Ellipsoid.packedLength+Rectangle.packedLength),i=0;return t[i++]=e._indices.BYTES_PER_ELEMENT,t[i++]=e._minimumHeight,t[i++]=e._maximumHeight,Cartesian3.pack(e._center,t,3),i+=Cartesian3.packedLength,Ellipsoid.pack(e._ellipsoid,t,i),i+=Ellipsoid.packedLength,Rectangle.pack(e._rectangle,t,i),t}function unpackBuffer$1(e,t){for(var i=1,r=t[i++],n=e._boundingVolumes=new Array(r),a=0;a<r;++a)n[a]=OrientedBoundingBox.unpack(t,i),i+=OrientedBoundingBox.packedLength;for(var o=t[i++],s=e._batchedIndices=new Array(o),l=0;l<o;++l){var c=Color.unpack(t,i);i+=Color.packedLength;for(var u=t[i++],d=t[i++],h=t[i++],p=new Array(h),f=0;f<h;++f)p[f]=t[i++];s[l]=new Vector3DTileBatch({color:c,offset:u,count:d,batchIds:p})}}Vector3DTilePoints.prototype.applyStyle=function(e,t){if(defined(e))for(var i=this._batchIds,r=i.length,n=0;n<r;++n){var a,o,s=t[i[n]];defined(e.show)&&(s.show=e.show.evaluate(s)),defined(e.pointSize)&&(s.pointSize=e.pointSize.evaluate(s)),defined(e.color)&&(s.color=e.color.evaluateColor(s,scratchColor$6)),defined(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,scratchColor2)),defined(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),defined(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,scratchColor3)),defined(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,scratchColor4)),defined(e.labelOutlineWidth)&&(s.labelOutlineWidth=e.labelOutlineWidth.evaluate(s)),defined(e.font)&&(s.font=e.font.evaluate(s)),defined(e.labelStyle)&&(s.labelStyle=e.labelStyle.evaluate(s)),defined(e.labelText)?s.labelText=e.labelText.evaluate(s):s.labelText=void 0,defined(e.backgroundColor)&&(s.backgroundColor=e.backgroundColor.evaluateColor(s,scratchColor5)),defined(e.backgroundPadding)&&(s.backgroundPadding=e.backgroundPadding.evaluate(s)),defined(e.backgroundEnabled)&&(s.backgroundEnabled=e.backgroundEnabled.evaluate(s)),defined(e.scaleByDistance)?(a=e.scaleByDistance.evaluate(s),scratchScaleByDistance.near=a.x,scratchScaleByDistance.nearValue=a.y,scratchScaleByDistance.far=a.z,scratchScaleByDistance.farValue=a.w,s.scaleByDistance=scratchScaleByDistance):s.scaleByDistance=void 0,defined(e.translucencyByDistance)?(o=e.translucencyByDistance.evaluate(s),scratchTranslucencyByDistance.near=o.x,scratchTranslucencyByDistance.nearValue=o.y,scratchTranslucencyByDistance.far=o.z,scratchTranslucencyByDistance.farValue=o.w,s.translucencyByDistance=scratchTranslucencyByDistance):s.translucencyByDistance=void 0,defined(e.distanceDisplayCondition)?(o=e.distanceDisplayCondition.evaluate(s),scratchDistanceDisplayCondition.near=o.x,scratchDistanceDisplayCondition.far=o.y,s.distanceDisplayCondition=scratchDistanceDisplayCondition):s.distanceDisplayCondition=void 0,defined(e.heightOffset)&&(s.heightOffset=e.heightOffset.evaluate(s)),defined(e.anchorLineEnabled)&&(s.anchorLineEnabled=e.anchorLineEnabled.evaluate(s)),defined(e.anchorLineColor)&&(s.anchorLineColor=e.anchorLineColor.evaluateColor(s,scratchColor6)),defined(e.image)?s.image=e.image.evaluate(s):s.image=void 0,defined(e.disableDepthTestDistance)&&(s.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(s)),defined(e.horizontalOrigin)&&(s.horizontalOrigin=e.horizontalOrigin.evaluate(s)),defined(e.verticalOrigin)&&(s.verticalOrigin=e.verticalOrigin.evaluate(s)),defined(e.labelHorizontalOrigin)&&(s.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(s)),defined(e.labelVerticalOrigin)&&(s.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(s))}else clearStyle$1(this,t)},Vector3DTilePoints.prototype.update=function(e){createPoints(this,e.mapProjection.ellipsoid),this._ready&&(this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e),this._resolvedPromise||(this._readyPromise.resolve(),this._resolvedPromise=!0))},Vector3DTilePoints.prototype.isDestroyed=function(){return!1},Vector3DTilePoints.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),destroyObject(this)},Object.defineProperties(Vector3DTilePolygons.prototype,{trianglesLength:{get:function(){return defined(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return defined(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}});var createVerticesTaskProcessor$2=new TaskProcessor("createVectorTilePolygons"),scratchColor$7=new Color;function createPrimitive$2(e){if(!defined(e._primitive)){if(!defined(e._verticesPromise)){var t=e._positions,i=e._counts,r=e._indexCounts,n=e._indices,a=e._transferrableBatchIds,o=e._batchTableColors,s=e._packedBuffer;if(!defined(o)){t=e._positions=arraySlice(e._positions),i=e._counts=arraySlice(e._counts),r=e._indexCounts=arraySlice(e._indexCounts),n=e._indices=arraySlice(e._indices),e._center=e._ellipsoid.cartographicToCartesian(Rectangle.center(e._rectangle)),a=e._transferrableBatchIds=new Uint32Array(e._batchIds),o=e._batchTableColors=new Uint32Array(a.length);for(var l=e._batchTable,c=o.length,u=0;u<c;++u){var d=l.getColor(u,scratchColor$7);o[u]=d.toRgba()}s=e._packedBuffer=packBuffer$2(e)}var h=[t.buffer,i.buffer,r.buffer,n.buffer,a.buffer,o.buffer,s.buffer];r={packedBuffer:s.buffer,positions:t.buffer,counts:i.buffer,indexCounts:r.buffer,indices:n.buffer,batchIds:a.buffer,batchTableColors:o.buffer},n=e._polygonMinimumHeights,a=e._polygonMaximumHeights;if(defined(n)&&defined(a)&&(n=arraySlice(n),a=arraySlice(a),h.push(n.buffer,a.buffer),r.minimumHeights=n,r.maximumHeights=a),!defined(h=e._verticesPromise=createVerticesTaskProcessor$2.scheduleTask(r,h)))return;when(h,(function(t){e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;var i=new Float64Array(t.packedBuffer),r=i[0];unpackBuffer$1(e,i),e._indices=new(2===IndexDatatype$1.getSizeInBytes(r)?Uint16Array:Uint32Array)(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._batchedPositions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!defined(e._primitive)&&(e._primitive=new Vector3DTilePrimitive({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}Vector3DTilePolygons.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},Vector3DTilePolygons.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},Vector3DTilePolygons.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},Vector3DTilePolygons.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},Vector3DTilePolygons.prototype.update=function(e){createPrimitive$2(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},Vector3DTilePolygons.prototype.isDestroyed=function(){return!1},Vector3DTilePolygons.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)};var Vector3DTilePolylinesVS="attribute vec4 currentPosition;\nattribute vec4 previousPosition;\nattribute vec4 nextPosition;\nattribute vec2 expandAndWidth;\nattribute float a_batchId;\nuniform mat4 u_modifiedModelView;\nvoid main()\n{\nfloat expandDir = expandAndWidth.x;\nfloat width = abs(expandAndWidth.y) + 0.5;\nbool usePrev = expandAndWidth.y < 0.0;\nvec4 p = u_modifiedModelView * currentPosition;\nvec4 prev = u_modifiedModelView * previousPosition;\nvec4 next = u_modifiedModelView * nextPosition;\nfloat angle;\nvec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\ngl_Position = czm_viewportOrthographic * positionWC;\n}\n";function Vector3DTilePolylines(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=Color.clone(Color.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._readyPromise=when.defer(),this._verticesPromise=void 0}function packBuffer$3(e){var t=e._rectangle,i=e._minimumHeight,r=e._maximumHeight,n=e._ellipsoid,a=e._center,o=2+Rectangle.packedLength+Ellipsoid.packedLength+Cartesian3.packedLength;e=new Float64Array(o),o=0;return e[o++]=i,e[o++]=r,Rectangle.pack(t,e,2),o+=Rectangle.packedLength,Ellipsoid.pack(n,e,o),o+=Ellipsoid.packedLength,Cartesian3.pack(a,e,o),e}Object.defineProperties(Vector3DTilePolylines.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},readyPromise:{get:function(){return this._readyPromise.promise}}});var createVerticesTaskProcessor$3=new TaskProcessor("createVectorTilePolylines"),attributeLocations$2={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function createVertexArray$4(e,t){if(!defined(e._va)){if(!defined(e._verticesPromise)){var i=e._positions,r=e._widths,n=e._counts,a=e._transferrableBatchIds,o=e._packedBuffer;defined(o)||(i=e._positions=arraySlice(i),r=e._widths=arraySlice(r),n=e._counts=arraySlice(n),a=e._transferrableBatchIds=arraySlice(e._batchIds),o=e._packedBuffer=packBuffer$3(e));var s=[i.buffer,r.buffer,n.buffer,a.buffer,o.buffer],l={positions:i.buffer,widths:r.buffer,counts:n.buffer,batchIds:a.buffer,packedBuffer:o.buffer};if(!defined(i=e._verticesPromise=createVerticesTaskProcessor$3.scheduleTask(l,s)))return;when(i,(function(t){e._currentPositions=new Float32Array(t.currentPositions),e._previousPositions=new Float32Array(t.previousPositions),e._nextPositions=new Float32Array(t.nextPositions),e._expandAndWidth=new Float32Array(t.expandAndWidth),e._vertexBatchIds=new Uint16Array(t.batchIds);var i=t.indexDatatype;e._indices=new(i===IndexDatatype$1.UNSIGNED_SHORT?Uint16Array:Uint32Array)(t.indices),e._ready=!0}))}e._ready&&!defined(e._va)&&(r=e._currentPositions,n=e._previousPositions,a=e._nextPositions,o=e._expandAndWidth,l=e._vertexBatchIds,s=e._indices,i=n.byteLength+r.byteLength+a.byteLength,i+=o.byteLength+l.byteLength+s.byteLength,e._trianglesLength=s.length/3,e._geometryByteLength=i,n=Buffer$1.createVertexBuffer({context:t,typedArray:n,usage:BufferUsage$1.STATIC_DRAW}),r=Buffer$1.createVertexBuffer({context:t,typedArray:r,usage:BufferUsage$1.STATIC_DRAW}),a=Buffer$1.createVertexBuffer({context:t,typedArray:a,usage:BufferUsage$1.STATIC_DRAW}),o=Buffer$1.createVertexBuffer({context:t,typedArray:o,usage:BufferUsage$1.STATIC_DRAW}),l=Buffer$1.createVertexBuffer({context:t,typedArray:l,usage:BufferUsage$1.STATIC_DRAW}),s=Buffer$1.createIndexBuffer({context:t,typedArray:s,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:2===s.BYTES_PER_ELEMENT?IndexDatatype$1.UNSIGNED_SHORT:IndexDatatype$1.UNSIGNED_INT}),l=[{index:attributeLocations$2.previousPosition,vertexBuffer:n,componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{index:attributeLocations$2.currentPosition,vertexBuffer:r,componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{index:attributeLocations$2.nextPosition,vertexBuffer:a,componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3},{index:attributeLocations$2.expandAndWidth,vertexBuffer:o,componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2},{index:attributeLocations$2.a_batchId,vertexBuffer:l,componentDatatype:ComponentDatatype$1.UNSIGNED_SHORT,componentsPerAttribute:1}],e._va=new VertexArray({context:t,attributes:l,indexBuffer:s}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0,e._readyPromise.resolve())}}var modifiedModelViewScratch$2=new Matrix4,rtcScratch$2=new Cartesian3;function createUniformMap$3(e,t){defined(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){var i=t.uniformState.view;return Matrix4.clone(i,modifiedModelViewScratch$2),Matrix4.multiplyByPoint(modifiedModelViewScratch$2,e._center,rtcScratch$2),Matrix4.setTranslation(modifiedModelViewScratch$2,rtcScratch$2,modifiedModelViewScratch$2),modifiedModelViewScratch$2},u_highlightColor:function(){return e._highlightColor}})}function createRenderStates$4(e){defined(e._rs)||(e._rs=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:{enabled:!0,factor:-5,units:-5}}))}var PolylineFS$1="uniform vec4 u_highlightColor; \nvoid main()\n{\n    gl_FragColor = u_highlightColor;\n}\n";function createShaders$2(e,t){var i,r;defined(e._sp)||(i=(r=e._batchTable).getVertexShaderCallback(!1,"a_batchId",void 0)(Vector3DTilePolylinesVS),r=r.getFragmentShaderCallback()(PolylineFS$1,!1,void 0),i=new ShaderSource({defines:["VECTOR_TILE",FeatureDetection.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[PolylineCommon,i]}),r=new ShaderSource({defines:["VECTOR_TILE"],sources:[r]}),e._sp=ShaderProgram.fromCache({context:t,vertexShaderSource:i,fragmentShaderSource:r,attributeLocations:attributeLocations$2}))}function queueCommands$1(e,t){var i;defined(e._command)||(i=e._batchTable.getUniformMapCallback()(e._uniformMap),e._command=new DrawCommand({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:i,boundingVolume:e._boundingVolume,pass:Pass$1.TRANSLUCENT,pickId:e._batchTable.getPickId()})),t.commandList.push(e._command)}function clearStyle$2(e,t){for(var i=e._batchIds,r=i.length,n=0;n<r;++n){var a=t[i[n]];a.show=!0,a.color=Color.WHITE}}Vector3DTilePolylines.prototype.createFeatures=function(e,t){for(var i=this._batchIds,r=i.length,n=0;n<r;++n){var a=i[n];t[a]=new Cesium3DTileFeature(e,a)}},Vector3DTilePolylines.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var scratchColor$8=new Color,DEFAULT_COLOR_VALUE$2=Color.WHITE,DEFAULT_SHOW_VALUE$2=!0;function Vector3DTileContent(e,t,i,r,n){this._tileset=e,this._tile=t,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._contentReadyPromise=void 0,this._readyPromise=when.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,initialize$8(this,r,n)}function createColorChangedCallback$2(e){return function(t,i){defined(e._polygons)&&e._polygons.updateCommands(t,i)}}function getBatchIds$1(e,t){var i,r,n,a,o,s=defaultValue(e.POLYGONS_LENGTH,0),l=defaultValue(e.POLYLINES_LENGTH,0),c=defaultValue(e.POINTS_LENGTH,0);0<s&&defined(e.POLYGON_BATCH_IDS)&&(n=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset,r=new Uint16Array(t.buffer,n,s)),0<l&&defined(e.POLYLINE_BATCH_IDS)&&(n=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset,a=new Uint16Array(t.buffer,n,l)),0<c&&defined(e.POINT_BATCH_IDS)&&(u=t.byteOffset+e.POINT_BATCH_IDS.byteOffset,o=new Uint16Array(t.buffer,u,c));t=defined(r)||defined(a)||defined(o);var u=0<s&&!defined(r)||0<l&&!defined(a)||0<c&&!defined(o);if(t&&u)throw new RuntimeError("If one group of batch ids is defined, then all batch ids must be defined.");if(!defined(r)&&!defined(a)&&!defined(o)){var d=0;if(!defined(r)&&0<s)for(r=new Uint16Array(s),i=0;i<s;++i)r[i]=d++;if(!defined(a)&&0<l)for(a=new Uint16Array(l),i=0;i<l;++i)a[i]=d++;if(!defined(o)&&0<c)for(o=new Uint16Array(c),i=0;i<c;++i)o[i]=d++}return{polygons:r,polylines:a,points:o}}Vector3DTilePolylines.prototype.applyStyle=function(e,t){if(defined(e))for(var i=this._batchIds,r=i.length,n=0;n<r;++n){var a=t[i[n]];a.color=defined(e.color)?e.color.evaluateColor(a,scratchColor$8):DEFAULT_COLOR_VALUE$2,a.show=defined(e.show)?e.show.evaluate(a):DEFAULT_SHOW_VALUE$2}else clearStyle$2(this,t)},Vector3DTilePolylines.prototype.update=function(e){var t=e.context;createVertexArray$4(this,t),createUniformMap$3(this,t),createShaders$2(this,t),createRenderStates$4(this),!this._ready||((t=e.passes).render||t.pick)&&queueCommands$1(this,e)},Vector3DTilePolylines.prototype.isDestroyed=function(){return!1},Vector3DTilePolylines.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),destroyObject(this)},Object.defineProperties(Vector3DTileContent.prototype,{featuresLength:{get:function(){return defined(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return defined(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){var e=0;return defined(this._polygons)&&(e+=this._polygons.trianglesLength),defined(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){var e=0;return defined(this._polygons)&&(e+=this._polygons.geometryByteLength),defined(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return defined(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return defined(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}}});var sizeOfUint32$8=Uint32Array.BYTES_PER_ELEMENT;function initialize$8(e,t,i){i=defaultValue(i,0);var r=new Uint8Array(t),n=new DataView(t);if(i+=sizeOfUint32$8,1!==(y=n.getUint32(i,!0)))throw new RuntimeError("Only Vector tile version 1 is supported.  Version "+y+" is not.");i+=sizeOfUint32$8;var a=n.getUint32(i,!0);if(i+=sizeOfUint32$8,0!==a){var o=n.getUint32(i,!0);if(i+=sizeOfUint32$8,0===o)throw new RuntimeError("Feature table must have a byte length greater than zero");var s=n.getUint32(i,!0);i+=sizeOfUint32$8;var l=n.getUint32(i,!0);i+=sizeOfUint32$8;var c=n.getUint32(i,!0);i+=sizeOfUint32$8;var u=n.getUint32(i,!0);i+=sizeOfUint32$8;var d=n.getUint32(i,!0);i+=sizeOfUint32$8;var h=n.getUint32(i,!0);i+=sizeOfUint32$8;var p=n.getUint32(i,!0),f=getStringFromTypedArray(r,i+=sizeOfUint32$8,o),m=JSON.parse(f);i+=o;var g=new Uint8Array(t,i,s);i+=s,0<l&&(v=getStringFromTypedArray(r,i,l),C=JSON.parse(v),i+=l,0<c&&(x=new Uint8Array(t,i,c),x=new Uint8Array(x),i+=c));var y=defaultValue(m.POLYGONS_LENGTH,0),_=defaultValue(m.POLYLINES_LENGTH,0);f=new Cesium3DTileBatchTable(e,n=y+_+(a=defaultValue(m.POINTS_LENGTH,0)),C,x,createColorChangedCallback$2(e));if(e._batchTable=f,0!==n){if(!defined(s=(o=new Cesium3DTileFeatureTable(m,g)).getGlobalProperty("REGION")))throw new RuntimeError("Feature table global property: REGION must be defined");r=Rectangle.unpack(s);var v=s[4],C=(l=s[5],c=e._tile.computedTransform,o.getGlobalProperty("RTC_CENTER",ComponentDatatype$1.FLOAT,3));defined(C)?(C=Cartesian3.unpack(C),Matrix4.multiplyByPoint(c,C,C)):((C=Rectangle.center(r)).height=CesiumMath.lerp(v,l,.5),C=Ellipsoid.WGS84.cartographicToCartesian(C));var x=getBatchIds$1(m,g);if(i+=i%4,0<y){if(o.featuresLength=y,!defined(n=defaultValue(o.getPropertyArray("POLYGON_COUNTS",ComponentDatatype$1.UNSIGNED_INT,1),o.getPropertyArray("POLYGON_COUNT",ComponentDatatype$1.UNSIGNED_INT,1))))throw new RuntimeError("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");if(!defined(s=defaultValue(o.getPropertyArray("POLYGON_INDEX_COUNTS",ComponentDatatype$1.UNSIGNED_INT,1),o.getPropertyArray("POLYGON_INDEX_COUNT",ComponentDatatype$1.UNSIGNED_INT,1))))throw new RuntimeError("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");g=n.reduce((function(e,t){return e+2*t}),0),y=s.reduce((function(e,t){return e+t}),0),y=new Uint32Array(t,i,y),i+=u;var b,S;g=new Uint16Array(t,i,g);i+=d,defined(m.POLYGON_MINIMUM_HEIGHTS)&&defined(m.POLYGON_MAXIMUM_HEIGHTS)&&(b=o.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",ComponentDatatype$1.FLOAT,1),S=o.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",ComponentDatatype$1.FLOAT,1)),e._polygons=new Vector3DTilePolygons({positions:g,counts:n,indexCounts:s,indices:y,minimumHeight:v,maximumHeight:l,polygonMinimumHeights:b,polygonMaximumHeights:S,center:C,rectangle:r,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:f,batchIds:x.polygons,modelMatrix:c})}if(0<_){if(o.featuresLength=_,!defined(c=defaultValue(o.getPropertyArray("POLYLINE_COUNTS",ComponentDatatype$1.UNSIGNED_INT,1),o.getPropertyArray("POLYLINE_COUNT",ComponentDatatype$1.UNSIGNED_INT,1))))throw new RuntimeError("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");var T=o.getPropertyArray("POLYLINE_WIDTHS",ComponentDatatype$1.UNSIGNED_SHORT,1);if(!defined(T)){T=new Uint16Array(_);for(var E=0;E<_;++E)T[E]=2}o=c.reduce((function(e,t){return e+3*t}),0),o=new Uint16Array(t,i,o),i+=h,e._polylines=new Vector3DTilePolylines({positions:o,widths:T,counts:c,batchIds:x.polylines,minimumHeight:v,maximumHeight:l,center:C,rectangle:r,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:f})}0<a&&(a=new Uint16Array(t,i,3*a),i+=p,e._points=new Vector3DTilePoints({positions:a,batchIds:x.points,minimumHeight:v,maximumHeight:l,rectangle:r,batchTable:f}))}}else e._readyPromise.resolve(e)}function createFeatures$4(e){var t=e.featuresLength;!defined(e._features)&&0<t&&(t=new Array(t),defined(e._polygons)&&e._polygons.createFeatures(e,t),defined(e._polylines)&&e._polylines.createFeatures(e,t),defined(e._points)&&e._points.createFeatures(e,t),e._features=t)}Vector3DTileContent.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},Vector3DTileContent.prototype.getFeature=function(e){return createFeatures$4(this),this._features[e]},Vector3DTileContent.prototype.applyDebugSettings=function(e,t){defined(this._polygons)&&this._polygons.applyDebugSettings(e,t),defined(this._polylines)&&this._polylines.applyDebugSettings(e,t),defined(this._points)&&this._points.applyDebugSettings(e,t)},Vector3DTileContent.prototype.applyStyle=function(e){createFeatures$4(this),defined(this._polygons)&&this._polygons.applyStyle(e,this._features),defined(this._polylines)&&this._polylines.applyStyle(e,this._features),defined(this._points)&&this._points.applyStyle(e,this._features)},Vector3DTileContent.prototype.update=function(e,t){var i,r=!0;defined(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),r=r&&this._polygons._ready),defined(this._polylines)&&(this._polylines.update(t),r=r&&this._polylines._ready),defined(this._points)&&(this._points.update(t),r=r&&this._points._ready),defined(this._batchTable)&&r&&this._batchTable.update(e,t),defined(this._contentReadyPromise)||(r=defined(this._points)?this._points.readyPromise:void 0,e=defined(this._polygons)?this._polygons.readyPromise:void 0,t=defined(this._polylines)?this._polylines.readyPromise:void 0,(i=this)._contentReadyPromise=when.all([r,e,t]).then((function(){i._readyPromise.resolve(i)})))},Vector3DTileContent.prototype.isDestroyed=function(){return!1},Vector3DTileContent.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),destroyObject(this)};var Cesium3DTileContentFactory={b3dm:function(e,t,i,r,n){return new Batched3DModel3DTileContent(e,t,i,r,n)},pnts:function(e,t,i,r,n){return new PointCloud3DTileContent(e,t,i,r,n)},i3dm:function(e,t,i,r,n){return new Instanced3DModel3DTileContent(e,t,i,r,n)},cmpt:function(e,t,i,r,n){return new Composite3DTileContent(e,t,i,r,n,Cesium3DTileContentFactory)},json:function(e,t,i,r,n){return new Tileset3DTileContent(e,t,i,r,n)},geom:function(e,t,i,r,n){return new Geometry3DTileContent(e,t,i,r,n)},vctr:function(e,t,i,r,n){return new Vector3DTileContent(e,t,i,r,n)}},Cesium3DTileContentState={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},Cesium3DTileContentState$1=Object.freeze(Cesium3DTileContentState),Cesium3DTileOptimizationHint={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},Cesium3DTileOptimizationHint$1=Object.freeze(Cesium3DTileOptimizationHint);function Cesium3DTilesetMostDetailedTraversal(){}var traversal={stack:new ManagedArray,stackMaximumLength:0};function isVisible(e){return e._visible&&e._inRequestVolume}function hasEmptyContent(e){return e.hasEmptyContent||e.hasTilesetContent}function hasUnloadedContent(e){return!hasEmptyContent(e)&&e.contentUnloaded}function canTraverse(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:(t.hasEmptyContent,!0))}function updateAndPushChildren(e,t,i,r){for(var n=t.children,a=n.length,o=0;o<a;++o){var s=n[o];s.updateVisibility(r),isVisible(s)&&i.push(s)}}function loadTile(e,t){(hasUnloadedContent(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function touchTile(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function visitTile(e){++e.statistics.visited}function selectDesiredTile(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==Intersect$1.OUTSIDE&&e._selectedTiles.push(t)}function Cesium3DTilesetTraversal(){}function isVisible$1(e){return e._visible&&e._inRequestVolume}Cesium3DTilesetMostDetailedTraversal.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0;var i=!(e._hasMixedContent=!1),r=e.root;if(r.updateVisibility(t),!isVisible(r))return i;var n=traversal.stack;for(n.push(e.root);0<n.length;){traversal.stackMaximumLength=Math.max(traversal.stackMaximumLength,n.length);var a=n.pop(),o=a.refine===Cesium3DTileRefine$1.ADD,s=a.refine===Cesium3DTileRefine$1.REPLACE,l=canTraverse(e,a);l&&updateAndPushChildren(e,a,n,t),(o||s&&!l)&&(loadTile(e,a),touchTile(e,a,t),selectDesiredTile(e,a,t),hasEmptyContent(a)||a.contentAvailable||(i=!1)),visitTile(e)}return traversal.stack.trim(traversal.stackMaximumLength),i};var traversal$1={stack:new ManagedArray,stackMaximumLength:0},emptyTraversal={stack:new ManagedArray,stackMaximumLength:0},descendantTraversal={stack:new ManagedArray,stackMaximumLength:0},selectionTraversal={stack:new ManagedArray,stackMaximumLength:0,ancestorStack:new ManagedArray,ancestorStackMaximumLength:0},descendantSelectionDepth=2;function executeBaseTraversal(e,t,i){executeTraversal(e,t,e._maximumScreenSpaceError,e._maximumScreenSpaceError,i)}function executeSkipTraversal(e,t,i){executeTraversal(e,t,Number.MAX_VALUE,e._maximumScreenSpaceError,i),traverseAndSelect(e,t,i)}function executeBaseAndSkipTraversal(e,t,i){executeTraversal(e,t,Math.max(e.baseScreenSpaceError,e.maximumScreenSpaceError),e.maximumScreenSpaceError,i),traverseAndSelect(e,t,i)}function skipLevelOfDetail(e){return e._skipLevelOfDetail}function addEmptyTile(e,t){e._emptyTiles.push(t)}function selectTile(e,t,i){var r;t.contentVisibility(i)!==Intersect$1.OUTSIDE&&((r=t.content).featurePropertiesDirty?(r.featurePropertiesDirty=!1,t.lastStyleTime=0,e._selectedTilesToStyle.push(t)):t._selectedFrame<i.frameNumber-1&&e._selectedTilesToStyle.push(t),t._selectedFrame=i.frameNumber,e._selectedTiles.push(t))}function selectDescendants(e,t,i){var r=descendantTraversal.stack;for(r.push(t);0<r.length;){descendantTraversal.stackMaximumLength=Math.max(descendantTraversal.stackMaximumLength,r.length);for(var n=r.pop().children,a=n.length,o=0;o<a;++o){var s=n[o];isVisible$1(s)&&(s.contentAvailable?(updateTile(e,s,i),touchTile$1(e,s,i),selectTile(e,s,i)):s._depth-t._depth<descendantSelectionDepth&&r.push(s))}}}function selectDesiredTile$1(e,t,i){var r;skipLevelOfDetail(e)?defined(r=t.contentAvailable?t:t._ancestorWithContentAvailable)?r._shouldSelect=!0:selectDescendants(e,t,i):t.contentAvailable&&selectTile(e,t,i)}function visitTile$1(e,t,i){++e._statistics.visited,t._visitedFrame=i.frameNumber}function touchTile$1(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function updateMinimumMaximumPriority(e,t){e._maximumPriority.distance=Math.max(t._priorityHolder._distanceToCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t._priorityHolder._distanceToCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t._depth,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t._depth,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t._priorityHolder._foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t._priorityHolder._foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.reverseScreenSpaceError=Math.max(t._priorityReverseScreenSpaceError,e._maximumPriority.reverseScreenSpaceError),e._minimumPriority.reverseScreenSpaceError=Math.min(t._priorityReverseScreenSpaceError,e._minimumPriority.reverseScreenSpaceError)}function isOnScreenLongEnough(e,t,i){return e._cullRequestsWhileMoving?(t=t.boundingSphere,t=Math.max(2*t.radius,1),i=0!==(i=i.camera).positionWCDeltaMagnitude?i.positionWCDeltaMagnitude:i.positionWCDeltaMagnitudeLastFrame,e.cullRequestsWhileMovingMultiplier*i/t<1):1}function loadTile$1(e,t,i){var r;t._requestedFrame!==i.frameNumber&&(hasUnloadedContent$1(t)||t.contentExpired)&&isOnScreenLongEnough(e,t,i)&&(r=i.camera.timeSinceMoved<e.foveatedTimeDelay,t.priorityDeferred&&r||(t._requestedFrame=i.frameNumber,e._requestedTiles.push(t)))}function updateVisibility(e,t,i){t._updatedVisibilityFrame!==e._updatedVisibilityFrame&&(t.updateVisibility(i),t._updatedVisibilityFrame=e._updatedVisibilityFrame)}function anyChildrenVisible(e,t,i){for(var r=!1,n=t.children,a=n.length,o=0;o<a;++o){var s=n[o];updateVisibility(e,s,i),r=r||isVisible$1(s)}return r}function meetsScreenSpaceErrorEarly(e,t,i){var r=t.parent;return defined(r)&&!r.hasTilesetContent&&r.refine===Cesium3DTileRefine$1.ADD&&t.getScreenSpaceError(i,!0)<=e._maximumScreenSpaceError}function updateTileVisibility(e,t,i){if(updateVisibility(e,t,i),isVisible$1(t)){var r=0<t.children.length;if(t.hasTilesetContent&&r)return updateTileVisibility(e,a=t.children[0],i),void(t._visible=a._visible);if(!meetsScreenSpaceErrorEarly(e,t,i)){var n=t.refine===Cesium3DTileRefine$1.REPLACE,a=t._optimChildrenWithinParent===Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION;return n&&a&&r&&!anyChildrenVisible(e,t,i)&&(++e._statistics.numberOfTilesCulledWithChildrenUnion,void(t._visible=!1))}t._visible=!1}}function updateTile(e,t,i){updateTileVisibility(e,t,i),t.updateExpiration(),t._wasMinPriorityChild=!1,updateMinimumMaximumPriority(e,t._priorityHolder=t),t._shouldSelect=!1,t._finalResolution=!0}function updateTileAncestorContentLinks(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;var i=e.parent;defined(i)&&(t=!hasUnloadedContent$1(i)||i._requestedFrame===t.frameNumber,e._ancestorWithContent=t?i:i._ancestorWithContent,e._ancestorWithContentAvailable=i.contentAvailable?i:i._ancestorWithContentAvailable)}function hasEmptyContent$1(e){return e.hasEmptyContent||e.hasTilesetContent}function hasUnloadedContent$1(e){return!hasEmptyContent$1(e)&&e.contentUnloaded}function reachedSkippingThreshold(e,t){var i=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||defined(i)&&t._screenSpaceError<i._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>i._depth+e.skipLevels)}function sortChildrenByDistanceToCamera(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}function updateAndPushChildren$1(e,t,i,r){for(var n=t.refine===Cesium3DTileRefine$1.REPLACE,a=t.children,o=a.length,s=0;s<o;++s)updateTile(e,a[s],r);a.sort(sortChildrenByDistanceToCamera);var l,c,u=!skipLevelOfDetail(e)&&n&&!hasEmptyContent$1(t),d=!0,h=!1,p=-1,f=Number.MAX_VALUE;for(s=0;s<o;++s)isVisible$1(c=a[s])?(i.push(c),c._foveatedFactor<f&&(p=s,f=c._foveatedFactor),h=!0):(u||e.loadSiblings)&&(c._foveatedFactor<f&&(p=s,f=c._foveatedFactor),loadTile$1(e,c,r),touchTile$1(e,c,r)),u&&(l=!!c._inRequestVolume&&(hasEmptyContent$1(c)?executeEmptyTraversal(e,c,r):c.contentAvailable),d=d&&l);if(h||(d=!1),-1!==p&&!skipLevelOfDetail(e)&&n){(n=a[p])._wasMinPriorityChild=!0;var m=(t._wasMinPriorityChild||t===e.root)&&f<=t._priorityHolder._foveatedFactor?t._priorityHolder:t;for(m._foveatedFactor=Math.min(n._foveatedFactor,m._foveatedFactor),m._distanceToCamera=Math.min(n._distanceToCamera,m._distanceToCamera),s=0;s<o;++s)(c=a[s])._priorityHolder=m}return d}function inBaseTraversal(e,t,i){return!skipLevelOfDetail(e)||!e.immediatelyLoadDesiredLevelOfDetail&&(!defined(t._ancestorWithContent)||(0===t._screenSpaceError?t.parent._screenSpaceError>i:t._screenSpaceError>i))}function canTraverse$1(e,t){return 0!==t.children.length&&(t.hasTilesetContent?!t.contentExpired:t._screenSpaceError>e._maximumScreenSpaceError)}function executeTraversal(e,t,i,r,n){var a=traversal$1.stack;for(a.push(t);0<a.length;){traversal$1.stackMaximumLength=Math.max(traversal$1.stackMaximumLength,a.length);var o=a.pop();updateTileAncestorContentLinks(o,n);var s=inBaseTraversal(e,o,i),l=o.refine===Cesium3DTileRefine$1.ADD,c=o.refine===Cesium3DTileRefine$1.REPLACE,u=!defined(d=o.parent)||d._refines,d=!1;canTraverse$1(e,o)&&(d=updateAndPushChildren$1(e,o,a,n)&&u),u=!d&&u,hasEmptyContent$1(o)?(addEmptyTile(e,o),loadTile$1(e,o,n),u&&selectDesiredTile$1(e,o,n)):l?(selectDesiredTile$1(e,o,n),loadTile$1(e,o,n)):c&&(s?(loadTile$1(e,o,n),u&&selectDesiredTile$1(e,o,n)):u?(selectDesiredTile$1(e,o,n),loadTile$1(e,o,n)):reachedSkippingThreshold(e,o)&&loadTile$1(e,o,n)),visitTile$1(e,o,n),touchTile$1(e,o,n),o._refines=d}}function executeEmptyTraversal(e,t,i){var r=!0,n=emptyTraversal.stack;for(n.push(t);0<n.length;){emptyTraversal.stackMaximumLength=Math.max(emptyTraversal.stackMaximumLength,n.length);var a=n.pop(),o=a.children,s=o.length,l=(c=hasEmptyContent$1(a))&&canTraverse$1(e,a),c=c&&0===a.children.length;if(l||a.contentAvailable||c||(r=!1),updateTile(e,a,i),isVisible$1(a)||(loadTile$1(e,a,i),touchTile$1(e,a,i)),l)for(var u=0;u<s;++u){var d=o[u];n.push(d)}}return r}function traverseAndSelect(e,t,i){var r,n=selectionTraversal.stack,a=selectionTraversal.ancestorStack;for(n.push(t);0<n.length||0<a.length;){if(selectionTraversal.stackMaximumLength=Math.max(selectionTraversal.stackMaximumLength,n.length),selectionTraversal.ancestorStackMaximumLength=Math.max(selectionTraversal.ancestorStackMaximumLength,a.length),0<a.length)if((d=a.peek())._stackLength===n.length){a.pop(),d!==r&&(d._finalResolution=!1),selectTile(e,d,i);continue}var o=n.pop();if(defined(o)){var s=o.refine===Cesium3DTileRefine$1.ADD,l=o._shouldSelect,c=o.children,u=c.length,d=canTraverse$1(e,o);if(l)if(s)selectTile(e,o,i);else{if(o._selectionDepth=a.length,0<o._selectionDepth&&(e._hasMixedContent=!0),r=o,!d){selectTile(e,o,i);continue}a.push(o),o._stackLength=n.length}if(d)for(var h=0;h<u;++h){var p=c[h];isVisible$1(p)&&n.push(p)}}}}Cesium3DTilesetTraversal.selectTiles=function(e,t){if(e._requestedTiles.length=0,!e.debugFreezeFrame){e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e._hasMixedContent=!1;var i=e.root;if(updateTile(e,i,t),isVisible$1(i)&&!(i.getScreenSpaceError(t,!0)<=e._maximumScreenSpaceError)){(skipLevelOfDetail(e)?e.immediatelyLoadDesiredLevelOfDetail?executeSkipTraversal:executeBaseAndSkipTraversal:executeBaseTraversal)(e,i,t),traversal$1.stack.trim(traversal$1.stackMaximumLength),emptyTraversal.stack.trim(emptyTraversal.stackMaximumLength),descendantTraversal.stack.trim(descendantTraversal.stackMaximumLength),selectionTraversal.stack.trim(selectionTraversal.stackMaximumLength),selectionTraversal.ancestorStack.trim(selectionTraversal.ancestorStackMaximumLength);for(var r=e._requestedTiles,n=r.length,a=0;a<n;++a)r[a].updatePriority()}}};var Cesium3DTilePass={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},passOptions=new Array(Cesium3DTilePass.NUMBER_OF_PASSES);passOptions[Cesium3DTilePass.RENDER]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!0,requestTiles:!0,ignoreCommands:!1}),passOptions[Cesium3DTilePass.PICK]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!1,ignoreCommands:!1}),passOptions[Cesium3DTilePass.SHADOW]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!1}),passOptions[Cesium3DTilePass.PRELOAD]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!0}),passOptions[Cesium3DTilePass.PRELOAD_FLIGHT]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!0}),passOptions[Cesium3DTilePass.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({traversal:Cesium3DTilesetTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!0}),passOptions[Cesium3DTilePass.MOST_DETAILED_PRELOAD]=Object.freeze({traversal:Cesium3DTilesetMostDetailedTraversal,isRender:!1,requestTiles:!0,ignoreCommands:!0}),passOptions[Cesium3DTilePass.MOST_DETAILED_PICK]=Object.freeze({traversal:Cesium3DTilesetMostDetailedTraversal,isRender:!1,requestTiles:!1,ignoreCommands:!1}),Cesium3DTilePass.getPassOptions=function(e){return passOptions[e]};var Cesium3DTilePass$1=Object.freeze(Cesium3DTilePass);function Empty3DTileContent(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}function TileBoundingRegion(e){this.rectangle=Rectangle.clone(e.rectangle),this.minimumHeight=defaultValue(e.minimumHeight,0),this.maximumHeight=defaultValue(e.maximumHeight,0),this.southwestCornerCartesian=new Cartesian3,this.northeastCornerCartesian=new Cartesian3,this.westNormal=new Cartesian3,this.southNormal=new Cartesian3,this.eastNormal=new Cartesian3,this.northNormal=new Cartesian3;var t=defaultValue(e.ellipsoid,Ellipsoid.WGS84);computeBox(this,e.rectangle,t),defaultValue(e.computeBoundingVolumes,!0)&&(this._orientedBoundingBox=OrientedBoundingBox.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,t),this._boundingSphere=BoundingSphere.fromOrientedBoundingBox(this._orientedBoundingBox))}Object.defineProperties(Empty3DTileContent.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}}}),Empty3DTileContent.prototype.hasProperty=function(e,t){return!1},Empty3DTileContent.prototype.getFeature=function(e){},Empty3DTileContent.prototype.applyDebugSettings=function(e,t){},Empty3DTileContent.prototype.applyStyle=function(e){},Empty3DTileContent.prototype.update=function(e,t){},Empty3DTileContent.prototype.isDestroyed=function(){return!1},Empty3DTileContent.prototype.destroy=function(){return destroyObject(this)},Object.defineProperties(TileBoundingRegion.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});var cartesian3Scratch$2=new Cartesian3,cartesian3Scratch2$1=new Cartesian3,cartesian3Scratch3$1=new Cartesian3,eastWestNormalScratch=new Cartesian3,westernMidpointScratch=new Cartesian3,easternMidpointScratch=new Cartesian3,cartographicScratch$2=new Cartographic,planeScratch=new Plane(Cartesian3.UNIT_X,0),rayScratch=new Ray;function computeBox(e,t,i){i.cartographicToCartesian(Rectangle.southwest(t),e.southwestCornerCartesian),i.cartographicToCartesian(Rectangle.northeast(t),e.northeastCornerCartesian),cartographicScratch$2.longitude=t.west,cartographicScratch$2.latitude=.5*(t.south+t.north),cartographicScratch$2.height=0;var r=i.cartographicToCartesian(cartographicScratch$2,westernMidpointScratch),n=Cartesian3.cross(r,Cartesian3.UNIT_Z,cartesian3Scratch$2);Cartesian3.normalize(n,e.westNormal),cartographicScratch$2.longitude=t.east;var a=i.cartographicToCartesian(cartographicScratch$2,easternMidpointScratch);n=Cartesian3.cross(Cartesian3.UNIT_Z,a,cartesian3Scratch$2);Cartesian3.normalize(n,e.eastNormal);n=Cartesian3.subtract(r,a,cartesian3Scratch$2),r=Cartesian3.normalize(n,eastWestNormalScratch);var o=0<(a=t.south)?(cartographicScratch$2.longitude=.5*(t.west+t.east),cartographicScratch$2.latitude=a,o=i.cartographicToCartesian(cartographicScratch$2,rayScratch.origin),Cartesian3.clone(r,rayScratch.direction),a=Plane.fromPointNormal(e.southwestCornerCartesian,e.westNormal,planeScratch),IntersectionTests.rayPlane(rayScratch,a,e.southwestCornerCartesian),i.geodeticSurfaceNormal(o,cartesian3Scratch2$1)):i.geodeticSurfaceNormalCartographic(Rectangle.southeast(t),cartesian3Scratch2$1);o=Cartesian3.cross(o,n,cartesian3Scratch3$1);Cartesian3.normalize(o,e.southNormal),t=(o=t.north)<0?(cartographicScratch$2.longitude=.5*(t.west+t.east),cartographicScratch$2.latitude=o,o=i.cartographicToCartesian(cartographicScratch$2,rayScratch.origin),Cartesian3.negate(r,rayScratch.direction),r=Plane.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,planeScratch),IntersectionTests.rayPlane(rayScratch,r,e.northeastCornerCartesian),i.geodeticSurfaceNormal(o,cartesian3Scratch2$1)):i.geodeticSurfaceNormalCartographic(Rectangle.northwest(t),cartesian3Scratch2$1),t=Cartesian3.cross(n,t,cartesian3Scratch3$1),Cartesian3.normalize(t,e.northNormal)}var southwestCornerScratch=new Cartesian3,northeastCornerScratch=new Cartesian3,negativeUnitY=new Cartesian3(0,-1,0),negativeUnitZ=new Cartesian3(0,0,-1),vectorScratch=new Cartesian3;function TileBoundingSphere(e,t){0===t&&(t=CesiumMath.EPSILON7),this._boundingSphere=new BoundingSphere(e,t)}TileBoundingRegion.prototype.distanceToCamera=function(e){var t,i,r,n,a,o,s,l=e.camera,c=l.positionWC,u=l.positionCartographic,d=0;return Rectangle.contains(this.rectangle,u)||(t=this.southwestCornerCartesian,n=this.northeastCornerCartesian,i=this.westNormal,r=this.southNormal,a=this.eastNormal,l=this.northNormal,e.mode!==SceneMode$1.SCENE3D&&((t=e.mapProjection.project(Rectangle.southwest(this.rectangle),southwestCornerScratch)).z=t.y,t.y=t.x,t.x=0,(n=e.mapProjection.project(Rectangle.northeast(this.rectangle),northeastCornerScratch)).z=n.y,n.y=n.x,n.x=0,i=negativeUnitY,a=Cartesian3.UNIT_Y,r=negativeUnitZ,l=Cartesian3.UNIT_Z),t=Cartesian3.subtract(c,t,vectorScratch),i=Cartesian3.dot(t,i),r=Cartesian3.dot(t,r),n=Cartesian3.subtract(c,n,vectorScratch),a=Cartesian3.dot(n,a),l=Cartesian3.dot(n,l),0<i?d+=i*i:0<a&&(d+=a*a),0<r?d+=r*r:0<l&&(d+=l*l)),(c=e.mode===SceneMode$1.SCENE3D?(s=u.height,o=this.minimumHeight,this.maximumHeight):(s=c.x,o=0))<s?d+=(c=s-c)*c:s<o&&(d+=(s=o-s)*s),Math.sqrt(d)},TileBoundingRegion.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)},TileBoundingRegion.prototype.createDebugVolume=function(e){var t=new Matrix4.clone(Matrix4.IDENTITY);return new Primitive({geometryInstances:new GeometryInstance({geometry:new RectangleOutlineGeometry({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),id:"outline",modelMatrix:t,attributes:{color:ColorGeometryInstanceAttribute.fromColor(e)}}),appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})},Object.defineProperties(TileBoundingSphere.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}}),TileBoundingSphere.prototype.distanceToCamera=function(e){var t=this._boundingSphere;return Math.max(0,Cartesian3.distance(t.center,e.camera.positionWC)-t.radius)},TileBoundingSphere.prototype.intersectPlane=function(e){return BoundingSphere.intersectPlane(this._boundingSphere,e)},TileBoundingSphere.prototype.update=function(e,t){Cartesian3.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},TileBoundingSphere.prototype.createDebugVolume=function(e){return new Primitive({geometryInstances:new GeometryInstance({geometry:new SphereOutlineGeometry({radius:this.radius}),id:"outline",modelMatrix:Matrix4.fromTranslation(this.center,new Matrix4.clone(Matrix4.IDENTITY)),attributes:{color:ColorGeometryInstanceAttribute.fromColor(e)}}),appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})};var scratchU=new Cartesian3,scratchV=new Cartesian3,scratchW$1=new Cartesian3,scratchCartesian$3=new Cartesian3;function computeMissingVector(e,t,i){return i=Cartesian3.cross(e,t,i),t=Cartesian3.magnitude(i),Cartesian3.multiplyByScalar(i,CesiumMath.EPSILON7/t,i)}function findOrthogonalVector(e,t){var i=Cartesian3.normalize(e,scratchCartesian$3);return computeMissingVector(e,Cartesian3.equalsEpsilon(i,Cartesian3.UNIT_X,CesiumMath.EPSILON6)?Cartesian3.UNIT_Y:Cartesian3.UNIT_X,t)}function checkHalfAxes(e){var t=Matrix3.getColumn(e,0,scratchU),i=Matrix3.getColumn(e,1,scratchV),r=Matrix3.getColumn(e,2,scratchW$1),n=Cartesian3.equals(t,Cartesian3.ZERO),a=Cartesian3.equals(i,Cartesian3.ZERO),o=Cartesian3.equals(r,Cartesian3.ZERO);return(n||a||o)&&(n&&a&&o?(e[0]=CesiumMath.EPSILON7,e[4]=CesiumMath.EPSILON7,e[8]=CesiumMath.EPSILON7):(!n||a||o?n||!a||o?n||a||!o?n?a?o||(i=computeMissingVector(r,t=findOrthogonalVector(r,t),i)):r=computeMissingVector(i,t=findOrthogonalVector(i,t),r):r=computeMissingVector(i=findOrthogonalVector(t,i),t,r):r=computeMissingVector(i,t,r):i=computeMissingVector(t,r,i):t=computeMissingVector(i,r,t),Matrix3.setColumn(e,0,t,e),Matrix3.setColumn(e,1,i,e),Matrix3.setColumn(e,2,r,e))),e}function TileOrientedBoundingBox(e,t){t=checkHalfAxes(t),this._orientedBoundingBox=new OrientedBoundingBox(e,t),this._boundingSphere=BoundingSphere.fromOrientedBoundingBox(this._orientedBoundingBox)}function Cesium3DTile(e,t,i,r){this._tileset=e;var n=(this._header=i).content;this.transform=defined(i.transform)?Matrix4.unpack(i.transform):Matrix4.clone(Matrix4.IDENTITY);var a,o,s,l,c,u,d,h,p,f=defined(r)?r.computedTransform:e.modelMatrix,m=Matrix4.multiply(f,this.transform,new Matrix4);f=defined(r)?r._initialTransform:Matrix4.IDENTITY;this._initialTransform=Matrix4.multiply(f,this.transform,new Matrix4),this.computedTransform=m,this._boundingVolume=this.createBoundingVolume(i.boundingVolume,m),this._boundingVolume2D=void 0,defined(n)&&defined(n.boundingVolume)&&(a=this.createBoundingVolume(n.boundingVolume,m)),this._contentBoundingVolume=a,this._contentBoundingVolume2D=void 0,defined(i.viewerRequestVolume)&&(o=this.createBoundingVolume(i.viewerRequestVolume,m)),this._viewerRequestVolume=o,this.geometricError=i.geometricError,this._geometricError=i.geometricError,defined(this._geometricError)||(this._geometricError=defined(r)?r.geometricError:e._geometricError,Cesium3DTile._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),o=defined(i.refine)?("replace"!==i.refine&&"add"!==i.refine||Cesium3DTile._deprecationWarning("lowercase-refine",'This tile uses a lowercase refine "'+i.refine+'". Instead use "'+i.refine.toUpperCase()+'".'),"REPLACE"===i.refine.toUpperCase()?Cesium3DTileRefine$1.REPLACE:Cesium3DTileRefine$1.ADD):defined(r)?r.refine:Cesium3DTileRefine$1.REPLACE,this.refine=o,this.children=[],this.parent=r,t=Resource.createIfNeeded(t),defined(n)?(d=n.uri,defined(n.url)&&(Cesium3DTile._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),d=n.url),l=!1,c=Cesium3DTileContentState$1.UNLOADED,u=t.getDerivedResource({url:d}),d=RequestScheduler.getServerKey(u.getUrlComponent())):(s=new Empty3DTileContent(e,this),l=!0,c=Cesium3DTileContentState$1.READY),this._content=s,this._contentResource=u,this._contentState=c,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this._expiredContent=void 0,this._serverKey=d,this.hasEmptyContent=l,this.hasTilesetContent=!1,this.cacheNode=void 0,defined(i=i.expire)&&(h=i.duration,defined(i.date)&&(p=JulianDate.fromIso8601(i.date))),this.expireDuration=h,this.expireDate=p,this.lastStyleTime=0,this._optimChildrenWithinParent=Cesium3DTileOptimizationHint$1.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.priorityDeferred=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=Color.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,(this._priorityHolder=this)._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new JulianDate,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Object.defineProperties(TileOrientedBoundingBox.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),TileOrientedBoundingBox.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},TileOrientedBoundingBox.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)},TileOrientedBoundingBox.prototype.update=function(e,t){Cartesian3.clone(e,this._orientedBoundingBox.center),t=checkHalfAxes(t),Matrix3.clone(t,this._orientedBoundingBox.halfAxes),BoundingSphere.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)},TileOrientedBoundingBox.prototype.createDebugVolume=function(e){return new Primitive({geometryInstances:new GeometryInstance({geometry:new BoxOutlineGeometry({minimum:new Cartesian3(-1,-1,-1),maximum:new Cartesian3(1,1,1)}),id:"outline",modelMatrix:Matrix4.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),attributes:{color:ColorGeometryInstanceAttribute.fromColor(e)}}),appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})},Cesium3DTile._deprecationWarning=deprecationWarning,Object.defineProperties(Cesium3DTile.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return defaultValue(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},extras:{get:function(){return this._header.extras}},color:{get:function(){return defined(this._color)||(this._color=new Color),Color.clone(this._color)},set:function(e){this._color=Color.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&!this.hasEmptyContent&&!this.hasTilesetContent||defined(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===Cesium3DTileContentState$1.READY}},contentUnloaded:{get:function(){return this._contentState===Cesium3DTileContentState$1.UNLOADED}},contentExpired:{get:function(){return this._contentState===Cesium3DTileContentState$1.EXPIRED}},contentFailed:{get:function(){return this._contentState===Cesium3DTileContentState$1.FAILED}},contentReadyToProcessPromise:{get:function(){if(defined(this._contentReadyToProcessPromise))return this._contentReadyToProcessPromise.promise}},contentReadyPromise:{get:function(){if(defined(this._contentReadyPromise))return this._contentReadyPromise.promise}},commandsLength:{get:function(){return this._commandsLength}}});var scratchCartesian$4=new Cartesian3;function isPriorityDeferred(e,t){var i=e._tileset,r=t.camera,n=e.boundingSphere,a=n.radius;t=Cartesian3.multiplyByScalar(r.directionWC,e._centerZDepth,scratchCartesian$4),t=Cartesian3.add(r.positionWC,t,scratchCartesian$4),t=Cartesian3.subtract(t,n.center,scratchCartesian$4);a<Cartesian3.magnitude(t)?(s=Cartesian3.normalize(t,scratchCartesian$4),o=Cartesian3.multiplyByScalar(s,a,scratchCartesian$4),s=Cartesian3.add(n.center,o,scratchCartesian$4),o=Cartesian3.subtract(s,r.positionWC,scratchCartesian$4),s=Cartesian3.normalize(o,scratchCartesian$4),e._foveatedFactor=1-Math.abs(Cartesian3.dot(r.directionWC,s))):e._foveatedFactor=0;var o=e.refine===Cesium3DTileRefine$1.REPLACE,s=i._skipLevelOfDetail;return!(o&&!s||!i.foveatedScreenSpaceError||1===i.foveatedConeSize||e._priorityProgressiveResolution&&o&&s||i._pass===Cesium3DTilePass$1.PRELOAD_FLIGHT||i._pass===Cesium3DTilePass$1.PRELOAD)&&(s=1-Math.cos(.5*r.frustum.fov),r=i.foveatedConeSize*s,!(e._foveatedFactor<=r)&&(s-=r,s=CesiumMath.clamp((e._foveatedFactor-r)/s,0,1),s=i.foveatedInterpolationCallback(i.foveatedMinimumScreenSpaceErrorRelaxation,i.maximumScreenSpaceError,s),e=0===e._screenSpaceError&&defined(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError,i.maximumScreenSpaceError-s<=e))}var scratchJulianDate$1=new JulianDate;function isPriorityProgressiveResolution(e,t){if(e.progressiveResolutionHeightFraction<=0||.5<e.progressiveResolutionHeightFraction)return!1;var i=t._screenSpaceErrorProgressiveResolution>e._maximumScreenSpaceError;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;var r=t.parent,n=e._maximumScreenSpaceError;e=t._screenSpaceErrorProgressiveResolution<=n,n=defined(r)&&r._screenSpaceErrorProgressiveResolution>n;return e&&n&&(i=t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0),i}function getPriorityReverseScreenSpaceError(e,t){var i=t.parent;t=(!defined(i)||e._skipLevelOfDetail&&0!==t._screenSpaceError&&!i.hasTilesetContent?t:i)._screenSpaceError;return e.root._screenSpaceError-t}function updateExpireDate(e){var t;defined(e.expireDuration)&&(t=JulianDate.now(scratchJulianDate$1),JulianDate.addSeconds(t,e.expireDuration,t),defined(e.expireDate)?JulianDate.lessThan(e.expireDate,t)&&JulianDate.clone(t,e.expireDate):e.expireDate=JulianDate.clone(t))}function getContentFailedFunction(e,t){return function(i){e._contentState===Cesium3DTileContentState$1.PROCESSING?--t.statistics.numberOfTilesProcessing:--t.statistics.numberOfPendingRequests,e._contentState=Cesium3DTileContentState$1.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}}function createPriorityFunction(e){return function(){return e._priority}}Cesium3DTile.prototype.getScreenSpaceError=function(e,t,i){var r=this._tileset,n=defaultValue(i,1),a=defined(this.parent)?this.parent.geometricError:r._geometricError,o=t?a:this.geometricError;if(0===o)return 0;var s,l=e.camera;i=l.frustum,a=(t=e.context).drawingBufferWidth,n=t.drawingBufferHeight*n;return e.mode===SceneMode$1.SCENE2D||i instanceof OrthographicFrustum?(defined(i._offCenterFrustum)&&(i=i._offCenterFrustum),s=o/(Math.max(i.top-i.bottom,i.right-i.left)/Math.max(a,n))):(s=o*n/((n=Math.max(this._distanceToCamera,CesiumMath.EPSILON7))*l.frustum.sseDenominator),r.dynamicScreenSpaceError&&(l=r._dynamicScreenSpaceErrorComputedDensity,r=r.dynamicScreenSpaceErrorFactor,s-=CesiumMath.fog(n,l)*r)),s/e.pixelRatio},Cesium3DTile.prototype.updateVisibility=function(e){var t=this.parent,i=this._tileset,r=defined(t)?t.computedTransform:i.modelMatrix;t=defined(t)?t._visibilityPlaneMask:CullingVolume.MASK_INDETERMINATE;this.updateTransform(r),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,i.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,t),this._visible=this._visibilityPlaneMask!==CullingVolume.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=getPriorityReverseScreenSpaceError(i,this),this._priorityProgressiveResolution=isPriorityProgressiveResolution(i,this),this.priorityDeferred=isPriorityDeferred(this,e)},Cesium3DTile.prototype.updateExpiration=function(){var e;defined(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&(e=JulianDate.now(scratchJulianDate$1),JulianDate.lessThan(this.expireDate,e)&&(this._contentState=Cesium3DTileContentState$1.EXPIRED,this._expiredContent=this._content))},Cesium3DTile.prototype.requestContent=function(){var e=this,t=this._tileset;if(this.hasEmptyContent)return!1;var i=this._contentResource.clone(),r=this.contentExpired;r&&i.setQueryParameters({expired:this.expireDate.toString()});var n=new Request({throttle:!0,throttleByServer:!0,type:RequestType$1.TILES3D,priorityFunction:createPriorityFunction(this),serverKey:this._serverKey});if(this._request=n,i.request=n,!defined(i=i.fetchArrayBuffer()))return!1;var a=this._contentState;this._contentState=Cesium3DTileContentState$1.LOADING,this._contentReadyToProcessPromise=when.defer(),this._contentReadyPromise=when.defer();var o=getContentFailedFunction(this,t);return i.then((function(i){if(!e.isDestroyed()){var n,a=getMagic(new Uint8Array(i)),s=Cesium3DTileContentFactory[a];return t._disableSkipLevelOfDetail=t._disableSkipLevelOfDetail||"vctr"===a||"geom"===a,defined(s)?n=s(t,e,e._contentResource,i,0):(n=Cesium3DTileContentFactory.json(t,e,e._contentResource,i,0),e.hasTilesetContent=!0),r&&(e.expireDate=void 0),e._content=n,e._contentState=Cesium3DTileContentState$1.PROCESSING,e._contentReadyToProcessPromise.resolve(n),n.readyPromise.then((function(t){e.isDestroyed()?o():(updateExpireDate(e),e._selectedFrame=0,e.lastStyleTime=0,JulianDate.now(e._loadTimestamp),e._contentState=Cesium3DTileContentState$1.READY,e._contentReadyPromise.resolve(t))}))}o()})).otherwise((function(i){return n.state===RequestState$1.CANCELLED?(e._contentState=a,--t.statistics.numberOfPendingRequests,void++t.statistics.numberOfAttemptedRequests):void o(i)})),!0},Cesium3DTile.prototype.unloadContent=function(){this.hasEmptyContent||this.hasTilesetContent||(this._content=this._content&&this._content.destroy(),this._contentState=Cesium3DTileContentState$1.UNLOADED,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var scratchProjectedBoundingSphere=new BoundingSphere;function getBoundingVolume(e,t){var i;return t.mode===SceneMode$1.SCENE3D||defined(e._boundingVolume2D)||(i=e._boundingVolume.boundingSphere,i=BoundingSphere.projectTo2D(i,t.mapProjection,scratchProjectedBoundingSphere),e._boundingVolume2D=new TileBoundingSphere(i.center,i.radius)),t.mode!==SceneMode$1.SCENE3D?e._boundingVolume2D:e._boundingVolume}function getContentBoundingVolume(e,t){var i;return t.mode===SceneMode$1.SCENE3D||defined(e._contentBoundingVolume2D)||(i=e._contentBoundingVolume.boundingSphere,i=BoundingSphere.projectTo2D(i,t.mapProjection,scratchProjectedBoundingSphere),e._contentBoundingVolume2D=new TileBoundingSphere(i.center,i.radius)),t.mode!==SceneMode$1.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}Cesium3DTile.prototype.visibility=function(e,t){var i=e.cullingVolume,r=getBoundingVolume(this,e),n=this._tileset;return defined(e=n.clippingPlanes)&&e.enabled&&(n=e.computeIntersectionWithBoundingVolume(r,n.clippingPlanesOriginMatrix),this._isClipped=n!==Intersect$1.INSIDE,n===Intersect$1.OUTSIDE)?CullingVolume.MASK_OUTSIDE:i.computeVisibilityWithPlaneMask(r,t)},Cesium3DTile.prototype.contentVisibility=function(e){if(!defined(this._contentBoundingVolume))return Intersect$1.INSIDE;if(this._visibilityPlaneMask===CullingVolume.MASK_INSIDE)return Intersect$1.INSIDE;var t=e.cullingVolume,i=getContentBoundingVolume(this,e),r=this._tileset;return defined(e=r.clippingPlanes)&&e.enabled&&(r=e.computeIntersectionWithBoundingVolume(i,r.clippingPlanesOriginMatrix),this._isClipped=r!==Intersect$1.INSIDE,r===Intersect$1.OUTSIDE)?Intersect$1.OUTSIDE:t.computeVisibility(i)},Cesium3DTile.prototype.distanceToTile=function(e){return getBoundingVolume(this,e).distanceToCamera(e)};var scratchToTileCenter=new Cartesian3;Cesium3DTile.prototype.distanceToTileCenter=function(e){var t=getBoundingVolume(this,e).boundingVolume;t=Cartesian3.subtract(t.center,e.camera.positionWC,scratchToTileCenter);return Cartesian3.dot(e.camera.directionWC,t)},Cesium3DTile.prototype.insideViewerRequestVolume=function(e){var t=this._viewerRequestVolume;return!defined(t)||0===t.distanceToCamera(e)};var scratchMatrix$2=new Matrix3,scratchScale$6=new Cartesian3,scratchHalfAxes=new Matrix3,scratchCenter$3=new Cartesian3,scratchRectangle$2=new Rectangle,scratchOrientedBoundingBox=new OrientedBoundingBox,scratchTransform=new Matrix4;function createBox(e,t,i){var r=Cartesian3.fromElements(e[0],e[1],e[2],scratchCenter$3);e=Matrix3.fromArray(e,3,scratchHalfAxes),r=Matrix4.multiplyByPoint(t,r,r),t=Matrix4.getMatrix3(t,scratchMatrix$2),e=Matrix3.multiply(t,e,e);return defined(i)?(i.update(r,e),i):new TileOrientedBoundingBox(r,e)}function createBoxFromTransformedRegion(e,t,i,r){var n=Rectangle.unpack(e,0,scratchRectangle$2),a=e[4];e=e[5],e=(a=OrientedBoundingBox.fromRectangle(n,a,e,Ellipsoid.WGS84,scratchOrientedBoundingBox)).center,a=a.halfAxes;return t=Matrix4.multiplyTransformation(t,Matrix4.inverseTransformation(i,scratchTransform),scratchTransform),e=Matrix4.multiplyByPoint(t,e,e),t=Matrix4.getMatrix3(t,scratchMatrix$2),a=Matrix3.multiply(t,a,a),defined(r)&&r instanceof TileOrientedBoundingBox?(r.update(e,a),r):new TileOrientedBoundingBox(e,a)}function createRegion(e,t,i,r){return Matrix4.equalsEpsilon(t,i,CesiumMath.EPSILON8)?defined(r)?r:new TileBoundingRegion({rectangle:Rectangle.unpack(e,0,scratchRectangle$2),minimumHeight:e[4],maximumHeight:e[5]}):createBoxFromTransformedRegion(e,t,i,r)}function createSphere(e,t,i){var r=Cartesian3.fromElements(e[0],e[1],e[2],scratchCenter$3);e=e[3],r=Matrix4.multiplyByPoint(t,r,r),t=Matrix4.getScale(t,scratchScale$6);return e*=Cartesian3.maximumComponent(t),defined(i)?(i.update(r,e),i):new TileBoundingSphere(r,e)}function applyDebugSettings(e,t,i,r){var n,a,o;r.isRender&&(o=defined(e._header.content)&&defined(e._header.content.boundingVolume),n=e.hasEmptyContent||e.hasTilesetContent,(a=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o)?(r=e._finalResolution?n?Color.DARKGRAY:Color.WHITE:Color.YELLOW,defined(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(r)),e._debugBoundingVolume.update(i),(n=e._debugBoundingVolume.getGeometryInstanceAttributes("outline")).color=ColorGeometryInstanceAttribute.toValue(r,n.color)):!a&&defined(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy()),t.debugShowContentBoundingVolume&&o?(defined(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(Color.BLUE)),e._debugContentBoundingVolume.update(i)):!t.debugShowContentBoundingVolume&&defined(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&defined(e._viewerRequestVolume)?(defined(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(Color.YELLOW)),e._debugViewerRequestVolume.update(i)):!t.debugShowViewerRequestVolume&&defined(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy()),a=t.debugColorizeTiles&&!e._debugColorizeTiles||defined(t._heatmap.tilePropertyName),o=!t.debugColorizeTiles&&e._debugColorizeTiles,a?(t._heatmap.colorize(e,i),e._debugColorizeTiles=!0,e.color=e._debugColor):o&&(e._debugColorizeTiles=!1,e.color=Color.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),o&&t.makeStyleDirty())}function updateContent(e,t,i){var r=e._content,n=e._expiredContent;if(defined(n)){if(!e.contentReady)return void n.update(t,i);e._expiredContent.destroy(),e._expiredContent=void 0}r.update(t,i)}function updateClippingPlanes$1(e,t){var i=t.clippingPlanes;t=0;defined(i)&&e._isClipped&&i.enabled&&(t=i.clippingPlanesState),t!==e._clippingPlanesState&&(e._clippingPlanesState=t,e.clippingPlanesDirty=!0)}Cesium3DTile.prototype.createBoundingVolume=function(e,t,i){if(!defined(e))throw new RuntimeError("boundingVolume must be defined");if(defined(e.box))return createBox(e.box,t,i);if(defined(e.region))return createRegion(e.region,t,this._initialTransform,i);if(defined(e.sphere))return createSphere(e.sphere,t,i);throw new RuntimeError("boundingVolume must contain a sphere, region, or box")},Cesium3DTile.prototype.updateTransform=function(e){e=defaultValue(e,Matrix4.IDENTITY);var t=Matrix4.multiply(e,this.transform,scratchTransform);Matrix4.equals(t,this.computedTransform)||(Matrix4.clone(t,this.computedTransform),e=this._header,t=this._header.content,this._boundingVolume=this.createBoundingVolume(e.boundingVolume,this.computedTransform,this._boundingVolume),defined(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(t.boundingVolume,this.computedTransform,this._contentBoundingVolume)),defined(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(e.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())},Cesium3DTile.prototype.updateGeometricErrorScale=function(){var e=Matrix4.getScale(this.computedTransform,scratchScale$6);e=Cartesian3.maximumComponent(e);this.geometricError=this._geometricError*e},Cesium3DTile.prototype.update=function(e,t,i){var r=t.commandList.length;updateClippingPlanes$1(this,e),applyDebugSettings(this,e,t,i),updateContent(this,e,t),this._commandsLength=t.commandList.length-r,this.clippingPlanesDirty=!1};var scratchCommandList=[];function isolateDigits(e,t,i){return t=e*Math.pow(10,t),parseInt(t)*Math.pow(10,i)}function priorityNormalizeAndClamp(e,t,i){return Math.max(CesiumMath.normalize(e,t,i)-CesiumMath.EPSILON7,0)}Cesium3DTile.prototype.process=function(e,t){var i=t.commandList;t.commandList=scratchCommandList,this._content.update(e,t),scratchCommandList.length=0,t.commandList=i},Cesium3DTile.prototype.updatePriority=function(){var e=this.tileset,t=e.preferLeaves,i=e._minimumPriority,r=e._maximumPriority,n=Math.pow(10,8),a=Math.pow(10,9),o=Math.pow(10,10),s=priorityNormalizeAndClamp(this._depth,i.depth,r.depth);s=t?1-s:s,t=isolateDigits(e._skipLevelOfDetail||this.refine!==Cesium3DTileRefine$1.REPLACE?priorityNormalizeAndClamp(this._priorityReverseScreenSpaceError,i.reverseScreenSpaceError,r.reverseScreenSpaceError):priorityNormalizeAndClamp(this._priorityHolder._distanceToCamera,i.distance,r.distance),4,0),n=this._priorityProgressiveResolution?0:n,r=isolateDigits(priorityNormalizeAndClamp(this._priorityHolder._foveatedFactor,i.foveatedFactor,r.foveatedFactor),4,4),a=this.priorityDeferred?a:0,o=e._pass===Cesium3DTilePass$1.PRELOAD_FLIGHT?0:o;this._priority=s+t+n+r+a+o},Cesium3DTile.prototype.isDestroyed=function(){return!1},Cesium3DTile.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),destroyObject(this)};var Cesium3DTileOptimizations={},scratchAxis=new Cartesian3;function Cesium3DTilesetCache(){this._list=new DoublyLinkedList,this._sentinel=this._list.add(),this._trimTiles=!1}function Cesium3DTilesetHeatmap(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function getHeatmapValue(e,t){return e="_loadTimestamp"===t?JulianDate.toDate(e).getTime():e}function getHeatmapValueAndUpdateMinimumMaximum(e,t){var i=e.tilePropertyName;if(defined(i))return defined(i=getHeatmapValue(t[i],i))?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}Cesium3DTileOptimizations.checkChildrenWithinParent=function(e){var t=e.children,i=t.length,r=e.boundingVolume;if(r instanceof TileOrientedBoundingBox||r instanceof TileBoundingRegion){var n=r._orientedBoundingBox;e._optimChildrenWithinParent=Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION;for(var a=0;a<i;++a){if(!((l=t[a].boundingVolume)instanceof TileOrientedBoundingBox||l instanceof TileBoundingRegion)){e._optimChildrenWithinParent=Cesium3DTileOptimizationHint$1.SKIP_OPTIMIZATION;break}var o=l._orientedBoundingBox,s=Cartesian3.subtract(o.center,n.center,scratchAxis),l=Cartesian3.magnitude(s);if(Cartesian3.divideByScalar(s,l,s),Math.abs(n.halfAxes[0]*s.x)+Math.abs(n.halfAxes[1]*s.y)+Math.abs(n.halfAxes[2]*s.z)+Math.abs(n.halfAxes[3]*s.x)+Math.abs(n.halfAxes[4]*s.y)+Math.abs(n.halfAxes[5]*s.z)+Math.abs(n.halfAxes[6]*s.x)+Math.abs(n.halfAxes[7]*s.y)+Math.abs(n.halfAxes[8]*s.z)<=Math.abs(o.halfAxes[0]*s.x)+Math.abs(o.halfAxes[1]*s.y)+Math.abs(o.halfAxes[2]*s.z)+Math.abs(o.halfAxes[3]*s.x)+Math.abs(o.halfAxes[4]*s.y)+Math.abs(o.halfAxes[5]*s.z)+Math.abs(o.halfAxes[6]*s.x)+Math.abs(o.halfAxes[7]*s.y)+Math.abs(o.halfAxes[8]*s.z)+l){e._optimChildrenWithinParent=Cesium3DTileOptimizationHint$1.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION},Cesium3DTilesetCache.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},Cesium3DTilesetCache.prototype.touch=function(e){defined(e=e.cacheNode)&&this._list.splice(this._sentinel,e)},Cesium3DTilesetCache.prototype.add=function(e){defined(e.cacheNode)||(e.cacheNode=this._list.add(e))},Cesium3DTilesetCache.prototype.unloadTile=function(e,t,i){var r=t.cacheNode;defined(r)&&(this._list.remove(r),t.cacheNode=void 0,i(e,t))},Cesium3DTilesetCache.prototype.unloadTiles=function(e,t){var i=this._trimTiles;this._trimTiles=!1;for(var r=this._list,n=1024*e.maximumMemoryUsage*1024,a=this._sentinel,o=r.head;o!==a&&(e.totalMemoryUsageInBytes>n||i);){var s=o.item;o=o.next;this.unloadTile(e,s,t)}},Cesium3DTilesetCache.prototype.trim=function(){this._trimTiles=!0},Cesium3DTilesetHeatmap.prototype.setReferenceMinimumMaximum=function(e,t,i){this._referenceMinimum[i]=getHeatmapValue(e,i),this._referenceMaximum[i]=getHeatmapValue(t,i)};var heatmapColors=[new Color(.1,.1,.1,1),new Color(.153,.278,.878,1),new Color(.827,.231,.49,1),new Color(.827,.188,.22,1),new Color(1,.592,.259,1),new Color(1,.843,0,1)];function Cesium3DTilesetStatistics(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}function updatePointAndFeatureCounts(e,t,i,r){var n=t.innerContents,a=t.pointsLength,o=t.trianglesLength,s=t.featuresLength,l=t.geometryByteLength,c=t.texturesByteLength;t=t.batchTableByteLength;if(r?(e.numberOfFeaturesLoaded+=i?-s:s,e.numberOfPointsLoaded+=i?-a:a,e.geometryByteLength+=i?-l:l,e.texturesByteLength+=i?-c:c,e.batchTableByteLength+=i?-t:t):(e.numberOfFeaturesSelected+=i?-s:s,e.numberOfPointsSelected+=i?-a:a,e.numberOfTrianglesSelected+=i?-o:o),defined(n))for(var u=n.length,d=0;d<u;++d)updatePointAndFeatureCounts(e,n[d],i,r)}function Cesium3DTileStyleEngine(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}function Cesium3DTileset(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._url=void 0,this._basePath=void 0,this._root=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._extensionsUsed=void 0,this._extensions=void 0,this._gltfUpAxis=void 0,this._cache=new Cesium3DTilesetCache,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._cullWithChildrenBounds=defaultValue(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new ManagedArray,this._maximumScreenSpaceError=defaultValue(e.maximumScreenSpaceError,16),this._maximumMemoryUsage=defaultValue(e.maximumMemoryUsage,512),this._styleEngine=new Cesium3DTileStyleEngine,this._modelMatrix=defined(e.modelMatrix)?Matrix4.clone(e.modelMatrix):Matrix4.clone(Matrix4.IDENTITY),this._statistics=new Cesium3DTilesetStatistics,this._statisticsLast=new Cesium3DTilesetStatistics,this._statisticsPerPass=new Array(Cesium3DTilePass$1.NUMBER_OF_PASSES);for(var t=0;t<Cesium3DTilePass$1.NUMBER_OF_PASSES;++t)this._statisticsPerPass[t]=new Cesium3DTilesetStatistics;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new Cesium3DTilesetHeatmap(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=defaultValue(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this.cullRequestsWhileMovingMultiplier=defaultValue(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=CesiumMath.clamp(defaultValue(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=defaultValue(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._readyPromise=when.defer(),this._classificationType=e.classificationType,this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),this._initialClippingPlanesOriginMatrix=Matrix4.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this.preloadWhenHidden=defaultValue(e.preloadWhenHidden,!1),this.preloadFlightDestinations=defaultValue(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=defaultValue(e.dynamicScreenSpaceError,!1),this.foveatedScreenSpaceError=defaultValue(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=defaultValue(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=defaultValue(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=defaultValue(e.foveatedInterpolationCallback,CesiumMath.lerp),this.foveatedTimeDelay=defaultValue(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorFactor=4,this.dynamicScreenSpaceErrorHeightFalloff=.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=defaultValue(e.shadows,ShadowMode$1.ENABLED),this.show=defaultValue(e.show,!0),this.colorBlendMode=Cesium3DTileColorBlendMode$1.HIGHLIGHT,this.colorBlendAmount=.5,this.pointCloudShading=new PointCloudShading(e.pointCloudShading),this._pointCloudEyeDomeLighting=new PointCloudEyeDomeLighting,this.loadProgress=new Event,this.allTilesLoaded=new Event,this.initialTilesLoaded=new Event,this.tileLoad=new Event,this.tileUnload=new Event,this.tileFailed=new Event,this.tileVisible=new Event,this.skipLevelOfDetail=defaultValue(e.skipLevelOfDetail,!1),this._skipLevelOfDetail=this.skipLevelOfDetail,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=defaultValue(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=defaultValue(e.skipScreenSpaceErrorFactor,16),this.skipLevels=defaultValue(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=defaultValue(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=defaultValue(e.loadSiblings,!1),this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._imageBasedLightingFactor=new Cartesian2(1,1),Cartesian2.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=defaultValue(e.luminanceAtZenith,.2),this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.backFaceCulling=defaultValue(e.backFaceCulling,!0),this.debugFreezeFrame=defaultValue(e.debugFreezeFrame,!1),this.debugColorizeTiles=defaultValue(e.debugColorizeTiles,!1),this.debugWireframe=defaultValue(e.debugWireframe,!1),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=defaultValue(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=defaultValue(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=defaultValue(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=defaultValue(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=defaultValue(e.debugShowMemoryUsage,!1),this.debugShowUrl=defaultValue(e.debugShowUrl,!1);var i,r=this;when(e.url).then((function(e){var t;return i=Resource.createIfNeeded(e),r._credits=i.credits,"json"===i.extension?t=i.getBaseUri(!0):i.isDataUri&&(t=""),r._url=i.url,r._basePath=t,Cesium3DTileset.loadJson(i)})).then((function(e){r._root=r.loadTileset(i,e);var t=defined(e.asset.gltfUpAxis)?Axis$1.fromName(e.asset.gltfUpAxis):Axis$1.Y,n=e.asset;if(r._asset=n,r._properties=e.properties,r._geometricError=e.geometricError,r._extensionsUsed=e.extensionsUsed,r._extensions=e.extensions,r._gltfUpAxis=t,r._extras=e.extras,defined(n=n.extras)&&defined(n.cesium)&&defined(n.cesium.credits)){var a=n.cesium.credits,o=r._credits;defined(o)||(o=[],r._credits=o);for(var s=0;s<a.length;++s){var l=a[s];o.push(new Credit(l.html,l.showOnScreen))}}n=r._root.createBoundingVolume(e.root.boundingVolume,Matrix4.IDENTITY).boundingSphere.center,defined(e=r._ellipsoid.cartesianToCartographic(n))&&e.height>ApproximateTerrainHeights._defaultMinTerrainHeight&&(r._initialClippingPlanesOriginMatrix=Transforms.eastNorthUpToFixedFrame(n)),r._clippingPlanesOriginMatrix=Matrix4.clone(r._initialClippingPlanesOriginMatrix),r._readyPromise.resolve(r)})).otherwise((function(e){r._readyPromise.reject(e)}))}Cesium3DTilesetHeatmap.prototype.colorize=function(e,t){var i,r,n;defined(this.tilePropertyName)&&e.contentAvailable&&e._selectedFrame===t.frameNumber&&(r=getHeatmapValueAndUpdateMinimumMaximum(this,e),n=this._previousMinimum,i=this._previousMaximum,n!==Number.MAX_VALUE&&i!==-Number.MAX_VALUE&&(t=i-n+CesiumMath.EPSILON7,i=CesiumMath.clamp(r-n,0,t)/t*(heatmapColors.length-1),r=Math.floor(i),n=Math.ceil(i),t=i-r,i=heatmapColors[r],r=heatmapColors[n],(n=Color.clone(Color.WHITE)).red=CesiumMath.lerp(i.red,r.red,t),n.green=CesiumMath.lerp(i.green,r.green,t),n.blue=CesiumMath.lerp(i.blue,r.blue,t),e._debugColor=n))},Cesium3DTilesetHeatmap.prototype.resetMinimumMaximum=function(){var e,t,i=this.tilePropertyName;defined(i)&&(e=this._referenceMinimum[i],t=this._referenceMaximum[i],i=defined(e)&&defined(t),this._previousMinimum=i?e:this._minimum,this._previousMaximum=i?t:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE)},Cesium3DTilesetStatistics.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0},Cesium3DTilesetStatistics.prototype.incrementSelectionCounts=function(e){updatePointAndFeatureCounts(this,e,!1,!1)},Cesium3DTilesetStatistics.prototype.incrementLoadCounts=function(e){updatePointAndFeatureCounts(this,e,!1,!0)},Cesium3DTilesetStatistics.prototype.decrementLoadCounts=function(e){updatePointAndFeatureCounts(this,e,!0,!0)},Cesium3DTilesetStatistics.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength},Object.defineProperties(Cesium3DTileStyleEngine.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}}}),Cesium3DTileStyleEngine.prototype.makeDirty=function(){this._styleDirty=!0},Cesium3DTileStyleEngine.prototype.applyStyle=function(e,t){if(e.ready&&(!defined(this._style)||this._style.ready)){var i=this._styleDirty;t.isRender&&(this._styleDirty=!1),i&&++this._lastStyleTime;for(var r=this._lastStyleTime,n=e._statistics,a=i?e._selectedTiles:e._selectedTilesToStyle,o=a.length,s=0;s<o;++s){var l,c=a[s];c.lastStyleTime!==r&&(l=c.content,c.lastStyleTime=r,l.applyStyle(this._style),n.numberOfFeaturesStyled+=l.featuresLength,++n.numberOfTilesStyled)}}},Object.defineProperties(Cesium3DTileset.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){return this._asset}},extensions:{get:function(){return this._extensions}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ClippingPlaneCollection.setOwner(e,this,"_clippingPlanes")}},properties:{get:function(){return this._properties}},ready:{get:function(){return defined(this._root)}},readyPromise:{get:function(){return this._readyPromise.promise}},tilesLoaded:{get:function(){return this._tilesLoaded}},url:{get:function(){return this._url}},basePath:{get:function(){return deprecationWarning("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){this._maximumScreenSpaceError=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){this._maximumMemoryUsage=e}},root:{get:function(){return this._root}},boundingSphere:{get:function(){return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=Matrix4.clone(e,this._modelMatrix)}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){var e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return defined(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(Matrix4.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):Matrix4.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){return this._extras}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){Cartesian2.clone(e,this._imageBasedLightingFactor)}}}),Cesium3DTileset.loadJson=function(e){return Resource.createIfNeeded(e).fetchJson()},Cesium3DTileset.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},Cesium3DTileset.prototype.loadTileset=function(e,t,i){if(!defined(r=t.asset))throw new RuntimeError("Tileset must have an asset property.");if("0.0"!==r.version&&"1.0"!==r.version)throw new RuntimeError("The tileset must be 3D Tiles version 0.0 or 1.0.");var r,n=this._statistics;defined(r=r.tilesetVersion)&&(this._basePath+="?v="+r,e.setQueryParameters({v:r})),t=new Cesium3DTile(this,e,t.root,i),defined(i)&&(i.children.push(t),t._depth=i._depth+1);var a=[];for(a.push(t);0<a.length;){var o=a.pop();++n.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&o.refine===Cesium3DTileRefine$1.ADD;var s=o._header.children;if(defined(s))for(var l=s.length,c=0;c<l;++c){var u=new Cesium3DTile(this,e,s[c],o);o.children.push(u),u._depth=o._depth+1,a.push(u)}this._cullWithChildrenBounds&&Cesium3DTileOptimizations.checkChildrenWithinParent(o)}return t};var scratchPositionNormal=new Cartesian3,scratchCartographic$7=new Cartographic,scratchMatrix$3=new Matrix4,scratchCenter$4=new Cartesian3,scratchPosition$9=new Cartesian3,scratchDirection=new Cartesian3;function updateDynamicScreenSpaceError(e,t){var i,r,n,a,o,s,l,c=t.camera,u=e._root,d=u.contentBoundingVolume;d instanceof TileBoundingRegion?(p=Cartesian3.normalize(c.positionWC,scratchPositionNormal),n=c.directionWC,a=c.positionCartographic.height,h=d.minimumHeight,o=d.maximumHeight):(i=Matrix4.inverseTransformation(u.computedTransform,scratchMatrix$3),r=t.mapProjection.ellipsoid,l=d.boundingVolume,t=Matrix4.multiplyByPoint(i,l.center,scratchCenter$4),Cartesian3.magnitude(t)>r.minimumRadius?(s=Cartographic.fromCartesian(t,r,scratchCartographic$7),p=Cartesian3.normalize(c.positionWC,scratchPositionNormal),n=c.directionWC,a=c.positionCartographic.height,h=0,o=2*s.height):(s=Matrix4.multiplyByPoint(i,c.positionWC,scratchPosition$9),p=Cartesian3.UNIT_Z,n=Matrix4.multiplyByPointAsVector(i,c.directionWC,scratchDirection),n=Cartesian3.normalize(n,n),a=s.z,d instanceof TileOrientedBoundingBox?(u=u._header.boundingVolume.box[11],h=t.z-u,o=t.z+u):d instanceof TileBoundingSphere&&(l=l.radius,h=t.z-l,o=t.z+l)));var h=h+(o-h)*e.dynamicScreenSpaceErrorHeightFalloff,p=(h=CesiumMath.clamp((a-h)/(o-h),0,1),1-Math.abs(Cartesian3.dot(n,p)));p*=1-h,h=e.dynamicScreenSpaceErrorDensity,h*=p,e._dynamicScreenSpaceErrorComputedDensity=h}function requestContent(e,t){var i,r;t.hasEmptyContent||(i=e._statistics,r=t.contentExpired,t.requestContent()?(r&&(t.hasTilesetContent?destroySubtree(e,t):(i.decrementLoadCounts(t.content),--i.numberOfTilesWithContentReady)),++i.numberOfPendingRequests,e._requestedTilesInFlight.push(t),t.contentReadyToProcessPromise.then(addToProcessingQueue(e,t)),t.contentReadyPromise.then(handleTileSuccess(e,t)).otherwise(handleTileFailure(e,t))):++i.numberOfAttemptedRequests)}function sortRequestByPriority(e,t){return e._priority-t._priority}function cancelOutOfViewRequests(e,t){for(var i=e._requestedTilesInFlight,r=0,n=i.length,a=0;a<n;++a){var o=i[a],s=1<=t.frameNumber-o._touchedFrame;o._contentState===Cesium3DTileContentState$1.LOADING?s?(o._request.cancel(),++r):0<r&&(i[a-r]=o):++r}i.length-=r}function requestTiles(e,t){var i=e._requestedTiles,r=i.length;i.sort(sortRequestByPriority);for(var n=0;n<r;++n)requestContent(e,i[n])}function addToProcessingQueue(e,t){return function(){e._processingQueue.push(t),--e._statistics.numberOfPendingRequests,++e._statistics.numberOfTilesProcessing}}function handleTileFailure(e,t){return function(i){var r=t._contentResource.url;i=defined(i.message)?i.message:i.toString();0<e.tileFailed.numberOfListeners?e.tileFailed.raiseEvent({url:r,message:i}):(console.log("A 3D tile failed to load: "+r),console.log("Error: "+i))}}function handleTileSuccess(e,t){return function(){--e._statistics.numberOfTilesProcessing,t.hasTilesetContent||(e._statistics.incrementLoadCounts(t.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(t)),e.tileLoad.raiseEvent(t)}}function filterProcessingQueue(e){for(var t=e._processingQueue,i=t.length,r=0,n=0;n<i;++n){var a=t[n];a._contentState===Cesium3DTileContentState$1.PROCESSING?0<r&&(t[n-r]=a):++r}t.length-=r}function processTiles(e,t){filterProcessingQueue(e);for(var i=e._processingQueue,r=i.length,n=0;n<r;++n)i[n].process(e,t)}Cesium3DTileset.prototype.postPassesUpdate=function(e){this.ready&&(cancelOutOfViewRequests(this,e),raiseLoadProgressEvent(this,e),this._cache.unloadTiles(this,unloadTile))},Cesium3DTileset.prototype.prePassesUpdate=function(e){var t;this.ready&&(processTiles(this,e),t=this._clippingPlanes,this._clippingPlanesOriginMatrixDirty=!0,defined(t)&&t.enabled&&t.update(e),defined(this._loadTimestamp)||(this._loadTimestamp=JulianDate.clone(e.time)),this._timeSinceLoad=Math.max(1e3*JulianDate.secondsDifference(e.time,this._loadTimestamp),0),this._skipLevelOfDetail=this.skipLevelOfDetail&&!defined(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive,this.dynamicScreenSpaceError&&updateDynamicScreenSpaceError(this,e),e.newFrame&&this._cache.reset())};var scratchCartesian$5=new Cartesian3,stringOptions={maximumFractionDigits:3};function formatMemoryString(e){return(e/=1048576)<1?e.toLocaleString(void 0,stringOptions):Math.round(e).toLocaleString()}function computeTileLabelPosition(e){var t=e.boundingVolume.boundingVolume,i=t.halfAxes,r=t.radius;e=Cartesian3.clone(t.center,scratchCartesian$5);return defined(i)?(e.x+=.75*(i[0]+i[3]+i[6]),e.y+=.75*(i[1]+i[4]+i[7]),e.z+=.75*(i[2]+i[5]+i[8])):defined(r)&&(i=Cartesian3.normalize(t.center,scratchCartesian$5),i=Cartesian3.multiplyByScalar(i,.75*r,scratchCartesian$5),e=Cartesian3.add(i,t.center,scratchCartesian$5)),e}function addTileDebugLabel(e,t,i){var r="",n=0;return t.debugShowGeometricError&&(r+="\nGeometric error: "+e.geometricError,n++),t.debugShowRenderingStatistics&&(r+="\nCommands: "+e.commandsLength,n++,0<e.content.pointsLength&&(r+="\nPoints: "+e.content.pointsLength,n++),0<e.content.trianglesLength&&(r+="\nTriangles: "+e.content.trianglesLength,n++),r+="\nFeatures: "+e.content.featuresLength,n++),t.debugShowMemoryUsage&&(r+="\nTexture Memory: "+formatMemoryString(e.content.texturesByteLength),r+="\nGeometry Memory: "+formatMemoryString(e.content.geometryByteLength),n+=2),t.debugShowUrl&&(r+="\nUrl: "+e._header.content.uri,n++),n={text:r.substring(1),position:i,font:19-n+"px sans-serif",showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},t._tileDebugLabels.add(n)}function updateTileDebugLabels(e,t){var i,r,n,a=e._selectedTiles,o=a.length,s=e._emptyTiles,l=s.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly)defined(e.debugPickedTile)&&(n=defined(e.debugPickPosition)?e.debugPickPosition:computeTileLabelPosition(e.debugPickedTile),addTileDebugLabel(e.debugPickedTile,e,n).pixelOffset=new Cartesian2(15,-15));else{for(i=0;i<o;++i)addTileDebugLabel(r=a[i],e,computeTileLabelPosition(r));for(i=0;i<l;++i)(r=s[i]).hasTilesetContent&&addTileDebugLabel(r,e,computeTileLabelPosition(r))}e._tileDebugLabels.update(t)}function updateTiles(e,t,i){e._styleEngine.applyStyle(e,i);var r,n=i.isRender,a=e._statistics,o=t.commandList,s=o.length,l=e._selectedTiles,c=l.length,u=e._emptyTiles,d=u.length,h=e.tileVisible,p=e._skipLevelOfDetail&&e._hasMixedContent&&t.context.stencilBuffer&&0<c;e._backfaceCommands.length=0,p&&(defined(e._stencilClearCommand)||(e._stencilClearCommand=new ClearCommand({stencil:0,pass:Pass$1.CESIUM_3D_TILE,renderState:RenderState.fromCache({stencilMask:StencilConstants$1.SKIP_LOD_MASK})})),o.push(e._stencilClearCommand));for(var f=o.length,m=0;m<c;++m)r=l[m],n&&h.raiseEvent(r),r.update(e,t,i),a.incrementSelectionCounts(r.content),++a.selected;for(m=0;m<d;++m)(r=u[m]).update(e,t,i);var g=o.length-f;if(e._backfaceCommands.trim(),p){var y=e._backfaceCommands.values,_=y.length;for(o.length+=_,m=g-1;0<=m;--m)o[f+_+m]=o[f+m];for(m=0;m<_;++m)o[f+m]=y[m]}g=o.length-s,a.numberOfCommands=g,n&&e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&0<g&&e._pointCloudEyeDomeLighting.update(t,s,e.pointCloudShading,e.boundingSphere),n&&(e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(defined(e._tileDebugLabels)||(e._tileDebugLabels=new LabelCollection),updateTileDebugLabels(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var scratchStack$1=[];function destroySubtree(e,t){var i=t,r=scratchStack$1;for(r.push(t);0<r.length;){for(var n=(t=r.pop()).children,a=n.length,o=0;o<a;++o)r.push(n[o]);t!==i&&(destroyTile(e,t),--e._statistics.numberOfTilesTotal)}i.children=[]}function unloadTile(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function destroyTile(e,t){e._cache.unloadTile(e,t,unloadTile),t.destroy()}function raiseLoadProgressEvent(e,t){var i=e._statistics,r=e._statisticsLast,n=i.numberOfPendingRequests,a=i.numberOfTilesProcessing,o=r.numberOfPendingRequests,s=r.numberOfTilesProcessing;Cesium3DTilesetStatistics.clone(i,r),(s=n!==o||a!==s)&&t.afterRender.push((function(){e.loadProgress.raiseEvent(n,a)})),e._tilesLoaded=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests,s&&e._tilesLoaded&&(t.afterRender.push((function(){e.allTilesLoaded.raiseEvent()})),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push((function(){e.initialTilesLoaded.raiseEvent()}))))}function resetMinimumMaximum(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function detectModelMatrixChanged(e,t){t.frameNumber===e._updatedModelMatrixFrame&&defined(e._previousModelMatrix)||(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!Matrix4.equals(e.modelMatrix,e._previousModelMatrix),e._previousModelMatrix=Matrix4.clone(e.modelMatrix,e._previousModelMatrix))}function update$4(e,t,i,r){if(t.mode===SceneMode$1.MORPHING)return!1;if(!e.ready)return!1;var n=e._statistics;n.clear();var a=r.isRender;++e._updatedVisibilityFrame,resetMinimumMaximum(e),detectModelMatrixChanged(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;var o=r.traversal.selectTiles(e,t);if(r.requestTiles&&requestTiles(e),updateTiles(e,t,r),Cesium3DTilesetStatistics.clone(n,i),a){var s=e._credits;if(defined(s)&&0!==n.selected)for(var l=s.length,c=0;c<l;++c)t.creditDisplay.addCredit(s[c])}return o}Cesium3DTileset.prototype.trimLoadedTiles=function(){this._cache.trim()},Cesium3DTileset.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)},Cesium3DTileset.prototype.updateForPass=function(e,t){var i,r,n,a,o,s,l,c,u=t.pass;u===Cesium3DTilePass$1.PRELOAD&&(!this.preloadWhenHidden||this.show)||!(u!==Cesium3DTilePass$1.PRELOAD_FLIGHT||this.preloadFlightDestinations&&(this.show||this.preloadWhenHidden))||u===Cesium3DTilePass$1.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show)||(i=e.commandList,r=e.camera,n=e.cullingVolume,t.ready=!1,o=(a=Cesium3DTilePass$1.getPassOptions(u)).ignoreCommands,l=(s=defaultValue(t.commandList,i)).length,e.commandList=s,e.camera=defaultValue(t.camera,r),e.cullingVolume=defaultValue(t.cullingVolume,n),c=this._statisticsPerPass[u],(this.show||o)&&(this._pass=u,t.ready=update$4(this,e,c,a)),o&&(s.length=l),e.commandList=i,e.camera=r,e.cullingVolume=n)},Cesium3DTileset.prototype.hasExtension=function(e){return!!defined(this._extensionsUsed)&&-1<this._extensionsUsed.indexOf(e)},Cesium3DTileset.prototype.isDestroyed=function(){return!1},Cesium3DTileset.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),defined(this._root)){var e=scratchStack$1;for(e.push(this._root);0<e.length;){var t=e.pop();t.destroy();for(var i=t.children,r=i.length,n=0;n<r;++n)e.push(i[n])}}return this._root=void 0,destroyObject(this)};var modelMatrixScratch=new Matrix4;function Cesium3DTilesetVisualizer(e,t){t.collectionChanged.addEventListener(Cesium3DTilesetVisualizer.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function removeTileset(e,t,i,r){var n=i[t.id];defined(n)&&(r.removeAndDestroy(n.tilesetPrimitive),delete i[t.id])}function checkLoad(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}Cesium3DTilesetVisualizer.prototype.update=function(e){for(var t=this._entitiesToVisualize.values,i=this._tilesetHash,r=this._primitives,n=0,a=t.length;n<a;n++){var o,s,l=t[n],c=l._tileset,u=i[l.id],d=l.isShowing&&l.isAvailable(e)&&Property.getValueOrDefault(c._show,e,!0);d&&(s=l.computeModelMatrix(e,modelMatrixScratch),o=Resource.createIfNeeded(Property.getValueOrUndefined(c._uri,e))),d?(d=defined(u)?u.tilesetPrimitive:void 0,defined(d)&&o.url===u.url||(defined(d)&&(r.removeAndDestroy(d),delete i[l.id]),(d=new Cesium3DTileset({url:o})).id=l,r.add(d),u={tilesetPrimitive:d,url:o.url,loadFail:!1},i[l.id]=u,checkLoad(d,l,i)),d.show=!0,defined(s)&&(d.modelMatrix=s),d.maximumScreenSpaceError=Property.getValueOrDefault(c.maximumScreenSpaceError,e,d.maximumScreenSpaceError)):defined(u)&&(u.tilesetPrimitive.show=!1)}return!0},Cesium3DTilesetVisualizer.prototype.isDestroyed=function(){return!1},Cesium3DTilesetVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Cesium3DTilesetVisualizer.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._tilesetHash,i=this._primitives,r=e.length-1;-1<r;r--)removeTileset(this,e[r],t,i);return destroyObject(this)},Cesium3DTilesetVisualizer.prototype.getBoundingSphere=function(e,t){return!defined(e=this._tilesetHash[e.id])||e.loadFail?BoundingSphereState$1.FAILED:defined(e=e.tilesetPrimitive)&&e.show?e.ready?(BoundingSphere.clone(e.boundingSphere,t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING:BoundingSphereState$1.FAILED},Cesium3DTilesetVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._entitiesToVisualize,o=this._tilesetHash,s=this._primitives,l=t.length-1;-1<l;l--)defined((n=t[l])._tileset)&&a.set(n.id,n);for(l=r.length-1;-1<l;l--)defined((n=r[l])._tileset)?a.set(n.id,n):(removeTileset(this,n,o,s),a.remove(n.id));for(l=i.length-1;-1<l;l--)removeTileset(this,n=i[l],o,s),a.remove(n.id)};var defaultEvenColor=Color.WHITE,defaultOddColor=Color.BLACK,defaultRepeat$1=new Cartesian2(2,2);function CheckerboardMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(CheckerboardMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._evenColor)&&Property.isConstant(this._oddColor)&&Property.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:createPropertyDescriptor("evenColor"),oddColor:createPropertyDescriptor("oddColor"),repeat:createPropertyDescriptor("repeat")}),CheckerboardMaterialProperty.prototype.getType=function(e){return"Checkerboard"},CheckerboardMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.lightColor=Property.getValueOrClonedDefault(this._evenColor,e,defaultEvenColor,t.lightColor),t.darkColor=Property.getValueOrClonedDefault(this._oddColor,e,defaultOddColor,t.darkColor),t.repeat=Property.getValueOrDefault(this._repeat,e,defaultRepeat$1),t},CheckerboardMaterialProperty.prototype.equals=function(e){return this===e||e instanceof CheckerboardMaterialProperty&&Property.equals(this._evenColor,e._evenColor)&&Property.equals(this._oddColor,e._oddColor)&&Property.equals(this._repeat,e._repeat)};var entityOptionsScratch={id:void 0};function fireChangedEvent(e){if(e._firing)e._refire=!0;else if(0===e._suspendCount){var t=e._addedEntities,i=e._removedEntities,r=e._changedEntities;if(0!==r.length||0!==t.length||0!==i.length){e._firing=!0;do{e._refire=!1;var n=t.values.slice(0),a=i.values.slice(0),o=r.values.slice(0);t.removeAll(),i.removeAll(),r.removeAll(),e._collectionChanged.raiseEvent(e,n,a,o)}while(e._refire);e._firing=!1}}}function EntityCollection(e){this._owner=e,this._entities=new AssociativeArray,this._addedEntities=new AssociativeArray,this._removedEntities=new AssociativeArray,this._changedEntities=new AssociativeArray,this._suspendCount=0,this._collectionChanged=new Event,this._id=createGuid(),this._show=!0,this._firing=!1,this._refire=!1}EntityCollection.prototype.suspendEvents=function(){this._suspendCount++},EntityCollection.prototype.resumeEvents=function(){this._suspendCount--,fireChangedEvent(this)},EntityCollection.collectionChangedEventCallback=void 0,Object.defineProperties(EntityCollection.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(e!==this._show){this.suspendEvents();for(var t=[],i=this._entities.values,r=i.length,n=0;n<r;n++)t.push(i[n].isShowing);for(this._show=e,n=0;n<r;n++){var a=t[n],o=i[n];a!==o.isShowing&&o.definitionChanged.raiseEvent(o,"isShowing",o.isShowing,a)}this.resumeEvents()}}},owner:{get:function(){return this._owner}}}),EntityCollection.prototype.computeAvailability=function(){for(var e=Iso8601.MAXIMUM_VALUE,t=Iso8601.MINIMUM_VALUE,i=this._entities.values,r=0,n=i.length;r<n;r++){var a,o=i[r].availability;defined(o)&&(a=o.start,o=o.stop,JulianDate.lessThan(a,e)&&!a.equals(Iso8601.MINIMUM_VALUE)&&(e=a),JulianDate.greaterThan(o,t)&&!o.equals(Iso8601.MAXIMUM_VALUE)&&(t=o))}return Iso8601.MAXIMUM_VALUE.equals(e)&&(e=Iso8601.MINIMUM_VALUE),Iso8601.MINIMUM_VALUE.equals(t)&&(t=Iso8601.MAXIMUM_VALUE),new TimeInterval({start:e,stop:t})},EntityCollection.prototype.add=function(e){e instanceof Entity||(e=new Entity(e));var t=e.id,i=this._entities;if(i.contains(t))throw new RuntimeError("An entity with id "+t+" already exists in this collection.");return e.entityCollection=this,i.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(EntityCollection.prototype._onEntityDefinitionChanged,this),fireChangedEvent(this),e},EntityCollection.prototype.remove=function(e){return!!defined(e)&&this.removeById(e.id)},EntityCollection.prototype.contains=function(e){return this._entities.get(e.id)===e},EntityCollection.prototype.removeById=function(e){if(!defined(e))return!1;var t=this._entities.get(e);return!!this._entities.remove(e)&&(this._addedEntities.remove(e)||(this._removedEntities.set(e,t),this._changedEntities.remove(e)),this._entities.remove(e),t.definitionChanged.removeEventListener(EntityCollection.prototype._onEntityDefinitionChanged,this),fireChangedEvent(this),!0)},EntityCollection.prototype.removeAll=function(){for(var e=this._entities,t=e.length,i=e.values,r=this._addedEntities,n=this._removedEntities,a=0;a<t;a++){var o=i[a],s=o.id;defined(r.get(s))||(o.definitionChanged.removeEventListener(EntityCollection.prototype._onEntityDefinitionChanged,this),n.set(s,o))}e.removeAll(),r.removeAll(),this._changedEntities.removeAll(),fireChangedEvent(this)},EntityCollection.prototype.getById=function(e){return this._entities.get(e)},EntityCollection.prototype.getOrCreateEntity=function(e){var t=this._entities.get(e);return defined(t)||(entityOptionsScratch.id=e,t=new Entity(entityOptionsScratch),this.add(t)),t},EntityCollection.prototype._onEntityDefinitionChanged=function(e){var t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),fireChangedEvent(this)};var entityOptionsScratch$1={id:void 0},entityIdScratch=new Array(2);function clean(e){for(var t=e.propertyNames,i=t.length,r=0;r<i;r++)e[t[r]]=void 0;e._name=void 0,e._availability=void 0}function subscribeToEntity(e,t,i,r){entityIdScratch[0]=i,entityIdScratch[1]=r.id,t[JSON.stringify(entityIdScratch)]=r.definitionChanged.addEventListener(CompositeEntityCollection.prototype._onDefinitionChanged,e)}function unsubscribeFromEntity(e,t,i,r){entityIdScratch[0]=i,entityIdScratch[1]=r.id,t[r=JSON.stringify(entityIdScratch)](),t[r]=void 0}function recomposite(e){if(e._shouldRecomposite=!0,0===e._suspendCount){for(var t,i,r,n,a,o=e._collections,s=o.length,l=e._collectionsCopy,c=l.length,u=e._composite,d=new EntityCollection(e),h=e._eventHash,p=0;p<c;p++)for((n=l[p]).collectionChanged.removeEventListener(CompositeEntityCollection.prototype._onCollectionChanged,e),i=n.values,a=n.id,r=i.length-1;-1<r;r--)unsubscribeFromEntity(e,h,a,t=i[r]);for(p=s-1;0<=p;p--)for((n=o[p]).collectionChanged.addEventListener(CompositeEntityCollection.prototype._onCollectionChanged,e),i=n.values,a=n.id,r=i.length-1;-1<r;r--){subscribeToEntity(e,h,a,t=i[r]);var f=d.getById(t.id);defined(f)||(defined(f=u.getById(t.id))?clean(f):(entityOptionsScratch$1.id=t.id,f=new Entity(entityOptionsScratch$1)),d.add(f)),f.merge(t)}e._collectionsCopy=o.slice(0),u.suspendEvents(),u.removeAll();var m=d.values;for(p=0;p<m.length;p++)u.add(m[p]);u.resumeEvents()}}function CompositeEntityCollection(e,t){this._owner=t,this._composite=new EntityCollection(this),this._suspendCount=0,this._collections=defined(e)?e.slice():[],this._collectionsCopy=[],this._id=createGuid(),this._eventHash={},recomposite(this),this._shouldRecomposite=!1}function getCollectionIndex(e,t){return e.indexOf(t)}function swapCollections(e,t,i){var r,n=e._collections;(t=CesiumMath.clamp(t,0,n.length-1))!==(i=CesiumMath.clamp(i,0,n.length-1))&&(r=n[t],n[t]=n[i],n[i]=r,recomposite(e))}function subscribeAll(e,t,i,r){function n(){i.raiseEvent(e)}var a=[];t.removeAll();for(var o=r.length,s=0;s<o;s++){var l=r.get(s);defined(l.data)&&-1===a.indexOf(l.data)&&t.add(l.data.definitionChanged,n)}}function CompositeProperty(){this._eventHelper=new EventHelper,this._definitionChanged=new Event,this._intervals=new TimeIntervalCollection,this._intervals.changedEvent.addEventListener(CompositeProperty.prototype._intervalsChanged,this)}function CompositeMaterialProperty(){this._definitionChanged=new Event,this._composite=new CompositeProperty,this._composite.definitionChanged.addEventListener(CompositeMaterialProperty.prototype._raiseDefinitionChanged,this)}function CompositePositionProperty(e){this._referenceFrame=defaultValue(e,ReferenceFrame$1.FIXED),this._definitionChanged=new Event,this._composite=new CompositeProperty,this._composite.definitionChanged.addEventListener(CompositePositionProperty.prototype._raiseDefinitionChanged,this)}Object.defineProperties(CompositeEntityCollection.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}}),CompositeEntityCollection.prototype.addCollection=function(e,t){defined(t)?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),recomposite(this)},CompositeEntityCollection.prototype.removeCollection=function(e){return-1!==(e=this._collections.indexOf(e))&&(this._collections.splice(e,1),recomposite(this),!0)},CompositeEntityCollection.prototype.removeAllCollections=function(){this._collections.length=0,recomposite(this)},CompositeEntityCollection.prototype.containsCollection=function(e){return-1!==this._collections.indexOf(e)},CompositeEntityCollection.prototype.contains=function(e){return this._composite.contains(e)},CompositeEntityCollection.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)},CompositeEntityCollection.prototype.getCollection=function(e){return this._collections[e]},CompositeEntityCollection.prototype.getCollectionsLength=function(){return this._collections.length},CompositeEntityCollection.prototype.raiseCollection=function(e){swapCollections(this,e=getCollectionIndex(this._collections,e),e+1)},CompositeEntityCollection.prototype.lowerCollection=function(e){swapCollections(this,e=getCollectionIndex(this._collections,e),e-1)},CompositeEntityCollection.prototype.raiseCollectionToTop=function(e){var t=getCollectionIndex(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),recomposite(this))},CompositeEntityCollection.prototype.lowerCollectionToBottom=function(e){var t=getCollectionIndex(this._collections,e);0!==t&&(this._collections.splice(t,1),this._collections.splice(0,0,e),recomposite(this))},CompositeEntityCollection.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()},CompositeEntityCollection.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&0===this._suspendCount&&(recomposite(this),this._shouldRecomposite=!1),this._composite.resumeEvents()},CompositeEntityCollection.prototype.computeAvailability=function(){return this._composite.computeAvailability()},CompositeEntityCollection.prototype.getById=function(e){return this._composite.getById(e)},CompositeEntityCollection.prototype._onCollectionChanged=function(e,t,i){var r,n,a=this._collectionsCopy,o=a.length,s=this._composite;s.suspendEvents();for(var l=i.length,c=this._eventHash,u=e.id,d=0;d<l;d++){var h=i[d];unsubscribeFromEntity(this,c,u,h);for(var p=h.id,f=o-1;0<=f;f--)defined(r=a[f].getById(p))&&(defined(n)||clean(n=s.getById(p)),n.merge(r));defined(n)||s.removeById(p),n=void 0}var m=t.length;for(d=0;d<m;d++){var g=t[d];subscribeToEntity(this,c,u,g);var y=g.id;for(f=o-1;0<=f;f--)defined(r=a[f].getById(y))&&(defined(n)||(defined(n=s.getById(y))?clean(n):(entityOptionsScratch$1.id=y,n=new Entity(entityOptionsScratch$1),s.add(n))),n.merge(r));n=void 0}s.resumeEvents()},CompositeEntityCollection.prototype._onDefinitionChanged=function(e,t,i,r){for(var n=this._collections,a=this._composite,o=n.length,s=e.id,l=(a=a.getById(s))[t],c=(s=!defined(l),!0),u=o-1;0<=u;u--){var d=n[u].getById(e.id);if(defined(d)&&defined(d=d[t])){if(c){if(c=!1,!defined(d.merge)||!defined(d.clone)){l=d;break}l=d.clone(l)}l.merge(d)}}s&&-1===a.propertyNames.indexOf(t)&&a.addProperty(t),a[t]=l},Object.defineProperties(CompositeProperty.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),CompositeProperty.prototype.getValue=function(e,t){var i=this._intervals.findDataForIntervalContainingDate(e);if(defined(i))return i.getValue(e,t)},CompositeProperty.prototype.equals=function(e){return this===e||e instanceof CompositeProperty&&this._intervals.equals(e._intervals,Property.equals)},CompositeProperty.prototype._intervalsChanged=function(){subscribeAll(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)},Object.defineProperties(CompositeMaterialProperty.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),CompositeMaterialProperty.prototype.getType=function(e){var t=this._composite._intervals.findDataForIntervalContainingDate(e);if(defined(t))return t.getType(e)},CompositeMaterialProperty.prototype.getValue=function(e,t){var i=this._composite._intervals.findDataForIntervalContainingDate(e);if(defined(i))return i.getValue(e,t)},CompositeMaterialProperty.prototype.equals=function(e){return this===e||e instanceof CompositeMaterialProperty&&this._composite.equals(e._composite,Property.equals)},CompositeMaterialProperty.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(CompositePositionProperty.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),CompositePositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},CompositePositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){var r=this._composite._intervals.findDataForIntervalContainingDate(e);if(defined(r))return r.getValueInReferenceFrame(e,t,i)},CompositePositionProperty.prototype.equals=function(e){return this===e||e instanceof CompositePositionProperty&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,Property.equals)},CompositePositionProperty.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var defaultZIndex=new ConstantProperty(0);function GroundGeometryUpdater(e){GeometryUpdater.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}defined(Object.create)&&(GroundGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),GroundGeometryUpdater.prototype.constructor=GroundGeometryUpdater),Object.defineProperties(GroundGeometryUpdater.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),GroundGeometryUpdater.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!defined(t.height)&&!defined(t.extrudedHeight)&&GroundPrimitive.isSupported(this._scene)},GroundGeometryUpdater.prototype._getIsClosed=function(e){var t=e.height;e=e.extrudedHeight;return 0===t||defined(e)&&e!==t},GroundGeometryUpdater.prototype._computeCenter=DeveloperError.throwInstantiationError,GroundGeometryUpdater.prototype._onEntityPropertyChanged=function(e,t,i,r){GeometryUpdater.prototype._onEntityPropertyChanged.call(this,e,t,i,r),-1===this._observedPropertyNames.indexOf(t)||defined(i=this._entity[this._geometryPropertyName])&&(defined(i.zIndex)&&(defined(i.height)||defined(i.extrudedHeight))&&oneTimeWarning(oneTimeWarning.geometryZIndex),this._zIndex=defaultValue(i.zIndex,defaultZIndex),defined(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),r=i.heightReference,t=i.extrudedHeightReference,(defined(r)||defined(t))&&(i=new CallbackProperty(this._computeCenter.bind(this),!this._dynamic),this._terrainOffsetProperty=new TerrainOffsetProperty(this._scene,i,r,t)))},GroundGeometryUpdater.prototype.destroy=function(){defined(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),GeometryUpdater.prototype.destroy.call(this)},GroundGeometryUpdater.getGeometryHeight=function(e,t){if(defined(e))return t!==HeightReference$1.CLAMP_TO_GROUND?e:0;t!==HeightReference$1.NONE&&oneTimeWarning(oneTimeWarning.geometryHeightReference)},GroundGeometryUpdater.getGeometryExtrudedHeight=function(e,t){if(defined(e))return t!==HeightReference$1.CLAMP_TO_GROUND?e:GroundGeometryUpdater.CLAMP_TO_GROUND;t!==HeightReference$1.NONE&&oneTimeWarning(oneTimeWarning.geometryExtrudedHeightReference)},GroundGeometryUpdater.CLAMP_TO_GROUND="clamp",GroundGeometryUpdater.computeGeometryOffsetAttribute=function(e,t,i,r){return defined(e)&&defined(t)||(t=HeightReference$1.NONE),defined(i)&&defined(r)||(r=HeightReference$1.NONE),i=0,t!==HeightReference$1.NONE&&i++,r===HeightReference$1.RELATIVE_TO_GROUND&&i++,2===i?GeometryOffsetAttribute$1.ALL:1===i?GeometryOffsetAttribute$1.TOP:void 0};var scratchColor$9=new Color,defaultOffset$1=Cartesian3.ZERO,offsetScratch$4=new Cartesian3,scratchRectangle$3=new Rectangle;function CorridorGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function CorridorGeometryUpdater(e,t){GroundGeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new CorridorGeometryOptions(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function DynamicCorridorGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}function DataSource(){DeveloperError.throwInstantiationError()}function PointPrimitive(e,t){var i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).translucencyByDistance,r=e.scaleByDistance,n=e.distanceDisplayCondition;defined(i)&&(i=NearFarScalar.clone(i)),defined(r)&&(r=NearFarScalar.clone(r)),defined(n)&&(n=DistanceDisplayCondition.clone(n)),this._show=defaultValue(e.show,!0),this._position=Cartesian3.clone(defaultValue(e.position,Cartesian3.ZERO)),this._actualPosition=Cartesian3.clone(this._position),this._color=Color.clone(defaultValue(e.color,Color.WHITE)),this._outlineColor=Color.clone(defaultValue(e.outlineColor,Color.TRANSPARENT)),this._outlineWidth=defaultValue(e.outlineWidth,0),this._pixelSize=defaultValue(e.pixelSize,10),this._scaleByDistance=r,this._translucencyByDistance=i,this._distanceDisplayCondition=n,this._disableDepthTestDistance=defaultValue(e.disableDepthTestDistance,0),this._id=e.id,this._collection=defaultValue(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}defined(Object.create)&&(CorridorGeometryUpdater.prototype=Object.create(GroundGeometryUpdater.prototype),CorridorGeometryUpdater.prototype.constructor=CorridorGeometryUpdater),CorridorGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n={show:new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$9)),defined(t)||(t=Color.WHITE),n.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$1,offsetScratch$4))),new GeometryInstance({id:i,geometry:new CorridorGeometry(this._options),attributes:n})},CorridorGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$9);r={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return defined(this._options.offsetAttribute)&&(r.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$1,offsetScratch$4))),new GeometryInstance({id:t,geometry:new CorridorOutlineGeometry(this._options),attributes:r})},CorridorGeometryUpdater.prototype._computeCenter=function(e,t){if(defined(e=Property.getValueOrUndefined(this._entity.corridor.positions,e))&&0!==e.length)return Cartesian3.clone(e[Math.floor(e.length/2)],t)},CorridorGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.positions)||!defined(t.width)||GeometryUpdater.prototype._isHidden.call(this,e,t)},CorridorGeometryUpdater.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!Property.isConstant(t.height)||!Property.isConstant(t.extrudedHeight)||!Property.isConstant(t.granularity)||!Property.isConstant(t.width)||!Property.isConstant(t.outlineWidth)||!Property.isConstant(t.cornerType)||!Property.isConstant(t.zIndex)||this._onTerrain&&!Property.isConstant(this._materialProperty)&&!(this._materialProperty instanceof ColorMaterialProperty)},CorridorGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrUndefined(t.height,Iso8601.MINIMUM_VALUE),r=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),n=Property.getValueOrUndefined(t.extrudedHeight,Iso8601.MINIMUM_VALUE),a=Property.getValueOrDefault(t.extrudedHeightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE);defined(n)&&!defined(i)&&(i=0);var o=this._options;o.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,o.positions=t.positions.getValue(Iso8601.MINIMUM_VALUE,o.positions),o.width=t.width.getValue(Iso8601.MINIMUM_VALUE),o.granularity=Property.getValueOrUndefined(t.granularity,Iso8601.MINIMUM_VALUE),o.cornerType=Property.getValueOrUndefined(t.cornerType,Iso8601.MINIMUM_VALUE),o.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(i,r,n,a),o.height=GroundGeometryUpdater.getGeometryHeight(i,r),(n=GroundGeometryUpdater.getGeometryExtrudedHeight(n,a))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(n=ApproximateTerrainHeights.getMinimumMaximumHeights(CorridorGeometry.computeRectangle(o,scratchRectangle$3)).minimumTerrainHeight),o.extrudedHeight=n},CorridorGeometryUpdater.DynamicGeometryUpdater=DynamicCorridorGeometryUpdater,defined(Object.create)&&(DynamicCorridorGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicCorridorGeometryUpdater.prototype.constructor=DynamicCorridorGeometryUpdater),DynamicCorridorGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(r.positions)||!defined(r.width)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicCorridorGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options,n=Property.getValueOrUndefined(t.height,i),a=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),o=Property.getValueOrUndefined(t.extrudedHeight,i),s=Property.getValueOrDefault(t.extrudedHeightReference,i,HeightReference$1.NONE);defined(o)&&!defined(n)&&(n=0),r.positions=Property.getValueOrUndefined(t.positions,i),r.width=Property.getValueOrUndefined(t.width,i),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.cornerType=Property.getValueOrUndefined(t.cornerType,i),r.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(n,a,o,s),r.height=GroundGeometryUpdater.getGeometryHeight(n,a),(o=GroundGeometryUpdater.getGeometryExtrudedHeight(o,s))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(o=ApproximateTerrainHeights.getMinimumMaximumHeights(CorridorGeometry.computeRectangle(r,scratchRectangle$3)).minimumTerrainHeight),r.extrudedHeight=o},Object.defineProperties(DataSource.prototype,{name:{get:DeveloperError.throwInstantiationError},clock:{get:DeveloperError.throwInstantiationError},entities:{get:DeveloperError.throwInstantiationError},isLoading:{get:DeveloperError.throwInstantiationError},changedEvent:{get:DeveloperError.throwInstantiationError},errorEvent:{get:DeveloperError.throwInstantiationError},loadingEvent:{get:DeveloperError.throwInstantiationError},show:{get:DeveloperError.throwInstantiationError},clustering:{get:DeveloperError.throwInstantiationError}}),DataSource.prototype.update=function(e){DeveloperError.throwInstantiationError()},DataSource.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var SHOW_INDEX$4=PointPrimitive.SHOW_INDEX=0,POSITION_INDEX$4=PointPrimitive.POSITION_INDEX=1,COLOR_INDEX$2=PointPrimitive.COLOR_INDEX=2,OUTLINE_COLOR_INDEX=PointPrimitive.OUTLINE_COLOR_INDEX=3,OUTLINE_WIDTH_INDEX=PointPrimitive.OUTLINE_WIDTH_INDEX=4,PIXEL_SIZE_INDEX=PointPrimitive.PIXEL_SIZE_INDEX=5,SCALE_BY_DISTANCE_INDEX$2=PointPrimitive.SCALE_BY_DISTANCE_INDEX=6,TRANSLUCENCY_BY_DISTANCE_INDEX$2=PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX=7,DISTANCE_DISPLAY_CONDITION_INDEX$1=PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX=8,DISABLE_DEPTH_DISTANCE_INDEX=PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX=9;function makeDirty$2(e,t){var i=e._pointPrimitiveCollection;defined(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}PointPrimitive.NUMBER_OF_PROPERTIES=10,Object.defineProperties(PointPrimitive.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,makeDirty$2(this,SHOW_INDEX$4))}},position:{get:function(){return this._position},set:function(e){var t=this._position;Cartesian3.equals(t,e)||(Cartesian3.clone(e,t),Cartesian3.clone(e,this._actualPosition),makeDirty$2(this,POSITION_INDEX$4))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;NearFarScalar.equals(t,e)||(this._scaleByDistance=NearFarScalar.clone(e,t),makeDirty$2(this,SCALE_BY_DISTANCE_INDEX$2))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;NearFarScalar.equals(t,e)||(this._translucencyByDistance=NearFarScalar.clone(e,t),makeDirty$2(this,TRANSLUCENCY_BY_DISTANCE_INDEX$2))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,makeDirty$2(this,PIXEL_SIZE_INDEX))}},color:{get:function(){return this._color},set:function(e){var t=this._color;Color.equals(t,e)||(Color.clone(e,t),makeDirty$2(this,COLOR_INDEX$2))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;Color.equals(t,e)||(Color.clone(e,t),makeDirty$2(this,OUTLINE_COLOR_INDEX))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,makeDirty$2(this,OUTLINE_WIDTH_INDEX))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){DistanceDisplayCondition.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=DistanceDisplayCondition.clone(e,this._distanceDisplayCondition),makeDirty$2(this,DISTANCE_DISPLAY_CONDITION_INDEX$1))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,makeDirty$2(this,DISABLE_DEPTH_DISTANCE_INDEX))}},id:{get:function(){return this._id},set:function(e){this._id=e,defined(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,makeDirty$2(this,SHOW_INDEX$4))}}}),PointPrimitive.prototype.getPickId=function(e){return defined(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},PointPrimitive.prototype._getActualPosition=function(){return this._actualPosition},PointPrimitive.prototype._setActualPosition=function(e){Cartesian3.clone(e,this._actualPosition),makeDirty$2(this,POSITION_INDEX$4)};var tempCartesian3$1=new Cartesian4;PointPrimitive._computeActualPosition=function(e,t,i){return t.mode===SceneMode$1.SCENE3D?e:(Matrix4.multiplyByPoint(i,e,tempCartesian3$1),SceneTransforms.computeActualWgs84Position(t,tempCartesian3$1))};var scratchCartesian4$4=new Cartesian4;PointPrimitive._computeScreenSpacePosition=function(e,t,i,r){return t=Matrix4.multiplyByVector(e,Cartesian4.fromElements(t.x,t.y,t.z,1,scratchCartesian4$4),scratchCartesian4$4),SceneTransforms.wgs84ToWindowCoordinates(i,t,r)},PointPrimitive.prototype.computeScreenSpacePosition=function(e,t){var i=this._pointPrimitiveCollection;if(defined(t)||(t=new Cartesian2),i=i.modelMatrix,defined(t=PointPrimitive._computeScreenSpacePosition(i,this._actualPosition,e,t)))return t.y=e.canvas.clientHeight-t.y,t},PointPrimitive.getScreenSpaceBoundingBox=function(e,t,i){var r=.5*(n=e.pixelSize),n=(e=t.x-r,t=t.y-r,r=n,n);return defined(i)||(i=new BoundingRectangle),i.x=e,i.y=t,i.width=r,i.height=n,i},PointPrimitive.prototype.equals=function(e){return this===e||defined(e)&&this._id===e._id&&Cartesian3.equals(this._position,e._position)&&Color.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&Color.equals(this._outlineColor,e._outlineColor)&&NearFarScalar.equals(this._scaleByDistance,e._scaleByDistance)&&NearFarScalar.equals(this._translucencyByDistance,e._translucencyByDistance)&&DistanceDisplayCondition.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},PointPrimitive.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var PointPrimitiveCollectionFS="varying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nvoid main()\n{\nfloat distanceToCenter = length(gl_PointCoord - vec2(0.5));\nfloat maxDistance = max(0.0, 0.5 - v_pixelDistance);\nfloat wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\nfloat innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\nvec4 color = mix(v_outlineColor, v_color, innerAlpha);\ncolor.a *= wholeAlpha;\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\nif (color.a < 0.005)\n{\ndiscard;\n}\n#else\n#ifdef OPAQUE\nif (color.a < 0.995)\n{\ndiscard;\n}\n#else\nif (color.a >= 0.995)\n{\ndiscard;\n}\n#endif\n#endif\ngl_FragColor = czm_gammaCorrect(color);\nczm_writeLogDepth();\n}\n",PointPrimitiveCollectionVS="uniform float u_maxTotalPointSize;\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0;\nattribute vec4 compressedAttribute1;\nattribute vec4 scaleByDistance;\nattribute vec3 distanceDisplayConditionAndDisableDepth;\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nvoid main()\n{\nvec3 positionHigh = positionHighAndSize.xyz;\nvec3 positionLow = positionLowAndOutline.xyz;\nfloat outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\nfloat totalSize = positionHighAndSize.w + outlineWidthBothSides;\nfloat outlinePercent = outlineWidthBothSides / totalSize;\ntotalSize *= czm_pixelRatio;\ntotalSize += 3.0;\nfloat temp = compressedAttribute1.x * SHIFT_RIGHT8;\nfloat show = floor(temp);\n#ifdef EYE_DISTANCE_TRANSLUCENCY\nvec4 translucencyByDistance;\ntranslucencyByDistance.x = compressedAttribute1.z;\ntranslucencyByDistance.z = compressedAttribute1.w;\ntranslucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\ntemp = compressedAttribute1.y * SHIFT_RIGHT8;\ntranslucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\nvec4 color;\nvec4 outlineColor;\nvec4 pickColor;\ntemp = compressedAttribute0.z * SHIFT_RIGHT8;\npickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\npickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor.r = floor(temp);\ntemp = compressedAttribute0.x * SHIFT_RIGHT8;\ncolor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\ncolor.g = (temp - floor(temp)) * SHIFT_LEFT8;\ncolor.r = floor(temp);\ntemp = compressedAttribute0.y * SHIFT_RIGHT8;\noutlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor.r = floor(temp);\ntemp = compressedAttribute0.w * SHIFT_RIGHT8;\npickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\npickColor = pickColor / 255.0;\ntemp = floor(temp) * SHIFT_RIGHT8;\noutlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\noutlineColor /= 255.0;\ncolor.a = floor(temp);\ncolor /= 255.0;\nvec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\nvec4 positionEC = czm_modelViewRelativeToEye * p;\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nlengthSq = dot(positionEC.xyz, positionEC.xyz);\n}\n#endif\n#ifdef EYE_DISTANCE_SCALING\ntotalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\ntotalSize = min(totalSize, u_maxTotalPointSize);\nif (totalSize < 1.0)\n{\npositionEC.xyz = vec3(0.0);\ntotalSize = 1.0;\n}\nfloat translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\ntranslucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\nif (translucency < 0.004)\n{\npositionEC.xyz = vec3(0.0);\n}\n#endif\n#ifdef DISTANCE_DISPLAY_CONDITION\nfloat nearSq = distanceDisplayConditionAndDisableDepth.x;\nfloat farSq = distanceDisplayConditionAndDisableDepth.y;\nif (lengthSq < nearSq || lengthSq > farSq) {\npositionEC.xyz = vec3(0.0, 0.0, 1.0);\n}\n#endif\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n#ifdef DISABLE_DEPTH_DISTANCE\nfloat disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\nif (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n{\ndisableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n}\nif (disableDepthTestDistance != 0.0)\n{\nfloat zclip = gl_Position.z / gl_Position.w;\nbool clipped = (zclip < -1.0 || zclip > 1.0);\nif (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n{\ngl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n}\n}\n#endif\nv_color = color;\nv_color.a *= translucency * show;\nv_outlineColor = outlineColor;\nv_outlineColor.a *= translucency * show;\nv_innerPercent = 1.0 - outlinePercent;\nv_pixelDistance = 2.0 / totalSize;\ngl_PointSize = totalSize * show;\ngl_Position *= show;\nv_pickColor = pickColor;\n}\n",SHOW_INDEX$5=PointPrimitive.SHOW_INDEX,POSITION_INDEX$5=PointPrimitive.POSITION_INDEX,COLOR_INDEX$3=PointPrimitive.COLOR_INDEX,OUTLINE_COLOR_INDEX$1=PointPrimitive.OUTLINE_COLOR_INDEX,OUTLINE_WIDTH_INDEX$1=PointPrimitive.OUTLINE_WIDTH_INDEX,PIXEL_SIZE_INDEX$1=PointPrimitive.PIXEL_SIZE_INDEX,SCALE_BY_DISTANCE_INDEX$3=PointPrimitive.SCALE_BY_DISTANCE_INDEX,TRANSLUCENCY_BY_DISTANCE_INDEX$3=PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX,DISTANCE_DISPLAY_CONDITION_INDEX$2=PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX,DISABLE_DEPTH_DISTANCE_INDEX$1=PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX,NUMBER_OF_PROPERTIES$3=PointPrimitive.NUMBER_OF_PROPERTIES,attributeLocations$3={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepth:5};function PointPrimitiveCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(NUMBER_OF_PROPERTIES$3),this._maxPixelSize=1,this._baseVolume=new BoundingSphere,this._baseVolumeWC=new BoundingSphere,this._baseVolume2D=new BoundingSphere,this._boundingVolume=new BoundingSphere,this._boundingVolumeDirty=!1,this._colorCommands=[],this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=Matrix4.clone(Matrix4.IDENTITY),this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.blendOption=defaultValue(e.blendOption,BlendOption$1.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=SceneMode$1.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW,BufferUsage$1.STATIC_DRAW];var t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}function destroyPointPrimitives(e){for(var t=e.length,i=0;i<t;++i)e[i]&&e[i]._destroy()}function removePointPrimitives(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;for(var t=[],i=e._pointPrimitives,r=i.length,n=0,a=0;n<r;++n){var o=i[n];o&&(o._index=a++,t.push(o))}e._pointPrimitives=t}}function createVAF$1(e,t,i){return new VertexArrayFacade(e,[{index:attributeLocations$3.positionHighAndSize,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[POSITION_INDEX$5]},{index:attributeLocations$3.positionLowAndShow,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[POSITION_INDEX$5]},{index:attributeLocations$3.compressedAttribute0,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[COLOR_INDEX$3]},{index:attributeLocations$3.compressedAttribute1,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[TRANSLUCENCY_BY_DISTANCE_INDEX$3]},{index:attributeLocations$3.scaleByDistance,componentsPerAttribute:4,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[SCALE_BY_DISTANCE_INDEX$3]},{index:attributeLocations$3.distanceDisplayConditionAndDisableDepth,componentsPerAttribute:3,componentDatatype:ComponentDatatype$1.FLOAT,usage:i[DISTANCE_DISPLAY_CONDITION_INDEX$2]}],t)}Object.defineProperties(PointPrimitiveCollection.prototype,{length:{get:function(){return removePointPrimitives(this),this._pointPrimitives.length}}}),PointPrimitiveCollection.prototype.add=function(e){return(e=new PointPrimitive(e,this))._index=this._pointPrimitives.length,this._pointPrimitives.push(e),this._createVertexArray=!0,e},PointPrimitiveCollection.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},PointPrimitiveCollection.prototype.removeAll=function(){destroyPointPrimitives(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},PointPrimitiveCollection.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},PointPrimitiveCollection.prototype.contains=function(e){return defined(e)&&e._pointPrimitiveCollection===this},PointPrimitiveCollection.prototype.get=function(e){return removePointPrimitives(this),this._pointPrimitives[e]},PointPrimitiveCollection.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,r=0;r<NUMBER_OF_PROPERTIES$3;++r){var n=0===i[r]?BufferUsage$1.STATIC_DRAW:BufferUsage$1.STREAM_DRAW;t=t||e[r]!==n;e[r]=n}return t};var writePositionScratch$1=new EncodedCartesian3;function writePositionSizeAndOutline(e,t,i,r){var n=r._index,a=r._getActualPosition();e._mode===SceneMode$1.SCENE3D&&(BoundingSphere.expand(e._baseVolume,a,e._baseVolume),e._boundingVolumeDirty=!0),EncodedCartesian3.fromCartesian(a,writePositionScratch$1);var o=r.pixelSize;a=r.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,o+a),(r=i[attributeLocations$3.positionHighAndSize])(n,(e=writePositionScratch$1.high).x,e.y,e.z,o),(o=i[attributeLocations$3.positionLowAndOutline])(n,(i=writePositionScratch$1.low).x,i.y,i.z,a)}var LEFT_SHIFT16$1=65536,LEFT_SHIFT8$1=256;function writeCompressedAttrib0$1(e,t,i,r){var n=r._index,a=r.color,o=r.getPickId(t).color,s=r.outlineColor,l=Color.floatToByte(a.red),c=Color.floatToByte(a.green),u=Color.floatToByte(a.blue);t=l*LEFT_SHIFT16$1+c*LEFT_SHIFT8$1+u,l=Color.floatToByte(s.red),c=Color.floatToByte(s.green),u=Color.floatToByte(s.blue),r=l*LEFT_SHIFT16$1+c*LEFT_SHIFT8$1+u;l=Color.floatToByte(o.red),c=Color.floatToByte(o.green),u=Color.floatToByte(o.blue),u=l*LEFT_SHIFT16$1+c*LEFT_SHIFT8$1+u,o=Color.floatToByte(a.alpha)*LEFT_SHIFT16$1+Color.floatToByte(s.alpha)*LEFT_SHIFT8$1+Color.floatToByte(o.alpha),(0,i[attributeLocations$3.compressedAttribute0])(n,t,r,u,o)}function writeCompressedAttrib1$1(e,t,i,r){var n=r._index,a=0,o=1,s=1,l=1,c=r.translucencyByDistance;defined(c)&&(a=c.near,o=c.nearValue,s=c.far,l=c.farValue,1===o&&1===l||(e._shaderTranslucencyByDistance=!0)),e=r.show&&r.clusterShow,0===r.color.alpha&&0===r.outlineColor.alpha&&(e=!1),o=CesiumMath.clamp(o,0,1),o=(e?1:0)*LEFT_SHIFT8$1+(o=1===o?255:255*o|0),l=1===(l=CesiumMath.clamp(l,0,1))?255:255*l|0,(0,i[attributeLocations$3.compressedAttribute1])(n,o,l,a,s)}function writeScaleByDistance$1(e,t,i,r){var n=r._index,a=i[attributeLocations$3.scaleByDistance],o=0,s=1,l=1;i=1;defined(r=r.scaleByDistance)&&(o=r.near,s=r.nearValue,l=r.far,i=r.farValue,1===s&&1===i||(e._shaderScaleByDistance=!0)),a(n,o,s,l,i)}function writeDistanceDisplayConditionAndDepthDisable(e,t,i,r){var n=r._index,a=i[attributeLocations$3.distanceDisplayConditionAndDisableDepth],o=0,s=Number.MAX_VALUE;defined(i=r.distanceDisplayCondition)&&(o=i.near,s=i.far,o*=o,s*=s,e._shaderDistanceDisplayCondition=!0),r=r.disableDepthTestDistance,0<(r*=r)&&(e._shaderDisableDepthDistance=!0,r===Number.POSITIVE_INFINITY&&(r=-1)),a(n,o,s,r)}function writePointPrimitive(e,t,i,r){writePositionSizeAndOutline(e,t,i,r),writeCompressedAttrib0$1(e,t,i,r),writeCompressedAttrib1$1(e,t,i,r),writeScaleByDistance$1(e,t,i,r),writeDistanceDisplayConditionAndDepthDisable(e,t,i,r)}function recomputeActualPositions$1(e,t,i,r,n,a){var o;r.mode===SceneMode$1.SCENE3D?(o=e._baseVolume,e._boundingVolumeDirty=!0):o=e._baseVolume2D;for(var s=[],l=0;l<i;++l){var c=t[l],u=c.position;defined(u=PointPrimitive._computeActualPosition(u,r,n))&&(c._setActualPosition(u),a?s.push(u):BoundingSphere.expand(o,u,o))}a&&BoundingSphere.fromPoints(s,o)}function updateMode$2(e,t){var i=t.mode,r=e._pointPrimitives,n=e._pointPrimitivesToUpdate,a=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==SceneMode$1.SCENE3D&&!Matrix4.equals(a,e.modelMatrix)?(e._mode=i,Matrix4.clone(e.modelMatrix,a),e._createVertexArray=!0,i!==SceneMode$1.SCENE3D&&i!==SceneMode$1.SCENE2D&&i!==SceneMode$1.COLUMBUS_VIEW||recomputeActualPositions$1(e,r,r.length,t,a,!0)):i===SceneMode$1.MORPHING?recomputeActualPositions$1(e,r,r.length,t,a,!0):i!==SceneMode$1.SCENE2D&&i!==SceneMode$1.COLUMBUS_VIEW||recomputeActualPositions$1(e,n,e._pointPrimitivesToUpdateIndex,t,a,!1)}function updateBoundingVolume$1(e,t,i){e=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize,i.radius+=e}var scratchWriterArray$1=[];function kdbush(e,t,i,r,n){return new KDBush(e,t,i,r,n)}function KDBush(e,t,i,r,n){t=t||defaultGetX,i=i||defaultGetY,n=n||Array,this.nodeSize=r||64,this.points=e,this.ids=new n(e.length),this.coords=new n(2*e.length);for(var a=0;a<e.length;a++)this.ids[a]=a,this.coords[2*a]=t(e[a]),this.coords[2*a+1]=i(e[a]);sort$1(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function defaultGetX(e){return e[0]}function defaultGetY(e){return e[1]}function range(e,t,i,r,n,a,o){for(var s=[0,e.length-1,0],l=[];s.length;){var c=s.pop(),u=s.pop(),d=s.pop();if(u-d<=o)for(var h=d;h<=u;h++)f=t[2*h],m=t[2*h+1],i<=f&&f<=n&&r<=m&&m<=a&&l.push(e[h]);else{var p=Math.floor((d+u)/2),f=t[2*p],m=t[2*p+1];i<=f&&f<=n&&r<=m&&m<=a&&l.push(e[p]);var g=(c+1)%2;(0===c?i<=f:r<=m)&&(s.push(d),s.push(p-1),s.push(g)),(0===c?f<=n:m<=a)&&(s.push(p+1),s.push(u),s.push(g))}}return l}function sort$1(e,t,i,r,n,a){var o;n-r<=i||(select(e,t,o=Math.floor((r+n)/2),r,n,a%2),sort$1(e,t,i,r,o-1,a+1),sort$1(e,t,i,o+1,n,a+1))}function select(e,t,i,r,n,a){for(;r<n;){var o,s,l,c;600<n-r&&(o=n-r+1,s=i-r+1,c=Math.log(o),l=.5*Math.exp(2*c/3),c=.5*Math.sqrt(c*l*(o-l)/o)*(s-o/2<0?-1:1),select(e,t,i,Math.max(r,Math.floor(i-s*l/o+c)),Math.min(n,Math.floor(i+(o-s)*l/o+c)),a));var u=t[2*i+a],d=r,h=n;for(swapItem(e,t,r,i),t[2*n+a]>u&&swapItem(e,t,r,n);d<h;){for(swapItem(e,t,d,h),d++,h--;t[2*d+a]<u;)d++;for(;t[2*h+a]>u;)h--}t[2*r+a]===u?swapItem(e,t,r,h):swapItem(e,t,++h,n),h<=i&&(r=h+1),i<=h&&(n=h-1)}}function swapItem(e,t,i,r){swap$2(e,i,r),swap$2(t,2*i,2*r),swap$2(t,2*i+1,2*r+1)}function swap$2(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function within(e,t,i,r,n,a){for(var o=[0,e.length-1,0],s=[],l=n*n;o.length;){var c=o.pop(),u=o.pop(),d=o.pop();if(u-d<=a)for(var h=d;h<=u;h++)sqDist(t[2*h],t[2*h+1],i,r)<=l&&s.push(e[h]);else{var p=Math.floor((d+u)/2),f=t[2*p],m=t[2*p+1];sqDist(f,m,i,r)<=l&&s.push(e[p]);var g=(c+1)%2;(0===c?i-n<=f:r-n<=m)&&(o.push(d),o.push(p-1),o.push(g)),(0===c?f<=i+n:m<=r+n)&&(o.push(p+1),o.push(u),o.push(g))}}return s}function sqDist(e,t,i,r){return(i=e-i)*i+(r=t-r)*r}function EntityCluster(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._enabled=defaultValue(e.enabled,!1),this._pixelRange=defaultValue(e.pixelRange,80),this._minimumClusterSize=defaultValue(e.minimumClusterSize,2),this._clusterBillboards=defaultValue(e.clusterBillboards,!0),this._clusterLabels=defaultValue(e.clusterLabels,!0),this._clusterPoints=defaultValue(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new Event}function getX(e){return e.coord.x}function getY(e){return e.coord.y}function expandBoundingBox(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}PointPrimitiveCollection.prototype.update=function(e){removePointPrimitives(this),this._maxTotalPointSize=ContextLimits.maximumAliasedPointSize,updateMode$2(this,e);var t=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,r=this._pointPrimitivesToUpdateIndex,n=this._propertiesChanged,a=this._createVertexArray,o=e.context,s=e.passes,l=s.pick;if(a||!l&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var c=0;c<NUMBER_OF_PROPERTIES$3;++c)n[c]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),0<t){this._vaf=createVAF$1(o,t,this._buffersUsage),f=this._vaf.writers;for(var u=0;u<t;++u){var d=this._pointPrimitives[u];d._dirty=!1,writePointPrimitive(this,o,f,d)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(0<r){var h=scratchWriterArray$1;h.length=0,(n[POSITION_INDEX$5]||n[OUTLINE_WIDTH_INDEX$1]||n[PIXEL_SIZE_INDEX$1])&&h.push(writePositionSizeAndOutline),(n[COLOR_INDEX$3]||n[OUTLINE_COLOR_INDEX$1])&&h.push(writeCompressedAttrib0$1),(n[SHOW_INDEX$5]||n[TRANSLUCENCY_BY_DISTANCE_INDEX$3])&&h.push(writeCompressedAttrib1$1),n[SCALE_BY_DISTANCE_INDEX$3]&&h.push(writeScaleByDistance$1),(n[DISTANCE_DISPLAY_CONDITION_INDEX$2]||n[DISABLE_DEPTH_DISTANCE_INDEX$1])&&h.push(writeDistanceDisplayConditionAndDepthDisable);var p=h.length,f=this._vaf.writers;if(.1<r/t){for(var m=0;m<r;++m){var g=i[m];g._dirty=!1;for(var y=0;y<p;++y)h[y](this,o,f,g)}this._vaf.commit()}else{for(var _=0;_<r;++_){var v=i[_];v._dirty=!1;for(var C=0;C<p;++C)h[C](this,o,f,v);this._vaf.subCommit(v._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(1.5*t<r&&(i.length=t),defined(this._vaf)&&defined(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,BoundingSphere.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var x,b=Matrix4.IDENTITY;updateBoundingVolume$1(this,e,x=e.mode===SceneMode$1.SCENE3D?(b=this.modelMatrix,BoundingSphere.clone(this._baseVolumeWC,this._boundingVolume)):BoundingSphere.clone(this._baseVolume2D,this._boundingVolume));var S;a=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,a&&(this._blendOption===BlendOption$1.OPAQUE||this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=RenderState.fromCache({depthTest:{enabled:!0,func:WebGLConstants$1.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===BlendOption$1.TRANSLUCENT||this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=RenderState.fromCache({depthTest:{enabled:!0,func:WebGLConstants$1.LEQUAL},depthMask:!1,blending:BlendingState$1.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(a||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(a=new ShaderSource({sources:[PointPrimitiveCollectionVS]}),this._shaderScaleByDistance&&a.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&a.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&a.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&a.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT&&(S=new ShaderSource({defines:["OPAQUE"],sources:[PointPrimitiveCollectionFS]}),this._sp=ShaderProgram.replaceCache({context:o,shaderProgram:this._sp,vertexShaderSource:a,fragmentShaderSource:S,attributeLocations:attributeLocations$3}),S=new ShaderSource({defines:["TRANSLUCENT"],sources:[PointPrimitiveCollectionFS]}),this._spTranslucent=ShaderProgram.replaceCache({context:o,shaderProgram:this._spTranslucent,vertexShaderSource:a,fragmentShaderSource:S,attributeLocations:attributeLocations$3})),this._blendOption===BlendOption$1.OPAQUE&&(S=new ShaderSource({sources:[PointPrimitiveCollectionFS]}),this._sp=ShaderProgram.replaceCache({context:o,shaderProgram:this._sp,vertexShaderSource:a,fragmentShaderSource:S,attributeLocations:attributeLocations$3})),this._blendOption===BlendOption$1.TRANSLUCENT&&(S=new ShaderSource({sources:[PointPrimitiveCollectionFS]}),this._spTranslucent=ShaderProgram.replaceCache({context:o,shaderProgram:this._spTranslucent,vertexShaderSource:a,fragmentShaderSource:S,attributeLocations:attributeLocations$3})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);var T=e.commandList;if(s.render||l){var E,w=this._colorCommands,A=this._blendOption===BlendOption$1.OPAQUE,P=this._blendOption===BlendOption$1.OPAQUE_AND_TRANSLUCENT;l=(E=this._vaf.va).length;w.length=l;for(var D=P?2*l:l,M=0;M<D;++M){var I,R=A||P&&M%2==0;defined(I=w[M])||(I=w[M]=new DrawCommand),I.primitiveType=PrimitiveType$1.POINTS,I.pass=R||!P?Pass$1.OPAQUE:Pass$1.TRANSLUCENT,I.owner=this;var O=P?Math.floor(M/2):M;I.boundingVolume=x,I.modelMatrix=b,I.shaderProgram=R?this._sp:this._spTranslucent,I.uniformMap=this._uniforms,I.vertexArray=E[O].va,I.renderState=R?this._rsOpaque:this._rsTranslucent,I.debugShowBoundingVolume=this.debugShowBoundingVolume,I.pickId="v_pickColor",T.push(I)}}}},PointPrimitiveCollection.prototype.isDestroyed=function(){return!1},PointPrimitiveCollection.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),destroyPointPrimitives(this._pointPrimitives),destroyObject(this)},KDBush.prototype={range:function(e,t,i,r){return range(this.ids,this.coords,e,t,i,r,this.nodeSize)},within:function(e,t,i){return within(this.ids,this.coords,e,t,i,this.nodeSize)}};var labelBoundingBoxScratch=new BoundingRectangle;function getBoundingBox(e,t,i,r,n){return defined(e._labelCollection)&&r._clusterLabels?n=Label.getScreenSpaceBoundingBox(e,t,n):defined(e._billboardCollection)&&r._clusterBillboards?n=Billboard.getScreenSpaceBoundingBox(e,t,n):defined(e._pointPrimitiveCollection)&&r._clusterPoints&&(n=PointPrimitive.getScreenSpaceBoundingBox(e,t,n)),expandBoundingBox(n,i),r._clusterLabels&&!defined(e._labelCollection)&&defined(e.id)&&hasLabelIndex(r,e.id.id)&&defined(e.id._label)&&(e=r._collectionIndicesByEntity[e.id.id].labelIndex,e=r._labelCollection.get(e),expandBoundingBox(t=Label.getScreenSpaceBoundingBox(e,t,labelBoundingBoxScratch),i),n=BoundingRectangle.union(n,t,n)),n}function addNonClusteredItem(e,t){e.clusterShow=!0,!defined(e._labelCollection)&&defined(e.id)&&hasLabelIndex(t,e.id.id)&&defined(e.id._label)&&(e=t._collectionIndicesByEntity[e.id.id].labelIndex,t._labelCollection.get(e).clusterShow=!0)}function addCluster(e,t,i,r){var n={billboard:r._clusterBillboardCollection.add(),label:r._clusterLabelCollection.add(),point:r._clusterPointCollection.add()};n.billboard.show=!1,n.point.show=!1,n.label.show=!0,n.label.text=t.toLocaleString(),n.label.id=i,n.billboard.position=n.label.position=n.point.position=e,r._clusterEvent.raiseEvent(i,n)}function hasLabelIndex(e,t){return defined(e)&&defined(e._collectionIndicesByEntity[t])&&defined(e._collectionIndicesByEntity[t].labelIndex)}function getScreenSpacePositions(e,t,i,r,n){if(defined(e))for(var a=e.length,o=0;o<a;++o){var s,l,c,u=e.get(o);u.clusterShow=!1,u.show&&(n._scene.mode!==SceneMode$1.SCENE3D||r.isPointVisible(u.position))&&(s=n._clusterLabels&&defined(u._labelCollection),l=n._clusterBillboards&&defined(u.id._billboard),c=n._clusterPoints&&defined(u.id._point),s&&(c||l)||defined(u=u.computeScreenSpacePosition(i))&&t.push({index:o,collection:e,clustered:!1,coord:u}))}}var pointBoundinRectangleScratch=new BoundingRectangle,totalBoundingRectangleScratch=new BoundingRectangle,neighborBoundingRectangleScratch=new BoundingRectangle;function createDeclutterCallback(e){return function(t){if(!(defined(t)&&t<.05)&&e.enabled){var i=e._scene,r=e._labelCollection,n=e._billboardCollection,a=e._pointCollection;if((defined(r)||defined(n)||defined(a))&&(e._clusterBillboards||e._clusterLabels||e._clusterPoints)){var o=e._clusterLabelCollection,s=e._clusterBillboardCollection;t=e._clusterPointCollection;defined(o)?o.removeAll():o=e._clusterLabelCollection=new LabelCollection({scene:i}),defined(s)?s.removeAll():s=e._clusterBillboardCollection=new BillboardCollection({scene:i}),defined(t)?t.removeAll():t=e._clusterPointCollection=new PointPrimitiveCollection;var l,c,u,d,h=e._pixelRange,p=e._minimumClusterSize,f=e._previousClusters,m=[],g=e._previousHeight,y=i.camera.positionCartographic.height,_=new EllipsoidalOccluder(i.mapProjection.ellipsoid,i.camera.positionWC),v=[];e._clusterLabels&&getScreenSpacePositions(r,v,i,_,e),e._clusterBillboards&&getScreenSpacePositions(n,v,i,_,e),e._clusterPoints&&getScreenSpacePositions(a,v,i,_,e);var C=kdbush(v,getX,getY,64,Int32Array);if(y<g)for(c=f.length,l=0;l<c;++l){var x=f[l];if(_.isPointVisible(x.position)){var b=Billboard._computeScreenSpacePosition(Matrix4.IDENTITY,x.position,Cartesian3.ZERO,Cartesian2.ZERO,i);if(defined(b)){for(var S,T=1-y/g,E=x.width=x.width*T,w=x.height=x.height*T,A=(E=Math.max(E,x.minimumWidth),w=Math.max(w,x.minimumHeight),b.x-.5*E),P=(T=b.y-.5*w,E=b.x+E,w=b.y+w,(S=C.range(A,T,E,w)).length),D=0,M=[],I=0;I<P;++I)(V=v[S[I]]).clustered||(++D,u=V.collection,d=V.index,M.push(u.get(d).id));if(p<=D)for(addCluster(x.position,D,M,e),m.push(x),I=0;I<P;++I)v[S[I]].clustered=!0}}}for(c=v.length,l=0;l<c;++l){var R=v[l];if(!R.clustered){R.clustered=!0,u=R.collection,d=R.index;var O=u.get(d),L=getBoundingBox(O,R.coord,h,e,pointBoundinRectangleScratch),N=BoundingRectangle.clone(L,totalBoundingRectangleScratch);P=(S=C.range(L.x,L.y,L.x+L.width,L.y+L.height)).length;var F,B,V,k=Cartesian3.clone(O.position);for(D=1,M=[O.id],I=0;I<P;++I)(V=v[S[I]]).clustered||(B=getBoundingBox(F=V.collection.get(V.index),V.coord,h,e,neighborBoundingRectangleScratch),Cartesian3.add(F.position,k,k),BoundingRectangle.union(N,B,N),++D,M.push(F.id));if(p<=D)for(addCluster(R=Cartesian3.multiplyByScalar(k,1/D,k),D,M,e),m.push({position:R,width:N.width,height:N.height,minimumWidth:L.width,minimumHeight:L.height}),I=0;I<P;++I)v[S[I]].clustered=!0;else addNonClusteredItem(O,e)}}0===o.length&&(o.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===t.length&&(t.destroy(),e._clusterPointCollection=void 0),e._previousClusters=m,e._previousHeight=y}}}}function createGetEntity(e,t,i,r){return function(n){var a=this[e];defined(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});var o,s,l=this._collectionIndicesByEntity[n.id];return defined(l)||(l=this._collectionIndicesByEntity[n.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),defined(a)&&defined(l[r])?a.get(l[r]):(defined(a)||(a=this[e]=new t({scene:this._scene})),0<(n=this[i]).length?(o=n.pop(),s=a.get(o)):(s=a.add(),o=a.length-1),l[r]=o,this._clusterDirty=!0,s)}}function removeEntityIndicesIfUnused(e,t){var i=e._collectionIndicesByEntity[t];defined(i.billboardIndex)||defined(i.labelIndex)||defined(i.pointIndex)||delete e._collectionIndicesByEntity[t]}function disableCollectionClustering(e){if(defined(e))for(var t=e.length,i=0;i<t;++i)e.get(i).clusterShow=!0}function updateEnable(e){e.enabled||(defined(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),defined(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),defined(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,disableCollectionClustering(e._labelCollection),disableCollectionClustering(e._billboardCollection),disableCollectionClustering(e._pointCollection))}function CustomDataSource(e){this._name=e,this._clock=void 0,this._changed=new Event,this._error=new Event,this._isLoading=!1,this._loading=new Event,this._entityCollection=new EntityCollection(this),this._entityCluster=new EntityCluster}EntityCluster.prototype._initialize=function(e){this._scene=e;var t=createDeclutterCallback(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(EntityCluster.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),EntityCluster.prototype.getLabel=createGetEntity("_labelCollection",LabelCollection,"_unusedLabelIndices","labelIndex"),EntityCluster.prototype.removeLabel=function(e){var t,i=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];defined(this._labelCollection)&&defined(i)&&defined(i.labelIndex)&&(t=i.labelIndex,i.labelIndex=void 0,removeEntityIndicesIfUnused(this,e.id),(e=this._labelCollection.get(t)).show=!1,e.text="",e.id=void 0,this._unusedLabelIndices.push(t),this._clusterDirty=!0)},EntityCluster.prototype.getBillboard=createGetEntity("_billboardCollection",BillboardCollection,"_unusedBillboardIndices","billboardIndex"),EntityCluster.prototype.removeBillboard=function(e){var t,i=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];defined(this._billboardCollection)&&defined(i)&&defined(i.billboardIndex)&&(t=i.billboardIndex,i.billboardIndex=void 0,removeEntityIndicesIfUnused(this,e.id),(e=this._billboardCollection.get(t)).id=void 0,e.show=!1,e.image=void 0,this._unusedBillboardIndices.push(t),this._clusterDirty=!0)},EntityCluster.prototype.getPoint=createGetEntity("_pointCollection",PointPrimitiveCollection,"_unusedPointIndices","pointIndex"),EntityCluster.prototype.removePoint=function(e){var t,i=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];defined(this._pointCollection)&&defined(i)&&defined(i.pointIndex)&&(t=i.pointIndex,i.pointIndex=void 0,removeEntityIndicesIfUnused(this,e.id),(e=this._pointCollection.get(t)).show=!1,e.id=void 0,this._unusedPointIndices.push(t),this._clusterDirty=!0)},EntityCluster.prototype.update=function(e){var t;defined(this._labelCollection)&&0<this._labelCollection.length&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),defined(this._billboardCollection)&&0<this._billboardCollection.length&&!defined(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,updateEnable(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),defined(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),defined(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),defined(this._clusterPointCollection)&&this._clusterPointCollection.update(e),defined(this._labelCollection)&&this._labelCollection.update(e),defined(this._billboardCollection)&&this._billboardCollection.update(e),defined(this._pointCollection)&&this._pointCollection.update(e)},EntityCluster.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),defined(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1},Object.defineProperties(CustomDataSource.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){DataSource.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}}),CustomDataSource.prototype.update=function(e){return!0};var defaultOffset$2=Cartesian3.ZERO,offsetScratch$5=new Cartesian3,positionScratch$7=new Cartesian3,scratchColor$a=new Color;function CylinderGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function CylinderGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new CylinderGeometryOptions(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function DynamicCylinderGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}function DataSourceClock(){this._definitionChanged=new Event,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}defined(Object.create)&&(CylinderGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),CylinderGeometryUpdater.prototype.constructor=CylinderGeometryUpdater),Object.defineProperties(CylinderGeometryUpdater.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),CylinderGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a={show:n,distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),color:void 0,offset:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$a)),defined(t)||(t=Color.WHITE),a.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(a.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$2,offsetScratch$5))),new GeometryInstance({id:i,geometry:new CylinderGeometry(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:a})},CylinderGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$a),n=this._distanceDisplayConditionProperty.getValue(e);n={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n),offset:void 0};return defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$2,offsetScratch$5))),new GeometryInstance({id:t,geometry:new CylinderOutlineGeometry(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:n})},CylinderGeometryUpdater.prototype._computeCenter=function(e,t){return Property.getValueOrUndefined(this._entity.position,e,t)},CylinderGeometryUpdater.prototype._isHidden=function(e,t){return!defined(e.position)||!defined(t.length)||!defined(t.topRadius)||!defined(t.bottomRadius)||GeometryUpdater.prototype._isHidden.call(this,e,t)},CylinderGeometryUpdater.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&Property.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&Property.isConstant(t.slices)&&Property.isConstant(t.outlineWidth)&&Property.isConstant(t.numberOfVerticalLines))},CylinderGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),r=this._options;r.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,r.length=t.length.getValue(Iso8601.MINIMUM_VALUE),r.topRadius=t.topRadius.getValue(Iso8601.MINIMUM_VALUE),r.bottomRadius=t.bottomRadius.getValue(Iso8601.MINIMUM_VALUE),r.slices=Property.getValueOrUndefined(t.slices,Iso8601.MINIMUM_VALUE),r.numberOfVerticalLines=Property.getValueOrUndefined(t.numberOfVerticalLines,Iso8601.MINIMUM_VALUE),r.offsetAttribute=i!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},CylinderGeometryUpdater.prototype._onEntityPropertyChanged=heightReferenceOnEntityPropertyChanged,CylinderGeometryUpdater.DynamicGeometryUpdater=DynamicCylinderGeometryUpdater,defined(Object.create)&&(DynamicCylinderGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicCylinderGeometryUpdater.prototype.constructor=DynamicCylinderGeometryUpdater),DynamicCylinderGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(Property.getValueOrUndefined(e.position,i,positionScratch$7))||!defined(r.length)||!defined(r.topRadius)||!defined(r.bottomRadius)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicCylinderGeometryUpdater.prototype._setOptions=function(e,t,i){var r=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),n=this._options;n.length=Property.getValueOrUndefined(t.length,i),n.topRadius=Property.getValueOrUndefined(t.topRadius,i),n.bottomRadius=Property.getValueOrUndefined(t.bottomRadius,i),n.slices=Property.getValueOrUndefined(t.slices,i),n.numberOfVerticalLines=Property.getValueOrUndefined(t.numberOfVerticalLines,i),n.offsetAttribute=r!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},Object.defineProperties(DataSourceClock.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:createRawPropertyDescriptor("startTime"),stopTime:createRawPropertyDescriptor("stopTime"),currentTime:createRawPropertyDescriptor("currentTime"),clockRange:createRawPropertyDescriptor("clockRange"),clockStep:createRawPropertyDescriptor("clockStep"),multiplier:createRawPropertyDescriptor("multiplier")}),DataSourceClock.prototype.clone=function(e){return defined(e)||(e=new DataSourceClock),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},DataSourceClock.prototype.equals=function(e){return this===e||defined(e)&&JulianDate.equals(this.startTime,e.startTime)&&JulianDate.equals(this.stopTime,e.stopTime)&&JulianDate.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},DataSourceClock.prototype.merge=function(e){this.startTime=defaultValue(this.startTime,e.startTime),this.stopTime=defaultValue(this.stopTime,e.stopTime),this.currentTime=defaultValue(this.currentTime,e.currentTime),this.clockRange=defaultValue(this.clockRange,e.clockRange),this.clockStep=defaultValue(this.clockStep,e.clockStep),this.multiplier=defaultValue(this.multiplier,e.multiplier)},DataSourceClock.prototype.getValue=function(e){return defined(e)||(e=new Clock),e.startTime=defaultValue(this.startTime,e.startTime),e.stopTime=defaultValue(this.stopTime,e.stopTime),e.currentTime=defaultValue(this.currentTime,e.currentTime),e.clockRange=defaultValue(this.clockRange,e.clockRange),e.multiplier=defaultValue(this.multiplier,e.multiplier),e.clockStep=defaultValue(this.clockStep,e.clockStep),e};var defaultColor$2=Color.WHITE,defaultCellAlpha=.1,defaultLineCount=new Cartesian2(8,8),defaultLineOffset=new Cartesian2(0,0),defaultLineThickness=new Cartesian2(1,1);function GridMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}function PolylineArrowMaterialProperty(e){this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(GridMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)&&Property.isConstant(this._cellAlpha)&&Property.isConstant(this._lineCount)&&Property.isConstant(this._lineThickness)&&Property.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color"),cellAlpha:createPropertyDescriptor("cellAlpha"),lineCount:createPropertyDescriptor("lineCount"),lineThickness:createPropertyDescriptor("lineThickness"),lineOffset:createPropertyDescriptor("lineOffset")}),GridMaterialProperty.prototype.getType=function(e){return"Grid"},GridMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$2,t.color),t.cellAlpha=Property.getValueOrDefault(this._cellAlpha,e,defaultCellAlpha),t.lineCount=Property.getValueOrClonedDefault(this._lineCount,e,defaultLineCount,t.lineCount),t.lineThickness=Property.getValueOrClonedDefault(this._lineThickness,e,defaultLineThickness,t.lineThickness),t.lineOffset=Property.getValueOrClonedDefault(this._lineOffset,e,defaultLineOffset,t.lineOffset),t},GridMaterialProperty.prototype.equals=function(e){return this===e||e instanceof GridMaterialProperty&&Property.equals(this._color,e._color)&&Property.equals(this._cellAlpha,e._cellAlpha)&&Property.equals(this._lineCount,e._lineCount)&&Property.equals(this._lineThickness,e._lineThickness)&&Property.equals(this._lineOffset,e._lineOffset)},Object.defineProperties(PolylineArrowMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color")}),PolylineArrowMaterialProperty.prototype.getType=function(e){return"PolylineArrow"},PolylineArrowMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,Color.WHITE,t.color),t},PolylineArrowMaterialProperty.prototype.equals=function(e){return this===e||e instanceof PolylineArrowMaterialProperty&&Property.equals(this._color,e._color)};var defaultColor$3=Color.WHITE,defaultGapColor=Color.TRANSPARENT,defaultDashLength=16,defaultDashPattern=255;function PolylineDashMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(PolylineDashMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)&&Property.isConstant(this._gapColor)&&Property.isConstant(this._dashLength)&&Property.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color"),gapColor:createPropertyDescriptor("gapColor"),dashLength:createPropertyDescriptor("dashLength"),dashPattern:createPropertyDescriptor("dashPattern")}),PolylineDashMaterialProperty.prototype.getType=function(e){return"PolylineDash"},PolylineDashMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$3,t.color),t.gapColor=Property.getValueOrClonedDefault(this._gapColor,e,defaultGapColor,t.gapColor),t.dashLength=Property.getValueOrDefault(this._dashLength,e,defaultDashLength,t.dashLength),t.dashPattern=Property.getValueOrDefault(this._dashPattern,e,defaultDashPattern,t.dashPattern),t},PolylineDashMaterialProperty.prototype.equals=function(e){return this===e||e instanceof PolylineDashMaterialProperty&&Property.equals(this._color,e._color)&&Property.equals(this._gapColor,e._gapColor)&&Property.equals(this._dashLength,e._dashLength)&&Property.equals(this._dashPattern,e._dashPattern)};var defaultColor$4=Color.WHITE,defaultGlowPower=.25,defaultTaperPower=1;function PolylineGlowMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(PolylineGlowMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)&&Property.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color"),glowPower:createPropertyDescriptor("glowPower"),taperPower:createPropertyDescriptor("taperPower")}),PolylineGlowMaterialProperty.prototype.getType=function(e){return"PolylineGlow"},PolylineGlowMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$4,t.color),t.glowPower=Property.getValueOrDefault(this._glowPower,e,defaultGlowPower,t.glowPower),t.taperPower=Property.getValueOrDefault(this._taperPower,e,defaultTaperPower,t.taperPower),t},PolylineGlowMaterialProperty.prototype.equals=function(e){return this===e||e instanceof PolylineGlowMaterialProperty&&Property.equals(this._color,e._color)&&Property.equals(this._glowPower,e._glowPower)&&Property.equals(this._taperPower,e._taperPower)};var defaultColor$5=Color.WHITE,defaultOutlineColor$1=Color.BLACK,defaultOutlineWidth=1;function PolylineOutlineMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}function PositionPropertyArray(e,t){this._value=void 0,this._definitionChanged=new Event,this._eventHelper=new EventHelper,this._referenceFrame=defaultValue(t,ReferenceFrame$1.FIXED),this.setValue(e)}function PropertyArray(e){this._value=void 0,this._definitionChanged=new Event,this._eventHelper=new EventHelper,this.setValue(e)}function resolve$1(e){if(!defined(r=e._targetProperty)){var t=e._targetEntity;if(!defined(t)){if(!defined(t=e._targetCollection.getById(e._targetId)))return void(e._targetEntity=e._targetProperty=void 0);t.definitionChanged.addEventListener(ReferenceProperty.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=t}for(var i=e._targetPropertyNames,r=e._targetEntity,n=0,a=i.length;n<a&&defined(r);++n)r=r[i[n]];e._targetProperty=r}return r}function ReferenceProperty(e,t,i){this._targetCollection=e,this._targetId=t,this._targetPropertyNames=i,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new Event,e.collectionChanged.addEventListener(ReferenceProperty.prototype._onCollectionChanged,this)}Object.defineProperties(PolylineOutlineMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._color)&&Property.isConstant(this._outlineColor)&&Property.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:createPropertyDescriptor("color"),outlineColor:createPropertyDescriptor("outlineColor"),outlineWidth:createPropertyDescriptor("outlineWidth")}),PolylineOutlineMaterialProperty.prototype.getType=function(e){return"PolylineOutline"},PolylineOutlineMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.color=Property.getValueOrClonedDefault(this._color,e,defaultColor$5,t.color),t.outlineColor=Property.getValueOrClonedDefault(this._outlineColor,e,defaultOutlineColor$1,t.outlineColor),t.outlineWidth=Property.getValueOrDefault(this._outlineWidth,e,defaultOutlineWidth),t},PolylineOutlineMaterialProperty.prototype.equals=function(e){return this===e||e instanceof PolylineOutlineMaterialProperty&&Property.equals(this._color,e._color)&&Property.equals(this._outlineColor,e._outlineColor)&&Property.equals(this._outlineWidth,e._outlineWidth)},Object.defineProperties(PositionPropertyArray.prototype,{isConstant:{get:function(){var e=this._value;if(!defined(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!Property.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),PositionPropertyArray.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},PositionPropertyArray.prototype.getValueInReferenceFrame=function(e,t,i){var r=this._value;if(defined(r)){var n=r.length;defined(i)||(i=new Array(n));for(var a=0,o=0;a<n;){var s=r[a].getValueInReferenceFrame(e,t,i[a]);defined(s)&&(i[o]=s,o++),a++}return i.length=o,i}},PositionPropertyArray.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),defined(e)){this._value=e.slice();for(var i=e.length,r=0;r<i;r++){var n=e[r];defined(n)&&t.add(n.definitionChanged,PositionPropertyArray.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},PositionPropertyArray.prototype.equals=function(e){return this===e||e instanceof PositionPropertyArray&&this._referenceFrame===e._referenceFrame&&Property.arrayEquals(this._value,e._value)},PositionPropertyArray.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(PropertyArray.prototype,{isConstant:{get:function(){var e=this._value;if(!defined(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!Property.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),PropertyArray.prototype.getValue=function(e,t){var i=this._value;if(defined(i)){var r=i.length;defined(t)||(t=new Array(r));for(var n=0,a=0;n<r;){var o=this._value[n].getValue(e,t[n]);defined(o)&&(t[a]=o,a++),n++}return t.length=a,t}},PropertyArray.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),defined(e)){this._value=e.slice();for(var i=e.length,r=0;r<i;r++){var n=e[r];defined(n)&&t.add(n.definitionChanged,PropertyArray.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},PropertyArray.prototype.equals=function(e){return this===e||e instanceof PropertyArray&&Property.arrayEquals(this._value,e._value)},PropertyArray.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(ReferenceProperty.prototype,{isConstant:{get:function(){return Property.isConstant(resolve$1(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){var e=resolve$1(this);return defined(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return resolve$1(this)}}}),ReferenceProperty.fromString=function(e,t){for(var i,r=[],n=!0,a=!1,o="",s=0;s<t.length;++s){var l=t.charAt(s);a?(o+=l,a=!1):"\\"===l?a=!0:n&&"#"===l?(i=o,n=!1,o=""):n||"."!==l?o+=l:(r.push(o),o="")}return r.push(o),new ReferenceProperty(e,i,r)},ReferenceProperty.prototype.getValue=function(e,t){var i=resolve$1(this);return defined(i)?i.getValue(e,t):void 0},ReferenceProperty.prototype.getValueInReferenceFrame=function(e,t,i){var r=resolve$1(this);return defined(r)?r.getValueInReferenceFrame(e,t,i):void 0},ReferenceProperty.prototype.getType=function(e){var t=resolve$1(this);return defined(t)?t.getType(e):void 0},ReferenceProperty.prototype.equals=function(e){if(this===e)return!0;var t=this._targetPropertyNames,i=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==i.length)return!1;for(var r=this._targetPropertyNames.length,n=0;n<r;n++)if(t[n]!==i[n])return!1;return!0},ReferenceProperty.prototype._onTargetEntityDefinitionChanged=function(e,t,i,r){defined(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))},ReferenceProperty.prototype._onCollectionChanged=function(e,t,i){var r=this._targetEntity;defined(r)&&-1!==i.indexOf(r)?(r.definitionChanged.removeEventListener(ReferenceProperty.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):defined(r)||defined(r=resolve$1(this))&&this._definitionChanged.raiseEvent(this)};var Rotation={packedLength:1,pack:function(e,t,i){return t[i=defaultValue(i,0)]=e,t},unpack:function(e,t,i){return e[t=defaultValue(t,0)]},convertPackedArrayForInterpolation:function(e,t,i,r){var n;defined(r)||(r=[]),t=defaultValue(t,0);for(var a=0,o=(i=defaultValue(i,e.length))-t+1;a<o;a++){var s=e[t+a];0===a||Math.abs(n-s)<Math.PI?r[a]=s:r[a]=s-CesiumMath.TWO_PI,n=s}},unpackInterpolationResult:function(e,t,i,r,n){return(n=e[0])<0?n+CesiumMath.TWO_PI:n}},PackableNumber={packedLength:1,pack:function(e,t,i){t[i=defaultValue(i,0)]=e},unpack:function(e,t,i){return e[t=defaultValue(t,0)]}};function arrayInsert(e,t,i){var r=e.length,n=i.length,a=r+n;if(e.length=a,r!==t)for(var o=r-1,s=a-1;t<=s;s--)e[s]=e[o--];for(s=0;s<n;s++)e[t++]=i[s]}function convertDate(e,t){return e instanceof JulianDate?e:"string"==typeof e?JulianDate.fromIso8601(e):JulianDate.addSeconds(t,e,new JulianDate)}var timesSpliceArgs=[],valuesSpliceArgs=[];function mergeNewSamples(e,t,i,r,n){for(var a,o,s,l,c,u,d=0;d<r.length;){var h=0,p=0;if((s=binarySearch(t,convertDate(r[d],e),JulianDate.compare))<0){for(l=(s=~s)*n,o=void 0,u=t[s];d<r.length&&(c=convertDate(r[d],e),!(defined(o)&&0<=JulianDate.compare(o,c)||defined(u)&&0<=JulianDate.compare(c,u)));){for(timesSpliceArgs[h++]=c,d+=1,a=0;a<n;a++)valuesSpliceArgs[p++]=r[d],d+=1;o=c}0<h&&(valuesSpliceArgs.length=p,arrayInsert(i,l,valuesSpliceArgs),timesSpliceArgs.length=h,arrayInsert(t,s,timesSpliceArgs))}else{for(a=0;a<n;a++)d++,i[s*n+a]=r[d];d++}}}function SampledProperty(e,t){var i=e;i===Number&&(i=PackableNumber);var r=i.packedLength,n=defaultValue(i.packedInterpolationLength,r),a=0;if(defined(t)){for(var o=t.length,s=new Array(o),l=0;l<o;l++){var c=t[l];c===Number&&(c=PackableNumber);var u=c.packedLength;r+=u,n+=defaultValue(c.packedInterpolationLength,u),s[l]=c}a=o}this._type=e,this._innerType=i,this._interpolationDegree=1,this._interpolationAlgorithm=LinearApproximation,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=r,this._packedInterpolationLength=n,this._updateTableLength=!0,this._interpolationResult=new Array(n),this._definitionChanged=new Event,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=a,this._forwardExtrapolationType=ExtrapolationType$1.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=ExtrapolationType$1.NONE,this._backwardExtrapolationDuration=0}function removeSamples(e,t,i){var r=e._packedLength;e._times.splice(t,i),e._values.splice(t*r,i*r),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}function SampledPositionProperty(e,t){var i;if(0<(t=defaultValue(t,0))){i=new Array(t);for(var r=0;r<t;r++)i[r]=Cartesian3}this._numberOfDerivatives=t,this._property=new SampledProperty(Cartesian3,i),this._definitionChanged=new Event,this._referenceFrame=defaultValue(e,ReferenceFrame$1.FIXED),this._property._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)}Object.defineProperties(SampledProperty.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),SampledProperty.prototype.getValue=function(e,t){var i=this._times,r=i.length;if(0!==r){var n=this._innerType,a=this._values,o=binarySearch(i,e,JulianDate.compare);if(o<0){if(0==(o=~o)){var s=i[o],l=this._backwardExtrapolationDuration;if(this._backwardExtrapolationType===ExtrapolationType$1.NONE||0!==l&&JulianDate.secondsDifference(s,e)>l)return;if(this._backwardExtrapolationType===ExtrapolationType$1.HOLD)return n.unpack(a,0,t)}if(r<=o){var c=i[o=r-1];if(l=this._forwardExtrapolationDuration,this._forwardExtrapolationType===ExtrapolationType$1.NONE||0!==l&&JulianDate.secondsDifference(e,c)>l)return;if(this._forwardExtrapolationType===ExtrapolationType$1.HOLD)return o=r-1,n.unpack(a,o*n.packedLength,t)}var u=this._xTable,d=this._yTable,h=this._interpolationAlgorithm;s=this._packedInterpolationLength,c=this._inputOrder;if(this._updateTableLength&&(this._updateTableLength=!1,(p=Math.min(h.getRequiredDataPoints(this._interpolationDegree,c),r))!==this._numberOfPoints&&(this._numberOfPoints=p,u.length=p,d.length=p*s)),(l=this._numberOfPoints-1)<1)return;var p,f=0,m=r-1;1+l<=m-f+1&&((p=o-(l/2|0)-1)<f&&(p=f),m<(r=p+l)&&(p=(r=m)-l)<f&&(p=f),f=p,m=r);for(var g=m-f+1,y=0;y<g;++y)u[y]=JulianDate.secondsDifference(i[f+y],i[m]);if(defined(n.convertPackedArrayForInterpolation))n.convertPackedArrayForInterpolation(a,f,m,d);else for(var _=0,v=this._packedLength,C=f*v,x=(m+1)*v;C<x;)d[_]=a[C],C++,_++;return v=JulianDate.secondsDifference(e,i[m]),s=0!==c&&defined(h.interpolate)?(e=Math.floor(s/(c+1)),h.interpolate(v,u,d,e,c,c,this._interpolationResult)):h.interpolateOrderZero(v,u,d,s,this._interpolationResult),defined(n.unpackInterpolationResult)?n.unpackInterpolationResult(s,a,f,m,t):n.unpack(s,0,t)}return n.unpack(a,o*this._packedLength,t)}},SampledProperty.prototype.setInterpolationOptions=function(e){var t,i;defined(e)&&(t=!1,i=e.interpolationAlgorithm,e=e.interpolationDegree,defined(i)&&this._interpolationAlgorithm!==i&&(this._interpolationAlgorithm=i,t=!0),defined(e)&&this._interpolationDegree!==e&&(this._interpolationDegree=e,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)))},SampledProperty.prototype.addSample=function(e,t,i){var r=this._innerDerivativeTypes,n=defined(r),a=this._innerType,o=[];if(o.push(e),a.pack(t,o,o.length),n)for(var s=r.length,l=0;l<s;l++)r[l].pack(i[l],o,o.length);mergeNewSamples(void 0,this._times,this._values,o,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},SampledProperty.prototype.addSamples=function(e,t,i){for(var r=this._innerDerivativeTypes,n=defined(r),a=this._innerType,o=e.length,s=[],l=0;l<o;l++)if(s.push(e[l]),a.pack(t[l],s,s.length),n)for(var c=i[l],u=r.length,d=0;d<u;d++)r[d].pack(c[d],s,s.length);mergeNewSamples(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},SampledProperty.prototype.addSamplesPackedArray=function(e,t){mergeNewSamples(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},SampledProperty.prototype.removeSample=function(e){return!((e=binarySearch(this._times,e,JulianDate.compare))<0||(removeSamples(this,e,1),0))},SampledProperty.prototype.removeSamples=function(e){var t=this._times,i=binarySearch(t,e.start,JulianDate.compare);i<0?i=~i:e.isStartIncluded||++i,(t=binarySearch(t,e.stop,JulianDate.compare))<0?t=~t:e.isStopIncluded&&++t,removeSamples(this,i,t-i)},SampledProperty.prototype.equals=function(e){if(this===e)return!0;if(!defined(e))return!1;if(this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;var t,i=this._derivativeTypes,r=defined(i),n=e._derivativeTypes;if(r!==defined(n))return!1;if(r){if((a=i.length)!==n.length)return!1;for(t=0;t<a;t++)if(i[t]!==n[t])return!1}var a,o=this._times,s=e._times;if((a=o.length)!==s.length)return!1;for(t=0;t<a;t++)if(!JulianDate.equals(o[t],s[t]))return!1;var l=this._values,c=e._values;for(a=l.length,t=0;t<a;t++)if(l[t]!==c[t])return!1;return!0},SampledProperty._mergeNewSamples=mergeNewSamples,Object.defineProperties(SampledPositionProperty.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),SampledPositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},SampledPositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){if(defined(i=this._property.getValue(e,i)))return PositionProperty.convertToReferenceFrame(e,i,this._referenceFrame,t,i)},SampledPositionProperty.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},SampledPositionProperty.prototype.addSample=function(e,t,i){this._numberOfDerivatives,this._property.addSample(e,t,i)},SampledPositionProperty.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},SampledPositionProperty.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},SampledPositionProperty.prototype.removeSample=function(e){return this._property.removeSample(e)},SampledPositionProperty.prototype.removeSamples=function(e){this._property.removeSamples(e)},SampledPositionProperty.prototype.equals=function(e){return this===e||e instanceof SampledPositionProperty&&Property.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var StripeOrientation={HORIZONTAL:0,VERTICAL:1},StripeOrientation$1=Object.freeze(StripeOrientation),defaultOrientation=StripeOrientation$1.HORIZONTAL,defaultEvenColor$1=Color.WHITE,defaultOddColor$1=Color.BLACK,defaultOffset$3=0,defaultRepeat$2=1;function StripeMaterialProperty(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._definitionChanged=new Event,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}function TimeIntervalCollectionPositionProperty(e){this._definitionChanged=new Event,this._intervals=new TimeIntervalCollection,this._intervals.changedEvent.addEventListener(TimeIntervalCollectionPositionProperty.prototype._intervalsChanged,this),this._referenceFrame=defaultValue(e,ReferenceFrame$1.FIXED)}function TimeIntervalCollectionProperty(){this._definitionChanged=new Event,this._intervals=new TimeIntervalCollection,this._intervals.changedEvent.addEventListener(TimeIntervalCollectionProperty.prototype._intervalsChanged,this)}function VelocityVectorProperty(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new Event,this._normalize=defaultValue(t,!0),this.position=e}Object.defineProperties(StripeMaterialProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._orientation)&&Property.isConstant(this._evenColor)&&Property.isConstant(this._oddColor)&&Property.isConstant(this._offset)&&Property.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:createPropertyDescriptor("orientation"),evenColor:createPropertyDescriptor("evenColor"),oddColor:createPropertyDescriptor("oddColor"),offset:createPropertyDescriptor("offset"),repeat:createPropertyDescriptor("repeat")}),StripeMaterialProperty.prototype.getType=function(e){return"Stripe"},StripeMaterialProperty.prototype.getValue=function(e,t){return defined(t)||(t={}),t.horizontal=Property.getValueOrDefault(this._orientation,e,defaultOrientation)===StripeOrientation$1.HORIZONTAL,t.evenColor=Property.getValueOrClonedDefault(this._evenColor,e,defaultEvenColor$1,t.evenColor),t.oddColor=Property.getValueOrClonedDefault(this._oddColor,e,defaultOddColor$1,t.oddColor),t.offset=Property.getValueOrDefault(this._offset,e,defaultOffset$3),t.repeat=Property.getValueOrDefault(this._repeat,e,defaultRepeat$2),t},StripeMaterialProperty.prototype.equals=function(e){return this===e||e instanceof StripeMaterialProperty&&Property.equals(this._orientation,e._orientation)&&Property.equals(this._evenColor,e._evenColor)&&Property.equals(this._oddColor,e._oddColor)&&Property.equals(this._offset,e._offset)&&Property.equals(this._repeat,e._repeat)},Object.defineProperties(TimeIntervalCollectionPositionProperty.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),TimeIntervalCollectionPositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},TimeIntervalCollectionPositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){var r=this._intervals.findDataForIntervalContainingDate(e);if(defined(r))return PositionProperty.convertToReferenceFrame(e,r,this._referenceFrame,t,i)},TimeIntervalCollectionPositionProperty.prototype.equals=function(e){return this===e||e instanceof TimeIntervalCollectionPositionProperty&&this._intervals.equals(e._intervals,Property.equals)&&this._referenceFrame===e._referenceFrame},TimeIntervalCollectionPositionProperty.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(TimeIntervalCollectionProperty.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),TimeIntervalCollectionProperty.prototype.getValue=function(e,t){return defined(e=this._intervals.findDataForIntervalContainingDate(e))&&"function"==typeof e.clone?e.clone(t):e},TimeIntervalCollectionProperty.prototype.equals=function(e){return this===e||e instanceof TimeIntervalCollectionProperty&&this._intervals.equals(e._intervals,Property.equals)},TimeIntervalCollectionProperty.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},Object.defineProperties(VelocityVectorProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){var t=this._position;t!==e&&(defined(t)&&this._subscription(),defined(this._position=e)&&(this._subscription=e._definitionChanged.addEventListener((function(){this._definitionChanged.raiseEvent(this)}),this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var position1Scratch=new Cartesian3,position2Scratch=new Cartesian3,timeScratch=new JulianDate,step=1/60;function VelocityOrientationProperty(e,t){this._velocityVectorProperty=new VelocityVectorProperty(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new Event,this.ellipsoid=defaultValue(t,Ellipsoid.WGS84);var i=this;this._velocityVectorProperty.definitionChanged.addEventListener((function(){i._definitionChanged.raiseEvent(i)}))}VelocityVectorProperty.prototype.getValue=function(e,t){return this._getValue(e,t)},VelocityVectorProperty.prototype._getValue=function(e,t,i){defined(t)||(t=new Cartesian3);var r=this._position;if(Property.isConstant(r))return this._normalize?void 0:Cartesian3.clone(Cartesian3.ZERO,t);var n=r.getValue(e,position1Scratch),a=r.getValue(JulianDate.addSeconds(e,step,timeScratch),position2Scratch);return defined(n)&&(defined(a)||(a=n,defined(n=r.getValue(JulianDate.addSeconds(e,-step,timeScratch),position2Scratch))))?Cartesian3.equals(n,a)?this._normalize?void 0:Cartesian3.clone(Cartesian3.ZERO,t):(defined(i)&&n.clone(i),n=Cartesian3.subtract(a,n,t),this._normalize?Cartesian3.normalize(n,t):Cartesian3.divideByScalar(n,step,t)):void 0},VelocityVectorProperty.prototype.equals=function(e){return this===e||e instanceof VelocityVectorProperty&&Property.equals(this._position,e._position)},Object.defineProperties(VelocityOrientationProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var positionScratch$8=new Cartesian3,velocityScratch=new Cartesian3,rotationScratch=new Matrix3,currentId;function UnitCartesian3(){}function createReferenceProperty(e,t){return"#"===t[0]&&(t=currentId+t),ReferenceProperty.fromString(e,t)}function createSpecializedProperty(e,t,i){if(defined(i.reference))return createReferenceProperty(t,i.reference);if(defined(i.velocityReference))switch(t=createReferenceProperty(t,i.velocityReference),e){case Cartesian3:case UnitCartesian3:return new VelocityVectorProperty(t,e===UnitCartesian3);case Quaternion:return new VelocityOrientationProperty(t)}throw new RuntimeError(JSON.stringify(i)+" is not valid CZML.")}function createAdapterProperty(e,t){return new CallbackProperty((function(i,r){return t(e.getValue(i,r))}),e.isConstant)}VelocityOrientationProperty.prototype.getValue=function(e,t){if(defined(e=this._velocityVectorProperty._getValue(e,velocityScratch,positionScratch$8)))return Transforms.rotationMatrixFromPositionVelocity(positionScratch$8,e,this._ellipsoid,rotationScratch),Quaternion.fromRotationMatrix(rotationScratch,t)},VelocityOrientationProperty.prototype.equals=function(e){return this===e||e instanceof VelocityOrientationProperty&&Property.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},UnitCartesian3.packedLength=Cartesian3.packedLength,UnitCartesian3.unpack=Cartesian3.unpack,UnitCartesian3.pack=Cartesian3.pack;var scratchCartesian$6=new Cartesian3,scratchSpherical=new Spherical,scratchCartographic$8=new Cartographic,scratchTimeInterval=new TimeInterval,scratchQuaternion=new Quaternion;function unwrapColorInterval(e){var t=e.rgbaf;if(defined(t))return t;var i=e.rgba;if(defined(i)){var r=i.length;if(r===Color.packedLength)return[Color.byteToFloat(i[0]),Color.byteToFloat(i[1]),Color.byteToFloat(i[2]),Color.byteToFloat(i[3])];t=new Array(r);for(var n=0;n<r;n+=5)t[n]=i[n],t[n+1]=Color.byteToFloat(i[n+1]),t[n+2]=Color.byteToFloat(i[n+2]),t[n+3]=Color.byteToFloat(i[n+3]),t[n+4]=Color.byteToFloat(i[n+4]);return t}}function unwrapUriInterval(e,t){return e=defaultValue(e.uri,e),defined(t)?t.getDerivedResource({url:e}):Resource.createIfNeeded(e)}function unwrapRectangleInterval(e){var t=e.wsen;if(defined(t))return t;var i=e.wsenDegrees;if(defined(i)){var r=i.length;if(r===Rectangle.packedLength)return[CesiumMath.toRadians(i[0]),CesiumMath.toRadians(i[1]),CesiumMath.toRadians(i[2]),CesiumMath.toRadians(i[3])];t=new Array(r);for(var n=0;n<r;n+=5)t[n]=i[n],t[n+1]=CesiumMath.toRadians(i[n+1]),t[n+2]=CesiumMath.toRadians(i[n+2]),t[n+3]=CesiumMath.toRadians(i[n+3]),t[n+4]=CesiumMath.toRadians(i[n+4]);return t}}function convertUnitSphericalToCartesian(e){var t=e.length;if(scratchSpherical.magnitude=1,2===t)return scratchSpherical.clock=e[0],scratchSpherical.cone=e[1],Cartesian3.fromSpherical(scratchSpherical,scratchCartesian$6),[scratchCartesian$6.x,scratchCartesian$6.y,scratchCartesian$6.z];for(var i=new Array(t/3*4),r=0,n=0;r<t;r+=3,n+=4)i[n]=e[r],scratchSpherical.clock=e[r+1],scratchSpherical.cone=e[r+2],Cartesian3.fromSpherical(scratchSpherical,scratchCartesian$6),i[n+1]=scratchCartesian$6.x,i[n+2]=scratchCartesian$6.y,i[n+3]=scratchCartesian$6.z;return i}function convertSphericalToCartesian(e){var t=e.length;if(3===t)return scratchSpherical.clock=e[0],scratchSpherical.cone=e[1],scratchSpherical.magnitude=e[2],Cartesian3.fromSpherical(scratchSpherical,scratchCartesian$6),[scratchCartesian$6.x,scratchCartesian$6.y,scratchCartesian$6.z];for(var i=new Array(t),r=0;r<t;r+=4)i[r]=e[r],scratchSpherical.clock=e[r+1],scratchSpherical.cone=e[r+2],scratchSpherical.magnitude=e[r+3],Cartesian3.fromSpherical(scratchSpherical,scratchCartesian$6),i[r+1]=scratchCartesian$6.x,i[r+2]=scratchCartesian$6.y,i[r+3]=scratchCartesian$6.z;return i}function convertCartographicRadiansToCartesian(e){var t=e.length;if(3===t)return scratchCartographic$8.longitude=e[0],scratchCartographic$8.latitude=e[1],scratchCartographic$8.height=e[2],Ellipsoid.WGS84.cartographicToCartesian(scratchCartographic$8,scratchCartesian$6),[scratchCartesian$6.x,scratchCartesian$6.y,scratchCartesian$6.z];for(var i=new Array(t),r=0;r<t;r+=4)i[r]=e[r],scratchCartographic$8.longitude=e[r+1],scratchCartographic$8.latitude=e[r+2],scratchCartographic$8.height=e[r+3],Ellipsoid.WGS84.cartographicToCartesian(scratchCartographic$8,scratchCartesian$6),i[r+1]=scratchCartesian$6.x,i[r+2]=scratchCartesian$6.y,i[r+3]=scratchCartesian$6.z;return i}function convertCartographicDegreesToCartesian(e){var t=e.length;if(3===t)return scratchCartographic$8.longitude=CesiumMath.toRadians(e[0]),scratchCartographic$8.latitude=CesiumMath.toRadians(e[1]),scratchCartographic$8.height=e[2],Ellipsoid.WGS84.cartographicToCartesian(scratchCartographic$8,scratchCartesian$6),[scratchCartesian$6.x,scratchCartesian$6.y,scratchCartesian$6.z];for(var i=new Array(t),r=0;r<t;r+=4)i[r]=e[r],scratchCartographic$8.longitude=CesiumMath.toRadians(e[r+1]),scratchCartographic$8.latitude=CesiumMath.toRadians(e[r+2]),scratchCartographic$8.height=e[r+3],Ellipsoid.WGS84.cartographicToCartesian(scratchCartographic$8,scratchCartesian$6),i[r+1]=scratchCartesian$6.x,i[r+2]=scratchCartesian$6.y,i[r+3]=scratchCartesian$6.z;return i}function unwrapCartesianInterval(e){var t=e.cartesian;if(defined(t))return t;if(defined(t=e.cartesianVelocity))return t;if(defined(t=e.unitCartesian))return t;if(defined(t=e.unitSpherical))return convertUnitSphericalToCartesian(t);if(defined(t=e.spherical))return convertSphericalToCartesian(t);if(defined(t=e.cartographicRadians))return convertCartographicRadiansToCartesian(t);if(defined(t=e.cartographicDegrees))return convertCartographicDegreesToCartesian(t);throw new RuntimeError(JSON.stringify(e)+" is not a valid CZML interval.")}function normalizePackedCartesianArray(e,t){Cartesian3.unpack(e,t,scratchCartesian$6),Cartesian3.normalize(scratchCartesian$6,scratchCartesian$6),Cartesian3.pack(scratchCartesian$6,e,t)}function unwrapUnitCartesianInterval(e){var t=unwrapCartesianInterval(e);if(3===t.length)return normalizePackedCartesianArray(t,0),t;for(var i=1;i<t.length;i+=4)normalizePackedCartesianArray(t,i);return t}function normalizePackedQuaternionArray(e,t){Quaternion.unpack(e,t,scratchQuaternion),Quaternion.normalize(scratchQuaternion,scratchQuaternion),Quaternion.pack(scratchQuaternion,e,t)}function unwrapQuaternionInterval(e){var t=e.unitQuaternion;if(defined(t)){if(4===t.length)return normalizePackedQuaternionArray(t,0),t;for(var i=1;i<t.length;i+=5)normalizePackedQuaternionArray(t,i)}return t}function getPropertyType(e){return"boolean"==typeof e?Boolean:"number"==typeof e?Number:"string"==typeof e?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?BoundingRectangle:e.hasOwnProperty("cartesian2")?Cartesian2:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?Cartesian3:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?UnitCartesian3:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?Color:e.hasOwnProperty("arcType")?ArcType$1:e.hasOwnProperty("classificationType")?ClassificationType$1:e.hasOwnProperty("colorBlendMode")?ColorBlendMode$1:e.hasOwnProperty("cornerType")?CornerType$1:e.hasOwnProperty("heightReference")?HeightReference$1:e.hasOwnProperty("horizontalOrigin")?HorizontalOrigin$1:e.hasOwnProperty("date")?JulianDate:e.hasOwnProperty("labelStyle")?LabelStyle$1:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?NearFarScalar:e.hasOwnProperty("distanceDisplayCondition")?DistanceDisplayCondition:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?Quaternion:e.hasOwnProperty("shadowMode")?ShadowMode$1:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?StripeOrientation$1:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?Rectangle:e.hasOwnProperty("uri")?URI:e.hasOwnProperty("verticalOrigin")?VerticalOrigin$1:Object}function unwrapInterval(e,t,i){switch(e){case ArcType$1:return ArcType$1[defaultValue(t.arcType,t)];case Array:return t.array;case Boolean:return defaultValue(t.boolean,t);case BoundingRectangle:return t.boundingRectangle;case Cartesian2:return t.cartesian2;case Cartesian3:return unwrapCartesianInterval(t);case UnitCartesian3:return unwrapUnitCartesianInterval(t);case Color:return unwrapColorInterval(t);case ClassificationType$1:return ClassificationType$1[defaultValue(t.classificationType,t)];case ColorBlendMode$1:return ColorBlendMode$1[defaultValue(t.colorBlendMode,t)];case CornerType$1:return CornerType$1[defaultValue(t.cornerType,t)];case HeightReference$1:return HeightReference$1[defaultValue(t.heightReference,t)];case HorizontalOrigin$1:return HorizontalOrigin$1[defaultValue(t.horizontalOrigin,t)];case Image:return unwrapUriInterval(t,i);case JulianDate:return JulianDate.fromIso8601(defaultValue(t.date,t));case LabelStyle$1:return LabelStyle$1[defaultValue(t.labelStyle,t)];case Number:return defaultValue(t.number,t);case NearFarScalar:return t.nearFarScalar;case DistanceDisplayCondition:return t.distanceDisplayCondition;case Object:return defaultValue(defaultValue(t.object,t.value),t);case Quaternion:return unwrapQuaternionInterval(t);case Rotation:return defaultValue(t.number,t);case ShadowMode$1:return ShadowMode$1[defaultValue(defaultValue(t.shadowMode,t.shadows),t)];case String:return defaultValue(t.string,t);case StripeOrientation$1:return StripeOrientation$1[defaultValue(t.stripeOrientation,t)];case Rectangle:return unwrapRectangleInterval(t);case URI:return unwrapUriInterval(t,i);case VerticalOrigin$1:return VerticalOrigin$1[defaultValue(t.verticalOrigin,t)];default:throw new RuntimeError(e)}}var interpolators={HERMITE:HermitePolynomialApproximation,LAGRANGE:LagrangePolynomialApproximation,LINEAR:LinearApproximation};function updateInterpolationSettings(e,t){var i=e.interpolationAlgorithm,r=e.interpolationDegree;(defined(i)||defined(r))&&t.setInterpolationOptions({interpolationAlgorithm:interpolators[i],interpolationDegree:r}),defined(r=e.forwardExtrapolationType)&&(t.forwardExtrapolationType=ExtrapolationType$1[r]),defined(r=e.forwardExtrapolationDuration)&&(t.forwardExtrapolationDuration=r),defined(r=e.backwardExtrapolationType)&&(t.backwardExtrapolationType=ExtrapolationType$1[r]),defined(e=e.backwardExtrapolationDuration)&&(t.backwardExtrapolationDuration=e)}var iso8601Scratch={iso8601:void 0};function intervalFromString(e){if(defined(e))return iso8601Scratch.iso8601=e,TimeInterval.fromIso8601(iso8601Scratch)}function wrapPropertyInInfiniteInterval(e){var t=Iso8601.MAXIMUM_INTERVAL.clone();return t.data=e,t}function convertPropertyToComposite(e){var t=new CompositeProperty;return t.intervals.addInterval(wrapPropertyInInfiniteInterval(e)),t}function convertPositionPropertyToComposite(e){var t=new CompositePositionProperty(e.referenceFrame);return t.intervals.addInterval(wrapPropertyInInfiniteInterval(e)),t}function processProperty(e,t,i,r,n,a,o){var s,l=intervalFromString(r.interval);defined(n)&&(l=defined(l)?TimeInterval.intersect(l,n,scratchTimeInterval):n);var c=!defined(r.reference)&&!defined(r.velocityReference),u=defined(l)&&!l.equals(Iso8601.MAXIMUM_INTERVAL);if(!0===r.delete)return u?removePropertyData(t[i],l):void(t[i]=void 0);if(n=!1,c){if(!defined(s=unwrapInterval(e,r,a)))return;h=defaultValue(e.packedLength,1),p=defaultValue(s.length,1),n=!defined(r.array)&&"string"!=typeof s&&h<p&&e!==Object}if(a="function"==typeof e.unpack&&e!==Rotation,n||u){var d,h=t[i],p=r.epoch;if(defined(p)&&(d=JulianDate.fromIso8601(p)),n&&!u)return h instanceof SampledProperty||(t[i]=h=new SampledProperty(e)),h.addSamplesPackedArray(s,d),void updateInterpolationSettings(r,h);if(!n&&u)return(l=l.clone()).data=c?a?e.unpack(s,0):s:createSpecializedProperty(e,o,r),defined(h)||(t[i]=h=new(c?TimeIntervalCollectionProperty:CompositeProperty)),c&&h instanceof TimeIntervalCollectionProperty||(h instanceof CompositeProperty||(t[i]=h=convertPropertyToComposite(h)),c&&(l.data=new ConstantProperty(l.data))),void h.intervals.addInterval(l);defined(h)||(t[i]=h=new CompositeProperty),h instanceof CompositeProperty||(t[i]=h=convertPropertyToComposite(h)),defined(h=(u=h.intervals).findInterval(l))&&h.data instanceof SampledProperty||((h=l.clone()).data=new SampledProperty(e),u.addInterval(h)),h.data.addSamplesPackedArray(s,d),updateInterpolationSettings(r,h.data)}else t[i]=c?new ConstantProperty(a?e.unpack(s,0):s):createSpecializedProperty(e,o,r)}function removePropertyData(e,t){if(e instanceof SampledProperty)e.removeSamples(t);else if(e instanceof TimeIntervalCollectionProperty)e.intervals.removeInterval(t);else if(e instanceof CompositeProperty){for(var i=e.intervals,r=0;r<i.length;++r){var n=TimeInterval.intersect(i.get(r),t,scratchTimeInterval);n.isEmpty||removePropertyData(n.data,t)}i.removeInterval(t)}}function processPacketData(e,t,i,r,n,a,o){if(defined(r))if(Array.isArray(r))for(var s=0,l=r.length;s<l;++s)processProperty(e,t,i,r[s],n,a,o);else processProperty(e,t,i,r,n,a,o)}function processPositionProperty(e,t,i,r,n,a){var o=intervalFromString(i.interval);defined(r)&&(o=defined(o)?TimeInterval.intersect(o,r,scratchTimeInterval):r);var s,l,c=defined(i.cartesianVelocity)?1:0,u=Cartesian3.packedLength*(1+c),d=!defined(i.reference),h=defined(o)&&!o.equals(Iso8601.MAXIMUM_INTERVAL);if(!0===i.delete)return h?removePositionPropertyData(e[t],o):void(e[t]=void 0);var p=!1;if(d&&(defined(i.referenceFrame)&&(l=ReferenceFrame$1[i.referenceFrame]),l=defaultValue(l,ReferenceFrame$1.FIXED),p=u<defaultValue((s=unwrapCartesianInterval(i)).length,1)),p||h){var f;r=e[t];if(defined(u=i.epoch)&&(f=JulianDate.fromIso8601(u)),p&&!h)return r instanceof SampledPositionProperty&&(!defined(l)||r.referenceFrame===l)||(e[t]=r=new SampledPositionProperty(l,c)),r.addSamplesPackedArray(s,f),void updateInterpolationSettings(i,r);if(!p&&h)return(o=o.clone()).data=d?Cartesian3.unpack(s):createReferenceProperty(a,i.reference),defined(r)||(r=new(d?TimeIntervalCollectionPositionProperty:CompositePositionProperty)(l),e[t]=r),d&&r instanceof TimeIntervalCollectionPositionProperty&&defined(l)&&r.referenceFrame===l||(r instanceof CompositePositionProperty||(e[t]=r=convertPositionPropertyToComposite(r)),d&&(o.data=new ConstantPositionProperty(o.data,l))),void r.intervals.addInterval(o);defined(r)?r instanceof CompositePositionProperty||(e[t]=r=convertPositionPropertyToComposite(r)):e[t]=r=new CompositePositionProperty(l),defined(r=(h=r.intervals).findInterval(o))&&r.data instanceof SampledPositionProperty&&(!defined(l)||r.data.referenceFrame===l)||((r=o.clone()).data=new SampledPositionProperty(l,c),h.addInterval(r)),r.data.addSamplesPackedArray(s,f),updateInterpolationSettings(i,r.data)}else e[t]=d?new ConstantPositionProperty(Cartesian3.unpack(s),l):createReferenceProperty(a,i.reference)}function removePositionPropertyData(e,t){if(e instanceof SampledPositionProperty)e.removeSamples(t);else if(e instanceof TimeIntervalCollectionPositionProperty)e.intervals.removeInterval(t);else if(e instanceof CompositePositionProperty){for(var i=e.intervals,r=0;r<i.length;++r){var n=TimeInterval.intersect(i.get(r),t,scratchTimeInterval);n.isEmpty||removePositionPropertyData(n.data,t)}i.removeInterval(t)}}function processPositionPacketData(e,t,i,r,n,a){if(defined(i))if(Array.isArray(i))for(var o=0,s=i.length;o<s;++o)processPositionProperty(e,t,i[o],r,n,a);else processPositionProperty(e,t,i,r,n,a)}function processShapePacketData(e,t,i,r){defined(i.references)?processReferencesArrayPacketData(e,t,i.references,i.interval,r,PropertyArray,CompositeProperty):(defined(i.cartesian)&&(i.array=Cartesian2.unpackArray(i.cartesian)),defined(i.array)&&processPacketData(Array,e,t,i,void 0,void 0,r))}function processMaterialProperty(e,t,i,r,n,a){var o=intervalFromString(i.interval);defined(r)&&(o=defined(o)?TimeInterval.intersect(o,r,scratchTimeInterval):r);var s,l,c,u=e[t];defined(o)?(u instanceof CompositeMaterialProperty||(u=new CompositeMaterialProperty,e[t]=u),defined(l=(r=u.intervals).findInterval({start:o.start,stop:o.stop}))?s=l.data:(l=o.clone(),r.addInterval(l))):s=u,defined(i.solidColor)?(s instanceof ColorMaterialProperty||(s=new ColorMaterialProperty),processPacketData(Color,s,"color",(c=i.solidColor).color,void 0,void 0,a)):defined(i.grid)?(s instanceof GridMaterialProperty||(s=new GridMaterialProperty),processPacketData(Color,s,"color",(c=i.grid).color,void 0,n,a),processPacketData(Number,s,"cellAlpha",c.cellAlpha,void 0,n,a),processPacketData(Cartesian2,s,"lineCount",c.lineCount,void 0,n,a),processPacketData(Cartesian2,s,"lineThickness",c.lineThickness,void 0,n,a),processPacketData(Cartesian2,s,"lineOffset",c.lineOffset,void 0,n,a)):defined(i.image)?(s instanceof ImageMaterialProperty||(s=new ImageMaterialProperty),c=i.image,processPacketData(Image,s,"image",c.image,void 0,n,a),processPacketData(Cartesian2,s,"repeat",c.repeat,void 0,n,a),processPacketData(Color,s,"color",c.color,void 0,n,a),processPacketData(Boolean,s,"transparent",c.transparent,void 0,n,a)):defined(i.stripe)?(s instanceof StripeMaterialProperty||(s=new StripeMaterialProperty),c=i.stripe,processPacketData(StripeOrientation$1,s,"orientation",c.orientation,void 0,n,a),processPacketData(Color,s,"evenColor",c.evenColor,void 0,n,a),processPacketData(Color,s,"oddColor",c.oddColor,void 0,n,a),processPacketData(Number,s,"offset",c.offset,void 0,n,a),processPacketData(Number,s,"repeat",c.repeat,void 0,n,a)):defined(i.polylineOutline)?(s instanceof PolylineOutlineMaterialProperty||(s=new PolylineOutlineMaterialProperty),processPacketData(Color,s,"color",(c=i.polylineOutline).color,void 0,n,a),processPacketData(Color,s,"outlineColor",c.outlineColor,void 0,n,a),processPacketData(Number,s,"outlineWidth",c.outlineWidth,void 0,n,a)):defined(i.polylineGlow)?(s instanceof PolylineGlowMaterialProperty||(s=new PolylineGlowMaterialProperty),processPacketData(Color,s,"color",(c=i.polylineGlow).color,void 0,n,a),processPacketData(Number,s,"glowPower",c.glowPower,void 0,n,a),processPacketData(Number,s,"taperPower",c.taperPower,void 0,n,a)):defined(i.polylineArrow)?(s instanceof PolylineArrowMaterialProperty||(s=new PolylineArrowMaterialProperty),processPacketData(Color,s,"color",(c=i.polylineArrow).color,void 0,void 0,a)):defined(i.polylineDash)?(s instanceof PolylineDashMaterialProperty||(s=new PolylineDashMaterialProperty),processPacketData(Color,s,"color",(c=i.polylineDash).color,void 0,void 0,a),processPacketData(Color,s,"gapColor",c.gapColor,void 0,void 0,a),processPacketData(Number,s,"dashLength",c.dashLength,void 0,n,a),processPacketData(Number,s,"dashPattern",c.dashPattern,void 0,n,a)):defined(i.checkerboard)&&(s instanceof CheckerboardMaterialProperty||(s=new CheckerboardMaterialProperty),processPacketData(Color,s,"evenColor",(c=i.checkerboard).evenColor,void 0,n,a),processPacketData(Color,s,"oddColor",c.oddColor,void 0,n,a),processPacketData(Cartesian2,s,"repeat",c.repeat,void 0,n,a)),defined(l)?l.data=s:e[t]=s}function processMaterialPacketData(e,t,i,r,n,a){if(defined(i))if(Array.isArray(i))for(var o=0,s=i.length;o<s;++o)processMaterialProperty(e,t,i[o],r,n,a);else processMaterialProperty(e,t,i,r,n,a)}function processName(e,t,i,r){defined(t.name)&&(e.name=t.name)}function processDescription(e,t,i,r){defined(t=t.description)&&processPacketData(String,e,"description",t,void 0,r,i)}function processPosition(e,t,i,r){defined(t=t.position)&&processPositionPacketData(e,"position",t,void 0,r,i)}function processViewFrom(e,t,i,r){defined(t=t.viewFrom)&&processPacketData(Cartesian3,e,"viewFrom",t,void 0,r,i)}function processOrientation(e,t,i,r){defined(t=t.orientation)&&processPacketData(Quaternion,e,"orientation",t,void 0,r,i)}function processProperties(e,t,i,r){var n=t.properties;if(defined(n))for(var a in defined(e.properties)||(e.properties=new PropertyBag),n)if(n.hasOwnProperty(a)){e.properties.hasProperty(a)||e.properties.addProperty(a);var o=n[a];if(Array.isArray(o))for(var s=0,l=o.length;s<l;++s)processProperty(getPropertyType(o[s]),e.properties,a,o[s],void 0,r,i);else processProperty(getPropertyType(o),e.properties,a,o,void 0,r,i)}}function processReferencesArrayPacketData(e,t,i,r,n,a,o){var s=i.map((function(e){return createReferenceProperty(n,e)}));defined(r)?(r=intervalFromString(r),(i=e[t])instanceof o||((o=new o).intervals.addInterval(wrapPropertyInInfiniteInterval(i)),e[t]=i=o),r.data=new a(s),i.intervals.addInterval(r)):e[t]=new a(s)}function processArrayPacketData(e,t,i,r){var n=i.references;defined(n)?processReferencesArrayPacketData(e,t,n,i.interval,r,PropertyArray,CompositeProperty):processPacketData(Array,e,t,i,void 0,void 0,r)}function processArray(e,t,i,r){if(defined(i))if(Array.isArray(i))for(var n=0,a=i.length;n<a;++n)processArrayPacketData(e,t,i[n],r);else processArrayPacketData(e,t,i,r)}function processPositionArrayPacketData(e,t,i,r){var n=i.references;defined(n)?processReferencesArrayPacketData(e,t,n,i.interval,r,PositionPropertyArray,CompositePositionProperty):(defined(i.cartesian)?i.array=Cartesian3.unpackArray(i.cartesian):defined(i.cartographicRadians)?i.array=Cartesian3.fromRadiansArrayHeights(i.cartographicRadians):defined(i.cartographicDegrees)&&(i.array=Cartesian3.fromDegreesArrayHeights(i.cartographicDegrees)),defined(i.array)&&processPacketData(Array,e,t,i,void 0,void 0,r))}function processPositionArray(e,t,i,r){if(defined(i))if(Array.isArray(i))for(var n=0,a=i.length;n<a;++n)processPositionArrayPacketData(e,t,i[n],r);else processPositionArrayPacketData(e,t,i,r)}function unpackCartesianArray(e){return Cartesian3.unpackArray(e)}function unpackCartographicRadiansArray(e){return Cartesian3.fromRadiansArrayHeights(e)}function unpackCartographicDegreesArray(e){return Cartesian3.fromDegreesArrayHeights(e)}function processPositionArrayOfArraysPacketData(e,t,i,r){var n=i.references;defined(n)?(n=n.map((function(e){var t={};return processReferencesArrayPacketData(t,"positions",e,i.interval,r,PositionPropertyArray,CompositePositionProperty),t.positions})),e[t]=new PositionPropertyArray(n)):(defined(i.cartesian)?i.array=i.cartesian.map(unpackCartesianArray):defined(i.cartographicRadians)?i.array=i.cartographicRadians.map(unpackCartographicRadiansArray):defined(i.cartographicDegrees)&&(i.array=i.cartographicDegrees.map(unpackCartographicDegreesArray)),defined(i.array)&&processPacketData(Array,e,t,i,void 0,void 0,r))}function processPositionArrayOfArrays(e,t,i,r){if(defined(i))if(Array.isArray(i))for(var n=0,a=i.length;n<a;++n)processPositionArrayOfArraysPacketData(e,t,i[n],r);else processPositionArrayOfArraysPacketData(e,t,i,r)}function processShape(e,t,i,r){if(defined(i))if(Array.isArray(i))for(var n=0,a=i.length;n<a;n++)processShapePacketData(e,t,i[n],r);else processShapePacketData(e,t,i,r)}function processAvailability(e,t,i,r){var n,a=t.availability;if(defined(a)){if(Array.isArray(a))for(var o=0,s=a.length;o<s;++o)defined(n)||(n=new TimeIntervalCollection),n.addInterval(intervalFromString(a[o]));else(n=new TimeIntervalCollection).addInterval(intervalFromString(a));e.availability=n}}function processAlignedAxis(e,t,i,r,n){defined(t)&&processPacketData(UnitCartesian3,e,"alignedAxis",t,i,r,n)}function processBillboard(e,t,i,r){var n,a=t.billboard;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.billboard)||(e.billboard=t=new BillboardGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Image,t,"image",a.image,n,r,i),processPacketData(Number,t,"scale",a.scale,n,r,i),processPacketData(Cartesian2,t,"pixelOffset",a.pixelOffset,n,r,i),processPacketData(Cartesian3,t,"eyeOffset",a.eyeOffset,n,r,i),processPacketData(HorizontalOrigin$1,t,"horizontalOrigin",a.horizontalOrigin,n,r,i),processPacketData(VerticalOrigin$1,t,"verticalOrigin",a.verticalOrigin,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Color,t,"color",a.color,n,r,i),processPacketData(Rotation,t,"rotation",a.rotation,n,r,i),processAlignedAxis(t,a.alignedAxis,n,r,i),processPacketData(Boolean,t,"sizeInMeters",a.sizeInMeters,n,r,i),processPacketData(Number,t,"width",a.width,n,r,i),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(NearFarScalar,t,"scaleByDistance",a.scaleByDistance,n,r,i),processPacketData(NearFarScalar,t,"translucencyByDistance",a.translucencyByDistance,n,r,i),processPacketData(NearFarScalar,t,"pixelOffsetScaleByDistance",a.pixelOffsetScaleByDistance,n,r,i),processPacketData(BoundingRectangle,t,"imageSubRegion",a.imageSubRegion,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(Number,t,"disableDepthTestDistance",a.disableDepthTestDistance,n,r,i))}function processBox(e,t,i,r){var n,a=t.box;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.box)||(e.box=t=new BoxGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Cartesian3,t,"dimensions",a.dimensions,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processCorridor(e,t,i,r){var n,a=t.corridor;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.corridor)||(e.corridor=t=new CorridorGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPositionArray(t,"positions",a.positions,i),processPacketData(Number,t,"width",a.width,n,r,i),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Number,t,"extrudedHeight",a.extrudedHeight,n,r,i),processPacketData(HeightReference$1,t,"extrudedHeightReference",a.extrudedHeightReference,n,r,i),processPacketData(CornerType$1,t,"cornerType",a.cornerType,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i))}function processCylinder(e,t,i,r){var n,a=t.cylinder;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.cylinder)||(e.cylinder=t=new CylinderGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Number,t,"length",a.length,n,r,i),processPacketData(Number,t,"topRadius",a.topRadius,n,r,i),processPacketData(Number,t,"bottomRadius",a.bottomRadius,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Number,t,"numberOfVerticalLines",a.numberOfVerticalLines,n,r,i),processPacketData(Number,t,"slices",a.slices,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processDocument(e,t){var i=e.version;if(defined(i)&&"string"==typeof i){var r=i.split(".");if(2===r.length){if("1"!==r[0])throw new RuntimeError("Cesium only supports CZML version 1.");t._version=i}}if(!defined(t._version))throw new RuntimeError("CZML version information invalid.  It is expected to be a property on the document object in the <Major>.<Minor> version format.");i=t._documentPacket,defined(e.name)&&(i.name=e.name),defined(t=e.clock)&&(defined(e=i.clock)?(e.interval=defaultValue(t.interval,e.interval),e.currentTime=defaultValue(t.currentTime,e.currentTime),e.range=defaultValue(t.range,e.range),e.step=defaultValue(t.step,e.step),e.multiplier=defaultValue(t.multiplier,e.multiplier)):i.clock={interval:t.interval,currentTime:t.currentTime,range:t.range,step:t.step,multiplier:t.multiplier})}function processEllipse(e,t,i,r){var n,a=t.ellipse;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.ellipse)||(e.ellipse=t=new EllipseGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Number,t,"semiMajorAxis",a.semiMajorAxis,n,r,i),processPacketData(Number,t,"semiMinorAxis",a.semiMinorAxis,n,r,i),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Number,t,"extrudedHeight",a.extrudedHeight,n,r,i),processPacketData(HeightReference$1,t,"extrudedHeightReference",a.extrudedHeightReference,n,r,i),processPacketData(Rotation,t,"rotation",a.rotation,n,r,i),processPacketData(Rotation,t,"stRotation",a.stRotation,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Number,t,"numberOfVerticalLines",a.numberOfVerticalLines,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i))}function processEllipsoid(e,t,i,r){var n,a=t.ellipsoid;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.ellipsoid)||(e.ellipsoid=t=new EllipsoidGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Cartesian3,t,"radii",a.radii,n,r,i),processPacketData(Cartesian3,t,"innerRadii",a.innerRadii,n,r,i),processPacketData(Number,t,"minimumClock",a.minimumClock,n,r,i),processPacketData(Number,t,"maximumClock",a.maximumClock,n,r,i),processPacketData(Number,t,"minimumCone",a.minimumCone,n,r,i),processPacketData(Number,t,"maximumCone",a.maximumCone,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Number,t,"stackPartitions",a.stackPartitions,n,r,i),processPacketData(Number,t,"slicePartitions",a.slicePartitions,n,r,i),processPacketData(Number,t,"subdivisions",a.subdivisions,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processLabel(e,t,i,r){var n,a=t.label;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.label)||(e.label=t=new LabelGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(String,t,"text",a.text,n,r,i),processPacketData(String,t,"font",a.font,n,r,i),processPacketData(LabelStyle$1,t,"style",a.style,n,r,i),processPacketData(Number,t,"scale",a.scale,n,r,i),processPacketData(Boolean,t,"showBackground",a.showBackground,n,r,i),processPacketData(Color,t,"backgroundColor",a.backgroundColor,n,r,i),processPacketData(Cartesian2,t,"backgroundPadding",a.backgroundPadding,n,r,i),processPacketData(Cartesian2,t,"pixelOffset",a.pixelOffset,n,r,i),processPacketData(Cartesian3,t,"eyeOffset",a.eyeOffset,n,r,i),processPacketData(HorizontalOrigin$1,t,"horizontalOrigin",a.horizontalOrigin,n,r,i),processPacketData(VerticalOrigin$1,t,"verticalOrigin",a.verticalOrigin,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Color,t,"fillColor",a.fillColor,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(NearFarScalar,t,"translucencyByDistance",a.translucencyByDistance,n,r,i),processPacketData(NearFarScalar,t,"pixelOffsetScaleByDistance",a.pixelOffsetScaleByDistance,n,r,i),processPacketData(NearFarScalar,t,"scaleByDistance",a.scaleByDistance,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(Number,t,"disableDepthTestDistance",a.disableDepthTestDistance,n,r,i))}function processModel(e,t,i,r){if(defined(t=t.model)){var n,a,o=intervalFromString(t.interval),s=e.model;defined(s)||(e.model=s=new ModelGraphics),processPacketData(Boolean,s,"show",t.show,o,r,i),processPacketData(URI,s,"uri",t.gltf,o,r,i),processPacketData(Number,s,"scale",t.scale,o,r,i),processPacketData(Number,s,"minimumPixelSize",t.minimumPixelSize,o,r,i),processPacketData(Number,s,"maximumScale",t.maximumScale,o,r,i),processPacketData(Boolean,s,"incrementallyLoadTextures",t.incrementallyLoadTextures,o,r,i),processPacketData(Boolean,s,"runAnimations",t.runAnimations,o,r,i),processPacketData(Boolean,s,"clampAnimations",t.clampAnimations,o,r,i),processPacketData(ShadowMode$1,s,"shadows",t.shadows,o,r,i),processPacketData(HeightReference$1,s,"heightReference",t.heightReference,o,r,i),processPacketData(Color,s,"silhouetteColor",t.silhouetteColor,o,r,i),processPacketData(Number,s,"silhouetteSize",t.silhouetteSize,o,r,i),processPacketData(Color,s,"color",t.color,o,r,i),processPacketData(ColorBlendMode$1,s,"colorBlendMode",t.colorBlendMode,o,r,i),processPacketData(Number,s,"colorBlendAmount",t.colorBlendAmount,o,r,i),processPacketData(DistanceDisplayCondition,s,"distanceDisplayCondition",t.distanceDisplayCondition,o,r,i);var l=t.nodeTransformations;if(defined(l))if(Array.isArray(l))for(n=0,a=l.length;n<a;++n)processNodeTransformations(s,l[n],o,r,i);else processNodeTransformations(s,l,o,r,i);var c=t.articulations;if(defined(c))if(Array.isArray(c))for(n=0,a=c.length;n<a;++n)processArticulations(s,c[n],o,r,i);else processArticulations(s,c,o,r,i)}}function processNodeTransformations(e,t,i,r,n){var a=intervalFromString(t.interval);defined(i)&&(a=defined(a)?TimeInterval.intersect(a,i,scratchTimeInterval):i);for(var o=e.nodeTransformations,s=Object.keys(t),l=0,c=s.length;l<c;++l){var u,d,h=s[l];"interval"!==h&&defined(u=t[h])&&(defined(o)||(e.nodeTransformations=o=new PropertyBag),o.hasProperty(h)||o.addProperty(h),defined(d=o[h])||(o[h]=d=new NodeTransformationProperty),processPacketData(Cartesian3,d,"translation",u.translation,a,r,n),processPacketData(Quaternion,d,"rotation",u.rotation,a,r,n),processPacketData(Cartesian3,d,"scale",u.scale,a,r,n))}}function processArticulations(e,t,i,r,n){var a=intervalFromString(t.interval);defined(i)&&(a=defined(a)?TimeInterval.intersect(a,i,scratchTimeInterval):i);for(var o=e.articulations,s=Object.keys(t),l=0,c=s.length;l<c;++l){var u,d=s[l];"interval"!==d&&defined(u=t[d])&&(defined(o)||(e.articulations=o=new PropertyBag),o.hasProperty(d)||o.addProperty(d),processPacketData(Number,o,d,u,a,r,n))}}function processPath(e,t,i,r){var n,a=t.path;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.path)||(e.path=t=new PathGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Number,t,"leadTime",a.leadTime,n,r,i),processPacketData(Number,t,"trailTime",a.trailTime,n,r,i),processPacketData(Number,t,"width",a.width,n,r,i),processPacketData(Number,t,"resolution",a.resolution,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processPoint(e,t,i,r){var n,a=t.point;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.point)||(e.point=t=new PointGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Number,t,"pixelSize",a.pixelSize,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Color,t,"color",a.color,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(NearFarScalar,t,"scaleByDistance",a.scaleByDistance,n,r,i),processPacketData(NearFarScalar,t,"translucencyByDistance",a.translucencyByDistance,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(Number,t,"disableDepthTestDistance",a.disableDepthTestDistance,n,r,i))}function PolygonHierarchyProperty(e){this.polygon=e,this._definitionChanged=new Event}function processPolygon(e,t,i,r){var n,a=t.polygon;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.polygon)||(e.polygon=t=new PolygonGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPositionArray(t,"_positions",a.positions,i),processPositionArrayOfArrays(t,"_holes",a.holes,i),(defined(t._positions)||defined(t._holes))&&(t.hierarchy=new PolygonHierarchyProperty(t)),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Number,t,"extrudedHeight",a.extrudedHeight,n,r,i),processPacketData(HeightReference$1,t,"extrudedHeightReference",a.extrudedHeightReference,n,r,i),processPacketData(Rotation,t,"stRotation",a.stRotation,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Boolean,t,"perPositionHeight",a.perPositionHeight,n,r,i),processPacketData(Boolean,t,"closeTop",a.closeTop,n,r,i),processPacketData(Boolean,t,"closeBottom",a.closeBottom,n,r,i),processPacketData(ArcType$1,t,"arcType",a.arcType,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i))}function adaptFollowSurfaceToArcType(e){return e?ArcType$1.GEODESIC:ArcType$1.NONE}function processPolyline(e,t,i,r){var n,a=t.polyline;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.polyline)||(e.polyline=t=new PolylineGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPositionArray(t,"positions",a.positions,i),processPacketData(Number,t,"width",a.width,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processMaterialPacketData(t,"depthFailMaterial",a.depthFailMaterial,n,r,i),processPacketData(ArcType$1,t,"arcType",a.arcType,n,r,i),processPacketData(Boolean,t,"clampToGround",a.clampToGround,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i),defined(a.followSurface)&&!defined(a.arcType)&&(e={},processPacketData(Boolean,e,"followSurface",a.followSurface,n,r,i),t.arcType=createAdapterProperty(e.followSurface,adaptFollowSurfaceToArcType)))}function processPolylineVolume(e,t,i,r){var n,a=t.polylineVolume;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.polylineVolume)||(e.polylineVolume=t=new PolylineVolumeGraphics),processPositionArray(t,"positions",a.positions,i),processShape(t,"shape",a.shape,i),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(CornerType$1,t,"cornerType",a.cornerType,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processRectangle(e,t,i,r){var n,a=t.rectangle;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.rectangle)||(e.rectangle=t=new RectangleGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(Rectangle,t,"coordinates",a.coordinates,n,r,i),processPacketData(Number,t,"height",a.height,n,r,i),processPacketData(HeightReference$1,t,"heightReference",a.heightReference,n,r,i),processPacketData(Number,t,"extrudedHeight",a.extrudedHeight,n,r,i),processPacketData(HeightReference$1,t,"extrudedHeightReference",a.extrudedHeightReference,n,r,i),processPacketData(Rotation,t,"rotation",a.rotation,n,r,i),processPacketData(Rotation,t,"stRotation",a.stRotation,n,r,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i),processPacketData(ClassificationType$1,t,"classificationType",a.classificationType,n,r,i),processPacketData(Number,t,"zIndex",a.zIndex,n,r,i))}function processTileset(e,t,i,r){var n,a=t.tileset;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.tileset)||(e.tileset=t=new Cesium3DTilesetGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPacketData(URI,t,"uri",a.uri,n,r,i),processPacketData(Number,t,"maximumScreenSpaceError",a.maximumScreenSpaceError,n,r,i))}function processWall(e,t,i,r){var n,a=t.wall;defined(a)&&(n=intervalFromString(a.interval),defined(t=e.wall)||(e.wall=t=new WallGraphics),processPacketData(Boolean,t,"show",a.show,n,r,i),processPositionArray(t,"positions",a.positions,i),processArray(t,"minimumHeights",a.minimumHeights,i),processArray(t,"maximumHeights",a.maximumHeights,i),processPacketData(Number,t,"granularity",a.granularity,n,r,i),processPacketData(Boolean,t,"fill",a.fill,n,r,i),processMaterialPacketData(t,"material",a.material,n,r,i),processPacketData(Boolean,t,"outline",a.outline,n,r,i),processPacketData(Color,t,"outlineColor",a.outlineColor,n,r,i),processPacketData(Number,t,"outlineWidth",a.outlineWidth,n,r,i),processPacketData(ShadowMode$1,t,"shadows",a.shadows,n,r,i),processPacketData(DistanceDisplayCondition,t,"distanceDisplayCondition",a.distanceDisplayCondition,n,r,i))}function processCzmlPacket(e,t,i,r,n){if(defined(a=e.id)||(a=createGuid()),currentId=a,!defined(n._version)&&"document"!==a)throw new RuntimeError("The first CZML packet is required to be the document object.");if(!0===e.delete)t.removeById(a);else if("document"===a)processDocument(e,n);else{var a,o=t.getOrCreateEntity(a);defined(a=e.parent)&&(o.parent=t.getOrCreateEntity(a));for(var s=i.length-1;-1<s;s--)i[s](o,e,t,r)}currentId=void 0}function updateClock(e){var t=e._documentPacket.clock;if(!defined(t)){if(!defined(e._clock))if(!(a=e._entityCollection.computeAvailability()).start.equals(Iso8601.MINIMUM_VALUE)){var i=a.start,r=a.stop,n=JulianDate.secondsDifference(r,i),a=Math.round(n/120);return(n=new DataSourceClock).startTime=JulianDate.clone(i),n.stopTime=JulianDate.clone(r),n.clockRange=ClockRange$1.LOOP_STOP,n.multiplier=a,n.currentTime=JulianDate.clone(i),n.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,e._clock=n,!0}return!1}return defined(e._clock)?n=e._clock.clone():((n=new DataSourceClock).startTime=Iso8601.MINIMUM_VALUE.clone(),n.stopTime=Iso8601.MAXIMUM_VALUE.clone(),n.currentTime=Iso8601.MINIMUM_VALUE.clone(),n.clockRange=ClockRange$1.LOOP_STOP,n.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,n.multiplier=1),defined(i=intervalFromString(t.interval))&&(n.startTime=i.start,n.stopTime=i.stop),defined(t.currentTime)&&(n.currentTime=JulianDate.fromIso8601(t.currentTime)),defined(t.range)&&(n.clockRange=defaultValue(ClockRange$1[t.range],ClockRange$1.LOOP_STOP)),defined(t.step)&&(n.clockStep=defaultValue(ClockStep$1[t.step],ClockStep$1.SYSTEM_CLOCK_MULTIPLIER)),defined(t.multiplier)&&(n.multiplier=t.multiplier),!n.equals(e._clock)&&(e._clock=n.clone(e._clock),!0)}function load(e,t,i,r){var n=t,a=(i=defaultValue(i,defaultValue.EMPTY_OBJECT)).sourceUri;if("string"==typeof(i=i.credit)&&(i=new Credit(i)),e._credit=i,"string"==typeof t||t instanceof Resource){n=(t=Resource.createIfNeeded(t)).fetchJson(),a=defaultValue(a,t.clone());var o=e._resourceCredits,s=t.credits;if(defined(s))for(var l=s.length,c=0;c<l;c++)o.push(s[c])}return a=Resource.createIfNeeded(a),DataSource.setLoading(e,!0),when(n,(function(t){return loadCzml(e,t,a,r)})).otherwise((function(t){return DataSource.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),when.reject(t)}))}function loadCzml(e,t,i,r){DataSource.setLoading(e,!0);var n=e._entityCollection;return r&&(e._version=void 0,e._documentPacket=new DocumentPacket,n.removeAll()),CzmlDataSource._processCzml(t,n,i,void 0,e),t=updateClock(e),defined((n=e._documentPacket).name)&&e._name!==n.name?(e._name=n.name,t=!0):!defined(e._name)&&defined(i)&&(e._name=getFilenameFromUri(i.getUrlComponent()),t=!0),DataSource.setLoading(e,!1),t&&e._changed.raiseEvent(e),e}function DocumentPacket(){this.name=void 0,this.clock=void 0}function CzmlDataSource(e){this._name=e,this._changed=new Event,this._error=new Event,this._isLoading=!1,this._loading=new Event,this._clock=void 0,this._documentPacket=new DocumentPacket,this._version=void 0,this._entityCollection=new EntityCollection(this),this._entityCluster=new EntityCluster,this._credit=void 0,this._resourceCredits=[]}function DataSourceCollection(){this._dataSources=[],this._dataSourceAdded=new Event,this._dataSourceRemoved=new Event,this._dataSourceMoved=new Event}function getIndex(e,t){return e.indexOf(t)}function swapDataSources(e,t,i){var r=e._dataSources,n=r.length-1;(t=CesiumMath.clamp(t,0,n))!==(i=CesiumMath.clamp(i,0,n))&&(n=r[t],r[t]=r[i],r[i]=n,e.dataSourceMoved.raiseEvent(n,i,t))}function PrimitiveCollection(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._primitives=[],this._guid=createGuid(),this._zIndex=void 0,this.show=defaultValue(e.show,!0),this.destroyPrimitives=defaultValue(e.destroyPrimitives,!0)}function getPrimitiveIndex(e,t){return e._primitives.indexOf(t)}function OrderedGroundPrimitiveCollection(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}function DynamicGeometryBatch(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new AssociativeArray}Object.defineProperties(PolygonHierarchyProperty.prototype,{isConstant:{get:function(){var e=this.polygon._positions,t=this.polygon._holes;return(!defined(e)||e.isConstant)&&(!defined(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}}),PolygonHierarchyProperty.prototype.getValue=function(e,t){var i,r;return defined(this.polygon._positions)&&(i=this.polygon._positions.getValue(e)),defined(this.polygon._holes)&&defined(r=this.polygon._holes.getValue(e))&&(r=r.map((function(e){return new PolygonHierarchy(e)}))),defined(t)?(t.positions=i,t.holes=r,t):new PolygonHierarchy(i,r)},PolygonHierarchyProperty.prototype.equals=function(e){return this===e||e instanceof PolygonHierarchyProperty&&Property.equals(this.polygon._positions,e.polygon._positions)&&Property.equals(this.polygon._holes,e.polygon._holes)},CzmlDataSource.load=function(e,t){return(new CzmlDataSource).load(e,t)},Object.defineProperties(CzmlDataSource.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}}),CzmlDataSource.updaters=[processBillboard,processBox,processCorridor,processCylinder,processEllipse,processEllipsoid,processLabel,processModel,processName,processDescription,processPath,processPoint,processPolygon,processPolyline,processPolylineVolume,processProperties,processRectangle,processPosition,processTileset,processViewFrom,processWall,processOrientation,processAvailability],CzmlDataSource.prototype.process=function(e,t){return load(this,e,t,!1)},CzmlDataSource.prototype.load=function(e,t){return load(this,e,t,!0)},CzmlDataSource.prototype.update=function(e){return!0},CzmlDataSource.processPacketData=processPacketData,CzmlDataSource.processPositionPacketData=processPositionPacketData,CzmlDataSource.processMaterialPacketData=processMaterialPacketData,CzmlDataSource._processCzml=function(e,t,i,r,n){if(r=defaultValue(r,CzmlDataSource.updaters),Array.isArray(e))for(var a=0,o=e.length;a<o;++a)processCzmlPacket(e[a],t,r,i,n);else processCzmlPacket(e,t,r,i,n)},Object.defineProperties(DataSourceCollection.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),DataSourceCollection.prototype.add=function(e){var t=this,i=this._dataSources;return when(e,(function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e}))},DataSourceCollection.prototype.remove=function(e,t){t=defaultValue(t,!1);var i=this._dataSources.indexOf(e);return-1!==i&&(this._dataSources.splice(i,1),this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0)},DataSourceCollection.prototype.removeAll=function(e){e=defaultValue(e,!1);for(var t=this._dataSources,i=0,r=t.length;i<r;++i){var n=t[i];this._dataSourceRemoved.raiseEvent(this,n),e&&"function"==typeof n.destroy&&n.destroy()}this._dataSources=[]},DataSourceCollection.prototype.contains=function(e){return-1!==this.indexOf(e)},DataSourceCollection.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},DataSourceCollection.prototype.get=function(e){return this._dataSources[e]},DataSourceCollection.prototype.getByName=function(e){return this._dataSources.filter((function(t){return t.name===e}))},DataSourceCollection.prototype.raise=function(e){swapDataSources(this,e=getIndex(this._dataSources,e),e+1)},DataSourceCollection.prototype.lower=function(e){swapDataSources(this,e=getIndex(this._dataSources,e),e-1)},DataSourceCollection.prototype.raiseToTop=function(e){var t=getIndex(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},DataSourceCollection.prototype.lowerToBottom=function(e){var t=getIndex(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},DataSourceCollection.prototype.isDestroyed=function(){return!1},DataSourceCollection.prototype.destroy=function(){return this.removeAll(!0),destroyObject(this)},Object.defineProperties(PrimitiveCollection.prototype,{length:{get:function(){return this._primitives.length}}}),PrimitiveCollection.prototype.add=function(e,t){var i=defined(t),r=e._external=e._external||{};return(r._composites=r._composites||{})[this._guid]={collection:this},i?this._primitives.splice(t,0,e):this._primitives.push(e),e},PrimitiveCollection.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},PrimitiveCollection.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},PrimitiveCollection.prototype.removeAll=function(){for(var e=this._primitives,t=e.length,i=0;i<t;++i)delete e[i]._external._composites[this._guid],this.destroyPrimitives&&e[i].destroy();this._primitives=[]},PrimitiveCollection.prototype.contains=function(e){return!!(defined(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},PrimitiveCollection.prototype.raise=function(e){var t,i;!defined(e)||(t=getPrimitiveIndex(this,e))!==(i=this._primitives).length-1&&(e=i[t],i[t]=i[t+1],i[t+1]=e)},PrimitiveCollection.prototype.raiseToTop=function(e){var t,i;!defined(e)||(t=getPrimitiveIndex(this,e))!==(i=this._primitives).length-1&&(i.splice(t,1),i.push(e))},PrimitiveCollection.prototype.lower=function(e){var t,i;defined(e)&&(t=getPrimitiveIndex(this,e),i=this._primitives,0!==t&&(e=i[t],i[t]=i[t-1],i[t-1]=e))},PrimitiveCollection.prototype.lowerToBottom=function(e){var t,i;defined(e)&&(t=getPrimitiveIndex(this,e),i=this._primitives,0!==t&&(i.splice(t,1),i.unshift(e)))},PrimitiveCollection.prototype.get=function(e){return this._primitives[e]},PrimitiveCollection.prototype.update=function(e){if(this.show)for(var t=this._primitives,i=0;i<t.length;++i)t[i].update(e)},PrimitiveCollection.prototype.prePassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var r=t[i];defined(r.prePassesUpdate)&&r.prePassesUpdate(e)}},PrimitiveCollection.prototype.updateForPass=function(e,t){for(var i=this._primitives,r=0;r<i.length;++r){var n=i[r];defined(n.updateForPass)&&n.updateForPass(e,t)}},PrimitiveCollection.prototype.postPassesUpdate=function(e){for(var t=this._primitives,i=0;i<t.length;++i){var r=t[i];defined(r.postPassesUpdate)&&r.postPassesUpdate(e)}},PrimitiveCollection.prototype.isDestroyed=function(){return!1},PrimitiveCollection.prototype.destroy=function(){return this.removeAll(),destroyObject(this)},Object.defineProperties(OrderedGroundPrimitiveCollection.prototype,{length:{get:function(){return this._length}}}),OrderedGroundPrimitiveCollection.prototype.add=function(e,t){t=defaultValue(t,0);var i=this._collections[t];if(!defined(i)){(i=new PrimitiveCollection({destroyPrimitives:!1}))._zIndex=t,this._collections[t]=i;for(var r=this._collectionsArray,n=0;n<r.length&&r[n]._zIndex<t;)n++;r.splice(n,0,i)}return i.add(e),this._length++,e._zIndex=t,e},OrderedGroundPrimitiveCollection.prototype.set=function(e,t){return t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},OrderedGroundPrimitiveCollection.prototype.remove=function(e,t){if(this.contains(e)){var i=e._zIndex,r=this._collections[i];return(e=t?r.remove(e):r.removeAndDestroy(e))&&this._length--,0===r.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(r),1),this._collections[i]=void 0,r.destroy()),e}return!1},OrderedGroundPrimitiveCollection.prototype.removeAll=function(){for(var e=this._collectionsArray,t=0;t<e.length;t++){var i=e[t];i.destroyPrimitives=!0,i.destroy()}this._collections={},this._collectionsArray=[],this._length=0},OrderedGroundPrimitiveCollection.prototype.contains=function(e){if(!defined(e))return!1;var t=this._collections[e._zIndex];return defined(t)&&t.contains(e)},OrderedGroundPrimitiveCollection.prototype.update=function(e){if(this.show)for(var t=this._collectionsArray,i=0;i<t.length;i++)t[i].update(e)},OrderedGroundPrimitiveCollection.prototype.isDestroyed=function(){return!1},OrderedGroundPrimitiveCollection.prototype.destroy=function(){return this.removeAll(),destroyObject(this)},DynamicGeometryBatch.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))},DynamicGeometryBatch.prototype.remove=function(e){var t=e.id;defined(e=this._dynamicUpdaters.get(t))&&(this._dynamicUpdaters.remove(t),e.destroy())},DynamicGeometryBatch.prototype.update=function(e){for(var t=this._dynamicUpdaters.values,i=0,r=t.length;i<r;i++)t[i].update(e);return!0},DynamicGeometryBatch.prototype.removeAllPrimitives=function(){for(var e=this._dynamicUpdaters.values,t=0,i=e.length;t<i;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},DynamicGeometryBatch.prototype.getBoundingSphere=function(e,t){return defined(e=this._dynamicUpdaters.get(e.id))&&defined(e.getBoundingSphere)?e.getBoundingSphere(t):BoundingSphereState$1.FAILED};var scratchColor$b=new Color,defaultOffset$4=Cartesian3.ZERO,offsetScratch$6=new Cartesian3,scratchRectangle$4=new Rectangle;function EllipseGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function EllipseGeometryUpdater(e,t){GroundGeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new EllipseGeometryOptions(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function DynamicEllipseGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(EllipseGeometryUpdater.prototype=Object.create(GroundGeometryUpdater.prototype),EllipseGeometryUpdater.prototype.constructor=EllipseGeometryUpdater),EllipseGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n={show:new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$b)),defined(t)||(t=Color.WHITE),n.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$4,offsetScratch$6))),new GeometryInstance({id:i,geometry:new EllipseGeometry(this._options),attributes:n})},EllipseGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$b),n=this._distanceDisplayConditionProperty.getValue(e);n={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n),offset:void 0};return defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$4,offsetScratch$6))),new GeometryInstance({id:t,geometry:new EllipseOutlineGeometry(this._options),attributes:n})},EllipseGeometryUpdater.prototype._computeCenter=function(e,t){return Property.getValueOrUndefined(this._entity.position,e,t)},EllipseGeometryUpdater.prototype._isHidden=function(e,t){return!defined(e.position)||!defined(t.semiMajorAxis)||!defined(t.semiMinorAxis)||GeometryUpdater.prototype._isHidden.call(this,e,t)},EllipseGeometryUpdater.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!Property.isConstant(t.rotation)||!Property.isConstant(t.height)||!Property.isConstant(t.extrudedHeight)||!Property.isConstant(t.granularity)||!Property.isConstant(t.stRotation)||!Property.isConstant(t.outlineWidth)||!Property.isConstant(t.numberOfVerticalLines)||!Property.isConstant(t.zIndex)||this._onTerrain&&!Property.isConstant(this._materialProperty)&&!(this._materialProperty instanceof ColorMaterialProperty)},EllipseGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrUndefined(t.height,Iso8601.MINIMUM_VALUE),r=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),n=Property.getValueOrUndefined(t.extrudedHeight,Iso8601.MINIMUM_VALUE),a=Property.getValueOrDefault(t.extrudedHeightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE);defined(n)&&!defined(i)&&(i=0);var o=this._options;o.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,o.center=e.position.getValue(Iso8601.MINIMUM_VALUE,o.center),o.semiMajorAxis=t.semiMajorAxis.getValue(Iso8601.MINIMUM_VALUE,o.semiMajorAxis),o.semiMinorAxis=t.semiMinorAxis.getValue(Iso8601.MINIMUM_VALUE,o.semiMinorAxis),o.rotation=Property.getValueOrUndefined(t.rotation,Iso8601.MINIMUM_VALUE),o.granularity=Property.getValueOrUndefined(t.granularity,Iso8601.MINIMUM_VALUE),o.stRotation=Property.getValueOrUndefined(t.stRotation,Iso8601.MINIMUM_VALUE),o.numberOfVerticalLines=Property.getValueOrUndefined(t.numberOfVerticalLines,Iso8601.MINIMUM_VALUE),o.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(i,r,n,a),o.height=GroundGeometryUpdater.getGeometryHeight(i,r),(n=GroundGeometryUpdater.getGeometryExtrudedHeight(n,a))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(n=ApproximateTerrainHeights.getMinimumMaximumHeights(EllipseGeometry.computeRectangle(o,scratchRectangle$4)).minimumTerrainHeight),o.extrudedHeight=n},EllipseGeometryUpdater.DynamicGeometryUpdater=DynamicEllipseGeometryUpdater,defined(Object.create)&&(DynamicEllipseGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicEllipseGeometryUpdater.prototype.constructor=DynamicEllipseGeometryUpdater),DynamicEllipseGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(r.center)||!defined(r.semiMajorAxis)||!defined(r.semiMinorAxis)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicEllipseGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options,n=Property.getValueOrUndefined(t.height,i),a=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),o=Property.getValueOrUndefined(t.extrudedHeight,i),s=Property.getValueOrDefault(t.extrudedHeightReference,i,HeightReference$1.NONE);defined(o)&&!defined(n)&&(n=0),r.center=Property.getValueOrUndefined(e.position,i,r.center),r.semiMajorAxis=Property.getValueOrUndefined(t.semiMajorAxis,i),r.semiMinorAxis=Property.getValueOrUndefined(t.semiMinorAxis,i),r.rotation=Property.getValueOrUndefined(t.rotation,i),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.stRotation=Property.getValueOrUndefined(t.stRotation,i),r.numberOfVerticalLines=Property.getValueOrUndefined(t.numberOfVerticalLines,i),r.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(n,a,o,s),r.height=GroundGeometryUpdater.getGeometryHeight(n,a),(o=GroundGeometryUpdater.getGeometryExtrudedHeight(o,s))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(o=ApproximateTerrainHeights.getMinimumMaximumHeights(EllipseGeometry.computeRectangle(r,scratchRectangle$4)).minimumTerrainHeight),r.extrudedHeight=o};var defaultMaterial$1=new ColorMaterialProperty(Color.WHITE),defaultOffset$5=Cartesian3.ZERO,offsetScratch$7=new Cartesian3,radiiScratch=new Cartesian3,innerRadiiScratch=new Cartesian3,scratchColor$c=new Color,unitSphere=new Cartesian3(1,1,1);function EllipsoidGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function EllipsoidGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new EllipsoidGeometryOptions(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function DynamicEllipsoidGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i),this._scene=e._scene,this._modelMatrix=new Matrix4,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new Cartesian3,this._material={}}defined(Object.create)&&(EllipsoidGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),EllipsoidGeometryUpdater.prototype.constructor=EllipsoidGeometryUpdater),Object.defineProperties(EllipsoidGeometryUpdater.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),EllipsoidGeometryUpdater.prototype.createFillGeometryInstance=function(e,t,i){var r,n=this._entity,a=n.isAvailable(e),o=new ShowGeometryInstanceAttribute(a&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e);s={show:o,distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(s),color:void 0,offset:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(r=this._materialProperty.color.getValue(e,scratchColor$c)),defined(r)||(r=Color.WHITE),r=ColorGeometryInstanceAttribute.fromColor(r),s.color=r),defined(this._options.offsetAttribute)&&(s.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$5,offsetScratch$7))),new GeometryInstance({id:n,geometry:new EllipsoidGeometry(this._options),modelMatrix:t?void 0:n.computeModelMatrixForHeightReference(e,n.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:s})},EllipsoidGeometryUpdater.prototype.createOutlineGeometryInstance=function(e,t,i){var r=this._entity,n=r.isAvailable(e),a=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$c),o=this._distanceDisplayConditionProperty.getValue(e);o={show:new ShowGeometryInstanceAttribute(n&&r.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(a),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(o),offset:void 0};return defined(this._options.offsetAttribute)&&(o.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$5,offsetScratch$7))),new GeometryInstance({id:r,geometry:new EllipsoidOutlineGeometry(this._options),modelMatrix:t?void 0:r.computeModelMatrixForHeightReference(e,r.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:o})},EllipsoidGeometryUpdater.prototype._computeCenter=function(e,t){return Property.getValueOrUndefined(this._entity.position,e,t)},EllipsoidGeometryUpdater.prototype._isHidden=function(e,t){return!defined(e.position)||!defined(t.radii)||GeometryUpdater.prototype._isHidden.call(this,e,t)},EllipsoidGeometryUpdater.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&Property.isConstant(e.orientation)&&t.radii.isConstant&&Property.isConstant(t.innerRadii)&&Property.isConstant(t.stackPartitions)&&Property.isConstant(t.slicePartitions)&&Property.isConstant(t.outlineWidth)&&Property.isConstant(t.minimumClock)&&Property.isConstant(t.maximumClock)&&Property.isConstant(t.minimumCone)&&Property.isConstant(t.maximumCone)&&Property.isConstant(t.subdivisions))},EllipsoidGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),r=this._options;r.vertexFormat=this._materialProperty instanceof ColorMaterialProperty?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,r.radii=t.radii.getValue(Iso8601.MINIMUM_VALUE,r.radii),r.innerRadii=Property.getValueOrUndefined(t.innerRadii,r.radii),r.minimumClock=Property.getValueOrUndefined(t.minimumClock,Iso8601.MINIMUM_VALUE),r.maximumClock=Property.getValueOrUndefined(t.maximumClock,Iso8601.MINIMUM_VALUE),r.minimumCone=Property.getValueOrUndefined(t.minimumCone,Iso8601.MINIMUM_VALUE),r.maximumCone=Property.getValueOrUndefined(t.maximumCone,Iso8601.MINIMUM_VALUE),r.stackPartitions=Property.getValueOrUndefined(t.stackPartitions,Iso8601.MINIMUM_VALUE),r.slicePartitions=Property.getValueOrUndefined(t.slicePartitions,Iso8601.MINIMUM_VALUE),r.subdivisions=Property.getValueOrUndefined(t.subdivisions,Iso8601.MINIMUM_VALUE),r.offsetAttribute=i!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0},EllipsoidGeometryUpdater.prototype._onEntityPropertyChanged=heightReferenceOnEntityPropertyChanged,EllipsoidGeometryUpdater.DynamicGeometryUpdater=DynamicEllipsoidGeometryUpdater,defined(Object.create)&&(DynamicEllipsoidGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicEllipsoidGeometryUpdater.prototype.constructor=DynamicEllipsoidGeometryUpdater),DynamicEllipsoidGeometryUpdater.prototype.update=function(e){var t=this._entity,i=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!Property.getValueOrDefault(i.show,e,!0))return defined(this._primitive)&&(this._primitive.show=!1),void(defined(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var r=Property.getValueOrUndefined(i.radii,e,radiiScratch),n=defined(r)?t.computeModelMatrixForHeightReference(e,i.heightReference,.5*r.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!defined(n)||!defined(r))return defined(this._primitive)&&(this._primitive.show=!1),void(defined(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var a=Property.getValueOrDefault(i.fill,e,!0),o=Property.getValueOrDefault(i.outline,e,!1),s=Property.getValueOrClonedDefault(i.outlineColor,e,Color.BLACK,scratchColor$c),l=MaterialProperty.getValue(e,defaultValue(i.material,defaultMaterial$1),this._material),c=Property.getValueOrUndefined(i.innerRadii,e,innerRadiiScratch),u=Property.getValueOrUndefined(i.minimumClock,e),d=Property.getValueOrUndefined(i.maximumClock,e),h=Property.getValueOrUndefined(i.minimumCone,e),p=Property.getValueOrUndefined(i.maximumCone,e),f=Property.getValueOrUndefined(i.stackPartitions,e),m=Property.getValueOrUndefined(i.slicePartitions,e),g=Property.getValueOrUndefined(i.subdivisions,e),y=Property.getValueOrDefault(i.outlineWidth,e,1),_=Property.getValueOrDefault(i.heightReference,e,HeightReference$1.NONE),v=_!==HeightReference$1.NONE?GeometryOffsetAttribute$1.ALL:void 0,C=this._scene.mode,x=C===SceneMode$1.SCENE3D&&_===HeightReference$1.NONE,b=this._options,S=this._geometryUpdater.shadowsProperty.getValue(e),T=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e);i=Property.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,defaultOffset$5,offsetScratch$7);!x||this._lastSceneMode!==C||!defined(this._primitive)||b.stackPartitions!==f||b.slicePartitions!==m||defined(c)&&!Cartesian3.equals(b.innerRadii!==c)||b.minimumClock!==u||b.maximumClock!==d||b.minimumCone!==h||b.maximumCone!==p||b.subdivisions!==g||this._lastOutlineWidth!==y||b.offsetAttribute!==v?((_=this._primitives).removeAndDestroy(this._primitive),_.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=C,this._lastOutlineWidth=y,b.stackPartitions=f,b.slicePartitions=m,b.subdivisions=g,b.offsetAttribute=v,b.radii=Cartesian3.clone(x?unitSphere:r,b.radii),defined(c)?x?(v=Cartesian3.magnitude(r),b.innerRadii=Cartesian3.fromElements(c.x/v,c.y/v,c.z/v,b.innerRadii)):b.innerRadii=Cartesian3.clone(c,b.innerRadii):b.innerRadii=void 0,b.minimumClock=u,b.maximumClock=d,b.minimumCone=h,b.maximumCone=p,p=new MaterialAppearance({material:l,translucent:l.isTranslucent(),closed:!0}),b.vertexFormat=p.vertexFormat,b=this._geometryUpdater.createFillGeometryInstance(e,x,this._modelMatrix),this._primitive=_.add(new Primitive({geometryInstances:b,appearance:p,asynchronous:!1,shadows:S})),e=this._geometryUpdater.createOutlineGeometryInstance(e,x,this._modelMatrix),this._outlinePrimitive=_.add(new Primitive({geometryInstances:e,appearance:new PerInstanceColorAppearance({flat:!0,translucent:255!==e.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(y)}}),asynchronous:!1,shadows:S})),this._lastShow=a,this._lastOutlineShow=o,this._lastOutlineColor=Color.clone(s,this._lastOutlineColor),this._lastDistanceDisplayCondition=T,this._lastOffset=Cartesian3.clone(i,this._lastOffset)):this._primitive.ready&&(y=this._primitive,S=this._outlinePrimitive,y.show=!0,S.show=!0,y.appearance.material=l,defined(l=this._attributes)||(l=y.getGeometryInstanceAttributes(t),this._attributes=l),a!==this._lastShow&&(l.show=ShowGeometryInstanceAttribute.toValue(a,l.show),this._lastShow=a),defined(a=this._outlineAttributes)||(a=S.getGeometryInstanceAttributes(t),this._outlineAttributes=a),o!==this._lastOutlineShow&&(a.show=ShowGeometryInstanceAttribute.toValue(o,a.show),this._lastOutlineShow=o),Color.equals(s,this._lastOutlineColor)||(a.color=ColorGeometryInstanceAttribute.toValue(s,a.color),Color.clone(s,this._lastOutlineColor)),DistanceDisplayCondition.equals(T,this._lastDistanceDisplayCondition)||(l.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(T,l.distanceDisplayCondition),a.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(T,a.distanceDisplayCondition),DistanceDisplayCondition.clone(T,this._lastDistanceDisplayCondition)),Cartesian3.equals(i,this._lastOffset)||(l.offset=OffsetGeometryInstanceAttribute.toValue(i,l.offset),a.offset=OffsetGeometryInstanceAttribute.toValue(i,l.offset),Cartesian3.clone(i,this._lastOffset))),x&&(r.x=Math.max(r.x,.001),r.y=Math.max(r.y,.001),r.z=Math.max(r.z,.001),n=Matrix4.multiplyByScale(n,r,n),this._primitive.modelMatrix=n,this._outlinePrimitive.modelMatrix=n)};var positionScratch$9=new Cartesian3,scratchColor$d=new Color;function PlaneGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function PlaneGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new PlaneGeometryOptions(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function DynamicPlaneGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(PlaneGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),PlaneGeometryUpdater.prototype.constructor=PlaneGeometryUpdater),PlaneGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t=this._entity,i=new ShowGeometryInstanceAttribute((a=t.isAvailable(e))&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),r=this._distanceDisplayConditionProperty.getValue(e),n=DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(r),a=(r=this._materialProperty instanceof ColorMaterialProperty?(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(o=this._materialProperty.color.getValue(e,scratchColor$d)),defined(o)||(o=Color.WHITE),{show:i,distanceDisplayCondition:n,color:ColorGeometryInstanceAttribute.fromColor(o)}):{show:i,distanceDisplayCondition:n},t.plane),o=this._options;i=t.computeModelMatrix(e),n=Property.getValueOrDefault(a.plane,e,o.plane),e=Property.getValueOrUndefined(a.dimensions,e,o.dimensions),i=createPrimitiveMatrix(o.plane=n,o.dimensions=e,i,i);return new GeometryInstance({id:t,geometry:new PlaneGeometry(this._options),modelMatrix:i,attributes:r})},PlaneGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$d),n=this._distanceDisplayConditionProperty.getValue(e),a=t.plane,o=this._options,s=t.computeModelMatrix(e),l=Property.getValueOrDefault(a.plane,e,o.plane);a=Property.getValueOrUndefined(a.dimensions,e,o.dimensions),s=createPrimitiveMatrix(o.plane=l,o.dimensions=a,s,s);return new GeometryInstance({id:t,geometry:new PlaneOutlineGeometry,modelMatrix:s,attributes:{show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n)}})},PlaneGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.plane)||!defined(t.dimensions)||!defined(e.position)||GeometryUpdater.prototype._isHidden.call(this,e,t)},PlaneGeometryUpdater.prototype._getIsClosed=function(e){return!1},PlaneGeometryUpdater.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&Property.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&Property.isConstant(t.outlineWidth))},PlaneGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof ColorMaterialProperty,r=this._options;r.vertexFormat=i?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,r.plane=t.plane.getValue(Iso8601.MINIMUM_VALUE,r.plane),r.dimensions=t.dimensions.getValue(Iso8601.MINIMUM_VALUE,r.dimensions)},PlaneGeometryUpdater.DynamicGeometryUpdater=DynamicPlaneGeometryUpdater,defined(Object.create)&&(DynamicPlaneGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicPlaneGeometryUpdater.prototype.constructor=DynamicPlaneGeometryUpdater),DynamicPlaneGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(Property.getValueOrUndefined(e.position,i,positionScratch$9))||!defined(r.plane)||!defined(r.dimensions)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicPlaneGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options;r.plane=Property.getValueOrDefault(t.plane,i,r.plane),r.dimensions=Property.getValueOrUndefined(t.dimensions,i,r.dimensions)};var scratchAxis$1=new Cartesian3,scratchUp=new Cartesian3,scratchTranslation=new Cartesian3,scratchScale$7=new Cartesian3,scratchRotation$1=new Matrix3,scratchRotationScale=new Matrix3,scratchLocalTransform=new Matrix4;function createPrimitiveMatrix(e,t,i,r){var n=e.normal,a=e.distance,o=Cartesian3.multiplyByScalar(n,-a,scratchTranslation),s=Cartesian3.clone(Cartesian3.UNIT_Z,scratchUp);return CesiumMath.equalsEpsilon(Math.abs(Cartesian3.dot(s,n)),1,CesiumMath.EPSILON8)&&(s=Cartesian3.clone(Cartesian3.UNIT_Y,s)),e=Cartesian3.cross(s,n,scratchAxis$1),s=Cartesian3.cross(n,e,s),Cartesian3.normalize(e,e),Cartesian3.normalize(s,s),a=scratchRotation$1,Matrix3.setColumn(a,0,e,a),Matrix3.setColumn(a,1,s,a),Matrix3.setColumn(a,2,n,a),t=Cartesian3.fromElements(t.x,t.y,1,scratchScale$7),t=Matrix3.multiplyByScale(a,t,scratchRotationScale),o=Matrix4.fromRotationTranslation(t,o,scratchLocalTransform),Matrix4.multiplyTransformation(i,o,r)}PlaneGeometryUpdater.createPrimitiveMatrix=createPrimitiveMatrix;var heightAndPerPositionHeightWarning="Entity polygons cannot have both height and perPositionHeight.  height will be ignored",heightReferenceAndPerPositionHeightWarning="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",scratchColor$e=new Color,defaultOffset$6=Cartesian3.ZERO,offsetScratch$8=new Cartesian3,scratchRectangle$5=new Rectangle,scratch2DPositions=[],cart2Scratch=new Cartesian2;function PolygonGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0}function PolygonGeometryUpdater(e,t){GroundGeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new PolygonGeometryOptions(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function DyanmicPolygonGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(PolygonGeometryUpdater.prototype=Object.create(GroundGeometryUpdater.prototype),PolygonGeometryUpdater.prototype.constructor=PolygonGeometryUpdater),PolygonGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=this._options,a={show:new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$e)),defined(t)||(t=Color.WHITE),a.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(n.offsetAttribute)&&(a.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$6,offsetScratch$8))),new GeometryInstance({id:i,geometry:new(n.perPositionHeight&&!defined(n.extrudedHeight)?CoplanarPolygonGeometry:PolygonGeometry)(n),attributes:a})},PolygonGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=this._options,n=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$e),a=this._distanceDisplayConditionProperty.getValue(e);a={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(n),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),offset:void 0};return defined(r.offsetAttribute)&&(a.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$6,offsetScratch$8))),new GeometryInstance({id:t,geometry:new(r.perPositionHeight&&!defined(r.extrudedHeight)?CoplanarPolygonOutlineGeometry:PolygonOutlineGeometry)(r),attributes:a})},PolygonGeometryUpdater.prototype._computeCenter=function(e,t){if(defined(i=Property.getValueOrUndefined(this._entity.polygon.hierarchy,e))&&0!==(e=i.positions).length){for(var i=this._scene.mapProjection.ellipsoid,r=(i=EllipsoidTangentPlane.fromPoints(e,i)).projectPointsOntoPlane(e,scratch2DPositions),n=r.length,a=0,o=n-1,s=new Cartesian2,l=0;l<n;o=l++){var c=r[l],u=r[o],d=c.x*u.y-u.x*c.y;u=Cartesian2.add(c,u,cart2Scratch),u=Cartesian2.multiplyByScalar(u,d,u),s=Cartesian2.add(s,u,s);a+=d}return e=1/(3*a),s=Cartesian2.multiplyByScalar(s,e,s),i.projectPointOntoEllipsoid(s,t)}},PolygonGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.hierarchy)||GeometryUpdater.prototype._isHidden.call(this,e,t)},PolygonGeometryUpdater.prototype._isOnTerrain=function(e,t){return e=GroundGeometryUpdater.prototype._isOnTerrain.call(this,e,t),t=defined(t=t.perPositionHeight)&&(!t.isConstant||t.getValue(Iso8601.MINIMUM_VALUE)),e&&!t},PolygonGeometryUpdater.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!Property.isConstant(t.height)||!Property.isConstant(t.extrudedHeight)||!Property.isConstant(t.granularity)||!Property.isConstant(t.stRotation)||!Property.isConstant(t.outlineWidth)||!Property.isConstant(t.perPositionHeight)||!Property.isConstant(t.closeTop)||!Property.isConstant(t.closeBottom)||!Property.isConstant(t.zIndex)||!Property.isConstant(t.arcType)||this._onTerrain&&!Property.isConstant(this._materialProperty)&&!(this._materialProperty instanceof ColorMaterialProperty)},PolygonGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof ColorMaterialProperty,r=this._options;r.vertexFormat=i?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat;var n,a=t.hierarchy.getValue(Iso8601.MINIMUM_VALUE),o=Property.getValueOrUndefined(t.height,Iso8601.MINIMUM_VALUE),s=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),l=Property.getValueOrUndefined(t.extrudedHeight,Iso8601.MINIMUM_VALUE),c=Property.getValueOrDefault(t.extrudedHeightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE);i=Property.getValueOrDefault(t.perPositionHeight,Iso8601.MINIMUM_VALUE,!1),o=GroundGeometryUpdater.getGeometryHeight(o,s);i?(defined(o)&&(o=void 0,oneTimeWarning(heightAndPerPositionHeightWarning)),s!==HeightReference$1.NONE&&i&&(o=void 0,oneTimeWarning(heightReferenceAndPerPositionHeightWarning))):(defined(l)&&!defined(o)&&(o=0),n=GroundGeometryUpdater.computeGeometryOffsetAttribute(o,s,l,c)),r.polygonHierarchy=a,r.granularity=Property.getValueOrUndefined(t.granularity,Iso8601.MINIMUM_VALUE),r.stRotation=Property.getValueOrUndefined(t.stRotation,Iso8601.MINIMUM_VALUE),r.perPositionHeight=i,r.closeTop=Property.getValueOrDefault(t.closeTop,Iso8601.MINIMUM_VALUE,!0),r.closeBottom=Property.getValueOrDefault(t.closeBottom,Iso8601.MINIMUM_VALUE,!0),r.offsetAttribute=n,r.height=o,r.arcType=Property.getValueOrDefault(t.arcType,Iso8601.MINIMUM_VALUE,ArcType$1.GEODESIC),(l=GroundGeometryUpdater.getGeometryExtrudedHeight(l,c))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(l=ApproximateTerrainHeights.getMinimumMaximumHeights(PolygonGeometry.computeRectangle(r,scratchRectangle$5)).minimumTerrainHeight),r.extrudedHeight=l},PolygonGeometryUpdater.prototype._getIsClosed=function(e){var t=e.height,i=defined(i=e.extrudedHeight)&&i!==t;return!e.perPositionHeight&&(!i&&0===t||i&&e.closeTop&&e.closeBottom)},PolygonGeometryUpdater.DynamicGeometryUpdater=DyanmicPolygonGeometryUpdater,defined(Object.create)&&(DyanmicPolygonGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DyanmicPolygonGeometryUpdater.prototype.constructor=DyanmicPolygonGeometryUpdater),DyanmicPolygonGeometryUpdater.prototype._isHidden=function(e,t,i){return!defined(this._options.polygonHierarchy)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DyanmicPolygonGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options;r.polygonHierarchy=Property.getValueOrUndefined(t.hierarchy,i);var n,a=Property.getValueOrUndefined(t.height,i),o=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),s=Property.getValueOrDefault(t.extrudedHeightReference,i,HeightReference$1.NONE),l=Property.getValueOrUndefined(t.extrudedHeight,i),c=Property.getValueOrUndefined(t.perPositionHeight,i);a=GroundGeometryUpdater.getGeometryHeight(a,s);c?(defined(a)&&(a=void 0,oneTimeWarning(heightAndPerPositionHeightWarning)),o!==HeightReference$1.NONE&&c&&(a=void 0,oneTimeWarning(heightReferenceAndPerPositionHeightWarning))):(defined(l)&&!defined(a)&&(a=0),n=GroundGeometryUpdater.computeGeometryOffsetAttribute(a,o,l,s)),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.stRotation=Property.getValueOrUndefined(t.stRotation,i),r.perPositionHeight=Property.getValueOrUndefined(t.perPositionHeight,i),r.closeTop=Property.getValueOrDefault(t.closeTop,i,!0),r.closeBottom=Property.getValueOrDefault(t.closeBottom,i,!0),r.offsetAttribute=n,r.height=a,r.arcType=Property.getValueOrDefault(t.arcType,i,ArcType$1.GEODESIC),(l=GroundGeometryUpdater.getGeometryExtrudedHeight(l,s))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(l=ApproximateTerrainHeights.getMinimumMaximumHeights(PolygonGeometry.computeRectangle(r,scratchRectangle$5)).minimumTerrainHeight),r.extrudedHeight=l};var scratchColor$f=new Color;function PolylineVolumeGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function PolylineVolumeGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new PolylineVolumeGeometryOptions(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function DynamicPolylineVolumeGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(PolylineVolumeGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),PolylineVolumeGeometryUpdater.prototype.constructor=PolylineVolumeGeometryUpdater),PolylineVolumeGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a=DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),a=this._materialProperty instanceof ColorMaterialProperty?(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$f)),defined(t)||(t=Color.WHITE),{show:n,distanceDisplayCondition:a,color:ColorGeometryInstanceAttribute.fromColor(t)}):{show:n,distanceDisplayCondition:a};return new GeometryInstance({id:i,geometry:new PolylineVolumeGeometry(this._options),attributes:a})},PolylineVolumeGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$f),n=this._distanceDisplayConditionProperty.getValue(e);return new GeometryInstance({id:t,geometry:new PolylineVolumeOutlineGeometry(this._options),attributes:{show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n)}})},PolylineVolumeGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.positions)||!defined(t.shape)||GeometryUpdater.prototype._isHidden.call(this,e,t)},PolylineVolumeGeometryUpdater.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&Property.isConstant(t.granularity)&&Property.isConstant(t.outlineWidth)&&Property.isConstant(t.cornerType))},PolylineVolumeGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=t.granularity,r=t.cornerType,n=this._options,a=this._materialProperty instanceof ColorMaterialProperty;n.vertexFormat=a?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,n.polylinePositions=t.positions.getValue(Iso8601.MINIMUM_VALUE,n.polylinePositions),n.shapePositions=t.shape.getValue(Iso8601.MINIMUM_VALUE,n.shape),n.granularity=defined(i)?i.getValue(Iso8601.MINIMUM_VALUE):void 0,n.cornerType=defined(r)?r.getValue(Iso8601.MINIMUM_VALUE):void 0},PolylineVolumeGeometryUpdater.DynamicGeometryUpdater=DynamicPolylineVolumeGeometryUpdater,defined(Object.create)&&(DynamicPolylineVolumeGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicPolylineVolumeGeometryUpdater.prototype.constructor=DynamicPolylineVolumeGeometryUpdater),DynamicPolylineVolumeGeometryUpdater.prototype._isHidden=function(e,t,i){var r=this._options;return!defined(r.polylinePositions)||!defined(r.shapePositions)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicPolylineVolumeGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options;r.polylinePositions=Property.getValueOrUndefined(t.positions,i,r.polylinePositions),r.shapePositions=Property.getValueOrUndefined(t.shape,i),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.cornerType=Property.getValueOrUndefined(t.cornerType,i)};var scratchColor$g=new Color,defaultOffset$7=Cartesian3.ZERO,offsetScratch$9=new Cartesian3,scratchRectangle$6=new Rectangle,scratchCenterRect=new Rectangle,scratchCarto$1=new Cartographic;function RectangleGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function RectangleGeometryUpdater(e,t){GroundGeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new RectangleGeometryOptions(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function DynamicRectangleGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(RectangleGeometryUpdater.prototype=Object.create(GroundGeometryUpdater.prototype),RectangleGeometryUpdater.prototype.constructor=RectangleGeometryUpdater),RectangleGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n={show:new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$g)),defined(t)||(t=Color.WHITE),n.color=ColorGeometryInstanceAttribute.fromColor(t)),defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$7,offsetScratch$9))),new GeometryInstance({id:i,geometry:new RectangleGeometry(this._options),attributes:n})},RectangleGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$g),n=this._distanceDisplayConditionProperty.getValue(e);n={show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n),offset:void 0};return defined(this._options.offsetAttribute)&&(n.offset=OffsetGeometryInstanceAttribute.fromCartesian3(Property.getValueOrDefault(this._terrainOffsetProperty,e,defaultOffset$7,offsetScratch$9))),new GeometryInstance({id:t,geometry:new RectangleOutlineGeometry(this._options),attributes:n})},RectangleGeometryUpdater.prototype._computeCenter=function(e,t){if(defined(e=Property.getValueOrUndefined(this._entity.rectangle.coordinates,e,scratchCenterRect)))return e=Rectangle.center(e,scratchCarto$1),Cartographic.toCartesian(e,Ellipsoid.WGS84,t)},RectangleGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.coordinates)||GeometryUpdater.prototype._isHidden.call(this,e,t)},RectangleGeometryUpdater.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!Property.isConstant(t.height)||!Property.isConstant(t.extrudedHeight)||!Property.isConstant(t.granularity)||!Property.isConstant(t.stRotation)||!Property.isConstant(t.rotation)||!Property.isConstant(t.outlineWidth)||!Property.isConstant(t.zIndex)||this._onTerrain&&!Property.isConstant(this._materialProperty)&&!(this._materialProperty instanceof ColorMaterialProperty)},RectangleGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof ColorMaterialProperty,r=Property.getValueOrUndefined(t.height,Iso8601.MINIMUM_VALUE),n=Property.getValueOrDefault(t.heightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE),a=Property.getValueOrUndefined(t.extrudedHeight,Iso8601.MINIMUM_VALUE),o=Property.getValueOrDefault(t.extrudedHeightReference,Iso8601.MINIMUM_VALUE,HeightReference$1.NONE);defined(a)&&!defined(r)&&(r=0);var s=this._options;s.vertexFormat=i?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,s.rectangle=t.coordinates.getValue(Iso8601.MINIMUM_VALUE,s.rectangle),s.granularity=Property.getValueOrUndefined(t.granularity,Iso8601.MINIMUM_VALUE),s.stRotation=Property.getValueOrUndefined(t.stRotation,Iso8601.MINIMUM_VALUE),s.rotation=Property.getValueOrUndefined(t.rotation,Iso8601.MINIMUM_VALUE),s.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(r,n,a,o),s.height=GroundGeometryUpdater.getGeometryHeight(r,n),(a=GroundGeometryUpdater.getGeometryExtrudedHeight(a,o))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(a=ApproximateTerrainHeights.getMinimumMaximumHeights(RectangleGeometry.computeRectangle(s,scratchRectangle$6)).minimumTerrainHeight),s.extrudedHeight=a},RectangleGeometryUpdater.DynamicGeometryUpdater=DynamicRectangleGeometryUpdater,defined(Object.create)&&(DynamicRectangleGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicRectangleGeometryUpdater.prototype.constructor=DynamicRectangleGeometryUpdater),DynamicRectangleGeometryUpdater.prototype._isHidden=function(e,t,i){return!defined(this._options.rectangle)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicRectangleGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options,n=Property.getValueOrUndefined(t.height,i),a=Property.getValueOrDefault(t.heightReference,i,HeightReference$1.NONE),o=Property.getValueOrUndefined(t.extrudedHeight,i),s=Property.getValueOrDefault(t.extrudedHeightReference,i,HeightReference$1.NONE);defined(o)&&!defined(n)&&(n=0),r.rectangle=Property.getValueOrUndefined(t.coordinates,i,r.rectangle),r.granularity=Property.getValueOrUndefined(t.granularity,i),r.stRotation=Property.getValueOrUndefined(t.stRotation,i),r.rotation=Property.getValueOrUndefined(t.rotation,i),r.offsetAttribute=GroundGeometryUpdater.computeGeometryOffsetAttribute(n,a,o,s),r.height=GroundGeometryUpdater.getGeometryHeight(n,a),(o=GroundGeometryUpdater.getGeometryExtrudedHeight(o,s))===GroundGeometryUpdater.CLAMP_TO_GROUND&&(o=ApproximateTerrainHeights.getMinimumMaximumHeights(RectangleGeometry.computeRectangle(r,scratchRectangle$6)).minimumTerrainHeight),r.extrudedHeight=o};var colorScratch$2=new Color,distanceDisplayConditionScratch$1=new DistanceDisplayCondition,defaultDistanceDisplayCondition$1=new DistanceDisplayCondition,defaultOffset$8=Cartesian3.ZERO,offsetScratch$a=new Cartesian3;function Batch(e,t,i,r,n,a,o){var s;this.translucent=t,this.appearanceType=i,this.depthFailAppearanceType=r,this.depthFailMaterialProperty=n,this.depthFailMaterial=void 0,this.closed=a,this.shadows=o,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.updaters=new AssociativeArray,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray,this.itemsToRemove=[],this.invalidated=!1,defined(n)&&(s=n.definitionChanged.addEventListener(Batch.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=s}function StaticGeometryColorBatch(e,t,i,r,n){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=r,this._shadows=n}function removeItem(e,t){for(var i=e.length-1;0<=i;i--){var r=e[i];if(r.remove(t))return 0===r.updaters.length&&(e.splice(i,1),r.destroy()),1}}function moveItems(e,t,i){for(var r=!1,n=t.length,a=0;a<n;++a){var o=t[a],s=o.itemsToRemove,l=s.length;if(0<l)for(a=0;a<l;a++){var c=s[a];o.remove(c),e.add(i,c),r=!0}}return r}function updateItems(e,t,i,r){for(var n=t.length,a=n-1;0<=a;a--){var o=t[a];if(o.invalidated){t.splice(a,1);for(var s=o.updaters.values,l=s.length,c=0;c<l;c++)e.add(i,s[c]);o.destroy()}}for(n=t.length,a=0;a<n;++a)r=t[a].update(i)&&r;return r}function getBoundingSphere(e,t,i){for(var r=e.length,n=0;n<r;n++){var a=e[n];if(a.contains(t))return a.getBoundingSphere(t,i)}return BoundingSphereState$1.FAILED}function removeAllPrimitives(e){for(var t=e.length,i=0;i<t;i++)e[i].destroy();e.length=0}Batch.prototype.onMaterialChanged=function(){this.invalidated=!0},Batch.prototype.isMaterial=function(e){var t=this.depthFailMaterialProperty;return(e=e.depthFailMaterialProperty)===t||!!defined(t)&&t.equals(e)},Batch.prototype.add=function(e,t){var i,r=e.id;this.createPrimitive=!0,this.geometry.set(r,t),this.updaters.set(r,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&Property.isConstant(e.distanceDisplayConditionProperty)&&Property.isConstant(e.terrainOffsetProperty)?(i=this).subscriptions.set(r,e.entity.definitionChanged.addEventListener((function(t,r,n,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))):this.updatersWithAttributes.set(r,e)},Batch.prototype.remove=function(e){var t=e.id;return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0)},Batch.prototype.update=function(e){var t=!0,i=0,r=this.primitive,n=this.primitives;if(this.createPrimitive){var a,o=this.geometry.values;0<o.length?(defined(r)&&(defined(this.oldPrimitive)?n.remove(r):this.oldPrimitive=r),defined(this.depthFailAppearanceType)&&(defined(this.depthFailMaterialProperty)&&(this.depthFailMaterial=MaterialProperty.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),r=new Primitive({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:a,shadows:this.shadows}),n.add(r),t=!1):(defined(r)&&(n.remove(r),r=void 0),defined(a=this.oldPrimitive)&&(n.remove(a),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(defined(r)&&r.ready){r.show=!0,defined(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0),!defined(this.depthFailAppearanceType)||this.depthFailMaterialProperty instanceof ColorMaterialProperty||(this.depthFailMaterial=MaterialProperty.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);for(var s=this.updatersWithAttributes.values,l=s.length,c=this.waitingOnCreate,u=0;u<l;u++){var d=s[u],h=this.geometry.get(d.id),p=this.attributes.get(h.id.id);defined(p)||(p=r.getGeometryInstanceAttributes(h.id),this.attributes.set(h.id.id,p)),d.fillMaterialProperty.isConstant&&!c||(h=d.fillMaterialProperty.color,h=Property.getValueOrDefault(h,e,Color.WHITE,colorScratch$2),Color.equals(p._lastColor,h)||(p._lastColor=Color.clone(h,p._lastColor),p.color=ColorGeometryInstanceAttribute.toValue(h,p.color),(this.translucent&&255===p.color[3]||!this.translucent&&255!==p.color[3])&&(this.itemsToRemove[i++]=d))),defined(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof ColorMaterialProperty&&(!d.depthFailMaterialProperty.isConstant||c)&&(f=d.depthFailMaterialProperty.color,f=Property.getValueOrDefault(f,e,Color.WHITE,colorScratch$2),Color.equals(p._lastDepthFailColor,f)||(p._lastDepthFailColor=Color.clone(f,p._lastDepthFailColor),p.depthFailColor=ColorGeometryInstanceAttribute.toValue(f,p.depthFailColor)));var f=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e));f!==(1===p.show[0])&&(p.show=ShowGeometryInstanceAttribute.toValue(f,p.show)),f=d.distanceDisplayConditionProperty,Property.isConstant(f)||(f=Property.getValueOrDefault(f,e,defaultDistanceDisplayCondition$1,distanceDisplayConditionScratch$1),DistanceDisplayCondition.equals(f,p._lastDistanceDisplayCondition)||(p._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(f,p._lastDistanceDisplayCondition),p.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(f,p.distanceDisplayCondition))),d=d.terrainOffsetProperty,Property.isConstant(d)||(d=Property.getValueOrDefault(d,e,defaultOffset$8,offsetScratch$a),Cartesian3.equals(d,p._lastOffset)||(p._lastOffset=Cartesian3.clone(d,p._lastOffset),p.offset=OffsetGeometryInstanceAttribute.toValue(d,p.offset)))}this.updateShows(r),this.waitingOnCreate=!1}else defined(r)&&!r.ready&&(t=!1);return this.itemsToRemove.length=i,t},Batch.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n=t[r],a=this.geometry.get(n.id),o=this.attributes.get(a.id.id);defined(o)||(o=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,o)),(n=n.entity.isShowing)!==(1===o.show[0])&&(o.show=ShowGeometryInstanceAttribute.toValue(n,o.show),a.attributes.show.value[0]=o.show[0])}this.showsUpdated.removeAll()},Batch.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch.prototype.destroy=function(){var e=this.primitive,t=this.primitives;defined(e)&&t.remove(e),defined(e=this.oldPrimitive)&&t.remove(e),defined(this.removeMaterialSubscription)&&this.removeMaterialSubscription()},StaticGeometryColorBatch.prototype.add=function(e,t){for(var i,r=t.createFillGeometryInstance(e),n=(e=255===r.attributes.color.value[3]?(i=this._solidItems,!1):(i=this._translucentItems,!0),i.length),a=0;a<n;a++){var o=i[a];if(o.isMaterial(t))return void o.add(t,r)}(e=new Batch(this._primitives,e,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows)).add(t,r),i.push(e)},StaticGeometryColorBatch.prototype.remove=function(e){removeItem(this._solidItems,e)||removeItem(this._translucentItems,e)},StaticGeometryColorBatch.prototype.update=function(e){var t=updateItems(this,this._solidItems,e,!0),i=(t=updateItems(this,this._translucentItems,e,t)&&t,moveItems(this,this._solidItems,e)),r=moveItems(this,this._translucentItems,e);return(i||r)&&(t=updateItems(this,this._solidItems,e,t)&&t,t=updateItems(this,this._translucentItems,e,t)&&t),t},StaticGeometryColorBatch.prototype.getBoundingSphere=function(e,t){var i=getBoundingSphere(this._solidItems,e,t);return i===BoundingSphereState$1.FAILED?getBoundingSphere(this._translucentItems,e,t):i},StaticGeometryColorBatch.prototype.removeAllPrimitives=function(){removeAllPrimitives(this._solidItems),removeAllPrimitives(this._translucentItems)};var distanceDisplayConditionScratch$2=new DistanceDisplayCondition,defaultDistanceDisplayCondition$2=new DistanceDisplayCondition,defaultOffset$9=Cartesian3.ZERO,offsetScratch$b=new Cartesian3;function Batch$1(e,t,i,r,n,a,o){this.primitives=e,this.appearanceType=t,this.materialProperty=i,this.depthFailAppearanceType=r,this.depthFailMaterialProperty=n,this.closed=a,this.shadows=o,this.updaters=new AssociativeArray,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(Batch$1.prototype.onMaterialChanged,this),this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray}Batch$1.prototype.onMaterialChanged=function(){this.invalidated=!0},Batch$1.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty,r=this.depthFailMaterialProperty;e=e.depthFailMaterialProperty;return i===t&&e===r||(i=defined(t)&&t.equals(i),(!defined(r)&&!defined(e)||defined(r)&&r.equals(e))&&i)},Batch$1.prototype.add=function(e,t){var i,r=t.id;this.updaters.set(r,t),this.geometry.set(r,t.createFillGeometryInstance(e)),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&Property.isConstant(t.distanceDisplayConditionProperty)&&Property.isConstant(t.terrainOffsetProperty)?(i=this).subscriptions.set(r,t.entity.definitionChanged.addEventListener((function(e,r,n,a){"isShowing"===r&&i.showsUpdated.set(t.id,t)}))):this.updatersWithAttributes.set(r,t),this.createPrimitive=!0},Batch$1.prototype.remove=function(e){var t=e.id;return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0)};var colorScratch$3=new Color;function StaticGeometryPerMaterialBatch(e,t,i,r,n){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=r,this._shadows=n}Batch$1.prototype.update=function(e){var t,i=!0,r=this.primitive,n=this.primitives,a=this.geometry.values;if(this.createPrimitive)0<a.length?(defined(r)&&(defined(this.oldPrimitive)?n.remove(r):this.oldPrimitive=r),this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),defined(this.depthFailMaterialProperty)&&(this.depthFailMaterial=MaterialProperty.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),t=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),r=new Primitive({show:!1,asynchronous:!0,geometryInstances:a.slice(),appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:t,shadows:this.shadows}),n.add(r),i=!1):(defined(r)&&(n.remove(r),r=void 0),defined(t=this.oldPrimitive)&&(n.remove(t),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1;else if(defined(r)&&r.ready){r.show=!0,defined(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,!defined(this.depthFailAppearanceType)||this.depthFailMaterialProperty instanceof ColorMaterialProperty||(this.depthFailMaterial=MaterialProperty.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);for(var o=this.updatersWithAttributes.values,s=o.length,l=0;l<s;l++){var c=o[l],u=c.entity,d=this.geometry.get(c.id),h=this.attributes.get(d.id.id);defined(h)||(h=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),defined(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof ColorMaterialProperty&&!c.depthFailMaterialProperty.isConstant&&(d=c.depthFailMaterialProperty.color,d=Property.getValueOrDefault(d,e,Color.WHITE,colorScratch$3),Color.equals(h._lastDepthFailColor,d)||(h._lastDepthFailColor=Color.clone(d,h._lastDepthFailColor),h.depthFailColor=ColorGeometryInstanceAttribute.toValue(d,h.depthFailColor))),(u=u.isShowing&&(c.hasConstantFill||c.isFilled(e)))!==(1===h.show[0])&&(h.show=ShowGeometryInstanceAttribute.toValue(u,h.show)),u=c.distanceDisplayConditionProperty,Property.isConstant(u)||(u=Property.getValueOrDefault(u,e,defaultDistanceDisplayCondition$2,distanceDisplayConditionScratch$2),DistanceDisplayCondition.equals(u,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(u,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(u,h.distanceDisplayCondition))),c=c.terrainOffsetProperty,Property.isConstant(c)||(c=Property.getValueOrDefault(c,e,defaultOffset$9,offsetScratch$b),Cartesian3.equals(c,h._lastOffset)||(h._lastOffset=Cartesian3.clone(c,h._lastOffset),h.offset=OffsetGeometryInstanceAttribute.toValue(c,h.offset)))}this.updateShows(r)}else defined(r)&&!r.ready&&(i=!1);return i},Batch$1.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n,a=(n=t[r]).entity,o=this.geometry.get(n.id);defined(n=this.attributes.get(o.id.id))||(n=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,n)),(a=a.isShowing)!==(1===n.show[0])&&(n.show=ShowGeometryInstanceAttribute.toValue(a,n.show),o.attributes.show.value[0]=n.show[0])}this.showsUpdated.removeAll()},Batch$1.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$1.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch$1.prototype.destroy=function(){var e=this.primitive,t=this.primitives;defined(e)&&t.remove(e),defined(e=this.oldPrimitive)&&t.remove(e),this.removeMaterialSubscription()},StaticGeometryPerMaterialBatch.prototype.add=function(e,t){for(var i=this._items,r=i.length,n=0;n<r;n++){var a=i[n];if(a.isMaterial(t))return void a.add(e,t)}var o=new Batch$1(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),i.push(o)},StaticGeometryPerMaterialBatch.prototype.remove=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.remove(e)){0===r.updaters.length&&(t.splice(i,1),r.destroy());break}}},StaticGeometryPerMaterialBatch.prototype.update=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.invalidated){t.splice(i,1);for(var n=r.updaters.values,a=n.length,o=0;o<a;o++)this.add(e,n[o]);r.destroy()}}var s=!0;for(i=0;i<t.length;i++)s=t[i].update(e)&&s;return s},StaticGeometryPerMaterialBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._items,r=i.length,n=0;n<r;n++){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticGeometryPerMaterialBatch.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var colorScratch$4=new Color,distanceDisplayConditionScratch$3=new DistanceDisplayCondition,defaultDistanceDisplayCondition$3=new DistanceDisplayCondition;function Batch$2(e,t,i,r){this.primitives=e,this.zIndex=r,this.classificationType=t,this.color=i,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.updaters=new AssociativeArray,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new RectangleCollisionChecker}function StaticGroundGeometryColorBatch(e,t){this._batches=[],this._primitives=e,this._classificationType=t}Batch$2.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},Batch$2.prototype.add=function(e,t){var i,r=e.id;this.createPrimitive=!0,this.geometry.set(r,t),this.updaters.set(r,e),this.rectangleCollisionCheck.insert(r,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&Property.isConstant(e.distanceDisplayConditionProperty)?(i=this).subscriptions.set(r,e.entity.definitionChanged.addEventListener((function(t,r,n,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))):this.updatersWithAttributes.set(r,e)},Batch$2.prototype.remove=function(e){var t=e.id;e=this.geometry.get(t);return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.rectangleCollisionCheck.remove(t,e.geometry.rectangle),this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0)},Batch$2.prototype.update=function(e){var t=!0,i=this.primitive,r=this.primitives;if(this.createPrimitive){var n=this.geometry.values;0<n.length?(defined(i)&&(defined(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i),i=new GroundPrimitive({show:!1,asynchronous:!0,geometryInstances:n.slice(),classificationType:this.classificationType}),r.add(i,this.zIndex),t=!1):(defined(i)&&(r.remove(i),i=void 0),defined(n=this.oldPrimitive)&&(r.remove(n),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(defined(i)&&i.ready){i.show=!0,defined(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);for(var a=this.updatersWithAttributes.values,o=a.length,s=this.waitingOnCreate,l=0;l<o;l++){var c=a[l],u=this.geometry.get(c.id),d=this.attributes.get(u.id.id);defined(d)||(d=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,d)),c.fillMaterialProperty.isConstant&&!s||(h=c.fillMaterialProperty.color,h=Property.getValueOrDefault(h,e,Color.WHITE,colorScratch$4),Color.equals(d._lastColor,h)||(d._lastColor=Color.clone(h,d._lastColor),d.color=ColorGeometryInstanceAttribute.toValue(h,d.color)));var h=c.entity.isShowing&&(c.hasConstantFill||c.isFilled(e));h!==(1===d.show[0])&&(d.show=ShowGeometryInstanceAttribute.toValue(h,d.show)),c=c.distanceDisplayConditionProperty,Property.isConstant(c)||(c=Property.getValueOrDefault(c,e,defaultDistanceDisplayCondition$3,distanceDisplayConditionScratch$3),DistanceDisplayCondition.equals(c,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(c,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(c,d.distanceDisplayCondition)))}this.updateShows(i),this.waitingOnCreate=!1}else defined(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=0,t},Batch$2.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n=t[r],a=this.geometry.get(n.id),o=this.attributes.get(a.id.id);defined(o)||(o=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,o)),(n=n.entity.isShowing)!==(1===o.show[0])&&(o.show=ShowGeometryInstanceAttribute.toValue(n,o.show),a.attributes.show.value[0]=o.show[0])}this.showsUpdated.removeAll()},Batch$2.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$2.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?defined(e=i.getBoundingSphere(e.entity))?(e.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.FAILED:BoundingSphereState$1.PENDING},Batch$2.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;defined(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll()),defined(t=this.oldPrimitive)&&(e.remove(t),this.oldPrimitive=void 0)},StaticGroundGeometryColorBatch.prototype.add=function(e,t){for(var i,r=t.createFillGeometryInstance(e),n=this._batches,a=Property.getValueOrDefault(t.zIndex,0),o=n.length,s=0;s<o;++s){var l=n[s];if(l.zIndex===a&&!l.overlapping(r.geometry.rectangle)){i=l;break}}return defined(i)||(i=new Batch$2(this._primitives,this._classificationType,r.attributes.color.value,a),n.push(i)),i.add(t,r),i},StaticGroundGeometryColorBatch.prototype.remove=function(e){for(var t=this._batches,i=t.length,r=0;r<i;++r)if(t[r].remove(e))return},StaticGroundGeometryColorBatch.prototype.update=function(e){for(var t=!0,i=this._batches,r=i.length,n=0;n<r;++n)t=i[n].update(e)&&t;for(n=0;n<r;++n)for(var a=i[n],o=a.itemsToRemove,s=o.length,l=0;l<s;l++){c=o[l],a.remove(c);var c=this.add(e,c);a.isDirty=!0,c.isDirty=!0}for(n=r-1;0<=n;--n){var u=i[n];u.isDirty&&(t=i[n].update(e)&&t,u.isDirty=!1),0===u.geometry.length&&i.splice(n,1)}return t},StaticGroundGeometryColorBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._batches,r=i.length,n=0;n<r;++n){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticGroundGeometryColorBatch.prototype.removeAllPrimitives=function(){for(var e=this._batches,t=e.length,i=0;i<t;++i)e[i].removeAllPrimitives()};var distanceDisplayConditionScratch$4=new DistanceDisplayCondition,defaultDistanceDisplayCondition$4=new DistanceDisplayCondition;function Batch$3(e,t,i,r,n,a){this.primitives=e,this.classificationType=t,this.appearanceType=i,this.materialProperty=r,this.updaters=new AssociativeArray,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.material=void 0,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.invalidated=!1,this.removeMaterialSubscription=r.definitionChanged.addEventListener(Batch$3.prototype.onMaterialChanged,this),this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray,this.usingSphericalTextureCoordinates=n,this.zIndex=a,this.rectangleCollisionCheck=new RectangleCollisionChecker}function StaticGroundGeometryPerMaterialBatch(e,t,i){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=i}Batch$3.prototype.onMaterialChanged=function(){this.invalidated=!0},Batch$3.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},Batch$3.prototype.isMaterial=function(e){var t=this.materialProperty;return(e=e.fillMaterialProperty)===t||e instanceof ColorMaterialProperty&&t instanceof ColorMaterialProperty||defined(t)&&t.equals(e)},Batch$3.prototype.add=function(e,t,i){var r,n=t.id;this.updaters.set(n,t),this.geometry.set(n,i),this.rectangleCollisionCheck.insert(n,i.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&Property.isConstant(t.distanceDisplayConditionProperty)?(r=this).subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,a){"isShowing"===i&&r.showsUpdated.set(t.id,t)}))):this.updatersWithAttributes.set(n,t),this.createPrimitive=!0},Batch$3.prototype.remove=function(e){var t=e.id;e=this.geometry.get(t);return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.rectangleCollisionCheck.remove(t,e.geometry.rectangle),this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t)),!0)},Batch$3.prototype.update=function(e){var t=!0,i=this.primitive,r=this.primitives,n=this.geometry.values;if(this.createPrimitive)0<n.length?(defined(i)&&(defined(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i),this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),i=new GroundPrimitive({show:!1,asynchronous:!0,geometryInstances:n.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),r.add(i,this.zIndex),t=!1):(defined(i)&&(r.remove(i),i=void 0),defined(n=this.oldPrimitive)&&(r.remove(n),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1;else if(defined(i)&&i.ready){i.show=!0,defined(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;for(var a=this.updatersWithAttributes.values,o=a.length,s=0;s<o;s++){var l=a[s],c=l.entity,u=this.geometry.get(l.id),d=this.attributes.get(u.id.id);defined(d)||(d=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,d)),(c=c.isShowing&&(l.hasConstantFill||l.isFilled(e)))!==(1===d.show[0])&&(d.show=ShowGeometryInstanceAttribute.toValue(c,d.show)),l=l.distanceDisplayConditionProperty,Property.isConstant(l)||(l=Property.getValueOrDefault(l,e,defaultDistanceDisplayCondition$4,distanceDisplayConditionScratch$4),DistanceDisplayCondition.equals(l,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(l,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(l,d.distanceDisplayCondition)))}this.updateShows(i)}else defined(i)&&!i.ready&&(t=!1);return t},Batch$3.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n,a=(n=t[r]).entity,o=this.geometry.get(n.id);defined(n=this.attributes.get(o.id.id))||(n=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,n)),(a=a.isShowing)!==(1===n.show[0])&&(n.show=ShowGeometryInstanceAttribute.toValue(a,n.show),o.attributes.show.value[0]=n.show[0])}this.showsUpdated.removeAll()},Batch$3.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$3.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch$3.prototype.destroy=function(){var e=this.primitive,t=this.primitives;defined(e)&&t.remove(e),defined(e=this.oldPrimitive)&&t.remove(e),this.removeMaterialSubscription()},StaticGroundGeometryPerMaterialBatch.prototype.add=function(e,t){for(var i=this._items,r=i.length,n=t.createFillGeometryInstance(e),a=ShadowVolumeAppearance.shouldUseSphericalCoordinates(n.geometry.rectangle),o=Property.getValueOrDefault(t.zIndex,0),s=0;s<r;++s){var l=i[s];if(l.isMaterial(t)&&l.usingSphericalTextureCoordinates===a&&l.zIndex===o&&!l.overlapping(n.geometry.rectangle))return void l.add(e,t,n)}var c=new Batch$3(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,a,o);c.add(e,t,n),i.push(c)},StaticGroundGeometryPerMaterialBatch.prototype.remove=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.remove(e)){0===r.updaters.length&&(t.splice(i,1),r.destroy());break}}},StaticGroundGeometryPerMaterialBatch.prototype.update=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.invalidated){t.splice(i,1);for(var n=r.updaters.values,a=n.length,o=0;o<a;o++)this.add(e,n[o]);r.destroy()}}var s=!0;for(i=0;i<t.length;i++)s=t[i].update(e)&&s;return s},StaticGroundGeometryPerMaterialBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._items,r=i.length,n=0;n<r;n++){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticGroundGeometryPerMaterialBatch.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var colorScratch$5=new Color,distanceDisplayConditionScratch$5=new DistanceDisplayCondition,defaultDistanceDisplayCondition$5=new DistanceDisplayCondition,defaultOffset$a=Cartesian3.ZERO,offsetScratch$c=new Cartesian3;function Batch$4(e,t,i,r){this.translucent=t,this.width=i,this.shadows=r,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.updaters=new AssociativeArray,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.itemsToRemove=[],this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray}function StaticOutlineGeometryBatch(e,t,i){this._primitives=e,this._scene=t,this._shadows=i,this._solidBatches=new AssociativeArray,this._translucentBatches=new AssociativeArray}Batch$4.prototype.add=function(e,t){var i,r=e.id;this.createPrimitive=!0,this.geometry.set(r,t),this.updaters.set(r,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&Property.isConstant(e.distanceDisplayConditionProperty)&&Property.isConstant(e.terrainOffsetProperty)?(i=this).subscriptions.set(r,e.entity.definitionChanged.addEventListener((function(t,r,n,a){"isShowing"===r&&i.showsUpdated.set(e.id,e)}))):this.updatersWithAttributes.set(r,e)},Batch$4.prototype.remove=function(e){var t=e.id;return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0)},Batch$4.prototype.update=function(e){var t=!0,i=0,r=this.primitive,n=this.primitives;if(this.createPrimitive){var a=this.geometry.values;0<a.length?(defined(r)&&(defined(this.oldPrimitive)?n.remove(r):this.oldPrimitive=r),r=new Primitive({show:!1,asynchronous:!0,geometryInstances:a.slice(),appearance:new PerInstanceColorAppearance({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),n.add(r),t=!1):(defined(r)&&(n.remove(r),r=void 0),defined(a=this.oldPrimitive)&&(n.remove(a),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=r,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(defined(r)&&r.ready){r.show=!0,defined(this.oldPrimitive)&&(n.remove(this.oldPrimitive),this.oldPrimitive=void 0);for(var o=this.updatersWithAttributes.values,s=o.length,l=this.waitingOnCreate,c=0;c<s;c++){var u=o[c],d=this.geometry.get(u.id),h=this.attributes.get(d.id.id);defined(h)||(h=r.getGeometryInstanceAttributes(d.id),this.attributes.set(d.id.id,h)),u.outlineColorProperty.isConstant&&!l||(p=u.outlineColorProperty,p=Property.getValueOrDefault(p,e,Color.WHITE,colorScratch$5),Color.equals(h._lastColor,p)||(h._lastColor=Color.clone(p,h._lastColor),h.color=ColorGeometryInstanceAttribute.toValue(p,h.color),(this.translucent&&255===h.color[3]||!this.translucent&&255!==h.color[3])&&(this.itemsToRemove[i++]=u)));var p=u.entity.isShowing&&(u.hasConstantOutline||u.isOutlineVisible(e));p!==(1===h.show[0])&&(h.show=ShowGeometryInstanceAttribute.toValue(p,h.show)),p=u.distanceDisplayConditionProperty,Property.isConstant(p)||(p=Property.getValueOrDefault(p,e,defaultDistanceDisplayCondition$5,distanceDisplayConditionScratch$5),DistanceDisplayCondition.equals(p,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(p,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(p,h.distanceDisplayCondition))),u=u.terrainOffsetProperty,Property.isConstant(u)||(u=Property.getValueOrDefault(u,e,defaultOffset$a,offsetScratch$c),Cartesian3.equals(u,h._lastOffset)||(h._lastOffset=Cartesian3.clone(u,h._lastOffset),h.offset=OffsetGeometryInstanceAttribute.toValue(u,h.offset)))}this.updateShows(r),this.waitingOnCreate=!1}else defined(r)&&!r.ready&&(t=!1);return this.itemsToRemove.length=i,t},Batch$4.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n=t[r],a=this.geometry.get(n.id),o=this.attributes.get(a.id.id);defined(o)||(o=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,o)),(n=n.entity.isShowing)!==(1===o.show[0])&&(o.show=ShowGeometryInstanceAttribute.toValue(n,o.show),a.attributes.show.value[0]=o.show[0])}this.showsUpdated.removeAll()},Batch$4.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$4.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch$4.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;defined(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll()),defined(t=this.oldPrimitive)&&(e.remove(t),this.oldPrimitive=void 0)},StaticOutlineGeometryBatch.prototype.add=function(e,t){var i,r,n=t.createOutlineGeometryInstance(e);e=this._scene.clampLineWidth(t.outlineWidth);255===n.attributes.color.value[3]?defined(r=(i=this._solidBatches).get(e))||(r=new Batch$4(this._primitives,!1,e,this._shadows),i.set(e,r)):defined(r=(i=this._translucentBatches).get(e))||(r=new Batch$4(this._primitives,!0,e,this._shadows),i.set(e,r)),r.add(t,n)},StaticOutlineGeometryBatch.prototype.remove=function(e){for(var t=this._solidBatches.values,i=t.length,r=0;r<i;r++)if(t[r].remove(e))return;var n=this._translucentBatches.values,a=n.length;for(r=0;r<a;r++)if(n[r].remove(e))return},StaticOutlineGeometryBatch.prototype.update=function(e){var t,i,r,n,a,o=this._solidBatches.values,s=o.length,l=this._translucentBatches.values,c=l.length,u=!0,d=!1;do{for(d=!1,i=0;i<s;i++){u=(n=o[i]).update(e);var h=(a=n.itemsToRemove).length;if(0<h)for(d=!0,t=0;t<h;t++)r=a[t],n.remove(r),this.add(e,r)}for(i=0;i<c;i++){u=(n=l[i]).update(e);var p=(a=n.itemsToRemove).length;if(0<p)for(d=!0,t=0;t<p;t++)r=a[t],n.remove(r),this.add(e,r)}}while(d);return u},StaticOutlineGeometryBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._solidBatches.values,r=i.length,n=0;n<r;n++){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}var o=this._translucentBatches.values,s=o.length;for(n=0;n<s;n++){var l=o[n];if(l.contains(e))return l.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticOutlineGeometryBatch.prototype.removeAllPrimitives=function(){for(var e=this._solidBatches.values,t=e.length,i=0;i<t;i++)e[i].removeAllPrimitives();var r=this._translucentBatches.values,n=r.length;for(i=0;i<n;i++)r[i].removeAllPrimitives()};var scratchColor$h=new Color;function WallGeometryOptions(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function WallGeometryUpdater(e,t){GeometryUpdater.call(this,{entity:e,scene:t,geometryOptions:new WallGeometryOptions(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function DynamicWallGeometryUpdater(e,t,i){DynamicGeometryUpdater.call(this,e,t,i)}defined(Object.create)&&(WallGeometryUpdater.prototype=Object.create(GeometryUpdater.prototype),WallGeometryUpdater.prototype.constructor=WallGeometryUpdater),WallGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a=DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a),a=this._materialProperty instanceof ColorMaterialProperty?(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$h)),defined(t)||(t=Color.WHITE),{show:n,distanceDisplayCondition:a,color:ColorGeometryInstanceAttribute.fromColor(t)}):{show:n,distanceDisplayCondition:a};return new GeometryInstance({id:i,geometry:new WallGeometry(this._options),attributes:a})},WallGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),r=Property.getValueOrDefault(this._outlineColorProperty,e,Color.BLACK,scratchColor$h),n=this._distanceDisplayConditionProperty.getValue(e);return new GeometryInstance({id:t,geometry:new WallOutlineGeometry(this._options),attributes:{show:new ShowGeometryInstanceAttribute(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:ColorGeometryInstanceAttribute.fromColor(r),distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(n)}})},WallGeometryUpdater.prototype._isHidden=function(e,t){return!defined(t.positions)||GeometryUpdater.prototype._isHidden.call(this,e,t)},WallGeometryUpdater.prototype._getIsClosed=function(e){return!1},WallGeometryUpdater.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&Property.isConstant(t.minimumHeights)&&Property.isConstant(t.maximumHeights)&&Property.isConstant(t.outlineWidth)&&Property.isConstant(t.granularity))},WallGeometryUpdater.prototype._setStaticOptions=function(e,t){var i=t.minimumHeights,r=t.maximumHeights,n=t.granularity,a=this._materialProperty instanceof ColorMaterialProperty,o=this._options;o.vertexFormat=a?PerInstanceColorAppearance.VERTEX_FORMAT:MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat,o.positions=t.positions.getValue(Iso8601.MINIMUM_VALUE,o.positions),o.minimumHeights=defined(i)?i.getValue(Iso8601.MINIMUM_VALUE,o.minimumHeights):void 0,o.maximumHeights=defined(r)?r.getValue(Iso8601.MINIMUM_VALUE,o.maximumHeights):void 0,o.granularity=defined(n)?n.getValue(Iso8601.MINIMUM_VALUE):void 0},WallGeometryUpdater.DynamicGeometryUpdater=DynamicWallGeometryUpdater,defined(Object.create)&&(DynamicWallGeometryUpdater.prototype=Object.create(DynamicGeometryUpdater.prototype),DynamicWallGeometryUpdater.prototype.constructor=DynamicWallGeometryUpdater),DynamicWallGeometryUpdater.prototype._isHidden=function(e,t,i){return!defined(this._options.positions)||DynamicGeometryUpdater.prototype._isHidden.call(this,e,t,i)},DynamicWallGeometryUpdater.prototype._setOptions=function(e,t,i){var r=this._options;r.positions=Property.getValueOrUndefined(t.positions,i,r.positions),r.minimumHeights=Property.getValueOrUndefined(t.minimumHeights,i,r.minimumHeights),r.maximumHeights=Property.getValueOrUndefined(t.maximumHeights,i,r.maximumHeights),r.granularity=Property.getValueOrUndefined(t.granularity,i)};var emptyArray=[],geometryUpdaters=[BoxGeometryUpdater,CylinderGeometryUpdater,CorridorGeometryUpdater,EllipseGeometryUpdater,EllipsoidGeometryUpdater,PlaneGeometryUpdater,PolygonGeometryUpdater,PolylineVolumeGeometryUpdater,RectangleGeometryUpdater,WallGeometryUpdater];function GeometryUpdaterSet(e,t){this.entity=e,this.scene=t;var i=new Array(geometryUpdaters.length),r=new Event;function n(e){r.raiseEvent(e)}for(var a=new EventHelper,o=0;o<i.length;o++){var s=new geometryUpdaters[o](e,t);a.add(s.geometryChanged,n),i[o]=s}this.updaters=i,this.geometryChanged=r,this.eventHelper=a,this._removeEntitySubscription=e.definitionChanged.addEventListener(GeometryUpdaterSet.prototype._onEntityPropertyChanged,this)}function GeometryVisualizer(e,t,i,r){i=defaultValue(i,e.primitives),r=defaultValue(r,e.groundPrimitives),this._scene=e,this._primitives=i,this._groundPrimitives=r,this._entityCollection=void 0,this._addedObjects=new AssociativeArray,this._removedObjects=new AssociativeArray,this._changedObjects=new AssociativeArray;var n=ShadowMode$1.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*n),this._closedColorBatches=new Array(2*n),this._closedMaterialBatches=new Array(2*n),this._openColorBatches=new Array(2*n),this._openMaterialBatches=new Array(2*n);var a,o=Entity.supportsMaterialsforEntitiesOnTerrain(e);for(this._supportsMaterialsforEntitiesOnTerrain=o,a=0;a<n;++a)this._outlineBatches[a]=new StaticOutlineGeometryBatch(i,e,a,!1),this._outlineBatches[n+a]=new StaticOutlineGeometryBatch(i,e,a,!0),this._closedColorBatches[a]=new StaticGeometryColorBatch(i,PerInstanceColorAppearance,void 0,!0,a,!0),this._closedColorBatches[n+a]=new StaticGeometryColorBatch(i,PerInstanceColorAppearance,void 0,!0,a,!1),this._closedMaterialBatches[a]=new StaticGeometryPerMaterialBatch(i,MaterialAppearance,void 0,!0,a,!0),this._closedMaterialBatches[n+a]=new StaticGeometryPerMaterialBatch(i,MaterialAppearance,void 0,!0,a,!1),this._openColorBatches[a]=new StaticGeometryColorBatch(i,PerInstanceColorAppearance,void 0,!1,a,!0),this._openColorBatches[n+a]=new StaticGeometryColorBatch(i,PerInstanceColorAppearance,void 0,!1,a,!1),this._openMaterialBatches[a]=new StaticGeometryPerMaterialBatch(i,MaterialAppearance,void 0,!1,a,!0),this._openMaterialBatches[n+a]=new StaticGeometryPerMaterialBatch(i,MaterialAppearance,void 0,!1,a,!1);var s=ClassificationType$1.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(s),c=[];if(o)for(a=0;a<s;++a)c.push(new StaticGroundGeometryPerMaterialBatch(r,a,MaterialAppearance)),l[a]=new StaticGroundGeometryColorBatch(r,a);else for(a=0;a<s;++a)l[a]=new StaticGroundGeometryColorBatch(r,a);this._groundColorBatches=l,this._groundMaterialBatches=c,this._dynamicBatch=new DynamicGeometryBatch(i,r),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new AssociativeArray,this._updaterSets=new AssociativeArray,(this._entityCollection=t).collectionChanged.addEventListener(GeometryVisualizer.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,emptyArray)}GeometryUpdaterSet.prototype._onEntityPropertyChanged=function(e,t,i,r){for(var n=this.updaters,a=0;a<n.length;a++)n[a]._onEntityPropertyChanged(e,t,i,r)},GeometryUpdaterSet.prototype.forEach=function(e){for(var t=this.updaters,i=0;i<t.length;i++)e(t[i])},GeometryUpdaterSet.prototype.destroy=function(){this.eventHelper.removeAll();for(var e=this.updaters,t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),destroyObject(this)},GeometryVisualizer.prototype.update=function(e){for(var t,i,r,n=this._addedObjects,a=n.values,o=this._removedObjects,s=o.values,l=this._changedObjects,c=l.values,u=this,d=c.length-1;-1<d;d--)i=(t=c[d]).id,(r=this._updaterSets.get(i)).entity===t?r.forEach((function(t){u._removeUpdater(t),u._insertUpdaterIntoBatch(e,t)})):(s.push(t),a.push(t));for(d=s.length-1;-1<d;d--)i=(t=s[d]).id,(r=this._updaterSets.get(i)).forEach(this._removeUpdater.bind(this)),r.destroy(),this._updaterSets.remove(i),this._subscriptions.get(i)(),this._subscriptions.remove(i);for(d=a.length-1;-1<d;d--)i=(t=a[d]).id,r=new GeometryUpdaterSet(t,this._scene),this._updaterSets.set(i,r),r.forEach((function(t){u._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(i,r.geometryChanged.addEventListener(GeometryVisualizer._onGeometryChanged,this));n.removeAll(),o.removeAll(),l.removeAll();var h=!0,p=this._batches,f=p.length;for(d=0;d<f;d++)h=p[d].update(e)&&h;return h};var getBoundingSphereArrayScratch=[],getBoundingSphereBoundingSphereScratch=new BoundingSphere;GeometryVisualizer.prototype.getBoundingSphere=function(e,t){for(var i=getBoundingSphereArrayScratch,r=getBoundingSphereBoundingSphereScratch,n=0,a=BoundingSphereState$1.DONE,o=this._batches,s=o.length,l=(e=e.id,this._updaterSets.get(e).updaters),c=0;c<l.length;c++)for(var u=l[c],d=0;d<s;d++){if((a=o[d].getBoundingSphere(u,r))===BoundingSphereState$1.PENDING)return BoundingSphereState$1.PENDING;a===BoundingSphereState$1.DONE&&(i[n]=BoundingSphere.clone(r,i[n]),n++)}return 0===n?BoundingSphereState$1.FAILED:(i.length=n,BoundingSphere.fromBoundingSpheres(i,t),BoundingSphereState$1.DONE)},GeometryVisualizer.prototype.isDestroyed=function(){return!1},GeometryVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(GeometryVisualizer.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();for(var e=this._batches,t=e.length,i=0;i<t;i++)e[i].removeAllPrimitives();var r=this._subscriptions.values;t=r.length;for(i=0;i<t;i++)r[i]();this._subscriptions.removeAll();var n=this._updaterSets.values;for(t=n.length,i=0;i<t;i++)n[i].destroy();return this._updaterSets.removeAll(),destroyObject(this)},GeometryVisualizer.prototype._removeUpdater=function(e){for(var t=this._batches,i=t.length,r=0;r<i;r++)t[r].remove(e)},GeometryVisualizer.prototype._insertUpdaterIntoBatch=function(e,t){var i,r,n;t.isDynamic?this._dynamicBatch.add(e,t):((t.outlineEnabled||t.fillEnabled)&&(i=t.shadowsProperty.getValue(e)),r=ShadowMode$1.NUMBER_OF_SHADOW_MODES,t.outlineEnabled&&(defined(t.terrainOffsetProperty)?this._outlineBatches[r+i]:this._outlineBatches[i]).add(e,t),t.fillEnabled&&(t.onTerrain?(n=t.classificationTypeProperty.getValue(e),(t.fillMaterialProperty instanceof ColorMaterialProperty?this._groundColorBatches:this._groundMaterialBatches)[n].add(e,t)):(t.isClosed?t.fillMaterialProperty instanceof ColorMaterialProperty?defined(t.terrainOffsetProperty)?this._closedColorBatches[r+i]:this._closedColorBatches[i]:defined(t.terrainOffsetProperty)?this._closedMaterialBatches[r+i]:this._closedMaterialBatches[i]:t.fillMaterialProperty instanceof ColorMaterialProperty?defined(t.terrainOffsetProperty)?this._openColorBatches[r+i]:this._openColorBatches[i]:defined(t.terrainOffsetProperty)?this._openMaterialBatches[r+i]:this._openMaterialBatches[i]).add(e,t)))},GeometryVisualizer._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,r=e.entity;e=r.id;defined(t.get(e))||defined(i.get(e))||i.set(e,r)},GeometryVisualizer.prototype._onCollectionChanged=function(e,t,i){for(var r,n,a=this._addedObjects,o=this._removedObjects,s=this._changedObjects,l=i.length-1;-1<l;l--)r=(n=i[l]).id,a.remove(r)||(o.set(r,n),s.remove(r));for(l=t.length-1;-1<l;l--)r=(n=t[l]).id,(o.remove(r)?s:a).set(r,n)};var defaultScale$2=1,defaultFont="30px sans-serif",defaultStyle=LabelStyle$1.FILL,defaultFillColor=Color.WHITE,defaultOutlineColor$2=Color.BLACK,defaultOutlineWidth$1=1,defaultShowBackground=!1,defaultBackgroundColor$1=new Color(.165,.165,.165,.8),defaultBackgroundPadding$1=new Cartesian2(7,5),defaultPixelOffset$1=Cartesian2.ZERO,defaultEyeOffset$1=Cartesian3.ZERO,defaultHeightReference$1=HeightReference$1.NONE,defaultHorizontalOrigin$1=HorizontalOrigin$1.CENTER,defaultVerticalOrigin$1=VerticalOrigin$1.CENTER,positionScratch$a=new Cartesian3,fillColorScratch=new Color,outlineColorScratch=new Color,backgroundColorScratch=new Color,backgroundPaddingScratch=new Cartesian2,eyeOffsetScratch$1=new Cartesian3,pixelOffsetScratch$1=new Cartesian2,translucencyByDistanceScratch$1=new NearFarScalar,pixelOffsetScaleByDistanceScratch$1=new NearFarScalar,scaleByDistanceScratch$1=new NearFarScalar,distanceDisplayConditionScratch$6=new DistanceDisplayCondition;function EntityData$1(e){this.entity=e,this.label=void 0,this.index=void 0}function LabelVisualizer(e,t){t.collectionChanged.addEventListener(LabelVisualizer.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function returnPrimitive$1(e,t,i){defined(e)&&(e.label=void 0,i.removeLabel(t))}LabelVisualizer.prototype.update=function(e){for(var t=this._items.values,i=this._cluster,r=0,n=t.length;r<n;r++){var a,o,s,l=t[r],c=l.entity,u=c._label,d=l.label,h=c.isShowing&&c.isAvailable(e)&&Property.getValueOrDefault(u._show,e,!0);h&&(o=Property.getValueOrUndefined(c._position,e,positionScratch$a),a=Property.getValueOrUndefined(u._text,e),h=defined(o)&&defined(a)),h?(Property.isConstant(c._position)||(i._clusterDirty=!0),s=!1,h=Property.getValueOrDefault(u._heightReference,e,defaultHeightReference$1),defined(d)||((d=i.getLabel(c)).id=c,l.label=d,s=Cartesian3.equals(d.position,o)&&d.heightReference===h),d.show=!0,d.position=o,d.text=a,d.scale=Property.getValueOrDefault(u._scale,e,defaultScale$2),d.font=Property.getValueOrDefault(u._font,e,defaultFont),d.style=Property.getValueOrDefault(u._style,e,defaultStyle),d.fillColor=Property.getValueOrDefault(u._fillColor,e,defaultFillColor,fillColorScratch),d.outlineColor=Property.getValueOrDefault(u._outlineColor,e,defaultOutlineColor$2,outlineColorScratch),d.outlineWidth=Property.getValueOrDefault(u._outlineWidth,e,defaultOutlineWidth$1),d.showBackground=Property.getValueOrDefault(u._showBackground,e,defaultShowBackground),d.backgroundColor=Property.getValueOrDefault(u._backgroundColor,e,defaultBackgroundColor$1,backgroundColorScratch),d.backgroundPadding=Property.getValueOrDefault(u._backgroundPadding,e,defaultBackgroundPadding$1,backgroundPaddingScratch),d.pixelOffset=Property.getValueOrDefault(u._pixelOffset,e,defaultPixelOffset$1,pixelOffsetScratch$1),d.eyeOffset=Property.getValueOrDefault(u._eyeOffset,e,defaultEyeOffset$1,eyeOffsetScratch$1),d.heightReference=h,d.horizontalOrigin=Property.getValueOrDefault(u._horizontalOrigin,e,defaultHorizontalOrigin$1),d.verticalOrigin=Property.getValueOrDefault(u._verticalOrigin,e,defaultVerticalOrigin$1),d.translucencyByDistance=Property.getValueOrUndefined(u._translucencyByDistance,e,translucencyByDistanceScratch$1),d.pixelOffsetScaleByDistance=Property.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,pixelOffsetScaleByDistanceScratch$1),d.scaleByDistance=Property.getValueOrUndefined(u._scaleByDistance,e,scaleByDistanceScratch$1),d.distanceDisplayCondition=Property.getValueOrUndefined(u._distanceDisplayCondition,e,distanceDisplayConditionScratch$6),d.disableDepthTestDistance=Property.getValueOrUndefined(u._disableDepthTestDistance,e),s&&d._updateClamping()):returnPrimitive$1(l,c,i)}return!0},LabelVisualizer.prototype.getBoundingSphere=function(e,t){return defined(e=this._items.get(e.id))&&defined(e.label)?(e=e.label,t.center=Cartesian3.clone(defaultValue(e._clampedPosition,e.position),t.center),t.radius=0,BoundingSphereState$1.DONE):BoundingSphereState$1.FAILED},LabelVisualizer.prototype.isDestroyed=function(){return!1},LabelVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(LabelVisualizer.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return destroyObject(this)},LabelVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._items,o=this._cluster,s=t.length-1;-1<s;s--)defined((n=t[s])._label)&&defined(n._position)&&a.set(n.id,new EntityData$1(n));for(s=r.length-1;-1<s;s--)defined((n=r[s])._label)&&defined(n._position)?a.contains(n.id)||a.set(n.id,new EntityData$1(n)):(returnPrimitive$1(a.get(n.id),n,o),a.remove(n.id));for(s=i.length-1;-1<s;s--)n=i[s],returnPrimitive$1(a.get(n.id),n,o),a.remove(n.id)};var defaultScale$3=1,defaultMinimumPixelSize=0,defaultIncrementallyLoadTextures=!0,defaultClampAnimations=!0,defaultShadows$1=ShadowMode$1.ENABLED,defaultHeightReference$2=HeightReference$1.NONE,defaultSilhouetteColor=Color.RED,defaultSilhouetteSize=0,defaultColor$6=Color.WHITE,defaultColorBlendMode=ColorBlendMode$1.HIGHLIGHT,defaultColorBlendAmount=.5,defaultImageBasedLightingFactor=new Cartesian2(1,1),modelMatrixScratch$1=new Matrix4,nodeMatrixScratch=new Matrix4;function ModelVisualizer(e,t){t.collectionChanged.addEventListener(ModelVisualizer.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function removeModel(e,t,i,r){var n=i[t.id];defined(n)&&(r.removeAndDestroy(n.modelPrimitive),delete i[t.id])}function clearNodeTransformationsArticulationsScratch(e,t){defined(e=t[e.id])&&(e.nodeTransformationsScratch={},e.articulationsScratch={})}function checkModelLoad(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}function ScaledPositionProperty(e){this._definitionChanged=new Event,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}ModelVisualizer.prototype.update=function(e){for(var t=this._entitiesToVisualize.values,i=this._modelHash,r=this._primitives,n=0,a=t.length;n<a;n++){var o,s,l=t[n],c=l._model,u=i[l.id],d=l.isShowing&&l.isAvailable(e)&&Property.getValueOrDefault(c._show,e,!0);if(d&&(s=l.computeModelMatrix(e,modelMatrixScratch$1),o=Resource.createIfNeeded(Property.getValueOrUndefined(c._uri,e)),d=defined(s)&&defined(o)),d){var h=defined(u)?u.modelPrimitive:void 0;if(defined(h)&&o.url===u.url||(defined(h)&&(r.removeAndDestroy(h),delete i[l.id]),(h=Model.fromGltf({url:o,incrementallyLoadTextures:Property.getValueOrDefault(c._incrementallyLoadTextures,e,defaultIncrementallyLoadTextures),scene:this._scene})).id=l,r.add(h),u={modelPrimitive:h,url:o.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFail:!1},i[l.id]=u,checkModelLoad(h,l,i)),h.show=!0,h.scale=Property.getValueOrDefault(c._scale,e,defaultScale$3),h.minimumPixelSize=Property.getValueOrDefault(c._minimumPixelSize,e,defaultMinimumPixelSize),h.maximumScale=Property.getValueOrUndefined(c._maximumScale,e),h.modelMatrix=Matrix4.clone(s,h.modelMatrix),h.shadows=Property.getValueOrDefault(c._shadows,e,defaultShadows$1),h.heightReference=Property.getValueOrDefault(c._heightReference,e,defaultHeightReference$2),h.distanceDisplayCondition=Property.getValueOrUndefined(c._distanceDisplayCondition,e),h.silhouetteColor=Property.getValueOrDefault(c._silhouetteColor,e,defaultSilhouetteColor,h._silhouetteColor),h.silhouetteSize=Property.getValueOrDefault(c._silhouetteSize,e,defaultSilhouetteSize),h.color=Property.getValueOrDefault(c._color,e,defaultColor$6,h._color),h.colorBlendMode=Property.getValueOrDefault(c._colorBlendMode,e,defaultColorBlendMode),h.colorBlendAmount=Property.getValueOrDefault(c._colorBlendAmount,e,defaultColorBlendAmount),h.clippingPlanes=Property.getValueOrUndefined(c._clippingPlanes,e),h.clampAnimations=Property.getValueOrDefault(c._clampAnimations,e,defaultClampAnimations),h.imageBasedLightingFactor=Property.getValueOrDefault(c._imageBasedLightingFactor,e,defaultImageBasedLightingFactor),h.lightColor=Property.getValueOrUndefined(c._lightColor,e),h.ready){l=Property.getValueOrDefault(c._runAnimations,e,!0),u.animationsRunning!==l&&(l?h.activeAnimations.addAll({loop:ModelAnimationLoop$1.REPEAT}):h.activeAnimations.removeAll(),u.animationsRunning=l);var p=Property.getValueOrUndefined(c._nodeTransformations,e,u.nodeTransformationsScratch);if(defined(p))for(var f=Object.keys(p),m=0,g=f.length;m<g;++m){var y=f[m],_=p[y];defined(_)&&defined(y=h.getNode(y))&&(_=Matrix4.fromTranslationRotationScale(_,nodeMatrixScratch),y.matrix=Matrix4.multiply(y.originalMatrix,_,_))}var v=!1,C=Property.getValueOrUndefined(c._articulations,e,u.articulationsScratch);if(defined(C))for(var x=Object.keys(C),b=0,S=x.length;b<S;++b){var T=x[b],E=C[T];defined(E)&&(v=!0,h.setArticulationStage(T,E))}v&&h.applyArticulations()}}else defined(u)&&(u.modelPrimitive.show=!1)}return!0},ModelVisualizer.prototype.isDestroyed=function(){return!1},ModelVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ModelVisualizer.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,r=e.length-1;-1<r;r--)removeModel(this,e[r],t,i);return destroyObject(this)},ModelVisualizer.prototype.getBoundingSphere=function(e,t){if(!defined(e=this._modelHash[e.id])||e.loadFail)return BoundingSphereState$1.FAILED;if(!defined(e=e.modelPrimitive)||!e.show)return BoundingSphereState$1.FAILED;if(!e.ready)return BoundingSphereState$1.PENDING;if(e.heightReference===HeightReference$1.NONE)BoundingSphere.transform(e.boundingSphere,e.modelMatrix,t);else{if(!defined(e._clampedModelMatrix))return BoundingSphereState$1.PENDING;BoundingSphere.transform(e.boundingSphere,e._clampedModelMatrix,t)}return BoundingSphereState$1.DONE},ModelVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._entitiesToVisualize,o=this._modelHash,s=this._primitives,l=t.length-1;-1<l;l--)defined((n=t[l])._model)&&defined(n._position)&&a.set(n.id,n);for(l=r.length-1;-1<l;l--)defined((n=r[l])._model)&&defined(n._position)?(clearNodeTransformationsArticulationsScratch(n,o),a.set(n.id,n)):(removeModel(this,n,o,s),a.remove(n.id));for(l=i.length-1;-1<l;l--)removeModel(this,n=i[l],o,s),a.remove(n.id)},Object.defineProperties(ScaledPositionProperty.prototype,{isConstant:{get:function(){return Property.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return defined(this._value)?this._value.referenceFrame:ReferenceFrame$1.FIXED}}}),ScaledPositionProperty.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,ReferenceFrame$1.FIXED,t)},ScaledPositionProperty.prototype.setValue=function(e){this._value!==e&&(this._value=e,defined(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),defined(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},ScaledPositionProperty.prototype.getValueInReferenceFrame=function(e,t,i){if(defined(this._value))return defined(i=this._value.getValueInReferenceFrame(e,t,i))?Ellipsoid.WGS84.scaleToGeodeticSurface(i,i):void 0},ScaledPositionProperty.prototype.equals=function(e){return this===e||e instanceof ScaledPositionProperty&&this._value===e._value},ScaledPositionProperty.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var defaultResolution=60,defaultWidth=1,scratchTimeInterval$1=new TimeInterval,subSampleCompositePropertyScratch=new TimeInterval,subSampleIntervalPropertyScratch=new TimeInterval;function EntityData$2(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function subSampleSampledProperty(e,t,i,r,n,a,o,s,l){var c=s,u=e.getValueInReferenceFrame(t,a,l[c]);defined(u)&&(l[c++]=u);for(var d,h,p,f,m=!defined(n)||JulianDate.lessThanOrEquals(n,t)||JulianDate.greaterThanOrEquals(n,i),g=0,y=r.length,_=r[g],v=i,C=!1;g<y;)!m&&JulianDate.greaterThanOrEquals(_,n)&&(defined(u=e.getValueInReferenceFrame(n,a,l[c]))&&(l[c++]=u),m=!0),JulianDate.greaterThan(_,t)&&JulianDate.lessThan(_,v)&&!_.equals(n)&&defined(u=e.getValueInReferenceFrame(_,a,l[c]))&&(l[c++]=u),g<y-1&&(0<o&&!C&&(f=r[g+1],(C=o<(f=JulianDate.secondsDifference(f,_)))&&(d=Math.ceil(f/o),h=0,p=f/Math.max(d,2),d=Math.max(d-1,1))),C&&h<d)?(_=JulianDate.addSeconds(_,p,new JulianDate),h++):(C=!1,_=r[++g]);return defined(u=e.getValueInReferenceFrame(i,a,l[c]))&&(l[c++]=u),c}function subSampleGenericProperty(e,t,i,r,n,a,o,s){for(var l,c=0,u=o,d=t,h=Math.max(a,60),p=!defined(r)||JulianDate.lessThanOrEquals(r,t)||JulianDate.greaterThanOrEquals(r,i);JulianDate.lessThan(d,i);)!p&&JulianDate.greaterThanOrEquals(d,r)&&(p=!0,defined(l=e.getValueInReferenceFrame(r,n,s[u]))&&(s[u]=l,u++)),defined(l=e.getValueInReferenceFrame(d,n,s[u]))&&(s[u]=l,u++),c++,d=JulianDate.addSeconds(t,h*c,new JulianDate);return defined(l=e.getValueInReferenceFrame(i,n,s[u]))&&(s[u]=l,u++),u}function subSampleIntervalProperty(e,t,i,r,n,a,o,s){subSampleIntervalPropertyScratch.start=t,subSampleIntervalPropertyScratch.stop=i;for(var l=o,c=e.intervals,u=0;u<c.length;u++){var d,h=c.get(u);TimeInterval.intersect(h,subSampleIntervalPropertyScratch,scratchTimeInterval$1).isEmpty||(d=h.start,h.isStartIncluded||(d=h.isStopIncluded?h.stop:JulianDate.addSeconds(h.start,JulianDate.secondsDifference(h.stop,h.start)/2,new JulianDate)),defined(d=e.getValueInReferenceFrame(d,n,s[l]))&&(s[l]=d,l++))}return l}function subSampleConstantProperty(e,t,i,r,n,a,o,s){return defined(n=e.getValueInReferenceFrame(t,n,s[o]))&&(s[o++]=n),o}function subSampleCompositeProperty(e,t,i,r,n,a,o,s){subSampleCompositePropertyScratch.start=t,subSampleCompositePropertyScratch.stop=i;for(var l=o,c=e.intervals,u=0;u<c.length;u++){var d,h,p,f=c.get(u);TimeInterval.intersect(f,subSampleCompositePropertyScratch,scratchTimeInterval$1).isEmpty||(p=f.start,d=f.stop,h=t,JulianDate.greaterThan(p,h)&&(h=p),p=i,JulianDate.lessThan(d,p)&&(p=d),l=reallySubSample(f.data,h,p,r,n,a,l,s))}return l}function reallySubSample(e,t,i,r,n,a,o,s){for(;e instanceof ReferenceProperty;)e=e.resolvedProperty;return e instanceof SampledPositionProperty?subSampleSampledProperty(e,t,i,e._property._times,r,n,a,o,s):(e instanceof CompositePositionProperty?subSampleCompositeProperty:e instanceof TimeIntervalCollectionPositionProperty?subSampleIntervalProperty:e instanceof ConstantPositionProperty||e instanceof ScaledPositionProperty&&Property.isConstant(e)?subSampleConstantProperty:subSampleGenericProperty)(e,t,i,r,n,a,o,s)}function subSample(e,t,i,r,n,a,o){return defined(o)||(o=[]),a=reallySubSample(e,t,i,r,n,a,0,o),o.length=a,o}var toFixedScratch=new Matrix3;function PolylineUpdater(e,t){this._unusedIndexes=[],this._polylineCollection=new PolylineCollection,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function PathVisualizer(e,t){t.collectionChanged.addEventListener(PathVisualizer.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}PolylineUpdater.prototype.update=function(e){var t;this._referenceFrame===ReferenceFrame$1.INERTIAL&&(defined(t=Transforms.computeIcrfToFixedMatrix(e,toFixedScratch))||(t=Transforms.computeTemeToPseudoFixedMatrix(e,toFixedScratch)),Matrix4.fromRotationTranslation(t,Cartesian3.ZERO,this._polylineCollection.modelMatrix))},PolylineUpdater.prototype.updateObject=function(e,t){var i,r,n,a,o,s,l,c=t.entity,u=c._path,d=c._position,h=u._show,p=t.polyline,f=c.isShowing&&(!defined(h)||h.getValue(e));f&&(n=Property.getValueOrUndefined(u._leadTime,e),a=Property.getValueOrUndefined(u._trailTime,e),s=defined(l=c._availability),o=defined(n),h=defined(a),(f=s||o&&h)&&(h&&(i=JulianDate.addSeconds(e,-a,new JulianDate)),o&&(r=JulianDate.addSeconds(e,n,new JulianDate)),s&&(s=l.start,l=l.stop,h&&!JulianDate.greaterThan(s,i)||(i=s),o&&!JulianDate.lessThan(l,r)||(r=l)),f=JulianDate.lessThan(i,r))),f?(defined(p)||(0<(f=this._unusedIndexes).length?(f=f.pop(),p=this._polylineCollection.get(f),t.index=f):(t.index=this._polylineCollection.length,p=this._polylineCollection.add()),p.id=c,t.polyline=p),c=Property.getValueOrDefault(u._resolution,e,defaultResolution),p.show=!0,p.positions=subSample(d,i,r,e,this._referenceFrame,c,p.positions.slice()),p.material=MaterialProperty.getValue(e,u._material,p.material),p.width=Property.getValueOrDefault(u._width,e,defaultWidth),p.distanceDisplayCondition=Property.getValueOrUndefined(u._distanceDisplayCondition,e,p.distanceDisplayCondition)):defined(p)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,p.show=!1,t.index=void 0)},PolylineUpdater.prototype.removeObject=function(e){var t=e.polyline;defined(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},PolylineUpdater.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),destroyObject(this)},PathVisualizer.prototype.update=function(e){var t,i=this._updaters;for(t in i)i.hasOwnProperty(t)&&i[t].update(e);var r=this._items.values;if(0===r.length&&defined(this._updaters)&&0<Object.keys(this._updaters).length){for(var n in i)i.hasOwnProperty(n)&&i[n].destroy();this._updaters={}}for(var a=0,o=r.length;a<o;a++){var s=r[a],l=s.entity._position,c=s.updater,u=ReferenceFrame$1.FIXED;this._scene.mode===SceneMode$1.SCENE3D&&(u=l.referenceFrame),c===(l=this._updaters[u])&&defined(l)?l.updateObject(e,s):(defined(c)&&c.removeObject(s),defined(l)||((l=new PolylineUpdater(this._scene,u)).update(e),this._updaters[u]=l),defined(s.updater=l)&&l.updateObject(e,s))}return!0},PathVisualizer.prototype.isDestroyed=function(){return!1},PathVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(PathVisualizer.prototype._onCollectionChanged,this);var e,t=this._updaters;for(e in t)t.hasOwnProperty(e)&&t[e].destroy();return destroyObject(this)},PathVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a,o=this._items,s=t.length-1;-1<s;s--)defined((n=t[s])._path)&&defined(n._position)&&o.set(n.id,new EntityData$2(n));for(s=r.length-1;-1<s;s--)defined((n=r[s])._path)&&defined(n._position)?o.contains(n.id)||o.set(n.id,new EntityData$2(n)):defined(a=o.get(n.id))&&(defined(a.updater)&&a.updater.removeObject(a),o.remove(n.id));for(s=i.length-1;-1<s;s--)n=i[s],defined(a=o.get(n.id))&&(defined(a.updater)&&a.updater.removeObject(a),o.remove(n.id))},PathVisualizer._subSample=subSample;var defaultColor$7=Color.WHITE,defaultOutlineColor$3=Color.BLACK,defaultOutlineWidth$2=0,defaultPixelSize=1,defaultDisableDepthTestDistance=0,colorScratch$6=new Color,positionScratch$b=new Cartesian3,outlineColorScratch$1=new Color,scaleByDistanceScratch$2=new NearFarScalar,translucencyByDistanceScratch$2=new NearFarScalar,distanceDisplayConditionScratch$7=new DistanceDisplayCondition;function EntityData$3(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function PointVisualizer(e,t){t.collectionChanged.addEventListener(PointVisualizer.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new AssociativeArray,this._onCollectionChanged(t,t.values,[],[])}function returnPrimitive$2(e,t,i){if(defined(e)){if(defined(e.pointPrimitive))return e.pointPrimitive=void 0,void i.removePoint(t);defined(e.billboard)&&(e.billboard=void 0,i.removeBillboard(t))}}PointVisualizer.prototype.update=function(e){for(var t=this._items.values,i=this._cluster,r=0,n=t.length;r<n;r++){var a,o,s,l,c,u=t[r],d=u.entity,h=d._point,p=u.pointPrimitive,f=u.billboard,m=Property.getValueOrDefault(h._heightReference,e,HeightReference$1.NONE);d.isShowing&&d.isAvailable(e)&&Property.getValueOrDefault(h._show,e,!0)&&defined(a=Property.getValueOrUndefined(d._position,e,positionScratch$b))?(Property.isConstant(d._position)||(i._clusterDirty=!0),o=c=!1,m===HeightReference$1.NONE||defined(f)?m!==HeightReference$1.NONE||defined(p)||(defined(f)&&(returnPrimitive$2(u,d,i),f=void 0),(p=i.getPoint(d)).id=d,u.pointPrimitive=p):(defined(p)&&(returnPrimitive$2(u,d,i),p=void 0),(f=i.getBillboard(d)).id=d,f.image=void 0,u.billboard=f,c=!0,o=Cartesian3.equals(f.position,a)&&f.heightReference===m),defined(p)?(p.show=!0,p.position=a,p.scaleByDistance=Property.getValueOrUndefined(h._scaleByDistance,e,scaleByDistanceScratch$2),p.translucencyByDistance=Property.getValueOrUndefined(h._translucencyByDistance,e,translucencyByDistanceScratch$2),p.color=Property.getValueOrDefault(h._color,e,defaultColor$7,colorScratch$6),p.outlineColor=Property.getValueOrDefault(h._outlineColor,e,defaultOutlineColor$3,outlineColorScratch$1),p.outlineWidth=Property.getValueOrDefault(h._outlineWidth,e,defaultOutlineWidth$2),p.pixelSize=Property.getValueOrDefault(h._pixelSize,e,defaultPixelSize),p.distanceDisplayCondition=Property.getValueOrUndefined(h._distanceDisplayCondition,e,distanceDisplayConditionScratch$7),p.disableDepthTestDistance=Property.getValueOrDefault(h._disableDepthTestDistance,e,defaultDisableDepthTestDistance)):defined(f)&&(f.show=!0,f.position=a,f.scaleByDistance=Property.getValueOrUndefined(h._scaleByDistance,e,scaleByDistanceScratch$2),f.translucencyByDistance=Property.getValueOrUndefined(h._translucencyByDistance,e,translucencyByDistanceScratch$2),f.distanceDisplayCondition=Property.getValueOrUndefined(h._distanceDisplayCondition,e,distanceDisplayConditionScratch$7),f.disableDepthTestDistance=Property.getValueOrDefault(h._disableDepthTestDistance,e,defaultDisableDepthTestDistance),f.heightReference=m,s=Property.getValueOrDefault(h._color,e,defaultColor$7,colorScratch$6),l=Property.getValueOrDefault(h._outlineColor,e,defaultOutlineColor$3,outlineColorScratch$1),p=Math.round(Property.getValueOrDefault(h._outlineWidth,e,defaultOutlineWidth$2)),m=Math.max(1,Math.round(Property.getValueOrDefault(h._pixelSize,e,defaultPixelSize))),(c=0<p?(f.scale=1,c||p!==u.outlineWidth||m!==u.pixelSize||!Color.equals(s,u.color)||!Color.equals(l,u.outlineColor)):(f.scale=m/50,m=50,c||p!==u.outlineWidth||!Color.equals(s,u.color)||!Color.equals(l,u.outlineColor)))&&(u.color=Color.clone(s,u.color),u.outlineColor=Color.clone(l,u.outlineColor),u.pixelSize=m,u.outlineWidth=p,h=s.alpha,c=s.toCssColorString(),s=l.toCssColorString(),l=JSON.stringify([c,m,s,p]),f.setImage(l,createBillboardPointCallback(h,c,s,p,m))),o&&f._updateClamping())):returnPrimitive$2(u,d,i)}return!0},PointVisualizer.prototype.getBoundingSphere=function(e,t){if(!defined(e=this._items.get(e.id))||!defined(e.pointPrimitive)&&!defined(e.billboard))return BoundingSphereState$1.FAILED;if(defined(e.pointPrimitive))t.center=Cartesian3.clone(e.pointPrimitive.position,t.center);else{if(!defined((e=e.billboard)._clampedPosition))return BoundingSphereState$1.PENDING;t.center=Cartesian3.clone(e._clampedPosition,t.center)}return t.radius=0,BoundingSphereState$1.DONE},PointVisualizer.prototype.isDestroyed=function(){return!1},PointVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(PointVisualizer.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return destroyObject(this)},PointVisualizer.prototype._onCollectionChanged=function(e,t,i,r){for(var n,a=this._items,o=this._cluster,s=t.length-1;-1<s;s--)defined((n=t[s])._point)&&defined(n._position)&&a.set(n.id,new EntityData$3(n));for(s=r.length-1;-1<s;s--)defined((n=r[s])._point)&&defined(n._position)?a.contains(n.id)||a.set(n.id,new EntityData$3(n)):(returnPrimitive$2(a.get(n.id),n,o),a.remove(n.id));for(s=i.length-1;-1<s;s--)n=i[s],returnPrimitive$2(a.get(n.id),n,o),a.remove(n.id)};var defaultZIndex$1=new ConstantProperty(0),polylineCollections={},scratchColor$i=new Color,defaultMaterial$2=new ColorMaterialProperty(Color.WHITE),defaultShow$1=new ConstantProperty(!0),defaultShadows$2=new ConstantProperty(ShadowMode$1.DISABLED),defaultDistanceDisplayCondition$6=new ConstantProperty(new DistanceDisplayCondition),defaultClassificationType$1=new ConstantProperty(ClassificationType$1.BOTH);function GeometryOptions(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function GroundGeometryOptions(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function PolylineGeometryUpdater(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(PolylineGeometryUpdater.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new Event,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new GeometryOptions,this._groundGeometryOptions=new GroundGeometryOptions,this._id="polyline-"+e.id,this._clampToGround=!1,this._supportsPolylinesOnTerrain=Entity.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(PolylineGeometryUpdater.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!defined(this._entity.availability)&&Property.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),PolylineGeometryUpdater.prototype.isOutlineVisible=function(e){return!1},PolylineGeometryUpdater.prototype.isFilled=function(e){var t=this._entity;return defaultValue(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e),!1)},PolylineGeometryUpdater.prototype.createFillGeometryInstance=function(e){var t,i=this._entity,r=i.isAvailable(e),n=new ShowGeometryInstanceAttribute(r&&i.isShowing&&this._showProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e);a={show:n,distanceDisplayCondition:DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(a)};return this._materialProperty instanceof ColorMaterialProperty&&(defined(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(t=this._materialProperty.color.getValue(e,scratchColor$i)),defined(t)||(t=Color.WHITE),a.color=ColorGeometryInstanceAttribute.fromColor(t)),this.clampToGround?new GeometryInstance({id:i,geometry:new GroundPolylineGeometry(this._groundGeometryOptions),attributes:a}):(defined(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof ColorMaterialProperty&&(defined(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||r)&&(t=this._depthFailMaterialProperty.color.getValue(e,scratchColor$i)),defined(t)||(t=Color.WHITE),a.depthFailColor=ColorGeometryInstanceAttribute.fromColor(t)),new GeometryInstance({id:i,geometry:new PolylineGeometry(this._geometryOptions),attributes:a}))},PolylineGeometryUpdater.prototype.createOutlineGeometryInstance=function(e){},PolylineGeometryUpdater.prototype.isDestroyed=function(){return!1},PolylineGeometryUpdater.prototype.destroy=function(){this._entitySubscription(),destroyObject(this)},PolylineGeometryUpdater.prototype._onEntityPropertyChanged=function(e,t,i,r){if("availability"===t||"polyline"===t){var n=this._entity.polyline;if(defined(n)){var a=n.positions;if(defined(u=n.show)&&u.isConstant&&!u.getValue(Iso8601.MINIMUM_VALUE)||!defined(a))this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));else{var o=n.zIndex,s=(c=defaultValue(n.material,defaultMaterial$2))instanceof ColorMaterialProperty;this._materialProperty=c,this._depthFailMaterialProperty=n.depthFailMaterial,this._showProperty=defaultValue(u,defaultShow$1),this._shadowsProperty=defaultValue(n.shadows,defaultShadows$2),this._distanceDisplayConditionProperty=defaultValue(n.distanceDisplayCondition,defaultDistanceDisplayCondition$6),this._classificationTypeProperty=defaultValue(n.classificationType,defaultClassificationType$1),this._fillEnabled=!0,this._zIndex=defaultValue(o,defaultZIndex$1);var l=n.width,c=(t=n.arcType,n.clampToGround),u=n.granularity;if(a.isConstant&&Property.isConstant(l)&&Property.isConstant(t)&&Property.isConstant(u)&&Property.isConstant(c)&&Property.isConstant(o)){if(n=this._geometryOptions,!defined(a=a.getValue(Iso8601.MINIMUM_VALUE,n.positions))||a.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));s=(s&&(!defined(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof ColorMaterialProperty)?PolylineColorAppearance:PolylineMaterialAppearance).VERTEX_FORMAT,n.vertexFormat=s,n.positions=a,n.width=defined(l)?l.getValue(Iso8601.MINIMUM_VALUE):void 0,n.arcType=defined(t)?t.getValue(Iso8601.MINIMUM_VALUE):void 0,n.granularity=defined(u)?u.getValue(Iso8601.MINIMUM_VALUE):void 0,(u=this._groundGeometryOptions).positions=a,u.width=n.width,u.arcType=n.arcType,u.granularity=n.granularity,this._clampToGround=!!defined(c)&&c.getValue(Iso8601.MINIMUM_VALUE),!this._clampToGround&&defined(o)&&oneTimeWarning("Entity polylines must have clampToGround: true when using zIndex.  zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}}else this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this))}},PolylineGeometryUpdater.prototype.createDynamicUpdater=function(e,t){return new DynamicGeometryUpdater$1(e,t,this)};var generateCartesianArcOptions={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function DynamicGeometryUpdater$1(e,t,i){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=i,this._positions=[]}function getLine(e){if(defined(e._line))return e._line;var t=e._geometryUpdater._scene.id,i=polylineCollections[t],r=e._primitives;return!defined(i)||i.isDestroyed()?(i=new PolylineCollection,polylineCollections[t]=i,r.add(i)):r.contains(i)||r.add(i),(i=i.add()).id=e._geometryUpdater._entity,e._line=i}DynamicGeometryUpdater$1.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,r=i.polyline,n=r.positions,a=Property.getValueOrUndefined(n,e,this._positions);t._clampToGround=Property.getValueOrDefault(r._clampToGround,e,!1),t._groundGeometryOptions.positions=a,t._groundGeometryOptions.width=Property.getValueOrDefault(r._width,e,1),t._groundGeometryOptions.arcType=Property.getValueOrDefault(r._arcType,e,ArcType$1.GEODESIC),t._groundGeometryOptions.granularity=Property.getValueOrDefault(r._granularity,e,9999);var o=this._groundPrimitives;if(defined(this._groundPolylinePrimitive)&&(o.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!i.isShowing||!i.isAvailable(e)||!Property.getValueOrDefault(r._show,e,!0))return;if(!defined(a)||a.length<2)return;return(n=t.fillMaterialProperty)instanceof ColorMaterialProperty?s=new PolylineColorAppearance:(s=new PolylineMaterialAppearance({material:n=MaterialProperty.getValue(e,n,this._material),translucent:n.isTranslucent()}),this._material=n),this._groundPolylinePrimitive=o.add(new GroundPolylinePrimitive({geometryInstances:t.createFillGeometryInstance(e),appearance:s,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),Property.getValueOrUndefined(t.zIndex,e)),void(defined(this._line)&&(this._line.show=!1))}var s;o=getLine(this);i.isShowing&&i.isAvailable(e)&&Property.getValueOrDefault(r._show,e,!0)&&defined(a)&&!(a.length<2)?(s=ArcType$1.GEODESIC,s=Property.getValueOrDefault(r._arcType,e,s),i=t._scene.globe,s!==ArcType$1.NONE&&defined(i)&&(generateCartesianArcOptions.ellipsoid=i.ellipsoid,generateCartesianArcOptions.positions=a,generateCartesianArcOptions.granularity=Property.getValueOrUndefined(r._granularity,e),generateCartesianArcOptions.height=PolylinePipeline.extractHeights(a,i.ellipsoid),a=s===ArcType$1.GEODESIC?PolylinePipeline.generateCartesianArc(generateCartesianArcOptions):PolylinePipeline.generateCartesianRhumbArc(generateCartesianArcOptions)),o.show=!0,o.positions=a.slice(),o.material=MaterialProperty.getValue(e,t.fillMaterialProperty,o.material),o.width=Property.getValueOrDefault(r._width,e,1),o.distanceDisplayCondition=Property.getValueOrUndefined(r._distanceDisplayCondition,e,o.distanceDisplayCondition)):o.show=!1},DynamicGeometryUpdater$1.prototype.getBoundingSphere=function(e){if(this._geometryUpdater.clampToGround){var t=this._groundPolylinePrimitive;if(defined(t)&&t.show&&t.ready){var i=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(defined(i)&&defined(i.boundingSphere))return BoundingSphere.clone(i.boundingSphere,e),BoundingSphereState$1.DONE}return defined(t)&&!t.ready?BoundingSphereState$1.PENDING:BoundingSphereState$1.DONE}return(t=getLine(this)).show&&0<t.positions.length?(BoundingSphere.fromPoints(t.positions,e),BoundingSphereState$1.DONE):BoundingSphereState$1.FAILED},DynamicGeometryUpdater$1.prototype.isDestroyed=function(){return!1},DynamicGeometryUpdater$1.prototype.destroy=function(){var e=this._geometryUpdater._scene.id,t=polylineCollections[e];defined(t)&&(t.remove(this._line),0===t.length&&(this._primitives.removeAndDestroy(t),delete polylineCollections[e])),defined(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),destroyObject(this)};var scratchColor$j=new Color,distanceDisplayConditionScratch$8=new DistanceDisplayCondition,defaultDistanceDisplayCondition$7=new DistanceDisplayCondition;function Batch$5(e,t,i,r,n){var a=i instanceof ColorMaterialProperty?PolylineColorAppearance:PolylineMaterialAppearance;this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=a,this.materialProperty=i,this.updaters=new AssociativeArray,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new AssociativeArray,this.material=void 0,this.updatersWithAttributes=new AssociativeArray,this.attributes=new AssociativeArray,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(Batch$5.prototype.onMaterialChanged,this),this.subscriptions=new AssociativeArray,this.showsUpdated=new AssociativeArray,this.zIndex=r,this._asynchronous=n}function StaticGroundPolylinePerMaterialBatch(e,t,i){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=defaultValue(i,!0)}Batch$5.prototype.onMaterialChanged=function(){this.invalidated=!0},Batch$5.prototype.isMaterial=function(e){var t=this.materialProperty;return(e=e.fillMaterialProperty)===t||e instanceof ColorMaterialProperty&&t instanceof ColorMaterialProperty||defined(t)&&t.equals(e)},Batch$5.prototype.add=function(e,t,i){var r,n=t.id;this.updaters.set(n,t),this.geometry.set(n,i),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&Property.isConstant(t.distanceDisplayConditionProperty)?(r=this).subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,a){"isShowing"===i&&r.showsUpdated.set(t.id,t)}))):this.updatersWithAttributes.set(n,t),this.createPrimitive=!0},Batch$5.prototype.remove=function(e){var t=e.id;return this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,!!this.updaters.remove(t)&&(this.updatersWithAttributes.remove(t),defined(e=this.subscriptions.get(t))&&(e(),this.subscriptions.remove(t)),!0)},Batch$5.prototype.update=function(e){var t=!0,i=this.primitive,r=this.orderedGroundPrimitives,n=this.geometry.values;if(this.createPrimitive)0<n.length?(defined(i)&&(defined(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i),i=new GroundPolylinePrimitive({show:!1,asynchronous:this._asynchronous,geometryInstances:n.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===PolylineMaterialAppearance&&(this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),i.appearance.material=this.material),r.add(i,this.zIndex),t=!1):(defined(i)&&(r.remove(i),i=void 0),defined(n=this.oldPrimitive)&&(r.remove(n),this.oldPrimitive=void 0)),this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1;else if(defined(i)&&i.ready){i.show=!0,defined(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===PolylineMaterialAppearance&&(this.material=MaterialProperty.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);for(var a=this.updatersWithAttributes.values,o=a.length,s=0;s<o;s++){var l=a[s],c=l.entity,u=this.geometry.get(l.id),d=this.attributes.get(u.id.id);defined(d)||(d=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,d)),l.fillMaterialProperty.isConstant||(u=l.fillMaterialProperty.color,u=Property.getValueOrDefault(u,e,Color.WHITE,scratchColor$j),Color.equals(d._lastColor,u)||(d._lastColor=Color.clone(u,d._lastColor),d.color=ColorGeometryInstanceAttribute.toValue(u,d.color))),(c=c.isShowing&&(l.hasConstantFill||l.isFilled(e)))!==(1===d.show[0])&&(d.show=ShowGeometryInstanceAttribute.toValue(c,d.show)),l=l.distanceDisplayConditionProperty,Property.isConstant(l)||(l=Property.getValueOrDefault(l,e,defaultDistanceDisplayCondition$7,distanceDisplayConditionScratch$8),DistanceDisplayCondition.equals(l,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=DistanceDisplayCondition.clone(l,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=DistanceDisplayConditionGeometryInstanceAttribute.toValue(l,d.distanceDisplayCondition)))}this.updateShows(i)}else defined(i)&&!i.ready&&(t=!1);return t},Batch$5.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var n,a=(n=t[r]).entity,o=this.geometry.get(n.id);defined(n=this.attributes.get(o.id.id))||(n=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,n)),(a=a.isShowing)!==(1===n.show[0])&&(n.show=ShowGeometryInstanceAttribute.toValue(a,n.show),o.attributes.show.value[0]=n.show[0])}this.showsUpdated.removeAll()},Batch$5.prototype.contains=function(e){return this.updaters.contains(e.id)},Batch$5.prototype.getBoundingSphere=function(e,t){var i=this.primitive;return i.ready?!defined(e=i.getGeometryInstanceAttributes(e.entity))||!defined(e.boundingSphere)||defined(e.show)&&0===e.show[0]?BoundingSphereState$1.FAILED:(e.boundingSphere.clone(t),BoundingSphereState$1.DONE):BoundingSphereState$1.PENDING},Batch$5.prototype.destroy=function(){var e=this.primitive,t=this.orderedGroundPrimitives;defined(e)&&t.remove(e),defined(e=this.oldPrimitive)&&t.remove(e),this.removeMaterialSubscription()},StaticGroundPolylinePerMaterialBatch.prototype.add=function(e,t){for(var i=this._items,r=i.length,n=t.createFillGeometryInstance(e),a=Property.getValueOrDefault(t.zIndex,0),o=0;o<r;++o){var s=i[o];if(s.isMaterial(t)&&s.zIndex===a)return void s.add(e,t,n)}var l=new Batch$5(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,a,this._asynchronous);l.add(e,t,n),i.push(l)},StaticGroundPolylinePerMaterialBatch.prototype.remove=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.remove(e)){0===r.updaters.length&&(t.splice(i,1),r.destroy());break}}},StaticGroundPolylinePerMaterialBatch.prototype.update=function(e){for(var t=this._items,i=t.length-1;0<=i;i--){var r=t[i];if(r.invalidated){t.splice(i,1);for(var n=r.updaters.values,a=n.length,o=0;o<a;o++)this.add(e,n[o]);r.destroy()}}var s=!0;for(i=0;i<t.length;i++)s=t[i].update(e)&&s;return s},StaticGroundPolylinePerMaterialBatch.prototype.getBoundingSphere=function(e,t){for(var i=this._items,r=i.length,n=0;n<r;n++){var a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return BoundingSphereState$1.FAILED},StaticGroundPolylinePerMaterialBatch.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0};var emptyArray$1=[];function removeUpdater(e,t){for(var i=e._batches,r=i.length,n=0;n<r;n++)i[n].remove(t)}function insertUpdaterIntoBatch(e,t,i){var r,n,a;i.isDynamic?e._dynamicBatch.add(t,i):i.clampToGround&&i.fillEnabled?(n=i.classificationTypeProperty.getValue(t),e._groundBatches[n].add(t,i)):(i.fillEnabled&&(r=i.shadowsProperty.getValue(t)),n=0,defined(i.depthFailMaterialProperty)&&(n=i.depthFailMaterialProperty instanceof ColorMaterialProperty?1:2),defined(r)&&(a=r+n*ShadowMode$1.NUMBER_OF_SHADOW_MODES),i.fillEnabled&&(i.fillMaterialProperty instanceof ColorMaterialProperty?e._colorBatches:e._materialBatches)[a].add(t,i))}function PolylineVisualizer(e,t,i,r){var n;r=defaultValue(r,e.groundPrimitives),i=defaultValue(i,e.primitives),this._scene=e,this._primitives=i,this._entityCollection=void 0,this._addedObjects=new AssociativeArray,this._removedObjects=new AssociativeArray,this._changedObjects=new AssociativeArray;var a=ShadowMode$1.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*a),this._materialBatches=new Array(3*a),n=0;n<a;++n)this._colorBatches[n]=new StaticGeometryColorBatch(i,PolylineColorAppearance,void 0,!1,n),this._materialBatches[n]=new StaticGeometryPerMaterialBatch(i,PolylineMaterialAppearance,void 0,!1,n),this._colorBatches[n+a]=new StaticGeometryColorBatch(i,PolylineColorAppearance,PolylineColorAppearance,!1,n),this._materialBatches[n+a]=new StaticGeometryPerMaterialBatch(i,PolylineMaterialAppearance,PolylineColorAppearance,!1,n),this._colorBatches[n+2*a]=new StaticGeometryColorBatch(i,PolylineColorAppearance,PolylineMaterialAppearance,!1,n),this._materialBatches[n+2*a]=new StaticGeometryPerMaterialBatch(i,PolylineMaterialAppearance,PolylineMaterialAppearance,!1,n);this._dynamicBatch=new DynamicGeometryBatch(i,r);var o=ClassificationType$1.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(o),n=0;n<o;++n)this._groundBatches[n]=new StaticGroundPolylinePerMaterialBatch(r,n);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new AssociativeArray,this._updaters=new AssociativeArray,(this._entityCollection=t).collectionChanged.addEventListener(PolylineVisualizer.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,emptyArray$1)}PolylineVisualizer.prototype.update=function(e){for(var t,i,r,n=this._addedObjects,a=n.values,o=this._removedObjects,s=o.values,l=this._changedObjects,c=l.values,u=c.length-1;-1<u;u--)i=(t=c[u]).id,(r=this._updaters.get(i)).entity===t?(removeUpdater(this,r),insertUpdaterIntoBatch(this,e,r)):(s.push(t),a.push(t));for(u=s.length-1;-1<u;u--)i=(t=s[u]).id,removeUpdater(this,r=this._updaters.get(i)),r.destroy(),this._updaters.remove(i),this._subscriptions.get(i)(),this._subscriptions.remove(i);for(u=a.length-1;-1<u;u--)i=(t=a[u]).id,r=new PolylineGeometryUpdater(t,this._scene),this._updaters.set(i,r),insertUpdaterIntoBatch(this,e,r),this._subscriptions.set(i,r.geometryChanged.addEventListener(PolylineVisualizer._onGeometryChanged,this));n.removeAll(),o.removeAll(),l.removeAll();var d=!0,h=this._batches,p=h.length;for(u=0;u<p;u++)d=h[u].update(e)&&d;return d};var getBoundingSphereArrayScratch$1=[],getBoundingSphereBoundingSphereScratch$1=new BoundingSphere;function DataSourceDisplay(e){GroundPrimitive.initializeTerrainHeights(),GroundPolylinePrimitive.initializeTerrainHeights();var t=e.scene,i=e.dataSourceCollection;this._eventHelper=new EventHelper,this._eventHelper.add(i.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(i.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(i.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=i,this._scene=t,this._visualizersCallback=defaultValue(e.visualizersCallback,DataSourceDisplay.defaultVisualizersCallback);var r=!1,n=new PrimitiveCollection,a=new PrimitiveCollection;0<i.length&&(t.primitives.add(n),t.groundPrimitives.add(a),r=!0),this._primitives=n,this._groundPrimitives=a;for(var o=0,s=i.length;o<s;o++)this._onDataSourceAdded(i,i.get(o));var l,c,u;e=new CustomDataSource;this._onDataSourceAdded(void 0,e),this._defaultDataSource=e,r||(l=this,r=function(){t.primitives.add(n),t.groundPrimitives.add(a),c(),u(),l._removeDefaultDataSourceListener=void 0,l._removeDataSourceCollectionListener=void 0},c=e.entities.collectionChanged.addEventListener(r),u=i.dataSourceAdded.addEventListener(r)),this._removeDefaultDataSourceListener=c,this._removeDataSourceCollectionListener=u,this._ready=!1}PolylineVisualizer.prototype.getBoundingSphere=function(e,t){for(var i=getBoundingSphereArrayScratch$1,r=getBoundingSphereBoundingSphereScratch$1,n=0,a=BoundingSphereState$1.DONE,o=this._batches,s=o.length,l=this._updaters.get(e.id),c=0;c<s;c++){if((a=o[c].getBoundingSphere(l,r))===BoundingSphereState$1.PENDING)return BoundingSphereState$1.PENDING;a===BoundingSphereState$1.DONE&&(i[n]=BoundingSphere.clone(r,i[n]),n++)}return 0===n?BoundingSphereState$1.FAILED:(i.length=n,BoundingSphere.fromBoundingSpheres(i,t),BoundingSphereState$1.DONE)},PolylineVisualizer.prototype.isDestroyed=function(){return!1},PolylineVisualizer.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(PolylineVisualizer.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();for(var e=this._batches,t=e.length,i=0;i<t;i++)e[i].removeAllPrimitives();var r=this._subscriptions.values;t=r.length;for(i=0;i<t;i++)r[i]();return this._subscriptions.removeAll(),destroyObject(this)},PolylineVisualizer._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,r=e.entity;e=r.id;defined(t.get(e))||defined(i.get(e))||i.set(e,r)},PolylineVisualizer.prototype._onCollectionChanged=function(e,t,i){for(var r,n,a=this._addedObjects,o=this._removedObjects,s=this._changedObjects,l=i.length-1;-1<l;l--)r=(n=i[l]).id,a.remove(r)||(o.set(r,n),s.remove(r));for(l=t.length-1;-1<l;l--)r=(n=t[l]).id,(o.remove(r)?s:a).set(r,n)},DataSourceDisplay.defaultVisualizersCallback=function(e,t,i){var r=i.entities;return[new BillboardVisualizer(t,r),new GeometryVisualizer(e,r,i._primitives,i._groundPrimitives),new LabelVisualizer(t,r),new ModelVisualizer(e,r),new Cesium3DTilesetVisualizer(e,r),new PointVisualizer(t,r),new PathVisualizer(e,r),new PolylineVisualizer(e,r,i._primitives,i._groundPrimitives)]},Object.defineProperties(DataSourceDisplay.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}}),DataSourceDisplay.prototype.isDestroyed=function(){return!1},DataSourceDisplay.prototype.destroy=function(){this._eventHelper.removeAll();for(var e=this._dataSourceCollection,t=0,i=e.length;t<i;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),defined(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),destroyObject(this)},DataSourceDisplay.prototype.update=function(e){if(!ApproximateTerrainHeights.initialized)return this._ready=!1;for(var t,i,r,n=!0,a=this._dataSourceCollection,o=a.length,s=0;s<o;s++){var l=a.get(s);for(defined(l.update)&&(n=l.update(e)&&n),r=(i=l._visualizers).length,t=0;t<r;t++)n=i[t].update(e)&&n}for(r=(i=this._defaultDataSource._visualizers).length,t=0;t<r;t++)n=i[t].update(e)&&n;return this._ready=n},DataSourceDisplay.prototype._postRender=function(){for(var e=this._scene.frameState,t=this._dataSourceCollection,i=t.length,r=0;r<i;r++){var n=t.get(r),a=n.credit;defined(a)&&e.creditDisplay.addCredit(a);var o=n._resourceCredits;if(defined(o))for(var s=o.length,l=0;l<s;l++)e.creditDisplay.addCredit(o[l])}};var getBoundingSphereArrayScratch$2=[],getBoundingSphereBoundingSphereScratch$2=new BoundingSphere;DataSourceDisplay.prototype.getBoundingSphere=function(e,t,i){if(!this._ready)return BoundingSphereState$1.PENDING;var r=this._defaultDataSource;if(!r.entities.contains(e)){r=void 0;for(var n=this._dataSourceCollection,a=n.length,o=0;o<a;o++){var s=n.get(o);if(s.entities.contains(e)){r=s;break}}}if(!defined(r))return BoundingSphereState$1.FAILED;var l=getBoundingSphereArrayScratch$2,c=getBoundingSphereBoundingSphereScratch$2,u=0,d=BoundingSphereState$1.DONE,h=r._visualizers,p=h.length;for(o=0;o<p;o++)if(defined(h[o].getBoundingSphere)){if(d=h[o].getBoundingSphere(e,c),!t&&d===BoundingSphereState$1.PENDING)return BoundingSphereState$1.PENDING;d===BoundingSphereState$1.DONE&&(l[u]=BoundingSphere.clone(c,l[u]),u++)}return 0===u?BoundingSphereState$1.FAILED:(l.length=u,BoundingSphere.fromBoundingSpheres(l,i),BoundingSphereState$1.DONE)},DataSourceDisplay.prototype._onDataSourceAdded=function(e,t){var i=this._scene,r=this._primitives,n=this._groundPrimitives;r=r.add(new PrimitiveCollection),n=n.add(new OrderedGroundPrimitiveCollection);t._primitives=r,t._groundPrimitives=n,(n=t.clustering)._initialize(i),r.add(n),t._visualizers=this._visualizersCallback(i,n,t)},DataSourceDisplay.prototype._onDataSourceRemoved=function(e,t){var i=this._primitives,r=this._groundPrimitives,n=t._primitives,a=t._groundPrimitives,o=t.clustering;n.remove(o);for(var s=t._visualizers,l=s.length,c=0;c<l;c++)s[c].destroy();i.remove(n),r.remove(a),t._visualizers=void 0},DataSourceDisplay.prototype._onDataSourceMoved=function(e,t,i){var r=this._primitives,n=this._groundPrimitives,a=e._primitives;e=e._groundPrimitives;t===i+1?(r.raise(a),n.raise(e)):t===i-1?(r.lower(a),n.lower(e)):0===t?(r.lowerToBottom(a),n.lowerToBottom(e),r.raise(a),n.raise(e)):(r.raiseToTop(a),n.raiseToTop(e))};var updateTransformMatrix3Scratch1=new Matrix3,updateTransformMatrix3Scratch2=new Matrix3,updateTransformMatrix3Scratch3=new Matrix3,updateTransformMatrix4Scratch=new Matrix4,updateTransformCartesian3Scratch1=new Cartesian3,updateTransformCartesian3Scratch2=new Cartesian3,updateTransformCartesian3Scratch3=new Cartesian3,updateTransformCartesian3Scratch4=new Cartesian3,updateTransformCartesian3Scratch5=new Cartesian3,updateTransformCartesian3Scratch6=new Cartesian3,deltaTime=new JulianDate,northUpAxisFactor=1.25;function updateTransform(e,t,i,r,n,a,o){var s,l,c,u,d,h,p,f,m,g,y,_,v=e.scene.mode,C=n.getValue(a,e._lastCartesian);defined(C)&&(l=s=!1,v===SceneMode$1.SCENE3D&&(JulianDate.addSeconds(a,.001,deltaTime),defined(h=n.getValue(deltaTime,updateTransformCartesian3Scratch1))||(JulianDate.addSeconds(a,-.001,deltaTime),h=n.getValue(deltaTime,updateTransformCartesian3Scratch1),l=!0),defined(h)&&(p=Transforms.computeFixedToIcrfMatrix(a,updateTransformMatrix3Scratch1),f=Transforms.computeFixedToIcrfMatrix(deltaTime,updateTransformMatrix3Scratch2),defined(p)&&defined(f)?_=Matrix3.transpose(p,updateTransformMatrix3Scratch3):(_=Transforms.computeTemeToPseudoFixedMatrix(a,updateTransformMatrix3Scratch3),p=Matrix3.transpose(_,updateTransformMatrix3Scratch1),f=Transforms.computeTemeToPseudoFixedMatrix(deltaTime,updateTransformMatrix3Scratch2),Matrix3.transpose(f,f)),n=Matrix3.multiplyByVector(p,C,updateTransformCartesian3Scratch5),a=Matrix3.multiplyByVector(f,h,updateTransformCartesian3Scratch6),Cartesian3.subtract(n,a,updateTransformCartesian3Scratch4),p=1e3*Cartesian3.magnitude(updateTransformCartesian3Scratch4),(f=-(f=CesiumMath.GRAVITATIONALPARAMETER)/(p*p-2*f/Cartesian3.magnitude(n)))<0||f>northUpAxisFactor*o.maximumRadius?(c=updateTransformCartesian3Scratch2,Cartesian3.normalize(C,c),Cartesian3.negate(c,c),d=Cartesian3.clone(Cartesian3.UNIT_Z,updateTransformCartesian3Scratch3),u=Cartesian3.cross(d,c,updateTransformCartesian3Scratch1),Cartesian3.magnitude(u)>CesiumMath.EPSILON7&&(Cartesian3.normalize(c,c),Cartesian3.normalize(u,u),d=Cartesian3.cross(c,u,updateTransformCartesian3Scratch3),Cartesian3.normalize(d,d),s=!0)):Cartesian3.equalsEpsilon(C,h,CesiumMath.EPSILON7)||(d=updateTransformCartesian3Scratch2,Cartesian3.normalize(n,d),Cartesian3.normalize(a,a),u=Cartesian3.cross(d,a,updateTransformCartesian3Scratch3),l&&(u=Cartesian3.multiplyByScalar(u,-1,u)),Cartesian3.equalsEpsilon(u,Cartesian3.ZERO,CesiumMath.EPSILON7)||(c=Cartesian3.cross(u,d,updateTransformCartesian3Scratch1),Matrix3.multiplyByVector(_,c,c),Matrix3.multiplyByVector(_,u,u),Matrix3.multiplyByVector(_,d,d),Cartesian3.normalize(c,c),Cartesian3.normalize(u,u),Cartesian3.normalize(d,d),s=!0)))),defined(e.boundingSphere)&&(C=e.boundingSphere.center),r&&(m=Cartesian3.clone(t.position,updateTransformCartesian3Scratch4),g=Cartesian3.clone(t.direction,updateTransformCartesian3Scratch5),y=Cartesian3.clone(t.up,updateTransformCartesian3Scratch6)),_=updateTransformMatrix4Scratch,s?(_[0]=c.x,_[1]=c.y,_[2]=c.z,_[3]=0,_[4]=u.x,_[5]=u.y,_[6]=u.z,_[7]=0,_[8]=d.x,_[9]=d.y,_[10]=d.z,_[11]=0,_[12]=C.x,_[13]=C.y,_[14]=C.z,_[15]=0):Transforms.eastNorthUpToFixedFrame(C,o,_),t._setTransform(_),r&&(Cartesian3.clone(m,t.position),Cartesian3.clone(g,t.direction),Cartesian3.clone(y,t.up),Cartesian3.cross(g,y,t.right))),i&&(e=v===SceneMode$1.SCENE2D||Cartesian3.equals(e._offset3D,Cartesian3.ZERO)?void 0:e._offset3D,t.lookAtTransform(t.transform,e))}function EntityView(e,t,i){this.entity=e,this.scene=t,this.ellipsoid=defaultValue(i,Ellipsoid.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new Cartesian3,this._defaultOffset3D=void 0,this._offset3D=new Cartesian3}Object.defineProperties(EntityView,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=Cartesian3.clone(e,new Cartesian3)}}}),EntityView.defaultOffset3D=new Cartesian3(-14e3,3500,3500);var scratchHeadingPitchRange=new HeadingPitchRange,scratchCartesian$7=new Cartesian3;EntityView.prototype.update=function(e,t){var i,r,n,a,o,s,l,c,u=this.scene,d=this.ellipsoid,h=u.mode;h===SceneMode$1.MORPHING||defined(r=(i=this.entity).position)&&(c=i!==this._lastEntity,n=h!==this._mode,a=u.camera,o=c||n,s=!0,c?!(u=defined(l=i.viewFrom))&&defined(t)?(scratchHeadingPitchRange.pitch=-CesiumMath.PI_OVER_FOUR,scratchHeadingPitchRange.range=0,defined(c=r.getValue(e,scratchCartesian$7))&&(c=2-1/Math.max(1,Cartesian3.magnitude(c)/d.maximumRadius),scratchHeadingPitchRange.pitch*=c),a.viewBoundingSphere(t,scratchHeadingPitchRange),this.boundingSphere=t,s=o=!1):u&&defined(l.getValue(e,this._offset3D))||Cartesian3.clone(EntityView._defaultOffset3D,this._offset3D):n||this._mode===SceneMode$1.SCENE2D||Cartesian3.clone(a.position,this._offset3D),this._lastEntity=i,this._mode=h,updateTransform(this,a,o,s,r,e,d))};var tmp$3={},GHg,HHg;GHg=tmp$3,HHg=function(e){function t(e){return e}function i(e){var t,i=n(e.transform),r=1/0,a=r,o=-r,s=-r;function l(e){(e=i(e))[0]<r&&(r=e[0]),e[0]>o&&(o=e[0]),e[1]<a&&(a=e[1]),e[1]>s&&(s=e[1])}function c(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,n=-1,l=e.length;++n<l;)(t=i(e[n],n))[0]<r&&(r=t[0]),t[0]>o&&(o=t[0]),t[1]<a&&(a=t[1]),t[1]>s&&(s=t[1])})),e.objects)c(e.objects[t]);return[r,a,o,s]}function r(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return o(e,t)}))}:o(e,t)}var n=function(e){if(null==e)return t;var i,r,n=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,t){t||(i=r=0);var l=2,c=e.length,u=new Array(c);for(u[0]=(i+=e[0])*n+o,u[1]=(r+=e[1])*a+s;l<c;)u[l]=e[l],++l;return u}},a=function(e,t){for(var i,r=e.length,n=r-t;n<--r;)i=e[n],e[n++]=e[r],e[r]=i};function o(e,t){var i=t.id,r=t.bbox,n=null==t.properties?{}:t.properties;t=s(e,t);return null==i&&null==r?{type:"Feature",properties:n,geometry:t}:null==r?{type:"Feature",id:i,properties:n,geometry:t}:{type:"Feature",id:i,bbox:r,properties:n,geometry:t}}function s(e,t){var i=n(e.transform),r=e.arcs;function o(e){return i(e)}function s(e){for(var t=[],n=0,o=e.length;n<o;++n)!function(e,t){t.length&&t.pop();for(var n=r[e<0?~e:e],o=0,s=n.length;o<s;++o)t.push(i(n[o],o));e<0&&a(t,s)}(e[n],t);return t.length<2&&t.push(t[0]),t}function l(e){for(var t=s(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(l)}return function e(t){var i,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(e)};case"Point":i=o(t.coordinates);break;case"MultiPoint":i=t.coordinates.map(o);break;case"LineString":i=s(t.arcs);break;case"MultiLineString":i=t.arcs.map(s);break;case"Polygon":i=c(t.arcs);break;case"MultiPolygon":i=t.arcs.map(c);break;default:return null}return{type:r,coordinates:i}}(t)}function l(e,t){var i={},r={},n={},a=[],o=-1;function s(e,t){for(var r in e){var n=e[r];delete t[n.start],delete n.start,delete n.end,n.forEach((function(e){i[e<0?~e:e]=1})),a.push(n)}}return t.forEach((function(i,r){var n=e.arcs[i<0?~i:i];n.length<3&&!n[1][0]&&!n[1][1]&&(n=t[++o],t[o]=i,t[r]=n)})),t.forEach((function(t){var i,a,o=function(t){var i,r=e.arcs[t<0?~t:t],n=r[0];return e.transform?(i=[0,0],r.forEach((function(e){i[0]+=e[0],i[1]+=e[1]}))):i=r[r.length-1],t<0?[i,n]:[n,i]}(t),s=o[0],l=o[1];(o=n[s])?(delete n[o.end],o.push(t),o.end=l,(i=r[l])?(delete r[i.start],a=i===o?o:o.concat(i),r[a.start=o.start]=n[a.end=i.end]=a):r[o.start]=n[o.end]=o):(o=r[l])?(delete r[o.start],o.unshift(t),o.start=s,(i=n[s])?(delete n[i.end],a=i===o?o:i.concat(o),r[a.start=i.start]=n[a.end=o.end]=a):r[o.start]=n[o.end]=o):r[(o=[t]).start=s]=n[o.end=l]=o})),s(n,r),s(r,n),t.forEach((function(e){i[e<0?~e:e]||a.push([e])})),a}function c(e,t,i){var r,n,a,o,s,c,u;if(1<arguments.length)o=i,c=[],u=[],function e(t){switch(s=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":h(t.arcs);break;case"MultiLineString":case"Polygon":p(t.arcs);break;case"MultiPolygon":t.arcs.forEach(p)}}(t),u.forEach(null==o?function(e){c.push(e[0].i)}:function(e){o(e[0].g,e[e.length-1].g)&&c.push(e[0].i)}),r=c;else for(n=0,r=new Array(a=e.arcs.length);n<a;++n)r[n]=n;function d(e){var t=e<0?~e:e;(u[t]||(u[t]=[])).push({i:e,g:s})}function h(e){e.forEach(d)}function p(e){e.forEach(h)}return{type:"MultiLineString",arcs:l(e,r)}}function u(e,t){var i={},r=[],n=[];function a(e){e.forEach((function(t){t.forEach((function(t){(i[t=t<0?~t:t]||(i[t]=[])).push(e)}))})),r.push(e)}function o(t){return function(e){for(var t,i=-1,r=e.length,n=e[r-1],a=0;++i<r;)t=n,n=e[i],a+=t[0]*n[1]-t[1]*n[0];return Math.abs(a)}(s(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":a(t.arcs);break;case"MultiPolygon":t.arcs.forEach(a)}})),r.forEach((function(e){if(!e._){var t=[],r=[e];for(e._=1,n.push(t);e=r.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].forEach((function(e){e._||(e._=1,r.push(e))}))}))}))}})),r.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:n.map((function(t){var r,n=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){i[e<0?~e:e].length<2&&n.push(e)}))}))})),1<(r=(n=l(e,n)).length))for(var a,s,c=1,u=o(n[0]);c<r;++c)(a=o(n[c]))>u&&(s=n[0],n[0]=n[c],n[c]=s,u=a);return n}))}}function d(e,t){for(var i=0,r=e.length;i<r;){var n=i+r>>>1;e[n]<t?i=1+n:r=n}return i}function h(e){if(null==e)return t;var i,r,n=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,t){t||(i=r=0);var l=2,c=e.length,u=new Array(c),d=Math.round((e[0]-o)/n);t=Math.round((e[1]-s)/a);for(u[0]=d-i,i=d,u[1]=t-r,r=t;l<c;)u[l]=e[l],++l;return u}}function p(e,t,i,r,n,a){3===arguments.length&&(r=a=Array,n=null);for(var o=new r(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new a(e),l=e-1,c=0;c<e;++c)o[c]=n;return{set:function(r,a){for(var c=t(r)&l,u=o[c],d=0;u!=n;){if(i(u,r))return s[c]=a;if(++d>=e)throw new Error("full hashmap");u=o[c=c+1&l]}return o[c]=r,s[c]=a},maybeSet:function(r,a){for(var c=t(r)&l,u=o[c],d=0;u!=n;){if(i(u,r))return s[c];if(++d>=e)throw new Error("full hashmap");u=o[c=c+1&l]}return o[c]=r,s[c]=a},get:function(r,a){for(var c=t(r)&l,u=o[c],d=0;u!=n;){if(i(u,r))return s[c];if(++d>=e)break;u=o[c=c+1&l]}return a},keys:function(){for(var e=[],t=0,i=o.length;t<i;++t){var r=o[t];r!=n&&e.push(r)}return e}}}function f(e,t){return e[0]===t[0]&&e[1]===t[1]}function m(e){var t=_[0]^_[1];return 2147483647&(t<<5^t>>7^_[2]^_[3])}function g(e){for(var t=e.coordinates,i=e.lines,r=e.rings,n=function(){for(var e=p(1.4*t.length,T,E,Int32Array,-1,Int32Array),i=new Int32Array(t.length),r=0,n=t.length;r<n;++r)i[r]=e.maybeSet(r,r);return i}(),a=new Int32Array(t.length),o=new Int32Array(t.length),s=new Int32Array(t.length),l=new Int8Array(t.length),c=0,u=0,d=t.length;u<d;++u)a[u]=o[u]=s[u]=-1;for(u=0,d=i.length;u<d;++u){var h=i[u],g=h[0],y=h[1],_=n[g],v=n[++g];for(++c,l[_]=1;++g<=y;)S(u,_,_=v,v=n[g]);++c,l[v]=1}for(u=0,d=t.length;u<d;++u)a[u]=-1;for(u=0,d=r.length;u<d;++u){var C=r[u],x=C[0]+1,b=C[1];for(S(u,n[b-1],_=n[x-1],v=n[x]);++x<=b;)S(u,_,_=v,v=n[x])}function S(e,t,i,r){var n;a[i]!==e&&(a[i]=e,0<=(n=o[i])?(e=s[i],n===t&&e===r||n===r&&e===t||(++c,l[i]=1)):(o[i]=t,s[i]=r))}function T(e){return m(t[e])}function E(e,i){return f(t[e],t[i])}a=o=s=null;var w,A=function(e,t,i,r,n){3===arguments.length&&(r=Array,n=null);for(var a=new r(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),o=e-1,s=0;s<e;++s)a[s]=n;return{add:function(r){for(var s=t(r)&o,l=a[s],c=0;l!=n;){if(i(l,r))return!0;if(++c>=e)throw new Error("full hashset");l=a[s=s+1&o]}return a[s]=r,!0},has:function(r){for(var s=t(r)&o,l=a[s],c=0;l!=n;){if(i(l,r))return!0;if(++c>=e)break;l=a[s=s+1&o]}return!1},values:function(){for(var e=[],t=0,i=a.length;t<i;++t){var r=a[t];r!=n&&e.push(r)}return e}}}(1.4*c,m,f);for(u=0,d=t.length;u<d;++u)l[w=n[u]]&&A.add(t[w]);return A}var y=new ArrayBuffer(16),_=new Uint32Array(y);function v(e,t,i){for(var r,n=t+(i---t>>1);t<n;++t,--i)r=e[t],e[t]=e[i],e[i]=r}function C(e){var t,i,r={};for(t in e)r[t]=null==(i=e[t])?{type:null}:("FeatureCollection"===i.type?function(e){var t={type:"GeometryCollection",geometries:e.features.map(x)};return null!=e.bbox&&(t.bbox=e.bbox),t}:"Feature"===i.type?x:b)(i);return r}function x(e){var t,i=b(e.geometry);for(t in null!=e.id&&(i.id=e.id),null!=e.bbox&&(i.bbox=e.bbox),e.properties){i.properties=e.properties;break}return i}function b(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(b)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}function S(e){var t=e[0],i=e[1];return i<t&&(e=t,t=i,i=e),t+31*i}function T(e,t){var i,r=e[0],n=e[1];e=t[0];return n<r&&(i=r,r=n,n=i),(t=t[1])<e&&(i=e,e=t,t=i),r===e&&n===t}function E(){return!0}function w(e){return e}function A(e){return null!=e.type}function P(e){var t,i=new Array(e.arcs.length),r=0;function n(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(n);break;case"Polygon":a(e.arcs);break;case"MultiPolygon":e.arcs.forEach(a)}}function a(e){for(var t=0,n=e.length;t<n;++t,++r)for(var a=e[t],o=0,s=a.length;o<s;++o){var l=a[o];l<0&&(l=~l);var c=i[l];null==c?i[l]=r:c!==r&&(i[l]=-1)}}for(t in e.objects)n(e.objects[t]);return function(e){for(var t,r=0,n=e.length;r<n;++r)if(-1===i[(t=e[r])<0?~t:t])return!0;return!1}}function D(e){var t=e[0],i=e[1];e=e[2];return Math.abs((t[0]-e[0])*(i[1]-t[1])-(t[0]-i[0])*(e[1]-t[1]))/2}function M(e){for(var t,i=-1,r=e.length,n=e[r-1],a=0;++i<r;)t=n,n=e[i],a+=t[0]*n[1]-t[1]*n[0];return Math.abs(a)/2}function I(e,t,i){return t=null==t?Number.MIN_VALUE:+t,null==i&&(i=M),function(n,a){return i(r(e,{type:"Polygon",arcs:[n]}).geometry.coordinates[0],a)>=t}}function R(e,t){return e[1][2]-t[1][2]}function O(e){return[e[0],e[1],0]}function L(e,t){return t-e}var N=2*(y=Math.PI),F=y/4,B=y/180,V=Math.abs,k=Math.atan2,z=Math.cos,G=Math.sin;function U(e,t){for(var i=0,r=e.length,n=0,a=e[t?i++:r-1],o=a[0]*B,s=a[1]*B/2+F,l=z(s),c=G(s);i<r;++i){h=o,o=(a=e[i])[0]*B,s=a[1]*B/2+F;var u,d=0<=(u=o-h)?1:-1,h=d*u,p=(p=l)*(l=z(s))+(u=c*(c=G(s)))*z(h);h=u*d*G(h);n+=k(h,p)}return n}e.bbox=i,e.feature=r,e.mesh=function(e){return s(e,c.apply(this,arguments))},e.meshArcs=c,e.merge=function(e){return s(e,u.apply(this,arguments))},e.mergeArcs=u,e.neighbors=function(e){var t={},i=e.map((function(){return[]}));function r(e,i){e.forEach((function(e){e<0&&(e=~e);var r=t[e];r?r.push(i):t[e]=[i]}))}function n(e,t){e.forEach((function(e){r(e,t)}))}var a,o={LineString:r,MultiLineString:n,Polygon:n,MultiPolygon:function(e,t){e.forEach((function(e){n(e,t)}))}};for(a in e.forEach((function e(t,i){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,i)})):t.type in o&&o[t.type](t.arcs,i)})),t)for(var s=t[a],l=s.length,c=0;c<l;++c)for(var u=c+1;u<l;++u){var h,p=s[c],f=s[u];(h=i[p])[a=d(h,f)]!==f&&h.splice(a,0,f),(h=i[f])[a=d(h,p)]!==p&&h.splice(a,0,p)}return i},e.quantize=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)l=e.bbox;else{if(!(2<=(r=Math.floor(t))))throw new Error("n must be ≥2");var r,n=(l=e.bbox||i(e))[0],a=l[1],o=l[2],s=l[3];t={scale:[o-n?(o-n)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[n,a]}}var l,c,u=h(t),d=e.objects,p={};function f(e){return u(e)}function m(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(m)};break;case"Point":t={type:"Point",coordinates:f(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(f)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(c in d)p[c]=m(d[c]);return{type:"Topology",bbox:l,transform:t,objects:p,arcs:e.arcs.map((function(e){var t,i=0,r=1,n=e.length,a=new Array(n);for(a[0]=u(e[0],0);++i<n;)((t=u(e[i],i))[0]||t[1])&&(a[r++]=t);return 1===r&&(a[r++]=[0,0]),a.length=r,a}))}},e.transform=n,e.untransform=h,e.topology=function(e,t){var i=function(e){var t=1/0,i=1/0,r=-1/0,n=-1/0;function a(e){null!=e&&s.hasOwnProperty(e.type)&&s[e.type](e)}var o,s={GeometryCollection:function(e){e.geometries.forEach(a)},Point:function(e){l(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(l)},LineString:function(e){c(e.arcs)},MultiLineString:function(e){e.arcs.forEach(c)},Polygon:function(e){e.arcs.forEach(c)},MultiPolygon:function(e){e.arcs.forEach(u)}};function l(e){var a=e[0];e=e[1];a<t&&(t=a),r<a&&(r=a),e<i&&(i=e),n<e&&(n=e)}function c(e){e.forEach(l)}function u(e){e.forEach(c)}for(o in e)a(e[o]);return t<=r&&i<=n?[t,i,r,n]:void 0}(e=C(e)),r=0<t&&i&&function(e,t,i){var r=t[0],n=t[1],a=t[2],o=(t=t[3],a-r?(i-1)/(a-r):1),s=t-n?(i-1)/(t-n):1;function l(e){return[Math.round((e[0]-r)*o),Math.round((e[1]-n)*s)]}function c(e,t){for(var i,a,l,c,u=-1,d=0,h=e.length,p=new Array(h);++u<h;)c=e[u],l=Math.round((c[0]-r)*o),c=Math.round((c[1]-n)*s),l===i&&c===a||(p[d++]=[i=l,a=c]);for(p.length=d;d<t;)d=p.push([p[0][0],p[0][1]]);return p}function u(e){return c(e,2)}function d(e){return c(e,4)}function h(e){return e.map(d)}function p(e){null!=e&&m.hasOwnProperty(e.type)&&m[e.type](e)}var f,m={GeometryCollection:function(e){e.geometries.forEach(p)},Point:function(e){e.coordinates=l(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(l)},LineString:function(e){e.arcs=u(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(u)},Polygon:function(e){e.arcs=h(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(h)}};for(f in e)p(e[f]);return{scale:[1/o,1/s],translate:[r,n]}}(e,i,t),n=(t=function(e){var t,i,r=e.coordinates,n=e.lines,a=e.rings,o=n.length+a.length;for(delete e.lines,delete e.rings,c=0,u=n.length;c<u;++c)for(t=n[c];t=t.next;)++o;for(c=0,u=a.length;c<u;++c)for(i=a[c];i=i.next;)++o;for(var s=p(2*o*1.4,m,f),l=e.arcs=[],c=0,u=n.length;c<u;++c)for(t=n[c];d(t),t=t.next;);for(c=0,u=a.length;c<u;++c)if((i=a[c]).next)for(;d(i),i=i.next;);else!function(e){var t,i,n,a,o;if(i=s.get(r[e[0]]))for(a=0,o=i.length;a<o;++a){if(h(n=i[a],e))return e[0]=n[0],e[1]=n[1];if(g(n,e))return e[0]=n[1],e[1]=n[0]}if(i=s.get(t=r[e[0]+y(e)]))for(a=0,o=i.length;a<o;++a){if(h(n=i[a],e))return e[0]=n[0],e[1]=n[1];if(g(n,e))return e[0]=n[1],e[1]=n[0]}i?i.push(e):s.set(t,[e]),l.push(e)}(i);function d(e){var t,i,n,a,o,c,u,d;if(n=s.get(t=r[e[0]]))for(u=0,d=n.length;u<d;++u)if(function(e,t){var i=e[0],n=t[0],a=e[1];if(i-a!=n-(t=t[1]))return!1;for(;i<=a;++i,++n)if(!f(r[i],r[n]))return!1;return!0}(a=n[u],e))return e[0]=a[0],void(e[1]=a[1]);if(o=s.get(i=r[e[1]]))for(u=0,d=o.length;u<d;++u)if(function(e,t){var i=e[0],n=t[0],a=e[1],o=t[1];if(i-a!=n-o)return!1;for(;i<=a;++i,--o)if(!f(r[i],r[o]))return!1;return!0}(c=o[u],e))return e[1]=c[0],void(e[0]=c[1]);n?n.push(e):s.set(t,[e]),o?o.push(e):s.set(i,[e]),l.push(e)}function h(e,t){var i=e[0],n=t[0],a=e[1]-i;if(a==t[1]-n){for(var o=y(e),s=y(t),l=0;l<a;++l)if(!f(r[i+(l+o)%a],r[n+(l+s)%a]))return;return 1}}function g(e,t){var i=e[0],n=t[0],a=e[1],o=t[1],s=a-i;if(s==o-n){for(var l=y(e),c=s-y(t),u=0;u<s;++u)if(!f(r[i+(u+l)%s],r[o-(u+c)%s]))return;return 1}}function y(e){for(var t=e[0],i=e[1],n=t,a=n,o=r[n];++n<i;){var s=r[n];(s[0]<o[0]||s[0]===o[0]&&s[1]<o[1])&&(a=n,o=s)}return a-t}return e}(function(e){for(var t,i,r,n,a,o=g(e),s=e.coordinates,l=e.lines,c=e.rings,u=0,d=l.length;u<d;++u)for(var h=l[u],p=h[0],f=h[1];++p<f;)o.has(s[p])&&(t={0:p,1:h[1]},h[1]=p,h=h.next=t);for(u=0,d=c.length;u<d;++u)for(var m=c[u],y=m[0],_=y,C=m[1],x=o.has(s[y]);++_<C;)o.has(s[_])&&(x?(t={0:_,1:m[1]},m[1]=_,m=m.next=t):(a=(n=C)-_,v(i=s,r=y,n),v(i,r,r+a),v(i,r+a,n),s[C]=s[y],x=!0,_=y));return e}(function(e){var t=-1,i=[],r=[],n=[];function a(e){e&&s.hasOwnProperty(e.type)&&s[e.type](e)}var o,s={GeometryCollection:function(e){e.geometries.forEach(a)},LineString:function(e){e.arcs=l(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(l)},Polygon:function(e){e.arcs=e.arcs.map(c)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function l(e){for(var r=0,a=e.length;r<a;++r)n[++t]=e[r];var o={0:t-a+1,1:t};return i.push(o),o}function c(e){for(var i=0,a=e.length;i<a;++i)n[++t]=e[i];var o={0:t-a+1,1:t};return r.push(o),o}function u(e){return e.map(c)}for(o in e)a(e[o]);return{type:"Topology",coordinates:n,lines:i,rings:r,objects:e}}(e)))).coordinates,a=p(1.4*t.arcs.length,S,T);function o(e){e&&l.hasOwnProperty(e.type)&&l[e.type](e)}e=t.objects,t.bbox=i,t.arcs=t.arcs.map((function(e,t){return a.set(e,t),n.slice(e[0],e[1]+1)})),delete t.coordinates,n=null;var s,l={GeometryCollection:function(e){e.geometries.forEach(o)},LineString:function(e){e.arcs=c(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(c)},Polygon:function(e){e.arcs=e.arcs.map(c)},MultiPolygon:function(e){e.arcs=e.arcs.map(u)}};function c(e){var t=[];do{var i=a.get(e);t.push(e[0]<e[1]?i:~i)}while(e=e.next);return t}function u(e){return e.map(c)}for(s in e)o(e[s]);return r&&(t.transform=r,t.arcs=function(e){for(var t=-1,i=e.length;++t<i;){for(var r,n,a=e[t],o=0,s=1,l=a.length,c=a[0],u=c[0],d=c[1];++o<l;)r=(c=a[o])[0],n=c[1],r===u&&n===d||(a[s++]=[r-u,n-d],u=r,d=n);1===s&&(a[s++]=[0,0]),a.length=s}return e}(t.arcs)),t},e.filter=function(e,t){var i,r=e.objects,n={};function a(e){var t,i;switch(e.type){case"Polygon":t=(i=o(e.arcs))?{type:"Polygon",arcs:i}:{type:null};break;case"MultiPolygon":t=(i=e.arcs.map(o).filter(w)).length?{type:"MultiPolygon",arcs:i}:{type:null};break;case"GeometryCollection":t=(i=e.geometries.map(a).filter(A)).length?{type:"GeometryCollection",geometries:i}:{type:null};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function o(e){return e.length&&(i=e[0],t(i,!1))?[e[0]].concat(e.slice(1).filter(s)):null;var i}function s(e){return t(e,!0)}for(i in null==t&&(t=E),r)n[i]=a(r[i]);return function(e){var t,i,r=e.objects,n={},a=e.arcs,o=a.length,s=-1,l=new Array(o),c=0,u=-1;function d(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(d);break;case"LineString":p(e.arcs);break;case"MultiLineString":case"Polygon":e.arcs.forEach(p);break;case"MultiPolygon":e.arcs.forEach(f)}}function h(e){e<0&&(e=~e),l[e]||(l[e]=1,++c)}function p(e){e.forEach(h)}function f(e){e.forEach(p)}function m(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(m)};break;case"LineString":t={type:"LineString",arcs:y(e.arcs)};break;case"MultiLineString":t={type:"MultiLineString",arcs:e.arcs.map(y)};break;case"Polygon":t={type:"Polygon",arcs:e.arcs.map(y)};break;case"MultiPolygon":t={type:"MultiPolygon",arcs:e.arcs.map(_)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function g(e){return e<0?~l[~e]:l[e]}function y(e){return e.map(g)}function _(e){return e.map(y)}for(i in r)d(r[i]);for(t=new Array(c);++s<o;)l[s]&&(l[s]=++u,t[u]=a[s]);for(i in r)n[i]=m(r[i]);return{type:"Topology",bbox:e.bbox,transform:e.transform,objects:n,arcs:t}}({type:"Topology",bbox:e.bbox,transform:e.transform,objects:n,arcs:e.arcs})},e.filterAttached=P,e.filterAttachedWeight=function(e,t,i){var r=P(e),n=I(e,t,i);return function(e,t){return r(e,t)||n(e,t)}},e.filterWeight=I,e.planarRingArea=M,e.planarTriangleArea=D,e.presimplify=function(e,t){var i,r,a=e.transform?n(e.transform):O,o=(i=[],r=0,(c={}).push=function(e){return s(i[e._=r]=e,r++),r},c.pop=function(){if(!(r<=0)){var e,t=i[0];return 0<--r&&(e=i[r],l(i[e._=0]=e,0)),t}},c.remove=function(e){var t,n=e._;if(i[n]===e)return n!==--r&&(R(t=i[r],e)<0?s:l)(i[t._=n]=t,n),n},c);function s(e,t){for(;0<t;){var r=(t+1>>1)-1,n=i[r];if(0<=R(e,n))break;i[n._=t]=n,i[e._=t=r]=e}}function l(e,t){for(;;){var n=t+1<<1,a=n-1,o=t,s=i[o];if(a<r&&R(i[a],s)<0&&(s=i[o=a]),n<r&&R(i[n],s)<0&&(s=i[o=n]),o===t)break;i[s._=t]=s,i[e._=t=o]=e}}null==t&&(t=D);var c=e.arcs.map((function(e){for(var i,r=[],n=0,s=1,l=(e=e.map(a)).length-1;s<l;++s)(i=[e[s-1],e[s],e[s+1]])[1][2]=t(i),r.push(i),o.push(i);for(e[0][2]=e[l][2]=1/0,s=0,l=r.length;s<l;++s)(i=r[s]).previous=r[s-1],i.next=r[s+1];for(;i=o.pop();){var c=i.previous,d=i.next;i[1][2]<n?i[1][2]=n:n=i[1][2],c&&(c.next=d,c[2]=i[2],u(c)),d&&(d.previous=c,d[0]=i[0],u(d))}return e}));function u(e){o.remove(e),e[1][2]=t(e),o.push(e)}return{type:"Topology",bbox:e.bbox,objects:e.objects,arcs:c}},e.quantile=function(e,t){var i=[];return e.arcs.forEach((function(e){e.forEach((function(e){isFinite(e[2])&&i.push(e[2])}))})),i.length&&function(e,t){if(r=e.length){if((t=+t)<=0||r<2)return e[0];if(1<=t)return e[r-1];var i=(r-1)*t,r=Math.floor(i);return(t=e[r])+((e=e[r+1])-t)*(i-r)}}(i.sort(L),t)},e.simplify=function(e,t){t=null==t?Number.MIN_VALUE:+t;var i=e.arcs.map((function(e){for(var i,r=-1,n=0,a=e.length,o=new Array(a);++r<a;)(i=e[r])[2]>=t&&(o[n++]=[i[0],i[1]]);return o.length=n,o}));return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:i}},e.sphericalRingArea=function(e,t){return e=U(e,!0),t&&(e*=-1),2*(e<0?N+e:e)},e.sphericalTriangleArea=function(e){return 2*V(U(e,!1))},Object.defineProperty(e,"__esModule",{value:!0})},HHg("object"==typeof exports&&void 0!==module?exports:GHg.topojson=GHg.topojson||{});var topojson=tmp$3.topojson;function defaultCrsFunction(e){return Cartesian3.fromDegrees(e[0],e[1],e[2])}var crsNames={"urn:ogc:def:crs:OGC:1.3:CRS84":defaultCrsFunction,"EPSG:4326":defaultCrsFunction,"urn:ogc:def:crs:EPSG::4326":defaultCrsFunction},crsLinkHrefs={},crsLinkTypes={},defaultMarkerSize=48,defaultMarkerSymbol,defaultMarkerColor=Color.ROYALBLUE,defaultStroke=Color.YELLOW,defaultStrokeWidth=2,defaultFill$1=Color.fromBytes(255,255,0,100),defaultClampToGround=!1,sizes={small:24,medium:48,large:64},simpleStyleIdentifiers=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function defaultDescribe(e,t){var i,r,n="";for(i in e)!e.hasOwnProperty(i)||i===t||-1!==simpleStyleIdentifiers.indexOf(i)||defined(r=e[i])&&(n+="object"==typeof r?"<tr><th>"+i+"</th><td>"+defaultDescribe(r)+"</td></tr>":"<tr><th>"+i+"</th><td>"+r+"</td></tr>");return 0<n.length&&(n='<table class="cesium-infoBox-defaultTable"><tbody>'+n+"</tbody></table>"),n}function createDescriptionCallback(e,t,i){var r;return function(n,a){return defined(r)||(r=e(t,i)),r}}function defaultDescribeProperty(e,t){return new CallbackProperty(createDescriptionCallback(defaultDescribe,e,t),!0)}function createObject(e,t,i){var r=e.id;if(defined(r)&&"Feature"===e.type){for(var n=2,a=r;defined(t.getById(a));)a=r+"_"+n,n++;r=a}else r=createGuid();var o=t.getOrCreateEntity(r),s=e.properties;if(defined(s)){var l;if(defined(e=(o.properties=s).title))o.name=e,l="title";else{var c,u=Number.MAX_VALUE;for(c in s)if(s.hasOwnProperty(c)&&s[c]){var d=c.toLowerCase();if(1<u&&"title"===d){u=1,l=c;break}2<u&&"name"===d?(u=2,l=c):3<u&&/title/i.test(c)?(u=3,l=c):4<u&&/name/i.test(c)&&(u=4,l=c)}defined(l)&&(o.name=s[l])}null!==(e=s.description)&&(o.description=defined(e)?new ConstantProperty(e):i(s,l))}return o}function coordinatesArrayToCartesianArray(e,t){for(var i=new Array(e.length),r=0;r<e.length;r++)i[r]=t(e[r]);return i}var geoJsonObjectTypes={Feature:processFeature,FeatureCollection:processFeatureCollection,GeometryCollection:processGeometryCollection,LineString:processLineString,MultiLineString:processMultiLineString,MultiPoint:processMultiPoint,MultiPolygon:processMultiPolygon,Point:processPoint$1,Polygon:processPolygon$1,Topology:processTopology},geometryTypes={GeometryCollection:processGeometryCollection,LineString:processLineString,MultiLineString:processMultiLineString,MultiPoint:processMultiPoint,MultiPolygon:processMultiPolygon,Point:processPoint$1,Polygon:processPolygon$1,Topology:processTopology};function processFeature(e,t,i,r,n){if(null!==t.geometry){if(!defined(t.geometry))throw new RuntimeError("feature.geometry is required.");var a=t.geometry.type,o=geometryTypes[a];if(!defined(o))throw new RuntimeError("Unknown geometry type: "+a);o(e,t,t.geometry,r,n)}else createObject(t,e._entityCollection,n.describe)}function processFeatureCollection(e,t,i,r,n){for(var a=t.features,o=0,s=a.length;o<s;o++)processFeature(e,a[o],void 0,r,n)}function processGeometryCollection(e,t,i,r,n){for(var a=i.geometries,o=0,s=a.length;o<s;o++){var l=a[o],c=l.type,u=geometryTypes[c];if(!defined(u))throw new RuntimeError("Unknown geometry type: "+c);u(e,t,l,r,n)}}function createPoint(e,t,i,r,n){var a,o=n.markerSymbol,s=n.markerColor,l=n.markerSize,c=t.properties;defined(c)&&(defined(a=c["marker-color"])&&(s=Color.fromCssColorString(a)),l=defaultValue(sizes[c["marker-size"]],l),defined(c=c["marker-symbol"])&&(o=c)),o=defined(o)?1===o.length?e._pinBuilder.fromText(o.toUpperCase(),s,l):e._pinBuilder.fromMakiIconId(o,s,l):e._pinBuilder.fromColor(s,l);var u=new BillboardGraphics;u.verticalOrigin=new ConstantProperty(VerticalOrigin$1.BOTTOM),2===r.length&&n.clampToGround&&(u.heightReference=HeightReference$1.CLAMP_TO_GROUND),(n=createObject(t,e._entityCollection,n.describe)).billboard=u,n.position=new ConstantPositionProperty(i(r)),o=when(o).then((function(e){u.image=new ConstantProperty(e)})).otherwise((function(){u.image=new ConstantProperty(e._pinBuilder.fromColor(s,l))})),e._promises.push(o)}function processPoint$1(e,t,i,r,n){createPoint(e,t,r,i.coordinates,n)}function processMultiPoint(e,t,i,r,n){for(var a=i.coordinates,o=0;o<a.length;o++)createPoint(e,t,r,a[o],n)}function createLineString(e,t,i,r,n){var a,o,s=n.strokeMaterialProperty,l=n.strokeWidthProperty,c=t.properties;defined(c)&&(defined(o=c["stroke-width"])&&(l=new ConstantProperty(o)),defined(o=c.stroke)&&(a=Color.fromCssColorString(o)),defined(c=c["stroke-opacity"])&&1!==c&&(defined(a)||(a=s.color.clone()),a.alpha=c),defined(a)&&(s=new ColorMaterialProperty(a))),t=createObject(t,e._entityCollection,n.describe),e=new PolylineGraphics,(t.polyline=e).clampToGround=n.clampToGround,e.material=s,e.width=l,e.positions=new ConstantProperty(coordinatesArrayToCartesianArray(r,i)),e.arcType=ArcType$1.RHUMB}function processLineString(e,t,i,r,n){createLineString(e,t,r,i.coordinates,n)}function processMultiLineString(e,t,i,r,n){for(var a=i.coordinates,o=0;o<a.length;o++)createLineString(e,t,r,a[o],n)}function createPolygon(e,t,i,r,n){if(0!==r.length&&0!==r[0].length){var a,o,s=n.strokeMaterialProperty.color,l=n.fillMaterialProperty,c=n.strokeWidthProperty,u=t.properties;defined(u)&&(defined(a=u["stroke-width"])&&(c=new ConstantProperty(a)),defined(a=u.stroke)&&(o=Color.fromCssColorString(a)),defined(a=u["stroke-opacity"])&&1!==a&&(defined(o)||(o=n.strokeMaterialProperty.color.clone()),o.alpha=a),defined(o)&&(s=new ConstantProperty(o)),defined(o=u.fill)&&((d=Color.fromCssColorString(o)).alpha=l.color.alpha),defined(a=u["fill-opacity"])&&a!==l.color.alpha&&(defined(d)||(d=l.color.clone()),d.alpha=a),defined(d)&&(l=new ColorMaterialProperty(d)));var d=new PolygonGraphics;d.outline=new ConstantProperty(!0),d.outlineColor=s,d.outlineWidth=c,d.material=l,d.arcType=ArcType$1.RHUMB;for(var h=[],p=1,f=r.length;p<f;p++)h.push(new PolygonHierarchy(coordinatesArrayToCartesianArray(r[p],i)));l=r[0],d.hierarchy=new ConstantProperty(new PolygonHierarchy(coordinatesArrayToCartesianArray(l,i),h)),2<l[0].length?d.perPositionHeight=new ConstantProperty(!0):n.clampToGround||(d.height=0),createObject(t,e._entityCollection,n.describe).polygon=d}}function processPolygon$1(e,t,i,r,n){createPolygon(e,t,r,i.coordinates,n)}function processMultiPolygon(e,t,i,r,n){for(var a=i.coordinates,o=0;o<a.length;o++)createPolygon(e,t,r,a[o],n)}function processTopology(e,t,i,r,n){for(var a in i.objects){var o;i.objects.hasOwnProperty(a)&&(o=topojson.feature(i,i.objects[a]),(0,geoJsonObjectTypes[o.type])(e,o,o,r,n))}}function GeoJsonDataSource(e){this._name=e,this._changed=new Event,this._error=new Event,this._isLoading=!1,this._loading=new Event,this._entityCollection=new EntityCollection(this),this._promises=[],this._pinBuilder=new PinBuilder,this._entityCluster=new EntityCluster,this._credit=void 0,this._resourceCredits=[]}function load$1(e,t,i,r){defined(r)&&(s=getFilenameFromUri(r)),defined(s)&&e._name!==s&&(e._name=s,e._changed.raiseEvent(e));var n=geoJsonObjectTypes[t.type];if(!defined(n))throw new RuntimeError("Unsupported GeoJSON object type: "+t.type);var a=t.crs,o=null!==a?defaultCrsFunction:null;if(defined(a)){if(!defined(a.properties))throw new RuntimeError("crs.properties is undefined.");if(r=a.properties,"name"===a.type){if(!defined(o=crsNames[r.name]))throw new RuntimeError("Unknown crs name: "+r.name)}else if("link"===a.type){var s=crsLinkHrefs[r.href];if(defined(s)||(s=crsLinkTypes[r.type]),!defined(s))throw new RuntimeError("Unable to resolve crs link: "+JSON.stringify(r));o=s(r)}else{if("EPSG"!==a.type)throw new RuntimeError("Unknown crs type: "+a.type);if(!defined(o=crsNames["EPSG:"+r.code]))throw new RuntimeError("Unknown crs EPSG code: "+r.code)}}return when(o,(function(r){return e._entityCollection.removeAll(),null!==r&&n(e,t,t,r,i),when.all(e._promises,(function(){return e._promises.length=0,DataSource.setLoading(e,!1),e}))}))}function KmlCamera(e,t){this.position=e,this.headingPitchRoll=t}GeoJsonDataSource.load=function(e,t){return(new GeoJsonDataSource).load(e,t)},Object.defineProperties(GeoJsonDataSource,{markerSize:{get:function(){return defaultMarkerSize},set:function(e){defaultMarkerSize=e}},markerSymbol:{get:function(){return defaultMarkerSymbol},set:function(e){defaultMarkerSymbol=e}},markerColor:{get:function(){return defaultMarkerColor},set:function(e){defaultMarkerColor=e}},stroke:{get:function(){return defaultStroke},set:function(e){defaultStroke=e}},strokeWidth:{get:function(){return defaultStrokeWidth},set:function(e){defaultStrokeWidth=e}},fill:{get:function(){return defaultFill$1},set:function(e){defaultFill$1=e}},clampToGround:{get:function(){return defaultClampToGround},set:function(e){defaultClampToGround=e}},crsNames:{get:function(){return crsNames}},crsLinkHrefs:{get:function(){return crsLinkHrefs}},crsLinkTypes:{get:function(){return crsLinkTypes}}}),Object.defineProperties(GeoJsonDataSource.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}}),GeoJsonDataSource.prototype.load=function(e,t){DataSource.setLoading(this,!0),"string"==typeof(i=(t=defaultValue(t,defaultValue.EMPTY_OBJECT)).credit)&&(i=new Credit(i)),this._credit=i;var i=e,r=t.sourceUri;if("string"==typeof e||e instanceof Resource){i=(e=Resource.createIfNeeded(e)).fetchJson(),r=defaultValue(r,e.getUrlComponent());var n=this._resourceCredits,a=e.credits;if(defined(a))for(var o=a.length,s=0;s<o;s++)n.push(a[s])}t={describe:defaultValue(t.describe,defaultDescribeProperty),markerSize:defaultValue(t.markerSize,defaultMarkerSize),markerSymbol:defaultValue(t.markerSymbol,defaultMarkerSymbol),markerColor:defaultValue(t.markerColor,defaultMarkerColor),strokeWidthProperty:new ConstantProperty(defaultValue(t.strokeWidth,defaultStrokeWidth)),strokeMaterialProperty:new ColorMaterialProperty(defaultValue(t.stroke,defaultStroke)),fillMaterialProperty:new ColorMaterialProperty(defaultValue(t.fill,defaultFill$1)),clampToGround:defaultValue(t.clampToGround,defaultClampToGround)};var l=this;return when(i,(function(e){return load$1(l,e,t,r)})).otherwise((function(e){return DataSource.setLoading(l,!1),l._error.raiseEvent(l,e),console.log(e),when.reject(e)}))},GeoJsonDataSource.prototype.update=function(e){return!0};var tmp$4={},D$g,H$g,I$g,J$g,L$g,M$g,N$g,O$g,P$g,Q$g,R$g,S$g,T$g,U$g,V$g,W$g,X$g,_$g,a_g,b_g,c_g,d_g,e_g,f_g,g_g,h_g,i_g,j_g,k_g,l_g,m_g,n_g,o_g,q_g;function y$g(e,t,i){var r;return e.length>t&&(r=null==i?(i="&hellip;",3):i.length,e=e.substring(0,t-r)+i),e}function z$g(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1}function A$g(e,t){for(var i=e.length-1;0<=i;i--)!0===t(e[i])&&e.splice(i,1)}function C$g(e){throw new Error("Unhandled case for value: '"+e+"'")}function K$g(e,t){function i(){this.constructor=e}J$g(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}tmp$4.Autolinker=(D$g=function(){function e(e){void 0===e&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return e.prototype.setTagName=function(e){return this.tagName=e,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},e.prototype.getAttr=function(e){return this.getAttrs()[e]},e.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(e){return this.setAttr("class",e)},e.prototype.addClass=function(e){for(var t,i=this.getClass(),r=this.whitespaceRegex,n=i?i.split(r):[],a=e.split(r);t=a.shift();)-1===z$g(n,t)&&n.push(t);return this.getAttrs().class=n.join(" "),this},e.prototype.removeClass=function(e){for(var t,i=this.getClass(),r=this.whitespaceRegex,n=i?i.split(r):[],a=e.split(r);n.length&&(t=a.shift());){var o=z$g(n,t);-1!==o&&n.splice(o,1)}return this.getAttrs().class=n.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},e.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},e.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e,t=this.getAttrs(),i=[];for(e in t)t.hasOwnProperty(e)&&i.push(e+'="'+t[e]+'"');return i.join(" ")},e}(),H$g=function(){function e(e){void 0===e&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return e.prototype.build=function(e){return new D$g({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},e.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},i=this.createCssClass(e);return i&&(t.class=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(t.title=e.getAnchorHref()),t},e.prototype.createCssClass=function(e){var t=this.className;if(t){for(var i=[t],r=e.getCssClassSuffixes(),n=0,a=r.length;n<a;n++)i.push(t+"-"+r[n]);return i.join(" ")}return""},e.prototype.processAnchorText=function(e){return this.doTruncate(e)},e.prototype.doTruncate=function(e){if(!(t=this.truncate)||!t.length)return e;var t,i=t.length;return("smart"===(t=t.location)?function(e,t,i){var r;function n(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function a(e,t){var r=t/2,n=Math.ceil(r);t=-1*Math.floor(r),r="";return t<0&&(r=e.substr(t)),e.substr(0,n)+i+r}if(r=null==i?(i="&hellip;",c=3,8):(c=i.length,i.length),e.length<=t)return e;var o,s=t-c,l=function(e){var t={},i=e;return(e=i.match(/^([a-z]+):\/\//i))&&(t.scheme=e[1],i=i.substr(e[0].length)),(e=i.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(t.host=e[1],i=i.substr(e[0].length)),(e=i.match(/^\/(.*?)(?=(\?|#|$))/i))&&(t.path=e[1],i=i.substr(e[0].length)),(e=i.match(/^\?(.*?)(?=(#|$))/i))&&(t.query=e[1],i=i.substr(e[0].length)),(e=i.match(/^#(.*?)$/i))&&(t.fragment=e[1]),t}(e);if(!l.query||(o=l.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i))&&(l.query=l.query.substr(0,o[1].length),e=n(l)),e.length<=t)return e;if(l.host&&(l.host=l.host.replace(/^www\./,""),e=n(l)),e.length<=t)return e;if(e="",l.host&&(e+=l.host),e.length>=s)return(l.host.length==t?l.host.substr(0,t-c)+i:a(e,s)).substr(0,s+r);var c="";if(l.path&&(c+="/"+l.path),l.query&&(c+="?"+l.query),c){if(s<=(e+c).length){if((e+c).length==t)return(e+c).substr(0,t);var u=s-e.length;return(e+a(c,u)).substr(0,s+r)}e+=c}if(l.fragment){if(s<=(e+(u="#"+l.fragment)).length)return(e+u).length==t?(e+u).substr(0,t):(e+a(u,c=s-e.length)).substr(0,s+r);e+=u}return l.scheme&&l.host&&(e+(l=l.scheme+"://")).length<s?(l+e).substr(0,t):e.length<=t?e:(t="",0<s&&(t=e.substr(-1*Math.floor(s/2))),(e.substr(0,Math.ceil(s/2))+i+t).substr(0,s+r))}:"middle"===t?function(e,t,i){if(e.length<=t)return e;t-=n=null==i?(i="&hellip;",r=8,3):(r=i.length,i.length);var r,n="";return 0<t&&(n=e.substr(-1*Math.floor(t/2))),(e.substr(0,Math.ceil(t/2))+i+n).substr(0,t+r)}:y$g)(e,i)},e}(),I$g=function(){function e(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(e){this.offset=e},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),J$g=function(e,t){return(J$g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},L$g=function(){return(L$g=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},M$g=function(e){function t(t){var i=e.call(this,t)||this;return i.email="",i.email=t.email,i}return K$g(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(I$g),N$g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="",i.hashtag="",i.serviceName=t.serviceName,i.hashtag=t.hashtag,i}return K$g(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var e=this.serviceName,t=this.hashtag;switch(e){case"twitter":return"https://twitter.com/hashtag/"+t;case"facebook":return"https://www.facebook.com/hashtag/"+t;case"instagram":return"https://instagram.com/explore/tags/"+t;default:throw new Error("Unknown service name to point hashtag to: "+e)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(I$g),O$g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.mention="",i.mention=t.mention,i.serviceName=t.serviceName,i}return K$g(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var t=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&t.push(i),t},t}(I$g),P$g=function(e){function t(t){var i=e.call(this,t)||this;return i.number="",i.plusSign=!1,i.number=t.number,i.plusSign=t.plusSign,i}return K$g(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(I$g),Q$g=function(e){function t(t){var i=e.call(this,t)||this;return i.url="",i.urlMatchType="scheme",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\/\/)?/i,i.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,i.protocolRelativeRegex=/^\/\//,i.protocolPrepended=!1,i.urlMatchType=t.urlMatchType,i.url=t.url,i.protocolUrlMatch=t.protocolUrlMatch,i.protocolRelativeMatch=t.protocolRelativeMatch,i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return K$g(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var e=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(e=this.url="http://"+e,this.protocolPrepended=!0),e},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&amp;/g,"&")},t.prototype.getAnchorText=function(){var e=this.getMatchedText();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix.scheme&&(e=this.stripSchemePrefix(e)),this.stripPrefix.www&&(e=this.stripWwwPrefix(e)),this.stripTrailingSlash&&(e=this.removeTrailingSlash(e)),this.decodePercentEncoding&&(e=this.removePercentEncoding(e)),e},t.prototype.stripSchemePrefix=function(e){return e.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(e){return e.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(e){return e.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e},t.prototype.removePercentEncoding=function(e){var t=e.replace(/%22/gi,"&quot;").replace(/%26/gi,"&amp;").replace(/%27/gi,"&#39;").replace(/%3C/gi,"&lt;").replace(/%3E/gi,"&gt;");try{return decodeURIComponent(t)}catch(e){return t}},t}(I$g),R$g=function(e){this.__jsduckDummyDocProp=null,this.tagBuilder=e.tagBuilder},S$g=/[A-Za-z]/,T$g=/[0-9]/,U$g=/\s/,V$g=/['"]/,W$g=/[\x00-\x1F\x7F]/,c_g="(?:["+(_$g=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source)+"]{1,3}\\.){3}["+_$g+"]{1,3}",d_g="["+(b_g=a_g=(X$g=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source)+/\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source+_$g)+"](?:["+b_g+"\\-]{0,61}["+b_g+"])?",e_g=function(e){return"(?=("+d_g+"))\\"+e},f_g=function(e){return"(?:"+e_g(e)+"(?:\\."+e_g(e+1)+"){0,126}|"+c_g+")"},g_g=new RegExp("["+b_g+"]"),h_g=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,i_g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.localPartCharRegex=new RegExp("["+b_g+"!#$%&'*+/=?^_`{|}~-]"),t.strictTldRegex=new RegExp("^"+h_g.source+"$"),t}return K$g(t,e),t.prototype.parseMatches=function(e){for(var t,i,r,n,a,o,s,l,c,u=this.tagBuilder,d=this.localPartCharRegex,h=this.strictTldRegex,p=[],f=e.length,m=new j_g,g={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},y=0,_=0,v=m;y<f;){var C=e.charAt(y);switch(_){case 0:"m"===(c=C)?x(1):d.test(c)&&x();break;case 1:l=C,":"===(s=e.charAt(y-1))?d.test(l)?(_=2,v=new j_g(L$g({},v,{hasMailtoPrefix:!0}))):b():g[s]===l||(d.test(l)?_=2:"."===l?_=3:"@"===l?_=4:b());break;case 2:"."===(o=C)?_=3:"@"===o?_=4:d.test(o)||b();break;case 3:"."!==(a=C)&&"@"!==a&&d.test(a)?_=2:b();break;case 4:n=C,g_g.test(n)?_=5:b();break;case 5:"."===(r=C)?_=7:"-"===r?_=6:g_g.test(r)||S();break;case 6:"-"!==(i=C)&&"."!==i&&g_g.test(i)?_=5:S();break;case 7:"."!==(t=C)&&"-"!==t&&g_g.test(t)?(_=5,v=new j_g(L$g({},v,{hasDomainDot:!0}))):S();break;default:C$g(_)}y++}return S(),p;function x(e){void 0===e&&(e=2),_=e,v=new j_g({idx:y})}function b(){_=0,v=m}function S(){var t,i;v.hasDomainDot&&(t=e.slice(v.idx,y),/[-.]$/.test(t)&&(t=t.slice(0,-1)),function(e){return e=(e.split(".").pop()||"").toLowerCase(),h.test(e)}(i=v.hasMailtoPrefix?t.slice("mailto:".length):t)&&p.push(new M$g({tagBuilder:u,matchedText:t,offset:v.idx,email:i}))),b()}},t}(R$g),j_g=function(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.hasMailtoPrefix=!!e.hasMailtoPrefix,this.hasDomainDot=!!e.hasDomainDot},k_g=function(){function e(){}return e.isValid=function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},e.isValidIpAddress=function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==e.match(t)},e.containsMultipleDots=function(e){var t=e;return this.hasFullProtocolRegex.test(e)&&(t=e.split("://")[1]),-1<t.split("/")[0].indexOf("..")},e.isValidUriScheme=function(e){return"javascript:"!==(e=(e=e.match(this.uriSchemeRegex))&&e[0].toLowerCase())&&"vbscript:"!==e},e.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t||this.hasWordCharAfterProtocolRegex.test(e))},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+X$g+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),l_g=function(e){function t(t){var i,r=e.call(this,t)||this;return r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.matcherRegex=(i=new RegExp("[/?#](?:["+b_g+"\\-+&@#/%=~_()|'$*\\[\\]?!:,.;✓]*["+b_g+"\\-+&@#/%=~_()|'$*\\[\\]✓])?"),new RegExp(["(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,f_g(2),")","|","(","(//)?",/(?:www\.)/.source,f_g(6),")","|","(","(//)?",f_g(10)+"\\.",h_g.source,"(?![-"+a_g+"])",")",")","(?::[0-9]+)?","(?:"+i.source+")?"].join(""),"gi")),r.wordCharRegExp=new RegExp("["+b_g+"]"),r.stripPrefix=t.stripPrefix,r.stripTrailingSlash=t.stripTrailingSlash,r.decodePercentEncoding=t.decodePercentEncoding,r}return K$g(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,r=this.stripPrefix,n=this.stripTrailingSlash,a=this.decodePercentEncoding,o=this.tagBuilder,s=[],l=this;null!==(t=i.exec(e));)!function(){var i=t[0],c=t[1],u=t[4],d=t[5],h=t[9],p=t.index;d=d||h,h=e.charAt(p-1);if(k_g.isValid(i,c)&&!(0<p&&"@"===h||0<p&&d&&l.wordCharRegExp.test(h))){/\?$/.test(i)&&(i=i.substr(0,i.length-1)),l.matchHasUnbalancedClosingParen(i)?i=i.substr(0,i.length-1):-1<(f=l.matchHasInvalidCharAfterTld(i,c))&&(i=i.substr(0,f));var f=["http://","https://"].find((function(e){return!!c&&-1!==c.indexOf(e)}));f&&(m=i.indexOf(f),i=i.substr(m),c=c.substr(m),p+=m);var m=c?"scheme":u?"www":"tld";u=!!c;s.push(new Q$g({tagBuilder:o,matchedText:i,offset:p,urlMatchType:m,url:i,protocolUrlMatch:u,protocolRelativeMatch:!!d,stripPrefix:r,stripTrailingSlash:n,decodePercentEncoding:a}))}}();return s},t.prototype.matchHasUnbalancedClosingParen=function(e){var t,i=e.charAt(e.length-1);if(")"===i)t="(";else{if("]"!==i)return!1;t="["}for(var r=0,n=0,a=e.length-1;n<a;n++){var o=e.charAt(n);o===t?r++:o===i&&(r=Math.max(r-1,0))}return 0===r},t.prototype.matchHasInvalidCharAfterTld=function(e,t){if(!e)return-1;var i=0;return t&&(i=e.indexOf(":"),e=e.slice(i)),null===(t=new RegExp("^((.?//)?[-."+b_g+"]*[-"+b_g+"]\\.[-"+b_g+"]+)").exec(e))?-1:(i+=t[1].length,e=e.slice(t[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(e)?i:-1)},t}(R$g),m_g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegex=new RegExp("#[_"+b_g+"]{1,139}(?![_"+b_g+"])","g"),i.nonWordCharRegex=new RegExp("[^"+b_g+"]"),i.serviceName=t.serviceName,i}return K$g(t,e),t.prototype.parseMatches=function(e){for(var t=this.matcherRegex,i=this.nonWordCharRegex,r=this.serviceName,n=this.tagBuilder,a=[];null!==(o=t.exec(e));){var o,s=o.index,l=e.charAt(s-1);0!==s&&!i.test(l)||(l=o[0],o=o[0].slice(1),a.push(new N$g({tagBuilder:n,matchedText:l,offset:s,serviceName:r,hashtag:o})))}return a},t}(R$g),n_g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.matcherRegex=/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/g,t}return K$g(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,r=this.tagBuilder,n=[];null!==(t=i.exec(e));){var a=t[0],o=a.replace(/[^0-9,;#]/g,""),s=!(!t[1]&&!t[2]),l=0==t.index?"":e.substr(t.index-1,1),c=e.substr(t.index+a.length,1);c=!l.match(/\d/)&&!c.match(/\d/);this.testMatch(t[3])&&this.testMatch(a)&&c&&n.push(new P$g({tagBuilder:r,matchedText:a,offset:t.index,number:o,plusSign:s}))}return n},t.prototype.testMatch=function(e){return/\D/.test(e)},t}(R$g),o_g=function(e){function t(t){var i=e.call(this,t)||this;return i.serviceName="twitter",i.matcherRegexes={twitter:new RegExp("@[_"+b_g+"]{1,50}(?![_"+b_g+"])","g"),instagram:new RegExp("@[_."+b_g+"]{1,30}(?![_"+b_g+"])","g"),soundcloud:new RegExp("@[-_."+b_g+"]{1,50}(?![-_"+b_g+"])","g")},i.nonWordCharRegex=new RegExp("[^"+b_g+"]"),i.serviceName=t.serviceName,i}return K$g(t,e),t.prototype.parseMatches=function(e){var t=this.serviceName,i=this.matcherRegexes[this.serviceName],r=this.nonWordCharRegex,n=this.tagBuilder,a=[];if(!i)return a;for(;null!==(o=i.exec(e));){var o,s=o.index,l=e.charAt(s-1);0!==s&&!r.test(l)||(o=(l=o[0].replace(/\.+$/g,"")).slice(1),a.push(new O$g({tagBuilder:n,matchedText:l,offset:s,serviceName:t,mention:o})))}return a},t}(R$g),q_g=function(e){void 0===e&&(e={}),this.idx=void 0!==e.idx?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing},function(){function e(t){void 0===t&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(t.urls),this.email=("boolean"==typeof t.email?t:this).email,this.phone=("boolean"==typeof t.phone?t:this).phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=("boolean"==typeof t.newWindow?t:this).newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(t.stripPrefix),this.stripTrailingSlash=("boolean"==typeof t.stripTrailingSlash?t:this).stripTrailingSlash,this.decodePercentEncoding=("boolean"==typeof t.decodePercentEncoding?t:this).decodePercentEncoding;var i=this.mention;if(!1!==i&&"twitter"!==i&&"instagram"!==i&&"soundcloud"!==i)throw new Error("invalid `mention` cfg - see docs");if(!1!==(i=this.hashtag)&&"twitter"!==i&&"facebook"!==i&&"instagram"!==i)throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,i){return new e(i).link(t)},e.parse=function(t,i){return new e(i).parse(t)},e.prototype.normalizeUrlsCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:"boolean"!=typeof e.schemeMatches||e.schemeMatches,wwwMatches:"boolean"!=typeof e.wwwMatches||e.wwwMatches,tldMatches:"boolean"!=typeof e.tldMatches||e.tldMatches}},e.prototype.normalizeStripPrefixCfg=function(e){return null==e&&(e=!0),"boolean"==typeof e?{scheme:e,www:e}:{scheme:"boolean"!=typeof e.scheme||e.scheme,www:"boolean"!=typeof e.www||e.www}},e.prototype.normalizeTruncateCfg=function(e){return"number"==typeof e?{length:e,location:"end"}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&void 0===e[i]&&(e[i]=t[i]);return e}(e||{},{length:Number.POSITIVE_INFINITY,location:"end"})},e.prototype.parse=function(e){var t=this,i=["a","style","script"],r=0,n=[];return function(e,t){for(var i=t.onOpenTag,r=t.onCloseTag,n=t.onText,a=t.onComment,o=t.onDoctype,s=new q_g,l=0,c=e.length,u=0,d=0,h=s;l<c;){var p=e.charAt(l);switch(u){case 0:!function(e){"<"===e&&m()}(p);break;case 1:!function(e){"!"===e?u=13:"/"===e?(u=2,h=new q_g(L$g({},h,{isClosing:!0}))):"<"===e?m():h=S$g.test(e)?(u=3,new q_g(L$g({},h,{isOpening:!0}))):(u=0,s)}(p);break;case 2:!function(e){">"!==e&&S$g.test(e)?u=3:f()}(p);break;case 3:!function(e){U$g.test(e)?(h=new q_g(L$g({},h,{name:y()})),u=4):"<"===e?m():"/"===e?(h=new q_g(L$g({},h,{name:y()})),u=12):">"===e?(h=new q_g(L$g({},h,{name:y()})),g()):S$g.test(e)||T$g.test(e)||":"===e||f()}(p);break;case 4:!function(e){U$g.test(e)||("/"===e?u=12:">"===e?g():"<"===e?m():"="===e||V$g.test(e)||W$g.test(e)?f():u=5)}(p);break;case 5:!function(e){U$g.test(e)?u=6:"/"===e?u=12:"="===e?u=7:">"===e?g():"<"===e?m():V$g.test(e)&&f()}(p);break;case 6:!function(e){U$g.test(e)||("/"===e?u=12:"="===e?u=7:">"===e?g():"<"===e?m():V$g.test(e)?f():u=5)}(p);break;case 7:!function(e){U$g.test(e)||('"'===e?u=8:"'"===e?u=9:/[>=`]/.test(e)?f():"<"===e?m():u=10)}(p);break;case 8:!function(e){'"'===e&&(u=11)}(p);break;case 9:!function(e){"'"===e&&(u=11)}(p);break;case 10:!function(e){U$g.test(e)?u=4:">"===e?g():"<"===e&&m()}(p);break;case 11:!function(e){U$g.test(e)?u=4:"/"===e?u=12:">"===e?g():"<"===e?m():(u=4,l--)}(p);break;case 12:!function(e){">"===e?(h=new q_g(L$g({},h,{isClosing:!0})),g()):u=4}(p);break;case 13:"--"===e.substr(l,2)?(l+=2,h=new q_g(L$g({},h,{type:"comment"})),u=14):"DOCTYPE"===e.substr(l,7).toUpperCase()?(l+=7,h=new q_g(L$g({},h,{type:"doctype"})),u=20):f();break;case 14:!function(e){"-"===e?u=15:">"===e?f():u=16}(p);break;case 15:!function(e){"-"===e?u=18:">"===e?f():u=16}(p);break;case 16:!function(e){"-"===e&&(u=17)}(p);break;case 17:!function(e){u="-"===e?18:16}(p);break;case 18:!function(e){">"===e?g():"!"===e?u=19:"-"===e||(u=16)}(p);break;case 19:!function(e){"-"===e?u=17:">"===e?g():u=16}(p);break;case 20:!function(e){">"===e?g():"<"===e&&m()}(p);break;default:C$g(u)}l++}function f(){u=0,h=s}function m(){u=1,h=new q_g({idx:l})}function g(){var t=e.slice(d,h.idx);t&&n(t,d),"comment"===h.type?a(h.idx):"doctype"===h.type?o(h.idx):(h.isOpening&&i(h.name,h.idx),h.isClosing&&r(h.name,h.idx)),f(),d=l+1}function y(){var t=h.idx+(h.isClosing?2:1);return e.slice(t,l).toLowerCase()}d<l&&function(){var t=e.slice(d,l);n(t,d),d=l+1}()}(e,{onOpenTag:function(e){0<=i.indexOf(e)&&r++},onText:function(e,i){var a;0===r&&(e=function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,r=[],n=0;i=t.exec(e);)r.push(e.substring(n,i.index)),r.push(i[0]),n=i.index+i[0].length;return r.push(e.substring(n)),r}(e,/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi),a=i,e.forEach((function(e,i){i%2==0&&(i=t.parseText(e,a),n.push.apply(n,i)),a+=e.length})))},onCloseTag:function(e){0<=i.indexOf(e)&&(r=Math.max(r-1,0))},onComment:function(e){},onDoctype:function(e){}}),n=this.compactMatches(n),n=this.removeUnwantedMatches(n)},e.prototype.compactMatches=function(e){e.sort((function(e,t){return e.getOffset()-t.getOffset()}));for(var t=0;t<e.length-1;t++){var i=(n=e[t]).getOffset(),r=n.getMatchedText().length,n=i+r;t+1<e.length&&(e[t+1].getOffset()!==i?e[t+1].getOffset()<n&&e.splice(t+1,1):(r=e[t+1].getMatchedText().length>r?t:t+1,e.splice(r,1)))}return e},e.prototype.removeUnwantedMatches=function(e){return this.hashtag||A$g(e,(function(e){return"hashtag"===e.getType()})),this.email||A$g(e,(function(e){return"email"===e.getType()})),this.phone||A$g(e,(function(e){return"phone"===e.getType()})),this.mention||A$g(e,(function(e){return"mention"===e.getType()})),this.urls.schemeMatches||A$g(e,(function(e){return"url"===e.getType()&&"scheme"===e.getUrlMatchType()})),this.urls.wwwMatches||A$g(e,(function(e){return"url"===e.getType()&&"www"===e.getUrlMatchType()})),this.urls.tldMatches||A$g(e,(function(e){return"url"===e.getType()&&"tld"===e.getUrlMatchType()})),e},e.prototype.parseText=function(e,t){void 0===t&&(t=0),t=t||0;for(var i=this.getMatchers(),r=[],n=0,a=i.length;n<a;n++){for(var o=i[n].parseMatches(e),s=0,l=o.length;s<l;s++)o[s].setOffset(t+o[s].getOffset());r.push.apply(r,o)}return r},e.prototype.link=function(e){if(!e)return"";for(var t=this.parse(e),i=[],r=0,n=0,a=t.length;n<a;n++){var o=t[n];i.push(e.substring(r,o.getOffset())),i.push(this.createMatchReturnVal(o)),r=o.getOffset()+o.getMatchedText().length}return i.push(e.substring(r)),i.join("")},e.prototype.createMatchReturnVal=function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this.context,e)),"string"==typeof t?t:!1===t?e.getMatchedText():(t instanceof D$g?t:e.buildTag()).toAnchorString()},e.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder();e=[new m_g({tagBuilder:e,serviceName:this.hashtag}),new i_g({tagBuilder:e}),new n_g({tagBuilder:e}),new o_g({tagBuilder:e,serviceName:this.mention}),new l_g({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=e},e.prototype.getTagBuilder=function(){return this.tagBuilder||(this.tagBuilder=new H$g({newWindow:this.newWindow,truncate:this.truncate,className:this.className}))},e.version="3.11.0",e.AnchorTagBuilder=H$g,e.HtmlTag=D$g,e.matcher={Email:i_g,Hashtag:m_g,Matcher:R$g,Mention:o_g,Phone:n_g,Url:l_g},e.match={Email:M$g,Hashtag:N$g,Match:I$g,Mention:O$g,Phone:P$g,Url:Q$g},e}());var Autolinker=tmp$4.Autolinker,tmp$5={};!function(e){var t,i,r="File format is not recognized.",n="Error while reading zip file.",a="Error while reading file data.",o=524288,s="text/plain",l="message";try{t=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch(i){}function c(){var e=-1,t=this;t.append=function(i){for(var r=t.table,n=0;n<i.length;n++)e=e>>>8^r[255&(e^i[n])]},t.get=function(){return~e}}function u(e,t){var i=new ArrayBuffer(e);e=new Uint8Array(i);return t&&e.set(t,0),{buffer:i,array:e,view:new DataView(i)}}function d(){}function h(e){var t,i=this;i.size=0,i.init=function(r,n){var a=new Blob([e],{type:s});(t=new f(a)).init((function(){i.size=t.size,r()}),n)},i.readUint8Array=function(e,i,r,n){t.readUint8Array(e,i,r,n)}}function p(e){var t,i=this;i.size=0,i.init=function(r){for(var n=e.length;"="==e.charAt(n-1);)n--;t=e.indexOf(",")+1,i.size=Math.floor(.75*(n-t)),r()},i.readUint8Array=function(i,r,n){for(var a=u(r),o=4*Math.floor(i/3),s=4*Math.ceil((i+r)/3),l=window.atob(e.substring(o+t,s+t)),c=i-3*Math.floor(o/4),d=c;d<c+r;d++)a.array[d-c]=l.charCodeAt(d);n(a.array)}}function f(e){this.size=0,this.init=function(t){this.size=e.size,t()},this.readUint8Array=function(t,i,r,n){var a;(a=new FileReader).onload=function(e){r(new Uint8Array(e.target.result))},a.onerror=n,a.readAsArrayBuffer((a=t,t=i,(i=e).slice?i.slice(a,a+t):i.webkitSlice?i.webkitSlice(a,a+t):i.mozSlice?i.mozSlice(a,a+t):i.msSlice?i.msSlice(a,a+t):void 0))}}function m(){}function g(e){var i;this.init=function(e){i=new Blob([],{type:s}),e()},this.writeUint8Array=function(e,r){i=new Blob([i,t?e:e.buffer],{type:s}),r()},this.getData=function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=r,n.readAsText(i,e)}}function y(e){var t="",i="";this.init=function(i){t+="data:"+(e||"")+";base64,",i()},this.writeUint8Array=function(e,r){var n,a=i.length,o=i;for(i="",n=0;n<3*Math.floor((a+e.length)/3)-a;n++)o+=String.fromCharCode(e[n]);for(;n<e.length;n++)i+=String.fromCharCode(e[n]);2<o.length?t+=window.btoa(o):i=o,r()},this.getData=function(e){e(t+window.btoa(i))}}function _(e){var i;this.init=function(t){i=new Blob([],{type:e}),t()},this.writeUint8Array=function(r,n){i=new Blob([i,t?r:r.buffer],{type:e}),n()},this.getData=function(e){e(i)}}function v(e,t,i,r,n,a,s,c,u,d){var h,p,f=0;function m(){e.removeEventListener(l,g,!1),c(p)}function g(e){var t=(e=e.data).data;e.onappend&&(p+=t.length,i.writeUint8Array(t,(function(){a(!1,t),y()}),d)),e.onflush&&(t?(p+=t.length,i.writeUint8Array(t,(function(){a(!1,t),m()}),d)):m()),e.progress&&s&&s(h+e.current,n)}function y(){(h=f*o)<n?t.readUint8Array(r+h,Math.min(o,n-h),(function(t){e.postMessage({append:!0,data:t}),f++,s&&s(h,n),a(!0,t)}),u):e.postMessage({flush:!0})}p=0,e.addEventListener(l,g,!1),y()}function C(e,t,i,r,n,a,s,l,c,u){var d,h=0,p=0;!function f(){var m;(d=h*o)<n?t.readUint8Array(r+d,Math.min(o,n-d),(function(t){var o=e.append(t,(function(){s&&s(r+d,n)}));p+=o.length,a(!0,t),i.writeUint8Array(o,(function(){a(!1,o),h++,setTimeout(f,1)}),u),s&&s(d,n)}),c):(m=e.flush())?(p+=m.length,i.writeUint8Array(m,(function(){a(!1,m),l(p)}),u)):l(p)}()}function x(e,t,i,r,n,a,s,l,u){var d=0,h=new c;!function c(){var p=d*o;p<r?e.readUint8Array(i+p,Math.min(o,r-p),(function(e){n&&h.append(e),s&&s(p,r,e),t.writeUint8Array(e,(function(){d++,c()}),u)}),l):a(r,h.get())}()}function b(e){for(var t,i="",r=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "],n=0;n<e.length;n++)i+=127<(t=255&e.charCodeAt(n))?r[t-128]:String.fromCharCode(t);return i}function S(e){return decodeURIComponent(escape(e))}function T(e){for(var t="",i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return t}function E(e,t,i,r,n){e.version=t.view.getUint16(i,!0),e.bitFlag=t.view.getUint16(i+2,!0),e.compressionMethod=t.view.getUint16(i+4,!0),e.lastModDateRaw=t.view.getUint32(i+6,!0),e.lastModDate=function(e){var t=(4294901760&e)>>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch(e){}}(e.lastModDateRaw),1!=(1&e.bitFlag)?(!r&&8==(8&e.bitFlag)||(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(i+22,!0),e.extraFieldLength=t.view.getUint16(i+24,!0)):n("File is using Zip64 (4gb+ file size).")):n("File contains encrypted entry.")}function w(t,i){function o(){}return o.prototype.getData=function(n,o,s,l){var d,h=this;function p(e,t){d&&d.terminate(),d=null,e&&e(t)}function f(e,t){var i;l&&(i=t,(t=u(4)).view.setUint32(0,i),h.crc32!=t.view.getUint32(0))?m():n.getData((function(e){p(o,e)}))}function m(){p(i,a)}function g(){p(i,"Error while writing file data.")}t.readUint8Array(h.offset,30,(function(a){var o;1347093252==(a=u(a.length,a)).view.getUint32(0)?(E(h,a,4,!1,i),o=h.offset+30+h.filenameLength+h.extraFieldLength,n.init((function(){function i(e,t){_&&!e&&A.append(t)}function r(e){b(e,A.get())}var a,u,p,y,_,b,S,T,E,w,A;0===h.compressionMethod?x(t,n,o,h.compressedSize,l,f,s,m,g):(a=t,u=n,p=o,y=h.compressedSize,_=l,b=f,S=s,T=m,E=g,A=new c,e.zip.useWebWorkers?v(w=new Worker(e.zip.workerScriptsPath+"inflate.js"),a,u,p,y,i,S,r,T,E):C(new e.zip.Inflater,a,u,p,y,i,S,r,T,E),d=w)}),g)):i(r)}),m)},{getEntries:function(e){t.size<22?i(r):function e(r,a){t.readUint8Array(t.size-r,r,(function(t){1347093766!=(t=u(t.length,t).view).getUint32(0)?e(r+1,a):a(t)}),(function(){i(n)}))}(22,(function(a){var s=a.getUint32(16,!0),l=a.getUint16(8,!0);t.readUint8Array(s,t.size-s,(function(t){for(var n,a,s=0,c=[],d=u(t.length,t),h=0;h<l;h++){if(n=new o,1347092738!=d.view.getUint32(s))return void i(r);E(n,d,s+6,!0,i),n.commentLength=d.view.getUint16(s+32,!0),n.directory=16==(16&d.view.getUint8(s+38)),n.offset=d.view.getUint32(s+42,!0),a=T(d.array.subarray(s+46,s+46+n.filenameLength)),n.filename=(2048==(2048&n.bitFlag)?S:b)(a),n.directory||"/"!=n.filename.charAt(n.filename.length-1)||(n.directory=!0),a=T(d.array.subarray(s+46+n.filenameLength+n.extraFieldLength,s+46+n.filenameLength+n.extraFieldLength+n.commentLength)),n.comment=(2048==(2048&n.bitFlag)?S:b)(a),c.push(n),s+=46+n.filenameLength+n.extraFieldLength+n.commentLength}e(c)}),(function(){i(n)}))}))},close:function(e){e&&e()}}}function A(e){return unescape(encodeURIComponent(e))}function P(e){for(var t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i));return t}function D(t,i,r){var n,o={},s=[],d=0;function h(e,t){n&&n.terminate(),n=null,e&&e(t)}function p(){h(i,"Error while writing zip file.")}function f(){h(i,a)}return{add:function(a,m,g,y,_){var b,S,T;function E(e,i){var r=u(16);d+=e||0,r.view.setUint32(0,1347094280),void 0!==i&&(b.view.setUint32(10,i,!0),r.view.setUint32(4,i,!0)),m&&(r.view.setUint32(8,e,!0),b.view.setUint32(14,e,!0),r.view.setUint32(12,m.size,!0),b.view.setUint32(18,m.size,!0)),t.writeUint8Array(r.array,(function(){d+=16,h(g)}),p)}function w(){var h,g;_=_||{},a=a.trim(),_.directory&&"/"!=a.charAt(a.length-1)&&(a+="/"),o.hasOwnProperty(a)?i("File already exists."):(S=P(A(a)),s.push(a),h=function(){function i(e,t){e&&T.append(t)}function a(e){d(e,T.get())}var o,s,u,d,h,g,b,S,T;m?r||0===_.level?x(m,t,0,m.size,!0,E,y,f,p):(o=m,s=t,u=_.level,d=E,h=y,g=f,b=p,T=new c,e.zip.useWebWorkers?((S=new Worker(e.zip.workerScriptsPath+"deflate.js")).addEventListener(l,(function e(){S.removeEventListener(l,e,!1),v(S,o,s,0,o.size,i,h,a,g,b)}),!1),S.postMessage({init:!0,level:u})):C(new e.zip.Deflater,o,s,0,o.size,i,h,a,g,b),n=S):E()},T=_.lastModDate||new Date,b=u(26),o[a]={headerArray:b.array,directory:_.directory,filename:S,offset:d,comment:P(A(_.comment||""))},b.view.setUint32(0,335546376),_.version&&b.view.setUint8(0,_.version),r||0===_.level||_.directory||b.view.setUint16(4,2048),b.view.setUint16(6,(T.getHours()<<6|T.getMinutes())<<5|T.getSeconds()/2,!0),b.view.setUint16(8,(T.getFullYear()-1980<<4|T.getMonth()+1)<<5|T.getDate(),!0),b.view.setUint16(22,S.length,!0),(g=u(30+S.length)).view.setUint32(0,1347093252),g.array.set(b.array,4),g.array.set(S,30),d+=g.array.length,t.writeUint8Array(g.array,h,p))}m?m.init(w,f):w()},close:function(e){for(var i,r,n=0,a=0,l=0;l<s.length;l++)n+=46+(r=o[s[l]]).filename.length+r.comment.length;for(i=u(n+22),l=0;l<s.length;l++)r=o[s[l]],i.view.setUint32(a,1347092738),i.view.setUint16(a+4,5120),i.array.set(r.headerArray,a+6),i.view.setUint16(a+32,r.comment.length,!0),r.directory&&i.view.setUint8(a+38,16),i.view.setUint32(a+42,r.offset,!0),i.array.set(r.filename,a+46),i.array.set(r.comment,a+46+r.filename.length),a+=46+r.filename.length+r.comment.length;i.view.setUint32(a,1347093766),i.view.setUint16(a+8,s.length,!0),i.view.setUint16(a+10,s.length,!0),i.view.setUint32(a+12,n,!0),i.view.setUint32(a+16,d,!0),t.writeUint8Array(i.array,(function(){h((function(){t.getData(e)}))}),p)}}}c.prototype.table=function(){for(var e,t,i=[],r=0;r<256;r++){for(t=r,e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;i[r]=t}return i}(),(h.prototype=new d).constructor=h,(p.prototype=new d).constructor=p,(f.prototype=new d).constructor=f,m.prototype.getData=function(e){e(this.data)},(g.prototype=new m).constructor=g,(y.prototype=new m).constructor=y,(_.prototype=new m).constructor=_,e.zip={Reader:d,Writer:m,BlobReader:f,Data64URIReader:p,TextReader:h,BlobWriter:_,Data64URIWriter:y,TextWriter:g,createReader:function(e,t,i){e.init((function(){t(w(e,i))}),i)},createWriter:function(e,t,i,r){e.init((function(){t(D(e,i,r))}),i)},useWebWorkers:!0},Object.defineProperties(e.zip,{workerScriptsPath:{get:function(){return void 0===i&&(i=buildModuleUrl("ThirdParty/Workers/")),i}}})}(tmp$5);var zip=tmp$5.zip;function KmlLookAt(e,t){this.position=e,this.headingPitchRange=t}function KmlTour(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new Event,this.tourEnd=new Event,this.entryStart=new Event,this.entryEnd=new Event,this._activeEntries=[]}function cancelAllEntries(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function playEntry(e,t,i){var r,n,a=this.playlist[this.playlistIndex];a?(r=playNext.bind(this,e,t,i),this._activeEntries.push(a),this.entryStart.raiseEvent(a),a.blocking?a.play(r,e.scene.camera,t):(n=this,a.play((function(){n.entryEnd.raiseEvent(a);var e=n._activeEntries.indexOf(a);0<=e&&n._activeEntries.splice(e,1)})),r(e,t,i))):defined(i)&&i(!1)}function playNext(e,t,i,r){var n=this.playlist[this.playlistIndex];this.entryEnd.raiseEvent(n,r),r?i(r):(0<=(n=this._activeEntries.indexOf(n))&&this._activeEntries.splice(n,1),this.playlistIndex++,playEntry.call(this,e,t,i))}function KmlTourFlyTo(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}function KmlTourWait(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}KmlTour.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},KmlTour.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;playEntry.call(this,e,t,(function(e){i.playlistIndex=0,e||cancelAllEntries(i._activeEntries),i.tourEnd.raiseEvent(e)}))},KmlTour.prototype.stop=function(){cancelAllEntries(this._activeEntries)},KmlTourFlyTo.prototype.play=function(e,t,i){var r;this.activeCamera=t,defined(e)&&null!==e&&((r=this).activeCallback=function(t){delete r.activeCallback,delete r.activeCamera,e(!defined(t)&&t)});var n=this.getCameraOptions(i);this.view.headingPitchRoll?t.flyTo(n):this.view.headingPitchRange&&(i=new BoundingSphere(this.view.position),t.flyToBoundingSphere(i,n))},KmlTourFlyTo.prototype.stop=function(){defined(this.activeCamera)&&this.activeCamera.cancelFlight(),defined(this.activeCallback)&&this.activeCallback(!0)},KmlTourFlyTo.prototype.getCameraOptions=function(e){var t={duration:this.duration};return defined(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=EasingFunction$1.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),defined(e)&&(t=combine(t,e)),t},KmlTourWait.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout((function(){delete t.activeCallback,e(!1)}),1e3*this.duration)},KmlTourWait.prototype.stop=function(){clearTimeout(this.timeout),defined(this.activeCallback)&&this.activeCallback(!0)};var MimeTypes={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){return e=getExtensionFromUri(e=e.toLowerCase()),MimeTypes[e]}},parser;"undefined"!=typeof DOMParser&&(parser=new DOMParser);var autolinker=new Autolinker({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),BILLBOARD_SIZE=32,BILLBOARD_NEAR_DISTANCE=2414016,BILLBOARD_NEAR_RATIO=1,BILLBOARD_FAR_DISTANCE=16093e3,BILLBOARD_FAR_RATIO=.1,kmlNamespaces=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],gxNamespaces=["http://www.google.com/kml/ext/2.2"],atomNamespaces=["http://www.w3.org/2005/Atom"],namespaces={kml:kmlNamespaces,gx:gxNamespaces,atom:atomNamespaces,kmlgx:kmlNamespaces.concat(gxNamespaces)},featureTypes={Document:processDocument$1,Folder:processFolder,Placemark:processPlacemark,NetworkLink:processNetworkLink,GroundOverlay:processGroundOverlay,PhotoOverlay:processUnsupportedFeature,ScreenOverlay:processUnsupportedFeature,Tour:processTour};function DeferredLoading(e){this._dataSource=e,this._deferred=when.defer(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function isZipFile(e){e=e.slice(0,Math.min(4,e.size));var t=when.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(1347093252===new DataView(i.result).getUint32(0,!1))})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsArrayBuffer(e),t.promise}function readBlobAsText(e){var t=when.defer(),i=new FileReader;return i.addEventListener("load",(function(){t.resolve(i.result)})),i.addEventListener("error",(function(){t.reject(i.error)})),i.readAsText(e),t.promise}function insertNamespaces(e){var t,i,r,n,a={xsi:"http://www.w3.org/2001/XMLSchema-instance"};for(n in a)a.hasOwnProperty(n)&&(r="xmlns:"+n+"=",RegExp("[< ]"+n+":").test(e)&&-1===e.indexOf(r)&&(defined(t)||(t=e.substr(0,e.indexOf("<kml")+4),i=e.substr(t.length)),t+=" "+r+'"'+a[n]+'"'));return defined(t)&&(e=t+i),e}function removeDuplicateNamespaces(e){for(var t,i,r=e.indexOf("xmlns:"),n=e.indexOf(">",r);-1!==r&&r<n;)i=e.slice(r,e.indexOf('"',r)),t=r,r=-1!==(r=e.indexOf(i,r+1))?(i=e.indexOf('"',e.indexOf('"',r)+1),(e=e.slice(0,r-1)+e.slice(i+1,e.length)).indexOf("xmlns:",t-1)):e.indexOf("xmlns:",t+1);return e}function loadXmlFromZip(e,t,i){e.getData(new zip.TextWriter,(function(e){e=removeDuplicateNamespaces(e=insertNamespaces(e)),t.kml=parser.parseFromString(e,"application/xml"),i.resolve()}))}function loadDataUriFromZip(e,t,i){var r=defaultValue(MimeTypes.detectFromFilename(e.filename),"application/octet-stream");e.getData(new zip.Data64URIWriter(r),(function(r){t[e.filename]=r,i.resolve()}))}function embedDataUris(e,t,i,r){for(var n=r.keys,a=new URI("."),o=e.querySelectorAll(t),s=0;s<o.length;s++){var l=o[s],c=new URI(l.getAttribute(i)).resolve(a).toString();-1!==(c=n.indexOf(c))&&(c=n[c],l.setAttribute(i,r[c]),"a"===t&&null===l.getAttribute("download")&&l.setAttribute("download",c))}}function applyBasePath(e,t,i,r){for(var n=e.querySelectorAll(t),a=0;a<n.length;a++){var o=n[a],s=resolveHref(o.getAttribute(i),r);o.setAttribute(i,s.url)}}function createEntity(e,t,i){var r=defined(r=queryStringAttribute(e,"id"))&&0!==r.length?r:createGuid();return defined(i)&&(r=i+r),defined(e=t.getById(r))&&(r=createGuid(),defined(i)&&(r=i+r)),defined((e=t.add(new Entity({id:r}))).kml)||(e.addProperty("kml"),e.kml=new KmlFeatureData),e}function isExtrudable(e,t){return"absolute"===e||"relativeToGround"===e||"relativeToSeaFloor"===t}function readCoordinate(e,t){if(!defined(e))return Cartesian3.fromDegrees(0,0,0,t);if(!defined(r=e.match(/[^\s,\n]+/g)))return Cartesian3.fromDegrees(0,0,0,t);var i=parseFloat(r[0]),r=(e=parseFloat(r[1]),parseFloat(r[2]));i=isNaN(i)?0:i,e=isNaN(e)?0:e,r=isNaN(r)?0:r;return Cartesian3.fromDegrees(i,e,r,t)}function readCoordinates(e,t){if(defined(e)){var i=e.textContent.match(/[^\s\n]+/g);if(defined(i)){for(var r=i.length,n=new Array(r),a=0,o=0;o<r;o++)n[a++]=readCoordinate(i[o],t);return n}}}function queryNumericAttribute(e,t){if(defined(e)&&null!==(t=e.getAttribute(t)))return t=parseFloat(t),isNaN(t)?void 0:t}function queryStringAttribute(e,t){if(defined(e))return null!==(t=e.getAttribute(t))?t:void 0}function queryFirstNode(e,t,i){if(defined(e))for(var r=e.childNodes,n=r.length,a=0;a<n;a++){var o=r[a];if(o.localName===t&&-1!==i.indexOf(o.namespaceURI))return o}}function queryNodes(e,t,i){if(defined(e)){for(var r=[],n=e.getElementsByTagNameNS("*",t),a=n.length,o=0;o<a;o++){var s=n[o];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&r.push(s)}return r}}function queryChildNodes(e,t,i){if(!defined(e))return[];for(var r=[],n=e.childNodes,a=n.length,o=0;o<a;o++){var s=n[o];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&r.push(s)}return r}function queryNumericValue(e,t,i){if(defined(i=queryFirstNode(e,t,i)))return i=parseFloat(i.textContent),isNaN(i)?void 0:i}function queryStringValue(e,t,i){if(defined(i=queryFirstNode(e,t,i)))return i.textContent.trim()}function queryBooleanValue(e,t,i){if(defined(i=queryFirstNode(e,t,i)))return"1"===(i=i.textContent.trim())||/^true$/i.test(i)}function resolveHref(e,t,i){var r,n,a;if(defined(e))return defined(i)&&(defined(a=i[e=e.replace(/\\/g,"/")])?r=new Resource({url:a}):(n=new URI(t.getUrlComponent()),defined(a=i[new URI(e).resolve(n)])&&(r=new Resource({url:a})))),defined(r)||(r=t.getDerivedResource({url:e})),r}Object.defineProperties(DeferredLoading.prototype,{dataSource:{get:function(){return this._dataSource}}}),DeferredLoading.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0},DeferredLoading.prototype.addPromise=function(e){this._promises.push(e)},DeferredLoading.prototype.wait=function(){var e=this._deferred;return this._used||e.resolve(),when.join(e.promise,when.all(this._promises))},DeferredLoading.prototype.process=function(){var e=1===this._stack.length;return e&&(this._started=KmlDataSource._getTimestamp()),this._process(e)},DeferredLoading.prototype._giveUpTime=function(){var e;this._timeoutSet||(this._timeoutSet=!0,this._timeThreshold=50,e=this,setTimeout((function(){e._timeoutSet=!1,e._started=KmlDataSource._getTimestamp(),e._process(!0)}),0))},DeferredLoading.prototype._nextNode=function(){var e,t=(e=this._stack)[e.length-1],i=t.index;if(i!==(e=t.nodes).length)return++t.index,e[i]},DeferredLoading.prototype._pop=function(){var e=this._stack;return e.pop(),0!==e.length||(this._deferred.resolve(),!1)},DeferredLoading.prototype._process=function(e){for(var t=this.dataSource,i=this._stack[this._stack.length-1].processingData,r=this._nextNode();defined(r);){var n=featureTypes[r.localName];if(defined(n)&&(-1!==namespaces.kml.indexOf(r.namespaceURI)||-1!==namespaces.gx.indexOf(r.namespaceURI))&&(n(t,r,i,this),this._timeoutSet||KmlDataSource._getTimestamp()>this._started+this._timeThreshold))return void this._giveUpTime();r=this._nextNode()}this._pop()&&e&&this._process(!0)};var colorOptions={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function parseColorString(e,t){if(defined(e)&&!/^\s*$/gm.test(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,r=parseInt(e.substring(2,4),16)/255,n=parseInt(e.substring(4,6),16)/255;e=parseInt(e.substring(6,8),16)/255;return t?(0<e?(colorOptions.maximumRed=e,colorOptions.red=void 0):(colorOptions.maximumRed=void 0,colorOptions.red=0),0<n?(colorOptions.maximumGreen=n,colorOptions.green=void 0):(colorOptions.maximumGreen=void 0,colorOptions.green=0),0<r?(colorOptions.maximumBlue=r,colorOptions.blue=void 0):(colorOptions.maximumBlue=void 0,colorOptions.blue=0),colorOptions.alpha=i,Color.fromRandom(colorOptions)):new Color(e,n,r,i)}}function queryColorValue(e,t,i){if(defined(t=queryStringValue(e,t,i)))return parseColorString(t,"random"===queryStringValue(e,"colorMode",i))}function processTimeStamp(e){var t=queryFirstNode(e,"TimeStamp",namespaces.kmlgx);e=queryStringValue(t,"when",namespaces.kmlgx);if(defined(t)&&defined(e)&&0!==e.length)return t=JulianDate.fromIso8601(e),(e=new TimeIntervalCollection).addInterval(new TimeInterval({start:t,stop:Iso8601.MAXIMUM_VALUE})),e}function processTimeSpan(e){if(defined(i=queryFirstNode(e,"TimeSpan",namespaces.kmlgx))){e=defined(e=queryFirstNode(i,"begin",namespaces.kmlgx))?JulianDate.fromIso8601(e.textContent):void 0;var t,i=defined(i=queryFirstNode(i,"end",namespaces.kmlgx))?JulianDate.fromIso8601(i.textContent):void 0;return defined(e)&&defined(i)?(JulianDate.lessThan(i,e)&&(t=e,e=i,i=t),(t=new TimeIntervalCollection).addInterval(new TimeInterval({start:e,stop:i}))):defined(e)?(t=new TimeIntervalCollection).addInterval(new TimeInterval({start:e,stop:Iso8601.MAXIMUM_VALUE})):defined(i)&&(t=new TimeIntervalCollection).addInterval(new TimeInterval({start:Iso8601.MINIMUM_VALUE,stop:i})),t}}function createDefaultBillboard(){var e=new BillboardGraphics;return e.width=BILLBOARD_SIZE,e.height=BILLBOARD_SIZE,e.scaleByDistance=new NearFarScalar(BILLBOARD_NEAR_DISTANCE,BILLBOARD_NEAR_RATIO,BILLBOARD_FAR_DISTANCE,BILLBOARD_FAR_RATIO),e.pixelOffsetScaleByDistance=new NearFarScalar(BILLBOARD_NEAR_DISTANCE,BILLBOARD_NEAR_RATIO,BILLBOARD_FAR_DISTANCE,BILLBOARD_FAR_RATIO),e}function createDefaultPolygon(){var e=new PolygonGraphics;return e.outline=!0,e.outlineColor=Color.WHITE,e}function createDefaultLabel(){var e=new LabelGraphics;return e.translucencyByDistance=new NearFarScalar(3e6,1,5e6,0),e.pixelOffset=new Cartesian2(17,0),e.horizontalOrigin=HorizontalOrigin$1.LEFT,e.font="16px sans-serif",e.style=LabelStyle$1.FILL_AND_OUTLINE,e}function getIconHref(e,t,i,r,n){var a,o,s,l=queryStringValue(e,"href",namespaces.kml);if(defined(l)&&0!==l.length)return 0===l.indexOf("root://icons/palette-")&&(a=l.charAt(21),o=defaultValue(queryNumericValue(e,"x",namespaces.gx),0),s=defaultValue(queryNumericValue(e,"y",namespaces.gx),0),o=Math.min(o/32,7),l="https://maps.google.com/mapfiles/kml/pal"+a+"/icon"+(8*(s=7-Math.min(s/32,7))+o)+".png"),i=resolveHref(l,i,r),n?(r=queryStringValue(e,"refreshMode",namespaces.kml),n=queryStringValue(e,"viewRefreshMode",namespaces.kml),"onInterval"===r||"onExpire"===r?oneTimeWarning("kml-refreshMode-"+r,"KML - Unsupported Icon refreshMode: "+r):"onStop"!==n&&"onRegion"!==n||oneTimeWarning("kml-refreshMode-"+n,"KML - Unsupported Icon viewRefreshMode: "+n),r=defaultValue(queryStringValue(e,"viewBoundScale",namespaces.kml),1),n="onStop"===n?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",n=defaultValue(queryStringValue(e,"viewFormat",namespaces.kml),n),e=queryStringValue(e,"httpQuery",namespaces.kml),defined(n)&&i.setQueryParameters(queryToObject(cleanupString(n))),defined(e)&&i.setQueryParameters(queryToObject(cleanupString(e))),e=t._ellipsoid,processNetworkLinkQueryString(i,t._camera,t._canvas,r,t._lastCameraView.bbox,e),i):i}function processBillboardIcon(e,t,i,r,n){var a=queryNumericValue(t,"scale",namespaces.kml),o=queryNumericValue(t,"heading",namespaces.kml),s=queryColorValue(t,"color",namespaces.kml),l=getIconHref(m=queryFirstNode(t,"Icon",namespaces.kml),e,r,n,!1);defined(m)&&!defined(l)&&(l=!1);var c,u,d=queryNumericValue(m,"x",namespaces.gx),h=queryNumericValue(m,"y",namespaces.gx),p=queryNumericValue(m,"w",namespaces.gx),f=queryNumericValue(m,"h",namespaces.gx),m=(r=queryNumericAttribute(e=queryFirstNode(t,"hotSpot",namespaces.kml),"x"),n=queryNumericAttribute(e,"y"),queryStringAttribute(e,"xunits"));t=queryStringAttribute(e,"yunits");defined(e=i.billboard)||(e=createDefaultBillboard(),i.billboard=e),e.image=l,e.scale=a,e.color=s,(defined(d)||defined(h)||defined(p)||defined(f))&&(e.imageSubRegion=new BoundingRectangle(d,h,p,f)),defined(o)&&0!==o&&(e.rotation=CesiumMath.toRadians(-o),e.alignedAxis=Cartesian3.UNIT_Z),a=defaultValue(a,1),defined(r)&&("pixels"===m?c=-r*a:"insetPixels"===m?c=(r-BILLBOARD_SIZE)*a:"fraction"===m&&(c=-r*BILLBOARD_SIZE*a),c+=.5*BILLBOARD_SIZE*a),defined(n)&&("pixels"===t?u=n*a:"insetPixels"===t?u=(-n+BILLBOARD_SIZE)*a:"fraction"===t&&(u=n*BILLBOARD_SIZE*a),u-=.5*BILLBOARD_SIZE*a),(defined(c)||defined(u))&&(e.pixelOffset=new Cartesian2(c,u))}function applyStyle(e,t,i,r,n){for(var a=0,o=t.childNodes.length;a<o;a++){var s,l,c,u=t.childNodes.item(a);"IconStyle"===u.localName?processBillboardIcon(e,u,i,r,n):"LabelStyle"===u.localName?(defined(s=i.label)||(s=createDefaultLabel(),i.label=s),s.scale=defaultValue(queryNumericValue(u,"scale",namespaces.kml),s.scale),s.fillColor=defaultValue(queryColorValue(u,"color",namespaces.kml),s.fillColor),s.text=i.name):"LineStyle"===u.localName?(defined(l=i.polyline)||(l=new PolylineGraphics,i.polyline=l),l.width=queryNumericValue(u,"width",namespaces.kml),l.material=queryColorValue(u,"color",namespaces.kml),defined(queryColorValue(u,"outerColor",namespaces.gx))&&oneTimeWarning("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),defined(queryNumericValue(u,"outerWidth",namespaces.gx))&&oneTimeWarning("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),defined(queryNumericValue(u,"physicalWidth",namespaces.gx))&&oneTimeWarning("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),defined(queryBooleanValue(u,"labelVisibility",namespaces.gx))&&oneTimeWarning("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")):"PolyStyle"===u.localName?(defined(c=i.polygon)||(c=createDefaultPolygon(),i.polygon=c),c.material=defaultValue(queryColorValue(u,"color",namespaces.kml),c.material),c.fill=defaultValue(queryBooleanValue(u,"fill",namespaces.kml),c.fill),c.outline=defaultValue(queryBooleanValue(u,"outline",namespaces.kml),c.outline)):"BalloonStyle"===u.localName?(s=defaultValue(parseColorString(queryStringValue(u,"bgColor",namespaces.kml)),Color.WHITE),l=defaultValue(parseColorString(queryStringValue(u,"textColor",namespaces.kml)),Color.BLACK),c=queryStringValue(u,"text",namespaces.kml),i.addProperty("balloonStyle"),i.balloonStyle={bgColor:s,textColor:l,text:c}):"ListStyle"===u.localName&&("radioFolder"!==(u=queryStringValue(u,"listItemType",namespaces.kml))&&"checkOffOnly"!==u||oneTimeWarning("kml-listStyle-"+u,"KML - Unsupported ListStyle with listItemType: "+u))}}function computeFinalStyle(e,t,i,r,n){for(var a,o=new Entity,s=-1,l=t.childNodes,c=l.length,u=0;u<c;u++){var d=l[u];"Style"!==d.localName&&"StyleMap"!==d.localName||(s=u)}if(-1!==s){var h=l[s];if("Style"===h.localName)applyStyle(e,h,o,r,n);else for(var p=queryChildNodes(h,"Pair",namespaces.kml),f=0;f<p.length;f++){var m,g=p[f],y=queryStringValue(g,"key",namespaces.kml);"normal"===y?defined(m=queryStringValue(g,"styleUrl",namespaces.kml))?(defined(a=i.getById(m))||(a=i.getById("#"+m)),defined(a)&&o.merge(a)):applyStyle(e,queryFirstNode(g,"Style",namespaces.kml),o,r,n):oneTimeWarning("kml-styleMap-"+y,"KML - Unsupported StyleMap key: "+y)}}var _=queryStringValue(t,"styleUrl",namespaces.kml);return defined(_)&&("#"!==(h=_)[0]&&-1!==_.indexOf("#")&&(_=(t=_.split("#"))[0],h=r.getDerivedResource({url:_}).getUrlComponent()+"#"+t[1]),defined(a=i.getById(h))||(a=i.getById("#"+h)),defined(a)&&o.merge(a)),o}function processExternalStyles(e,t,i){return t.fetchXML().then((function(r){return processStyles(e,r,i,t,!0)}))}function processStyles(e,t,i,r,n,a){var o,s,l=queryNodes(t,"Style",namespaces.kml);if(defined(l))for(var c=l.length,u=0;u<c;u++)defined(y=queryStringAttribute(s=l[u],"id"))&&(y="#"+y,n&&defined(r)&&(y=r.getUrlComponent()+y),defined(i.getById(y))||(o=new Entity({id:y}),i.add(o),applyStyle(e,s,o,r,a)));var d=queryNodes(t,"StyleMap",namespaces.kml);if(defined(d)){var h=d.length;for(u=0;u<h;u++){var p=d[u];if(defined(y=queryStringAttribute(p,"id")))for(var f=queryChildNodes(p,"Pair",namespaces.kml),m=0;m<f.length;m++){var g,y,_=f[m],v=queryStringValue(_,"key",namespaces.kml);"normal"===v?(y="#"+y,n&&defined(r)&&(y=r.getUrlComponent()+y),defined(i.getById(y))||(o=i.getOrCreateEntity(y),defined(g=queryStringValue(_,"styleUrl",namespaces.kml))?("#"!==g[0]&&(g="#"+g),n&&defined(r)&&(g=r.getUrlComponent()+g),defined(g=i.getById(g))&&o.merge(g)):applyStyle(e,s=queryFirstNode(_,"Style",namespaces.kml),o,r,a))):oneTimeWarning("kml-styleMap-"+v,"KML - Unsupported StyleMap key: "+v)}}}var C=[],x=t.getElementsByTagName("styleUrl"),b=x.length;for(u=0;u<b;u++){var S=x[u].textContent;"#"===S[0]||2===(S=S.split("#")).length&&(S=S[0],S=r.getDerivedResource({url:S}),C.push(processExternalStyles(e,S,i)))}return C}function createDropLine(e,t,i){var r=new ReferenceProperty(e,t.id,["position"]);e=new ScaledPositionProperty(t.position);t.polyline=defined(i.polyline)?i.polyline.clone():new PolylineGraphics,t.polyline.positions=new PositionPropertyArray([r,e])}function heightReferenceFromAltitudeMode(e,t){return!defined(e)&&!defined(t)||"clampToGround"===e?HeightReference$1.CLAMP_TO_GROUND:"relativeToGround"===e?HeightReference$1.RELATIVE_TO_GROUND:"absolute"===e?HeightReference$1.NONE:"clampToSeaFloor"===t?(oneTimeWarning("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),HeightReference$1.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(oneTimeWarning("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),HeightReference$1.RELATIVE_TO_GROUND):(defined(e)?oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown <kml:altitudeMode>:"+e+", using <kml:altitudeMode>:CLAMP_TO_GROUND."):oneTimeWarning("kml-gx:altitudeMode-unknown","KML - Unknown <gx:altitudeMode>:"+t+", using <kml:altitudeMode>:CLAMP_TO_GROUND."),HeightReference$1.CLAMP_TO_GROUND)}function createPositionPropertyFromAltitudeMode(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((defined(t)&&"clampToGround"!==t||defined(i)&&"clampToSeaFloor"!==i)&&oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+defaultValue(t,i)),new ScaledPositionProperty(e))}function createPositionPropertyArrayFromAltitudeMode(e,t,i,r){if(defined(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(defined(t)&&"clampToGround"!==t||defined(i)&&"clampToSeaFloor"!==i)&&oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+defaultValue(t,i));for(var n=e.length,a=0;a<n;a++){var o=e[a];r.scaleToGeodeticSurface(o,o)}return e}}function processPositionGraphics(e,t,i,r){var n=t.label;defined(n)||(n=defined(i.label)?i.label.clone():createDefaultLabel(),t.label=n),n.text=t.name;var a=t.billboard;defined(a)||(a=defined(i.billboard)?i.billboard.clone():createDefaultBillboard(),t.billboard=a),defined(a.image)?a.image.getValue()||(a.image=void 0):a.image=e._pinBuilder.fromColor(Color.YELLOW,64),t=1,defined(a.scale)&&(0!==(t=a.scale.getValue())?n.pixelOffset=new Cartesian2(16*t+1,0):(n.pixelOffset=void 0,n.horizontalOrigin=void 0)),defined(r)&&e._clampToGround&&(a.heightReference=r,n.heightReference=r)}function processPathGraphics(e,t){var i=e.path;defined(i)||((i=new PathGraphics).leadTime=0,e.path=i),defined(t=t.polyline)&&(i.material=t.material,i.width=t.width)}function processPoint$2(e,t,i,r,n){var a=queryStringValue(i,"coordinates",namespaces.kml),o=queryStringValue(i,"altitudeMode",namespaces.kml),s=queryStringValue(i,"altitudeMode",namespaces.gx);i=queryBooleanValue(i,"extrude",namespaces.kml),a=readCoordinate(a,e._ellipsoid);return r.position=a,processPositionGraphics(e,r,n,heightReferenceFromAltitudeMode(o,s)),i&&isExtrudable(o,s)&&createDropLine(t,r,n),!0}function processLineStringOrLinearRing(e,t,i,r,n){var a,o=queryFirstNode(i,"coordinates",namespaces.kml),s=queryStringValue(i,"altitudeMode",namespaces.kml),l=queryStringValue(i,"altitudeMode",namespaces.gx),c=queryBooleanValue(i,"extrude",namespaces.kml),u=queryBooleanValue(i,"tessellate",namespaces.kml),d=isExtrudable(s,l),h=queryNumericValue(i,"drawOrder",namespaces.gx),p=e._ellipsoid;i=readCoordinates(o,p),o=n.polyline;return d&&c?(c=new WallGraphics,(r.wall=c).positions=i,defined(a=n.polygon)&&(c.fill=a.fill,c.material=a.material),c.outline=!0,defined(o)?(c.outlineColor=defined(o.material)?o.material.color:Color.WHITE,c.outlineWidth=o.width):defined(a)&&(c.outlineColor=defined(a.material)?a.material.color:Color.WHITE)):e._clampToGround&&!d&&u?((a=new PolylineGraphics).clampToGround=!0,(r.polyline=a).positions=i,defined(o)?(a.material=defined(o.material)?o.material.color.getValue(Iso8601.MINIMUM_VALUE):Color.WHITE,a.width=defaultValue(o.width,1)):(a.material=Color.WHITE,a.width=1),a.zIndex=h):(defined(h)&&oneTimeWarning("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!u&&oneTimeWarning("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),o=defined(o)?o.clone():new PolylineGraphics,(r.polyline=o).positions=createPositionPropertyArrayFromAltitudeMode(i,s,l,p),u&&!d||(o.arcType=ArcType$1.NONE)),!0}function processPolygon$2(e,t,i,r,n){var a=queryFirstNode(i,"outerBoundaryIs",namespaces.kml),o=queryFirstNode(a,"LinearRing",namespaces.kml),s=queryFirstNode(o,"coordinates",namespaces.kml),l=e._ellipsoid,c=readCoordinates(s,l),u=queryBooleanValue(i,"extrude",namespaces.kml),d=isExtrudable(queryStringValue(i,"altitudeMode",namespaces.kml),queryStringValue(i,"altitudeMode",namespaces.gx));a=defined(n.polygon)?n.polygon.clone():createDefaultPolygon();if(defined(n=n.polyline)&&(a.outlineColor=defined(n.material)?n.material.color:Color.WHITE,a.outlineWidth=n.width),r.polygon=a,d?(a.perPositionHeight=!0,a.extrudedHeight=u?0:void 0):e._clampToGround||(a.height=0),defined(c)){for(var h=new PolygonHierarchy(c),p=queryChildNodes(i,"innerBoundaryIs",namespaces.kml),f=0;f<p.length;f++){o=queryChildNodes(p[f],"LinearRing",namespaces.kml);for(var m=0;m<o.length;m++)defined(c=readCoordinates(queryFirstNode(o[m],"coordinates",namespaces.kml),l))&&h.holes.push(new PolygonHierarchy(c))}a.hierarchy=h}return!0}function processTrack(e,t,i,r,n){var a=queryStringValue(i,"altitudeMode",namespaces.kml),o=queryStringValue(i,"altitudeMode",namespaces.gx),s=queryChildNodes(i,"coord",namespaces.gx),l=queryChildNodes(i,"angles",namespaces.gx),c=queryChildNodes(i,"when",namespaces.kml),u=queryBooleanValue(i,"extrude",namespaces.kml),d=(i=isExtrudable(a,o),e._ellipsoid);0<l.length&&oneTimeWarning("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");for(var h=Math.min(s.length,c.length),p=[],f=[],m=0;m<h;m++){var g=readCoordinate(s[m].textContent,d);p.push(g),f.push(JulianDate.fromIso8601(c[m].textContent))}return(l=new SampledPositionProperty).addSamples(f,p),r.position=l,processPositionGraphics(e,r,n,heightReferenceFromAltitudeMode(a,o)),processPathGraphics(r,n),r.availability=new TimeIntervalCollection,0<c.length&&r.availability.addInterval(new TimeInterval({start:f[0],stop:f[f.length-1]})),i&&u&&createDropLine(t,r,n),!0}function addToMultiTrack(e,t,i,r,n,a,o,s,l){var c=e[0],u=e[e.length-1],d=new SampledPositionProperty;d.addSamples(e,t),i.intervals.addInterval(new TimeInterval({start:c,stop:u,isStartIncluded:l,isStopIncluded:l,data:createPositionPropertyFromAltitudeMode(d,o,s)})),r.addInterval(new TimeInterval({start:c,stop:u,isStartIncluded:l,isStopIncluded:l})),n.intervals.addInterval(new TimeInterval({start:c,stop:u,isStartIncluded:l,isStopIncluded:l,data:a}))}function processMultiTrack(e,t,i,r,n){for(var a,o,s=queryBooleanValue(i,"interpolate",namespaces.gx),l=queryChildNodes(i,"Track",namespaces.gx),c=!1,u=new TimeIntervalCollectionProperty,d=new TimeIntervalCollection,h=new CompositePositionProperty,p=e._ellipsoid,f=0,m=l.length;f<m;f++){for(var g=queryChildNodes(x=l[f],"when",namespaces.kml),y=queryChildNodes(x,"coord",namespaces.gx),_=queryStringValue(x,"altitudeMode",namespaces.kml),v=queryStringValue(x,"altitudeMode",namespaces.gx),C=isExtrudable(_,v),x=queryBooleanValue(x,"extrude",namespaces.kml),b=Math.min(y.length,g.length),S=[],T=[],E=0;E<b;E++){var w=readCoordinate(y[E].textContent,p);S.push(w),T.push(JulianDate.fromIso8601(g[E].textContent))}s&&(defined(a)&&addToMultiTrack([a,T[0]],[o,S[0]],h,d,u,!1,"absolute",void 0,!1),a=T[b-1],o=S[S.length-1]),addToMultiTrack(T,S,h,d,u,C&&x,_,v,!0),c=c||C&&x}return r.availability=d,r.position=h,processPositionGraphics(e,r,n),processPathGraphics(r,n),c&&(createDropLine(t,r,n),r.polyline.show=u),!0}var geometryTypes$1={Point:processPoint$2,LineString:processLineStringOrLinearRing,LinearRing:processLineStringOrLinearRing,Polygon:processPolygon$2,Track:processTrack,MultiTrack:processMultiTrack,MultiGeometry:processMultiGeometry,Model:processUnsupportedGeometry},scratchDiv;function processMultiGeometry(e,t,i,r,n,a){for(var o=i.childNodes,s=!1,l=0,c=o.length;l<c;l++){var u,d=o.item(l),h=geometryTypes$1[d.localName];defined(h)&&((u=createEntity(d,t,a)).parent=r,u.name=r.name,u.availability=r.availability,u.description=r.description,u.kml=r.kml,h(e,t,d,u,n)&&(s=!0))}return s}function processUnsupportedGeometry(e,t,i,r,n){return oneTimeWarning("kml-unsupportedGeometry","KML - Unsupported geometry: "+i.localName),!1}function processExtendedData(e,t){if(defined(e=queryFirstNode(e,"ExtendedData",namespaces.kml))){defined(queryFirstNode(e,"SchemaData",namespaces.kml))&&oneTimeWarning("kml-schemaData","KML - SchemaData is unsupported"),defined(queryStringAttribute(e,"xmlns:prefix"))&&oneTimeWarning("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");var i={},r=queryChildNodes(e,"Data",namespaces.kml);if(defined(r))for(var n=r.length,a=0;a<n;a++){var o=r[a],s=queryStringAttribute(o,"name");defined(s)&&(i[s]={displayName:queryStringValue(o,"displayName",namespaces.kml),value:queryStringValue(o,"value",namespaces.kml)})}t.kml.extendedData=i}}function processDescription$1(e,t,i,r,n){var a,o,s=t.kml,l=s.extendedData,c=queryStringValue(e,"description",namespaces.kml),u=defaultValue(t.balloonStyle,i.balloonStyle),d=(e=Color.WHITE,i=Color.BLACK,c);if(defined(u)&&(e=defaultValue(u.bgColor,Color.WHITE),i=defaultValue(u.textColor,Color.BLACK),d=defaultValue(u.text,c)),defined(d)){if(d=(d=(d=(d=(d=(d=d.replace("$[name]",defaultValue(t.name,""))).replace("$[description]",defaultValue(c,""))).replace("$[address]",defaultValue(s.address,""))).replace("$[Snippet]",defaultValue(s.snippet,""))).replace("$[id]",t.id)).replace("$[geDirections]",""),defined(l)){var h=d.match(/\$\[.+?\]/g);if(null!==h)for(_=0;_<h.length;_++){var p,f=h[_],m=f.substr(2,f.length-3),g=/\/displayName$/.test(m);defined(p=l[m=m.replace(/\/displayName$/,"")])&&(p=g?p.displayName:p.value),defined(p)&&(d=d.replace(f,defaultValue(p,"")))}}}else if(defined(l)&&0<(o=Object.keys(l)).length){for(d='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',_=0;_<o.length;_++)d+="<tr><th>"+defaultValue((p=l[a=o[_]]).displayName,a)+"</th><td>"+defaultValue(p.value,"")+"</td></tr>";d+="</tbody></table>"}if(defined(d)){d=autolinker.link(d),scratchDiv.innerHTML=d;for(var y=scratchDiv.querySelectorAll("a"),_=0;_<y.length;_++)y[_].setAttribute("target","_blank");defined(r)&&1<r.keys.length&&(embedDataUris(scratchDiv,"a","href",r),embedDataUris(scratchDiv,"img","src",r)),applyBasePath(scratchDiv,"a","href",n),applyBasePath(scratchDiv,"img","src",n),n='<div class="cesium-infoBox-description-lighter" style="',n+="overflow:auto;",n+="word-wrap:break-word;",n+="background-color:"+e.toCssColorString()+";",n+="color:"+i.toCssColorString()+";",n+='">',n+=scratchDiv.innerHTML+"</div>",scratchDiv.innerHTML="",t.description=n}}function processFeature$1(e,t,i){var r=i.entityCollection,n=i.parentEntity,a=i.sourceResource,o=i.uriResolver,s=createEntity(t,r,i.context),l=s.kml;r=computeFinalStyle(e,t,i.styleCollection,a,o),i=queryStringValue(t,"name",namespaces.kml);return s.name=i,s.parent=n,defined(i=processTimeSpan(t))||(i=processTimeStamp(t)),s.availability=i,mergeAvailabilityWithParent(s),i=queryBooleanValue(t,"visibility",namespaces.kml),s.show=function e(t){return!t||t.show&&e(t.parent)}(n)&&defaultValue(i,!0),n=queryFirstNode(t,"author",namespaces.atom),(i=l.author).name=queryStringValue(n,"name",namespaces.atom),i.uri=queryStringValue(n,"uri",namespaces.atom),i.email=queryStringValue(n,"email",namespaces.atom),i=queryFirstNode(t,"link",namespaces.atom),(n=l.link).href=queryStringAttribute(i,"href"),n.hreflang=queryStringAttribute(i,"hreflang"),n.rel=queryStringAttribute(i,"rel"),n.type=queryStringAttribute(i,"type"),n.title=queryStringAttribute(i,"title"),n.length=queryStringAttribute(i,"length"),l.address=queryStringValue(t,"address",namespaces.kml),l.phoneNumber=queryStringValue(t,"phoneNumber",namespaces.kml),l.snippet=queryStringValue(t,"Snippet",namespaces.kml),processExtendedData(t,s),processDescription$1(t,s,r,o,a),processLookAt(t,s,e=e._ellipsoid),processCamera(t,s,e),defined(queryFirstNode(t,"Region",namespaces.kml))&&oneTimeWarning("kml-region","KML - Placemark Regions are unsupported"),{entity:s,styleEntity:r}}function processDocument$1(e,t,i,r){r.addNodes(t.childNodes,i),r.process()}function processFolder(e,t,i,r){var n=processFeature$1(e,t,i);(i=clone(i)).parentEntity=n.entity,processDocument$1(e,t,i,r)}function processPlacemark(e,t,i,r){for(var n=processFeature$1(e,t,i),a=n.entity,o=n.styleEntity,s=!1,l=t.childNodes,c=0,u=l.length;c<u&&!s;c++){var d=l.item(c),h=geometryTypes$1[d.localName];defined(h)&&(h(e,i.entityCollection,d,a,o,a.id),s=!0)}s||(a.merge(o),processPositionGraphics(e,a,o))}"undefined"!=typeof document&&(scratchDiv=document.createElement("div"));var playlistNodeProcessors={FlyTo:processTourFlyTo,Wait:processTourWait,SoundCue:processTourUnsupportedNode,AnimatedUpdate:processTourUnsupportedNode,TourControl:processTourUnsupportedNode};function processTour(e,t,i,r){var n=new KmlTour(queryStringValue(t,"name",namespaces.kml),queryStringAttribute(t,"id"));if(t=queryFirstNode(t,"Playlist",namespaces.gx))for(var a=e._ellipsoid,o=t.childNodes,s=0;s<o.length;s++){var l,c=o[s];c.localName&&((l=playlistNodeProcessors[c.localName])?l(n,c,a):console.log("Unknown KML Tour playlist entry type "+c.localName))}defined(e.kmlTours)||(e.kmlTours=[]),e.kmlTours.push(n)}function processTourUnsupportedNode(e,t){oneTimeWarning("KML Tour unsupported node "+t.localName)}function processTourWait(e,t){t=queryNumericValue(t,"duration",namespaces.gx),e.addPlaylistEntry(new KmlTourWait(t))}function processTourFlyTo(e,t,i){var r=queryNumericValue(t,"duration",namespaces.gx),n=queryStringValue(t,"flyToMode",namespaces.gx),a={kml:{}};processLookAt(t,a,i),processCamera(t,a,i),a=new KmlTourFlyTo(r,n,a.kml.lookAt||a.kml.camera),e.addPlaylistEntry(a)}function processCamera(e,t,i){var r,n,a,o,s=queryFirstNode(e,"Camera",namespaces.kml);defined(s)&&(r=defaultValue(queryNumericValue(s,"longitude",namespaces.kml),0),n=defaultValue(queryNumericValue(s,"latitude",namespaces.kml),0),a=defaultValue(queryNumericValue(s,"altitude",namespaces.kml),0),o=defaultValue(queryNumericValue(s,"heading",namespaces.kml),0),e=defaultValue(queryNumericValue(s,"tilt",namespaces.kml),0),s=defaultValue(queryNumericValue(s,"roll",namespaces.kml),0),i=Cartesian3.fromDegrees(r,n,a,i),s=HeadingPitchRoll.fromDegrees(o,e-90,s),t.kml.camera=new KmlCamera(i,s))}function processLookAt(e,t,i){var r,n,a,o,s=queryFirstNode(e,"LookAt",namespaces.kml);defined(s)&&(r=defaultValue(queryNumericValue(s,"longitude",namespaces.kml),0),n=defaultValue(queryNumericValue(s,"latitude",namespaces.kml),0),a=defaultValue(queryNumericValue(s,"altitude",namespaces.kml),0),o=queryNumericValue(s,"heading",namespaces.kml),e=queryNumericValue(s,"tilt",namespaces.kml),s=defaultValue(queryNumericValue(s,"range",namespaces.kml),0),e=CesiumMath.toRadians(defaultValue(e,0)),s=new HeadingPitchRange(o=CesiumMath.toRadians(defaultValue(o,0)),e-CesiumMath.PI_OVER_TWO,s),i=Cartesian3.fromDegrees(r,n,a,i),t.kml.lookAt=new KmlLookAt(i,s))}function processGroundOverlay(e,t,i,r){var n,a=processFeature$1(e,t,i).entity,o=!1,s=e._ellipsoid,l=readCoordinates(queryFirstNode(t,"LatLonQuad",namespaces.gx),s),c=queryNumericValue(t,"drawOrder",namespaces.kml);defined(l)?((n=createDefaultPolygon()).hierarchy=new PolygonHierarchy(l),n.zIndex=c,a.polygon=n,o=!0):((n=new RectangleGraphics).zIndex=c,a.rectangle=n,defined(s=queryFirstNode(t,"LatLonBox",namespaces.kml))&&(l=queryNumericValue(s,"west",namespaces.kml),c=queryNumericValue(s,"south",namespaces.kml),a=queryNumericValue(s,"east",namespaces.kml),u=queryNumericValue(s,"north",namespaces.kml),defined(l)&&(l=CesiumMath.negativePiToPi(CesiumMath.toRadians(l))),defined(c)&&(c=CesiumMath.clampToLatitudeRange(CesiumMath.toRadians(c))),defined(a)&&(a=CesiumMath.negativePiToPi(CesiumMath.toRadians(a))),defined(u)&&(u=CesiumMath.clampToLatitudeRange(CesiumMath.toRadians(u))),n.coordinates=new Rectangle(l,c,a,u),defined(u=queryNumericValue(s,"rotation",namespaces.kml))&&(d=CesiumMath.toRadians(u),n.rotation=d,n.stRotation=d)));var u=queryFirstNode(t,"Icon",namespaces.kml),d=getIconHref(u,e,i.sourceResource,i.uriResolver,!0);defined(d)?(o&&oneTimeWarning("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection."),e=queryNumericValue(u,"x",namespaces.gx),i=queryNumericValue(u,"y",namespaces.gx),o=queryNumericValue(u,"w",namespaces.gx),u=queryNumericValue(u,"h",namespaces.gx),(defined(e)||defined(i)||defined(o)||defined(u))&&oneTimeWarning("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),n.material=d,n.material.color=queryColorValue(t,"color",namespaces.kml),n.material.transparent=!0):n.material=queryColorValue(t,"color",namespaces.kml),defined(d=queryStringValue(t,"altitudeMode",namespaces.kml))?"absolute"===d?(n.height=queryNumericValue(t,"altitude",namespaces.kml),n.zIndex=void 0):"clampToGround"!==d&&oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+d):"relativeToSeaFloor"===(d=queryStringValue(t,"altitudeMode",namespaces.gx))?(oneTimeWarning("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),n.height=queryNumericValue(t,"altitude",namespaces.kml),n.zIndex=void 0):"clampToSeaFloor"===d?oneTimeWarning("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):defined(d)&&oneTimeWarning("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+d)}function processUnsupportedFeature(e,t,i,r){e._unsupportedNode.raiseEvent(e,i.parentEntity,t,i.entityCollection,i.styleCollection,i.sourceResource,i.uriResolver),oneTimeWarning("kml-unsupportedFeature-"+t.nodeName,"KML - Unsupported feature: "+t.nodeName)}var RefreshMode={INTERVAL:0,EXPIRE:1,STOP:2};function cleanupString(e){if(!defined(e)||0===e.length)return"";var t=e[0];return"&"!==t&&"?"!==t||(e=e.substring(1)),e}var zeroRectangle=new Rectangle,scratchCartographic$9=new Cartographic,scratchCartesian2$9=new Cartesian2,scratchCartesian3$a=new Cartesian3;function processNetworkLinkQueryString(e,t,i,r,n,a){function o(e){return e<-CesiumMath.PI_OVER_TWO?-CesiumMath.PI_OVER_TWO:e>CesiumMath.PI_OVER_TWO?CesiumMath.PI_OVER_TWO:e}function s(e){return e>CesiumMath.PI?e-CesiumMath.TWO_PI:e<-CesiumMath.PI?e+CesiumMath.TWO_PI:e}var l,c,u,d,h=objectToQuery(e.queryParameters);h=h.replace(/%5B/g,"[").replace(/%5D/g,"]"),h=defined(t)&&t._mode!==SceneMode$1.MORPHING?(n=defaultValue(n,zeroRectangle),defined(i)&&(scratchCartesian2$9.x=.5*i.clientWidth,scratchCartesian2$9.y=.5*i.clientHeight,l=t.pickEllipsoid(scratchCartesian2$9,a,scratchCartesian3$a)),defined(l)?d=a.cartesianToCartographic(l,scratchCartographic$9):(d=Rectangle.center(n,scratchCartographic$9),l=a.cartographicToCartesian(d)),defined(r)&&!CesiumMath.equalsEpsilon(r,1,CesiumMath.EPSILON9)&&(c=n.width*r*.5,u=n.height*r*.5,n=new Rectangle(s(d.longitude-c),o(d.latitude-u),s(d.longitude+c),o(d.latitude+u))),h=(h=(h=(h=h.replace("[bboxWest]",CesiumMath.toDegrees(n.west).toString())).replace("[bboxSouth]",CesiumMath.toDegrees(n.south).toString())).replace("[bboxEast]",CesiumMath.toDegrees(n.east).toString())).replace("[bboxNorth]",CesiumMath.toDegrees(n.north).toString()),u=CesiumMath.toDegrees(d.longitude).toString(),n=CesiumMath.toDegrees(d.latitude).toString(),h=(h=(h=(h=(h=(h=(h=(h=h.replace("[lookatLon]",u)).replace("[lookatLat]",n)).replace("[lookatTilt]",CesiumMath.toDegrees(t.pitch).toString())).replace("[lookatHeading]",CesiumMath.toDegrees(t.heading).toString())).replace("[lookatRange]",Cartesian3.distance(t.positionWC,l))).replace("[lookatTerrainLon]",u)).replace("[lookatTerrainLat]",n)).replace("[lookatTerrainAlt]",d.height.toString()),a.cartesianToCartographic(t.positionWC,scratchCartographic$9),h=(h=(h=h.replace("[cameraLon]",CesiumMath.toDegrees(scratchCartographic$9.longitude).toString())).replace("[cameraLat]",CesiumMath.toDegrees(scratchCartographic$9.latitude).toString())).replace("[cameraAlt]",CesiumMath.toDegrees(scratchCartographic$9.height).toString()),d=n="",defined(t=(a=t.frustum).aspectRatio)&&(a=CesiumMath.toDegrees(a.fov),1<t?d=(n=a)/t:n=(d=a)*t),(h=h.replace("[horizFov]",n.toString())).replace("[vertFov]",d.toString())):(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=(h=h.replace("[bboxWest]","-180")).replace("[bboxSouth]","-90")).replace("[bboxEast]","180")).replace("[bboxNorth]","90")).replace("[lookatLon]","")).replace("[lookatLat]","")).replace("[lookatRange]","")).replace("[lookatTilt]","")).replace("[lookatHeading]","")).replace("[lookatTerrainLon]","")).replace("[lookatTerrainLat]","")).replace("[lookatTerrainAlt]","")).replace("[cameraLon]","")).replace("[cameraLat]","")).replace("[cameraAlt]","")).replace("[horizFov]","")).replace("[vertFov]",""),h=(h=(h=(h=(h=(h=defined(i)?(h=h.replace("[horizPixels]",i.clientWidth)).replace("[vertPixels]",i.clientHeight):(h=h.replace("[horizPixels]","")).replace("[vertPixels]","")).replace("[terrainEnabled]","1")).replace("[clientVersion]","1")).replace("[kmlVersion]","2.2")).replace("[clientName]","Cesium")).replace("[language]","English"),e.setQueryParameters(queryToObject(h))}function processNetworkLink(e,t,i,r){var n,a,o,s,l=processFeature$1(e,t,i).entity,c=i.sourceResource,u=i.uriResolver,d=queryFirstNode(t,"Link",namespaces.kml);defined(d)||(d=queryFirstNode(t,"Url",namespaces.kml)),!defined(d)||defined(o=queryStringValue(d,"href",namespaces.kml))&&(o=resolveHref(t=o,c,i.uriResolver),/^data:/.test(o.getUrlComponent())?/\.kmz/i.test(c.getUrlComponent())||(t=c.getDerivedResource({url:t})):(t=o.clone(),n=queryStringValue(d,"viewRefreshMode",namespaces.kml),a=defaultValue(queryStringValue(d,"viewBoundScale",namespaces.kml),1),i="onStop"===n?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",c=defaultValue(queryStringValue(d,"viewFormat",namespaces.kml),i),i=queryStringValue(d,"httpQuery",namespaces.kml),defined(c)&&o.setQueryParameters(queryToObject(cleanupString(c))),defined(i)&&o.setQueryParameters(queryToObject(cleanupString(i))),i=e._ellipsoid,processNetworkLinkQueryString(o,e._camera,e._canvas,a,e._lastCameraView.bbox,i)),u={sourceUri:t,uriResolver:u,context:l.id},s=new EntityCollection,u=load$2(e,s,o,u).then((function(t){var i=e._entityCollection,r=s.values;i.suspendEvents();for(var c=0;c<r.length;c++){var u=r[c];defined(u.parent)||(u.parent=l,mergeAvailabilityWithParent(u)),i.add(u)}i.resumeEvents();var h=queryStringValue(d,"refreshMode",namespaces.kml),p=defaultValue(queryNumericValue(d,"refreshInterval",namespaces.kml),0);if("onInterval"===h&&0<p||"onExpire"===h||"onStop"===n){var f,m=queryFirstNode(t,"NetworkLinkControl",namespaces.kml),g=(t=defined(m),JulianDate.now()),y={id:createGuid(),href:o,cookie:{},lastUpdated:g,updating:!1,entity:l,viewBoundScale:a,needsUpdate:!1,cameraUpdateTime:g},_=0;if(t&&(y.cookie=queryToObject(defaultValue(queryStringValue(m,"cookie",namespaces.kml),"")),_=defaultValue(queryNumericValue(m,"minRefreshPeriod",namespaces.kml),0)),"onInterval"===h)t&&(p=Math.max(_,p)),y.refreshMode=RefreshMode.INTERVAL,y.time=p;else if("onExpire"===h)if(t&&(f=queryStringValue(m,"expires",namespaces.kml)),defined(f))try{var v=JulianDate.fromIso8601(f),C=JulianDate.secondsDifference(v,g);0<C&&C<_&&JulianDate.addSeconds(g,_,v),y.refreshMode=RefreshMode.EXPIRE,y.time=v}catch(t){oneTimeWarning("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else oneTimeWarning("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element");else e._camera?(y.refreshMode=RefreshMode.STOP,y.time=defaultValue(queryNumericValue(d,"viewRefreshTime",namespaces.kml),0)):oneTimeWarning("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires a camera be passed in when creating the KmlDataSource");defined(y.refreshMode)&&e._networkLinks.set(y.id,y)}else"onRegion"===n&&oneTimeWarning("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion")})).otherwise((function(t){oneTimeWarning("An error occured during loading "+o.url),e._error.raiseEvent(e,t)})),r.addPromise(u))}function processFeatureNode(e,t,i,r){var n=featureTypes[t.localName];return defined(n)?n(e,t,i,r):processUnsupportedFeature(e,t,i)}function loadKml(e,t,i,r,n,a){var o;t.removeAll(),defined(o=queryStringValue("Document"===(o=i.documentElement).localName?o:queryFirstNode(o,"Document",namespaces.kml),"name",namespaces.kml))||(o=getFilenameFromUri(r.getUrlComponent())),defined(e._name)||(e._name=o);var s=new KmlDataSource._DeferredLoading(e),l=new EntityCollection(e);return when.all(processStyles(e,i,l,r,!1,n)).then((function(){var o=i.documentElement;if("kml"===o.localName)for(var c=o.childNodes,u=0;u<c.length;u++){var d=c[u];if(defined(featureTypes[d.localName])){o=d;break}}var h={parentEntity:void 0,entityCollection:t,styleCollection:l,sourceResource:r,uriResolver:n,context:a};return t.suspendEvents(),processFeatureNode(e,o,h,s),t.resumeEvents(),s.wait().then((function(){return i.documentElement}))}))}function loadKmz(e,t,i,r){var n=when.defer();return zip.createReader(new zip.BlobReader(i),(function(i){i.getEntries((function(a){for(var o,s,l=[],c={},u=0;u<a.length;u++){var d,h=a[u];h.directory||(d=when.defer(),l.push(d.promise),!/\.kml$/i.test(h.filename)||defined(o)&&/\//i.test(h.filename)?loadDataUriFromZip(h,c,d):(defined(o)&&loadDataUriFromZip(o,c,s),o=h,s=d))}defined(o)&&loadXmlFromZip(o,c,s),when.all(l).then((function(){return i.close(),defined(c.kml)?(c.keys=Object.keys(c),loadKml(e,t,c.kml,r,c)):void n.reject(new RuntimeError("KMZ file does not contain a KML document."))})).then(n.resolve).otherwise(n.reject)}))}),(function(e){n.reject(e)})),n.promise}function load$2(e,t,i,r){var n=(r=defaultValue(r,defaultValue.EMPTY_OBJECT)).sourceUri,a=r.uriResolver,o=r.context;r=i;if("string"==typeof i||i instanceof Resource){r=(i=Resource.createIfNeeded(i)).fetchBlob(),n=defaultValue(n,i.clone());var s=e._resourceCredits,l=i.credits;if(defined(l))for(var c=l.length,u=0;u<c;u++)s.push(l[u])}else n=defaultValue(n,Resource.DEFAULT.clone());return n=Resource.createIfNeeded(n),when(r).then((function(i){return i instanceof Blob?isZipFile(i).then((function(r){return r?loadKmz(e,t,i,n):readBlobAsText(i).then((function(i){var r,s;i=removeDuplicateNamespaces(i=insertNamespaces(i));try{r=parser.parseFromString(i,"application/xml")}catch(i){s=i.toString()}if(defined(s)||r.body||"parsererror"===r.documentElement.tagName)throw new RuntimeError((defined(s)?s:r.documentElement.firstChild.nodeValue)||r.body.innerText);return loadKml(e,t,r,n,a,o)}))})):loadKml(e,t,i,n,a,o)})).otherwise((function(t){return e._error.raiseEvent(e,t),console.log(t),when.reject(t)}))}function KmlDataSource(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).camera,i=e.canvas;this._changed=new Event,this._error=new Event,this._loading=new Event,this._refresh=new Event,this._unsupportedNode=new Event,this._clock=void 0,this._entityCollection=new EntityCollection(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new PinBuilder,this._networkLinks=new AssociativeArray,this._entityCluster=new EntityCluster,this._canvas=i,this._camera=t,this._lastCameraView={position:defined(t)?Cartesian3.clone(t.positionWC):void 0,direction:defined(t)?Cartesian3.clone(t.directionWC):void 0,up:defined(t)?Cartesian3.clone(t.upWC):void 0,bbox:defined(t)?t.computeViewRectangle():Rectangle.clone(Rectangle.MAX_VALUE)},this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.WGS84),"string"==typeof(e=e.credit)&&(e=new Credit(e)),this._credit=e,this._resourceCredits=[]}function mergeAvailabilityWithParent(e){var t,i=e.parent;!defined(i)||defined(t=i.availability)&&(defined(i=e.availability)?i.intersect(t):e.availability=t)}function getNetworkLinkUpdateCallback(e,t,i,r,n){return function(a){if(r.contains(t.id)){var o=!1,s=queryFirstNode(a,"NetworkLinkControl",namespaces.kml),l=0;if(defined(s)){if(defined(queryFirstNode(s,"Update",namespaces.kml)))return oneTimeWarning("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void r.remove(t.id);t.cookie=queryToObject(defaultValue(queryStringValue(s,"cookie",namespaces.kml),"")),l=defaultValue(queryNumericValue(s,"minRefreshPeriod",namespaces.kml),0)}var c,u=JulianDate.now(),d=t.refreshMode;if(d===RefreshMode.INTERVAL)defined(s)&&(t.time=Math.max(l,t.time));else if(d===RefreshMode.EXPIRE)if(defined(s)&&(c=queryStringValue(s,"expires",namespaces.kml)),defined(c))try{var h=JulianDate.fromIso8601(c),p=JulianDate.secondsDifference(h,u);0<p&&p<l&&JulianDate.addSeconds(u,l,h),t.time=h}catch(a){oneTimeWarning("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),o=!0}else oneTimeWarning("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),o=!0;var f=t.entity,m=e._entityCollection,g=i.values;m.suspendEvents();for(var y=m.values.slice(),_=0;_<y.length;++_){var v=y[_];v.parent===f&&(v.parent=void 0,function e(t){m.remove(t);for(var i=t._children,r=i.length,n=0;n<r;++n)e(i[n])}(v))}for(m.resumeEvents(),m.suspendEvents(),_=0;_<g.length;_++){var C=g[_];defined(C.parent)||(C.parent=f,mergeAvailabilityWithParent(C)),m.add(C)}m.resumeEvents(),o?r.remove(t.id):t.lastUpdated=u,d=(a=m.computeAvailability()).start,s=a.stop,o=JulianDate.equals(d,Iso8601.MINIMUM_VALUE),a=JulianDate.equals(s,Iso8601.MAXIMUM_VALUE),o&&a||(a=e._clock).startTime===d&&a.stopTime===s||(a.startTime=d,a.stopTime=s,e._changed.raiseEvent(e)),t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,n.getUrlComponent(!0))}}}KmlDataSource.load=function(e,t){return new KmlDataSource(t=defaultValue(t,defaultValue.EMPTY_OBJECT)).load(e,t)},Object.defineProperties(KmlDataSource.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}}),KmlDataSource.prototype.load=function(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT),DataSource.setLoading(this,!0);var i=this._name;this._name=void 0,this._clampToGround=defaultValue(t.clampToGround,!1);var r=this;return load$2(this,this._entityCollection,e,t).then((function(){var e,t=(o=r._entityCollection.computeAvailability()).start,n=o.stop,a=JulianDate.equals(t,Iso8601.MINIMUM_VALUE),o=JulianDate.equals(n,Iso8601.MAXIMUM_VALUE);return a&&o||(a&&((e=new Date).setHours(0,0,0,0),t=JulianDate.fromDate(e)),o&&((e=new Date).setHours(24,0,0,0),n=JulianDate.fromDate(e)),(e=new DataSourceClock).startTime=t,e.stopTime=n,e.currentTime=JulianDate.clone(t),e.clockRange=ClockRange$1.LOOP_STOP,e.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,e.multiplier=Math.round(Math.min(Math.max(JulianDate.secondsDifference(n,t)/60,1),31556900))),t=!1,e!==r._clock&&(r._clock=e,t=!0),i!==r._name&&(t=!0),t&&r._changed.raiseEvent(r),DataSource.setLoading(r,!1),r})).otherwise((function(e){return DataSource.setLoading(r,!1),r._error.raiseEvent(r,e),console.log(e),when.reject(e)}))};var entitiesToIgnore=new AssociativeArray;function KmlFeatureData(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}function Visualizer(){DeveloperError.throwInstantiationError()}KmlDataSource.prototype.update=function(e){var t=this._networkLinks;if(0===t.length)return!0;var i=JulianDate.now(),r=this;entitiesToIgnore.removeAll();var n=!1,a=this._lastCameraView,o=this._camera;!defined(o)||o.positionWC.equalsEpsilon(a.position,CesiumMath.EPSILON7)&&o.directionWC.equalsEpsilon(a.direction,CesiumMath.EPSILON7)&&o.upWC.equalsEpsilon(a.up,CesiumMath.EPSILON7)||(a.position=Cartesian3.clone(o.positionWC),a.direction=Cartesian3.clone(o.directionWC),a.up=Cartesian3.clone(o.upWC),a.bbox=o.computeViewRectangle(),n=!0);var s=new AssociativeArray,l=!1;return t.values.forEach((function(e){var t,o,c,u=e.entity;entitiesToIgnore.contains(u.id)||(e.updating||(c=!1,e.refreshMode===RefreshMode.INTERVAL?JulianDate.secondsDifference(i,e.lastUpdated)>e.time&&(c=!0):e.refreshMode===RefreshMode.EXPIRE?JulianDate.greaterThan(i,e.time)&&(c=!0):e.refreshMode===RefreshMode.STOP&&(n&&(e.needsUpdate=!0,e.cameraUpdateTime=i),e.needsUpdate&&JulianDate.secondsDifference(i,e.cameraUpdateTime)>=e.time&&(c=!0)),c&&(function e(t){for(var i=t._children,r=i.length,n=0;n<r;++n){var a=i[n];entitiesToIgnore.set(a.id,a),e(a)}}(u),e.updating=!0,t=new EntityCollection,(o=e.href.clone()).setQueryParameters(e.cookie),c=defaultValue(r._ellipsoid,Ellipsoid.WGS84),processNetworkLinkQueryString(o,r._camera,r._canvas,e.viewBoundScale,a.bbox,c),load$2(r,t,o,{context:u.id}).then(getNetworkLinkUpdateCallback(r,e,t,s,o)).otherwise((function(t){t="NetworkLink "+e.href+" refresh failed: "+t,console.log(t),r._error.raiseEvent(r,t)})),l=!0)),s.set(e.id,e))})),l&&(this._networkLinks=s,this._changed.raiseEvent(this)),!0},KmlDataSource._DeferredLoading=DeferredLoading,KmlDataSource._getTimestamp=getTimestamp$1,Visualizer.prototype.update=DeveloperError.throwInstantiationError,Visualizer.prototype.getBoundingSphere=DeveloperError.throwInstantiationError,Visualizer.prototype.isDestroyed=DeveloperError.throwInstantiationError,Visualizer.prototype.destroy=DeveloperError.throwInstantiationError;var BILLBOARD_SIZE$1=32,kmlNamespace="http://www.opengis.net/kml/2.2",gxNamespace="http://www.google.com/kml/ext/2.2",xmlnsNamespace="http://www.w3.org/2000/xmlns/";function ExternalFileHandler(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var imageTypeRegex=/^data:image\/([^,;]+)/;function getModelBlobHander(e,t){return function(i){e._files[t]=i}}function ValueGetter(e){this._time=e}function StyleCache(){this._ids={},this._styles={},this._count=0}function IdManager(){this._ids={}}function exportKml(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).entities,i=defaultValue(e.kmz,!1),r=exportKml._createState(e),n=t.values.filter((function(e){return!defined(e.parent)}));(t=(e=r.kmlDoc).documentElement).setAttributeNS(xmlnsNamespace,"xmlns:gx",gxNamespace),e=e.createElement("Document"),t.appendChild(e),recurseEntities(r,e,n),r.styleCache.save(e);var a=r.externalFileHandler;return a.promise.then((function(){var e=(new XMLSerializer).serializeToString(r.kmlDoc);return i?createKmz(e,a.files):{kml:e,externalFiles:a.files}}))}function createKmz(e,t){var i=when.defer();return zip.createWriter(new zip.BlobWriter,(function(r){addKmlToZip(r,e).then((function(){var e=Object.keys(t);return addExternalFilesToZip(r,e,t,0)})).then((function(){r.close((function(e){i.resolve({kmz:e})}))}))})),i.promise}function addKmlToZip(e,t){var i=when.defer();return e.add("doc.kml",new zip.TextReader(t),(function(){i.resolve()})),i.promise}function addExternalFilesToZip(e,t,i,r){if(t.length!==r){var n=t[r],a=when.defer();return e.add(n,new zip.BlobReader(i[n]),(function(){a.resolve()})),a.promise.then((function(){return addExternalFilesToZip(e,t,i,r+1)}))}}function recurseEntities(e,t,i){for(var r=e.kmlDoc,n=e.styleCache,a=e.valueGetter,o=e.idManager,s=i.length,l=0;l<s;++l){var c,u,d,h=i[l],p=[];createPoint$1(e,h,u=[],d=[]),createLineString$1(e,h.polyline,u,d),createPolygon$1(e,h.rectangle,u,d,p),createPolygon$1(e,h.polygon,u,d,p),createModel$1(e,h,h.model,u,d);var f=h.availability;defined(f)&&(c=r.createElement("TimeSpan"),JulianDate.equals(f.start,Iso8601.MINIMUM_VALUE)||c.appendChild(createBasicElementWithText(r,"begin",JulianDate.toIso8601(f.start))),JulianDate.equals(f.stop,Iso8601.MAXIMUM_VALUE)||c.appendChild(createBasicElementWithText(r,"end",JulianDate.toIso8601(f.stop))));for(var m=0;m<p.length;++m){var g=p[m];g.setAttribute("id",o.get(h.id)),g.appendChild(createBasicElementWithText(r,"name",h.name)),g.appendChild(createBasicElementWithText(r,"visibility",h.show)),g.appendChild(createBasicElementWithText(r,"description",h.description)),defined(c)&&g.appendChild(c),t.appendChild(g)}var y=u.length;if(0<y){var _=r.createElement("Placemark");_.setAttribute("id",o.get(h.id));var v,C=h.name,x=h.label;defined(x)&&(v=r.createElement("LabelStyle"),C=defined(f=a.get(x.text))&&0<f.length?f:C,defined(f=a.getColor(x.fillColor))&&(v.appendChild(createBasicElementWithText(r,"color",f)),v.appendChild(createBasicElementWithText(r,"colorMode","normal"))),defined(x=a.get(x.scale))&&v.appendChild(createBasicElementWithText(r,"scale",x)),d.push(v)),_.appendChild(createBasicElementWithText(r,"name",C)),_.appendChild(createBasicElementWithText(r,"visibility",h.show)),_.appendChild(createBasicElementWithText(r,"description",h.description)),defined(c)&&_.appendChild(c),t.appendChild(_);var b=d.length;if(0<b){for(var S=r.createElement("Style"),T=0;T<b;++T)S.appendChild(d[T]);_.appendChild(createBasicElementWithText(r,"styleUrl",n.get(S)))}if(1===u.length)_.appendChild(u[0]);else if(1<u.length){for(var E=r.createElement("MultiGeometry"),w=0;w<y;++w)E.appendChild(u[w]);_.appendChild(E)}}0<(C=h._children).length&&((_=r.createElement("Folder")).setAttribute("id",o.get(h.id)),_.appendChild(createBasicElementWithText(r,"name",h.name)),_.appendChild(createBasicElementWithText(r,"visibility",h.show)),_.appendChild(createBasicElementWithText(r,"description",h.description)),t.appendChild(_),recurseEntities(e,_,C))}}ExternalFileHandler.prototype.texture=function(e){var t=this;if("string"==typeof e||e instanceof Resource){if(!(e=Resource.createIfNeeded(e)).isDataUri)return e.url;var i=e.url.match(imageTypeRegex),r="texture_"+ ++this._count;return defined(i)&&(r+="."+i[1]),i=e.fetchBlob().then((function(e){t._files[r]=e})),this._promises.push(i),r}if(e instanceof HTMLCanvasElement){var n=when.defer();return this._promises.push(n.promise),r="texture_"+ ++this._count+".png",e.toBlob((function(e){t._files[r]=e,n.resolve()})),r}return""},ExternalFileHandler.prototype.model=function(e,t){var i=this._modelCallback;if(!defined(i))throw new RuntimeError("Encountered a model entity while exporting to KML, but no model callback was supplied.");var r,n,a={};t=i(e,t,a);for(r in a)a.hasOwnProperty(r)&&(n=when(a[r]),this._promises.push(n),n.then(getModelBlobHander(this,r)));return t},Object.defineProperties(ExternalFileHandler.prototype,{promise:{get:function(){return when.all(this._promises)}},files:{get:function(){return this._files}}}),ValueGetter.prototype.get=function(e,t,i){var r;return defined(e)&&(r=defined(e.getValue)?e.getValue(this._time,i):e),defaultValue(r,t)},ValueGetter.prototype.getColor=function(e,t){if(defined(t=this.get(e,t)))return colorToString(t)},ValueGetter.prototype.getMaterialType=function(e){if(defined(e))return e.getType(this._time)},StyleCache.prototype.get=function(e){var t=this._ids,i=e.innerHTML;if(defined(t[i]))return t[i];var r="style-"+ ++this._count;return e.setAttribute("id",r),r="#"+r,t[i]=r,this._styles[i]=e,r},StyleCache.prototype.save=function(e){var t,i=this._styles,r=e.childNodes[0];for(t in i)i.hasOwnProperty(t)&&e.insertBefore(i[t],r)},IdManager.prototype.get=function(e){if(!defined(e))return this.get(createGuid());var t=this._ids;return defined(t[e])?e.toString()+"-"+ ++t[e]:(t[e]=0,e)},exportKml._createState=function(e){var t=e.entities,i=new StyleCache,r=t.computeAvailability(),n=defined(e.time)?e.time:r.start,a=defaultValue(e.defaultAvailability,r);t=defaultValue(e.sampleDuration,60);return a.start===Iso8601.MINIMUM_VALUE?a.stop===Iso8601.MAXIMUM_VALUE?a=new TimeInterval:JulianDate.addSeconds(a.stop,-10*t,a.start):a.stop===Iso8601.MAXIMUM_VALUE&&JulianDate.addSeconds(a.start,10*t,a.stop),r=new ExternalFileHandler(e.modelCallback),{kmlDoc:document.implementation.createDocument(kmlNamespace,"kml"),ellipsoid:defaultValue(e.ellipsoid,Ellipsoid.WGS84),idManager:new IdManager,styleCache:i,externalFileHandler:r,time:n,valueGetter:new ValueGetter(n),sampleDuration:t,defaultAvailability:new TimeIntervalCollection([a])}};var scratchCartesian3$b=new Cartesian3,scratchCartographic$a=new Cartographic,scratchJulianDate$2=new JulianDate;function createPoint$1(e,t,i,r){var n,a=e.kmlDoc,o=e.ellipsoid,s=e.valueGetter,l=defaultValue(t.billboard,t.point);(defined(l)||defined(t.path))&&((n=t.position).isConstant?(s.get(n,void 0,scratchCartesian3$b),n=createBasicElementWithText(a,"coordinates",getCoordinates(scratchCartesian3$b,o)),o=a.createElement("Point"),(a=a.createElement("altitudeMode")).appendChild(getAltitudeMode(e,l.heightReference)),o.appendChild(a),o.appendChild(n),i.push(o),o=(l instanceof BillboardGraphics?createIconStyleFromBillboard:createIconStyleFromPoint)(e,l),r.push(o)):createTracks(e,t,l,i,r))}function createTracks(e,t,i,r,n){var a,o=e.kmlDoc,s=e.ellipsoid,l=e.valueGetter,c=t.position,u=!0;c instanceof CompositePositionProperty?(a=c.intervals,u=!1):a=defaultValue(t.availability,e.defaultAvailability);var d,h,p=i instanceof ModelGraphics,f=[];for(M=0;M<a.length;++M){var m=a.get(M),g=u?c:m.data,y=o.createElement("altitudeMode");g instanceof ScaledPositionProperty?(g=g._value,y.appendChild(getAltitudeMode(e,HeightReference$1.CLAMP_TO_GROUND))):defined(i)?y.appendChild(getAltitudeMode(e,i.heightReference)):y.appendChild(getAltitudeMode(e,HeightReference$1.NONE));var _=[],v=[];if(g.isConstant){l.get(g,void 0,scratchCartesian3$b);var C=createBasicElementWithText(o,"coordinates",getCoordinates(scratchCartesian3$b,s));_.push(JulianDate.toIso8601(m.start)),v.push(C),_.push(JulianDate.toIso8601(m.stop)),v.push(C)}else if(g instanceof SampledPositionProperty)for(d=g._property._times,b=0;b<d.length;++b)_.push(JulianDate.toIso8601(d[b])),g.getValueInReferenceFrame(d[b],ReferenceFrame$1.FIXED,scratchCartesian3$b),v.push(getCoordinates(scratchCartesian3$b,s));else if(g instanceof SampledProperty){d=g._times;for(var x=g._values,b=0;b<d.length;++b)_.push(JulianDate.toIso8601(d[b])),Cartesian3.fromArray(x,3*b,scratchCartesian3$b),v.push(getCoordinates(scratchCartesian3$b,s))}else{var S=e.sampleDuration;m.start.clone(scratchJulianDate$2),m.isStartIncluded||JulianDate.addSeconds(scratchJulianDate$2,S,scratchJulianDate$2);for(var T=m.stop;JulianDate.lessThan(scratchJulianDate$2,T);)g.getValue(scratchJulianDate$2,scratchCartesian3$b),_.push(JulianDate.toIso8601(scratchJulianDate$2)),v.push(getCoordinates(scratchCartesian3$b,s)),JulianDate.addSeconds(scratchJulianDate$2,S,scratchJulianDate$2);m.isStopIncluded&&JulianDate.equals(scratchJulianDate$2,T)&&(g.getValue(scratchJulianDate$2,scratchCartesian3$b),_.push(JulianDate.toIso8601(scratchJulianDate$2)),v.push(getCoordinates(scratchCartesian3$b,s)))}var E=o.createElementNS(gxNamespace,"Track");E.appendChild(y);for(var w=0;w<_.length;++w){var A=createBasicElementWithText(o,"when",_[w]),P=createBasicElementWithText(o,"coord",v[w],gxNamespace);E.appendChild(A),E.appendChild(P)}p&&E.appendChild(createModelGeometry(e,i)),f.push(E)}if(1===f.length)r.push(f[0]);else if(1<f.length){for(var D=o.createElementNS(gxNamespace,"MultiTrack"),M=0;M<f.length;++M)D.appendChild(f[M]);r.push(D)}defined(i)&&!p&&(h=(i instanceof BillboardGraphics?createIconStyleFromBillboard:createIconStyleFromPoint)(e,i),n.push(h)),defined(r=t.path)&&(h=l.get(r.width),(defined(t=r.material)||defined(h))&&(r=o.createElement("LineStyle"),defined(h)&&r.appendChild(createBasicElementWithText(o,"width",h)),processMaterial(e,t,r),n.push(r)))}function createIconStyleFromPoint(e,t){var i=e.kmlDoc,r=e.valueGetter,n=i.createElement("IconStyle");return defined(e=r.getColor(t.color))&&(n.appendChild(createBasicElementWithText(i,"color",e)),n.appendChild(createBasicElementWithText(i,"colorMode","normal"))),defined(t=r.get(t.pixelSize))&&n.appendChild(createBasicElementWithText(i,"scale",t/BILLBOARD_SIZE$1)),n}function createIconStyleFromBillboard(e,t){var i=e.kmlDoc,r=e.valueGetter,n=e.externalFileHandler,a=i.createElement("IconStyle");defined(e=r.get(t.image))&&(e=n.texture(e),(s=i.createElement("Icon")).appendChild(createBasicElementWithText(i,"href",e)),defined(o=r.get(t.imageSubRegion))&&(s.appendChild(createBasicElementWithText(i,"x",o.x,gxNamespace)),s.appendChild(createBasicElementWithText(i,"y",o.y,gxNamespace)),s.appendChild(createBasicElementWithText(i,"w",o.width,gxNamespace)),s.appendChild(createBasicElementWithText(i,"h",o.height,gxNamespace))),a.appendChild(s)),defined(e=r.getColor(t.color))&&(a.appendChild(createBasicElementWithText(i,"color",e)),a.appendChild(createBasicElementWithText(i,"colorMode","normal")));var o=r.get(t.scale);defined(o)&&a.appendChild(createBasicElementWithText(i,"scale",o));var s=r.get(t.pixelOffset);defined(s)&&(o=defaultValue(o,1),Cartesian2.divideByScalar(s,o,s),e=r.get(t.width,BILLBOARD_SIZE$1),l=r.get(t.height,BILLBOARD_SIZE$1),(o=r.get(t.horizontalOrigin,HorizontalOrigin$1.CENTER))===HorizontalOrigin$1.CENTER?s.x-=.5*e:o===HorizontalOrigin$1.RIGHT&&(s.x-=e),(e=r.get(t.verticalOrigin,VerticalOrigin$1.CENTER))===VerticalOrigin$1.TOP?s.y+=l:e===VerticalOrigin$1.CENTER&&(s.y+=.5*l),(l=i.createElement("hotSpot")).setAttribute("x",-s.x),l.setAttribute("y",s.y),l.setAttribute("xunits","pixels"),l.setAttribute("yunits","pixels"),a.appendChild(l));var l=r.get(t.rotation);t=r.get(t.alignedAxis);return defined(l)&&Cartesian3.equals(Cartesian3.UNIT_Z,t)&&(0===(l=CesiumMath.toDegrees(-l))&&(l=360),a.appendChild(createBasicElementWithText(i,"heading",l))),a}function createLineString$1(e,t,i,r){var n,a,o,s,l=e.kmlDoc,c=e.ellipsoid,u=e.valueGetter;defined(t)&&(s=l.createElement("LineString"),o=l.createElement("altitudeMode"),a=(n=u.get(t.clampToGround,!1))?(s.appendChild(createBasicElementWithText(l,"tessellate",!0)),l.createTextNode("clampToGround")):l.createTextNode("absolute"),o.appendChild(a),s.appendChild(o),o=t.positions,c=createBasicElementWithText(l,"coordinates",getCoordinates(u.get(o),c)),s.appendChild(c),c=u.get(t.zIndex),n&&defined(c)&&s.appendChild(createBasicElementWithText(l,"drawOrder",c,gxNamespace)),i.push(s),s=l.createElement("LineStyle"),defined(u=u.get(t.width))&&s.appendChild(createBasicElementWithText(l,"width",u)),processMaterial(e,t.material,s),r.push(s))}function getRectangleBoundaries(e,t,i){var r=e.kmlDoc,n=(e=e.valueGetter).get(t.height,0);0<i&&(n=i);t=t.coordinates;for(var a=e.get(t),o=[],s=[Rectangle.northeast,Rectangle.southeast,Rectangle.southwest,Rectangle.northwest],l=0;l<4;++l)s[l](a,scratchCartographic$a),o.push(CesiumMath.toDegrees(scratchCartographic$a.longitude)+","+CesiumMath.toDegrees(scratchCartographic$a.latitude)+","+n);return e=createBasicElementWithText(r,"coordinates",o.join(" ")),t=r.createElement("outerBoundaryIs"),(r=r.createElement("LinearRing")).appendChild(e),t.appendChild(r),[t]}function getLinearRing(e,t,i,r){for(var n=e.kmlDoc,a=e.ellipsoid,o=[],s=t.length,l=0;l<s;++l)Cartographic.fromCartesian(t[l],a,scratchCartographic$a),o.push(CesiumMath.toDegrees(scratchCartographic$a.longitude)+","+CesiumMath.toDegrees(scratchCartographic$a.latitude)+","+(r?scratchCartographic$a.height:i));return e=createBasicElementWithText(n,"coordinates",o.join(" ")),(n=n.createElement("LinearRing")).appendChild(e),n}function getPolygonBoundaries(e,t,i){var r=e.kmlDoc,n=(s=e.valueGetter).get(t.height,0),a=s.get(t.perPositionHeight,!1);!a&&0<i&&(n=i);var o=[],s=(i=t.hierarchy,t=s.get(i),Array.isArray(t)?t:t.positions);(i=r.createElement("outerBoundaryIs")).appendChild(getLinearRing(e,s,n,a)),o.push(i);var l=t.holes;if(defined(l))for(var c=l.length,u=0;u<c;++u){var d=r.createElement("innerBoundaryIs");d.appendChild(getLinearRing(e,l[u].positions,n,a)),o.push(d)}return o}function createPolygon$1(e,t,i,r,n){var a=e.kmlDoc,o=e.valueGetter;if(defined(t)){var s=t instanceof RectangleGraphics;if(s&&"Image"===o.getMaterialType(t.material))createGroundOverlay(e,t,n);else{var l=a.createElement("Polygon");0<(n=o.get(t.extrudedHeight,0))&&l.appendChild(createBasicElementWithText(a,"extrude",!0));for(var c=(s?getRectangleBoundaries:getPolygonBoundaries)(e,t,n),u=c.length,d=0;d<u;++d)l.appendChild(c[d]);(n=a.createElement("altitudeMode")).appendChild(getAltitudeMode(e,t.heightReference)),l.appendChild(n),i.push(l),n=a.createElement("PolyStyle"),(i=o.get(t.fill,!1))&&n.appendChild(createBasicElementWithText(a,"fill",i)),processMaterial(e,t.material,n),(i=o.get(t.outline,!1))&&(n.appendChild(createBasicElementWithText(a,"outline",i)),e=a.createElement("LineStyle"),i=o.get(t.outlineWidth,1),e.appendChild(createBasicElementWithText(a,"width",i)),t=o.getColor(t.outlineColor,Color.BLACK),e.appendChild(createBasicElementWithText(a,"color",t)),e.appendChild(createBasicElementWithText(a,"colorMode","normal")),r.push(e)),r.push(n)}}}function createGroundOverlay(e,t,i){var r=e.kmlDoc,n=e.valueGetter,a=e.externalFileHandler,o=r.createElement("GroundOverlay"),s=r.createElement("altitudeMode");s.appendChild(getAltitudeMode(e,t.heightReference)),o.appendChild(s),defined(e=n.get(t.height))&&o.appendChild(createBasicElementWithText(r,"altitude",e)),s=n.get(t.coordinates),(e=r.createElement("LatLonBox")).appendChild(createBasicElementWithText(r,"north",CesiumMath.toDegrees(s.north))),e.appendChild(createBasicElementWithText(r,"south",CesiumMath.toDegrees(s.south))),e.appendChild(createBasicElementWithText(r,"east",CesiumMath.toDegrees(s.east))),e.appendChild(createBasicElementWithText(r,"west",CesiumMath.toDegrees(s.west))),o.appendChild(e),n=n.get(t.material),t=a.texture(n.image),(a=r.createElement("Icon")).appendChild(createBasicElementWithText(r,"href",t)),o.appendChild(a),defined(n.color)&&o.appendChild(createBasicElementWithText(r,"color",colorToString(n.color))),i.push(o)}function createModelGeometry(e,t){var i=e.kmlDoc,r=e.valueGetter,n=e.externalFileHandler,a=i.createElement("Model");defined(r=r.get(t.scale))&&((o=i.createElement("scale")).appendChild(createBasicElementWithText(i,"x",r)),o.appendChild(createBasicElementWithText(i,"y",r)),o.appendChild(createBasicElementWithText(i,"z",r)),a.appendChild(o));var o=i.createElement("Link");e=n.model(t,e.time);return o.appendChild(createBasicElementWithText(i,"href",e)),a.appendChild(o),a}function createModel$1(e,t,i,r,n){var a,o,s,l=e.kmlDoc,c=e.ellipsoid,u=e.valueGetter;defined(i)&&((a=t.position).isConstant?(o=createModelGeometry(e,i),(s=l.createElement("altitudeMode")).appendChild(getAltitudeMode(e,i.heightReference)),o.appendChild(s),u.get(a,void 0,scratchCartesian3$b),Cartographic.fromCartesian(scratchCartesian3$b,c,scratchCartographic$a),(c=l.createElement("Location")).appendChild(createBasicElementWithText(l,"longitude",CesiumMath.toDegrees(scratchCartographic$a.longitude))),c.appendChild(createBasicElementWithText(l,"latitude",CesiumMath.toDegrees(scratchCartographic$a.latitude))),c.appendChild(createBasicElementWithText(l,"altitude",scratchCartographic$a.height)),o.appendChild(c),r.push(o)):createTracks(e,t,i,r,n))}function processMaterial(e,t,i){var r,n=e.kmlDoc,a=e.valueGetter;if(defined(t)&&defined(e=a.get(t))){switch(a.getMaterialType(t)){case"Image":r=colorToString(Color.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":r=colorToString(e.color);break;case"PolylineOutline":r=colorToString(e.color),a=colorToString(e.outlineColor),t=e.outlineWidth,i.appendChild(createBasicElementWithText(n,"outerColor",a,gxNamespace)),i.appendChild(createBasicElementWithText(n,"outerWidth",t,gxNamespace));break;case"Stripe":r=colorToString(e.oddColor)}defined(r)&&(i.appendChild(createBasicElementWithText(n,"color",r)),i.appendChild(createBasicElementWithText(n,"colorMode","normal")))}}function getAltitudeMode(e,t){var i,r=e.kmlDoc;switch(e.valueGetter.get(t,HeightReference$1.NONE)){case HeightReference$1.NONE:i=r.createTextNode("absolute");break;case HeightReference$1.CLAMP_TO_GROUND:i=r.createTextNode("clampToGround");break;case HeightReference$1.RELATIVE_TO_GROUND:i=r.createTextNode("relativeToGround")}return i}function getCoordinates(e,t){Array.isArray(e)||(e=[e]);for(var i=e.length,r=[],n=0;n<i;++n)Cartographic.fromCartesian(e[n],t,scratchCartographic$a),r.push(CesiumMath.toDegrees(scratchCartographic$a.longitude)+","+CesiumMath.toDegrees(scratchCartographic$a.latitude)+","+scratchCartographic$a.height);return r.join(" ")}function createBasicElementWithText(e,t,i,r){return"boolean"==typeof(i=defaultValue(i,""))&&(i=i?"1":"0"),t=defined(r)?e.createElementNS(r,t):e.createElement(t),i="string"===i&&-1!==i.indexOf("<")?e.createCDATASection(i):e.createTextNode(i),t.appendChild(i),t}function colorToString(e){for(var t="",i=e.toBytes(),r=3;0<=r;--r)t+=i[r]<16?"0"+i[r].toString(16):i[r].toString(16);return t}var ViewportQuadVS="attribute vec4 position;\nattribute vec2 textureCoordinates;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_Position = position;\nv_textureCoordinates = textureCoordinates;\n}\n",renderStateScratch;function ComputeEngine(e){this._context=e}var drawCommandScratch=new DrawCommand({primitiveType:PrimitiveType$1.TRIANGLES}),clearCommandScratch=new ClearCommand({color:new Color(0,0,0,0)});function createFramebuffer$1(e,t){return new Framebuffer({context:e,colorTextures:[t],destroyAttachments:!1})}function createViewportQuadShader(e,t){return ShaderProgram.fromCache({context:e,vertexShaderSource:ViewportQuadVS,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function createRenderState(e,t){return defined(renderStateScratch)&&renderStateScratch.viewport.width===e&&renderStateScratch.viewport.height===t||(renderStateScratch=RenderState.fromCache({viewport:new BoundingRectangle(0,0,e,t)})),renderStateScratch}function PassState(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}function ShaderCache(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function destroyShader(e,t){for(var i=t.derivedKeywords,r=i.length,n=0;n<r;++n){var a=i[n]+t.keyword;destroyShader(e,e._shaders[a])}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}function TextureCache(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}function SunLight(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.color=Color.clone(defaultValue(e.color,Color.WHITE)),this.intensity=defaultValue(e.intensity,2)}function UniformState(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new BoundingRectangle,this._viewportCartesian4=new Cartesian4,this._viewportDirty=!1,this._viewportOrthographicMatrix=Matrix4.clone(Matrix4.IDENTITY),this._viewportTransformation=Matrix4.clone(Matrix4.IDENTITY),this._model=Matrix4.clone(Matrix4.IDENTITY),this._view=Matrix4.clone(Matrix4.IDENTITY),this._inverseView=Matrix4.clone(Matrix4.IDENTITY),this._projection=Matrix4.clone(Matrix4.IDENTITY),this._infiniteProjection=Matrix4.clone(Matrix4.IDENTITY),this._entireFrustum=new Cartesian2,this._currentFrustum=new Cartesian2,this._frustumPlanes=new Cartesian4,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=Matrix3.clone(Matrix4.IDENTITY),this._view3DDirty=!0,this._view3D=new Matrix4,this._inverseView3DDirty=!0,this._inverseView3D=new Matrix4,this._inverseModelDirty=!0,this._inverseModel=new Matrix4,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new Matrix3,this._viewRotation=new Matrix3,this._inverseViewRotation=new Matrix3,this._viewRotation3D=new Matrix3,this._inverseViewRotation3D=new Matrix3,this._inverseProjectionDirty=!0,this._inverseProjection=new Matrix4,this._modelViewDirty=!0,this._modelView=new Matrix4,this._modelView3DDirty=!0,this._modelView3D=new Matrix4,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new Matrix4,this._inverseModelViewDirty=!0,this._inverseModelView=new Matrix4,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new Matrix4,this._viewProjectionDirty=!0,this._viewProjection=new Matrix4,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new Matrix4,this._modelViewProjectionDirty=!0,this._modelViewProjection=new Matrix4,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new Matrix4,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new Matrix4,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new Matrix4,this._normalDirty=!0,this._normal=new Matrix3,this._normal3DDirty=!0,this._normal3D=new Matrix3,this._inverseNormalDirty=!0,this._inverseNormal=new Matrix3,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new Matrix3,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new EncodedCartesian3,this._cameraPosition=new Cartesian3,this._sunPositionWC=new Cartesian3,this._sunPositionColumbusView=new Cartesian3,this._sunDirectionWC=new Cartesian3,this._sunDirectionEC=new Cartesian3,this._moonDirectionEC=new Cartesian3,this._lightDirectionWC=new Cartesian3,this._lightDirectionEC=new Cartesian3,this._lightColor=new Cartesian3,this._lightColorHdr=new Cartesian3,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new Cartesian3,this._cameraRight=new Cartesian3,this._cameraUp=new Cartesian3,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new Cartesian2,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new Color,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new Cartesian2,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._imagerySplitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}function setView(e,t){Matrix4.clone(t,e._view),Matrix4.getMatrix3(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function setInverseView(e,t){Matrix4.clone(t,e._inverseView),Matrix4.getMatrix3(t,e._inverseViewRotation)}function setProjection(e,t){Matrix4.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function setInfiniteProjection(e,t){Matrix4.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}function setCamera(e,t){Cartesian3.clone(t.positionWC,e._cameraPosition),Cartesian3.clone(t.directionWC,e._cameraDirection),Cartesian3.clone(t.rightWC,e._cameraRight),Cartesian3.clone(t.upWC,e._cameraUp),defined(t=t.positionCartographic)?e._eyeHeight=t.height:e._eyeHeight=-e._ellipsoid.maximumRadius,e._encodedCameraPositionMCDirty=!0}ComputeEngine.prototype.execute=function(e){defined(e.preExecute)&&e.preExecute(e);var t=e.outputTexture,i=t.width,r=t.height,n=this._context,a=defined(e.vertexArray)?e.vertexArray:n.getViewportQuadVertexArray(),o=defined(e.shaderProgram)?e.shaderProgram:createViewportQuadShader(n,e.fragmentShaderSource),s=createFramebuffer$1(n,t),l=createRenderState(i,r);i=e.uniformMap;(r=clearCommandScratch).framebuffer=s,r.renderState=l,r.execute(n),(r=drawCommandScratch).vertexArray=a,r.renderState=l,r.shaderProgram=o,r.uniformMap=i,r.framebuffer=s,r.execute(n),s.destroy(),e.persists||(o.destroy(),defined(e.vertexArray)&&a.destroy()),defined(e.postExecute)&&e.postExecute(t)},ComputeEngine.prototype.isDestroyed=function(){return!1},ComputeEngine.prototype.destroy=function(){return destroyObject(this)},Object.defineProperties(ShaderCache.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),ShaderCache.prototype.replaceShaderProgram=function(e){return defined(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},ShaderCache.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,r=e.attributeLocations;"string"==typeof t&&(t=new ShaderSource({sources:[t]})),"string"==typeof i&&(i=new ShaderSource({sources:[i]}));var n,a=t.createCombinedVertexShader(this._context),o=i.createCombinedFragmentShader(this._context),s=a+o+JSON.stringify(r);return defined(this._shaders[s])?(n=this._shaders[s],delete this._shadersToRelease[s]):(n={cache:this,shaderProgram:r=new ShaderProgram({gl:(e=this._context)._gl,logShaderCompilation:e.logShaderCompilation,debugShaders:e.debugShaders,vertexShaderSource:t,vertexShaderText:a,fragmentShaderSource:i,fragmentShaderText:o,attributeLocations:r}),keyword:s,derivedKeywords:[],count:0},r._cachedShader=n,this._shaders[s]=n,++this._numberOfShaders),++n.count,n.shaderProgram},ShaderCache.prototype.replaceDerivedShaderProgram=function(e,t,i){var r=e._cachedShader,n=t+r.keyword;return defined(n=this._shaders[n])&&(destroyShader(this,n),-1<(n=r.derivedKeywords.indexOf(t))&&r.derivedKeywords.splice(n,1)),this.createDerivedShaderProgram(e,t,i)},ShaderCache.prototype.getDerivedShaderProgram=function(e,t){if(e=t+e._cachedShader.keyword,defined(e=this._shaders[e]))return e.shaderProgram},ShaderCache.prototype.createDerivedShaderProgram=function(e,t,i){var r=e._cachedShader,n=t+r.keyword,a=i.vertexShaderSource,o=i.fragmentShaderSource,s=i.attributeLocations;"string"==typeof a&&(a=new ShaderSource({sources:[a]})),"string"==typeof o&&(o=new ShaderSource({sources:[o]}));var l=this._context;e=a.createCombinedVertexShader(l),i=o.createCombinedFragmentShader(l),s={cache:this,shaderProgram:i=new ShaderProgram({gl:l._gl,logShaderCompilation:l.logShaderCompilation,debugShaders:l.debugShaders,vertexShaderSource:a,vertexShaderText:e,fragmentShaderSource:o,fragmentShaderText:i,attributeLocations:s}),keyword:n,derivedKeywords:[],count:0};return r.derivedKeywords.push(t),i._cachedShader=s,this._shaders[n]=s,i},ShaderCache.prototype.destroyReleasedShaderPrograms=function(){var e,t=this._shadersToRelease;for(e in t)t.hasOwnProperty(e)&&(destroyShader(this,t[e]),--this._numberOfShaders);this._shadersToRelease={}},ShaderCache.prototype.releaseShaderProgram=function(e){!defined(e)||(e=e._cachedShader)&&0==--e.count&&(this._shadersToRelease[e.keyword]=e)},ShaderCache.prototype.isDestroyed=function(){return!1},ShaderCache.prototype.destroy=function(){var e,t=this._shaders;for(e in t)t.hasOwnProperty(e)&&t[e].shaderProgram.finalDestroy();return destroyObject(this)},Object.defineProperties(TextureCache.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),TextureCache.prototype.getTexture=function(e){var t=this._textures[e];if(defined(t))return delete this._texturesToRelease[e],++t.count,t.texture},TextureCache.prototype.addTexture=function(e,t){var i={texture:t,count:1};t.finalDestroy=t.destroy;var r=this;t.destroy=function(){0==--i.count&&(r._texturesToRelease[e]=i)},this._textures[e]=i,++this._numberOfTextures},TextureCache.prototype.destroyReleasedTextures=function(){var e,t,i=this._texturesToRelease;for(e in i)i.hasOwnProperty(e)&&(t=i[e],delete this._textures[e],t.texture.finalDestroy(),--this._numberOfTextures);this._texturesToRelease={}},TextureCache.prototype.isDestroyed=function(){return!1},TextureCache.prototype.destroy=function(){var e,t=this._textures;for(e in t)t.hasOwnProperty(e)&&t[e].texture.finalDestroy();return destroyObject(this)},Object.defineProperties(UniformState.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){var t;BoundingRectangle.equals(e,this._viewport)||(BoundingRectangle.clone(e,this._viewport),t=this._viewport,(e=this._viewportCartesian4).x=t.x,e.y=t.y,e.z=t.width,e.w=t.height,this._viewportDirty=!0)}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return cleanViewport(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return cleanViewport(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){Matrix4.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,Matrix4.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,Matrix4.getMatrix3(this.inverseModel,e),Matrix3.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return updateView3D(this),this._view3D}},viewRotation:{get:function(){return updateView3D(this),this._viewRotation}},viewRotation3D:{get:function(){return updateView3D(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return updateInverseView3D(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return updateInverseView3D(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return cleanInverseProjection(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return cleanModelView(this),this._modelView}},modelView3D:{get:function(){return cleanModelView3D(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return cleanModelViewRelativeToEye(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return cleanInverseModelView(this),this._inverseModelView}},inverseModelView3D:{get:function(){return cleanInverseModelView3D(this),this._inverseModelView3D}},viewProjection:{get:function(){return cleanViewProjection(this),this._viewProjection}},inverseViewProjection:{get:function(){return cleanInverseViewProjection(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return cleanModelViewProjection(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return cleanInverseModelViewProjection(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return cleanModelViewProjectionRelativeToEye(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return cleanModelViewInfiniteProjection(this),this._modelViewInfiniteProjection}},normal:{get:function(){return cleanNormal(this),this._normal}},normal3D:{get:function(){return cleanNormal3D(this),this._normal3D}},inverseNormal:{get:function(){return cleanInverseNormal(this),this._inverseNormal}},inverseNormal3D:{get:function(){return cleanInverseNormal3D(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return cleanEncodedCameraPositionMC(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return cleanEncodedCameraPositionMC(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},imagerySplitPosition:{get:function(){return this._imagerySplitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return defaultValue(this._ellipsoid,Ellipsoid.WGS84)}}});var transformMatrix=new Matrix3,sunCartographicScratch=new Cartographic;function setSunAndMoonDirections(e,t){defined(Transforms.computeIcrfToFixedMatrix(t.time,transformMatrix))||(transformMatrix=Transforms.computeTemeToPseudoFixedMatrix(t.time,transformMatrix));var i=Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);Matrix3.multiplyByVector(transformMatrix,i,i),Cartesian3.normalize(i,e._sunDirectionWC),i=Matrix3.multiplyByVector(e.viewRotation3D,i,e._sunDirectionEC),Cartesian3.normalize(i,i),i=Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),Matrix3.multiplyByVector(transformMatrix,i,i),Matrix3.multiplyByVector(e.viewRotation3D,i,i),Cartesian3.normalize(i,i),t=(i=t.mapProjection).ellipsoid.cartesianToCartographic(e._sunPositionWC,sunCartographicScratch),i.project(t,e._sunPositionColumbusView)}UniformState.prototype.updateCamera=function(e){setView(this,e.viewMatrix),setInverseView(this,e.inverseViewMatrix),setCamera(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==SceneMode$1.SCENE2D&&e.frustum instanceof OrthographicFrustum},UniformState.prototype.updateFrustum=function(e){setProjection(this,e.projectionMatrix),defined(e.infiniteProjectionMatrix)&&setInfiniteProjection(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=CesiumMath.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne,defined(e._offCenterFrustum)&&(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right},UniformState.prototype.updatePass=function(e){this._pass=e};var EMPTY_ARRAY=[],defaultLight=new SunLight;function cleanViewport(e){var t;e._viewportDirty&&(t=e._viewport,Matrix4.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),Matrix4.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1)}function cleanInverseProjection(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===SceneMode$1.SCENE2D||e._mode===SceneMode$1.MORPHING||e._orthographicIn3D?Matrix4.clone(Matrix4.ZERO,e._inverseProjection):Matrix4.inverse(e._projection,e._inverseProjection))}function cleanModelView(e){e._modelViewDirty&&(e._modelViewDirty=!1,Matrix4.multiplyTransformation(e._view,e._model,e._modelView))}function cleanModelView3D(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,Matrix4.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function cleanInverseModelView(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,Matrix4.inverse(e.modelView,e._inverseModelView))}function cleanInverseModelView3D(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,Matrix4.inverse(e.modelView3D,e._inverseModelView3D))}function cleanViewProjection(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,Matrix4.multiply(e._projection,e._view,e._viewProjection))}function cleanInverseViewProjection(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,Matrix4.inverse(e.viewProjection,e._inverseViewProjection))}function cleanModelViewProjection(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,Matrix4.multiply(e._projection,e.modelView,e._modelViewProjection))}function cleanModelViewRelativeToEye(e){var t;e._modelViewRelativeToEyeDirty&&(e._modelViewRelativeToEyeDirty=!1,t=e.modelView,(e=e._modelViewRelativeToEye)[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=0,e[13]=0,e[14]=0,e[15]=t[15])}function cleanInverseModelViewProjection(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,Matrix4.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function cleanModelViewProjectionRelativeToEye(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,Matrix4.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function cleanModelViewInfiniteProjection(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,Matrix4.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function cleanNormal(e){var t;e._normalDirty&&(e._normalDirty=!1,t=e._normal,Matrix4.getMatrix3(e.inverseModelView,t),Matrix3.getRotation(t,t),Matrix3.transpose(t,t))}function cleanNormal3D(e){var t;e._normal3DDirty&&(e._normal3DDirty=!1,t=e._normal3D,Matrix4.getMatrix3(e.inverseModelView3D,t),Matrix3.getRotation(t,t),Matrix3.transpose(t,t))}function cleanInverseNormal(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,Matrix4.getMatrix3(e.inverseModelView,e._inverseNormal),Matrix3.getRotation(e._inverseNormal,e._inverseNormal))}function cleanInverseNormal3D(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,Matrix4.getMatrix3(e.inverseModelView3D,e._inverseNormal3D),Matrix3.getRotation(e._inverseNormal3D,e._inverseNormal3D))}UniformState.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;var t=e.camera;this.updateCamera(t),e.mode===SceneMode$1.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),setSunAndMoonDirections(this,e),(i=defaultValue(e.light,defaultLight))instanceof SunLight?(this._lightDirectionWC=Cartesian3.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=Cartesian3.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=Cartesian3.normalize(Cartesian3.negate(i.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=Matrix3.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));var i,r=i.color;r=Cartesian3.fromElements(r.red,r.green,r.blue,this._lightColorHdr),r=Cartesian3.multiplyByScalar(r,i.intensity,r);1<(i=Cartesian3.maximumComponent(r))?Cartesian3.divideByScalar(r,i,this._lightColor):Cartesian3.clone(r,this._lightColor),r=defined(r=e.brdfLutGenerator)?r.colorTexture:void 0,this._brdfLut=r,this._environmentMap=defaultValue(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=defaultValue(e.sphericalHarmonicCoefficients,EMPTY_ARRAY),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,defined(this._specularEnvironmentMaps)&&Cartesian2.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=Transforms.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._imagerySplitPosition=e.imagerySplitPosition*e.context.drawingBufferWidth,r=t.frustum.fov,t=this._viewport,t=defined(r)?t.height>t.width?2*Math.tan(.5*r)/t.height:2*Math.tan(.5*r)/t.width:1/Math.max(t.width,t.height),this._geometricToleranceOverMeter=t*e.maximumScreenSpaceError,Color.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};var cameraPositionMC=new Cartesian3;function cleanEncodedCameraPositionMC(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,Matrix4.multiplyByPoint(e.inverseModel,e._cameraPosition,cameraPositionMC),EncodedCartesian3.fromCartesian(cameraPositionMC,e._encodedCameraPositionMC))}var view2Dto3DPScratch=new Cartesian3,view2Dto3DRScratch=new Cartesian3,view2Dto3DUScratch=new Cartesian3,view2Dto3DDScratch=new Cartesian3,view2Dto3DCartographicScratch=new Cartographic,view2Dto3DCartesian3Scratch=new Cartesian3,view2Dto3DMatrix4Scratch=new Matrix4;function view2Dto3D(e,t,i,r,n,a,o,s){var l=view2Dto3DPScratch;return l.x=e.y,l.y=e.z,l.z=e.x,(e=view2Dto3DRScratch).x=i.y,e.y=i.z,e.z=i.x,(i=view2Dto3DUScratch).x=r.y,i.y=r.z,i.z=r.x,(r=view2Dto3DDScratch).x=t.y,r.y=t.z,r.z=t.x,a===SceneMode$1.SCENE2D&&(l.z=.5*n),(l=o.unproject(l,view2Dto3DCartographicScratch)).longitude=CesiumMath.clamp(l.longitude,-Math.PI,Math.PI),l.latitude=CesiumMath.clamp(l.latitude,-CesiumMath.PI_OVER_TWO,CesiumMath.PI_OVER_TWO),l=(o=o.ellipsoid).cartographicToCartesian(l,view2Dto3DCartesian3Scratch),o=Transforms.eastNorthUpToFixedFrame(l,o,view2Dto3DMatrix4Scratch),Matrix4.multiplyByPointAsVector(o,e,e),Matrix4.multiplyByPointAsVector(o,i,i),Matrix4.multiplyByPointAsVector(o,r,r),defined(s)||(s=new Matrix4),s[0]=e.x,s[1]=i.x,s[2]=-r.x,s[3]=0,s[4]=e.y,s[5]=i.y,s[6]=-r.y,s[7]=0,s[8]=e.z,s[9]=i.z,s[10]=-r.z,s[11]=0,s[12]=-Cartesian3.dot(e,l),s[13]=-Cartesian3.dot(i,l),s[14]=Cartesian3.dot(r,l),s[15]=1,s}function updateView3D(e){e._view3DDirty&&(e._mode===SceneMode$1.SCENE3D?Matrix4.clone(e._view,e._view3D):view2Dto3D(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),Matrix4.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function updateInverseView3D(e){e._inverseView3DDirty&&(Matrix4.inverseTransformation(e.view3D,e._inverseView3D),Matrix4.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}function errorToString(e,t){var i="WebGL Error:  ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}function createErrorMessage(e,t,i,r){for(var n=errorToString(e,r)+": "+t.name+"(",a=0;a<i.length;++a)0!==a&&(n+=", "),n+=i[a];return n+");"}function throwOnError(e,t,i){var r=e.getError();if(r!==e.NO_ERROR)throw new RuntimeError(createErrorMessage(e,t,i,r))}function makeGetterSetter(e,t,i){return{get:function(){var r=e[t];return i(e,"get: "+t,r),e[t]},set:function(r){e[t]=r,i(e,"set: "+t,r)}}}function wrapGL(e,t){if(!defined(t))return e;var i,r={};for(i in e){var n=e[i];n instanceof Function?r[i]=function(i){return function(){var r=i.apply(e,arguments);return t(e,i,arguments),r}}(n):Object.defineProperty(r,i,makeGetterSetter(e,i,t))}return r}function getExtension(e,t){for(var i=t.length,r=0;r<i;++r){var n=e.getExtension(t[r]);if(n)return n}}function Context(e,t){if("undefined"==typeof WebGLRenderingContext)throw new RuntimeError("The browser does not support WebGL.  Visit http://get.webgl.org.");this._canvas=e,(t=defaultValue(t=clone(t,!0),{})).allowTextureFilterAnisotropic=defaultValue(t.allowTextureFilterAnisotropic,!0);var i=defaultValue(t.webgl,{});i.alpha=defaultValue(i.alpha,!1),i.stencil=defaultValue(i.stencil,!0);var r=defaultValue(t.requestWebgl2,!1)&&"undefined"!=typeof WebGL2RenderingContext,n=!1,a=t.getWebGLStub;if(defined(a))s=a(e,i);else if(r&&defined(s=e.getContext("webgl2",i)||e.getContext("experimental-webgl2",i)||void 0)&&(n=!0),defined(s)||(s=e.getContext("webgl",i)||e.getContext("experimental-webgl",i)||void 0),!defined(s))throw new RuntimeError("The browser supports WebGL, but initialization failed.");this._originalGLContext=s,this._gl=s,this._webgl2=n,this._id=createGuid(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new ShaderCache(this),this._textureCache=new TextureCache;var o=s;this._stencilBits=o.getParameter(o.STENCIL_BITS),ContextLimits._maximumCombinedTextureImageUnits=o.getParameter(o.MAX_COMBINED_TEXTURE_IMAGE_UNITS),ContextLimits._maximumCubeMapSize=o.getParameter(o.MAX_CUBE_MAP_TEXTURE_SIZE),ContextLimits._maximumFragmentUniformVectors=o.getParameter(o.MAX_FRAGMENT_UNIFORM_VECTORS),ContextLimits._maximumTextureImageUnits=o.getParameter(o.MAX_TEXTURE_IMAGE_UNITS),ContextLimits._maximumRenderbufferSize=o.getParameter(o.MAX_RENDERBUFFER_SIZE),ContextLimits._maximumTextureSize=o.getParameter(o.MAX_TEXTURE_SIZE),ContextLimits._maximumVaryingVectors=o.getParameter(o.MAX_VARYING_VECTORS),ContextLimits._maximumVertexAttributes=o.getParameter(o.MAX_VERTEX_ATTRIBS),ContextLimits._maximumVertexTextureImageUnits=o.getParameter(o.MAX_VERTEX_TEXTURE_IMAGE_UNITS),ContextLimits._maximumVertexUniformVectors=o.getParameter(o.MAX_VERTEX_UNIFORM_VECTORS);var s=o.getParameter(o.ALIASED_LINE_WIDTH_RANGE);ContextLimits._minimumAliasedLineWidth=s[0],ContextLimits._maximumAliasedLineWidth=s[1],s=o.getParameter(o.ALIASED_POINT_SIZE_RANGE),ContextLimits._minimumAliasedPointSize=s[0],ContextLimits._maximumAliasedPointSize=s[1],s=o.getParameter(o.MAX_VIEWPORT_DIMS),ContextLimits._maximumViewportWidth=s[0],ContextLimits._maximumViewportHeight=s[1],s=o.getShaderPrecisionFormat(o.FRAGMENT_SHADER,o.HIGH_FLOAT),ContextLimits._highpFloatSupported=0!==s.precision,s=o.getShaderPrecisionFormat(o.FRAGMENT_SHADER,o.HIGH_INT),ContextLimits._highpIntSupported=0!==s.rangeMax,this._antialias=o.getContextAttributes().antialias,this._standardDerivatives=!!getExtension(o,["OES_standard_derivatives"]),this._blendMinmax=!!getExtension(o,["EXT_blend_minmax"]),this._elementIndexUint=!!getExtension(o,["OES_element_index_uint"]),this._depthTexture=!!getExtension(o,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!getExtension(o,["EXT_frag_depth"]),this._debugShaders=getExtension(o,["WEBGL_debug_shaders"]),this._textureFloat=!!getExtension(o,["OES_texture_float"]),this._textureHalfFloat=!!getExtension(o,["OES_texture_half_float"]),this._textureFloatLinear=!!getExtension(o,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!getExtension(o,["OES_texture_half_float_linear"]),this._colorBufferFloat=!!getExtension(o,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!getExtension(o,["EXT_float_blend"]),this._colorBufferHalfFloat=!!getExtension(o,["EXT_color_buffer_half_float"]),this._s3tc=!!getExtension(o,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!getExtension(o,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._etc1=!!getExtension(o,["WEBGL_compressed_texture_etc1"]);var l,c,u,d,h,p,f,m;s=t.allowTextureFilterAnisotropic?getExtension(o,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=s,ContextLimits._maximumTextureFilterAnisotropy=defined(s)?o.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,n?(d=this,h=function(){return d._gl.createVertexArray()},p=function(e){d._gl.bindVertexArray(e)},f=function(e){d._gl.deleteVertexArray(e)},m=function(e,t,i,r,n){o.drawElementsInstanced(e,t,i,r,n)},g=function(e,t,i,r){o.drawArraysInstanced(e,t,i,r)},y=function(e,t){o.vertexAttribDivisor(e,t)},_=function(e){o.drawBuffers(e)}):(defined(l=getExtension(o,["OES_vertex_array_object"]))&&(h=function(){return l.createVertexArrayOES()},p=function(e){l.bindVertexArrayOES(e)},f=function(e){l.deleteVertexArrayOES(e)}),defined(c=getExtension(o,["ANGLE_instanced_arrays"]))&&(m=function(e,t,i,r,n){c.drawElementsInstancedANGLE(e,t,i,r,n)},g=function(e,t,i,r){c.drawArraysInstancedANGLE(e,t,i,r)},y=function(e,t){c.vertexAttribDivisorANGLE(e,t)}),defined(u=getExtension(o,["WEBGL_draw_buffers"]))&&(_=function(e){u.drawBuffersWEBGL(e)})),this.glCreateVertexArray=h,this.glBindVertexArray=p,this.glDeleteVertexArray=f,this.glDrawElementsInstanced=m,this.glDrawArraysInstanced=g,this.glVertexAttribDivisor=y,this.glDrawBuffers=_,this._vertexArrayObject=!!l,this._instancedArrays=!!c,this._drawBuffers=!!u,ContextLimits._maximumDrawBuffers=this.drawBuffers?o.getParameter(WebGLConstants$1.MAX_DRAW_BUFFERS):1,ContextLimits._maximumColorAttachments=this.drawBuffers?o.getParameter(WebGLConstants$1.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new Color(0,0,0,0),this._clearDepth=1,this._clearStencil=0;var g=new UniformState,y=new PassState(this),_=RenderState.fromCache();this._defaultPassState=y,this._defaultRenderState=_,this._defaultTexture=void 0,this._defaultCubeMap=void 0,this._us=g,this._currentRenderState=_,this._currentPassState=y,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var v=0;v<ContextLimits._maximumVertexAttributes;v++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this.options=t,this.cache={},RenderState.apply(o,_,y)}var defaultFramebufferMarker={},scratchBackBufferArray;function applyRenderState(e,t,i,r){var n=e._currentRenderState,a=e._currentPassState;e._currentRenderState=t,e._currentPassState=i,RenderState.partialApply(e._gl,n,t,a,i,r)}function bindFramebuffer(e,t){var i;t!==e._currentFramebuffer&&(e._currentFramebuffer=t,i=scratchBackBufferArray,defined(t)?(t._bind(),i=t._getActiveColorAttachments()):(t=e._gl).bindFramebuffer(t.FRAMEBUFFER,null),e.drawBuffers&&e.glDrawBuffers(i))}Object.defineProperties(Context.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return 8<=this._stencilBits}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},etc1:{get:function(){return this._etc1}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=wrapGL(this._originalGLContext,e?throwOnError:void 0)}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new Texture({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultCubeMap:{get:function(){var e;return void 0===this._defaultCubeMap&&(e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},this._defaultCubeMap=new CubeMap({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})),this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return defaultFramebufferMarker}}}),"undefined"!=typeof WebGLRenderingContext&&(scratchBackBufferArray=[WebGLConstants$1.BACK]);var defaultClearCommand=new ClearCommand;function beginDraw(e,t,i,r,n){bindFramebuffer(e,t),applyRenderState(e,n,i,!1),r._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,r.maximumTextureUnitIndex)}function continueDraw(e,t,i,r){var n=t._primitiveType,a=t._vertexArray,o=t._offset,s=t._count,l=t.instanceCount;e._us.model=defaultValue(t._modelMatrix,Matrix4.IDENTITY),i._setUniforms(r,e._us,e.validateShaderProgram),a._bind(),defined(r=a.indexBuffer)?(o*=r.bytesPerIndex,s=defaultValue(s,r.numberOfIndices),0===l?e._gl.drawElements(n,s,r.indexDatatype,o):e.glDrawElementsInstanced(n,s,r.indexDatatype,o,l)):(s=defaultValue(s,a.numberOfVertices),0===l?e._gl.drawArrays(n,o,s):e.glDrawArraysInstanced(n,o,s,l)),a._unBind()}Context.prototype.clear=function(e,t){e=defaultValue(e,defaultClearCommand),t=defaultValue(t,this._defaultPassState);var i=this._gl,r=0,n=e.color,a=e.depth,o=e.stencil;defined(n)&&(Color.equals(this._clearColor,n)||(Color.clone(n,this._clearColor),i.clearColor(n.red,n.green,n.blue,n.alpha)),r|=i.COLOR_BUFFER_BIT),defined(a)&&(a!==this._clearDepth&&(this._clearDepth=a,i.clearDepth(a)),r|=i.DEPTH_BUFFER_BIT),defined(o)&&(o!==this._clearStencil&&(this._clearStencil=o,i.clearStencil(o)),r|=i.STENCIL_BUFFER_BIT),applyRenderState(this,defaultValue(e.renderState,this._defaultRenderState),t,!0),bindFramebuffer(this,defaultValue(e.framebuffer,t.framebuffer)),i.clear(r)},Context.prototype.draw=function(e,t,i,r){t=defaultValue(t,this._defaultPassState);var n=defaultValue(e._framebuffer,t.framebuffer),a=defaultValue(e._renderState,this._defaultRenderState);i=defaultValue(i,e._shaderProgram),r=defaultValue(r,e._uniformMap),beginDraw(this,n,t,i,a),continueDraw(this,e,i,r)},Context.prototype.endFrame=function(){var e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null),this.drawBuffers&&this.glDrawBuffers(scratchBackBufferArray);for(var t=this._maxFrameTextureUnitIndex,i=this._maxFrameTextureUnitIndex=0;i<t;++i)e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},Context.prototype.readPixels=function(e){var t=this._gl;e=defaultValue(e,defaultValue.EMPTY_OBJECT);var i=Math.max(defaultValue(e.x,0),0),r=Math.max(defaultValue(e.y,0),0),n=defaultValue(e.width,t.drawingBufferWidth),a=defaultValue(e.height,t.drawingBufferHeight),o=e.framebuffer,s=PixelDatatype$1.UNSIGNED_BYTE;return defined(o)&&0<o.numberOfColorAttachments&&(s=o.getColorTexture(0).pixelDatatype),e=PixelFormat$1.createTypedArray(PixelFormat$1.RGBA,s,n,a),bindFramebuffer(this,o),t.readPixels(i,r,n,a,PixelFormat$1.RGBA,PixelDatatype$1.toWebGLConstant(s,this),e),e};var viewportQuadAttributeLocations={position:0,textureCoordinates:1};function PickId(e,t,i){this._pickObjects=e,this.key=t,this.color=i}Context.prototype.getViewportQuadVertexArray=function(){var e,t=this.cache.viewportQuad_vertexArray;return defined(t)||(e=new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:PrimitiveType$1.TRIANGLES}),t=VertexArray.fromGeometry({context:this,geometry:e,attributeLocations:viewportQuadAttributeLocations,bufferUsage:BufferUsage$1.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=t),t},Context.prototype.createViewportQuadCommand=function(e,t){return t=defaultValue(t,defaultValue.EMPTY_OBJECT),new DrawCommand({vertexArray:this.getViewportQuadVertexArray(),primitiveType:PrimitiveType$1.TRIANGLES,renderState:t.renderState,shaderProgram:ShaderProgram.fromCache({context:this,vertexShaderSource:ViewportQuadVS,fragmentShaderSource:e,attributeLocations:viewportQuadAttributeLocations}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})},Context.prototype.getObjectByPickColor=function(e){return this._pickObjects[e.toRgba()]},Object.defineProperties(PickId.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),PickId.prototype.destroy=function(){delete this._pickObjects[this.key]},Context.prototype.createPickId=function(e){++this._nextPickColor[0];var t=this._nextPickColor[0];if(0===t)throw new RuntimeError("Out of unique Pick IDs.");return this._pickObjects[t]=e,new PickId(this._pickObjects,t,Color.fromRgba(t))},Context.prototype.isDestroyed=function(){return!1},Context.prototype.destroy=function(){var e,t,i=this.cache;for(e in i)!i.hasOwnProperty(e)||defined((t=i[e]).destroy)&&t.destroy();return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),destroyObject(this)};var RenderbufferFormat={RGBA4:WebGLConstants$1.RGBA4,RGB5_A1:WebGLConstants$1.RGB5_A1,RGB565:WebGLConstants$1.RGB565,DEPTH_COMPONENT16:WebGLConstants$1.DEPTH_COMPONENT16,STENCIL_INDEX8:WebGLConstants$1.STENCIL_INDEX8,DEPTH_STENCIL:WebGLConstants$1.DEPTH_STENCIL,validate:function(e){return e===RenderbufferFormat.RGBA4||e===RenderbufferFormat.RGB5_A1||e===RenderbufferFormat.RGB565||e===RenderbufferFormat.DEPTH_COMPONENT16||e===RenderbufferFormat.STENCIL_INDEX8||e===RenderbufferFormat.DEPTH_STENCIL}},RenderbufferFormat$1=Object.freeze(RenderbufferFormat);function Renderbuffer(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context._gl,i=defaultValue(e.format,RenderbufferFormat$1.RGBA4),r=defined(e.width)?e.width:t.drawingBufferWidth;e=defined(e.height)?e.height:t.drawingBufferHeight;this._gl=t,this._format=i,this._width=r,this._height=e,this._renderbuffer=this._gl.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this._renderbuffer),t.renderbufferStorage(t.RENDERBUFFER,i,r,e),t.bindRenderbuffer(t.RENDERBUFFER,null)}function loadCubeMap(e,t){var i={flipY:!0,preferImageBitmap:!0};i=[Resource.createIfNeeded(t.positiveX).fetchImage(i),Resource.createIfNeeded(t.negativeX).fetchImage(i),Resource.createIfNeeded(t.positiveY).fetchImage(i),Resource.createIfNeeded(t.negativeY).fetchImage(i),Resource.createIfNeeded(t.positiveZ).fetchImage(i),Resource.createIfNeeded(t.negativeZ).fetchImage(i)];return when.all(i,(function(t){return new CubeMap({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})}))}function DiscardMissingTileImagePolicy(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var t=Resource.createIfNeeded(e.missingImageUrl),i=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then((function(t){defined(t.blob)&&(i._missingImageByteLength=t.blob.size);var r=getImagePixels(t);if(e.disableCheckIfAllPixelsAreTransparent){for(var n=!0,a=t.width,o=e.pixelsToCheck,s=0,l=o.length;n&&s<l;++s){var c=o[s];0<r[4*c.x+c.y*a+3]&&(n=!1)}n&&(r=void 0)}i._missingImagePixels=r,i._isReady=!0})).otherwise((function(){i._missingImagePixels=void 0,i._isReady=!0}))}function ImageryLayerFeatureInfo(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}function ImageryProvider(){this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,DeveloperError.throwInstantiationError()}Object.defineProperties(Renderbuffer.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),Renderbuffer.prototype._getRenderbuffer=function(){return this._renderbuffer},Renderbuffer.prototype.isDestroyed=function(){return!1},Renderbuffer.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),destroyObject(this)},DiscardMissingTileImagePolicy.prototype.isReady=function(){return this._isReady},DiscardMissingTileImagePolicy.prototype.shouldDiscardImage=function(e){var t=this._pixelsToCheck,i=this._missingImagePixels;if(!defined(i))return!1;if(defined(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var r=getImagePixels(e),n=e.width,a=0,o=t.length;a<o;++a)for(var s=t[a],l=4*s.x+s.y*n,c=0;c<4;++c){var u=l+c;if(r[u]!==i[u])return!1}return!0},ImageryLayerFeatureInfo.prototype.configureNameFromProperties=function(e){var t,i,r,n=10;for(i in e)e.hasOwnProperty(i)&&e[i]&&(r=i.toLowerCase(),1<n&&"name"===r?(n=1,t=i):2<n&&"title"===r?(n=2,t=i):3<n&&/name/i.test(i)?(n=3,t=i):4<n&&/title/i.test(i)&&(n=4,t=i));defined(t)&&(this.name=e[t])},ImageryLayerFeatureInfo.prototype.configureDescriptionFromProperties=function(e){this.description=function e(t){var i,r,n='<table class="cesium-infoBox-defaultTable">';for(i in t)!t.hasOwnProperty(i)||defined(r=t[i])&&(n+="object"==typeof r?"<tr><td>"+i+"</td><td>"+e(r)+"</td></tr>":"<tr><td>"+i+"</td><td>"+r+"</td></tr>");return n+"</table>"}(e)},Object.defineProperties(ImageryProvider.prototype,{ready:{get:DeveloperError.throwInstantiationError},readyPromise:{get:DeveloperError.throwInstantiationError},rectangle:{get:DeveloperError.throwInstantiationError},tileWidth:{get:DeveloperError.throwInstantiationError},tileHeight:{get:DeveloperError.throwInstantiationError},maximumLevel:{get:DeveloperError.throwInstantiationError},minimumLevel:{get:DeveloperError.throwInstantiationError},tilingScheme:{get:DeveloperError.throwInstantiationError},tileDiscardPolicy:{get:DeveloperError.throwInstantiationError},errorEvent:{get:DeveloperError.throwInstantiationError},credit:{get:DeveloperError.throwInstantiationError},proxy:{get:DeveloperError.throwInstantiationError},hasAlphaChannel:{get:DeveloperError.throwInstantiationError}}),ImageryProvider.prototype.getTileCredits=function(e,t,i){DeveloperError.throwInstantiationError()},ImageryProvider.prototype.requestImage=function(e,t,i,r){DeveloperError.throwInstantiationError()},ImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){DeveloperError.throwInstantiationError()};var ktxRegex$2=/\.ktx$/i,crnRegex$2=/\.crn$/i;function ArcGisMapServerImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=Resource.createIfNeeded(e.url);t.appendForwardSlash(),defined(e.token)&&t.setQueryParameters({token:e.token}),this._resource=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=defaultValue(e.tileWidth,256),this._tileHeight=defaultValue(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=defaultValue(e.tilingScheme,new GeographicTilingScheme({ellipsoid:e.ellipsoid})),this._useTiles=defaultValue(e.usePreCachedTilesIfAvailable,!0),this._rectangle=defaultValue(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,"string"==typeof(t=e.credit)&&(t=new Credit(t)),this._credit=t,this.enablePickFeatures=defaultValue(e.enablePickFeatures,!0),this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer();var i,r=this;function n(t){if(defined(a=t.tileInfo)){if(r._tileWidth=a.rows,r._tileHeight=a.cols,102100===a.spatialReference.wkid||102113===a.spatialReference.wkid)r._tilingScheme=new WebMercatorTilingScheme({ellipsoid:e.ellipsoid});else{if(4326!==t.tileInfo.spatialReference.wkid){var n="Tile spatial reference WKID "+t.tileInfo.spatialReference.wkid+" is not supported.";return void(i=TileProviderError.handleError(i,r,r._errorEvent,n,void 0,void 0,void 0,o))}r._tilingScheme=new GeographicTilingScheme({ellipsoid:e.ellipsoid})}if(r._maximumLevel=t.tileInfo.lods.length-1,defined(t.fullExtent)){if(defined(t.fullExtent.spatialReference)&&defined(t.fullExtent.spatialReference.wkid))if(102100===t.fullExtent.spatialReference.wkid||102113===t.fullExtent.spatialReference.wkid){var a=new WebMercatorProjection,s=t.fullExtent;n=a.unproject(new Cartesian3(Math.max(s.xmin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(s.ymin,-r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=a.unproject(new Cartesian3(Math.min(s.xmax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(s.ymax,r._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));r._rectangle=new Rectangle(n.longitude,n.latitude,s.longitude,s.latitude)}else{if(4326!==t.fullExtent.spatialReference.wkid)return s="fullExtent.spatialReference WKID "+t.fullExtent.spatialReference.wkid+" is not supported.",void(i=TileProviderError.handleError(i,r,r._errorEvent,s,void 0,void 0,void 0,o));r._rectangle=Rectangle.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax)}}else r._rectangle=r._tilingScheme.rectangle;defined(r._tileDiscardPolicy)||(r._tileDiscardPolicy=new DiscardMissingTileImagePolicy({missingImageUrl:buildImageResource(r,0,0,r._maximumLevel).url,pixelsToCheck:[new Cartesian2(0,0),new Cartesian2(200,20),new Cartesian2(20,200),new Cartesian2(80,110),new Cartesian2(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),r._useTiles=!0}else r._useTiles=!1;defined(t.copyrightText)&&0<t.copyrightText.length&&(r._credit=new Credit(t.copyrightText)),r._ready=!0,r._readyPromise.resolve(!0),TileProviderError.handleSuccess(i)}function a(e){var t="An error occurred while accessing "+r._resource.url+".";i=TileProviderError.handleError(i,r,r._errorEvent,t,void 0,void 0,void 0,o),r._readyPromise.reject(new RuntimeError(t))}function o(){when(r._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJsonp(),n,a)}this._useTiles?o():(this._ready=!0,this._readyPromise.resolve(!0))}function buildImageResource(e,t,i,r,n){var a=e._useTiles?e._resource.getDerivedResource({url:"tile/"+r+"/"+i+"/"+t,request:n}):(a={bbox:(a=e._tilingScheme.tileXYToNativeRectangle(t,i,r)).west+","+a.south+","+a.east+","+a.north,size:e._tileWidth+","+e._tileHeight,format:"png32",transparent:!0,f:"image"},e._tilingScheme.projection instanceof GeographicProjection?(a.bboxSR=4326,a.imageSR=4326):(a.bboxSR=3857,a.imageSR=3857),e.layers&&(a.layers="show:"+e.layers),e._resource.getDerivedResource({url:"export",request:n,queryParameters:a}));return a}function AutoExposure(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=void 0,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new Cartesian2,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function destroyFramebuffers(e){var t=e._framebuffers;if(defined(t)){for(var i=t.length,r=0;r<i;++r)t[r].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}}function createFramebuffers(e,t){destroyFramebuffers(e);for(var i=e._width,r=e._height,n=PixelFormat$1.RGBA,a=t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT,o=Math.ceil(Math.log(Math.max(i,r))/Math.log(3)),s=new Array(o),l=0;l<o;++l)i=Math.max(Math.ceil(i/3),1),r=Math.max(Math.ceil(r/3),1),s[l]=new Framebuffer({context:t,colorTextures:[new Texture({context:t,width:i,height:r,pixelFormat:n,pixelDatatype:a,sampler:Sampler.NEAREST})]});var c=s[o-1].getColorTexture(0);e._previousLuminance=new Framebuffer({context:t,colorTextures:[new Texture({context:t,width:c.width,height:c.height,pixelFormat:n,pixelDatatype:a,sampler:Sampler.NEAREST})]}),e._framebuffers=s}function destroyCommands(e){var t=e._commands;if(defined(t)){for(var i=t.length,r=0;r<i;++r)t[r].shaderProgram.destroy();e._commands=void 0}}function createUniformMap$4(e,t){var i;return(t=0===t?{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}}:(i=e._framebuffers[t-1].getColorTexture(0),{colorTexture:function(){return i},colorTextureDimensions:function(){return i.dimensions}})).minMaxLuminance=function(){return e._minMaxLuminance},t.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},t}function getShaderSource(e,t){var i="uniform sampler2D colorTexture; \nvarying vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return i+=0===e?"    vec4 color = texture2D(colorTexture, v_textureCoordinates + offset); \n    return czm_luminance(color.rgb); \n":"    return texture2D(colorTexture, v_textureCoordinates + offset).r; \n",i+="}\n\n",i+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n    float color = 0.0; \n    float xStep = 1.0 / colorTextureDimensions.x; \n    float yStep = 1.0 / colorTextureDimensions.y; \n    int count = 0; \n    for (int i = 0; i < 3; ++i) { \n        for (int j = 0; j < 3; ++j) { \n            vec2 offset; \n            offset.x = -xStep + float(i) * xStep; \n            offset.y = -yStep + float(j) * yStep; \n            if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n                continue; \n            } \n            color += sampleTexture(offset); \n            ++count; \n        } \n    } \n    if (count > 0) { \n        color /= float(count); \n    } \n",e===t-1&&(i+="    float previous = texture2D(previousLuminance, vec2(0.5)).r; \n    color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n    color = previous + (color - previous) / (60.0 * 1.5); \n    color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),i+"    gl_FragColor = vec4(color); \n} \n"}function createCommands$5(e,t){destroyCommands(e);for(var i=e._framebuffers,r=i.length,n=new Array(r),a=0;a<r;++a)n[a]=t.createViewportQuadCommand(getShaderSource(a,r),{framebuffer:i[a],uniformMap:createUniformMap$4(e,a)});e._commands=n}ImageryProvider.loadImage=function(e,t){return t=Resource.createIfNeeded(t),ktxRegex$2.test(t.url)?loadKTX(t):crnRegex$2.test(t.url)?loadCRN(t):defined(e)&&defined(e.tileDiscardPolicy)?t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):t.fetchImage({preferImageBitmap:!0,flipY:!0})},Object.defineProperties(ArcGisMapServerImageryProvider.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),ArcGisMapServerImageryProvider.prototype.getTileCredits=function(e,t,i){},ArcGisMapServerImageryProvider.prototype.requestImage=function(e,t,i,r){return ImageryProvider.loadImage(this,buildImageResource(this,e,t,i,r))},ArcGisMapServerImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){if(this.enablePickFeatures){var a,o;i=this._tilingScheme.tileXYToNativeRectangle(e,t,i);n=this._tilingScheme.projection instanceof GeographicProjection?(a=CesiumMath.toDegrees(r),o=CesiumMath.toDegrees(n),"4326"):(a=(s=this._tilingScheme.projection.project(new Cartographic(r,n,0))).x,o=s.y,"3857");var s="visible";return defined(this._layers)&&(s+=":"+this._layers),s={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:a+","+o,mapExtent:i.west+","+i.south+","+i.east+","+i.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:n,layers:s},this._resource.getDerivedResource({url:"identify",queryParameters:s}).fetchJson().then((function(e){var t=[],i=e.results;if(!defined(i))return t;for(var r=0;r<i.length;++r){var n,a=i[r],o=new ImageryLayerFeatureInfo;o.data=a,o.name=a.value,o.properties=a.attributes,o.configureDescriptionFromProperties(a.attributes),"esriGeometryPoint"===a.geometryType&&a.geometry&&(4326===(n=a.geometry.spatialReference&&a.geometry.spatialReference.wkid?a.geometry.spatialReference.wkid:4326)||4283===n?o.position=Cartographic.fromDegrees(a.geometry.x,a.geometry.y,a.geometry.z):102100!==n&&900913!==n&&3857!==n||(n=new WebMercatorProjection,o.position=n.unproject(new Cartesian3(a.geometry.x,a.geometry.y,a.geometry.z)))),t.push(o)}return t}))}},Object.defineProperties(AutoExposure.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){var e=this._framebuffers;if(defined(e))return e[e.length-1].getColorTexture(0)}}}),AutoExposure.prototype.clear=function(e){var t=this._framebuffers;if(defined(t)){var i=this._clearCommand;defined(i)||(i=this._clearCommand=new ClearCommand({color:new Color(0,0,0,0),framebuffer:void 0}));for(var r=t.length,n=0;n<r;++n)i.framebuffer=t[n],i.execute(e)}},AutoExposure.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;t===this._width&&i===this._height||(this._width=t,this._height=i,createFramebuffers(this,e),createCommands$5(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance,e=(i=this._framebuffers)[i.length-1],i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance,this._previousLuminance=e},AutoExposure.prototype.execute=function(e,t){this._colorTexture=t;var i=this._commands;if(defined(i))for(var r=i.length,n=0;n<r;++n)i[n].execute(e)},AutoExposure.prototype.isDestroyed=function(){return!1},AutoExposure.prototype.destroy=function(){return destroyFramebuffers(this),destroyCommands(this),destroyObject(this)};var BingMapsStyle={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},BingMapsStyle$1=Object.freeze(BingMapsStyle),emptyImage;function DiscardEmptyTileImagePolicy(e){}function BingMapsImageryProvider(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).key;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=1,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._key=t,this._resource=Resource.createIfNeeded(e.url),this._resource.appendForwardSlash(),this._tileProtocol=e.tileProtocol,this._mapStyle=defaultValue(e.mapStyle,BingMapsStyle$1.AERIAL),this._culture=defaultValue(e.culture,""),this._tileDiscardPolicy=e.tileDiscardPolicy,defined(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new DiscardEmptyTileImagePolicy),this._proxy=e.proxy,this._credit=new Credit('<a href="http://www.bing.com"><img src="'+BingMapsImageryProvider.logoUrl+'" title="Bing Imagery"/></a>'),this._tilingScheme=new WebMercatorTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer(),defined(e=this._tileProtocol)?0<e.length&&":"===e[e.length-1]&&(e=e.substr(0,e.length-1)):e="http:"===document.location.protocol?"http":"https";var i,r=this._resource.getDerivedResource({url:"REST/v1/Imagery/Metadata/"+this._mapStyle,queryParameters:{incl:"ImageryProviders",key:this._key,uriScheme:e}}),n=this;function a(e){if(1===e.resourceSets.length){e=e.resourceSets[0].resources[0],n._tileWidth=e.imageWidth,n._tileHeight=e.imageHeight,n._maximumLevel=e.zoomMax-1,n._imageUrlSubdomains=e.imageUrlSubdomains,n._imageUrlTemplate=e.imageUrl;for(var t=n._attributionList=e.imageryProviders,r=0,a=(t=t||(n._attributionList=[])).length;r<a;++r){var s=t[r];if(s.credit instanceof Credit)break;s.credit=new Credit(s.attribution);for(var l=s.coverageAreas,c=0,u=s.coverageAreas.length;c<u;++c){var d=l[c],h=d.bbox;d.bbox=new Rectangle(CesiumMath.toRadians(h[1]),CesiumMath.toRadians(h[0]),CesiumMath.toRadians(h[3]),CesiumMath.toRadians(h[2]))}}n._ready=!0,n._readyPromise.resolve(!0),TileProviderError.handleSuccess(i)}else o()}function o(e){var t="An error occurred while accessing "+r.url+".";i=TileProviderError.handleError(i,n,n._errorEvent,t,void 0,void 0,void 0,l),n._readyPromise.reject(new RuntimeError(t))}var s=r.url;function l(){var e=r.fetchJsonp("jsonp");(BingMapsImageryProvider._metadataCache[s]=e).then(a).otherwise(o)}defined(e=BingMapsImageryProvider._metadataCache[s])?e.then(a).otherwise(o):l()}DiscardEmptyTileImagePolicy.prototype.isReady=function(){return!0},DiscardEmptyTileImagePolicy.prototype.shouldDiscardImage=function(e){return DiscardEmptyTileImagePolicy.EMPTY_IMAGE===e},Object.defineProperties(DiscardEmptyTileImagePolicy,{EMPTY_IMAGE:{get:function(){return defined(emptyImage)||((emptyImage=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),emptyImage}}}),Object.defineProperties(BingMapsImageryProvider.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});var rectangleScratch$5=new Rectangle;function buildImageResource$1(e,t,i,r,n){var a=e._imageUrlTemplate,o=e._imageUrlSubdomains,s=(t+i+r)%o.length;return e._resource.getDerivedResource({url:a,request:n,templateValues:{quadkey:BingMapsImageryProvider.tileXYToQuadKey(t,i,r),subdomain:o[s],culture:e._culture},queryParameters:{n:"z"}})}BingMapsImageryProvider.prototype.getTileCredits=function(e,t,i){return t=this._tilingScheme.tileXYToRectangle(e,t,i,rectangleScratch$5),getRectangleAttribution(this._attributionList,i,t)},BingMapsImageryProvider.prototype.requestImage=function(e,t,i,r){if(defined(r=ImageryProvider.loadImage(this,buildImageResource$1(this,e,t,i,r))))return r.otherwise((function(e){return defined(e.blob)&&0===e.blob.size?DiscardEmptyTileImagePolicy.EMPTY_IMAGE:when.reject(e)}))},BingMapsImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},BingMapsImageryProvider.tileXYToQuadKey=function(e,t,i){for(var r="",n=i;0<=n;--n){var a=1<<n,o=0;0!=(e&a)&&(o|=1),0!=(t&a)&&(o|=2),r+=o}return r},BingMapsImageryProvider.quadKeyToTileXY=function(e){for(var t=0,i=0,r=e.length-1,n=r;0<=n;--n){var a=1<<n,o=+e[r-n];0!=(1&o)&&(t|=a),0!=(2&o)&&(i|=a)}return{x:t,y:i,level:r}},BingMapsImageryProvider._logoUrl=void 0,Object.defineProperties(BingMapsImageryProvider,{logoUrl:{get:function(){return defined(BingMapsImageryProvider._logoUrl)||(BingMapsImageryProvider._logoUrl=buildModuleUrl("Assets/Images/bing_maps_credit.png")),BingMapsImageryProvider._logoUrl},set:function(e){BingMapsImageryProvider._logoUrl=e}}});var intersectionScratch$1=new Rectangle;function getRectangleAttribution(e,t,i){++t;for(var r=[],n=0,a=e.length;n<a;++n){for(var o=e[n],s=o.coverageAreas,l=!1,c=0,u=o.coverageAreas.length;!l&&c<u;++c){var d=s[c];t>=d.zoomMin&&t<=d.zoomMax&&defined(Rectangle.intersection(i,d.bbox,intersectionScratch$1))&&(l=!0)}l&&r.push(o.credit)}return r}BingMapsImageryProvider._metadataCache={};var defaultDimensions=new Cartesian3(1,1,1);function BoxEmitter(e){e=defaultValue(e,defaultDimensions),this._dimensions=Cartesian3.clone(e)}Object.defineProperties(BoxEmitter.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){Cartesian3.clone(e,this._dimensions)}}});var scratchHalfDim=new Cartesian3;BoxEmitter.prototype.emit=function(e){var t=this._dimensions,i=Cartesian3.multiplyByScalar(t,.5,scratchHalfDim),r=CesiumMath.randomBetween(-i.x,i.x);t=CesiumMath.randomBetween(-i.y,i.y),i=CesiumMath.randomBetween(-i.z,i.z);e.position=Cartesian3.fromElements(r,t,i,e.position),e.velocity=Cartesian3.normalize(e.position,e.velocity)};var BrdfLutGeneratorFS="varying vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\nfloat vdcRadicalInverse(int i)\n{\nfloat r;\nfloat base = 2.0;\nfloat value = 0.0;\nfloat invBase = 1.0 / base;\nfloat invBi = invBase;\nfor (int x = 0; x < 100; x++)\n{\nif (i <= 0)\n{\nbreak;\n}\nr = mod(float(i), base);\nvalue += r * invBi;\ninvBi *= invBase;\ni = int(float(i) * invBase);\n}\nreturn value;\n}\nvec2 hammersley2D(int i, int N)\n{\nreturn vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\nfloat a = roughness * roughness;\nfloat phi = 2.0 * M_PI * xi.x;\nfloat cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\nfloat sinTheta = sqrt(1.0 - cosTheta * cosTheta);\nvec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\nvec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\nvec3 tangentX = normalize(cross(upVector, N));\nvec3 tangentY = cross(N, tangentX);\nreturn tangentX * H.x + tangentY * H.y + N * H.z;\n}\nfloat G1_Smith(float NdotV, float k)\n{\nreturn NdotV / (NdotV * (1.0 - k) + k);\n}\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\nfloat k = roughness * roughness / 2.0;\nreturn G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\nvec2 integrateBrdf(float roughness, float NdotV)\n{\nvec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\nfloat A = 0.0;\nfloat B = 0.0;\nconst int NumSamples = 1024;\nfor (int i = 0; i < NumSamples; i++)\n{\nvec2 xi = hammersley2D(i, NumSamples);\nvec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\nvec3 L = 2.0 * dot(V, H) * H - V;\nfloat NdotL = clamp(L.z, 0.0, 1.0);\nfloat NdotH = clamp(H.z, 0.0, 1.0);\nfloat VdotH = clamp(dot(V, H), 0.0, 1.0);\nif (NdotL > 0.0)\n{\nfloat G = G_Smith(roughness, NdotV, NdotL);\nfloat G_Vis = G * VdotH / (NdotH * NdotV);\nfloat Fc = pow(1.0 - VdotH, 5.0);\nA += (1.0 - Fc) * G_Vis;\nB += Fc * G_Vis;\n}\n}\nreturn vec2(A, B) / float(NumSamples);\n}\nvoid main()\n{\ngl_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n";function BrdfLutGenerator(){this._framebuffer=void 0,this._colorTexture=void 0,this._drawCommand=void 0}function createCommand$1(e,t){var i=e._framebuffer;i=t.createViewportQuadCommand(BrdfLutGeneratorFS,{framebuffer:i,renderState:RenderState.fromCache({viewport:new BoundingRectangle(0,0,256,256)})});e._drawCommand=i}function createFramebuffer$2(e,t){var i=new Texture({context:t,width:256,height:256,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST});i=new Framebuffer({context:t,colorTextures:[e._colorTexture=i],destroyAttachments:!1});e._framebuffer=i}Object.defineProperties(BrdfLutGenerator.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),BrdfLutGenerator.prototype.update=function(e){defined(this._colorTexture)||(createFramebuffer$2(this,e=e.context),createCommand$1(this,e),this._drawCommand.execute(e),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy())},BrdfLutGenerator.prototype.isDestroyed=function(){return!1},BrdfLutGenerator.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),destroyObject(this)};var CameraFlightPath={};function getAltitude(e,t,i){if(e instanceof PerspectiveFrustum){var r=Math.tan(.5*e.fovy),n=e.near,a=e.near*r;r=e.aspectRatio*a;return Math.max(t*n/r,i*n/a)}return e instanceof PerspectiveOffCenterFrustum?(n=e.near,a=e.top,r=e.right,Math.max(t*n/r,i*n/a)):Math.max(t,i)}var scratchCart=new Cartesian3,scratchCart2$2=new Cartesian3;function createPitchFunction(e,t,i,r){if(defined(r)&&i(.5)>r){var n=i(0),a=i(1),o=(r=i(.5))-n,s=r-a;return function(r){var l=i(r);return r<=.5?(r=(l-n)/o,CesiumMath.lerp(e,-CesiumMath.PI_OVER_TWO,r)):(l=(l-a)/s,CesiumMath.lerp(-CesiumMath.PI_OVER_TWO,t,1-l))}}return function(i){return CesiumMath.lerp(e,t,i)}}function createHeightFunction(e,t,i,r,n){var a,o,s=n,l=Math.max(i,r);if(defined(s)||(a=e.position,o=e.up,n=e.right,e=e.frustum,t=Cartesian3.subtract(a,t,scratchCart),o=Cartesian3.magnitude(Cartesian3.multiplyByScalar(o,Cartesian3.dot(t,o),scratchCart2$2)),n=Cartesian3.magnitude(Cartesian3.multiplyByScalar(n,Cartesian3.dot(t,n),scratchCart2$2)),s=Math.min(.2*getAltitude(e,o,n),1e9)),l<s){var c=-Math.pow(1e6*(s-i),1/8),u=Math.pow(1e6*(s-r),1/8);return function(e){return e=e*(u-c)+c,-Math.pow(e,8)/1e6+s}}return function(e){return CesiumMath.lerp(i,r,e)}}function adjustAngleForLERP(e,t){return CesiumMath.equalsEpsilon(e,CesiumMath.TWO_PI,CesiumMath.EPSILON11)&&(e=0),t>e+Math.PI?e+=CesiumMath.TWO_PI:t<e-Math.PI&&(e-=CesiumMath.TWO_PI),e}var scratchStart=new Cartesian3;function createUpdateCV(e,t,i,r,n,a,o){var s=e.camera,l=Cartesian3.clone(s.position,scratchStart),c=s.pitch,u=adjustAngleForLERP(s.heading,r),d=adjustAngleForLERP(s.roll,a),h=createHeightFunction(s,i,l.z,i.z,o);return function(e){e=e.time/t,s.setView({orientation:{heading:CesiumMath.lerp(u,r,e),pitch:CesiumMath.lerp(c,n,e),roll:CesiumMath.lerp(d,a,e)}}),Cartesian2.lerp(l,i,e,s.position),s.position.z=h(e)}}function useLongestFlight(e,t){e.longitude<t.longitude?e.longitude+=CesiumMath.TWO_PI:t.longitude+=CesiumMath.TWO_PI}function useShortestFlight(e,t){var i=e.longitude-t.longitude;i<-CesiumMath.PI?e.longitude+=CesiumMath.TWO_PI:i>CesiumMath.PI&&(t.longitude+=CesiumMath.TWO_PI)}var scratchStartCart=new Cartographic,scratchEndCart=new Cartographic;function createUpdate3D(e,t,i,r,n,a,o,s,l,c){var u=e.camera,d=e.mapProjection.ellipsoid,h=Cartographic.clone(u.positionCartographic,scratchStartCart),p=u.pitch,f=adjustAngleForLERP(u.heading,r),m=adjustAngleForLERP(u.roll,a),g=d.cartesianToCartographic(i,scratchEndCart);h.longitude=CesiumMath.zeroToTwoPi(h.longitude),g.longitude=CesiumMath.zeroToTwoPi(g.longitude);var y=!1;defined(s)&&(e=CesiumMath.zeroToTwoPi(s),d=Math.min(h.longitude,g.longitude),s=Math.max(h.longitude,g.longitude),d=d<=e&&e<=s,defined(l)?(e=Math.abs(h.longitude-g.longitude),s=CesiumMath.TWO_PI-e,(d?e:s)<(d?s:e)*l&&!d&&(y=!0)):d||(y=!0)),(y?useLongestFlight:useShortestFlight)(h,g);var _,v,C,x,b=createHeightFunction(u,i,h.height,g.height,o),S=createPitchFunction(p,n,b,c);return _=h.longitude,v=g.longitude,C=h.latitude,x=g.latitude,function(e){var i=e.time/t;e=Cartesian3.fromRadians(CesiumMath.lerp(_,v,i),CesiumMath.lerp(C,x,i),b(i));u.setView({destination:e,orientation:{heading:CesiumMath.lerp(f,r,i),pitch:S(i),roll:CesiumMath.lerp(m,a,i)}})}}function createUpdate2D(e,t,i,r,n,a,o){var s=e.camera,l=Cartesian3.clone(s.position,scratchStart),c=adjustAngleForLERP(s.heading,r),u=(e=s.frustum.right-s.frustum.left,createHeightFunction(s,i,e,i.z,o));return function(e){var n=e.time/t;s.setView({orientation:{heading:CesiumMath.lerp(c,r,n)}}),Cartesian2.lerp(l,i,n,s.position);var a=u(n);n=(e=s.frustum).top/e.right,a=.5*(a-(e.right-e.left));e.right+=a,e.left-=a,e.top=n*e.right,e.bottom=-e.top}}var scratchCartographic$b=new Cartographic,scratchDestination=new Cartesian3;function emptyFlight(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function wrapCallback(e,t){return function(){"function"==typeof t&&t(),e.enableInputs=!0}}CameraFlightPath.createTween=function(e,t){var i=(t=defaultValue(t,defaultValue.EMPTY_OBJECT)).destination,r=e.mode;if(r===SceneMode$1.MORPHING)return emptyFlight();var n=defaultValue(t.convert,!0),a=(y=e.mapProjection).ellipsoid,o=t.maximumHeight,s=t.flyOverLongitude,l=t.flyOverLongitudeWeight,c=t.pitchAdjustHeight,u=t.easingFunction;n&&r!==SceneMode$1.SCENE3D&&(a.cartesianToCartographic(i,scratchCartographic$b),i=y.project(scratchCartographic$b,scratchDestination));var d=e.camera;defined(g=t.endTransform)&&d._setTransform(g),defined(n=t.duration)||(n=Math.ceil(Cartesian3.distance(d.position,i)/1e6)+2,n=Math.min(n,3));var h=defaultValue(t.heading,0),p=defaultValue(t.pitch,-CesiumMath.PI_OVER_TWO),f=defaultValue(t.roll,0);(y=e.screenSpaceCameraController).enableInputs=!1;var m=wrapCallback(y,t.complete),g=wrapCallback(y,t.cancel),y=d.frustum;if(t=(t=(t=(t=(t=e.mode===SceneMode$1.SCENE2D)&&Cartesian2.equalsEpsilon(d.position,i,CesiumMath.EPSILON6))&&CesiumMath.equalsEpsilon(Math.max(y.right-y.left,y.top-y.bottom),i.z,CesiumMath.EPSILON6))||e.mode!==SceneMode$1.SCENE2D&&Cartesian3.equalsEpsilon(i,d.position,CesiumMath.EPSILON10))&&CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(h),CesiumMath.negativePiToPi(d.heading),CesiumMath.EPSILON10)&&CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(p),CesiumMath.negativePiToPi(d.pitch),CesiumMath.EPSILON10)&&CesiumMath.equalsEpsilon(CesiumMath.negativePiToPi(f),CesiumMath.negativePiToPi(d.roll),CesiumMath.EPSILON10))return emptyFlight(m,g);var _=new Array(4);return _[SceneMode$1.SCENE2D]=createUpdate2D,_[SceneMode$1.SCENE3D]=createUpdate3D,_[SceneMode$1.COLUMBUS_VIEW]=createUpdateCV,n<=0?emptyFlight((function(){_[r](e,1,i,h,p,f,o,s,l,c)({time:1}),"function"==typeof m&&m()}),g):(t=_[r](e,n,i,h,p,f,o,s,l,c),defined(u)||(d=d.positionCartographic.height,u=(r===SceneMode$1.SCENE3D?a.cartesianToCartographic(i).height:i.z)<d&&11500<d?EasingFunction$1.CUBIC_OUT:EasingFunction$1.QUINTIC_IN_OUT),{duration:n,easingFunction:u,startObject:{time:0},stopObject:{time:n},update:t,complete:m,cancel:g})};var MapMode2D={ROTATE:0,INFINITE_SCROLL:1},MapMode2D$1=Object.freeze(MapMode2D);function Camera(e){this._scene=e,this._transform=Matrix4.clone(Matrix4.IDENTITY),this._invTransform=Matrix4.clone(Matrix4.IDENTITY),this._actualTransform=Matrix4.clone(Matrix4.IDENTITY),this._actualInvTransform=Matrix4.clone(Matrix4.IDENTITY),this._transformChanged=!1,this.position=new Cartesian3,this._position=new Cartesian3,this._positionWC=new Cartesian3,this._positionCartographic=new Cartographic,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new Cartesian3,this._direction=new Cartesian3,this._directionWC=new Cartesian3,this.up=new Cartesian3,this._up=new Cartesian3,this._upWC=new Cartesian3,this.right=new Cartesian3,this._right=new Cartesian3,this._rightWC=new Cartesian3,this.frustum=new PerspectiveFrustum,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=CesiumMath.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new Event,this._moveEnd=new Event,this._changed=new Event,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this.percentageChanged=.5,this._viewMatrix=new Matrix4,this._invViewMatrix=new Matrix4,updateViewMatrix(this),this._mode=SceneMode$1.SCENE3D,this._modeChanged=!0,e=e.mapProjection,this._projection=e,this._maxCoord=e.project(new Cartographic(Math.PI,CesiumMath.PI_OVER_TWO)),this._max2Dfrustum=void 0,rectangleCameraPosition3D(this,Camera.DEFAULT_VIEW_RECTANGLE,this.position,!0),e=Cartesian3.magnitude(this.position),e+=e*Camera.DEFAULT_VIEW_FACTOR,Cartesian3.normalize(this.position,this.position),Cartesian3.multiplyByScalar(this.position,e,this.position)}function updateViewMatrix(e){Matrix4.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),Matrix4.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),Matrix4.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function updateCameraDeltas(e){var t;defined(e._oldPositionWC)?(e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude,t=Cartesian3.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC),e.positionWCDeltaMagnitude=Cartesian3.magnitude(t),e._oldPositionWC=Cartesian3.clone(e.positionWC,e._oldPositionWC),0<e.positionWCDeltaMagnitude?(e.timeSinceMoved=0,e._lastMovedTimestamp=getTimestamp$1()):e.timeSinceMoved=Math.max(getTimestamp$1()-e._lastMovedTimestamp,0)/1e3):e._oldPositionWC=Cartesian3.clone(e.positionWC,e._oldPositionWC)}function convertTransformForColumbusView(e){Transforms.basisTo2D(e._projection,e._transform,e._actualTransform)}Camera.TRANSFORM_2D=new Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Camera.TRANSFORM_2D_INVERSE=Matrix4.inverseTransformation(Camera.TRANSFORM_2D,new Matrix4),Camera.DEFAULT_VIEW_RECTANGLE=Rectangle.fromDegrees(-95,-20,-70,90),Camera.DEFAULT_VIEW_FACTOR=.5,Camera.DEFAULT_OFFSET=new HeadingPitchRange(0,-CesiumMath.PI_OVER_FOUR,0),Camera.prototype.canPreloadFlight=function(){return defined(this._currentFlight)&&this._mode!==SceneMode$1.SCENE2D},Camera.prototype._updateCameraChanged=function(){var e=this;if(updateCameraDeltas(e),0!==e._changed.numberOfListeners){var t=e.percentageChanged;if(e._mode!==SceneMode$1.SCENE2D){if(!defined(e._changedDirection))return e._changedPosition=Cartesian3.clone(e.positionWC,e._changedPosition),void(e._changedDirection=Cartesian3.clone(e.directionWC,e._changedDirection));var i=CesiumMath.acosClamped(Cartesian3.dot(e.directionWC,e._changedDirection)),r=defined(e.frustum.fovy)?i/(.5*e.frustum.fovy):i,n=Cartesian3.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(t<r||t<n)&&(e._changed.raiseEvent(Math.max(r,n)),e._changedPosition=Cartesian3.clone(e.positionWC,e._changedPosition),e._changedDirection=Cartesian3.clone(e.directionWC,e._changedDirection))}else{if(!defined(e._changedFrustum))return e._changedPosition=Cartesian3.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());var a,o=e.position,s=e._changedPosition,l=e.frustum,c=e._changedFrustum,u=o.x+l.left,d=o.x+l.right,h=s.x+c.left,p=s.x+c.right,f=o.y+l.bottom,m=o.y+l.top,g=s.y+c.bottom;i=s.y+c.top,r=Math.max(u,h),n=Math.min(d,p),o=Math.max(f,g),s=Math.min(m,i);t<(a=n<=r||m<=o?1:1-(n-r)*(s-o)/(((a=u<h&&p<d&&f<g&&i<m?l:c).right-a.left)*(a.top-a.bottom)))&&(e._changed.raiseEvent(a),e._changedPosition=Cartesian3.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum))}}};var scratchCartographic$c=new Cartographic,scratchCartesian3Projection$1=new Cartesian3,scratchCartesian3$c=new Cartesian3,scratchCartesian4Origin=new Cartesian4,scratchCartesian4NewOrigin=new Cartesian4,scratchCartesian4NewXAxis=new Cartesian4,scratchCartesian4NewYAxis=new Cartesian4,scratchCartesian4NewZAxis=new Cartesian4;function convertTransformFor2D(e){var t=e._projection,i=t.ellipsoid,r=Matrix4.getColumn(e._transform,3,scratchCartesian4Origin),n=i.cartesianToCartographic(r,scratchCartographic$c),a=t.project(n,scratchCartesian3Projection$1),o=scratchCartesian4NewOrigin;o.x=a.z,o.y=a.x,o.z=a.y,o.w=1;var s=Cartesian4.clone(Cartesian4.UNIT_X,scratchCartesian4NewZAxis),l=Cartesian4.add(Matrix4.getColumn(e._transform,0,scratchCartesian3$c),r,scratchCartesian3$c);i.cartesianToCartographic(l,n),t.project(n,a);var c=scratchCartesian4NewXAxis;c.x=a.z,c.y=a.x,c.z=a.y,c.w=0,Cartesian3.subtract(c,o,c),c.x=0,l=scratchCartesian4NewYAxis,Cartesian3.magnitudeSquared(c)>CesiumMath.EPSILON10?Cartesian3.cross(s,c,l):(r=Cartesian4.add(Matrix4.getColumn(e._transform,1,scratchCartesian3$c),r,scratchCartesian3$c),i.cartesianToCartographic(r,n),t.project(n,a),l.x=a.z,l.y=a.x,l.z=a.y,l.w=0,Cartesian3.subtract(l,o,l),l.x=0,Cartesian3.magnitudeSquared(l)<CesiumMath.EPSILON10&&(Cartesian4.clone(Cartesian4.UNIT_Y,c),Cartesian4.clone(Cartesian4.UNIT_Z,l))),Cartesian3.cross(l,s,c),Cartesian3.normalize(c,c),Cartesian3.cross(s,c,l),Cartesian3.normalize(l,l),Matrix4.setColumn(e._actualTransform,0,c,e._actualTransform),Matrix4.setColumn(e._actualTransform,1,l,e._actualTransform),Matrix4.setColumn(e._actualTransform,2,s,e._actualTransform),Matrix4.setColumn(e._actualTransform,3,o,e._actualTransform)}var scratchCartesian$8=new Cartesian3;function updateMembers(e){var t=e._mode,i=!1,r=0;t===SceneMode$1.SCENE2D&&(i=(r=e.frustum.right-e.frustum.left)!==e._positionCartographic.height);var n=e._position,a=!Cartesian3.equals(n,e.position)||i;a&&(n=Cartesian3.clone(e.position,e._position));var o=e._direction,s=!Cartesian3.equals(o,e.direction);s&&(Cartesian3.normalize(e.direction,e.direction),o=Cartesian3.clone(e.direction,e._direction));var l=e._up,c=!Cartesian3.equals(l,e.up);c&&(Cartesian3.normalize(e.up,e.up),l=Cartesian3.clone(e.up,e._up));var u=e._right,d=!Cartesian3.equals(u,e.right);d&&(Cartesian3.normalize(e.right,e.right),u=Cartesian3.clone(e.right,e._right));var h=e._transformChanged||e._modeChanged;e._transformChanged=!1,h&&(Matrix4.inverseTransformation(e._transform,e._invTransform),e._mode===SceneMode$1.COLUMBUS_VIEW||e._mode===SceneMode$1.SCENE2D?Matrix4.equals(Matrix4.IDENTITY,e._transform)?Matrix4.clone(Camera.TRANSFORM_2D,e._actualTransform):(e._mode===SceneMode$1.COLUMBUS_VIEW?convertTransformForColumbusView:convertTransformFor2D)(e):Matrix4.clone(e._transform,e._actualTransform),Matrix4.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);var p;i=e._actualTransform;(a||h)&&(e._positionWC=Matrix4.multiplyByPoint(i,n,e._positionWC),t===SceneMode$1.SCENE3D||t===SceneMode$1.MORPHING?e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic):((p=scratchCartesian$8).x=e._positionWC.y,p.y=e._positionWC.z,p.z=e._positionWC.x,t===SceneMode$1.SCENE2D&&(p.z=r),e._projection.unproject(p,e._positionCartographic))),(s||c||d)&&(p=Cartesian3.dot(o,Cartesian3.cross(l,u,scratchCartesian$8)),Math.abs(1-p)>CesiumMath.EPSILON2&&(p=1/Cartesian3.magnitudeSquared(l),p=Cartesian3.dot(l,o)*p,p=Cartesian3.multiplyByScalar(o,p,scratchCartesian$8),l=Cartesian3.normalize(Cartesian3.subtract(l,p,e._up),e._up),Cartesian3.clone(l,e.up),u=Cartesian3.cross(o,l,e._right),Cartesian3.clone(u,e.right))),(s||h)&&(e._directionWC=Matrix4.multiplyByPointAsVector(i,o,e._directionWC),Cartesian3.normalize(e._directionWC,e._directionWC)),(c||h)&&(e._upWC=Matrix4.multiplyByPointAsVector(i,l,e._upWC),Cartesian3.normalize(e._upWC,e._upWC)),(d||h)&&(e._rightWC=Matrix4.multiplyByPointAsVector(i,u,e._rightWC),Cartesian3.normalize(e._rightWC,e._rightWC)),(a||s||c||d||h)&&updateViewMatrix(e)}function getHeading(e,t){return e=CesiumMath.equalsEpsilon(Math.abs(e.z),1,CesiumMath.EPSILON3)?Math.atan2(t.y,t.x)-CesiumMath.PI_OVER_TWO:Math.atan2(e.y,e.x)-CesiumMath.PI_OVER_TWO,CesiumMath.TWO_PI-CesiumMath.zeroToTwoPi(e)}function getPitch(e){return CesiumMath.PI_OVER_TWO-CesiumMath.acosClamped(e.z)}function getRoll(e,t,i){var r=0;return CesiumMath.equalsEpsilon(Math.abs(e.z),1,CesiumMath.EPSILON3)||(r=Math.atan2(-i.z,t.z),r=CesiumMath.zeroToTwoPi(r+CesiumMath.TWO_PI)),r}var scratchHPRMatrix1=new Matrix4,scratchHPRMatrix2=new Matrix4;Object.defineProperties(Camera.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return updateMembers(this),this._invTransform}},viewMatrix:{get:function(){return updateMembers(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return updateMembers(this),this._invViewMatrix}},positionCartographic:{get:function(){return updateMembers(this),this._positionCartographic}},positionWC:{get:function(){return updateMembers(this),this._positionWC}},directionWC:{get:function(){return updateMembers(this),this._directionWC}},upWC:{get:function(){return updateMembers(this),this._upWC}},rightWC:{get:function(){return updateMembers(this),this._rightWC}},heading:{get:function(){if(this._mode!==SceneMode$1.MORPHING){var e=this._projection.ellipsoid,t=Matrix4.clone(this._transform,scratchHPRMatrix1);e=Transforms.eastNorthUpToFixedFrame(this.positionWC,e,scratchHPRMatrix2);return this._setTransform(e),e=getHeading(this.direction,this.up),this._setTransform(t),e}}},pitch:{get:function(){if(this._mode!==SceneMode$1.MORPHING){var e=this._projection.ellipsoid,t=Matrix4.clone(this._transform,scratchHPRMatrix1);e=Transforms.eastNorthUpToFixedFrame(this.positionWC,e,scratchHPRMatrix2);return this._setTransform(e),e=getPitch(this.direction),this._setTransform(t),e}}},roll:{get:function(){if(this._mode!==SceneMode$1.MORPHING){var e=this._projection.ellipsoid,t=Matrix4.clone(this._transform,scratchHPRMatrix1);e=Transforms.eastNorthUpToFixedFrame(this.positionWC,e,scratchHPRMatrix2);return this._setTransform(e),e=getRoll(this.direction,this.up,this.right),this._setTransform(t),e}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}}),Camera.prototype.update=function(e){var t=!1;e!==this._mode&&(this._mode=e,this._modeChanged=e!==SceneMode$1.MORPHING,t=this._mode===SceneMode$1.SCENE2D),t&&(t=(e=this._max2Dfrustum=this.frustum.clone()).top/e.right,e.right=2*this._maxCoord.x,e.left=-e.right,e.top=t*e.right,e.bottom=-e.top),this._mode===SceneMode$1.SCENE2D&&clampMove2D(this,this.position)};var setTransformPosition=new Cartesian3,setTransformUp=new Cartesian3,setTransformDirection=new Cartesian3;Camera.prototype._setTransform=function(e){var t=Cartesian3.clone(this.positionWC,setTransformPosition),i=Cartesian3.clone(this.upWC,setTransformUp),r=Cartesian3.clone(this.directionWC,setTransformDirection);Matrix4.clone(e,this._transform),this._transformChanged=!0,updateMembers(this),e=this._actualInvTransform,Matrix4.multiplyByPoint(e,t,this.position),Matrix4.multiplyByPointAsVector(e,r,this.direction),Matrix4.multiplyByPointAsVector(e,i,this.up),Cartesian3.cross(this.direction,this.up,this.right),updateMembers(this)};var scratchAdjustOrthographicFrustumMousePosition=new Cartesian2,scratchPickRay=new Ray,scratchRayIntersection=new Cartesian3,scratchDepthIntersection=new Cartesian3;function calculateOrthographicFrustumWidth(e){if(!Matrix4.equals(Matrix4.IDENTITY,e.transform))return Cartesian3.magnitude(e.position);var t,i,r=e._scene,n=r.globe,a=scratchAdjustOrthographicFrustumMousePosition;return a.x=r.drawingBufferWidth/2,a.y=r.drawingBufferHeight/2,defined(n)&&(i=e.getPickRay(a,scratchPickRay),i=n.pickWorldCoordinates(i,r,!0,scratchRayIntersection)),r.pickPositionSupported&&(t=r.pickPositionWorldCoordinates(a,scratchDepthIntersection)),defined(i)||defined(t)?(t=defined(t)?Cartesian3.distance(t,e.positionWC):Number.POSITIVE_INFINITY,i=defined(i)?Cartesian3.distance(i,e.positionWC):Number.POSITIVE_INFINITY,Math.min(t,i)):Math.max(e.positionCartographic.height,0)}Camera.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof OrthographicFrustum&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=calculateOrthographicFrustumWidth(this)))};var scratchSetViewCartesian=new Cartesian3,scratchSetViewTransform1=new Matrix4,scratchSetViewTransform2=new Matrix4,scratchSetViewQuaternion=new Quaternion,scratchSetViewMatrix3=new Matrix3,scratchSetViewCartographic=new Cartographic;function setView3D(e,t,i){var r=Matrix4.clone(e.transform,scratchSetViewTransform1);t=Transforms.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,scratchSetViewTransform2);e._setTransform(t),Cartesian3.clone(Cartesian3.ZERO,e.position),i.heading=i.heading-CesiumMath.PI_OVER_TWO,i=Quaternion.fromHeadingPitchRoll(i,scratchSetViewQuaternion),i=Matrix3.fromQuaternion(i,scratchSetViewMatrix3),Matrix3.getColumn(i,0,e.direction),Matrix3.getColumn(i,2,e.up),Cartesian3.cross(e.direction,e.up,e.right),e._setTransform(r),e._adjustOrthographicFrustum(!0)}function setViewCV(e,t,i,r){var n,a=Matrix4.clone(e.transform,scratchSetViewTransform1);e._setTransform(Matrix4.IDENTITY),Cartesian3.equals(t,e.positionWC)||(r&&(r=(n=e._projection).ellipsoid.cartesianToCartographic(t,scratchSetViewCartographic),t=n.project(r,scratchSetViewCartesian)),Cartesian3.clone(t,e.position)),i.heading=i.heading-CesiumMath.PI_OVER_TWO,i=Quaternion.fromHeadingPitchRoll(i,scratchSetViewQuaternion),i=Matrix3.fromQuaternion(i,scratchSetViewMatrix3),Matrix3.getColumn(i,0,e.direction),Matrix3.getColumn(i,2,e.up),Cartesian3.cross(e.direction,e.up,e.right),e._setTransform(a),e._adjustOrthographicFrustum(!0)}function setView2D(e,t,i,r){var n,a,o=Matrix4.clone(e.transform,scratchSetViewTransform1);e._setTransform(Matrix4.IDENTITY),Cartesian3.equals(t,e.positionWC)||(r&&(a=(n=e._projection).ellipsoid.cartesianToCartographic(t,scratchSetViewCartographic),t=n.project(a,scratchSetViewCartesian)),Cartesian2.clone(t,e.position),n=-(r=.5*-t.z),a=e.frustum,r<n&&(t=a.top/a.right,a.right=n,a.left=r,a.top=a.right*t,a.bottom=-a.top)),e._scene.mapMode2D===MapMode2D$1.ROTATE&&(i.heading=i.heading-CesiumMath.PI_OVER_TWO,i.pitch=-CesiumMath.PI_OVER_TWO,i.roll=0,i=Quaternion.fromHeadingPitchRoll(i,scratchSetViewQuaternion),i=Matrix3.fromQuaternion(i,scratchSetViewMatrix3),Matrix3.getColumn(i,2,e.up),Cartesian3.cross(e.direction,e.up,e.right)),e._setTransform(o)}var scratchToHPRDirection=new Cartesian3,scratchToHPRUp=new Cartesian3,scratchToHPRRight=new Cartesian3;function directionUpToHeadingPitchRoll(e,t,i,r){var n=Cartesian3.clone(i.direction,scratchToHPRDirection);i=Cartesian3.clone(i.up,scratchToHPRUp);e._scene.mode===SceneMode$1.SCENE3D&&(a=e._projection.ellipsoid,a=Transforms.eastNorthUpToFixedFrame(t,a,scratchHPRMatrix1),a=Matrix4.inverseTransformation(a,scratchHPRMatrix2),Matrix4.multiplyByPointAsVector(a,n,n),Matrix4.multiplyByPointAsVector(a,i,i));var a=Cartesian3.cross(n,i,scratchToHPRRight);return r.heading=getHeading(n,i),r.pitch=getPitch(n),r.roll=getRoll(n,i,a),r}var scratchSetViewOptions={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},scratchHpr=new HeadingPitchRoll;Camera.prototype.setView=function(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t,i=defaultValue(e.orientation,defaultValue.EMPTY_OBJECT),r=this._mode;r!==SceneMode$1.MORPHING&&(defined(e.endTransform)&&this._setTransform(e.endTransform),t=defaultValue(e.convert,!0),defined(e=defaultValue(e.destination,Cartesian3.clone(this.positionWC,scratchSetViewCartesian)))&&defined(e.west)&&(e=this.getRectangleCameraCoordinates(e,scratchSetViewCartesian),t=!1),defined(i.direction)&&(i=directionUpToHeadingPitchRoll(this,e,i,scratchSetViewOptions.orientation)),scratchHpr.heading=defaultValue(i.heading,0),scratchHpr.pitch=defaultValue(i.pitch,-CesiumMath.PI_OVER_TWO),scratchHpr.roll=defaultValue(i.roll,0),r===SceneMode$1.SCENE3D?setView3D(this,e,scratchHpr):(r===SceneMode$1.SCENE2D?setView2D:setViewCV)(this,e,scratchHpr,t))};var pitchScratch=new Cartesian3;function clampMove2D(e,t){var i,r=e._scene.mapMode2D===MapMode2D$1.ROTATE,n=e._maxCoord.x;e=e._maxCoord.y,r=r?-(i=n):(i=t.x-2*n,t.x+2*n);t.x>n&&(t.x=i),t.x<-n&&(t.x=r),t.y>e&&(t.y=e),t.y<-e&&(t.y=-e)}Camera.prototype.flyHome=function(e){var t,i,r=this._mode;r===SceneMode$1.MORPHING&&this._scene.completeMorph(),r===SceneMode$1.SCENE2D?this.flyTo({destination:Camera.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:Matrix4.IDENTITY}):r===SceneMode$1.SCENE3D?(i=this.getRectangleCameraCoordinates(Camera.DEFAULT_VIEW_RECTANGLE),t=Cartesian3.magnitude(i),t+=t*Camera.DEFAULT_VIEW_FACTOR,Cartesian3.normalize(i,i),Cartesian3.multiplyByScalar(i,t,i),this.flyTo({destination:i,duration:e,endTransform:Matrix4.IDENTITY})):r===SceneMode$1.COLUMBUS_VIEW&&(i=this._projection.ellipsoid.maximumRadius,r=new Cartesian3(0,-1,1),r=Cartesian3.multiplyByScalar(Cartesian3.normalize(r,r),5*i,r),this.flyTo({destination:r,duration:e,orientation:{heading:0,pitch:-Math.acos(Cartesian3.normalize(r,pitchScratch).z),roll:0},endTransform:Matrix4.IDENTITY,convert:!1}))},Camera.prototype.worldToCameraCoordinates=function(e,t){return defined(t)||(t=new Cartesian4),updateMembers(this),Matrix4.multiplyByVector(this._actualInvTransform,e,t)},Camera.prototype.worldToCameraCoordinatesPoint=function(e,t){return defined(t)||(t=new Cartesian3),updateMembers(this),Matrix4.multiplyByPoint(this._actualInvTransform,e,t)},Camera.prototype.worldToCameraCoordinatesVector=function(e,t){return defined(t)||(t=new Cartesian3),updateMembers(this),Matrix4.multiplyByPointAsVector(this._actualInvTransform,e,t)},Camera.prototype.cameraToWorldCoordinates=function(e,t){return defined(t)||(t=new Cartesian4),updateMembers(this),Matrix4.multiplyByVector(this._actualTransform,e,t)},Camera.prototype.cameraToWorldCoordinatesPoint=function(e,t){return defined(t)||(t=new Cartesian3),updateMembers(this),Matrix4.multiplyByPoint(this._actualTransform,e,t)},Camera.prototype.cameraToWorldCoordinatesVector=function(e,t){return defined(t)||(t=new Cartesian3),updateMembers(this),Matrix4.multiplyByPointAsVector(this._actualTransform,e,t)};var moveScratch=new Cartesian3;Camera.prototype.move=function(e,t){var i=this.position;Cartesian3.multiplyByScalar(e,t,moveScratch),Cartesian3.add(i,moveScratch,i),this._mode===SceneMode$1.SCENE2D&&clampMove2D(this,i),this._adjustOrthographicFrustum(!0)},Camera.prototype.moveForward=function(e){e=defaultValue(e,this.defaultMoveAmount),this._mode===SceneMode$1.SCENE2D?zoom2D(this,e):this.move(this.direction,e)},Camera.prototype.moveBackward=function(e){e=defaultValue(e,this.defaultMoveAmount),this._mode===SceneMode$1.SCENE2D?zoom2D(this,-e):this.move(this.direction,-e)},Camera.prototype.moveUp=function(e){e=defaultValue(e,this.defaultMoveAmount),this.move(this.up,e)},Camera.prototype.moveDown=function(e){e=defaultValue(e,this.defaultMoveAmount),this.move(this.up,-e)},Camera.prototype.moveRight=function(e){e=defaultValue(e,this.defaultMoveAmount),this.move(this.right,e)},Camera.prototype.moveLeft=function(e){e=defaultValue(e,this.defaultMoveAmount),this.move(this.right,-e)},Camera.prototype.lookLeft=function(e){e=defaultValue(e,this.defaultLookAmount),this._mode!==SceneMode$1.SCENE2D&&this.look(this.up,-e)},Camera.prototype.lookRight=function(e){e=defaultValue(e,this.defaultLookAmount),this._mode!==SceneMode$1.SCENE2D&&this.look(this.up,e)},Camera.prototype.lookUp=function(e){e=defaultValue(e,this.defaultLookAmount),this._mode!==SceneMode$1.SCENE2D&&this.look(this.right,-e)},Camera.prototype.lookDown=function(e){e=defaultValue(e,this.defaultLookAmount),this._mode!==SceneMode$1.SCENE2D&&this.look(this.right,e)};var lookScratchQuaternion=new Quaternion,lookScratchMatrix=new Matrix3;Camera.prototype.look=function(e,t){var i=defaultValue(t,this.defaultLookAmount),r=Quaternion.fromAxisAngle(e,-i,lookScratchQuaternion);t=Matrix3.fromQuaternion(r,lookScratchMatrix),e=this.direction,i=this.up,r=this.right;Matrix3.multiplyByVector(t,e,e),Matrix3.multiplyByVector(t,i,i),Matrix3.multiplyByVector(t,r,r)},Camera.prototype.twistLeft=function(e){e=defaultValue(e,this.defaultLookAmount),this.look(this.direction,e)},Camera.prototype.twistRight=function(e){e=defaultValue(e,this.defaultLookAmount),this.look(this.direction,-e)};var rotateScratchQuaternion=new Quaternion,rotateScratchMatrix=new Matrix3;Camera.prototype.rotate=function(e,t){t=defaultValue(t,this.defaultRotateAmount),t=Quaternion.fromAxisAngle(e,-t,rotateScratchQuaternion),t=Matrix3.fromQuaternion(t,rotateScratchMatrix),Matrix3.multiplyByVector(t,this.position,this.position),Matrix3.multiplyByVector(t,this.direction,this.direction),Matrix3.multiplyByVector(t,this.up,this.up),Cartesian3.cross(this.direction,this.up,this.right),Cartesian3.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},Camera.prototype.rotateDown=function(e){rotateVertical(this,e=defaultValue(e,this.defaultRotateAmount))},Camera.prototype.rotateUp=function(e){rotateVertical(this,-(e=defaultValue(e,this.defaultRotateAmount)))};var rotateVertScratchP=new Cartesian3,rotateVertScratchA=new Cartesian3,rotateVertScratchTan=new Cartesian3,rotateVertScratchNegate=new Cartesian3;function rotateVertical(e,t){var i,r,n,a=e.position;defined(e.constrainedAxis)&&!Cartesian3.equalsEpsilon(e.position,Cartesian3.ZERO,CesiumMath.EPSILON2)?(n=Cartesian3.normalize(a,rotateVertScratchP),i=Cartesian3.equalsEpsilon(n,e.constrainedAxis,CesiumMath.EPSILON2),r=Cartesian3.equalsEpsilon(n,Cartesian3.negate(e.constrainedAxis,rotateVertScratchNegate),CesiumMath.EPSILON2),i||r?(i&&t<0||r&&0<t)&&e.rotate(e.right,t):(a=Cartesian3.normalize(e.constrainedAxis,rotateVertScratchA),i=Cartesian3.dot(n,a),r=CesiumMath.acosClamped(i),0<t&&r<t&&(t=r-CesiumMath.EPSILON4),i=Cartesian3.dot(n,Cartesian3.negate(a,rotateVertScratchNegate)),r=CesiumMath.acosClamped(i),t<0&&r<-t&&(t=-r+CesiumMath.EPSILON4),n=Cartesian3.cross(a,n,rotateVertScratchTan),e.rotate(n,t))):e.rotate(e.right,t)}function rotateHorizontal(e,t){defined(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function zoom2D(e,t){var i,r,n,a=e.frustum;t*=.5,Math.abs(a.top)+Math.abs(a.bottom)>Math.abs(a.left)+Math.abs(a.right)?(r=a.top-t,n=a.bottom+t,i=e._maxCoord.y,e._scene.mapMode2D===MapMode2D$1.ROTATE&&(i*=e.maximumZoomFactor),i<n&&(r=-(n=i)),r<=n&&(n=-(r=1)),i=a.right/a.top,a.top=r,a.bottom=n,a.right=a.top*i,a.left=-a.right):(r=a.right-t,n=a.left+t,t=e._maxCoord.x,e._scene.mapMode2D===MapMode2D$1.ROTATE&&(t*=e.maximumZoomFactor),t<r&&(n=-(r=t)),r<=n&&(n=-(r=1)),i=a.top/a.right,a.right=r,a.left=n,a.top=a.right*i,a.bottom=-a.top)}function zoom3D(e,t){e.move(e.direction,t)}Camera.prototype.rotateRight=function(e){rotateHorizontal(this,-(e=defaultValue(e,this.defaultRotateAmount)))},Camera.prototype.rotateLeft=function(e){rotateHorizontal(this,e=defaultValue(e,this.defaultRotateAmount))},Camera.prototype.zoomIn=function(e){e=defaultValue(e,this.defaultZoomAmount),(this._mode===SceneMode$1.SCENE2D?zoom2D:zoom3D)(this,e)},Camera.prototype.zoomOut=function(e){e=defaultValue(e,this.defaultZoomAmount),(this._mode===SceneMode$1.SCENE2D?zoom2D:zoom3D)(this,-e)},Camera.prototype.getMagnitude=function(){return this._mode===SceneMode$1.SCENE3D?Cartesian3.magnitude(this.position):this._mode===SceneMode$1.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===SceneMode$1.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var scratchLookAtMatrix4=new Matrix4;Camera.prototype.lookAt=function(e,t){e=Transforms.eastNorthUpToFixedFrame(e,Ellipsoid.WGS84,scratchLookAtMatrix4),this.lookAtTransform(e,t)};var scratchLookAtHeadingPitchRangeOffset=new Cartesian3,scratchLookAtHeadingPitchRangeQuaternion1=new Quaternion,scratchLookAtHeadingPitchRangeQuaternion2=new Quaternion,scratchHeadingPitchRangeMatrix3=new Matrix3;function offsetFromHeadingPitchRange(e,t,i){return t=CesiumMath.clamp(t,-CesiumMath.PI_OVER_TWO,CesiumMath.PI_OVER_TWO),e=CesiumMath.zeroToTwoPi(e)-CesiumMath.PI_OVER_TWO,t=Quaternion.fromAxisAngle(Cartesian3.UNIT_Y,-t,scratchLookAtHeadingPitchRangeQuaternion1),e=Quaternion.fromAxisAngle(Cartesian3.UNIT_Z,-e,scratchLookAtHeadingPitchRangeQuaternion2),t=Quaternion.multiply(e,t,e),e=Matrix3.fromQuaternion(t,scratchHeadingPitchRangeMatrix3),t=Cartesian3.clone(Cartesian3.UNIT_X,scratchLookAtHeadingPitchRangeOffset),Matrix3.multiplyByVector(e,t,t),Cartesian3.negate(t,t),Cartesian3.multiplyByScalar(t,i,t),t}Camera.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),defined(t)){var i=defined(t.heading)?offsetFromHeadingPitchRange(t.heading,t.pitch,t.range):t;if(this._mode===SceneMode$1.SCENE2D){Cartesian2.clone(Cartesian2.ZERO,this.position),Cartesian3.negate(i,this.up),this.up.z=0,Cartesian3.magnitudeSquared(this.up)<CesiumMath.EPSILON10&&Cartesian3.clone(Cartesian3.UNIT_Y,this.up),Cartesian3.normalize(this.up,this.up),this._setTransform(Matrix4.IDENTITY),Cartesian3.negate(Cartesian3.UNIT_Z,this.direction),Cartesian3.cross(this.direction,this.up,this.right),Cartesian3.normalize(this.right,this.right);var r=this.frustum;t=r.top/r.right;return r.right=.5*Cartesian3.magnitude(i),r.left=-r.right,r.top=t*r.right,r.bottom=-r.top,void this._setTransform(e)}Cartesian3.clone(i,this.position),Cartesian3.negate(this.position,this.direction),Cartesian3.normalize(this.direction,this.direction),Cartesian3.cross(this.direction,Cartesian3.UNIT_Z,this.right),Cartesian3.magnitudeSquared(this.right)<CesiumMath.EPSILON10&&Cartesian3.clone(Cartesian3.UNIT_X,this.right),Cartesian3.normalize(this.right,this.right),Cartesian3.cross(this.right,this.direction,this.up),Cartesian3.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)}};var viewRectangle3DCartographic1=new Cartographic,viewRectangle3DCartographic2=new Cartographic,viewRectangle3DNorthEast=new Cartesian3,viewRectangle3DSouthWest=new Cartesian3,viewRectangle3DNorthWest=new Cartesian3,viewRectangle3DSouthEast=new Cartesian3,viewRectangle3DNorthCenter=new Cartesian3,viewRectangle3DSouthCenter=new Cartesian3,viewRectangle3DCenter=new Cartesian3,viewRectangle3DEquator=new Cartesian3,defaultRF={direction:new Cartesian3,right:new Cartesian3,up:new Cartesian3},viewRectangle3DEllipsoidGeodesic;function computeD(e,t,i,r){return Math.abs(Cartesian3.dot(t,i))/r-Cartesian3.dot(e,i)}function rectangleCameraPosition3D(e,t,i,r){var n=e._projection.ellipsoid,a=r?e:defaultRF,o=t.north,s=t.south,l=t.east,c=t.west;l<c&&(l+=CesiumMath.TWO_PI);var u=.5*(c+l),d=s<-CesiumMath.PI_OVER_TWO+CesiumMath.RADIANS_PER_DEGREE&&o>CesiumMath.PI_OVER_TWO-CesiumMath.RADIANS_PER_DEGREE?0:((_=viewRectangle3DCartographic1).longitude=u,_.latitude=o,_.height=0,(v=viewRectangle3DCartographic2).longitude=u,v.latitude=s,v.height=0,defined(C=viewRectangle3DEllipsoidGeodesic)&&C.ellipsoid===n||(viewRectangle3DEllipsoidGeodesic=C=new EllipsoidGeodesic(void 0,void 0,n)),C.setEndPoints(_,v),C.interpolateUsingFraction(.5,viewRectangle3DCartographic1).latitude),h=viewRectangle3DCartographic1;h.longitude=u,h.latitude=d,h.height=0;var p=n.cartographicToCartesian(h,viewRectangle3DCenter),f=viewRectangle3DCartographic1;f.longitude=l,f.latitude=o;var m=n.cartographicToCartesian(f,viewRectangle3DNorthEast);f.longitude=c;var g=n.cartographicToCartesian(f,viewRectangle3DNorthWest);f.longitude=u;var y=n.cartographicToCartesian(f,viewRectangle3DNorthCenter);f.latitude=s,r=n.cartographicToCartesian(f,viewRectangle3DSouthCenter),f.longitude=l,t=n.cartographicToCartesian(f,viewRectangle3DSouthEast),f.longitude=c;var _=n.cartographicToCartesian(f,viewRectangle3DSouthWest);Cartesian3.subtract(g,p,g),Cartesian3.subtract(t,p,t),Cartesian3.subtract(m,p,m),Cartesian3.subtract(_,p,_),Cartesian3.subtract(y,p,y),Cartesian3.subtract(r,p,r);var v=n.geodeticSurfaceNormal(p,a.direction);Cartesian3.negate(v,v);var C=Cartesian3.cross(v,Cartesian3.UNIT_Z,a.right);Cartesian3.normalize(C,C);var x,b;d=Cartesian3.cross(C,v,a.up);return e.frustum instanceof OrthographicFrustum?(h=Math.max(Cartesian3.distance(m,g),Cartesian3.distance(t,_)),(a=(u=Math.max(Cartesian3.distance(m,t),Cartesian3.distance(g,_)))*(f=e.frustum._offCenterFrustum.right/e.frustum._offCenterFrustum.top))<h?x=(b=h)/f:(x=u,b=a),b=Math.max(b,x)):(x=Math.tan(.5*e.frustum.fovy),e=e.frustum.aspectRatio*x,b=Math.max(computeD(v,d,g,x),computeD(v,d,t,x),computeD(v,d,m,x),computeD(v,d,_,x),computeD(v,d,y,x),computeD(v,d,r,x),computeD(v,C,g,e),computeD(v,C,t,e),computeD(v,C,m,e),computeD(v,C,_,e),computeD(v,C,y,e),computeD(v,C,r,e)),s<0&&0<o&&((o=viewRectangle3DCartographic1).longitude=c,o.latitude=0,o.height=0,c=n.cartographicToCartesian(o,viewRectangle3DEquator),Cartesian3.subtract(c,p,c),b=Math.max(b,computeD(v,d,c,x),computeD(v,C,c,e)),o.longitude=l,c=n.cartographicToCartesian(o,viewRectangle3DEquator),Cartesian3.subtract(c,p,c),b=Math.max(b,computeD(v,d,c,x),computeD(v,C,c,e)))),Cartesian3.add(p,Cartesian3.multiplyByScalar(v,-b,viewRectangle3DEquator),i)}var viewRectangleCVCartographic=new Cartographic,viewRectangleCVNorthEast=new Cartesian3,viewRectangleCVSouthWest=new Cartesian3;function rectangleCameraPositionColumbusView(e,t,i){var r=e._projection;t.west>t.east&&(t=Rectangle.MAX_VALUE);var n=e._actualTransform,a=e._actualInvTransform;(l=viewRectangleCVCartographic).longitude=t.east,l.latitude=t.north;var o=r.project(l,viewRectangleCVNorthEast);Matrix4.multiplyByPoint(n,o,o),Matrix4.multiplyByPoint(a,o,o),l.longitude=t.west,l.latitude=t.south;var s,l=r.project(l,viewRectangleCVSouthWest);return Matrix4.multiplyByPoint(n,l,l),Matrix4.multiplyByPoint(a,l,l),i.x=.5*(o.x-l.x)+l.x,i.y=.5*(o.y-l.y)+l.y,defined(e.frustum.fovy)?(s=Math.tan(.5*e.frustum.fovy),e=e.frustum.aspectRatio*s,i.z=.5*Math.max((o.x-l.x)/e,(o.y-l.y)/s)):(s=o.x-l.x,l=o.y-l.y,i.z=Math.max(s,l)),i}var viewRectangle2DCartographic=new Cartographic,viewRectangle2DNorthEast=new Cartesian3,viewRectangle2DSouthWest=new Cartesian3;function rectangleCameraPosition2D(e,t,i){var r=e._projection,n=t.east;t.west>t.east&&(e._scene.mapMode2D===MapMode2D$1.INFINITE_SCROLL?n+=CesiumMath.TWO_PI:n=(t=Rectangle.MAX_VALUE).east);var a=viewRectangle2DCartographic;a.longitude=n,a.latitude=t.north;var o=r.project(a,viewRectangle2DNorthEast);a.longitude=t.west,a.latitude=t.south;var s,l,c=r.project(a,viewRectangle2DSouthWest),u=.5*Math.abs(o.x-c.x);return(e=(n=.5*Math.abs(o.y-c.y))*(t=e.frustum.right/e.frustum.top))<u?l=(s=u)/t:(l=n,s=e),n=Math.max(2*s,2*l),i.x=.5*(o.x-c.x)+c.x,i.y=.5*(o.y-c.y)+c.y,(a=r.unproject(i,a)).height=n,r.project(a,i)}Camera.prototype.getRectangleCameraCoordinates=function(e,t){var i=this._mode;return defined(t)||(t=new Cartesian3),i===SceneMode$1.SCENE3D?rectangleCameraPosition3D(this,e,t):i===SceneMode$1.COLUMBUS_VIEW?rectangleCameraPositionColumbusView(this,e,t):i===SceneMode$1.SCENE2D?rectangleCameraPosition2D(this,e,t):void 0};var pickEllipsoid3DRay=new Ray;function pickEllipsoid3D(e,t,i,r){if(i=defaultValue(i,Ellipsoid.WGS84),t=e.getPickRay(t,pickEllipsoid3DRay),i=IntersectionTests.rayEllipsoid(t,i))return i=0<i.start?i.start:i.stop,Ray.getPoint(t,i,r)}var pickEllipsoid2DRay=new Ray;function pickMap2D(e,t,i,r){if(t=e.getPickRay(t,pickEllipsoid2DRay).origin,t=Cartesian3.fromElements(t.y,t.z,0,t),!((t=i.unproject(t)).latitude<-CesiumMath.PI_OVER_TWO||t.latitude>CesiumMath.PI_OVER_TWO))return i.ellipsoid.cartographicToCartesian(t,r)}var pickEllipsoidCVRay=new Ray;function pickMapColumbusView(e,t,i,r){if(t=-(e=e.getPickRay(t,pickEllipsoidCVRay)).origin.x/e.direction.x,Ray.getPoint(e,t,r),!((t=i.unproject(new Cartesian3(r.y,r.z,0))).latitude<-CesiumMath.PI_OVER_TWO||t.latitude>CesiumMath.PI_OVER_TWO||t.longitude<-Math.PI||t.longitude>Math.PI))return i.ellipsoid.cartographicToCartesian(t,r)}Camera.prototype.pickEllipsoid=function(e,t,i){var r=this._scene.canvas;if(0!==r.clientWidth&&0!==r.clientHeight){if(defined(i)||(i=new Cartesian3),t=defaultValue(t,Ellipsoid.WGS84),this._mode===SceneMode$1.SCENE3D)i=pickEllipsoid3D(this,e,t,i);else if(this._mode===SceneMode$1.SCENE2D)i=pickMap2D(this,e,this._projection,i);else{if(this._mode!==SceneMode$1.COLUMBUS_VIEW)return;i=pickMapColumbusView(this,e,this._projection,i)}return i}};var pickPerspCenter=new Cartesian3,pickPerspXDir=new Cartesian3,pickPerspYDir=new Cartesian3;function getPickRayPerspective(e,t,i){var r=(l=e._scene.canvas).clientWidth,n=l.clientHeight,a=Math.tan(.5*e.frustum.fovy),o=e.frustum.aspectRatio*a,s=e.frustum.near,l=2/r*t.x-1;r=2/n*(n-t.y)-1,n=e.positionWC;return Cartesian3.clone(n,i.origin),t=Cartesian3.multiplyByScalar(e.directionWC,s,pickPerspCenter),Cartesian3.add(n,t,t),o=Cartesian3.multiplyByScalar(e.rightWC,l*s*o,pickPerspXDir),a=Cartesian3.multiplyByScalar(e.upWC,r*s*a,pickPerspYDir),o=Cartesian3.add(t,o,i.direction),Cartesian3.add(o,a,o),Cartesian3.subtract(o,n,o),Cartesian3.normalize(o,o),i}var scratchDirection$1=new Cartesian3;function getPickRayOrthographic(e,t,i){var r,n=(r=e._scene.canvas).clientWidth,a=r.clientHeight;return defined((r=e.frustum)._offCenterFrustum)&&(r=r._offCenterFrustum),n=2/n*t.x-1,n*=.5*(r.right-r.left),t=2/a*(a-t.y)-1,t*=.5*(r.top-r.bottom),r=i.origin,Cartesian3.clone(e.position,r),Cartesian3.multiplyByScalar(e.right,n,scratchDirection$1),Cartesian3.add(scratchDirection$1,r,r),Cartesian3.multiplyByScalar(e.up,t,scratchDirection$1),Cartesian3.add(scratchDirection$1,r,r),Cartesian3.clone(e.directionWC,i.direction),e._mode!==SceneMode$1.COLUMBUS_VIEW&&e._mode!==SceneMode$1.SCENE2D||Cartesian3.fromElements(i.origin.z,i.origin.x,i.origin.y,i.origin),i}Camera.prototype.getPickRay=function(e,t){defined(t)||(t=new Ray);var i=this.frustum;return(defined(i.aspectRatio)&&defined(i.fov)&&defined(i.near)?getPickRayPerspective:getPickRayOrthographic)(this,e,t)};var scratchToCenter$1=new Cartesian3,scratchProj=new Cartesian3;Camera.prototype.distanceToBoundingSphere=function(e){var t=Cartesian3.subtract(this.positionWC,e.center,scratchToCenter$1);t=Cartesian3.multiplyByScalar(this.directionWC,Cartesian3.dot(t,this.directionWC),scratchProj);return Math.max(0,Cartesian3.magnitude(t)-e.radius)};var scratchPixelSize=new Cartesian2;function createAnimationTemplateCV(e,t,i,r,n,a){var o=Cartesian3.clone(t);return i.y>r?o.y-=i.y-r:i.y<-r&&(o.y+=-r-i.y),i.z>n?o.z-=i.z-n:i.z<-n&&(o.z+=-n-i.z),{easingFunction:EasingFunction$1.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:a,update:function(i){i=Cartesian3.lerp(t,o,i.time,new Cartesian3),e.worldToCameraCoordinatesPoint(i,e.position)}}}Camera.prototype.getPixelSize=function(e,t,i){return e=this.distanceToBoundingSphere(e),e=this.frustum.getPixelDimensions(t,i,e,this._scene.pixelRatio,scratchPixelSize),Math.max(e.x,e.y)};var normalScratch$4=new Cartesian3,centerScratch$4=new Cartesian3,posScratch=new Cartesian3,scratchCartesian3Subtract=new Cartesian3;function createAnimationCV(e,t){var i=e.position,r=e.direction,n=e.worldToCameraCoordinatesVector(Cartesian3.UNIT_X,normalScratch$4),a=-Cartesian3.dot(n,i)/Cartesian3.dot(n,r),o=Cartesian3.add(i,Cartesian3.multiplyByScalar(r,a,centerScratch$4),centerScratch$4);e.cameraToWorldCoordinatesPoint(o,o),i=e.cameraToWorldCoordinatesPoint(e.position,posScratch);var s=Math.tan(.5*e.frustum.fovy);a=(n=e.frustum.aspectRatio*s)*(r=Cartesian3.magnitude(Cartesian3.subtract(i,o,scratchCartesian3Subtract))),n=s*r,s=e._maxCoord.x,r=e._maxCoord.y,a=Math.max(a-s,s),s=Math.max(n-r,r);if((i.z<-a||i.z>a||i.y<-s||i.y>s)&&(n=o.y<-a||o.y>a,r=o.z<-s||o.z>s,n||r))return createAnimationTemplateCV(e,i,o,a,s,t)}Camera.prototype.createCorrectPositionTween=function(e){if(this._mode===SceneMode$1.COLUMBUS_VIEW)return createAnimationCV(this,e)};var scratchFlyToDestination=new Cartesian3,newOptions={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};function distanceToBoundingSphere3D(e,t){var i=e.frustum;e=Math.tan(.5*i.fovy),i=i.aspectRatio*e;return Math.max(t/i,t/e)}function distanceToBoundingSphere2D(e,t){var i,r,n=e.frustum;return defined(n._offCenterFrustum)&&(n=n._offCenterFrustum),(n=t*(e=n.right/n.top))<t?r=(i=t)/e:(r=t,i=n),1.5*Math.max(i,r)}Camera.prototype.cancelFlight=function(){defined(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},Camera.prototype.completeFlight=function(){var e;defined(this._currentFlight)&&(this._currentFlight.cancelTween(),(e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}}).destination=newOptions.destination,e.orientation.heading=newOptions.heading,e.orientation.pitch=newOptions.pitch,e.orientation.roll=newOptions.roll,this.setView(e),defined(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0)},Camera.prototype.flyTo=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).destination;if(this._mode!==SceneMode$1.MORPHING){this.cancelFlight();var i=defaultValue(e.orientation,defaultValue.EMPTY_OBJECT);if(defined(i.direction)&&(i=directionUpToHeadingPitchRoll(this,t,i,scratchSetViewOptions.orientation)),defined(e.duration)&&e.duration<=0){var r=scratchSetViewOptions;return r.destination=e.destination,r.orientation.heading=i.heading,r.orientation.pitch=i.pitch,r.orientation.roll=i.roll,r.convert=e.convert,r.endTransform=e.endTransform,this.setView(r),void("function"==typeof e.complete&&e.complete())}var n=defined(t.west);n&&(t=this.getRectangleCameraCoordinates(t,scratchFlyToDestination));var a,o=this;newOptions.destination=t,newOptions.heading=i.heading,newOptions.pitch=i.pitch,newOptions.roll=i.roll,newOptions.duration=e.duration,newOptions.complete=function(){a===o._currentFlight&&(o._currentFlight=void 0),defined(e.complete)&&e.complete()},newOptions.cancel=e.cancel,newOptions.endTransform=e.endTransform,newOptions.convert=!n&&e.convert,newOptions.maximumHeight=e.maximumHeight,newOptions.pitchAdjustHeight=e.pitchAdjustHeight,newOptions.flyOverLongitude=e.flyOverLongitude,newOptions.flyOverLongitudeWeight=e.flyOverLongitudeWeight,newOptions.easingFunction=e.easingFunction,r=this._scene,0!==(n=CameraFlightPath.createTween(r,newOptions)).duration?(a=r.tweens.add(n),this._currentFlight=a,r=this._scene.preloadFlightCamera,this._mode!==SceneMode$1.SCENE2D&&(defined(r)||(r=Camera.clone(this)),r.setView({destination:t,orientation:i}),this._scene.preloadFlightCullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC))):"function"==typeof n.complete&&n.complete()}};var MINIMUM_ZOOM=100;function adjustBoundingSphereOffset(e,t,i){i=HeadingPitchRange.clone(defined(i)?i:Camera.DEFAULT_OFFSET);var r=e._scene.screenSpaceCameraController.minimumZoomDistance,n=e._scene.screenSpaceCameraController.maximumZoomDistance,a=i.range;return defined(a)&&0!==a||(0===(t=t.radius)?i.range=MINIMUM_ZOOM:e.frustum instanceof OrthographicFrustum||e._mode===SceneMode$1.SCENE2D?i.range=distanceToBoundingSphere2D(e,t):i.range=distanceToBoundingSphere3D(e,t),i.range=CesiumMath.clamp(i.range,r,n)),i}Camera.prototype.viewBoundingSphere=function(e,t){t=adjustBoundingSphereOffset(this,e,t),this.lookAt(e.center,t)};var scratchflyToBoundingSphereTransform=new Matrix4,scratchflyToBoundingSphereDestination=new Cartesian3,scratchflyToBoundingSphereDirection=new Cartesian3,scratchflyToBoundingSphereUp=new Cartesian3,scratchflyToBoundingSphereRight=new Cartesian3,scratchFlyToBoundingSphereCart4=new Cartesian4,scratchFlyToBoundingSphereQuaternion=new Quaternion,scratchFlyToBoundingSphereMatrix3=new Matrix3;Camera.prototype.flyToBoundingSphere=function(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=this._mode===SceneMode$1.SCENE2D||this._mode===SceneMode$1.COLUMBUS_VIEW;this._setTransform(Matrix4.IDENTITY);var r,n,a,o=adjustBoundingSphereOffset(this,e,t.offset),s=i?Cartesian3.multiplyByScalar(Cartesian3.UNIT_Z,o.range,scratchflyToBoundingSphereDestination):offsetFromHeadingPitchRange(o.heading,o.pitch,o.range),l=Transforms.eastNorthUpToFixedFrame(e.center,Ellipsoid.WGS84,scratchflyToBoundingSphereTransform);Matrix4.multiplyByPoint(l,s,s),i||(n=Cartesian3.subtract(e.center,s,scratchflyToBoundingSphereDirection),Cartesian3.normalize(n,n),r=Matrix4.multiplyByPointAsVector(l,Cartesian3.UNIT_Z,scratchflyToBoundingSphereUp),1-Math.abs(Cartesian3.dot(n,r))<CesiumMath.EPSILON6&&(a=Quaternion.fromAxisAngle(n,o.heading,scratchFlyToBoundingSphereQuaternion),a=Matrix3.fromQuaternion(a,scratchFlyToBoundingSphereMatrix3),Cartesian3.fromCartesian4(Matrix4.getColumn(l,1,scratchFlyToBoundingSphereCart4),r),Matrix3.multiplyByVector(a,r,r)),a=Cartesian3.cross(n,r,scratchflyToBoundingSphereRight),Cartesian3.cross(a,n,r),Cartesian3.normalize(r,r)),this.flyTo({destination:s,orientation:{direction:n,up:r},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var scratchCartesian3_1=new Cartesian3,scratchCartesian3_2=new Cartesian3,scratchCartesian3_3=new Cartesian3,scratchCartesian3_4=new Cartesian3,horizonPoints=[new Cartesian3,new Cartesian3,new Cartesian3,new Cartesian3];function computeHorizonQuad(e,t){var i=t.radii,r=e.positionWC,n=Cartesian3.multiplyComponents(t.oneOverRadii,r,scratchCartesian3_1),a=(e=Cartesian3.magnitude(n),t=Cartesian3.normalize(n,scratchCartesian3_2),r=Cartesian3.equalsEpsilon(t,Cartesian3.UNIT_Z,CesiumMath.EPSILON10)?(a=new Cartesian3(0,1,0),new Cartesian3(0,0,1)):(a=Cartesian3.normalize(Cartesian3.cross(Cartesian3.UNIT_Z,t,scratchCartesian3_3),scratchCartesian3_3),Cartesian3.normalize(Cartesian3.cross(t,a,scratchCartesian3_4),scratchCartesian3_4)),n=Math.sqrt(Cartesian3.magnitudeSquared(n)-1),t=Cartesian3.multiplyByScalar(t,1/e,scratchCartesian3_1),e=n/e,Cartesian3.multiplyByScalar(a,e,scratchCartesian3_2));r=Cartesian3.multiplyByScalar(r,e,scratchCartesian3_3),e=Cartesian3.add(t,r,horizonPoints[0]);return Cartesian3.subtract(e,a,e),Cartesian3.multiplyComponents(i,e,e),e=Cartesian3.subtract(t,r,horizonPoints[1]),Cartesian3.subtract(e,a,e),Cartesian3.multiplyComponents(i,e,e),e=Cartesian3.subtract(t,r,horizonPoints[2]),Cartesian3.add(e,a,e),Cartesian3.multiplyComponents(i,e,e),r=Cartesian3.add(t,r,horizonPoints[3]),Cartesian3.add(r,a,r),Cartesian3.multiplyComponents(i,r,r),horizonPoints}var scratchPickCartesian2=new Cartesian2,scratchRectCartesian=new Cartesian3,cartoArray=[new Cartographic,new Cartographic,new Cartographic,new Cartographic];function addToResult(e,t,i,r,n,a){return scratchPickCartesian2.x=e,scratchPickCartesian2.y=t,defined(r=r.pickEllipsoid(scratchPickCartesian2,n,scratchRectCartesian))?(cartoArray[i]=n.cartesianToCartographic(r,cartoArray[i]),1):(cartoArray[i]=n.cartesianToCartographic(a[i],cartoArray[i]),0)}Camera.prototype.computeViewRectangle=function(e,t){e=defaultValue(e,Ellipsoid.WGS84);var i=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),r=new BoundingSphere(Cartesian3.ZERO,e.maximumRadius);if(i.computeVisibility(r)!==Intersect$1.OUTSIDE){var n,a=(n=this._scene.canvas).clientWidth;i=n.clientHeight,r=0;if(r+=addToResult(0,0,0,this,e,n=computeHorizonQuad(this,e)),r+=addToResult(0,i,1,this,e,n),r+=addToResult(a,i,2,this,e,n),(r+=addToResult(a,0,3,this,e,n))<2)return Rectangle.MAX_VALUE;t=Rectangle.fromCartographicArray(cartoArray,t);for(var o=0,s=cartoArray[3].longitude,l=0;l<4;++l){var c=cartoArray[l].longitude,u=Math.abs(c-s);u>CesiumMath.PI?o+=CesiumMath.TWO_PI-u:o+=u,s=c}return CesiumMath.equalsEpsilon(Math.abs(o),CesiumMath.TWO_PI,CesiumMath.EPSILON9)&&(t.west=-CesiumMath.PI,t.east=CesiumMath.PI,0<=cartoArray[0].latitude?t.north=CesiumMath.PI_OVER_TWO:t.south=-CesiumMath.PI_OVER_TWO),t}},Camera.prototype.switchToPerspectiveFrustum=function(){var e;this._mode===SceneMode$1.SCENE2D||this.frustum instanceof PerspectiveFrustum||(e=this._scene,this.frustum=new PerspectiveFrustum,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=CesiumMath.toRadians(60))},Camera.prototype.switchToOrthographicFrustum=function(){var e,t;this._mode===SceneMode$1.SCENE2D||this.frustum instanceof OrthographicFrustum||(e=calculateOrthographicFrustumWidth(this),t=this._scene,this.frustum=new OrthographicFrustum,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e)},Camera.clone=function(e,t){return defined(t)||(t=new Camera(e._scene)),Cartesian3.clone(e.position,t.position),Cartesian3.clone(e.direction,t.direction),Cartesian3.clone(e.up,t.up),Cartesian3.clone(e.right,t.right),Matrix4.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var CameraEventType={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},CameraEventType$1=Object.freeze(CameraEventType);function getKey(e,t){return defined(t)&&(e+="+"+t),e}function clonePinchMovement(e,t){Cartesian2.clone(e.distance.startPosition,t.distance.startPosition),Cartesian2.clone(e.distance.endPosition,t.distance.endPosition),Cartesian2.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),Cartesian2.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function listenToPinch(e,t,i){var r=getKey(CameraEventType$1.PINCH,t),n=e._update,a=e._isDown,o=e._eventStartPosition,s=e._pressTime,l=e._releaseTime;n[r]=!0,a[r]=!1,o[r]=new Cartesian2;var c=e._movement[r];defined(c)||(c=e._movement[r]={}),c.distance={startPosition:new Cartesian2,endPosition:new Cartesian2},c.angleAndHeight={startPosition:new Cartesian2,endPosition:new Cartesian2},c.prevAngle=0,e._eventHandler.setInputAction((function(t){e._buttonsDown++,a[r]=!0,s[r]=new Date,Cartesian2.lerp(t.position1,t.position2,.5,o[r])}),ScreenSpaceEventType$1.PINCH_START,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),a[r]=!1,l[r]=new Date}),ScreenSpaceEventType$1.PINCH_END,t),e._eventHandler.setInputAction((function(e){if(a[r]){n[r]?(clonePinchMovement(e,c),n[r]=!1,c.prevAngle=c.angleAndHeight.startPosition.x):(Cartesian2.clone(e.distance.endPosition,c.distance.endPosition),Cartesian2.clone(e.angleAndHeight.endPosition,c.angleAndHeight.endPosition));for(var t=c.angleAndHeight.endPosition.x,o=c.prevAngle,s=2*Math.PI;t>=o+Math.PI;)t-=s;for(;t<o-Math.PI;)t+=s;c.angleAndHeight.endPosition.x=-t*i.clientWidth/12,c.angleAndHeight.startPosition.x=-o*i.clientWidth/12}}),ScreenSpaceEventType$1.PINCH_MOVE,t)}function listenToWheel(e,t){var i=getKey(CameraEventType$1.WHEEL,t),r=e._update;r[i]=!0;var n=e._movement[i];defined(n)||(n=e._movement[i]={}),n.startPosition=new Cartesian2,n.endPosition=new Cartesian2,e._eventHandler.setInputAction((function(e){e=15*CesiumMath.toRadians(e),r[i]?(Cartesian2.clone(Cartesian2.ZERO,n.startPosition),n.endPosition.x=0,n.endPosition.y=e,r[i]=!1):n.endPosition.y=n.endPosition.y+e}),ScreenSpaceEventType$1.WHEEL,t)}function listenMouseButtonDownUp(e,t,i){var r=getKey(i,t),n=e._isDown,a=e._eventStartPosition,o=e._pressTime,s=e._releaseTime;n[r]=!1,a[r]=new Cartesian2;var l,c,u=e._lastMovement[r];defined(u)||(u=e._lastMovement[r]={startPosition:new Cartesian2,endPosition:new Cartesian2,valid:!1}),i===CameraEventType$1.LEFT_DRAG?(l=ScreenSpaceEventType$1.LEFT_DOWN,c=ScreenSpaceEventType$1.LEFT_UP):i===CameraEventType$1.RIGHT_DRAG?(l=ScreenSpaceEventType$1.RIGHT_DOWN,c=ScreenSpaceEventType$1.RIGHT_UP):i===CameraEventType$1.MIDDLE_DRAG&&(l=ScreenSpaceEventType$1.MIDDLE_DOWN,c=ScreenSpaceEventType$1.MIDDLE_UP),e._eventHandler.setInputAction((function(t){e._buttonsDown++,u.valid=!1,n[r]=!0,o[r]=new Date,Cartesian2.clone(t.position,a[r])}),l,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),n[r]=!1,s[r]=new Date}),c,t)}function cloneMouseMovement(e,t){Cartesian2.clone(e.startPosition,t.startPosition),Cartesian2.clone(e.endPosition,t.endPosition)}function listenMouseMove(e,t){var i,r,n=e._update,a=e._movement,o=e._lastMovement,s=e._isDown;for(i in CameraEventType$1)!CameraEventType$1.hasOwnProperty(i)||defined(r=CameraEventType$1[i])&&(r=getKey(r,t),n[r]=!0,defined(e._lastMovement[r])||(e._lastMovement[r]={startPosition:new Cartesian2,endPosition:new Cartesian2,valid:!1}),defined(e._movement[r])||(e._movement[r]={startPosition:new Cartesian2,endPosition:new Cartesian2}));e._eventHandler.setInputAction((function(i){for(var r in CameraEventType$1){var l;!CameraEventType$1.hasOwnProperty(r)||defined(l=CameraEventType$1[r])&&(l=getKey(l,t),s[l]&&(n[l]?(cloneMouseMovement(a[l],o[l]),o[l].valid=!0,cloneMouseMovement(i,a[l]),n[l]=!1):Cartesian2.clone(i.endPosition,a[l].endPosition)))}Cartesian2.clone(i.endPosition,e._currentMousePosition)}),ScreenSpaceEventType$1.MOUSE_MOVE,t)}function CameraEventAggregator(e){for(var t in this._eventHandler=new ScreenSpaceEventHandler(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new Cartesian2,listenToWheel(this,void 0),listenToPinch(this,void 0,e),listenMouseButtonDownUp(this,void 0,CameraEventType$1.LEFT_DRAG),listenMouseButtonDownUp(this,void 0,CameraEventType$1.RIGHT_DRAG),listenMouseButtonDownUp(this,void 0,CameraEventType$1.MIDDLE_DRAG),listenMouseMove(this,void 0),KeyboardEventModifier$1){var i;!KeyboardEventModifier$1.hasOwnProperty(t)||defined(i=KeyboardEventModifier$1[t])&&(listenToWheel(this,i),listenToPinch(this,i,e),listenMouseButtonDownUp(this,i,CameraEventType$1.LEFT_DRAG),listenMouseButtonDownUp(this,i,CameraEventType$1.RIGHT_DRAG),listenMouseButtonDownUp(this,i,CameraEventType$1.MIDDLE_DRAG),listenMouseMove(this,i))}}function Cesium3DTileContent(e,t,i,r,n){this.featurePropertiesDirty=!1}function Cesium3DTilePassState(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}function ConditionsExpression(e,t){this._conditionsExpression=clone(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,setRuntime(this,t)}function Statement(e,t){this.condition=e,this.expression=t}function setRuntime(e,t){var i=[],r=e._conditions;if(defined(r)){for(var n=r.length,a=0;a<n;++a){var o=r[a],s=String(o[0]);o=String(o[1]);i.push(new Statement(new Expression(s,t),new Expression(o,t)))}e._runtimeConditions=i}}function Cesium3DTileStyle(e){this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,e="string"==typeof e||e instanceof Resource?Resource.createIfNeeded(e).fetchJson(e):when.resolve(e);var t=this;this._readyPromise=e.then((function(e){return setup(t,e),t}))}function setup(e,t){t=defaultValue(clone(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin;var i={};if(defined(t.meta)){var r,n=t.defines,a=defaultValue(t.meta,defaultValue.EMPTY_OBJECT);for(r in a)a.hasOwnProperty(r)&&(i[r]=new Expression(a[r],n))}e._meta=i,e._ready=!0}function getExpression(e,t){if(e=defaultValue(e._style,defaultValue.EMPTY_OBJECT).defines,defined(t))return"boolean"==typeof t||"number"==typeof t?new Expression(String(t)):"string"==typeof t?new Expression(t,e):defined(t.conditions)?new ConditionsExpression(t,e):t}function getJsonFromExpression(e){if(defined(e))return defined(e.expression)?e.expression:defined(e.conditionsExpression)?clone(e.conditionsExpression,!0):e}function CircleEmitter(e){e=defaultValue(e,1),this._radius=defaultValue(e,1)}Object.defineProperties(CameraEventAggregator.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){var e=!(this._update[getKey(CameraEventType$1.WHEEL)]&&this._update[getKey(CameraEventType$1.WHEEL,KeyboardEventModifier$1.SHIFT)]&&this._update[getKey(CameraEventType$1.WHEEL,KeyboardEventModifier$1.CTRL)]&&this._update[getKey(CameraEventType$1.WHEEL,KeyboardEventModifier$1.ALT)]);return 0<this._buttonsDown||e}}}),CameraEventAggregator.prototype.isMoving=function(e,t){return t=getKey(e,t),!this._update[t]},CameraEventAggregator.prototype.getMovement=function(e,t){return t=getKey(e,t),this._movement[t]},CameraEventAggregator.prototype.getLastMovement=function(e,t){if(t=getKey(e,t),(t=this._lastMovement[t]).valid)return t},CameraEventAggregator.prototype.isButtonDown=function(e,t){return t=getKey(e,t),this._isDown[t]},CameraEventAggregator.prototype.getStartMousePosition=function(e,t){return e===CameraEventType$1.WHEEL?this._currentMousePosition:(t=getKey(e,t),this._eventStartPosition[t])},CameraEventAggregator.prototype.getButtonPressTime=function(e,t){return t=getKey(e,t),this._pressTime[t]},CameraEventAggregator.prototype.getButtonReleaseTime=function(e,t){return t=getKey(e,t),this._releaseTime[t]},CameraEventAggregator.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},CameraEventAggregator.prototype.isDestroyed=function(){return!1},CameraEventAggregator.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),destroyObject(this)},Object.defineProperties(Cesium3DTileContent.prototype,{featuresLength:{get:function(){DeveloperError.throwInstantiationError()}},pointsLength:{get:function(){DeveloperError.throwInstantiationError()}},trianglesLength:{get:function(){DeveloperError.throwInstantiationError()}},geometryByteLength:{get:function(){DeveloperError.throwInstantiationError()}},texturesByteLength:{get:function(){DeveloperError.throwInstantiationError()}},batchTableByteLength:{get:function(){DeveloperError.throwInstantiationError()}},innerContents:{get:function(){DeveloperError.throwInstantiationError()}},readyPromise:{get:function(){DeveloperError.throwInstantiationError()}},tileset:{get:function(){DeveloperError.throwInstantiationError()}},tile:{get:function(){DeveloperError.throwInstantiationError()}},url:{get:function(){DeveloperError.throwInstantiationError()}},batchTable:{get:function(){DeveloperError.throwInstantiationError()}}}),Cesium3DTileContent.prototype.hasProperty=function(e,t){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.getFeature=function(e){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.applyDebugSettings=function(e,t){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.applyStyle=function(e){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.update=function(e,t){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.isDestroyed=function(){DeveloperError.throwInstantiationError()},Cesium3DTileContent.prototype.destroy=function(){DeveloperError.throwInstantiationError()},Object.defineProperties(ConditionsExpression.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}}),ConditionsExpression.prototype.evaluate=function(e,t){var i=this._runtimeConditions;if(defined(i))for(var r=i.length,n=0;n<r;++n){var a=i[n];if(a.condition.evaluate(e))return a.expression.evaluate(e,t)}},ConditionsExpression.prototype.evaluateColor=function(e,t){var i=this._runtimeConditions;if(defined(i))for(var r=i.length,n=0;n<r;++n){var a=i[n];if(a.condition.evaluate(e))return a.expression.evaluateColor(e,t)}},ConditionsExpression.prototype.getShaderFunction=function(e,t,i,r){var n=this._runtimeConditions;if(defined(n)&&0!==n.length){for(var a="",o=n.length,s=0;s<o;++s){var l=n[s];a+="    "+(0===s?"if":"else if")+" ("+l.condition.getShaderExpression(t,i)+") \n    { \n        return "+l.expression.getShaderExpression(t,i)+"; \n    } \n"}return r+" "+e+"() \n{ \n"+a+"    return "+r+"(1.0); \n} \n"}},Object.defineProperties(Cesium3DTileStyle.prototype,{style:{get:function(){return this._style}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},show:{get:function(){return this._show},set:function(e){this._show=getExpression(this,e),this._style.show=getJsonFromExpression(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=getExpression(this,e),this._style.color=getJsonFromExpression(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=getExpression(this,e),this._style.pointSize=getJsonFromExpression(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=getExpression(this,e),this._style.pointOutlineColor=getJsonFromExpression(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=getExpression(this,e),this._style.pointOutlineWidth=getJsonFromExpression(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=getExpression(this,e),this._style.labelColor=getJsonFromExpression(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=getExpression(this,e),this._style.labelOutlineColor=getJsonFromExpression(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=getExpression(this,e),this._style.labelOutlineWidth=getJsonFromExpression(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=getExpression(this,e),this._style.font=getJsonFromExpression(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=getExpression(this,e),this._style.labelStyle=getJsonFromExpression(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=getExpression(this,e),this._style.labelText=getJsonFromExpression(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=getExpression(this,e),this._style.backgroundColor=getJsonFromExpression(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=getExpression(this,e),this._style.backgroundPadding=getJsonFromExpression(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=getExpression(this,e),this._style.backgroundEnabled=getJsonFromExpression(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=getExpression(this,e),this._style.scaleByDistance=getJsonFromExpression(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=getExpression(this,e),this._style.translucencyByDistance=getJsonFromExpression(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=getExpression(this,e),this._style.distanceDisplayCondition=getJsonFromExpression(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=getExpression(this,e),this._style.heightOffset=getJsonFromExpression(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=getExpression(this,e),this._style.anchorLineEnabled=getJsonFromExpression(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=getExpression(this,e),this._style.anchorLineColor=getJsonFromExpression(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=getExpression(this,e),this._style.image=getJsonFromExpression(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=getExpression(this,e),this._style.disableDepthTestDistance=getJsonFromExpression(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=getExpression(this,e),this._style.horizontalOrigin=getJsonFromExpression(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=getExpression(this,e),this._style.verticalOrigin=getJsonFromExpression(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=getExpression(this,e),this._style.labelHorizontalOrigin=getJsonFromExpression(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=getExpression(this,e),this._style.labelVerticalOrigin=getJsonFromExpression(this._labelVerticalOrigin)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}}),Cesium3DTileStyle.prototype.getColorShaderFunction=function(e,t,i){return this._colorShaderFunctionReady?i.translucent=this._colorShaderTranslucent:(this._colorShaderFunctionReady=!0,this._colorShaderFunction=defined(this.color)?this.color.getShaderFunction(e,t,i,"vec4"):void 0,this._colorShaderTranslucent=i.translucent),this._colorShaderFunction},Cesium3DTileStyle.prototype.getShowShaderFunction=function(e,t,i){return this._showShaderFunctionReady||(this._showShaderFunctionReady=!0,this._showShaderFunction=defined(this.show)?this.show.getShaderFunction(e,t,i,"bool"):void 0),this._showShaderFunction},Cesium3DTileStyle.prototype.getPointSizeShaderFunction=function(e,t,i){return this._pointSizeShaderFunctionReady||(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=defined(this.pointSize)?this.pointSize.getShaderFunction(e,t,i,"float"):void 0),this._pointSizeShaderFunction},Object.defineProperties(CircleEmitter.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}}),CircleEmitter.prototype.emit=function(e){var t=CesiumMath.randomBetween(0,CesiumMath.TWO_PI),i=CesiumMath.randomBetween(0,this._radius),r=i*Math.cos(t);t=i*Math.sin(t);e.position=Cartesian3.fromElements(r,t,0,e.position),e.velocity=Cartesian3.clone(Cartesian3.UNIT_Z,e.velocity)};var defaultAngle=CesiumMath.toRadians(30);function ConeEmitter(e){this._angle=defaultValue(e,defaultAngle)}Object.defineProperties(ConeEmitter.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}}),ConeEmitter.prototype.emit=function(e){var t=Math.tan(this._angle),i=CesiumMath.randomBetween(0,CesiumMath.TWO_PI),r=CesiumMath.randomBetween(0,t);t=r*Math.cos(i),i=r*Math.sin(i);e.velocity=Cartesian3.fromElements(t,i,1,e.velocity),Cartesian3.normalize(e.velocity,e.velocity),e.position=Cartesian3.clone(Cartesian3.ZERO,e.position)};var mobileWidth=576,lightboxHeight=100,textColor="#ffffff",highlightColor="#48b";function contains$1(e,t){for(var i=e.length,r=0;r<i;r++){var n=e[r];if(Credit.equals(n,t))return 1}}function swapCesiumCredit(e){var t=e._previousCesiumCredit,i=e._currentCesiumCredit;Credit.equals(i,t)||(defined(t)&&e._cesiumCreditContainer.removeChild(t.element),defined(i)&&e._cesiumCreditContainer.appendChild(i.element),e._previousCesiumCredit=i)}var delimiterClassName="cesium-credit-delimiter",defaultCredit;function createDelimiterElement(e){var t=document.createElement("span");return t.textContent=e,t.className=delimiterClassName,t}function createCreditElement(e,t){return defined(t)&&((t=document.createElement(t))._creditId=e._creditId,t.appendChild(e),e=t),e}function displayCredits(e,t,i,r){for(var n=e.childNodes,a=-1,o=0;o<t.length;++o){var s,l,c=t[o];defined(c)&&(a=o,defined(i)&&(a*=2,0<o&&(s=a-1,n.length<=s?e.appendChild(createDelimiterElement(i)):(l=n[s]).className!==delimiterClassName&&e.replaceChild(createDelimiterElement(i),l))),s=c.element,n.length<=a?e.appendChild(createCreditElement(s,r)):(l=n[a])._creditId!==c._id&&e.replaceChild(createCreditElement(s,r),l))}for(++a;a<n.length;)e.removeChild(n[a])}function styleLightboxContainer(e){var t=e._lightboxCredits,i=e.viewport.clientWidth,r=e.viewport.clientHeight;i!==e._lastViewportWidth&&(i<mobileWidth?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=Math.floor(.5*(r-t.clientHeight))+"px"),e._lastViewportWidth=i),mobileWidth<=i&&r!==e._lastViewportHeight&&(t.style.marginTop=Math.floor(.5*(r-t.clientHeight))+"px",e._lastViewportHeight=r)}function addStyle(e,t){var i,r=e+" {";for(i in t)t.hasOwnProperty(i)&&(r+=i+": "+t[i]+"; ");return r+" }\n"}function appendCss(){var e="";e+=addStyle(".cesium-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),e+=addStyle(".cesium-credit-lightbox",{"background-color":"#303336",color:textColor,position:"relative","min-height":lightboxHeight+"px",margin:"auto"}),e+=addStyle(".cesium-credit-lightbox > ul > li a, .cesium-credit-lightbox > ul > li a:visited",{color:textColor}),e+=addStyle(".cesium-credit-lightbox > ul > li a:hover",{color:highlightColor}),e+=addStyle(".cesium-credit-lightbox.cesium-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),e+=addStyle(".cesium-credit-lightbox.cesium-credit-lightbox-mobile",{height:"100%",width:"100%"}),e+=addStyle(".cesium-credit-lightbox-title",{padding:"20px 20px 0 20px"}),e+=addStyle(".cesium-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:textColor}),e+=addStyle(".cesium-credit-lightbox-close:hover",{color:highlightColor}),e+=addStyle(".cesium-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),e+=addStyle(".cesium-credit-lightbox > ul > li",{"padding-bottom":"6px"}),e+=addStyle(".cesium-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),e+=addStyle(".cesium-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:textColor}),e+=addStyle(".cesium-credit-expand-link:hover",{color:highlightColor}),e+=addStyle(".cesium-credit-text",{color:textColor}),e+=addStyle(".cesium-credit-textContainer *, .cesium-credit-logoContainer *",{display:"inline"});var t=document.head,i=document.createElement("style");i.innerHTML=e,t.insertBefore(i,t.firstChild)}function CreditDisplay(e,t,i){var r=this;i=defaultValue(i,document.body);var n=document.createElement("div");n.className="cesium-credit-lightbox-overlay",i.appendChild(n);var a=document.createElement("div");function o(e){a.contains(e.target)||r.hideLightbox()}a.className="cesium-credit-lightbox",n.appendChild(a),n.addEventListener("click",o,!1);var s=document.createElement("div");s.className="cesium-credit-lightbox-title",s.textContent="Data provided by:",a.appendChild(s);var l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="&times;",l.className="cesium-credit-lightbox-close",a.appendChild(l);var c=document.createElement("ul");a.appendChild(c);var u=document.createElement("div");u.className="cesium-credit-logoContainer",u.style.display="inline",e.appendChild(u);var d=document.createElement("div");d.className="cesium-credit-textContainer",d.style.display="inline",e.appendChild(d),(s=document.createElement("a")).className="cesium-credit-expand-link",s.onclick=this.showLightbox.bind(this),s.textContent="Data attribution",e.appendChild(s),appendCss(),l=Credit.clone(CreditDisplay.cesiumCredit),this._delimiter=defaultValue(t," • "),this._screenContainer=d,this._cesiumCreditContainer=u,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=a,this._creditList=c,this._lightbox=n,this._hideLightbox=o,this._expandLink=s,this._expanded=!1,this._defaultCredits=[],this._cesiumCredit=l,this._previousCesiumCredit=void 0,this._currentCesiumCredit=l,this._currentFrameCredits={screenCredits:new AssociativeArray,lightboxCredits:new AssociativeArray},this._defaultCredit=void 0,this.viewport=i,this.container=e}function getDefaultCredit(){var e;return defined(defaultCredit)||(0!==(e=buildModuleUrl("Assets/Images/ion-credit.png")).indexOf("http://")&&0!==e.indexOf("https://")&&0!==e.indexOf("data:")&&(e=new URI(e).getPath()),defaultCredit=new Credit('<a href="https://cesium.com/" target="_blank"><img src="'+e+'" title="Cesium ion"/></a>',!0)),CreditDisplay._cesiumCreditInitialized||(CreditDisplay._cesiumCredit=defaultCredit,CreditDisplay._cesiumCreditInitialized=!0),defaultCredit}function DebugAppearance(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).attributeName;defined(n=e.perInstanceAttribute)||(n=!1);var i=defaultValue(e.glslDatatype,"vec3"),r="v_"+t;if("normal"===t||"tangent"===t||"bitangent"===t)a="vec4 getColor() { return vec4(("+r+" + vec3(1.0)) * 0.5, 1.0); }\n";else switch("st"===t&&(i="vec2"),i){case"float":a="vec4 getColor() { return vec4(vec3("+r+"), 1.0); }\n";break;case"vec2":a="vec4 getColor() { return vec4("+r+", 0.0, 1.0); }\n";break;case"vec3":a="vec4 getColor() { return vec4("+r+", 1.0); }\n";break;case"vec4":a="vec4 getColor() { return "+r+"; }\n"}var n="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n"+(n?"":"attribute "+i+" "+t+";\n")+"varying "+i+" "+r+";\nvoid main()\n{\nvec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);\n"+(n?r+" = czm_batchTable_"+t+"(batchId);\n":r+" = "+t+";\n")+"gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}",a="varying "+i+" "+r+";\n"+a+"\nvoid main()\n{\ngl_FragColor = getColor();\n}";this.material=void 0,this.translucent=defaultValue(e.translucent,!1),this._vertexShaderSource=defaultValue(e.vertexShaderSource,n),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,a),this._renderState=Appearance.getDefaultRenderState(!1,!1,e.renderState),this._closed=defaultValue(e.closed,!1),this._attributeName=t,this._glslDatatype=i}function DebugCameraPrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=defaultValue(e.color,Color.CYAN),this._updateOnChange=defaultValue(e.updateOnChange,!0),this.show=defaultValue(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}CreditDisplay.prototype.addCredit=function(e){if(e._isIon)return defined(this._defaultCredit)||(this._defaultCredit=Credit.clone(getDefaultCredit())),void(this._currentCesiumCredit=this._defaultCredit);(e.showOnScreen?this._currentFrameCredits.screenCredits:this._currentFrameCredits.lightboxCredits).set(e.id,e)},CreditDisplay.prototype.addDefaultCredit=function(e){var t=this._defaultCredits;contains$1(t,e)||t.push(e)},CreditDisplay.prototype.removeDefaultCredit=function(e){var t=this._defaultCredits;-1!==(e=t.indexOf(e))&&t.splice(e,1)},CreditDisplay.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},CreditDisplay.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},CreditDisplay.prototype.update=function(){this._expanded&&styleLightboxContainer(this)},CreditDisplay.prototype.beginFrame=function(){var e=this._currentFrameCredits,t=e.screenCredits;t.removeAll();for(var i=this._defaultCredits,r=0;r<i.length;++r){var n=i[r];t.set(n.id,n)}e.lightboxCredits.removeAll(),Credit.equals(CreditDisplay.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=Credit.clone(CreditDisplay.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit},CreditDisplay.prototype.endFrame=function(){var e=this._currentFrameCredits.screenCredits.values;displayCredits(this._screenContainer,e,this._delimiter,void 0),e=this._currentFrameCredits.lightboxCredits.values,this._expandLink.style.display=0<e.length?"inline":"none",displayCredits(this._creditList,e,void 0,"li"),swapCesiumCredit(this)},CreditDisplay.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),destroyObject(this)},CreditDisplay.prototype.isDestroyed=function(){return!1},CreditDisplay._cesiumCredit=void 0,CreditDisplay._cesiumCreditInitialized=!1,Object.defineProperties(CreditDisplay,{cesiumCredit:{get:function(){return getDefaultCredit(),CreditDisplay._cesiumCredit},set:function(e){CreditDisplay._cesiumCredit=e,CreditDisplay._cesiumCreditInitialized=!0}}}),Object.defineProperties(DebugAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}}),DebugAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,DebugAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,DebugAppearance.prototype.getRenderState=Appearance.prototype.getRenderState;var scratchRight$1=new Cartesian3,scratchRotation$2=new Matrix3,scratchOrientation=new Quaternion,scratchPerspective=new PerspectiveFrustum,scratchPerspectiveOffCenter=new PerspectiveOffCenterFrustum,scratchOrthographic=new OrthographicFrustum,scratchOrthographicOffCenter=new OrthographicOffCenterFrustum,scratchColor$k=new Color,scratchSplits=[1,1e5];function DebugInspector(){this._cachedShowFrustumsShaders={}}function getAttributeLocations$2(e){var t,i={},r=e.vertexAttributes;for(t in r)r.hasOwnProperty(t)&&(i[t]=r[t].index);return i}function createDebugShowFrustumsShaderProgram(e,t){var i=e.context,r=t,n=(e=r.fragmentShaderSource.clone(),[]);e.sources=e.sources.map((function(e){e=ShaderSource.replaceMain(e,"czm_Debug_main");for(var t,i=/gl_FragData\[(\d+)\]/g;null!==(t=i.exec(e));)-1===n.indexOf(t[1])&&n.push(t[1]);return e}));var a,o=n.length,s="";if(s+="uniform vec3 debugShowCommandsColor;\n",s+="uniform vec3 debugShowFrustumsColor;\n",s+="void main() \n{ \n    czm_Debug_main(); \n",0<o)for(a=0;a<o;++a)s+="    gl_FragData["+n[a]+"].rgb *= debugShowCommandsColor;\n",s+="    gl_FragData["+n[a]+"].rgb *= debugShowFrustumsColor;\n";else s+="    gl_FragColor.rgb *= debugShowCommandsColor;\n",s+="    gl_FragColor.rgb *= debugShowFrustumsColor;\n";return s+="}",e.sources.push(s),t=getAttributeLocations$2(r),ShaderProgram.fromCache({context:i,vertexShaderSource:r.vertexShaderSource,fragmentShaderSource:e,attributeLocations:t})}DebugCameraPrimitive.prototype.update=function(e){if(this.show){var t,i,r=this._planesPrimitives,n=this._outlinePrimitives;if(this._updateOnChange){for(i=r.length,t=0;t<i;++t)n[t]=n[t]&&n[t].destroy(),r[t]=r[t]&&r[t].destroy();r.length=0,n.length=0}if(0===r.length){var a=(d=(h=this._camera).frustum)instanceof PerspectiveFrustum?scratchPerspective:d instanceof PerspectiveOffCenterFrustum?scratchPerspectiveOffCenter:d instanceof OrthographicFrustum?scratchOrthographic:scratchOrthographicOffCenter;a=d.clone(a);var o=this._frustumSplits,s=!defined(o)||o.length<=1?((o=scratchSplits)[0]=this._camera.frustum.near,o[1]=this._camera.frustum.far,1):o.length-1,l=h.positionWC,c=h.directionWC,u=h.upWC,d=h.rightWC,h=(d=Cartesian3.negate(d,scratchRight$1),scratchRotation$2);Matrix3.setColumn(h,0,d,h),Matrix3.setColumn(h,1,u,h),Matrix3.setColumn(h,2,c,h);var p=Quaternion.fromRotationMatrix(h,scratchOrientation);for(r.length=n.length=s,t=0;t<s;++t)a.near=o[t],a.far=o[t+1],r[t]=new Primitive({geometryInstances:new GeometryInstance({geometry:new FrustumGeometry({origin:l,orientation:p,frustum:a,_drawNearPlane:0===t}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(Color.fromAlpha(this._color,.1,scratchColor$k))},id:this.id,pickPrimitive:this}),appearance:new PerInstanceColorAppearance({translucent:!0,flat:!0}),asynchronous:!1}),n[t]=new Primitive({geometryInstances:new GeometryInstance({geometry:new FrustumOutlineGeometry({origin:l,orientation:p,frustum:a,_drawNearPlane:0===t}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})}for(i=r.length,t=0;t<i;++t)n[t].update(e),r[t].update(e)}},DebugCameraPrimitive.prototype.isDestroyed=function(){return!1},DebugCameraPrimitive.prototype.destroy=function(){for(var e=this._planesPrimitives.length,t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return destroyObject(this)};var scratchFrustumColor=new Color;function createDebugShowFrustumsUniformMap(e,t){var i=defined(t.uniformMap)?t.uniformMap:{};return defined(i.debugShowCommandsColor)||defined(i.debugShowFrustumsColor)||(i.debugShowCommandsColor=function(){return e.debugShowCommands?(defined(t._debugColor)||(t._debugColor=Color.fromRandom()),t._debugColor):Color.WHITE},i.debugShowFrustumsColor=function(){return e.debugShowFrustums?(scratchFrustumColor.red=1&t.debugOverlappingFrustums?1:0,scratchFrustumColor.green=2&t.debugOverlappingFrustums?1:0,scratchFrustumColor.blue=4&t.debugOverlappingFrustums?1:0,scratchFrustumColor.alpha=1,scratchFrustumColor):Color.WHITE}),i}var scratchShowFrustumCommand=new DrawCommand;function DebugModelMatrixPrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.length=defaultValue(e.length,1e7),this._length=void 0,this.width=defaultValue(e.width,2),this._width=void 0,this.show=defaultValue(e.show,!0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=new Matrix4,this.id=e.id,this._id=void 0,this._primitive=void 0}DebugInspector.prototype.executeDebugShowFrustumsCommand=function(e,t,i){var r=t.shaderProgram.id,n=this._cachedShowFrustumsShaders[r];defined(n)||(n=createDebugShowFrustumsShaderProgram(e,t.shaderProgram),this._cachedShowFrustumsShaders[r]=n),(r=DrawCommand.shallowClone(t,scratchShowFrustumCommand)).shaderProgram=n,r.uniformMap=createDebugShowFrustumsUniformMap(e,t),r.execute(e.context,i)},DebugModelMatrixPrimitive.prototype.update=function(e){var t,i,r;this.show&&(defined(this._primitive)&&Matrix4.equals(this._modelMatrix,this.modelMatrix)&&this._length===this.length&&this._width===this.width&&this._id===this.id||(this._modelMatrix=Matrix4.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,defined(this._primitive)&&this._primitive.destroy(),0===this.modelMatrix[12]&&0===this.modelMatrix[13]&&0===this.modelMatrix[14]&&(this.modelMatrix[14]=.01),t=new GeometryInstance({geometry:new PolylineGeometry({positions:[Cartesian3.ZERO,Cartesian3.UNIT_X],width:this.width,vertexFormat:PolylineColorAppearance.VERTEX_FORMAT,colors:[Color.RED,Color.RED],arcType:ArcType$1.NONE}),modelMatrix:Matrix4.multiplyByUniformScale(this.modelMatrix,this.length,new Matrix4),id:this.id,pickPrimitive:this}),i=new GeometryInstance({geometry:new PolylineGeometry({positions:[Cartesian3.ZERO,Cartesian3.UNIT_Y],width:this.width,vertexFormat:PolylineColorAppearance.VERTEX_FORMAT,colors:[Color.GREEN,Color.GREEN],arcType:ArcType$1.NONE}),modelMatrix:Matrix4.multiplyByUniformScale(this.modelMatrix,this.length,new Matrix4),id:this.id,pickPrimitive:this}),r=new GeometryInstance({geometry:new PolylineGeometry({positions:[Cartesian3.ZERO,Cartesian3.UNIT_Z],width:this.width,vertexFormat:PolylineColorAppearance.VERTEX_FORMAT,colors:[Color.BLUE,Color.BLUE],arcType:ArcType$1.NONE}),modelMatrix:Matrix4.multiplyByUniformScale(this.modelMatrix,this.length,new Matrix4),id:this.id,pickPrimitive:this}),this._primitive=new Primitive({geometryInstances:[t,i,r],appearance:new PolylineColorAppearance,asynchronous:!1})),this._primitive.update(e))},DebugModelMatrixPrimitive.prototype.isDestroyed=function(){return!1},DebugModelMatrixPrimitive.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),destroyObject(this)};var DepthPlaneFS="varying vec4 positionEC;\nvoid main()\n{\nvec3 position;\nvec3 direction;\nif (czm_orthographicIn3D == 1.0)\n{\nvec2 uv = (gl_FragCoord.xy -  czm_viewport.xy) / czm_viewport.zw;\nvec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y);\nvec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x);\nposition = vec3(mix(minPlane, maxPlane, uv), 0.0);\ndirection = vec3(0.0, 0.0, -1.0);\n}\nelse\n{\nposition = vec3(0.0);\ndirection = normalize(positionEC.xyz);\n}\nczm_ray ray = czm_ray(position, direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nif (!czm_isEmpty(intersection))\n{\ngl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n}\nelse\n{\ndiscard;\n}\nczm_writeLogDepth();\n}\n",DepthPlaneVS="attribute vec4 position;\nvarying vec4 positionEC;\nvoid main()\n{\npositionEC = czm_modelView * position;\ngl_Position = czm_projection * positionEC;\nczm_vertexLogDepth();\n}\n";function DepthPlane(){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1}var depthQuadScratch=FeatureDetection.supportsTypedArrays()?new Float32Array(12):[],scratchCartesian1$7=new Cartesian3,scratchCartesian2$a=new Cartesian3,scratchCartesian3$d=new Cartesian3,scratchCartesian4$5=new Cartesian3,scratchCartesian5$2=new Cartesian3;function computeDepthQuad(e,t){var i,r,n=e.radii,a=t.camera;s=a.frustum instanceof OrthographicFrustum?(i=Cartesian3.ZERO,r=a.rightWC,a.upWC):(o=a.positionWC,t=Cartesian3.multiplyComponents(e.oneOverRadii,o,scratchCartesian1$7),a=Cartesian3.normalize(t,scratchCartesian2$a),e=Cartesian3.normalize(Cartesian3.cross(Cartesian3.UNIT_Z,t,scratchCartesian3$d),scratchCartesian3$d),s=Cartesian3.normalize(Cartesian3.cross(a,e,scratchCartesian4$5),scratchCartesian4$5),o=Cartesian3.magnitude(t),t=Math.sqrt(o*o-1),i=Cartesian3.multiplyByScalar(a,1/o,scratchCartesian1$7),o=t/o,r=Cartesian3.multiplyByScalar(e,o,scratchCartesian2$a),Cartesian3.multiplyByScalar(s,o,scratchCartesian3$d));var o=Cartesian3.add(i,s,scratchCartesian5$2);Cartesian3.subtract(o,r,o),Cartesian3.multiplyComponents(n,o,o),Cartesian3.pack(o,depthQuadScratch,0),o=Cartesian3.subtract(i,s,scratchCartesian5$2),Cartesian3.subtract(o,r,o),Cartesian3.multiplyComponents(n,o,o),Cartesian3.pack(o,depthQuadScratch,3),o=Cartesian3.add(i,s,scratchCartesian5$2),Cartesian3.add(o,r,o),Cartesian3.multiplyComponents(n,o,o),Cartesian3.pack(o,depthQuadScratch,6);var s=Cartesian3.subtract(i,s,scratchCartesian5$2);return Cartesian3.add(s,r,s),Cartesian3.multiplyComponents(n,s,s),Cartesian3.pack(s,depthQuadScratch,9),depthQuadScratch}function DerivedCommand(){}DepthPlane.prototype.update=function(e){var t,i,r,n,a;this._mode=e.mode,e.mode===SceneMode$1.SCENE3D&&(t=e.context,i=e.mapProjection.ellipsoid,r=e.useLogDepth,defined(this._command)||(this._rs=RenderState.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new DrawCommand({renderState:this._rs,boundingVolume:new BoundingSphere(Cartesian3.ZERO,i.maximumRadius),pass:Pass$1.OPAQUE,owner:this})),defined(this._sp)&&this._useLogDepth===r||(this._useLogDepth=r,n=new ShaderSource({sources:[DepthPlaneVS]}),a=new ShaderSource({sources:[DepthPlaneFS]}),r&&(a.sources.push("#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),a.defines.push("LOG_DEPTH"),n.defines.push("LOG_DEPTH")),this._sp=ShaderProgram.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:n,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp),e=computeDepthQuad(i,e),defined(this._va)?this._va.getAttribute(0).vertexBuffer.copyFromArrayView(e):(e=new Geometry({attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.FLOAT,componentsPerAttribute:3,values:e})},indices:[0,1,2,2,1,3],primitiveType:PrimitiveType$1.TRIANGLES}),this._va=VertexArray.fromGeometry({context:t,geometry:e,attributeLocations:{position:0},bufferUsage:BufferUsage$1.DYNAMIC_DRAW}),this._command.vertexArray=this._va))},DepthPlane.prototype.execute=function(e,t){this._mode===SceneMode$1.SCENE3D&&this._command.execute(e,t)},DepthPlane.prototype.isDestroyed=function(){return!1},DepthPlane.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var fragDepthRegex=/\bgl_FragDepthEXT\b/,discardRegex=/\bdiscard\b/;function getDepthOnlyShaderProgram(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(!defined(i)){for(var r=t._attributeLocations,n=t.fragmentShaderSource,a=!1,o=n.sources,s=o.length,l=0;l<s;++l)if(fragDepthRegex.test(o[l])||discardRegex.test(o[l])){a=!0;break}var c=!1,u=n.defines;s=u.length;for(l=0;l<s;++l)if("LOG_DEPTH"===u[l]){c=!0;break}a||c?!a&&c&&(n=new ShaderSource({defines:["LOG_DEPTH"],sources:["#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\nvoid main() \n{ \n    gl_FragColor = vec4(1.0); \n    czm_writeLogDepth(); \n} \n"]})):n=new ShaderSource({sources:["void main() \n{ \n    gl_FragColor = vec4(1.0); \n} \n"]}),i=e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:r})}return i}function getDepthOnlyRenderState(e,t){var i=e._depthOnlyRenderStateCache,r=i[t.id];return defined(r)||((e=RenderState.getState(t)).depthMask=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1},r=RenderState.fromCache(e),i[t.id]=r),r}DerivedCommand.createDepthOnlyDerivedCommand=function(e,t,i,r){var n,a;return defined(r)||(r={}),defined(r.depthOnlyCommand)&&(n=r.depthOnlyCommand.shaderProgram,a=r.depthOnlyCommand.renderState),r.depthOnlyCommand=DrawCommand.shallowClone(t,r.depthOnlyCommand),defined(n)&&r.shaderProgramId===t.shaderProgram.id?(r.depthOnlyCommand.shaderProgram=n,r.depthOnlyCommand.renderState=a):(r.depthOnlyCommand.shaderProgram=getDepthOnlyShaderProgram(i,t.shaderProgram),r.depthOnlyCommand.renderState=getDepthOnlyRenderState(e,t.renderState),r.shaderProgramId=t.shaderProgram.id),r};var writeLogDepthRegex=/\s+czm_writeLogDepth\(/,vertexlogDepthRegex=/\s+czm_vertexLogDepth\(/,extensionRegex=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;function getLogDepthShaderProgram(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(!defined(i)){var r=t._attributeLocations,n=t.vertexShaderSource.clone(),a=t.fragmentShaderSource.clone();n.defines=defined(n.defines)?n.defines.slice(0):[],n.defines.push("LOG_DEPTH"),a.defines=defined(a.defines)?a.defines.slice(0):[],a.defines.push("LOG_DEPTH");for(var o=!1,s=n.sources,l=s.length,c=0;c<l;++c)if(vertexlogDepthRegex.test(s[c])){o=!0;break}if(!o){for(c=0;c<l;++c)s[c]=ShaderSource.replaceMain(s[c],"czm_log_depth_main");s.push("\n\nvoid main() \n{ \n    czm_log_depth_main(); \n    czm_vertexLogDepth(); \n} \n")}for(l=(s=a.sources).length,o=!1,c=0;c<l;++c)writeLogDepthRegex.test(s[c])&&(o=!0);-1!==a.defines.indexOf("LOG_DEPTH_WRITE")&&(o=!0);var u=!0;for(c=0;c<l;++c)extensionRegex.test(s[c])&&(u=!1);var d="";if(u&&(d+="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),!o){for(c=0;c<l;c++)s[c]=ShaderSource.replaceMain(s[c],"czm_log_depth_main");d+="\nvoid main() \n{ \n    czm_log_depth_main(); \n    czm_writeLogDepth(); \n} \n"}s.push(d),i=e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:n,fragmentShaderSource:a,attributeLocations:r})}return i}function getPickShaderProgram(e,t,i){var r=e.shaderCache.getDerivedShaderProgram(t,"pick");if(!defined(r)){for(var n=t._attributeLocations,a=t.fragmentShaderSource,o=a.sources,s=o.length,l=(i="void main() \n{ \n    czm_non_pick_main(); \n    if (gl_FragColor.a == 0.0) { \n        discard; \n    } \n    gl_FragColor = "+i+"; \n} \n",new Array(s+1)),c=0;c<s;++c)l[c]=ShaderSource.replaceMain(o[c],"czm_non_pick_main");l[s]=i,a=new ShaderSource({sources:l,defines:a.defines}),r=e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:n})}return r}function getPickRenderState(e,t){var i=e.picking.pickRenderStateCache,r=i[t.id];return defined(r)||((e=RenderState.getState(t)).blending.enabled=!1,e.depthMask=!0,r=RenderState.fromCache(e),i[t.id]=r),r}function getHdrShaderProgram(e,t){var i,r,n,a=e.shaderCache.getDerivedShaderProgram(t,"HDR");return defined(a)||(i=t._attributeLocations,r=t.vertexShaderSource.clone(),n=t.fragmentShaderSource.clone(),r.defines=defined(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),n.defines=defined(n.defines)?n.defines.slice(0):[],n.defines.push("HDR"),a=e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:r,fragmentShaderSource:n,attributeLocations:i})),a}function DeviceOrientationCameraController(e){this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var t=this;function i(e){var i=e.alpha;if(!defined(i))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=CesiumMath.toRadians(i),t._beta=CesiumMath.toRadians(e.beta),t._gamma=CesiumMath.toRadians(e.gamma)}window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}DerivedCommand.createLogDepthCommand=function(e,t,i){var r;return defined(i)||(i={}),defined(i.command)&&(r=i.command.shaderProgram),i.command=DrawCommand.shallowClone(e,i.command),defined(r)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=r:(i.command.shaderProgram=getLogDepthShaderProgram(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i},DerivedCommand.createPickDerivedCommand=function(e,t,i,r){var n,a;return defined(r)||(r={}),defined(r.pickCommand)&&(n=r.pickCommand.shaderProgram,a=r.pickCommand.renderState),r.pickCommand=DrawCommand.shallowClone(t,r.pickCommand),defined(n)&&r.shaderProgramId===t.shaderProgram.id?(r.pickCommand.shaderProgram=n,r.pickCommand.renderState=a):(r.pickCommand.shaderProgram=getPickShaderProgram(i,t.shaderProgram,t.pickId),r.pickCommand.renderState=getPickRenderState(e,t.renderState),r.shaderProgramId=t.shaderProgram.id),r},DerivedCommand.createHdrCommand=function(e,t,i){var r;return defined(i)||(i={}),defined(i.command)&&(r=i.command.shaderProgram),i.command=DrawCommand.shallowClone(e,i.command),defined(r)&&i.shaderProgramId===e.shaderProgram.id?i.command.shaderProgram=r:(i.command.shaderProgram=getHdrShaderProgram(t,e.shaderProgram),i.shaderProgramId=e.shaderProgram.id),i};var scratchQuaternion1=new Quaternion,scratchQuaternion2=new Quaternion,scratchMatrix3$1=new Matrix3;function rotate(e,t,i,r){var n=e.direction,a=e.right;e=e.up,i=Quaternion.fromAxisAngle(n,i,scratchQuaternion2),r=Quaternion.fromAxisAngle(a,r,scratchQuaternion1),r=Quaternion.multiply(r,i,r),t=Quaternion.fromAxisAngle(e,t,scratchQuaternion2);Quaternion.multiply(t,r,r),r=Matrix3.fromQuaternion(r,scratchMatrix3$1),Matrix3.multiplyByVector(r,a,a),Matrix3.multiplyByVector(r,e,e),Matrix3.multiplyByVector(r,n,n)}function DirectionalLight(e){this.direction=Cartesian3.clone(e.direction),this.color=Color.clone(defaultValue(e.color,Color.WHITE)),this.intensity=defaultValue(e.intensity,1)}DeviceOrientationCameraController.prototype.update=function(){var e,t,i;defined(this._alpha)&&(defined(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma),e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,i=this._lastGamma-this._gamma,rotate(this._scene.camera,-e,t,i),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma)},DeviceOrientationCameraController.prototype.isDestroyed=function(){return!1},DeviceOrientationCameraController.prototype.destroy=function(){return this._removeListener(),destroyObject(this)};var EllipsoidFS="#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\nuniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\nvarying vec3 v_positionEC;\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\nvec3 positionEC = czm_pointAlongRay(ray, intersection);\nvec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\nvec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\nvec3 sphericalNormal = normalize(positionMC / u_radii);\nvec3 normalMC = geodeticNormal * side;\nvec3 normalEC = normalize(czm_normal * normalMC);\nvec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\nvec3 positionToEyeEC = -positionEC;\nczm_materialInput materialInput;\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = (positionMC + u_radii) / u_radii;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef ONLY_SUN_LIGHTING\nreturn czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);\n#else\nreturn czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\nvoid main()\n{\nfloat maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\nvec3 direction = normalize(v_positionEC);\nvec3 ellipsoidCenter = czm_modelView[3].xyz;\nfloat t1 = -1.0;\nfloat t2 = -1.0;\nfloat b = -2.0 * dot(direction, ellipsoidCenter);\nfloat c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\nfloat discriminant = b * b - 4.0 * c;\nif (discriminant >= 0.0) {\nt1 = (-b - sqrt(discriminant)) * 0.5;\nt2 = (-b + sqrt(discriminant)) * 0.5;\n}\nif (t1 < 0.0 && t2 < 0.0) {\ndiscard;\n}\nfloat t = min(t1, t2);\nif (t < 0.0) {\nt = 0.0;\n}\nczm_ray ray = czm_ray(t * direction, direction);\nvec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\nif (czm_isEmpty(intersection))\n{\ndiscard;\n}\nvec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\nvec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\ngl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\ngl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\nt = (intersection.start != 0.0) ? intersection.start : intersection.stop;\nvec3 positionEC = czm_pointAlongRay(ray, t);\nvec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\nczm_writeLogDepth(1.0 + positionCC.w);\n#else\nfloat z = positionCC.z / positionCC.w;\nfloat n = czm_depthRange.near;\nfloat f = czm_depthRange.far;\ngl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n#endif\n}\n",EllipsoidVS="attribute vec3 position;\nuniform vec3 u_radii;\nvarying vec3 v_positionEC;\nvoid main()\n{\nvec4 p = vec4(u_radii * position, 1.0);\nv_positionEC = (czm_modelView * p).xyz;\ngl_Position = czm_modelViewProjection * p;\ngl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\nczm_vertexLogDepth();\n}\n",attributeLocations$4={position:0};function EllipsoidPrimitive(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.center=Cartesian3.clone(defaultValue(e.center,Cartesian3.ZERO)),this._center=new Cartesian3,this.radii=Cartesian3.clone(e.radii),this._radii=new Cartesian3,this._oneOverEllipsoidRadiiSquared=new Cartesian3,this._boundingSphere=new BoundingSphere,this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._modelMatrix=new Matrix4,this._computedModelMatrix=new Matrix4,this.show=defaultValue(e.show,!0),this.material=defaultValue(e.material,Material.fromType(Material.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=defaultValue(e.debugShowBoundingVolume,!1),this.onlySunLighting=defaultValue(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=defaultValue(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new DrawCommand({owner:defaultValue(e._owner,this)}),this._pickCommand=new DrawCommand({owner:defaultValue(e._owner,this),pickOnly:!0});var t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function getVertexArray(e){if(defined(i=e.cache.ellipsoidPrimitive_vertexArray))return i;var t=BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2),vertexFormat:VertexFormat.POSITION_ONLY})),i=VertexArray.fromGeometry({context:e,geometry:t,attributeLocations:attributeLocations$4,bufferUsage:BufferUsage$1.STATIC_DRAW,interleave:!0});return e.cache.ellipsoidPrimitive_vertexArray=i}var logDepthExtension="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n";EllipsoidPrimitive.prototype.update=function(e){var t,i,r,n,a,o,s,l,c;this.show&&e.mode===SceneMode$1.SCENE3D&&defined(this.center)&&defined(this.radii)&&(t=e.context,i=this.material.isTranslucent(),c=this._translucent!==i,defined(this._rs)&&!c||(this._translucent=i,this._rs=RenderState.fromCache({cull:{enabled:!0,face:CullFace$1.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!i&&t.fragmentDepth,blending:i?BlendingState$1.ALPHA_BLEND:void 0})),defined(this._va)||(this._va=getVertexArray(t)),o=!1,a=this.radii,Cartesian3.equals(this._radii,a)||(Cartesian3.clone(a,this._radii),(n=this._oneOverEllipsoidRadiiSquared).x=1/(a.x*a.x),n.y=1/(a.y*a.y),n.z=1/(a.z*a.z),o=!0),Matrix4.equals(this.modelMatrix,this._modelMatrix)&&Cartesian3.equals(this.center,this._center)||(Matrix4.clone(this.modelMatrix,this._modelMatrix),Cartesian3.clone(this.center,this._center),Matrix4.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(Cartesian3.clone(Cartesian3.ZERO,this._boundingSphere.center),this._boundingSphere.radius=Cartesian3.maximumComponent(a),BoundingSphere.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere)),r=this._material!==this.material,this._material=this.material,this._material.update(t),n=this.onlySunLighting!==this._onlySunLighting,this._onlySunLighting=this.onlySunLighting,o=e.useLogDepth,a=this._useLogDepth!==o,this._useLogDepth=o,o=this._colorCommand,(r||n||c||a)&&(s=new ShaderSource({sources:[EllipsoidVS]}),l=new ShaderSource({sources:[this.material.shaderSource,EllipsoidFS]}),this.onlySunLighting&&l.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&l.defines.push("WRITE_DEPTH"),this._useLogDepth&&(s.defines.push("LOG_DEPTH"),l.defines.push("LOG_DEPTH"),l.sources.push(logDepthExtension)),this._sp=ShaderProgram.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:attributeLocations$4}),o.vertexArray=this._va,o.renderState=this._rs,o.shaderProgram=this._sp,o.uniformMap=combine(this._uniforms,this.material._uniforms),o.executeInClosestFrustum=i),c=e.commandList,(e=e.passes).render&&(o.boundingVolume=this._boundingSphere,o.debugShowBoundingVolume=this.debugShowBoundingVolume,o.modelMatrix=this._computedModelMatrix,o.pass=i?Pass$1.TRANSLUCENT:Pass$1.OPAQUE,c.push(o)),e.pick&&(e=this._pickCommand,defined(this._pickId)&&this._id===this.id||(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(r||n||!defined(this._pickSP)||a)&&(s=new ShaderSource({sources:[EllipsoidVS]}),l=new ShaderSource({sources:[this.material.shaderSource,EllipsoidFS],pickColorQualifier:"uniform"}),this.onlySunLighting&&l.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&l.defines.push("WRITE_DEPTH"),this._useLogDepth&&(s.defines.push("LOG_DEPTH"),l.defines.push("LOG_DEPTH"),l.sources.push(logDepthExtension)),this._pickSP=ShaderProgram.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:attributeLocations$4}),e.vertexArray=this._va,e.renderState=this._rs,e.shaderProgram=this._pickSP,e.uniformMap=combine(combine(this._uniforms,this._pickUniforms),this.material._uniforms),e.executeInClosestFrustum=i),e.boundingVolume=this._boundingSphere,e.modelMatrix=this._computedModelMatrix,e.pass=i?Pass$1.TRANSLUCENT:Pass$1.OPAQUE,c.push(e)))},EllipsoidPrimitive.prototype.isDestroyed=function(){return!1},EllipsoidPrimitive.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),destroyObject(this)};var EllipsoidSurfaceAppearanceFS="varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nczm_materialInput materialInput;\nvec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\nnormalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\nmaterialInput.s = v_st.s;\nmaterialInput.st = v_st;\nmaterialInput.str = vec3(v_st, 0.0);\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\nvec3 positionToEyeEC = -v_positionEC;\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef FLAT\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\ngl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n",EllipsoidSurfaceAppearanceVS="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\nattribute float batchId;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\nvoid main()\n{\nvec4 p = czm_computePosition();\nv_positionMC = position3DHigh + position3DLow;\nv_positionEC = (czm_modelViewRelativeToEye * p).xyz;\nv_st = st;\ngl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n";function EllipsoidSurfaceAppearance(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=defaultValue(e.translucent,!0),i=defaultValue(e.aboveGround,!1);this.material=defined(e.material)?e.material:Material.fromType(Material.ColorType),this.translucent=defaultValue(e.translucent,!0),this._vertexShaderSource=defaultValue(e.vertexShaderSource,EllipsoidSurfaceAppearanceVS),this._fragmentShaderSource=defaultValue(e.fragmentShaderSource,EllipsoidSurfaceAppearanceFS),this._renderState=Appearance.getDefaultRenderState(t,!i,e.renderState),this._closed=!1,this._flat=defaultValue(e.flat,!1),this._faceForward=defaultValue(e.faceForward,i),this._aboveGround=i}function Fog(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(EllipsoidSurfaceAppearance.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return EllipsoidSurfaceAppearance.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}}),EllipsoidSurfaceAppearance.VERTEX_FORMAT=VertexFormat.POSITION_AND_ST,EllipsoidSurfaceAppearance.prototype.getFragmentShaderSource=Appearance.prototype.getFragmentShaderSource,EllipsoidSurfaceAppearance.prototype.isTranslucent=Appearance.prototype.isTranslucent,EllipsoidSurfaceAppearance.prototype.getRenderState=Appearance.prototype.getRenderState;for(var heightsTable=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],densityTable=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7],i$3=0;i$3<densityTable.length;++i$3)densityTable[i$3]*=1e6;for(var tableStartDensity=densityTable[1],tableEndDensity=densityTable[densityTable.length-1],j=0;j<densityTable.length;++j)densityTable[j]=(densityTable[j]-tableEndDensity)/(tableStartDensity-tableEndDensity);var tableLastIndex=0;function findInterval(e){var t,i=heightsTable,r=i.length;if(e<i[0])return tableLastIndex=0;if(e>i[r-1])return tableLastIndex=r-2;if(e>=i[tableLastIndex]){if(tableLastIndex+1<r&&e<i[tableLastIndex+1])return tableLastIndex;if(tableLastIndex+2<r&&e<i[tableLastIndex+2])return++tableLastIndex}else if(0<=tableLastIndex-1&&e>=i[tableLastIndex-1])return--tableLastIndex;for(t=0;t<r-2&&!(e>=i[t]&&e<i[t+1]);++t);return tableLastIndex=t}var scratchPositionNormal$1=new Cartesian3;function FrameRateMonitor(e){this._scene=e.scene,this.samplingWindow=defaultValue(e.samplingWindow,FrameRateMonitor.defaultSettings.samplingWindow),this.quietPeriod=defaultValue(e.quietPeriod,FrameRateMonitor.defaultSettings.quietPeriod),this.warmupPeriod=defaultValue(e.warmupPeriod,FrameRateMonitor.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=defaultValue(e.minimumFrameRateDuringWarmup,FrameRateMonitor.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=defaultValue(e.minimumFrameRateAfterWarmup,FrameRateMonitor.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new Event,this._nominalFrameRate=new Event,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;var t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener((function(e,i){update$5(t)})),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var i=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;function r(){visibilityChanged(t)}this._visibilityChangeRemoveListener=void 0,defined(i)&&(document.addEventListener(i,r,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(i,r,!1)})}function update$5(e,t){if(!(0<e._pauseCount)){var i=getTimestamp$1();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/TimeConstants$1.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/TimeConstants$1.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var r=i-e.samplingWindow/TimeConstants$1.SECONDS_PER_MILLISECOND;if(2<=e._frameTimes.length&&e._frameTimes[0]<=r){for(;2<=e._frameTimes.length&&e._frameTimes[1]<r;)e._frameTimes.shift();var n=(i-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/n,1e3/(i>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup)<n?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}}function visibilityChanged(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}function FrameState(e,t,i){this.context=e,this.commandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=SceneMode$1.SCENE3D,this.morphTime=SceneMode$1.getMorphTime(SceneMode$1.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=i,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.imagerySplitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0}function FrustumCommands(e,t){this.near=defaultValue(e,0),this.far=defaultValue(t,0);for(var i=Pass$1.NUMBER_OF_PASSES,r=new Array(i),n=new Array(i),a=0;a<i;++a)r[a]=[],n[a]=0;this.commands=r,this.indices=n}function GetFeatureInfoFormat(e,t,i){this.type=e,defined(t)||("json"===e?t="application/json":"xml"===e?t="text/xml":"html"===e?t="text/html":"text"===e&&(t="text/plain")),this.format=t,defined(i)||("json"===e?i=geoJsonToFeatureInfo:"xml"===e?i=xmlToFeatureInfo:"html"!==e&&"text"!==e||(i=textToFeatureInfo)),this.callback=i}function geoJsonToFeatureInfo(e){for(var t=[],i=e.features,r=0;r<i.length;++r){var n,a=i[r],o=new ImageryLayerFeatureInfo;o.data=a,o.properties=a.properties,o.configureNameFromProperties(a.properties),o.configureDescriptionFromProperties(a.properties),defined(a.geometry)&&"Point"===a.geometry.type&&(n=a.geometry.coordinates[0],a=a.geometry.coordinates[1],o.position=Cartographic.fromDegrees(n,a)),t.push(o)}return t}Fog.prototype.update=function(e){var t,i,r;(e.fog.enabled=this.enabled)&&(!defined(i=(t=e.camera).positionCartographic)||8e5<i.height||e.mode!==SceneMode$1.SCENE3D?e.fog.enabled=!1:(i=findInterval(r=i.height),r=CesiumMath.clamp((r-heightsTable[i])/(heightsTable[i+1]-heightsTable[i]),0,1),i=(i=CesiumMath.lerp(densityTable[i],densityTable[i+1],r))*((r=1e6*this.density)-r/tableStartDensity*tableEndDensity)*1e-6,r=Cartesian3.normalize(t.positionWC,scratchPositionNormal$1),i*=1-Math.abs(Cartesian3.dot(t.directionWC,r)),e.fog.density=i,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness))},FrameRateMonitor.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},FrameRateMonitor.fromScene=function(e){return defined(e._frameRateMonitor)&&!e._frameRateMonitor.isDestroyed()||(e._frameRateMonitor=new FrameRateMonitor({scene:e})),e._frameRateMonitor},Object.defineProperties(FrameRateMonitor.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),FrameRateMonitor.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},FrameRateMonitor.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},FrameRateMonitor.prototype.isDestroyed=function(){return!1},FrameRateMonitor.prototype.destroy=function(){return this._preUpdateRemoveListener(),defined(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),destroyObject(this)};var mapInfoMxpNamespace="http://www.mapinfo.com/mxp",esriWmsNamespace="http://www.esri.com/wms",wfsNamespace="http://www.opengis.net/wfs",gmlNamespace="http://www.opengis.net/gml";function xmlToFeatureInfo(e){var t=e.documentElement;if("MultiFeatureCollection"===t.localName&&t.namespaceURI===mapInfoMxpNamespace)return mapInfoXmlToFeatureInfo(e);if("FeatureInfoResponse"===t.localName&&t.namespaceURI===esriWmsNamespace)return esriXmlToFeatureInfo(e);if("FeatureCollection"===t.localName&&t.namespaceURI===wfsNamespace)return gmlToFeatureInfo(e);if("ServiceExceptionReport"===t.localName)throw new RuntimeError((new XMLSerializer).serializeToString(t));return("msGMLOutput"===t.localName?msGmlToFeatureInfo:unknownXmlToFeatureInfo)(e)}function mapInfoXmlToFeatureInfo(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(mapInfoMxpNamespace,"Feature"),r=0;r<i.length;++r){for(var n=i[r],a={},o=n.getElementsByTagNameNS(mapInfoMxpNamespace,"Val"),s=0;s<o.length;++s){var l,c=o[s];c.hasAttribute("ref")&&(l=c.getAttribute("ref"),c=c.textContent.trim(),a[l]=c)}var u=new ImageryLayerFeatureInfo;u.data=n,u.properties=a,u.configureNameFromProperties(a),u.configureDescriptionFromProperties(a),t.push(u)}return t}function esriXmlToFeatureInfo(e){var t=[],i=(e=e.documentElement).getElementsByTagNameNS("*","FIELDS");if(0<i.length)for(var r=0;r<i.length;++r){for(var n=i[r],a={},o=n.attributes,s=0;s<o.length;++s){var l=o[s];a[l.name]=l.value}t.push(imageryLayerFeatureInfoFromDataAndProperties(n,a))}else for(var c=e.getElementsByTagNameNS("*","FeatureInfo"),u=0;u<c.length;++u){var d=c[u];a={};for(var h=d.childNodes,p=0;p<h.length;++p){var f=h[p];f.nodeType===Node.ELEMENT_NODE&&(a[f.localName]=f.textContent)}t.push(imageryLayerFeatureInfoFromDataAndProperties(d,a))}return t}function gmlToFeatureInfo(e){for(var t=[],i=e.documentElement.getElementsByTagNameNS(gmlNamespace,"featureMember"),r=0;r<i.length;++r){var n=i[r],a={};getGmlPropertiesRecursively(n,a),t.push(imageryLayerFeatureInfoFromDataAndProperties(n,a))}return t}function msGmlToFeatureInfo(e){for(var t,i=[],r=e.documentElement.childNodes,n=0;n<r.length;n++)if(r[n].nodeType===Node.ELEMENT_NODE){t=r[n];break}if(!defined(t))throw new RuntimeError("Unable to find first child of the feature info xml document");for(var a=t.childNodes,o=0;o<a.length;++o){var s,l=a[o];l.nodeType===Node.ELEMENT_NODE&&(getGmlPropertiesRecursively(l,s={}),i.push(imageryLayerFeatureInfoFromDataAndProperties(l,s)))}return i}function getGmlPropertiesRecursively(e,t){for(var i=!0,r=0;r<e.childNodes.length;++r){var n=e.childNodes[r];n.nodeType===Node.ELEMENT_NODE&&(i=!1),"Point"!==n.localName&&"LineString"!==n.localName&&"Polygon"!==n.localName&&"boundedBy"!==n.localName&&n.hasChildNodes()&&getGmlPropertiesRecursively(n,t)&&(t[n.localName]=n.textContent)}return i}function imageryLayerFeatureInfoFromDataAndProperties(e,t){var i=new ImageryLayerFeatureInfo;return i.data=e,i.properties=t,i.configureNameFromProperties(t),i.configureDescriptionFromProperties(t),i}function unknownXmlToFeatureInfo(e){var t=(new XMLSerializer).serializeToString(e),i=document.createElement("div"),r=document.createElement("pre");return r.textContent=t,i.appendChild(r),(r=new ImageryLayerFeatureInfo).data=e,r.description=i.innerHTML,[r]}var emptyBodyRegex=/<body>\s*<\/body>/im,wmsServiceExceptionReportRegex=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,titleRegex=/<title>([\s\S]*)<\/title>/im;function textToFeatureInfo(e){if(!emptyBodyRegex.test(e)&&!wmsServiceExceptionReportRegex.test(e)){var t,i=titleRegex.exec(e);return i&&1<i.length&&(t=i[1]),(i=new ImageryLayerFeatureInfo).name=t,i.description=e,i.data=e,[i]}}var GlobeFS="uniform vec4 u_initialColor;\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_DAY_NIGHT_ALPHA\nuniform float u_dayTextureNightAlpha[TEXTURE_UNITS];\nuniform float u_dayTextureDayAlpha[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SPLIT\nuniform float u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_COLOR_TO_ALPHA\nuniform vec4 u_colorsToAlpha[TEXTURE_UNITS];\n#endif\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n#endif\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nuniform highp sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n#if defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\n#ifdef HIGHLIGHT_FILL_TILE\nuniform vec4 u_fillHighlightColor;\n#endif\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\nuniform vec4 u_translucencyRectangle;\n#endif\n#ifdef UNDERGROUND_COLOR\nuniform vec4 u_undergroundColor;\nuniform vec4 u_undergroundColorAlphaByDistance;\n#endif\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef APPLY_MATERIAL\nvarying float v_height;\nvarying float v_slope;\nvarying float v_aspect;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvarying vec3 v_fogRayleighColor;\nvarying vec3 v_fogMieColor;\n#endif\n#ifdef GROUND_ATMOSPHERE\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\n#endif\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\nfloat startDistance = nearFarScalar.x;\nfloat startValue = nearFarScalar.y;\nfloat endDistance = nearFarScalar.z;\nfloat endValue = nearFarScalar.w;\nfloat t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\nreturn mix(startValue, endValue, t);\n}\n#endif\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\nreturn sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\n#ifdef TRANSLUCENT\nbool inTranslucencyRectangle()\n{\nreturn\nv_textureCoordinates.x > u_translucencyRectangle.x &&\nv_textureCoordinates.x < u_translucencyRectangle.z &&\nv_textureCoordinates.y > u_translucencyRectangle.y &&\nv_textureCoordinates.y < u_translucencyRectangle.w;\n}\n#endif\nvec4 sampleAndBlend(\nvec4 previousColor,\nsampler2D textureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale,\nfloat textureAlpha,\nfloat textureNightAlpha,\nfloat textureDayAlpha,\nfloat textureBrightness,\nfloat textureContrast,\nfloat textureHue,\nfloat textureSaturation,\nfloat textureOneOverGamma,\nfloat split,\nvec4 colorToAlpha,\nfloat nightBlend)\n{\nvec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\ntextureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);\n#endif\nvec2 translation = textureCoordinateTranslationAndScale.xy;\nvec2 scale = textureCoordinateTranslationAndScale.zw;\nvec2 textureCoordinates = tileTextureCoordinates * scale + translation;\nvec4 value = texture2D(textureToSample, textureCoordinates);\nvec3 color = value.rgb;\nfloat alpha = value.a;\n#ifdef APPLY_COLOR_TO_ALPHA\nvec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);\ncolorDiff.r = max(max(colorDiff.r, colorDiff.g), colorDiff.b);\nalpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);\n#endif\n#if !defined(APPLY_GAMMA)\nvec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nfloat splitPosition = czm_imagerySplitPosition;\nif (split < 0.0 && gl_FragCoord.x > splitPosition) {\nalpha = 0.0;\n}\nelse if (split > 0.0 && gl_FragCoord.x < splitPosition) {\nalpha = 0.0;\n}\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\noutAlpha += sign(outAlpha) - 1.0;\nvec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\nreturn vec4(outColor, max(outAlpha, 0.0));\n}\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\nrgb = czm_HSBToRGB(hsb);\n#endif\nreturn rgb;\n}\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\n#ifdef GROUND_ATMOSPHERE\nvec3 computeGroundAtmosphereColor(vec3 fogColor, vec4 finalColor, vec3 atmosphereLightDirection, float cameraDist);\n#endif\nconst float fExposure = 2.0;\nvoid main()\n{\n#ifdef TILE_LIMIT_RECTANGLE\nif (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\nv_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n{\ndiscard;\n}\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nfloat clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\nvec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0));\nvec3 normalEC = czm_normal3D * normalMC;\n#endif\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\nfloat nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);\n#else\nfloat nightBlend = 0.0;\n#endif\nvec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);\n#ifdef SHOW_TILE_BOUNDARIES\nif (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\nv_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n{\ncolor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nfloat cameraDist;\nif (czm_sceneMode == czm_sceneMode2D)\n{\ncameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n}\nelse if (czm_sceneMode == czm_sceneModeColumbusView)\n{\ncameraDist = -czm_view[3].z;\n}\nelse\n{\ncameraDist = length(czm_view[3]);\n}\nfloat fadeOutDist = u_lightingFadeDistance.x;\nfloat fadeInDist = u_lightingFadeDistance.y;\nif (czm_sceneMode != czm_sceneMode3D) {\nvec3 radii = czm_ellipsoidRadii;\nfloat maxRadii = max(radii.x, max(radii.y, radii.z));\nfadeOutDist -= maxRadii;\nfadeInDist -= maxRadii;\n}\nfloat fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\nfloat fade = 0.0;\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\nvec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\nvec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\nvec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\nwaterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\nfloat mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\nif (mask > 0.0)\n{\nmat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);\nvec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\nvec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\nvec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\ncolor = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);\n}\n#endif\n#ifdef APPLY_MATERIAL\nczm_materialInput materialInput;\nmaterialInput.st = v_textureCoordinates.st;\nmaterialInput.normalEC = normalize(v_normalEC);\nmaterialInput.slope = v_slope;\nmaterialInput.height = v_height;\nmaterialInput.aspect = v_aspect;\nczm_material material = czm_getMaterial(materialInput);\nvec4 materialColor = vec4(material.diffuse, material.alpha);\ncolor = alphaBlend(materialColor, color);\n#endif\n#ifdef ENABLE_VERTEX_LIGHTING\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * 0.9 + 0.3, 0.0, 1.0);\nvec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#elif defined(ENABLE_DAYNIGHT_SHADING)\nfloat diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);\ndiffuseIntensity = mix(1.0, diffuseIntensity, fade);\nvec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#else\nvec4 finalColor = color;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nvec4 clippingPlanesEdgeColor = vec4(1.0);\nclippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\nfloat clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\nif (clipDistance < clippingPlanesEdgeWidth)\n{\nfinalColor = clippingPlanesEdgeColor;\n}\n#endif\n#ifdef HIGHLIGHT_FILL_TILE\nfinalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);\n#ifndef HDR\nfogColor = vec3(1.0) - exp(-fExposure * fogColor);\n#endif\n#endif\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\nvec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\nvec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n#ifdef FOG\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nfloat darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);\nfogColor *= darken;\n#endif\n#ifdef HDR\nconst float modifier = 0.15;\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);\n#else\nfinalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#endif\n#endif\n#ifdef GROUND_ATMOSPHERE\nif (!czm_backFacing())\n{\nvec3 groundAtmosphereColor = computeGroundAtmosphereColor(fogColor, finalColor, atmosphereLightDirection, cameraDist);\nfinalColor = vec4(mix(finalColor.rgb, groundAtmosphereColor, fade), finalColor.a);\n}\n#endif\n#ifdef UNDERGROUND_COLOR\nif (czm_backFacing())\n{\nfloat distanceFromEllipsoid = max(czm_eyeHeight, 0.0);\nfloat distance = max(v_distance - distanceFromEllipsoid, 0.0);\nfloat blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);\nvec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);\nfinalColor = alphaBlend(undergroundColor, finalColor);\n}\n#endif\n#ifdef TRANSLUCENT\nif (inTranslucencyRectangle())\n{\nvec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\nfinalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n}\n#endif\ngl_FragColor = finalColor;\n}\n#ifdef GROUND_ATMOSPHERE\nvec3 computeGroundAtmosphereColor(vec3 fogColor, vec4 finalColor, vec3 atmosphereLightDirection, float cameraDist)\n{\n#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\nfloat mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\nvec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\nxy *= czm_viewport.zw * mpp * 0.5;\nvec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\nczm_ray ray = czm_ray(vec3(0.0), direction);\nvec3 ellipsoid_center = czm_view[3].xyz;\nczm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\nvec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\nellipsoidPosition = (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\nAtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(ellipsoidPosition, true, atmosphereLightDirection);\nvec3 groundAtmosphereColor = colorCorrect(atmosColor.mie) + finalColor.rgb * colorCorrect(atmosColor.rayleigh);\n#ifndef HDR\ngroundAtmosphereColor = vec3(1.0) - exp(-fExposure * groundAtmosphereColor);\n#endif\nfloat fadeInDist = u_nightFadeDistance.x;\nfloat fadeOutDist = u_nightFadeDistance.y;\nfloat sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#ifdef HDR\nsunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);\n#endif\ngroundAtmosphereColor = mix(groundAtmosphereColor, fogColor, sunlitAtmosphereIntensity);\n#else\nvec3 groundAtmosphereColor = fogColor;\n#endif\n#ifdef HDR\ngroundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);\n#endif\nreturn groundAtmosphereColor;\n}\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\nfloat waveFade(float edge0, float edge1, float x)\n{\nfloat y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\nreturn pow(1.0 - y, 5.0);\n}\nfloat linearFade(float edge0, float edge1, float x)\n{\nreturn clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\nvec3 positionToEyeEC = -positionEyeCoordinates;\nfloat positionToEyeECLength = length(positionToEyeEC);\nvec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));\nfloat waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n#ifdef SHOW_OCEAN_WAVES\nfloat time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\nvec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\nvec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\ntime = czm_frameNumber * oceanAnimationSpeedLowAltitude;\nnoise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\nvec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\nfloat highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\nfloat lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\nvec3 normalTangentSpace =\n(highAltitudeFade * normalTangentSpaceHighAltitude) +\n(lowAltitudeFade * normalTangentSpaceLowAltitude);\nnormalTangentSpace = normalize(normalTangentSpace);\nnormalTangentSpace.xy *= waveIntensity;\nnormalTangentSpace = normalize(normalTangentSpace);\n#else\nvec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\nvec3 normalEC = enuToEye * normalTangentSpace;\nconst vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\nfloat diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;\nvec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n#ifdef SHOW_OCEAN_WAVES\nfloat tsPerturbationRatio = normalTangentSpace.z;\nvec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\nvec3 nonDiffuseHighlight = vec3(0.0);\n#endif\nfloat specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);\nfloat surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\nfloat specular = specularIntensity * surfaceReflectance;\n#ifdef HDR\nspecular *= 1.4;\nfloat e = 0.2;\nfloat d = 3.3;\nfloat c = 1.7;\nvec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\nvec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\nreturn vec4(color, imageryColor.a);\n}\n#endif // #ifdef SHOW_REFLECTIVE_OCEAN\n",GlobeVS="#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed0;\nattribute float compressed1;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec4 textureCoordAndEncodedNormals;\n#endif\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_tileRectangle;\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef APPLY_MATERIAL\nvarying float v_slope;\nvarying float v_aspect;\nvarying float v_height;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvarying vec3 v_fogMieColor;\nvarying vec3 v_fogRayleighColor;\n#endif\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn u_modifiedModelViewProjection * vec4(position, 1.0);\n}\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\nconst float maxTileWidth = 0.003068;\nfloat positionFraction = textureCoordinates.y;\nfloat southLatitude = u_southAndNorthLatitude.x;\nfloat northLatitude = u_southAndNorthLatitude.y;\nif (northLatitude - southLatitude > maxTileWidth)\n{\nfloat southMercatorY = u_southMercatorYAndOneOverHeight.x;\nfloat oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\nfloat currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\ncurrentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\npositionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n}\nreturn positionFraction;\n}\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\nreturn textureCoordinates.y;\n}\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nreturn u_modifiedModelViewProjection * rtcPosition2D;\n}\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\nreturn getPositionPlanarEarth(position, height, textureCoordinates);\n}\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\nvec3 position3DWC = position + u_center3D;\nfloat yPositionFraction = get2DYPositionFraction(textureCoordinates);\nvec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\nvec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\nreturn czm_modelViewProjection * morphPosition;\n}\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\nvec2 xy = czm_decompressTextureCoordinates(compressed0.x);\nvec2 zh = czm_decompressTextureCoordinates(compressed0.y);\nvec3 position = vec3(xy, zh.x);\nfloat height = zh.y;\nvec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\nheight = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\nposition = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\nfloat encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = compressed0.w;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#else\nvec3 position = position3DAndHeight.xyz;\nfloat height = position3DAndHeight.w;\nvec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\nfloat webMercatorT = textureCoordAndEncodedNormals.z;\nfloat encodedNormal = 0.0;\n#else\nfloat webMercatorT = textureCoordinates.y;\nfloat encodedNormal = 0.0;\n#endif\n#endif\nvec3 position3DWC = position + u_center3D;\ngl_Position = getPosition(position, height, textureCoordinates);\nv_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\nvec3 normalMC = czm_octDecode(encodedNormal);\nv_normalMC = normalMC;\nv_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION) || defined(HDR)\nv_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\nv_positionMC = position3DWC;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nAtmosphereColor atmosFogColor = computeGroundAtmosphereFromSpace(position3DWC, false, vec3(0.0));\nv_fogMieColor = atmosFogColor.mie;\nv_fogRayleighColor = atmosFogColor.rayleigh;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nv_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);\n#endif\n#ifdef APPLY_MATERIAL\nfloat northPoleZ = czm_ellipsoidRadii.z;\nvec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);\nvec3 ellipsoidNormal = normalize(v_positionMC);\nvec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));\nfloat dotProd = abs(dot(ellipsoidNormal, v_normalMC));\nv_slope = acos(dotProd);\nvec3 normalRejected = ellipsoidNormal * dotProd;\nvec3 normalProjected = v_normalMC - normalRejected;\nvec3 aspectVector = normalize(normalProjected);\nv_aspect = acos(dot(aspectVector, vectorEastMC));\nfloat determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);\nv_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);\nv_height = height;\n#endif\n}\n",GroundAtmosphere="const float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\nconst vec3 v3InvWavelength = vec3(5.60204474633241, 9.473284437923038, 19.64380261047721);\nconst float fScaleDepth = 0.25;\nstruct AtmosphereColor\n{\nvec3 mie;\nvec3 rayleigh;\n};\nconst int nSamples = 2;\nconst float fSamples = 2.0;\nfloat scale(float fCos)\n{\nfloat x = 1.0 - fCos;\nreturn fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos, bool dynamicLighting, vec3 lightDirectionWC)\n{\nfloat fInnerRadius = czm_ellipsoidRadii.x;\nfloat fOuterRadius = czm_ellipsoidRadii.x * 1.025;\nfloat fOuterRadius2 = fOuterRadius * fOuterRadius;\nfloat fScale = 1.0 / (fOuterRadius - fInnerRadius);\nfloat fScaleOverScaleDepth = fScale / fScaleDepth;\nvec3 v3Ray = v3Pos - czm_viewerPositionWC;\nfloat fFar = length(v3Ray);\nv3Ray /= fFar;\nfloat fCameraHeight = length(czm_viewerPositionWC);\nfloat fCameraHeight2 = fCameraHeight * fCameraHeight;\nfloat B = 2.0 * length(czm_viewerPositionWC) * dot(normalize(czm_viewerPositionWC), v3Ray);\nfloat C = fCameraHeight2 - fOuterRadius2;\nfloat fDet = max(0.0, B*B - 4.0 * C);\nfloat fNear = 0.5 * (-B - sqrt(fDet));\nvec3 v3Start = czm_viewerPositionWC + v3Ray * fNear;\nfFar -= fNear;\nfloat fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\nfloat fLightAngle = czm_branchFreeTernary(dynamicLighting, dot(lightDirectionWC, v3Pos) / length(v3Pos), 1.0);\nfloat fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\nfloat fCameraScale = scale(fCameraAngle);\nfloat fLightScale = scale(fLightAngle);\nfloat fCameraOffset = fDepth*fCameraScale;\nfloat fTemp = (fLightScale + fCameraScale);\nfloat fSampleLength = fFar / fSamples;\nfloat fScaledLength = fSampleLength * fScale;\nvec3 v3SampleRay = v3Ray * fSampleLength;\nvec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\nvec3 v3FrontColor = vec3(0.0);\nvec3 v3Attenuate = vec3(0.0);\nfor(int i=0; i<nSamples; i++)\n{\nfloat fHeight = length(v3SamplePoint);\nfloat fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\nfloat fScatter = fDepth*fTemp - fCameraOffset;\nv3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\nv3FrontColor += v3Attenuate * (fDepth * fScaledLength);\nv3SamplePoint += v3SampleRay;\n}\nAtmosphereColor color;\ncolor.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\ncolor.rayleigh = v3Attenuate;\nreturn color;\n}\n";function GlobeSurfaceShader(e,t,i,r,n){this.numberOfDayTextures=e,this.flags=t,this.material=i,this.shaderProgram=r,this.clippingShaderState=n}function GlobeSurfaceShaderSet(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function getPositionMode(e){var t;switch(e){case SceneMode$1.SCENE3D:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case SceneMode$1.SCENE2D:case SceneMode$1.COLUMBUS_VIEW:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case SceneMode$1.MORPHING:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return t}function get2DYPositionFraction(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}GlobeSurfaceShaderSet.prototype.getShaderProgram=function(e){var t=e.frameState,i=e.surfaceTile,r=e.numberOfDayTextures,n=e.applyBrightness,a=e.applyContrast,o=e.applyHue,s=e.applySaturation,l=e.applyGamma,c=e.applyAlpha,u=e.applyDayNightAlpha,d=e.applySplit,h=e.showReflectiveOcean,p=e.showOceanWaves,f=e.enableLighting,m=e.dynamicAtmosphereLighting,g=e.dynamicAtmosphereLightingFromSun,y=e.showGroundAtmosphere,_=e.perFragmentGroundAtmosphere,v=e.hasVertexNormals,C=e.useWebMercatorProjection,x=e.enableFog,b=e.enableClippingPlanes,S=e.clippingPlanes,T=e.clippedByBoundaries,E=e.hasImageryLayerCutout,w=e.colorCorrect,A=e.highlightFillTile,P=e.colorToAlpha,D=e.showUndergroundColor,M=e.translucent,I=0,R="",O=i.renderedMesh.encoding;O.quantization===TerrainQuantization$1.BITS12&&(I=1,R="QUANTIZATION_BITS12");var L=0,N="";T&&(L=1,N="TILE_LIMIT_RECTANGLE");var F=0,B="";E&&(F=1,B="APPLY_IMAGERY_CUTOUT");var V=t.mode,k=V|n<<2|a<<3|o<<4|s<<5|l<<6|c<<7|h<<8|p<<9|f<<10|m<<11|g<<12|y<<13|_<<14|v<<15|C<<16|x<<17|I<<18|d<<19|b<<20|L<<21|F<<22|w<<23|A<<24|P<<25|D<<26|M<<27|u<<28;e=0;if(defined(S)&&0<S.length&&(e=b?S.clippingPlanesState:0),defined(T=i.surfaceShader)&&T.numberOfDayTextures===r&&T.flags===k&&T.material===this.material&&T.clippingShaderState===e)return T.shaderProgram;if(defined(I=this._shadersByTexturesFlags[r])||(I=this._shadersByTexturesFlags[r]=[]),!defined(T=I[k])||T.material!==this.material||T.clippingShaderState!==e){L=this.baseVertexShaderSource.clone(),F=this.baseFragmentShaderSource.clone(),0!==e&&F.sources.unshift(getClippingFunction(S,t.context)),L.defines.push(R),F.defines.push("TEXTURE_UNITS "+r,N,B),n&&F.defines.push("APPLY_BRIGHTNESS"),a&&F.defines.push("APPLY_CONTRAST"),o&&F.defines.push("APPLY_HUE"),s&&F.defines.push("APPLY_SATURATION"),l&&F.defines.push("APPLY_GAMMA"),c&&F.defines.push("APPLY_ALPHA"),u&&F.defines.push("APPLY_DAY_NIGHT_ALPHA"),h&&(F.defines.push("SHOW_REFLECTIVE_OCEAN"),L.defines.push("SHOW_REFLECTIVE_OCEAN")),p&&F.defines.push("SHOW_OCEAN_WAVES"),P&&F.defines.push("APPLY_COLOR_TO_ALPHA"),D&&(L.defines.push("UNDERGROUND_COLOR"),F.defines.push("UNDERGROUND_COLOR")),M&&(L.defines.push("TRANSLUCENT"),F.defines.push("TRANSLUCENT")),f&&(v?(L.defines.push("ENABLE_VERTEX_LIGHTING"),F.defines.push("ENABLE_VERTEX_LIGHTING")):(L.defines.push("ENABLE_DAYNIGHT_SHADING"),F.defines.push("ENABLE_DAYNIGHT_SHADING"))),m&&(F.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),g&&F.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN")),y&&(L.defines.push("GROUND_ATMOSPHERE"),F.defines.push("GROUND_ATMOSPHERE"),_&&F.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE")),L.defines.push("INCLUDE_WEB_MERCATOR_Y"),F.defines.push("INCLUDE_WEB_MERCATOR_Y"),x&&(L.defines.push("FOG"),F.defines.push("FOG")),d&&F.defines.push("APPLY_SPLIT"),b&&F.defines.push("ENABLE_CLIPPING_PLANES"),w&&F.defines.push("COLOR_CORRECT"),A&&F.defines.push("HIGHLIGHT_FILL_TILE");var z="    vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)\n    {\n        vec4 color = initialColor;\n";E&&(z+="        vec4 cutoutAndColorResult;\n        bool texelUnclipped;\n");for(var G=0;G<r;++G)z+=E?"        cutoutAndColorResult = u_dayTextureCutoutRectangles["+G+"];\n        texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n        cutoutAndColorResult = sampleAndBlend(\n":"        color = sampleAndBlend(\n",z+="            color,\n            u_dayTextures["+G+"],\n            u_dayTextureUseWebMercatorT["+G+"] ? textureCoordinates.xz : textureCoordinates.xy,\n            u_dayTextureTexCoordsRectangle["+G+"],\n            u_dayTextureTranslationAndScale["+G+"],\n            "+(c?"u_dayTextureAlpha["+G+"]":"1.0")+",\n            "+(u?"u_dayTextureNightAlpha["+G+"]":"1.0")+",\n"+(u?"u_dayTextureDayAlpha["+G+"]":"1.0")+",\n"+(n?"u_dayTextureBrightness["+G+"]":"0.0")+",\n            "+(a?"u_dayTextureContrast["+G+"]":"0.0")+",\n            "+(o?"u_dayTextureHue["+G+"]":"0.0")+",\n            "+(s?"u_dayTextureSaturation["+G+"]":"0.0")+",\n            "+(l?"u_dayTextureOneOverGamma["+G+"]":"0.0")+",\n            "+(d?"u_dayTextureSplit["+G+"]":"0.0")+",\n            "+(P?"u_colorsToAlpha["+G+"]":"vec4(0.0)")+",\n        nightBlend        );\n",E&&(z+="        color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");z+="        return color;\n    }",F.sources.push(z),L.sources.push(getPositionMode(V)),L.sources.push(get2DYPositionFraction(C)),O=ShaderProgram.fromCache({context:t.context,vertexShaderSource:L,fragmentShaderSource:F,attributeLocations:O.getAttributeLocations()}),T=I[k]=new GlobeSurfaceShader(r,k,this.material,O,e)}return(i.surfaceShader=T).shaderProgram},GlobeSurfaceShaderSet.prototype.destroy=function(){var e,t,i,r=this._shadersByTexturesFlags;for(i in r)if(r.hasOwnProperty(i)){var n=r[i];if(defined(n))for(e in n)n.hasOwnProperty(e)&&defined(t=n[e])&&t.shaderProgram.destroy()}return destroyObject(this)};var ImageryState={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7},ImageryState$1=Object.freeze(ImageryState),QuadtreeTileLoadState={START:0,LOADING:1,DONE:2,FAILED:3},QuadtreeTileLoadState$1=Object.freeze(QuadtreeTileLoadState),TerrainState$1={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},TerrainState$2=Object.freeze(TerrainState$1);function GlobeSurfaceTile(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new Cartesian4(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.orientedBoundingBox=void 0,this.boundingVolumeSourceTile=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new Cartesian3,this.terrainState=TerrainState$2.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new BoundingSphere,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}function getPosition$2(e,t,i,r,n,a){return e.decodePosition(r,n,a),defined(t)&&t!==SceneMode$1.SCENE3D&&(t=i.ellipsoid.cartesianToCartographic(a),i.project(t,a),Cartesian3.fromElements(a.z,a.x,a.y,a)),a}Object.defineProperties(GlobeSurfaceTile.prototype,{eligibleForUnloading:{get:function(){for(var e=this.terrainState,t=!(e===TerrainState$2.RECEIVING||e===TerrainState$2.TRANSFORMING),i=this.imagery,r=0,n=i.length;t&&r<n;++r){var a=i[r];t=!defined(a.loadingImagery)||a.loadingImagery.state!==ImageryState$1.TRANSITIONING}return t}},renderedMesh:{get:function(){return defined(this.vertexArray)?this.mesh:defined(this.fill)?this.fill.mesh:void 0}}});var scratchV0=new Cartesian3,scratchV1=new Cartesian3,scratchV2=new Cartesian3;function prepareNewTile(e,t,i){var r,n,a=t.getTileDataAvailable(e.x,e.y,e.level);defined(a)||!defined(e.parent)||defined(n=(r=e.parent).data)&&defined(n.terrainData)&&(a=n.terrainData.isChildAvailable(r.x,r.y,e.x,e.y)),!1===a&&(e.data.terrainState=TerrainState$2.FAILED);for(var o=0,s=i.length;o<s;++o){var l=i.get(o);l.show&&l._createTileImagerySkeletons(e,t)}}function processTerrainStateMachine(e,t,i,r,n){var a=e.data,o=e.parent;a.terrainState===TerrainState$2.FAILED&&void 0!==o&&(void 0!==o.data&&void 0!==o.data.terrainData&&!1!==o.data.terrainData.canUpsample||GlobeSurfaceTile.processStateMachine(o,t,i,r,!0)),a.terrainState===TerrainState$2.FAILED&&upsample(a,e,t,i,e.x,e.y,e.level),a.terrainState===TerrainState$2.UNLOADED&&requestTileGeometry$1(a,i,e.x,e.y,e.level),a.terrainState===TerrainState$2.RECEIVED&&transform$1(a,t,i,e.x,e.y,e.level),a.terrainState===TerrainState$2.TRANSFORMED&&createResources$4(a,t.context,i,e.x,e.y,e.level,n),a.terrainState>=TerrainState$2.RECEIVED&&void 0===a.waterMaskTexture&&i.hasWaterMask&&(void 0!==a.terrainData.waterMask?createWaterMaskTextureIfNeeded(t.context,a):defined(t=a._findAncestorTileWithTerrainData(e))&&defined(t.data.waterMaskTexture)&&(a.waterMaskTexture=t.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,t,a.waterMaskTranslationAndScale)))}function upsample(e,t,i,r,n,a,o){var s,l,c,u=t.parent;u?(s=u.data.terrainData,l=u.x,c=u.y,u=u.level,!defined(s)||defined(o=s.upsample(r.tilingScheme,l,c,u,n,a,o))&&(e.terrainState=TerrainState$2.RECEIVING,when(o,(function(t){e.terrainData=t,e.terrainState=TerrainState$2.RECEIVED}),(function(){e.terrainState=TerrainState$2.FAILED})))):t.state=QuadtreeTileLoadState$1.FAILED}function requestTileGeometry$1(e,t,i,r,n){function a(t){e.terrainData=t,e.terrainState=TerrainState$2.RECEIVED,e.request=void 0}function o(){if(e.request.state===RequestState$1.CANCELLED)return e.terrainData=void 0,e.terrainState=TerrainState$2.UNLOADED,void(e.request=void 0);e.terrainState=TerrainState$2.FAILED,e.request=void 0;var a="Failed to obtain terrain tile X: "+i+" Y: "+r+" Level: "+n+".";t._requestError=TileProviderError.handleError(t._requestError,t,t.errorEvent,a,i,r,n,s)}function s(){var s=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.TERRAIN});e.request=s,defined(s=t.requestTileGeometry(i,r,n,s))?(e.terrainState=TerrainState$2.RECEIVING,when(s,a,o)):(e.terrainState=TerrainState$2.UNLOADED,e.request=void 0)}s()}function transform$1(e,t,i,r,n,a){i=i.tilingScheme,defined(t=e.terrainData.createMesh(i,r,n,a,t.terrainExaggeration))&&(e.terrainState=TerrainState$2.TRANSFORMING,when(t,(function(t){e.mesh=t,e.orientedBoundingBox=OrientedBoundingBox.clone(t.orientedBoundingBox,e.orientedBoundingBox),e.occludeePointInScaledSpace=Cartesian3.clone(t.occludeePointInScaledSpace,e.occludeePointInScaledSpace),e.terrainState=TerrainState$2.TRANSFORMED}),(function(){e.terrainState=TerrainState$2.FAILED})))}function createResources$4(e,t,i,r,n,a,o){e.vertexArray=GlobeSurfaceTile._createVertexArrayForMesh(t,e.mesh),e.terrainState=TerrainState$2.READY,e.fill=e.fill&&e.fill.destroy(o)}function getContextWaterMaskData(e){var t,i=e.cache.tile_waterMaskData;return defined(i)||((t=Texture.create({context:e,pixelFormat:PixelFormat$1.LUMINANCE,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}})).referenceCount=1,i={allWaterTexture:t,sampler:new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR}),destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=i),i}function createWaterMaskTextureIfNeeded(e,t){var i=t.terrainData.waterMask,r=getContextWaterMaskData(e);if(1===(a=i.length)){if(0===i[0])return;n=r.allWaterTexture}else{var n,a=Math.sqrt(a);(n=Texture.create({context:e,pixelFormat:PixelFormat$1.LUMINANCE,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{width:a,height:a,arrayBufferView:i},sampler:r.sampler,flipY:!1})).referenceCount=0}++n.referenceCount,t.waterMaskTexture=n,Cartesian4.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}GlobeSurfaceTile.prototype.pick=function(e,t,i,r,n){var a=this.renderedMesh;if(defined(a)){for(var o=a.vertices,s=a.indices,l=a.encoding,c=s.length,u=Number.MAX_VALUE,d=0;d<c;d+=3){var h=s[d],p=s[d+1],f=s[d+2];h=getPosition$2(l,t,i,o,h,scratchV0),p=getPosition$2(l,t,i,o,p,scratchV1),f=getPosition$2(l,t,i,o,f,scratchV2);defined(f=IntersectionTests.rayTriangleParametric(e,h,p,f,r))&&f<u&&0<=f&&(u=f)}return u!==Number.MAX_VALUE?Ray.getPoint(e,u,n):void 0}},GlobeSurfaceTile.prototype.freeResources=function(){defined(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=TerrainState$2.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();for(var e=this.imagery,t=0,i=e.length;t<i;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()},GlobeSurfaceTile.prototype.freeVertexArray=function(){GlobeSurfaceTile._freeVertexArray(this.vertexArray),this.vertexArray=void 0,GlobeSurfaceTile._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0},GlobeSurfaceTile.initialize=function(e,t,i){defined(e.data)||(e.data=new GlobeSurfaceTile),e.state===QuadtreeTileLoadState$1.START&&(prepareNewTile(e,t,i),e.state=QuadtreeTileLoadState$1.LOADING)},GlobeSurfaceTile.processStateMachine=function(e,t,i,r,n,a){GlobeSurfaceTile.initialize(e,i,r);var o=e.data;if(e.state===QuadtreeTileLoadState$1.LOADING&&processTerrainStateMachine(e,t,i,r,n),!a){if(n=e.renderable,e.renderable=defined(o.vertexArray),a=o.terrainState===TerrainState$2.READY,e.upsampledFromParent=defined(o.terrainData)&&o.terrainData.wasCreatedByUpsampling(),t=o.processImagery(e,i,t),a&&t){var s,l=e._loadedCallbacks,c={};for(s in l)l.hasOwnProperty(s)&&(l[s](e)||(c[s]=l[s]));e._loadedCallbacks=c,e.state=QuadtreeTileLoadState$1.DONE}n&&(e.renderable=!0)}},GlobeSurfaceTile.prototype.processImagery=function(e,t,i,r){for(var n=e.data,a=e.upsampledFromParent,o=!1,s=!0,l=n.imagery,c=0,u=l.length;c<u;++c){var d=l[c];if(defined(d.loadingImagery)){if(d.loadingImagery.state===ImageryState$1.PLACEHOLDER){var h=d.loadingImagery.imageryLayer;if(h.imageryProvider.ready){d.freeResources(),l.splice(c,1),h._createTileImagerySkeletons(e,t,c),--c,u=l.length;continue}a=!1}h=d.processStateMachine(e,i,r),s=s&&h,o=o||h||defined(d.readyImagery),a=a&&defined(d.loadingImagery)&&(d.loadingImagery.state===ImageryState$1.FAILED||d.loadingImagery.state===ImageryState$1.INVALID)}else a=!1}return e.upsampledFromParent=a,e.renderable=e.renderable&&(o||s),s},GlobeSurfaceTile._createVertexArrayForMesh=function(e,t){var i=t.vertices,r=Buffer$1.createVertexBuffer({context:e,typedArray:i,usage:BufferUsage$1.STATIC_DRAW}),n=t.encoding.getAttributes(r),a=t.indices.indexBuffers||{};return!defined(i=a[e.id])||i.isDestroyed()?(r=t.indices,(i=Buffer$1.createIndexBuffer({context:e,typedArray:r,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.fromSizeInBytes(r.BYTES_PER_ELEMENT)})).vertexArrayDestroyable=!1,i.referenceCount=1,a[e.id]=i,t.indices.indexBuffers=a):++i.referenceCount,new VertexArray({context:e,attributes:n,indexBuffer:i})},GlobeSurfaceTile._freeVertexArray=function(e){var t;defined(e)&&(t=e.indexBuffer,e.destroy(),defined(t)&&!t.isDestroyed()&&defined(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy()))},GlobeSurfaceTile.prototype._findAncestorTileWithTerrainData=function(e){for(var t=e.parent;defined(t)&&(!defined(t.data)||!defined(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t},GlobeSurfaceTile.prototype._computeWaterMaskTranslationAndScale=function(e,t,i){var r=t.rectangle,n=e.rectangle,a=n.width,o=n.height;t=a/r.width,e=o/r.height;return i.x=t*(n.west-r.west)/a,i.y=e*(n.south-r.south)/o,i.z=t,i.w=e,i};var ReprojectWebMercatorFS="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n",ReprojectWebMercatorVS="attribute vec4 position;\nattribute float webMercatorT;\nuniform vec2 u_textureDimensions;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nv_textureCoordinates = vec2(position.x, webMercatorT);\ngl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n";function Imagery(e,t,i,r,n){var a,o,s;this.imageryLayer=e,this.x=t,this.y=i,this.level=r,this.request=void 0,0!==r&&(a=t/2|0,o=i/2|0,s=r-1,this.parent=e.getImageryFromCache(a,o,s)),this.state=ImageryState$1.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!defined(n)&&e.imageryProvider.ready&&(n=e.imageryProvider.tilingScheme.tileXYToRectangle(t,i,r)),this.rectangle=n}Imagery.createPlaceholder=function(e){return(e=new Imagery(e,0,0,0)).addReference(),e.state=ImageryState$1.PLACEHOLDER,e},Imagery.prototype.addReference=function(){++this.referenceCount},Imagery.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.imageryLayer.removeImageryFromCache(this),defined(this.parent)&&this.parent.releaseReference(),defined(this.image)&&defined(this.image.destroy)&&this.image.destroy(),defined(this.texture)&&this.texture.destroy(),defined(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),destroyObject(this),0):this.referenceCount},Imagery.prototype.processStateMachine=function(e,t,i){this.state!==ImageryState$1.UNLOADED||i||(this.state=ImageryState$1.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===ImageryState$1.RECEIVED&&(this.state=ImageryState$1.TRANSITIONING,this.imageryLayer._createTexture(e.context,this)),i=this.state===ImageryState$1.READY&&t&&!this.texture,this.state!==ImageryState$1.TEXTURE_LOADED&&!i||(this.state=ImageryState$1.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var ImagerySplitDirection={LEFT:-1,NONE:0,RIGHT:1},ImagerySplitDirection$1=Object.freeze(ImagerySplitDirection);function TileImagery(e,t,i){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i}function ImageryLayer(e,t){this._imageryProvider=e,t=defaultValue(t,defaultValue.EMPTY_OBJECT),this.alpha=defaultValue(t.alpha,defaultValue(e.defaultAlpha,1)),this.nightAlpha=defaultValue(t.nightAlpha,defaultValue(e.defaultNightAlpha,1)),this.dayAlpha=defaultValue(t.dayAlpha,defaultValue(e.defaultDayAlpha,1)),this.brightness=defaultValue(t.brightness,defaultValue(e.defaultBrightness,ImageryLayer.DEFAULT_BRIGHTNESS)),this.contrast=defaultValue(t.contrast,defaultValue(e.defaultContrast,ImageryLayer.DEFAULT_CONTRAST)),this.hue=defaultValue(t.hue,defaultValue(e.defaultHue,ImageryLayer.DEFAULT_HUE)),this.saturation=defaultValue(t.saturation,defaultValue(e.defaultSaturation,ImageryLayer.DEFAULT_SATURATION)),this.gamma=defaultValue(t.gamma,defaultValue(e.defaultGamma,ImageryLayer.DEFAULT_GAMMA)),this.splitDirection=defaultValue(t.splitDirection,defaultValue(e.defaultSplit,ImageryLayer.DEFAULT_SPLIT)),this.minificationFilter=defaultValue(t.minificationFilter,defaultValue(e.defaultMinificationFilter,ImageryLayer.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=defaultValue(t.magnificationFilter,defaultValue(e.defaultMagnificationFilter,ImageryLayer.DEFAULT_MAGNIFICATION_FILTER)),this.show=defaultValue(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=defaultValue(t.rectangle,Rectangle.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new TileImagery(Imagery.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=defaultValue(t.colorToAlphaThreshold,ImageryLayer.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD)}TileImagery.prototype.freeResources=function(){defined(this.readyImagery)&&this.readyImagery.releaseReference(),defined(this.loadingImagery)&&this.loadingImagery.releaseReference()},TileImagery.prototype.processStateMachine=function(e,t,i){var r=this.loadingImagery,n=r.imageryLayer;if(r.processStateMachine(t,!this.useWebMercatorT,i),r.state===ImageryState$1.READY)return defined(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=n._calculateTextureTranslationAndScale(e,this),!0;for(var a,o=r.parent;defined(o)&&(o.state!==ImageryState$1.READY||!this.useWebMercatorT&&!defined(o.texture));)o.state!==ImageryState$1.FAILED&&o.state!==ImageryState$1.INVALID&&(a=a||o),o=o.parent;return this.readyImagery!==o&&(defined(this.readyImagery)&&this.readyImagery.releaseReference(),defined(this.readyImagery=o)&&(o.addReference(),this.textureTranslationAndScale=n._calculateTextureTranslationAndScale(e,this))),!(r.state!==ImageryState$1.FAILED&&r.state!==ImageryState$1.INVALID||defined(a)&&(a.processStateMachine(t,!this.useWebMercatorT,i),1))},Object.defineProperties(ImageryLayer.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}}}),ImageryLayer.DEFAULT_BRIGHTNESS=1,ImageryLayer.DEFAULT_CONTRAST=1,ImageryLayer.DEFAULT_HUE=0,ImageryLayer.DEFAULT_SATURATION=1,ImageryLayer.DEFAULT_GAMMA=1,ImageryLayer.DEFAULT_SPLIT=ImagerySplitDirection$1.NONE,ImageryLayer.DEFAULT_MINIFICATION_FILTER=TextureMinificationFilter$1.LINEAR,ImageryLayer.DEFAULT_MAGNIFICATION_FILTER=TextureMagnificationFilter$1.LINEAR,ImageryLayer.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,ImageryLayer.prototype.isBaseLayer=function(){return this._isBaseLayer},ImageryLayer.prototype.isDestroyed=function(){return!1},ImageryLayer.prototype.destroy=function(){return destroyObject(this)};var imageryBoundsScratch=new Rectangle,tileImageryBoundsScratch=new Rectangle,clippedRectangleScratch=new Rectangle,terrainRectangleScratch=new Rectangle;function getSamplerKey(e,t,i){return e+":"+t+":"+i}function getImageryCacheKey(e,t,i){return JSON.stringify([e,t,i])}ImageryLayer.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then((function(){return Rectangle.intersection(e.rectangle,t)}))},ImageryLayer.prototype._createTileImagerySkeletons=function(e,t,i){var r=e.data;if(defined(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel)return!1;if(defined(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;var n=this._imageryProvider;if(defined(i)||(i=r.imagery.length),!n.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),r.imagery.splice(i,0,this._skeletonPlaceholder),!0;var a=n.tilingScheme.projection instanceof WebMercatorProjection&&e.rectangle.north<WebMercatorProjection.MaximumLatitude&&e.rectangle.south>-WebMercatorProjection.MaximumLatitude,o=Rectangle.intersection(n.rectangle,this._rectangle,imageryBoundsScratch);if(!defined(c=Rectangle.intersection(e.rectangle,o,tileImageryBoundsScratch))){if(!this.isBaseLayer())return!1;var s=o,l=e.rectangle,c=tileImageryBoundsScratch;l.south>=s.north?c.north=c.south=s.north:l.north<=s.south?c.north=c.south=s.south:(c.south=Math.max(l.south,s.south),c.north=Math.min(l.north,s.north)),l.west>=s.east?c.west=c.east=s.east:l.east<=s.west?c.west=c.east=s.west:(c.west=Math.max(l.west,s.west),c.east=Math.min(l.east,s.east))}s=0,0<c.south?s=c.south:c.north<0&&(s=c.north);var u=getLevelWithMaximumTexelSpacing(this,+t.getLevelMaximumGeometricError(e.level),s);u=Math.max(0,u);(s=n.maximumLevel)<u&&(u=s),!defined(n.minimumLevel)||u<(s=n.minimumLevel)&&(u=s);var d=(n=n.tilingScheme).positionToTileXY(Rectangle.northwest(c),u),h=n.positionToTileXY(Rectangle.southeast(c),u),p=e.rectangle.width/512,f=e.rectangle.height/512;c=n.tileXYToRectangle(d.x,d.y,u);Math.abs(c.south-e.rectangle.north)<f&&d.y<h.y&&++d.y,Math.abs(c.east-e.rectangle.west)<p&&d.x<h.x&&++d.x,c=n.tileXYToRectangle(h.x,h.y,u),Math.abs(c.north-e.rectangle.south)<f&&h.y>d.y&&--h.y,Math.abs(c.west-e.rectangle.east)<p&&h.x>d.x&&--h.x;var m,g,y=Rectangle.clone(e.rectangle,terrainRectangleScratch),_=n.tileXYToRectangle(d.x,d.y,u),v=Rectangle.intersection(_,o,clippedRectangleScratch);a?(n.rectangleToNativeRectangle(y,y),n.rectangleToNativeRectangle(_,_),n.rectangleToNativeRectangle(v,v),n.rectangleToNativeRectangle(o,o),m=n.tileXYToNativeRectangle.bind(n),p=y.width/512,f=y.height/512):m=n.tileXYToRectangle.bind(n);var C=0,x=1;!this.isBaseLayer()&&Math.abs(v.west-y.west)>=p&&(C=Math.min(1,(v.west-y.west)/y.width)),!this.isBaseLayer()&&Math.abs(v.north-y.north)>=f&&(x=Math.max(0,(v.north-y.south)/y.height));for(var b=x,S=d.x;S<=h.x;S++)if(g=C,_=m(S,d.y,u),defined(v=Rectangle.simpleIntersection(_,o,clippedRectangleScratch))){C=Math.min(1,(v.east-y.west)/y.width),S===h.x&&(this.isBaseLayer()||Math.abs(v.east-y.east)<p)&&(C=1),x=b;for(var T=d.y;T<=h.y;T++){var E,w=x;_=m(S,T,u);defined(v=Rectangle.simpleIntersection(_,o,clippedRectangleScratch))&&(x=Math.max(0,(v.south-y.south)/y.height),T===h.y&&(this.isBaseLayer()||Math.abs(v.south-y.south)<f)&&(x=0),E=new Cartesian4(g,x,C,w),w=this.getImageryFromCache(S,T,u),r.imagery.splice(i,0,new TileImagery(w,E,a)),++i)}}return!0},ImageryLayer.prototype._calculateTextureTranslationAndScale=function(e,t){var i=t.readyImagery.rectangle,r=e.rectangle;t.useWebMercatorT&&(i=(a=t.readyImagery.imageryLayer.imageryProvider.tilingScheme).rectangleToNativeRectangle(i,imageryBoundsScratch),r=a.rectangleToNativeRectangle(r,terrainRectangleScratch));var n=r.width,a=(e=r.height,t=n/i.width,e/i.height);return new Cartesian4(t*(r.west-i.west)/n,a*(r.south-i.south)/e,t,a)},ImageryLayer.prototype._requestImagery=function(e){var t=this._imageryProvider,i=this;function r(t){if(!defined(t))return n();e.image=t,e.state=ImageryState$1.RECEIVED,e.request=void 0,TileProviderError.handleSuccess(i._requestImageError)}function n(r){if(e.request.state===RequestState$1.CANCELLED)return e.state=ImageryState$1.UNLOADED,void(e.request=void 0);e.state=ImageryState$1.FAILED,e.request=void 0;var n="Failed to obtain image tile X: "+e.x+" Y: "+e.y+" Level: "+e.level+".";i._requestImageError=TileProviderError.handleError(i._requestImageError,t,t.errorEvent,n,e.x,e.y,e.level,a,r)}function a(){var i=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.IMAGERY});if(e.request=i,e.state=ImageryState$1.TRANSITIONING,!defined(i=t.requestImage(e.x,e.y,e.level,i)))return e.state=ImageryState$1.UNLOADED,void(e.request=void 0);defined(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),when(i,r,n)}a()},ImageryLayer.prototype._createTextureWebGL=function(e,t){var i=new Sampler({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter});return defined((t=t.image).internalFormat)?new Texture({context:e,pixelFormat:t.internalFormat,width:t.width,height:t.height,source:{arrayBufferView:t.bufferView},sampler:i}):new Texture({context:e,source:t,pixelFormat:this._imageryProvider.hasAlphaChannel?PixelFormat$1.RGBA:PixelFormat$1.RGB,sampler:i})},ImageryLayer.prototype._createTexture=function(e,t){var i=this._imageryProvider,r=t.image;if(defined(i.tileDiscardPolicy)){var n=i.tileDiscardPolicy;if(defined(n)){if(!n.isReady())return void(t.state=ImageryState$1.RECEIVED);if(n.shouldDiscardImage(r))return void(t.state=ImageryState$1.INVALID)}}e=this._createTextureWebGL(e,t),i.tilingScheme.projection instanceof WebMercatorProjection?t.textureWebMercator=e:t.texture=e,t.image=void 0,t.state=ImageryState$1.TEXTURE_LOADED},ImageryLayer.prototype._finalizeReprojectTexture=function(e,t){var i,r,n,a,o=this.minificationFilter,s=this.magnificationFilter;o===TextureMinificationFilter$1.LINEAR&&s===TextureMagnificationFilter$1.LINEAR&&!PixelFormat$1.isCompressedFormat(t.pixelFormat)&&CesiumMath.isPowerOfTwo(t.width)&&CesiumMath.isPowerOfTwo(t.height)?(o=TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR,a=ContextLimits.maximumTextureFilterAnisotropy,i=getSamplerKey(o,s,n=Math.min(a,defaultValue(this._maximumAnisotropy,a))),defined(r=e.cache.imageryLayerMipmapSamplers)||(r={},e.cache.imageryLayerMipmapSamplers=r),defined(a=r[i])||(a=r[i]=new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:o,magnificationFilter:s,maximumAnisotropy:n})),t.generateMipmap(MipmapHint$1.NICEST),t.sampler=a):(n=getSamplerKey(o,s,0),defined(a=e.cache.imageryLayerNonMipmapSamplers)||(a={},e.cache.imageryLayerNonMipmapSamplers=a),defined(e=a[n])||(e=a[n]=new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:o,magnificationFilter:s})),t.sampler=e)},ImageryLayer.prototype._reprojectTexture=function(e,t,i){var r,n=t.textureWebMercator||t.texture,a=t.rectangle,o=e.context;(i=defaultValue(i,!0))&&!(this._imageryProvider.tilingScheme.projection instanceof GeographicProjection)&&1e-5<a.width/n.width?(r=this,t.addReference(),a=new ComputeCommand({persists:!0,owner:this,preExecute:function(e){reprojectToGeographic(e,o,n,t.rectangle)},postExecute:function(e){t.texture=e,r._finalizeReprojectTexture(o,e),t.state=ImageryState$1.READY,t.releaseReference()},canceled:function(){t.state=ImageryState$1.TEXTURE_LOADED,t.releaseReference()}}),this._reprojectComputeCommands.push(a)):(i&&(t.texture=n),this._finalizeReprojectTexture(o,n),t.state=ImageryState$1.READY)},ImageryLayer.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,r=0;r<i;++r)e.commandList.push(t[r]);t.length=0},ImageryLayer.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach((function(e){defined(e.canceled)&&e.canceled()})),this._reprojectComputeCommands.length=0},ImageryLayer.prototype.getImageryFromCache=function(e,t,i,r){var n=getImageryCacheKey(e,t,i),a=this._imageryCache[n];return defined(a)||(a=new Imagery(this,e,t,i,r),this._imageryCache[n]=a),a.addReference(),a},ImageryLayer.prototype.removeImageryFromCache=function(e){e=getImageryCacheKey(e.x,e.y,e.level),delete this._imageryCache[e]};var uniformMap={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new Cartesian2,texture:void 0},float32ArrayScratch=FeatureDetection.supportsTypedArrays()?new Float32Array(128):void 0;function reprojectToGeographic(e,t,i,r){var n=t.cache.imageryLayer_reproject;if(!defined(n)){n=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){defined(this.framebuffer)&&this.framebuffer.destroy(),defined(this.vertexArray)&&this.vertexArray.destroy(),defined(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var a=new Float32Array(256),o=0,s=0;s<64;++s){var l=s/63;a[o++]=0,a[o++]=l,a[o++]=1,a[o++]=l}var c={position:0,webMercatorT:1},u=TerrainProvider.getRegularGridIndices(2,64);u=Buffer$1.createIndexBuffer({context:t,typedArray:u,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT});n.vertexArray=new VertexArray({context:t,attributes:[{index:c.position,vertexBuffer:Buffer$1.createVertexBuffer({context:t,typedArray:a,usage:BufferUsage$1.STATIC_DRAW}),componentsPerAttribute:2},{index:c.webMercatorT,vertexBuffer:Buffer$1.createVertexBuffer({context:t,sizeInBytes:512,usage:BufferUsage$1.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:u}),u=new ShaderSource({sources:[ReprojectWebMercatorVS]}),n.shaderProgram=ShaderProgram.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:ReprojectWebMercatorFS,attributeLocations:c}),n.sampler=new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR})}i.sampler=n.sampler,u=i.width,c=i.height,uniformMap.textureDimensions.x=u,uniformMap.textureDimensions.y=c,uniformMap.texture=i;var d=Math.sin(r.south),h=.5*Math.log((1+d)/(1-d));d=Math.sin(r.north);var p=1/(.5*Math.log((1+d)/(1-d))-h);i=new Texture({context:t,width:u,height:c,pixelFormat:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha});CesiumMath.isPowerOfTwo(u)&&CesiumMath.isPowerOfTwo(c)&&i.generateMipmap(MipmapHint$1.NICEST);for(var f=r.south,m=r.north,g=float32ArrayScratch,y=0,_=0;_<64;++_){var v=_/63;v=CesiumMath.lerp(f,m,v),d=Math.sin(v),v=(.5*Math.log((1+d)/(1-d))-h)*p;g[y++]=v,g[y++]=v}n.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(g),e.shaderProgram=n.shaderProgram,e.outputTexture=i,e.uniformMap=uniformMap,e.vertexArray=n.vertexArray}function getLevelWithMaximumTexelSpacing(e,t,i){var r=e._imageryProvider,n=r.tilingScheme,a=n.ellipsoid;e=e._imageryProvider.tilingScheme.projection instanceof GeographicProjection?1:Math.cos(i),i=n.rectangle,t=a.maximumRadius*i.width*e/(r.tileWidth*n.getNumberOfXTilesAtLevel(0))/t,t=Math.log(t)/Math.log(2);return 0|Math.round(t)}var TileSelectionResult={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=TileSelectionResult.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}};function TerrainFillMesh(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new Cartesian4}TerrainFillMesh.prototype.update=function(e,t,i){this.changedThisFrame&&(createFillMesh(e,t,this.tile,i),this.changedThisFrame=!1)},TerrainFillMesh.prototype.destroy=function(e){defined(this.vertexArray)&&(defined(e)?e.push(this.vertexArray):GlobeSurfaceTile._freeVertexArray(this.vertexArray,e),this.vertexArray=void 0),defined(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};var traversalQueueScratch=new Queue;function visitRenderedTiles(e,t,i,r,n,a,o,s,l){if(void 0!==r){for(var c=r;c&&(c._lastSelectionResultFrame!==n||TileSelectionResult.wasKicked(c._lastSelectionResult)||TileSelectionResult.originalResult(c._lastSelectionResult)===TileSelectionResult.CULLED);){if(o)return;var u=c.parent;if(a>=TileEdge.NORTHWEST&&void 0!==u)switch(a){case TileEdge.NORTHWEST:c=c===u.northwestChild?u:void 0;break;case TileEdge.NORTHEAST:c=c===u.northeastChild?u:void 0;break;case TileEdge.SOUTHWEST:c=c===u.southwestChild?u:void 0;break;case TileEdge.SOUTHEAST:c=c===u.southeastChild?u:void 0}else c=u}if(void 0!==c){if(c._lastSelectionResult===TileSelectionResult.RENDERED)return!defined(c.data.vertexArray)&&void visitTile$2(e,t,i,c,a,n,s,l);if(TileSelectionResult.originalResult(r._lastSelectionResult)!==TileSelectionResult.CULLED)switch(a){case TileEdge.WEST:visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l);break;case TileEdge.EAST:visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l);break;case TileEdge.SOUTH:visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l);break;case TileEdge.NORTH:visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l);break;case TileEdge.NORTHWEST:visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l);break;case TileEdge.NORTHEAST:visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l);break;case TileEdge.SOUTHWEST:visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l);break;case TileEdge.SOUTHEAST:visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l);break;default:throw new DeveloperError("Invalid edge")}}}}function visitTile$2(e,t,i,r,n,a,o,s){var l=r.data;if(void 0===l.fill)l.fill=new TerrainFillMesh(r);else if(l.fill.visitedFrame===a)return;l.fill.enqueuedFrame!==a&&(l.fill.enqueuedFrame=a,l.fill.changedThisFrame=!1,o.enqueue(r)),propagateEdge(e,t,i,r,n,s)}function propagateEdge(e,t,i,r,n,a){var o,s,l,c,u,d=r.data.fill,h=defined(h=i.data.fill)?(h.visitedFrame=t.frameNumber,h.changedThisFrame&&(createFillMesh(e,t,i,a),h.changedThisFrame=!1),i.data.fill.mesh):i.data.mesh;switch(n){case TileEdge.WEST:o=d.westMeshes,s=d.westTiles;break;case TileEdge.SOUTH:o=d.southMeshes,s=d.southTiles;break;case TileEdge.EAST:o=d.eastMeshes,s=d.eastTiles;break;case TileEdge.NORTH:o=d.northMeshes,s=d.northTiles;break;case TileEdge.NORTHWEST:return d.changedThisFrame=d.changedThisFrame||d.northwestMesh!==h,d.northwestMesh=h,void(d.northwestTile=i);case TileEdge.NORTHEAST:return d.changedThisFrame=d.changedThisFrame||d.northeastMesh!==h,d.northeastMesh=h,void(d.northeastTile=i);case TileEdge.SOUTHWEST:return d.changedThisFrame=d.changedThisFrame||d.southwestMesh!==h,d.southwestMesh=h,void(d.southwestTile=i);case TileEdge.SOUTHEAST:return d.changedThisFrame=d.changedThisFrame||d.southeastMesh!==h,d.southeastMesh=h,void(d.southeastTile=i)}if(i.level<=r.level)return d.changedThisFrame=d.changedThisFrame||o[0]!==h||1!==o.length,o[0]=h,s[0]=i,o.length=1,void(s.length=1);var p,f=i.rectangle;r=r.rectangle;switch(n){case TileEdge.WEST:for(p=(r.north-r.south)*CesiumMath.EPSILON5,l=0;l<s.length&&(u=s[l].rectangle,!CesiumMath.greaterThan(f.north,u.south,p));++l);for(c=l;c<s.length&&(u=s[c].rectangle,!CesiumMath.greaterThanOrEquals(f.south,u.north,p));++c);break;case TileEdge.SOUTH:for(p=(r.east-r.west)*CesiumMath.EPSILON5,l=0;l<s.length&&(u=s[l].rectangle,!CesiumMath.lessThan(f.west,u.east,p));++l);for(c=l;c<s.length&&(u=s[c].rectangle,!CesiumMath.lessThanOrEquals(f.east,u.west,p));++c);break;case TileEdge.EAST:for(p=(r.north-r.south)*CesiumMath.EPSILON5,l=0;l<s.length&&(u=s[l].rectangle,!CesiumMath.lessThan(f.south,u.north,p));++l);for(c=l;c<s.length&&(u=s[c].rectangle,!CesiumMath.lessThanOrEquals(f.north,u.south,p));++c);break;case TileEdge.NORTH:for(p=(r.east-r.west)*CesiumMath.EPSILON5,l=0;l<s.length&&(u=s[l].rectangle,!CesiumMath.greaterThan(f.east,u.west,p));++l);for(c=l;c<s.length&&(u=s[c].rectangle,!CesiumMath.greaterThanOrEquals(f.west,u.east,p));++c);}c-l==1?(d.changedThisFrame=d.changedThisFrame||o[l]!==h,o[l]=h,s[l]=i):(d.changedThisFrame=!0,o.splice(l,c-l,h),s.splice(l,c-l,i))}TerrainFillMesh.updateFillTiles=function(e,t,i,r){var n=e._quadtree,a=n._levelZeroTiles,o=n._lastSelectionFrameNumber,s=traversalQueueScratch;s.clear();for(var l=0;l<t.length;++l)defined(t[l].data.vertexArray)&&s.enqueue(t[l]);for(var c=s.dequeue();void 0!==c;){var u=c.findTileToWest(a),d=c.findTileToSouth(a),h=c.findTileToEast(a),p=c.findTileToNorth(a);visitRenderedTiles(e,i,c,u,o,TileEdge.EAST,!1,s,r),visitRenderedTiles(e,i,c,d,o,TileEdge.NORTH,!1,s,r),visitRenderedTiles(e,i,c,h,o,TileEdge.WEST,!1,s,r),visitRenderedTiles(e,i,c,p,o,TileEdge.SOUTH,!1,s,r),d=u.findTileToNorth(a),p=u.findTileToSouth(a),u=h.findTileToNorth(a),h=h.findTileToSouth(a),visitRenderedTiles(e,i,c,d,o,TileEdge.SOUTHEAST,!1,s,r),visitRenderedTiles(e,i,c,u,o,TileEdge.SOUTHWEST,!1,s,r),visitRenderedTiles(e,i,c,p,o,TileEdge.NORTHEAST,!1,s,r),visitRenderedTiles(e,i,c,h,o,TileEdge.NORTHWEST,!1,s,r),c=s.dequeue()}};var cartographicScratch$3=new Cartographic,centerCartographicScratch=new Cartographic,cartesianScratch=new Cartesian3,normalScratch$5=new Cartesian3,octEncodedNormalScratch=new Cartesian2,uvScratch2=new Cartesian2,uvScratch=new Cartesian2;function HeightAndNormal(){this.height=0,this.encodedNormal=new Cartesian2}function fillMissingCorner(e,t,i,r,n,a,o,s,l){if(defined(n))return n;var c=defined(a)&&defined(o)?.5*(a.height+o.height):defined(a)?a.height:defined(o)?o.height:defined(s)?s.height:(c=o=0,defined(s=e.tile.data.tileBoundingRegion)&&(o=s.minimumHeight,c=s.maximumHeight),.5*(o+c));return getVertexWithHeightAtCorner(e,t,i,r,c,l),l}var heightRangeScratch={minimumHeight:0,maximumHeight:0},swVertexScratch=new HeightAndNormal,seVertexScratch=new HeightAndNormal,nwVertexScratch=new HeightAndNormal,neVertexScratch=new HeightAndNormal,heightmapBuffer="undefined"!=typeof Uint8Array?new Uint8Array(81):void 0;function createFillMesh(e,t,i,r){GlobeSurfaceTile.initialize(i,e.terrainProvider,e._imageryLayers);var n=i.data,a=n.fill,o=i.rectangle,s=getCorner(a,A=i.tilingScheme.ellipsoid,0,1,a.northwestTile,a.northwestMesh,a.northTiles,a.northMeshes,a.westTiles,a.westMeshes,nwVertexScratch),l=getCorner(a,A,0,0,a.southwestTile,a.southwestMesh,a.westTiles,a.westMeshes,a.southTiles,a.southMeshes,swVertexScratch),c=getCorner(a,A,1,0,a.southeastTile,a.southeastMesh,a.southTiles,a.southMeshes,a.eastTiles,a.eastMeshes,seVertexScratch),u=(s=fillMissingCorner(a,A,0,1,s,l,u=getCorner(a,A,1,1,a.northeastTile,a.northeastMesh,a.eastTiles,a.eastMeshes,a.northTiles,a.northMeshes,neVertexScratch),c,nwVertexScratch),l=fillMissingCorner(a,A,0,0,l,s,c,u,swVertexScratch),c=fillMissingCorner(a,A,1,1,c,l,u,s,seVertexScratch),fillMissingCorner(a,A,1,1,u,c,s,l,neVertexScratch)),d=l.height,h=c.height,p=s.height,f=u.height,m=Math.min(d,h,p,f),g=Math.max(d,h,p,f),y=.5*(m+g);d=e.getLevelMaximumGeometricError(i.level),h=A.maximumRadius-d,p=4*Math.acos(h/A.maximumRadius);if(p*=1.5,o.width>p&&g-m<=d){var _=new HeightmapTerrainData({width:9,height:9,buffer:heightmapBuffer,structure:{heightOffset:g}});a.mesh=_._createMeshSync(i.tilingScheme,i.x,i.y,i.level,1)}else{var v=new TerrainEncoding(void 0,void 0,void 0,void 0,!0,!0);(f=centerCartographicScratch).longitude=.5*(o.east+o.west),f.latitude=.5*(o.north+o.south),f.height=y,v.center=A.cartographicToCartesian(f,v.center);for(var C=5,x=a.westMeshes,b=0,S=x.length;b<S;++b)C+=x[b].eastIndicesNorthToSouth.length;for(b=0,S=(x=a.southMeshes).length;b<S;++b)C+=x[b].northIndicesWestToEast.length;for(b=0,S=(x=a.eastMeshes).length;b<S;++b)C+=x[b].westIndicesSouthToNorth.length;for(b=0,S=(x=a.northMeshes).length;b<S;++b)C+=x[b].southIndicesEastToWest.length;(h=heightRangeScratch).minimumHeight=m,h.maximumHeight=g;p=v.getStride(),_=0;var T=_=addEdge(a,A,v,d=new Float32Array(C*p),_=addVertexWithComputedPosition(A,o,v,d,0,0,1,s.height,s.encodedNormal,1,h),a.westTiles,a.westMeshes,TileEdge.EAST,h),E=_=addEdge(a,A,v,d,_=addVertexWithComputedPosition(A,o,v,d,_,0,0,l.height,l.encodedNormal,0,h),a.southTiles,a.southMeshes,TileEdge.NORTH,h),w=_=addEdge(a,A,v,d,_=addVertexWithComputedPosition(A,o,v,d,_,1,0,c.height,c.encodedNormal,0,h),a.eastTiles,a.eastMeshes,TileEdge.WEST,h);_=addEdge(a,A,v,d,_=addVertexWithComputedPosition(A,o,v,d,_,1,1,u.height,u.encodedNormal,1,h),a.northTiles,a.northMeshes,TileEdge.SOUTH,h),m=h.minimumHeight,g=h.maximumHeight,c=OrientedBoundingBox.fromRectangle(o,m,g,i.tilingScheme.ellipsoid),u=WebMercatorProjection.geodeticLatitudeToMercatorAngle(o.south),h=1/(WebMercatorProjection.geodeticLatitudeToMercatorAngle(o.north)-u),h=(WebMercatorProjection.geodeticLatitudeToMercatorAngle(f.latitude)-u)*h,A.geodeticSurfaceNormalCartographic(cartographicScratch$3,normalScratch$5);var A=AttributeCompression.octEncode(normalScratch$5,octEncodedNormalScratch),P=_;v.encode(d,_*p,c.center,Cartesian2.fromElements(.5,.5,uvScratch),y,A,h);var D,M=++_;D=(h=3*(M-1))*(M<256?1:2)<=(d.length-M*p)*Float32Array.BYTES_PER_ELEMENT?(_=M*p*Float32Array.BYTES_PER_ELEMENT,new(M<256?Uint8Array:Uint16Array)(d.buffer,_,h)):new(M<256?Uint8Array:Uint16Array)(h),d=new Float32Array(d.buffer,0,M*p);var I=0;for(b=0;b<M-2;++b)D[I++]=P,D[I++]=b,D[I++]=b+1;D[I++]=P,D[I++]=b,D[I++]=0;var R=[];for(b=T;0<=b;--b)R.push(b);var O=[];for(b=E;T<=b;--b)O.push(b);var L=[];for(b=w;E<=b;--b)L.push(b);var N=[];for(N.push(0),b=P-1;w<=b;--b)N.push(b);a.mesh=new TerrainMesh(v.center,d,D,h,M,m,g,BoundingSphere.fromOrientedBoundingBox(c),computeOccludeePoint(e,c.center,o,m,g),v.getStride(),c,v,t.terrainExaggeration,R,O,L,N)}v=t.context,defined(a.vertexArray)&&(defined(r)?r.push(a.vertexArray):GlobeSurfaceTile._freeVertexArray(a.vertexArray)),a.vertexArray=GlobeSurfaceTile._createVertexArrayForMesh(v,a.mesh),n.processImagery(i,e.terrainProvider,t,!0),t=a.waterMaskTexture,a.waterMaskTexture=void 0,!e.terrainProvider.hasWaterMask||defined(e=n._findAncestorTileWithTerrainData(i))&&defined(e.data.waterMaskTexture)&&(a.waterMaskTexture=e.data.waterMaskTexture,++a.waterMaskTexture.referenceCount,n._computeWaterMaskTranslationAndScale(i,e,a.waterMaskTranslationAndScale)),defined(t)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}function addVertexWithComputedPosition(e,t,i,r,n,a,o,s,l,c,u){var d=cartographicScratch$3;return d.longitude=CesiumMath.lerp(t.west,t.east,a),d.latitude=CesiumMath.lerp(t.south,t.north,o),d.height=s,e=e.cartographicToCartesian(d,cartesianScratch),(d=uvScratch2).x=a,d.y=o,i.encode(r,n*i.getStride(),e,d,s,l,c),u.minimumHeight=Math.min(u.minimumHeight,s),u.maximumHeight=Math.max(u.maximumHeight,s),n+1}var sourceRectangleScratch=new Rectangle;function transformTextureCoordinates(e,t,i,r){var n=e.rectangle,a=t.rectangle;0===t.x&&1===i.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?((n=Rectangle.clone(e.rectangle,sourceRectangleScratch)).west-=CesiumMath.TWO_PI,n.east-=CesiumMath.TWO_PI):0===e.x&&0===i.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&((n=Rectangle.clone(e.rectangle,sourceRectangleScratch)).west+=CesiumMath.TWO_PI,n.east+=CesiumMath.TWO_PI);var o=n.east-n.west,s=(a.west-n.west)/o;t=(a.east-n.west)/o,e=n.north-n.south,o=(a.south-n.south)/e,e=(a.north-n.south)/e,s=(i.x-s)/(t-s),o=(i.y-o)/(e-o);return Math.abs(s)<Math.EPSILON5?s=0:Math.abs(s-1)<Math.EPSILON5&&(s=1),Math.abs(o)<Math.EPSILON5?o=0:Math.abs(o-1)<Math.EPSILON5&&(o=1),r.x=s,r.y=o,r}var encodedNormalScratch=new Cartesian2;function getVertexFromTileAtCorner(e,t,i,r,n){var a=e.encoding;e=e.vertices;n.height=a.decodeHeight(e,t),a.hasVertexNormals?a.getOctEncodedNormal(e,t,n.encodedNormal):((n=n.encodedNormal).x=0,n.y=0)}var encodedNormalScratch2=new Cartesian2,cartesianScratch2=new Cartesian3;function getInterpolatedVertexAtCorner(e,t,i,r,n,a,o,s,l,c){var u,d=r.encoding,h=r.vertices;r=transformTextureCoordinates(t,i,d.decodeTextureCoordinates(h,n,uvScratch),uvScratch),t=transformTextureCoordinates(t,i,d.decodeTextureCoordinates(h,a,uvScratch2),uvScratch2),l=l?(o-r.x)/(t.x-r.x):(s-r.y)/(t.y-r.y),t=d.decodeHeight(h,n),r=d.decodeHeight(h,a),i=i.rectangle;cartographicScratch$3.longitude=CesiumMath.lerp(i.west,i.east,o),cartographicScratch$3.latitude=CesiumMath.lerp(i.south,i.north,s),c.height=cartographicScratch$3.height=CesiumMath.lerp(t,r,l),d.hasVertexNormals?(n=d.getOctEncodedNormal(h,n,encodedNormalScratch),u=d.getOctEncodedNormal(h,a,encodedNormalScratch2),n=AttributeCompression.octDecode(n.x,n.y,cartesianScratch),u=AttributeCompression.octDecode(u.x,u.y,cartesianScratch2),u=Cartesian3.lerp(n,u,l,cartesianScratch),Cartesian3.normalize(u,u)):u=e.geodeticSurfaceNormalCartographic(cartographicScratch$3,cartesianScratch),AttributeCompression.octEncode(u,c.encodedNormal)}function getVertexWithHeightAtCorner(e,t,i,r,n,a){a.height=n,t=t.geodeticSurfaceNormalCartographic(cartographicScratch$3,cartesianScratch),AttributeCompression.octEncode(t,a.encodedNormal)}function getCorner(e,t,i,r,n,a,o,s,l,c,u){return getCornerFromEdge(e,t,s,o,!1,i,r,u)||getCornerFromEdge(e,t,c,l,!0,i,r,u)?u:meshIsUsable(n,a)?(getVertexFromTileAtCorner(a,(0===i?0===r?a.eastIndicesNorthToSouth:a.southIndicesEastToWest:0===r?a.northIndicesWestToEast:a.westIndicesSouthToNorth)[0],i,r,u),u):defined(a=0===i?0===r?getClosestHeightToCorner(e.westMeshes,e.westTiles,TileEdge.EAST,e.southMeshes,e.southTiles,TileEdge.NORTH):getClosestHeightToCorner(e.northMeshes,e.northTiles,TileEdge.SOUTH,e.westMeshes,e.westTiles,TileEdge.EAST):0===r?getClosestHeightToCorner(e.southMeshes,e.southTiles,TileEdge.NORTH,e.eastMeshes,e.eastTiles,TileEdge.WEST):getClosestHeightToCorner(e.eastMeshes,e.eastTiles,TileEdge.WEST,e.northMeshes,e.northTiles,TileEdge.SOUTH))?(getVertexWithHeightAtCorner(e,t,i,r,a,u),u):void 0}function getClosestHeightToCorner(e,t,i,r,n,a,o,s){return i=getNearestHeightOnEdge(e,t,!1,i),a=getNearestHeightOnEdge(r,n,!0,a),defined(i)&&defined(a)?.5*(i+a):defined(i)?i:a}function addEdge(e,t,i,r,n,a,o,s,l){for(var c=0;c<a.length;++c)n=addEdgeMesh(e,t,i,r,n,a[c],o[c],s,l);return n}function addEdgeMesh(e,t,i,r,n,a,o,s,l){var c=a.rectangle;s===TileEdge.EAST&&0===e.tile.x?((c=Rectangle.clone(a.rectangle,sourceRectangleScratch)).west-=CesiumMath.TWO_PI,c.east-=CesiumMath.TWO_PI):s===TileEdge.WEST&&0===a.x&&((c=Rectangle.clone(a.rectangle,sourceRectangleScratch)).west+=CesiumMath.TWO_PI,c.east+=CesiumMath.TWO_PI);var u,d,h,p,f=e.tile.rectangle;switch(0<n&&(i.decodeTextureCoordinates(r,n-1,uvScratch),u=uvScratch.x,d=uvScratch.y),s){case TileEdge.WEST:h=o.westIndicesSouthToNorth,p=!1;break;case TileEdge.NORTH:h=o.northIndicesWestToEast,p=!0;break;case TileEdge.EAST:h=o.eastIndicesNorthToSouth,p=!1;break;case TileEdge.SOUTH:h=o.southIndicesEastToWest,p=!0}var m,g,y=a,_=e.tile,v=o.encoding,C=o.vertices,x=i.getStride();v.hasWebMercatorT&&(m=WebMercatorProjection.geodeticLatitudeToMercatorAngle(f.south),g=1/(WebMercatorProjection.geodeticLatitudeToMercatorAngle(f.north)-m));for(var b=0;b<h.length;++b){var S=h[b],T=v.decodeTextureCoordinates(C,S,uvScratch);transformTextureCoordinates(y,_,T,T);var E,w=T.x,A=T.y,P=p?w:A;P<0||1<P||Math.abs(w-u)<CesiumMath.EPSILON5&&Math.abs(A-d)<CesiumMath.EPSILON5||(P=Math.abs(w)<CesiumMath.EPSILON5||Math.abs(w-1)<CesiumMath.EPSILON5,w=Math.abs(A)<CesiumMath.EPSILON5||Math.abs(A-1)<CesiumMath.EPSILON5,P&&w||(P=v.decodePosition(C,S,cartesianScratch),w=v.decodeHeight(C,S),v.hasVertexNormals?E=v.getOctEncodedNormal(C,S,octEncodedNormalScratch):((E=octEncodedNormalScratch).x=0,E.y=0),S=A,v.hasWebMercatorT&&(A=CesiumMath.lerp(f.south,f.north,A),S=(WebMercatorProjection.geodeticLatitudeToMercatorAngle(A)-m)*g),i.encode(r,n*x,P,T,w,E,S),l.minimumHeight=Math.min(l.minimumHeight,w),l.maximumHeight=Math.max(l.maximumHeight,w),++n))}return n}function getNearestHeightOnEdge(e,t,i,r,n,a){for(var o,s,l=i?(o=0,s=e.length,1):(o=e.length-1,s=-1),c=o;c!==s;c+=l){var u,d=e[c];if(meshIsUsable(t[c],d)){switch(r){case TileEdge.WEST:u=d.westIndicesSouthToNorth;break;case TileEdge.SOUTH:u=d.southIndicesEastToWest;break;case TileEdge.EAST:u=d.eastIndicesNorthToSouth;break;case TileEdge.NORTH:u=d.northIndicesWestToEast}var h=u[i?0:u.length-1];if(defined(h))return d.encoding.decodeHeight(d.vertices,h)}}}function meshIsUsable(e,t){return defined(t)&&(!defined(e.data.fill)||!e.data.fill.changedThisFrame)}function getCornerFromEdge(e,t,i,r,n,a,o,s){var l,c,u,d=r[n?0:i.length-1],h=i[n?0:i.length-1];if(meshIsUsable(d,h)&&(u=0===a?0===o?(l=n?h.northIndicesWestToEast:h.eastIndicesNorthToSouth,c=n):(l=n?h.eastIndicesNorthToSouth:h.southIndicesEastToWest,c=!n,!1):0===o?(l=n?h.westIndicesSouthToNorth:h.northIndicesWestToEast,c=!n,!0):(l=n?h.southIndicesEastToWest:h.westIndicesSouthToNorth,!(c=n)),0<l.length)){if(i=l[r=n?0:l.length-1],h.encoding.decodeTextureCoordinates(h.vertices,i,uvScratch),(n=transformTextureCoordinates(d,e.tile,uvScratch,uvScratch)).x===a&&n.y===o)return getVertexFromTileAtCorner(h,i,a,o,s),!0;if(!((r=binarySearch(l,c?a:o,(function(t,i){return h.encoding.decodeTextureCoordinates(h.vertices,t,uvScratch),t=transformTextureCoordinates(d,e.tile,uvScratch,uvScratch),u?c?t.x-a:t.y-o:c?a-t.x:o-t.y})))<0))return getVertexFromTileAtCorner(h,l[r],a,o,s),!0;if(0<(r=~r)&&r<l.length)return getInterpolatedVertexAtCorner(t,d,e.tile,h,l[r-1],l[r],a,o,c,s),!0}return!1}var cornerPositionsScratch=[new Cartesian3,new Cartesian3,new Cartesian3,new Cartesian3];function computeOccludeePoint(e,t,i,r,n,a){var o=e.quadtree._occluders.ellipsoid,s=o.ellipsoid;e=cornerPositionsScratch;return Cartesian3.fromRadians(i.west,i.south,n,s,e[0]),Cartesian3.fromRadians(i.east,i.south,n,s,e[1]),Cartesian3.fromRadians(i.west,i.north,n,s,e[2]),Cartesian3.fromRadians(i.east,i.north,n,s,e[3]),o.computeHorizonCullingPointPossiblyUnderEllipsoid(t,e,r,a)}function GlobeSurfaceTileProvider(e){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=ShadowMode$1.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new Event,this._imageryLayers.layerAdded.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(GlobeSurfaceTileProvider.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new Event,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new Color(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=Rectangle.clone(Rectangle.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1}function sortTileImageryByLayerIndex(e,t){var i=e.loadingImagery;return defined(i)||(i=e.readyImagery),defined(e=t.loadingImagery)||(e=t.readyImagery),i.imageryLayer._layerIndex-e.imageryLayer._layerIndex}function updateCredits(e,t){var i=t.creditDisplay;e._terrainProvider.ready&&defined(e._terrainProvider.credit)&&i.addCredit(e._terrainProvider.credit);for(var r=e._imageryLayers,n=0,a=r.length;n<a;++n){var o=r.get(n).imageryProvider;o.ready&&defined(o.credit)&&i.addCredit(o.credit)}}function pushCommand(e,t){var i,r=t.globeTranslucencyState;r.translucent?(i=e.renderState.blending.enabled,r.pushDerivedCommands(e,i,t)):t.commandList.push(e)}Object.defineProperties(GlobeSurfaceTileProvider.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=Cartesian4.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,defined(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ClippingPlaneCollection.setOwner(e,this,"_clippingPlanes")}}}),GlobeSurfaceTileProvider.prototype.update=function(e){this._imageryLayers._update()},GlobeSurfaceTileProvider.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile((function(e){e.data.imagery.sort(sortTileImageryByLayerIndex)}))),updateCredits(this,e);for(var t=this._vertexArraysToDestroy,i=t.length,r=0;r<i;++r)GlobeSurfaceTile._freeVertexArray(t[r]);t.length=0},GlobeSurfaceTileProvider.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,r=t.length;i<r;++i){var n=t[i];defined(n)&&(n.length=0)}var a=this._clippingPlanes;defined(a)&&a.enabled&&a.update(e),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1},GlobeSurfaceTileProvider.prototype.endUpdate=function(e){var t;defined(this._renderState)||(this._renderState=RenderState.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:DepthFunction$1.LESS}}),this._blendRenderState=RenderState.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:DepthFunction$1.LESS_OR_EQUAL},blending:BlendingState$1.ALPHA_BLEND}),(t=clone(this._renderState,!0)).cull.enabled=!1,this._disableCullingRenderState=RenderState.fromCache(t),(t=clone(this._blendRenderState,!0)).cull.enabled=!1,this._disableCullingBlendRenderState=RenderState.fromCache(t)),this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&TerrainFillMesh.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);for(var i=this._tilesToRenderByTextureCount,r=0,n=i.length;r<n;++r){var a=i[r];if(defined(a))for(var o=0,s=a.length;o<s;++o){var l=a[o],c=l.data.tileBoundingRegion;addDrawCommandsForTile(this,l,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,c.minimumHeight)}}},GlobeSurfaceTileProvider.prototype.updateForPick=function(e){for(var t=this._drawCommands,i=0,r=this._usedDrawCommands;i<r;++i)pushCommand(t[i],e)},GlobeSurfaceTileProvider.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},GlobeSurfaceTileProvider.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},GlobeSurfaceTileProvider.prototype.loadTile=function(e,t){var i,r=t.data,n=!0;defined(r)&&(n=r.boundingVolumeSourceTile!==t||t._lastSelectionResult===TileSelectionResult.CULLED_BUT_NEEDED,i=r.terrainState),GlobeSurfaceTile.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this._vertexArraysToDestroy,n),r=t.data,n&&i!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==Visibility$1.NONE&&r.boundingVolumeSourceTile===t&&(n=!1,GlobeSurfaceTile.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this._vertexArraysToDestroy,n))};var boundingSphereScratch$1=new BoundingSphere,rectangleIntersectionScratch=new Rectangle,splitCartographicLimitRectangleScratch=new Rectangle,rectangleCenterScratch$3=new Cartographic;function clipRectangleAntimeridian(e,t){return t.west<t.east||(t=Rectangle.clone(t,splitCartographicLimitRectangleScratch),0<Rectangle.center(e,rectangleCenterScratch$3).longitude?t.east=CesiumMath.PI:t.west=-CesiumMath.PI),t}function isUndergroundVisible(e,t){return!!t.cameraUnderground||(!!t.globeTranslucencyState.translucent||!e.backFaceCulling&&(!(!defined(t=e._clippingPlanes)||!t.enabled)||!Rectangle.equals(e.cartographicLimitRectangle,Rectangle.MAX_VALUE)))}GlobeSurfaceTileProvider.prototype.computeTileVisibility=function(e,t,i){var r=this.computeDistanceToTile(e,t);e._distance=r;var n=isUndergroundVisible(this,t);if(t.fog.enabled&&!n&&1<=CesiumMath.fog(r,t.fog.density))return Visibility$1.NONE;var a=e.data,o=a.tileBoundingRegion;if(void 0===a.boundingVolumeSourceTile)return Visibility$1.PARTIAL;var s,l=t.cullingVolume,c=a.orientedBoundingBox;return!defined(c)&&defined(a.renderedMesh)&&(c=a.renderedMesh.boundingSphere3D),a.clippedByBoundaries=!1,r=clipRectangleAntimeridian(e.rectangle,this.cartographicLimitRectangle),defined(r=Rectangle.simpleIntersection(r,e.rectangle,rectangleIntersectionScratch))?(Rectangle.equals(r,e.rectangle)||(a.clippedByBoundaries=!0),t.mode!==SceneMode$1.SCENE3D&&(c=boundingSphereScratch$1,BoundingSphere.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,o.minimumHeight,o.maximumHeight,c),Cartesian3.fromElements(c.center.z,c.center.x,c.center.y,c.center),t.mode===SceneMode$1.MORPHING&&defined(a.renderedMesh)&&(c=BoundingSphere.union(a.renderedMesh.boundingSphere3D,c,c))),defined(c)?defined(r=this._clippingPlanes)&&r.enabled&&(r=r.computeIntersectionWithBoundingVolume(c),e.isClipped=r!==Intersect$1.INSIDE,r===Intersect$1.OUTSIDE)?Visibility$1.NONE:((c=l.computeVisibility(c))===Intersect$1.OUTSIDE?s=Visibility$1.NONE:c===Intersect$1.INTERSECTING?s=Visibility$1.PARTIAL:c===Intersect$1.INSIDE&&(s=Visibility$1.FULL),s===Visibility$1.NONE?s:(c=t.mode===SceneMode$1.SCENE3D&&t.camera.frustum instanceof OrthographicFrustum,t.mode!==SceneMode$1.SCENE3D||c||!defined(i)||n||!defined(a=a.occludeePointInScaledSpace)||i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(a,o.minimumHeight)?s:Visibility$1.NONE)):Visibility$1.PARTIAL):Visibility$1.NONE},GlobeSurfaceTileProvider.prototype.canRefine=function(e){return!!defined(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};var readyImageryScratch=[],canRenderTraversalStack=[];GlobeSurfaceTileProvider.prototype.canRenderWithoutLosingDetail=function(e,t){var i=e.data,r=readyImageryScratch;r.length=this._imageryLayers.length;var n,a=!1,o=!1;for(defined(i)&&(a=i.terrainState===TerrainState$2.READY,o=!0,n=i.imagery),f=0,m=r.length;f<m;++f)r[f]=o;if(defined(n))for(f=0,m=n.length;f<m;++f){var s,l=!defined(l=(s=n[f]).loadingImagery)||l.state===ImageryState$1.FAILED||l.state===ImageryState$1.INVALID;r[s=(s.loadingImagery||s.readyImagery).imageryLayer._layerIndex]=l&&r[s]}var c=this.quadtree._lastSelectionFrameNumber,u=canRenderTraversalStack;for(u.length=0,u.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);0<u.length;){var d=u.pop(),h=d._lastSelectionResultFrame===c?d._lastSelectionResult:TileSelectionResult.NONE;if(h===TileSelectionResult.RENDERED){if(defined(d.data)){if(!a&&d.data.terrainState===TerrainState$2.READY)return!1;for(var p=d.data.imagery,f=0,m=p.length;f<m;++f){var g=!defined(g=(y=p[f]).loadingImagery)||g.state===ImageryState$1.FAILED||g.state===ImageryState$1.INVALID,y=(y.loadingImagery||y.readyImagery).imageryLayer._layerIndex;if(g&&!r[y])return!1}}}else h===TileSelectionResult.REFINED&&u.push(d.southwestChild,d.southeastChild,d.northwestChild,d.northeastChild)}return!0};var tileDirectionScratch=new Cartesian3;GlobeSurfaceTileProvider.prototype.computeTileLoadPriority=function(e,t){var i=e.data;if(void 0===i)return 0;var r=i.orientedBoundingBox;return void 0===r?0:(i=t.camera.positionWC,t=t.camera.directionWC,r=Cartesian3.subtract(r.center,i,tileDirectionScratch),(i=Cartesian3.magnitude(r))<CesiumMath.EPSILON5?0:(Cartesian3.divideByScalar(r,i,r),(1-Cartesian3.dot(r,t))*e._distance))};var modifiedModelViewScratch$3=new Matrix4,modifiedModelViewProjectionScratch=new Matrix4,tileRectangleScratch=new Cartesian4,localizedCartographicLimitRectangleScratch=new Cartesian4,localizedTranslucencyRectangleScratch=new Cartesian4,rtcScratch$3=new Cartesian3,centerEyeScratch=new Cartesian3,southwestScratch=new Cartesian3,northeastScratch=new Cartesian3;GlobeSurfaceTileProvider.prototype.showTileThisFrame=function(e,t){for(var i=0,r=e.data.imagery,n=0,a=r.length;n<a;++n){var o=r[n];defined(o.readyImagery)&&0!==o.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];defined(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e),defined(e.data.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0,++(e=this._debug).tilesRendered,e.texturesRendered+=i};var cornerPositionsScratch$1=[new Cartesian3,new Cartesian3,new Cartesian3,new Cartesian3];function computeOccludeePoint$1(e,t,i,r,n,a){var o=e.quadtree._occluders.ellipsoid,s=o.ellipsoid;e=cornerPositionsScratch$1;return Cartesian3.fromRadians(i.west,i.south,n,s,e[0]),Cartesian3.fromRadians(i.east,i.south,n,s,e[1]),Cartesian3.fromRadians(i.west,i.north,n,s,e[2]),Cartesian3.fromRadians(i.east,i.north,n,s,e[3]),o.computeHorizonCullingPointPossiblyUnderEllipsoid(t,e,r,a)}function updateTileBoundingRegion(e,t,i){var r=e.data;void 0===r&&(r=e.data=new GlobeSurfaceTile),void 0===r.tileBoundingRegion&&(r.tileBoundingRegion=new TileBoundingRegion({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:e.tilingScheme.ellipsoid,minimumHeight:0,maximumHeight:0}));var n=r.terrainData,a=r.mesh,o=r.tileBoundingRegion;if(void 0!==a&&void 0!==a.minimumHeight&&void 0!==a.maximumHeight)return o.minimumHeight=a.minimumHeight,o.maximumHeight=a.maximumHeight,e;if(void 0!==n&&void 0!==n._minimumHeight&&void 0!==n._maximumHeight)return o.minimumHeight=n._minimumHeight*i.terrainExaggeration,o.maximumHeight=n._maximumHeight*i.terrainExaggeration,e;o.minimumHeight=Number.NaN,o.maximumHeight=Number.NaN;for(var s=e.parent;void 0!==s;){var l=s.data;if(void 0!==l){var c=l.mesh;if(void 0!==c&&void 0!==c.minimumHeight&&void 0!==c.maximumHeight)return o.minimumHeight=c.minimumHeight,o.maximumHeight=c.maximumHeight,s;if(void 0!==(l=l.terrainData)&&void 0!==l._minimumHeight&&void 0!==l._maximumHeight)return o.minimumHeight=l._minimumHeight*i.terrainExaggeration,o.maximumHeight=l._maximumHeight*i.terrainExaggeration,s}s=s.parent}}function getTileReadyCallback(e,t,i){return function(r){for(var n=-1,a=r.data.imagery,o=a.length,s=0;s<o;++s)if((u=defaultValue((l=a[s]).readyImagery,l.loadingImagery)).imageryLayer===t){n=s;break}if(-1!==n){var l,c=n+e,u=defined(l=a[c])?defaultValue(l.readyImagery,l.loadingImagery):void 0;if(!defined(u)||u.imageryLayer!==t)return!t._createTileImagerySkeletons(r,i,c);for(s=n;s<c;++s)a[s].freeResources();a.splice(n,e)}return!0}}GlobeSurfaceTileProvider.prototype.computeDistanceToTile=function(e,t){var i=updateTileBoundingRegion(e,this.terrainProvider,t),r=e.data,n=r.tileBoundingRegion;if(void 0===i)return 9999999999;r.boundingVolumeSourceTile!==i&&(r.boundingVolumeSourceTile=i,defined(e.rectangle)&&(r.orientedBoundingBox=OrientedBoundingBox.fromRectangle(e.rectangle,n.minimumHeight,n.maximumHeight,e.tilingScheme.ellipsoid,r.orientedBoundingBox),r.occludeePointInScaledSpace=computeOccludeePoint$1(this,r.orientedBoundingBox.center,e.rectangle,n.minimumHeight,n.maximumHeight,r.occludeePointInScaledSpace)));var a=n.minimumHeight;i=n.maximumHeight;return r.boundingVolumeSourceTile!==e&&(r=t.camera.positionCartographic.height,e=Math.abs(r-a),Math.abs(r-i)<e?(n.minimumHeight=a,n.maximumHeight=a):(n.minimumHeight=i,n.maximumHeight=i)),t=n.distanceToCamera(t),n.minimumHeight=a,n.maximumHeight=i,t},GlobeSurfaceTileProvider.prototype.isDestroyed=function(){return!1},GlobeSurfaceTileProvider.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),destroyObject(this)},GlobeSurfaceTileProvider.prototype._onLayerAdded=function(e,t){var i,r,n,a;e.show&&(i=this._terrainProvider,r=this,n=e.imageryProvider,a=this._imageryLayersUpdatedEvent,n._reload=function(){e._imageryCache={},r._quadtree.forEachLoadedTile((function(t){if(!defined(t._loadedCallbacks[e._layerIndex])){for(var r,n=t.data.imagery,a=n.length,o=-1,s=0,l=0;l<a;++l){var c=n[l];if(defaultValue(c.readyImagery,c.loadingImagery).imageryLayer===e)-1===o&&(o=l),++s;else if(-1!==o)break}-1!==o&&(r=o+s,e._createTileImagerySkeletons(t,i,r)&&(t._loadedCallbacks[e._layerIndex]=getTileReadyCallback(s,e,i),t.state=QuadtreeTileLoadState$1.LOADING))}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=QuadtreeTileLoadState$1.LOADING,0===t.level||t._lastSelectionResultFrame===r.quadtree._lastSelectionFrameNumber&&t._lastSelectionResult===TileSelectionResult.RENDERED||(t.renderable=!1))})),this._layerOrderChanged=!0,a.raiseEvent())},GlobeSurfaceTileProvider.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.imagery,r=-1,n=0,a=0,o=i.length;a<o;++a){var s=i[a],l=s.loadingImagery;if(defined(l)||(l=s.readyImagery),l.imageryLayer===e)-1===r&&(r=a),s.freeResources(),++n;else if(-1!==r)break}-1!==r&&i.splice(r,n)})),defined(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()},GlobeSurfaceTileProvider.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},GlobeSurfaceTileProvider.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var scratchClippingPlanesMatrix$2=new Matrix4,scratchInverseTransposeClippingPlanesMatrix$1=new Matrix4,getDebugOrientedBoundingBox,getDebugBoundingSphere,debugDestroyPrimitive,omi,pmi,lmi,mmi,nmi;function createTileUniformMap(e,t){var i={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view,i=Matrix4.multiplyByPoint(t,this.properties.rtc,centerEyeScratch);return Matrix4.setTranslation(t,i,modifiedModelViewScratch$3),modifiedModelViewScratch$3},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection,r=Matrix4.multiplyByPoint(t,this.properties.rtc,centerEyeScratch);return Matrix4.setTranslation(t,r,modifiedModelViewProjectionScratch),Matrix4.multiply(i,modifiedModelViewProjectionScratch,modifiedModelViewProjectionScratch),modifiedModelViewProjectionScratch},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){var i=t._clippingPlanes;return defined(i)&&defined(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){var i=defined(i=t._clippingPlanes)?Matrix4.multiply(e.context.uniformState.view,i.modelMatrix,scratchClippingPlanesMatrix$2):Matrix4.IDENTITY;return Matrix4.inverseTranspose(i,scratchInverseTransposeClippingPlanesMatrix$1)},u_clippingPlanesEdgeStyle:function(){var e=this.properties.clippingPlanesEdgeColor;return e.alpha=this.properties.clippingPlanesEdgeWidth,e},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},properties:{initialColor:new Cartesian4(0,0,.5,1),fillHighlightColor:new Color(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new Cartesian2(65e5,9e6),nightFadeDistance:new Cartesian2(1e7,4e7),hsbShift:new Cartesian3,center3D:void 0,rtc:new Cartesian3,modifiedModelView:new Matrix4,tileRectangle:new Cartesian4,dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new Cartesian2,southMercatorYAndOneOverHeight:new Cartesian2,waterMask:void 0,waterMaskTranslationAndScale:new Cartesian4,minMaxHeight:new Cartesian2,scaleAndBias:new Matrix4,clippingPlanesEdgeColor:Color.clone(Color.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new Cartesian4,frontFaceAlphaByDistance:new Cartesian4,backFaceAlphaByDistance:new Cartesian4,localizedTranslucencyRectangle:new Cartesian4,undergroundColor:Color.clone(Color.TRANSPARENT),undergroundColorAlphaByDistance:new Cartesian4}};return defined(t.materialUniformMap)?combine(i,t.materialUniformMap):i}function createWireframeVertexArrayIfNecessary(e,t,i){var r,n;if(defined((i=i.data).vertexArray)?(r=i.mesh,n=i.vertexArray):defined(i.fill)&&defined(i.fill.vertexArray)&&(r=i.fill.mesh,n=i.fill.vertexArray),defined(r)&&defined(n)){if(defined(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===r)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=createWireframeVertexArray(e,n,r),i.wireframeVertexArray.mesh=r}}function createWireframeVertexArray(e,t,i){return i={indices:i.indices,primitiveType:PrimitiveType$1.TRIANGLES},GeometryPipeline.toWireframe(i),i=i.indices,i=Buffer$1.createIndexBuffer({context:e,typedArray:i,usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.fromSizeInBytes(i.BYTES_PER_ELEMENT)}),new VertexArray({context:e,attributes:t._attributes,indexBuffer:i})}function qmi(e){return new Primitive({geometryInstances:e,appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})}lmi=new GeometryInstance({geometry:BoxOutlineGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2)})}),mmi=new GeometryInstance({geometry:new SphereOutlineGeometry({radius:1})}),nmi=new Matrix4,getDebugOrientedBoundingBox=function(e,t){return e===omi?pmi:(debugDestroyPrimitive(),omi=e,nmi=Matrix4.fromRotationTranslation(e.halfAxes,e.center,nmi),lmi.modelMatrix=nmi,lmi.attributes.color=ColorGeometryInstanceAttribute.fromColor(t),pmi=qmi(lmi))},getDebugBoundingSphere=function(e,t){return e===omi?pmi:(debugDestroyPrimitive(),omi=e,nmi=Matrix4.fromTranslation(e.center,nmi),nmi=Matrix4.multiplyByUniformScale(nmi,e.radius,nmi),mmi.modelMatrix=nmi,mmi.attributes.color=ColorGeometryInstanceAttribute.fromColor(t),pmi=qmi(mmi))},debugDestroyPrimitive=function(){defined(pmi)&&(pmi.destroy(),omi=pmi=void 0)};var otherPassesInitialColor=new Cartesian4(0,0,0,0),surfaceShaderSetOptionsScratch={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0},defaultUndergroundColor=Color.TRANSPARENT,defaultundergroundColorAlphaByDistance=new NearFarScalar;function addDrawCommandsForTile(e,t,i){var r=t.data;defined(r.vertexArray)||(void 0===r.fill&&(r.fill=new TerrainFillMesh(t)),r.fill.update(e,i));var n=i.creditDisplay,a=r.terrainData;if(defined(a)&&defined(a.credits))for(var o=a.credits,s=0,l=o.length;s<l;++s)n.addCredit(o[s]);var c=ContextLimits.maximumTextureImageUnits,u=r.waterMaskTexture,d=r.waterMaskTranslationAndScale;!defined(u)&&defined(r.fill)&&(u=r.fill.waterMaskTexture,d=r.fill.waterMaskTranslationAndScale);var h=i.cameraUnderground,p=i.globeTranslucencyState,f=p.translucent,m=p.frontFaceAlphaByDistance,g=p.backFaceAlphaByDistance,y=p.rectangle,_=defaultValue(e.undergroundColor,defaultUndergroundColor),v=defaultValue(e.undergroundColorAlphaByDistance,defaultundergroundColorAlphaByDistance),C=isUndergroundVisible(e,i)&&i.mode===SceneMode$1.SCENE3D&&0<_.alpha&&(0<v.nearValue||0<v.farValue),x=e.hasWaterMask&&defined(u),b=e.oceanNormalMap,S=x&&defined(b),T=e.terrainProvider.ready&&e.terrainProvider.hasVertexNormals,E=i.fog.enabled&&!h,w=e.showGroundAtmosphere&&i.mode===SceneMode$1.SCENE3D,A=ShadowMode$1.castShadows(e.shadows)&&!f,P=ShadowMode$1.receiveShadows(e.shadows)&&!f,D=e.hueShift,M=e.saturationShift,I=e.brightnessShift,R=!(CesiumMath.equalsEpsilon(D,0,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(M,0,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(I,0,CesiumMath.EPSILON7)),O=!1;w&&(N=Cartesian3.magnitude(i.camera.positionWC),O=e.nightFadeOutDistance<N),x&&--c,S&&--c,defined(i.shadowState)&&i.shadowState.shadowsEnabled&&--c,defined(e.clippingPlanes)&&e.clippingPlanes.enabled&&--c,c-=p.numberOfTextureUniforms;var L,N,F=r.renderedMesh,B=F.center,V=F.encoding,k=tileRectangleScratch,z=0,G=0,U=0,$=0,H=!1;i.mode!==SceneMode$1.SCENE3D&&(a=(L=i.mapProjection).project(Rectangle.southwest(t.rectangle),southwestScratch),N=L.project(Rectangle.northeast(t.rectangle),northeastScratch),k.x=a.x,k.y=a.y,k.z=N.x,k.w=N.y,i.mode!==SceneMode$1.MORPHING&&((B=rtcScratch$3).x=0,B.y=.5*(k.z+k.x),B.z=.5*(k.w+k.y),k.x-=B.y,k.y-=B.z,k.z-=B.y,k.w-=B.z),i.mode===SceneMode$1.SCENE2D&&V.quantization===TerrainQuantization$1.BITS12&&(a=1/(Math.pow(2,12)-1)*.5,N=(k.z-k.x)*a,a=(k.w-k.y)*a,k.x-=N,k.y-=a,k.z+=N,k.w+=a),L instanceof WebMercatorProjection&&(z=t.rectangle.south,G=t.rectangle.north,U=WebMercatorProjection.geodeticLatitudeToMercatorAngle(z),$=1/(WebMercatorProjection.geodeticLatitudeToMercatorAngle(G)-U),H=!0));var W=surfaceShaderSetOptionsScratch;W.frameState=i,W.surfaceTile=r,W.showReflectiveOcean=x,W.showOceanWaves=S,W.enableLighting=e.enableLighting,W.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,W.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,W.showGroundAtmosphere=w,W.perFragmentGroundAtmosphere=O,W.hasVertexNormals=T,W.useWebMercatorProjection=H,W.clippedByBoundaries=r.clippedByBoundaries;var j=r.imagery,q=0,Y=j.length,X=e.showSkirts&&!h&&!f,Q=(H=(T=e.backFaceCulling&&!h&&!f)?e._renderState:e._disableCullingRenderState,T?e._blendRenderState:e._disableCullingBlendRenderState),Z=H,J=e._firstPassInitialColor,K=i.context;if(defined(e._debug.boundingSphereTile)||debugDestroyPrimitive(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;for(var ee=e._drawCommands.length,te=0;te<ee;++te)e._uniformMaps[te]=createTileUniformMap(i,e)}do{var ie,re,ne=0;e._drawCommands.length<=e._usedDrawCommands?((ie=new DrawCommand).owner=t,ie.cull=!1,ie.boundingVolume=new BoundingSphere,ie.orientedBoundingBox=void 0,re=createTileUniformMap(i,e),e._drawCommands.push(ie),e._uniformMaps.push(re)):(ie=e._drawCommands[e._usedDrawCommands],re=e._uniformMaps[e._usedDrawCommands]),ie.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile&&(defined(ce=r.orientedBoundingBox)?getDebugOrientedBoundingBox(ce,Color.RED).update(i):defined(F)&&defined(F.boundingSphere3D)&&getDebugBoundingSphere(F.boundingSphere3D,Color.RED).update(i));var ae=re.properties;Cartesian4.clone(J,ae.initialColor),ae.oceanNormalMap=b,ae.lightingFadeDistance.x=e.lightingFadeOutDistance,ae.lightingFadeDistance.y=e.lightingFadeInDistance,ae.nightFadeDistance.x=e.nightFadeOutDistance,ae.nightFadeDistance.y=e.nightFadeInDistance,ae.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;var oe=h?m:g;defined(ue=h?g:m)&&(Cartesian4.fromElements(ue.near,ue.nearValue,ue.far,ue.farValue,ae.frontFaceAlphaByDistance),Cartesian4.fromElements(oe.near,oe.nearValue,oe.far,oe.farValue,ae.backFaceAlphaByDistance)),Cartesian4.fromElements(v.near,v.nearValue,v.far,v.farValue,ae.undergroundColorAlphaByDistance),Color.clone(_,ae.undergroundColor);var se=!defined(r.vertexArray)&&defined(e.fillHighlightColor)&&0<e.fillHighlightColor.alpha;se&&Color.clone(e.fillHighlightColor,ae.fillHighlightColor),ae.center3D=F.center,Cartesian3.clone(B,ae.rtc),Cartesian4.clone(k,ae.tileRectangle),ae.southAndNorthLatitude.x=z,ae.southAndNorthLatitude.y=G,ae.southMercatorYAndOneOverHeight.x=U,ae.southMercatorYAndOneOverHeight.y=$;var le=localizedCartographicLimitRectangleScratch,ce=clipRectangleAntimeridian(t.rectangle,e.cartographicLimitRectangle),ue=localizedTranslucencyRectangleScratch;oe=clipRectangleAntimeridian(t.rectangle,y);Cartesian3.fromElements(D,M,I,ae.hsbShift);var de=t.rectangle,he=1/de.width,pe=1/de.height;le.x=(ce.west-de.west)*he,le.y=(ce.south-de.south)*pe,le.z=(ce.east-de.west)*he,le.w=(ce.north-de.south)*pe,Cartesian4.clone(le,ae.localizedCartographicLimitRectangle),ue.x=(oe.west-de.west)*he,ue.y=(oe.south-de.south)*pe,ue.z=(oe.east-de.west)*he,ue.w=(oe.north-de.south)*pe,Cartesian4.clone(ue,ae.localizedTranslucencyRectangle);le=E&&CesiumMath.fog(t._distance,i.fog.density)>CesiumMath.EPSILON3,R=R&&(le||w);for(var fe=!1,me=!1,ge=!1,ye=!1,_e=!1,ve=!1,Ce=!1,xe=!1,be=!1,Se=!1;ne<c&&q<Y;){var Te=j[q],Ee=Te.readyImagery;if(++q,defined(Ee)&&0!==Ee.imageryLayer.alpha){var we=Te.useWebMercatorT?Ee.textureWebMercator:Ee.texture,Ae=Ee.imageryLayer;defined(Te.textureTranslationAndScale)||(Te.textureTranslationAndScale=Ae._calculateTextureTranslationAndScale(t,Te)),ae.dayTextures[ne]=we,ae.dayTextureTranslationAndScale[ne]=Te.textureTranslationAndScale,ae.dayTextureTexCoordsRectangle[ne]=Te.textureCoordinateRectangle,ae.dayTextureUseWebMercatorT[ne]=Te.useWebMercatorT,ae.dayTextureAlpha[ne]=Ae.alpha,ve=ve||1!==ae.dayTextureAlpha[ne],ae.dayTextureNightAlpha[ne]=Ae.nightAlpha,Ce=Ce||1!==ae.dayTextureNightAlpha[ne],ae.dayTextureDayAlpha[ne]=Ae.dayAlpha,Ce=Ce||1!==ae.dayTextureDayAlpha[ne],ae.dayTextureBrightness[ne]=Ae.brightness,fe=fe||ae.dayTextureBrightness[ne]!==ImageryLayer.DEFAULT_BRIGHTNESS,ae.dayTextureContrast[ne]=Ae.contrast,me=me||ae.dayTextureContrast[ne]!==ImageryLayer.DEFAULT_CONTRAST,ae.dayTextureHue[ne]=Ae.hue,ge=ge||ae.dayTextureHue[ne]!==ImageryLayer.DEFAULT_HUE,ae.dayTextureSaturation[ne]=Ae.saturation,ye=ye||ae.dayTextureSaturation[ne]!==ImageryLayer.DEFAULT_SATURATION,ae.dayTextureOneOverGamma[ne]=1/Ae.gamma,_e=_e||ae.dayTextureOneOverGamma[ne]!==1/ImageryLayer.DEFAULT_GAMMA,ae.dayTextureSplit[ne]=Ae.splitDirection,xe=xe||0!==ae.dayTextureSplit[ne],defined(Te=ae.dayTextureCutoutRectangles[ne])||(Te=ae.dayTextureCutoutRectangles[ne]=new Cartesian4),Cartesian4.clone(Cartesian4.ZERO,Te),defined(Ae.cutoutRectangle)&&(Pe=clipRectangleAntimeridian(de,Ae.cutoutRectangle),be=defined(Rectangle.simpleIntersection(Pe,de,rectangleIntersectionScratch))||be,Te.x=(Pe.west-de.west)*he,Te.y=(Pe.south-de.south)*pe,Te.z=(Pe.east-de.west)*he,Te.w=(Pe.north-de.south)*pe),defined(Te=ae.colorsToAlpha[ne])||(Te=ae.colorsToAlpha[ne]=new Cartesian4);var Pe=defined(Ae.colorToAlpha)&&0<Ae.colorToAlphaThreshold;Se=Se||Pe;if(Pe?(Pe=Ae.colorToAlpha,Te.x=Pe.red,Te.y=Pe.green,Te.z=Pe.blue,Te.w=Ae.colorToAlphaThreshold):Te.w=-1,defined(Ee.credits))for(var De=Ee.credits,Me=0,Ie=De.length;Me<Ie;++Me)n.addCredit(De[Me]);++ne}}ae.dayTextures.length=ne,ae.waterMask=u,Cartesian4.clone(d,ae.waterMaskTranslationAndScale),ae.minMaxHeight.x=V.minimumHeight,ae.minMaxHeight.y=V.maximumHeight,Matrix4.clone(V.matrix,ae.scaleAndBias),(ue=defined(oe=e._clippingPlanes)&&oe.enabled&&t.isClipped)&&(ae.clippingPlanesEdgeColor=Color.clone(oe.edgeColor,ae.clippingPlanesEdgeColor),ae.clippingPlanesEdgeWidth=oe.edgeWidth),W.numberOfDayTextures=ne,W.applyBrightness=fe,W.applyContrast=me,W.applyHue=ge,W.applySaturation=ye,W.applyGamma=_e,W.applyAlpha=ve,W.applyDayNightAlpha=Ce,W.applySplit=xe,W.enableFog=le,W.enableClippingPlanes=ue,W.clippingPlanes=oe,W.hasImageryLayerCutout=be,W.colorCorrect=R,W.highlightFillTile=se,W.colorToAlpha=Se,W.showUndergroundColor=C,W.translucent=f,ue=r.renderedMesh.indices.length,X||(ue=r.renderedMesh.indexCountWithoutSkirts),ie.shaderProgram=e._surfaceShaderSet.getShaderProgram(W),ie.castShadows=A,ie.receiveShadows=P,ie.renderState=Z,ie.primitiveType=PrimitiveType$1.TRIANGLES,ie.vertexArray=r.vertexArray||r.fill.vertexArray,ie.count=ue,ie.uniformMap=re,ie.pass=Pass$1.GLOBE,e._debug.wireframe&&(createWireframeVertexArrayIfNecessary(K,e,t),defined(r.wireframeVertexArray)&&(ie.vertexArray=r.wireframeVertexArray,ie.primitiveType=PrimitiveType$1.LINES,ie.count=2*ue)),oe=ie.boundingVolume,se=ie.orientedBoundingBox,i.mode!==SceneMode$1.SCENE3D?(ue=r.tileBoundingRegion,BoundingSphere.fromRectangleWithHeights2D(t.rectangle,i.mapProjection,ue.minimumHeight,ue.maximumHeight,oe),Cartesian3.fromElements(oe.center.z,oe.center.x,oe.center.y,oe.center),i.mode===SceneMode$1.MORPHING&&(oe=BoundingSphere.union(F.boundingSphere3D,oe,oe))):(ie.boundingVolume=BoundingSphere.clone(F.boundingSphere3D,oe),ie.orientedBoundingBox=OrientedBoundingBox.clone(r.orientedBoundingBox,se)),ie.dirty=!0,f&&p.updateDerivedCommands(ie,i),pushCommand(ie,i),Z=Q,J=otherPassesInitialColor}while(q<Y)}function GlobeTranslucency(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=Rectangle.clone(Rectangle.MAX_VALUE)}function ImageryLayerCollection(){this._layers=[],this.layerAdded=new Event,this.layerRemoved=new Event,this.layerMoved=new Event,this.layerShownOrHidden=new Event}function getLayerIndex(e,t){return e.indexOf(t)}function swapLayers(e,t,i){var r,n=e._layers;(t=CesiumMath.clamp(t,0,n.length-1))!==(i=CesiumMath.clamp(i,0,n.length-1))&&(r=n[t],n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t))}Object.defineProperties(GlobeTranslucency.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){this._frontFaceAlphaByDistance=NearFarScalar.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){this._backFaceAlphaByDistance=NearFarScalar.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){defined(e)||(e=Rectangle.clone(Rectangle.MAX_VALUE)),Rectangle.clone(e,this._rectangle)}}}),Object.defineProperties(ImageryLayerCollection.prototype,{length:{get:function(){return this._layers.length}}}),ImageryLayerCollection.prototype.add=function(e,t){defined(t)?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t)},ImageryLayerCollection.prototype.addImageryProvider=function(e,t){return e=new ImageryLayer(e),this.add(e,t),e},ImageryLayerCollection.prototype.remove=function(e,t){t=defaultValue(t,!0);var i=this._layers.indexOf(e);return-1!==i&&(this._layers.splice(i,1),this._update(),this.layerRemoved.raiseEvent(e,i),t&&e.destroy(),!0)},ImageryLayerCollection.prototype.removeAll=function(e){e=defaultValue(e,!0);for(var t=this._layers,i=0,r=t.length;i<r;i++){var n=t[i];this.layerRemoved.raiseEvent(n,i),e&&n.destroy()}this._layers=[]},ImageryLayerCollection.prototype.contains=function(e){return-1!==this.indexOf(e)},ImageryLayerCollection.prototype.indexOf=function(e){return this._layers.indexOf(e)},ImageryLayerCollection.prototype.get=function(e){return this._layers[e]},ImageryLayerCollection.prototype.raise=function(e){swapLayers(this,e=getLayerIndex(this._layers,e),e+1)},ImageryLayerCollection.prototype.lower=function(e){swapLayers(this,e=getLayerIndex(this._layers,e),e-1)},ImageryLayerCollection.prototype.raiseToTop=function(e){var t=getLayerIndex(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},ImageryLayerCollection.prototype.lowerToBottom=function(e){var t=getLayerIndex(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var applicableRectangleScratch=new Rectangle,comparisonPoint;function QuadtreeOccluders(e){this._ellipsoid=new EllipsoidalOccluder(e.ellipsoid,Cartesian3.ZERO)}function QuadtreeTile(e){this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=TileSelectionResult.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=QuadtreeTileLoadState$1.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}function freeTile(e){defined(e)&&e.freeResources()}function TileReplacementQueue(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function remove$1(e,t){var i=t.replacementPrevious,r=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=r),t===e.head?e.head=r:i.replacementNext=r,t===e.tail?e.tail=i:r.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}function QuadtreePrimitive(e){this._tileProvider=e.tileProvider,(this._tileProvider.quadtree=this)._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new TileReplacementQueue,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=defaultValue(e.maximumScreenSpaceError,2),this.tileCacheSize=defaultValue(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new QuadtreeOccluders({ellipsoid:t}),this._tileLoadProgressEvent=new Event,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}function invalidateAllTiles(e){var t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,clearTileLoadQueue(e);var i=e._levelZeroTiles;if(defined(i))for(var r=0;r<i.length;++r){for(var n=i[r].customData,a=n.length,o=0;o<a;++o){var s=n[o];s.level=0,e._addHeightCallbacks.push(s)}i[r].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}function clearTileLoadQueue(e){var t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}function updateTileLoadProgress(e,t){var i=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;i===e._lastTileLoadQueueLength&&!e._tilesInvalidated||(t.afterRender.push(Event.prototype.raiseEvent.bind(e._tileLoadProgressEvent,i)),e._lastTileLoadQueueLength=i),(i=e._debug).enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce((function(e,t){return Math.max(e,t.level)}),-1),i.tilesRendered=e._tilesToRender.length,i.tilesVisited===i.lastTilesVisited&&i.tilesRendered===i.lastTilesRendered&&i.tilesCulled===i.lastTilesCulled&&i.maxDepth===i.lastMaxDepth&&i.tilesWaitingForChildren===i.lastTilesWaitingForChildren&&i.maxDepthVisited===i.lastMaxDepthVisited||(console.log("Visited "+i.tilesVisited+", Rendered: "+i.tilesRendered+", Culled: "+i.tilesCulled+", Max Depth Rendered: "+i.maxDepth+", Max Depth Visited: "+i.maxDepthVisited+", Waiting for children: "+i.tilesWaitingForChildren),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren,i.lastMaxDepthVisited=i.maxDepthVisited))}ImageryLayerCollection.prototype.pickImageryLayerFeatures=function(e,t){if(defined(e=t.globe.pick(e,t))){for(var i,r=t.globe.ellipsoid.cartesianToCartographic(e),n=t.globe._surface._tilesToRender,a=0;!defined(i)&&a<n.length;++a){var o=n[a];Rectangle.contains(o.rectangle,r)&&(i=o)}if(defined(i)){for(var s=i.data.imagery,l=[],c=[],u=s.length-1;0<=u;--u){var d,h,p,f=s[u],m=f.readyImagery;defined(m)&&defined((p=m.imageryLayer.imageryProvider).pickFeatures)&&Rectangle.contains(m.rectangle,r)&&(h=1/1024,(d=applicableRectangleScratch).west=CesiumMath.lerp(i.rectangle.west,i.rectangle.east,f.textureCoordinateRectangle.x-h),d.east=CesiumMath.lerp(i.rectangle.west,i.rectangle.east,f.textureCoordinateRectangle.z+h),d.south=CesiumMath.lerp(i.rectangle.south,i.rectangle.north,f.textureCoordinateRectangle.y-h),d.north=CesiumMath.lerp(i.rectangle.south,i.rectangle.north,f.textureCoordinateRectangle.w+h),!Rectangle.contains(d,r)||defined(p=p.pickFeatures(m.x,m.y,m.level,r.longitude,r.latitude))&&(l.push(p),c.push(m.imageryLayer)))}if(0!==l.length)return when.all(l,(function(e){for(var t=[],i=0;i<e.length;++i){var n=e[i],a=c[i];if(defined(n)&&0<n.length)for(var o=0;o<n.length;++o){var s=n[o];s.imageryLayer=a,defined(s.position)||(s.position=r),t.push(s)}}return t}))}}},ImageryLayerCollection.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,r=t.length;i<r;++i)t[i].queueReprojectionCommands(e)},ImageryLayerCollection.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;t<i;++t)e[t].cancelReprojections()},ImageryLayerCollection.prototype.isDestroyed=function(){return!1},ImageryLayerCollection.prototype.destroy=function(){return this.removeAll(!0),destroyObject(this)},ImageryLayerCollection.prototype._update=function(){for(var e,t,i=!0,r=this._layers,n=0,a=r.length;n<a;++n)(t=r[n])._layerIndex=n,t.show?(t._isBaseLayer=i,i=!1):t._isBaseLayer=!1,t.show!==t._show&&(defined(t._show)&&(defined(e)||(e=[]),e.push(t)),t._show=t.show);if(defined(e))for(n=0,a=e.length;n<a;++n)t=e[n],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},Object.defineProperties(QuadtreeOccluders.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),QuadtreeTile.createLevelZeroTiles=function(e){for(var t=e.getNumberOfXTilesAtLevel(0),i=e.getNumberOfYTilesAtLevel(0),r=new Array(t*i),n=0,a=0;a<i;++a)for(var o=0;o<t;++o)r[n++]=new QuadtreeTile({tilingScheme:e,x:o,y:a,level:0});return r},QuadtreeTile.prototype._updateCustomData=function(e,t,i){var r,n,a=this.customData;if(defined(t)&&defined(i)){for(a=a.filter((function(e){return-1===i.indexOf(e)})),this._customData=a,n=this._rectangle,s=0;s<t.length;++s)r=t[s],Rectangle.contains(n,r.positionCartographic)&&a.push(r);this._frameUpdated=e}else if(defined(e=this._parent)&&this._frameUpdated!==e._frameUpdated){a.length=0,n=this._rectangle;for(var o=e.customData,s=0;s<o.length;++s)r=o[s],Rectangle.contains(n,r.positionCartographic)&&a.push(r);this._frameUpdated=e._frameUpdated}},Object.defineProperties(QuadtreeTile.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return defined(this._southwestChild)||(this._southwestChild=new QuadtreeTile({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return defined(this._southeastChild)||(this._southeastChild=new QuadtreeTile({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return defined(this._northwestChild)||(this._northwestChild=new QuadtreeTile({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return defined(this._northeastChild)||(this._northeastChild=new QuadtreeTile({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<QuadtreeTileLoadState$1.DONE}},eligibleForUnloading:{get:function(){var e=!0;return defined(this.data)&&(defined(e=this.data.eligibleForUnloading)||(e=!0)),e}}}),QuadtreeTile.prototype.findLevelZeroTile=function(e,t,i){var r=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=r:r<=t&&(t-=r),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter((function(e){return e.x===t&&e.y===i}))[0]},QuadtreeTile.prototype.findTileToWest=function(e){var t=this.parent;return void 0===t?this.findLevelZeroTile(e,this.x-1,this.y):t.southeastChild===this?t.southwestChild:t.northeastChild===this?t.northwestChild:void 0!==(e=t.findTileToWest(e))?t.southwestChild===this?e.southeastChild:e.northeastChild:void 0},QuadtreeTile.prototype.findTileToEast=function(e){var t=this.parent;return void 0===t?this.findLevelZeroTile(e,this.x+1,this.y):t.southwestChild===this?t.southeastChild:t.northwestChild===this?t.northeastChild:void 0!==(e=t.findTileToEast(e))?t.southeastChild===this?e.southwestChild:e.northwestChild:void 0},QuadtreeTile.prototype.findTileToSouth=function(e){var t=this.parent;return void 0===t?this.findLevelZeroTile(e,this.x,this.y+1):t.northwestChild===this?t.southwestChild:t.northeastChild===this?t.southeastChild:void 0!==(e=t.findTileToSouth(e))?t.southwestChild===this?e.northwestChild:e.northeastChild:void 0},QuadtreeTile.prototype.findTileToNorth=function(e){var t=this.parent;return void 0===t?this.findLevelZeroTile(e,this.x,this.y-1):t.southwestChild===this?t.northwestChild:t.southeastChild===this?t.northeastChild:void 0!==(e=t.findTileToNorth(e))?t.northwestChild===this?e.southwestChild:e.southeastChild:void 0},QuadtreeTile.prototype.freeResources=function(){this.state=QuadtreeTileLoadState$1.START,this.renderable=!1,this.upsampledFromParent=!1,defined(this.data)&&defined(this.data.freeResources)&&this.data.freeResources(),freeTile(this._southwestChild),this._southwestChild=void 0,freeTile(this._southeastChild),this._southeastChild=void 0,freeTile(this._northwestChild),this._northwestChild=void 0,freeTile(this._northeastChild),this._northeastChild=void 0},TileReplacementQueue.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},TileReplacementQueue.prototype.trimTiles=function(e){for(var t=this.tail,i=!0;i&&defined(this._lastBeforeStartOfFrame)&&this.count>e&&defined(t);){i=t!==this._lastBeforeStartOfFrame;var r=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),remove$1(this,t)),t=r}},TileReplacementQueue.prototype.markTileRendered=function(e){var t=this.head;if(t!==e){if(++this.count,!defined(t))return e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e);(defined(e.replacementPrevious)||defined(e.replacementNext))&&remove$1(this,e),e.replacementPrevious=void 0,(e.replacementNext=t).replacementPrevious=e,this.head=e}else e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)},Object.defineProperties(QuadtreePrimitive.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),QuadtreePrimitive.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0},QuadtreePrimitive.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;defined(t);)t.state!==QuadtreeTileLoadState$1.START&&e(t),t=t.replacementNext},QuadtreePrimitive.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,r=t.length;i<r;++i)e(t[i])},QuadtreePrimitive.prototype.updateHeight=function(e,t){var i=this,r={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,removeFunc:function(){for(var e=i._addHeightCallbacks,t=e.length,n=0;n<t;++n)if(e[n]===r){e.splice(n,1);break}i._removeHeightCallbacks.push(r)}};return i._addHeightCallbacks.push(r),r.removeFunc},QuadtreePrimitive.prototype.update=function(e){defined(this._tileProvider.update)&&this._tileProvider.update(e)},QuadtreePrimitive.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(invalidateAllTiles(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),clearTileLoadQueue(this),this._debug.suspendLodUpdate||this._tileReplacementQueue.markStartOfRenderFrame())},QuadtreePrimitive.prototype.render=function(e){var t=e.passes,i=this._tileProvider;t.render&&(i.beginUpdate(e),selectTilesForRendering(this,e),createRenderCommandsForSelectedTiles(this,e),i.endUpdate(e)),t.pick&&0<this._tilesToRender.length&&i.updateForPick(e)},QuadtreePrimitive.prototype.endFrame=function(e){e.passes.render&&e.mode!==SceneMode$1.MORPHING&&(processTileLoadQueue(this,e),updateHeights(this,e),updateTileLoadProgress(this,e))},QuadtreePrimitive.prototype.isDestroyed=function(){return!1},QuadtreePrimitive.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var centerScratch$5=new Cartographic;function compareDistanceToPoint(e,t){var i,r=(i=Rectangle.center(e.rectangle,centerScratch$5)).longitude-comparisonPoint.longitude;return r*r+(e=i.latitude-comparisonPoint.latitude)*e-((t=(i=Rectangle.center(t.rectangle,centerScratch$5)).longitude-comparisonPoint.longitude)*t+(i=i.latitude-comparisonPoint.latitude)*i)}var cameraOriginScratch=new Cartesian3,rootTraversalDetails=[];function selectTilesForRendering(e,t){var i,r=e._debug;if(!r.suspendLodUpdate){e._tilesToRender.length=0;var n,a=e._tileProvider;if(!defined(e._levelZeroTiles)){if(!a.ready)return;var o=a.tilingScheme;e._levelZeroTiles=QuadtreeTile.createLevelZeroTiles(o);var s=e._levelZeroTiles.length;if(rootTraversalDetails.length<s)for(rootTraversalDetails=new Array(s),i=0;i<s;++i)void 0===rootTraversalDetails[i]&&(rootTraversalDetails[i]=new TraversalDetails)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var l=e._levelZeroTiles,c=1<l.length?e._occluders:void 0;comparisonPoint=t.camera.positionCartographic,l.sort(compareDistanceToPoint);var u,d=e._addHeightCallbacks,h=e._removeHeightCallbacks,p=t.frameNumber;if(0<d.length||0<h.length){for(i=0,u=l.length;i<u;++i)(n=l[i])._updateCustomData(p,d,h);d.length=0,h.length=0}for(o=t.camera,e._cameraPositionCartographic=o.positionCartographic,o=Matrix4.getTranslation(o.transform,cameraOriginScratch),e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(o,e._cameraReferenceFrameOriginCartographic),i=0,u=l.length;i<u;++i)n=l[i],e._tileReplacementQueue.markTileRendered(n),n.renderable?visitIfVisible(e,n,a,t,c,!1,rootTraversalDetails[i]):(queueTileLoad(e,e._tileLoadQueueHigh,n,t),++r.tilesWaitingForChildren);e._lastSelectionFrameNumber=p}}function queueTileLoad(e,t,i,r){i.needsLoading&&(void 0!==e.tileProvider.computeTileLoadPriority&&(i._loadPriority=e.tileProvider.computeTileLoadPriority(i,r)),t.push(i))}function TraversalDetails(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function TraversalQuadDetails(){this.southwest=new TraversalDetails,this.southeast=new TraversalDetails,this.northwest=new TraversalDetails,this.northeast=new TraversalDetails}TraversalQuadDetails.prototype.combine=function(e){var t=this.southwest,i=this.southeast,r=this.northwest,n=this.northeast;e.allAreRenderable=t.allAreRenderable&&i.allAreRenderable&&r.allAreRenderable&&n.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||r.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+i.notYetRenderableCount+r.notYetRenderableCount+n.notYetRenderableCount};for(var traversalQuadsByLevel=new Array(31),i$4=0;i$4<traversalQuadsByLevel.length;++i$4)traversalQuadsByLevel[i$4]=new TraversalQuadDetails;function visitTile$3(e,t,i,r,n){var a=e._debug;++a.tilesVisited,e._tileReplacementQueue.markTileRendered(i),i._updateCustomData(t.frameNumber),i.level>a.maxDepthVisited&&(a.maxDepthVisited=i.level);var o=screenSpaceError(e,t,i)<e.maximumScreenSpaceError,s=i.southwestChild,l=i.southeastChild,c=i.northwestChild,u=i.northeastChild,d=e._lastSelectionFrameNumber,h=i._lastSelectionResultFrame===d?i._lastSelectionResult:TileSelectionResult.NONE;d=e.tileProvider;if(o||r){var p=TileSelectionResult.originalResult(h)===TileSelectionResult.RENDERED,f=TileSelectionResult.originalResult(h)===TileSelectionResult.CULLED||h===TileSelectionResult.NONE,m=i.state===QuadtreeTileLoadState$1.DONE;if((p=p||f||m)||defined(d.canRenderWithoutLosingDetail)&&(p=d.canRenderWithoutLosingDetail(i)),p)return o&&queueTileLoad(e,e._tileLoadQueueMedium,i,t),addTileToRenderList(e,i),n.allAreRenderable=i.renderable,n.anyWereRenderedLastFrame=h===TileSelectionResult.RENDERED,n.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=TileSelectionResult.RENDERED,void(n.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));r=!0,o&&queueTileLoad(e,e._tileLoadQueueHigh,i,t)}if(d.canRefine(i)){if(s.upsampledFromParent&&l.upsampledFromParent&&c.upsampledFromParent&&u.upsampledFromParent)return addTileToRenderList(e,i),queueTileLoad(e,e._tileLoadQueueMedium,i,t),e._tileReplacementQueue.markTileRendered(s),e._tileReplacementQueue.markTileRendered(l),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(u),n.allAreRenderable=i.renderable,n.anyWereRenderedLastFrame=h===TileSelectionResult.RENDERED,n.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=TileSelectionResult.RENDERED,void(n.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));if(i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=TileSelectionResult.REFINED,f=e._tilesToRender.length,m=e._tileLoadQueueLow.length,p=e._tileLoadQueueMedium.length,o=e._tileLoadQueueHigh.length,d=e._tileToUpdateHeights.length,visitVisibleChildrenNearToFar(e,s,l,c,u,t,r,n),f!==e._tilesToRender.length){if(l=n.allAreRenderable,c=n.anyWereRenderedLastFrame,u=n.notYetRenderableCount,r=!1,!l&&!c){for(var g=e._tilesToRender,y=f;y<g.length;++y)for(var _=g[y];void 0!==_&&_._lastSelectionResult!==TileSelectionResult.KICKED&&_!==i;)_._lastSelectionResult=TileSelectionResult.kick(_._lastSelectionResult),_=_.parent;e._tilesToRender.length=f,e._tileToUpdateHeights.length=d,addTileToRenderList(e,i),i._lastSelectionResult=TileSelectionResult.RENDERED,!(d=h===TileSelectionResult.RENDERED)&&u>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=m,e._tileLoadQueueMedium.length=p,e._tileLoadQueueHigh.length=o,queueTileLoad(e,e._tileLoadQueueMedium,i,t),n.notYetRenderableCount=i.renderable?0:1,r=!0),n.allAreRenderable=i.renderable,(n.anyWereRenderedLastFrame=d)||e._tileToUpdateHeights.push(i),++a.tilesWaitingForChildren}e.preloadAncestors&&!r&&queueTileLoad(e,e._tileLoadQueueLow,i,t)}}else i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=TileSelectionResult.RENDERED,addTileToRenderList(e,i),queueTileLoad(e,e._tileLoadQueueHigh,i,t),n.allAreRenderable=i.renderable,n.anyWereRenderedLastFrame=h===TileSelectionResult.RENDERED,n.notYetRenderableCount=i.renderable?0:1}function visitVisibleChildrenNearToFar(e,t,i,r,n,a,o,s){var l=a.camera.positionCartographic,c=e._tileProvider,u=e._occluders,d=traversalQuadsByLevel[t.level],h=d.southwest,p=d.southeast,f=d.northwest,m=d.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(visitIfVisible(e,t,c,a,u,o,h),visitIfVisible(e,i,c,a,u,o,p),visitIfVisible(e,r,c,a,u,o,f),visitIfVisible(e,n,c,a,u,o,m)):(visitIfVisible(e,r,c,a,u,o,f),visitIfVisible(e,t,c,a,u,o,h),visitIfVisible(e,n,c,a,u,o,m),visitIfVisible(e,i,c,a,u,o,p)):l.latitude<t.rectangle.north?(visitIfVisible(e,i,c,a,u,o,p),visitIfVisible(e,t,c,a,u,o,h),visitIfVisible(e,n,c,a,u,o,m),visitIfVisible(e,r,c,a,u,o,f)):(visitIfVisible(e,n,c,a,u,o,m),visitIfVisible(e,r,c,a,u,o,f),visitIfVisible(e,i,c,a,u,o,p),visitIfVisible(e,t,c,a,u,o,h)),d.combine(s)}function containsNeededPosition(e,t){return t=t.rectangle,defined(e._cameraPositionCartographic)&&Rectangle.contains(t,e._cameraPositionCartographic)||defined(e._cameraReferenceFrameOriginCartographic)&&Rectangle.contains(t,e._cameraReferenceFrameOriginCartographic)}function visitIfVisible(e,t,i,r,n,a,o){if(i.computeTileVisibility(t,r,n)!==Visibility$1.NONE)return visitTile$3(e,r,t,a,o);++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),o.allAreRenderable=!0,o.anyWereRenderedLastFrame=!1,o.notYetRenderableCount=0,containsNeededPosition(e,t)?(defined(t.data)&&defined(t.data.vertexArray)||queueTileLoad(e,e._tileLoadQueueMedium,t,r),o=e._lastSelectionFrameNumber,(o=t._lastSelectionResultFrame===o?t._lastSelectionResult:TileSelectionResult.NONE)!==TileSelectionResult.CULLED_BUT_NEEDED&&o!==TileSelectionResult.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=TileSelectionResult.CULLED_BUT_NEEDED):(!e.preloadSiblings&&0!==t.level||queueTileLoad(e,e._tileLoadQueueLow,t,r),t._lastSelectionResult=TileSelectionResult.CULLED),t._lastSelectionResultFrame=r.frameNumber}function screenSpaceError(e,t,i){return t.mode===SceneMode$1.SCENE2D||t.camera.frustum instanceof OrthographicFrustum||t.camera.frustum instanceof OrthographicOffCenterFrustum?screenSpaceError2D(e,t,i):(e=e._tileProvider.getLevelMaximumGeometricError(i.level),i=i._distance,e=e*t.context.drawingBufferHeight/(i*t.camera.frustum.sseDenominator),t.fog.enabled&&(e-=CesiumMath.fog(i,t.fog.density)*t.fog.sse),e/t.pixelRatio)}function screenSpaceError2D(e,t,i){var r=t.camera.frustum;defined(r._offCenterFrustum)&&(r=r._offCenterFrustum);var n=(a=t.context).drawingBufferWidth,a=a.drawingBufferHeight;a=e._tileProvider.getLevelMaximumGeometricError(i.level)/(Math.max(r.top-r.bottom,r.right-r.left)/Math.max(n,a));return t.fog.enabled&&t.mode!==SceneMode$1.SCENE2D&&(a-=CesiumMath.fog(i._distance,t.fog.density)*t.fog.sse),a/t.pixelRatio}function addTileToRenderList(e,t){e._tilesToRender.push(t)}function processTileLoadQueue(e,t){var i,r,n=e._tileLoadQueueHigh,a=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;0===n.length&&0===a.length&&0===o.length||(e._tileReplacementQueue.trimTiles(e.tileCacheSize),i=getTimestamp$1()+e._loadQueueTimeSlice,n=processSinglePriorityLoadQueue(e,t,r=e._tileProvider,i,n,!1),n=processSinglePriorityLoadQueue(e,t,r,i,a,n),processSinglePriorityLoadQueue(e,t,r,i,o,n))}function sortByLoadPriority(e,t){return e._loadPriority-t._loadPriority}function processSinglePriorityLoadQueue(e,t,i,r,n,a){void 0!==i.computeTileLoadPriority&&n.sort(sortByLoadPriority);for(var o=0,s=n.length;o<s&&(getTimestamp$1()<r||!a);++o){var l=n[o];e._tileReplacementQueue.markTileRendered(l),i.loadTile(t,l),a=!0}return a}var scratchRay=new Ray,scratchCartographic$d=new Cartographic,scratchPosition$a=new Cartesian3,scratchArray=[];function updateHeights(e,t){if(e.tileProvider.ready){var i=scratchArray;i.length=0;for(var r=e._tileToUpdateHeights,n=e._tileProvider.terrainProvider,a=getTimestamp$1()+e._updateHeightsTimeSlice,o=t.mode,s=t.mapProjection,l=e.tileProvider.tilingScheme.ellipsoid;0<r.length;){var c=r[0];if(defined(c.data)&&defined(c.data.mesh)){for(var u=c.customData,d=u.length,h=!1,p=e._lastTileIndex;p<d;++p){var f,m,g=u[p];if(c.level>g.level)defined(g.positionOnEllipsoidSurface)||(g.positionOnEllipsoidSurface=Cartesian3.fromRadians(g.positionCartographic.longitude,g.positionCartographic.latitude,0,l)),o===SceneMode$1.SCENE3D?(f=l.geodeticSurfaceNormal(g.positionOnEllipsoidSurface,scratchRay.direction),defined(l.getSurfaceNormalIntersectionWithZAxis(g.positionOnEllipsoidSurface,11500,scratchRay.origin))||(defined(c.data.tileBoundingRegion)&&(m=c.data.tileBoundingRegion.minimumHeight),b=Math.min(defaultValue(m,0),-11500),x=Cartesian3.multiplyByScalar(f,Math.abs(b)+1,scratchPosition$a),Cartesian3.subtract(g.positionOnEllipsoidSurface,x,scratchRay.origin))):(Cartographic.clone(g.positionCartographic,scratchCartographic$d),scratchCartographic$d.height=-11500,s.project(scratchCartographic$d,scratchPosition$a),Cartesian3.fromElements(scratchPosition$a.z,scratchPosition$a.x,scratchPosition$a.y,scratchPosition$a),Cartesian3.clone(scratchPosition$a,scratchRay.origin),Cartesian3.clone(Cartesian3.UNIT_X,scratchRay.direction)),defined(b=c.data.pick(scratchRay,o,s,!1,scratchPosition$a))&&(g.callback(b),g.level=c.level);else if(c.level===g.level){for(var y,_=c.children,v=_.length,C=0;C<v&&(y=_[C],!Rectangle.contains(y.rectangle,g.positionCartographic));++C);var x=n.getTileDataAvailable(y.x,y.y,y.level),b=c.parent;(defined(x)&&!x||defined(b)&&defined(b.data)&&defined(b.data.terrainData)&&!b.data.terrainData.isChildAvailable(b.x,b.y,y.x,y.y))&&g.removeFunc()}if(getTimestamp$1()>=a){h=!0;break}}if(h){e._lastTileIndex=p;break}e._lastTileIndex=0,r.shift()}else{var S=c._lastSelectionResultFrame===e._lastSelectionFrameNumber?c._lastSelectionResult:TileSelectionResult.NONE;S!==TileSelectionResult.RENDERED&&S!==TileSelectionResult.CULLED_BUT_NEEDED||i.push(c),r.shift(),e._lastTileIndex=0}}for(p=0;p<i.length;p++)r.push(i[p])}}function createRenderCommandsForSelectedTiles(e,t){for(var i=e._tileProvider,r=e._tilesToRender,n=0,a=r.length;n<a;++n){var o=r[n];i.showTileThisFrame(o,t)}}function Globe(e){var t=new EllipsoidTerrainProvider({ellipsoid:e=defaultValue(e,Ellipsoid.WGS84)}),i=new ImageryLayerCollection;this._ellipsoid=e,this._imageryLayerCollection=i,this._surfaceShaderSet=new GlobeSurfaceShaderSet,this._material=void 0,this._surface=new QuadtreePrimitive({tileProvider:new GlobeSurfaceTileProvider({terrainProvider:t,imageryLayers:i,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new Event,this._undergroundColor=Color.clone(Color.BLACK),this._undergroundColorAlphaByDistance=new NearFarScalar(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new GlobeTranslucency,makeShadersDirty(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new Resource({url:buildModuleUrl("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=ShadowMode$1.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0}function makeShadersDirty(e){var t=[],i=defined(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),r=[GroundAtmosphere];!defined(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.materialUniformMap=void 0:(r.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms),r.push(GlobeFS),e._surfaceShaderSet.baseVertexShaderSource=new ShaderSource({sources:[GroundAtmosphere,GlobeVS],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new ShaderSource({sources:r,defines:t}),e._surfaceShaderSet.material=e._material}function createComparePickTileFunction(e){return function(t,i){return BoundingSphere.distanceSquaredTo(t.pickBoundingSphere,e)-BoundingSphere.distanceSquaredTo(i.pickBoundingSphere,e)}}Object.defineProperties(Globe.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return!defined(this._surface)||this._surface.tileProvider.ready&&0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){defined(e)||(e=Rectangle.clone(Rectangle.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),defined(this._material)&&makeShadersDirty(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,makeShadersDirty(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=Color.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){this._undergroundColorAlphaByDistance=NearFarScalar.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});var scratchArray$1=[],scratchSphereIntersectionResult={start:0,stop:0};Globe.prototype.pickWorldCoordinates=function(e,t,i,r){i=defaultValue(i,!0);var n=t.mode,a=t.mapProjection,o=scratchArray$1;o.length=0;for(var s,l,c=this._surface._tilesToRender,u=c.length,d=0;d<u;++d){var h=(s=c[d]).data;if(defined(h)){var p=h.pickBoundingSphere;if(n!==SceneMode$1.SCENE3D)h.pickBoundingSphere=p=BoundingSphere.fromRectangleWithHeights2D(s.rectangle,a,h.tileBoundingRegion.minimumHeight,h.tileBoundingRegion.maximumHeight,p),Cartesian3.fromElements(p.center.z,p.center.x,p.center.y,p.center);else{if(!defined(h.renderedMesh))continue;BoundingSphere.clone(h.renderedMesh.boundingSphere3D,p)}defined(IntersectionTests.raySphere(e,p,scratchSphereIntersectionResult))&&o.push(h)}}for(o.sort(createComparePickTileFunction(e.origin)),u=o.length,d=0;d<u&&!defined(l=o[d].pick(e,t.mode,t.mapProjection,i,r));++d);return l};var cartoScratch$2=new Cartographic;Globe.prototype.pick=function(e,t,i){return defined(i=this.pickWorldCoordinates(e,t,!0,i))&&t.mode!==SceneMode$1.SCENE3D&&(i=Cartesian3.fromElements(i.y,i.z,i.x,i),e=t.mapProjection.unproject(i,cartoScratch$2),i=t.globe.ellipsoid.cartographicToCartesian(e,i)),i};var scratchGetHeightCartesian=new Cartesian3,scratchGetHeightIntersection=new Cartesian3,scratchGetHeightCartographic=new Cartographic,scratchGetHeightRay=new Ray;function tileIfContainsCartographic(e,t){return defined(e)&&Rectangle.contains(e.rectangle,t)?e:void 0}Globe.prototype.getHeight=function(e){var t=this._surface._levelZeroTiles;if(defined(t)){for(var i,r=t.length,n=0;n<r&&(i=t[n],!Rectangle.contains(i.rectangle,e));++n);if(!(r<=n)){for(var a=i;defined(i);)defined(i=tileIfContainsCartographic(i._southwestChild,e)||tileIfContainsCartographic(i._southeastChild,e)||tileIfContainsCartographic(i._northwestChild,e)||i._northeastChild)&&defined(i.data)&&defined(i.data.renderedMesh)&&(a=i);if(defined(i=a)&&defined(i.data)&&defined(i.data.renderedMesh)){var o,s=this._surface._tileProvider.tilingScheme.ellipsoid,l=Cartesian3.fromRadians(e.longitude,e.latitude,0,s,scratchGetHeightCartesian),c=scratchGetHeightRay,u=s.geodeticSurfaceNormal(l,c.direction);if(defined(s.getSurfaceNormalIntersectionWithZAxis(l,11500,c.origin))||(defined(i.data.tileBoundingRegion)&&(o=i.data.tileBoundingRegion.minimumHeight),o=Math.min(defaultValue(o,0),-11500),o=Cartesian3.multiplyByScalar(u,Math.abs(o)+1,scratchGetHeightIntersection),Cartesian3.subtract(l,o,c.origin)),defined(c=i.data.pick(c,void 0,void 0,!1,scratchGetHeightIntersection)))return s.cartesianToCartographic(c,scratchGetHeightCartographic).height}}}},Globe.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)},Globe.prototype.beginFrame=function(e){var t,i,r=this._surface,n=r.tileProvider,a=this.terrainProvider,o=this.showWaterEffect&&a.ready&&a.hasWaterMask;o&&this._oceanNormalMapResourceDirty&&(this._oceanNormalMapResourceDirty=!1,s=this._oceanNormalMapResource,defined(t=s.url)?(i=this,when(s.fetchImage(),(function(r){t===i._oceanNormalMapResource.url&&(i._oceanNormalMap=i._oceanNormalMap&&i._oceanNormalMap.destroy(),i._oceanNormalMap=new Texture({context:e.context,source:r}))}))):this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy());a=e.passes;var s=e.mode;a.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,r.maximumScreenSpaceError=this.maximumScreenSpaceError,r.tileCacheSize=this.tileCacheSize,r.loadingDescendantLimit=this.loadingDescendantLimit,r.preloadAncestors=this.preloadAncestors,r.preloadSiblings=this.preloadSiblings,n.terrainProvider=this.terrainProvider,n.lightingFadeOutDistance=this.lightingFadeOutDistance,n.lightingFadeInDistance=this.lightingFadeInDistance,n.nightFadeOutDistance=this.nightFadeOutDistance,n.nightFadeInDistance=this.nightFadeInDistance,n.zoomedOutOceanSpecularIntensity=s===SceneMode$1.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=o,n.oceanNormalMap=this._oceanNormalMap,n.enableLighting=this.enableLighting,n.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,n.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,n.showGroundAtmosphere=this.showGroundAtmosphere,n.shadows=this.shadows,n.hueShift=this.atmosphereHueShift,n.saturationShift=this.atmosphereSaturationShift,n.brightnessShift=this.atmosphereBrightnessShift,n.fillHighlightColor=this.fillHighlightColor,n.showSkirts=this.showSkirts,n.backFaceCulling=this.backFaceCulling,n.undergroundColor=this._undergroundColor,n.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,r.beginFrame(e))},Globe.prototype.render=function(e){this.show&&(defined(this._material)&&this._material.update(e.context),this._surface.render(e))},Globe.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)},Globe.prototype.isDestroyed=function(){return!1},Globe.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),destroyObject(this)};var PassThrough="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n}\n",PassThroughDepth="uniform highp sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\ngl_FragColor = czm_packDepth(texture2D(u_depthTexture, v_textureCoordinates).r);\n}\n";function GlobeDepth(){this._globeColorTexture=void 0,this._primitiveColorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this._tempGlobeDepthTexture=void 0,this._tempCopyDepthTexture=void 0,this._globeColorFramebuffer=void 0,this._primitiveColorFramebuffer=void 0,this._copyDepthFramebuffer=void 0,this._tempCopyDepthFramebuffer=void 0,this._updateDepthFramebuffer=void 0,this._clearGlobeColorCommand=void 0,this._clearPrimitiveColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._mergeColorCommand=void 0,this._viewport=new BoundingRectangle,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useLogDepth=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0,this._debugGlobeDepthViewportCommand=void 0}function executeDebugGlobeDepth(e,t,i,r){var n;defined(e._debugGlobeDepthViewportCommand)&&r===e._useLogDepth||(n=new ShaderSource({defines:[r?"LOG_DEPTH":""],sources:["uniform highp sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    float z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\n    z_window = czm_reverseLogDepth(z_window); \n    float n_range = czm_depthRange.near;\n    float f_range = czm_depthRange.far;\n    float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n    float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n    gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]}),e._debugGlobeDepthViewportCommand=t.createViewportQuadCommand(n,{uniformMap:{u_depthTexture:function(){return e._globeDepthTexture}},owner:e}),e._useLogDepth=r),e._debugGlobeDepthViewportCommand.execute(t,i)}function destroyTextures(e){e._globeColorTexture=e._globeColorTexture&&!e._globeColorTexture.isDestroyed()&&e._globeColorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function destroyFramebuffers$1(e){e._globeColorFramebuffer=e._globeColorFramebuffer&&!e._globeColorFramebuffer.isDestroyed()&&e._globeColorFramebuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function destroyUpdateDepthResources(e){e._tempCopyDepthFramebuffer=e._tempCopyDepthFramebuffer&&!e._tempCopyDepthFramebuffer.isDestroyed()&&e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer=e._updateDepthFramebuffer&&!e._updateDepthFramebuffer.isDestroyed()&&e._updateDepthFramebuffer.destroy(),e._tempGlobeDepthTexture=e._tempGlobeDepthTexture&&!e._tempGlobeDepthTexture.isDestroyed()&&e._tempGlobeDepthTexture.destroy()}function createUpdateDepthResources(e,t,i,r,n){e._tempGlobeDepthTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),e._tempCopyDepthFramebuffer=new Framebuffer({context:t,colorTextures:[e._tempGlobeDepthTexture],destroyAttachments:!1}),e._updateDepthFramebuffer=new Framebuffer({context:t,colorTextures:[e._globeDepthTexture],depthStencilTexture:n.framebuffer.depthStencilTexture,destroyAttachments:!1})}function createTextures$1(e,t,i,r,n){n=n?t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,e._globeColorTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:n,sampler:Sampler.NEAREST}),e._depthStencilTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8}),e._globeDepthTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST})}function createFramebuffers$1(e,t){e._globeColorFramebuffer=new Framebuffer({context:t,colorTextures:[e._globeColorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new Framebuffer({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function createPrimitiveFramebuffer(e,t,i,r,n){n=n?t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,e._primitiveColorTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:n,sampler:Sampler.NEAREST}),e._primitiveColorFramebuffer=new Framebuffer({context:t,colorTextures:[e._primitiveColorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1})}function destroyPrimitiveFramebuffer(e){e._primitiveColorTexture=e._primitiveColorTexture&&!e._primitiveColorTexture.isDestroyed()&&e._primitiveColorTexture.destroy(),e._primitiveColorFramebuffer=e._primitiveColorFramebuffer&&!e._primitiveColorFramebuffer.isDestroyed()&&e._primitiveColorFramebuffer.destroy()}function updateFramebuffers(e,t,i,r,n,a){var o;(o=!defined(o=e._globeColorTexture)||o.width!==i||o.height!==r||n!==e._useHdr)&&(destroyTextures(e),destroyFramebuffers$1(e),createTextures$1(e,t,i,r,n),createFramebuffers$1(e,t)),!o&&a===e._clearGlobeDepth||(destroyPrimitiveFramebuffer(e),a&&createPrimitiveFramebuffer(e,t,i,r,n))}function updateCopyCommands(e,t,i,r,n){e._viewport.width=i,e._viewport.height=r,r=(i=!BoundingRectangle.equals(e._viewport,n.viewport))!==e._useScissorTest,e._useScissorTest=i,BoundingRectangle.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=BoundingRectangle.clone(n.viewport,e._scissorRectangle),r=!0),defined(e._rs)&&BoundingRectangle.equals(e._viewport,e._rs.viewport)&&!r||(e._rs=RenderState.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=RenderState.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:BlendingState$1.ALPHA_BLEND}),e._rsUpdate=RenderState.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:StencilFunction$1.EQUAL,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},backFunction:StencilFunction$1.NEVER,reference:StencilConstants$1.CESIUM_3D_TILE_MASK,mask:StencilConstants$1.CESIUM_3D_TILE_MASK}})),defined(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(PassThroughDepth,{uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer,e._copyDepthCommand.renderState=e._rs,defined(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return e._globeColorTexture}},owner:e})),e._copyColorCommand.renderState=e._rs,defined(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(PassThroughDepth,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer,e._tempCopyDepthCommand.renderState=e._rs,defined(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return e._tempGlobeDepthTexture}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer,e._updateDepthCommand.renderState=e._rsUpdate,defined(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new ClearCommand({color:new Color(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e._globeColorFramebuffer,defined(e._clearPrimitiveColorCommand)||(e._clearPrimitiveColorCommand=new ClearCommand({color:new Color(0,0,0,0),stencil:0,owner:e})),e._clearPrimitiveColorCommand.framebuffer=e._primitiveColorFramebuffer,defined(e._mergeColorCommand)||(e._mergeColorCommand=t.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return e._primitiveColorTexture}},owner:e})),e._mergeColorCommand.framebuffer=e._globeColorFramebuffer,e._mergeColorCommand.renderState=e._rsBlend}function GlobeTranslucencyFramebuffer(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._packedDepthTexture=void 0,this._packedDepthFramebuffer=void 0,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new BoundingRectangle,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}function destroyResources(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&!e._depthStencilRenderbuffer.isDestroyed()&&e._depthStencilRenderbuffer.destroy(),e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy(),e._packedDepthTexture=e._packedDepthTexture&&!e._packedDepthTexture.isDestroyed()&&e._packedDepthTexture.destroy(),e._packedDepthFramebuffer=e._packedDepthFramebuffer&&!e._packedDepthFramebuffer.isDestroyed()&&e._packedDepthFramebuffer.destroy()}function createResources$5(e,t,i,r,n){n=n?t.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,e._colorTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:n,sampler:Sampler.NEAREST}),t.depthTexture?e._depthStencilTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8}):e._depthStencilRenderbuffer=new Renderbuffer({context:t,width:i,height:r,format:RenderbufferFormat$1.DEPTH_STENCIL}),e._framebuffer=new Framebuffer({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,depthStencilRenderbuffer:e._depthStencilRenderbuffer,destroyAttachments:!1}),e._packedDepthTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),e._packedDepthFramebuffer=new Framebuffer({context:t,colorTextures:[e._packedDepthTexture],destroyAttachments:!1})}function updateResources(e,t,i,r,n){var a=e._colorTexture;defined(a)&&a.width===i&&a.height===r&&n===e._useHdr||(destroyResources(e),createResources$5(e,t,i,r,n))}function updateCommands(e,t,i,r,n){e._viewport.width=i,e._viewport.height=r,r=(i=!BoundingRectangle.equals(e._viewport,n.viewport))!==e._useScissorTest,e._useScissorTest=i,BoundingRectangle.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=BoundingRectangle.clone(n.viewport,e._scissorRectangle),r=!0),defined(e._renderState)&&BoundingRectangle.equals(e._viewport,e._renderState.viewport)&&!r||(e._renderState=RenderState.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),defined(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(PassThroughDepth,{uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),defined(e._clearCommand)||(e._clearCommand=new ClearCommand({color:new Color(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e._framebuffer,e._clearCommand.renderState=e._renderState}Object.defineProperties(GlobeDepth.prototype,{framebuffer:{get:function(){return this._globeColorFramebuffer}},primitiveFramebuffer:{get:function(){return this._primitiveColorFramebuffer}}}),GlobeDepth.prototype.executeDebugGlobeDepth=function(e,t,i){executeDebugGlobeDepth(this,e,t,i)},GlobeDepth.prototype.update=function(e,t,i,r,n){var a=i.width;updateFramebuffers(this,e,a,i=i.height,r,n),updateCopyCommands(this,e,a,i,t),e.uniformState.globeDepthTexture=void 0,this._useHdr=r,this._clearGlobeDepth=n},GlobeDepth.prototype.executeCopyDepth=function(e,t){defined(this._copyDepthCommand)&&(this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},GlobeDepth.prototype.executeUpdateDepth=function(e,t,i){var r,n=t.framebuffer.depthStencilTexture;i||n!==this._depthStencilTexture?defined(this._updateDepthCommand)&&(defined(this._updateDepthFramebuffer)&&this._updateDepthFramebuffer.depthStencilTexture===n&&this._updateDepthFramebuffer.getColorTexture(0)===this._globeDepthTexture||(r=this._globeDepthTexture.width,i=this._globeDepthTexture.height,destroyUpdateDepthResources(this),createUpdateDepthResources(this,e,r,i,t),updateCopyCommands(this,e,r,i,t)),this._tempCopyDepthTexture=n,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)):defined(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},GlobeDepth.prototype.executeCopyColor=function(e,t){defined(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},GlobeDepth.prototype.executeMergeColor=function(e,t){defined(this._mergeColorCommand)&&this._mergeColorCommand.execute(e,t)},GlobeDepth.prototype.clear=function(e,t,i){var r=this._clearGlobeColorCommand;defined(r)&&(Color.clone(i,r.color),r.execute(e,t)),defined(r=this._clearPrimitiveColorCommand)&&defined(this._primitiveColorFramebuffer)&&r.execute(e,t)},GlobeDepth.prototype.isDestroyed=function(){return!1},GlobeDepth.prototype.destroy=function(){return destroyTextures(this),destroyFramebuffers$1(this),destroyPrimitiveFramebuffer(this),destroyUpdateDepthResources(this),defined(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),defined(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),defined(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),defined(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),defined(this._mergeColorCommand)&&(this._mergeColorCommand.shaderProgram=this._mergeColorCommand.shaderProgram.destroy()),defined(this._debugGlobeDepthViewportCommand)&&(this._debugGlobeDepthViewportCommand.shaderProgram=this._debugGlobeDepthViewportCommand.shaderProgram.destroy()),destroyObject(this)},Object.defineProperties(GlobeTranslucencyFramebuffer.prototype,{classificationTexture:{get:function(){return this._colorTexture}},classificationFramebuffer:{get:function(){return this._framebuffer}}}),GlobeTranslucencyFramebuffer.prototype.updateAndClear=function(e,t,i,r){var n=t.width;updateResources(this,i,n,t=t.height,e),updateCommands(this,i,n,t,r),this._useHdr=e},GlobeTranslucencyFramebuffer.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},GlobeTranslucencyFramebuffer.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this._packedDepthTexture},GlobeTranslucencyFramebuffer.prototype.isDestroyed=function(){return!1},GlobeTranslucencyFramebuffer.prototype.destroy=function(){return destroyResources(this),destroyObject(this)};var DerivedCommandType={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},derivedCommandsMaximumLength=DerivedCommandType.DERIVED_COMMANDS_MAXIMUM_LENGTH,DerivedCommandNames=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function GlobeTranslucencyState(){this._frontFaceAlphaByDistance=new NearFarScalar(0,1,0,1),this._backFaceAlphaByDistance=new NearFarScalar(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=Rectangle.clone(Rectangle.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(derivedCommandsMaximumLength),this._derivedBlendCommandTypes=new Array(derivedCommandsMaximumLength),this._derivedPickCommandTypes=new Array(derivedCommandsMaximumLength),this._derivedCommandTypesToUpdate=new Array(derivedCommandsMaximumLength),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function updateAlphaByDistance(e,t,i,r){return e?defined(i)?(NearFarScalar.clone(i,r),r.nearValue*=t,r.farValue*=t):(r.nearValue=t,r.farValue=t):(r.nearValue=1,r.farValue=1),r}function isFaceTranslucent(e,t,i){return e&&(i.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function isSunVisibleThroughGlobe(e,t){var i=e._frontFaceTranslucent;e=e._backFaceTranslucent;return i&&(t.cameraUnderground||e)}function isEnvironmentVisible(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function useDepthPlane(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function requiresManualDepthTest(e,t,i){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!i.depthTestAgainstTerrain&&t.mode!==SceneMode$1.SCENE2D&&t.context.depthTexture}function getNumberOfTextureUniforms(e){var t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function gatherDerivedCommandRequirements(e,t){e._derivedCommandsLength=getDerivedCommandTypes(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=getDerivedCommandTypes(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=getDerivedCommandTypes(e,t,!1,!0,e._derivedPickCommandTypes);for(var i=0,r=0;r<e._derivedCommandsLength;++r)i|=1<<e._derivedCommandTypes[r];for(r=0;r<e._derivedBlendCommandsLength;++r)i|=1<<e._derivedBlendCommandTypes[r];for(r=0;r<e._derivedPickCommandsLength;++r)i|=1<<e._derivedPickCommandTypes[r];var n=0;for(r=0;r<derivedCommandsMaximumLength;++r)0<(i&1<<r)&&(e._derivedCommandTypesToUpdate[n++]=r);e._derivedCommandsToUpdateLength=n,t=i!==e._derivedCommandKey,e._derivedCommandKey=i,e._derivedCommandsDirty=t,!defined(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=createDerivedCommandPacks())}function getDerivedCommandTypes(e,t,i,r,n){var a=0,o=e._frontFaceTranslucent,s=e._backFaceTranslucent;if(!o)return a;var l=t.cameraUnderground;o=e._requiresManualDepthTest,e=r?DerivedCommandType.PICK_FRONT_FACE:o?DerivedCommandType.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:DerivedCommandType.TRANSLUCENT_FRONT_FACE,o=r?DerivedCommandType.PICK_BACK_FACE:o?DerivedCommandType.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:DerivedCommandType.TRANSLUCENT_BACK_FACE;return t.mode===SceneMode$1.SCENE2D?(n[a++]=DerivedCommandType.DEPTH_ONLY_FRONT_FACE,n[a++]=e):s?(i||(n[a++]=DerivedCommandType.DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(n[a++]=e,n[a++]=o):(n[a++]=o,n[a++]=e)):l?(i||(n[a++]=DerivedCommandType.DEPTH_ONLY_BACK_FACE),n[a++]=DerivedCommandType.OPAQUE_FRONT_FACE,n[a++]=o):(i||(n[a++]=DerivedCommandType.DEPTH_ONLY_FRONT_FACE),n[a++]=DerivedCommandType.OPAQUE_BACK_FACE,n[a++]=e),a}function removeDefine(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function hasDefine(e,t){return-1<e.indexOf(t)}function getOpaqueFrontFaceShaderProgram(e,t){removeDefine(e.defines,"TRANSLUCENT"),removeDefine(t.defines,"TRANSLUCENT")}function getOpaqueBackFaceShaderProgram(e,t){removeDefine(e.defines,"GROUND_ATMOSPHERE"),removeDefine(t.defines,"GROUND_ATMOSPHERE"),removeDefine(e.defines,"FOG"),removeDefine(t.defines,"FOG"),removeDefine(e.defines,"TRANSLUCENT"),removeDefine(t.defines,"TRANSLUCENT")}function getDepthOnlyShaderProgram$1(e,t){hasDefine(t.defines,"TILE_LIMIT_RECTANGLE")||hasDefine(t.defines,"ENABLE_CLIPPING_PLANES")||(t.sources=["void main() \n{ \n    gl_FragColor = vec4(1.0); \n} \n"])}function getTranslucentShaderProgram(e,t){for(var i=t.sources,r=i.length,n=0;n<r;++n)i[n]=ShaderSource.replaceMain(i[n],"czm_globe_translucency_main");i.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n    vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n    float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st)); \n    if (logDepthOrDepth != 0.0) \n    { \n        vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n        float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n        if (v_positionEC.z < depthEC) \n        { \n            discard; \n        } \n    } \n#endif \n    czm_globe_translucency_main(); \n    vec4 classificationColor = texture2D(u_classificationTexture, st); \n    if (classificationColor.a > 0.0) \n    { \n        // Reverse premultiplication process to get the correct composited result of the classification primitives \n        classificationColor.rgb /= classificationColor.a; \n    } \n    gl_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + gl_FragColor * (1.0 - classificationColor.a); \n} \n")}function getTranslucentBackFaceShaderProgram(e,t){getTranslucentShaderProgram(e,t),removeDefine(e.defines,"GROUND_ATMOSPHERE"),removeDefine(t.defines,"GROUND_ATMOSPHERE"),removeDefine(e.defines,"FOG"),removeDefine(t.defines,"FOG")}function getTranslucentFrontFaceManualDepthTestShaderProgram(e,t){getTranslucentShaderProgram(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function getTranslucentBackFaceManualDepthTestShaderProgram(e,t){getTranslucentBackFaceShaderProgram(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function getPickShaderProgram$1(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n    vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n    vec4 pickColor = texture2D(u_classificationTexture, st); \n    if (pickColor == vec4(0.0)) \n    { \n        discard; \n    } \n    gl_FragColor = pickColor; \n} \n"]}function getDerivedShaderProgram(e,t,i,r,n,a){if(!defined(n))return t;if(!r&&defined(i))return i;var o,s=e.shaderCache.getDerivedShaderProgram(t,a);return defined(s)||(o=t._attributeLocations,r=t.vertexShaderSource.clone(),i=t.fragmentShaderSource.clone(),r.defines=defined(r.defines)?r.defines.slice(0):[],i.defines=defined(i.defines)?i.defines.slice(0):[],n(r,i),s=e.shaderCache.createDerivedShaderProgram(t,a,{vertexShaderSource:r,fragmentShaderSource:i,attributeLocations:o})),s}function getOpaqueFrontFaceRenderState(e){e.cull.face=CullFace$1.BACK,e.cull.enabled=!0}function getOpaqueBackFaceRenderState(e){e.cull.face=CullFace$1.FRONT,e.cull.enabled=!0}function getDepthOnlyFrontFaceRenderState(e){e.cull.face=CullFace$1.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function getDepthOnlyBackFaceRenderState(e){e.cull.face=CullFace$1.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function getDepthOnlyFrontAndBackFaceRenderState(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function getTranslucentFrontFaceRenderState(e){e.cull.face=CullFace$1.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND}function getTranslucentBackFaceRenderState(e){e.cull.face=CullFace$1.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND}function getPickFrontFaceRenderState(e){e.cull.face=CullFace$1.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function getPickBackFaceRenderState(e){e.cull.face=CullFace$1.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function getDerivedRenderState(e,t,i,r,n){return defined(r)?(!i&&defined(t)||defined(t=n[e.id])||(r(r=RenderState.getState(e)),t=RenderState.fromCache(r),n[e.id]=t),t):e}function getTranslucencyUniformMap(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function getDerivedUniformMap(e,t,i,r,n){return defined(n)?!r&&defined(i)?i:combine(t,n(e),!1):t}function DerivedCommandPack(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function createDerivedCommandPacks(){return[new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getOpaqueFrontFaceShaderProgram,getRenderStateFunction:getOpaqueFrontFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getOpaqueBackFaceShaderProgram,getRenderStateFunction:getOpaqueBackFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getDepthOnlyShaderProgram$1,getRenderStateFunction:getDepthOnlyFrontFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getDepthOnlyShaderProgram$1,getRenderStateFunction:getDepthOnlyBackFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.GLOBE,pickOnly:!1,getShaderProgramFunction:getDepthOnlyShaderProgram$1,getRenderStateFunction:getDepthOnlyFrontAndBackFaceRenderState,getUniformMapFunction:void 0}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:getTranslucentShaderProgram,getRenderStateFunction:getTranslucentFrontFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:getTranslucentBackFaceShaderProgram,getRenderStateFunction:getTranslucentBackFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:getTranslucentFrontFaceManualDepthTestShaderProgram,getRenderStateFunction:getTranslucentFrontFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:getTranslucentBackFaceManualDepthTestShaderProgram,getRenderStateFunction:getTranslucentBackFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:getPickShaderProgram$1,getRenderStateFunction:getPickFrontFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap}),new DerivedCommandPack({pass:Pass$1.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:getPickShaderProgram$1,getRenderStateFunction:getPickBackFaceRenderState,getUniformMapFunction:getTranslucencyUniformMap})]}Object.defineProperties(GlobeTranslucencyState.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}}),GlobeTranslucencyState.prototype.update=function(e){var t=e.globe;if(!defined(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=updateAlphaByDistance(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=updateAlphaByDistance(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=isFaceTranslucent(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=isFaceTranslucent(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=requiresManualDepthTest(this,e,t),this._sunVisibleThroughGlobe=isSunVisibleThroughGlobe(this,e),this._environmentVisible=isEnvironmentVisible(this,e),this._useDepthPlane=useDepthPlane(this,e),this._numberOfTextureUniforms=getNumberOfTextureUniforms(this),this._rectangle=Rectangle.clone(t.translucency.rectangle,this._rectangle),gatherDerivedCommandRequirements(this,e)};var derivedCommandNames=new Array(derivedCommandsMaximumLength),derivedCommandPacks=new Array(derivedCommandsMaximumLength);function updateDerivedCommands(e,t,i,r,n,a,o){var s=t.derivedCommands.globeTranslucency,l=e._derivedCommandsDirty;if(t.dirty||!defined(s)||l){t.dirty=!1,defined(s)||(s={},t.derivedCommands.globeTranslucency=s);var c=o.frameNumber,u=defaultValue(s.uniformMapDirtyFrame,0),d=defaultValue(s.shaderProgramDirtyFrame,0),h=defaultValue(s.renderStateDirtyFrame,0),p=s.uniformMap!==t.uniformMap,f=s.shaderProgramId!==t.shaderProgram.id,m=s.renderStateId!==t.renderState.id;p&&(s.uniformMapDirtyFrame=c),f&&(s.shaderProgramDirtyFrame=c),m&&(s.renderStateDirtyFrame=c),s.uniformMap=t.uniformMap,s.shaderProgramId=t.shaderProgram.id,s.renderStateId=t.renderState.id;for(var g=0;g<i;++g){var y,_,v=a[g],C=r[g],x=n[g],b=defined(S=s[x])?(y=S.uniformMap,_=S.shaderProgram,S.renderState):_=y=void 0,S=DrawCommand.shallowClone(t,S),T=defaultValue((s[x]=S).derivedCommands.uniformMapDirtyFrame,0),E=defaultValue(S.derivedCommands.shaderProgramDirtyFrame,0),w=defaultValue(S.derivedCommands.renderStateDirtyFrame,0);E=f||E<d,w=m||w<h;(T=p||T<u)&&(S.derivedCommands.uniformMapDirtyFrame=c),E&&(S.derivedCommands.shaderProgramDirtyFrame=c),w&&(S.derivedCommands.renderStateDirtyFrame=c),S.derivedCommands.type=C,S.pass=v.pass,S.pickOnly=v.pickOnly,S.uniformMap=getDerivedUniformMap(e,t.uniformMap,y,T,v.getUniformMapFunction),S.shaderProgram=getDerivedShaderProgram(o.context,t.shaderProgram,_,E,v.getShaderProgramFunction,x),S.renderState=getDerivedRenderState(t.renderState,b,w,v.getRenderStateFunction,v.renderStateCache)}}}function executeCommandsMatchingType(e,t,i,r,n,a,o){for(var s=0;s<t;++s){var l=e[s],c=l.derivedCommands.type;(!defined(o)||-1<o.indexOf(c))&&i(l,r,n,a)}}function executeCommands(e,t,i,r,n,a){for(var o=0;o<t;++o)i(e[o],r,n,a)}GlobeTranslucencyState.prototype.updateDerivedCommands=function(e,t){var i=this._derivedCommandTypesToUpdate,r=this._derivedCommandsToUpdateLength;if(0!==r){for(var n=0;n<r;++n)derivedCommandPacks[n]=this._derivedCommandPacks[i[n]],derivedCommandNames[n]=DerivedCommandNames[i[n]];updateDerivedCommands(this,e,r,i,derivedCommandNames,derivedCommandPacks,t)}},GlobeTranslucencyState.prototype.pushDerivedCommands=function(e,t,i){var r=i.passes.pick;if(!r||!t){var n=this._derivedCommandTypes,a=this._derivedCommandsLength;if(r?(n=this._derivedPickCommandTypes,a=this._derivedPickCommandsLength):t&&(n=this._derivedBlendCommandTypes,a=this._derivedBlendCommandsLength),0!==a)for(var o=e.derivedCommands.globeTranslucency,s=0;s<a;++s){var l=DerivedCommandNames[n[s]];i.commandList.push(o[l])}else i.commandList.push(e)}};var opaqueTypes=[DerivedCommandType.OPAQUE_FRONT_FACE,DerivedCommandType.OPAQUE_BACK_FACE],depthOnlyTypes=[DerivedCommandType.DEPTH_ONLY_FRONT_FACE,DerivedCommandType.DEPTH_ONLY_BACK_FACE,DerivedCommandType.DEPTH_ONLY_FRONT_AND_BACK_FACE];function GoogleEarthEnterpriseDiscardPolicy(){this._image=new Image}function GoogleEarthEnterpriseImageryProvider(e){var t;e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,t=defined(e.metadata)?e.metadata:new GoogleEarthEnterpriseMetadata(Resource.createIfNeeded(e.url)),this._metadata=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new GeographicTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Rectangle(-CesiumMath.PI,-CesiumMath.PI,CesiumMath.PI,CesiumMath.PI),ellipsoid:e.ellipsoid}),"string"==typeof(e=e.credit)&&(e=new Credit(e)),this._credit=e,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,defined(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new GoogleEarthEnterpriseDiscardPolicy),this._errorEvent=new Event,this._ready=!1;var i,r=this;this._readyPromise=t.readyPromise.then((function(e){return t.imageryPresent?(TileProviderError.handleSuccess(i),r._ready=e):(e=new RuntimeError("The server "+t.url+" doesn't have imagery"),i=TileProviderError.handleError(i,r,r._errorEvent,e.message,void 0,void 0,void 0,e),when.reject(e))})).otherwise((function(e){return i=TileProviderError.handleError(i,r,r._errorEvent,e.message,void 0,void 0,void 0,e),when.reject(e)}))}function buildImageResource$2(e,t,i,r,n,a){return n=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(i,r,n),t=defined(t=t.imageryVersion)&&0<t?t:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1-0"+n+"-i."+t.toString(),request:a})}function getImageType(e){var t="JFIF";return e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3)?"image/jpeg":e[1]==="PNG".charCodeAt(0)&&e[2]==="PNG".charCodeAt(1)&&e[3]==="PNG".charCodeAt(2)?"image/png":void 0}function decodeEarthImageryPacket(e){for(var t=protobuf.Reader.create(e),i=t.len,r={};t.pos<i;){var n=t.uint32();switch(n>>>3){case 1:r.imageType=t.uint32();break;case 2:r.imageData=t.bytes();break;case 3:r.alphaType=t.uint32();break;case 4:r.imageAlpha=t.bytes();break;case 5:var a=r.copyrightIds;if(defined(a)||(a=r.copyrightIds=[]),2==(7&n))for(var o=t.uint32()+t.pos;t.pos<o;)a.push(t.uint32());else a.push(t.uint32());break;default:t.skipType(7&n)}}if(defined(e=r.imageType))switch(e){case 0:r.imageType="image/jpeg";break;case 4:r.imageType="image/png";break;default:throw new RuntimeError("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}return defined(e=r.alphaType)&&0!==e&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete r.alphaType,delete r.imageAlpha),r}function GoogleEarthEnterpriseMapsProvider(e){e=defaultValue(e,{}),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=1.9,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=e.url,i=defaultValue(e.path,"/default_map"),r=Resource.createIfNeeded(t).getDerivedResource({url:"/"===i[0]?i.substring(1):i});r.appendForwardSlash(),this._resource=r,this._url=t,this._path=i,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new Credit('<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="'+GoogleEarthEnterpriseMapsProvider.logoUrl+'" title="Google Imagery"/></a>'),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer();var n,a=r.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),o=this;function s(t){var i,r;try{i=JSON.parse(t)}catch(r){i=JSON.parse(t.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var a,s=0;s<i.layers.length;s++)if(i.layers[s].id===o._channel){r=i.layers[s];break}if(!defined(r))throw a="Could not find layer with channel (id) of "+o._channel+".",n=TileProviderError.handleError(n,o,o._errorEvent,a,void 0,void 0,void 0,c),new RuntimeError(a);if(!defined(r.version))throw a="Could not find a version in channel (id) "+o._channel+".",n=TileProviderError.handleError(n,o,o._errorEvent,a,void 0,void 0,void 0,c),new RuntimeError(a);if(o._version=r.version,defined(i.projection)&&"flat"===i.projection)o._tilingScheme=new GeographicTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new Rectangle(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:e.ellipsoid});else{if(defined(i.projection)&&"mercator"!==i.projection)throw a="Unsupported projection "+i.projection+".",n=TileProviderError.handleError(n,o,o._errorEvent,a,void 0,void 0,void 0,c),new RuntimeError(a);o._tilingScheme=new WebMercatorTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid})}o._ready=!0,o._readyPromise.resolve(!0),TileProviderError.handleSuccess(n)}function l(e){var t="An error occurred while accessing "+a.url+".";n=TileProviderError.handleError(n,o,o._errorEvent,t,void 0,void 0,void 0,c),o._readyPromise.reject(new RuntimeError(t))}function c(){when(a.fetchText(),s,l)}c()}GlobeTranslucencyState.prototype.executeGlobeCommands=function(e,t,i,r,n){var a=r.context,o=e.commands[Pass$1.GLOBE];0!==(e=e.indices[Pass$1.GLOBE])&&((this._globeTranslucencyFramebuffer=i).clearClassification(a,n),executeCommandsMatchingType(o,e,t,r,a,n,opaqueTypes))},GlobeTranslucencyState.prototype.executeGlobeClassificationCommands=function(e,t,i,r,n){var a,o=r.context,s=e.commands[Pass$1.GLOBE],l=e.indices[Pass$1.GLOBE],c=e.commands[Pass$1.TERRAIN_CLASSIFICATION],u=e.indices[Pass$1.TERRAIN_CLASSIFICATION];0!==l&&0!==u&&(a=this._frontFaceTranslucent,e=this._backFaceTranslucent,a&&e||executeCommands(c,u,t,r,o,n),(a||e)&&(this._globeTranslucencyFramebuffer=i,a=o.uniformState.globeDepthTexture,e=n.framebuffer,n.framebuffer=i.classificationFramebuffer,executeCommandsMatchingType(s,l,t,r,o,n,depthOnlyTypes),o.depthTexture&&(i=i.packDepth(o,n),o.uniformState.globeDepthTexture=i),executeCommands(c,u,t,r,o,n),o.uniformState.globeDepthTexture=a,n.framebuffer=e))},GoogleEarthEnterpriseDiscardPolicy.prototype.isReady=function(){return!0},GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage=function(e){return e===this._image},Object.defineProperties(GoogleEarthEnterpriseImageryProvider.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}}),GoogleEarthEnterpriseImageryProvider.prototype.getTileCredits=function(e,t,i){var r=this._metadata;if(defined(i=r.getTileInformation(e,t,i))&&defined(i=r.providers[i.imageryProvider]))return[i]},GoogleEarthEnterpriseImageryProvider.prototype.requestImage=function(e,t,i,r){var n=this._tileDiscardPolicy._image,a=this._metadata,o=GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e,t,i),s=a.getTileInformation(e,t,i);return defined(s)?s.hasImagery()?defined(r=buildImageResource$2(this,s,e,t,i,r).fetchArrayBuffer())?r.then((function(e){decodeGoogleEarthEnterpriseData(a.key,e);var t,i=new Uint8Array(e);return defined(e=a.protoImagery)&&e||(t=getImageType(i)),defined(t)||defined(e)&&!e||(t=(e=decodeEarthImageryPacket(i)).imageType,i=e.imageData),defined(t)&&defined(i)?loadImageFromTypedArray({uint8Array:i,format:t,flipY:!0}):n})):void 0:n:a.isValid(o)?(o=new Request({throttle:r.throttle,throttleByServer:r.throttleByServer,type:r.type,priorityFunction:r.priorityFunction}),void a.populateSubtree(e,t,i,o)):n},GoogleEarthEnterpriseImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),GoogleEarthEnterpriseMapsProvider.prototype.getTileCredits=function(e,t,i){},GoogleEarthEnterpriseMapsProvider.prototype.requestImage=function(e,t,i,r){return i=this._resource.getDerivedResource({url:"query",request:r,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:i+1}}),ImageryProvider.loadImage(this,i)},GoogleEarthEnterpriseMapsProvider.prototype.pickFeatures=function(e,t,i,r,n){},GoogleEarthEnterpriseMapsProvider._logoUrl=void 0,Object.defineProperties(GoogleEarthEnterpriseMapsProvider,{logoUrl:{get:function(){return defined(GoogleEarthEnterpriseMapsProvider._logoUrl)||(GoogleEarthEnterpriseMapsProvider._logoUrl=buildModuleUrl("Assets/Images/google_earth_credit.png")),GoogleEarthEnterpriseMapsProvider._logoUrl},set:function(e){GoogleEarthEnterpriseMapsProvider._logoUrl=e}}});var defaultColor$8=new Color(1,1,1,.4),defaultGlowColor=new Color(0,1,0,.05),defaultBackgroundColor$2=new Color(0,.5,0,.2);function GridImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._tilingScheme=defined(e.tilingScheme)?e.tilingScheme:new GeographicTilingScheme({ellipsoid:e.ellipsoid}),this._cells=defaultValue(e.cells,8),this._color=defaultValue(e.color,defaultColor$8),this._glowColor=defaultValue(e.glowColor,defaultGlowColor),this._glowWidth=defaultValue(e.glowWidth,6),this._backgroundColor=defaultValue(e.backgroundColor,defaultBackgroundColor$2),this._errorEvent=new Event,this._tileWidth=defaultValue(e.tileWidth,256),this._tileHeight=defaultValue(e.tileHeight,256),this._canvasSize=defaultValue(e.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=when.resolve(!0)}function InvertClassification(){this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._texture=void 0,this._classifiedTexture=void 0,this._depthStencilTexture=void 0,this._fbo=void 0,this._fboClassified=void 0,this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new ClearCommand({color:new Color(0,0,0,0),owner:this}),this._clearCommand=new ClearCommand({color:new Color(0,0,0,0),depth:1,stencil:0});var e=this;this._uniformMap={colorTexture:function(){return e._texture},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._classifiedTexture}}}Object.defineProperties(GridImageryProvider.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),GridImageryProvider.prototype._drawGrid=function(e){for(var t=this._canvasSize,i=0;i<=this._cells;++i){var r=1+i/this._cells*(t-1);e.moveTo(r,0),e.lineTo(r,t),e.moveTo(0,r),e.lineTo(t,r)}e.stroke()},GridImageryProvider.prototype._createGridCanvas=function(){var e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;var t=this._canvasSize,i=e.getContext("2d"),r=this._backgroundColor.toCssColorString();return i.fillStyle=r,i.fillRect(0,0,t,t),r=this._glowColor.toCssColorString(),i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),i.lineWidth=.5*this._glowWidth,i.strokeRect(0,0,t,t),this._drawGrid(i),r=this._color.toCssColorString(),i.strokeStyle=r,i.lineWidth=2,i.strokeRect(0,0,t,t),i.lineWidth=1,this._drawGrid(i),e},GridImageryProvider.prototype.getTileCredits=function(e,t,i){},GridImageryProvider.prototype.requestImage=function(e,t,i,r){return this._canvas},GridImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},Object.defineProperties(InvertClassification.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),InvertClassification.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var rsUnclassified={depthMask:!1,stencilTest:{enabled:!0,frontFunction:StencilFunction$1.EQUAL,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},backFunction:StencilFunction$1.NEVER,reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},blending:BlendingState$1.ALPHA_BLEND},rsClassified={depthMask:!1,stencilTest:{enabled:!0,frontFunction:StencilFunction$1.NOT_EQUAL,frontOperation:{fail:StencilOperation$1.KEEP,zFail:StencilOperation$1.KEEP,zPass:StencilOperation$1.KEEP},backFunction:StencilFunction$1.NEVER,reference:0,mask:StencilConstants$1.CLASSIFICATION_MASK},blending:BlendingState$1.ALPHA_BLEND},rsDefault={depthMask:!0,depthTest:{enabled:!0},stencilTest:StencilConstants$1.setCesium3DTileBit(),stencilMask:StencilConstants$1.CESIUM_3D_TILE_MASK,blending:BlendingState$1.ALPHA_BLEND},translucentFS="#extension GL_EXT_frag_depth : enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    vec4 color = texture2D(colorTexture, v_textureCoordinates);\n    if (color.a == 0.0)\n    {\n        discard;\n    }\n    bool isClassified = all(equal(texture2D(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n    vec4 highlightColor = czm_invertClassificationColor;\n    if (isClassified)\n    {\n        discard;\n    }\n#else\n    vec4 highlightColor = vec4(1.0);\n    if (!isClassified)\n    {\n        discard;\n    }\n#endif\n    gl_FragColor = color * highlightColor;\n    gl_FragDepthEXT = texture2D(depthTexture, v_textureCoordinates).r;\n}\n",opaqueFS="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    vec4 color = texture2D(colorTexture, v_textureCoordinates);\n    if (color.a == 0.0)\n    {\n        discard;\n    }\n#ifdef UNCLASSIFIED\n    gl_FragColor = color * czm_invertClassificationColor;\n#else\n    gl_FragColor = color;\n#endif\n}\n";InvertClassification.prototype.update=function(e){var t=!defined(n=this._texture)||this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;var i,r,n,a=e.drawingBufferWidth,o=e.drawingBufferHeight;((n=!defined(n)||n.width!==a||n.height!==o)||t)&&(this._texture=this._texture&&this._texture.destroy(),this._classifiedTexture=this._classifiedTexture&&this._classifiedTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._texture=new Texture({context:e,width:a,height:o,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR})}),defined(this._previousFramebuffer)||(this._classifiedTexture=new Texture({context:e,width:a,height:o,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:TextureMinificationFilter$1.LINEAR,magnificationFilter:TextureMagnificationFilter$1.LINEAR})}),this._depthStencilTexture=new Texture({context:e,width:a,height:o,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8}))),defined(this._fbo)&&!n&&!t||(this._fbo=this._fbo&&this._fbo.destroy(),this._fboClassified=this._fboClassified&&this._fboClassified.destroy(),defined(this._previousFramebuffer)?(r=this._previousFramebuffer.depthStencilTexture,i=this._previousFramebuffer.depthStencilRenderbuffer):r=this._depthStencilTexture,this._fbo=new Framebuffer({context:e,colorTextures:[this._texture],depthStencilTexture:r,depthStencilRenderbuffer:i,destroyAttachments:!1}),defined(this._previousFramebuffer)||(this._fboClassified=new Framebuffer({context:e,colorTextures:[this._classifiedTexture],depthStencilTexture:r,destroyAttachments:!1}))),defined(this._rsUnclassified)||(this._rsUnclassified=RenderState.fromCache(rsUnclassified),this._rsClassified=RenderState.fromCache(rsClassified),this._rsDefault=RenderState.fromCache(rsDefault)),defined(this._unclassifiedCommand)&&!t||(defined(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),t=new ShaderSource({defines:["UNCLASSIFIED"],sources:[r=defined(this._previousFramebuffer)?opaqueFS:translucentFS]}),r=new ShaderSource({sources:[r]}),this._unclassifiedCommand=e.createViewportQuadCommand(t,{renderState:defined(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(r,{renderState:defined(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),defined(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),defined(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(PassThrough,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this})))},InvertClassification.prototype.clear=function(e,t){var i=t.framebuffer;defined(this._previousFramebuffer)?(t.framebuffer=this._fbo,this._clearColorCommand.execute(e,t)):(t.framebuffer=this._fbo,this._clearCommand.execute(e,t),t.framebuffer=this._fboClassified,this._clearCommand.execute(e,t)),t.framebuffer=i},InvertClassification.prototype.executeClassified=function(e,t){var i;defined(this._previousFramebuffer)||(i=t.framebuffer,t.framebuffer=this._fboClassified,this._translucentCommand.execute(e,t),t.framebuffer=i),this._classifiedCommand.execute(e,t)},InvertClassification.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},InvertClassification.prototype.isDestroyed=function(){return!1},InvertClassification.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._texture=this._texture&&this._texture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),defined(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),destroyObject(this)};var templateRegex=/{[^}]+}/g,tags={x:xTag,y:yTag,z:zTag,s:sTag,reverseX:reverseXTag,reverseY:reverseYTag,reverseZ:reverseZTag,westDegrees:westDegreesTag,southDegrees:southDegreesTag,eastDegrees:eastDegreesTag,northDegrees:northDegreesTag,westProjected:westProjectedTag,southProjected:southProjectedTag,eastProjected:eastProjectedTag,northProjected:northProjectedTag,width:widthTag,height:heightTag},pickFeaturesTags=combine(tags,{i:iTag,j:jTag,reverseI:reverseITag,reverseJ:reverseJTag,longitudeDegrees:longitudeDegreesTag,latitudeDegrees:latitudeDegreesTag,longitudeProjected:longitudeProjectedTag,latitudeProjected:latitudeProjectedTag,format:formatTag});function UrlTemplateImageryProvider(e){this._errorEvent=new Event,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this._tags=void 0,this._pickFeaturesTags=void 0,this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this.enablePickFeatures=!0,this.reinitialize(e)}Object.defineProperties(UrlTemplateImageryProvider.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return defined(this._resource)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}}),UrlTemplateImageryProvider.prototype.reinitialize=function(e){var t=this;t._readyPromise=when(e).then((function(e){var i=e.customTags,r=combine(tags,i),n=combine(pickFeaturesTags,i),a=Resource.createIfNeeded(e.url);i=Resource.createIfNeeded(e.pickFeaturesUrl);return t.enablePickFeatures=defaultValue(e.enablePickFeatures,t.enablePickFeatures),t._urlSchemeZeroPadding=defaultValue(e.urlSchemeZeroPadding,t.urlSchemeZeroPadding),t._tileDiscardPolicy=e.tileDiscardPolicy,t._getFeatureInfoFormats=e.getFeatureInfoFormats,t._subdomains=e.subdomains,Array.isArray(t._subdomains)?t._subdomains=t._subdomains.slice():defined(t._subdomains)&&0<t._subdomains.length?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=defaultValue(e.tileWidth,256),t._tileHeight=defaultValue(e.tileHeight,256),t._minimumLevel=defaultValue(e.minimumLevel,0),t._maximumLevel=e.maximumLevel,t._tilingScheme=defaultValue(e.tilingScheme,new WebMercatorTilingScheme({ellipsoid:e.ellipsoid})),t._rectangle=defaultValue(e.rectangle,t._tilingScheme.rectangle),t._rectangle=Rectangle.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=defaultValue(e.hasAlphaChannel,!0),"string"==typeof(e=e.credit)&&(e=new Credit(e)),t._credit=e,t._resource=a,t._tags=r,t._pickFeaturesResource=i,t._pickFeaturesTags=n,!0}))},UrlTemplateImageryProvider.prototype.getTileCredits=function(e,t,i){},UrlTemplateImageryProvider.prototype.requestImage=function(e,t,i,r){return ImageryProvider.loadImage(this,buildImageResource$3(this,e,t,i,r))},UrlTemplateImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){if(this.enablePickFeatures&&defined(this._pickFeaturesResource)&&0!==this._getFeatureInfoFormats.length){var a=0,o=this;return function s(){if(a>=o._getFeatureInfoFormats.length)return when([]);var l=o._getFeatureInfoFormats[a],c=buildPickFeaturesResource(o,e,t,i,r,n,l.format);return++a,("json"===l.type?c.fetchJson().then(l.callback):"xml"===l.type?c.fetchXML().then(l.callback):"text"===l.type||"html"===l.type?c.fetchText().then(l.callback):c.fetch({responseType:l.format}).then(function(e,t){return e.callback(t)}.bind(void 0,l))).otherwise(s)}()}};var degreesScratchComputed=!1,degreesScratch=new Rectangle,projectedScratchComputed=!1,projectedScratch=new Rectangle;function buildImageResource$3(e,t,i,r,n){projectedScratchComputed=degreesScratchComputed=!1;var a=e._resource,o=a.getUrlComponent(!0),s=e._tags,l={};return defined(o=o.match(templateRegex))&&o.forEach((function(n){n=n.substring(1,n.length-1),defined(s[n])&&(l[n]=s[n](e,t,i,r))})),a.getDerivedResource({request:n,templateValues:l})}var ijScratchComputed=!1,ijScratch=new Cartesian2,longitudeLatitudeProjectedScratchComputed=!1;function buildPickFeaturesResource(e,t,i,r,n,a,o){longitudeLatitudeProjectedScratchComputed=ijScratchComputed=projectedScratchComputed=degreesScratchComputed=!1;var s=e._pickFeaturesResource,l=s.getUrlComponent(!0),c=e._pickFeaturesTags,u={};return defined(l=l.match(templateRegex))&&l.forEach((function(s){s=s.substring(1,s.length-1),defined(c[s])&&(u[s]=c[s](e,t,i,r,n,a,o))})),s.getDerivedResource({templateValues:u})}function padWithZerosIfNecessary(e,t,i){return e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)&&("string"!=typeof(t=e.urlSchemeZeroPadding[t])||1<(t=t.length)&&(i=i.length>=t?i:new Array(t-i.toString().length+1).join("0")+i)),i}function xTag(e,t,i,r){return padWithZerosIfNecessary(e,"{x}",t)}function reverseXTag(e,t,i,r){return t=e.tilingScheme.getNumberOfXTilesAtLevel(r)-t-1,padWithZerosIfNecessary(e,"{reverseX}",t)}function yTag(e,t,i,r){return padWithZerosIfNecessary(e,"{y}",i)}function reverseYTag(e,t,i,r){return i=e.tilingScheme.getNumberOfYTilesAtLevel(r)-i-1,padWithZerosIfNecessary(e,"{reverseY}",i)}function reverseZTag(e,t,i,r){var n=e.maximumLevel;return padWithZerosIfNecessary(e,"{reverseZ}",defined(n)&&r<n?n-r-1:r)}function zTag(e,t,i,r){return padWithZerosIfNecessary(e,"{z}",r)}function sTag(e,t,i,r){return r=(t+i+r)%e._subdomains.length,e._subdomains[r]}function computeDegrees(e,t,i,r){degreesScratchComputed||(e.tilingScheme.tileXYToRectangle(t,i,r,degreesScratch),degreesScratch.west=CesiumMath.toDegrees(degreesScratch.west),degreesScratch.south=CesiumMath.toDegrees(degreesScratch.south),degreesScratch.east=CesiumMath.toDegrees(degreesScratch.east),degreesScratch.north=CesiumMath.toDegrees(degreesScratch.north),degreesScratchComputed=!0)}function westDegreesTag(e,t,i,r){return computeDegrees(e,t,i,r),degreesScratch.west}function southDegreesTag(e,t,i,r){return computeDegrees(e,t,i,r),degreesScratch.south}function eastDegreesTag(e,t,i,r){return computeDegrees(e,t,i,r),degreesScratch.east}function northDegreesTag(e,t,i,r){return computeDegrees(e,t,i,r),degreesScratch.north}function computeProjected(e,t,i,r){projectedScratchComputed||(e.tilingScheme.tileXYToNativeRectangle(t,i,r,projectedScratch),projectedScratchComputed=!0)}function westProjectedTag(e,t,i,r){return computeProjected(e,t,i,r),projectedScratch.west}function southProjectedTag(e,t,i,r){return computeProjected(e,t,i,r),projectedScratch.south}function eastProjectedTag(e,t,i,r){return computeProjected(e,t,i,r),projectedScratch.east}function northProjectedTag(e,t,i,r){return computeProjected(e,t,i,r),projectedScratch.north}function widthTag(e,t,i,r){return e.tileWidth}function heightTag(e,t,i,r){return e.tileHeight}function iTag(e,t,i,r,n,a,o){return computeIJ(e,t,i,r,n,a),ijScratch.x}function jTag(e,t,i,r,n,a,o){return computeIJ(e,t,i,r,n,a),ijScratch.y}function reverseITag(e,t,i,r,n,a,o){return computeIJ(e,t,i,r,n,a),e.tileWidth-ijScratch.x-1}function reverseJTag(e,t,i,r,n,a,o){return computeIJ(e,t,i,r,n,a),e.tileHeight-ijScratch.y-1}var rectangleScratch$6=new Rectangle,longitudeLatitudeProjectedScratch=new Cartesian3;function computeIJ(e,t,i,r,n,a,o){ijScratchComputed||(computeLongitudeLatitudeProjected(e,t,i,r,n,a),a=longitudeLatitudeProjectedScratch,r=e.tilingScheme.tileXYToNativeRectangle(t,i,r,rectangleScratch$6),ijScratch.x=e.tileWidth*(a.x-r.west)/r.width|0,ijScratch.y=e.tileHeight*(r.north-a.y)/r.height|0,ijScratchComputed=!0)}function longitudeDegreesTag(e,t,i,r,n,a,o){return CesiumMath.toDegrees(n)}function latitudeDegreesTag(e,t,i,r,n,a,o){return CesiumMath.toDegrees(a)}function longitudeProjectedTag(e,t,i,r,n,a,o){return computeLongitudeLatitudeProjected(e,t,i,r,n,a),longitudeLatitudeProjectedScratch.x}function latitudeProjectedTag(e,t,i,r,n,a,o){return computeLongitudeLatitudeProjected(e,t,i,r,n,a),longitudeLatitudeProjectedScratch.y}var cartographicScratch$4=new Cartographic;function computeLongitudeLatitudeProjected(e,t,i,r,n,a,o){var s;longitudeLatitudeProjectedScratchComputed||(e.tilingScheme.projection instanceof GeographicProjection?(longitudeLatitudeProjectedScratch.x=CesiumMath.toDegrees(n),longitudeLatitudeProjectedScratch.y=CesiumMath.toDegrees(a)):((s=cartographicScratch$4).longitude=n,s.latitude=a,e.tilingScheme.projection.project(s,longitudeLatitudeProjectedScratch)),longitudeLatitudeProjectedScratchComputed=!0)}function formatTag(e,t,i,r,n,a,o){return o}function TileMapServiceImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t,i=when.defer();UrlTemplateImageryProvider.call(this,i.promise),this._tmsResource=void 0,this._xmlResource=void 0,this._options=e,this._deferred=i,this._metadataError=void 0,this._metadataSuccess=this._metadataSuccess.bind(this),this._metadataFailure=this._metadataFailure.bind(this),this._requestMetadata=this._requestMetadata.bind(this);var r=this;when(e.url).then((function(e){(t=Resource.createIfNeeded(e)).appendForwardSlash(),r._tmsResource=t,r._xmlResource=t.getDerivedResource({url:"tilemapresource.xml"}),r._requestMetadata()})).otherwise((function(e){i.reject(e)}))}function confineRectangleToTilingScheme(e,t){return e.west<t.rectangle.west&&(e.west=t.rectangle.west),e.east>t.rectangle.east&&(e.east=t.rectangle.east),e.south<t.rectangle.south&&(e.south=t.rectangle.south),e.north>t.rectangle.north&&(e.north=t.rectangle.north),e}function calculateSafeMinimumDetailLevel(e,t,i){var r=e.positionToTileXY(Rectangle.southwest(t),i);t=e.positionToTileXY(Rectangle.northeast(t),i);return 4<(Math.abs(t.x-r.x)+1)*(Math.abs(t.y-r.y)+1)?0:i}defined(Object.create)&&(TileMapServiceImageryProvider.prototype=Object.create(UrlTemplateImageryProvider.prototype),TileMapServiceImageryProvider.prototype.constructor=TileMapServiceImageryProvider),TileMapServiceImageryProvider.prototype._requestMetadata=function(){this._xmlResource.fetchXML().then(this._metadataSuccess).otherwise(this._metadataFailure)},TileMapServiceImageryProvider.prototype._metadataSuccess=function(e){for(var t,i,r,n=/tileformat/i,a=/tileset/i,o=/tilesets/i,s=/boundingbox/i,l=[],c=this._xmlResource,u=this._metadataError,d=this._deferred,h=this._requestMetadata,p=e.childNodes[0].childNodes,f=0;f<p.length;f++)if(n.test(p.item(f).nodeName))t=p.item(f);else if(o.test(p.item(f).nodeName)){r=p.item(f);for(var m=p.item(f).childNodes,g=0;g<m.length;g++)a.test(m.item(g).nodeName)&&l.push(m.item(g))}else s.test(p.item(f).nodeName)&&(i=p.item(f));if(!defined(r)||!defined(i))return w="Unable to find expected tilesets or bbox attributes in "+c.url+".",(u=TileProviderError.handleError(u,this,this.errorEvent,w,void 0,void 0,void 0,h)).retry||d.reject(new RuntimeError(w)),void(this._metadataError=u);var y=this._options,_=defaultValue(y.fileExtension,t.getAttribute("extension")),v=defaultValue(y.tileWidth,parseInt(t.getAttribute("width"),10)),C=defaultValue(y.tileHeight,parseInt(t.getAttribute("height"),10)),x=defaultValue(y.minimumLevel,parseInt(l[0].getAttribute("order"),10)),b=defaultValue(y.maximumLevel,parseInt(l[l.length-1].getAttribute("order"),10)),S=r.getAttribute("profile");if(!defined(e=y.tilingScheme))if("geodetic"===S||"global-geodetic"===S)e=new GeographicTilingScheme({ellipsoid:y.ellipsoid});else{if("mercator"!==S&&"global-mercator"!==S)return w=c.url+"specifies an unsupported profile attribute, "+S+".",(u=TileProviderError.handleError(u,this,this.errorEvent,w,void 0,void 0,void 0,h)).retry||d.reject(new RuntimeError(w)),void(this._metadataError=u);e=new WebMercatorTilingScheme({ellipsoid:y.ellipsoid})}var T,E,w=Rectangle.clone(y.rectangle);defined(w)||(u=defaultValue(y.flipXY,!1)?(T=new Cartesian2(parseFloat(i.getAttribute("miny")),parseFloat(i.getAttribute("minx"))),new Cartesian2(parseFloat(i.getAttribute("maxy")),parseFloat(i.getAttribute("maxx")))):(T=new Cartesian2(parseFloat(i.getAttribute("minx")),parseFloat(i.getAttribute("miny"))),new Cartesian2(parseFloat(i.getAttribute("maxx")),parseFloat(i.getAttribute("maxy")))),S="geodetic"===S||"mercator"===S,u=e.projection instanceof GeographicProjection||S?(E=Cartographic.fromDegrees(T.x,T.y),Cartographic.fromDegrees(u.x,u.y)):(E=(S=e.projection).unproject(T),S.unproject(u)),w=new Rectangle(E.longitude,E.latitude,u.longitude,u.latitude)),x=calculateSafeMinimumDetailLevel(e,w=confineRectangleToTilingScheme(w,e),x),_=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+_}),d.resolve({url:_,tilingScheme:e,rectangle:w,tileWidth:v,tileHeight:C,minimumLevel:x,maximumLevel:b,tileDiscardPolicy:y.tileDiscardPolicy,credit:y.credit})},TileMapServiceImageryProvider.prototype._metadataFailure=function(e){var t=this._options,i=defaultValue(t.fileExtension,"png"),r=defaultValue(t.tileWidth,256),n=defaultValue(t.tileHeight,256),a=t.maximumLevel,o=defined(t.tilingScheme)?t.tilingScheme:new WebMercatorTilingScheme({ellipsoid:t.ellipsoid}),s=defaultValue(t.rectangle,o.rectangle),l=calculateSafeMinimumDetailLevel(o,s=confineRectangleToTilingScheme(s,o),t.maximumLevel);i=this._tmsResource.getDerivedResource({url:"{z}/{x}/{reverseY}."+i});this._deferred.resolve({url:i,tilingScheme:o,rectangle:s,tileWidth:r,tileHeight:n,minimumLevel:l,maximumLevel:a,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit})};var trailingSlashRegex=/\/$/,defaultCredit$1=new Credit('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function MapboxImageryProvider(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).mapId,i=e.accessToken;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var r=Resource.createIfNeeded(defaultValue(e.url,"https://{s}.tiles.mapbox.com/v4/"));this._mapId=t,this._accessToken=i;var n=defaultValue(e.format,"png");/\./.test(n)||(n="."+n),this._format=n;var a;n=r.getUrlComponent();trailingSlashRegex.test(n)||(n+="/"),n+=t+"/{z}/{x}/{y}"+this._format,r.url=n,r.setQueryParameters({access_token:i}),defined(e.credit)?"string"==typeof(a=e.credit)&&(a=new Credit(a)):a=defaultCredit$1,this._resource=r,this._imageryProvider=new UrlTemplateImageryProvider({url:r,credit:a,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function SingleTileImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=Resource.createIfNeeded(e.url),i=new GeographicTilingScheme({rectangle:defaultValue(e.rectangle,Rectangle.MAX_VALUE),numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=i,this._resource=t,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer(),"string"==typeof(e=e.credit)&&(e=new Credit(e)),this._credit=e;var r,n=this;function a(e){n._image=e,n._tileWidth=e.width,n._tileHeight=e.height,n._ready=!0,n._readyPromise.resolve(!0),TileProviderError.handleSuccess(n._errorEvent)}function o(e){var i="Failed to load image "+t.url+".";r=TileProviderError.handleError(r,n,n._errorEvent,i,0,0,0,s,e),n._readyPromise.reject(new RuntimeError(i))}function s(){ImageryProvider.loadImage(null,t).then(a).otherwise(o)}s()}function TimeDynamicImagery(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._tileCache={},this._tilesRequestedForInterval=[];var t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}function getKey$1(e,t,i){return e+"-"+t+"-"+i}function getKeyElements(e){if(3===(e=e.split("-")).length)return{x:Number(e[0]),y:Number(e[1]),level:Number(e[2])}}function getApproachingInterval(e){var t=e._times;if(defined(t)){var i,r,n=(r=e._clock).currentTime,a=r.canAnimate&&r.shouldAnimate;e=r.multiplier;if(a||0===e)if(!((r=t.indexOf(n))<0))return a=t.get(r),0<e?(i=JulianDate.secondsDifference(a.stop,n),++r):(i=JulianDate.secondsDifference(a.start,n),--r),i/=e,0<=r&&i<=5?t.get(r):void 0}}function addToCache(e,t,i){var r=e._times.indexOf(i.start),n=e._tileCache,a=n[r];return defined(a)||(a=n[r]={}),!!defined(a[n=t.key])||(r=getKeyElements(n),t=new Request({throttle:!1,throttleByServer:!0,type:RequestType$1.IMAGERY,priorityFunction:t.priorityFunction}),!!defined(i=e._requestImageFunction(r.x,r.y,r.level,t,i))&&(a[n]={promise:i,request:t},!0))}function WebMapServiceImageryProvider(e){if(defined((e=defaultValue(e,defaultValue.EMPTY_OBJECT)).times)&&!defined(e.clock))throw new DeveloperError("options.times was specified, so options.clock is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=Resource.createIfNeeded(e.url),i=t.clone();t.setQueryParameters(WebMapServiceImageryProvider.DefaultParameters,!0),i.setQueryParameters(WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters,!0),defined(e.parameters)&&t.setQueryParameters(objectToLowercase(e.parameters)),defined(e.getFeatureInfoParameters)&&i.setQueryParameters(objectToLowercase(e.getFeatureInfoParameters));var r=this;this._reload=void 0,defined(e.times)&&(this._timeDynamicImagery=new TimeDynamicImagery({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,a){return requestImage(r,e,t,i,n,a)},reloadFunction:function(){defined(r._reload)&&r._reload()}}));var n={};n.layers=e.layers,n.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",n.width="{width}",n.height="{height}",1.3<=parseFloat(t.queryParameters.version)?n.crs=defaultValue(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof WebMercatorProjection?"EPSG:3857":"CRS:84"):n.srs=defaultValue(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof WebMercatorProjection?"EPSG:3857":"EPSG:4326"),t.setQueryParameters(n,!0),i.setQueryParameters(n,!0),n={query_layers:e.layers,info_format:"{format}"},1.3<=parseFloat(i.queryParameters.version)?(n.i="{i}",n.j="{j}"):(n.x="{i}",n.y="{j}"),i.setQueryParameters(n,!0),this._resource=t,this._pickFeaturesResource=i,this._layers=e.layers,this._tileProvider=new UrlTemplateImageryProvider({url:t,pickFeaturesUrl:i,tilingScheme:defaultValue(e.tilingScheme,new GeographicTilingScheme({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:defaultValue(e.getFeatureInfoFormats,WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures})}function requestImage(e,t,i,r,n,a){return a=defined(a)?a.data:void 0,e=e._tileProvider,defined(a)&&e._resource.setQueryParameters(a),e.requestImage(t,i,r,n)}function pickFeatures(e,t,i,r,n,a,o){return o=defined(o)?o.data:void 0,e=e._tileProvider,defined(o)&&e._pickFeaturesResource.setQueryParameters(o),e.pickFeatures(t,i,r,n,a)}function objectToLowercase(e){var t,i={};for(t in e)e.hasOwnProperty(t)&&(i[t.toLowerCase()]=e[t]);return i}Object.defineProperties(MapboxImageryProvider.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),MapboxImageryProvider.prototype.getTileCredits=function(e,t,i){},MapboxImageryProvider.prototype.requestImage=function(e,t,i,r){return this._imageryProvider.requestImage(e,t,i,r)},MapboxImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){return this._imageryProvider.pickFeatures(e,t,i,r,n)},MapboxImageryProvider._defaultCredit=defaultCredit$1,Object.defineProperties(SingleTileImageryProvider.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),SingleTileImageryProvider.prototype.getTileCredits=function(e,t,i){},SingleTileImageryProvider.prototype.requestImage=function(e,t,i,r){return this._image},SingleTileImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},Object.defineProperties(TimeDynamicImagery.prototype,{clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),TimeDynamicImagery.prototype.getFromCache=function(e,t,i,r){var n,a;t=getKey$1(e,t,i);return defined(i=this._tileCache[this._currentIntervalIndex])&&defined(i[t])&&(a=(n=i[t]).promise.otherwise((function(e){throw r.state=n.request.state,e})),delete i[t]),a},TimeDynamicImagery.prototype.checkApproachingInterval=function(e,t,i,r){e=getKey$1(e,t,i),t=this._tilesRequestedForInterval,i=getApproachingInterval(this),r={key:e,priorityFunction:r.priorityFunction},defined(i)&&addToCache(this,r,i)||t.push(r),512<=t.length&&t.splice(0,256)},TimeDynamicImagery.prototype._clockOnTick=function(e){var t=e.currentTime;if((e=this._times.indexOf(t))!==(t=this._currentIntervalIndex)){var i,r=this._tileCache[t];for(i in r)r.hasOwnProperty(i)&&r[i].request.cancel();return delete this._tileCache[t],this._tilesRequestedForInterval=[],this._currentIntervalIndex=e,void this._reloadFunction()}var n=getApproachingInterval(this);if(defined(n))for(var a=this._tilesRequestedForInterval,o=!0;o&&0!==a.length;){var s=a.pop();(o=addToCache(this,s,n))||a.push(s)}},Object.defineProperties(WebMapServiceImageryProvider.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}}}),WebMapServiceImageryProvider.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},WebMapServiceImageryProvider.prototype.requestImage=function(e,t,i,r){var n,a,o=this._timeDynamicImagery;return defined(o)&&(a=o.currentInterval,n=o.getFromCache(e,t,i,r)),defined(n)||(n=requestImage(this,e,t,i,r,a)),defined(n)&&defined(o)&&o.checkApproachingInterval(e,t,i,r),n},WebMapServiceImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){var a=this._timeDynamicImagery;return pickFeatures(this,e,t,i,r,n,defined(a)?a.currentInterval:void 0)},WebMapServiceImageryProvider.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new GetFeatureInfoFormat("json","application/json")),Object.freeze(new GetFeatureInfoFormat("xml","text/xml")),Object.freeze(new GetFeatureInfoFormat("text","text/html"))]);var defaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function WebMapTileServiceImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t,i=Resource.createIfNeeded(e.url),r=e.style,n=e.tileMatrixSetID;0<=i.url.indexOf("{")?(t={style:r,Style:r,TileMatrixSet:n},i.setTemplateValues(t),this._useKvp=!1):(i.setQueryParameters(defaultParameters),this._useKvp=!0),this._resource=i,this._layer=e.layer,this._style=r,this._tileMatrixSetID=n,this._tileMatrixLabels=e.tileMatrixLabels,this._format=defaultValue(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=defined(e.tilingScheme)?e.tilingScheme:new WebMercatorTilingScheme({ellipsoid:e.ellipsoid}),this._tileWidth=defaultValue(e.tileWidth,256),this._tileHeight=defaultValue(e.tileHeight,256),this._minimumLevel=defaultValue(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=defaultValue(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;var a=this;this._reload=void 0,defined(e.times)&&(this._timeDynamicImagery=new TimeDynamicImagery({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,r,n){return requestImage$1(a,e,t,i,r,n)},reloadFunction:function(){defined(a._reload)&&a._reload()}})),this._readyPromise=when.resolve(!0),r=this._tilingScheme.positionToTileXY(Rectangle.southwest(this._rectangle),this._minimumLevel),n=this._tilingScheme.positionToTileXY(Rectangle.northeast(this._rectangle),this._minimumLevel),Math.abs(n.x-r.x),Math.abs(n.y-r.y),this._errorEvent=new Event,r=e.credit,this._credit="string"==typeof r?new Credit(r):r,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():defined(this._subdomains)&&0<this._subdomains.length?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"]}function requestImage$1(e,t,i,r,n,a){var o,s=defined(c=e._tileMatrixLabels)?c[r]:r.toString(),l=e._subdomains,c=e._dimensions;a=defined(a)?a.data:void 0;return e._useKvp?((o={}).tilematrix=s,o.layer=e._layer,o.style=e._style,o.tilerow=i,o.tilecol=t,o.tilematrixset=e._tileMatrixSetID,o.format=e._format,defined(c)&&(o=combine(o,c)),defined(a)&&(o=combine(o,a)),o=e._resource.getDerivedResource({queryParameters:o,request:n})):(l={TileMatrix:s,TileRow:i.toString(),TileCol:t.toString(),s:l[(t+i+r)%l.length]},(o=e._resource.getDerivedResource({request:n})).setTemplateValues(l),defined(c)&&o.setTemplateValues(c),defined(a)&&o.setTemplateValues(a)),ImageryProvider.loadImage(e,o)}function createFactory(e){return function(t){return new e(t)}}Object.defineProperties(WebMapTileServiceImageryProvider.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,defined(this._reload)&&this._reload())}}}),WebMapTileServiceImageryProvider.prototype.getTileCredits=function(e,t,i){},WebMapTileServiceImageryProvider.prototype.requestImage=function(e,t,i,r){var n,a,o=this._timeDynamicImagery;return defined(o)&&(a=o.currentInterval,n=o.getFromCache(e,t,i,r)),defined(n)||(n=requestImage$1(this,e,t,i,r,a)),defined(n)&&defined(o)&&o.checkApproachingInterval(e,t,i,r),n},WebMapTileServiceImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){};var ImageryProviderMapping={ARCGIS_MAPSERVER:createFactory(ArcGisMapServerImageryProvider),BING:createFactory(BingMapsImageryProvider),GOOGLE_EARTH:createFactory(GoogleEarthEnterpriseMapsProvider),MAPBOX:createFactory(MapboxImageryProvider),SINGLE_TILE:createFactory(SingleTileImageryProvider),TMS:createFactory(TileMapServiceImageryProvider),URL_TEMPLATE:createFactory(UrlTemplateImageryProvider),WMS:createFactory(WebMapServiceImageryProvider),WMTS:createFactory(WebMapTileServiceImageryProvider)};function IonImageryProvider(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).assetId;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._ready=!1,this._tileCredits=void 0,this._errorEvent=new Event;var i=this,r=IonResource._createEndpointResource(t,e),n=e.assetId.toString()+e.accessToken+e.server;defined(e=IonImageryProvider._endpointCache[n])||(e=r.fetchJson(),IonImageryProvider._endpointCache[n]=e),this._readyPromise=e.then((function(e){if("IMAGERY"!==e.type)return when.reject(new RuntimeError("Cesium ion asset "+t+" is not an imagery asset."));var n=e.externalType;if(defined(n)){var a=ImageryProviderMapping[n];if(!defined(a))return when.reject(new RuntimeError("Unrecognized Cesium ion imagery type: "+n));a=a(e.options)}else a=new TileMapServiceImageryProvider({url:new IonResource(e,r)});return i._tileCredits=IonResource.getCreditsFromEndpoint(e,r),a.errorEvent.addEventListener((function(e){(e.provider=i)._errorEvent.raiseEvent(e)})),(i._imageryProvider=a).readyPromise.then((function(){return i._ready=!0}))}))}Object.defineProperties(IonImageryProvider.prototype,{ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel},proxy:{get:function(){}}}}),IonImageryProvider.prototype.getTileCredits=function(e,t,i){return defined(i=this._imageryProvider.getTileCredits(e,t,i))?this._tileCredits.concat(i):this._tileCredits},IonImageryProvider.prototype.requestImage=function(e,t,i,r){return this._imageryProvider.requestImage(e,t,i,r)},IonImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){return this._imageryProvider.pickFeatures(e,t,i,r,n)},IonImageryProvider._endpointCache={};var IonWorldImageryStyle={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},IonWorldImageryStyle$1=Object.freeze(IonWorldImageryStyle);function JobTypeBudget(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function JobScheduler(e){var t=new Array(JobType$1.NUMBER_OF_JOB_TYPES);t[JobType$1.TEXTURE]=new JobTypeBudget(defined(e)?e[JobType$1.TEXTURE]:10),t[JobType$1.PROGRAM]=new JobTypeBudget(defined(e)?e[JobType$1.PROGRAM]:10),t[JobType$1.BUFFER]=new JobTypeBudget(defined(e)?e[JobType$1.BUFFER]:30);for(var i=t.length,r=0,n=0;n<i;++n)r+=t[n].total;var a=new Array(i);for(n=0;n<i;++n)a[n]=!1;this._totalBudget=r,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=a}function Light(){}Object.defineProperties(JobTypeBudget.prototype,{total:{get:function(){return this._total}}}),JobScheduler.getTimestamp=getTimestamp$1,Object.defineProperties(JobScheduler.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),JobScheduler.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},JobScheduler.prototype.resetBudgets=function(){for(var e=this._budgets,t=e.length,i=0;i<t;++i){var r=e[i];r.starvedLastFrame=r.starvedThisFrame,r.starvedThisFrame=!1,r.usedThisFrame=0,r.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},JobScheduler.prototype.execute=function(e,t){var i,r=this._budgets,n=r[t],a=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&a)return!(n.starvedThisFrame=!0);if(n.usedThisFrame+n.stolenFromMeThisFrame>=n.total){for(var o=r.length,s=0;s<o&&(!((i=r[s]).usedThisFrame+i.stolenFromMeThisFrame<i.total)||i.starvedLastFrame);++s);if(s===o&&a)return!1;a&&(n.starvedThisFrame=!0)}return a=JobScheduler.getTimestamp(),e.execute(),a=JobScheduler.getTimestamp()-a,this._totalUsedThisFrame+=a,i?i.stolenFromMeThisFrame+=a:n.usedThisFrame+=a,this._executedThisFrame[t]=!0},Object.defineProperties(Light.prototype,{color:{get:DeveloperError.throwInstantiationError},intensity:{get:DeveloperError.throwInstantiationError}});var trailingSlashRegex$1=/\/$/,defaultCredit$2=new Credit('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function MapboxStyleImageryProvider(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).styleId,i=e.accessToken;this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var r=Resource.createIfNeeded(defaultValue(e.url,"https://api.mapbox.com/styles/v1/"));this._styleId=t,this._accessToken=i;var n=defaultValue(e.tilesize,512);this._tilesize=n;var a=defaultValue(e.username,"mapbox");this._username=a;var o;n=defined(e.scaleFactor)?"@2x":"",a=r.getUrlComponent();trailingSlashRegex$1.test(a)||(a+="/"),a+=this._username+"/"+t+"/tiles/"+this._tilesize+"/{z}/{x}/{y}"+n,r.url=a,r.setQueryParameters({access_token:i}),defined(e.credit)?"string"==typeof(o=e.credit)&&(o=new Credit(o)):o=defaultCredit$2,this._resource=r,this._imageryProvider=new UrlTemplateImageryProvider({url:r,credit:o,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}function Moon(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).textureUrl;defined(t)||(t=buildModuleUrl("Assets/Textures/moonSmall.jpg")),this.show=defaultValue(e.show,!0),this.textureUrl=t,this._ellipsoid=defaultValue(e.ellipsoid,Ellipsoid.MOON),this.onlySunLighting=defaultValue(e.onlySunLighting,!0),this._ellipsoidPrimitive=new EllipsoidPrimitive({radii:this.ellipsoid.radii,material:Material.fromType(Material.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new IauOrientationAxes}Object.defineProperties(MapboxStyleImageryProvider.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),MapboxStyleImageryProvider.prototype.getTileCredits=function(e,t,i){},MapboxStyleImageryProvider.prototype.requestImage=function(e,t,i,r){return this._imageryProvider.requestImage(e,t,i,r)},MapboxStyleImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){return this._imageryProvider.pickFeatures(e,t,i,r,n)},MapboxStyleImageryProvider._defaultCredit=defaultCredit$2,Object.defineProperties(Moon.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var icrfToFixed=new Matrix3,rotationScratch$1=new Matrix3,translationScratch=new Cartesian3,scratchCommandList$1=[];function NeverTileDiscardPolicy(e){}Moon.prototype.update=function(e){if(this.show){var t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;var i=e.time;defined(Transforms.computeIcrfToFixedMatrix(i,icrfToFixed))||Transforms.computeTemeToPseudoFixedMatrix(i,icrfToFixed);var r=this._axes.evaluate(i,rotationScratch$1);return Matrix3.transpose(r,r),Matrix3.multiply(icrfToFixed,r,r),i=Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(i,translationScratch),Matrix3.multiplyByVector(icrfToFixed,i,i),Matrix4.fromRotationTranslation(r,i,t.modelMatrix),i=e.commandList,(e.commandList=scratchCommandList$1).length=0,t.update(e),e.commandList=i,1===scratchCommandList$1.length?scratchCommandList$1[0]:void 0}},Moon.prototype.isDestroyed=function(){return!1},Moon.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),destroyObject(this)},NeverTileDiscardPolicy.prototype.isReady=function(){return!0},NeverTileDiscardPolicy.prototype.shouldDiscardImage=function(e){return!1};var AdjustTranslucentFS="#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nif (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n{\n#ifdef MRT\ngl_FragData[0] = u_bgColor;\ngl_FragData[1] = vec4(u_bgColor.a);\n#else\ngl_FragColor = u_bgColor;\n#endif\nreturn;\n}\ndiscard;\n}\n",CompositeOITFS="uniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 opaque = texture2D(u_opaque, v_textureCoordinates);\nvec4 accum = texture2D(u_accumulation, v_textureCoordinates);\nfloat r = texture2D(u_revealage, v_textureCoordinates).r;\n#ifdef MRT\nvec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\nvec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\ngl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\nif (opaque != czm_backgroundColor)\n{\ngl_FragColor.a = 1.0;\n}\n}\n";function OIT(e){this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var t=e.colorBufferFloat&&e.depthTexture;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new ClearCommand({color:new Color(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ClearCommand({color:new Color(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ClearCommand({color:new Color(0,0,0,0),owner:this}),this._alphaClearCommand=new ClearCommand({color:new Color(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new BoundingRectangle,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function destroyTextures$1(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function destroyFramebuffers$2(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function destroyResources$1(e){destroyTextures$1(e),destroyFramebuffers$2(e)}function updateTextures(e,t,i,r){destroyTextures$1(e),e._accumulationTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.FLOAT});var n=new Float32Array(i*r*4);e._revealageTexture=new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.FLOAT,source:{arrayBufferView:n,width:i,height:r},flipY:!1})}function updateFramebuffers$1(e,t){destroyFramebuffers$2(e);var i,r,n=WebGLConstants$1.FRAMEBUFFER_COMPLETE,a=!0;return e._translucentMRTSupport&&(e._translucentFBO=new Framebuffer({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new Framebuffer({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),e._translucentFBO.status===n&&e._adjustTranslucentFBO.status===n||(destroyFramebuffers$2(e),e._translucentMRTSupport=!1)),e._translucentMRTSupport||(e._translucentFBO=new Framebuffer({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new Framebuffer({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new Framebuffer({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new Framebuffer({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1}),i=e._translucentFBO.status===n,r=e._alphaFBO.status===n,t=e._adjustTranslucentFBO.status===n,n=e._adjustAlphaFBO.status===n,i&&r&&t&&n||(destroyResources$1(e),a=e._translucentMultipassSupport=!1)),a}OIT.prototype.update=function(e,t,i,r){var n,a,o,s,l;this.isSupported()&&(this._opaqueFBO=i,this._opaqueTexture=i.getColorTexture(0),this._depthStencilTexture=i.depthStencilTexture,s=this._opaqueTexture.width,l=this._opaqueTexture.height,(i=!defined(i=this._accumulationTexture)||i.width!==s||i.height!==l||r!==this._useHDR)&&updateTextures(this,e,s,l),(defined(this._translucentFBO)&&!i||updateFramebuffers$1(this,e))&&(this._useHDR=r,defined((n=this)._compositeCommand)||(a=new ShaderSource({sources:[CompositeOITFS]}),this._translucentMRTSupport&&a.defines.push("MRT"),o={u_opaque:function(){return n._opaqueTexture},u_accumulation:function(){return n._accumulationTexture},u_revealage:function(){return n._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(a,{uniformMap:o,owner:this})),defined(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(a=new ShaderSource({defines:["MRT"],sources:[AdjustTranslucentFS]}),o={u_bgColor:function(){return n._translucentMRTClearCommand.color},u_depthTexture:function(){return n._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(a,{uniformMap:o,owner:this})):this._translucentMultipassSupport&&(a=new ShaderSource({sources:[AdjustTranslucentFS]}),o={u_bgColor:function(){return n._translucentMultipassClearCommand.color},u_depthTexture:function(){return n._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(a,{uniformMap:o,owner:this}),o={u_bgColor:function(){return n._alphaClearCommand.color},u_depthTexture:function(){return n._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(a,{uniformMap:o,owner:this}))),this._viewport.width=s,this._viewport.height=l,l=(s=!BoundingRectangle.equals(this._viewport,t.viewport))!==this._useScissorTest,this._useScissorTest=s,BoundingRectangle.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=BoundingRectangle.clone(t.viewport,this._scissorRectangle),l=!0),defined(this._rs)&&BoundingRectangle.equals(this._viewport,this._rs.viewport)&&!l||(this._rs=RenderState.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),defined(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),defined(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)))};var translucentMRTBlend={enabled:!0,color:new Color(0,0,0,0),equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE,functionSourceAlpha:BlendFunction$1.ZERO,functionDestinationAlpha:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA},translucentColorBlend={enabled:!0,color:new Color(0,0,0,0),equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.ONE,functionDestinationRgb:BlendFunction$1.ONE,functionSourceAlpha:BlendFunction$1.ONE,functionDestinationAlpha:BlendFunction$1.ONE},translucentAlphaBlend={enabled:!0,color:new Color(0,0,0,0),equationRgb:BlendEquation$1.ADD,equationAlpha:BlendEquation$1.ADD,functionSourceRgb:BlendFunction$1.ZERO,functionDestinationRgb:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:BlendFunction$1.ZERO,functionDestinationAlpha:BlendFunction$1.ONE_MINUS_SOURCE_ALPHA};function getTranslucentRenderState$2(e,t,i,r){var n,a=i[r.id];return defined(a)||((n=RenderState.getState(r)).depthMask=!1,n.blending=t,a=RenderState.fromCache(n),i[r.id]=a),a}function getTranslucentMRTRenderState(e,t,i){return getTranslucentRenderState$2(t,translucentMRTBlend,e._translucentRenderStateCache,i)}function getTranslucentColorRenderState(e,t,i){return getTranslucentRenderState$2(t,translucentColorBlend,e._translucentRenderStateCache,i)}function getTranslucentAlphaRenderState(e,t,i){return getTranslucentRenderState$2(t,translucentAlphaBlend,e._alphaRenderStateCache,i)}var mrtShaderSource="    vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n    float ai = czm_gl_FragColor.a;\n    float wzi = czm_alphaWeight(ai);\n    gl_FragData[0] = vec4(Ci * wzi, ai);\n    gl_FragData[1] = vec4(ai * wzi);\n",colorShaderSource="    vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n    float ai = czm_gl_FragColor.a;\n    float wzi = czm_alphaWeight(ai);\n    gl_FragColor = vec4(Ci, ai) * wzi;\n",alphaShaderSource="    float ai = czm_gl_FragColor.a;\n    gl_FragColor = vec4(ai);\n";function getTranslucentShaderProgram$1(e,t,i,r){var n,a,o=e.shaderCache.getDerivedShaderProgram(t,i);return defined(o)||(n=t._attributeLocations,(a=t.fragmentShaderSource.clone()).sources=a.sources.map((function(e){return(e=(e=(e=ShaderSource.replaceMain(e,"czm_translucent_main")).replace(/gl_FragColor/g,"czm_gl_FragColor")).replace(/\bdiscard\b/g,"czm_discard = true")).replace(/czm_phong/g,"czm_translucentPhong")})),a.sources.splice(0,0,(-1!==r.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n":"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),a.sources.push("void main()\n{\n    czm_translucent_main();\n    if (czm_discard)\n    {\n        discard;\n    }\n"+r+"}\n"),o=e.shaderCache.createDerivedShaderProgram(t,i,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:n})),o}function getTranslucentMRTShaderProgram(e,t){return getTranslucentShaderProgram$1(e,t,"translucentMRT",mrtShaderSource)}function getTranslucentColorShaderProgram(e,t){return getTranslucentShaderProgram$1(e,t,"translucentMultipass",colorShaderSource)}function getTranslucentAlphaShaderProgram(e,t){return getTranslucentShaderProgram$1(e,t,"alphaMultipass",alphaShaderSource)}function executeTranslucentCommandsSortedMultipass(e,t,i,r,n,a){var o,s,l=t.context,c=t.frameState.useLogDepth,u=t._hdr,d=r.framebuffer,h=n.length,p=t.frameState.shadowState.lightShadowsEnabled;r.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(l,r),r.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(l,r);var f=e._opaqueFBO;for(r.framebuffer=e._translucentFBO,s=0;s<h;++s)o=n[s],o=c?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,i((p&&o.receiveShadows?o.derivedCommands.oit.shadows:o.derivedCommands.oit).translucentCommand,t,l,r,f);for(defined(a)&&(o=a.unclassifiedCommand,i((p&&o.receiveShadows?o.derivedCommands.oit.shadows:o.derivedCommands.oit).translucentCommand,t,l,r,f)),r.framebuffer=e._alphaFBO,s=0;s<h;++s)o=n[s],o=c?o.derivedCommands.logDepth.command:o,o=u?o.derivedCommands.hdr.command:o,i((p&&o.receiveShadows?o.derivedCommands.oit.shadows:o.derivedCommands.oit).alphaCommand,t,l,r,f);defined(a)&&(o=a.unclassifiedCommand,i((p&&o.receiveShadows?o.derivedCommands.oit.shadows:o.derivedCommands.oit).alphaCommand,t,l,r,f)),r.framebuffer=d}function executeTranslucentCommandsSortedMRT(e,t,i,r,n,a){var o=t.context,s=t.frameState.useLogDepth,l=t._hdr,c=r.framebuffer,u=n.length,d=t.frameState.shadowState.lightShadowsEnabled;r.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(o,r);var h,p=e._opaqueFBO;r.framebuffer=e._translucentFBO;for(var f=0;f<u;++f)h=n[f],h=s?h.derivedCommands.logDepth.command:h,h=l?h.derivedCommands.hdr.command:h,i((d&&h.receiveShadows?h.derivedCommands.oit.shadows:h.derivedCommands.oit).translucentCommand,t,o,r,p);defined(a)&&(h=a.unclassifiedCommand,i((d&&h.receiveShadows?h.derivedCommands.oit.shadows:h.derivedCommands.oit).translucentCommand,t,o,r,p)),r.framebuffer=c}OIT.prototype.createDerivedCommands=function(e,t,i){var r,n,a,o,s,l;return defined(i)||(i={}),this._translucentMRTSupport?(defined(i.translucentCommand)&&(r=i.translucentCommand.shaderProgram,n=i.translucentCommand.renderState),i.translucentCommand=DrawCommand.shallowClone(e,i.translucentCommand),defined(r)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=r,i.translucentCommand.renderState=n):(i.translucentCommand.shaderProgram=getTranslucentMRTShaderProgram(t,e.shaderProgram),i.translucentCommand.renderState=getTranslucentMRTRenderState(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)):(defined(i.translucentCommand)&&(a=i.translucentCommand.shaderProgram,o=i.translucentCommand.renderState,s=i.alphaCommand.shaderProgram,l=i.alphaCommand.renderState),i.translucentCommand=DrawCommand.shallowClone(e,i.translucentCommand),i.alphaCommand=DrawCommand.shallowClone(e,i.alphaCommand),defined(a)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=a,i.translucentCommand.renderState=o,i.alphaCommand.shaderProgram=s,i.alphaCommand.renderState=l):(i.translucentCommand.shaderProgram=getTranslucentColorShaderProgram(t,e.shaderProgram),i.translucentCommand.renderState=getTranslucentColorRenderState(this,t,e.renderState),i.alphaCommand.shaderProgram=getTranslucentAlphaShaderProgram(t,e.shaderProgram),i.alphaCommand.renderState=getTranslucentAlphaRenderState(this,t,e.renderState),i.shaderProgramId=e.shaderProgram.id)),i},OIT.prototype.executeCommands=function(e,t,i,r,n){(this._translucentMRTSupport?executeTranslucentCommandsSortedMRT:executeTranslucentCommandsSortedMultipass)(this,e,t,i,r,n)},OIT.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},OIT.prototype.clear=function(e,t,i){var r=t.framebuffer;t.framebuffer=this._opaqueFBO,Color.clone(i,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,t)),t.framebuffer=r},OIT.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},OIT.prototype.isDestroyed=function(){return!1},OIT.prototype.destroy=function(){return destroyResources$1(this),defined(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),defined(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),defined(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),destroyObject(this)};var defaultCredit$3=new Credit("MapQuest, Open Street Map and contributors, CC-BY-SA");function OpenStreetMapImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT);var t=Resource.createIfNeeded(defaultValue(e.url,"https://a.tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+="{z}/{x}/{y}."+defaultValue(e.fileExtension,"png");var i=new WebMercatorTilingScheme({ellipsoid:e.ellipsoid}),r=defaultValue(e.minimumLevel,0),n=e.maximumLevel,a=defaultValue(e.rectangle,i.rectangle),o=i.positionToTileXY(Rectangle.southwest(a),r),s=i.positionToTileXY(Rectangle.northeast(a),r);"string"==typeof(e=(Math.abs(s.x-o.x),Math.abs(s.y-o.y),defaultValue(e.credit,defaultCredit$3)))&&(e=new Credit(e)),UrlTemplateImageryProvider.call(this,{url:t,credit:e,tilingScheme:i,tileWidth:256,tileHeight:256,minimumLevel:r,maximumLevel:n,rectangle:a})}defined(Object.create)&&(OpenStreetMapImageryProvider.prototype=Object.create(UrlTemplateImageryProvider.prototype),OpenStreetMapImageryProvider.prototype.constructor=OpenStreetMapImageryProvider);var defaultSize=new Cartesian2(1,1);function Particle(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.mass=defaultValue(e.mass,1),this.position=Cartesian3.clone(defaultValue(e.position,Cartesian3.ZERO)),this.velocity=Cartesian3.clone(defaultValue(e.velocity,Cartesian3.ZERO)),this.life=defaultValue(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=Color.clone(defaultValue(e.startColor,Color.WHITE)),this.endColor=Color.clone(defaultValue(e.endColor,Color.WHITE)),this.startScale=defaultValue(e.startScale,1),this.endScale=defaultValue(e.endScale,1),this.imageSize=Cartesian2.clone(defaultValue(e.imageSize,defaultSize)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(Particle.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var deltaScratch=new Cartesian3;function ParticleBurst(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.time=defaultValue(e.time,0),this.minimum=defaultValue(e.minimum,0),this.maximum=defaultValue(e.maximum,50),this._complete=!1}function ParticleEmitter(e){}Particle.prototype.update=function(e,t){return Cartesian3.multiplyByScalar(this.velocity,e,deltaScratch),Cartesian3.add(this.position,deltaScratch,this.position),defined(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life},Object.defineProperties(ParticleBurst.prototype,{complete:{get:function(){return this._complete}}}),ParticleEmitter.prototype.emit=function(e){DeveloperError.throwInstantiationError()};var defaultImageSize=new Cartesian2(1,1);function ParticleSystem(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.show=defaultValue(e.show,!0),this.updateCallback=e.updateCallback,this.loop=defaultValue(e.loop,!0),this.image=defaultValue(e.image,void 0);var t=e.emitter;defined(t)||(t=new CircleEmitter(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this._emitterModelMatrix=Matrix4.clone(defaultValue(e.emitterModelMatrix,Matrix4.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new Matrix4,this._startColor=Color.clone(defaultValue(e.color,defaultValue(e.startColor,Color.WHITE))),this._endColor=Color.clone(defaultValue(e.color,defaultValue(e.endColor,Color.WHITE))),this._startScale=defaultValue(e.scale,defaultValue(e.startScale,1)),this._endScale=defaultValue(e.scale,defaultValue(e.endScale,1)),this._emissionRate=defaultValue(e.emissionRate,5),this._minimumSpeed=defaultValue(e.speed,defaultValue(e.minimumSpeed,1)),this._maximumSpeed=defaultValue(e.speed,defaultValue(e.maximumSpeed,1)),this._minimumParticleLife=defaultValue(e.particleLife,defaultValue(e.minimumParticleLife,5)),this._maximumParticleLife=defaultValue(e.particleLife,defaultValue(e.maximumParticleLife,5)),this._minimumMass=defaultValue(e.mass,defaultValue(e.minimumMass,1)),this._maximumMass=defaultValue(e.mass,defaultValue(e.maximumMass,1)),this._minimumImageSize=Cartesian2.clone(defaultValue(e.imageSize,defaultValue(e.minimumImageSize,defaultImageSize))),this._maximumImageSize=Cartesian2.clone(defaultValue(e.imageSize,defaultValue(e.maximumImageSize,defaultImageSize))),this._sizeInMeters=defaultValue(e.sizeInMeters,!1),this._lifetime=defaultValue(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new Event,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}function updateParticlePool(e){var t=e._emissionRate,i=e._maximumParticleLife,r=0,n=e._bursts;if(defined(n))for(var a=n.length,o=0;o<a;++o)r+=n[o].maximum;for(var s=e._billboardCollection,l=e.image,c=(t=Math.ceil(t*i+r),i=e._particles,e._particlePool),u=Math.max(t-i.length-c.length,0),d=0;d<u;++d){var h=new Particle;h._billboard=s.add({image:l}),c.push(h)}e._particleEstimate=t}function getOrCreateParticle(e){return defined(e=e._particlePool.pop())||(e=new Particle),e}function addParticleToPool(e,t){e._particlePool.push(t)}function freeParticlePool(e){for(var t=e._particles,i=e._particlePool,r=e._billboardCollection,n=(t=t.length,i.length),a=(e=e._particleEstimate,t=n-Math.max(e-t-n,0));a<n;++a){var o=i[a];r.remove(o._billboard)}i.length=t}function removeBillboard(e){defined(e._billboard)&&(e._billboard.show=!1)}function updateBillboard(e,t){var i=t._billboard;defined(i)||(i=t._billboard=e._billboardCollection.add({image:t.image})),i.width=t.imageSize.x,i.height=t.imageSize.y,i.position=t.position,i.sizeInMeters=e.sizeInMeters,i.show=!0;var r=CesiumMath.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),n=CesiumMath.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),a=CesiumMath.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge);e=CesiumMath.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);i.color=new Color(r,n,a,e),i.scale=CesiumMath.lerp(t.startScale,t.endScale,t.normalizedAge)}function addParticle(e,t){t.startColor=Color.clone(e._startColor,t.startColor),t.endColor=Color.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=CesiumMath.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=CesiumMath.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=CesiumMath.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=CesiumMath.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;var i=CesiumMath.randomBetween(e._minimumSpeed,e._maximumSpeed);Cartesian3.multiplyByScalar(t.velocity,i,t.velocity),e._particles.push(t)}function calculateNumberToEmit(e,t){if(e._isComplete)return 0;t=(t=CesiumMath.mod(t,e._lifetime))*e._emissionRate;var i=Math.floor(t);if(e._carryOver+=t-i,1<e._carryOver&&(i++,--e._carryOver),defined(e.bursts))for(var r=e.bursts.length,n=0;n<r;n++){var a=e.bursts[n],o=e._currentTime;defined(a)&&!a._complete&&o>a.time&&(i+=CesiumMath.randomBetween(a.minimum,a.maximum),a._complete=!0)}return i}Object.defineProperties(ParticleSystem.prototype,{emitter:{get:function(){return this._emitter},set:function(e){this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!Matrix4.equals(this._modelMatrix,e),Matrix4.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!Matrix4.equals(this._emitterModelMatrix,e),Matrix4.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){Color.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){Color.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});var rotatedVelocityScratch=new Cartesian3;function getElement(e){return"string"==typeof e&&(e=document.getElementById(e)),e}function PerformanceDisplay(e){var t=getElement((e=defaultValue(e,defaultValue.EMPTY_OBJECT)).container);this._container=t;var i=document.createElement("div");i.className="cesium-performanceDisplay",(e=document.createElement("div")).className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),e.appendChild(this._fpsText),(t=document.createElement("div")).className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),t.appendChild(this._msText),i.appendChild(t),i.appendChild(e),this._container.appendChild(i),this._lastFpsSampleTime=getTimestamp$1(),this._lastMsSampleTime=getTimestamp$1(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1,(e=document.createElement("div")).className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),e.appendChild(this._throttledText),i.appendChild(e)}function PickDepth(){this._framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._useLogDepth=void 0,this._debugPickDepthViewportCommand=void 0}function executeDebugPickDepth(e,t,i,r){var n;defined(e._debugPickDepthViewportCommand)&&r===e._useLogDepth||(n=new ShaderSource({defines:[r?"LOG_DEPTH":""],sources:["uniform highp sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n    z_window = czm_reverseLogDepth(z_window); \n    float n_range = czm_depthRange.near;\n    float f_range = czm_depthRange.far;\n    float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n    float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n    gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n"]}),e._debugPickDepthViewportCommand=t.createViewportQuadCommand(n,{uniformMap:{u_texture:function(){return e._depthTexture}},owner:e}),e._useLogDepth=r),e._debugPickDepthViewportCommand.execute(t,i)}function destroyTextures$2(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function destroyFramebuffers$3(e){e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy()}function createTextures$2(e,t,i,r){e._depthTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE})}function createFramebuffers$2(e,t,i,r){destroyTextures$2(e),destroyFramebuffers$3(e),createTextures$2(e,t,i,r),e._framebuffer=new Framebuffer({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function updateFramebuffers$2(e,t,i){var r=i.width,n=i.height;i=!defined(i=e._depthTexture)||i.width!==r||i.height!==n;defined(e._framebuffer)&&!i||createFramebuffers$2(e,t,r,n)}function updateCopyCommands$1(e,t,i){defined(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand("uniform highp sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n    gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n",{renderState:RenderState.fromCache(),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._framebuffer}ParticleSystem.prototype.update=function(e){if(this.show){defined(this._billboardCollection)||(this._billboardCollection=new BillboardCollection),this._updateParticlePool&&(updateParticlePool(this),this._updateParticlePool=!1);var t=0;this._previousTime&&(t=JulianDate.secondsDifference(e.time,this._previousTime)),t<0&&(t=0);var i,r=this._particles,n=this._emitter,a=this.updateCallback,o=r.length;for(c=0;c<o;++c)(i=r[c]).update(t,a)?updateBillboard(this,i):(removeBillboard(i),addParticleToPool(this,i),r[c]=r[o-1],--c,--o);r.length=o;var s=calculateNumberToEmit(this,t);if(0<s&&defined(n)){this._matrixDirty&&(this._combinedMatrix=Matrix4.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);for(var l=this._combinedMatrix,c=0;c<s;c++)i=getOrCreateParticle(this),this._emitter.emit(i),Cartesian3.add(i.position,i.velocity,rotatedVelocityScratch),Matrix4.multiplyByPoint(l,rotatedVelocityScratch,rotatedVelocityScratch),i.position=Matrix4.multiplyByPoint(l,i.position,i.position),Cartesian3.subtract(rotatedVelocityScratch,i.position,i.velocity),Cartesian3.normalize(i.velocity,i.velocity),addParticle(this,i),updateBillboard(this,i)}if(this._billboardCollection.update(e),this._previousTime=JulianDate.clone(e.time,this._previousTime),this._currentTime+=t,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=CesiumMath.mod(this._currentTime,this._lifetime),this.bursts){var u=this.bursts.length;for(c=0;c<u;c++)this.bursts[c]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120==0&&freeParticlePool(this)}},ParticleSystem.prototype.isDestroyed=function(){return!1},ParticleSystem.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),destroyObject(this)},Object.defineProperties(PerformanceDisplay.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(this._throttledText.nodeValue=e?"(throttled)":"",this._throttled=e)}}}),PerformanceDisplay.prototype.update=function(e){var t,i=getTimestamp$1(),r=defaultValue(e,!0);this._fpsFrameCount++,1e3<(e=i-this._lastFpsSampleTime)&&(t="N/A",r&&(t=1e3*this._fpsFrameCount/e|0),this._fpsText.nodeValue=t+" FPS",this._lastFpsSampleTime=i,this._fpsFrameCount=0),this._msFrameCount++,200<(e=i-this._lastMsSampleTime)&&(t="N/A",r&&(t=(e/this._msFrameCount).toFixed(2)),this._msText.nodeValue=t+" MS",this._lastMsSampleTime=i,this._msFrameCount=0)},PerformanceDisplay.prototype.destroy=function(){return destroyObject(this)},PickDepth.prototype.executeDebugPickDepth=function(e,t,i){executeDebugPickDepth(this,e,t,i)},PickDepth.prototype.update=function(e,t){updateFramebuffers$2(this,e,t),updateCopyCommands$1(this,e,t)};var scratchPackedDepth=new Cartesian4,packedDepthScale=new Cartesian4(1,1/255,1/65025,1/16581375);function PickDepthFramebuffer(){this._depthStencilTexture=void 0,this._framebuffer=void 0,this._passState=void 0}function destroyResources$2(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy()}function createResources$6(e,t){var i=t.drawingBufferWidth,r=t.drawingBufferHeight;e._depthStencilTexture=new Texture({context:t,width:i,height:r,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8}),e._framebuffer=new Framebuffer({context:t,depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),(t=new PassState(t)).blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new BoundingRectangle},t.viewport=new BoundingRectangle,e._passState=t}function PickFramebuffer(e){var t=new PassState(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new BoundingRectangle},t.viewport=new BoundingRectangle,this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}PickDepth.prototype.getDepth=function(e,t,i){if(defined(this._framebuffer))return i=e.readPixels({x:t,y:i,width:1,height:1,framebuffer:this._framebuffer}),i=Cartesian4.unpack(i,0,scratchPackedDepth),Cartesian4.divideByScalar(i,255,i),Cartesian4.dot(i,packedDepthScale)},PickDepth.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},PickDepth.prototype.isDestroyed=function(){return!1},PickDepth.prototype.destroy=function(){return destroyTextures$2(this),destroyFramebuffers$3(this),defined(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=defined(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),destroyObject(this)},PickDepthFramebuffer.prototype.update=function(e,t,i){var r=i.width,n=i.height;return defined(this._framebuffer)&&r===this._depthStencilTexture.width&&n===this._depthStencilTexture.height||(destroyResources$2(this),createResources$6(this,e)),i=this._framebuffer,(e=this._passState).framebuffer=i,e.viewport.width=r,e.viewport.height=n,e.scissorTest.rectangle.x=t.x,e.scissorTest.rectangle.y=n-t.y,e.scissorTest.rectangle.width=1,e.scissorTest.rectangle.height=1,e},PickDepthFramebuffer.prototype.isDestroyed=function(){return!1},PickDepthFramebuffer.prototype.destroy=function(){return destroyResources$2(this),destroyObject(this)},PickFramebuffer.prototype.begin=function(e,t){var i=this._context,r=t.width;t=t.height;return BoundingRectangle.clone(e,this._passState.scissorTest.rectangle),defined(this._fb)&&this._width===r&&this._height===t||(this._width=r,this._height=t,this._fb=this._fb&&this._fb.destroy(),this._fb=new Framebuffer({context:i,colorTextures:[new Texture({context:i,width:r,height:t})],depthStencilRenderbuffer:new Renderbuffer({context:i,width:r,height:t,format:RenderbufferFormat$1.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=r,this._passState.viewport.height=t,this._passState};var colorScratch$7=new Color;function SceneFramebuffer(){this._colorTexture=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._idFramebuffer=void 0,this._idClearColor=new Color(0,0,0,0),this._useHdr=void 0,this._clearCommand=new ClearCommand({color:new Color(0,0,0,0),depth:1,owner:this})}function destroyResources$3(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._idFramebuffer=e._idFramebuffer&&e._idFramebuffer.destroy(),e._colorTexture=e._colorTexture&&e._colorTexture.destroy(),e._idTexture=e._idTexture&&e._idTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&e._depthStencilRenderbuffer.destroy(),e._depthStencilIdTexture=e._depthStencilIdTexture&&e._depthStencilIdTexture.destroy(),e._depthStencilIdRenderbuffer=e._depthStencilIdRenderbuffer&&e._depthStencilIdRenderbuffer.destroy(),e._framebuffer=void 0,e._idFramebuffer=void 0,e._colorTexture=void 0,e._idTexture=void 0,e._depthStencilTexture=void 0,e._depthStencilRenderbuffer=void 0,e._depthStencilIdTexture=void 0,e._depthStencilIdRenderbuffer=void 0}function ShadowMapShader(){}function ShadowMap(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).context;this._enabled=defaultValue(e.enabled,!0),this._softShadows=defaultValue(e.softShadows,!1),this._normalOffset=defaultValue(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=defaultValue(e.fromLightSource,!0),this.darkness=defaultValue(e.darkness,.3),this._darkness=this.darkness,this.maximumDistance=defaultValue(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1;var i,r=this._needsUpdate=!0;(FeatureDetection.isInternetExplorer()||FeatureDetection.isEdge()||(FeatureDetection.isChrome()||FeatureDetection.isFirefox())&&FeatureDetection.isWindows()&&!t.depthTexture)&&(r=!1),this._polygonOffsetSupported=r,this._terrainBias={polygonOffset:r,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:r,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new Matrix4,this._shadowMapTexture=void 0,this._lightDirectionEC=new Cartesian3,this._lightPositionEC=new Cartesian4,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new ShadowMapCamera,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new BoundingSphere,this._isPointLight=defaultValue(e.isPointLight,!1),this._pointLightRadius=defaultValue(e.pointLightRadius,100),this._cascadesEnabled=!this._isPointLight&&defaultValue(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?defaultValue(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new Cartesian2,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new OrthographicOffCenterFrustum:defined(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new Cartesian4,new Cartesian4],this._cascadeMatrices=[new Matrix4,new Matrix4,new Matrix4,new Matrix4],this._cascadeDistances=new Cartesian4,i=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(i);for(var n=0;n<i;++n)this._passes[n]=new ShadowPass(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,createRenderStates$5(this),this._clearCommand=new ClearCommand({depth:1,color:new Color}),this._clearPassState=new PassState(t),this._size=defaultValue(e.size,2048),this.size=this._size}function ShadowPass(e){this.camera=new ShadowMapCamera,this.passState=new PassState(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function createRenderState$1(e,t){return RenderState.fromCache({cull:{enabled:!0,face:CullFace$1.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function createRenderStates$5(e){var t=!e._usesDepthTexture;e._primitiveRenderState=createRenderState$1(t,e._primitiveBias),e._terrainRenderState=createRenderState$1(t,e._terrainBias),e._pointRenderState=createRenderState$1(t,e._pointBias)}function destroyFramebuffer$1(e){for(var t=e._passes.length,i=0;i<t;++i){var r=e._passes[i],n=r.framebuffer;defined(n)&&!n.isDestroyed()&&n.destroy(),r.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function createFramebufferColor(e,t){for(var i=new Renderbuffer({context:t,width:e._textureSize.x,height:e._textureSize.y,format:RenderbufferFormat$1.DEPTH_COMPONENT16}),r=new Texture({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),n=new Framebuffer({context:t,depthRenderbuffer:i,colorTextures:[r],destroyAttachments:!1}),a=e._passes.length,o=0;o<a;++o){var s=e._passes[o];s.framebuffer=n,s.passState.framebuffer=n}e._shadowMapTexture=r,e._depthAttachment=i,e._colorAttachment=r}function createFramebufferDepth(e,t){for(var i=new Texture({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8,sampler:Sampler.NEAREST}),r=new Framebuffer({context:t,depthStencilTexture:i,destroyAttachments:!1}),n=e._passes.length,a=0;a<n;++a){var o=e._passes[a];o.framebuffer=r,o.passState.framebuffer=r}e._shadowMapTexture=i,e._depthAttachment=i}function createFramebufferCube(e,t){for(var i=new Renderbuffer({context:t,width:e._textureSize.x,height:e._textureSize.y,format:RenderbufferFormat$1.DEPTH_COMPONENT16}),r=new CubeMap({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),n=[r.negativeX,r.negativeY,r.negativeZ,r.positiveX,r.positiveY,r.positiveZ],a=0;a<6;++a){var o=new Framebuffer({context:t,depthRenderbuffer:i,colorTextures:[n[a]],destroyAttachments:!1}),s=e._passes[a];s.framebuffer=o,s.passState.framebuffer=o}e._shadowMapTexture=r,e._depthAttachment=i,e._colorAttachment=r}function createFramebuffer$3(e,t){(e._isPointLight?createFramebufferCube:e._usesDepthTexture?createFramebufferDepth:createFramebufferColor)(e,t)}function checkFramebuffer(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==WebGLConstants$1.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,createRenderStates$5(e),destroyFramebuffer$1(e),createFramebuffer$3(e,t))}function updateFramebuffer(e,t){defined(e._passes[0].framebuffer)&&e._shadowMapTexture.width===e._textureSize.x||(destroyFramebuffer$1(e),createFramebuffer$3(e,t),checkFramebuffer(e,t),clearFramebuffer(e,t))}function clearFramebuffer(e,t,i){i=defaultValue(i,0),!e._isPointLight&&0!==i||(e._clearCommand.framebuffer=e._passes[i].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function resize(e,t){e._size=t;var i,r=e._passes,n=r.length,a=e._textureSize;e._isPointLight?(t=ContextLimits.maximumCubeMapSize>=t?t:ContextLimits.maximumCubeMapSize,a.x=t,i=new BoundingRectangle(0,0,a.y=t,t),r[0].passState.viewport=i,r[1].passState.viewport=i,r[2].passState.viewport=i,r[3].passState.viewport=i,r[4].passState.viewport=i,r[5].passState.viewport=i):1===n?(t=ContextLimits.maximumTextureSize>=t?t:ContextLimits.maximumTextureSize,a.x=t,a.y=t,r[0].passState.viewport=new BoundingRectangle(0,0,t,t)):4===n&&(t=ContextLimits.maximumTextureSize>=2*t?t:ContextLimits.maximumTextureSize/2,a.x=2*t,a.y=2*t,r[0].passState.viewport=new BoundingRectangle(0,0,t,t),r[1].passState.viewport=new BoundingRectangle(t,0,t,t),r[2].passState.viewport=new BoundingRectangle(0,t,t,t),r[3].passState.viewport=new BoundingRectangle(t,t,t,t)),e._clearPassState.viewport=new BoundingRectangle(0,0,a.x,a.y);for(var o=0;o<n;++o){var s=r[o],l=(d=s.passState.viewport).x/a.x,c=d.y/a.y,u=d.width/a.x,d=d.height/a.y;s.textureOffsets=new Matrix4(u,0,0,l,0,d,0,c,0,0,1,0,0,0,0,1)}}PickFramebuffer.prototype.end=function(e){for(var t=defaultValue(e.width,1),i=defaultValue(e.height,1),r=this._context,n=r.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb}),a=(e=Math.max(t,i))*e,o=Math.floor(.5*t),s=Math.floor(.5*i),l=0,c=0,u=0,d=-1,h=0;h<a;++h){if(-o<=l&&l<=o&&-s<=c&&c<=s){var p=4*((s-c)*t+l+o);if(colorScratch$7.red=Color.byteToFloat(n[p]),colorScratch$7.green=Color.byteToFloat(n[1+p]),colorScratch$7.blue=Color.byteToFloat(n[2+p]),colorScratch$7.alpha=Color.byteToFloat(n[3+p]),defined(p=r.getObjectByPickColor(colorScratch$7)))return p}(l===c||l<0&&-l===c||0<l&&l===1-c)&&(p=u,u=-d,d=p),l+=u,c+=d}},PickFramebuffer.prototype.isDestroyed=function(){return!1},PickFramebuffer.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),destroyObject(this)},SceneFramebuffer.prototype.update=function(e,t,i){var r=t.width,n=t.height;defined(t=this._colorTexture)&&t.width===r&&t.height===n&&i===this._useHdr||(destroyResources$3(this),i=(this._useHdr=i)?e.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,this._colorTexture=new Texture({context:e,width:r,height:n,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:i,sampler:Sampler.NEAREST}),this._idTexture=new Texture({context:e,width:r,height:n,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,sampler:Sampler.NEAREST}),e.depthTexture?(this._depthStencilTexture=new Texture({context:e,width:r,height:n,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8,sampler:Sampler.NEAREST}),this._depthStencilIdTexture=new Texture({context:e,width:r,height:n,pixelFormat:PixelFormat$1.DEPTH_STENCIL,pixelDatatype:PixelDatatype$1.UNSIGNED_INT_24_8,sampler:Sampler.NEAREST})):(this._depthStencilRenderbuffer=new Renderbuffer({context:e,width:r,height:n,format:RenderbufferFormat$1.DEPTH_STENCIL}),this._depthStencilIdRenderbuffer=new Renderbuffer({context:e,width:r,height:n,format:RenderbufferFormat$1.DEPTH_STENCIL})),this._framebuffer=new Framebuffer({context:e,colorTextures:[this._colorTexture],depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}),this._idFramebuffer=new Framebuffer({context:e,colorTextures:[this._idTexture],depthStencilTexture:this._depthStencilIdTexture,depthStencilRenderbuffer:this._depthStencilIdRenderbuffer,destroyAttachments:!1}))},SceneFramebuffer.prototype.clear=function(e,t,i){var r=t.framebuffer;t.framebuffer=this._framebuffer,Color.clone(i,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=this._idFramebuffer,Color.clone(this._idClearColor,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=r},SceneFramebuffer.prototype.getFramebuffer=function(){return this._framebuffer},SceneFramebuffer.prototype.getIdFramebuffer=function(){return this._idFramebuffer},SceneFramebuffer.prototype.isDestroyed=function(){return!1},SceneFramebuffer.prototype.destroy=function(){return destroyResources$3(this),destroyObject(this)},ShadowMapShader.getShadowCastShaderKeyword=function(e,t,i,r){return"castShadow "+e+" "+t+" "+i+" "+r},ShadowMapShader.createShadowCastVertexShader=function(e,t,i){var r=e.defines.slice(0),n=e.sources.slice(0);if(r.push("SHADOW_MAP"),i&&r.push("GENERATE_POSITION"),e=defined(ShaderSource.findPositionVarying(e)),t&&!e){for(var a=n.length,o=0;o<a;++o)n[o]=ShaderSource.replaceMain(n[o],"czm_shadow_cast_main");n.push("varying vec3 v_positionEC; \nvoid main() \n{ \n    czm_shadow_cast_main(); \n    v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}")}return new ShaderSource({defines:r,sources:n})},ShadowMapShader.createShadowCastFragmentShader=function(e,t,i,r){var n=e.defines.slice(0),a=e.sources.slice(0),o=ShaderSource.findPositionVarying(e),s=defined(o);s||(o="v_positionEC");for(var l=a.length,c=0;c<l;++c)a[c]=ShaderSource.replaceMain(a[c],"czm_shadow_cast_main");return e="",t&&(s||(e+="varying vec3 v_positionEC; \n"),e+="uniform vec4 shadowMap_lightPositionEC; \n"),e+=r?"void main() \n{ \n":"void main() \n{ \n    czm_shadow_cast_main(); \n    if (gl_FragColor.a == 0.0) \n    { \n       discard; \n    } \n",e+=t?"    float distance = length("+o+"); \n    if (distance >= shadowMap_lightPositionEC.w) \n    { \n        discard; \n    } \n    distance /= shadowMap_lightPositionEC.w; // radius \n    gl_FragColor = czm_packDepth(distance); \n":i?"    gl_FragColor = vec4(1.0); \n":"    gl_FragColor = czm_packDepth(gl_FragCoord.z); \n",e+="} \n",a.push(e),new ShaderSource({defines:n,sources:a})},ShadowMapShader.getShadowReceiveShaderKeyword=function(e,t,i,r){return"receiveShadow "+e._usesDepthTexture+e._polygonOffsetSupported+e._isPointLight+e._isSpotLight+(1<e._numberOfCascades)+e.debugCascadeColors+e.softShadows+t+i+r},ShadowMapShader.createShadowReceiveVertexShader=function(e,t,i){var r=e.defines.slice(0);e=e.sources.slice(0);return r.push("SHADOW_MAP"),t&&(i?r.push("GENERATE_POSITION_AND_NORMAL"):r.push("GENERATE_POSITION")),new ShaderSource({defines:r,sources:e})},ShadowMapShader.createShadowReceiveFragmentShader=function(e,t,i,r,n){for(var a=ShaderSource.findNormalVarying(e),o=!r&&defined(a)||r&&n,s=ShaderSource.findPositionVarying(e),l=defined(s),c=t._usesDepthTexture,u=t._polygonOffsetSupported,d=t._isPointLight,h=t._isSpotLight,p=1<t._numberOfCascades,f=t.debugCascadeColors,m=t.softShadows,g=(n=d?t._pointBias:r?t._terrainBias:t._primitiveBias,t=e.defines.slice(0),e.sources.slice(0)),y=g.length,_=0;_<y;++_)g[_]=ShaderSource.replaceMain(g[_],"czm_shadow_receive_main");return d?t.push("USE_CUBE_MAP_SHADOW"):c&&t.push("USE_SHADOW_DEPTH_TEXTURE"),m&&!d&&t.push("USE_SOFT_SHADOWS"),p&&i&&r&&(o?t.push("ENABLE_VERTEX_LIGHTING"):t.push("ENABLE_DAYNIGHT_SHADING")),i&&n.normalShading&&o&&(t.push("USE_NORMAL_SHADING"),0<n.normalShadingSmooth&&t.push("USE_NORMAL_SHADING_SMOOTH")),i="",i+=d?"uniform samplerCube shadowMap_textureCube; \n":"uniform sampler2D shadowMap_texture; \n",i+="uniform mat4 shadowMap_matrix; \nuniform vec3 shadowMap_lightDirectionEC; \nuniform vec4 shadowMap_lightPositionEC; \nuniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; \nuniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; \n#ifdef LOG_DEPTH \nvarying vec3 v_logPositionEC; \n#endif \nvec4 getPositionEC() \n{ \n"+(l?"    return vec4("+s+", 1.0); \n":"#ifndef LOG_DEPTH \n    return czm_windowToEyeCoordinates(gl_FragCoord); \n#else \n    return vec4(v_logPositionEC, 1.0); \n#endif \n")+"} \nvec3 getNormalEC() \n{ \n"+(o?"    return normalize("+a+"); \n":"    return vec3(1.0); \n")+"} \nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) \n{ \n"+(n.normalOffset&&o?"    float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; \n    float normalOffsetScale = 1.0 - nDotL; \n    vec3 offset = normalOffset * normalOffsetScale * normalEC; \n    positionEC.xyz += offset; \n":"")+"} \n",i+="void main() \n{ \n    czm_shadow_receive_main(); \n    vec4 positionEC = getPositionEC(); \n    vec3 normalEC = getNormalEC(); \n    float depth = -positionEC.z; \n",i+="    czm_shadowParameters shadowParameters; \n    shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; \n    shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; \n    shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; \n    shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; \n",r?i+="    shadowParameters.depthBias *= max(depth * 0.01, 1.0); \n":u||(i+="    shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); \n"),i+=d?"    vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; \n    float distance = length(directionEC); \n    directionEC = normalize(directionEC); \n    float radius = shadowMap_lightPositionEC.w; \n    // Stop early if the fragment is beyond the point light radius \n    if (distance > radius) \n    { \n        return; \n    } \n    vec3 directionWC  = czm_inverseViewRotation * directionEC; \n    shadowParameters.depth = distance / radius; \n    shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n    shadowParameters.texCoords = directionWC; \n    float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); \n":h?"    vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); \n    float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n    applyNormalOffset(positionEC, normalEC, nDotL); \n    vec4 shadowPosition = shadowMap_matrix * positionEC; \n    // Spot light uses a perspective projection, so perform the perspective divide \n    shadowPosition /= shadowPosition.w; \n    // Stop early if the fragment is not in the shadow bounds \n    if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n    { \n        return; \n    } \n    shadowParameters.texCoords = shadowPosition.xy; \n    shadowParameters.depth = shadowPosition.z; \n    shadowParameters.nDotL = nDotL; \n    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n":p?"    float maxDepth = shadowMap_cascadeSplits[1].w; \n    // Stop early if the eye depth exceeds the last cascade \n    if (depth > maxDepth) \n    { \n        return; \n    } \n    // Get the cascade based on the eye-space depth \n    vec4 weights = czm_cascadeWeights(depth); \n    // Apply normal offset \n    float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n    applyNormalOffset(positionEC, normalEC, nDotL); \n    // Transform position into the cascade \n    vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC; \n    // Get visibility \n    shadowParameters.texCoords = shadowPosition.xy; \n    shadowParameters.depth = shadowPosition.z; \n    shadowParameters.nDotL = nDotL; \n    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n    // Fade out shadows that are far away \n    float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z; \n    float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0); \n    visibility = mix(visibility, 1.0, fade); \n"+(f?"    // Draw cascade colors for debugging \n    gl_FragColor *= czm_cascadeColor(weights); \n":""):"    float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n    applyNormalOffset(positionEC, normalEC, nDotL); \n    vec4 shadowPosition = shadowMap_matrix * positionEC; \n    // Stop early if the fragment is not in the shadow bounds \n    if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n    { \n        return; \n    } \n    shadowParameters.texCoords = shadowPosition.xy; \n    shadowParameters.depth = shadowPosition.z; \n    shadowParameters.nDotL = nDotL; \n    float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n",i+="    gl_FragColor.rgb *= visibility; \n} \n",g.push(i),new ShaderSource({defines:t,sources:g})},ShadowMap.MAXIMUM_DISTANCE=2e4,ShadowMap.prototype.debugCreateRenderStates=function(){createRenderStates$5(this)},Object.defineProperties(ShadowMap.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){resize(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});var scratchViewport$2=new BoundingRectangle;function createDebugShadowViewCommand(e,t){var i=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n    vec2 uv = v_textureCoordinates; \n    vec3 dir; \n \n    if (uv.y < 0.5) \n    { \n        if (uv.x < 0.333) \n        { \n            dir.x = -1.0; \n            dir.y = uv.x * 6.0 - 1.0; \n            dir.z = uv.y * 4.0 - 1.0; \n        } \n        else if (uv.x < 0.666) \n        { \n            dir.y = -1.0; \n            dir.x = uv.x * 6.0 - 3.0; \n            dir.z = uv.y * 4.0 - 1.0; \n        } \n        else \n        { \n            dir.z = -1.0; \n            dir.x = uv.x * 6.0 - 5.0; \n            dir.y = uv.y * 4.0 - 1.0; \n        } \n    } \n    else \n    { \n        if (uv.x < 0.333) \n        { \n            dir.x = 1.0; \n            dir.y = uv.x * 6.0 - 1.0; \n            dir.z = uv.y * 4.0 - 3.0; \n        } \n        else if (uv.x < 0.666) \n        { \n            dir.y = 1.0; \n            dir.x = uv.x * 6.0 - 3.0; \n            dir.z = uv.y * 4.0 - 3.0; \n        } \n        else \n        { \n            dir.z = 1.0; \n            dir.x = uv.x * 6.0 - 5.0; \n            dir.y = uv.y * 4.0 - 3.0; \n        } \n    } \n \n    float shadow = czm_unpackDepth(textureCube(shadowMap_textureCube, dir)); \n    gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n":"uniform sampler2D shadowMap_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n"+(e._usesDepthTexture?"    float shadow = texture2D(shadowMap_texture, v_textureCoordinates).r; \n":"    float shadow = czm_unpackDepth(texture2D(shadowMap_texture, v_textureCoordinates)); \n")+"    gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n";return(i=t.createViewportQuadCommand(i,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}})).pass=Pass$1.OVERLAY,i}function updateDebugShadowViewCommand(e,t){var i=t.context,r=t.context.drawingBufferWidth,n=t.context.drawingBufferHeight,a=.3*Math.min(r,n);(n=scratchViewport$2).x=r-a,n.y=0,n.width=a,n.height=a,defined(a=e._debugShadowViewCommand)||(a=createDebugShadowViewCommand(e,i),e._debugShadowViewCommand=a),defined(a.renderState)&&BoundingRectangle.equals(a.renderState.viewport,n)||(a.renderState=RenderState.fromCache({viewport:BoundingRectangle.clone(n)})),t.commandList.push(e._debugShadowViewCommand)}var frustumCornersNDC$1=new Array(8);frustumCornersNDC$1[0]=new Cartesian4(-1,-1,-1,1),frustumCornersNDC$1[1]=new Cartesian4(1,-1,-1,1),frustumCornersNDC$1[2]=new Cartesian4(1,1,-1,1),frustumCornersNDC$1[3]=new Cartesian4(-1,1,-1,1),frustumCornersNDC$1[4]=new Cartesian4(-1,-1,1,1),frustumCornersNDC$1[5]=new Cartesian4(1,-1,1,1),frustumCornersNDC$1[6]=new Cartesian4(1,1,1,1),frustumCornersNDC$1[7]=new Cartesian4(-1,1,1,1);for(var scratchMatrix$4=new Matrix4,scratchFrustumCorners$1=new Array(8),i$5=0;i$5<8;++i$5)scratchFrustumCorners$1[i$5]=new Cartesian4;function createDebugPointLight(e,t){return new Primitive({geometryInstances:[new GeometryInstance({geometry:new BoxOutlineGeometry({minimum:new Cartesian3(-.5,-.5,-.5),maximum:new Cartesian3(.5,.5,.5)}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(t)}}),new GeometryInstance({geometry:new SphereOutlineGeometry({radius:.5}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(t)}})],appearance:new PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var debugOutlineColors=[Color.RED,Color.GREEN,Color.BLUE,Color.MAGENTA],scratchScale$8=new Cartesian3;function applyDebugSettings$1(e,t){updateDebugShadowViewCommand(e,t);var i,r,n,a=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(a&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new DebugCameraPrimitive({camera:e._sceneCamera,color:Color.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){a&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new DebugCameraPrimitive({camera:e._shadowMapCamera,color:Color.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(var o=0;o<e._numberOfCascades;++o)a&&(e._debugCascadeFrustums[o]=e._debugCascadeFrustums[o]&&e._debugCascadeFrustums[o].destroy(),e._debugCascadeFrustums[o]=new DebugCameraPrimitive({camera:e._passes[o].camera,color:debugOutlineColors[o],updateOnChange:!1})),e._debugCascadeFrustums[o].update(t)}}else e._isPointLight?defined(e._debugLightFrustum)&&!e._needsUpdate||(i=e._shadowMapCamera.positionWC,r=Quaternion.IDENTITY,n=2*e._pointLightRadius,n=Cartesian3.fromElements(n,n,n,scratchScale$8),n=Matrix4.fromTranslationQuaternionRotationScale(i,r,n,scratchMatrix$4),e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=createDebugPointLight(n,Color.YELLOW)):defined(e._debugLightFrustum)&&!e._needsUpdate||(e._debugLightFrustum=new DebugCameraPrimitive({camera:e._shadowMapCamera,color:Color.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function ShadowMapCamera(){this.viewMatrix=new Matrix4,this.inverseViewMatrix=new Matrix4,this.frustum=void 0,this.positionCartographic=new Cartographic,this.positionWC=new Cartesian3,this.directionWC=Cartesian3.clone(Cartesian3.UNIT_Z),this.upWC=Cartesian3.clone(Cartesian3.UNIT_Y),this.rightWC=Cartesian3.clone(Cartesian3.UNIT_X),this.viewProjectionMatrix=new Matrix4}ShadowMapCamera.prototype.clone=function(e){Matrix4.clone(e.viewMatrix,this.viewMatrix),Matrix4.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),Cartographic.clone(e.positionCartographic,this.positionCartographic),Cartesian3.clone(e.positionWC,this.positionWC),Cartesian3.clone(e.directionWC,this.directionWC),Cartesian3.clone(e.upWC,this.upWC),Cartesian3.clone(e.rightWC,this.rightWC)};var scaleBiasMatrix=new Matrix4(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);ShadowMapCamera.prototype.getViewProjection=function(){var e=this.viewMatrix,t=this.frustum.projectionMatrix;return Matrix4.multiply(t,e,this.viewProjectionMatrix),Matrix4.multiply(scaleBiasMatrix,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var scratchSplits$1=new Array(5),scratchFrustum=new PerspectiveFrustum,scratchCascadeDistances=new Array(4),scratchMin$3=new Cartesian3,scratchMax$3=new Cartesian3;function computeCascades(e,t){var i=e._shadowMapCamera,r=e._sceneCamera,n=r.frustum.near,a=r.frustum.far,o=e._numberOfCascades,s=a-n,l=a/n,c=.9,u=!1;t.shadowState.closestObjectSize<200&&(u=!0,c=.9);var d=scratchCascadeDistances,h=scratchSplits$1;for(h[0]=n,h[o]=a,g=0;g<o;++g){var p=(g+1)/o,f=n*Math.pow(l,p);p=n+s*p,f=CesiumMath.lerp(p,f,c);h[g+1]=f,d[g]=f-h[g]}if(u){for(g=0;g<o;++g)d[g]=Math.min(d[g],e._maximumCascadeDistances[g]);for(var m=h[0],g=0;g<o-1;++g)m+=d[g],h[g+1]=m}Cartesian4.unpack(h,0,e._cascadeSplits[0]),Cartesian4.unpack(h,1,e._cascadeSplits[1]),Cartesian4.unpack(d,0,e._cascadeDistances);var y=(u=i.frustum).left,_=u.right,v=u.bottom,C=u.top,x=u.near,b=u.far,S=i.positionWC,T=i.directionWC,E=i.upWC,w=r.frustum.clone(scratchFrustum),A=i.getViewProjection();for(g=0;g<o;++g){w.near=h[g],w.far=h[g+1];for(var P=Matrix4.multiply(w.projectionMatrix,r.viewMatrix,scratchMatrix$4),D=Matrix4.inverse(P,scratchMatrix$4),M=Matrix4.multiply(A,D,scratchMatrix$4),I=Cartesian3.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,scratchMin$3),R=Cartesian3.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,scratchMax$3),O=0;O<8;++O){var L=Cartesian4.clone(frustumCornersNDC$1[O],scratchFrustumCorners$1[O]);Matrix4.multiplyByVector(M,L,L),Cartesian3.divideByScalar(L,L.w,L),Cartesian3.minimumByComponent(L,I,I),Cartesian3.maximumByComponent(L,R,R)}I.x=Math.max(I.x,0),I.y=Math.max(I.y,0),I.z=0,R.x=Math.min(R.x,1),R.y=Math.min(R.y,1),R.z=Math.min(R.z,1);var N=e._passes[g];(P=N.camera).clone(i),(D=P.frustum).left=y+I.x*(_-y),D.right=y+R.x*(_-y),D.bottom=v+I.y*(C-v),D.top=v+R.y*(C-v),D.near=x+I.z*(b-x),D.far=x+R.z*(b-x),N.cullingVolume=P.frustum.computeCullingVolume(S,T,E),D=e._cascadeMatrices[g],Matrix4.multiply(P.getViewProjection(),r.inverseViewMatrix,D),Matrix4.multiply(N.textureOffsets,D,D)}}var scratchLightView=new Matrix4,scratchRight$2=new Cartesian3,scratchUp$1=new Cartesian3,scratchTranslation$1=new Cartesian3;function fitShadowMapToScene(e,t){var i=e._shadowMapCamera,r=e._sceneCamera,n=Matrix4.multiply(r.frustum.projectionMatrix,r.viewMatrix,scratchMatrix$4),a=Matrix4.inverse(n,scratchMatrix$4),o=i.directionWC,s=r.directionWC;Cartesian3.equalsEpsilon(o,s,CesiumMath.EPSILON10)&&(s=r.upWC);var l=Cartesian3.cross(o,s,scratchRight$2);s=Cartesian3.cross(l,o,scratchUp$1);Cartesian3.normalize(s,s),Cartesian3.normalize(l,l);for(var c=Cartesian3.fromElements(0,0,0,scratchTranslation$1),u=(e=Matrix4.computeView(c,o,s,l,scratchLightView),Matrix4.multiply(e,a,scratchMatrix$4)),d=Cartesian3.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,scratchMin$3),h=Cartesian3.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,scratchMax$3),p=0;p<8;++p){var f=Cartesian4.clone(frustumCornersNDC$1[p],scratchFrustumCorners$1[p]);Matrix4.multiplyByVector(u,f,f),Cartesian3.divideByScalar(f,f.w,f),Cartesian3.minimumByComponent(f,d,d),Cartesian3.maximumByComponent(f,h,h)}h.z+=1e3,d.z-=10,(n=scratchTranslation$1).x=-.5*(d.x+h.x),n.y=-.5*(d.y+h.y),n.z=-h.z,r=Matrix4.fromTranslation(n,scratchMatrix$4),e=Matrix4.multiply(r,e,e),c=.5*(h.x-d.x),a=.5*(h.y-d.y),n=h.z-d.z,(r=i.frustum).left=-c,r.right=c,r.bottom=-a,r.top=a,r.near=.01,r.far=n,Matrix4.clone(e,i.viewMatrix),Matrix4.inverse(e,i.inverseViewMatrix),Matrix4.getTranslation(i.inverseViewMatrix,i.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(i.positionWC,i.positionCartographic),Cartesian3.clone(o,i.directionWC),Cartesian3.clone(s,i.upWC),Cartesian3.clone(l,i.rightWC)}var directions=[new Cartesian3(-1,0,0),new Cartesian3(0,-1,0),new Cartesian3(0,0,-1),new Cartesian3(1,0,0),new Cartesian3(0,1,0),new Cartesian3(0,0,1)],ups=[new Cartesian3(0,-1,0),new Cartesian3(0,0,-1),new Cartesian3(0,-1,0),new Cartesian3(0,-1,0),new Cartesian3(0,0,1),new Cartesian3(0,-1,0)],rights=[new Cartesian3(0,0,1),new Cartesian3(1,0,0),new Cartesian3(-1,0,0),new Cartesian3(0,0,-1),new Cartesian3(1,0,0),new Cartesian3(1,0,0)];function computeOmnidirectional(e,t){var i=new PerspectiveFrustum;i.fov=CesiumMath.PI_OVER_TWO,i.near=1,i.far=e._pointLightRadius,i.aspectRatio=1;for(var r=0;r<6;++r){var n=e._passes[r].camera;n.positionWC=e._shadowMapCamera.positionWC,n.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),n.directionWC=directions[r],n.upWC=ups[r],n.rightWC=rights[r],Matrix4.computeView(n.positionWC,n.directionWC,n.upWC,n.rightWC,n.viewMatrix),Matrix4.inverse(n.viewMatrix,n.inverseViewMatrix),n.frustum=i}}var scratchCartesian1$8=new Cartesian3,scratchCartesian2$b=new Cartesian3,scratchBoundingSphere$4=new BoundingSphere,scratchCenter$5=scratchBoundingSphere$4.center;function checkVisibility(e,t){var i=e._sceneCamera,r=e._shadowMapCamera,n=scratchBoundingSphere$4;if(e._cascadesEnabled){if(i.frustum.near>=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);var a=t.mapProjection.ellipsoid.geodeticSurfaceNormal(i.positionWC,scratchCartesian1$8);i=Cartesian3.negate(r.directionWC,scratchCartesian2$b),a=Cartesian3.dot(a,i),i=CesiumMath.clamp(a/.1,0,1);if(e._darkness=CesiumMath.lerp(1,e.darkness,i),a<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else e._isPointLight?(n.center=r.positionWC,n.radius=e._pointLightRadius):(a=r.frustum.far/2,r=Cartesian3.add(r.positionWC,Cartesian3.multiplyByScalar(r.directionWC,a,scratchCenter$5),scratchCenter$5),n.center=r,n.radius=a),e._outOfView=t.cullingVolume.computeVisibility(n)===Intersect$1.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(n),BoundingSphere.clone(n,e._boundingSphere)}function updateCameras(e,t){var i=t.camera,r=e._lightCamera,n=e._sceneCamera,a=e._shadowMapCamera;e._cascadesEnabled?Cartesian3.clone(r.directionWC,a.directionWC):e._isPointLight?Cartesian3.clone(r.positionWC,a.positionWC):a.clone(r);var o,s;r=e._lightDirectionEC;Matrix4.multiplyByPointAsVector(i.viewMatrix,a.directionWC,r),Cartesian3.normalize(r,r),Cartesian3.negate(r,r),Matrix4.multiplyByPoint(i.viewMatrix,a.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius,s=e._fitNearFar?(o=Math.min(t.shadowState.nearPlane,e.maximumDistance),s=Math.min(t.shadowState.farPlane,e.maximumDistance),Math.max(s,o+1)):(o=i.frustum.near,e.maximumDistance),e._sceneCamera=Camera.clone(i,n),i.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=o,e._sceneCamera.frustum.far=s,e._distance=s-o,checkVisibility(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}ShadowMap.prototype.update=function(e){var t,i,r,n;updateCameras(this,e),this._needsUpdate&&(updateFramebuffer(this,e.context),this._isPointLight&&computeOmnidirectional(this,e),this._cascadesEnabled&&(fitShadowMapToScene(this,e),1<this._numberOfCascades&&computeCascades(this,e)),this._isPointLight?this._shadowMapCullingVolume=CullingVolume.fromBoundingSphere(this._boundingSphere):(t=(n=this._shadowMapCamera).positionWC,i=n.directionWC,r=n.upWC,this._shadowMapCullingVolume=n.frustum.computeCullingVolume(t,i,r),1===this._passes.length&&this._passes[0].camera.clone(n))),1===this._passes.length&&(n=this._sceneCamera.inverseViewMatrix,Matrix4.multiply(this._shadowMapCamera.getViewProjection(),n,this._shadowMapMatrix)),this.debugShow&&applyDebugSettings$1(this,e)},ShadowMap.prototype.updatePass=function(e,t){clearFramebuffer(this,e,t)};var scratchTexelStepSize=new Cartesian2;function combineUniforms(e,t,i){var r=e._isPointLight?e._pointBias:i?e._terrainBias:e._primitiveBias;return combine(t,{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){var t=scratchTexelStepSize;return t.x=1/e._textureSize.x,t.y=1/e._textureSize.y,Cartesian4.fromElements(t.x,t.y,r.depthBias,r.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return Cartesian4.fromElements(r.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new Cartesian4,combinedUniforms2:new Cartesian4},!1)}function createCastDerivedCommand(e,t,i,r,n,a){var o,s,l,c,u,d,h,p,f;return defined(a)&&(f=a.shaderProgram,o=a.renderState,s=a.uniformMap),(a=DrawCommand.shallowClone(i,a)).castShadows=!0,a.receiveShadows=!1,defined(f)&&n===i.shaderProgram.id&&!t||(l=i.shaderProgram,c=i.pass===Pass$1.GLOBE,p=i.pass!==Pass$1.TRANSLUCENT,u=e._isPointLight,d=e._usesDepthTexture,h=ShadowMapShader.getShadowCastShaderKeyword(u,c,d,p),defined(f=r.shaderCache.getDerivedShaderProgram(l,h))||(n=l.vertexShaderSource,t=l.fragmentShaderSource,n=ShadowMapShader.createShadowCastVertexShader(n,u,c),p=ShadowMapShader.createShadowCastFragmentShader(t,u,d,p),f=r.shaderCache.createDerivedShaderProgram(l,h,{vertexShaderSource:n,fragmentShaderSource:p,attributeLocations:l._attributeLocations})),o=e._primitiveRenderState,u?o=e._pointRenderState:c&&(o=e._terrainRenderState),i.renderState.cull.enabled||((o=clone(o,!1)).cull=clone(o.cull,!1),o.cull.enabled=!1,o=RenderState.fromCache(o)),s=combineUniforms(e,i.uniformMap,c)),a.shaderProgram=f,a.renderState=o,a.uniformMap=s,a}function CommandExtent(){this.command=void 0,this.near=void 0,this.far=void 0}function View(e,t,i){var r,n,a=e.context;a.depthTexture&&(r=new GlobeDepth),e._useOIT&&a.depthTexture&&(n=new OIT(a)),(e=new PassState(a)).viewport=BoundingRectangle.clone(i),this.camera=t,this._cameraClone=Camera.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=i,this.passState=e,this.pickFramebuffer=new PickFramebuffer(a),this.pickDepthFramebuffer=new PickDepthFramebuffer,this.sceneFramebuffer=new SceneFramebuffer,this.globeDepth=r,this.globeTranslucencyFramebuffer=new GlobeTranslucencyFramebuffer,this.oit=n,this.pickDepths=[],this.debugGlobeDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}ShadowMap.createReceiveDerivedCommand=function(e,t,i,r,n){defined(n)||(n={});var a,o,s,l=0<e.length,c=t.shaderProgram,u=c.vertexShaderSource,d=c.fragmentShaderSource,h=t.pass===Pass$1.GLOBE,p=!1;return h&&(p=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&l&&(defined(n.receiveCommand)&&(s=n.receiveCommand.shaderProgram,a=n.receiveCommand.uniformMap),n.receiveCommand=DrawCommand.shallowClone(t,n.receiveCommand),n.castShadows=!1,n.receiveShadows=!0,o=n.receiveShaderCastShadows!==t.castShadows,l=n.receiveShaderProgramId!==t.shaderProgram.id,(!defined(s)||l||i||o)&&(o=ShadowMapShader.getShadowReceiveShaderKeyword(e[0],t.castShadows,h,p),defined(s=r.shaderCache.getDerivedShaderProgram(c,o))||(u=ShadowMapShader.createShadowReceiveVertexShader(u,h,p),p=ShadowMapShader.createShadowReceiveFragmentShader(d,e[0],t.castShadows,h,p),s=r.shaderCache.createDerivedShaderProgram(c,o,{vertexShaderSource:u,fragmentShaderSource:p,attributeLocations:c._attributeLocations})),a=combineUniforms(e[0],t.uniformMap,h)),n.receiveCommand.shaderProgram=s,n.receiveCommand.uniformMap=a,n.receiveShaderProgramId=t.shaderProgram.id,n.receiveShaderCastShadows=t.castShadows),n},ShadowMap.createCastDerivedCommand=function(e,t,i,r,n){if(defined(n)||(n={}),t.castShadows){var a=n.castCommands;defined(a)||(a=n.castCommands=[]);var o=n.castShaderProgramId,s=e.length;a.length=s;for(var l=0;l<s;++l)a[l]=createCastDerivedCommand(e[l],i,t,r,o,a[l]);n.castShaderProgramId=t.shaderProgram.id}return n},ShadowMap.prototype.isDestroyed=function(){return!1},ShadowMap.prototype.destroy=function(){destroyFramebuffer$1(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(var e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return destroyObject(this)};var scratchPosition0=new Cartesian3,scratchPosition1=new Cartesian3;function maxComponent(e,t){var i=Math.max(Math.abs(e.x),Math.abs(t.x)),r=Math.max(Math.abs(e.y),Math.abs(t.y));t=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(i,r),t)}function cameraEqual(e,t,i){var r=1/Math.max(1,maxComponent(e.position,t.position));return Cartesian3.multiplyByScalar(e.position,r,scratchPosition0),Cartesian3.multiplyByScalar(t.position,r,scratchPosition1),Cartesian3.equalsEpsilon(scratchPosition0,scratchPosition1,i)&&Cartesian3.equalsEpsilon(e.direction,t.direction,i)&&Cartesian3.equalsEpsilon(e.up,t.up,i)&&Cartesian3.equalsEpsilon(e.right,t.right,i)&&Matrix4.equalsEpsilon(e.transform,t.transform,i)&&e.frustum.equalsEpsilon(t.frustum,i)}function updateFrustums(e,t,i,r){var n,a=t.frameState,o=a.camera,s=a.useLogDepth?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,l=t.mode===SceneMode$1.SCENE2D,c=t.nearToFarDistance2D;r*=1+CesiumMath.EPSILON2,i=Math.min(Math.max(i,o.frustum.near),o.frustum.far),r=Math.max(Math.min(r,o.frustum.far),i),n=l?(r=Math.min(r,o.position.z+t.nearToFarDistance2D),i=Math.min(i,r),Math.ceil(Math.max(1,r-i)/t.nearToFarDistance2D)):Math.ceil(Math.log(r/i)/Math.log(s));var u=e.frustumCommandsList;u.length=n;for(var d=0;d<n;++d){var h,p=l?(h=Math.min(r-c,i+d*c),Math.min(r,h+c)):(h=Math.max(i,Math.pow(s,d)*i),Math.min(r,s*h)),f=u[d];defined(f)?(f.near=h,f.far=p):f=u[d]=new FrustumCommands(h,p)}}function insertIntoBin(e,t,i,r,n){t.debugShowFrustums&&(i.debugOverlappingFrustums=0);for(var a,o=e.frustumCommandsList,s=o.length,l=0;l<s;++l){var c=o[l],u=c.near;if(!(c.far<r)){if(n<u)break;var d=i.pass;u=c.indices[d]++;if(c.commands[d][u]=i,t.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<l),i.executeInClosestFrustum)break}}t.debugShowFrustums&&((a=e.debugFrustumStatistics.commandsInFrustums)[i.debugOverlappingFrustums]=defined(a[i.debugOverlappingFrustums])?a[i.debugOverlappingFrustums]+1:1,++e.debugFrustumStatistics.totalCommands),t.updateDerivedCommands(i)}View.prototype.checkForCameraUpdates=function(e){var t=this.camera,i=this._cameraClone;return cameraEqual(t,i,CesiumMath.EPSILON15)?(this._cameraStartFired&&getTimestamp$1()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=getTimestamp$1(),Camera.clone(t,i),!0)};var scratchCullingVolume=new CullingVolume,scratchNearFarInterval=new Interval;View.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,r=i.directionWC,n=i.positionWC,a=e._computeCommandList,o=e._overlayCommandList,s=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var l=this.frustumCommandsList,c=l.length,u=Pass$1.NUMBER_OF_PASSES,d=0;d<c;++d)for(var h=0;h<u;++h)l[d].indices[h]=0;a.length=0,o.length=0;for(var p=this._commandExtents,f=p.length,m=0,g=+Number.MAX_VALUE,y=-Number.MAX_VALUE,_=t.shadowState.shadowsEnabled,v=+Number.MAX_VALUE,C=-Number.MAX_VALUE,x=Number.MAX_VALUE,b=t.mode===SceneMode$1.SCENE3D?t.occluder:void 0,S=t.cullingVolume,T=scratchCullingVolume.planes,E=0;E<5;++E)T[E]=S.planes[E];S=scratchCullingVolume;for(var w,A,P=s.length,D=0;D<P;++D){var M=s[D],I=M.pass;if(I===Pass$1.COMPUTE)a.push(M);else if(I===Pass$1.OVERLAY)o.push(M);else{var R=M.boundingVolume;if(defined(R)){if(!e.isVisible(M,S,b))continue;var O=(L=R.computePlaneDistances(n,r,scratchNearFarInterval)).start,L=L.stop;g=Math.min(g,O),y=Math.max(y,L);_&&M.receiveShadows&&O<ShadowMap.MAXIMUM_DISTANCE&&!(I===Pass$1.GLOBE&&O<-100&&100<L)&&(N=L-O,I!==Pass$1.GLOBE&&O<100&&(x=Math.min(x,N)),v=Math.min(v,O),C=Math.max(C,L))}else M instanceof ClearCommand?(O=i.frustum.near,L=i.frustum.far):(O=i.frustum.near,L=i.frustum.far,g=Math.min(g,O),y=Math.max(y,L));var N=p[m];defined(N)||(N=p[m]=new CommandExtent),N.command=M,N.near=O,N.far=L,m++}}for(_&&(v=Math.min(Math.max(v,i.frustum.near),i.frustum.far),C=Math.max(Math.min(C,i.frustum.far),v)),_&&(t.shadowState.nearPlane=v,t.shadowState.farPlane=C,t.shadowState.closestObjectSize=x),updateFrustums(this,e,g,y),w=0;w<m;w++)insertIntoBin(this,e,(A=p[w]).command,A.near,A.far);if(m<f)for(w=m;w<f&&defined((A=p[w]).command);w++)A.command=void 0;var F=l.length,B=t.frustumSplits;B.length=F+1;for(var V=0;V<F;++V)B[V]=l[V].near,V===F-1&&(B[V+1]=l[V].far)},View.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();for(var e=this.pickDepths,t=this.debugGlobeDepths,i=e.length,r=0;r<i;++r)e[r].destroy();for(i=t.length,r=0;r<i;++r)t[r].destroy()};var offscreenDefaultWidth=.1,mostDetailedPreloadTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.MOST_DETAILED_PRELOAD}),mostDetailedPickTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.MOST_DETAILED_PICK}),pickTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.PICK});function Picking(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;var t=new BoundingRectangle(0,0,1,1),i=new Camera(e);i.frustum=new OrthographicFrustum({width:offscreenDefaultWidth,aspectRatio:1,near:.1}),this._pickOffscreenView=new View(e,i,t)}Picking.prototype.update=function(){this._pickPositionCacheDirty=!0},Picking.prototype.getPickDepth=function(e,t){var i=e.view.pickDepths;return defined(e=i[t])||(e=new PickDepth,i[t]=e),e};var scratchOrthoPickingFrustum=new OrthographicOffCenterFrustum,scratchOrthoOrigin=new Cartesian3,scratchOrthoDirection=new Cartesian3,scratchOrthoPixelSize=new Cartesian2,scratchOrthoPickVolumeMatrix4=new Matrix4;function getPickOrthographicCullingVolume(e,t,i,r,n){var a=e.camera,o=a.frustum;defined(o._offCenterFrustum)&&(o=o._offCenterFrustum);var s=2*(t.x-n.x)/n.width-1;s*=.5*(o.right-o.left);var l=2*(n.height-t.y-n.y)/n.height-1;l*=.5*(o.top-o.bottom);var c=Matrix4.clone(a.transform,scratchOrthoPickVolumeMatrix4);return a._setTransform(Matrix4.IDENTITY),t=Cartesian3.clone(a.position,scratchOrthoOrigin),Cartesian3.multiplyByScalar(a.right,s,scratchOrthoDirection),Cartesian3.add(scratchOrthoDirection,t,t),Cartesian3.multiplyByScalar(a.up,l,scratchOrthoDirection),Cartesian3.add(scratchOrthoDirection,t,t),a._setTransform(c),e.mode===SceneMode$1.SCENE2D&&Cartesian3.fromElements(t.z,t.x,t.y,t),e=o.getPixelDimensions(n.width,n.height,1,1,scratchOrthoPixelSize),(n=scratchOrthoPickingFrustum).right=.5*e.x,n.left=-n.right,n.top=.5*e.y,n.bottom=-n.top,n.near=o.near,n.far=o.far,n.computeCullingVolume(t,a.directionWC,a.upWC)}var scratchPerspPickingFrustum=new PerspectiveOffCenterFrustum,scratchPerspPixelSize=new Cartesian2;function getPickPerspectiveCullingVolume(e,t,i,r,n){var a=e.camera,o=a.frustum,s=o.near,l=Math.tan(.5*o.fovy);e=o.aspectRatio*l,e=(2*(t.x-n.x)/n.width-1)*s*e,l=(2*(n.height-t.y-n.y)/n.height-1)*s*l,i=(n=o.getPixelDimensions(n.width,n.height,1,1,scratchPerspPixelSize)).x*i*.5,n=n.y*r*.5;return(r=scratchPerspPickingFrustum).top=l+n,r.bottom=l-n,r.right=e+i,r.left=e-i,r.near=s,r.far=o.far,r.computeCullingVolume(a.positionWC,a.directionWC,a.upWC)}function getPickCullingVolume(e,t,i,r,n){var a=e.camera.frustum;return(a instanceof OrthographicFrustum||a instanceof OrthographicOffCenterFrustum?getPickOrthographicCullingVolume:getPickPerspectiveCullingVolume)(e,t,i,r,n)}var scratchRectangleWidth=3,scratchRectangleHeight=3,scratchRectangle$7=new BoundingRectangle(0,0,scratchRectangleWidth,scratchRectangleHeight),scratchPosition$b=new Cartesian2,scratchColorZero=new Color(0,0,0,0);function renderTranslucentDepthForPick(e,t){var i=e.context,r=e.frameState,n=e.environmentState,a=e.defaultView,o=(e.view=a).viewport;o.x=0,o.y=0,o.width=i.drawingBufferWidth,o.height=i.drawingBufferHeight;var s=a.passState;s.viewport=BoundingRectangle.clone(o,s.viewport),e.clearPasses(r.passes),r.passes.pick=!0,r.passes.depth=!0,r.cullingVolume=getPickCullingVolume(e,t,1,1,o),r.tilesetPassState=pickTilesetPassState,e.updateEnvironment(),n.renderTranslucentDepthForPick=!0,s=a.pickDepthFramebuffer.update(i,t,o),e.updateAndExecuteCommands(s,scratchColorZero),e.resolveFramebuffers(s),i.endFrame()}Picking.prototype.pick=function(e,t,i,r){scratchRectangleWidth=defaultValue(i,3),scratchRectangleHeight=defaultValue(r,scratchRectangleWidth);var n=e.context,a=n.uniformState,o=e.frameState,s=e.defaultView;return(i=(e.view=s).viewport).x=0,i.y=0,i.width=n.drawingBufferWidth,i.height=n.drawingBufferHeight,(r=s.passState).viewport=BoundingRectangle.clone(i,r.viewport),t=SceneTransforms.transformWindowToDrawingBuffer(e,t,scratchPosition$b),e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=getPickCullingVolume(e,t,scratchRectangleWidth,scratchRectangleHeight,i),o.invertClassification=!1,o.passes.pick=!0,o.tilesetPassState=pickTilesetPassState,a.update(o),e.updateEnvironment(),scratchRectangle$7.x=t.x-.5*(scratchRectangleWidth-1),scratchRectangle$7.y=e.drawingBufferHeight-t.y-.5*(scratchRectangleHeight-1),scratchRectangle$7.width=scratchRectangleWidth,scratchRectangle$7.height=scratchRectangleHeight,r=s.pickFramebuffer.begin(scratchRectangle$7,s.viewport),e.updateAndExecuteCommands(r,scratchColorZero),e.resolveFramebuffers(r),s=s.pickFramebuffer.end(scratchRectangle$7),n.endFrame(),s};var scratchPerspectiveFrustum=new PerspectiveFrustum,scratchPerspectiveOffCenterFrustum=new PerspectiveOffCenterFrustum,scratchOrthographicFrustum=new OrthographicFrustum,scratchOrthographicOffCenterFrustum=new OrthographicOffCenterFrustum;Picking.prototype.pickPositionWorldCoordinates=function(e,t,i){if(e.useDepthPicking){var r=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(r))return Cartesian3.clone(this._pickPositionCache[r],i);var n=e.frameState,a=e.context,o=a.uniformState,s=e.defaultView;e.view=s;var l=SceneTransforms.transformWindowToDrawingBuffer(e,t,scratchPosition$b);e.pickTranslucentDepth?renderTranslucentDepthForPick(e,l):(e.updateFrameState(),o.update(n),e.updateEnvironment()),l.y=e.drawingBufferHeight-l.y;for(var c=e.camera,u=defined(c.frustum.fov)?c.frustum.clone(scratchPerspectiveFrustum):defined(c.frustum.infiniteProjectionMatrix)?c.frustum.clone(scratchPerspectiveOffCenterFrustum):defined(c.frustum.width)?c.frustum.clone(scratchOrthographicFrustum):c.frustum.clone(scratchOrthographicOffCenterFrustum),d=s.frustumCommandsList,h=d.length,p=0;p<h;++p){var f=this.getPickDepth(e,p).getDepth(a,l.x,l.y);if(defined(f)&&0<f&&f<1){var m,g=d[p];return e.mode===SceneMode$1.SCENE2D?(m=c.position.z,c.position.z=m-g.near+1,u.far=Math.max(1,g.far-g.near),u.near=1,o.update(n)):(u.near=g.near*(0!==p?e.opaqueFrustumNearOffset:1),u.far=g.far),o.updateFrustum(u),i=SceneTransforms.drawingBufferToWgs84Coordinates(e,l,f,i),e.mode===SceneMode$1.SCENE2D&&(c.position.z=m,o.update(n)),this._pickPositionCache[r]=Cartesian3.clone(i),i}}this._pickPositionCache[r]=void 0}};var scratchPickPositionCartographic=new Cartographic;function drillPick(e,t){var i,r,n=[],a=[],o=[],s=[];defined(e)||(e=Number.MAX_VALUE);for(var l=t();defined(l);){var c=l.object,u=l.position,d=l.exclude;if(defined(u)&&!defined(c)){n.push(l);break}if(!defined(c)||!defined(c.primitive))break;if(!d&&(n.push(l),--e<=0))break;d=!1,"function"==typeof(u=c.primitive).getGeometryInstanceAttributes&&defined(c.id)&&defined(r=u.getGeometryInstanceAttributes(c.id))&&defined(r.show)&&(d=!0,r.show=ShowGeometryInstanceAttribute.toValue(!1,r.show),o.push(r)),c instanceof Cesium3DTileFeature&&(d=!0,c.show=!1,s.push(c)),d||(u.show=!1,a.push(u)),l=t()}for(i=0;i<a.length;++i)a[i].show=!0;for(i=0;i<o.length;++i)(r=o[i]).show=ShowGeometryInstanceAttribute.toValue(!0,r.show);for(i=0;i<s.length;++i)s[i].show=!0;return n}Picking.prototype.pickPosition=function(e,t,i){return defined(i=this.pickPositionWorldCoordinates(e,t,i))&&e.mode!==SceneMode$1.SCENE3D&&(Cartesian3.fromElements(i.y,i.z,i.x,i),e=(t=e.mapProjection).ellipsoid,t=t.unproject(i,scratchPickPositionCartographic),e.cartographicToCartesian(t,i)),i},Picking.prototype.drillPick=function(e,t,i,r,n){var a=this;return drillPick(i,(function(){var i=a.pick(e,t,r,n);if(defined(i))return{object:i,position:void 0,exclude:!1}})).map((function(e){return e.object}))};var scratchRight$3=new Cartesian3,scratchUp$2=new Cartesian3;function MostDetailedRayPick(e,t,i){this.ray=e,this.width=t,this.tilesets=i,this.ready=!1,this.deferred=when.defer(),this.promise=this.deferred.promise}function updateOffscreenCameraFromRay(e,t,i,r){var n=t.direction,a=Cartesian3.mostOrthogonalAxis(n,scratchRight$3),o=Cartesian3.cross(n,a,scratchRight$3);a=Cartesian3.cross(n,o,scratchUp$2);return r.position=t.origin,r.direction=n,r.up=a,r.right=o,r.frustum.width=defaultValue(i,offscreenDefaultWidth),r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function updateMostDetailedRayPick(e,t,i){var r=t.frameState,n=i.ray,a=i.width,o=i.tilesets,s=e._pickOffscreenView.camera,l=(a=updateOffscreenCameraFromRay(e,n,a,s),mostDetailedPreloadTilesetPassState);l.camera=s,l.cullingVolume=a;for(var c=!0,u=o.length,d=0;d<u;++d){var h=o[d];h.show&&t.primitives.contains(h)&&(h.updateForPass(r,l),c=c&&l.ready)}return c&&i.deferred.resolve(),c}function getTilesets(e,t,i){for(var r=e.length,n=0;n<r;++n){var a=e.get(n);a.show&&(defined(a.isCesium3DTileset)?defined(t)&&-1!==t.indexOf(a)||i.push(a):a instanceof PrimitiveCollection&&getTilesets(a,t,i))}}function launchMostDetailedRayPick(e,t,i,r,n,a){var o=[];return getTilesets(t.primitives,r,o),0===o.length?when.resolve(a()):(o=new MostDetailedRayPick(i,n,o),e._mostDetailedRayPicks.push(o),o.promise.then((function(){return a()})))}function isExcluded(e,t){return!(!defined(e)||!defined(t)||0===t.length)&&(-1<t.indexOf(e)||-1<t.indexOf(e.primitive)||-1<t.indexOf(e.id))}function getRayIntersection(e,t,i,r,n,a,o){var s=t.context,l=s.uniformState,c=t.frameState,u=e._pickOffscreenView;if(updateOffscreenCameraFromRay(e,i,n,(t.view=u).camera),scratchRectangle$7=BoundingRectangle.clone(u.viewport,scratchRectangle$7),n=u.pickFramebuffer.begin(scratchRectangle$7,u.viewport),t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,c.tilesetPassState=o?mostDetailedPickTilesetPassState:pickTilesetPassState,l.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(n,scratchColorZero),t.resolveFramebuffers(n),n=u.pickFramebuffer.end(s),t.context.depthTexture)for(var d=u.frustumCommandsList.length,h=0;h<d;++h){var p=e.getPickDepth(t,h).getDepth(s,0,0);if(defined(p)&&0<p&&p<1){var f=u.frustumCommandsList[h],m=(m=f.near*(0!==h?t.opaqueFrustumNearOffset:1))+p*(f.far-m),g=Ray.getPoint(i,m);break}}if(t.view=t.defaultView,s.endFrame(),defined(n)||defined(g))return{object:n,position:g,exclude:!defined(g)&&a||isExcluded(n,r)}}function getRayIntersections(e,t,i,r,n,a,o,s){return drillPick(r,(function(){return getRayIntersection(e,t,i,n,a,o,s)}))}function pickFromRay(e,t,i,r,n,a,o){if(0<(o=getRayIntersections(e,t,i,1,r,n,a,o)).length)return o[0]}function drillPickFromRay(e,t,i,r,n,a,o,s){return getRayIntersections(e,t,i,r,n,a,o,s)}function deferPromiseUntilPostRender(e,t){var i=when.defer();return t.then((function(t){var r=e.postRender.addEventListener((function(){i.resolve(t),r()}));e.requestRender()})).otherwise((function(e){i.reject(e)})),i.promise}Picking.prototype.updateMostDetailedRayPicks=function(e){for(var t=this._mostDetailedRayPicks,i=0;i<t.length;++i)updateMostDetailedRayPick(this,e,t[i])&&t.splice(i--,1)},Picking.prototype.pickFromRay=function(e,t,i,r){return pickFromRay(this,e,t,i,r,!1,!1)},Picking.prototype.drillPickFromRay=function(e,t,i,r,n){return drillPickFromRay(this,e,t,i,r,n,!1,!1)},Picking.prototype.pickFromRayMostDetailed=function(e,t,i,r){var n=this;return t=Ray.clone(t),i=defined(i)?i.slice():i,deferPromiseUntilPostRender(e,launchMostDetailedRayPick(n,e,t,i,r,(function(){return pickFromRay(n,e,t,i,r,!1,!0)})))},Picking.prototype.drillPickFromRayMostDetailed=function(e,t,i,r,n){var a=this;return t=Ray.clone(t),r=defined(r)?r.slice():r,deferPromiseUntilPostRender(e,launchMostDetailedRayPick(a,e,t,r,n,(function(){return drillPickFromRay(a,e,t,i,r,n,!1,!0)})))};var scratchSurfacePosition=new Cartesian3,scratchSurfaceNormal=new Cartesian3,scratchSurfaceRay=new Ray,scratchCartographic$e=new Cartographic;function getRayForSampleHeight(e,t){var i=(defined(r=e.globe)?r:e.mapProjection).ellipsoid,r=ApproximateTerrainHeights._defaultMaxTerrainHeight;e=i.geodeticSurfaceNormalCartographic(t,scratchSurfaceNormal),t=Cartographic.toCartesian(t,i,scratchSurfacePosition);return(i=scratchSurfaceRay).origin=t,i.direction=e,t=new Ray,Ray.getPoint(i,r,t.origin),Cartesian3.negate(e,t.direction),t}function getRayForClampToHeight(e,t){var i=(defined(i=e.globe)?i:e.mapProjection).ellipsoid;return getRayForSampleHeight(e,Cartographic.fromCartesian(t,i,scratchCartographic$e))}function getHeightFromCartesian(e,t){var i=e.globe;e=(defined(i)?i:e.mapProjection).ellipsoid;return Cartographic.fromCartesian(t,e,scratchCartographic$e).height}function sampleHeightMostDetailed(e,t,i,r,n){var a=getRayForSampleHeight(t,i);return launchMostDetailedRayPick(e,t,a,r,n,(function(){var i=pickFromRay(e,t,a,r,n,!0,!0);if(defined(i))return getHeightFromCartesian(t,i.position)}))}function clampToHeightMostDetailed(e,t,i,r,n,a){var o=getRayForClampToHeight(t,i);return launchMostDetailedRayPick(e,t,o,r,n,(function(){var i=pickFromRay(e,t,o,r,n,!0,!0);if(defined(i))return Cartesian3.clone(i.position,a)}))}Picking.prototype.sampleHeight=function(e,t,i,r){if(defined(r=pickFromRay(this,e,getRayForSampleHeight(e,t),i,r,!0,!1)))return getHeightFromCartesian(e,r.position)},Picking.prototype.clampToHeight=function(e,t,i,r,n){if(defined(r=pickFromRay(this,e,getRayForClampToHeight(e,t),i,r,!0,!1)))return Cartesian3.clone(r.position,n)},Picking.prototype.sampleHeightMostDetailed=function(e,t,i,r){i=defined(i)?i.slice():i;for(var n=t.length,a=new Array(n),o=0;o<n;++o)a[o]=sampleHeightMostDetailed(this,e,t[o],i,r);return deferPromiseUntilPostRender(e,when.all(a).then((function(e){for(var i=e.length,r=0;r<i;++r)t[r].height=e[r];return t})))},Picking.prototype.clampToHeightMostDetailed=function(e,t,i,r){i=defined(i)?i.slice():i;for(var n=t.length,a=new Array(n),o=0;o<n;++o)a[o]=clampToHeightMostDetailed(this,e,t[o],i,r,t[o]);return deferPromiseUntilPostRender(e,when.all(a).then((function(e){for(var i=e.length,r=0;r<i;++r)t[r]=e[r];return t})))},Picking.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var PostProcessStageSampleMode={NEAREST:0,LINEAR:1};function PostProcessStage(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).fragmentShader,i=defaultValue(e.textureScale,1),r=defaultValue(e.pixelFormat,PixelFormat$1.RGBA);this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=i,this._forcePowerOfTwo=defaultValue(e.forcePowerOfTwo,!1),this._sampleMode=defaultValue(e.sampleMode,PostProcessStageSampleMode.NEAREST),this._pixelFormat=r,this._pixelDatatype=defaultValue(e.pixelDatatype,PixelDatatype$1.UNSIGNED_BYTE),this._clearColor=defaultValue(e.clearColor,Color.BLACK),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0,(r=new PassState).scissorTest={enabled:!0,rectangle:defined(e.scissorRectangle)?BoundingRectangle.clone(e.scissorRectangle):new BoundingRectangle},this._passState=r,this._ready=!1,defined(e=e.name)||(e=createGuid()),this._name=e,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(PostProcessStage.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(defined(this._textureCache)){var e=this._textureCache.getFramebuffer(this._name);if(defined(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var depthTextureRegex=/uniform\s+sampler2D\s+depthTexture/g;function getUniformValueGetterAndSetter(e,t,i){var r=t[i];return("string"==typeof r||r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof HTMLVideoElement||r instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(r){var n=t[i];t[i]=r;var a=e._actualUniforms,o=a[i];defined(o)&&o!==n&&o instanceof Texture&&!defined(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(o),delete a[i],delete a[i+"Dimensions"]),n instanceof Texture&&e._texturesToRelease.push(n),"string"==typeof r||r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof HTMLVideoElement||r instanceof ImageData?e._dirtyUniforms.push(i):a[i]=r}}}function getUniformMapFunction(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function getUniformMapDimensionsFunction(e,t){return function(){var i=e[t]();if(defined(i))return i.dimensions}}function createUniformMap$5(e){if(!defined(e._uniformMap)){var t,i,r={},n={},a=e._uniforms,o=e._actualUniforms;for(t in a)a.hasOwnProperty(t)&&("function"!=typeof a[t]?(r[t]=getUniformMapFunction(e,t),n[t]=getUniformValueGetterAndSetter(e,a,t)):(r[t]=a[t],n[t]=a[t]),o[t]=a[t],("string"==typeof(i=r[t]())||i instanceof Texture||i instanceof HTMLImageElement||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement)&&(r[t+"Dimensions"]=getUniformMapDimensionsFunction(r,t)));e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=combine(r,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width}})}}function createDrawCommand(e,t){var i;defined(e._command)&&!e._logDepthChanged&&!e._selectedDirty||(i=e._fragmentShader,defined(e._selectedIdTexture)&&(i="#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nvarying vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n    bool selected = false;\n    vec4 id = texture2D(czm_idTexture, v_textureCoordinates + offset); \n    for (int i = 0; i < "+e._selectedIdTexture.width+"; ++i) \n    { \n        vec4 selectedId = texture2D(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5)); \n        if (all(equal(id, selectedId))) \n        { \n            return true; \n        } \n    } \n    return false; \n} \n\nbool czm_selected() \n{ \n    return czm_selected(vec2(0.0)); \n} \n\n"+(i=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""))),i=new ShaderSource({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i]}),e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e}))}function createSampler(e){var t,i=e._sampleMode===PostProcessStageSampleMode.LINEAR?(t=TextureMinificationFilter$1.LINEAR,TextureMagnificationFilter$1.LINEAR):(t=TextureMinificationFilter$1.NEAREST,TextureMagnificationFilter$1.NEAREST),r=e._sampler;defined(r)&&r.minificationFilter===t&&r.magnificationFilter===i||(e._sampler=new Sampler({wrapS:TextureWrap$1.CLAMP_TO_EDGE,wrapT:TextureWrap$1.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}function createLoadImageFunction(e,t){return function(i){e._texturesToCreate.push({name:t,source:i})}}function createStageOutputTextureFunction(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function updateUniformTextures(e,t){var i,r=e._texturesToRelease,n=r.length;for(d=0;d<n;++d)i=(i=r[d])&&i.destroy();r.length=0;var a=e._texturesToCreate;n=a.length;for(d=0;d<n;++d){var o=(s=a[d]).name,s=s.source;e._actualUniforms[o]=new Texture({context:t,source:s})}a.length=0;var l=e._dirtyUniforms;if(0!==l.length||defined(e._texturePromise)){if(0!==l.length&&!defined(e._texturePromise)){n=l.length;for(var c=e._uniforms,u=[],d=0;d<n;++d){var h,p=c[o=l[d]];defined(e._textureCache.getStageByName(p))?e._actualUniforms[o]=createStageOutputTextureFunction(e,p):"string"==typeof p?(h=new Resource({url:p}),u.push(h.fetchImage().then(createLoadImageFunction(e,o)))):e._texturesToCreate.push({name:o,source:p})}(l.length=0)<u.length?(e._ready=!1,e._texturePromise=when.all(u).then((function(){e._ready=!0,e._texturePromise=void 0}))):e._ready=!0}}else e._ready=!0}function releaseResources(e){defined(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();var t=e._textureCache;if(defined(t)){var i,r=e._uniforms,n=e._actualUniforms;for(i in n)n.hasOwnProperty(i)&&n[i]instanceof Texture&&(defined(t.getStageByName(r[i]))||n[i].destroy(),e._dirtyUniforms.push(i))}}function isSelectedTextureDirty(e){var t=defined(e._selected)?e._selected.length:0,i=defined(e._parentSelected)?e._parentSelected:0,r=(r=e._selected!==e._selectedShadow||t!==e._selectedLength)||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength;if(defined(e._selected)&&defined(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):defined(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!r&&defined(e._combinedSelected)){if(!defined(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var n=0;n<t;++n)if(e._combinedSelected[n]!==e._combinedSelectedShadow[n])return!0}return r}function createSelectedTexture(e,t){if(e._selectedDirty){e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;var i=e._combinedSelected;if(defined(i)){for(var r,n,a=0,o=i.length,s=0;s<o;++s)defined((r=i[s]).pickIds)?a+=r.pickIds.length:defined(r.pickId)&&++a;if(0===o||0===a){var l=new Uint8Array(4);return l[0]=255,l[1]=255,l[2]=255,l[3]=255,void(e._selectedIdTexture=new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{arrayBufferView:l,width:1,height:1},sampler:Sampler.NEAREST}))}var c=0,u=new Uint8Array(4*a);for(s=0;s<o;++s)if(defined((r=i[s]).pickIds))for(var d=r.pickIds,h=d.length,p=0;p<h;++p)n=d[p].color,u[c]=Color.floatToByte(n.red),u[c+1]=Color.floatToByte(n.green),u[c+2]=Color.floatToByte(n.blue),u[c+3]=Color.floatToByte(n.alpha),c+=4;else defined(r.pickId)&&(n=r.pickId.color,u[c]=Color.floatToByte(n.red),u[c+1]=Color.floatToByte(n.green),u[c+2]=Color.floatToByte(n.blue),u[c+3]=Color.floatToByte(n.alpha),c+=4);e._selectedIdTexture=new Texture({context:t,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{arrayBufferView:u,width:a,height:1},sampler:Sampler.NEAREST})}}}PostProcessStage.prototype._isSupported=function(e){return!depthTextureRegex.test(this._fragmentShader)||e.depthTexture},PostProcessStage.prototype.update=function(e,t){var i;this.enabled===this._enabled||this.enabled||releaseResources(this),this._enabled=this.enabled,this._enabled&&(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=isSelectedTextureDirty(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=defined(this._selected)?this._selected.length:0,this._parentSelectedLength=defined(this._parentSelected)?this._parentSelected.length:0,createSelectedTexture(this,e),createUniformMap$5(this),updateUniformTextures(this,e),createDrawCommand(this,e),createSampler(this),this._selectedDirty=!1,this._ready&&(t=this._textureCache.getFramebuffer(this._name),defined(this._command.framebuffer=t)&&((t=t.getColorTexture(0)).width===e.drawingBufferWidth&&t.height===e.drawingBufferHeight||defined(i=this._renderState)&&t.width===i.viewport.width&&t.height===i.viewport.height||(this._renderState=RenderState.fromCache({viewport:new BoundingRectangle(0,0,t.width,t.height)})),this._command.renderState=i)))},PostProcessStage.prototype.execute=function(e,t,i,r){defined(this._command)&&defined(this._command.framebuffer)&&this._ready&&this._enabled&&(this._colorTexture=t,this._depthTexture=i,this._idTexture=r,Sampler.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler),defined(r=0<this.scissorRectangle.width&&0<this.scissorRectangle.height?this._passState:void 0)&&(r.context=e),this._command.execute(e,r))},PostProcessStage.prototype.isDestroyed=function(){return!1},PostProcessStage.prototype.destroy=function(){return releaseResources(this),destroyObject(this)};var AcesTonemapping="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\ncolor /= texture2D(autoExposure, vec2(0.5)).r;\n#endif\ncolor = czm_acesTonemapping(color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",AmbientOcclusionGenerate="uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\nvarying vec2 v_textureCoordinates;\nvec4 clipToEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\nposEC = posEC / posEC.w;\nreturn posEC;\n}\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\nvec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\nvec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\nvec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\nvec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\nvec3 up = posInCamera.xyz - posInCameraUp.xyz;\nvec3 down = posInCameraDown.xyz - posInCamera.xyz;\nvec3 left = posInCamera.xyz - posInCameraLeft.xyz;\nvec3 right = posInCameraRight.xyz - posInCamera.xyz;\nvec3 DX = length(left) < length(right) ? left : right;\nvec3 DY = length(up) < length(down) ? up : down;\nreturn normalize(cross(DY, DX));\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = clipToEye(v_textureCoordinates, depth);\nif (posInCamera.z > frustumLength)\n{\ngl_FragColor = vec4(1.0);\nreturn;\n}\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nfloat depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\nfloat depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\nfloat depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\nfloat depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\nvec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\nfloat ao = 0.0;\nvec2 sampleDirection = vec2(1.0, 0.0);\nfloat gapAngle = 90.0 * czm_radiansPerDegree;\nfloat randomVal = texture2D(randomTexture, v_textureCoordinates).x;\nfor (int i = 0; i < 4; i++)\n{\nfloat newGapAngle = gapAngle * (float(i) + randomVal);\nfloat cosVal = cos(newGapAngle);\nfloat sinVal = sin(newGapAngle);\nvec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\nfloat localAO = 0.0;\nfloat localStepSize = stepSize;\nfor (int j = 0; j < 6; j++)\n{\nvec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\nif(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n{\nbreak;\n}\nfloat stepDepthInfo = czm_readDepth(depthTexture, newCoords);\nvec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\nvec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\nfloat len = length(diffVec);\nif (len > lengthCap)\n{\nbreak;\n}\nfloat dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\nfloat weight = len / lengthCap;\nweight = 1.0 - weight * weight;\nif (dotVal < bias)\n{\ndotVal = 0.0;\n}\nlocalAO = max(localAO, dotVal * weight);\nlocalStepSize += stepSize;\n}\nao += localAO;\n}\nao /= 4.0;\nao = 1.0 - clamp(ao, 0.0, 1.0);\nao = pow(ao, intensity);\ngl_FragColor = vec4(vec3(ao), 1.0);\n}\n",AmbientOcclusionModulate="uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 color = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 ao = texture2D(ambientOcclusionTexture, v_textureCoordinates).rgb;\ngl_FragColor.rgb = ambientOcclusionOnly ? ao : ao * color;\n}\n",BlackAndWhite="uniform sampler2D colorTexture;\nuniform float gradations;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = vec4(rgb, 1.0);\nreturn;\n}\n#endif\nfloat luminance = czm_luminance(rgb);\nfloat darkness = luminance * gradations;\ndarkness = (darkness - fract(darkness)) / gradations;\ngl_FragColor = vec4(vec3(darkness), 1.0);\n}\n",BloomComposite="uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\n#ifdef CZM_SELECTED_FEATURE\nif (czm_selected()) {\ngl_FragColor = color;\nreturn;\n}\n#endif\nvec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\ngl_FragColor = glowOnly ? bloom : bloom + color;\n}\n",Brightness="uniform sampler2D colorTexture;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 target = vec3(0.0);\ngl_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n",ContrastBias="uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec3 sceneColor = texture2D(colorTexture, v_textureCoordinates).xyz;\nsceneColor = czm_RGBToHSB(sceneColor);\nsceneColor.z += brightness;\nsceneColor = czm_HSBToRGB(sceneColor);\nfloat factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\nsceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\ngl_FragColor = vec4(sceneColor, 1.0);\n}\n",DepthOfField="uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\nvarying vec2 v_textureCoordinates;\nvec4 toEye(vec2 uv, float depth)\n{\nvec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\nvec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\nposInCamera = posInCamera / posInCamera.w;\nreturn posInCamera;\n}\nfloat computeDepthBlur(float depth)\n{\nfloat f;\nif (depth < focalDistance)\n{\nf = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n}\nelse\n{\nf = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\nf = pow(f, 0.1);\n}\nf *= f;\nf = clamp(f, 0.0, 1.0);\nreturn pow(f, 0.5);\n}\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\nvec4 posInCamera = toEye(v_textureCoordinates, depth);\nfloat d = computeDepthBlur(-posInCamera.z);\ngl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), texture2D(blurTexture, v_textureCoordinates), d);\n}\n",DepthView="uniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat depth = czm_readDepth(depthTexture, v_textureCoordinates);\ngl_FragColor = vec4(vec3(depth), 1.0);\n}\n",EdgeDetection="uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nfloat directions[3];\ndirections[0] = -1.0;\ndirections[1] = 0.0;\ndirections[2] = 1.0;\nfloat scalars[3];\nscalars[0] = 3.0;\nscalars[1] = 10.0;\nscalars[2] = 3.0;\nfloat padx = czm_pixelRatio / czm_viewport.z;\nfloat pady = czm_pixelRatio / czm_viewport.w;\n#ifdef CZM_SELECTED_FEATURE\nbool selected = false;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nselected = selected || czm_selected(vec2(-padx, dir * pady));\nselected = selected || czm_selected(vec2(padx, dir * pady));\nselected = selected || czm_selected(vec2(dir * padx, -pady));\nselected = selected || czm_selected(vec2(dir * padx, pady));\nif (selected)\n{\nbreak;\n}\n}\nif (!selected)\n{\ngl_FragColor = vec4(color.rgb, 0.0);\nreturn;\n}\n#endif\nfloat horizEdge = 0.0;\nfloat vertEdge = 0.0;\nfor (int i = 0; i < 3; ++i)\n{\nfloat dir = directions[i];\nfloat scale = scalars[i];\nhorizEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\nhorizEdge += texture2D(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\nvertEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\nvertEdge += texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n}\nfloat len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\ngl_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n",FilmicTonemapping="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\nconst float A = 0.22;\nconst float B = 0.30;\nconst float C = 0.10;\nconst float D = 0.20;\nconst float E = 0.01;\nconst float F = 0.30;\nconst float white = 11.2;\nvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\nfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\nc = czm_inverseGamma(c / w);\ngl_FragColor = vec4(c, fragmentColor.a);\n}\n",FXAA="varying vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\nvoid main()\n{\nvec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\nvec4 color = FxaaPixelShader(\nv_textureCoordinates,\ncolorTexture,\nfxaaQualityRcpFrame,\nfxaaQualitySubpix,\nfxaaQualityEdgeThreshold,\nfxaaQualityEdgeThresholdMin);\nfloat alpha = texture2D(colorTexture, v_textureCoordinates).a;\ngl_FragColor = vec4(color.rgb, alpha);\n}\n",GaussianBlur1D="#define SAMPLES 8\nuniform float delta;\nuniform float sigma;\nuniform float direction;\nuniform sampler2D colorTexture;\n#ifdef USE_STEP_SIZE\nuniform float stepSize;\n#else\nuniform vec2 step;\n#endif\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nvec2 dir = vec2(1.0 - direction, direction);\n#ifdef USE_STEP_SIZE\nvec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));\n#else\nvec2 step = step;\n#endif\nvec3 g;\ng.x = 1.0 / (sqrt(czm_twoPi) * sigma);\ng.y = exp((-0.5 * delta * delta) / (sigma * sigma));\ng.z = g.y * g.y;\nvec4 result = texture2D(colorTexture, st) * g.x;\nfor (int i = 1; i < SAMPLES; ++i)\n{\ng.xy *= g.yz;\nvec2 offset = float(i) * dir * step;\nresult += texture2D(colorTexture, st - offset) * g.x;\nresult += texture2D(colorTexture, st + offset) * g.x;\n}\ngl_FragColor = result;\n}\n",LensFlare="uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\nvarying vec2 v_textureCoordinates;\n#define DISTANCE_TO_SPACE 6500000.0\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\nvec4 positionEC = czm_view * vec4(WC, 1.0);\npositionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nreturn czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\nvec2 NDC = texcoord * 2.0 - 1.0;\nvec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\nvec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\nNDC.xy -= earthPosSC.xy;\nfloat X = abs(NDC.x) * sceneSize.x;\nfloat Y = abs(NDC.y) * sceneSize.y;\nreturn clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\nvec2 sceneSize = czm_viewport.zw;\nvec3 color;\nif(isSpace)\n{\ncolor.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture2D(tex, texcoord + direction * distortion.b).b;\n}\nelse\n{\ncolor.r = texture2D(tex, texcoord + direction * distortion.r).r;\ncolor.g = texture2D(tex, texcoord + direction * distortion.g).g;\ncolor.b = texture2D(tex, texcoord + direction * distortion.b).b;\n}\nreturn vec4(clamp(color, 0.0, 1.0), 0.0);\n}\nvoid main(void)\n{\nvec4 originalColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 rgb = originalColor.rgb;\nbool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\nvec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\nvec4 sunPositionEC = czm_view * sunPos;\nvec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\nsunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\nif(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n{\ngl_FragColor = originalColor;\nreturn;\n}\nvec2 texcoord = vec2(1.0) - v_textureCoordinates;\nvec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\nvec2 invPixelSize = 1.0 / pixelSize;\nvec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\nvec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\nvec3 direction = normalize(vec3(ghostVec, 0.0));\nvec4 result = vec4(0.0);\nvec4 ghost = vec4(0.0);\nfor (int i = 0; i < 4; ++i)\n{\nvec2 offset = fract(texcoord + ghostVec * float(i));\nghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n}\nresult += ghost;\nvec2 haloVec = normalize(ghostVec) * haloWidth;\nfloat weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\nweightForHalo = pow(1.0 - weightForHalo, 5.0);\nresult += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\nvec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\nif (dirtTexCoords.x > 1.0)\n{\ndirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) :  fract(dirtTexCoords.x);\n}\nif (dirtTexCoords.y > 1.0)\n{\ndirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) :  fract(dirtTexCoords.y);\n}\nresult += dirtAmount * texture2D(dirtTexture, dirtTexCoords);\nfloat camrot = czm_view[0].z + czm_view[1].y;\nfloat cosValue = cos(camrot);\nfloat sinValue = sin(camrot);\nmat3 rotation = mat3(\ncosValue, -sinValue, 0.0,\nsinValue, cosValue, 0.0,\n0.0, 0.0, 1.0\n);\nvec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\nvec3 st2 = vec3((rotation * st1).xy, 1.0);\nvec3 st3 = st2 * 0.5 + vec3(0.5);\nvec2 lensStarTexcoord = st3.xy;\nfloat weightForLensFlare = length(vec3(sunPos.xy, 0.0));\nfloat oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\nif (!isSpace)\n{\nresult *= oneMinusWeightForLensFlare * intensity * 0.2;\n}\nelse\n{\nresult *= oneMinusWeightForLensFlare * intensity;\nresult *= texture2D(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n}\nresult += texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = result;\n}\n",ModifiedReinhardTonemapping="uniform sampler2D colorTexture;\nuniform vec3 white;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = (color * (1.0 + color / white)) / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",NightVision="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nfloat rand(vec2 co)\n{\nreturn fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\nvoid main(void)\n{\nfloat noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\nvec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\nvec3 green = vec3(0.0, 1.0, 0.0);\ngl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n",ReinhardTonemapping="uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\nvoid main()\n{\nvec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\nvec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\nfloat exposure = texture2D(autoExposure, vec2(0.5)).r;\ncolor /= exposure;\n#endif\ncolor = color / (1.0 + color);\ncolor = czm_inverseGamma(color);\ngl_FragColor = vec4(color, fragmentColor.a);\n}\n",Silhouette="uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\nvarying vec2 v_textureCoordinates;\nvoid main(void)\n{\nvec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\ngl_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n",FXAA3_11="#if (FXAA_QUALITY_PRESET == 10)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 3.0\n#define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 3.0\n#define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 4.0\n#define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 4.0\n#define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 4.0\n#define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 2.0\n#define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 3.0\n#define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n#define FXAA_QUALITY_PS 9\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 4.0\n#define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n#define FXAA_QUALITY_PS 10\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 4.0\n#define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n#define FXAA_QUALITY_PS 11\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 4.0\n#define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.0\n#define FXAA_QUALITY_P2 1.0\n#define FXAA_QUALITY_P3 1.0\n#define FXAA_QUALITY_P4 1.0\n#define FXAA_QUALITY_P5 1.5\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 2.0\n#define FXAA_QUALITY_P10 4.0\n#define FXAA_QUALITY_P11 8.0\n#endif\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\nFxaaFloat4 FxaaPixelShader(\nFxaaFloat2 pos,\nFxaaTex tex,\nFxaaFloat2 fxaaQualityRcpFrame,\nFxaaFloat fxaaQualitySubpix,\nFxaaFloat fxaaQualityEdgeThreshold,\nFxaaFloat fxaaQualityEdgeThresholdMin\n) {\nFxaaFloat2 posM;\nposM.x = pos.x;\nposM.y = pos.y;\nFxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n#define lumaM rgbyM.y\nFxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\nFxaaFloat maxSM = max(lumaS, lumaM);\nFxaaFloat minSM = min(lumaS, lumaM);\nFxaaFloat maxESM = max(lumaE, maxSM);\nFxaaFloat minESM = min(lumaE, minSM);\nFxaaFloat maxWN = max(lumaN, lumaW);\nFxaaFloat minWN = min(lumaN, lumaW);\nFxaaFloat rangeMax = max(maxWN, maxESM);\nFxaaFloat rangeMin = min(minWN, minESM);\nFxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\nFxaaFloat range = rangeMax - rangeMin;\nFxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\nFxaaBool earlyExit = range < rangeMaxClamped;\nif(earlyExit)\nreturn rgbyM;\nFxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\nFxaaFloat lumaNS = lumaN + lumaS;\nFxaaFloat lumaWE = lumaW + lumaE;\nFxaaFloat subpixRcpRange = 1.0/range;\nFxaaFloat subpixNSWE = lumaNS + lumaWE;\nFxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\nFxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\nFxaaFloat lumaNESE = lumaNE + lumaSE;\nFxaaFloat lumaNWNE = lumaNW + lumaNE;\nFxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\nFxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\nFxaaFloat lumaNWSW = lumaNW + lumaSW;\nFxaaFloat lumaSWSE = lumaSW + lumaSE;\nFxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\nFxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\nFxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\nFxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\nFxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\nFxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\nFxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\nFxaaFloat lengthSign = fxaaQualityRcpFrame.x;\nFxaaBool horzSpan = edgeHorz >= edgeVert;\nFxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\nif(!horzSpan) lumaN = lumaW;\nif(!horzSpan) lumaS = lumaE;\nif(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\nFxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\nFxaaFloat gradientN = lumaN - lumaM;\nFxaaFloat gradientS = lumaS - lumaM;\nFxaaFloat lumaNN = lumaN + lumaM;\nFxaaFloat lumaSS = lumaS + lumaM;\nFxaaBool pairN = abs(gradientN) >= abs(gradientS);\nFxaaFloat gradient = max(abs(gradientN), abs(gradientS));\nif(pairN) lengthSign = -lengthSign;\nFxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\nFxaaFloat2 posB;\nposB.x = posM.x;\nposB.y = posM.y;\nFxaaFloat2 offNP;\noffNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\noffNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\nif(!horzSpan) posB.x += lengthSign * 0.5;\nif( horzSpan) posB.y += lengthSign * 0.5;\nFxaaFloat2 posN;\nposN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\nposN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\nFxaaFloat2 posP;\nposP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\nposP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\nFxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\nFxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\nFxaaFloat subpixE = subpixC * subpixC;\nFxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\nif(!pairN) lumaNN = lumaSS;\nFxaaFloat gradientScaled = gradient * 1.0/4.0;\nFxaaFloat lumaMM = lumaM - lumaNN * 0.5;\nFxaaFloat subpixF = subpixD * subpixE;\nFxaaBool lumaMLTZero = lumaMM < 0.0;\nlumaEndN -= lumaNN * 0.5;\nlumaEndP -= lumaNN * 0.5;\nFxaaBool doneN = abs(lumaEndN) >= gradientScaled;\nFxaaBool doneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\nFxaaBool doneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n#if (FXAA_QUALITY_PS > 3)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n#if (FXAA_QUALITY_PS > 4)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n#if (FXAA_QUALITY_PS > 5)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n#if (FXAA_QUALITY_PS > 6)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n#if (FXAA_QUALITY_PS > 7)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n#if (FXAA_QUALITY_PS > 8)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n#if (FXAA_QUALITY_PS > 9)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n#if (FXAA_QUALITY_PS > 10)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n#if (FXAA_QUALITY_PS > 11)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n#if (FXAA_QUALITY_PS > 12)\nif(doneNP) {\nif(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\nif(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\nif(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\nif(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\ndoneN = abs(lumaEndN) >= gradientScaled;\ndoneP = abs(lumaEndP) >= gradientScaled;\nif(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\nif(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\ndoneNP = (!doneN) || (!doneP);\nif(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\nif(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\n#endif\n}\nFxaaFloat dstN = posM.x - posN.x;\nFxaaFloat dstP = posP.x - posM.x;\nif(!horzSpan) dstN = posM.y - posN.y;\nif(!horzSpan) dstP = posP.y - posM.y;\nFxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\nFxaaFloat spanLength = (dstP + dstN);\nFxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\nFxaaFloat spanLengthRcp = 1.0/spanLength;\nFxaaBool directionN = dstN < dstP;\nFxaaFloat dst = min(dstN, dstP);\nFxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\nFxaaFloat subpixG = subpixF * subpixF;\nFxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\nFxaaFloat subpixH = subpixG * fxaaQualitySubpix;\nFxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\nFxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\nif(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\nif( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\nreturn FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n";function PostProcessStageComposite(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._stages=e.stages,this._inputPreviousStageTexture=defaultValue(e.inputPreviousStageTexture,!0);var t=e.name;defined(t)||(t=createGuid()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}function isSelectedTextureDirty$1(e){var t=defined(e._selected)?e._selected.length:0,i=defined(e._parentSelected)?e._parentSelected:0,r=(r=e._selected!==e._selectedShadow||t!==e._selectedLength)||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength;if(defined(e._selected)&&defined(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):defined(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!r&&defined(e._combinedSelected)){if(!defined(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var n=0;n<t;++n)if(e._combinedSelected[n]!==e._combinedSelectedShadow[n])return!0}return r}Object.defineProperties(PostProcessStageComposite.prototype,{ready:{get:function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)if(!e[i].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){for(var t=this._stages,i=t.length,r=0;r<i;++r)t[r].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}}),PostProcessStageComposite.prototype._isSupported=function(e){for(var t=this._stages,i=t.length,r=0;r<i;++r)if(!t[r]._isSupported(e))return!1;return!0},PostProcessStageComposite.prototype.get=function(e){return this._stages[e]},PostProcessStageComposite.prototype.update=function(e,t){this._selectedDirty=isSelectedTextureDirty$1(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=defined(this._selected)?this._selected.length:0,this._parentSelectedLength=defined(this._parentSelected)?this._parentSelected.length:0;for(var i=this._stages,r=i.length,n=0;n<r;++n){var a=i[n];this._selectedDirty&&(a.parentSelected=this._combinedSelected),a.update(e,t)}},PostProcessStageComposite.prototype.isDestroyed=function(){return!1},PostProcessStageComposite.prototype.destroy=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)e[i].destroy();return destroyObject(this)};var PostProcessStageLibrary={};function createBlur(e){var t=new PostProcessStage({name:e+"_x_direction",fragmentShader:r="#define USE_STEP_SIZE\n"+GaussianBlur1D,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:PostProcessStageSampleMode.LINEAR}),i=new PostProcessStage({name:e+"_y_direction",fragmentShader:r,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:PostProcessStageSampleMode.LINEAR}),r={};return Object.defineProperties(r,{delta:{get:function(){return t.uniforms.delta},set:function(e){var r=t.uniforms,n=i.uniforms;r.delta=n.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){var r=t.uniforms,n=i.uniforms;r.sigma=n.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){var r=t.uniforms,n=i.uniforms;r.stepSize=n.stepSize=e}}}),new PostProcessStageComposite({name:e,stages:[t,i],uniforms:r})}function getSilhouetteEdgeDetection(e){if(!defined(e))return PostProcessStageLibrary.createEdgeDetectionStage();for(var t=new PostProcessStageComposite({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),i={},r="",n="",a=0;a<e.length;++a)r+="uniform sampler2D edgeTexture"+a+"; \n",n+="        vec4 edge"+a+" = texture2D(edgeTexture"+a+", v_textureCoordinates); \n        if (edge"+a+".a > 0.0) \n        { \n            color = edge"+a+"; \n            break; \n        } \n",i["edgeTexture"+a]=e[a].name;return new PostProcessStageComposite({name:"czm_edge_detection_composite",stages:[t,new PostProcessStage({name:"czm_edge_detection_combine",fragmentShader:r+"varying vec2 v_textureCoordinates; \nvoid main() { \n    vec4 color = vec4(0.0); \n    for (int i = 0; i < "+e.length+"; i++) \n    { \n"+n+"    } \n    gl_FragColor = color; \n} \n",uniforms:i})]})}PostProcessStageLibrary.createBlurStage=function(){return createBlur("czm_blur")},PostProcessStageLibrary.createDepthOfFieldStage=function(){var e=createBlur("czm_depth_of_field_blur"),t=new PostProcessStage({name:"czm_depth_of_field_composite",fragmentShader:DepthOfField,uniforms:{focalDistance:5,blurTexture:e.name}}),i={};return Object.defineProperties(i,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(e){t.uniforms.focalDistance=e}},delta:{get:function(){return e.uniforms.delta},set:function(t){e.uniforms.delta=t}},sigma:{get:function(){return e.uniforms.sigma},set:function(t){e.uniforms.sigma=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}}}),new PostProcessStageComposite({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:i})},PostProcessStageLibrary.isDepthOfFieldSupported=function(e){return e.context.depthTexture},PostProcessStageLibrary.createEdgeDetectionStage=function(){return new PostProcessStage({name:"czm_edge_detection_"+createGuid(),fragmentShader:EdgeDetection,uniforms:{length:.25,color:Color.clone(Color.BLACK)}})},PostProcessStageLibrary.isEdgeDetectionSupported=function(e){return e.context.depthTexture},PostProcessStageLibrary.createSilhouetteStage=function(e){return new PostProcessStageComposite({name:"czm_silhouette",stages:[e=getSilhouetteEdgeDetection(e),new PostProcessStage({name:"czm_silhouette_color_edges",fragmentShader:Silhouette,uniforms:{silhouetteTexture:e.name}})],inputPreviousStageTexture:!1,uniforms:e.uniforms})},PostProcessStageLibrary.isSilhouetteSupported=function(e){return e.context.depthTexture},PostProcessStageLibrary.createBloomStage=function(){var e=new PostProcessStage({name:"czm_bloom_contrast_bias",fragmentShader:ContrastBias,uniforms:{contrast:128,brightness:-.3}}),t=createBlur("czm_bloom_blur"),i=new PostProcessStageComposite({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),r=new PostProcessStage({name:"czm_bloom_generate_composite",fragmentShader:BloomComposite,uniforms:{glowOnly:!1,bloomTexture:i.name}}),n={};return Object.defineProperties(n,{glowOnly:{get:function(){return r.uniforms.glowOnly},set:function(e){r.uniforms.glowOnly=e}},contrast:{get:function(){return e.uniforms.contrast},set:function(t){e.uniforms.contrast=t}},brightness:{get:function(){return e.uniforms.brightness},set:function(t){e.uniforms.brightness=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}}}),new PostProcessStageComposite({name:"czm_bloom",stages:[i,r],inputPreviousStageTexture:!1,uniforms:n})},PostProcessStageLibrary.createAmbientOcclusionStage=function(){var e=new PostProcessStage({name:"czm_ambient_occlusion_generate",fragmentShader:AmbientOcclusionGenerate,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=createBlur("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;var i=new PostProcessStageComposite({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),r=new PostProcessStage({name:"czm_ambient_occlusion_composite",fragmentShader:AmbientOcclusionModulate,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:i.name}}),n={};return Object.defineProperties(n,{intensity:{get:function(){return e.uniforms.intensity},set:function(t){e.uniforms.intensity=t}},bias:{get:function(){return e.uniforms.bias},set:function(t){e.uniforms.bias=t}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(t){e.uniforms.lengthCap=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(t){e.uniforms.frustumLength=t}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(t){e.uniforms.randomTexture=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},ambientOcclusionOnly:{get:function(){return r.uniforms.ambientOcclusionOnly},set:function(e){r.uniforms.ambientOcclusionOnly=e}}}),new PostProcessStageComposite({name:"czm_ambient_occlusion",stages:[i,r],inputPreviousStageTexture:!1,uniforms:n})},PostProcessStageLibrary.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var fxaaFS="#define FXAA_QUALITY_PRESET 39 \n"+FXAA3_11+"\n"+FXAA;function PostProcessStageTextureCache(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function getLastStageName(e){for(;defined(e.length);)e=e.get(e.length-1);return e.name}function getStageDependencies(e,t,i,r,n){if(!r.enabled||!r._isSupported(t))return n;var a=i[r.name]={};defined(n)&&(a[getLastStageName(e.getStageByName(n))]=!0);var o=r.uniforms;if(defined(o))for(var s=Object.getOwnPropertyNames(o),l=s.length,c=0;c<l;++c){var u=o[s[c]];"string"!=typeof u||defined(u=e.getStageByName(u))&&(a[getLastStageName(u)]=!0)}return r.name}function getCompositeDependencies(e,t,i,r,n){if(defined(r.enabled)&&!r.enabled||defined(r._isSupported)&&!r._isSupported(t))return n;for(var a,o,s=n,l=!defined(r.inputPreviousStageTexture)||r.inputPreviousStageTexture,c=n,u=r.length,d=0;d<u;++d){var h=r.get(d);c=(defined(h.length)?getCompositeDependencies:getStageDependencies)(e,t,i,h,n);l&&(n=c)}if(l)for(a=1;a<u;++a)defined(i[o=getLastStageName(r.get(a))])||(i[o]={}),i[o][s]=!0;else for(a=1;a<u;++a)for(var p=i[o=getLastStageName(r.get(a))],f=0;f<a;++f)p[getLastStageName(r.get(f))]=!0;return c}function getDependencies(e,t){var i,r,n,a,o={};return defined(e.ambientOcclusion)?(a=e.ambientOcclusion,i=e.bloom,r=e._tonemapping,n=e.fxaa,a=getCompositeDependencies(e,t,o,a,void 0),a=getStageDependencies(e,t,o,r,a=getCompositeDependencies(e,t,o,i,a)),getStageDependencies(e,t,o,n,a=getCompositeDependencies(e,t,o,e,a))):getCompositeDependencies(e,t,o,e,void 0),o}function getFramebuffer(e,t,i){for(var r,n=e._collection.getStageByName(t),a=n._textureScale,o=n._forcePowerOfTwo,s=n._pixelFormat,l=n._pixelDatatype,c=n._clearColor,u=e._framebuffers,d=u.length,h=0;h<d;++h)if(a===(r=u[h]).textureScale&&o===r.forcePowerOfTwo&&s===r.pixelFormat&&l===r.pixelDatatype&&Color.equals(c,r.clearColor)){for(var p=r.stages,f=p.length,m=!1,g=0;g<f;++g)if(i[p[g]]){m=!0;break}if(!m)break}return defined(r)&&h<d?r.stages.push(t):(r={textureScale:a,forcePowerOfTwo:o,pixelFormat:s,pixelDatatype:l,clearColor:c,stages:[t],buffer:void 0,clear:void 0},u.push(r)),r}function createFramebuffers$3(e,t){var i,r=getDependencies(e._collection,t);for(i in r)r.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=getFramebuffer(e,i,r[i]))}function releaseResources$1(e){for(var t=e._framebuffers,i=t.length,r=0;r<i;++r){var n=t[r];n.buffer=n.buffer&&n.buffer.destroy(),n.buffer=void 0}}function updateFramebuffers$3(e,t){for(var i=e._width,r=e._height,n=e._framebuffers,a=n.length,o=0;o<a;++o){var s=n[o],l=s.textureScale,c=Math.ceil(i*l),u=Math.ceil(r*l);l=Math.min(c,u);s.forcePowerOfTwo&&(CesiumMath.isPowerOfTwo(l)||(l=CesiumMath.nextPowerOfTwo(l)),u=c=l),s.buffer=new Framebuffer({context:t,colorTextures:[new Texture({context:t,width:c,height:u,pixelFormat:s.pixelFormat,pixelDatatype:s.pixelDatatype})]}),s.clear=new ClearCommand({color:s.clearColor,framebuffer:s.buffer})}}PostProcessStageLibrary.createFXAAStage=function(){return new PostProcessStage({name:"czm_FXAA",fragmentShader:fxaaFS,sampleMode:PostProcessStageSampleMode.LINEAR})},PostProcessStageLibrary.createAcesTonemappingStage=function(e){return e=e?"#define AUTO_EXPOSURE\n":"",new PostProcessStage({name:"czm_aces",fragmentShader:e+=AcesTonemapping,uniforms:{autoExposure:void 0}})},PostProcessStageLibrary.createFilmicTonemappingStage=function(e){return e=e?"#define AUTO_EXPOSURE\n":"",new PostProcessStage({name:"czm_filmic",fragmentShader:e+=FilmicTonemapping,uniforms:{autoExposure:void 0}})},PostProcessStageLibrary.createReinhardTonemappingStage=function(e){return e=e?"#define AUTO_EXPOSURE\n":"",new PostProcessStage({name:"czm_reinhard",fragmentShader:e+=ReinhardTonemapping,uniforms:{autoExposure:void 0}})},PostProcessStageLibrary.createModifiedReinhardTonemappingStage=function(e){return e=e?"#define AUTO_EXPOSURE\n":"",new PostProcessStage({name:"czm_modified_reinhard",fragmentShader:e+=ModifiedReinhardTonemapping,uniforms:{white:Color.WHITE,autoExposure:void 0}})},PostProcessStageLibrary.createAutoExposureStage=function(){return new AutoExposure},PostProcessStageLibrary.createBlackAndWhiteStage=function(){return new PostProcessStage({name:"czm_black_and_white",fragmentShader:BlackAndWhite,uniforms:{gradations:5}})},PostProcessStageLibrary.createBrightnessStage=function(){return new PostProcessStage({name:"czm_brightness",fragmentShader:Brightness,uniforms:{brightness:.5}})},PostProcessStageLibrary.createNightVisionStage=function(){return new PostProcessStage({name:"czm_night_vision",fragmentShader:NightVision})},PostProcessStageLibrary.createDepthViewStage=function(){return new PostProcessStage({name:"czm_depth_view",fragmentShader:DepthView})},PostProcessStageLibrary.createLensFlareStage=function(){return new PostProcessStage({name:"czm_lens_flare",fragmentShader:LensFlare,uniforms:{dirtTexture:buildModuleUrl("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:buildModuleUrl("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:Ellipsoid.WGS84.maximumRadius}})},PostProcessStageTextureCache.prototype.updateDependencies=function(){this._updateDependencies=!0},PostProcessStageTextureCache.prototype.update=function(e){var t=this._collection,i=this._updateDependencies,r=defined(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),n=defined(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),a=defined(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),o=defined(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e);n=!defined(t._activeStages)||0<t._activeStages.length||r||n||a||o;(i||!n&&0<this._framebuffers.length)&&(releaseResources$1(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),(i||n)&&(0===this._framebuffers.length&&createFramebuffers$3(this,e),a=e.drawingBufferWidth,o=e.drawingBufferHeight,n=this._width!==a||this._height!==o,(i||n)&&(this._width=a,this._height=o,this._updateDependencies=!1,releaseResources$1(this),updateFramebuffers$3(this,e)))},PostProcessStageTextureCache.prototype.clear=function(e){for(var t=this._framebuffers,i=0;i<t.length;++i)t[i].clear.execute(e)},PostProcessStageTextureCache.prototype.getStageByName=function(e){return this._collection.getStageByName(e)},PostProcessStageTextureCache.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)},PostProcessStageTextureCache.prototype.getFramebuffer=function(e){if(defined(e=this._stageNameToFramebuffer[e]))return e.buffer},PostProcessStageTextureCache.prototype.isDestroyed=function(){return!1},PostProcessStageTextureCache.prototype.destroy=function(){return releaseResources$1(this),destroyObject(this)};var Tonemapper={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===Tonemapper.REINHARD||e===Tonemapper.MODIFIED_REINHARD||e===Tonemapper.FILMIC||e===Tonemapper.ACES}},Tonemapper$1=Object.freeze(Tonemapper),stackScratch=[];function PostProcessStageCollection(){var e=PostProcessStageLibrary.createFXAAStage(),t=PostProcessStageLibrary.createAmbientOcclusionStage(),i=PostProcessStageLibrary.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=PostProcessStageLibrary.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=Tonemapper$1.ACES;var r=this._tonemapping;e.enabled=!1,t.enabled=!1,i.enabled=!1,r.enabled=!1;var n=new PostProcessStageTextureCache(this),a={},o=stackScratch;for(o.push(e,t,i,r);0<o.length;){var s=o.pop();(a[s.name]=s)._textureCache=n;var l=s.length;if(defined(l))for(var c=0;c<l;++c)o.push(s.get(c))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var u=this;t.uniforms.randomTexture=function(){return u._randomTexture},this._ao=t,this._bloom=i,this._fxaa=e,this._lastLength=void 0,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=a,this._textureCache=n}function removeStages(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,r=i.length,n=0,a=0;n<r;++n){var o=i[n];o&&(o._index=a++,t.push(o))}e._stages=t}}function getOutputTexture(e){for(;defined(e.length);)e=e.get(e.length-1);return e.outputTexture}function execute(e,t,i,r,n){if(defined(e.execute))e.execute(t,i,r,n);else{var a,o=e.length;if(e.inputPreviousStageTexture)for(execute(e.get(0),t,i,r,n),a=1;a<o;++a)execute(e.get(a),t,getOutputTexture(e.get(a-1)),r,n);else for(a=0;a<o;++a)execute(e.get(a),t,i,r,n)}}function QuadtreeTileProvider(){DeveloperError.throwInstantiationError()}function SceneTransitioner(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}Object.defineProperties(PostProcessStageCollection.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length-1;0<=i;--i){var r=t[i];e=e||r.ready&&r.enabled}var n=this._fxaa,a=this._ao,o=this._bloom,s=this._tonemapping;return(e=(e=(e=e||n.ready&&n.enabled)||a.ready&&a.enabled)||o.ready&&o.enabled)||s.ready&&s.enabled}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return removeStages(this),this._stages.length}},outputTexture:{get:function(){var e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);for(var t=this._stages,i=t.length-1;0<=i;--i){var r=t[i];if(defined(r)&&r.ready&&r.enabled)return this.getOutputTexture(r.name)}return(e=this._tonemapping).enabled&&e.ready||(e=this._bloom).enabled&&e.ready||(e=this._ao).enabled&&e.ready?this.getOutputTexture(e.name):void 0}},hasSelected:{get:function(){for(var e=arraySlice(this._stages);0<e.length;){var t=e.pop();if(defined(t)){if(defined(t.selected))return!0;var i=t.length;if(defined(i))for(var r=0;r<i;++r)e.push(t.get(r))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){defined(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i,r=this._autoExposureEnabled;switch(e){case Tonemapper$1.REINHARD:t=PostProcessStageLibrary.createReinhardTonemappingStage(r);break;case Tonemapper$1.MODIFIED_REINHARD:t=PostProcessStageLibrary.createModifiedReinhardTonemappingStage(r);break;case Tonemapper$1.FILMIC:t=PostProcessStageLibrary.createFilmicTonemappingStage(r);break;default:t=PostProcessStageLibrary.createAcesTonemappingStage(r)}r&&(i=this._autoExposure,t.uniforms.autoExposure=function(){return i.outputTexture}),this._tonemapper=e,this._tonemapping=t,defined(this._stageNames)&&((this._stageNames[t.name]=t)._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),PostProcessStageCollection.prototype.add=function(e){var t=this._stageNames,i=stackScratch;for(i.push(e);0<i.length;){var r=i.pop();(t[r.name]=r)._textureCache=this._textureCache;var n=r.length;if(defined(n))for(var a=0;a<n;++a)i.push(r.get(a))}var o=this._stages;return e._index=o.length,o.push(e),this._textureCacheDirty=!0,e},PostProcessStageCollection.prototype.remove=function(e){if(!this.contains(e))return!1;var t=this._stageNames,i=stackScratch;for(i.push(e);0<i.length;){var r=i.pop();delete t[r.name];var n=r.length;if(defined(n))for(var a=0;a<n;++a)i.push(r.get(a))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0},PostProcessStageCollection.prototype.contains=function(e){return defined(e)&&defined(e._index)&&e._textureCache===this._textureCache},PostProcessStageCollection.prototype.get=function(e){return removeStages(this),this._stages[e]},PostProcessStageCollection.prototype.removeAll=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)this.remove(e[i]);e.length=0},PostProcessStageCollection.prototype.getStageByName=function(e){return this._stageNames[e]},PostProcessStageCollection.prototype.update=function(e,t,i){removeStages(this);var r=this._activeStages,n=this._activeStages=this._previousActiveStages;this._previousActiveStages=r;var a,o=this._stages,s=n.length=o.length,l=0;for(v=0;v<s;++v)(a=o[v]).ready&&a.enabled&&a._isSupported(e)&&(n[l++]=a);var c=(n.length=l)!==r.length;if(!c)for(v=0;v<l;++v)if(n[v]!==r[v]){c=!0;break}var u=this._ao,d=this._bloom,h=this._autoExposure,p=this._tonemapping,f=this._fxaa;p.enabled=i;var m=u.enabled&&u._isSupported(e),g=d.enabled&&d._isSupported(e),y=p.enabled&&p._isSupported(e);i=f.enabled&&f._isSupported(e);if((c||this._textureCacheDirty||l!==this._lastLength||m!==this._aoEnabled||g!==this._bloomEnabled||y!==this._tonemappingEnabled||i!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._lastLength=l,this._aoEnabled=m,this._bloomEnabled=g,this._tonemappingEnabled=y,this._fxaaEnabled=i,this._textureCacheDirty=!1),defined(this._randomTexture)&&!m&&(this._randomTexture.destroy(),this._randomTexture=void 0),!defined(this._randomTexture)&&m){s=196608;for(var _=new Uint8Array(s),v=0;v<s;v+=3)_[v]=Math.floor(255*Math.random());this._randomTexture=new Texture({context:e,pixelFormat:PixelFormat$1.RGB,pixelDatatype:PixelDatatype$1.UNSIGNED_BYTE,source:{arrayBufferView:_,width:256,height:256},sampler:new Sampler({wrapS:TextureWrap$1.REPEAT,wrapT:TextureWrap$1.REPEAT,minificationFilter:TextureMinificationFilter$1.NEAREST,magnificationFilter:TextureMagnificationFilter$1.NEAREST})})}for(this._textureCache.update(e),f.update(e,t),u.update(e,t),d.update(e,t),p.update(e,t),this._autoExposureEnabled&&h.update(e,t),s=o.length,v=0;v<s;++v)o[v].update(e,t)},PostProcessStageCollection.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},PostProcessStageCollection.prototype.getOutputTexture=function(e){if(defined(e=this.getStageByName(e)))return getOutputTexture(e)},PostProcessStageCollection.prototype.execute=function(e,t,i,r){var n=this._activeStages,a=n.length,o=this._fxaa,s=this._ao,l=this._bloom,c=this._autoExposure,u=this._tonemapping,d=s.enabled&&s._isSupported(e),h=l.enabled&&l._isSupported(e),p=this._autoExposureEnabled,f=u.enabled&&u._isSupported(e),m=o.enabled&&o._isSupported(e);if(m||d||h||f||0!==a){if(t=t,d&&s.ready&&(execute(s,e,t,i,r),t=getOutputTexture(s)),h&&l.ready&&(execute(l,e,t,i,r),t=getOutputTexture(l)),p&&c.ready&&execute(c,e,t,i,r),f&&u.ready&&(execute(u,e,t,i,r),t=getOutputTexture(u)),u=t,0<a){execute(n[0],e,t,i,r);for(var g=1;g<a;++g)execute(n[g],e,getOutputTexture(n[g-1]),i,r);u=getOutputTexture(n[a-1])}m&&o.ready&&execute(o,e,u,i,r)}},PostProcessStageCollection.prototype.copy=function(e,t){var i;defined(this._copyColorCommand)||((i=this)._copyColorCommand=e.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return i.outputTexture}},owner:this})),this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},PostProcessStageCollection.prototype.isDestroyed=function(){return!1},PostProcessStageCollection.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),destroyObject(this)},QuadtreeTileProvider.computeDefaultLevelZeroMaximumGeometricError=function(e){return 2*e.ellipsoid.maximumRadius*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))},Object.defineProperties(QuadtreeTileProvider.prototype,{quadtree:{get:DeveloperError.throwInstantiationError,set:DeveloperError.throwInstantiationError},ready:{get:DeveloperError.throwInstantiationError},tilingScheme:{get:DeveloperError.throwInstantiationError},errorEvent:{get:DeveloperError.throwInstantiationError}}),QuadtreeTileProvider.prototype.update=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.beginUpdate=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.endUpdate=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.getLevelMaximumGeometricError=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.loadTile=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.computeTileVisibility=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.showTileThisFrame=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.computeDistanceToTile=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.isDestroyed=DeveloperError.throwInstantiationError,QuadtreeTileProvider.prototype.destroy=DeveloperError.throwInstantiationError,SceneTransitioner.prototype.completeMorph=function(){defined(this._completeMorph)&&this._completeMorph()},SceneTransitioner.prototype.morphTo2D=function(e,t){defined(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._morphToOrthographic=i.camera.frustum instanceof OrthographicFrustum,this._previousMode!==SceneMode$1.SCENE2D&&this._previousMode!==SceneMode$1.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,SceneMode$1.SCENE2D,!0),i._mode=SceneMode$1.MORPHING,i.camera._setTransform(Matrix4.IDENTITY),this._previousMode===SceneMode$1.COLUMBUS_VIEW?morphFromColumbusViewTo2D(this,e):morphFrom3DTo2D(this,e,t),0===e&&defined(this._completeMorph)&&this._completeMorph())};var scratchToCVPosition=new Cartesian3,scratchToCVDirection=new Cartesian3,scratchToCVUp=new Cartesian3,scratchToCVPosition2D=new Cartesian3,scratchToCVDirection2D=new Cartesian3,scratchToCVUp2D=new Cartesian3,scratchToCVSurfacePosition=new Cartesian3,scratchToCVCartographic=new Cartographic,scratchToCVToENU=new Matrix4,scratchToCVFrustumPerspective=new PerspectiveFrustum,scratchToCVFrustumOrthographic=new OrthographicFrustum,scratchToCVCamera={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};SceneTransitioner.prototype.morphToColumbusView=function(e,t){defined(this._completeMorph)&&this._completeMorph();var i,r,n,a,o,s,l=this._scene;this._previousMode=l.mode,this._previousMode!==SceneMode$1.COLUMBUS_VIEW&&this._previousMode!==SceneMode$1.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,SceneMode$1.COLUMBUS_VIEW,!0),l.camera._setTransform(Matrix4.IDENTITY),i=scratchToCVPosition,r=scratchToCVDirection,n=scratchToCVUp,0<e?(i.x=0,i.y=-1,i.z=1,i=Cartesian3.multiplyByScalar(Cartesian3.normalize(i,i),5*t.maximumRadius,i),Cartesian3.negate(Cartesian3.normalize(i,r),r),Cartesian3.cross(Cartesian3.UNIT_X,r,n)):(a=l.camera,this._previousMode===SceneMode$1.SCENE2D?(Cartesian3.clone(a.position,i),i.z=a.frustum.right-a.frustum.left,Cartesian3.negate(Cartesian3.UNIT_Z,r),Cartesian3.clone(Cartesian3.UNIT_Y,n)):(Cartesian3.clone(a.positionWC,i),Cartesian3.clone(a.directionWC,r),Cartesian3.clone(a.upWC,n),o=t.scaleToGeodeticSurface(i,scratchToCVSurfacePosition),o=Transforms.eastNorthUpToFixedFrame(o,t,scratchToCVToENU),Matrix4.inverseTransformation(o,o),l.mapProjection.project(t.cartesianToCartographic(i,scratchToCVCartographic),i),Matrix4.multiplyByPointAsVector(o,r,r),Matrix4.multiplyByPointAsVector(o,n,n))),this._morphToOrthographic?((s=scratchToCVFrustumOrthographic).width=l.camera.frustum.right-l.camera.frustum.left,s.aspectRatio=l.drawingBufferWidth/l.drawingBufferHeight):((s=scratchToCVFrustumPerspective).aspectRatio=l.drawingBufferWidth/l.drawingBufferHeight,s.fov=CesiumMath.toRadians(60)),(o=scratchToCVCamera).position=i,o.direction=r,o.up=n,o.frustum=s,createMorphHandler(this,s=completeColumbusViewCallback(o)),this._previousMode===SceneMode$1.SCENE2D?morphFrom2DToColumbusView(this,e,o,s):(o.position2D=Matrix4.multiplyByPoint(Camera.TRANSFORM_2D,i,scratchToCVPosition2D),o.direction2D=Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,r,scratchToCVDirection2D),o.up2D=Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,n,scratchToCVUp2D),l._mode=SceneMode$1.MORPHING,morphFrom3DToColumbusView(this,e,o,s)),0===e&&defined(this._completeMorph)&&this._completeMorph())};var scratchCVTo3DCamera={position:new Cartesian3,direction:new Cartesian3,up:new Cartesian3,frustum:void 0},scratch2DTo3DFrustumPersp=new PerspectiveFrustum;function createMorphHandler(e,t){var i;e._scene.completeMorphOnUserInput&&(e._morphHandler=new ScreenSpaceEventHandler(e._scene.canvas),i=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)},e._completeMorph=i,e._morphHandler.setInputAction(i,ScreenSpaceEventType$1.LEFT_DOWN),e._morphHandler.setInputAction(i,ScreenSpaceEventType$1.MIDDLE_DOWN),e._morphHandler.setInputAction(i,ScreenSpaceEventType$1.RIGHT_DOWN),e._morphHandler.setInputAction(i,ScreenSpaceEventType$1.WHEEL))}function destroyMorphHandler(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}SceneTransitioner.prototype.morphTo3D=function(e,t){defined(this._completeMorph)&&this._completeMorph();var i,r,n=this._scene;this._previousMode=n.mode,this._previousMode!==SceneMode$1.SCENE3D&&this._previousMode!==SceneMode$1.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,SceneMode$1.SCENE3D,!0),n._mode=SceneMode$1.MORPHING,n.camera._setTransform(Matrix4.IDENTITY),this._previousMode===SceneMode$1.SCENE2D?morphFrom2DTo3D(this,e,t):(0<e?(i=scratchCVTo3DCamera,Cartesian3.fromDegrees(0,0,5*t.maximumRadius,t,i.position),Cartesian3.negate(i.position,i.direction),Cartesian3.normalize(i.direction,i.direction),Cartesian3.clone(Cartesian3.UNIT_Z,i.up)):i=getColumbusViewTo3DCamera(this,t),(t=n.camera).frustum instanceof OrthographicFrustum?r=t.frustum.clone():((r=scratch2DTo3DFrustumPersp).aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,r.fov=CesiumMath.toRadians(60)),i.frustum=r,createMorphHandler(this,r=complete3DCallback(i)),morphFromColumbusViewTo3D(this,e,i,r)),0===e&&defined(this._completeMorph)&&this._completeMorph())},SceneTransitioner.prototype.isDestroyed=function(){return!1},SceneTransitioner.prototype.destroy=function(){return destroyMorphHandler(this),destroyObject(this)};var scratchCVTo3DCartographic=new Cartographic,scratchCVTo3DSurfacePoint=new Cartesian3,scratchCVTo3DFromENU=new Matrix4;function getColumbusViewTo3DCamera(e,t){var i=(o=e._scene).camera,r=scratchCVTo3DCamera,n=r.position,a=r.direction,o=(e=r.up,o.mapProjection.unproject(i.position,scratchCVTo3DCartographic));return t.cartographicToCartesian(o,n),n=t.scaleToGeodeticSurface(n,scratchCVTo3DSurfacePoint),t=Transforms.eastNorthUpToFixedFrame(n,t,scratchCVTo3DFromENU),Matrix4.multiplyByPointAsVector(t,i.direction,a),Matrix4.multiplyByPointAsVector(t,i.up,e),r}var scratchCVTo3DStartPos=new Cartesian3,scratchCVTo3DStartDir=new Cartesian3,scratchCVTo3DStartUp=new Cartesian3,scratchCVTo3DEndPos=new Cartesian3,scratchCVTo3DEndDir=new Cartesian3,scratchCVTo3DEndUp=new Cartesian3;function morphFromColumbusViewTo3D(e,t,i,r){t*=.5;var n=e._scene,a=n.camera,o=Cartesian3.clone(a.position,scratchCVTo3DStartPos),s=Cartesian3.clone(a.direction,scratchCVTo3DStartDir),l=Cartesian3.clone(a.up,scratchCVTo3DStartUp),c=Matrix4.multiplyByPoint(Camera.TRANSFORM_2D_INVERSE,i.position,scratchCVTo3DEndPos),u=Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D_INVERSE,i.direction,scratchCVTo3DEndDir),d=Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D_INVERSE,i.up,scratchCVTo3DEndUp);i=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){columbusViewMorph(o,c,e.time,a.position),columbusViewMorph(s,u,e.time,a.direction),columbusViewMorph(l,d,e.time,a.up),Cartesian3.cross(a.direction,a.up,a.right),Cartesian3.normalize(a.right,a.right)},complete:function(){addMorphTimeAnimations(e,n,0,1,t,r)}}),e._currentTweens.push(i)}var scratch2DTo3DFrustumOrtho=new OrthographicFrustum,scratch3DToCVStartPos=new Cartesian3,scratch3DToCVStartDir=new Cartesian3,scratch3DToCVStartUp=new Cartesian3,scratch3DToCVEndPos=new Cartesian3,scratch3DToCVEndDir=new Cartesian3,scratch3DToCVEndUp=new Cartesian3;function morphFrom2DTo3D(e,t,i){t/=3;var r,n,a=e._scene,o=a.camera;0<t?(r=scratchCVTo3DCamera,Cartesian3.fromDegrees(0,0,5*i.maximumRadius,i,r.position),Cartesian3.negate(r.position,r.direction),Cartesian3.normalize(r.direction,r.direction),Cartesian3.clone(Cartesian3.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=getColumbusViewTo3DCamera(e,i)),e._morphToOrthographic?((n=scratch2DTo3DFrustumOrtho).aspectRatio=a.drawingBufferWidth/a.drawingBufferHeight,n.width=o.frustum.right-o.frustum.left):((n=scratch2DTo3DFrustumPersp).aspectRatio=a.drawingBufferWidth/a.drawingBufferHeight,n.fov=CesiumMath.toRadians(60)),r.frustum=n;var s,l=complete3DCallback(r);createMorphHandler(e,l),s=e._morphToOrthographic?function(){morphFromColumbusViewTo3D(e,t,r,l)}:function(){morphOrthographicToPerspective(e,t,r,(function(){morphFromColumbusViewTo3D(e,t,r,l)}))},0<t?(a._mode=SceneMode$1.SCENE2D,o.flyTo({duration:t,destination:Cartesian3.fromDegrees(0,0,5*i.maximumRadius,i,scratch3DToCVEndPos),complete:function(){a._mode=SceneMode$1.MORPHING,s()}})):s()}function columbusViewMorph(e,t,i,r){return Cartesian3.lerp(e,t,i,r)}function morphPerspectiveToOrthographic(e,t,i,r,n){var a,o,s,l=e._scene,c=l.camera;c.frustum instanceof OrthographicFrustum||(a=c.frustum.fov,o=.5*CesiumMath.RADIANS_PER_DEGREE,s=i.position.z*Math.tan(.5*a),c.frustum.far=s/Math.tan(.5*o)+1e7,t=l.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){c.frustum.fov=CesiumMath.lerp(a,o,e.time),e=s/Math.tan(.5*c.frustum.fov),r(c,e)},complete:function(){c.frustum=i.frustum.clone(),n(e)}}),e._currentTweens.push(t))}var scratchCVTo2DStartPos=new Cartesian3,scratchCVTo2DStartDir=new Cartesian3,scratchCVTo2DStartUp=new Cartesian3,scratchCVTo2DEndPos=new Cartesian3,scratchCVTo2DEndDir=new Cartesian3,scratchCVTo2DEndUp=new Cartesian3,scratchCVTo2DFrustum=new OrthographicOffCenterFrustum,scratchCVTo2DRay=new Ray,scratchCVTo2DPickPos=new Cartesian3,scratchCVTo2DCamera={position:void 0,direction:void 0,up:void 0,frustum:void 0};function morphFromColumbusViewTo2D(e,t){t*=.5;var i,r,n=e._scene,a=n.camera,o=Cartesian3.clone(a.position,scratchCVTo2DStartPos),s=Cartesian3.clone(a.direction,scratchCVTo2DStartDir),l=Cartesian3.clone(a.up,scratchCVTo2DStartUp),c=Cartesian3.negate(Cartesian3.UNIT_Z,scratchCVTo2DEndDir),u=Cartesian3.clone(Cartesian3.UNIT_Y,scratchCVTo2DEndUp),d=scratchCVTo2DEndPos;0<t?(Cartesian3.clone(Cartesian3.ZERO,scratchCVTo2DEndPos),d.z=5*n.mapProjection.ellipsoid.maximumRadius):(Cartesian3.clone(o,scratchCVTo2DEndPos),i=scratchCVTo2DRay,Matrix4.multiplyByPoint(Camera.TRANSFORM_2D,o,i.origin),Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,s,i.direction),!defined(r=n.globe)||defined(h=r.pickWorldCoordinates(i,n,!0,scratchCVTo2DPickPos))&&(Matrix4.multiplyByPoint(Camera.TRANSFORM_2D_INVERSE,h,d),d.z+=Cartesian3.distance(o,d)));var h=scratchCVTo2DFrustum;h.right=.5*d.z,h.left=-h.right,h.top=h.right*(n.drawingBufferHeight/n.drawingBufferWidth),h.bottom=-h.top;var p=scratchCVTo2DCamera;p.position=d,p.direction=c,p.up=u,p.frustum=h;var f=complete2DCallback(p);function m(e,t){e.position.z=t}createMorphHandler(e,f),n=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){columbusViewMorph(o,d,e.time,a.position),columbusViewMorph(s,c,e.time,a.direction),columbusViewMorph(l,u,e.time,a.up),Cartesian3.cross(a.direction,a.up,a.right),Cartesian3.normalize(a.right,a.right),a._adjustOrthographicFrustum(!0)},complete:function(){morphPerspectiveToOrthographic(e,t,p,m,f)}}),e._currentTweens.push(n)}var scratch3DTo2DCartographic=new Cartographic,scratch3DTo2DCamera={position:new Cartesian3,direction:new Cartesian3,up:new Cartesian3,position2D:new Cartesian3,direction2D:new Cartesian3,up2D:new Cartesian3,frustum:new OrthographicOffCenterFrustum},scratch3DTo2DEndCamera={position:new Cartesian3,direction:new Cartesian3,up:new Cartesian3,frustum:void 0},scratch3DTo2DPickPosition=new Cartesian3,scratch3DTo2DRay=new Ray,scratch3DTo2DToENU=new Matrix4,scratch3DTo2DSurfacePoint=new Cartesian3;function morphFrom3DTo2D(e,t,i){t*=.5;var r,n,a=e._scene,o=a.camera,s=scratch3DTo2DCamera;function l(e,t){e.position.x=t}0<t?(Cartesian3.clone(Cartesian3.ZERO,s.position),s.position.z=5*i.maximumRadius,Cartesian3.negate(Cartesian3.UNIT_Z,s.direction),Cartesian3.clone(Cartesian3.UNIT_Y,s.up)):(i.cartesianToCartographic(o.positionWC,scratch3DTo2DCartographic),a.mapProjection.project(scratch3DTo2DCartographic,s.position),Cartesian3.negate(Cartesian3.UNIT_Z,s.direction),Cartesian3.clone(Cartesian3.UNIT_Y,s.up),n=scratch3DTo2DRay,Cartesian3.clone(s.position2D,n.origin),r=Cartesian3.clone(o.directionWC,n.direction),o=i.scaleToGeodeticSurface(o.positionWC,scratch3DTo2DSurfacePoint),i=Transforms.eastNorthUpToFixedFrame(o,i,scratch3DTo2DToENU),Matrix4.inverseTransformation(i,i),Matrix4.multiplyByPointAsVector(i,r,r),Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,r,r),!defined(r=a.globe)||defined(c=r.pickWorldCoordinates(n,a,!0,scratch3DTo2DPickPosition))&&(n=Cartesian3.distance(s.position2D,c),c.x+=n,Cartesian3.clone(c,s.position2D))),Matrix4.multiplyByPoint(Camera.TRANSFORM_2D,s.position,s.position2D),Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,s.direction,s.direction2D),Matrix4.multiplyByPointAsVector(Camera.TRANSFORM_2D,s.up,s.up2D);var c=s.frustum;c.right=.5*s.position.z,c.left=-c.right,c.top=c.right*(a.drawingBufferHeight/a.drawingBufferWidth),c.bottom=-c.top,a=scratch3DTo2DEndCamera,Matrix4.multiplyByPoint(Camera.TRANSFORM_2D_INVERSE,s.position2D,a.position),Cartesian3.clone(s.direction,a.direction),Cartesian3.clone(s.up,a.up),a.frustum=c;var u=complete2DCallback(a);createMorphHandler(e,u),morphFrom3DToColumbusView(e,t,s,(function(){morphPerspectiveToOrthographic(e,t,s,l,u)}))}function morphOrthographicToPerspective(e,t,i,r){var n=e._scene,a=n.camera,o=a.frustum.right-a.frustum.left;a.frustum=i.frustum.clone();var s=a.frustum.fov,l=.5*CesiumMath.RADIANS_PER_DEGREE,c=o*Math.tan(.5*s);a.frustum.far=c/Math.tan(.5*l)+1e7,a.frustum.fov=l,t=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){a.frustum.fov=CesiumMath.lerp(l,s,e.time),a.position.z=c/Math.tan(.5*a.frustum.fov)},complete:function(){r(e)}}),e._currentTweens.push(t)}function morphFrom2DToColumbusView(e,t,i,r){t*=.5;var n=e._scene,a=n.camera,o=Cartesian3.clone(i.position,scratch3DToCVEndPos),s=Cartesian3.clone(i.direction,scratch3DToCVEndDir),l=Cartesian3.clone(i.up,scratch3DToCVEndUp);function c(){a.frustum=i.frustum.clone();var c=Cartesian3.clone(a.position,scratch3DToCVStartPos),u=Cartesian3.clone(a.direction,scratch3DToCVStartDir),d=Cartesian3.clone(a.up,scratch3DToCVStartUp);c.z=o.z;var h=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){columbusViewMorph(c,o,e.time,a.position),columbusViewMorph(u,s,e.time,a.direction),columbusViewMorph(d,l,e.time,a.up),Cartesian3.cross(a.direction,a.up,a.right),Cartesian3.normalize(a.right,a.right)},complete:function(){r(e)}});e._currentTweens.push(h)}n._mode=SceneMode$1.MORPHING,e._morphToOrthographic?c():morphOrthographicToPerspective(e,0,i,c)}function morphFrom3DToColumbusView(e,t,i,r){var n=e._scene,a=n.camera,o=Cartesian3.clone(a.position,scratch3DToCVStartPos),s=Cartesian3.clone(a.direction,scratch3DToCVStartDir),l=Cartesian3.clone(a.up,scratch3DToCVStartUp),c=Cartesian3.clone(i.position2D,scratch3DToCVEndPos),u=Cartesian3.clone(i.direction2D,scratch3DToCVEndDir),d=Cartesian3.clone(i.up2D,scratch3DToCVEndUp);i=n.tweens.add({duration:t,easingFunction:EasingFunction$1.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){columbusViewMorph(o,c,e.time,a.position),columbusViewMorph(s,u,e.time,a.direction),columbusViewMorph(l,d,e.time,a.up),Cartesian3.cross(a.direction,a.up,a.right),Cartesian3.normalize(a.right,a.right),a._adjustOrthographicFrustum(!0)},complete:function(){addMorphTimeAnimations(e,n,1,0,t,r)}}),e._currentTweens.push(i)}function addMorphTimeAnimations(e,t,i,r,n,a){n={object:t,property:"morphTime",startValue:i,stopValue:r,duration:n,easingFunction:EasingFunction$1.QUARTIC_OUT},defined(a)&&(n.complete=function(){a(e)}),n=t.tweens.addProperty(n),e._currentTweens.push(n)}function complete3DCallback(e){return function(t){var i=t._scene;i._mode=SceneMode$1.SCENE3D,i.morphTime=SceneMode$1.getMorphTime(SceneMode$1.SCENE3D),destroyMorphHandler(t);var r=i.camera;t._previousMode===SceneMode$1.MORPHING&&!t._morphCancelled||(t._morphCancelled=!1,Cartesian3.clone(e.position,r.position),Cartesian3.clone(e.direction,r.direction),Cartesian3.clone(e.up,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.normalize(r.right,r.right),r.frustum=e.frustum.clone()),r=r.frustum,i.frameState.useLogDepth&&(r.near=.1,r.far=1e10),r=defined(t._completeMorph),t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,SceneMode$1.SCENE3D,r)}}function complete2DCallback(e){return function(t){var i=t._scene;i._mode=SceneMode$1.SCENE2D,i.morphTime=SceneMode$1.getMorphTime(SceneMode$1.SCENE2D),destroyMorphHandler(t);var r=i.camera;Cartesian3.clone(e.position,r.position),r.position.z=2*i.mapProjection.ellipsoid.maximumRadius,Cartesian3.clone(e.direction,r.direction),Cartesian3.clone(e.up,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.normalize(r.right,r.right),r.frustum=e.frustum.clone(),r=defined(t._completeMorph),t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,SceneMode$1.SCENE2D,r)}}function completeColumbusViewCallback(e){return function(t){var i=t._scene;i._mode=SceneMode$1.COLUMBUS_VIEW,i.morphTime=SceneMode$1.getMorphTime(SceneMode$1.COLUMBUS_VIEW),destroyMorphHandler(t);var r=i.camera;t._previousModeMode===SceneMode$1.MORPHING&&!t._morphCancelled||(t._morphCancelled=!1,Cartesian3.clone(e.position,r.position),Cartesian3.clone(e.direction,r.direction),Cartesian3.clone(e.up,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.normalize(r.right,r.right)),r=r.frustum,i.frameState.useLogDepth&&(r.near=.1,r.far=1e10),r=defined(t._completeMorph),t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,SceneMode$1.COLUMBUS_VIEW,r)}}function Tween(e,t,i,r,n,a,o,s,l,c){this._tweens=e,this._tweenjs=t,this._startObject=clone(i),this._stopObject=clone(r),this._duration=n,this._delay=a,this._easingFunction=o,this._update=s,this._complete=l,this.cancel=c,this.needsStart=!0}function TweenCollection(){this._tweens=[]}function ScreenSpaceCameraController(e){this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=CameraEventType$1.LEFT_DRAG,this.zoomEventTypes=[CameraEventType$1.RIGHT_DRAG,CameraEventType$1.WHEEL,CameraEventType$1.PINCH],this.rotateEventTypes=CameraEventType$1.LEFT_DRAG,this.tiltEventTypes=[CameraEventType$1.MIDDLE_DRAG,CameraEventType$1.PINCH,{eventType:CameraEventType$1.LEFT_DRAG,modifier:KeyboardEventModifier$1.CTRL},{eventType:CameraEventType$1.RIGHT_DRAG,modifier:KeyboardEventModifier$1.CTRL}],this.lookEventTypes={eventType:CameraEventType$1.LEFT_DRAG,modifier:KeyboardEventModifier$1.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e3,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new CameraEventAggregator(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new TweenCollection,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new Cartesian2(-1,-1),this._tiltCenter=new Cartesian3,this._rotateMousePosition=new Cartesian2(-1,-1),this._rotateStartPosition=new Cartesian3,this._strafeStartPosition=new Cartesian3,this._strafeMousePosition=new Cartesian2,this._strafeEndMousePosition=new Cartesian2,this._zoomMouseStart=new Cartesian2(-1,-1),this._zoomWorldPosition=new Cartesian3,this._useZoomWorldPosition=!1,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1,e=e.mapProjection,this._maxCoord=e.project(new Cartographic(Math.PI,CesiumMath.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=2e-4,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function decay(e,t){return e<0?0:(t=25*(1-t),Math.exp(-t*e))}function sameMousePosition(e){return Cartesian2.equalsEpsilon(e.startPosition,e.endPosition,CesiumMath.EPSILON14)}Object.defineProperties(Tween.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}}),Tween.prototype.cancelTween=function(){this._tweens.remove(this)},Object.defineProperties(TweenCollection.prototype,{length:{get:function(){return this._tweens.length}}}),TweenCollection.prototype.add=function(e){if(0===(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).duration)return defined(e.complete)&&e.complete(),new Tween(this);var t=e.duration/TimeConstants$1.SECONDS_PER_MILLISECOND,i=defaultValue(e.delay,0),r=i/TimeConstants$1.SECONDS_PER_MILLISECOND,n=defaultValue(e.easingFunction,EasingFunction$1.LINEAR_NONE),a=e.startObject,o=new TWEEN.Tween(a);return o.to(clone(e.stopObject),t),o.delay(r),o.easing(n),defined(e.update)&&o.onUpdate((function(){e.update(a)})),o.onComplete(defaultValue(e.complete,null)),o.repeat(defaultValue(e._repeat,0)),n=new Tween(this,o,e.startObject,e.stopObject,e.duration,i,n,e.update,e.complete,e.cancel),this._tweens.push(n),n},TweenCollection.prototype.addProperty=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).object,i=e.property,r=e.startValue,n=e.stopValue;return this.add({startObject:{value:r},stopObject:{value:n},duration:defaultValue(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){t[i]=e.value},complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},TweenCollection.prototype.addAlpha=function(e){var t,i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).material,r=[];for(t in i.uniforms)i.uniforms.hasOwnProperty(t)&&defined(i.uniforms[t])&&defined(i.uniforms[t].alpha)&&r.push(t);return this.add({startObject:{alpha:defaultValue(e.startValue,0)},stopObject:{alpha:defaultValue(e.stopValue,1)},duration:defaultValue(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:function(e){for(var t=r.length,n=0;n<t;++n)i.uniforms[r[n]].alpha=e.alpha},complete:e.complete,cancel:e.cancel})},TweenCollection.prototype.addOffsetIncrement=function(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).material.uniforms;return this.addProperty({object:t,property:"offset",startValue:t.offset,stopValue:t.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})},TweenCollection.prototype.remove=function(e){if(!defined(e))return!1;var t=this._tweens.indexOf(e);return-1!==t&&(e.tweenjs.stop(),defined(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0)},TweenCollection.prototype.removeAll=function(){for(var e=this._tweens,t=0;t<e.length;++t){var i=e[t];i.tweenjs.stop(),defined(i.cancel)&&i.cancel()}e.length=0},TweenCollection.prototype.contains=function(e){return defined(e)&&-1!==this._tweens.indexOf(e)},TweenCollection.prototype.get=function(e){return this._tweens[e]},TweenCollection.prototype.update=function(e){var t=this._tweens,i=0;for(e=defined(e)?e/TimeConstants$1.SECONDS_PER_MILLISECOND:getTimestamp$1();i<t.length;){var r=t[i],n=r.tweenjs;r.needsStart?(r.needsStart=!1,n.start(e)):n.update(e)?i++:(n.stop(),t.splice(i,1))}};var inertiaMaxClickTimeThreshold=.4;function maintainInertia(e,t,i,r,n,a,o){var s=a[o];defined(s)||(s=a[o]={startPosition:new Cartesian2,endPosition:new Cartesian2,motion:new Cartesian2,inertiaEnabled:!0});var l=e.getButtonPressTime(t,i),c=e.getButtonReleaseTime(t,i),u=l&&c&&(c.getTime()-l.getTime())/1e3;o=new Date,o=c&&(o.getTime()-c.getTime())/1e3;if(l&&c&&u<inertiaMaxClickTimeThreshold){if(o=decay(o,r),!defined(r=e.getLastMovement(t,i))||sameMousePosition(r)||!s.inertiaEnabled)return;if(s.motion.x=.5*(r.endPosition.x-r.startPosition.x),s.motion.y=.5*(r.endPosition.y-r.startPosition.y),s.startPosition=Cartesian2.clone(r.startPosition,s.startPosition),s.endPosition=Cartesian2.multiplyByScalar(s.motion,o,s.endPosition),s.endPosition=Cartesian2.add(s.startPosition,s.endPosition,s.endPosition),isNaN(s.endPosition.x)||isNaN(s.endPosition.y)||Cartesian2.distance(s.startPosition,s.endPosition)<.5)return;e.isButtonDown(t,i)||n(a,e.getStartMousePosition(t,i),s)}}function activateInertia(e,t){if(defined(t)){var i=e[t];defined(i)&&(i.inertiaEnabled=!0);var r=e._inertiaDisablers[t];if(defined(r))for(var n=r.length,a=0;a<n;++a)defined(i=e[r[a]])&&(i.inertiaEnabled=!1)}}var scratchEventTypeArray=[];function reactToInput(e,t,i,r,n,a){if(defined(i)){var o=e._aggregator;Array.isArray(i)||(scratchEventTypeArray[0]=i,i=scratchEventTypeArray);for(var s=i.length,l=0;l<s;++l){var c=defined((h=i[l]).eventType)?h.eventType:h,u=h.modifier,d=o.isMoving(c,u)&&o.getMovement(c,u),h=o.getStartMousePosition(c,u);e.enableInputs&&t&&(d?(r(e,h,d),activateInertia(e,a)):n<1&&maintainInertia(o,c,u,n,r,e,a))}}}var scratchZoomPickRay=new Ray,scratchPickCartesian=new Cartesian3,scratchZoomOffset=new Cartesian2,scratchZoomDirection=new Cartesian3,scratchCenterPixel=new Cartesian2,scratchCenterPosition=new Cartesian3,scratchPositionNormal$2=new Cartesian3,scratchPickNormal=new Cartesian3,scratchZoomAxis=new Cartesian3,scratchCameraPositionNormal=new Cartesian3,scratchTargetNormal=new Cartesian3,scratchCameraPosition$1=new Cartesian3,scratchCameraUpNormal=new Cartesian3,scratchCameraRightNormal=new Cartesian3,scratchForwardNormal=new Cartesian3,scratchPositionToTarget=new Cartesian3,scratchPositionToTargetNormal=new Cartesian3,scratchPan=new Cartesian3,scratchCenterMovement=new Cartesian3,scratchCenter$6=new Cartesian3,scratchCartesian$9=new Cartesian3,scratchCartesianTwo=new Cartesian3,scratchCartesianThree=new Cartesian3,scratchZoomViewOptions={orientation:new HeadingPitchRoll};function handleZoom(e,t,i,r,n,a){var o=1;defined(a)&&(o=CesiumMath.clamp(Math.abs(a),.25,1));var s=e.minimumZoomDistance*o,l=e.maximumZoomDistance,c=r*(n-s);c=CesiumMath.clamp(c,e._minimumZoomRate,e._maximumZoomRate),a=(i.endPosition.y-i.startPosition.y)/e._scene.canvas.clientHeight,o=c*(a=Math.min(a,e.maximumMovementRatio));if(e.enableCollisionDetection||0===e.minimumZoomDistance||!defined(e._globe)){if(0<o&&Math.abs(n-s)<1)return;if(o<0&&Math.abs(n-l)<1)return;n-o<s?o=n-s-1:l<n-o&&(o=n-l)}if(i=(r=e._scene).camera,c=r.mode,(a=scratchZoomViewOptions.orientation).heading=i.heading,a.pitch=i.pitch,a.roll=i.roll,i.frustum instanceof OrthographicFrustum)0<Math.abs(o)&&(i.zoomIn(o),i._adjustOrthographicFrustum());else if(s=Cartesian2.equals(t,e._zoomMouseStart),n=e._zoomingOnVector,l=e._rotatingZoom,s||(e._zoomMouseStart=Cartesian2.clone(t,e._zoomMouseStart),defined(e._globe)&&(y=c===SceneMode$1.SCENE2D?(y=i.getPickRay(t,scratchZoomPickRay).origin,Cartesian3.fromElements(y.y,y.z,y.x)):pickGlobe(e,t,scratchPickCartesian)),defined(y)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=Cartesian3.clone(y,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,n=e._zoomingOnVector=!1,l=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),e._useZoomWorldPosition){if(a=c===SceneMode$1.COLUMBUS_VIEW,i.positionCartographic.height<2e6&&(l=!0),!s||l){if(c===SceneMode$1.SCENE2D){var u=e._zoomWorldPosition,d=i.position;!Cartesian3.equals(u,d)&&i.positionCartographic.height<2*e._maxCoord.x&&(m=i.position.x,h=Cartesian3.subtract(u,d,scratchZoomDirection),Cartesian3.normalize(h,h),f=Cartesian3.distance(u,d)*o/(.5*i.getMagnitude()),i.move(h,.5*f),(i.position.x<0&&0<m||0<i.position.x&&m<0)&&(y=i.getPickRay(t,scratchZoomPickRay).origin,y=Cartesian3.fromElements(y.y,y.z,y.x),e._zoomWorldPosition=Cartesian3.clone(y,e._zoomWorldPosition)))}else if(c===SceneMode$1.SCENE3D)if(l=Cartesian3.normalize(i.position,scratchCameraPositionNormal),e._cameraUnderground||e._zoomingUnderground||i.positionCartographic.height<3e3&&Math.abs(Cartesian3.dot(i.direction,l))<.6)a=!0;else{u=r.canvas,(d=scratchCenterPixel).x=u.clientWidth/2,d.y=u.clientHeight/2;var h=pickGlobe(e,d,scratchCenterPosition);if(defined(h))if(i.positionCartographic.height<1e6){if(!(-.5<=Cartesian3.dot(i.direction,l))){var p=scratchCameraPosition$1;Cartesian3.clone(i.position,p);var f=e._zoomWorldPosition,m=scratchTargetNormal;m=Cartesian3.normalize(f,m);if(Cartesian3.dot(m,l)<0)return;var g=scratchCenter$6,y=scratchForwardNormal;return Cartesian3.clone(i.direction,y),Cartesian3.add(p,Cartesian3.multiplyByScalar(y,1e3,scratchCartesian$9),g),u=scratchPositionToTarget,d=scratchPositionToTargetNormal,Cartesian3.subtract(f,p,u),Cartesian3.normalize(u,d),0<=(m=Cartesian3.dot(l,d))?void(e._zoomMouseStart.x=-1):(l=Math.acos(-m),m=Cartesian3.magnitude(p),f=Cartesian3.magnitude(f),m-=o,u=Cartesian3.magnitude(u),u=Math.asin(CesiumMath.clamp(u/f*Math.sin(l),-1,1))-Math.asin(CesiumMath.clamp(m/f*Math.sin(l),-1,1))+l,f=scratchCameraUpNormal,Cartesian3.normalize(p,f),l=scratchCameraRightNormal,l=Cartesian3.cross(d,f,l),l=Cartesian3.normalize(l,l),Cartesian3.normalize(Cartesian3.cross(f,l,scratchCartesian$9),y),Cartesian3.multiplyByScalar(Cartesian3.normalize(g,scratchCartesian$9),Cartesian3.magnitude(g)-o,g),Cartesian3.normalize(p,p),Cartesian3.multiplyByScalar(p,m,p),d=scratchPan,Cartesian3.multiplyByScalar(Cartesian3.add(Cartesian3.multiplyByScalar(f,Math.cos(u)-1,scratchCartesianTwo),Cartesian3.multiplyByScalar(y,Math.sin(u),scratchCartesianThree),scratchCartesian$9),m,d),Cartesian3.add(p,d,p),Cartesian3.normalize(g,f),Cartesian3.normalize(Cartesian3.cross(f,l,scratchCartesian$9),y),l=scratchCenterMovement,Cartesian3.multiplyByScalar(Cartesian3.add(Cartesian3.multiplyByScalar(f,Math.cos(u)-1,scratchCartesianTwo),Cartesian3.multiplyByScalar(y,Math.sin(u),scratchCartesianThree),scratchCartesian$9),Cartesian3.magnitude(g),l),Cartesian3.add(g,l,g),Cartesian3.clone(p,i.position),Cartesian3.normalize(Cartesian3.subtract(g,p,scratchCartesian$9),i.direction),Cartesian3.clone(i.direction,i.direction),Cartesian3.cross(i.direction,i.up,i.right),Cartesian3.cross(i.right,i.direction,i.up),void i.setView(scratchZoomViewOptions))}a=!0}else g=Cartesian3.normalize(h,scratchPositionNormal$2),p=Cartesian3.normalize(e._zoomWorldPosition,scratchPickNormal),0<(h=Cartesian3.dot(p,g))&&h<1&&(h=CesiumMath.acosClamped(h),p=Cartesian3.cross(p,g,scratchZoomAxis),g=o/(Math.abs(h)>CesiumMath.toRadians(20)?.75*i.positionCartographic.height:i.positionCartographic.height-o),i.rotate(p,h*g));else a=!0}e._rotatingZoom=!a}!s&&a||n?(r=SceneTransforms.wgs84ToWindowCoordinates(r,e._zoomWorldPosition,scratchZoomOffset),t=(c!==SceneMode$1.COLUMBUS_VIEW&&Cartesian2.equals(t,e._zoomMouseStart)&&defined(r)?i.getPickRay(r,scratchZoomPickRay):i.getPickRay(t,scratchZoomPickRay)).direction,c!==SceneMode$1.COLUMBUS_VIEW&&c!==SceneMode$1.SCENE2D||Cartesian3.fromElements(t.y,t.z,t.x,t),i.move(t,o),e._zoomingOnVector=!0):i.zoomIn(o),e._cameraUnderground||i.setView(scratchZoomViewOptions)}else i.zoomIn(o)}var translate2DStart=new Ray,translate2DEnd=new Ray,scratchTranslateP0=new Cartesian3;function translate2D(e,t,i){var r=e._scene.camera;e=r.getPickRay(i.startPosition,translate2DStart).origin,i=r.getPickRay(i.endPosition,translate2DEnd).origin,e=Cartesian3.fromElements(e.y,e.z,e.x,e),i=Cartesian3.fromElements(i.y,i.z,i.x,i),e=Cartesian3.subtract(e,i,scratchTranslateP0);0<(i=Cartesian3.magnitude(e))&&(Cartesian3.normalize(e,e),r.move(e,i))}function zoom2D$1(e,t,i){defined(i.distance)&&(i=i.distance);var r=e._scene.camera;handleZoom(e,t,i,e._zoomFactor,r.getMagnitude())}var twist2DStart=new Cartesian2,twist2DEnd=new Cartesian2;function twist2D(e,t,i){var r,n,a;defined(i.angleAndHeight)?singleAxisTwist2D(e,t,i.angleAndHeight):(r=(a=e._scene).camera,t=(n=a.canvas).clientWidth,e=n.clientHeight,(a=twist2DStart).x=2/t*i.startPosition.x-1,a.y=2/e*(e-i.startPosition.y)-1,a=Cartesian2.normalize(a,a),(n=twist2DEnd).x=2/t*i.endPosition.x-1,n.y=2/e*(e-i.endPosition.y)-1,n=Cartesian2.normalize(n,n),i=CesiumMath.acosClamped(a.x),a.y<0&&(i=CesiumMath.TWO_PI-i),a=CesiumMath.acosClamped(n.x),n.y<0&&(a=CesiumMath.TWO_PI-a),i=a-i,r.twistRight(i))}function singleAxisTwist2D(e,t,i){var r=e._rotateFactor*e._rotateRateRangeAdjustment;r>e._maximumRotateRate&&(r=e._maximumRotateRate),r<e._minimumRotateRate&&(r=e._minimumRotateRate);var n=(a=e._scene).camera,a=a.canvas;a=(i.endPosition.x-i.startPosition.x)/a.clientWidth,a=r*(a=Math.min(a,e.maximumMovementRatio))*Math.PI*4;n.twistRight(a)}function update2D(e){var t=e._scene.mapMode2D===MapMode2D$1.ROTATE;Matrix4.equals(Matrix4.IDENTITY,e._scene.camera.transform)?(reactToInput(e,e.enableTranslate,e.translateEventTypes,translate2D,e.inertiaTranslate,"_lastInertiaTranslateMovement"),reactToInput(e,e.enableZoom,e.zoomEventTypes,zoom2D$1,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&reactToInput(e,e.enableRotate,e.tiltEventTypes,twist2D,e.inertiaSpin,"_lastInertiaTiltMovement")):(reactToInput(e,e.enableZoom,e.zoomEventTypes,zoom2D$1,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&reactToInput(e,e.enableRotate,e.translateEventTypes,twist2D,e.inertiaSpin,"_lastInertiaSpinMovement"))}var pickGlobeScratchRay=new Ray,scratchDepthIntersection$1=new Cartesian3,scratchRayIntersection$1=new Cartesian3;function pickGlobe(e,t,i){var r=e._scene,n=e._globe,a=r.camera;if(defined(n)){var o;e=!e._cameraUnderground;return r.pickPositionSupported&&(o=r.pickPositionWorldCoordinates(t,scratchDepthIntersection$1)),t=a.getPickRay(t,pickGlobeScratchRay),e=n.pickWorldCoordinates(t,r,e,scratchRayIntersection$1),(defined(o)?Cartesian3.distance(o,a.positionWC):Number.POSITIVE_INFINITY)<(defined(e)?Cartesian3.distance(e,a.positionWC):Number.POSITIVE_INFINITY)?Cartesian3.clone(o,i):Cartesian3.clone(e,i)}}var scratchDistanceCartographic=new Cartographic;function getDistanceFromSurface(e){var t=e._ellipsoid,i=e._scene,r=i.camera,n=0;return i.mode===SceneMode$1.SCENE3D?defined(t=t.cartesianToCartographic(r.position,scratchDistanceCartographic))&&(n=t.height):n=r.position.z,e=defaultValue(e._scene.globeHeight,0),Math.abs(e-n)}var scratchSurfaceNormal$1=new Cartesian3;function getZoomDistanceUnderground(e,t){var i=t.origin;t=t.direction,e=getDistanceFromSurface(e),i=Cartesian3.normalize(i,scratchSurfaceNormal$1),t=Math.abs(Cartesian3.dot(i,t));return e*(2*Math.max(t,.5))}function getTiltCenterUnderground(e,t,i,r){var n=Cartesian3.distance(t.origin,i);i=getDistanceFromSurface(e);return CesiumMath.clamp(5*i,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance)<n&&(n=Math.min(n,i/5),n=Math.max(n,100)),Ray.getPoint(t,n,r)}function getStrafeStartPositionUnderground(e,t,i,r){var n;return(!defined(i)||(n=Cartesian3.distance(t.origin,i))>e._maximumUndergroundPickDistance)&&(n=getDistanceFromSurface(e)),Ray.getPoint(t,n,r)}var scratchInertialDelta=new Cartesian2;function continueStrafing(e,t){var i=t.endPosition,r=Cartesian2.subtract(t.endPosition,t.startPosition,scratchInertialDelta),n=e._strafeEndMousePosition;Cartesian2.add(n,r,n),t.endPosition=n,strafe(e,t,e._strafeStartPosition),t.endPosition=i}var translateCVStartRay=new Ray,translateCVEndRay=new Ray,translateCVStartPos=new Cartesian3,translateCVEndPos=new Cartesian3,translateCVDifference=new Cartesian3,translateCVOrigin=new Cartesian3,translateCVPlane=new Plane(Cartesian3.UNIT_X,0),translateCVStartMouse=new Cartesian2,translateCVEndMouse=new Cartesian2;function translateCV(e,t,i){if(Cartesian3.equals(t,e._translateMousePosition)||(e._looking=!1),Cartesian3.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking)look3D(e,t,i);else if(e._strafing)continueStrafing(e,i);else{var r,n=e._scene.camera,a=e._cameraUnderground,o=Cartesian2.clone(i.startPosition,translateCVStartMouse),s=Cartesian2.clone(i.endPosition,translateCVEndMouse),l=n.getPickRay(o,translateCVStartRay),c=Cartesian3.clone(Cartesian3.ZERO,translateCVOrigin),u=Cartesian3.UNIT_X;if(n.position.z<e._minimumPickingTerrainHeight&&defined(r=pickGlobe(e,o,translateCVStartPos))&&(c.x=r.x),a||c.x>n.position.z&&defined(r)){var d=r;return a&&(d=getStrafeStartPositionUnderground(e,l,r,translateCVStartPos)),Cartesian2.clone(t,e._strafeMousePosition),Cartesian2.clone(t,e._strafeEndMousePosition),Cartesian3.clone(d,e._strafeStartPosition),e._strafing=!0,void strafe(e,i,e._strafeStartPosition)}if(u=Plane.fromPointNormal(c,u,translateCVPlane),l=n.getPickRay(o,translateCVStartRay),l=IntersectionTests.rayPlane(l,u,translateCVStartPos),s=n.getPickRay(s,translateCVEndRay),u=IntersectionTests.rayPlane(s,u,translateCVEndPos),!defined(l)||!defined(u))return e._looking=!0,look3D(e,t,i),void Cartesian2.clone(t,e._translateMousePosition);u=(l=Cartesian3.subtract(l,u,translateCVDifference)).x,l.x=l.y,l.y=l.z,l.z=u,(u=Cartesian3.magnitude(l))>CesiumMath.EPSILON6&&(Cartesian3.normalize(l,l),n.move(l,u))}}var rotateCVWindowPos=new Cartesian2,rotateCVWindowRay=new Ray,rotateCVCenter=new Cartesian3,rotateCVVerticalCenter=new Cartesian3,rotateCVTransform=new Matrix4,rotateCVVerticalTransform=new Matrix4,rotateCVOrigin=new Cartesian3,rotateCVPlane=new Plane(Cartesian3.UNIT_X,0),rotateCVCartesian3=new Cartesian3,rotateCVCart=new Cartographic,rotateCVOldTransform=new Matrix4,rotateCVQuaternion=new Quaternion,rotateCVMatrix=new Matrix3,tilt3DCartesian3=new Cartesian3;function rotateCV(e,t,i){var r;defined(i.angleAndHeight)&&(i=i.angleAndHeight),Cartesian2.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking?look3D(e,t,i):(r=e._scene.camera,e._tiltCVOffMap||!e.onMap()||Math.abs(r.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,rotateCVOnPlane(e,t,i)):rotateCVOnTerrain(e,t,i))}function rotateCVOnPlane(e,t,i){var r=e._scene,n=r.camera,a=r.canvas;(l=rotateCVWindowPos).x=a.clientWidth/2,l.y=a.clientHeight/2;var o=n.getPickRay(l,rotateCVWindowRay),s=Cartesian3.UNIT_X,l=(a=o.origin,o.direction);o=Cartesian3.dot(s,l);if(Math.abs(o)>CesiumMath.EPSILON6&&(c=-Cartesian3.dot(s,a)/o),!defined(c)||c<=0)return e._looking=!0,look3D(e,t,i),void Cartesian2.clone(t,e._tiltCenterMousePosition);l=Cartesian3.multiplyByScalar(l,c,rotateCVCenter),Cartesian3.add(a,l,l);var c=r.mapProjection;a=c.ellipsoid;Cartesian3.fromElements(l.y,l.z,l.x,l),r=c.unproject(l,rotateCVCart),a.cartographicToCartesian(r,l),c=Transforms.eastNorthUpToFixedFrame(l,a,rotateCVTransform),r=e._globe,l=e._ellipsoid,e._globe=void 0,e._ellipsoid=Ellipsoid.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1,a=Matrix4.clone(n.transform,rotateCVOldTransform),n._setTransform(c),rotate3D(e,t,i,Cartesian3.UNIT_Z),n._setTransform(a),e._globe=r,l=(e._ellipsoid=l).maximumRadius,e._rotateFactor=1/l,e._rotateRateRangeAdjustment=l}function rotateCVOnTerrain(e,t,i){var r=(h=e._scene).camera,n=e._cameraUnderground,a=Cartesian3.UNIT_X;if(Cartesian2.equals(t,e._tiltCenterMousePosition))d=Cartesian3.clone(e._tiltCenter,rotateCVCenter);else{if(r.position.z<e._minimumPickingTerrainHeight&&(d=pickGlobe(e,t,rotateCVCenter)),!defined(d)){var o=(u=r.getPickRay(t,rotateCVWindowRay)).origin,s=u.direction,l=Cartesian3.dot(a,s);if(Math.abs(l)>CesiumMath.EPSILON6&&(c=-Cartesian3.dot(a,o)/l),!defined(c)||c<=0)return e._looking=!0,look3D(e,t,i),void Cartesian2.clone(t,e._tiltCenterMousePosition);d=Cartesian3.multiplyByScalar(s,c,rotateCVCenter),Cartesian3.add(o,d,d)}n&&(defined(u)||(u=r.getPickRay(t,rotateCVWindowRay)),getTiltCenterUnderground(e,u,d,d)),Cartesian2.clone(t,e._tiltCenterMousePosition),Cartesian3.clone(d,e._tiltCenter)}var c=h.canvas;(o=rotateCVWindowPos).x=c.clientWidth/2,o.y=e._tiltCenterMousePosition.y,u=r.getPickRay(o,rotateCVWindowRay),(h=Cartesian3.clone(Cartesian3.ZERO,rotateCVOrigin)).x=d.x,c=Plane.fromPointNormal(h,a,rotateCVPlane),o=IntersectionTests.rayPlane(u,c,rotateCVVerticalCenter),a=(h=r._projection).ellipsoid,Cartesian3.fromElements(d.y,d.z,d.x,d);var u=h.unproject(d,rotateCVCart);a.cartographicToCartesian(u,d);c=Transforms.eastNorthUpToFixedFrame(d,a,rotateCVTransform);var d=defined(o)?(Cartesian3.fromElements(o.y,o.z,o.x,o),u=h.unproject(o,rotateCVCart),a.cartographicToCartesian(u,o),Transforms.eastNorthUpToFixedFrame(o,a,rotateCVVerticalTransform)):c,h=e._globe;u=e._ellipsoid;e._globe=void 0,e._ellipsoid=Ellipsoid.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1,o=Cartesian3.UNIT_Z,a=Matrix4.clone(r.transform,rotateCVOldTransform),r._setTransform(c),c=Cartesian3.cross(Cartesian3.UNIT_Z,Cartesian3.normalize(r.position,rotateCVCartesian3),rotateCVCartesian3),c=Cartesian3.dot(r.right,c),rotate3D(e,t,i,o,!1,!0),r._setTransform(d),c<0?(c=i.startPosition.y-i.endPosition.y,(n&&c<0||!n&&0<c)&&(o=void 0),c=r.constrainedAxis,rotate3D(e,t,i,o,!(r.constrainedAxis=void 0),!1),r.constrainedAxis=c):rotate3D(e,t,i,o,!0,!1),defined(r.constrainedAxis)&&(o=Cartesian3.cross(r.direction,r.constrainedAxis,tilt3DCartesian3),Cartesian3.equalsEpsilon(o,Cartesian3.ZERO,CesiumMath.EPSILON6)||(Cartesian3.dot(o,r.right)<0&&Cartesian3.negate(o,o),Cartesian3.cross(o,r.direction,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.normalize(r.up,r.up),Cartesian3.normalize(r.right,r.right))),r._setTransform(a),e._globe=h,u=(e._ellipsoid=u).maximumRadius,e._rotateFactor=1/u,e._rotateRateRangeAdjustment=u,u=Cartesian3.clone(r.positionWC,rotateCVCartesian3),e.enableCollisionDetection&&adjustHeightForTerrain(e),Cartesian3.equals(r.positionWC,u)||(r._setTransform(d),r.worldToCameraCoordinatesPoint(u,u),d=Cartesian3.magnitudeSquared(u),Cartesian3.magnitudeSquared(r.position)>d&&(Cartesian3.normalize(r.position,r.position),Cartesian3.multiplyByScalar(r.position,Math.sqrt(d),r.position)),d=Cartesian3.angleBetween(u,r.position),u=Cartesian3.cross(u,r.position,u),Cartesian3.normalize(u,u),d=Quaternion.fromAxisAngle(u,d,rotateCVQuaternion),d=Matrix3.fromQuaternion(d,rotateCVMatrix),Matrix3.multiplyByVector(d,r.direction,r.direction),Matrix3.multiplyByVector(d,r.up,r.up),Cartesian3.cross(r.direction,r.up,r.right),Cartesian3.cross(r.right,r.direction,r.up),r._setTransform(a))}var zoomCVWindowPos=new Cartesian2,zoomCVWindowRay=new Ray,zoomCVIntersection=new Cartesian3;function zoomCV(e,t,i){defined(i.distance)&&(i=i.distance);var r,n=(d=e._scene).camera,a=d.canvas,o=e._cameraUnderground;o?r=t:((r=zoomCVWindowPos).x=a.clientWidth/2,r.y=a.clientHeight/2);var s,l,c,u=n.getPickRay(r,zoomCVWindowRay),d=u.origin;a=u.direction;n.position.z<e._minimumPickingTerrainHeight&&(s=pickGlobe(e,r,zoomCVIntersection)),defined(s)&&(l=Cartesian3.distance(d,s)),o&&(c=getZoomDistanceUnderground(e,u),l=defined(l)?Math.min(l,c):c),defined(l)||(c=Cartesian3.UNIT_X,l=-Cartesian3.dot(c,d)/Cartesian3.dot(c,a)),handleZoom(e,t,i,e._zoomFactor,l)}function updateCV(e){var t,i=e._scene.camera;Matrix4.equals(Matrix4.IDENTITY,i.transform)?(t=e._tweens,e._aggregator.anyButtonDown&&t.removeAll(),reactToInput(e,e.enableTilt,e.tiltEventTypes,rotateCV,e.inertiaSpin,"_lastInertiaTiltMovement"),reactToInput(e,e.enableTranslate,e.translateEventTypes,translateCV,e.inertiaTranslate,"_lastInertiaTranslateMovement"),reactToInput(e,e.enableZoom,e.zoomEventTypes,zoomCV,e.inertiaZoom,"_lastInertiaZoomMovement"),reactToInput(e,e.enableLook,e.lookEventTypes,look3D),e._aggregator.anyButtonDown||t.contains(e._tween)||defined(i=i.createCorrectPositionTween(e.bounceAnimationTime))&&(e._tween=t.add(i)),t.update()):(reactToInput(e,e.enableRotate,e.rotateEventTypes,rotate3D,e.inertiaSpin,"_lastInertiaSpinMovement"),reactToInput(e,e.enableZoom,e.zoomEventTypes,zoom3D$1,e.inertiaZoom,"_lastInertiaZoomMovement"))}var scratchStrafeRay=new Ray,scratchStrafePlane=new Plane(Cartesian3.UNIT_X,0),scratchStrafeIntersection=new Cartesian3,scratchStrafeDirection=new Cartesian3,scratchMousePos=new Cartesian3;function strafe(e,t,i){var r=e._scene,n=r.camera,a=n.getPickRay(t.endPosition,scratchStrafeRay);e=Cartesian3.clone(n.direction,scratchStrafeDirection);r.mode===SceneMode$1.COLUMBUS_VIEW&&Cartesian3.fromElements(e.z,e.x,e.y,e),t=Plane.fromPointNormal(i,e,scratchStrafePlane),defined(t=IntersectionTests.rayPlane(a,t,scratchStrafeIntersection))&&(e=Cartesian3.subtract(i,t,e),r.mode===SceneMode$1.COLUMBUS_VIEW&&Cartesian3.fromElements(e.y,e.z,e.x,e),Cartesian3.add(n.position,e,n.position))}var spin3DPick=new Cartesian3,scratchCartographic$f=new Cartographic,scratchRadii$2=new Cartesian3,scratchEllipsoid$e=new Ellipsoid,scratchLookUp=new Cartesian3,scratchNormal$7=new Cartesian3;function spin3D(e,t,i){var r=e._scene.camera,n=e._cameraUnderground,a=e._ellipsoid;if(Matrix4.equals(r.transform,Matrix4.IDENTITY)){var o,s,l=a.geodeticSurfaceNormal(r.position,scratchLookUp);if(Cartesian2.equals(t,e._rotateMousePosition))if(e._looking)look3D(e,t,i,l);else if(e._rotating)rotate3D(e,t,i);else if(e._strafing)continueStrafing(e,i);else{if(Cartesian3.magnitude(r.position)<Cartesian3.magnitude(e._rotateStartPosition))return;o=Cartesian3.magnitude(e._rotateStartPosition),(s=scratchRadii$2).x=s.y=s.z=o,pan3D(e,t,i,a=Ellipsoid.fromCartesian3(s,scratchEllipsoid$e))}else{e._looking=!1,e._rotating=!1,e._strafing=!1;var c,u,d,h=a.cartesianToCartographic(r.positionWC,scratchCartographic$f).height;defined(e._globe)&&h<e._minimumPickingTerrainHeight?defined(c=pickGlobe(e,i.startPosition,scratchMousePos))?(d=!1,u=r.getPickRay(i.startPosition,pickGlobeScratchRay),n?(d=!0,getStrafeStartPositionUnderground(e,u,c,c)):(n=a.geodeticSurfaceNormal(c,scratchNormal$7),d=Math.abs(Cartesian3.dot(u.direction,n))<.05||Cartesian3.magnitude(r.position)<Cartesian3.magnitude(c)),d?(Cartesian2.clone(t,e._strafeEndMousePosition),Cartesian3.clone(c,e._strafeStartPosition),e._strafing=!0,strafe(e,i,e._strafeStartPosition)):(o=Cartesian3.magnitude(c),(s=scratchRadii$2).x=s.y=s.z=o,pan3D(e,t,i,a=Ellipsoid.fromCartesian3(s,scratchEllipsoid$e)),Cartesian3.clone(c,e._rotateStartPosition))):(e._looking=!0,look3D(e,t,i,l)):defined(r.pickEllipsoid(i.startPosition,e._ellipsoid,spin3DPick))?(pan3D(e,t,i,e._ellipsoid),Cartesian3.clone(spin3DPick,e._rotateStartPosition)):h>e._minimumTrackBallHeight?(e._rotating=!0,rotate3D(e,t,i)):(e._looking=!0,look3D(e,t,i,l)),Cartesian2.clone(t,e._rotateMousePosition)}}else rotate3D(e,t,i)}function rotate3D(e,t,i,r,n,a){n=defaultValue(n,!1),a=defaultValue(a,!1);var o=e._scene,s=o.camera,l=o.canvas,c=s.constrainedAxis;defined(r)&&(s.constrainedAxis=r),o=Cartesian3.magnitude(s.position),(r=e._rotateFactor*(o-e._rotateRateRangeAdjustment))>e._maximumRotateRate&&(r=e._maximumRotateRate),r<e._minimumRotateRate&&(r=e._minimumRotateRate),o=(i.startPosition.x-i.endPosition.x)/l.clientWidth,l=(i.startPosition.y-i.endPosition.y)/l.clientHeight,o=Math.min(o,e.maximumMovementRatio),l=Math.min(l,e.maximumMovementRatio),o=r*o*Math.PI*2,l=r*l*Math.PI,n||s.rotateRight(o),a||s.rotateUp(l),s.constrainedAxis=c}var pan3DP0=Cartesian4.clone(Cartesian4.UNIT_W),pan3DP1=Cartesian4.clone(Cartesian4.UNIT_W),pan3DTemp0=new Cartesian3,pan3DTemp1=new Cartesian3,pan3DTemp2=new Cartesian3,pan3DTemp3=new Cartesian3,pan3DStartMousePosition=new Cartesian2,pan3DEndMousePosition=new Cartesian2;function pan3D(e,t,i,r){var n,a,o=e._scene.camera,s=Cartesian2.clone(i.startPosition,pan3DStartMousePosition),l=Cartesian2.clone(i.endPosition,pan3DEndMousePosition),c=o.pickEllipsoid(s,r,pan3DP0),u=o.pickEllipsoid(l,r,pan3DP1);if(!defined(c)||!defined(u))return e._rotating=!0,void rotate3D(e,t,i);c=o.worldToCameraCoordinates(c,c),u=o.worldToCameraCoordinates(u,u),defined(o.constrainedAxis)?(n=o.constrainedAxis,s=Cartesian3.mostOrthogonalAxis(n,pan3DTemp0),Cartesian3.cross(s,n,s),Cartesian3.normalize(s,s),l=Cartesian3.cross(n,s,pan3DTemp1),r=Cartesian3.magnitude(c),a=Cartesian3.dot(n,c),e=Math.acos(a/r),t=Cartesian3.multiplyByScalar(n,a,pan3DTemp2),Cartesian3.subtract(c,t,t),Cartesian3.normalize(t,t),i=Cartesian3.magnitude(u),r=Cartesian3.dot(n,u),a=Math.acos(r/i),i=Cartesian3.multiplyByScalar(n,r,pan3DTemp3),Cartesian3.subtract(u,i,i),Cartesian3.normalize(i,i),r=Math.acos(Cartesian3.dot(t,s)),Cartesian3.dot(t,l)<0&&(r=CesiumMath.TWO_PI-r),s=Math.acos(Cartesian3.dot(i,s)),Cartesian3.dot(i,l)<0&&(s=CesiumMath.TWO_PI-s),l=r-s,r=Cartesian3.equalsEpsilon(n,o.position,CesiumMath.EPSILON2)?o.right:Cartesian3.cross(n,o.position,pan3DTemp0),s=Cartesian3.cross(n,r,pan3DTemp0),r=Cartesian3.dot(s,Cartesian3.subtract(c,n,pan3DTemp1)),s=Cartesian3.dot(s,Cartesian3.subtract(u,n,pan3DTemp1)),a=0<r&&0<s?a-e:0<r&&s<=0?0<Cartesian3.dot(o.position,n)?-e-a:e+a:e-a,o.rotateRight(l),o.rotateUp(a)):(Cartesian3.normalize(c,c),Cartesian3.normalize(u,u),a=Cartesian3.dot(c,u),u=Cartesian3.cross(c,u,pan3DTemp0),a<1&&!Cartesian3.equalsEpsilon(u,Cartesian3.ZERO,CesiumMath.EPSILON14)&&(a=Math.acos(a),o.rotate(u,a)))}var zoom3DUnitPosition=new Cartesian3,zoom3DCartographic=new Cartographic;function zoom3D$1(e,t,i){defined(i.distance)&&(i=i.distance);var r,n,a=e._ellipsoid,o=(n=e._scene).camera,s=n.canvas;(n=e._cameraUnderground)?r=t:((r=zoomCVWindowPos).x=s.clientWidth/2,r.y=s.clientHeight/2);var l,c;s=o.getPickRay(r,zoomCVWindowRay);(a=a.cartesianToCartographic(o.position,zoom3DCartographic).height)<e._minimumPickingTerrainHeight&&(l=pickGlobe(e,r,zoomCVIntersection)),defined(l)&&(c=Cartesian3.distance(s.origin,l)),n&&(s=getZoomDistanceUnderground(e,s),c=defined(c)?Math.min(c,s):s),defined(c)||(c=a),a=Cartesian3.normalize(o.position,zoom3DUnitPosition),handleZoom(e,t,i,e._zoomFactor,c,Cartesian3.dot(a,o.direction))}var tilt3DWindowPos=new Cartesian2,tilt3DRay=new Ray,tilt3DCenter=new Cartesian3,tilt3DVerticalCenter=new Cartesian3,tilt3DTransform=new Matrix4,tilt3DVerticalTransform=new Matrix4,tilt3DOldTransform=new Matrix4,tilt3DQuaternion=new Quaternion,tilt3DMatrix=new Matrix3,tilt3DCart=new Cartographic,tilt3DLookUp=new Cartesian3;function tilt3D(e,t,i){var r,n=e._scene.camera;Matrix4.equals(n.transform,Matrix4.IDENTITY)&&(defined(i.angleAndHeight)&&(i=i.angleAndHeight),Cartesian2.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking?(r=e._ellipsoid.geodeticSurfaceNormal(n.position,tilt3DLookUp),look3D(e,t,i,r)):(n=e._ellipsoid.cartesianToCartographic(n.position,tilt3DCart),e._tiltOnEllipsoid||n.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,tilt3DOnEllipsoid(e,t,i)):tilt3DOnTerrain(e,t,i)))}var tilt3DOnEllipsoidCartographic=new Cartographic;function tilt3DOnEllipsoid(e,t,i){var r=e._ellipsoid,n=e._scene,a=n.camera,o=.25*e.minimumZoomDistance,s=r.cartesianToCartographic(a.positionWC,tilt3DOnEllipsoidCartographic).height;if(!(s-o-1<CesiumMath.EPSILON3&&i.endPosition.y-i.startPosition.y<0)){if(o=n.canvas,(n=tilt3DWindowPos).x=o.clientWidth/2,n.y=o.clientHeight/2,o=a.getPickRay(n,tilt3DRay),defined(n=IntersectionTests.rayEllipsoid(o,r)))u=Ray.getPoint(o,n.start,tilt3DCenter);else{if(!(s>e._minimumTrackBallHeight)){e._looking=!0;var l=e._ellipsoid.geodeticSurfaceNormal(a.position,tilt3DLookUp);return look3D(e,t,i,l),void Cartesian2.clone(t,e._tiltCenterMousePosition)}if(!defined(c=IntersectionTests.grazingAltitudeLocation(o,r)))return;(l=r.cartesianToCartographic(c,tilt3DCart)).height=0,u=r.cartographicToCartesian(l,tilt3DCenter)}var c=Transforms.eastNorthUpToFixedFrame(u,r,tilt3DTransform),u=(l=e._globe,e._ellipsoid);e._globe=void 0,e._ellipsoid=Ellipsoid.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1,r=Matrix4.clone(a.transform,tilt3DOldTransform),a._setTransform(c),rotate3D(e,t,i,Cartesian3.UNIT_Z),a._setTransform(r),e._globe=l,u=(e._ellipsoid=u).maximumRadius,e._rotateFactor=1/u,e._rotateRateRangeAdjustment=u}}function tilt3DOnTerrain(e,t,i){var r=e._ellipsoid,n=(u=e._scene).camera,a=e._cameraUnderground;if(Cartesian2.equals(t,e._tiltCenterMousePosition))c=Cartesian3.clone(e._tiltCenter,tilt3DCenter);else{if(!defined(c=pickGlobe(e,t,tilt3DCenter))){var o=n.getPickRay(t,tilt3DRay);if(!defined(l=IntersectionTests.rayEllipsoid(o,r)))return void(r.cartesianToCartographic(n.position,tilt3DCart).height<=e._minimumTrackBallHeight&&(e._looking=!0,d=e._ellipsoid.geodeticSurfaceNormal(n.position,tilt3DLookUp),look3D(e,t,i,d),Cartesian2.clone(t,e._tiltCenterMousePosition)));c=Ray.getPoint(o,l.start,tilt3DCenter)}a&&(defined(o)||(o=n.getPickRay(t,tilt3DRay)),getTiltCenterUnderground(e,o,c,c)),Cartesian2.clone(t,e._tiltCenterMousePosition),Cartesian3.clone(c,e._tiltCenter)}var s=u.canvas;(d=tilt3DWindowPos).x=s.clientWidth/2,d.y=e._tiltCenterMousePosition.y,o=n.getPickRay(d,tilt3DRay);var l,c,u=Cartesian3.magnitude(c),d=(s=Cartesian3.fromElements(u,u,u,scratchRadii$2),Ellipsoid.fromCartesian3(s,scratchEllipsoid$e));defined(l=IntersectionTests.rayEllipsoid(o,d))&&(s=Cartesian3.magnitude(o.origin)>u?l.start:l.stop,u=Ray.getPoint(o,s,tilt3DVerticalCenter),l=Transforms.eastNorthUpToFixedFrame(c,r,tilt3DTransform),o=Transforms.eastNorthUpToFixedFrame(u,d,tilt3DVerticalTransform),s=e._globe,c=e._ellipsoid,e._globe=void 0,e._ellipsoid=Ellipsoid.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1,r=Cartesian3.UNIT_Z,d=Matrix4.clone(n.transform,tilt3DOldTransform),n._setTransform(l),u=Cartesian3.cross(u,n.positionWC,tilt3DCartesian3),u=Cartesian3.dot(n.rightWC,u),rotate3D(e,t,i,r,!1,!0),n._setTransform(o),u<0?(u=i.startPosition.y-i.endPosition.y,(a&&u<0||!a&&0<u)&&(r=void 0),u=n.constrainedAxis,rotate3D(e,t,i,r,!(n.constrainedAxis=void 0),!1),n.constrainedAxis=u):rotate3D(e,t,i,r,!0,!1),defined(n.constrainedAxis)&&(r=Cartesian3.cross(n.direction,n.constrainedAxis,tilt3DCartesian3),Cartesian3.equalsEpsilon(r,Cartesian3.ZERO,CesiumMath.EPSILON6)||(Cartesian3.dot(r,n.right)<0&&Cartesian3.negate(r,r),Cartesian3.cross(r,n.direction,n.up),Cartesian3.cross(n.direction,n.up,n.right),Cartesian3.normalize(n.up,n.up),Cartesian3.normalize(n.right,n.right))),n._setTransform(d),e._globe=s,c=(e._ellipsoid=c).maximumRadius,e._rotateFactor=1/c,e._rotateRateRangeAdjustment=c,c=Cartesian3.clone(n.positionWC,tilt3DCartesian3),e.enableCollisionDetection&&adjustHeightForTerrain(e),Cartesian3.equals(n.positionWC,c)||(n._setTransform(o),n.worldToCameraCoordinatesPoint(c,c),o=Cartesian3.magnitudeSquared(c),Cartesian3.magnitudeSquared(n.position)>o&&(Cartesian3.normalize(n.position,n.position),Cartesian3.multiplyByScalar(n.position,Math.sqrt(o),n.position)),o=Cartesian3.angleBetween(c,n.position),c=Cartesian3.cross(c,n.position,c),Cartesian3.normalize(c,c),o=Quaternion.fromAxisAngle(c,o,tilt3DQuaternion),o=Matrix3.fromQuaternion(o,tilt3DMatrix),Matrix3.multiplyByVector(o,n.direction,n.direction),Matrix3.multiplyByVector(o,n.up,n.up),Cartesian3.cross(n.direction,n.up,n.right),Cartesian3.cross(n.right,n.direction,n.up),n._setTransform(d)))}var look3DStartPos=new Cartesian2,look3DEndPos=new Cartesian2,look3DStartRay=new Ray,look3DEndRay=new Ray,look3DNegativeRot=new Cartesian3,look3DTan=new Cartesian3;function look3D(e,t,i,r){var n=e._scene.camera,a=look3DStartPos;a.x=i.startPosition.x,a.y=0;var o=look3DEndPos;o.x=i.endPosition.x,o.y=0;var s=n.getPickRay(a,look3DStartRay),l=n.getPickRay(o,look3DEndRay),c=0;n.frustum instanceof OrthographicFrustum?(h=s.origin,d=l.origin,Cartesian3.add(n.direction,h,h),Cartesian3.add(n.direction,d,d),Cartesian3.subtract(h,n.position,h),Cartesian3.subtract(d,n.position,d),Cartesian3.normalize(h,h),Cartesian3.normalize(d,d)):(h=s.direction,d=l.direction);var u=Cartesian3.dot(h,d);u<1&&(c=Math.acos(u)),c=i.startPosition.x>i.endPosition.x?-c:c;var d,h;e=e._horizontalRotationAxis;defined(r)?n.look(r,-c):defined(e)?n.look(e,-c):n.lookLeft(c),a.x=0,a.y=i.startPosition.y,o.x=0,o.y=i.endPosition.y,s=n.getPickRay(a,look3DStartRay),l=n.getPickRay(o,look3DEndRay),c=0,n.frustum instanceof OrthographicFrustum?(h=s.origin,d=l.origin,Cartesian3.add(n.direction,h,h),Cartesian3.add(n.direction,d,d),Cartesian3.subtract(h,n.position,h),Cartesian3.subtract(d,n.position,d),Cartesian3.normalize(h,h),Cartesian3.normalize(d,d)):(h=s.direction,d=l.direction),(u=Cartesian3.dot(h,d))<1&&(c=Math.acos(u)),c=i.startPosition.y>i.endPosition.y?-c:c,defined(r=defaultValue(r,e))?(h=n.direction,d=Cartesian3.negate(r,look3DNegativeRot),i=Cartesian3.equalsEpsilon(h,r,CesiumMath.EPSILON2),e=Cartesian3.equalsEpsilon(h,d,CesiumMath.EPSILON2),i||e?(i&&c<0||e&&0<c)&&n.look(n.right,-c):(u=Cartesian3.dot(h,r),e=CesiumMath.acosClamped(u),0<c&&e<c&&(c=e-CesiumMath.EPSILON4),u=Cartesian3.dot(h,d),e=CesiumMath.acosClamped(u),c<0&&e<-c&&(c=-e+CesiumMath.EPSILON4),h=Cartesian3.cross(r,h,look3DTan),n.look(h,c))):n.lookUp(c)}function update3D(e){reactToInput(e,e.enableRotate,e.rotateEventTypes,spin3D,e.inertiaSpin,"_lastInertiaSpinMovement"),reactToInput(e,e.enableZoom,e.zoomEventTypes,zoom3D$1,e.inertiaZoom,"_lastInertiaZoomMovement"),reactToInput(e,e.enableTilt,e.tiltEventTypes,tilt3D,e.inertiaSpin,"_lastInertiaTiltMovement"),reactToInput(e,e.enableLook,e.lookEventTypes,look3D)}var scratchAdjustHeightTransform=new Matrix4,scratchAdjustHeightCartographic=new Cartographic;function adjustHeightForTerrain(e){e._adjustedHeightForTerrain=!0;var t,i,r,n,a,o,s=e._scene,l=s.mode,c=s.globe;defined(c)&&l!==SceneMode$1.SCENE2D&&l!==SceneMode$1.MORPHING&&(t=s.camera,i=c.ellipsoid,r=s.mapProjection,Matrix4.equals(t.transform,Matrix4.IDENTITY)||(n=Matrix4.clone(t.transform,scratchAdjustHeightTransform),a=Cartesian3.magnitude(t.position),t._setTransform(Matrix4.IDENTITY)),o=scratchAdjustHeightCartographic,l===SceneMode$1.SCENE3D?i.cartesianToCartographic(t.position,o):r.unproject(t.position,o),c=!1,o.height<e._minimumCollisionTerrainHeight&&defined(s=e._scene.globeHeight)&&(s+=e.minimumZoomDistance,o.height<s&&(o.height=s,l===SceneMode$1.SCENE3D?i.cartographicToCartesian(o,t.position):r.project(o,t.position),c=!0)),defined(n)&&(t._setTransform(n),c&&(Cartesian3.normalize(t.position,t.position),Cartesian3.negate(t.position,t.direction),Cartesian3.multiplyByScalar(t.position,Math.max(a,e.minimumZoomDistance),t.position),Cartesian3.normalize(t.direction,t.direction),Cartesian3.cross(t.direction,t.up,t.right),Cartesian3.cross(t.right,t.direction,t.up))))}ScreenSpaceCameraController.prototype.onMap=function(){var e=(t=this._scene).mode,t=t.camera;return e!==SceneMode$1.COLUMBUS_VIEW||Math.abs(t.position.x)-this._maxCoord.x<0&&Math.abs(t.position.y)-this._maxCoord.y<0};var scratchPreviousPosition=new Cartesian3,scratchPreviousDirection=new Cartesian3;ScreenSpaceCameraController.prototype.update=function(){var e=this._scene,t=e.camera,i=e.globe,r=e.mode;Matrix4.equals(t.transform,Matrix4.IDENTITY)?(this._globe=i,this._ellipsoid=(defined(this._globe)?this._globe:e.mapProjection).ellipsoid):(this._globe=void 0,this._ellipsoid=Ellipsoid.UNIT_SPHERE),this._cameraUnderground=e.cameraUnderground&&defined(this._globe),this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight*e.terrainExaggeration,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight*e.terrainExaggeration,this._minimumTrackBallHeight=this.minimumTrackBallHeight*e.terrainExaggeration,i=this._ellipsoid.maximumRadius,this._rotateFactor=1/i,this._rotateRateRangeAdjustment=i,this._adjustedHeightForTerrain=!1,e=Cartesian3.clone(t.positionWC,scratchPreviousPosition),i=Cartesian3.clone(t.directionWC,scratchPreviousDirection),r===SceneMode$1.SCENE2D?update2D(this):r===SceneMode$1.COLUMBUS_VIEW?(this._horizontalRotationAxis=Cartesian3.UNIT_Z,updateCV(this)):r===SceneMode$1.SCENE3D&&(this._horizontalRotationAxis=void 0,update3D(this)),!this.enableCollisionDetection||this._adjustedHeightForTerrain||Cartesian3.equals(e,t.positionWC)&&Cartesian3.equals(i,t.directionWC)||adjustHeightForTerrain(this),this._aggregator.reset()},ScreenSpaceCameraController.prototype.isDestroyed=function(){return!1},ScreenSpaceCameraController.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),destroyObject(this)};var AdditiveBlend="uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\nuniform vec2 center;\nuniform float radius;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color0 = texture2D(colorTexture, v_textureCoordinates);\nvec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\nfloat x = length(gl_FragCoord.xy - center) / radius;\nfloat t = smoothstep(0.5, 0.8, x);\ngl_FragColor = mix(color0 + color1, color1, t);\n}\n",BrightPass="uniform sampler2D colorTexture;\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\nvarying vec2 v_textureCoordinates;\nfloat key(float avg)\n{\nfloat guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\nreturn max(0.0, guess) + 0.1;\n}\nvoid main()\n{\nvec4 color = texture2D(colorTexture, v_textureCoordinates);\nvec3 xyz = czm_RGBToXYZ(color.rgb);\nfloat luminance = xyz.r;\nfloat scaledLum = key(avgLuminance) * luminance / avgLuminance;\nfloat brightLum = max(scaledLum - threshold, 0.0);\nfloat brightness = brightLum / (offset + brightLum);\nxyz.r = brightness;\ngl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n";function SunPostProcess(){this._sceneFramebuffer=new SceneFramebuffer;var e=new Array(6);e[0]=new PostProcessStage({fragmentShader:PassThrough,textureScale:.125,forcePowerOfTwo:!0,sampleMode:PostProcessStageSampleMode.LINEAR});var t=e[1]=new PostProcessStage({fragmentShader:BrightPass,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:.125,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new Cartesian2,e[2]=new PostProcessStage({fragmentShader:GaussianBlur1D,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/t.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:.125,forcePowerOfTwo:!0}),e[3]=new PostProcessStage({fragmentShader:GaussianBlur1D,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/t.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:.125,forcePowerOfTwo:!0}),e[4]=new PostProcessStage({fragmentShader:PassThrough,sampleMode:PostProcessStageSampleMode.LINEAR}),this._uCenter=new Cartesian2,this._uRadius=void 0,e[5]=new PostProcessStage({fragmentShader:AdditiveBlend,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.getFramebuffer().getColorTexture(0)}}}),this._stages=new PostProcessStageComposite({stages:e});for(var r=new PostProcessStageTextureCache(this),n=e.length,a=0;a<n;++a)e[a]._textureCache=r;this._textureCache=r,this.length=e.length}SunPostProcess.prototype.get=function(e){return this._stages.get(e)},SunPostProcess.prototype.getStageByName=function(e){for(var t=this._stages.length,i=0;i<t;++i){var r=this._stages.get(i);if(r.name===e)return r}};var sunPositionECScratch=new Cartesian4,sunPositionWCScratch=new Cartesian2,sizeScratch=new Cartesian2,postProcessMatrix4Scratch=new Matrix4;function updateSunPosition(e,t,i){var r=(u=t.uniformState).sunPositionWC,n=u.view,a=u.viewProjection,o=u.projection,s=Matrix4.computeViewportTransformation(i,0,1,postProcessMatrix4Scratch),l=Matrix4.multiplyByPoint(n,r,sunPositionECScratch),c=Transforms.pointToGLWindowCoordinates(a,s,r,sunPositionWCScratch);l.x+=CesiumMath.SOLAR_RADIUS,u=Transforms.pointToGLWindowCoordinates(o,s,l,l),i=30*Cartesian2.magnitude(Cartesian2.subtract(u,c,u))*2,(n=sizeScratch).x=i,n.y=i,e._uCenter=Cartesian2.clone(c,e._uCenter),e._uRadius=.15*Math.max(n.x,n.y);o=t.drawingBufferWidth,l=t.drawingBufferHeight;var u,d=e._stages;i=(u=d.get(0)).outputTexture.width,t=u.outputTexture.height;(e=new BoundingRectangle).width=i,e.height=t,s=Matrix4.computeViewportTransformation(e,0,1,postProcessMatrix4Scratch),c=Transforms.pointToGLWindowCoordinates(a,s,r,sunPositionWCScratch),n.x*=i/o,n.y*=t/l;var h=u.scissorRectangle;h.x=Math.max(c.x-.5*n.x,0),h.y=Math.max(c.y-.5*n.y,0),h.width=Math.min(n.x,o),h.height=Math.min(n.y,l);for(var p=1;p<4;++p)BoundingRectangle.clone(h,d.get(p).scissorRectangle)}SunPostProcess.prototype.clear=function(e,t,i){this._sceneFramebuffer.clear(e,t,i),this._textureCache.clear(e)},SunPostProcess.prototype.update=function(e){var t=e.context,i=e.viewport;return(e=this._sceneFramebuffer).update(t,i),e=e.getFramebuffer(),this._textureCache.update(t),this._stages.update(t,!1),updateSunPosition(this,t,i),e},SunPostProcess.prototype.execute=function(e){var t=this._sceneFramebuffer.getFramebuffer().getColorTexture(0),i=this._stages,r=i.length;i.get(0).execute(e,t);for(var n=1;n<r;++n)i.get(n).execute(e,i.get(n-1).outputTexture)},SunPostProcess.prototype.copy=function(e,t){var i;defined(this._copyColorCommand)||((i=this)._copyColorCommand=e.createViewportQuadCommand(PassThrough,{uniformMap:{colorTexture:function(){return i._stages.get(i._stages.length-1).outputTexture}},owner:this})),this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},SunPostProcess.prototype.isDestroyed=function(){return!1},SunPostProcess.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),destroyObject(this)};var requestRenderAfterFrame=function(e){return function(){e.frameState.afterRender.push((function(){e.requestRender()}))}};function Scene(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).canvas,i=e.creditContainer,r=e.creditViewport;defined(a=clone(e.contextOptions))||(a={}),defined(a.webgl)||(a.webgl={}),a.webgl.powerPreference=defaultValue(a.webgl.powerPreference,"high-performance");var n=defined(i),a=new Context(t,a);n||((i=document.createElement("div")).style.position="absolute",i.style.bottom="0",i.style["text-shadow"]="0 0 2px #000000",i.style.color="#ffffff",i.style["font-size"]="10px",i.style["padding-right"]="5px",t.parentNode.appendChild(i)),defined(r)||(r=t.parentNode),this._id=createGuid(),this._jobScheduler=new JobScheduler,this._frameState=new FrameState(a,new CreditDisplay(i," • ",r),this._jobScheduler),this._frameState.scene3DOnly=defaultValue(e.scene3DOnly,!1),this._removeCreditContainer=!n,this._creditContainer=i,this._canvas=t,this._context=a,this._computeEngine=new ComputeEngine(a),this._globe=void 0,this._globeTranslucencyState=new GlobeTranslucencyState,this._primitives=new PrimitiveCollection,this._groundPrimitives=new PrimitiveCollection,this._globeHeight=void 0,this._cameraUnderground=!1,this._logDepthBuffer=a.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new TweenCollection,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=defaultValue(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new DepthPlane,this._clearColorCommand=new ClearCommand({color:new Color,stencil:0,owner:this}),this._depthClearCommand=new ClearCommand({depth:1,owner:this}),this._stencilClearCommand=new ClearCommand({stencil:0}),this._classificationStencilClearCommand=new ClearCommand({stencil:0,renderState:RenderState.fromCache({stencilMask:StencilConstants$1.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new SceneTransitioner(this),this._preUpdate=new Event,this._postUpdate=new Event,this._renderError=new Event,this._preRender=new Event,this._postRender=new Event,this._minimumDisableDepthTestDistance=0,this._debugInspector=new DebugInspector,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new Event,this.morphComplete=new Event,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=Color.clone(Color.BLACK),this._mode=SceneMode$1.SCENE3D,this._mapProjection=defined(e.mapProjection)?e.mapProjection:new GeographicProjection,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowGlobeDepth=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new Fog,this._shadowMapCamera=new Camera(this),this.shadowMap=new ShadowMap({context:a,lightCamera:this._shadowMapCamera,enabled:defaultValue(e.shadows,!1)}),this.invertClassification=!1,this.invertClassificationColor=Color.clone(Color.WHITE),this._actualInvertClassificationColor=Color.clone(this._invertClassificationColor),this._invertClassification=new InvertClassification,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new PostProcessStageCollection,this._brdfLutGenerator=new BrdfLutGenerator,this._terrainExaggeration=defaultValue(e.terrainExaggeration,1),this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new ScreenSpaceCameraController(this),this._cameraUnderground=!1,this._mapMode2D=defaultValue(e.mapMode2D,MapMode2D$1.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,separatePrimitiveFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=defaultValue(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=defaultValue(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=RequestScheduler.requestCompletedEvent.addEventListener(requestRenderAfterFrame(this)),this._removeTaskProcessorListenerCallback=TaskProcessor.taskCompletedEvent.addEventListener(requestRenderAfterFrame(this)),this._removeGlobeCallbacks=[],e=new BoundingRectangle(0,0,a.drawingBufferWidth,a.drawingBufferHeight),a=new Camera(this),this._logDepthBuffer&&(a.frustum.near=.1,a.frustum.far=1e10),this.preloadFlightCamera=new Camera(this),this.preloadFlightCullingVolume=void 0,this._picking=new Picking(this),this._defaultView=new View(this,a,e),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this.light=new SunLight,updateFrameNumber(this,0,JulianDate.now()),this.updateFrameState(),this.initializeFrame()}function updateGlobeListeners(e,t){for(var i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;var r=[];defined(t)&&(r.push(t.imageryLayersUpdatedEvent.addEventListener(requestRenderAfterFrame(e))),r.push(t.terrainProviderChanged.addEventListener(requestRenderAfterFrame(e)))),e._removeGlobeCallbacks=r}function updateDerivedCommands$1(e,t,i){var r=e._frameState,n=e._context,a=e._view.oit,o=r.shadowState.lightShadowMaps,s=r.shadowState.lightShadowsEnabled;r=t.derivedCommands;defined(t.pickId)&&(r.picking=DerivedCommand.createPickDerivedCommand(e,t,n,r.picking)),t.pickOnly||(r.depth=DerivedCommand.createDepthOnlyDerivedCommand(e,t,n,r.depth)),r.originalCommand=t,e._hdr&&(r.hdr=DerivedCommand.createHdrCommand(t,n,r.hdr),r=(t=r.hdr.command).derivedCommands),s&&t.receiveShadows&&(r.shadows=ShadowMap.createReceiveDerivedCommand(o,t,i,n,r.shadows)),t.pass===Pass$1.TRANSLUCENT&&defined(a)&&a.isSupported()&&(s&&t.receiveShadows?(r.oit=defined(r.oit)?r.oit:{},r.oit.shadows=a.createDerivedCommands(r.shadows.receiveCommand,n,r.oit.shadows)):r.oit=a.createDerivedCommands(t,n,r.oit))}Object.defineProperties(Scene.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return ContextLimits.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return ContextLimits.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return OctahedralProjectedCubeMap.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,updateGlobeListeners(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(defined(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(defined(this.globe))return this.globe.terrainProvider},set:function(e){defined(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(defined(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){e===SceneMode$1.SCENE2D?this.morphTo2D(0):e===SceneMode$1.SCENE3D?this.morphTo3D(0):e===SceneMode$1.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},terrainExaggeration:{get:function(){return this._terrainExaggeration}},useWebVR:{get:function(){return this._useWebVR},set:function(e){this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new Camera(this),defined(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new DeviceOrientationCameraController(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},imagerySplitPosition:{get:function(){return this._frameState.imagerySplitPosition},set:function(e){this._frameState.imagerySplitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){var t=this._context;t=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=t!==this._hdr,this._hdr=t}},highDynamicRangeSupported:{get:function(){var e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return.9999}},globeHeight:{get:function(){return this._globeHeight}}}),Scene.prototype.getCompressedTextureFormatSupported=function(e){var t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1},Scene.prototype.updateDerivedCommands=function(e){var t,i,r,n,a,o,s,l,c,u;defined(e.derivedCommands)&&(t=this._frameState,i=this._context,r=!1,l=t.shadowState.lastDirtyTime,e.lastDirtyTime!==l&&(e.lastDirtyTime=l,r=e.dirty=!0),n=t.useLogDepth,c=this._hdr,o=defined((a=e.derivedCommands).logDepth),u=defined(a.hdr),s=defined(a.originalCommand),l=n&&!o,u=c&&!u,c=!(n&&c||s),e.dirty=e.dirty||l||u||c,e.dirty&&(e.dirty=!1,u=t.shadowState.shadowMaps,t.shadowState.shadowsEnabled&&e.castShadows&&(a.shadows=ShadowMap.createCastDerivedCommand(u,e,r,i,a.shadows)),(o||l)&&(a.logDepth=DerivedCommand.createLogDepthCommand(e,i,a.logDepth),updateDerivedCommands$1(this,a.logDepth.command,r)),(s||c)&&updateDerivedCommands$1(this,e,r)))};var renderTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.RENDER}),preloadTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.PRELOAD}),preloadFlightTilesetPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.PRELOAD_FLIGHT}),requestRenderModeDeferCheckPassState=new Cesium3DTilePassState({pass:Cesium3DTilePass$1.REQUEST_RENDER_MODE_DEFER_CHECK}),scratchOccluderBoundingSphere=new BoundingSphere,scratchOccluder;function getOccluder(e){var t=e.globe;if(e._mode===SceneMode$1.SCENE3D&&defined(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){var i=t.ellipsoid;t=e.frameState.minimumTerrainHeight;return scratchOccluderBoundingSphere.radius=i.minimumRadius+t,scratchOccluder=Occluder.fromBoundingSphere(scratchOccluderBoundingSphere,e.camera.positionWC,scratchOccluder)}}function updateFrameNumber(e,t,i){(e=e._frameState).frameNumber=t,e.time=JulianDate.clone(i,e.time)}Scene.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1},Scene.prototype.updateFrameState=function(){var e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=getOccluder(this),t.terrainExaggeration=this._terrainExaggeration,t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof OrthographicFrustum||this.camera.frustum instanceof OrthographicOffCenterFrustum),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState,defined(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready?(t.specularEnvironmentMaps=this._specularEnvironmentMapAtlas.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentMapAtlas.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=Color.clone(this.invertClassificationColor,this._actualInvertClassificationColor),InvertClassification.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,defined(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0},Scene.prototype.isVisible=function(e,t,i){return defined(e)&&(!defined(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==Intersect$1.OUTSIDE&&(!defined(i)||!e.occlude||!e.boundingVolume.isOccluded(i)))};var transformFrom2D=new Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function debugShowBoundingVolume(e,t,i,r){var n=t._frameState,a=n.context,o=e.boundingVolume;defined(t._debugVolume)&&t._debugVolume.destroy();var s,l,c,u=Cartesian3.clone(o.center);n.mode!==SceneMode$1.SCENE3D&&(u=Matrix4.multiplyByPoint(transformFrom2D,u,u),l=(s=n.mapProjection).unproject(u),u=s.ellipsoid.cartographicToCartesian(l)),defined(o.radius)?(c=o.radius,c=GeometryPipeline.toWireframe(EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new Cartesian3(c,c,c),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:c,modelMatrix:Matrix4.fromTranslation(u),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1})):(h=o.halfAxes,c=GeometryPipeline.toWireframe(BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2),vertexFormat:PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}))),t._debugVolume=new Primitive({geometryInstances:new GeometryInstance({geometry:c,modelMatrix:Matrix4.fromRotationTranslation(h,u,new Matrix4),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)}}),appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1}),asynchronous:!1}));var d,h=n.commandList;u=n.commandList=[];t._debugVolume.update(n),e=u[0],n.useLogDepth&&(e=DerivedCommand.createLogDepthCommand(e,a).command),defined(r)&&(d=i.framebuffer,i.framebuffer=r),e.execute(a,i),defined(d)&&(i.framebuffer=d),n.commandList=h}function executeCommand(e,t,i,r,n){var a=t._frameState;if(!defined(t.debugCommandFilter)||t.debugCommandFilter(e))if(e instanceof ClearCommand)e.execute(i,r);else{if(e.debugShowBoundingVolume&&defined(e.boundingVolume)&&debugShowBoundingVolume(e,t,r,n),a.useLogDepth&&defined(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command),!(n=a.passes).pick&&!n.depth&&t._hdr&&defined(e.derivedCommands)&&defined(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),n.pick||n.depth){if(n.pick&&!n.depth&&defined(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(i,r);if(defined(e.derivedCommands.depth))return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(i,r)}t.debugShowCommands||t.debugShowFrustums?t._debugInspector.executeDebugShowFrustumsCommand(t,e,r):(a.shadowState.lightShadowsEnabled&&e.receiveShadows&&defined(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand:e).execute(i,r)}}function executeIdCommand(e,t,i,r){var n=t._frameState;defined(t=e.derivedCommands)&&(n.useLogDepth&&defined(t.logDepth)&&(e=t.logDepth.command),defined((t=e.derivedCommands).picking)?(e=t.picking.pickCommand).execute(i,r):defined(t.depth)&&(e=t.depth.depthOnlyCommand).execute(i,r))}function backToFront(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function frontToBack(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+CesiumMath.EPSILON12}function executeTranslucentCommandsBackToFront(e,t,i,r,n){var a=e.context;mergeSort(r,backToFront,e.camera.positionWC),defined(n)&&t(n.unclassifiedCommand,e,a,i);for(var o=r.length,s=0;s<o;++s)t(r[s],e,a,i)}function executeTranslucentCommandsFrontToBack(e,t,i,r,n){var a=e.context;mergeSort(r,frontToBack,e.camera.positionWC),defined(n)&&t(n.unclassifiedCommand,e,a,i);for(var o=r.length,s=0;s<o;++s)t(r[s],e,a,i)}function getDebugGlobeDepth(e,t){var i=e._view.debugGlobeDepths,r=i[t];return!defined(r)&&e.context.depthTexture&&(r=new GlobeDepth,i[t]=r),r}transformFrom2D=Matrix4.inverseTransformation(transformFrom2D,transformFrom2D);var scratchPerspectiveFrustum$1=new PerspectiveFrustum,scratchPerspectiveOffCenterFrustum$1=new PerspectiveOffCenterFrustum,scratchOrthographicFrustum$1=new OrthographicFrustum,scratchOrthographicOffCenterFrustum$1=new OrthographicOffCenterFrustum;function executeCommands$1(e,t){var i,r=e.camera,n=e.context,a=e.frameState,o=n.uniformState;o.updateCamera(r),(i=defined(r.frustum.fov)?r.frustum.clone(scratchPerspectiveFrustum$1):defined(r.frustum.infiniteProjectionMatrix)?r.frustum.clone(scratchPerspectiveOffCenterFrustum$1):defined(r.frustum.width)?r.frustum.clone(scratchOrthographicFrustum$1):r.frustum.clone(scratchOrthographicOffCenterFrustum$1)).near=r.frustum.near,i.far=r.frustum.far,o.updateFrustum(i),o.updatePass(Pass$1.ENVIRONMENT);var s,l,c=a.passes,u=c.pick,d=e._environmentState,h=e._view,p=d.renderTranslucentDepthForPick,f=d.useWebVR;u||(defined(s=d.skyBoxCommand)&&executeCommand(s,e,n,t),d.isSkyAtmosphereVisible&&executeCommand(d.skyAtmosphereCommand,e,n,t),d.isSunVisible&&(d.sunDrawCommand.execute(n,t),e.sunBloom&&!f&&(f=d.useGlobeDepthFramebuffer?h.globeDepth.framebuffer:d.usePostProcess?h.sceneFramebuffer.getFramebuffer():d.originalFramebuffer,e._sunPostProcess.execute(n),e._sunPostProcess.copy(n,f),t.framebuffer=f)),d.isMoonVisible&&d.moonCommand.execute(n,t)),l=d.useOIT?(defined(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,r,n){h.oit.executeCommands(e,t,i,r,n)}),e._executeOITFunction):c.render?executeTranslucentCommandsBackToFront:executeTranslucentCommandsFrontToBack;for(var m,g=h.frustumCommandsList,y=g.length,_=d.clearGlobeDepth,v=d.useDepthPlane,C=e._globeTranslucencyState,x=C.translucent,b=e._view.globeTranslucencyFramebuffer,S=(d.separatePrimitiveFramebuffer=!1,e._depthClearCommand),T=e._stencilClearCommand,E=e._classificationStencilClearCommand,w=e._depthPlane,A=d.usePostProcessSelected,P=r.position.z,D=0;D<y;++D){var M=y-D-1,I=g[M];e.mode===SceneMode$1.SCENE2D?(r.position.z=P-I.near+1,i.far=Math.max(1,I.far-I.near),i.near=1,o.update(a)):(i.near=0!=M?I.near*e.opaqueFrustumNearOffset:I.near,i.far=I.far),o.updateFrustum(i);var R,O=e.debugShowGlobeDepth?getDebugGlobeDepth(e,M):h.globeDepth;e.debugShowGlobeDepth&&defined(O)&&d.useGlobeDepthFramebuffer&&(O.update(n,t,h.viewport,e._hdr,_),O.clear(n,t,e._clearColorCommand.color),R=t.framebuffer,t.framebuffer=O.framebuffer),S.execute(n,t),n.stencilBuffer&&T.execute(n,t),o.updatePass(Pass$1.GLOBE);var L,N=I.commands[Pass$1.GLOBE],F=I.indices[Pass$1.GLOBE];if(x)C.executeGlobeCommands(I,executeCommand,b,e,t);else for(m=0;m<F;++m)executeCommand(N[m],e,n,t);if(defined(O)&&d.useGlobeDepthFramebuffer&&O.executeCopyDepth(n,t),e.debugShowGlobeDepth&&defined(O)&&d.useGlobeDepthFramebuffer&&(t.framebuffer=R),!d.renderTranslucentDepthForPick)if(o.updatePass(Pass$1.TERRAIN_CLASSIFICATION),N=I.commands[Pass$1.TERRAIN_CLASSIFICATION],F=I.indices[Pass$1.TERRAIN_CLASSIFICATION],x)C.executeGlobeClassificationCommands(I,executeCommand,b,e,t);else for(m=0;m<F;++m)executeCommand(N[m],e,n,t);if(_&&(S.execute(n,t),v&&w.execute(n,t)),!d.useInvertClassification||u||d.renderTranslucentDepthForPick){for(o.updatePass(Pass$1.CESIUM_3D_TILE),N=I.commands[Pass$1.CESIUM_3D_TILE],F=I.indices[Pass$1.CESIUM_3D_TILE],m=0;m<F;++m)executeCommand(N[m],e,n,t);if(0<F&&(defined(O)&&d.useGlobeDepthFramebuffer&&O.executeUpdateDepth(n,t,_),!d.renderTranslucentDepthForPick))for(o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION),N=I.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION],F=I.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION],m=0;m<F;++m)executeCommand(N[m],e,n,t)}else{e._invertClassification.clear(n,t);var B=t.framebuffer;for(t.framebuffer=e._invertClassification._fbo,o.updatePass(Pass$1.CESIUM_3D_TILE),N=I.commands[Pass$1.CESIUM_3D_TILE],F=I.indices[Pass$1.CESIUM_3D_TILE],m=0;m<F;++m)executeCommand(N[m],e,n,t);for(defined(O)&&d.useGlobeDepthFramebuffer&&O.executeUpdateDepth(n,t,_),o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),N=I.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],F=I.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],m=0;m<F;++m)executeCommand(N[m],e,n,t);for(t.framebuffer=B,e._invertClassification.executeClassified(n,t),1===a.invertClassificationColor.alpha&&e._invertClassification.executeUnclassified(n,t),0<F&&n.stencilBuffer&&E.execute(n,t),o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION),N=I.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION],F=I.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION],m=0;m<F;++m)executeCommand(N[m],e,n,t)}for(0<F&&n.stencilBuffer&&T.execute(n,t),o.updatePass(Pass$1.OPAQUE),N=I.commands[Pass$1.OPAQUE],F=I.indices[Pass$1.OPAQUE],m=0;m<F;++m)executeCommand(N[m],e,n,t);if(0!=M&&e.mode!==SceneMode$1.SCENE2D&&(i.near=I.near,o.updateFrustum(i)),!u&&d.useInvertClassification&&a.invertClassificationColor.alpha<1&&(L=e._invertClassification),o.updatePass(Pass$1.TRANSLUCENT),(N=I.commands[Pass$1.TRANSLUCENT]).length=I.indices[Pass$1.TRANSLUCENT],l(e,executeCommand,t,N,L),n.depthTexture&&e.useDepthPicking&&(d.useGlobeDepthFramebuffer||p)&&(O=(p?t:O).framebuffer.depthStencilTexture,(V=e._picking.getPickDepth(e,M)).update(n,O),V.executeCopyDepth(n,t)),!u&&A){var V=t.framebuffer;if(t.framebuffer=h.sceneFramebuffer.getIdFramebuffer(),i.near=0!=M?I.near*e.opaqueFrustumNearOffset:I.near,i.far=I.far,o.updateFrustum(i),o.updatePass(Pass$1.GLOBE),N=I.commands[Pass$1.GLOBE],F=I.indices[Pass$1.GLOBE],x)C.executeGlobeCommands(I,executeIdCommand,b,e,t);else for(m=0;m<F;++m)executeIdCommand(N[m],e,n,t);for(_&&(S.framebuffer=t.framebuffer,S.execute(n,t),S.framebuffer=void 0),_&&v&&w.execute(n,t),o.updatePass(Pass$1.CESIUM_3D_TILE),N=I.commands[Pass$1.CESIUM_3D_TILE],F=I.indices[Pass$1.CESIUM_3D_TILE],m=0;m<F;++m)executeIdCommand(N[m],e,n,t);for(o.updatePass(Pass$1.OPAQUE),N=I.commands[Pass$1.OPAQUE],F=I.indices[Pass$1.OPAQUE],m=0;m<F;++m)executeIdCommand(N[m],e,n,t);for(o.updatePass(Pass$1.TRANSLUCENT),N=I.commands[Pass$1.TRANSLUCENT],F=I.indices[Pass$1.TRANSLUCENT],m=0;m<F;++m)executeIdCommand(N[m],e,n,t);t.framebuffer=V}}}function executeComputeCommands(e){e.context.uniformState.updatePass(Pass$1.COMPUTE);var t=e._environmentState.sunComputeCommand;defined(t)&&t.execute(e._computeEngine);for(var i=e._computeCommandList,r=i.length,n=0;n<r;++n)i[n].execute(e._computeEngine)}function executeOverlayCommands(e,t){e.context.uniformState.updatePass(Pass$1.OVERLAY);for(var i=e.context,r=e._overlayCommandList,n=r.length,a=0;a<n;++a)r[a].execute(i,t)}function insertShadowCastCommands(e,t,i){for(var r=i.shadowMapCullingVolume,n=i.isPointLight,a=i.passes,o=a.length,s=t.length,l=0;l<s;++l){var c=t[l];if(e.updateDerivedCommands(c),c.castShadows&&(c.pass===Pass$1.GLOBE||c.pass===Pass$1.CESIUM_3D_TILE||c.pass===Pass$1.OPAQUE||c.pass===Pass$1.TRANSLUCENT)&&e.isVisible(c,r))if(n)for(var u=0;u<o;++u)a[u].commandList.push(c);else if(1===o)a[0].commandList.push(c);else for(var d=!1,h=o-1;0<=h;--h){var p=a[h].cullingVolume;if(e.isVisible(c,p))a[h].commandList.push(c),d=!0;else if(d)break}}}function executeShadowMapCastCommands(e){var t=e.frameState,i=t.shadowState.shadowMaps,r=i.length;if(t.shadowState.shadowsEnabled)for(var n=e.context,a=n.uniformState,o=0;o<r;++o){var s=i[o];if(!s.outOfView){for(var l=s.passes,c=l.length,u=0;u<c;++u)l[u].commandList.length=0;for(insertShadowCastCommands(e,e.frameState.commandList,s),u=0;u<c;++u){var d=s.passes[u];a.updateCamera(d.camera),s.updatePass(n,u);for(var h=d.commandList.length,p=0;p<h;++p){var f=d.commandList[p];a.updatePass(f.pass),executeCommand(f.derivedCommands.shadows.castCommands[o],e,n,d.passState)}}}}}var scratchEyeTranslation=new Cartesian3;function executeWebVRCommands(e,t,i){var r=(l=e._view).camera,n=e._environmentState.renderTranslucentDepthForPick;updateAndClearFramebuffers(e,t,i),n||updateAndRenderPrimitives(e),l.createPotentiallyVisibleSet(e),n||(executeComputeCommands(e),executeShadowMapCastCommands(e));var a=t.viewport;a.x=0,a.y=0,a.width=.5*a.width;var o=Camera.clone(r,e._cameraVR);o.frustum=r.frustum;var s=r.frustum.near,l=(i=s*defaultValue(e.focalLength,5),defaultValue(e.eyeSeparation,i/30));n=Cartesian3.multiplyByScalar(o.right,.5*l,scratchEyeTranslation);r.frustum.aspectRatio=a.width/a.height,i=.5*l*s/i,Cartesian3.add(o.position,n,r.position),r.frustum.xOffset=i,executeCommands$1(e,t),a.x=a.width,Cartesian3.subtract(o.position,n,r.position),r.frustum.xOffset=-i,executeCommands$1(e,t),Camera.clone(o,r)}Scene.prototype.updateAndExecuteCommands=function(e,t){var i=this._frameState.mode;this._environmentState.useWebVR?executeWebVRCommands(this,e,t):i!==SceneMode$1.SCENE2D||this._mapMode2D===MapMode2D$1.ROTATE?executeCommandsInViewport(!0,this,e,t):(updateAndClearFramebuffers(this,e,t),execute2DViewportCommands(this,e))};var scratch2DViewportCartographic=new Cartographic(Math.PI,CesiumMath.PI_OVER_TWO),scratch2DViewportMaxCoord=new Cartesian3,scratch2DViewportSavedPosition=new Cartesian3,scratch2DViewportTransform=new Matrix4,scratch2DViewportCameraTransform=new Matrix4,scratch2DViewportEyePoint=new Cartesian3,scratch2DViewportWindowCoords=new Cartesian3,scratch2DViewport=new BoundingRectangle;function execute2DViewportCommands(e,t){var i=e.context,r=e.frameState,n=e.camera,a=t.viewport,o=BoundingRectangle.clone(a,scratch2DViewport);t.viewport=o;var s=scratch2DViewportMaxCoord;e.mapProjection.project(scratch2DViewportCartographic,s);var l=Cartesian3.clone(n.position,scratch2DViewportSavedPosition),c=Matrix4.clone(n.transform,scratch2DViewportCameraTransform),u=n.frustum.clone();n._setTransform(Matrix4.IDENTITY);var d=Matrix4.computeViewportTransformation(o,0,1,scratch2DViewportTransform),h=n.frustum.projectionMatrix,p=n.positionWC.y,f=Cartesian3.fromElements(CesiumMath.sign(p)*s.x-p,0,-n.positionWC.x,scratch2DViewportEyePoint),m=Transforms.pointToGLWindowCoordinates(h,d,f,scratch2DViewportWindowCoords);m.x=Math.floor(m.x),h=o.x,d=o.width,0===p||m.x<=h||m.x>=h+d?executeCommandsInViewport(!0,e,t):(Math.abs(h+.5*d-m.x)<1?(o.width=m.x-o.x,n.position.x*=CesiumMath.sign(n.position.x),n.frustum.right=0,r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),i.uniformState.update(r),executeCommandsInViewport(!0,e,t),o.x=m.x,n.position.x=-n.position.x,n.frustum.right=-n.frustum.left,n.frustum.left=0):m.x>h+.5*d?(o.width=m.x-h,f=n.frustum.right,n.frustum.right=s.x-p,r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),i.uniformState.update(r),executeCommandsInViewport(!0,e,t),o.x=m.x,o.width=h+d-m.x,n.position.x=-n.position.x,n.frustum.left=-n.frustum.right,n.frustum.right=f-2*n.frustum.right):(o.x=m.x,o.width=h+d-m.x,d=n.frustum.left,n.frustum.left=-s.x-p,r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),i.uniformState.update(r),executeCommandsInViewport(!0,e,t),o.x=h,o.width=m.x-h,n.position.x=-n.position.x,n.frustum.right=-n.frustum.left,n.frustum.left=d-2*n.frustum.left),r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),i.uniformState.update(r),executeCommandsInViewport(!1,e,t)),n._setTransform(c),Cartesian3.clone(l,n.position),n.frustum=u.clone(),t.viewport=a}function executeCommandsInViewport(e,t,i,r){var n=t._environmentState,a=t._view;n=n.renderTranslucentDepthForPick;e||n||(t.frameState.commandList.length=0),n||updateAndRenderPrimitives(t),a.createPotentiallyVisibleSet(t),e&&(defined(r)&&updateAndClearFramebuffers(t,i,r),n||(executeComputeCommands(t),executeShadowMapCastCommands(t))),executeCommands$1(t,i)}var scratchCullingVolume$1=new CullingVolume;function updateDebugFrustumPlanes(e){var t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new DebugCameraPrimitive({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),defined(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function updateShadowMaps(e){var t=e._frameState,i=t.shadowMaps,r=i.length;if((e=0<r&&!t.passes.pick&&e.mode===SceneMode$1.SCENE3D)!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=e),t.shadowState.lightShadowsEnabled=!1,e){for(var n=0;n<r;++n)if(i[n]!==t.shadowState.shadowMaps[n]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0;for(var a=t.shadowState.lightShadowMaps.length=0;a<r;++a){var o=i[a];o.update(t),t.shadowState.shadowMaps.push(o),o.fromLightSource&&(t.shadowState.lightShadowMaps.push(o),t.shadowState.lightShadowsEnabled=!0),o.dirty&&(++t.shadowState.lastDirtyTime,o.dirty=!1)}}}function updateAndRenderPrimitives(e){var t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),updateDebugFrustumPlanes(e),updateShadowMaps(e),e._globe&&e._globe.render(t)}function updateAndClearFramebuffers(e,t,i){var r=e._context,n=e._frameState,a=e._environmentState,o=e._view,s=e._frameState.passes.pick,l=a.useWebVR;a.originalFramebuffer=t.framebuffer,defined(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!l?e._sunPostProcess=new SunPostProcess:defined(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!defined(e.sun)&&defined(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);var c=e._clearColorCommand;Color.clone(i,c.color),c.execute(r,t);var u=a.useGlobeDepthFramebuffer=defined(o.globeDepth);u&&(o.globeDepth.update(r,t,o.viewport,e._hdr,a.clearGlobeDepth),o.globeDepth.clear(r,t,i));var d=o.oit,h=a.useOIT=!s&&defined(d)&&d.isSupported();h&&(d.update(r,t,o.globeDepth.framebuffer,e._hdr),d.clear(r,t,i),a.useOIT=d.isSupported());var p,f=e.postProcessStages,m=a.usePostProcess=!s&&(e._hdr||0<f.length||f.ambientOcclusion.enabled||f.fxaa.enabled||f.bloom.enabled);a.usePostProcessSelected=!1,m&&(o.sceneFramebuffer.update(r,o.viewport,e._hdr),o.sceneFramebuffer.clear(r,t,i),f.update(r,n.useLogDepth,e._hdr),f.clear(r),m=a.usePostProcess=f.ready,a.usePostProcessSelected=m&&f.hasSelected),a.isSunVisible&&e.sunBloom&&!l?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(r,t,i)):u?t.framebuffer=o.globeDepth.framebuffer:m&&(t.framebuffer=o.sceneFramebuffer.getFramebuffer()),defined(t.framebuffer)&&c.execute(r,t),(a.useInvertClassification=!s&&defined(t.framebuffer)&&e.invertClassification)&&(1===e.frameState.invertClassificationColor.alpha&&a.useGlobeDepthFramebuffer&&(p=o.globeDepth.framebuffer),defined(p)||r.depthTexture?(e._invertClassification.previousFramebuffer=p,e._invertClassification.update(r),e._invertClassification.clear(r,t),e.frameState.invertClassificationColor.alpha<1&&h&&((h=(p=e._invertClassification.unclassifiedCommand).derivedCommands).oit=d.createDerivedCommands(p,r,h.oit))):a.useInvertClassification=!1),e._globeTranslucencyState.translucent&&o.globeTranslucencyFramebuffer.updateAndClear(e._hdr,o.viewport,r,t)}function callAfterRenderFunctions(e){for(var t=e._frameState.afterRender,i=0,r=t.length;i<r;++i)t[i](),e.requestRender();t.length=0}function getGlobeHeight(e){var t=e._globe;e=e.camera.positionCartographic;if(defined(t)&&t.show&&defined(e))return t.getHeight(e)}function isCameraUnderground(e){var t=e.camera,i=e._mode,r=e.globe,n=e._screenSpaceCameraController;return!!defined(t=t.positionCartographic)&&(!n.onMap()&&t.height<0||!(!defined(r)||!r.show||i===SceneMode$1.SCENE2D||i===SceneMode$1.MORPHING)&&(defined(e=e._globeHeight)&&t.height<e))}function updateDebugShowFramesPerSecond(e,t){var i,r;e.debugShowFramesPerSecond?(defined(e._performanceDisplay)||((i=document.createElement("div")).className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(i),r=new PerformanceDisplay({container:i}),e._performanceDisplay=r,e._performanceContainer=i),e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)):defined(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function prePassesUpdate(e){e._jobScheduler.resetBudgets();var t=e._frameState;e.primitives.prePassesUpdate(t),defined(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function postPassesUpdate(e){var t=e._frameState;e.primitives.postPassesUpdate(t),RequestScheduler.update()}Scene.prototype.updateEnvironment=function(){var e=this._frameState,t=this._view,i=this._environmentState,r=e.passes.render,n=e.passes.offscreen,a=this.skyAtmosphere,o=this.globe,s=this._globeTranslucencyState;!r||this._mode!==SceneMode$1.SCENE2D&&t.camera.frustum instanceof OrthographicFrustum||!s.environmentVisible?(i.skyAtmosphereCommand=void 0,i.skyBoxCommand=void 0,i.sunDrawCommand=void 0,i.sunComputeCommand=void 0,i.moonCommand=void 0):(defined(a)?(defined(o)&&(a.setDynamicAtmosphereColor(o.enableLighting&&o.dynamicAtmosphereLighting,o.dynamicAtmosphereLightingFromSun),i.isReadyForAtmosphere=i.isReadyForAtmosphere||0<o._surface._tilesToRender.length),i.skyAtmosphereCommand=a.update(e,o),defined(i.skyAtmosphereCommand)&&this.updateDerivedCommands(i.skyAtmosphereCommand)):i.skyAtmosphereCommand=void 0,i.skyBoxCommand=defined(this.skyBox)?this.skyBox.update(e,this._hdr):void 0,t=defined(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0,i.sunDrawCommand=defined(t)?t.drawCommand:void 0,i.sunComputeCommand=defined(t)?t.computeCommand:void 0,i.moonCommand=defined(this.moon)?this.moon.update(e):void 0),o=i.clearGlobeDepth=defined(o)&&o.show&&(!o.depthTestAgainstTerrain||this.mode===SceneMode$1.SCENE2D),(i.useDepthPlane=o&&this.mode===SceneMode$1.SCENE3D&&s.useDepthPlane)&&this._depthPlane.update(e),i.renderTranslucentDepthForPick=!1,i.useWebVR=this._useWebVR&&this.mode!==SceneMode$1.SCENE2D&&!n;s=e.mode!==SceneMode$1.SCENE3D||s.sunVisibleThroughGlobe?void 0:e.occluder;for(var l=e.cullingVolume,c=scratchCullingVolume$1.planes,u=0;u<5;++u)c[u]=l.planes[u];l=scratchCullingVolume$1,i.isSkyAtmosphereVisible=defined(i.skyAtmosphereCommand)&&i.isReadyForAtmosphere,i.isSunVisible=this.isVisible(i.sunDrawCommand,l,s),i.isMoonVisible=this.isVisible(i.moonCommand,l,s),i=this.specularEnvironmentMaps,s=this._specularEnvironmentMapAtlas,!defined(i)||defined(s)&&s.url===i?!defined(i)&&defined(s)&&(s.destroy(),this._specularEnvironmentMapAtlas=void 0):(s=s&&s.destroy(),this._specularEnvironmentMapAtlas=new OctahedralProjectedCubeMap(i)),defined(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e)},Scene.prototype.resolveFramebuffers=function(e){var t=this._context,i=this._frameState,r=this._environmentState,n=this._view,a=n.globeDepth,o=r.useOIT,s=r.useGlobeDepthFramebuffer,l=r.usePostProcess,c=r.originalFramebuffer,u=s?a.framebuffer:void 0,d=n.sceneFramebuffer.getFramebuffer(),h=n.sceneFramebuffer.getIdFramebuffer();r.separatePrimitiveFramebuffer&&a.executeMergeColor(t,e),o&&(e.framebuffer=l?d:c,n.oit.execute(t,e)),l&&(r=s&&!o?u:d,n=this.postProcessStages,r=r.getColorTexture(0),h=h.getColorTexture(0),d=defaultValue(u,d).depthStencilTexture,n.execute(t,r,d,h),n.copy(t,c)),o||l||!s||(e.framebuffer=c,a.executeCopyColor(t,e)),i=i.useLogDepth,this.debugShowGlobeDepth&&s&&getDebugGlobeDepth(this,this.debugShowDepthFrustum-1).executeDebugGlobeDepth(t,e,i),this.debugShowPickDepth&&s&&this._picking.getPickDepth(this,this.debugShowDepthFrustum-1).executeDebugPickDepth(t,e,i)},Scene.prototype.initializeFrame=function(){120==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=getGlobeHeight(this),this._cameraUnderground=isCameraUnderground(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),defined(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};var scratchBackgroundColor=new Color;function render(e){var t=e._frameState,i=e.context,r=i.uniformState,n=e._defaultView;e._view=n,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=renderTilesetPassState;var a=defaultValue(e.backgroundColor,Color.BLACK);e._hdr&&((a=Color.clone(a,scratchBackgroundColor)).red=Math.pow(a.red,e.gamma),a.green=Math.pow(a.green,e.gamma),a.blue=Math.pow(a.blue,e.gamma)),t.backgroundColor=a,e.fog.update(t),r.update(t);var o=e.shadowMap;defined(o)&&o.enabled&&(!defined(e.light)||e.light instanceof SunLight?Cartesian3.negate(r.sunDirectionWC,e._shadowMapCamera.direction):Cartesian3.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(o)),e._computeCommandList.length=0,e._overlayCommandList.length=0,(o=n.viewport).x=0,o.y=0,o.width=i.drawingBufferWidth,o.height=i.drawingBufferHeight,(n=n.passState).framebuffer=void 0,n.blendingEnabled=void 0,n.scissorTest=void 0,n.viewport=BoundingRectangle.clone(o,n.viewport),defined(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(n,a),e.resolveFramebuffers(n),n.framebuffer=void 0,executeOverlayCommands(e,n),defined(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),i.endFrame()}function tryAndCatchError(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function updateMostDetailedRayPicks(e){return e._picking.updateMostDetailedRayPicks(e)}function updatePreloadPass(e){var t=e._frameState;preloadTilesetPassState.camera=t.camera,preloadTilesetPassState.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,preloadTilesetPassState)}function updatePreloadFlightPass(e){var t=e._frameState;t.camera.canPreloadFlight()&&(preloadFlightTilesetPassState.camera=e.preloadFlightCamera,preloadFlightTilesetPassState.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,preloadFlightTilesetPassState))}function updateRequestRenderModeDeferCheckPass(e){e.primitives.updateForPass(e._frameState,requestRenderModeDeferCheckPassState)}Scene.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);var t=this._frameState;t.newFrame=!1,defined(e)||(e=JulianDate.now());var i=this._view.checkForCameraUpdates(this),r=!this.requestRenderMode||this._renderRequested||i||this._logDepthBufferDirty||this._hdrDirty||this.mode===SceneMode$1.MORPHING;!r&&defined(this.maximumRenderTimeChange)&&defined(this._lastRenderTime)&&(i=Math.abs(JulianDate.secondsDifference(this._lastRenderTime,e)),r=r||i>this.maximumRenderTimeChange),r&&(this._lastRenderTime=JulianDate.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1,updateFrameNumber(this,CesiumMath.incrementWrap(t.frameNumber,15e6,1),e),t.newFrame=!0),tryAndCatchError(this,prePassesUpdate),this.primitives.show&&(tryAndCatchError(this,updateMostDetailedRayPicks),tryAndCatchError(this,updatePreloadPass),tryAndCatchError(this,updatePreloadFlightPass),r||tryAndCatchError(this,updateRequestRenderModeDeferCheckPass)),this._postUpdate.raiseEvent(this,e),r&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),tryAndCatchError(this,render)),updateDebugShowFramesPerSecond(this,r),tryAndCatchError(this,postPassesUpdate),callAfterRenderFunctions(this),r&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())},Scene.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},Scene.prototype.requestRender=function(){this._renderRequested=!0},Scene.prototype.clampLineWidth=function(e){return Math.max(ContextLimits.minimumAliasedLineWidth,Math.min(e,ContextLimits.maximumAliasedLineWidth))},Scene.prototype.pick=function(e,t,i){return this._picking.pick(this,e,t,i)},Scene.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)},Scene.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)},Scene.prototype.drillPick=function(e,t,i,r){return this._picking.drillPick(this,e,t,i,r)},Scene.prototype.pickFromRay=function(e,t,i){return this._picking.pickFromRay(this,e,t,i)},Scene.prototype.drillPickFromRay=function(e,t,i,r){return this._picking.drillPickFromRay(this,e,t,i,r)},Scene.prototype.pickFromRayMostDetailed=function(e,t,i){return this._picking.pickFromRayMostDetailed(this,e,t,i)},Scene.prototype.drillPickFromRayMostDetailed=function(e,t,i,r){return this._picking.drillPickFromRayMostDetailed(this,e,t,i,r)},Scene.prototype.sampleHeight=function(e,t,i){return this._picking.sampleHeight(this,e,t,i)},Scene.prototype.clampToHeight=function(e,t,i,r){return this._picking.clampToHeight(this,e,t,i,r)},Scene.prototype.sampleHeightMostDetailed=function(e,t,i){return this._picking.sampleHeightMostDetailed(this,e,t,i)},Scene.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},Scene.prototype.cartesianToCanvasCoordinates=function(e,t){return SceneTransforms.wgs84ToWindowCoordinates(this,e,t)},Scene.prototype.completeMorph=function(){this._transitioner.completeMorph()},Scene.prototype.morphTo2D=function(e){var t=(defined(t=this.globe)?t:this.mapProjection).ellipsoid;e=defaultValue(e,2),this._transitioner.morphTo2D(e,t)},Scene.prototype.morphToColumbusView=function(e){var t=(defined(t=this.globe)?t:this.mapProjection).ellipsoid;e=defaultValue(e,2),this._transitioner.morphToColumbusView(e,t)},Scene.prototype.morphTo3D=function(e){var t=(defined(t=this.globe)?t:this.mapProjection).ellipsoid;e=defaultValue(e,2),this._transitioner.morphTo3D(e,t)},Scene.prototype.isDestroyed=function(){return!1},Scene.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),defined(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(var e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,destroyObject(this)};var SkyAtmosphereCommon="const float Kr = 0.0025;\nconst float Kr4PI = Kr * 4.0 * czm_pi;\nconst float Km = 0.0015;\nconst float Km4PI = Km * 4.0 * czm_pi;\nconst float ESun = 15.0;\nconst float KmESun = Km * ESun;\nconst float KrESun = Kr * ESun;\nconst vec3 InvWavelength = vec3(\n5.60204474633241,\n9.473284437923038,\n19.643802610477206);\nconst float rayleighScaleDepth = 0.25;\nconst int nSamples = 2;\nconst float fSamples = 2.0;\nconst float g = -0.95;\nconst float g2 = g * g;\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\nuniform vec3 u_radiiAndDynamicAtmosphereColor;\nfloat scale(float cosAngle)\n{\nfloat x = 1.0 - cosAngle;\nreturn rayleighScaleDepth  * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\nvec3 getLightDirection(vec3 positionWC)\n{\nfloat lightEnum = u_radiiAndDynamicAtmosphereColor.z;\nvec3 lightDirection =\npositionWC * float(lightEnum == 0.0) +\nczm_lightDirectionWC * float(lightEnum == 1.0) +\nczm_sunDirectionWC * float(lightEnum == 2.0);\nreturn normalize(lightDirection);\n}\nvoid calculateRayScatteringFromSpace(in vec3 positionWC, in vec3 ray, in float innerRadius, in float outerRadius, inout float far, out vec3 start, out float startOffset)\n{\nfloat cameraHeight = length(positionWC);\nfloat B = 2.0 * dot(positionWC, ray);\nfloat C = cameraHeight * cameraHeight - outerRadius * outerRadius;\nfloat det = max(0.0, B * B - 4.0 * C);\nfloat near = 0.5 * (-B - sqrt(det));\nstart = positionWC + ray * near;\nfar -= near;\nfloat startAngle = dot(ray, start) / outerRadius;\nfloat startDepth = exp(-1.0 / rayleighScaleDepth);\nstartOffset = startDepth * scale(startAngle);\n}\nvoid calculateRayScatteringFromGround(in vec3 positionWC, in vec3 ray, in float atmosphereScale, in float innerRadius, out vec3 start, out float startOffset)\n{\nfloat cameraHeight = length(positionWC);\nstart = positionWC;\nfloat height = length(start);\nfloat depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - cameraHeight));\nfloat startAngle = dot(ray, start) / height;\nstartOffset = depth*scale(startAngle);\n}\nczm_raySegment rayEllipsoidIntersection(czm_ray ray, vec3 inverseRadii)\n{\nvec3 o = inverseRadii * (czm_inverseView * vec4(ray.origin, 1.0)).xyz;\nvec3 d = inverseRadii * (czm_inverseView * vec4(ray.direction, 0.0)).xyz;\nfloat a = dot(d, d);\nfloat b = dot(d, o);\nfloat c = dot(o, o) - 1.0;\nfloat discriminant = b * b - a * c;\nif (discriminant < 0.0)\n{\nreturn czm_emptyRaySegment;\n}\ndiscriminant = sqrt(discriminant);\nfloat t1 = (-b - discriminant) / a;\nfloat t2 = (-b + discriminant) / a;\nif (t1 < 0.0 && t2 < 0.0)\n{\nreturn czm_emptyRaySegment;\n}\nif (t1 < 0.0 && t2 >= 0.0)\n{\nt1 = 0.0;\n}\nreturn czm_raySegment(t1, t2);\n}\nvec3 getAdjustedPosition(vec3 positionWC, float innerRadius)\n{\nfloat cameraHeight = czm_eyeHeight + innerRadius;\nreturn normalize(positionWC) * cameraHeight;\n}\nvec3 getTranslucentPosition(vec3 positionWC, vec3 outerPositionWC, float innerRadius, out bool intersectsEllipsoid)\n{\nvec3 directionWC = normalize(outerPositionWC - positionWC);\nvec3 directionEC = czm_viewRotation * directionWC;\nczm_ray viewRay = czm_ray(vec3(0.0), directionEC);\nczm_raySegment raySegment = rayEllipsoidIntersection(viewRay, czm_ellipsoidInverseRadii);\nintersectsEllipsoid = raySegment.start >= 0.0;\nif (intersectsEllipsoid)\n{\nreturn positionWC + raySegment.stop * directionWC;\n}\nreturn getAdjustedPosition(positionWC, innerRadius);\n}\nvoid calculateMieColorAndRayleighColor(vec3 outerPositionWC, out vec3 mieColor, out vec3 rayleighColor)\n{\nfloat outerRadius = u_radiiAndDynamicAtmosphereColor.x;\nfloat innerRadius = u_radiiAndDynamicAtmosphereColor.y;\n#ifdef GLOBE_TRANSLUCENT\nbool intersectsEllipsoid = false;\nvec3 startPositionWC = getTranslucentPosition(czm_viewerPositionWC, outerPositionWC, innerRadius, intersectsEllipsoid);\n#else\nvec3 startPositionWC = getAdjustedPosition(czm_viewerPositionWC, innerRadius);\n#endif\nvec3 lightDirection = getLightDirection(startPositionWC);\nvec3 ray = outerPositionWC - startPositionWC;\nfloat far = length(ray);\nray /= far;\nfloat atmosphereScale = 1.0 / (outerRadius - innerRadius);\nvec3 start;\nfloat startOffset;\n#ifdef SKY_FROM_SPACE\n#ifdef GLOBE_TRANSLUCENT\nif (intersectsEllipsoid)\n{\ncalculateRayScatteringFromGround(startPositionWC, ray, atmosphereScale, innerRadius, start, startOffset);\n}\nelse\n{\ncalculateRayScatteringFromSpace(startPositionWC, ray, innerRadius, outerRadius, far, start, startOffset);\n}\n#else\ncalculateRayScatteringFromSpace(startPositionWC, ray, innerRadius, outerRadius, far, start, startOffset);\n#endif\n#else\ncalculateRayScatteringFromGround(startPositionWC, ray, atmosphereScale, innerRadius, start, startOffset);\n#endif\nfloat sampleLength = far / fSamples;\nfloat scaledLength = sampleLength * atmosphereScale;\nvec3 sampleRay = ray * sampleLength;\nvec3 samplePoint = start + sampleRay * 0.5;\nvec3 frontColor = vec3(0.0, 0.0, 0.0);\nfor (int i = 0; i<nSamples; i++)\n{\nfloat height = length(samplePoint);\nfloat depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - height));\nfloat fLightAngle = dot(lightDirection, samplePoint) / height;\nfloat fCameraAngle = dot(ray, samplePoint) / height;\nfloat fScatter = (startOffset + depth*(scale(fLightAngle) - scale(fCameraAngle)));\nvec3 attenuate = exp(-fScatter * (InvWavelength * Kr4PI + Km4PI));\nfrontColor += attenuate * (depth * scaledLength);\nsamplePoint += sampleRay;\n}\nmieColor = frontColor * KmESun;\nrayleighColor = frontColor * (InvWavelength * KrESun);\nmieColor = min(mieColor, vec3(10000000.0));\nrayleighColor = min(rayleighColor, vec3(10000000.0));\n}\nvec4 calculateFinalColor(vec3 positionWC, vec3 toCamera, vec3 lightDirection, vec3 mieColor, vec3 rayleighColor)\n{\nfloat cosAngle = dot(lightDirection, normalize(toCamera)) / length(toCamera);\nfloat rayleighPhase = 0.75 * (1.0 + cosAngle * cosAngle);\nfloat miePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + cosAngle * cosAngle) / pow(1.0 + g2 - 2.0 * g * cosAngle, 1.5);\nvec3 rgb = rayleighPhase * rayleighColor + miePhase * mieColor;\nconst float exposure = 2.0;\nvec3 rgbExposure = vec3(1.0) - exp(-exposure * rgb);\n#ifndef HDR\nrgb = rgbExposure;\n#endif\n#ifdef COLOR_CORRECT\nvec3 hsb = czm_RGBToHSB(rgb);\nhsb.x += u_hsbShift.x;\nhsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0);\nhsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0;\nrgb = czm_HSBToRGB(hsb);\n#endif\nfloat outerRadius = u_radiiAndDynamicAtmosphereColor.x;\nfloat innerRadius = u_radiiAndDynamicAtmosphereColor.y;\nfloat lightEnum = u_radiiAndDynamicAtmosphereColor.z;\nfloat cameraHeight = czm_eyeHeight + innerRadius;\nfloat atmosphereAlpha = clamp((outerRadius - cameraHeight) / (outerRadius - innerRadius), 0.0, 1.0);\nfloat nightAlpha = (lightEnum != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\natmosphereAlpha *= pow(nightAlpha, 0.5);\nvec4 finalColor = vec4(rgb, mix(clamp(rgbExposure.b, 0.0, 1.0), 1.0, atmosphereAlpha) * smoothstep(0.0, 1.0, czm_morphTime));\nif (mieColor.b > 1.0)\n{\nfloat strength = mieColor.b;\nfloat minDistance = outerRadius;\nfloat maxDistance = outerRadius * 3.0;\nfloat maxStrengthLerp = 1.0 - clamp((maxDistance - cameraHeight) / (maxDistance - minDistance), 0.0, 1.0);\nfloat maxStrength = mix(100.0, 10000.0, maxStrengthLerp);\nstrength = min(strength, maxStrength);\nfloat alpha = 1.0 - (strength / maxStrength);\nfinalColor.a = alpha;\n}\nreturn finalColor;\n}\n",SkyAtmosphereFS="varying vec3 v_outerPositionWC;\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\n#endif\nvoid main (void)\n{\nvec3 toCamera = czm_viewerPositionWC - v_outerPositionWC;\nvec3 lightDirection = getLightDirection(czm_viewerPositionWC);\nvec3 mieColor;\nvec3 rayleighColor;\n#ifdef PER_FRAGMENT_ATMOSPHERE\ncalculateMieColorAndRayleighColor(v_outerPositionWC, mieColor, rayleighColor);\n#else\nmieColor = v_mieColor;\nrayleighColor = v_rayleighColor;\n#endif\ngl_FragColor = calculateFinalColor(czm_viewerPositionWC, toCamera, lightDirection, mieColor, rayleighColor);\n}\n",SkyAtmosphereVS="attribute vec4 position;\nvarying vec3 v_outerPositionWC;\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\n#endif\nvoid main(void)\n{\nvec4 positionWC = czm_model * position;\n#ifndef PER_FRAGMENT_ATMOSPHERE\ncalculateMieColorAndRayleighColor(positionWC.xyz, v_mieColor, v_rayleighColor);\n#endif\nv_outerPositionWC = positionWC.xyz;\ngl_Position = czm_modelViewProjection * position;\n}\n";function SkyAtmosphere(e){e=defaultValue(e,Ellipsoid.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;var t=Cartesian3.multiplyByScalar(e.radii,1.025,new Cartesian3);this._scaleMatrix=Matrix4.fromScale(t),this._modelMatrix=new Matrix4,this._command=new DrawCommand({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new Cartesian3,(t=new Cartesian3).x=1.025*e.maximumRadius,t.y=e.maximumRadius,t.z=0,this._radiiAndDynamicAtmosphereColor=t;var i=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return i._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return i._hueSaturationBrightness.x=i.hueShift,i._hueSaturationBrightness.y=i.saturationShift,i._hueSaturationBrightness.z=i.brightnessShift,i._hueSaturationBrightness}}}Object.defineProperties(SkyAtmosphere.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),SkyAtmosphere.prototype.setDynamicAtmosphereColor=function(e,t){t=e?t?2:1:0,this._radiiAndDynamicAtmosphereColor.z=t};var scratchModelMatrix=new Matrix4;function hasColorCorrection(e){return!(CesiumMath.equalsEpsilon(e.hueShift,0,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(e.saturationShift,0,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(e.brightnessShift,0,CesiumMath.EPSILON7))}SkyAtmosphere.prototype.update=function(e,t){if(this.show){var i=e.mode;if((i===SceneMode$1.SCENE3D||i===SceneMode$1.MORPHING)&&e.passes.render){var r=Matrix4.fromRotationTranslation(e.context.uniformState.inverseViewRotation,Cartesian3.ZERO,scratchModelMatrix),n=Matrix4.multiplyTransformation(r,Axis$1.Y_UP_TO_Z_UP,scratchModelMatrix),a=Matrix4.multiply(this._scaleMatrix,n,scratchModelMatrix);Matrix4.clone(a,this._modelMatrix),i=e.context,r=hasColorCorrection(this),n=e.globeTranslucencyState.translucent,a=this.perFragmentAtmosphere||n||!defined(t)||!t.show,defined((t=this._command).vertexArray)||(o=EllipsoidGeometry.createGeometry(new EllipsoidGeometry({radii:new Cartesian3(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:VertexFormat.POSITION_ONLY})),t.vertexArray=VertexArray.fromGeometry({context:i,geometry:o,attributeLocations:GeometryPipeline.createAttributeLocations(o),bufferUsage:BufferUsage$1.STATIC_DRAW}),t.renderState=RenderState.fromCache({cull:{enabled:!0,face:CullFace$1.FRONT},blending:BlendingState$1.ALPHA_BLEND,depthMask:!1}));var o=r|a<<2|n<<3;return o!==this._flags&&(this._flags=o,o=[],r&&o.push("COLOR_CORRECT"),a&&o.push("PER_FRAGMENT_ATMOSPHERE"),n&&o.push("GLOBE_TRANSLUCENT"),a=new ShaderSource({defines:o.concat("SKY_FROM_SPACE"),sources:[SkyAtmosphereCommon,SkyAtmosphereVS]}),n=new ShaderSource({defines:o.concat("SKY_FROM_SPACE"),sources:[SkyAtmosphereCommon,SkyAtmosphereFS]}),this._spSkyFromSpace=ShaderProgram.fromCache({context:i,vertexShaderSource:a,fragmentShaderSource:n}),a=new ShaderSource({defines:o.concat("SKY_FROM_ATMOSPHERE"),sources:[SkyAtmosphereCommon,SkyAtmosphereVS]}),n=new ShaderSource({defines:o.concat("SKY_FROM_ATMOSPHERE"),sources:[SkyAtmosphereCommon,SkyAtmosphereFS]}),this._spSkyFromAtmosphere=ShaderProgram.fromCache({context:i,vertexShaderSource:a,fragmentShaderSource:n})),e=e.camera.positionWC,Cartesian3.magnitude(e)>this._radiiAndDynamicAtmosphereColor.x?t.shaderProgram=this._spSkyFromSpace:t.shaderProgram=this._spSkyFromAtmosphere,t}}},SkyAtmosphere.prototype.isDestroyed=function(){return!1},SkyAtmosphere.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyFromSpace=this._spSkyFromSpace&&this._spSkyFromSpace.destroy(),this._spSkyFromAtmosphere=this._spSkyFromAtmosphere&&this._spSkyFromAtmosphere.destroy(),destroyObject(this)};var SkyBoxFS="uniform samplerCube u_cubeMap;\nvarying vec3 v_texCoord;\nvoid main()\n{\nvec4 color = textureCube(u_cubeMap, normalize(v_texCoord));\ngl_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}\n",SkyBoxVS="attribute vec3 position;\nvarying vec3 v_texCoord;\nvoid main()\n{\nvec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\ngl_Position = czm_projection * vec4(p, 1.0);\nv_texCoord = position.xyz;\n}\n";function SkyBox(e){this.sources=e.sources,this._sources=void 0,this.show=defaultValue(e.show,!0),this._command=new DrawCommand({modelMatrix:Matrix4.clone(Matrix4.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}function SphereEmitter(e){e=defaultValue(e,1),this._radius=defaultValue(e,1)}function StyleExpression(){}SkyBox.prototype.update=function(e,t){var i=this;if(this.show&&(e.mode===SceneMode$1.SCENE3D||e.mode===SceneMode$1.MORPHING)&&e.passes.render){var r,n,a=e.context;if(this._sources!==this.sources&&(this._sources=this.sources,"string"==typeof(r=this.sources).positiveX?loadCubeMap(a,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new CubeMap({context:a,source:r}))),defined((e=this._command).vertexArray)||(e.uniformMap={u_cubeMap:function(){return i._cubeMap}},r=BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2),vertexFormat:VertexFormat.POSITION_ONLY})),n=this._attributeLocations=GeometryPipeline.createAttributeLocations(r),e.vertexArray=VertexArray.fromGeometry({context:a,geometry:r,attributeLocations:n,bufferUsage:BufferUsage$1.STATIC_DRAW}),e.renderState=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND})),defined(e.shaderProgram)&&this._useHdr===t||(n=new ShaderSource({defines:[t?"HDR":""],sources:[SkyBoxFS]}),e.shaderProgram=ShaderProgram.fromCache({context:a,vertexShaderSource:SkyBoxVS,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._useHdr=t),defined(this._cubeMap))return e}},SkyBox.prototype.isDestroyed=function(){return!1},SkyBox.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),destroyObject(this)},Object.defineProperties(SphereEmitter.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}}),SphereEmitter.prototype.emit=function(e){var t=CesiumMath.randomBetween(0,CesiumMath.TWO_PI),i=CesiumMath.randomBetween(0,CesiumMath.PI),r=CesiumMath.randomBetween(0,this._radius),n=r*Math.cos(t)*Math.sin(i);t=r*Math.sin(t)*Math.sin(i),i=r*Math.cos(i);e.position=Cartesian3.fromElements(n,t,i,e.position),e.velocity=Cartesian3.normalize(e.position,e.velocity)},StyleExpression.prototype.evaluate=function(e,t){DeveloperError.throwInstantiationError()},StyleExpression.prototype.evaluateColor=function(e,t){DeveloperError.throwInstantiationError()},StyleExpression.prototype.getShaderFunction=function(e,t,i,r){DeveloperError.throwInstantiationError()};var SunFS="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color = texture2D(u_texture, v_textureCoordinates);\ngl_FragColor = czm_gammaCorrect(color);\n}\n",SunTextureFS="uniform float u_radiusTS;\nvarying vec2 v_textureCoordinates;\nvec2 rotate(vec2 p, vec2 direction)\n{\nreturn vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\nvec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\nfloat radius = length(rotatedPosition) * lengthScalar;\nfloat burst = 1.0 - smoothstep(0.0, 0.55, radius);\nreturn vec4(burst);\n}\nvoid main()\n{\nfloat lengthScalar = 2.0 / sqrt(2.0);\nvec2 position = v_textureCoordinates - vec2(0.5);\nfloat radius = length(position) * lengthScalar;\nfloat surface = step(radius, u_radiusTS);\nvec4 color = vec4(vec2(1.0), surface + 0.2, surface);\nfloat glow = 1.0 - smoothstep(0.0, 0.55, radius);\ncolor.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\nvec4 burst = vec4(0.0);\nburst += 0.4 * addBurst(position, vec2(0.38942,  0.92106), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.99235,  0.12348), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.31457,  0.94924), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.97931,  0.20239), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar);\ncolor += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\ngl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n",SunVS="attribute vec2 direction;\nuniform float u_size;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 position;\nif (czm_morphTime == 1.0)\n{\nposition = vec4(czm_sunPositionWC, 1.0);\n}\nelse\n{\nposition = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n}\nvec4 positionEC = czm_view * position;\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nvec2 halfSize = vec2(u_size * 0.5);\nhalfSize *= ((direction * 2.0) - 1.0);\ngl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\nv_textureCoordinates = direction;\n}\n";function Sun(){this.show=!0,this._drawCommand=new DrawCommand({primitiveType:PrimitiveType$1.TRIANGLES,boundingVolume:new BoundingSphere,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new BoundingSphere,this._boundingVolume2D=new BoundingSphere,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;var e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(Sun.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var scratchPositionWC=new Cartesian2,scratchLimbWC=new Cartesian2,scratchPositionEC=new Cartesian4,scratchCartesian4$6=new Cartesian4;function TileBoundingVolume(){}function TileCoordinatesImageryProvider(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this._tilingScheme=defined(e.tilingScheme)?e.tilingScheme:new GeographicTilingScheme({ellipsoid:e.ellipsoid}),this._color=defaultValue(e.color,Color.YELLOW),this._errorEvent=new Event,this._tileWidth=defaultValue(e.tileWidth,256),this._tileHeight=defaultValue(e.tileHeight,256),this._readyPromise=when.resolve(!0),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0}function TileDiscardPolicy(e){DeveloperError.throwInstantiationError()}Sun.prototype.update=function(e,t,i){if(this.show){var r=e.mode;if(r!==SceneMode$1.SCENE2D&&r!==SceneMode$1.MORPHING&&e.passes.render){var n,a=e.context,o=t.viewport.width,s=t.viewport.height;defined(this._texture)&&o===this._drawingBufferWidth&&s===this._drawingBufferHeight&&!this._glowFactorDirty&&i===this._useHdr||(this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=o,this._drawingBufferHeight=s,this._glowFactorDirty=!1,this._useHdr=i,s=Math.max(o,s),s=Math.pow(2,Math.ceil(Math.log(s)/Math.log(2))-2),s=Math.max(1,s),l=i?a.halfFloatingPointTexture?PixelDatatype$1.HALF_FLOAT:PixelDatatype$1.FLOAT:PixelDatatype$1.UNSIGNED_BYTE,this._texture=new Texture({context:a,width:s,height:s,pixelFormat:PixelFormat$1.RGBA,pixelDatatype:l}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5,l={u_radiusTS:function(){return n._radiusTS}},(n=this)._commands.computeCommand=new ComputeCommand({fragmentShaderSource:SunTextureFS,outputTexture:this._texture,uniformMap:l,persists:!1,owner:this,postExecute:function(){n._commands.computeCommand=void 0}}));var l=this._drawCommand;defined(l.vertexArray)||(h={direction:0},(d=new Uint8Array(8))[0]=0,d[1]=0,d[2]=255,d[3]=0,d[4]=255,d[5]=255,d[6]=0,d[7]=255,c=Buffer$1.createVertexBuffer({context:a,typedArray:d,usage:BufferUsage$1.STATIC_DRAW}),u=[{index:h.direction,vertexBuffer:c,componentsPerAttribute:2,normalize:!0,componentDatatype:ComponentDatatype$1.UNSIGNED_BYTE}],d=Buffer$1.createIndexBuffer({context:a,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:BufferUsage$1.STATIC_DRAW,indexDatatype:IndexDatatype$1.UNSIGNED_SHORT}),l.vertexArray=new VertexArray({context:a,attributes:u,indexBuffer:d}),l.shaderProgram=ShaderProgram.fromCache({context:a,vertexShaderSource:SunVS,fragmentShaderSource:SunFS,attributeLocations:h}),l.renderState=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND}),l.uniformMap=this._uniformMap);var c=a.uniformState.sunPositionWC,u=a.uniformState.sunPositionColumbusView,d=this._boundingVolume,h=this._boundingVolume2D;return Cartesian3.clone(c,d.center),h.center.x=u.z,h.center.y=u.x,h.center.z=u.y,d.radius=CesiumMath.SOLAR_RADIUS+CesiumMath.SOLAR_RADIUS*this._glowLengthTS,h.radius=d.radius,r===SceneMode$1.SCENE3D?BoundingSphere.clone(d,l.boundingVolume):r===SceneMode$1.COLUMBUS_VIEW&&BoundingSphere.clone(h,l.boundingVolume),c=SceneTransforms.computeActualWgs84Position(e,c,scratchCartesian4$6),c=Cartesian3.magnitude(Cartesian3.subtract(c,e.camera.position,scratchCartesian4$6)),e=a.uniformState.projection,(a=scratchPositionEC).x=0,a.y=0,a.z=-c,a.w=1,c=Matrix4.multiplyByVector(e,a,scratchCartesian4$6),c=SceneTransforms.clipToGLWindowCoordinates(t.viewport,c,scratchPositionWC),a.x=CesiumMath.SOLAR_RADIUS,a=Matrix4.multiplyByVector(e,a,scratchCartesian4$6),a=SceneTransforms.clipToGLWindowCoordinates(t.viewport,a,scratchLimbWC),this._size=Cartesian2.magnitude(Cartesian2.subtract(a,c,scratchCartesian4$6)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands}}},Sun.prototype.isDestroyed=function(){return!1},Sun.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),destroyObject(this)},TileBoundingVolume.prototype.boundingVolume=void 0,TileBoundingVolume.prototype.boundingSphere=void 0,TileBoundingVolume.prototype.distanceToCamera=function(e){DeveloperError.throwInstantiationError()},TileBoundingVolume.prototype.intersectPlane=function(e){DeveloperError.throwInstantiationError()},TileBoundingVolume.prototype.createDebugVolume=function(e){DeveloperError.throwInstantiationError()},Object.defineProperties(TileCoordinatesImageryProvider.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),TileCoordinatesImageryProvider.prototype.getTileCredits=function(e,t,i){},TileCoordinatesImageryProvider.prototype.requestImage=function(e,t,i,r){var n=document.createElement("canvas");n.width=256,n.height=256;var a=n.getContext("2d"),o=this._color.toCssColorString();return a.strokeStyle=o,a.lineWidth=2,a.strokeRect(1,1,255,255),a.font="bold 25px Arial",a.textAlign="center",a.fillStyle=o,a.fillText("L: "+i,124,86),a.fillText("X: "+e,124,136),a.fillText("Y: "+t,124,186),n},TileCoordinatesImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){},TileDiscardPolicy.prototype.isReady=DeveloperError.throwInstantiationError,TileDiscardPolicy.prototype.shouldDiscardImage=DeveloperError.throwInstantiationError;var TileState={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},TileState$1=Object.freeze(TileState);function TimeDynamicPointCloud(e){e=defaultValue(e,defaultValue.EMPTY_OBJECT),this.show=defaultValue(e.show,!0),this.modelMatrix=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY)),this.shadows=defaultValue(e.shadows,ShadowMode$1.ENABLED),this.maximumMemoryUsage=defaultValue(e.maximumMemoryUsage,256),this.shading=new PointCloudShading(e.shading),this.style=e.style,this.frameFailed=new Event,this.frameChanged=new Event,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new PointCloudEyeDomeLighting,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._readyPromise=when.defer(),this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=arrayFill(new Array(5),0),this._runningAverage=0}function getFragmentShaderLoaded$1(e){return"uniform vec4 czm_pickColor;\n"+e}function getUniformMapLoaded$1(e){return function(t){return combine(t,{czm_pickColor:function(){return e._pickId.color}})}}function getPickIdLoaded$1(){return"czm_pickColor"}Object.defineProperties(TimeDynamicPointCloud.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){ClippingPlaneCollection.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(defined(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}},readyPromise:{get:function(){return this._readyPromise.promise}}}),TimeDynamicPointCloud.prototype.makeStyleDirty=function(){this._styleDirty=!0},TimeDynamicPointCloud.prototype._getAverageLoadTime=function(){return 0===this._runningLength?.05:this._runningAverage};var scratchDate$1=new JulianDate;function getClockMultiplier(e){e=(t=e._clock).canAnimate&&t.shouldAnimate;var t=t.multiplier;return e?t:0}function getIntervalIndex(e,t){return e._intervals.indexOf(t.start)}function getNextInterval(e,t){var i=e._intervals,r=e._clock,n=getClockMultiplier(e);if(0!==n){var a=e._getAverageLoadTime();a=JulianDate.addSeconds(r.currentTime,a*n,scratchDate$1);return(a=i.indexOf(a))===getIntervalIndex(e,t)&&(0<=n?++a:--a),i.get(a)}}function getCurrentInterval(e){var t=e._intervals;e=e._clock.currentTime,e=t.indexOf(e);return t.get(e)}function reachedInterval(e,t,i){var r=getClockMultiplier(e);t=getIntervalIndex(e,t),i=getIntervalIndex(e,i);return 0<=r?i<=t:t<=i}function handleFrameFailure(e,t){return function(i){i=defined(i.message)?i.message:i.toString(),0<e.frameFailed.numberOfListeners?e.frameFailed.raiseEvent({uri:t,message:i}):(console.log("A frame failed to load: "+t),console.log("Error: "+i))}}function requestFrame(e,t,i){var r,n=getIntervalIndex(e,t),a=e._frames,o=a[n];return defined(o)||(r=defined(r=t.data.transform)?Matrix4.fromArray(r):void 0,t=t.data.uri,o={pointCloud:void 0,transform:r,timestamp:getTimestamp$1(),sequential:!0,ready:!1,touchedFrameNumber:i.frameNumber},a[n]=o,Resource.fetchArrayBuffer({url:t}).then((function(t){return o.pointCloud=new PointCloud({arrayBuffer:t,cull:!0,fragmentShaderLoaded:getFragmentShaderLoaded$1,uniformMapLoaded:getUniformMapLoaded$1(e),pickIdLoaded:getPickIdLoaded$1}),o.pointCloud.readyPromise})).otherwise(handleFrameFailure(e,t))),o}function updateAverageLoadTime(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function prepareFrame(e,t,i,r){t.touchedFrameNumber<r.frameNumber-1&&(t.sequential=!1);var n,a,o=t.pointCloud;defined(o)&&!t.ready&&(a=(n=r.commandList).length,renderFrame(e,t,i,r),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,n.length=a,t.sequential&&updateAverageLoadTime(e,(getTimestamp$1()-t.timestamp)/1e3))),t.touchedFrameNumber=r.frameNumber}var scratchModelMatrix$1=new Matrix4;function getGeometricError$1(e,t){return defined(e=e.shading)&&defined(e.baseResolution)?e.baseResolution:defined(t.boundingSphere)?CesiumMath.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function getMaximumAttenuation(e){return defined(e=e.shading)&&defined(e.maximumAttenuation)?e.maximumAttenuation:10}var defaultShading$1=new PointCloudShading;function renderFrame(e,t,i,r){var n=defaultValue(e.shading,defaultShading$1),a=t.pointCloud,o=defaultValue(t.transform,Matrix4.IDENTITY);a.modelMatrix=Matrix4.multiplyTransformation(e.modelMatrix,o,scratchModelMatrix$1),a.style=e.style,a.time=i.timeSinceLoad,a.shadows=e.shadows,a.clippingPlanes=e._clippingPlanes,a.isClipped=i.isClipped,a.attenuation=n.attenuation,a.backFaceCulling=n.backFaceCulling,a.normalShading=n.normalShading,a.geometricError=getGeometricError$1(e,a),a.geometricErrorScale=n.geometricErrorScale,a.maximumAttenuation=getMaximumAttenuation(e),a.update(r),t.touchedFrameNumber=r.frameNumber}function loadFrame(e,t,i,r){prepareFrame(e,requestFrame(e,t,r),i,r)}function getUnloadCondition(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function unloadFrames(e,t){for(var i=e._frames,r=i.length,n=0;n<r;++n){var a,o=i[n];defined(o)&&(defined(t)&&!t(o)||(a=o.pointCloud,o.ready&&(e._totalMemoryUsageInBytes-=a.geometryByteLength),defined(a)&&a.destroy(),o===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),i[n]=void 0))}}function getFrame(e,t){if(t=getIntervalIndex(e,t),defined(t=e._frames[t])&&t.ready)return t}function updateInterval(e,t,i,r,n){return defined(i)&&(i.ready||(loadFrame(e,t,r,n),i.ready))}function getNearestReadyInterval(e,t,i,r,n){var a,o,s=e._intervals,l=e._frames,c=(i=getIntervalIndex(e,i),getIntervalIndex(e,t));if(c<=i){for(a=i;c<=a;--a)if(updateInterval(e,o=s.get(a),l[a],r,n))return o}else for(a=i;a<=c;++a)if(updateInterval(e,o=s.get(a),l[a],r,n))return o;return t}function setFramesDirty(e,t,i){for(var r=e._frames,n=r.length,a=0;a<n;++a){var o=r[a];defined(o)&&defined(o.pointCloud)&&(o.pointCloud.clippingPlanesDirty=t,o.pointCloud.styleDirty=i)}}var updateState={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};TimeDynamicPointCloud.prototype.update=function(e){var t,i,r,n,a,o,s,l,c,u,d;e.mode!==SceneMode$1.MORPHING&&this.show&&(defined(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),defined(this._loadTimestamp)||(this._loadTimestamp=JulianDate.clone(e.time)),s=Math.max(1e3*JulianDate.secondsDifference(e.time,this._loadTimestamp),0),a=0,u=!1,(l=defined(n=this._clippingPlanes)&&n.enabled)&&(n.update(e),a=n.clippingPlanesState),this._clippingPlanesState!==a&&(this._clippingPlanesState=a,u=!0),o=this._styleDirty,this._styleDirty=!1,(u||o)&&setFramesDirty(this,u,o),updateState.timeSinceLoad=s,updateState.isClipped=l,t=this.shading,i=this._pointCloudEyeDomeLighting,r=(d=e.commandList).length,n=this._previousInterval,a=this._nextInterval,defined(u=getCurrentInterval(this))&&(o=!1,l=0===(s=getClockMultiplier(this)),s!==this._clockMultiplier&&(o=!0,this._clockMultiplier=s),defined(n)&&!l||(n=u),defined(a)&&!o&&!reachedInterval(this,u,a)||(a=getNextInterval(this,u)),defined(u=getFrame(this,n=getNearestReadyInterval(this,n,u,updateState,e)))||(loadFrame(this,n,updateState,e),u=this._lastRenderedFrame),defined(u)&&renderFrame(this,u,updateState,e),defined(a)&&loadFrame(this,a,updateState,e),c=this,defined(u)&&!defined(this._lastRenderedFrame)&&e.afterRender.push((function(){c._readyPromise.resolve(c)})),defined(u)&&u!==this._lastRenderedFrame&&0<c.frameChanged.numberOfListeners&&e.afterRender.push((function(){c.frameChanged.raiseEvent(c)})),this._previousInterval=n,this._nextInterval=a,this._lastRenderedFrame=u,u=this._totalMemoryUsageInBytes,1024*this.maximumMemoryUsage*1024<u&&unloadFrames(this,getUnloadCondition(e)),d=d.length-r,defined(t)&&t.attenuation&&t.eyeDomeLighting&&0<d&&i.update(e,r,t,this.boundingSphere)))},TimeDynamicPointCloud.prototype.isDestroyed=function(){return!1},TimeDynamicPointCloud.prototype.destroy=function(){return unloadFrames(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),destroyObject(this)};var ViewportQuadFS="varying vec2 v_textureCoordinates;\nvoid main()\n{\nczm_materialInput materialInput;\nmaterialInput.s = v_textureCoordinates.s;\nmaterialInput.st = v_textureCoordinates;\nmaterialInput.str = vec3(v_textureCoordinates, 0.0);\nmaterialInput.normalEC = vec3(0.0, 0.0, -1.0);\nczm_material material = czm_getMaterial(materialInput);\ngl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}\n";function ViewportQuad(e,t){this.show=!0,defined(e)||(e=new BoundingRectangle),this.rectangle=BoundingRectangle.clone(e),defined(t)||(t=Material.fromType(Material.ColorType,{color:new Color(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}function computeFlyToLocationForRectangle(e,t){var i=t.terrainProvider,r=t.mapProjection,n=r.ellipsoid,a=t.camera.getRectangleCameraCoordinates(e),o=t.mode===SceneMode$1.SCENE3D?n.cartesianToCartographic(a):r.unproject(a);return defined(i)?i.readyPromise.then((function(){if(!defined(i.availability)||t.mode===SceneMode$1.SCENE2D)return o;var r=[Rectangle.center(e),Rectangle.southeast(e),Rectangle.southwest(e),Rectangle.northeast(e),Rectangle.northwest(e)];return computeFlyToLocationForRectangle._sampleTerrainMostDetailed(i,r).then((function(e){var t=e.reduce((function(e,t){return Math.max(t.height,e)}),-Number.MAX_VALUE);return(e=o).height+=t,e}))})):when.resolve(o)}function createOsmBuildings(e){var t=new Cesium3DTileset(e=combine(e,{url:IonResource.fromAssetId(96188)})),i=e.style;return defined(i)||(i=new Cesium3DTileStyle({color:"Boolean(${feature['cesium#color']}) ? color(${feature['cesium#color']}) : "+defaultValue(e.defaultColor,Color.WHITE).toCssColorString()})),t.style=i,t}function createTangentSpaceDebugPrimitive(e){var t=[],i=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).geometry;defined(i.attributes)&&defined(i.primitiveType)||(i=i.constructor.createGeometry(i));var r=i.attributes,n=Matrix4.clone(defaultValue(e.modelMatrix,Matrix4.IDENTITY));e=defaultValue(e.length,1e4);if(defined(r.normal)&&t.push(new GeometryInstance({geometry:GeometryPipeline.createLineSegmentsForVectors(i,"normal",e),attributes:{color:new ColorGeometryInstanceAttribute(1,0,0,1)},modelMatrix:n})),defined(r.tangent)&&t.push(new GeometryInstance({geometry:GeometryPipeline.createLineSegmentsForVectors(i,"tangent",e),attributes:{color:new ColorGeometryInstanceAttribute(0,1,0,1)},modelMatrix:n})),defined(r.bitangent)&&t.push(new GeometryInstance({geometry:GeometryPipeline.createLineSegmentsForVectors(i,"bitangent",e),attributes:{color:new ColorGeometryInstanceAttribute(0,0,1,1)},modelMatrix:n})),0<t.length)return new Primitive({asynchronous:!1,geometryInstances:t,appearance:new PerInstanceColorAppearance({flat:!0,translucent:!1})})}function createWorldImagery(e){return e=defaultValue(e,defaultValue.EMPTY_OBJECT),new IonImageryProvider({assetId:defaultValue(e.style,IonWorldImageryStyle$1.AERIAL)})}ViewportQuad.prototype.update=function(e){var t,i;this.show&&(defined(i=this._rs)&&BoundingRectangle.equals(i.viewport,this.rectangle)||(this._rs=RenderState.fromCache({blending:BlendingState$1.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render&&(t=e.context,this._material===this.material&&defined(this._overlayCommand)||(this._material=this.material,defined(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy(),i=new ShaderSource({sources:[this._material.shaderSource,ViewportQuadFS]}),this._overlayCommand=t.createViewportQuadCommand(i,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Pass$1.OVERLAY),this._material.update(t),this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)))},ViewportQuad.prototype.isDestroyed=function(){return!1},ViewportQuad.prototype.destroy=function(){return defined(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),destroyObject(this)},computeFlyToLocationForRectangle._sampleTerrainMostDetailed=sampleTerrainMostDetailed;var tmp$6={},uEj,vEj,wEj,xEj,yEj,zEj,eGj_unstuff,eGj_unstuffLUT,eGj_unstuff2,eGj_unstuffLUT2,eGj_originalUnstuff,eGj_originalUnstuff2,fGj,gGj,xMj,qEj,rEj,sEj,tEj;uEj={defaultNoDataValue:-34027999387901484e22,decode:function(e,t){var i=(t=t||{}).encodedMaskData||null===t.encodedMaskData,r=yEj(e,t.inputOffset||0,i);e=null!==t.noDataValue?t.noDataValue:uEj.defaultNoDataValue,i=vEj(r,t.pixelType||Float32Array,t.encodedMaskData,e,t.returnMask),e={width:r.width,height:r.height,pixelData:i.resultPixels,minValue:i.minValue,maxValue:r.pixels.maxValue,noDataValue:e};return i.resultMask&&(e.maskData=i.resultMask),t.returnEncodedMask&&r.mask&&(e.encodedMaskData=r.mask.bitset?r.mask.bitset:null),t.returnFileInfo&&(e.fileInfo=wEj(r),t.computeUsedBitDepths&&(e.fileInfo.bitDepths=xEj(r))),e}},vEj=function(e,t,i,r,n){var a,o,s,l=0,c=e.pixels.numBlocksX,u=e.pixels.numBlocksY,d=Math.floor(e.width/c),h=Math.floor(e.height/u),p=2*e.maxZError,f=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),o=new t(e.width*e.height),n&&i&&(s=new Uint8Array(e.width*e.height));for(var m,g,y=new Float32Array(d*h),_=0;_<=u;_++){var v=_!==u?h:e.height%u;if(0!==v)for(var C=0;C<=c;C++){var x=C!==c?d:e.width%c;if(0!==x){var b,S,T,E,w=_*e.width*h+C*d,A=e.width-x,P=e.pixels.blocks[l];if(P.encoding<2?(b=0===P.encoding?P.rawData:(zEj(P.stuffedData,P.bitsPerPixel,P.numValidPixels,P.offset,p,y,e.pixels.maxValue),y),S=0):T=2===P.encoding?0:P.offset,i)for(g=0;g<v;g++){for(7&w&&(E=i[w>>3],E<<=7&w),m=0;m<x;m++)7&w||(E=i[w>>3]),128&E?(s&&(s[w]=1),f=(a=P.encoding<2?b[S++]:T)<f?a:f,o[w++]=a):(s&&(s[w]=0),o[w++]=r),E<<=1;w+=A}else if(P.encoding<2)for(g=0;g<v;g++){for(m=0;m<x;m++)f=(a=b[S++])<f?a:f,o[w++]=a;w+=A}else for(f=T<f?T:f,g=0;g<v;g++){for(m=0;m<x;m++)o[w++]=T;w+=A}if(1===P.encoding&&S!==P.numValidPixels)throw"Block and Mask do not match";l++}}}return{resultPixels:o,resultMask:s,minValue:f}},wEj=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},xEj=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},r=0;r<t;r++){var n=e.pixels.blocks[r];0===n.encoding?i.float32=!0:1===n.encoding?i[n.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},yEj=function(e,t,i){var r={},n=new Uint8Array(e,t,10);if(r.fileIdentifierString=String.fromCharCode.apply(null,n),"CntZImage"!==r.fileIdentifierString.trim())throw"Unexpected file identifier string: "+r.fileIdentifierString;t+=10;var a=new DataView(e,t,24);if(r.fileVersion=a.getInt32(0,!0),r.imageType=a.getInt32(4,!0),r.height=a.getUint32(8,!0),r.width=a.getUint32(12,!0),r.maxZError=a.getFloat64(16,!0),t+=24,!i)if(a=new DataView(e,t,16),r.mask={},r.mask.numBlocksY=a.getUint32(0,!0),r.mask.numBlocksX=a.getUint32(4,!0),r.mask.numBytes=a.getUint32(8,!0),r.mask.maxValue=a.getFloat32(12,!0),t+=16,0<r.mask.numBytes){var o=new Uint8Array(Math.ceil(r.width*r.height/8)),s=(a=new DataView(e,t,r.mask.numBytes)).getInt16(0,!0),l=2,c=0;do{if(0<s)for(;s--;)o[c++]=a.getUint8(l++);else{var u=a.getUint8(l++);for(s=-s;s--;)o[c++]=u}s=a.getInt16(l,!0),l+=2}while(l<r.mask.numBytes);if(-32768!==s||c<o.length)throw"Unexpected end of mask RLE encoding";r.mask.bitset=o,t+=r.mask.numBytes}else 0==(r.mask.numBytes|r.mask.numBlocksY|r.mask.maxValue)&&(r.mask.bitset=new Uint8Array(Math.ceil(r.width*r.height/8)));a=new DataView(e,t,16),r.pixels={},r.pixels.numBlocksY=a.getUint32(0,!0),r.pixels.numBlocksX=a.getUint32(4,!0),r.pixels.numBytes=a.getUint32(8,!0),r.pixels.maxValue=a.getFloat32(12,!0),t+=16;n=r.pixels.numBlocksX,i=r.pixels.numBlocksY;var d=n+(0<r.width%n?1:0),h=i+(0<r.height%i?1:0);r.pixels.blocks=new Array(d*h);for(var p=0,f=0;f<h;f++)for(var m=0;m<d;m++){var g=0,y=e.byteLength-t;a=new DataView(e,t,Math.min(10,y));var _={};r.pixels.blocks[p++]=_;var v;y=a.getUint8(0);if(g++,_.encoding=63&y,3<_.encoding)throw"Invalid block encoding ("+_.encoding+")";if(2!==_.encoding){if(0!==y&&2!==y){if(y>>=6,2===(_.offsetType=y))_.offset=a.getInt8(1),g++;else if(1===y)_.offset=a.getInt16(1,!0),g+=2;else{if(0!==y)throw"Invalid block offset type";_.offset=a.getFloat32(1,!0),g+=4}if(1===_.encoding)if(y=a.getUint8(g),g++,_.bitsPerPixel=63&y,y>>=6,2===(_.numValidPixelsType=y))_.numValidPixels=a.getUint8(g),g++;else if(1===y)_.numValidPixels=a.getUint16(g,!0),g+=2;else{if(0!==y)throw"Invalid valid pixel count type";_.numValidPixels=a.getUint32(g,!0),g+=4}}if(t+=g,3!==_.encoding)if(0===_.encoding){var C=(r.pixels.numBytes-1)/4;if(C!==Math.floor(C))throw"uncompressed block has invalid length";v=new ArrayBuffer(4*C),new Uint8Array(v).set(new Uint8Array(e,t,4*C));var x=new Float32Array(v);_.rawData=x,t+=4*C}else 1===_.encoding&&(x=Math.ceil(_.numValidPixels*_.bitsPerPixel/8),C=Math.ceil(x/4),v=new ArrayBuffer(4*C),new Uint8Array(v).set(new Uint8Array(e,t,x)),_.stuffedData=new Uint32Array(v),t+=x)}else t++}return r.eofOffset=t,r},zEj=function(e,t,i,r,n,a,o){var s,l,c,u,d=(1<<t)-1,h=0,p=0,f=Math.ceil((o-r)/n),m=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*m,s=0;s<i;s++)0===p&&(u=e[h++],p=32),t<=p?(c=u>>>p-t&d,p-=t):(c=(u&d)<<(l=t-p)&d,c+=(u=e[h++])>>>(p=32-l)),a[s]=c<f?r+c*n:o;return a},qEj=uEj,eGj_unstuff=function(e,t,i,r,n,a,o,s){var l,c,u,d,h,p=(1<<i)-1,f=0,m=0,g=4*e.length-Math.ceil(i*r/8);if(e[e.length-1]<<=8*g,n)for(l=0;l<r;l++)0===m&&(u=e[f++],m=32),i<=m?(c=u>>>m-i&p,m-=i):(c=(u&p)<<(d=i-m)&p,c+=(u=e[f++])>>>(m=32-d)),t[l]=n[c];else for(h=Math.ceil((s-a)/o),l=0;l<r;l++)0===m&&(u=e[f++],m=32),i<=m?(c=u>>>m-i&p,m-=i):(c=(u&p)<<(d=i-m)&p,c+=(u=e[f++])>>>(m=32-d)),t[l]=c<h?a+c*o:s},eGj_unstuffLUT=function(e,t,i,r,n,a){var o,s,l=(1<<t)-1,c=0,u=0,d=0,h=0,p=[],f=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*f;var m=Math.ceil((a-r)/n);for(u=0;u<i;u++)0===d&&(s=e[c++],d=32),t<=d?(h=s>>>d-t&l,d-=t):(h=(s&l)<<(o=t-d)&l,h+=(s=e[c++])>>>(d=32-o)),p[u]=h<m?r+h*n:a;return p.unshift(r),p},eGj_unstuff2=function(e,t,i,r,n,a,o,s){var l,c,u,d=(1<<i)-1,h=0,p=0,f=0;if(n)for(g=0;g<r;g++)0===p&&(c=e[h++],p=32,f=0),i<=p?(l=c>>>f&d,p-=i,f+=i):(l=c>>>f&d,p=32-(u=i-p),l|=((c=e[h++])&(1<<u)-1)<<i-u,f=u),t[g]=n[l];else for(var m=Math.ceil((s-a)/o),g=0;g<r;g++)0===p&&(c=e[h++],p=32,f=0),i<=p?(l=c>>>f&d,p-=i,f+=i):(l=c>>>f&d,p=32-(u=i-p),l|=((c=e[h++])&(1<<u)-1)<<i-u,f=u),t[g]=l<m?a+l*o:s;return t},eGj_unstuffLUT2=function(e,t,i,r,n,a){var o,s,l=(1<<t)-1,c=0,u=0,d=0,h=0,p=0,f=[],m=Math.ceil((a-r)/n);for(u=0;u<i;u++)0===d&&(s=e[c++],d=32,p=0),t<=d?(h=s>>>p&l,d-=t,p+=t):(h=s>>>p&l,d=32-(o=t-d),h|=((s=e[c++])&(1<<o)-1)<<t-o,p=o),f[u]=h<m?r+h*n:a;return f.unshift(r),f},eGj_originalUnstuff=function(e,t,i,r){var n,a,o,s,l=(1<<i)-1,c=0,u=0,d=4*e.length-Math.ceil(i*r/8);for(e[e.length-1]<<=8*d,n=0;n<r;n++)0===u&&(o=e[c++],u=32),i<=u?(a=o>>>u-i&l,u-=i):(a=(o&l)<<(s=i-u)&l,a+=(o=e[c++])>>>(u=32-s)),t[n]=a;return t},eGj_originalUnstuff2=function(e,t,i,r){for(var n,a,o,s=(1<<i)-1,l=0,c=0,u=0,d=0;d<r;d++)0===c&&(a=e[l++],c=32,u=0),i<=c?(n=a>>>u&s,c-=i,u+=i):(n=a>>>u&s,c=32-(o=i-c),n|=((a=e[l++])&(1<<o)-1)<<i-o,u=o),t[d]=n;return t},fGj={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,r=e.length,n=Math.floor(r/2),a=0;n;){var o=359<=n?359:n;for(n-=o;t+=e[a++]<<8,i+=t+=e[a++],--o;);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&r&&(i+=t+=e[a]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,r=new Uint8Array(e,i,6),n={};if(n.fileIdentifierString=String.fromCharCode.apply(null,r),0!==n.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+n.fileIdentifierString;i+=6;var a=new DataView(e,i,8);r=a.getInt32(0,!0);if(i+=4,3<=(n.fileVersion=r)&&(n.checksum=a.getUint32(4,!0),i+=4),a=new DataView(e,i,12),n.height=a.getUint32(0,!0),n.width=a.getUint32(4,!0),i+=8,4<=r?(n.numDims=a.getUint32(8,!0),i+=4):n.numDims=1,a=new DataView(e,i,40),n.numValidPixel=a.getUint32(0,!0),n.microBlockSize=a.getInt32(4,!0),n.blobSize=a.getInt32(8,!0),n.imageType=a.getInt32(12,!0),n.maxZError=a.getFloat64(16,!0),n.zMin=a.getFloat64(24,!0),n.zMax=a.getFloat64(32,!0),i+=40,t.headerInfo=n,t.ptr=i,3<=r&&(r=4<=r?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-r,n.blobSize-14))!==n.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,r=this.getDataTypeArray(i.imageType),n=i.numDims*this.getDataTypeSize(i.imageType),a=this.readSubArray(e,t.ptr,r,n),o=this.readSubArray(e,t.ptr+n,r,n);t.ptr+=2*n;for(var s=!0,l=0;l<i.numDims;l++)if(a[l]!==o[l]){s=!1;break}return i.minValues=a,i.maxValues=o,s},readSubArray:function(e,t,i,r){var n=i===Uint8Array?new Uint8Array(e,t,r):(n=new ArrayBuffer(r),new Uint8Array(n).set(new Uint8Array(e,t,r)),new i(n));return n},readMask:function(e,t){var i,r,n=t.ptr,a=(o=t.headerInfo).width*o.height,o=o.numValidPixel,s=new DataView(e,n,4),l={};if(l.numBytes=s.getUint32(0,!0),n+=4,(0===o||a===o)&&0!==l.numBytes)throw"invalid mask";if(0===o)i=new Uint8Array(Math.ceil(a/8)),l.bitset=i,r=new Uint8Array(a),t.pixels.resultMask=r,n+=l.numBytes;else if(0<l.numBytes){i=new Uint8Array(Math.ceil(a/8));var c,u=(s=new DataView(e,n,l.numBytes)).getInt16(0,!0),d=2,h=0;do{if(0<u)for(;u--;)i[h++]=s.getUint8(d++);else for(c=s.getUint8(d++),u=-u;u--;)i[h++]=c;u=s.getInt16(d,!0),d+=2}while(d<l.numBytes);if(-32768!==u||h<i.length)throw"Unexpected end of mask RLE encoding";r=new Uint8Array(a);var p=0,f=0;for(f=0;f<a;f++)7&f?(p=i[f>>3],p<<=7&f):p=i[f>>3],128&p&&(r[f]=1);t.pixels.resultMask=r,l.bitset=i,n+=l.numBytes}return t.ptr=n,t.mask=l,!0},readDataOneSweep:function(e,t,i){var r=t.ptr,n=(s=t.headerInfo).numDims,a=s.width*s.height,o=s.imageType,s=s.numValidPixel*fGj.getDataTypeSize(o)*n,l=t.pixels.resultMask,c=i===Uint8Array?new Uint8Array(e,r,s):(o=new ArrayBuffer(s),new Uint8Array(o).set(new Uint8Array(e,r,s)),new i(o));if(c.length===a*n)t.pixels.resultPixels=c;else{t.pixels.resultPixels=new i(a*n);var u,d=0,h=0,p=0;if(1<n)for(p=0;p<n;p++)for(u=p*a,h=0;h<a;h++)l[h]&&(t.pixels.resultPixels[u+h]=c[d++]);else for(h=0;h<a;h++)l[h]&&(t.pixels.resultPixels[h]=c[d++])}return r+=s,t.ptr=r,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,r=new DataView(e,t.ptr,16);if(t.ptr+=16,r.getInt32(0,!0)<2)throw"unsupported Huffman version";var n=r.getInt32(4,!0),a=r.getInt32(8,!0),o=r.getInt32(12,!0);if(o<=a)return!1;var s=new Uint32Array(o-a);fGj.decodeBits(e,t,s);for(var l,c,u,d=[],h=a;h<o;h++)d[l=h-(h<n?0:n)]={first:s[h-a],second:null};var p=e.byteLength-t.ptr;r=Math.ceil(p/4),r=new ArrayBuffer(4*r);new Uint8Array(r).set(new Uint8Array(e,t.ptr,p));var f=new Uint32Array(r),m=0,g=0,y=f[0];for(h=a;h<o;h++)0<(u=d[l=h-(h<n?0:n)].first)&&(d[l].second=y<<m>>>32-u,u<=32-m?32===(m+=u)&&(m=0,y=f[++g]):(m+=u-32,y=f[++g],d[l].second|=y>>>32-m));var _,v=0,C=new gGj;for(h=0;h<d.length;h++)void 0!==d[h]&&(v=Math.max(v,d[h].first));_=i<=v?i:v,30<=v&&console.log("WARning, large NUM LUT BITS IS "+v);var x,b,S,T,E,w=[];for(h=a;h<o;h++)if(0<(u=d[l=h-(h<n?0:n)].first))if(x=[u,l],u<=_)for(b=d[l].second<<_-u,S=1<<_-u,c=0;c<S;c++)w[b|c]=x;else for(b=d[l].second,E=C,T=u-1;0<=T;T--)E=b>>>T&1?(E.right||(E.right=new gGj),E.right):(E.left||(E.left=new gGj),E.left),0!==T||E.val||(E.val=x[1]);return{decodeLut:w,numBitsLUTQick:_,numBitsLUT:v,tree:C,stuffedData:f,srcPtr:g,bitPos:m}},readHuffman:function(e,t,i){var r,n,a,o,s,l,c,u,d,h=t.headerInfo,p=h.numDims,f=t.headerInfo.height,m=t.headerInfo.width,g=m*f,y=(e=this.readHuffmanTree(e,t)).decodeLut,_=e.tree,v=e.stuffedData,C=e.srcPtr,x=e.bitPos,b=e.numBitsLUTQick,S=e.numBitsLUT,T=0===t.headerInfo.imageType?128:0,E=t.pixels.resultMask,w=0;0<x&&(C++,x=0);for(var A=v[C],P=1===t.encodeMode,D=new i(g*p),M=D,I=0;I<h.numDims;I++){if(1<p&&(M=new i(D.buffer,g*I,g),w=0),t.headerInfo.numValidPixel===m*f)for(l=u=0;l<f;l++)for(c=0;c<m;c++,u++){if(n=0,s=o=A<<x>>>32-b,32-x<b&&(s=o|=v[C+1]>>>64-x-b),y[s])n=y[s][1],x+=y[s][0];else for(s=o=A<<x>>>32-S,32-x<S&&(s=o|=v[C+1]>>>64-x-S),r=_,d=0;d<S;d++)if(!(r=o>>>S-d-1&1?r.right:r.left).left&&!r.right){n=r.val,x=x+d+1;break}32<=x&&(x-=32,A=v[++C]),a=n-T,P?(a+=!(0<c)&&0<l?M[u-m]:w,a&=255,w=M[u]=a):M[u]=a}else for(l=u=0;l<f;l++)for(c=0;c<m;c++,u++)if(E[u]){if(n=0,s=o=A<<x>>>32-b,32-x<b&&(s=o|=v[C+1]>>>64-x-b),y[s])n=y[s][1],x+=y[s][0];else for(s=o=A<<x>>>32-S,32-x<S&&(s=o|=v[C+1]>>>64-x-S),r=_,d=0;d<S;d++)if(!(r=o>>>S-d-1&1?r.right:r.left).left&&!r.right){n=r.val,x=x+d+1;break}32<=x&&(x-=32,A=v[++C]),a=n-T,P?(!(0<c&&E[u-1])&&0<l&&E[u-m]?a+=M[u-m]:a+=w,a&=255,w=M[u]=a):M[u]=a}t.ptr=t.ptr+4*(C+1)+(0<x?4:0)}t.pixels.resultPixels=D},decodeBits:function(e,t,i,r,n){var a=(v=t.headerInfo).fileVersion,o=0,s=5<=e.byteLength-t.ptr?5:e.byteLength-t.ptr,l=new DataView(e,t.ptr,s);o++;var c=0==(u=(d=l.getUint8(0))>>6)?4:3-u,u=(s=0<(32&d),31&d),d=0;if(1==c)d=l.getUint8(o),o++;else if(2==c)d=l.getUint16(o,!0),o+=2;else{if(4!=c)throw"Invalid valid pixel count type";d=l.getUint32(o,!0),o+=4}c=2*v.maxZError;var h,p,f,m,g,y,_,v=1<v.numDims?v.maxValues[n]:v.zMax;if(s){for(t.counter.lut++,y=l.getUint8(o),o++,m=Math.ceil((y-1)*u/8),g=Math.ceil(m/4),p=new ArrayBuffer(4*g),f=new Uint8Array(p),t.ptr+=o,f.set(new Uint8Array(e,t.ptr,m)),l=new Uint32Array(p),t.ptr+=m,_=0;y-1>>>_;)_++;m=Math.ceil(d*_/8),g=Math.ceil(m/4),p=new ArrayBuffer(4*g),(f=new Uint8Array(p)).set(new Uint8Array(e,t.ptr,m)),h=new Uint32Array(p),t.ptr+=m,l=(3<=a?eGj_unstuffLUT2:eGj_unstuffLUT)(l,u,y-1,r,c,v),(3<=a?eGj_unstuff2:eGj_unstuff)(h,i,_,d,l)}else t.counter.bitstuffer++,_=u,t.ptr+=o,0<_&&(m=Math.ceil(d*_/8),g=Math.ceil(m/4),p=new ArrayBuffer(4*g),(f=new Uint8Array(p)).set(new Uint8Array(e,t.ptr,m)),h=new Uint32Array(p),t.ptr+=m,3<=a?null===r?eGj_originalUnstuff2(h,i,_,d):eGj_unstuff2(h,i,_,d,!1,r,c,v):null===r?eGj_originalUnstuff(h,i,_,d):eGj_unstuff(h,i,_,d,!1,r,c,v))},readTiles:function(e,t,i){var r=t.headerInfo,n=r.width,a=r.height,o=r.microBlockSize,s=r.imageType,l=fGj.getDataTypeSize(s),c=Math.ceil(n/o),u=Math.ceil(a/o);t.pixels.numBlocksY=u,t.pixels.numBlocksX=c;var d,h,p,f,m,g,y,_,v,C,x,b,S,T,E=t.pixels.ptr=0,w=0,A=0,P=0,D=0,M=0,I=0,R=0,O=new i(o*o),L=a%o||o,N=n%o||o,F=r.numDims,B=t.pixels.resultMask,V=t.pixels.resultPixels;for(A=0;A<u;A++)for(d=A!==u-1?o:L,P=0;P<c;P++)for(D=A*n*o+P*o,g=n-(h=P!==c-1?o:N),T=0;T<F;T++){if(1<F&&(V=new i(t.pixels.resultPixels.buffer,n*a*T*l,n*a)),p=e.byteLength-t.ptr,v={},R=0,R++,m=(f=(_=new DataView(e,t.ptr,Math.min(10,p))).getUint8(0))>>6&255,(f>>2&15)!=(P*o>>3&15))throw"integrity issue";if(3<(x=3&f))throw t.ptr+=R,"Invalid block encoding ("+x+")";if(2!=x)if(0==x){if(t.counter.uncompressed++,t.ptr+=R,M=(M=d*h*l)<(y=e.byteLength-t.ptr)?M:y,b=new ArrayBuffer(M%l==0?M:M+l-M%l),new Uint8Array(b).set(new Uint8Array(e,t.ptr,M)),C=new i(b),I=0,B)for(E=0;E<d;E++){for(w=0;w<h;w++)B[D]&&(V[D]=C[I++]),D++;D+=g}else for(E=0;E<d;E++){for(w=0;w<h;w++)V[D++]=C[I++];D+=g}t.ptr+=I*l}else if(b=fGj.getDataTypeUsed(s,m),S=fGj.getOnePixel(v,R,b,_),R+=fGj.getDataTypeSize(b),3==x)if(t.ptr+=R,t.counter.constantoffset++,B)for(E=0;E<d;E++){for(w=0;w<h;w++)B[D]&&(V[D]=S),D++;D+=g}else for(E=0;E<d;E++){for(w=0;w<h;w++)V[D++]=S;D+=g}else if(t.ptr+=R,fGj.decodeBits(e,t,O,S,T),R=0,B)for(E=0;E<d;E++){for(w=0;w<h;w++)B[D]&&(V[D]=O[R++]),D++;D+=g}else for(E=0;E<d;E++){for(w=0;w<h;w++)V[D++]=O[R++];D+=g}else t.counter.constant++,t.ptr+=R}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:fGj.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t,i=e.headerInfo.zMax,r=e.headerInfo.numDims,n=e.headerInfo.height*e.headerInfo.width,a=n*r,o=0,s=0,l=e.pixels.resultMask;if(l)if(1<r)for(o=0;o<r;o++)for(t=o*n,s=0;s<n;s++)l[s]&&(e.pixels.resultPixels[t+s]=i);else for(s=0;s<n;s++)l[s]&&(e.pixels.resultPixels[s]=i);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(i);else for(s=0;s<a;s++)e.pixels.resultPixels[s]=i},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:t=Float32Array;break;case 7:t=Float64Array;break;default:t=Float32Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:t="F32";break;case 7:t="F64";break;default:t="F32"}return t},isValidPixelValue:function(e,t){if(null===t)return!1;var i;switch(e){case 0:i=-128<=t&&t<=127;break;case 1:i=0<=t&&t<=255;break;case 2:i=-32768<=t&&t<=32767;break;case 3:i=0<=t&&t<=65536;break;case 4:i=-2147483648<=t&&t<=2147483647;break;case 5:i=0<=t&&t<=4294967296;break;case 6:i=-34027999387901484e22<=t&&t<=34027999387901484e22;break;case 7:i=5e-324<=t&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,r){var n=0;switch(i){case 0:n=r.getInt8(t);break;case 1:n=r.getUint8(t);break;case 2:n=r.getInt16(t,!0);break;case 3:n=r.getUint16(t,!0);break;case 4:n=r.getInt32(t,!0);break;case 5:n=r.getUInt32(t,!0);break;case 6:n=r.getFloat32(t,!0);break;case 7:n=r.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return n}},gGj=function(e,t,i){this.val=e,this.left=t,this.right=i},rEj={decode:function(e,t){var i=(t=t||{}).noDataValue,r=0,n={};if(n.ptr=t.inputOffset||0,n.pixels={},fGj.readHeaderInfo(e,n)){var a=n.headerInfo,o=a.fileVersion,s=fGj.getDataTypeArray(a.imageType);fGj.readMask(e,n),a.numValidPixel===a.width*a.height||n.pixels.resultMask||(n.pixels.resultMask=t.maskData);var l,c=a.width*a.height;if(n.pixels.resultPixels=new s(c*a.numDims),n.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==a.numValidPixel)if(a.zMax===a.zMin)fGj.constructConstantSurface(n);else if(4<=o&&fGj.checkMinMaxRanges(e,n))fGj.constructConstantSurface(n);else{var u=new DataView(e,n.ptr,2),d=u.getUint8(0);if(n.ptr++,d)fGj.readDataOneSweep(e,n,s);else if(1<o&&a.imageType<=1&&Math.abs(a.maxZError-.5)<1e-5){if(u=u.getUint8(1),n.ptr++,2<(n.encodeMode=u)||o<4&&1<u)throw"Invalid Huffman flag "+u;u?fGj.readHuffman(e,n,s):fGj.readTiles(e,n,s)}else fGj.readTiles(e,n,s)}n.eofOffset=n.ptr,t.inputOffset?(l=n.headerInfo.blobSize+t.inputOffset-n.ptr,1<=Math.abs(l)&&(n.eofOffset=t.inputOffset+n.headerInfo.blobSize)):(l=n.headerInfo.blobSize-n.ptr,1<=Math.abs(l)&&(n.eofOffset=n.headerInfo.blobSize));var h={width:a.width,height:a.height,pixelData:n.pixels.resultPixels,minValue:a.zMin,maxValue:a.zMax,validPixelCount:a.numValidPixel,dimCount:a.numDims,dimStats:{minValues:a.minValues,maxValues:a.maxValues},maskData:n.pixels.resultMask};if(n.pixels.resultMask&&fGj.isValidPixelValue(a.imageType,i)){var p=n.pixels.resultMask;for(r=0;r<c;r++)p[r]||(h.pixelData[r]=i);h.noDataValue=i}return n.noDataValue=i,t.returnFileInfo&&(h.fileInfo=fGj.formatFileInfo(n)),h}},getBandCount:function(e){for(var t=0,i=0,r={ptr:0,pixels:{}};i<e.byteLength-58;)fGj.readHeaderInfo(e,r),i+=r.headerInfo.blobSize,t++,r.ptr=i;return t}},xMj=new ArrayBuffer(4),tEj=new Uint8Array(xMj),sEj=(new Uint32Array(xMj)[0]=1)===tEj[0],tEj={decode:function(e,t){if(!sEj)throw"Big endian system is not supported.";var i,r,n=(t=t||{}).inputOffset||0,a=new Uint8Array(e,n,10);if("CntZImage"===(a=String.fromCharCode.apply(null,a)).trim())i=qEj,r=1;else{if("Lerc2"!==a.substring(0,5))throw"Unexpected file identifier string: "+a;i=rEj,r=2}for(var o,s,l,c,u,d,h=0,p=e.byteLength-10,f=[],m={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};n<p;){var g=i.decode(e,{inputOffset:n,encodedMaskData:o,maskData:l,returnMask:0===h,returnEncodedMask:0===h,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});n=g.fileInfo.eofOffset;0===h&&(o=g.encodedMaskData,l=g.maskData,m.width=g.width,m.height=g.height,m.dimCount=g.dimCount||1,m.pixelType=g.pixelType||g.fileInfo.pixelType,m.mask=g.maskData),1<r&&g.fileInfo.mask&&0<g.fileInfo.mask.numBytes&&f.push(g.maskData),h++,m.pixels.push(g.pixelData),m.statistics.push({minValue:g.minValue,maxValue:g.maxValue,noDataValue:g.noDataValue,dimStats:g.dimStats})}if(1<r&&1<f.length){for(d=m.width*m.height,m.bandMasks=f,(l=new Uint8Array(d)).set(f[0]),c=1;c<f.length;c++)for(s=f[c],u=0;u<d;u++)l[u]=l[u]&s[u];m.maskData=l}return m}},tmp$6.Lerc=tEj;var LercDecode=tmp$6.Lerc,tmp$7={},TMj,UMj;TMj=tmp$7,UMj=function(){return i={},e.m=t=[function(e,t,i){var r=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e};function n(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=(i=i(1)).webm,o=i.mp4,s="undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream;r(l,[{key:"_addSourceToVideo",value:function(e,t,i){var r=document.createElement("source");r.src=i,r.type="video/"+t,e.appendChild(r)}},{key:"enable",value:function(){s?(this.disable(),console.warn("\n        NoSleep enabled for older iOS devices. This can interrupt\n        active or long-running network requests from completing successfully.\n        See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n      "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){s?this.noSleepTimer&&(console.warn("\n          NoSleep now disabled for older iOS devices.\n        "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),r=l;function l(){var e=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("muted",""),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",a),this._addSourceToVideo(this.noSleepVideo,"mp4",o),this.noSleepVideo.addEventListener("loadedmetadata",(function(){e.noSleepVideo.duration<=1?e.noSleepVideo.setAttribute("loop",""):e.noSleepVideo.addEventListener("timeupdate",(function(){.5<e.noSleepVideo.currentTime&&(e.noSleepVideo.currentTime=Math.random())}))})))}e.exports=r},function(e,t,i){e.exports={webm:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",mp4:"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}}],e.c=i,e.d=function(t,i,r){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.p="",e(e.s=0);function e(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var t,i},TMj.NoSleep=UMj();var NoSleep=tmp$7.NoSleep,oldValue;"undefined"!=typeof ko&&(oldValue=ko),function(e){var t=this||(0,eval)("this"),i=t.document,r=t.navigator,n=t.jQuery,a=t.JSON;n||"undefined"==typeof jQuery||(n=jQuery),function(o,s){function l(e,t){return(null===e||typeof e in m)&&e===t}function c(t,i){var r;return function(){r||(r=f.a.setTimeout((function(){r=e,t()}),i))}}function u(e,t){var i;return function(){clearTimeout(i),i=f.a.setTimeout(e,t)}}function d(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function h(e,t){null!==t&&t.s&&t.s()}function p(e,t){var i=this.qd,r=i[C];r.ra||(this.Qb&&this.mb[t]?(i.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):r.I[t]||i.uc(t,e,r.J?{da:e}:i.$c(e)),e.Ja&&e.gd())}var f=void 0!==o?o:{};f.b=function(e,t){for(var i=e.split("."),r=f,n=0;n<i.length-1;n++)r=r[i[n]];r[i[i.length-1]]=t},f.L=function(e,t,i){e[t]=i},f.version="3.5.1",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},f.a=function(){function o(e,t){for(var i in e)u.call(e,i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)u.call(t,i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function c(e,t,i,r){var n=e[t].match(v)||[];f.a.D(i.match(v),(function(e){f.a.Na(n,e,r)})),e[t]=n.join(" ")}var u=Object.prototype.hasOwnProperty,d={__proto__:[]}instanceof Array,h="function"==typeof Symbol,p={},m={};p[r&&/Firefox\/2/i.test(r.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],p.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),o(p,(function(e,t){if(t.length)for(var i=0,r=t.length;i<r;i++)m[t[i]]=e}));var g,y={propertychange:!0},_=i&&function(){for(var t=3,r=i.createElement("div"),n=r.getElementsByTagName("i");r.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",n[0];);return 4<t?t:e}(),v=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,i){for(var r=0,n=e.length;r<n;r++)t.call(i,e[r],r,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1},Lb:function(t,i,r){for(var n=0,a=t.length;n<a;n++)if(i.call(r,t[n],n,t))return t[n];return e},Pa:function(e,t){var i=f.a.A(e,t);0<i?e.splice(i,1):0===i&&e.shift()},wc:function(e){var t=[];return e&&f.a.D(e,(function(e){0>f.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,i){var r=[];if(e)for(var n=0,a=e.length;n<a;n++)r.push(t.call(i,e[n],n));return r},jb:function(e,t,i){var r=[];if(e)for(var n=0,a=e.length;n<a;n++)t.call(i,e[n],n)&&r.push(e[n]);return r},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,r=t.length;i<r;i++)e.push(t[i]);return e},Na:function(e,t,i){var r=f.a.A(f.a.bc(e),t);0>r?i&&e.push(t):i||e.splice(r,1)},Ba:d,extend:s,setPrototypeOf:l,Ab:d?l:s,P:o,Ga:function(e,t,i){if(!e)return e;var r,n={};for(r in e)u.call(e,r)&&(n[r]=t.call(i,e[r],r,e));return n},Tb:function(e){for(;e.firstChild;)f.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=f.a.la(e))[0]&&e[0].ownerDocument||i).createElement("div"),r=0,n=e.length;r<n;r++)t.appendChild(f.oa(e[r]));return t},Ca:function(e,t){for(var i=0,r=e.length,n=[];i<r;i++){var a=e[i].cloneNode(!0);n.push(t?f.oa(a):a)}return n},va:function(e,t){if(f.a.Tb(e),t)for(var i=0,r=t.length;i<r;i++)e.appendChild(t[i])},Xc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var r=i[0],n=r.parentNode,a=0,o=t.length;a<o;a++)n.insertBefore(t[a],r);for(a=0,o=i.length;a<o;a++)f.removeNode(i[a])}},Ua:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],r=e[e.length-1];for(e.length=0;i!==r;)e.push(i),i=i.nextSibling;e.push(r)}}return e},Zc:function(e,t){7>_?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return f.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!f.a.Lb(e,f.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return f.onError?function(){try{return e.apply(this,arguments)}catch(e){throw f.onError&&f.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(f.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw f.onError&&f.onError(e),e}),0)},B:function(e,t,i){var r=f.a.Ac(i);if(i=y[t],f.options.useOnlyNativeEvents||i||!n)if(i||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var a=function(t){r.call(e,t)},o="on"+t;e.attachEvent(o,a),f.a.K.za(e,(function(){e.detachEvent(o,a)}))}else e.addEventListener(t,r,!1);else g||(g="function"==typeof n(e).on?"on":"bind"),n(e)[g](t,r)},Fb:function(e,r){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var a;if("input"===f.a.R(e)&&e.type&&"click"==r.toLowerCase()?a="checkbox"==(a=e.type)||"radio"==a:a=!1,f.options.useOnlyNativeEvents||!n||a)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(a=i.createEvent(m[r]||"HTMLEvents")).initEvent(r,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(a)}else if(a&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+r)}else n(e).trigger(r)},f:function(e){return f.O(e)?e():e},bc:function(e){return f.O(e)?e.v():e},Eb:function(e,t,i){var r;t&&("object"==typeof e.classList?(r=e.classList[i?"add":"remove"],f.a.D(t.match(v),(function(t){r.call(e.classList,t)}))):"string"==typeof e.className.baseVal?c(e.className,"baseVal",t,i):c(e,"className",t,i))},Bb:function(t,i){var r=f.a.f(i);null!==r&&r!==e||(r="");var n=f.h.firstChild(t);!n||3!=n.nodeType||f.h.nextSibling(n)?f.h.va(t,[t.ownerDocument.createTextNode(r)]):n.data=r,f.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=_)try{var r=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(i.createElement("<input name='"+r+"'/>"),!1)}catch(e){}},Ad:function(e){9<=_&&((e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom))},wd:function(e){if(_){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=f.a.f(e),t=f.a.f(t);for(var i=[],r=e;r<=t;r++)i.push(r);return i},la:function(e){for(var t=[],i=0,r=e.length;i<r;i++)t.push(e[i]);return t},Da:function(e){return h?Symbol(e):e},Zd:6===_,$d:7===_,W:_,Lc:function(e,t){for(var i=f.a.la(e.getElementsByTagName("input")).concat(f.a.la(e.getElementsByTagName("textarea"))),r="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},n=[],a=i.length-1;0<=a;a--)r(i[a])&&n.push(i[a]);return n},Nd:function(e){return"string"==typeof e&&(e=f.a.Db(e))?a&&a.parse?a.parse(e):new Function("return "+e)():null},hc:function(e,t,i){if(!a||!a.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return a.stringify(f.a.f(e),t,i)},Od:function(e,t,r){var n=(r=r||{}).params||{},a=r.includeFields||this.Jc,s=e;if("object"==typeof e&&"form"===f.a.R(e)){s=e.action;for(var l=a.length-1;0<=l;l--)for(var c=f.a.Lc(e,a[l]),u=c.length-1;0<=u;u--)n[c[u].name]=c[u].value}t=f.a.f(t);var d=i.createElement("form");for(var h in d.style.display="none",d.action=s,d.method="post",t)(e=i.createElement("input")).type="hidden",e.name=h,e.value=f.a.hc(f.a.f(t[h])),d.appendChild(e);o(n,(function(e,t){var r=i.createElement("input");r.type="hidden",r.name=e,r.value=t,d.appendChild(r)})),i.body.appendChild(d),r.submitter?r.submitter(d):d.submit(),setTimeout((function(){d.parentNode.removeChild(d)}),0)}}}(),f.b("utils",f.a),f.b("utils.arrayForEach",f.a.D),f.b("utils.arrayFirst",f.a.Lb),f.b("utils.arrayFilter",f.a.jb),f.b("utils.arrayGetDistinctValues",f.a.wc),f.b("utils.arrayIndexOf",f.a.A),f.b("utils.arrayMap",f.a.Mb),f.b("utils.arrayPushAll",f.a.Nb),f.b("utils.arrayRemoveItem",f.a.Pa),f.b("utils.cloneNodes",f.a.Ca),f.b("utils.createSymbolOrString",f.a.Da),f.b("utils.extend",f.a.extend),f.b("utils.fieldsIncludedWithJsonPost",f.a.Jc),f.b("utils.getFormFields",f.a.Lc),f.b("utils.objectMap",f.a.Ga),f.b("utils.peekObservable",f.a.bc),f.b("utils.postJson",f.a.Od),f.b("utils.parseJson",f.a.Nd),f.b("utils.registerEventHandler",f.a.B),f.b("utils.stringifyJson",f.a.hc),f.b("utils.range",f.a.Pd),f.b("utils.toggleDomNodeCssClass",f.a.Eb),f.b("utils.triggerEvent",f.a.Fb),f.b("utils.unwrapObservable",f.a.f),f.b("utils.objectForEach",f.a.P),f.b("utils.addOrRemoveItem",f.a.Na),f.b("utils.setTextContent",f.a.Bb),f.b("unwrap",f.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var r=i.slice(0);return r.push.apply(r,arguments),t.apply(e,r)}}),f.a.g=new function(){var t,i,r=0,n="__ko__"+(new Date).getTime(),a={};return f.a.W?(t=function(t,i){var o=t[n];if(!o||"null"===o||!a[o]){if(!i)return e;o=t[n]="ko"+r++,a[o]={}}return a[o]},i=function(e){var t=e[n];return!!t&&(delete a[t],e[n]=null,!0)}):(t=function(e,t){var i=e[n];return!i&&t&&(i=e[n]={}),i},i=function(e){return!!e[n]&&(delete e[n],!0)}),{get:function(e,i){var r=t(e,!1);return r&&r[i]},set:function(i,r,n){(i=t(i,n!==e))&&(i[r]=n)},Ub:function(e,i,r){return(e=t(e,!0))[i]||(e[i]=r)},clear:i,Z:function(){return r+++n}}},f.b("utils.domData",f.a.g),f.b("utils.domData.clear",f.a.g.clear),f.a.K=new function(){function t(t,i){var r=f.a.g.get(t,a);return r===e&&i&&(r=[],f.a.g.set(t,a,r)),r}function i(e){if(i=t(e,!1))for(var i=i.slice(0),n=0;n<i.length;n++)i[n](e);f.a.g.clear(e),f.a.K.cleanExternalData(e),s[e.nodeType]&&r(e.childNodes,!0)}function r(e,t){for(var r,n=[],a=0;a<e.length;a++)if((!t||8===e[a].nodeType)&&(i(n[n.length]=r=e[a]),e[a]!==r))for(;a--&&-1==f.a.A(n,e[a]););}var a=f.a.g.Z(),o={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{za:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},yb:function(i,r){var n=t(i,!1);n&&(f.a.Pa(n,r),0==n.length&&f.a.g.set(i,a,e))},oa:function(e){return f.u.G((function(){o[e.nodeType]&&(i(e),s[e.nodeType]&&r(e.getElementsByTagName("*")))})),e},removeNode:function(e){f.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){n&&"function"==typeof n.cleanData&&n.cleanData([e])}}},f.oa=f.a.K.oa,f.removeNode=f.a.K.removeNode,f.b("cleanNode",f.oa),f.b("removeNode",f.removeNode),f.b("utils.domNodeDisposal",f.a.K),f.b("utils.domNodeDisposal.addDisposeCallback",f.a.K.za),f.b("utils.domNodeDisposal.removeDisposeCallback",f.a.K.yb),function(){var r=[0,"",""],a=[1,"<table>","</table>"],o=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:a,tbody:a,tfoot:a,tr:[2,"<table><tbody>","</tbody></table>"],td:o,th:o,option:s,optgroup:s},c=8>=f.a.W;f.a.ua=function(e,a){var o;if(n){if(n.parseHTML)o=n.parseHTML(e,a)||[];else if((o=n.clean([e],a))&&o[0]){for(var s=o[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(o=a)||(o=i);s=o.parentWindow||o.defaultView||t;var u,d=f.a.Db(e).toLowerCase(),h=o.createElement("div");for(u=(d=d.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[d[1]]||r,d=u[0],u="ignored<div>"+u[1]+e+u[2]+"</div>","function"==typeof s.innerShiv?h.appendChild(s.innerShiv(u)):(c&&o.body.appendChild(h),h.innerHTML=u,c&&h.parentNode.removeChild(h));d--;)h=h.lastChild;o=f.a.la(h.lastChild.childNodes)}return o},f.a.Md=function(e,t){var i=f.a.ua(e,t);return i.length&&i[0].parentElement||f.a.Yb(i)},f.a.fc=function(t,i){if(f.a.Tb(t),null!==(i=f.a.f(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),n)n(t).html(i);else for(var r=f.a.ua(i,t.ownerDocument),a=0;a<r.length;a++)t.appendChild(r[a])}}(),f.b("utils.parseHtmlFragment",f.a.ua),f.b("utils.setHtml",f.a.fc),f.aa=function(){var t={};return{Xb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var i=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return t[i]=e,"\x3c!--[ko_memo:"+i+"]--\x3e"},bd:function(i,r){var n=t[i];if(n===e)throw Error("Couldn't find any memo with ID "+i+". Perhaps it's already been unmemoized.");try{return n.apply(null,r||[]),!0}finally{delete t[i]}},cd:function(e,t){var i=[];!function e(t,i){if(t)if(8==t.nodeType){null!=(r=f.aa.Uc(t.nodeValue))&&i.push({ud:t,Kd:r})}else if(1==t.nodeType)for(var r=0,n=t.childNodes,a=n.length;r<a;r++)e(n[r],i)}(e,i);for(var r=0,n=i.length;r<n;r++){var a=i[r].ud,o=[a];t&&f.a.Nb(o,t),f.aa.bd(i[r].Kd,o),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),f.b("memoization",f.aa),f.b("memoization.memoize",f.aa.Xb),f.b("memoization.unmemoize",f.aa.bd),f.b("memoization.parseMemoText",f.aa.Uc),f.b("memoization.unmemoizeDomNodeAndDescendants",f.aa.cd),f.na=function(){function e(){if(a)for(var e,t=a,i=0;s<a;)if(e=n[s++]){if(s>t){if(5e3<=++i){s=a,f.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=a}try{e()}catch(t){f.a.Gc(t)}}}function r(){e(),s=a=n.length=0}var n=[],a=0,o=1,s=0;return{scheduler:t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(r):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},zb:function(e){return a||f.na.scheduler(r),n[a++]=e,o++},cancel:function(e){(e-=o-a)>=s&&e<a&&(n[e]=null)},resetForTesting:function(){var e=a-s;return s=a=n.length=0,e},Sd:e}}(),f.b("tasks",f.na),f.b("tasks.schedule",f.na.zb),f.b("tasks.runEarly",f.na.Sd),f.Ta={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return f.$({read:e,write:function(r){clearTimeout(i),i=f.a.setTimeout((function(){e(r)}),t)}})},rateLimit:function(e,t){var i,r,n;"number"==typeof t?i=t:(i=t.timeout,r=t.method),e.Hb=!1,n="function"==typeof r?r:"notifyWhenChangesStop"==r?u:c,e.ub((function(e){return n(e,i,t)}))},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.Hb||(t.Hb=!0,t.ub((function(i){var r,n=!1;return function(){if(!n){f.na.cancel(r),r=f.na.zb(i);try{n=!0,t.notifySubscribers(e,"dirty")}finally{n=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var m={undefined:1,boolean:1,number:1,string:1};f.b("extenders",f.Ta),f.ic=function(e,t,i){this.da=e,this.lc=t,this.mc=i,this.Ib=!1,this.fb=this.Jb=null,f.L(this,"dispose",this.s),f.L(this,"disposeWhenNodeIsRemoved",this.l)},f.ic.prototype.s=function(){this.Ib||(this.fb&&f.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},f.ic.prototype.l=function(e){this.Jb=e,f.a.K.za(e,this.fb=this.s.bind(this))},f.T=function(){f.a.Ab(this,g),g.qb(this)};var g={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,i){var r=this;i=i||"change";var n=new f.ic(r,t?e.bind(t):e,(function(){f.a.Pa(r.U[i],n),r.hb&&r.hb(i)}));return r.Qa&&r.Qa(i),r.U[i]||(r.U[i]=[]),r.U[i].push(n),n},notifySubscribers:function(e,t){if("change"===(t=t||"change")&&this.Gb(),this.Wa(t)){var i="change"===t&&this.ed||this.U[t].slice(0);try{f.u.xc();for(var r,n=0;r=i[n];++n)r.Ib||r.lc(e)}finally{f.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,i,r,n,a,o=this,s=f.O(o);o.gb||(o.gb=o.notifySubscribers,o.notifySubscribers=d);var l=e((function(){o.Ja=!1,s&&n===o&&(n=o.nc?o.nc():o());var e=i||a&&o.sb(r,n);a=i=t=!1,e&&o.gb(r=n)}));o.qc=function(e,i){i&&o.Ja||(a=!i),o.ed=o.U.change.slice(0),o.Ja=t=!0,n=e,l()},o.pc=function(e){t||(r=e,o.gb(e,"beforeChange"))},o.rc=function(){a=!0},o.gd=function(){o.sb(r,o.v(!0))&&(i=!0)}},Wa:function(e){return this.U[e]&&this.U[e].length},Bd:function(e){if(e)return this.U[e]&&this.U[e].length||0;var t=0;return f.a.P(this.U,(function(e,i){"dirty"!==e&&(t+=i.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&f.a.P(e,(function(e,i){var r=f.Ta[e];"function"==typeof r&&(t=r(t,i)||t)})),t}};f.L(g,"init",g.qb),f.L(g,"subscribe",g.subscribe),f.L(g,"extend",g.extend),f.L(g,"getSubscriptionsCount",g.Bd),f.a.Ba&&f.a.setPrototypeOf(g,Function.prototype),f.T.fn=g,f.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},f.b("subscribable",f.T),f.b("isSubscribable",f.Qc),f.S=f.u=function(){function e(e){r.push(i),i=e}function t(){i=r.pop()}var i,r=[],n=0;return{xc:e,end:t,cc:function(e){if(i){if(!f.Qc(e))throw Error("Only subscribable things can act as dependencies");i.od.call(i.pd,e,e.fd||(e.fd=++n))}},G:function(i,r,n){try{return e(),i.apply(r,n||[])}finally{t()}},qa:function(){if(i)return i.o.qa()},Va:function(){if(i)return i.o.Va()},Ya:function(){if(i)return i.Ya},o:function(){if(i)return i.o}}}(),f.b("computedContext",f.S),f.b("computedContext.getDependenciesCount",f.S.qa),f.b("computedContext.getDependencies",f.S.Va),f.b("computedContext.isInitial",f.S.Ya),f.b("computedContext.registerDependency",f.S.cc),f.b("ignoreDependencies",f.Yd=f.u.G);var y=f.a.Da("_latestValue");f.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[y],arguments[0])&&(t.ya(),t[y]=arguments[0],t.xa()),this):(f.u.cc(t),t[y])}return t[y]=e,f.a.Ba||f.a.extend(t,f.T.fn),f.T.fn.qb(t),f.a.Ab(t,_),f.options.deferUpdates&&f.Ta.deferred(t,!0),t};var _={equalityComparer:l,v:function(){return this[y]},xa:function(){this.notifySubscribers(this[y],"spectate"),this.notifySubscribers(this[y])},ya:function(){this.notifySubscribers(this[y],"beforeChange")}};f.a.Ba&&f.a.setPrototypeOf(_,f.T.fn);var v=f.ta.Ma="__ko_proto__";_[v]=f.ta,f.O=function(e){if((e="function"==typeof e&&e[v])&&e!==_[v]&&e!==f.o.fn[v])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},f.Za=function(e){return"function"==typeof e&&(e[v]===_[v]||e[v]===f.o.fn[v]&&e.Nc)},f.b("observable",f.ta),f.b("isObservable",f.O),f.b("isWriteableObservable",f.Za),f.b("isWritableObservable",f.Za),f.b("observable.fn",_),f.L(_,"peek",_.v),f.L(_,"valueHasMutated",_.xa),f.L(_,"valueWillMutate",_.ya),f.Ha=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=f.ta(e),f.a.Ab(e,f.Ha.fn),e.extend({trackArrayChanges:!0})},f.Ha.fn={remove:function(e){for(var t=this.v(),i=[],r="function"!=typeof e||f.O(e)?function(t){return t===e}:e,n=0;n<t.length;n++){var a=t[n];if(r(a)){if(0===i.length&&this.ya(),t[n]!==a)throw Error("Array modified during remove; cannot remove item");i.push(a),t.splice(n,1),n--}}return i.length&&this.xa(),i},removeAll:function(t){if(t===e){var i=this.v(),r=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),r}return t?this.remove((function(e){return 0<=f.a.A(t,e)})):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||f.O(e)?function(t){return t===e}:e;this.ya();for(var r=t.length-1;0<=r;r--){var n=t[r];i(n)&&(n._destroy=!0)}this.xa()},destroyAll:function(t){return t===e?this.destroy((function(){return!0})):t?this.destroy((function(e){return 0<=f.a.A(t,e)})):[]},indexOf:function(e){var t=this();return f.a.A(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(e){var t=this().slice(0);return e?t.sort(e):t.sort()},reversed:function(){return this().slice(0).reverse()}},f.a.Ba&&f.a.setPrototypeOf(f.Ha.fn,f.ta.fn),f.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){f.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var i=t[e].apply(t,arguments);return this.xa(),i===t?this:i}})),f.a.D(["slice"],(function(e){f.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),f.Pc=function(e){return f.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},f.b("observableArray",f.Ha),f.b("isObservableArray",f.Pc),f.Ta.trackArrayChanges=function(t,i){if(t.Ob={},i&&"object"==typeof i&&f.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var r,n,a,o=!1,s=null,l=0,c=t.Qa,u=t.hb;t.Qa=function(e){c&&c.call(t,e),"arrayChange"===e&&function(){function e(){if(l){var e,i=[].concat(t.v()||[]);t.Wa("arrayChange")&&((!s||1<l)&&(s=f.a.Pb(a,i,t.Ob)),e=s),a=i,s=null,l=0,e&&e.length&&t.notifySubscribers(e,"arrayChange")}}o?e():(o=!0,n=t.subscribe((function(){++l}),null,"spectate"),a=[].concat(t.v()||[]),s=null,r=t.subscribe(e))}()},t.hb=function(i){u&&u.call(t,i),"arrayChange"!==i||t.Wa("arrayChange")||(r&&r.s(),n&&n.s(),n=r=null,o=!1,a=e)},t.zc=function(e,t,i){function r(e,t,i){return n[n.length]={status:e,value:t,index:i}}if(o&&!l){var n=[],a=e.length,c=i.length,u=0;switch(t){case"push":u=a;case"unshift":for(t=0;t<c;t++)r("added",i[t],u+t);break;case"pop":u=a-1;case"shift":a&&r("deleted",e[u],u);break;case"splice":t=Math.min(Math.max(0,0>i[0]?a+i[0]:i[0]),a);a=1===c?a:Math.min(t+(i[1]||0),a),c=t+c-2,u=Math.max(a,c);for(var d=[],h=[],p=2;t<u;++t,++p)t<a&&h.push(r("deleted",e[t],t)),t<c&&d.push(r("added",i[p],t));f.a.Kc(h,d);break;default:return}s=n}}}};var C=f.a.Da("_state");f.o=f.$=function(t,i,r){function n(){if(0<arguments.length){if("function"!=typeof a)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return a.apply(o.nb,arguments),this}return o.ra||f.u.cc(n),(o.ka||o.J&&n.Xa())&&n.ha(),o.X}if("object"==typeof t?r=t:(r=r||{},t&&(r.read=t)),"function"!=typeof r.read)throw Error("Pass a function that returns the value of the ko.computed");var a=r.write,o={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:r.read,nb:i||r.owner,l:r.disposeWhenNodeIsRemoved||r.l||null,Sa:r.disposeWhen||r.Sa,Rb:null,I:{},V:0,Ic:null};return n[C]=o,n.Nc="function"==typeof a,f.a.Ba||f.a.extend(n,f.T.fn),f.T.fn.qb(n),f.a.Ab(n,x),r.pure?(o.wb=!0,o.J=!0,f.a.extend(n,b)):r.deferEvaluation&&f.a.extend(n,S),f.options.deferUpdates&&f.Ta.deferred(n,!0),o.l&&(o.jc=!0,o.l.nodeType||(o.l=null)),o.J||r.deferEvaluation||n.ha(),o.l&&n.ja()&&f.a.K.za(o.l,o.Rb=function(){n.s()}),n};var x={equalityComparer:l,qa:function(){return this[C].V},Va:function(){var e=[];return f.a.P(this[C].I,(function(t,i){e[i.Ka]=i.da})),e},Vb:function(e){if(!this[C].V)return!1;var t=this.Va();return-1!==f.a.A(t,e)||!!f.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,i){if(this[C].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[C].I[e]=i,i.Ka=this[C].V++,i.La=t.ob()},Xa:function(){var e,t,i=this[C].I;for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&(t=i[e],this.Ia&&t.da.Ja||t.da.Dd(t.La)))return!0},Jd:function(){this.Ia&&!this[C].rb&&this.Ia(!1)},ja:function(){var e=this[C];return e.ka||0<e.V},Rd:function(){this.Ja?this[C].ka&&(this[C].sa=!0):this.Hc()},$c:function(e){if(e.Hb){var t=e.subscribe(this.Jd,this,"dirty"),i=e.subscribe(this.Rd,this);return{da:e,s:function(){t.s(),i.s()}}}return e.subscribe(this.Hc,this)},Hc:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[C].Ic),this[C].Ic=f.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[C],i=t.Sa,r=!1;if(!t.rb&&!t.ra){if(t.l&&!f.a.Sb(t.l)||i&&i()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{r=this.zd(e)}finally{t.rb=!1}return r}},zd:function(t){var i=this[C],r=!1,n=i.wb?e:!i.V;r={qd:this,mb:i.I,Qb:i.V};f.u.xc({pd:r,od:p,o:this,Ya:n}),i.I={},i.V=0;var a=this.yd(i,r);return i.V?r=this.sb(i.X,a):(this.s(),r=!0),r&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=a,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),n&&this.notifySubscribers(i.X,"awake"),r},yd:function(e,t){try{var i=e.Wc;return e.nb?i.call(e.nb):i()}finally{f.u.end(),t.Qb&&!e.J&&f.a.P(t.mb,h),e.sa=e.ka=!1}},v:function(e){var t=this[C];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){f.T.fn.ub.call(this,e),this.nc=function(){return this[C].J||(this[C].sa?this.ha():this[C].ka=!1),this[C].X},this.Ia=function(e){this.pc(this[C].X),this[C].ka=!0,e&&(this[C].sa=!0),this.qc(this,!e)}},s:function(){var t=this[C];!t.J&&t.I&&f.a.P(t.I,(function(e,t){t.s&&t.s()})),t.l&&t.Rb&&f.a.K.yb(t.l,t.Rb),t.I=e,t.V=0,t.ra=!0,t.sa=!1,t.ka=!1,t.J=!1,t.l=e,t.Sa=e,t.Wc=e,this.Nc||(t.nb=e)}},b={Qa:function(e){var t=this,i=t[C];if(!i.ra&&i.J&&"change"==e){if(i.J=!1,i.sa||t.Xa())i.I=null,i.V=0,t.ha()&&t.Gb();else{var r=[];f.a.P(i.I,(function(e,t){r[t.Ka]=e})),f.a.D(r,(function(e,r){var n=i.I[e],a=t.$c(n.da);a.Ka=r,a.La=n.La,i.I[e]=a})),t.Xa()&&t.ha()&&t.Gb()}i.ra||t.notifySubscribers(i.X,"awake")}},hb:function(t){var i=this[C];i.ra||"change"!=t||this.Wa("change")||(f.a.P(i.I,(function(e,t){t.s&&(i.I[e]={da:t.da,Ka:t.Ka,La:t.La},t.s())})),i.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var e=this[C];return e.J&&(e.sa||this.Xa())&&this.ha(),f.T.fn.ob.call(this)}},S={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};f.a.Ba&&f.a.setPrototypeOf(x,f.T.fn);var T=f.ta.Ma;x[T]=f.o,f.Oc=function(e){return"function"==typeof e&&e[T]===x[T]},f.Fd=function(e){return f.Oc(e)&&e[C]&&e[C].wb},f.b("computed",f.o),f.b("dependentObservable",f.o),f.b("isComputed",f.Oc),f.b("isPureComputed",f.Fd),f.b("computed.fn",x),f.L(x,"peek",x.v),f.L(x,"dispose",x.s),f.L(x,"isActive",x.ja),f.L(x,"getDependenciesCount",x.qa),f.L(x,"getDependencies",x.Va),f.xb=function(e,t){return"function"==typeof e?f.o(e,t,{pure:!0}):((e=f.a.extend({},e)).pure=!0,f.o(e,t))},f.b("pureComputed",f.xb),function(){function t(r,n,a){if(a=a||new i,"object"!=typeof(r=n(r))||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var o=r instanceof Array?[]:{};return a.save(r,o),function(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}(r,(function(i){var s=n(r[i]);switch(typeof s){case"boolean":case"number":case"string":case"function":o[i]=s;break;case"object":case"undefined":var l=a.get(s);o[i]=l!==e?l:t(s,n,a)}})),o}function i(){this.keys=[],this.values=[]}f.ad=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,(function(e){for(var t=0;f.O(e)&&10>t;t++)e=e();return e}))},f.toJSON=function(e,t,i){return e=f.ad(e),f.a.hc(e,t,i)},i.prototype={constructor:i,save:function(e,t){var i=f.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=f.a.A(this.keys,t))?this.values[t]:e}}}(),f.b("toJS",f.ad),f.b("toJSON",f.toJSON),f.Wd=function(e,t,i){function r(t){var r=f.xb(e,i).extend({ma:"always"}),n=r.subscribe((function(e){e&&(n.s(),t(e))}));return r.notifySubscribers(r.v()),n}return"function"!=typeof Promise||t?r(t.bind(i)):new Promise(r)},f.b("when",f.Wd),f.w={M:function(t){switch(f.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?f.a.g.get(t,f.c.options.$b):7>=f.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?f.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,i,r){switch(f.a.R(t)){case"option":"string"==typeof i?(f.a.g.set(t,f.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(f.a.g.set(t,f.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":""!==i&&null!==i||(i=e);for(var n,a=-1,o=0,s=t.options.length;o<s;++o)if((n=f.w.M(t.options[o]))==i||""===n&&i===e){a=o;break}(r||0<=a||i===e&&1<t.size)&&(t.selectedIndex=a,6===f.a.W&&f.a.setTimeout((function(){t.selectedIndex=a}),0));break;default:null!==i&&i!==e||(i=""),t.value=i}}},f.b("selectExtensions",f.w),f.b("selectExtensions.readValue",f.w.M),f.b("selectExtensions.writeValue",f.w.cb),f.m=function(){function e(e){123===(e=f.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],o=(e+="\n,").match(r),s=[],l=0;if(1<o.length){for(var c,u=0;c=o[u];++u){var d=c.charCodeAt(0);if(44===d){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===d){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===d&&1<c.length&&(47===c.charCodeAt(1)||42===c.charCodeAt(1)))continue;47===d&&u&&1<c.length?(d=o[u-1].match(n))&&!a[d[0]]&&(o=(e=e.substr(e.indexOf(c)+1)).match(r),u=-1,c="/"):40===d||123===d||91===d?++l:41===d||125===d||93===d?--l:t||s.length||34!==d&&39!==d||(c=c.slice(1,-1))}s.push(c)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,r=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),n=/[\])"'A-Za-z0-9_$]+$/,a={in:1,return:1,typeof:1},o={};return{Ra:[],wa:o,ac:e,vb:function(r,n){function a(e,r){var n;if(!u){var d=f.getBindingHandler(e);if(d&&d.preprocess&&!(r=d.preprocess(r,e,a)))return;(d=o[e])&&(n=r,0<=f.a.A(t,n)?n=!1:(d=n.match(i),n=null!==d&&(d[1]?"Object("+d[1]+")"+d[2]:n)),d=n),d&&l.push("'"+("string"==typeof o[e]?o[e]:e)+"':function(_z){"+n+"=_z}")}c&&(r="function(){return "+r+" }"),s.push("'"+e+"':"+r)}var s=[],l=[],c=(n=n||{}).valueAccessors,u=n.bindingParams,d="string"==typeof r?e(r):r;return f.a.D(d,(function(e){a(e.key||e.unknown,e.value)})),l.length&&a("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},Id:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},eb:function(e,t,i,r,n){e&&f.O(e)?!f.Za(e)||n&&e.v()===r||e(r):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](r)}}}(),f.b("expressionRewriting",f.m),f.b("expressionRewriting.bindingRewriteValidators",f.m.Ra),f.b("expressionRewriting.parseObjectLiteral",f.m.ac),f.b("expressionRewriting.preProcessBindings",f.m.vb),f.b("expressionRewriting._twoWayBindings",f.m.wa),f.b("jsonExpressionRewriting",f.m),f.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",f.m.vb),function(){function e(e){return 8==e.nodeType&&o.test(a?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(a?e.text:e.nodeValue)}function r(i,r){for(var n=i,a=1,o=[];n=n.nextSibling;){if(t(n)&&(f.a.g.set(n,c,!0),0===--a))return o;o.push(n),e(n)&&a++}if(!r)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function n(e,t){var i=r(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var a=i&&"\x3c!--test--\x3e"===i.createComment("test").text,o=a?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=a?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},c="__ko_matchedEndComment__";f.h={ea:{},childNodes:function(t){return e(t)?r(t):t.childNodes},Ea:function(t){if(e(t))for(var i=0,r=(t=f.h.childNodes(t)).length;i<r;i++)f.removeNode(t[i]);else f.a.Tb(t)},va:function(t,i){if(e(t)){f.h.Ea(t);for(var r=t.nextSibling,n=0,a=i.length;n<a;n++)r.parentNode.insertBefore(i[n],r)}else f.a.va(t,i)},Vc:function(t,i){var r;e(t)?(r=t.nextSibling,t=t.parentNode):r=t.firstChild,r?i!==r&&t.insertBefore(i,r):t.appendChild(i)},Wb:function(t,i,r){r?(r=r.nextSibling,e(t)&&(t=t.parentNode),r?i!==r&&t.insertBefore(i,r):t.appendChild(i)):f.h.Vc(t,i)},firstChild:function(i){if(e(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(e(i)&&(i=n(i)),i.nextSibling&&t(i.nextSibling)){var r=i.nextSibling;if(t(r)&&!f.a.g.get(r,c))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:e,Vd:function(e){return(e=(a?e.text:e.nodeValue).match(o))?e[1]:null},Sc:function(i){if(l[f.a.R(i)]){var r=i.firstChild;if(r)do{if(1===r.nodeType){var a,o=null;if(a=r.firstChild)do{if(o)o.push(a);else if(e(a)){var s=n(a,!0);s?a=s:o=[a]}else t(a)&&(o=[a])}while(a=a.nextSibling);if(a=o)for(o=r.nextSibling,s=0;s<a.length;s++)o?i.insertBefore(a[s],o):i.appendChild(a[s])}}while(r=r.nextSibling)}}}}(),f.b("virtualElements",f.h),f.b("virtualElements.allowedBindings",f.h.ea),f.b("virtualElements.emptyNode",f.h.Ea),f.b("virtualElements.insertAfter",f.h.Wb),f.b("virtualElements.prepend",f.h.Vc),f.b("virtualElements.setDomNodeChildren",f.h.va),f.ga=function(){this.nd={}},f.a.extend(f.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||f.j.getComponentNameForNode(e);case 8:return f.h.Cd(e);default:return!1}},getBindings:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e):null;return f.j.tc(i,e,t,!1)},getBindingAccessors:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return f.j.tc(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return f.h.Vd(e);default:return null}},parseBindingsString:function(e,t,i,r){try{var n,a=this.nd,o=e+(r&&r.valueAccessors||"");if(!(n=a[o])){var s,l="with($context){with($data||{}){return{"+f.m.vb(e,r)+"}}}";s=new Function("$context","$element",l),n=a[o]=s}return n(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),f.ga.instance=new f.ga,f.b("bindingProvider",f.ga),function(){function r(e){var t=(e=f.a.g.get(e,C))&&e.N;t&&(e.N=null,t.Tc())}function a(e,t,i){this.node=e,this.yc=t,this.kb=[],this.H=!1,t.N||f.a.K.za(e,r),i&&i.N&&(i.N.kb.push(e),this.Kb=i)}function o(e){return function(){return e}}function s(e){return e()}function l(e){return f.a.Ga(f.u.G(e),(function(t,i){return function(){return e()[i]}}))}function c(e,t){return l(this.getBindings.bind(this,e,t))}function u(e,t){var i=f.h.firstChild(t);if(i){var r,n=f.ga.instance,a=n.preprocessNode;if(a){for(;r=i;)i=f.h.nextSibling(r),a.call(n,r);i=f.h.firstChild(t)}for(;r=i;)i=f.h.nextSibling(r),d(e,r)}f.i.ma(t,f.i.H)}function d(e,t){var i=e,r=1===t.nodeType;r&&f.h.Sc(t),(r||f.ga.instance.nodeHasBindings(t))&&(i=h(t,null,e).bindingContextForDescendants),i&&!_[f.a.R(t)]&&u(i,t)}function h(t,i,r){var n,a=f.a.g.Ub(t,C,{}),o=a.hd;if(!i){if(o)throw Error("You cannot apply bindings multiple times to the same element.");a.hd=!0}if(o||(a.context=r),a.Zb||(a.Zb={}),i&&"function"!=typeof i)n=i;else{var l=f.ga.instance,u=l.getBindingAccessors||c,d=f.$((function(){return(n=i?i(r,t):u.call(l,t,r))&&(r[m]&&r[m](),r[y]&&r[y]()),n}),null,{l:t});n&&d.ja()||(d=null)}var h,p=r;if(n){var g=function(){return f.a.Ga(d?d():n,s)},_=d?function(e){return function(){return s(d()[e])}}:function(e){return n[e]};g.get=function(e){return n[e]&&s(_(e))},g.has=function(e){return e in n},f.i.H in n&&f.i.subscribe(t,f.i.H,(function(){var e=(0,n[f.i.H])();if(e){var i=f.h.childNodes(t);i.length&&e(i,f.Ec(i[0]))}})),f.i.pa in n&&(p=f.i.Cb(t,r),f.i.subscribe(t,f.i.pa,(function(){var e=(0,n[f.i.pa])();e&&f.h.firstChild(t)&&e(t)}))),a=function(e){var t=[],i={},r=[];return f.a.P(e,(function n(a){if(!i[a]){var o=f.getBindingHandler(a);o&&(o.after&&(r.push(a),f.a.D(o.after,(function(t){if(e[t]){if(-1!==f.a.A(r,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+r.join(", "));n(t)}})),r.length--),t.push({key:a,Mc:o})),i[a]=!0}})),t}(n),f.a.D(a,(function(i){var r=i.Mc.init,a=i.Mc.update,o=i.key;if(8===t.nodeType&&!f.h.ea[o])throw Error("The binding '"+o+"' cannot be used with virtual elements");try{"function"==typeof r&&f.u.G((function(){var i=r(t,_(o),g,p.$data,p);if(i&&i.controlsDescendantBindings){if(h!==e)throw Error("Multiple bindings ("+h+" and "+o+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");h=o}})),"function"==typeof a&&f.$((function(){a(t,_(o),g,p.$data,p)}),null,{l:t})}catch(i){throw i.message='Unable to process binding "'+o+": "+n[o]+'"\nMessage: '+i.message,i}}))}return{shouldBindDescendants:a=h===e,bindingContextForDescendants:a&&p}}function p(t,i){return t&&t instanceof f.fa?t:new f.fa(t,e,e,i)}var m=f.a.Da("_subscribable"),g=f.a.Da("_ancestorBindingInfo"),y=f.a.Da("_dataDependency");f.c={};var _={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(e){return f.c[e]};var v={};f.fa=function(t,i,r,n,a){function o(){var e=d?u():u,t=f.a.f(e);return i?(f.a.extend(l,i),g in i&&(l[g]=i[g])):(l.$parents=[],l.$root=t,l.ko=f),l[m]=s,c?t=l.$data:(l.$rawData=e,l.$data=t),r&&(l[r]=t),n&&n(l,i,t),i&&i[m]&&!f.S.o().Vb(i[m])&&i[m](),h&&(l[y]=h),l.$data}var s,l=this,c=t===v,u=c?e:t,d="function"==typeof u&&!f.O(u),h=a&&a.dataDependency;a&&a.exportDependencies?o():((s=f.xb(o)).v(),s.ja()?s.equalityComparer=null:l[m]=e)},f.fa.prototype.createChildContext=function(e,t,i,r){if(!r&&t&&"object"==typeof t&&(t=(r=t).as,i=r.extend),t&&r&&r.noChildContext){var n="function"==typeof e&&!f.O(e);return new f.fa(v,this,null,(function(r){i&&i(r),r[t]=n?e():e}),r)}return new f.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)}),r)},f.fa.prototype.extend=function(e,t){return new f.fa(v,this,null,(function(t){f.a.extend(t,"function"==typeof e?e(t):e)}),t)};var C=f.a.g.Z();a.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},a.prototype.sd=function(e){f.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},a.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,f.a.K.yb(this.node,r),f.i.ma(this.node,f.i.pa),this.Tc())},f.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,i,r,n){var a=f.a.g.Ub(e,C,{});return a.Fa||(a.Fa=new f.T),n&&n.notifyImmediately&&a.Zb[t]&&f.u.G(i,r,[e]),a.Fa.subscribe(i,r,t)},ma:function(t,i){var r=f.a.g.get(t,C);if(r&&(r.Zb[i]=!0,r.Fa&&r.Fa.notifySubscribers(t,i),i==f.i.H))if(r.N)r.N.Cc();else if(r.N===e&&r.Fa&&r.Fa.Wa(f.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,t){var i=f.a.g.Ub(e,C,{});return i.N||(i.N=new a(e,i,t[g])),t[g]==i?t:t.extend((function(e){e[g]=i}))}},f.Td=function(e){return(e=f.a.g.get(e,C))&&e.context},f.ib=function(e,t,i){return 1===e.nodeType&&f.h.Sc(e),h(e,t,p(i))},f.ld=function(e,t,i){return i=p(i),f.ib(e,function(e,t,i){return"function"==typeof e?l(e.bind(null,t,i)):f.a.Ga(e,o)}(t,i,e),i)},f.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||u(p(e),t)},f.vc=function(e,r,a){if(!n&&t.jQuery&&(n=t.jQuery),2>arguments.length){if(!(r=i.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!r||1!==r.nodeType&&8!==r.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(p(e,a),r)},f.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:f.Td(t)},f.Ec=function(t){return(t=f.Dc(t))?t.$data:e},f.b("bindingHandlers",f.c),f.b("bindingEvent",f.i),f.b("bindingEvent.subscribe",f.i.subscribe),f.b("bindingEvent.startPossiblyAsyncContentBinding",f.i.Cb),f.b("applyBindings",f.vc),f.b("applyBindingsToDescendants",f.Oa),f.b("applyBindingAccessorsToNode",f.ib),f.b("applyBindingsToNode",f.ld),f.b("contextFor",f.Dc),f.b("dataFor",f.Ec)}(),function(e){function t(t,a){var o,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(a):((s=r[t]=new f.T).subscribe(a),function(e,t){i("getConfig",[e],(function(r){r?i("loadComponent",[e,r],(function(e){t(e,r)})):t(null,null)}))}(t,(function(e,i){var a=!(!i||!i.synchronous);n[t]={definition:e,Gd:a},delete r[t],o||a?s.notifySubscribers(e):f.na.zb((function(){s.notifySubscribers(e)}))})),o=!0)}function i(t,r,n,a){a||(a=f.j.loaders.slice(0));var o=a.shift();if(o){var s=o[t];if(s){var l=!1;if(s.apply(o,r.concat((function(e){l?n(null):null!==e?n(e):i(t,r,n,a)})))!==e&&(l=!0,!o.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else i(t,r,n,a)}else n(null)}var r={},n={};f.j={get:function(i,r){var a=Object.prototype.hasOwnProperty.call(n,i)?n[i]:e;a?a.Gd?f.u.G((function(){r(a.definition)})):f.na.zb((function(){r(a.definition)})):t(i,r)},Bc:function(e){delete n[e]},oc:i},f.j.loaders=[],f.b("components",f.j),f.b("components.get",f.j.get),f.b("components.clearCachedDefinition",f.j.Bc)}(),function(){function e(e){switch(f.a.R(e)){case"script":return f.a.ua(e.text);case"textarea":return f.a.ua(e.value);case"template":if(r(e.content))return f.a.Ca(e.content.childNodes)}return f.a.Ca(e.childNodes)}function r(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function n(e,i,r){"string"==typeof i.require?t.require?(0,t.require)([i.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),r(e)})):e("Uses require, but no AMD loader is present"):r(i)}function a(e){return function(t){throw Error("Component '"+e+"': "+t)}}var o={};f.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(f.j.tb(e))throw Error("Component "+e+" is already registered");o[e]=t},f.j.tb=function(e){return Object.prototype.hasOwnProperty.call(o,e)},f.j.unregister=function(e){delete o[e],f.j.Bc(e)},f.j.Fc={getConfig:function(e,t){t(f.j.tb(e)?o[e]:null)},loadComponent:function(e,t,i){var r=a(e);n(r,t,(function(t){!function(e,t,i,r){function a(){0==--l&&r(o)}var o={},l=2,c=i.template;i=i.viewModel,c?n(t,c,(function(t){f.j.oc("loadTemplate",[e,t],(function(e){o.template=e,a()}))})):a(),i?n(t,i,(function(t){f.j.oc("loadViewModel",[e,t],(function(e){o[s]=e,a()}))})):a()}(e,r,t,i)}))},loadTemplate:function(n,o,s){if(n=a(n),"string"==typeof o)s(f.a.ua(o));else if(o instanceof Array)s(o);else if(r(o))s(f.a.la(o.childNodes));else if(o.element)if(o=o.element,t.HTMLElement?o instanceof HTMLElement:o&&o.tagName&&1===o.nodeType)s(e(o));else if("string"==typeof o){var l=i.getElementById(o);l?s(e(l)):n("Cannot find element with ID "+o)}else n("Unknown element type: "+o);else n("Unknown template value: "+o)},loadViewModel:function(e,t,i){!function e(t,i,r){if("function"==typeof i)r((function(e){return new i(e)}));else if("function"==typeof i[s])r(i[s]);else if("instance"in i){var n=i.instance;r((function(){return n}))}else"viewModel"in i?e(t,i.viewModel,r):t("Unknown viewModel value: "+i)}(a(e),t,i)}};var s="createViewModel";f.b("components.register",f.j.register),f.b("components.isRegistered",f.j.tb),f.b("components.unregister",f.j.unregister),f.b("components.defaultLoader",f.j.Fc),f.j.loaders.push(f.j.Fc),f.j.dd=o}(),function(){function e(e,i){if(r=e.getAttribute("params")){var r=t.parseBindingsString(r,i,e,{valueAccessors:!0,bindingParams:!0}),n=(r=f.a.Ga(r,(function(t){return f.o(t,null,{l:e})})),f.a.Ga(r,(function(t){var i=t.v();return t.ja()?f.o({read:function(){return f.a.f(t())},write:f.Za(i)&&function(e){t()(e)},l:e}):i})));return Object.prototype.hasOwnProperty.call(n,"$raw")||(n.$raw=r),n}return{$raw:{}}}f.j.getComponentNameForNode=function(e){var t=f.a.R(e);if(f.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=f.a.W&&e.tagName===t))return t},f.j.tc=function(t,i,r,n){if(1===i.nodeType){var a=f.j.getComponentNameForNode(i);if(a){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var o={name:a,params:e(i,r)};t.component=n?function(){return o}:o}}return t};var t=new f.ga;9>f.a.W&&(f.j.register=function(e){return function(t){return e.apply(this,arguments)}}(f.j.register),i.createDocumentFragment=function(e){return function(){var t=e();f.j.dd;return t}}(i.createDocumentFragment))}(),function(){var e=0;f.c.component={init:function(t,i,r,n,a){function o(){var e=s&&s.dispose;"function"==typeof e&&e.call(s),c&&c.s(),l=s=c=null}var s,l,c,u=f.a.la(f.h.childNodes(t));return f.h.Ea(t),f.a.K.za(t,o),f.o((function(){var r,n,d=f.a.f(i());if("string"==typeof d?r=d:(r=f.a.f(d.name),n=f.a.f(d.params)),!r)throw Error("No component name specified");var h=f.i.Cb(t,a),p=l=++e;f.j.get(r,(function(e){if(l===p){if(o(),!e)throw Error("Unknown component '"+r+"'");!function(e,t,i){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=f.a.Ca(t),f.h.va(i,e)}(r,e,t);var i=function(e,t,i){var r=e.createViewModel;return r?r.call(e,t,i):t}(e,n,{element:t,templateNodes:u});e=h.createChildContext(i,{extend:function(e){e.$component=i,e.$componentTemplateNodes=u}}),i&&i.koDescendantsComplete&&(c=f.i.subscribe(t,f.i.pa,i.koDescendantsComplete,i)),s=i,f.Oa(e,t)}}))}),null,{l:t}),{controlsDescendantBindings:!0}}},f.h.ea.component=!0}();var E={class:"className",for:"htmlFor"};f.c.attr={update:function(t,i){var r=f.a.f(i())||{};f.a.P(r,(function(i,r){r=f.a.f(r);var n=i.indexOf(":"),a=(n="lookupNamespaceURI"in t&&0<n&&t.lookupNamespaceURI(i.substr(0,n)),!1===r||null===r||r===e);a?n?t.removeAttributeNS(n,i):t.removeAttribute(i):r=r.toString(),8>=f.a.W&&i in E?(i=E[i],a?t.removeAttribute(i):t[i]=r):a||(n?t.setAttributeNS(n,i,r):t.setAttribute(i,r)),"name"===i&&f.a.Yc(t,a?"":r)}))}},f.c.checked={after:["value","attr"],init:function(t,i,r){function n(){var n=t.checked,l=a();if(!f.S.Ya()&&(n||!s&&!f.S.qa())){var d=f.u.G(i);if(c){var p=u?d.v():d,m=h;h=l,m!==l?n&&(f.a.Na(p,l,!0),f.a.Na(p,m,!1)):f.a.Na(p,l,n),u&&f.Za(d)&&d(p)}else o&&(l===e?l=n:n||(l=e)),f.m.eb(d,r,"checked",l,!0)}}var a=f.xb((function(){return r.has("checkedValue")?f.a.f(r.get("checkedValue")):d?r.has("value")?f.a.f(r.get("value")):t.value:void 0})),o="checkbox"==t.type,s="radio"==t.type;if(o||s){var l=i(),c=o&&f.a.f(l)instanceof Array,u=!(c&&l.push&&l.splice),d=s||c,h=c?a():e;s&&!t.name&&f.c.uniqueName.init(t,(function(){return!0})),f.o(n,null,{l:t}),f.a.B(t,"click",n),f.o((function(){var r=f.a.f(i()),n=a();c?(t.checked=0<=f.a.A(r,n),h=n):t.checked=o&&n===e?!!r:a()===r}),null,{l:t}),l=e}}},f.m.wa.checked=!0,f.c.checkedValue={update:function(e,t){e.value=f.a.f(t())}},f.c.class={update:function(e,t){var i=f.a.Db(f.a.f(t()));f.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,f.a.Eb(e,i,!0)}},f.c.css={update:function(e,t){var i=f.a.f(t());null!==i&&"object"==typeof i?f.a.P(i,(function(t,i){i=f.a.f(i),f.a.Eb(e,t,i)})):f.c.class.update(e,t)}},f.c.enable={update:function(e,t){var i=f.a.f(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},f.c.disable={update:function(e,t){f.c.enable.update(e,(function(){return!f.a.f(t())}))}},f.c.event={init:function(e,t,i,r,n){var a=t()||{};f.a.P(a,(function(a){"string"==typeof a&&f.a.B(e,a,(function(e){var o,s=t()[a];if(s){try{var l=f.a.la(arguments);r=n.$data,l.unshift(r),o=s.apply(r,l)}finally{!0!==o&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(a+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},f.c.foreach={Rc:function(e){return function(){var t=e(),i=f.a.bc(t);return i&&"number"!=typeof i.length?(f.a.f(t),{foreach:i.data,as:i.as,noChildContext:i.noChildContext,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:f.ba.Ma}):{foreach:t,templateEngine:f.ba.Ma}}},init:function(e,t){return f.c.template.init(e,f.c.foreach.Rc(t))},update:function(e,t,i,r,n){return f.c.template.update(e,f.c.foreach.Rc(t),i,r,n)}},f.m.Ra.foreach=!1,f.h.ea.foreach=!0,f.c.hasfocus={init:function(e,t,i){function r(r){e.__ko_hasfocusUpdating=!0;var n=e.ownerDocument;if("activeElement"in n){var a;try{a=n.activeElement}catch(r){a=n.body}r=a===e}n=t(),f.m.eb(n,i,"hasfocus",r,!0),e.__ko_hasfocusLastValue=r,e.__ko_hasfocusUpdating=!1}var n=r.bind(null,!0),a=r.bind(null,!1);f.a.B(e,"focus",n),f.a.B(e,"focusin",n),f.a.B(e,"blur",a),f.a.B(e,"focusout",a),e.__ko_hasfocusLastValue=!1},update:function(e,t){var i=!!f.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),f.u.G(f.a.Fb,null,[e,i?"focusin":"focusout"]))}},f.m.wa.hasfocus=!0,f.c.hasFocus=f.c.hasfocus,f.m.wa.hasFocus="hasfocus",f.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){f.a.fc(e,t())}},function(){function e(e,t,i){f.c[e]={init:function(e,r,n,a,o){var s,l,c,u,d,h={};if(t){a=n.get("as");var p=n.get("noChildContext");h={as:a,noChildContext:p,exportDependencies:d=!(a&&p)}}return u=(c="render"==n.get("completeOn"))||n.has(f.i.pa),f.o((function(){var n,a=f.a.f(r()),p=!i!=!a,m=!l;(d||p!==s)&&(u&&(o=f.i.Cb(e,o)),p&&(t&&!d||(h.dataDependency=f.S.o()),n=t?o.createChildContext("function"==typeof a?a:r,h):f.S.qa()?o.extend(null,h):o),m&&f.S.qa()&&(l=f.a.Ca(f.h.childNodes(e),!0)),p?(m||f.h.va(e,f.a.Ca(l)),f.Oa(n,e)):(f.h.Ea(e),c||f.i.ma(e,f.i.H)),s=p)}),null,{l:e}),{controlsDescendantBindings:!0}}},f.m.Ra[e]=!1,f.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),f.c.let={init:function(e,t,i,r,n){return t=n.extend(t),f.Oa(t,e),{controlsDescendantBindings:!0}}},f.h.ea.let=!0;var w={};f.c.options={init:function(e){if("select"!==f.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,r){function n(){return f.a.jb(t.options,(function(e){return e.selected}))}function a(e,t,i){var r=typeof t;return"function"==r?t(e):"string"==r?e[t]:i}function o(e,i){if(m&&u)f.i.ma(t,f.i.H);else if(p.length){var r=0<=f.a.A(p,f.w.M(i[0]));f.a.Zc(i[0],r),m&&!r&&f.u.G(f.a.Fb,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,c=f.a.f(i()),u=r.get("valueAllowUnset")&&r.has("value"),d=r.get("optionsIncludeDestroyed");i={};var h,p=[];u||(s?p=f.a.Mb(n(),f.w.M):0<=t.selectedIndex&&p.push(f.w.M(t.options[t.selectedIndex]))),c&&(void 0===c.length&&(c=[c]),h=f.a.jb(c,(function(t){return d||t===e||null===t||!f.a.f(t._destroy)})),r.has("optionsCaption")&&(null!==(c=f.a.f(r.get("optionsCaption")))&&c!==e&&h.unshift(w)));var m=!1;(i.beforeRemove=function(e){t.removeChild(e)},c=o,r.has("optionsAfterRender")&&"function"==typeof r.get("optionsAfterRender")&&(c=function(t,i){o(0,i),f.u.G(r.get("optionsAfterRender"),null,[i[0],t!==w?t:e])}),f.a.ec(t,h,(function(i,n,o){return o.length&&(p=!u&&o[0].selected?[f.w.M(o[0])]:[],m=!0),n=t.ownerDocument.createElement("option"),i===w?(f.a.Bb(n,r.get("optionsCaption")),f.w.cb(n,e)):(o=a(i,r.get("optionsValue"),i),f.w.cb(n,f.a.f(o)),i=a(i,r.get("optionsText"),o),f.a.Bb(n,i)),[n]}),i,c),u)||(s?p.length&&n().length<p.length:p.length&&0<=t.selectedIndex?f.w.M(t.options[t.selectedIndex])!==p[0]:p.length||0<=t.selectedIndex)&&f.u.G(f.a.Fb,null,[t,"change"]);(u||f.S.Ya())&&f.i.ma(t,f.i.H),f.a.wd(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},f.c.options.$b=f.a.g.Z(),f.c.selectedOptions={init:function(e,t,i){function r(){var r=t(),n=[];f.a.D(e.getElementsByTagName("option"),(function(e){e.selected&&n.push(f.w.M(e))})),f.m.eb(r,i,"selectedOptions",n)}function n(){var i=f.a.f(t()),r=e.scrollTop;i&&"number"==typeof i.length&&f.a.D(e.getElementsByTagName("option"),(function(e){var t=0<=f.a.A(i,f.w.M(e));e.selected!=t&&f.a.Zc(e,t)})),e.scrollTop=r}if("select"!=f.a.R(e))throw Error("selectedOptions binding applies only to SELECT elements");var a;f.i.subscribe(e,f.i.H,(function(){a?r():(f.a.B(e,"change",r),a=f.o(n,null,{l:e}))}),null,{notifyImmediately:!0})},update:function(){}},f.m.wa.selectedOptions=!0,f.c.style={update:function(t,i){var r=f.a.f(i()||{});f.a.P(r,(function(i,r){if(null!==(r=f.a.f(r))&&r!==e&&!1!==r||(r=""),n)n(t).css(i,r);else if(/^--/.test(i))t.style.setProperty(i,r);else{i=i.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));var a=t.style[i];t.style[i]=r,r===a||t.style[i]!=a||isNaN(r)||(t.style[i]=r+"px")}}))}},f.c.submit={init:function(e,t,i,r,n){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");f.a.B(e,"submit",(function(i){var r,a=t();try{r=a.call(n.$data,e)}finally{!0!==r&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}}))}},f.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){f.a.Bb(e,t())}},f.h.ea.text=!0,function(){if(t&&t.navigator){var i,r,n,a,o,s=function(e){if(e)return parseFloat(e[1])},l=t.navigator.userAgent;(i=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(o=s(l.match(/Edge\/([^ ]+)$/)))||s(l.match(/Chrome\/([^ ]+)/))||(r=s(l.match(/Version\/([^ ]+) Safari/)))||(n=s(l.match(/Firefox\/([^ ]+)/)))||(a=f.a.W||s(l.match(/MSIE ([^ ]+)/)))||(a=s(l.match(/rv:([^ )]+)/)))}if(8<=a&&10>a)var c=f.a.g.Z(),u=f.a.g.Z(),d=function(e){var t=this.activeElement;(t=t&&f.a.g.get(t,u))&&t(e)},h=function(e,t){var i=e.ownerDocument;f.a.g.get(i,c)||(f.a.g.set(i,c,!0),f.a.B(i,"selectionchange",d)),f.a.g.set(e,u,t)};f.c.textInput={init:function(t,s,l){function c(e,i){f.a.B(t,e,i)}function u(){p||(m=t.value,p=f.a.setTimeout(d,4))}function d(){clearTimeout(p),m=p=e;var i=t.value;g!==i&&(g=i,f.m.eb(s(),l,"textInput",i))}var p,m,g=t.value,y=9==f.a.W?u:d,_=!1;a&&c("keypress",d),11>a&&c("propertychange",(function(e){_||"value"!==e.propertyName||y()})),8==a&&(c("keyup",d),c("keydown",d)),h&&(h(t,y),c("dragend",u)),(!a||9<=a)&&c("input",y),5>r&&"textarea"===f.a.R(t)?(c("keydown",u),c("paste",u),c("cut",u)):11>i?c("keydown",u):4>n?(c("DOMAutoComplete",d),c("dragdrop",d),c("drop",d)):o&&"number"===t.type&&c("keydown",u),c("change",d),c("blur",d),f.o((function i(){var r=f.a.f(s());null!==r&&r!==e||(r=""),m!==e&&r===m?f.a.setTimeout(i,4):t.value!==r&&(_=!0,t.value=r,_=!1,g=t.value)}),null,{l:t})}},f.m.wa.textInput=!0,f.c.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),f.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++f.c.uniqueName.rd;f.a.Yc(e,i)}}},f.c.uniqueName.rd=0,f.c.using={init:function(e,t,i,r,n){var a;return i.has("as")&&(a={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=n.createChildContext(t,a),f.Oa(t,e),{controlsDescendantBindings:!0}}},f.h.ea.using=!0,f.c.value={init:function(t,i,r){var n=f.a.R(t),a="input"==n;if(!a||"checkbox"!=t.type&&"radio"!=t.type){var o=[],s=r.get("valueUpdate"),l=!1,c=null;s&&(o="string"==typeof s?[s]:f.a.wc(s),f.a.Pa(o,"change"));var u,d,h=function(){c=null,l=!1;var e=i(),n=f.w.M(t);f.m.eb(e,r,"value",n)};if(!f.a.W||!a||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=f.a.A(o,"propertychange")||(f.a.B(t,"propertychange",(function(){l=!0})),f.a.B(t,"focus",(function(){l=!1})),f.a.B(t,"blur",(function(){l&&h()}))),f.a.D(o,(function(e){var i=h;f.a.Ud(e,"after")&&(i=function(){c=f.w.M(t),f.a.setTimeout(h,0)},e=e.substring(5)),f.a.B(t,e,i)})),u=a&&"file"==t.type?function(){var r=f.a.f(i());null===r||r===e||""===r?t.value="":f.u.G(h)}:function(){var a=f.a.f(i()),o=f.w.M(t);null!==c&&a===c?f.a.setTimeout(u,0):a===o&&o!==e||("select"===n?(o=r.get("valueAllowUnset"),f.w.cb(t,a,o),o||a===f.w.M(t)||f.u.G(h)):f.w.cb(t,a))},"select"===n)f.i.subscribe(t,f.i.H,(function(){d?r.get("valueAllowUnset")?u():h():(f.a.B(t,"change",h),d=f.o(u,null,{l:t}))}),null,{notifyImmediately:!0});else f.a.B(t,"change",h),f.o(u,null,{l:t})}else f.ib(t,{checkedValue:i})},update:function(){}},f.m.wa.value=!0,f.c.visible={update:function(e,t){var i=f.a.f(t()),r="none"!=e.style.display;i&&!r?e.style.display="":!i&&r&&(e.style.display="none")}},f.c.hidden={update:function(e,t){f.c.visible.update(e,(function(){return!f.a.f(t())}))}},function(e){f.c[e]={init:function(t,i,r,n,a){return f.c.event.init.call(this,t,(function(){var t={};return t[e]=i(),t}),r,n,a)}}}("click"),f.ca=function(){},f.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},f.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},f.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var r=(t=t||i).getElementById(e);if(!r)throw Error("Cannot find template with ID "+e);return new f.C.F(r)}if(1==e.nodeType||8==e.nodeType)return new f.C.ia(e);throw Error("Unknown template type: "+e)},f.ca.prototype.renderTemplate=function(e,t,i,r){return e=this.makeTemplateSource(e,r),this.renderTemplateSource(e,t,i,r)},f.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},f.ca.prototype.rewriteTemplate=function(e,t,i){t=t((e=this.makeTemplateSource(e,i)).text()),e.text(t),e.data("isRewritten",!0)},f.b("templateEngine",f.ca),f.kc=function(){function e(e,t,i,r){e=f.m.ac(e);for(var n=f.m.Ra,a=0;a<e.length;a++){var o=e[a].key;if(Object.prototype.hasOwnProperty.call(n,o)){var s=n[o];if("function"==typeof s){if(o=s(e[a].value))throw Error(o)}else if(!s)throw Error("This template engine does not support the '"+o+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+f.m.vb(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",r.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,(function(e){return f.kc.Ld(e,t)}),i)},Ld:function(r,n){return r.replace(t,(function(t,i,r,a,o){return e(o,i,r,n)})).replace(i,(function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",n)}))},md:function(e,t){return f.aa.Xb((function(i,r){var n=i.nextSibling;n&&n.nodeName.toLowerCase()===t&&f.ib(n,e,r)}))}}}(),f.b("__tr_ambtns",f.kc.md),function(){f.C={},f.C.F=function(e){if(this.F=e){var t=f.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},f.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?f.a.fc(this.F,t):this.F[e]=t};var t=f.a.g.Z()+"_";f.C.F.prototype.data=function(e){if(1===arguments.length)return f.a.g.get(this.F,t+e);f.a.g.set(this.F,t+e,arguments[1])};var i=f.a.g.Z();f.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var r=f.a.g.get(t,i)||{},n=r.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!n||r.jd){var a=this.text();a&&a!==r.bb&&(n=f.a.Md(a,t.ownerDocument),f.a.g.set(t,i,{lb:n,bb:a,jd:!0}))}return n}r=arguments[0],this.ab!==e&&this.text(""),f.a.g.set(t,i,{lb:r})},f.C.ia=function(e){this.F=e},f.C.ia.prototype=new f.C.F,f.C.ia.prototype.constructor=f.C.ia,f.C.ia.prototype.text=function(){if(0==arguments.length){var t=f.a.g.get(this.F,i)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}f.a.g.set(this.F,i,{bb:arguments[0]})},f.b("templateSources",f.C),f.b("templateSources.domElement",f.C.F),f.b("templateSources.anonymousTemplate",f.C.ia)}(),function(){function t(e,t,i){var r;for(t=f.h.nextSibling(t);e&&(r=e)!==t;)i(r,e=f.h.nextSibling(r))}function i(e,i){if(e.length){var r=e[0],n=e[e.length-1],a=r.parentNode,o=f.ga.instance,s=o.preprocessNode;if(s){if(t(r,n,(function(e,t){var i=e.previousSibling,a=s.call(o,e);a&&(e===r&&(r=a[0]||t),e===n&&(n=a[a.length-1]||i))})),e.length=0,!r)return;r===n?e.push(r):(e.push(r,n),f.a.Ua(e,a))}t(r,n,(function(e){1!==e.nodeType&&8!==e.nodeType||f.vc(i,e)})),t(r,n,(function(e){1!==e.nodeType&&8!==e.nodeType||f.aa.cd(e,[i])})),f.a.Ua(e,a)}}function r(e){return e.nodeType?e:0<e.length?e[0]:null}function n(e,t,n,a,s){s=s||{};var l=(e&&r(e)||n||{}).ownerDocument,c=s.templateEngine||o;if(f.kc.xd(n,c,l),"number"!=typeof(n=c.renderTemplate(n,a,s,l)).length||0<n.length&&"number"!=typeof n[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":f.h.va(e,n),l=!0;break;case"replaceNode":f.a.Xc(e,n),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(n,a),s.afterRender&&f.u.G(s.afterRender,null,[n,a[s.as||"$data"]]),"replaceChildren"==t&&f.i.ma(e,f.i.H)),n}function a(e,t,i){return f.O(e)?e():"function"==typeof e?e(t,i):e}var o;f.gc=function(t){if(t!=e&&!(t instanceof f.ca))throw Error("templateEngine must inherit from ko.templateEngine");o=t},f.dc=function(t,i,s,l,c){if(((s=s||{}).templateEngine||o)==e)throw Error("Set a template engine before calling renderTemplate");if(c=c||"replaceChildren",l){var u=r(l);return f.$((function(){var e=i&&i instanceof f.fa?i:new f.fa(i,null,null,null,{exportDependencies:!0}),o=a(t,e.$data,e);e=n(l,c,o,e,s);"replaceNode"==c&&(u=r(l=e))}),null,{Sa:function(){return!u||!f.a.Sb(u)},l:u&&"replaceNode"==c?u.parentNode:u})}return f.aa.Xb((function(e){f.dc(t,i,s,e,"replaceNode")}))},f.Qd=function(t,r,o,s,l){function c(e,t){f.u.G(f.a.ec,null,[s,e,d,o,u,t]),f.i.ma(s,f.i.H)}function u(e,t){i(t,h),o.afterRender&&o.afterRender(t,e),h=null}function d(e,i){h=l.createChildContext(e,{as:p,noChildContext:o.noChildContext,extend:function(e){e.$index=i,p&&(e[p+"Index"]=i)}});var r=a(t,e,h);return n(s,"ignoreTargetNode",r,h,o)}var h,p=o.as,m=!1===o.includeDestroyed||f.options.foreachHidesDestroyed&&!o.includeDestroyed;if(m||o.beforeRemove||!f.Pc(r))return f.$((function(){var t=f.a.f(r)||[];void 0===t.length&&(t=[t]),m&&(t=f.a.jb(t,(function(t){return t===e||null===t||!f.a.f(t._destroy)}))),c(t)}),null,{l:s});c(r.v());var g=r.subscribe((function(e){c(r(),e)}),null,"arrayChange");return g.l(s),g};var s=f.a.g.Z(),l=f.a.g.Z();f.c.template={init:function(e,t){var i=f.a.f(t());if("string"==typeof i||"name"in i)f.h.Ea(e);else if("nodes"in i){if(i=i.nodes||[],f.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');var r=i[0]&&i[0].parentNode;r&&f.a.g.get(r,l)||(r=f.a.Yb(i),f.a.g.set(r,l,!0)),new f.C.ia(e).nodes(r)}else{if(!(0<(i=f.h.childNodes(e)).length))throw Error("Anonymous template defined, but no template content was provided");r=f.a.Yb(i),new f.C.ia(e).nodes(r)}return{controlsDescendantBindings:!0}},update:function(t,i,r,n,a){var o=i();r=!0,n=null,"string"==typeof(i=f.a.f(o))?i={}:(o="name"in i?i.name:t,"if"in i&&(r=f.a.f(i.if)),r&&"ifnot"in i&&(r=!f.a.f(i.ifnot)),r&&!o&&(r=!1)),"foreach"in i?n=f.Qd(o,r&&i.foreach||[],i,t,a):r?(r=a,"data"in i&&(r=a.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),n=f.dc(o,r,i,t)):f.h.Ea(t),a=n,(i=f.a.g.get(t,s))&&"function"==typeof i.s&&i.s(),f.a.g.set(t,s,!a||a.ja&&!a.ja()?e:a)}},f.m.Ra.template=function(e){return 1==(e=f.m.ac(e)).length&&e[0].unknown||f.m.Id(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},f.h.ea.template=!0}(),f.b("setTemplateEngine",f.gc),f.b("renderTemplate",f.dc),f.a.Kc=function(e,t,i){var r,n,a,o,s;if(e.length&&t.length)for(r=n=0;(!i||r<i)&&(o=e[n]);++n){for(a=0;s=t[a];++a)if(o.value===s.value){o.moved=s.index,s.moved=o.index,t.splice(a,1),r=a=0;break}r+=a}},f.a.Pb=function(){function e(e,t,i,r,n){var a,o,s,l,c,u=Math.min,d=Math.max,h=[],p=e.length,m=t.length,g=m-p||1,y=p+m+1;for(a=0;a<=p;a++)for(l=s,h.push(s=[]),c=u(m,a+g),o=d(0,a-1);o<=c;o++)s[o]=o?a?e[a-1]===t[o-1]?l[o-1]:u(l[o]||y,s[o-1]||y)+1:o+1:a+1;for(u=[],d=[],g=[],a=p,o=m;a||o;)m=h[a][o]-1,o&&m===h[a][o-1]?d.push(u[u.length]={status:i,value:t[--o],index:o}):a&&m===h[a-1][o]?g.push(u[u.length]={status:r,value:e[--a],index:a}):(--o,--a,n.sparse||u.push({status:"retained",value:t[o]}));return f.a.Kc(g,d,!n.dontLimitMoves&&10*p),u.reverse()}return function(t,i,r){return r="boolean"==typeof r?{dontLimitMoves:r}:r||{},i=i||[],(t=t||[]).length<i.length?e(t,i,"added","deleted",r):e(i,t,"deleted","added",r)}}(),f.b("utils.compareArrays",f.a.Pb),function(){function t(t,i,r,n,a){var o=[],s=f.$((function(){var e=i(r,a,f.a.Ua(o,t))||[];0<o.length&&(f.a.Xc(o,e),n&&f.u.G(n,null,[r,e,a])),o.length=0,f.a.Nb(o,e)}),null,{l:t,Sa:function(){return!f.a.kd(o)}});return{Y:o,$:s.ja()?s:e}}var i=f.a.g.Z(),r=f.a.g.Z();f.a.ec=function(n,a,o,s,l,c){function u(e){p={Aa:e,pb:f.ta(b++)},C.push(p),v||A.push(p)}function d(e){p=_[e],b!==p.pb.v()&&w.push(p),p.pb(b++),f.a.Ua(p.Y,n),C.push(p)}function h(e,t){if(e)for(var i=0,r=t.length;i<r;i++)f.a.D(t[i].Y,(function(r){e(r,i,t[i].Aa)}))}void 0===(a=a||[]).length&&(a=[a]),s=s||{};var p,m,g,y,_=f.a.g.get(n,i),v=!_,C=[],x=0,b=0,S=[],T=[],E=[],w=[],A=[],P=0;if(v)f.a.D(a,u);else{if(!c||_&&_._countWaitingForRemove){var D=f.a.Mb(_,(function(e){return e.Aa}));c=f.a.Pb(D,a,{dontLimitMoves:s.dontLimitMoves,sparse:!0})}var M,I,R;for(D=0;M=c[D];D++)switch(I=M.moved,R=M.index,M.status){case"deleted":for(;x<R;)d(x++);I===e&&((p=_[x]).$&&(p.$.s(),p.$=e),f.a.Ua(p.Y,n).length&&(s.beforeRemove&&(C.push(p),P++,p.Aa===r?p=null:E.push(p)),p&&S.push.apply(S,p.Y))),x++;break;case"added":for(;b<R;)d(x++);I!==e?(T.push(C.length),d(I)):u(M.value)}for(;b<a.length;)d(x++);C._countWaitingForRemove=P}f.a.g.set(n,i,C),h(s.beforeMove,w),f.a.D(S,s.beforeRemove?f.oa:f.removeNode);try{y=n.ownerDocument.activeElement}catch(a){}if(T.length)for(;(D=T.shift())!=e;){for(p=C[D],m=e;D;)if((g=C[--D].Y)&&g.length){m=g[g.length-1];break}for(a=0;x=p.Y[a];m=x,a++)f.h.Wb(n,x,m)}for(D=0;p=C[D];D++){for(p.Y||f.a.extend(p,t(n,o,p.Aa,l,p.pb)),a=0;x=p.Y[a];m=x,a++)f.h.Wb(n,x,m);!p.Ed&&l&&(l(p.Aa,p.Y,p.pb),p.Ed=!0,m=p.Y[p.Y.length-1])}for(y&&n.ownerDocument.activeElement!=y&&y.focus(),h(s.beforeRemove,E),D=0;D<E.length;++D)E[D].Aa=r;h(s.afterMove,w),h(s.afterAdd,A)}}(),f.b("utils.setDomNodeChildrenFromArrayMapping",f.a.ec),f.ba=function(){this.allowTemplateRewriting=!1},f.ba.prototype=new f.ca,f.ba.prototype.constructor=f.ba,f.ba.prototype.renderTemplateSource=function(e,t,i,r){return(t=9>f.a.W||!e.nodes?null:e.nodes())?f.a.la(t.cloneNode(!0).childNodes):(e=e.text(),f.a.ua(e,r))},f.ba.Ma=new f.ba,f.gc(f.ba.Ma),f.b("nativeTemplateEngine",f.ba),function(){f.$a=function(){var e=this.Hd=function(){if(!n||!n.tmpl)return 0;try{if(0<=n.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,r,a,o){if(o=o||i,a=a||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=n.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[r.$data],r=n.extend({koBindingContext:r},a.templateOptions),(r=n.tmpl(s,t,r)).appendTo(o.createElement("div")),n.fragments={},r},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(n.tmpl.tag.ko_code={open:"__.push($1 || '');"},n.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},f.$a.prototype=new f.ca,f.$a.prototype.constructor=f.$a;var e=new f.$a;0<e.Hd&&f.gc(e),f.b("jqueryTmplTemplateEngine",f.$a)}()}(t.ko={})}();var knockout=ko;"undefined"!=typeof window?(ko=window.ko,void 0!==oldValue?window.ko=oldValue:delete window.ko):(ko=global.ko,void 0!==oldValue?global.ko=oldValue:delete global.ko);var OBSERVABLES_PROPERTY="__knockoutObservables",SUBSCRIBABLE_PROPERTY="__knockoutSubscribable";function track(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,r=getAllObservablesForObject(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach((function(t){var n,a;t!==OBSERVABLES_PROPERTY&&t!==SUBSCRIBABLE_PROPERTY&&(t in r||(n=(a=e[t])instanceof Array,a=i.isObservable(a)?a:n?i.observableArray(a):i.observable(a),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),r[t]=a,n&&notifyWhenPresentOrFutureArrayValuesMutate(i,a)))})),e}function getAllObservablesForObject(e,t){var i=e[OBSERVABLES_PROPERTY];return!i&&t&&(i={},Object.defineProperty(e,OBSERVABLES_PROPERTY,{value:i})),i}function defineComputedProperty(e,t,i){var r={owner:e,deferEvaluation:!0};if("function"==typeof i)r.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');r.read=i.get,r.write=i.set}return e[t]=this.computed(r),track.call(this,e,[t]),e}function notifyWhenPresentOrFutureArrayValuesMutate(e,t){var i=null;e.computed((function(){i&&(i.dispose(),i=null);var r=t();r instanceof Array&&(i=startWatchingArrayInstance(e,t,r))}))}function startWatchingArrayInstance(e,t,i){return getSubscribableForArray(e,i).subscribe(t)}function getSubscribableForArray(e,t){var i,r=t[SUBSCRIBABLE_PROPERTY];return r||(r=new e.subscribable,Object.defineProperty(t,SUBSCRIBABLE_PROPERTY,{value:r}),wrapStandardArrayMutators(t,r,i={}),addKnockoutArrayMutators(e,t,r,i)),r}function wrapStandardArrayMutators(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(r){var n=e[r];e[r]=function(){var e=n.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}}))}function addKnockoutArrayMutators(e,t,i,r){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(n){Object.defineProperty(t,n,{enumerable:!1,value:function(){var a;r.pause=!0;try{a=e.observableArray.fn[n].apply(e.observableArray(t),arguments)}finally{r.pause=!1}return i.notifySubscribers(t),a}})}))}function getObservable(e,t){return e&&(e=getAllObservablesForObject(e,!1))&&e[t]||null}function valueHasMutated(e,t){(t=getObservable(e,t))&&t.valueHasMutated()}function attachToKo(e){e.track=track,e.getObservable=getObservable,e.valueHasMutated=valueHasMutated,e.defineProperty=defineComputedProperty}var knockout_es5={attachToKo:attachToKo},svgNS="http://www.w3.org/2000/svg",svgClassName="cesium-svgPath-svg",SvgPathBindingHandler={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){var r=document.createElementNS(svgNS,"svg:svg");r.setAttribute("class",svgClassName);var n=document.createElementNS(svgNS,"path");return r.appendChild(n),e.virtualElements.setDomNodeChildren(t,[r]),e.computed({read:function(){var t=e.unwrap(i());n.setAttribute("d",e.unwrap(t.path));var a=e.unwrap(t.width),o=e.unwrap(t.height);r.setAttribute("width",a),r.setAttribute("height",o),r.setAttribute("viewBox","0 0 "+a+" "+o),t.css&&r.setAttribute("class",svgClassName+" "+e.unwrap(t.css))},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};function quickselect$1(e,t,i,r,n){quickselectStep$1(e,t,i||0,r||e.length-1,n||defaultCompare$1)}function quickselectStep$1(e,t,i,r,n){for(;i<r;){var a,o,s,l;600<r-i&&(a=r-i+1,o=t-i+1,l=Math.log(a),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(a-s)/a)*(o-a/2<0?-1:1),quickselectStep$1(e,t,Math.max(i,Math.floor(t-o*s/a+l)),Math.min(r,Math.floor(t+(a-o)*s/a+l)),n));var c=e[t],u=i,d=r;for(swap$3(e,i,t),0<n(e[r],c)&&swap$3(e,i,r);u<d;){for(swap$3(e,u,d),u++,d--;n(e[u],c)<0;)u++;for(;0<n(e[d],c);)d--}0===n(e[i],c)?swap$3(e,i,d):swap$3(e,++d,r),d<=t&&(i=d+1),t<=d&&(r=d-1)}}function swap$3(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function defaultCompare$1(e,t){return e<t?-1:t<e?1:0}function ClockViewModel(e){defined(e)||(e=new Clock),this._clock=e,this._eventHelper=new EventHelper,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=knockout.observable(JulianDate.now()),this.systemTime.equalityComparer=JulianDate.equals,this.startTime=knockout.observable(e.startTime),this.startTime.equalityComparer=JulianDate.equals,this.startTime.subscribe((function(t){e.startTime=t,this.synchronize()}),this),this.stopTime=knockout.observable(e.stopTime),this.stopTime.equalityComparer=JulianDate.equals,this.stopTime.subscribe((function(t){e.stopTime=t,this.synchronize()}),this),this.currentTime=knockout.observable(e.currentTime),this.currentTime.equalityComparer=JulianDate.equals,this.currentTime.subscribe((function(t){e.currentTime=t,this.synchronize()}),this),this.multiplier=knockout.observable(e.multiplier),this.multiplier.subscribe((function(t){e.multiplier=t,this.synchronize()}),this),this.clockStep=knockout.observable(e.clockStep),this.clockStep.subscribe((function(t){e.clockStep=t,this.synchronize()}),this),this.clockRange=knockout.observable(e.clockRange),this.clockRange.subscribe((function(t){e.clockRange=t,this.synchronize()}),this),this.canAnimate=knockout.observable(e.canAnimate),this.canAnimate.subscribe((function(t){e.canAnimate=t,this.synchronize()}),this),this.shouldAnimate=knockout.observable(e.shouldAnimate),this.shouldAnimate.subscribe((function(t){e.shouldAnimate=t,this.synchronize()}),this),knockout.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function Command(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,DeveloperError.throwInstantiationError()}knockout_es5.attachToKo(knockout),SvgPathBindingHandler.register(knockout),Object.defineProperties(ClockViewModel.prototype,{clock:{get:function(){return this._clock}}}),ClockViewModel.prototype.synchronize=function(){var e=this._clock;this.systemTime=JulianDate.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},ClockViewModel.prototype.isDestroyed=function(){return!1},ClockViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject(this)};var InspectorShared={};function ToggleButtonViewModel(e,t){this._command=e,t=defaultValue(t,defaultValue.EMPTY_OBJECT),this.toggled=defaultValue(t.toggled,!1),this.tooltip=defaultValue(t.tooltip,""),knockout.track(this,["toggled","tooltip"])}function createCommand$2(e,t){t=defaultValue(t,!0);var i=new Event,r=new Event;function n(){var t,n={args:arguments,cancel:!1};return i.raiseEvent(n),n.cancel||(t=e.apply(null,arguments),r.raiseEvent(t)),t}return n.canExecute=t,knockout.track(n,["canExecute"]),Object.defineProperties(n,{beforeExecute:{value:i},afterExecute:{value:r}}),n}function subscribeAndEvaluate(e,t,i,r,n){return i.call(r,e[t]),knockout.getObservable(e,t).subscribe(i,r,n)}InspectorShared.createCheckbox=function(e,t,i){var r=document.createElement("div"),n=document.createElement("label"),a=document.createElement("input");return a.type="checkbox",t="checked: "+t,defined(i)&&(t+=", enable: "+i),a.setAttribute("data-bind",t),n.appendChild(a),n.appendChild(document.createTextNode(e)),r.appendChild(n),r},InspectorShared.createSection=function(e,t,i,r){var n=document.createElement("div");return n.className="cesium-cesiumInspector-section",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-section-collapsed": !'+i+" }"),e.appendChild(n),(e=document.createElement("h3")).className="cesium-cesiumInspector-sectionHeader",e.appendChild(document.createTextNode(t)),e.setAttribute("data-bind","click: "+r),n.appendChild(e),(e=document.createElement("div")).className="cesium-cesiumInspector-sectionContent",n.appendChild(e),e},Object.defineProperties(ToggleButtonViewModel.prototype,{command:{get:function(){return this._command}}});var DepthViewPacked="uniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nfloat z_window = czm_unpackDepth(texture2D(u_depthTexture, v_textureCoordinates));\nz_window = czm_reverseLogDepth(z_window);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nfloat z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\nfloat scale = pow(z_ndc * 0.5 + 0.5, 8.0);\ngl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n";function removePipelineExtras(e){return ForEach.shader(e,(function(e){removeExtras(e)})),ForEach.buffer(e,(function(e){removeExtras(e)})),ForEach.image(e,(function(e){removeExtras(e),ForEach.compressedImage(e,(function(e){removeExtras(e)}))})),removeExtras(e),e}function removeExtras(e){defined(e.extras)&&(defined(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}var svgNS$1="http://www.w3.org/2000/svg",xlinkNS="http://www.w3.org/1999/xlink",widgetForDrag,gradientEnabledColor0=Color.fromCssColorString("rgba(247,250,255,0.384)"),gradientEnabledColor1=Color.fromCssColorString("rgba(143,191,255,0.216)"),gradientEnabledColor2=Color.fromCssColorString("rgba(153,197,255,0.098)"),gradientEnabledColor3=Color.fromCssColorString("rgba(255,255,255,0.086)"),gradientDisabledColor0=Color.fromCssColorString("rgba(255,255,255,0.267)"),gradientDisabledColor1=Color.fromCssColorString("rgba(255,255,255,0)"),gradientKnobColor=Color.fromCssColorString("rgba(66,67,68,0.3)"),gradientPointerColor=Color.fromCssColorString("rgba(0,0,0,0.5)");function getElementColor(e){return Color.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var svgIconsById={animation_pathReset:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},animation_pathPause:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},animation_pathPlay:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathPlayReverse:{tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathLoop:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},animation_pathClock:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},animation_pathWingButton:{tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},animation_pathPointer:{tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},animation_pathSwooshFX:{tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}};function svgFromObject(e){var t,i=document.createElementNS(svgNS$1,e.tagName);for(t in e)if(e.hasOwnProperty(t)&&"tagName"!==t)if("children"===t)for(var r=e.children.length,n=0;n<r;++n)i.appendChild(svgFromObject(e.children[n]));else 0===t.indexOf("xlink:")?i.setAttributeNS(xlinkNS,t.substring(6),e[t]):"textContent"===t?i.textContent=e[t]:i.setAttribute(t,e[t]);return i}function svgText(e,t,i){var r=document.createElementNS(svgNS$1,"text");return r.setAttribute("x",e),r.setAttribute("y",t),r.setAttribute("class","cesium-animation-svgText"),(t=document.createElementNS(svgNS$1,"tspan")).textContent=i,r.appendChild(t),r}function setShuttleRingPointer(e,t,i){e.setAttribute("transform","translate(100,100) rotate("+i+")"),t.setAttribute("transform","rotate("+i+")")}var makeColorStringScratch=new Color;function makeColorString(e,t){var i=t.alpha,r=1-i;return makeColorStringScratch.red=e.red*r+t.red*i,makeColorStringScratch.green=e.green*r+t.green*i,makeColorStringScratch.blue=e.blue*r+t.blue*i,makeColorStringScratch.toCssColorString()}function rectButton(e,t,i){var r=svgIconsById[i];return svgFromObject({tagName:"g",class:"cesium-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"rect",class:"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{class:"cesium-animation-buttonPath",id:i,tagName:r.tagName,transform:r.transform,d:r.d},{tagName:"title",textContent:""}]})}function wingButton(e,t,i){var r=svgIconsById[i],n=svgIconsById.animation_pathWingButton;return svgFromObject({tagName:"g",class:"cesium-animation-rectButton",transform:"translate("+e+","+t+")",children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:n.tagName,d:n.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:n.tagName,d:n.d},{class:"cesium-animation-buttonPath",id:i,tagName:r.tagName,transform:r.transform,d:r.d},{tagName:"title",textContent:""}]})}function setShuttleRingFromMouseOrTouch(e,t){var i=e._viewModel,r=i.shuttleRingDragging;if(!r||widgetForDrag===e)if("mousedown"===t.type||r&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||r&&"touchmove"===t.type&&1===t.touches.length){var n,a=e._centerX,o=e._centerY,s=e._svgNode.getBoundingClientRect(),l="touchstart"===t.type||"touchmove"===t.type?(n=t.touches[0].clientX,t.touches[0].clientY):(n=t.clientX,t.clientY);if(!r&&(n>s.right||n<s.left||l<s.top||l>s.bottom))return;var c=e._shuttleRingPointer.getBoundingClientRect();a=n-a-s.left,s=l-o-s.top;180<(s=180*Math.atan2(s,a)/Math.PI+90)&&(s-=360),a=i.shuttleRingAngle,r||n<c.right&&n>c.left&&l>c.top&&l<c.bottom?(widgetForDrag=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=s):s<a?i.slower():a<s&&i.faster(),t.preventDefault()}else e===widgetForDrag&&(widgetForDrag=void 0),i.shuttleRingDragging=!1}function SvgButton(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;var i=this;this._clickFunction=function(){var e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[subscribeAndEvaluate(t,"toggled",this.setToggled,this),subscribeAndEvaluate(t,"tooltip",this.setTooltip,this),subscribeAndEvaluate(t.command,"canExecute",this.setEnabled,this)]}function Animation(e,t){e=getElement(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;var i=e.ownerDocument,r=document.createElement("style");r.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",i.head.insertBefore(r,i.head.childNodes[0]);var n=document.createElement("div");n.className="cesium-animation-theme",n.innerHTML='<div class="cesium-animation-themeNormal"></div><div class="cesium-animation-themeHover"></div><div class="cesium-animation-themeSelect"></div><div class="cesium-animation-themeDisabled"></div><div class="cesium-animation-themeKnob"></div><div class="cesium-animation-themePointer"></div><div class="cesium-animation-themeSwoosh"></div><div class="cesium-animation-themeSwooshHover"></div>',this._theme=n,this._themeNormal=n.childNodes[0],this._themeHover=n.childNodes[1],this._themeSelect=n.childNodes[2],this._themeDisabled=n.childNodes[3],this._themeKnob=n.childNodes[4],this._themePointer=n.childNodes[5],this._themeSwoosh=n.childNodes[6],this._themeSwooshHover=n.childNodes[7];var a=document.createElementNS(svgNS$1,"svg:svg");(this._svgNode=a).setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",xlinkNS);var o=document.createElementNS(svgNS$1,"g");this._topG=o,this._realtimeSVG=new SvgButton(wingButton(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new SvgButton(rectButton(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new SvgButton(rectButton(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new SvgButton(rectButton(84,99,"animation_pathPause"),t.pauseViewModel);var s=document.createElementNS(svgNS$1,"g");s.appendChild(this._realtimeSVG.svgElement),s.appendChild(this._playReverseSVG.svgElement),s.appendChild(this._playForwardSVG.svgElement),s.appendChild(this._pauseSVG.svgElement);var l=svgFromObject({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=l;var c=svgIconsById.animation_pathSwooshFX,u=svgIconsById.animation_pathPointer,d=svgFromObject({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:c.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:c.d},{tagName:c.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:c.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=d,this._shuttleRingPointer=svgFromObject({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:u.tagName,d:u.d});var h=svgFromObject({tagName:"g",transform:"translate(100,100)"});this._knobOuter=svgFromObject({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71}),r=svgFromObject({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:61}),this._knobDate=svgText(0,-24,""),this._knobTime=svgText(0,-7,""),this._knobStatus=svgText(0,-41,""),c=svgFromObject({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:61}),(u=document.createElementNS(svgNS$1,"g")).setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(n),o.appendChild(u),o.appendChild(h),o.appendChild(s),u.appendChild(l),u.appendChild(d),u.appendChild(this._shuttleRingPointer),h.appendChild(this._knobOuter),h.appendChild(r),h.appendChild(this._knobDate),h.appendChild(this._knobTime),h.appendChild(this._knobStatus),h.appendChild(c),a.appendChild(o),e.appendChild(a);var p=this;function f(e){setShuttleRingFromMouseOrTouch(p,e)}this._mouseCallback=f,l.addEventListener("mousedown",f,!0),l.addEventListener("touchstart",f,!0),d.addEventListener("mousedown",f,!0),d.addEventListener("touchstart",f,!0),i.addEventListener("mousemove",f,!0),i.addEventListener("touchmove",f,!0),i.addEventListener("mouseup",f,!0),i.addEventListener("touchend",f,!0),i.addEventListener("touchcancel",f,!0),this._shuttleRingPointer.addEventListener("mousedown",f,!0),this._shuttleRingPointer.addEventListener("touchstart",f,!0),this._knobOuter.addEventListener("mousedown",f,!0),this._knobOuter.addEventListener("touchstart",f,!0);var m,g=this._knobTime.childNodes[0],y=this._knobDate.childNodes[0],_=this._knobStatus.childNodes[0];this._subscriptions=[subscribeAndEvaluate(t.pauseViewModel,"toggled",(function(e){m!==e&&((m=e)?p._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):p._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))})),subscribeAndEvaluate(t,"shuttleRingAngle",(function(e){setShuttleRingPointer(p._shuttleRingPointer,p._knobOuter,e)})),subscribeAndEvaluate(t,"dateLabel",(function(e){y.textContent!==e&&(y.textContent=e)})),subscribeAndEvaluate(t,"timeLabel",(function(e){g.textContent!==e&&(g.textContent=e)})),subscribeAndEvaluate(t,"multiplierLabel",(function(e){_.textContent!==e&&(_.textContent=e)}))],this.applyThemeChanges(),this.resize()}SvgButton.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;t<i;t++)e[t].dispose();destroyObject(this)},SvgButton.prototype.isDestroyed=function(){return!1},SvgButton.prototype.setEnabled=function(e){if(this._enabled!==e){if(!(this._enabled=e))return void this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");this.svgElement.setAttribute("class","cesium-animation-rectButton")}},SvgButton.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))},SvgButton.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(Animation.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Animation.prototype.isDestroyed=function(){return!1},Animation.prototype.destroy=function(){defined(this._observer)&&(this._observer.disconnect(),this._observer=void 0);var e=this._container.ownerDocument,t=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",t,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",t,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",t,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",t,!0),e.removeEventListener("mousemove",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("mouseup",t,!0),e.removeEventListener("touchend",t,!0),e.removeEventListener("touchcancel",t,!0),this._shuttleRingPointer.removeEventListener("mousedown",t,!0),this._shuttleRingPointer.removeEventListener("touchstart",t,!0),this._knobOuter.removeEventListener("mousedown",t,!0),this._knobOuter.removeEventListener("touchstart",t,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();for(var i=this._subscriptions,r=0,n=i.length;r<n;r++)i[r].dispose();return destroyObject(this)},Animation.prototype.resize=function(){var e,t,i,r,n,a=this._container.clientWidth,o=this._container.clientHeight;a===this._lastWidth&&o===this._lastHeight||(i=o,0===(t=a)&&0===o?(t=200,i=132):0===a?t=(i=o)/132*200:0===o&&(i=(t=a)/200*132),r=t/200,n=i/132,(e=this._svgNode).style.cssText="width: "+t+"px; height: "+i+"px; position: absolute; bottom: 0; left: 0; overflow: hidden;",e.setAttribute("width",t),e.setAttribute("height",i),e.setAttribute("viewBox","0 0 "+t+" "+i),this._topG.setAttribute("transform","scale("+r+","+n+")"),this._centerX=Math.max(1,100*r),this._centerY=Math.max(1,100*n),this._lastHeight=a,this._lastWidth=o)},Animation.prototype.applyThemeChanges=function(){var e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(defined(this._observer))return;var t=this;return t._observer=new MutationObserver((function(){e.body.contains(t._container)&&(t._observer.disconnect(),t._observer=void 0,t.applyThemeChanges())})),void t._observer.observe(e,{childList:!0,subtree:!0})}var i=getElementColor(this._themeNormal),r=getElementColor(this._themeHover),n=getElementColor(this._themeSelect),a=getElementColor(this._themeDisabled),o=getElementColor(this._themeKnob),s=getElementColor(this._themePointer),l=getElementColor(this._themeSwoosh),c=getElementColor(this._themeSwooshHover);o=svgFromObject({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(i,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(i,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(i,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(i,gradientEnabledColor3)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(r,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(r,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(r,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(r,gradientEnabledColor3)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(n,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(n,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(n,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(n,gradientEnabledColor3)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(a,gradientDisabledColor0)},{tagName:"stop",offset:"75%","stop-color":makeColorString(a,gradientDisabledColor1)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":l.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":l.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":makeColorString(s,gradientPointerColor)},{tagName:"stop",offset:"100%","stop-color":makeColorString(s,gradientPointerColor)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":makeColorString(o,gradientEnabledColor0)},{tagName:"stop",offset:"60%","stop-color":makeColorString(o,gradientKnobColor)},{tagName:"stop",offset:"85%","stop-color":makeColorString(o,gradientEnabledColor1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":makeColorString(o,gradientKnobColor)},{tagName:"stop",offset:"60%","stop-color":makeColorString(o,gradientEnabledColor0)},{tagName:"stop",offset:"85%","stop-color":makeColorString(o,gradientEnabledColor3)}]}]});defined(this._defsElement)?this._svgNode.replaceChild(o,this._defsElement):this._svgNode.appendChild(o),this._defsElement=o};var monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],realtimeShuttleRingAngle=15,maxShuttleRingAngle=105;function numberComparator(e,t){return e-t}function getTypicalMultiplierIndex(e,t){return(e=binarySearch(t,e,numberComparator))<0?~e:e}function angleToMultiplier(e,t){if(Math.abs(e)<=realtimeShuttleRingAngle)return e/realtimeShuttleRingAngle;var i,r=realtimeShuttleRingAngle,n=maxShuttleRingAngle;return 0<e?(i=+Math.log(t[t.length-1])/(n-r),Math.exp(0+i*(e-r))):(i=+Math.log(-t[0])/(n-r),-Math.exp(0+i*(Math.abs(e)-r)))}function multiplierToAngle(e,t,i){if(i.clockStep===ClockStep$1.SYSTEM_CLOCK)return realtimeShuttleRingAngle;if(Math.abs(e)<=1)return e*realtimeShuttleRingAngle;var r=t[t.length-1];r<e?e=r:e<-r&&(e=-r);var n,a=realtimeShuttleRingAngle;i=maxShuttleRingAngle;return 0<e?(n=+Math.log(r)/(i-a),+Math.log(e)/n+a):(n=+Math.log(-t[0])/(i-a),-(+Math.log(Math.abs(e))/n+a))}function AnimationViewModel(e){var t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=AnimationViewModel.defaultDateFormatter,this._timeFormatter=AnimationViewModel.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,knockout.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(AnimationViewModel.defaultTicks),this.timeLabel=void 0,knockout.defineProperty(this,"timeLabel",(function(){return t._timeFormatter(t._clockViewModel.currentTime,t)})),this.dateLabel=void 0,knockout.defineProperty(this,"dateLabel",(function(){return t._dateFormatter(t._clockViewModel.currentTime,t)})),this.multiplierLabel=void 0,knockout.defineProperty(this,"multiplierLabel",(function(){var e=t._clockViewModel;return e.clockStep===ClockStep$1.SYSTEM_CLOCK?"Today":(e=e.multiplier)%1==0?e.toFixed(0)+"x":e.toFixed(3).replace(/0{0,3}$/,"")+"x"})),this.shuttleRingAngle=void 0,knockout.defineProperty(this,"shuttleRingAngle",{get:function(){return multiplierToAngle(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,maxShuttleRingAngle),-maxShuttleRingAngle);var i,r,n,a=t._allShuttleRingTicks,o=t._clockViewModel;o.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)!==maxShuttleRingAngle?(n=angleToMultiplier(e,a),t.snapToTicks?n=a[getTypicalMultiplierIndex(n,a)]:0!==n&&(100<(i=Math.abs(n))?(r=i.toFixed(0).length-2,r=Math.pow(10,r),n=Math.round(n/r)*r|0):realtimeShuttleRingAngle<i?n=Math.round(n):1<i?n=+n.toFixed(1):0<i&&(n=+n.toFixed(2))),o.multiplier=n):o.multiplier=0<e?a[a.length-1]:a[0]}}),this._canAnimate=void 0,knockout.defineProperty(this,"_canAnimate",(function(){var e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===ClockRange$1.UNBOUNDED)return!0;var r,n=e.multiplier,a=e.currentTime,o=e.startTime;return(r=i===ClockRange$1.LOOP_STOP?JulianDate.greaterThan(a,o)||a.equals(o)&&0<n:(i=e.stopTime,JulianDate.greaterThan(a,o)&&JulianDate.lessThan(a,i)||a.equals(o)&&0<n||a.equals(i)&&n<0))||(e.shouldAnimate=!1),r})),this._isSystemTimeAvailable=void 0,knockout.defineProperty(this,"_isSystemTimeAvailable",(function(){var e=t._clockViewModel;if(e.clockRange===ClockRange$1.UNBOUNDED)return!0;var i=e.systemTime;return JulianDate.greaterThanOrEquals(i,e.startTime)&&JulianDate.lessThanOrEquals(i,e.stopTime)})),this._isAnimating=void 0,knockout.defineProperty(this,"_isAnimating",(function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)}));var i=createCommand$2((function(){var e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)}));this._pauseViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed((function(){return!t._isAnimating})),tooltip:"Pause"}),i=createCommand$2((function(){var e=t._clockViewModel,i=e.multiplier;0<i&&(e.multiplier=-i),e.shouldAnimate=!0})),this._playReverseViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed((function(){return t._isAnimating&&e.multiplier<0})),tooltip:"Play Reverse"}),i=createCommand$2((function(){var e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0})),this._playForwardViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed((function(){return t._isAnimating&&0<e.multiplier&&e.clockStep!==ClockStep$1.SYSTEM_CLOCK})),tooltip:"Play Forward"}),i=createCommand$2((function(){t._clockViewModel.clockStep=ClockStep$1.SYSTEM_CLOCK}),knockout.getObservable(this,"_isSystemTimeAvailable")),this._playRealtimeViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed((function(){return e.clockStep===ClockStep$1.SYSTEM_CLOCK})),tooltip:knockout.computed((function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"}))}),this._slower=createCommand$2((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,r=getTypicalMultiplierIndex(e.multiplier,i)-1;0<=r&&(e.multiplier=i[r])})),this._faster=createCommand$2((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,r=getTypicalMultiplierIndex(e.multiplier,i)+1;r<i.length&&(e.multiplier=i[r])}))}function BaseLayerPickerViewModel(e){var t=(e=defaultValue(e,defaultValue.EMPTY_OBJECT)).globe,i=defaultValue(e.imageryProviderViewModels,[]),r=defaultValue(e.terrainProviderViewModels,[]);this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=r.slice(0),this.dropDownVisible=!1,knockout.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);var n=knockout.getObservable(this,"imageryProviderViewModels");t=knockout.pureComputed((function(){for(var e=n(),t={},i=0;i<e.length;i++){var r=e[i],a=r.category;defined(t[a])?t[a].push(r):t[a]=[r]}var o=Object.keys(t),s=[];for(i=0;i<o.length;i++){var l=o[i];s.push({name:l,providers:t[l]})}return s}));this._imageryProviders=t;var a=knockout.getObservable(this,"terrainProviderViewModels");t=knockout.pureComputed((function(){for(var e=a(),t={},i=0;i<e.length;i++){var r=e[i],n=r.category;defined(t[n])?t[n].push(r):t[n]=[r]}var o=Object.keys(t),s=[];for(i=0;i<o.length;i++){var l=o[i];s.push({name:l,providers:t[l]})}return s}));this._terrainProviders=t,this.buttonTooltip=void 0,knockout.defineProperty(this,"buttonTooltip",(function(){var e=this.selectedImagery,t=this.selectedTerrain;e=defined(e)?e.name:void 0,t=defined(t)?t.name:void 0;return defined(e)&&defined(t)?e+"\n"+t:defined(e)?e:t})),this.buttonImageUrl=void 0,knockout.defineProperty(this,"buttonImageUrl",(function(){var e=this.selectedImagery;if(defined(e))return e.iconUrl})),this.selectedImagery=void 0;var o=knockout.observable();this._currentImageryProviders=[],knockout.defineProperty(this,"selectedImagery",{get:function(){return o()},set:function(e){if(o()!==e){var t=this._currentImageryProviders,i=t.length,r=this._globe.imageryLayers,n=!1;for(d=0;d<i;d++)for(var a=r.length,s=0;s<a;s++){var l=r.get(s);if(l.imageryProvider===t[d]){r.remove(l),n=!0;break}}if(defined(e)){var c,u=e.creationCommand();if(Array.isArray(u)){for(var d=u.length-1;0<=d;d--)r.addImageryProvider(u[d],0);this._currentImageryProviders=u.slice(0)}else this._currentImageryProviders=[u],n||defined(c=r.get(0))&&r.remove(c),r.addImageryProvider(u,0)}o(e),this.dropDownVisible=!1}else this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var s=knockout.observable();knockout.defineProperty(this,"selectedTerrain",{get:function(){return s()},set:function(e){var t;s()!==e&&(defined(e)&&(t=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(t instanceof EllipsoidTerrainProvider),this._globe.terrainProvider=t,s(e)),this.dropDownVisible=!1}});var l=this;this._toggleDropDown=createCommand$2((function(){l.dropDownVisible=!l.dropDownVisible})),this.selectedImagery=defaultValue(e.selectedImageryProviderViewModel,i[0]),this.selectedTerrain=defaultValue(e.selectedTerrainProviderViewModel,r[0])}function BaseLayerPicker(e,t){e=getElement(e);var i=new BaseLayerPickerViewModel(t),r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(r);var n=document.createElement("img");n.setAttribute("draggable","false"),n.className="cesium-baseLayerPicker-selected",n.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),r.appendChild(n);var a=document.createElement("div");a.className="cesium-baseLayerPicker-dropDown",a.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(a),(t=document.createElement("div")).className="cesium-baseLayerPicker-sectionTitle",t.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),t.innerHTML="Imagery",a.appendChild(t),(n=document.createElement("div")).className="cesium-baseLayerPicker-section",n.setAttribute("data-bind","foreach: _imageryProviders"),a.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-category",n.appendChild(t),(n=document.createElement("div")).className="cesium-baseLayerPicker-categoryTitle",n.setAttribute("data-bind","text: name"),t.appendChild(n),(n=document.createElement("div")).className="cesium-baseLayerPicker-choices",n.setAttribute("data-bind","foreach: providers"),t.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-item",t.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),n.appendChild(t),(n=document.createElement("img")).className="cesium-baseLayerPicker-itemIcon",n.setAttribute("data-bind","attr: { src: iconUrl }"),n.setAttribute("draggable","false"),t.appendChild(n),(n=document.createElement("div")).className="cesium-baseLayerPicker-itemLabel",n.setAttribute("data-bind","text: name"),t.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-sectionTitle",t.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),t.innerHTML="Terrain",a.appendChild(t),(n=document.createElement("div")).className="cesium-baseLayerPicker-section",n.setAttribute("data-bind","foreach: _terrainProviders"),a.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-category",n.appendChild(t),(n=document.createElement("div")).className="cesium-baseLayerPicker-categoryTitle",n.setAttribute("data-bind","text: name"),t.appendChild(n),(n=document.createElement("div")).className="cesium-baseLayerPicker-choices",n.setAttribute("data-bind","foreach: providers"),t.appendChild(n),(t=document.createElement("div")).className="cesium-baseLayerPicker-item",t.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),n.appendChild(t),(n=document.createElement("img")).className="cesium-baseLayerPicker-itemIcon",n.setAttribute("data-bind","attr: { src: iconUrl }"),n.setAttribute("draggable","false"),t.appendChild(n),(n=document.createElement("div")).className="cesium-baseLayerPicker-itemLabel",n.setAttribute("data-bind","text: name"),t.appendChild(n),knockout.applyBindings(i,r),knockout.applyBindings(i,a),this._viewModel=i,this._container=e,this._element=r,this._dropPanel=a,this._closeDropDown=function(e){r.contains(e.target)||a.contains(e.target)||(i.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function ProviderViewModel(e){var t=e.creationFunction;defined(t.canExecute)||(t=createCommand$2(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=defaultValue(e.category,""),knockout.track(this,["name","tooltip","iconUrl"])}function createDefaultImageryProviderViewModels(){var e=[];return e.push(new ProviderViewModel({name:"Bing Maps Aerial",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImagery({style:IonWorldImageryStyle$1.AERIAL})}})),e.push(new ProviderViewModel({name:"Bing Maps Aerial with Labels",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImagery({style:IonWorldImageryStyle$1.AERIAL_WITH_LABELS})}})),e.push(new ProviderViewModel({name:"Bing Maps Roads",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImagery({style:IonWorldImageryStyle$1.ROAD})}})),e.push(new ProviderViewModel({name:"ESRI World Imagery",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide.  The map includes NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal.  Additionally, imagery at different resolutions has been contributed by the GIS User Community.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new ArcGisMapServerImageryProvider({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"ESRI World Street Map",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new ArcGisMapServerImageryProvider({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"ESRI National Geographic",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new ArcGisMapServerImageryProvider({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"Open­Street­Map",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return new OpenStreetMapImageryProvider({url:"https://a.tile.openstreetmap.org/"})}})),e.push(new ProviderViewModel({name:"Stamen Watercolor",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\nhttp://maps.stamen.com",category:"Other",creationFunction:function(){return new OpenStreetMapImageryProvider({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new ProviderViewModel({name:"Stamen Toner",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\nhttp://maps.stamen.com",category:"Other",creationFunction:function(){return new OpenStreetMapImageryProvider({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new ProviderViewModel({name:"Sentinel-2",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return new IonImageryProvider({assetId:3954})}})),e.push(new ProviderViewModel({name:"Blue Marble",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return new IonImageryProvider({assetId:3845})}})),e.push(new ProviderViewModel({name:"Earth at night",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return new IonImageryProvider({assetId:3812})}})),e.push(new ProviderViewModel({name:"Natural Earth II",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",category:"Cesium ion",creationFunction:function(){return new TileMapServiceImageryProvider({url:buildModuleUrl("Assets/Textures/NaturalEarthII")})}})),e}function createDefaultTerrainProviderViewModels(){var e=[];return e.push(new ProviderViewModel({name:"WGS84 Ellipsoid",iconUrl:buildModuleUrl("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new EllipsoidTerrainProvider}})),e.push(new ProviderViewModel({name:"Cesium World Terrain",iconUrl:buildModuleUrl("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldTerrain({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function getPickTileset(e){return function(t){defined(t=e._scene.pick(t.position))&&t.primitive instanceof Cesium3DTileset&&(e.tileset=t.primitive),e.pickActive=!1}}function selectTilesetOnHover(e,t){t?e._eventHandler.setInputAction((function(t){defined(t=e._scene.pick(t.endPosition))&&t.primitive instanceof Cesium3DTileset&&(e.tileset=t.primitive)}),ScreenSpaceEventType$1.MOUSE_MOVE):(e._eventHandler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE),e.picking=e.picking)}AnimationViewModel.defaultDateFormatter=function(e,t){return e=JulianDate.toGregorianDate(e),monthNames[e.month-1]+" "+e.day+" "+e.year},AnimationViewModel.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800],AnimationViewModel.defaultTimeFormatter=function(e,t){var i=JulianDate.toGregorianDate(e);e=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?sprintf("%02d:%02d:%02d.%03d",i.hour,i.minute,i.second,e):sprintf("%02d:%02d:%02d UTC",i.hour,i.minute,i.second)},AnimationViewModel.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},AnimationViewModel.prototype.setShuttleRingTicks=function(e){var t,i={},r=this._sortedFilteredPositiveTicks;for(o=r.length=0,n=e.length;o<n;++o)t=e[o],i.hasOwnProperty(t)||(i[t]=!0,r.push(t));r.sort(numberComparator);for(var n,a=[],o=(n=r.length)-1;0<=o;--o)0!==(t=r[o])&&a.push(-t);Array.prototype.push.apply(a,r),this._allShuttleRingTicks=a},Object.defineProperties(AnimationViewModel.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){this._timeFormatter=e}}}),AnimationViewModel._maxShuttleRingAngle=maxShuttleRingAngle,AnimationViewModel._realtimeShuttleRingAngle=realtimeShuttleRingAngle,Object.defineProperties(BaseLayerPickerViewModel.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(BaseLayerPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),BaseLayerPicker.prototype.isDestroyed=function(){return!1},BaseLayerPicker.prototype.destroy=function(){return FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._element),knockout.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),destroyObject(this)},Object.defineProperties(ProviderViewModel.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var stringOptions$1={maximumFractionDigits:3};function formatMemoryString$1(e){return(e/=1048576)<1?e.toLocaleString(void 0,stringOptions$1):Math.round(e).toLocaleString()}function getStatistics(e,t){if(!defined(e))return"";var i=t?e._statisticsPerPass[Cesium3DTilePass$1.PICK]:e._statisticsPerPass[Cesium3DTilePass$1.RENDER];e='<ul class="cesium-cesiumInspector-statistics">';return e+="<li><strong>Visited: </strong>"+i.visited.toLocaleString()+"</li><li><strong>Selected: </strong>"+i.selected.toLocaleString()+"</li><li><strong>Commands: </strong>"+i.numberOfCommands.toLocaleString()+"</li>",e+="</ul>",t||(e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Requests: </strong>"+i.numberOfPendingRequests.toLocaleString()+"</li><li><strong>Attempted: </strong>"+i.numberOfAttemptedRequests.toLocaleString()+"</li><li><strong>Processing: </strong>"+i.numberOfTilesProcessing.toLocaleString()+"</li><li><strong>Content Ready: </strong>"+i.numberOfTilesWithContentReady.toLocaleString()+"</li><li><strong>Total: </strong>"+i.numberOfTilesTotal.toLocaleString()+"</li>",e+="</ul>",e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Features Selected: </strong>"+i.numberOfFeaturesSelected.toLocaleString()+"</li><li><strong>Features Loaded: </strong>"+i.numberOfFeaturesLoaded.toLocaleString()+"</li><li><strong>Points Selected: </strong>"+i.numberOfPointsSelected.toLocaleString()+"</li><li><strong>Points Loaded: </strong>"+i.numberOfPointsLoaded.toLocaleString()+"</li><li><strong>Triangles Selected: </strong>"+i.numberOfTrianglesSelected.toLocaleString()+"</li>",e+="</ul>",e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Tiles styled: </strong>"+i.numberOfTilesStyled.toLocaleString()+"</li><li><strong>Features styled: </strong>"+i.numberOfFeaturesStyled.toLocaleString()+"</li>",e+="</ul>",e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Children Union Culled: </strong>"+i.numberOfTilesCulledWithChildrenUnion.toLocaleString()+"</li>",e+="</ul>",e+='<ul class="cesium-cesiumInspector-statistics">',e+="<li><strong>Geometry Memory (MB): </strong>"+formatMemoryString$1(i.geometryByteLength)+"</li><li><strong>Texture Memory (MB): </strong>"+formatMemoryString$1(i.texturesByteLength)+"</li><li><strong>Batch Table Memory (MB): </strong>"+formatMemoryString$1(i.batchTableByteLength)+"</li>",e+="</ul>"),e}var colorBlendModes=[{text:"Highlight",value:Cesium3DTileColorBlendMode$1.HIGHLIGHT},{text:"Replace",value:Cesium3DTileColorBlendMode$1.REPLACE},{text:"Mix",value:Cesium3DTileColorBlendMode$1.MIX}],highlightColor$1=new Color(1,1,0,.4),scratchColor$l=new Color,oldColor=new Color;function Cesium3DTilesInspectorViewModel(e,t){var i=this,r=e.canvas;this._eventHandler=new ScreenSpaceEventHandler(r),this._scene=e,this._performanceContainer=t,this._canvas=r,this._performanceDisplay=new PerformanceDisplay({container:t}),this._statisticsText="",this._pickStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this._tileset=void 0,this._feature=void 0,this._tile=void 0,knockout.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_editorError","showPickStatistics","showStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile"]),this._properties=knockout.observable({}),this.properties=[],knockout.defineProperty(this,"properties",(function(){var e,t=[],r=i._properties();for(e in r)r.hasOwnProperty(e)&&t.push(e);return t}));var n=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return n()},set:function(e){n(e),defined(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;var a=knockout.observable();knockout.defineProperty(this,"colorBlendMode",{get:function(){return a()},set:function(e){a(e),defined(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=Cesium3DTileColorBlendMode$1.HIGHLIGHT;var o=knockout.observable(),s=knockout.observable();knockout.defineProperty(this,"picking",{get:function(){return s()},set:function(t){s(t),t?i._eventHandler.setInputAction((function(t){var r,n=e.pick(t.endPosition);n instanceof Cesium3DTileFeature?(i.feature=n,i.tile=n.content.tile):defined(n)&&defined(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),defined(i._tileset)&&(o&&defined(n)&&defined(n.content)?(e.pickPositionSupported&&defined(r=e.pickPosition(t.endPosition))&&(i._tileset.debugPickPosition=r),i._tileset.debugPickedTile=n.content.tile):i._tileset.debugPickedTile=void 0,i._scene.requestRender())}),ScreenSpaceEventType$1.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE))}}),this.picking=!0;var l=knockout.observable();knockout.defineProperty(this,"colorize",{get:function(){return l()},set:function(e){l(e),defined(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;var c=knockout.observable();knockout.defineProperty(this,"wireframe",{get:function(){return c()},set:function(e){c(e),defined(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;var u=knockout.observable();knockout.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(e){u(e),defined(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;var d=knockout.observable();knockout.defineProperty(this,"showContentBoundingVolumes",{get:function(){return d()},set:function(e){d(e),defined(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;var h=knockout.observable();knockout.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),defined(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;var p=knockout.observable();knockout.defineProperty(this,"freezeFrame",{get:function(){return p()},set:function(e){p(e),defined(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1,knockout.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return o()},set:function(e){o(e),defined(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;var f=knockout.observable();knockout.defineProperty(this,"showGeometricError",{get:function(){return f()},set:function(e){f(e),defined(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;var m=knockout.observable();knockout.defineProperty(this,"showRenderingStatistics",{get:function(){return m()},set:function(e){m(e),defined(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;var g=knockout.observable();knockout.defineProperty(this,"showMemoryUsage",{get:function(){return g()},set:function(e){g(e),defined(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;var y=knockout.observable();knockout.defineProperty(this,"showUrl",{get:function(){return y()},set:function(e){y(e),defined(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;var _=knockout.observable();knockout.defineProperty(this,"maximumScreenSpaceError",{get:function(){return _()},set:function(e){e=Number(e),isNaN(e)||(_(e),defined(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;var v=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),defined(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,knockout.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(v(),1/6)},set:function(e){v(Math.pow(e,6))}});var C=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),defined(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=4;var x=getPickTileset(this),b=knockout.observable();knockout.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction(x,ScreenSpaceEventType$1.LEFT_CLICK):i._eventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)}});var S=knockout.observable();knockout.defineProperty(this,"pointCloudShading",{get:function(){return S()},set:function(e){S(e),defined(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;var T=knockout.observable();knockout.defineProperty(this,"geometricErrorScale",{get:function(){return T()},set:function(e){e=Number(e),isNaN(e)||(T(e),defined(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;var E=knockout.observable();knockout.defineProperty(this,"maximumAttenuation",{get:function(){return E()},set:function(e){e=Number(e),isNaN(e)||(E(e),defined(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;var w=knockout.observable();knockout.defineProperty(this,"baseResolution",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),defined(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;var A=knockout.observable();knockout.defineProperty(this,"eyeDomeLighting",{get:function(){return A()},set:function(e){A(e),defined(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;var P=knockout.observable();knockout.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),defined(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;var D=knockout.observable();knockout.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return D()},set:function(e){e=Number(e),isNaN(e)||(D(e),defined(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;var M=knockout.observable();knockout.defineProperty(this,"skipLevelOfDetail",{get:function(){return M()},set:function(e){M(e),defined(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;var I=knockout.observable();knockout.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return I()},set:function(e){e=Number(e),isNaN(e)||(I(e),defined(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;var R=knockout.observable();knockout.defineProperty(this,"baseScreenSpaceError",{get:function(){return R()},set:function(e){e=Number(e),isNaN(e)||(R(e),defined(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;var O=knockout.observable();knockout.defineProperty(this,"skipLevels",{get:function(){return O()},set:function(e){e=Number(e),isNaN(e)||(O(e),defined(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;var L=knockout.observable();knockout.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return L()},set:function(e){L(e),defined(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;var N=knockout.observable();knockout.defineProperty(this,"loadSiblings",{get:function(){return N()},set:function(e){N(e),defined(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()})),defined(this._tileset)||selectTilesetOnHover(this,!0)}function hasFeatures(e){if(0<e.featuresLength)return 1;var t=e.innerContents;if(defined(t)){for(var i=t.length,r=0;r<i;++r)if(!hasFeatures(t[r]))return;return 1}}function Cesium3DTilesInspector(e,t){e=getElement(e);var i=document.createElement("div"),r=document.createElement("div");r.setAttribute("data-bind","visible: performance");var n=new Cesium3DTilesInspectorViewModel(t,r);this._viewModel=n,this._container=e,this._element=i,(p=document.createElement("div")).textContent="3D Tiles Inspector",p.className="cesium-cesiumInspector-button",p.setAttribute("data-bind","click: toggleInspector"),i.appendChild(p),i.className="cesium-cesiumInspector cesium-3DTilesInspector",i.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);var a=document.createElement("div");(this._panel=a).className="cesium-cesiumInspector-dropDown",i.appendChild(a);var o=InspectorShared.createSection,s=InspectorShared.createCheckbox,l=o(a,"Tileset","tilesetVisible","toggleTileset"),c=o(a,"Display","displayVisible","toggleDisplay"),u=o(a,"Update","updateVisible","toggleUpdate"),d=o(a,"Logging","loggingVisible","toggleLogging"),h=o(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),p=(t=o(a,"Style","styleVisible","toggleStyle"),o(a,"Optimization","optimizationVisible","toggleOptimization"));(e=document.createElement("div")).className="field-group",(o=document.createElement("label")).className="field-label",o.appendChild(document.createTextNode("Properties: ")),(a=document.createElement("div")).setAttribute("data-bind","text: properties"),e.appendChild(o),e.appendChild(a),l.appendChild(e),l.appendChild(makeButton("togglePickTileset","Pick Tileset","pickActive")),l.appendChild(makeButton("trimTilesCache","Trim Tiles Cache")),l.appendChild(s("Enable Picking","picking")),c.appendChild(s("Colorize","colorize")),c.appendChild(s("Wireframe","wireframe")),c.appendChild(s("Bounding Volumes","showBoundingVolumes")),c.appendChild(s("Content Volumes","showContentBoundingVolumes")),c.appendChild(s("Request Volumes","showRequestVolumes")),c.appendChild(s("Point Cloud Shading","pointCloudShading")),(l=document.createElement("div")).setAttribute("data-bind","visible: pointCloudShading"),l.appendChild(makeRangeInput("geometricErrorScale",0,2,.01,"Geometric Error Scale")),l.appendChild(makeRangeInput("maximumAttenuation",0,32,1,"Maximum Attenuation")),l.appendChild(makeRangeInput("baseResolution",0,1,.01,"Base Resolution")),l.appendChild(s("Eye Dome Lighting (EDL)","eyeDomeLighting")),c.appendChild(l),(c=document.createElement("div")).setAttribute("data-bind","visible: eyeDomeLighting"),c.appendChild(makeRangeInput("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),c.appendChild(makeRangeInput("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),l.appendChild(c),u.appendChild(s("Freeze Frame","freezeFrame")),u.appendChild(s("Dynamic Screen Space Error","dynamicScreenSpaceError")),(c=document.createElement("div")).appendChild(makeRangeInput("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),u.appendChild(c),(c=document.createElement("div")).setAttribute("data-bind","visible: dynamicScreenSpaceError"),c.appendChild(makeRangeInput("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),c.appendChild(makeRangeInput("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),u.appendChild(c),d.appendChild(s("Performance","performance")),d.appendChild(r),d.appendChild(s("Statistics","showStatistics")),(r=document.createElement("div")).className="cesium-3dTilesInspector-statistics",r.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),d.appendChild(r),d.appendChild(s("Pick Statistics","showPickStatistics")),(r=document.createElement("div")).className="cesium-3dTilesInspector-statistics",r.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),d.appendChild(r),r=document.createElement("div"),t.appendChild(r),r.appendChild(document.createTextNode("Color Blend Mode: ")),(t=document.createElement("select")).setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),r.appendChild(t),(t=document.createElement("textarea")).setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),r.className="cesium-cesiumInspector-styleEditor",r.appendChild(t),t=makeButton("compileStyle","Compile (Ctrl+Enter)"),r.appendChild(t),(t=document.createElement("div")).className="cesium-cesiumInspector-error",t.setAttribute("data-bind","text: editorError"),r.appendChild(t),h.appendChild(s("Show Picked Only","showOnlyPickedTileDebugLabel")),h.appendChild(s("Geometric Error","showGeometricError")),h.appendChild(s("Rendering Statistics","showRenderingStatistics")),h.appendChild(s("Memory Usage (MB)","showMemoryUsage")),h.appendChild(s("Url","showUrl")),p.appendChild(s("Skip Tile LODs","skipLevelOfDetail")),(h=document.createElement("div")).appendChild(makeRangeInput("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),p.appendChild(h),(h=document.createElement("div")).appendChild(makeRangeInput("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),p.appendChild(h),(h=document.createElement("div")).appendChild(makeRangeInput("skipLevels",0,10,1,"Min. levels to skip")),p.appendChild(h),p.appendChild(s("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),p.appendChild(s("Load siblings of visible tiles","loadSiblings")),knockout.applyBindings(n,i)}function makeRangeInput(e,t,i,r,n,a){a=defaultValue(a,e);var o=document.createElement("input");return o.setAttribute("data-bind","value: "+a),o.type="number",(a=document.createElement("input")).type="range",a.min=t,a.max=i,a.step=r,a.setAttribute("data-bind",'valueUpdate: "input", value: '+e),(e=document.createElement("div")).appendChild(a),(a=document.createElement("div")).className="cesium-cesiumInspector-slider",a.appendChild(document.createTextNode(n)),a.appendChild(o),a.appendChild(e),a}function makeButton(e,t,i){var r=document.createElement("button");return r.type="button",r.textContent=t,r.className="cesium-cesiumInspector-pickButton",e="click: "+e,defined(i)&&(e+=', css: {"cesium-cesiumInspector-pickButtonHighlight" : '+i+"}"),r.setAttribute("data-bind",e),r}function frustumStatisticsToString(e){var t;if(defined(e)){t="Command Statistics";var i,r=e.commandsInFrustums;for(i in r)if(r.hasOwnProperty(i)){var n,a=parseInt(i,10);if(7===a)n="1, 2 and 3";else{for(var o=[],s=2;0<=s;s--){var l=Math.pow(2,s);l<=a&&(o.push(s+1),a-=l)}n=o.reverse().join(" and ")}t+="<br>&nbsp;&nbsp;&nbsp;&nbsp;"+r[i]+" in frustum "+n}t+="<br>Total: "+e.totalCommands}return t}function boundDepthFrustum(e,t,i){return t=Math.min(i,t),Math.max(t,e)}Object.defineProperties(Cesium3DTilesInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},colorBlendModes:{get:function(){return colorBlendModes}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,defined(e)){var t=this;e.readyPromise.then((function(e){t.isDestroyed()||t._properties(e.properties)}));for(var i=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],r=i.length,n=0;n<r;++n){var a=i[n];this[a]=this[a]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings;var o=e.pointCloudShading;this.pointCloudShading=o.attenuation,this.geometricErrorScale=o.geometricErrorScale,this.maximumAttenuation=o.maximumAttenuation?o.maximumAttenuation:0,this.baseResolution=o.baseResolution?o.baseResolution:0,this.eyeDomeLighting=o.eyeDomeLighting,this.eyeDomeLightingStrength=o.eyeDomeLightingStrength,this.eyeDomeLightingRadius=o.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=getStatistics(e,!1),this._pickStatisticsText=getStatistics(e,!0),selectTilesetOnHover(this,!1)}},feature:{get:function(){return this._feature},set:function(e){var t;this._feature!==e&&(defined(t=this._feature)&&!t.content.isDestroyed()&&(!this.colorize&&defined(this._style)?t.color=defined(this._style.color)?this._style.color.evaluateColor(t,scratchColor$l):Color.WHITE:t.color=oldColor,this._scene.requestRender()),defined(e)&&(Color.clone(e.color,oldColor),e.color=highlightColor$1,this._scene.requestRender()),this._feature=e)}},tile:{get:function(){return this._tile},set:function(e){var t;this._tile!==e&&(!defined(t=this._tile)||t.isDestroyed()||hasFeatures(t.content)||(t.color=oldColor,this._scene.requestRender()),defined(e)&&!hasFeatures(e.content)&&(Color.clone(e.color,oldColor),e.color=highlightColor$1,this._scene.requestRender()),this._tile=e)}}}),Cesium3DTilesInspectorViewModel.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},Cesium3DTilesInspectorViewModel.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},Cesium3DTilesInspectorViewModel.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},Cesium3DTilesInspectorViewModel.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},Cesium3DTilesInspectorViewModel.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},Cesium3DTilesInspectorViewModel.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},Cesium3DTilesInspectorViewModel.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},Cesium3DTilesInspectorViewModel.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},Cesium3DTilesInspectorViewModel.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},Cesium3DTilesInspectorViewModel.prototype.trimTilesCache=function(){defined(this._tileset)&&this._tileset.trimLoadedTiles()},Cesium3DTilesInspectorViewModel.prototype.compileStyle=function(){var e=this._tileset;if(defined(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new Cesium3DTileStyle(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},Cesium3DTilesInspectorViewModel.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();var i,r=t.target,n=r.selectionStart,a=r.selectionEnd,o=a,s=r.value.slice(n,a).split("\n"),l=s.length;if(t.shiftKey)for(i=0;i<l;++i)" "===s[i][0]&&(" "===s[i][1]?(s[i]=s[i].substr(2),o-=2):(s[i]=s[i].substr(1),--o));else for(i=0;i<l;++i)s[i]="  "+s[i],o+=2;var c=s.join("\n");r.value=r.value.slice(0,n)+c+r.value.slice(a),r.selectionStart=n!==a?n:o,r.selectionEnd=o}else!t.ctrlKey||10!==t.keyCode&&13!==t.keyCode||this.compileStyle();return!0},Cesium3DTilesInspectorViewModel.prototype._update=function(){var e=this._tileset;if(this.performance&&this._performanceDisplay.update(),defined(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);var t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null,"  ")))}this.showStatistics&&(this._statisticsText=getStatistics(e,!1),this._pickStatisticsText=getStatistics(e,!0))},Cesium3DTilesInspectorViewModel.prototype.isDestroyed=function(){return!1},Cesium3DTilesInspectorViewModel.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();var e=this;return this._definedProperties.forEach((function(t){knockout.getObservable(e,t).dispose()})),destroyObject(this)},Cesium3DTilesInspectorViewModel.getStatistics=getStatistics,Object.defineProperties(Cesium3DTilesInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Cesium3DTilesInspector.prototype.isDestroyed=function(){return!1},Cesium3DTilesInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject(this)};var scratchPickRay$1=new Ray,scratchPickCartesian$1=new Cartesian3;function CesiumInspectorViewModel(e,t){var i=this,r=e.canvas,n=new ScreenSpaceEventHandler(r);this._eventHandler=n,this._scene=e,this._canvas=r,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;var a,o=this._scene.globe;function s(e){defined(e=i._scene.pick({x:e.position.x,y:e.position.y}))&&(i.primitive=defined(e.collection)?e.collection:e.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function l(e){var t,r=o.ellipsoid;e=i._scene.camera.getPickRay(e.position,scratchPickRay$1);if(defined(e=o.pick(e,i._scene,scratchPickCartesian$1)))for(var n=r.cartesianToCartographic(e),a=o._surface.tileProvider._tilesToRenderByTextureCount,s=0;!t&&s<a.length;++s){var l=a[s];if(defined(l))for(var c=0;!t&&c<l.length;++c){var u=l[c];Rectangle.contains(u.rectangle,n)&&(t=u)}}i.tile=t,i.pickTileActive=!1}o.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.globeDepth=!1,this.pickDepth=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",knockout.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","globeDepth","pickDepth","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=createCommand$2((function(){i.dropDownVisible=!i.dropDownVisible})),this._toggleGeneral=createCommand$2((function(){i.generalVisible=!i.generalVisible})),this._togglePrimitives=createCommand$2((function(){i.primitivesVisible=!i.primitivesVisible})),this._toggleTerrain=createCommand$2((function(){i.terrainVisible=!i.terrainVisible})),this._frustumsSubscription=knockout.getObservable(this,"frustums").subscribe((function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()})),this._frustumPlanesSubscription=knockout.getObservable(this,"frustumPlanes").subscribe((function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()})),this._performanceSubscription=knockout.getObservable(this,"performance").subscribe((function(e){e?i._performanceDisplay=new PerformanceDisplay({container:i._performanceContainer}):i._performanceContainer.innerHTML=""})),this._showPrimitiveBoundingSphere=createCommand$2((function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0})),this._primitiveBoundingSphereSubscription=knockout.getObservable(this,"primitiveBoundingSphere").subscribe((function(){i._showPrimitiveBoundingSphere()})),this._showPrimitiveReferenceFrame=createCommand$2((function(){var e;return i.primitiveReferenceFrame?(e=i._primitive.modelMatrix,i._modelMatrixPrimitive=new DebugModelMatrixPrimitive({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)):defined(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0),i._scene.requestRender(),!0})),this._primitiveReferenceFrameSubscription=knockout.getObservable(this,"primitiveReferenceFrame").subscribe((function(){i._showPrimitiveReferenceFrame()})),this._doFilterPrimitive=createCommand$2((function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!defined(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!defined(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0})),this._filterPrimitiveSubscription=knockout.getObservable(this,"filterPrimitive").subscribe((function(){i._doFilterPrimitive(),i._scene.requestRender()})),this._wireframeSubscription=knockout.getObservable(this,"wireframe").subscribe((function(e){o._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()})),this._globeDepthSubscription=knockout.getObservable(this,"globeDepth").subscribe((function(e){i._scene.debugShowGlobeDepth=e,i._scene.requestRender()})),this._pickDepthSubscription=knockout.getObservable(this,"pickDepth").subscribe((function(e){i._scene.debugShowPickDepth=e,i._scene.requestRender()})),this._depthFrustumSubscription=knockout.getObservable(this,"depthFrustum").subscribe((function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()})),this._incrementDepthFrustum=createCommand$2((function(){var e=i.depthFrustum+1;return i.depthFrustum=boundDepthFrustum(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._decrementDepthFrustum=createCommand$2((function(){var e=i.depthFrustum-1;return i.depthFrustum=boundDepthFrustum(1,i._numberOfFrustums,e),i._scene.requestRender(),!0})),this._suspendUpdatesSubscription=knockout.getObservable(this,"suspendUpdates").subscribe((function(e){(o._surface._debug.suspendLodUpdate=e)||(i.filterTile=!1)})),this._showTileCoordinates=createCommand$2((function(){return i.tileCoordinates&&!defined(a)?a=e.imageryLayers.addImageryProvider(new TileCoordinatesImageryProvider({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&defined(a)&&(e.imageryLayers.remove(a),a=void 0),!0})),this._tileCoordinatesSubscription=knockout.getObservable(this,"tileCoordinates").subscribe((function(){i._showTileCoordinates(),i._scene.requestRender()})),this._tileBoundingSphereSubscription=knockout.getObservable(this,"tileBoundingSphere").subscribe((function(){i._showTileBoundingSphere(),i._scene.requestRender()})),this._showTileBoundingSphere=createCommand$2((function(){return i.tileBoundingSphere?o._surface.tileProvider._debug.boundingSphereTile=i._tile:o._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0})),this._doFilterTile=createCommand$2((function(){return i.filterTile?(i.suspendUpdates=!0,o._surface._tilesToRender=[],defined(i._tile)&&i._tile.renderable&&o._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0})),this._filterTileSubscription=knockout.getObservable(this,"filterTile").subscribe((function(){i.doFilterTile(),i._scene.requestRender()})),this._pickPrimitive=createCommand$2((function(){i.pickPrimitiveActive=!i.pickPrimitiveActive})),this._pickPrimitiveActiveSubscription=knockout.getObservable(this,"pickPrimitiveActive").subscribe((function(e){e?n.setInputAction(s,ScreenSpaceEventType$1.LEFT_CLICK):n.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)})),this._pickTile=createCommand$2((function(){i.pickTileActive=!i.pickTileActive})),this._pickTileActiveSubscription=knockout.getObservable(this,"pickTileActive").subscribe((function(e){e?n.setInputAction(l,ScreenSpaceEventType$1.LEFT_CLICK):n.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)})),this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()}))}function CesiumInspector(e,t){e=getElement(e);var i=document.createElement("div"),r=new CesiumInspectorViewModel(t,i);this._viewModel=r,this._container=e;var n=document.createElement("div");this._element=n;var a=document.createElement("div");a.textContent="Cesium Inspector",a.className="cesium-cesiumInspector-button",a.setAttribute("data-bind","click: toggleDropDown"),n.appendChild(a),n.className="cesium-cesiumInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);var o=document.createElement("div");(this._panel=o).className="cesium-cesiumInspector-dropDown",n.appendChild(o);var s=InspectorShared.createSection,l=InspectorShared.createCheckbox,c=s(o,"General","generalVisible","toggleGeneral"),u=l("Show Frustums","frustums"),d=document.createElement("div");d.className="cesium-cesiumInspector-frustumStatistics",d.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),u.appendChild(d),c.appendChild(u),c.appendChild(l("Show Frustum Planes","frustumPlanes")),c.appendChild(l("Performance Display","performance")),i.className="cesium-cesiumInspector-performanceDisplay",c.appendChild(i);var h=document.createElement("div");h.className="cesium-cesiumInspector-shaderCache",h.setAttribute("data-bind","html: shaderCacheText"),c.appendChild(h);var p=document.createElement("div");c.appendChild(p),(t=document.createElement("span")).setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),p.appendChild(t),(a=document.createElement("span")).setAttribute("data-bind","text: depthFrustumText"),p.appendChild(a),(e=document.createElement("input")).type="button",e.value="-",e.className="cesium-cesiumInspector-pickButton",e.setAttribute("data-bind","click: decrementDepthFrustum"),p.appendChild(e),(n=document.createElement("input")).type="button",n.value="+",n.className="cesium-cesiumInspector-pickButton",n.setAttribute("data-bind","click: incrementDepthFrustum"),p.appendChild(n),d=s(o,"Primitives","primitivesVisible","togglePrimitives"),(u=document.createElement("div")).className="cesium-cesiumInspector-pickSection",d.appendChild(u),(i=document.createElement("input")).type="button",i.value="Pick a primitive",i.className="cesium-cesiumInspector-pickButton",i.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive'),(h=document.createElement("div")).className="cesium-cesiumInspector-center",h.appendChild(i),u.appendChild(h),u.appendChild(l("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),u.appendChild(l("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=l("Show only selected","filterPrimitive","hasPickedPrimitive"),u.appendChild(this._primitiveOnly),c=s(o,"Terrain","terrainVisible","toggleTerrain"),(t=document.createElement("div")).className="cesium-cesiumInspector-pickSection",c.appendChild(t),(a=document.createElement("input")).type="button",a.value="Pick a tile",a.className="cesium-cesiumInspector-pickButton",a.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),(h=document.createElement("div")).appendChild(a),h.className="cesium-cesiumInspector-center",t.appendChild(h),e=document.createElement("div"),t.appendChild(e),(p=document.createElement("input")).type="button",p.value="Parent",p.className="cesium-cesiumInspector-pickButton",p.setAttribute("data-bind","click: selectParent"),(n=document.createElement("input")).type="button",n.value="NW",n.className="cesium-cesiumInspector-pickButton",n.setAttribute("data-bind","click: selectNW"),(d=document.createElement("input")).type="button",d.value="NE",d.className="cesium-cesiumInspector-pickButton",d.setAttribute("data-bind","click: selectNE"),(i=document.createElement("input")).type="button",i.value="SW",i.className="cesium-cesiumInspector-pickButton",i.setAttribute("data-bind","click: selectSW"),(u=document.createElement("input")).type="button",u.value="SE",u.className="cesium-cesiumInspector-pickButton",u.setAttribute("data-bind","click: selectSE"),(s=document.createElement("div")).className="cesium-cesiumInspector-tileText",e.className="cesium-cesiumInspector-frustumStatistics",e.appendChild(s),e.setAttribute("data-bind","visible: hasPickedTile"),s.setAttribute("data-bind","html: tileText"),(o=document.createElement("div")).className="cesium-cesiumInspector-relativeText",o.textContent="Select relative:",e.appendChild(o),a=document.createElement("table"),h=document.createElement("tr"),s=document.createElement("tr"),(o=document.createElement("td")).appendChild(p),(p=document.createElement("td")).appendChild(n),(n=document.createElement("td")).appendChild(d),h.appendChild(o),h.appendChild(p),h.appendChild(n),p=document.createElement("td"),(n=document.createElement("td")).appendChild(i),(i=document.createElement("td")).appendChild(u),s.appendChild(p),s.appendChild(n),s.appendChild(i),a.appendChild(h),a.appendChild(s),e.appendChild(a),t.appendChild(l("Show bounding volume","tileBoundingSphere","hasPickedTile")),t.appendChild(l("Show only selected","filterTile","hasPickedTile")),c.appendChild(l("Wireframe","wireframe")),c.appendChild(l("Suspend LOD update","suspendUpdates")),c.appendChild(l("Show tile coordinates","tileCoordinates")),knockout.applyBindings(r,this._element)}function getDefaultSkyBoxUrl(e){return buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_"+e+".jpg")}function startRenderLoop(e){e._renderLoopRunning=!0;var t=0;requestAnimationFramePolyFill((function i(r){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var n,a=e._targetFrameRate;defined(a)?(n=1e3/a)<(a=r-t)&&(e.resize(),e.render(),t=r-a%n):(e.resize(),e.render()),requestAnimationFramePolyFill(i)}catch(i){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering.  Rendering has stopped.",void 0,i)}else e._renderLoopRunning=!1}))}function configurePixelRatio(e){var t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,defined(e._scene)&&(e._scene.pixelRatio=t),t}function configureCanvasSize(e){var t=e._canvas,i=t.clientWidth,r=t.clientHeight,n=configurePixelRatio(e);e._canvasClientWidth=i,e._canvasClientHeight=r,i*=n,r*=n,t.width=i,t.height=r,e._canRender=0!=i&&0!=r,e._lastDevicePixelRatio=window.devicePixelRatio}function configureCameraFrustum(e){var t=(i=e._canvas).width,i=i.height;0!==t&&0!==i&&(defined((e=e._scene.camera.frustum).aspectRatio)?e.aspectRatio=t/i:(e.top=e.right*(i/t),e.bottom=-e.top))}function CesiumWidget(e,t){e=getElement(e),t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=document.createElement("div");i.className="cesium-widget",e.appendChild(i);var r=document.createElement("canvas"),n=FeatureDetection.supportsImageRenderingPixelated();function a(){r!==r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()}(this._supportsImageRenderingPixelated=n)&&(r.style.imageRendering=FeatureDetection.imageRenderingValue()),r.oncontextmenu=function(){return!1},r.onselectstart=function(){return!1},r.addEventListener("mousedown",a),r.addEventListener("pointerdown",a),i.appendChild(r);var o=document.createElement("div");o.className="cesium-widget-credits";var s=defined(t.creditContainer)?getElement(t.creditContainer):i;s.appendChild(o);var l=defined(t.creditViewport)?getElement(t.creditViewport):i,c=defaultValue(t.showRenderLoopErrors,!0);n=defaultValue(t.useBrowserRecommendedResolution,!0);this._element=i,this._container=e,this._canvas=r,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=l,this._creditContainer=s,this._innerCreditContainer=o,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=c,this._resolutionScale=1,this._useBrowserRecommendedResolution=n,this._forceResize=!1,this._clock=defined(t.clock)?t.clock:new Clock,configureCanvasSize(this);try{var u=new Scene({canvas:r,contextOptions:t.contextOptions,creditContainer:o,creditViewport:l,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:defaultValue(t.scene3DOnly,!1),terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange});(this._scene=u).camera.constrainedAxis=Cartesian3.UNIT_Z,configurePixelRatio(this),configureCameraFrustum(this);var d=defaultValue(u.mapProjection.ellipsoid,Ellipsoid.WGS84),h=t.globe;defined(h)||(h=new Globe(d)),!1!==h&&(u.globe=h,u.globe.shadows=defaultValue(t.terrainShadows,ShadowMode$1.RECEIVE_ONLY)),defined(h=t.skyBox)||(h=new SkyBox({sources:{positiveX:getDefaultSkyBoxUrl("px"),negativeX:getDefaultSkyBoxUrl("mx"),positiveY:getDefaultSkyBoxUrl("py"),negativeY:getDefaultSkyBoxUrl("my"),positiveZ:getDefaultSkyBoxUrl("pz"),negativeZ:getDefaultSkyBoxUrl("mz")}})),!1!==h&&(u.skyBox=h,u.sun=new Sun,u.moon=new Moon),defined(h=t.skyAtmosphere)||(h=new SkyAtmosphere(d)),!1!==h&&(u.skyAtmosphere=h),defined(h=!1!==t.globe&&t.imageryProvider)||(h=createWorldImagery()),!1!==h&&u.imageryLayers.addImageryProvider(h),defined(t.terrainProvider)&&!1!==t.globe&&(u.terrainProvider=t.terrainProvider),this._screenSpaceEventHandler=new ScreenSpaceEventHandler(r),defined(t.sceneMode)&&(t.sceneMode===SceneMode$1.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===SceneMode$1.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=defaultValue(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;var p=this;this._onRenderError=function(e,t){p._useDefaultRenderLoop=!1,p._renderLoopRunning=!1,p._showRenderLoopErrors&&p.showErrorPanel("An error occurred while rendering.  Rendering has stopped.",void 0,t)},u.renderError.addEventListener(this._onRenderError)}catch(e){throw c&&this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL.  Consider trying a different web browser or updating your video drivers.  Detailed error information is below:',e),e}}function FullscreenButtonViewModel(e,t){defined(t)||(t=document.body),t=getElement(t);var i=this,r=knockout.observable(Fullscreen.fullscreen),n=knockout.observable(Fullscreen.enabled);t=t.ownerDocument;this.isFullscreen=void 0,knockout.defineProperty(this,"isFullscreen",{get:function(){return r()}}),this.isFullscreenEnabled=void 0,knockout.defineProperty(this,"isFullscreenEnabled",{get:function(){return n()},set:function(e){n(e&&Fullscreen.enabled)}}),this.tooltip=void 0,knockout.defineProperty(this,"tooltip",(function(){return this.isFullscreenEnabled?r()?"Exit full screen":"Full screen":"Full screen unavailable"})),this._command=createCommand$2((function(){Fullscreen.fullscreen?Fullscreen.exitFullscreen():Fullscreen.requestFullscreen(i._fullscreenElement)}),knockout.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=defaultValue(getElement(e),t.body),this._callback=function(){r(Fullscreen.fullscreen)},t.addEventListener(Fullscreen.changeEventName,this._callback)}Object.defineProperties(CesiumInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.parent}))}},selectNW:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.northwestChild}))}},selectNE:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.northeastChild}))}},selectSW:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.southwestChild}))}},selectSE:{get:function(){var e=this;return createCommand$2((function(){e.tile=e.tile.southeastChild}))}},primitive:{get:function(){return this._primitive},set:function(e){var t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,defined(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,defined(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),(this._primitive=e).show=!1,setTimeout((function(){e.show=!0}),50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){var t;defined(e)?(this.hasPickedTile=!0,e!==this._tile&&(this.tileText="L: "+e.level+" X: "+e.x+" Y: "+e.y,this.tileText+="<br>SW corner: "+e.rectangle.west+", "+e.rectangle.south,this.tileText+="<br>NE corner: "+e.rectangle.east+", "+e.rectangle.north,defined(t=e.data)&&defined(t.tileBoundingRegion)?this.tileText+="<br>Min: "+t.tileBoundingRegion.minimumHeight+" Max: "+t.tileBoundingRegion.maximumHeight:this.tileText+="<br>(Tile is not loaded)"),this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()):(this.hasPickedTile=!1,this._tile=void 0)}}}),CesiumInspectorViewModel.prototype._update=function(){this.frustums&&(this.frustumStatisticText=frustumStatisticsToString(this._scene.debugFrustumStatistics));var e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=boundDepthFrustum(1,e,this.depthFrustum),this.depthFrustumText=this.depthFrustum+" of "+e,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText="Cached shaders: "+this._scene.context.shaderCache.numberOfShaders},CesiumInspectorViewModel.prototype.isDestroyed=function(){return!1},CesiumInspectorViewModel.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._globeDepthSubscription.dispose(),this._pickDepthSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),destroyObject(this)},Object.defineProperties(CesiumInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),CesiumInspector.prototype.isDestroyed=function(){return!1},CesiumInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject(this)},Object.defineProperties(CesiumWidget.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e)&&!this._renderLoopRunning&&startRenderLoop(this)}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}}}),CesiumWidget.prototype.showErrorPanel=function(e,t,i){var r=this._element,n=document.createElement("div");n.className="cesium-widget-errorPanel";var a=document.createElement("div");a.className="cesium-widget-errorPanel-content",n.appendChild(a),(h=document.createElement("div")).className="cesium-widget-errorPanel-header",h.appendChild(document.createTextNode(e)),a.appendChild(h);var o=document.createElement("div");function s(){o.style.maxHeight=Math.max(Math.round(.9*r.clientHeight-100),30)+"px"}o.className="cesium-widget-errorPanel-scroll",a.appendChild(o),s(),defined(window.addEventListener)&&window.addEventListener("resize",s,!1);var l,c,u,d=defined(t),h=defined(i);(d||h)&&((p=document.createElement("div")).className="cesium-widget-errorPanel-message",o.appendChild(p),h&&(l=formatError(i),d||("string"==typeof i&&(i=new Error(i)),t=formatError({name:i.name,message:i.message}),l=i.stack),"undefined"!=typeof console&&console.error(e+"\n"+t+"\n"+l),(c=document.createElement("div")).className="cesium-widget-errorPanel-message-details collapsed",(u=document.createElement("span")).className="cesium-widget-errorPanel-more-details",u.appendChild(document.createTextNode("See more...")),c.appendChild(u),c.onclick=function(e){c.removeChild(u),c.appendChild(document.createTextNode(l)),c.className="cesium-widget-errorPanel-message-details",a.className="cesium-widget-errorPanel-content expanded",c.onclick=void 0},o.appendChild(c)),p.innerHTML="<p>"+t+"</p>");var p=document.createElement("div");p.className="cesium-widget-errorPanel-buttonPanel",a.appendChild(p),(t=document.createElement("button")).setAttribute("type","button"),t.className="cesium-button",t.appendChild(document.createTextNode("OK")),t.onclick=function(){defined(s)&&defined(window.removeEventListener)&&window.removeEventListener("resize",s,!1),r.removeChild(n)},p.appendChild(t),r.appendChild(n)},CesiumWidget.prototype.isDestroyed=function(){return!1},CesiumWidget.prototype.destroy=function(){defined(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),destroyObject(this)},CesiumWidget.prototype.resize=function(){var e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,configureCanvasSize(this),configureCameraFrustum(this),this._scene.requestRender())},CesiumWidget.prototype.render=function(){var e;this._canRender?(this._scene.initializeFrame(),e=this._clock.tick(),this._scene.render(e)):this._clock.tick()},Object.defineProperties(FullscreenButtonViewModel.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}}),FullscreenButtonViewModel.prototype.isDestroyed=function(){return!1},FullscreenButtonViewModel.prototype.destroy=function(){document.removeEventListener(Fullscreen.changeEventName,this._callback),destroyObject(this)};var enterFullScreenPath="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",exitFullScreenPath="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function FullscreenButton(e,t){var i=new FullscreenButtonViewModel(t,e=getElement(e));i._exitFullScreenPath=exitFullScreenPath,i._enterFullScreenPath=enterFullScreenPath,(t=document.createElement("button")).type="button",t.className="cesium-button cesium-fullscreenButton",t.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(t),knockout.applyBindings(i,t),this._container=e,this._viewModel=i,this._element=t}Object.defineProperties(FullscreenButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),FullscreenButton.prototype.isDestroyed=function(){return!1},FullscreenButton.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)};var DEFAULT_HEIGHT=1e3;function GeocoderViewModel(e){defined(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new CartographicGeocoderService,new IonGeocoderService({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new Event,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=handleArrowDown,this._handleArrowUp=handleArrowUp;var t=this;this._suggestionsVisible=knockout.pureComputed((function(){var e=0<knockout.getObservable(t,"_suggestions")().length,i=knockout.getObservable(t,"_showSuggestions")();return e&&i})),this._searchCommand=createCommand$2((function(e){return e=defaultValue(e,GeocodeType$1.SEARCH),t._focusTextbox=!1,defined(t._selectedSuggestion)?(t.activateSuggestion(t._selectedSuggestion),!1):(t.hideSuggestions(),void(t.isSearchInProgress?cancelGeocode(t):geocode(t,t._geocoderServices,e)))})),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(e,t){var i="ArrowDown"===t.key||"Down"===t.key||40===t.keyCode,r="ArrowUp"===t.key||"Up"===t.key||38===t.keyCode;return(i||r)&&t.preventDefault(),!0},this.handleKeyUp=function(e,i){var r="ArrowDown"===i.key||"Down"===i.key||40===i.keyCode,n="ArrowUp"===i.key||"Up"===i.key||38===i.keyCode;i="Enter"===i.key||13===i.keyCode;return n?handleArrowUp(t):r?handleArrowDown(t):i&&t._searchCommand(),!0},this.activateSuggestion=function(e){t.hideSuggestions(),t._searchText=e.displayName,e=e.destination,clearSuggestions(t),t.destinationFound(t,e)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(e,i){e!==t._selectedSuggestion&&(t._selectedSuggestion=e)},this.keepExpanded=!1,this.autoComplete=defaultValue(e.autocomplete,!0),this.destinationFound=defaultValue(e.destinationFound,GeocoderViewModel.flyToDestination),this._focusTextbox=!1,knockout.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]),(e=knockout.getObservable(this,"_searchText")).extend({rateLimit:{timeout:500}}),this._suggestionSubscription=e.subscribe((function(){GeocoderViewModel._updateSearchSuggestions(t)})),this.isSearchInProgress=void 0,knockout.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,knockout.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){this._searchText=e}}),this.flightDuration=void 0,knockout.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){this._flightDuration=e}})}function handleArrowUp(e){var t;0!==e._suggestions.length&&(-1!==(t=e._suggestions.indexOf(e._selectedSuggestion))&&0!==t?(t-=1,e._selectedSuggestion=e._suggestions[t],GeocoderViewModel._adjustSuggestionsScroll(e,t)):e._selectedSuggestion=void 0)}function handleArrowDown(e){var t;0!==e._suggestions.length&&(t=e._suggestions.length,t=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t,e._selectedSuggestion=e._suggestions[t],GeocoderViewModel._adjustSuggestionsScroll(e,t))}function computeFlyToLocationForCartographic(e,t){var i=defined(t)?t.availability:void 0;return defined(i)?sampleTerrainMostDetailed(t,[e]).then((function(t){return(e=t[0]).height+=DEFAULT_HEIGHT,e})):(e.height+=DEFAULT_HEIGHT,when.resolve(e))}function flyToDestination(e,t){var i,r=e._scene,n=r.mapProjection.ellipsoid,a=r.camera,o=r.terrainProvider,s=t;t instanceof Rectangle?CesiumMath.equalsEpsilon(t.south,t.north,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(t.east,t.west,CesiumMath.EPSILON7)?t=Rectangle.center(t):i=computeFlyToLocationForRectangle(t,r):t=n.cartesianToCartographic(t),defined(i)||(i=computeFlyToLocationForCartographic(t,o)),i.then((function(e){s=n.cartographicToCartesian(e)})).always((function(){a.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:Matrix4.IDENTITY})}))}function chainPromise(e,t,i,r){return e.then((function(e){return defined(e)&&"fulfilled"===e.state&&0<e.value.length?e:t.geocode(i,r).then((function(e){return{state:"fulfilled",value:e}})).otherwise((function(e){return{state:"rejected",reason:e}}))}))}function geocode(e,t,i){var r=e._searchText;if(hasOnlyWhitespace(r))e.showSuggestions();else{e._isSearchInProgress=!0;for(var n=when.resolve(),a=0;a<t.length;a++)n=chainPromise(n,t[a],r,i);(e._geocodePromise=n).then((function(t){if(!n.cancel){e._isSearchInProgress=!1;var i=t.value;if("fulfilled"===t.state&&defined(i)&&0<i.length)return e._searchText=i[0].displayName,void e.destinationFound(e,i[0].destination);e._searchText=r+" (not found)"}}))}}function adjustSuggestionsScroll(e,t){e=(i=getElement(e._viewContainer)).getElementsByClassName("search-results")[0];var i=i.getElementsByTagName("li")[t];0!==t?(t=i.offsetTop)+i.clientHeight>e.clientHeight?e.scrollTop=t+i.clientHeight:t<e.scrollTop&&(e.scrollTop=t):e.scrollTop=0}function cancelGeocode(e){e._isSearchInProgress=!1,defined(e._geocodePromise)&&(e._geocodePromise.cancel=!0,e._geocodePromise=void 0)}function hasOnlyWhitespace(e){return/^\s*$/.test(e)}function clearSuggestions(e){knockout.getObservable(e,"_suggestions").removeAll()}function updateSearchSuggestions(e){var t,i;e.autoComplete&&(t=e._searchText,clearSuggestions(e),hasOnlyWhitespace(t)||(i=when.resolve([]),e._geocoderServices.forEach((function(e){i=i.then((function(i){return 5<=i.length?i:e.geocode(t,GeocodeType$1.AUTOCOMPLETE).then((function(e){return i=i.concat(e)}))}))})),i.then((function(t){for(var i=e._suggestions,r=0;r<t.length;r++)i.push(t[r])}))))}Object.defineProperties(GeocoderViewModel.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}}),GeocoderViewModel.prototype.destroy=function(){this._suggestionSubscription.dispose()},GeocoderViewModel.flyToDestination=flyToDestination,GeocoderViewModel._updateSearchSuggestions=updateSearchSuggestions,GeocoderViewModel._adjustSuggestionsScroll=adjustSuggestionsScroll;var startSearchPath="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",stopSearchPath="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Geocoder(e){var t=getElement(e.container),i=new GeocoderViewModel(e);i._startSearchPath=startSearchPath,i._stopSearchPath=stopSearchPath;var r=document.createElement("form");r.setAttribute("data-bind","submit: search");var n=document.createElement("input");n.type="search",n.className="cesium-geocoder-input",n.setAttribute("placeholder","Enter an address or landmark..."),n.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout((function(){n.select()}),0)},n.addEventListener("focus",this._onTextBoxFocus,!1),r.appendChild(n),this._textBox=n;var a=document.createElement("span");a.className="cesium-geocoder-searchButton",a.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),r.appendChild(a),t.appendChild(r);var o=document.createElement("div");o.className="search-results",o.setAttribute("data-bind","visible: _suggestionsVisible"),(e=document.createElement("ul")).setAttribute("data-bind","foreach: _suggestions"),a=document.createElement("li"),e.appendChild(a),a.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),o.appendChild(e),t.appendChild(o),knockout.applyBindings(i,r),knockout.applyBindings(i,o),this._container=t,this._searchSuggestionsContainer=o,this._viewModel=i,this._form=r,this._onInputBegin=function(e){var r=e.target;"function"==typeof e.composedPath&&(r=e.composedPath()[0]),t.contains(r)||(i._focusTextbox=!1,i.hideSuggestions())},this._onInputEnd=function(e){i._focusTextbox=!0,i.showSuggestions()},FeatureDetection.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}function HomeButtonViewModel(e,t){this._scene=e,this._duration=t;var i=this;this._command=createCommand$2((function(){i._scene.camera.flyHome(i._duration)})),this.tooltip="View Home",knockout.track(this,["tooltip"])}function HomeButton(e,t,i){e=getElement(e),(t=new HomeButtonViewModel(t,i))._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z",(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button cesium-home-button",i.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(i),knockout.applyBindings(t,i),this._container=e,this._viewModel=t,this._element=i}Object.defineProperties(Geocoder.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}}),Geocoder.prototype.isDestroyed=function(){return!1},Geocoder.prototype.destroy=function(){var e=this._container;return FeatureDetection.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),knockout.cleanNode(this._form),knockout.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),destroyObject(this)},Object.defineProperties(HomeButtonViewModel.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}}),Object.defineProperties(HomeButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),HomeButton.prototype.isDestroyed=function(){return!1},HomeButton.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)};var cameraEnabledPath="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",cameraDisabledPath="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function InfoBoxViewModel(){this._cameraClicked=new Event,this._closeClicked=new Event,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",knockout.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,knockout.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?cameraDisabledPath:cameraEnabledPath}}),knockout.defineProperty(this,"_bodyless",{get:function(){return!defined(this.description)||0===this.description.length}})}function InfoBox(e){e=getElement(e);var t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);var i=document.createElement("div");i.className="cesium-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-infoBox-camera",i.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-infoBox-close",i.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),i.innerHTML="&times;",t.appendChild(i);var r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);var n=new InfoBoxViewModel;knockout.applyBindings(n,t),this._container=e,this._element=t,this._frame=r,this._viewModel=n,this._descriptionSubscription=void 0;var a=this;r.addEventListener("load",(function(){var e=r.contentDocument,i=e.createElement("link");i.href=buildModuleUrl("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";var o=e.createElement("div");o.className="cesium-infoBox-description",e.head.appendChild(i),e.body.appendChild(o),a._descriptionSubscription=subscribeAndEvaluate(n,"description",(function(e){r.style.height="5px",o.innerHTML=e;var i=null,n=o.firstElementChild;null===n||1!==o.childNodes.length||null!==(e=window.getComputedStyle(n))&&(n=e["background-color"],defined(n=Color.fromCssColorString(n))&&0!==n.alpha&&(i=e["background-color"])),t.style["background-color"]=i,i=o.getBoundingClientRect().height,r.style.height=i+"px"}))})),r.setAttribute("src","about:blank")}function NavigationHelpButtonViewModel(){this.showInstructions=!1;var e=this;this._command=createCommand$2((function(){e.showInstructions=!e.showInstructions})),this._showClick=createCommand$2((function(){e._touch=!1})),this._showTouch=createCommand$2((function(){e._touch=!0})),this._touch=!1,this.tooltip="Navigation Instructions",knockout.track(this,["tooltip","showInstructions","_touch"])}function NavigationHelpButton(e){var t=getElement(e.container),i=new NavigationHelpButtonViewModel,r=defaultValue(e.instructionsInitiallyVisible,!1);i.showInstructions=r,i._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var n=document.createElement("span");n.className="cesium-navigationHelpButton-wrapper",t.appendChild(n);var a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",a.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),n.appendChild(a);var o=document.createElement("div");o.className="cesium-navigation-help",o.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),n.appendChild(o),(e=document.createElement("button")).type="button",e.className="cesium-navigation-button cesium-navigation-button-left",e.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}'),(r=document.createElement("img")).src=buildModuleUrl("Widgets/Images/NavigationHelp/Mouse.svg"),r.className="cesium-navigation-button-icon",r.style.width="25px",r.style.height="25px",e.appendChild(r),e.appendChild(document.createTextNode("Mouse")),(a=document.createElement("button")).type="button",a.className="cesium-navigation-button cesium-navigation-button-right",a.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}'),(r=document.createElement("img")).src=buildModuleUrl("Widgets/Images/NavigationHelp/Touch.svg"),r.className="cesium-navigation-button-icon",r.style.width="25px",r.style.height="25px",a.appendChild(r),a.appendChild(document.createTextNode("Touch")),o.appendChild(e),o.appendChild(a),(a=document.createElement("div")).className="cesium-click-navigation-help cesium-navigation-help-instructions",a.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),a.innerHTML='            <table>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/MouseLeft.svg")+'" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">Left click + drag</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/MouseRight.svg")+'" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Right click + drag, or</div>                        <div class="cesium-navigation-help-details">Mouse wheel scroll</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/MouseMiddle.svg")+'" width="48" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Rotate view</div>                        <div class="cesium-navigation-help-details">Middle click + drag, or</div>                        <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div>                    </td>                </tr>            </table>',o.appendChild(a),(a=document.createElement("div")).className="cesium-touch-navigation-help cesium-navigation-help-instructions",a.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),a.innerHTML='            <table>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/TouchDrag.svg")+'" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-pan">Pan view</div>                        <div class="cesium-navigation-help-details">One finger drag</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/TouchZoom.svg")+'" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-zoom">Zoom view</div>                        <div class="cesium-navigation-help-details">Two finger pinch</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/TouchTilt.svg")+'" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-rotate">Tilt view</div>                        <div class="cesium-navigation-help-details">Two finger drag, same direction</div>                    </td>                </tr>                <tr>                    <td><img src="'+buildModuleUrl("Widgets/Images/NavigationHelp/TouchRotate.svg")+'" width="70" height="48" /></td>                    <td>                        <div class="cesium-navigation-help-tilt">Rotate view</div>                        <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div>                    </td>                </tr>            </table>',o.appendChild(a),knockout.applyBindings(i,n),this._container=t,this._viewModel=i,this._wrapper=n,this._closeInstructions=function(e){n.contains(e.target)||(i.showInstructions=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function PerformanceWatchdogViewModel(e){this._scene=e.scene,this.lowFrameRateMessage=defaultValue(e.lowFrameRateMessage,"This application appears to be performing poorly on your system.  Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,knockout.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var t=this;this._dismissMessage=createCommand$2((function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0})),e=FrameRateMonitor.fromScene(e.scene),this._unsubscribeLowFrameRate=e.lowFrameRate.addEventListener((function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=e.nominalFrameRate.addEventListener((function(){t.showingLowFrameRateMessage=!1}))}function PerformanceWatchdog(e){var t=getElement(e.container),i=new PerformanceWatchdogViewModel(e),r=document.createElement("div");r.className="cesium-performance-watchdog-message-area",r.setAttribute("data-bind","visible: showingLowFrameRateMessage"),(e=document.createElement("button")).setAttribute("type","button"),e.className="cesium-performance-watchdog-message-dismiss",e.innerHTML="&times;",e.setAttribute("data-bind","click: dismissMessage"),r.appendChild(e),(e=document.createElement("div")).className="cesium-performance-watchdog-message",e.setAttribute("data-bind","html: lowFrameRateMessage"),r.appendChild(e),t.appendChild(r),knockout.applyBindings(i,r),this._container=t,this._viewModel=i,this._element=r}function ProjectionPickerViewModel(e){this._scene=e,this._orthographic=e.camera.frustum instanceof OrthographicFrustum,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,knockout.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);var t=this;knockout.defineProperty(this,"selectedTooltip",(function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective})),this._toggleDropDown=createCommand$2((function(){t.sceneMode===SceneMode$1.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)})),this._eventHelper=new EventHelper,this._eventHelper.add(e.morphComplete,(function(e,i,r,n){t.sceneMode=r,t._orthographic=r===SceneMode$1.SCENE2D||t._scene.camera.frustum instanceof OrthographicFrustum})),this._eventHelper.add(e.preRender,(function(){t._flightInProgress=defined(e.camera._currentFlight)})),this._switchToPerspective=createCommand$2((function(){t.sceneMode!==SceneMode$1.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)})),this._switchToOrthographic=createCommand$2((function(){t.sceneMode!==SceneMode$1.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)})),this._sceneMode=SceneMode$1}InfoBoxViewModel.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(InfoBoxViewModel.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(InfoBox.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),InfoBox.prototype.isDestroyed=function(){return!1},InfoBox.prototype.destroy=function(){var e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),defined(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),destroyObject(this)},Object.defineProperties(NavigationHelpButtonViewModel.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(NavigationHelpButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),NavigationHelpButton.prototype.isDestroyed=function(){return!1},NavigationHelpButton.prototype.destroy=function(){return FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject(this)},Object.defineProperties(PerformanceWatchdogViewModel.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),PerformanceWatchdogViewModel.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),destroyObject(this)},Object.defineProperties(PerformanceWatchdog.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),PerformanceWatchdog.prototype.isDestroyed=function(){return!1},PerformanceWatchdog.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)},Object.defineProperties(ProjectionPickerViewModel.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),ProjectionPickerViewModel.prototype.isDestroyed=function(){return!1},ProjectionPickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject(this)};var perspectivePath="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",orthographicPath="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function ProjectionPicker(e,t){e=getElement(e);var i=new ProjectionPickerViewModel(t);i._perspectivePath=perspectivePath,i._orthographicPath=orthographicPath;var r=document.createElement("span");r.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(r),(t=document.createElement("button")).type="button",t.className="cesium-button cesium-toolbar-button",t.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic,       "cesium-projectionPicker-buttonOrthographic": _orthographic,       "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress,        "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),t.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',r.appendChild(t),(t=document.createElement("button")).type="button",t.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",t.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic),       "cesium-projectionPicker-none" : !_orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),r.appendChild(t),(t=document.createElement("button")).type="button",t.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",t.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic),       "cesium-projectionPicker-none" : _orthographic,       "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),r.appendChild(t),knockout.applyBindings(i,r),this._viewModel=i,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(i.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function SceneModePickerViewModel(e,t){this._scene=e;var i=this;this._eventHelper=new EventHelper,this._eventHelper.add(e.morphStart,(function(e,t,r,n){i.sceneMode=r,i.dropDownVisible=!1})),this._duration=defaultValue(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",knockout.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,knockout.defineProperty(this,"selectedTooltip",(function(){var e=i.sceneMode;return e===SceneMode$1.SCENE2D?i.tooltip2D:e===SceneMode$1.SCENE3D?i.tooltip3D:i.tooltipColumbusView})),this._toggleDropDown=createCommand$2((function(){i.dropDownVisible=!i.dropDownVisible})),this._morphTo2D=createCommand$2((function(){e.morphTo2D(i._duration)})),this._morphTo3D=createCommand$2((function(){e.morphTo3D(i._duration)})),this._morphToColumbusView=createCommand$2((function(){e.morphToColumbusView(i._duration)})),this._sceneMode=SceneMode$1}Object.defineProperties(ProjectionPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),ProjectionPicker.prototype.isDestroyed=function(){return!1},ProjectionPicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject(this)},Object.defineProperties(SceneModePickerViewModel.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),SceneModePickerViewModel.prototype.isDestroyed=function(){return!1},SceneModePickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject(this)};var globePath="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878         -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132         -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285         11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z         M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201         5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461         -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",flatMapPath="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",columbusViewPath="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function SceneModePicker(e,t,i){e=getElement(e);var r=new SceneModePickerViewModel(t,i);r._globePath=globePath,r._flatMapPath=flatMapPath,r._columbusViewPath=columbusViewPath;var n=document.createElement("span");n.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(n),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button",i.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),i.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',n.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",i.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),n.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",i.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D,       "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),n.appendChild(i),(i=document.createElement("button")).type="button",i.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",i.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)),       "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW,       "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),n.appendChild(i),knockout.applyBindings(r,n),this._viewModel=r,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(r.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(SceneModePicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SceneModePicker.prototype.isDestroyed=function(){return!1},SceneModePicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject(this)};var screenSpacePos=new Cartesian2,offScreen="-1000px";function SelectionIndicatorViewModel(e,t,i){this._scene=e,this._screenPositionX=offScreen,this._screenPositionY=offScreen,this._tweens=e.tweens,this._container=defaultValue(i,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,knockout.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,knockout.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&defined(this.position)}}),knockout.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return SceneTransforms.wgs84ToWindowCoordinates(e,t,i)}}function SelectionIndicator(e,t){e=getElement(e),this._container=e;var i=document.createElement("div");i.className="cesium-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var r="http://www.w3.org/2000/svg",n=document.createElementNS(r,"svg:svg");n.setAttribute("width",160),n.setAttribute("height",160),n.setAttribute("viewBox","0 0 160 160"),(e=document.createElementNS(r,"g")).setAttribute("transform","translate(80,80)"),n.appendChild(e),(r=document.createElementNS(r,"path")).setAttribute("data-bind","attr: { transform: _transform }"),r.setAttribute("d","M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z"),e.appendChild(r),i.appendChild(n),t=new SelectionIndicatorViewModel(t,this._element,this._container),this._viewModel=t,knockout.applyBindings(this._viewModel,this._element)}function TimelineHighlightRange(e,t,i){this._color=e,this._height=t,this._base=defaultValue(i,0)}function TimelineTrack(e,t,i,r){this.interval=e,this.height=t,this.color=i||new Color(.5,.5,.5,1),this.backgroundColor=r||new Color(0,0,0,0)}SelectionIndicatorViewModel.prototype.update=function(){var e,t,i,r,n;this.showSelection&&defined(this.position)&&(defined(e=this.computeScreenSpacePosition(this.position,screenSpacePos))?(t=(n=this._container).parentNode.clientWidth,i=n.parentNode.clientHeight,n=.5*(r=this._selectionIndicatorElement.clientWidth),e.x=Math.min(Math.max(e.x,-r),t+r)-n,e.y=Math.min(Math.max(e.y,-r),i+r)-n,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"):(this._screenPositionX=offScreen,this._screenPositionY=offScreen))},SelectionIndicatorViewModel.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:EasingFunction$1.EXPONENTIAL_OUT})},SelectionIndicatorViewModel.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:EasingFunction$1.EXPONENTIAL_OUT})},Object.defineProperties(SelectionIndicatorViewModel.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(SelectionIndicator.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SelectionIndicator.prototype.isDestroyed=function(){return!1},SelectionIndicator.prototype.destroy=function(){var e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),destroyObject(this)},TimelineHighlightRange.prototype.getHeight=function(){return this._height},TimelineHighlightRange.prototype.getBase=function(){return this._base},TimelineHighlightRange.prototype.getStartTime=function(){return this._start},TimelineHighlightRange.prototype.getStopTime=function(){return this._stop},TimelineHighlightRange.prototype.setRange=function(e,t){this._start=e,this._stop=t},TimelineHighlightRange.prototype.render=function(e){var t,i,r="";return this._start&&this._stop&&this._color&&(i=JulianDate.secondsDifference(this._start,e.epochJulian),t=Math.round(e.timeBarWidth*e.getAlpha(i)),i=JulianDate.secondsDifference(this._stop,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(i))-t,t<0&&(i+=t,t=0),t+i>e.timeBarWidth&&(i=e.timeBarWidth-t),0<i&&(r='<span class="cesium-timeline-highlight" style="left: '+t.toString()+"px; width: "+i.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+this._color+';"></span>')),r},TimelineTrack.prototype.render=function(e,t){var i=this.interval.start,r=this.interval.stop,n=t.startJulian,a=JulianDate.addSeconds(t.startJulian,t.duration,new JulianDate);if(JulianDate.lessThan(i,n)&&JulianDate.greaterThan(r,a))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(JulianDate.lessThanOrEquals(i,a)&&JulianDate.greaterThanOrEquals(r,n)){for(var o,s,l=0;l<t.timeBarWidth;++l){var c=JulianDate.addSeconds(t.startJulian,l/t.timeBarWidth*t.duration,new JulianDate);!defined(o)&&JulianDate.greaterThanOrEquals(c,i)?o=l:!defined(s)&&JulianDate.greaterThanOrEquals(c,r)&&(s=l)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),defined(o)&&(defined(s)||(s=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(o,t.y,Math.max(s-o,1),this.height))}};var timelineWheelDelta=1e12,timelineMouseMode={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},timelineTouchMode={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},timelineTicScales=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],timelineMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Timeline(e,t){var i=(e=getElement(e)).ownerDocument;this.container=e;var r=i.createElement("div");r.className="cesium-timeline-main",e.appendChild(r),this._topDiv=r,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=timelineMouseMode.none,this._touchMode=timelineTouchMode.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=createMouseDownCallback(this),this._onMouseUp=createMouseUpCallback(this),this._onMouseMove=createMouseMoveCallback(this),this._onMouseWheel=createMouseWheelCallback(this),this._onTouchStart=createTouchStartCallback(this),this._onTouchMove=createTouchMoveCallback(this),this._onTouchEnd=createTouchEndCallback(this),r=this._timeBarEle,i.addEventListener("mouseup",this._onMouseUp,!1),i.addEventListener("mousemove",this._onMouseMove,!1),r.addEventListener("mousedown",this._onMouseDown,!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),r.addEventListener("mousewheel",this._onMouseWheel,!1),r.addEventListener("touchstart",this._onTouchStart,!1),r.addEventListener("touchmove",this._onTouchMove,!1),r.addEventListener("touchend",this._onTouchEnd,!1),r.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function twoDigits(e){return e<10?"0"+e.toString():e.toString()}function createMouseDownCallback(e){return function(t){e._mouseMode!==timelineMouseMode.touchOnly&&(0===t.button?(e._mouseMode=timelineMouseMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=timelineMouseMode.zoom:e._mouseMode=timelineMouseMode.slide)),t.preventDefault()}}function createMouseUpCallback(e){return function(t){e._mouseMode=timelineMouseMode.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function createMouseMoveCallback(e){return function(t){var i,r;e._mouseMode===timelineMouseMode.scrub?(t.preventDefault(),(i=t.clientX-e._topDiv.getBoundingClientRect().left)<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._mouseMode===timelineMouseMode.slide?(r=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==r&&(i=r*e._timeBarSecondsSpan/e._topDiv.clientWidth,e.zoomTo(JulianDate.addSeconds(e._startJulian,i,new JulianDate),JulianDate.addSeconds(e._endJulian,i,new JulianDate)))):e._mouseMode===timelineMouseMode.zoom&&(r=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==r&&e.zoomFrom(Math.pow(1.01,r)))}}function createMouseWheelCallback(e){return function(t){t=t.wheelDeltaY||t.wheelDelta||-t.detail,t/=timelineWheelDelta=Math.max(Math.min(Math.abs(t),timelineWheelDelta),1),e.zoomFrom(Math.pow(1.05,-t))}}function createTouchStartCallback(e){return function(t){var i,r=t.touches.length,n=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=timelineMouseMode.touchOnly,1===r?(i=JulianDate.secondsDifference(e._scrubJulian,e._startJulian),i=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+n),Math.abs(t.touches[0].clientX-i)<50?(e._touchMode=timelineTouchMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===r?"-16px 0":"0 0")):(e._touchMode=timelineTouchMode.singleTap,e._touchState.centerX=t.touches[0].clientX-n)):2===r?(e._touchMode=timelineTouchMode.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-n,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=timelineTouchMode.ignore}}function createTouchEndCallback(e){return function(t){var i=t.touches.length,r=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap?(e._touchMode=timelineTouchMode.scrub,e._onTouchMove(t)):e._touchMode===timelineTouchMode.scrub&&e._onTouchMove(t),e._mouseMode=timelineMouseMode.touchOnly,1!==i?e._touchMode=0<i?timelineTouchMode.ignore:timelineTouchMode.none:e._touchMode===timelineTouchMode.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-r),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function createTouchMoveCallback(e){return function(t){var i,r,n,a,o=1,s=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap&&(e._touchMode=timelineTouchMode.slideZoom),e._mouseMode=timelineMouseMode.touchOnly,e._touchMode===timelineTouchMode.scrub?(t.preventDefault(),1===t.changedTouches.length&&0<=(i=t.changedTouches[0].clientX-s)&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth)):e._touchMode===timelineTouchMode.slideZoom&&(2===(i=t.touches.length)?(r=.5*(t.touches[0].clientX+t.touches[1].clientX)-s,n=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===i&&(r=t.touches[0].clientX-s,n=0),defined(r)&&(a=0<n&&0<e._touchState.spanX?(o=e._touchState.spanX/n,JulianDate.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*o)/e._topDiv.clientWidth,new JulianDate)):(a=e._touchState.centerX-r,JulianDate.addSeconds(e._startJulian,a*e._timeBarSecondsSpan/e._topDiv.clientWidth,new JulianDate)),e.zoomTo(a,JulianDate.addSeconds(a,e._timeBarSecondsSpan*o,new JulianDate)),e._touchState.centerX=r,e._touchState.spanX=n))}}function lockScreen(e){var t=!1,i=window.screen;return defined(i)&&(defined(i.lockOrientation)?t=i.lockOrientation(e):defined(i.mozLockOrientation)?t=i.mozLockOrientation(e):defined(i.msLockOrientation)?t=i.msLockOrientation(e):defined(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function unlockScreen(){var e=window.screen;defined(e)&&(defined(e.unlockOrientation)?e.unlockOrientation():defined(e.mozUnlockOrientation)?e.mozUnlockOrientation():defined(e.msUnlockOrientation)?e.msUnlockOrientation():defined(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function toggleVR(e,t,i,r){r()||(i()?(t.useWebVR=!1,e._locked&&(unlockScreen(),e._locked=!1),e._noSleep.disable(),Fullscreen.exitFullscreen(),i(!1)):(Fullscreen.fullscreen||Fullscreen.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=lockScreen("landscape")),i(t.useWebVR=!0)))}function VRButtonViewModel(e,t){var i=this,r=knockout.observable(Fullscreen.enabled),n=knockout.observable(!1);this.isVRMode=void 0,knockout.defineProperty(this,"isVRMode",{get:function(){return n()}}),this.isVREnabled=void 0,knockout.defineProperty(this,"isVREnabled",{get:function(){return r()},set:function(e){r(e&&Fullscreen.enabled)}}),this.tooltip=void 0,knockout.defineProperty(this,"tooltip",(function(){return r()?n()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}));var a=knockout.observable(!1);this._isOrthographic=void 0,knockout.defineProperty(this,"_isOrthographic",{get:function(){return a()}}),this._eventHelper=new EventHelper,this._eventHelper.add(e.preRender,(function(){a(e.camera.frustum instanceof OrthographicFrustum)})),this._locked=!1,this._noSleep=new NoSleep,this._command=createCommand$2((function(){toggleVR(i,e,n,a)}),knockout.getObservable(this,"isVREnabled")),this._vrElement=defaultValue(getElement(t),document.body),this._callback=function(){!Fullscreen.fullscreen&&n()&&(e.useWebVR=!1,i._locked&&(unlockScreen(),i._locked=!1),i._noSleep.disable(),n(!1))},document.addEventListener(Fullscreen.changeEventName,this._callback)}Timeline.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},Timeline.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},Timeline.prototype.isDestroyed=function(){return!1},Timeline.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);var e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1),(e=this._timeBarEle).removeEventListener("mousedown",this._onMouseDown,!1),e.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),e.removeEventListener("mousewheel",this._onMouseWheel,!1),e.removeEventListener("touchstart",this._onTouchStart,!1),e.removeEventListener("touchmove",this._onTouchMove,!1),e.removeEventListener("touchend",this._onTouchEnd,!1),e.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),destroyObject(this)},Timeline.prototype.addHighlightRange=function(e,t,i){return i=new TimelineHighlightRange(e,t,i),this._highlightRanges.push(i),this.resize(),i},Timeline.prototype.addTrack=function(e,t,i,r){return r=new TimelineTrack(e,t,i,r),this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},Timeline.prototype.zoomTo=function(e,t){var i,r;this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=JulianDate.secondsDifference(t,e),this._clock&&this._clock.clockRange!==ClockRange$1.UNBOUNDED&&(i=this._clock.startTime,n=this._clock.stopTime,r=JulianDate.secondsDifference(n,i),t=JulianDate.secondsDifference(i,this._startJulian),e=JulianDate.secondsDifference(n,this._endJulian),this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):0<t?(this._endJulian=JulianDate.addSeconds(this._endJulian,t,new JulianDate),this._startJulian=i,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian)):e<0&&(this._startJulian=JulianDate.addSeconds(this._startJulian,e,new JulianDate),this._endJulian=n,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian))),this._makeTics();var n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)},Timeline.prototype.zoomFrom=function(e){var t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian);1<e||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(JulianDate.addSeconds(this._startJulian,t-t*e,new JulianDate),JulianDate.addSeconds(this._endJulian,i*e-i,new JulianDate))},Timeline.prototype.makeLabel=function(e){var t=JulianDate.toGregorianDate(e),i=" UTC";if(0<(e=t.millisecond)&&this._timeBarSecondsSpan<3600){for(i=Math.floor(e).toString();i.length<3;)i="0"+i;i="."+i}return timelineMonthNames[t.month-1]+" "+t.day+" "+t.year+" "+twoDigits(t.hour)+":"+twoDigits(t.minute)+":"+twoDigits(t.second)+i},Timeline.prototype.smallestTicInPixels=7,Timeline.prototype._makeTics=function(){var e,t=this._timeBarEle,i=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),r=(u=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan))-8,n=this;this._needleEle.style.left=u.toString()+"px";var a="",o=(i=31536e6,0),s=this._timeBarSecondsSpan;s<.01?(s=.01,this._timeBarSecondsSpan=.01,this._endJulian=JulianDate.addSeconds(this._startJulian,.01,new JulianDate)):i<s&&(s=i,this._timeBarSecondsSpan=i,this._endJulian=JulianDate.addSeconds(this._startJulian,i,new JulianDate));var l=this._timeBarEle.clientWidth;l<10&&(l=10);var c=this._startJulian,u=Math.min(s/l*1e-5,.4),d=(i=JulianDate.toGregorianDate(c),i=31536e4<s?JulianDate.fromDate(new Date(Date.UTC(100*Math.floor(i.year/100),0))):31536e3<s?JulianDate.fromDate(new Date(Date.UTC(10*Math.floor(i.year/10),0))):86400<s?JulianDate.fromDate(new Date(Date.UTC(i.year,0))):JulianDate.fromDate(new Date(Date.UTC(i.year,i.month,i.day))),JulianDate.secondsDifference(this._startJulian,JulianDate.addSeconds(i,u,new JulianDate))),h=d+s;function p(e){return Math.floor(d/e)*e}function f(e,t){return Math.ceil(e/t+.5)*t}function m(e){return(e-d)/s}function g(e,t){return e-t*Math.round(e/t)}this._epochJulian=i,this._rulerEle.innerHTML=this.makeLabel(JulianDate.addSeconds(this._endJulian,-.01,new JulianDate));var y=this._rulerEle.offsetWidth+20;y<30&&(y=180),u=o,o-=1e-10;var _={startTime:d,startJulian:c,epochJulian:i,duration:s,timeBarWidth:l,getAlpha:m};this._highlightRanges.forEach((function(e){a+=e.render(_)}));var v=0,C=0,x=0,b=y/l;1<b&&(b=1),b*=this._timeBarSecondsSpan;for(var S=-1,T=-1,E=timelineTicScales.length,w=0;w<E;++w){var A=timelineTicScales[w];if(++S,b<(v=A)&&o<A)break;T<0&&l*(A/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(T=S)}if(0<S){for(;0<S;)if(--S,Math.abs(g(v,timelineTicScales[S]))<1e-5){timelineTicScales[S]>=o&&(C=timelineTicScales[S]);break}if(0<=T)for(;T<S;){if(Math.abs(g(C,timelineTicScales[T]))<1e-5&&timelineTicScales[T]>=o){x=timelineTicScales[T];break}++T}}1e-10<(o=u)&&x<1e-5&&1e-10<Math.abs(o-v)&&(x=o)<=v+1e-10&&(C=0);var P=-999999;if(3<=l*(x/this._timeBarSecondsSpan))for(e=p(x);e<=h;e=f(e,x))a+='<span class="cesium-timeline-ticTiny" style="left: '+Math.round(l*m(e)).toString()+'px;"></span>';if(3<=l*(C/this._timeBarSecondsSpan))for(e=p(C);e<=h;e=f(e,C))a+='<span class="cesium-timeline-ticSub" style="left: '+Math.round(l*m(e)).toString()+'px;"></span>';if(2<=l*(v/this._timeBarSecondsSpan)){h+=this._mainTicSpan=v,e=p(v);for(var D=JulianDate.computeTaiMinusUtc(i);e<=h;){var M,I=JulianDate.addSeconds(c,e-d,new JulianDate);2.1<v&&(M=JulianDate.computeTaiMinusUtc(I),.1<Math.abs(M-D)&&(e+=M-D,I=JulianDate.addSeconds(c,e-d,new JulianDate)));var R=Math.round(l*m(e)),O=this.makeLabel(I);this._rulerEle.innerHTML=O,(M=this._rulerEle.offsetWidth)<10&&(M=y),P<(I=R-(M/2-1))?(P=I+M+5,a+='<span class="cesium-timeline-ticMain" style="left: '+R.toString()+'px;"></span><span class="cesium-timeline-ticLabel" style="left: '+I.toString()+'px;">'+O+"</span>"):a+='<span class="cesium-timeline-ticSub" style="left: '+R.toString()+'px;"></span>',e=f(e,v)}}else this._mainTicSpan=-1;a+='<span class="cesium-timeline-icon16" style="left:'+r+'px;bottom:0;background-position: 0 0;"></span>',t.innerHTML=a,this._scrubElement=t.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),_.y=0,this._trackList.forEach((function(e){e.render(n._context,_),_.y+=e.height}))},Timeline.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e,t=this._scrubElement;defined(this._scrubElement)&&(e=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),e=Math.round(e*this._topDiv.clientWidth/this._timeBarSecondsSpan),this._lastXPos!==e&&(this._lastXPos=e,t.style.left=e-8+"px",this._needleEle.style.left=e+"px")),defined(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(JulianDate.addSeconds(this._startJulian,this._timelineDrag,new JulianDate),JulianDate.addSeconds(this._endJulian,this._timelineDrag,new JulianDate)))},Timeline.prototype._setTimeBarTime=function(e,t){e=Math.round(e),this._scrubJulian=JulianDate.addSeconds(this._startJulian,t,new JulianDate),this._scrubElement&&(i=e-8,this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px");var i=document.createEvent("Event");i.initEvent("settime",!0,!0),i.clientX=e,i.timeSeconds=t,i.timeJulian=this._scrubJulian,i.clock=this._clock,this._topDiv.dispatchEvent(i)},Timeline.prototype.resize=function(){var e,t=this.container.clientWidth,i=this.container.clientHeight;t===this._lastWidth&&i===this._lastHeight||(this._trackContainer.style.height=i+"px",e=1,this._trackList.forEach((function(t){e+=t.height})),this._trackListEle.style.height=e.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=e,this._makeTics(),this._lastXPos=void 0,this._lastWidth=t,this._lastHeight=i)},Object.defineProperties(VRButtonViewModel.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}}),VRButtonViewModel.prototype.isDestroyed=function(){return!1},VRButtonViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Fullscreen.changeEventName,this._callback),destroyObject(this)};var enterVRPath="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",exitVRPath="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function VRButton(e,t,i){e=getElement(e),(t=new VRButtonViewModel(t,i))._exitVRPath=exitVRPath,t._enterVRPath=enterVRPath,(i=document.createElement("button")).type="button",i.className="cesium-button cesium-vrButton",i.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(i),knockout.applyBindings(t,i),this._container=e,this._viewModel=t,this._element=i}Object.defineProperties(VRButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),VRButton.prototype.isDestroyed=function(){return!1},VRButton.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject(this)};var boundingSphereScratch$2=new BoundingSphere;function onTimelineScrubfunction(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function getCesium3DTileFeatureDescription(e){var t=e.getPropertyNames(),i="";return t.forEach((function(t){var r=e.getProperty(t);defined(r)&&(i+="<tr><th>"+t+"</th><td>"+r+"</td></tr>")})),0<i.length&&(i='<table class="cesium-infoBox-defaultTable"><tbody>'+i+"</tbody></table>"),i}function getCesium3DTileFeatureName(e){for(var t=[],i=e.getPropertyNames(),r=0;r<i.length;r++){var n=i[r];/^name$/i.test(n)?t[0]=e.getProperty(n):/name/i.test(n)?t[1]=e.getProperty(n):/^title$/i.test(n)?t[2]=e.getProperty(n):/^(id|identifier)$/i.test(n)?t[3]=e.getProperty(n):/element/i.test(n)?t[4]=e.getProperty(n):/(id|identifier)$/i.test(n)&&(t[5]=e.getProperty(n))}var a=t.length;for(r=0;r<a;r++){var o=t[r];if(defined(o)&&""!==o)return o}return"Unnamed Feature"}function pickEntity(e,t){var i=e.scene.pick(t.position);if(defined(i)){var r=defaultValue(i.id,i.primitive.id);if(r instanceof Entity)return r;if(i instanceof Cesium3DTileFeature)return new Entity({name:getCesium3DTileFeatureName(i),description:getCesium3DTileFeatureDescription(i),feature:i})}if(defined(e.scene.globe))return pickImageryLayerFeature(e,t.position)}function trackDataSourceClock(e,t,i){!defined(i)||defined(i=i.clock)&&(i.getValue(t),defined(e)&&(e.updateFromClock(),e.zoomTo(i.startTime,i.stopTime)))}var cartesian3Scratch$3=new Cartesian3;function pickImageryLayerFeature(e,t){var i;t=(i=e.scene).camera.getPickRay(t);if(defined(i=i.imageryLayers.pickImageryLayerFeatures(t,i))){var r=new Entity({id:"Loading...",description:"Loading feature information..."});return when(i,(function(t){var i;e.selectedEntity===r&&(defined(t)&&0!==t.length?(t=new Entity({id:(i=t[0]).name,description:i.description}),defined(i.position)&&(i=e.scene.globe.ellipsoid.cartographicToCartesian(i.position,cartesian3Scratch$3),t.position=new ConstantPositionProperty(i)),e.selectedEntity=t):e.selectedEntity=createNoFeaturesEntity())}),(function(){e.selectedEntity===r&&(e.selectedEntity=createNoFeaturesEntity())})),r}}function createNoFeaturesEntity(){return new Entity({id:"None",description:"No features found."})}function enableVRUI(e,t){var i=e._geocoder,r=e._homeButton,n=e._sceneModePicker,a=e._projectionPicker,o=e._baseLayerPicker,s=e._animation,l=e._timeline,c=e._fullscreenButton,u=e._infoBox,d=e._selectionIndicator,h=t?"hidden":"visible";defined(i)&&(i.container.style.visibility=h),defined(r)&&(r.container.style.visibility=h),defined(n)&&(n.container.style.visibility=h),defined(a)&&(a.container.style.visibility=h),defined(o)&&(o.container.style.visibility=h),defined(s)&&(s.container.style.visibility=h),defined(l)&&(l.container.style.visibility=h),defined(c)&&c.viewModel.isFullscreenEnabled&&(c.container.style.visibility=h),defined(u)&&(u.container.style.visibility=h),defined(d)&&(d.container.style.visibility=h),e._container&&(c=t||!defined(c)?0:c.container.clientWidth,e._vrButton.container.style.right=c+"px",e.forceResize())}function Viewer(e,t){e=getElement(e);var i=!(defined((t=defaultValue(t,defaultValue.EMPTY_OBJECT)).globe)&&!1===t.globe||defined(t.baseLayerPicker)&&!1===t.baseLayerPicker),r=this,n=document.createElement("div");n.className="cesium-viewer",e.appendChild(n),(m=document.createElement("div")).className="cesium-viewer-cesiumWidgetContainer",n.appendChild(m);var a=document.createElement("div");a.className="cesium-viewer-bottom",n.appendChild(a);var o,s,l=defaultValue(t.scene3DOnly,!1),c=!1;defined(t.clockViewModel)?o=(s=t.clockViewModel).clock:(s=new ClockViewModel(o=new Clock),c=!0),defined(t.shouldAnimate)&&(o.shouldAnimate=t.shouldAnimate);var u=new CesiumWidget(m,{imageryProvider:!i&&!defined(t.imageryProvider)&&void 0,clock:o,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:defined(t.creditContainer)?t.creditContainer:a,creditViewport:t.creditViewport,scene3DOnly:l,terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange}),d=t.dataSources,h=!1;defined(d)||(d=new DataSourceCollection,h=!0);var p,f,m,g=u.scene,y=new DataSourceDisplay({scene:g,dataSourceCollection:d});(m=new EventHelper).add(o.onTick,Viewer.prototype._onTick,this),m.add(g.morphStart,Viewer.prototype._clearTrackedObject,this),defined(t.selectionIndicator)&&!1===t.selectionIndicator||((p=document.createElement("div")).className="cesium-viewer-selectionIndicatorContainer",n.appendChild(p),p=new SelectionIndicator(p,g)),defined(t.infoBox)&&!1===t.infoBox||((B=document.createElement("div")).className="cesium-viewer-infoBoxContainer",n.appendChild(B),v=(f=new InfoBox(B)).viewModel,m.add(v.cameraClicked,Viewer.prototype._onInfoBoxCameraClicked,this),m.add(v.closeClicked,Viewer.prototype._onInfoBoxClockClicked,this));var _,v,C,x,b,S,T,E,w,A,P,D,M,I,R,O,L,N,F,B=document.createElement("div");if(B.className="cesium-viewer-toolbar",n.appendChild(B),defined(t.geocoder)&&!1===t.geocoder||((v=document.createElement("div")).className="cesium-viewer-geocoderContainer",B.appendChild(v),defined(t.geocoder)&&"boolean"!=typeof t.geocoder&&(C=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),_=new Geocoder({container:v,geocoderServices:C,scene:g}),m.add(_.viewModel.search.beforeExecute,Viewer.prototype._clearObjects,this)),defined(t.homeButton)&&!1===t.homeButton||(x=new HomeButton(B,g),defined(_)&&m.add(x.viewModel.command.afterExecute,(function(){var e=_.viewModel;e.searchText="",e.isSearchInProgress&&e.search()})),m.add(x.viewModel.command.beforeExecute,Viewer.prototype._clearTrackedObject,this)),l||defined(t.sceneModePicker)&&!1===t.sceneModePicker||(b=new SceneModePicker(B,g)),t.projectionPicker&&(S=new ProjectionPicker(B,g)),i&&(T=defaultValue(t.imageryProviderViewModels,createDefaultImageryProviderViewModels()),E=defaultValue(t.terrainProviderViewModels,createDefaultTerrainProviderViewModels()),T=new BaseLayerPicker(B,{globe:g.globe,imageryProviderViewModels:T,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:E,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),E=B.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]),defined(t.imageryProvider)&&!1!==t.imageryProvider&&(i&&(T.viewModel.selectedImagery=void 0),g.imageryLayers.removeAll(),g.imageryLayers.addImageryProvider(t.imageryProvider)),defined(t.terrainProvider)&&(i&&(T.viewModel.selectedTerrain=void 0),g.terrainProvider=t.terrainProvider),!defined(t.navigationHelpButton)||!1!==t.navigationHelpButton){var V,k=!0;try{defined(window.localStorage)&&(defined(V=window.localStorage.getItem("cesium-hasSeenNavHelp"))&&Boolean(V)?k=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true"))}catch(e){}w=new NavigationHelpButton({container:B,instructionsInitiallyVisible:defaultValue(t.navigationInstructionsInitiallyVisible,k)})}defined(t.animation)&&!1===t.animation||((D=document.createElement("div")).className="cesium-viewer-animationContainer",n.appendChild(D),A=new Animation(D,new AnimationViewModel(s))),defined(t.timeline)&&!1===t.timeline||((D=document.createElement("div")).className="cesium-viewer-timelineContainer",n.appendChild(D),(P=new Timeline(D,o)).addEventListener("settime",onTimelineScrubfunction,!1),P.zoomTo(o.startTime,o.stopTime)),defined(t.fullscreenButton)&&!1===t.fullscreenButton||((R=document.createElement("div")).className="cesium-viewer-fullscreenContainer",n.appendChild(R),I=subscribeAndEvaluate((M=new FullscreenButton(R,t.fullscreenElement)).viewModel,"isFullscreenEnabled",(function(e){R.style.display=e?"block":"none",defined(P)&&(P.container.style.right=R.clientWidth+"px",P.resize())}))),t.vrButton&&((F=document.createElement("div")).className="cesium-viewer-vrContainer",n.appendChild(F),L=subscribeAndEvaluate((O=new VRButton(F,g,t.fullScreenElement)).viewModel,"isVREnabled",(function(e){F.style.display=e?"block":"none",defined(M)&&(F.style.right=R.clientWidth+"px"),defined(P)&&(P.container.style.right=F.clientWidth+"px",P.resize())})),N=subscribeAndEvaluate(O.viewModel,"isVRMode",(function(e){enableVRUI(r,e)}))),this._baseLayerPickerDropDown=E,this._fullscreenSubscription=I,this._vrSubscription=L,this._vrModeSubscription=N,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=defaultValue(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=a,this._element=n,this._cesiumWidget=u,this._selectionIndicator=p,this._infoBox=f,this._dataSourceCollection=d,this._destroyDataSourceCollection=h,this._dataSourceDisplay=y,this._clockViewModel=s,this._destroyClockViewModel=c,this._toolbar=B,this._homeButton=x,this._sceneModePicker=b,this._projectionPicker=S,this._baseLayerPicker=T,this._navigationHelpButton=w,this._animation=A,this._timeline=P,this._fullscreenButton=M,this._vrButton=O,this._geocoder=_,this._eventHelper=m,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=defined(f)||defined(p),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new Event,this._trackedEntityChanged=new Event,knockout.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),m.add(d.dataSourceAdded,Viewer.prototype._onDataSourceAdded,this),m.add(d.dataSourceRemoved,Viewer.prototype._onDataSourceRemoved,this),m.add(g.postUpdate,Viewer.prototype.resize,this),m.add(g.postRender,Viewer.prototype._postRender,this);for(var z=d.length,G=0;G<z;G++)this._dataSourceAdded(d,d.get(G));this._dataSourceAdded(void 0,y.defaultDataSource),m.add(d.dataSourceAdded,Viewer.prototype._dataSourceAdded,this),m.add(d.dataSourceRemoved,Viewer.prototype._dataSourceRemoved,this),u.screenSpaceEventHandler.setInputAction((function(e){r.selectedEntity=pickEntity(r,e)}),ScreenSpaceEventType$1.LEFT_CLICK),u.screenSpaceEventHandler.setInputAction((function(e){defined(e=pickEntity(r,e))?Property.getValueOrUndefined(e.position,r.clock.currentTime)?r.trackedEntity=e:r.zoomTo(e):defined(r.trackedEntity)&&(r.trackedEntity=void 0)}),ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK)}function zoomToOrFly(e,t,i,r){cancelZoom(e);var n=when.defer();return e._zoomPromise=n,e._zoomIsFlight=r,e._zoomOptions=i,when(t,(function(t){var i;e._zoomPromise===n&&(t instanceof ImageryLayer?t.getViewableRectangle().then((function(t){return computeFlyToLocationForRectangle(t,e.scene)})).then((function(t){e._zoomPromise===n&&(e._zoomTarget=t)})):t instanceof Cesium3DTileset||t instanceof TimeDynamicPointCloud?e._zoomTarget=t:t.isLoading&&defined(t.loadingEvent)?i=t.loadingEvent.addEventListener((function(){i(),e._zoomPromise===n&&(e._zoomTarget=t.entities.values.slice(0))})):Array.isArray(t)?e._zoomTarget=t.slice(0):(defined((t=defaultValue(t.values,t)).entities)&&(t=t.entities.values),Array.isArray(t)?e._zoomTarget=t.slice(0):e._zoomTarget=[t]))})),e.scene.requestRender(),n.promise}function clearZoom(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function cancelZoom(e){var t=e._zoomPromise;defined(t)&&(clearZoom(e),t.resolve(!1))}function updateZoomTarget(e){var t=e._zoomTarget;if(defined(t)&&e.scene.mode!==SceneMode$1.MORPHING){var i,r=e.scene,n=r.camera,a=e._zoomPromise,o=defaultValue(e._zoomOptions,{});if(t instanceof Cesium3DTileset)return t.readyPromise.then((function(){var r=t.boundingSphere;defined(o.offset)||(o.offset=new HeadingPitchRange(0,-.5,r.radius)),i={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){a.resolve(!0)},cancel:function(){a.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(t.boundingSphere,i):(n.viewBoundingSphere(r,o.offset),n.lookAtTransform(Matrix4.IDENTITY),a.resolve(!0)),clearZoom(e)}));if(t instanceof TimeDynamicPointCloud)return t.readyPromise.then((function(){var r=t.boundingSphere;defined(o.offset)||(o.offset=new HeadingPitchRange(0,-.5,r.radius)),i={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){a.resolve(!0)},cancel:function(){a.resolve(!1)}},e._zoomIsFlight?n.flyToBoundingSphere(r,i):(n.viewBoundingSphere(r,o.offset),n.lookAtTransform(Matrix4.IDENTITY),a.resolve(!0)),clearZoom(e)}));if(t instanceof Cartographic)return i={destination:r.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){a.resolve(!0)},cancel:function(){a.resolve(!1)}},e._zoomIsFlight?n.flyTo(i):(n.setView(i),a.resolve(!0)),void clearZoom(e);for(var s=t,l=[],c=0,u=s.length;c<u;c++){var d=e._dataSourceDisplay.getBoundingSphere(s[c],!1,boundingSphereScratch$2);if(d===BoundingSphereState$1.PENDING)return;d!==BoundingSphereState$1.FAILED&&l.push(BoundingSphere.clone(boundingSphereScratch$2))}0!==l.length?(e.trackedEntity=void 0,r=BoundingSphere.fromBoundingSpheres(l),e._zoomIsFlight?(clearZoom(e),n.flyToBoundingSphere(r,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){a.resolve(!0)},cancel:function(){a.resolve(!1)},offset:o.offset})):(n.viewBoundingSphere(r,o.offset),n.lookAtTransform(Matrix4.IDENTITY),clearZoom(e),a.resolve(!0))):cancelZoom(e)}}function updateTrackedEntity(e){var t,i,r,n,a;e._needTrackedEntityUpdate&&(t=e._trackedEntity,i=e.clock.currentTime,defined(Property.getValueOrUndefined(t.position,i))&&(r=e.scene,(a=e._dataSourceDisplay.getBoundingSphere(t,!1,boundingSphereScratch$2))!==BoundingSphereState$1.PENDING&&((n=r.mode)!==SceneMode$1.COLUMBUS_VIEW&&n!==SceneMode$1.SCENE2D||(r.screenSpaceCameraController.enableTranslate=!1),n!==SceneMode$1.COLUMBUS_VIEW&&n!==SceneMode$1.SCENE3D||(r.screenSpaceCameraController.enableTilt=!1),a=a!==BoundingSphereState$1.FAILED?boundingSphereScratch$2:void 0,e._entityView=new EntityView(t,r,r.mapProjection.ellipsoid),e._entityView.update(i,a),e._needTrackedEntityUpdate=!1)))}function viewerCesium3DTilesInspectorMixin(e){var t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);var i=new Cesium3DTilesInspector(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function viewerCesiumInspectorMixin(e){var t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);var i=new CesiumInspector(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function viewerDragDropMixin(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=!0,r=defaultValue(t.flyToOnDrop,!0),n=new Event,a=defaultValue(t.clearOnDrop,!0),o=defaultValue(t.dropTarget,e.container),s=defaultValue(t.clampToGround,!0),l=t.proxy;function c(t){stop(t),a&&(e.entities.removeAll(),e.dataSources.removeAll());for(var i=t.dataTransfer.files,r=i.length,n=0;n<r;n++){var o=i[n],c=new FileReader;c.onload=createOnLoadCallback(e,o,l,s),c.onerror=createDropErrorCallback(e,o),c.readAsText(o)}}o=getElement(o),Object.defineProperties(e,{dropTarget:{get:function(){return o},set:function(e){unsubscribe(o,c),subscribe(o=e,c)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&((e?subscribe:unsubscribe)(o,c),i=e)}},dropError:{get:function(){return n}},clearOnDrop:{get:function(){return a},set:function(e){a=e}},flyToOnDrop:{get:function(){return r},set:function(e){r=e}},proxy:{get:function(){return l},set:function(e){l=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),subscribe(o,c),e.destroy=wrapFunction(e,e.destroy,(function(){e.dropEnabled=!1})),e._handleDrop=c}function stop(e){e.stopPropagation(),e.preventDefault()}function unsubscribe(e,t){defined(e)&&(e.removeEventListener("drop",t,!1),e.removeEventListener("dragenter",stop,!1),e.removeEventListener("dragover",stop,!1),e.removeEventListener("dragexit",stop,!1))}function subscribe(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",stop,!1),e.addEventListener("dragover",stop,!1),e.addEventListener("dragexit",stop,!1)}function createOnLoadCallback(e,t,i,r){var n=e.scene;return function(a){var o,s=t.name;try{if(/\.czml$/i.test(s))o=CzmlDataSource.load(JSON.parse(a.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))o=GeoJsonDataSource.load(JSON.parse(a.target.result),{sourceUri:s,clampToGround:r});else{if(!/\.(kml|kmz)$/i.test(s))return void e.dropError.raiseEvent(e,s,"Unrecognized file: "+s);o=KmlDataSource.load(t,{sourceUri:s,proxy:i,camera:n.camera,canvas:n.canvas,clampToGround:r})}defined(o)&&e.dataSources.add(o).then((function(t){e.flyToOnDrop&&e.flyTo(t)})).otherwise((function(t){e.dropError.raiseEvent(e,s,t)}))}catch(a){e.dropError.raiseEvent(e,s,a)}}}function createDropErrorCallback(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function viewerPerformanceWatchdogMixin(e,t){t=defaultValue(t,defaultValue.EMPTY_OBJECT);var i=new PerformanceWatchdog({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}function callAndWrap(e,t,i){try{return e(t,i)}catch(e){return when.reject(e)}}function createTaskProcessorWorker(e){var t;return function(i){var r=i.data,n=[],a={id:r.id,result:void 0,error:void 0};return when(callAndWrap(e,r.parameters,n)).then((function(e){a.result=e})).otherwise((function(e){e instanceof Error?a.error={name:e.name,message:e.message,stack:e.stack}:a.error=e})).always((function(){defined(t)||(t=defaultValue(self.webkitPostMessage,self.postMessage)),r.canTransferArrayBuffer||(n.length=0);try{t(a,n)}catch(e){a.result=void 0,a.error="postMessage failed with error: "+formatError(e)+"\n  with responseMessage: "+JSON.stringify(a),t(a)}}))}}Object.defineProperties(Viewer.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){var t,i;this._trackedEntity!==e&&(this._trackedEntity=e,cancelZoom(this),i=(t=this.scene).mode,defined(e)&&defined(e.position)?this._needTrackedEntityUpdate=!0:(this._needTrackedEntityUpdate=!1,i!==SceneMode$1.COLUMBUS_VIEW&&i!==SceneMode$1.SCENE2D||(t.screenSpaceCameraController.enableTranslate=!0),i!==SceneMode$1.COLUMBUS_VIEW&&i!==SceneMode$1.SCENE3D||(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(Matrix4.IDENTITY)),this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender())}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){var t;this._selectedEntity!==e&&(this._selectedEntity=e,t=defined(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0,defined(e)?defined(t)&&t.animateAppear():defined(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e))}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,trackDataSourceClock(this._timeline,this.clock,e))}}}),Viewer.prototype.extend=function(e,t){e(this,t)},Viewer.prototype.resize=function(){var e,t,i,r,n=this._cesiumWidget,a=this._container,o=a.clientWidth,s=a.clientHeight,l=defined(this._animation),c=defined(this._timeline);n.resize(),o===this._lastWidth&&s===this._lastHeight||(r=s-125,defined(e=this._baseLayerPickerDropDown)&&(e.style.maxHeight=r+"px"),defined(this._geocoder)&&(this._geocoder.searchSuggestionsContainer.style.maxHeight=r+"px"),defined(this._infoBox)&&(this._infoBox.viewModel.maxHeight=r),a=this._timeline,r=e=n=0,l&&"hidden"!==window.getComputedStyle(this._animation.container).visibility&&(t=this._lastWidth,i=this._animation.container,900<o?(n=169,t<=900&&(i.style.width="169px",i.style.height="112px",this._animation.resize())):600<=o?(n=136,(t<600||900<t)&&(i.style.width="136px",i.style.height="90px",this._animation.resize())):(n=106,(600<t||0===t)&&(i.style.width="106px",i.style.height="70px",this._animation.resize())),e=n+5),c&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility&&(l=this._fullscreenButton,t=this._vrButton,c=(i=a.container).style,r=i.clientHeight+3,c.left=n+"px",n=0,defined(l)&&(n+=l.container.clientWidth),defined(t)&&(n+=t.container.clientWidth),c.right=n+"px",a.resize()),this._bottomContainer.style.left=e+"px",this._bottomContainer.style.bottom=r+"px",this._lastWidth=o,this._lastHeight=s)},Viewer.prototype.forceResize=function(){this._lastWidth=0,this.resize()},Viewer.prototype.render=function(){this._cesiumWidget.render()},Viewer.prototype.isDestroyed=function(){return!1},Viewer.prototype.destroy=function(){this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK);for(var e=this.dataSources,t=e.length,i=0;i<t;i++)this._dataSourceRemoved(e,e.get(i));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),defined(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),defined(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),defined(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),defined(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),defined(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),defined(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),defined(this._timeline)&&(this._timeline.removeEventListener("settime",onTimelineScrubfunction,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),defined(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),defined(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),defined(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),defined(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),destroyObject(this)},Viewer.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Viewer.prototype._onEntityCollectionChanged,this)},Viewer.prototype._dataSourceRemoved=function(e,t){(t=t.entities).collectionChanged.removeEventListener(Viewer.prototype._onEntityCollectionChanged,this),defined(this.trackedEntity)&&t.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),defined(this.selectedEntity)&&t.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)},Viewer.prototype._onTick=function(e){var t=e.currentTime,i=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=i);var r,n=this._entityView;defined(n)&&(a=this._trackedEntity,this._dataSourceDisplay.getBoundingSphere(a,!1,boundingSphereScratch$2)===BoundingSphereState$1.DONE&&n.update(t,boundingSphereScratch$2));e=!1;var a=defined(i=this.selectedEntity)&&this._enableInfoOrSelection;a&&i.isShowing&&i.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(i,!0,boundingSphereScratch$2)!==BoundingSphereState$1.FAILED?r=boundingSphereScratch$2.center:defined(i.position)&&(r=i.position.getValue(t,r)),e=defined(r)),n=defined(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0,defined(n)&&(n.position=Cartesian3.clone(r,n.position),n.showSelection=a&&e,n.update()),n=defined(this._infoBox)?this._infoBox.viewModel:void 0,defined(n)&&(n.showInfo=a,n.enableCamera=e,n.isCameraTracking=this.trackedEntity===this.selectedEntity,a?(n.titleText=defaultValue(i.name,i.id),n.description=Property.getValueOrDefault(i.description,t,"")):(n.titleText="",n.description=""))},Viewer.prototype._onEntityCollectionChanged=function(e,t,i){for(var r=i.length,n=0;n<r;n++){var a=i[n];this.trackedEntity===a&&(this.trackedEntity=void 0),this.selectedEntity===a&&(this.selectedEntity=void 0)}},Viewer.prototype._onInfoBoxCameraClicked=function(e){e.isCameraTracking&&this.trackedEntity===this.selectedEntity?this.trackedEntity=void 0:defined(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)},Viewer.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},Viewer.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},Viewer.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},Viewer.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&trackDataSourceClock(this.timeline,this.clock,e)},Viewer.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);var i=t.entities.id;t=this._eventHelper.add(t.changedEvent,Viewer.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=t},Viewer.prototype._onDataSourceRemoved=function(e,t){var i=this.clockTrackedDataSource===t;t=t.entities.id;this._dataSourceChangedListeners[t](),this._dataSourceChangedListeners[t]=void 0,i&&(i=e.length,this._automaticallyTrackDataSourceClocks&&0<i?this.clockTrackedDataSource=e.get(i-1):this.clockTrackedDataSource=void 0)},Viewer.prototype.zoomTo=function(e,t){return zoomToOrFly(this,e,{offset:t},!1)},Viewer.prototype.flyTo=function(e,t){return zoomToOrFly(this,e,t,!0)},Viewer.prototype._postRender=function(){updateZoomTarget(this),updateTrackedEntity(this)};var VERSION="1.74";exports.Animation=Animation,exports.AnimationViewModel=AnimationViewModel,exports.Appearance=Appearance,exports.ApproximateTerrainHeights=ApproximateTerrainHeights,exports.ArcGISTiledElevationTerrainProvider=ArcGISTiledElevationTerrainProvider,exports.ArcGisMapServerImageryProvider=ArcGisMapServerImageryProvider,exports.ArcType=ArcType$1,exports.AssociativeArray=AssociativeArray,exports.AttributeCompression=AttributeCompression,exports.AttributeType=AttributeType$1,exports.AutoExposure=AutoExposure,exports.Autolinker=Autolinker,exports.AutomaticUniforms=AutomaticUniforms,exports.Axis=Axis$1,exports.AxisAlignedBoundingBox=AxisAlignedBoundingBox,exports.BaseLayerPicker=BaseLayerPicker,exports.BaseLayerPickerViewModel=BaseLayerPickerViewModel,exports.BatchTable=BatchTable,exports.Batched3DModel3DTileContent=Batched3DModel3DTileContent,exports.Billboard=Billboard,exports.BillboardCollection=BillboardCollection,exports.BillboardGraphics=BillboardGraphics,exports.BillboardVisualizer=BillboardVisualizer,exports.BingMapsGeocoderService=BingMapsGeocoderService,exports.BingMapsImageryProvider=BingMapsImageryProvider,exports.BingMapsStyle=BingMapsStyle$1,exports.BlendEquation=BlendEquation$1,exports.BlendFunction=BlendFunction$1,exports.BlendOption=BlendOption$1,exports.BlendingState=BlendingState$1,exports.BoundingRectangle=BoundingRectangle,exports.BoundingSphere=BoundingSphere,exports.BoundingSphereState=BoundingSphereState$1,exports.BoxEmitter=BoxEmitter,exports.BoxGeometry=BoxGeometry,exports.BoxGeometryUpdater=BoxGeometryUpdater,exports.BoxGraphics=BoxGraphics,exports.BoxOutlineGeometry=BoxOutlineGeometry,exports.BrdfLutGenerator=BrdfLutGenerator,exports.Buffer=Buffer$1,exports.BufferUsage=BufferUsage$1,exports.CallbackProperty=CallbackProperty,exports.Camera=Camera,exports.CameraEventAggregator=CameraEventAggregator,exports.CameraEventType=CameraEventType$1,exports.CameraFlightPath=CameraFlightPath,exports.Cartesian2=Cartesian2,exports.Cartesian3=Cartesian3,exports.Cartesian4=Cartesian4,exports.Cartographic=Cartographic,exports.CartographicGeocoderService=CartographicGeocoderService,exports.CatmullRomSpline=CatmullRomSpline,exports.Cesium3DTile=Cesium3DTile,exports.Cesium3DTileBatchTable=Cesium3DTileBatchTable,exports.Cesium3DTileColorBlendMode=Cesium3DTileColorBlendMode$1,exports.Cesium3DTileContent=Cesium3DTileContent,exports.Cesium3DTileContentFactory=Cesium3DTileContentFactory,exports.Cesium3DTileContentState=Cesium3DTileContentState$1,exports.Cesium3DTileFeature=Cesium3DTileFeature,exports.Cesium3DTileFeatureTable=Cesium3DTileFeatureTable,exports.Cesium3DTileOptimizationHint=Cesium3DTileOptimizationHint$1,exports.Cesium3DTileOptimizations=Cesium3DTileOptimizations,exports.Cesium3DTilePass=Cesium3DTilePass$1,exports.Cesium3DTilePassState=Cesium3DTilePassState,exports.Cesium3DTilePointFeature=Cesium3DTilePointFeature,exports.Cesium3DTileRefine=Cesium3DTileRefine$1,exports.Cesium3DTileStyle=Cesium3DTileStyle,exports.Cesium3DTileStyleEngine=Cesium3DTileStyleEngine,exports.Cesium3DTilesInspector=Cesium3DTilesInspector,exports.Cesium3DTilesInspectorViewModel=Cesium3DTilesInspectorViewModel,exports.Cesium3DTileset=Cesium3DTileset,exports.Cesium3DTilesetCache=Cesium3DTilesetCache,exports.Cesium3DTilesetGraphics=Cesium3DTilesetGraphics,exports.Cesium3DTilesetHeatmap=Cesium3DTilesetHeatmap,exports.Cesium3DTilesetMostDetailedTraversal=Cesium3DTilesetMostDetailedTraversal,exports.Cesium3DTilesetStatistics=Cesium3DTilesetStatistics,exports.Cesium3DTilesetTraversal=Cesium3DTilesetTraversal,exports.Cesium3DTilesetVisualizer=Cesium3DTilesetVisualizer,exports.CesiumInspector=CesiumInspector,exports.CesiumInspectorViewModel=CesiumInspectorViewModel,exports.CesiumTerrainProvider=CesiumTerrainProvider,exports.CesiumWidget=CesiumWidget,exports.Check=Check,exports.CheckerboardMaterialProperty=CheckerboardMaterialProperty,exports.CircleEmitter=CircleEmitter,exports.CircleGeometry=CircleGeometry,exports.CircleOutlineGeometry=CircleOutlineGeometry,exports.ClassificationModel=ClassificationModel,exports.ClassificationPrimitive=ClassificationPrimitive,exports.ClassificationType=ClassificationType$1,exports.ClearCommand=ClearCommand,exports.ClippingPlane=ClippingPlane,exports.ClippingPlaneCollection=ClippingPlaneCollection,exports.Clock=Clock,exports.ClockRange=ClockRange$1,exports.ClockStep=ClockStep$1,exports.ClockViewModel=ClockViewModel,exports.Color=Color,exports.ColorBlendMode=ColorBlendMode$1,exports.ColorGeometryInstanceAttribute=ColorGeometryInstanceAttribute,exports.ColorMaterialProperty=ColorMaterialProperty,exports.Command=Command,exports.ComponentDatatype=ComponentDatatype$1,exports.Composite3DTileContent=Composite3DTileContent,exports.CompositeEntityCollection=CompositeEntityCollection,exports.CompositeMaterialProperty=CompositeMaterialProperty,exports.CompositePositionProperty=CompositePositionProperty,exports.CompositeProperty=CompositeProperty,exports.CompressedTextureBuffer=CompressedTextureBuffer,exports.ComputeCommand=ComputeCommand,exports.ComputeEngine=ComputeEngine,exports.ConditionsExpression=ConditionsExpression,exports.ConeEmitter=ConeEmitter,exports.ConstantPositionProperty=ConstantPositionProperty,exports.ConstantProperty=ConstantProperty,exports.Context=Context,exports.ContextLimits=ContextLimits,exports.CoplanarPolygonGeometry=CoplanarPolygonGeometry,exports.CoplanarPolygonGeometryLibrary=CoplanarPolygonGeometryLibrary,exports.CoplanarPolygonOutlineGeometry=CoplanarPolygonOutlineGeometry,exports.CornerType=CornerType$1,exports.CorridorGeometry=CorridorGeometry,exports.CorridorGeometryLibrary=CorridorGeometryLibrary,exports.CorridorGeometryUpdater=CorridorGeometryUpdater,exports.CorridorGraphics=CorridorGraphics,exports.CorridorOutlineGeometry=CorridorOutlineGeometry,exports.Credit=Credit,exports.CreditDisplay=CreditDisplay,exports.CubeMap=CubeMap,exports.CubeMapFace=CubeMapFace,exports.CubicRealPolynomial=CubicRealPolynomial,exports.CullFace=CullFace$1,exports.CullingVolume=CullingVolume,exports.CustomDataSource=CustomDataSource,exports.CylinderGeometry=CylinderGeometry,exports.CylinderGeometryLibrary=CylinderGeometryLibrary,exports.CylinderGeometryUpdater=CylinderGeometryUpdater,exports.CylinderGraphics=CylinderGraphics,exports.CylinderOutlineGeometry=CylinderOutlineGeometry,exports.CzmlDataSource=CzmlDataSource,exports.DataSource=DataSource,exports.DataSourceClock=DataSourceClock,exports.DataSourceCollection=DataSourceCollection,exports.DataSourceDisplay=DataSourceDisplay,exports.DebugAppearance=DebugAppearance,exports.DebugCameraPrimitive=DebugCameraPrimitive,exports.DebugInspector=DebugInspector,exports.DebugModelMatrixPrimitive=DebugModelMatrixPrimitive,exports.DefaultProxy=DefaultProxy,exports.DepthFunction=DepthFunction$1,exports.DepthPlane=DepthPlane,exports.DerivedCommand=DerivedCommand,exports.DeveloperError=DeveloperError,exports.DeviceOrientationCameraController=DeviceOrientationCameraController,exports.DirectionalLight=DirectionalLight,exports.DiscardEmptyTileImagePolicy=DiscardEmptyTileImagePolicy,exports.DiscardMissingTileImagePolicy=DiscardMissingTileImagePolicy,exports.DistanceDisplayCondition=DistanceDisplayCondition,exports.DistanceDisplayConditionGeometryInstanceAttribute=DistanceDisplayConditionGeometryInstanceAttribute,exports.DoublyLinkedList=DoublyLinkedList,exports.DracoLoader=DracoLoader,exports.DrawCommand=DrawCommand,exports.DynamicGeometryBatch=DynamicGeometryBatch,exports.DynamicGeometryUpdater=DynamicGeometryUpdater,exports.EarthOrientationParameters=EarthOrientationParameters,exports.EarthOrientationParametersSample=EarthOrientationParametersSample,exports.EasingFunction=EasingFunction$1,exports.EllipseGeometry=EllipseGeometry,exports.EllipseGeometryLibrary=EllipseGeometryLibrary,exports.EllipseGeometryUpdater=EllipseGeometryUpdater,exports.EllipseGraphics=EllipseGraphics,exports.EllipseOutlineGeometry=EllipseOutlineGeometry,exports.Ellipsoid=Ellipsoid,exports.EllipsoidGeodesic=EllipsoidGeodesic,exports.EllipsoidGeometry=EllipsoidGeometry,exports.EllipsoidGeometryUpdater=EllipsoidGeometryUpdater,exports.EllipsoidGraphics=EllipsoidGraphics,exports.EllipsoidOutlineGeometry=EllipsoidOutlineGeometry,exports.EllipsoidPrimitive=EllipsoidPrimitive,exports.EllipsoidRhumbLine=EllipsoidRhumbLine,exports.EllipsoidSurfaceAppearance=EllipsoidSurfaceAppearance,exports.EllipsoidTangentPlane=EllipsoidTangentPlane,exports.EllipsoidTerrainProvider=EllipsoidTerrainProvider,exports.EllipsoidalOccluder=EllipsoidalOccluder,exports.Empty3DTileContent=Empty3DTileContent,exports.EncodedCartesian3=EncodedCartesian3,exports.Entity=Entity,exports.EntityCluster=EntityCluster,exports.EntityCollection=EntityCollection,exports.EntityView=EntityView,exports.Event=Event,exports.EventHelper=EventHelper,exports.Expression=Expression,exports.ExpressionNodeType=ExpressionNodeType$1,exports.ExtrapolationType=ExtrapolationType$1,exports.FXAA3_11=FXAA3_11,exports.FeatureDetection=FeatureDetection,exports.Fog=Fog,exports.ForEach=ForEach,exports.FrameRateMonitor=FrameRateMonitor,exports.FrameState=FrameState,exports.Framebuffer=Framebuffer,exports.FrustumCommands=FrustumCommands,exports.FrustumGeometry=FrustumGeometry,exports.FrustumOutlineGeometry=FrustumOutlineGeometry,exports.Fullscreen=Fullscreen,exports.FullscreenButton=FullscreenButton,exports.FullscreenButtonViewModel=FullscreenButtonViewModel,exports.GeoJsonDataSource=GeoJsonDataSource,exports.GeocodeType=GeocodeType$1,exports.Geocoder=Geocoder,exports.GeocoderService=GeocoderService,exports.GeocoderViewModel=GeocoderViewModel,exports.GeographicProjection=GeographicProjection,exports.GeographicTilingScheme=GeographicTilingScheme,exports.Geometry=Geometry,exports.Geometry3DTileContent=Geometry3DTileContent,exports.GeometryAttribute=GeometryAttribute,exports.GeometryAttributes=GeometryAttributes,exports.GeometryFactory=GeometryFactory,exports.GeometryInstance=GeometryInstance,exports.GeometryInstanceAttribute=GeometryInstanceAttribute,exports.GeometryOffsetAttribute=GeometryOffsetAttribute$1,exports.GeometryPipeline=GeometryPipeline,exports.GeometryType=GeometryType$1,exports.GeometryUpdater=GeometryUpdater,exports.GeometryVisualizer=GeometryVisualizer,exports.GetFeatureInfoFormat=GetFeatureInfoFormat,exports.Globe=Globe,exports.GlobeDepth=GlobeDepth,exports.GlobeSurfaceShaderSet=GlobeSurfaceShaderSet,exports.GlobeSurfaceTile=GlobeSurfaceTile,exports.GlobeSurfaceTileProvider=GlobeSurfaceTileProvider,exports.GlobeTranslucency=GlobeTranslucency,exports.GlobeTranslucencyFramebuffer=GlobeTranslucencyFramebuffer,exports.GlobeTranslucencyState=GlobeTranslucencyState,exports.GoogleEarthEnterpriseImageryProvider=GoogleEarthEnterpriseImageryProvider,exports.GoogleEarthEnterpriseMapsProvider=GoogleEarthEnterpriseMapsProvider,exports.GoogleEarthEnterpriseMetadata=GoogleEarthEnterpriseMetadata,exports.GoogleEarthEnterpriseTerrainData=GoogleEarthEnterpriseTerrainData,exports.GoogleEarthEnterpriseTerrainProvider=GoogleEarthEnterpriseTerrainProvider,exports.GoogleEarthEnterpriseTileInformation=GoogleEarthEnterpriseTileInformation,exports.GregorianDate=GregorianDate,exports.GridImageryProvider=GridImageryProvider,exports.GridMaterialProperty=GridMaterialProperty,exports.GroundGeometryUpdater=GroundGeometryUpdater,exports.GroundPolylineGeometry=GroundPolylineGeometry,exports.GroundPolylinePrimitive=GroundPolylinePrimitive,exports.GroundPrimitive=GroundPrimitive,exports.HeadingPitchRange=HeadingPitchRange,exports.HeadingPitchRoll=HeadingPitchRoll,exports.Heap=Heap,exports.HeightReference=HeightReference$1,exports.HeightmapEncoding=HeightmapEncoding$1,exports.HeightmapTerrainData=HeightmapTerrainData,exports.HeightmapTessellator=HeightmapTessellator,exports.HermitePolynomialApproximation=HermitePolynomialApproximation,exports.HermiteSpline=HermiteSpline,exports.HomeButton=HomeButton,exports.HomeButtonViewModel=HomeButtonViewModel,exports.HorizontalOrigin=HorizontalOrigin$1,exports.Iau2000Orientation=Iau2000Orientation,exports.Iau2006XysData=Iau2006XysData,exports.Iau2006XysSample=Iau2006XysSample,exports.IauOrientationAxes=IauOrientationAxes,exports.IauOrientationParameters=IauOrientationParameters,exports.ImageMaterialProperty=ImageMaterialProperty,exports.Imagery=Imagery,exports.ImageryLayer=ImageryLayer,exports.ImageryLayerCollection=ImageryLayerCollection,exports.ImageryLayerFeatureInfo=ImageryLayerFeatureInfo,exports.ImageryProvider=ImageryProvider,exports.ImagerySplitDirection=ImagerySplitDirection$1,exports.ImageryState=ImageryState$1,exports.IndexDatatype=IndexDatatype$1,exports.InfoBox=InfoBox,exports.InfoBoxViewModel=InfoBoxViewModel,exports.InspectorShared=InspectorShared,exports.Instanced3DModel3DTileContent=Instanced3DModel3DTileContent,exports.InterpolationAlgorithm=InterpolationAlgorithm,exports.Intersect=Intersect$1,exports.IntersectionTests=IntersectionTests,exports.Intersections2D=Intersections2D,exports.Interval=Interval,exports.InvertClassification=InvertClassification,exports.Ion=Ion,exports.IonGeocoderService=IonGeocoderService,exports.IonImageryProvider=IonImageryProvider,exports.IonResource=IonResource,exports.IonWorldImageryStyle=IonWorldImageryStyle$1,exports.Iso8601=Iso8601,exports.JobScheduler=JobScheduler,exports.JobType=JobType$1,exports.JulianDate=JulianDate,exports.KeyboardEventModifier=KeyboardEventModifier$1,exports.KmlCamera=KmlCamera,exports.KmlDataSource=KmlDataSource,exports.KmlLookAt=KmlLookAt,exports.KmlTour=KmlTour,exports.KmlTourFlyTo=KmlTourFlyTo,exports.KmlTourWait=KmlTourWait,exports.Label=Label,exports.LabelCollection=LabelCollection,exports.LabelGraphics=LabelGraphics,exports.LabelStyle=LabelStyle$1,exports.LabelVisualizer=LabelVisualizer,exports.LagrangePolynomialApproximation=LagrangePolynomialApproximation,exports.LeapSecond=LeapSecond,exports.LercDecode=LercDecode,exports.Light=Light,exports.LinearApproximation=LinearApproximation,exports.LinearSpline=LinearSpline,exports.ManagedArray=ManagedArray,exports.MapMode2D=MapMode2D$1,exports.MapProjection=MapProjection,exports.MapboxImageryProvider=MapboxImageryProvider,exports.MapboxStyleImageryProvider=MapboxStyleImageryProvider,exports.Material=Material,exports.MaterialAppearance=MaterialAppearance,exports.MaterialProperty=MaterialProperty,exports.Math=CesiumMath,exports.Matrix2=Matrix2,exports.Matrix3=Matrix3,exports.Matrix4=Matrix4,exports.MipmapHint=MipmapHint$1,exports.Model=Model,exports.ModelAnimation=ModelAnimation,exports.ModelAnimationCache=ModelAnimationCache,exports.ModelAnimationCollection=ModelAnimationCollection,exports.ModelAnimationLoop=ModelAnimationLoop$1,exports.ModelAnimationState=ModelAnimationState,exports.ModelGraphics=ModelGraphics,exports.ModelInstance=ModelInstance,exports.ModelInstanceCollection=ModelInstanceCollection,exports.ModelLoadResources=ModelLoadResources,exports.ModelMaterial=ModelMaterial,exports.ModelMesh=ModelMesh,exports.ModelNode=ModelNode,exports.ModelOutlineLoader=ModelOutlineLoader,exports.ModelUtility=ModelUtility,exports.ModelVisualizer=ModelVisualizer,exports.Moon=Moon,exports.NavigationHelpButton=NavigationHelpButton,exports.NavigationHelpButtonViewModel=NavigationHelpButtonViewModel,exports.NearFarScalar=NearFarScalar,exports.NeverTileDiscardPolicy=NeverTileDiscardPolicy,exports.NoSleep=NoSleep,exports.NodeTransformationProperty=NodeTransformationProperty,exports.OIT=OIT,exports.Occluder=Occluder,exports.OctahedralProjectedCubeMap=OctahedralProjectedCubeMap,exports.OffsetGeometryInstanceAttribute=OffsetGeometryInstanceAttribute,exports.OpenCageGeocoderService=OpenCageGeocoderService,exports.OpenStreetMapImageryProvider=OpenStreetMapImageryProvider,exports.OrderedGroundPrimitiveCollection=OrderedGroundPrimitiveCollection,exports.OrientedBoundingBox=OrientedBoundingBox,exports.OrthographicFrustum=OrthographicFrustum,exports.OrthographicOffCenterFrustum=OrthographicOffCenterFrustum,exports.Packable=Packable,exports.PackableForInterpolation=PackableForInterpolation,exports.Particle=Particle,exports.ParticleBurst=ParticleBurst,exports.ParticleEmitter=ParticleEmitter,exports.ParticleSystem=ParticleSystem,exports.Pass=Pass$1,exports.PassState=PassState,exports.PathGraphics=PathGraphics,exports.PathVisualizer=PathVisualizer,exports.PeliasGeocoderService=PeliasGeocoderService,exports.PerInstanceColorAppearance=PerInstanceColorAppearance,exports.PerformanceDisplay=PerformanceDisplay,exports.PerformanceWatchdog=PerformanceWatchdog,exports.PerformanceWatchdogViewModel=PerformanceWatchdogViewModel,exports.PerspectiveFrustum=PerspectiveFrustum,exports.PerspectiveOffCenterFrustum=PerspectiveOffCenterFrustum,exports.PickDepth=PickDepth,exports.PickDepthFramebuffer=PickDepthFramebuffer,exports.PickFramebuffer=PickFramebuffer,exports.Picking=Picking,exports.PinBuilder=PinBuilder,exports.PixelDatatype=PixelDatatype$1,exports.PixelFormat=PixelFormat$1,exports.Plane=Plane,exports.PlaneGeometry=PlaneGeometry,exports.PlaneGeometryUpdater=PlaneGeometryUpdater,exports.PlaneGraphics=PlaneGraphics,exports.PlaneOutlineGeometry=PlaneOutlineGeometry,exports.PointCloud=PointCloud,exports.PointCloud3DTileContent=PointCloud3DTileContent,exports.PointCloudEyeDomeLighting=PointCloudEyeDomeLighting,exports.PointCloudShading=PointCloudShading,exports.PointGraphics=PointGraphics,exports.PointPrimitive=PointPrimitive,exports.PointPrimitiveCollection=PointPrimitiveCollection,exports.PointVisualizer=PointVisualizer,exports.PolygonGeometry=PolygonGeometry,exports.PolygonGeometryLibrary=PolygonGeometryLibrary,exports.PolygonGeometryUpdater=PolygonGeometryUpdater,exports.PolygonGraphics=PolygonGraphics,exports.PolygonHierarchy=PolygonHierarchy,exports.PolygonOutlineGeometry=PolygonOutlineGeometry,exports.PolygonPipeline=PolygonPipeline,exports.Polyline=Polyline,exports.PolylineArrowMaterialProperty=PolylineArrowMaterialProperty,exports.PolylineCollection=PolylineCollection,exports.PolylineColorAppearance=PolylineColorAppearance,exports.PolylineDashMaterialProperty=PolylineDashMaterialProperty,exports.PolylineGeometry=PolylineGeometry,exports.PolylineGeometryUpdater=PolylineGeometryUpdater,exports.PolylineGlowMaterialProperty=PolylineGlowMaterialProperty,exports.PolylineGraphics=PolylineGraphics,exports.PolylineMaterialAppearance=PolylineMaterialAppearance,exports.PolylineOutlineMaterialProperty=PolylineOutlineMaterialProperty,exports.PolylinePipeline=PolylinePipeline,exports.PolylineVisualizer=PolylineVisualizer,exports.PolylineVolumeGeometry=PolylineVolumeGeometry,exports.PolylineVolumeGeometryLibrary=PolylineVolumeGeometryLibrary,exports.PolylineVolumeGeometryUpdater=PolylineVolumeGeometryUpdater,exports.PolylineVolumeGraphics=PolylineVolumeGraphics,exports.PolylineVolumeOutlineGeometry=PolylineVolumeOutlineGeometry,exports.PositionProperty=PositionProperty,exports.PositionPropertyArray=PositionPropertyArray,exports.PostProcessStage=PostProcessStage,exports.PostProcessStageCollection=PostProcessStageCollection,exports.PostProcessStageComposite=PostProcessStageComposite,exports.PostProcessStageLibrary=PostProcessStageLibrary,exports.PostProcessStageSampleMode=PostProcessStageSampleMode,exports.PostProcessStageTextureCache=PostProcessStageTextureCache,exports.Primitive=Primitive,exports.PrimitiveCollection=PrimitiveCollection,exports.PrimitivePipeline=PrimitivePipeline,exports.PrimitiveState=PrimitiveState$1,exports.PrimitiveType=PrimitiveType$1,exports.ProjectionPicker=ProjectionPicker,exports.ProjectionPickerViewModel=ProjectionPickerViewModel,exports.Property=Property,exports.PropertyArray=PropertyArray,exports.PropertyBag=PropertyBag,exports.ProviderViewModel=ProviderViewModel,exports.Proxy=Proxy,exports.QuadraticRealPolynomial=QuadraticRealPolynomial,exports.QuadtreeOccluders=QuadtreeOccluders,exports.QuadtreePrimitive=QuadtreePrimitive,exports.QuadtreeTile=QuadtreeTile,exports.QuadtreeTileLoadState=QuadtreeTileLoadState$1,exports.QuadtreeTileProvider=QuadtreeTileProvider,exports.QuantizedMeshTerrainData=QuantizedMeshTerrainData,exports.QuarticRealPolynomial=QuarticRealPolynomial,exports.Quaternion=Quaternion,exports.QuaternionSpline=QuaternionSpline,exports.Queue=Queue,exports.Ray=Ray,exports.Rectangle=Rectangle,exports.RectangleCollisionChecker=RectangleCollisionChecker,exports.RectangleGeometry=RectangleGeometry,exports.RectangleGeometryLibrary=RectangleGeometryLibrary,exports.RectangleGeometryUpdater=RectangleGeometryUpdater,exports.RectangleGraphics=RectangleGraphics,exports.RectangleOutlineGeometry=RectangleOutlineGeometry,exports.ReferenceFrame=ReferenceFrame$1,exports.ReferenceProperty=ReferenceProperty,exports.RenderState=RenderState,exports.Renderbuffer=Renderbuffer,exports.RenderbufferFormat=RenderbufferFormat$1,exports.Request=Request,exports.RequestErrorEvent=RequestErrorEvent,exports.RequestScheduler=RequestScheduler,exports.RequestState=RequestState$1,exports.RequestType=RequestType$1,exports.Resource=Resource,exports.Rotation=Rotation,exports.RuntimeError=RuntimeError,exports.SDFSettings=SDFSettings$1,exports.SampledPositionProperty=SampledPositionProperty,exports.SampledProperty=SampledProperty,exports.Sampler=Sampler,exports.ScaledPositionProperty=ScaledPositionProperty,exports.Scene=Scene,exports.SceneFramebuffer=SceneFramebuffer,exports.SceneMode=SceneMode$1,exports.SceneModePicker=SceneModePicker,exports.SceneModePickerViewModel=SceneModePickerViewModel,exports.SceneTransforms=SceneTransforms,exports.SceneTransitioner=SceneTransitioner,exports.ScreenSpaceCameraController=ScreenSpaceCameraController,exports.ScreenSpaceEventHandler=ScreenSpaceEventHandler,exports.ScreenSpaceEventType=ScreenSpaceEventType$1,exports.SelectionIndicator=SelectionIndicator,exports.SelectionIndicatorViewModel=SelectionIndicatorViewModel,exports.ShaderCache=ShaderCache,exports.ShaderProgram=ShaderProgram,exports.ShaderSource=ShaderSource,exports.ShadowMap=ShadowMap,exports.ShadowMapShader=ShadowMapShader,exports.ShadowMode=ShadowMode$1,exports.ShadowVolumeAppearance=ShadowVolumeAppearance,exports.ShowGeometryInstanceAttribute=ShowGeometryInstanceAttribute,exports.Simon1994PlanetaryPositions=Simon1994PlanetaryPositions,exports.SimplePolylineGeometry=SimplePolylineGeometry,exports.SingleTileImageryProvider=SingleTileImageryProvider,exports.SkyAtmosphere=SkyAtmosphere,exports.SkyBox=SkyBox,exports.SphereEmitter=SphereEmitter,exports.SphereGeometry=SphereGeometry,exports.SphereOutlineGeometry=SphereOutlineGeometry,exports.Spherical=Spherical,exports.Spline=Spline,exports.StaticGeometryColorBatch=StaticGeometryColorBatch,exports.StaticGeometryPerMaterialBatch=StaticGeometryPerMaterialBatch,exports.StaticGroundGeometryColorBatch=StaticGroundGeometryColorBatch,exports.StaticGroundGeometryPerMaterialBatch=StaticGroundGeometryPerMaterialBatch,exports.StaticGroundPolylinePerMaterialBatch=StaticGroundPolylinePerMaterialBatch,exports.StaticOutlineGeometryBatch=StaticOutlineGeometryBatch,exports.StencilConstants=StencilConstants$1,exports.StencilFunction=StencilFunction$1,exports.StencilOperation=StencilOperation$1,exports.StripeMaterialProperty=StripeMaterialProperty,exports.StripeOrientation=StripeOrientation$1,exports.StyleExpression=StyleExpression,exports.Sun=Sun,exports.SunLight=SunLight,exports.SunPostProcess=SunPostProcess,exports.SvgPathBindingHandler=SvgPathBindingHandler,exports.TaskProcessor=TaskProcessor,exports.TerrainData=TerrainData,exports.TerrainEncoding=TerrainEncoding,exports.TerrainFillMesh=TerrainFillMesh,exports.TerrainMesh=TerrainMesh,exports.TerrainOffsetProperty=TerrainOffsetProperty,exports.TerrainProvider=TerrainProvider,exports.TerrainQuantization=TerrainQuantization$1,exports.TerrainState=TerrainState$2,exports.Texture=Texture,exports.TextureAtlas=TextureAtlas,exports.TextureCache=TextureCache,exports.TextureMagnificationFilter=TextureMagnificationFilter$1,exports.TextureMinificationFilter=TextureMinificationFilter$1,exports.TextureWrap=TextureWrap$1,exports.TileAvailability=TileAvailability,exports.TileBoundingRegion=TileBoundingRegion,exports.TileBoundingSphere=TileBoundingSphere,exports.TileBoundingVolume=TileBoundingVolume,exports.TileCoordinatesImageryProvider=TileCoordinatesImageryProvider,exports.TileDiscardPolicy=TileDiscardPolicy,exports.TileEdge=TileEdge,exports.TileImagery=TileImagery,exports.TileMapServiceImageryProvider=TileMapServiceImageryProvider,exports.TileOrientedBoundingBox=TileOrientedBoundingBox,exports.TileProviderError=TileProviderError,exports.TileReplacementQueue=TileReplacementQueue,exports.TileSelectionResult=TileSelectionResult,exports.TileState=TileState$1,exports.Tileset3DTileContent=Tileset3DTileContent,exports.TilingScheme=TilingScheme,exports.TimeConstants=TimeConstants$1,exports.TimeDynamicImagery=TimeDynamicImagery,exports.TimeDynamicPointCloud=TimeDynamicPointCloud,exports.TimeInterval=TimeInterval,exports.TimeIntervalCollection=TimeIntervalCollection,exports.TimeIntervalCollectionPositionProperty=TimeIntervalCollectionPositionProperty,exports.TimeIntervalCollectionProperty=TimeIntervalCollectionProperty,exports.TimeStandard=TimeStandard$1,exports.Timeline=Timeline,exports.TimelineHighlightRange=TimelineHighlightRange,exports.TimelineTrack=TimelineTrack,exports.Tipsify=Tipsify,exports.ToggleButtonViewModel=ToggleButtonViewModel,exports.Tonemapper=Tonemapper$1,exports.Transforms=Transforms,exports.TranslationRotationScale=TranslationRotationScale,exports.TridiagonalSystemSolver=TridiagonalSystemSolver,exports.TrustedServers=TrustedServers,exports.Tween=TWEEN,exports.TweenCollection=TweenCollection,exports.UniformState=UniformState,exports.Uri=URI,exports.UrlTemplateImageryProvider=UrlTemplateImageryProvider,exports.VERSION=VERSION,exports.VRButton=VRButton,exports.VRButtonViewModel=VRButtonViewModel,exports.VRTheWorldTerrainProvider=VRTheWorldTerrainProvider,exports.Vector3DTileBatch=Vector3DTileBatch,exports.Vector3DTileContent=Vector3DTileContent,exports.Vector3DTileGeometry=Vector3DTileGeometry,exports.Vector3DTilePoints=Vector3DTilePoints,exports.Vector3DTilePolygons=Vector3DTilePolygons,exports.Vector3DTilePolylines=Vector3DTilePolylines,exports.Vector3DTilePrimitive=Vector3DTilePrimitive,exports.VelocityOrientationProperty=VelocityOrientationProperty,exports.VelocityVectorProperty=VelocityVectorProperty,exports.VertexArray=VertexArray,exports.VertexArrayFacade=VertexArrayFacade,exports.VertexFormat=VertexFormat,exports.VerticalOrigin=VerticalOrigin$1,exports.VideoSynchronizer=VideoSynchronizer,exports.View=View,exports.Viewer=Viewer,exports.ViewportQuad=ViewportQuad,exports.Visibility=Visibility$1,exports.Visualizer=Visualizer,exports.WallGeometry=WallGeometry,exports.WallGeometryLibrary=WallGeometryLibrary,exports.WallGeometryUpdater=WallGeometryUpdater,exports.WallGraphics=WallGraphics,exports.WallOutlineGeometry=WallOutlineGeometry,exports.WebGLConstants=WebGLConstants$1,exports.WebMapServiceImageryProvider=WebMapServiceImageryProvider,exports.WebMapTileServiceImageryProvider=WebMapTileServiceImageryProvider,exports.WebMercatorProjection=WebMercatorProjection,exports.WebMercatorTilingScheme=WebMercatorTilingScheme,exports.WeightSpline=WeightSpline,exports.WindingOrder=WindingOrder$1,exports._shadersAcesTonemappingStage=AcesTonemapping,exports._shadersAdditiveBlend=AdditiveBlend,exports._shadersAdjustTranslucentFS=AdjustTranslucentFS,exports._shadersAllMaterialAppearanceFS=AllMaterialAppearanceFS,exports._shadersAllMaterialAppearanceVS=AllMaterialAppearanceVS,exports._shadersAmbientOcclusionGenerate=AmbientOcclusionGenerate,exports._shadersAmbientOcclusionModulate=AmbientOcclusionModulate,exports._shadersAspectRampMaterial=AspectRampMaterial,exports._shadersBasicMaterialAppearanceFS=BasicMaterialAppearanceFS,exports._shadersBasicMaterialAppearanceVS=BasicMaterialAppearanceVS,exports._shadersBillboardCollectionFS=BillboardCollectionFS,exports._shadersBillboardCollectionVS=BillboardCollectionVS,exports._shadersBlackAndWhite=BlackAndWhite,exports._shadersBloomComposite=BloomComposite,exports._shadersBrdfLutGeneratorFS=BrdfLutGeneratorFS,exports._shadersBrightPass=BrightPass,exports._shadersBrightness=Brightness,exports._shadersBumpMapMaterial=BumpMapMaterial,exports._shadersCheckerboardMaterial=CheckerboardMaterial,exports._shadersCompositeOITFS=CompositeOITFS,exports._shadersContrastBias=ContrastBias,exports._shadersCzmBuiltins=CzmBuiltins,exports._shadersDepthOfField=DepthOfField,exports._shadersDepthPlaneFS=DepthPlaneFS,exports._shadersDepthPlaneVS=DepthPlaneVS,exports._shadersDepthView=DepthView,exports._shadersDepthViewPacked=DepthViewPacked,exports._shadersDotMaterial=DotMaterial,exports._shadersEdgeDetection=EdgeDetection,exports._shadersElevationContourMaterial=ElevationContourMaterial,exports._shadersElevationRampMaterial=ElevationRampMaterial,exports._shadersEllipsoidFS=EllipsoidFS,exports._shadersEllipsoidSurfaceAppearanceFS=EllipsoidSurfaceAppearanceFS,exports._shadersEllipsoidSurfaceAppearanceVS=EllipsoidSurfaceAppearanceVS,exports._shadersEllipsoidVS=EllipsoidVS,exports._shadersFXAA=FXAA,exports._shadersFadeMaterial=FadeMaterial,exports._shadersFilmicTonemapping=FilmicTonemapping,exports._shadersGaussianBlur1D=GaussianBlur1D,exports._shadersGlobeFS=GlobeFS,exports._shadersGlobeVS=GlobeVS,exports._shadersGridMaterial=GridMaterial,exports._shadersGroundAtmosphere=GroundAtmosphere,exports._shadersHSBToRGB=czm_HSBToRGB,exports._shadersHSLToRGB=czm_HSLToRGB,exports._shadersLensFlare=LensFlare,exports._shadersModifiedReinhardTonemapping=ModifiedReinhardTonemapping,exports._shadersNightVision=NightVision,exports._shadersNormalMapMaterial=NormalMapMaterial,exports._shadersOctahedralProjectionAtlasFS=OctahedralProjectionAtlasFS,exports._shadersOctahedralProjectionFS=OctahedralProjectionFS,exports._shadersOctahedralProjectionVS=OctahedralProjectionVS,exports._shadersPassThrough=PassThrough,exports._shadersPassThroughDepth=PassThroughDepth,exports._shadersPerInstanceColorAppearanceFS=PerInstanceColorAppearanceFS,exports._shadersPerInstanceColorAppearanceVS=PerInstanceColorAppearanceVS,exports._shadersPerInstanceFlatColorAppearanceFS=PerInstanceFlatColorAppearanceFS,exports._shadersPerInstanceFlatColorAppearanceVS=PerInstanceFlatColorAppearanceVS,exports._shadersPointCloudEyeDomeLighting=PointCloudEyeDomeLightingShader,exports._shadersPointPrimitiveCollectionFS=PointPrimitiveCollectionFS,exports._shadersPointPrimitiveCollectionVS=PointPrimitiveCollectionVS,exports._shadersPolylineArrowMaterial=PolylineArrowMaterial,exports._shadersPolylineColorAppearanceVS=PolylineColorAppearanceVS,exports._shadersPolylineCommon=PolylineCommon,exports._shadersPolylineDashMaterial=PolylineDashMaterial,exports._shadersPolylineFS=PolylineFS,exports._shadersPolylineGlowMaterial=PolylineGlowMaterial,exports._shadersPolylineMaterialAppearanceVS=PolylineMaterialAppearanceVS,exports._shadersPolylineOutlineMaterial=PolylineOutlineMaterial,exports._shadersPolylineShadowVolumeFS=PolylineShadowVolumeFS,exports._shadersPolylineShadowVolumeMorphFS=PolylineShadowVolumeMorphFS,exports._shadersPolylineShadowVolumeMorphVS=PolylineShadowVolumeMorphVS,exports._shadersPolylineShadowVolumeVS=PolylineShadowVolumeVS,exports._shadersPolylineVS=PolylineVS,exports._shadersRGBToHSB=czm_RGBToHSB,exports._shadersRGBToHSL=czm_RGBToHSL,exports._shadersRGBToXYZ=czm_RGBToXYZ,exports._shadersReinhardTonemapping=ReinhardTonemapping,exports._shadersReprojectWebMercatorFS=ReprojectWebMercatorFS,exports._shadersReprojectWebMercatorVS=ReprojectWebMercatorVS,exports._shadersRimLightingMaterial=RimLightingMaterial,exports._shadersShadowVolumeAppearanceFS=ShadowVolumeAppearanceFS,exports._shadersShadowVolumeAppearanceVS=ShadowVolumeAppearanceVS,exports._shadersShadowVolumeFS=ShadowVolumeFS,exports._shadersSilhouette=Silhouette,exports._shadersSkyAtmosphereCommon=SkyAtmosphereCommon,exports._shadersSkyAtmosphereFS=SkyAtmosphereFS,exports._shadersSkyAtmosphereVS=SkyAtmosphereVS,exports._shadersSkyBoxFS=SkyBoxFS,exports._shadersSkyBoxVS=SkyBoxVS,exports._shadersSlopeRampMaterial=SlopeRampMaterial,exports._shadersStripeMaterial=StripeMaterial,exports._shadersSunFS=SunFS,exports._shadersSunTextureFS=SunTextureFS,exports._shadersSunVS=SunVS,exports._shadersTexturedMaterialAppearanceFS=TexturedMaterialAppearanceFS,exports._shadersTexturedMaterialAppearanceVS=TexturedMaterialAppearanceVS,exports._shadersVector3DTilePolylinesVS=Vector3DTilePolylinesVS,exports._shadersVectorTileVS=VectorTileVS,exports._shadersViewportQuadFS=ViewportQuadFS,exports._shadersViewportQuadVS=ViewportQuadVS,exports._shadersWater=WaterMaterial,exports._shadersXYZToRGB=czm_XYZToRGB,exports._shadersacesTonemapping=czm_acesTonemapping,exports._shadersalphaWeight=czm_alphaWeight,exports._shadersantialias=czm_antialias,exports._shadersapproximateSphericalCoordinates=czm_approximateSphericalCoordinates,exports._shadersbackFacing=czm_backFacing,exports._shadersbranchFreeTernary=czm_branchFreeTernary,exports._shaderscascadeColor=czm_cascadeColor,exports._shaderscascadeDistance=czm_cascadeDistance,exports._shaderscascadeMatrix=czm_cascadeMatrix,exports._shaderscascadeWeights=czm_cascadeWeights,exports._shaderscolumbusViewMorph=czm_columbusViewMorph,exports._shaderscomputePosition=czm_computePosition,exports._shaderscosineAndSine=czm_cosineAndSine,exports._shadersdecompressTextureCoordinates=czm_decompressTextureCoordinates,exports._shadersdegreesPerRadian=czm_degreesPerRadian,exports._shadersdepthClamp=czm_depthClamp,exports._shadersdepthRange=czm_depthRange,exports._shadersdepthRangeStruct=czm_depthRangeStruct,exports._shaderseastNorthUpToEyeCoordinates=czm_eastNorthUpToEyeCoordinates,exports._shadersellipsoidContainsPoint=czm_ellipsoidContainsPoint,exports._shadersellipsoidWgs84TextureCoordinates=czm_ellipsoidWgs84TextureCoordinates,exports._shadersepsilon1=czm_epsilon1,exports._shadersepsilon2=czm_epsilon2,exports._shadersepsilon3=czm_epsilon3,exports._shadersepsilon4=czm_epsilon4,exports._shadersepsilon5=czm_epsilon5,exports._shadersepsilon6=czm_epsilon6,exports._shadersepsilon7=czm_epsilon7,exports._shadersequalsEpsilon=czm_equalsEpsilon,exports._shaderseyeOffset=czm_eyeOffset,exports._shaderseyeToWindowCoordinates=czm_eyeToWindowCoordinates,exports._shadersfastApproximateAtan=czm_fastApproximateAtan,exports._shadersfog=czm_fog,exports._shadersgammaCorrect=czm_gammaCorrect,exports._shadersgeodeticSurfaceNormal=czm_geodeticSurfaceNormal,exports._shadersgetDefaultMaterial=czm_getDefaultMaterial,exports._shadersgetLambertDiffuse=czm_getLambertDiffuse,exports._shadersgetSpecular=czm_getSpecular,exports._shadersgetWaterNoise=czm_getWaterNoise,exports._shadershue=czm_hue,exports._shadersinfinity=czm_infinity,exports._shadersinverseGamma=czm_inverseGamma,exports._shadersisEmpty=czm_isEmpty,exports._shadersisFull=czm_isFull,exports._shaderslatitudeToWebMercatorFraction=czm_latitudeToWebMercatorFraction,exports._shaderslineDistance=czm_lineDistance,exports._shadersluminance=czm_luminance,exports._shadersmaterial=czm_material,exports._shadersmaterialInput=czm_materialInput,exports._shadersmetersPerPixel=czm_metersPerPixel,exports._shadersmodelToWindowCoordinates=czm_modelToWindowCoordinates,exports._shadersmultiplyWithColorBalance=czm_multiplyWithColorBalance,exports._shadersnearFarScalar=czm_nearFarScalar,exports._shadersoctDecode=czm_octDecode,exports._shadersoneOverPi=czm_oneOverPi,exports._shadersoneOverTwoPi=czm_oneOverTwoPi,exports._shaderspackDepth=czm_packDepth,exports._shaderspassCesium3DTile=czm_passCesium3DTile,exports._shaderspassCesium3DTileClassification=czm_passCesium3DTileClassification,exports._shaderspassCesium3DTileClassificationIgnoreShow=czm_passCesium3DTileClassificationIgnoreShow,exports._shaderspassClassification=czm_passClassification,exports._shaderspassCompute=czm_passCompute,exports._shaderspassEnvironment=czm_passEnvironment,exports._shaderspassGlobe=czm_passGlobe,exports._shaderspassOpaque=czm_passOpaque,exports._shaderspassOverlay=czm_passOverlay,exports._shaderspassTerrainClassification=czm_passTerrainClassification,exports._shaderspassTranslucent=czm_passTranslucent,exports._shadersphong=czm_phong,exports._shaderspi=czm_pi,exports._shaderspiOverFour=czm_piOverFour,exports._shaderspiOverSix=czm_piOverSix,exports._shaderspiOverThree=czm_piOverThree,exports._shaderspiOverTwo=czm_piOverTwo,exports._shadersplaneDistance=czm_planeDistance,exports._shaderspointAlongRay=czm_pointAlongRay,exports._shadersradiansPerDegree=czm_radiansPerDegree,exports._shadersray=czm_ray,exports._shadersrayEllipsoidIntersectionInterval=czm_rayEllipsoidIntersectionInterval,exports._shadersraySegment=czm_raySegment,exports._shadersreadDepth=czm_readDepth,exports._shadersreadNonPerspective=czm_readNonPerspective,exports._shadersreverseLogDepth=czm_reverseLogDepth,exports._shaderssampleOctahedralProjection=czm_sampleOctahedralProjection,exports._shaderssaturation=czm_saturation;exports._shaderssceneMode2D=czm_sceneMode2D,exports._shaderssceneMode3D=czm_sceneMode3D,exports._shaderssceneModeColumbusView=czm_sceneModeColumbusView,exports._shaderssceneModeMorphing=czm_sceneModeMorphing,exports._shadersshadowDepthCompare=czm_shadowDepthCompare,exports._shadersshadowParameters=czm_shadowParameters,exports._shadersshadowVisibility=czm_shadowVisibility,exports._shaderssignNotZero=czm_signNotZero,exports._shaderssolarRadius=czm_solarRadius,exports._shaderssphericalHarmonics=czm_sphericalHarmonics,exports._shaderstangentToEyeSpaceMatrix=czm_tangentToEyeSpaceMatrix,exports._shadersthreePiOver2=czm_threePiOver2,exports._shaderstransformPlane=czm_transformPlane,exports._shaderstranslateRelativeToEye=czm_translateRelativeToEye,exports._shaderstranslucentPhong=czm_translucentPhong,exports._shaderstranspose=czm_transpose,exports._shaderstwoPi=czm_twoPi,exports._shadersunpackDepth=czm_unpackDepth,exports._shadersunpackFloat=czm_unpackFloat,exports._shadersvertexLogDepth=czm_vertexLogDepth,exports._shaderswebMercatorMaxLatitude=czm_webMercatorMaxLatitude,exports._shaderswindowToEyeCoordinates=czm_windowToEyeCoordinates,exports._shaderswriteDepthClamp=czm_writeDepthClamp,exports._shaderswriteLogDepth=czm_writeLogDepth,exports._shaderswriteNonPerspective=czm_writeNonPerspective,exports.addBuffer=addBuffer,exports.addDefaults=addDefaults,exports.addExtensionsRequired=addExtensionsRequired,exports.addExtensionsUsed=addExtensionsUsed,exports.addPipelineExtras=addPipelineExtras,exports.addToArray=addToArray,exports.appendForwardSlash=appendForwardSlash,exports.arrayFill=arrayFill,exports.arrayRemoveDuplicates=arrayRemoveDuplicates,exports.arraySlice=arraySlice,exports.barycentricCoordinates=barycentricCoordinates,exports.binarySearch=binarySearch,exports.bitmap_sdf=calcSDF,exports.buildModuleUrl=buildModuleUrl,exports.cancelAnimationFrame=cancelAnimationFramePolyfill,exports.clone=clone,exports.combine=combine,exports.computeFlyToLocationForRectangle=computeFlyToLocationForRectangle,exports.createBillboardPointCallback=createBillboardPointCallback,exports.createCommand=createCommand$2,exports.createDefaultImageryProviderViewModels=createDefaultImageryProviderViewModels,exports.createDefaultTerrainProviderViewModels=createDefaultTerrainProviderViewModels,exports.createGuid=createGuid,exports.createMaterialPropertyDescriptor=createMaterialPropertyDescriptor,exports.createOsmBuildings=createOsmBuildings,exports.createPropertyDescriptor=createPropertyDescriptor,exports.createRawPropertyDescriptor=createRawPropertyDescriptor,exports.createTangentSpaceDebugPrimitive=createTangentSpaceDebugPrimitive,exports.createTaskProcessorWorker=createTaskProcessorWorker,exports.createUniform=createUniform$1,exports.createUniformArray=createUniformArray,exports.createWorldImagery=createWorldImagery,exports.createWorldTerrain=createWorldTerrain,exports.decodeGoogleEarthEnterpriseData=decodeGoogleEarthEnterpriseData,exports.defaultValue=defaultValue,exports.defined=defined,exports.deprecationWarning=deprecationWarning,exports.destroyObject=destroyObject,exports.earcut_2_2_1=earcut,exports.exportKml=exportKml,exports.findAccessorMinMax=findAccessorMinMax,exports.formatError=formatError,exports.freezeRenderState=freezeRenderState,exports.getAbsoluteUri=getAbsoluteUri,exports.getAccessorByteStride=getAccessorByteStride,exports.getBaseUri=getBaseUri,exports.getBinaryAccessor=getBinaryAccessor,exports.getClipAndStyleCode=getClipAndStyleCode,exports.getClippingFunction=getClippingFunction,exports.getComponentReader=getComponentReader,exports.getElement=getElement,exports.getExtensionFromUri=getExtensionFromUri,exports.getFilenameFromUri=getFilenameFromUri,exports.getImagePixels=getImagePixels,exports.getMagic=getMagic,exports.getStringFromTypedArray=getStringFromTypedArray,exports.getTimestamp=getTimestamp$1,exports.graphemesplitter=GraphemeSplitter,exports.hasExtension=hasExtension,exports.heightReferenceOnEntityPropertyChanged=heightReferenceOnEntityPropertyChanged,exports.isBitSet=isBitSet,exports.isBlobUri=isBlobUri,exports.isCrossOriginUrl=isCrossOriginUrl,exports.isDataUri=isDataUri,exports.isLeapYear=isLeapYear,exports.jsep=jsep,exports.kdbush=kdbush,exports.knockout=knockout,exports.knockout_3_5_1=knockout,exports.knockout_es5=knockout_es5,exports.loadAndExecuteScript=loadAndExecuteScript,exports.loadCRN=loadCRN,exports.loadCubeMap=loadCubeMap,exports.loadImageFromTypedArray=loadImageFromTypedArray,exports.loadKTX=loadKTX,exports.measureText=measureText,exports.mergeSort=mergeSort,exports.mersenne_twister=MersenneTwister,exports.modernizeShader=modernizeShader,exports.moveTechniqueRenderStates=moveTechniqueRenderStates,exports.moveTechniquesToExtension=moveTechniquesToExtension,exports.numberOfComponentsForType=numberOfComponentsForType,exports.objectToQuery=objectToQuery,exports.oneTimeWarning=oneTimeWarning,exports.parseGlb=parseGlb,exports.parseResponseHeaders=parseResponseHeaders,exports.pointInsideTriangle=pointInsideTriangle,exports.processModelMaterialsCommon=processModelMaterialsCommon,exports.processPbrMaterials=processPbrMaterials,exports.protobuf_minimal=protobuf,exports.purify=purify,exports.queryToObject=queryToObject,exports.quickselect=quickselect$1,exports.rbush=RBush,exports.readAccessorPacked=readAccessorPacked,exports.removeExtensionsRequired=removeExtensionsRequired,exports.removeExtensionsUsed=removeExtensionsUsed,exports.removePipelineExtras=removePipelineExtras,exports.removeUnusedElements=removeUnusedElements,exports.requestAnimationFrame=requestAnimationFramePolyFill,exports.sampleTerrain=sampleTerrain,exports.sampleTerrainMostDetailed=sampleTerrainMostDetailed,exports.scaleToGeodeticSurface=scaleToGeodeticSurface,exports.sprintf=sprintf,exports.subdivideArray=subdivideArray,exports.subscribeAndEvaluate=subscribeAndEvaluate,exports.topojson=topojson,exports.updateAccessorComponentTypes=updateAccessorComponentTypes,exports.updateVersion=updateVersion,exports.viewerCesium3DTilesInspectorMixin=viewerCesium3DTilesInspectorMixin,exports.viewerCesiumInspectorMixin=viewerCesiumInspectorMixin,exports.viewerDragDropMixin=viewerDragDropMixin,exports.viewerPerformanceWatchdogMixin=viewerPerformanceWatchdogMixin,exports.webGLConstantToGlslType=webGLConstantToGlslType,exports.when=when,exports.wrapFunction=wrapFunction,exports.writeTextToCanvas=writeTextToCanvas,exports.zip=zip,Object.defineProperty(exports,"__esModule",{value:!0})}))}).call(this,__webpack_require__(22).Buffer,__webpack_require__(16))},function(e,t,i){"use strict";t.byteLength=function(e){var t=c(e),i=t[0],r=t[1];return 3*(i+r)/4-r},t.toByteArray=function(e){var t,i,r=c(e),o=r[0],s=r[1],l=new a(function(e,t,i){return 3*(t+i)/4-i}(0,o,s)),u=0,d=s>0?o-4:o;for(i=0;i<d;i+=4)t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,l[u++]=255&t);1===s&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],o=0,s=i-n;o<s;o+=16383)a.push(u(e,o,o+16383>s?s:o+16383));1===n?(t=e[i-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s<l;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function u(e,t,i){for(var n,a,o=[],s=t;s<i;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=n)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,i,r,n){var a,o,s=8*n-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=i?n-1:0,h=i?-1:1,p=e[t+d];for(d+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=c}return(p?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,i,r,n,a){var o,s,l,c=8*a-n-1,u=(1<<c)-1,d=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,n),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;e[i+p]=255&s,p+=f,s/=256,n-=8);for(o=o<<n|s,c+=n;c>0;e[i+p]=255&o,p+=f,o/=256,c-=8);e[i+p-f]|=128*m}},function(e,t,i){(function(e,r){var n;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r&&r;o.global!==o&&o.window!==o&&o.self;var s,l=2147483647,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(e){throw new RangeError(h[e])}function g(e,t){for(var i=e.length,r=[];i--;)r[i]=t(e[i]);return r}function y(e,t){var i=e.split("@"),r="";return i.length>1&&(r=i[0]+"@",e=i[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function _(e){for(var t,i,r=[],n=0,a=e.length;n<a;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<a?56320==(64512&(i=e.charCodeAt(n++)))?r.push(((1023&t)<<10)+(1023&i)+65536):(r.push(t),n--):r.push(t);return r}function v(e){return g(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=f(e)})).join("")}function C(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,i){var r=0;for(e=i?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function b(e){var t,i,r,n,a,o,s,c,u,d,h,f=[],g=e.length,y=0,_=128,C=72;for((i=e.lastIndexOf("-"))<0&&(i=0),r=0;r<i;++r)e.charCodeAt(r)>=128&&m("not-basic"),f.push(e.charCodeAt(r));for(n=i>0?i+1:0;n<g;){for(a=y,o=1,s=36;n>=g&&m("invalid-input"),((c=(h=e.charCodeAt(n++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>p((l-y)/o))&&m("overflow"),y+=c*o,!(c<(u=s<=C?1:s>=C+26?26:s-C));s+=36)o>p(l/(d=36-u))&&m("overflow"),o*=d;C=x(y-a,t=f.length+1,0==a),p(y/t)>l-_&&m("overflow"),_+=p(y/t),y%=t,f.splice(y++,0,_)}return v(f)}function S(e){var t,i,r,n,a,o,s,c,u,d,h,g,y,v,b,S=[];for(g=(e=_(e)).length,t=128,i=0,a=72,o=0;o<g;++o)(h=e[o])<128&&S.push(f(h));for(r=n=S.length,n&&S.push("-");r<g;){for(s=l,o=0;o<g;++o)(h=e[o])>=t&&h<s&&(s=h);for(s-t>p((l-i)/(y=r+1))&&m("overflow"),i+=(s-t)*y,t=s,o=0;o<g;++o)if((h=e[o])<t&&++i>l&&m("overflow"),h==t){for(c=i,u=36;!(c<(d=u<=a?1:u>=a+26?26:u-a));u+=36)b=c-d,v=36-d,S.push(f(C(d+b%v,0))),c=p(b/v);S.push(f(C(c,0))),a=x(i,y,r==n),i=0,++r}++i,++t}return S.join("")}s={version:"1.4.1",ucs2:{decode:_,encode:v},decode:b,encode:S,toASCII:function(e){return y(e,(function(e){return u.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?b(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,i,t,e))||(e.exports=n)}()}).call(this,i(238)(e),i(16))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,i){"use strict";t.decode=t.parse=i(241),t.encode=t.stringify=i(242)},function(e,t,i){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,i,a){t=t||"&",i=i||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var l=1e3;a&&"number"==typeof a.maxKeys&&(l=a.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,h,p,f,m=e[u].replace(s,"%20"),g=m.indexOf(i);g>=0?(d=m.substr(0,g),h=m.substr(g+1)):(d=m,h=""),p=decodeURIComponent(d),f=decodeURIComponent(h),r(o,p)?n(o[p])?o[p].push(f):o[p]=[o[p],f]:o[p]=f}return o};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,i){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,i,s){return t=t||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?a(o(e),(function(o){var s=encodeURIComponent(r(o))+i;return n(e[o])?a(e[o],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[o]))})).join(t):s?encodeURIComponent(r(s))+i+encodeURIComponent(r(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var i=[],r=0;r<e.length;r++)i.push(t(e[r],r));return i}var o=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t}},function(e,t,i){var r=i(135),n=i(96),a=e.exports;for(var o in r)r.hasOwnProperty(o)&&(a[o]=r[o]);function s(e){if("string"==typeof e&&(e=n.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}a.request=function(e,t){return e=s(e),r.request.call(this,e,t)},a.get=function(e,t){return e=s(e),r.get.call(this,e,t)}},function(e,t,i){(function(t,r,n){var a=i(136),o=i(31),s=i(137),l=i(58),c=i(253),u=s.IncomingMessage,d=s.readyStates;var h=e.exports=function(e){var i,r=this;l.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new t(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!a.abortController)n=!1,i=!0;else if("prefer-streaming"===e.mode)i=!1;else if("allow-wrong-content-type"===e.mode)i=!a.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");i=!0}r._mode=function(e,t){return a.fetch&&t?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":a.vbArray&&e?"text:vbarray":"text"}(i,n),r._fetchTimer=null,r.on("finish",(function(){r._onFinish()}))};o(h,l.Writable),h.prototype.setHeader=function(e,t){var i=e.toLowerCase();-1===p.indexOf(i)&&(this._headers[i]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var i=e._opts,o=e._headers,s=null;"GET"!==i.method&&"HEAD"!==i.method&&(s=a.arraybuffer?c(t.concat(e._body)):a.blobConstructor?new r.Blob(e._body.map((function(e){return c(e)})),{type:(o["content-type"]||{}).value||""}):t.concat(e._body).toString());var l=[];if(Object.keys(o).forEach((function(e){var t=o[e].name,i=o[e].value;Array.isArray(i)?i.forEach((function(e){l.push([t,e])})):l.push([t,i])})),"fetch"===e._mode){var u=null;if(a.abortController){var h=new AbortController;u=h.signal,e._fetchAbortController=h,"requestTimeout"in i&&0!==i.requestTimeout&&(e._fetchTimer=r.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),i.requestTimeout))}r.fetch(e._opts.url,{method:e._opts.method,headers:l,body:s||void 0,mode:"cors",credentials:i.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){r.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var p=e._xhr=new r.XMLHttpRequest;try{p.open(e._opts.method,e._opts.url,!0)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}"responseType"in p&&(p.responseType=e._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!i.withCredentials),"text"===e._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in i&&(p.timeout=i.requestTimeout,p.ontimeout=function(){e.emit("requestTimeout")}),l.forEach((function(e){p.setRequestHeader(e[0],e[1])})),e._response=null,p.onreadystatechange=function(){switch(p.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(p.onprogress=function(){e._onXHRProgress()}),p.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{p.send(s)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}}}},h.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,i){this._body.push(e),i()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,r.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,i){"function"==typeof e&&(i=e,e=void 0),l.Writable.prototype.end.call(this,e,t,i)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,i(22).Buffer,i(16),i(27))},function(e,t){},function(e,t,i){"use strict";var r=i(98).Buffer,n=i(247);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,i,n,a=r.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,i=a,n=s,t.copy(i,n),s+=o.data.length,o=o.next;return a},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,i){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(n.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(n.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i(249),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,i(16))},function(e,t,i){(function(e,t){!function(e,i){"use strict";if(!e.setImmediate){var r,n,a,o,s,l=1,c={},u=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){a.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(n=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&f(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var n={callback:e,args:t};return c[l]=n,r(l),l++},h.clearImmediate=p}function p(e){delete c[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(void 0,i)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,i(16),i(27))},function(e,t,i){(function(t){function i(e){try{if(!t.localStorage)return!1}catch(e){return!1}var i=t.localStorage[e];return null!=i&&"true"===String(i).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,i(16))},function(e,t,i){
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var r=i(22),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function o(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),a(n,o),o.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,i){"use strict";e.exports=a;var r=i(142),n=Object.create(i(59));function a(e){if(!(this instanceof a))return new a(e);r.call(this,e)}n.inherits=i(31),n.inherits(a,r),a.prototype._transform=function(e,t,i){i(null,e)}},function(e,t,i){var r=i(22).Buffer;e.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),i=e.length,n=0;n<i;n++)t[n]=e[n];return t.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)i.call(r,n)&&(e[n]=r[n])}return e};var i=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,i){"use strict";(function(e){var r=i(22).Buffer,n=i(257).Transform,a=i(262),o=i(144),s=i(143).ok,l=i(22).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+l.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var u=Object.keys(a),d=0;d<u.length;d++){var h=u[d];h.match(/^Z/)&&Object.defineProperty(t,h,{enumerable:!0,value:a[h],writable:!1})}for(var p={Z_OK:a.Z_OK,Z_STREAM_END:a.Z_STREAM_END,Z_NEED_DICT:a.Z_NEED_DICT,Z_ERRNO:a.Z_ERRNO,Z_STREAM_ERROR:a.Z_STREAM_ERROR,Z_DATA_ERROR:a.Z_DATA_ERROR,Z_MEM_ERROR:a.Z_MEM_ERROR,Z_BUF_ERROR:a.Z_BUF_ERROR,Z_VERSION_ERROR:a.Z_VERSION_ERROR},f=Object.keys(p),m=0;m<f.length;m++){var g=f[m];p[p[g]]=g}function y(e,t,i){var n=[],a=0;function o(){for(var t;null!==(t=e.read());)n.push(t),a+=t.length;e.once("readable",o)}function s(){var t,o=null;a>=l?o=new RangeError(c):t=r.concat(n,a),n=[],e.close(),i(o,t)}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",o),i(t)})),e.on("end",s),e.end(t),o()}function _(e,t){if("string"==typeof t&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Not a string or buffer");var i=e._finishFlushFlag;return e._processChunk(t,i)}function v(e){if(!(this instanceof v))return new v(e);A.call(this,e,a.DEFLATE)}function C(e){if(!(this instanceof C))return new C(e);A.call(this,e,a.INFLATE)}function x(e){if(!(this instanceof x))return new x(e);A.call(this,e,a.GZIP)}function b(e){if(!(this instanceof b))return new b(e);A.call(this,e,a.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);A.call(this,e,a.DEFLATERAW)}function T(e){if(!(this instanceof T))return new T(e);A.call(this,e,a.INFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);A.call(this,e,a.UNZIP)}function w(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function A(e,i){var o=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,n.call(this,e),e.flush&&!w(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!w(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!r.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(i);var s=this;this._hadError=!1,this._handle.onerror=function(e,i){P(s),s._hadError=!0;var r=new Error(e);r.errno=i,r.code=t.codes[i],s.emit("error",r)};var l=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(l=e.level);var c=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(c=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,l,e.memLevel||t.Z_DEFAULT_MEMLEVEL,c,e.dictionary),this._buffer=r.allocUnsafe(this._chunkSize),this._offset=0,this._level=l,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function P(t,i){i&&e.nextTick(i),t._handle&&(t._handle.close(),t._handle=null)}function D(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=v,t.Inflate=C,t.Gzip=x,t.Gunzip=b,t.DeflateRaw=S,t.InflateRaw=T,t.Unzip=E,t.createDeflate=function(e){return new v(e)},t.createInflate=function(e){return new C(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new T(e)},t.createGzip=function(e){return new x(e)},t.createGunzip=function(e){return new b(e)},t.createUnzip=function(e){return new E(e)},t.deflate=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new v(t),e,i)},t.deflateSync=function(e,t){return _(new v(t),e)},t.gzip=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new x(t),e,i)},t.gzipSync=function(e,t){return _(new x(t),e)},t.deflateRaw=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new S(t),e,i)},t.deflateRawSync=function(e,t){return _(new S(t),e)},t.unzip=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new E(t),e,i)},t.unzipSync=function(e,t){return _(new E(t),e)},t.inflate=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new C(t),e,i)},t.inflateSync=function(e,t){return _(new C(t),e)},t.gunzip=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new b(t),e,i)},t.gunzipSync=function(e,t){return _(new b(t),e)},t.inflateRaw=function(e,t,i){return"function"==typeof t&&(i=t,t={}),y(new T(t),e,i)},t.inflateRawSync=function(e,t){return _(new T(t),e)},o.inherits(A,n),A.prototype.params=function(i,r,n){if(i<t.Z_MIN_LEVEL||i>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+i);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==i||this._strategy!==r){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){s(o._handle,"zlib binding closed"),o._handle.params(i,r),o._hadError||(o._level=i,o._strategy=r,n&&n())}))}else e.nextTick(n)},A.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(e){this._transform(r.alloc(0),"",e)},A.prototype.flush=function(t,i){var n=this,o=this._writableState;("function"==typeof t||void 0===t&&!i)&&(i=t,t=a.Z_FULL_FLUSH),o.ended?i&&e.nextTick(i):o.ending?i&&this.once("end",i):o.needDrain?i&&this.once("drain",(function(){return n.flush(t,i)})):(this._flushFlag=t,this.write(r.alloc(0),"",i))},A.prototype.close=function(t){P(this,t),e.nextTick(D,this)},A.prototype._transform=function(e,t,i){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||r.isBuffer(e)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,n,i)):i(new Error("zlib binding closed")):i(new Error("invalid input"))},A.prototype._processChunk=function(e,t,i){var n=e&&e.length,a=this._chunkSize-this._offset,o=0,u=this,d="function"==typeof i;if(!d){var h,p=[],f=0;this.on("error",(function(e){h=e})),s(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(t,e,o,n,this._buffer,this._offset,a)}while(!this._hadError&&_(m[0],m[1]));if(this._hadError)throw h;if(f>=l)throw P(this),new RangeError(c);var g=r.concat(p,f);return P(this),g}s(this._handle,"zlib binding closed");var y=this._handle.write(t,e,o,n,this._buffer,this._offset,a);function _(l,c){if(this&&(this.buffer=null,this.callback=null),!u._hadError){var h=a-c;if(s(h>=0,"have should not go down"),h>0){var m=u._buffer.slice(u._offset,u._offset+h);u._offset+=h,d?u.push(m):(p.push(m),f+=m.length)}if((0===c||u._offset>=u._chunkSize)&&(a=u._chunkSize,u._offset=0,u._buffer=r.allocUnsafe(u._chunkSize)),0===c){if(o+=n-l,n=l,!d)return!0;var g=u._handle.write(t,e,o,n,u._buffer,u._offset,u._chunkSize);return g.callback=_,void(g.buffer=e)}if(!d)return!1;i()}}y.buffer=e,y.callback=_},o.inherits(v,A),o.inherits(C,A),o.inherits(x,A),o.inherits(b,A),o.inherits(S,A),o.inherits(T,A),o.inherits(E,A)}).call(this,i(27))},function(e,t,i){e.exports=n;var r=i(97).EventEmitter;function n(){r.call(this)}i(31)(n,r),n.Readable=i(58),n.Writable=i(258),n.Duplex=i(259),n.Transform=i(260),n.PassThrough=i(261),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",s),i.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",s),i.removeListener("close",l),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",c),e.on("error",c),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}},function(e,t,i){e.exports=i(99)},function(e,t,i){e.exports=i(38)},function(e,t,i){e.exports=i(58).Transform},function(e,t,i){e.exports=i(58).PassThrough},function(e,t,i){"use strict";(function(e,r){var n=i(143),a=i(266),o=i(267),s=i(270),l=i(273);for(var c in l)t[c]=l[c];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function u(e){if("number"!=typeof e||e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||s.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},u.prototype.write=function(e,t,i,r,n,a,o){return this._write(!0,e,t,i,r,n,a,o)},u.prototype.writeSync=function(e,t,i,r,n,a,o){return this._write(!1,e,t,i,r,n,a,o)},u.prototype._write=function(i,a,o,s,l,c,u,d){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==t.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==t.Z_NO_FLUSH&&a!==t.Z_PARTIAL_FLUSH&&a!==t.Z_SYNC_FLUSH&&a!==t.Z_FULL_FLUSH&&a!==t.Z_FINISH&&a!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=e.alloc(0),l=0,s=0),this.strm.avail_in=l,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=d,this.strm.output=c,this.strm.next_out=u,this.flush=a,!i)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return r.nextTick((function(){h._process(),h._after()})),this},u.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},u.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},u.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(e,i,r,a,o){n(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(e>=8&&e<=15,"invalid windowBits"),n(i>=-1&&i<=9,"invalid compression level"),n(r>=1&&r<=9,"invalid memlevel"),n(a===t.Z_FILTERED||a===t.Z_HUFFMAN_ONLY||a===t.Z_RLE||a===t.Z_FIXED||a===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(i,e,r,a,o),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(e,i,r,n,l){switch(this.level=e,this.windowBits=i,this.memLevel=r,this.strategy=n,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=l,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=u}).call(this,i(22).Buffer,i(27))},function(e,t,i){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,s,l=o(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(r){s=r(i);for(var d=0;d<s.length;d++)a.call(i,s[d])&&(l[s[d]]=i[s[d]])}}return l}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}},function(e,t,i){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,i){"use strict";var r,n=i(77),a=i(267),o=i(145),s=i(146),l=i(268);function c(e,t){return e.msg=l[t],t}function u(e){return(e<<1)-(e>4?9:0)}function d(e){for(var t=e.length;--t>=0;)e[t]=0}function h(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(n.arraySet(e.output,t.pending_buf,t.pending_out,i,e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))}function p(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,h(e.strm)}function f(e,t){e.pending_buf[e.pending++]=t}function m(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function g(e,t){var i,r,n=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,u=e.w_mask,d=e.prev,h=e.strstart+258,p=c[a+o-1],f=c[a+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(i=t)+o]===f&&c[i+o-1]===p&&c[i]===c[a]&&c[++i]===c[a+1]){a+=2,i++;do{}while(c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&a<h);if(r=258-(h-a),a=h-258,r>o){if(e.match_start=t,o=r,r>=s)break;p=c[a+o-1],f=c[a+o]}}}while((t=d[t&u])>l&&0!=--n);return o<=e.lookahead?o:e.lookahead}function y(e){var t,i,r,a,l,c,u,d,h,p,f=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-262)){n.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=i=e.hash_size;do{r=e.head[--t],e.head[t]=r>=f?r-f:0}while(--i);t=i=f;do{r=e.prev[--t],e.prev[t]=r>=f?r-f:0}while(--i);a+=f}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,h=a,p=void 0,(p=c.avail_in)>h&&(p=h),i=0===p?0:(c.avail_in-=p,n.arraySet(u,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=o(c.adler,u,p,d):2===c.state.wrap&&(c.adler=s(c.adler,u,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=i,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function _(e,t){for(var i,r;;){if(e.lookahead<262){if(y(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-262&&(e.match_length=g(e,i)),e.match_length>=3)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}function v(e,t){for(var i,r,n;;){if(e.lookahead<262){if(y(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-262&&(e.match_length=g(e,i),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(p(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=a._tr_tally(e,0,e.window[e.strstart-1]))&&p(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,i,r,n){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=r,this.func=n}function x(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new n.Buf16(1146),this.dyn_dtree=new n.Buf16(122),this.bl_tree=new n.Buf16(78),d(this.dyn_ltree),d(this.dyn_dtree),d(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(16),this.heap=new n.Buf16(573),d(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(573),d(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function b(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,a._tr_init(t),0):c(e,-2)}function S(e){var t,i=b(e);return 0===i&&((t=e.state).window_size=2*t.w_size,d(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),i}function T(e,t,i,r,a,o){if(!e)return-2;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),a<1||a>9||8!==i||r<8||r>15||t<0||t>9||o<0||o>4)return c(e,-2);8===r&&(r=9);var l=new x;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new n.Buf8(2*l.w_size),l.head=new n.Buf16(l.hash_size),l.prev=new n.Buf16(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new n.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=o,l.method=i,S(e)}r=[new C(0,0,0,0,(function(e,t){var i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(y(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+i;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,p(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(p(e,!1),e.strm.avail_out),1)})),new C(4,4,8,4,_),new C(4,5,16,8,_),new C(4,6,32,32,_),new C(4,4,16,16,v),new C(8,16,32,32,v),new C(8,16,128,128,v),new C(8,32,128,256,v),new C(32,128,258,1024,v),new C(32,258,258,4096,v)],t.deflateInit=function(e,t){return T(e,t,8,15,8,0)},t.deflateInit2=T,t.deflateReset=S,t.deflateResetKeep=b,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var i,n,o,l;if(!e||!e.state||t>5||t<0)return e?c(e,-2):-2;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&4!==t)return c(e,0===e.avail_out?-5:-2);if(n.strm=e,i=n.last_flush,n.last_flush=t,42===n.status)if(2===n.wrap)e.adler=0,f(n,31),f(n,139),f(n,8),n.gzhead?(f(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),f(n,255&n.gzhead.time),f(n,n.gzhead.time>>8&255),f(n,n.gzhead.time>>16&255),f(n,n.gzhead.time>>24&255),f(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),f(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(f(n,255&n.gzhead.extra.length),f(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=s(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(f(n,0),f(n,0),f(n,0),f(n,0),f(n,0),f(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),f(n,3),n.status=113);else{var g=8+(n.w_bits-8<<4)<<8;g|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(g|=32),g+=31-g%31,n.status=113,m(n,g),0!==n.strstart&&(m(n,e.adler>>>16),m(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),h(e),o=n.pending,n.pending!==n.pending_buf_size));)f(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),h(e),o=n.pending,n.pending===n.pending_buf_size)){l=1;break}l=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,f(n,l)}while(0!==l);n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),0===l&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),h(e),o=n.pending,n.pending===n.pending_buf_size)){l=1;break}l=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,f(n,l)}while(0!==l);n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),0===l&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&h(e),n.pending+2<=n.pending_buf_size&&(f(n,255&e.adler),f(n,e.adler>>8&255),e.adler=0,n.status=113)):n.status=113),0!==n.pending){if(h(e),0===e.avail_out)return n.last_flush=-1,0}else if(0===e.avail_in&&u(t)<=u(i)&&4!==t)return c(e,-5);if(666===n.status&&0!==e.avail_in)return c(e,-5);if(0!==e.avail_in||0!==n.lookahead||0!==t&&666!==n.status){var _=2===n.strategy?function(e,t){for(var i;;){if(0===e.lookahead&&(y(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,i=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(n,t):3===n.strategy?function(e,t){for(var i,r,n,o,s=e.window;;){if(e.lookahead<=258){if(y(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[n=e.strstart-1])===s[++n]&&r===s[++n]&&r===s[++n]){o=e.strstart+258;do{}while(r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&n<o);e.match_length=258-(o-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(n,t):r[n.level].func(n,t);if(3!==_&&4!==_||(n.status=666),1===_||3===_)return 0===e.avail_out&&(n.last_flush=-1),0;if(2===_&&(1===t?a._tr_align(n):5!==t&&(a._tr_stored_block(n,0,0,!1),3===t&&(d(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),h(e),0===e.avail_out))return n.last_flush=-1,0}return 4!==t?0:n.wrap<=0?1:(2===n.wrap?(f(n,255&e.adler),f(n,e.adler>>8&255),f(n,e.adler>>16&255),f(n,e.adler>>24&255),f(n,255&e.total_in),f(n,e.total_in>>8&255),f(n,e.total_in>>16&255),f(n,e.total_in>>24&255)):(m(n,e.adler>>>16),m(n,65535&e.adler)),h(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?c(e,-2):(e.state=null,113===t?c(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var i,r,a,s,l,c,u,h,p=t.length;if(!e||!e.state)return-2;if(2===(s=(i=e.state).wrap)||1===s&&42!==i.status||i.lookahead)return-2;for(1===s&&(e.adler=o(e.adler,t,p,0)),i.wrap=0,p>=i.w_size&&(0===s&&(d(i.head),i.strstart=0,i.block_start=0,i.insert=0),h=new n.Buf8(i.w_size),n.arraySet(h,t,p-i.w_size,i.w_size,0),t=h,p=i.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,y(i);i.lookahead>=3;){r=i.strstart,a=i.lookahead-2;do{i.ins_h=(i.ins_h<<i.hash_shift^i.window[r+3-1])&i.hash_mask,i.prev[r&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=r,r++}while(--a);i.strstart=r,i.lookahead=2,y(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=c,e.input=u,e.avail_in=l,i.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,i){"use strict";var r=i(77);function n(e){for(var t=e.length;--t>=0;)e[t]=0}var a=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);n(c);var u=new Array(60);n(u);var d=new Array(512);n(d);var h=new Array(256);n(h);var p=new Array(29);n(p);var f,m,g,y=new Array(30);function _(e,t,i,r,n){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=r,this.max_length=n,this.has_stree=e&&e.length}function v(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function C(e){return e<256?d[e]:d[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function b(e,t,i){e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,x(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)}function S(e,t,i){b(e,i[2*t],i[2*t+1])}function T(e,t){var i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1}function E(e,t,i){var r,n,a=new Array(16),o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(n=0;n<=t;n++){var s=e[2*n+1];0!==s&&(e[2*n]=T(a[s]++,s))}}function w(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function A(e){e.bi_valid>8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function P(e,t,i,r){var n=2*t,a=2*i;return e[n]<e[a]||e[n]===e[a]&&r[t]<=r[i]}function D(e,t,i){for(var r=e.heap[i],n=i<<1;n<=e.heap_len&&(n<e.heap_len&&P(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!P(t,r,e.heap[n],e.depth));)e.heap[i]=e.heap[n],i=n,n<<=1;e.heap[i]=r}function M(e,t,i){var r,n,s,l,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],n=e.pending_buf[e.l_buf+c],c++,0===r?S(e,n,t):(S(e,(s=h[n])+256+1,t),0!==(l=a[s])&&b(e,n-=p[s],l),S(e,s=C(--r),i),0!==(l=o[s])&&b(e,r-=y[s],l))}while(c<e.last_lit);S(e,256,t)}function I(e,t){var i,r,n,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i<l;i++)0!==a[2*i]?(e.heap[++e.heap_len]=c=i,e.depth[i]=0):a[2*i+1]=0;for(;e.heap_len<2;)a[2*(n=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[n]=0,e.opt_len--,s&&(e.static_len-=o[2*n+1]);for(t.max_code=c,i=e.heap_len>>1;i>=1;i--)D(e,a,i);n=l;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=r,a[2*n]=a[2*i]+a[2*r],e.depth[n]=(e.depth[i]>=e.depth[r]?e.depth[i]:e.depth[r])+1,a[2*i+1]=a[2*r+1]=n,e.heap[1]=n++,D(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var i,r,n,a,o,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,i=e.heap_max+1;i<573;i++)(a=l[2*l[2*(r=e.heap[i])+1]+1]+1)>f&&(a=f,m++),l[2*r+1]=a,r>c||(e.bl_count[a]++,o=0,r>=p&&(o=h[r-p]),s=l[2*r],e.opt_len+=s*(a+o),d&&(e.static_len+=s*(u[2*r+1]+o)));if(0!==m){do{for(a=f-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(a=f;0!==a;a--)for(r=e.bl_count[a];0!==r;)(n=e.heap[--i])>c||(l[2*n+1]!==a&&(e.opt_len+=(a-l[2*n+1])*l[2*n],l[2*n+1]=a),r--)}}(e,t),E(a,c,e.bl_count)}function R(e,t,i){var r,n,a=-1,o=t[1],s=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(i+1)+1]=65535,r=0;r<=i;r++)n=o,o=t[2*(r+1)+1],++s<l&&n===o||(s<c?e.bl_tree[2*n]+=s:0!==n?(n!==a&&e.bl_tree[2*n]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=n,0===o?(l=138,c=3):n===o?(l=6,c=3):(l=7,c=4))}function O(e,t,i){var r,n,a=-1,o=t[1],s=0,l=7,c=4;for(0===o&&(l=138,c=3),r=0;r<=i;r++)if(n=o,o=t[2*(r+1)+1],!(++s<l&&n===o)){if(s<c)do{S(e,n,e.bl_tree)}while(0!=--s);else 0!==n?(n!==a&&(S(e,n,e.bl_tree),s--),S(e,16,e.bl_tree),b(e,s-3,2)):s<=10?(S(e,17,e.bl_tree),b(e,s-3,3)):(S(e,18,e.bl_tree),b(e,s-11,7));s=0,a=n,0===o?(l=138,c=3):n===o?(l=6,c=3):(l=7,c=4)}}n(y);var L=!1;function N(e,t,i,n){b(e,0+(n?1:0),3),function(e,t,i,n){A(e),n&&(x(e,i),x(e,~i)),r.arraySet(e.pending_buf,e.window,t,i,e.pending),e.pending+=i}(e,t,i,!0)}t._tr_init=function(e){L||(!function(){var e,t,i,r,n,l=new Array(16);for(i=0,r=0;r<28;r++)for(p[r]=i,e=0;e<1<<a[r];e++)h[i++]=r;for(h[i-1]=r,n=0,r=0;r<16;r++)for(y[r]=n,e=0;e<1<<o[r];e++)d[n++]=r;for(n>>=7;r<30;r++)for(y[r]=n<<7,e=0;e<1<<o[r]-7;e++)d[256+n++]=r;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,l[8]++;for(;e<=255;)c[2*e+1]=9,e++,l[9]++;for(;e<=279;)c[2*e+1]=7,e++,l[7]++;for(;e<=287;)c[2*e+1]=8,e++,l[8]++;for(E(c,287,l),e=0;e<30;e++)u[2*e+1]=5,u[2*e]=T(e,5);f=new _(c,a,257,286,15),m=new _(u,o,0,30,15),g=new _(new Array(0),s,0,19,7)}(),L=!0),e.l_desc=new v(e.dyn_ltree,f),e.d_desc=new v(e.dyn_dtree,m),e.bl_desc=new v(e.bl_tree,g),e.bi_buf=0,e.bi_valid=0,w(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,i,r){var n,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),I(e,e.l_desc),I(e,e.d_desc),o=function(e){var t;for(R(e,e.dyn_ltree,e.l_desc.max_code),R(e,e.dyn_dtree,e.d_desc.max_code),I(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),n=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=n&&(n=a)):n=a=i+5,i+4<=n&&-1!==t?N(e,t,i,r):4===e.strategy||a===n?(b(e,2+(r?1:0),3),M(e,c,u)):(b(e,4+(r?1:0),3),function(e,t,i,r){var n;for(b(e,t-257,5),b(e,i-1,5),b(e,r-4,4),n=0;n<r;n++)b(e,e.bl_tree[2*l[n]+1],3);O(e,e.dyn_ltree,t-1),O(e,e.dyn_dtree,i-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),M(e,e.dyn_ltree,e.dyn_dtree)),w(e),r&&A(e)},t._tr_tally=function(e,t,i){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(h[i]+256+1)]++,e.dyn_dtree[2*C(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){b(e,2,3),S(e,256,c),function(e){16===e.bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,i){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,i){"use strict";var r=i(77),n=i(145),a=i(146),o=i(270),s=i(271);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):-2}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function h(e,t){var i,r;return e&&e.state?(r=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=i,r.wbits=t,d(e))):-2}function p(e,t){var i,r;return e?(r=new c,e.state=r,r.window=null,0!==(i=h(e,t))&&(e.state=null),i):-2}var f,m,g=!0;function y(e){if(g){var t;for(f=new r.Buf32(512),m=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),g=!1}e.lencode=f,e.lenbits=9,e.distcode=m,e.distbits=5}function _(e,t,i,n){var a,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),n>=o.wsize?(r.arraySet(o.window,t,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>n&&(a=n),r.arraySet(o.window,t,i-n,a,o.wnext),(n-=a)?(r.arraySet(o.window,t,i-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}t.inflateReset=d,t.inflateReset2=h,t.inflateResetKeep=u,t.inflateInit=function(e){return p(e,15)},t.inflateInit2=p,t.inflate=function(e,t){var i,c,u,d,h,p,f,m,g,v,C,x,b,S,T,E,w,A,P,D,M,I,R,O,L=0,N=new r.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(i=e.state).mode&&(i.mode=13),h=e.next_out,u=e.output,f=e.avail_out,d=e.next_in,c=e.input,p=e.avail_in,m=i.hold,g=i.bits,v=p,C=f,I=0;e:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(2&i.wrap&&35615===m){i.check=0,N[0]=255&m,N[1]=m>>>8&255,i.check=a(i.check,N,2,0),m=0,g=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",i.mode=30;break}if(g-=4,M=8+(15&(m>>>=4)),0===i.wbits)i.wbits=M;else if(M>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<<M,e.adler=i.check=1,i.mode=512&m?10:12,m=0,g=0;break;case 2:for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(i.flags=m,8!=(255&i.flags)){e.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=m>>8&1),512&i.flags&&(N[0]=255&m,N[1]=m>>>8&255,i.check=a(i.check,N,2,0)),m=0,g=0,i.mode=3;case 3:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.head&&(i.head.time=m),512&i.flags&&(N[0]=255&m,N[1]=m>>>8&255,N[2]=m>>>16&255,N[3]=m>>>24&255,i.check=a(i.check,N,4,0)),m=0,g=0,i.mode=4;case 4:for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.head&&(i.head.xflags=255&m,i.head.os=m>>8),512&i.flags&&(N[0]=255&m,N[1]=m>>>8&255,i.check=a(i.check,N,2,0)),m=0,g=0,i.mode=5;case 5:if(1024&i.flags){for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.length=m,i.head&&(i.head.extra_len=m),512&i.flags&&(N[0]=255&m,N[1]=m>>>8&255,i.check=a(i.check,N,2,0)),m=0,g=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&((x=i.length)>p&&(x=p),x&&(i.head&&(M=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),r.arraySet(i.head.extra,c,d,x,M)),512&i.flags&&(i.check=a(i.check,c,x,d)),p-=x,d+=x,i.length-=x),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===p)break e;x=0;do{M=c[d+x++],i.head&&M&&i.length<65536&&(i.head.name+=String.fromCharCode(M))}while(M&&x<p);if(512&i.flags&&(i.check=a(i.check,c,x,d)),p-=x,d+=x,M)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===p)break e;x=0;do{M=c[d+x++],i.head&&M&&i.length<65536&&(i.head.comment+=String.fromCharCode(M))}while(M&&x<p);if(512&i.flags&&(i.check=a(i.check,c,x,d)),p-=x,d+=x,M)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(m!==(65535&i.check)){e.msg="header crc mismatch",i.mode=30;break}m=0,g=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}e.adler=i.check=l(m),m=0,g=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=h,e.avail_out=f,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=g,2;e.adler=i.check=1,i.mode=12;case 12:if(5===t||6===t)break e;case 13:if(i.last){m>>>=7&g,g-=7&g,i.mode=27;break}for(;g<3;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}switch(i.last=1&m,g-=1,3&(m>>>=1)){case 0:i.mode=14;break;case 1:if(y(i),i.mode=20,6===t){m>>>=2,g-=2;break e}break;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}m>>>=2,g-=2;break;case 14:for(m>>>=7&g,g-=7&g;g<32;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&m,m=0,g=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(x=i.length){if(x>p&&(x=p),x>f&&(x=f),0===x)break e;r.arraySet(u,c,d,x,h),p-=x,d+=x,f-=x,h+=x,i.length-=x;break}i.mode=12;break;case 17:for(;g<14;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(i.nlen=257+(31&m),m>>>=5,g-=5,i.ndist=1+(31&m),m>>>=5,g-=5,i.ncode=4+(15&m),m>>>=4,g-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;g<3;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.lens[F[i.have++]]=7&m,m>>>=3,g-=3}for(;i.have<19;)i.lens[F[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,R={bits:i.lenbits},I=s(0,i.lens,0,19,i.lencode,0,i.work,R),i.lenbits=R.bits,I){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;E=(L=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,w=65535&L,!((T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(w<16)m>>>=T,g-=T,i.lens[i.have++]=w;else{if(16===w){for(O=T+2;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(m>>>=T,g-=T,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}M=i.lens[i.have-1],x=3+(3&m),m>>>=2,g-=2}else if(17===w){for(O=T+3;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}g-=T,M=0,x=3+(7&(m>>>=T)),m>>>=3,g-=3}else{for(O=T+7;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}g-=T,M=0,x=11+(127&(m>>>=T)),m>>>=7,g-=7}if(i.have+x>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;x--;)i.lens[i.have++]=M}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,R={bits:i.lenbits},I=s(1,i.lens,0,i.nlen,i.lencode,0,i.work,R),i.lenbits=R.bits,I){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,R={bits:i.distbits},I=s(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,R),i.distbits=R.bits,I){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(p>=6&&f>=258){e.next_out=h,e.avail_out=f,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=g,o(e,C),h=e.next_out,u=e.output,f=e.avail_out,d=e.next_in,c=e.input,p=e.avail_in,m=i.hold,g=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;E=(L=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,w=65535&L,!((T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(E&&0==(240&E)){for(A=T,P=E,D=w;E=(L=i.lencode[D+((m&(1<<A+P)-1)>>A)])>>>16&255,w=65535&L,!(A+(T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}m>>>=A,g-=A,i.back+=A}if(m>>>=T,g-=T,i.back+=T,i.length=w,0===E){i.mode=26;break}if(32&E){i.back=-1,i.mode=12;break}if(64&E){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&E,i.mode=22;case 22:if(i.extra){for(O=i.extra;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.length+=m&(1<<i.extra)-1,m>>>=i.extra,g-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;E=(L=i.distcode[m&(1<<i.distbits)-1])>>>16&255,w=65535&L,!((T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(0==(240&E)){for(A=T,P=E,D=w;E=(L=i.distcode[D+((m&(1<<A+P)-1)>>A)])>>>16&255,w=65535&L,!(A+(T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}m>>>=A,g-=A,i.back+=A}if(m>>>=T,g-=T,i.back+=T,64&E){e.msg="invalid distance code",i.mode=30;break}i.offset=w,i.extra=15&E,i.mode=24;case 24:if(i.extra){for(O=i.extra;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.offset+=m&(1<<i.extra)-1,m>>>=i.extra,g-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(x=C-f,i.offset>x){if((x=i.offset-x)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}x>i.wnext?(x-=i.wnext,b=i.wsize-x):b=i.wnext-x,x>i.length&&(x=i.length),S=i.window}else S=u,b=h-i.offset,x=i.length;x>f&&(x=f),f-=x,i.length-=x;do{u[h++]=S[b++]}while(--x);0===i.length&&(i.mode=21);break;case 26:if(0===f)break e;u[h++]=i.length,f--,i.mode=21;break;case 27:if(i.wrap){for(;g<32;){if(0===p)break e;p--,m|=c[d++]<<g,g+=8}if(C-=f,e.total_out+=C,i.total+=C,C&&(e.adler=i.check=i.flags?a(i.check,u,C,h-C):n(i.check,u,C,h-C)),C=f,(i.flags?m:l(m))!==i.check){e.msg="incorrect data check",i.mode=30;break}m=0,g=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;g<32;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(m!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=30;break}m=0,g=0}i.mode=29;case 29:I=1;break e;case 30:I=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=h,e.avail_out=f,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=g,(i.wsize||C!==e.avail_out&&i.mode<30&&(i.mode<27||4!==t))&&_(e,e.output,e.next_out,C-e.avail_out)?(i.mode=31,-4):(v-=e.avail_in,C-=e.avail_out,e.total_in+=v,e.total_out+=C,i.total+=C,i.wrap&&C&&(e.adler=i.check=i.flags?a(i.check,u,C,e.next_out-C):n(i.check,u,C,e.next_out-C)),e.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0===v&&0===C||4===t)&&0===I&&(I=-5),I)},t.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?-2:(i.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var i,r=t.length;return e&&e.state?0!==(i=e.state).wrap&&11!==i.mode?-2:11===i.mode&&n(1,t,r,0)!==i.check?-3:_(e,t,r,r)?(i.mode=31,-4):(i.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,i){"use strict";e.exports=function(e,t){var i,r,n,a,o,s,l,c,u,d,h,p,f,m,g,y,_,v,C,x,b,S,T,E,w;i=e.state,r=e.next_in,E=e.input,n=r+(e.avail_in-5),a=e.next_out,w=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),l=i.dmax,c=i.wsize,u=i.whave,d=i.wnext,h=i.window,p=i.hold,f=i.bits,m=i.lencode,g=i.distcode,y=(1<<i.lenbits)-1,_=(1<<i.distbits)-1;e:do{f<15&&(p+=E[r++]<<f,f+=8,p+=E[r++]<<f,f+=8),v=m[p&y];t:for(;;){if(p>>>=C=v>>>24,f-=C,0===(C=v>>>16&255))w[a++]=65535&v;else{if(!(16&C)){if(0==(64&C)){v=m[(65535&v)+(p&(1<<C)-1)];continue t}if(32&C){i.mode=12;break e}e.msg="invalid literal/length code",i.mode=30;break e}x=65535&v,(C&=15)&&(f<C&&(p+=E[r++]<<f,f+=8),x+=p&(1<<C)-1,p>>>=C,f-=C),f<15&&(p+=E[r++]<<f,f+=8,p+=E[r++]<<f,f+=8),v=g[p&_];i:for(;;){if(p>>>=C=v>>>24,f-=C,!(16&(C=v>>>16&255))){if(0==(64&C)){v=g[(65535&v)+(p&(1<<C)-1)];continue i}e.msg="invalid distance code",i.mode=30;break e}if(b=65535&v,f<(C&=15)&&(p+=E[r++]<<f,(f+=8)<C&&(p+=E[r++]<<f,f+=8)),(b+=p&(1<<C)-1)>l){e.msg="invalid distance too far back",i.mode=30;break e}if(p>>>=C,f-=C,b>(C=a-o)){if((C=b-C)>u&&i.sane){e.msg="invalid distance too far back",i.mode=30;break e}if(S=0,T=h,0===d){if(S+=c-C,C<x){x-=C;do{w[a++]=h[S++]}while(--C);S=a-b,T=w}}else if(d<C){if(S+=c+d-C,(C-=d)<x){x-=C;do{w[a++]=h[S++]}while(--C);if(S=0,d<x){x-=C=d;do{w[a++]=h[S++]}while(--C);S=a-b,T=w}}}else if(S+=d-C,C<x){x-=C;do{w[a++]=h[S++]}while(--C);S=a-b,T=w}for(;x>2;)w[a++]=T[S++],w[a++]=T[S++],w[a++]=T[S++],x-=3;x&&(w[a++]=T[S++],x>1&&(w[a++]=T[S++]))}else{S=a-b;do{w[a++]=w[S++],w[a++]=w[S++],w[a++]=w[S++],x-=3}while(x>2);x&&(w[a++]=w[S++],x>1&&(w[a++]=w[S++]))}break}}break}}while(r<n&&a<s);r-=x=f>>3,p&=(1<<(f-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<n?n-r+5:5-(r-n),e.avail_out=a<s?s-a+257:257-(a-s),i.hold=p,i.bits=f}},function(e,t,i){"use strict";var r=i(77),n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,i,l,c,u,d,h){var p,f,m,g,y,_,v,C,x,b=h.bits,S=0,T=0,E=0,w=0,A=0,P=0,D=0,M=0,I=0,R=0,O=null,L=0,N=new r.Buf16(16),F=new r.Buf16(16),B=null,V=0;for(S=0;S<=15;S++)N[S]=0;for(T=0;T<l;T++)N[t[i+T]]++;for(A=b,w=15;w>=1&&0===N[w];w--);if(A>w&&(A=w),0===w)return c[u++]=20971520,c[u++]=20971520,h.bits=1,0;for(E=1;E<w&&0===N[E];E++);for(A<E&&(A=E),M=1,S=1;S<=15;S++)if(M<<=1,(M-=N[S])<0)return-1;if(M>0&&(0===e||1!==w))return-1;for(F[1]=0,S=1;S<15;S++)F[S+1]=F[S]+N[S];for(T=0;T<l;T++)0!==t[i+T]&&(d[F[t[i+T]]++]=T);if(0===e?(O=B=d,_=19):1===e?(O=n,L-=257,B=a,V-=257,_=256):(O=o,B=s,_=-1),R=0,T=0,S=E,y=u,P=A,D=0,m=-1,g=(I=1<<A)-1,1===e&&I>852||2===e&&I>592)return 1;for(;;){v=S-D,d[T]<_?(C=0,x=d[T]):d[T]>_?(C=B[V+d[T]],x=O[L+d[T]]):(C=96,x=0),p=1<<S-D,E=f=1<<P;do{c[y+(R>>D)+(f-=p)]=v<<24|C<<16|x|0}while(0!==f);for(p=1<<S-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,T++,0==--N[S]){if(S===w)break;S=t[i+d[T]]}if(S>A&&(R&g)!==m){for(0===D&&(D=A),y+=E,M=1<<(P=S-D);P+D<w&&!((M-=N[P+D])<=0);)P++,M<<=1;if(I+=1<<P,1===e&&I>852||2===e&&I>592)return 1;c[m=R&g]=A<<24|P<<16|y-u|0}}return 0!==R&&(c[y+R]=S-D<<24|64<<16|0),h.bits=A,0}},function(e,t,i){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){function i(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}i.keys=function(){return[]},i.resolve=i,e.exports=i,i.id=273},function(e,t,i){var r=i(1);!function(){for(var e in r){if(null==r||!r.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=r[e]}}();var n=i(173);!function(){for(var e in n){if(null==n||!n.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=n[e]}}(),i(171),i(321),i(332),i(337),i(342),i(346),i(356),i(370),i(376),i(384),i(399),i(403),i(407),i(419),i(425),i(430),i(436),i(440),i(446),i(450),i(453),i(467),i(473),i(479),i(480),i(492),i(207),i(200),i(495),i(499),i(500),i(512),i(74),i(517),i(524),i(525),i(534),i(537),i(540),i(543),i(216),i(549),i(220),i(219),i(555),i(221),i(230),i(560),i(563)},function(e,t,i){var r=i(0),n=i(8),a=i(276),o=i(39),s=i(22),l=i(278);function c(){s.stop(this.event)}function u(){}u.prototype.dispose=function(){};var d=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],h=function(e,t,i,r){o.call(this),this.storage=e,this.painter=t,this.painterRoot=r,i=i||new u,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,a.call(this),this.setHandlerProxy(i)};function p(e,t,i){if(e[e.rectHover?"rectContain":"contain"](t,i)){for(var r,n=e;n;){if(n.clipPath&&!n.clipPath.contain(t,i))return!1;n.silent&&(r=!0),n=n.parent}return!r||"silent"}return!1}function f(e,t,i){var r=e.painter;return t<0||t>r.getWidth()||i<0||i>r.getHeight()}h.prototype={constructor:h,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(r.each(d,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,i=e.zrY,r=f(this,t,i),n=this._hovered,a=n.target;a&&!a.__zr&&(a=(n=this.findHover(n.x,n.y)).target);var o=this._hovered=r?{x:t,y:i}:this.findHover(t,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(n,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==a&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,i=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!i&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var i=this[e];i&&i.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,i){var r=(e=e||{}).target;if(!r||!r.silent){for(var n="on"+t,a=function(e,t,i){return{type:e,event:i,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:c}}(t,e,i);r&&(r[n]&&(a.cancelBubble=r[n].call(r,a)),r.trigger(t,a),r=r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[n]&&e[n].call(e,a),e.trigger&&e.trigger(t,a)})))}},findHover:function(e,t,i){for(var r=this.storage.getDisplayList(),n={x:e,y:t},a=r.length-1;a>=0;a--){var o;if(r[a]!==i&&!r[a].ignore&&(o=p(r[a],e,t))&&(!n.topTarget&&(n.topTarget=r[a]),"silent"!==o)){n.target=r[a];break}}return n},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new l);var i=this._gestureMgr;"start"===t&&i.clear();var r=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&i.clear(),r){var n=r.type;e.gestureEvent=n,this.dispatchToElement({target:r.target},n,r.event)}}},r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){h.prototype[e]=function(t){var i,r,a=t.zrX,o=t.zrY,s=f(this,a,o);if("mouseup"===e&&s||(r=(i=this.findHover(a,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||n.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,e,t)}})),r.mixin(h,o),r.mixin(h,a);var m=h;e.exports=m},function(e,t){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function r(e,t){return{target:e,topTarget:t&&t.topTarget}}i.prototype={constructor:i,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(r(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var i=e.offsetX,n=e.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,t.drift(a,o,e),this.dispatchToElement(r(t,e),"drag",e.event);var s=this.findHover(i,n,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.dispatchToElement(r(l,e),"dragleave",e.event),s&&s!==l&&this.dispatchToElement(r(s,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(r(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(r(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var n=i;e.exports=n},function(e,t){var i=Math.log(2);function r(e,t,n,a,o,s){var l=a+"-"+o,c=e.length;if(s.hasOwnProperty(l))return s[l];if(1===t){var u=Math.round(Math.log((1<<c)-1&~o)/i);return e[n][u]}for(var d=a|1<<n,h=n+1;a&1<<h;)h++;for(var p=0,f=0,m=0;f<c;f++){var g=1<<f;g&o||(p+=(m%2?-1:1)*e[n][f]*r(e,t-1,h,d,o|g,s),m++)}return s[l]=p,p}t.buildTransformer=function(e,t){var i=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],n={},a=r(i,8,0,0,0,n);if(0!==a){for(var o=[],s=0;s<8;s++)for(var l=0;l<8;l++)null==o[l]&&(o[l]=0),o[l]+=((s+l)%2?-1:1)*r(i,7,0===s?1:0,1<<s,1<<l,n)/a*t[s];return function(e,t,i){var r=t*o[6]+i*o[7]+1;e[0]=(t*o[0]+i*o[1]+o[2])/r,e[1]=(t*o[3]+i*o[4]+o[5])/r}}}},function(e,t,i){var r=i(22),n=function(){this._track=[]};function a(e){var t=e[1][0]-e[0][0],i=e[1][1]-e[0][1];return Math.sqrt(t*t+i*i)}n.prototype={constructor:n,recognize:function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,i){var n=e.touches;if(n){for(var a={points:[],touches:[],target:t,event:e},o=0,s=n.length;o<s;o++){var l=n[o],c=r.clientToLocal(i,l,{});a.points.push([c.zrX,c.zrY]),a.touches.push(l)}this._track.push(a)}},_recognize:function(e){for(var t in o)if(o.hasOwnProperty(t)){var i=o[t](this._track,e);if(i)return i}}};var o={pinch:function(e,t){var i=e.length;if(i){var r,n=(e[i-1]||{}).points,o=(e[i-2]||{}).points||n;if(o&&o.length>1&&n&&n.length>1){var s=a(n)/a(o);!isFinite(s)&&(s=1),t.pinchScale=s;var l=[((r=n)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=l[0],t.pinchY=l[1],{type:"pinch",target:e[0].target,event:t}}}}},s=n;e.exports=s},function(e,t,i){var r=i(0),n=i(11),a=i(40),o=i(100);function s(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var l=function(){this._roots=[],this._displayList=[],this._displayListLen=0};l.prototype={constructor:l,traverse:function(e,t){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(e,t)},getDisplayList:function(e,t){return t=t||!1,e&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(e){this._displayListLen=0;for(var t=this._roots,i=this._displayList,r=0,a=t.length;r<a;r++)this._updateAndAddDisplayable(t[r],null,e);i.length=this._displayListLen,n.canvasSupported&&o(i,s)},_updateAndAddDisplayable:function(e,t,i){if(!e.ignore||i){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var r=e.clipPath;if(r){t=t?t.slice():[];for(var n=r,a=e;n;)n.parent=a,n.updateTransform(),t.push(n),a=n,n=n.clipPath}if(e.isGroup){for(var o=e._children,s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,t,i)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof a&&e.addChildrenToStorage(this),this.addToStorage(e),this._roots.push(e))},delRoot:function(e){if(null==e){for(var t=0;t<this._roots.length;t++){var i=this._roots[t];i instanceof a&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var n=e.length;t<n;t++)this.delRoot(e[t])}else{var o=r.indexOf(this._roots,e);o>=0&&(this.delFromStorage(e),this._roots.splice(o,1),e instanceof a&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:s};var c=l;e.exports=c},function(e,t,i){var r=i(150),n=i(60),a=i(0),o=a.isString,s=a.isFunction,l=a.isObject,c=a.isArrayLike,u=a.indexOf,d=function(){this.animators=[]};function h(e,t,i,r,n,a,u,d){o(r)?(a=n,n=r,r=0):s(n)?(a=n,n="linear",r=0):s(r)?(a=r,r=0):s(i)?(a=i,i=500):i||(i=500),e.stopAnimation(),function e(t,i,r,n,a,o,s){var u={},d=0;for(var h in n)n.hasOwnProperty(h)&&(null!=r[h]?l(n[h])&&!c(n[h])?e(t,i?i+"."+h:h,r[h],n[h],a,o,s):(s?(u[h]=r[h],p(t,i,h,n[h])):u[h]=n[h],d++):null==n[h]||s||p(t,i,h,n[h]));d>0&&t.animate(i,!1).when(null==a?500:a,u).delay(o||0)}(e,"",e,t,i,r,d);var h=e.animators.slice(),f=h.length;function m(){--f||a&&a()}f||a&&a();for(var g=0;g<h.length;g++)h[g].done(m).start(n,u)}function p(e,t,i,r){if(t){var n={};n[t]={},n[t][i]=r,e.attr(n)}else e.attr(i,r)}d.prototype={constructor:d,animate:function(e,t){var i,a=!1,o=this,s=this.__zr;if(e){var l=e.split("."),c=o;a="shape"===l[0];for(var d=0,h=l.length;d<h;d++)c&&(c=c[l[d]]);c&&(i=c)}else i=o;if(i){var p=o.animators,f=new r(i,t);return f.during((function(e){o.dirty(a)})).done((function(){p.splice(u(p,f),1)})),p.push(f),s&&s.animation.addAnimator(f),f}n('Property "'+e+'" is not existed in element '+o.id)},stopAnimation:function(e){for(var t=this.animators,i=t.length,r=0;r<i;r++)t[r].stop(e);return t.length=0,this},animateTo:function(e,t,i,r,n,a){h(this,e,t,i,r,n,a)},animateFrom:function(e,t,i,r,n,a){h(this,e,t,i,r,n,a,!0)}};var f=d;e.exports=f},function(e,t,i){var r=i(282);function n(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}n.prototype={constructor:n,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var i=(e-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,a="string"==typeof n?r[n]:n,o="function"==typeof a?a(i):i;return this.fire("frame",o),1===i?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var a=n;e.exports=a},function(e,t){var i={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,i=.1,r=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=r*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-i.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*i.bounceIn(2*e):.5*i.bounceOut(2*e-1)+.5}},r=i;e.exports=r},function(e,t,i){var r=i(80).devicePixelRatio,n=i(0),a=i(60),o=i(9),s=i(100),l=i(284),c=i(154),u=i(48),d=i(11);function h(e){return parseInt(e,10)}var p=new o(0,0,0,0),f=new o(0,0,0,0);var m=function(e,t,i){this.type="canvas";var a=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=i=n.extend({},i||{}),this.dpr=i.devicePixelRatio||r,this._singleCanvas=a,this.root=e;var o=e.style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var s=this._zlevelList=[],c=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var u=e.width,d=e.height;null!=i.width&&(u=i.width),null!=i.height&&(d=i.height),this.dpr=i.devicePixelRatio||1,e.width=u*this.dpr,e.height=d*this.dpr,this._width=u,this._height=d;var h=new l(e,this,this.dpr);h.__builtin__=!0,h.initContext(),c[314159]=h,h.zlevel=314159,s.push(314159),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var p=this._domRoot=function(e,t){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);e.appendChild(p)}this._hoverlayer=null,this._hoverElements=[]};m.prototype={constructor:m,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var r=0;r<i.length;r++){var n=i[r],a=this._layers[n];if(!a.__builtin__&&a.refresh){var o=0===r?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var i=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return i.__from=e,e.__hoverMir=i,t&&i.setStyle(t),this._hoverElements.push(i),i}},removeHover:function(e){var t=e.__hoverMir,i=this._hoverElements,r=n.indexOf(i,t);r>=0&&i.splice(r,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,i=0;i<t.length;i++){var r=t[i].__from;r&&(r.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,i=this._hoverlayer;if(i&&i.clear(),t){s(e,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var r={};i.ctx.save();for(var n=0;n<t;){var a=e[n],o=a.__from;o&&o.__zr?(n++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,r))):(e.splice(n,1),o.__hoverMir=null,t--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(e,t,i){if(this._redrawId===i){t=t||!1,this._updateLayerStatus(e);var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!r){var n=this;c((function(){n._paintList(e,t,i)}))}}},_compositeManually:function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,t,i),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,i)}))},_doPaintList:function(e,t){for(var i=[],r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];(l=this._layers[a]).__builtin__&&l!==this._hoverlayer&&(l.__dirty||t)&&i.push(l)}for(var o=!0,s=0;s<i.length;s++){var l,c=(l=i[s]).ctx,u={};c.save();var h=t?l.__startIndex:l.__drawIndex,p=!t&&l.incremental&&Date.now,f=p&&Date.now(),m=l.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,m);else if(h===l.__startIndex){var g=e[h];g.incremental&&g.notClear&&!t||l.clear(!1,m)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=l.__startIndex);for(var y=h;y<l.__endIndex;y++){var _=e[y];if(this._doPaintEl(_,l,t,u),_.__dirty=_.__dirtyText=!1,p)if(Date.now()-f>15)break}l.__drawIndex=y,l.__drawIndex<l.__endIndex&&(o=!1),u.prevElClipPaths&&c.restore(),c.restore()}return d.wxa&&n.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),o},_doPaintEl:function(e,t,i,r){var n=t.ctx,a=e.transform;if((t.__dirty||i)&&!e.invisible&&0!==e.style.opacity&&(!a||a[0]||a[3])&&(!e.culling||!function(e,t,i){return p.copy(e.getBoundingRect()),e.transform&&p.applyTransform(e.transform),f.width=t,f.height=i,!p.intersect(f)}(e,this._width,this._height))){var o=e.__clipPaths,s=r.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!0;return!1}(o,s)||(s&&(n.restore(),r.prevElClipPaths=null,r.prevEl=null),o&&(n.save(),function(e,t){for(var i=0;i<e.length;i++){var r=e[i];r.setTransform(t),t.beginPath(),r.buildPath(t,r.shape),t.clip(),r.restoreTransform(t)}}(o,n),r.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(n),e.brush(n,r.prevEl||null),r.prevEl=e,e.afterBrush&&e.afterBrush(n)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var i=this._layers[e];return i||((i=new l("zr_"+e,this,this.dpr)).zlevel=e,i.__builtin__=!0,this._layerConfig[e]?n.merge(i,this._layerConfig[e],!0):this._layerConfig[e-.01]&&n.merge(i,this._layerConfig[e-.01],!0),t&&(i.virtual=t),this.insertLayer(e,i),i.initContext()),i},insertLayer:function(e,t){var i=this._layers,r=this._zlevelList,n=r.length,o=null,s=-1,l=this._domRoot;if(i[e])a("ZLevel "+e+" has been used already");else if(function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(n>0&&e>r[0]){for(s=0;s<n-1&&!(r[s]<e&&r[s+1]>e);s++);o=i[r[s]]}if(r.splice(s+1,0,e),i[e]=t,!t.virtual)if(o){var c=o.dom;c.nextSibling?l.insertBefore(t.dom,c.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom)}else a("Layer of zlevel "+e+" is not valid")},eachLayer:function(e,t){var i,r,n=this._zlevelList;for(r=0;r<n.length;r++)i=n[r],e.call(t,this._layers[i],i)},eachBuiltinLayer:function(e,t){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__&&e.call(t,i,r)},eachOtherLayer:function(e,t){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__||e.call(t,i,r)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){n&&(n.__endIndex!==e&&(n.__dirty=!0),n.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var i=1;i<e.length;i++){if((s=e[i]).zlevel!==e[i-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,n=null,o=0;for(i=0;i<e.length;i++){var s,l,c=(s=e[i]).zlevel;r!==c&&(r=c,o=0),s.incremental?((l=this.getLayer(c+.001,this._needsManuallyCompositing)).incremental=!0,o=1):l=this.getLayer(c+(o>0?.01:0),this._needsManuallyCompositing),l.__builtin__||a("ZLevel "+c+" has been used by unkown layer "+l.id),l!==n&&(l.__used=!0,l.__startIndex!==i&&(l.__dirty=!0),l.__startIndex=i,l.incremental?l.__drawIndex=-1:l.__drawIndex=i,t(i),n=l),s.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var i=this._layerConfig;i[e]?n.merge(i[e],t,!0):i[e]=t;for(var r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];if(a===e||a===e+.01){var o=this._layers[a];n.merge(o,i[e],!0)}}}},delLayer:function(e){var t=this._layers,i=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],i.splice(n.indexOf(i,e),1))},resize:function(e,t){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=this._getSize(0),t=this._getSize(1),i.style.display="",this._width!==e||t!==this._height){for(var a in i.style.width=e+"px",i.style.height=t+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);n.each(this._progressiveLayers,(function(i){i.resize(e,t)})),this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(314159).resize(e,t)}return this},clearLayer:function(e){var t=this._layers[e];t&&t.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new l("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,r=t.dom.height,n=t.ctx;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,i,r):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var c=o[s];this._doPaintEl(c,t,!0,a)}return t.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,i=["width","height"][e],r=["clientWidth","clientHeight"][e],n=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[i]&&"auto"!==t[i])return parseFloat(t[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||h(s[i])||h(o.style[i]))-(h(s[n])||0)-(h(s[a])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var i=document.createElement("canvas"),r=i.getContext("2d"),n=e.getBoundingRect(),a=e.style,o=a.shadowBlur*t,s=a.shadowOffsetX*t,l=a.shadowOffsetY*t,c=a.hasStroke()?a.lineWidth:0,d=Math.max(c/2,-s+o),h=Math.max(c/2,s+o),p=Math.max(c/2,-l+o),f=Math.max(c/2,l+o),m=n.width+d+h,g=n.height+p+f;i.width=m*t,i.height=g*t,r.scale(t,t),r.clearRect(0,0,m,g),r.dpr=t;var y={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[d-n.x,p-n.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(r);var _=new u({style:{x:0,y:0,image:i}});return null!=y.position&&(_.position=e.position=y.position),null!=y.rotation&&(_.rotation=e.rotation=y.rotation),null!=y.scale&&(_.scale=e.scale=y.scale),_}};var g=m;e.exports=g},function(e,t,i){var r=i(0),n=i(80).devicePixelRatio,a=i(101),o=i(153);function s(){return!1}function l(e,t,i){var n=r.createCanvas(),a=t.getWidth(),o=t.getHeight(),s=n.style;return s&&(s.position="absolute",s.left=0,s.top=0,s.width=a+"px",s.height=o+"px",n.setAttribute("data-zr-dom-id",e)),n.width=a*i,n.height=o*i,n}var c=function(e,t,i){var a;i=i||n,"string"==typeof e?a=l(e,t,i):r.isObject(e)&&(e=(a=e).id),this.id=e,this.dom=a;var o=a.style;o&&(a.onselectstart=s,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=t,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};c.prototype={constructor:c,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var e=this.dpr;this.domBack=l("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var i=this.dpr,r=this.dom,n=r.style,a=this.domBack;n&&(n.width=e+"px",n.height=t+"px"),r.width=e*i,r.height=t*i,a&&(a.width=e*i,a.height=t*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(e,t){var i,r=this.dom,n=this.ctx,s=r.width,l=r.height,c=(t=t||this.clearColor,this.motionBlur&&!e),u=this.lastFrameAlpha,d=this.dpr;(c&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,s/d,l/d)),n.clearRect(0,0,s,l),t&&"transparent"!==t)&&(t.colorStops?(i=t.__canvasGradient||a.getGradient(n,t,{x:0,y:0,width:s,height:l}),t.__canvasGradient=i):t.image&&(i=o.prototype.getCanvasPattern.call(t,n)),n.save(),n.fillStyle=i||t,n.fillRect(0,0,s,l),n.restore());if(c){var h=this.domBack;n.save(),n.globalAlpha=u,n.drawImage(h,0,0,s,l),n.restore()}}};var u=c;e.exports=u},function(e,t,i){var r=i(0),n=i(22).Dispatcher,a=i(154),o=i(150),s=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,n.call(this)};s.prototype={constructor:s,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),i=0;i<t.length;i++)this.addClip(t[i])},removeClip:function(e){var t=r.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),i=0;i<t.length;i++)this.removeClip(t[i]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,i=this._clips,r=i.length,n=[],a=[],o=0;o<r;o++){var s=i[o],l=s.step(e,t);l&&(n.push(l),a.push(s))}for(o=0;o<r;)i[o]._needsRemove?(i[o]=i[r-1],i.pop(),r--):o++;r=n.length;for(o=0;o<r;o++)a[o].fire(n[o]);this._time=e,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,a((function t(){e._running&&(a(t),!e._paused&&e._update())}))},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(e,t){var i=new o(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(i),i}},r.mixin(s,n);var l=s;e.exports=l},function(e,t,i){var r,n,a=i(22),o=a.addEventListener,s=a.removeEventListener,l=a.normalizeEvent,c=a.getNativeEvent,u=i(0),d=i(39),h=i(11),p=h.domSupported,f=(n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:r=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:u.map(r,(function(e){var t=e.replace("mouse","pointer");return n.hasOwnProperty(t)?t:e}))}),m=["mousemove","mouseup"],g=["pointermove","pointerup"];function y(e){return"mousewheel"===e&&h.browser.firefox?"DOMMouseScroll":e}function _(e){var t=e.pointerType;return"pen"===t||"touch"===t}function v(e){e&&(e.zrByTouch=!0)}function C(e,t){for(var i=t,r=!1;i&&9!==i.nodeType&&!(r=i.domBelongToZr||i!==t&&i===e.painterRoot);)i=i.parentNode;return r}function x(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var b=x.prototype;b.stopPropagation=b.stopImmediatePropagation=b.preventDefault=u.noop;var S={mousedown:function(e){e=l(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=l(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||D(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=l(this.dom,e),D(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=l(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=C(this,t),this.trigger("mouseout",e)},touchstart:function(e){v(e=l(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),S.mousemove.call(this,e),S.mousedown.call(this,e)},touchmove:function(e){v(e=l(this.dom,e)),this.handler.processGesture(e,"change"),S.mousemove.call(this,e)},touchend:function(e){v(e=l(this.dom,e)),this.handler.processGesture(e,"end"),S.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&S.click.call(this,e)},pointerdown:function(e){S.mousedown.call(this,e)},pointermove:function(e){_(e)||S.mousemove.call(this,e)},pointerup:function(e){S.mouseup.call(this,e)},pointerout:function(e){_(e)||S.mouseout.call(this,e)}};u.each(["click","mousewheel","dblclick","contextmenu"],(function(e){S[e]=function(t){t=l(this.dom,t),this.trigger(e,t)}}));var T={pointermove:function(e){_(e)||T.mousemove.call(this,e)},pointerup:function(e){T.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;D(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function E(e,t){var i=t.domHandlers;h.pointerEventsSupported?u.each(f.pointer,(function(r){A(t,r,(function(t){i[r].call(e,t)}))})):(h.touchEventsSupported&&u.each(f.touch,(function(r){A(t,r,(function(n){i[r].call(e,n),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),u.each(f.mouse,(function(r){A(t,r,(function(n){n=c(n),t.touching||i[r].call(e,n)}))})))}function w(e,t){function i(i){A(t,i,(function(r){r=c(r),C(e,r.target)||(r=function(e,t){return l(e.dom,new x(e,t),!0)}(e,r),t.domHandlers[i].call(e,r))}),{capture:!0})}h.pointerEventsSupported?u.each(g,i):h.touchEventsSupported||u.each(m,i)}function A(e,t,i,r){e.mounted[t]=i,e.listenerOpts[t]=r,o(e.domTarget,y(t),i,r)}function P(e){var t=e.mounted;for(var i in t)t.hasOwnProperty(i)&&s(e.domTarget,y(i),t[i],e.listenerOpts[i]);e.mounted={}}function D(e,t){if(e._mayPointerCapture=null,p&&e._pointerCapturing^t){e._pointerCapturing=t;var i=e._globalHandlerScope;t?w(e,i):P(i)}}function M(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function I(e,t){d.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new M(e,S),p&&(this._globalHandlerScope=new M(document,T)),this._pointerCapturing=!1,this._mayPointerCapture=null,E(this,this._localHandlerScope)}var R=I.prototype;R.dispose=function(){P(this._localHandlerScope),p&&P(this._globalHandlerScope)},R.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},u.mixin(I,d);var O=I;e.exports=O},function(e,t,i){var r=i(49)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),n={getLineStyle:function(e){var t=r(this,e);return t.lineDash=this.getLineDash(t.lineWidth),t},getLineDash:function(e){null==e&&(e=1);var t=this.get("type"),i=Math.max(e,2),r=4*e;return"solid"!==t&&null!=t&&("dashed"===t?[r,r]:[i,i])}};e.exports=n},function(e,t,i){var r=i(49)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),n={getAreaStyle:function(e,t){return r(this,e,t)}};e.exports=n},function(e,t,i){var r=i(17),n=i(2),a=["textStyle","color"],o={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(a):null)},getFont:function(){return n.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return r.getBoundingRect(e,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}};e.exports=o},function(e,t,i){var r=i(50),n=i(159),a=i(291),o=i(160),s=i(292),l=i(161).normalizeRadian,c=i(32),u=i(162),d=r.CMD,h=2*Math.PI;var p=[-1,-1,-1],f=[-1,-1];function m(e,t,i,r,n,a,o,s,l,u){if(u>t&&u>r&&u>a&&u>s||u<t&&u<r&&u<a&&u<s)return 0;var d,h=c.cubicRootAt(t,r,a,s,u,p);if(0===h)return 0;for(var m,g,y=0,_=-1,v=0;v<h;v++){var C=p[v],x=0===C||1===C?.5:1;c.cubicAt(e,i,n,o,C)<l||(_<0&&(_=c.cubicExtrema(t,r,a,s,f),f[1]<f[0]&&_>1&&(d=void 0,d=f[0],f[0]=f[1],f[1]=d),m=c.cubicAt(t,r,a,s,f[0]),_>1&&(g=c.cubicAt(t,r,a,s,f[1]))),2===_?C<f[0]?y+=m<t?x:-x:C<f[1]?y+=g<m?x:-x:y+=s<g?x:-x:C<f[0]?y+=m<t?x:-x:y+=s<m?x:-x)}return y}function g(e,t,i,r,n,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var l=c.quadraticRootAt(t,r,a,s,p);if(0===l)return 0;var u=c.quadraticExtremum(t,r,a);if(u>=0&&u<=1){for(var d=0,h=c.quadraticAt(t,r,a,u),f=0;f<l;f++){var m=0===p[f]||1===p[f]?.5:1;c.quadraticAt(e,i,n,p[f])<o||(p[f]<u?d+=h<t?m:-m:d+=a<h?m:-m)}return d}m=0===p[0]||1===p[0]?.5:1;return c.quadraticAt(e,i,n,p[0])<o?0:a<t?m:-m}function y(e,t,i,r,n,a,o,s){if((s-=t)>i||s<-i)return 0;var c=Math.sqrt(i*i-s*s);p[0]=-c,p[1]=c;var u=Math.abs(r-n);if(u<1e-4)return 0;if(u%h<1e-4){r=0,n=h;var d=a?1:-1;return o>=p[0]+e&&o<=p[1]+e?d:0}if(a){c=r;r=l(n),n=l(c)}else r=l(r),n=l(n);r>n&&(n+=h);for(var f=0,m=0;m<2;m++){var g=p[m];if(g+e>o){var y=Math.atan2(s,g);d=a?1:-1;y<0&&(y=h+y),(y>=r&&y<=n||y+h>=r&&y+h<=n)&&(y>Math.PI/2&&y<1.5*Math.PI&&(d=-d),f+=d)}}return f}function _(e,t,i,r,l){for(var c,h,p=0,f=0,_=0,v=0,C=0,x=0;x<e.length;){var b=e[x++];switch(b===d.M&&x>1&&(i||(p+=u(f,_,v,C,r,l))),1===x&&(v=f=e[x],C=_=e[x+1]),b){case d.M:f=v=e[x++],_=C=e[x++];break;case d.L:if(i){if(n.containStroke(f,_,e[x],e[x+1],t,r,l))return!0}else p+=u(f,_,e[x],e[x+1],r,l)||0;f=e[x++],_=e[x++];break;case d.C:if(i){if(a.containStroke(f,_,e[x++],e[x++],e[x++],e[x++],e[x],e[x+1],t,r,l))return!0}else p+=m(f,_,e[x++],e[x++],e[x++],e[x++],e[x],e[x+1],r,l)||0;f=e[x++],_=e[x++];break;case d.Q:if(i){if(o.containStroke(f,_,e[x++],e[x++],e[x],e[x+1],t,r,l))return!0}else p+=g(f,_,e[x++],e[x++],e[x],e[x+1],r,l)||0;f=e[x++],_=e[x++];break;case d.A:var S=e[x++],T=e[x++],E=e[x++],w=e[x++],A=e[x++],P=e[x++];x+=1;var D=1-e[x++],M=Math.cos(A)*E+S,I=Math.sin(A)*w+T;x>1?p+=u(f,_,M,I,r,l):(v=M,C=I);var R=(r-S)*w/E+S;if(i){if(s.containStroke(S,T,w,A,A+P,D,t,R,l))return!0}else p+=y(S,T,w,A,A+P,D,R,l);f=Math.cos(A+P)*E+S,_=Math.sin(A+P)*w+T;break;case d.R:v=f=e[x++],C=_=e[x++];M=v+e[x++],I=C+e[x++];if(i){if(n.containStroke(v,C,M,C,t,r,l)||n.containStroke(M,C,M,I,t,r,l)||n.containStroke(M,I,v,I,t,r,l)||n.containStroke(v,I,v,C,t,r,l))return!0}else p+=u(M,C,M,I,r,l),p+=u(v,I,v,C,r,l);break;case d.Z:if(i){if(n.containStroke(f,_,v,C,t,r,l))return!0}else p+=u(f,_,v,C,r,l);f=v,_=C}}return i||(c=_,h=C,Math.abs(c-h)<1e-4)||(p+=u(f,_,v,C,r,l)||0),0!==p}t.contain=function(e,t,i){return _(e,0,!1,t,i)},t.containStroke=function(e,t,i,r){return _(e,t,!0,i,r)}},function(e,t,i){var r=i(32);t.containStroke=function(e,t,i,n,a,o,s,l,c,u,d){if(0===c)return!1;var h=c;return!(d>t+h&&d>n+h&&d>o+h&&d>l+h||d<t-h&&d<n-h&&d<o-h&&d<l-h||u>e+h&&u>i+h&&u>a+h&&u>s+h||u<e-h&&u<i-h&&u<a-h&&u<s-h)&&r.cubicProjectPoint(e,t,i,n,a,o,s,l,u,d,null)<=h/2}},function(e,t,i){var r=i(161).normalizeRadian,n=2*Math.PI;t.containStroke=function(e,t,i,a,o,s,l,c,u){if(0===l)return!1;var d=l;c-=e,u-=t;var h=Math.sqrt(c*c+u*u);if(h-d>i||h+d<i)return!1;if(Math.abs(a-o)%n<1e-4)return!0;if(s){var p=a;a=r(o),o=r(p)}else a=r(a),o=r(o);a>o&&(o+=n);var f=Math.atan2(u,c);return f<0&&(f+=n),f>=a&&f<=o||f+n>=a&&f+n<=o}},function(e,t,i){var r=i(50),n=i(8).applyTransform,a=r.CMD,o=[[],[],[]],s=Math.sqrt,l=Math.atan2;e.exports=function(e,t){var i,r,c,u,d,h=e.data,p=a.M,f=a.C,m=a.L,g=a.R,y=a.A,_=a.Q;for(c=0,u=0;c<h.length;){switch(i=h[c++],u=c,r=0,i){case p:case m:r=1;break;case f:r=3;break;case _:r=2;break;case y:var v=t[4],C=t[5],x=s(t[0]*t[0]+t[1]*t[1]),b=s(t[2]*t[2]+t[3]*t[3]),S=l(-t[1]/b,t[0]/x);h[c]*=x,h[c++]+=v,h[c]*=b,h[c++]+=C,h[c++]*=x,h[c++]*=b,h[c++]+=S,h[c++]+=S,u=c+=2;break;case g:T[0]=h[c++],T[1]=h[c++],n(T,T,t),h[u++]=T[0],h[u++]=T[1],T[0]+=h[c++],T[1]+=h[c++],n(T,T,t),h[u++]=T[0],h[u++]=T[1]}for(d=0;d<r;d++){var T;(T=o[d])[0]=h[c++],T[1]=h[c++],n(T,T,t),h[u++]=T[0],h[u++]=T[1]}}}},function(e,t,i){var r=i(10),n=i(164),a=r.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:n(r.prototype.brush),buildPath:function(e,t){var i=t.cx,r=t.cy,n=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=t.startAngle,s=t.endAngle,l=t.clockwise,c=Math.cos(o),u=Math.sin(o);e.moveTo(c*n+i,u*n+r),e.lineTo(c*a+i,u*a+r),e.arc(i,r,a,o,s,!l),e.lineTo(Math.cos(s)*n+i,Math.sin(s)*n+r),0!==n&&e.arc(i,r,n,s,o,l),e.closePath()}});e.exports=a},function(e,t,i){var r=i(10).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var i=t.cx,r=t.cy,n=2*Math.PI;e.moveTo(i+t.r,r),e.arc(i,r,t.r,0,n,!1),e.moveTo(i+t.r0,r),e.arc(i,r,t.r0,0,n,!0)}});e.exports=r},function(e,t,i){var r=i(8).distance;function n(e,t,i,r,n,a,o){var s=.5*(i-e),l=.5*(r-t);return(2*(t-i)+s+l)*o+(-3*(t-i)-2*s-l)*a+s*n+t}e.exports=function(e,t){for(var i=e.length,a=[],o=0,s=1;s<i;s++)o+=r(e[s-1],e[s]);var l=o/2;for(l=l<i?i:l,s=0;s<l;s++){var c,u,d,h=s/(l-1)*(t?i:i-1),p=Math.floor(h),f=h-p,m=e[p%i];t?(c=e[(p-1+i)%i],u=e[(p+1)%i],d=e[(p+2)%i]):(c=e[0===p?p:p-1],u=e[p>i-2?i-1:p+1],d=e[p>i-3?i-1:p+2]);var g=f*f,y=f*g;a.push([n(c[0],m[0],u[0],d[0],f,g,y),n(c[1],m[1],u[1],d[1],f,g,y)])}return a}},function(e,t,i){var r=i(8),n=r.min,a=r.max,o=r.scale,s=r.distance,l=r.add,c=r.clone,u=r.sub;e.exports=function(e,t,i,r){var d,h,p,f,m=[],g=[],y=[],_=[];if(r){p=[1/0,1/0],f=[-1/0,-1/0];for(var v=0,C=e.length;v<C;v++)n(p,p,e[v]),a(f,f,e[v]);n(p,p,r[0]),a(f,f,r[1])}for(v=0,C=e.length;v<C;v++){var x=e[v];if(i)d=e[v?v-1:C-1],h=e[(v+1)%C];else{if(0===v||v===C-1){m.push(c(e[v]));continue}d=e[v-1],h=e[v+1]}u(g,h,d),o(g,g,t);var b=s(x,d),S=s(x,h),T=b+S;0!==T&&(b/=T,S/=T),o(y,g,-b),o(_,g,S);var E=l([],x,y),w=l([],x,_);r&&(a(E,E,p),n(E,E,f),a(w,w,p),n(w,w,f)),m.push(E),m.push(w)}return i&&m.push(m.shift()),m}},function(e,t,i){var r=i(10),n=i(8),a=i(32),o=a.quadraticSubdivide,s=a.cubicSubdivide,l=a.quadraticAt,c=a.cubicAt,u=a.quadraticDerivativeAt,d=a.cubicDerivativeAt,h=[];function p(e,t,i){var r=e.cpx2,n=e.cpy2;return null===r||null===n?[(i?d:c)(e.x1,e.cpx1,e.cpx2,e.x2,t),(i?d:c)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(i?u:l)(e.x1,e.cpx1,e.x2,t),(i?u:l)(e.y1,e.cpy1,e.y2,t)]}var f=r.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.x1,r=t.y1,n=t.x2,a=t.y2,l=t.cpx1,c=t.cpy1,u=t.cpx2,d=t.cpy2,p=t.percent;0!==p&&(e.moveTo(i,r),null==u||null==d?(p<1&&(o(i,l,n,p,h),l=h[1],n=h[2],o(r,c,a,p,h),c=h[1],a=h[2]),e.quadraticCurveTo(l,c,n,a)):(p<1&&(s(i,l,u,n,p,h),l=h[1],u=h[2],n=h[3],s(r,c,d,a,p,h),c=h[1],d=h[2],a=h[3]),e.bezierCurveTo(l,c,u,d,n,a)))},pointAt:function(e){return p(this.shape,e,!1)},tangentAt:function(e){var t=p(this.shape,e,!0);return n.normalize(t,t)}});e.exports=f},function(e,t,i){var r=i(10).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.cx,r=t.cy,n=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(a),c=Math.sin(a);e.moveTo(l*n+i,c*n+r),e.arc(i,r,n,a,o,!s)}});e.exports=r},function(e,t,i){var r=i(10),n=r.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,i=0;i<t.length;i++)e=e||t[i].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(t[0],t[1],e[i].segmentIgnoreThreshold)},buildPath:function(e,t){for(var i=t.paths||[],r=0;r<i.length;r++)i[r].buildPath(e,i[r].shape,!0)},afterBrush:function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),r.prototype.getBoundingRect.call(this)}});e.exports=n},function(e,t,i){var r=i(0),n=i(83),a=function(e,t,i,r,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==i?.5:i,this.type="radial",this.global=a||!1,n.call(this,r)};a.prototype={constructor:a},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(49)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),n={getItemStyle:function(e,t){var i=r(this,e,t),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var e=this.get("borderType");return"solid"===e||null==e?null:"dashed"===e?[5,5]:[1,1]}};e.exports=n},function(e,t){e.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},function(e,t){var i="";"undefined"!=typeof navigator&&(i=navigator.platform||"");var r={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};e.exports=r},function(e,t,i){var r=i(0),n=i(4),a=i(13),o=r.each,s=r.clone,l=r.map,c=r.merge,u=/^(min|max)?(.+)$/;function d(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function h(e,t,i){var n,a,s=[],l=[],c=e.timeline;if(e.baseOption&&(a=e.baseOption),(c||e.options)&&(a=a||{},s=(e.options||[]).slice()),e.media){a=a||{};var u=e.media;o(u,(function(e){e&&e.option&&(e.query?l.push(e):n||(n=e))}))}return a||(a=e),a.timeline||(a.timeline=c),o([a].concat(s).concat(r.map(l,(function(e){return e.option}))),(function(e){o(t,(function(t){t(e,i)}))})),{baseOption:a,timelineOptions:s,mediaDefault:n,mediaList:l}}function p(e,t,i){var n={width:t,height:i,aspectratio:t/i},a=!0;return r.each(e,(function(e,t){var i=t.match(u);if(i&&i[1]&&i[2]){var r=i[1],o=i[2].toLowerCase();(function(e,t,i){return"min"===i?e>=t:"max"===i?e<=t:e===t})(n[o],e,r)||(a=!1)}})),a}d.prototype={constructor:d,setOption:function(e,t){e&&r.each(n.normalizeToArray(e.series),(function(e){e&&e.data&&r.isTypedArray(e.data)&&r.setAsPrimitive(e.data)})),e=s(e);var i,u,d=this._optionBackup,p=h.call(this,e,t,!d);this._newBaseOption=p.baseOption,d?(i=d.baseOption,u=p.baseOption,o(u=u||{},(function(e,t){if(null!=e){var r=i[t];if(a.hasClass(t)){e=n.normalizeToArray(e),r=n.normalizeToArray(r);var o=n.mappingToExists(r,e);i[t]=l(o,(function(e){return e.option&&e.exist?c(e.exist,e.option,!0):e.exist||e.option}))}else i[t]=c(r,e,!0)}})),p.timelineOptions.length&&(d.timelineOptions=p.timelineOptions),p.mediaList.length&&(d.mediaList=p.mediaList),p.mediaDefault&&(d.mediaDefault=p.mediaDefault)):this._optionBackup=p},mountOption:function(e){var t=this._optionBackup;return this._timelineOptions=l(t.timelineOptions,s),this._mediaList=l(t.mediaList,s),this._mediaDefault=s(t.mediaDefault),this._currentMediaIndices=[],s(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,i=this._timelineOptions;if(i.length){var r=e.getComponent("timeline");r&&(t=s(i[r.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,i,r=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,c=[],u=[];if(!a.length&&!o)return u;for(var d=0,h=a.length;d<h;d++)p(a[d].query,r,n)&&c.push(d);return!c.length&&o&&(c=[-1]),c.length&&(t=c,i=this._currentMediaIndices,t.join(",")!==i.join(","))&&(u=l(c,(function(e){return s(-1===e?o.option:a[e].option)}))),this._currentMediaIndices=c,u}};var f=d;e.exports=f},function(e,t,i){var r=i(0),n=r.each,a=r.isArray,o=r.isObject,s=i(307),l=i(4).normalizeToArray;function c(e){n(u,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var u=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],d=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];e.exports=function(e,t){s(e,t),e.series=l(e.series),n(e.series,(function(e){if(o(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t)null!=e.clockWise&&(e.clockwise=e.clockWise);else if("gauge"===t){var i=function(e,t){t=t.split(",");for(var i=e,r=0;r<t.length&&null!=(i=i&&i[t[r]]);r++);return i}(e,"pointer.color");null!=i&&function(e,t,i,r){t=t.split(",");for(var n,a=e,o=0;o<t.length-1;o++)null==a[n=t[o]]&&(a[n]={}),a=a[n];(r||null==a[t[o]])&&(a[t[o]]=i)}(e,"itemStyle.color",i)}c(e)}})),e.dataRange&&(e.visualMap=e.dataRange),n(d,(function(t){var i=e[t];i&&(a(i)||(i=[i]),n(i,(function(e){c(e)})))}))}},function(e,t,i){var r=i(0),n=i(4),a=r.each,o=r.isObject,s=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function l(e){var t=e&&e.itemStyle;if(t)for(var i=0,n=s.length;i<n;i++){var a=s[i],o=t.normal,l=t.emphasis;o&&o[a]&&(e[a]=e[a]||{},e[a].normal?r.merge(e[a].normal,o[a]):e[a].normal=o[a],o[a]=null),l&&l[a]&&(e[a]=e[a]||{},e[a].emphasis?r.merge(e[a].emphasis,l[a]):e[a].emphasis=l[a],l[a]=null)}}function c(e,t,i){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,a=e[t].emphasis;n&&(i?(e[t].normal=e[t].emphasis=null,r.defaults(e[t],n)):e[t]=n),a&&(e.emphasis=e.emphasis||{},e.emphasis[t]=a)}}function u(e){c(e,"itemStyle"),c(e,"lineStyle"),c(e,"areaStyle"),c(e,"label"),c(e,"labelLine"),c(e,"upperLabel"),c(e,"edgeLabel")}function d(e,t){var i=o(e)&&e[t],r=o(i)&&i.textStyle;if(r)for(var a=0,s=n.TEXT_STYLE_OPTIONS.length;a<s;a++){t=n.TEXT_STYLE_OPTIONS[a];r.hasOwnProperty(t)&&(i[t]=r[t])}}function h(e){e&&(u(e),d(e,"label"),e.emphasis&&d(e.emphasis,"label"))}function p(e){return r.isArray(e)?e:e?[e]:[]}function f(e){return(r.isArray(e)?e[0]:e)||{}}e.exports=function(e,t){a(p(e.series),(function(e){o(e)&&function(e){if(o(e)){l(e),u(e),d(e,"label"),d(e,"upperLabel"),d(e,"edgeLabel"),e.emphasis&&(d(e.emphasis,"label"),d(e.emphasis,"upperLabel"),d(e.emphasis,"edgeLabel")),(i=e.markPoint)&&(l(i),h(i)),(n=e.markLine)&&(l(n),h(n));var t=e.markArea;t&&h(t);var i,n,a=e.data;if("graph"===e.type){a=a||e.nodes;var s=e.links||e.edges;if(s&&!r.isTypedArray(s))for(var p=0;p<s.length;p++)h(s[p]);r.each(e.categories,(function(e){u(e)}))}if(a&&!r.isTypedArray(a))for(p=0;p<a.length;p++)h(a[p]);if((i=e.markPoint)&&i.data){var f=i.data;for(p=0;p<f.length;p++)h(f[p])}if((n=e.markLine)&&n.data){var m=n.data;for(p=0;p<m.length;p++)r.isArray(m[p])?(h(m[p][0]),h(m[p][1])):h(m[p])}"gauge"===e.type?(d(e,"axisLabel"),d(e,"title"),d(e,"detail")):"treemap"===e.type?(c(e.breadcrumb,"itemStyle"),r.each(e.levels,(function(e){u(e)}))):"tree"===e.type&&u(e.leaves)}}(e)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),a(i,(function(t){a(p(e[t]),(function(e){e&&(d(e,"axisLabel"),d(e.axisPointer,"label"))}))})),a(p(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;d(t,"axisLabel"),d(t&&t.axisPointer,"label")})),a(p(e.calendar),(function(e){c(e,"itemStyle"),d(e,"dayLabel"),d(e,"monthLabel"),d(e,"yearLabel")})),a(p(e.radar),(function(e){d(e,"name")})),a(p(e.geo),(function(e){o(e)&&(h(e),a(p(e.regions),(function(e){h(e)})))})),a(p(e.timeline),(function(e){h(e),c(e,"label"),c(e,"itemStyle"),c(e,"controlStyle",!0);var t=e.data;r.isArray(t)&&r.each(t,(function(e){r.isObject(e)&&(c(e,"label"),c(e,"itemStyle"))}))})),a(p(e.toolbox),(function(e){c(e,"iconStyle"),a(e.feature,(function(e){c(e,"iconStyle")}))})),d(f(e.axisPointer),"label"),d(f(e.tooltip).axisPointer,"label")}},function(e,t,i){var r=i(0),n=r.createHashMap,a=r.each;function o(e){a(e,(function(t,i){var r=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(a,(function(a,l,c){var u,d,h=o.get(t.stackedDimension,c);if(isNaN(h))return n;s?d=o.getRawIndex(c):u=o.get(t.stackedByDimension,c);for(var p=NaN,f=i-1;f>=0;f--){var m=e[f];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,u)),d>=0){var g=m.data.getByRawIndex(m.stackResultDimension,d);if(h>=0&&g>0||h<=0&&g<0){h+=g,p=g;break}}}return r[0]=h,r[1]=p,r}));o.hostModel.setData(l),t.data=l}))}e.exports=function(e){var t=n();e.eachSeries((function(e){var i=e.get("stack");if(i){var r=t.get(i)||t.set(i,[]),n=e.getData(),a={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:e};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;r.length&&n.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(a)}})),t.each(o)}},function(e,t,i){var r=i(83),n=i(0).isFunction,a={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var i=e.getData(),a=(e.visualColorAccessPath||"itemStyle.color").split("."),o=e.get(a),s=!n(o)||o instanceof r?null:o;o&&!s||(o=e.getColorFromPalette(e.name,null,t.getSeriesCount())),i.setVisual("color",o);var l=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),c=e.get(l);if(i.setVisual("borderColor",c),!t.isSeriesFiltered(e)){s&&i.each((function(t){i.setItemVisual(t,"color",s(e.getDataParams(t)))}));return{dataEach:i.hasItemOption?function(e,t){var i=e.getItemModel(t),r=i.get(a,!0),n=i.get(l,!0);null!=r&&e.setItemVisual(t,"color",r),null!=n&&e.setItemVisual(t,"borderColor",n)}:null}}}};e.exports=a},function(e,t,i){var r=i(0),n=i(34),a=i(42).retrieveRawValue;e.exports=function(e,t){var i=t.getModel("aria");if(i.get("show"))if(i.get("description"))e.setAttribute("aria-label",i.get("description"));else{var o=0;t.eachSeries((function(e,t){++o}),this);var s,l=i.get("data.maxCount")||10,c=i.get("series.maxCount")||10,u=Math.min(o,c);if(!(o<1)){var d=function(){var e=t.getModel("title").option;e&&e.length&&(e=e[0]);return e&&e.text}();s=d?p(f("general.withTitle"),{title:d}):f("general.withoutTitle");var h=[];s+=p(f(o>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:o}),t.eachSeries((function(e,t){if(t<u){var i,r=e.get("name"),s="series."+(o>1?"multiple":"single")+".";i=p(i=f(r?s+"withName":s+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,n.series.typeNames[_]||"自定义图")});var c=e.getData();window.data=c,c.count()>l?i+=p(f("data.partialData"),{displayCnt:l}):i+=f("data.allData");for(var d=[],m=0;m<c.count();m++)if(m<l){var g=c.getName(m),y=a(c,m);d.push(p(f(g?"data.withName":"data.withoutName"),{name:g,value:y}))}i+=d.join(f("data.separator.middle"))+f("data.separator.end"),h.push(i)}var _})),s+=h.join(f("series.multiple.separator.middle"))+f("series.multiple.separator.end"),e.setAttribute("aria-label",s)}}function p(e,t){if("string"!=typeof e)return e;var i=e;return r.each(t,(function(e,t){i=i.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),i}function f(e){var t=i.get(e);if(null==t){for(var r=e.split("."),a=n.aria,o=0;o<r.length;++o)a=a[r[o]];return a}return t}}},function(e,t,i){var r=i(0),n=i(2),a=i(17),o=Math.PI;e.exports=function(e,t){t=t||{},r.defaults(t,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new n.Group,s=new n.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});i.add(s);var l=t.fontSize+" sans-serif",c=new n.Rect({style:{fill:"none",text:t.text,font:l,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(i.add(c),t.showSpinner){var u=new n.Arc({shape:{startAngle:-o/2,endAngle:-o/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001});u.animateShape(!0).when(1e3,{endAngle:3*o/2}).start("circularInOut"),u.animateShape(!0).when(1e3,{startAngle:3*o/2}).delay(300).start("circularInOut"),i.add(u)}return i.resize=function(){var i=a.getWidth(t.text,l),r=t.showSpinner?t.spinnerRadius:0,n=(e.getWidth()-2*r-(t.showSpinner&&i?10:0)-i)/2-(t.showSpinner?0:i/2),o=e.getHeight()/2;t.showSpinner&&u.setShape({cx:n,cy:o}),c.setShape({x:n-r,y:o-r,width:2*r,height:2*r}),s.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},i.resize(),i}},function(e,t,i){var r=i(0),n=r.each,a=r.map,o=r.isFunction,s=r.createHashMap,l=r.noop,c=i(108).createTask,u=i(63).getUID,d=i(157),h=i(170),p=i(4).normalizeToArray;function f(e,t,i,r){this.ecInstance=e,this.api=t,this.unfinished;i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice();this._allHandlers=i.concat(r),this._stageTaskMap=s()}var m=f.prototype;function g(e,t,i,r,a){var o;function s(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}a=a||{},n(t,(function(t,n){if(!a.visualType||a.visualType===t.visualType){var l=e._stageTaskMap.get(t.uid),c=l.seriesTaskMap,u=l.overallTask;if(u){var d,h=u.agentStubMap;h.each((function(e){s(a,e)&&(e.dirty(),d=!0)})),d&&u.dirty(),y(u,r);var p=e.getPerformArgs(u,a.block);h.each((function(e){e.perform(p)})),o|=u.perform(p)}else c&&c.each((function(n,l){s(a,n)&&n.dirty();var c=e.getPerformArgs(n,a.block);c.skip=!t.performRawSeries&&i.isSeriesFiltered(n.context.model),y(n,r),o|=n.perform(c)}))}})),e.unfinished|=o}m.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},m.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),r=i.context,n=!t&&i.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>i.blockIndex?i.step:null,a=r&&r.modDataCount;return{step:n,modBy:null!=a?Math.ceil(a/n):null,modDataCount:a}}},m.getPipeline=function(e){return this._pipelineMap.get(e)},m.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),r=e.getData().count(),n=i.progressiveEnabled&&t.incrementalPrepareRender&&r>=i.threshold,a=e.get("large")&&r>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=i.context={progressiveRender:n,modDataCount:o,large:a}},m.restorePipelines=function(e){var t=this,i=t._pipelineMap=s();e.eachSeries((function(e){var r=e.getProgressive(),n=e.uid;i.set(n,{id:n,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),A(t,e,e.dataTask)}))},m.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),i=this.api;n(this._allHandlers,(function(r){var a=e.get(r.uid)||e.set(r.uid,[]);r.reset&&function(e,t,i,r,n){var a=i.seriesTaskMap||(i.seriesTaskMap=s()),o=t.seriesType,l=t.getTargetSeries;t.createOnAllSeries?r.eachRawSeries(u):o?r.eachRawSeriesByType(o,u):l&&l(r,n).each(u);function u(i){var o=i.uid,s=a.get(o)||a.set(o,c({plan:b,reset:S,count:w}));s.context={model:i,ecModel:r,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},A(e,i,s)}var d=e._pipelineMap;a.each((function(e,t){d.get(t)||(e.dispose(),a.removeKey(t))}))}(this,r,a,t,i),r.overallReset&&function(e,t,i,r,a){var o=i.overallTask=i.overallTask||c({reset:_});o.context={ecModel:r,api:a,overallReset:t.overallReset,scheduler:e};var l=o.agentStubMap=o.agentStubMap||s(),u=t.seriesType,d=t.getTargetSeries,h=!0,p=t.modifyOutputEnd;u?r.eachRawSeriesByType(u,f):d?d(r,a).each(f):(h=!1,n(r.getSeries(),f));function f(t){var i=t.uid,r=l.get(i);r||(r=l.set(i,c({reset:v,onDirty:x})),o.dirty()),r.context={model:t,overallProgress:h,modifyOutputEnd:p},r.agent=o,r.__block=h,A(e,t,r)}var m=e._pipelineMap;l.each((function(e,t){m.get(t)||(e.dispose(),o.dirty(),l.removeKey(t))}))}(this,r,a,t,i)}),this)},m.prepareView=function(e,t,i,r){var n=e.renderTask,a=n.context;a.model=t,a.ecModel=i,a.api=r,n.__block=!e.incrementalPrepareRender,A(this,t,n)},m.performDataProcessorTasks=function(e,t){g(this,this._dataProcessorHandlers,e,t,{block:!0})},m.performVisualTasks=function(e,t,i){g(this,this._visualHandlers,e,t,i)},m.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},m.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))};var y=m.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function _(e){e.overallReset(e.ecModel,e.api,e.payload)}function v(e,t){return e.overallProgress&&C}function C(){this.agent.dirty(),this.getDownstream().dirty()}function x(){this.agent&&this.agent.dirty()}function b(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function S(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=p(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?a(t,(function(e,t){return E(t)})):T}var T=E(0);function E(e){return function(t,i){var r=i.data,n=i.resetDefines[e];if(n&&n.dataEach)for(var a=t.start;a<t.end;a++)n.dataEach(r,a);else n&&n.progress&&n.progress(t,r)}}function w(e){return e.data.count()}function A(e,t,i){var r=t.uid,n=e._pipelineMap.get(r);!n.head&&(n.head=i),n.tail&&n.tail.pipe(i),n.tail=i,i.__idxInPipeline=n.count++,i.__pipeline=n}function P(e){D=null;try{e(M,I)}catch(e){}return D}f.wrapStageHandler=function(e,t){return o(e)&&(e={overallReset:e,seriesType:P(e)}),e.uid=u("stageHandler"),t&&(e.visualType=t),e};var D,M={},I={};function R(e,t){for(var i in t.prototype)e[i]=l}R(M,d),R(I,h),M.eachSeriesByType=M.eachRawSeriesByType=function(e){D=e},M.eachComponent=function(e){"series"===e.mainType&&e.subType&&(D=e.subType)};var O=f;e.exports=O},function(e,t){var i=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],r={color:i,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],i]};e.exports=r},function(e,t){var i=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],r={color:i,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"},label:{color:"#000"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:i[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:i},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};r.categoryAxis.splitLine.show=!1;var n=r;e.exports=n},function(e,t,i){var r=i(10).extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var i=.5522848,r=t.cx,n=t.cy,a=t.rx,o=t.ry,s=a*i,l=o*i;e.moveTo(r-a,n),e.bezierCurveTo(r-a,n-l,r-s,n-o,r,n-o),e.bezierCurveTo(r+s,n-o,r+a,n-l,r+a,n),e.bezierCurveTo(r+a,n+l,r+s,n+o,r,n+o),e.bezierCurveTo(r-s,n+o,r-a,n+l,r-a,n),e.closePath()}});e.exports=r},function(e,t,i){var r=i(0),n=i(30),a=i(21),o=i(53),s=i(12),l=i(6);l.getLayoutRect;t.getLayoutRect=l.getLayoutRect;var c=i(25),u=c.enableDataStack,d=c.isDimensionStacked,h=c.getStackedDimension,p=i(175);t.completeDimensions=p;var f=i(52);t.createDimensions=f;var m=i(19);t.createSymbol=m.createSymbol;var g={isDimensionStacked:d,enableDataStack:u,getStackedDimension:h};t.createList=function(e){return n(e.getSource(),e)},t.dataStack=g,t.createScale=function(e,t){var i=t;s.isInstance(t)||(i=new s(t),r.mixin(i,o));var n=a.createScaleByModel(i);return n.setExtent(e[0],e[1]),a.niceScaleExtent(n,i),n},t.mixinAxisModelCommonMethods=function(e){r.mixin(e,o)}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.createHashMap,a=(r.retrieve,r.each);function o(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=n(),this.categoryAxisMap=n(),this.firstCategoryDimIndex=null}var s={cartesian2d:function(e,t,i,r){var n=e.getReferringComponents("xAxis")[0],a=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],i.set("x",n),i.set("y",a),l(n)&&(r.set("x",n),t.firstCategoryDimIndex=0),l(a)&&(r.set("y",a),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,i,r){var n=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],i.set("single",n),l(n)&&(r.set("single",n),t.firstCategoryDimIndex=0)},polar:function(e,t,i,r){var n=e.getReferringComponents("polar")[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",o),l(a)&&(r.set("radius",a),t.firstCategoryDimIndex=0),l(o)&&(r.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,i,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,i,r){var n=e.ecModel,o=n.getComponent("parallel",e.get("parallelIndex")),s=t.coordSysDims=o.dimensions.slice();a(o.parallelAxisIndex,(function(e,a){var o=n.getComponent("parallelAxis",e),c=s[a];i.set(c,o),l(o)&&null==t.firstCategoryDimIndex&&(r.set(c,o),t.firstCategoryDimIndex=a)}))}};function l(e){return"category"===e.get("type")}t.getCoordSysInfoBySeries=function(e){var t=e.get("coordinateSystem"),i=new o(t),r=s[t];if(r)return r(e,i,i.axisMap,i.categoryAxisMap),i}},function(e,t,i){var r=i(0),n=i(85),a=i(176),o=n.prototype,s=n.extend({type:"ordinal",init:function(e,t){e&&!r.isArray(e)||(e=new a({categories:e})),this._ordinalMeta=e,this._extent=t||[0,e.categories.length-1]},parse:function(e){return"string"==typeof e?this._ordinalMeta.getOrdinal(e):Math.round(e)},contain:function(e){return e=this.parse(e),o.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return o.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(o.scale.call(this,e))},getTicks:function(){for(var e=[],t=this._extent,i=t[0];i<=t[1];)e.push(i),i++;return e},getLabel:function(e){if(!this.isBlank())return this._ordinalMeta.categories[e]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:r.noop,niceExtent:r.noop});s.create=function(){return new s};var l=s;e.exports=l},function(e,t,i){var r=i(0),n=i(3),a=i(7),o=i(177),s=i(86),l=s.prototype,c=Math.ceil,u=Math.floor,d=864e5,h=s.extend({type:"time",getLabel:function(e){var t=this._stepLvl,i=new Date(e);return a.formatTime(t[0],i,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=d,t[1]+=d),t[1]===-1/0&&t[0]===1/0){var i=new Date;t[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),t[0]=t[1]-d}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var r=this._interval;e.fixMin||(t[0]=n.round(u(t[0]/r)*r)),e.fixMax||(t[1]=n.round(c(t[1]/r)*r))},niceTicks:function(e,t,i){e=e||10;var r=this._extent,a=r[1]-r[0],s=a/e;null!=t&&s<t&&(s=t),null!=i&&s>i&&(s=i);var l=p.length,d=function(e,t,i,r){for(;i<r;){var n=i+r>>>1;e[n][1]<t?i=n+1:r=n}return i}(p,s,0,l),h=p[Math.min(d,l-1)],f=h[1];if("year"===h[0]){var m=a/f;f*=n.nice(m/e,!0)}var g=this.getSetting("useUTC")?0:60*new Date(+r[0]||+r[1]).getTimezoneOffset()*1e3,y=[Math.round(c((r[0]-g)/f)*f+g),Math.round(u((r[1]-g)/f)*f+g)];o.fixExtent(y,r),this._stepLvl=h,this._interval=f,this._niceExtent=y},parse:function(e){return+n.parseDate(e)}});r.each(["contain","normalize"],(function(e){h.prototype[e]=function(t){return l[e].call(this,this.parse(t))}}));var p=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",d],["MM-dd\nyyyy",2*d],["MM-dd\nyyyy",3*d],["MM-dd\nyyyy",4*d],["MM-dd\nyyyy",5*d],["MM-dd\nyyyy",6*d],["week",7*d],["MM-dd\nyyyy",10*d],["week",14*d],["week",21*d],["month",31*d],["week",42*d],["month",62*d],["week",70*d],["quarter",95*d],["month",31*d*4],["month",31*d*5],["half-year",380*d/2],["month",31*d*8],["month",31*d*10],["year",380*d]];h.create=function(e){return new h({useUTC:e.ecModel.get("useUTC")})};var f=h;e.exports=f},function(e,t,i){var r=i(0),n=i(17),a=i(4).makeInner,o=i(21),s=o.makeLabelFormatter,l=o.getOptionCategoryInterval,c=o.shouldShowAllLabels,u=a();function d(e,t){var i,n,a=h(e,"labels"),o=l(t),s=p(a,o);return s||(r.isFunction(o)?i=g(e,o):(n="auto"===o?function(e){var t=u(e).autoInterval;return null!=t?t:u(e).autoInterval=e.calculateCategoryInterval()}(e):o,i=m(e,n)),f(a,o,{labels:i,labelCategoryInterval:n}))}function h(e,t){return u(e)[t]||(u(e)[t]=[])}function p(e,t){for(var i=0;i<e.length;i++)if(e[i].key===t)return e[i].value}function f(e,t,i){return e.push({key:t,value:i}),i}function m(e,t,i){var r=s(e),n=e.scale,a=n.getExtent(),o=e.getLabelModel(),l=[],u=Math.max((t||0)+1,1),d=a[0],h=n.count();0!==d&&u>1&&h/u>2&&(d=Math.round(Math.ceil(d/u)*u));var p=c(e),f=o.get("showMinLabel")||p,m=o.get("showMaxLabel")||p;f&&d!==a[0]&&y(a[0]);for(var g=d;g<=a[1];g+=u)y(g);function y(e){l.push(i?e:{formattedLabel:r(e),rawLabel:n.getLabel(e),tickValue:e})}return m&&g-u!==a[1]&&y(a[1]),l}function g(e,t,i){var n=e.scale,a=s(e),o=[];return r.each(n.getTicks(),(function(e){var r=n.getLabel(e);t(e,r)&&o.push(i?e:{formattedLabel:a(e),rawLabel:r,tickValue:e})})),o}t.createAxisLabels=function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),i=d(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(e):function(e){var t=e.scale.getTicks(),i=s(e);return{labels:r.map(t,(function(t,r){return{formattedLabel:i(t,r),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},t.createAxisTicks=function(e,t){return"category"===e.type?function(e,t){var i,n,a=h(e,"ticks"),o=l(t),s=p(a,o);if(s)return s;t.get("show")&&!e.scale.isBlank()||(i=[]);if(r.isFunction(o))i=g(e,o,!0);else if("auto"===o){var c=d(e,e.getLabelModel());n=c.labelCategoryInterval,i=r.map(c.labels,(function(e){return e.tickValue}))}else i=m(e,n=o,!0);return f(a,o,{ticks:i,tickCategoryInterval:n})}(e,t):{ticks:e.scale.getTicks()}},t.calculateCategoryInterval=function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),i=s(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,a=e.scale,o=a.getExtent(),l=a.count();if(o[1]-o[0]<1)return 0;var c=1;l>40&&(c=Math.max(1,Math.floor(l/40)));for(var d=o[0],h=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(h*Math.cos(r)),f=Math.abs(h*Math.sin(r)),m=0,g=0;d<=o[1];d+=c){var y,_,v=n.getBoundingRect(i(d),t.font,"center","top");y=1.3*v.width,_=1.3*v.height,m=Math.max(m,y,7),g=Math.max(g,_,7)}var C=m/p,x=g/f;isNaN(C)&&(C=1/0),isNaN(x)&&(x=1/0);var b=Math.max(0,Math.floor(Math.min(C,x))),S=u(e.model),T=e.getExtent(),E=S.lastAutoInterval,w=S.lastTickCount;return null!=E&&null!=w&&Math.abs(E-b)<=1&&Math.abs(w-l)<=1&&E>b&&S.axisExtend0===T[0]&&S.axisExtend1===T[1]?b=E:(S.lastTickCount=l,S.lastAutoInterval=b,S.axisExtend0=T[0],S.axisExtend1=T[1]),b}},function(e,t,i){var r=i(1);i(322),i(323);var n=i(44),a=i(69),o=i(325);i(70),r.registerVisual(n("line","circle","line")),r.registerLayout(a("line")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,o("line"))},function(e,t,i){i(5).__DEV__;var r=i(30),n=i(14).extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return r(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});e.exports=n},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(62).fromPoints,a=i(67),o=i(88),s=i(324),l=i(2),c=i(4),u=i(183),d=u.Polyline,h=u.Polygon,p=i(24),f=i(182),m=f.prepareDataCoordInfo,g=f.getStackedOnPoint,y=i(68),_=y.createGridClipPath,v=y.createPolarClipPath;function C(e,t){if(e.length===t.length){for(var i=0;i<e.length;i++){var r=e[i],n=t[i];if(r[0]!==n[0]||r[1]!==n[1])return}return!0}}function x(e,t){var i=[],r=[],a=[],o=[];return n(e,i,r),n(t,a,o),Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(r[0]-o[0]),Math.abs(r[1]-o[1]))}function b(e){return"number"==typeof e?e:e?.5:0}function S(e,t,i){for(var r=t.getBaseAxis(),n="x"===r.dim||"radius"===r.dim?0:1,a=[],o=0;o<e.length-1;o++){var s=e[o+1],l=e[o];a.push(l);var c=[];switch(i){case"end":c[n]=s[n],c[1-n]=l[1-n],a.push(c);break;case"middle":var u=(l[n]+s[n])/2,d=[];c[n]=d[n]=u,c[1-n]=l[1-n],d[1-n]=s[1-n],a.push(c),a.push(d);break;default:c[n]=l[n],c[1-n]=s[1-n],a.push(c)}}return e[o]&&a.push(e[o]),a}function T(e,t,i){var n=e.get("showAllSymbol"),a="auto"===n;if(!n||a){var s=i.getAxesByScale("ordinal")[0];if(s&&(!a||!function(e,t){var i=e.getExtent(),r=Math.abs(i[1]-i[0])/e.scale.count();isNaN(r)&&(r=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),s=0;s<n;s+=a)if(1.5*o.getSymbolSize(t,s)[e.isHorizontal()?1:0]>r)return!1;return!0}(s,t))){var l=t.mapDimension(s.dim),c={};return r.each(s.getViewLabels(),(function(e){c[e.tickValue]=1})),function(e){return!c.hasOwnProperty(t.get(l,e))}}}}function E(e,t,i){if("cartesian2d"===e.type){var r=e.getBaseAxis().isHorizontal(),n=_(e,t,i);if(!i.get("clip",!0)){var a=n.shape,o=Math.max(a.width,a.height);r?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return n}return v(e,t,i)}var w=p.extend({type:"line",init:function(){var e=new l.Group,t=new a;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,i){var n=e.coordinateSystem,a=this.group,o=e.getData(),s=e.getModel("lineStyle"),c=e.getModel("areaStyle"),u=o.mapArray(o.getItemLayout),d="polar"===n.type,h=this._coordSys,p=this._symbolDraw,f=this._polyline,y=this._polygon,_=this._lineGroup,v=e.get("animation"),x=!c.isEmpty(),w=c.get("origin"),A=function(e,t,i){if(!i.valueDim)return[];for(var r=[],n=0,a=t.count();n<a;n++)r.push(g(i,e,t,n));return r}(n,o,m(n,o,w)),P=e.get("showSymbol"),D=P&&!d&&T(e,o,n),M=this._data;M&&M.eachItemGraphicEl((function(e,t){e.__temp&&(a.remove(e),M.setItemGraphicEl(t,null))})),P||p.remove(),a.add(_);var I,R=!d&&e.get("step");n&&n.getArea&&e.get("clip",!0)&&(null!=(I=n.getArea()).width?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r1+=.5)),this._clipShapeForSymbol=I,f&&h.type===n.type&&R===this._step?(x&&!y?y=this._newPolygon(u,A,n,v):y&&!x&&(_.remove(y),y=this._polygon=null),_.setClipPath(E(n,!1,e)),P&&p.updateData(o,{isIgnore:D,clipShape:I}),o.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),C(this._stackedOnPoints,A)&&C(this._points,u)||(v?this._updateAnimation(o,A,n,i,R,w):(R&&(u=S(u,n,R),A=S(A,n,R)),f.setShape({points:u}),y&&y.setShape({points:u,stackedOnPoints:A})))):(P&&p.updateData(o,{isIgnore:D,clipShape:I}),R&&(u=S(u,n,R),A=S(A,n,R)),f=this._newPolyline(u,n,v),x&&(y=this._newPolygon(u,A,n,v)),_.setClipPath(E(n,!0,e)));var O=function(e,t){var i=e.getVisual("visualMeta");if(i&&i.length&&e.count()&&"cartesian2d"===t.type){for(var n,a,o=i.length-1;o>=0;o--){var s=i[o].dimension,c=e.dimensions[s],u=e.getDimensionInfo(c);if("x"===(n=u&&u.coordDim)||"y"===n){a=i[o];break}}if(a){var d=t.getAxis(n),h=r.map(a.stops,(function(e){return{coord:d.toGlobalCoord(d.dataToCoord(e.value)),color:e.color}})),p=h.length,f=a.outerColors.slice();p&&h[0].coord>h[p-1].coord&&(h.reverse(),f.reverse());var m=h[0].coord-10,g=h[p-1].coord+10,y=g-m;if(y<.001)return"transparent";r.each(h,(function(e){e.offset=(e.coord-m)/y})),h.push({offset:p?h[p-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:f[0]||"transparent"});var _=new l.LinearGradient(0,0,0,0,h,!0);return _[n]=m,_[n+"2"]=g,_}}}(o,n)||o.getVisual("color");f.useStyle(r.defaults(s.getLineStyle(),{fill:"none",stroke:O,lineJoin:"bevel"}));var L=e.get("smooth");if(L=b(e.get("smooth")),f.setShape({smooth:L,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),y){var N=o.getCalculationInfo("stackedOnSeries"),F=0;y.useStyle(r.defaults(c.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel"})),N&&(F=b(N.get("smooth"))),y.setShape({smooth:L,stackedOnSmooth:F,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=A,this._points=u,this._step=R,this._valueOrigin=w},dispose:function(){},highlight:function(e,t,i,r){var n=e.getData(),a=c.queryDataIndex(n,r);if(!(a instanceof Array)&&null!=a&&a>=0){var s=n.getItemGraphicEl(a);if(!s){var l=n.getItemLayout(a);if(!l)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l[0],l[1]))return;(s=new o(n,a)).position=l,s.setZ(e.get("zlevel"),e.get("z")),s.ignore=isNaN(l[0])||isNaN(l[1]),s.__temp=!0,n.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else p.prototype.highlight.call(this,e,t,i,r)},downplay:function(e,t,i,r){var n=e.getData(),a=c.queryDataIndex(n,r);if(null!=a&&a>=0){var o=n.getItemGraphicEl(a);o&&(o.__temp?(n.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else p.prototype.downplay.call(this,e,t,i,r)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new d({shape:{points:e},silent:!0,z2:10}),this._lineGroup.add(t),this._polyline=t,t},_newPolygon:function(e,t){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new h({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(e,t,i,r,n,a){var o=this._polyline,c=this._polygon,u=e.hostModel,d=s(this._data,e,this._stackedOnPoints,t,this._coordSys,i,this._valueOrigin,a),h=d.current,p=d.stackedOnCurrent,f=d.next,m=d.stackedOnNext;if(n&&(h=S(d.current,i,n),p=S(d.stackedOnCurrent,i,n),f=S(d.next,i,n),m=S(d.stackedOnNext,i,n)),x(h,f)>3e3||c&&x(p,m)>3e3)return o.setShape({points:f}),void(c&&c.setShape({points:f,stackedOnPoints:m}));o.shape.__points=d.current,o.shape.points=h,l.updateProps(o,{shape:{points:f}},u),c&&(c.setShape({points:h,stackedOnPoints:p}),l.updateProps(c,{shape:{points:f,stackedOnPoints:m}},u));for(var g=[],y=d.status,_=0;_<y.length;_++){if("="===y[_].cmd){var v=e.getItemGraphicEl(y[_].idx1);v&&g.push({el:v,ptIdx:_})}}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var e=0;e<g.length;e++){g[e].el.attr("position",o.shape.__points[g[e].ptIdx])}}))},remove:function(e){var t=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),i.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});e.exports=w},function(e,t,i){var r=i(182),n=r.prepareDataCoordInfo,a=r.getStackedOnPoint;e.exports=function(e,t,i,r,o,s,l,c){for(var u=function(e,t){var i=[];return t.diff(e).add((function(e){i.push({cmd:"+",idx:e})})).update((function(e,t){i.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){i.push({cmd:"-",idx:e})})).execute(),i}(e,t),d=[],h=[],p=[],f=[],m=[],g=[],y=[],_=n(o,t,l),v=n(s,e,c),C=0;C<u.length;C++){var x=u[C],b=!0;switch(x.cmd){case"=":var S=e.getItemLayout(x.idx),T=t.getItemLayout(x.idx1);(isNaN(S[0])||isNaN(S[1]))&&(S=T.slice()),d.push(S),h.push(T),p.push(i[x.idx]),f.push(r[x.idx1]),y.push(t.getRawIndex(x.idx1));break;case"+":var E=x.idx;d.push(o.dataToPoint([t.get(_.dataDimsForPoint[0],E),t.get(_.dataDimsForPoint[1],E)])),h.push(t.getItemLayout(E).slice()),p.push(a(_,o,t,E)),f.push(r[E]),y.push(t.getRawIndex(E));break;case"-":E=x.idx;var w=e.getRawIndex(E);w!==E?(d.push(e.getItemLayout(E)),h.push(s.dataToPoint([e.get(v.dataDimsForPoint[0],E),e.get(v.dataDimsForPoint[1],E)])),p.push(i[E]),f.push(a(v,s,e,E)),y.push(w)):b=!1}b&&(m.push(x),g.push(g.length))}g.sort((function(e,t){return y[e]-y[t]}));var A=[],P=[],D=[],M=[],I=[];for(C=0;C<g.length;C++){E=g[C];A[C]=d[E],P[C]=h[E],D[C]=p[E],M[C]=f[E],I[C]=m[E]}return{current:A,next:P,stackedOnCurrent:D,stackedOnNext:M,status:I}}},function(e,t){var i={average:function(e){for(var t=0,i=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],i++);return 0===i?NaN:t/i},sum:function(e){for(var t=0,i=0;i<e.length;i++)t+=e[i]||0;return t},max:function(e){for(var t=-1/0,i=0;i<e.length;i++)e[i]>t&&(t=e[i]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,i=0;i<e.length;i++)e[i]<t&&(t=e[i]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},r=function(e,t){return Math.round(e.length/2)};e.exports=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,n){var a=e.getData(),o=e.get("sampling"),s=e.coordinateSystem;if("cartesian2d"===s.type&&o){var l,c=s.getBaseAxis(),u=s.getOtherAxis(c),d=c.getExtent(),h=Math.abs(d[1]-d[0]),p=Math.round(a.count()/h);if(p>1)"string"==typeof o?l=i[o]:"function"==typeof o&&(l=o),l&&e.setData(a.downSample(a.mapDimension(u.dim),1/p,l,r))}}}}},function(e,t,i){var r=i(0),n=i(9),a=i(327);function o(e){a.call(this,e)}o.prototype={constructor:o,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(e){var t=this.getAxis("x"),i=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,i){var r=this.getAxis("x"),n=this.getAxis("y");return(i=i||[])[0]=r.toGlobalCoord(r.dataToCoord(e[0])),i[1]=n.toGlobalCoord(n.dataToCoord(e[1])),i},clampData:function(e,t){var i=this.getAxis("x").scale,r=this.getAxis("y").scale,n=i.getExtent(),a=r.getExtent(),o=i.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(n[0],n[1]),o),Math.max(n[0],n[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},pointToData:function(e,t){var i=this.getAxis("x"),r=this.getAxis("y");return(t=t||[])[0]=i.coordToData(i.toLocalCoord(e[0])),t[1]=r.coordToData(r.toLocalCoord(e[1])),t},getOtherAxis:function(e){return this.getAxis("x"===e.dim?"y":"x")},getArea:function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),a=Math.max(e[0],e[1])-i,o=Math.max(t[0],t[1])-r;return new n(i,r,a,o)}},r.inherits(o,a);var s=o;e.exports=s},function(e,t,i){var r=i(0);function n(e){return this._axes[e]}var a=function(e){this._axes={},this._dimList=[],this.name=e||""};a.prototype={constructor:a,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return r.map(this._dimList,n,this)},getAxesByScale:function(e){return e=e.toLowerCase(),r.filter(this.getAxes(),(function(t){return t.scale.type===e}))},addAxis:function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},dataToCoord:function(e){return this._dataCoordConvert(e,"dataToCoord")},coordToData:function(e){return this._dataCoordConvert(e,"coordToData")},_dataCoordConvert:function(e,t){for(var i=this._dimList,r=e instanceof Array?[]:{},n=0;n<i.length;n++){var a=i[n],o=this._axes[a];r[a]=o[t](e[a])}return r}};var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(35),a=function(e,t,i,r,a){n.call(this,e,t,i),this.type=r||"value",this.position=a||"bottom"};a.prototype={constructor:a,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},getGlobalExtent:function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},toLocalCoord:null,toGlobalCoord:null},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){i(184);var r=i(13).extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});e.exports=r},function(e,t,i){i(184),i(331)},function(e,t,i){var r=i(0),n=i(2),a=i(36),o=i(45),s=i(186),l=i(187),c=l.rectCoordAxisBuildSplitArea,u=l.rectCoordAxisHandleRemove,d=["axisLine","axisTickLabel","axisName"],h=["splitArea","splitLine","minorSplitLine"],p=o.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,i,o){this.group.removeAll();var l=this._axisGroup;if(this._axisGroup=new n.Group,this.group.add(this._axisGroup),e.get("show")){var c=e.getCoordSysModel(),u=s.layout(c,e),f=new a(e,u);r.each(d,f.add,f),this._axisGroup.add(f.getGroup()),r.each(h,(function(t){e.get(t+".show")&&this["_"+t](e,c)}),this),n.groupTransition(l,this._axisGroup,e),p.superCall(this,"render",e,t,i,o)}},remove:function(){u(this)},_splitLine:function(e,t){var i=e.axis;if(!i.scale.isBlank()){var a=e.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=r.isArray(s)?s:[s];for(var l=t.coordinateSystem.getRect(),c=i.isHorizontal(),u=0,d=i.getTicksCoords({tickModel:a}),h=[],p=[],f=o.getLineStyle(),m=0;m<d.length;m++){var g=i.toGlobalCoord(d[m].coord);c?(h[0]=g,h[1]=l.y,p[0]=g,p[1]=l.y+l.height):(h[0]=l.x,h[1]=g,p[0]=l.x+l.width,p[1]=g);var y=u++%s.length,_=d[m].tickValue;this._axisGroup.add(new n.Line({anid:null!=_?"line_"+d[m].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:r.defaults({stroke:s[y]},f),silent:!0}))}}},_minorSplitLine:function(e,t){var i=e.axis,r=e.getModel("minorSplitLine").getModel("lineStyle"),a=t.coordinateSystem.getRect(),o=i.isHorizontal(),s=i.getMinorTicksCoords();if(s.length)for(var l=[],c=[],u=r.getLineStyle(),d=0;d<s.length;d++)for(var h=0;h<s[d].length;h++){var p=i.toGlobalCoord(s[d][h].coord);o?(l[0]=p,l[1]=a.y,c[0]=p,c[1]=a.y+a.height):(l[0]=a.x,l[1]=p,c[0]=a.x+a.width,c[1]=p),this._axisGroup.add(new n.Line({anid:"minor_line_"+s[d][h].tickValue,subPixelOptimize:!0,shape:{x1:l[0],y1:l[1],x2:c[0],y2:c[1]},style:u,silent:!0}))}},_splitArea:function(e,t){c(this,this._axisGroup,e,t)}});p.extend({type:"xAxis"}),p.extend({type:"yAxis"})},function(e,t,i){var r=i(1),n=i(0),a=i(87),o=a.layout,s=a.largeLayout;i(111),i(333),i(334),i(70),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,n.curry(o,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,s),r.registerVisual({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}})},function(e,t,i){var r=i(188).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});e.exports=r},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(2),o=i(189).setLabel,s=i(12),l=i(335),c=i(10),u=i(40),d=i(33).throttle,h=i(68).createClipPath,p=i(336),f=["itemStyle","barBorderWidth"],m=[0,0];n.extend(s.prototype,l);var g=r.extendChartView({type:"bar",render:function(e,t,i){this._updateDrawMode(e);var r=e.get("coordinateSystem");return"cartesian2d"!==r&&"polar"!==r||(this._isLargeDraw?this._renderLarge(e,t,i):this._renderNormal(e,t,i)),this.group},incrementalPrepareRender:function(e,t,i){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,i,r){this._incrementalRenderLarge(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e,t,i){var r,n=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,c=l.getBaseAxis();"cartesian2d"===l.type?r=c.isHorizontal():"polar"===l.type&&(r="angle"===c.dim);var d=e.isAnimationEnabled()?e:null,h=e.get("clip",!0),p=function(e,t){var i=e.getArea&&e.getArea();if("cartesian2d"===e.type){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var n=t.getLayout("bandWidth");r.isHorizontal()?(i.x-=n,i.width+=2*n):(i.y-=n,i.height+=2*n)}}return i}(l,o);n.removeClipPath();var f=e.get("roundCap",!0),m=e.get("showBackground",!0),g=e.getModel("backgroundStyle"),y=g.get("barBorderRadius")||0,_=[],T=this._backgroundEls||[],w=function(e){var t=S[l.type](o,e),i=function(e,t,i){return new("polar"===e.type?a.Sector:a.Rect)({shape:D(t,i,e),silent:!0,z2:0})}(l,r,t);return i.useStyle(g.getBarItemStyle()),"cartesian2d"===l.type&&i.setShape("r",y),_[e]=i,i};o.diff(s).add((function(t){var i=o.getItemModel(t),a=S[l.type](o,t,i);if(m&&w(t),o.hasValue(t)){if(h)if(v[l.type](p,a))return void n.remove(s);var s=C[l.type](t,a,r,d,!1,f);o.setItemGraphicEl(t,s),n.add(s),E(s,o,t,i,a,e,r,"polar"===l.type)}})).update((function(t,i){var c=o.getItemModel(t),u=S[l.type](o,t,c);if(m){var x;0===T.length?x=w(i):((x=T[i]).useStyle(g.getBarItemStyle()),"cartesian2d"===l.type&&x.setShape("r",y),_[t]=x);var b=S[l.type](o,t),A=D(r,b,l);a.updateProps(x,{shape:A},d,t)}var P=s.getItemGraphicEl(i);if(o.hasValue(t)){if(h)if(v[l.type](p,u))return void n.remove(P);P?a.updateProps(P,{shape:u},d,t):P=C[l.type](t,u,r,d,!0,f),o.setItemGraphicEl(t,P),n.add(P),E(P,o,t,c,u,e,r,"polar"===l.type)}else n.remove(P)})).remove((function(e){var t=s.getItemGraphicEl(e);"cartesian2d"===l.type?t&&x(e,d,t):t&&b(e,d,t)})).execute();var A=this._backgroundGroup||(this._backgroundGroup=new u);A.removeAll();for(var P=0;P<_.length;++P)A.add(_[P]);n.add(A),this._backgroundEls=_,this._data=o},_renderLarge:function(e,t,i){this._clear(),A(e,this.group);var r=e.get("clip",!0)?h(e.coordinateSystem,!1,e):null;r?this.group.setClipPath(r):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),A(t,this.group,!0)},dispose:n.noop,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,i=this._data;e&&e.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl((function(t){"sector"===t.type?b(t.dataIndex,e,t):x(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}}),y=Math.max,_=Math.min,v={cartesian2d:function(e,t){var i=t.width<0?-1:1,r=t.height<0?-1:1;i<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var n=y(t.x,e.x),a=_(t.x+t.width,e.x+e.width),o=y(t.y,e.y),s=_(t.y+t.height,e.y+e.height);t.x=n,t.y=o,t.width=a-n,t.height=s-o;var l=t.width<0||t.height<0;return i<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e,t){var i=t.r0<=t.r?1:-1;if(i<0){var r=t.r;t.r=t.r0,t.r0=r}r=_(t.r,e.r);var n=y(t.r0,e.r0);t.r=r,t.r0=n;var a=r-n<0;if(i<0){r=t.r;t.r=t.r0,t.r0=r}return a}},C={cartesian2d:function(e,t,i,r,o){var s=new a.Rect({shape:n.extend({},t),z2:1});if(s.name="item",r){var l=i?"height":"width",c={};s.shape[l]=0,c[l]=t[l],a[o?"updateProps":"initProps"](s,{shape:c},r,e)}return s},polar:function(e,t,i,r,o,s){var l=t.startAngle<t.endAngle,c=new(!i&&s?p:a.Sector)({shape:n.defaults({clockwise:l},t),z2:1});if(c.name="item",r){var u=i?"r":"endAngle",d={};c.shape[u]=i?0:t.startAngle,d[u]=t[u],a[o?"updateProps":"initProps"](c,{shape:d},r,e)}return c}};function x(e,t,i){i.style.text=null,a.updateProps(i,{shape:{width:0}},t,e,(function(){i.parent&&i.parent.remove(i)}))}function b(e,t,i){i.style.text=null,a.updateProps(i,{shape:{r:i.shape.r0}},t,e,(function(){i.parent&&i.parent.remove(i)}))}var S={cartesian2d:function(e,t,i){var r=e.getItemLayout(t),n=i?function(e,t){var i=e.get(f)||0,r=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),n=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,r,n)}(i,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*n/2,y:r.y+o*n/2,width:r.width-a*n,height:r.height-o*n}},polar:function(e,t,i){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle}}};function T(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function E(e,t,i,r,s,l,c,u){var d=t.getItemVisual(i,"color"),h=t.getItemVisual(i,"opacity"),p=t.getVisual("borderColor"),f=r.getModel("itemStyle"),m=r.getModel("emphasis.itemStyle").getBarItemStyle();u||e.setShape("r",f.get("barBorderRadius")||0),e.useStyle(n.defaults({stroke:T(s)?"none":p,fill:T(s)?"none":d,opacity:h},f.getBarItemStyle()));var g=r.getShallow("cursor");g&&e.attr("cursor",g);var y=c?s.height>0?"bottom":"top":s.width>0?"left":"right";u||o(e.style,m,r,d,l,i,y),T(s)&&(m.fill=m.stroke="none"),a.setHoverStyle(e,m)}var w=c.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var i=t.points,r=this.__startPoint,n=this.__baseDimIdx,a=0;a<i.length;a+=2)r[n]=i[a+n],e.moveTo(r[0],r[1]),e.lineTo(i[a],i[a+1])}});function A(e,t,i){var r=e.getData(),n=[],a=r.getLayout("valueAxisHorizontal")?1:0;n[1-a]=r.getLayout("valueAxisStart");var o=r.getLayout("largeDataIndices"),s=r.getLayout("barWidth"),l=e.getModel("backgroundStyle");if(e.get("showBackground",!0)){var c=r.getLayout("largeBackgroundPoints"),u=[];u[1-a]=r.getLayout("backgroundStart");var d=new w({shape:{points:c},incremental:!!i,__startPoint:u,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(e,t,i){var r=t.get("borderColor")||t.get("color"),n=t.getItemStyle(["color","borderColor"]);e.useStyle(n),e.style.fill=null,e.style.stroke=r,e.style.lineWidth=i.getLayout("barWidth")}(d,l,r),t.add(d)}var h=new w({shape:{points:r.getLayout("largePoints")},incremental:!!i,__startPoint:n,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s});t.add(h),function(e,t,i){var r=i.getVisual("borderColor")||i.getVisual("color"),n=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(n),e.style.fill=null,e.style.stroke=r,e.style.lineWidth=i.getLayout("barWidth")}(h,e,r),h.seriesIndex=e.seriesIndex,e.get("silent")||(h.on("mousedown",P),h.on("mousemove",P))}var P=d((function(e){var t=function(e,t,i){var r=e.__baseDimIdx,n=1-r,a=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[n];m[0]=t,m[1]=i;for(var c=m[r],u=m[1-r],d=c-s,h=c+s,p=0,f=a.length/2;p<f;p++){var g=2*p,y=a[g+r],_=a[g+n];if(y>=d&&y<=h&&(l<=_?u>=l&&u<=_:u>=_&&u<=l))return o[p]}return-1}(this,e.offsetX,e.offsetY);this.dataIndex=t>=0?t:null}),30,!1);function D(e,t,i){var r,n="polar"===i.type;return r=n?i.getArea():i.grid.getRect(),n?{cx:r.cx,cy:r.cy,r0:e?r.r0:t.r0,r:e?r.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:r.x,y:e?r.y:t.y,width:e?t.width:r.width,height:e?r.height:t.height}}e.exports=g},function(e,t,i){var r=i(49)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),n={getBarItemStyle:function(e){var t=r(this,e);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(t.lineDash=i)}return t}};e.exports=n},function(e,t,i){var r=(0,i(2).extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(e,t){var i=t.cx,r=t.cy,n=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=.5*(a-n),s=n+o,l=t.startAngle,c=t.endAngle,u=t.clockwise,d=Math.cos(l),h=Math.sin(l),p=Math.cos(c),f=Math.sin(c);(u?c-l<2*Math.PI:l-c<2*Math.PI)&&(e.moveTo(d*n+i,h*n+r),e.arc(d*s+i,h*s+r,o,-Math.PI+l,l,!u)),e.arc(i,r,a,l,c,!u),e.moveTo(p*a+i,f*a+r),e.arc(p*s+i,f*s+r,o,c-2*Math.PI,c-Math.PI,!u),0!==n&&(e.arc(i,r,n,c,l,u),e.moveTo(d*n+i,f*n+r)),e.closePath()}});e.exports=r},function(e,t,i){var r=i(1),n=i(0);i(338),i(339);var a=i(190),o=i(91),s=i(340),l=i(72);a("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(o("pie")),r.registerLayout(n.curry(s,"pie")),r.registerProcessor(l("pie"))},function(e,t,i){var r=i(1),n=i(54),a=i(0),o=i(4),s=i(3).getPercentWithPrecision,l=i(112),c=i(42).retrieveRawAttr,u=i(29).makeSeriesEncodeForNameBased,d=i(71),h=r.extendSeriesModel({type:"series.pie",init:function(e){h.superApply(this,"init",arguments),this.legendVisualProvider=new d(a.bind(this.getData,this),a.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(e)},mergeOption:function(e){h.superCall(this,"mergeOption",e),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(e,t){return n(this,{coordDimensions:["value"],encodeDefaulter:a.curry(u,this)})},_createSelectableList:function(){for(var e=this.getRawData(),t=e.mapDimension("value"),i=[],r=0,n=e.count();r<n;r++)i.push({name:e.getName(r),value:e.get(t,r),selected:c(e,r,"selected")});return i},getDataParams:function(e){var t=this.getData(),i=h.superCall(this,"getDataParams",e),r=[];return t.each(t.mapDimension("value"),(function(e){r.push(e)})),i.percent=s(r,e,t.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(e){o.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});a.mixin(h,l);var p=h;e.exports=p},function(e,t,i){var r=i(0),n=i(2),a=i(24);function o(e,t,i,r){var n=t.getData(),a=this.dataIndex,o=n.getName(a),l=t.get("selectedOffset");r.dispatchAction({type:"pieToggleSelect",from:e,name:o,seriesId:t.id}),n.each((function(e){s(n.getItemGraphicEl(e),n.getItemLayout(e),t.isSelected(n.getName(e)),l,i)}))}function s(e,t,i,r,n){var a=(t.startAngle+t.endAngle)/2,o=i?r:0,s=[Math.cos(a)*o,Math.sin(a)*o];n?e.animate().when(200,{position:s}).start("bounceOut"):e.attr("position",s)}function l(e,t){n.Group.call(this);var i=new n.Sector({z2:2}),r=new n.Polyline,a=new n.Text;this.add(i),this.add(r),this.add(a),this.updateData(e,t,!0)}var c=l.prototype;c.updateData=function(e,t,i){var a=this.childAt(0),o=this.childAt(1),l=this.childAt(2),c=e.hostModel,u=e.getItemModel(t),d=e.getItemLayout(t),h=r.extend({},d);h.label=null;var p=c.getShallow("animationTypeUpdate");i?(a.setShape(h),"scale"===c.getShallow("animationType")?(a.shape.r=d.r0,n.initProps(a,{shape:{r:d.r}},c,t)):(a.shape.endAngle=d.startAngle,n.updateProps(a,{shape:{endAngle:d.endAngle}},c,t))):"expansion"===p?a.setShape(h):n.updateProps(a,{shape:h},c,t);var f=e.getItemVisual(t,"color");a.useStyle(r.defaults({lineJoin:"bevel",fill:f},u.getModel("itemStyle").getItemStyle())),a.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var m=u.getShallow("cursor");m&&a.attr("cursor",m),s(this,e.getItemLayout(t),c.isSelected(e.getName(t)),c.get("selectedOffset"),c.get("animation"));var g=!i&&"transition"===p;this._updateLabel(e,t,g),this.highDownOnUpdate=c.get("silent")?null:function(e,t){var i=c.isAnimationEnabled()&&u.get("hoverAnimation");"emphasis"===t?(o.ignore=o.hoverIgnore,l.ignore=l.hoverIgnore,i&&(a.stopAnimation(!0),a.animateTo({shape:{r:d.r+c.get("hoverOffset")}},300,"elasticOut"))):(o.ignore=o.normalIgnore,l.ignore=l.normalIgnore,i&&(a.stopAnimation(!0),a.animateTo({shape:{r:d.r}},300,"elasticOut")))},n.setHoverStyle(this)},c._updateLabel=function(e,t,i){var r=this.childAt(1),a=this.childAt(2),o=e.hostModel,s=e.getItemModel(t),l=e.getItemLayout(t).label,c=e.getItemVisual(t,"color");if(!l||isNaN(l.x)||isNaN(l.y))a.ignore=a.normalIgnore=a.hoverIgnore=r.ignore=r.normalIgnore=r.hoverIgnore=!0;else{var u={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},d={x:l.x,y:l.y};i?(n.updateProps(r,{shape:u},o,t),n.updateProps(a,{style:d},o,t)):(r.attr({shape:u}),a.attr({style:d})),a.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var h=s.getModel("label"),p=s.getModel("emphasis.label"),f=s.getModel("labelLine"),m=s.getModel("emphasis.labelLine");c=e.getItemVisual(t,"color");n.setLabelStyle(a.style,a.hoverStyle={},h,p,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:l.text,autoColor:c,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:e.getItemVisual(t,"opacity")}),a.ignore=a.normalIgnore=!h.get("show"),a.hoverIgnore=!p.get("show"),r.ignore=r.normalIgnore=!f.get("show"),r.hoverIgnore=!m.get("show"),r.setStyle({stroke:c,opacity:e.getItemVisual(t,"opacity")}),r.setStyle(f.getModel("lineStyle").getLineStyle()),r.hoverStyle=m.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),r.setShape({smooth:g})}},r.inherits(l,n.Group);var u=a.extend({type:"pie",init:function(){var e=new n.Group;this._sectorGroup=e},render:function(e,t,i,n){if(!n||n.from!==this.uid){var a=e.getData(),s=this._data,c=this.group,u=t.get("animation"),d=!s,h=e.get("animationType"),p=e.get("animationTypeUpdate"),f=r.curry(o,this.uid,e,u,i),m=e.get("selectedMode");if(a.diff(s).add((function(e){var t=new l(a,e);d&&"scale"!==h&&t.eachChild((function(e){e.stopAnimation(!0)})),m&&t.on("click",f),a.setItemGraphicEl(e,t),c.add(t)})).update((function(e,t){var i=s.getItemGraphicEl(t);d||"transition"===p||i.eachChild((function(e){e.stopAnimation(!0)})),i.updateData(a,e),i.off("click"),m&&i.on("click",f),c.add(i),a.setItemGraphicEl(e,i)})).remove((function(e){var t=s.getItemGraphicEl(e);c.remove(t)})).execute(),u&&a.count()>0&&(d?"scale"!==h:"transition"!==p)){for(var g=a.getItemLayout(0),y=1;isNaN(g.startAngle)&&y<a.count();++y)g=a.getItemLayout(y);var _=Math.max(i.getWidth(),i.getHeight())/2,v=r.bind(c.removeClipPath,c);c.setClipPath(this._createClipPath(g.cx,g.cy,_,g.startAngle,g.clockwise,v,e,d))}else c.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(e,t,i,r,a,o,s,l){var c=new n.Sector({shape:{cx:e,cy:t,r0:0,r:i,startAngle:r,endAngle:r,clockwise:a}});return(l?n.initProps:n.updateProps)(c,{shape:{endAngle:r+(a?1:-1)*Math.PI*2}},s,o),c},containPoint:function(e,t){var i=t.getData().getItemLayout(0);if(i){var r=e[0]-i.cx,n=e[1]-i.cy,a=Math.sqrt(r*r+n*n);return a<=i.r&&a>=i.r0}}});e.exports=u},function(e,t,i){var r=i(3),n=r.parsePercent,a=r.linearMap,o=i(6),s=i(341),l=i(0),c=2*Math.PI,u=Math.PI/180;e.exports=function(e,t,i,r){t.eachSeriesByType(e,(function(e){var t=e.getData(),r=t.mapDimension("value"),d=function(e,t){return o.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,i),h=e.get("center"),p=e.get("radius");l.isArray(p)||(p=[0,p]),l.isArray(h)||(h=[h,h]);var f=n(d.width,i.getWidth()),m=n(d.height,i.getHeight()),g=Math.min(f,m),y=n(h[0],f)+d.x,_=n(h[1],m)+d.y,v=n(p[0],g/2),C=n(p[1],g/2),x=-e.get("startAngle")*u,b=e.get("minAngle")*u,S=0;t.each(r,(function(e){!isNaN(e)&&S++}));var T=t.getSum(r),E=Math.PI/(T||S)*2,w=e.get("clockwise"),A=e.get("roseType"),P=e.get("stillShowZeroSum"),D=t.getDataExtent(r);D[0]=0;var M=c,I=0,R=x,O=w?1:-1;if(t.each(r,(function(e,i){var r;if(isNaN(e))t.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:y,cy:_,r0:v,r:A?NaN:C,viewRect:d});else{(r="area"!==A?0===T&&P?E:e*E:c/S)<b?(r=b,M-=b):I+=e;var n=R+O*r;t.setItemLayout(i,{angle:r,startAngle:R,endAngle:n,clockwise:w,cx:y,cy:_,r0:v,r:A?a(e,D,[v,C]):C,viewRect:d}),R=n}})),M<c&&S)if(M<=.001){var L=c/S;t.each(r,(function(e,i){if(!isNaN(e)){var r=t.getItemLayout(i);r.angle=L,r.startAngle=x+O*i*L,r.endAngle=x+O*(i+1)*L}}))}else E=M/I,R=x,t.each(r,(function(e,i){if(!isNaN(e)){var r=t.getItemLayout(i),n=r.angle===b?b:e*E;r.startAngle=R,r.endAngle=R+O*n,R+=O*n}}));s(e,C,d.width,d.height,d.x,d.y)}))}},function(e,t,i){var r=i(17),n=i(3).parsePercent,a=Math.PI/180;function o(e,t,i,r,n,a,o,s,l,c){function u(t,i,r,n){for(var a=t;a<i&&!(e[a].y+r>l+o);a++)if(e[a].y+=r,a>t&&a+1<i&&e[a+1].y>e[a].y+e[a].height)return void d(a,r/2);d(i-1,r/2)}function d(t,i){for(var r=t;r>=0&&!(e[r].y-i<l)&&(e[r].y-=i,!(r>0&&e[r].y>e[r-1].y+e[r-1].height));r--);}function h(e,t,i,r,n,a){for(var o=t?Number.MAX_VALUE:0,s=0,l=e.length;s<l;s++)if("none"===e[s].labelAlignTo){var c=Math.abs(e[s].y-r),u=e[s].len,d=e[s].len2,h=c<n+u?Math.sqrt((n+u+d)*(n+u+d)-c*c):Math.abs(e[s].x-i);t&&h>=o&&(h=o-10),!t&&h<=o&&(h=o+10),e[s].x=i+h*a,o=h}}e.sort((function(e,t){return e.y-t.y}));for(var p,f=0,m=e.length,g=[],y=[],_=0;_<m;_++){if("outer"===e[_].position&&"labelLine"===e[_].labelAlignTo){var v=e[_].x-c;e[_].linePoints[1][0]+=v,e[_].x=c}(p=e[_].y-f)<0&&u(_,m,-p),f=e[_].y+e[_].height}o-f<0&&d(m-1,f-o);for(_=0;_<m;_++)e[_].y>=i?y.push(e[_]):g.push(e[_]);h(g,!1,t,i,r,n),h(y,!0,t,i,r,n)}function s(e){return"center"===e.position}e.exports=function(e,t,i,l,c,u){var d,h,p=e.getData(),f=[],m=!1,g=(e.get("minShowLabelAngle")||0)*a;p.each((function(a){var o=p.getItemLayout(a),s=p.getItemModel(a),l=s.getModel("label"),u=l.get("position")||s.get("emphasis.label.position"),y=l.get("distanceToLabelLine"),_=l.get("alignTo"),v=n(l.get("margin"),i),C=l.get("bleedMargin"),x=l.getFont(),b=s.getModel("labelLine"),S=b.get("length");S=n(S,i);var T=b.get("length2");if(T=n(T,i),!(o.angle<g)){var E,w,A,P,D=(o.startAngle+o.endAngle)/2,M=Math.cos(D),I=Math.sin(D);d=o.cx,h=o.cy;var R,O=e.getFormattedLabel(a,"normal")||p.getName(a),L=r.getBoundingRect(O,x,P,"top"),N="inside"===u||"inner"===u;if("center"===u)E=o.cx,w=o.cy,P="center";else{var F=(N?(o.r+o.r0)/2*M:o.r*M)+d,B=(N?(o.r+o.r0)/2*I:o.r*I)+h;if(E=F+3*M,w=B+3*I,!N){var V=F+M*(S+t-o.r),k=B+I*(S+t-o.r),z=V+(M<0?-1:1)*T;E="edge"===_?M<0?c+v:c+i-v:z+(M<0?-y:y),w=k,A=[[F,B],[V,k],[z,k]]}P=N?"center":"edge"===_?M>0?"right":"left":M>0?"left":"right"}var G=l.get("rotate");R="number"==typeof G?G*(Math.PI/180):G?M<0?-D+Math.PI:-D:0,m=!!R,o.label={x:E,y:w,position:u,height:L.height,len:S,len2:T,linePoints:A,textAlign:P,verticalAlign:"middle",rotation:R,inside:N,labelDistance:y,labelAlignTo:_,labelMargin:v,bleedMargin:C,textRect:L,text:O,font:x},N||f.push(o.label)}})),!m&&e.get("avoidLabelOverlap")&&function(e,t,i,n,a,l,c,u){for(var d=[],h=[],p=Number.MAX_VALUE,f=-Number.MAX_VALUE,m=0;m<e.length;m++)s(e[m])||(e[m].x<t?(p=Math.min(p,e[m].x),d.push(e[m])):(f=Math.max(f,e[m].x),h.push(e[m])));for(o(h,t,i,n,1,0,l,0,u,f),o(d,t,i,n,-1,0,l,0,u,p),m=0;m<e.length;m++){var g=e[m];if(!s(g)){var y=g.linePoints;if(y){var _,v="edge"===g.labelAlignTo,C=g.textRect.width;(_=v?g.x<t?y[2][0]-g.labelDistance-c-g.labelMargin:c+a-g.labelMargin-y[2][0]-g.labelDistance:g.x<t?g.x-c-g.bleedMargin:c+a-g.x-g.bleedMargin)<g.textRect.width&&(g.text=r.truncateText(g.text,_,g.font),"edge"===g.labelAlignTo&&(C=r.getWidth(g.text,g.font)));var x=y[1][0]-y[2][0];v?g.x<t?y[2][0]=c+g.labelMargin+C+g.labelDistance:y[2][0]=c+a-g.labelMargin-C-g.labelDistance:(g.x<t?y[2][0]=g.x+g.labelDistance:y[2][0]=g.x-g.labelDistance,y[1][0]=y[2][0]+x),y[1][1]=y[2][1]=g.y}}}}(f,d,h,t,i,l,c,u)}},function(e,t,i){var r=i(1);i(343),i(344);var n=i(44),a=i(69);i(70),r.registerVisual(n("scatter","circle")),r.registerLayout(a("scatter"))},function(e,t,i){var r=i(30),n=i(14).extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return r(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});e.exports=n},function(e,t,i){var r=i(1),n=i(67),a=i(345),o=i(69);r.extendChartView({type:"scatter",render:function(e,t,i){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,i){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},incrementalRender:function(e,t,i){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,i){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var n=o().reset(e);n.progress&&n.progress({start:0,end:r.count()},r),this._symbolDraw.updateLayout(r)},_getClipShape:function(e){var t=e.coordinateSystem,i=t&&t.getArea&&t.getArea();return e.get("clip",!0)?i:null},_updateSymbolDraw:function(e,t){var i=this._symbolDraw,r=t.pipelineContext.large;return i&&r===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=r?new a:new n,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})},function(e,t,i){var r=i(2),n=i(19).createSymbol,a=i(106),o=r.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(e,t){var i=t.points,r=t.size,n=this.symbolProxy,a=n.shape;if(!((e.getContext?e.getContext():e)&&r[0]<4))for(var o=0;o<i.length;){var s=i[o++],l=i[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-r[0]/2,a.y=l-r[1]/2,a.width=r[0],a.height=r[1],n.buildPath(e,a,!0)))}},afterBrush:function(e){var t=this.shape,i=t.points,r=t.size;if(r[0]<4){this.setTransform(e);for(var n=0;n<i.length;){var a=i[n++],o=i[n++];isNaN(a)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(a,o)||e.fillRect(a-r[0]/2,o-r[1]/2,r[0],r[1]))}this.restoreTransform(e)}},findDataIndex:function(e,t){for(var i=this.shape,r=i.points,n=i.size,a=Math.max(n[0],4),o=Math.max(n[1],4),s=r.length/2-1;s>=0;s--){var l=2*s,c=r[l]-a/2,u=r[l+1]-o/2;if(e>=c&&t>=u&&e<=c+a&&t<=u+o)return s}return-1}});function s(){this.group=new r.Group}var l=s.prototype;l.isPersistent=function(){return!this._incremental},l.updateData=function(e,t){this.group.removeAll();var i=new o({rectHover:!0,cursor:"default"});i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!1,t),this.group.add(i),this._incremental=null},l.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("symbolPoints");this.group.eachChild((function(e){if(null!=e.startIndex){var i=2*(e.endIndex-e.startIndex),r=4*e.startIndex*2;t=new Float32Array(t.buffer,r,i)}e.setShape("points",t)}))}},l.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>2e6?(this._incremental||(this._incremental=new a({silent:!0})),this.group.add(this._incremental)):this._incremental=null},l.incrementalUpdate=function(e,t,i){var r;this._incremental?(r=new o,this._incremental.addDisplayable(r,!0)):((r=new o({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(r)),r.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(r,t,!!this._incremental,i)},l._setCommon=function(e,t,i,r){var a=t.hostModel;r=r||{};var o=t.getVisual("symbolSize");e.setShape("size",o instanceof Array?o:[o,o]),e.softClipShape=r.clipShape||null,e.symbolProxy=n(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var s=e.shape.size[0]<4;e.useStyle(a.getModel("itemStyle").getItemStyle(s?["color","shadowBlur","shadowColor"]:["color"]));var l=t.getVisual("color");l&&e.setColor(l),i||(e.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i+(e.startIndex||0))})))},l.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},l._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var c=s;e.exports=c},function(e,t,i){var r=i(1);i(347),i(352),i(353);var n=i(91),a=i(44),o=i(354),s=i(72),l=i(355);r.registerVisual(n("radar")),r.registerVisual(a("radar","circle")),r.registerLayout(o),r.registerProcessor(s("radar")),r.registerPreprocessor(l)},function(e,t,i){i(348),i(350),i(351)},function(e,t,i){var r=i(0),n=i(349),a=i(86),o=i(3),s=i(21),l=s.getScaleExtent,c=s.niceScaleExtent,u=i(20),d=i(178);function h(e,t,i){this._model=e,this.dimensions=[],this._indicatorAxes=r.map(e.getIndicatorModels(),(function(e,t){var i="indicator_"+t,r=new n(i,"log"===e.get("axisType")?new d:new a);return r.name=e.get("name"),r.model=e,e.axis=r,this.dimensions.push(i),r}),this),this.resize(e,i),this.cx,this.cy,this.r,this.r0,this.startAngle}h.prototype.getIndicatorAxes=function(){return this._indicatorAxes},h.prototype.dataToPoint=function(e,t){var i=this._indicatorAxes[t];return this.coordToPoint(i.dataToCoord(e),t)},h.prototype.coordToPoint=function(e,t){var i=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(i),this.cy-e*Math.sin(i)]},h.prototype.pointToData=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,r=Math.sqrt(t*t+i*i);t/=r,i/=r;for(var n,a=Math.atan2(-i,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var c=this._indicatorAxes[l],u=Math.abs(a-c.angle);u<o&&(n=c,s=l,o=u)}return[s,+(n&&n.coordToData(r))]},h.prototype.resize=function(e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight(),s=Math.min(n,a)/2;this.cx=o.parsePercent(i[0],n),this.cy=o.parsePercent(i[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var l=e.get("radius");"string"!=typeof l&&"number"!=typeof l||(l=[0,l]),this.r0=o.parsePercent(l[0],s),this.r=o.parsePercent(l[1],s),r.each(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var i=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),e.angle=i}),this)},h.prototype.update=function(e,t){var i=this._indicatorAxes,n=this._model;r.each(i,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,a){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===n){var o=t.getData();r.each(i,(function(e){e.scale.unionExtentFromData(o,o.mapDimension(e.dim))}))}}),this);var a=n.get("splitNumber");function s(e){var t=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),i=e/t;return 2===i?i=5:i*=2,i*t}r.each(i,(function(e,t){var i=l(e.scale,e.model).extent;c(e.scale,e.model);var r=e.model,n=e.scale,u=r.getMin(),d=r.getMax(),h=n.getInterval();if(null!=u&&null!=d)n.setExtent(+u,+d),n.setInterval((d-u)/a);else if(null!=u){do{p=u+h*a,n.setExtent(+u,p),n.setInterval(h),h=s(h)}while(p<i[1]&&isFinite(p)&&isFinite(i[1]))}else if(null!=d){do{f=d-h*a,n.setExtent(f,+d),n.setInterval(h),h=s(h)}while(f>i[0]&&isFinite(f)&&isFinite(i[0]))}else{n.getTicks().length-1>a&&(h=s(h));var p=Math.ceil(i[1]/h)*h,f=o.round(p-h*a);n.setExtent(f,p),n.setInterval(h)}}))},h.dimensions=[],h.create=function(e,t){var i=[];return e.eachComponent("radar",(function(r){var n=new h(r,e,t);i.push(n),r.coordinateSystem=n})),e.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("radarIndex")||0])})),i},u.register("radar",h);var p=h;e.exports=p},function(e,t,i){var r=i(0),n=i(35);function a(e,t,i){n.call(this,e,t,i),this.type="value",this.angle=0,this.name="",this.model}r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(1),n=i(0),a=i(185),o=i(12),s=i(53),l=a.valueAxis;function c(e,t){return n.defaults({show:t},e)}var u=r.extendComponentModel({type:"radar",optionUpdated:function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),i=this.get("scale"),r=this.get("axisLine"),a=this.get("axisTick"),l=this.get("axisType"),c=this.get("axisLabel"),u=this.get("name"),d=this.get("name.show"),h=this.get("name.formatter"),p=this.get("nameGap"),f=this.get("triggerEvent"),m=n.map(this.get("indicator")||[],(function(m){null!=m.max&&m.max>0&&!m.min?m.min=0:null!=m.min&&m.min<0&&!m.max&&(m.max=0);var g=u;if(null!=m.color&&(g=n.defaults({color:m.color},u)),m=n.merge(n.clone(m),{boundaryGap:e,splitNumber:t,scale:i,axisLine:r,axisTick:a,axisType:l,axisLabel:c,name:m.text,nameLocation:"end",nameGap:p,nameTextStyle:g,triggerEvent:f},!1),d||(m.name=""),"string"==typeof h){var y=m.name;m.name=h.replace("{value}",null!=y?y:"")}else"function"==typeof h&&(m.name=h(m.name,m));var _=n.extend(new o(m,null,this.ecModel),s);return _.mainType="radar",_.componentIndex=this.componentIndex,_}),this);this.getIndicatorModels=function(){return m}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:n.merge({lineStyle:{color:"#bbb"}},l.axisLine),axisLabel:c(l.axisLabel,!1),axisTick:c(l.axisTick,!1),axisType:"interval",splitLine:c(l.splitLine,!0),splitArea:c(l.splitArea,!0),indicator:[]}});e.exports=u},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(36),o=i(2),s=["axisLine","axisTickLabel","axisName"],l=r.extendComponentView({type:"radar",render:function(e,t,i){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},_buildAxes:function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes(),r=n.map(i,(function(e){return new a(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));n.each(r,(function(e){n.each(s,e.add,e),this.group.add(e.getGroup())}),this)},_buildSplitLineAndArea:function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes();if(i.length){var r=e.get("shape"),a=e.getModel("splitLine"),s=e.getModel("splitArea"),l=a.getModel("lineStyle"),c=s.getModel("areaStyle"),u=a.get("show"),d=s.get("show"),h=l.get("color"),p=c.get("color");h=n.isArray(h)?h:[h],p=n.isArray(p)?p:[p];var f=[],m=[];if("circle"===r)for(var g=i[0].getTicksCoords(),y=t.cx,_=t.cy,v=0;v<g.length;v++){if(u)f[A(f,h,v)].push(new o.Circle({shape:{cx:y,cy:_,r:g[v].coord}}));if(d&&v<g.length-1)m[A(m,p,v)].push(new o.Ring({shape:{cx:y,cy:_,r0:g[v].coord,r:g[v+1].coord}}))}else{var C,x=n.map(i,(function(e,i){var r=e.getTicksCoords();return C=null==C?r.length-1:Math.min(r.length-1,C),n.map(r,(function(e){return t.coordToPoint(e.coord,i)}))})),b=[];for(v=0;v<=C;v++){for(var S=[],T=0;T<i.length;T++)S.push(x[T][v]);if(S[0]&&S.push(S[0].slice()),u)f[A(f,h,v)].push(new o.Polyline({shape:{points:S}}));if(d&&b)m[A(m,p,v-1)].push(new o.Polygon({shape:{points:S.concat(b)}}));b=S.slice().reverse()}}var E=l.getLineStyle(),w=c.getAreaStyle();n.each(m,(function(e,t){this.group.add(o.mergePath(e,{style:n.defaults({stroke:"none",fill:p[t%p.length]},w),silent:!0}))}),this),n.each(f,(function(e,t){this.group.add(o.mergePath(e,{style:n.defaults({fill:"none",stroke:h[t%h.length]},E),silent:!0}))}),this)}function A(e,t,i){var r=i%t.length;return e[r]=e[r]||[],r}}});e.exports=l},function(e,t,i){var r=i(14),n=i(54),a=i(0),o=i(7).encodeHTML,s=i(71),l=r.extend({type:"series.radar",dependencies:["radar"],init:function(e){l.superApply(this,"init",arguments),this.legendVisualProvider=new s(a.bind(this.getData,this),a.bind(this.getRawData,this))},getInitialData:function(e,t){return n(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(e,t,i,r){var n=this.getData(),s=this.coordinateSystem.getIndicatorAxes(),l=this.getData().getName(e),c="html"===r?"<br/>":"\n";return o(""===l?this.name:l)+c+a.map(s,(function(t,i){var r=n.get(n.mapDimension(t.dim),e);return o(t.name+" : "+r)})).join(c)},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),i=this.coordinateSystem,r=t.getValues(a.map(i.dimensions,(function(e){return t.mapDimension(e)})),e,!0),n=0,o=r.length;n<o;n++)if(!isNaN(r[n])){var s=i.getIndicatorAxes();return i.coordToPoint(s[n].dataToCoord(r[n]),n)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}}),c=l;e.exports=c},function(e,t,i){var r=i(1),n=i(2),a=i(0),o=i(19);var s=r.extendChartView({type:"radar",render:function(e,t,i){var r=e.coordinateSystem,s=this.group,l=e.getData(),c=this._data;function u(e,t){var i=e.getItemVisual(t,"symbol")||"circle",r=e.getItemVisual(t,"color");if("none"!==i){var n=function(e){return a.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),s=o.createSymbol(i,-1,-1,2,2,r),l=e.getItemVisual(t,"symbolRotate")||0;return s.attr({style:{strokeNoScale:!0},z2:100,scale:[n[0]/2,n[1]/2],rotation:l*Math.PI/180||0}),s}}function d(t,i,r,a,o,s){r.removeAll();for(var l=0;l<i.length-1;l++){var c=u(a,o);c&&(c.__dimIdx=l,t[l]?(c.attr("position",t[l]),n[s?"initProps":"updateProps"](c,{position:i[l]},e,o)):c.attr("position",i[l]),r.add(c))}}function h(e){return a.map(e,(function(e){return[r.cx,r.cy]}))}l.diff(c).add((function(t){var i=l.getItemLayout(t);if(i){var r=new n.Polygon,a=new n.Polyline,o={shape:{points:i}};r.shape.points=h(i),a.shape.points=h(i),n.initProps(r,o,e,t),n.initProps(a,o,e,t);var s=new n.Group,c=new n.Group;s.add(a),s.add(r),s.add(c),d(a.shape.points,i,c,l,t,!0),l.setItemGraphicEl(t,s)}})).update((function(t,i){var r=c.getItemGraphicEl(i),a=r.childAt(0),o=r.childAt(1),s=r.childAt(2),u={shape:{points:l.getItemLayout(t)}};u.shape.points&&(d(a.shape.points,u.shape.points,s,l,t,!1),n.updateProps(a,u,e),n.updateProps(o,u,e),l.setItemGraphicEl(t,r))})).remove((function(e){s.remove(c.getItemGraphicEl(e))})).execute(),l.eachItemGraphicEl((function(e,t){var i=l.getItemModel(t),r=e.childAt(0),o=e.childAt(1),c=e.childAt(2),u=l.getItemVisual(t,"color");s.add(e),r.useStyle(a.defaults(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),r.hoverStyle=i.getModel("emphasis.lineStyle").getLineStyle();var d=i.getModel("areaStyle"),h=i.getModel("emphasis.areaStyle"),p=d.isEmpty()&&d.parentModel.isEmpty(),f=h.isEmpty()&&h.parentModel.isEmpty();f=f&&p,o.ignore=p,o.useStyle(a.defaults(d.getAreaStyle(),{fill:u,opacity:.7})),o.hoverStyle=h.getAreaStyle();var m=i.getModel("itemStyle").getItemStyle(["color"]),g=i.getModel("emphasis.itemStyle").getItemStyle(),y=i.getModel("label"),_=i.getModel("emphasis.label");c.eachChild((function(e){e.setStyle(m),e.hoverStyle=a.clone(g);var i=l.get(l.dimensions[e.__dimIdx],t);(null==i||isNaN(i))&&(i=""),n.setLabelStyle(e.style,e.hoverStyle,y,_,{labelFetcher:l.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:i,autoColor:u,isRectText:!0})})),e.highDownOnUpdate=function(e,t){o.attr("ignore","emphasis"===t?f:p)},n.setHoverStyle(e)})),this._data=l},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});e.exports=s},function(e,t,i){var r=i(0);function n(e){return!isNaN(e[0])&&!isNaN(e[1])}function a(e){return[e.cx,e.cy]}e.exports=function(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),i=[],o=e.coordinateSystem;if(o){var s=o.getIndicatorAxes();r.each(s,(function(e,r){t.each(t.mapDimension(s[r].dim),(function(e,t){i[t]=i[t]||[];var s=o.dataToPoint(e,r);i[t][r]=n(s)?s:a(o)}))})),t.each((function(e){var s=r.find(i[e],(function(e){return n(e)}))||a(o);i[e].push(s.slice()),t.setItemLayout(e,i[e])}))}}))}},function(e,t,i){var r=i(0);e.exports=function(e){var t=e.polar;if(t){r.isArray(t)||(t=[t]);var i=[];r.each(t,(function(t,n){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],r.isArray(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):i.push(t)})),e.polar=i}r.each(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))}},function(e,t,i){var r=i(1);i(357),i(364),i(193),i(115);var n=i(366),a=i(367),o=i(368),s=i(369),l=i(190);r.registerLayout(n),r.registerVisual(a),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,o),r.registerPreprocessor(s),l("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}])},function(e,t,i){var r=i(0),n=i(54),a=i(14),o=i(7),s=o.encodeHTML,l=o.addCommas,c=i(112),u=i(42).retrieveRawAttr,d=i(92),h=i(29).makeSeriesEncodeForNameBased,p=a.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(e){for(var t=n(this,{coordDimensions:["value"],encodeDefaulter:r.curry(h,this)}),i=t.mapDimension("value"),a=r.createHashMap(),o=[],s=[],l=0,c=t.count();l<c;l++){var p=t.getName(l);a.set(p,!0),o.push({name:p,value:t.get(i,l),selected:u(t,l,"selected")})}var f=d.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return r.each(f.regions,(function(e){var t=e.name;a.get(t)||(o.push({name:t}),s.push(t))})),this.updateSelectedMap(o),t.appendValues([],s),t},getHostGeoModel:function(){var e=this.option.geoIndex;return null!=e?this.dependentModels.geo[e]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},getRegionModel:function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},formatTooltip:function(e,t,i,r){for(var n=this.getData(),a=l(this.getRawValue(e)),o=n.getName(e),c=this.seriesGroup,u=[],d=0;d<c.length;d++){var h=c[d].originalData.indexOfName(o),p=n.mapDimension("value");isNaN(c[d].originalData.get(p,h))||u.push(s(c[d].name))}var f="html"===r?"<br/>":"\n";return u.join(", ")+f+s(o+" : "+a)},getTooltipPosition:function(e){if(null!=e){var t=this.getData().getName(e),i=this.coordinateSystem,r=i.getRegion(t);return r&&i.dataToPoint(r.center)}},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});r.mixin(p,c);var f=p;e.exports=f},function(e,t,i){var r=i(0).each,n=i(179),a=i(4).makeInner,o=i(359),s=i(360),l=i(361),c=i(362),u=a(),d={load:function(e,t,i){var a=u(t).parsed;if(a)return a;var d,p=t.specialAreas||{},f=t.geoJSON;try{d=f?n(f,i):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return o(e,d),r(d,(function(t){var i=t.name;s(e,t),l(e,t),c(e,t);var r=p[i];r&&t.transformTo(r.left,r.top,r.width,r.height)})),u(t).parsed={regions:d,boundingRect:h(d)}}};function h(e){for(var t,i=0;i<e.length;i++){var r=e[i].getBoundingRect();(t=t||r.clone()).union(r)}return t}e.exports=d},function(e,t,i){for(var r=i(0),n=i(180),a=[126,25],o=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],s=0;s<o.length;s++)for(var l=0;l<o[s].length;l++)o[s][l][0]/=10.5,o[s][l][1]/=-14,o[s][l][0]+=a[0],o[s][l][1]+=a[1];e.exports=function(e,t){"china"===e&&t.push(new n("南海诸岛",r.map(o,(function(e){return{type:"polygon",exterior:e}})),a))}},function(e,t){var i={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};e.exports=function(e,t){if("china"===e){var r=i[t.name];if(r){var n=t.center;n[0]+=r[0]/10.5,n[1]+=-r[1]/14}}}},function(e,t){var i={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};e.exports=function(e,t){if("world"===e){var r=i[t.name];if(r){var n=t.center;n[0]=r[0],n[1]=r[1]}}}},function(e,t){var i=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];e.exports=function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:i[0]})}},function(e,t,i){var r=i(172),n=r.parseSVG,a=r.makeViewBoxTransform,o=i(40),s=i(103),l=i(0),c=l.assert,u=l.createHashMap,d=i(9),h=(0,i(4).makeInner)(),p={load:function(e,t){var i=h(t).originRoot;if(i)return{root:i,boundingRect:h(t).boundingRect};var r=f(t);return h(t).originRoot=r.root,h(t).boundingRect=r.boundingRect,r},makeGraphic:function(e,t,i){var r=h(t),n=r.rootMap||(r.rootMap=u()),a=n.get(i);if(a)return a;var o=r.originRoot,s=r.boundingRect;return r.originRootHostKey?a=f(t,s).root:(r.originRootHostKey=i,a=o),n.set(i,a)},removeGraphic:function(e,t,i){var r=h(t),n=r.rootMap;n&&n.removeKey(i),i===r.originRootHostKey&&(r.originRootHostKey=null)}};function f(e,t){var i,r,l=e.svgXML;try{r=(i=l&&n(l,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,c(null!=r)}catch(e){throw new Error("Invalid svg format\n"+e.message)}var u=i.width,h=i.height,p=i.viewBoxRect;if(t||(t=null==u||null==h?r.getBoundingRect():new d(0,0,0,0),null!=u&&(t.width=u),null!=h&&(t.height=h)),p){var f=a(p,t.width,t.height),m=r;(r=new o).add(m),m.scale=f.scale,m.position=f.position}return r.setClipPath(new s({shape:t.plain()})),{root:r,boundingRect:t}}e.exports=p},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(191),s=r.extendChartView({type:"map",render:function(e,t,i,r){if(!r||"mapToggleSelect"!==r.type||r.from!==this.uid){var n=this.group;if(n.removeAll(),!e.getHostGeoModel()){if(r&&"geoRoam"===r.type&&"series"===r.componentType&&r.seriesId===e.id)(a=this._mapDraw)&&n.add(a.group);else if(e.needsDrawMap){var a=this._mapDraw||new o(i,!0);n.add(a.group),a.draw(e,t,i,this,r),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(e,t,i){var r=e.originalData,o=this.group;r.each(r.mapDimension("value"),(function(t,i){if(!isNaN(t)){var s=r.getItemLayout(i);if(s&&s.point){var u=s.point,d=s.offset,h=new a.Circle({style:{fill:e.getData().getVisual("color")},shape:{cx:u[0]+9*d,cy:u[1],r:3},silent:!0,z2:8+(d?0:a.Z2_EMPHASIS_LIFT+1)});if(!d){var p=e.mainSeries.getData(),f=r.getName(i),m=p.indexOfName(f),g=r.getItemModel(i),y=g.getModel("label"),_=g.getModel("emphasis.label"),v=p.getItemGraphicEl(m),C=n.retrieve2(e.getFormattedLabel(m,"normal"),f),x=n.retrieve2(e.getFormattedLabel(m,"emphasis"),C),b=v.__seriesMapHighDown,S=Math.random();if(!b){b=v.__seriesMapHighDown={};var T=n.curry(l,!0),E=n.curry(l,!1);v.on("mouseover",T).on("mouseout",E).on("emphasis",T).on("normal",E)}v.__seriesMapCallKey=S,n.extend(b,{recordVersion:S,circle:h,labelModel:y,hoverLabelModel:_,emphasisText:x,normalText:C}),c(b,!1)}o.add(h)}}}))}});function l(e){var t=this.__seriesMapHighDown;t&&t.recordVersion===this.__seriesMapCallKey&&c(t,e)}function c(e,t){var i=e.circle,r=e.labelModel,n=e.hoverLabelModel,o=e.emphasisText,s=e.normalText;t?(i.style.extendFrom(a.setTextStyle({},n,{text:n.get("show")?o:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=a.Z2_EMPHASIS_LIFT):(a.setTextStyle(i.style,r,{text:r.get("show")?s:null,textPosition:r.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}e.exports=s},function(e,t,i){var r=i(0),n=i(9),a=i(116),o=i(92);function s(e,t,i,r){a.call(this,e),this.map=t;var n=o.load(t,i);this._nameCoordMap=n.nameCoordMap,this._regionsMap=n.regionsMap,this._invertLongitute=null==r||r,this.regions=n.regions,this._rect=n.boundingRect}function l(e,t,i,r){var n=i.geoModel,a=i.seriesModel,o=n?n.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[e](r):null}s.prototype={constructor:s,type:"geo",dimensions:["lng","lat"],containCoord:function(e){for(var t=this.regions,i=0;i<t.length;i++)if(t[i].contain(e))return!0;return!1},transformTo:function(e,t,i,r){var a=this.getBoundingRect(),o=this._invertLongitute;a=a.clone(),o&&(a.y=-a.y-a.height);var s=this._rawTransformable;if(s.transform=a.calculateTransform(new n(e,t,i,r)),s.decomposeTransform(),o){var l=s.scale;l[1]=-l[1]}s.updateTransform(),this._updateTransform()},getRegion:function(e){return this._regionsMap.get(e)},getRegionByCoord:function(e){for(var t=this.regions,i=0;i<t.length;i++)if(t[i].contain(e))return t[i]},addGeoCoord:function(e,t){this._nameCoordMap.set(e,t)},getGeoCoord:function(e){return this._nameCoordMap.get(e)},getBoundingRect:function(){return this._rect},dataToPoint:function(e,t,i){if("string"==typeof e&&(e=this.getGeoCoord(e)),e)return a.prototype.dataToPoint.call(this,e,t,i)},convertToPixel:r.curry(l,"dataToPoint"),convertFromPixel:r.curry(l,"pointToData")},r.mixin(s,a);var c=s;e.exports=c},function(e,t,i){var r=i(0);e.exports=function(e){var t={};e.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!t[n]){var a={};r.each(i.seriesGroup,(function(t){var i=t.coordinateSystem,r=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&r.each(r.mapDimension("value"),(function(e,t){var n=r.getName(t),o=i.getRegion(n);if(o&&!isNaN(e)){var s=a[n]||0,l=i.dataToPoint(o.center);a[n]=s+1,r.setItemLayout(t,{point:l,offset:s})}}))}));var o=i.getData();o.each((function(e){var t=o.getName(e),i=o.getItemLayout(e)||{};i.showLabel=!a[t],o.setItemLayout(e,i)})),t[n]=!0}}))}},function(e,t){e.exports=function(e){e.eachSeriesByType("map",(function(e){var t=e.get("color"),i=e.getModel("itemStyle"),r=i.get("areaColor"),n=i.get("color")||t[e.seriesIndex%t.length];e.getData().setVisual({areaColor:r,color:n})}))}},function(e,t,i){var r=i(0);e.exports=function(e){var t={};e.eachSeriesByType("map",(function(e){var i=e.getHostGeoModel(),r=i?"o"+i.id:"i"+e.getMapType();(t[r]=t[r]||[]).push(e)})),r.each(t,(function(e,t){for(var i,n,a,o=(i=r.map(e,(function(e){return e.getData()})),n=e[0].get("mapValueCalculation"),a={},r.each(i,(function(e){e.each(e.mapDimension("value"),(function(t,i){var r="ec-"+e.getName(i);a[r]=a[r]||[],isNaN(t)||a[r].push(t)}))})),i[0].map(i[0].mapDimension("value"),(function(e,t){for(var r,o="ec-"+i[0].getName(t),s=0,l=1/0,c=-1/0,u=a[o].length,d=0;d<u;d++)l=Math.min(l,a[o][d]),c=Math.max(c,a[o][d]),s+=a[o][d];return r="min"===n?l:"max"===n?c:"average"===n?s/u:s,0===u?NaN:r}))),s=0;s<e.length;s++)e[s].originalData=e[s].getData();for(s=0;s<e.length;s++)e[s].seriesGroup=e,e[s].needsDrawMap=0===s&&!e[s].getHostGeoModel(),e[s].setData(o.cloneShallow()),e[s].mainSeries=e[0]}))}},function(e,t,i){var r=i(0);e.exports=function(e){var t=[];r.each(e.series,(function(e){e&&"map"===e.type&&(t.push(e),e.map=e.map||e.mapType,r.defaults(e,e.mapLocation))}))}},function(e,t,i){var r=i(1);i(371),i(372),i(373);var n=i(44),a=i(374);r.registerVisual(n("tree","circle")),r.registerLayout(a)},function(e,t,i){var r=i(14),n=i(117),a=i(7).encodeHTML,o=i(12),s=r.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},i=e.leaves||{},r=new o(i,this,this.ecModel),a=n.createTree(t,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=a.getNodeByDataIndex(t);return i.children.length&&i.isExpand||(e.parentModel=r),e}))}));var s=0;a.eachNode("preorder",(function(e){e.depth>s&&(s=e.depth)}));var l=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:s;return a.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=l})),a.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){for(var t=this.getData().tree,i=t.root.children[0],r=t.getNodeByDataIndex(e),n=r.getValue(),o=r.name;r&&r!==i;)o=r.parentNode.name+"."+o,r=r.parentNode;return a(o+(isNaN(n)||null==n?"":" : "+n))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});e.exports=s},function(e,t,i){var r=i(0),n=i(2),a=i(88),o=i(195).radialCoordinate,s=i(1),l=i(62),c=i(116),u=i(113),d=i(73),h=i(93).onIrrelevantElement,p=(i(5).__DEV__,i(3).parsePercent),f=n.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.childPoints,r=i.length,n=t.parentPoint,a=i[0],o=i[r-1];if(1===r)return e.moveTo(n[0],n[1]),void e.lineTo(a[0],a[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,c=1-l,u=p(t.forkPosition,1),d=[];d[l]=n[l],d[c]=n[c]+(o[c]-n[c])*u,e.moveTo(n[0],n[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[l]=a[l],e.lineTo(d[0],d[1]),d[l]=o[l],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(var h=1;h<r-1;h++){var f=i[h];e.moveTo(f[0],f[1]),d[l]=f[l],e.lineTo(d[0],d[1])}}}),m=s.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new n.Group,this._controller=new d(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,i,r){var n=e.getData(),a=e.layoutInfo,o=this._mainGroup,s=e.get("layout");"radial"===s?o.attr("position",[a.x+a.width/2,a.y+a.height/2]):o.attr("position",[a.x,a.y]),this._updateViewCoordSys(e,a,s),this._updateController(e,t,i);var l=this._data,c={expandAndCollapse:e.get("expandAndCollapse"),layout:s,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};n.diff(l).add((function(t){g(n,t)&&_(n,t,null,o,e,c)})).update((function(t,i){var r=l.getItemGraphicEl(i);g(n,t)?_(n,t,r,o,e,c):r&&v(l,i,r,o,e,c)})).remove((function(t){var i=l.getItemGraphicEl(t);i&&v(l,t,i,o,e,c)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===c.expandAndCollapse&&n.eachItemGraphicEl((function(t,r){t.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:r})}))})),this._data=n},_updateViewCoordSys:function(e){var t=e.getData(),i=[];t.each((function(e){var r=t.getItemLayout(e);!r||isNaN(r.x)||isNaN(r.y)||i.push([+r.x,+r.y])}));var r=[],n=[];l.fromPoints(i,r,n);var a=this._min,o=this._max;n[0]-r[0]==0&&(r[0]=a?a[0]:r[0]-1,n[0]=o?o[0]:n[0]+1),n[1]-r[1]==0&&(r[1]=a?a[1]:r[1]-1,n[1]=o?o[1]:n[1]+1);var s=e.coordinateSystem=new c;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(r[0],r[1],n[0]-r[0],n[1]-r[1]),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=r,this._max=n},_updateController:function(e,t,i){var r=this._controller,n=this._controllerHost,a=this.group;r.setPointerChecker((function(t,r,n){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,n)&&!h(t,i,e)})),r.enable(e.get("roam")),n.zoomLimit=e.get("scaleLimit"),n.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(t){u.updateViewOnPan(n,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){u.updateViewOnZoom(n,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),i=this._getNodeGlobalScale(e),r=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",r)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=this._nodeScaleRatio,r=t.scale,n=r&&r[0]||1;return((t.getZoom()-1)*i+1)/n},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function g(e,t){var i=e.getItemLayout(t);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==e.getItemVisual(t,"symbol")}function y(e,t,i){return i.itemModel=t,i.itemStyle=t.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=t.getModel("lineStyle").getLineStyle(),i.labelModel=t.getModel("label"),i.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function _(e,t,i,o,s,l){var c=!i,u=e.tree.getNodeByDataIndex(t),d=u.getModel(),h=(l=y(u,d,l),e.tree.root),p=u.parentNode===h?u:u.parentNode||u,m=e.getItemGraphicEl(p.dataIndex),g=p.getLayout(),_=m?{x:m.position[0],y:m.position[1],rawX:m.__radialOldRawX,rawY:m.__radialOldRawY}:g,v=u.getLayout();c?(i=new a(e,t,l)).attr("position",[_.x,_.y]):i.updateData(e,t,l),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=v.rawX,i.__radialRawY=v.rawY,o.add(i),e.setItemGraphicEl(t,i),n.updateProps(i,{position:[v.x,v.y]},s);var x=i.getSymbolPath();if("radial"===l.layout){var b,S,T=h.children[0],E=T.getLayout(),w=T.children.length;if(v.x===E.x&&!0===u.isExpand){var A={};A.x=(T.children[0].getLayout().x+T.children[w-1].getLayout().x)/2,A.y=(T.children[0].getLayout().y+T.children[w-1].getLayout().y)/2,(b=Math.atan2(A.y-E.y,A.x-E.x))<0&&(b=2*Math.PI+b),(S=A.x<E.x)&&(b-=Math.PI)}else(b=Math.atan2(v.y-E.y,v.x-E.x))<0&&(b=2*Math.PI+b),0===u.children.length||0!==u.children.length&&!1===u.isExpand?(S=v.x<E.x)&&(b-=Math.PI):(S=v.x>E.x)||(b-=Math.PI);var P=S?"left":"right",D=l.labelModel.get("rotate"),M=D*(Math.PI/180);x.setStyle({textPosition:l.labelModel.get("position")||P,textRotation:null==D?-b:M,textOrigin:"center",verticalAlign:"middle"})}!function(e,t,i,a,o,s,l,c,u){var d=u.edgeShape,h=a.__edge;if("curve"===d)t.parentNode&&t.parentNode!==i&&(h||(h=a.__edge=new n.BezierCurve({shape:C(u,o,o),style:r.defaults({opacity:0,strokeNoScale:!0},u.lineStyle)})),n.updateProps(h,{shape:C(u,s,l),style:r.defaults({opacity:1},u.lineStyle)},e));else if("polyline"===d&&"orthogonal"===u.layout&&t!==i&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var p=t.children,m=[],g=0;g<p.length;g++){var y=p[g].getLayout();m.push([y.x,y.y])}h||(h=a.__edge=new f({shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]],orient:u.orient,forkPosition:u.edgeForkPosition},style:r.defaults({opacity:0,strokeNoScale:!0},u.lineStyle)})),n.updateProps(h,{shape:{parentPoint:[l.x,l.y],childPoints:m},style:r.defaults({opacity:1},u.lineStyle)},e)}c.add(h)}(s,u,h,i,_,g,v,o,l)}function v(e,t,i,r,a,o){for(var s,l=e.tree.getNodeByDataIndex(t),c=e.tree.root,u=l.getModel(),d=(o=y(l,u,o),l.parentNode===c?l:l.parentNode||l),h=o.edgeShape;null==(s=d.getLayout());)d=d.parentNode===c?d:d.parentNode||d;n.updateProps(i,{position:[s.x+1,s.y+1]},a,(function(){r.remove(i),e.setItemGraphicEl(t,null)})),i.fadeOut(null,{keepLabel:!0});var p=e.getItemGraphicEl(d.dataIndex).__edge,f=i.__edge||(!1===d.isExpand||1===d.children.length?p:void 0);h=o.edgeShape;f&&("curve"===h?n.updateProps(f,{shape:C(o,s,s),style:{opacity:0}},a,(function(){r.remove(f)})):"polyline"===h&&"orthogonal"===o.layout&&n.updateProps(f,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},a,(function(){r.remove(f)})))}function C(e,t,i){var r,n,a,s,l,c,u,d,h=e.orient;if("radial"===e.layout){l=t.rawX,u=t.rawY,c=i.rawX,d=i.rawY;var p=o(l,u),f=o(l,u+(d-u)*e.curvature),m=o(c,d+(u-d)*e.curvature),g=o(c,d);return{x1:p.x,y1:p.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:m.x,cpy2:m.y}}return l=t.x,u=t.y,c=i.x,d=i.y,"LR"!==h&&"RL"!==h||(r=l+(c-l)*e.curvature,n=u,a=c+(l-c)*e.curvature,s=d),"TB"!==h&&"BT"!==h||(r=l,n=u+(d-u)*e.curvature,a=c,s=d+(u-d)*e.curvature),{x1:l,y1:u,x2:c,y2:d,cpx1:r,cpy1:n,cpx2:a,cpy2:s}}e.exports=m},function(e,t,i){var r=i(1),n=i(114).updateCenterAndZoom;r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(i);r.isExpand=!r.isExpand}))})),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=t.coordinateSystem,r=n(i,e);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)}))}))},function(e,t,i){var r=i(375),n=r.eachAfter,a=r.eachBefore,o=i(195),s=o.init,l=o.firstWalk,c=o.secondWalk,u=o.separation,d=o.radialCoordinate,h=o.getViewRect;e.exports=function(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var i=h(e,t);e.layoutInfo=i;var r=e.get("layout"),o=0,p=0,f=null;"radial"===r?(o=2*Math.PI,p=Math.min(i.height,i.width)/2,f=u((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(o=i.width,p=i.height,f=u());var m=e.getData().tree.root,g=m.children[0];if(g){s(m),n(g,l,f),m.hierNode.modifier=-g.hierNode.prelim,a(g,c);var y=g,_=g,v=g;a(g,(function(e){var t=e.getLayout().x;t<y.getLayout().x&&(y=e),t>_.getLayout().x&&(_=e),e.depth>v.depth&&(v=e)}));var C=y===_?1:f(y,_)/2,x=C-y.getLayout().x,b=0,S=0,T=0,E=0;if("radial"===r)b=o/(_.getLayout().x+C+x),S=p/(v.depth-1||1),a(g,(function(e){T=(e.getLayout().x+x)*b,E=(e.depth-1)*S;var t=d(T,E);e.setLayout({x:t.x,y:t.y,rawX:T,rawY:E},!0)}));else{var w=e.getOrient();"RL"===w||"LR"===w?(S=p/(_.getLayout().x+C+x),b=o/(v.depth-1||1),a(g,(function(e){E=(e.getLayout().x+x)*S,T="LR"===w?(e.depth-1)*b:o-(e.depth-1)*b,e.setLayout({x:T,y:E},!0)}))):"TB"!==w&&"BT"!==w||(b=o/(_.getLayout().x+C+x),S=p/(v.depth-1||1),a(g,(function(e){T=(e.getLayout().x+x)*b,E="TB"===w?(e.depth-1)*S:p-(e.depth-1)*S,e.setLayout({x:T,y:E},!0)})))}}}(e,t)}))}},function(e,t){t.eachAfter=function(e,t,i){for(var r,n=[e],a=[];r=n.pop();)if(a.push(r),r.isExpand){var o=r.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;r=a.pop();)t(r,i)},t.eachBefore=function(e,t){for(var i,r=[e];i=r.pop();)if(t(i),i.isExpand){var n=i.children;if(n.length)for(var a=n.length-1;a>=0;a--)r.push(n[a])}}},function(e,t,i){var r=i(1);i(377),i(378),i(381);var n=i(382),a=i(383);r.registerVisual(n),r.registerLayout(a)},function(e,t,i){var r=i(0),n=i(14),a=i(117),o=i(12),s=i(7),l=s.encodeHTML,c=s.addCommas,u=i(46).wrapTreePathInfo,d=n.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(e,t){var i={name:e.name,children:e.data};!function e(t){var i=0;r.each(t.children,(function(t){e(t);var n=t.value;r.isArray(n)&&(n=n[0]),i+=n}));var n=t.value;r.isArray(n)&&(n=n[0]);(null==n||isNaN(n))&&(n=i);n<0&&(n=0);r.isArray(t.value)?t.value[0]=n:t.value=n}(i);var n=e.levels||[],s=this.designatedVisualItemStyle={},l=new o({itemStyle:s},this,t);n=e.levels=function(e,t){var i,n=t.get("color");if(!n)return;if(e=e||[],r.each(e,(function(e){var t=new o(e),r=t.get("color");(t.get("itemStyle.color")||r&&"none"!==r)&&(i=!0)})),!i){(e[0]||(e[0]={})).color=n.slice()}return e}(n,t);var c=r.map(n||[],(function(e){return new o(e,l,t)}),this),u=a.createTree(i,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=u.getNodeByDataIndex(t),r=c[i.depth];return e.parentModel=r||l,e}))}));return u.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),i=this.getRawValue(e),n=r.isArray(i)?c(i[0]):c(i),a=t.getName(e);return l(a+": "+n)},getDataParams:function(e){var t=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=u(i,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},r.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=r.createHashMap(),this._idIndexMapCount=0);var i=t.get(e);return null==i&&t.set(e,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});e.exports=d},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(43),s=i(46),l=i(379),c=i(73),u=i(9),d=i(15),h=i(380),p=i(49),f=i(7).windowOpen,m=n.bind,g=a.Group,y=a.Rect,_=n.each,v=["label"],C=["emphasis","label"],x=["upperLabel"],b=["emphasis","upperLabel"],S=p([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),T=function(e){var t=S(e);return t.stroke=t.fill=t.lineWidth=null,t},E=r.extendChartView({type:"treemap",init:function(e,t){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,i,r){var a=t.findComponents({mainType:"series",subType:"treemap",query:r});if(!(n.indexOf(a,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=t;var o=s.retrieveTargetInfo(r,["treemapZoomToNode","treemapRootToNode"],e),l=r&&r.type,c=e.layoutInfo,u=!this._oldTree,d=this._storage,h="treemapRootToNode"===l&&o&&d?{rootNodeGroup:d.nodeGroup[o.node.getRawIndex()],direction:r.direction}:null,p=this._giveContainerGroup(c),f=this._doRender(p,e,h);u||l&&"treemapZoomToNode"!==l&&"treemapRootToNode"!==l?f.renderFinally():this._doAnimation(p,f,e,h),this._resetController(i),this._renderBreadcrumb(e,i,o)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new g,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,i){var r=t.getData().tree,a=this._oldTree,s={nodeGroup:[],background:[],content:[]},l={nodeGroup:[],background:[],content:[]},c=this._storage,u=[],d=n.curry(w,t,l,c,i,s,u);!function e(t,i,r,a,s){a?(i=t,_(t,(function(e,t){!e.isRemoved()&&c(t,t)}))):new o(i,t,l,l).add(c).update(c).remove(n.curry(c,null)).execute();function l(e){return e.getId()}function c(n,o){var l=null!=n?t[n]:null,c=null!=o?i[o]:null,u=d(l,c,r,s);u&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],u,a,s+1)}}(r.root?[r.root]:[],a&&a.root?[a.root]:[],e,r===a||!a,0);var h=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&_(e,(function(e,i){var r=t[i];_(e,(function(e){e&&(r.push(e),e.__tmWillDelete=1)}))})),t}(c);return this._oldTree=r,this._storage=l,{lastsForAnimation:s,willDeleteEls:h,renderFinally:function(){_(h,(function(e){_(e,(function(e){e.parent&&e.parent.remove(e)}))})),_(u,(function(e){e.invisible=!0,e.dirty()}))}}},_doAnimation:function(e,t,i,r){if(i.get("animation")){var a=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=h.createWrap();_(t.willDeleteEls,(function(e,t){_(e,(function(e,i){if(!e.invisible){var n,l=e.parent;if(r&&"drillDown"===r.direction)n=l===r.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,u=0;l.__tmWillDelete||(c=l.__tmNodeWidth/2,u=l.__tmNodeHeight/2),n="nodeGroup"===t?{position:[c,u],style:{opacity:0}}:{shape:{x:c,y:u,width:0,height:0},style:{opacity:0}}}n&&s.add(e,n,a,o)}}))})),_(this._storage,(function(e,i){_(e,(function(e,r){var l=t.lastsForAnimation[i][r],c={};l&&("nodeGroup"===i?l.old&&(c.position=e.position.slice(),e.attr("position",l.old)):(l.old&&(c.shape=n.extend({},e.shape),e.setShape(l.old)),l.fadein?(e.setStyle("opacity",0),c.style={opacity:1}):1!==e.style.opacity&&(c.style={opacity:1})),s.add(e,c,a,o))}))}),this),this._state="animating",s.done(m((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||((t=this._controller=new c(e.getZr())).enable(this.seriesModel.get("roam")),t.on("pan",m(this._onPan,this)),t.on("zoom",m(this._onZoom,this)));var i=new u(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,r){return i.contain(t,r)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var i=t.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},_onZoom:function(e){var t=e.originX,i=e.originY;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var n=r.getLayout();if(!n)return;var a=new u(n.x,n.y,n.width,n.height),o=this.seriesModel.layoutInfo;t-=o.x,i-=o.y;var s=d.create();d.translate(s,s,[-t,-i]),d.scale(s,s,[e.scale,e.scale]),d.translate(s,s,[t,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var i=this.findTarget(e.offsetX,e.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===t)this._zoomToNode(i);else if("link"===t){var n=r.hostTree.data.getItemModel(r.dataIndex),a=n.get("link",!0),o=n.get("target",!0)||"blank";a&&f(a,o)}}}}}),this)},_renderBreadcrumb:function(e,t,i){i||(i=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(i={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new l(this.group))).render(e,t,i.node,m((function(t){"animating"!==this._state&&(s.aboveViewRoot(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(r){var n=this._storage.background[r.getRawIndex()];if(n){var a=n.transformCoordToLocal(e,t),o=n.shape;if(!(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height))return!1;i={node:r,offsetX:a[0],offsetY:a[1]}}}),this),i}});function w(e,t,i,r,o,s,l,c,u,d){if(l){var h=l.getLayout(),p=e.getData();if(p.setItemGraphicEl(l.dataIndex,null),h&&h.isInView){var f=h.width,m=h.height,_=h.borderWidth,E=h.invisible,w=l.getRawIndex(),P=c&&c.getRawIndex(),D=l.viewChildren,M=h.upperHeight,I=D&&D.length,R=l.getModel("itemStyle"),O=l.getModel("emphasis.itemStyle"),L=G("nodeGroup",g);if(L){if(u.add(L),L.attr("position",[h.x||0,h.y||0]),L.__tmNodeWidth=f,L.__tmNodeHeight=m,h.isAboveViewRoot)return L;var N=l.getModel(),F=G("background",y,d,1);if(F&&function(t,i,r){if(i.dataIndex=l.dataIndex,i.seriesIndex=e.seriesIndex,i.setShape({x:0,y:0,width:f,height:m}),E)V(i);else{i.invisible=!1;var n=l.getVisual("borderColor",!0),o=O.get("borderColor"),s=T(R);s.fill=n;var c=S(O);if(c.fill=o,r){var u=f-2*_;k(s,c,n,u,M,{x:_,y:0,width:u,height:M})}else s.text=c.text=null;i.setStyle(s),a.setElementHoverStyle(i,c)}t.add(i)}(L,F,I&&h.upperLabelHeight),I)a.isHighDownDispatcher(L)&&a.setAsHighDownDispatcher(L,!1),F&&(a.setAsHighDownDispatcher(F,!0),p.setItemGraphicEl(l.dataIndex,F));else{var B=G("content",y,d,2);B&&function(t,i){i.dataIndex=l.dataIndex,i.seriesIndex=e.seriesIndex;var r=Math.max(f-2*_,0),n=Math.max(m-2*_,0);if(i.culling=!0,i.setShape({x:_,y:_,width:r,height:n}),E)V(i);else{i.invisible=!1;var o=l.getVisual("color",!0),s=T(R);s.fill=o;var c=S(O);k(s,c,o,r,n),i.setStyle(s),a.setElementHoverStyle(i,c)}t.add(i)}(L,B),F&&a.isHighDownDispatcher(F)&&a.setAsHighDownDispatcher(F,!1),a.setAsHighDownDispatcher(L,!0),p.setItemGraphicEl(l.dataIndex,L)}return L}}}function V(e){!e.invisible&&s.push(e)}function k(t,i,r,o,s,c){var u=N.get("name"),d=N.getModel(c?x:v),p=N.getModel(c?b:C),f=d.getShallow("show");a.setLabelStyle(t,i,d,p,{defaultText:f?u:null,autoColor:r,isRectText:!0,labelFetcher:e,labelDataIndex:l.dataIndex,labelProp:c?"upperLabel":"label"}),z(t,c,h),z(i,c,h),c&&(t.textRect=n.clone(c)),t.truncate=f&&d.get("ellipsis")?{outerWidth:o,outerHeight:s,minChar:2}:null}function z(t,i,r){var n=t.text;if(!i&&r.isLeafRoot&&null!=n){var a=e.get("drillDownIcon",!0);t.text=a?a+" "+n:n}}function G(e,a,s,c){var u=null!=P&&i[e][P],d=o[e];return u?(i[e][P]=null,function(e,t,i){(e[w]={}).old="nodeGroup"===i?t.position.slice():n.extend({},t.shape)}(d,u,e)):E||((u=new a({z:A(s,c)})).__tmDepth=s,u.__tmStorageName=e,function(e,t,i){var n=e[w]={},a=l.parentNode;if(a&&(!r||"drillDown"===r.direction)){var s=0,c=0,u=o.background[a.getRawIndex()];!r&&u&&u.old&&(s=u.old.width,c=u.old.height),n.old="nodeGroup"===i?[0,c]:{x:s,y:c,width:0,height:0}}n.fadein="nodeGroup"!==i}(d,0,e)),t[e][w]=u}}function A(e,t){var i=10*e+t;return(i-1)/i}e.exports=E},function(e,t,i){var r=i(2),n=i(6),a=i(0),o=i(46).wrapTreePathInfo;function s(e){this.group=new r.Group,e.add(this.group)}function l(e,t,i,r,n,a){var o=[[n?e:e-5,t],[e+i,t],[e+i,t+r],[n?e:e-5,t+r]];return!a&&o.splice(2,0,[e+i+5,t+r/2]),!n&&o.push([e,t+r/2]),o}function c(e,t,i){e.eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&o(i,t)}}s.prototype={constructor:s,render:function(e,t,i,r){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var s=a.getModel("itemStyle"),l=s.getModel("textStyle"),c={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,c,l),this._renderContent(e,c,s,l,r),n.positionElement(o,c.pos,c.box)}},_prepare:function(e,t,i){for(var r=e;r;r=r.parentNode){var n=r.getModel().get("name"),a=i.getTextRect(n),o=Math.max(a.width+16,t.emptyItemWidth);t.totalWidth+=o+8,t.renderList.push({node:r,text:n,width:o})}},_renderContent:function(e,t,i,o,s){for(var u=0,d=t.emptyItemWidth,h=e.get("breadcrumb.height"),p=n.getAvailableSize(t.pos,t.box),f=t.totalWidth,m=t.renderList,g=m.length-1;g>=0;g--){var y=m[g],_=y.node,v=y.width,C=y.text;f>p.width&&(f-=v-d,v=d,C=null);var x=new r.Polygon({shape:{points:l(u,0,v,h,g===m.length-1,0===g)},style:a.defaults(i.getItemStyle(),{lineJoin:"bevel",text:C,textFill:o.getTextColor(),textFont:o.getFont()}),z:10,onclick:a.curry(s,_)});this.group.add(x),c(x,e,_),u+=v+8}},remove:function(){this.group.removeAll()}};var u=s;e.exports=u},function(e,t,i){var r=i(0);t.createWrap=function(){var e,t=[],i={};return{add:function(e,n,a,o,s){return r.isString(o)&&(s=o,o=0),!i[e.id]&&(i[e.id]=1,t.push({el:e,target:n,time:a,delay:o,easing:s}),!0)},done:function(t){return e=t,this},start:function(){for(var r=t.length,n=0,a=t.length;n<a;n++){var o=t[n];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){--r||(t.length=0,i={},e&&e())}}}}},function(e,t,i){for(var r=i(1),n=i(46),a=function(){},o=["treemapZoomToNode","treemapRender","treemapMove"],s=0;s<o.length;s++)r.registerAction({type:o[s],update:"updateView"},a);r.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,i){var r=n.retrieveTargetInfo(e,["treemapZoomToNode","treemapRootToNode"],t);if(r){var a=t.getViewRoot();a&&(e.direction=n.aboveViewRoot(a,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}}))}))},function(e,t,i){var r=i(47),n=i(23),a=i(0),o=a.isArray,s={seriesType:"treemap",reset:function(e,t,i,o){var s=e.getData().tree.root;s.isRemoved()||function e(t,i,o,s){var c=t.getModel(),d=t.getLayout();if(!d||d.invisible||!d.isInView)return;var h,p=t.getModel("itemStyle"),f=function(e,t,i){var r=a.extend({},t),n=i.designatedVisualItemStyle;return a.each(["color","colorAlpha","colorSaturation"],(function(i){n[i]=t[i];var a=e.get(i);n[i]=null,null!=a&&(r[i]=a)})),r}(p,i,s),m=p.get("borderColor"),g=p.get("borderColorSaturation");null!=g&&(h=l(f),m=function(e,t){return null!=t?n.modifyHSL(t,null,null,e):null}(g,h));t.setVisual("borderColor",m);var y=t.viewChildren;if(y&&y.length){var _=function(e,t,i,n,a,o){if(!o||!o.length)return;var s=u(t,"color")||null!=a.color&&"none"!==a.color&&(u(t,"colorAlpha")||u(t,"colorSaturation"));if(!s)return;var l=t.get("visualMin"),c=t.get("visualMax"),d=i.dataExtent.slice();null!=l&&l<d[0]&&(d[0]=l),null!=c&&c>d[1]&&(d[1]=c);var h=t.get("colorMappingBy"),p={type:s.name,dataExtent:d,visual:s.range};"color"!==p.type||"index"!==h&&"id"!==h?p.mappingMethod="linear":(p.mappingMethod="category",p.loop=!0);var f=new r(p);return f.__drColorMappingBy=h,f}(0,c,d,0,f,y);a.each(y,(function(t,i){if(t.depth>=o.length||t===o[t.depth]){var r=function(e,t,i,r,n,o){var s=a.extend({},t);if(n){var l=n.type,c="color"===l&&n.__drColorMappingBy,u="index"===c?r:"id"===c?o.mapIdToIndex(i.getId()):i.getValue(e.get("visualDimension"));s[l]=n.mapValueToVisual(u)}return s}(c,f,t,i,_,s);e(t,r,o,s)}}))}else h=l(f),t.setVisual("color",h)}(s,{},e.getViewRoot().getAncestors(),e)}};function l(e){var t=c(e,"color");if(t){var i=c(e,"colorAlpha"),r=c(e,"colorSaturation");return r&&(t=n.modifyHSL(t,null,null,r)),i&&(t=n.modifyAlpha(t,i)),t}}function c(e,t){var i=e[t];if(null!=i&&"none"!==i)return i}function u(e,t){var i=e.get(t);return o(i)&&i.length?{name:t,range:i}:null}e.exports=s},function(e,t,i){var r=i(0),n=i(9),a=i(3),o=a.parsePercent,s=a.MAX_SAFE_INTEGER,l=i(6),c=i(46),u=Math.max,d=Math.min,h=r.retrieve,p=r.each,f=["itemStyle","borderWidth"],m=["itemStyle","gapWidth"],g=["upperLabel","show"],y=["upperLabel","height"],_={seriesType:"treemap",reset:function(e,t,i,a){var g=i.getWidth(),y=i.getHeight(),_=e.option,S=l.getLayoutRect(e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),T=_.size||[],E=o(h(S.width,T[0]),g),w=o(h(S.height,T[1]),y),A=a&&a.type,P=c.retrieveTargetInfo(a,["treemapZoomToNode","treemapRootToNode"],e),D="treemapRender"===A||"treemapMove"===A?a.rootRect:null,M=e.getViewRoot(),I=c.getPathToRoot(M);if("treemapMove"!==A){var R="treemapZoomToNode"===A?function(e,t,i,r,n){var a,o=(t||{}).node,l=[r,n];if(!o||o===i)return l;var c=r*n,u=c*e.option.zoomToNodeRatio;for(;a=o.parentNode;){for(var d=0,h=a.children,p=0,m=h.length;p<m;p++)d+=h[p].getValue();var g=o.getValue();if(0===g)return l;u*=d/g;var y=a.getModel(),_=y.get(f),v=Math.max(_,b(y));(u+=4*_*_+(3*_+v)*Math.pow(u,.5))>s&&(u=s),o=a}u<c&&(u=c);var C=Math.pow(u/c,.5);return[r*C,n*C]}(e,P,M,E,w):D?[D.width,D.height]:[E,w],O=_.sort;O&&"asc"!==O&&"desc"!==O&&(O="desc");var L={squareRatio:_.squareRatio,sort:O,leafDepth:_.leafDepth};M.hostTree.clearLayouts();var N={x:0,y:0,width:R[0],height:R[1],area:R[0]*R[1]};M.setLayout(N),function e(t,i,r,n){var a,o;if(t.isRemoved())return;var s=t.getLayout();a=s.width,o=s.height;var l=(_=t.getModel()).get(f),c=_.get(m)/2,h=b(_),p=Math.max(l,h),g=l-c,y=p-c,_=t.getModel();t.setLayout({borderWidth:l,upperHeight:p,upperLabelHeight:h},!0),a=u(a-2*g,0),o=u(o-g-y,0);var S=a*o,T=v(t,_,S,i,r,n);if(!T.length)return;var E={x:g,y:y,width:a,height:o},w=d(a,o),A=1/0,P=[];P.area=0;for(var D=0,M=T.length;D<M;){var I=T[D];P.push(I),P.area+=I.getLayout().area;var R=C(P,w,i.squareRatio);R<=A?(D++,A=R):(P.area-=P.pop().getLayout().area,x(P,w,E,c,!1),w=d(E.width,E.height),P.length=P.area=0,A=1/0)}P.length&&x(P,w,E,c,!0);if(!r){var O=_.get("childrenVisibleMin");null!=O&&S<O&&(r=!0)}for(D=0,M=T.length;D<M;D++)e(T[D],i,r,n+1)}(M,L,!1,0);N=M.getLayout();p(I,(function(e,t){var i=(I[t+1]||M).getValue();e.setLayout(r.extend({dataExtent:[i,i],borderWidth:0,upperHeight:0},N))}))}var F=e.getData().tree.root;F.setLayout(function(e,t,i){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!i)return r;var n=i.node,a=n.getLayout();if(!a)return r;var o=[a.width/2,a.height/2],s=n;for(;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}(S,D,P),!0),e.setLayoutInfo(S),function e(t,i,r,a,o){var s=t.getLayout(),l=r[o],c=l&&l===t;if(l&&!c||o===r.length&&t!==a)return;t.setLayout({isInView:!0,invisible:!c&&!i.intersect(s),isAboveViewRoot:c},!0);var u=new n(i.x-s.x,i.y-s.y,i.width,i.height);p(t.viewChildren||[],(function(t){e(t,u,r,a,o+1)}))}(F,new n(-S.x,-S.y,g,y),I,M,0)}};function v(e,t,i,n,a,o){var s=e.children||[],l=n.sort;"asc"!==l&&"desc"!==l&&(l=null);var c=null!=n.leafDepth&&n.leafDepth<=o;if(a&&!c)return e.viewChildren=[];!function(e,t){t&&e.sort((function(e,i){var r="asc"===t?e.getValue()-i.getValue():i.getValue()-e.getValue();return 0===r?"asc"===t?e.dataIndex-i.dataIndex:i.dataIndex-e.dataIndex:r}))}(s=r.filter(s,(function(e){return!e.isRemoved()})),l);var u=function(e,t,i){for(var r=0,n=0,a=t.length;n<a;n++)r+=t[n].getValue();var o=e.get("visualDimension");if(t&&t.length)if("value"===o&&i)s=[t[t.length-1].getValue(),t[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];p(t,(function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)}))}else s=[NaN,NaN];return{sum:r,dataExtent:s}}(t,s,l);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,i,r,n){if(!r)return i;for(var a=e.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var c=n["asc"===r?o-l-1:l].getValue();c/i*t<a&&(s=l,i-=c)}return"asc"===r?n.splice(0,o-s):n.splice(s,o-s),i}(t,i,u.sum,l,s),0===u.sum)return e.viewChildren=[];for(var d=0,h=s.length;d<h;d++){var f=s[d].getValue()/u.sum*i;s[d].setLayout({area:f})}return c&&(s.length&&e.setLayout({isLeafRoot:!0},!0),s.length=0),e.viewChildren=s,e.setLayout({dataExtent:u.dataExtent},!0),s}function C(e,t,i){for(var r,n=0,a=1/0,o=0,s=e.length;o<s;o++)(r=e[o].getLayout().area)&&(r<a&&(a=r),r>n&&(n=r));var l=e.area*e.area,c=t*t*i;return l?u(c*n/l,l/(c*a)):1/0}function x(e,t,i,r,n){var a=t===i.width?0:1,o=1-a,s=["x","y"],l=["width","height"],c=i[s[a]],h=t?e.area/t:0;(n||h>i[l[o]])&&(h=i[l[o]]);for(var p=0,f=e.length;p<f;p++){var m=e[p],g={},y=h?m.getLayout().area/h:0,_=g[l[o]]=u(h-2*r,0),v=i[s[a]]+i[l[a]]-c,C=p===f-1||v<y?v:y,x=g[l[a]]=u(C-2*r,0);g[s[o]]=i[s[o]]+d(r,_/2),g[s[a]]=c+d(r,x/2),c+=C,m.setLayout(g,!0)}i[s[o]]+=h,i[l[o]]-=h}function b(e){return e.get(g)?e.get(y):0}e.exports=_},function(e,t,i){var r=i(1);i(385),i(387),i(390);var n=i(391),a=i(44),o=i(392),s=i(393),l=i(394),c=i(395),u=i(396),d=i(398);r.registerProcessor(n),r.registerVisual(a("graph","circle",null)),r.registerVisual(o),r.registerVisual(s),r.registerLayout(l),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,c),r.registerLayout(u),r.registerCoordinateSystem("graphView",{create:d})},function(e,t,i){var r=i(1),n=i(18),a=i(0),o=i(4).defaultEmphasis,s=i(12),l=i(7).encodeHTML,c=i(196),u=i(71),d=i(94),h=d.initCurvenessList,p=d.createEdgeMapForCurveness,f=r.extendSeriesModel({type:"series.graph",init:function(e){f.superApply(this,"init",arguments);var t=this;function i(){return t._categoriesData}this.legendVisualProvider=new u(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){f.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){f.superApply(this,"mergeDefaultAndTheme",arguments),o(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var i=e.edges||e.links||[],r=e.data||e.nodes||[],n=this;if(r&&i){h(this);var o=c(r,i,this,!0,(function(e,i){e.wrapMethod("getItemModel",(function(e){var t=n._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var r=n.getModel("edgeLabel"),a=new s({label:r.option},r.parentModel,t),o=n.getModel("emphasis.edgeLabel"),l=new s({emphasis:{label:o.option}},o.parentModel,t);function c(e){return(e=this.parsePath(e))&&"label"===e[0]?a:e&&"emphasis"===e[0]&&"label"===e[1]?l:this.parentModel}i.wrapMethod("getItemModel",(function(e){return e.customizeGetParent(c),e}))}));return a.each(o.edges,(function(e){p(e.node1,e.node2,this,e.dataIndex)}),this),o.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,i){if("edge"===i){var r=this.getData(),n=this.getDataParams(e,i),a=r.graph.getEdgeByIndex(e),o=r.getName(a.node1.dataIndex),s=r.getName(a.node2.dataIndex),c=[];return null!=o&&c.push(o),null!=s&&c.push(s),c=l(c.join(" > ")),n.value&&(c+=" : "+l(n.value)),c}return f.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=a.map(this.option.categories||[],(function(e){return null!=e.value?e:a.extend({value:0},e)})),t=new n(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},isAnimationEnabled:function(){return f.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}}}}),m=f;e.exports=m},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(28).enableClassCheck;function a(e){return"_EC_"+e}var o=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=o.prototype;function l(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function c(e,t,i){this.node1=e,this.node2=t,this.dataIndex=null==i?-1:i}s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(e,t){e=null==e?""+t:""+e;var i=this._nodesMap;if(!i[a(e)]){var r=new l(e,t);return r.hostGraph=this,this.nodes.push(r),i[a(e)]=r,r}},s.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},s.getNodeById=function(e){return this._nodesMap[a(e)]},s.addEdge=function(e,t,i){var r=this._nodesMap,n=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),l.isInstance(e)||(e=r[a(e)]),l.isInstance(t)||(t=r[a(t)]),e&&t){var o=e.id+"-"+t.id,s=new c(e,t,i);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),n[o]=s,s}},s.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},s.getEdge=function(e,t){l.isInstance(e)&&(e=e.id),l.isInstance(t)&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},s.eachNode=function(e,t){for(var i=this.nodes,r=i.length,n=0;n<r;n++)i[n].dataIndex>=0&&e.call(t,i[n],n)},s.eachEdge=function(e,t){for(var i=this.edges,r=i.length,n=0;n<r;n++)i[n].dataIndex>=0&&i[n].node1.dataIndex>=0&&i[n].node2.dataIndex>=0&&e.call(t,i[n],n)},s.breadthFirstTraverse=function(e,t,i,r){if(l.isInstance(t)||(t=this._nodesMap[a(t)]),t){for(var n="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(r,t,null))for(var s=[t];s.length;){var c=s.shift(),u=c[n];for(o=0;o<u.length;o++){var d=u[o],h=d.node1===c?d.node2:d.node1;if(!h.__visited){if(e.call(r,h,c))return;s.push(h),h.__visited=!0}}}}},s.update=function(){for(var e=this.data,t=this.edgeData,i=this.nodes,r=this.edges,n=0,a=i.length;n<a;n++)i[n].dataIndex=-1;for(n=0,a=e.count();n<a;n++)i[e.getRawIndex(n)].dataIndex=n;t.filterSelf((function(e){var i=r[t.getRawIndex(e)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0}));for(n=0,a=r.length;n<a;n++)r[n].dataIndex=-1;for(n=0,a=t.count();n<a;n++)r[t.getRawIndex(n)].dataIndex=n},s.clone=function(){for(var e=new o(this._directed),t=this.nodes,i=this.edges,r=0;r<t.length;r++)e.addNode(t[r].id,t[r].dataIndex);for(r=0;r<i.length;r++){var n=i[r];e.addEdge(n.node1.id,n.node2.id,n.dataIndex)}return e},l.prototype={constructor:l,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}},c.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)};var u=function(e,t){return{getValue:function(i){var r=this[e][t];return r.get(r.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,i,r)},getVisual:function(i,r){return this[e][t].getItemVisual(this.dataIndex,i,r)},setLayout:function(i,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,i,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}};r.mixin(l,u("hostGraph","data")),r.mixin(c,u("hostGraph","edgeData")),o.Node=l,o.Edge=c,n(l),n(c);var d=o;e.exports=d},function(e,t,i){var r=i(1),n=i(0),a=i(67),o=i(118),s=i(73),l=i(113),c=i(93).onIrrelevantElement,u=i(2),d=i(389),h=i(120).getNodeGlobalScale,p="__focusNodeAdjacency",f=["itemStyle","opacity"],m=["lineStyle","opacity"];function g(e,t){var i=e.getVisual("opacity");return null!=i?i:e.getModel().get(t)}function y(e,t,i){var r=e.getGraphicEl(),n=g(e,t);null!=i&&(null==n&&(n=1),n*=i),r.downplay&&r.downplay(),r.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==i||(t=n),e.setStyle("opacity",t)}}))}function _(e,t){var i=g(e,t),r=e.getGraphicEl();r.traverse((function(e){!e.isGroup&&e.setStyle("opacity",i)})),r.highlight&&r.highlight()}var v=r.extendChartView({type:"graph",init:function(e,t){var i=new a,r=new o,n=this.group;this._controller=new s(t.getZr()),this._controllerHost={target:n},n.add(i.group),n.add(r.group),this._symbolDraw=i,this._lineDraw=r,this._firstRender=!0},render:function(e,t,i){var r=this,n=e.coordinateSystem;this._model=e;var a=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===n.type){var l={position:n.position,scale:n.scale};this._firstRender?s.attr(l):u.updateProps(s,l,e)}d(e.getGraph(),h(e));var c=e.getData();a.updateData(c);var f=e.getEdgeData();o.updateData(f),this._updateNodeAndLinkScale(),this._updateController(e,t,i),clearTimeout(this._layoutTimeout);var m=e.forceLayout,g=e.get("force.layoutAnimation");m&&this._startForceLayoutIteration(m,g),c.eachItemGraphicEl((function(t,n){var a=c.getItemModel(n);t.off("drag").off("dragend");var o=a.get("draggable");o&&t.on("drag",(function(){m&&(m.warmUp(),!this._layouting&&this._startForceLayoutIteration(m,g),m.setFixed(n),c.setItemLayout(n,t.position))}),this).on("dragend",(function(){m&&m.setUnfixed(n)}),this),t.setDraggable(o&&m),t[p]&&t.off("mouseover",t[p]),t.__unfocusNodeAdjacency&&t.off("mouseout",t.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(t.on("mouseover",t[p]=function(){r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){r._dispatchUnfocus(i)}))}),this),c.graph.eachEdge((function(t){var n=t.getGraphicEl();n[p]&&n.off("mouseover",n[p]),n.__unfocusNodeAdjacency&&n.off("mouseout",n.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n[p]=function(){r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){r._dispatchUnfocus(i)}))}));var y="circular"===e.get("layout")&&e.get("circular.rotateLabel"),_=c.getLayout("cx"),v=c.getLayout("cy");c.eachItemGraphicEl((function(e,t){var i=c.getItemModel(t).get("label.rotate")||0,r=e.getSymbolPath();if(y){var n=c.getItemLayout(t),a=Math.atan2(n[1]-v,n[0]-_);a<0&&(a=2*Math.PI+a);var o=n[0]<_;o&&(a-=Math.PI);var s=o?"left":"right";u.modifyLabelStyle(r,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else u.modifyLabelStyle(r,{textRotation:i*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){i._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,i,r){var a=e.getData().graph,o=r.dataIndex,s=r.edgeDataIndex,l=a.getNodeByIndex(o),c=a.getEdgeByIndex(s);(l||c)&&(a.eachNode((function(e){y(e,f,.1)})),a.eachEdge((function(e){y(e,m,.1)})),l&&(_(l,f),n.each(l.edges,(function(e){e.dataIndex<0||(_(e,m),_(e.node1,f),_(e.node2,f))}))),c&&(_(c,m),_(c.node1,f),_(c.node2,f)))},unfocusNodeAdjacency:function(e,t,i,r){var n=e.getData().graph;n.eachNode((function(e){y(e,f)})),n.eachEdge((function(e){y(e,m)}))},_startForceLayoutIteration:function(e,t){var i=this;!function r(){e.step((function(e){i.updateLayout(i._model),(i._layouting=!e)&&(t?i._layoutTimeout=setTimeout(r,16):r())}))}()},_updateController:function(e,t,i){var r=this._controller,n=this._controllerHost,a=this.group;r.setPointerChecker((function(t,r,n){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,n)&&!c(t,i,e)})),"view"===e.coordinateSystem.type?(r.enable(e.get("roam")),n.zoomLimit=e.get("scaleLimit"),n.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(t){l.updateViewOnPan(n,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){l.updateViewOnZoom(n,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),d(e.getGraph(),h(e)),this._lineDraw.updateLayout()}),this)):r.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),i=h(e),r=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",r)}))},updateLayout:function(e){d(e.getGraph(),h(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});e.exports=v},function(e,t,i){var r=i(2),n=i(8),a=r.Line.prototype,o=r.BezierCurve.prototype;function s(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var l=r.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(e,t){this[s(t)?"_buildPathLine":"_buildPathCurve"](e,t)},_buildPathLine:a.buildPath,_buildPathCurve:o.buildPath,pointAt:function(e){return this[s(this.shape)?"_pointAtLine":"_pointAtCurve"](e)},_pointAtLine:a.pointAt,_pointAtCurve:o.pointAt,tangentAt:function(e){var t=this.shape,i=s(t)?[t.x2-t.x1,t.y2-t.y1]:this._tangentAtCurve(e);return n.normalize(i,i)},_tangentAtCurve:o.tangentAt});e.exports=l},function(e,t,i){var r=i(32),n=i(8),a=i(120).getSymbolSize,o=[],s=[],l=[],c=r.quadraticAt,u=n.distSquare,d=Math.abs;function h(e,t,i){for(var r,n=e[0],a=e[1],h=e[2],p=1/0,f=i*i,m=.1,g=.1;g<=.9;g+=.1){o[0]=c(n[0],a[0],h[0],g),o[1]=c(n[1],a[1],h[1],g),(v=d(u(o,t)-f))<p&&(p=v,r=g)}for(var y=0;y<32;y++){var _=r+m;s[0]=c(n[0],a[0],h[0],r),s[1]=c(n[1],a[1],h[1],r),l[0]=c(n[0],a[0],h[0],_),l[1]=c(n[1],a[1],h[1],_);var v=u(s,t)-f;if(d(v)<.01)break;var C=u(l,t)-f;m/=2,v<0?C>=0?r+=m:r-=m:C>=0?r-=m:r+=m}return r}e.exports=function(e,t){var i=[],o=r.quadraticSubdivide,s=[[],[],[]],l=[[],[]],c=[];t/=2,e.eachEdge((function(e,r){var u=e.getLayout(),d=e.getVisual("fromSymbol"),p=e.getVisual("toSymbol");u.__original||(u.__original=[n.clone(u[0]),n.clone(u[1])],u[2]&&u.__original.push(n.clone(u[2])));var f=u.__original;if(null!=u[2]){if(n.copy(s[0],f[0]),n.copy(s[1],f[2]),n.copy(s[2],f[1]),d&&"none"!==d){var m=a(e.node1),g=h(s,f[0],m*t);o(s[0][0],s[1][0],s[2][0],g,i),s[0][0]=i[3],s[1][0]=i[4],o(s[0][1],s[1][1],s[2][1],g,i),s[0][1]=i[3],s[1][1]=i[4]}if(p&&"none"!==p){m=a(e.node2),g=h(s,f[1],m*t);o(s[0][0],s[1][0],s[2][0],g,i),s[1][0]=i[1],s[2][0]=i[2],o(s[0][1],s[1][1],s[2][1],g,i),s[1][1]=i[1],s[2][1]=i[2]}n.copy(u[0],s[0]),n.copy(u[1],s[2]),n.copy(u[2],s[1])}else{if(n.copy(l[0],f[0]),n.copy(l[1],f[1]),n.sub(c,l[1],l[0]),n.normalize(c,c),d&&"none"!==d){m=a(e.node1);n.scaleAndAdd(l[0],l[0],c,m*t)}if(p&&"none"!==p){m=a(e.node2);n.scaleAndAdd(l[1],l[1],c,-m*t)}n.copy(u[0],l[0]),n.copy(u[1],l[1])}}))}},function(e,t,i){var r=i(1),n=i(114).updateCenterAndZoom;i(197);r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var i=t.coordinateSystem,r=n(i,e);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)}))}))},function(e,t){e.exports=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var i=e.getCategoriesData(),r=e.getGraph().data,n=i.mapArray(i.getName);r.filterSelf((function(e){var i=r.getItemModel(e).getShallow("category");if(null!=i){"number"==typeof i&&(i=n[i]);for(var a=0;a<t.length;a++)if(!t[a].isSelected(i))return!1}return!0}))}),this)}},function(e,t){e.exports=function(e){var t={};e.eachSeriesByType("graph",(function(e){var i=e.getCategoriesData(),r=e.getData(),n={};i.each((function(r){var a=i.getName(r);n["ec-"+a]=r;var o=i.getItemModel(r),s=o.get("itemStyle.color")||e.getColorFromPalette(a,t);i.setItemVisual(r,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],c=0;c<l.length;c++){var u=o.getShallow(l[c],!0);null!=u&&i.setItemVisual(r,l[c],u)}})),i.count()&&r.each((function(e){var t=r.getItemModel(e).getShallow("category");if(null!=t){"string"==typeof t&&(t=n["ec-"+t]);for(var a=["color","opacity","symbol","symbolSize","symbolKeepAspect"],o=0;o<a.length;o++)null==r.getItemVisual(e,a[o],!0)&&r.setItemVisual(e,a[o],i.getItemVisual(t,a[o]))}}))}))}},function(e,t){function i(e){return e instanceof Array||(e=[e,e]),e}e.exports=function(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),r=e.getEdgeData(),n=i(e.get("edgeSymbol")),a=i(e.get("edgeSymbolSize")),o="lineStyle.color".split("."),s="lineStyle.opacity".split(".");r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",a&&a[0]),r.setVisual("toSymbolSize",a&&a[1]),r.setVisual("color",e.get(o)),r.setVisual("opacity",e.get(s)),r.each((function(e){var n=r.getItemModel(e),a=t.getEdgeByIndex(e),l=i(n.getShallow("symbol",!0)),c=i(n.getShallow("symbolSize",!0)),u=n.get(o),d=n.get(s);switch(u){case"source":u=a.node1.getVisual("color");break;case"target":u=a.node2.getVisual("color")}l[0]&&a.setVisual("fromSymbol",l[0]),l[1]&&a.setVisual("toSymbol",l[1]),c[0]&&a.setVisual("fromSymbolSize",c[0]),c[1]&&a.setVisual("toSymbolSize",c[1]),a.setVisual("color",u),a.setVisual("opacity",d)}))}))}},function(e,t,i){var r=i(0).each,n=i(198),a=n.simpleLayout,o=n.simpleLayoutEdge;e.exports=function(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),i=e.coordinateSystem;if(i&&"view"!==i.type){var n=e.getData(),s=[];r(i.dimensions,(function(e){s=s.concat(n.mapDimension(e,!0))}));for(var l=0;l<n.count();l++){for(var c=[],u=!1,d=0;d<s.length;d++){var h=n.get(s[d],l);isNaN(h)||(u=!0),c.push(h)}u?n.setItemLayout(l,i.dataToPoint(c)):n.setItemLayout(l,[NaN,NaN])}o(n.graph,e)}else t&&"none"!==t||a(e)}))}},function(e,t,i){var r=i(199).circularLayout;e.exports=function(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&r(e,"symbolSize")}))}},function(e,t,i){var r=i(397).forceLayout,n=i(198).simpleLayout,a=i(199).circularLayout,o=i(3).linearMap,s=i(8),l=i(0),c=i(94).getCurvenessForEdge;e.exports=function(e){e.eachSeriesByType("graph",(function(e){if(!(_=e.coordinateSystem)||"view"===_.type)if("force"===e.get("layout")){var t=e.preservedPoints||{},i=e.getGraph(),u=i.data,d=i.edgeData,h=e.getModel("force"),p=h.get("initLayout");e.preservedPoints?u.each((function(e){var i=u.getId(e);u.setItemLayout(e,t[i]||[NaN,NaN])})):p&&"none"!==p?"circular"===p&&a(e,"value"):n(e);var f=u.getDataExtent("value"),m=d.getDataExtent("value"),g=h.get("repulsion"),y=h.get("edgeLength");l.isArray(g)||(g=[g,g]),l.isArray(y)||(y=[y,y]),y=[y[1],y[0]];var _,v=u.mapArray("value",(function(e,t){var i=u.getItemLayout(t),r=o(e,f,g);return isNaN(r)&&(r=(g[0]+g[1])/2),{w:r,rep:r,fixed:u.getItemModel(t).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),C=d.mapArray("value",(function(t,r){var n=i.getEdgeByIndex(r),a=o(t,m,y);isNaN(a)&&(a=(y[0]+y[1])/2);var s=n.getModel(),u=l.retrieve3(s.get("lineStyle.curveness"),-c(n,e,r,!0),0);return{n1:v[n.node1.dataIndex],n2:v[n.node2.dataIndex],d:a,curveness:u,ignoreForceLayout:s.get("ignoreForceLayout")}})),x=(_=e.coordinateSystem).getBoundingRect(),b=r(v,C,{rect:x,gravity:h.get("gravity"),friction:h.get("friction")}),S=b.step;b.step=function(e){for(var r=0,n=v.length;r<n;r++)v[r].fixed&&s.copy(v[r].p,i.getNodeByIndex(r).getLayout());S((function(r,n,a){for(var o=0,l=r.length;o<l;o++)r[o].fixed||i.getNodeByIndex(o).setLayout(r[o].p),t[u.getId(o)]=r[o].p;for(o=0,l=n.length;o<l;o++){var c=n[o],d=i.getEdgeByIndex(o),h=c.n1.p,p=c.n2.p,f=d.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],s.copy(f[0],h),s.copy(f[1],p),+c.curveness&&(f[2]=[(h[0]+p[0])/2-(h[1]-p[1])*c.curveness,(h[1]+p[1])/2-(p[0]-h[0])*c.curveness]),d.setLayout(f)}e&&e(a)}))},e.forceLayout=b,e.preservedPoints=t,b.step()}else e.forceLayout=null}))}},function(e,t,i){var r=i(8),n=r.scaleAndAdd;t.forceLayout=function(e,t,i){for(var a=i.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],c=null==i.gravity?.1:i.gravity,u=0;u<e.length;u++){var d=e[u];d.p||(d.p=r.create(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=r.clone(d.p),d.edges=null}var h=null==i.friction?.6:i.friction,p=h;return{warmUp:function(){p=.8*h},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(i){for(var a=[],o=e.length,s=0;s<t.length;s++){var u=t[s];if(!u.ignoreForceLayout){var d=u.n1,h=u.n2;r.sub(a,h.p,d.p);var f=r.len(a)-u.d,m=h.w/(d.w+h.w);isNaN(m)&&(m=0),r.normalize(a,a),!d.fixed&&n(d.p,d.p,a,m*f*p),!h.fixed&&n(h.p,h.p,a,-(1-m)*f*p)}}for(s=0;s<o;s++){(v=e[s]).fixed||(r.sub(a,l,v.p),n(v.p,v.p,a,c*p))}for(s=0;s<o;s++){d=e[s];for(var g=s+1;g<o;g++){h=e[g];r.sub(a,h.p,d.p),0===(f=r.len(a))&&(r.set(a,Math.random()-.5,Math.random()-.5),f=1);var y=(d.rep+h.rep)/f/f;!d.fixed&&n(d.pp,d.pp,a,y),!h.fixed&&n(h.pp,h.pp,a,-y)}}var _=[];for(s=0;s<o;s++){var v;(v=e[s]).fixed||(r.sub(_,v.p,v.pp),n(v.p,v.p,_,p),r.copy(v.pp,v.p))}p*=.992,i&&i(e,t,p<.01)}}}},function(e,t,i){var r=i(116),n=i(6).getLayoutRect,a=i(62);e.exports=function(e,t){var i=[];return e.eachSeriesByType("graph",(function(e){var o=e.get("coordinateSystem");if(!o||"view"===o){var s=e.getData(),l=s.mapArray((function(e){var t=s.getItemModel(e);return[+t.get("x"),+t.get("y")]})),c=[],u=[];a.fromPoints(l,c,u),u[0]-c[0]==0&&(u[0]+=1,c[0]-=1),u[1]-c[1]==0&&(u[1]+=1,c[1]-=1);var d=(u[0]-c[0])/(u[1]-c[1]),h=function(e,t,i){var r=e.getBoxLayoutParams();return r.aspect=i,n(r,{width:t.getWidth(),height:t.getHeight()})}(e,t,d);isNaN(d)&&(c=[h.x,h.y],u=[h.x+h.width,h.y+h.height]);var p=u[0]-c[0],f=u[1]-c[1],m=h.width,g=h.height,y=e.coordinateSystem=new r;y.zoomLimit=e.get("scaleLimit"),y.setBoundingRect(c[0],c[1],p,f),y.setViewRect(h.x,h.y,m,g),y.setCenter(e.get("center")),y.setZoom(e.get("zoom")),i.push(y)}})),i}},function(e,t,i){i(400),i(401)},function(e,t,i){var r=i(54),n=i(14).extend({type:"series.gauge",getInitialData:function(e,t){return r(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});e.exports=n},function(e,t,i){var r=i(402),n=i(2),a=i(24),o=i(3),s=o.parsePercent,l=o.round,c=o.linearMap;function u(e,t){return t&&("string"==typeof t?e=t.replace("{value}",null!=e?e:""):"function"==typeof t&&(e=t(e))),e}var d=2*Math.PI,h=a.extend({type:"gauge",render:function(e,t,i){this.group.removeAll();var r=e.get("axisLine.lineStyle.color"),n=function(e,t){var i=e.get("center"),r=t.getWidth(),n=t.getHeight(),a=Math.min(r,n);return{cx:s(i[0],t.getWidth()),cy:s(i[1],t.getHeight()),r:s(e.get("radius"),a/2)}}(e,i);this._renderMain(e,t,i,r,n)},dispose:function(){},_renderMain:function(e,t,i,r,a){for(var o=this.group,s=e.getModel("axisLine"),l=s.getModel("lineStyle"),c=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,h=((y=-e.get("endAngle")/180*Math.PI)-u)%d,p=u,f=l.get("width"),m=s.get("show"),g=0;m&&g<r.length;g++){var y=u+h*Math.min(Math.max(r[g][0],0),1),_=new n.Sector({shape:{startAngle:p,endAngle:y,cx:a.cx,cy:a.cy,clockwise:c,r0:a.r-f,r:a.r},silent:!0});_.setStyle({fill:r[g][1]}),_.setStyle(l.getLineStyle(["color","borderWidth","borderColor"])),o.add(_),p=y}var v=function(e){if(e<=0)return r[0][1];for(var t=0;t<r.length;t++)if(r[t][0]>=e&&(0===t?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};if(!c){var C=u;u=y,y=C}this._renderTicks(e,t,i,v,a,u,y,c),this._renderPointer(e,t,i,v,a,u,y,c),this._renderTitle(e,t,i,v,a),this._renderDetail(e,t,i,v,a)},_renderTicks:function(e,t,i,r,a,o,c,d){for(var h=this.group,p=a.cx,f=a.cy,m=a.r,g=+e.get("min"),y=+e.get("max"),_=e.getModel("splitLine"),v=e.getModel("axisTick"),C=e.getModel("axisLabel"),x=e.get("splitNumber"),b=v.get("splitNumber"),S=s(_.get("length"),m),T=s(v.get("length"),m),E=o,w=(c-o)/x,A=w/b,P=_.getModel("lineStyle").getLineStyle(),D=v.getModel("lineStyle").getLineStyle(),M=0;M<=x;M++){var I=Math.cos(E),R=Math.sin(E);if(_.get("show")){var O=new n.Line({shape:{x1:I*m+p,y1:R*m+f,x2:I*(m-S)+p,y2:R*(m-S)+f},style:P,silent:!0});"auto"===P.stroke&&O.setStyle({stroke:r(M/x)}),h.add(O)}if(C.get("show")){var L=u(l(M/x*(y-g)+g),C.get("formatter")),N=C.get("distance"),F=r(M/x);h.add(new n.Text({style:n.setTextStyle({},C,{text:L,x:I*(m-S-N)+p,y:R*(m-S-N)+f,textVerticalAlign:R<-.4?"top":R>.4?"bottom":"middle",textAlign:I<-.4?"left":I>.4?"right":"center"},{autoColor:F}),silent:!0}))}if(v.get("show")&&M!==x){for(var B=0;B<=b;B++){I=Math.cos(E),R=Math.sin(E);var V=new n.Line({shape:{x1:I*m+p,y1:R*m+f,x2:I*(m-T)+p,y2:R*(m-T)+f},silent:!0,style:D});"auto"===D.stroke&&V.setStyle({stroke:r((M+B/b)/x)}),h.add(V),E+=A}E-=A}else E+=w}},_renderPointer:function(e,t,i,a,o,l,u,d){var h=this.group,p=this._data;if(e.get("pointer.show")){var f=[+e.get("min"),+e.get("max")],m=[l,u],g=e.getData(),y=g.mapDimension("value");g.diff(p).add((function(t){var i=new r({shape:{angle:l}});n.initProps(i,{shape:{angle:c(g.get(y,t),f,m,!0)}},e),h.add(i),g.setItemGraphicEl(t,i)})).update((function(t,i){var r=p.getItemGraphicEl(i);n.updateProps(r,{shape:{angle:c(g.get(y,t),f,m,!0)}},e),h.add(r),g.setItemGraphicEl(t,r)})).remove((function(e){var t=p.getItemGraphicEl(e);h.remove(t)})).execute(),g.eachItemGraphicEl((function(e,t){var i=g.getItemModel(t),r=i.getModel("pointer");e.setShape({x:o.cx,y:o.cy,width:s(r.get("width"),o.r),r:s(r.get("length"),o.r)}),e.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",a(c(g.get(y,t),f,[0,1],!0))),n.setHoverStyle(e,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=g}else p&&p.eachItemGraphicEl((function(e){h.remove(e)}))},_renderTitle:function(e,t,i,r,a){var o=e.getData(),l=o.mapDimension("value"),u=e.getModel("title");if(u.get("show")){var d=u.get("offsetCenter"),h=a.cx+s(d[0],a.r),p=a.cy+s(d[1],a.r),f=+e.get("min"),m=+e.get("max"),g=e.getData().get(l,0),y=r(c(g,[f,m],[0,1],!0));this.group.add(new n.Text({silent:!0,style:n.setTextStyle({},u,{x:h,y:p,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:y,forceRich:!0})}))}},_renderDetail:function(e,t,i,r,a){var o=e.getModel("detail"),l=+e.get("min"),d=+e.get("max");if(o.get("show")){var h=o.get("offsetCenter"),p=a.cx+s(h[0],a.r),f=a.cy+s(h[1],a.r),m=s(o.get("width"),a.r),g=s(o.get("height"),a.r),y=e.getData(),_=y.get(y.mapDimension("value"),0),v=r(c(_,[l,d],[0,1],!0));this.group.add(new n.Text({silent:!0,style:n.setTextStyle({},o,{x:p,y:f,text:u(_,o.get("formatter")),textWidth:isNaN(m)?null:m,textHeight:isNaN(g)?null:g,textAlign:"center",textVerticalAlign:"middle"},{autoColor:v,forceRich:!0})}))}}});e.exports=h},function(e,t,i){var r=i(10).extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var i=Math.cos,r=Math.sin,n=t.r,a=t.width,o=t.angle,s=t.x-i(o)*a*(a>=n/3?1:2),l=t.y-r(o)*a*(a>=n/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+i(o)*a,t.y+r(o)*a),e.lineTo(t.x+i(t.angle)*n,t.y+r(t.angle)*n),e.lineTo(t.x-i(o)*a,t.y-r(o)*a),e.lineTo(s,l)}});e.exports=r},function(e,t,i){var r=i(1);i(404),i(405);var n=i(91),a=i(406),o=i(72);r.registerVisual(n("funnel")),r.registerLayout(a),r.registerProcessor(o("funnel"))},function(e,t,i){var r=i(1),n=i(0),a=i(54),o=i(4).defaultEmphasis,s=i(29).makeSeriesEncodeForNameBased,l=i(71),c=r.extendSeriesModel({type:"series.funnel",init:function(e){c.superApply(this,"init",arguments),this.legendVisualProvider=new l(n.bind(this.getData,this),n.bind(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return a(this,{coordDimensions:["value"],encodeDefaulter:n.curry(s,this)})},_defaultLabelLine:function(e){o(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),i=c.superCall(this,"getDataParams",e),r=t.mapDimension("value"),n=t.getSum(r);return i.percent=n?+(t.get(r,e)/n*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}),u=c;e.exports=u},function(e,t,i){var r=i(2),n=i(0),a=i(24);function o(e,t){r.Group.call(this);var i=new r.Polygon,n=new r.Polyline,a=new r.Text;this.add(i),this.add(n),this.add(a),this.highDownOnUpdate=function(e,t){"emphasis"===t?(n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore):(n.ignore=n.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(e,t,!0)}var s=o.prototype,l=["itemStyle","opacity"];s.updateData=function(e,t,i){var a=this.childAt(0),o=e.hostModel,s=e.getItemModel(t),c=e.getItemLayout(t),u=e.getItemModel(t).get(l);u=null==u?1:u,a.useStyle({}),i?(a.setShape({points:c.points}),a.setStyle({opacity:0}),r.initProps(a,{style:{opacity:u}},o,t)):r.updateProps(a,{style:{opacity:u},shape:{points:c.points}},o,t);var d=s.getModel("itemStyle"),h=e.getItemVisual(t,"color");a.setStyle(n.defaults({lineJoin:"round",fill:h},d.getItemStyle(["opacity"]))),a.hoverStyle=d.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),r.setHoverStyle(this)},s._updateLabel=function(e,t){var i=this.childAt(1),n=this.childAt(2),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"color");r.updateProps(i,{shape:{points:s.linePoints||s.linePoints}},a,t),r.updateProps(n,{style:{x:s.x,y:s.y}},a,t),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=o.getModel("label"),u=o.getModel("emphasis.label"),d=o.getModel("labelLine"),h=o.getModel("emphasis.labelLine");l=e.getItemVisual(t,"color");r.setLabelStyle(n.style,n.hoverStyle={},c,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!d.get("show"),i.hoverIgnore=!h.get("show"),i.setStyle({stroke:l}),i.setStyle(d.getModel("lineStyle").getLineStyle()),i.hoverStyle=h.getModel("lineStyle").getLineStyle()},n.inherits(o,r.Group);var c=a.extend({type:"funnel",render:function(e,t,i){var r=e.getData(),n=this._data,a=this.group;r.diff(n).add((function(e){var t=new o(r,e);r.setItemGraphicEl(e,t),a.add(t)})).update((function(e,t){var i=n.getItemGraphicEl(t);i.updateData(r,e),a.add(i),r.setItemGraphicEl(e,i)})).remove((function(e){var t=n.getItemGraphicEl(e);a.remove(t)})).execute(),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});e.exports=c},function(e,t,i){i(5).__DEV__;var r=i(6),n=i(3),a=n.parsePercent,o=n.linearMap;e.exports=function(e,t,i){e.eachSeriesByType("funnel",(function(e){var i=e.getData(),n=i.mapDimension("value"),s=e.get("sort"),l=function(e,t){return r.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),c=function(e,t){for(var i=e.mapDimension("value"),r=e.mapArray(i,(function(e){return e})),n=[],a="ascending"===t,o=0,s=e.count();o<s;o++)n[o]=o;return"function"==typeof t?n.sort(t):"none"!==t&&n.sort((function(e,t){return a?r[e]-r[t]:r[t]-r[e]})),n}(i,s),u=e.get("orient"),d=l.width,h=l.height,p=l.x,f=l.y,m="horizontal"===u?[a(e.get("minSize"),h),a(e.get("maxSize"),h)]:[a(e.get("minSize"),d),a(e.get("maxSize"),d)],g=i.getDataExtent(n),y=e.get("min"),_=e.get("max");null==y&&(y=Math.min(g[0],0)),null==_&&(_=g[1]);var v=e.get("funnelAlign"),C=e.get("gap"),x=(("horizontal"===u?d:h)-C*(i.count()-1))/i.count(),b=function(e,t){if("horizontal"===u){var r,a=i.get(n,e)||0,s=o(a,[y,_],m,!0);switch(v){case"top":r=f;break;case"center":r=f+(h-s)/2;break;case"bottom":r=f+(h-s)}return[[t,r],[t,r+s]]}a=i.get(n,e)||0;var l,c=o(a,[y,_],m,!0);switch(v){case"left":l=p;break;case"center":l=p+(d-c)/2;break;case"right":l=p+d-c}return[[l,t],[l+c,t]]};"ascending"===s&&(x=-x,C=-C,"horizontal"===u?p+=d:f+=h,c=c.reverse());for(var S=0;S<c.length;S++){var T=c[S],E=c[S+1],w=i.getItemModel(T);if("horizontal"===u){var A=w.get("itemStyle.width");null==A?A=x:(A=a(A,d),"ascending"===s&&(A=-A));var P=b(T,p),D=b(E,p+A);p+=A+C,i.setItemLayout(T,{points:P.concat(D.slice().reverse())})}else{var M=w.get("itemStyle.height");null==M?M=x:(M=a(M,h),"ascending"===s&&(M=-M));P=b(T,"horizontal"===u?p:f),D=b(E,"horizontal"===u?p+A:f+M);f+=M+C,i.setItemLayout(T,{points:P.concat(D.slice().reverse())})}}!function(e){e.each((function(t){var i,r,n,a,o=e.getItemModel(t),s=o.getModel("label").get("position"),l=o.get("orient"),c=o.getModel("labelLine"),u=e.getItemLayout(t),d=u.points,h="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(h)"insideLeft"===s?(r=(d[0][0]+d[3][0])/2+5,n=(d[0][1]+d[3][1])/2,i="left"):"insideRight"===s?(r=(d[1][0]+d[2][0])/2-5,n=(d[1][1]+d[2][1])/2,i="right"):(r=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,n=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,i="center"),a=[[r,n],[r,n]];else{var p,f,m,g,y=c.get("length");"left"===s?(p=(d[3][0]+d[0][0])/2,f=(d[3][1]+d[0][1])/2,r=(m=p-y)-5,i="right"):"right"===s?(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,r=(m=p+y)+5,i="left"):"top"===s?(p=(d[3][0]+d[0][0])/2,n=(g=(f=(d[3][1]+d[0][1])/2)-y)-5,i="center"):"bottom"===s?(p=(d[1][0]+d[2][0])/2,n=(g=(f=(d[1][1]+d[2][1])/2)+y)+5,i="center"):"rightTop"===s?(p="horizontal"===l?d[3][0]:d[1][0],f="horizontal"===l?d[3][1]:d[1][1],"horizontal"===l?(n=(g=f-y)-5,i="center"):(r=(m=p+y)+5,i="top")):"rightBottom"===s?(p=d[2][0],f=d[2][1],"horizontal"===l?(n=(g=f+y)+5,i="center"):(r=(m=p+y)+5,i="bottom")):"leftTop"===s?(p=d[0][0],f="horizontal"===l?d[0][1]:d[1][1],"horizontal"===l?(n=(g=f-y)-5,i="center"):(r=(m=p-y)-5,i="right")):"leftBottom"===s?(p="horizontal"===l?d[1][0]:d[3][0],f="horizontal"===l?d[1][1]:d[2][1],"horizontal"===l?(n=(g=f+y)+5,i="center"):(r=(m=p-y)-5,i="right")):(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,"horizontal"===l?(n=(g=f+y)+5,i="center"):(r=(m=p+y)+5,i="left")),"horizontal"===l?r=m=p:n=g=f,a=[[p,f],[m,g]]}u.label={linePoints:a,x:r,y:n,verticalAlign:"middle",textAlign:i,inside:h}}))}(i)}))}},function(e,t,i){var r=i(1);i(200),i(416),i(417);var n=i(418);r.registerVisual(n)},function(e,t,i){var r=i(0),n=i(4);e.exports=function(e){!function(e){if(e.parallel)return;var t=!1;r.each(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}(e),function(e){var t=n.normalizeToArray(e.parallelAxis);r.each(t,(function(t){if(r.isObject(t)){var i=t.parallelIndex||0,a=n.normalizeToArray(e.parallel)[i];a&&a.parallelAxisDefault&&r.merge(t,a.parallelAxisDefault,!1)}}))}(e)}},function(e,t,i){var r=i(0),n=i(15),a=i(6),o=i(21),s=i(410),l=i(2),c=i(3),u=i(55),d=r.each,h=Math.min,p=Math.max,f=Math.floor,m=Math.ceil,g=c.round,y=Math.PI;function _(e,t,i){this._axesMap=r.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,t,i)}function v(e,t){return h(p(e,t[0]),t[1])}function C(e,t){var i=t.layoutLength/(t.axisCount-1);return{position:i*e,axisNameAvailableWidth:i,axisLabelShow:!0}}function x(e,t){var i,r,n=t.layoutLength,a=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,c=s,u=!1;return e<l[0]?(i=e*s,r=s):e<=l[1]?(i=t.axisExpandWindow0Pos+e*a-t.axisExpandWindow[0],c=a,u=!0):(i=n-(o-1-e)*s,r=s),{position:i,axisNameAvailableWidth:c,axisLabelShow:u,nameTruncateMaxWidth:r}}_.prototype={type:"parallel",constructor:_,_init:function(e,t,i){var r=e.dimensions,n=e.parallelAxisIndex;d(r,(function(e,i){var r=n[i],a=t.getComponent("parallelAxis",r),l=this._axesMap.set(e,new s(e,o.createScaleByModel(a),[0,0],a.get("type"),r)),c="category"===l.type;l.onBand=c&&a.get("boundaryGap"),l.inverse=a.get("inverse"),a.axis=l,l.model=a,l.coordinateSystem=a.coordinateSystem=this}),this)},update:function(e,t){this._updateAxesFromSeries(this._model,e)},containPoint:function(e){var t=this._makeLayoutInfo(),i=t.axisBase,r=t.layoutBase,n=t.pixelDimIndex,a=e[1-n],o=e[n];return a>=i&&a<=i+t.axisLength&&o>=r&&o<=r+t.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,t){t.eachSeries((function(i){if(e.contains(i,t)){var r=i.getData();d(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(r,r.mapDimension(e)),o.niceScaleExtent(t.scale,t.model)}),this)}}),this)},resize:function(e,t){this._rect=a.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var e,t=this._model,i=this._rect,r=["x","y"],n=["width","height"],a=t.get("layout"),o="horizontal"===a?0:1,s=i[n[o]],l=[0,s],c=this.dimensions.length,u=v(t.get("axisExpandWidth"),l),d=v(t.get("axisExpandCount")||0,[0,c]),h=t.get("axisExpandable")&&c>3&&c>d&&d>1&&u>0&&s>0,p=t.get("axisExpandWindow");p?(e=v(p[1]-p[0],l),p[1]=p[0]+e):(e=v(u*(d-1),l),(p=[u*(t.get("axisExpandCenter")||f(c/2))-e/2])[1]=p[0]+e);var y=(s-e)/(c-d);y<3&&(y=0);var _=[f(g(p[0]/u,1))+1,m(g(p[1]/u,1))-1],C=y/u*p[0];return{layout:a,pixelDimIndex:o,layoutBase:i[r[o]],layoutLength:s,axisBase:i[r[1-o]],axisLength:i[n[1-o]],axisExpandable:h,axisExpandWidth:u,axisCollapseWidth:y,axisExpandWindow:p,axisCount:c,winInnerIndices:_,axisExpandWindow0Pos:C}},_layoutAxes:function(){var e=this._rect,t=this._axesMap,i=this.dimensions,r=this._makeLayoutInfo(),a=r.layout;t.each((function(e){var t=[0,r.axisLength],i=e.inverse?1:0;e.setExtent(t[i],t[1-i])})),d(i,(function(t,i){var o=(r.axisExpandable?x:C)(i,r),s={horizontal:{x:o.position,y:r.axisLength},vertical:{x:0,y:o.position}},l={horizontal:y/2,vertical:0},c=[s[a].x+e.x,s[a].y+e.y],u=l[a],d=n.create();n.rotate(d,d,u),n.translate(d,d,c),this._axesLayout[t]={position:c,rotation:u,transform:d,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(e){return this._axesMap.get(e)},dataToPoint:function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},eachActiveState:function(e,t,i,n){null==i&&(i=0),null==n&&(n=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];r.each(o,(function(t){s.push(e.mapDimension(t)),l.push(a.get(t).model)}));for(var c=this.hasAxisBrushed(),u=i;u<n;u++){var d;if(c){d="active";for(var h=e.getValues(s,u),p=0,f=o.length;p<f;p++){if("inactive"===l[p].getActiveState(h[p])){d="inactive";break}}}else d="normal";t(d,u)}},hasAxisBrushed:function(){for(var e=this.dimensions,t=this._axesMap,i=!1,r=0,n=e.length;r<n;r++)"normal"!==t.get(e[r]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(e,t){var i=this._axesLayout[t];return l.applyTransform([e,0],i.transform)},getAxisLayout:function(e){return r.clone(this._axesLayout[e])},getSlidedAxisExpandWindow:function(e){var t=this._makeLayoutInfo(),i=t.pixelDimIndex,r=t.axisExpandWindow.slice(),n=r[1]-r[0],a=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:r};var o,s=e[i]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",c=t.axisCollapseWidth,d=this._model.get("axisExpandSlideTriggerArea"),f=null!=d[0];if(c)f&&c&&s<n*d[0]?(l="jump",o=s-n*d[2]):f&&c&&s>n*(1-d[0])?(l="jump",o=s-n*(1-d[2])):(o=s-n*d[1])>=0&&(o=s-n*(1-d[1]))<=0&&(o=0),(o*=t.axisExpandWidth/c)?u(o,r,a,"all"):l="none";else{n=r[1]-r[0];(r=[p(0,a[1]*s/n-n/2)])[1]=h(a[1],r[0]+n),r[0]=r[1]-n}return{axisExpandWindow:r,behavior:l}}};var b=_;e.exports=b},function(e,t,i){var r=i(0),n=i(35),a=function(e,t,i,r,a){n.call(this,e,t,i),this.type=r||"value",this.axisIndex=a};a.prototype={constructor:a,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(13);i(412);var a=n.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){n.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(e){var t=this.option;e&&r.merge(t,e,!0),this._initDimensions()},contains:function(e,t){var i=e.get("parallelIndex");return null!=i&&t.getComponent("parallel",i)===this},setAxisExpand:function(e){r.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},_initDimensions:function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],i=r.filter(this.dependentModels.parallelAxis,(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);r.each(i,(function(i){e.push("dim"+i.get("dim")),t.push(i.componentIndex)}))}});e.exports=a},function(e,t,i){var r=i(0),n=i(13),a=i(49),o=i(89),s=i(3),l=i(53),c=n.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return a([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var t=this.activeIntervals=r.clone(e);if(t)for(var i=t.length-1;i>=0;i--)s.asc(t[i])},getActiveState:function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(e))return"inactive";if(1===t.length){var i=t[0];if(i[0]<=e&&e<=i[1])return"active"}else for(var r=0,n=t.length;r<n;r++)if(t[r][0]<=e&&e<=t[r][1])return"active";return"inactive"}});r.merge(c.prototype,l),o("parallel",c,(function(e,t){return t.type||(t.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10});var u=c;e.exports=u},function(e,t,i){i(201),i(414),i(415)},function(e,t,i){var r=i(1);r.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),r.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}))},function(e,t,i){var r=i(1),n=i(0),a=i(36),o=i(121),s=i(202),l=i(2),c=["axisLine","axisTickLabel","axisName"],u=r.extendComponentView({type:"parallelAxis",init:function(e,t){u.superApply(this,"init",arguments),(this._brushController=new o(t.getZr())).on("brush",n.bind(this._onBrush,this))},render:function(e,t,i,r){if(!function(e,t,i){return i&&"axisAreaSelect"===i.type&&t.findComponents({mainType:"parallelAxis",query:i})[0]===e}(e,t,r)){this.axisModel=e,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new l.Group,this.group.add(this._axisGroup),e.get("show")){var s=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),u=s.coordinateSystem,d=e.getAreaSelectStyle(),h=d.width,p=e.axis.dim,f=u.getAxisLayout(p),m=n.extend({strokeContainThreshold:h},f),g=new a(e,m);n.each(c,g.add,g),this._axisGroup.add(g.getGroup()),this._refreshBrushController(m,d,e,s,h,i);var y=r&&!1===r.animation?null:e;l.groupTransition(o,this._axisGroup,y)}}},_refreshBrushController:function(e,t,i,r,a,o){var c=i.axis.getExtent(),u=c[1]-c[0],d=Math.min(30,.1*Math.abs(u)),h=l.BoundingRect.create({x:c[0],y:-a/2,width:u,height:a});h.x-=d,h.width+=2*d,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,position:e.position}).setPanels([{panelId:"pl",clipPath:s.makeRectPanelClipPath(h),isTargetByCursor:s.makeRectIsTargetByCursor(h,o,r),getLinearBrushOtherExtent:s.makeLinearBrushOtherExtent(h,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return n.map(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(i))},_onBrush:function(e,t){var i=this.axisModel,r=i.axis,a=n.map(e,(function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]}));(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:a})},dispose:function(){this._brushController.dispose()}});var d=u;e.exports=d},function(e,t,i){var r=i(0),n=r.each,a=r.createHashMap,o=i(14),s=i(30),l=o.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var i=this.getSource();return function(e,t){if(e.encodeDefine)return;var i=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(!i)return;var r=e.encodeDefine=a();n(i.dimensions,(function(e){var t=+e.replace("dim","");r.set(e,t)}))}(i,this),s(i,this)},getRawIndicesByActiveState:function(e){var t=this.coordinateSystem,i=this.getData(),r=[];return t.eachActiveState(i,(function(t,n){e===t&&r.push(i.getRawIndex(n))})),r},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});e.exports=l},function(e,t,i){var r=i(2),n=i(24);function a(e,t,i,r){for(var n,a=[],o=0;o<i.length;o++){var s=i[o],l=e.get(e.mapDimension(s),t);n=l,("category"===r.getAxis(s).type?null==n:null==n||isNaN(n))||a.push(r.dataToPoint(l,s))}return a}function o(e,t,i,n,o){var s=a(e,i,n,o),l=new r.Polyline({shape:{points:s},silent:!0,z2:10});return t.add(l),e.setItemGraphicEl(i,l),l}function s(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),{lineStyle:e.getModel("lineStyle").getLineStyle(),smooth:null!=t?t:.3}}function l(e,t,i,r){var n=r.lineStyle;t.hasItemOption&&(n=t.getItemModel(i).getModel("lineStyle").getLineStyle());e.useStyle(n);var a=e.style;a.fill=null,a.stroke=t.getItemVisual(i,"color"),a.opacity=t.getItemVisual(i,"opacity"),r.smooth&&(e.shape.smooth=r.smooth)}var c=n.extend({type:"parallel",init:function(){this._dataGroup=new r.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,t,i,n){var c=this._dataGroup,u=e.getData(),d=this._data,h=e.coordinateSystem,p=h.dimensions,f=s(e);if(u.diff(d).add((function(e){l(o(u,c,e,p,h),u,e,f)})).update((function(t,i){var o=d.getItemGraphicEl(i),s=a(u,t,p,h);u.setItemGraphicEl(t,o);var c=n&&!1===n.animation?null:e;r.updateProps(o,{shape:{points:s}},c,t),l(o,u,t,f)})).remove((function(e){var t=d.getItemGraphicEl(e);c.remove(t)})).execute(),!this._initialized){this._initialized=!0;var m=function(e,t,i){var n=e.model,a=e.getRect(),o=new r.Rect({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),s="horizontal"===n.get("layout")?"width":"height";return o.setShape(s,0),r.initProps(o,{shape:{width:a.width,height:a.height}},t,i),o}(h,e,(function(){setTimeout((function(){c.removeClipPath()}))}));c.setClipPath(m)}this._data=u},incrementalPrepareRender:function(e,t,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(e,t,i){for(var r=t.getData(),n=t.coordinateSystem,a=n.dimensions,c=s(t),u=e.start;u<e.end;u++){var d=o(r,this._dataGroup,u,a,n);d.incremental=!0,l(d,r,u,c)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});e.exports=c},function(e,t){var i=["lineStyle","normal","opacity"],r={seriesType:"parallel",reset:function(e,t,r){var n=e.getModel("itemStyle"),a=e.getModel("lineStyle"),o=t.get("color"),s=a.get("color")||n.get("color")||o[e.seriesIndex%o.length],l=e.get("inactiveOpacity"),c=e.get("activeOpacity"),u=e.getModel("lineStyle").getLineStyle(),d=e.coordinateSystem,h=e.getData(),p={normal:u.opacity,active:c,inactive:l};return h.setVisual("color",s),{progress:function(e,t){d.eachActiveState(t,(function(e,r){var n=p[e];if("normal"===e&&t.hasItemOption){var a=t.getItemModel(r).get(i,!0);null!=a&&(n=a)}t.setItemVisual(r,"opacity",n)}),e.start,e.end)}}}};e.exports=r},function(e,t,i){var r=i(1);i(420),i(421),i(422);var n=i(423),a=i(424);r.registerLayout(n),r.registerVisual(a)},function(e,t,i){var r=i(14),n=i(196),a=i(7).encodeHTML,o=i(12),s=(i(5).__DEV__,r.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(e,t){for(var i=e.edges||e.links,r=e.data||e.nodes,a=e.levels,s=this.levelModels={},l=0;l<a.length;l++)null!=a[l].depth&&a[l].depth>=0&&(s[a[l].depth]=new o(a[l],this,t));if(r&&i)return n(r,i,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var i=this.parentModel,r=i.getData().getItemLayout(t).depth;return i.levelModels[r]||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var i=this.parentModel,r=i.getGraph().getEdgeByIndex(t).node1.getLayout().depth;return i.levelModels[r]||this.parentModel})),e}))})).data},setNodePosition:function(e,t){var i=this.option.data[e];i.localX=t[0],i.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,i){if("edge"===i){var r=this.getDataParams(e,i),n=r.data,o=n.source+" -- "+n.target;return r.value&&(o+=" : "+r.value),a(o)}if("node"===i){var l=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,i).data.name;if(l)o=c+" : "+l;return a(o)}return s.superCall(this,"formatTooltip",e,t)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var i=s.superCall(this,"getDataParams",e,t);if(null==i.value&&"node"===t){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}})),l=s;e.exports=l},function(e,t,i){var r=i(2),n=i(1),a=i(0),o=["itemStyle","opacity"],s=["emphasis","itemStyle","opacity"],l=["lineStyle","opacity"],c=["emphasis","lineStyle","opacity"];function u(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function d(e,t,i){var r=e.getGraphicEl(),n=u(e,t);null!=i&&(null==n&&(n=1),n*=i),r.downplay&&r.downplay(),r.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",n)}))}function h(e,t){var i=u(e,t),r=e.getGraphicEl();r.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",i)})),r.highlight&&r.highlight()}var p=r.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(e,t){var i=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+i,t.y2),e.bezierCurveTo(t.cpx2+i,t.cpy2,t.cpx1+i,t.cpy1,t.x1+i,t.y1)):(e.lineTo(t.x2,t.y2+i),e.bezierCurveTo(t.cpx2,t.cpy2+i,t.cpx1,t.cpy1+i,t.x1,t.y1+i)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}}),f=n.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,i){var n=this,a=e.getGraph(),o=this.group,s=e.layoutInfo,l=s.width,c=s.height,u=e.getData(),d=e.getData("edge"),h=e.get("orient");this._model=e,o.removeAll(),o.attr("position",[s.x,s.y]),a.eachEdge((function(t){var i=new p;i.dataIndex=t.dataIndex,i.seriesIndex=e.seriesIndex,i.dataType="edge";var n,a,s,u,f,m,g,y,_=t.getModel("lineStyle"),v=_.get("curveness"),C=t.node1.getLayout(),x=t.node1.getModel(),b=x.get("localX"),S=x.get("localY"),T=t.node2.getLayout(),E=t.node2.getModel(),w=E.get("localX"),A=E.get("localY"),P=t.getLayout();switch(i.shape.extent=Math.max(1,P.dy),i.shape.orient=h,"vertical"===h?(n=(null!=b?b*l:C.x)+P.sy,a=(null!=S?S*c:C.y)+C.dy,s=(null!=w?w*l:T.x)+P.ty,f=n,m=a*(1-v)+(u=null!=A?A*c:T.y)*v,g=s,y=a*v+u*(1-v)):(n=(null!=b?b*l:C.x)+C.dx,a=(null!=S?S*c:C.y)+P.sy,f=n*(1-v)+(s=null!=w?w*l:T.x)*v,m=a,g=n*v+s*(1-v),y=u=(null!=A?A*c:T.y)+P.ty),i.setShape({x1:n,y1:a,x2:s,y2:u,cpx1:f,cpy1:m,cpx2:g,cpy2:y}),i.setStyle(_.getItemStyle()),i.style.fill){case"source":i.style.fill=t.node1.getVisual("color");break;case"target":i.style.fill=t.node2.getVisual("color")}r.setHoverStyle(i,t.getModel("emphasis.lineStyle").getItemStyle()),o.add(i),d.setItemGraphicEl(t.dataIndex,i)})),a.eachNode((function(t){var i=t.getLayout(),n=t.getModel(),a=n.get("localX"),s=n.get("localY"),d=n.getModel("label"),h=n.getModel("emphasis.label"),p=new r.Rect({shape:{x:null!=a?a*l:i.x,y:null!=s?s*c:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=t.getModel("emphasis.itemStyle").getItemStyle();r.setLabelStyle(p.style,f,d,h,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),p.setStyle("fill",t.getVisual("color")),r.setHoverStyle(p,f),o.add(p),u.setItemGraphicEl(t.dataIndex,p),p.dataType="node"})),u.eachItemGraphicEl((function(t,r){var a=u.getItemModel(r);a.get("draggable")&&(t.drift=function(t,a){n._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(r),localX:this.shape.x/l,localY:this.shape.y/c})},t.ondragend=function(){n._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))})),d.eachItemGraphicEl((function(t,r){var a=d.getItemModel(r);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))})),!this._data&&e.get("animation")&&o.setClipPath(function(e,t,i){var n=new r.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return r.initProps(n,{shape:{width:e.width+20}},t,i),n}(o.getBoundingRect(),e,(function(){o.removeClipPath()}))),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(e){var t=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){t._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,i,r){var n=e.getData(),u=n.graph,p=r.dataIndex,f=n.getItemModel(p),m=r.edgeDataIndex;if(null!=p||null!=m){var g=u.getNodeByIndex(p),y=u.getEdgeByIndex(m);if(u.eachNode((function(e){d(e,o,.1)})),u.eachEdge((function(e){d(e,l,.1)})),g){h(g,s);var _=f.get("focusNodeAdjacency");"outEdges"===_?a.each(g.outEdges,(function(e){e.dataIndex<0||(h(e,c),h(e.node2,s))})):"inEdges"===_?a.each(g.inEdges,(function(e){e.dataIndex<0||(h(e,c),h(e.node1,s))})):"allEdges"===_&&a.each(g.edges,(function(e){e.dataIndex<0||(h(e,c),e.node1!==g&&h(e.node1,s),e.node2!==g&&h(e.node2,s))}))}y&&(h(y,c),h(y.node1,s),h(y.node2,s))}},unfocusNodeAdjacency:function(e,t,i,r){var n=e.getGraph();n.eachNode((function(e){d(e,o)})),n.eachEdge((function(e){d(e,l)}))}});e.exports=f},function(e,t,i){var r=i(1);i(197),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}))},function(e,t,i){var r=i(6),n=i(0),a=i(4).groupData;function o(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function s(e,t,i,r,a){var o="vertical"===a?"x":"y";n.each(e,(function(e){var n,s,l;e.sort((function(e,t){return e.getLayout()[o]-t.getLayout()[o]}));for(var c=0,u=e.length,d="vertical"===a?"dx":"dy",h=0;h<u;h++)(l=c-(s=e[h]).getLayout()[o])>0&&(n=s.getLayout()[o]+l,"vertical"===a?s.setLayout({x:n},!0):s.setLayout({y:n},!0)),c=s.getLayout()[o]+s.getLayout()[d]+t;if((l=c-t-("vertical"===a?r:i))>0)for(n=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:n},!0):s.setLayout({y:n},!0),c=n,h=u-2;h>=0;--h)(l=(s=e[h]).getLayout()[o]+s.getLayout()[d]+t-c)>0&&(n=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:n},!0):s.setLayout({y:n},!0)),c=s.getLayout()[o]}))}function l(e,t,i){n.each(e.slice().reverse(),(function(e){n.each(e,(function(e){if(e.outEdges.length){var r=m(e.outEdges,c,i)/m(e.outEdges,f,i);if(isNaN(r)){var n=e.outEdges.length;r=n?m(e.outEdges,u,i)/n:0}if("vertical"===i){var a=e.getLayout().x+(r-p(e,i))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-p(e,i))*t;e.setLayout({y:o},!0)}}}))}))}function c(e,t){return p(e.node2,t)*e.getValue()}function u(e,t){return p(e.node2,t)}function d(e,t){return p(e.node1,t)*e.getValue()}function h(e,t){return p(e.node1,t)}function p(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function f(e){return e.getValue()}function m(e,t,i){for(var r=0,n=e.length,a=-1;++a<n;){var o=+t.call(e,e[a],i);isNaN(o)||(r+=o)}return r}function g(e,t,i){n.each(e,(function(e){n.each(e,(function(e){if(e.inEdges.length){var r=m(e.inEdges,d,i)/m(e.inEdges,f,i);if(isNaN(r)){var n=e.inEdges.length;r=n?m(e.inEdges,h,i)/n:0}if("vertical"===i){var a=e.getLayout().x+(r-p(e,i))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-p(e,i))*t;e.setLayout({y:o},!0)}}}))}))}e.exports=function(e,t,i){e.eachSeriesByType("sankey",(function(e){var i=e.get("nodeWidth"),c=e.get("nodeGap"),u=function(e,t){return r.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=u;var d=u.width,h=u.height,p=e.getGraph(),y=p.nodes,_=p.edges;!function(e){n.each(e,(function(e){var t=m(e.outEdges,f),i=m(e.inEdges,f),r=e.getValue()||0,n=Math.max(t,i,r);e.setLayout({value:n},!0)}))}(y),function(e,t,i,r,c,u,d,h,p){(function(e,t,i,r,a,s,l){for(var c=[],u=[],d=[],h=[],p=0,f=0;f<t.length;f++)c[f]=1;for(f=0;f<e.length;f++)u[f]=e[f].inEdges.length,0===u[f]&&d.push(e[f]);var m=-1;for(;d.length;){for(var g=0;g<d.length;g++){var y=d[g],_=y.hostGraph.data.getRawDataItem(y.dataIndex),v=null!=_.depth&&_.depth>=0;v&&_.depth>m&&(m=_.depth),y.setLayout({depth:v?_.depth:p},!0),"vertical"===s?y.setLayout({dy:i},!0):y.setLayout({dx:i},!0);for(var C=0;C<y.outEdges.length;C++){var x=y.outEdges[C],b=t.indexOf(x);c[b]=0;var S=x.node2,T=e.indexOf(S);0==--u[T]&&h.indexOf(S)<0&&h.push(S)}}++p,d=h,h=[]}for(f=0;f<c.length;f++)if(1===c[f])throw new Error("Sankey is a DAG, the original data has cycle!");var E=m>p-1?m:p-1;l&&"left"!==l&&function(e,t,i,r){if("right"===t){for(var a=[],s=e,l=0;s.length;){for(var c=0;c<s.length;c++){var u=s[c];u.setLayout({skNodeHeight:l},!0);for(var d=0;d<u.inEdges.length;d++){var h=u.inEdges[d];a.indexOf(h.node1)<0&&a.push(h.node1)}}s=a,a=[],++l}n.each(e,(function(e){o(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){n.each(e,(function(e){o(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,r)}(e,l,0,E);!function(e,t,i){n.each(e,(function(e){var r=e.getLayout().depth*t;"vertical"===i?e.setLayout({y:r},!0):e.setLayout({x:r},!0)}))}(e,"vertical"===s?(a-i)/E:(r-i)/E,s)})(e,t,i,c,u,h,p),function(e,t,i,r,o,c,u){var d=function(e,t){var i=[],r="vertical"===t?"y":"x",o=a(e,(function(e){return e.getLayout()[r]}));return o.keys.sort((function(e,t){return e-t})),n.each(o.keys,(function(e){i.push(o.buckets.get(e))})),i}(e,u);(function(e,t,i,r,a,o){var s=1/0;n.each(e,(function(e){var t=e.length,l=0;n.each(e,(function(e){l+=e.getLayout().value}));var c="vertical"===o?(r-(t-1)*a)/l:(i-(t-1)*a)/l;c<s&&(s=c)})),n.each(e,(function(e){n.each(e,(function(e,t){var i=e.getLayout().value*s;"vertical"===o?(e.setLayout({x:t},!0),e.setLayout({dx:i},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:i},!0))}))})),n.each(t,(function(e){var t=+e.getValue()*s;e.setLayout({dy:t},!0)}))})(d,t,i,r,o,u),s(d,o,i,r,u);for(var h=1;c>0;c--)l(d,h*=.99,u),s(d,o,i,r,u),g(d,h,u),s(d,o,i,r,u)}(e,t,u,c,r,d,h),function(e,t){var i="vertical"===t?"x":"y";n.each(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[i]-t.node2.getLayout()[i]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[i]-t.node1.getLayout()[i]}))})),n.each(e,(function(e){var t=0,i=0;n.each(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),n.each(e.inEdges,(function(e){e.setLayout({ty:i},!0),i+=e.getLayout().dy}))}))}(e,h)}(y,_,i,c,d,h,0!==n.filter(y,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))}},function(e,t,i){var r=i(47),n=i(0);e.exports=function(e,t){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph().nodes;if(t.length){var i=1/0,a=-1/0;n.each(t,(function(e){var t=e.getLayout().value;t<i&&(i=t),t>a&&(a=t)})),n.each(t,(function(t){var n=new r({type:"color",mappingMethod:"linear",dataExtent:[i,a],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),o=t.getModel().get("itemStyle.color");null!=o?t.setVisual("color",o):t.setVisual("color",n)}))}}))}},function(e,t,i){var r=i(1);i(426),i(427);var n=i(428),a=i(429);r.registerVisual(n),r.registerLayout(a)},function(e,t,i){var r=i(0),n=i(14),a=i(203).seriesModelMixin,o=n.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});r.mixin(o,a,!0);var s=o;e.exports=s},function(e,t,i){var r=i(0),n=i(24),a=i(2),o=i(10),s=["itemStyle"],l=["emphasis","itemStyle"],c=n.extend({type:"boxplot",render:function(e,t,i){var r=e.getData(),n=this.group,a=this._data;this._data||n.removeAll();var o="horizontal"===e.get("layout")?1:0;r.diff(a).add((function(e){if(r.hasValue(e)){var t=d(r.getItemLayout(e),r,e,o,!0);r.setItemGraphicEl(e,t),n.add(t)}})).update((function(e,t){var i=a.getItemGraphicEl(t);if(r.hasValue(e)){var s=r.getItemLayout(e);i?h(s,i,r,e):i=d(s,r,e,o),n.add(i),r.setItemGraphicEl(e,i)}else n.remove(i)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&n.remove(t)})).execute(),this._data=r},remove:function(e){var t=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(e){e&&t.remove(e)}))},dispose:r.noop}),u=o.extend({type:"boxplotBoxPath",shape:{},buildPath:function(e,t){var i=t.points,r=0;for(e.moveTo(i[r][0],i[r][1]),r++;r<4;r++)e.lineTo(i[r][0],i[r][1]);for(e.closePath();r<i.length;r++)e.moveTo(i[r][0],i[r][1]),r++,e.lineTo(i[r][0],i[r][1])}});function d(e,t,i,r,n){var a=e.ends,o=new u({shape:{points:n?p(a,r,e):a}});return h(e,o,t,i,n),o}function h(e,t,i,r,n){var o=i.hostModel;(0,a[n?"initProps":"updateProps"])(t,{shape:{points:e.ends}},o,r);var c=i.getItemModel(r),u=c.getModel(s),d=i.getItemVisual(r,"color"),h=u.getItemStyle(["borderColor"]);h.stroke=d,h.strokeNoScale=!0,t.useStyle(h),t.z2=100;var p=c.getModel(l).getItemStyle();a.setHoverStyle(t,p)}function p(e,t,i){return r.map(e,(function(e){return(e=e.slice())[t]=i.initBaseline,e}))}var f=c;e.exports=f},function(e,t){var i=["itemStyle","borderColor"];e.exports=function(e,t){var r=e.get("color");e.eachRawSeriesByType("boxplot",(function(t){var n=r[t.seriesIndex%r.length],a=t.getData();a.setVisual({legendSymbol:"roundRect",color:t.get(i)||n}),e.isSeriesFiltered(t)||a.each((function(e){var t=a.getItemModel(e);a.setItemVisual(e,{color:t.get(i,!0)})}))}))}},function(e,t,i){var r=i(0),n=i(3).parsePercent,a=r.each;e.exports=function(e){var t=function(e){var t=[],i=[];return e.eachSeriesByType("boxplot",(function(e){var n=e.getBaseAxis(),a=r.indexOf(i,n);a<0&&(a=i.length,i[a]=n,t[a]={axis:n,seriesModels:[]}),t[a].seriesModels.push(e)})),t}(e);a(t,(function(e){var t=e.seriesModels;t.length&&(!function(e){var t,i,o=e.axis,s=e.seriesModels,l=s.length,c=e.boxWidthList=[],u=e.boxOffsetList=[],d=[];if("category"===o.type)i=o.getBandWidth();else{var h=0;a(s,(function(e){h=Math.max(h,e.getData().count())})),t=o.getExtent(),Math.abs(t[1]-t[0])}a(s,(function(e){var t=e.get("boxWidth");r.isArray(t)||(t=[t,t]),d.push([n(t[0],i)||0,n(t[1],i)||0])}));var p=.8*i-2,f=p/l*.3,m=(p-f*(l-1))/l,g=m/2-p/2;a(s,(function(e,t){u.push(g),g+=f+m,c.push(Math.min(Math.max(m,d[t][0]),d[t][1]))}))}(e),a(t,(function(t,i){!function(e,t,i){var r=e.coordinateSystem,n=e.getData(),a=i/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],c=n.mapDimension(l[o]),u=n.mapDimension(l[s],!0);if(null==c||u.length<5)return;for(var d=0;d<n.count();d++){var h=n.get(c,d),p=v(h,u[2],d),f=v(h,u[0],d),m=v(h,u[1],d),g=v(h,u[3],d),y=v(h,u[4],d),_=[];C(_,m,0),C(_,g,1),_.push(f,m,y,g),x(_,f),x(_,y),x(_,p),n.setItemLayout(d,{initBaseline:p[s],ends:_})}function v(e,i,a){var l,c=n.get(i,a),u=[];return u[o]=e,u[s]=c,isNaN(e)||isNaN(c)?l=[NaN,NaN]:(l=r.dataToPoint(u))[o]+=t,l}function C(e,t,i){var r=t.slice(),n=t.slice();r[o]+=a,n[o]-=a,i?e.push(r,n):e.push(n,r)}function x(e,t){var i=t.slice(),r=t.slice();i[o]-=a,r[o]+=a,e.push(i,r)}}(t,e.boxOffsetList[i],e.boxWidthList[i])})))}))}},function(e,t,i){var r=i(1);i(431),i(432);var n=i(433),a=i(434),o=i(435);r.registerPreprocessor(n),r.registerVisual(a),r.registerLayout(o)},function(e,t,i){var r=i(0),n=i(14),a=i(203).seriesModelMixin,o=n.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(e,t,i){var r=t.getItemLayout(e);return r&&i.rect(r.brushRect)}});r.mixin(o,a,!0);var s=o;e.exports=s},function(e,t,i){var r=i(0),n=i(24),a=i(2),o=i(10),s=i(68).createClipPath,l=["itemStyle"],c=["emphasis","itemStyle"],u=["color","color0","borderColor","borderColor0"],d=n.extend({type:"candlestick",render:function(e,t,i){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},incrementalPrepareRender:function(e,t,i){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,i,r){this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e){var t=e.getData(),i=this._data,r=this.group,n=t.getLayout("isSimpleBox"),o=e.get("clip",!0),s=e.coordinateSystem,l=s.getArea&&s.getArea();this._data||r.removeAll(),t.diff(i).add((function(i){if(t.hasValue(i)){var s,c=t.getItemLayout(i);if(o&&f(l,c))return;s=p(c,i,!0),a.initProps(s,{shape:{points:c.ends}},e,i),m(s,t,i,n),r.add(s),t.setItemGraphicEl(i,s)}})).update((function(s,c){var u=i.getItemGraphicEl(c);if(t.hasValue(s)){var d=t.getItemLayout(s);o&&f(l,d)?r.remove(u):(u?a.updateProps(u,{shape:{points:d.ends}},e,s):u=p(d,s),m(u,t,s,n),r.add(u),t.setItemGraphicEl(s,u))}else r.remove(u)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&r.remove(t)})).execute(),this._data=t},_renderLarge:function(e){this._clear(),_(e,this.group);var t=e.get("clip",!0)?s(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},_incrementalRenderNormal:function(e,t){for(var i,r=t.getData(),n=r.getLayout("isSimpleBox");null!=(i=e.next());){var a;m(a=p(r.getItemLayout(i),i),r,i,n),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(e,t){_(t,this.group,!0)},remove:function(e){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:r.noop}),h=o.extend({type:"normalCandlestickBox",shape:{},buildPath:function(e,t){var i=t.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))}});function p(e,t,i){var r=e.ends;return new h({shape:{points:i?g(r,e):r},z2:100})}function f(e,t){for(var i=!0,r=0;r<t.ends.length;r++)if(e.contain(t.ends[r][0],t.ends[r][1])){i=!1;break}return i}function m(e,t,i,r){var n=t.getItemModel(i),o=n.getModel(l),s=t.getItemVisual(i,"color"),d=t.getItemVisual(i,"borderColor")||s,h=o.getItemStyle(u);e.useStyle(h),e.style.strokeNoScale=!0,e.style.fill=s,e.style.stroke=d,e.__simpleBox=r;var p=n.getModel(c).getItemStyle();a.setHoverStyle(e,p)}function g(e,t){return r.map(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}var y=o.extend({type:"largeCandlestickBox",shape:{},buildPath:function(e,t){for(var i=t.points,r=0;r<i.length;)if(this.__sign===i[r++]){var n=i[r++];e.moveTo(n,i[r++]),e.lineTo(n,i[r++])}else r+=3}});function _(e,t,i){var r=e.getData(),n=r.getLayout("largePoints"),a=new y({shape:{points:n},__sign:1});t.add(a);var o=new y({shape:{points:n},__sign:-1});t.add(o),v(1,a,e,r),v(-1,o,e,r),i&&(a.incremental=!0,o.incremental=!0)}function v(e,t,i,r){var n=e>0?"P":"N",a=r.getVisual("borderColor"+n)||r.getVisual("color"+n),o=i.getModel(l).getItemStyle(u);t.useStyle(o),t.style.fill=null,t.style.stroke=a}var C=d;e.exports=C},function(e,t,i){var r=i(0);e.exports=function(e){e&&r.isArray(e.series)&&r.each(e.series,(function(e){r.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))}},function(e,t,i){var r=i(51),n=["itemStyle","borderColor"],a=["itemStyle","borderColor0"],o=["itemStyle","color"],s=["itemStyle","color0"],l={seriesType:"candlestick",plan:r(),performRawSeries:!0,reset:function(e,t){if(e.getData().setVisual({legendSymbol:"roundRect",colorP:i(1,e),colorN:i(-1,e),borderColorP:r(1,e),borderColorN:r(-1,e)}),!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){var n;for(;null!=(n=e.next());){var a=t.getItemModel(n),o=t.getItemLayout(n).sign;t.setItemVisual(n,{color:i(o,a),borderColor:r(o,a)})}}};function i(e,t){return t.get(e>0?o:s)}function r(e,t){return t.get(e>0?n:a)}}};e.exports=l},function(e,t,i){var r=i(2).subPixelOptimize,n=i(51),a=i(3).parsePercent,o=i(0).retrieve2,s="undefined"!=typeof Float32Array?Float32Array:Array,l={seriesType:"candlestick",plan:n(),reset:function(e){var t=e.coordinateSystem,i=e.getData(),n=function(e,t){var i,r=e.getBaseAxis(),n="category"===r.type?r.getBandWidth():(i=r.getExtent(),Math.abs(i[1]-i[0])/t.count()),s=a(o(e.get("barMaxWidth"),n),n),l=a(o(e.get("barMinWidth"),1),n),c=e.get("barWidth");return null!=c?a(c,n):Math.max(Math.min(n/2,s),l)}(e,i),l=["x","y"],u=i.mapDimension(l[0]),d=i.mapDimension(l[1],!0),h=d[0],p=d[1],f=d[2],m=d[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==u||d.length<4))return{progress:e.pipelineContext.large?function(e,i){var r,n,a=new s(4*e.count),o=0,l=[],d=[];for(;null!=(n=e.next());){var g=i.get(u,n),y=i.get(h,n),_=i.get(p,n),v=i.get(f,n),C=i.get(m,n);isNaN(g)||isNaN(v)||isNaN(C)?(a[o++]=NaN,o+=3):(a[o++]=c(i,n,y,_,p),l[0]=g,l[1]=v,r=t.dataToPoint(l,null,d),a[o++]=r?r[0]:NaN,a[o++]=r?r[1]:NaN,l[1]=C,r=t.dataToPoint(l,null,d),a[o++]=r?r[1]:NaN)}i.setLayout("largePoints",a)}:function(e,i){var a;for(;null!=(a=e.next());){var o=i.get(u,a),s=i.get(h,a),l=i.get(p,a),d=i.get(f,a),g=i.get(m,a),y=Math.min(s,l),_=Math.max(s,l),v=T(y,o),C=T(_,o),x=T(d,o),b=T(g,o),S=[];E(S,C,0),E(S,v,1),S.push(A(b),A(C),A(x),A(v)),i.setItemLayout(a,{sign:c(i,a,s,l,p),initBaseline:s>l?C[1]:v[1],ends:S,brushRect:w(d,g,o)})}function T(e,i){var r=[];return r[0]=i,r[1]=e,isNaN(i)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function E(e,t,i){var a=t.slice(),o=t.slice();a[0]=r(a[0]+n/2,1,!1),o[0]=r(o[0]-n/2,1,!0),i?e.push(a,o):e.push(o,a)}function w(e,t,i){var r=T(e,i),a=T(t,i);return r[0]-=n/2,a[0]-=n/2,{x:r[0],y:r[1],width:n,height:a[1]-r[1]}}function A(e){return e[0]=r(e[0],1),e}}}}};function c(e,t,i,r,n){return i>r?-1:i<r?1:t>0?e.get(n,t-1)<=r?1:-1:1}e.exports=l},function(e,t,i){var r=i(1);i(437),i(438);var n=i(44),a=i(69);r.registerVisual(n("effectScatter","circle")),r.registerLayout(a("effectScatter"))},function(e,t,i){var r=i(30),n=i(14).extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return r(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});e.exports=n},function(e,t,i){var r=i(1),n=i(67),a=i(439),o=i(15),s=i(69),l=r.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new n(a)},render:function(e,t,i){var r=e.getData(),n=this._symbolDraw;n.updateData(r),this.group.add(n.group)},updateTransform:function(e,t,i){var r=e.getData();this.group.dirty();var n=s().reset(e);n.progress&&n.progress({start:0,end:r.count()},r),this._symbolDraw.updateLayout(r)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=o.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}});e.exports=l},function(e,t,i){var r=i(0),n=i(19).createSymbol,a=i(2).Group,o=i(3).parsePercent,s=i(88);function l(e,t){var i=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?i:null,fill:"fill"===t.brushType?i:null}})}))}function c(e,t){a.call(this);var i=new s(e,t),r=new a;this.add(i),this.add(r),r.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(e,t)}var u=c.prototype;u.stopEffectAnimation=function(){this.childAt(1).removeAll()},u.startEffectAnimation=function(e){for(var t=e.symbolType,i=e.color,r=this.childAt(1),a=0;a<3;a++){var o=n(t,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var s=-a/3*e.period+e.effectOffset;o.animate("",!0).when(e.period,{scale:[e.rippleScale/2,e.rippleScale/2]}).delay(s).start(),o.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),r.add(o)}l(r,e)},u.updateEffectAnimation=function(e){for(var t=this._effectCfg,i=this.childAt(1),r=["symbolType","period","rippleScale"],n=0;n<r.length;n++){var a=r[n];if(t[a]!==e[a])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}l(i,e)},u.highlight=function(){this.trigger("emphasis")},u.downplay=function(){this.trigger("normal")},u.updateData=function(e,t){var i=e.hostModel;this.childAt(0).updateData(e,t);var n=this.childAt(1),a=e.getItemModel(t),s=e.getItemVisual(t,"symbol"),l=function(e){return r.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),c=e.getItemVisual(t,"color");n.attr("scale",l),n.traverse((function(e){e.attr({fill:c})}));var u=a.getShallow("symbolOffset");if(u){var d=n.position;d[0]=o(u[0],l[0]),d[1]=o(u[1],l[1])}var h=e.getItemVisual(t,"symbolRotate");n.rotation=(h||0)*Math.PI/180||0;var p={};if(p.showEffectOn=i.get("showEffectOn"),p.rippleScale=a.get("rippleEffect.scale"),p.brushType=a.get("rippleEffect.brushType"),p.period=1e3*a.get("rippleEffect.period"),p.effectOffset=t/e.count(),p.z=a.getShallow("z")||0,p.zlevel=a.getShallow("zlevel")||0,p.symbolType=s,p.color=c,p.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===p.showEffectOn)this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p;else{this._effectCfg=null,this.stopEffectAnimation();var f=this.childAt(0),m=function(){f.highlight(),"render"!==p.showEffectOn&&this.startEffectAnimation(p)},g=function(){f.downplay(),"render"!==p.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",m,this).on("mouseout",g,this).on("emphasis",m,this).on("normal",g,this)}this._effectCfg=p},u.fadeOut=function(e){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),e&&e()},r.inherits(c,a);var d=c;e.exports=d},function(e,t,i){var r=i(1);i(441),i(442);var n=i(206),a=i(445);r.registerLayout(n),r.registerVisual(a)},function(e,t,i){i(5).__DEV__;var r=i(14),n=i(18),a=i(0),o=a.concatArray,s=a.mergeAll,l=a.map,c=i(7).encodeHTML,u=(i(20),"undefined"==typeof Uint32Array?Array:Uint32Array),d="undefined"==typeof Float64Array?Array:Float64Array;function h(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=l(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),s([t,e[0],e[1]])})))}var p=r.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(e){e.data=e.data||[],h(e);var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),p.superApply(this,"init",arguments)},mergeOption:function(e){if(h(e),e.data){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count))}p.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=o(this._flatCoords,t.flatCoords),this._flatCoordsOffset=o(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*e],r=this._flatCoordsOffset[2*e+1],n=0;n<r;n++)t[n]=t[n]||[],t[n][0]=this._flatCoords[i+2*n],t[n][1]=this._flatCoords[i+2*n+1];return r}var a=this._getCoordsFromItemModel(e);for(n=0;n<a.length;n++)t[n]=t[n]||[],t[n][0]=a[n][0],t[n][1]=a[n][1];return a.length},_processFlatCoordsArray:function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),"number"==typeof e[0]){for(var i=e.length,r=new u(i),n=new d(i),a=0,o=0,s=0,l=0;l<i;){s++;var c=e[l++];r[o++]=a+t,r[o++]=c;for(var h=0;h<c;h++){var p=e[l++],f=e[l++];n[a++]=p,n[a++]=f}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,o),flatCoords:n,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var i=new n(["value"],this);return i.hasItemOption=!1,i.initData(e.data,[],(function(e,t,r,n){if(e instanceof Array)return NaN;i.hasItemOption=!0;var a=e.value;return null!=a?a instanceof Array?a[n]:a:void 0})),i},formatTooltip:function(e){var t=this.getData().getItemModel(e),i=t.get("name");if(i)return i;var r=t.get("fromName"),n=t.get("toName"),a=[];return null!=r&&a.push(r),null!=n&&a.push(n),c(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),f=p;e.exports=f},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(118),a=i(204),o=i(119),s=i(205),l=i(443),c=i(444),u=i(206),d=i(68).createClipPath,h=r.extendChartView({type:"lines",init:function(){},render:function(e,t,i){var r=e.getData(),n=this._updateLineDraw(r,e),a=e.get("zlevel"),o=e.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),n.updateData(r);var c=e.get("clip",!0)&&d(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(e,t,i){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(i),this._finished=!1},incrementalRender:function(e,t,i){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,i){var r=e.getData(),n=e.pipelineContext;if(!this._finished||n.large||n.progressiveRender)return{update:!0};var a=u.reset(e);a.progress&&a.progress({start:0,end:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(e,t){var i=this._lineDraw,r=this._showEffect(t),u=!!t.get("polyline"),d=t.pipelineContext.large;return i&&r===this._hasEffet&&u===this._isPolyline&&d===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=d?new c:new n(u?r?l:s:r?a:o),this._hasEffet=r,this._isPolyline=u,this._isLargeDraw=d,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(e){return!!e.get("effect.show")},_clearLayer:function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},dispose:function(){}});e.exports=h},function(e,t,i){var r=i(205),n=i(0),a=i(204),o=i(8);function s(e,t,i){a.call(this,e,t,i),this._lastFrame=0,this._lastFramePercent=0}var l=s.prototype;l.createLine=function(e,t,i){return new r(e,t,i)},l.updateAnimationPoints=function(e,t){this._points=t;for(var i=[0],r=0,n=1;n<t.length;n++){var a=t[n-1],s=t[n];r+=o.dist(a,s),i.push(r)}if(0!==r){for(n=0;n<i.length;n++)i[n]/=r;this._offsets=i,this._length=r}},l.getLineLength=function(e){return this._length},l.updateSymbolPosition=function(e){var t=e.__t,i=this._points,r=this._offsets,n=i.length;if(r){var a=this._lastFrame;if(t<this._lastFramePercent){for(s=Math.min(a+1,n-1);s>=0&&!(r[s]<=t);s--);s=Math.min(s,n-2)}else{for(var s=a;s<n&&!(r[s]>t);s++);s=Math.min(s-1,n-2)}o.lerp(e.position,i[s],i[s+1],(t-r[s])/(r[s+1]-r[s]));var l=i[s+1][0]-i[s][0],c=i[s+1][1]-i[s][1];e.rotation=-Math.atan2(c,l)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=t,e.ignore=!1}},n.inherits(s,a);var c=s;e.exports=c},function(e,t,i){var r=i(2),n=i(106),a=i(159),o=i(160),s=r.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(e,t){var i=t.segs,r=t.curveness;if(t.polyline)for(var n=0;n<i.length;){var a=i[n++];if(a>0){e.moveTo(i[n++],i[n++]);for(var o=1;o<a;o++)e.lineTo(i[n++],i[n++])}}else for(n=0;n<i.length;){var s=i[n++],l=i[n++],c=i[n++],u=i[n++];if(e.moveTo(s,l),r>0){var d=(s+c)/2-(l-u)*r,h=(l+u)/2-(c-s)*r;e.quadraticCurveTo(d,h,c,u)}else e.lineTo(c,u)}},findDataIndex:function(e,t){var i=this.shape,r=i.segs,n=i.curveness;if(i.polyline)for(var s=0,l=0;l<r.length;){var c=r[l++];if(c>0)for(var u=r[l++],d=r[l++],h=1;h<c;h++){var p=r[l++],f=r[l++];if(a.containStroke(u,d,p,f))return s}s++}else for(s=0,l=0;l<r.length;){u=r[l++],d=r[l++],p=r[l++],f=r[l++];if(n>0){var m=(u+p)/2-(d-f)*n,g=(d+f)/2-(p-u)*n;if(o.containStroke(u,d,m,g,p,f))return s}else if(a.containStroke(u,d,p,f))return s;s++}return-1}});function l(){this.group=new r.Group}var c=l.prototype;c.isPersistent=function(){return!this._incremental},c.updateData=function(e){this.group.removeAll();var t=new s({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},c.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>5e5?(this._incremental||(this._incremental=new n({silent:!0})),this.group.add(this._incremental)):this._incremental=null},c.incrementalUpdate=function(e,t){var i=new s;i.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(i,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=e.start,this.group.add(i))},c.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},c._setCommon=function(e,t,i){var r=t.hostModel;e.setShape({polyline:r.get("polyline"),curveness:r.get("lineStyle.curveness")}),e.useStyle(r.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),i||(e.seriesIndex=r.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i+e.__startIndex)})))},c._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var u=l;e.exports=u},function(e,t){function i(e){return e instanceof Array||(e=[e,e]),e}var r="lineStyle.opacity".split("."),n={seriesType:"lines",reset:function(e,t,n){var a=i(e.get("symbol")),o=i(e.get("symbolSize")),s=e.getData();return s.setVisual("fromSymbol",a&&a[0]),s.setVisual("toSymbol",a&&a[1]),s.setVisual("fromSymbolSize",o&&o[0]),s.setVisual("toSymbolSize",o&&o[1]),s.setVisual("opacity",e.get(r)),{dataEach:s.hasItemOption?function(e,t){var n=e.getItemModel(t),a=i(n.getShallow("symbol",!0)),o=i(n.getShallow("symbolSize",!0)),s=n.get(r);a[0]&&e.setItemVisual(t,"fromSymbol",a[0]),a[1]&&e.setItemVisual(t,"toSymbol",a[1]),o[0]&&e.setItemVisual(t,"fromSymbolSize",o[0]),o[1]&&e.setItemVisual(t,"toSymbolSize",o[1]),e.setItemVisual(t,"opacity",s)}:null}}};e.exports=n},function(e,t,i){i(447),i(448)},function(e,t,i){var r=i(14),n=i(30),a=i(20),o=r.extend({type:"series.heatmap",getInitialData:function(e,t){return n(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=a.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});e.exports=o},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(2),a=i(449),o=i(0);var s=r.extendChartView({type:"heatmap",render:function(e,t,i){var r;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(i){i===e&&(r=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var n=e.coordinateSystem;"cartesian2d"===n.type||"calendar"===n.type?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):function(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}(n)&&this._renderOnGeo(n,e,r,i)},incrementalPrepareRender:function(e,t,i){this.group.removeAll()},incrementalRender:function(e,t,i,r){t.coordinateSystem&&this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,i,r,a){var s,l,c=e.coordinateSystem;if("cartesian2d"===c.type){var u=c.getAxis("x"),d=c.getAxis("y");s=u.getBandWidth(),l=d.getBandWidth()}for(var h=this.group,p=e.getData(),f=e.getModel("itemStyle").getItemStyle(["color"]),m=e.getModel("emphasis.itemStyle").getItemStyle(),g=e.getModel("label"),y=e.getModel("emphasis.label"),_=c.type,v="cartesian2d"===_?[p.mapDimension("x"),p.mapDimension("y"),p.mapDimension("value")]:[p.mapDimension("time"),p.mapDimension("value")],C=i;C<r;C++){var x;if("cartesian2d"===_){if(isNaN(p.get(v[2],C)))continue;var b=c.dataToPoint([p.get(v[0],C),p.get(v[1],C)]);x=new n.Rect({shape:{x:Math.floor(Math.round(b[0])-s/2),y:Math.floor(Math.round(b[1])-l/2),width:Math.ceil(s),height:Math.ceil(l)},style:{fill:p.getItemVisual(C,"color"),opacity:p.getItemVisual(C,"opacity")}})}else{if(isNaN(p.get(v[1],C)))continue;x=new n.Rect({z2:1,shape:c.dataToRect([p.get(v[0],C)]).contentShape,style:{fill:p.getItemVisual(C,"color"),opacity:p.getItemVisual(C,"opacity")}})}var S=p.getItemModel(C);p.hasItemOption&&(f=S.getModel("itemStyle").getItemStyle(["color"]),m=S.getModel("emphasis.itemStyle").getItemStyle(),g=S.getModel("label"),y=S.getModel("emphasis.label"));var T=e.getRawValue(C),E="-";T&&null!=T[2]&&(E=T[2]),n.setLabelStyle(f,m,g,y,{labelFetcher:e,labelDataIndex:C,defaultText:E,isRectText:!0}),x.setStyle(f),n.setHoverStyle(x,p.hasItemOption?m:o.extend({},m)),x.incremental=a,a&&(x.useHoverLayer=!0),h.add(x),p.setItemGraphicEl(C,x)}},_renderOnGeo:function(e,t,i,r){var s=i.targetVisuals.inRange,l=i.targetVisuals.outOfRange,c=t.getData(),u=this._hmLayer||this._hmLayer||new a;u.blurSize=t.get("blurSize"),u.pointSize=t.get("pointSize"),u.minOpacity=t.get("minOpacity"),u.maxOpacity=t.get("maxOpacity");var d=e.getViewRect().clone(),h=e.getRoamTransform();d.applyTransform(h);var p=Math.max(d.x,0),f=Math.max(d.y,0),m=Math.min(d.width+d.x,r.getWidth()),g=Math.min(d.height+d.y,r.getHeight()),y=m-p,_=g-f,v=[c.mapDimension("lng"),c.mapDimension("lat"),c.mapDimension("value")],C=c.mapArray(v,(function(t,i,r){var n=e.dataToPoint([t,i]);return n[0]-=p,n[1]-=f,n.push(r),n})),x=i.getExtent(),b="visualMap.continuous"===i.type?function(e,t){var i=e[1]-e[0];return t=[(t[0]-e[0])/i,(t[1]-e[0])/i],function(e){return e>=t[0]&&e<=t[1]}}(x,i.option.range):function(e,t,i){var r=e[1]-e[0],n=(t=o.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}}))).length,a=0;return function(e){for(var r=a;r<n;r++){if((o=t[r].interval)[0]<=e&&e<=o[1]){a=r;break}}if(r===n)for(r=a-1;r>=0;r--){var o;if((o=t[r].interval)[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r<n&&i[r]}}(x,i.getPieceList(),i.option.selected);u.update(C,y,_,s.color.getNormalizer(),{inRange:s.color.getColorMapper(),outOfRange:l.color.getColorMapper()},b);var S=new n.Image({style:{width:y,height:_,x:p,y:f,image:u.canvas},silent:!0});this.group.add(S)},dispose:function(){}});e.exports=s},function(e,t,i){var r=i(0);function n(){var e=r.createCanvas();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}n.prototype={update:function(e,t,i,r,n,a){var o=this._getBrush(),s=this._getGradient(e,n,"inRange"),l=this._getGradient(e,n,"outOfRange"),c=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext("2d"),h=e.length;u.width=t,u.height=i;for(var p=0;p<h;++p){var f=e[p],m=f[0],g=f[1],y=r(f[2]);d.globalAlpha=y,d.drawImage(o,m-c,g-c)}if(!u.width||!u.height)return u;for(var _=d.getImageData(0,0,u.width,u.height),v=_.data,C=0,x=v.length,b=this.minOpacity,S=this.maxOpacity-b;C<x;){y=v[C+3]/256;var T=4*Math.floor(255*y);if(y>0){var E=a(y)?s:l;y>0&&(y=y*S+b),v[C++]=E[T],v[C++]=E[T+1],v[C++]=E[T+2],v[C++]=E[T+3]*y*256}else C+=4}return d.putImageData(_,0,0),u},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=r.createCanvas()),t=this.pointSize+this.blurSize,i=2*t;e.width=i,e.height=i;var n=e.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),e},_getGradient:function(e,t,i){for(var r=this._gradientPixels,n=r[i]||(r[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[i](s/255,!0,a),n[o++]=a[0],n[o++]=a[1],n[o++]=a[2],n[o++]=a[3];return n}};var a=n;e.exports=a},function(e,t,i){var r=i(1),n=i(0);i(111),i(451),i(452);var a=i(87).layout,o=i(44);i(70),r.registerLayout(n.curry(a,"pictorialBar")),r.registerVisual(o("pictorialBar","roundRect"))},function(e,t,i){var r=i(188).extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(e){return e.stack=null,r.superApply(this,"getInitialData",arguments)}}),n=r;e.exports=n},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(19).createSymbol,s=i(3),l=s.parsePercent,c=s.isNumeric,u=i(189).setLabel,d=["itemStyle","borderWidth"],h=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],p=new a.Circle;function f(e,t,i,r){var a=e.getItemLayout(t),o=i.get("symbolRepeat"),s=i.get("symbolClip"),u=i.get("symbolPosition")||"start",h=(i.get("symbolRotate")||0)*Math.PI/180||0,f=i.get("symbolPatternSize")||2,g=i.isAnimationEnabled(),y={dataIndex:t,layout:a,itemModel:i,symbolType:e.getItemVisual(t,"symbol")||"circle",color:e.getItemVisual(t,"color"),symbolClip:s,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:h,animationModel:g?i:null,hoverAnimation:g&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(e,t,i,r,a){var o,s=r.valueDim,l=e.get("symbolBoundingData"),c=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),u=c.toGlobalCoord(c.dataToCoord(0)),d=1-+(i[s.wh]<=0);if(n.isArray(l)){var h=[m(c,l[0])-u,m(c,l[1])-u];h[1]<h[0]&&h.reverse(),o=h[d]}else o=null!=l?m(c,l)-u:t?r.coordSysExtent[s.index][d]-u:i[s.wh];a.boundingLength=o,t&&(a.repeatCutLength=i[s.wh]);a.pxSign=o>0?1:o<0?-1:0}(i,o,a,r,y),function(e,t,i,r,a,o,s,c,u,d){var h=u.valueDim,p=u.categoryDim,f=Math.abs(i[p.wh]),m=e.getItemVisual(t,"symbolSize");n.isArray(m)?m=m.slice():(null==m&&(m="100%"),m=[m,m]);m[p.index]=l(m[p.index],f),m[h.index]=l(m[h.index],r?f:Math.abs(o)),d.symbolSize=m,(d.symbolScale=[m[0]/c,m[1]/c])[h.index]*=(u.isHorizontal?-1:1)*s}(e,t,a,o,0,y.boundingLength,y.pxSign,f,r,y),function(e,t,i,r,n){var a=e.get(d)||0;a&&(p.attr({scale:t.slice(),rotation:i}),p.updateTransform(),a/=p.getLineScale(),a*=t[r.valueDim.index]);n.valueLineWidth=a}(i,y.symbolScale,h,r,y);var _=y.symbolSize,v=i.get("symbolOffset");return n.isArray(v)&&(v=[l(v[0],_[0]),l(v[1],_[1])]),function(e,t,i,r,a,o,s,u,d,h,p,f){var m=p.categoryDim,g=p.valueDim,y=f.pxSign,_=Math.max(t[g.index]+u,0),v=_;if(r){var C=Math.abs(d),x=n.retrieve(e.get("symbolMargin"),"15%")+"",b=!1;x.lastIndexOf("!")===x.length-1&&(b=!0,x=x.slice(0,x.length-1)),x=l(x,t[g.index]);var S=Math.max(_+2*x,0),T=b?0:2*x,E=c(r),w=E?r:I((C+T)/S);S=_+2*(x=(C-w*_)/2/(b?w:w-1)),T=b?0:2*x,E||"fixed"===r||(w=h?I((Math.abs(h)+T)/S):0),v=w*S-T,f.repeatTimes=w,f.symbolMargin=x}var A=y*(v/2),P=f.pathPosition=[];P[m.index]=i[m.wh]/2,P[g.index]="start"===s?A:"end"===s?d-A:d/2,o&&(P[0]+=o[0],P[1]+=o[1]);var D=f.bundlePosition=[];D[m.index]=i[m.xy],D[g.index]=i[g.xy];var M=f.barRectShape=n.extend({},i);M[g.wh]=y*Math.max(Math.abs(i[g.wh]),Math.abs(P[g.index]+A)),M[m.wh]=i[m.wh];var R=f.clipShape={};R[m.xy]=-i[m.xy],R[m.wh]=p.ecSize[m.wh],R[g.xy]=0,R[g.wh]=i[g.wh]}(i,_,a,o,0,v,u,y.valueLineWidth,y.boundingLength,y.repeatCutLength,r,y),y}function m(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function g(e){var t=e.symbolPatternSize,i=o(e.symbolType,-t/2,-t/2,t,t,e.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function y(e,t,i,r){var n=e.__pictorialBundle,a=i.symbolSize,o=i.valueLineWidth,s=i.pathPosition,l=t.valueDim,c=i.repeatTimes||0,u=0,d=a[t.valueDim.index]+o+2*i.symbolMargin;for(P(e,(function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=c,u<c?D(e,null,f(u),i,r):D(e,null,{scale:[0,0]},i,r,(function(){n.remove(e)})),T(e,i),u++}));u<c;u++){var h=g(i);h.__pictorialAnimationIndex=u,h.__pictorialRepeatTimes=c,n.add(h);var p=f(u);D(h,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},i,r),h.on("mouseover",m).on("mouseout",y),T(h,i)}function f(e){var t=s.slice(),r=i.pxSign,n=e;return("start"===i.symbolRepeatDirection?r>0:r<0)&&(n=c-1-e),t[l.index]=d*(n-c/2+.5)+s[l.index],{position:t,scale:i.symbolScale.slice(),rotation:i.rotation}}function m(){P(e,(function(e){e.trigger("emphasis")}))}function y(){P(e,(function(e){e.trigger("normal")}))}}function _(e,t,i,r){var n=e.__pictorialBundle,a=e.__pictorialMainPath;a?D(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,r):(a=e.__pictorialMainPath=g(i),n.add(a),D(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,r),a.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),T(a,i)}function v(e,t,i){var r=n.extend({},t.barRectShape),o=e.__pictorialBarRect;o?D(o,null,{shape:r},t,i):(o=e.__pictorialBarRect=new a.Rect({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(o))}function C(e,t,i,r){if(i.symbolClip){var o=e.__pictorialClipPath,s=n.extend({},i.clipShape),l=t.valueDim,c=i.animationModel,u=i.dataIndex;if(o)a.updateProps(o,{shape:s},c,u);else{s[l.wh]=0,o=new a.Rect({shape:s}),e.__pictorialBundle.setClipPath(o),e.__pictorialClipPath=o;var d={};d[l.wh]=i.clipShape[l.wh],a[r?"updateProps":"initProps"](o,{shape:d},c,u)}}}function x(e,t){var i=e.getItemModel(t);return i.getAnimationDelayParams=b,i.isAnimationEnabled=S,i}function b(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function S(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function T(e,t){e.off("emphasis").off("normal");var i=t.symbolScale.slice();t.hoverAnimation&&e.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function E(e,t,i,r){var n=new a.Group,o=new a.Group;return n.add(o),n.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?y(n,t,i):_(n,0,i),v(n,i,r),C(n,t,i,r),n.__pictorialShapeStr=A(e,i),n.__pictorialSymbolMeta=i,n}function w(e,t,i,r){var o=r.__pictorialBarRect;o&&(o.style.text=null);var s=[];P(r,(function(e){s.push(e)})),r.__pictorialMainPath&&s.push(r.__pictorialMainPath),r.__pictorialClipPath&&(i=null),n.each(s,(function(e){a.updateProps(e,{scale:[0,0]},i,t,(function(){r.parent&&r.parent.remove(r)}))})),e.setItemGraphicEl(t,null)}function A(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function P(e,t,i){n.each(e.__pictorialBundle.children(),(function(r){r!==e.__pictorialBarRect&&t.call(i,r)}))}function D(e,t,i,r,n,o){t&&e.attr(t),r.symbolClip&&!n?i&&e.attr(i):i&&a[n?"updateProps":"initProps"](e,i,r.animationModel,r.dataIndex,o)}function M(e,t,i){var r=i.color,o=i.dataIndex,s=i.itemModel,l=s.getModel("itemStyle").getItemStyle(["color"]),c=s.getModel("emphasis.itemStyle").getItemStyle(),d=s.getShallow("cursor");P(e,(function(e){e.setColor(r),e.setStyle(n.defaults({fill:r,opacity:i.opacity},l)),a.setHoverStyle(e,c),d&&(e.cursor=d),e.z2=i.z2}));var h={},p=t.valueDim.posDesc[+(i.boundingLength>0)],f=e.__pictorialBarRect;u(f.style,h,s,r,t.seriesModel,o,p),a.setHoverStyle(f,h)}function I(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var R=r.extendChartView({type:"pictorialBar",render:function(e,t,i){var r=this.group,n=e.getData(),o=this._data,s=e.coordinateSystem,l=!!s.getBaseAxis().isHorizontal(),c=s.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:e,coordSys:s,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:l,valueDim:h[+l],categoryDim:h[1-l]};return n.diff(o).add((function(e){if(n.hasValue(e)){var t=x(n,e),i=f(n,e,t,u),a=E(n,u,i);n.setItemGraphicEl(e,a),r.add(a),M(a,u,i)}})).update((function(e,t){var i=o.getItemGraphicEl(t);if(n.hasValue(e)){var s=x(n,e),l=f(n,e,s,u),c=A(n,l);i&&c!==i.__pictorialShapeStr&&(r.remove(i),n.setItemGraphicEl(e,null),i=null),i?function(e,t,i){var r=i.animationModel,n=i.dataIndex,o=e.__pictorialBundle;a.updateProps(o,{position:i.bundlePosition.slice()},r,n),i.symbolRepeat?y(e,t,i,!0):_(e,t,i,!0);v(e,i,!0),C(e,t,i,!0)}(i,u,l):i=E(n,u,l,!0),n.setItemGraphicEl(e,i),i.__pictorialSymbolMeta=l,r.add(i),M(i,u,l)}else r.remove(i)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&w(o,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=n,this.group},dispose:n.noop,remove:function(e,t){var i=this.group,r=this._data;e.get("animation")?r&&r.eachItemGraphicEl((function(t){w(r,t.dataIndex,e,t)})):i.removeAll()}});e.exports=R},function(e,t,i){var r=i(1);i(207),i(463),i(464);var n=i(465),a=i(466),o=i(72);r.registerLayout(n),r.registerVisual(a),r.registerProcessor(o("themeRiver"))},function(e,t,i){var r=i(455);i(20).register("single",{create:function(e,t){var i=[];return e.eachComponent("singleAxis",(function(n,a){var o=new r(n,e,t);o.name="single_"+a,o.resize(n,t),n.coordinateSystem=o,i.push(o)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:r.prototype.dimensions})},function(e,t,i){var r=i(456),n=i(21),a=i(6).getLayoutRect,o=i(0).each;function s(e,t,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(e,t,i),this.model=e}s.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:s,_init:function(e,t,i){var a=this.dimension,o=new r(a,n.createScaleByModel(e),[0,0],e.get("type"),e.get("position")),s="category"===o.type;o.onBand=s&&e.get("boundaryGap"),o.inverse=e.get("inverse"),o.orient=e.get("orient"),e.axis=o,o.model=e,o.coordinateSystem=this,this._axis=o},update:function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();o(t.mapDimension(this.dimension,!0),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),n.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(e,t){this._rect=a({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var e=this._rect,t=this._axis,i=t.isHorizontal(),r=i?[0,e.width]:[0,e.height],n=t.reverse?1:0;t.setExtent(r[n],r[1-n]),this._updateAxisTransform(t,i?e.x:e.y)},_updateAxisTransform:function(e,t){var i=e.getExtent(),r=i[0]+i[1],n=e.isHorizontal();e.toGlobalCoord=n?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=n?function(e){return e-t}:function(e){return r-e+t}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(e){var t=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},pointToData:function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},dataToPoint:function(e){var t=this.getAxis(),i=this.getRect(),r=[],n="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),r[n]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-n]=0===n?i.y+i.height/2:i.x+i.width/2,r}};var l=s;e.exports=l},function(e,t,i){var r=i(0),n=i(35),a=function(e,t,i,r,a){n.call(this,e,t,i),this.type=r||"value",this.position=a||"bottom",this.orient=null};a.prototype={constructor:a,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},pointToData:function(e,t){return this.coordinateSystem.pointToData(e,t)[0]},toGlobalCoord:null,toLocalCoord:null},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(36),a=i(2),o=i(208),s=i(45),l=i(187),c=l.rectCoordAxisBuildSplitArea,u=l.rectCoordAxisHandleRemove,d=["axisLine","axisTickLabel","axisName"],h=["splitArea","splitLine"],p=s.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,s){var l=this.group;l.removeAll();var c=this._axisGroup;this._axisGroup=new a.Group;var u=o.layout(e),f=new n(e,u);r.each(d,f.add,f),l.add(this._axisGroup),l.add(f.getGroup()),r.each(h,(function(t){e.get(t+".show")&&this["_"+t](e)}),this),a.groupTransition(c,this._axisGroup,e),p.superCall(this,"render",e,t,i,s)},remove:function(){u(this)},_splitLine:function(e){var t=e.axis;if(!t.scale.isBlank()){var i=e.getModel("splitLine"),r=i.getModel("lineStyle"),n=r.get("width"),o=r.get("color");o=o instanceof Array?o:[o];for(var s=e.coordinateSystem.getRect(),l=t.isHorizontal(),c=[],u=0,d=t.getTicksCoords({tickModel:i}),h=[],p=[],f=0;f<d.length;++f){var m=t.toGlobalCoord(d[f].coord);l?(h[0]=m,h[1]=s.y,p[0]=m,p[1]=s.y+s.height):(h[0]=s.x,h[1]=m,p[0]=s.x+s.width,p[1]=m);var g=u++%o.length;c[g]=c[g]||[],c[g].push(new a.Line({subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:{lineWidth:n},silent:!0}))}for(f=0;f<c.length;++f)this.group.add(a.mergePath(c[f],{style:{stroke:o[f%o.length],lineDash:r.getLineDash(n),lineWidth:n},silent:!0}))}},_splitArea:function(e){c(this,this._axisGroup,e,e)}}),f=p;e.exports=f},function(e,t,i){var r=i(0),n=i(13),a=i(89),o=i(53),s=n.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});r.merge(s.prototype,o),a("single",s,(function(e,t){return t.type||(t.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var l=s;e.exports=l},function(e,t,i){var r=i(0),n=i(4).makeInner,a=i(90),o=i(209),s=r.each,l=r.curry,c=n();function u(e,t,i,n,a){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var l=function(e,t){var i=t.axis,r=i.dim,n=e,a=[],o=Number.MAX_VALUE,l=-1;return s(t.seriesModels,(function(t,c){var u,d,h=t.getData().mapDimension(r,!0);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(h,e,i);d=p.dataIndices,u=p.nestestValue}else{if(!(d=t.getData().indicesOfNearest(h[0],e,"category"===i.type?.5:null)).length)return;u=t.getData().get(h[0],d[0])}if(null!=u&&isFinite(u)){var f=e-u,m=Math.abs(f);m<=o&&((m<o||f>=0&&l<0)&&(o=m,l=f,n=u,a.length=0),s(d,(function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:a,snapToValue:n}}(t,e),c=l.payloadBatch,u=l.snapToValue;c[0]&&null==a.seriesIndex&&r.extend(a,c[0]),!n&&e.snap&&o.containData(u)&&null!=u&&(t=u),i.showPointer(e,t,c,a),i.showTooltip(e,l,u)}else i.showPointer(e,t)}function d(e,t,i,r){e[t.key]={value:i,payloadBatch:r}}function h(e,t,i,r){var n=i.payloadBatch,o=t.axis,s=o.model,l=t.axisPointerModel;if(t.triggerTooltip&&n.length){var c=t.coordSys.model,u=a.makeKey(c),d=e.map[u];d||(d=e.map[u]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(d)),d.dataByAxis.push({axisDim:o.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:r,valueLabelOpt:{precision:l.get("label.precision"),formatter:l.get("label.formatter")},seriesDataIndices:n.slice()})}}function p(e){var t=e.axis.model,i={},r=i.axisDim=e.axis.dim;return i.axisIndex=i[r+"AxisIndex"]=t.componentIndex,i.axisName=i[r+"AxisName"]=t.name,i.axisId=i[r+"AxisId"]=t.id,i}function f(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}e.exports=function(e,t,i){var n=e.currTrigger,a=[e.x,e.y],m=e,g=e.dispatchAction||r.bind(i.dispatchAction,i),y=t.getComponent("axisPointer").coordSysAxesInfo;if(y){f(a)&&(a=o({seriesIndex:m.seriesIndex,dataIndex:m.dataIndex},t).point);var _=f(a),v=m.axesInfo,C=y.axesInfo,x="leave"===n||f(a),b={},S={},T={list:[],map:{}},E={showPointer:l(d,S),showTooltip:l(h,T)};s(y.coordSysMap,(function(e,t){var i=_||e.containPoint(a);s(y.coordSysAxesInfo[t],(function(e,t){var r=e.axis,n=function(e,t){for(var i=0;i<(e||[]).length;i++){var r=e[i];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(v,e);if(!x&&i&&(!v||n)){var o=n&&n.value;null!=o||_||(o=r.pointToData(a)),null!=o&&u(e,o,E,!1,b)}}))}));var w={};return s(C,(function(e,t){var i=e.linkGroup;i&&!S[t]&&s(i.axesInfo,(function(t,r){var n=S[r];if(t!==e&&n){var a=n.value;i.mapper&&(a=e.axis.scale.parse(i.mapper(a,p(t),p(e)))),w[e.key]=a}}))})),s(w,(function(e,t){u(C[t],e,E,!0,b)})),function(e,t,i){var r=i.axesInfo=[];s(t,(function(t,i){var n=t.axisPointerModel.option,a=e[i];a?(!t.useHandle&&(n.status="show"),n.value=a.value,n.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(n.status="hide"),"show"===n.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}))}(S,C,b),function(e,t,i,r){if(f(t)||!e.list.length)return void r({type:"hideTip"});var n=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:e.list})}(T,a,e,g),function(e,t,i){var n=i.getZr(),a=c(n).axisPointerLastHighlights||{},o=c(n).axisPointerLastHighlights={};s(e,(function(e,t){var i=e.axisPointerModel.option;"show"===i.status&&s(i.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;o[t]=e}))}));var l=[],u=[];r.each(a,(function(e,t){!o[t]&&u.push(e)})),r.each(o,(function(e,t){!a[t]&&l.push(e)})),u.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:u}),l.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:l})}(C,0,i),b}}},function(e,t,i){var r=i(1).extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});e.exports=r},function(e,t,i){var r=i(1),n=i(210),a=r.extendComponentView({type:"axisPointer",render:function(e,t,i){var r=t.getComponent("tooltip"),a=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";n.register("axisPointer",i,(function(e,t,i){"none"!==a&&("leave"===e||a.indexOf(e)>=0)&&i({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){n.unregister(t.getZr(),"axisPointer"),a.superApply(this._model,"remove",arguments)},dispose:function(e,t){n.unregister("axisPointer",t),a.superApply(this._model,"dispose",arguments)}}),o=a;e.exports=o},function(e,t,i){var r=i(122),n=i(95),a=i(208),o=i(45),s=["x","y"],l=["width","height"],c=r.extend({makeElOption:function(e,t,i,r,o){var s=i.axis,l=s.coordinateSystem,c=h(l,1-d(s)),p=l.dataToPoint(t)[0],f=r.get("type");if(f&&"none"!==f){var m=n.buildElStyle(r),g=u[f](s,p,c);g.style=m,e.graphicKey=g.type,e.pointer=g}var y=a.layout(i);n.buildCartesianSingleLabelElOption(t,e,y,i,r,o)},getHandleTransform:function(e,t,i){var r=a.layout(t,{labelInside:!1});return r.labelMargin=i.get("handle.margin"),{position:n.getTransformedPosition(t.axis,e,r),rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,i,r){var n=i.axis,a=n.coordinateSystem,o=d(n),s=h(a,o),l=e.position;l[o]+=t[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var c=h(a,1-o),u=(c[1]+c[0])/2,p=[u,u];return p[o]=l[o],{position:l,rotation:e.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}}}),u={line:function(e,t,i){return{type:"Line",subPixelOptimize:!0,shape:n.makeLineShape([t,i[0]],[t,i[1]],d(e))}},shadow:function(e,t,i){var r=e.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:n.makeRectShape([t-r/2,i[0]],[r,a],d(e))}}};function d(e){return e.isHorizontal()?0:1}function h(e,t){var i=e.getRect();return[i[s[t]],i[s[t]]+i[l[t]]]}o.registerAxisPointerClass("SingleAxisPointer",c);var p=c;e.exports=p},function(e,t,i){var r=i(14),n=i(52),a=i(66).getDimensionTypeByAxis,o=i(18),s=i(0),l=i(4).groupData,c=i(7).encodeHTML,u=i(71),d=r.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){d.superApply(this,"init",arguments),this.legendVisualProvider=new u(s.bind(this.getData,this),s.bind(this.getRawData,this))},fixData:function(e){var t=e.length,i={},r=l(e,(function(e){return i.hasOwnProperty(e[0])||(i[e[0]]=-1),e[2]})),n=[];r.buckets.each((function(e,t){n.push({name:t,dataList:e})}));for(var a=n.length,o=0;o<a;++o){for(var s=n[o].name,c=0;c<n[o].dataList.length;++c){var u=n[o].dataList[c][0];i[u]=o}for(var u in i)i.hasOwnProperty(u)&&i[u]!==o&&(i[u]=o,e[t]=[],e[t][0]=u,e[t][1]=0,e[t][2]=s,t++)}return e},getInitialData:function(e,t){for(var i=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),r=s.filter(e.data,(function(e){return void 0!==e[2]})),l=this.fixData(r||[]),c=[],u=this.nameMap=s.createHashMap(),d=0,h=0;h<l.length;++h)c.push(l[h][2]),u.get(l[h][2])||(u.set(l[h][2],d),d++);var p=n(l,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:a(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),f=new o(p,this);return f.initData(l),f},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),i=[],r=0;r<t;++r)i[r]=r;var n=e.mapDimension("single"),a=l(i,(function(t){return e.get("name",t)})),o=[];return a.buckets.each((function(t,i){t.sort((function(t,i){return e.get(n,t)-e.get(n,i)})),o.push({name:i,indices:t})})),o},getAxisTooltipData:function(e,t,i){s.isArray(e)||(e=e?[e]:[]);for(var r,n=this.getData(),a=this.getLayerSeries(),o=[],l=a.length,c=0;c<l;++c){for(var u=Number.MAX_VALUE,d=-1,h=a[c].indices.length,p=0;p<h;++p){var f=n.get(e[0],a[c].indices[p]),m=Math.abs(f-t);m<=u&&(r=f,u=m,d=a[c].indices[p])}o.push(d)}return{dataIndices:o,nestestValue:r}},formatTooltip:function(e){var t=this.getData(),i=t.getName(e),r=t.get(t.mapDimension("value"),e);return(isNaN(r)||null==r)&&(r="-"),c(i+" : "+r)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}}),h=d;e.exports=h},function(e,t,i){var r=i(1),n=i(183).Polygon,a=i(2),o=i(0),s=o.bind,l=o.extend,c=i(43),u=r.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,i){var r=e.getData(),o=this.group,u=e.getLayerSeries(),d=r.getLayout("layoutInfo"),h=d.rect,p=d.boundaryGap;function f(e){return e.name}o.attr("position",[0,h.y+p[0]]);var m=new c(this._layersSeries||[],u,f,f),g={};function y(t,i,s){var c=this._layers;if("remove"!==t){for(var d,h,p,f=[],m=[],y=u[i].indices,_=0;_<y.length;_++){var v=r.getItemLayout(y[_]),C=v.x,x=v.y0,b=v.y;f.push([C,x]),m.push([C,x+b]),d=r.getItemVisual(y[_],"color")}var S=r.getItemLayout(y[0]),T=r.getItemModel(y[_-1]),E=T.getModel("label"),w=E.get("margin");if("add"===t){var A=g[i]=new a.Group;h=new n({shape:{points:f,stackedOnPoints:m,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),p=new a.Text({style:{x:S.x-w,y:S.y0+S.y/2}}),A.add(h),A.add(p),o.add(A),h.setClipPath(function(e,t,i){var r=new a.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return a.initProps(r,{shape:{width:e.width+20,height:e.height+20}},t,i),r}(h.getBoundingRect(),e,(function(){h.removeClipPath()})))}else{A=c[s];h=A.childAt(0),p=A.childAt(1),o.add(A),g[i]=A,a.updateProps(h,{shape:{points:f,stackedOnPoints:m}},e),a.updateProps(p,{style:{x:S.x-w,y:S.y0+S.y/2}},e)}var P=T.getModel("emphasis.itemStyle"),D=T.getModel("itemStyle");a.setTextStyle(p.style,E,{text:E.get("show")?e.getFormattedLabel(y[_-1],"normal")||r.getName(y[_-1]):null,textVerticalAlign:"middle"}),h.setStyle(l({fill:d},D.getItemStyle(["color"]))),a.setHoverStyle(h,P.getItemStyle())}else o.remove(c[i])}m.add(s(y,this,"add")).update(s(y,this,"update")).remove(s(y,this,"remove")).execute(),this._layersSeries=u,this._layers=g},dispose:function(){}});e.exports=u},function(e,t,i){var r=i(0),n=i(3);function a(e,t,i){if(e.count())for(var n,a=t.coordinateSystem,o=t.getLayerSeries(),s=e.mapDimension("single"),l=e.mapDimension("value"),c=r.map(o,(function(t){return r.map(t.indices,(function(t){var i=a.dataToPoint(e.get(s,t));return i[1]=e.get(l,t),i}))})),u=function(e){for(var t=e.length,i=e[0].length,r=[],n=[],a=0,o={},s=0;s<i;++s){for(var l=0,c=0;l<t;++l)c+=e[l][s][1];c>a&&(a=c),r.push(c)}for(var u=0;u<i;++u)n[u]=(a-r[u])/2;a=0;for(var d=0;d<i;++d){var h=r[d]+n[d];h>a&&(a=h)}return o.y0=n,o.max=a,o}(c),d=u.y0,h=i/u.max,p=o.length,f=o[0].indices.length,m=0;m<f;++m){n=d[m]*h,e.setItemLayout(o[0].indices[m],{layerIndex:0,x:c[0][m][0],y0:n,y:c[0][m][1]*h});for(var g=1;g<p;++g)n+=c[g-1][m][1]*h,e.setItemLayout(o[g].indices[m],{layerIndex:g,x:c[g][m][0],y0:n,y:c[g][m][1]*h})}}e.exports=function(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.coordinateSystem,r={},o=i.getRect();r.rect=o;var s=e.get("boundaryGap"),l=i.getAxis();(r.boundaryGap=s,"horizontal"===l.orient)?(s[0]=n.parsePercent(s[0],o.height),s[1]=n.parsePercent(s[1],o.height),a(t,e,o.height-s[0]-s[1])):(s[0]=n.parsePercent(s[0],o.width),s[1]=n.parsePercent(s[1],o.width),a(t,e,o.width-s[0]-s[1]));t.setLayout("layoutInfo",r)}))}},function(e,t,i){var r=i(0).createHashMap;e.exports=function(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.getRawData(),n=e.get("color"),a=r();t.each((function(e){a.set(t.getRawIndex(e),e)})),i.each((function(r){var o=i.getName(r),s=n[(e.nameMap.get(o)-1)%n.length];i.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&t.setItemVisual(l,"color",s)}))}))}},function(e,t,i){var r=i(1),n=i(0);i(468),i(469),i(471);var a=i(91),o=i(472),s=i(72);r.registerVisual(n.curry(a,"sunburst")),r.registerLayout(n.curry(o,"sunburst")),r.registerProcessor(n.curry(s,"sunburst"))},function(e,t,i){var r=i(0),n=i(14),a=i(117),o=i(12),s=i(46).wrapTreePathInfo,l=n.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var i={name:e.name,children:e.data};!function e(t){var i=0;r.each(t.children,(function(t){e(t);var n=t.value;r.isArray(n)&&(n=n[0]),i+=n}));var n=t.value;r.isArray(n)&&(n=n[0]);(null==n||isNaN(n))&&(n=i);n<0&&(n=0);r.isArray(t.value)?t.value[0]=n:t.value=n}(i);var n=r.map(e.levels||[],(function(e){return new o(e,this,t)}),this),s=a.createTree(i,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=s.getNodeByDataIndex(t),r=n[i.depth];return r&&(e.parentModel=r),e}))}));return s.data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=s(i,this),t},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});e.exports=l},function(e,t,i){var r=i(0),n=i(24),a=i(470),o=i(43),s=i(7).windowOpen,l=n.extend({type:"sunburst",init:function(){},render:function(e,t,i,n){var s=this;this.seriesModel=e,this.api=i,this.ecModel=t;var l=e.getData(),c=l.tree.root,u=e.getViewRoot(),d=this.group,h=e.get("renderLabelForZeroData"),p=[];u.eachNode((function(e){p.push(e)}));var f=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function s(e){return e.getId()}function u(r,o){!function(i,r){h||!i||i.getValue()||(i=null);if(i!==c&&r!==c)if(r&&r.piece)i?(r.piece.updateData(!1,i,"normal",e,t),l.setItemGraphicEl(i.dataIndex,r.piece)):function(e){if(!e)return;e.piece&&(d.remove(e.piece),e.piece=null)}(r);else if(i){var n=new a(i,e,t);d.add(n),l.setItemGraphicEl(i.dataIndex,n)}}(null==r?null:i[r],null==o?null:n[o])}new o(n,i,s,s).add(u).update(u).remove(r.curry(u,null)).execute()}(p,f),function(i,r){if(r.depth>0){s.virtualPiece?s.virtualPiece.updateData(!1,i,"normal",e,t):(s.virtualPiece=new a(i,e,t),d.add(s.virtualPiece)),r.piece._onclickEvent&&r.piece.off("click",r.piece._onclickEvent);var n=function(e){s._rootToNode(r.parentNode)};r.piece._onclickEvent=n,s.virtualPiece.on("click",n)}else s.virtualPiece&&(d.remove(s.virtualPiece),s.virtualPiece=null)}(c,u),n&&n.highlight&&n.highlight.piece){var m=e.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(m)}else if(n&&n.unhighlight){var g=this.virtualPiece;!g&&c.children.length&&(g=c.children[0].piece),g&&g.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var e=this,t=function(t){var i=!1;e.seriesModel.getViewRoot().eachNode((function(r){if(!i&&r.piece&&r.piece.childAt(0)===t.target){var n=r.getModel().get("nodeClick");if("rootToNode"===n)e._rootToNode(r);else if("link"===n){var a=r.getModel(),o=a.get("link");if(o){var l=a.get("target",!0)||"_blank";s(o,l)}}i=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},containPoint:function(e,t){var i=t.getData().getItemLayout(0);if(i){var r=e[0]-i.cx,n=e[1]-i.cy,a=Math.sqrt(r*r+n*n);return a<=i.r&&a>=i.r0}}});e.exports=l},function(e,t,i){var r=i(0),n=i(2),a="none",o="ancestor",s="self";function l(e,t,i){n.Group.call(this);var r=new n.Sector({z2:2});r.seriesIndex=t.seriesIndex;var a=new n.Text({z2:4,silent:e.getModel("label").get("silent")});function o(){a.ignore=a.hoverIgnore}function s(){a.ignore=a.normalIgnore}this.add(r),this.add(a),this.updateData(!0,e,"normal",t,i),this.on("emphasis",o).on("normal",s).on("mouseover",o).on("mouseout",s)}var c=l.prototype;c.updateData=function(e,t,i,a,o){this.node=t,t.piece=this,a=a||this._seriesModel,o=o||this._ecModel;var s=this.childAt(0);s.dataIndex=t.dataIndex;var l=t.getModel(),c=t.getLayout(),u=r.extend({},c);u.label=null;var d=function(e,t,i){var n=e.getVisual("color"),a=e.getVisual("visualMeta");a&&0!==a.length||(n=null);var o=e.getModel("itemStyle").get("color");if(o)return o;if(n)return n;if(0===e.depth)return i.option.color[0];var s=i.option.color.length;o=i.option.color[function(e){var t=e;for(;t.depth>1;)t=t.parentNode;var i=e.getAncestors()[0];return r.indexOf(i.children,t)}(e)%s];return o}(t,0,o);!function(e,t,i){t.getData().setItemVisual(e.dataIndex,"color",i)}(t,a,d);var h,p=l.getModel("itemStyle").getItemStyle();if("normal"===i)h=p;else{var f=l.getModel(i+".itemStyle").getItemStyle();h=r.merge(f,p)}h=r.defaults({lineJoin:"bevel",fill:h.fill||d},h),e?(s.setShape(u),s.shape.r=c.r0,n.updateProps(s,{shape:{r:c.r}},a,t.dataIndex),s.useStyle(h)):"object"==typeof h.fill&&h.fill.type||"object"==typeof s.style.fill&&s.style.fill.type?(n.updateProps(s,{shape:u},a),s.useStyle(h)):n.updateProps(s,{shape:u,style:h},a),this._updateLabel(a,d,i);var m=l.getShallow("cursor");if(m&&s.attr("cursor",m),e){var g=a.getShallow("highlightPolicy");this._initEvents(s,t,a,g)}this._seriesModel=a||this._seriesModel,this._ecModel=o||this._ecModel,n.setHoverStyle(this)},c.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(i){var r,n,l;i.piece&&(t.node===i?i.piece.updateData(!1,i,"emphasis"):(r=i,n=t.node,(l=e)!==a&&(l===s?r===n:l===o?r===n||r.isAncestorOf(n):r===n||r.isDescendantOf(n))?i.piece.childAt(0).trigger("highlight"):e!==a&&i.piece.childAt(0).trigger("downplay")))}))},c.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},c.onHighlight=function(){this.updateData(!1,this.node,"highlight")},c.onDownplay=function(){this.updateData(!1,this.node,"downplay")},c._updateLabel=function(e,t,i){var a=this.node.getModel(),o=a.getModel("label"),s="normal"===i||"emphasis"===i?o:a.getModel(i+".label"),l=a.getModel("emphasis.label"),c=s.get("formatter")?i:"normal",u=r.retrieve(e.getFormattedLabel(this.node.dataIndex,c,null,null,"label"),this.node.name);!1===w("show")&&(u="");var d=this.node.getLayout(),h=s.get("minAngle");null==h&&(h=o.get("minAngle")),h=h/180*Math.PI;var p=d.endAngle-d.startAngle;null!=h&&Math.abs(p)<h&&(u="");var f=this.childAt(1);n.setLabelStyle(f.style,f.hoverStyle||{},o,l,{defaultText:s.getShallow("show")?u:null,autoColor:t,useInsideStyle:!0});var m,g=(d.startAngle+d.endAngle)/2,y=Math.cos(g),_=Math.sin(g),v=w("position"),C=w("distance")||0,x=w("align");"outside"===v?(m=d.r+C,x=g>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(m=d.r0+C,g>Math.PI/2&&(x="right")):"right"===x&&(m=d.r-C,g>Math.PI/2&&(x="left")):(m=(d.r+d.r0)/2,x="center"),f.attr("style",{text:u,textAlign:x,textVerticalAlign:w("verticalAlign")||"middle",opacity:w("opacity")});var b=m*y+d.cx,S=m*_+d.cy;f.attr("position",[b,S]);var T=w("rotate"),E=0;function w(e){var t=s.get(e);return null==t?o.get(e):t}"radial"===T?(E=-g)<-Math.PI/2&&(E+=Math.PI):"tangential"===T?(E=Math.PI/2-g)>Math.PI/2?E-=Math.PI:E<-Math.PI/2&&(E+=Math.PI):"number"==typeof T&&(E=T*Math.PI/180),f.attr("rotation",E)},c._initEvents=function(e,t,i,r){e.off("mouseover").off("mouseout").off("emphasis").off("normal");var n=this,a=function(){n.onEmphasis(r)},o=function(){n.onNormal()};i.isAnimationEnabled()&&e.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",(function(){n.onDownplay()})).on("highlight",(function(){n.onHighlight()}))},r.inherits(l,n.Group);var u=l;e.exports=u},function(e,t,i){var r=i(1),n=i(46);r.registerAction({type:"sunburstRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){var r=n.retrieveTargetInfo(e,["sunburstRootToNode"],t);if(r){var a=t.getViewRoot();a&&(e.direction=n.aboveViewRoot(a,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}}))}));r.registerAction({type:"sunburstHighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){var r=n.retrieveTargetInfo(e,["sunburstHighlight"],t);r&&(e.highlight=r.node)}))}));r.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){e.unhighlight=!0}))}))},function(e,t,i){var r=i(3).parsePercent,n=i(0),a=Math.PI/180;function o(e,t){var i=e.children||[];e.children=function(e,t){if("function"==typeof t)return e.sort(t);var i="asc"===t;return e.sort((function(e,t){var r=(e.getValue()-t.getValue())*(i?1:-1);return 0===r?(e.dataIndex-t.dataIndex)*(i?-1:1):r}))}(i,t),i.length&&n.each(e.children,(function(e){o(e,t)}))}e.exports=function(e,t,i,s){t.eachSeriesByType(e,(function(e){var t=e.get("center"),s=e.get("radius");n.isArray(s)||(s=[0,s]),n.isArray(t)||(t=[t,t]);var l=i.getWidth(),c=i.getHeight(),u=Math.min(l,c),d=r(t[0],l),h=r(t[1],c),p=r(s[0],u/2),f=r(s[1],u/2),m=-e.get("startAngle")*a,g=e.get("minAngle")*a,y=e.getData().tree.root,_=e.getViewRoot(),v=_.depth,C=e.get("sort");null!=C&&o(_,C);var x=0;n.each(_.children,(function(e){!isNaN(e.getValue())&&x++}));var b=_.getValue(),S=Math.PI/(b||x)*2,T=_.depth>0,E=_.height-(T?-1:1),w=(f-p)/(E||1),A=e.get("clockwise"),P=e.get("stillShowZeroSum"),D=A?1:-1,M=function(e,t){if(e){var i=t;if(e!==y){var a=e.getValue(),o=0===b&&P?S:a*S;o<g&&(o=g),i=t+D*o;var s=e.depth-v-(T?-1:1),l=p+w*s,c=p+w*(s+1),f=e.getModel();null!=f.get("r0")&&(l=r(f.get("r0"),u/2)),null!=f.get("r")&&(c=r(f.get("r"),u/2)),e.setLayout({angle:o,startAngle:t,endAngle:i,clockwise:A,cx:d,cy:h,r0:l,r:c})}if(e.children&&e.children.length){var m=0;n.each(e.children,(function(e){m+=M(e,t+m)}))}return i-t}};if(T){var I=p,R=p+w,O=2*Math.PI;y.setLayout({angle:O,startAngle:m,endAngle:m+O,clockwise:A,cx:d,cy:h,r0:I,r:R})}M(_,m)}))}},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(2),a=i(110).getDefaultLabel,o=i(30),s=i(87).getLayoutOnAxis,l=i(43),c=i(14),u=i(12),d=i(24),h=i(68).createClipPath,p=i(474),f=i(475),m=i(476),g=i(477),y=i(478),_=n.CACHED_LABEL_STYLE_PROPERTIES,v=["itemStyle"],C=["emphasis","itemStyle"],x=["label"],b=["emphasis","label"],S={cartesian2d:p,geo:f,singleAxis:m,polar:g,calendar:y};function T(e,t,i,r,n){null==i[e]||n||(t[e]=i[e],i[e]=r[e])}function E(e,t,i,o){var l=e.get("renderItem"),c=e.coordinateSystem,u={};c&&(u=c.prepareCustoms?c.prepareCustoms():S[c.type](c));var d,h,p,f,m,g=r.defaults({getWidth:o.getWidth,getHeight:o.getHeight,getZr:o.getZr,getDevicePixelRatio:o.getDevicePixelRatio,value:function(e,i){return null==i&&(i=d),t.get(t.getDimension(e||0),i)},style:function(i,o){null==o&&(o=d),T(o);var s=h.getModel(v).getItemStyle();null!=m&&(s.fill=m);var l=t.getItemVisual(o,"opacity");null!=l&&(s.opacity=l);var c=i?I(i,p):p;return n.setTextStyle(s,c,null,{autoColor:m,isRectText:!0}),s.text=c.getShallow("show")?r.retrieve2(e.getFormattedLabel(o,"normal"),a(t,o)):null,i&&R(s,i),s},styleEmphasis:function(i,o){null==o&&(o=d),T(o);var s=h.getModel(C).getItemStyle(),l=i?I(i,f):f;return n.setTextStyle(s,l,null,{isRectText:!0},!0),s.text=l.getShallow("show")?r.retrieve3(e.getFormattedLabel(o,"emphasis"),e.getFormattedLabel(o,"normal"),a(t,o)):null,i&&R(s,i),s},visual:function(e,i){return null==i&&(i=d),t.getItemVisual(i,e)},barLayout:function(e){if(c.getBaseAxis){var t=c.getBaseAxis();return s(r.defaults({axis:t},e),o)}},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(e){return n.getFont(e,i)}},u.api||{}),y={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:u.coordSys,dataInsideLength:t.count(),encode:w(e.getData())},_=!0;return function(e,i){return d=e,_=!0,l&&l(r.defaults({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:i?i.type:null},y),g)};function T(e){null==e&&(e=d),_&&(h=t.getItemModel(e),p=h.getModel(x),f=h.getModel(b),m=t.getItemVisual(e,"color"),_=!1)}}function w(e){var t={};return r.each(e.dimensions,(function(i,r){var n=e.getDimensionInfo(i);if(!n.isExtraCoord){var a=n.coordDim;(t[a]=t[a]||[])[n.coordDimIndex]=r}})),t}function A(e,t,i,r,n,a){return(e=P(e,t,i,r,n,a,!0))&&a.setItemGraphicEl(t,e),e}function P(e,t,i,a,o,s,c){var u,d=!i,h=(i=i||{}).type,p=i.shape,f=i.style;if(e&&(d||null!=h&&h!==e.__customGraphicType||"path"===h&&((u=p)&&(u.hasOwnProperty("pathData")||u.hasOwnProperty("d")))&&L(p)!==e.__customPathData||"image"===h&&N(f,"image")&&f.image!==e.__customImagePath||"text"===h&&N(p,"text")&&f.text!==e.__customText)&&(o.remove(e),e=null),!d){var m=!e;return!e&&(e=function(e){var t,i=e.type;if("path"===i){var r=e.shape,a=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,o=L(r);(t=n.makePath(o,null,a,r.layout||"center")).__customPathData=o}else if("image"===i)(t=new n.Image({})).__customImagePath=e.style.image;else if("text"===i)(t=new n.Text({})).__customText=e.style.text;else if("group"===i)t=new n.Group;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');t=new(n.getShapeClass(i))}return t.__customGraphicType=i,t.name=e.name,t}(i)),function(e,t,i,a,o,s,l){var c={},u=i.style||{};if(i.shape&&(c.shape=r.clone(i.shape)),i.position&&(c.position=i.position.slice()),i.scale&&(c.scale=i.scale.slice()),i.origin&&(c.origin=i.origin.slice()),i.rotation&&(c.rotation=i.rotation),"image"===e.type&&i.style){var d=c.style={};r.each(["x","y","width","height"],(function(t){T(t,d,u,e.style,s)}))}if("text"===e.type&&i.style){d=c.style={};r.each(["x","y"],(function(t){T(t,d,u,e.style,s)})),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==e.type&&(e.useStyle(u),s)){e.style.opacity=0;var h=u.opacity;null==h&&(h=1),n.initProps(e,{style:{opacity:h}},a,t)}s?e.attr(c):n.updateProps(e,c,a,t),i.hasOwnProperty("z2")&&e.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&e.attr("silent",i.silent),i.hasOwnProperty("invisible")&&e.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&e.attr("ignore",i.ignore),i.hasOwnProperty("info")&&e.attr("info",i.info);var p=i.styleEmphasis;n.setElementHoverStyle(e,p),l&&n.setAsHighDownDispatcher(e,!1!==p)}(e,t,i,a,0,m,c),"group"===h&&function(e,t,i,r,n){var a=i.children,o=a?a.length:0,s=i.$mergeChildren,c="byName"===s||i.diffChildrenByName,u=!1===s;if(!o&&!c&&!u)return;if(c)return d={oldChildren:e.children()||[],newChildren:a||[],dataIndex:t,animatableModel:r,group:e,data:n},void new l(d.oldChildren,d.newChildren,D,D,d).add(M).update(M).remove(O).execute();var d;u&&e.removeAll();for(var h=0;h<o;h++)a[h]&&P(e.childAt(h),t,a[h],r,e,n)}(e,t,i,a,s),o.add(e),e}}function D(e,t){var i=e&&e.name;return null!=i?i:"e\0\0"+t}function M(e,t){var i=this.context,r=null!=e?i.newChildren[e]:null;P(null!=t?i.oldChildren[t]:null,i.dataIndex,r,i.animatableModel,i.group,i.data)}function I(e,t){var i=new u({},t);return r.each(_,(function(t,r){e.hasOwnProperty(t)&&(i.option[r]=e[t])})),i}function R(e,t){for(var i in t)!t.hasOwnProperty(i)&&_.hasOwnProperty(i)||(e[i]=t[i])}function O(e){var t=this.context,i=t.oldChildren[e];i&&t.group.remove(i)}function L(e){return e&&(e.pathData||e.d)}function N(e,t){return e&&e.hasOwnProperty(t)}c.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(e,t){return o(this.getSource(),this)},getDataParams:function(e,t,i){var r=c.prototype.getDataParams.apply(this,arguments);return i&&(r.info=i.info),r}}),d.extend({type:"custom",_data:null,render:function(e,t,i,r){var n=this._data,a=e.getData(),o=this.group,s=E(e,a,t,i);a.diff(n).add((function(t){A(null,t,s(t,r),e,o,a)})).update((function(t,i){A(n.getItemGraphicEl(i),t,s(t,r),e,o,a)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&o.remove(t)})).execute();var l=e.get("clip",!0)?h(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=a},incrementalPrepareRender:function(e,t,i){this.group.removeAll(),this._data=null},incrementalRender:function(e,t,i,r,n){var a=t.getData(),o=E(t,a,i,r);function s(e){e.isGroup||(e.incremental=!0,e.useHoverLayer=!0)}for(var l=e.start;l<e.end;l++){A(null,l,o(l,n),t,this.group,a).traverse(s)}},dispose:r.noop,filterForExposedEvent:function(e,t,i,r){var n=t.element;if(null==n||i.name===n)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===n)return!0;return!1}})},function(e,t,i){var r=i(0);function n(e,t){return t=t||[0,0],r.map(["x","y"],(function(i,r){var n=this.getAxis(i),a=t[r],o=e[r]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(a-o)-n.dataToCoord(a+o))}),this)}e.exports=function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:r.bind(n,e)}}}},function(e,t,i){var r=i(0);function n(e,t){return t=t||[0,0],r.map([0,1],(function(i){var r=t[i],n=e[i]/2,a=[],o=[];return a[i]=r-n,o[i]=r+n,a[1-i]=o[1-i]=t[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(o)[i])}),this)}e.exports=function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:r.bind(n,e)}}}},function(e,t,i){var r=i(0);function n(e,t){var i=this.getAxis(),r=t instanceof Array?t[0]:t,n=(e instanceof Array?e[0]:e)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(r-n)-i.dataToCoord(r+n))}e.exports=function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:r.bind(n,e)}}}},function(e,t,i){var r=i(0);function n(e,t){return r.map(["Radius","Angle"],(function(i,r){var n=this["get"+i+"Axis"](),a=t[r],o=e[r]/2,s="dataTo"+i,l="category"===n.type?n.getBandWidth():Math.abs(n[s](a-o)-n[s](a+o));return"Angle"===i&&(l=l*Math.PI/180),l}),this)}e.exports=function(e){var t=e.getRadiusAxis(),i=e.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:a[1],r0:a[0]},api:{coord:r.bind((function(r){var n=t.dataToRadius(r[0]),a=i.dataToAngle(r[1]),o=e.coordToPoint([n,a]);return o.push(n,a*Math.PI/180),o})),size:r.bind(n,e)}}}},function(e,t){e.exports=function(e){var t=e.getRect(),i=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(t,i){return e.dataToPoint(t,i)}}}}},function(e,t,i){i(70),i(211),i(74)},function(e,t,i){var r=i(1),n=i(0),a=i(481);i(123),i(487),i(489),i(74),i(491),r.registerLayout(n.curry(a,"bar")),r.extendComponentView({type:"polar"})},function(e,t,i){var r=i(0),n=i(3).parsePercent,a=i(25).isDimensionStacked;function o(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function s(e,t){return t.dim+e.model.componentIndex}var l=function(e,t,i){var l={},c=function(e,t){var i={};r.each(e,(function(e,t){var r=e.getData(),a=e.coordinateSystem,l=a.getBaseAxis(),c=s(a,l),u=l.getExtent(),d="category"===l.type?l.getBandWidth():Math.abs(u[1]-u[0])/r.count(),h=i[c]||{bandWidth:d,remainedWidth:d,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},p=h.stacks;i[c]=h;var f=o(e);p[f]||h.autoWidthCount++,p[f]=p[f]||{width:0,maxWidth:0};var m=n(e.get("barWidth"),d),g=n(e.get("barMaxWidth"),d),y=e.get("barGap"),_=e.get("barCategoryGap");m&&!p[f].width&&(m=Math.min(h.remainedWidth,m),p[f].width=m,h.remainedWidth-=m),g&&(p[f].maxWidth=g),null!=y&&(h.gap=y),null!=_&&(h.categoryGap=_)}));var a={};return r.each(i,(function(e,t){a[t]={};var i=e.stacks,o=e.bandWidth,s=n(e.categoryGap,o),l=n(e.gap,1),c=e.remainedWidth,u=e.autoWidthCount,d=(c-s)/(u+(u-1)*l);d=Math.max(d,0),r.each(i,(function(e,t){var i=e.maxWidth;i&&i<d&&(i=Math.min(i,c),e.width&&(i=Math.min(i,e.width)),c-=i,e.width=i,u--)})),d=(c-s)/(u+(u-1)*l),d=Math.max(d,0);var h,p=0;r.each(i,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;r.each(i,(function(e,i){a[t][i]=a[t][i]||{offset:f,width:e.width},f+=e.width*(1+l)}))})),a}(r.filter(t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),i=e.coordinateSystem,r=i.getBaseAxis(),n=s(i,r),u=o(e),d=c[n][u],h=d.offset,p=d.width,f=i.getOtherAxis(r),m=e.coordinateSystem.cx,g=e.coordinateSystem.cy,y=e.get("barMinHeight")||0,_=e.get("barMinAngle")||0;l[u]=l[u]||[];for(var v=t.mapDimension(f.dim),C=t.mapDimension(r.dim),x=a(t,v),b="radius"!==r.dim||!e.get("roundCap",!0),S="radius"===f.dim?f.dataToRadius(0):f.dataToAngle(0),T=0,E=t.count();T<E;T++){var w,A,P,D,M=t.get(v,T),I=t.get(C,T),R=M>=0?"p":"n",O=S;if(x&&(l[u][I]||(l[u][I]={p:S,n:S}),O=l[u][I][R]),"radius"===f.dim){var L=f.dataToRadius(M)-S,N=r.dataToAngle(I);Math.abs(L)<y&&(L=(L<0?-1:1)*y),w=O,A=O+L,D=(P=N-h)-p,x&&(l[u][I][R]=A)}else{var F=f.dataToAngle(M,b)-S,B=r.dataToRadius(I);Math.abs(F)<_&&(F=(F<0?-1:1)*_),A=(w=B+h)+p,P=O,D=O+F,x&&(l[u][I][R]=D)}t.setItemLayout(T,{cx:m,cy:g,r0:w,r:A,startAngle:-P*Math.PI/180,endAngle:-D*Math.PI/180})}}}),this)};e.exports=l},function(e,t,i){var r=i(483),n=i(484),a=function(e){this.name=e||"",this.cx=0,this.cy=0,this._radiusAxis=new r,this._angleAxis=new n,this._radiusAxis.polar=this._angleAxis.polar=this};a.prototype={type:"polar",axisPointerEnabled:!0,constructor:a,dimensions:["radius","angle"],model:null,containPoint:function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},containData:function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},getAxis:function(e){return this["_"+e+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(e){var t=[],i=this._angleAxis,r=this._radiusAxis;return i.scale.type===e&&t.push(i),r.scale.type===e&&t.push(r),t},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},dataToPoint:function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},pointToData:function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},pointToCoord:function(e){var t=e[0]-this.cx,i=e[1]-this.cy,r=this.getAngleAxis(),n=r.getExtent(),a=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);r.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+i*i);t/=s,i/=s;for(var l=Math.atan2(-i,t)/Math.PI*180,c=l<a?1:-1;l<a||l>o;)l+=360*c;return[s,l]},coordToPoint:function(e){var t=e[0],i=e[1]/180*Math.PI;return[Math.cos(i)*t+this.cx,-Math.sin(i)*t+this.cy]},getArea:function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var i=e.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-i[0]*r,endAngle:-i[1]*r,clockwise:e.inverse,contain:function(e,t){var i=e-this.cx,r=t-this.cy,n=i*i+r*r,a=this.r,o=this.r0;return n<=a*a&&n>=o*o}}}};var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(35);function a(e,t){n.call(this,"radius",e,t),this.type="category"}a.prototype={constructor:a,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToRadius:n.prototype.dataToCoord,radiusToData:n.prototype.coordToData},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(17),a=i(35),o=(0,i(4).makeInner)();function s(e,t){t=t||[0,360],a.call(this,"angle",e,t),this.type="category"}s.prototype={constructor:s,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToAngle:a.prototype.dataToCoord,angleToData:a.prototype.coordToData,calculateCategoryInterval:function(){var e=this.getLabelModel(),t=this.scale,i=t.getExtent(),r=t.count();if(i[1]-i[0]<1)return 0;var a=i[0],s=this.dataToCoord(a+1)-this.dataToCoord(a),l=Math.abs(s),c=n.getBoundingRect(a,e.getFont(),"center","top"),u=Math.max(c.height,7)/l;isNaN(u)&&(u=1/0);var d=Math.max(0,Math.floor(u)),h=o(this.model),p=h.lastAutoInterval,f=h.lastTickCount;return null!=p&&null!=f&&Math.abs(p-d)<=1&&Math.abs(f-r)<=1&&p>d?d=p:(h.lastTickCount=r,h.lastAutoInterval=d),d}},r.inherits(s,a);var l=s;e.exports=l},function(e,t,i){var r=i(1);i(486);var n=r.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});e.exports=n},function(e,t,i){var r=i(0),n=i(13),a=i(89),o=i(53),s=n.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});r.merge(s.prototype,o);var l={splitNumber:5};function c(e,t){return t.type||(t.data?"category":"value")}a("angle",s,c,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),a("radius",s,c,l)},function(e,t,i){i(123),i(488)},function(e,t,i){var r=i(0),n=i(2),a=i(12),o=i(45),s=i(36),l=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function c(e,t,i){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],i]),n=e.coordToPoint([t[1],i]);return{x1:r[0],y1:r[1],x2:n[0],y2:n[1]}}function u(e){return e.getRadiusAxis().inverse?0:1}function d(e){var t=e[0],i=e[e.length-1];t&&i&&Math.abs(Math.abs(t.coord-i.coord)-360)<1e-4&&e.pop()}var h=o.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),o=i.getTicksCoords(),s=i.getMinorTicksCoords(),c=r.map(i.getViewLabels(),(function(e){return(e=r.clone(e)).coord=i.dataToCoord(e.tickValue),e}));d(c),d(o),r.each(l,(function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,o,s,a,c)}),this)}},_axisLine:function(e,t,i,r,a){var o,s=e.getModel("axisLine.lineStyle"),l=u(t),c=l?0:1;(o=0===a[c]?new n.Circle({shape:{cx:t.cx,cy:t.cy,r:a[l]},style:s.getLineStyle(),z2:1,silent:!0}):new n.Ring({shape:{cx:t.cx,cy:t.cy,r:a[l],r0:a[c]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(o)},_axisTick:function(e,t,i,a,o){var s=e.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),d=o[u(t)],h=r.map(i,(function(e){return new n.Line({shape:c(t,[d,d+l],e.coord)})}));this.group.add(n.mergePath(h,{style:r.defaults(s.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,i,a,o){if(a.length){for(var s=e.getModel("axisTick"),l=e.getModel("minorTick"),d=(s.get("inside")?-1:1)*l.get("length"),h=o[u(t)],p=[],f=0;f<a.length;f++)for(var m=0;m<a[f].length;m++)p.push(new n.Line({shape:c(t,[h,h+d],a[f][m].coord)}));this.group.add(n.mergePath(p,{style:r.defaults(l.getModel("lineStyle").getLineStyle(),r.defaults(s.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(e,t,i,o,l,c){var d=e.getCategories(!0),h=e.getModel("axisLabel"),p=h.get("margin"),f=e.get("triggerEvent");r.each(c,(function(i,r){var o=h,c=i.tickValue,m=l[u(t)],g=t.coordToPoint([m+p,i.coord]),y=t.cx,_=t.cy,v=Math.abs(g[0]-y)/m<.3?"center":g[0]>y?"left":"right",C=Math.abs(g[1]-_)/m<.3?"middle":g[1]>_?"top":"bottom";d&&d[c]&&d[c].textStyle&&(o=new a(d[c].textStyle,h,h.ecModel));var x=new n.Text({silent:s.isLabelSilent(e)});this.group.add(x),n.setTextStyle(x.style,o,{x:g[0],y:g[1],textFill:o.getTextColor()||e.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:v,textVerticalAlign:C}),f&&(x.eventData=s.makeAxisEventDataBase(e),x.eventData.targetType="axisLabel",x.eventData.value=i.rawLabel)}),this)},_splitLine:function(e,t,i,a,o){var s=e.getModel("splitLine").getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var d=[],h=0;h<i.length;h++){var p=u++%l.length;d[p]=d[p]||[],d[p].push(new n.Line({shape:c(t,o,i[h].coord)}))}for(h=0;h<d.length;h++)this.group.add(n.mergePath(d[h],{style:r.defaults({stroke:l[h%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},_minorSplitLine:function(e,t,i,r,a){if(r.length){for(var o=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var u=0;u<r[l].length;u++)s.push(new n.Line({shape:c(t,a,r[l][u].coord)}));this.group.add(n.mergePath(s,{style:o.getLineStyle(),silent:!0,z:e.get("z")}))}},_splitArea:function(e,t,i,a,o){if(i.length){var s=e.getModel("splitArea").getModel("areaStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],d=Math.PI/180,h=-i[0].coord*d,p=Math.min(o[0],o[1]),f=Math.max(o[0],o[1]),m=e.get("clockwise"),g=1;g<i.length;g++){var y=c++%l.length;u[y]=u[y]||[],u[y].push(new n.Sector({shape:{cx:t.cx,cy:t.cy,r0:p,r:f,startAngle:h,endAngle:-i[g].coord*d,clockwise:m},silent:!0})),h=-i[g].coord*d}for(g=0;g<u.length;g++)this.group.add(n.mergePath(u[g],{style:r.defaults({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}});e.exports=h},function(e,t,i){i(123),i(490)},function(e,t,i){var r=i(0),n=i(2),a=i(36),o=i(45),s=["axisLine","axisTickLabel","axisName"],l=["splitLine","splitArea","minorSplitLine"],c=o.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getAngleAxis(),c=i.getTicksCoords(),u=i.getMinorTicksCoords(),d=o.getExtent()[0],h=i.getExtent(),p=function(e,t,i){return{position:[e.cx,e.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(n,e,d),f=new a(e,p);r.each(s,f.add,f),this.group.add(f.getGroup()),r.each(l,(function(t){e.get(t+".show")&&!i.scale.isBlank()&&this["_"+t](e,n,d,h,c,u)}),this)}},_splitLine:function(e,t,i,a,o){var s=e.getModel("splitLine").getModel("lineStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],d=0;d<o.length;d++){var h=c++%l.length;u[h]=u[h]||[],u[h].push(new n.Circle({shape:{cx:t.cx,cy:t.cy,r:o[d].coord}}))}for(d=0;d<u.length;d++)this.group.add(n.mergePath(u[d],{style:r.defaults({stroke:l[d%l.length],fill:null},s.getLineStyle()),silent:!0}))},_minorSplitLine:function(e,t,i,a,o,s){if(s.length){for(var l=e.getModel("minorSplitLine").getModel("lineStyle"),c=[],u=0;u<s.length;u++)for(var d=0;d<s[u].length;d++)c.push(new n.Circle({shape:{cx:t.cx,cy:t.cy,r:s[u][d].coord}}));this.group.add(n.mergePath(c,{style:r.defaults({fill:null},l.getLineStyle()),silent:!0}))}},_splitArea:function(e,t,i,a,o){if(o.length){var s=e.getModel("splitArea").getModel("areaStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],d=o[0].coord,h=1;h<o.length;h++){var p=c++%l.length;u[p]=u[p]||[],u[p].push(new n.Sector({shape:{cx:t.cx,cy:t.cy,r0:d,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),d=o[h].coord}for(h=0;h<u.length;h++)this.group.add(n.mergePath(u[h],{style:r.defaults({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}});e.exports=c},function(e,t,i){var r=i(7),n=i(122),a=i(2),o=i(95),s=i(15),l=i(36),c=i(45),u=n.extend({makeElOption:function(e,t,i,n,c){var u=i.axis;"angle"===u.dim&&(this.animationThreshold=Math.PI/18);var h,p=u.polar,f=p.getOtherAxis(u).getExtent();h=u["dataTo"+r.capitalFirst(u.dim)](t);var m=n.get("type");if(m&&"none"!==m){var g=o.buildElStyle(n),y=d[m](u,p,h,f,g);y.style=g,e.graphicKey=y.type,e.pointer=y}var _=function(e,t,i,r,n){var o=t.axis,c=o.dataToCoord(e),u=r.getAngleAxis().getExtent()[0];u=u/180*Math.PI;var d,h,p,f=r.getRadiusAxis().getExtent();if("radius"===o.dim){var m=s.create();s.rotate(m,m,u),s.translate(m,m,[r.cx,r.cy]),d=a.applyTransform([c,-n],m);var g=t.getModel("axisLabel").get("rotate")||0,y=l.innerTextLayout(u,g*Math.PI/180,-1);h=y.textAlign,p=y.textVerticalAlign}else{var _=f[1];d=r.coordToPoint([_+n,c]);var v=r.cx,C=r.cy;h=Math.abs(d[0]-v)/_<.3?"center":d[0]>v?"left":"right",p=Math.abs(d[1]-C)/_<.3?"middle":d[1]>C?"top":"bottom"}return{position:d,align:h,verticalAlign:p}}(t,i,0,p,n.get("label.margin"));o.buildLabelElOption(e,i,n,c,_)}});var d={line:function(e,t,i,r,n){return"angle"===e.dim?{type:"Line",shape:o.makeLineShape(t.coordToPoint([r[0],i]),t.coordToPoint([r[1],i]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:i}}},shadow:function(e,t,i,r,n){var a=Math.max(1,e.getBandWidth()),s=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:o.makeSectorShape(t.cx,t.cy,r[0],r[1],(-i-a/2)*s,(a/2-i)*s)}:{type:"Sector",shape:o.makeSectorShape(t.cx,t.cy,i-a/2,i+a/2,0,2*Math.PI)}}};c.registerAxisPointerClass("PolarAxisPointer",u);var h=u;e.exports=h},function(e,t,i){var r=i(1),n=i(0);function a(e,t){t.update="updateView",r.registerAction(t,(function(t,i){var r={};return i.eachComponent({mainType:"geo",query:t},(function(i){i[e](t.name);var a=i.coordinateSystem;n.each(a.regions,(function(e){r[e.name]=i.isSelected(e.name)||!1}))})),{selected:r,name:t.name}}))}i(493),i(115),i(494),i(193),a("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),a("select",{type:"geoSelect",event:"geoselected"}),a("unSelect",{type:"geoUnSelect",event:"geounselected"})},function(e,t,i){var r=i(0),n=i(4),a=i(13),o=i(12),s=i(112),l=i(115),c=a.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(e){a.prototype.init.apply(this,arguments),n.defaultEmphasis(e,"label",["show"])},optionUpdated:function(){var e=this.option,t=this;e.regions=l.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=r.reduce(e.regions||[],(function(e,i){return i.name&&e.set(i.name,new o(i,t)),e}),r.createHashMap()),this.updateSelectedMap(e.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(e){return this._optionModelMap.get(e)||new o(null,this,this.ecModel)},getFormattedLabel:function(e,t){t=t||"normal";var i=this.getRegionModel(e).get(("normal"===t?"":t+".")+"label.formatter"),r={name:e};return"function"==typeof i?(r.status=t,i(r)):"string"==typeof i?i.replace("{a}",null!=e?e:""):void 0},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e}});r.mixin(c,s);var u=c;e.exports=u},function(e,t,i){var r=i(191),n=i(1).extendComponentView({type:"geo",init:function(e,t){var i=new r(t,!0);this._mapDraw=i,this.group.add(i.group)},render:function(e,t,i,r){if(!r||"geoToggleSelect"!==r.type||r.from!==this.uid){var n=this._mapDraw;e.get("show")?n.draw(e,t,i,this,r):this._mapDraw.group.removeAll(),this.group.silent=e.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});e.exports=n},function(e,t,i){i(496),i(497),i(498)},function(e,t,i){var r=i(0),n=i(6),a=i(3),o=i(20);function s(e,t,i){this._model=e}function l(e,t,i,r){var n=i.calendarModel,a=i.seriesModel,o=n?n.coordinateSystem:a?a.coordinateSystem:null;return o===this?o[e](r):null}s.prototype={constructor:s,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(e){var t=(e=a.parseDate(e)).getFullYear(),i=e.getMonth()+1;i=i<10?"0"+i:i;var r=e.getDate();r=r<10?"0"+r:r;var n=e.getDay();return{y:t,m:i,d:r,day:n=Math.abs((n+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+i+"-"+r,date:e}},getNextNDay:function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},update:function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,a=["width","height"],o=this._model.get("cellSize").slice(),s=this._model.getBoxLayoutParams(),l="horizontal"===this._orient?[i,7]:[7,i];r.each([0,1],(function(e){d(o,e)&&(s[a[e]]=o[e]*l[e])}));var c={width:t.getWidth(),height:t.getHeight()},u=this._rect=n.getLayoutRect(s,c);function d(e,t){return null!=e[t]&&"auto"!==e[t]}r.each([0,1],(function(e){d(o,e)||(o[e]=u[a[e]]/l[e])})),this._sw=o[0],this._sh=o[1]},dataToPoint:function(e,t){r.isArray(e)&&(e=e[0]),null==t&&(t=!0);var i=this.getDateInfo(e),n=this._rangeInfo,a=i.formatedDate;if(t&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var o=i.day,s=this._getRangeInfo([n.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},pointToData:function(e){var t=this.pointToDate(e);return t&&t.time},dataToRect:function(e,t){var i=this.dataToPoint(e,t);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,i=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,t-1,r):this._getDateByWeeksAndDay(t,i-1,r)},convertToPixel:r.curry(l,"dataToPoint"),convertFromPixel:r.curry(l,"pointToData"),_initRangeOption:function(){var e=this._model.get("range"),t=e;if(r.isArray(t)&&1===t.length&&(t=t[0]),/^\d{4}$/.test(t)&&(e=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)){var i=this.getDateInfo(t),n=i.date;n.setMonth(n.getMonth()+1);var a=this.getNextNDay(n,-1);e=[i.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(e=[t,t]);var o=this._getRangeInfo(e);return o.start.time>o.end.time&&e.reverse(),e},_getRangeInfo:function(e){var t;(e=[this.getDateInfo(e[0]),this.getDateInfo(e[1])])[0].time>e[1].time&&(t=!0,e.reverse());var i=Math.floor(e[1].time/864e5)-Math.floor(e[0].time/864e5)+1,r=new Date(e[0].time),n=r.getDate(),a=e[1].date.getDate();r.setDate(n+i-1);var o=r.getDate();if(o!==a)for(var s=r.getTime()-e[1].time>0?1:-1;(o=r.getDate())!==a&&(r.getTime()-e[1].time)*s>0;)i-=s,r.setDate(o-s);var l=Math.floor((i+e[0].day+6)/7),c=t?1-l:l-1;return t&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:i,weeks:l,nthWeek:c,fweek:e[0].day,lweek:e[1].day}},_getDateByWeeksAndDay:function(e,t,i){var r=this._getRangeInfo(i);if(e>r.weeks||0===e&&t<r.fweek||e===r.weeks&&t>r.lweek)return!1;var n=7*(e-1)-r.fweek+t,a=new Date(r.start.time);return a.setDate(r.start.d+n),this.getDateInfo(a)}},s.dimensions=s.prototype.dimensions,s.getDimensionsInfo=s.prototype.getDimensionsInfo,s.create=function(e,t){var i=[];return e.eachComponent("calendar",(function(r){var n=new s(r,e,t);i.push(n),r.coordinateSystem=n})),e.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("calendarIndex")||0])})),i},o.register("calendar",s);var c=s;e.exports=c},function(e,t,i){var r=i(0),n=i(13),a=i(6),o=a.getLayoutParams,s=a.sizeCalculable,l=a.mergeLayoutParam,c=n.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(e,t,i,r){var n=o(e);c.superApply(this,"init",arguments),u(e,n)},mergeOption:function(e,t){c.superApply(this,"mergeOption",arguments),u(this.option,e)}});function u(e,t){var i=e.cellSize;r.isArray(i)?1===i.length&&(i[1]=i[0]):i=e.cellSize=[i,i];var n=r.map([0,1],(function(e){return s(t,e)&&(i[e]="auto"),null!=i[e]&&"auto"!==i[e]}));l(e,t,{type:"box",ignoreSize:n})}var d=c;e.exports=d},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(7),s=i(3),l={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},c={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},u=r.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(e,t,i){var r=this.group;r.removeAll();var n=e.coordinateSystem,a=n.getRangeInfo(),o=n.getOrient();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,o,r),this._renderWeekText(e,a,o,r)},_renderDayRect:function(e,t,i){for(var r=e.coordinateSystem,n=e.getModel("itemStyle").getItemStyle(),o=r.getCellWidth(),s=r.getCellHeight(),l=t.start.time;l<=t.end.time;l=r.getNextNDay(l,1).time){var c=r.dataToRect([l],!1).tl,u=new a.Rect({shape:{x:c[0],y:c[1],width:o,height:s},cursor:"default",style:n});i.add(u)}},_renderLines:function(e,t,i,r){var n=this,a=e.coordinateSystem,o=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=t.start,u=0;c.time<=t.end.time;u++){h(c.formatedDate),0===u&&(c=a.getDateInfo(t.start.y+"-"+t.start.m));var d=c.date;d.setMonth(d.getMonth()+1),c=a.getDateInfo(d)}function h(t){n._firstDayOfMonth.push(a.getDateInfo(t)),n._firstDayPoints.push(a.dataToRect([t],!1).tl);var l=n._getLinePointsOfOneWeek(e,t,i);n._tlpoints.push(l[0]),n._blpoints.push(l[l.length-1]),s&&n._drawSplitline(l,o,r)}h(a.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(n._getEdgesPoints(n._tlpoints,l,i),o,r),s&&this._drawSplitline(n._getEdgesPoints(n._blpoints,l,i),o,r)},_getEdgesPoints:function(e,t,i){var r=[e[0].slice(),e[e.length-1].slice()],n="horizontal"===i?0:1;return r[0][n]=r[0][n]-t/2,r[1][n]=r[1][n]+t/2,r},_drawSplitline:function(e,t,i){var r=new a.Polyline({z2:20,shape:{points:e},style:t});i.add(r)},_getLinePointsOfOneWeek:function(e,t,i){var r=e.coordinateSystem;t=r.getDateInfo(t);for(var n=[],a=0;a<7;a++){var o=r.getNextNDay(t.time,a),s=r.dataToRect([o.time],!1);n[2*o.day]=s.tl,n[2*o.day+1]=s["horizontal"===i?"bl":"tr"]}return n},_formatterLabel:function(e,t){return"string"==typeof e&&e?o.formatTplSimple(e,t):"function"==typeof e?e(t):t.nameMap},_yearTextPositionControl:function(e,t,i,r,n){t=t.slice();var a=["center","bottom"];"bottom"===r?(t[1]+=n,a=["center","top"]):"left"===r?t[0]-=n:"right"===r?(t[0]+=n,a=["center","top"]):t[1]-=n;var o=0;return"left"!==r&&"right"!==r||(o=Math.PI/2),{rotation:o,position:t,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(e,t,i,r){var n=e.getModel("yearLabel");if(n.get("show")){var o=n.get("margin"),s=n.get("position");s||(s="horizontal"!==i?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(l[0][0]+l[1][0])/2,u=(l[0][1]+l[1][1])/2,d="horizontal"===i?0:1,h={top:[c,l[d][1]],bottom:[c,l[1-d][1]],left:[l[1-d][0],u],right:[l[d][0],u]},p=t.start.y;+t.end.y>+t.start.y&&(p=p+"-"+t.end.y);var f=n.get("formatter"),m={start:t.start.y,end:t.end.y,nameMap:p},g=this._formatterLabel(f,m),y=new a.Text({z2:30});a.setTextStyle(y.style,n,{text:g}),y.attr(this._yearTextPositionControl(y,h[s],i,s,o)),r.add(y)}},_monthTextPositionControl:function(e,t,i,r,n){var a="left",o="top",s=e[0],l=e[1];return"horizontal"===i?(l+=n,t&&(a="center"),"start"===r&&(o="bottom")):(s+=n,t&&(o="middle"),"start"===r&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderMonthText:function(e,t,i){var r=e.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),s=r.get("margin"),c=r.get("position"),u=r.get("align"),d=[this._tlpoints,this._blpoints];n.isString(o)&&(o=l[o.toUpperCase()]||[]);var h="start"===c?0:1,p="horizontal"===t?0:1;s="start"===c?-s:s;for(var f="center"===u,m=0;m<d[h].length-1;m++){var g=d[h][m].slice(),y=this._firstDayOfMonth[m];if(f){var _=this._firstDayPoints[m];g[p]=(_[p]+d[0][m+1][p])/2}var v=r.get("formatter"),C=o[+y.m-1],x={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:C},b=this._formatterLabel(v,x),S=new a.Text({z2:30});n.extend(a.setTextStyle(S.style,r,{text:b}),this._monthTextPositionControl(g,f,t,c,s)),i.add(S)}}},_weekTextPositionControl:function(e,t,i,r,n){var a="center",o="middle",s=e[0],l=e[1],c="start"===i;return"horizontal"===t?(s=s+r+(c?1:-1)*n[0]/2,a=c?"right":"left"):(l=l+r+(c?1:-1)*n[1]/2,o=c?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderWeekText:function(e,t,i,r){var o=e.getModel("dayLabel");if(o.get("show")){var l=e.coordinateSystem,u=o.get("position"),d=o.get("nameMap"),h=o.get("margin"),p=l.getFirstDayOfWeek();n.isString(d)&&(d=c[d.toUpperCase()]||[]);var f=l.getNextNDay(t.end.time,7-t.lweek).time,m=[l.getCellWidth(),l.getCellHeight()];h=s.parsePercent(h,m["horizontal"===i?0:1]),"start"===u&&(f=l.getNextNDay(t.start.time,-(7+t.fweek)).time,h=-h);for(var g=0;g<7;g++){var y,_=l.getNextNDay(f,g),v=l.dataToRect([_.time],!1).center;y=Math.abs((g+p)%7);var C=new a.Text({z2:30});n.extend(a.setTextStyle(C.style,o,{text:d[y]}),this._weekTextPositionControl(v,i,u,h,m)),r.add(C)}}}});e.exports=u},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(4),o=i(2),s=i(6),l=i(3).parsePercent,c={path:null,compoundPath:null,group:o.Group,image:o.Image,text:o.Text};r.registerPreprocessor((function(e){var t=e.graphic;n.isArray(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}));var u=r.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(e){var t=this.option.elements;this.option.elements=null,u.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(e,t){var i=this.option,r=(t?i:e).elements,o=i.elements=t?[]:i.elements,l=[];this._flatten(r,l);var c=a.mappingToExists(o,l);a.makeIdAndName(c);var u=this._elOptionsToUpdate=[];n.each(c,(function(e,t){var i=e.option;i&&(u.push(i),function(e,t){var i=e.exist;if(t.id=e.keyInfo.id,!t.type&&i&&(t.type=i.type),null==t.parentId){var r=t.parentOption;r?t.parentId=r.id:i&&(t.parentId=i.parentId)}t.parentOption=null}(e,i),function(e,t,i){var r=n.extend({},i),a=e[t],o=i.$action||"merge";"merge"===o?a?(n.merge(a,r,!0),s.mergeLayoutParam(a,r,{ignoreSize:!0}),s.copyLayoutParams(i,a)):e[t]=r:"replace"===o?e[t]=r:"remove"===o&&a&&(e[t]=null)}(o,t,i),function(e,t){if(!e)return;e.hv=t.hv=[p(t,["left","right"]),p(t,["top","bottom"])],"group"===e.type&&(null==e.width&&(e.width=t.width=0),null==e.height&&(e.height=t.height=0))}(o[t],i))}),this);for(var d=o.length-1;d>=0;d--)null==o[d]?o.splice(d,1):delete o[d].$action},_flatten:function(e,t,i){n.each(e,(function(e){if(e){i&&(e.parentOption=i),t.push(e);var r=e.children;"group"===e.type&&r&&this._flatten(r,t,e),delete e.children}}),this)},useElOptionsToUpdate:function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}});function d(e,t,i,r){var n=i.type,a=new(c.hasOwnProperty(n)?c[n]:o.getShapeClass(n))(i);t.add(a),r.set(e,a),a.__ecGraphicId=e}function h(e,t){var i=e&&e.parent;i&&("group"===e.type&&e.traverse((function(e){h(e,t)})),t.removeKey(e.__ecGraphicId),i.remove(e))}function p(e,t){var i;return n.each(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(i=!0)})),i}r.extendComponentView({type:"graphic",init:function(e,t){this._elMap=n.createHashMap(),this._lastGraphicModel},render:function(e,t,i){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,i)},_updateElements:function(e){var t=e.useElOptionsToUpdate();if(t){var i=this._elMap,r=this.group;n.each(t,(function(t){var a=t.$action,o=t.id,l=i.get(o),c=t.parentId,u=null!=c?i.get(c):r,p=t.style;"text"===t.type&&p&&(t.hv&&t.hv[1]&&(p.textVerticalAlign=p.textBaseline=null),!p.hasOwnProperty("textFill")&&p.fill&&(p.textFill=p.fill),!p.hasOwnProperty("textStroke")&&p.stroke&&(p.textStroke=p.stroke));var f=function(e){return e=n.extend({},e),n.each(["id","parentId","$action","hv","bounding"].concat(s.LOCATION_PARAMS),(function(t){delete e[t]})),e}(t);a&&"merge"!==a?"replace"===a?(h(l,i),d(o,u,f,i)):"remove"===a&&h(l,i):l?l.attr(f):d(o,u,f,i);var m=i.get(o);m&&(m.__ecGraphicWidthOption=t.width,m.__ecGraphicHeightOption=t.height,function(e,t,i){var r=e.eventData;e.silent||e.ignore||r||(r=e.eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});r&&(r.info=e.info)}(m,e))}))}},_relocate:function(e,t){for(var i=e.option.elements,r=this.group,n=this._elMap,a=t.getWidth(),o=t.getHeight(),c=0;c<i.length;c++){var u=i[c];if((h=n.get(u.id))&&h.isGroup){var d=(p=h.parent)===r;h.__ecGraphicWidth=l(h.__ecGraphicWidthOption,d?a:p.__ecGraphicWidth)||0,h.__ecGraphicHeight=l(h.__ecGraphicHeightOption,d?o:p.__ecGraphicHeight)||0}}for(c=i.length-1;c>=0;c--){var h;u=i[c];if(h=n.get(u.id)){var p,f=(p=h.parent)===r?{width:a,height:o}:{width:p.__ecGraphicWidth,height:p.__ecGraphicHeight};s.positionElement(h,u,f,null,{hv:u.hv,boundingMode:u.bounding})}}},_clear:function(){var e=this._elMap;e.each((function(t){h(t,e)})),this._elMap=n.createHashMap()},dispose:function(){this._clear()}})},function(e,t,i){i(501),i(502),i(503),i(504),i(505),i(506),i(511)},function(e,t,i){var r=i(1),n=i(0),a=i(37),o=r.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){o.superApply(this,"optionUpdated",arguments),n.each(this.option.feature,(function(e,t){var i=a.get(t);i&&n.merge(e,i.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}}),s=o;e.exports=s},function(e,t,i){var r=i(1),n=i(0),a=i(17),o=i(37),s=i(2),l=i(12),c=i(43),u=i(212),d=r.extendComponentView({type:"toolbox",render:function(e,t,i,r){var d=this.group;if(d.removeAll(),e.get("show")){var h=+e.get("itemSize"),p=e.get("feature")||{},f=this._features||(this._features={}),m=[];n.each(p,(function(e,t){m.push(t)})),new c(this._featureNames||[],m).add(g).update(g).remove(n.curry(g,null)).execute(),this._featureNames=m,u.layout(d,e,i),d.add(u.makeBackground(d.getBoundingRect(),e)),d.eachChild((function(e){var t=e.__title,r=e.hoverStyle;if(r&&t){var n=a.getBoundingRect(t,a.makeFont(r)),o=e.position[0]+d.position[0],s=!1;e.position[1]+d.position[1]+h+n.height>i.getHeight()&&(r.textPosition="top",s=!0);var l=s?-5-n.height:h+8;o+n.width/2>i.getWidth()?(r.textPosition=["100%",l],r.textAlign="right"):o-n.width/2<0&&(r.textPosition=[0,l],r.textAlign="left")}}))}function g(a,c){var u,g=m[a],y=m[c],_=p[g],v=new l(_,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===g&&(_.title=r.newTitle),g&&!y){if(function(e){return 0===e.indexOf("my")}(g))u={model:v,onclick:v.option.onclick,featureName:g};else{var C=o.get(g);if(!C)return;u=new C(v,t,i)}f[g]=u}else{if(!(u=f[y]))return;u.model=v,u.ecModel=t,u.api=i}g||!y?v.get("show")&&!u.unusable?(!function(r,a,o){var l=r.getModel("iconStyle"),c=r.getModel("emphasis.iconStyle"),u=a.getIcons?a.getIcons():r.get("icon"),p=r.get("title")||{};if("string"==typeof u){var f=u,m=p;p={},(u={})[o]=f,p[o]=m}var g=r.iconPaths={};n.each(u,(function(o,u){var f=s.createIcon(o,{},{x:-h/2,y:-h/2,width:h,height:h});f.setStyle(l.getItemStyle()),f.hoverStyle=c.getItemStyle(),f.setStyle({text:p[u],textAlign:c.get("textAlign"),textBorderRadius:c.get("textBorderRadius"),textPadding:c.get("textPadding"),textFill:null});var m=e.getModel("tooltip");m&&m.get("show")&&f.attr("tooltip",n.extend({content:p[u],formatter:m.get("formatter",!0)||function(){return p[u]},formatterParams:{componentType:"toolbox",name:u,title:p[u],$vars:["name","title"]},position:m.get("position",!0)||"bottom"},m.option)),s.setHoverStyle(f),e.get("showTitle")&&(f.__title=p[u],f.on("mouseover",(function(){var t=c.getItemStyle(),i="vertical"===e.get("orient")?null==e.get("right")?"right":"left":null==e.get("bottom")?"bottom":"top";f.setStyle({textFill:c.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:c.get("textBackgroundColor"),textPosition:c.get("textPosition")||i})})).on("mouseout",(function(){f.setStyle({textFill:null,textBackgroundColor:null})}))),f.trigger(r.get("iconStatus."+u)||"normal"),d.add(f),f.on("click",n.bind(a.onclick,a,t,i,u)),g[u]=f}))}(v,u,g),v.setIconStatus=function(e,t){var i=this.option,r=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[e]=t,r[e]&&r[e].trigger(t)},u.render&&u.render(v,t,i,r)):u.remove&&u.remove(t,i):u.dispose&&u.dispose(t,i)}},updateView:function(e,t,i,r){n.each(this._features,(function(e){e.updateView&&e.updateView(e.model,t,i,r)}))},remove:function(e,t){n.each(this._features,(function(i){i.remove&&i.remove(e,t)})),this.group.removeAll()},dispose:function(e,t){n.each(this._features,(function(i){i.dispose&&i.dispose(e,t)}))}});e.exports=d},function(e,t,i){var r=i(11),n=i(34),a=i(37),o=n.toolbox.saveAsImage;function s(e){this.model=e}s.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:o.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:o.lang.slice()},s.prototype.unusable=!r.canvasSupported,s.prototype.onclick=function(e,t){var i=this.model,n=i.get("name")||e.get("title.0.text")||"echarts",a="svg"===t.getZr().painter.getType()?"svg":i.get("type",!0)||"png",o=t.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||r.browser.ie||r.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(o.split(",")[1]),l=s.length,c=new Uint8Array(l);l--;)c[l]=s.charCodeAt(l);var u=new Blob([c]);window.navigator.msSaveOrOpenBlob(u,n+"."+a)}else{var d=i.get("lang"),h='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(d&&d[0]||"")+'" /></body>';window.open().document.write(h)}else{var p=document.createElement("a");p.download=n+"."+a,p.target="_blank",p.href=o;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(f)}},a.register("saveAsImage",s);var l=s;e.exports=l},function(e,t,i){var r=i(1),n=i(0),a=i(34),o=i(37),s=a.toolbox.magicType;function l(e){this.model=e}l.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:n.clone(s.title),option:{},seriesIndex:{}};var c=l.prototype;c.getIcons=function(){var e=this.model,t=e.get("icon"),i={};return n.each(e.get("type"),(function(e){t[e]&&(i[e]=t[e])})),i};var u={line:function(e,t,i,r){if("bar"===e)return n.merge({id:t,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.line")||{},!0)},bar:function(e,t,i,r){if("line"===e)return n.merge({id:t,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.bar")||{},!0)},stack:function(e,t,i,r){var a="__ec_magicType_stack__"===i.get("stack");if("line"===e||"bar"===e)return r.setIconStatus("stack",a?"normal":"emphasis"),n.merge({id:t,stack:a?"":"__ec_magicType_stack__"},r.get("option.stack")||{},!0)}},d=[["line","bar"],["stack"]];c.onclick=function(e,t,i){var r=this.model,a=r.get("seriesIndex."+i);if(u[i]){var o,l={series:[]};if(n.each(d,(function(e){n.indexOf(e,i)>=0&&n.each(e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(t){var a=t.subType,o=t.id,s=u[i](a,o,t,r);s&&(n.defaults(s,t.option),l.series.push(s));var c=t.coordinateSystem;if(c&&"cartesian2d"===c.type&&("line"===i||"bar"===i)){var d=c.getAxesByScale("ordinal")[0];if(d){var h=d.dim+"Axis",p=e.queryComponents({mainType:h,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;l[h]=l[h]||[];for(var f=0;f<=p;f++)l[h][p]=l[h][p]||{};l[h][p].boundaryGap="bar"===i}}})),"stack"===i)o=l.series&&l.series[0]&&"__ec_magicType_stack__"===l.series[0].stack?n.merge({stack:s.title.tiled},s.title):n.clone(s.title);t.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:o,featureName:"magicType"})}},r.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)})),o.register("magicType",l);var h=l;e.exports=h},function(e,t,i){var r=i(1),n=i(0),a=i(22),o=i(34),s=i(37),l=o.toolbox.dataView,c=new Array(60).join("-");function u(e){return n.map(e,(function(e){var t=e.getRawData(),i=[e.name],r=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,n=arguments[e-1],a=t.getName(n),o=0;o<e-1;o++)r[o]=arguments[o];i.push((a?a+"\t":"")+r.join("\t"))})),i.join("\n")})).join("\n\n"+c+"\n\n")}function d(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var h=new RegExp("[\t]+","g");function p(e,t){var i=e.split(new RegExp("\n*"+c+"\n*","g")),r={series:[]};return n.each(i,(function(e,i){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf("\t")>=0)return!0}(e)){var a=function(e){for(var t=e.split(/\n+/g),i=d(t.shift()).split(h),r=[],a=n.map(i,(function(e){return{name:e,data:[]}})),o=0;o<t.length;o++){var s=d(t[o]).split(h);r.push(s.shift());for(var l=0;l<s.length;l++)a[l]&&(a[l].data[o]=s[l])}return{series:a,categories:r}}(e),o=t[i],s=o.axisDim+"Axis";o&&(r[s]=r[s]||[],r[s][o.axisIndex]={data:a.categories},r.series=r.series.concat(a.series))}else{a=function(e){for(var t=e.split(/\n+/g),i=d(t.shift()),r=[],n=0;n<t.length;n++){var a=d(t[n]);if(a){var o,s=a.split(h),l="",c=!1;isNaN(s[0])?(c=!0,l=s[0],s=s.slice(1),r[n]={name:l,value:[]},o=r[n].value):o=r[n]=[];for(var u=0;u<s.length;u++)o.push(+s[u]);1===o.length&&(c?r[n].value=o[0]:r[n]=o[0])}}return{name:i,data:r}}(e);r.series.push(a)}})),r}function f(e){this._dom=null,this.model=e}function m(e,t){return n.map(e,(function(e,i){var r=t&&t[i];if(n.isObject(r)&&!n.isArray(r)){n.isObject(e)&&!n.isArray(e)||(e={value:e});var a=null!=r.name&&null==e.name;return e=n.defaults(e,r),a&&delete e.name,e}return e}))}f.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:n.clone(l.title),lang:n.clone(l.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},f.prototype.onclick=function(e,t){var i=t.getDom(),r=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=r.get("lang")||[];s.innerHTML=l[0]||r.get("title"),s.style.cssText="margin: 10px 20px;",s.style.color=r.get("textColor");var d=document.createElement("div"),h=document.createElement("textarea");d.style.cssText="display:block;width:100%;overflow:auto;";var f=r.get("optionToContent"),m=r.get("contentToOption"),g=function(e){var t,i,r=function(e){var t={},i=[],r=[];return e.eachRawSeries((function(e){var n=e.coordinateSystem;if(!n||"cartesian2d"!==n.type&&"polar"!==n.type)i.push(e);else{var a=n.getBaseAxis();if("category"===a.type){var o=a.dim+"_"+a.index;t[o]||(t[o]={categoryAxis:a,valueAxis:n.getOtherAxis(a),series:[]},r.push({axisDim:a.dim,axisIndex:a.index})),t[o].series.push(e)}else i.push(e)}})),{seriesGroupByCategoryAxis:t,other:i,meta:r}}(e);return{value:n.filter([(t=r.seriesGroupByCategoryAxis,i=[],n.each(t,(function(e,t){var r=e.categoryAxis,a=e.valueAxis.dim,o=[" "].concat(n.map(e.series,(function(e){return e.name}))),s=[r.model.getCategories()];n.each(e.series,(function(e){var t=e.getRawData();s.push(e.getRawData().mapArray(t.mapDimension(a),(function(e){return e})))}));for(var l=[o.join("\t")],c=0;c<s[0].length;c++){for(var u=[],d=0;d<s.length;d++)u.push(s[d][c]);l.push(u.join("\t"))}i.push(l.join("\n"))})),i.join("\n\n"+c+"\n\n")),u(r.other)],(function(e){return e.replace(/[\n\t\s]/g,"")})).join("\n\n"+c+"\n\n"),meta:r.meta}}(e);if("function"==typeof f){var y=f(t.getOption());"string"==typeof y?d.innerHTML=y:n.isDom(y)&&d.appendChild(y)}else d.appendChild(h),h.readOnly=r.get("readOnly"),h.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=r.get("textColor"),h.style.borderColor=r.get("textareaBorderColor"),h.style.backgroundColor=r.get("textareaColor"),h.value=g.value;var _=g.meta,v=document.createElement("div");v.style.cssText="position:absolute;bottom:0;left:0;right:0;";var C="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",x=document.createElement("div"),b=document.createElement("div");C+=";background-color:"+r.get("buttonColor"),C+=";color:"+r.get("buttonTextColor");var S=this;function T(){i.removeChild(o),S._dom=null}a.addEventListener(x,"click",T),a.addEventListener(b,"click",(function(){var e;try{e="function"==typeof m?m(d,t.getOption()):p(h.value,_)}catch(e){throw T(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),T()})),x.innerHTML=l[1],b.innerHTML=l[2],b.style.cssText=C,x.style.cssText=C,!r.get("readOnly")&&v.appendChild(b),v.appendChild(x),o.appendChild(s),o.appendChild(d),o.appendChild(v),d.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},f.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},f.prototype.dispose=function(e,t){this.remove(e,t)},s.register("dataView",f),r.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var i=[];n.each(e.newOption.series,(function(e){var r=t.getSeriesByName(e.name)[0];if(r){var a=r.get("data");i.push({name:e.name,data:m(e.data,a)})}else i.push(n.extend({type:"scatter"},e))})),t.mergeOption(n.defaults({series:i},e.newOption))}));var g=f;e.exports=g},function(e,t,i){var r=i(1),n=i(0),a=i(121),o=i(213),s=i(214),l=i(55),c=i(34),u=i(37);i(507);var d=c.toolbox.dataZoom,h=n.each;function p(e,t,i){(this._brushController=new a(i.getZr())).on("brush",n.bind(this._onBrush,this)).mount(),this._isZoomActive}p.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:n.clone(d.title),brushStyle:{borderWidth:0,color:"rgba(0,0,0,0.2)"}};var f=p.prototype;f.render=function(e,t,i,r){this.model=e,this.ecModel=t,this.api=i,function(e,t,i,r,n){var a=i._isZoomActive;r&&"takeGlobalCursor"===r.type&&(a="dataZoomSelect"===r.key&&r.dataZoomSelectActive);i._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var s=new o(g(e.option),t,{include:["grid"]});i._brushController.setPanels(s.makePanelOpts(n,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!a&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,i),function(e,t){e.setIconStatus("back",s.count(t)>1?"emphasis":"normal")}(e,t)},f.onclick=function(e,t,i){m[i].call(this)},f.remove=function(e,t){this._brushController.unmount()},f.dispose=function(e,t){this._brushController.dispose()};var m={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(s.pop(this.ecModel))}};function g(e){var t={};return n.each(["xAxisIndex","yAxisIndex"],(function(i){t[i]=e[i],null==t[i]&&(t[i]="all"),(!1===t[i]||"none"===t[i])&&(t[i]=[])})),t}f._onBrush=function(e,t){if(t.isEnd&&e.length){var i={},r=this.ecModel;this._brushController.updateCovers([]),new o(g(this.model.option),r,{include:["grid"]}).matchOutputRanges(e,r,(function(e,t,i){if("cartesian2d"===i.type){var r=e.brushType;"rect"===r?(n("x",i,t[0]),n("y",i,t[1])):n({lineX:"x",lineY:"y"}[r],i,t)}})),s.push(r,i),this._dispatchZoomAction(i)}function n(e,t,n){var a=t.getAxis(e),o=a.model,s=function(e,t,i){var r;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(e,t.componentIndex)&&(r=i)})),r}(e,o,r),c=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==c.minValueSpan&&null==c.maxValueSpan||(n=l(0,n.slice(),a.scale.getExtent(),0,c.minValueSpan,c.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:n[0],endValue:n[1]})}},f._dispatchZoomAction=function(e){var t=[];h(e,(function(e,i){t.push(n.clone(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},u.register("dataZoom",p),r.registerPreprocessor((function(e){if(e){var t=e.dataZoom||(e.dataZoom=[]);n.isArray(t)||(e.dataZoom=t=[t]);var i=e.toolbox;if(i&&(n.isArray(i)&&(i=i[0]),i&&i.feature)){var r=i.feature.dataZoom;a("xAxis",r),a("yAxis",r)}}function a(i,r){if(r){var a=i+"Index",o=r[a];null==o||"all"===o||n.isArray(o)||(o=!1===o||"none"===o?[]:[o]),function(t,i){var r=e[t];n.isArray(r)||(r=r?[r]:[]);h(r,i)}(i,(function(e,s){if(null==o||"all"===o||-1!==n.indexOf(o,s)){var l={type:"select",$fromToolbox:!0,filterMode:r.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+s};l[a]=s,t.push(l)}}))}}}));var y=p;e.exports=y},function(e,t,i){i(124),i(56),i(57),i(509),i(510),i(126),i(127)},function(e,t,i){var r=i(0),n=i(3),a=i(125),o=i(55),s=r.each,l=n.asc,c=function(e,t,i,r){this._dimName=e,this._axisIndex=t,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=r,this._dataZoomModel=i};function u(e,t){var i=e.getAxisModel(),r=e._percentWindow,a=e._valueWindow;if(r){var o=n.getPixelPrecision(a,[0,500]);o=Math.min(o,20);var s=t||0===r[0]&&100===r[1];i.setRange(s?null:+a[0].toFixed(o),s?null:+a[1].toFixed(o))}}c.prototype={constructor:c,hostedBy:function(e){return this._dataZoomModel===e},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var e=[],t=this.ecModel;return t.eachSeries((function(i){if(a.isCoordSupported(i.get("coordinateSystem"))){var r=this._dimName,n=t.queryComponents({mainType:r+"Axis",index:i.get(r+"AxisIndex"),id:i.get(r+"AxisId")})[0];this._axisIndex===(n&&n.componentIndex)&&e.push(i)}}),this),e},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,t,i,r=this._dimName,n=this.ecModel,a=this.getAxisModel();return"x"===r||"y"===r?(t="gridIndex",e="x"===r?"y":"x"):(t="polarIndex",e="angle"===r?"radius":"angle"),n.eachComponent(e+"Axis",(function(e){(e.get(t)||0)===(a.get(t)||0)&&(i=e)})),i},getMinMaxSpan:function(){return r.clone(this._minMaxSpan)},calculateDataWindow:function(e){var t,i=this._dataExtent,r=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),c=[0,100],u=[],d=[];s(["start","end"],(function(o,s){var l=e[o],h=e[o+"Value"];"percent"===a[s]?(null==l&&(l=c[s]),h=r.parse(n.linearMap(l,c,i))):(t=!0,h=null==h?i[s]:r.parse(h),l=n.linearMap(h,i,c)),d[s]=h,u[s]=l})),l(d),l(u);var h=this._minMaxSpan;function p(e,t,i,a,s){var l=s?"Span":"ValueSpan";o(0,e,i,"all",h["min"+l],h["max"+l]);for(var c=0;c<2;c++)t[c]=n.linearMap(e[c],i,a,!0),s&&(t[c]=r.parse(t[c]))}return t?p(d,u,i,c,!1):p(u,d,c,i,!0),{valueWindow:d,percentWindow:u}},reset:function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,i){var r=[1/0,-1/0];s(i,(function(e){var i=e.getData();i&&s(i.mapDimension(t,!0),(function(e){var t=i.getApproximateExtent(e);t[0]<r[0]&&(r[0]=t[0]),t[1]>r[1]&&(r[1]=t[1])}))})),r[1]<r[0]&&(r=[NaN,NaN]);return function(e,t){var i=e.getAxisModel(),r=i.getMin(!0),n="category"===i.get("type"),a=n&&i.getCategories().length;null!=r&&"dataMin"!==r&&"function"!=typeof r?t[0]=r:n&&(t[0]=a>0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?t[1]=o:n&&(t[1]=a>0?a-1:NaN);i.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0))}(e,r),r}(this,this._dimName,t),function(e){var t=e._minMaxSpan={},i=e._dataZoomModel,r=e._dataExtent;s(["min","max"],(function(a){var o=i.get(a+"Span"),s=i.get(a+"ValueSpan");null!=s&&(s=e.getAxisModel().axis.scale.parse(s)),null!=s?o=n.linearMap(r[0]+s,r,[0,100],!0):null!=o&&(s=n.linearMap(o,[0,100],r,!0)-r[0]),t[a+"Span"]=o,t[a+"ValueSpan"]=s}))}(this);var i=this.calculateDataWindow(e.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,u(this)}},restore:function(e){e===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,u(this,!0))},filterData:function(e,t){if(e===this._dataZoomModel){var i=this._dimName,r=this.getTargetSeriesModels(),n=e.get("filterMode"),a=this._valueWindow;"none"!==n&&s(r,(function(e){var t=e.getData(),r=t.mapDimension(i,!0);r.length&&("weakFilter"===n?t.filterSelf((function(e){for(var i,n,o,s=0;s<r.length;s++){var l=t.get(r[s],e),c=!isNaN(l),u=l<a[0],d=l>a[1];if(c&&!u&&!d)return!0;c&&(o=!0),u&&(i=!0),d&&(n=!0)}return o&&i&&n})):s(r,(function(i){if("empty"===n)e.setData(t=t.map(i,(function(e){return function(e){return e>=a[0]&&e<=a[1]}(e)?e:NaN})));else{var r={};r[i]=a,t.selectRange(r)}})),s(r,(function(e){t.setApproximateExtent(a,e)})))}))}}};var d=c;e.exports=d},function(e,t,i){var r=i(56).extend({type:"dataZoom.select"});e.exports=r},function(e,t,i){var r=i(57).extend({type:"dataZoom.select"});e.exports=r},function(e,t,i){var r=i(1),n=i(214),a=i(34),o=i(37),s=a.toolbox.restore;function l(e){this.model=e}l.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:s.title},l.prototype.onclick=function(e,t,i){n.clear(e),t.dispatchAction({type:"restore",from:this.uid})},o.register("restore",l),r.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));var c=l;e.exports=c},function(e,t,i){var r=i(1);i(74),i(513),i(514),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}))},function(e,t,i){var r=i(1).extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});e.exports=r},function(e,t,i){var r=i(1),n=i(0),a=i(11),o=i(515),s=i(516),l=i(7),c=i(3),u=i(2),d=i(209),h=i(6),p=i(12),f=i(210),m=i(21),g=i(95),y=i(4).getTooltipRenderMode,_=n.bind,v=n.each,C=c.parsePercent,x=new u.Rect({shape:{x:-1,y:-1,width:2,height:2}}),b=r.extendComponentView({type:"tooltip",init:function(e,t){if(!a.node){var i,r=e.getComponent("tooltip"),n=r.get("renderMode");this._renderMode=y(n),"html"===this._renderMode?(i=new o(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new s(t),this._newLine="\n"),this._tooltipContent=i}},render:function(e,t,i){if(!a.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=e.get("alwaysShowContent");var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var e=this._tooltipModel.get("triggerOn");f.register("itemTooltip",this._api,_((function(t,i,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,r):"leave"===t&&this._hide(r))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&r.manuallyShowTip(e,t,i,{x:r._lastX,y:r._lastY})}))}},manuallyShowTip:function(e,t,i,r){if(r.from!==this.uid&&!a.node){var n=T(r,i);this._ticket="";var o=r.dataByCoordSys;if(r.tooltip&&null!=r.x&&null!=r.y){var s=x;s.position=[r.x,r.y],s.update(),s.tooltip=r.tooltip,this._tryShow({offsetX:r.x,offsetY:r.y,target:s},n)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:r.dataByCoordSys,tooltipOption:r.tooltipOption},n);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,i,r))return;var l=d(r,t),c=l.point[0],u=l.point[1];null!=c&&null!=u&&this._tryShow({offsetX:c,offsetY:u,position:r.position,target:l.el},n)}else null!=r.x&&null!=r.y&&(i.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:i.getZr().findHover(r.x,r.y).target},n))}},manuallyHideTip:function(e,t,i,r){var n=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&n.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,r.from!==this.uid&&this._hide(T(r,i))},_manuallyAxisShowTip:function(e,t,i,r){var n=r.seriesIndex,a=r.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=n&&null!=a&&null!=o){var s=t.getSeriesByIndex(n);if(s)if("axis"===(e=S([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:n,dataIndex:a,position:r.position}),!0}},_tryShow:function(e,t){var i=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,e):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,i,t)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,i,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var i=e.get("showDelay");t=n.bind(t,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(t,i):t()},_showAxisTooltip:function(e,t){var i=this._ecModel,r=this._tooltipModel,a=[t.offsetX,t.offsetY],o=[],s=[],c=S([t.tooltipOption,r]),u=this._renderMode,d=this._newLine,h={};v(e,(function(e){v(e.dataByAxis,(function(e){var t=i.getComponent(e.axisDim+"Axis",e.axisIndex),r=e.value,a=[];if(t&&null!=r){var c=g.getValueLabel(r,t.axis,i,e.seriesDataIndices,e.valueLabelOpt);n.each(e.seriesDataIndices,(function(o){var l=i.getSeriesByIndex(o.seriesIndex),d=o.dataIndexInside,p=l&&l.getDataParams(d);if(p.axisDim=e.axisDim,p.axisIndex=e.axisIndex,p.axisType=e.axisType,p.axisId=e.axisId,p.axisValue=m.getAxisRawValue(t.axis,r),p.axisValueLabel=c,p){s.push(p);var f,g=l.formatTooltip(d,!0,null,u);if(n.isObject(g)){f=g.html;var y=g.markers;n.merge(h,y)}else f=g;a.push(f)}}));var p=c;"html"!==u?o.push(a.join(d)):o.push((p?l.encodeHTML(p)+d:"")+a.join(d))}}))}),this),o.reverse(),o=o.join(this._newLine+this._newLine);var p=t.position;this._showOrMove(c,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(c,p,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(c,o,s,Math.random(),a[0],a[1],p,void 0,h)}))},_showSeriesItemTooltip:function(e,t,i){var r=this._ecModel,a=t.seriesIndex,o=r.getSeriesByIndex(a),s=t.dataModel||o,l=t.dataIndex,c=t.dataType,u=s.getData(c),d=S([u.getItemModel(l),s,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),h=d.get("trigger");if(null==h||"item"===h){var p,f,m=s.getDataParams(l,c),g=s.formatTooltip(l,!1,c,this._renderMode);n.isObject(g)?(p=g.html,f=g.markers):(p=g,f=null);var y="item_"+s.name+"_"+l;this._showOrMove(d,(function(){this._showTooltipContent(d,p,m,y,e.offsetX,e.offsetY,e.position,e.target,f)})),i({type:"showTip",dataIndexInside:l,dataIndex:u.getRawIndex(l),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(e,t,i){var r=t.tooltip;if("string"==typeof r){r={content:r,formatter:r}}var n=new p(r,this._tooltipModel,this._ecModel),a=n.get("content"),o=Math.random();this._showOrMove(n,(function(){this._showTooltipContent(n,a,n.get("formatterParams")||{},o,e.offsetX,e.offsetY,e.position,t)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,i,r,n,a,o,s,c){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,d=e.get("formatter");o=o||e.get("position");var h=t;if(d&&"string"==typeof d)h=l.formatTpl(d,i,!0);else if("function"==typeof d){var p=_((function(t,r){t===this._ticket&&(u.setContent(r,c,e),this._updatePosition(e,o,n,a,u,i,s))}),this);this._ticket=r,h=d(i,r,p)}u.setContent(h,c,e),u.show(e),this._updatePosition(e,o,n,a,u,i,s)}},_updatePosition:function(e,t,i,r,a,o,s){var l=this._api.getWidth(),c=this._api.getHeight();t=t||e.get("position");var u=a.getSize(),d=e.get("align"),p=e.get("verticalAlign"),f=s&&s.getBoundingRect().clone();if(s&&f.applyTransform(s.transform),"function"==typeof t&&(t=t([i,r],o,a.el,f,{viewSize:[l,c],contentSize:u.slice()})),n.isArray(t))i=C(t[0],l),r=C(t[1],c);else if(n.isObject(t)){t.width=u[0],t.height=u[1];var m=h.getLayoutRect(t,{width:l,height:c});i=m.x,r=m.y,d=null,p=null}else if("string"==typeof t&&s){var g=function(e,t,i){var r=i[0],n=i[1],a=0,o=0,s=t.width,l=t.height;switch(e){case"inside":a=t.x+s/2-r/2,o=t.y+l/2-n/2;break;case"top":a=t.x+s/2-r/2,o=t.y-n-5;break;case"bottom":a=t.x+s/2-r/2,o=t.y+l+5;break;case"left":a=t.x-r-5,o=t.y+l/2-n/2;break;case"right":a=t.x+s+5,o=t.y+l/2-n/2}return[a,o]}(t,f,u);i=g[0],r=g[1]}else{g=function(e,t,i,r,n,a,o){var s=i.getOuterSize(),l=s.width,c=s.height;null!=a&&(e+l+a>r?e-=l+a:e+=a);null!=o&&(t+c+o>n?t-=c+o:t+=o);return[e,t]}(i,r,a,l,c,d?null:20,p?null:20);i=g[0],r=g[1]}if(d&&(i-=E(d)?u[0]/2:"right"===d?u[0]:0),p&&(r-=E(p)?u[1]/2:"bottom"===p?u[1]:0),e.get("confine")){g=function(e,t,i,r,n){var a=i.getOuterSize(),o=a.width,s=a.height;return e=Math.min(e+o,r)-o,t=Math.min(t+s,n)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(i,r,a,l,c);i=g[0],r=g[1]}a.moveTo(i,r)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,i=!!t&&t.length===e.length;return i&&v(t,(function(t,r){var n=t.dataByAxis||{},a=(e[r]||{}).dataByAxis||[];(i&=n.length===a.length)&&v(n,(function(e,t){var r=a[t]||{},n=e.seriesDataIndices||[],o=r.seriesDataIndices||[];(i&=e.value===r.value&&e.axisType===r.axisType&&e.axisId===r.axisId&&n.length===o.length)&&v(n,(function(e,t){var r=o[t];i&=e.seriesIndex===r.seriesIndex&&e.dataIndex===r.dataIndex}))}))})),this._lastDataByCoordSys=e,!!i},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){a.node||(this._tooltipContent.dispose(),f.unregister("itemTooltip",t))}});function S(e){for(var t=e.pop();e.length;){var i=e.pop();i&&(p.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),t=new p(i,t,t.ecModel))}return t}function T(e,t){return e.dispatchAction||n.bind(t.dispatchAction,t)}function E(e){return"center"===e||"middle"===e}e.exports=b},function(e,t,i){var r=i(0),n=i(23),a=i(22),o=i(148),s=i(11),l=i(7),c=r.each,u=l.toCamelCase,d=["","-webkit-","-moz-","-o-"];function h(e){var t,i,a=[],o=e.get("transitionDuration"),h=e.get("backgroundColor"),p=e.getModel("textStyle"),f=e.get("padding");return o&&a.push((i="left "+(t=o)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)",r.map(d,(function(e){return e+"transition:"+i})).join(";"))),h&&(s.canvasSupported?a.push("background-Color:"+h):(a.push("background-Color:#"+n.toHex(h)),a.push("filter:alpha(opacity=70)"))),c(["width","color","radius"],(function(t){var i="border-"+t,r=u(i),n=e.get(r);null!=n&&a.push(i+":"+n+("color"===t?"":"px"))})),a.push(function(e){var t=[],i=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont());var n=e.get("lineHeight");null==n&&(n=Math.round(3*i/2)),i&&t.push("line-height:"+n+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),c(["decoration","align"],(function(i){var r=e.get(i);r&&t.push("text-"+i+":"+r)})),t.join(";")}(p)),null!=f&&a.push("padding:"+l.normalizeCssArray(f).join("px ")+"px"),a.join(";")+";"}function p(e,t,i,r,n){var a=t&&t.painter;if(i){var s=a&&a.getViewportRoot();s&&o.transformLocalCoord(e,s,document.body,r,n)}else{e[0]=r,e[1]=n;var l=a&&a.getViewportRootOffset();l&&(e[0]+=l.offsetLeft,e[1]+=l.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}function f(e,t,i){if(s.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var n=this._zr=t.getZr(),o=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],p(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e,this._show=!1,this._hideTimeout;var l=this;r.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!l._enterable){var t=n.handler,i=n.painter.getViewportRoot();a.normalizeEvent(i,e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1}}f.prototype={constructor:f,_enterable:!0,update:function(e){var t=this._container,i=t.currentStyle||document.defaultView.getComputedStyle(t),r=t.style;"absolute"!==r.position&&"absolute"!==i.position&&(r.position="relative"),e.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var e=this._styleCoord[2],t=this._styleCoord[3],i=e*this._zr.getWidth(),r=t*this._zr.getHeight();this.moveTo(i,r)},show:function(e){clearTimeout(this._hideTimeout);var t=this.el,i=this._styleCoord;t.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+h(e)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(e.get("extraCssText")||""),t.style.display=t.innerHTML?"block":"none",t.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(e){this.el.innerHTML=null==e?"":e},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el;return[e.clientWidth,e.clientHeight]},moveTo:function(e,t){var i=this._styleCoord;p(i,this._zr,this._appendToBody,e,t);var r=this.el.style;r.left=i[0]+"px",r.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(r.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var e=this.el.clientWidth,t=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(e+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),t+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:t}}};var m=f;e.exports=m},function(e,t,i){var r=i(0),n=i(41),a=i(2);function o(e,t,i,r){e[0]=i,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}function s(e){var t=this._zr=e.getZr();this._styleCoord=[0,0,0,0],o(this._styleCoord,t,e.getWidth()/2,e.getHeight()/2),this._show=!1,this._hideTimeout}s.prototype={constructor:s,_enterable:!0,update:function(e){e.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var e=this._styleCoord[2],t=this._styleCoord[3],i=e*this._zr.getWidth(),r=t*this._zr.getHeight();this.moveTo(i,r)},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,i){this.el&&this._zr.remove(this.el);for(var r={},o=e,s=o.indexOf("{marker");s>=0;){var l=o.indexOf("|}"),c=o.substr(s+"{marker".length,l-s-"{marker".length);c.indexOf("sub")>-1?r["marker"+c]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[c],textOffset:[3,0]}:r["marker"+c]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[c]},s=(o=o.substr(l+1)).indexOf("{marker")}var u=i.getModel("textStyle"),d=u.get("fontSize"),h=i.get("textLineHeight");null==h&&(h=Math.round(3*d/2)),this.el=new n({style:a.setTextStyle({},u,{rich:r,text:e,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding"),textLineHeight:h}),z:i.get("z")}),this._zr.add(this.el);var p=this;this.el.on("mouseover",(function(){p._enterable&&(clearTimeout(p._hideTimeout),p._show=!0),p._inContent=!0})),this.el.on("mouseout",(function(){p._enterable&&p._show&&p.hideLater(p._hideDelay),p._inContent=!1}))},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el.getBoundingRect();return[e.width,e.height]},moveTo:function(e,t){if(this.el){var i=this._styleCoord;o(i,this._zr,e,t),this.el.attr("position",[i[0],i[1]])}},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(r.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var e=this.getSize();return{width:e[0],height:e[1]}}};var l=s;e.exports=l},function(e,t,i){var r=i(1),n=i(518);i(215),i(520),i(521),i(522),i(523),r.registerPreprocessor(n)},function(e,t,i){var r=i(0),n=["rect","polygon","keep","clear"];e.exports=function(e,t){var i=e&&e.brush;if(r.isArray(i)||(i=i?[i]:[]),i.length){var a=[];r.each(i,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(a=a.concat(t))}));var o=e&&e.toolbox;r.isArray(o)&&(o=o[0]),o||(o={feature:{}},e.toolbox=[o]);var s,l,c=o.feature||(o.feature={}),u=c.brush||(c.brush={}),d=u.type||(u.type=[]);d.push.apply(d,a),s=d,l={},r.each(s,(function(e){l[e]=1})),s.length=0,r.each(l,(function(e,t){s.push(t)})),t&&!d.length&&d.push.apply(d,n)}}},function(e,t,i){var r=i(181),n=i(9),a=i(2).linePolygonIntersect;function o(e){var t=["x","y"],i=["width","height"];return{point:function(t,i,r){if(t){var n=r.range;return s(t[e],n)}},rect:function(r,n,a){if(r){var o=a.range,l=[r[t[e]],r[t[e]]+r[i[e]]];return l[1]<l[0]&&l.reverse(),s(l[0],o)||s(l[1],o)||s(o[0],l)||s(o[1],l)}}}}function s(e,t){return t[0]<=e&&e<=t[1]}var l={lineX:o(0),lineY:o(1),rect:{point:function(e,t,i){return e&&i.boundingRect.contain(e[0],e[1])},rect:function(e,t,i){return e&&i.boundingRect.intersect(e)}},polygon:{point:function(e,t,i){return e&&i.boundingRect.contain(e[0],e[1])&&r.contain(i.range,e[0],e[1])},rect:function(e,t,i){var o=i.range;if(!e||o.length<=1)return!1;var s=e.x,l=e.y,c=e.width,u=e.height,d=o[0];return!!(r.contain(o,s,l)||r.contain(o,s+c,l)||r.contain(o,s,l+u)||r.contain(o,s+c,l+u)||n.create(e).contain(d[0],d[1])||a(s,l,s+c,l,o)||a(s,l,s,l+u,o)||a(s+c,l,s+c,l+u,o)||a(s,l+u,s+c,l+u,o))||void 0}}};e.exports=l},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(96),o=i(12),s=["#ddd"];function l(e,t){return n.merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new o(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var c=r.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(e,t){var i=this.option;!t&&a.replaceVisualOption(i,e,["inBrush","outOfBrush"]);var r=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:s},r.hasOwnProperty("liftZ")||(r.liftZ=5)},setAreas:function(e){e&&(this.areas=n.map(e,(function(e){return l(this.option,e)}),this))},setBrushOption:function(e){this.brushOption=l(this.option,e),this.brushType=this.brushOption.brushType}});e.exports=c},function(e,t,i){var r=i(1),n=i(0),a=i(121),o=i(215).layoutCovers,s=r.extendComponentView({type:"brush",init:function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new a(t.getZr())).on("brush",n.bind(this._onBrush,this)).mount()},render:function(e){return this.model=e,l.apply(this,arguments)},updateTransform:function(e,t){return o(t),l.apply(this,arguments)},updateView:l,dispose:function(){this._brushController.dispose()},_onBrush:function(e,t){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(e,this.ecModel),(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n.clone(e),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:n.clone(e),$from:i})}});function l(e,t,i,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}e.exports=s},function(e,t,i){var r=i(1);r.registerAction({type:"brush",event:"brush"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}))},function(e,t,i){var r=i(0),n=i(37),a=i(34).toolbox.brush;function o(e,t,i){this.model=e,this.ecModel=t,this.api=i,this._brushType,this._brushMode}o.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.clone(a.title)};var s=o.prototype;s.render=s.updateView=function(e,t,i){var n,a,o;t.eachComponent({mainType:"brush"},(function(e){n=e.brushType,a=e.brushOption.brushMode||"single",o|=e.areas.length})),this._brushType=n,this._brushMode=a,r.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?o:t===n)?"emphasis":"normal")}))},s.getIcons=function(){var e=this.model,t=e.get("icon",!0),i={};return r.each(e.get("type",!0),(function(e){t[e]&&(i[e]=t[e])})),i},s.onclick=function(e,t,i){var r=this._brushType,n=this._brushMode;"clear"===i?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?r:r!==i&&i,brushMode:"keep"===i?"multiple"===n?"single":"multiple":n}})},n.register("brush",o);var l=o;e.exports=l},function(e,t,i){var r=i(0),n=i(1),a=i(2),o=i(6).getLayoutRect,s=i(7).windowOpen;n.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),n.extendComponentView({type:"title",render:function(e,t,i){if(this.group.removeAll(),e.get("show")){var n=this.group,l=e.getModel("textStyle"),c=e.getModel("subtextStyle"),u=e.get("textAlign"),d=r.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),h=new a.Text({style:a.setTextStyle({},l,{text:e.get("text"),textFill:l.getTextColor()},{disableBox:!0}),z2:10}),p=h.getBoundingRect(),f=e.get("subtext"),m=new a.Text({style:a.setTextStyle({},c,{text:f,textFill:c.getTextColor(),y:p.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),g=e.get("link"),y=e.get("sublink"),_=e.get("triggerEvent",!0);h.silent=!g&&!_,m.silent=!y&&!_,g&&h.on("click",(function(){s(g,"_"+e.get("target"))})),y&&m.on("click",(function(){s(y,"_"+e.get("subtarget"))})),h.eventData=m.eventData=_?{componentType:"title",componentIndex:e.componentIndex}:null,n.add(h),f&&n.add(m);var v=n.getBoundingRect(),C=e.getBoxLayoutParams();C.width=v.width,C.height=v.height;var x=o(C,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));u||("middle"===(u=e.get("left")||e.get("right"))&&(u="center"),"right"===u?x.x+=x.width:"center"===u&&(x.x+=x.width/2)),d||("center"===(d=e.get("top")||e.get("bottom"))&&(d="middle"),"bottom"===d?x.y+=x.height:"middle"===d&&(x.y+=x.height/2),d=d||"top"),n.attr("position",[x.x,x.y]);var b={textAlign:u,textVerticalAlign:d};h.setStyle(b),m.setStyle(b),v=n.getBoundingRect();var S=x.margin,T=e.getItemStyle(["color","opacity"]);T.fill=e.get("backgroundColor");var E=new a.Rect({shape:{x:v.x-S[3],y:v.y-S[0],width:v.width+S[1]+S[3],height:v.height+S[0]+S[2],r:e.get("borderRadius")},style:T,subPixelOptimize:!0,silent:!0});n.add(E)}}})},function(e,t,i){var r=i(1),n=i(526);i(527),i(528),i(529),i(531),r.registerPreprocessor(n)},function(e,t,i){var r=i(0);function n(e){var t=e.itemStyle||(e.itemStyle={}),i=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},o=n.normal||(n.normal={}),s={normal:1,emphasis:1};r.each(n,(function(e,t){s[t]||a(o,t)||(o[t]=e)})),i.label&&!a(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function a(e,t){return e.hasOwnProperty(t)}e.exports=function(e){var t=e&&e.timeline;r.isArray(t)||(t=t?[t]:[]),r.each(t,(function(e){e&&function(e){var t=e.type,i={number:"value",time:"time"};i[t]&&(e.axisType=i[t],delete e.type);if(n(e),a(e,"controlPosition")){var o=e.controlStyle||(e.controlStyle={});a(o,"position")||(o.position=e.controlPosition),"none"!==o.position||a(o,"show")||(o.show=!1,delete o.position),delete e.controlPosition}r.each(e.data||[],(function(e){r.isObject(e)&&!r.isArray(e)&&(!a(e,"value")&&a(e,"name")&&(e.value=e.name),n(e))}))}(e)}))}},function(e,t,i){i(13).registerSubTypeDefaulter("timeline",(function(){return"slider"}))},function(e,t,i){var r=i(1),n=i(0);r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t){var i=t.getComponent("timeline");return i&&null!=e.currentIndex&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),t.resetOption("timeline"),n.defaults({currentIndex:i.option.currentIndex},e)})),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var i=t.getComponent("timeline");i&&null!=e.playState&&i.setPlayState(e.playState)}))},function(e,t,i){var r=i(0),n=i(530),a=i(107),o=n.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});r.mixin(o,a);var s=o;e.exports=s},function(e,t,i){var r=i(0),n=i(13),a=i(18),o=i(4),s=n.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(e,t,i){this._data,this._names,this.mergeDefaultAndTheme(e,i),this._initData()},mergeOption:function(e){s.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(e){this.option.autoPlay=!!e},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var e=this.option,t=e.data||[],i=e.axisType,n=this._names=[];if("category"===i){var s=[];r.each(t,(function(e,t){var i,a=o.getDataItemValue(e);r.isObject(e)?(i=r.clone(e)).value=t:i=t,s.push(i),r.isString(a)||null!=a&&!isNaN(a)||(a=""),n.push(a+"")})),t=s}var l={category:"ordinal",time:"time"}[i]||"number";(this._data=new a([{name:"value",type:l}],this)).initData(t,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),l=s;e.exports=l},function(e,t,i){var r=i(0),n=i(9),a=i(15),o=i(2),s=i(6),l=i(532),c=i(533),u=i(19).createSymbol,d=i(21),h=i(3),p=i(7).encodeHTML,f=r.bind,m=r.each,g=Math.PI,y=l.extend({type:"timeline.slider",init:function(e,t){this.api=t,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,r){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var n=this._layout(e,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(n,e);e.formatTooltip=function(e){return p(s.scale.getLabel(e))},m(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](n,a,s,e)}),this),this._renderAxisLabel(n,o,s,e),this._position(n,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(e,t){var i=e.get("label.position"),r=e.get("orient"),n=function(e,t){return s.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t);null==i||"auto"===i?i="horizontal"===r?n.y+n.height/2<t.getHeight()/2?"-":"+":n.x+n.width/2<t.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[r][i]);var a,o,l,c,u={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},d={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:g/2},p="vertical"===r?n.height:n.width,f=e.getModel("controlStyle"),m=f.get("show",!0),y=m?f.get("itemSize"):0,_=m?f.get("itemGap"):0,v=y+_,C=e.get("label.rotate")||0;C=C*g/180;var x=f.get("position",!0),b=m&&f.get("showPlayBtn",!0),S=m&&f.get("showPrevBtn",!0),T=m&&f.get("showNextBtn",!0),E=0,w=p;return"left"===x||"bottom"===x?(b&&(a=[0,0],E+=v),S&&(o=[E,0],E+=v),T&&(l=[w-y,0],w-=v)):(b&&(a=[w-y,0],w-=v),S&&(o=[0,0],E+=v),T&&(l=[w-y,0],w-=v)),c=[E,w],e.get("inverse")&&c.reverse(),{viewRect:n,mainLength:p,orient:r,rotation:h[r],labelRotation:C,labelPosOpt:i,labelAlign:e.get("label.align")||u[r],labelBaseline:e.get("label.verticalAlign")||e.get("label.baseline")||d[r],playPosition:a,prevBtnPosition:o,nextBtnPosition:l,axisExtent:c,controlSize:y,controlGap:_}},_position:function(e,t){var i=this._mainGroup,r=this._labelGroup,n=e.viewRect;if("vertical"===e.orient){var o=a.create(),s=n.x,l=n.y+n.height;a.translate(o,o,[-s,-l]),a.rotate(o,o,-g/2),a.translate(o,o,[s,l]),(n=n.clone()).applyTransform(o)}var c=_(n),u=_(i.getBoundingRect()),d=_(r.getBoundingRect()),h=i.position,p=r.position;p[0]=h[0]=c[0][0];var f,m=e.labelPosOpt;isNaN(m)?(v(h,u,c,1,f="+"===m?0:1),v(p,d,c,1,1-f)):(v(h,u,c,1,f=m>=0?0:1),p[1]=h[1]+m);function y(e){var t=e.position;e.origin=[c[0][0]-t[0],c[1][0]-t[1]]}function _(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,i,r,n){e[r]+=i[r][n]-t[r][n]}i.attr("position",h),r.attr("position",p),i.rotation=r.rotation=e.rotation,y(i),y(r)},_createAxis:function(e,t){var i=t.getData(),r=t.get("axisType"),n=d.createScaleByModel(t,r);n.getTicks=function(){return i.mapArray(["value"],(function(e){return e}))};var a=i.getDataExtent("value");n.setExtent(a[0],a[1]),n.niceTicks();var o=new c("value",n,e.axisExtent,r);return o.model=t,o},_createGroup:function(e){var t=this["_"+e]=new o.Group;return this.group.add(t),t},_renderAxisLine:function(e,t,i,n){var a=i.getExtent();n.get("lineStyle.show")&&t.add(new o.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(e,t,i,r){var n=r.getData(),a=i.scale.getTicks();m(a,(function(e){var a=i.dataToCoord(e),s=n.getItemModel(e),l=s.getModel("itemStyle"),c=s.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:f(this._changeTimeline,this,e)},d=_(s,l,t,u);o.setHoverStyle(d,c.getItemStyle()),s.get("tooltip")?(d.dataIndex=e,d.dataModel=r):d.dataIndex=d.dataModel=null}),this)},_renderAxisLabel:function(e,t,i,r){if(i.getLabelModel().get("show")){var n=r.getData(),a=i.getViewLabels();m(a,(function(r){var a=r.tickValue,s=n.getItemModel(a),l=s.getModel("label"),c=s.getModel("emphasis.label"),u=i.dataToCoord(r.tickValue),d=new o.Text({position:[u,0],rotation:e.labelRotation-e.rotation,onclick:f(this._changeTimeline,this,a),silent:!1});o.setTextStyle(d.style,l,{text:r.formattedLabel,textAlign:e.labelAlign,textVerticalAlign:e.labelBaseline}),t.add(d),o.setHoverStyle(d,o.setTextStyle({},c))}),this)}},_renderControl:function(e,t,i,r){var a=e.controlSize,s=e.rotation,l=r.getModel("controlStyle").getItemStyle(),c=r.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-a/2,a,a],d=r.getPlayState(),h=r.get("inverse",!0);function p(e,i,d,h){if(e){var p=function(e,t,i,r){var a=r.style,s=o.createIcon(e.get(t),r||{},new n(i[0],i[1],i[2],i[3]));a&&s.setStyle(a);return s}(r,i,u,{position:e,origin:[a/2,0],rotation:h?-s:0,rectHover:!0,style:l,onclick:d});t.add(p),o.setHoverStyle(p,c)}}p(e.nextBtnPosition,"controlStyle.nextIcon",f(this._changeTimeline,this,h?"-":"+")),p(e.prevBtnPosition,"controlStyle.prevIcon",f(this._changeTimeline,this,h?"+":"-")),p(e.playPosition,"controlStyle."+(d?"stopIcon":"playIcon"),f(this._handlePlayClick,this,!d),!0)},_renderCurrentPointer:function(e,t,i,r){var n=r.getData(),a=r.getCurrentIndex(),o=n.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=f(s._handlePointerDrag,s),e.ondragend=f(s._handlePointerDragend,s),v(e,a,i,r,!0)},onUpdate:function(e){v(e,a,i,r)}};this._currentPointer=_(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},_handlePointerDrag:function(e,t,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},_pointerChangeTimeline:function(e,t){var i=this._toAxisCoord(e)[0],r=this._axis,n=h.asc(r.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var a=this._findNearestTick(i),o=this.model;(t||a!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(a)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(f((function(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(e){var t=this._mainGroup.getLocalTransform();return o.applyTransform(e,t,!0)},_findNearestTick:function(e){var t,i=this.model.getData(),r=1/0,n=this._axis;return i.each(["value"],(function(i,a){var o=n.dataToCoord(i),s=Math.abs(o-e);s<r&&(r=s,t=a)})),t},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})}});function _(e,t,i,n,a,o){var s=t.get("color");if(a)a.setColor(s),i.add(a),o&&o.onUpdate(a);else{var l=e.get("symbol");(a=u(l,-1,-1,2,2,s)).setStyle("strokeNoScale",!0),i.add(a),o&&o.onCreate(a)}var c=t.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(c),n=r.merge({rectHover:!0,z2:100},n,!0);var d=e.get("symbolSize");(d=d instanceof Array?d.slice():[+d,+d])[0]/=2,d[1]/=2,n.scale=d;var p=e.get("symbolOffset");if(p){var f=n.position=n.position||[0,0];f[0]+=h.parsePercent(p[0],d[0]),f[1]+=h.parsePercent(p[1],d[1])}var m=e.get("symbolRotate");return n.rotation=(m||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function v(e,t,i,r,n){if(!e.dragging){var a=r.getModel("checkpointStyle"),o=i.dataToCoord(r.getData().get(["value"],t));n||!a.get("animation",!0)?e.attr({position:[o,0]}):(e.stopAnimation(!0),e.animateTo({position:[o,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}e.exports=y},function(e,t,i){var r=i(84).extend({type:"timeline"});e.exports=r},function(e,t,i){var r=i(0),n=i(35),a=function(e,t,i,r){n.call(this,e,t,i),this.type=r||"value",this.model=null};a.prototype={constructor:a,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(1);i(535),i(536),r.registerPreprocessor((function(e){e.markPoint=e.markPoint||{}}))},function(e,t,i){var r=i(128).extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});e.exports=r},function(e,t,i){var r=i(0),n=i(67),a=i(3),o=i(18),s=i(129);function l(e,t,i){var r=t.coordinateSystem;e.each((function(n){var o,s=e.getItemModel(n),l=a.parsePercent(s.get("x"),i.getWidth()),c=a.parsePercent(s.get("y"),i.getHeight());if(isNaN(l)||isNaN(c)){if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var u=e.get(r.dimensions[0],n),d=e.get(r.dimensions[1],n);o=r.dataToPoint([u,d])}}else o=[l,c];isNaN(l)||(o[0]=l),isNaN(c)||(o[1]=c),e.setItemLayout(n,o)}))}var c=i(130).extend({type:"markPoint",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markPointModel;t&&(l(t.getData(),e,i),this.markerGroupMap.get(e.id).updateLayout(t))}),this)},renderSeries:function(e,t,i,a){var c=e.coordinateSystem,u=e.id,d=e.getData(),h=this.markerGroupMap,p=h.get(u)||h.set(u,new n),f=function(e,t,i){var n;n=e?r.map(e&&e.dimensions,(function(e){var i=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return r.defaults({name:e},i)})):[{name:"value",type:"float"}];var a=new o(n,i),l=r.map(i.get("data"),r.curry(s.dataTransform,t));e&&(l=r.filter(l,r.curry(s.dataFilter,e)));return a.initData(l,null,e?s.dimValueGetter:function(e){return e.value}),a}(c,e,t);t.setData(f),l(t.getData(),e,a),f.each((function(e){var i=f.getItemModel(e),n=i.getShallow("symbol"),a=i.getShallow("symbolSize"),o=i.getShallow("symbolRotate"),s=r.isFunction(n),l=r.isFunction(a),c=r.isFunction(o);if(s||l||c){var u=t.getRawValue(e),h=t.getDataParams(e);s&&(n=n(u,h)),l&&(a=a(u,h)),c&&(o=o(u,h))}f.setItemVisual(e,{symbol:n,symbolSize:a,symbolRotate:o,color:i.get("itemStyle.color")||d.getVisual("color")})})),p.updateData(f),this.group.add(p.group),f.eachItemGraphicEl((function(e){e.traverse((function(e){e.dataModel=t}))})),p.__keep=!0,p.group.silent=t.get("silent")||e.get("silent")}});e.exports=c},function(e,t,i){var r=i(1);i(538),i(539),r.registerPreprocessor((function(e){e.markLine=e.markLine||{}}))},function(e,t,i){var r=i(128).extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});e.exports=r},function(e,t,i){var r=i(0),n=i(18),a=i(3),o=i(129),s=i(118),l=i(130),c=i(25).getStackedDimension,u=function(e,t,i,n){var a=e.getData(),s=n.type;if(!r.isArray(n)&&("min"===s||"max"===s||"average"===s||"median"===s||null!=n.xAxis||null!=n.yAxis)){var l,u;if(null!=n.yAxis||null!=n.xAxis)l=t.getAxis(null!=n.yAxis?"y":"x"),u=r.retrieve(n.yAxis,n.xAxis);else{var d=o.getAxisInfo(n,a,t,e);l=d.valueAxis;var h=c(a,d.valueDataDim);u=o.numCalculate(a,h,s)}var p="x"===l.dim?0:1,f=1-p,m=r.clone(n),g={};m.type=null,m.coord=[],g.coord=[],m.coord[f]=-1/0,g.coord[f]=1/0;var y=i.get("precision");y>=0&&"number"==typeof u&&(u=+u.toFixed(Math.min(y,20))),m.coord[p]=g.coord[p]=u,n=[m,g,{type:s,valueIndex:n.valueIndex,value:u}]}return(n=[o.dataTransform(e,n[0]),o.dataTransform(e,n[1]),r.extend({},n[2])])[2].type=n[2].type||"",r.merge(n[2],n[0]),r.merge(n[2],n[1]),n};function d(e){return!isNaN(e)&&!isFinite(e)}function h(e,t,i,r){var n=1-e,a=r.dimensions[e];return d(t[n])&&d(i[n])&&t[e]===i[e]&&r.getAxis(a).containData(t[e])}function p(e,t){if("cartesian2d"===e.type){var i=t[0].coord,r=t[1].coord;if(i&&r&&(h(1,i,r,e)||h(0,i,r,e)))return!0}return o.dataFilter(e,t[0])&&o.dataFilter(e,t[1])}function f(e,t,i,r,n){var o,s=r.coordinateSystem,l=e.getItemModel(t),c=a.parsePercent(l.get("x"),n.getWidth()),u=a.parsePercent(l.get("y"),n.getHeight());if(isNaN(c)||isNaN(u)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var h=s.dimensions,p=e.get(h[0],t),f=e.get(h[1],t);o=s.dataToPoint([p,f])}if("cartesian2d"===s.type){var m=s.getAxis("x"),g=s.getAxis("y");h=s.dimensions;d(e.get(h[0],t))?o[0]=m.toGlobalCoord(m.getExtent()[i?0:1]):d(e.get(h[1],t))&&(o[1]=g.toGlobalCoord(g.getExtent()[i?0:1]))}isNaN(c)||(o[0]=c),isNaN(u)||(o[1]=u)}else o=[c,u];e.setItemLayout(t,o)}var m=l.extend({type:"markLine",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markLineModel;if(t){var r=t.getData(),n=t.__from,a=t.__to;n.each((function(t){f(n,t,!0,e,i),f(a,t,!1,e,i)})),r.each((function(e){r.setItemLayout(e,[n.getItemLayout(e),a.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},renderSeries:function(e,t,i,a){var l=e.coordinateSystem,c=e.id,d=e.getData(),h=this.markerGroupMap,m=h.get(c)||h.set(c,new s);this.group.add(m.group);var g=function(e,t,i){var a;a=e?r.map(e&&e.dimensions,(function(e){var i=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return r.defaults({name:e},i)})):[{name:"value",type:"float"}];var s=new n(a,i),l=new n(a,i),c=new n([],i),d=r.map(i.get("data"),r.curry(u,t,e,i));e&&(d=r.filter(d,r.curry(p,e)));var h=e?o.dimValueGetter:function(e){return e.value};return s.initData(r.map(d,(function(e){return e[0]})),null,h),l.initData(r.map(d,(function(e){return e[1]})),null,h),c.initData(r.map(d,(function(e){return e[2]}))),c.hasItemOption=!0,{from:s,to:l,line:c}}(l,e,t),y=g.from,_=g.to,v=g.line;t.__from=y,t.__to=_,t.setData(v);var C=t.get("symbol"),x=t.get("symbolSize");function b(t,i,r){var n=t.getItemModel(i);f(t,i,r,e,a),t.setItemVisual(i,{symbolRotate:n.get("symbolRotate"),symbolSize:n.get("symbolSize")||x[r?0:1],symbol:n.get("symbol",!0)||C[r?0:1],color:n.get("itemStyle.color")||d.getVisual("color")})}r.isArray(C)||(C=[C,C]),"number"==typeof x&&(x=[x,x]),g.from.each((function(e){b(y,e,!0),b(_,e,!1)})),v.each((function(e){var t=v.getItemModel(e).get("lineStyle.color");v.setItemVisual(e,{color:t||y.getItemVisual(e,"color")}),v.setItemLayout(e,[y.getItemLayout(e),_.getItemLayout(e)]),v.setItemVisual(e,{fromSymbolRotate:y.getItemVisual(e,"symbolRotate"),fromSymbolSize:y.getItemVisual(e,"symbolSize"),fromSymbol:y.getItemVisual(e,"symbol"),toSymbolRotate:_.getItemVisual(e,"symbolRotate"),toSymbolSize:_.getItemVisual(e,"symbolSize"),toSymbol:_.getItemVisual(e,"symbol")})})),m.updateData(v),g.line.eachItemGraphicEl((function(e,i){e.traverse((function(e){e.dataModel=t}))})),m.__keep=!0,m.group.silent=t.get("silent")||e.get("silent")}});e.exports=m},function(e,t,i){var r=i(1);i(541),i(542),r.registerPreprocessor((function(e){e.markArea=e.markArea||{}}))},function(e,t,i){var r=i(128).extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});e.exports=r},function(e,t,i){var r=i(0),n=i(23),a=i(18),o=i(3),s=i(2),l=i(129),c=i(130),u=function(e,t,i,n){var a=l.dataTransform(e,n[0]),o=l.dataTransform(e,n[1]),s=r.retrieve,c=a.coord,u=o.coord;c[0]=s(c[0],-1/0),c[1]=s(c[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var d=r.mergeAll([{},a,o]);return d.coord=[a.coord,o.coord],d.x0=a.x,d.y0=a.y,d.x1=o.x,d.y1=o.y,d};function d(e){return!isNaN(e)&&!isFinite(e)}function h(e,t,i,r){var n=1-e;return d(t[n])&&d(i[n])}function p(e,t){var i=t.coord[0],r=t.coord[1];return!("cartesian2d"!==e.type||!i||!r||!h(1,i,r)&&!h(0,i,r))||(l.dataFilter(e,{coord:i,x:t.x0,y:t.y0})||l.dataFilter(e,{coord:r,x:t.x1,y:t.y1}))}function f(e,t,i,r,n){var a,s=r.coordinateSystem,l=e.getItemModel(t),c=o.parsePercent(l.get(i[0]),n.getWidth()),u=o.parsePercent(l.get(i[1]),n.getHeight());if(isNaN(c)||isNaN(u)){if(r.getMarkerPosition)a=r.getMarkerPosition(e.getValues(i,t));else{var h=[m=e.get(i[0],t),g=e.get(i[1],t)];s.clampData&&s.clampData(h,h),a=s.dataToPoint(h,!0)}if("cartesian2d"===s.type){var p=s.getAxis("x"),f=s.getAxis("y"),m=e.get(i[0],t),g=e.get(i[1],t);d(m)?a[0]=p.toGlobalCoord(p.getExtent()["x0"===i[0]?0:1]):d(g)&&(a[1]=f.toGlobalCoord(f.getExtent()["y0"===i[1]?0:1]))}isNaN(c)||(a[0]=c),isNaN(u)||(a[1]=u)}else a=[c,u];return a}var m=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];c.extend({type:"markArea",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markAreaModel;if(t){var n=t.getData();n.each((function(t){var a=r.map(m,(function(r){return f(n,t,r,e,i)}));n.setItemLayout(t,a),n.getItemGraphicEl(t).setShape("points",a)}))}}),this)},renderSeries:function(e,t,i,o){var l=e.coordinateSystem,c=e.id,h=e.getData(),g=this.markerGroupMap,y=g.get(c)||g.set(c,{group:new s.Group});this.group.add(y.group),y.__keep=!0;var _=function(e,t,i){var n,o;e?(n=r.map(e&&e.dimensions,(function(e){var i=t.getData(),n=i.getDimensionInfo(i.mapDimension(e))||{};return r.defaults({name:e},n)})),o=new a(r.map(["x0","y0","x1","y1"],(function(e,t){return{name:e,type:n[t%2].type}})),i)):o=new a(n=[{name:"value",type:"float"}],i);var s=r.map(i.get("data"),r.curry(u,t,e,i));e&&(s=r.filter(s,r.curry(p,e)));var l=e?function(e,t,i,r){return e.coord[Math.floor(r/2)][r%2]}:function(e){return e.value};return o.initData(s,null,l),o.hasItemOption=!0,o}(l,e,t);t.setData(_),_.each((function(t){var i=r.map(m,(function(i){return f(_,t,i,e,o)})),n=!0;r.each(m,(function(e){if(n){var i=_.get(e[0],t),r=_.get(e[1],t);(d(i)||l.getAxis("x").containData(i))&&(d(r)||l.getAxis("y").containData(r))&&(n=!1)}})),_.setItemLayout(t,{points:i,allClipped:n}),_.setItemVisual(t,{color:h.getVisual("color")})})),_.diff(y.__data).add((function(e){var t=_.getItemLayout(e);if(!t.allClipped){var i=new s.Polygon({shape:{points:t.points}});_.setItemGraphicEl(e,i),y.group.add(i)}})).update((function(e,i){var r=y.__data.getItemGraphicEl(i),n=_.getItemLayout(e);n.allClipped?r&&y.group.remove(r):(r?s.updateProps(r,{shape:{points:n.points}},t,e):r=new s.Polygon({shape:{points:n.points}}),_.setItemGraphicEl(e,r),y.group.add(r))})).remove((function(e){var t=y.__data.getItemGraphicEl(e);y.group.remove(t)})).execute(),_.eachItemGraphicEl((function(e,i){var a=_.getItemModel(i),o=a.getModel("label"),l=a.getModel("emphasis.label"),c=_.getItemVisual(i,"color");e.useStyle(r.defaults(a.getModel("itemStyle").getItemStyle(),{fill:n.modifyAlpha(c,.4),stroke:c})),e.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle(),s.setLabelStyle(e.style,e.hoverStyle,o,l,{labelFetcher:t,labelDataIndex:i,defaultText:_.getName(i)||"",isRectText:!0,autoColor:c}),s.setHoverStyle(e,{}),e.dataModel=t})),y.__data=_,y.group.silent=t.get("silent")||e.get("silent")}})},function(e,t,i){i(216),i(546),i(547),i(548)},function(e,t,i){var r=i(1),n=i(0);function a(e,t,i){var r,a={},o="toggleSelected"===e;return i.eachComponent("legend",(function(i){o&&null!=r?i[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?i[e]():(i[e](t.name),r=i.isSelected(t.name));var s=i.getData();n.each(s,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=i.isSelected(t);a.hasOwnProperty(t)?a[t]=a[t]&&r:a[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:a}:{name:t.name,selected:a}}r.registerAction("legendToggleSelect","legendselectchanged",n.curry(a,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",n.curry(a,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",n.curry(a,"inverseSelect")),r.registerAction("legendSelect","legendselected",n.curry(a,"select")),r.registerAction("legendUnSelect","legendunselected",n.curry(a,"unSelect"))},function(e,t){e.exports=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0}))}},function(e,t,i){var r=i(217),n=i(6),a=n.mergeLayoutParam,o=n.getLayoutParams,s=r.extend({type:"legend.scroll",setScrollDataIndex:function(e){this.option.scrollDataIndex=e},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(e,t,i,r){var n=o(e);s.superCall(this,"init",e,t,i,r),l(this,e,n)},mergeOption:function(e,t){s.superCall(this,"mergeOption",e,t),l(this,this.option,e)}});function l(e,t,i){var r=[1,1];r[e.getOrient().index]=0,a(t,i,{type:"box",ignoreSize:r})}var c=s;e.exports=c},function(e,t,i){var r=i(0),n=i(2),a=i(6),o=i(218),s=n.Group,l=["width","height"],c=["x","y"],u=o.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){u.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new s),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new s),this._showController},resetInner:function(){u.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,i,a,o,s,l){var c=this;u.superCall(this,"renderInner",e,t,i,a,o,s,l);var d=this._controllerGroup,h=t.get("pageIconSize",!0);r.isArray(h)||(h=[h,h]),f("pagePrev",0);var p=t.getModel("pageTextStyle");function f(e,i){var o=e+"DataIndex",s=n.createIcon(t.get("pageIcons",!0)[t.getOrient().name][i],{onclick:r.bind(c._pageGo,c,o,t,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});s.name=e,d.add(s)}d.add(new n.Text({name:"pageText",style:{textFill:p.getTextColor(),font:p.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),f("pageNext",1)},layoutInner:function(e,t,i,n,o,s){var u=this.getSelectorGroup(),d=e.getOrient().index,h=l[d],p=c[d],f=l[1-d],m=c[1-d];o&&a.box("horizontal",u,e.get("selectorItemGap",!0));var g=e.get("selectorButtonGap",!0),y=u.getBoundingRect(),_=[-y.x,-y.y],v=r.clone(i);o&&(v[h]=i[h]-y[h]-g);var C=this._layoutContentAndController(e,n,v,d,h,f,m);if(o){if("end"===s)_[d]+=C[h]+g;else{var x=y[h]+g;_[d]-=x,C[p]-=x}C[h]+=y[h]+g,_[1-d]+=C[m]+C[f]/2-y[f]/2,C[f]=Math.max(C[f],y[f]),C[m]=Math.min(C[m],y[m]+_[1-d]),u.attr("position",_)}return C},_layoutContentAndController:function(e,t,i,o,s,l,c){var u=this.getContentGroup(),d=this._containerGroup,h=this._controllerGroup;a.box(e.get("orient"),u,e.get("itemGap"),o?i.width:null,o?null:i.height),a.box("horizontal",h,e.get("pageButtonItemGap",!0));var p=u.getBoundingRect(),f=h.getBoundingRect(),m=this._showController=p[s]>i[s],g=[-p.x,-p.y];t||(g[o]=u.position[o]);var y=[0,0],_=[-f.x,-f.y],v=r.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));m&&("end"===e.get("pageButtonPosition",!0)?_[o]+=i[s]-f[s]:y[o]+=f[s]+v);_[1-o]+=p[l]/2-f[l]/2,u.attr("position",g),d.attr("position",y),h.attr("position",_);var C={x:0,y:0};if(C[s]=m?i[s]:p[s],C[l]=Math.max(p[l],f[l]),C[c]=Math.min(0,f[c]+_[1-o]),d.__rectSize=i[s],m){var x={x:0,y:0};x[s]=Math.max(i[s]-f[s]-v,0),x[l]=C[l],d.setClipPath(new n.Rect({shape:x})),d.__rectSize=x[s]}else h.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var b=this._getPageInfo(e);return null!=b.pageIndex&&n.updateProps(u,{position:b.contentPosition},!!m&&e),this._updatePageInfoView(e,b),C},_pageGo:function(e,t,i){var r=this._getPageInfo(t)[e];null!=r&&i.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},_updatePageInfoView:function(e,t){var i=this._controllerGroup;r.each(["pagePrev","pageNext"],(function(r){var n=null!=t[r+"DataIndex"],a=i.childOfName(r);a&&(a.setStyle("fill",n?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),a.cursor=n?"pointer":"default")}));var n=i.childOfName("pageText"),a=e.get("pageFormatter"),o=t.pageIndex,s=null!=o?o+1:0,l=t.pageCount;n&&a&&n.setStyle("text",r.isString(a)?a.replace("{current}",s).replace("{total}",l):a({current:s,total:l}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),i=this.getContentGroup(),r=this._containerGroup.__rectSize,n=e.getOrient().index,a=l[n],o=c[n],s=this._findTargetItemIndex(t),u=i.children(),d=u[s],h=u.length,p=h?1:0,f={contentPosition:i.position.slice(),pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return f;var m=C(d);f.contentPosition[n]=-m.s;for(var g=s+1,y=m,_=m,v=null;g<=h;++g)(!(v=C(u[g]))&&_.e>y.s+r||v&&!x(v,y.s))&&(y=_.i>y.i?_:v)&&(null==f.pageNextDataIndex&&(f.pageNextDataIndex=y.i),++f.pageCount),_=v;for(g=s-1,y=m,_=m,v=null;g>=-1;--g)(v=C(u[g]))&&x(_,v.s)||!(y.i<_.i)||(_=y,null==f.pagePrevDataIndex&&(f.pagePrevDataIndex=y.i),++f.pageCount,++f.pageIndex),y=v;return f;function C(e){if(e){var t=e.getBoundingRect(),i=t[o]+e.position[n];return{s:i,e:i+t[a],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(r,n){var a=r.__legendDataIndex;null==i&&null!=a&&(i=n),a===e&&(t=n)})),null!=t?t:i):0;var t,i}}),d=u;e.exports=d},function(e,t,i){i(1).registerAction("legendScroll","legendscroll",(function(e,t){var i=e.scrollDataIndex;null!=i&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(i)}))}))},function(e,t,i){i(219),i(220)},function(e,t,i){var r=i(56).extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});e.exports=r},function(e,t,i){var r=i(0),n=i(22),a=i(2),o=i(33),s=i(57),l=i(3),c=i(6),u=i(55),d=a.Rect,h=l.linearMap,p=l.asc,f=r.bind,m=r.each,g=["line","bar","candlestick","scatter"],y=s.extend({type:"dataZoom.slider",init:function(e,t){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=t},render:function(e,t,i,r){y.superApply(this,"render",arguments),o.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=e.get("orient"),!1!==this.dataZoomModel.get("show")?(r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){y.superApply(this,"remove",arguments),o.clear(this,"_dispatchZoomAction")},dispose:function(){y.superApply(this,"dispose",arguments),o.clear(this,"_dispatchZoomAction")},_buildView:function(){var e=this.group;e.removeAll(),this._resetLocation(),this._resetInterval();var t=this._displayables.barGroup=new a.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},_resetLocation:function(){var e=this.dataZoomModel,t=this.api,i=this._findCoordRect(),n={width:t.getWidth(),height:t.getHeight()},a="horizontal"===this._orient?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=c.getLayoutParams(e.option);r.each(["right","top","width","height"],(function(e){"ph"===o[e]&&(o[e]=a[e])}));var s=c.getLayoutRect(o,n,e.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var e=this.group,t=this._location,i=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),n=r&&r.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr("horizontal"!==i||n?"horizontal"===i&&n?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==i||n?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=e.getBoundingRect([a]);e.attr("position",[t.x-s.x,t.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var e=this.dataZoomModel,t=this._size,i=this._displayables.barGroup;i.add(new d({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40})),i.add(new d({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:r.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var t=this._size,i=e.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():e.otherDim;if(null!=o){var s=n.getDataExtent(o),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var c,u=[0,t[1]],d=[0,t[0]],p=[[t[0],0],[0,0]],f=[],m=d[1]/(n.count()-1),g=0,y=Math.round(n.count()/t[0]);n.each([o],(function(e,t){if(y>0&&t%y)g+=m;else{var i=null==e||isNaN(e)||""===e,r=i?0:h(e,s,u,!0);i&&!c&&t?(p.push([p[p.length-1][0],0]),f.push([f[f.length-1][0],0])):!i&&c&&(p.push([g,0]),f.push([g,0])),p.push([g,r]),f.push([g,r]),g+=m,c=i}}));var _=this.dataZoomModel;this._displayables.barGroup.add(new a.Polygon({shape:{points:p},style:r.defaults({fill:_.get("dataBackgroundColor")},_.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new a.Polyline({shape:{points:f},style:_.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var i,n=this.ecModel;return e.eachTargetAxis((function(a,o){var s=e.getAxisProxy(a.name,o).getTargetSeriesModels();r.each(s,(function(e){if(!(i||!0!==t&&r.indexOf(g,e.get("type"))<0)){var s,l=n.getComponent(a.axis,o).axis,c={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],u=e.coordinateSystem;null!=c&&u.getOtherAxis&&(s=u.getOtherAxis(l).inverse),c=e.getData().mapDimension(c),i={thisAxis:l,series:e,thisDim:a.name,otherDim:c,otherAxisInverse:s}}}),this)}),this),i}},_renderHandle:function(){var e=this._displayables,t=e.handles=[],i=e.handleLabels=[],r=this._displayables.barGroup,n=this._size,o=this.dataZoomModel;r.add(e.filler=new d({draggable:!0,cursor:_(this._orient),drift:f(this._onDragMove,this,"all"),ondragstart:f(this._showDataInfo,this,!0),ondragend:f(this._onDragEnd,this),onmouseover:f(this._showDataInfo,this,!0),onmouseout:f(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),r.add(new d({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),m([0,1],(function(e){var n=a.createIcon(o.get("handleIcon"),{cursor:_(this._orient),draggable:!0,drift:f(this._onDragMove,this,e),ondragend:f(this._onDragEnd,this),onmouseover:f(this._showDataInfo,this,!0),onmouseout:f(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),s=n.getBoundingRect();this._handleHeight=l.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=s.width/s.height*this._handleHeight,n.setStyle(o.getModel("handleStyle").getItemStyle());var c=o.get("handleColor");null!=c&&(n.style.fill=c),r.add(t[e]=n);var u=o.textStyleModel;this.group.add(i[e]=new a.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:u.getTextColor(),textFont:u.getFont()},z2:10}))}),this)},_resetInterval:function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[h(e[0],[0,100],t,!0),h(e[1],[0,100],t,!0)]},_updateInterval:function(e,t){var i=this.dataZoomModel,r=this._handleEnds,n=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];u(t,r,n,i.get("zoomLock")?"all":e,null!=a.minSpan?h(a.minSpan,o,n,!0):null,null!=a.maxSpan?h(a.maxSpan,o,n,!0):null);var s=this._range,l=this._range=p([h(r[0],n,o,!0),h(r[1],n,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(e){var t=this._displayables,i=this._handleEnds,r=p(i.slice()),n=this._size;m([0,1],(function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scale:[a/2,a/2],position:[i[e],n[1]/2-a/2]})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:n[1]}),this._updateDataInfo(e)},_updateDataInfo:function(e){var t=this.dataZoomModel,i=this._displayables,r=i.handleLabels,n=this._orient,o=["",""];if(t.get("showDetail")){var s=t.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,c=this._range,u=e?s.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:s.getDataValueWindow();o=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var d=p(this._handleEnds.slice());function h(e){var t=a.getTransform(i.handles[e].parent,this.group),s=a.transformDirection(0===e?"right":"left",t),l=this._handleWidth/2+5,c=a.applyTransform([d[e]+(0===e?-l:l),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],textVerticalAlign:"horizontal"===n?"middle":s,textAlign:"horizontal"===n?s:"center",text:o[e]})}h.call(this,0),h.call(this,1)},_formatLabel:function(e,t){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");null!=a&&"auto"!==a||(a=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel(Math.round(e)):e.toFixed(Math.min(a,20));return r.isFunction(n)?n(e,o):r.isString(n)?n.replace("{value}",o):o},_showDataInfo:function(e){e=this._dragging||e;var t=this._displayables.handleLabels;t[0].attr("invisible",!e),t[1].attr("invisible",!e)},_onDragMove:function(e,t,i,r){this._dragging=!0,n.stop(r.event);var o=this._displayables.barGroup.getLocalTransform(),s=a.applyTransform([t,i],o,!0),l=this._updateInterval(e,s[0]),c=this.dataZoomModel.get("realtime");this._updateView(!c),l&&c&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(e){var t=this._size,i=this._displayables.barGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(i[0]<0||i[0]>t[0]||i[1]<0||i[1]>t[1])){var r=this._handleEnds,n=(r[0]+r[1])/2,a=this._updateInterval("all",i[0]-n);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:e[0],end:e[1]})},_findCoordRect:function(){var e;if(m(this.getTargetCoordInfo(),(function(t){if(!e&&t.length){var i=t[0].model.coordinateSystem;e=i.getRect&&i.getRect()}})),!e){var t=this.api.getWidth(),i=this.api.getHeight();e={x:.2*t,y:.2*i,width:.6*t,height:.6*i}}return e}});function _(e){return"vertical"===e?"ns-resize":"ew-resize"}var v=y;e.exports=v},function(e,t,i){var r=i(56).extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});e.exports=r},function(e,t,i){var r=i(0),n=i(57),a=i(55),o=i(554),s=r.bind,l=n.extend({type:"dataZoom.inside",init:function(e,t){this._range},render:function(e,t,i,n){l.superApply(this,"render",arguments),this._range=e.getPercentRange(),r.each(this.getTargetCoordInfo(),(function(t,n){var a=r.map(t,(function(e){return o.generateCoordId(e.model)}));r.each(t,(function(t){var l=t.model,u={};r.each(["pan","zoom","scrollMove"],(function(e){u[e]=s(c[e],this,t,n)}),this),o.register(i,{coordId:o.generateCoordId(l),allCoordIds:a,containsPoint:function(e,t,i){return l.coordinateSystem.containPoint([t,i])},dataZoomId:e.id,dataZoomModel:e,getRange:u})}),this)}),this)},dispose:function(){o.unregister(this.api,this.dataZoomModel.id),l.superApply(this,"dispose",arguments),this._range=null}}),c={zoom:function(e,t,i,r){var n=this._range,o=n.slice(),s=e.axisModels[0];if(s){var l=d[t](null,[r.originX,r.originY],s,i,e),c=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-c)*u+c,o[1]=(o[1]-c)*u+c;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return a(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,n[0]!==o[0]||n[1]!==o[1]?o:void 0}},pan:u((function(e,t,i,r,n,a){var o=d[r]([a.oldX,a.oldY],[a.newX,a.newY],t,n,i);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:u((function(e,t,i,r,n,a){return d[r]([0,0],[a.scrollDelta,a.scrollDelta],t,n,i).signal*(e[1]-e[0])*a.scrollDelta}))};function u(e){return function(t,i,r,n){var o=this._range,s=o.slice(),l=t.axisModels[0];if(l){var c=e(s,l,t,i,r,n);return a(c,s,[0,100],"all"),this._range=s,o[0]!==s[0]||o[1]!==s[1]?s:void 0}}}var d={grid:function(e,t,i,r,n){var a=i.axis,o={},s=n.model.coordinateSystem.getRect();return e=e||[0,0],"x"===a.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,i,r,n){var a=i.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),c=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===i.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,i,r,n){var a=i.axis,o=n.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===a.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},h=l;e.exports=h},function(e,t,i){var r=i(0),n=i(73),a=i(33),o="\0_ec_dataZoom_roams";function s(e){var t=e.getZr();return t[o]||(t[o]={})}function l(e){r.each(e,(function(t,i){t.count||(t.controller.dispose(),delete e[i])}))}function c(e,t){e.dispatchAction({type:"dataZoom",batch:t})}t.register=function(e,t){var i=s(e),o=t.dataZoomId,u=t.coordId;r.each(i,(function(e,i){var n=e.dataZoomInfos;n[o]&&r.indexOf(t.allCoordIds,u)<0&&(delete n[o],e.count--)})),l(i);var d=i[u];d||((d=i[u]={coordId:u,dataZoomInfos:{},count:0}).controller=function(e,t){var i=new n(e.getZr());return r.each(["pan","zoom","scrollMove"],(function(e){i.on(e,(function(i){var n=[];r.each(t.dataZoomInfos,(function(r){if(i.isAvailableBehavior(r.dataZoomModel.option)){var a=(r.getRange||{})[e],o=a&&a(t.controller,i);!r.dataZoomModel.get("disabled",!0)&&o&&n.push({dataZoomId:r.dataZoomId,start:o[0],end:o[1]})}})),n.length&&t.dispatchAction(n)}))})),i}(e,d),d.dispatchAction=r.curry(c,e)),!d.dataZoomInfos[o]&&d.count++,d.dataZoomInfos[o]=t;var h,p,f,m,g=(h=d.dataZoomInfos,f={type_true:2,type_move:1,type_false:0,type_undefined:-1},m=!0,r.each(h,(function(e){var t=e.dataZoomModel,i=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");f["type_"+i]>f["type_"+p]&&(p=i),m&=t.get("preventDefaultMouseMove",!0)})),{controlType:p,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!m}});d.controller.enable(g.controlType,g.opt),d.controller.setPointerChecker(t.containsPoint),a.createOrUpdate(d,"dispatchAction",t.dataZoomModel.get("throttle",!0),"fixRate")},t.unregister=function(e,t){var i=s(e);r.each(i,(function(e){e.controller.dispose();var i=e.dataZoomInfos;i[t]&&(delete i[t],e.count--)})),l(i)},t.generateCoordId=function(e){return e.type+"\0_"+e.id}},function(e,t,i){i(221),i(230)},function(e,t,i){var r=i(0),n=i(225),a=i(3),o=[20,140],s=n.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(e,t){s.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){s.superApply(this,"resetItemSize",arguments);var e=this.itemSize;"horizontal"===this._orient&&e.reverse(),(null==e[0]||isNaN(e[0]))&&(e[0]=o[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=o[1])},_resetRange:function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):r.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},completeVisualOption:function(){n.prototype.completeVisualOption.apply(this,arguments),r.each(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=0)}),this)},setSelected:function(e){this.option.range=e.slice(),this._resetRange()},getSelected:function(){var e=this.getExtent(),t=a.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},getValueState:function(e){var t=this.option.range,i=this.getExtent();return(t[0]<=i[0]||t[0]<=e)&&(t[1]>=i[1]||e<=t[1])?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(i){var r=[],n=i.getData();n.each(this.getDataDimension(n),(function(t,i){e[0]<=t&&t<=e[1]&&r.push(i)}),this),t.push({seriesId:i.id,dataIndex:r})}),this),t},getVisualMeta:function(e){var t=l(this,"outOfRange",this.getExtent()),i=l(this,"inRange",this.option.range.slice()),r=[];function n(t,i){r.push({value:t,color:e(t,i)})}for(var a=0,o=0,s=i.length,c=t.length;o<c&&(!i.length||t[o]<=i[0]);o++)t[o]<i[a]&&n(t[o],"outOfRange");for(var u=1;a<s;a++,u=0)u&&r.length&&n(i[a],"outOfRange"),n(i[a],"inRange");for(u=1;o<c;o++)(!i.length||i[i.length-1]<t[o])&&(u&&(r.length&&n(r[r.length-1].value,"outOfRange"),u=0),n(t[o],"outOfRange"));var d=r.length;return{stops:r,outerColors:[d?r[0].color:"transparent",d?r[d-1].color:"transparent"]}}});function l(e,t,i){if(i[0]===i[1])return i.slice();for(var r=(i[1]-i[0])/200,n=i[0],a=[],o=0;o<=200&&n<i[1];o++)a.push(n),n+=r;return a.push(i[1]),a}var c=s;e.exports=c},function(e,t,i){var r=i(0),n=i(105),a=i(22),o=i(227),s=i(2),l=i(3),c=i(55),u=i(228),d=i(4),h=l.linearMap,p=r.each,f=Math.min,m=Math.max,g=o.extend({type:"visualMap.continuous",init:function(){g.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(e,t,i,r){r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var i=e.get("text");this._renderEndsText(t,i,0),this._renderEndsText(t,i,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},_renderEndsText:function(e,t,i){if(t){var r=t[1-i];r=null!=r?r+"":"";var n=this.visualMapModel,a=n.get("textGap"),o=n.itemSize,l=this._shapes.barGroup,c=this._applyTransform([o[0]/2,0===i?-a:o[1]+a],l),u=this._applyTransform(0===i?"bottom":"top",l),d=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new s.Text({style:{x:c[0],y:c[1],textVerticalAlign:"horizontal"===d?"middle":u,textAlign:"horizontal"===d?u:"center",text:r,textFont:h.getFont(),textFill:h.getTextColor()}}))}},_renderBar:function(e){var t=this.visualMapModel,i=this._shapes,n=t.itemSize,a=this._orient,o=this._useHandle,s=u.getItemAlign(t,this.api,n),l=i.barGroup=this._createBarGroup(s);l.add(i.outOfRange=y()),l.add(i.inRange=y(null,o?v(this._orient):null,r.bind(this._dragHandle,this,"all",!1),r.bind(this._dragHandle,this,"all",!0)));var c=t.textStyleModel.getTextRect("国"),d=m(c.width,c.height);o&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(l,0,n,d,a,s),this._createHandle(l,1,n,d,a,s)),this._createIndicator(l,n,d,a),e.add(l)},_createHandle:function(e,t,i,n,o){var l=r.bind(this._dragHandle,this,t,!1),c=r.bind(this._dragHandle,this,t,!0),u=y(function(e,t){return 0===e?[[0,0],[t,0],[t,-t]]:[[0,0],[t,0],[t,t]]}(t,n),v(this._orient),l,c);u.position[0]=i[0],e.add(u);var d=this.visualMapModel.textStyleModel,h=new s.Text({draggable:!0,drift:l,onmousemove:function(e){a.stop(e.event)},ondragend:c,style:{x:0,y:0,text:"",textFont:d.getFont(),textFill:d.getTextColor()}});this.group.add(h);var p=["horizontal"===o?n/2:1.5*n,"horizontal"===o?0===t?-1.5*n:1.5*n:0===t?-n/2:n/2],f=this._shapes;f.handleThumbs[t]=u,f.handleLabelPoints[t]=p,f.handleLabels[t]=h},_createIndicator:function(e,t,i,r){var n=y([[0,0]],"move");n.position[0]=t[0],n.attr({invisible:!0,silent:!0}),e.add(n);var a=this.visualMapModel.textStyleModel,o=new s.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(o);var l=["horizontal"===r?i/2:9,0],c=this._shapes;c.indicator=n,c.indicatorLabel=o,c.indicatorLabelPoint=l},_dragHandle:function(e,t,i,r){if(this._useHandle){if(this._dragging=!t,!t){var n=this._applyTransform([i,r],this._shapes.barGroup,!0);this._updateInterval(e,n[1]),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():_(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},_resetInterval:function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),i=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[h(t[0],i,r,!0),h(t[1],i,r,!0)]},_updateInterval:function(e,t){t=t||0;var i=this.visualMapModel,r=this._handleEnds,n=[0,i.itemSize[1]];c(t,r,n,e,0);var a=i.getExtent();this._dataInterval=[h(r[0],n,a,!0),h(r[1],n,a,!0)]},_updateView:function(e){var t=this.visualMapModel,i=t.getExtent(),r=this._shapes,n=[0,t.itemSize[1]],a=e?n:this._handleEnds,o=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,n,"outOfRange");r.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),r.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,o)},_createBarVisual:function(e,t,i,r){var a={forceState:r,convertOpacityToAlpha:!0},o=this._makeColorGradient(e,a),s=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],l=this._createBarPoints(i,s);return{barColor:new n(0,0,0,1,o),barPoints:l,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(e,t){var i=[],r=(e[1]-e[0])/100;i.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var n=1;n<100;n++){var a=e[0]+r*n;if(a>e[1])break;i.push({color:this.getControllerVisual(a,"color",t),offset:n/100})}return i.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),i},_createBarPoints:function(e,t){var i=this.visualMapModel.itemSize;return[[i[0]-t[0],e[0]],[i[0],e[0]],[i[0],e[1]],[i[0]-t[1],e[1]]]},_createBarGroup:function(e){var t=this._orient,i=this.visualMapModel.get("inverse");return new s.Group("horizontal"!==t||i?"horizontal"===t&&i?{scale:"bottom"===e?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==t||i?{scale:"left"===e?[1,1]:[-1,1]}:{scale:"left"===e?[1,-1]:[-1,-1]}:{scale:"bottom"===e?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(e,t){if(this._useHandle){var i=this._shapes,r=this.visualMapModel,n=i.handleThumbs,a=i.handleLabels;p([0,1],(function(o){var l=n[o];l.setStyle("fill",t.handlesColor[o]),l.position[1]=e[o];var c=s.applyTransform(i.handleLabelPoints[o],s.getTransform(l,this.group));a[o].setStyle({x:c[0],y:c[1],text:r.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(e,t,i,r){var n=this.visualMapModel,a=n.getExtent(),o=n.itemSize,l=[0,o[1]],c=h(e,a,l,!0),u=this._shapes,d=u.indicator;if(d){d.position[1]=c,d.attr("invisible",!1),d.setShape("points",function(e,t,i,r){return e?[[0,-f(t,m(i,0))],[6,0],[0,f(t,m(r-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,r,c,o[1]));var p=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0});d.setStyle("fill",p);var g=s.applyTransform(u.indicatorLabelPoint,s.getTransform(d,this.group)),y=u.indicatorLabel;y.attr("invisible",!1);var _=this._applyTransform("left",u.barGroup),v=this._orient;y.setStyle({text:(i||"")+n.formatValueText(t),textVerticalAlign:"horizontal"===v?_:"middle",textAlign:"horizontal"===v?"center":_,x:g[0],y:g[1]})}},_enableHoverLinkToSeries:function(){var e=this;this._shapes.barGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var i=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.barGroup,!0,!0);r[1]=f(m(0,r[1]),i[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=i[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(e,t){var i=this.visualMapModel,r=i.itemSize;if(i.option.hoverLink){var n=[0,r[1]],a=i.getExtent();e=f(m(n[0],e),n[1]);var o=function(e,t,i){var r=6,n=e.get("hoverLinkDataSize");n&&(r=h(n,t,i,!0)/2);return r}(i,a,n),s=[e-o,e+o],l=h(e,n,a,!0),c=[h(s[0],n,a,!0),h(s[1],n,a,!0)];s[0]<n[0]&&(c[0]=-1/0),s[1]>n[1]&&(c[1]=1/0),t&&(c[0]===-1/0?this._showIndicator(l,c[1],"< ",o):c[1]===1/0?this._showIndicator(l,c[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var p=this._hoverLinkDataIndices,g=[];(t||_(i))&&(g=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var y=d.compressBatches(p,g);this._dispatchHighDown("downplay",u.makeHighDownBatch(y[0],i)),this._dispatchHighDown("highlight",u.makeHighDownBatch(y[1],i))}},_hoverLinkFromSeriesMouseOver:function(e){var t=e.target,i=this.visualMapModel;if(t&&null!=t.dataIndex){var r=this.ecModel.getSeriesByIndex(t.seriesIndex);if(i.isTargetSeries(r)){var n=r.getData(t.dataType),a=n.get(i.getDataDimension(n),t.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",u.makeHighDownBatch(e,this.visualMapModel)),e.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},_applyTransform:function(e,t,i,n){var a=s.getTransform(t,n?null:this.group);return s[r.isArray(e)?"applyTransform":"transformDirection"](e,a,i)},_dispatchHighDown:function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function y(e,t,i,r){return new s.Polygon({shape:{points:e},draggable:!!i,cursor:t,drift:i,onmousemove:function(e){a.stop(e.event)},ondragend:r})}function _(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function v(e){return"vertical"===e?"ns-resize":"ew-resize"}var C=g;e.exports=C},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(225),a=i(47),o=i(226),s=i(3).reformIntervals,l=n.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(e,t){l.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();c[this._mode].call(this),this._resetSelected(e,t);var n=this.option.categories;this.resetVisual((function(e,t){"categories"===i?(e.mappingMethod="category",e.categories=r.clone(n)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=r.map(this._pieceList,(function(e){e=r.clone(e);return"inRange"!==t&&(e.visual=null),e})))}))},completeVisualOption:function(){var e=this.option,t={},i=a.listVisualTypes(),s=this.isCategory();function l(e,t,i){return e&&e[t]&&(r.isObject(e[t])?e[t].hasOwnProperty(i):e[t]===i)}r.each(e.pieces,(function(e){r.each(i,(function(i){e.hasOwnProperty(i)&&(t[i]=1)}))})),r.each(t,(function(t,i){var n=0;r.each(this.stateList,(function(t){n|=l(e,t,i)||l(e.target,t,i)}),this),!n&&r.each(this.stateList,(function(t){(e[t]||(e[t]={}))[i]=o.get(i,"inRange"===t?"active":"inactive",s)}))}),this),n.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(e,t){var i=this.option,n=this._pieceList,a=(t?i:e).selected||{};if(i.selected=a,r.each(n,(function(e,t){var i=this.getSelectedMapKey(e);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var o=!1;r.each(n,(function(e,t){var i=this.getSelectedMapKey(e);a[i]&&(o?a[i]=!1:o=!0)}),this)}},getSelectedMapKey:function(e){return"categories"===this._mode?e.value+"":e.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(e){this.option.selected=r.clone(e)},getValueState:function(e){var t=a.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(i){var r=[],n=i.getData();n.each(this.getDataDimension(n),(function(t,i){a.findPieceIndex(t,this._pieceList)===e&&r.push(i)}),this),t.push({seriesId:i.id,dataIndex:r})}),this),t},getRepresentValue:function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var i=e.interval||[];t=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return t},getVisualMeta:function(e){if(!this.isCategory()){var t=[],i=[],n=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),(o=a[a.length-1].interval[1])!==1/0&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return r.each(a,(function(e){var t=e.interval;t&&(t[0]>s&&l([s,t[0]],"outOfRange"),l(t.slice()),s=t[1])}),this),{stops:t,outerColors:i}}function l(r,a){var o=n.getRepresentValue({interval:r});a||(a=n.getValueState(o));var s=e(o,a);r[0]===-1/0?i[0]=s:r[1]===1/0?i[1]=s:t.push({value:r[0],color:s},{value:r[1],color:s})}}}),c={splitNumber:function(){var e=this.option,t=this._pieceList,i=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&i<5;)i++;e.precision=i,o=+o.toFixed(i),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var l=0,c=n[0];l<a;c+=o,l++){var u=l===a-1?n[1]:c+o;t.push({interval:[c,u],close:[1,1]})}e.maxOpen&&t.push({interval:[n[1],1/0],close:[0,0]}),s(t),r.each(t,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(){var e=this.option;r.each(e.categories,(function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})}),this),u(e,this._pieceList)},pieces:function(){var e=this.option,t=this._pieceList;r.each(e.pieces,(function(e,i){r.isObject(e)||(e={value:e});var n={text:"",index:i};if(null!=e.label&&(n.text=e.label),e.hasOwnProperty("value")){var o=n.value=e.value;n.interval=[o,o],n.close=[1,1]}else{for(var s=n.interval=[],l=n.close=[0,0],c=[1,0,1],u=[-1/0,1/0],d=[],h=0;h<2;h++){for(var p=[["gte","gt","min"],["lte","lt","max"]][h],f=0;f<3&&null==s[h];f++)s[h]=e[p[f]],l[h]=c[f],d[h]=2===f;null==s[h]&&(s[h]=u[h])}d[0]&&s[1]===1/0&&(l[0]=0),d[1]&&s[0]===-1/0&&(l[1]=0),s[0]===s[1]&&l[0]&&l[1]&&(n.value=s[0])}n.visual=a.retrieveVisuals(e),t.push(n)}),this),u(e,t),s(t),r.each(t,(function(e){var t=e.close,i=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,i)}),this)}};function u(e,t){var i=e.inverse;("vertical"===e.orient?!i:i)&&t.reverse()}var d=l;e.exports=d},function(e,t,i){var r=i(0),n=i(227),a=i(2),o=i(19).createSymbol,s=i(6),l=i(228),c=n.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var t=this.visualMapModel,i=t.get("textGap"),n=t.textStyleModel,o=n.getFont(),l=n.getTextColor(),c=this._getItemAlign(),u=t.itemSize,d=this._getViewData(),h=d.endsText,p=r.retrieve(t.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],u,p,c),r.each(d.viewPieceList,(function(n){var s=n.piece,d=new a.Group;d.onclick=r.bind(this._onItemClick,this,s),this._enableHoverLink(d,n.indexInModelPieceList);var h=t.getRepresentValue(s);if(this._createItemSymbol(d,h,[0,0,u[0],u[1]]),p){var f=this.visualMapModel.getValueState(h);d.add(new a.Text({style:{x:"right"===c?-i:u[0]+i,y:u[1]/2,text:s.text,textVerticalAlign:"middle",textAlign:c,textFont:o,textFill:l,opacity:"outOfRange"===f?.5:1}}))}e.add(d)}),this),h&&this._renderEndsText(e,h[1],u,p,c),s.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,t){function i(e){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:e,batch:l.makeHighDownBatch(i.findTargetDataIndices(t),i)})}e.on("mouseover",r.bind(i,this,"highlight")).on("mouseout",r.bind(i,this,"downplay"))},_getItemAlign:function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return l.getItemAlign(e,this.api,e.itemSize);var i=t.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(e,t,i,r,n){if(t){var o=new a.Group,s=this.visualMapModel.textStyleModel;o.add(new a.Text({style:{x:r?"right"===n?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:r?n:"center",text:t,textFont:s.getFont(),textFill:s.getTextColor()}})),e.add(o)}},_getViewData:function(){var e=this.visualMapModel,t=r.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),i=e.get("text"),n=e.get("orient"),a=e.get("inverse");return("horizontal"===n?a:!a)?t.reverse():i&&(i=i.slice().reverse()),{viewPieceList:t,endsText:i}},_createItemSymbol:function(e,t,i){e.add(o(this.getControllerVisual(t,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(t,"color")))},_onItemClick:function(e){var t=this.visualMapModel,i=t.option,n=r.clone(i.selected),a=t.getSelectedMapKey(e);"single"===i.selectedMode?(n[a]=!0,r.each(n,(function(e,t){n[t]=t===a}))):n[a]=!n[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});e.exports=c},function(e,t,i){i(561),(0,i(78).registerPainter)("vml",i(562))},function(e,t,i){var r=i(11),n=i(8).applyTransform,a=i(9),o=i(23),s=i(17),l=i(82),c=i(155),u=i(61),d=i(48),h=i(41),p=i(10),f=i(50),m=i(83),g=i(231),y=f.CMD,_=Math.round,v=Math.sqrt,C=Math.abs,x=Math.cos,b=Math.sin,S=Math.max;if(!r.canvasSupported){var T=21600,E=T/2,w=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=T+","+T,e.coordorigin="0,0"},A=function(e,t,i){return"rgb("+[e,t,i].join(",")+")"},P=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},D=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},M=function(e,t,i){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+i},I=l.parsePercent,R=function(e,t,i){var r=o.parse(t);i=+i,isNaN(i)&&(i=1),r&&(e.color=A(r[0],r[1],r[2]),e.opacity=i*r[3])},O=function(e,t,i,r){var a="fill"===t,s=e.getElementsByTagName(t)[0];null!=i[t]&&"none"!==i[t]&&(a||!a&&i.lineWidth)?(e[a?"filled":"stroked"]="true",i[t]instanceof m&&D(e,s),s||(s=g.createNode(t)),a?function(e,t,i){var r,a,s=t.fill;if(null!=s)if(s instanceof m){var l,c=0,u=[0,0],d=0,h=1,p=i.getBoundingRect(),f=p.width,g=p.height;if("linear"===s.type){l="gradient";var y=i.transform,_=[s.x*f,s.y*g],v=[s.x2*f,s.y2*g];y&&(n(_,_,y),n(v,v,y));var C=v[0]-_[0],x=v[1]-_[1];(c=180*Math.atan2(C,x)/Math.PI)<0&&(c+=360),c<1e-6&&(c=0)}else{l="gradientradial";_=[s.x*f,s.y*g],y=i.transform;var b=i.scale,E=f,w=g;u=[(_[0]-p.x)/E,(_[1]-p.y)/w],y&&n(_,_,y),E/=b[0]*T,w/=b[1]*T;var P=S(E,w);d=0/P,h=2*s.r/P-d}var D=s.colorStops.slice();D.sort((function(e,t){return e.offset-t.offset}));for(var M=D.length,I=[],O=[],L=0;L<M;L++){var N=D[L],F=(r=N.color,a=void 0,a=o.parse(r),[A(a[0],a[1],a[2]),a[3]]);O.push(N.offset*h+d+" "+F[0]),0!==L&&L!==M-1||I.push(F)}if(M>=2){var B=I[0][0],V=I[1][0],k=I[0][1]*t.opacity,z=I[1][1]*t.opacity;e.type=l,e.method="none",e.focus="100%",e.angle=c,e.color=B,e.color2=V,e.colors=O.join(","),e.opacity=z,e.opacity2=k}"radial"===l&&(e.focusposition=u.join(","))}else R(e,s,t.opacity)}(s,i,r):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof m||R(e,t.stroke,t.opacity)}(s,i),P(e,s)):(e[a?"filled":"stroked"]="false",D(e,s))},L=[[],[],[]];p.prototype.brushVML=function(e){var t=this.style,i=this._vmlEl;i||(i=g.createNode("shape"),w(i),this._vmlEl=i),O(i,"fill",t,this),O(i,"stroke",t,this);var r=this.transform,a=null!=r,o=i.getElementsByTagName("stroke")[0];if(o){var s=t.lineWidth;if(a&&!t.strokeNoScale){var l=r[0]*r[3]-r[1]*r[2];s*=v(C(l))}o.weight=s+"px"}var c=this.path||(this.path=new f);this.__dirtyPath&&(c.beginPath(),c.subPixelOptimize=!1,this.buildPath(c,this.shape),c.toStatic(),this.__dirtyPath=!1),i.path=function(e,t){var i,r,a,o,s,l,c=y.M,u=y.C,d=y.L,h=y.A,p=y.Q,f=[],m=e.data,g=e.len();for(o=0;o<g;){switch(r="",i=0,a=m[o++]){case c:r=" m ",i=1,s=m[o++],l=m[o++],L[0][0]=s,L[0][1]=l;break;case d:r=" l ",i=1,s=m[o++],l=m[o++],L[0][0]=s,L[0][1]=l;break;case p:case u:r=" c ",i=3;var C,S,w=m[o++],A=m[o++],P=m[o++],D=m[o++];a===p?(C=P,S=D,P=(P+2*w)/3,D=(D+2*A)/3,w=(s+2*w)/3,A=(l+2*A)/3):(C=m[o++],S=m[o++]),L[0][0]=w,L[0][1]=A,L[1][0]=P,L[1][1]=D,L[2][0]=C,L[2][1]=S,s=C,l=S;break;case h:var M=0,I=0,R=1,O=1,N=0;t&&(M=t[4],I=t[5],R=v(t[0]*t[0]+t[1]*t[1]),O=v(t[2]*t[2]+t[3]*t[3]),N=Math.atan2(-t[1]/O,t[0]/R));var F=m[o++],B=m[o++],V=m[o++],k=m[o++],z=m[o++]+N,G=m[o++]+z+N;o++;var U=m[o++],$=F+x(z)*V,H=B+b(z)*k,W=(w=F+x(G)*V,A=B+b(G)*k,U?" wa ":" at ");Math.abs($-w)<1e-4&&(Math.abs(G-z)>.01?U&&($+=.0125):Math.abs(H-B)<1e-4?U&&$<F||!U&&$>F?A-=.0125:A+=.0125:U&&H<B||!U&&H>B?w+=.0125:w-=.0125),f.push(W,_(((F-V)*R+M)*T-E),",",_(((B-k)*O+I)*T-E),",",_(((F+V)*R+M)*T-E),",",_(((B+k)*O+I)*T-E),",",_(($*R+M)*T-E),",",_((H*O+I)*T-E),",",_((w*R+M)*T-E),",",_((A*O+I)*T-E)),s=w,l=A;break;case y.R:var j=L[0],q=L[1];j[0]=m[o++],j[1]=m[o++],q[0]=j[0]+m[o++],q[1]=j[1]+m[o++],t&&(n(j,j,t),n(q,q,t)),j[0]=_(j[0]*T-E),q[0]=_(q[0]*T-E),j[1]=_(j[1]*T-E),q[1]=_(q[1]*T-E),f.push(" m ",j[0],",",j[1]," l ",q[0],",",j[1]," l ",q[0],",",q[1]," l ",j[0],",",q[1]);break;case y.Z:f.push(" x ")}if(i>0){f.push(r);for(var Y=0;Y<i;Y++){var X=L[Y];t&&n(X,X,t),f.push(_(X[0]*T-E),",",_(X[1]*T-E),Y<i-1?",":"")}}}return f.join("")}(c,this.transform),i.style.zIndex=M(this.zlevel,this.z,this.z2),P(e,i),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},p.prototype.onRemove=function(e){D(e,this._vmlEl),this.removeRectText(e)},p.prototype.onAdd=function(e){P(e,this._vmlEl),this.appendRectText(e)};d.prototype.brushVML=function(e){var t,i,r,a=this.style,o=a.image;if("object"==typeof(r=o)&&r.tagName&&"IMG"===r.tagName.toUpperCase()){var s=o.src;if(s===this._imageSrc)t=this._imageWidth,i=this._imageHeight;else{var l=o.runtimeStyle,c=l.width,u=l.height;l.width="auto",l.height="auto",t=o.width,i=o.height,l.width=c,l.height=u,this._imageSrc=s,this._imageWidth=t,this._imageHeight=i}o=s}else o===this._imageSrc&&(t=this._imageWidth,i=this._imageHeight);if(o){var d=a.x||0,h=a.y||0,p=a.width,f=a.height,m=a.sWidth,y=a.sHeight,C=a.sx||0,x=a.sy||0,b=m&&y,T=this._vmlEl;T||(T=g.doc.createElement("div"),w(T),this._vmlEl=T);var E,A=T.style,D=!1,I=1,R=1;if(this.transform&&(E=this.transform,I=v(E[0]*E[0]+E[1]*E[1]),R=v(E[2]*E[2]+E[3]*E[3]),D=E[1]||E[2]),D){var O=[d,h],L=[d+p,h],N=[d,h+f],F=[d+p,h+f];n(O,O,E),n(L,L,E),n(N,N,E),n(F,F,E);var B=S(O[0],L[0],N[0],F[0]),V=S(O[1],L[1],N[1],F[1]),k=[];k.push("M11=",E[0]/I,",","M12=",E[2]/R,",","M21=",E[1]/I,",","M22=",E[3]/R,",","Dx=",_(d*I+E[4]),",","Dy=",_(h*R+E[5])),A.padding="0 "+_(B)+"px "+_(V)+"px 0",A.filter="progid:DXImageTransform.Microsoft.Matrix("+k.join("")+", SizingMethod=clip)"}else E&&(d=d*I+E[4],h=h*R+E[5]),A.filter="",A.left=_(d)+"px",A.top=_(h)+"px";var z=this._imageEl,G=this._cropEl;z||(z=g.doc.createElement("div"),this._imageEl=z);var U=z.style;if(b){if(t&&i)U.width=_(I*t*p/m)+"px",U.height=_(R*i*f/y)+"px";else{var $=new Image,H=this;$.onload=function(){$.onload=null,t=$.width,i=$.height,U.width=_(I*t*p/m)+"px",U.height=_(R*i*f/y)+"px",H._imageWidth=t,H._imageHeight=i,H._imageSrc=o},$.src=o}G||((G=g.doc.createElement("div")).style.overflow="hidden",this._cropEl=G);var W=G.style;W.width=_((p+C*p/m)*I),W.height=_((f+x*f/y)*R),W.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-C*p/m*I+",Dy="+-x*f/y*R+")",G.parentNode||T.appendChild(G),z.parentNode!==G&&G.appendChild(z)}else U.width=_(I*p)+"px",U.height=_(R*f)+"px",T.appendChild(z),G&&G.parentNode&&(T.removeChild(G),this._cropEl=null);var j="",q=a.opacity;q<1&&(j+=".Alpha(opacity="+_(100*q)+") "),j+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+o+", SizingMethod=scale)",U.filter=j,T.style.zIndex=M(this.zlevel,this.z,this.z2),P(e,T),null!=a.text&&this.drawRectText(e,this.getBoundingRect())}},d.prototype.onRemove=function(e){D(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},d.prototype.onAdd=function(e){P(e,this._vmlEl),this.appendRectText(e)};var N,F={},B=0,V=document.createElement("div");s.$override("measureText",(function(e,t){var i=g.doc;N||((N=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",g.doc.body.appendChild(N));try{N.style.font=t}catch(e){}return N.innerHTML="",N.appendChild(i.createTextNode(e)),{width:N.offsetWidth}}));for(var k=new a,z=function(e,t,i,r){var a=this.style;this.__dirty&&l.normalizeTextStyle(a,!0);var o=a.text;if(null!=o&&(o+=""),o){if(a.rich){var c=s.parseRichText(o,a);o=[];for(var u=0;u<c.lines.length;u++){for(var d=c.lines[u].tokens,h=[],p=0;p<d.length;p++)h.push(d[p].text);o.push(h.join(""))}o=o.join("\n")}var f,m,y=a.textAlign,v=a.textVerticalAlign,C=function(e){var t=F[e];if(!t){B>100&&(B=0,F={});var i,r=V.style;try{r.font=e,i=r.fontFamily.split(",")[0]}catch(e){}t={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:i||"Microsoft YaHei"},F[e]=t,B++}return t}(a.font),x=C.style+" "+C.variant+" "+C.weight+" "+C.size+'px "'+C.family+'"';i=i||s.getBoundingRect(o,x,y,v,a.textPadding,a.textLineHeight);var b=this.transform;if(b&&!r&&(k.copy(t),k.applyTransform(b),t=k),r)f=t.x,m=t.y;else{var S=a.textPosition;if(S instanceof Array)f=t.x+I(S[0],t.width),m=t.y+I(S[1],t.height),y=y||"left";else{var T=this.calculateTextPosition?this.calculateTextPosition({},a,t):s.calculateTextPosition({},a,t);f=T.x,m=T.y,y=y||T.textAlign,v=v||T.textVerticalAlign}}f=s.adjustTextX(f,i.width,y),m=s.adjustTextY(m,i.height,v),m+=i.height/2;var E,A,D,R=g.createNode,L=this._textVmlEl;L?A=(E=(D=L.firstChild).nextSibling).nextSibling:(L=R("line"),E=R("path"),A=R("textpath"),D=R("skew"),A.style["v-text-align"]="left",w(L),E.textpathok=!0,A.on=!0,L.from="0 0",L.to="1000 0.05",P(L,D),P(L,E),P(L,A),this._textVmlEl=L);var N=[f,m],z=L.style;b&&r?(n(N,N,b),D.on=!0,D.matrix=b[0].toFixed(3)+","+b[2].toFixed(3)+","+b[1].toFixed(3)+","+b[3].toFixed(3)+",0,0",D.offset=(_(N[0])||0)+","+(_(N[1])||0),D.origin="0 0",z.left="0px",z.top="0px"):(D.on=!1,z.left=_(f)+"px",z.top=_(m)+"px"),A.string=String(o).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{A.style.font=x}catch(e){}O(L,"fill",{fill:a.textFill,opacity:a.opacity},this),O(L,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),L.style.zIndex=M(this.zlevel,this.z,this.z2),P(e,L)}},G=function(e){D(e,this._textVmlEl),this._textVmlEl=null},U=function(e){P(e,this._textVmlEl)},$=[c,u,d,p,h],H=0;H<$.length;H++){var W=$[H].prototype;W.drawRectText=z,W.removeRectText=G,W.appendRectText=U}h.prototype.brushVML=function(e){var t=this.style;null!=t.text?this.drawRectText(e,{x:t.x||0,y:t.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(e)},h.prototype.onRemove=function(e){this.removeRectText(e)},h.prototype.onAdd=function(e){this.appendRectText(e)}}},function(e,t,i){var r=i(60),n=i(231),a=i(0).each;function o(e){return parseInt(e,10)}function s(e,t){n.initVML(),this.root=e,this.storage=t;var i=document.createElement("div"),r=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",r.style.cssText="position:absolute;left:0;top:0;",e.appendChild(i),this._vmlRoot=r,this._vmlViewport=i,this.resize();var a=t.delFromStorage,o=t.addToStorage;t.delFromStorage=function(e){a.call(t,e),e&&e.onRemove&&e.onRemove(r)},t.addToStorage=function(e){e.onAdd&&e.onAdd(r),o.call(t,e)},this._firstPaint=!0}s.prototype={constructor:s,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0,!0);this._paintList(e)},_paintList:function(e){for(var t=this._vmlRoot,i=0;i<e.length;i++){var r=e[i];r.invisible||r.ignore?(r.__alreadyNotVisible||r.onRemove(t),r.__alreadyNotVisible=!0):(r.__alreadyNotVisible&&r.onAdd(t),r.__alreadyNotVisible=!1,r.__dirty&&(r.beforeBrush&&r.beforeBrush(),(r.brushVML||r.brush).call(r,t),r.afterBrush&&r.afterBrush())),r.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(t),this._firstPaint=!1)},resize:function(e,t){e=null==e?this._getWidth():e,t=null==t?this._getHeight():t;if(this._width!==e||this._height!==t){this._width=e,this._height=t;var i=this._vmlViewport.style;i.width=e+"px",i.height=t+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var e=this.root,t=e.currentStyle;return(e.clientWidth||o(t.width))-o(t.paddingLeft)-o(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||o(t.height))-o(t.paddingTop)-o(t.paddingBottom)|0}},a(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){var t;s.prototype[e]=(t=e,function(){r('In IE8.0 VML mode painter not support method "'+t+'"')})}));var l=s;e.exports=l},function(e,t,i){i(131),(0,i(78).registerPainter)("svg",i(564))},function(e,t,i){var r=i(132).createElement,n=i(0),a=i(60),o=i(10),s=i(48),l=i(41),c=i(565),u=i(566),d=i(567),h=i(568),p=i(131),f=p.path,m=p.image,g=p.text;function y(e){return parseInt(e,10)}function _(e,t){return t&&e&&t.parentNode!==e}function v(e,t,i){if(_(e,t)&&i){var r=i.nextSibling;r?e.insertBefore(t,r):e.appendChild(t)}}function C(e,t){if(_(e,t)){var i=e.firstChild;i?e.insertBefore(t,i):e.appendChild(t)}}function x(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function b(e){return e.__textSvgEl}function S(e){return e.__svgEl}var T=function(e,t,i,a){this.root=e,this.storage=t,this._opts=i=n.extend({},i||{});var o=r("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var s=r("g");o.appendChild(s);var l=r("g");o.appendChild(l),this.gradientManager=new u(a,l),this.clipPathManager=new d(a,l),this.shadowManager=new h(a,l);var c=document.createElement("div");c.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=l,this._backgroundRoot=s,this._viewport=c,e.appendChild(c),c.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]};T.prototype={constructor:T,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=r("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,i,r=this._svgRoot,n=this._visibleList,a=e.length,u=[];for(t=0;t<a;t++){var d=e[t],h=(i=d)instanceof o?f:i instanceof s?m:i instanceof l?g:f,p=S(d)||b(d);d.invisible||(d.__dirty&&(h&&h.brush(d),this.clipPathManager.update(d),d.style&&(this.gradientManager.update(d.style.fill),this.gradientManager.update(d.style.stroke),this.shadowManager.update(p,d)),d.__dirty=!1),u.push(d))}var y,_=c(n,u);for(t=0;t<_.length;t++){if((w=_[t]).removed)for(var T=0;T<w.count;T++){p=S(d=n[w.indices[T]]);var E=b(d);x(r,p),x(r,E)}}for(t=0;t<_.length;t++){var w;if((w=_[t]).added)for(T=0;T<w.count;T++){p=S(d=u[w.indices[T]]),E=b(d);y?v(r,p,y):C(r,p),p?v(r,E,p):y?v(r,E,y):C(r,E),v(r,E,p),y=E||p||y,this.gradientManager.addWithoutUpdate(p||E,d),this.shadowManager.addWithoutUpdate(p||E,d),this.clipPathManager.markUsed(d)}else if(!w.removed)for(T=0;T<w.count;T++){p=S(d=u[w.indices[T]]),E=b(d),p=S(d),E=b(d);this.gradientManager.markUsed(d),this.gradientManager.addWithoutUpdate(p||E,d),this.shadowManager.markUsed(d),this.shadowManager.addWithoutUpdate(p||E,d),this.clipPathManager.markUsed(d),E&&v(r,E,p),y=p||E||y}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=u},_getDefs:function(e){var t,i=this._svgDom;return 0===(t=i.getElementsByTagName("defs")).length?e?((t=i.insertBefore(r("defs"),i.firstChild)).contains||(t.contains=function(e){var i=t.children;if(!i)return!1;for(var r=i.length-1;r>=0;--r)if(i[r]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var i=this._viewport;i.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=this._getSize(0),t=this._getSize(1),i.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var n=i.style;n.width=e+"px",n.height=t+"px";var a=this._svgDom;a.setAttribute("width",e),a.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,i=["width","height"][e],r=["clientWidth","clientHeight"][e],n=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[i]&&"auto"!==t[i])return parseFloat(t[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||y(s[i])||y(o.style[i]))-(y(s[n])||0)-(y(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},n.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){var t;T.prototype[e]=(t=e,function(){a('In SVG mode painter not support method "'+t+'"')})}));var E=T;e.exports=E},function(e,t){function i(){}function r(e,t,i,r){for(var n=0,a=t.length,o=0,s=0;n<a;n++){var l=t[n];if(l.removed){for(c=[],u=s;u<s+l.count;u++)c.push(u);l.indices=c,s+=l.count}else{for(var c=[],u=o;u<o+l.count;u++)c.push(u);l.indices=c,o+=l.count,l.added||(s+=l.count)}}return t}i.prototype={diff:function(e,t,i){i||(i=function(e,t){return e===t}),this.equals=i;var n=this;e=e.slice();var a=(t=t.slice()).length,o=e.length,s=1,l=a+o,c=[{newPos:-1,components:[]}],u=this.extractCommon(c[0],t,e,0);if(c[0].newPos+1>=a&&u+1>=o){for(var d=[],h=0;h<t.length;h++)d.push(h);return[{indices:d,count:t.length}]}function p(){for(var i=-1*s;i<=s;i+=2){var l,u=c[i-1],d=c[i+1],h=(d?d.newPos:0)-i;u&&(c[i-1]=void 0);var p=u&&u.newPos+1<a,f=d&&0<=h&&h<o;if(p||f){if(!p||f&&u.newPos<d.newPos?(l={newPos:(m=d).newPos,components:m.components.slice(0)},n.pushComponent(l.components,void 0,!0)):((l=u).newPos++,n.pushComponent(l.components,!0,void 0)),h=n.extractCommon(l,t,e,i),l.newPos+1>=a&&h+1>=o)return r(n,l.components,t,e);c[i]=l}else c[i]=void 0}var m;s++}for(;s<=l;){var f=p();if(f)return f}},pushComponent:function(e,t,i){var r=e[e.length-1];r&&r.added===t&&r.removed===i?e[e.length-1]={count:r.count+1,added:t,removed:i}:e.push({count:1,added:t,removed:i})},extractCommon:function(e,t,i,r){for(var n=t.length,a=i.length,o=e.newPos,s=o-r,l=0;o+1<n&&s+1<a&&this.equals(t[o+1],i[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},tokenize:function(e){return e.slice()},join:function(e){return e.slice()}};var n=new i;e.exports=function(e,t,i){return n.diff(e,t,i)}},function(e,t,i){var r=i(133),n=i(0),a=i(60),o=i(23);function s(e,t){r.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}n.inherits(s,r),s.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var i=this;n.each(["fill","stroke"],(function(r){if(t.style[r]&&("linear"===t.style[r].type||"radial"===t.style[r].type)){var n,a=t.style[r],o=i.getDefs(!0);a._dom?(n=a._dom,o.contains(a._dom)||i.addDom(n)):n=i.add(a),i.markUsed(t);var s=n.getAttribute("id");e.setAttribute(r,"url(#"+s+")")}}))}},s.prototype.add=function(e){var t;if("linear"===e.type)t=this.createElement("linearGradient");else{if("radial"!==e.type)return a("Illegal gradient type."),null;t=this.createElement("radialGradient")}return e.id=e.id||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-gradient-"+e.id),this.updateDom(e,t),this.addDom(t),t},s.prototype.update=function(e){var t=this;r.prototype.update.call(this,e,(function(){var i=e.type,r=e._dom.tagName;"linear"===i&&"linearGradient"===r||"radial"===i&&"radialGradient"===r?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},s.prototype.updateDom=function(e,t){if("linear"===e.type)t.setAttribute("x1",e.x),t.setAttribute("y1",e.y),t.setAttribute("x2",e.x2),t.setAttribute("y2",e.y2);else{if("radial"!==e.type)return void a("Illegal gradient type.");t.setAttribute("cx",e.x),t.setAttribute("cy",e.y),t.setAttribute("r",e.r)}e.global?t.setAttribute("gradientUnits","userSpaceOnUse"):t.setAttribute("gradientUnits","objectBoundingBox"),t.innerHTML="";for(var i=e.colorStops,r=0,n=i.length;r<n;++r){var s=this.createElement("stop");s.setAttribute("offset",100*i[r].offset+"%");var l=i[r].color;if(l.indexOf("rgba")>-1){var c=o.parse(l)[3],u=o.toHex(l);s.setAttribute("stop-color","#"+u),s.setAttribute("stop-opacity",c)}else s.setAttribute("stop-color",i[r].color);t.appendChild(s)}e._dom=t},s.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&r.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&r.prototype.markUsed.call(this,t._dom)}};var l=s;e.exports=l},function(e,t,i){var r=i(133),n=i(0),a=i(15);function o(e,t){r.call(this,e,t,"clipPath","__clippath_in_use__")}n.inherits(o,r),o.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var i=this.getTextSvgElement(e);i&&this.updateDom(i,e.__clipPaths,!0),this.markUsed(e)},o.prototype.updateDom=function(e,t,i){if(t&&t.length>0){var r,n,o=this.getDefs(!0),s=t[0],l=i?"_textDom":"_dom";s[l]?(n=s[l].getAttribute("id"),r=s[l],o.contains(r)||o.appendChild(r)):(n="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",n),o.appendChild(r),s[l]=r);var c=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!i){var u=Array.prototype.slice.call(s.transform);a.mul(s.transform,s.parent.invTransform,s.transform),c.brush(s),s.transform=u}else c.brush(s);var d=this.getSvgElement(s);r.innerHTML="",r.appendChild(d.cloneNode()),e.setAttribute("clip-path","url(#"+n+")"),t.length>1&&this.updateDom(r,t.slice(1),i)}else e&&e.setAttribute("clip-path","none")},o.prototype.markUsed=function(e){var t=this;e.__clipPaths&&n.each(e.__clipPaths,(function(e){e._dom&&r.prototype.markUsed.call(t,e._dom),e._textDom&&r.prototype.markUsed.call(t,e._textDom)}))};var s=o;e.exports=s},function(e,t,i){var r=i(133);function n(e,t){r.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function a(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}i(0).inherits(n,r),n.prototype.addWithoutUpdate=function(e,t){if(t&&a(t.style)){var i;if(t._shadowDom)i=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(i);else i=this.add(t);this.markUsed(t);var r=i.getAttribute("id");e.style.filter="url(#"+r+")"}},n.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},n.prototype.update=function(e,t){if(a(t.style)){var i=this;r.prototype.update.call(this,t,(function(){i.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},n.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},n.prototype.updateDom=function(e,t){var i=t.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var r,n,a,o,s=e.style,l=e.scale&&e.scale[0]||1,c=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)r=s.shadowOffsetX||0,n=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);r=s.textShadowOffsetX||0,n=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",r/l),i.setAttribute("dy",n/c),i.setAttribute("flood-color",o);var u=a/2/l+" "+a/2/c;i.setAttribute("stdDeviation",u),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(a/2*200)+"%"),t.setAttribute("height",Math.ceil(a/2*200)+"%"),t.appendChild(i),e._shadowDom=t},n.prototype.markUsed=function(e){e._shadowDom&&r.prototype.markUsed.call(this,e._shadowDom)};var o=n;e.exports=o},function(e,t,i){"use strict";i.r(t);var r=["version","author","home_page","init","ready","use","mixin","Namespace","Initialized"];var n={version:"1.11.0",author:"Caven Chen <cavencj@gmail.com>",home_page:"https://www.dvgis.cn",Namespace:{},echarts:{},Initialized:!1};!function(e){e.mixin=function(t){for(var i in t)!r.includes(i)&&(e[i]=t[i]);return this}}(n),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var i=[];return i.unshift(this),"function"==typeof e.install?e.install.apply(e,i):"function"==typeof e&&e.apply(null,i),t.push(e),this}}(n),i(233);var a=!1;n.init=function(e){if(a)e&&e();else{var t=new Promise((function(e,t){e(i(234))})),r=new Promise((function(e,t){e(i(274))}));Promise.all([t,r]).then((function(t){n.Namespace.Cesium=t[0],n.echarts=t[1],a=!0,delete window.Cesium,e&&e()}))}};t.default=n}]).default}));
*/var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,s,l=o(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(r){s=r(i);for(var d=0;d<s.length;d++)a.call(i,s[d])&&(l[s[d]]=i[s[d]])}}return l}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}},function(e,t,i){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,i){"use strict";var r,n=i(76),a=i(268),o=i(145),s=i(146),l=i(269);function c(e,t){return e.msg=l[t],t}function u(e){return(e<<1)-(e>4?9:0)}function d(e){for(var t=e.length;--t>=0;)e[t]=0}function h(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(n.arraySet(e.output,t.pending_buf,t.pending_out,i,e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))}function p(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,h(e.strm)}function f(e,t){e.pending_buf[e.pending++]=t}function m(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function g(e,t){var i,r,n=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,u=e.w_mask,d=e.prev,h=e.strstart+258,p=c[a+o-1],f=c[a+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(i=t)+o]===f&&c[i+o-1]===p&&c[i]===c[a]&&c[++i]===c[a+1]){a+=2,i++;do{}while(c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&c[++a]===c[++i]&&a<h);if(r=258-(h-a),a=h-258,r>o){if(e.match_start=t,o=r,r>=s)break;p=c[a+o-1],f=c[a+o]}}}while((t=d[t&u])>l&&0!=--n);return o<=e.lookahead?o:e.lookahead}function y(e){var t,i,r,a,l,c,u,d,h,p,f=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-262)){n.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=i=e.hash_size;do{r=e.head[--t],e.head[t]=r>=f?r-f:0}while(--i);t=i=f;do{r=e.prev[--t],e.prev[t]=r>=f?r-f:0}while(--i);a+=f}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,h=a,p=void 0,(p=c.avail_in)>h&&(p=h),i=0===p?0:(c.avail_in-=p,n.arraySet(u,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=o(c.adler,u,p,d):2===c.state.wrap&&(c.adler=s(c.adler,u,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=i,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function _(e,t){for(var i,r;;){if(e.lookahead<262){if(y(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-262&&(e.match_length=g(e,i)),e.match_length>=3)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}function v(e,t){for(var i,r,n;;){if(e.lookahead<262){if(y(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-262&&(e.match_length=g(e,i),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(p(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=a._tr_tally(e,0,e.window[e.strstart-1]))&&p(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,i,r,n){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=r,this.func=n}function x(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new n.Buf16(1146),this.dyn_dtree=new n.Buf16(122),this.bl_tree=new n.Buf16(78),d(this.dyn_ltree),d(this.dyn_dtree),d(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(16),this.heap=new n.Buf16(573),d(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(573),d(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function b(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,a._tr_init(t),0):c(e,-2)}function S(e){var t,i=b(e);return 0===i&&((t=e.state).window_size=2*t.w_size,d(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),i}function T(e,t,i,r,a,o){if(!e)return-2;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),a<1||a>9||8!==i||r<8||r>15||t<0||t>9||o<0||o>4)return c(e,-2);8===r&&(r=9);var l=new x;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new n.Buf8(2*l.w_size),l.head=new n.Buf16(l.hash_size),l.prev=new n.Buf16(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new n.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=o,l.method=i,S(e)}r=[new C(0,0,0,0,(function(e,t){var i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(y(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+i;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,p(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(p(e,!1),e.strm.avail_out),1)})),new C(4,4,8,4,_),new C(4,5,16,8,_),new C(4,6,32,32,_),new C(4,4,16,16,v),new C(8,16,32,32,v),new C(8,16,128,128,v),new C(8,32,128,256,v),new C(32,128,258,1024,v),new C(32,258,258,4096,v)],t.deflateInit=function(e,t){return T(e,t,8,15,8,0)},t.deflateInit2=T,t.deflateReset=S,t.deflateResetKeep=b,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var i,n,o,l;if(!e||!e.state||t>5||t<0)return e?c(e,-2):-2;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&4!==t)return c(e,0===e.avail_out?-5:-2);if(n.strm=e,i=n.last_flush,n.last_flush=t,42===n.status)if(2===n.wrap)e.adler=0,f(n,31),f(n,139),f(n,8),n.gzhead?(f(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),f(n,255&n.gzhead.time),f(n,n.gzhead.time>>8&255),f(n,n.gzhead.time>>16&255),f(n,n.gzhead.time>>24&255),f(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),f(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(f(n,255&n.gzhead.extra.length),f(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=s(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(f(n,0),f(n,0),f(n,0),f(n,0),f(n,0),f(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),f(n,3),n.status=113);else{var g=8+(n.w_bits-8<<4)<<8;g|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(g|=32),g+=31-g%31,n.status=113,m(n,g),0!==n.strstart&&(m(n,e.adler>>>16),m(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),h(e),o=n.pending,n.pending!==n.pending_buf_size));)f(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),h(e),o=n.pending,n.pending===n.pending_buf_size)){l=1;break}l=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,f(n,l)}while(0!==l);n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),0===l&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),h(e),o=n.pending,n.pending===n.pending_buf_size)){l=1;break}l=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,f(n,l)}while(0!==l);n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),0===l&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&h(e),n.pending+2<=n.pending_buf_size&&(f(n,255&e.adler),f(n,e.adler>>8&255),e.adler=0,n.status=113)):n.status=113),0!==n.pending){if(h(e),0===e.avail_out)return n.last_flush=-1,0}else if(0===e.avail_in&&u(t)<=u(i)&&4!==t)return c(e,-5);if(666===n.status&&0!==e.avail_in)return c(e,-5);if(0!==e.avail_in||0!==n.lookahead||0!==t&&666!==n.status){var _=2===n.strategy?function(e,t){for(var i;;){if(0===e.lookahead&&(y(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,i=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(n,t):3===n.strategy?function(e,t){for(var i,r,n,o,s=e.window;;){if(e.lookahead<=258){if(y(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[n=e.strstart-1])===s[++n]&&r===s[++n]&&r===s[++n]){o=e.strstart+258;do{}while(r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&r===s[++n]&&n<o);e.match_length=258-(o-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(n,t):r[n.level].func(n,t);if(3!==_&&4!==_||(n.status=666),1===_||3===_)return 0===e.avail_out&&(n.last_flush=-1),0;if(2===_&&(1===t?a._tr_align(n):5!==t&&(a._tr_stored_block(n,0,0,!1),3===t&&(d(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),h(e),0===e.avail_out))return n.last_flush=-1,0}return 4!==t?0:n.wrap<=0?1:(2===n.wrap?(f(n,255&e.adler),f(n,e.adler>>8&255),f(n,e.adler>>16&255),f(n,e.adler>>24&255),f(n,255&e.total_in),f(n,e.total_in>>8&255),f(n,e.total_in>>16&255),f(n,e.total_in>>24&255)):(m(n,e.adler>>>16),m(n,65535&e.adler)),h(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?c(e,-2):(e.state=null,113===t?c(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var i,r,a,s,l,c,u,h,p=t.length;if(!e||!e.state)return-2;if(2===(s=(i=e.state).wrap)||1===s&&42!==i.status||i.lookahead)return-2;for(1===s&&(e.adler=o(e.adler,t,p,0)),i.wrap=0,p>=i.w_size&&(0===s&&(d(i.head),i.strstart=0,i.block_start=0,i.insert=0),h=new n.Buf8(i.w_size),n.arraySet(h,t,p-i.w_size,i.w_size,0),t=h,p=i.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,y(i);i.lookahead>=3;){r=i.strstart,a=i.lookahead-2;do{i.ins_h=(i.ins_h<<i.hash_shift^i.window[r+3-1])&i.hash_mask,i.prev[r&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=r,r++}while(--a);i.strstart=r,i.lookahead=2,y(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=c,e.input=u,e.avail_in=l,i.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,i){"use strict";var r=i(76);function n(e){for(var t=e.length;--t>=0;)e[t]=0}var a=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);n(c);var u=new Array(60);n(u);var d=new Array(512);n(d);var h=new Array(256);n(h);var p=new Array(29);n(p);var f,m,g,y=new Array(30);function _(e,t,i,r,n){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=r,this.max_length=n,this.has_stree=e&&e.length}function v(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function C(e){return e<256?d[e]:d[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function b(e,t,i){e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,x(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)}function S(e,t,i){b(e,i[2*t],i[2*t+1])}function T(e,t){var i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1}function E(e,t,i){var r,n,a=new Array(16),o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(n=0;n<=t;n++){var s=e[2*n+1];0!==s&&(e[2*n]=T(a[s]++,s))}}function w(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function A(e){e.bi_valid>8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function P(e,t,i,r){var n=2*t,a=2*i;return e[n]<e[a]||e[n]===e[a]&&r[t]<=r[i]}function D(e,t,i){for(var r=e.heap[i],n=i<<1;n<=e.heap_len&&(n<e.heap_len&&P(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!P(t,r,e.heap[n],e.depth));)e.heap[i]=e.heap[n],i=n,n<<=1;e.heap[i]=r}function M(e,t,i){var r,n,s,l,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],n=e.pending_buf[e.l_buf+c],c++,0===r?S(e,n,t):(S(e,(s=h[n])+256+1,t),0!==(l=a[s])&&b(e,n-=p[s],l),S(e,s=C(--r),i),0!==(l=o[s])&&b(e,r-=y[s],l))}while(c<e.last_lit);S(e,256,t)}function I(e,t){var i,r,n,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i<l;i++)0!==a[2*i]?(e.heap[++e.heap_len]=c=i,e.depth[i]=0):a[2*i+1]=0;for(;e.heap_len<2;)a[2*(n=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[n]=0,e.opt_len--,s&&(e.static_len-=o[2*n+1]);for(t.max_code=c,i=e.heap_len>>1;i>=1;i--)D(e,a,i);n=l;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=r,a[2*n]=a[2*i]+a[2*r],e.depth[n]=(e.depth[i]>=e.depth[r]?e.depth[i]:e.depth[r])+1,a[2*i+1]=a[2*r+1]=n,e.heap[1]=n++,D(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var i,r,n,a,o,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,i=e.heap_max+1;i<573;i++)(a=l[2*l[2*(r=e.heap[i])+1]+1]+1)>f&&(a=f,m++),l[2*r+1]=a,r>c||(e.bl_count[a]++,o=0,r>=p&&(o=h[r-p]),s=l[2*r],e.opt_len+=s*(a+o),d&&(e.static_len+=s*(u[2*r+1]+o)));if(0!==m){do{for(a=f-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(a=f;0!==a;a--)for(r=e.bl_count[a];0!==r;)(n=e.heap[--i])>c||(l[2*n+1]!==a&&(e.opt_len+=(a-l[2*n+1])*l[2*n],l[2*n+1]=a),r--)}}(e,t),E(a,c,e.bl_count)}function R(e,t,i){var r,n,a=-1,o=t[1],s=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(i+1)+1]=65535,r=0;r<=i;r++)n=o,o=t[2*(r+1)+1],++s<l&&n===o||(s<c?e.bl_tree[2*n]+=s:0!==n?(n!==a&&e.bl_tree[2*n]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=n,0===o?(l=138,c=3):n===o?(l=6,c=3):(l=7,c=4))}function O(e,t,i){var r,n,a=-1,o=t[1],s=0,l=7,c=4;for(0===o&&(l=138,c=3),r=0;r<=i;r++)if(n=o,o=t[2*(r+1)+1],!(++s<l&&n===o)){if(s<c)do{S(e,n,e.bl_tree)}while(0!=--s);else 0!==n?(n!==a&&(S(e,n,e.bl_tree),s--),S(e,16,e.bl_tree),b(e,s-3,2)):s<=10?(S(e,17,e.bl_tree),b(e,s-3,3)):(S(e,18,e.bl_tree),b(e,s-11,7));s=0,a=n,0===o?(l=138,c=3):n===o?(l=6,c=3):(l=7,c=4)}}n(y);var L=!1;function N(e,t,i,n){b(e,0+(n?1:0),3),function(e,t,i,n){A(e),n&&(x(e,i),x(e,~i)),r.arraySet(e.pending_buf,e.window,t,i,e.pending),e.pending+=i}(e,t,i,!0)}t._tr_init=function(e){L||(!function(){var e,t,i,r,n,l=new Array(16);for(i=0,r=0;r<28;r++)for(p[r]=i,e=0;e<1<<a[r];e++)h[i++]=r;for(h[i-1]=r,n=0,r=0;r<16;r++)for(y[r]=n,e=0;e<1<<o[r];e++)d[n++]=r;for(n>>=7;r<30;r++)for(y[r]=n<<7,e=0;e<1<<o[r]-7;e++)d[256+n++]=r;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,l[8]++;for(;e<=255;)c[2*e+1]=9,e++,l[9]++;for(;e<=279;)c[2*e+1]=7,e++,l[7]++;for(;e<=287;)c[2*e+1]=8,e++,l[8]++;for(E(c,287,l),e=0;e<30;e++)u[2*e+1]=5,u[2*e]=T(e,5);f=new _(c,a,257,286,15),m=new _(u,o,0,30,15),g=new _(new Array(0),s,0,19,7)}(),L=!0),e.l_desc=new v(e.dyn_ltree,f),e.d_desc=new v(e.dyn_dtree,m),e.bl_desc=new v(e.bl_tree,g),e.bi_buf=0,e.bi_valid=0,w(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,i,r){var n,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),I(e,e.l_desc),I(e,e.d_desc),o=function(e){var t;for(R(e,e.dyn_ltree,e.l_desc.max_code),R(e,e.dyn_dtree,e.d_desc.max_code),I(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),n=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=n&&(n=a)):n=a=i+5,i+4<=n&&-1!==t?N(e,t,i,r):4===e.strategy||a===n?(b(e,2+(r?1:0),3),M(e,c,u)):(b(e,4+(r?1:0),3),function(e,t,i,r){var n;for(b(e,t-257,5),b(e,i-1,5),b(e,r-4,4),n=0;n<r;n++)b(e,e.bl_tree[2*l[n]+1],3);O(e,e.dyn_ltree,t-1),O(e,e.dyn_dtree,i-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),M(e,e.dyn_ltree,e.dyn_dtree)),w(e),r&&A(e)},t._tr_tally=function(e,t,i){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(h[i]+256+1)]++,e.dyn_dtree[2*C(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){b(e,2,3),S(e,256,c),function(e){16===e.bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,i){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,i){"use strict";var r=i(76),n=i(145),a=i(146),o=i(271),s=i(272);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):-2}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function h(e,t){var i,r;return e&&e.state?(r=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=i,r.wbits=t,d(e))):-2}function p(e,t){var i,r;return e?(r=new c,e.state=r,r.window=null,0!==(i=h(e,t))&&(e.state=null),i):-2}var f,m,g=!0;function y(e){if(g){var t;for(f=new r.Buf32(512),m=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),g=!1}e.lencode=f,e.lenbits=9,e.distcode=m,e.distbits=5}function _(e,t,i,n){var a,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),n>=o.wsize?(r.arraySet(o.window,t,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>n&&(a=n),r.arraySet(o.window,t,i-n,a,o.wnext),(n-=a)?(r.arraySet(o.window,t,i-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}t.inflateReset=d,t.inflateReset2=h,t.inflateResetKeep=u,t.inflateInit=function(e){return p(e,15)},t.inflateInit2=p,t.inflate=function(e,t){var i,c,u,d,h,p,f,m,g,v,C,x,b,S,T,E,w,A,P,D,M,I,R,O,L=0,N=new r.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(i=e.state).mode&&(i.mode=13),h=e.next_out,u=e.output,f=e.avail_out,d=e.next_in,c=e.input,p=e.avail_in,m=i.hold,g=i.bits,v=p,C=f,I=0;e:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(2&i.wrap&&35615===m){i.check=0,N[0]=255&m,N[1]=m>>>8&255,i.check=a(i.check,N,2,0),m=0,g=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",i.mode=30;break}if(g-=4,M=8+(15&(m>>>=4)),0===i.wbits)i.wbits=M;else if(M>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<<M,e.adler=i.check=1,i.mode=512&m?10:12,m=0,g=0;break;case 2:for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(i.flags=m,8!=(255&i.flags)){e.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=m>>8&1),512&i.flags&&(N[0]=255&m,N[1]=m>>>8&255,i.check=a(i.check,N,2,0)),m=0,g=0,i.mode=3;case 3:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.head&&(i.head.time=m),512&i.flags&&(N[0]=255&m,N[1]=m>>>8&255,N[2]=m>>>16&255,N[3]=m>>>24&255,i.check=a(i.check,N,4,0)),m=0,g=0,i.mode=4;case 4:for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.head&&(i.head.xflags=255&m,i.head.os=m>>8),512&i.flags&&(N[0]=255&m,N[1]=m>>>8&255,i.check=a(i.check,N,2,0)),m=0,g=0,i.mode=5;case 5:if(1024&i.flags){for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.length=m,i.head&&(i.head.extra_len=m),512&i.flags&&(N[0]=255&m,N[1]=m>>>8&255,i.check=a(i.check,N,2,0)),m=0,g=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&((x=i.length)>p&&(x=p),x&&(i.head&&(M=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),r.arraySet(i.head.extra,c,d,x,M)),512&i.flags&&(i.check=a(i.check,c,x,d)),p-=x,d+=x,i.length-=x),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===p)break e;x=0;do{M=c[d+x++],i.head&&M&&i.length<65536&&(i.head.name+=String.fromCharCode(M))}while(M&&x<p);if(512&i.flags&&(i.check=a(i.check,c,x,d)),p-=x,d+=x,M)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===p)break e;x=0;do{M=c[d+x++],i.head&&M&&i.length<65536&&(i.head.comment+=String.fromCharCode(M))}while(M&&x<p);if(512&i.flags&&(i.check=a(i.check,c,x,d)),p-=x,d+=x,M)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;g<16;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(m!==(65535&i.check)){e.msg="header crc mismatch",i.mode=30;break}m=0,g=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}e.adler=i.check=l(m),m=0,g=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=h,e.avail_out=f,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=g,2;e.adler=i.check=1,i.mode=12;case 12:if(5===t||6===t)break e;case 13:if(i.last){m>>>=7&g,g-=7&g,i.mode=27;break}for(;g<3;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}switch(i.last=1&m,g-=1,3&(m>>>=1)){case 0:i.mode=14;break;case 1:if(y(i),i.mode=20,6===t){m>>>=2,g-=2;break e}break;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}m>>>=2,g-=2;break;case 14:for(m>>>=7&g,g-=7&g;g<32;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&m,m=0,g=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(x=i.length){if(x>p&&(x=p),x>f&&(x=f),0===x)break e;r.arraySet(u,c,d,x,h),p-=x,d+=x,f-=x,h+=x,i.length-=x;break}i.mode=12;break;case 17:for(;g<14;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(i.nlen=257+(31&m),m>>>=5,g-=5,i.ndist=1+(31&m),m>>>=5,g-=5,i.ncode=4+(15&m),m>>>=4,g-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;g<3;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.lens[F[i.have++]]=7&m,m>>>=3,g-=3}for(;i.have<19;)i.lens[F[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,R={bits:i.lenbits},I=s(0,i.lens,0,19,i.lencode,0,i.work,R),i.lenbits=R.bits,I){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;E=(L=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,w=65535&L,!((T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(w<16)m>>>=T,g-=T,i.lens[i.have++]=w;else{if(16===w){for(O=T+2;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(m>>>=T,g-=T,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}M=i.lens[i.have-1],x=3+(3&m),m>>>=2,g-=2}else if(17===w){for(O=T+3;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}g-=T,M=0,x=3+(7&(m>>>=T)),m>>>=3,g-=3}else{for(O=T+7;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}g-=T,M=0,x=11+(127&(m>>>=T)),m>>>=7,g-=7}if(i.have+x>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;x--;)i.lens[i.have++]=M}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,R={bits:i.lenbits},I=s(1,i.lens,0,i.nlen,i.lencode,0,i.work,R),i.lenbits=R.bits,I){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,R={bits:i.distbits},I=s(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,R),i.distbits=R.bits,I){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(p>=6&&f>=258){e.next_out=h,e.avail_out=f,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=g,o(e,C),h=e.next_out,u=e.output,f=e.avail_out,d=e.next_in,c=e.input,p=e.avail_in,m=i.hold,g=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;E=(L=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,w=65535&L,!((T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(E&&0==(240&E)){for(A=T,P=E,D=w;E=(L=i.lencode[D+((m&(1<<A+P)-1)>>A)])>>>16&255,w=65535&L,!(A+(T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}m>>>=A,g-=A,i.back+=A}if(m>>>=T,g-=T,i.back+=T,i.length=w,0===E){i.mode=26;break}if(32&E){i.back=-1,i.mode=12;break}if(64&E){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&E,i.mode=22;case 22:if(i.extra){for(O=i.extra;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.length+=m&(1<<i.extra)-1,m>>>=i.extra,g-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;E=(L=i.distcode[m&(1<<i.distbits)-1])>>>16&255,w=65535&L,!((T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(0==(240&E)){for(A=T,P=E,D=w;E=(L=i.distcode[D+((m&(1<<A+P)-1)>>A)])>>>16&255,w=65535&L,!(A+(T=L>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}m>>>=A,g-=A,i.back+=A}if(m>>>=T,g-=T,i.back+=T,64&E){e.msg="invalid distance code",i.mode=30;break}i.offset=w,i.extra=15&E,i.mode=24;case 24:if(i.extra){for(O=i.extra;g<O;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}i.offset+=m&(1<<i.extra)-1,m>>>=i.extra,g-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(x=C-f,i.offset>x){if((x=i.offset-x)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}x>i.wnext?(x-=i.wnext,b=i.wsize-x):b=i.wnext-x,x>i.length&&(x=i.length),S=i.window}else S=u,b=h-i.offset,x=i.length;x>f&&(x=f),f-=x,i.length-=x;do{u[h++]=S[b++]}while(--x);0===i.length&&(i.mode=21);break;case 26:if(0===f)break e;u[h++]=i.length,f--,i.mode=21;break;case 27:if(i.wrap){for(;g<32;){if(0===p)break e;p--,m|=c[d++]<<g,g+=8}if(C-=f,e.total_out+=C,i.total+=C,C&&(e.adler=i.check=i.flags?a(i.check,u,C,h-C):n(i.check,u,C,h-C)),C=f,(i.flags?m:l(m))!==i.check){e.msg="incorrect data check",i.mode=30;break}m=0,g=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;g<32;){if(0===p)break e;p--,m+=c[d++]<<g,g+=8}if(m!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=30;break}m=0,g=0}i.mode=29;case 29:I=1;break e;case 30:I=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=h,e.avail_out=f,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=g,(i.wsize||C!==e.avail_out&&i.mode<30&&(i.mode<27||4!==t))&&_(e,e.output,e.next_out,C-e.avail_out)?(i.mode=31,-4):(v-=e.avail_in,C-=e.avail_out,e.total_in+=v,e.total_out+=C,i.total+=C,i.wrap&&C&&(e.adler=i.check=i.flags?a(i.check,u,C,e.next_out-C):n(i.check,u,C,e.next_out-C)),e.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0===v&&0===C||4===t)&&0===I&&(I=-5),I)},t.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?-2:(i.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var i,r=t.length;return e&&e.state?0!==(i=e.state).wrap&&11!==i.mode?-2:11===i.mode&&n(1,t,r,0)!==i.check?-3:_(e,t,r,r)?(i.mode=31,-4):(i.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,i){"use strict";e.exports=function(e,t){var i,r,n,a,o,s,l,c,u,d,h,p,f,m,g,y,_,v,C,x,b,S,T,E,w;i=e.state,r=e.next_in,E=e.input,n=r+(e.avail_in-5),a=e.next_out,w=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),l=i.dmax,c=i.wsize,u=i.whave,d=i.wnext,h=i.window,p=i.hold,f=i.bits,m=i.lencode,g=i.distcode,y=(1<<i.lenbits)-1,_=(1<<i.distbits)-1;e:do{f<15&&(p+=E[r++]<<f,f+=8,p+=E[r++]<<f,f+=8),v=m[p&y];t:for(;;){if(p>>>=C=v>>>24,f-=C,0===(C=v>>>16&255))w[a++]=65535&v;else{if(!(16&C)){if(0==(64&C)){v=m[(65535&v)+(p&(1<<C)-1)];continue t}if(32&C){i.mode=12;break e}e.msg="invalid literal/length code",i.mode=30;break e}x=65535&v,(C&=15)&&(f<C&&(p+=E[r++]<<f,f+=8),x+=p&(1<<C)-1,p>>>=C,f-=C),f<15&&(p+=E[r++]<<f,f+=8,p+=E[r++]<<f,f+=8),v=g[p&_];i:for(;;){if(p>>>=C=v>>>24,f-=C,!(16&(C=v>>>16&255))){if(0==(64&C)){v=g[(65535&v)+(p&(1<<C)-1)];continue i}e.msg="invalid distance code",i.mode=30;break e}if(b=65535&v,f<(C&=15)&&(p+=E[r++]<<f,(f+=8)<C&&(p+=E[r++]<<f,f+=8)),(b+=p&(1<<C)-1)>l){e.msg="invalid distance too far back",i.mode=30;break e}if(p>>>=C,f-=C,b>(C=a-o)){if((C=b-C)>u&&i.sane){e.msg="invalid distance too far back",i.mode=30;break e}if(S=0,T=h,0===d){if(S+=c-C,C<x){x-=C;do{w[a++]=h[S++]}while(--C);S=a-b,T=w}}else if(d<C){if(S+=c+d-C,(C-=d)<x){x-=C;do{w[a++]=h[S++]}while(--C);if(S=0,d<x){x-=C=d;do{w[a++]=h[S++]}while(--C);S=a-b,T=w}}}else if(S+=d-C,C<x){x-=C;do{w[a++]=h[S++]}while(--C);S=a-b,T=w}for(;x>2;)w[a++]=T[S++],w[a++]=T[S++],w[a++]=T[S++],x-=3;x&&(w[a++]=T[S++],x>1&&(w[a++]=T[S++]))}else{S=a-b;do{w[a++]=w[S++],w[a++]=w[S++],w[a++]=w[S++],x-=3}while(x>2);x&&(w[a++]=w[S++],x>1&&(w[a++]=w[S++]))}break}}break}}while(r<n&&a<s);r-=x=f>>3,p&=(1<<(f-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<n?n-r+5:5-(r-n),e.avail_out=a<s?s-a+257:257-(a-s),i.hold=p,i.bits=f}},function(e,t,i){"use strict";var r=i(76),n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,i,l,c,u,d,h){var p,f,m,g,y,_,v,C,x,b=h.bits,S=0,T=0,E=0,w=0,A=0,P=0,D=0,M=0,I=0,R=0,O=null,L=0,N=new r.Buf16(16),F=new r.Buf16(16),B=null,V=0;for(S=0;S<=15;S++)N[S]=0;for(T=0;T<l;T++)N[t[i+T]]++;for(A=b,w=15;w>=1&&0===N[w];w--);if(A>w&&(A=w),0===w)return c[u++]=20971520,c[u++]=20971520,h.bits=1,0;for(E=1;E<w&&0===N[E];E++);for(A<E&&(A=E),M=1,S=1;S<=15;S++)if(M<<=1,(M-=N[S])<0)return-1;if(M>0&&(0===e||1!==w))return-1;for(F[1]=0,S=1;S<15;S++)F[S+1]=F[S]+N[S];for(T=0;T<l;T++)0!==t[i+T]&&(d[F[t[i+T]]++]=T);if(0===e?(O=B=d,_=19):1===e?(O=n,L-=257,B=a,V-=257,_=256):(O=o,B=s,_=-1),R=0,T=0,S=E,y=u,P=A,D=0,m=-1,g=(I=1<<A)-1,1===e&&I>852||2===e&&I>592)return 1;for(;;){v=S-D,d[T]<_?(C=0,x=d[T]):d[T]>_?(C=B[V+d[T]],x=O[L+d[T]]):(C=96,x=0),p=1<<S-D,E=f=1<<P;do{c[y+(R>>D)+(f-=p)]=v<<24|C<<16|x|0}while(0!==f);for(p=1<<S-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,T++,0==--N[S]){if(S===w)break;S=t[i+d[T]]}if(S>A&&(R&g)!==m){for(0===D&&(D=A),y+=E,M=1<<(P=S-D);P+D<w&&!((M-=N[P+D])<=0);)P++,M<<=1;if(I+=1<<P,1===e&&I>852||2===e&&I>592)return 1;c[m=R&g]=A<<24|P<<16|y-u|0}}return 0!==R&&(c[y+R]=S-D<<24|64<<16|0),h.bits=A,0}},function(e,t,i){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){function i(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}i.keys=function(){return[]},i.resolve=i,e.exports=i,i.id=274},function(e,t,i){var r=i(1);!function(){for(var e in r){if(null==r||!r.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=r[e]}}();var n=i(173);!function(){for(var e in n){if(null==n||!n.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=n[e]}}(),i(171),i(322),i(333),i(338),i(343),i(347),i(357),i(371),i(377),i(385),i(400),i(404),i(408),i(420),i(426),i(431),i(437),i(441),i(447),i(451),i(454),i(468),i(474),i(480),i(481),i(493),i(207),i(200),i(496),i(500),i(501),i(513),i(74),i(518),i(525),i(526),i(535),i(538),i(541),i(544),i(216),i(550),i(220),i(219),i(556),i(221),i(230),i(561),i(564)},function(e,t,i){var r=i(0),n=i(8),a=i(277),o=i(39),s=i(23),l=i(279);function c(){s.stop(this.event)}function u(){}u.prototype.dispose=function(){};var d=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],h=function(e,t,i,r){o.call(this),this.storage=e,this.painter=t,this.painterRoot=r,i=i||new u,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,a.call(this),this.setHandlerProxy(i)};function p(e,t,i){if(e[e.rectHover?"rectContain":"contain"](t,i)){for(var r,n=e;n;){if(n.clipPath&&!n.clipPath.contain(t,i))return!1;n.silent&&(r=!0),n=n.parent}return!r||"silent"}return!1}function f(e,t,i){var r=e.painter;return t<0||t>r.getWidth()||i<0||i>r.getHeight()}h.prototype={constructor:h,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(r.each(d,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,i=e.zrY,r=f(this,t,i),n=this._hovered,a=n.target;a&&!a.__zr&&(a=(n=this.findHover(n.x,n.y)).target);var o=this._hovered=r?{x:t,y:i}:this.findHover(t,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(n,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==a&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,i=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!i&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var i=this[e];i&&i.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,i){var r=(e=e||{}).target;if(!r||!r.silent){for(var n="on"+t,a=function(e,t,i){return{type:e,event:i,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:c}}(t,e,i);r&&(r[n]&&(a.cancelBubble=r[n].call(r,a)),r.trigger(t,a),r=r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[n]&&e[n].call(e,a),e.trigger&&e.trigger(t,a)})))}},findHover:function(e,t,i){for(var r=this.storage.getDisplayList(),n={x:e,y:t},a=r.length-1;a>=0;a--){var o;if(r[a]!==i&&!r[a].ignore&&(o=p(r[a],e,t))&&(!n.topTarget&&(n.topTarget=r[a]),"silent"!==o)){n.target=r[a];break}}return n},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new l);var i=this._gestureMgr;"start"===t&&i.clear();var r=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&i.clear(),r){var n=r.type;e.gestureEvent=n,this.dispatchToElement({target:r.target},n,r.event)}}},r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){h.prototype[e]=function(t){var i,r,a=t.zrX,o=t.zrY,s=f(this,a,o);if("mouseup"===e&&s||(r=(i=this.findHover(a,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||n.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,e,t)}})),r.mixin(h,o),r.mixin(h,a);var m=h;e.exports=m},function(e,t){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function r(e,t){return{target:e,topTarget:t&&t.topTarget}}i.prototype={constructor:i,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(r(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var i=e.offsetX,n=e.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,t.drift(a,o,e),this.dispatchToElement(r(t,e),"drag",e.event);var s=this.findHover(i,n,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.dispatchToElement(r(l,e),"dragleave",e.event),s&&s!==l&&this.dispatchToElement(r(s,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(r(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(r(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var n=i;e.exports=n},function(e,t){var i=Math.log(2);function r(e,t,n,a,o,s){var l=a+"-"+o,c=e.length;if(s.hasOwnProperty(l))return s[l];if(1===t){var u=Math.round(Math.log((1<<c)-1&~o)/i);return e[n][u]}for(var d=a|1<<n,h=n+1;a&1<<h;)h++;for(var p=0,f=0,m=0;f<c;f++){var g=1<<f;g&o||(p+=(m%2?-1:1)*e[n][f]*r(e,t-1,h,d,o|g,s),m++)}return s[l]=p,p}t.buildTransformer=function(e,t){var i=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],n={},a=r(i,8,0,0,0,n);if(0!==a){for(var o=[],s=0;s<8;s++)for(var l=0;l<8;l++)null==o[l]&&(o[l]=0),o[l]+=((s+l)%2?-1:1)*r(i,7,0===s?1:0,1<<s,1<<l,n)/a*t[s];return function(e,t,i){var r=t*o[6]+i*o[7]+1;e[0]=(t*o[0]+i*o[1]+o[2])/r,e[1]=(t*o[3]+i*o[4]+o[5])/r}}}},function(e,t,i){var r=i(23),n=function(){this._track=[]};function a(e){var t=e[1][0]-e[0][0],i=e[1][1]-e[0][1];return Math.sqrt(t*t+i*i)}n.prototype={constructor:n,recognize:function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,i){var n=e.touches;if(n){for(var a={points:[],touches:[],target:t,event:e},o=0,s=n.length;o<s;o++){var l=n[o],c=r.clientToLocal(i,l,{});a.points.push([c.zrX,c.zrY]),a.touches.push(l)}this._track.push(a)}},_recognize:function(e){for(var t in o)if(o.hasOwnProperty(t)){var i=o[t](this._track,e);if(i)return i}}};var o={pinch:function(e,t){var i=e.length;if(i){var r,n=(e[i-1]||{}).points,o=(e[i-2]||{}).points||n;if(o&&o.length>1&&n&&n.length>1){var s=a(n)/a(o);!isFinite(s)&&(s=1),t.pinchScale=s;var l=[((r=n)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=l[0],t.pinchY=l[1],{type:"pinch",target:e[0].target,event:t}}}}},s=n;e.exports=s},function(e,t,i){var r=i(0),n=i(11),a=i(40),o=i(100);function s(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var l=function(){this._roots=[],this._displayList=[],this._displayListLen=0};l.prototype={constructor:l,traverse:function(e,t){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(e,t)},getDisplayList:function(e,t){return t=t||!1,e&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(e){this._displayListLen=0;for(var t=this._roots,i=this._displayList,r=0,a=t.length;r<a;r++)this._updateAndAddDisplayable(t[r],null,e);i.length=this._displayListLen,n.canvasSupported&&o(i,s)},_updateAndAddDisplayable:function(e,t,i){if(!e.ignore||i){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var r=e.clipPath;if(r){t=t?t.slice():[];for(var n=r,a=e;n;)n.parent=a,n.updateTransform(),t.push(n),a=n,n=n.clipPath}if(e.isGroup){for(var o=e._children,s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,t,i)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof a&&e.addChildrenToStorage(this),this.addToStorage(e),this._roots.push(e))},delRoot:function(e){if(null==e){for(var t=0;t<this._roots.length;t++){var i=this._roots[t];i instanceof a&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var n=e.length;t<n;t++)this.delRoot(e[t])}else{var o=r.indexOf(this._roots,e);o>=0&&(this.delFromStorage(e),this._roots.splice(o,1),e instanceof a&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:s};var c=l;e.exports=c},function(e,t,i){var r=i(150),n=i(60),a=i(0),o=a.isString,s=a.isFunction,l=a.isObject,c=a.isArrayLike,u=a.indexOf,d=function(){this.animators=[]};function h(e,t,i,r,n,a,u,d){o(r)?(a=n,n=r,r=0):s(n)?(a=n,n="linear",r=0):s(r)?(a=r,r=0):s(i)?(a=i,i=500):i||(i=500),e.stopAnimation(),function e(t,i,r,n,a,o,s){var u={},d=0;for(var h in n)n.hasOwnProperty(h)&&(null!=r[h]?l(n[h])&&!c(n[h])?e(t,i?i+"."+h:h,r[h],n[h],a,o,s):(s?(u[h]=r[h],p(t,i,h,n[h])):u[h]=n[h],d++):null==n[h]||s||p(t,i,h,n[h]));d>0&&t.animate(i,!1).when(null==a?500:a,u).delay(o||0)}(e,"",e,t,i,r,d);var h=e.animators.slice(),f=h.length;function m(){--f||a&&a()}f||a&&a();for(var g=0;g<h.length;g++)h[g].done(m).start(n,u)}function p(e,t,i,r){if(t){var n={};n[t]={},n[t][i]=r,e.attr(n)}else e.attr(i,r)}d.prototype={constructor:d,animate:function(e,t){var i,a=!1,o=this,s=this.__zr;if(e){var l=e.split("."),c=o;a="shape"===l[0];for(var d=0,h=l.length;d<h;d++)c&&(c=c[l[d]]);c&&(i=c)}else i=o;if(i){var p=o.animators,f=new r(i,t);return f.during((function(e){o.dirty(a)})).done((function(){p.splice(u(p,f),1)})),p.push(f),s&&s.animation.addAnimator(f),f}n('Property "'+e+'" is not existed in element '+o.id)},stopAnimation:function(e){for(var t=this.animators,i=t.length,r=0;r<i;r++)t[r].stop(e);return t.length=0,this},animateTo:function(e,t,i,r,n,a){h(this,e,t,i,r,n,a)},animateFrom:function(e,t,i,r,n,a){h(this,e,t,i,r,n,a,!0)}};var f=d;e.exports=f},function(e,t,i){var r=i(283);function n(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}n.prototype={constructor:n,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var i=(e-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,a="string"==typeof n?r[n]:n,o="function"==typeof a?a(i):i;return this.fire("frame",o),1===i?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var a=n;e.exports=a},function(e,t){var i={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,i=.1,r=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=r*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-i.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*i.bounceIn(2*e):.5*i.bounceOut(2*e-1)+.5}},r=i;e.exports=r},function(e,t,i){var r=i(79).devicePixelRatio,n=i(0),a=i(60),o=i(9),s=i(100),l=i(285),c=i(154),u=i(48),d=i(11);function h(e){return parseInt(e,10)}var p=new o(0,0,0,0),f=new o(0,0,0,0);var m=function(e,t,i){this.type="canvas";var a=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=i=n.extend({},i||{}),this.dpr=i.devicePixelRatio||r,this._singleCanvas=a,this.root=e;var o=e.style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var s=this._zlevelList=[],c=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var u=e.width,d=e.height;null!=i.width&&(u=i.width),null!=i.height&&(d=i.height),this.dpr=i.devicePixelRatio||1,e.width=u*this.dpr,e.height=d*this.dpr,this._width=u,this._height=d;var h=new l(e,this,this.dpr);h.__builtin__=!0,h.initContext(),c[314159]=h,h.zlevel=314159,s.push(314159),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var p=this._domRoot=function(e,t){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);e.appendChild(p)}this._hoverlayer=null,this._hoverElements=[]};m.prototype={constructor:m,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var r=0;r<i.length;r++){var n=i[r],a=this._layers[n];if(!a.__builtin__&&a.refresh){var o=0===r?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var i=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return i.__from=e,e.__hoverMir=i,t&&i.setStyle(t),this._hoverElements.push(i),i}},removeHover:function(e){var t=e.__hoverMir,i=this._hoverElements,r=n.indexOf(i,t);r>=0&&i.splice(r,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,i=0;i<t.length;i++){var r=t[i].__from;r&&(r.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,i=this._hoverlayer;if(i&&i.clear(),t){s(e,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var r={};i.ctx.save();for(var n=0;n<t;){var a=e[n],o=a.__from;o&&o.__zr?(n++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,r))):(e.splice(n,1),o.__hoverMir=null,t--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(e,t,i){if(this._redrawId===i){t=t||!1,this._updateLayerStatus(e);var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!r){var n=this;c((function(){n._paintList(e,t,i)}))}}},_compositeManually:function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,t,i),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,i)}))},_doPaintList:function(e,t){for(var i=[],r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];(l=this._layers[a]).__builtin__&&l!==this._hoverlayer&&(l.__dirty||t)&&i.push(l)}for(var o=!0,s=0;s<i.length;s++){var l,c=(l=i[s]).ctx,u={};c.save();var h=t?l.__startIndex:l.__drawIndex,p=!t&&l.incremental&&Date.now,f=p&&Date.now(),m=l.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,m);else if(h===l.__startIndex){var g=e[h];g.incremental&&g.notClear&&!t||l.clear(!1,m)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=l.__startIndex);for(var y=h;y<l.__endIndex;y++){var _=e[y];if(this._doPaintEl(_,l,t,u),_.__dirty=_.__dirtyText=!1,p)if(Date.now()-f>15)break}l.__drawIndex=y,l.__drawIndex<l.__endIndex&&(o=!1),u.prevElClipPaths&&c.restore(),c.restore()}return d.wxa&&n.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),o},_doPaintEl:function(e,t,i,r){var n=t.ctx,a=e.transform;if((t.__dirty||i)&&!e.invisible&&0!==e.style.opacity&&(!a||a[0]||a[3])&&(!e.culling||!function(e,t,i){return p.copy(e.getBoundingRect()),e.transform&&p.applyTransform(e.transform),f.width=t,f.height=i,!p.intersect(f)}(e,this._width,this._height))){var o=e.__clipPaths,s=r.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!0;return!1}(o,s)||(s&&(n.restore(),r.prevElClipPaths=null,r.prevEl=null),o&&(n.save(),function(e,t){for(var i=0;i<e.length;i++){var r=e[i];r.setTransform(t),t.beginPath(),r.buildPath(t,r.shape),t.clip(),r.restoreTransform(t)}}(o,n),r.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(n),e.brush(n,r.prevEl||null),r.prevEl=e,e.afterBrush&&e.afterBrush(n)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var i=this._layers[e];return i||((i=new l("zr_"+e,this,this.dpr)).zlevel=e,i.__builtin__=!0,this._layerConfig[e]?n.merge(i,this._layerConfig[e],!0):this._layerConfig[e-.01]&&n.merge(i,this._layerConfig[e-.01],!0),t&&(i.virtual=t),this.insertLayer(e,i),i.initContext()),i},insertLayer:function(e,t){var i=this._layers,r=this._zlevelList,n=r.length,o=null,s=-1,l=this._domRoot;if(i[e])a("ZLevel "+e+" has been used already");else if(function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(n>0&&e>r[0]){for(s=0;s<n-1&&!(r[s]<e&&r[s+1]>e);s++);o=i[r[s]]}if(r.splice(s+1,0,e),i[e]=t,!t.virtual)if(o){var c=o.dom;c.nextSibling?l.insertBefore(t.dom,c.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom)}else a("Layer of zlevel "+e+" is not valid")},eachLayer:function(e,t){var i,r,n=this._zlevelList;for(r=0;r<n.length;r++)i=n[r],e.call(t,this._layers[i],i)},eachBuiltinLayer:function(e,t){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__&&e.call(t,i,r)},eachOtherLayer:function(e,t){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__||e.call(t,i,r)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){n&&(n.__endIndex!==e&&(n.__dirty=!0),n.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var i=1;i<e.length;i++){if((s=e[i]).zlevel!==e[i-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,n=null,o=0;for(i=0;i<e.length;i++){var s,l,c=(s=e[i]).zlevel;r!==c&&(r=c,o=0),s.incremental?((l=this.getLayer(c+.001,this._needsManuallyCompositing)).incremental=!0,o=1):l=this.getLayer(c+(o>0?.01:0),this._needsManuallyCompositing),l.__builtin__||a("ZLevel "+c+" has been used by unkown layer "+l.id),l!==n&&(l.__used=!0,l.__startIndex!==i&&(l.__dirty=!0),l.__startIndex=i,l.incremental?l.__drawIndex=-1:l.__drawIndex=i,t(i),n=l),s.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var i=this._layerConfig;i[e]?n.merge(i[e],t,!0):i[e]=t;for(var r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];if(a===e||a===e+.01){var o=this._layers[a];n.merge(o,i[e],!0)}}}},delLayer:function(e){var t=this._layers,i=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],i.splice(n.indexOf(i,e),1))},resize:function(e,t){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=this._getSize(0),t=this._getSize(1),i.style.display="",this._width!==e||t!==this._height){for(var a in i.style.width=e+"px",i.style.height=t+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);n.each(this._progressiveLayers,(function(i){i.resize(e,t)})),this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(314159).resize(e,t)}return this},clearLayer:function(e){var t=this._layers[e];t&&t.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new l("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,r=t.dom.height,n=t.ctx;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,i,r):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var c=o[s];this._doPaintEl(c,t,!0,a)}return t.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,i=["width","height"][e],r=["clientWidth","clientHeight"][e],n=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[i]&&"auto"!==t[i])return parseFloat(t[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||h(s[i])||h(o.style[i]))-(h(s[n])||0)-(h(s[a])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var i=document.createElement("canvas"),r=i.getContext("2d"),n=e.getBoundingRect(),a=e.style,o=a.shadowBlur*t,s=a.shadowOffsetX*t,l=a.shadowOffsetY*t,c=a.hasStroke()?a.lineWidth:0,d=Math.max(c/2,-s+o),h=Math.max(c/2,s+o),p=Math.max(c/2,-l+o),f=Math.max(c/2,l+o),m=n.width+d+h,g=n.height+p+f;i.width=m*t,i.height=g*t,r.scale(t,t),r.clearRect(0,0,m,g),r.dpr=t;var y={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[d-n.x,p-n.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(r);var _=new u({style:{x:0,y:0,image:i}});return null!=y.position&&(_.position=e.position=y.position),null!=y.rotation&&(_.rotation=e.rotation=y.rotation),null!=y.scale&&(_.scale=e.scale=y.scale),_}};var g=m;e.exports=g},function(e,t,i){var r=i(0),n=i(79).devicePixelRatio,a=i(101),o=i(153);function s(){return!1}function l(e,t,i){var n=r.createCanvas(),a=t.getWidth(),o=t.getHeight(),s=n.style;return s&&(s.position="absolute",s.left=0,s.top=0,s.width=a+"px",s.height=o+"px",n.setAttribute("data-zr-dom-id",e)),n.width=a*i,n.height=o*i,n}var c=function(e,t,i){var a;i=i||n,"string"==typeof e?a=l(e,t,i):r.isObject(e)&&(e=(a=e).id),this.id=e,this.dom=a;var o=a.style;o&&(a.onselectstart=s,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=t,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};c.prototype={constructor:c,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var e=this.dpr;this.domBack=l("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var i=this.dpr,r=this.dom,n=r.style,a=this.domBack;n&&(n.width=e+"px",n.height=t+"px"),r.width=e*i,r.height=t*i,a&&(a.width=e*i,a.height=t*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(e,t){var i,r=this.dom,n=this.ctx,s=r.width,l=r.height,c=(t=t||this.clearColor,this.motionBlur&&!e),u=this.lastFrameAlpha,d=this.dpr;(c&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,s/d,l/d)),n.clearRect(0,0,s,l),t&&"transparent"!==t)&&(t.colorStops?(i=t.__canvasGradient||a.getGradient(n,t,{x:0,y:0,width:s,height:l}),t.__canvasGradient=i):t.image&&(i=o.prototype.getCanvasPattern.call(t,n)),n.save(),n.fillStyle=i||t,n.fillRect(0,0,s,l),n.restore());if(c){var h=this.domBack;n.save(),n.globalAlpha=u,n.drawImage(h,0,0,s,l),n.restore()}}};var u=c;e.exports=u},function(e,t,i){var r=i(0),n=i(23).Dispatcher,a=i(154),o=i(150),s=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,n.call(this)};s.prototype={constructor:s,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),i=0;i<t.length;i++)this.addClip(t[i])},removeClip:function(e){var t=r.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),i=0;i<t.length;i++)this.removeClip(t[i]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,i=this._clips,r=i.length,n=[],a=[],o=0;o<r;o++){var s=i[o],l=s.step(e,t);l&&(n.push(l),a.push(s))}for(o=0;o<r;)i[o]._needsRemove?(i[o]=i[r-1],i.pop(),r--):o++;r=n.length;for(o=0;o<r;o++)a[o].fire(n[o]);this._time=e,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,a((function t(){e._running&&(a(t),!e._paused&&e._update())}))},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(e,t){var i=new o(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(i),i}},r.mixin(s,n);var l=s;e.exports=l},function(e,t,i){var r,n,a=i(23),o=a.addEventListener,s=a.removeEventListener,l=a.normalizeEvent,c=a.getNativeEvent,u=i(0),d=i(39),h=i(11),p=h.domSupported,f=(n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:r=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:u.map(r,(function(e){var t=e.replace("mouse","pointer");return n.hasOwnProperty(t)?t:e}))}),m=["mousemove","mouseup"],g=["pointermove","pointerup"];function y(e){return"mousewheel"===e&&h.browser.firefox?"DOMMouseScroll":e}function _(e){var t=e.pointerType;return"pen"===t||"touch"===t}function v(e){e&&(e.zrByTouch=!0)}function C(e,t){for(var i=t,r=!1;i&&9!==i.nodeType&&!(r=i.domBelongToZr||i!==t&&i===e.painterRoot);)i=i.parentNode;return r}function x(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var b=x.prototype;b.stopPropagation=b.stopImmediatePropagation=b.preventDefault=u.noop;var S={mousedown:function(e){e=l(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=l(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||D(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=l(this.dom,e),D(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=l(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=C(this,t),this.trigger("mouseout",e)},touchstart:function(e){v(e=l(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),S.mousemove.call(this,e),S.mousedown.call(this,e)},touchmove:function(e){v(e=l(this.dom,e)),this.handler.processGesture(e,"change"),S.mousemove.call(this,e)},touchend:function(e){v(e=l(this.dom,e)),this.handler.processGesture(e,"end"),S.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&S.click.call(this,e)},pointerdown:function(e){S.mousedown.call(this,e)},pointermove:function(e){_(e)||S.mousemove.call(this,e)},pointerup:function(e){S.mouseup.call(this,e)},pointerout:function(e){_(e)||S.mouseout.call(this,e)}};u.each(["click","mousewheel","dblclick","contextmenu"],(function(e){S[e]=function(t){t=l(this.dom,t),this.trigger(e,t)}}));var T={pointermove:function(e){_(e)||T.mousemove.call(this,e)},pointerup:function(e){T.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;D(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function E(e,t){var i=t.domHandlers;h.pointerEventsSupported?u.each(f.pointer,(function(r){A(t,r,(function(t){i[r].call(e,t)}))})):(h.touchEventsSupported&&u.each(f.touch,(function(r){A(t,r,(function(n){i[r].call(e,n),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),u.each(f.mouse,(function(r){A(t,r,(function(n){n=c(n),t.touching||i[r].call(e,n)}))})))}function w(e,t){function i(i){A(t,i,(function(r){r=c(r),C(e,r.target)||(r=function(e,t){return l(e.dom,new x(e,t),!0)}(e,r),t.domHandlers[i].call(e,r))}),{capture:!0})}h.pointerEventsSupported?u.each(g,i):h.touchEventsSupported||u.each(m,i)}function A(e,t,i,r){e.mounted[t]=i,e.listenerOpts[t]=r,o(e.domTarget,y(t),i,r)}function P(e){var t=e.mounted;for(var i in t)t.hasOwnProperty(i)&&s(e.domTarget,y(i),t[i],e.listenerOpts[i]);e.mounted={}}function D(e,t){if(e._mayPointerCapture=null,p&&e._pointerCapturing^t){e._pointerCapturing=t;var i=e._globalHandlerScope;t?w(e,i):P(i)}}function M(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function I(e,t){d.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new M(e,S),p&&(this._globalHandlerScope=new M(document,T)),this._pointerCapturing=!1,this._mayPointerCapture=null,E(this,this._localHandlerScope)}var R=I.prototype;R.dispose=function(){P(this._localHandlerScope),p&&P(this._globalHandlerScope)},R.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},u.mixin(I,d);var O=I;e.exports=O},function(e,t,i){var r=i(49)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),n={getLineStyle:function(e){var t=r(this,e);return t.lineDash=this.getLineDash(t.lineWidth),t},getLineDash:function(e){null==e&&(e=1);var t=this.get("type"),i=Math.max(e,2),r=4*e;return"solid"!==t&&null!=t&&("dashed"===t?[r,r]:[i,i])}};e.exports=n},function(e,t,i){var r=i(49)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),n={getAreaStyle:function(e,t){return r(this,e,t)}};e.exports=n},function(e,t,i){var r=i(17),n=i(2),a=["textStyle","color"],o={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(a):null)},getFont:function(){return n.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return r.getBoundingRect(e,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}};e.exports=o},function(e,t,i){var r=i(50),n=i(159),a=i(292),o=i(160),s=i(293),l=i(161).normalizeRadian,c=i(32),u=i(162),d=r.CMD,h=2*Math.PI;var p=[-1,-1,-1],f=[-1,-1];function m(e,t,i,r,n,a,o,s,l,u){if(u>t&&u>r&&u>a&&u>s||u<t&&u<r&&u<a&&u<s)return 0;var d,h=c.cubicRootAt(t,r,a,s,u,p);if(0===h)return 0;for(var m,g,y=0,_=-1,v=0;v<h;v++){var C=p[v],x=0===C||1===C?.5:1;c.cubicAt(e,i,n,o,C)<l||(_<0&&(_=c.cubicExtrema(t,r,a,s,f),f[1]<f[0]&&_>1&&(d=void 0,d=f[0],f[0]=f[1],f[1]=d),m=c.cubicAt(t,r,a,s,f[0]),_>1&&(g=c.cubicAt(t,r,a,s,f[1]))),2===_?C<f[0]?y+=m<t?x:-x:C<f[1]?y+=g<m?x:-x:y+=s<g?x:-x:C<f[0]?y+=m<t?x:-x:y+=s<m?x:-x)}return y}function g(e,t,i,r,n,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var l=c.quadraticRootAt(t,r,a,s,p);if(0===l)return 0;var u=c.quadraticExtremum(t,r,a);if(u>=0&&u<=1){for(var d=0,h=c.quadraticAt(t,r,a,u),f=0;f<l;f++){var m=0===p[f]||1===p[f]?.5:1;c.quadraticAt(e,i,n,p[f])<o||(p[f]<u?d+=h<t?m:-m:d+=a<h?m:-m)}return d}m=0===p[0]||1===p[0]?.5:1;return c.quadraticAt(e,i,n,p[0])<o?0:a<t?m:-m}function y(e,t,i,r,n,a,o,s){if((s-=t)>i||s<-i)return 0;var c=Math.sqrt(i*i-s*s);p[0]=-c,p[1]=c;var u=Math.abs(r-n);if(u<1e-4)return 0;if(u%h<1e-4){r=0,n=h;var d=a?1:-1;return o>=p[0]+e&&o<=p[1]+e?d:0}if(a){c=r;r=l(n),n=l(c)}else r=l(r),n=l(n);r>n&&(n+=h);for(var f=0,m=0;m<2;m++){var g=p[m];if(g+e>o){var y=Math.atan2(s,g);d=a?1:-1;y<0&&(y=h+y),(y>=r&&y<=n||y+h>=r&&y+h<=n)&&(y>Math.PI/2&&y<1.5*Math.PI&&(d=-d),f+=d)}}return f}function _(e,t,i,r,l){for(var c,h,p=0,f=0,_=0,v=0,C=0,x=0;x<e.length;){var b=e[x++];switch(b===d.M&&x>1&&(i||(p+=u(f,_,v,C,r,l))),1===x&&(v=f=e[x],C=_=e[x+1]),b){case d.M:f=v=e[x++],_=C=e[x++];break;case d.L:if(i){if(n.containStroke(f,_,e[x],e[x+1],t,r,l))return!0}else p+=u(f,_,e[x],e[x+1],r,l)||0;f=e[x++],_=e[x++];break;case d.C:if(i){if(a.containStroke(f,_,e[x++],e[x++],e[x++],e[x++],e[x],e[x+1],t,r,l))return!0}else p+=m(f,_,e[x++],e[x++],e[x++],e[x++],e[x],e[x+1],r,l)||0;f=e[x++],_=e[x++];break;case d.Q:if(i){if(o.containStroke(f,_,e[x++],e[x++],e[x],e[x+1],t,r,l))return!0}else p+=g(f,_,e[x++],e[x++],e[x],e[x+1],r,l)||0;f=e[x++],_=e[x++];break;case d.A:var S=e[x++],T=e[x++],E=e[x++],w=e[x++],A=e[x++],P=e[x++];x+=1;var D=1-e[x++],M=Math.cos(A)*E+S,I=Math.sin(A)*w+T;x>1?p+=u(f,_,M,I,r,l):(v=M,C=I);var R=(r-S)*w/E+S;if(i){if(s.containStroke(S,T,w,A,A+P,D,t,R,l))return!0}else p+=y(S,T,w,A,A+P,D,R,l);f=Math.cos(A+P)*E+S,_=Math.sin(A+P)*w+T;break;case d.R:v=f=e[x++],C=_=e[x++];M=v+e[x++],I=C+e[x++];if(i){if(n.containStroke(v,C,M,C,t,r,l)||n.containStroke(M,C,M,I,t,r,l)||n.containStroke(M,I,v,I,t,r,l)||n.containStroke(v,I,v,C,t,r,l))return!0}else p+=u(M,C,M,I,r,l),p+=u(v,I,v,C,r,l);break;case d.Z:if(i){if(n.containStroke(f,_,v,C,t,r,l))return!0}else p+=u(f,_,v,C,r,l);f=v,_=C}}return i||(c=_,h=C,Math.abs(c-h)<1e-4)||(p+=u(f,_,v,C,r,l)||0),0!==p}t.contain=function(e,t,i){return _(e,0,!1,t,i)},t.containStroke=function(e,t,i,r){return _(e,t,!0,i,r)}},function(e,t,i){var r=i(32);t.containStroke=function(e,t,i,n,a,o,s,l,c,u,d){if(0===c)return!1;var h=c;return!(d>t+h&&d>n+h&&d>o+h&&d>l+h||d<t-h&&d<n-h&&d<o-h&&d<l-h||u>e+h&&u>i+h&&u>a+h&&u>s+h||u<e-h&&u<i-h&&u<a-h&&u<s-h)&&r.cubicProjectPoint(e,t,i,n,a,o,s,l,u,d,null)<=h/2}},function(e,t,i){var r=i(161).normalizeRadian,n=2*Math.PI;t.containStroke=function(e,t,i,a,o,s,l,c,u){if(0===l)return!1;var d=l;c-=e,u-=t;var h=Math.sqrt(c*c+u*u);if(h-d>i||h+d<i)return!1;if(Math.abs(a-o)%n<1e-4)return!0;if(s){var p=a;a=r(o),o=r(p)}else a=r(a),o=r(o);a>o&&(o+=n);var f=Math.atan2(u,c);return f<0&&(f+=n),f>=a&&f<=o||f+n>=a&&f+n<=o}},function(e,t,i){var r=i(50),n=i(8).applyTransform,a=r.CMD,o=[[],[],[]],s=Math.sqrt,l=Math.atan2;e.exports=function(e,t){var i,r,c,u,d,h=e.data,p=a.M,f=a.C,m=a.L,g=a.R,y=a.A,_=a.Q;for(c=0,u=0;c<h.length;){switch(i=h[c++],u=c,r=0,i){case p:case m:r=1;break;case f:r=3;break;case _:r=2;break;case y:var v=t[4],C=t[5],x=s(t[0]*t[0]+t[1]*t[1]),b=s(t[2]*t[2]+t[3]*t[3]),S=l(-t[1]/b,t[0]/x);h[c]*=x,h[c++]+=v,h[c]*=b,h[c++]+=C,h[c++]*=x,h[c++]*=b,h[c++]+=S,h[c++]+=S,u=c+=2;break;case g:T[0]=h[c++],T[1]=h[c++],n(T,T,t),h[u++]=T[0],h[u++]=T[1],T[0]+=h[c++],T[1]+=h[c++],n(T,T,t),h[u++]=T[0],h[u++]=T[1]}for(d=0;d<r;d++){var T;(T=o[d])[0]=h[c++],T[1]=h[c++],n(T,T,t),h[u++]=T[0],h[u++]=T[1]}}}},function(e,t,i){var r=i(10),n=i(164),a=r.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:n(r.prototype.brush),buildPath:function(e,t){var i=t.cx,r=t.cy,n=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=t.startAngle,s=t.endAngle,l=t.clockwise,c=Math.cos(o),u=Math.sin(o);e.moveTo(c*n+i,u*n+r),e.lineTo(c*a+i,u*a+r),e.arc(i,r,a,o,s,!l),e.lineTo(Math.cos(s)*n+i,Math.sin(s)*n+r),0!==n&&e.arc(i,r,n,s,o,l),e.closePath()}});e.exports=a},function(e,t,i){var r=i(10).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var i=t.cx,r=t.cy,n=2*Math.PI;e.moveTo(i+t.r,r),e.arc(i,r,t.r,0,n,!1),e.moveTo(i+t.r0,r),e.arc(i,r,t.r0,0,n,!0)}});e.exports=r},function(e,t,i){var r=i(8).distance;function n(e,t,i,r,n,a,o){var s=.5*(i-e),l=.5*(r-t);return(2*(t-i)+s+l)*o+(-3*(t-i)-2*s-l)*a+s*n+t}e.exports=function(e,t){for(var i=e.length,a=[],o=0,s=1;s<i;s++)o+=r(e[s-1],e[s]);var l=o/2;for(l=l<i?i:l,s=0;s<l;s++){var c,u,d,h=s/(l-1)*(t?i:i-1),p=Math.floor(h),f=h-p,m=e[p%i];t?(c=e[(p-1+i)%i],u=e[(p+1)%i],d=e[(p+2)%i]):(c=e[0===p?p:p-1],u=e[p>i-2?i-1:p+1],d=e[p>i-3?i-1:p+2]);var g=f*f,y=f*g;a.push([n(c[0],m[0],u[0],d[0],f,g,y),n(c[1],m[1],u[1],d[1],f,g,y)])}return a}},function(e,t,i){var r=i(8),n=r.min,a=r.max,o=r.scale,s=r.distance,l=r.add,c=r.clone,u=r.sub;e.exports=function(e,t,i,r){var d,h,p,f,m=[],g=[],y=[],_=[];if(r){p=[1/0,1/0],f=[-1/0,-1/0];for(var v=0,C=e.length;v<C;v++)n(p,p,e[v]),a(f,f,e[v]);n(p,p,r[0]),a(f,f,r[1])}for(v=0,C=e.length;v<C;v++){var x=e[v];if(i)d=e[v?v-1:C-1],h=e[(v+1)%C];else{if(0===v||v===C-1){m.push(c(e[v]));continue}d=e[v-1],h=e[v+1]}u(g,h,d),o(g,g,t);var b=s(x,d),S=s(x,h),T=b+S;0!==T&&(b/=T,S/=T),o(y,g,-b),o(_,g,S);var E=l([],x,y),w=l([],x,_);r&&(a(E,E,p),n(E,E,f),a(w,w,p),n(w,w,f)),m.push(E),m.push(w)}return i&&m.push(m.shift()),m}},function(e,t,i){var r=i(10),n=i(8),a=i(32),o=a.quadraticSubdivide,s=a.cubicSubdivide,l=a.quadraticAt,c=a.cubicAt,u=a.quadraticDerivativeAt,d=a.cubicDerivativeAt,h=[];function p(e,t,i){var r=e.cpx2,n=e.cpy2;return null===r||null===n?[(i?d:c)(e.x1,e.cpx1,e.cpx2,e.x2,t),(i?d:c)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(i?u:l)(e.x1,e.cpx1,e.x2,t),(i?u:l)(e.y1,e.cpy1,e.y2,t)]}var f=r.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.x1,r=t.y1,n=t.x2,a=t.y2,l=t.cpx1,c=t.cpy1,u=t.cpx2,d=t.cpy2,p=t.percent;0!==p&&(e.moveTo(i,r),null==u||null==d?(p<1&&(o(i,l,n,p,h),l=h[1],n=h[2],o(r,c,a,p,h),c=h[1],a=h[2]),e.quadraticCurveTo(l,c,n,a)):(p<1&&(s(i,l,u,n,p,h),l=h[1],u=h[2],n=h[3],s(r,c,d,a,p,h),c=h[1],d=h[2],a=h[3]),e.bezierCurveTo(l,c,u,d,n,a)))},pointAt:function(e){return p(this.shape,e,!1)},tangentAt:function(e){var t=p(this.shape,e,!0);return n.normalize(t,t)}});e.exports=f},function(e,t,i){var r=i(10).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.cx,r=t.cy,n=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(a),c=Math.sin(a);e.moveTo(l*n+i,c*n+r),e.arc(i,r,n,a,o,!s)}});e.exports=r},function(e,t,i){var r=i(10),n=r.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,i=0;i<t.length;i++)e=e||t[i].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(t[0],t[1],e[i].segmentIgnoreThreshold)},buildPath:function(e,t){for(var i=t.paths||[],r=0;r<i.length;r++)i[r].buildPath(e,i[r].shape,!0)},afterBrush:function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),r.prototype.getBoundingRect.call(this)}});e.exports=n},function(e,t,i){var r=i(0),n=i(82),a=function(e,t,i,r,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==i?.5:i,this.type="radial",this.global=a||!1,n.call(this,r)};a.prototype={constructor:a},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(49)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),n={getItemStyle:function(e,t){var i=r(this,e,t),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var e=this.get("borderType");return"solid"===e||null==e?null:"dashed"===e?[5,5]:[1,1]}};e.exports=n},function(e,t){e.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},function(e,t){var i="";"undefined"!=typeof navigator&&(i=navigator.platform||"");var r={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};e.exports=r},function(e,t,i){var r=i(0),n=i(4),a=i(13),o=r.each,s=r.clone,l=r.map,c=r.merge,u=/^(min|max)?(.+)$/;function d(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function h(e,t,i){var n,a,s=[],l=[],c=e.timeline;if(e.baseOption&&(a=e.baseOption),(c||e.options)&&(a=a||{},s=(e.options||[]).slice()),e.media){a=a||{};var u=e.media;o(u,(function(e){e&&e.option&&(e.query?l.push(e):n||(n=e))}))}return a||(a=e),a.timeline||(a.timeline=c),o([a].concat(s).concat(r.map(l,(function(e){return e.option}))),(function(e){o(t,(function(t){t(e,i)}))})),{baseOption:a,timelineOptions:s,mediaDefault:n,mediaList:l}}function p(e,t,i){var n={width:t,height:i,aspectratio:t/i},a=!0;return r.each(e,(function(e,t){var i=t.match(u);if(i&&i[1]&&i[2]){var r=i[1],o=i[2].toLowerCase();(function(e,t,i){return"min"===i?e>=t:"max"===i?e<=t:e===t})(n[o],e,r)||(a=!1)}})),a}d.prototype={constructor:d,setOption:function(e,t){e&&r.each(n.normalizeToArray(e.series),(function(e){e&&e.data&&r.isTypedArray(e.data)&&r.setAsPrimitive(e.data)})),e=s(e);var i,u,d=this._optionBackup,p=h.call(this,e,t,!d);this._newBaseOption=p.baseOption,d?(i=d.baseOption,u=p.baseOption,o(u=u||{},(function(e,t){if(null!=e){var r=i[t];if(a.hasClass(t)){e=n.normalizeToArray(e),r=n.normalizeToArray(r);var o=n.mappingToExists(r,e);i[t]=l(o,(function(e){return e.option&&e.exist?c(e.exist,e.option,!0):e.exist||e.option}))}else i[t]=c(r,e,!0)}})),p.timelineOptions.length&&(d.timelineOptions=p.timelineOptions),p.mediaList.length&&(d.mediaList=p.mediaList),p.mediaDefault&&(d.mediaDefault=p.mediaDefault)):this._optionBackup=p},mountOption:function(e){var t=this._optionBackup;return this._timelineOptions=l(t.timelineOptions,s),this._mediaList=l(t.mediaList,s),this._mediaDefault=s(t.mediaDefault),this._currentMediaIndices=[],s(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,i=this._timelineOptions;if(i.length){var r=e.getComponent("timeline");r&&(t=s(i[r.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,i,r=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,c=[],u=[];if(!a.length&&!o)return u;for(var d=0,h=a.length;d<h;d++)p(a[d].query,r,n)&&c.push(d);return!c.length&&o&&(c=[-1]),c.length&&(t=c,i=this._currentMediaIndices,t.join(",")!==i.join(","))&&(u=l(c,(function(e){return s(-1===e?o.option:a[e].option)}))),this._currentMediaIndices=c,u}};var f=d;e.exports=f},function(e,t,i){var r=i(0),n=r.each,a=r.isArray,o=r.isObject,s=i(308),l=i(4).normalizeToArray;function c(e){n(u,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var u=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],d=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];e.exports=function(e,t){s(e,t),e.series=l(e.series),n(e.series,(function(e){if(o(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t)null!=e.clockWise&&(e.clockwise=e.clockWise);else if("gauge"===t){var i=function(e,t){t=t.split(",");for(var i=e,r=0;r<t.length&&null!=(i=i&&i[t[r]]);r++);return i}(e,"pointer.color");null!=i&&function(e,t,i,r){t=t.split(",");for(var n,a=e,o=0;o<t.length-1;o++)null==a[n=t[o]]&&(a[n]={}),a=a[n];(r||null==a[t[o]])&&(a[t[o]]=i)}(e,"itemStyle.color",i)}c(e)}})),e.dataRange&&(e.visualMap=e.dataRange),n(d,(function(t){var i=e[t];i&&(a(i)||(i=[i]),n(i,(function(e){c(e)})))}))}},function(e,t,i){var r=i(0),n=i(4),a=r.each,o=r.isObject,s=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function l(e){var t=e&&e.itemStyle;if(t)for(var i=0,n=s.length;i<n;i++){var a=s[i],o=t.normal,l=t.emphasis;o&&o[a]&&(e[a]=e[a]||{},e[a].normal?r.merge(e[a].normal,o[a]):e[a].normal=o[a],o[a]=null),l&&l[a]&&(e[a]=e[a]||{},e[a].emphasis?r.merge(e[a].emphasis,l[a]):e[a].emphasis=l[a],l[a]=null)}}function c(e,t,i){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,a=e[t].emphasis;n&&(i?(e[t].normal=e[t].emphasis=null,r.defaults(e[t],n)):e[t]=n),a&&(e.emphasis=e.emphasis||{},e.emphasis[t]=a)}}function u(e){c(e,"itemStyle"),c(e,"lineStyle"),c(e,"areaStyle"),c(e,"label"),c(e,"labelLine"),c(e,"upperLabel"),c(e,"edgeLabel")}function d(e,t){var i=o(e)&&e[t],r=o(i)&&i.textStyle;if(r)for(var a=0,s=n.TEXT_STYLE_OPTIONS.length;a<s;a++){t=n.TEXT_STYLE_OPTIONS[a];r.hasOwnProperty(t)&&(i[t]=r[t])}}function h(e){e&&(u(e),d(e,"label"),e.emphasis&&d(e.emphasis,"label"))}function p(e){return r.isArray(e)?e:e?[e]:[]}function f(e){return(r.isArray(e)?e[0]:e)||{}}e.exports=function(e,t){a(p(e.series),(function(e){o(e)&&function(e){if(o(e)){l(e),u(e),d(e,"label"),d(e,"upperLabel"),d(e,"edgeLabel"),e.emphasis&&(d(e.emphasis,"label"),d(e.emphasis,"upperLabel"),d(e.emphasis,"edgeLabel")),(i=e.markPoint)&&(l(i),h(i)),(n=e.markLine)&&(l(n),h(n));var t=e.markArea;t&&h(t);var i,n,a=e.data;if("graph"===e.type){a=a||e.nodes;var s=e.links||e.edges;if(s&&!r.isTypedArray(s))for(var p=0;p<s.length;p++)h(s[p]);r.each(e.categories,(function(e){u(e)}))}if(a&&!r.isTypedArray(a))for(p=0;p<a.length;p++)h(a[p]);if((i=e.markPoint)&&i.data){var f=i.data;for(p=0;p<f.length;p++)h(f[p])}if((n=e.markLine)&&n.data){var m=n.data;for(p=0;p<m.length;p++)r.isArray(m[p])?(h(m[p][0]),h(m[p][1])):h(m[p])}"gauge"===e.type?(d(e,"axisLabel"),d(e,"title"),d(e,"detail")):"treemap"===e.type?(c(e.breadcrumb,"itemStyle"),r.each(e.levels,(function(e){u(e)}))):"tree"===e.type&&u(e.leaves)}}(e)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),a(i,(function(t){a(p(e[t]),(function(e){e&&(d(e,"axisLabel"),d(e.axisPointer,"label"))}))})),a(p(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;d(t,"axisLabel"),d(t&&t.axisPointer,"label")})),a(p(e.calendar),(function(e){c(e,"itemStyle"),d(e,"dayLabel"),d(e,"monthLabel"),d(e,"yearLabel")})),a(p(e.radar),(function(e){d(e,"name")})),a(p(e.geo),(function(e){o(e)&&(h(e),a(p(e.regions),(function(e){h(e)})))})),a(p(e.timeline),(function(e){h(e),c(e,"label"),c(e,"itemStyle"),c(e,"controlStyle",!0);var t=e.data;r.isArray(t)&&r.each(t,(function(e){r.isObject(e)&&(c(e,"label"),c(e,"itemStyle"))}))})),a(p(e.toolbox),(function(e){c(e,"iconStyle"),a(e.feature,(function(e){c(e,"iconStyle")}))})),d(f(e.axisPointer),"label"),d(f(e.tooltip).axisPointer,"label")}},function(e,t,i){var r=i(0),n=r.createHashMap,a=r.each;function o(e){a(e,(function(t,i){var r=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(a,(function(a,l,c){var u,d,h=o.get(t.stackedDimension,c);if(isNaN(h))return n;s?d=o.getRawIndex(c):u=o.get(t.stackedByDimension,c);for(var p=NaN,f=i-1;f>=0;f--){var m=e[f];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,u)),d>=0){var g=m.data.getByRawIndex(m.stackResultDimension,d);if(h>=0&&g>0||h<=0&&g<0){h+=g,p=g;break}}}return r[0]=h,r[1]=p,r}));o.hostModel.setData(l),t.data=l}))}e.exports=function(e){var t=n();e.eachSeries((function(e){var i=e.get("stack");if(i){var r=t.get(i)||t.set(i,[]),n=e.getData(),a={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:e};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;r.length&&n.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(a)}})),t.each(o)}},function(e,t,i){var r=i(82),n=i(0).isFunction,a={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var i=e.getData(),a=(e.visualColorAccessPath||"itemStyle.color").split("."),o=e.get(a),s=!n(o)||o instanceof r?null:o;o&&!s||(o=e.getColorFromPalette(e.name,null,t.getSeriesCount())),i.setVisual("color",o);var l=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),c=e.get(l);if(i.setVisual("borderColor",c),!t.isSeriesFiltered(e)){s&&i.each((function(t){i.setItemVisual(t,"color",s(e.getDataParams(t)))}));return{dataEach:i.hasItemOption?function(e,t){var i=e.getItemModel(t),r=i.get(a,!0),n=i.get(l,!0);null!=r&&e.setItemVisual(t,"color",r),null!=n&&e.setItemVisual(t,"borderColor",n)}:null}}}};e.exports=a},function(e,t,i){var r=i(0),n=i(34),a=i(42).retrieveRawValue;e.exports=function(e,t){var i=t.getModel("aria");if(i.get("show"))if(i.get("description"))e.setAttribute("aria-label",i.get("description"));else{var o=0;t.eachSeries((function(e,t){++o}),this);var s,l=i.get("data.maxCount")||10,c=i.get("series.maxCount")||10,u=Math.min(o,c);if(!(o<1)){var d=function(){var e=t.getModel("title").option;e&&e.length&&(e=e[0]);return e&&e.text}();s=d?p(f("general.withTitle"),{title:d}):f("general.withoutTitle");var h=[];s+=p(f(o>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:o}),t.eachSeries((function(e,t){if(t<u){var i,r=e.get("name"),s="series."+(o>1?"multiple":"single")+".";i=p(i=f(r?s+"withName":s+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,n.series.typeNames[_]||"自定义图")});var c=e.getData();window.data=c,c.count()>l?i+=p(f("data.partialData"),{displayCnt:l}):i+=f("data.allData");for(var d=[],m=0;m<c.count();m++)if(m<l){var g=c.getName(m),y=a(c,m);d.push(p(f(g?"data.withName":"data.withoutName"),{name:g,value:y}))}i+=d.join(f("data.separator.middle"))+f("data.separator.end"),h.push(i)}var _})),s+=h.join(f("series.multiple.separator.middle"))+f("series.multiple.separator.end"),e.setAttribute("aria-label",s)}}function p(e,t){if("string"!=typeof e)return e;var i=e;return r.each(t,(function(e,t){i=i.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),i}function f(e){var t=i.get(e);if(null==t){for(var r=e.split("."),a=n.aria,o=0;o<r.length;++o)a=a[r[o]];return a}return t}}},function(e,t,i){var r=i(0),n=i(2),a=i(17),o=Math.PI;e.exports=function(e,t){t=t||{},r.defaults(t,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new n.Group,s=new n.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});i.add(s);var l=t.fontSize+" sans-serif",c=new n.Rect({style:{fill:"none",text:t.text,font:l,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(i.add(c),t.showSpinner){var u=new n.Arc({shape:{startAngle:-o/2,endAngle:-o/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001});u.animateShape(!0).when(1e3,{endAngle:3*o/2}).start("circularInOut"),u.animateShape(!0).when(1e3,{startAngle:3*o/2}).delay(300).start("circularInOut"),i.add(u)}return i.resize=function(){var i=a.getWidth(t.text,l),r=t.showSpinner?t.spinnerRadius:0,n=(e.getWidth()-2*r-(t.showSpinner&&i?10:0)-i)/2-(t.showSpinner?0:i/2),o=e.getHeight()/2;t.showSpinner&&u.setShape({cx:n,cy:o}),c.setShape({x:n-r,y:o-r,width:2*r,height:2*r}),s.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},i.resize(),i}},function(e,t,i){var r=i(0),n=r.each,a=r.map,o=r.isFunction,s=r.createHashMap,l=r.noop,c=i(108).createTask,u=i(63).getUID,d=i(157),h=i(170),p=i(4).normalizeToArray;function f(e,t,i,r){this.ecInstance=e,this.api=t,this.unfinished;i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice();this._allHandlers=i.concat(r),this._stageTaskMap=s()}var m=f.prototype;function g(e,t,i,r,a){var o;function s(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}a=a||{},n(t,(function(t,n){if(!a.visualType||a.visualType===t.visualType){var l=e._stageTaskMap.get(t.uid),c=l.seriesTaskMap,u=l.overallTask;if(u){var d,h=u.agentStubMap;h.each((function(e){s(a,e)&&(e.dirty(),d=!0)})),d&&u.dirty(),y(u,r);var p=e.getPerformArgs(u,a.block);h.each((function(e){e.perform(p)})),o|=u.perform(p)}else c&&c.each((function(n,l){s(a,n)&&n.dirty();var c=e.getPerformArgs(n,a.block);c.skip=!t.performRawSeries&&i.isSeriesFiltered(n.context.model),y(n,r),o|=n.perform(c)}))}})),e.unfinished|=o}m.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},m.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),r=i.context,n=!t&&i.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>i.blockIndex?i.step:null,a=r&&r.modDataCount;return{step:n,modBy:null!=a?Math.ceil(a/n):null,modDataCount:a}}},m.getPipeline=function(e){return this._pipelineMap.get(e)},m.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),r=e.getData().count(),n=i.progressiveEnabled&&t.incrementalPrepareRender&&r>=i.threshold,a=e.get("large")&&r>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=i.context={progressiveRender:n,modDataCount:o,large:a}},m.restorePipelines=function(e){var t=this,i=t._pipelineMap=s();e.eachSeries((function(e){var r=e.getProgressive(),n=e.uid;i.set(n,{id:n,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),A(t,e,e.dataTask)}))},m.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),i=this.api;n(this._allHandlers,(function(r){var a=e.get(r.uid)||e.set(r.uid,[]);r.reset&&function(e,t,i,r,n){var a=i.seriesTaskMap||(i.seriesTaskMap=s()),o=t.seriesType,l=t.getTargetSeries;t.createOnAllSeries?r.eachRawSeries(u):o?r.eachRawSeriesByType(o,u):l&&l(r,n).each(u);function u(i){var o=i.uid,s=a.get(o)||a.set(o,c({plan:b,reset:S,count:w}));s.context={model:i,ecModel:r,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},A(e,i,s)}var d=e._pipelineMap;a.each((function(e,t){d.get(t)||(e.dispose(),a.removeKey(t))}))}(this,r,a,t,i),r.overallReset&&function(e,t,i,r,a){var o=i.overallTask=i.overallTask||c({reset:_});o.context={ecModel:r,api:a,overallReset:t.overallReset,scheduler:e};var l=o.agentStubMap=o.agentStubMap||s(),u=t.seriesType,d=t.getTargetSeries,h=!0,p=t.modifyOutputEnd;u?r.eachRawSeriesByType(u,f):d?d(r,a).each(f):(h=!1,n(r.getSeries(),f));function f(t){var i=t.uid,r=l.get(i);r||(r=l.set(i,c({reset:v,onDirty:x})),o.dirty()),r.context={model:t,overallProgress:h,modifyOutputEnd:p},r.agent=o,r.__block=h,A(e,t,r)}var m=e._pipelineMap;l.each((function(e,t){m.get(t)||(e.dispose(),o.dirty(),l.removeKey(t))}))}(this,r,a,t,i)}),this)},m.prepareView=function(e,t,i,r){var n=e.renderTask,a=n.context;a.model=t,a.ecModel=i,a.api=r,n.__block=!e.incrementalPrepareRender,A(this,t,n)},m.performDataProcessorTasks=function(e,t){g(this,this._dataProcessorHandlers,e,t,{block:!0})},m.performVisualTasks=function(e,t,i){g(this,this._visualHandlers,e,t,i)},m.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},m.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))};var y=m.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function _(e){e.overallReset(e.ecModel,e.api,e.payload)}function v(e,t){return e.overallProgress&&C}function C(){this.agent.dirty(),this.getDownstream().dirty()}function x(){this.agent&&this.agent.dirty()}function b(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function S(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=p(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?a(t,(function(e,t){return E(t)})):T}var T=E(0);function E(e){return function(t,i){var r=i.data,n=i.resetDefines[e];if(n&&n.dataEach)for(var a=t.start;a<t.end;a++)n.dataEach(r,a);else n&&n.progress&&n.progress(t,r)}}function w(e){return e.data.count()}function A(e,t,i){var r=t.uid,n=e._pipelineMap.get(r);!n.head&&(n.head=i),n.tail&&n.tail.pipe(i),n.tail=i,i.__idxInPipeline=n.count++,i.__pipeline=n}function P(e){D=null;try{e(M,I)}catch(e){}return D}f.wrapStageHandler=function(e,t){return o(e)&&(e={overallReset:e,seriesType:P(e)}),e.uid=u("stageHandler"),t&&(e.visualType=t),e};var D,M={},I={};function R(e,t){for(var i in t.prototype)e[i]=l}R(M,d),R(I,h),M.eachSeriesByType=M.eachRawSeriesByType=function(e){D=e},M.eachComponent=function(e){"series"===e.mainType&&e.subType&&(D=e.subType)};var O=f;e.exports=O},function(e,t){var i=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],r={color:i,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],i]};e.exports=r},function(e,t){var i=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],r={color:i,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"},label:{color:"#000"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:i[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:i},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};r.categoryAxis.splitLine.show=!1;var n=r;e.exports=n},function(e,t,i){var r=i(10).extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var i=.5522848,r=t.cx,n=t.cy,a=t.rx,o=t.ry,s=a*i,l=o*i;e.moveTo(r-a,n),e.bezierCurveTo(r-a,n-l,r-s,n-o,r,n-o),e.bezierCurveTo(r+s,n-o,r+a,n-l,r+a,n),e.bezierCurveTo(r+a,n+l,r+s,n+o,r,n+o),e.bezierCurveTo(r-s,n+o,r-a,n+l,r-a,n),e.closePath()}});e.exports=r},function(e,t,i){var r=i(0),n=i(30),a=i(21),o=i(53),s=i(12),l=i(6);l.getLayoutRect;t.getLayoutRect=l.getLayoutRect;var c=i(26),u=c.enableDataStack,d=c.isDimensionStacked,h=c.getStackedDimension,p=i(175);t.completeDimensions=p;var f=i(52);t.createDimensions=f;var m=i(19);t.createSymbol=m.createSymbol;var g={isDimensionStacked:d,enableDataStack:u,getStackedDimension:h};t.createList=function(e){return n(e.getSource(),e)},t.dataStack=g,t.createScale=function(e,t){var i=t;s.isInstance(t)||(i=new s(t),r.mixin(i,o));var n=a.createScaleByModel(i);return n.setExtent(e[0],e[1]),a.niceScaleExtent(n,i),n},t.mixinAxisModelCommonMethods=function(e){r.mixin(e,o)}},function(e,t,i){i(5).__DEV__;var r=i(0),n=r.createHashMap,a=(r.retrieve,r.each);function o(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=n(),this.categoryAxisMap=n(),this.firstCategoryDimIndex=null}var s={cartesian2d:function(e,t,i,r){var n=e.getReferringComponents("xAxis")[0],a=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],i.set("x",n),i.set("y",a),l(n)&&(r.set("x",n),t.firstCategoryDimIndex=0),l(a)&&(r.set("y",a),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,i,r){var n=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],i.set("single",n),l(n)&&(r.set("single",n),t.firstCategoryDimIndex=0)},polar:function(e,t,i,r){var n=e.getReferringComponents("polar")[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",o),l(a)&&(r.set("radius",a),t.firstCategoryDimIndex=0),l(o)&&(r.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,i,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,i,r){var n=e.ecModel,o=n.getComponent("parallel",e.get("parallelIndex")),s=t.coordSysDims=o.dimensions.slice();a(o.parallelAxisIndex,(function(e,a){var o=n.getComponent("parallelAxis",e),c=s[a];i.set(c,o),l(o)&&null==t.firstCategoryDimIndex&&(r.set(c,o),t.firstCategoryDimIndex=a)}))}};function l(e){return"category"===e.get("type")}t.getCoordSysInfoBySeries=function(e){var t=e.get("coordinateSystem"),i=new o(t),r=s[t];if(r)return r(e,i,i.axisMap,i.categoryAxisMap),i}},function(e,t,i){var r=i(0),n=i(84),a=i(176),o=n.prototype,s=n.extend({type:"ordinal",init:function(e,t){e&&!r.isArray(e)||(e=new a({categories:e})),this._ordinalMeta=e,this._extent=t||[0,e.categories.length-1]},parse:function(e){return"string"==typeof e?this._ordinalMeta.getOrdinal(e):Math.round(e)},contain:function(e){return e=this.parse(e),o.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return o.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(o.scale.call(this,e))},getTicks:function(){for(var e=[],t=this._extent,i=t[0];i<=t[1];)e.push(i),i++;return e},getLabel:function(e){if(!this.isBlank())return this._ordinalMeta.categories[e]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:r.noop,niceExtent:r.noop});s.create=function(){return new s};var l=s;e.exports=l},function(e,t,i){var r=i(0),n=i(3),a=i(7),o=i(177),s=i(85),l=s.prototype,c=Math.ceil,u=Math.floor,d=864e5,h=s.extend({type:"time",getLabel:function(e){var t=this._stepLvl,i=new Date(e);return a.formatTime(t[0],i,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=d,t[1]+=d),t[1]===-1/0&&t[0]===1/0){var i=new Date;t[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),t[0]=t[1]-d}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var r=this._interval;e.fixMin||(t[0]=n.round(u(t[0]/r)*r)),e.fixMax||(t[1]=n.round(c(t[1]/r)*r))},niceTicks:function(e,t,i){e=e||10;var r=this._extent,a=r[1]-r[0],s=a/e;null!=t&&s<t&&(s=t),null!=i&&s>i&&(s=i);var l=p.length,d=function(e,t,i,r){for(;i<r;){var n=i+r>>>1;e[n][1]<t?i=n+1:r=n}return i}(p,s,0,l),h=p[Math.min(d,l-1)],f=h[1];if("year"===h[0]){var m=a/f;f*=n.nice(m/e,!0)}var g=this.getSetting("useUTC")?0:60*new Date(+r[0]||+r[1]).getTimezoneOffset()*1e3,y=[Math.round(c((r[0]-g)/f)*f+g),Math.round(u((r[1]-g)/f)*f+g)];o.fixExtent(y,r),this._stepLvl=h,this._interval=f,this._niceExtent=y},parse:function(e){return+n.parseDate(e)}});r.each(["contain","normalize"],(function(e){h.prototype[e]=function(t){return l[e].call(this,this.parse(t))}}));var p=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",d],["MM-dd\nyyyy",2*d],["MM-dd\nyyyy",3*d],["MM-dd\nyyyy",4*d],["MM-dd\nyyyy",5*d],["MM-dd\nyyyy",6*d],["week",7*d],["MM-dd\nyyyy",10*d],["week",14*d],["week",21*d],["month",31*d],["week",42*d],["month",62*d],["week",70*d],["quarter",95*d],["month",31*d*4],["month",31*d*5],["half-year",380*d/2],["month",31*d*8],["month",31*d*10],["year",380*d]];h.create=function(e){return new h({useUTC:e.ecModel.get("useUTC")})};var f=h;e.exports=f},function(e,t,i){var r=i(0),n=i(17),a=i(4).makeInner,o=i(21),s=o.makeLabelFormatter,l=o.getOptionCategoryInterval,c=o.shouldShowAllLabels,u=a();function d(e,t){var i,n,a=h(e,"labels"),o=l(t),s=p(a,o);return s||(r.isFunction(o)?i=g(e,o):(n="auto"===o?function(e){var t=u(e).autoInterval;return null!=t?t:u(e).autoInterval=e.calculateCategoryInterval()}(e):o,i=m(e,n)),f(a,o,{labels:i,labelCategoryInterval:n}))}function h(e,t){return u(e)[t]||(u(e)[t]=[])}function p(e,t){for(var i=0;i<e.length;i++)if(e[i].key===t)return e[i].value}function f(e,t,i){return e.push({key:t,value:i}),i}function m(e,t,i){var r=s(e),n=e.scale,a=n.getExtent(),o=e.getLabelModel(),l=[],u=Math.max((t||0)+1,1),d=a[0],h=n.count();0!==d&&u>1&&h/u>2&&(d=Math.round(Math.ceil(d/u)*u));var p=c(e),f=o.get("showMinLabel")||p,m=o.get("showMaxLabel")||p;f&&d!==a[0]&&y(a[0]);for(var g=d;g<=a[1];g+=u)y(g);function y(e){l.push(i?e:{formattedLabel:r(e),rawLabel:n.getLabel(e),tickValue:e})}return m&&g-u!==a[1]&&y(a[1]),l}function g(e,t,i){var n=e.scale,a=s(e),o=[];return r.each(n.getTicks(),(function(e){var r=n.getLabel(e);t(e,r)&&o.push(i?e:{formattedLabel:a(e),rawLabel:r,tickValue:e})})),o}t.createAxisLabels=function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),i=d(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(e):function(e){var t=e.scale.getTicks(),i=s(e);return{labels:r.map(t,(function(t,r){return{formattedLabel:i(t,r),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},t.createAxisTicks=function(e,t){return"category"===e.type?function(e,t){var i,n,a=h(e,"ticks"),o=l(t),s=p(a,o);if(s)return s;t.get("show")&&!e.scale.isBlank()||(i=[]);if(r.isFunction(o))i=g(e,o,!0);else if("auto"===o){var c=d(e,e.getLabelModel());n=c.labelCategoryInterval,i=r.map(c.labels,(function(e){return e.tickValue}))}else i=m(e,n=o,!0);return f(a,o,{ticks:i,tickCategoryInterval:n})}(e,t):{ticks:e.scale.getTicks()}},t.calculateCategoryInterval=function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),i=s(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,a=e.scale,o=a.getExtent(),l=a.count();if(o[1]-o[0]<1)return 0;var c=1;l>40&&(c=Math.max(1,Math.floor(l/40)));for(var d=o[0],h=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(h*Math.cos(r)),f=Math.abs(h*Math.sin(r)),m=0,g=0;d<=o[1];d+=c){var y,_,v=n.getBoundingRect(i(d),t.font,"center","top");y=1.3*v.width,_=1.3*v.height,m=Math.max(m,y,7),g=Math.max(g,_,7)}var C=m/p,x=g/f;isNaN(C)&&(C=1/0),isNaN(x)&&(x=1/0);var b=Math.max(0,Math.floor(Math.min(C,x))),S=u(e.model),T=e.getExtent(),E=S.lastAutoInterval,w=S.lastTickCount;return null!=E&&null!=w&&Math.abs(E-b)<=1&&Math.abs(w-l)<=1&&E>b&&S.axisExtend0===T[0]&&S.axisExtend1===T[1]?b=E:(S.lastTickCount=l,S.lastAutoInterval=b,S.axisExtend0=T[0],S.axisExtend1=T[1]),b}},function(e,t,i){var r=i(1);i(323),i(324);var n=i(44),a=i(69),o=i(326);i(70),r.registerVisual(n("line","circle","line")),r.registerLayout(a("line")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,o("line"))},function(e,t,i){i(5).__DEV__;var r=i(30),n=i(14).extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return r(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});e.exports=n},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(62).fromPoints,a=i(67),o=i(87),s=i(325),l=i(2),c=i(4),u=i(183),d=u.Polyline,h=u.Polygon,p=i(25),f=i(182),m=f.prepareDataCoordInfo,g=f.getStackedOnPoint,y=i(68),_=y.createGridClipPath,v=y.createPolarClipPath;function C(e,t){if(e.length===t.length){for(var i=0;i<e.length;i++){var r=e[i],n=t[i];if(r[0]!==n[0]||r[1]!==n[1])return}return!0}}function x(e,t){var i=[],r=[],a=[],o=[];return n(e,i,r),n(t,a,o),Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(r[0]-o[0]),Math.abs(r[1]-o[1]))}function b(e){return"number"==typeof e?e:e?.5:0}function S(e,t,i){for(var r=t.getBaseAxis(),n="x"===r.dim||"radius"===r.dim?0:1,a=[],o=0;o<e.length-1;o++){var s=e[o+1],l=e[o];a.push(l);var c=[];switch(i){case"end":c[n]=s[n],c[1-n]=l[1-n],a.push(c);break;case"middle":var u=(l[n]+s[n])/2,d=[];c[n]=d[n]=u,c[1-n]=l[1-n],d[1-n]=s[1-n],a.push(c),a.push(d);break;default:c[n]=l[n],c[1-n]=s[1-n],a.push(c)}}return e[o]&&a.push(e[o]),a}function T(e,t,i){var n=e.get("showAllSymbol"),a="auto"===n;if(!n||a){var s=i.getAxesByScale("ordinal")[0];if(s&&(!a||!function(e,t){var i=e.getExtent(),r=Math.abs(i[1]-i[0])/e.scale.count();isNaN(r)&&(r=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),s=0;s<n;s+=a)if(1.5*o.getSymbolSize(t,s)[e.isHorizontal()?1:0]>r)return!1;return!0}(s,t))){var l=t.mapDimension(s.dim),c={};return r.each(s.getViewLabels(),(function(e){c[e.tickValue]=1})),function(e){return!c.hasOwnProperty(t.get(l,e))}}}}function E(e,t,i){if("cartesian2d"===e.type){var r=e.getBaseAxis().isHorizontal(),n=_(e,t,i);if(!i.get("clip",!0)){var a=n.shape,o=Math.max(a.width,a.height);r?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return n}return v(e,t,i)}var w=p.extend({type:"line",init:function(){var e=new l.Group,t=new a;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,i){var n=e.coordinateSystem,a=this.group,o=e.getData(),s=e.getModel("lineStyle"),c=e.getModel("areaStyle"),u=o.mapArray(o.getItemLayout),d="polar"===n.type,h=this._coordSys,p=this._symbolDraw,f=this._polyline,y=this._polygon,_=this._lineGroup,v=e.get("animation"),x=!c.isEmpty(),w=c.get("origin"),A=function(e,t,i){if(!i.valueDim)return[];for(var r=[],n=0,a=t.count();n<a;n++)r.push(g(i,e,t,n));return r}(n,o,m(n,o,w)),P=e.get("showSymbol"),D=P&&!d&&T(e,o,n),M=this._data;M&&M.eachItemGraphicEl((function(e,t){e.__temp&&(a.remove(e),M.setItemGraphicEl(t,null))})),P||p.remove(),a.add(_);var I,R=!d&&e.get("step");n&&n.getArea&&e.get("clip",!0)&&(null!=(I=n.getArea()).width?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r1+=.5)),this._clipShapeForSymbol=I,f&&h.type===n.type&&R===this._step?(x&&!y?y=this._newPolygon(u,A,n,v):y&&!x&&(_.remove(y),y=this._polygon=null),_.setClipPath(E(n,!1,e)),P&&p.updateData(o,{isIgnore:D,clipShape:I}),o.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),C(this._stackedOnPoints,A)&&C(this._points,u)||(v?this._updateAnimation(o,A,n,i,R,w):(R&&(u=S(u,n,R),A=S(A,n,R)),f.setShape({points:u}),y&&y.setShape({points:u,stackedOnPoints:A})))):(P&&p.updateData(o,{isIgnore:D,clipShape:I}),R&&(u=S(u,n,R),A=S(A,n,R)),f=this._newPolyline(u,n,v),x&&(y=this._newPolygon(u,A,n,v)),_.setClipPath(E(n,!0,e)));var O=function(e,t){var i=e.getVisual("visualMeta");if(i&&i.length&&e.count()&&"cartesian2d"===t.type){for(var n,a,o=i.length-1;o>=0;o--){var s=i[o].dimension,c=e.dimensions[s],u=e.getDimensionInfo(c);if("x"===(n=u&&u.coordDim)||"y"===n){a=i[o];break}}if(a){var d=t.getAxis(n),h=r.map(a.stops,(function(e){return{coord:d.toGlobalCoord(d.dataToCoord(e.value)),color:e.color}})),p=h.length,f=a.outerColors.slice();p&&h[0].coord>h[p-1].coord&&(h.reverse(),f.reverse());var m=h[0].coord-10,g=h[p-1].coord+10,y=g-m;if(y<.001)return"transparent";r.each(h,(function(e){e.offset=(e.coord-m)/y})),h.push({offset:p?h[p-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:f[0]||"transparent"});var _=new l.LinearGradient(0,0,0,0,h,!0);return _[n]=m,_[n+"2"]=g,_}}}(o,n)||o.getVisual("color");f.useStyle(r.defaults(s.getLineStyle(),{fill:"none",stroke:O,lineJoin:"bevel"}));var L=e.get("smooth");if(L=b(e.get("smooth")),f.setShape({smooth:L,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),y){var N=o.getCalculationInfo("stackedOnSeries"),F=0;y.useStyle(r.defaults(c.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel"})),N&&(F=b(N.get("smooth"))),y.setShape({smooth:L,stackedOnSmooth:F,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=A,this._points=u,this._step=R,this._valueOrigin=w},dispose:function(){},highlight:function(e,t,i,r){var n=e.getData(),a=c.queryDataIndex(n,r);if(!(a instanceof Array)&&null!=a&&a>=0){var s=n.getItemGraphicEl(a);if(!s){var l=n.getItemLayout(a);if(!l)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l[0],l[1]))return;(s=new o(n,a)).position=l,s.setZ(e.get("zlevel"),e.get("z")),s.ignore=isNaN(l[0])||isNaN(l[1]),s.__temp=!0,n.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else p.prototype.highlight.call(this,e,t,i,r)},downplay:function(e,t,i,r){var n=e.getData(),a=c.queryDataIndex(n,r);if(null!=a&&a>=0){var o=n.getItemGraphicEl(a);o&&(o.__temp?(n.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else p.prototype.downplay.call(this,e,t,i,r)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new d({shape:{points:e},silent:!0,z2:10}),this._lineGroup.add(t),this._polyline=t,t},_newPolygon:function(e,t){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new h({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(e,t,i,r,n,a){var o=this._polyline,c=this._polygon,u=e.hostModel,d=s(this._data,e,this._stackedOnPoints,t,this._coordSys,i,this._valueOrigin,a),h=d.current,p=d.stackedOnCurrent,f=d.next,m=d.stackedOnNext;if(n&&(h=S(d.current,i,n),p=S(d.stackedOnCurrent,i,n),f=S(d.next,i,n),m=S(d.stackedOnNext,i,n)),x(h,f)>3e3||c&&x(p,m)>3e3)return o.setShape({points:f}),void(c&&c.setShape({points:f,stackedOnPoints:m}));o.shape.__points=d.current,o.shape.points=h,l.updateProps(o,{shape:{points:f}},u),c&&(c.setShape({points:h,stackedOnPoints:p}),l.updateProps(c,{shape:{points:f,stackedOnPoints:m}},u));for(var g=[],y=d.status,_=0;_<y.length;_++){if("="===y[_].cmd){var v=e.getItemGraphicEl(y[_].idx1);v&&g.push({el:v,ptIdx:_})}}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var e=0;e<g.length;e++){g[e].el.attr("position",o.shape.__points[g[e].ptIdx])}}))},remove:function(e){var t=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),i.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});e.exports=w},function(e,t,i){var r=i(182),n=r.prepareDataCoordInfo,a=r.getStackedOnPoint;e.exports=function(e,t,i,r,o,s,l,c){for(var u=function(e,t){var i=[];return t.diff(e).add((function(e){i.push({cmd:"+",idx:e})})).update((function(e,t){i.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){i.push({cmd:"-",idx:e})})).execute(),i}(e,t),d=[],h=[],p=[],f=[],m=[],g=[],y=[],_=n(o,t,l),v=n(s,e,c),C=0;C<u.length;C++){var x=u[C],b=!0;switch(x.cmd){case"=":var S=e.getItemLayout(x.idx),T=t.getItemLayout(x.idx1);(isNaN(S[0])||isNaN(S[1]))&&(S=T.slice()),d.push(S),h.push(T),p.push(i[x.idx]),f.push(r[x.idx1]),y.push(t.getRawIndex(x.idx1));break;case"+":var E=x.idx;d.push(o.dataToPoint([t.get(_.dataDimsForPoint[0],E),t.get(_.dataDimsForPoint[1],E)])),h.push(t.getItemLayout(E).slice()),p.push(a(_,o,t,E)),f.push(r[E]),y.push(t.getRawIndex(E));break;case"-":E=x.idx;var w=e.getRawIndex(E);w!==E?(d.push(e.getItemLayout(E)),h.push(s.dataToPoint([e.get(v.dataDimsForPoint[0],E),e.get(v.dataDimsForPoint[1],E)])),p.push(i[E]),f.push(a(v,s,e,E)),y.push(w)):b=!1}b&&(m.push(x),g.push(g.length))}g.sort((function(e,t){return y[e]-y[t]}));var A=[],P=[],D=[],M=[],I=[];for(C=0;C<g.length;C++){E=g[C];A[C]=d[E],P[C]=h[E],D[C]=p[E],M[C]=f[E],I[C]=m[E]}return{current:A,next:P,stackedOnCurrent:D,stackedOnNext:M,status:I}}},function(e,t){var i={average:function(e){for(var t=0,i=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],i++);return 0===i?NaN:t/i},sum:function(e){for(var t=0,i=0;i<e.length;i++)t+=e[i]||0;return t},max:function(e){for(var t=-1/0,i=0;i<e.length;i++)e[i]>t&&(t=e[i]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,i=0;i<e.length;i++)e[i]<t&&(t=e[i]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},r=function(e,t){return Math.round(e.length/2)};e.exports=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,n){var a=e.getData(),o=e.get("sampling"),s=e.coordinateSystem;if("cartesian2d"===s.type&&o){var l,c=s.getBaseAxis(),u=s.getOtherAxis(c),d=c.getExtent(),h=Math.abs(d[1]-d[0]),p=Math.round(a.count()/h);if(p>1)"string"==typeof o?l=i[o]:"function"==typeof o&&(l=o),l&&e.setData(a.downSample(a.mapDimension(u.dim),1/p,l,r))}}}}},function(e,t,i){var r=i(0),n=i(9),a=i(328);function o(e){a.call(this,e)}o.prototype={constructor:o,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(e){var t=this.getAxis("x"),i=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,i){var r=this.getAxis("x"),n=this.getAxis("y");return(i=i||[])[0]=r.toGlobalCoord(r.dataToCoord(e[0])),i[1]=n.toGlobalCoord(n.dataToCoord(e[1])),i},clampData:function(e,t){var i=this.getAxis("x").scale,r=this.getAxis("y").scale,n=i.getExtent(),a=r.getExtent(),o=i.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(n[0],n[1]),o),Math.max(n[0],n[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},pointToData:function(e,t){var i=this.getAxis("x"),r=this.getAxis("y");return(t=t||[])[0]=i.coordToData(i.toLocalCoord(e[0])),t[1]=r.coordToData(r.toLocalCoord(e[1])),t},getOtherAxis:function(e){return this.getAxis("x"===e.dim?"y":"x")},getArea:function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),a=Math.max(e[0],e[1])-i,o=Math.max(t[0],t[1])-r;return new n(i,r,a,o)}},r.inherits(o,a);var s=o;e.exports=s},function(e,t,i){var r=i(0);function n(e){return this._axes[e]}var a=function(e){this._axes={},this._dimList=[],this.name=e||""};a.prototype={constructor:a,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return r.map(this._dimList,n,this)},getAxesByScale:function(e){return e=e.toLowerCase(),r.filter(this.getAxes(),(function(t){return t.scale.type===e}))},addAxis:function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},dataToCoord:function(e){return this._dataCoordConvert(e,"dataToCoord")},coordToData:function(e){return this._dataCoordConvert(e,"coordToData")},_dataCoordConvert:function(e,t){for(var i=this._dimList,r=e instanceof Array?[]:{},n=0;n<i.length;n++){var a=i[n],o=this._axes[a];r[a]=o[t](e[a])}return r}};var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(35),a=function(e,t,i,r,a){n.call(this,e,t,i),this.type=r||"value",this.position=a||"bottom"};a.prototype={constructor:a,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},getGlobalExtent:function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},toLocalCoord:null,toGlobalCoord:null},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){i(184);var r=i(13).extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});e.exports=r},function(e,t,i){i(184),i(332)},function(e,t,i){var r=i(0),n=i(2),a=i(36),o=i(45),s=i(186),l=i(187),c=l.rectCoordAxisBuildSplitArea,u=l.rectCoordAxisHandleRemove,d=["axisLine","axisTickLabel","axisName"],h=["splitArea","splitLine","minorSplitLine"],p=o.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,i,o){this.group.removeAll();var l=this._axisGroup;if(this._axisGroup=new n.Group,this.group.add(this._axisGroup),e.get("show")){var c=e.getCoordSysModel(),u=s.layout(c,e),f=new a(e,u);r.each(d,f.add,f),this._axisGroup.add(f.getGroup()),r.each(h,(function(t){e.get(t+".show")&&this["_"+t](e,c)}),this),n.groupTransition(l,this._axisGroup,e),p.superCall(this,"render",e,t,i,o)}},remove:function(){u(this)},_splitLine:function(e,t){var i=e.axis;if(!i.scale.isBlank()){var a=e.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=r.isArray(s)?s:[s];for(var l=t.coordinateSystem.getRect(),c=i.isHorizontal(),u=0,d=i.getTicksCoords({tickModel:a}),h=[],p=[],f=o.getLineStyle(),m=0;m<d.length;m++){var g=i.toGlobalCoord(d[m].coord);c?(h[0]=g,h[1]=l.y,p[0]=g,p[1]=l.y+l.height):(h[0]=l.x,h[1]=g,p[0]=l.x+l.width,p[1]=g);var y=u++%s.length,_=d[m].tickValue;this._axisGroup.add(new n.Line({anid:null!=_?"line_"+d[m].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:r.defaults({stroke:s[y]},f),silent:!0}))}}},_minorSplitLine:function(e,t){var i=e.axis,r=e.getModel("minorSplitLine").getModel("lineStyle"),a=t.coordinateSystem.getRect(),o=i.isHorizontal(),s=i.getMinorTicksCoords();if(s.length)for(var l=[],c=[],u=r.getLineStyle(),d=0;d<s.length;d++)for(var h=0;h<s[d].length;h++){var p=i.toGlobalCoord(s[d][h].coord);o?(l[0]=p,l[1]=a.y,c[0]=p,c[1]=a.y+a.height):(l[0]=a.x,l[1]=p,c[0]=a.x+a.width,c[1]=p),this._axisGroup.add(new n.Line({anid:"minor_line_"+s[d][h].tickValue,subPixelOptimize:!0,shape:{x1:l[0],y1:l[1],x2:c[0],y2:c[1]},style:u,silent:!0}))}},_splitArea:function(e,t){c(this,this._axisGroup,e,t)}});p.extend({type:"xAxis"}),p.extend({type:"yAxis"})},function(e,t,i){var r=i(1),n=i(0),a=i(86),o=a.layout,s=a.largeLayout;i(111),i(334),i(335),i(70),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,n.curry(o,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,s),r.registerVisual({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}})},function(e,t,i){var r=i(188).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});e.exports=r},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(2),o=i(189).setLabel,s=i(12),l=i(336),c=i(10),u=i(40),d=i(33).throttle,h=i(68).createClipPath,p=i(337),f=["itemStyle","barBorderWidth"],m=[0,0];n.extend(s.prototype,l);var g=r.extendChartView({type:"bar",render:function(e,t,i){this._updateDrawMode(e);var r=e.get("coordinateSystem");return"cartesian2d"!==r&&"polar"!==r||(this._isLargeDraw?this._renderLarge(e,t,i):this._renderNormal(e,t,i)),this.group},incrementalPrepareRender:function(e,t,i){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,i,r){this._incrementalRenderLarge(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e,t,i){var r,n=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,c=l.getBaseAxis();"cartesian2d"===l.type?r=c.isHorizontal():"polar"===l.type&&(r="angle"===c.dim);var d=e.isAnimationEnabled()?e:null,h=e.get("clip",!0),p=function(e,t){var i=e.getArea&&e.getArea();if("cartesian2d"===e.type){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var n=t.getLayout("bandWidth");r.isHorizontal()?(i.x-=n,i.width+=2*n):(i.y-=n,i.height+=2*n)}}return i}(l,o);n.removeClipPath();var f=e.get("roundCap",!0),m=e.get("showBackground",!0),g=e.getModel("backgroundStyle"),y=g.get("barBorderRadius")||0,_=[],T=this._backgroundEls||[],w=function(e){var t=S[l.type](o,e),i=function(e,t,i){return new("polar"===e.type?a.Sector:a.Rect)({shape:D(t,i,e),silent:!0,z2:0})}(l,r,t);return i.useStyle(g.getBarItemStyle()),"cartesian2d"===l.type&&i.setShape("r",y),_[e]=i,i};o.diff(s).add((function(t){var i=o.getItemModel(t),a=S[l.type](o,t,i);if(m&&w(t),o.hasValue(t)){if(h)if(v[l.type](p,a))return void n.remove(s);var s=C[l.type](t,a,r,d,!1,f);o.setItemGraphicEl(t,s),n.add(s),E(s,o,t,i,a,e,r,"polar"===l.type)}})).update((function(t,i){var c=o.getItemModel(t),u=S[l.type](o,t,c);if(m){var x;0===T.length?x=w(i):((x=T[i]).useStyle(g.getBarItemStyle()),"cartesian2d"===l.type&&x.setShape("r",y),_[t]=x);var b=S[l.type](o,t),A=D(r,b,l);a.updateProps(x,{shape:A},d,t)}var P=s.getItemGraphicEl(i);if(o.hasValue(t)){if(h)if(v[l.type](p,u))return void n.remove(P);P?a.updateProps(P,{shape:u},d,t):P=C[l.type](t,u,r,d,!0,f),o.setItemGraphicEl(t,P),n.add(P),E(P,o,t,c,u,e,r,"polar"===l.type)}else n.remove(P)})).remove((function(e){var t=s.getItemGraphicEl(e);"cartesian2d"===l.type?t&&x(e,d,t):t&&b(e,d,t)})).execute();var A=this._backgroundGroup||(this._backgroundGroup=new u);A.removeAll();for(var P=0;P<_.length;++P)A.add(_[P]);n.add(A),this._backgroundEls=_,this._data=o},_renderLarge:function(e,t,i){this._clear(),A(e,this.group);var r=e.get("clip",!0)?h(e.coordinateSystem,!1,e):null;r?this.group.setClipPath(r):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),A(t,this.group,!0)},dispose:n.noop,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,i=this._data;e&&e.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl((function(t){"sector"===t.type?b(t.dataIndex,e,t):x(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}}),y=Math.max,_=Math.min,v={cartesian2d:function(e,t){var i=t.width<0?-1:1,r=t.height<0?-1:1;i<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var n=y(t.x,e.x),a=_(t.x+t.width,e.x+e.width),o=y(t.y,e.y),s=_(t.y+t.height,e.y+e.height);t.x=n,t.y=o,t.width=a-n,t.height=s-o;var l=t.width<0||t.height<0;return i<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e,t){var i=t.r0<=t.r?1:-1;if(i<0){var r=t.r;t.r=t.r0,t.r0=r}r=_(t.r,e.r);var n=y(t.r0,e.r0);t.r=r,t.r0=n;var a=r-n<0;if(i<0){r=t.r;t.r=t.r0,t.r0=r}return a}},C={cartesian2d:function(e,t,i,r,o){var s=new a.Rect({shape:n.extend({},t),z2:1});if(s.name="item",r){var l=i?"height":"width",c={};s.shape[l]=0,c[l]=t[l],a[o?"updateProps":"initProps"](s,{shape:c},r,e)}return s},polar:function(e,t,i,r,o,s){var l=t.startAngle<t.endAngle,c=new(!i&&s?p:a.Sector)({shape:n.defaults({clockwise:l},t),z2:1});if(c.name="item",r){var u=i?"r":"endAngle",d={};c.shape[u]=i?0:t.startAngle,d[u]=t[u],a[o?"updateProps":"initProps"](c,{shape:d},r,e)}return c}};function x(e,t,i){i.style.text=null,a.updateProps(i,{shape:{width:0}},t,e,(function(){i.parent&&i.parent.remove(i)}))}function b(e,t,i){i.style.text=null,a.updateProps(i,{shape:{r:i.shape.r0}},t,e,(function(){i.parent&&i.parent.remove(i)}))}var S={cartesian2d:function(e,t,i){var r=e.getItemLayout(t),n=i?function(e,t){var i=e.get(f)||0,r=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),n=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,r,n)}(i,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*n/2,y:r.y+o*n/2,width:r.width-a*n,height:r.height-o*n}},polar:function(e,t,i){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle}}};function T(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function E(e,t,i,r,s,l,c,u){var d=t.getItemVisual(i,"color"),h=t.getItemVisual(i,"opacity"),p=t.getVisual("borderColor"),f=r.getModel("itemStyle"),m=r.getModel("emphasis.itemStyle").getBarItemStyle();u||e.setShape("r",f.get("barBorderRadius")||0),e.useStyle(n.defaults({stroke:T(s)?"none":p,fill:T(s)?"none":d,opacity:h},f.getBarItemStyle()));var g=r.getShallow("cursor");g&&e.attr("cursor",g);var y=c?s.height>0?"bottom":"top":s.width>0?"left":"right";u||o(e.style,m,r,d,l,i,y),T(s)&&(m.fill=m.stroke="none"),a.setHoverStyle(e,m)}var w=c.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var i=t.points,r=this.__startPoint,n=this.__baseDimIdx,a=0;a<i.length;a+=2)r[n]=i[a+n],e.moveTo(r[0],r[1]),e.lineTo(i[a],i[a+1])}});function A(e,t,i){var r=e.getData(),n=[],a=r.getLayout("valueAxisHorizontal")?1:0;n[1-a]=r.getLayout("valueAxisStart");var o=r.getLayout("largeDataIndices"),s=r.getLayout("barWidth"),l=e.getModel("backgroundStyle");if(e.get("showBackground",!0)){var c=r.getLayout("largeBackgroundPoints"),u=[];u[1-a]=r.getLayout("backgroundStart");var d=new w({shape:{points:c},incremental:!!i,__startPoint:u,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(e,t,i){var r=t.get("borderColor")||t.get("color"),n=t.getItemStyle(["color","borderColor"]);e.useStyle(n),e.style.fill=null,e.style.stroke=r,e.style.lineWidth=i.getLayout("barWidth")}(d,l,r),t.add(d)}var h=new w({shape:{points:r.getLayout("largePoints")},incremental:!!i,__startPoint:n,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s});t.add(h),function(e,t,i){var r=i.getVisual("borderColor")||i.getVisual("color"),n=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(n),e.style.fill=null,e.style.stroke=r,e.style.lineWidth=i.getLayout("barWidth")}(h,e,r),h.seriesIndex=e.seriesIndex,e.get("silent")||(h.on("mousedown",P),h.on("mousemove",P))}var P=d((function(e){var t=function(e,t,i){var r=e.__baseDimIdx,n=1-r,a=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[n];m[0]=t,m[1]=i;for(var c=m[r],u=m[1-r],d=c-s,h=c+s,p=0,f=a.length/2;p<f;p++){var g=2*p,y=a[g+r],_=a[g+n];if(y>=d&&y<=h&&(l<=_?u>=l&&u<=_:u>=_&&u<=l))return o[p]}return-1}(this,e.offsetX,e.offsetY);this.dataIndex=t>=0?t:null}),30,!1);function D(e,t,i){var r,n="polar"===i.type;return r=n?i.getArea():i.grid.getRect(),n?{cx:r.cx,cy:r.cy,r0:e?r.r0:t.r0,r:e?r.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:r.x,y:e?r.y:t.y,width:e?t.width:r.width,height:e?r.height:t.height}}e.exports=g},function(e,t,i){var r=i(49)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),n={getBarItemStyle:function(e){var t=r(this,e);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(t.lineDash=i)}return t}};e.exports=n},function(e,t,i){var r=(0,i(2).extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(e,t){var i=t.cx,r=t.cy,n=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=.5*(a-n),s=n+o,l=t.startAngle,c=t.endAngle,u=t.clockwise,d=Math.cos(l),h=Math.sin(l),p=Math.cos(c),f=Math.sin(c);(u?c-l<2*Math.PI:l-c<2*Math.PI)&&(e.moveTo(d*n+i,h*n+r),e.arc(d*s+i,h*s+r,o,-Math.PI+l,l,!u)),e.arc(i,r,a,l,c,!u),e.moveTo(p*a+i,f*a+r),e.arc(p*s+i,f*s+r,o,c-2*Math.PI,c-Math.PI,!u),0!==n&&(e.arc(i,r,n,c,l,u),e.moveTo(d*n+i,f*n+r)),e.closePath()}});e.exports=r},function(e,t,i){var r=i(1),n=i(0);i(339),i(340);var a=i(190),o=i(90),s=i(341),l=i(72);a("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(o("pie")),r.registerLayout(n.curry(s,"pie")),r.registerProcessor(l("pie"))},function(e,t,i){var r=i(1),n=i(54),a=i(0),o=i(4),s=i(3).getPercentWithPrecision,l=i(112),c=i(42).retrieveRawAttr,u=i(29).makeSeriesEncodeForNameBased,d=i(71),h=r.extendSeriesModel({type:"series.pie",init:function(e){h.superApply(this,"init",arguments),this.legendVisualProvider=new d(a.bind(this.getData,this),a.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(e)},mergeOption:function(e){h.superCall(this,"mergeOption",e),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(e,t){return n(this,{coordDimensions:["value"],encodeDefaulter:a.curry(u,this)})},_createSelectableList:function(){for(var e=this.getRawData(),t=e.mapDimension("value"),i=[],r=0,n=e.count();r<n;r++)i.push({name:e.getName(r),value:e.get(t,r),selected:c(e,r,"selected")});return i},getDataParams:function(e){var t=this.getData(),i=h.superCall(this,"getDataParams",e),r=[];return t.each(t.mapDimension("value"),(function(e){r.push(e)})),i.percent=s(r,e,t.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(e){o.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});a.mixin(h,l);var p=h;e.exports=p},function(e,t,i){var r=i(0),n=i(2),a=i(25);function o(e,t,i,r){var n=t.getData(),a=this.dataIndex,o=n.getName(a),l=t.get("selectedOffset");r.dispatchAction({type:"pieToggleSelect",from:e,name:o,seriesId:t.id}),n.each((function(e){s(n.getItemGraphicEl(e),n.getItemLayout(e),t.isSelected(n.getName(e)),l,i)}))}function s(e,t,i,r,n){var a=(t.startAngle+t.endAngle)/2,o=i?r:0,s=[Math.cos(a)*o,Math.sin(a)*o];n?e.animate().when(200,{position:s}).start("bounceOut"):e.attr("position",s)}function l(e,t){n.Group.call(this);var i=new n.Sector({z2:2}),r=new n.Polyline,a=new n.Text;this.add(i),this.add(r),this.add(a),this.updateData(e,t,!0)}var c=l.prototype;c.updateData=function(e,t,i){var a=this.childAt(0),o=this.childAt(1),l=this.childAt(2),c=e.hostModel,u=e.getItemModel(t),d=e.getItemLayout(t),h=r.extend({},d);h.label=null;var p=c.getShallow("animationTypeUpdate");i?(a.setShape(h),"scale"===c.getShallow("animationType")?(a.shape.r=d.r0,n.initProps(a,{shape:{r:d.r}},c,t)):(a.shape.endAngle=d.startAngle,n.updateProps(a,{shape:{endAngle:d.endAngle}},c,t))):"expansion"===p?a.setShape(h):n.updateProps(a,{shape:h},c,t);var f=e.getItemVisual(t,"color");a.useStyle(r.defaults({lineJoin:"bevel",fill:f},u.getModel("itemStyle").getItemStyle())),a.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var m=u.getShallow("cursor");m&&a.attr("cursor",m),s(this,e.getItemLayout(t),c.isSelected(e.getName(t)),c.get("selectedOffset"),c.get("animation"));var g=!i&&"transition"===p;this._updateLabel(e,t,g),this.highDownOnUpdate=c.get("silent")?null:function(e,t){var i=c.isAnimationEnabled()&&u.get("hoverAnimation");"emphasis"===t?(o.ignore=o.hoverIgnore,l.ignore=l.hoverIgnore,i&&(a.stopAnimation(!0),a.animateTo({shape:{r:d.r+c.get("hoverOffset")}},300,"elasticOut"))):(o.ignore=o.normalIgnore,l.ignore=l.normalIgnore,i&&(a.stopAnimation(!0),a.animateTo({shape:{r:d.r}},300,"elasticOut")))},n.setHoverStyle(this)},c._updateLabel=function(e,t,i){var r=this.childAt(1),a=this.childAt(2),o=e.hostModel,s=e.getItemModel(t),l=e.getItemLayout(t).label,c=e.getItemVisual(t,"color");if(!l||isNaN(l.x)||isNaN(l.y))a.ignore=a.normalIgnore=a.hoverIgnore=r.ignore=r.normalIgnore=r.hoverIgnore=!0;else{var u={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},d={x:l.x,y:l.y};i?(n.updateProps(r,{shape:u},o,t),n.updateProps(a,{style:d},o,t)):(r.attr({shape:u}),a.attr({style:d})),a.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var h=s.getModel("label"),p=s.getModel("emphasis.label"),f=s.getModel("labelLine"),m=s.getModel("emphasis.labelLine");c=e.getItemVisual(t,"color");n.setLabelStyle(a.style,a.hoverStyle={},h,p,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:l.text,autoColor:c,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:e.getItemVisual(t,"opacity")}),a.ignore=a.normalIgnore=!h.get("show"),a.hoverIgnore=!p.get("show"),r.ignore=r.normalIgnore=!f.get("show"),r.hoverIgnore=!m.get("show"),r.setStyle({stroke:c,opacity:e.getItemVisual(t,"opacity")}),r.setStyle(f.getModel("lineStyle").getLineStyle()),r.hoverStyle=m.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),r.setShape({smooth:g})}},r.inherits(l,n.Group);var u=a.extend({type:"pie",init:function(){var e=new n.Group;this._sectorGroup=e},render:function(e,t,i,n){if(!n||n.from!==this.uid){var a=e.getData(),s=this._data,c=this.group,u=t.get("animation"),d=!s,h=e.get("animationType"),p=e.get("animationTypeUpdate"),f=r.curry(o,this.uid,e,u,i),m=e.get("selectedMode");if(a.diff(s).add((function(e){var t=new l(a,e);d&&"scale"!==h&&t.eachChild((function(e){e.stopAnimation(!0)})),m&&t.on("click",f),a.setItemGraphicEl(e,t),c.add(t)})).update((function(e,t){var i=s.getItemGraphicEl(t);d||"transition"===p||i.eachChild((function(e){e.stopAnimation(!0)})),i.updateData(a,e),i.off("click"),m&&i.on("click",f),c.add(i),a.setItemGraphicEl(e,i)})).remove((function(e){var t=s.getItemGraphicEl(e);c.remove(t)})).execute(),u&&a.count()>0&&(d?"scale"!==h:"transition"!==p)){for(var g=a.getItemLayout(0),y=1;isNaN(g.startAngle)&&y<a.count();++y)g=a.getItemLayout(y);var _=Math.max(i.getWidth(),i.getHeight())/2,v=r.bind(c.removeClipPath,c);c.setClipPath(this._createClipPath(g.cx,g.cy,_,g.startAngle,g.clockwise,v,e,d))}else c.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(e,t,i,r,a,o,s,l){var c=new n.Sector({shape:{cx:e,cy:t,r0:0,r:i,startAngle:r,endAngle:r,clockwise:a}});return(l?n.initProps:n.updateProps)(c,{shape:{endAngle:r+(a?1:-1)*Math.PI*2}},s,o),c},containPoint:function(e,t){var i=t.getData().getItemLayout(0);if(i){var r=e[0]-i.cx,n=e[1]-i.cy,a=Math.sqrt(r*r+n*n);return a<=i.r&&a>=i.r0}}});e.exports=u},function(e,t,i){var r=i(3),n=r.parsePercent,a=r.linearMap,o=i(6),s=i(342),l=i(0),c=2*Math.PI,u=Math.PI/180;e.exports=function(e,t,i,r){t.eachSeriesByType(e,(function(e){var t=e.getData(),r=t.mapDimension("value"),d=function(e,t){return o.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,i),h=e.get("center"),p=e.get("radius");l.isArray(p)||(p=[0,p]),l.isArray(h)||(h=[h,h]);var f=n(d.width,i.getWidth()),m=n(d.height,i.getHeight()),g=Math.min(f,m),y=n(h[0],f)+d.x,_=n(h[1],m)+d.y,v=n(p[0],g/2),C=n(p[1],g/2),x=-e.get("startAngle")*u,b=e.get("minAngle")*u,S=0;t.each(r,(function(e){!isNaN(e)&&S++}));var T=t.getSum(r),E=Math.PI/(T||S)*2,w=e.get("clockwise"),A=e.get("roseType"),P=e.get("stillShowZeroSum"),D=t.getDataExtent(r);D[0]=0;var M=c,I=0,R=x,O=w?1:-1;if(t.each(r,(function(e,i){var r;if(isNaN(e))t.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:y,cy:_,r0:v,r:A?NaN:C,viewRect:d});else{(r="area"!==A?0===T&&P?E:e*E:c/S)<b?(r=b,M-=b):I+=e;var n=R+O*r;t.setItemLayout(i,{angle:r,startAngle:R,endAngle:n,clockwise:w,cx:y,cy:_,r0:v,r:A?a(e,D,[v,C]):C,viewRect:d}),R=n}})),M<c&&S)if(M<=.001){var L=c/S;t.each(r,(function(e,i){if(!isNaN(e)){var r=t.getItemLayout(i);r.angle=L,r.startAngle=x+O*i*L,r.endAngle=x+O*(i+1)*L}}))}else E=M/I,R=x,t.each(r,(function(e,i){if(!isNaN(e)){var r=t.getItemLayout(i),n=r.angle===b?b:e*E;r.startAngle=R,r.endAngle=R+O*n,R+=O*n}}));s(e,C,d.width,d.height,d.x,d.y)}))}},function(e,t,i){var r=i(17),n=i(3).parsePercent,a=Math.PI/180;function o(e,t,i,r,n,a,o,s,l,c){function u(t,i,r,n){for(var a=t;a<i&&!(e[a].y+r>l+o);a++)if(e[a].y+=r,a>t&&a+1<i&&e[a+1].y>e[a].y+e[a].height)return void d(a,r/2);d(i-1,r/2)}function d(t,i){for(var r=t;r>=0&&!(e[r].y-i<l)&&(e[r].y-=i,!(r>0&&e[r].y>e[r-1].y+e[r-1].height));r--);}function h(e,t,i,r,n,a){for(var o=t?Number.MAX_VALUE:0,s=0,l=e.length;s<l;s++)if("none"===e[s].labelAlignTo){var c=Math.abs(e[s].y-r),u=e[s].len,d=e[s].len2,h=c<n+u?Math.sqrt((n+u+d)*(n+u+d)-c*c):Math.abs(e[s].x-i);t&&h>=o&&(h=o-10),!t&&h<=o&&(h=o+10),e[s].x=i+h*a,o=h}}e.sort((function(e,t){return e.y-t.y}));for(var p,f=0,m=e.length,g=[],y=[],_=0;_<m;_++){if("outer"===e[_].position&&"labelLine"===e[_].labelAlignTo){var v=e[_].x-c;e[_].linePoints[1][0]+=v,e[_].x=c}(p=e[_].y-f)<0&&u(_,m,-p),f=e[_].y+e[_].height}o-f<0&&d(m-1,f-o);for(_=0;_<m;_++)e[_].y>=i?y.push(e[_]):g.push(e[_]);h(g,!1,t,i,r,n),h(y,!0,t,i,r,n)}function s(e){return"center"===e.position}e.exports=function(e,t,i,l,c,u){var d,h,p=e.getData(),f=[],m=!1,g=(e.get("minShowLabelAngle")||0)*a;p.each((function(a){var o=p.getItemLayout(a),s=p.getItemModel(a),l=s.getModel("label"),u=l.get("position")||s.get("emphasis.label.position"),y=l.get("distanceToLabelLine"),_=l.get("alignTo"),v=n(l.get("margin"),i),C=l.get("bleedMargin"),x=l.getFont(),b=s.getModel("labelLine"),S=b.get("length");S=n(S,i);var T=b.get("length2");if(T=n(T,i),!(o.angle<g)){var E,w,A,P,D=(o.startAngle+o.endAngle)/2,M=Math.cos(D),I=Math.sin(D);d=o.cx,h=o.cy;var R,O=e.getFormattedLabel(a,"normal")||p.getName(a),L=r.getBoundingRect(O,x,P,"top"),N="inside"===u||"inner"===u;if("center"===u)E=o.cx,w=o.cy,P="center";else{var F=(N?(o.r+o.r0)/2*M:o.r*M)+d,B=(N?(o.r+o.r0)/2*I:o.r*I)+h;if(E=F+3*M,w=B+3*I,!N){var V=F+M*(S+t-o.r),k=B+I*(S+t-o.r),z=V+(M<0?-1:1)*T;E="edge"===_?M<0?c+v:c+i-v:z+(M<0?-y:y),w=k,A=[[F,B],[V,k],[z,k]]}P=N?"center":"edge"===_?M>0?"right":"left":M>0?"left":"right"}var G=l.get("rotate");R="number"==typeof G?G*(Math.PI/180):G?M<0?-D+Math.PI:-D:0,m=!!R,o.label={x:E,y:w,position:u,height:L.height,len:S,len2:T,linePoints:A,textAlign:P,verticalAlign:"middle",rotation:R,inside:N,labelDistance:y,labelAlignTo:_,labelMargin:v,bleedMargin:C,textRect:L,text:O,font:x},N||f.push(o.label)}})),!m&&e.get("avoidLabelOverlap")&&function(e,t,i,n,a,l,c,u){for(var d=[],h=[],p=Number.MAX_VALUE,f=-Number.MAX_VALUE,m=0;m<e.length;m++)s(e[m])||(e[m].x<t?(p=Math.min(p,e[m].x),d.push(e[m])):(f=Math.max(f,e[m].x),h.push(e[m])));for(o(h,t,i,n,1,0,l,0,u,f),o(d,t,i,n,-1,0,l,0,u,p),m=0;m<e.length;m++){var g=e[m];if(!s(g)){var y=g.linePoints;if(y){var _,v="edge"===g.labelAlignTo,C=g.textRect.width;(_=v?g.x<t?y[2][0]-g.labelDistance-c-g.labelMargin:c+a-g.labelMargin-y[2][0]-g.labelDistance:g.x<t?g.x-c-g.bleedMargin:c+a-g.x-g.bleedMargin)<g.textRect.width&&(g.text=r.truncateText(g.text,_,g.font),"edge"===g.labelAlignTo&&(C=r.getWidth(g.text,g.font)));var x=y[1][0]-y[2][0];v?g.x<t?y[2][0]=c+g.labelMargin+C+g.labelDistance:y[2][0]=c+a-g.labelMargin-C-g.labelDistance:(g.x<t?y[2][0]=g.x+g.labelDistance:y[2][0]=g.x-g.labelDistance,y[1][0]=y[2][0]+x),y[1][1]=y[2][1]=g.y}}}}(f,d,h,t,i,l,c,u)}},function(e,t,i){var r=i(1);i(344),i(345);var n=i(44),a=i(69);i(70),r.registerVisual(n("scatter","circle")),r.registerLayout(a("scatter"))},function(e,t,i){var r=i(30),n=i(14).extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return r(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});e.exports=n},function(e,t,i){var r=i(1),n=i(67),a=i(346),o=i(69);r.extendChartView({type:"scatter",render:function(e,t,i){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,i){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},incrementalRender:function(e,t,i){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,i){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var n=o().reset(e);n.progress&&n.progress({start:0,end:r.count()},r),this._symbolDraw.updateLayout(r)},_getClipShape:function(e){var t=e.coordinateSystem,i=t&&t.getArea&&t.getArea();return e.get("clip",!0)?i:null},_updateSymbolDraw:function(e,t){var i=this._symbolDraw,r=t.pipelineContext.large;return i&&r===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=r?new a:new n,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})},function(e,t,i){var r=i(2),n=i(19).createSymbol,a=i(106),o=r.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(e,t){var i=t.points,r=t.size,n=this.symbolProxy,a=n.shape;if(!((e.getContext?e.getContext():e)&&r[0]<4))for(var o=0;o<i.length;){var s=i[o++],l=i[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-r[0]/2,a.y=l-r[1]/2,a.width=r[0],a.height=r[1],n.buildPath(e,a,!0)))}},afterBrush:function(e){var t=this.shape,i=t.points,r=t.size;if(r[0]<4){this.setTransform(e);for(var n=0;n<i.length;){var a=i[n++],o=i[n++];isNaN(a)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(a,o)||e.fillRect(a-r[0]/2,o-r[1]/2,r[0],r[1]))}this.restoreTransform(e)}},findDataIndex:function(e,t){for(var i=this.shape,r=i.points,n=i.size,a=Math.max(n[0],4),o=Math.max(n[1],4),s=r.length/2-1;s>=0;s--){var l=2*s,c=r[l]-a/2,u=r[l+1]-o/2;if(e>=c&&t>=u&&e<=c+a&&t<=u+o)return s}return-1}});function s(){this.group=new r.Group}var l=s.prototype;l.isPersistent=function(){return!this._incremental},l.updateData=function(e,t){this.group.removeAll();var i=new o({rectHover:!0,cursor:"default"});i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!1,t),this.group.add(i),this._incremental=null},l.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("symbolPoints");this.group.eachChild((function(e){if(null!=e.startIndex){var i=2*(e.endIndex-e.startIndex),r=4*e.startIndex*2;t=new Float32Array(t.buffer,r,i)}e.setShape("points",t)}))}},l.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>2e6?(this._incremental||(this._incremental=new a({silent:!0})),this.group.add(this._incremental)):this._incremental=null},l.incrementalUpdate=function(e,t,i){var r;this._incremental?(r=new o,this._incremental.addDisplayable(r,!0)):((r=new o({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(r)),r.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(r,t,!!this._incremental,i)},l._setCommon=function(e,t,i,r){var a=t.hostModel;r=r||{};var o=t.getVisual("symbolSize");e.setShape("size",o instanceof Array?o:[o,o]),e.softClipShape=r.clipShape||null,e.symbolProxy=n(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var s=e.shape.size[0]<4;e.useStyle(a.getModel("itemStyle").getItemStyle(s?["color","shadowBlur","shadowColor"]:["color"]));var l=t.getVisual("color");l&&e.setColor(l),i||(e.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i+(e.startIndex||0))})))},l.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},l._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var c=s;e.exports=c},function(e,t,i){var r=i(1);i(348),i(353),i(354);var n=i(90),a=i(44),o=i(355),s=i(72),l=i(356);r.registerVisual(n("radar")),r.registerVisual(a("radar","circle")),r.registerLayout(o),r.registerProcessor(s("radar")),r.registerPreprocessor(l)},function(e,t,i){i(349),i(351),i(352)},function(e,t,i){var r=i(0),n=i(350),a=i(85),o=i(3),s=i(21),l=s.getScaleExtent,c=s.niceScaleExtent,u=i(20),d=i(178);function h(e,t,i){this._model=e,this.dimensions=[],this._indicatorAxes=r.map(e.getIndicatorModels(),(function(e,t){var i="indicator_"+t,r=new n(i,"log"===e.get("axisType")?new d:new a);return r.name=e.get("name"),r.model=e,e.axis=r,this.dimensions.push(i),r}),this),this.resize(e,i),this.cx,this.cy,this.r,this.r0,this.startAngle}h.prototype.getIndicatorAxes=function(){return this._indicatorAxes},h.prototype.dataToPoint=function(e,t){var i=this._indicatorAxes[t];return this.coordToPoint(i.dataToCoord(e),t)},h.prototype.coordToPoint=function(e,t){var i=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(i),this.cy-e*Math.sin(i)]},h.prototype.pointToData=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,r=Math.sqrt(t*t+i*i);t/=r,i/=r;for(var n,a=Math.atan2(-i,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var c=this._indicatorAxes[l],u=Math.abs(a-c.angle);u<o&&(n=c,s=l,o=u)}return[s,+(n&&n.coordToData(r))]},h.prototype.resize=function(e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight(),s=Math.min(n,a)/2;this.cx=o.parsePercent(i[0],n),this.cy=o.parsePercent(i[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var l=e.get("radius");"string"!=typeof l&&"number"!=typeof l||(l=[0,l]),this.r0=o.parsePercent(l[0],s),this.r=o.parsePercent(l[1],s),r.each(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var i=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),e.angle=i}),this)},h.prototype.update=function(e,t){var i=this._indicatorAxes,n=this._model;r.each(i,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,a){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===n){var o=t.getData();r.each(i,(function(e){e.scale.unionExtentFromData(o,o.mapDimension(e.dim))}))}}),this);var a=n.get("splitNumber");function s(e){var t=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),i=e/t;return 2===i?i=5:i*=2,i*t}r.each(i,(function(e,t){var i=l(e.scale,e.model).extent;c(e.scale,e.model);var r=e.model,n=e.scale,u=r.getMin(),d=r.getMax(),h=n.getInterval();if(null!=u&&null!=d)n.setExtent(+u,+d),n.setInterval((d-u)/a);else if(null!=u){do{p=u+h*a,n.setExtent(+u,p),n.setInterval(h),h=s(h)}while(p<i[1]&&isFinite(p)&&isFinite(i[1]))}else if(null!=d){do{f=d-h*a,n.setExtent(f,+d),n.setInterval(h),h=s(h)}while(f>i[0]&&isFinite(f)&&isFinite(i[0]))}else{n.getTicks().length-1>a&&(h=s(h));var p=Math.ceil(i[1]/h)*h,f=o.round(p-h*a);n.setExtent(f,p),n.setInterval(h)}}))},h.dimensions=[],h.create=function(e,t){var i=[];return e.eachComponent("radar",(function(r){var n=new h(r,e,t);i.push(n),r.coordinateSystem=n})),e.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("radarIndex")||0])})),i},u.register("radar",h);var p=h;e.exports=p},function(e,t,i){var r=i(0),n=i(35);function a(e,t,i){n.call(this,e,t,i),this.type="value",this.angle=0,this.name="",this.model}r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(1),n=i(0),a=i(185),o=i(12),s=i(53),l=a.valueAxis;function c(e,t){return n.defaults({show:t},e)}var u=r.extendComponentModel({type:"radar",optionUpdated:function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),i=this.get("scale"),r=this.get("axisLine"),a=this.get("axisTick"),l=this.get("axisType"),c=this.get("axisLabel"),u=this.get("name"),d=this.get("name.show"),h=this.get("name.formatter"),p=this.get("nameGap"),f=this.get("triggerEvent"),m=n.map(this.get("indicator")||[],(function(m){null!=m.max&&m.max>0&&!m.min?m.min=0:null!=m.min&&m.min<0&&!m.max&&(m.max=0);var g=u;if(null!=m.color&&(g=n.defaults({color:m.color},u)),m=n.merge(n.clone(m),{boundaryGap:e,splitNumber:t,scale:i,axisLine:r,axisTick:a,axisType:l,axisLabel:c,name:m.text,nameLocation:"end",nameGap:p,nameTextStyle:g,triggerEvent:f},!1),d||(m.name=""),"string"==typeof h){var y=m.name;m.name=h.replace("{value}",null!=y?y:"")}else"function"==typeof h&&(m.name=h(m.name,m));var _=n.extend(new o(m,null,this.ecModel),s);return _.mainType="radar",_.componentIndex=this.componentIndex,_}),this);this.getIndicatorModels=function(){return m}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:n.merge({lineStyle:{color:"#bbb"}},l.axisLine),axisLabel:c(l.axisLabel,!1),axisTick:c(l.axisTick,!1),axisType:"interval",splitLine:c(l.splitLine,!0),splitArea:c(l.splitArea,!0),indicator:[]}});e.exports=u},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(36),o=i(2),s=["axisLine","axisTickLabel","axisName"],l=r.extendComponentView({type:"radar",render:function(e,t,i){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},_buildAxes:function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes(),r=n.map(i,(function(e){return new a(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));n.each(r,(function(e){n.each(s,e.add,e),this.group.add(e.getGroup())}),this)},_buildSplitLineAndArea:function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes();if(i.length){var r=e.get("shape"),a=e.getModel("splitLine"),s=e.getModel("splitArea"),l=a.getModel("lineStyle"),c=s.getModel("areaStyle"),u=a.get("show"),d=s.get("show"),h=l.get("color"),p=c.get("color");h=n.isArray(h)?h:[h],p=n.isArray(p)?p:[p];var f=[],m=[];if("circle"===r)for(var g=i[0].getTicksCoords(),y=t.cx,_=t.cy,v=0;v<g.length;v++){if(u)f[A(f,h,v)].push(new o.Circle({shape:{cx:y,cy:_,r:g[v].coord}}));if(d&&v<g.length-1)m[A(m,p,v)].push(new o.Ring({shape:{cx:y,cy:_,r0:g[v].coord,r:g[v+1].coord}}))}else{var C,x=n.map(i,(function(e,i){var r=e.getTicksCoords();return C=null==C?r.length-1:Math.min(r.length-1,C),n.map(r,(function(e){return t.coordToPoint(e.coord,i)}))})),b=[];for(v=0;v<=C;v++){for(var S=[],T=0;T<i.length;T++)S.push(x[T][v]);if(S[0]&&S.push(S[0].slice()),u)f[A(f,h,v)].push(new o.Polyline({shape:{points:S}}));if(d&&b)m[A(m,p,v-1)].push(new o.Polygon({shape:{points:S.concat(b)}}));b=S.slice().reverse()}}var E=l.getLineStyle(),w=c.getAreaStyle();n.each(m,(function(e,t){this.group.add(o.mergePath(e,{style:n.defaults({stroke:"none",fill:p[t%p.length]},w),silent:!0}))}),this),n.each(f,(function(e,t){this.group.add(o.mergePath(e,{style:n.defaults({fill:"none",stroke:h[t%h.length]},E),silent:!0}))}),this)}function A(e,t,i){var r=i%t.length;return e[r]=e[r]||[],r}}});e.exports=l},function(e,t,i){var r=i(14),n=i(54),a=i(0),o=i(7).encodeHTML,s=i(71),l=r.extend({type:"series.radar",dependencies:["radar"],init:function(e){l.superApply(this,"init",arguments),this.legendVisualProvider=new s(a.bind(this.getData,this),a.bind(this.getRawData,this))},getInitialData:function(e,t){return n(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(e,t,i,r){var n=this.getData(),s=this.coordinateSystem.getIndicatorAxes(),l=this.getData().getName(e),c="html"===r?"<br/>":"\n";return o(""===l?this.name:l)+c+a.map(s,(function(t,i){var r=n.get(n.mapDimension(t.dim),e);return o(t.name+" : "+r)})).join(c)},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),i=this.coordinateSystem,r=t.getValues(a.map(i.dimensions,(function(e){return t.mapDimension(e)})),e,!0),n=0,o=r.length;n<o;n++)if(!isNaN(r[n])){var s=i.getIndicatorAxes();return i.coordToPoint(s[n].dataToCoord(r[n]),n)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}}),c=l;e.exports=c},function(e,t,i){var r=i(1),n=i(2),a=i(0),o=i(19);var s=r.extendChartView({type:"radar",render:function(e,t,i){var r=e.coordinateSystem,s=this.group,l=e.getData(),c=this._data;function u(e,t){var i=e.getItemVisual(t,"symbol")||"circle",r=e.getItemVisual(t,"color");if("none"!==i){var n=function(e){return a.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),s=o.createSymbol(i,-1,-1,2,2,r),l=e.getItemVisual(t,"symbolRotate")||0;return s.attr({style:{strokeNoScale:!0},z2:100,scale:[n[0]/2,n[1]/2],rotation:l*Math.PI/180||0}),s}}function d(t,i,r,a,o,s){r.removeAll();for(var l=0;l<i.length-1;l++){var c=u(a,o);c&&(c.__dimIdx=l,t[l]?(c.attr("position",t[l]),n[s?"initProps":"updateProps"](c,{position:i[l]},e,o)):c.attr("position",i[l]),r.add(c))}}function h(e){return a.map(e,(function(e){return[r.cx,r.cy]}))}l.diff(c).add((function(t){var i=l.getItemLayout(t);if(i){var r=new n.Polygon,a=new n.Polyline,o={shape:{points:i}};r.shape.points=h(i),a.shape.points=h(i),n.initProps(r,o,e,t),n.initProps(a,o,e,t);var s=new n.Group,c=new n.Group;s.add(a),s.add(r),s.add(c),d(a.shape.points,i,c,l,t,!0),l.setItemGraphicEl(t,s)}})).update((function(t,i){var r=c.getItemGraphicEl(i),a=r.childAt(0),o=r.childAt(1),s=r.childAt(2),u={shape:{points:l.getItemLayout(t)}};u.shape.points&&(d(a.shape.points,u.shape.points,s,l,t,!1),n.updateProps(a,u,e),n.updateProps(o,u,e),l.setItemGraphicEl(t,r))})).remove((function(e){s.remove(c.getItemGraphicEl(e))})).execute(),l.eachItemGraphicEl((function(e,t){var i=l.getItemModel(t),r=e.childAt(0),o=e.childAt(1),c=e.childAt(2),u=l.getItemVisual(t,"color");s.add(e),r.useStyle(a.defaults(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),r.hoverStyle=i.getModel("emphasis.lineStyle").getLineStyle();var d=i.getModel("areaStyle"),h=i.getModel("emphasis.areaStyle"),p=d.isEmpty()&&d.parentModel.isEmpty(),f=h.isEmpty()&&h.parentModel.isEmpty();f=f&&p,o.ignore=p,o.useStyle(a.defaults(d.getAreaStyle(),{fill:u,opacity:.7})),o.hoverStyle=h.getAreaStyle();var m=i.getModel("itemStyle").getItemStyle(["color"]),g=i.getModel("emphasis.itemStyle").getItemStyle(),y=i.getModel("label"),_=i.getModel("emphasis.label");c.eachChild((function(e){e.setStyle(m),e.hoverStyle=a.clone(g);var i=l.get(l.dimensions[e.__dimIdx],t);(null==i||isNaN(i))&&(i=""),n.setLabelStyle(e.style,e.hoverStyle,y,_,{labelFetcher:l.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:i,autoColor:u,isRectText:!0})})),e.highDownOnUpdate=function(e,t){o.attr("ignore","emphasis"===t?f:p)},n.setHoverStyle(e)})),this._data=l},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});e.exports=s},function(e,t,i){var r=i(0);function n(e){return!isNaN(e[0])&&!isNaN(e[1])}function a(e){return[e.cx,e.cy]}e.exports=function(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),i=[],o=e.coordinateSystem;if(o){var s=o.getIndicatorAxes();r.each(s,(function(e,r){t.each(t.mapDimension(s[r].dim),(function(e,t){i[t]=i[t]||[];var s=o.dataToPoint(e,r);i[t][r]=n(s)?s:a(o)}))})),t.each((function(e){var s=r.find(i[e],(function(e){return n(e)}))||a(o);i[e].push(s.slice()),t.setItemLayout(e,i[e])}))}}))}},function(e,t,i){var r=i(0);e.exports=function(e){var t=e.polar;if(t){r.isArray(t)||(t=[t]);var i=[];r.each(t,(function(t,n){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],r.isArray(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):i.push(t)})),e.polar=i}r.each(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))}},function(e,t,i){var r=i(1);i(358),i(365),i(193),i(115);var n=i(367),a=i(368),o=i(369),s=i(370),l=i(190);r.registerLayout(n),r.registerVisual(a),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,o),r.registerPreprocessor(s),l("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}])},function(e,t,i){var r=i(0),n=i(54),a=i(14),o=i(7),s=o.encodeHTML,l=o.addCommas,c=i(112),u=i(42).retrieveRawAttr,d=i(91),h=i(29).makeSeriesEncodeForNameBased,p=a.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(e){for(var t=n(this,{coordDimensions:["value"],encodeDefaulter:r.curry(h,this)}),i=t.mapDimension("value"),a=r.createHashMap(),o=[],s=[],l=0,c=t.count();l<c;l++){var p=t.getName(l);a.set(p,!0),o.push({name:p,value:t.get(i,l),selected:u(t,l,"selected")})}var f=d.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return r.each(f.regions,(function(e){var t=e.name;a.get(t)||(o.push({name:t}),s.push(t))})),this.updateSelectedMap(o),t.appendValues([],s),t},getHostGeoModel:function(){var e=this.option.geoIndex;return null!=e?this.dependentModels.geo[e]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},getRegionModel:function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},formatTooltip:function(e,t,i,r){for(var n=this.getData(),a=l(this.getRawValue(e)),o=n.getName(e),c=this.seriesGroup,u=[],d=0;d<c.length;d++){var h=c[d].originalData.indexOfName(o),p=n.mapDimension("value");isNaN(c[d].originalData.get(p,h))||u.push(s(c[d].name))}var f="html"===r?"<br/>":"\n";return u.join(", ")+f+s(o+" : "+a)},getTooltipPosition:function(e){if(null!=e){var t=this.getData().getName(e),i=this.coordinateSystem,r=i.getRegion(t);return r&&i.dataToPoint(r.center)}},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});r.mixin(p,c);var f=p;e.exports=f},function(e,t,i){var r=i(0).each,n=i(179),a=i(4).makeInner,o=i(360),s=i(361),l=i(362),c=i(363),u=a(),d={load:function(e,t,i){var a=u(t).parsed;if(a)return a;var d,p=t.specialAreas||{},f=t.geoJSON;try{d=f?n(f,i):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return o(e,d),r(d,(function(t){var i=t.name;s(e,t),l(e,t),c(e,t);var r=p[i];r&&t.transformTo(r.left,r.top,r.width,r.height)})),u(t).parsed={regions:d,boundingRect:h(d)}}};function h(e){for(var t,i=0;i<e.length;i++){var r=e[i].getBoundingRect();(t=t||r.clone()).union(r)}return t}e.exports=d},function(e,t,i){for(var r=i(0),n=i(180),a=[126,25],o=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],s=0;s<o.length;s++)for(var l=0;l<o[s].length;l++)o[s][l][0]/=10.5,o[s][l][1]/=-14,o[s][l][0]+=a[0],o[s][l][1]+=a[1];e.exports=function(e,t){"china"===e&&t.push(new n("南海诸岛",r.map(o,(function(e){return{type:"polygon",exterior:e}})),a))}},function(e,t){var i={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};e.exports=function(e,t){if("china"===e){var r=i[t.name];if(r){var n=t.center;n[0]+=r[0]/10.5,n[1]+=-r[1]/14}}}},function(e,t){var i={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};e.exports=function(e,t){if("world"===e){var r=i[t.name];if(r){var n=t.center;n[0]=r[0],n[1]=r[1]}}}},function(e,t){var i=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];e.exports=function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:i[0]})}},function(e,t,i){var r=i(172),n=r.parseSVG,a=r.makeViewBoxTransform,o=i(40),s=i(103),l=i(0),c=l.assert,u=l.createHashMap,d=i(9),h=(0,i(4).makeInner)(),p={load:function(e,t){var i=h(t).originRoot;if(i)return{root:i,boundingRect:h(t).boundingRect};var r=f(t);return h(t).originRoot=r.root,h(t).boundingRect=r.boundingRect,r},makeGraphic:function(e,t,i){var r=h(t),n=r.rootMap||(r.rootMap=u()),a=n.get(i);if(a)return a;var o=r.originRoot,s=r.boundingRect;return r.originRootHostKey?a=f(t,s).root:(r.originRootHostKey=i,a=o),n.set(i,a)},removeGraphic:function(e,t,i){var r=h(t),n=r.rootMap;n&&n.removeKey(i),i===r.originRootHostKey&&(r.originRootHostKey=null)}};function f(e,t){var i,r,l=e.svgXML;try{r=(i=l&&n(l,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,c(null!=r)}catch(e){throw new Error("Invalid svg format\n"+e.message)}var u=i.width,h=i.height,p=i.viewBoxRect;if(t||(t=null==u||null==h?r.getBoundingRect():new d(0,0,0,0),null!=u&&(t.width=u),null!=h&&(t.height=h)),p){var f=a(p,t.width,t.height),m=r;(r=new o).add(m),m.scale=f.scale,m.position=f.position}return r.setClipPath(new s({shape:t.plain()})),{root:r,boundingRect:t}}e.exports=p},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(191),s=r.extendChartView({type:"map",render:function(e,t,i,r){if(!r||"mapToggleSelect"!==r.type||r.from!==this.uid){var n=this.group;if(n.removeAll(),!e.getHostGeoModel()){if(r&&"geoRoam"===r.type&&"series"===r.componentType&&r.seriesId===e.id)(a=this._mapDraw)&&n.add(a.group);else if(e.needsDrawMap){var a=this._mapDraw||new o(i,!0);n.add(a.group),a.draw(e,t,i,this,r),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(e,t,i){var r=e.originalData,o=this.group;r.each(r.mapDimension("value"),(function(t,i){if(!isNaN(t)){var s=r.getItemLayout(i);if(s&&s.point){var u=s.point,d=s.offset,h=new a.Circle({style:{fill:e.getData().getVisual("color")},shape:{cx:u[0]+9*d,cy:u[1],r:3},silent:!0,z2:8+(d?0:a.Z2_EMPHASIS_LIFT+1)});if(!d){var p=e.mainSeries.getData(),f=r.getName(i),m=p.indexOfName(f),g=r.getItemModel(i),y=g.getModel("label"),_=g.getModel("emphasis.label"),v=p.getItemGraphicEl(m),C=n.retrieve2(e.getFormattedLabel(m,"normal"),f),x=n.retrieve2(e.getFormattedLabel(m,"emphasis"),C),b=v.__seriesMapHighDown,S=Math.random();if(!b){b=v.__seriesMapHighDown={};var T=n.curry(l,!0),E=n.curry(l,!1);v.on("mouseover",T).on("mouseout",E).on("emphasis",T).on("normal",E)}v.__seriesMapCallKey=S,n.extend(b,{recordVersion:S,circle:h,labelModel:y,hoverLabelModel:_,emphasisText:x,normalText:C}),c(b,!1)}o.add(h)}}}))}});function l(e){var t=this.__seriesMapHighDown;t&&t.recordVersion===this.__seriesMapCallKey&&c(t,e)}function c(e,t){var i=e.circle,r=e.labelModel,n=e.hoverLabelModel,o=e.emphasisText,s=e.normalText;t?(i.style.extendFrom(a.setTextStyle({},n,{text:n.get("show")?o:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=a.Z2_EMPHASIS_LIFT):(a.setTextStyle(i.style,r,{text:r.get("show")?s:null,textPosition:r.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}e.exports=s},function(e,t,i){var r=i(0),n=i(9),a=i(116),o=i(91);function s(e,t,i,r){a.call(this,e),this.map=t;var n=o.load(t,i);this._nameCoordMap=n.nameCoordMap,this._regionsMap=n.regionsMap,this._invertLongitute=null==r||r,this.regions=n.regions,this._rect=n.boundingRect}function l(e,t,i,r){var n=i.geoModel,a=i.seriesModel,o=n?n.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[e](r):null}s.prototype={constructor:s,type:"geo",dimensions:["lng","lat"],containCoord:function(e){for(var t=this.regions,i=0;i<t.length;i++)if(t[i].contain(e))return!0;return!1},transformTo:function(e,t,i,r){var a=this.getBoundingRect(),o=this._invertLongitute;a=a.clone(),o&&(a.y=-a.y-a.height);var s=this._rawTransformable;if(s.transform=a.calculateTransform(new n(e,t,i,r)),s.decomposeTransform(),o){var l=s.scale;l[1]=-l[1]}s.updateTransform(),this._updateTransform()},getRegion:function(e){return this._regionsMap.get(e)},getRegionByCoord:function(e){for(var t=this.regions,i=0;i<t.length;i++)if(t[i].contain(e))return t[i]},addGeoCoord:function(e,t){this._nameCoordMap.set(e,t)},getGeoCoord:function(e){return this._nameCoordMap.get(e)},getBoundingRect:function(){return this._rect},dataToPoint:function(e,t,i){if("string"==typeof e&&(e=this.getGeoCoord(e)),e)return a.prototype.dataToPoint.call(this,e,t,i)},convertToPixel:r.curry(l,"dataToPoint"),convertFromPixel:r.curry(l,"pointToData")},r.mixin(s,a);var c=s;e.exports=c},function(e,t,i){var r=i(0);e.exports=function(e){var t={};e.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!t[n]){var a={};r.each(i.seriesGroup,(function(t){var i=t.coordinateSystem,r=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&r.each(r.mapDimension("value"),(function(e,t){var n=r.getName(t),o=i.getRegion(n);if(o&&!isNaN(e)){var s=a[n]||0,l=i.dataToPoint(o.center);a[n]=s+1,r.setItemLayout(t,{point:l,offset:s})}}))}));var o=i.getData();o.each((function(e){var t=o.getName(e),i=o.getItemLayout(e)||{};i.showLabel=!a[t],o.setItemLayout(e,i)})),t[n]=!0}}))}},function(e,t){e.exports=function(e){e.eachSeriesByType("map",(function(e){var t=e.get("color"),i=e.getModel("itemStyle"),r=i.get("areaColor"),n=i.get("color")||t[e.seriesIndex%t.length];e.getData().setVisual({areaColor:r,color:n})}))}},function(e,t,i){var r=i(0);e.exports=function(e){var t={};e.eachSeriesByType("map",(function(e){var i=e.getHostGeoModel(),r=i?"o"+i.id:"i"+e.getMapType();(t[r]=t[r]||[]).push(e)})),r.each(t,(function(e,t){for(var i,n,a,o=(i=r.map(e,(function(e){return e.getData()})),n=e[0].get("mapValueCalculation"),a={},r.each(i,(function(e){e.each(e.mapDimension("value"),(function(t,i){var r="ec-"+e.getName(i);a[r]=a[r]||[],isNaN(t)||a[r].push(t)}))})),i[0].map(i[0].mapDimension("value"),(function(e,t){for(var r,o="ec-"+i[0].getName(t),s=0,l=1/0,c=-1/0,u=a[o].length,d=0;d<u;d++)l=Math.min(l,a[o][d]),c=Math.max(c,a[o][d]),s+=a[o][d];return r="min"===n?l:"max"===n?c:"average"===n?s/u:s,0===u?NaN:r}))),s=0;s<e.length;s++)e[s].originalData=e[s].getData();for(s=0;s<e.length;s++)e[s].seriesGroup=e,e[s].needsDrawMap=0===s&&!e[s].getHostGeoModel(),e[s].setData(o.cloneShallow()),e[s].mainSeries=e[0]}))}},function(e,t,i){var r=i(0);e.exports=function(e){var t=[];r.each(e.series,(function(e){e&&"map"===e.type&&(t.push(e),e.map=e.map||e.mapType,r.defaults(e,e.mapLocation))}))}},function(e,t,i){var r=i(1);i(372),i(373),i(374);var n=i(44),a=i(375);r.registerVisual(n("tree","circle")),r.registerLayout(a)},function(e,t,i){var r=i(14),n=i(117),a=i(7).encodeHTML,o=i(12),s=r.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},i=e.leaves||{},r=new o(i,this,this.ecModel),a=n.createTree(t,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=a.getNodeByDataIndex(t);return i.children.length&&i.isExpand||(e.parentModel=r),e}))}));var s=0;a.eachNode("preorder",(function(e){e.depth>s&&(s=e.depth)}));var l=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:s;return a.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=l})),a.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){for(var t=this.getData().tree,i=t.root.children[0],r=t.getNodeByDataIndex(e),n=r.getValue(),o=r.name;r&&r!==i;)o=r.parentNode.name+"."+o,r=r.parentNode;return a(o+(isNaN(n)||null==n?"":" : "+n))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});e.exports=s},function(e,t,i){var r=i(0),n=i(2),a=i(87),o=i(195).radialCoordinate,s=i(1),l=i(62),c=i(116),u=i(113),d=i(73),h=i(92).onIrrelevantElement,p=(i(5).__DEV__,i(3).parsePercent),f=n.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.childPoints,r=i.length,n=t.parentPoint,a=i[0],o=i[r-1];if(1===r)return e.moveTo(n[0],n[1]),void e.lineTo(a[0],a[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,c=1-l,u=p(t.forkPosition,1),d=[];d[l]=n[l],d[c]=n[c]+(o[c]-n[c])*u,e.moveTo(n[0],n[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[l]=a[l],e.lineTo(d[0],d[1]),d[l]=o[l],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(var h=1;h<r-1;h++){var f=i[h];e.moveTo(f[0],f[1]),d[l]=f[l],e.lineTo(d[0],d[1])}}}),m=s.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new n.Group,this._controller=new d(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,i,r){var n=e.getData(),a=e.layoutInfo,o=this._mainGroup,s=e.get("layout");"radial"===s?o.attr("position",[a.x+a.width/2,a.y+a.height/2]):o.attr("position",[a.x,a.y]),this._updateViewCoordSys(e,a,s),this._updateController(e,t,i);var l=this._data,c={expandAndCollapse:e.get("expandAndCollapse"),layout:s,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};n.diff(l).add((function(t){g(n,t)&&_(n,t,null,o,e,c)})).update((function(t,i){var r=l.getItemGraphicEl(i);g(n,t)?_(n,t,r,o,e,c):r&&v(l,i,r,o,e,c)})).remove((function(t){var i=l.getItemGraphicEl(t);i&&v(l,t,i,o,e,c)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===c.expandAndCollapse&&n.eachItemGraphicEl((function(t,r){t.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:r})}))})),this._data=n},_updateViewCoordSys:function(e){var t=e.getData(),i=[];t.each((function(e){var r=t.getItemLayout(e);!r||isNaN(r.x)||isNaN(r.y)||i.push([+r.x,+r.y])}));var r=[],n=[];l.fromPoints(i,r,n);var a=this._min,o=this._max;n[0]-r[0]==0&&(r[0]=a?a[0]:r[0]-1,n[0]=o?o[0]:n[0]+1),n[1]-r[1]==0&&(r[1]=a?a[1]:r[1]-1,n[1]=o?o[1]:n[1]+1);var s=e.coordinateSystem=new c;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(r[0],r[1],n[0]-r[0],n[1]-r[1]),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=r,this._max=n},_updateController:function(e,t,i){var r=this._controller,n=this._controllerHost,a=this.group;r.setPointerChecker((function(t,r,n){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,n)&&!h(t,i,e)})),r.enable(e.get("roam")),n.zoomLimit=e.get("scaleLimit"),n.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(t){u.updateViewOnPan(n,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){u.updateViewOnZoom(n,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),i=this._getNodeGlobalScale(e),r=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",r)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=this._nodeScaleRatio,r=t.scale,n=r&&r[0]||1;return((t.getZoom()-1)*i+1)/n},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function g(e,t){var i=e.getItemLayout(t);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==e.getItemVisual(t,"symbol")}function y(e,t,i){return i.itemModel=t,i.itemStyle=t.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=t.getModel("lineStyle").getLineStyle(),i.labelModel=t.getModel("label"),i.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function _(e,t,i,o,s,l){var c=!i,u=e.tree.getNodeByDataIndex(t),d=u.getModel(),h=(l=y(u,d,l),e.tree.root),p=u.parentNode===h?u:u.parentNode||u,m=e.getItemGraphicEl(p.dataIndex),g=p.getLayout(),_=m?{x:m.position[0],y:m.position[1],rawX:m.__radialOldRawX,rawY:m.__radialOldRawY}:g,v=u.getLayout();c?(i=new a(e,t,l)).attr("position",[_.x,_.y]):i.updateData(e,t,l),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=v.rawX,i.__radialRawY=v.rawY,o.add(i),e.setItemGraphicEl(t,i),n.updateProps(i,{position:[v.x,v.y]},s);var x=i.getSymbolPath();if("radial"===l.layout){var b,S,T=h.children[0],E=T.getLayout(),w=T.children.length;if(v.x===E.x&&!0===u.isExpand){var A={};A.x=(T.children[0].getLayout().x+T.children[w-1].getLayout().x)/2,A.y=(T.children[0].getLayout().y+T.children[w-1].getLayout().y)/2,(b=Math.atan2(A.y-E.y,A.x-E.x))<0&&(b=2*Math.PI+b),(S=A.x<E.x)&&(b-=Math.PI)}else(b=Math.atan2(v.y-E.y,v.x-E.x))<0&&(b=2*Math.PI+b),0===u.children.length||0!==u.children.length&&!1===u.isExpand?(S=v.x<E.x)&&(b-=Math.PI):(S=v.x>E.x)||(b-=Math.PI);var P=S?"left":"right",D=l.labelModel.get("rotate"),M=D*(Math.PI/180);x.setStyle({textPosition:l.labelModel.get("position")||P,textRotation:null==D?-b:M,textOrigin:"center",verticalAlign:"middle"})}!function(e,t,i,a,o,s,l,c,u){var d=u.edgeShape,h=a.__edge;if("curve"===d)t.parentNode&&t.parentNode!==i&&(h||(h=a.__edge=new n.BezierCurve({shape:C(u,o,o),style:r.defaults({opacity:0,strokeNoScale:!0},u.lineStyle)})),n.updateProps(h,{shape:C(u,s,l),style:r.defaults({opacity:1},u.lineStyle)},e));else if("polyline"===d&&"orthogonal"===u.layout&&t!==i&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var p=t.children,m=[],g=0;g<p.length;g++){var y=p[g].getLayout();m.push([y.x,y.y])}h||(h=a.__edge=new f({shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]],orient:u.orient,forkPosition:u.edgeForkPosition},style:r.defaults({opacity:0,strokeNoScale:!0},u.lineStyle)})),n.updateProps(h,{shape:{parentPoint:[l.x,l.y],childPoints:m},style:r.defaults({opacity:1},u.lineStyle)},e)}c.add(h)}(s,u,h,i,_,g,v,o,l)}function v(e,t,i,r,a,o){for(var s,l=e.tree.getNodeByDataIndex(t),c=e.tree.root,u=l.getModel(),d=(o=y(l,u,o),l.parentNode===c?l:l.parentNode||l),h=o.edgeShape;null==(s=d.getLayout());)d=d.parentNode===c?d:d.parentNode||d;n.updateProps(i,{position:[s.x+1,s.y+1]},a,(function(){r.remove(i),e.setItemGraphicEl(t,null)})),i.fadeOut(null,{keepLabel:!0});var p=e.getItemGraphicEl(d.dataIndex).__edge,f=i.__edge||(!1===d.isExpand||1===d.children.length?p:void 0);h=o.edgeShape;f&&("curve"===h?n.updateProps(f,{shape:C(o,s,s),style:{opacity:0}},a,(function(){r.remove(f)})):"polyline"===h&&"orthogonal"===o.layout&&n.updateProps(f,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},a,(function(){r.remove(f)})))}function C(e,t,i){var r,n,a,s,l,c,u,d,h=e.orient;if("radial"===e.layout){l=t.rawX,u=t.rawY,c=i.rawX,d=i.rawY;var p=o(l,u),f=o(l,u+(d-u)*e.curvature),m=o(c,d+(u-d)*e.curvature),g=o(c,d);return{x1:p.x,y1:p.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:m.x,cpy2:m.y}}return l=t.x,u=t.y,c=i.x,d=i.y,"LR"!==h&&"RL"!==h||(r=l+(c-l)*e.curvature,n=u,a=c+(l-c)*e.curvature,s=d),"TB"!==h&&"BT"!==h||(r=l,n=u+(d-u)*e.curvature,a=c,s=d+(u-d)*e.curvature),{x1:l,y1:u,x2:c,y2:d,cpx1:r,cpy1:n,cpx2:a,cpy2:s}}e.exports=m},function(e,t,i){var r=i(1),n=i(114).updateCenterAndZoom;r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(i);r.isExpand=!r.isExpand}))})),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=t.coordinateSystem,r=n(i,e);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)}))}))},function(e,t,i){var r=i(376),n=r.eachAfter,a=r.eachBefore,o=i(195),s=o.init,l=o.firstWalk,c=o.secondWalk,u=o.separation,d=o.radialCoordinate,h=o.getViewRect;e.exports=function(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var i=h(e,t);e.layoutInfo=i;var r=e.get("layout"),o=0,p=0,f=null;"radial"===r?(o=2*Math.PI,p=Math.min(i.height,i.width)/2,f=u((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(o=i.width,p=i.height,f=u());var m=e.getData().tree.root,g=m.children[0];if(g){s(m),n(g,l,f),m.hierNode.modifier=-g.hierNode.prelim,a(g,c);var y=g,_=g,v=g;a(g,(function(e){var t=e.getLayout().x;t<y.getLayout().x&&(y=e),t>_.getLayout().x&&(_=e),e.depth>v.depth&&(v=e)}));var C=y===_?1:f(y,_)/2,x=C-y.getLayout().x,b=0,S=0,T=0,E=0;if("radial"===r)b=o/(_.getLayout().x+C+x),S=p/(v.depth-1||1),a(g,(function(e){T=(e.getLayout().x+x)*b,E=(e.depth-1)*S;var t=d(T,E);e.setLayout({x:t.x,y:t.y,rawX:T,rawY:E},!0)}));else{var w=e.getOrient();"RL"===w||"LR"===w?(S=p/(_.getLayout().x+C+x),b=o/(v.depth-1||1),a(g,(function(e){E=(e.getLayout().x+x)*S,T="LR"===w?(e.depth-1)*b:o-(e.depth-1)*b,e.setLayout({x:T,y:E},!0)}))):"TB"!==w&&"BT"!==w||(b=o/(_.getLayout().x+C+x),S=p/(v.depth-1||1),a(g,(function(e){T=(e.getLayout().x+x)*b,E="TB"===w?(e.depth-1)*S:p-(e.depth-1)*S,e.setLayout({x:T,y:E},!0)})))}}}(e,t)}))}},function(e,t){t.eachAfter=function(e,t,i){for(var r,n=[e],a=[];r=n.pop();)if(a.push(r),r.isExpand){var o=r.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;r=a.pop();)t(r,i)},t.eachBefore=function(e,t){for(var i,r=[e];i=r.pop();)if(t(i),i.isExpand){var n=i.children;if(n.length)for(var a=n.length-1;a>=0;a--)r.push(n[a])}}},function(e,t,i){var r=i(1);i(378),i(379),i(382);var n=i(383),a=i(384);r.registerVisual(n),r.registerLayout(a)},function(e,t,i){var r=i(0),n=i(14),a=i(117),o=i(12),s=i(7),l=s.encodeHTML,c=s.addCommas,u=i(46).wrapTreePathInfo,d=n.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(e,t){var i={name:e.name,children:e.data};!function e(t){var i=0;r.each(t.children,(function(t){e(t);var n=t.value;r.isArray(n)&&(n=n[0]),i+=n}));var n=t.value;r.isArray(n)&&(n=n[0]);(null==n||isNaN(n))&&(n=i);n<0&&(n=0);r.isArray(t.value)?t.value[0]=n:t.value=n}(i);var n=e.levels||[],s=this.designatedVisualItemStyle={},l=new o({itemStyle:s},this,t);n=e.levels=function(e,t){var i,n=t.get("color");if(!n)return;if(e=e||[],r.each(e,(function(e){var t=new o(e),r=t.get("color");(t.get("itemStyle.color")||r&&"none"!==r)&&(i=!0)})),!i){(e[0]||(e[0]={})).color=n.slice()}return e}(n,t);var c=r.map(n||[],(function(e){return new o(e,l,t)}),this),u=a.createTree(i,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=u.getNodeByDataIndex(t),r=c[i.depth];return e.parentModel=r||l,e}))}));return u.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),i=this.getRawValue(e),n=r.isArray(i)?c(i[0]):c(i),a=t.getName(e);return l(a+": "+n)},getDataParams:function(e){var t=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=u(i,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},r.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=r.createHashMap(),this._idIndexMapCount=0);var i=t.get(e);return null==i&&t.set(e,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});e.exports=d},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(43),s=i(46),l=i(380),c=i(73),u=i(9),d=i(15),h=i(381),p=i(49),f=i(7).windowOpen,m=n.bind,g=a.Group,y=a.Rect,_=n.each,v=["label"],C=["emphasis","label"],x=["upperLabel"],b=["emphasis","upperLabel"],S=p([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),T=function(e){var t=S(e);return t.stroke=t.fill=t.lineWidth=null,t},E=r.extendChartView({type:"treemap",init:function(e,t){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,i,r){var a=t.findComponents({mainType:"series",subType:"treemap",query:r});if(!(n.indexOf(a,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=t;var o=s.retrieveTargetInfo(r,["treemapZoomToNode","treemapRootToNode"],e),l=r&&r.type,c=e.layoutInfo,u=!this._oldTree,d=this._storage,h="treemapRootToNode"===l&&o&&d?{rootNodeGroup:d.nodeGroup[o.node.getRawIndex()],direction:r.direction}:null,p=this._giveContainerGroup(c),f=this._doRender(p,e,h);u||l&&"treemapZoomToNode"!==l&&"treemapRootToNode"!==l?f.renderFinally():this._doAnimation(p,f,e,h),this._resetController(i),this._renderBreadcrumb(e,i,o)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new g,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,i){var r=t.getData().tree,a=this._oldTree,s={nodeGroup:[],background:[],content:[]},l={nodeGroup:[],background:[],content:[]},c=this._storage,u=[],d=n.curry(w,t,l,c,i,s,u);!function e(t,i,r,a,s){a?(i=t,_(t,(function(e,t){!e.isRemoved()&&c(t,t)}))):new o(i,t,l,l).add(c).update(c).remove(n.curry(c,null)).execute();function l(e){return e.getId()}function c(n,o){var l=null!=n?t[n]:null,c=null!=o?i[o]:null,u=d(l,c,r,s);u&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],u,a,s+1)}}(r.root?[r.root]:[],a&&a.root?[a.root]:[],e,r===a||!a,0);var h=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&_(e,(function(e,i){var r=t[i];_(e,(function(e){e&&(r.push(e),e.__tmWillDelete=1)}))})),t}(c);return this._oldTree=r,this._storage=l,{lastsForAnimation:s,willDeleteEls:h,renderFinally:function(){_(h,(function(e){_(e,(function(e){e.parent&&e.parent.remove(e)}))})),_(u,(function(e){e.invisible=!0,e.dirty()}))}}},_doAnimation:function(e,t,i,r){if(i.get("animation")){var a=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=h.createWrap();_(t.willDeleteEls,(function(e,t){_(e,(function(e,i){if(!e.invisible){var n,l=e.parent;if(r&&"drillDown"===r.direction)n=l===r.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,u=0;l.__tmWillDelete||(c=l.__tmNodeWidth/2,u=l.__tmNodeHeight/2),n="nodeGroup"===t?{position:[c,u],style:{opacity:0}}:{shape:{x:c,y:u,width:0,height:0},style:{opacity:0}}}n&&s.add(e,n,a,o)}}))})),_(this._storage,(function(e,i){_(e,(function(e,r){var l=t.lastsForAnimation[i][r],c={};l&&("nodeGroup"===i?l.old&&(c.position=e.position.slice(),e.attr("position",l.old)):(l.old&&(c.shape=n.extend({},e.shape),e.setShape(l.old)),l.fadein?(e.setStyle("opacity",0),c.style={opacity:1}):1!==e.style.opacity&&(c.style={opacity:1})),s.add(e,c,a,o))}))}),this),this._state="animating",s.done(m((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||((t=this._controller=new c(e.getZr())).enable(this.seriesModel.get("roam")),t.on("pan",m(this._onPan,this)),t.on("zoom",m(this._onZoom,this)));var i=new u(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,r){return i.contain(t,r)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var i=t.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},_onZoom:function(e){var t=e.originX,i=e.originY;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var n=r.getLayout();if(!n)return;var a=new u(n.x,n.y,n.width,n.height),o=this.seriesModel.layoutInfo;t-=o.x,i-=o.y;var s=d.create();d.translate(s,s,[-t,-i]),d.scale(s,s,[e.scale,e.scale]),d.translate(s,s,[t,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var i=this.findTarget(e.offsetX,e.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===t)this._zoomToNode(i);else if("link"===t){var n=r.hostTree.data.getItemModel(r.dataIndex),a=n.get("link",!0),o=n.get("target",!0)||"blank";a&&f(a,o)}}}}}),this)},_renderBreadcrumb:function(e,t,i){i||(i=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(i={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new l(this.group))).render(e,t,i.node,m((function(t){"animating"!==this._state&&(s.aboveViewRoot(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(r){var n=this._storage.background[r.getRawIndex()];if(n){var a=n.transformCoordToLocal(e,t),o=n.shape;if(!(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height))return!1;i={node:r,offsetX:a[0],offsetY:a[1]}}}),this),i}});function w(e,t,i,r,o,s,l,c,u,d){if(l){var h=l.getLayout(),p=e.getData();if(p.setItemGraphicEl(l.dataIndex,null),h&&h.isInView){var f=h.width,m=h.height,_=h.borderWidth,E=h.invisible,w=l.getRawIndex(),P=c&&c.getRawIndex(),D=l.viewChildren,M=h.upperHeight,I=D&&D.length,R=l.getModel("itemStyle"),O=l.getModel("emphasis.itemStyle"),L=G("nodeGroup",g);if(L){if(u.add(L),L.attr("position",[h.x||0,h.y||0]),L.__tmNodeWidth=f,L.__tmNodeHeight=m,h.isAboveViewRoot)return L;var N=l.getModel(),F=G("background",y,d,1);if(F&&function(t,i,r){if(i.dataIndex=l.dataIndex,i.seriesIndex=e.seriesIndex,i.setShape({x:0,y:0,width:f,height:m}),E)V(i);else{i.invisible=!1;var n=l.getVisual("borderColor",!0),o=O.get("borderColor"),s=T(R);s.fill=n;var c=S(O);if(c.fill=o,r){var u=f-2*_;k(s,c,n,u,M,{x:_,y:0,width:u,height:M})}else s.text=c.text=null;i.setStyle(s),a.setElementHoverStyle(i,c)}t.add(i)}(L,F,I&&h.upperLabelHeight),I)a.isHighDownDispatcher(L)&&a.setAsHighDownDispatcher(L,!1),F&&(a.setAsHighDownDispatcher(F,!0),p.setItemGraphicEl(l.dataIndex,F));else{var B=G("content",y,d,2);B&&function(t,i){i.dataIndex=l.dataIndex,i.seriesIndex=e.seriesIndex;var r=Math.max(f-2*_,0),n=Math.max(m-2*_,0);if(i.culling=!0,i.setShape({x:_,y:_,width:r,height:n}),E)V(i);else{i.invisible=!1;var o=l.getVisual("color",!0),s=T(R);s.fill=o;var c=S(O);k(s,c,o,r,n),i.setStyle(s),a.setElementHoverStyle(i,c)}t.add(i)}(L,B),F&&a.isHighDownDispatcher(F)&&a.setAsHighDownDispatcher(F,!1),a.setAsHighDownDispatcher(L,!0),p.setItemGraphicEl(l.dataIndex,L)}return L}}}function V(e){!e.invisible&&s.push(e)}function k(t,i,r,o,s,c){var u=N.get("name"),d=N.getModel(c?x:v),p=N.getModel(c?b:C),f=d.getShallow("show");a.setLabelStyle(t,i,d,p,{defaultText:f?u:null,autoColor:r,isRectText:!0,labelFetcher:e,labelDataIndex:l.dataIndex,labelProp:c?"upperLabel":"label"}),z(t,c,h),z(i,c,h),c&&(t.textRect=n.clone(c)),t.truncate=f&&d.get("ellipsis")?{outerWidth:o,outerHeight:s,minChar:2}:null}function z(t,i,r){var n=t.text;if(!i&&r.isLeafRoot&&null!=n){var a=e.get("drillDownIcon",!0);t.text=a?a+" "+n:n}}function G(e,a,s,c){var u=null!=P&&i[e][P],d=o[e];return u?(i[e][P]=null,function(e,t,i){(e[w]={}).old="nodeGroup"===i?t.position.slice():n.extend({},t.shape)}(d,u,e)):E||((u=new a({z:A(s,c)})).__tmDepth=s,u.__tmStorageName=e,function(e,t,i){var n=e[w]={},a=l.parentNode;if(a&&(!r||"drillDown"===r.direction)){var s=0,c=0,u=o.background[a.getRawIndex()];!r&&u&&u.old&&(s=u.old.width,c=u.old.height),n.old="nodeGroup"===i?[0,c]:{x:s,y:c,width:0,height:0}}n.fadein="nodeGroup"!==i}(d,0,e)),t[e][w]=u}}function A(e,t){var i=10*e+t;return(i-1)/i}e.exports=E},function(e,t,i){var r=i(2),n=i(6),a=i(0),o=i(46).wrapTreePathInfo;function s(e){this.group=new r.Group,e.add(this.group)}function l(e,t,i,r,n,a){var o=[[n?e:e-5,t],[e+i,t],[e+i,t+r],[n?e:e-5,t+r]];return!a&&o.splice(2,0,[e+i+5,t+r/2]),!n&&o.push([e,t+r/2]),o}function c(e,t,i){e.eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&o(i,t)}}s.prototype={constructor:s,render:function(e,t,i,r){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var s=a.getModel("itemStyle"),l=s.getModel("textStyle"),c={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,c,l),this._renderContent(e,c,s,l,r),n.positionElement(o,c.pos,c.box)}},_prepare:function(e,t,i){for(var r=e;r;r=r.parentNode){var n=r.getModel().get("name"),a=i.getTextRect(n),o=Math.max(a.width+16,t.emptyItemWidth);t.totalWidth+=o+8,t.renderList.push({node:r,text:n,width:o})}},_renderContent:function(e,t,i,o,s){for(var u=0,d=t.emptyItemWidth,h=e.get("breadcrumb.height"),p=n.getAvailableSize(t.pos,t.box),f=t.totalWidth,m=t.renderList,g=m.length-1;g>=0;g--){var y=m[g],_=y.node,v=y.width,C=y.text;f>p.width&&(f-=v-d,v=d,C=null);var x=new r.Polygon({shape:{points:l(u,0,v,h,g===m.length-1,0===g)},style:a.defaults(i.getItemStyle(),{lineJoin:"bevel",text:C,textFill:o.getTextColor(),textFont:o.getFont()}),z:10,onclick:a.curry(s,_)});this.group.add(x),c(x,e,_),u+=v+8}},remove:function(){this.group.removeAll()}};var u=s;e.exports=u},function(e,t,i){var r=i(0);t.createWrap=function(){var e,t=[],i={};return{add:function(e,n,a,o,s){return r.isString(o)&&(s=o,o=0),!i[e.id]&&(i[e.id]=1,t.push({el:e,target:n,time:a,delay:o,easing:s}),!0)},done:function(t){return e=t,this},start:function(){for(var r=t.length,n=0,a=t.length;n<a;n++){var o=t[n];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){--r||(t.length=0,i={},e&&e())}}}}},function(e,t,i){for(var r=i(1),n=i(46),a=function(){},o=["treemapZoomToNode","treemapRender","treemapMove"],s=0;s<o.length;s++)r.registerAction({type:o[s],update:"updateView"},a);r.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,i){var r=n.retrieveTargetInfo(e,["treemapZoomToNode","treemapRootToNode"],t);if(r){var a=t.getViewRoot();a&&(e.direction=n.aboveViewRoot(a,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}}))}))},function(e,t,i){var r=i(47),n=i(24),a=i(0),o=a.isArray,s={seriesType:"treemap",reset:function(e,t,i,o){var s=e.getData().tree.root;s.isRemoved()||function e(t,i,o,s){var c=t.getModel(),d=t.getLayout();if(!d||d.invisible||!d.isInView)return;var h,p=t.getModel("itemStyle"),f=function(e,t,i){var r=a.extend({},t),n=i.designatedVisualItemStyle;return a.each(["color","colorAlpha","colorSaturation"],(function(i){n[i]=t[i];var a=e.get(i);n[i]=null,null!=a&&(r[i]=a)})),r}(p,i,s),m=p.get("borderColor"),g=p.get("borderColorSaturation");null!=g&&(h=l(f),m=function(e,t){return null!=t?n.modifyHSL(t,null,null,e):null}(g,h));t.setVisual("borderColor",m);var y=t.viewChildren;if(y&&y.length){var _=function(e,t,i,n,a,o){if(!o||!o.length)return;var s=u(t,"color")||null!=a.color&&"none"!==a.color&&(u(t,"colorAlpha")||u(t,"colorSaturation"));if(!s)return;var l=t.get("visualMin"),c=t.get("visualMax"),d=i.dataExtent.slice();null!=l&&l<d[0]&&(d[0]=l),null!=c&&c>d[1]&&(d[1]=c);var h=t.get("colorMappingBy"),p={type:s.name,dataExtent:d,visual:s.range};"color"!==p.type||"index"!==h&&"id"!==h?p.mappingMethod="linear":(p.mappingMethod="category",p.loop=!0);var f=new r(p);return f.__drColorMappingBy=h,f}(0,c,d,0,f,y);a.each(y,(function(t,i){if(t.depth>=o.length||t===o[t.depth]){var r=function(e,t,i,r,n,o){var s=a.extend({},t);if(n){var l=n.type,c="color"===l&&n.__drColorMappingBy,u="index"===c?r:"id"===c?o.mapIdToIndex(i.getId()):i.getValue(e.get("visualDimension"));s[l]=n.mapValueToVisual(u)}return s}(c,f,t,i,_,s);e(t,r,o,s)}}))}else h=l(f),t.setVisual("color",h)}(s,{},e.getViewRoot().getAncestors(),e)}};function l(e){var t=c(e,"color");if(t){var i=c(e,"colorAlpha"),r=c(e,"colorSaturation");return r&&(t=n.modifyHSL(t,null,null,r)),i&&(t=n.modifyAlpha(t,i)),t}}function c(e,t){var i=e[t];if(null!=i&&"none"!==i)return i}function u(e,t){var i=e.get(t);return o(i)&&i.length?{name:t,range:i}:null}e.exports=s},function(e,t,i){var r=i(0),n=i(9),a=i(3),o=a.parsePercent,s=a.MAX_SAFE_INTEGER,l=i(6),c=i(46),u=Math.max,d=Math.min,h=r.retrieve,p=r.each,f=["itemStyle","borderWidth"],m=["itemStyle","gapWidth"],g=["upperLabel","show"],y=["upperLabel","height"],_={seriesType:"treemap",reset:function(e,t,i,a){var g=i.getWidth(),y=i.getHeight(),_=e.option,S=l.getLayoutRect(e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),T=_.size||[],E=o(h(S.width,T[0]),g),w=o(h(S.height,T[1]),y),A=a&&a.type,P=c.retrieveTargetInfo(a,["treemapZoomToNode","treemapRootToNode"],e),D="treemapRender"===A||"treemapMove"===A?a.rootRect:null,M=e.getViewRoot(),I=c.getPathToRoot(M);if("treemapMove"!==A){var R="treemapZoomToNode"===A?function(e,t,i,r,n){var a,o=(t||{}).node,l=[r,n];if(!o||o===i)return l;var c=r*n,u=c*e.option.zoomToNodeRatio;for(;a=o.parentNode;){for(var d=0,h=a.children,p=0,m=h.length;p<m;p++)d+=h[p].getValue();var g=o.getValue();if(0===g)return l;u*=d/g;var y=a.getModel(),_=y.get(f),v=Math.max(_,b(y));(u+=4*_*_+(3*_+v)*Math.pow(u,.5))>s&&(u=s),o=a}u<c&&(u=c);var C=Math.pow(u/c,.5);return[r*C,n*C]}(e,P,M,E,w):D?[D.width,D.height]:[E,w],O=_.sort;O&&"asc"!==O&&"desc"!==O&&(O="desc");var L={squareRatio:_.squareRatio,sort:O,leafDepth:_.leafDepth};M.hostTree.clearLayouts();var N={x:0,y:0,width:R[0],height:R[1],area:R[0]*R[1]};M.setLayout(N),function e(t,i,r,n){var a,o;if(t.isRemoved())return;var s=t.getLayout();a=s.width,o=s.height;var l=(_=t.getModel()).get(f),c=_.get(m)/2,h=b(_),p=Math.max(l,h),g=l-c,y=p-c,_=t.getModel();t.setLayout({borderWidth:l,upperHeight:p,upperLabelHeight:h},!0),a=u(a-2*g,0),o=u(o-g-y,0);var S=a*o,T=v(t,_,S,i,r,n);if(!T.length)return;var E={x:g,y:y,width:a,height:o},w=d(a,o),A=1/0,P=[];P.area=0;for(var D=0,M=T.length;D<M;){var I=T[D];P.push(I),P.area+=I.getLayout().area;var R=C(P,w,i.squareRatio);R<=A?(D++,A=R):(P.area-=P.pop().getLayout().area,x(P,w,E,c,!1),w=d(E.width,E.height),P.length=P.area=0,A=1/0)}P.length&&x(P,w,E,c,!0);if(!r){var O=_.get("childrenVisibleMin");null!=O&&S<O&&(r=!0)}for(D=0,M=T.length;D<M;D++)e(T[D],i,r,n+1)}(M,L,!1,0);N=M.getLayout();p(I,(function(e,t){var i=(I[t+1]||M).getValue();e.setLayout(r.extend({dataExtent:[i,i],borderWidth:0,upperHeight:0},N))}))}var F=e.getData().tree.root;F.setLayout(function(e,t,i){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!i)return r;var n=i.node,a=n.getLayout();if(!a)return r;var o=[a.width/2,a.height/2],s=n;for(;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}(S,D,P),!0),e.setLayoutInfo(S),function e(t,i,r,a,o){var s=t.getLayout(),l=r[o],c=l&&l===t;if(l&&!c||o===r.length&&t!==a)return;t.setLayout({isInView:!0,invisible:!c&&!i.intersect(s),isAboveViewRoot:c},!0);var u=new n(i.x-s.x,i.y-s.y,i.width,i.height);p(t.viewChildren||[],(function(t){e(t,u,r,a,o+1)}))}(F,new n(-S.x,-S.y,g,y),I,M,0)}};function v(e,t,i,n,a,o){var s=e.children||[],l=n.sort;"asc"!==l&&"desc"!==l&&(l=null);var c=null!=n.leafDepth&&n.leafDepth<=o;if(a&&!c)return e.viewChildren=[];!function(e,t){t&&e.sort((function(e,i){var r="asc"===t?e.getValue()-i.getValue():i.getValue()-e.getValue();return 0===r?"asc"===t?e.dataIndex-i.dataIndex:i.dataIndex-e.dataIndex:r}))}(s=r.filter(s,(function(e){return!e.isRemoved()})),l);var u=function(e,t,i){for(var r=0,n=0,a=t.length;n<a;n++)r+=t[n].getValue();var o=e.get("visualDimension");if(t&&t.length)if("value"===o&&i)s=[t[t.length-1].getValue(),t[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];p(t,(function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)}))}else s=[NaN,NaN];return{sum:r,dataExtent:s}}(t,s,l);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,i,r,n){if(!r)return i;for(var a=e.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var c=n["asc"===r?o-l-1:l].getValue();c/i*t<a&&(s=l,i-=c)}return"asc"===r?n.splice(0,o-s):n.splice(s,o-s),i}(t,i,u.sum,l,s),0===u.sum)return e.viewChildren=[];for(var d=0,h=s.length;d<h;d++){var f=s[d].getValue()/u.sum*i;s[d].setLayout({area:f})}return c&&(s.length&&e.setLayout({isLeafRoot:!0},!0),s.length=0),e.viewChildren=s,e.setLayout({dataExtent:u.dataExtent},!0),s}function C(e,t,i){for(var r,n=0,a=1/0,o=0,s=e.length;o<s;o++)(r=e[o].getLayout().area)&&(r<a&&(a=r),r>n&&(n=r));var l=e.area*e.area,c=t*t*i;return l?u(c*n/l,l/(c*a)):1/0}function x(e,t,i,r,n){var a=t===i.width?0:1,o=1-a,s=["x","y"],l=["width","height"],c=i[s[a]],h=t?e.area/t:0;(n||h>i[l[o]])&&(h=i[l[o]]);for(var p=0,f=e.length;p<f;p++){var m=e[p],g={},y=h?m.getLayout().area/h:0,_=g[l[o]]=u(h-2*r,0),v=i[s[a]]+i[l[a]]-c,C=p===f-1||v<y?v:y,x=g[l[a]]=u(C-2*r,0);g[s[o]]=i[s[o]]+d(r,_/2),g[s[a]]=c+d(r,x/2),c+=C,m.setLayout(g,!0)}i[s[o]]+=h,i[l[o]]-=h}function b(e){return e.get(g)?e.get(y):0}e.exports=_},function(e,t,i){var r=i(1);i(386),i(388),i(391);var n=i(392),a=i(44),o=i(393),s=i(394),l=i(395),c=i(396),u=i(397),d=i(399);r.registerProcessor(n),r.registerVisual(a("graph","circle",null)),r.registerVisual(o),r.registerVisual(s),r.registerLayout(l),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,c),r.registerLayout(u),r.registerCoordinateSystem("graphView",{create:d})},function(e,t,i){var r=i(1),n=i(18),a=i(0),o=i(4).defaultEmphasis,s=i(12),l=i(7).encodeHTML,c=i(196),u=i(71),d=i(93),h=d.initCurvenessList,p=d.createEdgeMapForCurveness,f=r.extendSeriesModel({type:"series.graph",init:function(e){f.superApply(this,"init",arguments);var t=this;function i(){return t._categoriesData}this.legendVisualProvider=new u(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){f.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){f.superApply(this,"mergeDefaultAndTheme",arguments),o(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var i=e.edges||e.links||[],r=e.data||e.nodes||[],n=this;if(r&&i){h(this);var o=c(r,i,this,!0,(function(e,i){e.wrapMethod("getItemModel",(function(e){var t=n._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var r=n.getModel("edgeLabel"),a=new s({label:r.option},r.parentModel,t),o=n.getModel("emphasis.edgeLabel"),l=new s({emphasis:{label:o.option}},o.parentModel,t);function c(e){return(e=this.parsePath(e))&&"label"===e[0]?a:e&&"emphasis"===e[0]&&"label"===e[1]?l:this.parentModel}i.wrapMethod("getItemModel",(function(e){return e.customizeGetParent(c),e}))}));return a.each(o.edges,(function(e){p(e.node1,e.node2,this,e.dataIndex)}),this),o.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,i){if("edge"===i){var r=this.getData(),n=this.getDataParams(e,i),a=r.graph.getEdgeByIndex(e),o=r.getName(a.node1.dataIndex),s=r.getName(a.node2.dataIndex),c=[];return null!=o&&c.push(o),null!=s&&c.push(s),c=l(c.join(" > ")),n.value&&(c+=" : "+l(n.value)),c}return f.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=a.map(this.option.categories||[],(function(e){return null!=e.value?e:a.extend({value:0},e)})),t=new n(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},isAnimationEnabled:function(){return f.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}}}}),m=f;e.exports=m},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(28).enableClassCheck;function a(e){return"_EC_"+e}var o=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=o.prototype;function l(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function c(e,t,i){this.node1=e,this.node2=t,this.dataIndex=null==i?-1:i}s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(e,t){e=null==e?""+t:""+e;var i=this._nodesMap;if(!i[a(e)]){var r=new l(e,t);return r.hostGraph=this,this.nodes.push(r),i[a(e)]=r,r}},s.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},s.getNodeById=function(e){return this._nodesMap[a(e)]},s.addEdge=function(e,t,i){var r=this._nodesMap,n=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),l.isInstance(e)||(e=r[a(e)]),l.isInstance(t)||(t=r[a(t)]),e&&t){var o=e.id+"-"+t.id,s=new c(e,t,i);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),n[o]=s,s}},s.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},s.getEdge=function(e,t){l.isInstance(e)&&(e=e.id),l.isInstance(t)&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},s.eachNode=function(e,t){for(var i=this.nodes,r=i.length,n=0;n<r;n++)i[n].dataIndex>=0&&e.call(t,i[n],n)},s.eachEdge=function(e,t){for(var i=this.edges,r=i.length,n=0;n<r;n++)i[n].dataIndex>=0&&i[n].node1.dataIndex>=0&&i[n].node2.dataIndex>=0&&e.call(t,i[n],n)},s.breadthFirstTraverse=function(e,t,i,r){if(l.isInstance(t)||(t=this._nodesMap[a(t)]),t){for(var n="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(r,t,null))for(var s=[t];s.length;){var c=s.shift(),u=c[n];for(o=0;o<u.length;o++){var d=u[o],h=d.node1===c?d.node2:d.node1;if(!h.__visited){if(e.call(r,h,c))return;s.push(h),h.__visited=!0}}}}},s.update=function(){for(var e=this.data,t=this.edgeData,i=this.nodes,r=this.edges,n=0,a=i.length;n<a;n++)i[n].dataIndex=-1;for(n=0,a=e.count();n<a;n++)i[e.getRawIndex(n)].dataIndex=n;t.filterSelf((function(e){var i=r[t.getRawIndex(e)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0}));for(n=0,a=r.length;n<a;n++)r[n].dataIndex=-1;for(n=0,a=t.count();n<a;n++)r[t.getRawIndex(n)].dataIndex=n},s.clone=function(){for(var e=new o(this._directed),t=this.nodes,i=this.edges,r=0;r<t.length;r++)e.addNode(t[r].id,t[r].dataIndex);for(r=0;r<i.length;r++){var n=i[r];e.addEdge(n.node1.id,n.node2.id,n.dataIndex)}return e},l.prototype={constructor:l,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}},c.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)};var u=function(e,t){return{getValue:function(i){var r=this[e][t];return r.get(r.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,i,r)},getVisual:function(i,r){return this[e][t].getItemVisual(this.dataIndex,i,r)},setLayout:function(i,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,i,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}};r.mixin(l,u("hostGraph","data")),r.mixin(c,u("hostGraph","edgeData")),o.Node=l,o.Edge=c,n(l),n(c);var d=o;e.exports=d},function(e,t,i){var r=i(1),n=i(0),a=i(67),o=i(118),s=i(73),l=i(113),c=i(92).onIrrelevantElement,u=i(2),d=i(390),h=i(120).getNodeGlobalScale,p="__focusNodeAdjacency",f=["itemStyle","opacity"],m=["lineStyle","opacity"];function g(e,t){var i=e.getVisual("opacity");return null!=i?i:e.getModel().get(t)}function y(e,t,i){var r=e.getGraphicEl(),n=g(e,t);null!=i&&(null==n&&(n=1),n*=i),r.downplay&&r.downplay(),r.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==i||(t=n),e.setStyle("opacity",t)}}))}function _(e,t){var i=g(e,t),r=e.getGraphicEl();r.traverse((function(e){!e.isGroup&&e.setStyle("opacity",i)})),r.highlight&&r.highlight()}var v=r.extendChartView({type:"graph",init:function(e,t){var i=new a,r=new o,n=this.group;this._controller=new s(t.getZr()),this._controllerHost={target:n},n.add(i.group),n.add(r.group),this._symbolDraw=i,this._lineDraw=r,this._firstRender=!0},render:function(e,t,i){var r=this,n=e.coordinateSystem;this._model=e;var a=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===n.type){var l={position:n.position,scale:n.scale};this._firstRender?s.attr(l):u.updateProps(s,l,e)}d(e.getGraph(),h(e));var c=e.getData();a.updateData(c);var f=e.getEdgeData();o.updateData(f),this._updateNodeAndLinkScale(),this._updateController(e,t,i),clearTimeout(this._layoutTimeout);var m=e.forceLayout,g=e.get("force.layoutAnimation");m&&this._startForceLayoutIteration(m,g),c.eachItemGraphicEl((function(t,n){var a=c.getItemModel(n);t.off("drag").off("dragend");var o=a.get("draggable");o&&t.on("drag",(function(){m&&(m.warmUp(),!this._layouting&&this._startForceLayoutIteration(m,g),m.setFixed(n),c.setItemLayout(n,t.position))}),this).on("dragend",(function(){m&&m.setUnfixed(n)}),this),t.setDraggable(o&&m),t[p]&&t.off("mouseover",t[p]),t.__unfocusNodeAdjacency&&t.off("mouseout",t.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(t.on("mouseover",t[p]=function(){r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){r._dispatchUnfocus(i)}))}),this),c.graph.eachEdge((function(t){var n=t.getGraphicEl();n[p]&&n.off("mouseover",n[p]),n.__unfocusNodeAdjacency&&n.off("mouseout",n.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n[p]=function(){r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){r._dispatchUnfocus(i)}))}));var y="circular"===e.get("layout")&&e.get("circular.rotateLabel"),_=c.getLayout("cx"),v=c.getLayout("cy");c.eachItemGraphicEl((function(e,t){var i=c.getItemModel(t).get("label.rotate")||0,r=e.getSymbolPath();if(y){var n=c.getItemLayout(t),a=Math.atan2(n[1]-v,n[0]-_);a<0&&(a=2*Math.PI+a);var o=n[0]<_;o&&(a-=Math.PI);var s=o?"left":"right";u.modifyLabelStyle(r,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else u.modifyLabelStyle(r,{textRotation:i*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){i._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,i,r){var a=e.getData().graph,o=r.dataIndex,s=r.edgeDataIndex,l=a.getNodeByIndex(o),c=a.getEdgeByIndex(s);(l||c)&&(a.eachNode((function(e){y(e,f,.1)})),a.eachEdge((function(e){y(e,m,.1)})),l&&(_(l,f),n.each(l.edges,(function(e){e.dataIndex<0||(_(e,m),_(e.node1,f),_(e.node2,f))}))),c&&(_(c,m),_(c.node1,f),_(c.node2,f)))},unfocusNodeAdjacency:function(e,t,i,r){var n=e.getData().graph;n.eachNode((function(e){y(e,f)})),n.eachEdge((function(e){y(e,m)}))},_startForceLayoutIteration:function(e,t){var i=this;!function r(){e.step((function(e){i.updateLayout(i._model),(i._layouting=!e)&&(t?i._layoutTimeout=setTimeout(r,16):r())}))}()},_updateController:function(e,t,i){var r=this._controller,n=this._controllerHost,a=this.group;r.setPointerChecker((function(t,r,n){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,n)&&!c(t,i,e)})),"view"===e.coordinateSystem.type?(r.enable(e.get("roam")),n.zoomLimit=e.get("scaleLimit"),n.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(t){l.updateViewOnPan(n,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){l.updateViewOnZoom(n,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),d(e.getGraph(),h(e)),this._lineDraw.updateLayout()}),this)):r.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),i=h(e),r=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",r)}))},updateLayout:function(e){d(e.getGraph(),h(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});e.exports=v},function(e,t,i){var r=i(2),n=i(8),a=r.Line.prototype,o=r.BezierCurve.prototype;function s(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var l=r.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(e,t){this[s(t)?"_buildPathLine":"_buildPathCurve"](e,t)},_buildPathLine:a.buildPath,_buildPathCurve:o.buildPath,pointAt:function(e){return this[s(this.shape)?"_pointAtLine":"_pointAtCurve"](e)},_pointAtLine:a.pointAt,_pointAtCurve:o.pointAt,tangentAt:function(e){var t=this.shape,i=s(t)?[t.x2-t.x1,t.y2-t.y1]:this._tangentAtCurve(e);return n.normalize(i,i)},_tangentAtCurve:o.tangentAt});e.exports=l},function(e,t,i){var r=i(32),n=i(8),a=i(120).getSymbolSize,o=[],s=[],l=[],c=r.quadraticAt,u=n.distSquare,d=Math.abs;function h(e,t,i){for(var r,n=e[0],a=e[1],h=e[2],p=1/0,f=i*i,m=.1,g=.1;g<=.9;g+=.1){o[0]=c(n[0],a[0],h[0],g),o[1]=c(n[1],a[1],h[1],g),(v=d(u(o,t)-f))<p&&(p=v,r=g)}for(var y=0;y<32;y++){var _=r+m;s[0]=c(n[0],a[0],h[0],r),s[1]=c(n[1],a[1],h[1],r),l[0]=c(n[0],a[0],h[0],_),l[1]=c(n[1],a[1],h[1],_);var v=u(s,t)-f;if(d(v)<.01)break;var C=u(l,t)-f;m/=2,v<0?C>=0?r+=m:r-=m:C>=0?r-=m:r+=m}return r}e.exports=function(e,t){var i=[],o=r.quadraticSubdivide,s=[[],[],[]],l=[[],[]],c=[];t/=2,e.eachEdge((function(e,r){var u=e.getLayout(),d=e.getVisual("fromSymbol"),p=e.getVisual("toSymbol");u.__original||(u.__original=[n.clone(u[0]),n.clone(u[1])],u[2]&&u.__original.push(n.clone(u[2])));var f=u.__original;if(null!=u[2]){if(n.copy(s[0],f[0]),n.copy(s[1],f[2]),n.copy(s[2],f[1]),d&&"none"!==d){var m=a(e.node1),g=h(s,f[0],m*t);o(s[0][0],s[1][0],s[2][0],g,i),s[0][0]=i[3],s[1][0]=i[4],o(s[0][1],s[1][1],s[2][1],g,i),s[0][1]=i[3],s[1][1]=i[4]}if(p&&"none"!==p){m=a(e.node2),g=h(s,f[1],m*t);o(s[0][0],s[1][0],s[2][0],g,i),s[1][0]=i[1],s[2][0]=i[2],o(s[0][1],s[1][1],s[2][1],g,i),s[1][1]=i[1],s[2][1]=i[2]}n.copy(u[0],s[0]),n.copy(u[1],s[2]),n.copy(u[2],s[1])}else{if(n.copy(l[0],f[0]),n.copy(l[1],f[1]),n.sub(c,l[1],l[0]),n.normalize(c,c),d&&"none"!==d){m=a(e.node1);n.scaleAndAdd(l[0],l[0],c,m*t)}if(p&&"none"!==p){m=a(e.node2);n.scaleAndAdd(l[1],l[1],c,-m*t)}n.copy(u[0],l[0]),n.copy(u[1],l[1])}}))}},function(e,t,i){var r=i(1),n=i(114).updateCenterAndZoom;i(197);r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var i=t.coordinateSystem,r=n(i,e);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)}))}))},function(e,t){e.exports=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var i=e.getCategoriesData(),r=e.getGraph().data,n=i.mapArray(i.getName);r.filterSelf((function(e){var i=r.getItemModel(e).getShallow("category");if(null!=i){"number"==typeof i&&(i=n[i]);for(var a=0;a<t.length;a++)if(!t[a].isSelected(i))return!1}return!0}))}),this)}},function(e,t){e.exports=function(e){var t={};e.eachSeriesByType("graph",(function(e){var i=e.getCategoriesData(),r=e.getData(),n={};i.each((function(r){var a=i.getName(r);n["ec-"+a]=r;var o=i.getItemModel(r),s=o.get("itemStyle.color")||e.getColorFromPalette(a,t);i.setItemVisual(r,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],c=0;c<l.length;c++){var u=o.getShallow(l[c],!0);null!=u&&i.setItemVisual(r,l[c],u)}})),i.count()&&r.each((function(e){var t=r.getItemModel(e).getShallow("category");if(null!=t){"string"==typeof t&&(t=n["ec-"+t]);for(var a=["color","opacity","symbol","symbolSize","symbolKeepAspect"],o=0;o<a.length;o++)null==r.getItemVisual(e,a[o],!0)&&r.setItemVisual(e,a[o],i.getItemVisual(t,a[o]))}}))}))}},function(e,t){function i(e){return e instanceof Array||(e=[e,e]),e}e.exports=function(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),r=e.getEdgeData(),n=i(e.get("edgeSymbol")),a=i(e.get("edgeSymbolSize")),o="lineStyle.color".split("."),s="lineStyle.opacity".split(".");r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",a&&a[0]),r.setVisual("toSymbolSize",a&&a[1]),r.setVisual("color",e.get(o)),r.setVisual("opacity",e.get(s)),r.each((function(e){var n=r.getItemModel(e),a=t.getEdgeByIndex(e),l=i(n.getShallow("symbol",!0)),c=i(n.getShallow("symbolSize",!0)),u=n.get(o),d=n.get(s);switch(u){case"source":u=a.node1.getVisual("color");break;case"target":u=a.node2.getVisual("color")}l[0]&&a.setVisual("fromSymbol",l[0]),l[1]&&a.setVisual("toSymbol",l[1]),c[0]&&a.setVisual("fromSymbolSize",c[0]),c[1]&&a.setVisual("toSymbolSize",c[1]),a.setVisual("color",u),a.setVisual("opacity",d)}))}))}},function(e,t,i){var r=i(0).each,n=i(198),a=n.simpleLayout,o=n.simpleLayoutEdge;e.exports=function(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),i=e.coordinateSystem;if(i&&"view"!==i.type){var n=e.getData(),s=[];r(i.dimensions,(function(e){s=s.concat(n.mapDimension(e,!0))}));for(var l=0;l<n.count();l++){for(var c=[],u=!1,d=0;d<s.length;d++){var h=n.get(s[d],l);isNaN(h)||(u=!0),c.push(h)}u?n.setItemLayout(l,i.dataToPoint(c)):n.setItemLayout(l,[NaN,NaN])}o(n.graph,e)}else t&&"none"!==t||a(e)}))}},function(e,t,i){var r=i(199).circularLayout;e.exports=function(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&r(e,"symbolSize")}))}},function(e,t,i){var r=i(398).forceLayout,n=i(198).simpleLayout,a=i(199).circularLayout,o=i(3).linearMap,s=i(8),l=i(0),c=i(93).getCurvenessForEdge;e.exports=function(e){e.eachSeriesByType("graph",(function(e){if(!(_=e.coordinateSystem)||"view"===_.type)if("force"===e.get("layout")){var t=e.preservedPoints||{},i=e.getGraph(),u=i.data,d=i.edgeData,h=e.getModel("force"),p=h.get("initLayout");e.preservedPoints?u.each((function(e){var i=u.getId(e);u.setItemLayout(e,t[i]||[NaN,NaN])})):p&&"none"!==p?"circular"===p&&a(e,"value"):n(e);var f=u.getDataExtent("value"),m=d.getDataExtent("value"),g=h.get("repulsion"),y=h.get("edgeLength");l.isArray(g)||(g=[g,g]),l.isArray(y)||(y=[y,y]),y=[y[1],y[0]];var _,v=u.mapArray("value",(function(e,t){var i=u.getItemLayout(t),r=o(e,f,g);return isNaN(r)&&(r=(g[0]+g[1])/2),{w:r,rep:r,fixed:u.getItemModel(t).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),C=d.mapArray("value",(function(t,r){var n=i.getEdgeByIndex(r),a=o(t,m,y);isNaN(a)&&(a=(y[0]+y[1])/2);var s=n.getModel(),u=l.retrieve3(s.get("lineStyle.curveness"),-c(n,e,r,!0),0);return{n1:v[n.node1.dataIndex],n2:v[n.node2.dataIndex],d:a,curveness:u,ignoreForceLayout:s.get("ignoreForceLayout")}})),x=(_=e.coordinateSystem).getBoundingRect(),b=r(v,C,{rect:x,gravity:h.get("gravity"),friction:h.get("friction")}),S=b.step;b.step=function(e){for(var r=0,n=v.length;r<n;r++)v[r].fixed&&s.copy(v[r].p,i.getNodeByIndex(r).getLayout());S((function(r,n,a){for(var o=0,l=r.length;o<l;o++)r[o].fixed||i.getNodeByIndex(o).setLayout(r[o].p),t[u.getId(o)]=r[o].p;for(o=0,l=n.length;o<l;o++){var c=n[o],d=i.getEdgeByIndex(o),h=c.n1.p,p=c.n2.p,f=d.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],s.copy(f[0],h),s.copy(f[1],p),+c.curveness&&(f[2]=[(h[0]+p[0])/2-(h[1]-p[1])*c.curveness,(h[1]+p[1])/2-(p[0]-h[0])*c.curveness]),d.setLayout(f)}e&&e(a)}))},e.forceLayout=b,e.preservedPoints=t,b.step()}else e.forceLayout=null}))}},function(e,t,i){var r=i(8),n=r.scaleAndAdd;t.forceLayout=function(e,t,i){for(var a=i.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],c=null==i.gravity?.1:i.gravity,u=0;u<e.length;u++){var d=e[u];d.p||(d.p=r.create(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=r.clone(d.p),d.edges=null}var h=null==i.friction?.6:i.friction,p=h;return{warmUp:function(){p=.8*h},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(i){for(var a=[],o=e.length,s=0;s<t.length;s++){var u=t[s];if(!u.ignoreForceLayout){var d=u.n1,h=u.n2;r.sub(a,h.p,d.p);var f=r.len(a)-u.d,m=h.w/(d.w+h.w);isNaN(m)&&(m=0),r.normalize(a,a),!d.fixed&&n(d.p,d.p,a,m*f*p),!h.fixed&&n(h.p,h.p,a,-(1-m)*f*p)}}for(s=0;s<o;s++){(v=e[s]).fixed||(r.sub(a,l,v.p),n(v.p,v.p,a,c*p))}for(s=0;s<o;s++){d=e[s];for(var g=s+1;g<o;g++){h=e[g];r.sub(a,h.p,d.p),0===(f=r.len(a))&&(r.set(a,Math.random()-.5,Math.random()-.5),f=1);var y=(d.rep+h.rep)/f/f;!d.fixed&&n(d.pp,d.pp,a,y),!h.fixed&&n(h.pp,h.pp,a,-y)}}var _=[];for(s=0;s<o;s++){var v;(v=e[s]).fixed||(r.sub(_,v.p,v.pp),n(v.p,v.p,_,p),r.copy(v.pp,v.p))}p*=.992,i&&i(e,t,p<.01)}}}},function(e,t,i){var r=i(116),n=i(6).getLayoutRect,a=i(62);e.exports=function(e,t){var i=[];return e.eachSeriesByType("graph",(function(e){var o=e.get("coordinateSystem");if(!o||"view"===o){var s=e.getData(),l=s.mapArray((function(e){var t=s.getItemModel(e);return[+t.get("x"),+t.get("y")]})),c=[],u=[];a.fromPoints(l,c,u),u[0]-c[0]==0&&(u[0]+=1,c[0]-=1),u[1]-c[1]==0&&(u[1]+=1,c[1]-=1);var d=(u[0]-c[0])/(u[1]-c[1]),h=function(e,t,i){var r=e.getBoxLayoutParams();return r.aspect=i,n(r,{width:t.getWidth(),height:t.getHeight()})}(e,t,d);isNaN(d)&&(c=[h.x,h.y],u=[h.x+h.width,h.y+h.height]);var p=u[0]-c[0],f=u[1]-c[1],m=h.width,g=h.height,y=e.coordinateSystem=new r;y.zoomLimit=e.get("scaleLimit"),y.setBoundingRect(c[0],c[1],p,f),y.setViewRect(h.x,h.y,m,g),y.setCenter(e.get("center")),y.setZoom(e.get("zoom")),i.push(y)}})),i}},function(e,t,i){i(401),i(402)},function(e,t,i){var r=i(54),n=i(14).extend({type:"series.gauge",getInitialData:function(e,t){return r(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});e.exports=n},function(e,t,i){var r=i(403),n=i(2),a=i(25),o=i(3),s=o.parsePercent,l=o.round,c=o.linearMap;function u(e,t){return t&&("string"==typeof t?e=t.replace("{value}",null!=e?e:""):"function"==typeof t&&(e=t(e))),e}var d=2*Math.PI,h=a.extend({type:"gauge",render:function(e,t,i){this.group.removeAll();var r=e.get("axisLine.lineStyle.color"),n=function(e,t){var i=e.get("center"),r=t.getWidth(),n=t.getHeight(),a=Math.min(r,n);return{cx:s(i[0],t.getWidth()),cy:s(i[1],t.getHeight()),r:s(e.get("radius"),a/2)}}(e,i);this._renderMain(e,t,i,r,n)},dispose:function(){},_renderMain:function(e,t,i,r,a){for(var o=this.group,s=e.getModel("axisLine"),l=s.getModel("lineStyle"),c=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,h=((y=-e.get("endAngle")/180*Math.PI)-u)%d,p=u,f=l.get("width"),m=s.get("show"),g=0;m&&g<r.length;g++){var y=u+h*Math.min(Math.max(r[g][0],0),1),_=new n.Sector({shape:{startAngle:p,endAngle:y,cx:a.cx,cy:a.cy,clockwise:c,r0:a.r-f,r:a.r},silent:!0});_.setStyle({fill:r[g][1]}),_.setStyle(l.getLineStyle(["color","borderWidth","borderColor"])),o.add(_),p=y}var v=function(e){if(e<=0)return r[0][1];for(var t=0;t<r.length;t++)if(r[t][0]>=e&&(0===t?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};if(!c){var C=u;u=y,y=C}this._renderTicks(e,t,i,v,a,u,y,c),this._renderPointer(e,t,i,v,a,u,y,c),this._renderTitle(e,t,i,v,a),this._renderDetail(e,t,i,v,a)},_renderTicks:function(e,t,i,r,a,o,c,d){for(var h=this.group,p=a.cx,f=a.cy,m=a.r,g=+e.get("min"),y=+e.get("max"),_=e.getModel("splitLine"),v=e.getModel("axisTick"),C=e.getModel("axisLabel"),x=e.get("splitNumber"),b=v.get("splitNumber"),S=s(_.get("length"),m),T=s(v.get("length"),m),E=o,w=(c-o)/x,A=w/b,P=_.getModel("lineStyle").getLineStyle(),D=v.getModel("lineStyle").getLineStyle(),M=0;M<=x;M++){var I=Math.cos(E),R=Math.sin(E);if(_.get("show")){var O=new n.Line({shape:{x1:I*m+p,y1:R*m+f,x2:I*(m-S)+p,y2:R*(m-S)+f},style:P,silent:!0});"auto"===P.stroke&&O.setStyle({stroke:r(M/x)}),h.add(O)}if(C.get("show")){var L=u(l(M/x*(y-g)+g),C.get("formatter")),N=C.get("distance"),F=r(M/x);h.add(new n.Text({style:n.setTextStyle({},C,{text:L,x:I*(m-S-N)+p,y:R*(m-S-N)+f,textVerticalAlign:R<-.4?"top":R>.4?"bottom":"middle",textAlign:I<-.4?"left":I>.4?"right":"center"},{autoColor:F}),silent:!0}))}if(v.get("show")&&M!==x){for(var B=0;B<=b;B++){I=Math.cos(E),R=Math.sin(E);var V=new n.Line({shape:{x1:I*m+p,y1:R*m+f,x2:I*(m-T)+p,y2:R*(m-T)+f},silent:!0,style:D});"auto"===D.stroke&&V.setStyle({stroke:r((M+B/b)/x)}),h.add(V),E+=A}E-=A}else E+=w}},_renderPointer:function(e,t,i,a,o,l,u,d){var h=this.group,p=this._data;if(e.get("pointer.show")){var f=[+e.get("min"),+e.get("max")],m=[l,u],g=e.getData(),y=g.mapDimension("value");g.diff(p).add((function(t){var i=new r({shape:{angle:l}});n.initProps(i,{shape:{angle:c(g.get(y,t),f,m,!0)}},e),h.add(i),g.setItemGraphicEl(t,i)})).update((function(t,i){var r=p.getItemGraphicEl(i);n.updateProps(r,{shape:{angle:c(g.get(y,t),f,m,!0)}},e),h.add(r),g.setItemGraphicEl(t,r)})).remove((function(e){var t=p.getItemGraphicEl(e);h.remove(t)})).execute(),g.eachItemGraphicEl((function(e,t){var i=g.getItemModel(t),r=i.getModel("pointer");e.setShape({x:o.cx,y:o.cy,width:s(r.get("width"),o.r),r:s(r.get("length"),o.r)}),e.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",a(c(g.get(y,t),f,[0,1],!0))),n.setHoverStyle(e,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=g}else p&&p.eachItemGraphicEl((function(e){h.remove(e)}))},_renderTitle:function(e,t,i,r,a){var o=e.getData(),l=o.mapDimension("value"),u=e.getModel("title");if(u.get("show")){var d=u.get("offsetCenter"),h=a.cx+s(d[0],a.r),p=a.cy+s(d[1],a.r),f=+e.get("min"),m=+e.get("max"),g=e.getData().get(l,0),y=r(c(g,[f,m],[0,1],!0));this.group.add(new n.Text({silent:!0,style:n.setTextStyle({},u,{x:h,y:p,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:y,forceRich:!0})}))}},_renderDetail:function(e,t,i,r,a){var o=e.getModel("detail"),l=+e.get("min"),d=+e.get("max");if(o.get("show")){var h=o.get("offsetCenter"),p=a.cx+s(h[0],a.r),f=a.cy+s(h[1],a.r),m=s(o.get("width"),a.r),g=s(o.get("height"),a.r),y=e.getData(),_=y.get(y.mapDimension("value"),0),v=r(c(_,[l,d],[0,1],!0));this.group.add(new n.Text({silent:!0,style:n.setTextStyle({},o,{x:p,y:f,text:u(_,o.get("formatter")),textWidth:isNaN(m)?null:m,textHeight:isNaN(g)?null:g,textAlign:"center",textVerticalAlign:"middle"},{autoColor:v,forceRich:!0})}))}}});e.exports=h},function(e,t,i){var r=i(10).extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var i=Math.cos,r=Math.sin,n=t.r,a=t.width,o=t.angle,s=t.x-i(o)*a*(a>=n/3?1:2),l=t.y-r(o)*a*(a>=n/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+i(o)*a,t.y+r(o)*a),e.lineTo(t.x+i(t.angle)*n,t.y+r(t.angle)*n),e.lineTo(t.x-i(o)*a,t.y-r(o)*a),e.lineTo(s,l)}});e.exports=r},function(e,t,i){var r=i(1);i(405),i(406);var n=i(90),a=i(407),o=i(72);r.registerVisual(n("funnel")),r.registerLayout(a),r.registerProcessor(o("funnel"))},function(e,t,i){var r=i(1),n=i(0),a=i(54),o=i(4).defaultEmphasis,s=i(29).makeSeriesEncodeForNameBased,l=i(71),c=r.extendSeriesModel({type:"series.funnel",init:function(e){c.superApply(this,"init",arguments),this.legendVisualProvider=new l(n.bind(this.getData,this),n.bind(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return a(this,{coordDimensions:["value"],encodeDefaulter:n.curry(s,this)})},_defaultLabelLine:function(e){o(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),i=c.superCall(this,"getDataParams",e),r=t.mapDimension("value"),n=t.getSum(r);return i.percent=n?+(t.get(r,e)/n*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}),u=c;e.exports=u},function(e,t,i){var r=i(2),n=i(0),a=i(25);function o(e,t){r.Group.call(this);var i=new r.Polygon,n=new r.Polyline,a=new r.Text;this.add(i),this.add(n),this.add(a),this.highDownOnUpdate=function(e,t){"emphasis"===t?(n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore):(n.ignore=n.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(e,t,!0)}var s=o.prototype,l=["itemStyle","opacity"];s.updateData=function(e,t,i){var a=this.childAt(0),o=e.hostModel,s=e.getItemModel(t),c=e.getItemLayout(t),u=e.getItemModel(t).get(l);u=null==u?1:u,a.useStyle({}),i?(a.setShape({points:c.points}),a.setStyle({opacity:0}),r.initProps(a,{style:{opacity:u}},o,t)):r.updateProps(a,{style:{opacity:u},shape:{points:c.points}},o,t);var d=s.getModel("itemStyle"),h=e.getItemVisual(t,"color");a.setStyle(n.defaults({lineJoin:"round",fill:h},d.getItemStyle(["opacity"]))),a.hoverStyle=d.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),r.setHoverStyle(this)},s._updateLabel=function(e,t){var i=this.childAt(1),n=this.childAt(2),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"color");r.updateProps(i,{shape:{points:s.linePoints||s.linePoints}},a,t),r.updateProps(n,{style:{x:s.x,y:s.y}},a,t),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=o.getModel("label"),u=o.getModel("emphasis.label"),d=o.getModel("labelLine"),h=o.getModel("emphasis.labelLine");l=e.getItemVisual(t,"color");r.setLabelStyle(n.style,n.hoverStyle={},c,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!d.get("show"),i.hoverIgnore=!h.get("show"),i.setStyle({stroke:l}),i.setStyle(d.getModel("lineStyle").getLineStyle()),i.hoverStyle=h.getModel("lineStyle").getLineStyle()},n.inherits(o,r.Group);var c=a.extend({type:"funnel",render:function(e,t,i){var r=e.getData(),n=this._data,a=this.group;r.diff(n).add((function(e){var t=new o(r,e);r.setItemGraphicEl(e,t),a.add(t)})).update((function(e,t){var i=n.getItemGraphicEl(t);i.updateData(r,e),a.add(i),r.setItemGraphicEl(e,i)})).remove((function(e){var t=n.getItemGraphicEl(e);a.remove(t)})).execute(),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});e.exports=c},function(e,t,i){i(5).__DEV__;var r=i(6),n=i(3),a=n.parsePercent,o=n.linearMap;e.exports=function(e,t,i){e.eachSeriesByType("funnel",(function(e){var i=e.getData(),n=i.mapDimension("value"),s=e.get("sort"),l=function(e,t){return r.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),c=function(e,t){for(var i=e.mapDimension("value"),r=e.mapArray(i,(function(e){return e})),n=[],a="ascending"===t,o=0,s=e.count();o<s;o++)n[o]=o;return"function"==typeof t?n.sort(t):"none"!==t&&n.sort((function(e,t){return a?r[e]-r[t]:r[t]-r[e]})),n}(i,s),u=e.get("orient"),d=l.width,h=l.height,p=l.x,f=l.y,m="horizontal"===u?[a(e.get("minSize"),h),a(e.get("maxSize"),h)]:[a(e.get("minSize"),d),a(e.get("maxSize"),d)],g=i.getDataExtent(n),y=e.get("min"),_=e.get("max");null==y&&(y=Math.min(g[0],0)),null==_&&(_=g[1]);var v=e.get("funnelAlign"),C=e.get("gap"),x=(("horizontal"===u?d:h)-C*(i.count()-1))/i.count(),b=function(e,t){if("horizontal"===u){var r,a=i.get(n,e)||0,s=o(a,[y,_],m,!0);switch(v){case"top":r=f;break;case"center":r=f+(h-s)/2;break;case"bottom":r=f+(h-s)}return[[t,r],[t,r+s]]}a=i.get(n,e)||0;var l,c=o(a,[y,_],m,!0);switch(v){case"left":l=p;break;case"center":l=p+(d-c)/2;break;case"right":l=p+d-c}return[[l,t],[l+c,t]]};"ascending"===s&&(x=-x,C=-C,"horizontal"===u?p+=d:f+=h,c=c.reverse());for(var S=0;S<c.length;S++){var T=c[S],E=c[S+1],w=i.getItemModel(T);if("horizontal"===u){var A=w.get("itemStyle.width");null==A?A=x:(A=a(A,d),"ascending"===s&&(A=-A));var P=b(T,p),D=b(E,p+A);p+=A+C,i.setItemLayout(T,{points:P.concat(D.slice().reverse())})}else{var M=w.get("itemStyle.height");null==M?M=x:(M=a(M,h),"ascending"===s&&(M=-M));P=b(T,"horizontal"===u?p:f),D=b(E,"horizontal"===u?p+A:f+M);f+=M+C,i.setItemLayout(T,{points:P.concat(D.slice().reverse())})}}!function(e){e.each((function(t){var i,r,n,a,o=e.getItemModel(t),s=o.getModel("label").get("position"),l=o.get("orient"),c=o.getModel("labelLine"),u=e.getItemLayout(t),d=u.points,h="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(h)"insideLeft"===s?(r=(d[0][0]+d[3][0])/2+5,n=(d[0][1]+d[3][1])/2,i="left"):"insideRight"===s?(r=(d[1][0]+d[2][0])/2-5,n=(d[1][1]+d[2][1])/2,i="right"):(r=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,n=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,i="center"),a=[[r,n],[r,n]];else{var p,f,m,g,y=c.get("length");"left"===s?(p=(d[3][0]+d[0][0])/2,f=(d[3][1]+d[0][1])/2,r=(m=p-y)-5,i="right"):"right"===s?(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,r=(m=p+y)+5,i="left"):"top"===s?(p=(d[3][0]+d[0][0])/2,n=(g=(f=(d[3][1]+d[0][1])/2)-y)-5,i="center"):"bottom"===s?(p=(d[1][0]+d[2][0])/2,n=(g=(f=(d[1][1]+d[2][1])/2)+y)+5,i="center"):"rightTop"===s?(p="horizontal"===l?d[3][0]:d[1][0],f="horizontal"===l?d[3][1]:d[1][1],"horizontal"===l?(n=(g=f-y)-5,i="center"):(r=(m=p+y)+5,i="top")):"rightBottom"===s?(p=d[2][0],f=d[2][1],"horizontal"===l?(n=(g=f+y)+5,i="center"):(r=(m=p+y)+5,i="bottom")):"leftTop"===s?(p=d[0][0],f="horizontal"===l?d[0][1]:d[1][1],"horizontal"===l?(n=(g=f-y)-5,i="center"):(r=(m=p-y)-5,i="right")):"leftBottom"===s?(p="horizontal"===l?d[1][0]:d[3][0],f="horizontal"===l?d[1][1]:d[2][1],"horizontal"===l?(n=(g=f+y)+5,i="center"):(r=(m=p-y)-5,i="right")):(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,"horizontal"===l?(n=(g=f+y)+5,i="center"):(r=(m=p+y)+5,i="left")),"horizontal"===l?r=m=p:n=g=f,a=[[p,f],[m,g]]}u.label={linePoints:a,x:r,y:n,verticalAlign:"middle",textAlign:i,inside:h}}))}(i)}))}},function(e,t,i){var r=i(1);i(200),i(417),i(418);var n=i(419);r.registerVisual(n)},function(e,t,i){var r=i(0),n=i(4);e.exports=function(e){!function(e){if(e.parallel)return;var t=!1;r.each(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}(e),function(e){var t=n.normalizeToArray(e.parallelAxis);r.each(t,(function(t){if(r.isObject(t)){var i=t.parallelIndex||0,a=n.normalizeToArray(e.parallel)[i];a&&a.parallelAxisDefault&&r.merge(t,a.parallelAxisDefault,!1)}}))}(e)}},function(e,t,i){var r=i(0),n=i(15),a=i(6),o=i(21),s=i(411),l=i(2),c=i(3),u=i(55),d=r.each,h=Math.min,p=Math.max,f=Math.floor,m=Math.ceil,g=c.round,y=Math.PI;function _(e,t,i){this._axesMap=r.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,t,i)}function v(e,t){return h(p(e,t[0]),t[1])}function C(e,t){var i=t.layoutLength/(t.axisCount-1);return{position:i*e,axisNameAvailableWidth:i,axisLabelShow:!0}}function x(e,t){var i,r,n=t.layoutLength,a=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,c=s,u=!1;return e<l[0]?(i=e*s,r=s):e<=l[1]?(i=t.axisExpandWindow0Pos+e*a-t.axisExpandWindow[0],c=a,u=!0):(i=n-(o-1-e)*s,r=s),{position:i,axisNameAvailableWidth:c,axisLabelShow:u,nameTruncateMaxWidth:r}}_.prototype={type:"parallel",constructor:_,_init:function(e,t,i){var r=e.dimensions,n=e.parallelAxisIndex;d(r,(function(e,i){var r=n[i],a=t.getComponent("parallelAxis",r),l=this._axesMap.set(e,new s(e,o.createScaleByModel(a),[0,0],a.get("type"),r)),c="category"===l.type;l.onBand=c&&a.get("boundaryGap"),l.inverse=a.get("inverse"),a.axis=l,l.model=a,l.coordinateSystem=a.coordinateSystem=this}),this)},update:function(e,t){this._updateAxesFromSeries(this._model,e)},containPoint:function(e){var t=this._makeLayoutInfo(),i=t.axisBase,r=t.layoutBase,n=t.pixelDimIndex,a=e[1-n],o=e[n];return a>=i&&a<=i+t.axisLength&&o>=r&&o<=r+t.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,t){t.eachSeries((function(i){if(e.contains(i,t)){var r=i.getData();d(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(r,r.mapDimension(e)),o.niceScaleExtent(t.scale,t.model)}),this)}}),this)},resize:function(e,t){this._rect=a.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var e,t=this._model,i=this._rect,r=["x","y"],n=["width","height"],a=t.get("layout"),o="horizontal"===a?0:1,s=i[n[o]],l=[0,s],c=this.dimensions.length,u=v(t.get("axisExpandWidth"),l),d=v(t.get("axisExpandCount")||0,[0,c]),h=t.get("axisExpandable")&&c>3&&c>d&&d>1&&u>0&&s>0,p=t.get("axisExpandWindow");p?(e=v(p[1]-p[0],l),p[1]=p[0]+e):(e=v(u*(d-1),l),(p=[u*(t.get("axisExpandCenter")||f(c/2))-e/2])[1]=p[0]+e);var y=(s-e)/(c-d);y<3&&(y=0);var _=[f(g(p[0]/u,1))+1,m(g(p[1]/u,1))-1],C=y/u*p[0];return{layout:a,pixelDimIndex:o,layoutBase:i[r[o]],layoutLength:s,axisBase:i[r[1-o]],axisLength:i[n[1-o]],axisExpandable:h,axisExpandWidth:u,axisCollapseWidth:y,axisExpandWindow:p,axisCount:c,winInnerIndices:_,axisExpandWindow0Pos:C}},_layoutAxes:function(){var e=this._rect,t=this._axesMap,i=this.dimensions,r=this._makeLayoutInfo(),a=r.layout;t.each((function(e){var t=[0,r.axisLength],i=e.inverse?1:0;e.setExtent(t[i],t[1-i])})),d(i,(function(t,i){var o=(r.axisExpandable?x:C)(i,r),s={horizontal:{x:o.position,y:r.axisLength},vertical:{x:0,y:o.position}},l={horizontal:y/2,vertical:0},c=[s[a].x+e.x,s[a].y+e.y],u=l[a],d=n.create();n.rotate(d,d,u),n.translate(d,d,c),this._axesLayout[t]={position:c,rotation:u,transform:d,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(e){return this._axesMap.get(e)},dataToPoint:function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},eachActiveState:function(e,t,i,n){null==i&&(i=0),null==n&&(n=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];r.each(o,(function(t){s.push(e.mapDimension(t)),l.push(a.get(t).model)}));for(var c=this.hasAxisBrushed(),u=i;u<n;u++){var d;if(c){d="active";for(var h=e.getValues(s,u),p=0,f=o.length;p<f;p++){if("inactive"===l[p].getActiveState(h[p])){d="inactive";break}}}else d="normal";t(d,u)}},hasAxisBrushed:function(){for(var e=this.dimensions,t=this._axesMap,i=!1,r=0,n=e.length;r<n;r++)"normal"!==t.get(e[r]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(e,t){var i=this._axesLayout[t];return l.applyTransform([e,0],i.transform)},getAxisLayout:function(e){return r.clone(this._axesLayout[e])},getSlidedAxisExpandWindow:function(e){var t=this._makeLayoutInfo(),i=t.pixelDimIndex,r=t.axisExpandWindow.slice(),n=r[1]-r[0],a=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:r};var o,s=e[i]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",c=t.axisCollapseWidth,d=this._model.get("axisExpandSlideTriggerArea"),f=null!=d[0];if(c)f&&c&&s<n*d[0]?(l="jump",o=s-n*d[2]):f&&c&&s>n*(1-d[0])?(l="jump",o=s-n*(1-d[2])):(o=s-n*d[1])>=0&&(o=s-n*(1-d[1]))<=0&&(o=0),(o*=t.axisExpandWidth/c)?u(o,r,a,"all"):l="none";else{n=r[1]-r[0];(r=[p(0,a[1]*s/n-n/2)])[1]=h(a[1],r[0]+n),r[0]=r[1]-n}return{axisExpandWindow:r,behavior:l}}};var b=_;e.exports=b},function(e,t,i){var r=i(0),n=i(35),a=function(e,t,i,r,a){n.call(this,e,t,i),this.type=r||"value",this.axisIndex=a};a.prototype={constructor:a,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(13);i(413);var a=n.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){n.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(e){var t=this.option;e&&r.merge(t,e,!0),this._initDimensions()},contains:function(e,t){var i=e.get("parallelIndex");return null!=i&&t.getComponent("parallel",i)===this},setAxisExpand:function(e){r.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},_initDimensions:function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],i=r.filter(this.dependentModels.parallelAxis,(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);r.each(i,(function(i){e.push("dim"+i.get("dim")),t.push(i.componentIndex)}))}});e.exports=a},function(e,t,i){var r=i(0),n=i(13),a=i(49),o=i(88),s=i(3),l=i(53),c=n.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return a([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var t=this.activeIntervals=r.clone(e);if(t)for(var i=t.length-1;i>=0;i--)s.asc(t[i])},getActiveState:function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(e))return"inactive";if(1===t.length){var i=t[0];if(i[0]<=e&&e<=i[1])return"active"}else for(var r=0,n=t.length;r<n;r++)if(t[r][0]<=e&&e<=t[r][1])return"active";return"inactive"}});r.merge(c.prototype,l),o("parallel",c,(function(e,t){return t.type||(t.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10});var u=c;e.exports=u},function(e,t,i){i(201),i(415),i(416)},function(e,t,i){var r=i(1);r.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),r.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}))},function(e,t,i){var r=i(1),n=i(0),a=i(36),o=i(121),s=i(202),l=i(2),c=["axisLine","axisTickLabel","axisName"],u=r.extendComponentView({type:"parallelAxis",init:function(e,t){u.superApply(this,"init",arguments),(this._brushController=new o(t.getZr())).on("brush",n.bind(this._onBrush,this))},render:function(e,t,i,r){if(!function(e,t,i){return i&&"axisAreaSelect"===i.type&&t.findComponents({mainType:"parallelAxis",query:i})[0]===e}(e,t,r)){this.axisModel=e,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new l.Group,this.group.add(this._axisGroup),e.get("show")){var s=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),u=s.coordinateSystem,d=e.getAreaSelectStyle(),h=d.width,p=e.axis.dim,f=u.getAxisLayout(p),m=n.extend({strokeContainThreshold:h},f),g=new a(e,m);n.each(c,g.add,g),this._axisGroup.add(g.getGroup()),this._refreshBrushController(m,d,e,s,h,i);var y=r&&!1===r.animation?null:e;l.groupTransition(o,this._axisGroup,y)}}},_refreshBrushController:function(e,t,i,r,a,o){var c=i.axis.getExtent(),u=c[1]-c[0],d=Math.min(30,.1*Math.abs(u)),h=l.BoundingRect.create({x:c[0],y:-a/2,width:u,height:a});h.x-=d,h.width+=2*d,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,position:e.position}).setPanels([{panelId:"pl",clipPath:s.makeRectPanelClipPath(h),isTargetByCursor:s.makeRectIsTargetByCursor(h,o,r),getLinearBrushOtherExtent:s.makeLinearBrushOtherExtent(h,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return n.map(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(i))},_onBrush:function(e,t){var i=this.axisModel,r=i.axis,a=n.map(e,(function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]}));(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:a})},dispose:function(){this._brushController.dispose()}});var d=u;e.exports=d},function(e,t,i){var r=i(0),n=r.each,a=r.createHashMap,o=i(14),s=i(30),l=o.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var i=this.getSource();return function(e,t){if(e.encodeDefine)return;var i=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(!i)return;var r=e.encodeDefine=a();n(i.dimensions,(function(e){var t=+e.replace("dim","");r.set(e,t)}))}(i,this),s(i,this)},getRawIndicesByActiveState:function(e){var t=this.coordinateSystem,i=this.getData(),r=[];return t.eachActiveState(i,(function(t,n){e===t&&r.push(i.getRawIndex(n))})),r},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});e.exports=l},function(e,t,i){var r=i(2),n=i(25);function a(e,t,i,r){for(var n,a=[],o=0;o<i.length;o++){var s=i[o],l=e.get(e.mapDimension(s),t);n=l,("category"===r.getAxis(s).type?null==n:null==n||isNaN(n))||a.push(r.dataToPoint(l,s))}return a}function o(e,t,i,n,o){var s=a(e,i,n,o),l=new r.Polyline({shape:{points:s},silent:!0,z2:10});return t.add(l),e.setItemGraphicEl(i,l),l}function s(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),{lineStyle:e.getModel("lineStyle").getLineStyle(),smooth:null!=t?t:.3}}function l(e,t,i,r){var n=r.lineStyle;t.hasItemOption&&(n=t.getItemModel(i).getModel("lineStyle").getLineStyle());e.useStyle(n);var a=e.style;a.fill=null,a.stroke=t.getItemVisual(i,"color"),a.opacity=t.getItemVisual(i,"opacity"),r.smooth&&(e.shape.smooth=r.smooth)}var c=n.extend({type:"parallel",init:function(){this._dataGroup=new r.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,t,i,n){var c=this._dataGroup,u=e.getData(),d=this._data,h=e.coordinateSystem,p=h.dimensions,f=s(e);if(u.diff(d).add((function(e){l(o(u,c,e,p,h),u,e,f)})).update((function(t,i){var o=d.getItemGraphicEl(i),s=a(u,t,p,h);u.setItemGraphicEl(t,o);var c=n&&!1===n.animation?null:e;r.updateProps(o,{shape:{points:s}},c,t),l(o,u,t,f)})).remove((function(e){var t=d.getItemGraphicEl(e);c.remove(t)})).execute(),!this._initialized){this._initialized=!0;var m=function(e,t,i){var n=e.model,a=e.getRect(),o=new r.Rect({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),s="horizontal"===n.get("layout")?"width":"height";return o.setShape(s,0),r.initProps(o,{shape:{width:a.width,height:a.height}},t,i),o}(h,e,(function(){setTimeout((function(){c.removeClipPath()}))}));c.setClipPath(m)}this._data=u},incrementalPrepareRender:function(e,t,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(e,t,i){for(var r=t.getData(),n=t.coordinateSystem,a=n.dimensions,c=s(t),u=e.start;u<e.end;u++){var d=o(r,this._dataGroup,u,a,n);d.incremental=!0,l(d,r,u,c)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});e.exports=c},function(e,t){var i=["lineStyle","normal","opacity"],r={seriesType:"parallel",reset:function(e,t,r){var n=e.getModel("itemStyle"),a=e.getModel("lineStyle"),o=t.get("color"),s=a.get("color")||n.get("color")||o[e.seriesIndex%o.length],l=e.get("inactiveOpacity"),c=e.get("activeOpacity"),u=e.getModel("lineStyle").getLineStyle(),d=e.coordinateSystem,h=e.getData(),p={normal:u.opacity,active:c,inactive:l};return h.setVisual("color",s),{progress:function(e,t){d.eachActiveState(t,(function(e,r){var n=p[e];if("normal"===e&&t.hasItemOption){var a=t.getItemModel(r).get(i,!0);null!=a&&(n=a)}t.setItemVisual(r,"opacity",n)}),e.start,e.end)}}}};e.exports=r},function(e,t,i){var r=i(1);i(421),i(422),i(423);var n=i(424),a=i(425);r.registerLayout(n),r.registerVisual(a)},function(e,t,i){var r=i(14),n=i(196),a=i(7).encodeHTML,o=i(12),s=(i(5).__DEV__,r.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(e,t){for(var i=e.edges||e.links,r=e.data||e.nodes,a=e.levels,s=this.levelModels={},l=0;l<a.length;l++)null!=a[l].depth&&a[l].depth>=0&&(s[a[l].depth]=new o(a[l],this,t));if(r&&i)return n(r,i,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var i=this.parentModel,r=i.getData().getItemLayout(t).depth;return i.levelModels[r]||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var i=this.parentModel,r=i.getGraph().getEdgeByIndex(t).node1.getLayout().depth;return i.levelModels[r]||this.parentModel})),e}))})).data},setNodePosition:function(e,t){var i=this.option.data[e];i.localX=t[0],i.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,i){if("edge"===i){var r=this.getDataParams(e,i),n=r.data,o=n.source+" -- "+n.target;return r.value&&(o+=" : "+r.value),a(o)}if("node"===i){var l=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,i).data.name;if(l)o=c+" : "+l;return a(o)}return s.superCall(this,"formatTooltip",e,t)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var i=s.superCall(this,"getDataParams",e,t);if(null==i.value&&"node"===t){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}})),l=s;e.exports=l},function(e,t,i){var r=i(2),n=i(1),a=i(0),o=["itemStyle","opacity"],s=["emphasis","itemStyle","opacity"],l=["lineStyle","opacity"],c=["emphasis","lineStyle","opacity"];function u(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function d(e,t,i){var r=e.getGraphicEl(),n=u(e,t);null!=i&&(null==n&&(n=1),n*=i),r.downplay&&r.downplay(),r.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",n)}))}function h(e,t){var i=u(e,t),r=e.getGraphicEl();r.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",i)})),r.highlight&&r.highlight()}var p=r.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(e,t){var i=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+i,t.y2),e.bezierCurveTo(t.cpx2+i,t.cpy2,t.cpx1+i,t.cpy1,t.x1+i,t.y1)):(e.lineTo(t.x2,t.y2+i),e.bezierCurveTo(t.cpx2,t.cpy2+i,t.cpx1,t.cpy1+i,t.x1,t.y1+i)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}}),f=n.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,i){var n=this,a=e.getGraph(),o=this.group,s=e.layoutInfo,l=s.width,c=s.height,u=e.getData(),d=e.getData("edge"),h=e.get("orient");this._model=e,o.removeAll(),o.attr("position",[s.x,s.y]),a.eachEdge((function(t){var i=new p;i.dataIndex=t.dataIndex,i.seriesIndex=e.seriesIndex,i.dataType="edge";var n,a,s,u,f,m,g,y,_=t.getModel("lineStyle"),v=_.get("curveness"),C=t.node1.getLayout(),x=t.node1.getModel(),b=x.get("localX"),S=x.get("localY"),T=t.node2.getLayout(),E=t.node2.getModel(),w=E.get("localX"),A=E.get("localY"),P=t.getLayout();switch(i.shape.extent=Math.max(1,P.dy),i.shape.orient=h,"vertical"===h?(n=(null!=b?b*l:C.x)+P.sy,a=(null!=S?S*c:C.y)+C.dy,s=(null!=w?w*l:T.x)+P.ty,f=n,m=a*(1-v)+(u=null!=A?A*c:T.y)*v,g=s,y=a*v+u*(1-v)):(n=(null!=b?b*l:C.x)+C.dx,a=(null!=S?S*c:C.y)+P.sy,f=n*(1-v)+(s=null!=w?w*l:T.x)*v,m=a,g=n*v+s*(1-v),y=u=(null!=A?A*c:T.y)+P.ty),i.setShape({x1:n,y1:a,x2:s,y2:u,cpx1:f,cpy1:m,cpx2:g,cpy2:y}),i.setStyle(_.getItemStyle()),i.style.fill){case"source":i.style.fill=t.node1.getVisual("color");break;case"target":i.style.fill=t.node2.getVisual("color")}r.setHoverStyle(i,t.getModel("emphasis.lineStyle").getItemStyle()),o.add(i),d.setItemGraphicEl(t.dataIndex,i)})),a.eachNode((function(t){var i=t.getLayout(),n=t.getModel(),a=n.get("localX"),s=n.get("localY"),d=n.getModel("label"),h=n.getModel("emphasis.label"),p=new r.Rect({shape:{x:null!=a?a*l:i.x,y:null!=s?s*c:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=t.getModel("emphasis.itemStyle").getItemStyle();r.setLabelStyle(p.style,f,d,h,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),p.setStyle("fill",t.getVisual("color")),r.setHoverStyle(p,f),o.add(p),u.setItemGraphicEl(t.dataIndex,p),p.dataType="node"})),u.eachItemGraphicEl((function(t,r){var a=u.getItemModel(r);a.get("draggable")&&(t.drift=function(t,a){n._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(r),localX:this.shape.x/l,localY:this.shape.y/c})},t.ondragend=function(){n._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))})),d.eachItemGraphicEl((function(t,r){var a=d.getItemModel(r);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))})),!this._data&&e.get("animation")&&o.setClipPath(function(e,t,i){var n=new r.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return r.initProps(n,{shape:{width:e.width+20}},t,i),n}(o.getBoundingRect(),e,(function(){o.removeClipPath()}))),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(e){var t=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){t._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,i,r){var n=e.getData(),u=n.graph,p=r.dataIndex,f=n.getItemModel(p),m=r.edgeDataIndex;if(null!=p||null!=m){var g=u.getNodeByIndex(p),y=u.getEdgeByIndex(m);if(u.eachNode((function(e){d(e,o,.1)})),u.eachEdge((function(e){d(e,l,.1)})),g){h(g,s);var _=f.get("focusNodeAdjacency");"outEdges"===_?a.each(g.outEdges,(function(e){e.dataIndex<0||(h(e,c),h(e.node2,s))})):"inEdges"===_?a.each(g.inEdges,(function(e){e.dataIndex<0||(h(e,c),h(e.node1,s))})):"allEdges"===_&&a.each(g.edges,(function(e){e.dataIndex<0||(h(e,c),e.node1!==g&&h(e.node1,s),e.node2!==g&&h(e.node2,s))}))}y&&(h(y,c),h(y.node1,s),h(y.node2,s))}},unfocusNodeAdjacency:function(e,t,i,r){var n=e.getGraph();n.eachNode((function(e){d(e,o)})),n.eachEdge((function(e){d(e,l)}))}});e.exports=f},function(e,t,i){var r=i(1);i(197),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}))},function(e,t,i){var r=i(6),n=i(0),a=i(4).groupData;function o(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function s(e,t,i,r,a){var o="vertical"===a?"x":"y";n.each(e,(function(e){var n,s,l;e.sort((function(e,t){return e.getLayout()[o]-t.getLayout()[o]}));for(var c=0,u=e.length,d="vertical"===a?"dx":"dy",h=0;h<u;h++)(l=c-(s=e[h]).getLayout()[o])>0&&(n=s.getLayout()[o]+l,"vertical"===a?s.setLayout({x:n},!0):s.setLayout({y:n},!0)),c=s.getLayout()[o]+s.getLayout()[d]+t;if((l=c-t-("vertical"===a?r:i))>0)for(n=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:n},!0):s.setLayout({y:n},!0),c=n,h=u-2;h>=0;--h)(l=(s=e[h]).getLayout()[o]+s.getLayout()[d]+t-c)>0&&(n=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:n},!0):s.setLayout({y:n},!0)),c=s.getLayout()[o]}))}function l(e,t,i){n.each(e.slice().reverse(),(function(e){n.each(e,(function(e){if(e.outEdges.length){var r=m(e.outEdges,c,i)/m(e.outEdges,f,i);if(isNaN(r)){var n=e.outEdges.length;r=n?m(e.outEdges,u,i)/n:0}if("vertical"===i){var a=e.getLayout().x+(r-p(e,i))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-p(e,i))*t;e.setLayout({y:o},!0)}}}))}))}function c(e,t){return p(e.node2,t)*e.getValue()}function u(e,t){return p(e.node2,t)}function d(e,t){return p(e.node1,t)*e.getValue()}function h(e,t){return p(e.node1,t)}function p(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function f(e){return e.getValue()}function m(e,t,i){for(var r=0,n=e.length,a=-1;++a<n;){var o=+t.call(e,e[a],i);isNaN(o)||(r+=o)}return r}function g(e,t,i){n.each(e,(function(e){n.each(e,(function(e){if(e.inEdges.length){var r=m(e.inEdges,d,i)/m(e.inEdges,f,i);if(isNaN(r)){var n=e.inEdges.length;r=n?m(e.inEdges,h,i)/n:0}if("vertical"===i){var a=e.getLayout().x+(r-p(e,i))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-p(e,i))*t;e.setLayout({y:o},!0)}}}))}))}e.exports=function(e,t,i){e.eachSeriesByType("sankey",(function(e){var i=e.get("nodeWidth"),c=e.get("nodeGap"),u=function(e,t){return r.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=u;var d=u.width,h=u.height,p=e.getGraph(),y=p.nodes,_=p.edges;!function(e){n.each(e,(function(e){var t=m(e.outEdges,f),i=m(e.inEdges,f),r=e.getValue()||0,n=Math.max(t,i,r);e.setLayout({value:n},!0)}))}(y),function(e,t,i,r,c,u,d,h,p){(function(e,t,i,r,a,s,l){for(var c=[],u=[],d=[],h=[],p=0,f=0;f<t.length;f++)c[f]=1;for(f=0;f<e.length;f++)u[f]=e[f].inEdges.length,0===u[f]&&d.push(e[f]);var m=-1;for(;d.length;){for(var g=0;g<d.length;g++){var y=d[g],_=y.hostGraph.data.getRawDataItem(y.dataIndex),v=null!=_.depth&&_.depth>=0;v&&_.depth>m&&(m=_.depth),y.setLayout({depth:v?_.depth:p},!0),"vertical"===s?y.setLayout({dy:i},!0):y.setLayout({dx:i},!0);for(var C=0;C<y.outEdges.length;C++){var x=y.outEdges[C],b=t.indexOf(x);c[b]=0;var S=x.node2,T=e.indexOf(S);0==--u[T]&&h.indexOf(S)<0&&h.push(S)}}++p,d=h,h=[]}for(f=0;f<c.length;f++)if(1===c[f])throw new Error("Sankey is a DAG, the original data has cycle!");var E=m>p-1?m:p-1;l&&"left"!==l&&function(e,t,i,r){if("right"===t){for(var a=[],s=e,l=0;s.length;){for(var c=0;c<s.length;c++){var u=s[c];u.setLayout({skNodeHeight:l},!0);for(var d=0;d<u.inEdges.length;d++){var h=u.inEdges[d];a.indexOf(h.node1)<0&&a.push(h.node1)}}s=a,a=[],++l}n.each(e,(function(e){o(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){n.each(e,(function(e){o(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,r)}(e,l,0,E);!function(e,t,i){n.each(e,(function(e){var r=e.getLayout().depth*t;"vertical"===i?e.setLayout({y:r},!0):e.setLayout({x:r},!0)}))}(e,"vertical"===s?(a-i)/E:(r-i)/E,s)})(e,t,i,c,u,h,p),function(e,t,i,r,o,c,u){var d=function(e,t){var i=[],r="vertical"===t?"y":"x",o=a(e,(function(e){return e.getLayout()[r]}));return o.keys.sort((function(e,t){return e-t})),n.each(o.keys,(function(e){i.push(o.buckets.get(e))})),i}(e,u);(function(e,t,i,r,a,o){var s=1/0;n.each(e,(function(e){var t=e.length,l=0;n.each(e,(function(e){l+=e.getLayout().value}));var c="vertical"===o?(r-(t-1)*a)/l:(i-(t-1)*a)/l;c<s&&(s=c)})),n.each(e,(function(e){n.each(e,(function(e,t){var i=e.getLayout().value*s;"vertical"===o?(e.setLayout({x:t},!0),e.setLayout({dx:i},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:i},!0))}))})),n.each(t,(function(e){var t=+e.getValue()*s;e.setLayout({dy:t},!0)}))})(d,t,i,r,o,u),s(d,o,i,r,u);for(var h=1;c>0;c--)l(d,h*=.99,u),s(d,o,i,r,u),g(d,h,u),s(d,o,i,r,u)}(e,t,u,c,r,d,h),function(e,t){var i="vertical"===t?"x":"y";n.each(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[i]-t.node2.getLayout()[i]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[i]-t.node1.getLayout()[i]}))})),n.each(e,(function(e){var t=0,i=0;n.each(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),n.each(e.inEdges,(function(e){e.setLayout({ty:i},!0),i+=e.getLayout().dy}))}))}(e,h)}(y,_,i,c,d,h,0!==n.filter(y,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))}},function(e,t,i){var r=i(47),n=i(0);e.exports=function(e,t){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph().nodes;if(t.length){var i=1/0,a=-1/0;n.each(t,(function(e){var t=e.getLayout().value;t<i&&(i=t),t>a&&(a=t)})),n.each(t,(function(t){var n=new r({type:"color",mappingMethod:"linear",dataExtent:[i,a],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),o=t.getModel().get("itemStyle.color");null!=o?t.setVisual("color",o):t.setVisual("color",n)}))}}))}},function(e,t,i){var r=i(1);i(427),i(428);var n=i(429),a=i(430);r.registerVisual(n),r.registerLayout(a)},function(e,t,i){var r=i(0),n=i(14),a=i(203).seriesModelMixin,o=n.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});r.mixin(o,a,!0);var s=o;e.exports=s},function(e,t,i){var r=i(0),n=i(25),a=i(2),o=i(10),s=["itemStyle"],l=["emphasis","itemStyle"],c=n.extend({type:"boxplot",render:function(e,t,i){var r=e.getData(),n=this.group,a=this._data;this._data||n.removeAll();var o="horizontal"===e.get("layout")?1:0;r.diff(a).add((function(e){if(r.hasValue(e)){var t=d(r.getItemLayout(e),r,e,o,!0);r.setItemGraphicEl(e,t),n.add(t)}})).update((function(e,t){var i=a.getItemGraphicEl(t);if(r.hasValue(e)){var s=r.getItemLayout(e);i?h(s,i,r,e):i=d(s,r,e,o),n.add(i),r.setItemGraphicEl(e,i)}else n.remove(i)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&n.remove(t)})).execute(),this._data=r},remove:function(e){var t=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(e){e&&t.remove(e)}))},dispose:r.noop}),u=o.extend({type:"boxplotBoxPath",shape:{},buildPath:function(e,t){var i=t.points,r=0;for(e.moveTo(i[r][0],i[r][1]),r++;r<4;r++)e.lineTo(i[r][0],i[r][1]);for(e.closePath();r<i.length;r++)e.moveTo(i[r][0],i[r][1]),r++,e.lineTo(i[r][0],i[r][1])}});function d(e,t,i,r,n){var a=e.ends,o=new u({shape:{points:n?p(a,r,e):a}});return h(e,o,t,i,n),o}function h(e,t,i,r,n){var o=i.hostModel;(0,a[n?"initProps":"updateProps"])(t,{shape:{points:e.ends}},o,r);var c=i.getItemModel(r),u=c.getModel(s),d=i.getItemVisual(r,"color"),h=u.getItemStyle(["borderColor"]);h.stroke=d,h.strokeNoScale=!0,t.useStyle(h),t.z2=100;var p=c.getModel(l).getItemStyle();a.setHoverStyle(t,p)}function p(e,t,i){return r.map(e,(function(e){return(e=e.slice())[t]=i.initBaseline,e}))}var f=c;e.exports=f},function(e,t){var i=["itemStyle","borderColor"];e.exports=function(e,t){var r=e.get("color");e.eachRawSeriesByType("boxplot",(function(t){var n=r[t.seriesIndex%r.length],a=t.getData();a.setVisual({legendSymbol:"roundRect",color:t.get(i)||n}),e.isSeriesFiltered(t)||a.each((function(e){var t=a.getItemModel(e);a.setItemVisual(e,{color:t.get(i,!0)})}))}))}},function(e,t,i){var r=i(0),n=i(3).parsePercent,a=r.each;e.exports=function(e){var t=function(e){var t=[],i=[];return e.eachSeriesByType("boxplot",(function(e){var n=e.getBaseAxis(),a=r.indexOf(i,n);a<0&&(a=i.length,i[a]=n,t[a]={axis:n,seriesModels:[]}),t[a].seriesModels.push(e)})),t}(e);a(t,(function(e){var t=e.seriesModels;t.length&&(!function(e){var t,i,o=e.axis,s=e.seriesModels,l=s.length,c=e.boxWidthList=[],u=e.boxOffsetList=[],d=[];if("category"===o.type)i=o.getBandWidth();else{var h=0;a(s,(function(e){h=Math.max(h,e.getData().count())})),t=o.getExtent(),Math.abs(t[1]-t[0])}a(s,(function(e){var t=e.get("boxWidth");r.isArray(t)||(t=[t,t]),d.push([n(t[0],i)||0,n(t[1],i)||0])}));var p=.8*i-2,f=p/l*.3,m=(p-f*(l-1))/l,g=m/2-p/2;a(s,(function(e,t){u.push(g),g+=f+m,c.push(Math.min(Math.max(m,d[t][0]),d[t][1]))}))}(e),a(t,(function(t,i){!function(e,t,i){var r=e.coordinateSystem,n=e.getData(),a=i/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],c=n.mapDimension(l[o]),u=n.mapDimension(l[s],!0);if(null==c||u.length<5)return;for(var d=0;d<n.count();d++){var h=n.get(c,d),p=v(h,u[2],d),f=v(h,u[0],d),m=v(h,u[1],d),g=v(h,u[3],d),y=v(h,u[4],d),_=[];C(_,m,0),C(_,g,1),_.push(f,m,y,g),x(_,f),x(_,y),x(_,p),n.setItemLayout(d,{initBaseline:p[s],ends:_})}function v(e,i,a){var l,c=n.get(i,a),u=[];return u[o]=e,u[s]=c,isNaN(e)||isNaN(c)?l=[NaN,NaN]:(l=r.dataToPoint(u))[o]+=t,l}function C(e,t,i){var r=t.slice(),n=t.slice();r[o]+=a,n[o]-=a,i?e.push(r,n):e.push(n,r)}function x(e,t){var i=t.slice(),r=t.slice();i[o]-=a,r[o]+=a,e.push(i,r)}}(t,e.boxOffsetList[i],e.boxWidthList[i])})))}))}},function(e,t,i){var r=i(1);i(432),i(433);var n=i(434),a=i(435),o=i(436);r.registerPreprocessor(n),r.registerVisual(a),r.registerLayout(o)},function(e,t,i){var r=i(0),n=i(14),a=i(203).seriesModelMixin,o=n.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(e,t,i){var r=t.getItemLayout(e);return r&&i.rect(r.brushRect)}});r.mixin(o,a,!0);var s=o;e.exports=s},function(e,t,i){var r=i(0),n=i(25),a=i(2),o=i(10),s=i(68).createClipPath,l=["itemStyle"],c=["emphasis","itemStyle"],u=["color","color0","borderColor","borderColor0"],d=n.extend({type:"candlestick",render:function(e,t,i){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},incrementalPrepareRender:function(e,t,i){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,i,r){this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e){var t=e.getData(),i=this._data,r=this.group,n=t.getLayout("isSimpleBox"),o=e.get("clip",!0),s=e.coordinateSystem,l=s.getArea&&s.getArea();this._data||r.removeAll(),t.diff(i).add((function(i){if(t.hasValue(i)){var s,c=t.getItemLayout(i);if(o&&f(l,c))return;s=p(c,i,!0),a.initProps(s,{shape:{points:c.ends}},e,i),m(s,t,i,n),r.add(s),t.setItemGraphicEl(i,s)}})).update((function(s,c){var u=i.getItemGraphicEl(c);if(t.hasValue(s)){var d=t.getItemLayout(s);o&&f(l,d)?r.remove(u):(u?a.updateProps(u,{shape:{points:d.ends}},e,s):u=p(d,s),m(u,t,s,n),r.add(u),t.setItemGraphicEl(s,u))}else r.remove(u)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&r.remove(t)})).execute(),this._data=t},_renderLarge:function(e){this._clear(),_(e,this.group);var t=e.get("clip",!0)?s(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},_incrementalRenderNormal:function(e,t){for(var i,r=t.getData(),n=r.getLayout("isSimpleBox");null!=(i=e.next());){var a;m(a=p(r.getItemLayout(i),i),r,i,n),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(e,t){_(t,this.group,!0)},remove:function(e){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:r.noop}),h=o.extend({type:"normalCandlestickBox",shape:{},buildPath:function(e,t){var i=t.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))}});function p(e,t,i){var r=e.ends;return new h({shape:{points:i?g(r,e):r},z2:100})}function f(e,t){for(var i=!0,r=0;r<t.ends.length;r++)if(e.contain(t.ends[r][0],t.ends[r][1])){i=!1;break}return i}function m(e,t,i,r){var n=t.getItemModel(i),o=n.getModel(l),s=t.getItemVisual(i,"color"),d=t.getItemVisual(i,"borderColor")||s,h=o.getItemStyle(u);e.useStyle(h),e.style.strokeNoScale=!0,e.style.fill=s,e.style.stroke=d,e.__simpleBox=r;var p=n.getModel(c).getItemStyle();a.setHoverStyle(e,p)}function g(e,t){return r.map(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}var y=o.extend({type:"largeCandlestickBox",shape:{},buildPath:function(e,t){for(var i=t.points,r=0;r<i.length;)if(this.__sign===i[r++]){var n=i[r++];e.moveTo(n,i[r++]),e.lineTo(n,i[r++])}else r+=3}});function _(e,t,i){var r=e.getData(),n=r.getLayout("largePoints"),a=new y({shape:{points:n},__sign:1});t.add(a);var o=new y({shape:{points:n},__sign:-1});t.add(o),v(1,a,e,r),v(-1,o,e,r),i&&(a.incremental=!0,o.incremental=!0)}function v(e,t,i,r){var n=e>0?"P":"N",a=r.getVisual("borderColor"+n)||r.getVisual("color"+n),o=i.getModel(l).getItemStyle(u);t.useStyle(o),t.style.fill=null,t.style.stroke=a}var C=d;e.exports=C},function(e,t,i){var r=i(0);e.exports=function(e){e&&r.isArray(e.series)&&r.each(e.series,(function(e){r.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))}},function(e,t,i){var r=i(51),n=["itemStyle","borderColor"],a=["itemStyle","borderColor0"],o=["itemStyle","color"],s=["itemStyle","color0"],l={seriesType:"candlestick",plan:r(),performRawSeries:!0,reset:function(e,t){if(e.getData().setVisual({legendSymbol:"roundRect",colorP:i(1,e),colorN:i(-1,e),borderColorP:r(1,e),borderColorN:r(-1,e)}),!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){var n;for(;null!=(n=e.next());){var a=t.getItemModel(n),o=t.getItemLayout(n).sign;t.setItemVisual(n,{color:i(o,a),borderColor:r(o,a)})}}};function i(e,t){return t.get(e>0?o:s)}function r(e,t){return t.get(e>0?n:a)}}};e.exports=l},function(e,t,i){var r=i(2).subPixelOptimize,n=i(51),a=i(3).parsePercent,o=i(0).retrieve2,s="undefined"!=typeof Float32Array?Float32Array:Array,l={seriesType:"candlestick",plan:n(),reset:function(e){var t=e.coordinateSystem,i=e.getData(),n=function(e,t){var i,r=e.getBaseAxis(),n="category"===r.type?r.getBandWidth():(i=r.getExtent(),Math.abs(i[1]-i[0])/t.count()),s=a(o(e.get("barMaxWidth"),n),n),l=a(o(e.get("barMinWidth"),1),n),c=e.get("barWidth");return null!=c?a(c,n):Math.max(Math.min(n/2,s),l)}(e,i),l=["x","y"],u=i.mapDimension(l[0]),d=i.mapDimension(l[1],!0),h=d[0],p=d[1],f=d[2],m=d[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==u||d.length<4))return{progress:e.pipelineContext.large?function(e,i){var r,n,a=new s(4*e.count),o=0,l=[],d=[];for(;null!=(n=e.next());){var g=i.get(u,n),y=i.get(h,n),_=i.get(p,n),v=i.get(f,n),C=i.get(m,n);isNaN(g)||isNaN(v)||isNaN(C)?(a[o++]=NaN,o+=3):(a[o++]=c(i,n,y,_,p),l[0]=g,l[1]=v,r=t.dataToPoint(l,null,d),a[o++]=r?r[0]:NaN,a[o++]=r?r[1]:NaN,l[1]=C,r=t.dataToPoint(l,null,d),a[o++]=r?r[1]:NaN)}i.setLayout("largePoints",a)}:function(e,i){var a;for(;null!=(a=e.next());){var o=i.get(u,a),s=i.get(h,a),l=i.get(p,a),d=i.get(f,a),g=i.get(m,a),y=Math.min(s,l),_=Math.max(s,l),v=T(y,o),C=T(_,o),x=T(d,o),b=T(g,o),S=[];E(S,C,0),E(S,v,1),S.push(A(b),A(C),A(x),A(v)),i.setItemLayout(a,{sign:c(i,a,s,l,p),initBaseline:s>l?C[1]:v[1],ends:S,brushRect:w(d,g,o)})}function T(e,i){var r=[];return r[0]=i,r[1]=e,isNaN(i)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function E(e,t,i){var a=t.slice(),o=t.slice();a[0]=r(a[0]+n/2,1,!1),o[0]=r(o[0]-n/2,1,!0),i?e.push(a,o):e.push(o,a)}function w(e,t,i){var r=T(e,i),a=T(t,i);return r[0]-=n/2,a[0]-=n/2,{x:r[0],y:r[1],width:n,height:a[1]-r[1]}}function A(e){return e[0]=r(e[0],1),e}}}}};function c(e,t,i,r,n){return i>r?-1:i<r?1:t>0?e.get(n,t-1)<=r?1:-1:1}e.exports=l},function(e,t,i){var r=i(1);i(438),i(439);var n=i(44),a=i(69);r.registerVisual(n("effectScatter","circle")),r.registerLayout(a("effectScatter"))},function(e,t,i){var r=i(30),n=i(14).extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return r(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});e.exports=n},function(e,t,i){var r=i(1),n=i(67),a=i(440),o=i(15),s=i(69),l=r.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new n(a)},render:function(e,t,i){var r=e.getData(),n=this._symbolDraw;n.updateData(r),this.group.add(n.group)},updateTransform:function(e,t,i){var r=e.getData();this.group.dirty();var n=s().reset(e);n.progress&&n.progress({start:0,end:r.count()},r),this._symbolDraw.updateLayout(r)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=o.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}});e.exports=l},function(e,t,i){var r=i(0),n=i(19).createSymbol,a=i(2).Group,o=i(3).parsePercent,s=i(87);function l(e,t){var i=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?i:null,fill:"fill"===t.brushType?i:null}})}))}function c(e,t){a.call(this);var i=new s(e,t),r=new a;this.add(i),this.add(r),r.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(e,t)}var u=c.prototype;u.stopEffectAnimation=function(){this.childAt(1).removeAll()},u.startEffectAnimation=function(e){for(var t=e.symbolType,i=e.color,r=this.childAt(1),a=0;a<3;a++){var o=n(t,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var s=-a/3*e.period+e.effectOffset;o.animate("",!0).when(e.period,{scale:[e.rippleScale/2,e.rippleScale/2]}).delay(s).start(),o.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),r.add(o)}l(r,e)},u.updateEffectAnimation=function(e){for(var t=this._effectCfg,i=this.childAt(1),r=["symbolType","period","rippleScale"],n=0;n<r.length;n++){var a=r[n];if(t[a]!==e[a])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}l(i,e)},u.highlight=function(){this.trigger("emphasis")},u.downplay=function(){this.trigger("normal")},u.updateData=function(e,t){var i=e.hostModel;this.childAt(0).updateData(e,t);var n=this.childAt(1),a=e.getItemModel(t),s=e.getItemVisual(t,"symbol"),l=function(e){return r.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),c=e.getItemVisual(t,"color");n.attr("scale",l),n.traverse((function(e){e.attr({fill:c})}));var u=a.getShallow("symbolOffset");if(u){var d=n.position;d[0]=o(u[0],l[0]),d[1]=o(u[1],l[1])}var h=e.getItemVisual(t,"symbolRotate");n.rotation=(h||0)*Math.PI/180||0;var p={};if(p.showEffectOn=i.get("showEffectOn"),p.rippleScale=a.get("rippleEffect.scale"),p.brushType=a.get("rippleEffect.brushType"),p.period=1e3*a.get("rippleEffect.period"),p.effectOffset=t/e.count(),p.z=a.getShallow("z")||0,p.zlevel=a.getShallow("zlevel")||0,p.symbolType=s,p.color=c,p.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===p.showEffectOn)this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p;else{this._effectCfg=null,this.stopEffectAnimation();var f=this.childAt(0),m=function(){f.highlight(),"render"!==p.showEffectOn&&this.startEffectAnimation(p)},g=function(){f.downplay(),"render"!==p.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",m,this).on("mouseout",g,this).on("emphasis",m,this).on("normal",g,this)}this._effectCfg=p},u.fadeOut=function(e){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),e&&e()},r.inherits(c,a);var d=c;e.exports=d},function(e,t,i){var r=i(1);i(442),i(443);var n=i(206),a=i(446);r.registerLayout(n),r.registerVisual(a)},function(e,t,i){i(5).__DEV__;var r=i(14),n=i(18),a=i(0),o=a.concatArray,s=a.mergeAll,l=a.map,c=i(7).encodeHTML,u=(i(20),"undefined"==typeof Uint32Array?Array:Uint32Array),d="undefined"==typeof Float64Array?Array:Float64Array;function h(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=l(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),s([t,e[0],e[1]])})))}var p=r.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(e){e.data=e.data||[],h(e);var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),p.superApply(this,"init",arguments)},mergeOption:function(e){if(h(e),e.data){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count))}p.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=o(this._flatCoords,t.flatCoords),this._flatCoordsOffset=o(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*e],r=this._flatCoordsOffset[2*e+1],n=0;n<r;n++)t[n]=t[n]||[],t[n][0]=this._flatCoords[i+2*n],t[n][1]=this._flatCoords[i+2*n+1];return r}var a=this._getCoordsFromItemModel(e);for(n=0;n<a.length;n++)t[n]=t[n]||[],t[n][0]=a[n][0],t[n][1]=a[n][1];return a.length},_processFlatCoordsArray:function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),"number"==typeof e[0]){for(var i=e.length,r=new u(i),n=new d(i),a=0,o=0,s=0,l=0;l<i;){s++;var c=e[l++];r[o++]=a+t,r[o++]=c;for(var h=0;h<c;h++){var p=e[l++],f=e[l++];n[a++]=p,n[a++]=f}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,o),flatCoords:n,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var i=new n(["value"],this);return i.hasItemOption=!1,i.initData(e.data,[],(function(e,t,r,n){if(e instanceof Array)return NaN;i.hasItemOption=!0;var a=e.value;return null!=a?a instanceof Array?a[n]:a:void 0})),i},formatTooltip:function(e){var t=this.getData().getItemModel(e),i=t.get("name");if(i)return i;var r=t.get("fromName"),n=t.get("toName"),a=[];return null!=r&&a.push(r),null!=n&&a.push(n),c(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),f=p;e.exports=f},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(118),a=i(204),o=i(119),s=i(205),l=i(444),c=i(445),u=i(206),d=i(68).createClipPath,h=r.extendChartView({type:"lines",init:function(){},render:function(e,t,i){var r=e.getData(),n=this._updateLineDraw(r,e),a=e.get("zlevel"),o=e.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),n.updateData(r);var c=e.get("clip",!0)&&d(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(e,t,i){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(i),this._finished=!1},incrementalRender:function(e,t,i){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,i){var r=e.getData(),n=e.pipelineContext;if(!this._finished||n.large||n.progressiveRender)return{update:!0};var a=u.reset(e);a.progress&&a.progress({start:0,end:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(e,t){var i=this._lineDraw,r=this._showEffect(t),u=!!t.get("polyline"),d=t.pipelineContext.large;return i&&r===this._hasEffet&&u===this._isPolyline&&d===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=d?new c:new n(u?r?l:s:r?a:o),this._hasEffet=r,this._isPolyline=u,this._isLargeDraw=d,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(e){return!!e.get("effect.show")},_clearLayer:function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},dispose:function(){}});e.exports=h},function(e,t,i){var r=i(205),n=i(0),a=i(204),o=i(8);function s(e,t,i){a.call(this,e,t,i),this._lastFrame=0,this._lastFramePercent=0}var l=s.prototype;l.createLine=function(e,t,i){return new r(e,t,i)},l.updateAnimationPoints=function(e,t){this._points=t;for(var i=[0],r=0,n=1;n<t.length;n++){var a=t[n-1],s=t[n];r+=o.dist(a,s),i.push(r)}if(0!==r){for(n=0;n<i.length;n++)i[n]/=r;this._offsets=i,this._length=r}},l.getLineLength=function(e){return this._length},l.updateSymbolPosition=function(e){var t=e.__t,i=this._points,r=this._offsets,n=i.length;if(r){var a=this._lastFrame;if(t<this._lastFramePercent){for(s=Math.min(a+1,n-1);s>=0&&!(r[s]<=t);s--);s=Math.min(s,n-2)}else{for(var s=a;s<n&&!(r[s]>t);s++);s=Math.min(s-1,n-2)}o.lerp(e.position,i[s],i[s+1],(t-r[s])/(r[s+1]-r[s]));var l=i[s+1][0]-i[s][0],c=i[s+1][1]-i[s][1];e.rotation=-Math.atan2(c,l)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=t,e.ignore=!1}},n.inherits(s,a);var c=s;e.exports=c},function(e,t,i){var r=i(2),n=i(106),a=i(159),o=i(160),s=r.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(e,t){var i=t.segs,r=t.curveness;if(t.polyline)for(var n=0;n<i.length;){var a=i[n++];if(a>0){e.moveTo(i[n++],i[n++]);for(var o=1;o<a;o++)e.lineTo(i[n++],i[n++])}}else for(n=0;n<i.length;){var s=i[n++],l=i[n++],c=i[n++],u=i[n++];if(e.moveTo(s,l),r>0){var d=(s+c)/2-(l-u)*r,h=(l+u)/2-(c-s)*r;e.quadraticCurveTo(d,h,c,u)}else e.lineTo(c,u)}},findDataIndex:function(e,t){var i=this.shape,r=i.segs,n=i.curveness;if(i.polyline)for(var s=0,l=0;l<r.length;){var c=r[l++];if(c>0)for(var u=r[l++],d=r[l++],h=1;h<c;h++){var p=r[l++],f=r[l++];if(a.containStroke(u,d,p,f))return s}s++}else for(s=0,l=0;l<r.length;){u=r[l++],d=r[l++],p=r[l++],f=r[l++];if(n>0){var m=(u+p)/2-(d-f)*n,g=(d+f)/2-(p-u)*n;if(o.containStroke(u,d,m,g,p,f))return s}else if(a.containStroke(u,d,p,f))return s;s++}return-1}});function l(){this.group=new r.Group}var c=l.prototype;c.isPersistent=function(){return!this._incremental},c.updateData=function(e){this.group.removeAll();var t=new s({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},c.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>5e5?(this._incremental||(this._incremental=new n({silent:!0})),this.group.add(this._incremental)):this._incremental=null},c.incrementalUpdate=function(e,t){var i=new s;i.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(i,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=e.start,this.group.add(i))},c.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},c._setCommon=function(e,t,i){var r=t.hostModel;e.setShape({polyline:r.get("polyline"),curveness:r.get("lineStyle.curveness")}),e.useStyle(r.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),i||(e.seriesIndex=r.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i+e.__startIndex)})))},c._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var u=l;e.exports=u},function(e,t){function i(e){return e instanceof Array||(e=[e,e]),e}var r="lineStyle.opacity".split("."),n={seriesType:"lines",reset:function(e,t,n){var a=i(e.get("symbol")),o=i(e.get("symbolSize")),s=e.getData();return s.setVisual("fromSymbol",a&&a[0]),s.setVisual("toSymbol",a&&a[1]),s.setVisual("fromSymbolSize",o&&o[0]),s.setVisual("toSymbolSize",o&&o[1]),s.setVisual("opacity",e.get(r)),{dataEach:s.hasItemOption?function(e,t){var n=e.getItemModel(t),a=i(n.getShallow("symbol",!0)),o=i(n.getShallow("symbolSize",!0)),s=n.get(r);a[0]&&e.setItemVisual(t,"fromSymbol",a[0]),a[1]&&e.setItemVisual(t,"toSymbol",a[1]),o[0]&&e.setItemVisual(t,"fromSymbolSize",o[0]),o[1]&&e.setItemVisual(t,"toSymbolSize",o[1]),e.setItemVisual(t,"opacity",s)}:null}}};e.exports=n},function(e,t,i){i(448),i(449)},function(e,t,i){var r=i(14),n=i(30),a=i(20),o=r.extend({type:"series.heatmap",getInitialData:function(e,t){return n(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=a.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});e.exports=o},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(2),a=i(450),o=i(0);var s=r.extendChartView({type:"heatmap",render:function(e,t,i){var r;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(i){i===e&&(r=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var n=e.coordinateSystem;"cartesian2d"===n.type||"calendar"===n.type?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):function(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}(n)&&this._renderOnGeo(n,e,r,i)},incrementalPrepareRender:function(e,t,i){this.group.removeAll()},incrementalRender:function(e,t,i,r){t.coordinateSystem&&this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,i,r,a){var s,l,c=e.coordinateSystem;if("cartesian2d"===c.type){var u=c.getAxis("x"),d=c.getAxis("y");s=u.getBandWidth(),l=d.getBandWidth()}for(var h=this.group,p=e.getData(),f=e.getModel("itemStyle").getItemStyle(["color"]),m=e.getModel("emphasis.itemStyle").getItemStyle(),g=e.getModel("label"),y=e.getModel("emphasis.label"),_=c.type,v="cartesian2d"===_?[p.mapDimension("x"),p.mapDimension("y"),p.mapDimension("value")]:[p.mapDimension("time"),p.mapDimension("value")],C=i;C<r;C++){var x;if("cartesian2d"===_){if(isNaN(p.get(v[2],C)))continue;var b=c.dataToPoint([p.get(v[0],C),p.get(v[1],C)]);x=new n.Rect({shape:{x:Math.floor(Math.round(b[0])-s/2),y:Math.floor(Math.round(b[1])-l/2),width:Math.ceil(s),height:Math.ceil(l)},style:{fill:p.getItemVisual(C,"color"),opacity:p.getItemVisual(C,"opacity")}})}else{if(isNaN(p.get(v[1],C)))continue;x=new n.Rect({z2:1,shape:c.dataToRect([p.get(v[0],C)]).contentShape,style:{fill:p.getItemVisual(C,"color"),opacity:p.getItemVisual(C,"opacity")}})}var S=p.getItemModel(C);p.hasItemOption&&(f=S.getModel("itemStyle").getItemStyle(["color"]),m=S.getModel("emphasis.itemStyle").getItemStyle(),g=S.getModel("label"),y=S.getModel("emphasis.label"));var T=e.getRawValue(C),E="-";T&&null!=T[2]&&(E=T[2]),n.setLabelStyle(f,m,g,y,{labelFetcher:e,labelDataIndex:C,defaultText:E,isRectText:!0}),x.setStyle(f),n.setHoverStyle(x,p.hasItemOption?m:o.extend({},m)),x.incremental=a,a&&(x.useHoverLayer=!0),h.add(x),p.setItemGraphicEl(C,x)}},_renderOnGeo:function(e,t,i,r){var s=i.targetVisuals.inRange,l=i.targetVisuals.outOfRange,c=t.getData(),u=this._hmLayer||this._hmLayer||new a;u.blurSize=t.get("blurSize"),u.pointSize=t.get("pointSize"),u.minOpacity=t.get("minOpacity"),u.maxOpacity=t.get("maxOpacity");var d=e.getViewRect().clone(),h=e.getRoamTransform();d.applyTransform(h);var p=Math.max(d.x,0),f=Math.max(d.y,0),m=Math.min(d.width+d.x,r.getWidth()),g=Math.min(d.height+d.y,r.getHeight()),y=m-p,_=g-f,v=[c.mapDimension("lng"),c.mapDimension("lat"),c.mapDimension("value")],C=c.mapArray(v,(function(t,i,r){var n=e.dataToPoint([t,i]);return n[0]-=p,n[1]-=f,n.push(r),n})),x=i.getExtent(),b="visualMap.continuous"===i.type?function(e,t){var i=e[1]-e[0];return t=[(t[0]-e[0])/i,(t[1]-e[0])/i],function(e){return e>=t[0]&&e<=t[1]}}(x,i.option.range):function(e,t,i){var r=e[1]-e[0],n=(t=o.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}}))).length,a=0;return function(e){for(var r=a;r<n;r++){if((o=t[r].interval)[0]<=e&&e<=o[1]){a=r;break}}if(r===n)for(r=a-1;r>=0;r--){var o;if((o=t[r].interval)[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r<n&&i[r]}}(x,i.getPieceList(),i.option.selected);u.update(C,y,_,s.color.getNormalizer(),{inRange:s.color.getColorMapper(),outOfRange:l.color.getColorMapper()},b);var S=new n.Image({style:{width:y,height:_,x:p,y:f,image:u.canvas},silent:!0});this.group.add(S)},dispose:function(){}});e.exports=s},function(e,t,i){var r=i(0);function n(){var e=r.createCanvas();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}n.prototype={update:function(e,t,i,r,n,a){var o=this._getBrush(),s=this._getGradient(e,n,"inRange"),l=this._getGradient(e,n,"outOfRange"),c=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext("2d"),h=e.length;u.width=t,u.height=i;for(var p=0;p<h;++p){var f=e[p],m=f[0],g=f[1],y=r(f[2]);d.globalAlpha=y,d.drawImage(o,m-c,g-c)}if(!u.width||!u.height)return u;for(var _=d.getImageData(0,0,u.width,u.height),v=_.data,C=0,x=v.length,b=this.minOpacity,S=this.maxOpacity-b;C<x;){y=v[C+3]/256;var T=4*Math.floor(255*y);if(y>0){var E=a(y)?s:l;y>0&&(y=y*S+b),v[C++]=E[T],v[C++]=E[T+1],v[C++]=E[T+2],v[C++]=E[T+3]*y*256}else C+=4}return d.putImageData(_,0,0),u},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=r.createCanvas()),t=this.pointSize+this.blurSize,i=2*t;e.width=i,e.height=i;var n=e.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),e},_getGradient:function(e,t,i){for(var r=this._gradientPixels,n=r[i]||(r[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[i](s/255,!0,a),n[o++]=a[0],n[o++]=a[1],n[o++]=a[2],n[o++]=a[3];return n}};var a=n;e.exports=a},function(e,t,i){var r=i(1),n=i(0);i(111),i(452),i(453);var a=i(86).layout,o=i(44);i(70),r.registerLayout(n.curry(a,"pictorialBar")),r.registerVisual(o("pictorialBar","roundRect"))},function(e,t,i){var r=i(188).extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(e){return e.stack=null,r.superApply(this,"getInitialData",arguments)}}),n=r;e.exports=n},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(19).createSymbol,s=i(3),l=s.parsePercent,c=s.isNumeric,u=i(189).setLabel,d=["itemStyle","borderWidth"],h=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],p=new a.Circle;function f(e,t,i,r){var a=e.getItemLayout(t),o=i.get("symbolRepeat"),s=i.get("symbolClip"),u=i.get("symbolPosition")||"start",h=(i.get("symbolRotate")||0)*Math.PI/180||0,f=i.get("symbolPatternSize")||2,g=i.isAnimationEnabled(),y={dataIndex:t,layout:a,itemModel:i,symbolType:e.getItemVisual(t,"symbol")||"circle",color:e.getItemVisual(t,"color"),symbolClip:s,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:h,animationModel:g?i:null,hoverAnimation:g&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(e,t,i,r,a){var o,s=r.valueDim,l=e.get("symbolBoundingData"),c=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),u=c.toGlobalCoord(c.dataToCoord(0)),d=1-+(i[s.wh]<=0);if(n.isArray(l)){var h=[m(c,l[0])-u,m(c,l[1])-u];h[1]<h[0]&&h.reverse(),o=h[d]}else o=null!=l?m(c,l)-u:t?r.coordSysExtent[s.index][d]-u:i[s.wh];a.boundingLength=o,t&&(a.repeatCutLength=i[s.wh]);a.pxSign=o>0?1:o<0?-1:0}(i,o,a,r,y),function(e,t,i,r,a,o,s,c,u,d){var h=u.valueDim,p=u.categoryDim,f=Math.abs(i[p.wh]),m=e.getItemVisual(t,"symbolSize");n.isArray(m)?m=m.slice():(null==m&&(m="100%"),m=[m,m]);m[p.index]=l(m[p.index],f),m[h.index]=l(m[h.index],r?f:Math.abs(o)),d.symbolSize=m,(d.symbolScale=[m[0]/c,m[1]/c])[h.index]*=(u.isHorizontal?-1:1)*s}(e,t,a,o,0,y.boundingLength,y.pxSign,f,r,y),function(e,t,i,r,n){var a=e.get(d)||0;a&&(p.attr({scale:t.slice(),rotation:i}),p.updateTransform(),a/=p.getLineScale(),a*=t[r.valueDim.index]);n.valueLineWidth=a}(i,y.symbolScale,h,r,y);var _=y.symbolSize,v=i.get("symbolOffset");return n.isArray(v)&&(v=[l(v[0],_[0]),l(v[1],_[1])]),function(e,t,i,r,a,o,s,u,d,h,p,f){var m=p.categoryDim,g=p.valueDim,y=f.pxSign,_=Math.max(t[g.index]+u,0),v=_;if(r){var C=Math.abs(d),x=n.retrieve(e.get("symbolMargin"),"15%")+"",b=!1;x.lastIndexOf("!")===x.length-1&&(b=!0,x=x.slice(0,x.length-1)),x=l(x,t[g.index]);var S=Math.max(_+2*x,0),T=b?0:2*x,E=c(r),w=E?r:I((C+T)/S);S=_+2*(x=(C-w*_)/2/(b?w:w-1)),T=b?0:2*x,E||"fixed"===r||(w=h?I((Math.abs(h)+T)/S):0),v=w*S-T,f.repeatTimes=w,f.symbolMargin=x}var A=y*(v/2),P=f.pathPosition=[];P[m.index]=i[m.wh]/2,P[g.index]="start"===s?A:"end"===s?d-A:d/2,o&&(P[0]+=o[0],P[1]+=o[1]);var D=f.bundlePosition=[];D[m.index]=i[m.xy],D[g.index]=i[g.xy];var M=f.barRectShape=n.extend({},i);M[g.wh]=y*Math.max(Math.abs(i[g.wh]),Math.abs(P[g.index]+A)),M[m.wh]=i[m.wh];var R=f.clipShape={};R[m.xy]=-i[m.xy],R[m.wh]=p.ecSize[m.wh],R[g.xy]=0,R[g.wh]=i[g.wh]}(i,_,a,o,0,v,u,y.valueLineWidth,y.boundingLength,y.repeatCutLength,r,y),y}function m(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function g(e){var t=e.symbolPatternSize,i=o(e.symbolType,-t/2,-t/2,t,t,e.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function y(e,t,i,r){var n=e.__pictorialBundle,a=i.symbolSize,o=i.valueLineWidth,s=i.pathPosition,l=t.valueDim,c=i.repeatTimes||0,u=0,d=a[t.valueDim.index]+o+2*i.symbolMargin;for(P(e,(function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=c,u<c?D(e,null,f(u),i,r):D(e,null,{scale:[0,0]},i,r,(function(){n.remove(e)})),T(e,i),u++}));u<c;u++){var h=g(i);h.__pictorialAnimationIndex=u,h.__pictorialRepeatTimes=c,n.add(h);var p=f(u);D(h,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},i,r),h.on("mouseover",m).on("mouseout",y),T(h,i)}function f(e){var t=s.slice(),r=i.pxSign,n=e;return("start"===i.symbolRepeatDirection?r>0:r<0)&&(n=c-1-e),t[l.index]=d*(n-c/2+.5)+s[l.index],{position:t,scale:i.symbolScale.slice(),rotation:i.rotation}}function m(){P(e,(function(e){e.trigger("emphasis")}))}function y(){P(e,(function(e){e.trigger("normal")}))}}function _(e,t,i,r){var n=e.__pictorialBundle,a=e.__pictorialMainPath;a?D(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,r):(a=e.__pictorialMainPath=g(i),n.add(a),D(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,r),a.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),T(a,i)}function v(e,t,i){var r=n.extend({},t.barRectShape),o=e.__pictorialBarRect;o?D(o,null,{shape:r},t,i):(o=e.__pictorialBarRect=new a.Rect({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(o))}function C(e,t,i,r){if(i.symbolClip){var o=e.__pictorialClipPath,s=n.extend({},i.clipShape),l=t.valueDim,c=i.animationModel,u=i.dataIndex;if(o)a.updateProps(o,{shape:s},c,u);else{s[l.wh]=0,o=new a.Rect({shape:s}),e.__pictorialBundle.setClipPath(o),e.__pictorialClipPath=o;var d={};d[l.wh]=i.clipShape[l.wh],a[r?"updateProps":"initProps"](o,{shape:d},c,u)}}}function x(e,t){var i=e.getItemModel(t);return i.getAnimationDelayParams=b,i.isAnimationEnabled=S,i}function b(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function S(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function T(e,t){e.off("emphasis").off("normal");var i=t.symbolScale.slice();t.hoverAnimation&&e.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function E(e,t,i,r){var n=new a.Group,o=new a.Group;return n.add(o),n.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?y(n,t,i):_(n,0,i),v(n,i,r),C(n,t,i,r),n.__pictorialShapeStr=A(e,i),n.__pictorialSymbolMeta=i,n}function w(e,t,i,r){var o=r.__pictorialBarRect;o&&(o.style.text=null);var s=[];P(r,(function(e){s.push(e)})),r.__pictorialMainPath&&s.push(r.__pictorialMainPath),r.__pictorialClipPath&&(i=null),n.each(s,(function(e){a.updateProps(e,{scale:[0,0]},i,t,(function(){r.parent&&r.parent.remove(r)}))})),e.setItemGraphicEl(t,null)}function A(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function P(e,t,i){n.each(e.__pictorialBundle.children(),(function(r){r!==e.__pictorialBarRect&&t.call(i,r)}))}function D(e,t,i,r,n,o){t&&e.attr(t),r.symbolClip&&!n?i&&e.attr(i):i&&a[n?"updateProps":"initProps"](e,i,r.animationModel,r.dataIndex,o)}function M(e,t,i){var r=i.color,o=i.dataIndex,s=i.itemModel,l=s.getModel("itemStyle").getItemStyle(["color"]),c=s.getModel("emphasis.itemStyle").getItemStyle(),d=s.getShallow("cursor");P(e,(function(e){e.setColor(r),e.setStyle(n.defaults({fill:r,opacity:i.opacity},l)),a.setHoverStyle(e,c),d&&(e.cursor=d),e.z2=i.z2}));var h={},p=t.valueDim.posDesc[+(i.boundingLength>0)],f=e.__pictorialBarRect;u(f.style,h,s,r,t.seriesModel,o,p),a.setHoverStyle(f,h)}function I(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var R=r.extendChartView({type:"pictorialBar",render:function(e,t,i){var r=this.group,n=e.getData(),o=this._data,s=e.coordinateSystem,l=!!s.getBaseAxis().isHorizontal(),c=s.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:e,coordSys:s,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:l,valueDim:h[+l],categoryDim:h[1-l]};return n.diff(o).add((function(e){if(n.hasValue(e)){var t=x(n,e),i=f(n,e,t,u),a=E(n,u,i);n.setItemGraphicEl(e,a),r.add(a),M(a,u,i)}})).update((function(e,t){var i=o.getItemGraphicEl(t);if(n.hasValue(e)){var s=x(n,e),l=f(n,e,s,u),c=A(n,l);i&&c!==i.__pictorialShapeStr&&(r.remove(i),n.setItemGraphicEl(e,null),i=null),i?function(e,t,i){var r=i.animationModel,n=i.dataIndex,o=e.__pictorialBundle;a.updateProps(o,{position:i.bundlePosition.slice()},r,n),i.symbolRepeat?y(e,t,i,!0):_(e,t,i,!0);v(e,i,!0),C(e,t,i,!0)}(i,u,l):i=E(n,u,l,!0),n.setItemGraphicEl(e,i),i.__pictorialSymbolMeta=l,r.add(i),M(i,u,l)}else r.remove(i)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&w(o,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=n,this.group},dispose:n.noop,remove:function(e,t){var i=this.group,r=this._data;e.get("animation")?r&&r.eachItemGraphicEl((function(t){w(r,t.dataIndex,e,t)})):i.removeAll()}});e.exports=R},function(e,t,i){var r=i(1);i(207),i(464),i(465);var n=i(466),a=i(467),o=i(72);r.registerLayout(n),r.registerVisual(a),r.registerProcessor(o("themeRiver"))},function(e,t,i){var r=i(456);i(20).register("single",{create:function(e,t){var i=[];return e.eachComponent("singleAxis",(function(n,a){var o=new r(n,e,t);o.name="single_"+a,o.resize(n,t),n.coordinateSystem=o,i.push(o)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:r.prototype.dimensions})},function(e,t,i){var r=i(457),n=i(21),a=i(6).getLayoutRect,o=i(0).each;function s(e,t,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(e,t,i),this.model=e}s.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:s,_init:function(e,t,i){var a=this.dimension,o=new r(a,n.createScaleByModel(e),[0,0],e.get("type"),e.get("position")),s="category"===o.type;o.onBand=s&&e.get("boundaryGap"),o.inverse=e.get("inverse"),o.orient=e.get("orient"),e.axis=o,o.model=e,o.coordinateSystem=this,this._axis=o},update:function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();o(t.mapDimension(this.dimension,!0),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),n.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(e,t){this._rect=a({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var e=this._rect,t=this._axis,i=t.isHorizontal(),r=i?[0,e.width]:[0,e.height],n=t.reverse?1:0;t.setExtent(r[n],r[1-n]),this._updateAxisTransform(t,i?e.x:e.y)},_updateAxisTransform:function(e,t){var i=e.getExtent(),r=i[0]+i[1],n=e.isHorizontal();e.toGlobalCoord=n?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=n?function(e){return e-t}:function(e){return r-e+t}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(e){var t=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},pointToData:function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},dataToPoint:function(e){var t=this.getAxis(),i=this.getRect(),r=[],n="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),r[n]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-n]=0===n?i.y+i.height/2:i.x+i.width/2,r}};var l=s;e.exports=l},function(e,t,i){var r=i(0),n=i(35),a=function(e,t,i,r,a){n.call(this,e,t,i),this.type=r||"value",this.position=a||"bottom",this.orient=null};a.prototype={constructor:a,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},pointToData:function(e,t){return this.coordinateSystem.pointToData(e,t)[0]},toGlobalCoord:null,toLocalCoord:null},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(36),a=i(2),o=i(208),s=i(45),l=i(187),c=l.rectCoordAxisBuildSplitArea,u=l.rectCoordAxisHandleRemove,d=["axisLine","axisTickLabel","axisName"],h=["splitArea","splitLine"],p=s.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,s){var l=this.group;l.removeAll();var c=this._axisGroup;this._axisGroup=new a.Group;var u=o.layout(e),f=new n(e,u);r.each(d,f.add,f),l.add(this._axisGroup),l.add(f.getGroup()),r.each(h,(function(t){e.get(t+".show")&&this["_"+t](e)}),this),a.groupTransition(c,this._axisGroup,e),p.superCall(this,"render",e,t,i,s)},remove:function(){u(this)},_splitLine:function(e){var t=e.axis;if(!t.scale.isBlank()){var i=e.getModel("splitLine"),r=i.getModel("lineStyle"),n=r.get("width"),o=r.get("color");o=o instanceof Array?o:[o];for(var s=e.coordinateSystem.getRect(),l=t.isHorizontal(),c=[],u=0,d=t.getTicksCoords({tickModel:i}),h=[],p=[],f=0;f<d.length;++f){var m=t.toGlobalCoord(d[f].coord);l?(h[0]=m,h[1]=s.y,p[0]=m,p[1]=s.y+s.height):(h[0]=s.x,h[1]=m,p[0]=s.x+s.width,p[1]=m);var g=u++%o.length;c[g]=c[g]||[],c[g].push(new a.Line({subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:{lineWidth:n},silent:!0}))}for(f=0;f<c.length;++f)this.group.add(a.mergePath(c[f],{style:{stroke:o[f%o.length],lineDash:r.getLineDash(n),lineWidth:n},silent:!0}))}},_splitArea:function(e){c(this,this._axisGroup,e,e)}}),f=p;e.exports=f},function(e,t,i){var r=i(0),n=i(13),a=i(88),o=i(53),s=n.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});r.merge(s.prototype,o),a("single",s,(function(e,t){return t.type||(t.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var l=s;e.exports=l},function(e,t,i){var r=i(0),n=i(4).makeInner,a=i(89),o=i(209),s=r.each,l=r.curry,c=n();function u(e,t,i,n,a){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var l=function(e,t){var i=t.axis,r=i.dim,n=e,a=[],o=Number.MAX_VALUE,l=-1;return s(t.seriesModels,(function(t,c){var u,d,h=t.getData().mapDimension(r,!0);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(h,e,i);d=p.dataIndices,u=p.nestestValue}else{if(!(d=t.getData().indicesOfNearest(h[0],e,"category"===i.type?.5:null)).length)return;u=t.getData().get(h[0],d[0])}if(null!=u&&isFinite(u)){var f=e-u,m=Math.abs(f);m<=o&&((m<o||f>=0&&l<0)&&(o=m,l=f,n=u,a.length=0),s(d,(function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:a,snapToValue:n}}(t,e),c=l.payloadBatch,u=l.snapToValue;c[0]&&null==a.seriesIndex&&r.extend(a,c[0]),!n&&e.snap&&o.containData(u)&&null!=u&&(t=u),i.showPointer(e,t,c,a),i.showTooltip(e,l,u)}else i.showPointer(e,t)}function d(e,t,i,r){e[t.key]={value:i,payloadBatch:r}}function h(e,t,i,r){var n=i.payloadBatch,o=t.axis,s=o.model,l=t.axisPointerModel;if(t.triggerTooltip&&n.length){var c=t.coordSys.model,u=a.makeKey(c),d=e.map[u];d||(d=e.map[u]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(d)),d.dataByAxis.push({axisDim:o.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:r,valueLabelOpt:{precision:l.get("label.precision"),formatter:l.get("label.formatter")},seriesDataIndices:n.slice()})}}function p(e){var t=e.axis.model,i={},r=i.axisDim=e.axis.dim;return i.axisIndex=i[r+"AxisIndex"]=t.componentIndex,i.axisName=i[r+"AxisName"]=t.name,i.axisId=i[r+"AxisId"]=t.id,i}function f(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}e.exports=function(e,t,i){var n=e.currTrigger,a=[e.x,e.y],m=e,g=e.dispatchAction||r.bind(i.dispatchAction,i),y=t.getComponent("axisPointer").coordSysAxesInfo;if(y){f(a)&&(a=o({seriesIndex:m.seriesIndex,dataIndex:m.dataIndex},t).point);var _=f(a),v=m.axesInfo,C=y.axesInfo,x="leave"===n||f(a),b={},S={},T={list:[],map:{}},E={showPointer:l(d,S),showTooltip:l(h,T)};s(y.coordSysMap,(function(e,t){var i=_||e.containPoint(a);s(y.coordSysAxesInfo[t],(function(e,t){var r=e.axis,n=function(e,t){for(var i=0;i<(e||[]).length;i++){var r=e[i];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(v,e);if(!x&&i&&(!v||n)){var o=n&&n.value;null!=o||_||(o=r.pointToData(a)),null!=o&&u(e,o,E,!1,b)}}))}));var w={};return s(C,(function(e,t){var i=e.linkGroup;i&&!S[t]&&s(i.axesInfo,(function(t,r){var n=S[r];if(t!==e&&n){var a=n.value;i.mapper&&(a=e.axis.scale.parse(i.mapper(a,p(t),p(e)))),w[e.key]=a}}))})),s(w,(function(e,t){u(C[t],e,E,!0,b)})),function(e,t,i){var r=i.axesInfo=[];s(t,(function(t,i){var n=t.axisPointerModel.option,a=e[i];a?(!t.useHandle&&(n.status="show"),n.value=a.value,n.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(n.status="hide"),"show"===n.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}))}(S,C,b),function(e,t,i,r){if(f(t)||!e.list.length)return void r({type:"hideTip"});var n=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:e.list})}(T,a,e,g),function(e,t,i){var n=i.getZr(),a=c(n).axisPointerLastHighlights||{},o=c(n).axisPointerLastHighlights={};s(e,(function(e,t){var i=e.axisPointerModel.option;"show"===i.status&&s(i.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;o[t]=e}))}));var l=[],u=[];r.each(a,(function(e,t){!o[t]&&u.push(e)})),r.each(o,(function(e,t){!a[t]&&l.push(e)})),u.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:u}),l.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:l})}(C,0,i),b}}},function(e,t,i){var r=i(1).extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});e.exports=r},function(e,t,i){var r=i(1),n=i(210),a=r.extendComponentView({type:"axisPointer",render:function(e,t,i){var r=t.getComponent("tooltip"),a=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";n.register("axisPointer",i,(function(e,t,i){"none"!==a&&("leave"===e||a.indexOf(e)>=0)&&i({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){n.unregister(t.getZr(),"axisPointer"),a.superApply(this._model,"remove",arguments)},dispose:function(e,t){n.unregister("axisPointer",t),a.superApply(this._model,"dispose",arguments)}}),o=a;e.exports=o},function(e,t,i){var r=i(122),n=i(94),a=i(208),o=i(45),s=["x","y"],l=["width","height"],c=r.extend({makeElOption:function(e,t,i,r,o){var s=i.axis,l=s.coordinateSystem,c=h(l,1-d(s)),p=l.dataToPoint(t)[0],f=r.get("type");if(f&&"none"!==f){var m=n.buildElStyle(r),g=u[f](s,p,c);g.style=m,e.graphicKey=g.type,e.pointer=g}var y=a.layout(i);n.buildCartesianSingleLabelElOption(t,e,y,i,r,o)},getHandleTransform:function(e,t,i){var r=a.layout(t,{labelInside:!1});return r.labelMargin=i.get("handle.margin"),{position:n.getTransformedPosition(t.axis,e,r),rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,i,r){var n=i.axis,a=n.coordinateSystem,o=d(n),s=h(a,o),l=e.position;l[o]+=t[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var c=h(a,1-o),u=(c[1]+c[0])/2,p=[u,u];return p[o]=l[o],{position:l,rotation:e.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}}}),u={line:function(e,t,i){return{type:"Line",subPixelOptimize:!0,shape:n.makeLineShape([t,i[0]],[t,i[1]],d(e))}},shadow:function(e,t,i){var r=e.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:n.makeRectShape([t-r/2,i[0]],[r,a],d(e))}}};function d(e){return e.isHorizontal()?0:1}function h(e,t){var i=e.getRect();return[i[s[t]],i[s[t]]+i[l[t]]]}o.registerAxisPointerClass("SingleAxisPointer",c);var p=c;e.exports=p},function(e,t,i){var r=i(14),n=i(52),a=i(66).getDimensionTypeByAxis,o=i(18),s=i(0),l=i(4).groupData,c=i(7).encodeHTML,u=i(71),d=r.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){d.superApply(this,"init",arguments),this.legendVisualProvider=new u(s.bind(this.getData,this),s.bind(this.getRawData,this))},fixData:function(e){var t=e.length,i={},r=l(e,(function(e){return i.hasOwnProperty(e[0])||(i[e[0]]=-1),e[2]})),n=[];r.buckets.each((function(e,t){n.push({name:t,dataList:e})}));for(var a=n.length,o=0;o<a;++o){for(var s=n[o].name,c=0;c<n[o].dataList.length;++c){var u=n[o].dataList[c][0];i[u]=o}for(var u in i)i.hasOwnProperty(u)&&i[u]!==o&&(i[u]=o,e[t]=[],e[t][0]=u,e[t][1]=0,e[t][2]=s,t++)}return e},getInitialData:function(e,t){for(var i=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),r=s.filter(e.data,(function(e){return void 0!==e[2]})),l=this.fixData(r||[]),c=[],u=this.nameMap=s.createHashMap(),d=0,h=0;h<l.length;++h)c.push(l[h][2]),u.get(l[h][2])||(u.set(l[h][2],d),d++);var p=n(l,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:a(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),f=new o(p,this);return f.initData(l),f},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),i=[],r=0;r<t;++r)i[r]=r;var n=e.mapDimension("single"),a=l(i,(function(t){return e.get("name",t)})),o=[];return a.buckets.each((function(t,i){t.sort((function(t,i){return e.get(n,t)-e.get(n,i)})),o.push({name:i,indices:t})})),o},getAxisTooltipData:function(e,t,i){s.isArray(e)||(e=e?[e]:[]);for(var r,n=this.getData(),a=this.getLayerSeries(),o=[],l=a.length,c=0;c<l;++c){for(var u=Number.MAX_VALUE,d=-1,h=a[c].indices.length,p=0;p<h;++p){var f=n.get(e[0],a[c].indices[p]),m=Math.abs(f-t);m<=u&&(r=f,u=m,d=a[c].indices[p])}o.push(d)}return{dataIndices:o,nestestValue:r}},formatTooltip:function(e){var t=this.getData(),i=t.getName(e),r=t.get(t.mapDimension("value"),e);return(isNaN(r)||null==r)&&(r="-"),c(i+" : "+r)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}}),h=d;e.exports=h},function(e,t,i){var r=i(1),n=i(183).Polygon,a=i(2),o=i(0),s=o.bind,l=o.extend,c=i(43),u=r.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,i){var r=e.getData(),o=this.group,u=e.getLayerSeries(),d=r.getLayout("layoutInfo"),h=d.rect,p=d.boundaryGap;function f(e){return e.name}o.attr("position",[0,h.y+p[0]]);var m=new c(this._layersSeries||[],u,f,f),g={};function y(t,i,s){var c=this._layers;if("remove"!==t){for(var d,h,p,f=[],m=[],y=u[i].indices,_=0;_<y.length;_++){var v=r.getItemLayout(y[_]),C=v.x,x=v.y0,b=v.y;f.push([C,x]),m.push([C,x+b]),d=r.getItemVisual(y[_],"color")}var S=r.getItemLayout(y[0]),T=r.getItemModel(y[_-1]),E=T.getModel("label"),w=E.get("margin");if("add"===t){var A=g[i]=new a.Group;h=new n({shape:{points:f,stackedOnPoints:m,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),p=new a.Text({style:{x:S.x-w,y:S.y0+S.y/2}}),A.add(h),A.add(p),o.add(A),h.setClipPath(function(e,t,i){var r=new a.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return a.initProps(r,{shape:{width:e.width+20,height:e.height+20}},t,i),r}(h.getBoundingRect(),e,(function(){h.removeClipPath()})))}else{A=c[s];h=A.childAt(0),p=A.childAt(1),o.add(A),g[i]=A,a.updateProps(h,{shape:{points:f,stackedOnPoints:m}},e),a.updateProps(p,{style:{x:S.x-w,y:S.y0+S.y/2}},e)}var P=T.getModel("emphasis.itemStyle"),D=T.getModel("itemStyle");a.setTextStyle(p.style,E,{text:E.get("show")?e.getFormattedLabel(y[_-1],"normal")||r.getName(y[_-1]):null,textVerticalAlign:"middle"}),h.setStyle(l({fill:d},D.getItemStyle(["color"]))),a.setHoverStyle(h,P.getItemStyle())}else o.remove(c[i])}m.add(s(y,this,"add")).update(s(y,this,"update")).remove(s(y,this,"remove")).execute(),this._layersSeries=u,this._layers=g},dispose:function(){}});e.exports=u},function(e,t,i){var r=i(0),n=i(3);function a(e,t,i){if(e.count())for(var n,a=t.coordinateSystem,o=t.getLayerSeries(),s=e.mapDimension("single"),l=e.mapDimension("value"),c=r.map(o,(function(t){return r.map(t.indices,(function(t){var i=a.dataToPoint(e.get(s,t));return i[1]=e.get(l,t),i}))})),u=function(e){for(var t=e.length,i=e[0].length,r=[],n=[],a=0,o={},s=0;s<i;++s){for(var l=0,c=0;l<t;++l)c+=e[l][s][1];c>a&&(a=c),r.push(c)}for(var u=0;u<i;++u)n[u]=(a-r[u])/2;a=0;for(var d=0;d<i;++d){var h=r[d]+n[d];h>a&&(a=h)}return o.y0=n,o.max=a,o}(c),d=u.y0,h=i/u.max,p=o.length,f=o[0].indices.length,m=0;m<f;++m){n=d[m]*h,e.setItemLayout(o[0].indices[m],{layerIndex:0,x:c[0][m][0],y0:n,y:c[0][m][1]*h});for(var g=1;g<p;++g)n+=c[g-1][m][1]*h,e.setItemLayout(o[g].indices[m],{layerIndex:g,x:c[g][m][0],y0:n,y:c[g][m][1]*h})}}e.exports=function(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.coordinateSystem,r={},o=i.getRect();r.rect=o;var s=e.get("boundaryGap"),l=i.getAxis();(r.boundaryGap=s,"horizontal"===l.orient)?(s[0]=n.parsePercent(s[0],o.height),s[1]=n.parsePercent(s[1],o.height),a(t,e,o.height-s[0]-s[1])):(s[0]=n.parsePercent(s[0],o.width),s[1]=n.parsePercent(s[1],o.width),a(t,e,o.width-s[0]-s[1]));t.setLayout("layoutInfo",r)}))}},function(e,t,i){var r=i(0).createHashMap;e.exports=function(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.getRawData(),n=e.get("color"),a=r();t.each((function(e){a.set(t.getRawIndex(e),e)})),i.each((function(r){var o=i.getName(r),s=n[(e.nameMap.get(o)-1)%n.length];i.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&t.setItemVisual(l,"color",s)}))}))}},function(e,t,i){var r=i(1),n=i(0);i(469),i(470),i(472);var a=i(90),o=i(473),s=i(72);r.registerVisual(n.curry(a,"sunburst")),r.registerLayout(n.curry(o,"sunburst")),r.registerProcessor(n.curry(s,"sunburst"))},function(e,t,i){var r=i(0),n=i(14),a=i(117),o=i(12),s=i(46).wrapTreePathInfo,l=n.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var i={name:e.name,children:e.data};!function e(t){var i=0;r.each(t.children,(function(t){e(t);var n=t.value;r.isArray(n)&&(n=n[0]),i+=n}));var n=t.value;r.isArray(n)&&(n=n[0]);(null==n||isNaN(n))&&(n=i);n<0&&(n=0);r.isArray(t.value)?t.value[0]=n:t.value=n}(i);var n=r.map(e.levels||[],(function(e){return new o(e,this,t)}),this),s=a.createTree(i,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=s.getNodeByDataIndex(t),r=n[i.depth];return r&&(e.parentModel=r),e}))}));return s.data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=s(i,this),t},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});e.exports=l},function(e,t,i){var r=i(0),n=i(25),a=i(471),o=i(43),s=i(7).windowOpen,l=n.extend({type:"sunburst",init:function(){},render:function(e,t,i,n){var s=this;this.seriesModel=e,this.api=i,this.ecModel=t;var l=e.getData(),c=l.tree.root,u=e.getViewRoot(),d=this.group,h=e.get("renderLabelForZeroData"),p=[];u.eachNode((function(e){p.push(e)}));var f=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function s(e){return e.getId()}function u(r,o){!function(i,r){h||!i||i.getValue()||(i=null);if(i!==c&&r!==c)if(r&&r.piece)i?(r.piece.updateData(!1,i,"normal",e,t),l.setItemGraphicEl(i.dataIndex,r.piece)):function(e){if(!e)return;e.piece&&(d.remove(e.piece),e.piece=null)}(r);else if(i){var n=new a(i,e,t);d.add(n),l.setItemGraphicEl(i.dataIndex,n)}}(null==r?null:i[r],null==o?null:n[o])}new o(n,i,s,s).add(u).update(u).remove(r.curry(u,null)).execute()}(p,f),function(i,r){if(r.depth>0){s.virtualPiece?s.virtualPiece.updateData(!1,i,"normal",e,t):(s.virtualPiece=new a(i,e,t),d.add(s.virtualPiece)),r.piece._onclickEvent&&r.piece.off("click",r.piece._onclickEvent);var n=function(e){s._rootToNode(r.parentNode)};r.piece._onclickEvent=n,s.virtualPiece.on("click",n)}else s.virtualPiece&&(d.remove(s.virtualPiece),s.virtualPiece=null)}(c,u),n&&n.highlight&&n.highlight.piece){var m=e.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(m)}else if(n&&n.unhighlight){var g=this.virtualPiece;!g&&c.children.length&&(g=c.children[0].piece),g&&g.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var e=this,t=function(t){var i=!1;e.seriesModel.getViewRoot().eachNode((function(r){if(!i&&r.piece&&r.piece.childAt(0)===t.target){var n=r.getModel().get("nodeClick");if("rootToNode"===n)e._rootToNode(r);else if("link"===n){var a=r.getModel(),o=a.get("link");if(o){var l=a.get("target",!0)||"_blank";s(o,l)}}i=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},containPoint:function(e,t){var i=t.getData().getItemLayout(0);if(i){var r=e[0]-i.cx,n=e[1]-i.cy,a=Math.sqrt(r*r+n*n);return a<=i.r&&a>=i.r0}}});e.exports=l},function(e,t,i){var r=i(0),n=i(2),a="none",o="ancestor",s="self";function l(e,t,i){n.Group.call(this);var r=new n.Sector({z2:2});r.seriesIndex=t.seriesIndex;var a=new n.Text({z2:4,silent:e.getModel("label").get("silent")});function o(){a.ignore=a.hoverIgnore}function s(){a.ignore=a.normalIgnore}this.add(r),this.add(a),this.updateData(!0,e,"normal",t,i),this.on("emphasis",o).on("normal",s).on("mouseover",o).on("mouseout",s)}var c=l.prototype;c.updateData=function(e,t,i,a,o){this.node=t,t.piece=this,a=a||this._seriesModel,o=o||this._ecModel;var s=this.childAt(0);s.dataIndex=t.dataIndex;var l=t.getModel(),c=t.getLayout(),u=r.extend({},c);u.label=null;var d=function(e,t,i){var n=e.getVisual("color"),a=e.getVisual("visualMeta");a&&0!==a.length||(n=null);var o=e.getModel("itemStyle").get("color");if(o)return o;if(n)return n;if(0===e.depth)return i.option.color[0];var s=i.option.color.length;o=i.option.color[function(e){var t=e;for(;t.depth>1;)t=t.parentNode;var i=e.getAncestors()[0];return r.indexOf(i.children,t)}(e)%s];return o}(t,0,o);!function(e,t,i){t.getData().setItemVisual(e.dataIndex,"color",i)}(t,a,d);var h,p=l.getModel("itemStyle").getItemStyle();if("normal"===i)h=p;else{var f=l.getModel(i+".itemStyle").getItemStyle();h=r.merge(f,p)}h=r.defaults({lineJoin:"bevel",fill:h.fill||d},h),e?(s.setShape(u),s.shape.r=c.r0,n.updateProps(s,{shape:{r:c.r}},a,t.dataIndex),s.useStyle(h)):"object"==typeof h.fill&&h.fill.type||"object"==typeof s.style.fill&&s.style.fill.type?(n.updateProps(s,{shape:u},a),s.useStyle(h)):n.updateProps(s,{shape:u,style:h},a),this._updateLabel(a,d,i);var m=l.getShallow("cursor");if(m&&s.attr("cursor",m),e){var g=a.getShallow("highlightPolicy");this._initEvents(s,t,a,g)}this._seriesModel=a||this._seriesModel,this._ecModel=o||this._ecModel,n.setHoverStyle(this)},c.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(i){var r,n,l;i.piece&&(t.node===i?i.piece.updateData(!1,i,"emphasis"):(r=i,n=t.node,(l=e)!==a&&(l===s?r===n:l===o?r===n||r.isAncestorOf(n):r===n||r.isDescendantOf(n))?i.piece.childAt(0).trigger("highlight"):e!==a&&i.piece.childAt(0).trigger("downplay")))}))},c.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},c.onHighlight=function(){this.updateData(!1,this.node,"highlight")},c.onDownplay=function(){this.updateData(!1,this.node,"downplay")},c._updateLabel=function(e,t,i){var a=this.node.getModel(),o=a.getModel("label"),s="normal"===i||"emphasis"===i?o:a.getModel(i+".label"),l=a.getModel("emphasis.label"),c=s.get("formatter")?i:"normal",u=r.retrieve(e.getFormattedLabel(this.node.dataIndex,c,null,null,"label"),this.node.name);!1===w("show")&&(u="");var d=this.node.getLayout(),h=s.get("minAngle");null==h&&(h=o.get("minAngle")),h=h/180*Math.PI;var p=d.endAngle-d.startAngle;null!=h&&Math.abs(p)<h&&(u="");var f=this.childAt(1);n.setLabelStyle(f.style,f.hoverStyle||{},o,l,{defaultText:s.getShallow("show")?u:null,autoColor:t,useInsideStyle:!0});var m,g=(d.startAngle+d.endAngle)/2,y=Math.cos(g),_=Math.sin(g),v=w("position"),C=w("distance")||0,x=w("align");"outside"===v?(m=d.r+C,x=g>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(m=d.r0+C,g>Math.PI/2&&(x="right")):"right"===x&&(m=d.r-C,g>Math.PI/2&&(x="left")):(m=(d.r+d.r0)/2,x="center"),f.attr("style",{text:u,textAlign:x,textVerticalAlign:w("verticalAlign")||"middle",opacity:w("opacity")});var b=m*y+d.cx,S=m*_+d.cy;f.attr("position",[b,S]);var T=w("rotate"),E=0;function w(e){var t=s.get(e);return null==t?o.get(e):t}"radial"===T?(E=-g)<-Math.PI/2&&(E+=Math.PI):"tangential"===T?(E=Math.PI/2-g)>Math.PI/2?E-=Math.PI:E<-Math.PI/2&&(E+=Math.PI):"number"==typeof T&&(E=T*Math.PI/180),f.attr("rotation",E)},c._initEvents=function(e,t,i,r){e.off("mouseover").off("mouseout").off("emphasis").off("normal");var n=this,a=function(){n.onEmphasis(r)},o=function(){n.onNormal()};i.isAnimationEnabled()&&e.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",(function(){n.onDownplay()})).on("highlight",(function(){n.onHighlight()}))},r.inherits(l,n.Group);var u=l;e.exports=u},function(e,t,i){var r=i(1),n=i(46);r.registerAction({type:"sunburstRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){var r=n.retrieveTargetInfo(e,["sunburstRootToNode"],t);if(r){var a=t.getViewRoot();a&&(e.direction=n.aboveViewRoot(a,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}}))}));r.registerAction({type:"sunburstHighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){var r=n.retrieveTargetInfo(e,["sunburstHighlight"],t);r&&(e.highlight=r.node)}))}));r.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){e.unhighlight=!0}))}))},function(e,t,i){var r=i(3).parsePercent,n=i(0),a=Math.PI/180;function o(e,t){var i=e.children||[];e.children=function(e,t){if("function"==typeof t)return e.sort(t);var i="asc"===t;return e.sort((function(e,t){var r=(e.getValue()-t.getValue())*(i?1:-1);return 0===r?(e.dataIndex-t.dataIndex)*(i?-1:1):r}))}(i,t),i.length&&n.each(e.children,(function(e){o(e,t)}))}e.exports=function(e,t,i,s){t.eachSeriesByType(e,(function(e){var t=e.get("center"),s=e.get("radius");n.isArray(s)||(s=[0,s]),n.isArray(t)||(t=[t,t]);var l=i.getWidth(),c=i.getHeight(),u=Math.min(l,c),d=r(t[0],l),h=r(t[1],c),p=r(s[0],u/2),f=r(s[1],u/2),m=-e.get("startAngle")*a,g=e.get("minAngle")*a,y=e.getData().tree.root,_=e.getViewRoot(),v=_.depth,C=e.get("sort");null!=C&&o(_,C);var x=0;n.each(_.children,(function(e){!isNaN(e.getValue())&&x++}));var b=_.getValue(),S=Math.PI/(b||x)*2,T=_.depth>0,E=_.height-(T?-1:1),w=(f-p)/(E||1),A=e.get("clockwise"),P=e.get("stillShowZeroSum"),D=A?1:-1,M=function(e,t){if(e){var i=t;if(e!==y){var a=e.getValue(),o=0===b&&P?S:a*S;o<g&&(o=g),i=t+D*o;var s=e.depth-v-(T?-1:1),l=p+w*s,c=p+w*(s+1),f=e.getModel();null!=f.get("r0")&&(l=r(f.get("r0"),u/2)),null!=f.get("r")&&(c=r(f.get("r"),u/2)),e.setLayout({angle:o,startAngle:t,endAngle:i,clockwise:A,cx:d,cy:h,r0:l,r:c})}if(e.children&&e.children.length){var m=0;n.each(e.children,(function(e){m+=M(e,t+m)}))}return i-t}};if(T){var I=p,R=p+w,O=2*Math.PI;y.setLayout({angle:O,startAngle:m,endAngle:m+O,clockwise:A,cx:d,cy:h,r0:I,r:R})}M(_,m)}))}},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(2),a=i(110).getDefaultLabel,o=i(30),s=i(86).getLayoutOnAxis,l=i(43),c=i(14),u=i(12),d=i(25),h=i(68).createClipPath,p=i(475),f=i(476),m=i(477),g=i(478),y=i(479),_=n.CACHED_LABEL_STYLE_PROPERTIES,v=["itemStyle"],C=["emphasis","itemStyle"],x=["label"],b=["emphasis","label"],S={cartesian2d:p,geo:f,singleAxis:m,polar:g,calendar:y};function T(e,t,i,r,n){null==i[e]||n||(t[e]=i[e],i[e]=r[e])}function E(e,t,i,o){var l=e.get("renderItem"),c=e.coordinateSystem,u={};c&&(u=c.prepareCustoms?c.prepareCustoms():S[c.type](c));var d,h,p,f,m,g=r.defaults({getWidth:o.getWidth,getHeight:o.getHeight,getZr:o.getZr,getDevicePixelRatio:o.getDevicePixelRatio,value:function(e,i){return null==i&&(i=d),t.get(t.getDimension(e||0),i)},style:function(i,o){null==o&&(o=d),T(o);var s=h.getModel(v).getItemStyle();null!=m&&(s.fill=m);var l=t.getItemVisual(o,"opacity");null!=l&&(s.opacity=l);var c=i?I(i,p):p;return n.setTextStyle(s,c,null,{autoColor:m,isRectText:!0}),s.text=c.getShallow("show")?r.retrieve2(e.getFormattedLabel(o,"normal"),a(t,o)):null,i&&R(s,i),s},styleEmphasis:function(i,o){null==o&&(o=d),T(o);var s=h.getModel(C).getItemStyle(),l=i?I(i,f):f;return n.setTextStyle(s,l,null,{isRectText:!0},!0),s.text=l.getShallow("show")?r.retrieve3(e.getFormattedLabel(o,"emphasis"),e.getFormattedLabel(o,"normal"),a(t,o)):null,i&&R(s,i),s},visual:function(e,i){return null==i&&(i=d),t.getItemVisual(i,e)},barLayout:function(e){if(c.getBaseAxis){var t=c.getBaseAxis();return s(r.defaults({axis:t},e),o)}},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(e){return n.getFont(e,i)}},u.api||{}),y={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:u.coordSys,dataInsideLength:t.count(),encode:w(e.getData())},_=!0;return function(e,i){return d=e,_=!0,l&&l(r.defaults({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:i?i.type:null},y),g)};function T(e){null==e&&(e=d),_&&(h=t.getItemModel(e),p=h.getModel(x),f=h.getModel(b),m=t.getItemVisual(e,"color"),_=!1)}}function w(e){var t={};return r.each(e.dimensions,(function(i,r){var n=e.getDimensionInfo(i);if(!n.isExtraCoord){var a=n.coordDim;(t[a]=t[a]||[])[n.coordDimIndex]=r}})),t}function A(e,t,i,r,n,a){return(e=P(e,t,i,r,n,a,!0))&&a.setItemGraphicEl(t,e),e}function P(e,t,i,a,o,s,c){var u,d=!i,h=(i=i||{}).type,p=i.shape,f=i.style;if(e&&(d||null!=h&&h!==e.__customGraphicType||"path"===h&&((u=p)&&(u.hasOwnProperty("pathData")||u.hasOwnProperty("d")))&&L(p)!==e.__customPathData||"image"===h&&N(f,"image")&&f.image!==e.__customImagePath||"text"===h&&N(p,"text")&&f.text!==e.__customText)&&(o.remove(e),e=null),!d){var m=!e;return!e&&(e=function(e){var t,i=e.type;if("path"===i){var r=e.shape,a=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,o=L(r);(t=n.makePath(o,null,a,r.layout||"center")).__customPathData=o}else if("image"===i)(t=new n.Image({})).__customImagePath=e.style.image;else if("text"===i)(t=new n.Text({})).__customText=e.style.text;else if("group"===i)t=new n.Group;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');t=new(n.getShapeClass(i))}return t.__customGraphicType=i,t.name=e.name,t}(i)),function(e,t,i,a,o,s,l){var c={},u=i.style||{};if(i.shape&&(c.shape=r.clone(i.shape)),i.position&&(c.position=i.position.slice()),i.scale&&(c.scale=i.scale.slice()),i.origin&&(c.origin=i.origin.slice()),i.rotation&&(c.rotation=i.rotation),"image"===e.type&&i.style){var d=c.style={};r.each(["x","y","width","height"],(function(t){T(t,d,u,e.style,s)}))}if("text"===e.type&&i.style){d=c.style={};r.each(["x","y"],(function(t){T(t,d,u,e.style,s)})),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==e.type&&(e.useStyle(u),s)){e.style.opacity=0;var h=u.opacity;null==h&&(h=1),n.initProps(e,{style:{opacity:h}},a,t)}s?e.attr(c):n.updateProps(e,c,a,t),i.hasOwnProperty("z2")&&e.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&e.attr("silent",i.silent),i.hasOwnProperty("invisible")&&e.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&e.attr("ignore",i.ignore),i.hasOwnProperty("info")&&e.attr("info",i.info);var p=i.styleEmphasis;n.setElementHoverStyle(e,p),l&&n.setAsHighDownDispatcher(e,!1!==p)}(e,t,i,a,0,m,c),"group"===h&&function(e,t,i,r,n){var a=i.children,o=a?a.length:0,s=i.$mergeChildren,c="byName"===s||i.diffChildrenByName,u=!1===s;if(!o&&!c&&!u)return;if(c)return d={oldChildren:e.children()||[],newChildren:a||[],dataIndex:t,animatableModel:r,group:e,data:n},void new l(d.oldChildren,d.newChildren,D,D,d).add(M).update(M).remove(O).execute();var d;u&&e.removeAll();for(var h=0;h<o;h++)a[h]&&P(e.childAt(h),t,a[h],r,e,n)}(e,t,i,a,s),o.add(e),e}}function D(e,t){var i=e&&e.name;return null!=i?i:"e\0\0"+t}function M(e,t){var i=this.context,r=null!=e?i.newChildren[e]:null;P(null!=t?i.oldChildren[t]:null,i.dataIndex,r,i.animatableModel,i.group,i.data)}function I(e,t){var i=new u({},t);return r.each(_,(function(t,r){e.hasOwnProperty(t)&&(i.option[r]=e[t])})),i}function R(e,t){for(var i in t)!t.hasOwnProperty(i)&&_.hasOwnProperty(i)||(e[i]=t[i])}function O(e){var t=this.context,i=t.oldChildren[e];i&&t.group.remove(i)}function L(e){return e&&(e.pathData||e.d)}function N(e,t){return e&&e.hasOwnProperty(t)}c.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(e,t){return o(this.getSource(),this)},getDataParams:function(e,t,i){var r=c.prototype.getDataParams.apply(this,arguments);return i&&(r.info=i.info),r}}),d.extend({type:"custom",_data:null,render:function(e,t,i,r){var n=this._data,a=e.getData(),o=this.group,s=E(e,a,t,i);a.diff(n).add((function(t){A(null,t,s(t,r),e,o,a)})).update((function(t,i){A(n.getItemGraphicEl(i),t,s(t,r),e,o,a)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&o.remove(t)})).execute();var l=e.get("clip",!0)?h(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=a},incrementalPrepareRender:function(e,t,i){this.group.removeAll(),this._data=null},incrementalRender:function(e,t,i,r,n){var a=t.getData(),o=E(t,a,i,r);function s(e){e.isGroup||(e.incremental=!0,e.useHoverLayer=!0)}for(var l=e.start;l<e.end;l++){A(null,l,o(l,n),t,this.group,a).traverse(s)}},dispose:r.noop,filterForExposedEvent:function(e,t,i,r){var n=t.element;if(null==n||i.name===n)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===n)return!0;return!1}})},function(e,t,i){var r=i(0);function n(e,t){return t=t||[0,0],r.map(["x","y"],(function(i,r){var n=this.getAxis(i),a=t[r],o=e[r]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(a-o)-n.dataToCoord(a+o))}),this)}e.exports=function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:r.bind(n,e)}}}},function(e,t,i){var r=i(0);function n(e,t){return t=t||[0,0],r.map([0,1],(function(i){var r=t[i],n=e[i]/2,a=[],o=[];return a[i]=r-n,o[i]=r+n,a[1-i]=o[1-i]=t[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(o)[i])}),this)}e.exports=function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:r.bind(n,e)}}}},function(e,t,i){var r=i(0);function n(e,t){var i=this.getAxis(),r=t instanceof Array?t[0]:t,n=(e instanceof Array?e[0]:e)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(r-n)-i.dataToCoord(r+n))}e.exports=function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:r.bind(n,e)}}}},function(e,t,i){var r=i(0);function n(e,t){return r.map(["Radius","Angle"],(function(i,r){var n=this["get"+i+"Axis"](),a=t[r],o=e[r]/2,s="dataTo"+i,l="category"===n.type?n.getBandWidth():Math.abs(n[s](a-o)-n[s](a+o));return"Angle"===i&&(l=l*Math.PI/180),l}),this)}e.exports=function(e){var t=e.getRadiusAxis(),i=e.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:a[1],r0:a[0]},api:{coord:r.bind((function(r){var n=t.dataToRadius(r[0]),a=i.dataToAngle(r[1]),o=e.coordToPoint([n,a]);return o.push(n,a*Math.PI/180),o})),size:r.bind(n,e)}}}},function(e,t){e.exports=function(e){var t=e.getRect(),i=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(t,i){return e.dataToPoint(t,i)}}}}},function(e,t,i){i(70),i(211),i(74)},function(e,t,i){var r=i(1),n=i(0),a=i(482);i(123),i(488),i(490),i(74),i(492),r.registerLayout(n.curry(a,"bar")),r.extendComponentView({type:"polar"})},function(e,t,i){var r=i(0),n=i(3).parsePercent,a=i(26).isDimensionStacked;function o(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function s(e,t){return t.dim+e.model.componentIndex}var l=function(e,t,i){var l={},c=function(e,t){var i={};r.each(e,(function(e,t){var r=e.getData(),a=e.coordinateSystem,l=a.getBaseAxis(),c=s(a,l),u=l.getExtent(),d="category"===l.type?l.getBandWidth():Math.abs(u[1]-u[0])/r.count(),h=i[c]||{bandWidth:d,remainedWidth:d,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},p=h.stacks;i[c]=h;var f=o(e);p[f]||h.autoWidthCount++,p[f]=p[f]||{width:0,maxWidth:0};var m=n(e.get("barWidth"),d),g=n(e.get("barMaxWidth"),d),y=e.get("barGap"),_=e.get("barCategoryGap");m&&!p[f].width&&(m=Math.min(h.remainedWidth,m),p[f].width=m,h.remainedWidth-=m),g&&(p[f].maxWidth=g),null!=y&&(h.gap=y),null!=_&&(h.categoryGap=_)}));var a={};return r.each(i,(function(e,t){a[t]={};var i=e.stacks,o=e.bandWidth,s=n(e.categoryGap,o),l=n(e.gap,1),c=e.remainedWidth,u=e.autoWidthCount,d=(c-s)/(u+(u-1)*l);d=Math.max(d,0),r.each(i,(function(e,t){var i=e.maxWidth;i&&i<d&&(i=Math.min(i,c),e.width&&(i=Math.min(i,e.width)),c-=i,e.width=i,u--)})),d=(c-s)/(u+(u-1)*l),d=Math.max(d,0);var h,p=0;r.each(i,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;r.each(i,(function(e,i){a[t][i]=a[t][i]||{offset:f,width:e.width},f+=e.width*(1+l)}))})),a}(r.filter(t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),i=e.coordinateSystem,r=i.getBaseAxis(),n=s(i,r),u=o(e),d=c[n][u],h=d.offset,p=d.width,f=i.getOtherAxis(r),m=e.coordinateSystem.cx,g=e.coordinateSystem.cy,y=e.get("barMinHeight")||0,_=e.get("barMinAngle")||0;l[u]=l[u]||[];for(var v=t.mapDimension(f.dim),C=t.mapDimension(r.dim),x=a(t,v),b="radius"!==r.dim||!e.get("roundCap",!0),S="radius"===f.dim?f.dataToRadius(0):f.dataToAngle(0),T=0,E=t.count();T<E;T++){var w,A,P,D,M=t.get(v,T),I=t.get(C,T),R=M>=0?"p":"n",O=S;if(x&&(l[u][I]||(l[u][I]={p:S,n:S}),O=l[u][I][R]),"radius"===f.dim){var L=f.dataToRadius(M)-S,N=r.dataToAngle(I);Math.abs(L)<y&&(L=(L<0?-1:1)*y),w=O,A=O+L,D=(P=N-h)-p,x&&(l[u][I][R]=A)}else{var F=f.dataToAngle(M,b)-S,B=r.dataToRadius(I);Math.abs(F)<_&&(F=(F<0?-1:1)*_),A=(w=B+h)+p,P=O,D=O+F,x&&(l[u][I][R]=D)}t.setItemLayout(T,{cx:m,cy:g,r0:w,r:A,startAngle:-P*Math.PI/180,endAngle:-D*Math.PI/180})}}}),this)};e.exports=l},function(e,t,i){var r=i(484),n=i(485),a=function(e){this.name=e||"",this.cx=0,this.cy=0,this._radiusAxis=new r,this._angleAxis=new n,this._radiusAxis.polar=this._angleAxis.polar=this};a.prototype={type:"polar",axisPointerEnabled:!0,constructor:a,dimensions:["radius","angle"],model:null,containPoint:function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},containData:function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},getAxis:function(e){return this["_"+e+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(e){var t=[],i=this._angleAxis,r=this._radiusAxis;return i.scale.type===e&&t.push(i),r.scale.type===e&&t.push(r),t},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},dataToPoint:function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},pointToData:function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},pointToCoord:function(e){var t=e[0]-this.cx,i=e[1]-this.cy,r=this.getAngleAxis(),n=r.getExtent(),a=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);r.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+i*i);t/=s,i/=s;for(var l=Math.atan2(-i,t)/Math.PI*180,c=l<a?1:-1;l<a||l>o;)l+=360*c;return[s,l]},coordToPoint:function(e){var t=e[0],i=e[1]/180*Math.PI;return[Math.cos(i)*t+this.cx,-Math.sin(i)*t+this.cy]},getArea:function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var i=e.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-i[0]*r,endAngle:-i[1]*r,clockwise:e.inverse,contain:function(e,t){var i=e-this.cx,r=t-this.cy,n=i*i+r*r,a=this.r,o=this.r0;return n<=a*a&&n>=o*o}}}};var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(35);function a(e,t){n.call(this,"radius",e,t),this.type="category"}a.prototype={constructor:a,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToRadius:n.prototype.dataToCoord,radiusToData:n.prototype.coordToData},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(0),n=i(17),a=i(35),o=(0,i(4).makeInner)();function s(e,t){t=t||[0,360],a.call(this,"angle",e,t),this.type="category"}s.prototype={constructor:s,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToAngle:a.prototype.dataToCoord,angleToData:a.prototype.coordToData,calculateCategoryInterval:function(){var e=this.getLabelModel(),t=this.scale,i=t.getExtent(),r=t.count();if(i[1]-i[0]<1)return 0;var a=i[0],s=this.dataToCoord(a+1)-this.dataToCoord(a),l=Math.abs(s),c=n.getBoundingRect(a,e.getFont(),"center","top"),u=Math.max(c.height,7)/l;isNaN(u)&&(u=1/0);var d=Math.max(0,Math.floor(u)),h=o(this.model),p=h.lastAutoInterval,f=h.lastTickCount;return null!=p&&null!=f&&Math.abs(p-d)<=1&&Math.abs(f-r)<=1&&p>d?d=p:(h.lastTickCount=r,h.lastAutoInterval=d),d}},r.inherits(s,a);var l=s;e.exports=l},function(e,t,i){var r=i(1);i(487);var n=r.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});e.exports=n},function(e,t,i){var r=i(0),n=i(13),a=i(88),o=i(53),s=n.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});r.merge(s.prototype,o);var l={splitNumber:5};function c(e,t){return t.type||(t.data?"category":"value")}a("angle",s,c,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),a("radius",s,c,l)},function(e,t,i){i(123),i(489)},function(e,t,i){var r=i(0),n=i(2),a=i(12),o=i(45),s=i(36),l=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function c(e,t,i){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],i]),n=e.coordToPoint([t[1],i]);return{x1:r[0],y1:r[1],x2:n[0],y2:n[1]}}function u(e){return e.getRadiusAxis().inverse?0:1}function d(e){var t=e[0],i=e[e.length-1];t&&i&&Math.abs(Math.abs(t.coord-i.coord)-360)<1e-4&&e.pop()}var h=o.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),o=i.getTicksCoords(),s=i.getMinorTicksCoords(),c=r.map(i.getViewLabels(),(function(e){return(e=r.clone(e)).coord=i.dataToCoord(e.tickValue),e}));d(c),d(o),r.each(l,(function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,o,s,a,c)}),this)}},_axisLine:function(e,t,i,r,a){var o,s=e.getModel("axisLine.lineStyle"),l=u(t),c=l?0:1;(o=0===a[c]?new n.Circle({shape:{cx:t.cx,cy:t.cy,r:a[l]},style:s.getLineStyle(),z2:1,silent:!0}):new n.Ring({shape:{cx:t.cx,cy:t.cy,r:a[l],r0:a[c]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(o)},_axisTick:function(e,t,i,a,o){var s=e.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),d=o[u(t)],h=r.map(i,(function(e){return new n.Line({shape:c(t,[d,d+l],e.coord)})}));this.group.add(n.mergePath(h,{style:r.defaults(s.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,i,a,o){if(a.length){for(var s=e.getModel("axisTick"),l=e.getModel("minorTick"),d=(s.get("inside")?-1:1)*l.get("length"),h=o[u(t)],p=[],f=0;f<a.length;f++)for(var m=0;m<a[f].length;m++)p.push(new n.Line({shape:c(t,[h,h+d],a[f][m].coord)}));this.group.add(n.mergePath(p,{style:r.defaults(l.getModel("lineStyle").getLineStyle(),r.defaults(s.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(e,t,i,o,l,c){var d=e.getCategories(!0),h=e.getModel("axisLabel"),p=h.get("margin"),f=e.get("triggerEvent");r.each(c,(function(i,r){var o=h,c=i.tickValue,m=l[u(t)],g=t.coordToPoint([m+p,i.coord]),y=t.cx,_=t.cy,v=Math.abs(g[0]-y)/m<.3?"center":g[0]>y?"left":"right",C=Math.abs(g[1]-_)/m<.3?"middle":g[1]>_?"top":"bottom";d&&d[c]&&d[c].textStyle&&(o=new a(d[c].textStyle,h,h.ecModel));var x=new n.Text({silent:s.isLabelSilent(e)});this.group.add(x),n.setTextStyle(x.style,o,{x:g[0],y:g[1],textFill:o.getTextColor()||e.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:v,textVerticalAlign:C}),f&&(x.eventData=s.makeAxisEventDataBase(e),x.eventData.targetType="axisLabel",x.eventData.value=i.rawLabel)}),this)},_splitLine:function(e,t,i,a,o){var s=e.getModel("splitLine").getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var d=[],h=0;h<i.length;h++){var p=u++%l.length;d[p]=d[p]||[],d[p].push(new n.Line({shape:c(t,o,i[h].coord)}))}for(h=0;h<d.length;h++)this.group.add(n.mergePath(d[h],{style:r.defaults({stroke:l[h%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},_minorSplitLine:function(e,t,i,r,a){if(r.length){for(var o=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var u=0;u<r[l].length;u++)s.push(new n.Line({shape:c(t,a,r[l][u].coord)}));this.group.add(n.mergePath(s,{style:o.getLineStyle(),silent:!0,z:e.get("z")}))}},_splitArea:function(e,t,i,a,o){if(i.length){var s=e.getModel("splitArea").getModel("areaStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],d=Math.PI/180,h=-i[0].coord*d,p=Math.min(o[0],o[1]),f=Math.max(o[0],o[1]),m=e.get("clockwise"),g=1;g<i.length;g++){var y=c++%l.length;u[y]=u[y]||[],u[y].push(new n.Sector({shape:{cx:t.cx,cy:t.cy,r0:p,r:f,startAngle:h,endAngle:-i[g].coord*d,clockwise:m},silent:!0})),h=-i[g].coord*d}for(g=0;g<u.length;g++)this.group.add(n.mergePath(u[g],{style:r.defaults({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}});e.exports=h},function(e,t,i){i(123),i(491)},function(e,t,i){var r=i(0),n=i(2),a=i(36),o=i(45),s=["axisLine","axisTickLabel","axisName"],l=["splitLine","splitArea","minorSplitLine"],c=o.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getAngleAxis(),c=i.getTicksCoords(),u=i.getMinorTicksCoords(),d=o.getExtent()[0],h=i.getExtent(),p=function(e,t,i){return{position:[e.cx,e.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(n,e,d),f=new a(e,p);r.each(s,f.add,f),this.group.add(f.getGroup()),r.each(l,(function(t){e.get(t+".show")&&!i.scale.isBlank()&&this["_"+t](e,n,d,h,c,u)}),this)}},_splitLine:function(e,t,i,a,o){var s=e.getModel("splitLine").getModel("lineStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],d=0;d<o.length;d++){var h=c++%l.length;u[h]=u[h]||[],u[h].push(new n.Circle({shape:{cx:t.cx,cy:t.cy,r:o[d].coord}}))}for(d=0;d<u.length;d++)this.group.add(n.mergePath(u[d],{style:r.defaults({stroke:l[d%l.length],fill:null},s.getLineStyle()),silent:!0}))},_minorSplitLine:function(e,t,i,a,o,s){if(s.length){for(var l=e.getModel("minorSplitLine").getModel("lineStyle"),c=[],u=0;u<s.length;u++)for(var d=0;d<s[u].length;d++)c.push(new n.Circle({shape:{cx:t.cx,cy:t.cy,r:s[u][d].coord}}));this.group.add(n.mergePath(c,{style:r.defaults({fill:null},l.getLineStyle()),silent:!0}))}},_splitArea:function(e,t,i,a,o){if(o.length){var s=e.getModel("splitArea").getModel("areaStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],d=o[0].coord,h=1;h<o.length;h++){var p=c++%l.length;u[p]=u[p]||[],u[p].push(new n.Sector({shape:{cx:t.cx,cy:t.cy,r0:d,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),d=o[h].coord}for(h=0;h<u.length;h++)this.group.add(n.mergePath(u[h],{style:r.defaults({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}});e.exports=c},function(e,t,i){var r=i(7),n=i(122),a=i(2),o=i(94),s=i(15),l=i(36),c=i(45),u=n.extend({makeElOption:function(e,t,i,n,c){var u=i.axis;"angle"===u.dim&&(this.animationThreshold=Math.PI/18);var h,p=u.polar,f=p.getOtherAxis(u).getExtent();h=u["dataTo"+r.capitalFirst(u.dim)](t);var m=n.get("type");if(m&&"none"!==m){var g=o.buildElStyle(n),y=d[m](u,p,h,f,g);y.style=g,e.graphicKey=y.type,e.pointer=y}var _=function(e,t,i,r,n){var o=t.axis,c=o.dataToCoord(e),u=r.getAngleAxis().getExtent()[0];u=u/180*Math.PI;var d,h,p,f=r.getRadiusAxis().getExtent();if("radius"===o.dim){var m=s.create();s.rotate(m,m,u),s.translate(m,m,[r.cx,r.cy]),d=a.applyTransform([c,-n],m);var g=t.getModel("axisLabel").get("rotate")||0,y=l.innerTextLayout(u,g*Math.PI/180,-1);h=y.textAlign,p=y.textVerticalAlign}else{var _=f[1];d=r.coordToPoint([_+n,c]);var v=r.cx,C=r.cy;h=Math.abs(d[0]-v)/_<.3?"center":d[0]>v?"left":"right",p=Math.abs(d[1]-C)/_<.3?"middle":d[1]>C?"top":"bottom"}return{position:d,align:h,verticalAlign:p}}(t,i,0,p,n.get("label.margin"));o.buildLabelElOption(e,i,n,c,_)}});var d={line:function(e,t,i,r,n){return"angle"===e.dim?{type:"Line",shape:o.makeLineShape(t.coordToPoint([r[0],i]),t.coordToPoint([r[1],i]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:i}}},shadow:function(e,t,i,r,n){var a=Math.max(1,e.getBandWidth()),s=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:o.makeSectorShape(t.cx,t.cy,r[0],r[1],(-i-a/2)*s,(a/2-i)*s)}:{type:"Sector",shape:o.makeSectorShape(t.cx,t.cy,i-a/2,i+a/2,0,2*Math.PI)}}};c.registerAxisPointerClass("PolarAxisPointer",u);var h=u;e.exports=h},function(e,t,i){var r=i(1),n=i(0);function a(e,t){t.update="updateView",r.registerAction(t,(function(t,i){var r={};return i.eachComponent({mainType:"geo",query:t},(function(i){i[e](t.name);var a=i.coordinateSystem;n.each(a.regions,(function(e){r[e.name]=i.isSelected(e.name)||!1}))})),{selected:r,name:t.name}}))}i(494),i(115),i(495),i(193),a("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),a("select",{type:"geoSelect",event:"geoselected"}),a("unSelect",{type:"geoUnSelect",event:"geounselected"})},function(e,t,i){var r=i(0),n=i(4),a=i(13),o=i(12),s=i(112),l=i(115),c=a.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(e){a.prototype.init.apply(this,arguments),n.defaultEmphasis(e,"label",["show"])},optionUpdated:function(){var e=this.option,t=this;e.regions=l.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=r.reduce(e.regions||[],(function(e,i){return i.name&&e.set(i.name,new o(i,t)),e}),r.createHashMap()),this.updateSelectedMap(e.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(e){return this._optionModelMap.get(e)||new o(null,this,this.ecModel)},getFormattedLabel:function(e,t){t=t||"normal";var i=this.getRegionModel(e).get(("normal"===t?"":t+".")+"label.formatter"),r={name:e};return"function"==typeof i?(r.status=t,i(r)):"string"==typeof i?i.replace("{a}",null!=e?e:""):void 0},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e}});r.mixin(c,s);var u=c;e.exports=u},function(e,t,i){var r=i(191),n=i(1).extendComponentView({type:"geo",init:function(e,t){var i=new r(t,!0);this._mapDraw=i,this.group.add(i.group)},render:function(e,t,i,r){if(!r||"geoToggleSelect"!==r.type||r.from!==this.uid){var n=this._mapDraw;e.get("show")?n.draw(e,t,i,this,r):this._mapDraw.group.removeAll(),this.group.silent=e.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});e.exports=n},function(e,t,i){i(497),i(498),i(499)},function(e,t,i){var r=i(0),n=i(6),a=i(3),o=i(20);function s(e,t,i){this._model=e}function l(e,t,i,r){var n=i.calendarModel,a=i.seriesModel,o=n?n.coordinateSystem:a?a.coordinateSystem:null;return o===this?o[e](r):null}s.prototype={constructor:s,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(e){var t=(e=a.parseDate(e)).getFullYear(),i=e.getMonth()+1;i=i<10?"0"+i:i;var r=e.getDate();r=r<10?"0"+r:r;var n=e.getDay();return{y:t,m:i,d:r,day:n=Math.abs((n+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+i+"-"+r,date:e}},getNextNDay:function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},update:function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,a=["width","height"],o=this._model.get("cellSize").slice(),s=this._model.getBoxLayoutParams(),l="horizontal"===this._orient?[i,7]:[7,i];r.each([0,1],(function(e){d(o,e)&&(s[a[e]]=o[e]*l[e])}));var c={width:t.getWidth(),height:t.getHeight()},u=this._rect=n.getLayoutRect(s,c);function d(e,t){return null!=e[t]&&"auto"!==e[t]}r.each([0,1],(function(e){d(o,e)||(o[e]=u[a[e]]/l[e])})),this._sw=o[0],this._sh=o[1]},dataToPoint:function(e,t){r.isArray(e)&&(e=e[0]),null==t&&(t=!0);var i=this.getDateInfo(e),n=this._rangeInfo,a=i.formatedDate;if(t&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var o=i.day,s=this._getRangeInfo([n.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},pointToData:function(e){var t=this.pointToDate(e);return t&&t.time},dataToRect:function(e,t){var i=this.dataToPoint(e,t);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,i=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,t-1,r):this._getDateByWeeksAndDay(t,i-1,r)},convertToPixel:r.curry(l,"dataToPoint"),convertFromPixel:r.curry(l,"pointToData"),_initRangeOption:function(){var e=this._model.get("range"),t=e;if(r.isArray(t)&&1===t.length&&(t=t[0]),/^\d{4}$/.test(t)&&(e=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)){var i=this.getDateInfo(t),n=i.date;n.setMonth(n.getMonth()+1);var a=this.getNextNDay(n,-1);e=[i.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(e=[t,t]);var o=this._getRangeInfo(e);return o.start.time>o.end.time&&e.reverse(),e},_getRangeInfo:function(e){var t;(e=[this.getDateInfo(e[0]),this.getDateInfo(e[1])])[0].time>e[1].time&&(t=!0,e.reverse());var i=Math.floor(e[1].time/864e5)-Math.floor(e[0].time/864e5)+1,r=new Date(e[0].time),n=r.getDate(),a=e[1].date.getDate();r.setDate(n+i-1);var o=r.getDate();if(o!==a)for(var s=r.getTime()-e[1].time>0?1:-1;(o=r.getDate())!==a&&(r.getTime()-e[1].time)*s>0;)i-=s,r.setDate(o-s);var l=Math.floor((i+e[0].day+6)/7),c=t?1-l:l-1;return t&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:i,weeks:l,nthWeek:c,fweek:e[0].day,lweek:e[1].day}},_getDateByWeeksAndDay:function(e,t,i){var r=this._getRangeInfo(i);if(e>r.weeks||0===e&&t<r.fweek||e===r.weeks&&t>r.lweek)return!1;var n=7*(e-1)-r.fweek+t,a=new Date(r.start.time);return a.setDate(r.start.d+n),this.getDateInfo(a)}},s.dimensions=s.prototype.dimensions,s.getDimensionsInfo=s.prototype.getDimensionsInfo,s.create=function(e,t){var i=[];return e.eachComponent("calendar",(function(r){var n=new s(r,e,t);i.push(n),r.coordinateSystem=n})),e.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("calendarIndex")||0])})),i},o.register("calendar",s);var c=s;e.exports=c},function(e,t,i){var r=i(0),n=i(13),a=i(6),o=a.getLayoutParams,s=a.sizeCalculable,l=a.mergeLayoutParam,c=n.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(e,t,i,r){var n=o(e);c.superApply(this,"init",arguments),u(e,n)},mergeOption:function(e,t){c.superApply(this,"mergeOption",arguments),u(this.option,e)}});function u(e,t){var i=e.cellSize;r.isArray(i)?1===i.length&&(i[1]=i[0]):i=e.cellSize=[i,i];var n=r.map([0,1],(function(e){return s(t,e)&&(i[e]="auto"),null!=i[e]&&"auto"!==i[e]}));l(e,t,{type:"box",ignoreSize:n})}var d=c;e.exports=d},function(e,t,i){var r=i(1),n=i(0),a=i(2),o=i(7),s=i(3),l={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},c={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},u=r.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(e,t,i){var r=this.group;r.removeAll();var n=e.coordinateSystem,a=n.getRangeInfo(),o=n.getOrient();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,o,r),this._renderWeekText(e,a,o,r)},_renderDayRect:function(e,t,i){for(var r=e.coordinateSystem,n=e.getModel("itemStyle").getItemStyle(),o=r.getCellWidth(),s=r.getCellHeight(),l=t.start.time;l<=t.end.time;l=r.getNextNDay(l,1).time){var c=r.dataToRect([l],!1).tl,u=new a.Rect({shape:{x:c[0],y:c[1],width:o,height:s},cursor:"default",style:n});i.add(u)}},_renderLines:function(e,t,i,r){var n=this,a=e.coordinateSystem,o=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=t.start,u=0;c.time<=t.end.time;u++){h(c.formatedDate),0===u&&(c=a.getDateInfo(t.start.y+"-"+t.start.m));var d=c.date;d.setMonth(d.getMonth()+1),c=a.getDateInfo(d)}function h(t){n._firstDayOfMonth.push(a.getDateInfo(t)),n._firstDayPoints.push(a.dataToRect([t],!1).tl);var l=n._getLinePointsOfOneWeek(e,t,i);n._tlpoints.push(l[0]),n._blpoints.push(l[l.length-1]),s&&n._drawSplitline(l,o,r)}h(a.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(n._getEdgesPoints(n._tlpoints,l,i),o,r),s&&this._drawSplitline(n._getEdgesPoints(n._blpoints,l,i),o,r)},_getEdgesPoints:function(e,t,i){var r=[e[0].slice(),e[e.length-1].slice()],n="horizontal"===i?0:1;return r[0][n]=r[0][n]-t/2,r[1][n]=r[1][n]+t/2,r},_drawSplitline:function(e,t,i){var r=new a.Polyline({z2:20,shape:{points:e},style:t});i.add(r)},_getLinePointsOfOneWeek:function(e,t,i){var r=e.coordinateSystem;t=r.getDateInfo(t);for(var n=[],a=0;a<7;a++){var o=r.getNextNDay(t.time,a),s=r.dataToRect([o.time],!1);n[2*o.day]=s.tl,n[2*o.day+1]=s["horizontal"===i?"bl":"tr"]}return n},_formatterLabel:function(e,t){return"string"==typeof e&&e?o.formatTplSimple(e,t):"function"==typeof e?e(t):t.nameMap},_yearTextPositionControl:function(e,t,i,r,n){t=t.slice();var a=["center","bottom"];"bottom"===r?(t[1]+=n,a=["center","top"]):"left"===r?t[0]-=n:"right"===r?(t[0]+=n,a=["center","top"]):t[1]-=n;var o=0;return"left"!==r&&"right"!==r||(o=Math.PI/2),{rotation:o,position:t,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(e,t,i,r){var n=e.getModel("yearLabel");if(n.get("show")){var o=n.get("margin"),s=n.get("position");s||(s="horizontal"!==i?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(l[0][0]+l[1][0])/2,u=(l[0][1]+l[1][1])/2,d="horizontal"===i?0:1,h={top:[c,l[d][1]],bottom:[c,l[1-d][1]],left:[l[1-d][0],u],right:[l[d][0],u]},p=t.start.y;+t.end.y>+t.start.y&&(p=p+"-"+t.end.y);var f=n.get("formatter"),m={start:t.start.y,end:t.end.y,nameMap:p},g=this._formatterLabel(f,m),y=new a.Text({z2:30});a.setTextStyle(y.style,n,{text:g}),y.attr(this._yearTextPositionControl(y,h[s],i,s,o)),r.add(y)}},_monthTextPositionControl:function(e,t,i,r,n){var a="left",o="top",s=e[0],l=e[1];return"horizontal"===i?(l+=n,t&&(a="center"),"start"===r&&(o="bottom")):(s+=n,t&&(o="middle"),"start"===r&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderMonthText:function(e,t,i){var r=e.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),s=r.get("margin"),c=r.get("position"),u=r.get("align"),d=[this._tlpoints,this._blpoints];n.isString(o)&&(o=l[o.toUpperCase()]||[]);var h="start"===c?0:1,p="horizontal"===t?0:1;s="start"===c?-s:s;for(var f="center"===u,m=0;m<d[h].length-1;m++){var g=d[h][m].slice(),y=this._firstDayOfMonth[m];if(f){var _=this._firstDayPoints[m];g[p]=(_[p]+d[0][m+1][p])/2}var v=r.get("formatter"),C=o[+y.m-1],x={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:C},b=this._formatterLabel(v,x),S=new a.Text({z2:30});n.extend(a.setTextStyle(S.style,r,{text:b}),this._monthTextPositionControl(g,f,t,c,s)),i.add(S)}}},_weekTextPositionControl:function(e,t,i,r,n){var a="center",o="middle",s=e[0],l=e[1],c="start"===i;return"horizontal"===t?(s=s+r+(c?1:-1)*n[0]/2,a=c?"right":"left"):(l=l+r+(c?1:-1)*n[1]/2,o=c?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderWeekText:function(e,t,i,r){var o=e.getModel("dayLabel");if(o.get("show")){var l=e.coordinateSystem,u=o.get("position"),d=o.get("nameMap"),h=o.get("margin"),p=l.getFirstDayOfWeek();n.isString(d)&&(d=c[d.toUpperCase()]||[]);var f=l.getNextNDay(t.end.time,7-t.lweek).time,m=[l.getCellWidth(),l.getCellHeight()];h=s.parsePercent(h,m["horizontal"===i?0:1]),"start"===u&&(f=l.getNextNDay(t.start.time,-(7+t.fweek)).time,h=-h);for(var g=0;g<7;g++){var y,_=l.getNextNDay(f,g),v=l.dataToRect([_.time],!1).center;y=Math.abs((g+p)%7);var C=new a.Text({z2:30});n.extend(a.setTextStyle(C.style,o,{text:d[y]}),this._weekTextPositionControl(v,i,u,h,m)),r.add(C)}}}});e.exports=u},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(4),o=i(2),s=i(6),l=i(3).parsePercent,c={path:null,compoundPath:null,group:o.Group,image:o.Image,text:o.Text};r.registerPreprocessor((function(e){var t=e.graphic;n.isArray(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}));var u=r.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(e){var t=this.option.elements;this.option.elements=null,u.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(e,t){var i=this.option,r=(t?i:e).elements,o=i.elements=t?[]:i.elements,l=[];this._flatten(r,l);var c=a.mappingToExists(o,l);a.makeIdAndName(c);var u=this._elOptionsToUpdate=[];n.each(c,(function(e,t){var i=e.option;i&&(u.push(i),function(e,t){var i=e.exist;if(t.id=e.keyInfo.id,!t.type&&i&&(t.type=i.type),null==t.parentId){var r=t.parentOption;r?t.parentId=r.id:i&&(t.parentId=i.parentId)}t.parentOption=null}(e,i),function(e,t,i){var r=n.extend({},i),a=e[t],o=i.$action||"merge";"merge"===o?a?(n.merge(a,r,!0),s.mergeLayoutParam(a,r,{ignoreSize:!0}),s.copyLayoutParams(i,a)):e[t]=r:"replace"===o?e[t]=r:"remove"===o&&a&&(e[t]=null)}(o,t,i),function(e,t){if(!e)return;e.hv=t.hv=[p(t,["left","right"]),p(t,["top","bottom"])],"group"===e.type&&(null==e.width&&(e.width=t.width=0),null==e.height&&(e.height=t.height=0))}(o[t],i))}),this);for(var d=o.length-1;d>=0;d--)null==o[d]?o.splice(d,1):delete o[d].$action},_flatten:function(e,t,i){n.each(e,(function(e){if(e){i&&(e.parentOption=i),t.push(e);var r=e.children;"group"===e.type&&r&&this._flatten(r,t,e),delete e.children}}),this)},useElOptionsToUpdate:function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}});function d(e,t,i,r){var n=i.type,a=new(c.hasOwnProperty(n)?c[n]:o.getShapeClass(n))(i);t.add(a),r.set(e,a),a.__ecGraphicId=e}function h(e,t){var i=e&&e.parent;i&&("group"===e.type&&e.traverse((function(e){h(e,t)})),t.removeKey(e.__ecGraphicId),i.remove(e))}function p(e,t){var i;return n.each(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(i=!0)})),i}r.extendComponentView({type:"graphic",init:function(e,t){this._elMap=n.createHashMap(),this._lastGraphicModel},render:function(e,t,i){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,i)},_updateElements:function(e){var t=e.useElOptionsToUpdate();if(t){var i=this._elMap,r=this.group;n.each(t,(function(t){var a=t.$action,o=t.id,l=i.get(o),c=t.parentId,u=null!=c?i.get(c):r,p=t.style;"text"===t.type&&p&&(t.hv&&t.hv[1]&&(p.textVerticalAlign=p.textBaseline=null),!p.hasOwnProperty("textFill")&&p.fill&&(p.textFill=p.fill),!p.hasOwnProperty("textStroke")&&p.stroke&&(p.textStroke=p.stroke));var f=function(e){return e=n.extend({},e),n.each(["id","parentId","$action","hv","bounding"].concat(s.LOCATION_PARAMS),(function(t){delete e[t]})),e}(t);a&&"merge"!==a?"replace"===a?(h(l,i),d(o,u,f,i)):"remove"===a&&h(l,i):l?l.attr(f):d(o,u,f,i);var m=i.get(o);m&&(m.__ecGraphicWidthOption=t.width,m.__ecGraphicHeightOption=t.height,function(e,t,i){var r=e.eventData;e.silent||e.ignore||r||(r=e.eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});r&&(r.info=e.info)}(m,e))}))}},_relocate:function(e,t){for(var i=e.option.elements,r=this.group,n=this._elMap,a=t.getWidth(),o=t.getHeight(),c=0;c<i.length;c++){var u=i[c];if((h=n.get(u.id))&&h.isGroup){var d=(p=h.parent)===r;h.__ecGraphicWidth=l(h.__ecGraphicWidthOption,d?a:p.__ecGraphicWidth)||0,h.__ecGraphicHeight=l(h.__ecGraphicHeightOption,d?o:p.__ecGraphicHeight)||0}}for(c=i.length-1;c>=0;c--){var h;u=i[c];if(h=n.get(u.id)){var p,f=(p=h.parent)===r?{width:a,height:o}:{width:p.__ecGraphicWidth,height:p.__ecGraphicHeight};s.positionElement(h,u,f,null,{hv:u.hv,boundingMode:u.bounding})}}},_clear:function(){var e=this._elMap;e.each((function(t){h(t,e)})),this._elMap=n.createHashMap()},dispose:function(){this._clear()}})},function(e,t,i){i(502),i(503),i(504),i(505),i(506),i(507),i(512)},function(e,t,i){var r=i(1),n=i(0),a=i(37),o=r.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){o.superApply(this,"optionUpdated",arguments),n.each(this.option.feature,(function(e,t){var i=a.get(t);i&&n.merge(e,i.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}}),s=o;e.exports=s},function(e,t,i){var r=i(1),n=i(0),a=i(17),o=i(37),s=i(2),l=i(12),c=i(43),u=i(212),d=r.extendComponentView({type:"toolbox",render:function(e,t,i,r){var d=this.group;if(d.removeAll(),e.get("show")){var h=+e.get("itemSize"),p=e.get("feature")||{},f=this._features||(this._features={}),m=[];n.each(p,(function(e,t){m.push(t)})),new c(this._featureNames||[],m).add(g).update(g).remove(n.curry(g,null)).execute(),this._featureNames=m,u.layout(d,e,i),d.add(u.makeBackground(d.getBoundingRect(),e)),d.eachChild((function(e){var t=e.__title,r=e.hoverStyle;if(r&&t){var n=a.getBoundingRect(t,a.makeFont(r)),o=e.position[0]+d.position[0],s=!1;e.position[1]+d.position[1]+h+n.height>i.getHeight()&&(r.textPosition="top",s=!0);var l=s?-5-n.height:h+8;o+n.width/2>i.getWidth()?(r.textPosition=["100%",l],r.textAlign="right"):o-n.width/2<0&&(r.textPosition=[0,l],r.textAlign="left")}}))}function g(a,c){var u,g=m[a],y=m[c],_=p[g],v=new l(_,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===g&&(_.title=r.newTitle),g&&!y){if(function(e){return 0===e.indexOf("my")}(g))u={model:v,onclick:v.option.onclick,featureName:g};else{var C=o.get(g);if(!C)return;u=new C(v,t,i)}f[g]=u}else{if(!(u=f[y]))return;u.model=v,u.ecModel=t,u.api=i}g||!y?v.get("show")&&!u.unusable?(!function(r,a,o){var l=r.getModel("iconStyle"),c=r.getModel("emphasis.iconStyle"),u=a.getIcons?a.getIcons():r.get("icon"),p=r.get("title")||{};if("string"==typeof u){var f=u,m=p;p={},(u={})[o]=f,p[o]=m}var g=r.iconPaths={};n.each(u,(function(o,u){var f=s.createIcon(o,{},{x:-h/2,y:-h/2,width:h,height:h});f.setStyle(l.getItemStyle()),f.hoverStyle=c.getItemStyle(),f.setStyle({text:p[u],textAlign:c.get("textAlign"),textBorderRadius:c.get("textBorderRadius"),textPadding:c.get("textPadding"),textFill:null});var m=e.getModel("tooltip");m&&m.get("show")&&f.attr("tooltip",n.extend({content:p[u],formatter:m.get("formatter",!0)||function(){return p[u]},formatterParams:{componentType:"toolbox",name:u,title:p[u],$vars:["name","title"]},position:m.get("position",!0)||"bottom"},m.option)),s.setHoverStyle(f),e.get("showTitle")&&(f.__title=p[u],f.on("mouseover",(function(){var t=c.getItemStyle(),i="vertical"===e.get("orient")?null==e.get("right")?"right":"left":null==e.get("bottom")?"bottom":"top";f.setStyle({textFill:c.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:c.get("textBackgroundColor"),textPosition:c.get("textPosition")||i})})).on("mouseout",(function(){f.setStyle({textFill:null,textBackgroundColor:null})}))),f.trigger(r.get("iconStatus."+u)||"normal"),d.add(f),f.on("click",n.bind(a.onclick,a,t,i,u)),g[u]=f}))}(v,u,g),v.setIconStatus=function(e,t){var i=this.option,r=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[e]=t,r[e]&&r[e].trigger(t)},u.render&&u.render(v,t,i,r)):u.remove&&u.remove(t,i):u.dispose&&u.dispose(t,i)}},updateView:function(e,t,i,r){n.each(this._features,(function(e){e.updateView&&e.updateView(e.model,t,i,r)}))},remove:function(e,t){n.each(this._features,(function(i){i.remove&&i.remove(e,t)})),this.group.removeAll()},dispose:function(e,t){n.each(this._features,(function(i){i.dispose&&i.dispose(e,t)}))}});e.exports=d},function(e,t,i){var r=i(11),n=i(34),a=i(37),o=n.toolbox.saveAsImage;function s(e){this.model=e}s.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:o.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:o.lang.slice()},s.prototype.unusable=!r.canvasSupported,s.prototype.onclick=function(e,t){var i=this.model,n=i.get("name")||e.get("title.0.text")||"echarts",a="svg"===t.getZr().painter.getType()?"svg":i.get("type",!0)||"png",o=t.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||r.browser.ie||r.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(o.split(",")[1]),l=s.length,c=new Uint8Array(l);l--;)c[l]=s.charCodeAt(l);var u=new Blob([c]);window.navigator.msSaveOrOpenBlob(u,n+"."+a)}else{var d=i.get("lang"),h='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(d&&d[0]||"")+'" /></body>';window.open().document.write(h)}else{var p=document.createElement("a");p.download=n+"."+a,p.target="_blank",p.href=o;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(f)}},a.register("saveAsImage",s);var l=s;e.exports=l},function(e,t,i){var r=i(1),n=i(0),a=i(34),o=i(37),s=a.toolbox.magicType;function l(e){this.model=e}l.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:n.clone(s.title),option:{},seriesIndex:{}};var c=l.prototype;c.getIcons=function(){var e=this.model,t=e.get("icon"),i={};return n.each(e.get("type"),(function(e){t[e]&&(i[e]=t[e])})),i};var u={line:function(e,t,i,r){if("bar"===e)return n.merge({id:t,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.line")||{},!0)},bar:function(e,t,i,r){if("line"===e)return n.merge({id:t,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.bar")||{},!0)},stack:function(e,t,i,r){var a="__ec_magicType_stack__"===i.get("stack");if("line"===e||"bar"===e)return r.setIconStatus("stack",a?"normal":"emphasis"),n.merge({id:t,stack:a?"":"__ec_magicType_stack__"},r.get("option.stack")||{},!0)}},d=[["line","bar"],["stack"]];c.onclick=function(e,t,i){var r=this.model,a=r.get("seriesIndex."+i);if(u[i]){var o,l={series:[]};if(n.each(d,(function(e){n.indexOf(e,i)>=0&&n.each(e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(t){var a=t.subType,o=t.id,s=u[i](a,o,t,r);s&&(n.defaults(s,t.option),l.series.push(s));var c=t.coordinateSystem;if(c&&"cartesian2d"===c.type&&("line"===i||"bar"===i)){var d=c.getAxesByScale("ordinal")[0];if(d){var h=d.dim+"Axis",p=e.queryComponents({mainType:h,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;l[h]=l[h]||[];for(var f=0;f<=p;f++)l[h][p]=l[h][p]||{};l[h][p].boundaryGap="bar"===i}}})),"stack"===i)o=l.series&&l.series[0]&&"__ec_magicType_stack__"===l.series[0].stack?n.merge({stack:s.title.tiled},s.title):n.clone(s.title);t.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:o,featureName:"magicType"})}},r.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)})),o.register("magicType",l);var h=l;e.exports=h},function(e,t,i){var r=i(1),n=i(0),a=i(23),o=i(34),s=i(37),l=o.toolbox.dataView,c=new Array(60).join("-");function u(e){return n.map(e,(function(e){var t=e.getRawData(),i=[e.name],r=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,n=arguments[e-1],a=t.getName(n),o=0;o<e-1;o++)r[o]=arguments[o];i.push((a?a+"\t":"")+r.join("\t"))})),i.join("\n")})).join("\n\n"+c+"\n\n")}function d(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var h=new RegExp("[\t]+","g");function p(e,t){var i=e.split(new RegExp("\n*"+c+"\n*","g")),r={series:[]};return n.each(i,(function(e,i){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf("\t")>=0)return!0}(e)){var a=function(e){for(var t=e.split(/\n+/g),i=d(t.shift()).split(h),r=[],a=n.map(i,(function(e){return{name:e,data:[]}})),o=0;o<t.length;o++){var s=d(t[o]).split(h);r.push(s.shift());for(var l=0;l<s.length;l++)a[l]&&(a[l].data[o]=s[l])}return{series:a,categories:r}}(e),o=t[i],s=o.axisDim+"Axis";o&&(r[s]=r[s]||[],r[s][o.axisIndex]={data:a.categories},r.series=r.series.concat(a.series))}else{a=function(e){for(var t=e.split(/\n+/g),i=d(t.shift()),r=[],n=0;n<t.length;n++){var a=d(t[n]);if(a){var o,s=a.split(h),l="",c=!1;isNaN(s[0])?(c=!0,l=s[0],s=s.slice(1),r[n]={name:l,value:[]},o=r[n].value):o=r[n]=[];for(var u=0;u<s.length;u++)o.push(+s[u]);1===o.length&&(c?r[n].value=o[0]:r[n]=o[0])}}return{name:i,data:r}}(e);r.series.push(a)}})),r}function f(e){this._dom=null,this.model=e}function m(e,t){return n.map(e,(function(e,i){var r=t&&t[i];if(n.isObject(r)&&!n.isArray(r)){n.isObject(e)&&!n.isArray(e)||(e={value:e});var a=null!=r.name&&null==e.name;return e=n.defaults(e,r),a&&delete e.name,e}return e}))}f.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:n.clone(l.title),lang:n.clone(l.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},f.prototype.onclick=function(e,t){var i=t.getDom(),r=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=r.get("lang")||[];s.innerHTML=l[0]||r.get("title"),s.style.cssText="margin: 10px 20px;",s.style.color=r.get("textColor");var d=document.createElement("div"),h=document.createElement("textarea");d.style.cssText="display:block;width:100%;overflow:auto;";var f=r.get("optionToContent"),m=r.get("contentToOption"),g=function(e){var t,i,r=function(e){var t={},i=[],r=[];return e.eachRawSeries((function(e){var n=e.coordinateSystem;if(!n||"cartesian2d"!==n.type&&"polar"!==n.type)i.push(e);else{var a=n.getBaseAxis();if("category"===a.type){var o=a.dim+"_"+a.index;t[o]||(t[o]={categoryAxis:a,valueAxis:n.getOtherAxis(a),series:[]},r.push({axisDim:a.dim,axisIndex:a.index})),t[o].series.push(e)}else i.push(e)}})),{seriesGroupByCategoryAxis:t,other:i,meta:r}}(e);return{value:n.filter([(t=r.seriesGroupByCategoryAxis,i=[],n.each(t,(function(e,t){var r=e.categoryAxis,a=e.valueAxis.dim,o=[" "].concat(n.map(e.series,(function(e){return e.name}))),s=[r.model.getCategories()];n.each(e.series,(function(e){var t=e.getRawData();s.push(e.getRawData().mapArray(t.mapDimension(a),(function(e){return e})))}));for(var l=[o.join("\t")],c=0;c<s[0].length;c++){for(var u=[],d=0;d<s.length;d++)u.push(s[d][c]);l.push(u.join("\t"))}i.push(l.join("\n"))})),i.join("\n\n"+c+"\n\n")),u(r.other)],(function(e){return e.replace(/[\n\t\s]/g,"")})).join("\n\n"+c+"\n\n"),meta:r.meta}}(e);if("function"==typeof f){var y=f(t.getOption());"string"==typeof y?d.innerHTML=y:n.isDom(y)&&d.appendChild(y)}else d.appendChild(h),h.readOnly=r.get("readOnly"),h.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=r.get("textColor"),h.style.borderColor=r.get("textareaBorderColor"),h.style.backgroundColor=r.get("textareaColor"),h.value=g.value;var _=g.meta,v=document.createElement("div");v.style.cssText="position:absolute;bottom:0;left:0;right:0;";var C="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",x=document.createElement("div"),b=document.createElement("div");C+=";background-color:"+r.get("buttonColor"),C+=";color:"+r.get("buttonTextColor");var S=this;function T(){i.removeChild(o),S._dom=null}a.addEventListener(x,"click",T),a.addEventListener(b,"click",(function(){var e;try{e="function"==typeof m?m(d,t.getOption()):p(h.value,_)}catch(e){throw T(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),T()})),x.innerHTML=l[1],b.innerHTML=l[2],b.style.cssText=C,x.style.cssText=C,!r.get("readOnly")&&v.appendChild(b),v.appendChild(x),o.appendChild(s),o.appendChild(d),o.appendChild(v),d.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},f.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},f.prototype.dispose=function(e,t){this.remove(e,t)},s.register("dataView",f),r.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var i=[];n.each(e.newOption.series,(function(e){var r=t.getSeriesByName(e.name)[0];if(r){var a=r.get("data");i.push({name:e.name,data:m(e.data,a)})}else i.push(n.extend({type:"scatter"},e))})),t.mergeOption(n.defaults({series:i},e.newOption))}));var g=f;e.exports=g},function(e,t,i){var r=i(1),n=i(0),a=i(121),o=i(213),s=i(214),l=i(55),c=i(34),u=i(37);i(508);var d=c.toolbox.dataZoom,h=n.each;function p(e,t,i){(this._brushController=new a(i.getZr())).on("brush",n.bind(this._onBrush,this)).mount(),this._isZoomActive}p.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:n.clone(d.title),brushStyle:{borderWidth:0,color:"rgba(0,0,0,0.2)"}};var f=p.prototype;f.render=function(e,t,i,r){this.model=e,this.ecModel=t,this.api=i,function(e,t,i,r,n){var a=i._isZoomActive;r&&"takeGlobalCursor"===r.type&&(a="dataZoomSelect"===r.key&&r.dataZoomSelectActive);i._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var s=new o(g(e.option),t,{include:["grid"]});i._brushController.setPanels(s.makePanelOpts(n,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!a&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,i),function(e,t){e.setIconStatus("back",s.count(t)>1?"emphasis":"normal")}(e,t)},f.onclick=function(e,t,i){m[i].call(this)},f.remove=function(e,t){this._brushController.unmount()},f.dispose=function(e,t){this._brushController.dispose()};var m={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(s.pop(this.ecModel))}};function g(e){var t={};return n.each(["xAxisIndex","yAxisIndex"],(function(i){t[i]=e[i],null==t[i]&&(t[i]="all"),(!1===t[i]||"none"===t[i])&&(t[i]=[])})),t}f._onBrush=function(e,t){if(t.isEnd&&e.length){var i={},r=this.ecModel;this._brushController.updateCovers([]),new o(g(this.model.option),r,{include:["grid"]}).matchOutputRanges(e,r,(function(e,t,i){if("cartesian2d"===i.type){var r=e.brushType;"rect"===r?(n("x",i,t[0]),n("y",i,t[1])):n({lineX:"x",lineY:"y"}[r],i,t)}})),s.push(r,i),this._dispatchZoomAction(i)}function n(e,t,n){var a=t.getAxis(e),o=a.model,s=function(e,t,i){var r;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(e,t.componentIndex)&&(r=i)})),r}(e,o,r),c=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==c.minValueSpan&&null==c.maxValueSpan||(n=l(0,n.slice(),a.scale.getExtent(),0,c.minValueSpan,c.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:n[0],endValue:n[1]})}},f._dispatchZoomAction=function(e){var t=[];h(e,(function(e,i){t.push(n.clone(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},u.register("dataZoom",p),r.registerPreprocessor((function(e){if(e){var t=e.dataZoom||(e.dataZoom=[]);n.isArray(t)||(e.dataZoom=t=[t]);var i=e.toolbox;if(i&&(n.isArray(i)&&(i=i[0]),i&&i.feature)){var r=i.feature.dataZoom;a("xAxis",r),a("yAxis",r)}}function a(i,r){if(r){var a=i+"Index",o=r[a];null==o||"all"===o||n.isArray(o)||(o=!1===o||"none"===o?[]:[o]),function(t,i){var r=e[t];n.isArray(r)||(r=r?[r]:[]);h(r,i)}(i,(function(e,s){if(null==o||"all"===o||-1!==n.indexOf(o,s)){var l={type:"select",$fromToolbox:!0,filterMode:r.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+s};l[a]=s,t.push(l)}}))}}}));var y=p;e.exports=y},function(e,t,i){i(124),i(56),i(57),i(510),i(511),i(126),i(127)},function(e,t,i){var r=i(0),n=i(3),a=i(125),o=i(55),s=r.each,l=n.asc,c=function(e,t,i,r){this._dimName=e,this._axisIndex=t,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=r,this._dataZoomModel=i};function u(e,t){var i=e.getAxisModel(),r=e._percentWindow,a=e._valueWindow;if(r){var o=n.getPixelPrecision(a,[0,500]);o=Math.min(o,20);var s=t||0===r[0]&&100===r[1];i.setRange(s?null:+a[0].toFixed(o),s?null:+a[1].toFixed(o))}}c.prototype={constructor:c,hostedBy:function(e){return this._dataZoomModel===e},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var e=[],t=this.ecModel;return t.eachSeries((function(i){if(a.isCoordSupported(i.get("coordinateSystem"))){var r=this._dimName,n=t.queryComponents({mainType:r+"Axis",index:i.get(r+"AxisIndex"),id:i.get(r+"AxisId")})[0];this._axisIndex===(n&&n.componentIndex)&&e.push(i)}}),this),e},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,t,i,r=this._dimName,n=this.ecModel,a=this.getAxisModel();return"x"===r||"y"===r?(t="gridIndex",e="x"===r?"y":"x"):(t="polarIndex",e="angle"===r?"radius":"angle"),n.eachComponent(e+"Axis",(function(e){(e.get(t)||0)===(a.get(t)||0)&&(i=e)})),i},getMinMaxSpan:function(){return r.clone(this._minMaxSpan)},calculateDataWindow:function(e){var t,i=this._dataExtent,r=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),c=[0,100],u=[],d=[];s(["start","end"],(function(o,s){var l=e[o],h=e[o+"Value"];"percent"===a[s]?(null==l&&(l=c[s]),h=r.parse(n.linearMap(l,c,i))):(t=!0,h=null==h?i[s]:r.parse(h),l=n.linearMap(h,i,c)),d[s]=h,u[s]=l})),l(d),l(u);var h=this._minMaxSpan;function p(e,t,i,a,s){var l=s?"Span":"ValueSpan";o(0,e,i,"all",h["min"+l],h["max"+l]);for(var c=0;c<2;c++)t[c]=n.linearMap(e[c],i,a,!0),s&&(t[c]=r.parse(t[c]))}return t?p(d,u,i,c,!1):p(u,d,c,i,!0),{valueWindow:d,percentWindow:u}},reset:function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,i){var r=[1/0,-1/0];s(i,(function(e){var i=e.getData();i&&s(i.mapDimension(t,!0),(function(e){var t=i.getApproximateExtent(e);t[0]<r[0]&&(r[0]=t[0]),t[1]>r[1]&&(r[1]=t[1])}))})),r[1]<r[0]&&(r=[NaN,NaN]);return function(e,t){var i=e.getAxisModel(),r=i.getMin(!0),n="category"===i.get("type"),a=n&&i.getCategories().length;null!=r&&"dataMin"!==r&&"function"!=typeof r?t[0]=r:n&&(t[0]=a>0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?t[1]=o:n&&(t[1]=a>0?a-1:NaN);i.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0))}(e,r),r}(this,this._dimName,t),function(e){var t=e._minMaxSpan={},i=e._dataZoomModel,r=e._dataExtent;s(["min","max"],(function(a){var o=i.get(a+"Span"),s=i.get(a+"ValueSpan");null!=s&&(s=e.getAxisModel().axis.scale.parse(s)),null!=s?o=n.linearMap(r[0]+s,r,[0,100],!0):null!=o&&(s=n.linearMap(o,[0,100],r,!0)-r[0]),t[a+"Span"]=o,t[a+"ValueSpan"]=s}))}(this);var i=this.calculateDataWindow(e.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,u(this)}},restore:function(e){e===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,u(this,!0))},filterData:function(e,t){if(e===this._dataZoomModel){var i=this._dimName,r=this.getTargetSeriesModels(),n=e.get("filterMode"),a=this._valueWindow;"none"!==n&&s(r,(function(e){var t=e.getData(),r=t.mapDimension(i,!0);r.length&&("weakFilter"===n?t.filterSelf((function(e){for(var i,n,o,s=0;s<r.length;s++){var l=t.get(r[s],e),c=!isNaN(l),u=l<a[0],d=l>a[1];if(c&&!u&&!d)return!0;c&&(o=!0),u&&(i=!0),d&&(n=!0)}return o&&i&&n})):s(r,(function(i){if("empty"===n)e.setData(t=t.map(i,(function(e){return function(e){return e>=a[0]&&e<=a[1]}(e)?e:NaN})));else{var r={};r[i]=a,t.selectRange(r)}})),s(r,(function(e){t.setApproximateExtent(a,e)})))}))}}};var d=c;e.exports=d},function(e,t,i){var r=i(56).extend({type:"dataZoom.select"});e.exports=r},function(e,t,i){var r=i(57).extend({type:"dataZoom.select"});e.exports=r},function(e,t,i){var r=i(1),n=i(214),a=i(34),o=i(37),s=a.toolbox.restore;function l(e){this.model=e}l.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:s.title},l.prototype.onclick=function(e,t,i){n.clear(e),t.dispatchAction({type:"restore",from:this.uid})},o.register("restore",l),r.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));var c=l;e.exports=c},function(e,t,i){var r=i(1);i(74),i(514),i(515),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}))},function(e,t,i){var r=i(1).extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});e.exports=r},function(e,t,i){var r=i(1),n=i(0),a=i(11),o=i(516),s=i(517),l=i(7),c=i(3),u=i(2),d=i(209),h=i(6),p=i(12),f=i(210),m=i(21),g=i(94),y=i(4).getTooltipRenderMode,_=n.bind,v=n.each,C=c.parsePercent,x=new u.Rect({shape:{x:-1,y:-1,width:2,height:2}}),b=r.extendComponentView({type:"tooltip",init:function(e,t){if(!a.node){var i,r=e.getComponent("tooltip"),n=r.get("renderMode");this._renderMode=y(n),"html"===this._renderMode?(i=new o(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new s(t),this._newLine="\n"),this._tooltipContent=i}},render:function(e,t,i){if(!a.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=e.get("alwaysShowContent");var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var e=this._tooltipModel.get("triggerOn");f.register("itemTooltip",this._api,_((function(t,i,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,r):"leave"===t&&this._hide(r))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&r.manuallyShowTip(e,t,i,{x:r._lastX,y:r._lastY})}))}},manuallyShowTip:function(e,t,i,r){if(r.from!==this.uid&&!a.node){var n=T(r,i);this._ticket="";var o=r.dataByCoordSys;if(r.tooltip&&null!=r.x&&null!=r.y){var s=x;s.position=[r.x,r.y],s.update(),s.tooltip=r.tooltip,this._tryShow({offsetX:r.x,offsetY:r.y,target:s},n)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:r.dataByCoordSys,tooltipOption:r.tooltipOption},n);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,i,r))return;var l=d(r,t),c=l.point[0],u=l.point[1];null!=c&&null!=u&&this._tryShow({offsetX:c,offsetY:u,position:r.position,target:l.el},n)}else null!=r.x&&null!=r.y&&(i.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:i.getZr().findHover(r.x,r.y).target},n))}},manuallyHideTip:function(e,t,i,r){var n=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&n.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,r.from!==this.uid&&this._hide(T(r,i))},_manuallyAxisShowTip:function(e,t,i,r){var n=r.seriesIndex,a=r.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=n&&null!=a&&null!=o){var s=t.getSeriesByIndex(n);if(s)if("axis"===(e=S([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:n,dataIndex:a,position:r.position}),!0}},_tryShow:function(e,t){var i=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,e):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,i,t)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,i,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var i=e.get("showDelay");t=n.bind(t,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(t,i):t()},_showAxisTooltip:function(e,t){var i=this._ecModel,r=this._tooltipModel,a=[t.offsetX,t.offsetY],o=[],s=[],c=S([t.tooltipOption,r]),u=this._renderMode,d=this._newLine,h={};v(e,(function(e){v(e.dataByAxis,(function(e){var t=i.getComponent(e.axisDim+"Axis",e.axisIndex),r=e.value,a=[];if(t&&null!=r){var c=g.getValueLabel(r,t.axis,i,e.seriesDataIndices,e.valueLabelOpt);n.each(e.seriesDataIndices,(function(o){var l=i.getSeriesByIndex(o.seriesIndex),d=o.dataIndexInside,p=l&&l.getDataParams(d);if(p.axisDim=e.axisDim,p.axisIndex=e.axisIndex,p.axisType=e.axisType,p.axisId=e.axisId,p.axisValue=m.getAxisRawValue(t.axis,r),p.axisValueLabel=c,p){s.push(p);var f,g=l.formatTooltip(d,!0,null,u);if(n.isObject(g)){f=g.html;var y=g.markers;n.merge(h,y)}else f=g;a.push(f)}}));var p=c;"html"!==u?o.push(a.join(d)):o.push((p?l.encodeHTML(p)+d:"")+a.join(d))}}))}),this),o.reverse(),o=o.join(this._newLine+this._newLine);var p=t.position;this._showOrMove(c,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(c,p,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(c,o,s,Math.random(),a[0],a[1],p,void 0,h)}))},_showSeriesItemTooltip:function(e,t,i){var r=this._ecModel,a=t.seriesIndex,o=r.getSeriesByIndex(a),s=t.dataModel||o,l=t.dataIndex,c=t.dataType,u=s.getData(c),d=S([u.getItemModel(l),s,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),h=d.get("trigger");if(null==h||"item"===h){var p,f,m=s.getDataParams(l,c),g=s.formatTooltip(l,!1,c,this._renderMode);n.isObject(g)?(p=g.html,f=g.markers):(p=g,f=null);var y="item_"+s.name+"_"+l;this._showOrMove(d,(function(){this._showTooltipContent(d,p,m,y,e.offsetX,e.offsetY,e.position,e.target,f)})),i({type:"showTip",dataIndexInside:l,dataIndex:u.getRawIndex(l),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(e,t,i){var r=t.tooltip;if("string"==typeof r){r={content:r,formatter:r}}var n=new p(r,this._tooltipModel,this._ecModel),a=n.get("content"),o=Math.random();this._showOrMove(n,(function(){this._showTooltipContent(n,a,n.get("formatterParams")||{},o,e.offsetX,e.offsetY,e.position,t)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,i,r,n,a,o,s,c){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,d=e.get("formatter");o=o||e.get("position");var h=t;if(d&&"string"==typeof d)h=l.formatTpl(d,i,!0);else if("function"==typeof d){var p=_((function(t,r){t===this._ticket&&(u.setContent(r,c,e),this._updatePosition(e,o,n,a,u,i,s))}),this);this._ticket=r,h=d(i,r,p)}u.setContent(h,c,e),u.show(e),this._updatePosition(e,o,n,a,u,i,s)}},_updatePosition:function(e,t,i,r,a,o,s){var l=this._api.getWidth(),c=this._api.getHeight();t=t||e.get("position");var u=a.getSize(),d=e.get("align"),p=e.get("verticalAlign"),f=s&&s.getBoundingRect().clone();if(s&&f.applyTransform(s.transform),"function"==typeof t&&(t=t([i,r],o,a.el,f,{viewSize:[l,c],contentSize:u.slice()})),n.isArray(t))i=C(t[0],l),r=C(t[1],c);else if(n.isObject(t)){t.width=u[0],t.height=u[1];var m=h.getLayoutRect(t,{width:l,height:c});i=m.x,r=m.y,d=null,p=null}else if("string"==typeof t&&s){var g=function(e,t,i){var r=i[0],n=i[1],a=0,o=0,s=t.width,l=t.height;switch(e){case"inside":a=t.x+s/2-r/2,o=t.y+l/2-n/2;break;case"top":a=t.x+s/2-r/2,o=t.y-n-5;break;case"bottom":a=t.x+s/2-r/2,o=t.y+l+5;break;case"left":a=t.x-r-5,o=t.y+l/2-n/2;break;case"right":a=t.x+s+5,o=t.y+l/2-n/2}return[a,o]}(t,f,u);i=g[0],r=g[1]}else{g=function(e,t,i,r,n,a,o){var s=i.getOuterSize(),l=s.width,c=s.height;null!=a&&(e+l+a>r?e-=l+a:e+=a);null!=o&&(t+c+o>n?t-=c+o:t+=o);return[e,t]}(i,r,a,l,c,d?null:20,p?null:20);i=g[0],r=g[1]}if(d&&(i-=E(d)?u[0]/2:"right"===d?u[0]:0),p&&(r-=E(p)?u[1]/2:"bottom"===p?u[1]:0),e.get("confine")){g=function(e,t,i,r,n){var a=i.getOuterSize(),o=a.width,s=a.height;return e=Math.min(e+o,r)-o,t=Math.min(t+s,n)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(i,r,a,l,c);i=g[0],r=g[1]}a.moveTo(i,r)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,i=!!t&&t.length===e.length;return i&&v(t,(function(t,r){var n=t.dataByAxis||{},a=(e[r]||{}).dataByAxis||[];(i&=n.length===a.length)&&v(n,(function(e,t){var r=a[t]||{},n=e.seriesDataIndices||[],o=r.seriesDataIndices||[];(i&=e.value===r.value&&e.axisType===r.axisType&&e.axisId===r.axisId&&n.length===o.length)&&v(n,(function(e,t){var r=o[t];i&=e.seriesIndex===r.seriesIndex&&e.dataIndex===r.dataIndex}))}))})),this._lastDataByCoordSys=e,!!i},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){a.node||(this._tooltipContent.dispose(),f.unregister("itemTooltip",t))}});function S(e){for(var t=e.pop();e.length;){var i=e.pop();i&&(p.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),t=new p(i,t,t.ecModel))}return t}function T(e,t){return e.dispatchAction||n.bind(t.dispatchAction,t)}function E(e){return"center"===e||"middle"===e}e.exports=b},function(e,t,i){var r=i(0),n=i(24),a=i(23),o=i(148),s=i(11),l=i(7),c=r.each,u=l.toCamelCase,d=["","-webkit-","-moz-","-o-"];function h(e){var t,i,a=[],o=e.get("transitionDuration"),h=e.get("backgroundColor"),p=e.getModel("textStyle"),f=e.get("padding");return o&&a.push((i="left "+(t=o)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)",r.map(d,(function(e){return e+"transition:"+i})).join(";"))),h&&(s.canvasSupported?a.push("background-Color:"+h):(a.push("background-Color:#"+n.toHex(h)),a.push("filter:alpha(opacity=70)"))),c(["width","color","radius"],(function(t){var i="border-"+t,r=u(i),n=e.get(r);null!=n&&a.push(i+":"+n+("color"===t?"":"px"))})),a.push(function(e){var t=[],i=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont());var n=e.get("lineHeight");null==n&&(n=Math.round(3*i/2)),i&&t.push("line-height:"+n+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),c(["decoration","align"],(function(i){var r=e.get(i);r&&t.push("text-"+i+":"+r)})),t.join(";")}(p)),null!=f&&a.push("padding:"+l.normalizeCssArray(f).join("px ")+"px"),a.join(";")+";"}function p(e,t,i,r,n){var a=t&&t.painter;if(i){var s=a&&a.getViewportRoot();s&&o.transformLocalCoord(e,s,document.body,r,n)}else{e[0]=r,e[1]=n;var l=a&&a.getViewportRootOffset();l&&(e[0]+=l.offsetLeft,e[1]+=l.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}function f(e,t,i){if(s.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var n=this._zr=t.getZr(),o=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],p(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(r):e.appendChild(r),this._container=e,this._show=!1,this._hideTimeout;var l=this;r.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!l._enterable){var t=n.handler,i=n.painter.getViewportRoot();a.normalizeEvent(i,e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1}}f.prototype={constructor:f,_enterable:!0,update:function(e){var t=this._container,i=t.currentStyle||document.defaultView.getComputedStyle(t),r=t.style;"absolute"!==r.position&&"absolute"!==i.position&&(r.position="relative"),e.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var e=this._styleCoord[2],t=this._styleCoord[3],i=e*this._zr.getWidth(),r=t*this._zr.getHeight();this.moveTo(i,r)},show:function(e){clearTimeout(this._hideTimeout);var t=this.el,i=this._styleCoord;t.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+h(e)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(e.get("extraCssText")||""),t.style.display=t.innerHTML?"block":"none",t.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(e){this.el.innerHTML=null==e?"":e},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el;return[e.clientWidth,e.clientHeight]},moveTo:function(e,t){var i=this._styleCoord;p(i,this._zr,this._appendToBody,e,t);var r=this.el.style;r.left=i[0]+"px",r.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(r.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var e=this.el.clientWidth,t=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(e+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),t+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:t}}};var m=f;e.exports=m},function(e,t,i){var r=i(0),n=i(41),a=i(2);function o(e,t,i,r){e[0]=i,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}function s(e){var t=this._zr=e.getZr();this._styleCoord=[0,0,0,0],o(this._styleCoord,t,e.getWidth()/2,e.getHeight()/2),this._show=!1,this._hideTimeout}s.prototype={constructor:s,_enterable:!0,update:function(e){e.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var e=this._styleCoord[2],t=this._styleCoord[3],i=e*this._zr.getWidth(),r=t*this._zr.getHeight();this.moveTo(i,r)},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,i){this.el&&this._zr.remove(this.el);for(var r={},o=e,s=o.indexOf("{marker");s>=0;){var l=o.indexOf("|}"),c=o.substr(s+"{marker".length,l-s-"{marker".length);c.indexOf("sub")>-1?r["marker"+c]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[c],textOffset:[3,0]}:r["marker"+c]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[c]},s=(o=o.substr(l+1)).indexOf("{marker")}var u=i.getModel("textStyle"),d=u.get("fontSize"),h=i.get("textLineHeight");null==h&&(h=Math.round(3*d/2)),this.el=new n({style:a.setTextStyle({},u,{rich:r,text:e,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding"),textLineHeight:h}),z:i.get("z")}),this._zr.add(this.el);var p=this;this.el.on("mouseover",(function(){p._enterable&&(clearTimeout(p._hideTimeout),p._show=!0),p._inContent=!0})),this.el.on("mouseout",(function(){p._enterable&&p._show&&p.hideLater(p._hideDelay),p._inContent=!1}))},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el.getBoundingRect();return[e.width,e.height]},moveTo:function(e,t){if(this.el){var i=this._styleCoord;o(i,this._zr,e,t),this.el.attr("position",[i[0],i[1]])}},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(r.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var e=this.getSize();return{width:e[0],height:e[1]}}};var l=s;e.exports=l},function(e,t,i){var r=i(1),n=i(519);i(215),i(521),i(522),i(523),i(524),r.registerPreprocessor(n)},function(e,t,i){var r=i(0),n=["rect","polygon","keep","clear"];e.exports=function(e,t){var i=e&&e.brush;if(r.isArray(i)||(i=i?[i]:[]),i.length){var a=[];r.each(i,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(a=a.concat(t))}));var o=e&&e.toolbox;r.isArray(o)&&(o=o[0]),o||(o={feature:{}},e.toolbox=[o]);var s,l,c=o.feature||(o.feature={}),u=c.brush||(c.brush={}),d=u.type||(u.type=[]);d.push.apply(d,a),s=d,l={},r.each(s,(function(e){l[e]=1})),s.length=0,r.each(l,(function(e,t){s.push(t)})),t&&!d.length&&d.push.apply(d,n)}}},function(e,t,i){var r=i(181),n=i(9),a=i(2).linePolygonIntersect;function o(e){var t=["x","y"],i=["width","height"];return{point:function(t,i,r){if(t){var n=r.range;return s(t[e],n)}},rect:function(r,n,a){if(r){var o=a.range,l=[r[t[e]],r[t[e]]+r[i[e]]];return l[1]<l[0]&&l.reverse(),s(l[0],o)||s(l[1],o)||s(o[0],l)||s(o[1],l)}}}}function s(e,t){return t[0]<=e&&e<=t[1]}var l={lineX:o(0),lineY:o(1),rect:{point:function(e,t,i){return e&&i.boundingRect.contain(e[0],e[1])},rect:function(e,t,i){return e&&i.boundingRect.intersect(e)}},polygon:{point:function(e,t,i){return e&&i.boundingRect.contain(e[0],e[1])&&r.contain(i.range,e[0],e[1])},rect:function(e,t,i){var o=i.range;if(!e||o.length<=1)return!1;var s=e.x,l=e.y,c=e.width,u=e.height,d=o[0];return!!(r.contain(o,s,l)||r.contain(o,s+c,l)||r.contain(o,s,l+u)||r.contain(o,s+c,l+u)||n.create(e).contain(d[0],d[1])||a(s,l,s+c,l,o)||a(s,l,s,l+u,o)||a(s+c,l,s+c,l+u,o)||a(s,l+u,s+c,l+u,o))||void 0}}};e.exports=l},function(e,t,i){i(5).__DEV__;var r=i(1),n=i(0),a=i(95),o=i(12),s=["#ddd"];function l(e,t){return n.merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new o(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var c=r.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(e,t){var i=this.option;!t&&a.replaceVisualOption(i,e,["inBrush","outOfBrush"]);var r=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:s},r.hasOwnProperty("liftZ")||(r.liftZ=5)},setAreas:function(e){e&&(this.areas=n.map(e,(function(e){return l(this.option,e)}),this))},setBrushOption:function(e){this.brushOption=l(this.option,e),this.brushType=this.brushOption.brushType}});e.exports=c},function(e,t,i){var r=i(1),n=i(0),a=i(121),o=i(215).layoutCovers,s=r.extendComponentView({type:"brush",init:function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new a(t.getZr())).on("brush",n.bind(this._onBrush,this)).mount()},render:function(e){return this.model=e,l.apply(this,arguments)},updateTransform:function(e,t){return o(t),l.apply(this,arguments)},updateView:l,dispose:function(){this._brushController.dispose()},_onBrush:function(e,t){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(e,this.ecModel),(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n.clone(e),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:n.clone(e),$from:i})}});function l(e,t,i,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}e.exports=s},function(e,t,i){var r=i(1);r.registerAction({type:"brush",event:"brush"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}))},function(e,t,i){var r=i(0),n=i(37),a=i(34).toolbox.brush;function o(e,t,i){this.model=e,this.ecModel=t,this.api=i,this._brushType,this._brushMode}o.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.clone(a.title)};var s=o.prototype;s.render=s.updateView=function(e,t,i){var n,a,o;t.eachComponent({mainType:"brush"},(function(e){n=e.brushType,a=e.brushOption.brushMode||"single",o|=e.areas.length})),this._brushType=n,this._brushMode=a,r.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?o:t===n)?"emphasis":"normal")}))},s.getIcons=function(){var e=this.model,t=e.get("icon",!0),i={};return r.each(e.get("type",!0),(function(e){t[e]&&(i[e]=t[e])})),i},s.onclick=function(e,t,i){var r=this._brushType,n=this._brushMode;"clear"===i?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?r:r!==i&&i,brushMode:"keep"===i?"multiple"===n?"single":"multiple":n}})},n.register("brush",o);var l=o;e.exports=l},function(e,t,i){var r=i(0),n=i(1),a=i(2),o=i(6).getLayoutRect,s=i(7).windowOpen;n.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),n.extendComponentView({type:"title",render:function(e,t,i){if(this.group.removeAll(),e.get("show")){var n=this.group,l=e.getModel("textStyle"),c=e.getModel("subtextStyle"),u=e.get("textAlign"),d=r.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),h=new a.Text({style:a.setTextStyle({},l,{text:e.get("text"),textFill:l.getTextColor()},{disableBox:!0}),z2:10}),p=h.getBoundingRect(),f=e.get("subtext"),m=new a.Text({style:a.setTextStyle({},c,{text:f,textFill:c.getTextColor(),y:p.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),g=e.get("link"),y=e.get("sublink"),_=e.get("triggerEvent",!0);h.silent=!g&&!_,m.silent=!y&&!_,g&&h.on("click",(function(){s(g,"_"+e.get("target"))})),y&&m.on("click",(function(){s(y,"_"+e.get("subtarget"))})),h.eventData=m.eventData=_?{componentType:"title",componentIndex:e.componentIndex}:null,n.add(h),f&&n.add(m);var v=n.getBoundingRect(),C=e.getBoxLayoutParams();C.width=v.width,C.height=v.height;var x=o(C,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));u||("middle"===(u=e.get("left")||e.get("right"))&&(u="center"),"right"===u?x.x+=x.width:"center"===u&&(x.x+=x.width/2)),d||("center"===(d=e.get("top")||e.get("bottom"))&&(d="middle"),"bottom"===d?x.y+=x.height:"middle"===d&&(x.y+=x.height/2),d=d||"top"),n.attr("position",[x.x,x.y]);var b={textAlign:u,textVerticalAlign:d};h.setStyle(b),m.setStyle(b),v=n.getBoundingRect();var S=x.margin,T=e.getItemStyle(["color","opacity"]);T.fill=e.get("backgroundColor");var E=new a.Rect({shape:{x:v.x-S[3],y:v.y-S[0],width:v.width+S[1]+S[3],height:v.height+S[0]+S[2],r:e.get("borderRadius")},style:T,subPixelOptimize:!0,silent:!0});n.add(E)}}})},function(e,t,i){var r=i(1),n=i(527);i(528),i(529),i(530),i(532),r.registerPreprocessor(n)},function(e,t,i){var r=i(0);function n(e){var t=e.itemStyle||(e.itemStyle={}),i=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},o=n.normal||(n.normal={}),s={normal:1,emphasis:1};r.each(n,(function(e,t){s[t]||a(o,t)||(o[t]=e)})),i.label&&!a(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function a(e,t){return e.hasOwnProperty(t)}e.exports=function(e){var t=e&&e.timeline;r.isArray(t)||(t=t?[t]:[]),r.each(t,(function(e){e&&function(e){var t=e.type,i={number:"value",time:"time"};i[t]&&(e.axisType=i[t],delete e.type);if(n(e),a(e,"controlPosition")){var o=e.controlStyle||(e.controlStyle={});a(o,"position")||(o.position=e.controlPosition),"none"!==o.position||a(o,"show")||(o.show=!1,delete o.position),delete e.controlPosition}r.each(e.data||[],(function(e){r.isObject(e)&&!r.isArray(e)&&(!a(e,"value")&&a(e,"name")&&(e.value=e.name),n(e))}))}(e)}))}},function(e,t,i){i(13).registerSubTypeDefaulter("timeline",(function(){return"slider"}))},function(e,t,i){var r=i(1),n=i(0);r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t){var i=t.getComponent("timeline");return i&&null!=e.currentIndex&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),t.resetOption("timeline"),n.defaults({currentIndex:i.option.currentIndex},e)})),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var i=t.getComponent("timeline");i&&null!=e.playState&&i.setPlayState(e.playState)}))},function(e,t,i){var r=i(0),n=i(531),a=i(107),o=n.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});r.mixin(o,a);var s=o;e.exports=s},function(e,t,i){var r=i(0),n=i(13),a=i(18),o=i(4),s=n.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(e,t,i){this._data,this._names,this.mergeDefaultAndTheme(e,i),this._initData()},mergeOption:function(e){s.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(e){this.option.autoPlay=!!e},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var e=this.option,t=e.data||[],i=e.axisType,n=this._names=[];if("category"===i){var s=[];r.each(t,(function(e,t){var i,a=o.getDataItemValue(e);r.isObject(e)?(i=r.clone(e)).value=t:i=t,s.push(i),r.isString(a)||null!=a&&!isNaN(a)||(a=""),n.push(a+"")})),t=s}var l={category:"ordinal",time:"time"}[i]||"number";(this._data=new a([{name:"value",type:l}],this)).initData(t,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),l=s;e.exports=l},function(e,t,i){var r=i(0),n=i(9),a=i(15),o=i(2),s=i(6),l=i(533),c=i(534),u=i(19).createSymbol,d=i(21),h=i(3),p=i(7).encodeHTML,f=r.bind,m=r.each,g=Math.PI,y=l.extend({type:"timeline.slider",init:function(e,t){this.api=t,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,r){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var n=this._layout(e,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(n,e);e.formatTooltip=function(e){return p(s.scale.getLabel(e))},m(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](n,a,s,e)}),this),this._renderAxisLabel(n,o,s,e),this._position(n,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(e,t){var i=e.get("label.position"),r=e.get("orient"),n=function(e,t){return s.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t);null==i||"auto"===i?i="horizontal"===r?n.y+n.height/2<t.getHeight()/2?"-":"+":n.x+n.width/2<t.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[r][i]);var a,o,l,c,u={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},d={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:g/2},p="vertical"===r?n.height:n.width,f=e.getModel("controlStyle"),m=f.get("show",!0),y=m?f.get("itemSize"):0,_=m?f.get("itemGap"):0,v=y+_,C=e.get("label.rotate")||0;C=C*g/180;var x=f.get("position",!0),b=m&&f.get("showPlayBtn",!0),S=m&&f.get("showPrevBtn",!0),T=m&&f.get("showNextBtn",!0),E=0,w=p;return"left"===x||"bottom"===x?(b&&(a=[0,0],E+=v),S&&(o=[E,0],E+=v),T&&(l=[w-y,0],w-=v)):(b&&(a=[w-y,0],w-=v),S&&(o=[0,0],E+=v),T&&(l=[w-y,0],w-=v)),c=[E,w],e.get("inverse")&&c.reverse(),{viewRect:n,mainLength:p,orient:r,rotation:h[r],labelRotation:C,labelPosOpt:i,labelAlign:e.get("label.align")||u[r],labelBaseline:e.get("label.verticalAlign")||e.get("label.baseline")||d[r],playPosition:a,prevBtnPosition:o,nextBtnPosition:l,axisExtent:c,controlSize:y,controlGap:_}},_position:function(e,t){var i=this._mainGroup,r=this._labelGroup,n=e.viewRect;if("vertical"===e.orient){var o=a.create(),s=n.x,l=n.y+n.height;a.translate(o,o,[-s,-l]),a.rotate(o,o,-g/2),a.translate(o,o,[s,l]),(n=n.clone()).applyTransform(o)}var c=_(n),u=_(i.getBoundingRect()),d=_(r.getBoundingRect()),h=i.position,p=r.position;p[0]=h[0]=c[0][0];var f,m=e.labelPosOpt;isNaN(m)?(v(h,u,c,1,f="+"===m?0:1),v(p,d,c,1,1-f)):(v(h,u,c,1,f=m>=0?0:1),p[1]=h[1]+m);function y(e){var t=e.position;e.origin=[c[0][0]-t[0],c[1][0]-t[1]]}function _(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,i,r,n){e[r]+=i[r][n]-t[r][n]}i.attr("position",h),r.attr("position",p),i.rotation=r.rotation=e.rotation,y(i),y(r)},_createAxis:function(e,t){var i=t.getData(),r=t.get("axisType"),n=d.createScaleByModel(t,r);n.getTicks=function(){return i.mapArray(["value"],(function(e){return e}))};var a=i.getDataExtent("value");n.setExtent(a[0],a[1]),n.niceTicks();var o=new c("value",n,e.axisExtent,r);return o.model=t,o},_createGroup:function(e){var t=this["_"+e]=new o.Group;return this.group.add(t),t},_renderAxisLine:function(e,t,i,n){var a=i.getExtent();n.get("lineStyle.show")&&t.add(new o.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(e,t,i,r){var n=r.getData(),a=i.scale.getTicks();m(a,(function(e){var a=i.dataToCoord(e),s=n.getItemModel(e),l=s.getModel("itemStyle"),c=s.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:f(this._changeTimeline,this,e)},d=_(s,l,t,u);o.setHoverStyle(d,c.getItemStyle()),s.get("tooltip")?(d.dataIndex=e,d.dataModel=r):d.dataIndex=d.dataModel=null}),this)},_renderAxisLabel:function(e,t,i,r){if(i.getLabelModel().get("show")){var n=r.getData(),a=i.getViewLabels();m(a,(function(r){var a=r.tickValue,s=n.getItemModel(a),l=s.getModel("label"),c=s.getModel("emphasis.label"),u=i.dataToCoord(r.tickValue),d=new o.Text({position:[u,0],rotation:e.labelRotation-e.rotation,onclick:f(this._changeTimeline,this,a),silent:!1});o.setTextStyle(d.style,l,{text:r.formattedLabel,textAlign:e.labelAlign,textVerticalAlign:e.labelBaseline}),t.add(d),o.setHoverStyle(d,o.setTextStyle({},c))}),this)}},_renderControl:function(e,t,i,r){var a=e.controlSize,s=e.rotation,l=r.getModel("controlStyle").getItemStyle(),c=r.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-a/2,a,a],d=r.getPlayState(),h=r.get("inverse",!0);function p(e,i,d,h){if(e){var p=function(e,t,i,r){var a=r.style,s=o.createIcon(e.get(t),r||{},new n(i[0],i[1],i[2],i[3]));a&&s.setStyle(a);return s}(r,i,u,{position:e,origin:[a/2,0],rotation:h?-s:0,rectHover:!0,style:l,onclick:d});t.add(p),o.setHoverStyle(p,c)}}p(e.nextBtnPosition,"controlStyle.nextIcon",f(this._changeTimeline,this,h?"-":"+")),p(e.prevBtnPosition,"controlStyle.prevIcon",f(this._changeTimeline,this,h?"+":"-")),p(e.playPosition,"controlStyle."+(d?"stopIcon":"playIcon"),f(this._handlePlayClick,this,!d),!0)},_renderCurrentPointer:function(e,t,i,r){var n=r.getData(),a=r.getCurrentIndex(),o=n.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=f(s._handlePointerDrag,s),e.ondragend=f(s._handlePointerDragend,s),v(e,a,i,r,!0)},onUpdate:function(e){v(e,a,i,r)}};this._currentPointer=_(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},_handlePointerDrag:function(e,t,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},_pointerChangeTimeline:function(e,t){var i=this._toAxisCoord(e)[0],r=this._axis,n=h.asc(r.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var a=this._findNearestTick(i),o=this.model;(t||a!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(a)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(f((function(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(e){var t=this._mainGroup.getLocalTransform();return o.applyTransform(e,t,!0)},_findNearestTick:function(e){var t,i=this.model.getData(),r=1/0,n=this._axis;return i.each(["value"],(function(i,a){var o=n.dataToCoord(i),s=Math.abs(o-e);s<r&&(r=s,t=a)})),t},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})}});function _(e,t,i,n,a,o){var s=t.get("color");if(a)a.setColor(s),i.add(a),o&&o.onUpdate(a);else{var l=e.get("symbol");(a=u(l,-1,-1,2,2,s)).setStyle("strokeNoScale",!0),i.add(a),o&&o.onCreate(a)}var c=t.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(c),n=r.merge({rectHover:!0,z2:100},n,!0);var d=e.get("symbolSize");(d=d instanceof Array?d.slice():[+d,+d])[0]/=2,d[1]/=2,n.scale=d;var p=e.get("symbolOffset");if(p){var f=n.position=n.position||[0,0];f[0]+=h.parsePercent(p[0],d[0]),f[1]+=h.parsePercent(p[1],d[1])}var m=e.get("symbolRotate");return n.rotation=(m||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function v(e,t,i,r,n){if(!e.dragging){var a=r.getModel("checkpointStyle"),o=i.dataToCoord(r.getData().get(["value"],t));n||!a.get("animation",!0)?e.attr({position:[o,0]}):(e.stopAnimation(!0),e.animateTo({position:[o,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}e.exports=y},function(e,t,i){var r=i(83).extend({type:"timeline"});e.exports=r},function(e,t,i){var r=i(0),n=i(35),a=function(e,t,i,r){n.call(this,e,t,i),this.type=r||"value",this.model=null};a.prototype={constructor:a,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},r.inherits(a,n);var o=a;e.exports=o},function(e,t,i){var r=i(1);i(536),i(537),r.registerPreprocessor((function(e){e.markPoint=e.markPoint||{}}))},function(e,t,i){var r=i(128).extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});e.exports=r},function(e,t,i){var r=i(0),n=i(67),a=i(3),o=i(18),s=i(129);function l(e,t,i){var r=t.coordinateSystem;e.each((function(n){var o,s=e.getItemModel(n),l=a.parsePercent(s.get("x"),i.getWidth()),c=a.parsePercent(s.get("y"),i.getHeight());if(isNaN(l)||isNaN(c)){if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var u=e.get(r.dimensions[0],n),d=e.get(r.dimensions[1],n);o=r.dataToPoint([u,d])}}else o=[l,c];isNaN(l)||(o[0]=l),isNaN(c)||(o[1]=c),e.setItemLayout(n,o)}))}var c=i(130).extend({type:"markPoint",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markPointModel;t&&(l(t.getData(),e,i),this.markerGroupMap.get(e.id).updateLayout(t))}),this)},renderSeries:function(e,t,i,a){var c=e.coordinateSystem,u=e.id,d=e.getData(),h=this.markerGroupMap,p=h.get(u)||h.set(u,new n),f=function(e,t,i){var n;n=e?r.map(e&&e.dimensions,(function(e){var i=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return r.defaults({name:e},i)})):[{name:"value",type:"float"}];var a=new o(n,i),l=r.map(i.get("data"),r.curry(s.dataTransform,t));e&&(l=r.filter(l,r.curry(s.dataFilter,e)));return a.initData(l,null,e?s.dimValueGetter:function(e){return e.value}),a}(c,e,t);t.setData(f),l(t.getData(),e,a),f.each((function(e){var i=f.getItemModel(e),n=i.getShallow("symbol"),a=i.getShallow("symbolSize"),o=i.getShallow("symbolRotate"),s=r.isFunction(n),l=r.isFunction(a),c=r.isFunction(o);if(s||l||c){var u=t.getRawValue(e),h=t.getDataParams(e);s&&(n=n(u,h)),l&&(a=a(u,h)),c&&(o=o(u,h))}f.setItemVisual(e,{symbol:n,symbolSize:a,symbolRotate:o,color:i.get("itemStyle.color")||d.getVisual("color")})})),p.updateData(f),this.group.add(p.group),f.eachItemGraphicEl((function(e){e.traverse((function(e){e.dataModel=t}))})),p.__keep=!0,p.group.silent=t.get("silent")||e.get("silent")}});e.exports=c},function(e,t,i){var r=i(1);i(539),i(540),r.registerPreprocessor((function(e){e.markLine=e.markLine||{}}))},function(e,t,i){var r=i(128).extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});e.exports=r},function(e,t,i){var r=i(0),n=i(18),a=i(3),o=i(129),s=i(118),l=i(130),c=i(26).getStackedDimension,u=function(e,t,i,n){var a=e.getData(),s=n.type;if(!r.isArray(n)&&("min"===s||"max"===s||"average"===s||"median"===s||null!=n.xAxis||null!=n.yAxis)){var l,u;if(null!=n.yAxis||null!=n.xAxis)l=t.getAxis(null!=n.yAxis?"y":"x"),u=r.retrieve(n.yAxis,n.xAxis);else{var d=o.getAxisInfo(n,a,t,e);l=d.valueAxis;var h=c(a,d.valueDataDim);u=o.numCalculate(a,h,s)}var p="x"===l.dim?0:1,f=1-p,m=r.clone(n),g={};m.type=null,m.coord=[],g.coord=[],m.coord[f]=-1/0,g.coord[f]=1/0;var y=i.get("precision");y>=0&&"number"==typeof u&&(u=+u.toFixed(Math.min(y,20))),m.coord[p]=g.coord[p]=u,n=[m,g,{type:s,valueIndex:n.valueIndex,value:u}]}return(n=[o.dataTransform(e,n[0]),o.dataTransform(e,n[1]),r.extend({},n[2])])[2].type=n[2].type||"",r.merge(n[2],n[0]),r.merge(n[2],n[1]),n};function d(e){return!isNaN(e)&&!isFinite(e)}function h(e,t,i,r){var n=1-e,a=r.dimensions[e];return d(t[n])&&d(i[n])&&t[e]===i[e]&&r.getAxis(a).containData(t[e])}function p(e,t){if("cartesian2d"===e.type){var i=t[0].coord,r=t[1].coord;if(i&&r&&(h(1,i,r,e)||h(0,i,r,e)))return!0}return o.dataFilter(e,t[0])&&o.dataFilter(e,t[1])}function f(e,t,i,r,n){var o,s=r.coordinateSystem,l=e.getItemModel(t),c=a.parsePercent(l.get("x"),n.getWidth()),u=a.parsePercent(l.get("y"),n.getHeight());if(isNaN(c)||isNaN(u)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var h=s.dimensions,p=e.get(h[0],t),f=e.get(h[1],t);o=s.dataToPoint([p,f])}if("cartesian2d"===s.type){var m=s.getAxis("x"),g=s.getAxis("y");h=s.dimensions;d(e.get(h[0],t))?o[0]=m.toGlobalCoord(m.getExtent()[i?0:1]):d(e.get(h[1],t))&&(o[1]=g.toGlobalCoord(g.getExtent()[i?0:1]))}isNaN(c)||(o[0]=c),isNaN(u)||(o[1]=u)}else o=[c,u];e.setItemLayout(t,o)}var m=l.extend({type:"markLine",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markLineModel;if(t){var r=t.getData(),n=t.__from,a=t.__to;n.each((function(t){f(n,t,!0,e,i),f(a,t,!1,e,i)})),r.each((function(e){r.setItemLayout(e,[n.getItemLayout(e),a.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},renderSeries:function(e,t,i,a){var l=e.coordinateSystem,c=e.id,d=e.getData(),h=this.markerGroupMap,m=h.get(c)||h.set(c,new s);this.group.add(m.group);var g=function(e,t,i){var a;a=e?r.map(e&&e.dimensions,(function(e){var i=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return r.defaults({name:e},i)})):[{name:"value",type:"float"}];var s=new n(a,i),l=new n(a,i),c=new n([],i),d=r.map(i.get("data"),r.curry(u,t,e,i));e&&(d=r.filter(d,r.curry(p,e)));var h=e?o.dimValueGetter:function(e){return e.value};return s.initData(r.map(d,(function(e){return e[0]})),null,h),l.initData(r.map(d,(function(e){return e[1]})),null,h),c.initData(r.map(d,(function(e){return e[2]}))),c.hasItemOption=!0,{from:s,to:l,line:c}}(l,e,t),y=g.from,_=g.to,v=g.line;t.__from=y,t.__to=_,t.setData(v);var C=t.get("symbol"),x=t.get("symbolSize");function b(t,i,r){var n=t.getItemModel(i);f(t,i,r,e,a),t.setItemVisual(i,{symbolRotate:n.get("symbolRotate"),symbolSize:n.get("symbolSize")||x[r?0:1],symbol:n.get("symbol",!0)||C[r?0:1],color:n.get("itemStyle.color")||d.getVisual("color")})}r.isArray(C)||(C=[C,C]),"number"==typeof x&&(x=[x,x]),g.from.each((function(e){b(y,e,!0),b(_,e,!1)})),v.each((function(e){var t=v.getItemModel(e).get("lineStyle.color");v.setItemVisual(e,{color:t||y.getItemVisual(e,"color")}),v.setItemLayout(e,[y.getItemLayout(e),_.getItemLayout(e)]),v.setItemVisual(e,{fromSymbolRotate:y.getItemVisual(e,"symbolRotate"),fromSymbolSize:y.getItemVisual(e,"symbolSize"),fromSymbol:y.getItemVisual(e,"symbol"),toSymbolRotate:_.getItemVisual(e,"symbolRotate"),toSymbolSize:_.getItemVisual(e,"symbolSize"),toSymbol:_.getItemVisual(e,"symbol")})})),m.updateData(v),g.line.eachItemGraphicEl((function(e,i){e.traverse((function(e){e.dataModel=t}))})),m.__keep=!0,m.group.silent=t.get("silent")||e.get("silent")}});e.exports=m},function(e,t,i){var r=i(1);i(542),i(543),r.registerPreprocessor((function(e){e.markArea=e.markArea||{}}))},function(e,t,i){var r=i(128).extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});e.exports=r},function(e,t,i){var r=i(0),n=i(24),a=i(18),o=i(3),s=i(2),l=i(129),c=i(130),u=function(e,t,i,n){var a=l.dataTransform(e,n[0]),o=l.dataTransform(e,n[1]),s=r.retrieve,c=a.coord,u=o.coord;c[0]=s(c[0],-1/0),c[1]=s(c[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var d=r.mergeAll([{},a,o]);return d.coord=[a.coord,o.coord],d.x0=a.x,d.y0=a.y,d.x1=o.x,d.y1=o.y,d};function d(e){return!isNaN(e)&&!isFinite(e)}function h(e,t,i,r){var n=1-e;return d(t[n])&&d(i[n])}function p(e,t){var i=t.coord[0],r=t.coord[1];return!("cartesian2d"!==e.type||!i||!r||!h(1,i,r)&&!h(0,i,r))||(l.dataFilter(e,{coord:i,x:t.x0,y:t.y0})||l.dataFilter(e,{coord:r,x:t.x1,y:t.y1}))}function f(e,t,i,r,n){var a,s=r.coordinateSystem,l=e.getItemModel(t),c=o.parsePercent(l.get(i[0]),n.getWidth()),u=o.parsePercent(l.get(i[1]),n.getHeight());if(isNaN(c)||isNaN(u)){if(r.getMarkerPosition)a=r.getMarkerPosition(e.getValues(i,t));else{var h=[m=e.get(i[0],t),g=e.get(i[1],t)];s.clampData&&s.clampData(h,h),a=s.dataToPoint(h,!0)}if("cartesian2d"===s.type){var p=s.getAxis("x"),f=s.getAxis("y"),m=e.get(i[0],t),g=e.get(i[1],t);d(m)?a[0]=p.toGlobalCoord(p.getExtent()["x0"===i[0]?0:1]):d(g)&&(a[1]=f.toGlobalCoord(f.getExtent()["y0"===i[1]?0:1]))}isNaN(c)||(a[0]=c),isNaN(u)||(a[1]=u)}else a=[c,u];return a}var m=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];c.extend({type:"markArea",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markAreaModel;if(t){var n=t.getData();n.each((function(t){var a=r.map(m,(function(r){return f(n,t,r,e,i)}));n.setItemLayout(t,a),n.getItemGraphicEl(t).setShape("points",a)}))}}),this)},renderSeries:function(e,t,i,o){var l=e.coordinateSystem,c=e.id,h=e.getData(),g=this.markerGroupMap,y=g.get(c)||g.set(c,{group:new s.Group});this.group.add(y.group),y.__keep=!0;var _=function(e,t,i){var n,o;e?(n=r.map(e&&e.dimensions,(function(e){var i=t.getData(),n=i.getDimensionInfo(i.mapDimension(e))||{};return r.defaults({name:e},n)})),o=new a(r.map(["x0","y0","x1","y1"],(function(e,t){return{name:e,type:n[t%2].type}})),i)):o=new a(n=[{name:"value",type:"float"}],i);var s=r.map(i.get("data"),r.curry(u,t,e,i));e&&(s=r.filter(s,r.curry(p,e)));var l=e?function(e,t,i,r){return e.coord[Math.floor(r/2)][r%2]}:function(e){return e.value};return o.initData(s,null,l),o.hasItemOption=!0,o}(l,e,t);t.setData(_),_.each((function(t){var i=r.map(m,(function(i){return f(_,t,i,e,o)})),n=!0;r.each(m,(function(e){if(n){var i=_.get(e[0],t),r=_.get(e[1],t);(d(i)||l.getAxis("x").containData(i))&&(d(r)||l.getAxis("y").containData(r))&&(n=!1)}})),_.setItemLayout(t,{points:i,allClipped:n}),_.setItemVisual(t,{color:h.getVisual("color")})})),_.diff(y.__data).add((function(e){var t=_.getItemLayout(e);if(!t.allClipped){var i=new s.Polygon({shape:{points:t.points}});_.setItemGraphicEl(e,i),y.group.add(i)}})).update((function(e,i){var r=y.__data.getItemGraphicEl(i),n=_.getItemLayout(e);n.allClipped?r&&y.group.remove(r):(r?s.updateProps(r,{shape:{points:n.points}},t,e):r=new s.Polygon({shape:{points:n.points}}),_.setItemGraphicEl(e,r),y.group.add(r))})).remove((function(e){var t=y.__data.getItemGraphicEl(e);y.group.remove(t)})).execute(),_.eachItemGraphicEl((function(e,i){var a=_.getItemModel(i),o=a.getModel("label"),l=a.getModel("emphasis.label"),c=_.getItemVisual(i,"color");e.useStyle(r.defaults(a.getModel("itemStyle").getItemStyle(),{fill:n.modifyAlpha(c,.4),stroke:c})),e.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle(),s.setLabelStyle(e.style,e.hoverStyle,o,l,{labelFetcher:t,labelDataIndex:i,defaultText:_.getName(i)||"",isRectText:!0,autoColor:c}),s.setHoverStyle(e,{}),e.dataModel=t})),y.__data=_,y.group.silent=t.get("silent")||e.get("silent")}})},function(e,t,i){i(216),i(547),i(548),i(549)},function(e,t,i){var r=i(1),n=i(0);function a(e,t,i){var r,a={},o="toggleSelected"===e;return i.eachComponent("legend",(function(i){o&&null!=r?i[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?i[e]():(i[e](t.name),r=i.isSelected(t.name));var s=i.getData();n.each(s,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=i.isSelected(t);a.hasOwnProperty(t)?a[t]=a[t]&&r:a[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:a}:{name:t.name,selected:a}}r.registerAction("legendToggleSelect","legendselectchanged",n.curry(a,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",n.curry(a,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",n.curry(a,"inverseSelect")),r.registerAction("legendSelect","legendselected",n.curry(a,"select")),r.registerAction("legendUnSelect","legendunselected",n.curry(a,"unSelect"))},function(e,t){e.exports=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0}))}},function(e,t,i){var r=i(217),n=i(6),a=n.mergeLayoutParam,o=n.getLayoutParams,s=r.extend({type:"legend.scroll",setScrollDataIndex:function(e){this.option.scrollDataIndex=e},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(e,t,i,r){var n=o(e);s.superCall(this,"init",e,t,i,r),l(this,e,n)},mergeOption:function(e,t){s.superCall(this,"mergeOption",e,t),l(this,this.option,e)}});function l(e,t,i){var r=[1,1];r[e.getOrient().index]=0,a(t,i,{type:"box",ignoreSize:r})}var c=s;e.exports=c},function(e,t,i){var r=i(0),n=i(2),a=i(6),o=i(218),s=n.Group,l=["width","height"],c=["x","y"],u=o.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){u.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new s),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new s),this._showController},resetInner:function(){u.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,i,a,o,s,l){var c=this;u.superCall(this,"renderInner",e,t,i,a,o,s,l);var d=this._controllerGroup,h=t.get("pageIconSize",!0);r.isArray(h)||(h=[h,h]),f("pagePrev",0);var p=t.getModel("pageTextStyle");function f(e,i){var o=e+"DataIndex",s=n.createIcon(t.get("pageIcons",!0)[t.getOrient().name][i],{onclick:r.bind(c._pageGo,c,o,t,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});s.name=e,d.add(s)}d.add(new n.Text({name:"pageText",style:{textFill:p.getTextColor(),font:p.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),f("pageNext",1)},layoutInner:function(e,t,i,n,o,s){var u=this.getSelectorGroup(),d=e.getOrient().index,h=l[d],p=c[d],f=l[1-d],m=c[1-d];o&&a.box("horizontal",u,e.get("selectorItemGap",!0));var g=e.get("selectorButtonGap",!0),y=u.getBoundingRect(),_=[-y.x,-y.y],v=r.clone(i);o&&(v[h]=i[h]-y[h]-g);var C=this._layoutContentAndController(e,n,v,d,h,f,m);if(o){if("end"===s)_[d]+=C[h]+g;else{var x=y[h]+g;_[d]-=x,C[p]-=x}C[h]+=y[h]+g,_[1-d]+=C[m]+C[f]/2-y[f]/2,C[f]=Math.max(C[f],y[f]),C[m]=Math.min(C[m],y[m]+_[1-d]),u.attr("position",_)}return C},_layoutContentAndController:function(e,t,i,o,s,l,c){var u=this.getContentGroup(),d=this._containerGroup,h=this._controllerGroup;a.box(e.get("orient"),u,e.get("itemGap"),o?i.width:null,o?null:i.height),a.box("horizontal",h,e.get("pageButtonItemGap",!0));var p=u.getBoundingRect(),f=h.getBoundingRect(),m=this._showController=p[s]>i[s],g=[-p.x,-p.y];t||(g[o]=u.position[o]);var y=[0,0],_=[-f.x,-f.y],v=r.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));m&&("end"===e.get("pageButtonPosition",!0)?_[o]+=i[s]-f[s]:y[o]+=f[s]+v);_[1-o]+=p[l]/2-f[l]/2,u.attr("position",g),d.attr("position",y),h.attr("position",_);var C={x:0,y:0};if(C[s]=m?i[s]:p[s],C[l]=Math.max(p[l],f[l]),C[c]=Math.min(0,f[c]+_[1-o]),d.__rectSize=i[s],m){var x={x:0,y:0};x[s]=Math.max(i[s]-f[s]-v,0),x[l]=C[l],d.setClipPath(new n.Rect({shape:x})),d.__rectSize=x[s]}else h.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var b=this._getPageInfo(e);return null!=b.pageIndex&&n.updateProps(u,{position:b.contentPosition},!!m&&e),this._updatePageInfoView(e,b),C},_pageGo:function(e,t,i){var r=this._getPageInfo(t)[e];null!=r&&i.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},_updatePageInfoView:function(e,t){var i=this._controllerGroup;r.each(["pagePrev","pageNext"],(function(r){var n=null!=t[r+"DataIndex"],a=i.childOfName(r);a&&(a.setStyle("fill",n?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),a.cursor=n?"pointer":"default")}));var n=i.childOfName("pageText"),a=e.get("pageFormatter"),o=t.pageIndex,s=null!=o?o+1:0,l=t.pageCount;n&&a&&n.setStyle("text",r.isString(a)?a.replace("{current}",s).replace("{total}",l):a({current:s,total:l}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),i=this.getContentGroup(),r=this._containerGroup.__rectSize,n=e.getOrient().index,a=l[n],o=c[n],s=this._findTargetItemIndex(t),u=i.children(),d=u[s],h=u.length,p=h?1:0,f={contentPosition:i.position.slice(),pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return f;var m=C(d);f.contentPosition[n]=-m.s;for(var g=s+1,y=m,_=m,v=null;g<=h;++g)(!(v=C(u[g]))&&_.e>y.s+r||v&&!x(v,y.s))&&(y=_.i>y.i?_:v)&&(null==f.pageNextDataIndex&&(f.pageNextDataIndex=y.i),++f.pageCount),_=v;for(g=s-1,y=m,_=m,v=null;g>=-1;--g)(v=C(u[g]))&&x(_,v.s)||!(y.i<_.i)||(_=y,null==f.pagePrevDataIndex&&(f.pagePrevDataIndex=y.i),++f.pageCount,++f.pageIndex),y=v;return f;function C(e){if(e){var t=e.getBoundingRect(),i=t[o]+e.position[n];return{s:i,e:i+t[a],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(r,n){var a=r.__legendDataIndex;null==i&&null!=a&&(i=n),a===e&&(t=n)})),null!=t?t:i):0;var t,i}}),d=u;e.exports=d},function(e,t,i){i(1).registerAction("legendScroll","legendscroll",(function(e,t){var i=e.scrollDataIndex;null!=i&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(i)}))}))},function(e,t,i){i(219),i(220)},function(e,t,i){var r=i(56).extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});e.exports=r},function(e,t,i){var r=i(0),n=i(23),a=i(2),o=i(33),s=i(57),l=i(3),c=i(6),u=i(55),d=a.Rect,h=l.linearMap,p=l.asc,f=r.bind,m=r.each,g=["line","bar","candlestick","scatter"],y=s.extend({type:"dataZoom.slider",init:function(e,t){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=t},render:function(e,t,i,r){y.superApply(this,"render",arguments),o.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=e.get("orient"),!1!==this.dataZoomModel.get("show")?(r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){y.superApply(this,"remove",arguments),o.clear(this,"_dispatchZoomAction")},dispose:function(){y.superApply(this,"dispose",arguments),o.clear(this,"_dispatchZoomAction")},_buildView:function(){var e=this.group;e.removeAll(),this._resetLocation(),this._resetInterval();var t=this._displayables.barGroup=new a.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},_resetLocation:function(){var e=this.dataZoomModel,t=this.api,i=this._findCoordRect(),n={width:t.getWidth(),height:t.getHeight()},a="horizontal"===this._orient?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=c.getLayoutParams(e.option);r.each(["right","top","width","height"],(function(e){"ph"===o[e]&&(o[e]=a[e])}));var s=c.getLayoutRect(o,n,e.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var e=this.group,t=this._location,i=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),n=r&&r.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr("horizontal"!==i||n?"horizontal"===i&&n?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==i||n?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=e.getBoundingRect([a]);e.attr("position",[t.x-s.x,t.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var e=this.dataZoomModel,t=this._size,i=this._displayables.barGroup;i.add(new d({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40})),i.add(new d({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:r.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var t=this._size,i=e.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():e.otherDim;if(null!=o){var s=n.getDataExtent(o),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var c,u=[0,t[1]],d=[0,t[0]],p=[[t[0],0],[0,0]],f=[],m=d[1]/(n.count()-1),g=0,y=Math.round(n.count()/t[0]);n.each([o],(function(e,t){if(y>0&&t%y)g+=m;else{var i=null==e||isNaN(e)||""===e,r=i?0:h(e,s,u,!0);i&&!c&&t?(p.push([p[p.length-1][0],0]),f.push([f[f.length-1][0],0])):!i&&c&&(p.push([g,0]),f.push([g,0])),p.push([g,r]),f.push([g,r]),g+=m,c=i}}));var _=this.dataZoomModel;this._displayables.barGroup.add(new a.Polygon({shape:{points:p},style:r.defaults({fill:_.get("dataBackgroundColor")},_.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new a.Polyline({shape:{points:f},style:_.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var i,n=this.ecModel;return e.eachTargetAxis((function(a,o){var s=e.getAxisProxy(a.name,o).getTargetSeriesModels();r.each(s,(function(e){if(!(i||!0!==t&&r.indexOf(g,e.get("type"))<0)){var s,l=n.getComponent(a.axis,o).axis,c={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],u=e.coordinateSystem;null!=c&&u.getOtherAxis&&(s=u.getOtherAxis(l).inverse),c=e.getData().mapDimension(c),i={thisAxis:l,series:e,thisDim:a.name,otherDim:c,otherAxisInverse:s}}}),this)}),this),i}},_renderHandle:function(){var e=this._displayables,t=e.handles=[],i=e.handleLabels=[],r=this._displayables.barGroup,n=this._size,o=this.dataZoomModel;r.add(e.filler=new d({draggable:!0,cursor:_(this._orient),drift:f(this._onDragMove,this,"all"),ondragstart:f(this._showDataInfo,this,!0),ondragend:f(this._onDragEnd,this),onmouseover:f(this._showDataInfo,this,!0),onmouseout:f(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),r.add(new d({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),m([0,1],(function(e){var n=a.createIcon(o.get("handleIcon"),{cursor:_(this._orient),draggable:!0,drift:f(this._onDragMove,this,e),ondragend:f(this._onDragEnd,this),onmouseover:f(this._showDataInfo,this,!0),onmouseout:f(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),s=n.getBoundingRect();this._handleHeight=l.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=s.width/s.height*this._handleHeight,n.setStyle(o.getModel("handleStyle").getItemStyle());var c=o.get("handleColor");null!=c&&(n.style.fill=c),r.add(t[e]=n);var u=o.textStyleModel;this.group.add(i[e]=new a.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:u.getTextColor(),textFont:u.getFont()},z2:10}))}),this)},_resetInterval:function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[h(e[0],[0,100],t,!0),h(e[1],[0,100],t,!0)]},_updateInterval:function(e,t){var i=this.dataZoomModel,r=this._handleEnds,n=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];u(t,r,n,i.get("zoomLock")?"all":e,null!=a.minSpan?h(a.minSpan,o,n,!0):null,null!=a.maxSpan?h(a.maxSpan,o,n,!0):null);var s=this._range,l=this._range=p([h(r[0],n,o,!0),h(r[1],n,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(e){var t=this._displayables,i=this._handleEnds,r=p(i.slice()),n=this._size;m([0,1],(function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scale:[a/2,a/2],position:[i[e],n[1]/2-a/2]})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:n[1]}),this._updateDataInfo(e)},_updateDataInfo:function(e){var t=this.dataZoomModel,i=this._displayables,r=i.handleLabels,n=this._orient,o=["",""];if(t.get("showDetail")){var s=t.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,c=this._range,u=e?s.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:s.getDataValueWindow();o=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var d=p(this._handleEnds.slice());function h(e){var t=a.getTransform(i.handles[e].parent,this.group),s=a.transformDirection(0===e?"right":"left",t),l=this._handleWidth/2+5,c=a.applyTransform([d[e]+(0===e?-l:l),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],textVerticalAlign:"horizontal"===n?"middle":s,textAlign:"horizontal"===n?s:"center",text:o[e]})}h.call(this,0),h.call(this,1)},_formatLabel:function(e,t){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");null!=a&&"auto"!==a||(a=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel(Math.round(e)):e.toFixed(Math.min(a,20));return r.isFunction(n)?n(e,o):r.isString(n)?n.replace("{value}",o):o},_showDataInfo:function(e){e=this._dragging||e;var t=this._displayables.handleLabels;t[0].attr("invisible",!e),t[1].attr("invisible",!e)},_onDragMove:function(e,t,i,r){this._dragging=!0,n.stop(r.event);var o=this._displayables.barGroup.getLocalTransform(),s=a.applyTransform([t,i],o,!0),l=this._updateInterval(e,s[0]),c=this.dataZoomModel.get("realtime");this._updateView(!c),l&&c&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(e){var t=this._size,i=this._displayables.barGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(i[0]<0||i[0]>t[0]||i[1]<0||i[1]>t[1])){var r=this._handleEnds,n=(r[0]+r[1])/2,a=this._updateInterval("all",i[0]-n);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:e[0],end:e[1]})},_findCoordRect:function(){var e;if(m(this.getTargetCoordInfo(),(function(t){if(!e&&t.length){var i=t[0].model.coordinateSystem;e=i.getRect&&i.getRect()}})),!e){var t=this.api.getWidth(),i=this.api.getHeight();e={x:.2*t,y:.2*i,width:.6*t,height:.6*i}}return e}});function _(e){return"vertical"===e?"ns-resize":"ew-resize"}var v=y;e.exports=v},function(e,t,i){var r=i(56).extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});e.exports=r},function(e,t,i){var r=i(0),n=i(57),a=i(55),o=i(555),s=r.bind,l=n.extend({type:"dataZoom.inside",init:function(e,t){this._range},render:function(e,t,i,n){l.superApply(this,"render",arguments),this._range=e.getPercentRange(),r.each(this.getTargetCoordInfo(),(function(t,n){var a=r.map(t,(function(e){return o.generateCoordId(e.model)}));r.each(t,(function(t){var l=t.model,u={};r.each(["pan","zoom","scrollMove"],(function(e){u[e]=s(c[e],this,t,n)}),this),o.register(i,{coordId:o.generateCoordId(l),allCoordIds:a,containsPoint:function(e,t,i){return l.coordinateSystem.containPoint([t,i])},dataZoomId:e.id,dataZoomModel:e,getRange:u})}),this)}),this)},dispose:function(){o.unregister(this.api,this.dataZoomModel.id),l.superApply(this,"dispose",arguments),this._range=null}}),c={zoom:function(e,t,i,r){var n=this._range,o=n.slice(),s=e.axisModels[0];if(s){var l=d[t](null,[r.originX,r.originY],s,i,e),c=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-c)*u+c,o[1]=(o[1]-c)*u+c;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return a(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,n[0]!==o[0]||n[1]!==o[1]?o:void 0}},pan:u((function(e,t,i,r,n,a){var o=d[r]([a.oldX,a.oldY],[a.newX,a.newY],t,n,i);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:u((function(e,t,i,r,n,a){return d[r]([0,0],[a.scrollDelta,a.scrollDelta],t,n,i).signal*(e[1]-e[0])*a.scrollDelta}))};function u(e){return function(t,i,r,n){var o=this._range,s=o.slice(),l=t.axisModels[0];if(l){var c=e(s,l,t,i,r,n);return a(c,s,[0,100],"all"),this._range=s,o[0]!==s[0]||o[1]!==s[1]?s:void 0}}}var d={grid:function(e,t,i,r,n){var a=i.axis,o={},s=n.model.coordinateSystem.getRect();return e=e||[0,0],"x"===a.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,i,r,n){var a=i.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),c=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===i.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,i,r,n){var a=i.axis,o=n.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===a.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},h=l;e.exports=h},function(e,t,i){var r=i(0),n=i(73),a=i(33),o="\0_ec_dataZoom_roams";function s(e){var t=e.getZr();return t[o]||(t[o]={})}function l(e){r.each(e,(function(t,i){t.count||(t.controller.dispose(),delete e[i])}))}function c(e,t){e.dispatchAction({type:"dataZoom",batch:t})}t.register=function(e,t){var i=s(e),o=t.dataZoomId,u=t.coordId;r.each(i,(function(e,i){var n=e.dataZoomInfos;n[o]&&r.indexOf(t.allCoordIds,u)<0&&(delete n[o],e.count--)})),l(i);var d=i[u];d||((d=i[u]={coordId:u,dataZoomInfos:{},count:0}).controller=function(e,t){var i=new n(e.getZr());return r.each(["pan","zoom","scrollMove"],(function(e){i.on(e,(function(i){var n=[];r.each(t.dataZoomInfos,(function(r){if(i.isAvailableBehavior(r.dataZoomModel.option)){var a=(r.getRange||{})[e],o=a&&a(t.controller,i);!r.dataZoomModel.get("disabled",!0)&&o&&n.push({dataZoomId:r.dataZoomId,start:o[0],end:o[1]})}})),n.length&&t.dispatchAction(n)}))})),i}(e,d),d.dispatchAction=r.curry(c,e)),!d.dataZoomInfos[o]&&d.count++,d.dataZoomInfos[o]=t;var h,p,f,m,g=(h=d.dataZoomInfos,f={type_true:2,type_move:1,type_false:0,type_undefined:-1},m=!0,r.each(h,(function(e){var t=e.dataZoomModel,i=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");f["type_"+i]>f["type_"+p]&&(p=i),m&=t.get("preventDefaultMouseMove",!0)})),{controlType:p,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!m}});d.controller.enable(g.controlType,g.opt),d.controller.setPointerChecker(t.containsPoint),a.createOrUpdate(d,"dispatchAction",t.dataZoomModel.get("throttle",!0),"fixRate")},t.unregister=function(e,t){var i=s(e);r.each(i,(function(e){e.controller.dispose();var i=e.dataZoomInfos;i[t]&&(delete i[t],e.count--)})),l(i)},t.generateCoordId=function(e){return e.type+"\0_"+e.id}},function(e,t,i){i(221),i(230)},function(e,t,i){var r=i(0),n=i(225),a=i(3),o=[20,140],s=n.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(e,t){s.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){s.superApply(this,"resetItemSize",arguments);var e=this.itemSize;"horizontal"===this._orient&&e.reverse(),(null==e[0]||isNaN(e[0]))&&(e[0]=o[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=o[1])},_resetRange:function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):r.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},completeVisualOption:function(){n.prototype.completeVisualOption.apply(this,arguments),r.each(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=0)}),this)},setSelected:function(e){this.option.range=e.slice(),this._resetRange()},getSelected:function(){var e=this.getExtent(),t=a.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},getValueState:function(e){var t=this.option.range,i=this.getExtent();return(t[0]<=i[0]||t[0]<=e)&&(t[1]>=i[1]||e<=t[1])?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(i){var r=[],n=i.getData();n.each(this.getDataDimension(n),(function(t,i){e[0]<=t&&t<=e[1]&&r.push(i)}),this),t.push({seriesId:i.id,dataIndex:r})}),this),t},getVisualMeta:function(e){var t=l(this,"outOfRange",this.getExtent()),i=l(this,"inRange",this.option.range.slice()),r=[];function n(t,i){r.push({value:t,color:e(t,i)})}for(var a=0,o=0,s=i.length,c=t.length;o<c&&(!i.length||t[o]<=i[0]);o++)t[o]<i[a]&&n(t[o],"outOfRange");for(var u=1;a<s;a++,u=0)u&&r.length&&n(i[a],"outOfRange"),n(i[a],"inRange");for(u=1;o<c;o++)(!i.length||i[i.length-1]<t[o])&&(u&&(r.length&&n(r[r.length-1].value,"outOfRange"),u=0),n(t[o],"outOfRange"));var d=r.length;return{stops:r,outerColors:[d?r[0].color:"transparent",d?r[d-1].color:"transparent"]}}});function l(e,t,i){if(i[0]===i[1])return i.slice();for(var r=(i[1]-i[0])/200,n=i[0],a=[],o=0;o<=200&&n<i[1];o++)a.push(n),n+=r;return a.push(i[1]),a}var c=s;e.exports=c},function(e,t,i){var r=i(0),n=i(105),a=i(23),o=i(227),s=i(2),l=i(3),c=i(55),u=i(228),d=i(4),h=l.linearMap,p=r.each,f=Math.min,m=Math.max,g=o.extend({type:"visualMap.continuous",init:function(){g.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(e,t,i,r){r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var i=e.get("text");this._renderEndsText(t,i,0),this._renderEndsText(t,i,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},_renderEndsText:function(e,t,i){if(t){var r=t[1-i];r=null!=r?r+"":"";var n=this.visualMapModel,a=n.get("textGap"),o=n.itemSize,l=this._shapes.barGroup,c=this._applyTransform([o[0]/2,0===i?-a:o[1]+a],l),u=this._applyTransform(0===i?"bottom":"top",l),d=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new s.Text({style:{x:c[0],y:c[1],textVerticalAlign:"horizontal"===d?"middle":u,textAlign:"horizontal"===d?u:"center",text:r,textFont:h.getFont(),textFill:h.getTextColor()}}))}},_renderBar:function(e){var t=this.visualMapModel,i=this._shapes,n=t.itemSize,a=this._orient,o=this._useHandle,s=u.getItemAlign(t,this.api,n),l=i.barGroup=this._createBarGroup(s);l.add(i.outOfRange=y()),l.add(i.inRange=y(null,o?v(this._orient):null,r.bind(this._dragHandle,this,"all",!1),r.bind(this._dragHandle,this,"all",!0)));var c=t.textStyleModel.getTextRect("国"),d=m(c.width,c.height);o&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(l,0,n,d,a,s),this._createHandle(l,1,n,d,a,s)),this._createIndicator(l,n,d,a),e.add(l)},_createHandle:function(e,t,i,n,o){var l=r.bind(this._dragHandle,this,t,!1),c=r.bind(this._dragHandle,this,t,!0),u=y(function(e,t){return 0===e?[[0,0],[t,0],[t,-t]]:[[0,0],[t,0],[t,t]]}(t,n),v(this._orient),l,c);u.position[0]=i[0],e.add(u);var d=this.visualMapModel.textStyleModel,h=new s.Text({draggable:!0,drift:l,onmousemove:function(e){a.stop(e.event)},ondragend:c,style:{x:0,y:0,text:"",textFont:d.getFont(),textFill:d.getTextColor()}});this.group.add(h);var p=["horizontal"===o?n/2:1.5*n,"horizontal"===o?0===t?-1.5*n:1.5*n:0===t?-n/2:n/2],f=this._shapes;f.handleThumbs[t]=u,f.handleLabelPoints[t]=p,f.handleLabels[t]=h},_createIndicator:function(e,t,i,r){var n=y([[0,0]],"move");n.position[0]=t[0],n.attr({invisible:!0,silent:!0}),e.add(n);var a=this.visualMapModel.textStyleModel,o=new s.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(o);var l=["horizontal"===r?i/2:9,0],c=this._shapes;c.indicator=n,c.indicatorLabel=o,c.indicatorLabelPoint=l},_dragHandle:function(e,t,i,r){if(this._useHandle){if(this._dragging=!t,!t){var n=this._applyTransform([i,r],this._shapes.barGroup,!0);this._updateInterval(e,n[1]),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():_(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},_resetInterval:function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),i=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[h(t[0],i,r,!0),h(t[1],i,r,!0)]},_updateInterval:function(e,t){t=t||0;var i=this.visualMapModel,r=this._handleEnds,n=[0,i.itemSize[1]];c(t,r,n,e,0);var a=i.getExtent();this._dataInterval=[h(r[0],n,a,!0),h(r[1],n,a,!0)]},_updateView:function(e){var t=this.visualMapModel,i=t.getExtent(),r=this._shapes,n=[0,t.itemSize[1]],a=e?n:this._handleEnds,o=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,n,"outOfRange");r.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),r.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,o)},_createBarVisual:function(e,t,i,r){var a={forceState:r,convertOpacityToAlpha:!0},o=this._makeColorGradient(e,a),s=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],l=this._createBarPoints(i,s);return{barColor:new n(0,0,0,1,o),barPoints:l,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(e,t){var i=[],r=(e[1]-e[0])/100;i.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var n=1;n<100;n++){var a=e[0]+r*n;if(a>e[1])break;i.push({color:this.getControllerVisual(a,"color",t),offset:n/100})}return i.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),i},_createBarPoints:function(e,t){var i=this.visualMapModel.itemSize;return[[i[0]-t[0],e[0]],[i[0],e[0]],[i[0],e[1]],[i[0]-t[1],e[1]]]},_createBarGroup:function(e){var t=this._orient,i=this.visualMapModel.get("inverse");return new s.Group("horizontal"!==t||i?"horizontal"===t&&i?{scale:"bottom"===e?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==t||i?{scale:"left"===e?[1,1]:[-1,1]}:{scale:"left"===e?[1,-1]:[-1,-1]}:{scale:"bottom"===e?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(e,t){if(this._useHandle){var i=this._shapes,r=this.visualMapModel,n=i.handleThumbs,a=i.handleLabels;p([0,1],(function(o){var l=n[o];l.setStyle("fill",t.handlesColor[o]),l.position[1]=e[o];var c=s.applyTransform(i.handleLabelPoints[o],s.getTransform(l,this.group));a[o].setStyle({x:c[0],y:c[1],text:r.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(e,t,i,r){var n=this.visualMapModel,a=n.getExtent(),o=n.itemSize,l=[0,o[1]],c=h(e,a,l,!0),u=this._shapes,d=u.indicator;if(d){d.position[1]=c,d.attr("invisible",!1),d.setShape("points",function(e,t,i,r){return e?[[0,-f(t,m(i,0))],[6,0],[0,f(t,m(r-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,r,c,o[1]));var p=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0});d.setStyle("fill",p);var g=s.applyTransform(u.indicatorLabelPoint,s.getTransform(d,this.group)),y=u.indicatorLabel;y.attr("invisible",!1);var _=this._applyTransform("left",u.barGroup),v=this._orient;y.setStyle({text:(i||"")+n.formatValueText(t),textVerticalAlign:"horizontal"===v?_:"middle",textAlign:"horizontal"===v?"center":_,x:g[0],y:g[1]})}},_enableHoverLinkToSeries:function(){var e=this;this._shapes.barGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var i=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.barGroup,!0,!0);r[1]=f(m(0,r[1]),i[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=i[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(e,t){var i=this.visualMapModel,r=i.itemSize;if(i.option.hoverLink){var n=[0,r[1]],a=i.getExtent();e=f(m(n[0],e),n[1]);var o=function(e,t,i){var r=6,n=e.get("hoverLinkDataSize");n&&(r=h(n,t,i,!0)/2);return r}(i,a,n),s=[e-o,e+o],l=h(e,n,a,!0),c=[h(s[0],n,a,!0),h(s[1],n,a,!0)];s[0]<n[0]&&(c[0]=-1/0),s[1]>n[1]&&(c[1]=1/0),t&&(c[0]===-1/0?this._showIndicator(l,c[1],"< ",o):c[1]===1/0?this._showIndicator(l,c[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var p=this._hoverLinkDataIndices,g=[];(t||_(i))&&(g=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var y=d.compressBatches(p,g);this._dispatchHighDown("downplay",u.makeHighDownBatch(y[0],i)),this._dispatchHighDown("highlight",u.makeHighDownBatch(y[1],i))}},_hoverLinkFromSeriesMouseOver:function(e){var t=e.target,i=this.visualMapModel;if(t&&null!=t.dataIndex){var r=this.ecModel.getSeriesByIndex(t.seriesIndex);if(i.isTargetSeries(r)){var n=r.getData(t.dataType),a=n.get(i.getDataDimension(n),t.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",u.makeHighDownBatch(e,this.visualMapModel)),e.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},_applyTransform:function(e,t,i,n){var a=s.getTransform(t,n?null:this.group);return s[r.isArray(e)?"applyTransform":"transformDirection"](e,a,i)},_dispatchHighDown:function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function y(e,t,i,r){return new s.Polygon({shape:{points:e},draggable:!!i,cursor:t,drift:i,onmousemove:function(e){a.stop(e.event)},ondragend:r})}function _(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function v(e){return"vertical"===e?"ns-resize":"ew-resize"}var C=g;e.exports=C},function(e,t,i){i(5).__DEV__;var r=i(0),n=i(225),a=i(47),o=i(226),s=i(3).reformIntervals,l=n.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(e,t){l.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();c[this._mode].call(this),this._resetSelected(e,t);var n=this.option.categories;this.resetVisual((function(e,t){"categories"===i?(e.mappingMethod="category",e.categories=r.clone(n)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=r.map(this._pieceList,(function(e){e=r.clone(e);return"inRange"!==t&&(e.visual=null),e})))}))},completeVisualOption:function(){var e=this.option,t={},i=a.listVisualTypes(),s=this.isCategory();function l(e,t,i){return e&&e[t]&&(r.isObject(e[t])?e[t].hasOwnProperty(i):e[t]===i)}r.each(e.pieces,(function(e){r.each(i,(function(i){e.hasOwnProperty(i)&&(t[i]=1)}))})),r.each(t,(function(t,i){var n=0;r.each(this.stateList,(function(t){n|=l(e,t,i)||l(e.target,t,i)}),this),!n&&r.each(this.stateList,(function(t){(e[t]||(e[t]={}))[i]=o.get(i,"inRange"===t?"active":"inactive",s)}))}),this),n.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(e,t){var i=this.option,n=this._pieceList,a=(t?i:e).selected||{};if(i.selected=a,r.each(n,(function(e,t){var i=this.getSelectedMapKey(e);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var o=!1;r.each(n,(function(e,t){var i=this.getSelectedMapKey(e);a[i]&&(o?a[i]=!1:o=!0)}),this)}},getSelectedMapKey:function(e){return"categories"===this._mode?e.value+"":e.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(e){this.option.selected=r.clone(e)},getValueState:function(e){var t=a.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(i){var r=[],n=i.getData();n.each(this.getDataDimension(n),(function(t,i){a.findPieceIndex(t,this._pieceList)===e&&r.push(i)}),this),t.push({seriesId:i.id,dataIndex:r})}),this),t},getRepresentValue:function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var i=e.interval||[];t=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return t},getVisualMeta:function(e){if(!this.isCategory()){var t=[],i=[],n=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),(o=a[a.length-1].interval[1])!==1/0&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return r.each(a,(function(e){var t=e.interval;t&&(t[0]>s&&l([s,t[0]],"outOfRange"),l(t.slice()),s=t[1])}),this),{stops:t,outerColors:i}}function l(r,a){var o=n.getRepresentValue({interval:r});a||(a=n.getValueState(o));var s=e(o,a);r[0]===-1/0?i[0]=s:r[1]===1/0?i[1]=s:t.push({value:r[0],color:s},{value:r[1],color:s})}}}),c={splitNumber:function(){var e=this.option,t=this._pieceList,i=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&i<5;)i++;e.precision=i,o=+o.toFixed(i),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var l=0,c=n[0];l<a;c+=o,l++){var u=l===a-1?n[1]:c+o;t.push({interval:[c,u],close:[1,1]})}e.maxOpen&&t.push({interval:[n[1],1/0],close:[0,0]}),s(t),r.each(t,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(){var e=this.option;r.each(e.categories,(function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})}),this),u(e,this._pieceList)},pieces:function(){var e=this.option,t=this._pieceList;r.each(e.pieces,(function(e,i){r.isObject(e)||(e={value:e});var n={text:"",index:i};if(null!=e.label&&(n.text=e.label),e.hasOwnProperty("value")){var o=n.value=e.value;n.interval=[o,o],n.close=[1,1]}else{for(var s=n.interval=[],l=n.close=[0,0],c=[1,0,1],u=[-1/0,1/0],d=[],h=0;h<2;h++){for(var p=[["gte","gt","min"],["lte","lt","max"]][h],f=0;f<3&&null==s[h];f++)s[h]=e[p[f]],l[h]=c[f],d[h]=2===f;null==s[h]&&(s[h]=u[h])}d[0]&&s[1]===1/0&&(l[0]=0),d[1]&&s[0]===-1/0&&(l[1]=0),s[0]===s[1]&&l[0]&&l[1]&&(n.value=s[0])}n.visual=a.retrieveVisuals(e),t.push(n)}),this),u(e,t),s(t),r.each(t,(function(e){var t=e.close,i=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,i)}),this)}};function u(e,t){var i=e.inverse;("vertical"===e.orient?!i:i)&&t.reverse()}var d=l;e.exports=d},function(e,t,i){var r=i(0),n=i(227),a=i(2),o=i(19).createSymbol,s=i(6),l=i(228),c=n.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var t=this.visualMapModel,i=t.get("textGap"),n=t.textStyleModel,o=n.getFont(),l=n.getTextColor(),c=this._getItemAlign(),u=t.itemSize,d=this._getViewData(),h=d.endsText,p=r.retrieve(t.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],u,p,c),r.each(d.viewPieceList,(function(n){var s=n.piece,d=new a.Group;d.onclick=r.bind(this._onItemClick,this,s),this._enableHoverLink(d,n.indexInModelPieceList);var h=t.getRepresentValue(s);if(this._createItemSymbol(d,h,[0,0,u[0],u[1]]),p){var f=this.visualMapModel.getValueState(h);d.add(new a.Text({style:{x:"right"===c?-i:u[0]+i,y:u[1]/2,text:s.text,textVerticalAlign:"middle",textAlign:c,textFont:o,textFill:l,opacity:"outOfRange"===f?.5:1}}))}e.add(d)}),this),h&&this._renderEndsText(e,h[1],u,p,c),s.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,t){function i(e){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:e,batch:l.makeHighDownBatch(i.findTargetDataIndices(t),i)})}e.on("mouseover",r.bind(i,this,"highlight")).on("mouseout",r.bind(i,this,"downplay"))},_getItemAlign:function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return l.getItemAlign(e,this.api,e.itemSize);var i=t.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(e,t,i,r,n){if(t){var o=new a.Group,s=this.visualMapModel.textStyleModel;o.add(new a.Text({style:{x:r?"right"===n?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:r?n:"center",text:t,textFont:s.getFont(),textFill:s.getTextColor()}})),e.add(o)}},_getViewData:function(){var e=this.visualMapModel,t=r.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),i=e.get("text"),n=e.get("orient"),a=e.get("inverse");return("horizontal"===n?a:!a)?t.reverse():i&&(i=i.slice().reverse()),{viewPieceList:t,endsText:i}},_createItemSymbol:function(e,t,i){e.add(o(this.getControllerVisual(t,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(t,"color")))},_onItemClick:function(e){var t=this.visualMapModel,i=t.option,n=r.clone(i.selected),a=t.getSelectedMapKey(e);"single"===i.selectedMode?(n[a]=!0,r.each(n,(function(e,t){n[t]=t===a}))):n[a]=!n[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});e.exports=c},function(e,t,i){i(562),(0,i(77).registerPainter)("vml",i(563))},function(e,t,i){var r=i(11),n=i(8).applyTransform,a=i(9),o=i(24),s=i(17),l=i(81),c=i(155),u=i(61),d=i(48),h=i(41),p=i(10),f=i(50),m=i(82),g=i(231),y=f.CMD,_=Math.round,v=Math.sqrt,C=Math.abs,x=Math.cos,b=Math.sin,S=Math.max;if(!r.canvasSupported){var T=21600,E=T/2,w=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=T+","+T,e.coordorigin="0,0"},A=function(e,t,i){return"rgb("+[e,t,i].join(",")+")"},P=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},D=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},M=function(e,t,i){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+i},I=l.parsePercent,R=function(e,t,i){var r=o.parse(t);i=+i,isNaN(i)&&(i=1),r&&(e.color=A(r[0],r[1],r[2]),e.opacity=i*r[3])},O=function(e,t,i,r){var a="fill"===t,s=e.getElementsByTagName(t)[0];null!=i[t]&&"none"!==i[t]&&(a||!a&&i.lineWidth)?(e[a?"filled":"stroked"]="true",i[t]instanceof m&&D(e,s),s||(s=g.createNode(t)),a?function(e,t,i){var r,a,s=t.fill;if(null!=s)if(s instanceof m){var l,c=0,u=[0,0],d=0,h=1,p=i.getBoundingRect(),f=p.width,g=p.height;if("linear"===s.type){l="gradient";var y=i.transform,_=[s.x*f,s.y*g],v=[s.x2*f,s.y2*g];y&&(n(_,_,y),n(v,v,y));var C=v[0]-_[0],x=v[1]-_[1];(c=180*Math.atan2(C,x)/Math.PI)<0&&(c+=360),c<1e-6&&(c=0)}else{l="gradientradial";_=[s.x*f,s.y*g],y=i.transform;var b=i.scale,E=f,w=g;u=[(_[0]-p.x)/E,(_[1]-p.y)/w],y&&n(_,_,y),E/=b[0]*T,w/=b[1]*T;var P=S(E,w);d=0/P,h=2*s.r/P-d}var D=s.colorStops.slice();D.sort((function(e,t){return e.offset-t.offset}));for(var M=D.length,I=[],O=[],L=0;L<M;L++){var N=D[L],F=(r=N.color,a=void 0,a=o.parse(r),[A(a[0],a[1],a[2]),a[3]]);O.push(N.offset*h+d+" "+F[0]),0!==L&&L!==M-1||I.push(F)}if(M>=2){var B=I[0][0],V=I[1][0],k=I[0][1]*t.opacity,z=I[1][1]*t.opacity;e.type=l,e.method="none",e.focus="100%",e.angle=c,e.color=B,e.color2=V,e.colors=O.join(","),e.opacity=z,e.opacity2=k}"radial"===l&&(e.focusposition=u.join(","))}else R(e,s,t.opacity)}(s,i,r):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof m||R(e,t.stroke,t.opacity)}(s,i),P(e,s)):(e[a?"filled":"stroked"]="false",D(e,s))},L=[[],[],[]];p.prototype.brushVML=function(e){var t=this.style,i=this._vmlEl;i||(i=g.createNode("shape"),w(i),this._vmlEl=i),O(i,"fill",t,this),O(i,"stroke",t,this);var r=this.transform,a=null!=r,o=i.getElementsByTagName("stroke")[0];if(o){var s=t.lineWidth;if(a&&!t.strokeNoScale){var l=r[0]*r[3]-r[1]*r[2];s*=v(C(l))}o.weight=s+"px"}var c=this.path||(this.path=new f);this.__dirtyPath&&(c.beginPath(),c.subPixelOptimize=!1,this.buildPath(c,this.shape),c.toStatic(),this.__dirtyPath=!1),i.path=function(e,t){var i,r,a,o,s,l,c=y.M,u=y.C,d=y.L,h=y.A,p=y.Q,f=[],m=e.data,g=e.len();for(o=0;o<g;){switch(r="",i=0,a=m[o++]){case c:r=" m ",i=1,s=m[o++],l=m[o++],L[0][0]=s,L[0][1]=l;break;case d:r=" l ",i=1,s=m[o++],l=m[o++],L[0][0]=s,L[0][1]=l;break;case p:case u:r=" c ",i=3;var C,S,w=m[o++],A=m[o++],P=m[o++],D=m[o++];a===p?(C=P,S=D,P=(P+2*w)/3,D=(D+2*A)/3,w=(s+2*w)/3,A=(l+2*A)/3):(C=m[o++],S=m[o++]),L[0][0]=w,L[0][1]=A,L[1][0]=P,L[1][1]=D,L[2][0]=C,L[2][1]=S,s=C,l=S;break;case h:var M=0,I=0,R=1,O=1,N=0;t&&(M=t[4],I=t[5],R=v(t[0]*t[0]+t[1]*t[1]),O=v(t[2]*t[2]+t[3]*t[3]),N=Math.atan2(-t[1]/O,t[0]/R));var F=m[o++],B=m[o++],V=m[o++],k=m[o++],z=m[o++]+N,G=m[o++]+z+N;o++;var U=m[o++],$=F+x(z)*V,H=B+b(z)*k,W=(w=F+x(G)*V,A=B+b(G)*k,U?" wa ":" at ");Math.abs($-w)<1e-4&&(Math.abs(G-z)>.01?U&&($+=.0125):Math.abs(H-B)<1e-4?U&&$<F||!U&&$>F?A-=.0125:A+=.0125:U&&H<B||!U&&H>B?w+=.0125:w-=.0125),f.push(W,_(((F-V)*R+M)*T-E),",",_(((B-k)*O+I)*T-E),",",_(((F+V)*R+M)*T-E),",",_(((B+k)*O+I)*T-E),",",_(($*R+M)*T-E),",",_((H*O+I)*T-E),",",_((w*R+M)*T-E),",",_((A*O+I)*T-E)),s=w,l=A;break;case y.R:var j=L[0],q=L[1];j[0]=m[o++],j[1]=m[o++],q[0]=j[0]+m[o++],q[1]=j[1]+m[o++],t&&(n(j,j,t),n(q,q,t)),j[0]=_(j[0]*T-E),q[0]=_(q[0]*T-E),j[1]=_(j[1]*T-E),q[1]=_(q[1]*T-E),f.push(" m ",j[0],",",j[1]," l ",q[0],",",j[1]," l ",q[0],",",q[1]," l ",j[0],",",q[1]);break;case y.Z:f.push(" x ")}if(i>0){f.push(r);for(var Y=0;Y<i;Y++){var X=L[Y];t&&n(X,X,t),f.push(_(X[0]*T-E),",",_(X[1]*T-E),Y<i-1?",":"")}}}return f.join("")}(c,this.transform),i.style.zIndex=M(this.zlevel,this.z,this.z2),P(e,i),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},p.prototype.onRemove=function(e){D(e,this._vmlEl),this.removeRectText(e)},p.prototype.onAdd=function(e){P(e,this._vmlEl),this.appendRectText(e)};d.prototype.brushVML=function(e){var t,i,r,a=this.style,o=a.image;if("object"==typeof(r=o)&&r.tagName&&"IMG"===r.tagName.toUpperCase()){var s=o.src;if(s===this._imageSrc)t=this._imageWidth,i=this._imageHeight;else{var l=o.runtimeStyle,c=l.width,u=l.height;l.width="auto",l.height="auto",t=o.width,i=o.height,l.width=c,l.height=u,this._imageSrc=s,this._imageWidth=t,this._imageHeight=i}o=s}else o===this._imageSrc&&(t=this._imageWidth,i=this._imageHeight);if(o){var d=a.x||0,h=a.y||0,p=a.width,f=a.height,m=a.sWidth,y=a.sHeight,C=a.sx||0,x=a.sy||0,b=m&&y,T=this._vmlEl;T||(T=g.doc.createElement("div"),w(T),this._vmlEl=T);var E,A=T.style,D=!1,I=1,R=1;if(this.transform&&(E=this.transform,I=v(E[0]*E[0]+E[1]*E[1]),R=v(E[2]*E[2]+E[3]*E[3]),D=E[1]||E[2]),D){var O=[d,h],L=[d+p,h],N=[d,h+f],F=[d+p,h+f];n(O,O,E),n(L,L,E),n(N,N,E),n(F,F,E);var B=S(O[0],L[0],N[0],F[0]),V=S(O[1],L[1],N[1],F[1]),k=[];k.push("M11=",E[0]/I,",","M12=",E[2]/R,",","M21=",E[1]/I,",","M22=",E[3]/R,",","Dx=",_(d*I+E[4]),",","Dy=",_(h*R+E[5])),A.padding="0 "+_(B)+"px "+_(V)+"px 0",A.filter="progid:DXImageTransform.Microsoft.Matrix("+k.join("")+", SizingMethod=clip)"}else E&&(d=d*I+E[4],h=h*R+E[5]),A.filter="",A.left=_(d)+"px",A.top=_(h)+"px";var z=this._imageEl,G=this._cropEl;z||(z=g.doc.createElement("div"),this._imageEl=z);var U=z.style;if(b){if(t&&i)U.width=_(I*t*p/m)+"px",U.height=_(R*i*f/y)+"px";else{var $=new Image,H=this;$.onload=function(){$.onload=null,t=$.width,i=$.height,U.width=_(I*t*p/m)+"px",U.height=_(R*i*f/y)+"px",H._imageWidth=t,H._imageHeight=i,H._imageSrc=o},$.src=o}G||((G=g.doc.createElement("div")).style.overflow="hidden",this._cropEl=G);var W=G.style;W.width=_((p+C*p/m)*I),W.height=_((f+x*f/y)*R),W.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-C*p/m*I+",Dy="+-x*f/y*R+")",G.parentNode||T.appendChild(G),z.parentNode!==G&&G.appendChild(z)}else U.width=_(I*p)+"px",U.height=_(R*f)+"px",T.appendChild(z),G&&G.parentNode&&(T.removeChild(G),this._cropEl=null);var j="",q=a.opacity;q<1&&(j+=".Alpha(opacity="+_(100*q)+") "),j+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+o+", SizingMethod=scale)",U.filter=j,T.style.zIndex=M(this.zlevel,this.z,this.z2),P(e,T),null!=a.text&&this.drawRectText(e,this.getBoundingRect())}},d.prototype.onRemove=function(e){D(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},d.prototype.onAdd=function(e){P(e,this._vmlEl),this.appendRectText(e)};var N,F={},B=0,V=document.createElement("div");s.$override("measureText",(function(e,t){var i=g.doc;N||((N=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",g.doc.body.appendChild(N));try{N.style.font=t}catch(e){}return N.innerHTML="",N.appendChild(i.createTextNode(e)),{width:N.offsetWidth}}));for(var k=new a,z=function(e,t,i,r){var a=this.style;this.__dirty&&l.normalizeTextStyle(a,!0);var o=a.text;if(null!=o&&(o+=""),o){if(a.rich){var c=s.parseRichText(o,a);o=[];for(var u=0;u<c.lines.length;u++){for(var d=c.lines[u].tokens,h=[],p=0;p<d.length;p++)h.push(d[p].text);o.push(h.join(""))}o=o.join("\n")}var f,m,y=a.textAlign,v=a.textVerticalAlign,C=function(e){var t=F[e];if(!t){B>100&&(B=0,F={});var i,r=V.style;try{r.font=e,i=r.fontFamily.split(",")[0]}catch(e){}t={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:i||"Microsoft YaHei"},F[e]=t,B++}return t}(a.font),x=C.style+" "+C.variant+" "+C.weight+" "+C.size+'px "'+C.family+'"';i=i||s.getBoundingRect(o,x,y,v,a.textPadding,a.textLineHeight);var b=this.transform;if(b&&!r&&(k.copy(t),k.applyTransform(b),t=k),r)f=t.x,m=t.y;else{var S=a.textPosition;if(S instanceof Array)f=t.x+I(S[0],t.width),m=t.y+I(S[1],t.height),y=y||"left";else{var T=this.calculateTextPosition?this.calculateTextPosition({},a,t):s.calculateTextPosition({},a,t);f=T.x,m=T.y,y=y||T.textAlign,v=v||T.textVerticalAlign}}f=s.adjustTextX(f,i.width,y),m=s.adjustTextY(m,i.height,v),m+=i.height/2;var E,A,D,R=g.createNode,L=this._textVmlEl;L?A=(E=(D=L.firstChild).nextSibling).nextSibling:(L=R("line"),E=R("path"),A=R("textpath"),D=R("skew"),A.style["v-text-align"]="left",w(L),E.textpathok=!0,A.on=!0,L.from="0 0",L.to="1000 0.05",P(L,D),P(L,E),P(L,A),this._textVmlEl=L);var N=[f,m],z=L.style;b&&r?(n(N,N,b),D.on=!0,D.matrix=b[0].toFixed(3)+","+b[2].toFixed(3)+","+b[1].toFixed(3)+","+b[3].toFixed(3)+",0,0",D.offset=(_(N[0])||0)+","+(_(N[1])||0),D.origin="0 0",z.left="0px",z.top="0px"):(D.on=!1,z.left=_(f)+"px",z.top=_(m)+"px"),A.string=String(o).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{A.style.font=x}catch(e){}O(L,"fill",{fill:a.textFill,opacity:a.opacity},this),O(L,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),L.style.zIndex=M(this.zlevel,this.z,this.z2),P(e,L)}},G=function(e){D(e,this._textVmlEl),this._textVmlEl=null},U=function(e){P(e,this._textVmlEl)},$=[c,u,d,p,h],H=0;H<$.length;H++){var W=$[H].prototype;W.drawRectText=z,W.removeRectText=G,W.appendRectText=U}h.prototype.brushVML=function(e){var t=this.style;null!=t.text?this.drawRectText(e,{x:t.x||0,y:t.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(e)},h.prototype.onRemove=function(e){this.removeRectText(e)},h.prototype.onAdd=function(e){this.appendRectText(e)}}},function(e,t,i){var r=i(60),n=i(231),a=i(0).each;function o(e){return parseInt(e,10)}function s(e,t){n.initVML(),this.root=e,this.storage=t;var i=document.createElement("div"),r=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",r.style.cssText="position:absolute;left:0;top:0;",e.appendChild(i),this._vmlRoot=r,this._vmlViewport=i,this.resize();var a=t.delFromStorage,o=t.addToStorage;t.delFromStorage=function(e){a.call(t,e),e&&e.onRemove&&e.onRemove(r)},t.addToStorage=function(e){e.onAdd&&e.onAdd(r),o.call(t,e)},this._firstPaint=!0}s.prototype={constructor:s,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0,!0);this._paintList(e)},_paintList:function(e){for(var t=this._vmlRoot,i=0;i<e.length;i++){var r=e[i];r.invisible||r.ignore?(r.__alreadyNotVisible||r.onRemove(t),r.__alreadyNotVisible=!0):(r.__alreadyNotVisible&&r.onAdd(t),r.__alreadyNotVisible=!1,r.__dirty&&(r.beforeBrush&&r.beforeBrush(),(r.brushVML||r.brush).call(r,t),r.afterBrush&&r.afterBrush())),r.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(t),this._firstPaint=!1)},resize:function(e,t){e=null==e?this._getWidth():e,t=null==t?this._getHeight():t;if(this._width!==e||this._height!==t){this._width=e,this._height=t;var i=this._vmlViewport.style;i.width=e+"px",i.height=t+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var e=this.root,t=e.currentStyle;return(e.clientWidth||o(t.width))-o(t.paddingLeft)-o(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||o(t.height))-o(t.paddingTop)-o(t.paddingBottom)|0}},a(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){var t;s.prototype[e]=(t=e,function(){r('In IE8.0 VML mode painter not support method "'+t+'"')})}));var l=s;e.exports=l},function(e,t,i){i(131),(0,i(77).registerPainter)("svg",i(565))},function(e,t,i){var r=i(132).createElement,n=i(0),a=i(60),o=i(10),s=i(48),l=i(41),c=i(566),u=i(567),d=i(568),h=i(569),p=i(131),f=p.path,m=p.image,g=p.text;function y(e){return parseInt(e,10)}function _(e,t){return t&&e&&t.parentNode!==e}function v(e,t,i){if(_(e,t)&&i){var r=i.nextSibling;r?e.insertBefore(t,r):e.appendChild(t)}}function C(e,t){if(_(e,t)){var i=e.firstChild;i?e.insertBefore(t,i):e.appendChild(t)}}function x(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function b(e){return e.__textSvgEl}function S(e){return e.__svgEl}var T=function(e,t,i,a){this.root=e,this.storage=t,this._opts=i=n.extend({},i||{});var o=r("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var s=r("g");o.appendChild(s);var l=r("g");o.appendChild(l),this.gradientManager=new u(a,l),this.clipPathManager=new d(a,l),this.shadowManager=new h(a,l);var c=document.createElement("div");c.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=l,this._backgroundRoot=s,this._viewport=c,e.appendChild(c),c.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]};T.prototype={constructor:T,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=r("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,i,r=this._svgRoot,n=this._visibleList,a=e.length,u=[];for(t=0;t<a;t++){var d=e[t],h=(i=d)instanceof o?f:i instanceof s?m:i instanceof l?g:f,p=S(d)||b(d);d.invisible||(d.__dirty&&(h&&h.brush(d),this.clipPathManager.update(d),d.style&&(this.gradientManager.update(d.style.fill),this.gradientManager.update(d.style.stroke),this.shadowManager.update(p,d)),d.__dirty=!1),u.push(d))}var y,_=c(n,u);for(t=0;t<_.length;t++){if((w=_[t]).removed)for(var T=0;T<w.count;T++){p=S(d=n[w.indices[T]]);var E=b(d);x(r,p),x(r,E)}}for(t=0;t<_.length;t++){var w;if((w=_[t]).added)for(T=0;T<w.count;T++){p=S(d=u[w.indices[T]]),E=b(d);y?v(r,p,y):C(r,p),p?v(r,E,p):y?v(r,E,y):C(r,E),v(r,E,p),y=E||p||y,this.gradientManager.addWithoutUpdate(p||E,d),this.shadowManager.addWithoutUpdate(p||E,d),this.clipPathManager.markUsed(d)}else if(!w.removed)for(T=0;T<w.count;T++){p=S(d=u[w.indices[T]]),E=b(d),p=S(d),E=b(d);this.gradientManager.markUsed(d),this.gradientManager.addWithoutUpdate(p||E,d),this.shadowManager.markUsed(d),this.shadowManager.addWithoutUpdate(p||E,d),this.clipPathManager.markUsed(d),E&&v(r,E,p),y=p||E||y}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=u},_getDefs:function(e){var t,i=this._svgDom;return 0===(t=i.getElementsByTagName("defs")).length?e?((t=i.insertBefore(r("defs"),i.firstChild)).contains||(t.contains=function(e){var i=t.children;if(!i)return!1;for(var r=i.length-1;r>=0;--r)if(i[r]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var i=this._viewport;i.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=this._getSize(0),t=this._getSize(1),i.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var n=i.style;n.width=e+"px",n.height=t+"px";var a=this._svgDom;a.setAttribute("width",e),a.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,i=["width","height"][e],r=["clientWidth","clientHeight"][e],n=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[i]&&"auto"!==t[i])return parseFloat(t[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||y(s[i])||y(o.style[i]))-(y(s[n])||0)-(y(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},n.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){var t;T.prototype[e]=(t=e,function(){a('In SVG mode painter not support method "'+t+'"')})}));var E=T;e.exports=E},function(e,t){function i(){}function r(e,t,i,r){for(var n=0,a=t.length,o=0,s=0;n<a;n++){var l=t[n];if(l.removed){for(c=[],u=s;u<s+l.count;u++)c.push(u);l.indices=c,s+=l.count}else{for(var c=[],u=o;u<o+l.count;u++)c.push(u);l.indices=c,o+=l.count,l.added||(s+=l.count)}}return t}i.prototype={diff:function(e,t,i){i||(i=function(e,t){return e===t}),this.equals=i;var n=this;e=e.slice();var a=(t=t.slice()).length,o=e.length,s=1,l=a+o,c=[{newPos:-1,components:[]}],u=this.extractCommon(c[0],t,e,0);if(c[0].newPos+1>=a&&u+1>=o){for(var d=[],h=0;h<t.length;h++)d.push(h);return[{indices:d,count:t.length}]}function p(){for(var i=-1*s;i<=s;i+=2){var l,u=c[i-1],d=c[i+1],h=(d?d.newPos:0)-i;u&&(c[i-1]=void 0);var p=u&&u.newPos+1<a,f=d&&0<=h&&h<o;if(p||f){if(!p||f&&u.newPos<d.newPos?(l={newPos:(m=d).newPos,components:m.components.slice(0)},n.pushComponent(l.components,void 0,!0)):((l=u).newPos++,n.pushComponent(l.components,!0,void 0)),h=n.extractCommon(l,t,e,i),l.newPos+1>=a&&h+1>=o)return r(n,l.components,t,e);c[i]=l}else c[i]=void 0}var m;s++}for(;s<=l;){var f=p();if(f)return f}},pushComponent:function(e,t,i){var r=e[e.length-1];r&&r.added===t&&r.removed===i?e[e.length-1]={count:r.count+1,added:t,removed:i}:e.push({count:1,added:t,removed:i})},extractCommon:function(e,t,i,r){for(var n=t.length,a=i.length,o=e.newPos,s=o-r,l=0;o+1<n&&s+1<a&&this.equals(t[o+1],i[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},tokenize:function(e){return e.slice()},join:function(e){return e.slice()}};var n=new i;e.exports=function(e,t,i){return n.diff(e,t,i)}},function(e,t,i){var r=i(133),n=i(0),a=i(60),o=i(24);function s(e,t){r.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}n.inherits(s,r),s.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var i=this;n.each(["fill","stroke"],(function(r){if(t.style[r]&&("linear"===t.style[r].type||"radial"===t.style[r].type)){var n,a=t.style[r],o=i.getDefs(!0);a._dom?(n=a._dom,o.contains(a._dom)||i.addDom(n)):n=i.add(a),i.markUsed(t);var s=n.getAttribute("id");e.setAttribute(r,"url(#"+s+")")}}))}},s.prototype.add=function(e){var t;if("linear"===e.type)t=this.createElement("linearGradient");else{if("radial"!==e.type)return a("Illegal gradient type."),null;t=this.createElement("radialGradient")}return e.id=e.id||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-gradient-"+e.id),this.updateDom(e,t),this.addDom(t),t},s.prototype.update=function(e){var t=this;r.prototype.update.call(this,e,(function(){var i=e.type,r=e._dom.tagName;"linear"===i&&"linearGradient"===r||"radial"===i&&"radialGradient"===r?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},s.prototype.updateDom=function(e,t){if("linear"===e.type)t.setAttribute("x1",e.x),t.setAttribute("y1",e.y),t.setAttribute("x2",e.x2),t.setAttribute("y2",e.y2);else{if("radial"!==e.type)return void a("Illegal gradient type.");t.setAttribute("cx",e.x),t.setAttribute("cy",e.y),t.setAttribute("r",e.r)}e.global?t.setAttribute("gradientUnits","userSpaceOnUse"):t.setAttribute("gradientUnits","objectBoundingBox"),t.innerHTML="";for(var i=e.colorStops,r=0,n=i.length;r<n;++r){var s=this.createElement("stop");s.setAttribute("offset",100*i[r].offset+"%");var l=i[r].color;if(l.indexOf("rgba")>-1){var c=o.parse(l)[3],u=o.toHex(l);s.setAttribute("stop-color","#"+u),s.setAttribute("stop-opacity",c)}else s.setAttribute("stop-color",i[r].color);t.appendChild(s)}e._dom=t},s.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&r.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&r.prototype.markUsed.call(this,t._dom)}};var l=s;e.exports=l},function(e,t,i){var r=i(133),n=i(0),a=i(15);function o(e,t){r.call(this,e,t,"clipPath","__clippath_in_use__")}n.inherits(o,r),o.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var i=this.getTextSvgElement(e);i&&this.updateDom(i,e.__clipPaths,!0),this.markUsed(e)},o.prototype.updateDom=function(e,t,i){if(t&&t.length>0){var r,n,o=this.getDefs(!0),s=t[0],l=i?"_textDom":"_dom";s[l]?(n=s[l].getAttribute("id"),r=s[l],o.contains(r)||o.appendChild(r)):(n="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",n),o.appendChild(r),s[l]=r);var c=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!i){var u=Array.prototype.slice.call(s.transform);a.mul(s.transform,s.parent.invTransform,s.transform),c.brush(s),s.transform=u}else c.brush(s);var d=this.getSvgElement(s);r.innerHTML="",r.appendChild(d.cloneNode()),e.setAttribute("clip-path","url(#"+n+")"),t.length>1&&this.updateDom(r,t.slice(1),i)}else e&&e.setAttribute("clip-path","none")},o.prototype.markUsed=function(e){var t=this;e.__clipPaths&&n.each(e.__clipPaths,(function(e){e._dom&&r.prototype.markUsed.call(t,e._dom),e._textDom&&r.prototype.markUsed.call(t,e._textDom)}))};var s=o;e.exports=s},function(e,t,i){var r=i(133);function n(e,t){r.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function a(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}i(0).inherits(n,r),n.prototype.addWithoutUpdate=function(e,t){if(t&&a(t.style)){var i;if(t._shadowDom)i=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(i);else i=this.add(t);this.markUsed(t);var r=i.getAttribute("id");e.style.filter="url(#"+r+")"}},n.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},n.prototype.update=function(e,t){if(a(t.style)){var i=this;r.prototype.update.call(this,t,(function(){i.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},n.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},n.prototype.updateDom=function(e,t){var i=t.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var r,n,a,o,s=e.style,l=e.scale&&e.scale[0]||1,c=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)r=s.shadowOffsetX||0,n=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);r=s.textShadowOffsetX||0,n=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",r/l),i.setAttribute("dy",n/c),i.setAttribute("flood-color",o);var u=a/2/l+" "+a/2/c;i.setAttribute("stdDeviation",u),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(a/2*200)+"%"),t.setAttribute("height",Math.ceil(a/2*200)+"%"),t.appendChild(i),e._shadowDom=t},n.prototype.markUsed=function(e){e._shadowDom&&r.prototype.markUsed.call(this,e._shadowDom)};var o=n;e.exports=o},function(e,t,i){var r;
/*!
 * jQuery JavaScript Library v3.5.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2020-05-04T22:49Z
 */!function(t,i){"use strict";"object"==typeof e.exports?e.exports=t.document?i(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return i(e)}:i(t)}("undefined"!=typeof window?window:this,(function(i,n){"use strict";var a=[],o=Object.getPrototypeOf,s=a.slice,l=a.flat?function(e){return a.flat.call(e)}:function(e){return a.concat.apply([],e)},c=a.push,u=a.indexOf,d={},h=d.toString,p=d.hasOwnProperty,f=p.toString,m=f.call(Object),g={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},_=function(e){return null!=e&&e===e.window},v=i.document,C={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,i){var r,n,a=(i=i||v).createElement("script");if(a.text=e,t)for(r in C)(n=t[r]||t.getAttribute&&t.getAttribute(r))&&a.setAttribute(r,n);i.head.appendChild(a).parentNode.removeChild(a)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var S=function(e,t){return new S.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,i=b(e);return!y(e)&&!_(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}S.fn=S.prototype={jquery:"3.5.1",constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,(function(t,i){return e.call(t,i,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(S.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:a.sort,splice:a.splice},S.extend=S.fn.extend=function(){var e,t,i,r,n,a,o=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[s]||{},s++),"object"==typeof o||y(o)||(o={}),s===l&&(o=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&o!==r&&(c&&r&&(S.isPlainObject(r)||(n=Array.isArray(r)))?(i=o[t],a=n&&!Array.isArray(i)?[]:n||S.isPlainObject(i)?i:{},n=!1,o[t]=S.extend(c,a,r)):void 0!==r&&(o[t]=r));return o},S.extend({expando:"jQuery"+("3.5.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,i;return!(!e||"[object Object]"!==h.call(e))&&(!(t=o(e))||"function"==typeof(i=p.call(t,"constructor")&&t.constructor)&&f.call(i)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,i){x(e,{nonce:t&&t.nonce},i)},each:function(e,t){var i,r=0;if(T(e))for(i=e.length;r<i&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var i=t||[];return null!=e&&(T(Object(e))?S.merge(i,"string"==typeof e?[e]:e):c.call(i,e)),i},inArray:function(e,t,i){return null==t?-1:u.call(t,e,i)},merge:function(e,t){for(var i=+t.length,r=0,n=e.length;r<i;r++)e[n++]=t[r];return e.length=n,e},grep:function(e,t,i){for(var r=[],n=0,a=e.length,o=!i;n<a;n++)!t(e[n],n)!==o&&r.push(e[n]);return r},map:function(e,t,i){var r,n,a=0,o=[];if(T(e))for(r=e.length;a<r;a++)null!=(n=t(e[a],a,i))&&o.push(n);else for(a in e)null!=(n=t(e[a],a,i))&&o.push(n);return l(o)},guid:1,support:g}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=a[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var E=
/*!
 * Sizzle CSS Selector Engine v2.3.5
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://js.foundation/
 *
 * Date: 2020-03-14
 */
function(e){var t,i,r,n,a,o,s,l,c,u,d,h,p,f,m,g,y,_,v,C="sizzle"+1*new Date,x=e.document,b=0,S=0,T=le(),E=le(),w=le(),A=le(),P=function(e,t){return e===t&&(d=!0),0},D={}.hasOwnProperty,M=[],I=M.pop,R=M.push,O=M.push,L=M.slice,N=function(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B="[\\x20\\t\\r\\n\\f]",V="(?:\\\\[\\da-fA-F]{1,6}"+B+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",k="\\["+B+"*("+V+")(?:"+B+"*([*^$|!~]?=)"+B+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+V+"))|)"+B+"*\\]",z=":("+V+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+k+")*)|.*)\\)|)",G=new RegExp(B+"+","g"),U=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g"),$=new RegExp("^"+B+"*,"+B+"*"),H=new RegExp("^"+B+"*([>+~]|"+B+")"+B+"*"),W=new RegExp(B+"|>"),j=new RegExp(z),q=new RegExp("^"+V+"$"),Y={ID:new RegExp("^#("+V+")"),CLASS:new RegExp("^\\.("+V+")"),TAG:new RegExp("^("+V+"|[*])"),ATTR:new RegExp("^"+k),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+B+"?|\\\\([^\\r\\n\\f])","g"),ie=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){h()},oe=Ce((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(M=L.call(x.childNodes),x.childNodes),M[x.childNodes.length].nodeType}catch(e){O={apply:M.length?function(e,t){R.apply(e,L.call(t))}:function(e,t){for(var i=e.length,r=0;e[i++]=t[r++];);e.length=i-1}}}function se(e,t,r,n){var a,s,c,u,d,f,y,_=t&&t.ownerDocument,x=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return r;if(!n&&(h(t),t=t||p,m)){if(11!==x&&(d=K.exec(e)))if(a=d[1]){if(9===x){if(!(c=t.getElementById(a)))return r;if(c.id===a)return r.push(c),r}else if(_&&(c=_.getElementById(a))&&v(t,c)&&c.id===a)return r.push(c),r}else{if(d[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=d[3])&&i.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(i.qsa&&!A[e+" "]&&(!g||!g.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(y=e,_=t,1===x&&(W.test(e)||H.test(e))){for((_=ee.test(e)&&ye(t.parentNode)||t)===t&&i.scope||((u=t.getAttribute("id"))?u=u.replace(re,ne):t.setAttribute("id",u=C)),s=(f=o(e)).length;s--;)f[s]=(u?"#"+u:":scope")+" "+ve(f[s]);y=f.join(",")}try{return O.apply(r,_.querySelectorAll(y)),r}catch(t){A(e,!0)}finally{u===C&&t.removeAttribute("id")}}}return l(e.replace(U,"$1"),t,r,n)}function le(){var e=[];return function t(i,n){return e.push(i+" ")>r.cacheLength&&delete t[e.shift()],t[i+" "]=n}}function ce(e){return e[C]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var i=e.split("|"),n=i.length;n--;)r.attrHandle[i[n]]=t}function he(e,t){var i=t&&e,r=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce((function(t){return t=+t,ce((function(i,r){for(var n,a=e([],i.length,t),o=a.length;o--;)i[n=a[o]]&&(i[n]=!(r[n]=i[n]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in i=se.support={},a=se.isXML=function(e){var t=e.namespaceURI,i=(e.ownerDocument||e).documentElement;return!X.test(t||i&&i.nodeName||"HTML")},h=se.setDocument=function(e){var t,n,o=e?e.ownerDocument||e:x;return o!=p&&9===o.nodeType&&o.documentElement?(f=(p=o).documentElement,m=!a(p),x!=p&&(n=p.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ae,!1):n.attachEvent&&n.attachEvent("onunload",ae)),i.scope=ue((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),i.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),i.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),i.getElementsByClassName=J.test(p.getElementsByClassName),i.getById=ue((function(e){return f.appendChild(e).id=C,!p.getElementsByName||!p.getElementsByName(C).length})),i.getById?(r.filter.ID=function(e){var t=e.replace(te,ie);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var i=t.getElementById(e);return i?[i]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ie);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var i,r,n,a=t.getElementById(e);if(a){if((i=a.getAttributeNode("id"))&&i.value===e)return[a];for(n=t.getElementsByName(e),r=0;a=n[r++];)if((i=a.getAttributeNode("id"))&&i.value===e)return[a]}return[]}}),r.find.TAG=i.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):i.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,r=[],n=0,a=t.getElementsByTagName(e);if("*"===e){for(;i=a[n++];)1===i.nodeType&&r.push(i);return r}return a},r.find.CLASS=i.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},y=[],g=[],(i.qsa=J.test(p.querySelectorAll))&&(ue((function(e){var t;f.appendChild(e).innerHTML="<a id='"+C+"'></a><select id='"+C+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+B+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+B+"*(?:value|"+F+")"),e.querySelectorAll("[id~="+C+"-]").length||g.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+B+"*name"+B+"*="+B+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+B+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(i.matchesSelector=J.test(_=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue((function(e){i.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),y.push("!=",z)})),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),t=J.test(f.compareDocumentPosition),v=t||J.test(f.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(i.contains?i.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},P=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!i.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==x&&v(x,e)?-1:t==p||t.ownerDocument==x&&v(x,t)?1:u?N(u,e)-N(u,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var i,r=0,n=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!n||!a)return e==p?-1:t==p?1:n?-1:a?1:u?N(u,e)-N(u,t):0;if(n===a)return he(e,t);for(i=e;i=i.parentNode;)o.unshift(i);for(i=t;i=i.parentNode;)s.unshift(i);for(;o[r]===s[r];)r++;return r?he(o[r],s[r]):o[r]==x?-1:s[r]==x?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),i.matchesSelector&&m&&!A[t+" "]&&(!y||!y.test(t))&&(!g||!g.test(t)))try{var r=_.call(e,t);if(r||i.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=p&&h(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=p&&h(e);var n=r.attrHandle[t.toLowerCase()],a=n&&D.call(r.attrHandle,t.toLowerCase())?n(e,t,!m):void 0;return void 0!==a?a:i.attributes||!m?e.getAttribute(t):(a=e.getAttributeNode(t))&&a.specified?a.value:null},se.escape=function(e){return(e+"").replace(re,ne)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],n=0,a=0;if(d=!i.detectDuplicates,u=!i.sortStable&&e.slice(0),e.sort(P),d){for(;t=e[a++];)t===e[a]&&(n=r.push(a));for(;n--;)e.splice(r[n],1)}return u=null,e},n=se.getText=function(e){var t,i="",r=0,a=e.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=n(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[r++];)i+=n(t);return i},(r=se.selectors={cacheLength:50,createPseudo:ce,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ie),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ie),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&j.test(i)&&(t=o(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ie).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+B+")"+e+"("+B+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(r){var n=se.attr(r,e);return null==n?"!="===t:!t||(n+="","="===t?n===i:"!="===t?n!==i:"^="===t?i&&0===n.indexOf(i):"*="===t?i&&n.indexOf(i)>-1:"$="===t?i&&n.slice(-i.length)===i:"~="===t?(" "+n.replace(G," ")+" ").indexOf(i)>-1:"|="===t&&(n===i||n.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,r,n){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===n?function(e){return!!e.parentNode}:function(t,i,l){var c,u,d,h,p,f,m=a!==o?"nextSibling":"previousSibling",g=t.parentNode,y=s&&t.nodeName.toLowerCase(),_=!l&&!s,v=!1;if(g){if(a){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===y:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[o?g.firstChild:g.lastChild],o&&_){for(v=(p=(c=(u=(d=(h=g)[C]||(h[C]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===b&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(v=p=0)||f.pop();)if(1===h.nodeType&&++v&&h===t){u[e]=[b,p,v];break}}else if(_&&(v=p=(c=(u=(d=(h=t)[C]||(h[C]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===b&&c[1]),!1===v)for(;(h=++p&&h&&h[m]||(v=p=0)||f.pop())&&((s?h.nodeName.toLowerCase()!==y:1!==h.nodeType)||!++v||(_&&((u=(d=h[C]||(h[C]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[b,v]),h!==t)););return(v-=n)===r||v%r==0&&v/r>=0}}},PSEUDO:function(e,t){var i,n=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return n[C]?n(t):n.length>1?(i=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,i){for(var r,a=n(e,t),o=a.length;o--;)e[r=N(e,a[o])]=!(i[r]=a[o])})):function(e){return n(e,0,i)}):n}},pseudos:{not:ce((function(e){var t=[],i=[],r=s(e.replace(U,"$1"));return r[C]?ce((function(e,t,i,n){for(var a,o=r(e,null,n,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))})):function(e,n,a){return t[0]=e,r(t,null,a,i),t[0]=null,!i.pop()}})),has:ce((function(e){return function(t){return se(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ie),function(t){return(t.textContent||n(t)).indexOf(e)>-1}})),lang:ce((function(e){return q.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ie).toLowerCase(),function(t){var i;do{if(i=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,i){return[i<0?i+t:i]})),even:ge((function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e})),odd:ge((function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e})),lt:ge((function(e,t,i){for(var r=i<0?i+t:i>t?t:i;--r>=0;)e.push(r);return e})),gt:ge((function(e,t,i){for(var r=i<0?i+t:i;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=fe(t);function _e(){}function ve(e){for(var t=0,i=e.length,r="";t<i;t++)r+=e[t].value;return r}function Ce(e,t,i){var r=t.dir,n=t.next,a=n||r,o=i&&"parentNode"===a,s=S++;return t.first?function(t,i,n){for(;t=t[r];)if(1===t.nodeType||o)return e(t,i,n);return!1}:function(t,i,l){var c,u,d,h=[b,s];if(l){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,i,l))return!0}else for(;t=t[r];)if(1===t.nodeType||o)if(u=(d=t[C]||(t[C]={}))[t.uniqueID]||(d[t.uniqueID]={}),n&&n===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=u[a])&&c[0]===b&&c[1]===s)return h[2]=c[2];if(u[a]=h,h[2]=e(t,i,l))return!0}return!1}}function xe(e){return e.length>1?function(t,i,r){for(var n=e.length;n--;)if(!e[n](t,i,r))return!1;return!0}:e[0]}function be(e,t,i,r,n){for(var a,o=[],s=0,l=e.length,c=null!=t;s<l;s++)(a=e[s])&&(i&&!i(a,r,n)||(o.push(a),c&&t.push(s)));return o}function Se(e,t,i,r,n,a){return r&&!r[C]&&(r=Se(r)),n&&!n[C]&&(n=Se(n,a)),ce((function(a,o,s,l){var c,u,d,h=[],p=[],f=o.length,m=a||function(e,t,i){for(var r=0,n=t.length;r<n;r++)se(e,t[r],i);return i}(t||"*",s.nodeType?[s]:s,[]),g=!e||!a&&t?m:be(m,h,e,s,l),y=i?n||(a?e:f||r)?[]:o:g;if(i&&i(g,y,s,l),r)for(c=be(y,p),r(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[p[u]]=!(g[p[u]]=d));if(a){if(n||e){if(n){for(c=[],u=y.length;u--;)(d=y[u])&&c.push(g[u]=d);n(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=n?N(a,d):h[u])>-1&&(a[c]=!(o[c]=d))}}else y=be(y===o?y.splice(f,y.length):y),n?n(null,o,y,l):O.apply(o,y)}))}function Te(e){for(var t,i,n,a=e.length,o=r.relative[e[0].type],s=o||r.relative[" "],l=o?1:0,u=Ce((function(e){return e===t}),s,!0),d=Ce((function(e){return N(t,e)>-1}),s,!0),h=[function(e,i,r){var n=!o&&(r||i!==c)||((t=i).nodeType?u(e,i,r):d(e,i,r));return t=null,n}];l<a;l++)if(i=r.relative[e[l].type])h=[Ce(xe(h),i)];else{if((i=r.filter[e[l].type].apply(null,e[l].matches))[C]){for(n=++l;n<a&&!r.relative[e[n].type];n++);return Se(l>1&&xe(h),l>1&&ve(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(U,"$1"),i,l<n&&Te(e.slice(l,n)),n<a&&Te(e=e.slice(n)),n<a&&ve(e))}h.push(i)}return xe(h)}return _e.prototype=r.filters=r.pseudos,r.setFilters=new _e,o=se.tokenize=function(e,t){var i,n,a,o,s,l,c,u=E[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=r.preFilter;s;){for(o in i&&!(n=$.exec(s))||(n&&(s=s.slice(n[0].length)||s),l.push(a=[])),i=!1,(n=H.exec(s))&&(i=n.shift(),a.push({value:i,type:n[0].replace(U," ")}),s=s.slice(i.length)),r.filter)!(n=Y[o].exec(s))||c[o]&&!(n=c[o](n))||(i=n.shift(),a.push({value:i,type:o,matches:n}),s=s.slice(i.length));if(!i)break}return t?s.length:s?se.error(e):E(e,l).slice(0)},s=se.compile=function(e,t){var i,n=[],a=[],s=w[e+" "];if(!s){for(t||(t=o(e)),i=t.length;i--;)(s=Te(t[i]))[C]?n.push(s):a.push(s);(s=w(e,function(e,t){var i=t.length>0,n=e.length>0,a=function(a,o,s,l,u){var d,f,g,y=0,_="0",v=a&&[],C=[],x=c,S=a||n&&r.find.TAG("*",u),T=b+=null==x?1:Math.random()||.1,E=S.length;for(u&&(c=o==p||o||u);_!==E&&null!=(d=S[_]);_++){if(n&&d){for(f=0,o||d.ownerDocument==p||(h(d),s=!m);g=e[f++];)if(g(d,o||p,s)){l.push(d);break}u&&(b=T)}i&&((d=!g&&d)&&y--,a&&v.push(d))}if(y+=_,i&&_!==y){for(f=0;g=t[f++];)g(v,C,o,s);if(a){if(y>0)for(;_--;)v[_]||C[_]||(C[_]=I.call(l));C=be(C)}O.apply(l,C),u&&!a&&C.length>0&&y+t.length>1&&se.uniqueSort(l)}return u&&(b=T,c=x),v};return i?ce(a):a}(a,n))).selector=e}return s},l=se.select=function(e,t,i,n){var a,l,c,u,d,h="function"==typeof e&&e,p=!n&&o(e=h.selector||e);if(i=i||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===t.nodeType&&m&&r.relative[l[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ie),t)||[])[0]))return i;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(a=Y.needsContext.test(e)?0:l.length;a--&&(c=l[a],!r.relative[u=c.type]);)if((d=r.find[u])&&(n=d(c.matches[0].replace(te,ie),ee.test(l[0].type)&&ye(t.parentNode)||t))){if(l.splice(a,1),!(e=n.length&&ve(l)))return O.apply(i,n),i;break}}return(h||s(e,p))(n,t,!m,i,!t||ee.test(e)&&ye(t.parentNode)||t),i},i.sortStable=C.split("").sort(P).join("")===C,i.detectDuplicates=!!d,h(),i.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),i.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||de(F,(function(e,t,i){var r;if(!i)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(i);S.find=E,S.expr=E.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=E.uniqueSort,S.text=E.getText,S.isXMLDoc=E.isXML,S.contains=E.contains,S.escapeSelector=E.escape;var w=function(e,t,i){for(var r=[],n=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(n&&S(e).is(i))break;r.push(e)}return r},A=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},P=S.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,i){return y(t)?S.grep(e,(function(e,r){return!!t.call(e,r,e)!==i})):t.nodeType?S.grep(e,(function(e){return e===t!==i})):"string"!=typeof t?S.grep(e,(function(e){return u.call(t,e)>-1!==i})):S.filter(t,e,i)}S.filter=function(e,t,i){var r=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,(function(e){return 1===e.nodeType})))},S.fn.extend({find:function(e){var t,i,r=this.length,n=this;if("string"!=typeof e)return this.pushStack(S(e).filter((function(){for(t=0;t<r;t++)if(S.contains(n[t],this))return!0})));for(i=this.pushStack([]),t=0;t<r;t++)S.find(e,n[t],i);return r>1?S.uniqueSort(i):i},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&P.test(e)?S(e):e||[],!1).length}});var R,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,i){var r,n;if(!e)return this;if(i=i||R,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:O.exec(e))||!r[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:v,!0)),M.test(r[1])&&S.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(n=v.getElementById(r[2]))&&(this[0]=n,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==i.ready?i.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,R=S(v);var L=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function F(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),i=t.length;return this.filter((function(){for(var e=0;e<i;e++)if(S.contains(this,t[e]))return!0}))},closest:function(e,t){var i,r=0,n=this.length,a=[],o="string"!=typeof e&&S(e);if(!P.test(e))for(;r<n;r++)for(i=this[r];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(o?o.index(i)>-1:1===i.nodeType&&S.find.matchesSelector(i,e))){a.push(i);break}return this.pushStack(a.length>1?S.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?u.call(S(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return w(e,"parentNode")},parentsUntil:function(e,t,i){return w(e,"parentNode",i)},next:function(e){return F(e,"nextSibling")},prev:function(e){return F(e,"previousSibling")},nextAll:function(e){return w(e,"nextSibling")},prevAll:function(e){return w(e,"previousSibling")},nextUntil:function(e,t,i){return w(e,"nextSibling",i)},prevUntil:function(e,t,i){return w(e,"previousSibling",i)},siblings:function(e){return A((e.parentNode||{}).firstChild,e)},children:function(e){return A(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(D(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},(function(e,t){S.fn[e]=function(i,r){var n=S.map(this,t,i);return"Until"!==e.slice(-5)&&(r=i),r&&"string"==typeof r&&(n=S.filter(r,n)),this.length>1&&(N[e]||S.uniqueSort(n),L.test(e)&&n.reverse()),this.pushStack(n)}}));var B=/[^\x20\t\r\n\f]+/g;function V(e){return e}function k(e){throw e}function z(e,t,i,r){var n;try{e&&y(n=e.promise)?n.call(e).done(t).fail(i):e&&y(n=e.then)?n.call(e,t,i):t.apply(void 0,[e].slice(r))}catch(e){i.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(B)||[],(function(e,i){t[i]=!0})),t}(e):S.extend({},e);var t,i,r,n,a=[],o=[],s=-1,l=function(){for(n=n||e.once,r=t=!0;o.length;s=-1)for(i=o.shift();++s<a.length;)!1===a[s].apply(i[0],i[1])&&e.stopOnFalse&&(s=a.length,i=!1);e.memory||(i=!1),t=!1,n&&(a=i?[]:"")},c={add:function(){return a&&(i&&!t&&(s=a.length-1,o.push(i)),function t(i){S.each(i,(function(i,r){y(r)?e.unique&&c.has(r)||a.push(r):r&&r.length&&"string"!==b(r)&&t(r)}))}(arguments),i&&!t&&l()),this},remove:function(){return S.each(arguments,(function(e,t){for(var i;(i=S.inArray(t,a,i))>-1;)a.splice(i,1),i<=s&&s--})),this},has:function(e){return e?S.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return n=o=[],a=i="",this},disabled:function(){return!a},lock:function(){return n=o=[],i||t||(a=i=""),this},locked:function(){return!!n},fireWith:function(e,i){return n||(i=[e,(i=i||[]).slice?i.slice():i],o.push(i),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],r="pending",n={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return n.then(null,e)},pipe:function(){var e=arguments;return S.Deferred((function(i){S.each(t,(function(t,r){var n=y(e[r[4]])&&e[r[4]];a[r[1]]((function(){var e=n&&n.apply(this,arguments);e&&y(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[r[0]+"With"](this,n?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,n){var a=0;function o(e,t,r,n){return function(){var s=this,l=arguments,c=function(){var i,c;if(!(e<a)){if((i=r.apply(s,l))===t.promise())throw new TypeError("Thenable self-resolution");c=i&&("object"==typeof i||"function"==typeof i)&&i.then,y(c)?n?c.call(i,o(a,t,V,n),o(a,t,k,n)):(a++,c.call(i,o(a,t,V,n),o(a,t,k,n),o(a,t,V,t.notifyWith))):(r!==V&&(s=void 0,l=[i]),(n||t.resolveWith)(s,l))}},u=n?c:function(){try{c()}catch(i){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(i,u.stackTrace),e+1>=a&&(r!==k&&(s=void 0,l=[i]),t.rejectWith(s,l))}};e?u():(S.Deferred.getStackHook&&(u.stackTrace=S.Deferred.getStackHook()),i.setTimeout(u))}}return S.Deferred((function(i){t[0][3].add(o(0,i,y(n)?n:V,i.notifyWith)),t[1][3].add(o(0,i,y(e)?e:V)),t[2][3].add(o(0,i,y(r)?r:k))})).promise()},promise:function(e){return null!=e?S.extend(e,n):n}},a={};return S.each(t,(function(e,i){var o=i[2],s=i[5];n[i[1]]=o.add,s&&o.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith})),n.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,i=t,r=Array(i),n=s.call(arguments),a=S.Deferred(),o=function(e){return function(i){r[e]=this,n[e]=arguments.length>1?s.call(arguments):i,--t||a.resolveWith(r,n)}};if(t<=1&&(z(e,a.done(o(i)).resolve,a.reject,!t),"pending"===a.state()||y(n[i]&&n[i].then)))return a.then();for(;i--;)z(n[i],o(i),a.reject);return a.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&G.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){i.setTimeout((function(){throw e}))};var U=S.Deferred();function $(){v.removeEventListener("DOMContentLoaded",$),i.removeEventListener("load",$),S.ready()}S.fn.ready=function(e){return U.then(e).catch((function(e){S.readyException(e)})),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||U.resolveWith(v,[S]))}}),S.ready.then=U.then,"complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll?i.setTimeout(S.ready):(v.addEventListener("DOMContentLoaded",$),i.addEventListener("load",$));var H=function(e,t,i,r,n,a,o){var s=0,l=e.length,c=null==i;if("object"===b(i))for(s in n=!0,i)H(e,t,s,i[s],!0,a,o);else if(void 0!==r&&(n=!0,y(r)||(o=!0),c&&(o?(t.call(e,r),t=null):(c=t,t=function(e,t,i){return c.call(S(e),i)})),t))for(;s<l;s++)t(e[s],i,o?r:r.call(e[s],s,t(e[s],i)));return n?e:c?t.call(e):l?t(e[0],i):a},W=/^-ms-/,j=/-([a-z])/g;function q(e,t){return t.toUpperCase()}function Y(e){return e.replace(W,"ms-").replace(j,q)}var X=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=S.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},X(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var r,n=this.cache(e);if("string"==typeof t)n[Y(t)]=i;else for(r in t)n[Y(r)]=t[r];return n},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Y(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,r=e[this.expando];if(void 0!==r){if(void 0!==t){i=(t=Array.isArray(t)?t.map(Y):(t=Y(t))in r?[t]:t.match(B)||[]).length;for(;i--;)delete r[t[i]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Z=new Q,J=new Q,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e,t,i){var r;if(void 0===i&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(r))){try{i=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:K.test(e)?JSON.parse(e):e)}(i)}catch(e){}J.set(e,t,i)}else i=void 0;return i}S.extend({hasData:function(e){return J.hasData(e)||Z.hasData(e)},data:function(e,t,i){return J.access(e,t,i)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,i){return Z.access(e,t,i)},_removeData:function(e,t){Z.remove(e,t)}}),S.fn.extend({data:function(e,t){var i,r,n,a=this[0],o=a&&a.attributes;if(void 0===e){if(this.length&&(n=J.get(a),1===a.nodeType&&!Z.get(a,"hasDataAttrs"))){for(i=o.length;i--;)o[i]&&0===(r=o[i].name).indexOf("data-")&&(r=Y(r.slice(5)),te(a,r,n[r]));Z.set(a,"hasDataAttrs",!0)}return n}return"object"==typeof e?this.each((function(){J.set(this,e)})):H(this,(function(t){var i;if(a&&void 0===t)return void 0!==(i=J.get(a,e))||void 0!==(i=te(a,e))?i:void 0;this.each((function(){J.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),S.extend({queue:function(e,t,i){var r;if(e)return t=(t||"fx")+"queue",r=Z.get(e,t),i&&(!r||Array.isArray(i)?r=Z.access(e,t,S.makeArray(i)):r.push(i)),r||[]},dequeue:function(e,t){t=t||"fx";var i=S.queue(e,t),r=i.length,n=i.shift(),a=S._queueHooks(e,t);"inprogress"===n&&(n=i.shift(),r--),n&&("fx"===t&&i.unshift("inprogress"),delete a.stop,n.call(e,(function(){S.dequeue(e,t)}),a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return Z.get(e,i)||Z.access(e,i,{empty:S.Callbacks("once memory").add((function(){Z.remove(e,[t+"queue",i])}))})}}),S.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?S.queue(this[0],e):void 0===t?this:this.each((function(){var i=S.queue(this,e,t);S._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&S.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){S.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,r=1,n=S.Deferred(),a=this,o=this.length,s=function(){--r||n.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(i=Z.get(a[o],e+"queueHooks"))&&i.empty&&(r++,i.empty.add(s));return s(),n.promise(t)}});var ie=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ie+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],ae=v.documentElement,oe=function(e){return S.contains(e.ownerDocument,e)},se={composed:!0};ae.getRootNode&&(oe=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});var le=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===S.css(e,"display")};function ce(e,t,i,r){var n,a,o=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},l=s(),c=i&&i[3]||(S.cssNumber[t]?"":"px"),u=e.nodeType&&(S.cssNumber[t]||"px"!==c&&+l)&&re.exec(S.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;o--;)S.style(e,t,u+c),(1-a)*(1-(a=s()/l||.5))<=0&&(o=0),u/=a;u*=2,S.style(e,t,u+c),i=i||[]}return i&&(u=+u||+l||0,n=i[1]?u+(i[1]+1)*i[2]:+i[2],r&&(r.unit=c,r.start=u,r.end=n)),n}var ue={};function de(e){var t,i=e.ownerDocument,r=e.nodeName,n=ue[r];return n||(t=i.body.appendChild(i.createElement(r)),n=S.css(t,"display"),t.parentNode.removeChild(t),"none"===n&&(n="block"),ue[r]=n,n)}function he(e,t){for(var i,r,n=[],a=0,o=e.length;a<o;a++)(r=e[a]).style&&(i=r.style.display,t?("none"===i&&(n[a]=Z.get(r,"display")||null,n[a]||(r.style.display="")),""===r.style.display&&le(r)&&(n[a]=de(r))):"none"!==i&&(n[a]="none",Z.set(r,"display",i)));for(a=0;a<o;a++)null!=n[a]&&(e[a].style.display=n[a]);return e}S.fn.extend({show:function(){return he(this,!0)},hide:function(){return he(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){le(this)?S(this).show():S(this).hide()}))}});var pe,fe,me=/^(?:checkbox|radio)$/i,ge=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;pe=v.createDocumentFragment().appendChild(v.createElement("div")),(fe=v.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),pe.appendChild(fe),g.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="<option></option>",g.option=!!pe.lastChild;var _e={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?S.merge([e],i):i}function Ce(e,t){for(var i=0,r=e.length;i<r;i++)Z.set(e[i],"globalEval",!t||Z.get(t[i],"globalEval"))}_e.tbody=_e.tfoot=_e.colgroup=_e.caption=_e.thead,_e.th=_e.td,g.option||(_e.optgroup=_e.option=[1,"<select multiple='multiple'>","</select>"]);var xe=/<|&#?\w+;/;function be(e,t,i,r,n){for(var a,o,s,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p<f;p++)if((a=e[p])||0===a)if("object"===b(a))S.merge(h,a.nodeType?[a]:a);else if(xe.test(a)){for(o=o||d.appendChild(t.createElement("div")),s=(ge.exec(a)||["",""])[1].toLowerCase(),l=_e[s]||_e._default,o.innerHTML=l[1]+S.htmlPrefilter(a)+l[2],u=l[0];u--;)o=o.lastChild;S.merge(h,o.childNodes),(o=d.firstChild).textContent=""}else h.push(t.createTextNode(a));for(d.textContent="",p=0;a=h[p++];)if(r&&S.inArray(a,r)>-1)n&&n.push(a);else if(c=oe(a),o=ve(d.appendChild(a),"script"),c&&Ce(o),i)for(u=0;a=o[u++];)ye.test(a.type||"")&&i.push(a);return d}var Se=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Ae(){return!1}function Pe(e,t){return e===function(){try{return v.activeElement}catch(e){}}()==("focus"===t)}function De(e,t,i,r,n,a){var o,s;if("object"==typeof t){for(s in"string"!=typeof i&&(r=r||i,i=void 0),t)De(e,s,i,r,t[s],a);return e}if(null==r&&null==n?(n=i,r=i=void 0):null==n&&("string"==typeof i?(n=r,r=void 0):(n=r,r=i,i=void 0)),!1===n)n=Ae;else if(!n)return e;return 1===a&&(o=n,(n=function(e){return S().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=S.guid++)),e.each((function(){S.event.add(this,t,n,r,i)}))}function Me(e,t,i){i?(Z.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var r,n,a=Z.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=s.call(arguments),Z.set(this,t,a),r=i(this,t),this[t](),a!==(n=Z.get(this,t))||r?Z.set(this,t,!1):n={},a!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else a.length&&(Z.set(this,t,{value:S.event.trigger(S.extend(a[0],S.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Z.get(e,t)&&S.event.add(e,t,we)}S.event={global:{},add:function(e,t,i,r,n){var a,o,s,l,c,u,d,h,p,f,m,g=Z.get(e);if(X(e))for(i.handler&&(i=(a=i).handler,n=a.selector),n&&S.find.matchesSelector(ae,n),i.guid||(i.guid=S.guid++),(l=g.events)||(l=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(B)||[""]).length;c--;)p=m=(s=Ee.exec(t[c])||[])[1],f=(s[2]||"").split(".").sort(),p&&(d=S.event.special[p]||{},p=(n?d.delegateType:d.bindType)||p,d=S.event.special[p]||{},u=S.extend({type:p,origType:m,data:r,handler:i,guid:i.guid,selector:n,needsContext:n&&S.expr.match.needsContext.test(n),namespace:f.join(".")},a),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,f,o)||e.addEventListener&&e.addEventListener(p,o)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=i.guid)),n?h.splice(h.delegateCount++,0,u):h.push(u),S.event.global[p]=!0)},remove:function(e,t,i,r,n){var a,o,s,l,c,u,d,h,p,f,m,g=Z.hasData(e)&&Z.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(B)||[""]).length;c--;)if(p=m=(s=Ee.exec(t[c])||[])[1],f=(s[2]||"").split(".").sort(),p){for(d=S.event.special[p]||{},h=l[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)u=h[a],!n&&m!==u.origType||i&&i.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(h.splice(a,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));o&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||S.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)S.event.remove(e,p+t[c],i,r,!0);S.isEmptyObject(l)&&Z.remove(e,"handle events")}},dispatch:function(e){var t,i,r,n,a,o,s=new Array(arguments.length),l=S.event.fix(e),c=(Z.get(this,"events")||Object.create(null))[l.type]||[],u=S.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(o=S.event.handlers.call(this,l,c),t=0;(n=o[t++])&&!l.isPropagationStopped();)for(l.currentTarget=n.elem,i=0;(a=n.handlers[i++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==a.namespace&&!l.rnamespace.test(a.namespace)||(l.handleObj=a,l.data=a.data,void 0!==(r=((S.event.special[a.origType]||{}).handle||a.handler).apply(n.elem,s))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var i,r,n,a,o,s=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(a=[],o={},i=0;i<l;i++)void 0===o[n=(r=t[i]).selector+" "]&&(o[n]=r.needsContext?S(n,this).index(c)>-1:S.find(n,this,null,[c]).length),o[n]&&a.push(r);a.length&&s.push({elem:c,handlers:a})}return c=this,l<t.length&&s.push({elem:c,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:y(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return me.test(t.type)&&t.click&&D(t,"input")&&Me(t,"click",we),!1},trigger:function(e){var t=this||e;return me.test(t.type)&&t.click&&D(t,"input")&&Me(t,"click"),!0},_default:function(e){var t=e.target;return me.test(t.type)&&t.click&&D(t,"input")&&Z.get(t,"click")||D(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Ae,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ae,isPropagationStopped:Ae,isImmediatePropagationStopped:Ae,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Se.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},(function(e,t){S.event.special[e]={setup:function(){return Me(this,e,Pe),!1},trigger:function(){return Me(this,e),!0},delegateType:t}})),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,r=this,n=e.relatedTarget,a=e.handleObj;return n&&(n===r||S.contains(r,n))||(e.type=a.origType,i=a.handler.apply(this,arguments),e.type=t),i}}})),S.fn.extend({on:function(e,t,i,r){return De(this,e,t,i,r)},one:function(e,t,i,r){return De(this,e,t,i,r,1)},off:function(e,t,i){var r,n;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(n in e)this.off(n,t,e[n]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=Ae),this.each((function(){S.event.remove(this,e,i,t)}))}});var Ie=/<script|<style|<link/i,Re=/checked\s*(?:[^=]|=\s*.checked.)/i,Oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Ne(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Fe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Be(e,t){var i,r,n,a,o,s;if(1===t.nodeType){if(Z.hasData(e)&&(s=Z.get(e).events))for(n in Z.remove(t,"handle events"),s)for(i=0,r=s[n].length;i<r;i++)S.event.add(t,n,s[n][i]);J.hasData(e)&&(a=J.access(e),o=S.extend({},a),J.set(t,o))}}function Ve(e,t){var i=t.nodeName.toLowerCase();"input"===i&&me.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function ke(e,t,i,r){t=l(t);var n,a,o,s,c,u,d=0,h=e.length,p=h-1,f=t[0],m=y(f);if(m||h>1&&"string"==typeof f&&!g.checkClone&&Re.test(f))return e.each((function(n){var a=e.eq(n);m&&(t[0]=f.call(this,n,a.html())),ke(a,t,i,r)}));if(h&&(a=(n=be(t,e[0].ownerDocument,!1,e,r)).firstChild,1===n.childNodes.length&&(n=a),a||r)){for(s=(o=S.map(ve(n,"script"),Ne)).length;d<h;d++)c=n,d!==p&&(c=S.clone(c,!0,!0),s&&S.merge(o,ve(c,"script"))),i.call(e[d],c,d);if(s)for(u=o[o.length-1].ownerDocument,S.map(o,Fe),d=0;d<s;d++)c=o[d],ye.test(c.type||"")&&!Z.access(c,"globalEval")&&S.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?S._evalUrl&&!c.noModule&&S._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):x(c.textContent.replace(Oe,""),c,u))}return e}function ze(e,t,i){for(var r,n=t?S.filter(t,e):e,a=0;null!=(r=n[a]);a++)i||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(i&&oe(r)&&Ce(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var r,n,a,o,s=e.cloneNode(!0),l=oe(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(o=ve(s),r=0,n=(a=ve(e)).length;r<n;r++)Ve(a[r],o[r]);if(t)if(i)for(a=a||ve(e),o=o||ve(s),r=0,n=a.length;r<n;r++)Be(a[r],o[r]);else Be(e,s);return(o=ve(s,"script")).length>0&&Ce(o,!l&&ve(e,"script")),s},cleanData:function(e){for(var t,i,r,n=S.event.special,a=0;void 0!==(i=e[a]);a++)if(X(i)){if(t=i[Z.expando]){if(t.events)for(r in t.events)n[r]?S.event.remove(i,r):S.removeEvent(i,r,t.handle);i[Z.expando]=void 0}i[J.expando]&&(i[J.expando]=void 0)}}}),S.fn.extend({detach:function(e){return ze(this,e,!0)},remove:function(e){return ze(this,e)},text:function(e){return H(this,(function(e){return void 0===e?S.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ke(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return ke(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ke(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ke(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return S.clone(this,e,t)}))},html:function(e){return H(this,(function(e){var t=this[0]||{},i=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ie.test(e)&&!_e[(ge.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;i<r;i++)1===(t=this[i]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return ke(this,arguments,(function(t){var i=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(ve(this)),i&&i.replaceChild(t,this))}),e)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){S.fn[e]=function(e){for(var i,r=[],n=S(e),a=n.length-1,o=0;o<=a;o++)i=o===a?this:this.clone(!0),S(n[o])[t](i),c.apply(r,i.get());return this.pushStack(r)}}));var Ge=new RegExp("^("+ie+")(?!px)[a-z%]+$","i"),Ue=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=i),t.getComputedStyle(e)},$e=function(e,t,i){var r,n,a={};for(n in t)a[n]=e.style[n],e.style[n]=t[n];for(n in r=i.call(e),t)e.style[n]=a[n];return r},He=new RegExp(ne.join("|"),"i");function We(e,t,i){var r,n,a,o,s=e.style;return(i=i||Ue(e))&&(""!==(o=i.getPropertyValue(t)||i[t])||oe(e)||(o=S.style(e,t)),!g.pixelBoxStyles()&&Ge.test(o)&&He.test(t)&&(r=s.width,n=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=i.width,s.width=r,s.minWidth=n,s.maxWidth=a)),void 0!==o?o+"":o}function je(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(c).appendChild(u);var e=i.getComputedStyle(u);r="1%"!==e.top,l=12===t(e.marginLeft),u.style.right="60%",o=36===t(e.right),n=36===t(e.width),u.style.position="absolute",a=12===t(u.offsetWidth/3),ae.removeChild(c),u=null}}function t(e){return Math.round(parseFloat(e))}var r,n,a,o,s,l,c=v.createElement("div"),u=v.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===u.style.backgroundClip,S.extend(g,{boxSizingReliable:function(){return e(),n},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),a},reliableTrDimensions:function(){var e,t,r,n;return null==s&&(e=v.createElement("table"),t=v.createElement("tr"),r=v.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",r.style.height="9px",ae.appendChild(e).appendChild(t).appendChild(r),n=i.getComputedStyle(t),s=parseInt(n.height)>3,ae.removeChild(e)),s}}))}();var qe=["Webkit","Moz","ms"],Ye=v.createElement("div").style,Xe={};function Qe(e){var t=S.cssProps[e]||Xe[e];return t||(e in Ye?e:Xe[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),i=qe.length;i--;)if((e=qe[i]+t)in Ye)return e}(e)||e)}var Ze=/^(none|table(?!-c[ea]).+)/,Je=/^--/,Ke={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,i){var r=re.exec(t);return r?Math.max(0,r[2]-(i||0))+(r[3]||"px"):t}function it(e,t,i,r,n,a){var o="width"===t?1:0,s=0,l=0;if(i===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===i&&(l+=S.css(e,i+ne[o],!0,n)),r?("content"===i&&(l-=S.css(e,"padding"+ne[o],!0,n)),"margin"!==i&&(l-=S.css(e,"border"+ne[o]+"Width",!0,n))):(l+=S.css(e,"padding"+ne[o],!0,n),"padding"!==i?l+=S.css(e,"border"+ne[o]+"Width",!0,n):s+=S.css(e,"border"+ne[o]+"Width",!0,n));return!r&&a>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-l-s-.5))||0),l}function rt(e,t,i){var r=Ue(e),n=(!g.boxSizingReliable()||i)&&"border-box"===S.css(e,"boxSizing",!1,r),a=n,o=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ge.test(o)){if(!i)return o;o="auto"}return(!g.boxSizingReliable()&&n||!g.reliableTrDimensions()&&D(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(n="border-box"===S.css(e,"boxSizing",!1,r),(a=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+it(e,t,i||(n?"border":"content"),a,r,o)+"px"}function nt(e,t,i,r,n){return new nt.prototype.init(e,t,i,r,n)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=We(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var n,a,o,s=Y(t),l=Je.test(t),c=e.style;if(l||(t=Qe(s)),o=S.cssHooks[t]||S.cssHooks[s],void 0===i)return o&&"get"in o&&void 0!==(n=o.get(e,!1,r))?n:c[t];"string"===(a=typeof i)&&(n=re.exec(i))&&n[1]&&(i=ce(e,t,n),a="number"),null!=i&&i==i&&("number"!==a||l||(i+=n&&n[3]||(S.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==i||0!==t.indexOf("background")||(c[t]="inherit"),o&&"set"in o&&void 0===(i=o.set(e,i,r))||(l?c.setProperty(t,i):c[t]=i))}},css:function(e,t,i,r){var n,a,o,s=Y(t);return Je.test(t)||(t=Qe(s)),(o=S.cssHooks[t]||S.cssHooks[s])&&"get"in o&&(n=o.get(e,!0,i)),void 0===n&&(n=We(e,t,r)),"normal"===n&&t in et&&(n=et[t]),""===i||i?(a=parseFloat(n),!0===i||isFinite(a)?a||0:n):n}}),S.each(["height","width"],(function(e,t){S.cssHooks[t]={get:function(e,i,r){if(i)return!Ze.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?rt(e,t,r):$e(e,Ke,(function(){return rt(e,t,r)}))},set:function(e,i,r){var n,a=Ue(e),o=!g.scrollboxSize()&&"absolute"===a.position,s=(o||r)&&"border-box"===S.css(e,"boxSizing",!1,a),l=r?it(e,t,r,s,a):0;return s&&o&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-it(e,t,"border",!1,a)-.5)),l&&(n=re.exec(i))&&"px"!==(n[3]||"px")&&(e.style[t]=i,i=S.css(e,t)),tt(0,i,l)}}})),S.cssHooks.marginLeft=je(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-$e(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),S.each({margin:"",padding:"",border:"Width"},(function(e,t){S.cssHooks[e+t]={expand:function(i){for(var r=0,n={},a="string"==typeof i?i.split(" "):[i];r<4;r++)n[e+ne[r]+t]=a[r]||a[r-2]||a[0];return n}},"margin"!==e&&(S.cssHooks[e+t].set=tt)})),S.fn.extend({css:function(e,t){return H(this,(function(e,t,i){var r,n,a={},o=0;if(Array.isArray(t)){for(r=Ue(e),n=t.length;o<n;o++)a[t[o]]=S.css(e,t[o],!1,r);return a}return void 0!==i?S.style(e,t,i):S.css(e,t)}),e,t,arguments.length>1)}}),S.Tween=nt,nt.prototype={constructor:nt,init:function(e,t,i,r,n,a){this.elem=e,this.prop=i,this.easing=n||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(S.cssNumber[i]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,i=nt.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):nt.propHooks._default.set(this),this}},nt.prototype.init.prototype=nt.prototype,nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Qe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}},nt.propHooks.scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=nt.prototype.init,S.fx.step={};var at,ot,st=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){ot&&(!1===v.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(ct):i.setTimeout(ct,S.fx.interval),S.fx.tick())}function ut(){return i.setTimeout((function(){at=void 0})),at=Date.now()}function dt(e,t){var i,r=0,n={height:e};for(t=t?1:0;r<4;r+=2-t)n["margin"+(i=ne[r])]=n["padding"+i]=e;return t&&(n.opacity=n.width=e),n}function ht(e,t,i){for(var r,n=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),a=0,o=n.length;a<o;a++)if(r=n[a].call(i,t,e))return r}function pt(e,t,i){var r,n,a=0,o=pt.prefilters.length,s=S.Deferred().always((function(){delete l.elem})),l=function(){if(n)return!1;for(var t=at||ut(),i=Math.max(0,c.startTime+c.duration-t),r=1-(i/c.duration||0),a=0,o=c.tweens.length;a<o;a++)c.tweens[a].run(r);return s.notifyWith(e,[c,r,i]),r<1&&o?i:(o||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},i),originalProperties:t,originalOptions:i,startTime:at||ut(),duration:i.duration,tweens:[],createTween:function(t,i){var r=S.Tween(e,c.opts,t,i,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var i=0,r=t?c.tweens.length:0;if(n)return this;for(n=!0;i<r;i++)c.tweens[i].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(!function(e,t){var i,r,n,a,o;for(i in e)if(n=t[r=Y(i)],a=e[i],Array.isArray(a)&&(n=a[1],a=e[i]=a[0]),i!==r&&(e[r]=a,delete e[i]),(o=S.cssHooks[r])&&"expand"in o)for(i in a=o.expand(a),delete e[r],a)i in e||(e[i]=a[i],t[i]=n);else t[r]=n}(u,c.opts.specialEasing);a<o;a++)if(r=pt.prefilters[a].call(c,e,u,c.opts))return y(r.stop)&&(S._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return S.map(u,ht,c),y(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),S.fx.timer(S.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}S.Animation=S.extend(pt,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return ce(i.elem,e,re.exec(t),i),i}]},tweener:function(e,t){y(e)?(t=e,e=["*"]):e=e.match(B);for(var i,r=0,n=e.length;r<n;r++)i=e[r],pt.tweeners[i]=pt.tweeners[i]||[],pt.tweeners[i].unshift(t)},prefilters:[function(e,t,i){var r,n,a,o,s,l,c,u,d="width"in t||"height"in t,h=this,p={},f=e.style,m=e.nodeType&&le(e),g=Z.get(e,"fxshow");for(r in i.queue||(null==(o=S._queueHooks(e,"fx")).unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,h.always((function(){h.always((function(){o.unqueued--,S.queue(e,"fx").length||o.empty.fire()}))}))),t)if(n=t[r],st.test(n)){if(delete t[r],a=a||"toggle"===n,n===(m?"hide":"show")){if("show"!==n||!g||void 0===g[r])continue;m=!0}p[r]=g&&g[r]||S.style(e,r)}if((l=!S.isEmptyObject(t))||!S.isEmptyObject(p))for(r in d&&1===e.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=Z.get(e,"display")),"none"===(u=S.css(e,"display"))&&(c?u=c:(he([e],!0),c=e.style.display||c,u=S.css(e,"display"),he([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===S.css(e,"float")&&(l||(h.done((function(){f.display=c})),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",h.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]}))),l=!1,p)l||(g?"hidden"in g&&(m=g.hidden):g=Z.access(e,"fxshow",{display:c}),a&&(g.hidden=!m),m&&he([e],!0),h.done((function(){for(r in m||he([e]),Z.remove(e,"fxshow"),p)S.style(e,r,p[r])}))),l=ht(m?g[r]:0,r,h),r in g||(g[r]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),S.speed=function(e,t,i){var r=e&&"object"==typeof e?S.extend({},e):{complete:i||!i&&t||y(e)&&e,duration:e,easing:i&&t||t&&!y(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,i,r){return this.filter(le).css("opacity",0).show().end().animate({opacity:t},e,i,r)},animate:function(e,t,i,r){var n=S.isEmptyObject(e),a=S.speed(t,i,r),o=function(){var t=pt(this,S.extend({},e),a);(n||Z.get(this,"finish"))&&t.stop(!0)};return o.finish=o,n||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(e,t,i){var r=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,n=null!=e&&e+"queueHooks",a=S.timers,o=Z.get(this);if(n)o[n]&&o[n].stop&&r(o[n]);else for(n in o)o[n]&&o[n].stop&&lt.test(n)&&r(o[n]);for(n=a.length;n--;)a[n].elem!==this||null!=e&&a[n].queue!==e||(a[n].anim.stop(i),t=!1,a.splice(n,1));!t&&i||S.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,i=Z.get(this),r=i[e+"queue"],n=i[e+"queueHooks"],a=S.timers,o=r?r.length:0;for(i.finish=!0,S.queue(this,e,[]),n&&n.stop&&n.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete i.finish}))}}),S.each(["toggle","show","hide"],(function(e,t){var i=S.fn[t];S.fn[t]=function(e,r,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(dt(t,!0),e,r,n)}})),S.each({slideDown:dt("show"),slideUp:dt("hide"),slideToggle:dt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){S.fn[e]=function(e,i,r){return this.animate(t,e,i,r)}})),S.timers=[],S.fx.tick=function(){var e,t=0,i=S.timers;for(at=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||S.fx.stop(),at=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){ot||(ot=!0,ct())},S.fx.stop=function(){ot=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(e,t){return e=S.fx&&S.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,r){var n=i.setTimeout(t,e);r.stop=function(){i.clearTimeout(n)}}))},function(){var e=v.createElement("input"),t=v.createElement("select").appendChild(v.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=v.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var ft,mt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return H(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){S.removeAttr(this,e)}))}}),S.extend({attr:function(e,t,i){var r,n,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?S.prop(e,t,i):(1===a&&S.isXMLDoc(e)||(n=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ft:void 0)),void 0!==i?null===i?void S.removeAttr(e,t):n&&"set"in n&&void 0!==(r=n.set(e,i,t))?r:(e.setAttribute(t,i+""),i):n&&"get"in n&&null!==(r=n.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&D(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,r=0,n=t&&t.match(B);if(n&&1===e.nodeType)for(;i=n[r++];)e.removeAttribute(i)}}),ft={set:function(e,t,i){return!1===t?S.removeAttr(e,i):e.setAttribute(i,i),i}},S.each(S.expr.match.bool.source.match(/\w+/g),(function(e,t){var i=mt[t]||S.find.attr;mt[t]=function(e,t,r){var n,a,o=t.toLowerCase();return r||(a=mt[o],mt[o]=n,n=null!=i(e,t,r)?o:null,mt[o]=a),n}}));var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function _t(e){return(e.match(B)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function Ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(B)||[]}S.fn.extend({prop:function(e,t){return H(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[S.propFix[e]||e]}))}}),S.extend({prop:function(e,t,i){var r,n,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&S.isXMLDoc(e)||(t=S.propFix[t]||t,n=S.propHooks[t]),void 0!==i?n&&"set"in n&&void 0!==(r=n.set(e,i,t))?r:e[t]=i:n&&"get"in n&&null!==(r=n.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){S.propFix[this.toLowerCase()]=this})),S.fn.extend({addClass:function(e){var t,i,r,n,a,o,s,l=0;if(y(e))return this.each((function(t){S(this).addClass(e.call(this,t,vt(this)))}));if((t=Ct(e)).length)for(;i=this[l++];)if(n=vt(i),r=1===i.nodeType&&" "+_t(n)+" "){for(o=0;a=t[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");n!==(s=_t(r))&&i.setAttribute("class",s)}return this},removeClass:function(e){var t,i,r,n,a,o,s,l=0;if(y(e))return this.each((function(t){S(this).removeClass(e.call(this,t,vt(this)))}));if(!arguments.length)return this.attr("class","");if((t=Ct(e)).length)for(;i=this[l++];)if(n=vt(i),r=1===i.nodeType&&" "+_t(n)+" "){for(o=0;a=t[o++];)for(;r.indexOf(" "+a+" ")>-1;)r=r.replace(" "+a+" "," ");n!==(s=_t(r))&&i.setAttribute("class",s)}return this},toggleClass:function(e,t){var i=typeof e,r="string"===i||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):y(e)?this.each((function(i){S(this).toggleClass(e.call(this,i,vt(this),t),t)})):this.each((function(){var t,n,a,o;if(r)for(n=0,a=S(this),o=Ct(e);t=o[n++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==i||((t=vt(this))&&Z.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Z.get(this,"__className__")||""))}))},hasClass:function(e){var t,i,r=0;for(t=" "+e+" ";i=this[r++];)if(1===i.nodeType&&(" "+_t(vt(i))+" ").indexOf(t)>-1)return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(e){var t,i,r,n=this[0];return arguments.length?(r=y(e),this.each((function(i){var n;1===this.nodeType&&(null==(n=r?e.call(this,i,S(this).val()):e)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=S.map(n,(function(e){return null==e?"":e+""}))),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,n,"value")||(this.value=n))}))):n?(t=S.valHooks[n.type]||S.valHooks[n.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(n,"value"))?i:"string"==typeof(i=n.value)?i.replace(xt,""):null==i?"":i:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:_t(S.text(e))}},select:{get:function(e){var t,i,r,n=e.options,a=e.selectedIndex,o="select-one"===e.type,s=o?null:[],l=o?a+1:n.length;for(r=a<0?l:o?a:0;r<l;r++)if(((i=n[r]).selected||r===a)&&!i.disabled&&(!i.parentNode.disabled||!D(i.parentNode,"optgroup"))){if(t=S(i).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var i,r,n=e.options,a=S.makeArray(t),o=n.length;o--;)((r=n[o]).selected=S.inArray(S.valHooks.option.get(r),a)>-1)&&(i=!0);return i||(e.selectedIndex=-1),a}}}}),S.each(["radio","checkbox"],(function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},g.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin"in i;var bt=/^(?:focusinfocus|focusoutblur)$/,St=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,r,n){var a,o,s,l,c,u,d,h,f=[r||v],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(o=h=s=r=r||v,3!==r.nodeType&&8!==r.nodeType&&!bt.test(m+S.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[S.expando]?e:new S.Event(m,"object"==typeof e&&e)).isTrigger=n?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:S.makeArray(t,[e]),d=S.event.special[m]||{},n||!d.trigger||!1!==d.trigger.apply(r,t))){if(!n&&!d.noBubble&&!_(r)){for(l=d.delegateType||m,bt.test(l+m)||(o=o.parentNode);o;o=o.parentNode)f.push(o),s=o;s===(r.ownerDocument||v)&&f.push(s.defaultView||s.parentWindow||i)}for(a=0;(o=f[a++])&&!e.isPropagationStopped();)h=o,e.type=a>1?l:d.bindType||m,(u=(Z.get(o,"events")||Object.create(null))[e.type]&&Z.get(o,"handle"))&&u.apply(o,t),(u=c&&o[c])&&u.apply&&X(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,n||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!X(r)||c&&y(r[m])&&!_(r)&&((s=r[c])&&(r[c]=null),S.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,St),r[m](),e.isPropagationStopped()&&h.removeEventListener(m,St),S.event.triggered=void 0,s&&(r[c]=s)),e.result}},simulate:function(e,t,i){var r=S.extend(new S.Event,i,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each((function(){S.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return S.event.trigger(e,t,i,!0)}}),g.focusin||S.each({focus:"focusin",blur:"focusout"},(function(e,t){var i=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,n=Z.access(r,t);n||r.addEventListener(e,i,!0),Z.access(r,t,(n||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,n=Z.access(r,t)-1;n?Z.access(r,t,n):(r.removeEventListener(e,i,!0),Z.remove(r,t))}}}));var Tt=i.location,Et={guid:Date.now()},wt=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var At=/\[\]$/,Pt=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Mt=/^(?:input|select|textarea|keygen)/i;function It(e,t,i,r){var n;if(Array.isArray(t))S.each(t,(function(t,n){i||At.test(e)?r(e,n):It(e+"["+("object"==typeof n&&null!=n?t:"")+"]",n,i,r)}));else if(i||"object"!==b(t))r(e,t);else for(n in t)It(e+"["+n+"]",t[n],i,r)}S.param=function(e,t){var i,r=[],n=function(e,t){var i=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,(function(){n(this.name,this.value)}));else for(i in e)It(i,e[i],t,n);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Mt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!me.test(e))})).map((function(e,t){var i=S(this).val();return null==i?null:Array.isArray(i)?S.map(i,(function(e){return{name:t.name,value:e.replace(Pt,"\r\n")}})):{name:t.name,value:i.replace(Pt,"\r\n")}})).get()}});var Rt=/%20/g,Ot=/#.*$/,Lt=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,Bt=/^\/\//,Vt={},kt={},zt="*/".concat("*"),Gt=v.createElement("a");function Ut(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var r,n=0,a=t.toLowerCase().match(B)||[];if(y(i))for(;r=a[n++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(i)):(e[r]=e[r]||[]).push(i)}}function $t(e,t,i,r){var n={},a=e===kt;function o(s){var l;return n[s]=!0,S.each(e[s]||[],(function(e,s){var c=s(t,i,r);return"string"!=typeof c||a||n[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)})),l}return o(t.dataTypes[0])||!n["*"]&&o("*")}function Ht(e,t){var i,r,n=S.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((n[i]?e:r||(r={}))[i]=t[i]);return r&&S.extend(!0,e,r),e}Gt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ht(Ht(e,S.ajaxSettings),t):Ht(S.ajaxSettings,e)},ajaxPrefilter:Ut(Vt),ajaxTransport:Ut(kt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,n,a,o,s,l,c,u,d,h,p=S.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?S(f):S.event,g=S.Deferred(),y=S.Callbacks("once memory"),_=p.statusCode||{},C={},x={},b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(c){if(!o)for(o={};t=Nt.exec(a);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,C[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)T.always(e[T.status]);else for(t in e)_[t]=[_[t],e[t]];return this},abort:function(e){var t=e||b;return r&&r.abort(t),E(0,t),this}};if(g.promise(T),p.url=((e||p.url||Tt.href)+"").replace(Bt,Tt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(B)||[""],null==p.crossDomain){l=v.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Gt.protocol+"//"+Gt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=S.param(p.data,p.traditional)),$t(Vt,p,t,T),c)return T;for(d in(u=S.event&&p.global)&&0==S.active++&&S.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ft.test(p.type),n=p.url.replace(Ot,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Rt,"+")):(h=p.url.slice(n.length),p.data&&(p.processData||"string"==typeof p.data)&&(n+=(wt.test(n)?"&":"?")+p.data,delete p.data),!1===p.cache&&(n=n.replace(Lt,"$1"),h=(wt.test(n)?"&":"?")+"_="+Et.guid+++h),p.url=n+h),p.ifModified&&(S.lastModified[n]&&T.setRequestHeader("If-Modified-Since",S.lastModified[n]),S.etag[n]&&T.setRequestHeader("If-None-Match",S.etag[n])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&T.setRequestHeader("Content-Type",p.contentType),T.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zt+"; q=0.01":""):p.accepts["*"]),p.headers)T.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,T,p)||c))return T.abort();if(b="abort",y.add(p.complete),T.done(p.success),T.fail(p.error),r=$t(kt,p,t,T)){if(T.readyState=1,u&&m.trigger("ajaxSend",[T,p]),c)return T;p.async&&p.timeout>0&&(s=i.setTimeout((function(){T.abort("timeout")}),p.timeout));try{c=!1,r.send(C,E)}catch(e){if(c)throw e;E(-1,e)}}else E(-1,"No Transport");function E(e,t,o,l){var d,h,v,C,x,b=t;c||(c=!0,s&&i.clearTimeout(s),r=void 0,a=l||"",T.readyState=e>0?4:0,d=e>=200&&e<300||304===e,o&&(C=function(e,t,i){for(var r,n,a,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(n in s)if(s[n]&&s[n].test(r)){l.unshift(n);break}if(l[0]in i)a=l[0];else{for(n in i){if(!l[0]||e.converters[n+" "+l[0]]){a=n;break}o||(o=n)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),i[a]}(p,T,o)),!d&&S.inArray("script",p.dataTypes)>-1&&(p.converters["text script"]=function(){}),C=function(e,t,i,r){var n,a,o,s,l,c={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)c[o.toLowerCase()]=e.converters[o];for(a=u.shift();a;)if(e.responseFields[a]&&(i[e.responseFields[a]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=a,a=u.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(!(o=c[l+" "+a]||c["* "+a]))for(n in c)if((s=n.split(" "))[1]===a&&(o=c[l+" "+s[0]]||c["* "+s[0]])){!0===o?o=c[n]:!0!==c[n]&&(a=s[0],u.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+a}}}return{state:"success",data:t}}(p,C,T,d),d?(p.ifModified&&((x=T.getResponseHeader("Last-Modified"))&&(S.lastModified[n]=x),(x=T.getResponseHeader("etag"))&&(S.etag[n]=x)),204===e||"HEAD"===p.type?b="nocontent":304===e?b="notmodified":(b=C.state,h=C.data,d=!(v=C.error))):(v=b,!e&&b||(b="error",e<0&&(e=0))),T.status=e,T.statusText=(t||b)+"",d?g.resolveWith(f,[h,b,T]):g.rejectWith(f,[T,b,v]),T.statusCode(_),_=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[T,p,d?h:v]),y.fireWith(f,[T,b]),u&&(m.trigger("ajaxComplete",[T,p]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,i){return S.get(e,t,i,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],(function(e,t){S[t]=function(e,i,r,n){return y(i)&&(n=n||r,r=i,i=void 0),S.ajax(S.extend({url:e,type:t,dataType:n,data:i,success:r},S.isPlainObject(e)&&e))}})),S.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),S._evalUrl=function(e,t,i){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,i)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){S(this).wrapInner(e.call(this,t))})):this.each((function(){var t=S(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(i){S(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){S(this).replaceWith(this.childNodes)})),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},jt=S.ajaxSettings.xhr();g.cors=!!jt&&"withCredentials"in jt,g.ajax=jt=!!jt,S.ajaxTransport((function(e){var t,r;if(g.cors||jt&&!e.crossDomain)return{send:function(n,a){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];for(o in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)s.setRequestHeader(o,n[o]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&i.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),S.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),S.ajaxTransport("script",(function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(r,n){t=S("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&n("error"===e.type?404:200,e.type)}),v.head.appendChild(t[0])},abort:function(){i&&i()}}}));var qt,Yt=[],Xt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||S.expando+"_"+Et.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",(function(e,t,r){var n,a,o,s=!1!==e.jsonp&&(Xt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Xt,"$1"+n):!1!==e.jsonp&&(e.url+=(wt.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return o||S.error(n+" was not called"),o[0]},e.dataTypes[0]="json",a=i[n],i[n]=function(){o=arguments},r.always((function(){void 0===a?S(i).removeProp(n):i[n]=a,e[n]&&(e.jsonpCallback=t.jsonpCallback,Yt.push(n)),o&&y(a)&&a(o[0]),o=a=void 0})),"script"})),g.createHTMLDocument=((qt=v.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===qt.childNodes.length),S.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(g.createHTMLDocument?((r=(t=v.implementation.createHTMLDocument("")).createElement("base")).href=v.location.href,t.head.appendChild(r)):t=v),a=!i&&[],(n=M.exec(e))?[t.createElement(n[1])]:(n=be([e],t,a),a&&a.length&&S(a).remove(),S.merge([],n.childNodes)));var r,n,a},S.fn.load=function(e,t,i){var r,n,a,o=this,s=e.indexOf(" ");return s>-1&&(r=_t(e.slice(s)),e=e.slice(0,s)),y(t)?(i=t,t=void 0):t&&"object"==typeof t&&(n="POST"),o.length>0&&S.ajax({url:e,type:n||"GET",dataType:"html",data:t}).done((function(e){a=arguments,o.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)})).always(i&&function(e,t){o.each((function(){i.apply(this,a||[e.responseText,t,e])}))}),this},S.expr.pseudos.animated=function(e){return S.grep(S.timers,(function(t){return e===t.elem})).length},S.offset={setOffset:function(e,t,i){var r,n,a,o,s,l,c=S.css(e,"position"),u=S(e),d={};"static"===c&&(e.style.position="relative"),s=u.offset(),a=S.css(e,"top"),l=S.css(e,"left"),("absolute"===c||"fixed"===c)&&(a+l).indexOf("auto")>-1?(o=(r=u.position()).top,n=r.left):(o=parseFloat(a)||0,n=parseFloat(l)||0),y(t)&&(t=t.call(e,i,S.extend({},s))),null!=t.top&&(d.top=t.top-s.top+o),null!=t.left&&(d.left=t.left-s.left+n),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),u.css(d))}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){S.offset.setOffset(this,e,t)}));var t,i,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),i=r.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,r=this[0],n={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),i=r.ownerDocument,e=r.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((n=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),n.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-n.top-S.css(r,"marginTop",!0),left:t.left-n.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||ae}))}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var i="pageYOffset"===t;S.fn[e]=function(r){return H(this,(function(e,r,n){var a;if(_(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===n)return a?a[t]:e[r];a?a.scrollTo(i?a.pageXOffset:n,i?n:a.pageYOffset):e[r]=n}),e,r,arguments.length)}})),S.each(["top","left"],(function(e,t){S.cssHooks[t]=je(g.pixelPosition,(function(e,i){if(i)return i=We(e,t),Ge.test(i)?S(e).position()[t]+"px":i}))})),S.each({Height:"height",Width:"width"},(function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},(function(i,r){S.fn[r]=function(n,a){var o=arguments.length&&(i||"boolean"!=typeof n),s=i||(!0===n||!0===a?"margin":"border");return H(this,(function(t,i,n){var a;return _(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===n?S.css(t,i,s):S.style(t,i,n,s)}),t,o?n:void 0,o)}}))})),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){S.fn[t]=function(e){return this.on(t,e)}})),S.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,r){return this.on(t,e,i,r)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){S.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}));var Qt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var i,r,n;if("string"==typeof t&&(i=e[t],t=e,e=i),y(e))return r=s.call(arguments,2),(n=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,n},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=D,S.isFunction=y,S.isWindow=_,S.camelCase=Y,S.type=b,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Qt,"")},void 0===(r=function(){return S}.apply(t,[]))||(e.exports=r);var Zt=i.jQuery,Jt=i.$;return S.noConflict=function(e){return i.$===S&&(i.$=Jt),e&&i.jQuery===S&&(i.jQuery=Zt),S},void 0===n&&(i.jQuery=i.$=S),S}))},function(e,t,i){"use strict";i.r(t);var r=["version","author","home_page","init","ready","use","mixin","Namespace","Initialized"];var n={version:"1.11.0",author:"Caven Chen <cavencj@gmail.com>",home_page:"https://www.dvgis.cn",Namespace:{},echarts:{},Initialized:!1,jQuery:null};!function(e){e.mixin=function(t){for(var i in t)!r.includes(i)&&(e[i]=t[i]);return this}}(n),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var i=[];return i.unshift(this),"function"==typeof e.install?e.install.apply(e,i):"function"==typeof e&&e.apply(null,i),t.push(e),this}}(n),i(233);var a=!1;n.init=function(e){if(a)e&&e();else{var t=new Promise((function(e,t){e(i(234))})),r=new Promise((function(e,t){e(i(275))})),o=new Promise((function(e,t){e(i(570))}));Promise.all([t,r,o]).then((function(t){n.Namespace.Cesium=t[0],n.echarts=t[1],n.jQuery=t[2],a=!0,delete window.Cesium,e&&e()}))}};t.default=n}]).default}));
libs/Cesium/dc.core.min.css
@@ -1 +1 @@
.cesium-svgPath-svg{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.cesium-button{display:inline-block;position:relative;background:#303336;border:1px solid #444;color:#edffff;fill:#edffff;border-radius:4px;padding:5px 12px;margin:2px 3px;cursor:pointer;overflow:hidden;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-button:focus{color:#fff;fill:#fff;border-color:#ea4;outline:0}.cesium-button:hover{color:#fff;fill:#fff;background:#48b;border-color:#aef;box-shadow:0 0 8px #fff}.cesium-button:active{color:#000;fill:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-button-disabled,.cesium-button-disabled:active,.cesium-button-disabled:focus,.cesium-button-disabled:hover,.cesium-button:disabled{background:#303336;border-color:#444;color:#646464;fill:#646464;box-shadow:none;cursor:default}.cesium-button option{background-color:#000;color:#eee}.cesium-button option:disabled{color:#777}.cesium-button input,.cesium-button label{cursor:pointer}.cesium-button input{vertical-align:sub}.cesium-toolbar-button{box-sizing:border-box;width:32px;height:32px;border-radius:14%;padding:0;vertical-align:middle;z-index:0}.cesium-performanceDisplay-defaultContainer{position:absolute;top:50px;right:10px;text-align:right}.cesium-performanceDisplay{background-color:rgba(40,40,40,.7);padding:7px;border-radius:5px;border:1px solid #444;font:700 12px sans-serif}.cesium-performanceDisplay-fps{color:#e52}.cesium-performanceDisplay-throttled{color:#a42}.cesium-performanceDisplay-ms{color:#de3}.cesium-animation-theme{visibility:hidden;display:block;position:absolute;z-index:-100}.cesium-animation-themeNormal{color:#222}.cesium-animation-themeHover{color:#4488b0}.cesium-animation-themeSelect{color:#242}.cesium-animation-themeDisabled{color:#333}.cesium-animation-themeKnob{color:#222}.cesium-animation-themePointer{color:#2e2}.cesium-animation-themeSwoosh{color:#8ac}.cesium-animation-themeSwooshHover{color:#aef}.cesium-animation-svgText{fill:#edffff;font-family:Sans-Serif;font-size:15px;text-anchor:middle}.cesium-animation-blank{fill:#000;fill-opacity:.01;stroke:none}.cesium-animation-rectButton{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-animation-rectButton .cesium-animation-buttonGlow{fill:#fff;stroke:none;display:none}.cesium-animation-rectButton:hover .cesium-animation-buttonGlow{display:block}.cesium-animation-rectButton .cesium-animation-buttonPath{fill:#edffff}.cesium-animation-rectButton .cesium-animation-buttonMain{stroke:#444;stroke-width:1.2}.cesium-animation-rectButton:hover .cesium-animation-buttonMain{stroke:#aef}.cesium-animation-rectButton:active .cesium-animation-buttonMain{fill:#abd6ff}.cesium-animation-buttonDisabled{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-animation-buttonDisabled .cesium-animation-buttonMain{stroke:#555}.cesium-animation-buttonDisabled .cesium-animation-buttonPath{fill:#818181}.cesium-animation-buttonDisabled .cesium-animation-buttonGlow{display:none}.cesium-animation-buttonToggled .cesium-animation-buttonGlow{display:block;fill:#2e2}.cesium-animation-buttonToggled .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow{fill:#fff}.cesium-animation-buttonToggled:hover .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-shuttleRingG,.cesium-animation-shuttleRingPausePointer,.cesium-animation-shuttleRingPointer{cursor:pointer}.cesium-animation-shuttleRingBack{fill:#181818;fill-opacity:.8;stroke:#333;stroke-width:1.2}.cesium-animation-shuttleRingSwoosh line{stroke:#8ac;stroke-width:3;stroke-opacity:.2;stroke-linecap:round}.cesium-animation-knobOuter{cursor:pointer;stroke:#444;stroke-width:1.2}.cesium-animation-knobInner{cursor:pointer}.cesium-baseLayerPicker-selected{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.cesium-baseLayerPicker-dropDown{display:block;position:absolute;box-sizing:content-box;top:auto;right:0;width:320px;max-height:500px;margin-top:5px;background-color:rgba(38,38,38,.75);border:1px solid #444;padding:6px;overflow:auto;border-radius:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;transform:translateY(-20%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-baseLayerPicker-dropDown-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-baseLayerPicker-sectionTitle{display:block;font-family:sans-serif;font-size:16pt;text-align:left;color:#edffff;margin-bottom:4px}.cesium-baseLayerPicker-choices{margin-bottom:5px}.cesium-baseLayerPicker-categoryTitle{color:#edffff;font-size:11pt}.cesium-baseLayerPicker-choices{display:block;border:1px solid #888;border-radius:5px;padding:5px 0}.cesium-baseLayerPicker-item{display:inline-block;vertical-align:top;margin:2px 5px;width:64px;text-align:center;cursor:pointer}.cesium-baseLayerPicker-itemLabel{display:block;font-family:sans-serif;font-size:8pt;text-align:center;vertical-align:middle;color:#edffff;cursor:pointer;word-wrap:break-word}.cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel,.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel{text-decoration:underline}.cesium-baseLayerPicker-itemIcon{display:inline-block;position:relative;width:inherit;height:auto;background-size:100% 100%;border:1px solid #444;border-radius:9px;color:#edffff;margin:0;padding:0;cursor:pointer;box-sizing:border-box}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon{border-color:#fff;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel{color:#bdecf8}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon{border:4px double #bdecf8}.cesium-widget{position:relative}.cesium-widget,.cesium-widget canvas{width:100%;height:100%;touch-action:none}.cesium-widget-credits{display:block;position:absolute;bottom:0;left:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000;padding-right:5px}.cesium-widget-credits a,.cesium-widget-credits a:visited{color:#fff}.cesium-widget-errorPanel{position:absolute;top:0;right:0;bottom:0;left:0;text-align:center;background:rgba(0,0,0,.7);z-index:99999}.cesium-widget-errorPanel:before{display:inline-block;vertical-align:middle;height:100%;content:""}.cesium-widget-errorPanel-content{width:75%;max-width:500px;display:inline-block;text-align:left;vertical-align:middle;border:1px solid #510c00;border-radius:7px;background-color:#f0d9d5;font-size:14px;color:#510c00}.cesium-widget-errorPanel-content.expanded{max-width:75%}.cesium-widget-errorPanel-header{font-size:18px;font-family:Open Sans,Verdana,Geneva,sans-serif;background:#d69d93;border-bottom:2px solid #510c00;border-radius:3px 3px 0 0;padding:15px}.cesium-widget-errorPanel-scroll{overflow:auto;font-family:Open Sans,Verdana,Geneva,sans-serif;white-space:pre-wrap;padding:0 15px;margin:10px 0 20px}.cesium-widget-errorPanel-buttonPanel{padding:0 15px;margin:10px 0 20px;text-align:right}.cesium-widget-errorPanel-buttonPanel button{border-color:#510c00;background:#d69d93;color:#202020;margin:0}.cesium-widget-errorPanel-buttonPanel button:focus,.cesium-widget-errorPanel-buttonPanel button:hover{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:active{border-color:#510c00;background:#b17b72;color:#510c00}.cesium-widget-errorPanel-more-details{text-decoration:underline;cursor:pointer}.cesium-widget-errorPanel-more-details:hover{color:#2b0700}.cesium-cesiumInspector{border-radius:5px;transition:width .25s ease-in-out;background:rgba(48,51,54,.8);border:1px solid #444;color:#edffff;display:inline-block;position:relative;padding:4px 12px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.cesium-cesiumInspector-button{text-align:center;font-size:11pt}.cesium-cesiumInspector-visible .cesium-cesiumInspector-button{border-bottom:1px solid #aaa;padding-bottom:3px}.cesium-cesiumInspector-button,.cesium-cesiumInspector input:enabled{cursor:pointer}.cesium-cesiumInspector-visible{width:185px;height:auto}.cesium-cesiumInspector-hidden{width:122px;height:17px}.cesium-cesiumInspector-sectionContent{max-height:500px}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent{max-height:0;padding:0!important;overflow:hidden}.cesium-cesiumInspector-dropDown{margin:5px 0;font-family:sans-serif;font-size:10pt;width:185px}.cesium-cesiumInspector-frustumStatistics{padding:5px;background-color:rgba(80,80,80,.75)}.cesium-cesiumInspector-pickButton{background-color:rgba(0,0,0,.3);border:1px solid #444;color:#edffff;border-radius:5px;padding:3px 7px;cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;margin:0 auto}.cesium-cesiumInspector-pickButton:focus{outline:0}.cesium-cesiumInspector-pickButton:active,.cesium-cesiumInspector-pickButtonHighlight{color:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-cesiumInspector-center{text-align:center}.cesium-cesiumInspector-sectionHeader{font-weight:700;font-size:10pt;margin:0;cursor:pointer}.cesium-cesiumInspector-pickSection{border:1px solid #aaa;border-radius:5px;padding:3px;margin-bottom:5px}.cesium-cesiumInspector-sectionContent{margin-bottom:10px;transition:max-height .25s}.cesium-cesiumInspector-tileText{padding-bottom:10px;border-bottom:1px solid #aaa}.cesium-cesiumInspector-relativeText{padding-top:10px}.cesium-cesiumInspector-sectionHeader:before{margin-right:5px;content:"-";width:1ch;display:inline-block}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader:before{content:"+"}ul.cesium-cesiumInspector-statistics{margin:0;padding-top:3px;padding-bottom:3px}ul.cesium-cesiumInspector-statistics+ul.cesium-cesiumInspector-statistics{border-top:1px solid #aaa}.cesium-cesiumInspector-slider{margin-top:5px}.cesium-cesiumInspector-slider input[type=number]{text-align:left;background-color:#222;outline:0;border:1px solid #444;color:#edffff;width:100px;border-radius:3px;padding:1px;margin-left:10px;cursor:auto}.cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button,.cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.cesium-cesiumInspector-slider input[type=range]{margin-left:5px;vertical-align:middle}.cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor{display:none}.cesium-cesiumInspector-styleEditor{padding:10px;border-radius:5px;background:rgba(48,51,54,.8);border:1px solid #444}.cesium-cesiumInspector-styleEditor textarea{width:100%;height:300px;background:0 0;color:#edffff;border:none;padding:0;white-space:pre;overflow-wrap:normal;overflow-x:auto}.cesium-3DTilesInspector{width:300px;pointer-events:all}.cesium-3DTilesInspector-statistics{font-size:11px}.cesium-3DTilesInspector div,.cesium-3DTilesInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-cesiumInspector-error{color:#ff9e9e;overflow:auto}.cesium-3DTilesInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid #fff}input.cesium-cesiumInspector-url{overflow:hidden;white-space:nowrap;overflow-x:scroll;background-color:transparent;color:#fff;outline:0;border:none;height:1em;width:100%}.cesium-cesiumInspector .field-group{display:table}.cesium-cesiumInspector .field-group>label{display:table-cell;font-weight:700}.cesium-cesiumInspector .field-group>.field{display:table-cell;width:100%}.cesium-button.cesium-fullscreenButton,.cesium-button.cesium-vrButton{display:block;width:100%;height:100%;margin:0;border-radius:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input{border:1px solid #444;background-color:rgba(40,40,40,.7);color:#fff;display:inline-block;vertical-align:middle;width:0;height:32px;margin:0;padding:0 32px 0 0;border-radius:0;box-sizing:border-box;transition:width .25s ease-in-out,background-color .2s ease-in-out;-webkit-appearance:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{border-color:#aef;box-shadow:0 0 8px #fff}.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus{border-color:#ea4;background-color:rgba(15,15,15,.9);box-shadow:none;outline:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide,.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{padding-left:4px;width:250px}.cesium-viewer-geocoderContainer .search-results{position:absolute;background-color:#000;color:#eee;overflow-y:auto;opacity:.8;width:100%}.cesium-viewer-geocoderContainer .search-results ul{list-style-type:none;margin:0;padding:0}.cesium-viewer-geocoderContainer .search-results ul li{font-size:14px;padding:3px 10px}.cesium-viewer-geocoderContainer .search-results ul li:hover{cursor:pointer}.cesium-viewer-geocoderContainer .search-results ul li.active{background:#48b}.cesium-geocoder-searchButton{background-color:#303336;display:inline-block;position:absolute;cursor:pointer;width:32px;top:1px;right:1px;height:30px;vertical-align:middle;fill:#edffff}.cesium-geocoder-searchButton:hover{background-color:#48b}.cesium-infoBox{display:block;position:absolute;top:50px;right:0;width:40%;max-width:480px;background:rgba(38,38,38,.95);color:#edffff;border:1px solid #444;border-right:none;border-top-left-radius:7px;border-bottom-left-radius:7px;box-shadow:0 0 10px 1px #000;transform:translate(100%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-infoBox-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-infoBox-title{display:block;height:20px;padding:5px 30px 5px 25px;background:#545454;border-top-left-radius:7px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:content-box}.cesium-infoBox-bodyless .cesium-infoBox-title{border-bottom-left-radius:7px}button.cesium-infoBox-camera{top:4px;left:4px;width:22px;height:22px;border-color:transparent;border-radius:3px}button.cesium-infoBox-camera,button.cesium-infoBox-close{display:block;position:absolute;background:0 0;padding:0 5px;margin:0}button.cesium-infoBox-close{top:5px;right:5px;height:20px;border:none;border-radius:2px;font-weight:700;font-size:16px;color:#edffff}button.cesium-infoBox-close:focus{background:rgba(238,136,0,.44);outline:0}button.cesium-infoBox-close:hover{background:#888;color:#000}button.cesium-infoBox-close:active{background:#a00;color:#000}.cesium-infoBox-bodyless .cesium-infoBox-iframe{display:none}.cesium-infoBox-iframe{border:none;width:100%;width:calc(100% - 2px)}span.cesium-sceneModePicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-sceneModePicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-sceneModePicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none{display:none}.cesium-sceneModePicker-slide-svg{transition:left 2s;top:0;left:0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView{margin:0 0 3px}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView{left:200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D{left:-200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D{left:-100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}span.cesium-projectionPicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-projectionPicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-projectionPicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-projectionPicker-wrapper .cesium-projectionPicker-none{display:none}.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic,.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective{margin:0 0 3px}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic{left:100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective{left:-100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-performance-watchdog-message-area{position:relative;background-color:#ff0;color:#000;padding:10px}.cesium-performance-watchdog-message{margin-right:30px}.cesium-performance-watchdog-message-dismiss{position:absolute;right:0;margin:0 10px 0 0}.cesium-navigationHelpButton-wrapper{position:relative;display:inline-block}.cesium-navigation-help{visibility:hidden;position:absolute;top:38px;right:2px;width:250px;border-radius:10px;transform:scale(.01);transform-origin:234px -10px;transition:visibility 0s .25s,transform .25s ease-in}.cesium-navigation-help-visible{visibility:visible;transform:scale(1);transition:transform .25s ease-out}.cesium-navigation-help-instructions{border:1px solid #444;background-color:rgba(38,38,38,.75);padding-bottom:5px;border-radius:0 0 10px 10px}.cesium-click-navigation-help{display:none}.cesium-touch-navigation-help{display:none;padding-top:5px}.cesium-click-navigation-help-visible,.cesium-touch-navigation-help-visible{display:block}.cesium-navigation-help-pan{color:#6cf;font-weight:700}.cesium-navigation-help-zoom{color:#65fd00;font-weight:700}.cesium-navigation-help-rotate{color:#ffd800;font-weight:700}.cesium-navigation-help-tilt{color:#d800d8;font-weight:700}.cesium-navigation-help-details{color:#fff}.cesium-navigation-button{color:#fff;background-color:transparent;border-bottom:none;border-top:1px solid #444;border-right:1px solid #444;margin:0;width:50%;cursor:pointer}.cesium-navigation-button-icon{vertical-align:middle;padding:5px 1px}.cesium-navigation-button:focus{outline:0}.cesium-navigation-button-left{border-radius:10px 0 0 0;border-left:1px solid #444}.cesium-navigation-button-right{border-radius:0 10px 0 0;border-left:none}.cesium-navigation-button-selected{background-color:rgba(38,38,38,.75)}.cesium-navigation-button-unselected{background-color:rgba(0,0,0,.75)}.cesium-navigation-button-unselected:hover{background-color:rgba(76,76,76,.75)}.cesium-selection-wrapper{position:absolute;width:160px;height:160px;pointer-events:none;visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in}.cesium-selection-wrapper-visible{visibility:visible;opacity:1;transition:opacity .2s ease-out}.cesium-selection-wrapper svg{fill:#2e2;stroke:#000;stroke-width:1.1px}.cesium-timeline-main{position:relative;left:0;bottom:0;overflow:hidden;border:1px solid #888}.cesium-timeline-trackContainer{width:100%;overflow:auto;border-top:1px solid #888;position:relative;top:0;left:0}.cesium-timeline-tracks{position:absolute;top:0;left:0;width:100%}.cesium-timeline-needle{position:absolute;left:0;top:1.7em;bottom:0;width:1px;background:red}.cesium-timeline-bar{position:relative;left:0;top:0;overflow:hidden;cursor:pointer;width:100%;height:1.7em;background:linear-gradient(180deg,rgba(116,117,119,.8) 0,rgba(58,68,82,.8) 11%,rgba(46,50,56,.8) 46%,rgba(53,53,53,.8) 81%,rgba(53,53,53,.8))}.cesium-timeline-ruler{visibility:hidden;white-space:nowrap;font-size:80%;z-index:-200}.cesium-timeline-highlight{position:absolute;bottom:0;left:0;background:#08f}.cesium-timeline-ticLabel{position:absolute;top:0;left:0;white-space:nowrap;font-size:80%;color:#eee}.cesium-timeline-ticMain{position:absolute;bottom:0;left:0;width:1px;height:50%;background:#eee}.cesium-timeline-ticSub{position:absolute;bottom:0;left:0;width:1px;height:33%;background:#aaa}.cesium-timeline-ticTiny{position:absolute;bottom:0;left:0;width:1px;height:25%;background:#888}.cesium-timeline-icon16{display:block;position:absolute;width:16px;height:16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sIDBITKIVzLEMAAAKNSURBVEjHxdXNSxRhHAfw7zzrqhuoWJnSkrippUVSEKsHI9BTUYdAJA/RoYMREV26rAdn6tAfUARi16hQqkOBQRgUEYFWEC3OwczMjdZd92VmdWfmeelgTjO7q7gb0VzmmZnn85vvPPPMM8B/3qTcE2PPpuTZKB1eWuUQACgXYACYwVFbCTTVeZXB/i55o4LFelcAZfStYD4vpAoPGAGo4GBcQEgSOAUMQyAezwK6iQfDPXnhS/FkHZ+/8VLMWxxqWkfH3gbMRNOYi2roavbja0zHQmoFPYf8ED4Ko4aivm9MOG/u9I8mwrafeK7a/tVrNc/bARYN5noadeq7q0342vXw9CIMU6BmW8rVP9cPBPe52uu+v3O/y9sB4gkTWs6Qsk0mj5ExXMelejvA8WafYmkmGPHanTijdtvif8rx5RiCjdWKs2Cp3jWRDl96KhrbqlBeJqBOLyLQXg0IgbkZDS0dO8EZxZfPSTA9jvDDK3mT0OmP1FXh3XwEEAKdTX5MRWLgjCK4pwH3xt/YnjgLHAv4lHTCAKMMu/wV+KZGob6PoKyMQ0+sgBpZVJZn0NterxQaVqef/DRn+/EXYds/mZx2eVeAW9d65dhCEsaKCb7K8HH0gqTevyh9GDkn0VULRiaLzJKGBu9swfdaiie5RVo9ESURN8E8BE0n7ggACJy8KzghSCzp6DmwWxkaCm24EBXr8wI8Hrkq06QBiRC0t24HALS11IBTCyJl4vb1AXmzpbVYTwoVOXN0h7L8Mwtm8bXPybIQ/5FCX3dA2cr6XowvGCA02CvztAnz9+JiZk1AMxG6fEreSoBiPNmoyNnuWiWVzAIAtISO08E6pZi/3N96AIDn4E3h3P8L/wshP+txtEs4JAAAAABJRU5ErkJggg==);background-repeat:no-repeat}.cesium-viewer{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0}.cesium-viewer,.cesium-viewer-cesiumWidgetContainer{width:100%;height:100%}.cesium-viewer-bottom{display:block;position:absolute;bottom:0;left:0;right:0;padding-right:5px}.cesium-viewer .cesium-widget-credits{display:inline;position:static;bottom:auto;left:auto;padding-right:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000}.cesium-viewer-timelineContainer{position:absolute;bottom:0;left:169px;right:29px;height:27px;padding:0;margin:0;overflow:hidden;font-size:14px}.cesium-viewer-animationContainer{position:absolute;bottom:0;left:0;padding:0;width:169px;height:112px}.cesium-viewer-fullscreenContainer,.cesium-viewer-vrContainer{position:absolute;bottom:0;right:0;padding:0;width:29px;height:29px;overflow:hidden}.cesium-viewer-toolbar{display:block;position:absolute;top:5px;right:5px}.cesium-viewer-cesiumInspectorContainer{display:block;position:absolute;top:50px;right:10px}.cesium-viewer-geocoderContainer{position:relative;display:inline-block;margin:0 3px}.cesium-viewer-cesium3DTilesInspectorContainer{display:block;position:absolute;top:50px;right:10px;max-height:calc(100% - 120px);box-sizing:border-box;overflow-y:auto;overflow-x:hidden}*{padding:0;margin:0}.dc-container{overflow:hidden;display:block}.dc-attribution a{text-decoration:none}.dc-attribution a:hover{text-decoration:underline}.div-icon{user-select:none;background-color:#fff;padding:2px;border-radius:4px}.div-icon:hover{cursor:pointer}.dc-popup{min-width:120px;min-height:10px;padding:10px;background:#fff;cursor:pointer}.dc-popup,.dc-tool-tip{position:absolute;left:0;top:0;border-radius:4px;visibility:hidden;z-index:-1}.dc-tool-tip{min-width:100px;height:30px;line-height:30px;color:#fff;padding:0 10px;background:rgba(0,0,0,.6);pointer-events:none}.dc-tool-tip:before{content:"";display:block;position:absolute;pointer-events:none;left:-10px;top:5px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid rgba(0,0,0,.6)}.dc-context-menu{position:absolute;left:0;top:0;min-width:120px;min-height:10px;padding:10px;background:#fff;border-radius:4px;visibility:hidden;z-index:-1;cursor:pointer}.dc-context-menu .menu-list{width:100%;color:#000}.dc-context-menu .menu-list .menu-item{font-size:14px;list-style:none;padding:5px 0 5px 10px;border-top:1px dashed #cecece}.dc-context-menu .menu-list .menu-item:hover{color:#2a4eec}.dc-map-switch{position:absolute;right:10px;bottom:5px;width:80px;height:60px;background:#fff;transition:width 2s;-moz-transition:width 2s;-webkit-transition:width 2s;-o-transition:width 2s;padding:5px;box-shadow:2px 2px 3px #888;cursor:pointer;overflow:hidden;visibility:hidden}.dc-map-switch .map-item{position:relative;display:inline-block;margin-right:5px;width:80px;height:60px;overflow:hidden}.dc-map-switch .map-item span{color:#fff;font-size:14px;position:absolute;right:2px;bottom:2px;user-select:none;padding:1px 3px;pointer-events:none}.dc-map-switch .map-item.active span{background-color:rgba(8,101,186,.8)}.dc-map-switch .map-item:last-child{margin-right:0!important}.dc-slider{position:absolute;left:50%;top:0;background-color:#d3d3d3;width:5px;height:100%;z-index:9999;visibility:hidden}.dc-slider .splitter{position:absolute;left:-21px;top:calc(50% - 21px);width:42px;height:42px;background:#fff;border-radius:50%;text-align:center;line-height:58px;padding:2px;border:1px solid #d3d3d3}.dc-slider .splitter:hover{cursor:ew-resize}.dc-hawkeye-map{position:absolute;left:25px;bottom:30px;user-select:none;border-radius:50%;width:150px;height:150px;overflow:hidden;border:2px solid orange;box-shadow:2px 2px 3px #2b2b2b}.dc-compass{top:20px;right:20px;cursor:default;pointer-events:auto;user-select:none}.dc-compass,.dc-compass .out-ring{position:absolute;width:55px;height:55px}.dc-compass .out-ring{top:0;left:0;background-repeat:no-repeat;background-size:contain;fill:#3f4854;border-radius:50%}.dc-compass .out-ring svg{height:55px;width:55px}.dc-compass .gyro{position:relative;top:50%;transform:translateY(-50%);height:25px;width:25px;border-radius:50%;display:block;margin:0 auto;padding:4px;box-sizing:border-box;background:#fff}.dc-compass .rotation_marker{position:absolute;top:2px;left:2px;height:51px;width:51px;border-radius:50%;background-repeat:no-repeat;background-size:contain}.dc-compass .gyro-active,.dc-compass .gyro-bg:hover+.gyro{fill:#68adfe}.dc-location-bar{position:absolute;left:180px;bottom:2px;font-size:14px;color:#fff;background:rgba(0,0,0,.6);padding:2px 5px;border-radius:2px;user-select:none;display:flex}.dc-location-bar span{margin:0 8px}.divForms-dom{position:fixed}.divForms .arrow{position:absolute;bottom:0;left:0;width:45px;height:2px;transform:rotate(-45deg) translate(5px,-15px);background-color:#28bbf0}.divForms-theme .area{background-image:linear-gradient(135deg,transparent 30px,rgba(40,187,240,.423529) 0,rgba(40,187,240,.423529) 50%,transparent 0),linear-gradient(-45deg,transparent 30px,rgba(40,187,240,.423529) 0,rgba(40,187,240,.423529) 50.1%,transparent 0)}.divForms .area{position:relative;min-width:180px}.divForms-wrap{position:relative;overflow:hidden;padding:30px}.divForms-theme .b-b,.divForms-theme .b-b-r,.divForms-theme .b-l,.divForms-theme .b-r,.divForms-theme .b-t,.divForms-theme .b-t-l{background-color:#29baf1;box-shadow:0 0 10px 2px #29baf1}.divForms .b-t{left:44px;height:1px}.divForms .b-r,.divForms .b-t{position:absolute;top:0;right:0;z-index:10}.divForms .b-r{bottom:44px;width:1px}.divForms .b-l{top:44px;width:1px}.divForms .b-b,.divForms .b-l{position:absolute;left:0;bottom:0;z-index:10}.divForms .b-b{right:44px;height:1px}.divForms .b-b-r{bottom:0;right:0;transform:rotate(45deg) translate(-52px,22px)}.divForms .b-b-r,.divForms .b-t-l{position:absolute;width:1px;height:62px;z-index:10}.divForms .b-t-l{top:0;left:0;transform:rotate(45deg) translate(52px,-22px)}.divForms .label-wrap{padding-left:12px;color:#fff;font-size:16px;white-space:nowrap;overflow:hidden}.divForms-theme .title{background-image:linear-gradient(135deg,transparent 25px,#29baf1 0)}.divForms .title{margin-top:20px;padding:0 12px 0 30px;height:36px;line-height:36px;position:relative}.divForms .label-content{padding:15px 0}.divForms-theme .arrow,.divForms-theme .title:before{background-color:#28bbf0}.divForms .title:before{content:"";position:absolute;bottom:-4px;left:0;right:0;z-index:10;height:2px}.divForms .data-li{padding:4px 45px 4px 0}.data-value,.divForms .data-label{display:inline-block}.divForms .label-num{margin-right:3px;color:#f09e28;font-weight:600}.divForms .label-tag:after{content:attr(alt);display:inline-block;position:absolute;bottom:-22px;right:-35px;z-index:-1;padding:2px 4px;color:#fff;font-size:14px;background-color:#333;border-radius:3px;opacity:0;transition:all .3s ease-in}.divForms .data-value-status-1{background-color:#35b15b!important}.divForms .data-value-status-0{background-color:#f0285c!important}.divForms .data-value-status-2{background-color:#f09e28!important}.divForms .label-tag{display:inline-block;position:relative;margin-right:6px;padding:0 6px;font-weight:600;cursor:pointer;background-color:#909399;border-radius:4px}.divForms .data-value{font-size:14px}.leaflet-popup{position:absolute;width:100%;height:100%;text-align:center}.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:700;background:transparent}.leaflet-popup-content-wrapper{position:relative;text-align:center;height:100%;overflow:hidden;background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{position:absolute!important;top:16px!important;left:4px!important;right:4px!important;bottom:4px!important;width:calc(100% - 8px)!important;height:calc(100% - 20px)!important}.leaflet-popup-content canvas,.leaflet-popup-content div{width:100%!important;height:100%!important}.leaflet-popup-tip-container{margin:0 auto;width:60px;height:36px;position:relative;overflow:hidden}.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);width:36px;height:36px;padding:1px;margin:-25px auto 0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}
.cesium-svgPath-svg{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.cesium-button{display:inline-block;position:relative;background:#303336;border:1px solid #444;color:#edffff;fill:#edffff;border-radius:4px;padding:5px 12px;margin:2px 3px;cursor:pointer;overflow:hidden;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-button:focus{color:#fff;fill:#fff;border-color:#ea4;outline:0}.cesium-button:hover{color:#fff;fill:#fff;background:#48b;border-color:#aef;box-shadow:0 0 8px #fff}.cesium-button:active{color:#000;fill:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-button-disabled,.cesium-button-disabled:active,.cesium-button-disabled:focus,.cesium-button-disabled:hover,.cesium-button:disabled{background:#303336;border-color:#444;color:#646464;fill:#646464;box-shadow:none;cursor:default}.cesium-button option{background-color:#000;color:#eee}.cesium-button option:disabled{color:#777}.cesium-button input,.cesium-button label{cursor:pointer}.cesium-button input{vertical-align:sub}.cesium-toolbar-button{box-sizing:border-box;width:32px;height:32px;border-radius:14%;padding:0;vertical-align:middle;z-index:0}.cesium-performanceDisplay-defaultContainer{position:absolute;top:50px;right:10px;text-align:right}.cesium-performanceDisplay{background-color:rgba(40,40,40,.7);padding:7px;border-radius:5px;border:1px solid #444;font:700 12px sans-serif}.cesium-performanceDisplay-fps{color:#e52}.cesium-performanceDisplay-throttled{color:#a42}.cesium-performanceDisplay-ms{color:#de3}.cesium-animation-theme{visibility:hidden;display:block;position:absolute;z-index:-100}.cesium-animation-themeNormal{color:#222}.cesium-animation-themeHover{color:#4488b0}.cesium-animation-themeSelect{color:#242}.cesium-animation-themeDisabled{color:#333}.cesium-animation-themeKnob{color:#222}.cesium-animation-themePointer{color:#2e2}.cesium-animation-themeSwoosh{color:#8ac}.cesium-animation-themeSwooshHover{color:#aef}.cesium-animation-svgText{fill:#edffff;font-family:Sans-Serif;font-size:15px;text-anchor:middle}.cesium-animation-blank{fill:#000;fill-opacity:.01;stroke:none}.cesium-animation-rectButton{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-animation-rectButton .cesium-animation-buttonGlow{fill:#fff;stroke:none;display:none}.cesium-animation-rectButton:hover .cesium-animation-buttonGlow{display:block}.cesium-animation-rectButton .cesium-animation-buttonPath{fill:#edffff}.cesium-animation-rectButton .cesium-animation-buttonMain{stroke:#444;stroke-width:1.2}.cesium-animation-rectButton:hover .cesium-animation-buttonMain{stroke:#aef}.cesium-animation-rectButton:active .cesium-animation-buttonMain{fill:#abd6ff}.cesium-animation-buttonDisabled{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-animation-buttonDisabled .cesium-animation-buttonMain{stroke:#555}.cesium-animation-buttonDisabled .cesium-animation-buttonPath{fill:#818181}.cesium-animation-buttonDisabled .cesium-animation-buttonGlow{display:none}.cesium-animation-buttonToggled .cesium-animation-buttonGlow{display:block;fill:#2e2}.cesium-animation-buttonToggled .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow{fill:#fff}.cesium-animation-buttonToggled:hover .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-shuttleRingG,.cesium-animation-shuttleRingPausePointer,.cesium-animation-shuttleRingPointer{cursor:pointer}.cesium-animation-shuttleRingBack{fill:#181818;fill-opacity:.8;stroke:#333;stroke-width:1.2}.cesium-animation-shuttleRingSwoosh line{stroke:#8ac;stroke-width:3;stroke-opacity:.2;stroke-linecap:round}.cesium-animation-knobOuter{cursor:pointer;stroke:#444;stroke-width:1.2}.cesium-animation-knobInner{cursor:pointer}.cesium-baseLayerPicker-selected{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.cesium-baseLayerPicker-dropDown{display:block;position:absolute;box-sizing:content-box;top:auto;right:0;width:320px;max-height:500px;margin-top:5px;background-color:rgba(38,38,38,.75);border:1px solid #444;padding:6px;overflow:auto;border-radius:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;transform:translateY(-20%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-baseLayerPicker-dropDown-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-baseLayerPicker-sectionTitle{display:block;font-family:sans-serif;font-size:16pt;text-align:left;color:#edffff;margin-bottom:4px}.cesium-baseLayerPicker-choices{margin-bottom:5px}.cesium-baseLayerPicker-categoryTitle{color:#edffff;font-size:11pt}.cesium-baseLayerPicker-choices{display:block;border:1px solid #888;border-radius:5px;padding:5px 0}.cesium-baseLayerPicker-item{display:inline-block;vertical-align:top;margin:2px 5px;width:64px;text-align:center;cursor:pointer}.cesium-baseLayerPicker-itemLabel{display:block;font-family:sans-serif;font-size:8pt;text-align:center;vertical-align:middle;color:#edffff;cursor:pointer;word-wrap:break-word}.cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel,.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel{text-decoration:underline}.cesium-baseLayerPicker-itemIcon{display:inline-block;position:relative;width:inherit;height:auto;background-size:100% 100%;border:1px solid #444;border-radius:9px;color:#edffff;margin:0;padding:0;cursor:pointer;box-sizing:border-box}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon{border-color:#fff;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel{color:#bdecf8}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon{border:4px double #bdecf8}.cesium-widget{position:relative}.cesium-widget,.cesium-widget canvas{width:100%;height:100%;touch-action:none}.cesium-widget-credits{display:block;position:absolute;bottom:0;left:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000;padding-right:5px}.cesium-widget-credits a,.cesium-widget-credits a:visited{color:#fff}.cesium-widget-errorPanel{position:absolute;top:0;right:0;bottom:0;left:0;text-align:center;background:rgba(0,0,0,.7);z-index:99999}.cesium-widget-errorPanel:before{display:inline-block;vertical-align:middle;height:100%;content:""}.cesium-widget-errorPanel-content{width:75%;max-width:500px;display:inline-block;text-align:left;vertical-align:middle;border:1px solid #510c00;border-radius:7px;background-color:#f0d9d5;font-size:14px;color:#510c00}.cesium-widget-errorPanel-content.expanded{max-width:75%}.cesium-widget-errorPanel-header{font-size:18px;font-family:Open Sans,Verdana,Geneva,sans-serif;background:#d69d93;border-bottom:2px solid #510c00;border-radius:3px 3px 0 0;padding:15px}.cesium-widget-errorPanel-scroll{overflow:auto;font-family:Open Sans,Verdana,Geneva,sans-serif;white-space:pre-wrap;padding:0 15px;margin:10px 0 20px}.cesium-widget-errorPanel-buttonPanel{padding:0 15px;margin:10px 0 20px;text-align:right}.cesium-widget-errorPanel-buttonPanel button{border-color:#510c00;background:#d69d93;color:#202020;margin:0}.cesium-widget-errorPanel-buttonPanel button:focus,.cesium-widget-errorPanel-buttonPanel button:hover{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:active{border-color:#510c00;background:#b17b72;color:#510c00}.cesium-widget-errorPanel-more-details{text-decoration:underline;cursor:pointer}.cesium-widget-errorPanel-more-details:hover{color:#2b0700}.cesium-cesiumInspector{border-radius:5px;transition:width .25s ease-in-out;background:rgba(48,51,54,.8);border:1px solid #444;color:#edffff;display:inline-block;position:relative;padding:4px 12px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.cesium-cesiumInspector-button{text-align:center;font-size:11pt}.cesium-cesiumInspector-visible .cesium-cesiumInspector-button{border-bottom:1px solid #aaa;padding-bottom:3px}.cesium-cesiumInspector-button,.cesium-cesiumInspector input:enabled{cursor:pointer}.cesium-cesiumInspector-visible{width:185px;height:auto}.cesium-cesiumInspector-hidden{width:122px;height:17px}.cesium-cesiumInspector-sectionContent{max-height:500px}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent{max-height:0;padding:0!important;overflow:hidden}.cesium-cesiumInspector-dropDown{margin:5px 0;font-family:sans-serif;font-size:10pt;width:185px}.cesium-cesiumInspector-frustumStatistics{padding:5px;background-color:rgba(80,80,80,.75)}.cesium-cesiumInspector-pickButton{background-color:rgba(0,0,0,.3);border:1px solid #444;color:#edffff;border-radius:5px;padding:3px 7px;cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;margin:0 auto}.cesium-cesiumInspector-pickButton:focus{outline:0}.cesium-cesiumInspector-pickButton:active,.cesium-cesiumInspector-pickButtonHighlight{color:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-cesiumInspector-center{text-align:center}.cesium-cesiumInspector-sectionHeader{font-weight:700;font-size:10pt;margin:0;cursor:pointer}.cesium-cesiumInspector-pickSection{border:1px solid #aaa;border-radius:5px;padding:3px;margin-bottom:5px}.cesium-cesiumInspector-sectionContent{margin-bottom:10px;transition:max-height .25s}.cesium-cesiumInspector-tileText{padding-bottom:10px;border-bottom:1px solid #aaa}.cesium-cesiumInspector-relativeText{padding-top:10px}.cesium-cesiumInspector-sectionHeader:before{margin-right:5px;content:"-";width:1ch;display:inline-block}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader:before{content:"+"}ul.cesium-cesiumInspector-statistics{margin:0;padding-top:3px;padding-bottom:3px}ul.cesium-cesiumInspector-statistics+ul.cesium-cesiumInspector-statistics{border-top:1px solid #aaa}.cesium-cesiumInspector-slider{margin-top:5px}.cesium-cesiumInspector-slider input[type=number]{text-align:left;background-color:#222;outline:0;border:1px solid #444;color:#edffff;width:100px;border-radius:3px;padding:1px;margin-left:10px;cursor:auto}.cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button,.cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.cesium-cesiumInspector-slider input[type=range]{margin-left:5px;vertical-align:middle}.cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor{display:none}.cesium-cesiumInspector-styleEditor{padding:10px;border-radius:5px;background:rgba(48,51,54,.8);border:1px solid #444}.cesium-cesiumInspector-styleEditor textarea{width:100%;height:300px;background:0 0;color:#edffff;border:none;padding:0;white-space:pre;overflow-wrap:normal;overflow-x:auto}.cesium-3DTilesInspector{width:300px;pointer-events:all}.cesium-3DTilesInspector-statistics{font-size:11px}.cesium-3DTilesInspector div,.cesium-3DTilesInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-cesiumInspector-error{color:#ff9e9e;overflow:auto}.cesium-3DTilesInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid #fff}input.cesium-cesiumInspector-url{overflow:hidden;white-space:nowrap;overflow-x:scroll;background-color:transparent;color:#fff;outline:0;border:none;height:1em;width:100%}.cesium-cesiumInspector .field-group{display:table}.cesium-cesiumInspector .field-group>label{display:table-cell;font-weight:700}.cesium-cesiumInspector .field-group>.field{display:table-cell;width:100%}.cesium-button.cesium-fullscreenButton,.cesium-button.cesium-vrButton{display:block;width:100%;height:100%;margin:0;border-radius:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input{border:1px solid #444;background-color:rgba(40,40,40,.7);color:#fff;display:inline-block;vertical-align:middle;width:0;height:32px;margin:0;padding:0 32px 0 0;border-radius:0;box-sizing:border-box;transition:width .25s ease-in-out,background-color .2s ease-in-out;-webkit-appearance:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{border-color:#aef;box-shadow:0 0 8px #fff}.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus{border-color:#ea4;background-color:rgba(15,15,15,.9);box-shadow:none;outline:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide,.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{padding-left:4px;width:250px}.cesium-viewer-geocoderContainer .search-results{position:absolute;background-color:#000;color:#eee;overflow-y:auto;opacity:.8;width:100%}.cesium-viewer-geocoderContainer .search-results ul{list-style-type:none;margin:0;padding:0}.cesium-viewer-geocoderContainer .search-results ul li{font-size:14px;padding:3px 10px}.cesium-viewer-geocoderContainer .search-results ul li:hover{cursor:pointer}.cesium-viewer-geocoderContainer .search-results ul li.active{background:#48b}.cesium-geocoder-searchButton{background-color:#303336;display:inline-block;position:absolute;cursor:pointer;width:32px;top:1px;right:1px;height:30px;vertical-align:middle;fill:#edffff}.cesium-geocoder-searchButton:hover{background-color:#48b}.cesium-infoBox{display:block;position:absolute;top:50px;right:0;width:40%;max-width:480px;background:rgba(38,38,38,.95);color:#edffff;border:1px solid #444;border-right:none;border-top-left-radius:7px;border-bottom-left-radius:7px;box-shadow:0 0 10px 1px #000;transform:translate(100%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-infoBox-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-infoBox-title{display:block;height:20px;padding:5px 30px 5px 25px;background:#545454;border-top-left-radius:7px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:content-box}.cesium-infoBox-bodyless .cesium-infoBox-title{border-bottom-left-radius:7px}button.cesium-infoBox-camera{top:4px;left:4px;width:22px;height:22px;border-color:transparent;border-radius:3px}button.cesium-infoBox-camera,button.cesium-infoBox-close{display:block;position:absolute;background:0 0;padding:0 5px;margin:0}button.cesium-infoBox-close{top:5px;right:5px;height:20px;border:none;border-radius:2px;font-weight:700;font-size:16px;color:#edffff}button.cesium-infoBox-close:focus{background:rgba(238,136,0,.44);outline:0}button.cesium-infoBox-close:hover{background:#888;color:#000}button.cesium-infoBox-close:active{background:#a00;color:#000}.cesium-infoBox-bodyless .cesium-infoBox-iframe{display:none}.cesium-infoBox-iframe{border:none;width:100%;width:calc(100% - 2px)}span.cesium-sceneModePicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-sceneModePicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-sceneModePicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none{display:none}.cesium-sceneModePicker-slide-svg{transition:left 2s;top:0;left:0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView{margin:0 0 3px}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView{left:200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D{left:-200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D{left:-100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}span.cesium-projectionPicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-projectionPicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-projectionPicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-projectionPicker-wrapper .cesium-projectionPicker-none{display:none}.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic,.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective{margin:0 0 3px}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic{left:100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective{left:-100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-performance-watchdog-message-area{position:relative;background-color:#ff0;color:#000;padding:10px}.cesium-performance-watchdog-message{margin-right:30px}.cesium-performance-watchdog-message-dismiss{position:absolute;right:0;margin:0 10px 0 0}.cesium-navigationHelpButton-wrapper{position:relative;display:inline-block}.cesium-navigation-help{visibility:hidden;position:absolute;top:38px;right:2px;width:250px;border-radius:10px;transform:scale(.01);transform-origin:234px -10px;transition:visibility 0s .25s,transform .25s ease-in}.cesium-navigation-help-visible{visibility:visible;transform:scale(1);transition:transform .25s ease-out}.cesium-navigation-help-instructions{border:1px solid #444;background-color:rgba(38,38,38,.75);padding-bottom:5px;border-radius:0 0 10px 10px}.cesium-click-navigation-help{display:none}.cesium-touch-navigation-help{display:none;padding-top:5px}.cesium-click-navigation-help-visible,.cesium-touch-navigation-help-visible{display:block}.cesium-navigation-help-pan{color:#6cf;font-weight:700}.cesium-navigation-help-zoom{color:#65fd00;font-weight:700}.cesium-navigation-help-rotate{color:#ffd800;font-weight:700}.cesium-navigation-help-tilt{color:#d800d8;font-weight:700}.cesium-navigation-help-details{color:#fff}.cesium-navigation-button{color:#fff;background-color:transparent;border-bottom:none;border-top:1px solid #444;border-right:1px solid #444;margin:0;width:50%;cursor:pointer}.cesium-navigation-button-icon{vertical-align:middle;padding:5px 1px}.cesium-navigation-button:focus{outline:0}.cesium-navigation-button-left{border-radius:10px 0 0 0;border-left:1px solid #444}.cesium-navigation-button-right{border-radius:0 10px 0 0;border-left:none}.cesium-navigation-button-selected{background-color:rgba(38,38,38,.75)}.cesium-navigation-button-unselected{background-color:rgba(0,0,0,.75)}.cesium-navigation-button-unselected:hover{background-color:rgba(76,76,76,.75)}.cesium-selection-wrapper{position:absolute;width:160px;height:160px;pointer-events:none;visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in}.cesium-selection-wrapper-visible{visibility:visible;opacity:1;transition:opacity .2s ease-out}.cesium-selection-wrapper svg{fill:#2e2;stroke:#000;stroke-width:1.1px}.cesium-timeline-main{position:relative;left:0;bottom:0;overflow:hidden;border:1px solid #888}.cesium-timeline-trackContainer{width:100%;overflow:auto;border-top:1px solid #888;position:relative;top:0;left:0}.cesium-timeline-tracks{position:absolute;top:0;left:0;width:100%}.cesium-timeline-needle{position:absolute;left:0;top:1.7em;bottom:0;width:1px;background:red}.cesium-timeline-bar{position:relative;left:0;top:0;overflow:hidden;cursor:pointer;width:100%;height:1.7em;background:linear-gradient(180deg,rgba(116,117,119,.8) 0,rgba(58,68,82,.8) 11%,rgba(46,50,56,.8) 46%,rgba(53,53,53,.8) 81%,rgba(53,53,53,.8))}.cesium-timeline-ruler{visibility:hidden;white-space:nowrap;font-size:80%;z-index:-200}.cesium-timeline-highlight{position:absolute;bottom:0;left:0;background:#08f}.cesium-timeline-ticLabel{position:absolute;top:0;left:0;white-space:nowrap;font-size:80%;color:#eee}.cesium-timeline-ticMain{position:absolute;bottom:0;left:0;width:1px;height:50%;background:#eee}.cesium-timeline-ticSub{position:absolute;bottom:0;left:0;width:1px;height:33%;background:#aaa}.cesium-timeline-ticTiny{position:absolute;bottom:0;left:0;width:1px;height:25%;background:#888}.cesium-timeline-icon16{display:block;position:absolute;width:16px;height:16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sIDBITKIVzLEMAAAKNSURBVEjHxdXNSxRhHAfw7zzrqhuoWJnSkrippUVSEKsHI9BTUYdAJA/RoYMREV26rAdn6tAfUARi16hQqkOBQRgUEYFWEC3OwczMjdZd92VmdWfmeelgTjO7q7gb0VzmmZnn85vvPPPMM8B/3qTcE2PPpuTZKB1eWuUQACgXYACYwVFbCTTVeZXB/i55o4LFelcAZfStYD4vpAoPGAGo4GBcQEgSOAUMQyAezwK6iQfDPXnhS/FkHZ+/8VLMWxxqWkfH3gbMRNOYi2roavbja0zHQmoFPYf8ED4Ko4aivm9MOG/u9I8mwrafeK7a/tVrNc/bARYN5noadeq7q0342vXw9CIMU6BmW8rVP9cPBPe52uu+v3O/y9sB4gkTWs6Qsk0mj5ExXMelejvA8WafYmkmGPHanTijdtvif8rx5RiCjdWKs2Cp3jWRDl96KhrbqlBeJqBOLyLQXg0IgbkZDS0dO8EZxZfPSTA9jvDDK3mT0OmP1FXh3XwEEAKdTX5MRWLgjCK4pwH3xt/YnjgLHAv4lHTCAKMMu/wV+KZGob6PoKyMQ0+sgBpZVJZn0NterxQaVqef/DRn+/EXYds/mZx2eVeAW9d65dhCEsaKCb7K8HH0gqTevyh9GDkn0VULRiaLzJKGBu9swfdaiie5RVo9ESURN8E8BE0n7ggACJy8KzghSCzp6DmwWxkaCm24EBXr8wI8Hrkq06QBiRC0t24HALS11IBTCyJl4vb1AXmzpbVYTwoVOXN0h7L8Mwtm8bXPybIQ/5FCX3dA2cr6XowvGCA02CvztAnz9+JiZk1AMxG6fEreSoBiPNmoyNnuWiWVzAIAtISO08E6pZi/3N96AIDn4E3h3P8L/wshP+txtEs4JAAAAABJRU5ErkJggg==);background-repeat:no-repeat}.cesium-viewer{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0}.cesium-viewer,.cesium-viewer-cesiumWidgetContainer{width:100%;height:100%}.cesium-viewer-bottom{display:block;position:absolute;bottom:0;left:0;right:0;padding-right:5px}.cesium-viewer .cesium-widget-credits{display:inline;position:static;bottom:auto;left:auto;padding-right:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000}.cesium-viewer-timelineContainer{position:absolute;bottom:0;left:169px;right:29px;height:27px;padding:0;margin:0;overflow:hidden;font-size:14px}.cesium-viewer-animationContainer{position:absolute;bottom:0;left:0;padding:0;width:169px;height:112px}.cesium-viewer-fullscreenContainer,.cesium-viewer-vrContainer{position:absolute;bottom:0;right:0;padding:0;width:29px;height:29px;overflow:hidden}.cesium-viewer-toolbar{display:block;position:absolute;top:5px;right:5px}.cesium-viewer-cesiumInspectorContainer{display:block;position:absolute;top:50px;right:10px}.cesium-viewer-geocoderContainer{position:relative;display:inline-block;margin:0 3px}.cesium-viewer-cesium3DTilesInspectorContainer{display:block;position:absolute;top:50px;right:10px;max-height:calc(100% - 120px);box-sizing:border-box;overflow-y:auto;overflow-x:hidden}*{padding:0;margin:0}.dc-container{overflow:hidden;display:block}.dc-attribution a{text-decoration:none}.dc-attribution a:hover{text-decoration:underline}.div-icon{user-select:none;background-color:#fff;padding:2px;border-radius:4px}.div-icon:hover{cursor:pointer}.dc-popup{min-width:120px;min-height:10px;padding:10px;background:#fff;cursor:pointer}.dc-popup,.dc-tool-tip{position:absolute;left:0;top:0;border-radius:4px;visibility:hidden;z-index:-1}.dc-tool-tip{min-width:100px;height:30px;line-height:30px;color:#fff;padding:0 10px;background:rgba(0,0,0,.6);pointer-events:none}.dc-tool-tip:before{content:"";display:block;position:absolute;pointer-events:none;left:-10px;top:5px;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid rgba(0,0,0,.6)}.dc-context-menu{position:absolute;left:0;top:0;min-width:120px;min-height:10px;padding:10px;background:#fff;visibility:hidden;z-index:-1;cursor:pointer;background-color:#444d59}.dc-context-menu .menu-list{width:100%;color:#fff}.dc-context-menu .menu-list .menu-item,.dc-context-menu .menu-list .menu-items{font-size:14px;list-style:none;padding:5px 0 5px 10px}.dc-context-menu{border-radius:4px}.menu-item,.menu-items{border-bottom:1px solid #cecece}.dc-map-switch{position:absolute;right:10px;bottom:5px;width:80px;height:60px;background:#fff;transition:width 2s;-moz-transition:width 2s;-webkit-transition:width 2s;-o-transition:width 2s;padding:5px;box-shadow:2px 2px 3px #888;cursor:pointer;overflow:hidden;visibility:hidden}.dc-map-switch .map-item{position:relative;display:inline-block;margin-right:5px;width:80px;height:60px;overflow:hidden}.dc-map-switch .map-item span{color:#fff;font-size:14px;position:absolute;right:2px;bottom:2px;user-select:none;padding:1px 3px;pointer-events:none}.dc-map-switch .map-item.active span{background-color:rgba(8,101,186,.8)}.dc-map-switch .map-item:last-child{margin-right:0!important}.dc-slider{position:absolute;left:50%;top:0;background-color:#d3d3d3;width:5px;height:100%;z-index:9999;visibility:hidden}.dc-slider .splitter{position:absolute;left:-21px;top:calc(50% - 21px);width:42px;height:42px;background:#fff;border-radius:50%;text-align:center;line-height:58px;padding:2px;border:1px solid #d3d3d3}.dc-slider .splitter:hover{cursor:ew-resize}.dc-hawkeye-map{position:absolute;left:25px;bottom:30px;user-select:none;border-radius:50%;width:150px;height:150px;overflow:hidden;border:2px solid orange;box-shadow:2px 2px 3px #2b2b2b}.dc-compass{top:20px;right:20px;cursor:default;pointer-events:auto;user-select:none}.dc-compass,.dc-compass .out-ring{position:absolute;width:55px;height:55px}.dc-compass .out-ring{top:0;left:0;background-repeat:no-repeat;background-size:contain;fill:#3f4854;border-radius:50%}.dc-compass .out-ring svg{height:55px;width:55px}.dc-compass .gyro{position:relative;top:50%;transform:translateY(-50%);height:25px;width:25px;border-radius:50%;display:block;margin:0 auto;padding:4px;box-sizing:border-box;background:#fff}.dc-compass .rotation_marker{position:absolute;top:2px;left:2px;height:51px;width:51px;border-radius:50%;background-repeat:no-repeat;background-size:contain}.dc-compass .gyro-active,.dc-compass .gyro-bg:hover+.gyro{fill:#68adfe}.dc-location-bar{position:absolute;left:180px;bottom:2px;font-size:14px;color:#fff;background:rgba(0,0,0,.6);padding:2px 5px;border-radius:2px;user-select:none;display:flex}.dc-location-bar span{margin:0 8px}.divForms-dom{position:fixed}.divForms .arrow{position:absolute;bottom:0;left:0;width:45px;height:2px;transform:rotate(-45deg) translate(5px,-15px);background-color:#28bbf0}.divForms-theme .area{background-image:linear-gradient(135deg,transparent 30px,rgba(40,187,240,.423529) 0,rgba(40,187,240,.423529) 50%,transparent 0),linear-gradient(-45deg,transparent 30px,rgba(40,187,240,.423529) 0,rgba(40,187,240,.423529) 50.1%,transparent 0)}.divForms .area{position:relative;min-width:180px}.divForms-wrap{position:relative;overflow:hidden;padding:30px}.divForms-theme .b-b,.divForms-theme .b-b-r,.divForms-theme .b-l,.divForms-theme .b-r,.divForms-theme .b-t,.divForms-theme .b-t-l{background-color:#29baf1;box-shadow:0 0 10px 2px #29baf1}.divForms .b-t{left:44px;height:1px}.divForms .b-r,.divForms .b-t{position:absolute;top:0;right:0;z-index:10}.divForms .b-r{bottom:44px;width:1px}.divForms .b-l{top:44px;width:1px}.divForms .b-b,.divForms .b-l{position:absolute;left:0;bottom:0;z-index:10}.divForms .b-b{right:44px;height:1px}.divForms .b-b-r{bottom:0;right:0;transform:rotate(45deg) translate(-52px,22px)}.divForms .b-b-r,.divForms .b-t-l{position:absolute;width:1px;height:62px;z-index:10}.divForms .b-t-l{top:0;left:0;transform:rotate(45deg) translate(52px,-22px)}.divForms .label-wrap{padding-left:12px;color:#fff;font-size:16px;white-space:nowrap;overflow:hidden}.divForms-theme .title{background-image:linear-gradient(135deg,transparent 25px,#29baf1 0)}.divForms .title{margin-top:20px;padding:0 12px 0 30px;height:36px;line-height:36px;position:relative}.divForms .label-content{padding:15px 0}.divForms-theme .arrow,.divForms-theme .title:before{background-color:#28bbf0}.divForms .title:before{content:"";position:absolute;bottom:-4px;left:0;right:0;z-index:10;height:2px}.divForms .data-li{padding:4px 45px 4px 0}.data-value,.divForms .data-label{display:inline-block}.divForms .label-num{margin-right:3px;color:#f09e28;font-weight:600}.divForms .label-tag:after{content:attr(alt);display:inline-block;position:absolute;bottom:-22px;right:-35px;z-index:-1;padding:2px 4px;color:#fff;font-size:14px;background-color:#333;border-radius:3px;opacity:0;transition:all .3s ease-in}.divForms .data-value-status-1{background-color:#35b15b!important}.divForms .data-value-status-0{background-color:#f0285c!important}.divForms .data-value-status-2{background-color:#f09e28!important}.divForms .label-tag{display:inline-block;position:relative;margin-right:6px;padding:0 6px;font-weight:600;cursor:pointer;background-color:#909399;border-radius:4px}.divForms .data-value{font-size:14px}.leaflet-popup{position:absolute;width:100%;height:100%;text-align:center}.leaflet-popup-content-wrapper{position:relative;text-align:center;height:100%;overflow:hidden;background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);padding:1px;text-align:left;border-radius:12px}.leaflet-popup-tip-container{margin:0 auto;width:60px;height:36px;position:relative;overflow:hidden}.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);width:36px;height:36px;padding:1px;margin:-25px auto 0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content{position:absolute!important;top:6px!important;left:6px!important;right:6px!important;bottom:6px!important;width:calc(100% - 12px)!important;height:calc(100% - 12px)!important}.leaflet-popup-content canvas,.leaflet-popup-content div{width:100%!important;height:100%!important;vertical-align:middle}.leaflet-popup-content .bubble-window-top{position:absolute;top:4px;left:50%;transform:translate(-50%);width:20px!important;height:20px!important;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF8WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIwLTEwLTEzVDE2OjQ1OjU5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMC0xMC0xM1QxNjo0OCswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMC0xMC0xM1QxNjo0OCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4N2ZiNGJmOC0xODRmLTgwNGQtYjQ2MC0wYThkYmI3NDliODgiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpkZDAzOTMyNy0wNjIxLWJlNDUtOGQyMi1iODIxYmFiNTZkNGUiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpiMDgxN2E1MC1iMzhiLWIyNGItOThmZi0zYjBlYjlmZWU5Y2MiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmIwODE3YTUwLWIzOGItYjI0Yi05OGZmLTNiMGViOWZlZTljYyIgc3RFdnQ6d2hlbj0iMjAyMC0xMC0xM1QxNjo0NTo1OSswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N2ZiNGJmOC0xODRmLTgwNGQtYjQ2MC0wYThkYmI3NDliODgiIHN0RXZ0OndoZW49IjIwMjAtMTAtMTNUMTY6NDgrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6cqn2LAAAIT0lEQVR4nO3dzU8bdxrAcU/GHRtjbION8QsTmykkEWwwTgqBAA5vqZu06pKqqrrtf5BjLrlE3HPjT8ghe+wB7WpXwWDPjKNkiaKiKNGiVIkJpCIoIpFmxq3rLg57WKbSVhv255/fZvw831sUP844z0djMHjMWCyWv1gwsB1r9AFgjQ0BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAA8BAM/a6AOod4IgaGNjY5Zz5845E4nE8VgsFtvY2Pjn2tratiRJiizL73K5XFujj7NeMRYgVwnjOG5/YWHh4Pr165etVqvtfbfb398v3rx58283btz4oJ7H16hAAIjH4+qtW7f+MDg4OEg6s7y8nE0mk0otj8sINT2Aubk5JZVKfUs7zzDMX6t5PEarqb8InJubU1Op1DeV3MfBwcGnDMNU65AMV9MCmJ2dVZaXl7+2/OcsV0lMqVS6zDDMu2ocl9FqSgDT09NqKpX6mmGYqjw+hmGOlUqlT1mWPajG/RmppgMwNTWlpFKprxiGYat5vwzDsMVi8RLLsk11JmgqABcuXFBXVla+Ylm2Jq9vsCxrLRaLl6xWa6kW99+ImgZAIpFQVlZWvmRZlvj796WlpczQ0NCfc7ncD6QzLMt+UCgULlmt1n26IzVWTQFgYmJCXV1d/dJqtXKkM0tLS5n5+fmfHj165J6cnPy+HARWq5UrFAqXOI4z/ZnA9ADGx8eV1dXVL456de/36cvX/7yzs+OkQGDTNC3JcZypzwSmBjA+Pq6m0+kvOI6zk878fvl6NAg4jrNrmpa02Wz/Ip0xWqYFcP78eWV1dXWe47gW0pn3LV+PEkGLoihJm832K+mMkTIlgNHRUSWdTs/bbDYH6cz/W74eDQKbzeZQFCXZ0tJiujOB6QCMjo4qmUzmjzabrZV0hnT5epQIWt++fXvR4XCY6kxgKgCHy//cbrc7SWfKXb4eDQK73e588+bNRYfDUSz332tUpgEwMjKirqysfG6324l/WYN2+XqUCNpev379sdPpNAUCUwAYHh5W0un0Z62trXVbvh4NgtbW1rbd3d2LZkBgeADDw8Pq4fJdpDPVWr4eJQLXq1ev5tra2n6p1nHUIkMDOHv2rJJOpy87nU436Uy1l69Hg8DpdLp3dnbm3G63YREYFkA8HlcPl+8hnanV8vUoEXi2t7dnjYrAkADi8bgqiuInLpernXSm1svXo0Hgcrnat7e3ZzweT6GWx0aT4QAMDQ2pmUwm6XK5Okhn6rV8PUoEHS9evJhpb2//uZbHVm6GAhCLxRRRFD92u91e0pl6L1+PBoHb7fZubm7OdHR0GAaBYQAMDg6qh8v3kc40avl6lAh8z58/n/Z6vYZ4OjAEgNOnTyuSJM15PJ5O0plGL1+PBoHH4+l89uzZhc7OzoafCRoOYGBgQM1kMhc9Ho+fdMYoy9ejRODf2NiY6uzsbOjjaCiAgYEBVZKkWa/Xa9rl69Eg8Hq9/o2Njamurq58LY/tqBoGoL+/XxVFccbr9XaRzhh1+XqUCLqePHkyFQgEGvK4GgKgv79flSRp2ufzBUhnjL58PRoEPp8v8Pjx40QoFKr746s7gFOnTmmZTGbK5/MFSWfMsnw9SgTB9fX1yVAoVNeng7oCOHnypCpJUsLv94dIZ8y2fD0aBH6/P7S+vj4ZDofr9njrBuDEiROaKIoJv98fJp0x6/L1KBGEHz58OM7zfF3OBHUB0NfXp0qSNBkIBLpJZ8y+fD0aBIFAoPvBgwcTPM9rtTw2i6UOAHp7e8EuX48Wwdra2kQ0Gq0pgpoC6O3tVWVZnggGgzzpTLMtX48GQTAY5O/duzdeSwQ1AyAIgiaK4ngwGDxOOtOsy9ejRHD87t275wVBqAmCmgAQBEGTZXksHA5HSGeaffl6NAjC4XBEluWxWiCoOoBoNKqJojgWDoejpDNQlq9HiSAqy/JYtZ8OqgogGo1qsiyP8jwfJZ2Btnw9oyCoGoBIJJI/XH4P6QzU5evRIOB5PirL8mgkEqnK6wRVAcDzvCZJ0gguv/woEfQc/n9XfCaoGADP8/lsNjsSiUQE0hlc/n9HgyASiQjZbHak0lcMKwLQ3d2tSZL0USQS+ZB0Bpf/v6NE8KEkSR91d3dTnwmoAYTD4Z9kWR7u6enpJZ3B5R8dDYKenp5eWZaHaX+ARAWgo6PjZ1mWz+Dyq18FCM7Q/LYxFYDFxUW3IAh9pLfH5ZcXDQJBEPoWFxeJ30KnV/bFoqPRqLa5ufkn0tvj8ukLhUL5bDZ7RhCEE6QzbW1t3+XzeeILZpV9Bkgmk8QzuPzKovwpYllvSS8bwNOnT4kui4bLr07lItA0rayrpJYN4P79+y1bW1u5o26Dy69upAj29vZ29/b2iC+ZZ7FQACgWi9yVK1f+8b6/x+XXJhIE165dE0ulUlk7ZS0WS9kfqLC7u2vL5XLfT05O+hwOx28XbFpYWPju6tWrTXU1bSOlaRp3+/btl6FQ6MdYLPbbt+BbW1u5mZmZv9+5c6fsD7uq6CNjWJZ95/P5fnG73aWXL19yhUKB+KtPrLKcTmcxEAgU8/n8sb29vZb9/X2qy+M3/WcGYUfX8DeHYo0NAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQAPAQDv33mHFzavC2UYAAAAAElFTkSuQmCC) no-repeat!important;background-size:100% 100%!important}.leaflet-popup-content .bubble-window-left{position:absolute;top:50%;left:4px;transform:translateY(-50%);width:20px!important;height:20px!important;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFKmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIwLTEwLTEzVDE2OjQ1OjU5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMC0xMC0xM1QxNjo0OTowNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMC0xMC0xM1QxNjo0OTowNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDphODgzYTE1Ni1kMzNlLTQ4NDctOTRkNS03YTk0OTVkMTcyYTUiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpkZDAzOTMyNy0wNjIxLWJlNDUtOGQyMi1iODIxYmFiNTZkNGUiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDphODgzYTE1Ni1kMzNlLTQ4NDctOTRkNS03YTk0OTVkMTcyYTUiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmE4ODNhMTU2LWQzM2UtNDg0Ny05NGQ1LTdhOTQ5NWQxNzJhNSIgc3RFdnQ6d2hlbj0iMjAyMC0xMC0xM1QxNjo0NTo1OSswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtEDQYkAAAj1SURBVHic7Z1tT1NpGsf/nXZahHIO8iRQz7Z0dxP2jVE26Mzu9PQBUdeZRLMm+2ISEz+D38DETyKZWScbg66Z7JLBVVoeFKJYWVQetkzlqcsWobSVtlDYFzCOjiJXQeCcc1+/l3D/kyv8f9znHDg9xwTgNhhh+WS/B2D2FxZAcFgAwWEBBIcFEBwWQHBYAMFhAQSHBRAcFkBwLPs9gBGx2+3ZmpqabDKZtMTj8aJ8Pq/ZXzTNDqZHysvLX127du3TZDJ5YXR09OtYLPaXWCx2/OLFi6n9nm0zTOB/Bn0UHA5HOhgMNrrd7t++7/uNjY3fDgwMSHs911bwDvAROHz4cDIUCv1+s/IBoK2t7TOLxZLfy7kosAA7RFGUVDAYbKqvr//Nh9Y5nU53ZWXl0l7NRYVPAneAoijJUCh03Ol0/pqy3m63r+72TIXCO8A2cTqdqVAodIJaPgDEYjHbbs60HXgH2AYulysZDAY/UxSlnpppbW1tT6VSmhOArwIKZKP8zxVFcVEzkUhkpKmp6fHLly+Ld3G0bcGHgAJwu93Jrq6ugsv3eDyPtFg+wAKQcbvdyWAw+LnD4XBRMz+VPz09bd/F0XYEnwMQ2Nj2/+BwOJzUjB7KB1iALXG5XMmenp4/1tbW/oqa0Uv5AAvwQRRFSfb09HxRW1urUDN6Kh9gATZFUZRUX1+fp6am5jA1o7fyAT4JfC8OhyPd19f3hdHLB3gHeIe6urrUo0ePPNXV1Q5qRq/lAyzAW9TV1aUHBgbU6urqOmpGz+UDLMBrampq0uFwWK2srKylZvRePsDnAACAQ4cOpQYHB72ilQ/wDoCqqqr00NCQv6Ki4hA1Y5TyAcEFqKqqevXs2TN/RUVFNTVjpPIBgQWoqKhYGhkZ8ZWVlQlbPiDoOUB5efmrsbEx4csHBNwBDh48+CoSiQRkWa6kZoxaPiCYAGVlZUvj4+PNsixXUDNGLh8QSABZljPRaLRZkqRyasbo5QOCCCDLcubFixfNkiQdpGZEKB8QQIDS0tLM5OTkSbvdXkbNiFI+YHAB7HZ7dnp6usVut8vUjEjlAwYWwG63Z2OxWEtJSQn583iilQ8YVIDi4uJsLBY7VVJSUkrNiFg+YEABiouLc3Nzc6eKioq4fAKGEuDAgQPLG+WTixS5fMBAAthsttz8/Pxpm81WQs2IXj5gEAFsNttyIpE4Y7PZyJ++4fLX0b0AVqt1ZXFx8YzVaj1AzXD5P6NrAaxWaz6ZTJ6xWq1F1AyX/za6FcBisayk0+k/WSwW8keuufx30aUAFoslv7S0dNZisVipGS7//ehOALPZvJrJZM6azeZPqRkuf3N0JYDZbF7LZrNnzWYzeW4u/8PoRgCTybS6vLz8pclkMlMzXP7W6EIAk8mEfD7/lclkIt/DyOXT0IUAq6urX2L9eUYkuHw6mhdgbW3tq0LWc/mFoenbwtvb28k3cgBc/nbQrABXr15dPnXqlIe6nsvfHpp8TqDb7U4ODw//mfpXPi5/+2hyB1BV9RMuf2/QpABer5d07Ofyd44mBThx4sSWj2Tj8j8OmjwHoFz6HT169JtwOFzQVQLzLprcAcLhcHirNVeuXCE/x4fZHE0KEAwGX2y15ty5c/6bN2+S7/9j3o8mBXjw4AHpLVsswc7RpAC9vb1YWVnJUtayBDvDDODr/R7il8zPz9tsNtuwqqq/o6xvaGioP3bs2NT169eXd3s2o6HJqwBg/W7f/v5+95EjR45QM7du3bp7/vz59G7OZTQ0eQgAgFwuZ7l06dK/C8nw4aBwNCsAAAwMDEgtLS3fAFijZliCwtC0AADQ0dEht7S0/HVtbY38zj2WgI7mBQCAjo4OaUMC8qtXWQIauhAAAO7cuSM3Nzd/l8/nV6gZlmBrdCMAANy9e1c6efLkd/l8nny5xxJ8GF0JAAD37t2Tm5ub/7ayspKjZliCzdGdAADQ2dkpbUhA+mshwBJshi4FAIBgMCj7/f4buVwuQ82wBO+iWwEAoKurSwoEAjdyudwSNcMSvI2uBQCA7u5uORAItGWz2VfUDEvwM7oXAAC6u7ulDQnI/wdgCdYxhAAA0NPTI/t8vpuZTIZ0LwHAEgAGEgAA7t+/L/v9/luZTCZJzYgugaEEAF5L8Pd0Os0SEDCcAMC6BIFA4HY6nV6kZkSVwJACAEBfX5/k9/tvp1KpBDUjogSGFQAA+vv75UAg8H0qlVqgZkSTwNACAEB/f7/k8/m+X1xcnKdmRJLA8AIAwMOHD2Wfz/ePxcXFl9SMKBIIIQCwfnuZz+f7ZyKRmKNmRJBAGAGA1xK0JxKJODVjdAmEEgAAHj9+LHm93vaFhYX/UTNGlkA4AQAgHA7LXq/3h4WFhVlqxqgSCCkAADx58kRSVfWHubk5oSUQVgAAGBwclL1eb8fc3Nx/qRmjSSC0AAAwNDQkeb3eO/F4PEbNGEkC4QUAXkvwr3g8PkPNGEUCFmCDp0+fSl6v9+7s7Ow0NWMECViAN9iQoHN2dnaKmtG7BCzAL3j+/HmpqqqdsVhskprRswQswHsYHh6WvF5vSAQJWIBNGBkZKVVVNTgzMzNBzehRAhbgA4yOjkqqqoZmZma2fGrZT+hNAhZgC8bGxiRVVbumpqai1IyeJGABCGxI0DM1NfUjNaMXCVgAIpFIpFRV1d6JiYkfqRk9SMACFMAbEoxTM1qXQJPPCdQyCwsLtra2tsiFCxfssiwfpGQaGhrqV1dXB4PBoObe0aTZ5wRqHafTmers7DzudDrd1ExxcfGNpaUl8ruO9wI+BGyTaDRq93g8D6LR6H+oGUVRyE812StYgB0wMTFR6vF4+sfHx8co6xOJBPmtp3sFC7BDJiYm7KqqbilBPB6PxePxor2aiwoL8BGYnJws9Xg8DyORyOhmay5fvnwvn89r7uetuYH0ytTUVElTU9NAa2tr+5tfj0ajkcbGxm9bW1s1+W4jvgrYBVwuV/L06dOfDA8Pr/T29h7IZrPW/Z5pM1gAweFDgOCwAILDAggOCyA4LIDgsACCwwIIDgsgOCyA4LAAgsMCCM7/AQ5JfWt4cdLHAAAAAElFTkSuQmCC) no-repeat!important;background-size:100% 100%!important}.leaflet-popup-content .bubble-window-bottom{position:absolute;bottom:4px;left:50%;transform:translate(-50%);width:20px!important;height:20px!important;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF+mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIwLTEwLTEzVDE2OjQ1OjU5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMC0xMC0xM1QxNjo0ODo0NiswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMC0xMC0xM1QxNjo0ODo0NiswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDplOTFjZGRkNC1jN2JmLTY3NDEtOThlNS05YjUwODI3YTQ3MTEiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo0N2M3OTA4NS1hYjI2LTkxNGQtOTQ4Mi1kNDg1ZmM1NGQ5NDciIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1NjVlMWZjMi03YmMzLTgzNDMtOTk3YS05NTU4NjhmNDAzNzIiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjU2NWUxZmMyLTdiYzMtODM0My05OTdhLTk1NTg2OGY0MDM3MiIgc3RFdnQ6d2hlbj0iMjAyMC0xMC0xM1QxNjo0NTo1OSswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDplOTFjZGRkNC1jN2JmLTY3NDEtOThlNS05YjUwODI3YTQ3MTEiIHN0RXZ0OndoZW49IjIwMjAtMTAtMTNUMTY6NDg6NDYrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7qizTvAAAIl0lEQVR4nO2d3U/bWBqH3xAoQyGLRBGiXNA27Q5i1aoKakFFxXYS6MXe9GKk1eyo/Cm97v8BVTWaGY3Y+Wg3FArlo1CYfkDVqhQmxDVJTEgg38TepN6L1trdDrDnmHzYOe9zG7+2xe95bSc+52ADgJ8BYZaaSp8AUllQAMZBARgHBWAcFIBxUADGQQEYBwVgHBSAcVAAxkEBGAcFYBwUgHFQAMZBARgHBWAcFIBxUADGQQEYBwVgHBSAcVAAxkEBGAcFYBwUgHFQAMZBARgHBWAcFIBxUADGQQEYBwVgHBSAcVAAxkEBGMcOAN8YKaytrS20tbVl29vbc6qqgqqqtUU+N+QQGhoaFKfTuV9bW1vI5XJ2TdNsRvdl6ArgcrmSGxsbl8Lh8Nfr6+vfpFKpr0ZGRupaWlqyRk8EIeP27dtKNpv9am1t7e+yLP9NluXe4eHhtNH92YBylbDh4eH0yMjI1wd95vf73w0MDDwPhUJNRk8IOZyxsbHGmzdvug/6rKen596LFy/+RLtPKgHsdvsHWZZ7W1tb2w/bBiUoDUeFDwAgiqK/q6vrpaIoJ2j2S3ULaG1tzR0VPgCA0+n8cnZ2tqejo8PwZQn5X/5f+AAAZ86ccV67dm2fdt9UAjgcjjzJdihB8SAJX6erq4v6QZxKAFmW60m3RQmOD034AAA+n+8D7TGoBEin0/Wjo6M+0u1RAuPQhj86OuoLBAIO2uNQfwtoaWnJLi8vu5xO559Ja/DBkA7a8P1+//rVq1df7O7unqQ9FvXvALu7uyc5jnu+ubm5QVqDVwJyaMPf3Nzc4DjuuZHwAQz+EBQMBhs5jltGCYqLwfCXg8Fgo9FjGn4XsLW15eB5/jdRFH8nrUEJDoc2fFEUf+d5/retrS3q+/5/c6yXQZIkNQ0MDCyJougnrUEJ/oiB8P0DAwNLkiQd+5nq2G8DJUly8Dy/JEnSJmkNSvAfaMOXJGnz09/7WJ2vU5TXwaIoNnEctyhJUoC0BiUwFj7HcYuiKBbt21TRxgMEAgEHx3ELwWAwQFrDsgQGwg9wHLdo5Lv+URR1QAhKQAZt+MFgMCAIwkKxwwcowYggv9+vSyCS1rAkgYHwRY7jFvx+f9HDByjRkDC/3++4fv36k3A4/J60hgUJaMMPh8PvBUGYL1X4ACUcExgIBBz9/f3z4XBYIq2pZgkMhC9xHDe3sbFBPciDhpIOCg0EAo6+vr45WZa3SGuqUQLa8GVZ3uJ5frbU4QOUYVSwJEmO3t5eZiUwGv76+nrJwwco07BwSZKarly5Mh+JRIKkNdUgAW34kUgkKAjCzLt370p2z/+css0LCAaDjS6XazYSiYRIa6wsgYHwQzzPz6ytrZWl83XKOjEkFAo1uVyu2Wg0GiatsaIEtOFHo9Gw2+2efvv2bdk6X6fsM4NCoVDjpUuXZqLRqExaYyUJDIQv8zw/9ebNm7J2vk5FpobJstx48eLF6Vgstk1aYwUJaMOPxWLbgiA8qlT4ABWcG7i9vd3U3d09HYvFIqQ1ZpbAQPgRnucnX79+XbHwASo8OXRnZ6exu7t7Oh6PW1oC2vDj8XjE7XY/rHT4ACaYHbyzs3PywoULj+Px+A5pjZkkMBD+Ds/zE69evWou5XmRUnEBAABisVjD+fPnpxKJRJS0xgwS0IafSCSigiCMr66uVrzzdUwhAMDH0cbnzp17lEgkYqQ1lZTAQPgxQRDGV1ZWTNH5OqYRAABgb2/v5NmzZx8lk8ld0ppKSEAbfjKZ3HW73b6XL1+apvN1TCUAAEA8Hm/o7Ox8lEwm90hryimBgfD3BEH4p5Gp2+XAdAIAACQSiS86Ozsn0+l0nLSmHBLQhp9Op+Mej+e+WcMHMKkAAB8l6OjomEin0wnSmlJKYCD8hMfjuf/s2TNT3fM/x7QCAACkUqkvTp8+PZHJZJKkNaWQgDb8TCaT9Hg8vywvL5u283VMLQDAxxnJ7e3tDzOZTIq0ppgSGAg/9Sl8U3e+jukFAPgoQVtb23gulyurBLTh53K51ODg4E9LS0um73wdSwgAAJDNZutPnTr1MJfLEQd6HAkMhJ92u90/LS4uWqLzdSwjAABANps90dLS8lBRlAxpjREJaMNXFCXjdrv/YbXwASwmAADA/v5+XXNzs09RFOI1CWkkMBB+1uPxjFkxfAALCgAAoCjKiebmZp+qqsSrYpFIQBu+qqr7Xq937MmTJ5YMH8CiAgAAKIpS53A4fKqq5khrjpLAQPg5j8fz4/z8vGUe+A7CsgIAAKiqWutwOHz5fF4hrTlIAtrw8/m84vV6f5yfn7ds5+tYWgAAAFVV7Q0NDQ/y+bxKWqNLcPny5YSB8FWv1/vD3NycpTtfh3qVMLPyaeXsv9rt9rpSHaNQKPzL6/V+//jx46oIH6AKrgA6+XzeXl9f/6BQKBCtZkpLoVDIDw4OfldN4QNUkQAAAIVCoaa+vv6BpmmFYu5X07TC0NDQd9PT05a/539OVQkAAFAoFGx2u/1XTdOol009CE3TPgwNDX07NTVVVZ2vU3UCAABomlZjt9vvA4B23F3duHHj28nJyarrfJ2qFAAAQNM0sNlsvx5nH0NDQ/cmJiaqsvN1qlYAHZvN9sv4+PgsTc3q6upqT0/PvYmJiartfB3D/zTKSty9e1epq6t73d/f76ypqTl0Tf18Pq/cuXPn51u3bsWDwWBDOc+xUlTN7wAkOJ3OFMdxNTzPN/f19XV2d3f/ZWVlZWVmZub906dP0wsLC1DK9XjMCFMCIH+k6p8BkKNBARgHBWAcFIBxUADGQQEYBwVgHBSAcVAAxkEBGAcFYBwUgHFQAMZBARgHBWAcFIBxUADGQQEYBwVgHBSAcVAAxkEBGAcFYBwUgHFQAMZBARgHBWAcFIBxUADGQQEYBwVgHBSAcVAAxkEBGAcFYBwUgHH+DVyMfMJWqZNHAAAAAElFTkSuQmCC) no-repeat!important;background-size:100% 100%!important}.leaflet-popup-content .bubble-window-right{position:absolute;top:50%;right:4px;transform:translateY(-50%);width:20px!important;height:20px!important;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF+mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIwLTEwLTEzVDE2OjQ1OjU5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMC0xMC0xM1QxNjo0ODoyMyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMC0xMC0xM1QxNjo0ODoyMyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo5ZGVjYjQwYS01OTEzLTcxNGYtOTNkZS1iMmU3OWM5ZWQzOTEiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDowZjYzNGI1Ny1mYzZkLTcxNGEtYjcwMi02MjVkMzE5NWNjOWYiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowZWIwNjMxNC01YmNhLWRmNDgtODY3Ny0wYzNmZWY4OGNkNzIiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjBlYjA2MzE0LTViY2EtZGY0OC04Njc3LTBjM2ZlZjg4Y2Q3MiIgc3RFdnQ6d2hlbj0iMjAyMC0xMC0xM1QxNjo0NTo1OSswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDo5ZGVjYjQwYS01OTEzLTcxNGYtOTNkZS1iMmU3OWM5ZWQzOTEiIHN0RXZ0OndoZW49IjIwMjAtMTAtMTNUMTY6NDg6MjMrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4xeiJvAAAIk0lEQVR4nO2dTXNSWRrHH0ISEglBhU4QJQQmJtF0jGhBFMONGe3KTHX1qGV19cx06WfwE7h350ewzMZN+1Ldk7ITebmX7hpta0ZX46IdCE2ImECEQF6gLzIbU5OyTMI5ySXn3vP8lnAWT/H/nT/nArnRAcD3gHBLw14PgOwtKADnoACcgwJwDgrAOSgA56AAnIMCcA4KwDkoAOegAJyjB4C/7/UQm2EwGMqBQKA4Pj5eyWazpVwuZ9jrmbRG414PsBkej2fpwYMHZ5xOp3v9sYmJiR9v3LiRX1xc3LeXs2kJHTD4beC1a9eKd+/e/eunnovFYr8KgvDvVCplrPdcWoQ5AfR6/ft0Ou2zWq22zdbE4/HXgiA8n52dNdVzNi3C3CHQarWubRU+AIDL5eqRJMnrcDiK9ZpLqzAngNlsrtSyzuVy9USjUa/D4SgoPZOWYU6AZDLZXOtap9P5h2g0Oux0OrEJKGFOgNXVVcPNmze/q3W90+l0R6PR4e7ubmwCCpg7BK7z8OFD46VLl8ZqXZ9MJuOCIDydmZnBgyEBzDXAOpcvX15+9OhRuNb1DofDJUnSWbfbjU1AALMCAFBJ0I0SkMG0AADkEhw+fLhbkiR/T0/PkpJzaQXmBQCgksApSdIISrA9qhAAgFyCQ4cOdUmSFDh69ChKsAWqEQCASgKHJElCb28vngk2QVUCAJBLYLPZjoiiGOjr68Mm+ASqEwCATgJJkkb7+/uxCT5ClQIAkEvQ0dFxWBTF0ePHj2MTbEC1AgBQSWAXRXEMJfg/qhYAgFwCq9V6SBTFPw4MDKAEoAEBAKgksImieAEl0IgAAOQSWCyWTlEULw4ODuaVnIt1NCMAAJUEHZIkfXHixAlum0BTAgCQS7B///4OURS/GBoa4rIJNCcAAJUEn4miOH7y5EnumkCTAgCQS2A2m62RSGTc4/FwJYFmBQCgksASiUT+xJMEmhYAgFyC9vb2g5FI5M+nT5/m4kygeQEAqCQ4EIlEvvR6vZpvAi4EACCXoK2tbX8oFPrS6/Vqugm4EQCASgJzOBz+yufzabYJuBIAgFwCo9HYHgqFvjpz5owmm4A7AQCoJDCFw+G/aFECLgUAIJegpaXFFA6HL2lNAm4FAKCSoC0SiVz2+/2akYBrAQDIJTAYDMZQKHTl3LlzmjgYci8AAJUE+z5IoPomQAE+QCpBc3NzaygUujoyMqLqJkABNkAhQUs4HL4qCIJqmwAF+AhSCRobGw3BYPDr0dFRVTYBCvAJKCRoDgaDX58/f151TYACbAKpBHq9vunJkyffjI2NqaoJUIAtoJCgMRgMfnPhwgXVNAEKsA2kEuh0Ov309PTfLl68qIomQAFqgEKChg8SMN8EKECNkEoAALrp6elvWf95GQpAAIUEcOfOnc+bm5tlpWbaKUzfLp5F7t2797vH40n19/e7alnf2dnZ2dDQ8CoUCumVno0GZu8TyDok9zGUZbnU19d3PxaLMXcPQ3wLoITk7aCxsdFw9uxZpUeiAgXYASQSDA8Ptyk9Dw0owA6pVQJBELrqMQ8peAbYBYaGhvIvX778drt1Op3uh3rMQwI2wA6x2+3F+/fve7db9+rVq//UYx5SUIAdYLfbi9Fo9JTb7e7dbu2zZ89+q8dMpKAAlJCEDwAgiiKTHwujABSQhi/LckmSpPdKz0UDCkAIafgAALdu3Zpk8UMgALwKIIIm/Kmpqej4+DiT9Q+AAtQMTfgAbF76bYTZfx3LEpThV3U63T8UG2qXwDPANtCEX61W3zc0NDAfPgAKsCWU4Vf0ev0P1WpVydF2DRRgE2jCr1QqclNT02S1WlXN66qaQesJZfi/GwyGyUqlolNytt0GBfgImvBlWS63tLRMVioV1b2eqhtYSSjDL7W2tk7KsszkT762AwX4AE345XJ5zWg0PpZlWbWX0ygAUIe/ajKZHpfLZVXu/HW4F4Am/FKptNLe3v64XC6rduevw7UAlOEvm83mx6VSqUnJ2eoFtwLQhL+2tlY8cODAVKlUalZytnrCpQCU4RcsFsvU6uqqJnb+OtwJQBP+8vJywWKxTK2srGhm56+j+kMMCZThL9lstumVlRWDkrPtFdw0AE34xWIxb7PZpovFoibDB+BEAMrwc3a7XdPhA3AgAE34S0tL744cOfKkUCi0KDkbC2j6DEAZ/mJXV1con89rPnwADTcATfj5fD7rdDqDvIQPoFEBKMPPuFyuYC6Xa1VyNtbQnAA04edyuQW32x169+7dPiVnYxFNnQEow5/v6ekRFxcXuQsfQEMNQBN+Npud7+3tjWSzWa5qfyOaEIAy/LfHjh0LLywscLnz11G9ADThZzKZ9MDAQHhhYcGo5GxqQNVnAMrw3wwODkpv375l8p499Ua1DUAT/vz8/NzQ0JCUTqe53/nrqFIAyvBTHo9Hmpubw/A3oDoBaMJPp9Ozp06d+mlubg5r/yNUJQBt+D6f76dUKoU7/xOoRgCa8N+8eZP0+XzRZDKJO38TVHEVQBn+b36//+dkMsnkrVlYgfkGoAk/lUol/H7/zzMzMxj+NjDdAJThzwiC8E8MvzaYbYCdhM/qHblYhEkBDh48uEIafjKZnBkZGcHwCWHyLeD27dtmwvDjgiA8xdonh7nbxLW1tZUKhcLVWtcnEonY6OjoL4lEAi/1KGCuAWw2W6nWtYlE4r+BQOAXvNSjh7kzQLFYrGmmeDz+OhAIPMfwdwZzAmQymdZEIhHbak08Hn8tCMJz/IRv5zAngCzL+itXrjzd7PlYLPZrIBD41+zsLO78XYA5AQAAXrx40X79+vV7mUwmvfHxiYmJH71e7wv8Ymf3YO4qYCN6vf691WpdM5lMcjqdNmj97/T2AqYFQJSHybcApH6gAJyDAnAOCsA5KADnoACcgwJwDgrAOSgA56AAnPM/j1Yk7LUThnEAAAAASUVORK5CYII=) no-repeat!important;background-size:100% 100%!important}.leaflet-popup-content .bubble-window-blow-up{position:absolute;bottom:4px;left:10px;width:20px!important;height:20px!important;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIwLTEwLTEzVDE2OjUxOjU5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMC0xMC0xM1QxNjo1Mjo1MyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMC0xMC0xM1QxNjo1Mjo1MyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4NTdlMDkwNi00M2JkLTc0NDMtOGE4Zi03YTlhZDkwMDY1YTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODU3ZTA5MDYtNDNiZC03NDQzLThhOGYtN2E5YWQ5MDA2NWE2IiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ODU3ZTA5MDYtNDNiZC03NDQzLThhOGYtN2E5YWQ5MDA2NWE2Ij4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDo4NTdlMDkwNi00M2JkLTc0NDMtOGE4Zi03YTlhZDkwMDY1YTYiIHN0RXZ0OndoZW49IjIwMjAtMTAtMTNUMTY6NTE6NTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6tUFy1AAAGQUlEQVR4nO3dX2hTZxjH8fc0IWnStcnsKg0mWTYWM1sqg1mpiyIUp+jAi3gxt0IRFEQFRYiCKKIoelG9EbwUvFEh2GVdlZW286KrMk7aXQhmhrSltXV15iyszdqmIVl3Y+dIk5xz0iRv5Pl97nzz5zyaLyd/PMkRGGPdDMiq4D0A8IUAiEMAxCEA4hAAcQiAOARAnDafGzkcjtlt27axLVu2vLd9+3Z7Q0PDZwWeCxSYmJh4/ujRo5GBgYHZgYGBpbGxMZPa+xCYyg+CLl++vHj27NmvGGOVajcGRZW8cePGwxMnTmjU3EhVAFNTU65169Y5VY8GJROPx6NNTU0/joyMKNobKA4gFAp9uH79+qZVTQclIwjCAyXXU/Qi0Ov1zuPBf7dcu3YtqeR6snuAvXv3znR1dbVlu1ySpOlwODylcj4oAIfDUW+xWGzZLvd4PHf8fn/OpwLZdwHt7e112S47f/5856VLl/Ry9wFF88eZM2cCV65c8WS6sK2trc7v9ydy3YHsHiDbC7+tW7feefz4seq3HVB4brd7ZnBwcMVe+uXLl2Gr1RrKdducARgMhsT8/PyKuiRJelVXVzeU17RQFMFg8OMNGzY0pK8bjcbvFhYWdNlul/NFoMvlWsi0Hg6HJ9WPCMV079693zKtZ3sMl+GjYOIQAHEIgDgEQBwCIA4BEIcAiEMAxCEA4hAAcQiAOARAHAIgDgEQRzaAo0ePzj979uyjUCj0idfrjfOeh5e8vhjyrjt8+PDczZs3v17+c0dHx6cGg4Hk4W0k9wDHjh1rTF87cuRIM49ZeCMZgN1ur09fq6+vt/KYhTeSAZhMpg/S1wRBIPlvQfIvDW8hAOJIBjA9PY2jmt8gGUAm8Xg8xnsGHhAAcQiAOARAHAIgDgEQhwCIQwDEIQDiEABxCIA4BEAcAiAOARCHAIhDAMQhAOIQAHEIgDgEQBwCIK4svhu4f//+2MGDB212u732jbWBQGC4WNurra1d8RP4er3eKIqipVjbZIwxp9Npj0Qif05OTkbv3r07eevWrapibk8J7gF4vd54R0fHN+nrzc3Nn5dyDkEQNKXYptlsrnM6nay1tZW5XK6u06dPqzrJU6Fxfwo4derUF7xn4OX48eNf8p6BewBms/l93jPwotfrjTqdTtG5feQkk0khn9txD6Czs3OQ9wy89PX1DSYSCa5Pw9wDOHDgwJzf7/+J9xyl1tPT8/O+ffte8Z6D+4vARCKh9Xg8CxqN5getVluQ3aGc8fHxzem/BxCPx/82m829pdh+KpWqSCaTWlYGZ1/lHsCyVCpVkUqlsp7bppCWlpaWMi0vLi6WZPvlhPtTAPCFAIhDAMQhAOIQAHEIgDgEQBwCIA4BEIcAiEMAxCEA4hAAcQiAOARAHAIgDgEQhwCIQwDEIQDiEMAblZWV1bxn4IFkABaLxcZ7hnJBMgB4i2QAc3NzJM8PlAnJACRJiqSvzc7ORnnMwhvJALq7u4Ppaz09PUX7QYpyRjKAkydPJvv6+v77VvKTJ0/EQ4cOzfCciZey+W5gKSWTSe3OnTv/WrNmjU+j0bBIJGJkZfBFTR5IBrAsGo0aec/AG8mnAHgLARCHAIhDAMQhAOIQAHEIgDgEQBwCIA4BEIcAiEMAxCEA4nIGMDo6mvGnU61W64ozbgBfO3bsqM+0nu0xXJYzgFgsZpAk6UX6us1mc7S0tJA8gKIctbS0zLS2tq448YYkSS9isZgh121lnwJEURzJtO7z+dw6nS6lfEwoBp1Ol/L5fO5Ml2V77P5P9oAQURSje/bsWbFus9kc0Wi0tr+/f2h4eJjkAZW8bdy40bx79+7NVVVVGb/UIopilMkc6SQwxrrlNhQIBNZu2rRpc35jAg8TExPPHQ6H7B5A0bsAt9v9++pHglLatWvXr0qupyiARCKhbWxsvLO6kaBULly4cD8UCtUoua7izwGCwaBJEIQH169f/z7vyaCobt++/bC6uvr+xYsXFR/hrGGMfatmI729vRVPnz4NaLXaVyaT6Z+amppa1ZNCwbx+/Xq8v79/6Ny5c79cvXpVr/YsZIpeBOZiMBgSLpdrYTX3AfkZHR3Vyb3Pl7PqAODdhv8LIA4BEIcAiEMAxCEA4hAAcf8CdQ6Xulp0d1YAAAAASUVORK5CYII=) no-repeat!important;background-size:100% 100%!important}.leaflet-popup-content .bubble-window-zoom-out{position:absolute;bottom:4px;left:40px;width:20px!important;height:20px!important;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIwLTEwLTEzVDE2OjUyOjMwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMC0xMC0xM1QxNjo1MzowNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMC0xMC0xM1QxNjo1MzowNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyN2U4YWYwOC1mZmNiLTkxNGEtOGJiMC1kMjhhNGM1MWMxOTUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjdlOGFmMDgtZmZjYi05MTRhLThiYjAtZDI4YTRjNTFjMTk1IiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MjdlOGFmMDgtZmZjYi05MTRhLThiYjAtZDI4YTRjNTFjMTk1Ij4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoyN2U4YWYwOC1mZmNiLTkxNGEtOGJiMC1kMjhhNGM1MWMxOTUiIHN0RXZ0OndoZW49IjIwMjAtMTAtMTNUMTY6NTI6MzArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6xZ+q+AAAFIklEQVR4nO3dT0gjVwDH8RcbNtrUtahpYjHBSA11vUhz0DaHoFKxQU8L9g8e/HNWvOlFEC96DeJBUPBSFvFScEk9ZlQapUUMGKlkjaGytXUTULNtExu1p4XiztY32cTR/n6f45t5kwfzZZLMYcYghFgWBKtI7wWQvhgAOAYAjgGAYwDgGAA4BgCOAYAz5jqxpKQk097envF4PObW1la72+3+JJ8Lo/8WjUb3gsHg/tra2tna2tpVPB4vzeU4BpHDncCurq7UzMxMs91ud+byoZRf5+fn6cnJycD4+PgDrXM1B7C4uGjq7u7+XOsHUeEdHBw8q62t/VnLHE2/AXp7e//gyb+7nE7nR+vr6xYtc94RQnwjs6Pdbk8pivJVTiujW+NwOKq3t7d/2tvbM8nsL/0VEAwGK7xe76dq205PTxO7u7sHGtZJb6mmpsZWVVVlV9uWTqdTLpfr6eHh4Y0/DKX+BdTU1KS8Xm+n2rbp6enloaEhg8xxKK9+HxgY+GFubu7L6xuKi4tL29raihYWFm48iNRvALfbrTo+ODi4xJOvn/n5eXNjY+O3atu8Xm+ZzDGkAvB4PO+pjQcCgazMfCqccDhclkgkfrs+3tTU5JCZLxVAc3OzTW08FovldPOB8isajR5eH6uvr38kM5e3gsExAHAMABwDAMcAwDEAcAwAHAMAxwDAMQBwDAAcAwDHAMAxAHAMABwDAMcAwDEAcAwAHAMAxwDAMQBwDAAcAwDHAMAxAHAMABwDAMcAwDEAcAwAHAMAxwDAMQBwDAAcAwDHAMAxAHAMABwDAMcAwDEAcDm/MyifTCbT336//4HP53tksVgqi4uLS4UQ4ujo6LVHoN5Hrx7rns1mM4lE4sXW1tb+8PDw82g0+lDvtd2JAAKBgLW1tfWz6+Nveh7+fWU0Gk02m63a5/NVezyepNVqVTKZjOb3/OST7l8B5eXlf6md/P+7srKyio6OjrTe69A9gMvLS72XoJuLiwu9l6B/ACcnJyWBQGBV73XctuPj419XVlbe1Xsdd+I3QGdn58nU1NR3XV1dLovFUl5RUfGBwWAoikajml6BdlfV1dV9LIQQp6enyWQymQyFQvHR0dFkNpvV/X0LdyKAq6uropGRkaKRkZGYECKm93oK4JnKmO4nX4g78BVA+mIA4BgAOAYAjgGAYwDgGAA4BgCOAYBjAOAYADgGAI4BgGMA4BgAOAYAjgGAYwDgGAA4BgCOAYBjAOAYADgGAI4BgGMA4BgAOAYAjgGAYwDgGAA4BgCOAYBjAOAYADgGAI4BgGMA4BgAOAYAjgGAYwDgpAIIBoPP1cbtdnsqv8uhXNTV1VVfHwuHw2GZuVIBKIryp9r4+Pj4+zLzqXDGxsYylZWVVdfHV1dXf5GZLxVAJBIxqI339/d/sbS0VOJyuXgl0IHP5zubmJh4rLZtc3PzpcwxDEKIZZkdNzY2qpqamtxv2h4KhX6UOQ7lh9PprLLZbK9d+oUQIp1Op+rr65/G4/Ebn0guHUBtbW1qf3//a43rJB0MDw8v+f3+Epl9pf8FxGKx0p6enie5L4tuw/LyclD25Auh4QrwSkNDw9n29vZjo9Fo0rw6Kqi+vr7FhYUFs5Y5mu8DRCKRh2az+fvZ2dmA1rlUGIqihBwOxxOtJ1+IHK4A/2a1Wl+63e7LlpYWs8fj+TDX45B2Ozs7CUVRTkKhkIjFYjm/fuatAqD7j7eCwTEAcAwAHAMAxwDAMQBwDAAcAwD3D+klO9N4lI3xAAAAAElFTkSuQmCC) no-repeat!important;background-size:100% 100%!important}.morpheus-bubble-popup{position:fixed;width:380px;height:240px;background:transparent}
libs/Cesium/dc.core.min.js
@@ -1 +1 @@
var a0_0x31c0=['subdomains','sun','\x20uniform\x20sampler2D\x20image;\x0d\x0a\x20uniform\x20float\x20speed;\x0d\x0a\x20uniform\x20vec4\x20color;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20\x20float\x20time\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0d\x0a\x20\x20\x20vec4\x20colorImage\x20=\x20texture2D(image,\x20vec2(fract(st.t\x20-\x20time),\x20st.t));\x0d\x0a\x20\x20\x20if(color.a\x20==\x200.0){\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0d\x0a\x20\x20\x20}else{\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a\x20*\x20color.a;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20max(color.rgb\x20*\x20material.alpha\x20*\x203.0,\x20color.rgb);\x0d\x0a\x20\x20\x20}\x0d\x0a\x20\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','_computeHierarchy','registerType','imagerySplitPosition','track','use','restore','WebMapTileServiceImageryProvider','defined','_orbitMouseMoveFunction','addPath','createBaiduImageryLayer','PINCH_MOVE','removeTerrain','install','_registerEvent','getPrototypeOf','px\x20sans-serif','setTimeDuration','getCoordinates','tileset','serialize','INSTALLED','bottom','HeightReference','_center','BoundingSphere','CircleWave','#FFFFFF','getValueOrClonedDefault','polyline_volume','createAnchor','Math','minimumClusterSize','dimensions','_effectEvent','_handleDoubleClick','TileCoordinatesImageryProvider','_getCorridorShape1','_color','_overlayEvent','DcCore','_off','EllipsoidGeodesic','selectHandler','move','Event','getZHeightPosition','_addLayerGroup','ATTACK_ARROW','isMarsMeasureLabel','getThirdPoint','_repeatSubscription','delta','rimColor','getMaxHeightForPositions','createXYZImageryLayer','_orbit','vec','_cameraEl','hasChildNodes','pick','outlineColor','_bounds','setTimeRange','_contrast','slice','checkPosition','zoomTo','pixelOffset','layerEvent','Brick','isArray','radii','ARCGIS','dragIcon','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2250px\x22\x20height=\x226px\x22\x20viewBox=\x220\x200\x2050\x206\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>decrease</title>\x0a\x20\x20\x20\x20<path\x20d=\x22M46.6183575,0.657894737\x20L3.30112724,0.657894737\x20C1.44927539,0.657894737\x200,1.66880618\x200,2.96052632\x20C0,4.25224645\x201.44927539,5.26315789\x203.30112724,5.26315789\x20L46.6988728,5.26315789\x20C48.5507246,5.26315789\x2050,4.25224645\x2050,2.96052632\x20C49.9194847,1.66880618\x2048.4702093,0.657894737\x2046.6183575,0.657894737\x20L46.6183575,0.657894737\x20L46.6183575,0.657894737\x20Z\x22\x20id=\x22Shape\x22></path>\x0a</svg>\x0a','primitive','minimumZoomDistance','getQuadricBSplineFactor','NONE','lineType','fromTranslation','rgba(0,0,0,1)','rotation','高度差','enableCluster','XYZ','map-item','_createCompassDom','http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali','lon','\x0a\x20\x20\x20\x20\x20\x20<span>视角:','Wood','border_color','height','Facet','play','onStartEditing','_bindEvent','\x0a\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20left:\x202px;\x0a\x20\x20\x20\x20\x20\x20bottom:\x202px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x2014px;\x0a\x20\x20\x20\x20\x20\x20color:\x20rgb(255,\x20255,\x20255);\x0a\x20\x20\x20\x20\x20\x20background:\x20rgba(0,0,0,0.6);\x0a\x20\x20\x20\x20\x20\x20padding:\x202px\x205px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x202px;\x0a\x20\x20\x20\x20\x20\x20user-select:\x20none;\x0a\x20\x20\x20\x20','_circleCache','enableTilt','_getInternalData','右击结束编辑','clock','topojson','MIDDLE_DOWN','传入的[','getPositions','customTags','layerId','positions','{time}','UNIT_Z','toGeoJSON','map_split','AttackArrow','min','baidu','_setWrapperStyle','split','requestImage','default','px,\x200);\x0a\x20\x20\x20\x20','_createModel','neckWidthFactor','LEFT_DOUBLE_CLICK','undefined','numberOfListeners','_raiseEvent','_drawAlpha','addBaseLayer','longitude','getOverlayType','getViewer','_dbClickHandler','_bottomRadius','Module','_drawCircle','_createHierarchy','changed','verticalCtrl','_stepSize','background','location_bar','border','_dimensions','raiseEvent','renderer','copy','center','dc-compass','Cartesian3','calback','keys','plot-overlay-layer','<div\x20style=\x22width:\x20100%;height:\x20100%\x22><div\x20class=\x22divForms\x20divForms-theme\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22divForms-wrap\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22area\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22arrow-lt\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-t\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-r\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-b\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-l\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22arrow-rb\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22label-wrap\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22title\x22>岳西水厂</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22label-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-li\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-label\x22>实时流量:</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-value\x22><span\x20class=\x22label-num\x22>98</span><span\x20class=\x22label-unit\x22>m³/s</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-li\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-label\x22>水池液位:</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-value\x22><span\x20class=\x22label-num\x22>13.14</span><span\x20class=\x22label-unit\x22>m</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-li\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-label\x22>水泵状态:</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-value\x22><span\x20class=\x22label-tag\x20data-value-status-1\x22\x20alt=\x22中间状态\x22>1号</span><span\x20class=\x22label-tag\x20data-value-status-0\x22\x20alt=\x22关闭状态\x22>2号</span></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-li\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-label\x22>出水阀门:</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22data-value\x22><span\x20class=\x22label-tag\x20data-value-status-1\x22\x20alt=\x22中间状态\x22>1号</span><span\x20class=\x22label-tag\x20data-value-status-2\x22\x20alt=\x22打开状态\x22>2号</span></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-t-l\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-b-r\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22arrow\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div></div>','features','multiplyByVector','getDraggersPositions','TENCENT','add','filter','_computeCirclePoints','_viewOption','setView','Property','YELLOW','color','请确认json文件格式正确!!!','translate3d(0,0,0)','horizontal','compass_inner','{style}','_getCameraFocus','splitWords','CustomDataSource','enableTranslate','Color','canvas','heightDraggers','_startTime','_rimColor','getType','VRTheWorldTerrainProvider','popup','mouseover','terrainProvider','when','_isActive','RefractionType','_czmBuiltinsAndUniforms','hasProperty','south','_semiMajorAxis','Plugin\x20\x27','function','Erosion','_moveHandler','drawingBufferHeight','_camera','Refraction','createVRTerrain','_mouseWheelHandler','getCurvePoints','heading','WallTrailMaterial','dc-context-menu','addClass','southeast','getHeight','{y}','_tilingScheme','_templates','echarts','PolylineArrowMaterialProperty','uniform\x20sampler2D\x20colorTexture;\x0d\x0auniform\x20sampler2D\x20depthTexture;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0auniform\x20vec4\x20u_scanCenterEC;\x0d\x0auniform\x20vec3\x20u_scanPlaneNormalEC;\x0d\x0auniform\x20float\x20u_radius;\x0d\x0auniform\x20vec4\x20u_scanColor;\x0d\x0a\x0d\x0avec4\x20toEye(in\x20vec2\x20uv,\x20in\x20float\x20depth){\x0d\x0a\x20\x20vec2\x20xy\x20=\x20vec2((uv.x\x20*\x202.0\x20-\x201.0),(uv.y\x20*\x202.0\x20-\x201.0));\x0d\x0a\x20\x20vec4\x20posInCamera\x20=\x20czm_inverseProjection\x20*\x20vec4(xy,\x20depth,\x201.0);\x0d\x0a\x20\x20posInCamera\x20=posInCamera\x20/\x20posInCamera.w;\x0d\x0a\x20\x20return\x20posInCamera;\x0d\x0a}\x0d\x0a\x0d\x0avec3\x20pointProjectOnPlane(in\x20vec3\x20planeNormal,\x20in\x20vec3\x20planeOrigin,\x20in\x20vec3\x20point){\x0d\x0a\x20\x20\x20\x20vec3\x20v01\x20=\x20point\x20-\x20planeOrigin;\x0d\x0a\x20\x20\x20\x20float\x20d\x20=\x20dot(planeNormal,\x20v01)\x20;\x0d\x0a\x20\x20\x20\x20return\x20(point\x20-\x20planeNormal\x20*\x20d);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20getDepth(in\x20vec4\x20depth){\x0d\x0a\x20\x20\x20\x20float\x20z_window\x20=\x20czm_unpackDepth(depth);\x0d\x0a\x20\x20\x20\x20z_window\x20=\x20czm_reverseLogDepth(z_window);\x0d\x0a\x20\x20\x20\x20float\x20n_range\x20=\x20czm_depthRange.near;\x0d\x0a\x20\x20\x20\x20float\x20f_range\x20=\x20czm_depthRange.far;\x0d\x0a\x20\x20\x20\x20return\x20(2.0\x20*\x20z_window\x20-\x20n_range\x20-\x20f_range)\x20/\x20(f_range\x20-\x20n_range);\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(){\x0d\x0a\x20\x20\x20\x20gl_FragColor\x20=\x20texture2D(colorTexture,\x20v_textureCoordinates);\x0d\x0a\x20\x20\x20\x20float\x20depth\x20=\x20getDepth(texture2D(depthTexture,\x20v_textureCoordinates));\x0d\x0a\x20\x20\x20\x20vec4\x20viewPos\x20=\x20toEye(v_textureCoordinates,\x20depth);\x0d\x0a\x20\x20\x20\x20vec3\x20prjOnPlane\x20=\x20pointProjectOnPlane(u_scanPlaneNormalEC.xyz,\x20u_scanCenterEC.xyz,\x20viewPos.xyz);\x0d\x0a\x20\x20\x20\x20float\x20dis\x20=\x20length(prjOnPlane.xyz\x20-\x20u_scanCenterEC.xyz);\x0d\x0a\x20\x20\x20\x20if(dis\x20<\x20u_radius){\x0d\x0a\x20\x20\x20\x20\x20\x20float\x20f\x20=\x201.0\x20-\x20abs(u_radius\x20-\x20dis)\x20/\x20u_radius;\x0d\x0a\x20\x20\x20\x20\x20\x20f\x20=\x20pow(f,\x204.0);\x0d\x0a\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20mix(gl_FragColor,\x20u_scanColor,\x20f);\x0d\x0a\x20\x20\x20\x20}\x0d\x0a\x20\x20}\x0d\x0a','baseVal','mousemove','_repeat','_entity','mouseup','uri','config','_stRotation','deserialize','_setCanvasOption','setPosition','setBottomCircle','_layerEvent','getContext','videoUrl','BAIDU','dataToPoint','_mBounds','propertyName','_createLabel','_plotEvent','frequency','tileVisible','_getCorridorShape2','topRadius','arcgis','target','uniform\x20vec4\x20color;\x0d\x0auniform\x20float\x20speed;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20\x20\x20float\x20t\x20=fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0d\x0a\x20\x20\x20\x20t\x20*=\x201.03;\x0d\x0a\x20\x20\x20\x20float\x20alpha\x20=\x20smoothstep(t-\x200.03,\x20t,\x20st.s)\x20*\x20step(-t,\x20-st.s);\x0d\x0a\x20\x20\x20\x20alpha\x20+=\x200.1;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20alpha;\x0d\x0a\x20\x20\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','_comps','hasOwnProperty','updateHeightDraggers','textEx','Matrix3','_setCustomClass','CircleWaveType','enterFullscreen','onMoveDrawing','_credit','registerAction','stRotation','FILL_AND_OUTLINE','_gyro','correspondingElement','ZERO','multiplyByScalar','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAAgCAYAAABkS8DlAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAADSSURBVHja7NYxEoUgDEDBYM39z2qHtZViwMFxt1FJnF/98ZXWWkRE7LWWOOt5Lsm9q/vsbu9Zdtazs/J19O5bs1XPZrwze/6V31zxbOZs1n905Wt2p3f25GzE7ohv6q3nLQCA3xEAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAA8g4AAAD//wMA4WEFTJOT5UIAAAAASUVORK5CYII=','\x0a\x20\x20\x20\x20visibility:visible;\x0a\x20\x20\x20\x20z-index:1;\x0a\x20\x20\x20\x20transform:translate3d(','fromDegreesArrayHeights','_timeLine','CesiumTerrainProvider','REMOVE','CLOCK_TICK','locationBar','mode','_mouseEl','showDrawEnd','GeoJsonDataSource','minimumLevel\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','pathLeadTime','addColorStop','enabled','fromEntity','ter','getWidth','defaultGradient','plotEvent','createTencentImageryLayer','_text','_radi','neckHeightFactor','silhouetteSize','_addedHook','stopDrawing','Digital\x20Visual','_addOverlay','draw','_orbitCursorAngle','CLAMP_TO_GROUND','release','KeyboardEventModifier','cartographicArrayToCartesianArray','fromRotationTranslation','_onPostUpdateHandler','WHEEL','font_style','circle','RELEASE','icon','addEffect','\x20米</span>','_mouseMoveHandler','</span>\x0a\x20\x20\x20\x20\x20\x20<span>海拔:','sigma','uniform\x20vec4\x20color;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20\x20\x20vec4\x20fragColor\x20=\x20color;\x0d\x0a\x20\x20\x20\x20fragColor\x20=\x20czm_gammaCorrect(fragColor);\x0d\x0a\x20\x20\x20\x20material.emission\x20=\x20fragColor.rgb;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20fragColor.rgb;\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x20\x20\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','_positions','updateLengthForTerrain','SceneTransforms','_fire','POST_RENDER','createGoogleTerrain','getElementsByClassName','createArcGisImageryLayer','Matrix4','getTime','createDragger','iconUrl','readyPromise','[object\x20Array]','_onPostUpdate','getAttribute','pipeline','updatePositions','postProcessStages','matrix','https://webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}','_getArrowHeadPoints','_initLabel','getNumberOfYTilesAtLevel','MultiPoint','arrLables','_show','WallTrailMaterialType','https://p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400','addTerrain','showBackground','farValue','baseWaterColor','exports','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2250px\x22\x20height=\x2250px\x22\x20viewBox=\x220\x200\x2050\x2050\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>increase</title>\x0a\x20\x20\x20\x20<path\x20d=\x22M0,25\x20C0,25.3514939\x200.131810207,25.659051\x200.373462207,25.900703\x20C0.615114207,26.142355\x200.922671379,26.2741652\x201.27416517,26.2741652\x20L23.7258348,26.2741652\x20L23.7258348,48.7258348\x20C23.7258348,49.0773286\x2023.857645,49.3848858\x2024.099297,49.6265378\x20C24.3189807,49.8462214\x2024.6485061,50\x2025,50\x20C25.7029877,50\x2026.2741652,49.4288225\x2026.2741652,48.7258348\x20L26.2741652,26.2741652\x20L48.7258348,26.2741652\x20C49.4288225,26.2741652\x2050,25.7029877\x2050,25\x20C50,24.2970123\x2049.4288225,23.7258348\x2048.7258348,23.7258348\x20L26.2741652,23.7258348\x20L26.2741652,1.27416517\x20C26.2741652,0.571177517\x2025.7029877,0\x2025,0\x20C24.2970123,0\x2023.7258348,0.571177517\x2023.7258348,1.27416517\x20L23.7258348,23.7258348\x20L1.27416517,23.7258348\x20C0.571177517,23.7258348\x200,24.2970123\x200,25\x20L0,25\x20L0,25\x20L0,25\x20Z\x22\x20id=\x22Shape\x22></path>\x0a</svg>\x0a','Plane','_layerCache','_tileHeight','inProgress','FINE_ARROW','GLMap','transformWindowToWGS84','addLayer','__proto__','\x20海里','bottomRadius','fill','EllipseGeometryLibrary','AMAP','pixelRange','transformWGS84ToWindow','fromRandom','getBaseLength','once','morphTo3D','red','_totalLable','_mountedHook','CzmlDataSource','_addable','count','useGradientOpacity','_removedHook','roll','getTimestamp','sampleTerrainMostDetailed','yellow','_id','getImageData','fontSize','viewerEvent','removeData','_organiseData','clearPath','minimumLevel','createAmapImageryLayer','terrainPolyline','\x20公顷','valueOf','trackedEntity','credit','properties','offsetLeft','google','_baseLayer','origin','maxCanvasSize','custom_label','setOptions','uniform\x20vec4\x20lightColor;\x0d\x0auniform\x20vec4\x20darkColor;\x0d\x0auniform\x20float\x20frequency;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20//\x20From\x20Stefan\x20Gustavson\x27s\x20Procedural\x20Textures\x20in\x20GLSL\x20in\x20OpenGL\x20Insights\x0d\x0a\x20\x20vec2\x20F\x20=\x20czm_cellular(materialInput.st\x20*\x20frequency);\x0d\x0a\x20\x20float\x20t\x20=\x200.1\x20+\x20(F.y\x20-\x20F.x);\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(lightColor,\x20darkColor,\x20t);\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','currentStyle','_hasEquals','rain','interpolateUsingFraction','uniform\x20vec4\x20lightWoodColor;\x0d\x0auniform\x20vec4\x20darkWoodColor;\x0d\x0auniform\x20float\x20ringFrequency;\x0d\x0auniform\x20vec2\x20noiseScale;\x0d\x0auniform\x20float\x20grainFrequency;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20//Based\x20on\x20wood\x20shader\x20from\x20OpenGL\x20Shading\x20Language\x20(3rd\x20edition)\x20pg.\x20455\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x0d\x0a\x20\x20vec2\x20noisevec;\x0d\x0a\x20\x20noisevec.x\x20=\x20czm_snoise(st\x20*\x20noiseScale.x);\x0d\x0a\x20\x20noisevec.y\x20=\x20czm_snoise(st\x20*\x20noiseScale.y);\x0d\x0a\x0d\x0a\x20\x20vec2\x20location\x20=\x20st\x20+\x20noisevec;\x0d\x0a\x20\x20float\x20dist\x20=\x20sqrt(location.x\x20*\x20location.x\x20+\x20location.y\x20*\x20location.y);\x0d\x0a\x20\x20dist\x20*=\x20ringFrequency;\x0d\x0a\x0d\x0a\x20\x20float\x20r\x20=\x20fract(dist\x20+\x20noisevec[0]\x20+\x20noisevec[1])\x20*\x202.0;\x0d\x0a\x20\x20if(r\x20>\x201.0)\x0d\x0a\x20\x20\x20\x20\x20\x20r\x20=\x202.0\x20-\x20r;\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(lightWoodColor,\x20darkWoodColor,\x20r);\x0d\x0a\x0d\x0a\x20\x20//streaks\x0d\x0a\x20\x20r\x20=\x20abs(czm_snoise(vec2(st.x\x20*\x20grainFrequency,\x20st.y\x20*\x20grainFrequency\x20*\x200.02)))\x20*\x200.2;\x0d\x0a\x20\x20color.rgb\x20+=\x20lightWoodColor.rgb\x20*\x20r;\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','msRequestFullscreen','ColorMaterialProperty','PolygonHierarchy','_cameraOption','_clock','sin','lookAt','project','defaultMinOpacity','alert','\x20gyro-active','ellipse','eachOverlay','setContent','gradient','fromDegrees','DOUBLE_ARROW','flyTo','text','cartographicToCartesian','fogColor','_baseLayers','createEditDraggerHandler','trackedPath','delegate','Missing\x20Base\x20SDK','construct','web2D','offset','div','GeoJsonLayer:the\x20url\x20invalid','_callback','0px','_baseLayerPicker','hawkeye_map','distanceDisplayCondition','LEFT_DOWN','getOverlayById','length','_layerGroupEvent','Initialized','mapSwitch','_fogColor','extendComponentView','_blendColorSubscription','state','font_size','coordinates','clampToGround','_orbitCursorOpacity','compass_rotation_marker','createDrawPolygonHandler','_position','setScale','cssText','_dataSource','startEditing','vector','_holes','removeOverlay','onmouseout','computeIcrfToFixedMatrix','_positionIndex','clientX','Object','BlobType','_scene','tileHeight\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','__esModule','PolylineFlowMaterialProperty','_delegate','kml','LEFT_DRAG','drawHandler','endPosition','brightness','translate3d(','getOverlays','KmlDataSource','_endRotate','_getTempPoint4','vertical','absolute','_rimColorSubscription','fontColor','Asphalt','_specularMap','content','_floatingAnchor','getViewRect','hasLayer','SCENE3D','getPixelSize','cameraController','parentElement','computeEllipsePositions','Feature','_orbitLastTimestamp','fillStyle','fromArray','EllipsoidTangentPlane','ellipsoid','CAMERA_CHANGED','stopEditing','_height','onmouseover','boundingSphere','_wrapper','modelUrl','removeChild','_getOverlayId','mozRequestFullScreen','_size','silhouetteColor','isSuper','zAxis','面积:','getLayer','apply','enableInputs','destroy','getCircleCenterOfThreePoints','CameraEventType','grassColor','PolylineTrailType','_setSceneOption','contextmenu','super_height','headWidthFactor','lookAtTransform','_blur','pathMaterial','positionWC','container','cesiumWidget','Rectangle','innerHTML','hidden','fromAxisAngle','_useGradientOpacity','{x}','wmts','worldToCameraCoordinatesPoint','context','plane','values','px;\x0a\x20\x20\x20\x20height:','tiles','green','setClass','maximumZoomDistance','_ulEl','clear','SCENE2D','Billboard','minorDragger','updateDraggers','fromDate','setInterpolationOptions','_setViewerOption','enableLook','create','_mouseMoveHandle','transformWGS84ToCartographic','RIGHT_CLICK','czml','_width','enableFxaa','transformWGS84ToCartesian','normalize','specularIntensity','getAngleOfThreePoints','mapProjection','PostProcessStage','_mouseMode','getOwnPropertyDescriptor','PolylineFlow','plugin','double_arrow','ScreenSpaceEventHandler','computeMidPosition','PolylineTrailMaterialProperty','_delta','imageryLayers','HeadingPitchRange','terrainProviderViewModels','\x0a\x20\x20\x20\x20\x20\x20transform:\x20rotate(-','outerPositions','_tileVisibleCallback','defaultYField','_palette','dc-location-bar','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpAAQAAAABAAAAngAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKE1hY2ludG9zaCkAMjAxODoxMDoyNiAxNTozMDozNAAABJAEAAIAAAAUAAAA1KABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAAAyMDE4OjEwOjI2IDE1OjI0OjI1ALUCxicAAAAJcEhZcwAACxMAAAsTAQCanBgAAAdgaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXBNTTpJbnN0YW5jZUlEPnhtcC5paWQ6MjgyZGYxNWEtYzg5MC00ODUzLWJlZDQtOWEyZjQxMmY0NjljPC94bXBNTTpJbnN0YW5jZUlEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD54bXAuZGlkOjI4MmRmMTVhLWM4OTAtNDg1My1iZWQ0LTlhMmY0MTJmNDY5YzwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjI4MmRmMTVhLWM4OTAtNDg1My1iZWQ0LTlhMmY0MTJmNDY5YzwveG1wTU06T3JpZ2luYWxEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06SGlzdG9yeT4KICAgICAgICAgICAgPHJkZjpTZXE+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxOC0xMC0yNlQxNToyNDoyNSswODowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDoyODJkZjE1YS1jODkwLTQ4NTMtYmVkNC05YTJmNDEyZjQ2OWM8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDx4bXA6TW9kaWZ5RGF0ZT4yMDE4LTEwLTI2VDE1OjMwOjM0KzA4OjAwPC94bXA6TW9kaWZ5RGF0ZT4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8eG1wOk1ldGFkYXRhRGF0ZT4yMDE4LTEwLTI2VDE1OjMwOjM0KzA4OjAwPC94bXA6TWV0YWRhdGFEYXRlPgogICAgICAgICA8eG1wOkNyZWF0ZURhdGU+MjAxOC0xMC0yNlQxNToyNDoyNSswODowMDwveG1wOkNyZWF0ZURhdGU+CiAgICAgICAgIDxwaG90b3Nob3A6SUNDUHJvZmlsZT5zUkdCIElFQzYxOTY2LTIuMTwvcGhvdG9zaG9wOklDQ1Byb2ZpbGU+CiAgICAgICAgIDxwaG90b3Nob3A6Q29sb3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgr82RRBAAAQ+0lEQVR4AZWaWZIkNw5Ea5M00khnmi/d/zgyLV017znhTEZWdk8PzCIAAg4QABlLRtXz77///p8//vjjy/v7+5ePj48vf/755xfo/eXl5f2ff/55R/f8NPTDDz9s+dRrfnt7i+3Un/Jpf319feF4lj8/P78yV8bKhHplnpcV8u0Fv1cOx8BxAPrjjz+GL7fXYEZ+09c4Hsj6Nubrzz///C+OX3799dd///LLL7/+9ttvP+tM7O+jv/766xPQIj3+/vvvJ4/SWXx195x4u2knnsbvRutz2hyzQNFRtLiXsdukJxZSbhOelQ9b9NqKwfbyRrAPJkT++MDwgV8OivlggsiYkpA29JHprvN9ImJV90FzdyHVE0v7OwfhX96Z/1nu2ByUWWh1FmBzYe8WtHNTVm+jyCMLoMLA6mHRibMm4rmTE18ddsfyjxcbMMon+XnYGI9TV9kGeXQsJ2BiyKXqTrn46s6xOslmNS+5RahvPHQOQ9jCLUga9SemTWzxBeQSwLZXSkMLK4ixSV2SaOJthNgmWF7/8nu98xpbOm1elto8LF5b7eWfCnnJFdCpwvG/NOSM0zlzCbjtwL5zA0y3BXblTaKTtgk4X7a3wVqINrflxLAIzfsmObGeWcUsHXO72t4QnTvb31U3JwiWS2E3QX9tcCsOB8c0WWG3u80Tn3mVI8wJrHZH2RG5ttxyJSfwuB+fOm02w6KLL9fmrpCfuqN5ezeJkcQ1B7nj6gP4ysk6a6oMX9UpPKDGtRHS3jctJto5NZFTV9kb3NduhGLOJ0bjnE1onHv+PU8l6tqF3/t3zC6JyNyfsPrXnpugyCbZAOVf09d+z4u/58VV77gNOS6fwvZNcCsOwRg9DvWuwYV/pB/dxfbmIwdDrmnuAX2kPLsSXps63Xfc1Z9g23ZilHlZ+WTTz9yKbRw5hwXs+RyLG5XPzDwanVd5bDsP9eqql6Pa8QwkqVtMD+5NAm2C3ETaBECoVsBHW12bAcq98Z1j9LEZs3p1kjr9nJdrcc+PKS8vbk/mh+V9JoWLr0/1jhNwTuo5doWVz4oPWfG5b0pnIbuTJnpffBMpd6Ufkfaz+HtMm1BM7eR02aKdp/ZH4xZejFzcOa7O+BZeW97BO2jwrmb15Q1arl5ZfH3LW9iJFd/CT3195nL0pX/H00eySPmZ/Oj3gmkTN/yCre6cF93TGw4vFPDGjegfktt3b4GY8qw4nSq3QJOQqleurTp5d5LyJOPUZhuO3R8wLoi37/yIIU50/vhBpy1j3cRB+VEELjE8Jfhx2gYEYwiBp1Hyt0ng6aeffnrh0eWLhEHIM+/ll8JMHqcQclc/L0Fn0fOycSm6z11w+cEyBSQ/i8ee5MzHgpikY8vZhU0BaZwGSaxcm9Tx1BKdJ8bZFcXB1w5QoCDsr/v6Q/aHyqVIV7FNKDcYzdv6dGdO2jouft763HW5/4ApX1tBp2mCIoer3CKyQxjf8+2rTbCcucOpJf6MdyBtHjT7zQnyI8HVIdH80jCATQCUa5II4Y5PamHaJWJ8KtoEtBVrbCjJTa7Z9uI4srdHv78FTJ57yxMuTZBLuinjZwgpek+jkxeHuCiXAI5GMUHf47OlfUkRos3tqx1+2dbaStO8S6FtRgs3HInlBofchMPVm7WFalMejGKSd7zqWX1i7hSkfQzlQIPVLthxOLkk1sRZO6CJznt4Hl8AqDe/MhynzhbioD4xzIk5ssrlxNhjISZiDLmZgpNJNi6rrY7YbQrQfD3KyoPrjmjhbVhukviGEpGTcSSLljCGOX/JN0GD7JUD4aexvKC44v+r6NNukcY6dU6m/tBlblRd1SynyYGNTo4dditeOdlPg5Bvezy1rV1j0cYq3cXdu0E9x/NuAAkmSXeByc6Enx6DFiMxQQpbo1uB+G39xEm8owHZCZNAboaVTQh/l8fiIsOz+qotigI7FpqdYjoOIItKY6YR7t7upjQGextkvNUAHPcqAfjwTr12/9quLfLkLcgg1atjwnO1HzbKJHwK6Kc8yWbVLfKwpyjzQ53tPkUGVqwgYphHijXeUD6Ijv9uALYU7/TZAQJMxgLcAV77BPGDQbYzsuaQdsdtQDkxto4CduG1N4ZjC8wpta6bIUkR4nYJWIA49Z7w73XeHaA9Nu3E7X3BYX0zz8wX/TLl5r52AIoEoTrv8L6NaPBLix88cgmo853AIvvu38LQ7R0gzi7VpqyPVJ2YI6GuxKp++QMJJS+bAu1CbcQyv9yWGZCELXGMH6d1iUQ/Y+eu/9otGFS4LP78TbLEEqjO7wUpoisYACd8LsXej4sj1i7eJjg2rvihrBb66DghrmubBUkiGiSLx8cjzowNsQsSo00arOJSKEHEdqxfCNzbG6vqRzUL0uJTwKvAt0KfH60ljRAHwdZrscEEOCZ4sG1aMadNWZokTChJqyMVZQsyVmS59wv8EFdjFMCmEWDTMX0VJ0ZiioMyB4kl3vA0InPaZba6D/0vNMJ7QD5Y4uh3ulwCqUrPKdZx5RZZjJyYaQgTbJz6+gxvkgzTxDbD5iRxDRZAnIhyDVBumHJpdkps0+y97fVBt2+0NCjBVjo8BQAY0JX2E/UXAE3er0ROvn8fnMWKP4ty1cWqnyT21h+crLGNKwHPDkuhLQhdtn7H4PY2V6dfbRZP2ARybn3N26IdYztjd05x2vIU8EkA/sNP0i/uBn7c5DM5uwLMlYygxiLl+MguTwaCR1eMg5kw3BhDaYTzeghTD3YXjLwJzNZb5FB0mnQ9MBGJ6aWVe4e8ToPVlj8+uspufRUWlj+MAs494CyEqJhvDciAE9jdGOSoT7/qBhfAqhUNvso5TfHKUIrYQqC3LT/DNA9MischjXBsXBLpvUI5Om3GZHzbAQx89H3RMI1wG6UB2EItiCi7YLe+NJNFNkaEOZ02Y5TUc7SAyCvU6kiqX5iucjqCf4qVlyzcUMYeuabsLG0u7umjnBchb1pQ/tgoJ4Cyme7rX4DJY1PstZxqHDNBdOXqSujSkNrk0C7cAXOlAvhuin7VkzzDVWCEtdKks9y0jb5NyMpPvOAMPfGcw1qe/Xt6/jxmDiYF+b8CvhD5Suyu2Kupk8meVHv5IxsTRd0dNNhUp+ykkrIFqVKeomsL1y6J0S4nOOpdd/3b4HB9BMklfDzWqzCB8vqLIn+bswEk64P3sgPw+2oD8HUVY8f9siO0lWzCSU2GHPTdzTgKEi4shVlDx+o6Vqd8jtW1SWIl7M4Tjn3fA0zYukMAvP27+ikEOWTy4DrcOgWD1VDMqatN3Ulgd1LqO5bPcEQ3R4rfu0QD1KX/tPIajaFfqXJj5x6AMTVgzIuQYDsBaF/jLWBWcOvB7MKLqU4OPruoOkJnpTMhSuZsAefKZIuOyXQkm9NKDJfCTq4s6Uf82Jk+utoySF+S97OvwW/Uaj5ZfQB+DLXAfBTV8IjAtfDyDcN3605ZQMcmojxFKmZc/c18W3Xd0acJ+g02q1zZS0kZbOIxboNVb9JuDG+t8GDSAF9/0Vm8hsvq4bTJjDtwV+BjcS54ZG02Vpw2SZtc3czpODIcWJqaxJabqt2XyPj1LS+Fi1PnMaHjpJ/CxA1WzNCe00uAJuX5SM1ftOcGiM6nwH4RYqJ9QzyLRL+qhjNZSF3lqs6x9oNSoWPmTtLl+GTc4uTCFjTYuD3QW8eJq7z52NebICtlEXYrr8DIIUB7B6hwtvKzIGVtpw7fveLKkjsCWegm1JHRS9UnUQpLU1DWEBA+2SV1aAOMpTxkrPg5Hn2Mhz4NOO8B/v7PpUCwNMEoyBdSZT9OJXM80gUDPn2bnZYni/4lfBWbbFad2NGZ/AjFHKq1Y/QVNoYtqxubOimYco25BOw0E/pOm1um2doFxybC8Yl0PpX3Yya5NES4ReujjXGyGz+ZyQ3bdlRLVpACHF/z1s2j8kCCc9UDiGeK7w5Yjuj3q7D1Ak7tngwES43oTV57xsgmG7knJ6o8/DI+7cpQlhieJPHpjdHAZzMCNp/BIu66uqJRBDjNKIZYtemnvJslPjvAgiDvgIj7a5BF7xufRWGX7ZVUxk+2CZdLc+7HAJ1LqpAE1RsfvG9v2hmudwYHUMY5rXGud/VjDDt2gnrnSNEaId0tYofJbwEtTswugH3kZEWO5SVgFXcTVrylxjdFbNAS4iRudpnj4pw6YzmYHNqHkqh6zYcy4xhHqQwZK/yUB7xvkF4ac+THkL9UcvMDmAa0cIJcGmBiHBeaiS46G6EC20V/jFPo5N4GZLWMJ+G4G8Lw02UBTjpxu0Hju7o2GGJ4/VP3ekqYnjj3mpeBwaj7tgMoIpcAenC3l5qVW1Q5MU6xN81Nqg1uI+2uqi0bm7Fzq8+yi3MMP69Vg4oJdvDBqRNbnaCh+qdJ6MRk5cVSc2BvfP7yv0OyAzB457cTTujNwFndFTokew0lbDZpDxWI0ee9wzRHjFhpYoWbgcloUxyehEdfHcPb9hbnmFjRM04c57vDaZKCc6HBKBs3LDdBCrUzsOwA4oZSvEmX0BqswwvXAJ0NuRRdsJggh4++iV94AlKUq8XcSdjc8UkIZQ9tKpRPGixs+dgADzB9HOY/RLjp5itqPoJYOhNkWZWhVIxT5HKCtqZwcdBF18G9QRyHiQgxsMlnVR2b8D2pP20tajgsPi7A3vrF1I8x9Yc6x1OfAlazdwByG4C4iIQuDZjkaw4HIDf3i/6RcpLThJhmngV2l2wduCQtr+xEpVM3sWva3Ikgx70U0gDvBvmF5SVAIAtNJcocvV63rA4f2Scy+iclCtWEjU15cGGeJO3QLj6DuGZ7G1ZVG2ExF92JrzwFO9yPQR3ZB8Z52k8BJt+XwK3+JzNyEpNPERms08NCa7cYJ3hA5tKmttiMuRTluTTwNX4O8TpJ6iTtJXXFz5wdJ9bg1t0PAKTK00dehQngLjgvAVRrK0T4xslIj8yqbcLXbCaBrfY2K2NjlsQUO4kbMr6HPrp7H8bVn8VbeA//DSDvnb4M+SqsQx5/ClAvhTV6fG7yj61La27049IQdbnxqVeGGisFqhuDTAoenAV0V2xMG6LNWBNPP0nfXO5w/UPnDnALuGo+b2TfU3wnlzvpI3pkWBmuHPTJKhuDadU2XhBjDy6KNVdEa9FeY8fFGQ9d8tTGIY15/jDCyB0QoIVLBoTkgtdg7gM1n/oTF/DdySCQBaY4eMYDi+wJ6oRrNMWKU0HyxugOiFqTeu3KA43Nm92QdovX93YT9KmIwr+OanD7I6b+cHQJ5OlbNLhvQWJb86+gA8Z1F22SqqMbriyd+gBGmYKJm90jP/wizzj3gcNmve/5HYDgDsgHkJkoxdsIx6Mz2P8kfIAn2a9iBUDaw0+fi2FF2KppXpz0sdgxbgzCjjvxt01/dXCLj957oO/A2QEYvf7tpFsgLCgG/w9NjGZycTU0MdXlJD/H5hbjUQg+G2PssYuLXvvowwdfn8AH23cBbfrnH43yc5ixj0Fv1TpIiJ+SXZbvOBu/xRBX2WzzhDHBFmKolcu6dtdw9WB8srVP3IlXngN28cvgLl6uf4Gl/F2AidwB6pzMuWC7EUm89gOTiU+cjicN1i+vW80tp3ITbJw0RR/IE+J6KkyzMlZuLsUMHrZ8yo9YMeBrjMQezPoW4CWgYYpJ5a7aSfp1cvitOyfo27JTbIRFdHAaBhObskmLG0zYyOoO04IY1zy13TcKnR3Q5lMA2MuHfxp75VN4LgOi4ZNtf74MOUnIwCWDV/5e7uSlkbfCcRMuH2yrvBRlLgcO9xXqjIP/9lUeTLjFI3z8F+ualIvlptDJAAAAAElFTkSuQmCC','onStopDrawing','start','clientWidth','_viewerEvent','setLabel','shadows','sham','_blendColor','changeTerrain','createSingleTileImageryLayer','_handleMouseDown','WMTS','moveDrawing','_properties','trim','_rotateFrame','_style','attack_arrow','getLeftMostControlPoint','path','defaultValue','traffic','repeat','getValueAt','_data','_glowOnly','drawImage','_sampledPosition','token','prototype','string','auto','Transform','changeBaseLayer','enableRotate','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+klEQVQ4jZ2UT2gTQRTGv5nd7G7TsNnW1QimWC+CghBEqJ7sSTx50oM3iwhejSJ486J4qdWLt6JXsQdPVdRDj0WQBqEehKJotLbEbrLNJvtnZlYmZEub1rLJB8Mw8+b9Zt7Me0PiOMY+KgGwuubv3ba3JKinjUfBj7dC+D6L1tt+82Pke5/agnsRZ+4GC38/iePY6vXbcSLBnXtUGXnYdObQWJ8BC6s7NjeGzyJfuAXNONGgSn4SQCWxbYEE33xECL3zZ+WyEvpf9gsXpn0dVuFuSKgxkcAS0GQsvA9pIIlyI1cweuRBQIh+GECddk4jvLn62nRqiFTTeYWgtaTzaPW+HEtQKeabebc2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=','_roll','updateSuperHeightLabel','getBinomialFactor','_opacity','removeLayerGroup','ymin','pickPositionSupported','单击选择点位','PolylineOutlineMaterialProperty','eachSeries','uniform\x20vec4\x20lightColor;\x0d\x0auniform\x20vec4\x20darkColor;\x0d\x0auniform\x20float\x20frequency;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20//\x20From\x20Stefan\x20Gustavson\x27s\x20Procedural\x20Textures\x20in\x20GLSL\x20in\x20OpenGL\x20Insights\x0d\x0a\x20\x20vec2\x20F\x20=\x20czm_cellular(materialInput.st\x20*\x20frequency);\x0d\x0a\x20\x20float\x20t\x20=\x201.0\x20-\x20F.x\x20*\x20F.x;\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(lightColor,\x20darkColor,\x20t);\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','removeEventListener','setAttribute','holes','surfacePosition','WoodType','className','WaterType','WallTrailMaterialProperty','_createPolygon','16px\x20SimHei','getLength','SceneMode','_enableHook','attribution','requestFullscreen','backFaceAlphaByDistance','createCoordImageryLayer','floor','frameState','tileHeight','_getArrowPoints','PolylineEmissionMaterialProperty','onChangeDrawing','changeSceneMode','_rectangle','api','Quaternion','_heading','clearRect','水平距离','_roamingEvent','bold\x20','duration','_cache','drawing','DefaultCubeMapId','GatheringPlace','featuresLength','PostProcessStageLibrary','PolylineDashMaterialProperty','single_tile','fromCssColorString','hasEdit','uniform\x20sampler2D\x20colorTexture;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0auniform\x20float\x20speed;\x0d\x0a\x0d\x0afloat\x20hash(float\x20x){\x0d\x0a\x20\x20return\x20fract(sin(x*23.3)*13.13);\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(){\x0d\x0a\x20\x20float\x20time\x20=\x20czm_frameNumber\x20*\x20speed\x20/\x201000.0;\x0d\x0a\x20\x20vec2\x20resolution\x20=\x20czm_viewport.zw;\x0d\x0a\x20\x20vec2\x20uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\x0d\x0a\x20\x20vec3\x20c=vec3(.1,.2,.3);\x0d\x0a\x20\x20float\x20a=-.3;\x0d\x0a\x20\x20float\x20si=sin(a),co=cos(a);\x0d\x0a\x20\x20uv*=mat2(co,-si,si,co);\x0d\x0a\x20\x20uv*=length(uv+vec2(0,4.9))*.3+1.;\x0d\x0a\x20\x20float\x20v=1.-sin(hash(floor(uv.x*100.))*2.);\x0d\x0a\x20\x20float\x20b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*10.;\x0d\x0a\x20\x20c*=v*b;\x0d\x0a\x20\x20gl_FragColor\x20=\x20mix(texture2D(colorTexture,\x20v_textureCoordinates),\x20vec4(c,1),\x200.5);\x0d\x0a}\x0d\x0a','setPositions','_positionChangeable','_removeLayerGroup','maxOpacity','GOOGLE','getRightMostControlPoint','toDegrees','translucency','right','multiplier','PINCH','dc-popup\x20','showAt','brickColor','from','_mouseClickHandler','/**\x0d\x0a\x20*\x20@license\x0d\x0a\x20*\x20Cellular\x20noise\x20(\x22Worley\x20noise\x22)\x20in\x202D\x20in\x20GLSL.\x0d\x0a\x20*\x20Copyright\x20(c)\x20Stefan\x20Gustavson\x202011-04-19.\x20All\x20rights\x20reserved.\x0d\x0a\x20*\x20This\x20code\x20is\x20released\x20under\x20the\x20conditions\x20of\x20the\x20MIT\x20license.\x0d\x0a\x20*\x20See\x20LICENSE\x20file\x20for\x20details.\x0d\x0a\x20*/\x0d\x0a\x0d\x0a//#ifdef\x20GL_OES_standard_derivatives\x0d\x0a//\x20\x20\x20\x20#extension\x20GL_OES_standard_derivatives\x20:\x20enable\x0d\x0a//#endif\x0d\x0a//\x0d\x0a//float\x20aastep\x20(float\x20threshold\x20,\x20float\x20value)\x0d\x0a//{\x0d\x0a//\x20\x20\x20\x20float\x20afwidth\x20=\x200.7\x20*\x20length\x20(\x20vec2\x20(\x20dFdx\x20(\x20value\x20),\x20dFdy\x20(\x20value\x20)));\x0d\x0a//\x20\x20\x20\x20return\x20smoothstep\x20(\x20threshold\x20-\x20afwidth\x20,\x20threshold\x20+\x20afwidth\x20,\x20value\x20);\x0d\x0a//}\x0d\x0a\x0d\x0a//\x20Permutation\x20polynomial:\x20(34x^2\x20+\x20x)\x20mod\x20289\x0d\x0avec3\x20_czm_permute289(vec3\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20mod((34.0\x20*\x20x\x20+\x201.0)\x20*\x20x,\x20289.0);\x0d\x0a}\x0d\x0a\x0d\x0a/**\x0d\x0a\x20*\x20DOC_TBA\x0d\x0a\x20*\x0d\x0a\x20*\x20Implemented\x20by\x20Stefan\x20Gustavson,\x20and\x20distributed\x20under\x20the\x20MIT\x20License.\x20\x20{@link\x20http://openglinsights.git.sourceforge.net/git/gitweb.cgi?p=openglinsights/openglinsights;a=tree;f=proceduraltextures}\x0d\x0a\x20*\x0d\x0a\x20*\x20@name\x20czm_cellular\x0d\x0a\x20*\x20@glslFunction\x0d\x0a\x20*\x0d\x0a\x20*\x20@see\x20Stefan\x20Gustavson\x27s\x20chapter,\x20<i>Procedural\x20Textures\x20in\x20GLSL</i>,\x20in\x20<a\x20href=\x22http://www.openglinsights.com/\x22>OpenGL\x20Insights</a>.\x0d\x0a\x20*/\x0d\x0avec2\x20czm_cellular(vec2\x20P)\x0d\x0a//\x20Cellular\x20noise,\x20returning\x20F1\x20and\x20F2\x20in\x20a\x20vec2.\x0d\x0a//\x20Standard\x203x3\x20search\x20window\x20for\x20good\x20F1\x20and\x20F2\x20values\x0d\x0a{\x0d\x0a#define\x20K\x200.142857142857\x20//\x201/7\x0d\x0a#define\x20Ko\x200.428571428571\x20//\x203/7\x0d\x0a#define\x20jitter\x201.0\x20//\x20Less\x20gives\x20more\x20regular\x20pattern\x0d\x0a\x20\x20\x20\x20vec2\x20Pi\x20=\x20mod(floor(P),\x20289.0);\x0d\x0a\x20\x20\x20\x20vec2\x20Pf\x20=\x20fract(P);\x0d\x0a\x20\x20\x20\x20vec3\x20oi\x20=\x20vec3(-1.0,\x200.0,\x201.0);\x0d\x0a\x20\x20\x20\x20vec3\x20of\x20=\x20vec3(-0.5,\x200.5,\x201.5);\x0d\x0a\x20\x20\x20\x20vec3\x20px\x20=\x20_czm_permute289(Pi.x\x20+\x20oi);\x0d\x0a\x20\x20\x20\x20vec3\x20p\x20=\x20_czm_permute289(px.x\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p11,\x20p12,\x20p13\x0d\x0a\x20\x20\x20\x20vec3\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20vec3\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20vec3\x20dx\x20=\x20Pf.x\x20+\x200.5\x20+\x20jitter*ox;\x0d\x0a\x20\x20\x20\x20vec3\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0d\x0a\x20\x20\x20\x20vec3\x20d1\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d11,\x20d12\x20and\x20d13,\x20squared\x0d\x0a\x20\x20\x20\x20p\x20=\x20_czm_permute289(px.y\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p21,\x20p22,\x20p23\x0d\x0a\x20\x20\x20\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20dx\x20=\x20Pf.x\x20-\x200.5\x20+\x20jitter*ox;\x0d\x0a\x20\x20\x20\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0d\x0a\x20\x20\x20\x20vec3\x20d2\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d21,\x20d22\x20and\x20d23,\x20squared\x0d\x0a\x20\x20\x20\x20p\x20=\x20_czm_permute289(px.z\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p31,\x20p32,\x20p33\x0d\x0a\x20\x20\x20\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20dx\x20=\x20Pf.x\x20-\x201.5\x20+\x20jitter*ox;\x0d\x0a\x20\x20\x20\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0d\x0a\x20\x20\x20\x20vec3\x20d3\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d31,\x20d32\x20and\x20d33,\x20squared\x0d\x0a\x20\x20\x20\x20//\x20Sort\x20out\x20the\x20two\x20smallest\x20distances\x20(F1,\x20F2)\x0d\x0a\x20\x20\x20\x20vec3\x20d1a\x20=\x20min(d1,\x20d2);\x0d\x0a\x20\x20\x20\x20d2\x20=\x20max(d1,\x20d2);\x20//\x20Swap\x20to\x20keep\x20candidates\x20for\x20F2\x0d\x0a\x20\x20\x20\x20d2\x20=\x20min(d2,\x20d3);\x20//\x20neither\x20F1\x20nor\x20F2\x20are\x20now\x20in\x20d3\x0d\x0a\x20\x20\x20\x20d1\x20=\x20min(d1a,\x20d2);\x20//\x20F1\x20is\x20now\x20in\x20d1\x0d\x0a\x20\x20\x20\x20d2\x20=\x20max(d1a,\x20d2);\x20//\x20Swap\x20to\x20keep\x20candidates\x20for\x20F2\x0d\x0a\x20\x20\x20\x20d1.xy\x20=\x20(d1.x\x20<\x20d1.y)\x20?\x20d1.xy\x20:\x20d1.yx;\x20//\x20Swap\x20if\x20smaller\x0d\x0a\x20\x20\x20\x20d1.xz\x20=\x20(d1.x\x20<\x20d1.z)\x20?\x20d1.xz\x20:\x20d1.zx;\x20//\x20F1\x20is\x20in\x20d1.x\x0d\x0a\x20\x20\x20\x20d1.yz\x20=\x20min(d1.yz,\x20d2.yz);\x20//\x20F2\x20is\x20now\x20not\x20in\x20d2.yz\x0d\x0a\x20\x20\x20\x20d1.y\x20=\x20min(d1.y,\x20d1.z);\x20//\x20nor\x20in\x20\x20d1.z\x0d\x0a\x20\x20\x20\x20d1.y\x20=\x20min(d1.y,\x20d2.x);\x20//\x20F2\x20is\x20in\x20d1.y,\x20we\x27re\x20done.\x0d\x0a\x20\x20\x20\x20return\x20sqrt(d1.xy);\x0d\x0a}\x0d\x0a','showSun','ScreenSpaceEventType','_mountEntity','getElementById','parseDom','orientation','subtract','getQBSplinePoints','fire','shouldAnimate','widthRadii','addTo',');\x0a\x20\x20\x20\x20','reverse','baseColor','POSITIVE_INFINITY','parsePolygonCoordToArray','onTick','_scale','defaultBlur','_anchors','parsePosition','darkWoodColor','transformWGS84ToMercator','_bid','_value','_topRadius','_overlayLayer','Cesium3DTileFeature','silhouetteAlpha','unit','_getVector','_semiMinorAxis','uniform\x20sampler2D\x20colorTexture;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0auniform\x20float\x20speed;\x0d\x0a\x0d\x0afloat\x20snow(vec2\x20uv,float\x20scale){\x0d\x0a\x20\x20float\x20time\x20=\x20czm_frameNumber\x20*\x20speed\x20/\x201000.0\x20;\x0d\x0a\x20\x20float\x20w=smoothstep(1.,0.,-uv.y*(scale/10.));\x0d\x0a\x20\x20if(w<.1)return\x200.;\x0d\x0a\x20\x20uv+=time/scale;\x0d\x0a\x20\x20uv.y+=time*2./scale;\x0d\x0a\x20\x20uv.x+=sin(uv.y+time*.5)/scale;\x0d\x0a\x20\x20uv*=scale;\x0d\x0a\x20\x20vec2\x20s=floor(uv),f=fract(uv),p;\x0d\x0a\x20\x20float\x20k=3.,d;\x0d\x0a\x20\x20p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;\x0d\x0a\x20\x20d=length(p);\x0d\x0a\x20\x20k=min(d,k);\x0d\x0a\x20\x20k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\x0d\x0a\x20\x20return\x20k*w;\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(){\x0d\x0a\x20\x20vec2\x20resolution\x20=\x20czm_viewport.zw;\x0d\x0a\x20\x20vec2\x20uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\x0d\x0a\x20\x20vec3\x20finalColor=vec3(0);\x0d\x0a\x20\x20float\x20c\x20=\x200.0;\x0d\x0a\x20\x20c+=snow(uv,10.);\x0d\x0a\x20\x20c+=snow(uv,8.);\x0d\x0a\x20\x20c+=snow(uv,6.);\x0d\x0a\x20\x20c+=snow(uv,5.);\x0d\x0a\x20\x20finalColor=(vec3(c));\x0d\x0a\x20\x20gl_FragColor\x20=\x20mix(texture2D(colorTexture,\x20v_textureCoordinates),\x20vec4(finalColor,1),\x200.3);\x0d\x0a}\x0d\x0a','heat','scale3d(','Circle','exitFullscreen','_enable','_drawWorker','_clusterEventHandler','_completeCallback','geodeticSurfaceNormal','semiMajorAxis','wholeDistance','zoomToPosition','BOTTOM','uniform\x20vec4\x20cementColor;\x0d\x0auniform\x20float\x20grainScale;\x0d\x0auniform\x20float\x20roughness;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20float\x20noise\x20=\x20czm_snoise(materialInput.st\x20/\x20grainScale);\x0d\x0a\x20\x20noise\x20=\x20pow(noise,\x205.0)\x20*\x20roughness;\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20cementColor;\x0d\x0a\x20\x20color.rgb\x20+=\x20noise;\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','GoogleEarthEnterpriseTerrainProvider','LabelStyle','dc-map-switch','cluster','selectedTerrain','px,','utils','DoubleArrow','Transforms','font_family','_orbitMouseUpFunction','createBrightnessStage','VelocityOrientationProperty','uniform\x20samplerCube\x20cubeMap;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec3\x20normalWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20material.normal);\x0d\x0a\x20\x20vec3\x20positionWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20materialInput.positionToEyeEC);\x0d\x0a\x20\x20vec3\x20reflectedWC\x20=\x20reflect(positionWC,\x20normalWC);\x0d\x0a\x20\x20material.diffuse\x20=\x20textureCube(cubeMap,\x20reflectedWC).channels;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','ADDED','opacity','moon','fromBytes','totalLable','stringify','maximumHeights','position','billboard','_direction','shadowCanvas','width','frontFaceAlpha','near','majorDragger','COORD','PRE_RENDER','object','_editWorker','createPropertyDescriptor','xField','attribute','SINGLE_TILE','Material','_setInputAction','</span>\x0a\x20\x20\x20\x20\x20\x20<span>视高:','enableLighting','entity','setBounds','TRACKED','map','_valueField','TRANSPARENT','LineString','atan2','graphic','></div></div><div\x20class=\x27leaflet-popup-tip-container\x27><div\x20class=\x27leaflet-popup-tip\x27></div></div></div>','rectangle','abs','数字视觉','_mapOffset','rotation_marker','_start','screenSpaceEventHandler','dot','range','setProperty','effectEvent','baseLayers','Super\x20expression\x20must\x20either\x20be\x20null\x20or\x20a\x20function','enable','material','appendChild','callback','createArcgisTerrain','minCanvasSize','_length','lng','sqrt','setOption','setValue','_token','高度差:','http://t{s}.tianditu.gov.cn/{layer}_c/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={TileMatrix}&layer={layer}&style={style}&tilerow={TileRow}&tilecol={TileCol}&tilematrixset={TileMatrixSet}&format=tiles&tk={key}','BrickType','border_width','distance','_viewerOption','semiMinorAxis','getMidPosition','geometry','_rotateInitialCursorAngle','blue','TimeIntervalCollection','bounds','_transformWGS84ToHeatmap','https://www.dvgis.cn','_postUpdateRemoveCallback','_icrf','defaultXField','getMinimumHeights','_tileVisibleHandler','showSuperHeight','ORANGE','editor','_mouseRightClickHandler','dragIcon.png','_definitionChanged','polyline','getFactorial','setEndPoints','_creditContainer','splitDirection','getData','scale','dataSources','type','/test/static/html/ysyDemo/js','_lat','font','createWMSImageryLayer','hide','style','_pickedAnchor','getPickRay','enableZoom','_onExtremaChange','rgb(0,255,0)','overlayId','_max','Polyline','childNodes','rad);\x0a\x20\x20\x20\x20\x20\x20','undergroundMode','onclick','splice','左击选择点位','data-index','_colorize','_rotateAmount','globalAlpha','transformWGS84ArrayToCartesianArray','directionWC','_rotateInitialCameraAngle','img','ready','VerticalOrigin','toRadians','MOUSE_OUT','_labelStyle','{s}','FineArrow','createVideoWindowAll','getEvent','shadowCtx','tileCacheSize','PrimitiveCollection','cylinder','pop','heightReference','videoId','fromRadiansArray','getEffectType','outline','parse','_isMoving','circle_scan','createDrawPolylineHandler','PolylineTrail','WGS84','WebMercatorProjection','showAddPointLength','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2217px\x22\x20height=\x2217px\x22\x20viewBox=\x220\x200\x2017\x2017\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x2043.2\x20(39069)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>compass-inner</title>\x0a\x20\x20\x20\x20<desc>Created\x20with\x20Sketch.</desc>\x0a\x20\x20\x20\x20<defs></defs>\x0a\x20\x20\x20\x20<g\x20id=\x22Page-1\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<g\x20id=\x22compass-inner\x22\x20fill-rule=\x22nonzero\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8.5,16.5\x20C4.081722,16.5\x200.5,12.918278\x200.5,8.5\x20C0.5,4.081722\x204.081722,0.5\x208.5,0.5\x20C12.918278,0.5\x2016.5,4.081722\x2016.5,8.5\x20C16.5,12.918278\x2012.918278,16.5\x208.5,16.5\x20Z\x20M8.5,15.5\x20C12.3659932,15.5\x2015.5,12.3659932\x2015.5,8.5\x20C15.5,4.63400675\x2012.3659932,1.5\x208.5,1.5\x20C4.63400675,1.5\x201.5,4.63400675\x201.5,8.5\x20C1.5,12.3659932\x204.63400675,15.5\x208.5,15.5\x20Z\x22\x20id=\x22Oval-96\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M9.92599835,7.09066832\x20C12.7122872,9.87695712\x2014.3709388,12.5452228\x2013.4497471,13.4664145\x20C12.5285555,14.3876061\x209.86028979,12.7289545\x207.074001,9.94266568\x20C4.2877122,7.15637688\x202.62906055,4.48811119\x203.55025221,3.56691953\x20C4.47144386,2.64572788\x207.13970955,4.30437952\x209.92599835,7.09066832\x20Z\x20M9.21889157,7.7977751\x20C6.92836458,5.50724811\x204.52075769,4.01062761\x204.25735899,4.27402631\x20C3.99396029,4.53742501\x205.49058078,6.9450319\x207.78110778,9.2355589\x20C10.0716348,11.5260859\x2012.4792417,13.0227064\x2012.7426404,12.7593077\x20C13.0060391,12.495909\x2011.5094186,10.0883021\x209.21889157,7.7977751\x20Z\x22\x20id=\x22Oval-96-Copy-2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M9.92599835,9.94266568\x20C7.13970955,12.7289545\x204.47144386,14.3876061\x203.55025221,13.4664145\x20C2.62906055,12.5452228\x204.2877122,9.87695712\x207.074001,7.09066832\x20C9.86028979,4.30437952\x2012.5285555,2.64572788\x2013.4497471,3.56691953\x20C14.3709388,4.48811119\x2012.7122872,7.15637688\x209.92599835,9.94266568\x20Z\x20M9.21889157,9.2355589\x20C11.5094186,6.9450319\x2013.0060391,4.53742501\x2012.7426404,4.27402631\x20C12.4792417,4.01062761\x2010.0716348,5.50724811\x207.78110778,7.7977751\x20C5.49058078,10.0883021\x203.99396029,12.495909\x204.25735899,12.7593077\x20C4.52075769,13.0227064\x206.92836458,11.5260859\x209.21889157,9.2355589\x20Z\x22\x20id=\x22Oval-96-Copy-3\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M15.1464466,1.1464466\x20L14.3453364,1.94755684\x20L13.9608692,2.33202401\x20L14.667976,3.03913077\x20L15.0524431,2.65466362\x20L15.8535534,1.8535534\x20L15.1464466,1.1464466\x20Z\x20M2.29760014,13.995293\x20L1.85311902,14.4397742\x20L1.004311,15.2885822\x20L1.71141776,15.995689\x20L2.56022581,15.146881\x20L3.00470698,14.7023998\x20L2.29760014,13.995293\x20Z\x22\x20id=\x22Line\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-432\x22\x20cx=\x2216\x22\x20cy=\x221\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-432-Copy\x22\x20cx=\x221\x22\x20cy=\x2216\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</g>\x0a</svg>\x0a','getCubicValue','COLUMBUS_VIEW','icon_size','geojson','getClass','_options','TyeDyeType','test','percentageChanged',',1)',']类型参数有误','map-item\x20active','getCameraView','Cartographic','initialized','startPosition','renderpartial','draggerHandler','Point','_onRemove','http://mt{s}.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Galile','http://webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}','REMA','rotateUp','dispatchAction','look','_mouseUpHandle','_startRotate','tileWidth\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','getPropertyNames','area','_maxOpacity','unproject','_layer','PolylineFlowType','addPosition','SingleTileImageryProvider','POST_UPDATE','normalizeJsonData','morphToColumbusView','limitCameraToGround','selectedImagery','_api','onExtremaChange','_radius','getAzimuth','<div\x20class=\x27leaflet-popup\x27><a\x20class=\x27leaflet-popup-close-button\x27\x20href=\x27#\x27>×</a><div\x20class=\x27leaflet-popup-content-wrapper\x27><div\x20class=\x27leaflet-popup-content\x27\x20id=','_attr','getWidgetType','_onActive','defaultRenderer','curve','getPointOnLine','_anchorLayer','tilingScheme','RimLightingMaterialProperty','INITIALIZED','_maximumLevel','size','angleBetween','ErosionType','direction','GREEN','_activePath','PlotUtil','getLayers','unbindEvent','webkitExitFullscreen','(\x5cs|$)','_compassRectangle','DeveloperError','name','globe','TieDye','forEach','dc-chart','wall','getValue','_onAdd','HorizontalOrigin','tailed_attack_arrow','defineProperty','px,\x200)','max','layer_group','radius','Cesium','RIGHT_DOWN','windowPosition','rotateLeft','cartesianToCartographic','Cannot\x20call\x20a\x20class\x20as\x20a\x20function','backFaceAlpha','swallowTailFactor','TailedAttackArrow','Ellipsoid','ProviderViewModel','animationSpeed','north','attr','RoamingController:\x20path\x20does\x20not\x20added\x20','moveEnd','REMOVED','toDataURL','_removeLayer','_prepareDefaultMenu','ArcGisMapServerImageryProvider','TDT','ceil','createSvg','_rightClickHandler','_fogByDistance','getOwnPropertySymbols','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2219px\x22\x20height=\x2228px\x22\x20viewBox=\x220\x200\x2019\x2028\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22>\x0a\x20\x20\x20\x20<path\x20d=\x22M0.6551724,2.3448276\x20L0.6551724,25.6551724\x20C0.6551724,26.6454761\x201.4579722,27.4482759\x202.4482759,27.4482759\x20C3.4385796,27.4482759\x204.2413793,26.6454761\x204.2413793,25.6551724\x20L4.2413793,2.3448276\x20C4.2413793,1.3545239\x203.4385796,0.5517241\x202.4482759,0.5517241\x20C1.4579722,0.5517241\x200.6551724,1.3545239\x200.6551724,2.3448276\x20L0.6551724,2.3448276\x20Z\x20M7.6551724,2.3448276\x20L7.6551724,25.6551724\x20C7.6551724,26.6454761\x208.4579722,27.4482759\x209.4482759,27.4482759\x20C10.4385796,27.4482759\x2011.2413793,26.6454761\x2011.2413793,25.6551724\x20L11.2413793,2.3448276\x20C11.2413793,1.3545239\x2010.4385796,0.5517241\x209.4482759,0.5517241\x20C8.4579722,0.5517241\x207.6551724,1.3545239\x207.6551724,2.3448276\x20L7.6551724,2.3448276\x20Z\x20M14.6551724,2.3448276\x20L14.6551724,25.6551724\x20C14.6551724,26.6454761\x2015.4579722,27.4482759\x2016.4482759,27.4482759\x20C17.4385796,27.4482759\x2018.2413793,26.6454761\x2018.2413793,25.6551724\x20L18.2413793,2.3448276\x20C18.2413793,1.3545239\x2017.4385796,0.5517241\x2016.4482759,0.5517241\x20C15.4579722,0.5517241\x2014.6551724,1.3545239\x2014.6551724,2.3448276\x20L14.6551724,2.3448276\x20Z\x22\x20id=\x22splitter\x22></path>\x0a</svg>\x0a','modelMatrix','MORPH_COMPLETE','getHDistance','点击锚点移动,右击结束编辑','pow','_type','headHeightFactor','mozCancelFullScreen','_rotation_marker','contrast','WebMapServiceImageryProvider','postRender','CENTER','headingPitchRollQuaternion','perPositionHeight','\x0a\x20\x20\x20\x20\x20\x20\x20background:url(','clusterEvent','_heat','transformMercatorToWGS84','CIRCLE','onmousedown','replace','href','closePath','getDiagonalPositions','getDataURL','createEditSelectHandler','IDENTITY','getOverlay','class','ADD','_chart','_specularMapSubscription','_baseWaterColor','measureHeight','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2253px\x22\x20height=\x2253px\x22\x20viewBox=\x220\x200\x2053\x2053\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>compass-rotation-marker</title>\x0a\x20\x20\x20\x20<desc>Created\x20with\x20Sketch.</desc>\x0a\x20\x20\x20\x20<defs></defs>\x0a\x20\x20\x20\x20<g\x20id=\x22Page-1\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill=\x22none\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<g\x20id=\x22compass-rotation-marker\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M52.4399986,26.2199993\x20C52.4399986,11.7390936\x2040.7009051,0\x2026.2199993,0\x20C11.7390936,0\x200,11.7390936\x200,26.2199993\x20C0,40.7009051\x2011.7390936,52.4399986\x2026.2199993,52.4399986\x20C40.7009051,52.4399986\x2052.4399986,40.7009051\x2052.4399986,26.2199993\x20Z\x22\x20id=\x22rotator\x22\x20stroke-opacity=\x220.135841259\x22\x20stroke=\x22#E2A549\x22\x20stroke-width=\x229\x22\x20opacity=\x220.201434235\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M0,26.2199993\x20C0,11.7390936\x2011.7390936,0\x2026.2199993,0\x20L26.2199993,9\x20C16.7096563,9\x209,16.7096563\x209,26.2199993\x22\x20id=\x22Shape\x22\x20opacity=\x220.634561567\x22\x20fill=\x22#4990E2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</g>\x0a</svg>\x0a','px\x20','WebMercatorTilingScheme','indexOf','_clickHandler','cStore','_addLayer','speed','_setClockOption','setModel','domId','_yField','draggers','toString','magnitude','_postRenderHandler','createElement','PINCH_START','_viewMode','RECTANGLE','url','each','toStringTag','load','changeDrawing','KmlLayer:\x20the\x20url\x20is\x20empty','flyToPosition','index','headAngle','minMaxPoints','defaultView','polylineVolume','clamp','ctx','isClockWise','color:#0078A8;font-size:12px','morphComplete','removeLayer','push','\x27\x20not\x20found.\x20Maybe\x20it\x20was\x20not\x20registered.','_renderBoundaries','POLYLINE','_updateGradient','viewOption','_graphics','setWrapper','0\x200\x20','transformCartesianArrayToWGS84Array','_speedSubscription','multiply','rotateRight','fromCartesian','visible','{z}','roamingEvent','rgb','clustering','JulianDate','mortarColor','\x0a\x20\x20\x20\x20\x20\x20<span>经度:','empty','morphTo2D','hawkeyeMap','zeroToTwoPi','_tileWidth','_updateWindowCoord','Blob','_updateStyle','\x20米</span>\x0a\x20\x20\x20\x20','then','addLayerGroup','createDrawWallHandler','LinearApproximation','POINT','equals','root','getArcPoints','scene','latitude','_colorSubscription','_dcContainer','tabIndex','_alt','_materialCache','_EZUIKit','rad);\x0a\x20\x20\x20\x20\x20\x20-webkit-transform\x20:\x20rotate(-','currentTime','_controller','removeClass','key','getBezierPoints','_adjustOrthographicFrustum','CementType','lightColor','addMap','Ray','_icon','_mountPosition','RoamingController:\x20the\x20time\x20range\x20invalid\x20','mouseout','addSamples','rgb(0,0,255)','now','POLYGON','_plane','createImageryLayer','CAMERA_MOVE_END','uniform\x20sampler2D\x20colorTexture;\x0d\x0auniform\x20sampler2D\x20depthTexture;\x0d\x0auniform\x20vec4\x20fogByDistance;\x0d\x0auniform\x20vec4\x20fogColor;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0a\x0d\x0afloat\x20getDistance(sampler2D\x20depthTexture,\x20vec2\x20texCoords){\x0d\x0a\x20\x20float\x20depth\x20=\x20czm_unpackDepth(texture2D(depthTexture,\x20texCoords));\x0d\x0a\x20\x20if\x20(depth\x20==\x200.0)\x20{\x0d\x0a\x20\x20\x20\x20return\x20czm_infinity;\x0d\x0a\x20\x20}\x0d\x0a\x20\x20vec4\x20eyeCoordinate\x20=\x20czm_windowToEyeCoordinates(gl_FragCoord.xy,\x20depth);\x0d\x0a\x20\x20return\x20-eyeCoordinate.z\x20/\x20eyeCoordinate.w;\x0d\x0a}\x0d\x0a\x0d\x0a\x0d\x0afloat\x20interpolateByDistance(vec4\x20nearFarScalar,\x20float\x20distance){\x0d\x0a\x20\x20float\x20startDistance\x20=\x20nearFarScalar.x;\x0d\x0a\x20\x20float\x20startValue\x20=\x20nearFarScalar.y;\x0d\x0a\x20\x20float\x20endDistance\x20=\x20nearFarScalar.z;\x0d\x0a\x20\x20float\x20endValue\x20=\x20nearFarScalar.w;\x0d\x0a\x20\x20float\x20t\x20=\x20clamp((distance\x20-\x20startDistance)\x20/\x20(endDistance\x20-\x20startDistance),\x200.0,\x201.0);\x0d\x0a\x20\x20return\x20mix(startValue,\x20endValue,\x20t);\x0d\x0a}\x0d\x0a\x0d\x0avec4\x20alphaBlend(vec4\x20sourceColor,\x20vec4\x20destinationColor){\x0d\x0a\x20\x20return\x20sourceColor\x20*\x20vec4(sourceColor.aaa,\x201.0)\x20+\x20destinationColor\x20*\x20(1.0\x20-\x20sourceColor.a);\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(void){\x0d\x0a\x20\x20float\x20distance\x20=\x20getDistance(depthTexture,\x20v_textureCoordinates);\x0d\x0a\x20\x20vec4\x20sceneColor\x20=\x20texture2D(colorTexture,\x20v_textureCoordinates);\x0d\x0a\x20\x20float\x20blendAmount\x20=\x20interpolateByDistance(fogByDistance,\x20distance);\x0d\x0a\x20\x20vec4\x20finalFogColor\x20=\x20vec4(fogColor.rgb,\x20fogColor.a\x20*\x20blendAmount);\x0d\x0a\x20\x20gl_FragColor\x20=\x20alphaBlend(finalFogColor,\x20sceneColor);\x0d\x0a}\x0d\x0a','#ffff00','createNightVisionStage','xLable','msExitFullscreen','RIGHT_DRAG','spacing','symbol','fromCoordArray','PRE_UPDATE','normalMap','setPrototypeOf','FacetType','_mountAnchor','_config','fog','_shape','_effectCache','setBillboard','svg-path','off','_sceneEvent','withAlpha','uniforms','mixin','positionPopUp','amd','_speed','DB_CLICK','options','enumerable','amplitude','</span>\x0a\x20\x20\x20\x20\x20\x20<span>纬度:','terrain','GrassType','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACDElEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSscO/l7x3ff/378fz9n++Hr//4fezmz+9ffvz7/eHr33eP3/6Z8P//fwF0fSguevv5X6UwL1PbwoNfGRrWfGJ48PoPiuUOWuwMDSH8DHryrB8FuZkcGBgYLsDk4AZ9/Pavg5mJscS24SXzhQe/8XmXocCLl6Etgv8XJxujOcwwmEEOX37830OMITCQYM/NMD1F8CcHK6MEAwPDByaQ+Ofv/9fUrvpItCEgsODgV4aTt3+xP3n3twHEBxlk8On7P/4J2z4TbQgMNKz5yCDCy5QBNujJu78Ja05+YyHZFAYGhgPXfjJ8+PoPFDYGTEyMDCYPXv8lxxwwuPnsDwcorTGxsTDyoEczOYDp4es/Fwzk2cg2gI2F8QeIZjJWYjtgoMBKliEC3EwMlmpsIK9dAMXaBn8TTgYFUdLDu8CTl+H2iz/nYenow8uPf+cvyBQiyRCQxcU+vH9VJViKGKDpiEGcn7lIW5b1MbGGgby0qVTk75vPf1eCUgFIDDnTCrz5/O/S1ce/ZROmv8PIsDAAyrhLcoT/MDIybJcSZPaDiaOXRwIvP/7tE+dnTtx45js4wV148Ass4aDFwRBkxvlXVZLlz4ev/4okBJinIWvEVbApvP38L/LT93/2vJxMoEzJ8OXHv6sKoiy7QdkMQzUDAwMAuq71NKWtMMgAAAAASUVORK5CYII=','_renderer','defaultValueField','#FFFF00','screenSpaceCameraController','EllipsoidTerrainProvider','\x20平方公里','star','eachComponent','_state','granularity','onChangeEditing','isConstant','labelStyle','FresnelType','hasClass','xmin','offsetWidth','RoamingController:\x20the\x20time\x20invalid\x20','GLMapRoam','top','fillRect','AsphaltType','renderall','setInputAction','单击选择点位,右击结束','loadImage','availability','px;\x0a\x20\x20\x20\x20margin:0;\x0a\x20\x20\x20\x20display:none','uniform\x20vec4\x20grassColor;\x0d\x0auniform\x20vec4\x20dirtColor;\x0d\x0auniform\x20float\x20patchiness;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20float\x20noise1\x20=\x20(czm_snoise(st\x20*\x20patchiness\x20*\x201.0))\x20*\x201.0;\x0d\x0a\x20\x20float\x20noise2\x20=\x20(czm_snoise(st\x20*\x20patchiness\x20*\x202.0))\x20*\x200.5;\x0d\x0a\x20\x20float\x20noise3\x20=\x20(czm_snoise(st\x20*\x20patchiness\x20*\x204.0))\x20*\x200.25;\x0d\x0a\x20\x20float\x20noise\x20=\x20sin(noise1\x20+\x20noise2\x20+\x20noise3)\x20*\x200.1;\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(grassColor,\x20dirtColor,\x20noise);\x0d\x0a\x0d\x0a\x20\x20//Make\x20thatch\x20patterns\x0d\x0a\x20\x20float\x20verticalNoise\x20=\x20czm_snoise(vec2(st.x\x20*\x20100.0,\x20st.y\x20*\x2020.0))\x20*\x200.02;\x0d\x0a\x20\x20float\x20horizontalNoise\x20=\x20czm_snoise(vec2(st.x\x20*\x2020.0,\x20st.y\x20*\x20100.0))\x20*\x200.02;\x0d\x0a\x20\x20float\x20stripeNoise\x20=\x20min(verticalNoise,\x20horizontalNoise);\x0d\x0a\x0d\x0a\x20\x20color.rgb\x20+=\x20stripeNoise;\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','HeadingPitchRoll','_sigma','removed','outlineWidth','cementColor','_addEffect','far','night_vision','GATHERING_PLACE','concat','toLocaleUpperCase','transformCartesianToWGS84','\x0a\x20\x20\x20\x20width:','CircleFadeType','customClass','tooltip','initHeightDraggers','corridor','radar_scan','point','toCssColorString','onStopEditing','_brightness','Cartesian2','Cartesian4','snow','round','getCenter','call','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBkY/kBoplYjVQPsOgrkWeIADcDq7kmyGsXQLG2gd3XkoFZXpxkg7hzAhn+3nl6HpaOPvx79X4+35xikgwBWcxVEPSXWUW6iAGajhiYxASLWLTkHxNrGMhLAmsb/v57+2klAwPDAbAYUjEi8O/tp0t/rj2U/ZTSy4ArJtns9Bj4F5T9YWBk2M4kKewHNxytPBL49+p9H5OYYOLPzcfBCQ6WbUAGsAdY/2VWkfrz/+PXIiZxwWkorsRRsCn8e/cp8v+nb/aMvFygTMnw/8v3q8zy4rsZGBgWYKhmYGAAAN6EGE9igaT+AAAAAElFTkSuQmCC','visibility','zoomEventTypes','anchorLayer','xyz','_createPolyline','gyro','radi','_lng','glowOnly','BLACK','moveBackward','addOverlay','addMaterial','headTailFactor','getRoamTransform','Reflection','toArray','compass','getValueOrUndefined','tdt','icon_center','_videoId','Billboard:\x20the\x20size\x20invalid','getTileCredits','createElementNS','getIntersectPoint','layerGroupEvent','BoundingRect','display','RED','Invalid\x20GeoJSON\x20object.','_getMouseInfo','LEFT_UP','configurable','cursor','_widthSubscription','GEOMETRY','random','_modelUrl','overlay','UrlTemplateImageryProvider','dc-slider','amap','log','click','startDraw','createWMTSImageryLayer','shape','czm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec3\x20normalWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20material.normal);\x0d\x0a\x20\x20vec3\x20positionWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20materialInput.positionToEyeEC);\x0d\x0a\x20\x20float\x20cosAngIncidence\x20=\x20max(dot(normalWC,\x20positionWC),\x200.0);\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20mix(reflection.diffuse,\x20refraction.diffuse,\x20cosAngIncidence);\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','dc-attribution','lonLatToCartesian','setMapOffset','pause','createTwoPointsModelHandler','flyToBoundingSphere','_minOpacity','entities','_map','_setView','WaterMaterialProperty','removeEffect','CircleWaveMaterialProperty','gathering_place','onDrag','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x22162px\x22\x20height=\x22162px\x22\x20viewBox=\x220\x200\x20162\x20162\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x2043.2\x20(39069)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>compass-outer</title>\x0a\x20\x20\x20\x20<desc>Created\x20with\x20Sketch.</desc>\x0a\x20\x20\x20\x20<defs></defs>\x0a\x20\x20\x20\x20<g\x20id=\x22Page-1\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<g\x20id=\x22compass-outer\x22\x20fill-rule=\x22nonzero\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M80.8410544,161.682109\x20C36.1937731,161.682109\x200,125.488336\x200,80.8410544\x20C0,36.1937731\x2036.1937731,0\x2080.8410544,0\x20C125.488336,0\x20161.682109,36.1937731\x20161.682109,80.8410544\x20C161.682109,125.488336\x20125.488336,161.682109\x2080.8410544,161.682109\x20Z\x20M81.1836011,134.620909\x20C110.696211,134.620909\x20134.620909,110.696211\x20134.620909,81.1836011\x20C134.620909,51.6709916\x20110.696211,27.7462941\x2081.1836011,27.7462941\x20C51.6709916,27.7462941\x2027.7462941,51.6709916\x2027.7462941,81.1836011\x20C27.7462941,110.696211\x2051.6709916,134.620909\x2081.1836011,134.620909\x20Z\x22\x20id=\x22Oval-108\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-74\x22\x20fill=\x22#FFFFFF\x22\x20cx=\x22129.493683\x22\x20cy=\x22127.952092\x22\x20r=\x221.54159147\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-74-Copy-3\x22\x20fill=\x22#FFFFFF\x22\x20cx=\x22129.493683\x22\x20cy=\x2235.4566038\x22\x20r=\x221.54159147\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-74-Copy-5\x22\x20fill=\x22#FFFFFF\x22\x20cx=\x2230.8318294\x22\x20cy=\x22127.952092\x22\x20r=\x221.54159147\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-74-Copy-4\x22\x20fill=\x22#FFFFFF\x22\x20cx=\x2230.8318294\x22\x20cy=\x2235.4566038\x22\x20r=\x221.54159147\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polygon\x20id=\x22N\x22\x20fill=\x22#FFFFFF\x22\x20points=\x2284.9318072\x2023.1238721\x2084.9318072\x2013.1321362\x2082.5623385\x2013.1321362\x2082.5623385\x2019.2984646\x2077.951866\x2013.1321362\x2075.7108625\x2013.1321362\x2075.7108625\x2023.1238721\x2078.0946053\x2023.1238721\x2078.0946053\x2016.9718176\x2082.6908037\x2023.1238721\x22></polygon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polygon\x20id=\x22Line\x22\x20fill=\x22#FFFFFF\x22\x20points=\x22143.368007\x2082.1093476\x20152.617555\x2082.1093476\x20152.617555\x2081.2993476\x20143.368007\x2081.2993476\x22></polygon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polygon\x20id=\x22Line-Copy-8\x22\x20fill=\x22#FFFFFF\x22\x20points=\x229.24954884\x2082.1093476\x2018.4990976\x2082.1093476\x2018.4990976\x2081.2993476\x209.24954884\x2081.2993476\x22></polygon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polygon\x20id=\x22Line\x22\x20fill=\x22#FFFFFF\x22\x20points=\x2281.2993476\x20143.368007\x2081.2993476\x20152.617555\x2082.1093476\x20152.617555\x2082.1093476\x20143.368007\x22></polygon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</g>\x0a</svg>\x0a','MORPHING','definitionChanged','destroyDrawHandler','map_switch','http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46','attribute2Entity','installed','html','_store','pickEllipsoid','getExtent','ImageryProvider','lonLatsToCartesians','MOUSE_MOVE','addData','_layerGroupCache','uuid','_createDrawWorker','wgs84ToWindowCoordinates','transform','positionCartographic','getNormal','_url','tailWidthFactor','ImageMaterialProperty','init','_orbitTickFunction','_getArrowBodyPoints','{labelStyle}','_reset','secondsDifference','createGoogleImageryLayer','Fresnel','_setGlobeOption','_plot','_normalMap','image','bindEvent','ymax','_cameraHandler','coordinateSystem','defaultMaxOpacity','_viewMatrix','extrudedHeight','formatNum','setVLine','unpack','Entity','dragger','plugins','_option','alpha','tileWidth','contextMenu','label','overlayLayer','fromCartesianArray','uniform\x20vec4\x20color;\x0d\x0auniform\x20float\x20speed;\x0d\x0auniform\x20float\x20count;\x0d\x0auniform\x20float\x20gradient;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x0d\x0a{\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20material.diffuse\x20=\x201.5\x20*\x20color.rgb;\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20vec3\x20str\x20=\x20materialInput.str;\x0d\x0a\x20\x20float\x20dis\x20=\x20distance(st,\x20vec2(0.5,\x200.5));\x0d\x0a\x20\x20float\x20per\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0\x20);\x0d\x0a\x20\x20if(abs(str.z)>0.001){\x0d\x0a\x20\x20\x20\x20discard;\x0d\x0a\x20\x20}\x0d\x0a\x20\x20if(dis\x20>0.5){\x0d\x0a\x20\x20\x20\x20discard;\x0d\x0a\x20\x20}else\x20{\x0d\x0a\x20\x20\x20\x20float\x20perDis\x20=\x200.5\x20/\x20count;\x0d\x0a\x20\x20\x20\x20float\x20disNum;\x0d\x0a\x20\x20\x20\x20float\x20bl\x20=\x20.0;\x0d\x0a\x20\x20\x20\x20for(int\x20i=0;i<=10;i++){\x0d\x0a\x20\x20\x20\x20\x20\x20if(float(i)<=count){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20disNum\x20=\x20perDis*float(i)\x20-\x20dis\x20+\x20per/count;\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(disNum>0.0){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(disNum<perDis){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bl\x20=\x201.0-disNum/perDis;\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}else\x20if(disNum-perDis<perDis){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bl\x20=\x201.0\x20-\x20abs(1.0-disNum/perDis);\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20material.alpha\x20=\x20pow(bl,gradient);\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20\x20\x20}\x0d\x0a\x20\x20}\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a\x0d\x0a','getStyle','fromRadians','_renderRemoveCallback','normalizeBusinessData','Viewer','_onRelease','iterator','normal','PolylineEmissionType','_createEditWorker','javascript:void(0)','northwest','PolylineEmission','ReflectionType','addSeconds','_arrLables','outlineOpacity','lightWoodColor','disableDepthTestDistance','_stopTime','DISABLED','Namespace','removePath','MOUSE_OVER','div-icon','AZURE','__mapOffset','pitch','FILL','_initEntity','mid','createUrlTerrain','lastPointTemporary','\x20平方米','firstChild','asin','neckAngle','TAILED_ATTACK_ARROW','pointerEvents','flyHome','plan','CTRL','showPath','constructor','ConstantProperty','_hasClone','_getTargetInfo','_removeEffect','LEFT_CLICK','defineProperties','PROPERTIES','DefaultImageId','out-ring-bg','_isDragger','backgroundColor','_mountMap','preRender','data','toLocaleLowerCase','hierarchy','changeMouseMode','configure','cross','_rotate','MIDDLE_DRAG','show','_overlay','overlayEvent','remove','Cesium3DTileStyle','camera','atan','createRadialGradient','_coordinator','rad);\x0a\x20\x20\x20\x20\x20\x20opacity:\x20','getPositionsFromJson','merge','div_icon','clientHeight','_cfgRadius','postUpdate','store','data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=','setMode','setFeatureProperty','uniform\x20vec4\x20asphaltColor;\x0d\x0auniform\x20float\x20bumpSize;\x0d\x0auniform\x20float\x20roughness;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20//\x20From\x20Stefan\x20Gustavson\x27s\x20Procedural\x20Textures\x20in\x20GLSL\x20in\x20OpenGL\x20Insights\x0d\x0a\x20\x20//Main\x20cellular\x20pattern\x0d\x0a\x20\x20vec4\x20color\x20=\x20asphaltColor;\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20vec2\x20F\x20=\x20czm_cellular(st\x20/\x20bumpSize);\x0d\x0a\x20\x20color.rgb\x20-=\x20(F.x\x20/\x20F.y)\x20*\x200.1;\x0d\x0a\x0d\x0a\x20\x20//Extra\x20bumps\x20for\x20roughness\x0d\x0a\x20\x20float\x20noise\x20=\x20czm_snoise(st\x20/\x20bumpSize);\x0d\x0a\x20\x20noise\x20=\x20pow(noise,\x205.0)\x20*\x20roughness;\x0d\x0a\x20\x20color.rgb\x20+=\x20noise;\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','maximumLevel','registerCoordinateSystem','_createBillboard','appendPopup','getLayerType','asphaltColor','_pitch','minimumHeights','clearLastNoEnd','model','_unbindEvent','extendComponentModel','CLEARED','splitter','Parse','_imageSubscription','dcContainer','setDataMin','fadeFactor','_orbitFrame','viewBox','\x20公里','silhouette','BaseLayerPickerViewModel','heightRadii','http://www.w3.org/2000/svg','fogByDistance','_orbitIsLook','showSkyBox','icon_anchor','_min','alt','zhang','classList','CallbackProperty','setStyle','getEntitys','/**\x0d\x0a\x20*\x20@license\x0d\x0a\x20*\x20Description\x20:\x20Array\x20and\x20textureless\x20GLSL\x202D/3D/4D\x20simplex\x0d\x0a\x20*\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20noise\x20functions.\x0d\x0a\x20*\x20\x20\x20\x20\x20\x20Author\x20:\x20Ian\x20McEwan,\x20Ashima\x20Arts.\x0d\x0a\x20*\x20\x20Maintainer\x20:\x20ijm\x0d\x0a\x20*\x20\x20\x20\x20\x20Lastmod\x20:\x2020110822\x20(ijm)\x0d\x0a\x20*\x20\x20\x20\x20\x20License\x20:\x20Copyright\x20(C)\x202011\x20Ashima\x20Arts.\x20All\x20rights\x20reserved.\x0d\x0a\x20*\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Distributed\x20under\x20the\x20MIT\x20License.\x20See\x20LICENSE\x20file.\x0d\x0a\x20*\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20https://github.com/ashima/webgl-noise\x0d\x0a\x20*/\x0d\x0a\x0d\x0avec4\x20_czm_mod289(vec4\x20x)\x0d\x0a{\x0d\x0a\x20\x20return\x20x\x20-\x20floor(x\x20*\x20(1.0\x20/\x20289.0))\x20*\x20289.0;\x0d\x0a}\x0d\x0a\x0d\x0avec3\x20_czm_mod289(vec3\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20x\x20-\x20floor(x\x20*\x20(1.0\x20/\x20289.0))\x20*\x20289.0;\x0d\x0a}\x0d\x0a\x0d\x0avec2\x20_czm_mod289(vec2\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20x\x20-\x20floor(x\x20*\x20(1.0\x20/\x20289.0))\x20*\x20289.0;\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20_czm_mod289(float\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20x\x20-\x20floor(x\x20*\x20(1.0\x20/\x20289.0))\x20*\x20289.0;\x0d\x0a}\x0d\x0a\x0d\x0avec4\x20_czm_permute(vec4\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20_czm_mod289(((x*34.0)+1.0)*x);\x0d\x0a}\x0d\x0a\x0d\x0avec3\x20_czm_permute(vec3\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20_czm_mod289(((x*34.0)+1.0)*x);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20_czm_permute(float\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20_czm_mod289(((x*34.0)+1.0)*x);\x0d\x0a}\x0d\x0a\x0d\x0avec4\x20_czm_taylorInvSqrt(vec4\x20r)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x201.79284291400159\x20-\x200.85373472095314\x20*\x20r;\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20_czm_taylorInvSqrt(float\x20r)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x201.79284291400159\x20-\x200.85373472095314\x20*\x20r;\x0d\x0a}\x0d\x0a\x0d\x0avec4\x20_czm_grad4(float\x20j,\x20vec4\x20ip)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20const\x20vec4\x20ones\x20=\x20vec4(1.0,\x201.0,\x201.0,\x20-1.0);\x0d\x0a\x20\x20\x20\x20vec4\x20p,s;\x0d\x0a\x0d\x0a\x20\x20\x20\x20p.xyz\x20=\x20floor(\x20fract\x20(vec3(j)\x20*\x20ip.xyz)\x20*\x207.0)\x20*\x20ip.z\x20-\x201.0;\x0d\x0a\x20\x20\x20\x20p.w\x20=\x201.5\x20-\x20dot(abs(p.xyz),\x20ones.xyz);\x0d\x0a\x20\x20\x20\x20s\x20=\x20vec4(lessThan(p,\x20vec4(0.0)));\x0d\x0a\x20\x20\x20\x20p.xyz\x20=\x20p.xyz\x20+\x20(s.xyz*2.0\x20-\x201.0)\x20*\x20s.www;\x0d\x0a\x0d\x0a\x20\x20\x20\x20return\x20p;\x0d\x0a}\x0d\x0a\x0d\x0a/**\x0d\x0a\x20*\x20DOC_TBA\x0d\x0a\x20*\x0d\x0a\x20*\x20Implemented\x20by\x20Ian\x20McEwan,\x20Ashima\x20Arts,\x20and\x20distributed\x20under\x20the\x20MIT\x20License.\x20\x20{@link\x20https://github.com/ashima/webgl-noise}\x0d\x0a\x20*\x0d\x0a\x20*\x20@name\x20czm_snoise\x0d\x0a\x20*\x20@glslFunction\x0d\x0a\x20*\x0d\x0a\x20*\x20@see\x20<a\x20href=\x22https://github.com/ashima/webgl-noise\x22>https://github.com/ashima/webgl-noise</a>\x0d\x0a\x20*\x20@see\x20Stefan\x20Gustavson\x27s\x20paper\x20<a\x20href=\x22http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf\x22>Simplex\x20noise\x20demystified</a>\x0d\x0a\x20*/\x0d\x0afloat\x20czm_snoise(vec2\x20v)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20const\x20vec4\x20C\x20=\x20vec4(0.211324865405187,\x20\x20//\x20(3.0-sqrt(3.0))/6.0\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200.366025403784439,\x20\x20//\x200.5*(sqrt(3.0)-1.0)\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-0.577350269189626,\x20\x20//\x20-1.0\x20+\x202.0\x20*\x20C.x\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200.024390243902439);\x20//\x201.0\x20/\x2041.0\x0d\x0a\x20\x20\x20\x20//\x20First\x20corner\x0d\x0a\x20\x20\x20\x20vec2\x20i\x20\x20=\x20floor(v\x20+\x20dot(v,\x20C.yy)\x20);\x0d\x0a\x20\x20\x20\x20vec2\x20x0\x20=\x20v\x20-\x20\x20\x20i\x20+\x20dot(i,\x20C.xx);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Other\x20corners\x0d\x0a\x20\x20\x20\x20vec2\x20i1;\x0d\x0a\x20\x20\x20\x20//i1.x\x20=\x20step(\x20x0.y,\x20x0.x\x20);\x20//\x20x0.x\x20>\x20x0.y\x20?\x201.0\x20:\x200.0\x0d\x0a\x20\x20\x20\x20//i1.y\x20=\x201.0\x20-\x20i1.x;\x0d\x0a\x20\x20\x20\x20i1\x20=\x20(x0.x\x20>\x20x0.y)\x20?\x20vec2(1.0,\x200.0)\x20:\x20vec2(0.0,\x201.0);\x0d\x0a\x20\x20\x20\x20//\x20x0\x20=\x20x0\x20-\x200.0\x20+\x200.0\x20*\x20C.xx\x20;\x0d\x0a\x20\x20\x20\x20//\x20x1\x20=\x20x0\x20-\x20i1\x20+\x201.0\x20*\x20C.xx\x20;\x0d\x0a\x20\x20\x20\x20//\x20x2\x20=\x20x0\x20-\x201.0\x20+\x202.0\x20*\x20C.xx\x20;\x0d\x0a\x20\x20\x20\x20vec4\x20x12\x20=\x20x0.xyxy\x20+\x20C.xxzz;\x0d\x0a\x20\x20\x20\x20x12.xy\x20-=\x20i1;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Permutations\x0d\x0a\x20\x20\x20\x20i\x20=\x20_czm_mod289(i);\x20//\x20Avoid\x20truncation\x20effects\x20in\x20permutation\x0d\x0a\x20\x20\x20\x20vec3\x20p\x20=\x20_czm_permute(\x20_czm_permute(\x20i.y\x20+\x20vec3(0.0,\x20i1.y,\x201.0\x20))\x20+\x20i.x\x20+\x20vec3(0.0,\x20i1.x,\x201.0\x20));\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec3\x20m\x20=\x20max(0.5\x20-\x20vec3(dot(x0,x0),\x20dot(x12.xy,x12.xy),\x20dot(x12.zw,x12.zw)),\x200.0);\x0d\x0a\x20\x20\x20\x20m\x20=\x20m*m\x20;\x0d\x0a\x20\x20\x20\x20m\x20=\x20m*m\x20;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Gradients:\x2041\x20points\x20uniformly\x20over\x20a\x20line,\x20mapped\x20onto\x20a\x20diamond.\x0d\x0a\x20\x20\x20\x20//\x20The\x20ring\x20size\x2017*17\x20=\x20289\x20is\x20close\x20to\x20a\x20multiple\x20of\x2041\x20(41*7\x20=\x20287)\x0d\x0a\x20\x20\x20\x20vec3\x20x\x20=\x202.0\x20*\x20fract(p\x20*\x20C.www)\x20-\x201.0;\x0d\x0a\x20\x20\x20\x20vec3\x20h\x20=\x20abs(x)\x20-\x200.5;\x0d\x0a\x20\x20\x20\x20vec3\x20ox\x20=\x20floor(x\x20+\x200.5);\x0d\x0a\x20\x20\x20\x20vec3\x20a0\x20=\x20x\x20-\x20ox;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Normalise\x20gradients\x20implicitly\x20by\x20scaling\x20m\x0d\x0a\x20\x20\x20\x20//\x20Approximation\x20of:\x20m\x20*=\x20inversesqrt(\x20a0*a0\x20+\x20h*h\x20);\x0d\x0a\x20\x20\x20\x20m\x20*=\x201.79284291400159\x20-\x200.85373472095314\x20*\x20(\x20a0*a0\x20+\x20h*h\x20);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Compute\x20final\x20noise\x20value\x20at\x20P\x0d\x0a\x20\x20\x20\x20vec3\x20g;\x0d\x0a\x20\x20\x20\x20g.x\x20\x20=\x20a0.x\x20\x20*\x20x0.x\x20\x20+\x20h.x\x20\x20*\x20x0.y;\x0d\x0a\x20\x20\x20\x20g.yz\x20=\x20a0.yz\x20*\x20x12.xz\x20+\x20h.yz\x20*\x20x12.yw;\x0d\x0a\x20\x20\x20\x20return\x20130.0\x20*\x20dot(m,\x20g);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20czm_snoise(vec3\x20v)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20const\x20vec2\x20\x20C\x20=\x20vec2(1.0/6.0,\x201.0/3.0)\x20;\x0d\x0a\x20\x20\x20\x20const\x20vec4\x20\x20D\x20=\x20vec4(0.0,\x200.5,\x201.0,\x202.0);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20First\x20corner\x0d\x0a\x20\x20\x20\x20vec3\x20i\x20\x20=\x20floor(v\x20+\x20dot(v,\x20C.yyy)\x20);\x0d\x0a\x20\x20\x20\x20vec3\x20x0\x20=\x20\x20\x20v\x20-\x20i\x20+\x20dot(i,\x20C.xxx)\x20;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Other\x20corners\x0d\x0a\x20\x20\x20\x20vec3\x20g\x20=\x20step(x0.yzx,\x20x0.xyz);\x0d\x0a\x20\x20\x20\x20vec3\x20l\x20=\x201.0\x20-\x20g;\x0d\x0a\x20\x20\x20\x20vec3\x20i1\x20=\x20min(\x20g.xyz,\x20l.zxy\x20);\x0d\x0a\x20\x20\x20\x20vec3\x20i2\x20=\x20max(\x20g.xyz,\x20l.zxy\x20);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20\x20\x20x0\x20=\x20x0\x20-\x200.0\x20+\x200.0\x20*\x20C.xxx;\x0d\x0a\x20\x20\x20\x20//\x20\x20\x20x1\x20=\x20x0\x20-\x20i1\x20\x20+\x201.0\x20*\x20C.xxx;\x0d\x0a\x20\x20\x20\x20//\x20\x20\x20x2\x20=\x20x0\x20-\x20i2\x20\x20+\x202.0\x20*\x20C.xxx;\x0d\x0a\x20\x20\x20\x20//\x20\x20\x20x3\x20=\x20x0\x20-\x201.0\x20+\x203.0\x20*\x20C.xxx;\x0d\x0a\x20\x20\x20\x20vec3\x20x1\x20=\x20x0\x20-\x20i1\x20+\x20C.xxx;\x0d\x0a\x20\x20\x20\x20vec3\x20x2\x20=\x20x0\x20-\x20i2\x20+\x20C.yyy;\x20//\x202.0*C.x\x20=\x201/3\x20=\x20C.y\x0d\x0a\x20\x20\x20\x20vec3\x20x3\x20=\x20x0\x20-\x20D.yyy;\x20\x20\x20\x20\x20\x20//\x20-1.0+3.0*C.x\x20=\x20-0.5\x20=\x20-D.y\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Permutations\x0d\x0a\x20\x20\x20\x20i\x20=\x20_czm_mod289(i);\x0d\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20_czm_permute(\x20_czm_permute(\x20_czm_permute(\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20i.z\x20+\x20vec4(0.0,\x20i1.z,\x20i2.z,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.y\x20+\x20vec4(0.0,\x20i1.y,\x20i2.y,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.x\x20+\x20vec4(0.0,\x20i1.x,\x20i2.x,\x201.0\x20));\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Gradients:\x207x7\x20points\x20over\x20a\x20square,\x20mapped\x20onto\x20an\x20octahedron.\x0d\x0a\x20\x20\x20\x20//\x20The\x20ring\x20size\x2017*17\x20=\x20289\x20is\x20close\x20to\x20a\x20multiple\x20of\x2049\x20(49*6\x20=\x20294)\x0d\x0a\x20\x20\x20\x20float\x20n_\x20=\x200.142857142857;\x20//\x201.0/7.0\x0d\x0a\x20\x20\x20\x20vec3\x20\x20ns\x20=\x20n_\x20*\x20D.wyz\x20-\x20D.xzx;\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20j\x20=\x20p\x20-\x2049.0\x20*\x20floor(p\x20*\x20ns.z\x20*\x20ns.z);\x20\x20//\x20\x20mod(p,7*7)\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20x_\x20=\x20floor(j\x20*\x20ns.z);\x0d\x0a\x20\x20\x20\x20vec4\x20y_\x20=\x20floor(j\x20-\x207.0\x20*\x20x_\x20);\x20\x20\x20\x20//\x20mod(j,N)\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20x\x20=\x20x_\x20*ns.x\x20+\x20ns.yyyy;\x0d\x0a\x20\x20\x20\x20vec4\x20y\x20=\x20y_\x20*ns.x\x20+\x20ns.yyyy;\x0d\x0a\x20\x20\x20\x20vec4\x20h\x20=\x201.0\x20-\x20abs(x)\x20-\x20abs(y);\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20b0\x20=\x20vec4(\x20x.xy,\x20y.xy\x20);\x0d\x0a\x20\x20\x20\x20vec4\x20b1\x20=\x20vec4(\x20x.zw,\x20y.zw\x20);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//vec4\x20s0\x20=\x20vec4(lessThan(b0,0.0))*2.0\x20-\x201.0;\x0d\x0a\x20\x20\x20\x20//vec4\x20s1\x20=\x20vec4(lessThan(b1,0.0))*2.0\x20-\x201.0;\x0d\x0a\x20\x20\x20\x20vec4\x20s0\x20=\x20floor(b0)*2.0\x20+\x201.0;\x0d\x0a\x20\x20\x20\x20vec4\x20s1\x20=\x20floor(b1)*2.0\x20+\x201.0;\x0d\x0a\x20\x20\x20\x20vec4\x20sh\x20=\x20-step(h,\x20vec4(0.0));\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20a0\x20=\x20b0.xzyw\x20+\x20s0.xzyw*sh.xxyy\x20;\x0d\x0a\x20\x20\x20\x20vec4\x20a1\x20=\x20b1.xzyw\x20+\x20s1.xzyw*sh.zzww\x20;\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec3\x20p0\x20=\x20vec3(a0.xy,h.x);\x0d\x0a\x20\x20\x20\x20vec3\x20p1\x20=\x20vec3(a0.zw,h.y);\x0d\x0a\x20\x20\x20\x20vec3\x20p2\x20=\x20vec3(a1.xy,h.z);\x0d\x0a\x20\x20\x20\x20vec3\x20p3\x20=\x20vec3(a1.zw,h.w);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//Normalise\x20gradients\x0d\x0a\x20\x20\x20\x20vec4\x20norm\x20=\x20_czm_taylorInvSqrt(vec4(dot(p0,p0),\x20dot(p1,p1),\x20dot(p2,\x20p2),\x20dot(p3,p3)));\x0d\x0a\x20\x20\x20\x20p0\x20*=\x20norm.x;\x0d\x0a\x20\x20\x20\x20p1\x20*=\x20norm.y;\x0d\x0a\x20\x20\x20\x20p2\x20*=\x20norm.z;\x0d\x0a\x20\x20\x20\x20p3\x20*=\x20norm.w;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Mix\x20final\x20noise\x20value\x0d\x0a\x20\x20\x20\x20vec4\x20m\x20=\x20max(0.6\x20-\x20vec4(dot(x0,x0),\x20dot(x1,x1),\x20dot(x2,x2),\x20dot(x3,x3)),\x200.0);\x0d\x0a\x20\x20\x20\x20m\x20=\x20m\x20*\x20m;\x0d\x0a\x20\x20\x20\x20return\x2042.0\x20*\x20dot(\x20m*m,\x20vec4(\x20dot(p0,x0),\x20dot(p1,x1),\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20dot(p2,x2),\x20dot(p3,x3)\x20)\x20);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20czm_snoise(vec4\x20v)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20const\x20vec4\x20\x20C\x20=\x20vec4(\x200.138196601125011,\x20\x20//\x20(5\x20-\x20sqrt(5))/20\x20\x20G4\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200.276393202250021,\x20\x20//\x202\x20*\x20G4\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200.414589803375032,\x20\x20//\x203\x20*\x20G4\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-0.447213595499958);\x20//\x20-1\x20+\x204\x20*\x20G4\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20(sqrt(5)\x20-\x201)/4\x20=\x20F4,\x20used\x20once\x20below\x0d\x0a\x20\x20\x20\x20#define\x20F4\x200.309016994374947451\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20First\x20corner\x0d\x0a\x20\x20\x20\x20vec4\x20i\x20\x20=\x20floor(v\x20+\x20dot(v,\x20vec4(F4))\x20);\x0d\x0a\x20\x20\x20\x20vec4\x20x0\x20=\x20v\x20-\x20\x20\x20i\x20+\x20dot(i,\x20C.xxxx);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Other\x20corners\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Rank\x20sorting\x20originally\x20contributed\x20by\x20Bill\x20Licea-Kane,\x20AMD\x20(formerly\x20ATI)\x0d\x0a\x20\x20\x20\x20vec4\x20i0;\x0d\x0a\x20\x20\x20\x20vec3\x20isX\x20=\x20step(\x20x0.yzw,\x20x0.xxx\x20);\x0d\x0a\x20\x20\x20\x20vec3\x20isYZ\x20=\x20step(\x20x0.zww,\x20x0.yyz\x20);\x0d\x0a\x20\x20\x20\x20//\x20\x20i0.x\x20=\x20dot(\x20isX,\x20vec3(\x201.0\x20)\x20);\x0d\x0a\x20\x20\x20\x20i0.x\x20=\x20isX.x\x20+\x20isX.y\x20+\x20isX.z;\x0d\x0a\x20\x20\x20\x20i0.yzw\x20=\x201.0\x20-\x20isX;\x0d\x0a\x20\x20\x20\x20//\x20\x20i0.y\x20+=\x20dot(\x20isYZ.xy,\x20vec2(\x201.0\x20)\x20);\x0d\x0a\x20\x20\x20\x20i0.y\x20+=\x20isYZ.x\x20+\x20isYZ.y;\x0d\x0a\x20\x20\x20\x20i0.zw\x20+=\x201.0\x20-\x20isYZ.xy;\x0d\x0a\x20\x20\x20\x20i0.z\x20+=\x20isYZ.z;\x0d\x0a\x20\x20\x20\x20i0.w\x20+=\x201.0\x20-\x20isYZ.z;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20i0\x20now\x20contains\x20the\x20unique\x20values\x200,1,2,3\x20in\x20each\x20channel\x0d\x0a\x20\x20\x20\x20vec4\x20i3\x20=\x20clamp(\x20i0,\x200.0,\x201.0\x20);\x0d\x0a\x20\x20\x20\x20vec4\x20i2\x20=\x20clamp(\x20i0-1.0,\x200.0,\x201.0\x20);\x0d\x0a\x20\x20\x20\x20vec4\x20i1\x20=\x20clamp(\x20i0-2.0,\x200.0,\x201.0\x20);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20\x20x0\x20=\x20x0\x20-\x200.0\x20+\x200.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20//\x20\x20x1\x20=\x20x0\x20-\x20i1\x20\x20+\x201.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20//\x20\x20x2\x20=\x20x0\x20-\x20i2\x20\x20+\x202.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20//\x20\x20x3\x20=\x20x0\x20-\x20i3\x20\x20+\x203.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20//\x20\x20x4\x20=\x20x0\x20-\x201.0\x20+\x204.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20vec4\x20x1\x20=\x20x0\x20-\x20i1\x20+\x20C.xxxx;\x0d\x0a\x20\x20\x20\x20vec4\x20x2\x20=\x20x0\x20-\x20i2\x20+\x20C.yyyy;\x0d\x0a\x20\x20\x20\x20vec4\x20x3\x20=\x20x0\x20-\x20i3\x20+\x20C.zzzz;\x0d\x0a\x20\x20\x20\x20vec4\x20x4\x20=\x20x0\x20+\x20C.wwww;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Permutations\x0d\x0a\x20\x20\x20\x20i\x20=\x20_czm_mod289(i);\x0d\x0a\x20\x20\x20\x20float\x20j0\x20=\x20_czm_permute(\x20_czm_permute(\x20_czm_permute(\x20_czm_permute(i.w)\x20+\x20i.z)\x20+\x20i.y)\x20+\x20i.x);\x0d\x0a\x20\x20\x20\x20vec4\x20j1\x20=\x20_czm_permute(\x20_czm_permute(\x20_czm_permute(\x20_czm_permute\x20(\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20i.w\x20+\x20vec4(i1.w,\x20i2.w,\x20i3.w,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.z\x20+\x20vec4(i1.z,\x20i2.z,\x20i3.z,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.y\x20+\x20vec4(i1.y,\x20i2.y,\x20i3.y,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.x\x20+\x20vec4(i1.x,\x20i2.x,\x20i3.x,\x201.0\x20));\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Gradients:\x207x7x6\x20points\x20over\x20a\x20cube,\x20mapped\x20onto\x20a\x204-cross\x20polytope\x0d\x0a\x20\x20\x20\x20//\x207*7*6\x20=\x20294,\x20which\x20is\x20close\x20to\x20the\x20ring\x20size\x2017*17\x20=\x20289.\x0d\x0a\x20\x20\x20\x20vec4\x20ip\x20=\x20vec4(1.0/294.0,\x201.0/49.0,\x201.0/7.0,\x200.0)\x20;\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20p0\x20=\x20_czm_grad4(j0,\x20\x20\x20ip);\x0d\x0a\x20\x20\x20\x20vec4\x20p1\x20=\x20_czm_grad4(j1.x,\x20ip);\x0d\x0a\x20\x20\x20\x20vec4\x20p2\x20=\x20_czm_grad4(j1.y,\x20ip);\x0d\x0a\x20\x20\x20\x20vec4\x20p3\x20=\x20_czm_grad4(j1.z,\x20ip);\x0d\x0a\x20\x20\x20\x20vec4\x20p4\x20=\x20_czm_grad4(j1.w,\x20ip);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Normalise\x20gradients\x0d\x0a\x20\x20\x20\x20vec4\x20norm\x20=\x20_czm_taylorInvSqrt(vec4(dot(p0,p0),\x20dot(p1,p1),\x20dot(p2,\x20p2),\x20dot(p3,p3)));\x0d\x0a\x20\x20\x20\x20p0\x20*=\x20norm.x;\x0d\x0a\x20\x20\x20\x20p1\x20*=\x20norm.y;\x0d\x0a\x20\x20\x20\x20p2\x20*=\x20norm.z;\x0d\x0a\x20\x20\x20\x20p3\x20*=\x20norm.w;\x0d\x0a\x20\x20\x20\x20p4\x20*=\x20_czm_taylorInvSqrt(dot(p4,p4));\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Mix\x20contributions\x20from\x20the\x20five\x20corners\x0d\x0a\x20\x20\x20\x20vec3\x20m0\x20=\x20max(0.6\x20-\x20vec3(dot(x0,x0),\x20dot(x1,x1),\x20dot(x2,x2)),\x200.0);\x0d\x0a\x20\x20\x20\x20vec2\x20m1\x20=\x20max(0.6\x20-\x20vec2(dot(x3,x3),\x20dot(x4,x4)\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20),\x200.0);\x0d\x0a\x20\x20\x20\x20m0\x20=\x20m0\x20*\x20m0;\x0d\x0a\x20\x20\x20\x20m1\x20=\x20m1\x20*\x20m1;\x0d\x0a\x20\x20\x20\x20return\x2049.0\x20*\x20(\x20dot(m0*m0,\x20vec3(\x20dot(\x20p0,\x20x0\x20),\x20dot(\x20p1,\x20x1\x20),\x20dot(\x20p2,\x20x2\x20)))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20dot(m1*m1,\x20vec2(\x20dot(\x20p3,\x20x3\x20),\x20dot(\x20p4,\x20x4\x20)\x20)\x20)\x20)\x20;\x0d\x0a}\x0d\x0a','renderPartial','_popup','specularMap','extremachange','rectangle\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','addEventListener','_mountPath','mile','全长:','_on','xmax','_getHierarchy','offsetHeight','canvas2d','fromString','free','RoamingController:\x20time\x20not\x20set\x20','tilingScheme\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','tencent','parabola','startTime','preUpdate','_selected','resolutionScale','PolylineImageTrailMaterialProperty','setDataMax','popupEvent','unpackArray','nearValue','cos','parsePositions','arc','clone','initDraggers','beginPath','getPositionsWithHeight','span','\x20\x0a请确认json文件格式正确!!!','lat','_reDraw','_updateProperties','_outRing','fillColor','_init','RimLightingType','mouse-location','Arguments','CLICK','_viewer','dc-popup','FeatureCollection','_videoUrl','pickPosition','compare','左击选择点位,右击结束','removeAll','getBisectorNormals','_updateAngleAndOpacity','chart','toModelLayer','toVectorLayer','isMid','stepSize','darkColor','menu-item','message','ACTIVE','setData','emit','active','removeInputAction','renderAll','getFeature','_moveActive','blendColor','changeEditing','out-ring','eastNorthUpToFixedFrame','_installHook','clientY','fromCoordString','east','createEllipsoidTerrain','_image','toFixed','tiltEventTypes','none','cleared','yField','addMenuItem','_duration','_syncMap','left','emptyImageUrl','getProperty','error','_mode','PI_OVER_TWO','imageryProviderViewModels','setPitchRange','viewer','parentNode','value','_rotateMouseUpFunction','box','getCurrentMousePosition','_xField','onStartDrawing','hLable','the\x20positions\x20invalid','west','polygon','bloom','extentRadii','showMoveDrawing','scale_src','getOwnPropertyDescriptors'];(function(_0x56685b,_0x31c058){var _0x256fff=function(_0x19638c){while(--_0x19638c){_0x56685b['push'](_0x56685b['shift']());}};_0x256fff(++_0x31c058);}(a0_0x31c0,0x1cf));var a0_0x256f=function(_0x56685b,_0x31c058){_0x56685b=_0x56685b-0x0;var _0x256fff=a0_0x31c0[_0x56685b];return _0x256fff;};!function(_0x42e66f,_0x4b5064){a0_0x256f('0x146')==typeof exports&&a0_0x256f('0x146')==typeof module?module[a0_0x256f('0x5f4')]=_0x4b5064():a0_0x256f('0x560')==typeof define&&define[a0_0x256f('0x2e8')]?define(a0_0x256f('0x4c4'),[],_0x4b5064):a0_0x256f('0x146')==typeof exports?exports[a0_0x256f('0x4c4')]=_0x4b5064():_0x42e66f[a0_0x256f('0x4c4')]=_0x4b5064();}(window,function(){return function(_0x2753e8){var _0x3c94ab={};function _0x4a0175(_0xf18491){if(_0x3c94ab[_0xf18491])return _0x3c94ab[_0xf18491][a0_0x256f('0x5f4')];var _0x342461=_0x3c94ab[_0xf18491]={'i':_0xf18491,'l':!0x1,'exports':{}};return _0x2753e8[_0xf18491][a0_0x256f('0x32b')](_0x342461[a0_0x256f('0x5f4')],_0x342461,_0x342461[a0_0x256f('0x5f4')],_0x4a0175),_0x342461['l']=!0x0,_0x342461[a0_0x256f('0x5f4')];}return _0x4a0175['m']=_0x2753e8,_0x4a0175['c']=_0x3c94ab,_0x4a0175['d']=function(_0x2a8ac7,_0x2f8154,_0x31e50e){_0x4a0175['o'](_0x2a8ac7,_0x2f8154)||Object[a0_0x256f('0x21f')](_0x2a8ac7,_0x2f8154,{'enumerable':!0x0,'get':_0x31e50e});},_0x4a0175['r']=function(_0x39e68f){a0_0x256f('0x51b')!=typeof Symbol&&Symbol[a0_0x256f('0x279')]&&Object[a0_0x256f('0x21f')](_0x39e68f,Symbol['toStringTag'],{'value':a0_0x256f('0x525')}),Object[a0_0x256f('0x21f')](_0x39e68f,a0_0x256f('0xe'),{'value':!0x0});},_0x4a0175['t']=function(_0x4454bb,_0x338fff){if(0x1&_0x338fff&&(_0x4454bb=_0x4a0175(_0x4454bb)),0x8&_0x338fff)return _0x4454bb;if(0x4&_0x338fff&&'object'==typeof _0x4454bb&&_0x4454bb&&_0x4454bb[a0_0x256f('0xe')])return _0x4454bb;var _0x394d82=Object[a0_0x256f('0x6b')](null);if(_0x4a0175['r'](_0x394d82),Object[a0_0x256f('0x21f')](_0x394d82,a0_0x256f('0x516'),{'enumerable':!0x0,'value':_0x4454bb}),0x2&_0x338fff&&a0_0x256f('0xa9')!=typeof _0x4454bb)for(var _0xc2d030 in _0x4454bb)_0x4a0175['d'](_0x394d82,_0xc2d030,function(_0xec8c01){return _0x4454bb[_0xec8c01];}['bind'](null,_0xc2d030));return _0x394d82;},_0x4a0175['n']=function(_0x2bc577){var _0x1e9091=_0x2bc577&&_0x2bc577[a0_0x256f('0xe')]?function(){return _0x2bc577['default'];}:function(){return _0x2bc577;};return _0x4a0175['d'](_0x1e9091,'a',_0x1e9091),_0x1e9091;},_0x4a0175['o']=function(_0x228de5,_0x12ffec){return Object[a0_0x256f('0xa8')][a0_0x256f('0x592')][a0_0x256f('0x32b')](_0x228de5,_0x12ffec);},_0x4a0175['p']='/',_0x4a0175(_0x4a0175['s']=0x26);}([function(_0x191de8,_0xb4efee){_0x191de8[a0_0x256f('0x5f4')]=function(_0x5c61f0,_0x5760a3){if(!(_0x5c61f0 instanceof _0x5760a3))throw new TypeError(a0_0x256f('0x229'));};},function(_0x51eff7,_0x1066f7){function _0x2e43e7(_0x503881,_0x2c31b1){for(var _0x1053b6=0x0;_0x1053b6<_0x2c31b1['length'];_0x1053b6++){var _0x4e621e=_0x2c31b1[_0x1053b6];_0x4e621e['enumerable']=_0x4e621e[a0_0x256f('0x2ec')]||!0x1,_0x4e621e[a0_0x256f('0x34e')]=!0x0,a0_0x256f('0x48a')in _0x4e621e&&(_0x4e621e['writable']=!0x0),Object[a0_0x256f('0x21f')](_0x503881,_0x4e621e['key'],_0x4e621e);}}_0x51eff7[a0_0x256f('0x5f4')]=function(_0x257dfe,_0xaab08f,_0x47863c){return _0xaab08f&&_0x2e43e7(_0x257dfe[a0_0x256f('0xa8')],_0xaab08f),_0x47863c&&_0x2e43e7(_0x257dfe,_0x47863c),_0x257dfe;};},function(_0x24eecc,_0x336340){function _0x4eb39c(_0x5371e7){return _0x24eecc[a0_0x256f('0x5f4')]=_0x4eb39c=Object[a0_0x256f('0x2d9')]?Object[a0_0x256f('0x4ab')]:function(_0x336c8a){return _0x336c8a[a0_0x256f('0x5fe')]||Object['getPrototypeOf'](_0x336c8a);},_0x4eb39c(_0x5371e7);}_0x24eecc[a0_0x256f('0x5f4')]=_0x4eb39c;},function(_0x1f247e,_0x2d01c8,_0x5e59ab){'use strict';_0x5e59ab['d'](_0x2d01c8,'c',function(){return _0x48686b;}),_0x5e59ab['d'](_0x2d01c8,'a',function(){return _0x50a0eb;}),_0x5e59ab['d'](_0x2d01c8,'b',function(){return _0x69ddd4;});var _0x211b13=_0x5e59ab(0x0),_0x412694=_0x5e59ab['n'](_0x211b13),_0x1dc199=_0x5e59ab(0x1),_0x24e1cd=_0x5e59ab['n'](_0x1dc199),_0x4030aa='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'[a0_0x256f('0x514')](''),_0x48686b=function(){function _0x2402cc(){_0x412694()(this,_0x2402cc);}return _0x24e1cd()(_0x2402cc,null,[{'key':a0_0x256f('0x37e'),'value':function(){var _0x1264d,_0xc6e544=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:'D',_0x50d094=[];_0x50d094[0x8]=_0x50d094[0xd]=_0x50d094[0x12]=_0x50d094[0x17]='-',_0x50d094[0xe]='4';for(var _0x38e11c=0x0;_0x38e11c<0x24;_0x38e11c++)_0x50d094[_0x38e11c]||(_0x1264d=0x0|0x10*Math[a0_0x256f('0x352')](),_0x50d094[_0x38e11c]=_0x4030aa[0x13===_0x38e11c?0x3&_0x1264d|0x8:_0x1264d]);return _0xc6e544+'-'+_0x50d094['join']('');}},{'key':a0_0x256f('0x3f4'),'value':function(_0x240444){for(var _0xd9e8e7,_0xcd4f36,_0x3654a1,_0x5cee37,_0x15da0e=arguments['length'],_0x5838c8=new Array(_0x15da0e>0x1?_0x15da0e-0x1:0x0),_0x468129=0x1;_0x468129<_0x15da0e;_0x468129++)_0x5838c8[_0x468129-0x1]=arguments[_0x468129];for(_0xcd4f36=0x0,_0x3654a1=_0x5838c8[a0_0x256f('0x658')];_0xcd4f36<_0x3654a1;_0xcd4f36++)for(_0xd9e8e7 in _0x5cee37=_0x5838c8[_0xcd4f36])_0x240444[_0xd9e8e7]=_0x5cee37[_0xd9e8e7];return _0x240444;}},{'key':a0_0x256f('0x54b'),'value':function(_0x2698de){return this[a0_0x256f('0x99')](_0x2698de)[a0_0x256f('0x514')](/\s+/);}},{'key':a0_0x256f('0x62b'),'value':function(_0x3444ca,_0x23a175){for(var _0x2165c9 in(_0x3444ca[a0_0x256f('0x592')](a0_0x256f('0x2eb'))||(_0x3444ca['options']=_0x3444ca[a0_0x256f('0x2eb')]?Object[a0_0x256f('0x6b')](_0x3444ca[a0_0x256f('0x2eb')]):{}),_0x23a175))_0x3444ca[a0_0x256f('0x2eb')][_0x2165c9]=_0x23a175[_0x2165c9];return _0x3444ca[a0_0x256f('0x2eb')];}},{'key':a0_0x256f('0x39a'),'value':function(_0x313812,_0x133f5c){var _0x431a77=Math[a0_0x256f('0x244')](0xa,void 0x0===_0x133f5c?0x6:_0x133f5c);return Math[a0_0x256f('0x329')](_0x313812*_0x431a77)/_0x431a77;}},{'key':'trim','value':function(_0x460926){return _0x460926['trim']?_0x460926[a0_0x256f('0x99')]():_0x460926['replace'](/^\s+|\s+$/g,'');}},{'key':a0_0x256f('0x481'),'value':function(){return a0_0x256f('0x3fa');}},{'key':'checkPosition','value':function(_0x1b96be){return _0x1b96be&&_0x1b96be['hasOwnProperty'](a0_0x256f('0x334'))&&_0x1b96be[a0_0x256f('0x592')](a0_0x256f('0x197'))&&_0x1b96be[a0_0x256f('0x592')](a0_0x256f('0x2b5'));}}]),_0x2402cc;}(),_0x50a0eb=function(){function _0x1a8879(){_0x412694()(this,_0x1a8879);}return _0x24e1cd()(_0x1a8879,null,[{'key':'get','value':function(_0x37e210){return a0_0x256f('0xa9')==typeof _0x37e210?document[a0_0x256f('0xfa')](_0x37e210):_0x37e210;}},{'key':a0_0x256f('0x3a8'),'value':function(_0x478d8a,_0x1e1514){var _0x1762ff=_0x478d8a['style'][_0x1e1514]||_0x478d8a[a0_0x256f('0x62d')]&&_0x478d8a[a0_0x256f('0x62d')][_0x1e1514];if((!_0x1762ff||a0_0x256f('0xaa')===_0x1762ff)&&document['defaultView']){var _0x24db43=document[a0_0x256f('0x281')]['getComputedStyle'](_0x478d8a,null);_0x1762ff=_0x24db43?_0x24db43[_0x1e1514]:null;}return a0_0x256f('0xaa')===_0x1762ff?null:_0x1762ff;}},{'key':a0_0x256f('0x6b'),'value':function(_0x4d0400,_0x127cc6){var _0xeb243f=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:null,_0x4a4d31=document['createElement'](_0x4d0400);return _0x4a4d31[a0_0x256f('0xbf')]=_0x127cc6||'',_0xeb243f&&_0xeb243f[a0_0x256f('0x169')](_0x4a4d31),_0x4a4d31;}},{'key':a0_0x256f('0x3ec'),'value':function(_0x2be530){var _0x360a46=_0x2be530[a0_0x256f('0x489')];_0x360a46&&_0x360a46[a0_0x256f('0x37')](_0x2be530);}},{'key':a0_0x256f('0x29f'),'value':function(_0x36c337){for(;_0x36c337[a0_0x256f('0x3ca')];)_0x36c337['removeChild'](_0x36c337[a0_0x256f('0x3ca')]);}},{'key':a0_0x256f('0x300'),'value':function(_0x4d848f,_0xe1add8){if(void 0x0!==_0x4d848f['classList'])return _0x4d848f[a0_0x256f('0x41f')]['contains'](_0xe1add8);var _0x158296=this[a0_0x256f('0x1d2')](_0x4d848f);return _0x158296[a0_0x256f('0x658')]>0x0&&new RegExp('(^|\x5cs)'+_0xe1add8+a0_0x256f('0x212'))[a0_0x256f('0x1d5')](_0x158296);}},{'key':a0_0x256f('0x56c'),'value':function(_0xd86e80,_0x4e922e){if(void 0x0!==_0xd86e80[a0_0x256f('0x41f')])for(var _0x563d6b=_0x48686b['splitWords'](_0x4e922e),_0x6b71cb=0x0,_0x470bf8=_0x563d6b[a0_0x256f('0x658')];_0x6b71cb<_0x470bf8;_0x6b71cb++)_0xd86e80['classList']['add'](_0x563d6b[_0x6b71cb]);else{if(!this[a0_0x256f('0x300')](_0xd86e80,_0x4e922e)){var _0x59d93a=this[a0_0x256f('0x1d2')](_0xd86e80);this[a0_0x256f('0x5f')](_0xd86e80,(_0x59d93a?_0x59d93a+'\x20':'')+_0x4e922e);}}}},{'key':a0_0x256f('0x2bb'),'value':function(_0x23ab6c,_0x3a31d9){void 0x0!==_0x23ab6c[a0_0x256f('0x41f')]?_0x23ab6c[a0_0x256f('0x41f')][a0_0x256f('0x3ec')](_0x3a31d9):this['setClass'](_0x23ab6c,_0x48686b['trim'](('\x20'+this[a0_0x256f('0x1d2')](_0x23ab6c)+'\x20')[a0_0x256f('0x255')]('\x20'+_0x3a31d9+'\x20','\x20')));}},{'key':a0_0x256f('0x5f'),'value':function(_0x1c2fef,_0x364e92){void 0x0===_0x1c2fef[a0_0x256f('0xbf')]['baseVal']?_0x1c2fef[a0_0x256f('0xbf')]=_0x364e92:_0x1c2fef[a0_0x256f('0xbf')][a0_0x256f('0x575')]=_0x364e92;}},{'key':'getClass','value':function(_0x51891c){return _0x51891c[a0_0x256f('0x59f')]&&(_0x51891c=_0x51891c[a0_0x256f('0x59f')]),void 0x0===_0x51891c[a0_0x256f('0xbf')][a0_0x256f('0x575')]?_0x51891c[a0_0x256f('0xbf')]:_0x51891c['className'][a0_0x256f('0x575')];}},{'key':a0_0x256f('0x23b'),'value':function(_0xf64cc4,_0x489905,_0x3885e1,_0x289f84){var _0x32b412=document[a0_0x256f('0x345')](a0_0x256f('0x417'),'svg:svg');_0x32b412['setAttribute'](a0_0x256f('0x25d'),a0_0x256f('0x2e1')),_0x32b412[a0_0x256f('0xbb')](a0_0x256f('0x140'),_0xf64cc4),_0x32b412['setAttribute'](a0_0x256f('0x4fa'),_0x489905),_0x32b412['setAttribute'](a0_0x256f('0x412'),a0_0x256f('0x291')['concat'](_0xf64cc4,'\x20')[a0_0x256f('0x318')](_0x489905));var _0x43460d=document[a0_0x256f('0x345')](a0_0x256f('0x417'),a0_0x256f('0x9e'));return _0x43460d[a0_0x256f('0xbb')]('d',_0x3885e1),_0x32b412['appendChild'](_0x43460d),_0x289f84&&_0x289f84[a0_0x256f('0x169')](_0x32b412),_0x32b412;}},{'key':a0_0x256f('0xfb'),'value':function(_0x31f5c0,_0x2b9ee0,_0x596303){var _0xd15cfd;_0x2b9ee0=null!==(_0xd15cfd=_0x2b9ee0)&&void 0x0!==_0xd15cfd&&_0xd15cfd;var _0x5ad777=document[a0_0x256f('0x273')](a0_0x256f('0x64f'));return _0x5ad777[a0_0x256f('0xbf')]=_0x596303||'',_0x5ad777['innerHTML']=_0x31f5c0,_0x2b9ee0?_0x5ad777:_0x5ad777['childNodes'];}},{'key':a0_0x256f('0x598'),'value':function(_0x3884c8){_0x3884c8&&(_0x3884c8[a0_0x256f('0xc8')]?_0x3884c8[a0_0x256f('0xc8')]():_0x3884c8[a0_0x256f('0x632')]?_0x3884c8[a0_0x256f('0x632')]():_0x3884c8['mozRequestFullScreen']?_0x3884c8[a0_0x256f('0x39')]():_0x3884c8['webkitRequestFullscreen']&&_0x3884c8['webkitRequestFullscreen']());}},{'key':a0_0x256f('0x11c'),'value':function(){document[a0_0x256f('0x11c')]?document['exitFullscreen']():document[a0_0x256f('0x2d2')]?document[a0_0x256f('0x2d2')]():document[a0_0x256f('0x247')]?document[a0_0x256f('0x247')]():document[a0_0x256f('0x211')]&&document[a0_0x256f('0x211')]();}}]),_0x1a8879;}(),_0x186417=0x2*Math['PI'],_0x69ddd4=function(){function _0x4f3f14(){_0x412694()(this,_0x4f3f14);}return _0x24e1cd()(_0x4f3f14,null,[{'key':a0_0x256f('0x177'),'value':function(_0x545912,_0x3bf2d9){return Math[a0_0x256f('0x16f')](Math[a0_0x256f('0x244')](_0x545912[0x0]-_0x3bf2d9[0x0],0x2)+Math[a0_0x256f('0x244')](_0x545912[0x1]-_0x3bf2d9[0x1],0x2));}},{'key':'wholeDistance','value':function(_0x36336c){for(var _0xedb0f2=0x0,_0x265494=0x0;_0x265494<_0x36336c['length']-0x1;_0x265494++)_0xedb0f2+=this[a0_0x256f('0x177')](_0x36336c[_0x265494],_0x36336c[_0x265494+0x1]);return _0xedb0f2;}},{'key':a0_0x256f('0x607'),'value':function(_0xd5327e){return Math['pow'](this[a0_0x256f('0x123')](_0xd5327e),0.99);}},{'key':a0_0x256f('0x3c6'),'value':function(_0x48277b,_0x4f46b7){return[(_0x48277b[0x0]+_0x4f46b7[0x0])/0x2,(_0x48277b[0x1]+_0x4f46b7[0x1])/0x2];}},{'key':a0_0x256f('0x43'),'value':function(_0x792155,_0x4aa109,_0x4a0ae3){var _0x4a23a2=[(_0x792155[0x0]+_0x4aa109[0x0])/0x2,(_0x792155[0x1]+_0x4aa109[0x1])/0x2],_0x1de372=[_0x4a23a2[0x0]-_0x792155[0x1]+_0x4aa109[0x1],_0x4a23a2[0x1]+_0x792155[0x0]-_0x4aa109[0x0]],_0x588e5e=[(_0x792155[0x0]+_0x4a0ae3[0x0])/0x2,(_0x792155[0x1]+_0x4a0ae3[0x1])/0x2],_0x189c89=[_0x588e5e[0x0]-_0x792155[0x1]+_0x4a0ae3[0x1],_0x588e5e[0x1]+_0x792155[0x0]-_0x4a0ae3[0x0]];return this[a0_0x256f('0x346')](_0x4a23a2,_0x1de372,_0x588e5e,_0x189c89);}},{'key':'getIntersectPoint','value':function(_0x1efd96,_0x46dcf6,_0x251311,_0x57536b){var _0xcdcba8,_0x359b3d,_0x482f49;return _0x1efd96[0x1]===_0x46dcf6[0x1]?[(_0x359b3d=(_0x57536b[0x0]-_0x251311[0x0])/(_0x57536b[0x1]-_0x251311[0x1]))*(_0x1efd96[0x1]-_0x251311[0x1])+_0x251311[0x0],_0xcdcba8=_0x1efd96[0x1]]:_0x251311[0x1]===_0x57536b[0x1]?[(_0x482f49=(_0x46dcf6[0x0]-_0x1efd96[0x0])/(_0x46dcf6[0x1]-_0x1efd96[0x1]))*(_0x251311[0x1]-_0x1efd96[0x1])+_0x1efd96[0x0],_0xcdcba8=_0x251311[0x1]]:(_0x482f49=(_0x46dcf6[0x0]-_0x1efd96[0x0])/(_0x46dcf6[0x1]-_0x1efd96[0x1]),_0x359b3d=(_0x57536b[0x0]-_0x251311[0x0])/(_0x57536b[0x1]-_0x251311[0x1]),[_0x482f49*(_0xcdcba8=(_0x482f49*_0x1efd96[0x1]-_0x1efd96[0x0]-_0x359b3d*_0x251311[0x1]+_0x251311[0x0])/(_0x482f49-_0x359b3d))-_0x482f49*_0x1efd96[0x1]+_0x1efd96[0x0],_0xcdcba8]);}},{'key':a0_0x256f('0x1fb'),'value':function(_0x3a104b,_0x2e7504){var _0x4554a2,_0x34e7a5=Math[a0_0x256f('0x3cb')](Math[a0_0x256f('0x15b')](_0x2e7504[0x1]-_0x3a104b[0x1])/this[a0_0x256f('0x177')](_0x3a104b,_0x2e7504));return _0x2e7504[0x1]>=_0x3a104b[0x1]&&_0x2e7504[0x0]>=_0x3a104b[0x0]?_0x4554a2=_0x34e7a5+Math['PI']:_0x2e7504[0x1]>=_0x3a104b[0x1]&&_0x2e7504[0x0]<_0x3a104b[0x0]?_0x4554a2=_0x186417-_0x34e7a5:_0x2e7504[0x1]<_0x3a104b[0x1]&&_0x2e7504[0x0]<_0x3a104b[0x0]?_0x4554a2=_0x34e7a5:_0x2e7504[0x1]<_0x3a104b[0x1]&&_0x2e7504[0x0]>=_0x3a104b[0x0]&&(_0x4554a2=Math['PI']-_0x34e7a5),_0x4554a2;}},{'key':'getAngleOfThreePoints','value':function(_0xd2d98f,_0x12f624,_0x21988a){var _0x37a070=this['getAzimuth'](_0x12f624,_0xd2d98f)-this[a0_0x256f('0x1fb')](_0x12f624,_0x21988a);return _0x37a070<0x0?_0x37a070+_0x186417:_0x37a070;}},{'key':a0_0x256f('0x285'),'value':function(_0x45d818,_0x34b0d6,_0x177e0e){return(_0x177e0e[0x1]-_0x45d818[0x1])*(_0x34b0d6[0x0]-_0x45d818[0x0])>(_0x34b0d6[0x1]-_0x45d818[0x1])*(_0x177e0e[0x0]-_0x45d818[0x0]);}},{'key':a0_0x256f('0x202'),'value':function(_0x4b93a1,_0x5999ac,_0x294992){return[_0x5999ac[0x0]+_0x4b93a1*(_0x294992[0x0]-_0x5999ac[0x0]),_0x5999ac[0x1]+_0x4b93a1*(_0x294992[0x1]-_0x5999ac[0x1])];}},{'key':a0_0x256f('0x1ce'),'value':function(_0x40d3d5,_0x39f0c0,_0x5b4de8,_0x2f85e5,_0x5057c2){var _0x5cbb90=0x1-(_0x40d3d5=Math[a0_0x256f('0x221')](Math[a0_0x256f('0x511')](_0x40d3d5,0x1),0x0)),_0x51f33e=_0x40d3d5*_0x40d3d5,_0x15c426=_0x51f33e*_0x40d3d5,_0x20b8d7=_0x5cbb90*_0x5cbb90,_0x406e18=_0x20b8d7*_0x5cbb90;return[_0x406e18*_0x39f0c0[0x0]+0x3*_0x20b8d7*_0x40d3d5*_0x5b4de8[0x0]+0x3*_0x5cbb90*_0x51f33e*_0x2f85e5[0x0]+_0x15c426*_0x5057c2[0x0],_0x406e18*_0x39f0c0[0x1]+0x3*_0x20b8d7*_0x40d3d5*_0x5b4de8[0x1]+0x3*_0x5cbb90*_0x51f33e*_0x2f85e5[0x1]+_0x15c426*_0x5057c2[0x1]];}},{'key':a0_0x256f('0x4ce'),'value':function(_0x5cfd9a,_0x4db1ae,_0x25efdc,_0x26ff48,_0x3341ba){var _0x52f524=this[a0_0x256f('0x1fb')](_0x5cfd9a,_0x4db1ae),_0x4abbe6=_0x3341ba?_0x52f524+_0x25efdc:_0x52f524-_0x25efdc,_0x495f6d=_0x26ff48*Math[a0_0x256f('0x441')](_0x4abbe6),_0x4a8124=_0x26ff48*Math[a0_0x256f('0x637')](_0x4abbe6);return[_0x4db1ae[0x0]+_0x495f6d,_0x4db1ae[0x1]+_0x4a8124];}},{'key':a0_0x256f('0x2af'),'value':function(_0x4a8c94,_0x274538,_0x57ccb4,_0x2edc81){var _0x3c8e84,_0x5dfbea,_0x4e253e=[],_0x54fadf=_0x2edc81-_0x57ccb4;_0x54fadf=_0x54fadf<0x0?_0x54fadf+_0x186417:_0x54fadf;for(var _0x3ea333=0x0;_0x3ea333<=0x64;_0x3ea333++){var _0x27ee13=_0x57ccb4+_0x54fadf*_0x3ea333/0x64;_0x3c8e84=_0x4a8c94[0x0]+_0x274538*Math[a0_0x256f('0x441')](_0x27ee13),_0x5dfbea=_0x4a8c94[0x1]+_0x274538*Math['sin'](_0x27ee13),_0x4e253e[a0_0x256f('0x289')]([_0x3c8e84,_0x5dfbea]);}return _0x4e253e;}},{'key':'getBisectorNormals','value':function(_0x2a83db,_0x3abef4,_0x12f1f3,_0x3d5910){var _0x2d9e9d,_0x1f6a79,_0x444234,_0x6978dd=this[a0_0x256f('0x383')](_0x3abef4,_0x12f1f3,_0x3d5910),_0x19bc9e=Math['sqrt'](_0x6978dd[0x0]*_0x6978dd[0x0]+_0x6978dd[0x1]*_0x6978dd[0x1]),_0x4a869a=_0x6978dd[0x0]/_0x19bc9e,_0x386257=_0x6978dd[0x1]/_0x19bc9e,_0x4749e0=this[a0_0x256f('0x177')](_0x3abef4,_0x12f1f3),_0x493302=this[a0_0x256f('0x177')](_0x12f1f3,_0x3d5910);return _0x19bc9e>0.0001?this[a0_0x256f('0x285')](_0x3abef4,_0x12f1f3,_0x3d5910)?(_0x2d9e9d=_0x2a83db*_0x4749e0,_0x444234=[_0x12f1f3[0x0]-_0x2d9e9d*_0x386257,_0x12f1f3[0x1]+_0x2d9e9d*_0x4a869a],_0x2d9e9d=_0x2a83db*_0x493302,_0x1f6a79=[_0x12f1f3[0x0]+_0x2d9e9d*_0x386257,_0x12f1f3[0x1]-_0x2d9e9d*_0x4a869a]):(_0x2d9e9d=_0x2a83db*_0x4749e0,_0x444234=[_0x12f1f3[0x0]+_0x2d9e9d*_0x386257,_0x12f1f3[0x1]-_0x2d9e9d*_0x4a869a],_0x2d9e9d=_0x2a83db*_0x493302,_0x1f6a79=[_0x12f1f3[0x0]-_0x2d9e9d*_0x386257,_0x12f1f3[0x1]+_0x2d9e9d*_0x4a869a]):(_0x444234=[_0x12f1f3[0x0]+_0x2a83db*(_0x3abef4[0x0]-_0x12f1f3[0x0]),_0x12f1f3[0x1]+_0x2a83db*(_0x3abef4[0x1]-_0x12f1f3[0x1])],_0x1f6a79=[_0x12f1f3[0x0]+_0x2a83db*(_0x3d5910[0x0]-_0x12f1f3[0x0]),_0x12f1f3[0x1]+_0x2a83db*(_0x3d5910[0x1]-_0x12f1f3[0x1])]),[_0x444234,_0x1f6a79];}},{'key':a0_0x256f('0x383'),'value':function(_0x19a7de,_0x14b70a,_0x539486){var _0xfb03c3=_0x19a7de[0x0]-_0x14b70a[0x0],_0x14f57b=_0x19a7de[0x1]-_0x14b70a[0x1],_0x3c227c=Math[a0_0x256f('0x16f')](_0xfb03c3*_0xfb03c3+_0x14f57b*_0x14f57b);_0xfb03c3/=_0x3c227c,_0x14f57b/=_0x3c227c;var _0x451b69=_0x539486[0x0]-_0x14b70a[0x0],_0x17cc57=_0x539486[0x1]-_0x14b70a[0x1],_0x4ff4fb=Math[a0_0x256f('0x16f')](_0x451b69*_0x451b69+_0x17cc57*_0x17cc57);return[_0xfb03c3+(_0x451b69/=_0x4ff4fb),_0x14f57b+(_0x17cc57/=_0x4ff4fb)];}},{'key':a0_0x256f('0x568'),'value':function(_0x4d4986,_0x1ae562){for(var _0x3bba4a,_0x32825d,_0x27f0b2,_0x1b2018,_0x55818e=[this[a0_0x256f('0x9d')](_0x4d4986,_0x1ae562)],_0x5573ee=0x0;_0x5573ee<_0x1ae562[a0_0x256f('0x658')]-0x2;_0x5573ee++)_0x3bba4a=_0x1ae562[_0x5573ee],_0x32825d=_0x1ae562[_0x5573ee+0x1],_0x27f0b2=_0x1ae562[_0x5573ee+0x2],_0x1b2018=this[a0_0x256f('0x45c')](_0x4d4986,_0x3bba4a,_0x32825d,_0x27f0b2),_0x55818e=_0x55818e[a0_0x256f('0x318')](_0x1b2018);var _0x22bc6e=this['getRightMostControlPoint'](_0x4d4986,_0x1ae562);_0x55818e[a0_0x256f('0x289')](_0x22bc6e);for(var _0x67ec63=[],_0x33e80a=0x0;_0x33e80a<_0x1ae562[a0_0x256f('0x658')]-0x1;_0x33e80a++){_0x3bba4a=_0x1ae562[_0x33e80a],_0x32825d=_0x1ae562[_0x33e80a+0x1],_0x67ec63[a0_0x256f('0x289')](_0x3bba4a);for(var _0x26582f=0x0;_0x26582f<0x64;_0x26582f++){var _0x1d6ca3=this[a0_0x256f('0x1ce')](_0x26582f/0x64,_0x3bba4a,_0x55818e[0x2*_0x33e80a],_0x55818e[0x2*_0x33e80a+0x1],_0x32825d);_0x67ec63['push'](_0x1d6ca3);}_0x67ec63['push'](_0x32825d);}return _0x67ec63;}},{'key':'getLeftMostControlPoint','value':function(_0x11b224,_0x5ef582){var _0x49f7a5,_0x53ff7c,_0x106e84=_0x5ef582[0x0],_0x339f69=_0x5ef582[0x1],_0xe20103=_0x5ef582[0x2],_0x2c5d42=this[a0_0x256f('0x45c')](0x0,_0x106e84,_0x339f69,_0xe20103)[0x0],_0x42101a=this['getNormal'](_0x106e84,_0x339f69,_0xe20103);if(Math[a0_0x256f('0x16f')](_0x42101a[0x0]*_0x42101a[0x0]+_0x42101a[0x1]*_0x42101a[0x1])>0.0001){var _0x444adb=this['mid'](_0x106e84,_0x339f69),_0x21549d=_0x106e84[0x0]-_0x444adb[0x0],_0x3781d4=_0x106e84[0x1]-_0x444adb[0x1],_0x336a20=0x2/this[a0_0x256f('0x177')](_0x106e84,_0x339f69),_0x1a8783=-_0x336a20*_0x3781d4,_0x5d9688=_0x336a20*_0x21549d,_0x14486b=_0x1a8783*_0x1a8783-_0x5d9688*_0x5d9688,_0x5c5a84=0x2*_0x1a8783*_0x5d9688,_0x7b8384=_0x5d9688*_0x5d9688-_0x1a8783*_0x1a8783,_0x44be5b=_0x2c5d42[0x0]-_0x444adb[0x0],_0x392dcb=_0x2c5d42[0x1]-_0x444adb[0x1];_0x49f7a5=_0x444adb[0x0]+_0x14486b*_0x44be5b+_0x5c5a84*_0x392dcb,_0x53ff7c=_0x444adb[0x1]+_0x5c5a84*_0x44be5b+_0x7b8384*_0x392dcb;}else _0x49f7a5=_0x106e84[0x0]+_0x11b224*(_0x339f69[0x0]-_0x106e84[0x0]),_0x53ff7c=_0x106e84[0x1]+_0x11b224*(_0x339f69[0x1]-_0x106e84[0x1]);return[_0x49f7a5,_0x53ff7c];}},{'key':a0_0x256f('0xeb'),'value':function(_0x1dfc81,_0x50e3fe){var _0x3ac447,_0x33eb02,_0x66df7e=_0x50e3fe[a0_0x256f('0x658')],_0x1a8e81=_0x50e3fe[_0x66df7e-0x3],_0xf6cd28=_0x50e3fe[_0x66df7e-0x2],_0x413a3d=_0x50e3fe[_0x66df7e-0x1],_0x423dc3=this[a0_0x256f('0x45c')](0x0,_0x1a8e81,_0xf6cd28,_0x413a3d)[0x1],_0x425c93=this['getNormal'](_0x1a8e81,_0xf6cd28,_0x413a3d);if(Math['sqrt'](_0x425c93[0x0]*_0x425c93[0x0]+_0x425c93[0x1]*_0x425c93[0x1])>0.0001){var _0xad673b=this[a0_0x256f('0x3c6')](_0xf6cd28,_0x413a3d),_0x2d1b13=_0x413a3d[0x0]-_0xad673b[0x0],_0x3839b9=_0x413a3d[0x1]-_0xad673b[0x1],_0x38ed0d=0x2/this[a0_0x256f('0x177')](_0xf6cd28,_0x413a3d),_0x56b6a=-_0x38ed0d*_0x3839b9,_0x224e82=_0x38ed0d*_0x2d1b13,_0x35e4f4=_0x56b6a*_0x56b6a-_0x224e82*_0x224e82,_0x52dc73=0x2*_0x56b6a*_0x224e82,_0x217847=_0x224e82*_0x224e82-_0x56b6a*_0x56b6a,_0x5d554e=_0x423dc3[0x0]-_0xad673b[0x0],_0x2c7e70=_0x423dc3[0x1]-_0xad673b[0x1];_0x3ac447=_0xad673b[0x0]+_0x35e4f4*_0x5d554e+_0x52dc73*_0x2c7e70,_0x33eb02=_0xad673b[0x1]+_0x52dc73*_0x5d554e+_0x217847*_0x2c7e70;}else _0x3ac447=_0x413a3d[0x0]+_0x1dfc81*(_0xf6cd28[0x0]-_0x413a3d[0x0]),_0x33eb02=_0x413a3d[0x1]+_0x1dfc81*(_0xf6cd28[0x1]-_0x413a3d[0x1]);return[_0x3ac447,_0x33eb02];}},{'key':a0_0x256f('0x2bd'),'value':function(_0x57228f){if(_0x57228f[a0_0x256f('0x658')]<=0x2)return _0x57228f;for(var _0x46074f=[],_0x14ddd4=_0x57228f[a0_0x256f('0x658')]-0x1,_0xd69279=0x0;_0xd69279<=0x1;_0xd69279+=0.01){for(var _0x193f43=0x0,_0x58a90e=0x0,_0x9dfe78=0x0;_0x9dfe78<=_0x14ddd4;_0x9dfe78++){var _0x67abec=this[a0_0x256f('0xb1')](_0x14ddd4,_0x9dfe78),_0x23d4ec=Math[a0_0x256f('0x244')](_0xd69279,_0x9dfe78),_0x27f045=Math['pow'](0x1-_0xd69279,_0x14ddd4-_0x9dfe78);_0x193f43+=_0x67abec*_0x23d4ec*_0x27f045*_0x57228f[_0x9dfe78][0x0],_0x58a90e+=_0x67abec*_0x23d4ec*_0x27f045*_0x57228f[_0x9dfe78][0x1];}_0x46074f[a0_0x256f('0x289')]([_0x193f43,_0x58a90e]);}return _0x46074f[a0_0x256f('0x289')](_0x57228f[_0x14ddd4]),_0x46074f;}},{'key':a0_0x256f('0xb1'),'value':function(_0x5971e3,_0x4eee7e){return this['getFactorial'](_0x5971e3)/(this[a0_0x256f('0x18e')](_0x4eee7e)*this[a0_0x256f('0x18e')](_0x5971e3-_0x4eee7e));}},{'key':a0_0x256f('0x18e'),'value':function(_0x9cc162){if(_0x9cc162<=0x1)return 0x1;if(0x2===_0x9cc162)return 0x2;if(0x3===_0x9cc162)return 0x6;if(0x4===_0x9cc162)return 0x18;if(0x5===_0x9cc162)return 0x78;for(var _0xe7622a=0x1,_0x45c590=0x1;_0x45c590<=_0x9cc162;_0x45c590++)_0xe7622a*=_0x45c590;return _0xe7622a;}},{'key':'getQBSplinePoints','value':function(_0x35f4b5){if(_0x35f4b5[a0_0x256f('0x658')]<=0x2)return _0x35f4b5;var _0x3164d2=[],_0x142de5=_0x35f4b5[a0_0x256f('0x658')]-0x2-0x1;_0x3164d2['push'](_0x35f4b5[0x0]);for(var _0x286fb5=0x0;_0x286fb5<=_0x142de5;_0x286fb5++)for(var _0x3d8df7=0x0;_0x3d8df7<=0x1;_0x3d8df7+=0.05){for(var _0xa17cae=0x0,_0x24c01b=0x0,_0x49d969=0x0;_0x49d969<=0x2;_0x49d969++){var _0x3e7f33=this[a0_0x256f('0x4ea')](_0x49d969,_0x3d8df7);_0xa17cae+=_0x3e7f33*_0x35f4b5[_0x286fb5+_0x49d969][0x0],_0x24c01b+=_0x3e7f33*_0x35f4b5[_0x286fb5+_0x49d969][0x1];}_0x3164d2[a0_0x256f('0x289')]([_0xa17cae,_0x24c01b]);}return _0x3164d2['push'](_0x35f4b5[_0x35f4b5['length']-0x1]),_0x3164d2;}},{'key':'getQuadricBSplineFactor','value':function(_0x4df6fc,_0x15b8ad){return 0x0===_0x4df6fc?Math[a0_0x256f('0x244')](_0x15b8ad-0x1,0x2)/0x2:0x1===_0x4df6fc?(-0x2*Math[a0_0x256f('0x244')](_0x15b8ad,0x2)+0x2*_0x15b8ad+0x1)/0x2:0x2===_0x4df6fc?Math[a0_0x256f('0x244')](_0x15b8ad,0x2)/0x2:0x0;}}]),_0x4f3f14;}();},function(_0x507e3c,_0x268086,_0x462b8c){var _0x25d3c0=_0x462b8c(0x36);_0x507e3c[a0_0x256f('0x5f4')]=function(_0x14098b,_0x8a0a0){if('function'!=typeof _0x8a0a0&&null!==_0x8a0a0)throw new TypeError(a0_0x256f('0x166'));_0x14098b['prototype']=Object[a0_0x256f('0x6b')](_0x8a0a0&&_0x8a0a0[a0_0x256f('0xa8')],{'constructor':{'value':_0x14098b,'writable':!0x0,'configurable':!0x0}}),_0x8a0a0&&_0x25d3c0(_0x14098b,_0x8a0a0);};},function(_0x6ab422,_0x7b9868,_0x28628a){var _0x49ef7e=_0x28628a(0x19),_0x5e2ac2=_0x28628a(0x14);_0x6ab422[a0_0x256f('0x5f4')]=function(_0x322bd1,_0x464ceb){return!_0x464ceb||a0_0x256f('0x146')!==_0x49ef7e(_0x464ceb)&&a0_0x256f('0x560')!=typeof _0x464ceb?_0x5e2ac2(_0x322bd1):_0x464ceb;};},function(_0x190fe9,_0x1f7fa3,_0x79241d){'use strict';_0x1f7fa3['a']={'INITIALIZED':a0_0x256f('0x1dc'),'ADDED':'added','REMOVED':a0_0x256f('0x311'),'CLEARED':a0_0x256f('0x47b'),'INSTALLED':a0_0x256f('0x374'),'ENABLED':'enabled','DISABLED':'disabled','PLAY':a0_0x256f('0x4fc'),'PAUSE':a0_0x256f('0x361'),'RESTORE':a0_0x256f('0x4a1')};},function(_0x3e042e,_0xe4e58,_0xe383a6){'use strict';var _0x395b48=_0xe383a6(0x0),_0xbd4f68=_0xe383a6['n'](_0x395b48),_0x5800e4=_0xe383a6(0x1),_0xd77b71=_0xe383a6['n'](_0x5800e4),_0x16f5b8=_0xe383a6(0xd),_0x52606d=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x16ad5c=new _0x52606d[(a0_0x256f('0x1cb'))](),_0x1a0273=function(){function _0x12d937(){_0xbd4f68()(this,_0x12d937);}return _0xd77b71()(_0x12d937,null,[{'key':a0_0x256f('0x31a'),'value':function(_0x446bd9){if(_0x446bd9){var _0x1a28d5=_0x52606d[a0_0x256f('0x22d')][a0_0x256f('0x1ca')][a0_0x256f('0x228')](_0x446bd9);return new _0x16f5b8['a'](_0x52606d['Math'][a0_0x256f('0xec')](_0x1a28d5[a0_0x256f('0x520')]),_0x52606d[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x1a28d5[a0_0x256f('0x2b1')]),_0x1a28d5['height']);}return new _0x16f5b8['a'](0x0,0x0);}},{'key':'transformWGS84ToCartesian','value':function(_0x26a8e6){return _0x26a8e6?_0x52606d[a0_0x256f('0x534')][a0_0x256f('0x641')](_0x26a8e6['lng'],_0x26a8e6['lat'],_0x26a8e6[a0_0x256f('0x41d')],_0x52606d[a0_0x256f('0x22d')][a0_0x256f('0x1ca')]):_0x52606d[a0_0x256f('0x534')][a0_0x256f('0x5a0')];}},{'key':a0_0x256f('0x6d'),'value':function(_0x1d9e57){return _0x1d9e57?_0x52606d['Cartographic'][a0_0x256f('0x641')](_0x1d9e57[a0_0x256f('0x16e')],_0x1d9e57[a0_0x256f('0x44a')],_0x1d9e57['alt']):_0x52606d[a0_0x256f('0x1db')][a0_0x256f('0x5a0')];}},{'key':'transformCartesianArrayToWGS84Array','value':function(_0x5144cc){var _0x54399e=this;return _0x5144cc?_0x5144cc['map'](function(_0x58070e){return _0x54399e['transformCartesianToWGS84'](_0x58070e);}):[];}},{'key':a0_0x256f('0x1ae'),'value':function(_0x330eb7){var _0x8bcb2=this;return _0x330eb7?_0x330eb7['map'](function(_0x126ca2){return _0x8bcb2[a0_0x256f('0x72')](_0x126ca2);}):[];}},{'key':a0_0x256f('0x10e'),'value':function(_0x5e04f2){var _0x13191a=_0x16ad5c[a0_0x256f('0x639')](_0x52606d[a0_0x256f('0x1db')]['fromDegrees'](_0x5e04f2[a0_0x256f('0x16e')],_0x5e04f2[a0_0x256f('0x44a')],_0x5e04f2['alt']));return new _0x16f5b8['a'](_0x13191a['x'],_0x13191a['y'],_0x13191a['z']);}},{'key':a0_0x256f('0x252'),'value':function(_0x2afdf2){var _0x577633=_0x16ad5c[a0_0x256f('0x1ee')](new _0x52606d[(a0_0x256f('0x534'))](_0x2afdf2[a0_0x256f('0x16e')],_0x2afdf2[a0_0x256f('0x44a')],_0x2afdf2['alt']));return new _0x16f5b8['a'](_0x52606d['Math'][a0_0x256f('0xec')](_0x577633['longitude']),_0x52606d[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x577633[a0_0x256f('0x2b1')]),_0x577633['height']);}},{'key':a0_0x256f('0x5fc'),'value':function(_0x217da8,_0x103367){var _0x5efd89,_0x39f1fb=_0x103367[a0_0x256f('0x2b0')];if(_0x39f1fb[a0_0x256f('0x5aa')]===_0x52606d[a0_0x256f('0xc5')][a0_0x256f('0x25')]){var _0x38c145=_0x39f1fb[a0_0x256f('0x3ee')][a0_0x256f('0x19d')](_0x217da8);_0x5efd89=_0x39f1fb['globe'][a0_0x256f('0x4d8')](_0x38c145,_0x39f1fb);}else _0x5efd89=_0x39f1fb[a0_0x256f('0x3ee')][a0_0x256f('0x377')](_0x217da8,_0x52606d[a0_0x256f('0x22d')][a0_0x256f('0x1ca')]);return this[a0_0x256f('0x31a')](_0x5efd89);}},{'key':a0_0x256f('0x605'),'value':function(_0x4cf7f2,_0x581275){var _0x25cb5e=_0x581275[a0_0x256f('0x2b0')];return _0x52606d[a0_0x256f('0x5d5')]['wgs84ToWindowCoordinates'](_0x25cb5e,this['transformWGS84ToCartesian'](_0x4cf7f2));}}]),_0x12d937;}();_0xe4e58['a']=_0x1a0273;},function(_0xeb0745,_0x3b2079,_0x378ce5){'use strict';var _0x15d0df=_0x378ce5(0x0),_0x2914d2=_0x378ce5['n'](_0x15d0df),_0x37b592=_0x378ce5(0x1),_0x1915bb=_0x378ce5['n'](_0x37b592),_0x42769f=_0x378ce5(0xd),_0x2e2c92=function(){function _0x481964(){_0x2914d2()(this,_0x481964);}return _0x1915bb()(_0x481964,null,[{'key':'parsePosition','value':function(_0x256801){var _0x100097=new _0x42769f['a']();return'string'==typeof _0x256801?_0x100097=_0x42769f['a'][a0_0x256f('0x474')](_0x256801):Array[a0_0x256f('0x4e3')](_0x256801)?_0x100097=_0x42769f['a'][a0_0x256f('0x2d6')](_0x256801):_0x256801 instanceof _0x42769f['a']&&(_0x100097=_0x256801),_0x100097;}},{'key':a0_0x256f('0x442'),'value':function(_0x5aa554){if(a0_0x256f('0xa9')==typeof _0x5aa554){if(_0x5aa554[a0_0x256f('0x266')]('#')>=0x0)throw new Error(a0_0x256f('0x491'));_0x5aa554=_0x5aa554[a0_0x256f('0x514')](';');}return _0x5aa554[a0_0x256f('0x153')](function(_0x33afcc){return Array[a0_0x256f('0x4e3')](_0x33afcc)&&_0x33afcc[a0_0x256f('0x658')]?_0x42769f['a'][a0_0x256f('0x2d6')](_0x33afcc):_0x33afcc instanceof _0x42769f['a']?_0x33afcc:a0_0x256f('0xa9')==typeof _0x33afcc&&_0x33afcc?_0x42769f['a'][a0_0x256f('0x474')](_0x33afcc):void 0x0;});}},{'key':'parsePointCoordToArray','value':function(_0x5e3996){return[(_0x5e3996=this['parsePosition'](_0x5e3996))[a0_0x256f('0x16e')],_0x5e3996[a0_0x256f('0x44a')]];}},{'key':'parsePolylineCoordToArray','value':function(_0x13d615){var _0xce9a4f=[];return(_0x13d615=this[a0_0x256f('0x442')](_0x13d615))[a0_0x256f('0x218')](function(_0x459255){_0xce9a4f[a0_0x256f('0x289')]([_0x459255[a0_0x256f('0x16e')],_0x459255[a0_0x256f('0x44a')]]);}),_0xce9a4f;}},{'key':a0_0x256f('0x107'),'value':function(_0x4fbbf7){var _0x40967a=[];return(_0x4fbbf7=this['parsePositions'](_0x4fbbf7))[a0_0x256f('0x218')](function(_0x4219c0){_0x40967a['push']([_0x4219c0['lng'],_0x4219c0['lat']]);}),[_0x40967a];}}]),_0x481964;}();_0x3b2079['a']=_0x2e2c92;},function(_0x35c86f,_0x5637cf){_0x35c86f[a0_0x256f('0x5f4')]=function(_0x39fe17,_0x40da25,_0x3cb526){return _0x40da25 in _0x39fe17?Object[a0_0x256f('0x21f')](_0x39fe17,_0x40da25,{'value':_0x3cb526,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x39fe17[_0x40da25]=_0x3cb526,_0x39fe17;};},function(_0x3c9710,_0x47084d,_0x7fd3da){'use strict';_0x7fd3da['d'](_0x47084d,'d',function(){return _0x1e5555;}),_0x7fd3da['d'](_0x47084d,'g',function(){return _0x436f1b;}),_0x7fd3da['d'](_0x47084d,'f',function(){return _0x9b3e91;}),_0x7fd3da['d'](_0x47084d,'c',function(){return _0x120230;}),_0x7fd3da['d'](_0x47084d,'b',function(){return _0x5677ce;}),_0x7fd3da['d'](_0x47084d,'e',function(){return _0x16655d;}),_0x7fd3da['d'](_0x47084d,'a',function(){return _0x53ea62;});var _0x22bb09=_0x7fd3da(0x9),_0x164df=_0x7fd3da['n'](_0x22bb09);function _0x265b37(_0xcbf4a6,_0x4e9d2c){var _0x3d18e1=Object[a0_0x256f('0x536')](_0xcbf4a6);if(Object['getOwnPropertySymbols']){var _0x46fd34=Object[a0_0x256f('0x23e')](_0xcbf4a6);_0x4e9d2c&&(_0x46fd34=_0x46fd34['filter'](function(_0x340691){return Object['getOwnPropertyDescriptor'](_0xcbf4a6,_0x340691)['enumerable'];})),_0x3d18e1[a0_0x256f('0x289')]['apply'](_0x3d18e1,_0x46fd34);}return _0x3d18e1;}function _0x339403(_0x59bbbb){for(var _0x3a2a08=0x1;_0x3a2a08<arguments[a0_0x256f('0x658')];_0x3a2a08++){var _0x11a15a=null!=arguments[_0x3a2a08]?arguments[_0x3a2a08]:{};_0x3a2a08%0x2?_0x265b37(Object(_0x11a15a),!0x0)[a0_0x256f('0x218')](function(_0x21eb82){_0x164df()(_0x59bbbb,_0x21eb82,_0x11a15a[_0x21eb82]);}):Object['getOwnPropertyDescriptors']?Object['defineProperties'](_0x59bbbb,Object[a0_0x256f('0x498')](_0x11a15a)):_0x265b37(Object(_0x11a15a))['forEach'](function(_0x3033b5){Object[a0_0x256f('0x21f')](_0x59bbbb,_0x3033b5,Object[a0_0x256f('0x79')](_0x11a15a,_0x3033b5));});}return _0x59bbbb;}var _0x391ec4=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x379bf3={'ADD':'add','REMOVE':a0_0x256f('0x3ec')},_0x1e5555={'CLICK':_0x391ec4['ScreenSpaceEventType'][a0_0x256f('0x3d8')],'RIGHT_CLICK':_0x391ec4[a0_0x256f('0xf8')]['RIGHT_CLICK'],'DB_CLICK':_0x391ec4[a0_0x256f('0xf8')][a0_0x256f('0x51a')],'MOUSE_MOVE':_0x391ec4[a0_0x256f('0xf8')][a0_0x256f('0x37b')],'WHEEL':_0x391ec4[a0_0x256f('0xf8')][a0_0x256f('0x5c8')],'MOUSE_OVER':a0_0x256f('0x556'),'MOUSE_OUT':a0_0x256f('0x2c6')},_0x436f1b={'ADD_LAYER':a0_0x256f('0x5fd'),'REMOVE_LAYER':a0_0x256f('0x288'),'ADD_EFFECT':'addEffect','REMOVE_EFFECT':a0_0x256f('0x369'),'CLICK':_0x391ec4[a0_0x256f('0xf8')][a0_0x256f('0x3d8')],'RIGHT_CLICK':_0x391ec4[a0_0x256f('0xf8')]['RIGHT_CLICK'],'DB_CLICK':_0x391ec4[a0_0x256f('0xf8')][a0_0x256f('0x51a')],'MOUSE_MOVE':_0x391ec4[a0_0x256f('0xf8')][a0_0x256f('0x37b')],'WHEEL':_0x391ec4[a0_0x256f('0xf8')]['WHEEL']},_0x9b3e91={'CAMERA_MOVE_END':'cameraMoveEnd','CAMERA_CHANGED':'cameraChanged','PRE_UPDATE':a0_0x256f('0x439'),'POST_UPDATE':a0_0x256f('0x3f8'),'PRE_RENDER':a0_0x256f('0x3e0'),'POST_RENDER':'postRender','MORPH_COMPLETE':a0_0x256f('0x287'),'CLOCK_TICK':'clockTick'},_0x16655d=_0x339403(_0x339403({},_0x379bf3),{},{'CLICK':_0x391ec4[a0_0x256f('0xf8')][a0_0x256f('0x3d8')],'RIGHT_CLICK':_0x391ec4['ScreenSpaceEventType'][a0_0x256f('0x6e')],'DB_CLICK':_0x391ec4['ScreenSpaceEventType'][a0_0x256f('0x51a')],'MOUSE_OVER':a0_0x256f('0x556'),'MOUSE_OUT':a0_0x256f('0x2c6')}),_0x120230=_0x379bf3,_0x5677ce=_0x379bf3,_0x53ea62=_0x379bf3;},function(_0x276e7d,_0xd37018,_0x3d94a4){'use strict';_0x3d94a4['d'](_0xd37018,'h',function(){return _0x4771b7['d'];}),_0x3d94a4['d'](_0xd37018,'l',function(){return _0x4771b7['f'];}),_0x3d94a4['d'](_0xd37018,'f',function(){return _0x4771b7['c'];}),_0x3d94a4['d'](_0xd37018,'d',function(){return _0x4771b7['b'];}),_0x3d94a4['d'](_0xd37018,'j',function(){return _0x4771b7['e'];}),_0x3d94a4['d'](_0xd37018,'a',function(){return _0x4771b7['a'];}),_0x3d94a4['d'](_0xd37018,'b',function(){return _0x1f01e5['a'];}),_0x3d94a4['d'](_0xd37018,'g',function(){return _0x520e34;}),_0x3d94a4['d'](_0xd37018,'m',function(){return _0x6525cc;}),_0x3d94a4['d'](_0xd37018,'k',function(){return _0x254e2e;}),_0x3d94a4['d'](_0xd37018,'e',function(){return _0x4b5550;}),_0x3d94a4['d'](_0xd37018,'c',function(){return _0x5e97e5;}),_0x3d94a4['d'](_0xd37018,'i',function(){return _0x54064a;});var _0x4771b7=_0x3d94a4(0xa),_0x1f01e5=_0x3d94a4(0x10),_0x50708a=_0x3d94a4(0x9),_0x4fd8c1=_0x3d94a4['n'](_0x50708a),_0x2988ab=_0x3d94a4(0x0),_0x1e85d6=_0x3d94a4['n'](_0x2988ab),_0x37d11d=_0x3d94a4(0x1),_0x219525=_0x3d94a4['n'](_0x37d11d),_0xd32a47=_0x3d94a4(0x14),_0x4b8376=_0x3d94a4['n'](_0xd32a47),_0xde667=_0x3d94a4(0x4),_0x5a9cd1=_0x3d94a4['n'](_0xde667),_0x1e1ead=_0x3d94a4(0x5),_0x6f7547=_0x3d94a4['n'](_0x1e1ead),_0x3409c=_0x3d94a4(0x2),_0x32748e=_0x3d94a4['n'](_0x3409c);function _0x416399(_0x430d32,_0x221c7c){var _0x34f38e=Object[a0_0x256f('0x536')](_0x430d32);if(Object[a0_0x256f('0x23e')]){var _0x4ee30c=Object['getOwnPropertySymbols'](_0x430d32);_0x221c7c&&(_0x4ee30c=_0x4ee30c[a0_0x256f('0x53e')](function(_0x2063a6){return Object[a0_0x256f('0x79')](_0x430d32,_0x2063a6)['enumerable'];})),_0x34f38e[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x34f38e,_0x4ee30c);}return _0x34f38e;}function _0x857710(_0x4eea74){for(var _0x34e8cf=0x1;_0x34e8cf<arguments['length'];_0x34e8cf++){var _0x43e122=null!=arguments[_0x34e8cf]?arguments[_0x34e8cf]:{};_0x34e8cf%0x2?_0x416399(Object(_0x43e122),!0x0)['forEach'](function(_0x3aa858){_0x4fd8c1()(_0x4eea74,_0x3aa858,_0x43e122[_0x3aa858]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x4eea74,Object['getOwnPropertyDescriptors'](_0x43e122)):_0x416399(Object(_0x43e122))[a0_0x256f('0x218')](function(_0x12052e){Object[a0_0x256f('0x21f')](_0x4eea74,_0x12052e,Object[a0_0x256f('0x79')](_0x43e122,_0x12052e));});}return _0x4eea74;}function _0x369df3(_0x68d4eb){var _0x389641=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x2df5f1){return!0x1;}}();return function(){var _0x42f5bc,_0x1545ba=_0x32748e()(_0x68d4eb);if(_0x389641){var _0x2bdba1=_0x32748e()(this)[a0_0x256f('0x3d3')];_0x42f5bc=Reflect[a0_0x256f('0x64c')](_0x1545ba,arguments,_0x2bdba1);}else _0x42f5bc=_0x1545ba[a0_0x256f('0x40')](this,arguments);return _0x6f7547()(this,_0x42f5bc);};}var _0x545b1d=DC['Namespace']['Cesium'],_0x520e34=function(_0x503948){_0x5a9cd1()(_0x52a0b2,_0x503948);var _0x279b7a=_0x369df3(_0x52a0b2);function _0x52a0b2(_0x1c464c){var _0x1d5604;return _0x1e85d6()(this,_0x52a0b2),(_0x1d5604=_0x279b7a[a0_0x256f('0x32b')](this))[a0_0x256f('0x454')]=_0x1c464c,_0x1d5604['_selected']=void 0x0,_0x1d5604[a0_0x256f('0x14d')](),_0x1d5604['on'](_0x4771b7['d'][a0_0x256f('0x453')],_0x1d5604[a0_0x256f('0x267')],_0x4b8376()(_0x1d5604)),_0x1d5604['on'](_0x4771b7['d'][a0_0x256f('0x2ea')],_0x1d5604['_dbClickHandler'],_0x4b8376()(_0x1d5604)),_0x1d5604['on'](_0x4771b7['d'][a0_0x256f('0x6e')],_0x1d5604[a0_0x256f('0x23c')],_0x4b8376()(_0x1d5604)),_0x1d5604['on'](_0x4771b7['d'][a0_0x256f('0x37b')],_0x1d5604['_mouseMoveHandler'],_0x4b8376()(_0x1d5604)),_0x1d5604['on'](_0x4771b7['d'][a0_0x256f('0x5c8')],_0x1d5604[a0_0x256f('0x567')],_0x4b8376()(_0x1d5604)),_0x1d5604;}return _0x219525()(_0x52a0b2,[{'key':a0_0x256f('0x14d'),'value':function(){var _0x9805c9=this,_0x1abaf6=new _0x545b1d[(a0_0x256f('0x7d'))](this['_viewer']['canvas']);Object[a0_0x256f('0x536')](_0x545b1d['ScreenSpaceEventType'])[a0_0x256f('0x218')](function(_0x305638){var _0x302cad=_0x545b1d['ScreenSpaceEventType'][_0x305638];_0x9805c9[a0_0x256f('0xdb')][_0x302cad]=new _0x545b1d['Event'](),_0x1abaf6[a0_0x256f('0x309')](function(_0x3db559){_0x9805c9['_cache'][_0x302cad][a0_0x256f('0x52f')](_0x3db559);},_0x302cad);});}},{'key':a0_0x256f('0x34c'),'value':function(_0x5a7618){var _0x20b9f7,_0x204260=this[a0_0x256f('0x454')][a0_0x256f('0x2b0')],_0x280fa7=_0x204260['pick'](_0x5a7618),_0x72531d=void 0x0;if(_0x204260[a0_0x256f('0xb5')]&&(_0x72531d=_0x204260[a0_0x256f('0x458')](_0x5a7618)),_0x204260[a0_0x256f('0x5aa')]===_0x545b1d[a0_0x256f('0xc5')]['SCENE3D']){var _0x436e35=_0x204260[a0_0x256f('0x3ee')]['getPickRay'](_0x5a7618);_0x20b9f7=_0x204260[a0_0x256f('0x216')]['pick'](_0x436e35,_0x204260);}else _0x20b9f7=_0x204260[a0_0x256f('0x3ee')]['pickEllipsoid'](_0x5a7618,_0x545b1d[a0_0x256f('0x22d')][a0_0x256f('0x1ca')]);return{'target':_0x280fa7,'windowPosition':_0x5a7618,'position':_0x72531d,'surfacePosition':_0x20b9f7};}},{'key':a0_0x256f('0x38'),'value':function(_0x112a34){var _0x4cd058=void 0x0;return _0x112a34&&_0x112a34['id']&&_0x112a34['id']instanceof _0x545b1d[a0_0x256f('0x39d')]&&(_0x4cd058=_0x112a34['id'][a0_0x256f('0x1a1')]),_0x112a34&&_0x112a34 instanceof _0x545b1d['Cesium3DTileFeature']&&(_0x4cd058=_0x112a34[a0_0x256f('0x4af')][a0_0x256f('0x1a1')]),_0x4cd058;}},{'key':a0_0x256f('0x3d6'),'value':function(_0x46c8d4){var _0x1fc3ca=void 0x0,_0xd06e09=void 0x0,_0x41135c=void 0x0;return(_0x46c8d4&&_0x46c8d4['id']&&_0x46c8d4['id']instanceof _0x545b1d[a0_0x256f('0x39d')]&&(_0xd06e09=this[a0_0x256f('0x454')][a0_0x256f('0x20f')]()[a0_0x256f('0x53e')](function(_0x1461bf){return _0x1461bf[a0_0x256f('0x50a')]===_0x46c8d4['id'][a0_0x256f('0x50a')];})[0x0])&&_0xd06e09[a0_0x256f('0x25c')]&&(_0x1fc3ca=_0xd06e09[a0_0x256f('0x25c')](_0x46c8d4['id'][a0_0x256f('0x1a1')])),_0x46c8d4&&_0x46c8d4 instanceof _0x545b1d[a0_0x256f('0x113')])&&(_0xd06e09=this[a0_0x256f('0x454')][a0_0x256f('0x20f')]()[a0_0x256f('0x53e')](function(_0x37ed26){return _0x37ed26[a0_0x256f('0x50a')]===_0x46c8d4[a0_0x256f('0x4af')][a0_0x256f('0x50a')];})[0x0],_0x41135c=_0x46c8d4,_0xd06e09&&_0xd06e09['getOverlay']&&(_0x1fc3ca=_0xd06e09[a0_0x256f('0x25c')](_0x46c8d4[a0_0x256f('0x4af')][a0_0x256f('0x1a1')]),_0x41135c&&_0x41135c[a0_0x256f('0x1eb')]&&_0x41135c[a0_0x256f('0x1eb')]()[a0_0x256f('0x218')](function(_0x200656){_0x1fc3ca['attr'][_0x200656]=_0x41135c[a0_0x256f('0x482')](_0x200656);}))),{'layer':_0xd06e09,'overlay':_0x1fc3ca,'feature':_0x41135c};}},{'key':a0_0x256f('0x51d'),'value':function(_0x43f0e5){var _0x5650eb=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{},_0x46b882=void 0x0,_0x5e08d4=this[a0_0x256f('0x3d6')](_0x5650eb[a0_0x256f('0x58f')]),_0x44d90c=null==_0x5e08d4?void 0x0:_0x5e08d4[a0_0x256f('0x354')];_0x44d90c&&_0x44d90c[a0_0x256f('0x3eb')]&&(_0x46b882=_0x44d90c['overlayEvent'][a0_0x256f('0x1ba')](_0x43f0e5)),_0x46b882&&0x0!==_0x46b882[a0_0x256f('0x51c')]||(_0x46b882=this[a0_0x256f('0x454')][a0_0x256f('0x619')]['getEvent'](_0x43f0e5)),_0x46b882&&_0x46b882[a0_0x256f('0x51c')]>0x0&&_0x46b882[a0_0x256f('0x52f')](_0x857710(_0x857710({},_0x5e08d4),_0x5650eb));}},{'key':'_clickHandler','value':function(_0xe0cde4){if(!_0xe0cde4||!_0xe0cde4[a0_0x256f('0x13c')])return!0x1;var _0x34f944=this[a0_0x256f('0x34c')](_0xe0cde4[a0_0x256f('0x13c')]);this['_raiseEvent'](_0x4771b7['d'][a0_0x256f('0x453')],_0x34f944);}},{'key':a0_0x256f('0x523'),'value':function(_0x3f2c35){if(!_0x3f2c35||!_0x3f2c35[a0_0x256f('0x13c')])return!0x1;var _0x389608=this[a0_0x256f('0x34c')](_0x3f2c35[a0_0x256f('0x13c')]);this[a0_0x256f('0x51d')](_0x4771b7['d'][a0_0x256f('0x2ea')],_0x389608);}},{'key':a0_0x256f('0x23c'),'value':function(_0x2a4b2d){if(!_0x2a4b2d||!_0x2a4b2d[a0_0x256f('0x13c')])return!0x1;var _0x55d88b=this[a0_0x256f('0x34c')](_0x2a4b2d[a0_0x256f('0x13c')]);this[a0_0x256f('0x51d')](_0x4771b7['d']['RIGHT_CLICK'],_0x55d88b);}},{'key':'_mouseMoveHandler','value':function(_0x55ca98){if(!_0x55ca98||!_0x55ca98[a0_0x256f('0x14')])return!0x1;var _0x3bfc18=this[a0_0x256f('0x34c')](_0x55ca98['endPosition']);this[a0_0x256f('0x454')][a0_0x256f('0x54f')][a0_0x256f('0x19b')][a0_0x256f('0x34f')]=_0x3bfc18[a0_0x256f('0x58f')]?'pointer':a0_0x256f('0x516'),this['_raiseEvent'](_0x4771b7['d'][a0_0x256f('0x37b')],_0x3bfc18),this[a0_0x256f('0x43a')]&&this[a0_0x256f('0x38')](this[a0_0x256f('0x43a')][a0_0x256f('0x58f')])===this[a0_0x256f('0x38')](_0x3bfc18['target'])||(this[a0_0x256f('0x51d')](_0x4771b7['d'][a0_0x256f('0x1b5')],this[a0_0x256f('0x43a')]),this[a0_0x256f('0x51d')](_0x4771b7['d'][a0_0x256f('0x3bf')],_0x3bfc18),this[a0_0x256f('0x43a')]=_0x3bfc18);}},{'key':a0_0x256f('0x567'),'value':function(_0x241f58){this[a0_0x256f('0x51d')](_0x4771b7['d'][a0_0x256f('0x5c8')],{'movement':_0x241f58});}}]),_0x52a0b2;}(_0x1f01e5['a']);function _0x475c4e(_0x562ab9){var _0x577b3e=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x20d7c1){return!0x1;}}();return function(){var _0x5bdffb,_0x33fb33=_0x32748e()(_0x562ab9);if(_0x577b3e){var _0x45eaf3=_0x32748e()(this)[a0_0x256f('0x3d3')];_0x5bdffb=Reflect[a0_0x256f('0x64c')](_0x33fb33,arguments,_0x45eaf3);}else _0x5bdffb=_0x33fb33[a0_0x256f('0x40')](this,arguments);return _0x6f7547()(this,_0x5bdffb);};}var _0x2adc4b=DC[a0_0x256f('0x3bd')]['Cesium'],_0x6525cc=function(_0x5ad116){_0x5a9cd1()(_0x54c74d,_0x5ad116);var _0xd7d02d=_0x475c4e(_0x54c74d);function _0x54c74d(){return _0x1e85d6()(this,_0x54c74d),_0xd7d02d[a0_0x256f('0x32b')](this);}return _0x219525()(_0x54c74d,[{'key':a0_0x256f('0x4aa'),'value':function(){var _0x10773b=this;Object[a0_0x256f('0x536')](_0x4771b7['g'])[a0_0x256f('0x218')](function(_0x239f4a){var _0x1cd3c8=_0x4771b7['g'][_0x239f4a];_0x10773b[a0_0x256f('0xdb')][_0x1cd3c8]=new _0x2adc4b[(a0_0x256f('0x4c9'))]();});}}]),_0x54c74d;}(_0x1f01e5['a']);function _0x435b13(_0x19072a){var _0x2bb14b=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x19ea89){return!0x1;}}();return function(){var _0xb202aa,_0x56c5fa=_0x32748e()(_0x19072a);if(_0x2bb14b){var _0x49c558=_0x32748e()(this)[a0_0x256f('0x3d3')];_0xb202aa=Reflect[a0_0x256f('0x64c')](_0x56c5fa,arguments,_0x49c558);}else _0xb202aa=_0x56c5fa[a0_0x256f('0x40')](this,arguments);return _0x6f7547()(this,_0xb202aa);};}var _0x254e2e=function(_0x2ca187){_0x5a9cd1()(_0x234703,_0x2ca187);var _0x4ae4c2=_0x435b13(_0x234703);function _0x234703(_0x4240c3){var _0xe2700f;return _0x1e85d6()(this,_0x234703),(_0xe2700f=_0x4ae4c2[a0_0x256f('0x32b')](this))[a0_0x256f('0x564')]=_0x4240c3['delegate'][a0_0x256f('0x3ee')],_0xe2700f[a0_0x256f('0xc')]=_0x4240c3['delegate'][a0_0x256f('0x2b0')],_0xe2700f[a0_0x256f('0x636')]=_0x4240c3[a0_0x256f('0x64a')]['clock'],_0xe2700f;}return _0x219525()(_0x234703,[{'key':'on','value':function(_0x5aca48,_0x48085f,_0x46d141){var _0x19296e=void 0x0;switch(_0x5aca48){case _0x4771b7['f']['CAMERA_MOVE_END']:_0x19296e=this[a0_0x256f('0x564')][a0_0x256f('0x233')][a0_0x256f('0x429')](_0x48085f,_0x46d141||this);break;case _0x4771b7['f'][a0_0x256f('0x30')]:_0x19296e=this[a0_0x256f('0x564')][a0_0x256f('0x528')][a0_0x256f('0x429')](_0x48085f,_0x46d141||this);break;case _0x4771b7['f'][a0_0x256f('0x2d7')]:_0x19296e=this['_scene']['preUpdate']['addEventListener'](_0x48085f,_0x46d141||this);break;case _0x4771b7['f'][a0_0x256f('0x1f3')]:_0x19296e=this[a0_0x256f('0xc')][a0_0x256f('0x3f8')]['addEventListener'](_0x48085f,_0x46d141||this);break;case _0x4771b7['f'][a0_0x256f('0x145')]:_0x19296e=this[a0_0x256f('0xc')][a0_0x256f('0x3e0')]['addEventListener'](_0x48085f,_0x46d141||this);break;case _0x4771b7['f']['POST_RENDER']:_0x19296e=this[a0_0x256f('0xc')][a0_0x256f('0x24b')][a0_0x256f('0x429')](_0x48085f,_0x46d141||this);break;case _0x4771b7['f'][a0_0x256f('0x241')]:_0x19296e=this[a0_0x256f('0xc')][a0_0x256f('0x287')][a0_0x256f('0x429')](_0x48085f,_0x46d141||this);break;case _0x4771b7['f'][a0_0x256f('0x5a8')]:_0x19296e=this[a0_0x256f('0x636')][a0_0x256f('0x108')][a0_0x256f('0x429')](_0x48085f,_0x46d141||this);}return _0x19296e;}},{'key':a0_0x256f('0x2e2'),'value':function(_0x1fbb5f,_0x25db6c,_0x3f52ff){var _0x500954=!0x1;switch(_0x1fbb5f){case _0x4771b7['f'][a0_0x256f('0x2cd')]:_0x500954=this[a0_0x256f('0x564')][a0_0x256f('0x233')][a0_0x256f('0xba')](_0x25db6c,_0x3f52ff||this);break;case _0x4771b7['f'][a0_0x256f('0x30')]:_0x500954=this[a0_0x256f('0x564')][a0_0x256f('0x528')]['removeEventListener'](_0x25db6c,_0x3f52ff||this);break;case _0x4771b7['f'][a0_0x256f('0x2d7')]:_0x500954=this[a0_0x256f('0xc')]['preUpdate'][a0_0x256f('0xba')](_0x25db6c,_0x3f52ff||this);break;case _0x4771b7['f'][a0_0x256f('0x1f3')]:_0x500954=this[a0_0x256f('0xc')][a0_0x256f('0x3f8')][a0_0x256f('0xba')](_0x25db6c,_0x3f52ff||this);break;case _0x4771b7['f'][a0_0x256f('0x145')]:_0x500954=this['_scene']['preRender'][a0_0x256f('0xba')](_0x25db6c,_0x3f52ff||this);break;case _0x4771b7['f'][a0_0x256f('0x5d7')]:_0x500954=this[a0_0x256f('0xc')][a0_0x256f('0x24b')][a0_0x256f('0xba')](_0x25db6c,_0x3f52ff||this);break;case _0x4771b7['f'][a0_0x256f('0x241')]:_0x500954=this[a0_0x256f('0xc')][a0_0x256f('0x287')][a0_0x256f('0xba')](_0x25db6c,_0x3f52ff||this);break;case _0x4771b7['f'][a0_0x256f('0x5a8')]:_0x500954=this['_clock'][a0_0x256f('0x108')][a0_0x256f('0xba')](_0x25db6c,_0x3f52ff||this);}return _0x500954;}}]),_0x234703;}(_0x1f01e5['a']);function _0x5e8e21(_0x4a87b8){var _0x214e36=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x48aa59){return!0x1;}}();return function(){var _0x4a74ea,_0xa8ec92=_0x32748e()(_0x4a87b8);if(_0x214e36){var _0x37ccbb=_0x32748e()(this)[a0_0x256f('0x3d3')];_0x4a74ea=Reflect[a0_0x256f('0x64c')](_0xa8ec92,arguments,_0x37ccbb);}else _0x4a74ea=_0xa8ec92[a0_0x256f('0x40')](this,arguments);return _0x6f7547()(this,_0x4a74ea);};}var _0x513afe=DC[a0_0x256f('0x3bd')]['Cesium'],_0x4b5550=function(_0xfd629){_0x5a9cd1()(_0x2f60f4,_0xfd629);var _0x1b71f2=_0x5e8e21(_0x2f60f4);function _0x2f60f4(){return _0x1e85d6()(this,_0x2f60f4),_0x1b71f2[a0_0x256f('0x32b')](this);}return _0x219525()(_0x2f60f4,[{'key':a0_0x256f('0x4aa'),'value':function(){var _0x20426c=this;Object[a0_0x256f('0x536')](_0x4771b7['c'])[a0_0x256f('0x218')](function(_0x53f980){var _0x5e8100=_0x4771b7['c'][_0x53f980];_0x20426c[a0_0x256f('0xdb')][_0x5e8100]=new _0x513afe[(a0_0x256f('0x4c9'))]();});}}]),_0x2f60f4;}(_0x1f01e5['a']);function _0x53611f(_0x1c96a0){var _0x26338e=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct']['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x3dfd13){return!0x1;}}();return function(){var _0x53c0b5,_0x2c5624=_0x32748e()(_0x1c96a0);if(_0x26338e){var _0x5ac98f=_0x32748e()(this)[a0_0x256f('0x3d3')];_0x53c0b5=Reflect[a0_0x256f('0x64c')](_0x2c5624,arguments,_0x5ac98f);}else _0x53c0b5=_0x2c5624['apply'](this,arguments);return _0x6f7547()(this,_0x53c0b5);};}var _0x3cd247=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5e97e5=function(_0x40c8ba){_0x5a9cd1()(_0x1c4c97,_0x40c8ba);var _0x315baf=_0x53611f(_0x1c4c97);function _0x1c4c97(){return _0x1e85d6()(this,_0x1c4c97),_0x315baf[a0_0x256f('0x32b')](this);}return _0x219525()(_0x1c4c97,[{'key':'_registerEvent','value':function(){var _0x474d84=this;Object[a0_0x256f('0x536')](_0x4771b7['b'])[a0_0x256f('0x218')](function(_0x9e82db){var _0x1208b5=_0x4771b7['b'][_0x9e82db];_0x474d84['_cache'][_0x1208b5]=new _0x3cd247['Event']();});}}]),_0x1c4c97;}(_0x1f01e5['a']);function _0xa93248(_0x4ff06c){var _0x5034e5=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0xce1807){return!0x1;}}();return function(){var _0x228dd6,_0x3c1d1e=_0x32748e()(_0x4ff06c);if(_0x5034e5){var _0x55ce8c=_0x32748e()(this)['constructor'];_0x228dd6=Reflect[a0_0x256f('0x64c')](_0x3c1d1e,arguments,_0x55ce8c);}else _0x228dd6=_0x3c1d1e[a0_0x256f('0x40')](this,arguments);return _0x6f7547()(this,_0x228dd6);};}var _0x2bbc1a=DC['Namespace']['Cesium'],_0x54064a=function(_0x1d3d72){_0x5a9cd1()(_0x2a53bf,_0x1d3d72);var _0x29122a=_0xa93248(_0x2a53bf);function _0x2a53bf(){return _0x1e85d6()(this,_0x2a53bf),_0x29122a[a0_0x256f('0x32b')](this);}return _0x219525()(_0x2a53bf,[{'key':a0_0x256f('0x4aa'),'value':function(){var _0x4859fc=this;Object[a0_0x256f('0x536')](_0x4771b7['e'])['forEach'](function(_0x3a72d4){var _0x71dfa0=_0x4771b7['e'][_0x3a72d4];_0x4859fc['_cache'][_0x71dfa0]=new _0x2bbc1a[(a0_0x256f('0x4c9'))]();});}}]),_0x2a53bf;}(_0x1f01e5['a']);},function(_0x2794c0,_0x576aff,_0x4a5788){'use strict';var _0x449d81=_0x4a5788(0x0),_0x393041=_0x4a5788['n'](_0x449d81),_0x5f2030=_0x4a5788(0x1),_0x3468f1=_0x4a5788['n'](_0x5f2030),_0xda36b7=_0x4a5788(0x3),_0xf72bf2=_0x4a5788(0xb),_0xe06e63=_0x4a5788(0x6),_0x402805=_0x4a5788(0x17),_0x378f30=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x4e9c59=function(){function _0x633be1(_0x2fee92){_0x393041()(this,_0x633be1),this[a0_0x256f('0x616')]=_0xda36b7['c']['uuid'](),this[a0_0x256f('0x10f')]=_0x2fee92||_0xda36b7['c'][a0_0x256f('0x37e')](),this[a0_0x256f('0x10')]=void 0x0,this[a0_0x256f('0x454')]=void 0x0,this[a0_0x256f('0x2fa')]=void 0x0,this['_show']=!0x0,this[a0_0x256f('0xdb')]={},this['_attr']={},this[a0_0x256f('0x581')]=new _0xf72bf2['c'](),this['_layerEvent']['on'](_0xf72bf2['d'][a0_0x256f('0x25e')],this[a0_0x256f('0x21c')],this),this['_layerEvent']['on'](_0xf72bf2['d'][a0_0x256f('0x5a7')],this[a0_0x256f('0x1e1')],this),this[a0_0x256f('0x2fa')]=void 0x0,this[a0_0x256f('0x195')]=void 0x0;}return _0x3468f1()(_0x633be1,[{'key':'_addedHook','value':function(){}},{'key':a0_0x256f('0x611'),'value':function(){}},{'key':a0_0x256f('0x21c'),'value':function(_0x32e00a){this[a0_0x256f('0x454')]=_0x32e00a,this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')]instanceof _0x378f30[a0_0x256f('0x1bd')]?this[a0_0x256f('0x454')][a0_0x256f('0x2b0')]['primitives']['add'](this[a0_0x256f('0x10')]):this[a0_0x256f('0x454')][a0_0x256f('0x194')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]),this[a0_0x256f('0x5bc')]&&this['_addedHook'](),this[a0_0x256f('0x2fa')]=_0xe06e63['a'][a0_0x256f('0x135')]);}},{'key':a0_0x256f('0x1e1'),'value':function(){this[a0_0x256f('0x10')]&&this[a0_0x256f('0x454')]&&(this[a0_0x256f('0xdb')]={},this[a0_0x256f('0x10')]instanceof _0x378f30[a0_0x256f('0x1bd')]?(this[a0_0x256f('0x10')]['removeAll'](),this[a0_0x256f('0x454')]['scene']['primitives'][a0_0x256f('0x3ec')](this[a0_0x256f('0x10')])):this[a0_0x256f('0x10')][a0_0x256f('0x2a8')]?(this[a0_0x256f('0x10')]['then'](function(_0x46e856){_0x46e856[a0_0x256f('0x365')][a0_0x256f('0x45b')]();}),this[a0_0x256f('0x454')][a0_0x256f('0x194')]['remove'](this[a0_0x256f('0x10')])):(this['_delegate']['entities']&&this[a0_0x256f('0x10')]['entities'][a0_0x256f('0x45b')](),this[a0_0x256f('0x454')]['dataSources']['remove'](this[a0_0x256f('0x10')])),this[a0_0x256f('0x611')]&&this[a0_0x256f('0x611')](),this['_state']=_0xe06e63['a'][a0_0x256f('0x234')]);}},{'key':a0_0x256f('0x5bf'),'value':function(_0x1b500f){_0x1b500f&&_0x1b500f[a0_0x256f('0x3eb')]&&!this[a0_0x256f('0xdb')][a0_0x256f('0x592')](_0x1b500f['overlayId'])&&(_0x1b500f[a0_0x256f('0x3eb')][a0_0x256f('0xff')](_0xf72bf2['j'][a0_0x256f('0x25e')],this),this[a0_0x256f('0xdb')][_0x1b500f[a0_0x256f('0x1a1')]]=_0x1b500f,this[a0_0x256f('0x2fa')]===_0xe06e63['a']['CLEARED']&&(this[a0_0x256f('0x2fa')]=_0xe06e63['a']['ADDED']));}},{'key':'_removeOverlay','value':function(_0x536723){_0x536723&&_0x536723[a0_0x256f('0x3eb')]&&this['_cache']['hasOwnProperty'](_0x536723[a0_0x256f('0x1a1')])&&(_0x536723[a0_0x256f('0x3eb')]['fire'](_0xf72bf2['j'][a0_0x256f('0x5a7')],this),delete this[a0_0x256f('0xdb')][_0x536723['overlayId']]);}},{'key':a0_0x256f('0x338'),'value':function(_0x47f5c7){return this[a0_0x256f('0x5bf')](_0x47f5c7),this;}},{'key':'addOverlays','value':function(_0x19dce6){var _0x217db6=this;return Array[a0_0x256f('0x4e3')](_0x19dce6)&&_0x19dce6[a0_0x256f('0x218')](function(_0x141d05){_0x217db6[a0_0x256f('0x5bf')](_0x141d05);}),this;}},{'key':a0_0x256f('0x5'),'value':function(_0x5792b9){return this['_removeOverlay'](_0x5792b9),this;}},{'key':a0_0x256f('0x25c'),'value':function(_0x2e93eb){return this[a0_0x256f('0xdb')][_0x2e93eb]||void 0x0;}},{'key':a0_0x256f('0x657'),'value':function(_0x270668){var _0x3af7cd=this,_0x19b7d8=void 0x0;return Object['keys'](this[a0_0x256f('0xdb')])[a0_0x256f('0x218')](function(_0x289664){_0x3af7cd[a0_0x256f('0xdb')][_0x289664]['id']===_0x270668&&(_0x19b7d8=_0x3af7cd[a0_0x256f('0xdb')][_0x289664]);}),_0x19b7d8;}},{'key':'getOverlaysByAttr','value':function(_0x9110a2,_0x125fa6){var _0x92c4e6=[];return this[a0_0x256f('0x63e')](function(_0x41b24e){_0x41b24e[a0_0x256f('0x231')][_0x9110a2]===_0x125fa6&&_0x92c4e6[a0_0x256f('0x289')](_0x41b24e);},this),_0x92c4e6;}},{'key':a0_0x256f('0x63e'),'value':function(_0x231f19,_0x27913d){var _0x578943=this;return Object[a0_0x256f('0x536')](this[a0_0x256f('0xdb')])[a0_0x256f('0x218')](function(_0x460d19){_0x231f19&&_0x231f19[a0_0x256f('0x32b')](_0x27913d||_0x578943,_0x578943[a0_0x256f('0xdb')][_0x460d19]);}),this;}},{'key':a0_0x256f('0x17'),'value':function(){var _0x2985d7=this,_0x1a2b39=[];return Object[a0_0x256f('0x536')](this[a0_0x256f('0xdb')])[a0_0x256f('0x218')](function(_0x4de240){_0x1a2b39[a0_0x256f('0x289')](_0x2985d7[a0_0x256f('0xdb')][_0x4de240]);}),_0x1a2b39;}},{'key':a0_0x256f('0x62'),'value':function(){}},{'key':a0_0x256f('0x3ec'),'value':function(){this[a0_0x256f('0x454')]&&this[a0_0x256f('0x454')]['removeLayer'](this);}},{'key':a0_0x256f('0x102'),'value':function(_0x497c99){return _0x497c99&&_0x497c99['addLayer']&&_0x497c99['addLayer'](this),this;}},{'key':'setStyle','value':function(_0x1a2923){}},{'key':'layerId','get':function(){return this[a0_0x256f('0x616')];}},{'key':'id','get':function(){return this[a0_0x256f('0x10f')];}},{'key':a0_0x256f('0x64a'),'get':function(){return this['_delegate'];}},{'key':'show','set':function(_0x4146da){this[a0_0x256f('0x5ed')]=_0x4146da,this['_delegate']&&(this[a0_0x256f('0x10')][a0_0x256f('0x3e9')]=this[a0_0x256f('0x5ed')]);},'get':function(){return this['_show'];}},{'key':a0_0x256f('0x4e1'),'get':function(){return this[a0_0x256f('0x581')];}},{'key':a0_0x256f('0x231'),'set':function(_0x8d5c4a){this[a0_0x256f('0x1fd')]=_0x8d5c4a;},'get':function(){return this[a0_0x256f('0x1fd')];}},{'key':a0_0x256f('0x65f'),'get':function(){return this[a0_0x256f('0x2fa')];}}],[{'key':'registerType','value':function(_0x31acd9){_0x31acd9&&(_0x402805['a'][_0x31acd9['toLocaleUpperCase']()]=_0x31acd9[a0_0x256f('0x3e2')]());}},{'key':'getLayerType','value':function(_0x436b3e){return _0x402805['a'][_0x436b3e['toLocaleUpperCase']()]||void 0x0;}}]),_0x633be1;}();_0x576aff['a']=_0x4e9c59;},function(_0x29a1cb,_0x3da7f8,_0x501732){'use strict';var _0x4e049c=_0x501732(0x0),_0xcaa3a4=_0x501732['n'](_0x4e049c),_0x3502df=_0x501732(0x1),_0x3ce224=_0x501732['n'](_0x3502df),_0x3a2f96=_0x501732(0x7),_0x2afef2=DC['Namespace']['Cesium'],_0x5e9819=function(){function _0x2f1d4c(_0x323188,_0x42d195,_0x55d230,_0x19c752,_0x286bff,_0x4debad){_0xcaa3a4()(this,_0x2f1d4c),this['_lng']=_0x323188||0x0,this[a0_0x256f('0x197')]=_0x42d195||0x0,this['_alt']=_0x55d230||0x0,this['_heading']=_0x19c752||0x0,this[a0_0x256f('0x404')]=_0x286bff||0x0,this['_roll']=_0x4debad||0x0;}return _0x3ce224()(_0x2f1d4c,[{'key':a0_0x256f('0x4b0'),'value':function(){var _0x187ea0=new _0x2f1d4c(this[a0_0x256f('0x334')],this[a0_0x256f('0x197')],this['_alt'],this[a0_0x256f('0xd5')],this[a0_0x256f('0x404')],this[a0_0x256f('0xaf')]);return JSON['stringify'](_0x187ea0);}},{'key':a0_0x256f('0x177'),'value':function(_0x30f06c){return _0x30f06c&&_0x30f06c instanceof _0x2f1d4c?_0x2afef2[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x3a2f96['a'][a0_0x256f('0x72')](this),_0x3a2f96['a'][a0_0x256f('0x72')](_0x30f06c)):0x0;}},{'key':a0_0x256f('0x531'),'value':function(){var _0x2059b3=new _0x2f1d4c();return _0x2059b3[a0_0x256f('0x16e')]=this[a0_0x256f('0x16e')]||0x0,_0x2059b3[a0_0x256f('0x44a')]=this[a0_0x256f('0x44a')]||0x0,_0x2059b3[a0_0x256f('0x41d')]=this[a0_0x256f('0x41d')]||0x0,_0x2059b3[a0_0x256f('0x569')]=this[a0_0x256f('0x569')]||0x0,_0x2059b3[a0_0x256f('0x3c3')]=this[a0_0x256f('0x3c3')]||0x0,_0x2059b3[a0_0x256f('0x612')]=this['roll']||0x0,_0x2059b3;}},{'key':a0_0x256f('0x33d'),'value':function(){return[this[a0_0x256f('0x16e')],this[a0_0x256f('0x44a')],this[a0_0x256f('0x41d')],this[a0_0x256f('0x569')],this[a0_0x256f('0x3c3')],this['roll']];}},{'key':'toString','value':function(){return''['concat'](this[a0_0x256f('0x16e')],',')[a0_0x256f('0x318')](this[a0_0x256f('0x44a')],',')[a0_0x256f('0x318')](this[a0_0x256f('0x41d')],',')['concat'](this['heading'],',')[a0_0x256f('0x318')](this[a0_0x256f('0x3c3')],',')[a0_0x256f('0x318')](this[a0_0x256f('0x612')]);}},{'key':a0_0x256f('0x16e'),'set':function(_0x58c1d9){this[a0_0x256f('0x334')]=+_0x58c1d9;},'get':function(){return this[a0_0x256f('0x334')];}},{'key':'lat','set':function(_0x4c66c2){this[a0_0x256f('0x197')]=+_0x4c66c2;},'get':function(){return this['_lat'];}},{'key':a0_0x256f('0x41d'),'set':function(_0x85c260){this['_alt']=+_0x85c260;},'get':function(){return this['_alt'];}},{'key':'heading','set':function(_0x11985c){this[a0_0x256f('0xd5')]=+_0x11985c;},'get':function(){return this['_heading'];}},{'key':a0_0x256f('0x3c3'),'set':function(_0x3d81ed){this[a0_0x256f('0x404')]=+_0x3d81ed;},'get':function(){return this['_pitch'];}},{'key':a0_0x256f('0x612'),'set':function(_0x211fd7){this[a0_0x256f('0xaf')]=+_0x211fd7;},'get':function(){return this['_roll'];}}],[{'key':a0_0x256f('0x2d'),'value':function(_0x1bb731){var _0x2a9296=new _0x2f1d4c();return Array[a0_0x256f('0x4e3')](_0x1bb731)&&(_0x2a9296[a0_0x256f('0x16e')]=_0x1bb731[0x0]||0x0,_0x2a9296[a0_0x256f('0x44a')]=_0x1bb731[0x1]||0x0,_0x2a9296[a0_0x256f('0x41d')]=_0x1bb731[0x2]||0x0,_0x2a9296['heading']=_0x1bb731[0x3]||0x0,_0x2a9296['pitch']=_0x1bb731[0x4]||0x0,_0x2a9296[a0_0x256f('0x612')]=_0x1bb731[0x5]||0x0),_0x2a9296;}},{'key':a0_0x256f('0x432'),'value':function(_0xcbc130){var _0x396aa4=new _0x2f1d4c();if(_0xcbc130&&a0_0x256f('0xa9')==typeof _0xcbc130){var _0x502e27=_0xcbc130['split'](',');_0x396aa4=this[a0_0x256f('0x2d')](_0x502e27);}return _0x396aa4;}},{'key':a0_0x256f('0x57d'),'value':function(_0x193db1){var _0x4165ae=new _0x2f1d4c(),_0x53d6ab=JSON[a0_0x256f('0x1c5')](_0x193db1);return _0x53d6ab&&(_0x4165ae[a0_0x256f('0x16e')]=_0x53d6ab['lng']||0x0,_0x4165ae['lat']=_0x53d6ab[a0_0x256f('0x44a')]||0x0,_0x4165ae[a0_0x256f('0x41d')]=_0x53d6ab['alt']||0x0,_0x4165ae[a0_0x256f('0x569')]=_0x53d6ab[a0_0x256f('0x569')]||0x0,_0x4165ae[a0_0x256f('0x3c3')]=_0x53d6ab['pitch']||0x0,_0x4165ae[a0_0x256f('0x612')]=_0x53d6ab[a0_0x256f('0x612')]||0x0),_0x4165ae;}},{'key':a0_0x256f('0x474'),'value':function(_0x36436e){var _0xdc6433=new _0x2f1d4c();return _0x36436e&&a0_0x256f('0xa9')==typeof _0x36436e&&(_0xdc6433=this['fromCoordArray'](_0x36436e[a0_0x256f('0x514')](','))),_0xdc6433;}},{'key':a0_0x256f('0x2d6'),'value':function(_0x501919){var _0x2f030c=new _0x2f1d4c();return Array[a0_0x256f('0x4e3')](_0x501919)&&(_0x2f030c[a0_0x256f('0x16e')]=_0x501919[0x0]||0x0,_0x2f030c[a0_0x256f('0x44a')]=_0x501919[0x1]||0x0,_0x2f030c[a0_0x256f('0x41d')]=_0x501919[0x2]||0x0),_0x2f030c;}}]),_0x2f1d4c;}();_0x3da7f8['a']=_0x5e9819;},function(_0x240027,_0x143073,_0x5ceb8d){'use strict';_0x5ceb8d['d'](_0x143073,'r',function(){return _0x31e386;}),_0x5ceb8d['d'](_0x143073,'q',function(){return _0x282c30;}),_0x5ceb8d['d'](_0x143073,'b',function(){return _0x113f5b;}),_0x5ceb8d['d'](_0x143073,'d',function(){return _0x335969;}),_0x5ceb8d['d'](_0x143073,'i',function(){return _0x5d74c8;}),_0x5ceb8d['d'](_0x143073,'o',function(){return _0xb6c4a2;}),_0x5ceb8d['d'](_0x143073,'t',function(){return _0x288a69;}),_0x5ceb8d['d'](_0x143073,'u',function(){return _0x3d78c0;}),_0x5ceb8d['d'](_0x143073,'v',function(){return _0xca7db6;}),_0x5ceb8d['d'](_0x143073,'p',function(){return _0x4fee3a;}),_0x5ceb8d['d'](_0x143073,'z',function(){return _0x1965f9;}),_0x5ceb8d['d'](_0x143073,'c',function(){return _0x41c7b2;}),_0x5ceb8d['d'](_0x143073,'e',function(){return _0x4ca475;}),_0x5ceb8d['d'](_0x143073,'h',function(){return _0x91c8d3;}),_0x5ceb8d['d'](_0x143073,'k',function(){return _0x4b0a2c;}),_0x5ceb8d['d'](_0x143073,'l',function(){return _0x1822c4;}),_0x5ceb8d['d'](_0x143073,'s',function(){return _0x5b499c;}),_0x5ceb8d['d'](_0x143073,'w',function(){return _0x3c01ef;}),_0x5ceb8d['d'](_0x143073,'x',function(){return _0x51fba1;}),_0x5ceb8d['d'](_0x143073,'A',function(){return _0x5d08f9;}),_0x5ceb8d['d'](_0x143073,'f',function(){return _0x2c6827;}),_0x5ceb8d['d'](_0x143073,'g',function(){return _0x4d5539;}),_0x5ceb8d['d'](_0x143073,'a',function(){return _0x48140;}),_0x5ceb8d['d'](_0x143073,'j',function(){return _0x2eb99f;}),_0x5ceb8d['d'](_0x143073,'m',function(){return _0x5f4cbd;}),_0x5ceb8d['d'](_0x143073,'n',function(){return _0x2f44d7;}),_0x5ceb8d['d'](_0x143073,'y',function(){return _0x44584c;});var _0x31e386={},_0x5f150e=_0x5ceb8d(0x9),_0x254ba4=_0x5ceb8d['n'](_0x5f150e),_0x9a9a21=_0x5ceb8d(0x0),_0x307cd5=_0x5ceb8d['n'](_0x9a9a21),_0x580890=_0x5ceb8d(0x1),_0x323844=_0x5ceb8d['n'](_0x580890),_0x47b8ba=_0x5ceb8d(0x3),_0x15c06e=_0x5ceb8d(0xb),_0x444ad5=_0x5ceb8d(0x6);function _0x1ca6fc(_0x3a16b5,_0x4432b9){var _0x3c5c53=Object[a0_0x256f('0x536')](_0x3a16b5);if(Object[a0_0x256f('0x23e')]){var _0x2bb1af=Object[a0_0x256f('0x23e')](_0x3a16b5);_0x4432b9&&(_0x2bb1af=_0x2bb1af[a0_0x256f('0x53e')](function(_0x5491ec){return Object[a0_0x256f('0x79')](_0x3a16b5,_0x5491ec)[a0_0x256f('0x2ec')];})),_0x3c5c53[a0_0x256f('0x289')]['apply'](_0x3c5c53,_0x2bb1af);}return _0x3c5c53;}function _0x3af62d(_0x166ae3){for(var _0x2d8496=0x1;_0x2d8496<arguments[a0_0x256f('0x658')];_0x2d8496++){var _0x4e9676=null!=arguments[_0x2d8496]?arguments[_0x2d8496]:{};_0x2d8496%0x2?_0x1ca6fc(Object(_0x4e9676),!0x0)[a0_0x256f('0x218')](function(_0x470d8a){_0x254ba4()(_0x166ae3,_0x470d8a,_0x4e9676[_0x470d8a]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x166ae3,Object[a0_0x256f('0x498')](_0x4e9676)):_0x1ca6fc(Object(_0x4e9676))[a0_0x256f('0x218')](function(_0x14e9ad){Object['defineProperty'](_0x166ae3,_0x14e9ad,Object[a0_0x256f('0x79')](_0x4e9676,_0x14e9ad));});}return _0x166ae3;}var _0x282c30=function(){function _0x2bb164(){_0x307cd5()(this,_0x2bb164),this[a0_0x256f('0x616')]=_0x47b8ba['c']['uuid'](),this[a0_0x256f('0x10f')]=_0x47b8ba['c'][a0_0x256f('0x37e')](),this['_delegate']=void 0x0,this['_layer']=void 0x0,this['_state']=void 0x0,this[a0_0x256f('0x5ed')]=!0x0,this[a0_0x256f('0x9b')]={},this['_attr']={},this[a0_0x256f('0x4c3')]=new _0x15c06e['i'](),this[a0_0x256f('0x195')]=void 0x0,this['on'](_0x15c06e['j'][a0_0x256f('0x25e')],this[a0_0x256f('0x21c')],this),this['on'](_0x15c06e['j'][a0_0x256f('0x5a7')],this[a0_0x256f('0x1e1')],this);}return _0x323844()(_0x2bb164,[{'key':a0_0x256f('0x60c'),'value':function(){}},{'key':'_addedHook','value':function(){var _0x35d6eb;if(!this[a0_0x256f('0x10')])return!0x1;this[a0_0x256f('0x10')][a0_0x256f('0x50a')]=null===(_0x35d6eb=this[a0_0x256f('0x1ef')])||void 0x0===_0x35d6eb?void 0x0:_0x35d6eb[a0_0x256f('0x50a')],this[a0_0x256f('0x10')]['overlayId']=this['_id'];}},{'key':a0_0x256f('0x611'),'value':function(){}},{'key':a0_0x256f('0x21c'),'value':function(_0x173b58){var _0x79cb99,_0x3f435b;if(!_0x173b58)return!0x1;this['_layer']=_0x173b58,this['_mountedHook']&&this[a0_0x256f('0x60c')](),(null===(_0x79cb99=this[a0_0x256f('0x1ef')])||void 0x0===_0x79cb99||null===(_0x3f435b=_0x79cb99[a0_0x256f('0x64a')])||void 0x0===_0x3f435b?void 0x0:_0x3f435b['entities'])&&(this[a0_0x256f('0x1ef')][a0_0x256f('0x64a')][a0_0x256f('0x365')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]),this[a0_0x256f('0x5bc')]&&this['_addedHook'](),this[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x135')]);}},{'key':a0_0x256f('0x1e1'),'value':function(){var _0x12ce77,_0x407274;(null===(_0x12ce77=this[a0_0x256f('0x1ef')])||void 0x0===_0x12ce77||null===(_0x407274=_0x12ce77['delegate'])||void 0x0===_0x407274?void 0x0:_0x407274[a0_0x256f('0x365')])&&(this['_layer'][a0_0x256f('0x64a')][a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x10')]),this[a0_0x256f('0x611')]&&this[a0_0x256f('0x611')](),this[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x234')]);}},{'key':'setLabel','value':function(_0x244170,_0x427790){return this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')][a0_0x256f('0x3a4')]=_0x3af62d(_0x3af62d({},_0x427790),{},{'text':_0x244170})),this;}},{'key':'setStyle','value':function(_0x184ace){return this;}},{'key':a0_0x256f('0x3ec'),'value':function(){return this[a0_0x256f('0x1ef')]&&this[a0_0x256f('0x1ef')][a0_0x256f('0x5')](this),this;}},{'key':'addTo','value':function(_0x162a6d){return _0x162a6d&&_0x162a6d[a0_0x256f('0x338')]&&_0x162a6d['addOverlay'](this),this;}},{'key':'on','value':function(_0x62f64f,_0x431fa5,_0xb6581){return this[a0_0x256f('0x4c3')]['on'](_0x62f64f,_0x431fa5,_0xb6581||this),this;}},{'key':a0_0x256f('0x2e2'),'value':function(_0x3e1201,_0x30a11a,_0xc32eeb){return this[a0_0x256f('0x4c3')][a0_0x256f('0x2e2')](_0x3e1201,_0x30a11a,_0xc32eeb||this),this;}},{'key':'fire','value':function(_0x206f6c,_0x131e75){return this[a0_0x256f('0x4c3')]['fire'](_0x206f6c,_0x131e75),this;}},{'key':a0_0x256f('0x1a1'),'get':function(){return this[a0_0x256f('0x616')];}},{'key':'id','set':function(_0x577ddd){return this[a0_0x256f('0x10f')]=_0x577ddd,this;},'get':function(){return this['_bid'];}},{'key':a0_0x256f('0x3e9'),'set':function(_0x302704){return this[a0_0x256f('0x5ed')]=_0x302704,this['_delegate']&&(this['_delegate'][a0_0x256f('0x3e9')]=this[a0_0x256f('0x5ed')]),this;},'get':function(){return this['_show'];}},{'key':a0_0x256f('0x231'),'set':function(_0x5da27c){return this[a0_0x256f('0x1fd')]=_0x5da27c,this;},'get':function(){return this[a0_0x256f('0x1fd')];}},{'key':a0_0x256f('0x3eb'),'get':function(){return this[a0_0x256f('0x4c3')];}},{'key':a0_0x256f('0x64a'),'get':function(){return this[a0_0x256f('0x10')];}},{'key':a0_0x256f('0x65f'),'get':function(){return this[a0_0x256f('0x2fa')];}}],[{'key':a0_0x256f('0x49d'),'value':function(_0x1640c3){_0x1640c3&&(_0x31e386[_0x1640c3[a0_0x256f('0x319')]()]=_0x1640c3['toLocaleLowerCase']());}},{'key':a0_0x256f('0x521'),'value':function(_0x37b2c8){return _0x31e386[_0x37b2c8[a0_0x256f('0x319')]()]||void 0x0;}}]),_0x2bb164;}(),_0x126b34=_0x5ceb8d(0x4),_0x361b3f=_0x5ceb8d['n'](_0x126b34),_0x35484f=_0x5ceb8d(0x5),_0x94f187=_0x5ceb8d['n'](_0x35484f),_0x106fcd=_0x5ceb8d(0x2),_0x30f874=_0x5ceb8d['n'](_0x106fcd),_0xdad4fa=_0x5ceb8d(0x7),_0x32696b=_0x5ceb8d(0x8);function _0x516b47(_0x56d777,_0x16a7d7){var _0x914ae4=Object[a0_0x256f('0x536')](_0x56d777);if(Object['getOwnPropertySymbols']){var _0x1e109f=Object[a0_0x256f('0x23e')](_0x56d777);_0x16a7d7&&(_0x1e109f=_0x1e109f[a0_0x256f('0x53e')](function(_0x48a916){return Object[a0_0x256f('0x79')](_0x56d777,_0x48a916)[a0_0x256f('0x2ec')];})),_0x914ae4[a0_0x256f('0x289')]['apply'](_0x914ae4,_0x1e109f);}return _0x914ae4;}function _0x445db2(_0x2eb188){var _0x1f2172=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x407501){return!0x1;}}();return function(){var _0x5a0079,_0x597cea=_0x30f874()(_0x2eb188);if(_0x1f2172){var _0x16a9e1=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x5a0079=Reflect[a0_0x256f('0x64c')](_0x597cea,arguments,_0x16a9e1);}else _0x5a0079=_0x597cea[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x5a0079);};}var _0x2b494c=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x400b46=function(_0x52b511){_0x361b3f()(_0x5b52cb,_0x52b511);var _0x5f233f=_0x445db2(_0x5b52cb);function _0x5b52cb(_0x2218dc,_0x132b69){var _0x2fc3b6;return _0x307cd5()(this,_0x5b52cb),(_0x2fc3b6=_0x5f233f['call'](this))['_delegate']=new _0x2b494c[(a0_0x256f('0x39d'))]({'billboard':{}}),_0x2fc3b6['_position']=_0x32696b['a'][a0_0x256f('0x10c')](_0x2218dc),_0x2fc3b6[a0_0x256f('0x2c3')]=_0x132b69,_0x2fc3b6[a0_0x256f('0x3a')]=[0x20,0x20],_0x2fc3b6[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x13d')),_0x2fc3b6[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x2fc3b6;}return _0x323844()(_0x5b52cb,[{'key':a0_0x256f('0x60c'),'value':function(){this['position']=this[a0_0x256f('0x666')],this['icon']=this[a0_0x256f('0x2c3')],this[a0_0x256f('0x208')]=this[a0_0x256f('0x3a')];}},{'key':a0_0x256f('0x421'),'value':function(_0x364fad){return _0x364fad&&0x0!==Object[a0_0x256f('0x536')](_0x364fad)[a0_0x256f('0x658')]?(delete _0x364fad['image']&&delete _0x364fad[a0_0x256f('0x140')]&&delete _0x364fad['height'],this[a0_0x256f('0x9b')]=_0x364fad,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')]['billboard'],this[a0_0x256f('0x9b')]),this):this;}},{'key':'position','set':function(_0x219b63){return this[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x219b63),this['_delegate'][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':a0_0x256f('0x5cc'),'set':function(_0x214b39){return this[a0_0x256f('0x2c3')]=_0x214b39,this[a0_0x256f('0x10')][a0_0x256f('0x13d')][a0_0x256f('0x392')]=this[a0_0x256f('0x2c3')],this;},'get':function(){return this[a0_0x256f('0x2c3')];}},{'key':a0_0x256f('0x208'),'set':function(_0x44d85b){if(!Array[a0_0x256f('0x4e3')](_0x44d85b))throw new Error(a0_0x256f('0x343'));return this[a0_0x256f('0x3a')]=_0x44d85b,this[a0_0x256f('0x10')][a0_0x256f('0x13d')][a0_0x256f('0x140')]=this['_size'][0x0]||0x20,this['_delegate'][a0_0x256f('0x13d')][a0_0x256f('0x4fa')]=this[a0_0x256f('0x3a')][0x1]||0x20,this;},'get':function(){return this['_size'];}}],[{'key':a0_0x256f('0x5b2'),'value':function(_0x235ef5){var _0x2d0753,_0x6e4ac8=void 0x0,_0x14b10f=_0x2b494c[a0_0x256f('0x29c')][a0_0x256f('0x2c9')](),_0x2fd0d0=_0xdad4fa['a']['transformCartesianToWGS84'](_0x235ef5[a0_0x256f('0x13c')][a0_0x256f('0x21b')](_0x14b10f));return _0x235ef5[a0_0x256f('0x13d')]&&((_0x6e4ac8=new _0x5b52cb(_0x2fd0d0,_0x235ef5[a0_0x256f('0x13d')][a0_0x256f('0x392')][a0_0x256f('0x21b')](_0x14b10f)))['attr']=function(_0x304979){for(var _0x171c7b=0x1;_0x171c7b<arguments[a0_0x256f('0x658')];_0x171c7b++){var _0x2be964=null!=arguments[_0x171c7b]?arguments[_0x171c7b]:{};_0x171c7b%0x2?_0x516b47(Object(_0x2be964),!0x0)[a0_0x256f('0x218')](function(_0x14f89e){_0x254ba4()(_0x304979,_0x14f89e,_0x2be964[_0x14f89e]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x256f('0x3d9')](_0x304979,Object[a0_0x256f('0x498')](_0x2be964)):_0x516b47(Object(_0x2be964))['forEach'](function(_0x53da15){Object['defineProperty'](_0x304979,_0x53da15,Object['getOwnPropertyDescriptor'](_0x2be964,_0x53da15));});}return _0x304979;}({},null==_0x235ef5||null===(_0x2d0753=_0x235ef5[a0_0x256f('0x624')])||void 0x0===_0x2d0753?void 0x0:_0x2d0753[a0_0x256f('0x21b')](_0x14b10f))),_0x6e4ac8;}}]),_0x5b52cb;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')]('billboard');var _0x113f5b=_0x400b46;function _0x203cfa(_0x468e10){var _0x5ccdc6=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x2d7d98){return!0x1;}}();return function(){var _0x250dbe,_0x50a53d=_0x30f874()(_0x468e10);if(_0x5ccdc6){var _0x33669b=_0x30f874()(this)['constructor'];_0x250dbe=Reflect['construct'](_0x50a53d,arguments,_0x33669b);}else _0x250dbe=_0x50a53d['apply'](this,arguments);return _0x94f187()(this,_0x250dbe);};}var _0x429d36=DC[a0_0x256f('0x3bd')]['Cesium'],_0x592b04=function(_0x39279e){_0x361b3f()(_0x2d539a,_0x39279e);var _0x8653d0=_0x203cfa(_0x2d539a);function _0x2d539a(_0x3011c1,_0x17fc25){var _0x1e9f36;return _0x307cd5()(this,_0x2d539a),(_0x1e9f36=_0x8653d0['call'](this))[a0_0x256f('0x10')]=new _0x429d36['Entity']({'ellipse':{}}),_0x1e9f36['_center']=_0x32696b['a'][a0_0x256f('0x10c')](_0x3011c1),_0x1e9f36[a0_0x256f('0x1fa')]=+_0x17fc25||0x0,_0x1e9f36[a0_0x256f('0x1ac')]=0x0,_0x1e9f36[a0_0x256f('0x57c')]=0x0,_0x1e9f36[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x5ca')),_0x1e9f36[a0_0x256f('0x2fa')]=_0x444ad5['a']['INITIALIZED'],_0x1e9f36;}return _0x323844()(_0x2d539a,[{'key':'_mountedHook','value':function(){this[a0_0x256f('0x532')]=this[a0_0x256f('0x4b4')],this[a0_0x256f('0x223')]=this[a0_0x256f('0x1fa')];}},{'key':a0_0x256f('0x421'),'value':function(_0x510835){return _0x510835&&0x0!==Object['keys'](_0x510835)[a0_0x256f('0x658')]?(delete _0x510835[a0_0x256f('0x122')]&&delete _0x510835[a0_0x256f('0x179')],this[a0_0x256f('0x9b')]=_0x510835,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')]['ellipse'],this[a0_0x256f('0x9b')]),this):this;}},{'key':'center','set':function(_0x14252a){return this[a0_0x256f('0x4b4')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x14252a),this['_delegate'][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x4b4')]),this;},'get':function(){return this[a0_0x256f('0x4b4')];}},{'key':a0_0x256f('0x223'),'set':function(_0x355dd4){return this[a0_0x256f('0x1fa')]=+_0x355dd4,this[a0_0x256f('0x10')][a0_0x256f('0x63d')]['semiMajorAxis']=this[a0_0x256f('0x1fa')],this['_delegate'][a0_0x256f('0x63d')][a0_0x256f('0x179')]=this[a0_0x256f('0x1fa')],this;},'get':function(){return this[a0_0x256f('0x1fa')];}},{'key':'rotateAmount','set':function(_0x461628){var _0x386091=this;return this[a0_0x256f('0x1ac')]=+_0x461628,this[a0_0x256f('0x1ac')]>0x0&&(this[a0_0x256f('0x10')]['ellipse'][a0_0x256f('0x59c')]=new _0x429d36[(a0_0x256f('0x420'))](function(_0x1ab9c0){return _0x386091[a0_0x256f('0x1ac')]>0x0&&(_0x386091[a0_0x256f('0x57c')]+=_0x386091['_rotateAmount'],_0x386091['_stRotation']>=0x168&&(_0x386091[a0_0x256f('0x57c')]=0x0)),_0x386091['_stRotation'];})),this;},'get':function(){return this[a0_0x256f('0x1ac')];}}]),_0x2d539a;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')]('circle');var _0x335969=_0x592b04,_0x47cfe0=_0x5ceb8d(0x11);function _0x49948e(_0x5f0778,_0x20c231){var _0x3e8601=Object[a0_0x256f('0x536')](_0x5f0778);if(Object[a0_0x256f('0x23e')]){var _0x465ffd=Object['getOwnPropertySymbols'](_0x5f0778);_0x20c231&&(_0x465ffd=_0x465ffd[a0_0x256f('0x53e')](function(_0x17f122){return Object[a0_0x256f('0x79')](_0x5f0778,_0x17f122)['enumerable'];})),_0x3e8601['push'][a0_0x256f('0x40')](_0x3e8601,_0x465ffd);}return _0x3e8601;}function _0x251853(_0x52bcbd){var _0x24972e=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x13fdef){return!0x1;}}();return function(){var _0x4d9f8a,_0x51a53f=_0x30f874()(_0x52bcbd);if(_0x24972e){var _0x2c4ba3=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x4d9f8a=Reflect[a0_0x256f('0x64c')](_0x51a53f,arguments,_0x2c4ba3);}else _0x4d9f8a=_0x51a53f[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x4d9f8a);};}var _0xce6432=function(_0x110d50){_0x361b3f()(_0x4bd58c,_0x110d50);var _0x548121=_0x251853(_0x4bd58c);function _0x4bd58c(_0x15c6d8,_0x2f7e0e){var _0x28c5e3;return _0x307cd5()(this,_0x4bd58c),(_0x28c5e3=_0x548121[a0_0x256f('0x32b')](this))[a0_0x256f('0x10')]=_0x47b8ba['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),a0_0x256f('0x3c0')),_0x28c5e3[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x15c6d8),_0x28c5e3[a0_0x256f('0x10')][a0_0x256f('0xbb')]('id',_0x28c5e3[a0_0x256f('0x616')]),_0x47b8ba['c'][a0_0x256f('0x3f4')](_0x28c5e3[a0_0x256f('0x10')]['style'],{'position':a0_0x256f('0x1c'),'top':'0','left':'0'}),_0x28c5e3[a0_0x256f('0x21')]=_0x2f7e0e,_0x28c5e3[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')]('div_icon'),_0x28c5e3[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x28c5e3;}return _0x323844()(_0x4bd58c,[{'key':'_updateStyle','value':function(_0xfe04b9,_0x336924){var _0x4abd2d=a0_0x256f('0x546');if(_0xfe04b9[a0_0x256f('0x381')]){var _0x3ec713=_0xfe04b9[a0_0x256f('0x381')]['x']-this['_delegate'][a0_0x256f('0x302')]/0x2,_0x45ab83=_0xfe04b9[a0_0x256f('0x381')]['y']-this[a0_0x256f('0x10')][a0_0x256f('0x430')]/0x2;_0x4abd2d=a0_0x256f('0x16')[a0_0x256f('0x318')](Math['round'](_0x3ec713),a0_0x256f('0x12c'))['concat'](Math[a0_0x256f('0x329')](_0x45ab83),a0_0x256f('0x220'));}var _0x36b96c='scale3d(1,1,1)',_0x1e580=this[a0_0x256f('0x9b')]['scaleByDistance'];if(_0x336924&&_0x1e580){var _0x11e411=_0x1e580[a0_0x256f('0x440')],_0x3d07d6=_0x1e580[a0_0x256f('0x5f2')],_0x2ce184=_0x336924/_0x1e580['far'];if(_0x336924<_0x1e580[a0_0x256f('0x142')])_0x36b96c=a0_0x256f('0x11a')[a0_0x256f('0x318')](_0x11e411,',')[a0_0x256f('0x318')](_0x11e411,a0_0x256f('0x1d7'));else{if(_0x336924>_0x1e580[a0_0x256f('0x315')])_0x36b96c=a0_0x256f('0x11a')['concat'](_0x3d07d6,',')[a0_0x256f('0x318')](_0x3d07d6,a0_0x256f('0x1d7'));else{var _0x3682bb=_0x3d07d6+_0x2ce184*(_0x11e411-_0x3d07d6);_0x36b96c=a0_0x256f('0x11a')[a0_0x256f('0x318')](_0x3682bb,',')[a0_0x256f('0x318')](_0x3682bb,',1)');}}}var _0x230552=this['_style'][a0_0x256f('0x655')];_0x336924&&_0x230552&&(this[a0_0x256f('0x3e9')]=this[a0_0x256f('0x5ed')]&&Object(_0x47cfe0['g'])(_0x336924,_0x230552[a0_0x256f('0x142')],_0x230552[a0_0x256f('0x315')])),this[a0_0x256f('0x10')][a0_0x256f('0x19b')][a0_0x256f('0x381')]=''['concat'](_0x4abd2d,'\x20')[a0_0x256f('0x318')](_0x36b96c);}},{'key':a0_0x256f('0x21c'),'value':function(_0x495395){var _0x32dbaf=this;this[a0_0x256f('0x1ef')]=_0x495395,this[a0_0x256f('0x1ef')][a0_0x256f('0x64a')][a0_0x256f('0x169')](this[a0_0x256f('0x10')]),this[a0_0x256f('0x10')][a0_0x256f('0x429')](a0_0x256f('0x359'),function(){_0x32dbaf[a0_0x256f('0x4c3')][a0_0x256f('0xff')](_0x15c06e['h'][a0_0x256f('0x453')],{'layer':_0x495395,'overlay':_0x32dbaf,'position':_0xdad4fa['a']['transformWGS84ToCartesian'](_0x32dbaf[a0_0x256f('0x666')])});}),this[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x135')];}},{'key':'_onRemove','value':function(){this[a0_0x256f('0x1ef')]&&(this[a0_0x256f('0x1ef')][a0_0x256f('0x64a')][a0_0x256f('0x37')](this['_delegate']),this[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x234')]);}},{'key':a0_0x256f('0x8f'),'value':function(_0x39e39b,_0x5cb5e5){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x78a41d){return _0x78a41d&&0x0!==Object[a0_0x256f('0x536')](_0x78a41d)[a0_0x256f('0x658')]?(this[a0_0x256f('0x9b')]=_0x78a41d,this['_style'][a0_0x256f('0xbf')]&&_0x47b8ba['a']['addClass'](this[a0_0x256f('0x10')],this[a0_0x256f('0x9b')][a0_0x256f('0xbf')]),this):this;}},{'key':a0_0x256f('0x3e9'),'set':function(_0x31ab17){return this[a0_0x256f('0x5ed')]=_0x31ab17,this[a0_0x256f('0x10')][a0_0x256f('0x19b')][a0_0x256f('0x32d')]=this[a0_0x256f('0x5ed')]?a0_0x256f('0x297'):a0_0x256f('0x53'),this;},'get':function(){return this['_show'];}},{'key':'position','set':function(_0x24f5cd){return this[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x24f5cd),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':'content','set':function(_0x13c52e){if(_0x13c52e&&'string'==typeof _0x13c52e)this[a0_0x256f('0x10')][a0_0x256f('0x52')]=_0x13c52e;else{if(_0x13c52e&&_0x13c52e instanceof Element){for(;this[a0_0x256f('0x10')][a0_0x256f('0x4d7')]();)this[a0_0x256f('0x10')]['removeChild'](this['_delegate'][a0_0x256f('0x3ca')]);this[a0_0x256f('0x10')][a0_0x256f('0x169')](_0x13c52e);}}return this;},'get':function(){return this[a0_0x256f('0x10')][a0_0x256f('0x1a4')]||[];}}],[{'key':'fromEntity','value':function(_0x4d598e,_0x399343){var _0x968b2,_0x479045,_0x2f1815=Cesium[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]();return(_0x968b2=new _0x4bd58c(_0xdad4fa['a']['transformCartesianToWGS84'](_0x4d598e[a0_0x256f('0x13c')][a0_0x256f('0x21b')](_0x2f1815)),_0x399343),_0x4d598e[a0_0x256f('0x13d')])&&(_0x968b2[a0_0x256f('0x231')]=function(_0x546c38){for(var _0x9d663f=0x1;_0x9d663f<arguments['length'];_0x9d663f++){var _0x37b3b1=null!=arguments[_0x9d663f]?arguments[_0x9d663f]:{};_0x9d663f%0x2?_0x49948e(Object(_0x37b3b1),!0x0)[a0_0x256f('0x218')](function(_0x4adac4){_0x254ba4()(_0x546c38,_0x4adac4,_0x37b3b1[_0x4adac4]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x546c38,Object['getOwnPropertyDescriptors'](_0x37b3b1)):_0x49948e(Object(_0x37b3b1))[a0_0x256f('0x218')](function(_0x707be8){Object['defineProperty'](_0x546c38,_0x707be8,Object[a0_0x256f('0x79')](_0x37b3b1,_0x707be8));});}return _0x546c38;}({},null==_0x4d598e||null===(_0x479045=_0x4d598e[a0_0x256f('0x624')])||void 0x0===_0x479045?void 0x0:_0x479045[a0_0x256f('0x21b')](_0x2f1815))),_0x968b2;}}]),_0x4bd58c;}(_0x282c30);_0x282c30['registerType'](a0_0x256f('0x3f5'));var _0x5d74c8=_0xce6432;function _0x22f9ec(_0x4c9335,_0x1b2b07){var _0x6ee84e=Object['keys'](_0x4c9335);if(Object[a0_0x256f('0x23e')]){var _0x1bb9ac=Object[a0_0x256f('0x23e')](_0x4c9335);_0x1b2b07&&(_0x1bb9ac=_0x1bb9ac[a0_0x256f('0x53e')](function(_0x199cbc){return Object[a0_0x256f('0x79')](_0x4c9335,_0x199cbc)[a0_0x256f('0x2ec')];})),_0x6ee84e[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x6ee84e,_0x1bb9ac);}return _0x6ee84e;}function _0x10beb3(_0x181019){var _0xfa7c72=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0xcb6789){return!0x1;}}();return function(){var _0x2f26a9,_0x364f8f=_0x30f874()(_0x181019);if(_0xfa7c72){var _0x136382=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x2f26a9=Reflect[a0_0x256f('0x64c')](_0x364f8f,arguments,_0x136382);}else _0x2f26a9=_0x364f8f['apply'](this,arguments);return _0x94f187()(this,_0x2f26a9);};}var _0x3021b0=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x528e24=function(_0x3c0b9d){_0x361b3f()(_0x198b63,_0x3c0b9d);var _0x5c14c4=_0x10beb3(_0x198b63);function _0x198b63(_0x2ee82b,_0xac3328){var _0x75e14f;return _0x307cd5()(this,_0x198b63),(_0x75e14f=_0x5c14c4[a0_0x256f('0x32b')](this))[a0_0x256f('0x10')]=new _0x3021b0['Entity']({'label':{}}),_0x75e14f['_position']=_0x32696b['a'][a0_0x256f('0x10c')](_0x2ee82b),_0x75e14f[a0_0x256f('0x5b8')]=_0xac3328,_0x75e14f[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x3a4')),_0x75e14f['_state']=_0x444ad5['a']['INITIALIZED'],_0x75e14f;}return _0x323844()(_0x198b63,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x13c')]=this[a0_0x256f('0x666')],this[a0_0x256f('0x644')]=this[a0_0x256f('0x5b8')];}},{'key':a0_0x256f('0x8f'),'value':function(_0x5ee765,_0x16e2dc){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x3822c6){return _0x3822c6&&0x0!==Object[a0_0x256f('0x536')](_0x3822c6)['length']?(delete _0x3822c6[a0_0x256f('0x644')],this[a0_0x256f('0x9b')]=_0x3822c6,_0x47b8ba['c']['merge'](this[a0_0x256f('0x10')][a0_0x256f('0x3a4')],this[a0_0x256f('0x9b')]),this):this;}},{'key':'position','set':function(_0xf4954f){return this[a0_0x256f('0x666')]=_0x32696b['a']['parsePosition'](_0xf4954f),this[a0_0x256f('0x10')][a0_0x256f('0x13c')]=_0xdad4fa['a']['transformWGS84ToCartesian'](this['_position']),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':a0_0x256f('0x644'),'set':function(_0x4e42e5){return this[a0_0x256f('0x5b8')]=_0x4e42e5,this[a0_0x256f('0x10')][a0_0x256f('0x3a4')][a0_0x256f('0x644')]=this['_text'],this;},'get':function(){return this[a0_0x256f('0x5b8')];}}],[{'key':'fromEntity','value':function(_0x57ae72){var _0x1c2d71,_0x1d9aaf=_0x3021b0[a0_0x256f('0x29c')][a0_0x256f('0x2c9')](),_0x29699f=_0xdad4fa['a'][a0_0x256f('0x31a')](_0x57ae72[a0_0x256f('0x13c')][a0_0x256f('0x21b')](_0x1d9aaf)),_0x2bdb16=void 0x0;return _0x57ae72[a0_0x256f('0x13d')]&&((_0x2bdb16=new _0x198b63(_0x29699f,_0x57ae72[a0_0x256f('0x215')]))[a0_0x256f('0x231')]=function(_0x405559){for(var _0x1ff44a=0x1;_0x1ff44a<arguments['length'];_0x1ff44a++){var _0x5143bc=null!=arguments[_0x1ff44a]?arguments[_0x1ff44a]:{};_0x1ff44a%0x2?_0x22f9ec(Object(_0x5143bc),!0x0)[a0_0x256f('0x218')](function(_0x18aaab){_0x254ba4()(_0x405559,_0x18aaab,_0x5143bc[_0x18aaab]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x405559,Object['getOwnPropertyDescriptors'](_0x5143bc)):_0x22f9ec(Object(_0x5143bc))[a0_0x256f('0x218')](function(_0x3aa3dc){Object[a0_0x256f('0x21f')](_0x405559,_0x3aa3dc,Object['getOwnPropertyDescriptor'](_0x5143bc,_0x3aa3dc));});}return _0x405559;}({},null==_0x57ae72||null===(_0x1c2d71=_0x57ae72['properties'])||void 0x0===_0x1c2d71?void 0x0:_0x1c2d71['getValue'](_0x1d9aaf))),_0x2bdb16;}}]),_0x198b63;}(_0x282c30);_0x282c30['registerType'](a0_0x256f('0x3a4'));var _0xb6c4a2=_0x528e24;function _0x2dd64e(_0xe719d8,_0x1064de){var _0xc8cffc=Object['keys'](_0xe719d8);if(Object[a0_0x256f('0x23e')]){var _0x4656f6=Object[a0_0x256f('0x23e')](_0xe719d8);_0x1064de&&(_0x4656f6=_0x4656f6[a0_0x256f('0x53e')](function(_0x5c6b5f){return Object[a0_0x256f('0x79')](_0xe719d8,_0x5c6b5f)[a0_0x256f('0x2ec')];})),_0xc8cffc[a0_0x256f('0x289')][a0_0x256f('0x40')](_0xc8cffc,_0x4656f6);}return _0xc8cffc;}function _0x2324a6(_0x4bbbc8){var _0x46f2f7=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x520f27){return!0x1;}}();return function(){var _0x49d6df,_0x4622b0=_0x30f874()(_0x4bbbc8);if(_0x46f2f7){var _0xb97ccb=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x49d6df=Reflect[a0_0x256f('0x64c')](_0x4622b0,arguments,_0xb97ccb);}else _0x49d6df=_0x4622b0['apply'](this,arguments);return _0x94f187()(this,_0x49d6df);};}var _0x323218=DC['Namespace'][a0_0x256f('0x224')],_0x3ac983={'pixelSize':0x8,'outlineColor':_0x323218[a0_0x256f('0x54e')]['BLUE'],'outlineWidth':0x2},_0x13a34a=function(_0x45722d){_0x361b3f()(_0x1fa173,_0x45722d);var _0x41620c=_0x2324a6(_0x1fa173);function _0x1fa173(_0x592569){var _0x13d048;return _0x307cd5()(this,_0x1fa173),(_0x13d048=_0x41620c[a0_0x256f('0x32b')](this))['_delegate']=new _0x323218[(a0_0x256f('0x39d'))]({'point':{}}),_0x13d048['_position']=_0x32696b['a'][a0_0x256f('0x10c')](_0x592569),_0x13d048[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x322')),_0x13d048['_state']=_0x444ad5['a'][a0_0x256f('0x206')],_0x13d048;}return _0x323844()(_0x1fa173,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x13c')]=this[a0_0x256f('0x666')],_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x322')],_0x3ac983,this[a0_0x256f('0x9b')]);}},{'key':a0_0x256f('0x421'),'value':function(_0x3e6caa){return _0x3e6caa&&0x0!==Object[a0_0x256f('0x536')](_0x3e6caa)[a0_0x256f('0x658')]?(delete _0x3e6caa[a0_0x256f('0x13c')],this[a0_0x256f('0x9b')]=_0x3e6caa,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x322')],_0x3ac983,this[a0_0x256f('0x9b')]),this):this;}},{'key':a0_0x256f('0x13c'),'set':function(_0x423a6d){return this[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x423a6d),this[a0_0x256f('0x10')]['position']=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),this;},'get':function(){return this[a0_0x256f('0x666')];}}],[{'key':'fromEntity','value':function(_0x4ff7e4){var _0x311798,_0x5132d4=void 0x0,_0x3f1899=_0x323218[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]();return(_0x5132d4=new _0x1fa173(_0xdad4fa['a']['transformCartesianToWGS84'](_0x4ff7e4['position'][a0_0x256f('0x21b')](_0x3f1899))))[a0_0x256f('0x231')]=function(_0x24e2e8){for(var _0x1c037f=0x1;_0x1c037f<arguments['length'];_0x1c037f++){var _0x296736=null!=arguments[_0x1c037f]?arguments[_0x1c037f]:{};_0x1c037f%0x2?_0x2dd64e(Object(_0x296736),!0x0)[a0_0x256f('0x218')](function(_0x1fc104){_0x254ba4()(_0x24e2e8,_0x1fc104,_0x296736[_0x1fc104]);}):Object[a0_0x256f('0x498')]?Object['defineProperties'](_0x24e2e8,Object[a0_0x256f('0x498')](_0x296736)):_0x2dd64e(Object(_0x296736))[a0_0x256f('0x218')](function(_0x425a08){Object[a0_0x256f('0x21f')](_0x24e2e8,_0x425a08,Object[a0_0x256f('0x79')](_0x296736,_0x425a08));});}return _0x24e2e8;}({},null==_0x4ff7e4||null===(_0x311798=_0x4ff7e4[a0_0x256f('0x624')])||void 0x0===_0x311798?void 0x0:_0x311798[a0_0x256f('0x21b')](_0x3f1899)),_0x5132d4;}}]),_0x1fa173;}(_0x282c30);_0x282c30['registerType'](a0_0x256f('0x322'));var _0x288a69=_0x13a34a,_0x1d4a04=_0x5ceb8d(0x16),_0x377a08=_0x5ceb8d['n'](_0x1d4a04);function _0x809999(_0x4d028e,_0x3c031a){var _0x8cd623=Object[a0_0x256f('0x536')](_0x4d028e);if(Object[a0_0x256f('0x23e')]){var _0x48f98b=Object[a0_0x256f('0x23e')](_0x4d028e);_0x3c031a&&(_0x48f98b=_0x48f98b[a0_0x256f('0x53e')](function(_0x2b2ed3){return Object['getOwnPropertyDescriptor'](_0x4d028e,_0x2b2ed3)[a0_0x256f('0x2ec')];})),_0x8cd623[a0_0x256f('0x289')]['apply'](_0x8cd623,_0x48f98b);}return _0x8cd623;}function _0x399642(_0x662d){for(var _0xbf9dd3=0x1;_0xbf9dd3<arguments['length'];_0xbf9dd3++){var _0x524334=null!=arguments[_0xbf9dd3]?arguments[_0xbf9dd3]:{};_0xbf9dd3%0x2?_0x809999(Object(_0x524334),!0x0)[a0_0x256f('0x218')](function(_0x333882){_0x254ba4()(_0x662d,_0x333882,_0x524334[_0x333882]);}):Object[a0_0x256f('0x498')]?Object['defineProperties'](_0x662d,Object[a0_0x256f('0x498')](_0x524334)):_0x809999(Object(_0x524334))[a0_0x256f('0x218')](function(_0xeae1e7){Object[a0_0x256f('0x21f')](_0x662d,_0xeae1e7,Object['getOwnPropertyDescriptor'](_0x524334,_0xeae1e7));});}return _0x662d;}function _0x16744b(_0x3c981f){var _0x35649a=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x51db30){return!0x1;}}();return function(){var _0x2f9a76,_0x493622=_0x30f874()(_0x3c981f);if(_0x35649a){var _0x5ed4b9=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x2f9a76=Reflect['construct'](_0x493622,arguments,_0x5ed4b9);}else _0x2f9a76=_0x493622[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x2f9a76);};}var _0x230f73=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x3baeba=function(_0x378529){_0x361b3f()(_0x1ae72f,_0x378529);var _0x19ad75=_0x16744b(_0x1ae72f);function _0x1ae72f(_0x14a2fd){var _0x26fe36;return _0x307cd5()(this,_0x1ae72f),(_0x26fe36=_0x19ad75[a0_0x256f('0x32b')](this))[a0_0x256f('0x10')]=new _0x230f73[(a0_0x256f('0x39d'))]({'polygon':{}}),_0x26fe36[a0_0x256f('0x5d3')]=_0x32696b['a']['parsePositions'](_0x14a2fd),_0x26fe36[a0_0x256f('0x4')]=[],_0x26fe36[a0_0x256f('0x195')]=_0x282c30['getOverlayType']('polygon'),_0x26fe36['_state']=_0x444ad5['a'][a0_0x256f('0x206')],_0x26fe36;}return _0x323844()(_0x1ae72f,[{'key':'_computeHierarchy','value':function(){var _0x243acc=new _0x230f73[(a0_0x256f('0x634'))]();return _0x243acc[a0_0x256f('0x50b')]=_0xdad4fa['a'][a0_0x256f('0x1ae')](this[a0_0x256f('0x5d3')]),_0x243acc['holes']=this[a0_0x256f('0x4')][a0_0x256f('0x153')](function(_0x53a0c7){return new _0x230f73[(a0_0x256f('0x634'))](_0xdad4fa['a'][a0_0x256f('0x1ae')](_0x53a0c7));}),_0x243acc;}},{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x50b')]=this['_positions'];}},{'key':'setLabel','value':function(_0x28f61e,_0x5a76ba){return this[a0_0x256f('0x10')][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this['center']),this[a0_0x256f('0x10')][a0_0x256f('0x3a4')]=_0x399642({'text':_0x28f61e},_0x5a76ba),this;}},{'key':a0_0x256f('0x421'),'value':function(_0xadf4f2){return _0xadf4f2&&0x0!==Object['keys'](_0xadf4f2)[a0_0x256f('0x658')]?(delete _0xadf4f2[a0_0x256f('0x50b')],this[a0_0x256f('0x9b')]=_0xadf4f2,_0x47b8ba['c']['merge'](this['_delegate'][a0_0x256f('0x493')],this[a0_0x256f('0x9b')]),this):this;}},{'key':'positions','set':function(_0x6cfe1f){return this[a0_0x256f('0x5d3')]=_0x32696b['a']['parsePositions'](_0x6cfe1f),this[a0_0x256f('0x10')]['polygon'][a0_0x256f('0x3e3')]=this[a0_0x256f('0x49c')](),this;},'get':function(){return this[a0_0x256f('0x5d3')];}},{'key':a0_0x256f('0xbc'),'set':function(_0x4ef9b3){return _0x4ef9b3&&_0x4ef9b3[a0_0x256f('0x658')]&&(this['_holes']=_0x4ef9b3[a0_0x256f('0x153')](function(_0x167bdf){return _0x32696b['a']['parsePositions'](_0x167bdf);}),this[a0_0x256f('0x10')]['polygon']['hierarchy']=this[a0_0x256f('0x49c')]()),this;},'get':function(){return this[a0_0x256f('0x4')];}},{'key':a0_0x256f('0x532'),'get':function(){return Object(_0x47cfe0['c'])([]['concat'](_0x377a08()(this['_positions']),[this[a0_0x256f('0x5d3')][0x0]]));}},{'key':a0_0x256f('0x1ec'),'get':function(){return Object(_0x47cfe0['a'])(this['_positions']);}}],[{'key':a0_0x256f('0x5b2'),'value':function(_0x481026){var _0x486112,_0x4027a5=void 0x0,_0x1163fc=_0x230f73[a0_0x256f('0x29c')]['now']();return _0x481026[a0_0x256f('0x493')]&&((_0x4027a5=new _0x1ae72f(_0xdad4fa['a'][a0_0x256f('0x292')](_0x481026[a0_0x256f('0x493')][a0_0x256f('0x3e3')][a0_0x256f('0x21b')](_0x1163fc)[a0_0x256f('0x50b')])))[a0_0x256f('0x231')]=_0x399642({},null==_0x481026||null===(_0x486112=_0x481026['properties'])||void 0x0===_0x486112?void 0x0:_0x486112['getValue'](_0x1163fc))),_0x4027a5;}}]),_0x1ae72f;}(_0x282c30);_0x282c30['registerType'](a0_0x256f('0x493'));var _0x3d78c0=_0x3baeba;function _0x3b03b5(_0x441adc,_0x44c47b){var _0x174e33=Object[a0_0x256f('0x536')](_0x441adc);if(Object[a0_0x256f('0x23e')]){var _0x5cbaf0=Object[a0_0x256f('0x23e')](_0x441adc);_0x44c47b&&(_0x5cbaf0=_0x5cbaf0[a0_0x256f('0x53e')](function(_0x41e88c){return Object[a0_0x256f('0x79')](_0x441adc,_0x41e88c)[a0_0x256f('0x2ec')];})),_0x174e33['push'][a0_0x256f('0x40')](_0x174e33,_0x5cbaf0);}return _0x174e33;}function _0x3a05ad(_0x598861){for(var _0x12ed1e=0x1;_0x12ed1e<arguments[a0_0x256f('0x658')];_0x12ed1e++){var _0x5e9657=null!=arguments[_0x12ed1e]?arguments[_0x12ed1e]:{};_0x12ed1e%0x2?_0x3b03b5(Object(_0x5e9657),!0x0)[a0_0x256f('0x218')](function(_0x5e453d){_0x254ba4()(_0x598861,_0x5e453d,_0x5e9657[_0x5e453d]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x256f('0x3d9')](_0x598861,Object[a0_0x256f('0x498')](_0x5e9657)):_0x3b03b5(Object(_0x5e9657))[a0_0x256f('0x218')](function(_0x310b2f){Object[a0_0x256f('0x21f')](_0x598861,_0x310b2f,Object['getOwnPropertyDescriptor'](_0x5e9657,_0x310b2f));});}return _0x598861;}function _0x4c5ede(_0x3f12fb){var _0x1d018e=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x145b6e){return!0x1;}}();return function(){var _0x1dc54a,_0x5e6a96=_0x30f874()(_0x3f12fb);if(_0x1d018e){var _0x3e7cae=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x1dc54a=Reflect['construct'](_0x5e6a96,arguments,_0x3e7cae);}else _0x1dc54a=_0x5e6a96[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x1dc54a);};}var _0x306a0b=DC['Namespace'][a0_0x256f('0x224')],_0x599b0c=function(_0x147874){_0x361b3f()(_0x399f6c,_0x147874);var _0x264861=_0x4c5ede(_0x399f6c);function _0x399f6c(_0x92dd1c){var _0x19ac30;return _0x307cd5()(this,_0x399f6c),(_0x19ac30=_0x264861[a0_0x256f('0x32b')](this))[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x92dd1c),_0x19ac30[a0_0x256f('0x10')]=new _0x306a0b[(a0_0x256f('0x39d'))]({'polyline':{}}),_0x19ac30[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')]('polyline'),_0x19ac30[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x19ac30;}return _0x323844()(_0x399f6c,[{'key':'_mountedHook','value':function(){this[a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')];}},{'key':'setLabel','value':function(_0x30a942,_0x450e4f){return this['_delegate'][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x532')]),this['_delegate'][a0_0x256f('0x3a4')]=_0x3a05ad({'text':_0x30a942},_0x450e4f),this;}},{'key':a0_0x256f('0x421'),'value':function(_0xe86b35){return _0xe86b35&&0x0!==Object['keys'](_0xe86b35)['length']?(delete _0xe86b35[a0_0x256f('0x50b')],this['_style']=_0xe86b35,_0x47b8ba['c']['merge'](this[a0_0x256f('0x10')][a0_0x256f('0x18d')],this['_style']),this):this;}},{'key':a0_0x256f('0x50b'),'set':function(_0x48dc4e){return this[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x48dc4e),this['_delegate'][a0_0x256f('0x18d')][a0_0x256f('0x50b')]=_0xdad4fa['a'][a0_0x256f('0x1ae')](this[a0_0x256f('0x5d3')]),this;},'get':function(){return this['_positions'];}},{'key':'center','get':function(){return Object(_0x47cfe0['c'])(this['_positions']);}},{'key':a0_0x256f('0x177'),'get':function(){return Object(_0x47cfe0['e'])(this[a0_0x256f('0x5d3')]);}}],[{'key':'fromEntity','value':function(_0x4239bb){var _0x4aff9b,_0x29a018=void 0x0,_0x2bed8a=_0x306a0b[a0_0x256f('0x29c')]['now']();return _0x4239bb[a0_0x256f('0x18d')]&&((_0x29a018=new _0x399f6c(_0xdad4fa['a'][a0_0x256f('0x292')](_0x4239bb[a0_0x256f('0x18d')][a0_0x256f('0x50b')][a0_0x256f('0x21b')](_0x2bed8a))))[a0_0x256f('0x231')]=_0x3a05ad({},null==_0x4239bb||null===(_0x4aff9b=_0x4239bb[a0_0x256f('0x624')])||void 0x0===_0x4aff9b?void 0x0:_0x4aff9b[a0_0x256f('0x21b')](_0x2bed8a))),_0x29a018;}}]),_0x399f6c;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')]('polyline');var _0xca7db6=_0x599b0c;function _0x513ade(_0x3088ee,_0x1ab659){var _0x58a4fb=Object[a0_0x256f('0x536')](_0x3088ee);if(Object[a0_0x256f('0x23e')]){var _0x3e6352=Object[a0_0x256f('0x23e')](_0x3088ee);_0x1ab659&&(_0x3e6352=_0x3e6352['filter'](function(_0x506371){return Object['getOwnPropertyDescriptor'](_0x3088ee,_0x506371)[a0_0x256f('0x2ec')];})),_0x58a4fb[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x58a4fb,_0x3e6352);}return _0x58a4fb;}function _0x4456dc(_0x351897){var _0x43be6f=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x55d76c){return!0x1;}}();return function(){var _0x4fd41b,_0x1595c7=_0x30f874()(_0x351897);if(_0x43be6f){var _0x4dc28a=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x4fd41b=Reflect[a0_0x256f('0x64c')](_0x1595c7,arguments,_0x4dc28a);}else _0x4fd41b=_0x1595c7['apply'](this,arguments);return _0x94f187()(this,_0x4fd41b);};}var _0x3996aa=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x327a85=function(_0x43e334){_0x361b3f()(_0x212c99,_0x43e334);var _0x105d51=_0x4456dc(_0x212c99);function _0x212c99(_0x341a8e,_0x20fa61){var _0x45862b;return _0x307cd5()(this,_0x212c99),(_0x45862b=_0x105d51['call'](this))[a0_0x256f('0x10')]=new _0x3996aa[(a0_0x256f('0x39d'))]({'model':{}}),_0x45862b[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x341a8e),_0x45862b[a0_0x256f('0x353')]=_0x20fa61,_0x45862b[a0_0x256f('0x1ac')]=0x0,_0x45862b[a0_0x256f('0x195')]=_0x282c30['getOverlayType']('model'),_0x45862b[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x45862b;}return _0x323844()(_0x212c99,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x13c')]=this[a0_0x256f('0x666')],this[a0_0x256f('0x36')]=this[a0_0x256f('0x353')];}},{'key':a0_0x256f('0x421'),'value':function(_0xce3862){return _0xce3862&&0x0!==Object[a0_0x256f('0x536')](_0xce3862)[a0_0x256f('0x658')]?(delete _0xce3862[a0_0x256f('0x57a')],this[a0_0x256f('0x9b')]=_0xce3862,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')]['model'],this['_style']),this):this;}},{'key':a0_0x256f('0x13c'),'set':function(_0x727761){return this[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x727761),this[a0_0x256f('0x10')][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),0x0===this[a0_0x256f('0x1ac')]&&(this[a0_0x256f('0x10')][a0_0x256f('0xfc')]=_0x3996aa['Transforms'][a0_0x256f('0x24d')](_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),new _0x3996aa[(a0_0x256f('0x30f'))](_0x3996aa[a0_0x256f('0x4bb')]['toRadians'](this[a0_0x256f('0x666')][a0_0x256f('0x569')]),_0x3996aa[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')]['pitch']),_0x3996aa[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x612')])))),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':a0_0x256f('0x36'),'set':function(_0x5ab2eb){return this[a0_0x256f('0x353')]=_0x5ab2eb,this['_delegate'][a0_0x256f('0x407')]['uri']=this[a0_0x256f('0x353')],this;},'get':function(){return this['_modelUrl'];}},{'key':'rotateAmount','set':function(_0x256611){var _0x220aca=this;return this['_rotateAmount']=+_0x256611,this[a0_0x256f('0x1ac')]>0x0&&(this[a0_0x256f('0x10')][a0_0x256f('0xfc')]=new _0x3996aa['CallbackProperty'](function(_0x330120){return _0x220aca['_position']['heading']+=_0x220aca[a0_0x256f('0x1ac')],0x168===_0x220aca[a0_0x256f('0x666')][a0_0x256f('0x569')]&&(_0x220aca[a0_0x256f('0x666')][a0_0x256f('0x569')]=0x0),_0x3996aa[a0_0x256f('0x12f')][a0_0x256f('0x24d')](_0xdad4fa['a'][a0_0x256f('0x72')](_0x220aca[a0_0x256f('0x666')]),new _0x3996aa[(a0_0x256f('0x30f'))](_0x3996aa['Math'][a0_0x256f('0x1b4')](_0x220aca[a0_0x256f('0x666')]['heading']),_0x3996aa[a0_0x256f('0x4bb')]['toRadians'](_0x220aca[a0_0x256f('0x666')]['pitch']),_0x3996aa['Math'][a0_0x256f('0x1b4')](_0x220aca[a0_0x256f('0x666')]['roll'])));})),this;},'get':function(){return this[a0_0x256f('0x1ac')];}}],[{'key':a0_0x256f('0x5b2'),'value':function(_0x2d9d55,_0x42b6d7){var _0x420327=_0x3996aa[a0_0x256f('0x29c')][a0_0x256f('0x2c9')](),_0x4f3651=new _0x212c99(_0xdad4fa['a'][a0_0x256f('0x31a')](_0x2d9d55[a0_0x256f('0x13c')][a0_0x256f('0x21b')](_0x420327)),_0x42b6d7);return _0x4f3651[a0_0x256f('0x231')]=function(_0x19c742){for(var _0x111840=0x1;_0x111840<arguments['length'];_0x111840++){var _0x12d5b5=null!=arguments[_0x111840]?arguments[_0x111840]:{};_0x111840%0x2?_0x513ade(Object(_0x12d5b5),!0x0)['forEach'](function(_0x47a193){_0x254ba4()(_0x19c742,_0x47a193,_0x12d5b5[_0x47a193]);}):Object[a0_0x256f('0x498')]?Object['defineProperties'](_0x19c742,Object[a0_0x256f('0x498')](_0x12d5b5)):_0x513ade(Object(_0x12d5b5))['forEach'](function(_0x2b951d){Object['defineProperty'](_0x19c742,_0x2b951d,Object['getOwnPropertyDescriptor'](_0x12d5b5,_0x2b951d));});}return _0x19c742;}({},_0x2d9d55[a0_0x256f('0x624')]['getValue'](_0x420327)),_0x4f3651;}}]),_0x212c99;}(_0x282c30);_0x282c30['registerType']('model');var _0x4fee3a=_0x327a85;function _0x30cbf3(_0x4e893f,_0x42424a){var _0x5d8dc0=Object[a0_0x256f('0x536')](_0x4e893f);if(Object[a0_0x256f('0x23e')]){var _0x27d75d=Object[a0_0x256f('0x23e')](_0x4e893f);_0x42424a&&(_0x27d75d=_0x27d75d[a0_0x256f('0x53e')](function(_0x1f165c){return Object[a0_0x256f('0x79')](_0x4e893f,_0x1f165c)[a0_0x256f('0x2ec')];})),_0x5d8dc0[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x5d8dc0,_0x27d75d);}return _0x5d8dc0;}function _0x328ac4(_0x54272e){for(var _0x57d3a3=0x1;_0x57d3a3<arguments['length'];_0x57d3a3++){var _0x4dbf04=null!=arguments[_0x57d3a3]?arguments[_0x57d3a3]:{};_0x57d3a3%0x2?_0x30cbf3(Object(_0x4dbf04),!0x0)[a0_0x256f('0x218')](function(_0x98a45c){_0x254ba4()(_0x54272e,_0x98a45c,_0x4dbf04[_0x98a45c]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x256f('0x3d9')](_0x54272e,Object[a0_0x256f('0x498')](_0x4dbf04)):_0x30cbf3(Object(_0x4dbf04))['forEach'](function(_0x2762f3){Object['defineProperty'](_0x54272e,_0x2762f3,Object['getOwnPropertyDescriptor'](_0x4dbf04,_0x2762f3));});}return _0x54272e;}function _0x1382e4(_0x5b1da1){var _0x3ef771=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x3b3752){return!0x1;}}();return function(){var _0x47caa8,_0x4b05ff=_0x30f874()(_0x5b1da1);if(_0x3ef771){var _0x4f8cc5=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x47caa8=Reflect[a0_0x256f('0x64c')](_0x4b05ff,arguments,_0x4f8cc5);}else _0x47caa8=_0x4b05ff[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x47caa8);};}var _0x277ae1=DC[a0_0x256f('0x3bd')]['Cesium'],_0x1ead4a=function(_0x27cc6e){_0x361b3f()(_0x4dfec,_0x27cc6e);var _0x1eeb3e=_0x1382e4(_0x4dfec);function _0x4dfec(_0x4dd710){var _0xb347d3,_0x35d115=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};return _0x307cd5()(this,_0x4dfec),(_0xb347d3=_0x1eeb3e[a0_0x256f('0x32b')](this))[a0_0x256f('0x10')]=new _0x277ae1['Cesium3DTileset'](_0x328ac4(_0x328ac4({},_0x35d115),{},{'url':_0x4dd710})),_0xb347d3[a0_0x256f('0x86')]=void 0x0,_0xb347d3[a0_0x256f('0x32')]=void 0x0,_0xb347d3['_properties']=void 0x0,_0xb347d3[a0_0x256f('0x3bb')]=void 0x0,_0xb347d3[a0_0x256f('0x4b4')]=void 0x0,_0xb347d3[a0_0x256f('0x195')]=_0x282c30['getOverlayType'](a0_0x256f('0x4af')),_0xb347d3[a0_0x256f('0x2fa')]=_0x444ad5['a']['INITIALIZED'],_0xb347d3;}return _0x323844()(_0x4dfec,[{'key':'_onAdd','value':function(_0x30642e){var _0x324cc0=this;if(!_0x30642e)return!0x1;this['_layer']=_0x30642e,this[a0_0x256f('0x10')][a0_0x256f('0x5df')][a0_0x256f('0x2a8')](function(_0x30d92d){_0x324cc0[a0_0x256f('0x1ef')][a0_0x256f('0x64a')]['add'](_0x30d92d),_0x30d92d[a0_0x256f('0x50a')]=_0x30642e[a0_0x256f('0x50a')],_0x30d92d['overlayId']=_0x324cc0['_id'],_0x324cc0['_state']=_0x444ad5['a'][a0_0x256f('0x135')];});}},{'key':a0_0x256f('0x1e1'),'value':function(){var _0x2a5ade=this;if(!this['_layer'])return!0x1;this['_delegate'][a0_0x256f('0x5df')][a0_0x256f('0x2a8')](function(_0x226b53){_0x2a5ade[a0_0x256f('0x1ef')][a0_0x256f('0x64a')][a0_0x256f('0x3ec')](_0x226b53),_0x2a5ade[a0_0x256f('0x2fa')]=_0x444ad5['a']['REMOVED'];});}},{'key':a0_0x256f('0x186'),'value':function(_0x5800e7){this[a0_0x256f('0x44c')](_0x5800e7);}},{'key':a0_0x256f('0x44c'),'value':function(_0x42ec75){var _0x2027d3=this;if(this[a0_0x256f('0x98')]&&this[a0_0x256f('0x98')][a0_0x256f('0x658')])for(var _0x2ee34a=_0x42ec75['content'],_0xa84dd=function(_0x572637){var _0x39864e=_0x2ee34a[a0_0x256f('0x46c')](_0x572637);_0x2027d3[a0_0x256f('0x98')][a0_0x256f('0x218')](function(_0x1f9d73){_0x39864e[a0_0x256f('0x55c')](_0x1f9d73[a0_0x256f('0x2bc')])&&_0x39864e[a0_0x256f('0x482')](_0x1f9d73[a0_0x256f('0x2bc')])===_0x1f9d73['keyValue']&&_0x39864e[a0_0x256f('0x163')](_0x1f9d73[a0_0x256f('0x587')],_0x1f9d73['propertyValue']);});},_0x4703b9=0x0;_0x4703b9<_0x2ee34a[a0_0x256f('0xdf')];_0x4703b9++)_0xa84dd(_0x4703b9);}},{'key':a0_0x256f('0x57f'),'value':function(_0x2eb3e5){return _0x2eb3e5=_0x32696b['a'][a0_0x256f('0x10c')](_0x2eb3e5),this[a0_0x256f('0x10')][a0_0x256f('0x5df')]['then'](function(_0x3cb1bc){var _0x24b1f0=_0x277ae1['Transforms'][a0_0x256f('0x471')](_0x277ae1[a0_0x256f('0x534')][a0_0x256f('0x641')](_0x2eb3e5[a0_0x256f('0x16e')],_0x2eb3e5[a0_0x256f('0x44a')],_0x2eb3e5[a0_0x256f('0x41d')])),_0xfe17cd=_0x277ae1['Matrix4'][a0_0x256f('0x5c6')](_0x277ae1[a0_0x256f('0x595')]['fromRotationZ'](_0x277ae1[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x2eb3e5['heading'])));_0x277ae1[a0_0x256f('0x5db')][a0_0x256f('0x294')](_0x24b1f0,_0xfe17cd,_0x24b1f0),_0x3cb1bc[a0_0x256f('0x2ae')][a0_0x256f('0x381')]=_0x24b1f0;}),this;}},{'key':a0_0x256f('0x8f'),'value':function(_0x407d16,_0x47d26d){return this;}},{'key':a0_0x256f('0x662'),'value':function(){var _0xce71f3=this;return this[a0_0x256f('0x10')][a0_0x256f('0x5df')]['then'](function(_0x39fae8){_0xce71f3[a0_0x256f('0x4b4')]||(_0xce71f3[a0_0x256f('0x4b4')]=_0x277ae1[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x39fae8[a0_0x256f('0x34')][a0_0x256f('0x532')]));var _0x7487f0=_0x277ae1['Cartesian3'][a0_0x256f('0x3a9')](_0xce71f3[a0_0x256f('0x4b4')][a0_0x256f('0x520')],_0xce71f3[a0_0x256f('0x4b4')][a0_0x256f('0x2b1')],_0xce71f3[a0_0x256f('0x4b4')]['height']),_0x484c1d=_0x277ae1['Cartesian3'][a0_0x256f('0x3a9')](_0xce71f3[a0_0x256f('0x4b4')][a0_0x256f('0x520')],_0xce71f3['_center'][a0_0x256f('0x2b1')],0x0),_0x125841=_0x277ae1[a0_0x256f('0x534')]['subtract'](_0x484c1d,_0x7487f0,new _0x277ae1[(a0_0x256f('0x534'))]());_0x39fae8['modelMatrix']=_0x277ae1[a0_0x256f('0x5db')]['fromTranslation'](_0x125841);}),this;}},{'key':'setHeight','value':function(_0x1952dd){var _0x41df6e=this;return this[a0_0x256f('0x32')]=_0x1952dd,this['_delegate'][a0_0x256f('0x5df')]['then'](function(_0x4b368e){_0x41df6e[a0_0x256f('0x4b4')]||(_0x41df6e['_center']=_0x277ae1[a0_0x256f('0x1db')]['fromCartesian'](_0x4b368e[a0_0x256f('0x34')][a0_0x256f('0x532')]));var _0x544aa3=_0x277ae1['Cartesian3'][a0_0x256f('0x3a9')](_0x41df6e[a0_0x256f('0x4b4')][a0_0x256f('0x520')],_0x41df6e['_center'][a0_0x256f('0x2b1')],_0x41df6e[a0_0x256f('0x4b4')]['height']),_0x3500a8=_0x277ae1['Cartesian3']['fromRadians'](_0x41df6e['_center'][a0_0x256f('0x520')],_0x41df6e[a0_0x256f('0x4b4')][a0_0x256f('0x2b1')],_0x41df6e[a0_0x256f('0x4b4')][a0_0x256f('0x4fa')]+_0x41df6e[a0_0x256f('0x32')]),_0x5a8af5=_0x277ae1[a0_0x256f('0x534')]['subtract'](_0x3500a8,_0x544aa3,new _0x277ae1['Cartesian3']());_0x4b368e[a0_0x256f('0x240')]=_0x277ae1['Matrix4'][a0_0x256f('0x4ed')](_0x5a8af5);}),this;}},{'key':a0_0x256f('0x667'),'value':function(_0x4f65c9){return this['_delegate'][a0_0x256f('0x5df')]['then'](function(_0x1cb36a){var _0x3c4c57=_0x1cb36a[a0_0x256f('0x2ae')]['transform'];_0x4f65c9>0x0&&0x1!==_0x4f65c9&&_0x277ae1['Matrix4']['multiplyByUniformScale'](_0x3c4c57,_0x4f65c9,_0x3c4c57),_0x1cb36a['root'][a0_0x256f('0x381')]=_0x3c4c57;}),this;}},{'key':a0_0x256f('0x3fc'),'value':function(_0x1e7bce){return this[a0_0x256f('0x98')]=_0x1e7bce,!this['_tileVisibleCallback']&&(this['_tileVisibleCallback']=this[a0_0x256f('0x10')][a0_0x256f('0x58b')][a0_0x256f('0x429')](this['_tileVisibleHandler'],this)),this;}},{'key':a0_0x256f('0x421'),'value':function(_0x2543a2){return _0x2543a2&&_0x2543a2 instanceof _0x277ae1[a0_0x256f('0x3ed')]&&(this[a0_0x256f('0x9b')]=_0x2543a2,this[a0_0x256f('0x10')][a0_0x256f('0x19b')]=this[a0_0x256f('0x9b')]),this;}},{'key':a0_0x256f('0x5df'),'get':function(){return this[a0_0x256f('0x10')][a0_0x256f('0x5df')];}}]),_0x4dfec;}(_0x282c30);_0x282c30['registerType'](a0_0x256f('0x4af'));var _0x1965f9=_0x1ead4a;function _0x257150(_0x5bea24){var _0x22e238=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype']['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x6f1322){return!0x1;}}();return function(){var _0x4d08f7,_0x3c7d64=_0x30f874()(_0x5bea24);if(_0x22e238){var _0x397c1b=_0x30f874()(this)['constructor'];_0x4d08f7=Reflect[a0_0x256f('0x64c')](_0x3c7d64,arguments,_0x397c1b);}else _0x4d08f7=_0x3c7d64[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x4d08f7);};}var _0x4bcd30=DC[a0_0x256f('0x3bd')]['Cesium'],_0x36921f=function(_0x3238e5){_0x361b3f()(_0x28ec82,_0x3238e5);var _0xf17dde=_0x257150(_0x28ec82);function _0x28ec82(_0x48ec44,_0x5325b0,_0x2167aa,_0x2a8a2e){var _0x3cfd7c;return _0x307cd5()(this,_0x28ec82),(_0x3cfd7c=_0xf17dde[a0_0x256f('0x32b')](this))['_position']=_0x32696b['a'][a0_0x256f('0x10c')](_0x48ec44),_0x3cfd7c[a0_0x256f('0x16d')]=_0x5325b0,_0x3cfd7c['_width']=_0x2167aa,_0x3cfd7c[a0_0x256f('0x32')]=_0x2a8a2e,_0x3cfd7c[a0_0x256f('0x10')]=new _0x4bcd30[(a0_0x256f('0x39d'))]({'box':{'dimensions':{'x':+_0x3cfd7c[a0_0x256f('0x16d')],'y':+_0x3cfd7c[a0_0x256f('0x70')],'z':+_0x3cfd7c['_height']}}}),_0x3cfd7c[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x48c')),_0x3cfd7c[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x3cfd7c;}return _0x323844()(_0x28ec82,[{'key':'_mountedHook','value':function(){this[a0_0x256f('0x13c')]=this[a0_0x256f('0x666')];}},{'key':a0_0x256f('0x421'),'value':function(_0x4df389){return 0x0===Object[a0_0x256f('0x536')](_0x4df389)[a0_0x256f('0x658')]||(delete _0x4df389[a0_0x256f('0x658')]&&delete _0x4df389['width']&&delete _0x4df389[a0_0x256f('0x4fa')],this['_style']=_0x4df389,_0x47b8ba['c'][a0_0x256f('0x3f4')](this['_delegate'][a0_0x256f('0x48c')],this[a0_0x256f('0x9b')])),this;}},{'key':a0_0x256f('0x13c'),'set':function(_0xee9562){return this[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0xee9562),this['_delegate'][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),this[a0_0x256f('0x10')][a0_0x256f('0xfc')]=_0x4bcd30['Transforms'][a0_0x256f('0x24d')](_0xdad4fa['a']['transformWGS84ToCartesian'](this[a0_0x256f('0x666')]),new _0x4bcd30[(a0_0x256f('0x30f'))](_0x4bcd30[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x569')]),_0x4bcd30[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')]['pitch']),_0x4bcd30['Math'][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x612')]))),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':a0_0x256f('0x658'),'set':function(_0x11c9b3){return this[a0_0x256f('0x16d')]=_0x11c9b3||0x0,this[a0_0x256f('0x10')]['box'][a0_0x256f('0x4bd')]['x']=+this[a0_0x256f('0x16d')],this;},'get':function(){return this[a0_0x256f('0x16d')];}},{'key':a0_0x256f('0x140'),'set':function(_0x2d571a){return this[a0_0x256f('0x70')]=_0x2d571a||0x0,this[a0_0x256f('0x10')][a0_0x256f('0x48c')]['dimensions']['y']=+this[a0_0x256f('0x70')],this;},'get':function(){return this[a0_0x256f('0x70')];}},{'key':a0_0x256f('0x4fa'),'set':function(_0xd90000){return this['_height']=_0xd90000||0x0,this[a0_0x256f('0x10')][a0_0x256f('0x48c')]['dimensions']['z']=+this[a0_0x256f('0x32')],this;},'get':function(){return this[a0_0x256f('0x32')];}}]),_0x28ec82;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')]('box');var _0x41c7b2=_0x36921f;function _0x388366(_0x5ab3c1,_0x4856da){var _0x23c216=Object[a0_0x256f('0x536')](_0x5ab3c1);if(Object[a0_0x256f('0x23e')]){var _0x58c156=Object[a0_0x256f('0x23e')](_0x5ab3c1);_0x4856da&&(_0x58c156=_0x58c156[a0_0x256f('0x53e')](function(_0x42d657){return Object[a0_0x256f('0x79')](_0x5ab3c1,_0x42d657)[a0_0x256f('0x2ec')];})),_0x23c216[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x23c216,_0x58c156);}return _0x23c216;}function _0x484a00(_0x3138b4){var _0x16e833=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x7dcace){return!0x1;}}();return function(){var _0x28b08c,_0x276cec=_0x30f874()(_0x3138b4);if(_0x16e833){var _0x37aff5=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x28b08c=Reflect[a0_0x256f('0x64c')](_0x276cec,arguments,_0x37aff5);}else _0x28b08c=_0x276cec[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x28b08c);};}var _0x32e541=DC[a0_0x256f('0x3bd')]['Cesium'],_0x569cb3=function(_0x58b5a9){_0x361b3f()(_0x26ec29,_0x58b5a9);var _0x13d5f8=_0x484a00(_0x26ec29);function _0x26ec29(_0x4b749a){var _0x32def8;return _0x307cd5()(this,_0x26ec29),(_0x32def8=_0x13d5f8[a0_0x256f('0x32b')](this))[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x4b749a),_0x32def8[a0_0x256f('0x10')]=new _0x32e541['Entity']({'corridor':{}}),_0x32def8[a0_0x256f('0x195')]=_0x282c30['getOverlayType'](a0_0x256f('0x320')),_0x32def8['_state']=_0x444ad5['a'][a0_0x256f('0x206')],_0x32def8;}return _0x323844()(_0x26ec29,[{'key':'_mountedHook','value':function(){this[a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')];}},{'key':a0_0x256f('0x8f'),'value':function(_0x464296,_0xfce561){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x2c394e){return 0x0===Object[a0_0x256f('0x536')](_0x2c394e)['length']||(delete _0x2c394e['positions'],this[a0_0x256f('0x9b')]=_0x2c394e,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x320')],this[a0_0x256f('0x9b')])),this;}},{'key':'positions','set':function(_0x3719a0){return this[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x3719a0),this['_delegate'][a0_0x256f('0x320')]['positions']=_0xdad4fa['a'][a0_0x256f('0x1ae')](this[a0_0x256f('0x5d3')]),this;},'get':function(){return this[a0_0x256f('0x5d3')];}}],[{'key':a0_0x256f('0x5b2'),'value':function(_0x3b45eb){var _0x201534,_0x145fb7=void 0x0,_0x1b41a2=_0x32e541[a0_0x256f('0x29c')]['now']();return _0x3b45eb[a0_0x256f('0x18d')]&&((_0x145fb7=new _0x26ec29(_0xdad4fa['a']['transformCartesianArrayToWGS84Array'](_0x3b45eb[a0_0x256f('0x18d')][a0_0x256f('0x50b')][a0_0x256f('0x21b')](_0x1b41a2))))[a0_0x256f('0x231')]=function(_0x1e484e){for(var _0x326c93=0x1;_0x326c93<arguments[a0_0x256f('0x658')];_0x326c93++){var _0xac2aad=null!=arguments[_0x326c93]?arguments[_0x326c93]:{};_0x326c93%0x2?_0x388366(Object(_0xac2aad),!0x0)[a0_0x256f('0x218')](function(_0x42635b){_0x254ba4()(_0x1e484e,_0x42635b,_0xac2aad[_0x42635b]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x1e484e,Object['getOwnPropertyDescriptors'](_0xac2aad)):_0x388366(Object(_0xac2aad))['forEach'](function(_0x268f45){Object[a0_0x256f('0x21f')](_0x1e484e,_0x268f45,Object['getOwnPropertyDescriptor'](_0xac2aad,_0x268f45));});}return _0x1e484e;}({},null==_0x3b45eb||null===(_0x201534=_0x3b45eb[a0_0x256f('0x624')])||void 0x0===_0x201534?void 0x0:_0x201534['getValue'](_0x1b41a2))),_0x145fb7;}}]),_0x26ec29;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')](a0_0x256f('0x320'));var _0x4ca475=_0x569cb3;function _0xb65154(_0x4aec6f){var _0x2a3eb0=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x5e480c){return!0x1;}}();return function(){var _0x3e3012,_0x4d191c=_0x30f874()(_0x4aec6f);if(_0x2a3eb0){var _0x248ec6=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x3e3012=Reflect[a0_0x256f('0x64c')](_0x4d191c,arguments,_0x248ec6);}else _0x3e3012=_0x4d191c[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x3e3012);};}var _0x4af470=DC['Namespace'][a0_0x256f('0x224')],_0x3486c8=function(_0x8e57b1){_0x361b3f()(_0x444d52,_0x8e57b1);var _0x1939ad=_0xb65154(_0x444d52);function _0x444d52(_0x487903,_0x41072c,_0x3b8de6,_0x2aca93){var _0x336222;return _0x307cd5()(this,_0x444d52),(_0x336222=_0x1939ad[a0_0x256f('0x32b')](this))['_position']=_0x32696b['a'][a0_0x256f('0x10c')](_0x487903),_0x336222[a0_0x256f('0x16d')]=+_0x41072c||0x0,_0x336222[a0_0x256f('0x111')]=+_0x3b8de6||0x0,_0x336222['_bottomRadius']=+_0x2aca93||0x0,_0x336222['_delegate']=new _0x4af470[(a0_0x256f('0x39d'))]({'cylinder':{}}),_0x336222['type']=_0x282c30['getOverlayType'](a0_0x256f('0x1be')),_0x336222[a0_0x256f('0x2fa')]=_0x444ad5['a']['INITIALIZED'],_0x336222;}return _0x323844()(_0x444d52,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x13c')]=this[a0_0x256f('0x666')],this[a0_0x256f('0x658')]=this[a0_0x256f('0x16d')],this[a0_0x256f('0x58d')]=this[a0_0x256f('0x111')],this[a0_0x256f('0x600')]=this[a0_0x256f('0x524')];}},{'key':a0_0x256f('0x8f'),'value':function(_0x2ff3e2,_0x4c2595){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x199f16){return 0x0===Object[a0_0x256f('0x536')](_0x199f16)['length']||(delete _0x199f16[a0_0x256f('0x658')]&&delete _0x199f16[a0_0x256f('0x58d')]&&delete _0x199f16[a0_0x256f('0x600')],this[a0_0x256f('0x9b')]=_0x199f16,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x1be')],this['_style'])),this;}},{'key':'position','set':function(_0x239c3e){return this[a0_0x256f('0x666')]=_0x32696b['a']['parsePosition'](_0x239c3e),this[a0_0x256f('0x10')][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),this['_delegate']['orientation']=_0x4af470['Transforms'][a0_0x256f('0x24d')](_0xdad4fa['a']['transformWGS84ToCartesian'](this[a0_0x256f('0x666')]),new _0x4af470[(a0_0x256f('0x30f'))](_0x4af470[a0_0x256f('0x4bb')]['toRadians'](this[a0_0x256f('0x666')][a0_0x256f('0x569')]),_0x4af470['Math'][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x3c3')]),_0x4af470['Math'][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x612')]))),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':a0_0x256f('0x658'),'set':function(_0x5bcb63){return this[a0_0x256f('0x16d')]=+_0x5bcb63||0x0,this['_delegate'][a0_0x256f('0x1be')][a0_0x256f('0x658')]=this[a0_0x256f('0x16d')],this;},'get':function(){return this[a0_0x256f('0x16d')];}},{'key':a0_0x256f('0x58d'),'set':function(_0x35a303){return this[a0_0x256f('0x111')]=+_0x35a303||0x0,this[a0_0x256f('0x10')][a0_0x256f('0x1be')][a0_0x256f('0x58d')]=this[a0_0x256f('0x111')],this;},'get':function(){return this[a0_0x256f('0x111')];}},{'key':a0_0x256f('0x600'),'set':function(_0x1c1459){return this[a0_0x256f('0x524')]=+_0x1c1459||0x0,this['_delegate'][a0_0x256f('0x1be')][a0_0x256f('0x600')]=this['_bottomRadius'],this;},'get':function(){return this[a0_0x256f('0x524')];}}]),_0x444d52;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')]('cylinder');var _0x91c8d3=_0x3486c8;function _0x24def5(_0x29706d){var _0x30e01c=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype']['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0xaec797){return!0x1;}}();return function(){var _0x25f8e0,_0x33220a=_0x30f874()(_0x29706d);if(_0x30e01c){var _0x2a11c5=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x25f8e0=Reflect[a0_0x256f('0x64c')](_0x33220a,arguments,_0x2a11c5);}else _0x25f8e0=_0x33220a['apply'](this,arguments);return _0x94f187()(this,_0x25f8e0);};}var _0x510faa=DC['Namespace']['Cesium'],_0x2b2914=function(_0x885ed6){_0x361b3f()(_0x327c6e,_0x885ed6);var _0x2e3d86=_0x24def5(_0x327c6e);function _0x327c6e(_0x2c2761,_0x2d1c46,_0x4bbe19){var _0x27d5e6;return _0x307cd5()(this,_0x327c6e),(_0x27d5e6=_0x2e3d86[a0_0x256f('0x32b')](this))[a0_0x256f('0x666')]=_0x32696b['a']['parsePosition'](_0x2c2761),_0x27d5e6[a0_0x256f('0x55e')]=+_0x2d1c46||0x0,_0x27d5e6[a0_0x256f('0x117')]=+_0x4bbe19||0x0,_0x27d5e6['_delegate']=new _0x510faa['Entity']({'ellipse':{}}),_0x27d5e6['type']=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x63d')),_0x27d5e6[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x27d5e6;}return _0x323844()(_0x327c6e,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x13c')]=this[a0_0x256f('0x666')],this[a0_0x256f('0x122')]=this[a0_0x256f('0x55e')],this[a0_0x256f('0x179')]=this['_semiMinorAxis'];}},{'key':a0_0x256f('0x421'),'value':function(_0x43c961){return 0x0===Object[a0_0x256f('0x536')](_0x43c961)[a0_0x256f('0x658')]||(delete _0x43c961['semiMajorAxis']&&delete _0x43c961['semiMinorAxis'],this[a0_0x256f('0x9b')]=_0x43c961,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x63d')],this[a0_0x256f('0x9b')])),this;}},{'key':a0_0x256f('0x13c'),'set':function(_0x3d71c1){return this['_position']=_0x32696b['a']['parsePosition'](_0x3d71c1),this['_delegate'][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),this[a0_0x256f('0x10')][a0_0x256f('0xfc')]=_0x510faa[a0_0x256f('0x12f')]['headingPitchRollQuaternion'](_0xdad4fa['a'][a0_0x256f('0x72')](this['_position']),new _0x510faa[(a0_0x256f('0x30f'))](_0x510faa['Math'][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x569')]),_0x510faa[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x3c3')]),_0x510faa[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x612')]))),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':'semiMajorAxis','set':function(_0x33c0ed){return this[a0_0x256f('0x55e')]=+_0x33c0ed||0x0,this['_delegate'][a0_0x256f('0x63d')][a0_0x256f('0x122')]=this[a0_0x256f('0x55e')],this;},'get':function(){return this[a0_0x256f('0x55e')];}},{'key':a0_0x256f('0x179'),'set':function(_0x45bc24){return this['_semiMinorAxis']=+_0x45bc24||0x0,this[a0_0x256f('0x10')]['ellipse']['semiMinorAxis']=this[a0_0x256f('0x117')],this;},'get':function(){return this[a0_0x256f('0x117')];}}]),_0x327c6e;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')]('ellipse');var _0x4b0a2c=_0x2b2914;function _0x462996(_0x4e52f7){var _0x12dcb2=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x3dbbd4){return!0x1;}}();return function(){var _0x3b85c7,_0x2e111d=_0x30f874()(_0x4e52f7);if(_0x12dcb2){var _0xb90827=_0x30f874()(this)['constructor'];_0x3b85c7=Reflect[a0_0x256f('0x64c')](_0x2e111d,arguments,_0xb90827);}else _0x3b85c7=_0x2e111d['apply'](this,arguments);return _0x94f187()(this,_0x3b85c7);};}var _0x2e0326=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5d8060=function(_0x3a45ca){_0x361b3f()(_0x18abe1,_0x3a45ca);var _0xb9caea=_0x462996(_0x18abe1);function _0x18abe1(_0x2ae4df,_0x5b4016){var _0x2cf7f5;return _0x307cd5()(this,_0x18abe1),(_0x2cf7f5=_0xb9caea[a0_0x256f('0x32b')](this))[a0_0x256f('0x666')]=_0x32696b['a']['parsePosition'](_0x2ae4df),_0x2cf7f5[a0_0x256f('0x1fa')]=_0x5b4016||{'x':0xa,'y':0xa,'z':0xa},_0x2cf7f5['_delegate']=new _0x2e0326[(a0_0x256f('0x39d'))]({'ellipsoid':{}}),_0x2cf7f5[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x2f')),_0x2cf7f5['_state']=_0x444ad5['a'][a0_0x256f('0x206')],_0x2cf7f5;}return _0x323844()(_0x18abe1,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x13c')]=this['_position'],this['radius']=this[a0_0x256f('0x1fa')];}},{'key':a0_0x256f('0x421'),'value':function(_0x179960){return 0x0===Object['keys'](_0x179960)[a0_0x256f('0x658')]||(delete _0x179960[a0_0x256f('0x223')],this['_style']=_0x179960,_0x47b8ba['c']['merge'](this[a0_0x256f('0x10')][a0_0x256f('0x2f')],this[a0_0x256f('0x9b')])),this;}},{'key':a0_0x256f('0x13c'),'set':function(_0x35b1cd){return this['_position']=_0x32696b['a'][a0_0x256f('0x10c')](_0x35b1cd),this[a0_0x256f('0x10')][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),this['_delegate']['orientation']=_0x2e0326[a0_0x256f('0x12f')]['headingPitchRollQuaternion'](_0xdad4fa['a'][a0_0x256f('0x72')](this['_position']),new _0x2e0326[(a0_0x256f('0x30f'))](_0x2e0326[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this['_position'][a0_0x256f('0x569')]),_0x2e0326[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this['_position'][a0_0x256f('0x3c3')]),_0x2e0326[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x612')]))),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':a0_0x256f('0x223'),'set':function(_0x7f32d2){return this[a0_0x256f('0x1fa')]=_0x7f32d2||{'x':0xa,'y':0xa,'z':0xa},this[a0_0x256f('0x10')]['ellipsoid'][a0_0x256f('0x4e4')]=this[a0_0x256f('0x1fa')],this;},'get':function(){return this[a0_0x256f('0x1fa')];}}]),_0x18abe1;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')](a0_0x256f('0x2f'));var _0x1822c4=_0x5d8060;function _0x564b3e(_0x2f38c7){var _0x4d00a3=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x24a5eb){return!0x1;}}();return function(){var _0xd392ea,_0x12609f=_0x30f874()(_0x2f38c7);if(_0x4d00a3){var _0x28c92f=_0x30f874()(this)['constructor'];_0xd392ea=Reflect[a0_0x256f('0x64c')](_0x12609f,arguments,_0x28c92f);}else _0xd392ea=_0x12609f['apply'](this,arguments);return _0x94f187()(this,_0xd392ea);};}var _0x5ae9e6=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x118fd4=function(_0x5395d5){_0x361b3f()(_0x5c1fc5,_0x5395d5);var _0x4dac79=_0x564b3e(_0x5c1fc5);function _0x5c1fc5(_0x4773cc,_0x38336f,_0x4f2f61,_0x5d036b){var _0x298930;return _0x307cd5()(this,_0x5c1fc5),(_0x298930=_0x4dac79[a0_0x256f('0x32b')](this))[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x4773cc),_0x298930['_width']=+_0x38336f||0x0,_0x298930[a0_0x256f('0x32')]=+_0x4f2f61||0x0,_0x298930[a0_0x256f('0x2cb')]=new _0x5ae9e6[(a0_0x256f('0x5f6'))](_0x5ae9e6[a0_0x256f('0x534')][a0_0x256f('0x444')](_0x5d036b),0x0),_0x298930['_delegate']=new _0x5ae9e6[(a0_0x256f('0x39d'))]({'plane':{'dimensions':{'x':_0x298930['_width'],'y':_0x298930[a0_0x256f('0x32')]}}}),_0x298930['type']=_0x282c30['getOverlayType'](a0_0x256f('0x5a')),_0x298930[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x298930;}return _0x323844()(_0x5c1fc5,[{'key':a0_0x256f('0x60c'),'value':function(){this['position']=this['_position'],this['direction']=this[a0_0x256f('0x13e')];}},{'key':a0_0x256f('0x8f'),'value':function(_0x487abb,_0x35a542){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x112395){return 0x0===Object['keys'](_0x112395)[a0_0x256f('0x658')]||(delete _0x112395[a0_0x256f('0x4bd')],this[a0_0x256f('0x9b')]=_0x112395,_0x47b8ba['c']['merge'](this[a0_0x256f('0x10')]['plane'],this['_style'])),this;}},{'key':a0_0x256f('0x13c'),'set':function(_0x24a869){return this[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x24a869),this[a0_0x256f('0x10')][a0_0x256f('0x13c')]=_0xdad4fa['a']['transformWGS84ToCartesian'](this[a0_0x256f('0x666')]),this['_delegate'][a0_0x256f('0xfc')]=_0x5ae9e6['Transforms'][a0_0x256f('0x24d')](_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),new _0x5ae9e6[(a0_0x256f('0x30f'))](_0x5ae9e6['Math']['toRadians'](this[a0_0x256f('0x666')][a0_0x256f('0x569')]),_0x5ae9e6[a0_0x256f('0x4bb')]['toRadians'](this[a0_0x256f('0x666')]['pitch']),_0x5ae9e6[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this[a0_0x256f('0x666')][a0_0x256f('0x612')]))),this;},'get':function(){return this[a0_0x256f('0x666')];}},{'key':'width','set':function(_0x47692f){return this[a0_0x256f('0x70')]=+_0x47692f||0x0,this[a0_0x256f('0x10')][a0_0x256f('0x3d0')]['dimensions']['x']=this[a0_0x256f('0x70')],this;},'get':function(){return this[a0_0x256f('0x70')];}},{'key':a0_0x256f('0x4fa'),'set':function(_0x548ab4){return this['_height']=+_0x548ab4||0x0,this[a0_0x256f('0x10')]['plan'][a0_0x256f('0x4bd')]['y']=this[a0_0x256f('0x32')],this;},'get':function(){return this[a0_0x256f('0x32')];}},{'key':a0_0x256f('0x20b'),'set':function(_0x329ecb){return this['_plane']=new _0x5ae9e6[(a0_0x256f('0x5f6'))](_0x329ecb,0x0),this[a0_0x256f('0x10')][a0_0x256f('0x3d0')][a0_0x256f('0x5a')]=new _0x5ae9e6[(a0_0x256f('0x5f6'))](_0x329ecb,0x0),this;}}]),_0x5c1fc5;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')](a0_0x256f('0x5a'));var _0x5b499c=_0x118fd4;function _0x2de83d(_0x18387d,_0x3e72fb){var _0x2f6437=Object[a0_0x256f('0x536')](_0x18387d);if(Object[a0_0x256f('0x23e')]){var _0x3b7142=Object['getOwnPropertySymbols'](_0x18387d);_0x3e72fb&&(_0x3b7142=_0x3b7142[a0_0x256f('0x53e')](function(_0x310344){return Object[a0_0x256f('0x79')](_0x18387d,_0x310344)[a0_0x256f('0x2ec')];})),_0x2f6437['push']['apply'](_0x2f6437,_0x3b7142);}return _0x2f6437;}function _0x25fd07(_0x1663d5){var _0x915f29=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x3d1e8f){return!0x1;}}();return function(){var _0x10643c,_0x499786=_0x30f874()(_0x1663d5);if(_0x915f29){var _0x5af6fe=_0x30f874()(this)['constructor'];_0x10643c=Reflect['construct'](_0x499786,arguments,_0x5af6fe);}else _0x10643c=_0x499786[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x10643c);};}var _0x1e339d=DC['Namespace']['Cesium'],_0xa22fb9=function(_0x37e35a){_0x361b3f()(_0x4209d0,_0x37e35a);var _0xf5dc81=_0x25fd07(_0x4209d0);function _0x4209d0(_0x44ec14,_0x4e110d){var _0x3bdb41;return _0x307cd5()(this,_0x4209d0),(_0x3bdb41=_0xf5dc81[a0_0x256f('0x32b')](this))['_positions']=_0x32696b['a'][a0_0x256f('0x442')](_0x44ec14),_0x3bdb41[a0_0x256f('0x2de')]=_0x4e110d||[],_0x3bdb41[a0_0x256f('0x10')]=new _0x1e339d[(a0_0x256f('0x39d'))]({'polylineVolume':{}}),_0x3bdb41[a0_0x256f('0x195')]=_0x282c30['getOverlayType'](a0_0x256f('0x4b9')),_0x3bdb41[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x3bdb41;}return _0x323844()(_0x4209d0,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')],this[a0_0x256f('0x35c')]=this[a0_0x256f('0x2de')];}},{'key':'setLabel','value':function(_0x68e62b,_0xe3dc9){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x14b06f){return 0x0===Object[a0_0x256f('0x536')](_0x14b06f)['length']||(delete _0x14b06f[a0_0x256f('0x50b')]&&delete _0x14b06f[a0_0x256f('0x35c')],this[a0_0x256f('0x9b')]=_0x14b06f,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x282')],this[a0_0x256f('0x9b')])),this;}},{'key':a0_0x256f('0x50b'),'set':function(_0x4faff4){return this[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x4faff4),this[a0_0x256f('0x10')][a0_0x256f('0x282')]['positions']=_0xdad4fa['a']['transformWGS84ArrayToCartesianArray'](this[a0_0x256f('0x5d3')]),this;},'get':function(){return this[a0_0x256f('0x5d3')];}},{'key':a0_0x256f('0x35c'),'set':function(_0x27f0ca){return this['_shape']=_0x27f0ca||[],this[a0_0x256f('0x10')]['polylineVolume'][a0_0x256f('0x35c')]=this['_shape'],this;},'get':function(){return this[a0_0x256f('0x2de')];}}],[{'key':a0_0x256f('0x5b2'),'value':function(_0x132d78,_0x8191b9){var _0x29c068,_0x5aa069=void 0x0,_0x482ed6=_0x1e339d[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]();return _0x132d78[a0_0x256f('0x18d')]&&((_0x5aa069=new _0x4209d0(_0xdad4fa['a'][a0_0x256f('0x292')](_0x132d78[a0_0x256f('0x18d')]['positions'][a0_0x256f('0x21b')](_0x482ed6)),_0x8191b9))[a0_0x256f('0x231')]=function(_0x5489c6){for(var _0x341859=0x1;_0x341859<arguments['length'];_0x341859++){var _0x2ffd1d=null!=arguments[_0x341859]?arguments[_0x341859]:{};_0x341859%0x2?_0x2de83d(Object(_0x2ffd1d),!0x0)['forEach'](function(_0x3fe676){_0x254ba4()(_0x5489c6,_0x3fe676,_0x2ffd1d[_0x3fe676]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x5489c6,Object[a0_0x256f('0x498')](_0x2ffd1d)):_0x2de83d(Object(_0x2ffd1d))[a0_0x256f('0x218')](function(_0x2c63c0){Object[a0_0x256f('0x21f')](_0x5489c6,_0x2c63c0,Object[a0_0x256f('0x79')](_0x2ffd1d,_0x2c63c0));});}return _0x5489c6;}({},null==_0x132d78||null===(_0x29c068=_0x132d78[a0_0x256f('0x624')])||void 0x0===_0x29c068?void 0x0:_0x29c068[a0_0x256f('0x21b')](_0x482ed6))),_0x5aa069;}}]),_0x4209d0;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')](a0_0x256f('0x4b9'));var _0x3c01ef=_0xa22fb9;function _0x444a12(_0x106383){var _0x3f7634=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct']['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x5006e5){return!0x1;}}();return function(){var _0x3617a9,_0x1336f9=_0x30f874()(_0x106383);if(_0x3f7634){var _0x323c22=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x3617a9=Reflect[a0_0x256f('0x64c')](_0x1336f9,arguments,_0x323c22);}else _0x3617a9=_0x1336f9[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x3617a9);};}var _0x658569=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x10a74f=function(_0x5ec839){_0x361b3f()(_0x33ddc0,_0x5ec839);var _0x705cf6=_0x444a12(_0x33ddc0);function _0x33ddc0(_0x210fe4){var _0x1d3c51;return _0x307cd5()(this,_0x33ddc0),(_0x1d3c51=_0x705cf6[a0_0x256f('0x32b')](this))[a0_0x256f('0x5d3')]=_0x32696b['a']['parsePositions'](_0x210fe4),_0x1d3c51[a0_0x256f('0x10')]=new _0x658569['Entity']({'rectangle':{}}),_0x1d3c51[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x15a')),_0x1d3c51[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x1d3c51;}return _0x323844()(_0x33ddc0,[{'key':a0_0x256f('0x60c'),'value':function(){this['positions']=this[a0_0x256f('0x5d3')];}},{'key':a0_0x256f('0x8f'),'value':function(_0x3b5054,_0x2b855d){return this;}},{'key':'setStyle','value':function(_0x1d992f){return 0x0===Object['keys'](_0x1d992f)['length']||(delete _0x1d992f[a0_0x256f('0x50b')],this[a0_0x256f('0x9b')]=_0x1d992f,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x15a')],this['_style'])),this;}},{'key':a0_0x256f('0x50b'),'set':function(_0x20c974){return this['_positions']=_0x32696b['a'][a0_0x256f('0x442')](_0x20c974),this[a0_0x256f('0x10')]['rectangle'][a0_0x256f('0x661')]=_0x658569['Rectangle'][a0_0x256f('0x3a6')](_0xdad4fa['a'][a0_0x256f('0x1ae')](this[a0_0x256f('0x5d3')])),this;},'get':function(){return this[a0_0x256f('0x5d3')];}}]),_0x33ddc0;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')](a0_0x256f('0x15a'));var _0x51fba1=_0x10a74f;function _0x4e648f(_0x225f4c,_0x365a12){var _0x18b2d7=Object['keys'](_0x225f4c);if(Object[a0_0x256f('0x23e')]){var _0x8079e3=Object[a0_0x256f('0x23e')](_0x225f4c);_0x365a12&&(_0x8079e3=_0x8079e3[a0_0x256f('0x53e')](function(_0x22251c){return Object['getOwnPropertyDescriptor'](_0x225f4c,_0x22251c)[a0_0x256f('0x2ec')];})),_0x18b2d7[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x18b2d7,_0x8079e3);}return _0x18b2d7;}function _0x25ee0d(_0x4da643){var _0x579ec5=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype']['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x3aec9f){return!0x1;}}();return function(){var _0x20c4bc,_0x2e88bc=_0x30f874()(_0x4da643);if(_0x579ec5){var _0x1e6c60=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x20c4bc=Reflect[a0_0x256f('0x64c')](_0x2e88bc,arguments,_0x1e6c60);}else _0x20c4bc=_0x2e88bc[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x20c4bc);};}var _0x1c8eff=DC[a0_0x256f('0x3bd')]['Cesium'],_0x1c509b=function(_0x5e20e8){_0x361b3f()(_0x5adf7f,_0x5e20e8);var _0x1e58c2=_0x25ee0d(_0x5adf7f);function _0x5adf7f(_0x28af21){var _0x579a20;return _0x307cd5()(this,_0x5adf7f),(_0x579a20=_0x1e58c2[a0_0x256f('0x32b')](this))[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x28af21),_0x579a20[a0_0x256f('0x10')]=new _0x1c8eff[(a0_0x256f('0x39d'))]({'wall':{}}),_0x579a20['type']=_0x282c30[a0_0x256f('0x521')]('wall'),_0x579a20[a0_0x256f('0x2fa')]=_0x444ad5['a']['INITIALIZED'],_0x579a20;}return _0x323844()(_0x5adf7f,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')];}},{'key':'setLabel','value':function(_0x58c85d,_0x298a06){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x5ea43a){return 0x0===Object[a0_0x256f('0x536')](_0x5ea43a)[a0_0x256f('0x658')]||(delete _0x5ea43a[a0_0x256f('0x50b')],this[a0_0x256f('0x9b')]=_0x5ea43a,_0x47b8ba['c'][a0_0x256f('0x3f4')](this['_delegate'][a0_0x256f('0x21a')],this[a0_0x256f('0x9b')])),this;}},{'key':a0_0x256f('0x50b'),'set':function(_0x58ae28){return this[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x58ae28),this[a0_0x256f('0x10')][a0_0x256f('0x21a')][a0_0x256f('0x50b')]=_0xdad4fa['a'][a0_0x256f('0x1ae')](this[a0_0x256f('0x5d3')]),this;},'get':function(){return this[a0_0x256f('0x5d3')];}}],[{'key':a0_0x256f('0x5b2'),'value':function(_0x37bd7b){var _0x1701c2,_0x51b424=void 0x0,_0x59df6a=_0x1c8eff['JulianDate'][a0_0x256f('0x2c9')]();return _0x37bd7b[a0_0x256f('0x18d')]&&((_0x51b424=new _0x5adf7f(_0xdad4fa['a'][a0_0x256f('0x292')](_0x37bd7b[a0_0x256f('0x18d')][a0_0x256f('0x50b')][a0_0x256f('0x21b')](_0x59df6a))))['attr']=function(_0x3e5c1e){for(var _0x172716=0x1;_0x172716<arguments[a0_0x256f('0x658')];_0x172716++){var _0x36be7e=null!=arguments[_0x172716]?arguments[_0x172716]:{};_0x172716%0x2?_0x4e648f(Object(_0x36be7e),!0x0)[a0_0x256f('0x218')](function(_0x2d89b4){_0x254ba4()(_0x3e5c1e,_0x2d89b4,_0x36be7e[_0x2d89b4]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x3e5c1e,Object['getOwnPropertyDescriptors'](_0x36be7e)):_0x4e648f(Object(_0x36be7e))['forEach'](function(_0x5cfa6a){Object['defineProperty'](_0x3e5c1e,_0x5cfa6a,Object[a0_0x256f('0x79')](_0x36be7e,_0x5cfa6a));});}return _0x3e5c1e;}({},null==_0x37bd7b||null===(_0x1701c2=_0x37bd7b[a0_0x256f('0x624')])||void 0x0===_0x1701c2?void 0x0:_0x1701c2[a0_0x256f('0x21b')](_0x59df6a))),_0x51b424;}}]),_0x5adf7f;}(_0x282c30);_0x282c30['registerType']('wall');var _0x5d08f9=_0x1c509b,_0x1bcd0f=_0x5ceb8d(0xd);function _0x486640(_0xbe9ce7,_0x5dc592){var _0x370aa9=Object[a0_0x256f('0x536')](_0xbe9ce7);if(Object[a0_0x256f('0x23e')]){var _0x357d2a=Object[a0_0x256f('0x23e')](_0xbe9ce7);_0x5dc592&&(_0x357d2a=_0x357d2a[a0_0x256f('0x53e')](function(_0x595c6f){return Object[a0_0x256f('0x79')](_0xbe9ce7,_0x595c6f)[a0_0x256f('0x2ec')];})),_0x370aa9[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x370aa9,_0x357d2a);}return _0x370aa9;}function _0x274c4f(_0x4ec162){for(var _0x43cb88=0x1;_0x43cb88<arguments['length'];_0x43cb88++){var _0x2cf345=null!=arguments[_0x43cb88]?arguments[_0x43cb88]:{};_0x43cb88%0x2?_0x486640(Object(_0x2cf345),!0x0)['forEach'](function(_0x1bdf35){_0x254ba4()(_0x4ec162,_0x1bdf35,_0x2cf345[_0x1bdf35]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x4ec162,Object[a0_0x256f('0x498')](_0x2cf345)):_0x486640(Object(_0x2cf345))[a0_0x256f('0x218')](function(_0x4da143){Object[a0_0x256f('0x21f')](_0x4ec162,_0x4da143,Object[a0_0x256f('0x79')](_0x2cf345,_0x4da143));});}return _0x4ec162;}function _0x188063(_0x531562){var _0x3fbba2=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x361d68){return!0x1;}}();return function(){var _0x226739,_0x2ceb49=_0x30f874()(_0x531562);if(_0x3fbba2){var _0x358af6=_0x30f874()(this)['constructor'];_0x226739=Reflect[a0_0x256f('0x64c')](_0x2ceb49,arguments,_0x358af6);}else _0x226739=_0x2ceb49['apply'](this,arguments);return _0x94f187()(this,_0x226739);};}var _0x7337b8=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x242ba9=function(_0x19f233){_0x361b3f()(_0x64473c,_0x19f233);var _0x39e024=_0x188063(_0x64473c);function _0x64473c(_0xfaec36,_0x42dba4){var _0x465783;return _0x307cd5()(this,_0x64473c),(_0x465783=_0x39e024[a0_0x256f('0x32b')](this))[a0_0x256f('0x10')]=new _0x7337b8[(a0_0x256f('0x39d'))]({'billboard':{}}),_0x465783[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0xfaec36),_0x465783['_icon']=_0x42dba4,_0x465783[a0_0x256f('0x3a')]=[0x20,0x20],_0x465783['type']=_0x282c30['getOverlayType']('custom_billboard'),_0x465783['_state']=_0x444ad5['a']['INITIALIZED'],_0x465783;}return _0x323844()(_0x64473c,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x13c')]=this[a0_0x256f('0x666')],this['icon']=this[a0_0x256f('0x2c3')],this[a0_0x256f('0x208')]=this[a0_0x256f('0x3a')];}},{'key':'setLabel','value':function(_0x51a553,_0x3efce5){return this[a0_0x256f('0x10')][a0_0x256f('0x3a4')]=_0x274c4f(_0x274c4f({},_0x3efce5),{},{'text':_0x51a553}),this;}},{'key':a0_0x256f('0x421'),'value':function(_0x22b2e7){return _0x22b2e7&&0x0!==Object['keys'](_0x22b2e7)[a0_0x256f('0x658')]?(delete _0x22b2e7['image']&&delete _0x22b2e7[a0_0x256f('0x140')]&&delete _0x22b2e7[a0_0x256f('0x4fa')],this['_style']=_0x22b2e7,_0x47b8ba['c'][a0_0x256f('0x3f4')](this['_delegate']['billboard'],this[a0_0x256f('0x9b')]),this):this;}},{'key':'setVLine','value':function(_0x53255d){if(this[a0_0x256f('0x666')]['alt']>0x0&&!this[a0_0x256f('0x10')][a0_0x256f('0x18d')]){var _0x28b867=new _0x1bcd0f['a'](this[a0_0x256f('0x666')]['lng'],this[a0_0x256f('0x666')][a0_0x256f('0x44a')],0x0);this[a0_0x256f('0x10')]['polyline']=_0x274c4f(_0x274c4f({},_0x53255d),{},{'positions':_0xdad4fa['a']['transformWGS84ArrayToCartesianArray']([_0x28b867,this[a0_0x256f('0x666')]])});}return this;}},{'key':a0_0x256f('0x580'),'value':function(_0x432477,_0x1160c0,_0xe37fcb){var _0x1694c3=0x0,_0x39c9ef=_0xe37fcb||0x0;return this['_delegate']['ellipse']=_0x274c4f(_0x274c4f({},_0x1160c0),{},{'semiMajorAxis':_0x432477,'semiMinorAxis':_0x432477,'stRotation':new _0x7337b8[(a0_0x256f('0x420'))](function(_0x52f16f){return _0x39c9ef>0x0&&(_0x1694c3+=_0x39c9ef)>=0x168&&(_0x1694c3=0x0),_0x1694c3;})}),this;}},{'key':'position','set':function(_0x3cb984){return this[a0_0x256f('0x666')]=_0x32696b['a'][a0_0x256f('0x10c')](_0x3cb984),this[a0_0x256f('0x10')][a0_0x256f('0x13c')]=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),this;},'get':function(){return this['_position'];}},{'key':'icon','set':function(_0x4e1f2c){return this[a0_0x256f('0x2c3')]=_0x4e1f2c,this[a0_0x256f('0x10')][a0_0x256f('0x13d')][a0_0x256f('0x392')]=this['_icon'],this;},'get':function(){return this[a0_0x256f('0x2c3')];}},{'key':'size','set':function(_0x3b1090){if(!Array['isArray'](_0x3b1090))throw new Error(a0_0x256f('0x343'));return this[a0_0x256f('0x3a')]=_0x3b1090,this[a0_0x256f('0x10')]['billboard'][a0_0x256f('0x140')]=this[a0_0x256f('0x3a')][0x0]||0x20,this[a0_0x256f('0x10')][a0_0x256f('0x13d')]['height']=this[a0_0x256f('0x3a')][0x1]||0x20,this;},'get':function(){return this['_size'];}}]),_0x64473c;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')]('custom_billboard');var _0x2c6827=_0x242ba9;function _0x1d43ac(_0x30f79e,_0x39dd88){var _0x115e90=Object['keys'](_0x30f79e);if(Object['getOwnPropertySymbols']){var _0x253805=Object['getOwnPropertySymbols'](_0x30f79e);_0x39dd88&&(_0x253805=_0x253805[a0_0x256f('0x53e')](function(_0x57a144){return Object[a0_0x256f('0x79')](_0x30f79e,_0x57a144)[a0_0x256f('0x2ec')];})),_0x115e90[a0_0x256f('0x289')]['apply'](_0x115e90,_0x253805);}return _0x115e90;}function _0x41caf4(_0xf1f313){for(var _0x1268ec=0x1;_0x1268ec<arguments[a0_0x256f('0x658')];_0x1268ec++){var _0x20e520=null!=arguments[_0x1268ec]?arguments[_0x1268ec]:{};_0x1268ec%0x2?_0x1d43ac(Object(_0x20e520),!0x0)['forEach'](function(_0x325af6){_0x254ba4()(_0xf1f313,_0x325af6,_0x20e520[_0x325af6]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0xf1f313,Object[a0_0x256f('0x498')](_0x20e520)):_0x1d43ac(Object(_0x20e520))[a0_0x256f('0x218')](function(_0x4f5c31){Object[a0_0x256f('0x21f')](_0xf1f313,_0x4f5c31,Object[a0_0x256f('0x79')](_0x20e520,_0x4f5c31));});}return _0xf1f313;}function _0x55ea59(_0x280535){var _0x558190=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype']['toString']['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x3701d0){return!0x1;}}();return function(){var _0x45d76d,_0x598b2c=_0x30f874()(_0x280535);if(_0x558190){var _0x528568=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x45d76d=Reflect[a0_0x256f('0x64c')](_0x598b2c,arguments,_0x528568);}else _0x45d76d=_0x598b2c[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x45d76d);};}var _0x4a66a5=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x383fbf=function(_0x1960cf){_0x361b3f()(_0x67ceca,_0x1960cf);var _0x41ed65=_0x55ea59(_0x67ceca);function _0x67ceca(_0x1e3b2a,_0x450293){var _0x2231e9;return _0x307cd5()(this,_0x67ceca),(_0x2231e9=_0x41ed65['call'](this))['_delegate']=new _0x4a66a5['Entity']({'label':{}}),_0x2231e9[a0_0x256f('0x666')]=_0x32696b['a']['parsePosition'](_0x1e3b2a),_0x2231e9[a0_0x256f('0x5b8')]=_0x450293,_0x2231e9['type']=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x62a')),_0x2231e9['_state']=_0x444ad5['a']['INITIALIZED'],_0x2231e9;}return _0x323844()(_0x67ceca,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x13c')]=this['_position'],this[a0_0x256f('0x644')]=this['_text'];}},{'key':a0_0x256f('0x421'),'value':function(_0x2a02ae){return _0x2a02ae&&0x0!==Object['keys'](_0x2a02ae)['length']?(delete _0x2a02ae[a0_0x256f('0x644')],this[a0_0x256f('0x9b')]=_0x2a02ae,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x3a4')],this[a0_0x256f('0x9b')]),this):this;}},{'key':a0_0x256f('0x39b'),'value':function(_0x2b7e48){if(this[a0_0x256f('0x666')]['alt']>0x0&&!this[a0_0x256f('0x10')][a0_0x256f('0x18d')]){var _0xf72cd9=new _0x1bcd0f['a'](this[a0_0x256f('0x666')][a0_0x256f('0x16e')],this[a0_0x256f('0x666')][a0_0x256f('0x44a')],0x0);this[a0_0x256f('0x10')][a0_0x256f('0x18d')]=_0x41caf4(_0x41caf4({},_0x2b7e48),{},{'positions':_0xdad4fa['a'][a0_0x256f('0x1ae')]([_0xf72cd9,this[a0_0x256f('0x666')]])});}return this;}},{'key':'setBottomCircle','value':function(_0x587336,_0x54e59b,_0x584538){var _0x45b09f=0x0,_0x4b2ea1=_0x584538||0x0;return this['_delegate'][a0_0x256f('0x63d')]=_0x41caf4(_0x41caf4({},_0x54e59b),{},{'semiMajorAxis':_0x587336,'semiMinorAxis':_0x587336,'stRotation':new _0x4a66a5['CallbackProperty'](function(_0x55d90e){return _0x4b2ea1>0x0&&(_0x45b09f+=_0x4b2ea1)>=0x168&&(_0x45b09f=0x0),_0x45b09f;})}),this;}},{'key':a0_0x256f('0x13c'),'set':function(_0x3158e9){return this['_position']=_0x32696b['a']['parsePosition'](_0x3158e9),this['_delegate']['position']=_0xdad4fa['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),this;},'get':function(){return this['_position'];}},{'key':'text','set':function(_0x2ce53d){return this[a0_0x256f('0x5b8')]=_0x2ce53d,this[a0_0x256f('0x10')][a0_0x256f('0x3a4')][a0_0x256f('0x644')]=this['_text'],this;},'get':function(){return this[a0_0x256f('0x5b8')];}}]),_0x67ceca;}(_0x282c30);_0x282c30['registerType'](a0_0x256f('0x62a'));var _0x4d5539=_0x383fbf;function _0x28490b(_0x46e7a2){var _0x4c4f83=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x23185c){return!0x1;}}();return function(){var _0x421cdb,_0xe2b629=_0x30f874()(_0x46e7a2);if(_0x4c4f83){var _0xa91c2e=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x421cdb=Reflect['construct'](_0xe2b629,arguments,_0xa91c2e);}else _0x421cdb=_0xe2b629[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x421cdb);};}var _0x304674=DC[a0_0x256f('0x3bd')]['Cesium'],_0xb63dab=Math['PI']/0x2,_0x23c455=function(_0x1d9dcf){_0x361b3f()(_0x297d79,_0x1d9dcf);var _0x47f523=_0x28490b(_0x297d79);function _0x297d79(_0x3b35a7){var _0x35df25;return _0x307cd5()(this,_0x297d79),(_0x35df25=_0x47f523[a0_0x256f('0x32b')](this))[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x3b35a7),_0x35df25[a0_0x256f('0x10')]=new _0x304674[(a0_0x256f('0x39d'))]({'polygon':{}}),_0x35df25[a0_0x256f('0x246')]=0.18,_0x35df25[a0_0x256f('0x4a')]=0.3,_0x35df25[a0_0x256f('0x5ba')]=0.85,_0x35df25[a0_0x256f('0x519')]=0.15,_0x35df25['headTailFactor']=0.8,_0x35df25[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x9c')),_0x35df25[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x35df25;}return _0x323844()(_0x297d79,[{'key':a0_0x256f('0x5e8'),'value':function(_0x17063a,_0x2b6197,_0x3d033b){var _0x5ea12a=_0x47b8ba['b'][a0_0x256f('0x607')](_0x17063a),_0x2005ac=_0x5ea12a*this[a0_0x256f('0x246')],_0x41f84b=_0x17063a[_0x17063a['length']-0x1];_0x5ea12a=_0x47b8ba['b'][a0_0x256f('0x177')](_0x41f84b,_0x17063a[_0x17063a[a0_0x256f('0x658')]-0x2]);var _0xbad15=_0x47b8ba['b'][a0_0x256f('0x177')](_0x2b6197,_0x3d033b);_0x2005ac>_0xbad15*this[a0_0x256f('0x33a')]&&(_0x2005ac=_0xbad15*this[a0_0x256f('0x33a')]);var _0x5d6dd7=_0x2005ac*this[a0_0x256f('0x4a')],_0x80d98e=_0x2005ac*this[a0_0x256f('0x519')],_0x3ec45b=(_0x2005ac=_0x2005ac>_0x5ea12a?_0x5ea12a:_0x2005ac)*this[a0_0x256f('0x5ba')],_0x48f2b8=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x17063a[_0x17063a['length']-0x2],_0x41f84b,0x0,_0x2005ac,!0x0),_0x3277c7=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x17063a[_0x17063a[a0_0x256f('0x658')]-0x2],_0x41f84b,0x0,_0x3ec45b,!0x0),_0x485c00=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x41f84b,_0x48f2b8,_0xb63dab,_0x5d6dd7,!0x1),_0x33b437=_0x47b8ba['b']['getThirdPoint'](_0x41f84b,_0x48f2b8,_0xb63dab,_0x5d6dd7,!0x0);return[_0x47b8ba['b']['getThirdPoint'](_0x41f84b,_0x3277c7,_0xb63dab,_0x80d98e,!0x1),_0x485c00,_0x41f84b,_0x33b437,_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x41f84b,_0x3277c7,_0xb63dab,_0x80d98e,!0x0)];}},{'key':a0_0x256f('0x389'),'value':function(_0x3b9b83,_0x3a58f5,_0x53d595,_0x18986d){for(var _0x40f671=_0x47b8ba['b'][a0_0x256f('0x123')](_0x3b9b83),_0x4ca3f7=_0x47b8ba['b'][a0_0x256f('0x607')](_0x3b9b83)*_0x18986d,_0x24c625=(_0x4ca3f7-_0x47b8ba['b'][a0_0x256f('0x177')](_0x3a58f5,_0x53d595))/0x2,_0xf42b15=0x0,_0x170e25=[],_0x4ca7ba=[],_0x5cde9a=0x1;_0x5cde9a<_0x3b9b83[a0_0x256f('0x658')]-0x1;_0x5cde9a++){var _0x33cbca=_0x47b8ba['b']['getAngleOfThreePoints'](_0x3b9b83[_0x5cde9a-0x1],_0x3b9b83[_0x5cde9a],_0x3b9b83[_0x5cde9a+0x1])/0x2,_0x1748d0=(_0x4ca3f7/0x2-(_0xf42b15+=_0x47b8ba['b'][a0_0x256f('0x177')](_0x3b9b83[_0x5cde9a-0x1],_0x3b9b83[_0x5cde9a]))/_0x40f671*_0x24c625)/Math[a0_0x256f('0x637')](_0x33cbca),_0x509fc6=_0x47b8ba['b']['getThirdPoint'](_0x3b9b83[_0x5cde9a-0x1],_0x3b9b83[_0x5cde9a],Math['PI']-_0x33cbca,_0x1748d0,!0x0),_0x2be67c=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x3b9b83[_0x5cde9a-0x1],_0x3b9b83[_0x5cde9a],_0x33cbca,_0x1748d0,!0x1);_0x170e25[a0_0x256f('0x289')](_0x509fc6),_0x4ca7ba[a0_0x256f('0x289')](_0x2be67c);}return _0x170e25['concat'](_0x4ca7ba);}},{'key':a0_0x256f('0x42f'),'value':function(){var _0x567312=_0x32696b['a'][a0_0x256f('0x107')](this[a0_0x256f('0x5d3')])[0x0],_0x235404=_0x567312[0x0],_0x2529a2=_0x567312[0x1];_0x47b8ba['b'][a0_0x256f('0x285')](_0x567312[0x0],_0x567312[0x1],_0x567312[0x2])&&(_0x235404=_0x567312[0x1],_0x2529a2=_0x567312[0x0]);var _0xdc68a0=[_0x47b8ba['b'][a0_0x256f('0x3c6')](_0x235404,_0x2529a2)][a0_0x256f('0x318')](_0x567312[a0_0x256f('0x4dd')](0x2)),_0x2a3d07=this['_getArrowHeadPoints'](_0xdc68a0,_0x235404,_0x2529a2),_0x1143c0=_0x2a3d07[0x0],_0x198680=_0x2a3d07[0x4],_0x96df2=_0x47b8ba['b']['distance'](_0x235404,_0x2529a2)/_0x47b8ba['b'][a0_0x256f('0x607')](_0xdc68a0),_0x24bc27=this[a0_0x256f('0x389')](_0xdc68a0,_0x1143c0,_0x198680,_0x96df2),_0x2110b5=_0x24bc27['length'],_0x2a3bef=[_0x235404][a0_0x256f('0x318')](_0x24bc27[a0_0x256f('0x4dd')](0x0,_0x2110b5/0x2));_0x2a3bef['push'](_0x1143c0);var _0x3b781d=[_0x2529a2][a0_0x256f('0x318')](_0x24bc27[a0_0x256f('0x4dd')](_0x2110b5/0x2,_0x2110b5));return _0x3b781d['push'](_0x198680),_0x2a3bef=_0x47b8ba['b'][a0_0x256f('0xfe')](_0x2a3bef),_0x3b781d=_0x47b8ba['b'][a0_0x256f('0xfe')](_0x3b781d),new _0x304674[(a0_0x256f('0x634'))](_0xdad4fa['a'][a0_0x256f('0x1ae')](_0x32696b['a'][a0_0x256f('0x442')](_0x2a3bef[a0_0x256f('0x318')](_0x2a3d07,_0x3b781d[a0_0x256f('0x104')]()))));}},{'key':'_mountedHook','value':function(){this[a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')];}},{'key':a0_0x256f('0x8f'),'value':function(_0x5c8606,_0x5b2662){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x1be02b){return 0x0===Object[a0_0x256f('0x536')](_0x1be02b)[a0_0x256f('0x658')]||(delete _0x1be02b[a0_0x256f('0x50b')],this['_style']=_0x1be02b,_0x47b8ba['c']['merge'](this[a0_0x256f('0x10')][a0_0x256f('0x493')],this[a0_0x256f('0x9b')])),this;}},{'key':'positions','set':function(_0x1c5402){return this[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x1c5402),this[a0_0x256f('0x10')][a0_0x256f('0x493')][a0_0x256f('0x3e3')]=this[a0_0x256f('0x42f')](),this;},'get':function(){return this[a0_0x256f('0x5d3')];}}]),_0x297d79;}(_0x282c30);_0x282c30['registerType'](a0_0x256f('0x9c'));var _0x48140=_0x23c455;function _0x2635ee(_0x5a92d5){var _0x3241b6=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x16ed0a){return!0x1;}}();return function(){var _0x3a3d46,_0x26c961=_0x30f874()(_0x5a92d5);if(_0x3241b6){var _0x1bed9e=_0x30f874()(this)['constructor'];_0x3a3d46=Reflect['construct'](_0x26c961,arguments,_0x1bed9e);}else _0x3a3d46=_0x26c961[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x3a3d46);};}var _0x314c7a=DC[a0_0x256f('0x3bd')]['Cesium'],_0x2c7312=Math['PI']/0x2,_0x59a0c6=function(_0x4e42d0){_0x361b3f()(_0x45d0f0,_0x4e42d0);var _0x308685=_0x2635ee(_0x45d0f0);function _0x45d0f0(_0x561fd4){var _0x97ba12;return _0x307cd5()(this,_0x45d0f0),(_0x97ba12=_0x308685['call'](this))['_positions']=_0x32696b['a'][a0_0x256f('0x442')](_0x561fd4),_0x97ba12['_delegate']=new _0x314c7a[(a0_0x256f('0x39d'))]({'polygon':{}}),_0x97ba12[a0_0x256f('0x246')]=0.25,_0x97ba12[a0_0x256f('0x4a')]=0.3,_0x97ba12[a0_0x256f('0x5ba')]=0.85,_0x97ba12[a0_0x256f('0x519')]=0.15,_0x97ba12[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x7c')),_0x97ba12['_state']=_0x444ad5['a'][a0_0x256f('0x206')],_0x97ba12;}return _0x323844()(_0x45d0f0,[{'key':a0_0x256f('0xce'),'value':function(_0x4ce696,_0x39a7ab,_0x588954,_0x2a30b0){var _0x361d1f=_0x47b8ba['b'][a0_0x256f('0x3c6')](_0x4ce696,_0x39a7ab),_0x2fd5e6=_0x47b8ba['b'][a0_0x256f('0x177')](_0x361d1f,_0x588954),_0x73e15e=_0x47b8ba['b']['getThirdPoint'](_0x588954,_0x361d1f,0x0,0.3*_0x2fd5e6,!0x0),_0xdb6fdd=_0x47b8ba['b']['getThirdPoint'](_0x588954,_0x361d1f,0x0,0.5*_0x2fd5e6,!0x0),_0x312e60=[_0x361d1f,_0x73e15e=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x361d1f,_0x73e15e,_0x2c7312,_0x2fd5e6/0x5,_0x2a30b0),_0xdb6fdd=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x361d1f,_0xdb6fdd,_0x2c7312,_0x2fd5e6/0x4,_0x2a30b0),_0x588954],_0x1fb1c9=this['_getArrowHeadPoints'](_0x312e60),_0x430743=_0x1fb1c9[0x0],_0x2d712c=_0x1fb1c9[0x4],_0x2499e2=_0x47b8ba['b'][a0_0x256f('0x177')](_0x4ce696,_0x39a7ab)/_0x47b8ba['b'][a0_0x256f('0x607')](_0x312e60)/0x2,_0x989262=this[a0_0x256f('0x389')](_0x312e60,_0x430743,_0x2d712c,_0x2499e2),_0x508a69=_0x989262['length'],_0x15aca3=_0x989262['slice'](0x0,_0x508a69/0x2),_0x2d9556=_0x989262[a0_0x256f('0x4dd')](_0x508a69/0x2,_0x508a69);return _0x15aca3[a0_0x256f('0x289')](_0x430743),_0x2d9556[a0_0x256f('0x289')](_0x2d712c),(_0x15aca3=_0x15aca3['reverse']())[a0_0x256f('0x289')](_0x39a7ab),(_0x2d9556=_0x2d9556[a0_0x256f('0x104')]())['push'](_0x4ce696),_0x15aca3['reverse']()['concat'](_0x1fb1c9,_0x2d9556);}},{'key':a0_0x256f('0x5e8'),'value':function(_0x3631e5){var _0x286fb3=_0x47b8ba['b'][a0_0x256f('0x607')](_0x3631e5)*this[a0_0x256f('0x246')],_0x2fd3a2=_0x3631e5[_0x3631e5[a0_0x256f('0x658')]-0x1],_0x42982b=_0x286fb3*this[a0_0x256f('0x4a')],_0x367173=_0x286fb3*this[a0_0x256f('0x519')],_0x12e5e4=_0x286fb3*this[a0_0x256f('0x5ba')],_0x9493ab=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x3631e5[_0x3631e5[a0_0x256f('0x658')]-0x2],_0x2fd3a2,0x0,_0x286fb3,!0x0),_0x4f06b6=_0x47b8ba['b']['getThirdPoint'](_0x3631e5[_0x3631e5['length']-0x2],_0x2fd3a2,0x0,_0x12e5e4,!0x0),_0x520c94=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x2fd3a2,_0x9493ab,_0x2c7312,_0x42982b,!0x1),_0x5ab40f=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x2fd3a2,_0x9493ab,_0x2c7312,_0x42982b,!0x0);return[_0x47b8ba['b']['getThirdPoint'](_0x2fd3a2,_0x4f06b6,_0x2c7312,_0x367173,!0x1),_0x520c94,_0x2fd3a2,_0x5ab40f,_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x2fd3a2,_0x4f06b6,_0x2c7312,_0x367173,!0x0)];}},{'key':a0_0x256f('0x389'),'value':function(_0x263cbf,_0x577a74,_0x1eb47a,_0x32b746){for(var _0x7496ab=_0x47b8ba['b'][a0_0x256f('0x123')](_0x263cbf),_0x5db5ab=_0x47b8ba['b']['getBaseLength'](_0x263cbf)*_0x32b746,_0x17abfd=(_0x5db5ab-_0x47b8ba['b'][a0_0x256f('0x177')](_0x577a74,_0x1eb47a))/0x2,_0xd3674=0x0,_0x572689=[],_0x53bb80=[],_0x26afac=0x1;_0x26afac<_0x263cbf[a0_0x256f('0x658')]-0x1;_0x26afac++){var _0x437195=_0x47b8ba['b']['getAngleOfThreePoints'](_0x263cbf[_0x26afac-0x1],_0x263cbf[_0x26afac],_0x263cbf[_0x26afac+0x1])/0x2,_0xf2ab8=(_0x5db5ab/0x2-(_0xd3674+=_0x47b8ba['b'][a0_0x256f('0x177')](_0x263cbf[_0x26afac-0x1],_0x263cbf[_0x26afac]))/_0x7496ab*_0x17abfd)/Math[a0_0x256f('0x637')](_0x437195),_0x323f8f=_0x47b8ba['b']['getThirdPoint'](_0x263cbf[_0x26afac-0x1],_0x263cbf[_0x26afac],Math['PI']-_0x437195,_0xf2ab8,!0x0),_0x2a2b9a=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x263cbf[_0x26afac-0x1],_0x263cbf[_0x26afac],_0x437195,_0xf2ab8,!0x1);_0x572689[a0_0x256f('0x289')](_0x323f8f),_0x53bb80['push'](_0x2a2b9a);}return _0x572689[a0_0x256f('0x318')](_0x53bb80);}},{'key':a0_0x256f('0x1a'),'value':function(_0x48d210,_0x26cfe8,_0x12bc10){var _0x364b98,_0x4d999b,_0x1ba6f6,_0x59ae1b,_0x440eab=_0x47b8ba['b'][a0_0x256f('0x3c6')](_0x48d210,_0x26cfe8),_0x15a077=_0x47b8ba['b']['distance'](_0x440eab,_0x12bc10),_0x166d72=_0x47b8ba['b'][a0_0x256f('0x75')](_0x48d210,_0x440eab,_0x12bc10);return _0x166d72<_0x2c7312?(_0x4d999b=_0x15a077*Math[a0_0x256f('0x637')](_0x166d72),_0x1ba6f6=_0x15a077*Math[a0_0x256f('0x441')](_0x166d72),_0x59ae1b=_0x47b8ba['b']['getThirdPoint'](_0x48d210,_0x440eab,_0x2c7312,_0x4d999b,!0x1),_0x364b98=_0x47b8ba['b']['getThirdPoint'](_0x440eab,_0x59ae1b,_0x2c7312,_0x1ba6f6,!0x0)):_0x166d72>=_0x2c7312&&_0x166d72<Math['PI']?(_0x4d999b=_0x15a077*Math[a0_0x256f('0x637')](Math['PI']-_0x166d72),_0x1ba6f6=_0x15a077*Math['cos'](Math['PI']-_0x166d72),_0x59ae1b=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x48d210,_0x440eab,_0x2c7312,_0x4d999b,!0x1),_0x364b98=_0x47b8ba['b']['getThirdPoint'](_0x440eab,_0x59ae1b,_0x2c7312,_0x1ba6f6,!0x1)):_0x166d72>=Math['PI']&&_0x166d72<1.5*Math['PI']?(_0x4d999b=_0x15a077*Math[a0_0x256f('0x637')](_0x166d72-Math['PI']),_0x1ba6f6=_0x15a077*Math[a0_0x256f('0x441')](_0x166d72-Math['PI']),_0x59ae1b=_0x47b8ba['b']['getThirdPoint'](_0x48d210,_0x440eab,_0x2c7312,_0x4d999b,!0x0),_0x364b98=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x440eab,_0x59ae1b,_0x2c7312,_0x1ba6f6,!0x0)):(_0x4d999b=_0x15a077*Math[a0_0x256f('0x637')](0x2*Math['PI']-_0x166d72),_0x1ba6f6=_0x15a077*Math[a0_0x256f('0x441')](0x2*Math['PI']-_0x166d72),_0x59ae1b=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x48d210,_0x440eab,_0x2c7312,_0x4d999b,!0x0),_0x364b98=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x440eab,_0x59ae1b,_0x2c7312,_0x1ba6f6,!0x1)),_0x364b98;}},{'key':a0_0x256f('0x42f'),'value':function(){var _0x4fa352,_0x4f8f7a,_0x27c72c=this['_positions'][a0_0x256f('0x658')],_0x4eb94f=void 0x0,_0x22133d=void 0x0,_0x5b5167=_0x32696b['a']['parsePolygonCoordToArray'](this[a0_0x256f('0x5d3')])[0x0],_0x5e59e2=_0x5b5167[0x0],_0x14a9f9=_0x5b5167[0x1],_0x35cd2e=_0x5b5167[0x2];_0x4eb94f=0x3===_0x27c72c?this[a0_0x256f('0x1a')](_0x5e59e2,_0x14a9f9,_0x35cd2e):_0x5b5167[0x3],_0x22133d=0x3===_0x27c72c||0x4===_0x27c72c?_0x47b8ba['b'][a0_0x256f('0x3c6')](_0x5e59e2,_0x14a9f9):_0x5b5167[0x4],_0x47b8ba['b'][a0_0x256f('0x285')](_0x5e59e2,_0x14a9f9,_0x35cd2e)?(_0x4fa352=this['_getArrowPoints'](_0x5e59e2,_0x22133d,_0x4eb94f,!0x1),_0x4f8f7a=this['_getArrowPoints'](_0x22133d,_0x14a9f9,_0x35cd2e,!0x0)):(_0x4fa352=this[a0_0x256f('0xce')](_0x14a9f9,_0x22133d,_0x35cd2e,!0x1),_0x4f8f7a=this['_getArrowPoints'](_0x22133d,_0x5e59e2,_0x4eb94f,!0x0));var _0x33b2dd=_0x4fa352['length'],_0x4b0507=(_0x33b2dd-0x5)/0x2,_0x3d656c=_0x4fa352[a0_0x256f('0x4dd')](0x0,_0x4b0507),_0xb02fb3=_0x4fa352[a0_0x256f('0x4dd')](_0x4b0507,_0x4b0507+0x5),_0x4849c3=_0x4fa352[a0_0x256f('0x4dd')](_0x4b0507+0x5,_0x33b2dd),_0x303e9d=_0x4f8f7a['slice'](0x0,_0x4b0507),_0x232c03=_0x4f8f7a[a0_0x256f('0x4dd')](_0x4b0507,_0x4b0507+0x5),_0x4702b3=_0x4f8f7a['slice'](_0x4b0507+0x5,_0x33b2dd);_0x303e9d=_0x47b8ba['b'][a0_0x256f('0x2bd')](_0x303e9d);var _0x43ee29=_0x47b8ba['b'][a0_0x256f('0x2bd')](_0x4702b3[a0_0x256f('0x318')](_0x3d656c['slice'](0x1)));return _0x4849c3=_0x47b8ba['b'][a0_0x256f('0x2bd')](_0x4849c3),new _0x314c7a['PolygonHierarchy'](_0xdad4fa['a'][a0_0x256f('0x1ae')](_0x32696b['a'][a0_0x256f('0x442')](_0x303e9d['concat'](_0x232c03,_0x43ee29,_0xb02fb3,_0x4849c3))));}},{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x50b')]=this['_positions'];}},{'key':a0_0x256f('0x8f'),'value':function(_0x2d7998,_0x37a933){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x4aa012){return 0x0===Object[a0_0x256f('0x536')](_0x4aa012)['length']||(delete _0x4aa012['positions'],this[a0_0x256f('0x9b')]=_0x4aa012,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x493')],this[a0_0x256f('0x9b')])),this;}},{'key':a0_0x256f('0x50b'),'set':function(_0x5c8e27){return this[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x5c8e27),this[a0_0x256f('0x10')][a0_0x256f('0x493')][a0_0x256f('0x3e3')]=this[a0_0x256f('0x42f')](),this;},'get':function(){return this['_positions'];}}]),_0x45d0f0;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')]('double_arrow');var _0x2eb99f=_0x59a0c6;function _0x1a59e0(_0x4d255b){var _0x56c5a1=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct']['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x2a0354){return!0x1;}}();return function(){var _0x438ff6,_0x2ce95f=_0x30f874()(_0x4d255b);if(_0x56c5a1){var _0x525af7=_0x30f874()(this)['constructor'];_0x438ff6=Reflect[a0_0x256f('0x64c')](_0x2ce95f,arguments,_0x525af7);}else _0x438ff6=_0x2ce95f[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x438ff6);};}var _0x598e04=DC[a0_0x256f('0x3bd')]['Cesium'],_0x3f2233=Math['PI']/0x2,_0x34c07a=function(_0x1a53d1){_0x361b3f()(_0x57fab3,_0x1a53d1);var _0xfe8f9d=_0x1a59e0(_0x57fab3);function _0x57fab3(_0x278999){var _0x457a1e;return _0x307cd5()(this,_0x57fab3),(_0x457a1e=_0xfe8f9d[a0_0x256f('0x32b')](this))[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x278999),_0x457a1e[a0_0x256f('0x10')]=new _0x598e04['Entity']({'polygon':{}}),_0x457a1e[a0_0x256f('0x385')]=0.15,_0x457a1e['neckWidthFactor']=0.2,_0x457a1e[a0_0x256f('0x4a')]=0.25,_0x457a1e[a0_0x256f('0x27f')]=Math['PI']/8.5,_0x457a1e['neckAngle']=Math['PI']/0xd,_0x457a1e[a0_0x256f('0x195')]=_0x282c30['getOverlayType']('fine_arrow'),_0x457a1e['_state']=_0x444ad5['a'][a0_0x256f('0x206')],_0x457a1e;}return _0x323844()(_0x57fab3,[{'key':a0_0x256f('0x42f'),'value':function(){var _0x46cd00=_0x32696b['a'][a0_0x256f('0x107')](this['_positions'])[0x0],_0x50863a=_0x46cd00[0x0],_0x4d2dc6=_0x46cd00[0x1],_0x3c1b1b=_0x47b8ba['b'][a0_0x256f('0x607')](_0x46cd00),_0x54c0a9=_0x3c1b1b*this['tailWidthFactor'],_0x51fbff=_0x3c1b1b*this['neckWidthFactor'],_0x57b37d=_0x3c1b1b*this['headWidthFactor'],_0x7c087e=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x4d2dc6,_0x50863a,_0x3f2233,_0x54c0a9,!0x0),_0x1c4f72=_0x47b8ba['b']['getThirdPoint'](_0x4d2dc6,_0x50863a,_0x3f2233,_0x54c0a9,!0x1),_0x5af6a6=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x50863a,_0x4d2dc6,this['headAngle'],_0x57b37d,!0x1),_0x21524f=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x50863a,_0x4d2dc6,this[a0_0x256f('0x27f')],_0x57b37d,!0x0),_0x1b8f13=_0x47b8ba['b']['getThirdPoint'](_0x50863a,_0x4d2dc6,this[a0_0x256f('0x3cc')],_0x51fbff,!0x1),_0x2b4ea4=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x50863a,_0x4d2dc6,this[a0_0x256f('0x3cc')],_0x51fbff,!0x0);return new _0x598e04['PolygonHierarchy'](_0xdad4fa['a'][a0_0x256f('0x1ae')](_0x32696b['a'][a0_0x256f('0x442')]([_0x7c087e,_0x1b8f13,_0x5af6a6,_0x4d2dc6,_0x21524f,_0x2b4ea4,_0x1c4f72])));}},{'key':a0_0x256f('0x60c'),'value':function(){this['positions']=this['_positions'];}},{'key':'setLabel','value':function(_0x129708,_0x4a6faf){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0x43c4ce){return 0x0===Object[a0_0x256f('0x536')](_0x43c4ce)[a0_0x256f('0x658')]||(delete _0x43c4ce[a0_0x256f('0x50b')],this[a0_0x256f('0x9b')]=_0x43c4ce,_0x47b8ba['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x10')][a0_0x256f('0x493')],this[a0_0x256f('0x9b')])),this;}},{'key':a0_0x256f('0x50b'),'set':function(_0x3febea){return this[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x3febea),this['_delegate'][a0_0x256f('0x493')][a0_0x256f('0x3e3')]=this[a0_0x256f('0x42f')](),this;},'get':function(){return this['_positions'];}}]),_0x57fab3;}(_0x282c30);_0x282c30['registerType']('fine_arrow');var _0x5f4cbd=_0x34c07a;function _0x3f5bd0(_0x1ff356){var _0x562a01=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x21970b){return!0x1;}}();return function(){var _0x339c71,_0x3515a4=_0x30f874()(_0x1ff356);if(_0x562a01){var _0x3d7646=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x339c71=Reflect[a0_0x256f('0x64c')](_0x3515a4,arguments,_0x3d7646);}else _0x339c71=_0x3515a4[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x339c71);};}var _0xa43084=DC[a0_0x256f('0x3bd')]['Cesium'],_0x5ae45c=Math['PI']/0x2,_0x2d01b7=function(_0x335c22){_0x361b3f()(_0x4f00a4,_0x335c22);var _0x24ef45=_0x3f5bd0(_0x4f00a4);function _0x4f00a4(_0xedca46){var _0x2c5fb6;return _0x307cd5()(this,_0x4f00a4),(_0x2c5fb6=_0x24ef45[a0_0x256f('0x32b')](this))[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0xedca46),_0x2c5fb6['_delegate']=new _0xa43084[(a0_0x256f('0x39d'))]({'polygon':{}}),_0x2c5fb6['t']=0.4,_0x2c5fb6['type']=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x36b')),_0x2c5fb6[a0_0x256f('0x2fa')]=_0x444ad5['a']['INITIALIZED'],_0x2c5fb6;}return _0x323844()(_0x4f00a4,[{'key':a0_0x256f('0x42f'),'value':function(){var _0x2001ec=_0x32696b['a'][a0_0x256f('0x107')](this[a0_0x256f('0x5d3')])[0x0];if(0x2===this['_positions'][a0_0x256f('0x658')]){var _0x1bf254=DC['PlotUtil'][a0_0x256f('0x3c6')](_0x2001ec[0x0],_0x2001ec[0x1]),_0x39603a=_0x47b8ba['b'][a0_0x256f('0x177')](_0x2001ec[0x0],_0x1bf254)/0.9,_0x108833=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x2001ec[0x0],_0x1bf254,_0x5ae45c,_0x39603a,!0x0);_0x2001ec=[_0x2001ec[0x0],_0x108833,_0x2001ec[0x1]];}var _0x56c6aa=DC[a0_0x256f('0x20e')][a0_0x256f('0x3c6')](_0x2001ec[0x0],_0x2001ec[0x2]);_0x2001ec[a0_0x256f('0x289')](_0x56c6aa,_0x2001ec[0x0],_0x2001ec[0x1]);for(var _0x2475d5=[],_0x26da32=0x0;_0x26da32<_0x2001ec[a0_0x256f('0x658')]-0x2;_0x26da32++){var _0x1c46a0=_0x2001ec[_0x26da32],_0x301bd5=_0x2001ec[_0x26da32+0x1],_0x52a9cc=_0x2001ec[_0x26da32+0x2],_0x5e013a=_0x47b8ba['b']['getBisectorNormals'](this['t'],_0x1c46a0,_0x301bd5,_0x52a9cc);_0x2475d5=_0x2475d5[a0_0x256f('0x318')](_0x5e013a);}var _0x4f7449=_0x2475d5[a0_0x256f('0x658')];_0x2475d5=[_0x2475d5[_0x4f7449-0x1]][a0_0x256f('0x318')](_0x2475d5[a0_0x256f('0x4dd')](0x0,_0x4f7449-0x1));for(var _0x24a7b9=[],_0xfa5999=0x0;_0xfa5999<_0x2001ec[a0_0x256f('0x658')]-0x2;_0xfa5999++){var _0x48841f=_0x2001ec[_0xfa5999],_0x3945e3=_0x2001ec[_0xfa5999+0x1];_0x24a7b9[a0_0x256f('0x289')](_0x48841f);for(var _0x1a4783=0x0;_0x1a4783<=0x64;_0x1a4783++){var _0x16ab2a=_0x47b8ba['b'][a0_0x256f('0x1ce')](_0x1a4783/0x64,_0x48841f,_0x2475d5[0x2*_0xfa5999],_0x2475d5[0x2*_0xfa5999+0x1],_0x3945e3);_0x24a7b9[a0_0x256f('0x289')](_0x16ab2a);}_0x24a7b9[a0_0x256f('0x289')](_0x3945e3);}return new _0xa43084[(a0_0x256f('0x634'))](_0xdad4fa['a'][a0_0x256f('0x1ae')](_0x32696b['a'][a0_0x256f('0x442')](_0x24a7b9)));}},{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x50b')]=this['_positions'];}},{'key':a0_0x256f('0x8f'),'value':function(_0x37086d,_0xa0629e){return this;}},{'key':a0_0x256f('0x421'),'value':function(_0xaa81b1){return 0x0===Object[a0_0x256f('0x536')](_0xaa81b1)[a0_0x256f('0x658')]||(delete _0xaa81b1[a0_0x256f('0x50b')],this[a0_0x256f('0x9b')]=_0xaa81b1,_0x47b8ba['c']['merge'](this[a0_0x256f('0x10')][a0_0x256f('0x493')],this[a0_0x256f('0x9b')])),this;}},{'key':a0_0x256f('0x50b'),'set':function(_0x7e9d87){return this[a0_0x256f('0x5d3')]=_0x32696b['a'][a0_0x256f('0x442')](_0x7e9d87),this[a0_0x256f('0x10')][a0_0x256f('0x493')][a0_0x256f('0x3e3')]=this[a0_0x256f('0x42f')](),this;},'get':function(){return this[a0_0x256f('0x5d3')];}}]),_0x4f00a4;}(_0x282c30);_0x282c30[a0_0x256f('0x49d')](a0_0x256f('0x36b'));var _0x2f44d7=_0x2d01b7;function _0x23a59b(_0x1b9d74){var _0x5e501f=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect['construct']['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x3a96c6){return!0x1;}}();return function(){var _0x21639e,_0x59be4c=_0x30f874()(_0x1b9d74);if(_0x5e501f){var _0x4fc1e8=_0x30f874()(this)[a0_0x256f('0x3d3')];_0x21639e=Reflect[a0_0x256f('0x64c')](_0x59be4c,arguments,_0x4fc1e8);}else _0x21639e=_0x59be4c[a0_0x256f('0x40')](this,arguments);return _0x94f187()(this,_0x21639e);};}var _0x1eb8d3=DC['Namespace'][a0_0x256f('0x224')],_0x466ab0=function(_0x345bd8){_0x361b3f()(_0x504207,_0x345bd8);var _0x2cc6eb=_0x23a59b(_0x504207);function _0x504207(_0x3d56a4){var _0x1cc3e0;return _0x307cd5()(this,_0x504207),(_0x1cc3e0=_0x2cc6eb[a0_0x256f('0x32b')](this,_0x3d56a4))[a0_0x256f('0x10')]=new _0x1eb8d3[(a0_0x256f('0x39d'))]({'polygon':{}}),_0x1cc3e0[a0_0x256f('0x246')]=0.18,_0x1cc3e0['headWidthFactor']=0.3,_0x1cc3e0[a0_0x256f('0x5ba')]=0.85,_0x1cc3e0[a0_0x256f('0x519')]=0.15,_0x1cc3e0['tailWidthFactor']=0.1,_0x1cc3e0['headTailFactor']=0.8,_0x1cc3e0[a0_0x256f('0x22b')]=0x1,_0x1cc3e0[a0_0x256f('0x195')]=_0x282c30[a0_0x256f('0x521')](a0_0x256f('0x21e')),_0x1cc3e0[a0_0x256f('0x2fa')]=_0x444ad5['a'][a0_0x256f('0x206')],_0x1cc3e0;}return _0x323844()(_0x504207,[{'key':a0_0x256f('0x42f'),'value':function(){var _0x86c7c0=_0x32696b['a'][a0_0x256f('0x107')](this[a0_0x256f('0x5d3')])[0x0],_0x261edc=_0x86c7c0[0x0],_0x59ee3c=_0x86c7c0[0x1];_0x47b8ba['b'][a0_0x256f('0x285')](_0x86c7c0[0x0],_0x86c7c0[0x1],_0x86c7c0[0x2])&&(_0x261edc=_0x86c7c0[0x1],_0x59ee3c=_0x86c7c0[0x0]);var _0x5b1981=[_0x47b8ba['b'][a0_0x256f('0x3c6')](_0x261edc,_0x59ee3c)][a0_0x256f('0x318')](_0x86c7c0[a0_0x256f('0x4dd')](0x2)),_0x106dc3=this[a0_0x256f('0x5e8')](_0x5b1981,_0x261edc,_0x59ee3c),_0x4a8f4a=_0x106dc3[0x0],_0x5069b8=_0x106dc3[0x4],_0x293107=_0x47b8ba['b'][a0_0x256f('0x177')](_0x261edc,_0x59ee3c),_0x13bb61=_0x47b8ba['b'][a0_0x256f('0x607')](_0x5b1981),_0x116722=_0x13bb61*this[a0_0x256f('0x385')]*this['swallowTailFactor'],_0x22766e=_0x47b8ba['b'][a0_0x256f('0x4ce')](_0x5b1981[0x1],_0x5b1981[0x0],0x0,_0x116722,!0x0),_0x48155b=_0x293107/_0x13bb61,_0x17d91c=this['_getArrowBodyPoints'](_0x5b1981,_0x4a8f4a,_0x5069b8,_0x48155b),_0x483ecd=_0x17d91c[a0_0x256f('0x658')],_0x5195b1=[_0x261edc][a0_0x256f('0x318')](_0x17d91c['slice'](0x0,_0x483ecd/0x2));_0x5195b1['push'](_0x4a8f4a);var _0x2edd82=[_0x59ee3c][a0_0x256f('0x318')](_0x17d91c[a0_0x256f('0x4dd')](_0x483ecd/0x2,_0x483ecd));return _0x2edd82[a0_0x256f('0x289')](_0x5069b8),_0x5195b1=_0x47b8ba['b'][a0_0x256f('0xfe')](_0x5195b1),_0x2edd82=_0x47b8ba['b']['getQBSplinePoints'](_0x2edd82),new _0x1eb8d3['PolygonHierarchy'](_0xdad4fa['a']['transformWGS84ArrayToCartesianArray'](_0x32696b['a']['parsePositions'](_0x5195b1['concat'](_0x106dc3,_0x2edd82[a0_0x256f('0x104')](),[_0x22766e,_0x5195b1[0x0]]))));}},{'key':a0_0x256f('0x50b'),'set':function(_0x38ada1){return this['_positions']=_0x32696b['a'][a0_0x256f('0x442')](_0x38ada1),this[a0_0x256f('0x10')]['polygon'][a0_0x256f('0x3e3')]=this[a0_0x256f('0x42f')](),this;},'get':function(){return this[a0_0x256f('0x5d3')];}}]),_0x504207;}(_0x48140);_0x282c30[a0_0x256f('0x49d')](a0_0x256f('0x21e'));var _0x44584c=_0x466ab0;},function(_0xda2d36,_0x2a1fd5,_0x382fa9){'use strict';_0x2a1fd5['a']={'ARCGIS':a0_0x256f('0x58e'),'SINGLE_TILE':a0_0x256f('0xe2'),'WMS':'wms','WMTS':a0_0x256f('0x57'),'XYZ':a0_0x256f('0x330'),'COORD':'Coord'};},function(_0x1e7832,_0x285482,_0x3c13d1){'use strict';var _0x170fbf=_0x3c13d1(0x0),_0x3db001=_0x3c13d1['n'](_0x170fbf),_0xc2c698=_0x3c13d1(0x1),_0x101708=_0x3c13d1['n'](_0xc2c698),_0x28f39d=function(){function _0x36afec(){_0x3db001()(this,_0x36afec),this[a0_0x256f('0xdb')]={},this[a0_0x256f('0x4aa')]();}return _0x101708()(_0x36afec,[{'key':a0_0x256f('0x4aa'),'value':function(){}},{'key':a0_0x256f('0x42d'),'value':function(_0x5e441d,_0x2917eb,_0x108d8f){var _0x486c0c=this[a0_0x256f('0x1ba')](_0x5e441d),_0x159be3=void 0x0;return _0x486c0c&&_0x2917eb&&(_0x159be3=_0x486c0c[a0_0x256f('0x429')](_0x2917eb,_0x108d8f||this)),_0x159be3;}},{'key':'_off','value':function(_0x2f0658,_0x552889,_0x32adca){var _0x356f53=this[a0_0x256f('0x1ba')](_0x2f0658),_0x243912=!0x1;return _0x356f53&&_0x552889&&(_0x243912=_0x356f53['removeEventListener'](_0x552889,_0x32adca||this)),_0x243912;}},{'key':a0_0x256f('0x5d6'),'value':function(_0x4d6e00,_0x293274){var _0xfa18e1=this[a0_0x256f('0x1ba')](_0x4d6e00);_0xfa18e1&&_0xfa18e1[a0_0x256f('0x52f')](_0x293274);}},{'key':'on','value':function(_0x5d7df8,_0x25e182,_0x117276){return this[a0_0x256f('0x42d')](_0x5d7df8,_0x25e182,_0x117276);}},{'key':'once','value':function(_0x3ad856,_0x37b456,_0x1c7e50){var _0x47c432=this[a0_0x256f('0x42d')](_0x3ad856,_0x37b456,_0x1c7e50);_0x47c432&&_0x47c432();}},{'key':'off','value':function(_0x1051f0,_0x479e23,_0x59ec19){return this[a0_0x256f('0x4c5')](_0x1051f0,_0x479e23,_0x59ec19);}},{'key':a0_0x256f('0xff'),'value':function(_0x3ef133,_0x28e9bd){this[a0_0x256f('0x5d6')](_0x3ef133,_0x28e9bd);}},{'key':a0_0x256f('0x1ba'),'value':function(_0x29ef82){return this['_cache'][_0x29ef82]||void 0x0;}}]),_0x36afec;}();_0x285482['a']=_0x28f39d;},function(_0x38d895,_0x5bf06a,_0x194e87){'use strict';_0x194e87['d'](_0x5bf06a,'a',function(){return _0x26f34f;}),_0x194e87['d'](_0x5bf06a,'b',function(){return _0x50675a;}),_0x194e87['d'](_0x5bf06a,'h',function(){return _0xdd278c;}),_0x194e87['d'](_0x5bf06a,'c',function(){return _0x4b5e8b;}),_0x194e87['d'](_0x5bf06a,'e',function(){return _0x47b209;}),_0x194e87['d'](_0x5bf06a,'f',function(){return _0x16d075;}),_0x194e87['d'](_0x5bf06a,'g',function(){return _0x16848a;}),_0x194e87['d'](_0x5bf06a,'i',function(){return _0x38a798;}),_0x194e87['d'](_0x5bf06a,'d',function(){return _0x51a3f4;});var _0x5d9764=_0x194e87(0x16),_0x5161c1=_0x194e87['n'](_0x5d9764),_0x29d51e=_0x194e87(0x7),_0x152671=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')];function _0x26f34f(_0x3e5d08){var _0x2d1091=0x0;if(_0x3e5d08&&Array[a0_0x256f('0x4e3')](_0x3e5d08)){for(var _0x228b3a=0x0,_0x2bf960=_0x152671[a0_0x256f('0x22d')]['WGS84'],_0x79544f=_0x5161c1()(_0x79544f)[a0_0x256f('0x318')](_0x79544f[0x0]),_0x1fb234=0x1;_0x1fb234<_0x79544f[a0_0x256f('0x658')];_0x1fb234++){var _0x4ba766=_0x2bf960[a0_0x256f('0x645')](_0x29d51e['a']['transformWGS84ToCartographic'](_0x79544f[_0x1fb234-0x1])),_0x5b0916=_0x2bf960[a0_0x256f('0x645')](_0x29d51e['a'][a0_0x256f('0x6d')](_0x79544f[_0x1fb234]));_0x228b3a+=_0x4ba766['x']*_0x5b0916['y']-_0x5b0916['x']*_0x4ba766['y'];}_0x2d1091=Math['abs'](_0x228b3a)[a0_0x256f('0x478')](0x2);}return _0x2d1091;}function _0x50675a(){var _0x5cf399=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:[],_0x2109a6=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x0,_0x10b3d8=0xb4,_0x25c6ad=0x5a,_0x8347c2=-0xb4,_0x4130c5=-0x5a;if(_0x5cf399[a0_0x256f('0x218')](function(_0x41bf84){_0x10b3d8=Math[a0_0x256f('0x511')](_0x10b3d8,_0x41bf84[a0_0x256f('0x16e')]||_0x41bf84['x']),_0x25c6ad=Math['min'](_0x25c6ad,_0x41bf84[a0_0x256f('0x44a')]||_0x41bf84['y']),_0x8347c2=Math[a0_0x256f('0x221')](_0x8347c2,_0x41bf84['lng']||_0x41bf84['x']),_0x4130c5=Math['max'](_0x4130c5,_0x41bf84[a0_0x256f('0x44a')]||_0x41bf84['y']);}),_0x2109a6>0x0){var _0x3506aa=Math['abs'](_0x8347c2-_0x8347c2),_0x3166f5=Math[a0_0x256f('0x15b')](_0x4130c5-_0x25c6ad);_0x10b3d8-=_0x3506aa*_0x2109a6,_0x25c6ad-=_0x3166f5*_0x2109a6,_0x8347c2+=_0x3506aa*_0x2109a6,_0x4130c5+=_0x3166f5*_0x2109a6;}return{'west':_0x10b3d8,'south':_0x25c6ad,'east':_0x8347c2,'north':_0x4130c5};}var _0xc11d6b=_0x194e87(0xd),_0x125fb9=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')];function _0xdd278c(_0x1eeedb,_0x49e213){_0x1eeedb instanceof _0xc11d6b['a']&&(_0x1eeedb=_0x29d51e['a'][a0_0x256f('0x6d')](_0x1eeedb)),_0x49e213 instanceof _0xc11d6b['a']&&(_0x49e213=_0x29d51e['a'][a0_0x256f('0x6d')](_0x49e213));var _0x577ccd=new _0x125fb9[(a0_0x256f('0x4c6'))](_0x1eeedb,_0x49e213)['interpolateUsingFraction'](0.5);return new _0xc11d6b['a'](_0x125fb9['Math'][a0_0x256f('0xec')](_0x577ccd[a0_0x256f('0x520')]),_0x125fb9[a0_0x256f('0x4bb')]['toDegrees'](_0x577ccd[a0_0x256f('0x2b1')]),_0x577ccd[a0_0x256f('0x4fa')]);}var _0x509f6f=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')];function _0x4b5e8b(_0xf408d3){if(_0xf408d3&&Array[a0_0x256f('0x4e3')](_0xf408d3)){var _0x3c028e=_0x509f6f[a0_0x256f('0x4b5')]['fromPoints'](_0x29d51e['a']['transformWGS84ArrayToCartesianArray'](_0xf408d3));return _0x29d51e['a'][a0_0x256f('0x31a')](_0x3c028e[a0_0x256f('0x532')]);}return new _0xc11d6b['a']();}var _0x4715ba=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')];function _0x47b209(_0x40a4aa){var _0x1fa521=0x0;if(_0x40a4aa&&Array['isArray'](_0x40a4aa))for(var _0x359963=0x0;_0x359963<_0x40a4aa[a0_0x256f('0x658')]-0x1;_0x359963++){var _0xc4cc60=_0x29d51e['a'][a0_0x256f('0x6d')](_0x40a4aa[_0x359963]),_0x5d117e=_0x29d51e['a']['transformWGS84ToCartographic'](_0x40a4aa[_0x359963+0x1]),_0x1ab8c5=new _0x4715ba['EllipsoidGeodesic']();_0x1ab8c5[a0_0x256f('0x18f')](_0xc4cc60,_0x5d117e);var _0x4111cc=_0x1ab8c5['surfaceDistance'];_0x1fa521+=_0x4111cc=Math[a0_0x256f('0x16f')](Math[a0_0x256f('0x244')](_0x4111cc,0x2)+Math[a0_0x256f('0x244')](_0x5d117e[a0_0x256f('0x4fa')]-_0xc4cc60['height'],0x2));}return _0x1fa521[a0_0x256f('0x478')](0x3);}var _0x2c0824=DC['Namespace'][a0_0x256f('0x224')];function _0x16d075(_0x232be2,_0x2ef7fc){var _0x5e5570=0x0;_0x232be2 instanceof _0xc11d6b['a']&&(_0x232be2=_0x29d51e['a']['transformWGS84ToCartesian'](_0x232be2)),_0x2ef7fc instanceof _0xc11d6b['a']&&(_0x2ef7fc=_0x29d51e['a'][a0_0x256f('0x72')](_0x2ef7fc));var _0xb5d2f8=_0x2c0824[a0_0x256f('0x534')][a0_0x256f('0xfd')](_0x2ef7fc,_0x232be2,new _0x2c0824['Cartesian3']());if(_0xb5d2f8){_0x2c0824[a0_0x256f('0x534')][a0_0x256f('0x73')](_0xb5d2f8,_0xb5d2f8);var _0x232a2d=_0x2c0824['Ellipsoid'][a0_0x256f('0x1ca')][a0_0x256f('0x121')](_0x232be2,new _0x2c0824[(a0_0x256f('0x534'))]()),_0x2154c0=_0x2c0824[a0_0x256f('0x534')][a0_0x256f('0x3e6')](_0x2c0824['Cartesian3']['UNIT_Z'],_0x232a2d,new _0x2c0824['Cartesian3']()),_0x256108=_0x2c0824[a0_0x256f('0x534')][a0_0x256f('0x3e6')](_0x232a2d,_0x2154c0,new _0x2c0824[(a0_0x256f('0x534'))]());_0x5e5570=Math[a0_0x256f('0x157')](_0x2c0824[a0_0x256f('0x534')][a0_0x256f('0x161')](_0xb5d2f8,_0x2154c0),_0x2c0824[a0_0x256f('0x534')][a0_0x256f('0x161')](_0xb5d2f8,_0x256108));}return _0x5e5570;}function _0x16848a(_0x343046,_0x3f413f,_0x51615e){return(_0x343046=parseFloat(_0x343046||0x0))>=parseFloat(_0x3f413f)&&_0x343046<=parseFloat(_0x51615e);}var _0xf28cfd=_0x194e87(0x3);function _0x38a798(_0x4838d1,_0x1ebcdb){var _0x3e09fe=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0x51a3ee=arguments[a0_0x256f('0x658')]>0x3&&void 0x0!==arguments[0x3]?arguments[0x3]:0x32,_0x1fb2db=[];if(!_0xf28cfd['c'][a0_0x256f('0x4de')](_0x4838d1)||!_0xf28cfd['c'][a0_0x256f('0x4de')](_0x1ebcdb))return _0x1fb2db;_0x3e09fe=Math[a0_0x256f('0x511')](+_0x3e09fe,0x1388),_0x51a3ee=Math[a0_0x256f('0x511')](+_0x51a3ee,0x32);var _0x1d4536=Math['abs'](_0x4838d1['lng']-_0x1ebcdb[a0_0x256f('0x16e')]),_0x3dc45c=Math[a0_0x256f('0x15b')](_0x4838d1[a0_0x256f('0x44a')]-_0x1ebcdb[a0_0x256f('0x44a')]),_0x33c28a=Math[a0_0x256f('0x221')](_0x1d4536,_0x3dc45c),_0x7fd528=_0x33c28a/_0x51a3ee;if(_0x1d4536>_0x3dc45c){var _0x36616a=(_0x1ebcdb[a0_0x256f('0x44a')]-_0x4838d1[a0_0x256f('0x44a')])/_0x51a3ee;_0x4838d1['lng']-_0x1ebcdb['lng']>0x0&&(_0x7fd528=-_0x7fd528);for(var _0x2c252d=0x0;_0x2c252d<_0x51a3ee;_0x2c252d++){var _0xe38ab3=_0x3e09fe-0x4*Math['pow'](-0.5*_0x33c28a+Math[a0_0x256f('0x15b')](_0x7fd528)*_0x2c252d,0x2)*_0x3e09fe/Math[a0_0x256f('0x244')](_0x33c28a,0x2),_0x2a1937=_0x4838d1[a0_0x256f('0x16e')]+_0x7fd528*_0x2c252d,_0x29aca2=_0x4838d1[a0_0x256f('0x44a')]+_0x36616a*_0x2c252d;_0x1fb2db[a0_0x256f('0x289')]([_0x2a1937,_0x29aca2,_0xe38ab3]);}}else{var _0x45a7ed=(_0x1ebcdb[a0_0x256f('0x16e')]-_0x4838d1[a0_0x256f('0x16e')])/_0x51a3ee;_0x4838d1[a0_0x256f('0x44a')]-_0x1ebcdb[a0_0x256f('0x44a')]>0x0&&(_0x7fd528=-_0x7fd528);for(var _0x1f8f2b=0x0;_0x1f8f2b<_0x51a3ee;_0x1f8f2b++){var _0x46f2dc=_0x3e09fe-0x4*Math['pow'](-0.5*_0x33c28a+Math[a0_0x256f('0x15b')](_0x7fd528)*_0x1f8f2b,0x2)*_0x3e09fe/Math['pow'](_0x33c28a,0x2),_0x4d3760=_0x4838d1[a0_0x256f('0x16e')]+_0x45a7ed*_0x1f8f2b,_0x501334=_0x4838d1[a0_0x256f('0x44a')]+_0x7fd528*_0x1f8f2b;_0x1fb2db[a0_0x256f('0x289')]([_0x4d3760,_0x501334,_0x46f2dc]);}}return _0x1fb2db;}function _0x51a3f4(_0x544820,_0x4b9d99){_0x4b9d99=_0x4b9d99||{};for(var _0x16f3ca=[],_0x1f15a5=0x0;_0x1f15a5<_0x544820[a0_0x256f('0x658')]-0x1;_0x1f15a5++){var _0x4f31ab=_0x2f5e12(_0x544820[_0x1f15a5],_0x544820[_0x1f15a5+0x1],_0x4b9d99[a0_0x256f('0x60f')]);_0x4f31ab&&_0x4f31ab[a0_0x256f('0x658')]>0x0&&(_0x16f3ca=_0x16f3ca[a0_0x256f('0x318')](_0x4f31ab));}return _0x16f3ca;}function _0x2f5e12(_0x113182,_0x270a41,_0x3c5950){if(!_0x113182||!_0x270a41)return null;var _0x3cbba2=[];_0x3c5950=_0x3c5950||0x28;var _0x26e1dc,_0x4866c7,_0x16bb4b,_0xbd19bd,_0x95386e,_0x1702e5,_0x27f7b2=function(_0x4881f4){return 0x1-0x2*_0x4881f4+_0x4881f4*_0x4881f4;},_0x1f6f2f=function(_0xa699e0){return 0x2*_0xa699e0-0x2*_0xa699e0*_0xa699e0;},_0x3fd006=function(_0x233f5e){return _0x233f5e*_0x233f5e;},_0x51ba20=0x0,_0x1f2766=parseFloat(_0x113182[a0_0x256f('0x44a')]),_0xef3b1f=parseFloat(_0x270a41[a0_0x256f('0x44a')]),_0x2b8c3c=parseFloat(_0x113182[a0_0x256f('0x16e')]),_0x55c4d7=parseFloat(_0x270a41[a0_0x256f('0x16e')]);_0x55c4d7>_0x2b8c3c&&_0x55c4d7-_0x2b8c3c>0xb4&&_0x2b8c3c<0x0&&(_0x2b8c3c=0x168+_0x2b8c3c,_0x55c4d7=0x168+_0x55c4d7),_0x1702e5=0x0,_0xef3b1f===_0x1f2766?(_0x26e1dc=0x0,_0x4866c7=_0x2b8c3c-_0x55c4d7):_0x55c4d7===_0x2b8c3c?(_0x26e1dc=Math['PI']/0x2,_0x4866c7=_0x1f2766-_0xef3b1f):(_0x26e1dc=Math[a0_0x256f('0x3ef')]((_0xef3b1f-_0x1f2766)/(_0x55c4d7-_0x2b8c3c)),_0x4866c7=(_0xef3b1f-_0x1f2766)/Math[a0_0x256f('0x637')](_0x26e1dc)),0x0===_0x1702e5&&(_0x1702e5=_0x26e1dc+Math['PI']/0x5),_0x95386e=(_0x16bb4b=_0x4866c7/0x2)*Math[a0_0x256f('0x441')](_0x1702e5)+_0x2b8c3c,_0xbd19bd=_0x16bb4b*Math[a0_0x256f('0x637')](_0x1702e5)+_0x1f2766;for(var _0x2c40b0=0x0;_0x2c40b0<_0x3c5950+0x1;_0x2c40b0++){var _0x271e42=_0x2b8c3c*_0x27f7b2(_0x51ba20)+_0x95386e*_0x1f6f2f(_0x51ba20)+_0x55c4d7*_0x3fd006(_0x51ba20),_0x3a13d3=_0x1f2766*_0x27f7b2(_0x51ba20)+_0xbd19bd*_0x1f6f2f(_0x51ba20)+_0xef3b1f*_0x3fd006(_0x51ba20),_0x4c343f=_0x113182[a0_0x256f('0x16e')],_0x3da6cc=_0x270a41[a0_0x256f('0x16e')];_0x3cbba2['push']([_0x4c343f<0x0&&_0x3da6cc>0x0?_0x271e42-0x168:_0x271e42,_0x3a13d3]),_0x51ba20+=0x1/_0x3c5950;}return _0x3cbba2;}},function(_0x2b1845,_0xd0574b,_0x179341){'use strict';_0x179341['d'](_0xd0574b,'f',function(){return _0x3caa80['a'];}),_0x179341['d'](_0xd0574b,'d',function(){return _0x30fab6['a'];}),_0x179341['d'](_0xd0574b,'e',function(){return _0x1f6da4;}),_0x179341['d'](_0xd0574b,'a',function(){return _0x21956e;}),_0x179341['d'](_0xd0574b,'b',function(){return _0x5a6688;}),_0x179341['d'](_0xd0574b,'c',function(){return _0x5d466d;}),_0x179341['d'](_0xd0574b,'g',function(){return _0x5d96e8;}),_0x179341['d'](_0xd0574b,'h',function(){return _0x4aad67;}),_0x179341['d'](_0xd0574b,'i',function(){return _0x57d05c;}),_0x179341['d'](_0xd0574b,'j',function(){return _0x577036;});var _0x3caa80=_0x179341(0x17),_0x30fab6=_0x179341(0xc),_0x5a6c99=_0x179341(0x0),_0x24815d=_0x179341['n'](_0x5a6c99),_0x56c1aa=_0x179341(0x1),_0x1ecd0f=_0x179341['n'](_0x56c1aa),_0x52f7a0=_0x179341(0x3),_0x5f4630=_0x179341(0x6),_0x142ca2=_0x179341(0xb),_0x51ed52=function(){function _0x48f2e4(_0x36ad1b){_0x24815d()(this,_0x48f2e4),this[a0_0x256f('0x616')]=_0x36ad1b||_0x52f7a0['c'][a0_0x256f('0x37e')](),this['_cache']={},this[a0_0x256f('0x5ed')]=!0x0,this['_viewer']=void 0x0,this[a0_0x256f('0x659')]=new _0x142ca2['e'](),this['_layerGroupEvent']['on'](_0x142ca2['f'][a0_0x256f('0x25e')],this[a0_0x256f('0x21c')],this),this['_layerGroupEvent']['on'](_0x142ca2['f'][a0_0x256f('0x5a7')],this[a0_0x256f('0x1e1')],this),this[a0_0x256f('0x195')]=_0x30fab6['a']['getLayerType'](a0_0x256f('0x222')),this[a0_0x256f('0x2fa')]=_0x5f4630['a'][a0_0x256f('0x206')];}return _0x1ecd0f()(_0x48f2e4,[{'key':a0_0x256f('0x21c'),'value':function(_0x27e33c){var _0x2095dc=this;this[a0_0x256f('0x454')]=_0x27e33c,Object[a0_0x256f('0x536')](this[a0_0x256f('0xdb')])[a0_0x256f('0x218')](function(_0x4eacb4){_0x2095dc[a0_0x256f('0x454')][a0_0x256f('0x5fd')](_0x2095dc[a0_0x256f('0xdb')][_0x4eacb4]);}),this[a0_0x256f('0x2fa')]=_0x5f4630['a']['ADDED'];}},{'key':a0_0x256f('0x1e1'),'value':function(){var _0x263851=this;Object[a0_0x256f('0x536')](this[a0_0x256f('0xdb')])[a0_0x256f('0x218')](function(_0x186f2f){_0x263851[a0_0x256f('0x454')]&&_0x263851[a0_0x256f('0x454')][a0_0x256f('0x3ec')](_0x263851[a0_0x256f('0xdb')][_0x186f2f]);}),this['_cache']={},this[a0_0x256f('0x2fa')]=_0x5f4630['a']['REMOVED'];}},{'key':a0_0x256f('0x5fd'),'value':function(_0x369787){return Object(this[a0_0x256f('0xdb')])['hasOwnProperty'](_0x369787['id'])||(this[a0_0x256f('0xdb')][_0x369787['id']]=_0x369787,this[a0_0x256f('0x454')]&&this[a0_0x256f('0x454')][a0_0x256f('0x5fd')](_0x369787)),this;}},{'key':a0_0x256f('0x288'),'value':function(_0x564812){return Object(this[a0_0x256f('0xdb')])[a0_0x256f('0x592')](_0x564812['id'])&&(this['_viewer']&&this[a0_0x256f('0x454')][a0_0x256f('0x288')](_0x564812),delete this[a0_0x256f('0xdb')][_0x564812['id']]),this;}},{'key':a0_0x256f('0x3f'),'value':function(_0x42ee5e){return this[a0_0x256f('0xdb')][_0x42ee5e]||void 0x0;}},{'key':a0_0x256f('0x20f'),'value':function(){var _0x5eecb0=this,_0x5f25bc=[];return Object[a0_0x256f('0x536')](this[a0_0x256f('0xdb')])[a0_0x256f('0x218')](function(_0x2fef4f){_0x5f25bc[a0_0x256f('0x289')](_0x5eecb0[a0_0x256f('0xdb')][_0x2fef4f]);}),_0x5f25bc;}},{'key':a0_0x256f('0x102'),'value':function(_0x3d72ef){return _0x3d72ef&&_0x3d72ef['addLayerGroup']&&_0x3d72ef[a0_0x256f('0x2a9')](this),this;}},{'key':a0_0x256f('0x3ec'),'value':function(){return this[a0_0x256f('0x454')]&&this['_viewer'][a0_0x256f('0xb3')](this),this;}},{'key':'id','get':function(){return this[a0_0x256f('0x616')];}},{'key':'show','set':function(_0x25a6e2){var _0x51086c=this;this[a0_0x256f('0x5ed')]=_0x25a6e2,Object['keys'](this[a0_0x256f('0xdb')])[a0_0x256f('0x218')](function(_0x146b5e){_0x51086c[a0_0x256f('0xdb')][_0x146b5e][a0_0x256f('0x3e9')]=_0x51086c[a0_0x256f('0x5ed')];});},'get':function(){return this[a0_0x256f('0x5ed')];}},{'key':a0_0x256f('0x347'),'get':function(){return this['_layerGroupEvent'];}},{'key':a0_0x256f('0x65f'),'get':function(){return this[a0_0x256f('0x2fa')];}}]),_0x48f2e4;}();_0x30fab6['a'][a0_0x256f('0x49d')](a0_0x256f('0x222'));var _0x1f6da4=_0x51ed52,_0x3d097f=_0x179341(0x4),_0xd971a8=_0x179341['n'](_0x3d097f),_0x2a8e5e=_0x179341(0x5),_0x12492b=_0x179341['n'](_0x2a8e5e),_0x3b404d=_0x179341(0x2),_0x17e847=_0x179341['n'](_0x3b404d);function _0x19790c(_0x56f3ca){var _0x2bca3=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x2bcb66){return!0x1;}}();return function(){var _0x471fd2,_0x5bed38=_0x17e847()(_0x56f3ca);if(_0x2bca3){var _0x2e80be=_0x17e847()(this)[a0_0x256f('0x3d3')];_0x471fd2=Reflect['construct'](_0x5bed38,arguments,_0x2e80be);}else _0x471fd2=_0x5bed38['apply'](this,arguments);return _0x12492b()(this,_0x471fd2);};}var _0x5457f9=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x289bbd=function(_0x51bc5f){_0xd971a8()(_0x136c1f,_0x51bc5f);var _0x2ecf9d=_0x19790c(_0x136c1f);function _0x136c1f(_0x516308){var _0x141f3e;return _0x24815d()(this,_0x136c1f),(_0x141f3e=_0x2ecf9d[a0_0x256f('0x32b')](this,_0x516308))['_delegate']=new _0x5457f9[(a0_0x256f('0x54c'))](_0x516308),_0x141f3e[a0_0x256f('0x195')]=_0x30fab6['a'][a0_0x256f('0x402')](a0_0x256f('0x3')),_0x141f3e[a0_0x256f('0x2fa')]=_0x5f4630['a'][a0_0x256f('0x206')],_0x141f3e;}return _0x1ecd0f()(_0x136c1f,[{'key':'clear','value':function(){return this[a0_0x256f('0x10')][a0_0x256f('0x365')]&&this[a0_0x256f('0x10')][a0_0x256f('0x365')][a0_0x256f('0x45b')](),this[a0_0x256f('0xdb')]={},this['_state']=_0x5f4630['a'][a0_0x256f('0x40a')],this;}}]),_0x136c1f;}(_0x30fab6['a']);_0x30fab6['a'][a0_0x256f('0x49d')](a0_0x256f('0x3'));var _0x577036=_0x289bbd,_0x509287=_0x179341(0xe);function _0x475470(_0x1bac67){var _0x4b09b7=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x1233b9){return!0x1;}}();return function(){var _0xe72cbc,_0x5eaaf1=_0x17e847()(_0x1bac67);if(_0x4b09b7){var _0x187d58=_0x17e847()(this)['constructor'];_0xe72cbc=Reflect[a0_0x256f('0x64c')](_0x5eaaf1,arguments,_0x187d58);}else _0xe72cbc=_0x5eaaf1[a0_0x256f('0x40')](this,arguments);return _0x12492b()(this,_0xe72cbc);};}var _0x3e75f5=DC['Namespace']['Cesium'],_0x2a9f0d=function(_0xec9a58){_0xd971a8()(_0xcf8275,_0xec9a58);var _0x16a4ee=_0x475470(_0xcf8275);function _0xcf8275(_0x517c8f,_0x1d2fd1){var _0x260981,_0x3eebcf=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};if(_0x24815d()(this,_0xcf8275),!_0x1d2fd1)throw new Error(a0_0x256f('0x650'));return(_0x260981=_0x16a4ee[a0_0x256f('0x32b')](this,_0x517c8f))[a0_0x256f('0x10')]=_0x3e75f5[a0_0x256f('0x5ad')]['load'](_0x1d2fd1,_0x3eebcf),_0x260981['type']=_0x30fab6['a'][a0_0x256f('0x402')](a0_0x256f('0x1d1')),_0x260981[a0_0x256f('0x2fa')]=_0x5f4630['a']['INITIALIZED'],_0x260981;}return _0x1ecd0f()(_0xcf8275,[{'key':a0_0x256f('0x400'),'value':function(_0x261bae){if(_0x261bae[a0_0x256f('0x13c')]&&_0x261bae[a0_0x256f('0x13d')])return _0x509287['b'][a0_0x256f('0x5b2')](_0x261bae);}},{'key':'_createPolyline','value':function(_0x37e418){if(_0x37e418['polyline'])return _0x509287['v'][a0_0x256f('0x5b2')](_0x37e418);}},{'key':a0_0x256f('0xc2'),'value':function(_0x177381){if(_0x177381[a0_0x256f('0x493')])return _0x509287['u']['fromEntity'](_0x177381);}},{'key':'_createModel','value':function(_0x17b0ea,_0x25bff7){if(_0x17b0ea)return _0x509287['p'][a0_0x256f('0x5b2')](_0x17b0ea,_0x25bff7);}},{'key':a0_0x256f('0x63e'),'value':function(_0xb6c4ba,_0x52bfe7){if(this[a0_0x256f('0x10')])return this['_delegate'][a0_0x256f('0x2a8')](function(_0x509a7a){_0x509a7a['entities'][a0_0x256f('0x5b')]['forEach'](function(_0x5d2d36){_0xb6c4ba[a0_0x256f('0x32b')](_0x52bfe7,_0x5d2d36);});}),this;}},{'key':a0_0x256f('0x460'),'value':function(){var _0x485e7b=this;alert(0x2);var _0x579fcc=new _0x577036(this['id']);return this[a0_0x256f('0x63e')](function(_0x48860c){_0x48860c[a0_0x256f('0x13d')]?_0x579fcc[a0_0x256f('0x338')](_0x485e7b['_createBillboard'](_0x48860c)):_0x48860c[a0_0x256f('0x18d')]?_0x579fcc[a0_0x256f('0x338')](_0x485e7b[a0_0x256f('0x331')](_0x48860c)):_0x48860c[a0_0x256f('0x493')]&&_0x579fcc[a0_0x256f('0x338')](_0x485e7b['_createPolygon'](_0x48860c));},this),_0x579fcc;}},{'key':a0_0x256f('0x45f'),'value':function(_0x1b7302){var _0x20b71b=this,_0xb20844=new _0x577036(this['id']);return this[a0_0x256f('0x63e')](function(_0x1ab21a){_0xb20844['addOverlay'](_0x20b71b[a0_0x256f('0x518')](_0x1ab21a,_0x1b7302));},this),_0xb20844;}},{'key':a0_0x256f('0x3e9'),'set':function(_0x49add7){var _0x17b555=this;this[a0_0x256f('0x5ed')]=_0x49add7,this[a0_0x256f('0x10')]&&this[a0_0x256f('0x10')][a0_0x256f('0x2a8')](function(_0x3492e9){_0x3492e9[a0_0x256f('0x3e9')]=_0x17b555[a0_0x256f('0x5ed')];});},'get':function(){return this['_show'];}}]),_0xcf8275;}(_0x30fab6['a']);_0x30fab6['a']['registerType'](a0_0x256f('0x1d1'));var _0x21956e=_0x2a9f0d,_0x37fa0b=_0x179341(0x7);function _0x218398(_0xfa544d){var _0x484681=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x2cbb70){return!0x1;}}();return function(){var _0x5d06c8,_0x3fd742=_0x17e847()(_0xfa544d);if(_0x484681){var _0x11ef51=_0x17e847()(this)[a0_0x256f('0x3d3')];_0x5d06c8=Reflect['construct'](_0x3fd742,arguments,_0x11ef51);}else _0x5d06c8=_0x3fd742[a0_0x256f('0x40')](this,arguments);return _0x12492b()(this,_0x5d06c8);};}var _0x1afad9=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x3bb546=function(_0x264d19){_0xd971a8()(_0x333dfd,_0x264d19);var _0x562ac6=_0x218398(_0x333dfd);function _0x333dfd(_0x38855e){var _0x1c9a15;return _0x24815d()(this,_0x333dfd),(_0x1c9a15=_0x562ac6[a0_0x256f('0x32b')](this,_0x38855e))[a0_0x256f('0x10')]=_0x52f7a0['a']['create']('div','html-layer',void 0x0),_0x1c9a15[a0_0x256f('0x10')]['setAttribute']('id',_0x1c9a15[a0_0x256f('0x616')]),_0x1c9a15[a0_0x256f('0x3aa')]=void 0x0,_0x1c9a15[a0_0x256f('0x195')]=_0x30fab6['a']['getLayerType']('html'),_0x1c9a15[a0_0x256f('0x2fa')]=_0x5f4630['a'][a0_0x256f('0x206')],_0x1c9a15;}return _0x1ecd0f()(_0x333dfd,[{'key':a0_0x256f('0x21c'),'value':function(_0x47ee84){var _0x6670ee=this;this[a0_0x256f('0x454')]=_0x47ee84,this[a0_0x256f('0x454')]['dcContainer'][a0_0x256f('0x169')](this[a0_0x256f('0x10')]);var _0x4fb41e=this[a0_0x256f('0x454')]['scene'];this[a0_0x256f('0x3aa')]=_0x4fb41e[a0_0x256f('0x24b')][a0_0x256f('0x429')](function(){var _0x2aa4d6=_0x6670ee[a0_0x256f('0x454')][a0_0x256f('0x3ee')]['positionWC'];_0x6670ee[a0_0x256f('0x63e')](function(_0x2bedf1){if(_0x2bedf1&&_0x2bedf1[a0_0x256f('0x13c')]){_0x2bedf1[a0_0x256f('0x3e9')]=_0x6670ee[a0_0x256f('0x3e9')];var _0x53511a=_0x37fa0b['a']['transformWGS84ToCartesian'](_0x2bedf1[a0_0x256f('0x13c')]),_0x55b340=_0x1afad9[a0_0x256f('0x5d5')][a0_0x256f('0x380')](_0x4fb41e,_0x53511a),_0xa54d93=_0x1afad9[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x53511a,_0x2aa4d6);_0x2bedf1[a0_0x256f('0x2a6')]({'transform':_0x55b340},_0xa54d93);}},_0x6670ee);},this),this['_state']=_0x5f4630['a'][a0_0x256f('0x135')];}},{'key':a0_0x256f('0x1e1'),'value':function(){this[a0_0x256f('0x3aa')]&&this[a0_0x256f('0x3aa')](),this[a0_0x256f('0x454')]['dcContainer'][a0_0x256f('0x37')](this[a0_0x256f('0x10')]),this['_state']=_0x5f4630['a'][a0_0x256f('0x234')];}},{'key':a0_0x256f('0x62'),'value':function(){for(;this['_delegate'][a0_0x256f('0x4d7')]();)this['_delegate'][a0_0x256f('0x37')](this[a0_0x256f('0x10')][a0_0x256f('0x3ca')]);return this['_cache']={},this[a0_0x256f('0x2fa')]=_0x5f4630['a'][a0_0x256f('0x40a')],this;}},{'key':a0_0x256f('0x3e9'),'set':function(_0x3fefb5){this[a0_0x256f('0x5ed')]=_0x3fefb5,this['_delegate'][a0_0x256f('0x19b')][a0_0x256f('0x32d')]=this['_show']?a0_0x256f('0x297'):a0_0x256f('0x53');},'get':function(){return this[a0_0x256f('0x5ed')];}}]),_0x333dfd;}(_0x30fab6['a']);_0x30fab6['a'][a0_0x256f('0x49d')](a0_0x256f('0x375'));var _0x5a6688=_0x3bb546;function _0x4885b1(_0x4e5d32){var _0x315b6c=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct']['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x9425fb){return!0x1;}}();return function(){var _0x319731,_0x1f0ed4=_0x17e847()(_0x4e5d32);if(_0x315b6c){var _0x4c2f2a=_0x17e847()(this)['constructor'];_0x319731=Reflect[a0_0x256f('0x64c')](_0x1f0ed4,arguments,_0x4c2f2a);}else _0x319731=_0x1f0ed4[a0_0x256f('0x40')](this,arguments);return _0x12492b()(this,_0x319731);};}var _0x95985=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x2b95a0=function(_0x420cb0){_0xd971a8()(_0x481739,_0x420cb0);var _0x36eba2=_0x4885b1(_0x481739);function _0x481739(_0x1c518d){var _0x1dc663,_0x59f658=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:'';return _0x24815d()(this,_0x481739),(_0x1dc663=_0x36eba2[a0_0x256f('0x32b')](this,_0x1c518d))[a0_0x256f('0x1')]=_0x95985[a0_0x256f('0x5ad')]['load'](_0x59f658),_0x1dc663[a0_0x256f('0x10')]=new _0x95985[(a0_0x256f('0x54c'))](_0x1c518d),_0x1dc663['_initLabel'](),_0x1dc663['type']=_0x30fab6['a'][a0_0x256f('0x49d')](a0_0x256f('0x3a4')),_0x1dc663[a0_0x256f('0x2fa')]=_0x5f4630['a'][a0_0x256f('0x206')],_0x1dc663;}return _0x1ecd0f()(_0x481739,[{'key':a0_0x256f('0x588'),'value':function(_0x2554f0){if(_0x2554f0[a0_0x256f('0x13c')]&&_0x2554f0[a0_0x256f('0x215')])return _0x509287['o'][a0_0x256f('0x5b2')](_0x2554f0);}},{'key':a0_0x256f('0x5e9'),'value':function(){var _0x18c236=this;this[a0_0x256f('0x1')]['then'](function(_0x125b3a){_0x125b3a['entities']['values']['forEach'](function(_0x1b4604){var _0x567f92=_0x18c236[a0_0x256f('0x588')](_0x1b4604);_0x18c236['addOverlay'](_0x567f92);});});}}]),_0x481739;}(_0x30fab6['a']);_0x30fab6['a']['registerType'](a0_0x256f('0x3a4'));var _0x5d466d=_0x2b95a0;function _0x4f3418(_0x12f5db){var _0x32c514=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x522bd5){return!0x1;}}();return function(){var _0xdc61a,_0x261d6b=_0x17e847()(_0x12f5db);if(_0x32c514){var _0x22b590=_0x17e847()(this)[a0_0x256f('0x3d3')];_0xdc61a=Reflect[a0_0x256f('0x64c')](_0x261d6b,arguments,_0x22b590);}else _0xdc61a=_0x261d6b['apply'](this,arguments);return _0x12492b()(this,_0xdc61a);};}var _0x157990=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x47d0aa=function(_0x55c7a6){_0xd971a8()(_0x2af382,_0x55c7a6);var _0x28a9fe=_0x4f3418(_0x2af382);function _0x2af382(_0x3e589f){var _0x41c500;return _0x24815d()(this,_0x2af382),(_0x41c500=_0x28a9fe[a0_0x256f('0x32b')](this,_0x3e589f))[a0_0x256f('0x10')]=new _0x157990['PrimitiveCollection'](),_0x41c500[a0_0x256f('0x195')]=_0x30fab6['a']['getLayerType'](a0_0x256f('0x4e8')),_0x41c500['_state']=_0x5f4630['a'][a0_0x256f('0x206')],_0x41c500;}return _0x1ecd0f()(_0x2af382,[{'key':a0_0x256f('0x62'),'value':function(){return this[a0_0x256f('0x10')]&&this[a0_0x256f('0x10')][a0_0x256f('0x45b')](),this[a0_0x256f('0xdb')]={},this['_state']=_0x5f4630['a']['CLEARED'],this;}}]),_0x2af382;}(_0x30fab6['a']);_0x30fab6['a'][a0_0x256f('0x49d')](a0_0x256f('0x4e8'));var _0x5d96e8=_0x47d0aa;function _0x20d1da(_0x1c8b0b){var _0x3f1db2=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x3e02db){return!0x1;}}();return function(){var _0x43422d,_0x6480df=_0x17e847()(_0x1c8b0b);if(_0x3f1db2){var _0x8b08ee=_0x17e847()(this)[a0_0x256f('0x3d3')];_0x43422d=Reflect['construct'](_0x6480df,arguments,_0x8b08ee);}else _0x43422d=_0x6480df[a0_0x256f('0x40')](this,arguments);return _0x12492b()(this,_0x43422d);};}var _0x59450d=DC['Namespace'][a0_0x256f('0x224')],_0x58f8ac=function(_0x3f211e){_0xd971a8()(_0x43e391,_0x3f211e);var _0x1d47c8=_0x20d1da(_0x43e391);function _0x43e391(_0x176a15){var _0x247f33;return _0x24815d()(this,_0x43e391),(_0x247f33=_0x1d47c8[a0_0x256f('0x32b')](this,_0x176a15))[a0_0x256f('0x10')]=new _0x59450d[(a0_0x256f('0x1bd'))](),_0x247f33[a0_0x256f('0x195')]=_0x30fab6['a']['getLayerType'](a0_0x256f('0x4af')),_0x247f33[a0_0x256f('0x2fa')]=_0x5f4630['a'][a0_0x256f('0x206')],_0x247f33;}return _0x1ecd0f()(_0x43e391,[{'key':a0_0x256f('0x62'),'value':function(){return this[a0_0x256f('0x10')]['removeAll'](),this[a0_0x256f('0xdb')]={},this[a0_0x256f('0x2fa')]=_0x5f4630['a'][a0_0x256f('0x40a')],this;}}]),_0x43e391;}(_0x30fab6['a']);_0x30fab6['a'][a0_0x256f('0x49d')](a0_0x256f('0x4af'));var _0x4aad67=_0x58f8ac;function _0x1572c1(_0x4d32f6){var _0x2921e2=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x16e3fd){return!0x1;}}();return function(){var _0x443a6a,_0x35c439=_0x17e847()(_0x4d32f6);if(_0x2921e2){var _0x2f081b=_0x17e847()(this)['constructor'];_0x443a6a=Reflect[a0_0x256f('0x64c')](_0x35c439,arguments,_0x2f081b);}else _0x443a6a=_0x35c439[a0_0x256f('0x40')](this,arguments);return _0x12492b()(this,_0x443a6a);};}var _0x1193a6=function(_0x5ac928){_0xd971a8()(_0x50a19e,_0x5ac928);var _0x585778=_0x1572c1(_0x50a19e);function _0x50a19e(_0x29b8da,_0x45865f){var _0x419ab6,_0x10260a=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};if(_0x24815d()(this,_0x50a19e),!_0x45865f)throw new Error('TopoJsonLayer:the\x20url\x20invalid');return(_0x419ab6=_0x585778[a0_0x256f('0x32b')](this,_0x29b8da,_0x45865f,_0x10260a))['type']=_0x21956e[a0_0x256f('0x402')](a0_0x256f('0x505')),_0x419ab6[a0_0x256f('0x2fa')]=_0x5f4630['a']['INITIALIZED'],_0x419ab6;}return _0x50a19e;}(_0x21956e);_0x21956e[a0_0x256f('0x49d')](a0_0x256f('0x505'));var _0x57d05c=_0x1193a6;},function(_0x25118f,_0x6fbb83,_0x54b266){'use strict';_0x54b266(0x1b);var _0x367bfe=_0x54b266(0x1d);_0x54b266['d'](_0x6fbb83,a0_0x256f('0x7f'),function(){return _0x367bfe['a'];});var _0x116fba=_0x54b266(0x1e);_0x54b266['d'](_0x6fbb83,'PolylineFlowMaterialProperty',function(){return _0x116fba['a'];});var _0x1e4dd8=_0x54b266(0x1f);_0x54b266['d'](_0x6fbb83,a0_0x256f('0xcf'),function(){return _0x1e4dd8['a'];});var _0x4a782f=_0x54b266(0x20);_0x54b266['d'](_0x6fbb83,'PolylineImageTrailMaterialProperty',function(){return _0x4a782f['a'];});var _0x3adcdb=_0x54b266(0x21);_0x54b266['d'](_0x6fbb83,a0_0x256f('0x368'),function(){return _0x3adcdb['a'];});var _0x190fc0=_0x54b266(0x22);_0x54b266['d'](_0x6fbb83,a0_0x256f('0x205'),function(){return _0x190fc0['a'];});var _0x523a4f=_0x54b266(0x23);_0x54b266['d'](_0x6fbb83,'CircleFadeMaterialProperty',function(){return _0x523a4f['a'];});var _0x295d66=_0x54b266(0x24);_0x54b266['d'](_0x6fbb83,a0_0x256f('0x36a'),function(){return _0x295d66['a'];});var _0x1a72ea=_0x54b266(0x25);_0x54b266['d'](_0x6fbb83,a0_0x256f('0xc1'),function(){return _0x1a72ea['a'];});},function(_0x135acd,_0x3075da){_0x135acd[a0_0x256f('0x5f4')]=function(_0xb41053){if(void 0x0===_0xb41053)throw new ReferenceError('this\x20hasn\x27t\x20been\x20initialised\x20-\x20super()\x20hasn\x27t\x20been\x20called');return _0xb41053;};},function(_0x3ebfed,_0x2827e4,_0x52e420){'use strict';_0x2827e4['a']={'NONE':a0_0x256f('0x47a'),'XYZ':a0_0x256f('0x330'),'ARCGIS':a0_0x256f('0x58e'),'GOOGLE':a0_0x256f('0x626'),'VR':'vr'};},function(_0x2f7ff5,_0x1693d3,_0x5e08e3){var _0x254e8a=_0x5e08e3(0x37),_0x2960c1=_0x5e08e3(0x38),_0x4c9fb9=_0x5e08e3(0x39),_0x535555=_0x5e08e3(0x3a);_0x2f7ff5[a0_0x256f('0x5f4')]=function(_0x207d05){return _0x254e8a(_0x207d05)||_0x2960c1(_0x207d05)||_0x4c9fb9(_0x207d05)||_0x535555();};},function(_0x3389a1,_0xc5359c,_0x1c8814){'use strict';_0xc5359c['a']={};},function(_0x215b04,_0x35a55d,_0x396524){'use strict';_0x35a55d['a']={};},function(_0x506ceb,_0x9429c2){function _0x8dd07f(_0x2f7991){return a0_0x256f('0x560')==typeof Symbol&&'symbol'==typeof Symbol['iterator']?_0x506ceb[a0_0x256f('0x5f4')]=_0x8dd07f=function(_0x37c92c){return typeof _0x37c92c;}:_0x506ceb[a0_0x256f('0x5f4')]=_0x8dd07f=function(_0xe7139b){return _0xe7139b&&a0_0x256f('0x560')==typeof Symbol&&_0xe7139b['constructor']===Symbol&&_0xe7139b!==Symbol[a0_0x256f('0xa8')]?a0_0x256f('0x2d5'):typeof _0xe7139b;},_0x8dd07f(_0x2f7991);}_0x506ceb[a0_0x256f('0x5f4')]=_0x8dd07f;},function(_0x5b34fa,_0x2197a2){_0x5b34fa[a0_0x256f('0x5f4')]=function(_0x635eb9,_0x5591ee){(null==_0x5591ee||_0x5591ee>_0x635eb9[a0_0x256f('0x658')])&&(_0x5591ee=_0x635eb9['length']);for(var _0x169408=0x0,_0x54ce5d=new Array(_0x5591ee);_0x169408<_0x5591ee;_0x169408++)_0x54ce5d[_0x169408]=_0x635eb9[_0x169408];return _0x54ce5d;};},function(_0x29bffb,_0x521560,_0x505478){var _0x2b4d02=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5cedf8=_0x505478(0x40),_0x4e4812=_0x505478(0x41),_0x38b45b=_0x505478(0x42),_0x188826=_0x505478(0x43),_0x152488=_0x505478(0x44),_0x233864=_0x505478(0x45),_0x49ebaa=_0x505478(0x1c),_0x408f8b=_0x505478(0x1c),_0x453e6f=_0x505478(0x46),_0x1e6b4f=_0x505478(0x47),_0x3bd09b=_0x505478(0x48),_0x1664e2=_0x505478(0x49),_0x3a1810=_0x505478(0x4a),_0x3e864f=_0x505478(0x4b),_0x3e6711=_0x505478(0x4c),_0x47ea5c=_0x505478(0x4d),_0x4c730c=_0x505478(0x4e),_0x9394f5=_0x505478(0x4f),_0x335b44=_0x505478(0x50),_0xe4740d=_0x505478(0x51);_0x2b4d02['ShaderSource'][a0_0x256f('0x55b')]['czm_cellular']=_0x188826,_0x2b4d02['ShaderSource']['_czmBuiltinsAndUniforms']['czm_snoise']=_0x152488,_0x2b4d02[a0_0x256f('0x14c')]['PolylineEmissionType']=a0_0x256f('0x3b4'),_0x2b4d02[a0_0x256f('0x14c')]['_materialCache'][a0_0x256f('0x339')](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x3b0')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x3b0')],'uniforms':{'color':new _0x2b4d02[(a0_0x256f('0x54e'))](0x1,0x0,0x0,0.7)},'source':_0x5cedf8},'translucent':function(_0x48f6a3){return!0x0;}}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x1f0')]=a0_0x256f('0x7a'),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')][a0_0x256f('0x339')](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x1f0')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x1f0')],'uniforms':{'color':new _0x2b4d02[(a0_0x256f('0x54e'))](0x1,0x0,0x0,0.7),'speed':0x2d},'source':_0x4e4812},'translucent':function(_0x17c07e){return!0x0;}}),_0x2b4d02[a0_0x256f('0x14c')]['PolylineTrailType']=a0_0x256f('0x1c9'),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')][a0_0x256f('0x339')](_0x2b4d02['Material']['PolylineTrailType'],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x46')],'uniforms':{'color':new _0x2b4d02['Color'](0x1,0x0,0x0,0.7),'image':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x3db')],'speed':0x2d,'repeat':new _0x2b4d02[(a0_0x256f('0x326'))](0x1,0x1)},'source':_0x38b45b},'translucent':function(_0x3fcbeb){return!0x0;}}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x307')]=a0_0x256f('0x1f'),_0x2b4d02[a0_0x256f('0x14c')]['_materialCache']['addMaterial'](_0x2b4d02['Material'][a0_0x256f('0x307')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x307')],'uniforms':{'asphaltColor':new _0x2b4d02['Color'](0.15,0.15,0.15,0x1),'bumpSize':0.02,'roughness':0.2},'source':_0x233864},'translucent':function(_0x53f7bf){return _0x53f7bf[a0_0x256f('0x2e5')][a0_0x256f('0x403')][a0_0x256f('0x3a1')]<0x1;}}),_0x2b4d02['Material'][a0_0x256f('0xb')]=a0_0x256f('0x2a5'),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')]['addMaterial'](_0x2b4d02['Material'][a0_0x256f('0xb')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0xb')],'uniforms':{'lightColor':new _0x2b4d02[(a0_0x256f('0x54e'))](0x1,0x1,0x1,0.5),'darkColor':new _0x2b4d02[(a0_0x256f('0x54e'))](0x0,0x0,0x1,0.5),'frequency':0xa},'source':_0x49ebaa},'translucent':function(_0x3c8b8d){var _0x15cc5d=_0x3c8b8d[a0_0x256f('0x2e5')];return _0x15cc5d[a0_0x256f('0x2c0')][a0_0x256f('0x3a1')]<0x1||_0x15cc5d[a0_0x256f('0x463')][a0_0x256f('0x3a1')]<0x0;}}),_0x2b4d02[a0_0x256f('0x14c')]['BrickType']=a0_0x256f('0x4e2'),_0x2b4d02[a0_0x256f('0x14c')]['_materialCache'][a0_0x256f('0x339')](_0x2b4d02['Material'][a0_0x256f('0x175')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x175')],'uniforms':{'brickColor':new _0x2b4d02[(a0_0x256f('0x54e'))](0.6,0.3,0.1,0x1),'mortarColor':new _0x2b4d02['Color'](0.8,0.8,0.7,0x1),'brickSize':new _0x2b4d02[(a0_0x256f('0x326'))](0.3,0.15),'brickPct':new _0x2b4d02[(a0_0x256f('0x326'))](0.9,0.85),'brickRoughness':0.2,'mortarRoughness':0.1},'source':_0x408f8b},'translucent':function(_0xbb2664){var _0x1e2f3a=_0xbb2664[a0_0x256f('0x2e5')];return _0x1e2f3a[a0_0x256f('0xf3')][a0_0x256f('0x3a1')]<0x1||_0x1e2f3a[a0_0x256f('0x29d')][a0_0x256f('0x3a1')]<0x1;}}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2bf')]='Cement',_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')][a0_0x256f('0x339')](_0x2b4d02['Material'][a0_0x256f('0x2bf')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2bf')],'uniforms':{'cementColor':new _0x2b4d02[(a0_0x256f('0x54e'))](0.95,0.95,0.85,0x1),'grainScale':0.01,'roughness':0.3},'source':_0x453e6f},'translucent':function(_0x5a52e1){return _0x5a52e1[a0_0x256f('0x2e5')][a0_0x256f('0x313')][a0_0x256f('0x3a1')]<0x1;}}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x20a')]=a0_0x256f('0x561'),_0x2b4d02['Material']['_materialCache']['addMaterial'](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x20a')],{'fabric':{'type':_0x2b4d02['Material'][a0_0x256f('0x20a')],'uniforms':{'color':new _0x2b4d02[(a0_0x256f('0x54e'))](0x1,0x0,0x0,0.5),'time':0x1},'source':_0x1e6b4f},'translucent':function(_0x1ab813){return _0x1ab813[a0_0x256f('0x2e5')]['color'][a0_0x256f('0x3a1')]<0x1;}}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2da')]=a0_0x256f('0x4fb'),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')][a0_0x256f('0x339')](_0x2b4d02[a0_0x256f('0x14c')]['FacetType'],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2da')],'uniforms':{'lightColor':new _0x2b4d02['Color'](0.25,0.25,0.25,0.75),'darkColor':new _0x2b4d02['Color'](0.75,0.75,0.75,0.75),'frequency':0xa},'source':_0x3bd09b},'translucent':function(_0x5df8a9){var _0x4ed8e5=_0x5df8a9[a0_0x256f('0x2e5')];return _0x4ed8e5[a0_0x256f('0x2c0')][a0_0x256f('0x3a1')]<0x1||_0x4ed8e5[a0_0x256f('0x463')][a0_0x256f('0x3a1')]<0x0;}}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2ff')]=a0_0x256f('0x38e'),_0x2b4d02[a0_0x256f('0x14c')]['_materialCache']['addMaterial'](_0x2b4d02[a0_0x256f('0x14c')]['FresnelType'],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')]['FresnelType'],'materials':{'reflection':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x3b5')]},'refraction':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x55a')]}},'source':_0x1664e2},'translucent':!0x1}),_0x2b4d02[a0_0x256f('0x14c')]['GrassType']='Grass',_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')][a0_0x256f('0x339')](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2f0')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2f0')],'uniforms':{'grassColor':new _0x2b4d02['Color'](0.25,0.4,0.1,0x1),'dirtColor':new _0x2b4d02[(a0_0x256f('0x54e'))](0.1,0.1,0.1,0x1),'patchiness':1.5},'source':_0x3a1810},'translucent':function(_0x3b5be3){var _0x5ab039=_0x3b5be3[a0_0x256f('0x2e5')];return _0x5ab039[a0_0x256f('0x45')][a0_0x256f('0x3a1')]<0x1||_0x5ab039['dirtColor']['alpha']<0x1;}}),_0x2b4d02['Material'][a0_0x256f('0x3b5')]=a0_0x256f('0x33c'),_0x2b4d02['Material']['_materialCache']['addMaterial'](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x3b5')],{'fabric':{'type':_0x2b4d02['Material']['ReflectionType'],'uniforms':{'cubeMap':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0xdd')],'channels':a0_0x256f('0x29a')},'source':_0x3e864f},'translucent':!0x1}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x55a')]=a0_0x256f('0x565'),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')]['addMaterial'](_0x2b4d02[a0_0x256f('0x14c')]['RefractionType'],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x55a')],'uniforms':{'cubeMap':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0xdd')],'channels':a0_0x256f('0x29a'),'indexOfRefractionRatio':0.9},'source':_0x3e6711},'translucent':!0x1}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x1d4')]=a0_0x256f('0x217'),_0x2b4d02[a0_0x256f('0x14c')]['_materialCache'][a0_0x256f('0x339')](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x1d4')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x1d4')],'uniforms':{'lightColor':new _0x2b4d02[(a0_0x256f('0x54e'))](0x1,0x1,0x0,0.75),'darkColor':new _0x2b4d02['Color'](0x1,0x0,0x0,0.75),'frequency':0x5},'source':_0x47ea5c},'translucent':function(_0x596601){var _0x2e10b6=_0x596601[a0_0x256f('0x2e5')];return _0x2e10b6['lightColor'][a0_0x256f('0x3a1')]<0x1||_0x2e10b6['darkColor'][a0_0x256f('0x3a1')]<0x0;}}),_0x2b4d02[a0_0x256f('0x14c')]['WoodType']=a0_0x256f('0x4f8'),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')][a0_0x256f('0x339')](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0xbe')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0xbe')],'uniforms':{'lightWoodColor':new _0x2b4d02['Color'](0.6,0.3,0.1,0x1),'darkWoodColor':new _0x2b4d02['Color'](0.4,0.2,0.07,0x1),'ringFrequency':0x3,'noiseScale':new _0x2b4d02[(a0_0x256f('0x326'))](0.7,0.5),'grainFrequency':0x1b},'source':_0x4c730c},'translucent':function(_0x19f589){var _0x5ddf24=_0x19f589['uniforms'];return _0x5ddf24[a0_0x256f('0x3b9')][a0_0x256f('0x3a1')]<0x1||_0x5ddf24[a0_0x256f('0x10d')]['alpha']<0x1;}}),_0x2b4d02[a0_0x256f('0x14c')]['CircleFadeType']='CircleFade',_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')]['addMaterial'](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x31c')],{'fabric':{'type':_0x2b4d02['Material'][a0_0x256f('0x31c')],'uniforms':{'color':new _0x2b4d02[(a0_0x256f('0x54e'))](0x1,0x0,0x0,0.7),'speed':0x2d},'source':_0x9394f5},'translucent':function(_0x12850f){return!0x0;}}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x597')]=a0_0x256f('0x4b6'),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x2b6')][a0_0x256f('0x339')](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x597')],{'fabric':{'type':_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x597')],'uniforms':{'color':new _0x2b4d02[(a0_0x256f('0x54e'))](0x1,0x0,0x0,0.7),'speed':0x2d,'count':0x1,'gradient':0.1},'source':_0x335b44},'translucent':function(_0x3cacbd){return!0x0;}}),_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x5ee')]=a0_0x256f('0x56a'),_0x2b4d02[a0_0x256f('0x14c')]['_materialCache'][a0_0x256f('0x339')](_0x2b4d02[a0_0x256f('0x14c')][a0_0x256f('0x5ee')],{'fabric':{'type':_0x2b4d02['Material'][a0_0x256f('0x5ee')],'uniforms':{'color':new _0x2b4d02[(a0_0x256f('0x54e'))](0x1,0x0,0x0,0.7),'image':_0x2b4d02[a0_0x256f('0x14c')]['DefaultImageId'],'speed':0xa},'source':_0xe4740d},'translucent':function(_0x19acd7){return!0x0;}});},function(_0x34121f,_0x50bf12){_0x34121f[a0_0x256f('0x5f4')]=a0_0x256f('0xb9');},function(_0xb2ba91,_0x42199b,_0x9f5924){'use strict';var _0x52ea67=_0x9f5924(0x0),_0x734661=_0x9f5924['n'](_0x52ea67),_0x1c33c2=_0x9f5924(0x1),_0x4dae56=_0x9f5924['n'](_0x1c33c2),_0xa49a96=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5bb9f2=_0x9f5924(0x52),_0x582082=_0xa49a96['Color'][a0_0x256f('0x138')](0x0,0xff,0xff,0xff),_0x263de3=function(){function _0x2a456e(_0x5aeeac){_0x734661()(this,_0x2a456e),_0x5aeeac=_0x5aeeac||{},this[a0_0x256f('0x18c')]=new _0xa49a96[(a0_0x256f('0x4c9'))](),this['_image']=void 0x0,this[a0_0x256f('0x40d')]=void 0x0,this[a0_0x256f('0x4c2')]=void 0x0,this[a0_0x256f('0x2b2')]=void 0x0,this[a0_0x256f('0x2e9')]=void 0x0,this[a0_0x256f('0x293')]=void 0x0,this['color']=_0x5aeeac[a0_0x256f('0x544')]||_0x582082,this[a0_0x256f('0x26a')]=_0x5aeeac[a0_0x256f('0x26a')]||0x2d,this['image']=_0x5bb9f2;}return _0x4dae56()(_0x2a456e,[{'key':'getType','value':function(_0x59a61b){return _0xa49a96['Material'][a0_0x256f('0x46')];}},{'key':a0_0x256f('0x21b'),'value':function(_0x597225,_0x87ef02){return _0x87ef02||(_0x87ef02={}),_0x87ef02[a0_0x256f('0x544')]=_0xa49a96[a0_0x256f('0x542')][a0_0x256f('0x4b8')](this[a0_0x256f('0x4c2')],_0x597225,_0x582082,_0x87ef02[a0_0x256f('0x544')]),_0x87ef02[a0_0x256f('0x26a')]=_0xa49a96[a0_0x256f('0x542')][a0_0x256f('0x4b8')](this[a0_0x256f('0x2e9')],_0x597225,0x2d,_0x87ef02['speed']),_0x87ef02[a0_0x256f('0x392')]=_0xa49a96[a0_0x256f('0x542')][a0_0x256f('0x33f')](this[a0_0x256f('0x477')],_0x597225),_0x87ef02;}},{'key':a0_0x256f('0x2ad'),'value':function(_0x123646){return this===_0x123646||_0x123646 instanceof _0x2a456e&&_0xa49a96[a0_0x256f('0x542')]['equals'](this[a0_0x256f('0x4c2')],_0x123646[a0_0x256f('0x4c2')]);}},{'key':'isConstant','get':function(){return!0x1;}},{'key':a0_0x256f('0x36f'),'get':function(){return this[a0_0x256f('0x18c')];}}]),_0x2a456e;}();Object[a0_0x256f('0x3d9')](_0x263de3['prototype'],{'color':_0xa49a96[a0_0x256f('0x148')]('color'),'speed':_0xa49a96[a0_0x256f('0x148')](a0_0x256f('0x26a')),'image':_0xa49a96[a0_0x256f('0x148')](a0_0x256f('0x392'))}),_0x42199b['a']=_0x263de3;},function(_0x51c684,_0xac732a,_0x262630){'use strict';var _0x13379a=_0x262630(0x0),_0x3a3e61=_0x262630['n'](_0x13379a),_0x5210a1=_0x262630(0x1),_0x33a88f=_0x262630['n'](_0x5210a1),_0x424940=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5616ef=_0x424940[a0_0x256f('0x54e')][a0_0x256f('0x138')](0x0,0xff,0xff,0xff),_0x212d40=function(){function _0x4ce25a(_0x188b1d){_0x3a3e61()(this,_0x4ce25a),_0x188b1d=_0x188b1d||{},this[a0_0x256f('0x18c')]=new _0x424940['Event'](),this[a0_0x256f('0x4c2')]=void 0x0,this[a0_0x256f('0x2b2')]=void 0x0,this['color']=_0x188b1d[a0_0x256f('0x544')]||_0x5616ef,this[a0_0x256f('0x2e9')]=void 0x0,this[a0_0x256f('0x293')]=void 0x0,this[a0_0x256f('0x26a')]=_0x188b1d[a0_0x256f('0x26a')]||0x2d;}return _0x33a88f()(_0x4ce25a,[{'key':'getType','value':function(_0x5e6e82){return _0x424940[a0_0x256f('0x14c')][a0_0x256f('0x1f0')];}},{'key':'getValue','value':function(_0xbb0ac0,_0x2f6af2){return _0x2f6af2||(_0x2f6af2={}),_0x2f6af2[a0_0x256f('0x544')]=_0x424940['Property'][a0_0x256f('0x4b8')](this['_color'],_0xbb0ac0,_0x5616ef,_0x2f6af2['color']),_0x2f6af2[a0_0x256f('0x26a')]=_0x424940[a0_0x256f('0x542')][a0_0x256f('0x4b8')](this['_speed'],_0xbb0ac0,0x2d,_0x2f6af2[a0_0x256f('0x26a')]),_0x2f6af2;}},{'key':a0_0x256f('0x2ad'),'value':function(_0x3d328f){return this===_0x3d328f||_0x3d328f instanceof _0x4ce25a&&_0x424940['Property']['equals'](this[a0_0x256f('0x4c2')],_0x3d328f[a0_0x256f('0x4c2')]);}},{'key':a0_0x256f('0x2fd'),'get':function(){return!0x1;}},{'key':a0_0x256f('0x36f'),'get':function(){return this[a0_0x256f('0x18c')];}}]),_0x4ce25a;}();Object[a0_0x256f('0x3d9')](_0x212d40[a0_0x256f('0xa8')],{'color':_0x424940[a0_0x256f('0x148')](a0_0x256f('0x544')),'speed':_0x424940[a0_0x256f('0x148')]('speed')}),_0xac732a['a']=_0x212d40;},function(_0x402073,_0x5b34b7,_0x17ba54){'use strict';var _0x260e93=_0x17ba54(0x0),_0x1520f7=_0x17ba54['n'](_0x260e93),_0x2f47fd=_0x17ba54(0x1),_0x1ac474=_0x17ba54['n'](_0x2f47fd),_0x142e1c=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x38475e=function(){function _0x1e2d24(_0x475edc){_0x1520f7()(this,_0x1e2d24),_0x475edc=_0x475edc||{},this['_definitionChanged']=new _0x142e1c[(a0_0x256f('0x4c9'))](),this['_color']=void 0x0,this[a0_0x256f('0x2b2')]=void 0x0,this[a0_0x256f('0x544')]=_0x475edc[a0_0x256f('0x544')]||new _0x142e1c['Color'](0x1,0x0,0x0,0.7);}return _0x1ac474()(_0x1e2d24,[{'key':a0_0x256f('0x553'),'value':function(_0xbdf538){return _0x142e1c['Material']['PolylineEmissionType'];}},{'key':a0_0x256f('0x21b'),'value':function(_0x2f16c4,_0x3f653c){return _0x3f653c||(_0x3f653c={}),_0x3f653c[a0_0x256f('0x544')]=_0x142e1c[a0_0x256f('0x542')][a0_0x256f('0x33f')](this['_color'],_0x2f16c4),_0x3f653c;}},{'key':'equals','value':function(_0x370a97){return this===_0x370a97||_0x370a97 instanceof _0x1e2d24&&_0x142e1c[a0_0x256f('0x542')][a0_0x256f('0x2ad')](this[a0_0x256f('0x4c2')],_0x370a97[a0_0x256f('0x4c2')]);}},{'key':a0_0x256f('0x2fd'),'get':function(){return!0x1;}},{'key':a0_0x256f('0x36f'),'get':function(){return this[a0_0x256f('0x18c')];}}]),_0x1e2d24;}();Object['defineProperties'](_0x38475e[a0_0x256f('0xa8')],{'color':_0x142e1c[a0_0x256f('0x148')](a0_0x256f('0x544'))}),_0x5b34b7['a']=_0x38475e;},function(_0x32b2ac,_0x412a9b,_0x4c0791){'use strict';var _0x49200a=_0x4c0791(0x0),_0xbc8741=_0x4c0791['n'](_0x49200a),_0x1eef48=_0x4c0791(0x1),_0x50f418=_0x4c0791['n'](_0x1eef48),_0x3f605c=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x3f1691=new _0x3f605c[(a0_0x256f('0x326'))](0x1,0x1),_0x432d8a=_0x3f605c[a0_0x256f('0x54e')]['fromBytes'](0x0,0xff,0xff,0xff),_0x242d07=function(){function _0x618c65(_0x5ad367){var _0x250922,_0x269329;_0xbc8741()(this,_0x618c65),_0x5ad367=_0x5ad367||{},this[a0_0x256f('0x18c')]=new _0x3f605c[(a0_0x256f('0x4c9'))](),this['_color']=void 0x0,this[a0_0x256f('0x2b2')]=void 0x0,this[a0_0x256f('0x2e9')]=void 0x0,this[a0_0x256f('0x293')]=void 0x0,this[a0_0x256f('0x477')]=void 0x0,this[a0_0x256f('0x40d')]=void 0x0,this[a0_0x256f('0x577')]=void 0x0,this[a0_0x256f('0x4cf')]=void 0x0,this['color']=_0x5ad367[a0_0x256f('0x544')]||_0x432d8a,this[a0_0x256f('0x26a')]=_0x5ad367['speed']||0x2d,this['image']=_0x5ad367[a0_0x256f('0x392')],this[a0_0x256f('0xa1')]=new _0x3f605c[(a0_0x256f('0x326'))]((null===(_0x250922=_0x5ad367['repeat'])||void 0x0===_0x250922?void 0x0:_0x250922['x'])||0x1,(null===(_0x269329=_0x5ad367['repeat'])||void 0x0===_0x269329?void 0x0:_0x269329['y'])||0x1);}return _0x50f418()(_0x618c65,[{'key':a0_0x256f('0x553'),'value':function(_0x519137){return _0x3f605c['Material'][a0_0x256f('0x46')];}},{'key':a0_0x256f('0x21b'),'value':function(_0x3a6e14,_0x35d2eb){return _0x35d2eb||(_0x35d2eb={}),_0x35d2eb[a0_0x256f('0x544')]=_0x3f605c[a0_0x256f('0x542')][a0_0x256f('0x4b8')](this[a0_0x256f('0x4c2')],_0x3a6e14,_0x432d8a,_0x35d2eb['color']),_0x35d2eb[a0_0x256f('0x26a')]=_0x3f605c['Property'][a0_0x256f('0x4b8')](this['_speed'],_0x3a6e14,0x2d,_0x35d2eb[a0_0x256f('0x26a')]),_0x35d2eb['image']=_0x3f605c['Property']['getValueOrUndefined'](this[a0_0x256f('0x477')],_0x3a6e14),_0x35d2eb[a0_0x256f('0xa1')]=_0x3f605c[a0_0x256f('0x542')][a0_0x256f('0x4b8')](this[a0_0x256f('0x577')],_0x3a6e14,_0x3f1691,_0x35d2eb[a0_0x256f('0xa1')]),_0x35d2eb;}},{'key':a0_0x256f('0x2ad'),'value':function(_0x4b70df){return this===_0x4b70df||_0x4b70df instanceof _0x618c65&&_0x3f605c[a0_0x256f('0x542')]['equals'](this['_color'],_0x4b70df[a0_0x256f('0x4c2')]);}},{'key':'isConstant','get':function(){return!0x1;}},{'key':a0_0x256f('0x36f'),'get':function(){return this['_definitionChanged'];}}]),_0x618c65;}();Object['defineProperties'](_0x242d07[a0_0x256f('0xa8')],{'color':_0x3f605c[a0_0x256f('0x148')]('color'),'speed':_0x3f605c[a0_0x256f('0x148')]('speed'),'image':_0x3f605c[a0_0x256f('0x148')](a0_0x256f('0x392')),'repeat':_0x3f605c[a0_0x256f('0x148')](a0_0x256f('0xa1'))}),_0x412a9b['a']=_0x242d07;},function(_0x1071fc,_0x351bf7,_0x393fc4){'use strict';var _0x3af354=_0x393fc4(0x0),_0x4d4721=_0x393fc4['n'](_0x3af354),_0x19484d=_0x393fc4(0x1),_0x2383b0=_0x393fc4['n'](_0x19484d),_0x401283=DC['Namespace'][a0_0x256f('0x224')],_0x3d7759=function(){function _0x24d721(_0x4fb6fe){_0x4d4721()(this,_0x24d721),_0x4fb6fe=_0x4fb6fe||{},this['_definitionChanged']=new _0x401283['Event'](),this['_baseWaterColor']=void 0x0,this['_baseWaterColorSubscription']=void 0x0,this[a0_0x256f('0x5f3')]=_0x4fb6fe[a0_0x256f('0x5f3')]||new _0x401283['Color'](0.2,0.3,0.6,0x1),this[a0_0x256f('0x92')]=void 0x0,this[a0_0x256f('0x65e')]=void 0x0,this[a0_0x256f('0x46e')]=_0x4fb6fe[a0_0x256f('0x46e')]||new _0x401283[(a0_0x256f('0x54e'))](0x0,0x1,0.699,0x1),this[a0_0x256f('0x20')]=void 0x0,this[a0_0x256f('0x260')]=void 0x0,this[a0_0x256f('0x426')]=_0x4fb6fe[a0_0x256f('0x426')]||_0x401283[a0_0x256f('0x14c')][a0_0x256f('0x3db')],this[a0_0x256f('0x391')]=void 0x0,this['_normalMapSubscription']=void 0x0,this[a0_0x256f('0x2d8')]=_0x4fb6fe[a0_0x256f('0x2d8')]||_0x401283[a0_0x256f('0x14c')][a0_0x256f('0x3db')],this[a0_0x256f('0x58a')]=_0x401283[a0_0x256f('0x9f')](_0x4fb6fe[a0_0x256f('0x58a')],0xa),this[a0_0x256f('0x22f')]=_0x401283[a0_0x256f('0x9f')](_0x4fb6fe['animationSpeed'],0.01),this[a0_0x256f('0x2ed')]=_0x401283['defaultValue'](_0x4fb6fe['amplitude'],0x1),this[a0_0x256f('0x74')]=_0x401283[a0_0x256f('0x9f')](_0x4fb6fe['specularIntensity'],0.5),this['fadeFactor']=_0x401283[a0_0x256f('0x9f')](_0x4fb6fe[a0_0x256f('0x410')],0x1);}return _0x2383b0()(_0x24d721,[{'key':a0_0x256f('0x553'),'value':function(_0x3d5c13){return _0x401283[a0_0x256f('0x14c')][a0_0x256f('0xc0')];}},{'key':a0_0x256f('0x21b'),'value':function(_0xfda942,_0x526ce6){return _0x526ce6||(_0x526ce6={}),_0x526ce6[a0_0x256f('0x5f3')]=_0x401283[a0_0x256f('0x542')]['getValueOrUndefined'](this[a0_0x256f('0x261')],_0xfda942),_0x526ce6[a0_0x256f('0x46e')]=_0x401283['Property'][a0_0x256f('0x33f')](this[a0_0x256f('0x92')],_0xfda942),_0x526ce6[a0_0x256f('0x426')]=_0x401283[a0_0x256f('0x542')][a0_0x256f('0x33f')](this[a0_0x256f('0x20')],_0xfda942),_0x526ce6[a0_0x256f('0x2d8')]=_0x401283[a0_0x256f('0x542')][a0_0x256f('0x33f')](this[a0_0x256f('0x391')],_0xfda942),_0x526ce6['frequency']=this[a0_0x256f('0x58a')],_0x526ce6[a0_0x256f('0x22f')]=this[a0_0x256f('0x22f')],_0x526ce6[a0_0x256f('0x2ed')]=this[a0_0x256f('0x2ed')],_0x526ce6[a0_0x256f('0x74')]=this['specularIntensity'],_0x526ce6['fadeFactor']=this['fadeFactor'],_0x526ce6;}},{'key':'equals','value':function(_0x38fc67){return this===_0x38fc67||_0x38fc67 instanceof _0x24d721&&_0x401283[a0_0x256f('0x542')][a0_0x256f('0x2ad')](this[a0_0x256f('0x261')],_0x38fc67[a0_0x256f('0x261')]);}},{'key':a0_0x256f('0x2fd'),'get':function(){return!0x1;}},{'key':a0_0x256f('0x36f'),'get':function(){return this[a0_0x256f('0x18c')];}}]),_0x24d721;}();Object[a0_0x256f('0x3d9')](_0x3d7759[a0_0x256f('0xa8')],{'baseWaterColor':_0x401283[a0_0x256f('0x148')]('baseWaterColor'),'blendColor':_0x401283[a0_0x256f('0x148')](a0_0x256f('0x46e')),'specularMap':_0x401283[a0_0x256f('0x148')](a0_0x256f('0x426')),'normalMap':_0x401283[a0_0x256f('0x148')](a0_0x256f('0x2d8'))}),_0x351bf7['a']=_0x3d7759;},function(_0x2fad13,_0x378cb9,_0x7f847f){'use strict';var _0x13d90c=_0x7f847f(0x0),_0x5b2825=_0x7f847f['n'](_0x13d90c),_0x149b60=_0x7f847f(0x1),_0x3e403e=_0x7f847f['n'](_0x149b60),_0x2fe28e=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x10a485=function(){function _0x4420d3(_0xaa235d){_0x5b2825()(this,_0x4420d3),_0xaa235d=_0xaa235d||{},this[a0_0x256f('0x18c')]=new _0x2fe28e[(a0_0x256f('0x4c9'))](),this[a0_0x256f('0x4c2')]=void 0x0,this[a0_0x256f('0x2b2')]=void 0x0,this[a0_0x256f('0x544')]=_0xaa235d[a0_0x256f('0x544')]||new _0x2fe28e['Color'](0x1,0x0,0x0,0.7),this[a0_0x256f('0x552')]=void 0x0,this[a0_0x256f('0x1d')]=void 0x0,this[a0_0x256f('0x4d1')]=_0xaa235d[a0_0x256f('0x4d1')]||new _0x2fe28e[(a0_0x256f('0x54e'))](0x1,0x1,0x1,0.4),this['_width']=void 0x0,this[a0_0x256f('0x350')]=void 0x0,this['width']=_0xaa235d['width']||0.3;}return _0x3e403e()(_0x4420d3,[{'key':a0_0x256f('0x553'),'value':function(_0x34435e){return _0x2fe28e['Material'][a0_0x256f('0x450')];}},{'key':a0_0x256f('0x21b'),'value':function(_0xdf7ff8,_0x34a52e){return _0x34a52e||(_0x34a52e={}),_0x34a52e[a0_0x256f('0x544')]=_0x2fe28e[a0_0x256f('0x542')][a0_0x256f('0x33f')](this['_color'],_0xdf7ff8),_0x34a52e[a0_0x256f('0x4d1')]=_0x2fe28e['Property'][a0_0x256f('0x33f')](this['_rimColor'],_0xdf7ff8),_0x34a52e[a0_0x256f('0x140')]=_0x2fe28e[a0_0x256f('0x542')][a0_0x256f('0x33f')](this[a0_0x256f('0x70')],_0xdf7ff8),_0x34a52e;}},{'key':a0_0x256f('0x2ad'),'value':function(_0x4b8832){return this===_0x4b8832||_0x4b8832 instanceof _0x4420d3&&_0x2fe28e['Property'][a0_0x256f('0x2ad')](this[a0_0x256f('0x4c2')],_0x4b8832[a0_0x256f('0x4c2')]);}},{'key':a0_0x256f('0x2fd'),'get':function(){return!0x1;}},{'key':'definitionChanged','get':function(){return this[a0_0x256f('0x18c')];}}]),_0x4420d3;}();Object[a0_0x256f('0x3d9')](_0x10a485[a0_0x256f('0xa8')],{'color':_0x2fe28e[a0_0x256f('0x148')]('color'),'rimColor':_0x2fe28e['createPropertyDescriptor']('rimColor'),'width':_0x2fe28e['createPropertyDescriptor']('width')}),_0x378cb9['a']=_0x10a485;},function(_0x5db55b,_0x368393,_0x3d8a4d){'use strict';var _0x418910=_0x3d8a4d(0x0),_0x42d69a=_0x3d8a4d['n'](_0x418910),_0x3b11ee=_0x3d8a4d(0x1),_0x3871b4=_0x3d8a4d['n'](_0x3b11ee),_0x598bec=DC['Namespace'][a0_0x256f('0x224')],_0x205c10=function(){function _0x291d32(_0x2a93f8){_0x42d69a()(this,_0x291d32),_0x2a93f8=_0x2a93f8||{},this[a0_0x256f('0x18c')]=new _0x598bec[(a0_0x256f('0x4c9'))](),this[a0_0x256f('0x4c2')]=void 0x0,this[a0_0x256f('0x2b2')]=void 0x0,this[a0_0x256f('0x2e9')]=void 0x0,this[a0_0x256f('0x293')]=void 0x0,this[a0_0x256f('0x544')]=_0x2a93f8['color']||_0x598bec['Color']['fromBytes'](0x0,0xff,0xff,0xff),this['speed']=_0x2a93f8['speed']||0x2d;}return _0x3871b4()(_0x291d32,[{'key':a0_0x256f('0x553'),'value':function(_0x117998){return _0x598bec[a0_0x256f('0x14c')][a0_0x256f('0x31c')];}},{'key':'getValue','value':function(_0x5acc1d,_0x378b54){return _0x378b54||(_0x378b54={}),_0x378b54[a0_0x256f('0x544')]=_0x598bec['Property']['getValueOrUndefined'](this['_color'],_0x5acc1d),_0x378b54[a0_0x256f('0x26a')]=this[a0_0x256f('0x2e9')],_0x378b54;}},{'key':a0_0x256f('0x2ad'),'value':function(_0x41cf04){return this===_0x41cf04||_0x41cf04 instanceof _0x291d32&&_0x598bec[a0_0x256f('0x542')][a0_0x256f('0x2ad')](this[a0_0x256f('0x4c2')],_0x41cf04[a0_0x256f('0x4c2')]);}},{'key':'isConstant','get':function(){return!0x1;}},{'key':'definitionChanged','get':function(){return this['_definitionChanged'];}}]),_0x291d32;}();Object[a0_0x256f('0x3d9')](_0x205c10[a0_0x256f('0xa8')],{'color':_0x598bec[a0_0x256f('0x148')]('color'),'speed':_0x598bec['createPropertyDescriptor'](a0_0x256f('0x26a'))}),_0x368393['a']=_0x205c10;},function(_0x592a63,_0x46bedd,_0x2dc0b6){'use strict';var _0x4f1fdb=_0x2dc0b6(0x0),_0x4726c0=_0x2dc0b6['n'](_0x4f1fdb),_0x51b694=_0x2dc0b6(0x1),_0x182a59=_0x2dc0b6['n'](_0x51b694),_0x38e2ab=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x1e292d=function(){function _0x1b2d2d(_0x13c116){_0x4726c0()(this,_0x1b2d2d),_0x13c116=_0x13c116||{},this[a0_0x256f('0x18c')]=new _0x38e2ab['Event'](),this['_color']=void 0x0,this[a0_0x256f('0x2b2')]=void 0x0,this['_speed']=void 0x0,this[a0_0x256f('0x293')]=void 0x0,this[a0_0x256f('0x544')]=_0x13c116[a0_0x256f('0x544')]||_0x38e2ab['Color']['fromBytes'](0x0,0xff,0xff,0xff),this[a0_0x256f('0x26a')]=_0x13c116[a0_0x256f('0x26a')]||0x2d,this[a0_0x256f('0x60f')]=Math['max'](_0x13c116[a0_0x256f('0x60f')]||0x2,0x1),this[a0_0x256f('0x640')]=_0x38e2ab[a0_0x256f('0x4bb')][a0_0x256f('0x283')](_0x13c116[a0_0x256f('0x640')]||0.1,0x0,0x1);}return _0x182a59()(_0x1b2d2d,[{'key':'getType','value':function(_0x2ca577){return _0x38e2ab[a0_0x256f('0x14c')][a0_0x256f('0x597')];}},{'key':a0_0x256f('0x21b'),'value':function(_0x52fd0d,_0x1aff01){return _0x1aff01||(_0x1aff01={}),_0x1aff01['color']=_0x38e2ab['Property'][a0_0x256f('0x33f')](this[a0_0x256f('0x4c2')],_0x52fd0d),_0x1aff01[a0_0x256f('0x26a')]=this[a0_0x256f('0x2e9')],_0x1aff01[a0_0x256f('0x60f')]=this[a0_0x256f('0x60f')],_0x1aff01['gradient']=this[a0_0x256f('0x640')],_0x1aff01;}},{'key':'equals','value':function(_0x42509a){return this===_0x42509a||_0x42509a instanceof _0x1b2d2d&&_0x38e2ab[a0_0x256f('0x542')][a0_0x256f('0x2ad')](this[a0_0x256f('0x4c2')],_0x42509a['_color']);}},{'key':a0_0x256f('0x2fd'),'get':function(){return!0x1;}},{'key':a0_0x256f('0x36f'),'get':function(){return this[a0_0x256f('0x18c')];}}]),_0x1b2d2d;}();Object['defineProperties'](_0x1e292d[a0_0x256f('0xa8')],{'color':_0x38e2ab['createPropertyDescriptor'](a0_0x256f('0x544')),'speed':_0x38e2ab[a0_0x256f('0x148')]('speed')}),_0x46bedd['a']=_0x1e292d;},function(_0x44e4ad,_0x156c32,_0x39372c){'use strict';var _0x1f2cec=_0x39372c(0x0),_0x242565=_0x39372c['n'](_0x1f2cec),_0x40eb38=_0x39372c(0x1),_0x427906=_0x39372c['n'](_0x40eb38),_0x2e4d98=DC['Namespace'][a0_0x256f('0x224')],_0x2cf184=_0x39372c(0x53),_0x514e1b=_0x2e4d98[a0_0x256f('0x54e')][a0_0x256f('0x138')](0x0,0xff,0xff,0xff),_0x15a157=function(){function _0x3bc80b(_0x2535ec){_0x242565()(this,_0x3bc80b),_0x2535ec=_0x2535ec||{},this[a0_0x256f('0x18c')]=new _0x2e4d98['Event'](),this[a0_0x256f('0x477')]=void 0x0,this['_imageSubscription']=void 0x0,this[a0_0x256f('0x4c2')]=void 0x0,this['_colorSubscription']=void 0x0,this[a0_0x256f('0x2e9')]=void 0x0,this[a0_0x256f('0x293')]=void 0x0,this[a0_0x256f('0x544')]=_0x2535ec[a0_0x256f('0x544')]||_0x514e1b,this['speed']=_0x2535ec[a0_0x256f('0x26a')]||0x2d,this[a0_0x256f('0x392')]=_0x2cf184;}return _0x427906()(_0x3bc80b,[{'key':a0_0x256f('0x553'),'value':function(_0x26ac0e){return _0x2e4d98['Material']['WallTrailMaterialType'];}},{'key':'getValue','value':function(_0x5bb2ae,_0x1c1296){return _0x1c1296||(_0x1c1296={}),_0x1c1296['color']=_0x2e4d98[a0_0x256f('0x542')][a0_0x256f('0x4b8')](this['_color'],_0x5bb2ae,_0x514e1b,_0x1c1296['color']),_0x1c1296[a0_0x256f('0x26a')]=_0x2e4d98['Property']['getValueOrClonedDefault'](this[a0_0x256f('0x2e9')],_0x5bb2ae,0x2d,_0x1c1296[a0_0x256f('0x26a')]),_0x1c1296[a0_0x256f('0x392')]=_0x2e4d98[a0_0x256f('0x542')][a0_0x256f('0x33f')](this[a0_0x256f('0x477')],_0x5bb2ae),_0x1c1296;}},{'key':'equals','value':function(_0x5e8cff){return this===_0x5e8cff||_0x5e8cff instanceof _0x3bc80b&&_0x2e4d98[a0_0x256f('0x542')][a0_0x256f('0x2ad')](this[a0_0x256f('0x4c2')],_0x5e8cff[a0_0x256f('0x4c2')]);}},{'key':a0_0x256f('0x2fd'),'get':function(){return!0x1;}},{'key':a0_0x256f('0x36f'),'get':function(){return this['_definitionChanged'];}}]),_0x3bc80b;}();Object[a0_0x256f('0x3d9')](_0x15a157[a0_0x256f('0xa8')],{'color':_0x2e4d98[a0_0x256f('0x148')](a0_0x256f('0x544')),'speed':_0x2e4d98[a0_0x256f('0x148')](a0_0x256f('0x26a')),'image':_0x2e4d98[a0_0x256f('0x148')](a0_0x256f('0x392'))}),_0x156c32['a']=_0x15a157;},function(_0x33ee1c,_0x101d7a,_0x29e404){_0x29e404(0x27),_0x33ee1c[a0_0x256f('0x5f4')]=_0x29e404(0x34);},function(_0x56f76f,_0x56de95,_0x9e03ba){'use strict';_0x9e03ba['r'](_0x56de95),(_0x9e03ba(0x28),_0x9e03ba(0x29),_0x9e03ba(0x2a),_0x9e03ba(0x2b),_0x9e03ba(0x2c),_0x9e03ba(0x2d),_0x9e03ba(0x2e),_0x9e03ba(0x2f),_0x9e03ba(0x30),_0x9e03ba(0x31),_0x9e03ba(0x32),_0x9e03ba(0x33));},function(_0xa3e299,_0x16fd57,_0x85bd4e){},function(_0x142f2f,_0x83ab8b,_0x5c61df){},function(_0x5c3e6f,_0x45a377,_0xf31b32){},function(_0x513bbc,_0x5acffd,_0x3c25d2){},function(_0x595b1b,_0x466089,_0x483e2b){},function(_0x3e8119,_0x1c5591,_0x44ec29){},function(_0x2b13cf,_0xeaf37f,_0x2b2404){},function(_0x468b42,_0x5e70c7,_0x51b1a9){},function(_0x5a7454,_0x1cdb64,_0x8d4486){},function(_0x1ec56f,_0x268775,_0x2e2be2){},function(_0x532b4b,_0x5f2620,_0x211be1){},function(_0x3ae578,_0x5b86fb,_0x4e0ebe){},function(_0x52636e,_0x2b28a1,_0x293655){'use strict';_0x293655['r'](_0x2b28a1);var _0x4c5343=function(_0x4d76d0){if(!_0x4d76d0)throw new Error(a0_0x256f('0x64b'));_0x4d76d0[a0_0x256f('0x387')](function(){_0x293655(0x35);}),_0x4d76d0[a0_0x256f('0x1b2')]=function(_0x582e8e){try{_0x4d76d0['Initialized']?_0x582e8e&&_0x582e8e():_0x4d76d0[a0_0x256f('0x387')](function(){_0x293655(0x3b),_0x293655(0x59),_0x4d76d0[a0_0x256f('0x65a')]=!0x0,_0x582e8e&&_0x582e8e();});}catch(_0x1f2974){console[a0_0x256f('0x483')](_0x1f2974);}};};'undefined'!=typeof window&&window['DC']&&_0x4c5343(window['DC']),_0x2b28a1[a0_0x256f('0x516')]={'install':_0x4c5343};},function(_0x167e6c,_0x182e32,_0x2b2116){'use strict';_0x2b2116['r'](_0x182e32);var _0x5d4205=_0x2b2116(0x3),_0x5ed9de=_0x2b2116(0xb),_0x1ff733=_0x2b2116(0x12),_0x5c6a71=_0x2b2116(0xe),_0x2a5e15=_0x2b2116(0xf),_0x203c4c=_0x2b2116(0x15),_0x3e98b1=_0x2b2116(0x18),_0x3e3e17=_0x2b2116(0x6),_0x5e3fce=_0x2b2116(0xd),_0xbaea3c=_0x2b2116(0x7),_0x850aeb=_0x2b2116(0x8),_0x7c782d={'Util':_0x5d4205['c'],'DomUtil':_0x5d4205['a'],'PlotUtil':_0x5d4205['b'],'State':_0x3e3e17['a'],'Event':_0x5ed9de['b'],'ImageryType':_0x2a5e15['a'],'TerrainType':_0x203c4c['a'],'LayerType':_0x1ff733['f'],'OverlayType':_0x5c6a71['r'],'MouseEventType':_0x5ed9de['h'],'SceneEventType':_0x5ed9de['l'],'WidgetType':_0x3e98b1['a'],'Layer':_0x1ff733['d'],'Overlay':_0x5c6a71['q'],'Position':_0x5e3fce['a'],'Transform':_0xbaea3c['a'],'T':_0xbaea3c['a'],'Parse':_0x850aeb['a'],'P':_0x850aeb['a']};DC[a0_0x256f('0x2e6')](_0x7c782d);},function(_0x552a84,_0x5b4451){function _0x37b6b9(_0x2c0a17,_0x3e3ed1){return _0x552a84[a0_0x256f('0x5f4')]=_0x37b6b9=Object[a0_0x256f('0x2d9')]||function(_0x47ade8,_0x15dafe){return _0x47ade8[a0_0x256f('0x5fe')]=_0x15dafe,_0x47ade8;},_0x37b6b9(_0x2c0a17,_0x3e3ed1);}_0x552a84[a0_0x256f('0x5f4')]=_0x37b6b9;},function(_0x41d34f,_0x3fcaad,_0x4baa54){var _0x389247=_0x4baa54(0x1a);_0x41d34f[a0_0x256f('0x5f4')]=function(_0x101fc9){if(Array[a0_0x256f('0x4e3')](_0x101fc9))return _0x389247(_0x101fc9);};},function(_0x3b9a3d,_0x3e88ca){_0x3b9a3d[a0_0x256f('0x5f4')]=function(_0x49543d){if(a0_0x256f('0x51b')!=typeof Symbol&&Symbol[a0_0x256f('0x3ae')]in Object(_0x49543d))return Array[a0_0x256f('0xf4')](_0x49543d);};},function(_0x4db622,_0x22e5b7,_0x230784){var _0x65c4d3=_0x230784(0x1a);_0x4db622[a0_0x256f('0x5f4')]=function(_0x3094d1,_0x27c8e9){if(_0x3094d1){if(a0_0x256f('0xa9')==typeof _0x3094d1)return _0x65c4d3(_0x3094d1,_0x27c8e9);var _0x6e5362=Object[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](_0x3094d1)['slice'](0x8,-0x1);return a0_0x256f('0xa')===_0x6e5362&&_0x3094d1[a0_0x256f('0x3d3')]&&(_0x6e5362=_0x3094d1[a0_0x256f('0x3d3')][a0_0x256f('0x215')]),'Map'===_0x6e5362||'Set'===_0x6e5362?Array[a0_0x256f('0xf4')](_0x3094d1):a0_0x256f('0x452')===_0x6e5362||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[a0_0x256f('0x1d5')](_0x6e5362)?_0x65c4d3(_0x3094d1,_0x27c8e9):void 0x0;}};},function(_0x8328d4,_0x1cb86f){_0x8328d4[a0_0x256f('0x5f4')]=function(){throw new TypeError('Invalid\x20attempt\x20to\x20spread\x20non-iterable\x20instance.\x0aIn\x20order\x20to\x20be\x20iterable,\x20non-array\x20objects\x20must\x20have\x20a\x20[Symbol.iterator]()\x20method.');};},function(_0x1d998b,_0x4a0081){var _0x4bc7de=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x483780={'Cartesian2':_0x4bc7de[a0_0x256f('0x326')],'Cartesian3':_0x4bc7de['Cartesian3'],'SceneMode':_0x4bc7de['SceneMode'],'HeightReference':_0x4bc7de[a0_0x256f('0x4b3')],'ClassificationType':_0x4bc7de['ClassificationType'],'ShadowMode':_0x4bc7de['ShadowMode'],'TilesetStyle':_0x4bc7de[a0_0x256f('0x3ed')],'CallbackProperty':_0x4bc7de[a0_0x256f('0x420')],'JulianDate':_0x4bc7de[a0_0x256f('0x29c')],'Color':_0x4bc7de[a0_0x256f('0x54e')],'ColorMaterialProperty':_0x4bc7de[a0_0x256f('0x633')],'ImageMaterialProperty':_0x4bc7de[a0_0x256f('0x386')],'PolylineDashMaterialProperty':_0x4bc7de[a0_0x256f('0xe1')],'PolylineGlowMaterialProperty':_0x4bc7de['PolylineGlowMaterialProperty'],'PolylineOutlineMaterialProperty':_0x4bc7de[a0_0x256f('0xb7')],'PolylineArrowMaterialProperty':_0x4bc7de[a0_0x256f('0x573')]};DC[a0_0x256f('0x2e6')](_0x483780);},function(_0x19ce0f,_0x527c95){_0x19ce0f[a0_0x256f('0x5f4')]=a0_0x256f('0x32c');},function(_0x1bd70d,_0x2d42f3){_0x1bd70d[a0_0x256f('0x5f4')]=a0_0x256f('0x2f1');},function(_0x4d4330,_0x1d978a){_0x4d4330[a0_0x256f('0x5f4')]=a0_0x256f('0xae');},function(_0x47ee5e,_0x523ffc,_0xaf302b){var _0x2056f0,_0x359e85;!function(_0x29e362,_0x3880a1,_0xcd9973){_0x47ee5e[a0_0x256f('0x5f4')]?_0x47ee5e[a0_0x256f('0x5f4')]=_0xcd9973():void 0x0===(_0x359e85=a0_0x256f('0x560')==typeof(_0x2056f0=_0xcd9973)?_0x2056f0[a0_0x256f('0x32b')](_0x523ffc,_0xaf302b,_0x523ffc,_0x47ee5e):_0x2056f0)||(_0x47ee5e[a0_0x256f('0x5f4')]=_0x359e85);}(0x0,0x0,function(){var _0x15b4d4={'defaultRadius':0x28,'defaultRenderer':a0_0x256f('0x431'),'defaultGradient':{0.25:a0_0x256f('0x2c8'),0.55:a0_0x256f('0x1a0'),0.85:a0_0x256f('0x615'),0x1:'rgb(255,0,0)'},'defaultMaxOpacity':0x1,'defaultMinOpacity':0x0,'defaultBlur':0.85,'defaultXField':'x','defaultYField':'y','defaultValueField':a0_0x256f('0x48a'),'plugins':{}},_0x1fa808=function(){var _0x3250bd=function(_0x26b975){this['_coordinator']={},this[a0_0x256f('0xa3')]=[],this[a0_0x256f('0x5b9')]=[],this[a0_0x256f('0x41c')]=0xa,this[a0_0x256f('0x1a2')]=0x1,this['_xField']=_0x26b975[a0_0x256f('0x149')]||_0x26b975[a0_0x256f('0x184')],this[a0_0x256f('0x26e')]=_0x26b975[a0_0x256f('0x47c')]||_0x26b975[a0_0x256f('0x87')],this[a0_0x256f('0x154')]=_0x26b975['valueField']||_0x26b975[a0_0x256f('0x2f3')],_0x26b975[a0_0x256f('0x223')]&&(this[a0_0x256f('0x3f7')]=_0x26b975[a0_0x256f('0x223')]);},_0x33bde9=_0x15b4d4['defaultRadius'];return _0x3250bd[a0_0x256f('0xa8')]={'_organiseData':function(_0x30d24d,_0x48bd88){var _0xdcead9=_0x30d24d[this[a0_0x256f('0x48e')]],_0x46198b=_0x30d24d[this[a0_0x256f('0x26e')]],_0x221624=this[a0_0x256f('0x5b9')],_0x1ad30f=this[a0_0x256f('0xa3')],_0xf29bea=this[a0_0x256f('0x1a2')],_0x4c8f52=this[a0_0x256f('0x41c')],_0x4a0bc1=_0x30d24d[this[a0_0x256f('0x154')]]||0x1,_0x74ced6=_0x30d24d['radius']||this[a0_0x256f('0x3f7')]||_0x33bde9;_0x1ad30f[_0xdcead9]||(_0x1ad30f[_0xdcead9]=[],_0x221624[_0xdcead9]=[]),_0x1ad30f[_0xdcead9][_0x46198b]?_0x1ad30f[_0xdcead9][_0x46198b]+=_0x4a0bc1:(_0x1ad30f[_0xdcead9][_0x46198b]=_0x4a0bc1,_0x221624[_0xdcead9][_0x46198b]=_0x74ced6);var _0x45611a=_0x1ad30f[_0xdcead9][_0x46198b];return _0x45611a>_0xf29bea?(_0x48bd88?this[a0_0x256f('0x43d')](_0x45611a):this[a0_0x256f('0x1a2')]=_0x45611a,!0x1):_0x45611a<_0x4c8f52?(_0x48bd88?this[a0_0x256f('0x40f')](_0x45611a):this[a0_0x256f('0x41c')]=_0x45611a,!0x1):{'x':_0xdcead9,'y':_0x46198b,'value':_0x4a0bc1,'radius':_0x74ced6,'min':_0x4c8f52,'max':_0xf29bea};},'_unOrganizeData':function(){var _0x4299b4=[],_0x5250a0=this['_data'],_0x29cae0=this[a0_0x256f('0x5b9')];for(var _0x4b344f in _0x5250a0)for(var _0x7fa29c in _0x5250a0[_0x4b344f])_0x4299b4['push']({'x':_0x4b344f,'y':_0x7fa29c,'radius':_0x29cae0[_0x4b344f][_0x7fa29c],'value':_0x5250a0[_0x4b344f][_0x7fa29c]});return{'min':this[a0_0x256f('0x41c')],'max':this[a0_0x256f('0x1a2')],'data':_0x4299b4};},'_onExtremaChange':function(){this[a0_0x256f('0x3f1')]['emit'](a0_0x256f('0x427'),{'min':this[a0_0x256f('0x41c')],'max':this[a0_0x256f('0x1a2')]});},'addData':function(){if(arguments[0x0][a0_0x256f('0x658')]>0x0)for(var _0x4ba44a=arguments[0x0],_0x3ca94f=_0x4ba44a[a0_0x256f('0x658')];_0x3ca94f--;)this[a0_0x256f('0x37c')]['call'](this,_0x4ba44a[_0x3ca94f]);else{var _0x213836=this[a0_0x256f('0x61b')](arguments[0x0],!0x0);_0x213836&&(0x0===this['_data'][a0_0x256f('0x658')]&&(this[a0_0x256f('0x41c')]=this[a0_0x256f('0x1a2')]=_0x213836[a0_0x256f('0x48a')]),this[a0_0x256f('0x3f1')][a0_0x256f('0x468')](a0_0x256f('0x1de'),{'min':this['_min'],'max':this[a0_0x256f('0x1a2')],'data':[_0x213836]}));}return this;},'setData':function(_0x2b511d){var _0x6e0c99=_0x2b511d[a0_0x256f('0x3e1')],_0x464b38=_0x6e0c99['length'];this['_data']=[],this[a0_0x256f('0x5b9')]=[];for(var _0x422d4c=0x0;_0x422d4c<_0x464b38;_0x422d4c++)this[a0_0x256f('0x61b')](_0x6e0c99[_0x422d4c],!0x1);return this[a0_0x256f('0x1a2')]=_0x2b511d['max'],this['_min']=_0x2b511d['min']||0x0,this[a0_0x256f('0x19f')](),this[a0_0x256f('0x3f1')][a0_0x256f('0x468')](a0_0x256f('0x308'),this[a0_0x256f('0x502')]()),this;},'removeData':function(){},'setDataMax':function(_0x3de768){return this[a0_0x256f('0x1a2')]=_0x3de768,this[a0_0x256f('0x19f')](),this[a0_0x256f('0x3f1')][a0_0x256f('0x468')](a0_0x256f('0x308'),this[a0_0x256f('0x502')]()),this;},'setDataMin':function(_0x112f04){return this[a0_0x256f('0x41c')]=_0x112f04,this[a0_0x256f('0x19f')](),this[a0_0x256f('0x3f1')][a0_0x256f('0x468')](a0_0x256f('0x308'),this[a0_0x256f('0x502')]()),this;},'setCoordinator':function(_0x3f4b62){this['_coordinator']=_0x3f4b62;},'_getInternalData':function(){return{'max':this['_max'],'min':this['_min'],'data':this[a0_0x256f('0xa3')],'radi':this[a0_0x256f('0x5b9')]};},'getData':function(){return this['_unOrganizeData']();}},_0x3250bd;}(),_0x555545=function(){var _0x2b2088=function(_0x2597bc){var _0x249cf0=_0x2597bc[a0_0x256f('0x640')]||_0x2597bc[a0_0x256f('0x5b5')],_0x3a3dd5=document[a0_0x256f('0x273')](a0_0x256f('0x54f')),_0x4c4e49=_0x3a3dd5[a0_0x256f('0x582')]('2d');_0x3a3dd5[a0_0x256f('0x140')]=0x100,_0x3a3dd5['height']=0x1;var _0x528a7e=_0x4c4e49['createLinearGradient'](0x0,0x0,0x100,0x1);for(var _0x2c660c in _0x249cf0)_0x528a7e[a0_0x256f('0x5b0')](_0x2c660c,_0x249cf0[_0x2c660c]);return _0x4c4e49[a0_0x256f('0x2c')]=_0x528a7e,_0x4c4e49[a0_0x256f('0x306')](0x0,0x0,0x100,0x1),_0x4c4e49[a0_0x256f('0x617')](0x0,0x0,0x100,0x1)[a0_0x256f('0x3e1')];},_0x3dc441=function(_0x248344,_0xfbab4f){var _0x1055f8=document[a0_0x256f('0x273')](a0_0x256f('0x54f')),_0x13a44d=_0x1055f8['getContext']('2d'),_0x47462c=_0x248344,_0x5b84e5=_0x248344;if(_0x1055f8[a0_0x256f('0x140')]=_0x1055f8['height']=0x2*_0x248344,0x1==_0xfbab4f)_0x13a44d[a0_0x256f('0x446')](),_0x13a44d[a0_0x256f('0x443')](_0x47462c,_0x5b84e5,_0x248344,0x0,0x2*Math['PI'],!0x1),_0x13a44d['fillStyle']=a0_0x256f('0x4ee'),_0x13a44d[a0_0x256f('0x601')]();else{var _0x1f85d1=_0x13a44d[a0_0x256f('0x3f0')](_0x47462c,_0x5b84e5,_0x248344*_0xfbab4f,_0x47462c,_0x5b84e5,_0x248344);_0x1f85d1['addColorStop'](0x0,a0_0x256f('0x4ee')),_0x1f85d1[a0_0x256f('0x5b0')](0x1,'rgba(0,0,0,0)'),_0x13a44d[a0_0x256f('0x2c')]=_0x1f85d1,_0x13a44d['fillRect'](0x0,0x0,0x2*_0x248344,0x2*_0x248344);}return _0x1055f8;};function _0x3afc2c(_0x591ba5){var _0x4cc4cd=_0x591ba5[a0_0x256f('0x4f')],_0xeb270c=this[a0_0x256f('0x13f')]=document[a0_0x256f('0x273')]('canvas'),_0x70a348=this['canvas']=_0x591ba5['canvas']||document['createElement']('canvas'),_0x34ab0e=(this['_renderBoundaries']=[0x2710,0x2710,0x0,0x0],getComputedStyle(_0x591ba5[a0_0x256f('0x4f')])||{});_0x70a348[a0_0x256f('0xbf')]='heatmap-canvas',this[a0_0x256f('0x70')]=_0x70a348['width']=_0xeb270c['width']=_0x591ba5[a0_0x256f('0x140')]||+_0x34ab0e['width'][a0_0x256f('0x255')](/px/,''),this[a0_0x256f('0x32')]=_0x70a348['height']=_0xeb270c['height']=_0x591ba5['height']||+_0x34ab0e[a0_0x256f('0x4fa')][a0_0x256f('0x255')](/px/,''),this['shadowCtx']=_0xeb270c[a0_0x256f('0x582')]('2d'),this[a0_0x256f('0x284')]=_0x70a348[a0_0x256f('0x582')]('2d'),_0x70a348['style'][a0_0x256f('0x0')]=_0xeb270c[a0_0x256f('0x19b')]['cssText']='position:absolute;left:0;top:0;',_0x4cc4cd['style'][a0_0x256f('0x13c')]='relative',_0x4cc4cd[a0_0x256f('0x169')](_0x70a348),this[a0_0x256f('0x88')]=_0x2b2088(_0x591ba5),this[a0_0x256f('0x571')]={},this['_setStyles'](_0x591ba5);}return _0x3afc2c[a0_0x256f('0xa8')]={'renderPartial':function(_0x41f04c){_0x41f04c[a0_0x256f('0x3e1')][a0_0x256f('0x658')]>0x0&&(this['_drawAlpha'](_0x41f04c),this['_colorize']());},'renderAll':function(_0x5efcfd){this['_clear'](),_0x5efcfd[a0_0x256f('0x3e1')][a0_0x256f('0x658')]>0x0&&(this[a0_0x256f('0x51e')](function(_0x4fe437){for(var _0x1279f1=[],_0x521658=_0x4fe437[a0_0x256f('0x511')],_0x5b51b2=_0x4fe437[a0_0x256f('0x221')],_0x55b6aa=_0x4fe437[a0_0x256f('0x333')],_0x5a1b6a=(_0x4fe437=_0x4fe437[a0_0x256f('0x3e1')],Object[a0_0x256f('0x536')](_0x4fe437)),_0x4c101c=_0x5a1b6a[a0_0x256f('0x658')];_0x4c101c--;)for(var _0x27d84f=_0x5a1b6a[_0x4c101c],_0x10821d=Object['keys'](_0x4fe437[_0x27d84f]),_0xe371fc=_0x10821d[a0_0x256f('0x658')];_0xe371fc--;){var _0xa9ef02=_0x10821d[_0xe371fc],_0x9a6b37=_0x4fe437[_0x27d84f][_0xa9ef02],_0x7ed7a8=_0x55b6aa[_0x27d84f][_0xa9ef02];_0x1279f1[a0_0x256f('0x289')]({'x':_0x27d84f,'y':_0xa9ef02,'value':_0x9a6b37,'radius':_0x7ed7a8});}return{'min':_0x521658,'max':_0x5b51b2,'data':_0x1279f1};}(_0x5efcfd)),this[a0_0x256f('0x1ab')]());},'_updateGradient':function(_0xd29151){this[a0_0x256f('0x88')]=_0x2b2088(_0xd29151);},'updateConfig':function(_0x5ccee0){_0x5ccee0[a0_0x256f('0x640')]&&this[a0_0x256f('0x28d')](_0x5ccee0),this['_setStyles'](_0x5ccee0);},'setDimensions':function(_0x160afa,_0x5ebd41){this[a0_0x256f('0x70')]=_0x160afa,this[a0_0x256f('0x32')]=_0x5ebd41,this[a0_0x256f('0x54f')][a0_0x256f('0x140')]=this['shadowCanvas']['width']=_0x160afa,this[a0_0x256f('0x54f')][a0_0x256f('0x4fa')]=this[a0_0x256f('0x13f')][a0_0x256f('0x4fa')]=_0x5ebd41;},'_clear':function(){this[a0_0x256f('0x1bb')][a0_0x256f('0xd6')](0x0,0x0,this[a0_0x256f('0x70')],this['_height']),this[a0_0x256f('0x284')]['clearRect'](0x0,0x0,this['_width'],this[a0_0x256f('0x32')]);},'_setStyles':function(_0x57f510){this[a0_0x256f('0x4c')]=0x0==_0x57f510['blur']?0x0:_0x57f510['blur']||_0x57f510[a0_0x256f('0x10a')],_0x57f510[a0_0x256f('0x3de')]&&(this['canvas']['style'][a0_0x256f('0x3de')]=_0x57f510['backgroundColor']),this[a0_0x256f('0x70')]=this[a0_0x256f('0x54f')][a0_0x256f('0x140')]=this[a0_0x256f('0x13f')][a0_0x256f('0x140')]=_0x57f510[a0_0x256f('0x140')]||this[a0_0x256f('0x70')],this['_height']=this[a0_0x256f('0x54f')][a0_0x256f('0x4fa')]=this[a0_0x256f('0x13f')][a0_0x256f('0x4fa')]=_0x57f510[a0_0x256f('0x4fa')]||this[a0_0x256f('0x32')],this[a0_0x256f('0xb2')]=0xff*(_0x57f510[a0_0x256f('0x136')]||0x0),this[a0_0x256f('0x1ed')]=0xff*(_0x57f510[a0_0x256f('0xe9')]||_0x57f510[a0_0x256f('0x397')]),this[a0_0x256f('0x364')]=0xff*(_0x57f510['minOpacity']||_0x57f510[a0_0x256f('0x63a')]),this[a0_0x256f('0x55')]=!!_0x57f510[a0_0x256f('0x610')];},'_drawAlpha':function(_0x3e6dfb){for(var _0x4d905a=this[a0_0x256f('0x41c')]=_0x3e6dfb['min'],_0x3c3925=this['_max']=_0x3e6dfb['max'],_0x318a90=(_0x3e6dfb=_0x3e6dfb[a0_0x256f('0x3e1')]||[])[a0_0x256f('0x658')],_0x56a876=0x1-this[a0_0x256f('0x4c')];_0x318a90--;){var _0x472d0e,_0x5c07bf=_0x3e6dfb[_0x318a90],_0x58068f=_0x5c07bf['x'],_0x4cc009=_0x5c07bf['y'],_0x2c33ee=_0x5c07bf['radius'],_0x115bfc=Math[a0_0x256f('0x511')](_0x5c07bf[a0_0x256f('0x48a')],_0x3c3925),_0x24de82=_0x58068f-_0x2c33ee,_0x2363af=_0x4cc009-_0x2c33ee,_0x119f94=this[a0_0x256f('0x1bb')];this[a0_0x256f('0x571')][_0x2c33ee]?_0x472d0e=this['_templates'][_0x2c33ee]:this[a0_0x256f('0x571')][_0x2c33ee]=_0x472d0e=_0x3dc441(_0x2c33ee,_0x56a876);var _0x2304cf=(_0x115bfc-_0x4d905a)/(_0x3c3925-_0x4d905a);_0x119f94[a0_0x256f('0x1ad')]=_0x2304cf<0.01?0.01:_0x2304cf,_0x119f94[a0_0x256f('0xa5')](_0x472d0e,_0x24de82,_0x2363af),_0x24de82<this[a0_0x256f('0x28b')][0x0]&&(this[a0_0x256f('0x28b')][0x0]=_0x24de82),_0x2363af<this[a0_0x256f('0x28b')][0x1]&&(this[a0_0x256f('0x28b')][0x1]=_0x2363af),_0x24de82+0x2*_0x2c33ee>this[a0_0x256f('0x28b')][0x2]&&(this[a0_0x256f('0x28b')][0x2]=_0x24de82+0x2*_0x2c33ee),_0x2363af+0x2*_0x2c33ee>this[a0_0x256f('0x28b')][0x3]&&(this['_renderBoundaries'][0x3]=_0x2363af+0x2*_0x2c33ee);}},'_colorize':function(){var _0x10517d=this[a0_0x256f('0x28b')][0x0],_0x1e6c2c=this[a0_0x256f('0x28b')][0x1],_0x28fbb2=this[a0_0x256f('0x28b')][0x2]-_0x10517d,_0xe6c2f5=this['_renderBoundaries'][0x3]-_0x1e6c2c,_0x5bd55f=this['_width'],_0x4bf566=this[a0_0x256f('0x32')],_0x3f9c29=this[a0_0x256f('0xb2')],_0x2988f7=this[a0_0x256f('0x1ed')],_0x94e0b2=this[a0_0x256f('0x364')],_0x3b3ef4=this[a0_0x256f('0x55')];_0x10517d<0x0&&(_0x10517d=0x0),_0x1e6c2c<0x0&&(_0x1e6c2c=0x0),_0x10517d+_0x28fbb2>_0x5bd55f&&(_0x28fbb2=_0x5bd55f-_0x10517d),_0x1e6c2c+_0xe6c2f5>_0x4bf566&&(_0xe6c2f5=_0x4bf566-_0x1e6c2c);for(var _0x5a21e6=this[a0_0x256f('0x1bb')][a0_0x256f('0x617')](_0x10517d,_0x1e6c2c,_0x28fbb2,_0xe6c2f5),_0x465b25=_0x5a21e6[a0_0x256f('0x3e1')],_0x1be1e0=_0x465b25[a0_0x256f('0x658')],_0x4312ff=this[a0_0x256f('0x88')],_0x5343bd=0x3;_0x5343bd<_0x1be1e0;_0x5343bd+=0x4){var _0x5b4b6e,_0x495bea=_0x465b25[_0x5343bd],_0x432508=0x4*_0x495bea;if(_0x432508)_0x5b4b6e=_0x3f9c29>0x0?_0x3f9c29:_0x495bea<_0x2988f7?_0x495bea<_0x94e0b2?_0x94e0b2:_0x495bea:_0x2988f7,_0x465b25[_0x5343bd-0x3]=_0x4312ff[_0x432508],_0x465b25[_0x5343bd-0x2]=_0x4312ff[_0x432508+0x1],_0x465b25[_0x5343bd-0x1]=_0x4312ff[_0x432508+0x2],_0x465b25[_0x5343bd]=_0x3b3ef4?_0x4312ff[_0x432508+0x3]:_0x5b4b6e;}_0x5a21e6['data']=_0x465b25,this[a0_0x256f('0x284')]['putImageData'](_0x5a21e6,_0x10517d,_0x1e6c2c),this[a0_0x256f('0x28b')]=[0x3e8,0x3e8,0x0,0x0];},'getValueAt':function(_0x383332){var _0x44546f=this[a0_0x256f('0x1bb')][a0_0x256f('0x617')](_0x383332['x'],_0x383332['y'],0x1,0x1)[a0_0x256f('0x3e1')][0x3],_0x5e4f0e=this['_max'],_0x433d16=this[a0_0x256f('0x41c')];return Math[a0_0x256f('0x15b')](_0x5e4f0e-_0x433d16)*(_0x44546f/0xff)>>0x0;},'getDataURL':function(){return this[a0_0x256f('0x54f')][a0_0x256f('0x235')]();}},_0x3afc2c;}(),_0x32ad97=function(){var _0x929bca=!0x1;return a0_0x256f('0x431')===_0x15b4d4[a0_0x256f('0x200')]&&(_0x929bca=_0x555545),_0x929bca;}(),_0xa61827=function(){for(var _0x41cd40={},_0x20412b=arguments[a0_0x256f('0x658')],_0x224988=0x0;_0x224988<_0x20412b;_0x224988++){var _0x3b4230=arguments[_0x224988];for(var _0x3b5fec in _0x3b4230)_0x41cd40[_0x3b5fec]=_0x3b4230[_0x3b5fec];}return _0x41cd40;},_0x2cb70e=function(){var _0xf059=function(){function _0xbada74(){this[a0_0x256f('0x268')]={};}return _0xbada74[a0_0x256f('0xa8')]={'on':function(_0x59b169,_0x326912,_0x5425d5){var _0x7c9459=this[a0_0x256f('0x268')];_0x7c9459[_0x59b169]||(_0x7c9459[_0x59b169]=[]),_0x7c9459[_0x59b169][a0_0x256f('0x289')](function(_0x3e450f){return _0x326912[a0_0x256f('0x32b')](_0x5425d5,_0x3e450f);});},'emit':function(_0x1ee349,_0x146f1e){var _0xca15db=this[a0_0x256f('0x268')];if(_0xca15db[_0x1ee349])for(var _0x5e8e09=_0xca15db[_0x1ee349][a0_0x256f('0x658')],_0x55f900=0x0;_0x55f900<_0x5e8e09;_0x55f900++){(0x0,_0xca15db[_0x1ee349][_0x55f900])(_0x146f1e);}}},_0xbada74;}(),_0x1d6c38=function(_0x9e1554){var _0x113d2c=_0x9e1554[a0_0x256f('0x2f2')],_0x461dde=_0x9e1554[a0_0x256f('0x3f1')],_0x3106a2=_0x9e1554[a0_0x256f('0x376')];_0x461dde['on'](a0_0x256f('0x1de'),_0x113d2c[a0_0x256f('0x424')],_0x113d2c),_0x461dde['on'](a0_0x256f('0x308'),_0x113d2c[a0_0x256f('0x46b')],_0x113d2c),_0x461dde['on']('extremachange',function(_0x743565){_0x9e1554[a0_0x256f('0x2dc')][a0_0x256f('0x1f9')]&&_0x9e1554[a0_0x256f('0x2dc')][a0_0x256f('0x1f9')]({'min':_0x743565[a0_0x256f('0x511')],'max':_0x743565['max'],'gradient':_0x9e1554['_config'][a0_0x256f('0x640')]||_0x9e1554['_config']['defaultGradient']});}),_0x3106a2['setCoordinator'](_0x461dde);};function _0x525c80(){var _0x331c22=this[a0_0x256f('0x2dc')]=_0xa61827(_0x15b4d4,arguments[0x0]||{});if(this[a0_0x256f('0x3f1')]=new _0xf059(),_0x331c22[a0_0x256f('0x7b')]){var _0x81ff15=_0x331c22[a0_0x256f('0x7b')];if(!_0x15b4d4[a0_0x256f('0x39f')][_0x81ff15])throw new Error(a0_0x256f('0x55f')+_0x81ff15+a0_0x256f('0x28a'));var _0x30c915=_0x15b4d4[a0_0x256f('0x39f')][_0x81ff15];this[a0_0x256f('0x2f2')]=new _0x30c915[(a0_0x256f('0x530'))](_0x331c22),this[a0_0x256f('0x376')]=new _0x30c915[(a0_0x256f('0x3f9'))](_0x331c22);}else this[a0_0x256f('0x2f2')]=new _0x32ad97(_0x331c22),this['_store']=new _0x1fa808(_0x331c22);_0x1d6c38(this);}return _0x525c80['prototype']={'addData':function(){return this[a0_0x256f('0x376')][a0_0x256f('0x37c')][a0_0x256f('0x40')](this[a0_0x256f('0x376')],arguments),this;},'removeData':function(){return this['_store'][a0_0x256f('0x61a')]&&this['_store'][a0_0x256f('0x61a')][a0_0x256f('0x40')](this[a0_0x256f('0x376')],arguments),this;},'setData':function(){return this[a0_0x256f('0x376')][a0_0x256f('0x467')][a0_0x256f('0x40')](this[a0_0x256f('0x376')],arguments),this;},'setDataMax':function(){return this[a0_0x256f('0x376')][a0_0x256f('0x43d')][a0_0x256f('0x40')](this['_store'],arguments),this;},'setDataMin':function(){return this[a0_0x256f('0x376')][a0_0x256f('0x40f')]['apply'](this['_store'],arguments),this;},'configure':function(_0x41e52b){return this[a0_0x256f('0x2dc')]=_0xa61827(this[a0_0x256f('0x2dc')],_0x41e52b),this['_renderer']['updateConfig'](this[a0_0x256f('0x2dc')]),this['_coordinator']['emit']('renderall',this[a0_0x256f('0x376')][a0_0x256f('0x502')]()),this;},'repaint':function(){return this[a0_0x256f('0x3f1')][a0_0x256f('0x468')](a0_0x256f('0x308'),this['_store']['_getInternalData']()),this;},'getData':function(){return this[a0_0x256f('0x376')][a0_0x256f('0x192')]();},'getDataURL':function(){return this[a0_0x256f('0x2f2')][a0_0x256f('0x259')]();},'getValueAt':function(_0x4ae561){return this[a0_0x256f('0x376')][a0_0x256f('0xa2')]?this[a0_0x256f('0x376')][a0_0x256f('0xa2')](_0x4ae561):this['_renderer'][a0_0x256f('0xa2')]?this[a0_0x256f('0x2f2')]['getValueAt'](_0x4ae561):null;}},_0x525c80;}();return{'create':function(_0x2c7740){return new _0x2cb70e(_0x2c7740);},'register':function(_0x588a32,_0x8750ba){_0x15b4d4[a0_0x256f('0x39f')][_0x588a32]=_0x8750ba;}};});},function(_0x4dcf3a,_0x8991bb){_0x4dcf3a[a0_0x256f('0x5f4')]=a0_0x256f('0x5d2');},function(_0x522978,_0x34d6e3){_0x522978['exports']=a0_0x256f('0x590');},function(_0x2c1a14,_0x1e3cf7){_0x2c1a14[a0_0x256f('0x5f4')]='uniform\x20sampler2D\x20image;\x0d\x0auniform\x20float\x20speed;\x0d\x0auniform\x20vec4\x20color;\x0d\x0auniform\x20vec2\x20repeat;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20\x20vec2\x20st\x20=\x20repeat\x20*\x20materialInput.st;\x0d\x0a\x20\x20\x20float\x20time\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0d\x0a\x20\x20\x20vec4\x20colorImage\x20=\x20texture2D(image,\x20vec2(fract(st.s\x20-\x20time),\x20st.t));\x0d\x0a\x20\x20\x20if(color.a\x20==\x200.0){\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0d\x0a\x20\x20\x20}else{\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a\x20*\x20color.a;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20max(color.rgb\x20*\x20material.alpha\x20*\x203.0,\x20color.rgb);\x0d\x0a\x20\x20\x20}\x0d\x0a\x20\x20\x20return\x20material;\x0d\x0a}\x0d\x0a';},function(_0x4eeca6,_0x5e1391){_0x4eeca6[a0_0x256f('0x5f4')]=a0_0x256f('0xf6');},function(_0x11ce49,_0x448752){_0x11ce49[a0_0x256f('0x5f4')]=a0_0x256f('0x423');},function(_0x496c74,_0x2a4a0b){_0x496c74['exports']=a0_0x256f('0x3fd');},function(_0x3d007e,_0x2f8469){_0x3d007e['exports']=a0_0x256f('0x126');},function(_0x72d15,_0x559955){_0x72d15[a0_0x256f('0x5f4')]='uniform\x20vec4\x20color;\x0d\x0auniform\x20float\x20time;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20float\x20alpha\x20=\x201.0;\x0d\x0a\x20\x20if\x20(time\x20!=\x201.0)\x0d\x0a\x20\x20{\x0d\x0a\x20\x20\x20\x20\x20\x20float\x20t\x20=\x200.5\x20+\x20(0.5\x20*\x20czm_snoise(materialInput.str\x20/\x20(1.0\x20/\x2010.0)));\x20\x20\x20//\x20Scale\x20[-1,\x201]\x20to\x20[0,\x201]\x0d\x0a\x0d\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20>\x20time)\x0d\x0a\x20\x20\x20\x20\x20\x20{\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alpha\x20=\x200.0;\x0d\x0a\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20}\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a\x20*\x20alpha;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a';},function(_0x14c0d5,_0x1656f3){_0x14c0d5[a0_0x256f('0x5f4')]=a0_0x256f('0x62c');},function(_0x1121e9,_0x2805bb){_0x1121e9[a0_0x256f('0x5f4')]=a0_0x256f('0x35d');},function(_0x4da781,_0x4d84c1){_0x4da781['exports']=a0_0x256f('0x30e');},function(_0x852f9c,_0x5490f5){_0x852f9c['exports']=a0_0x256f('0x134');},function(_0x3f91f2,_0xc789a8){_0x3f91f2[a0_0x256f('0x5f4')]='uniform\x20samplerCube\x20cubeMap;\x0d\x0auniform\x20float\x20indexOfRefractionRatio;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec3\x20normalWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20material.normal);\x0d\x0a\x20\x20vec3\x20positionWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20materialInput.positionToEyeEC);\x0d\x0a\x20\x20vec3\x20refractedWC\x20=\x20refract(positionWC,\x20-normalWC,\x20indexOfRefractionRatio);\x0d\x0a\x20\x20material.diffuse\x20=\x20textureCube(cubeMap,\x20refractedWC).channels;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a';},function(_0x2ff618,_0x279d44){_0x2ff618[a0_0x256f('0x5f4')]='uniform\x20vec4\x20lightColor;\x0d\x0auniform\x20vec4\x20darkColor;\x0d\x0auniform\x20float\x20frequency;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec3\x20scaled\x20=\x20materialInput.str\x20*\x20frequency;\x0d\x0a\x20\x20float\x20t\x20=\x20abs(czm_snoise(scaled));\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(lightColor,\x20darkColor,\x20t);\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a';},function(_0x9699ab,_0x3b528c){_0x9699ab['exports']=a0_0x256f('0x631');},function(_0x5ce5bb,_0x536d0e){_0x5ce5bb[a0_0x256f('0x5f4')]='uniform\x20vec4\x20color;\x0d\x0auniform\x20float\x20speed;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20material.diffuse\x20=\x201.5\x20*\x20color.rgb;\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20float\x20dis\x20=\x20distance(st,\x20vec2(0.5,\x200.5));\x0d\x0a\x20\x20float\x20per\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0d\x0a\x20\x20if(dis\x20>\x20per\x20*\x200.5){\x0d\x0a\x20\x20\x20discard;\x0d\x0a\x20\x20}else\x20{\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20color.a\x20\x20*\x20dis\x20/\x20per\x20/\x202.0;\x0d\x0a\x20\x20}\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a';},function(_0x573a76,_0x5976a7){_0x573a76['exports']=a0_0x256f('0x3a7');},function(_0x924d51,_0x4ee508){_0x924d51[a0_0x256f('0x5f4')]=a0_0x256f('0x49b');},function(_0x20ca13,_0x3a1402){_0x20ca13[a0_0x256f('0x5f4')]=a0_0x256f('0x5a2');},function(_0x1ac33f,_0x10e618){_0x1ac33f['exports']=a0_0x256f('0x8a');},function(_0x529c56,_0x33c52e){_0x529c56[a0_0x256f('0x5f4')]=a0_0x256f('0x574');},function(_0x2d7afa,_0x2720cd){_0x2d7afa[a0_0x256f('0x5f4')]=a0_0x256f('0x2ce');},function(_0x2f6873,_0xd98869){_0x2f6873['exports']='uniform\x20sampler2D\x20colorTexture;\x0d\x0auniform\x20sampler2D\x20depthTexture;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0auniform\x20vec4\x20u_scanCenterEC;\x0d\x0auniform\x20vec3\x20u_scanPlaneNormalEC;\x0d\x0auniform\x20vec3\x20u_scanLineNormalEC;\x0d\x0auniform\x20float\x20u_radius;\x0d\x0auniform\x20vec4\x20u_scanColor;\x0d\x0a\x0d\x0avec4\x20toEye(in\x20vec2\x20uv,\x20in\x20float\x20depth){\x0d\x0a\x20\x20vec2\x20xy\x20=\x20vec2((uv.x\x20*\x202.0\x20-\x201.0),(uv.y\x20*\x202.0\x20-\x201.0));\x0d\x0a\x20\x20vec4\x20posInCamera\x20=czm_inverseProjection\x20*\x20vec4(xy,\x20depth,\x201.0);\x0d\x0a\x20\x20posInCamera\x20=posInCamera\x20/\x20posInCamera.w;\x0d\x0a\x20\x20return\x20posInCamera;\x0d\x0a}\x0d\x0a\x0d\x0abool\x20isPointOnLineRight(in\x20vec3\x20ptOnLine,\x20in\x20vec3\x20lineNormal,\x20in\x20vec3\x20testPt){\x0d\x0a\x20\x20vec3\x20v01\x20=\x20testPt\x20-\x20ptOnLine;\x0d\x0a\x20\x20normalize(v01);\x0d\x0a\x20\x20vec3\x20temp\x20=\x20cross(v01,\x20lineNormal);\x0d\x0a\x20\x20float\x20d\x20=\x20dot(temp,\x20u_scanPlaneNormalEC);\x0d\x0a\x20\x20return\x20d\x20>\x200.5;\x0d\x0a}\x0d\x0a\x0d\x0avec3\x20pointProjectOnPlane(in\x20vec3\x20planeNormal,\x20in\x20vec3\x20planeOrigin,\x20in\x20vec3\x20point){\x0d\x0a\x20\x20vec3\x20v01\x20=\x20point\x20-planeOrigin;\x0d\x0a\x20\x20float\x20d\x20=\x20dot(planeNormal,\x20v01)\x20;\x0d\x0a\x20\x20return\x20(point\x20-\x20planeNormal\x20*\x20d);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20distancePointToLine(in\x20vec3\x20ptOnLine,\x20in\x20vec3\x20lineNormal,\x20in\x20vec3\x20testPt){\x0d\x0a\x20\x20vec3\x20tempPt\x20=\x20pointProjectOnPlane(lineNormal,\x20ptOnLine,\x20testPt);\x0d\x0a\x20\x20return\x20length(tempPt\x20-\x20ptOnLine);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20getDepth(in\x20vec4\x20depth){\x0d\x0a\x20\x20float\x20z_window\x20=\x20czm_unpackDepth(depth);\x0d\x0a\x20\x20z_window\x20=\x20czm_reverseLogDepth(z_window);\x0d\x0a\x20\x20float\x20n_range\x20=\x20czm_depthRange.near;\x0d\x0a\x20\x20float\x20f_range\x20=\x20czm_depthRange.far;\x0d\x0a\x20\x20return\x20(2.0\x20*\x20z_window\x20-\x20n_range\x20-\x20f_range)\x20/\x20(f_range\x20-\x20n_range);\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(){\x0d\x0a\x20\x20gl_FragColor\x20=\x20texture2D(colorTexture,\x20v_textureCoordinates);\x0d\x0a\x20\x20float\x20depth\x20=\x20getDepth(\x20texture2D(depthTexture,\x20v_textureCoordinates));\x0d\x0a\x20\x20vec4\x20viewPos\x20=\x20toEye(v_textureCoordinates,\x20depth);\x0d\x0a\x20\x20vec3\x20prjOnPlane\x20=\x20pointProjectOnPlane(u_scanPlaneNormalEC.xyz,\x20u_scanCenterEC.xyz,\x20viewPos.xyz);\x0d\x0a\x20\x20float\x20dis\x20=\x20length(prjOnPlane.xyz\x20-\x20u_scanCenterEC.xyz);\x0d\x0a\x20\x20float\x20twou_radius\x20=\x20u_radius\x20*\x202.0;\x0d\x0a\x20\x20if(dis\x20<\x20u_radius){\x0d\x0a\x20\x20\x20\x20\x20\x20float\x20f0\x20=\x201.0\x20-abs(u_radius\x20-\x20dis)\x20/\x20u_radius;\x0d\x0a\x20\x20\x20\x20\x20\x20f0\x20=\x20pow(f0,\x2064.0);\x0d\x0a\x20\x20\x20\x20\x20\x20vec3\x20lineEndPt\x20=\x20vec3(u_scanCenterEC.xyz)\x20+\x20u_scanLineNormalEC\x20*\x20u_radius;\x0d\x0a\x20\x20\x20\x20\x20\x20float\x20f\x20=\x200.0;\x0d\x0a\x20\x20\x20\x20\x20\x20if(isPointOnLineRight(u_scanCenterEC.xyz,\x20u_scanLineNormalEC.xyz,\x20prjOnPlane.xyz)){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20dis1=\x20length(prjOnPlane.xyz\x20-\x20lineEndPt);\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20f\x20=\x20abs(twou_radius\x20-dis1)\x20/\x20twou_radius;\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20f\x20=\x20pow(f,\x203.0);\x0d\x0a\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20mix(gl_FragColor,\x20u_scanColor,\x20f\x20+\x20f0);\x0d\x0a\x20\x20\x20\x20}\x0d\x0a}\x0d\x0a';},function(_0x467c0e,_0x4254b2){_0x467c0e[a0_0x256f('0x5f4')]=a0_0x256f('0xe5');},function(_0x104b12,_0xa0ab84){_0x104b12[a0_0x256f('0x5f4')]=a0_0x256f('0x118');},function(_0xa47807,_0x54e0d2,_0x16c2d0){'use strict';_0x16c2d0['r'](_0x54e0d2);var _0x53db30=_0x16c2d0(0x0),_0x3c0ba4=_0x16c2d0['n'](_0x53db30),_0x27cb90=_0x16c2d0(0x1),_0x6f111f=_0x16c2d0['n'](_0x27cb90),_0x504db9=_0x16c2d0(0xf),_0x36c93a=_0x16c2d0(0x4),_0x38fe39=_0x16c2d0['n'](_0x36c93a),_0x5f2563=_0x16c2d0(0x5),_0x31d024=_0x16c2d0['n'](_0x5f2563),_0x2baa62=_0x16c2d0(0x2),_0x1f521f=_0x16c2d0['n'](_0x2baa62);function _0x115b59(_0x36e0f8){var _0x4738c1=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x4206be){return!0x1;}}();return function(){var _0x24463c,_0x11995d=_0x1f521f()(_0x36e0f8);if(_0x4738c1){var _0x3c15d2=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x24463c=Reflect[a0_0x256f('0x64c')](_0x11995d,arguments,_0x3c15d2);}else _0x24463c=_0x11995d[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x24463c);};}var _0x5dc967=DC['Namespace']['Cesium'],_0x57f6bf=a0_0x256f('0x5e7'),_0x5a48c8=a0_0x256f('0x1e3'),_0x1bfbc1=function(_0x2d6873){_0x38fe39()(_0x2bf696,_0x2d6873);var _0x2a630c=_0x115b59(_0x2bf696);function _0x2bf696(){var _0x2b9f5a=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return _0x3c0ba4()(this,_0x2bf696),_0x2b9f5a['url']=a0_0x256f('0x1b1')===_0x2b9f5a[a0_0x256f('0x19b')]?_0x57f6bf:_0x5a48c8,_0x2b9f5a[a0_0x256f('0x499')]=_0x2b9f5a[a0_0x256f('0x499')]||['01','02','03','04'],_0x2a630c[a0_0x256f('0x32b')](this,_0x2b9f5a);}return _0x2bf696;}(_0x5dc967[a0_0x256f('0x355')]);_0x504db9['a']['AMAP']=a0_0x256f('0x357');var _0x37268e=_0x1bfbc1,_0x4c3c08=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x20ea9c='http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020',_0x42f355='http://api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}',_0xb81003='http://its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2',_0x3b7679=function(){function _0x22aa0e(){var _0x3ca254=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};_0x3c0ba4()(this,_0x22aa0e),this[a0_0x256f('0x384')]=a0_0x256f('0x1b1')===_0x3ca254['style']?a0_0x256f('0x372'):a0_0x256f('0x4d5')===_0x3ca254[a0_0x256f('0x19b')]?_0x20ea9c:a0_0x256f('0xa0')===_0x3ca254[a0_0x256f('0x19b')]?_0xb81003:_0x42f355,this[a0_0x256f('0x1b6')]=_0x3ca254[a0_0x256f('0x2fe')]||a0_0x256f('0x64d'),this[a0_0x256f('0x2a3')]=0x100,this[a0_0x256f('0x5f8')]=0x100,this[a0_0x256f('0x207')]=0x12,this[a0_0x256f('0x570')]=new _0x4c3c08[(a0_0x256f('0x265'))]({'rectangleSouthwestInMeters':new _0x4c3c08[(a0_0x256f('0x326'))](-0x1fffe86,-0x202ef88),'rectangleNortheastInMeters':new _0x4c3c08[(a0_0x256f('0x326'))](0x1fffe86,0x202ef88)}),this['_rectangle']=this[a0_0x256f('0x570')]['rectangle'],this[a0_0x256f('0x59a')]=void 0x0,this[a0_0x256f('0x172')]=void 0x0,this['_style']=_0x3ca254['style']||'normal';}return _0x6f111f()(_0x22aa0e,[{'key':a0_0x256f('0x344'),'value':function(_0x5cfa48,_0x22b483,_0x508f03){}},{'key':a0_0x256f('0x515'),'value':function(_0x465f90,_0x188551,_0x5dece5){if(!this[a0_0x256f('0x1b2')])throw new _0x4c3c08[(a0_0x256f('0x214'))]('requestImage\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.');var _0x319497=this['_tilingScheme']['getNumberOfXTilesAtLevel'](_0x5dece5),_0x29c6c8=this[a0_0x256f('0x570')][a0_0x256f('0x5ea')](_0x5dece5),_0x3d22df=this['_url'][a0_0x256f('0x255')](a0_0x256f('0x56'),String(_0x465f90-_0x319497/0x2))['replace'](a0_0x256f('0x56f'),String(_0x29c6c8/0x2-_0x188551-0x1))[a0_0x256f('0x255')](a0_0x256f('0x298'),_0x5dece5)[a0_0x256f('0x255')](a0_0x256f('0x1b7'),String(0x1))['replace'](a0_0x256f('0x549'),this[a0_0x256f('0x9b')])[a0_0x256f('0x255')](a0_0x256f('0x38a'),this[a0_0x256f('0x1b6')])[a0_0x256f('0x255')](a0_0x256f('0x50c'),String(new Date()[a0_0x256f('0x5dc')]()));return _0x4c3c08[a0_0x256f('0x379')][a0_0x256f('0x30b')](this,_0x3d22df);}},{'key':a0_0x256f('0x277'),'get':function(){return this[a0_0x256f('0x384')];}},{'key':a0_0x256f('0xa7'),'get':function(){return this[a0_0x256f('0x172')];}},{'key':a0_0x256f('0x3a2'),'get':function(){if(!this[a0_0x256f('0x1b2')])throw new _0x4c3c08['DeveloperError'](a0_0x256f('0x1ea'));return this[a0_0x256f('0x2a3')];}},{'key':a0_0x256f('0xcd'),'get':function(){if(!this[a0_0x256f('0x1b2')])throw new _0x4c3c08['DeveloperError'](a0_0x256f('0xd'));return this[a0_0x256f('0x5f8')];}},{'key':a0_0x256f('0x3fe'),'get':function(){if(!this[a0_0x256f('0x1b2')])throw new _0x4c3c08[(a0_0x256f('0x214'))]('maximumLevel\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.');return this['_maximumLevel'];}},{'key':a0_0x256f('0x61d'),'get':function(){if(!this['ready'])throw new _0x4c3c08[(a0_0x256f('0x214'))](a0_0x256f('0x5ae'));return 0x0;}},{'key':a0_0x256f('0x204'),'get':function(){if(!this['ready'])throw new _0x4c3c08['DeveloperError'](a0_0x256f('0x435'));return this[a0_0x256f('0x570')];}},{'key':a0_0x256f('0x15a'),'get':function(){if(!this[a0_0x256f('0x1b2')])throw new _0x4c3c08[(a0_0x256f('0x214'))](a0_0x256f('0x428'));return this[a0_0x256f('0xd2')];}},{'key':a0_0x256f('0x1b2'),'get':function(){return!!this[a0_0x256f('0x384')];}},{'key':a0_0x256f('0x623'),'get':function(){return this[a0_0x256f('0x59a')];}},{'key':'hasAlphaChannel','get':function(){return!0x0;}}]),_0x22aa0e;}();_0x504db9['a'][a0_0x256f('0x584')]=a0_0x256f('0x512');var _0x335949=_0x3b7679;function _0x31d1f8(_0x2b8f35){var _0x4d3c1c=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0xd56063){return!0x1;}}();return function(){var _0xe1da16,_0x239d9c=_0x1f521f()(_0x2b8f35);if(_0x4d3c1c){var _0x5a2d8e=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0xe1da16=Reflect[a0_0x256f('0x64c')](_0x239d9c,arguments,_0x5a2d8e);}else _0xe1da16=_0x239d9c['apply'](this,arguments);return _0x31d024()(this,_0xe1da16);};}var _0x185afc=DC[a0_0x256f('0x3bd')]['Cesium'],_0xc175e2=a0_0x256f('0x1e2'),_0x543208='http://mt{s}.google.cn/vt/lyrs=t@131,r@227000000&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}&s=Galile',_0x1b6d71=function(_0x4097f3){_0x38fe39()(_0x40d34a,_0x4097f3);var _0x52151f=_0x31d1f8(_0x40d34a);function _0x40d34a(){var _0x10dabd=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return _0x3c0ba4()(this,_0x40d34a),_0x10dabd[a0_0x256f('0x277')]=a0_0x256f('0x1b1')===_0x10dabd['style']?a0_0x256f('0x4f5'):a0_0x256f('0x5b3')===_0x10dabd[a0_0x256f('0x19b')]?_0x543208:_0xc175e2,_0x10dabd['subdomains']=_0x10dabd[a0_0x256f('0x499')]||['1','2','3'],_0x52151f[a0_0x256f('0x32b')](this,_0x10dabd);}return _0x40d34a;}(_0x185afc['UrlTemplateImageryProvider']);_0x504db9['a'][a0_0x256f('0xea')]='google';var _0x4c4136=_0x1b6d71,_0x4d8ac3=_0x16c2d0(0x16),_0x3fb031=_0x16c2d0['n'](_0x4d8ac3);function _0x5a6b0f(_0x49ce10){var _0x4e2cd1=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype']['toString']['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x4cdfb0){return!0x1;}}();return function(){var _0x3889af,_0x559153=_0x1f521f()(_0x49ce10);if(_0x4e2cd1){var _0x39c62e=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x3889af=Reflect[a0_0x256f('0x64c')](_0x559153,arguments,_0x39c62e);}else _0x3889af=_0x559153[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x3889af);};}var _0x474942=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x1461dc=a0_0x256f('0x174'),_0x26d4bf=function(_0x37020f){_0x38fe39()(_0x1e609e,_0x37020f);var _0x588ca3=_0x5a6b0f(_0x1e609e);function _0x1e609e(){var _0x135cbc=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return _0x3c0ba4()(this,_0x1e609e),_0x588ca3['call'](this,{'url':_0x1461dc[a0_0x256f('0x255')](/\{layer\}/g,_0x135cbc[a0_0x256f('0x19b')]||'vec')[a0_0x256f('0x255')](/\{key\}/g,_0x135cbc[a0_0x256f('0x2bc')]||''),'style':a0_0x256f('0x516'),'format':a0_0x256f('0x5d'),'tileMatrixSetID':'c','subdomains':_0x3fb031()(Array(0x6)['keys']())['map'](function(_0xf62f92){return(_0xf62f92+0x1)[a0_0x256f('0x270')]();}),'tileMatrixLabels':_0x3fb031()(Array(0x12)[a0_0x256f('0x536')]())[a0_0x256f('0x153')](function(_0x2c10d2){return(_0x2c10d2+0x1)[a0_0x256f('0x270')]();}),'tilingScheme':new _0x474942['GeographicTilingScheme'](),'maximumLevel':0x12});}return _0x1e609e;}(_0x474942[a0_0x256f('0x4a2')]);_0x504db9['a'][a0_0x256f('0x239')]=a0_0x256f('0x340');var _0x3535c8=_0x26d4bf;function _0x3bc55b(_0x6418c9){var _0x470861=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x265c09){return!0x1;}}();return function(){var _0x510ded,_0x179c9f=_0x1f521f()(_0x6418c9);if(_0x470861){var _0x41e9fd=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x510ded=Reflect[a0_0x256f('0x64c')](_0x179c9f,arguments,_0x41e9fd);}else _0x510ded=_0x179c9f['apply'](this,arguments);return _0x31d024()(this,_0x510ded);};}var _0x5e0ccd=DC[a0_0x256f('0x3bd')]['Cesium'],_0x17d5f6=function(_0xcd29da){_0x38fe39()(_0xc3ab37,_0xcd29da);var _0x475a37=_0x3bc55b(_0xc3ab37);function _0xc3ab37(){var _0x282f87=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};_0x3c0ba4()(this,_0xc3ab37);var _0x3314d6=a0_0x256f('0x1b1')===_0x282f87[a0_0x256f('0x19b')]?a0_0x256f('0x5ef'):'https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347';return _0x282f87[a0_0x256f('0x277')]=_0x3314d6[a0_0x256f('0x255')](a0_0x256f('0x549'),_0x282f87[a0_0x256f('0x19b')]||0x1),_0x282f87[a0_0x256f('0x499')]=_0x282f87[a0_0x256f('0x499')]||['1','2','3'],a0_0x256f('0x1b1')===_0x282f87[a0_0x256f('0x19b')]&&(_0x282f87[a0_0x256f('0x509')]={'sx':function(_0x95ac4,_0x2ccece,_0x4c2a0a,_0x17a990){return _0x2ccece>>0x4;},'sy':function(_0x474ebe,_0x21af49,_0x524725,_0x49e966){return(0x1<<_0x49e966)-_0x524725>>0x4;}}),_0x475a37['call'](this,_0x282f87);}return _0xc3ab37;}(_0x5e0ccd[a0_0x256f('0x355')]);_0x504db9['a'][a0_0x256f('0x53c')]=a0_0x256f('0x436');var _0x322f92=_0x17d5f6,_0x2ab149=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x57d96f=function(){function _0x48fe28(){_0x3c0ba4()(this,_0x48fe28);}return _0x6f111f()(_0x48fe28,null,[{'key':a0_0x256f('0x61e'),'value':function(_0x4a3621){return new _0x37268e(_0x4a3621);}},{'key':a0_0x256f('0x4a6'),'value':function(_0x216b5f){return new _0x335949(_0x216b5f);}},{'key':a0_0x256f('0x38d'),'value':function(_0x2a217f){return new _0x4c4136(_0x2a217f);}},{'key':'createTdtImageryLayer','value':function(_0x37bd17){return new _0x3535c8(_0x37bd17);}},{'key':'createTencentImageryLayer','value':function(_0x433306){return new _0x322f92(_0x433306);}},{'key':a0_0x256f('0x5da'),'value':function(_0x323ee4){return new _0x2ab149[(a0_0x256f('0x238'))](_0x323ee4);}},{'key':a0_0x256f('0x94'),'value':function(_0xc09eb0){return new _0x2ab149[(a0_0x256f('0x1f2'))](_0xc09eb0);}},{'key':a0_0x256f('0x199'),'value':function(_0x4c58b2){return new _0x2ab149[(a0_0x256f('0x24a'))](_0x4c58b2);}},{'key':a0_0x256f('0x35b'),'value':function(_0x3d0330){return new _0x2ab149[(a0_0x256f('0x4a2'))](_0x3d0330);}},{'key':a0_0x256f('0x4d3'),'value':function(_0x35a50d){return new _0x2ab149['UrlTemplateImageryProvider'](_0x35a50d);}},{'key':a0_0x256f('0xca'),'value':function(_0x5b654e){return new _0x2ab149[(a0_0x256f('0x4c0'))](_0x5b654e);}},{'key':a0_0x256f('0x2cc'),'value':function(_0x34d53f,_0xa2696f){var _0x3dab56=void 0x0;switch(_0x34d53f){case _0x504db9['a'][a0_0x256f('0x603')]:_0x3dab56=this['createAmapImageryLayer'](_0xa2696f);break;case _0x504db9['a']['BAIDU']:_0x3dab56=this[a0_0x256f('0x4a6')](_0xa2696f);break;case _0x504db9['a'][a0_0x256f('0xea')]:_0x3dab56=this['createGoogleImageryLayer'](_0xa2696f);break;case _0x504db9['a'][a0_0x256f('0x239')]:_0x3dab56=this['createTdtImageryLayer'](_0xa2696f);break;case _0x504db9['a'][a0_0x256f('0x53c')]:_0x3dab56=this[a0_0x256f('0x5b7')](_0xa2696f);break;case _0x504db9['a'][a0_0x256f('0x4e5')]:_0x3dab56=this[a0_0x256f('0x5da')](_0xa2696f);break;case _0x504db9['a'][a0_0x256f('0x14b')]:_0x3dab56=this[a0_0x256f('0x94')](_0xa2696f);break;case _0x504db9['a']['WMS']:_0x3dab56=this[a0_0x256f('0x199')](_0xa2696f);break;case _0x504db9['a'][a0_0x256f('0x96')]:_0x3dab56=this[a0_0x256f('0x35b')](_0xa2696f);break;case _0x504db9['a'][a0_0x256f('0x4f2')]:_0x3dab56=this[a0_0x256f('0x4d3')](_0xa2696f);break;case _0x504db9['a'][a0_0x256f('0x144')]:_0x3dab56=this[a0_0x256f('0xca')](_0xa2696f);}return _0x3dab56;}}]),_0x48fe28;}(),_0x5353f1=_0x16c2d0(0x15),_0x550efb=DC[a0_0x256f('0x3bd')]['Cesium'],_0x1778af=function(){function _0xf8a09b(){_0x3c0ba4()(this,_0xf8a09b);}return _0x6f111f()(_0xf8a09b,null,[{'key':'createEllipsoidTerrain','value':function(_0x3d8189){return new _0x550efb[(a0_0x256f('0x2f6'))](_0x3d8189);}},{'key':a0_0x256f('0x3c7'),'value':function(_0x318b28){return new _0x550efb[(a0_0x256f('0x5a6'))](_0x318b28);}},{'key':'createGoogleTerrain','value':function(_0x4eaae2){return new _0x550efb[(a0_0x256f('0x127'))](_0x4eaae2);}},{'key':a0_0x256f('0x16b'),'value':function(_0x3e06a2){return new _0x550efb['ArcGISTiledElevationTerrainProvider'](_0x3e06a2);}},{'key':'createVRTerrain','value':function(_0x5e9bab){return new _0x550efb[(a0_0x256f('0x554'))](_0x5e9bab);}},{'key':'createTerrain','value':function(_0x3e9a09,_0xbf6493){var _0x2dba09=void 0x0;switch(_0x3e9a09){case _0x5353f1['a'][a0_0x256f('0x4eb')]:_0x2dba09=this[a0_0x256f('0x476')](_0xbf6493);break;case _0x5353f1['a'][a0_0x256f('0x4f2')]:_0x2dba09=this[a0_0x256f('0x3c7')](_0xbf6493);break;case _0x5353f1['a'][a0_0x256f('0xea')]:_0x2dba09=this[a0_0x256f('0x5d8')](_0xbf6493);break;case _0x5353f1['a'][a0_0x256f('0x4e5')]:_0x2dba09=this[a0_0x256f('0x16b')](_0xbf6493);break;case _0x5353f1['a']['VR']:_0x2dba09=this[a0_0x256f('0x566')](_0xbf6493);}return _0x2dba09;}}]),_0xf8a09b;}(),_0x30bffc=_0x16c2d0(0x9),_0x2baac3=_0x16c2d0['n'](_0x30bffc),_0x5e0336=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x192a29=function(){function _0x59469d(_0x5909ab){_0x3c0ba4()(this,_0x59469d),this[a0_0x256f('0x390')]=_0x5909ab,this['_delegate']=void 0x0,this['_floatingAnchor']=void 0x0;}return _0x6f111f()(_0x59469d,[{'key':a0_0x256f('0xf9'),'value':function(){}},{'key':a0_0x256f('0xf5'),'value':function(){}},{'key':a0_0x256f('0x5cf'),'value':function(){}},{'key':a0_0x256f('0x18a'),'value':function(){}},{'key':a0_0x256f('0x393'),'value':function(){this[a0_0x256f('0x390')]['viewer']['on'](_0x5e0336['ScreenSpaceEventType']['LEFT_CLICK'],this['_mouseClickHandler'],this),this['_plot'][a0_0x256f('0x488')]['on'](_0x5e0336[a0_0x256f('0xf8')][a0_0x256f('0x37b')],this[a0_0x256f('0x5cf')],this),this[a0_0x256f('0x390')][a0_0x256f('0x488')]['on'](_0x5e0336[a0_0x256f('0xf8')]['RIGHT_CLICK'],this[a0_0x256f('0x18a')],this);}},{'key':a0_0x256f('0x210'),'value':function(){this['_plot'][a0_0x256f('0x488')][a0_0x256f('0x2e2')](_0x5e0336[a0_0x256f('0xf8')][a0_0x256f('0x3d8')],this['_mouseClickHandler'],this),this[a0_0x256f('0x390')]['viewer'][a0_0x256f('0x2e2')](_0x5e0336[a0_0x256f('0xf8')][a0_0x256f('0x37b')],this[a0_0x256f('0x5cf')],this),this[a0_0x256f('0x390')]['viewer'][a0_0x256f('0x2e2')](_0x5e0336['ScreenSpaceEventType'][a0_0x256f('0x6e')],this[a0_0x256f('0x18a')],this);}},{'key':'createAnchor','value':function(_0x29843f){var _0x500794=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]&&arguments[0x1];return this['_plot'][a0_0x256f('0x3a5')][a0_0x256f('0x53d')]({'position':_0x29843f,'billboard':{'image':_0x500794?this[a0_0x256f('0x390')]['options'][a0_0x256f('0x341')]:this[a0_0x256f('0x390')][a0_0x256f('0x2eb')]['icon_anchor'],'width':this[a0_0x256f('0x390')][a0_0x256f('0x2eb')][a0_0x256f('0x1d0')][0x0],'height':this['_plot']['options'][a0_0x256f('0x1d0')][0x1],'eyeOffset':new _0x5e0336[(a0_0x256f('0x534'))](0x0,0x0,-0x1f4),'heightReference':this[a0_0x256f('0x390')]['viewer']['scene'][a0_0x256f('0x5aa')]===_0x5e0336[a0_0x256f('0xc5')][a0_0x256f('0x25')]?_0x5e0336[a0_0x256f('0x4b3')][a0_0x256f('0x5c2')]:_0x5e0336[a0_0x256f('0x4b3')][a0_0x256f('0x4eb')]}});}},{'key':a0_0x256f('0x8c'),'value':function(){this[a0_0x256f('0x393')]();}}]),_0x59469d;}();function _0x4f45bd(_0x46ee20,_0x231811){var _0x49a2e3=Object[a0_0x256f('0x536')](_0x46ee20);if(Object[a0_0x256f('0x23e')]){var _0x24b1e2=Object[a0_0x256f('0x23e')](_0x46ee20);_0x231811&&(_0x24b1e2=_0x24b1e2['filter'](function(_0x17fe5b){return Object[a0_0x256f('0x79')](_0x46ee20,_0x17fe5b)[a0_0x256f('0x2ec')];})),_0x49a2e3[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x49a2e3,_0x24b1e2);}return _0x49a2e3;}function _0x4321f7(_0x4c4708){for(var _0x9b739c=0x1;_0x9b739c<arguments[a0_0x256f('0x658')];_0x9b739c++){var _0x34a16b=null!=arguments[_0x9b739c]?arguments[_0x9b739c]:{};_0x9b739c%0x2?_0x4f45bd(Object(_0x34a16b),!0x0)['forEach'](function(_0x56be8a){_0x2baac3()(_0x4c4708,_0x56be8a,_0x34a16b[_0x56be8a]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x4c4708,Object[a0_0x256f('0x498')](_0x34a16b)):_0x4f45bd(Object(_0x34a16b))[a0_0x256f('0x218')](function(_0x41d32b){Object[a0_0x256f('0x21f')](_0x4c4708,_0x41d32b,Object[a0_0x256f('0x79')](_0x34a16b,_0x41d32b));});}return _0x4c4708;}function _0x35328a(_0x2c65e3){var _0x12379e=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x21d619){return!0x1;}}();return function(){var _0x50642a,_0x3218b8=_0x1f521f()(_0x2c65e3);if(_0x12379e){var _0x411ffa=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x50642a=Reflect[a0_0x256f('0x64c')](_0x3218b8,arguments,_0x411ffa);}else _0x50642a=_0x3218b8[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x50642a);};}var _0x20a4c7=DC[a0_0x256f('0xab')],_0x38afa5=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x165442={'pixelSize':0xa,'outlineColor':_0x38afa5[a0_0x256f('0x54e')]['BLUE'],'outlineWidth':0x5},_0x6f7d72=function(_0xee9d5e){_0x38fe39()(_0xd0b16d,_0xee9d5e);var _0x2b778f=_0x35328a(_0xd0b16d);function _0xd0b16d(_0x1a3919,_0x4cea15){var _0x6643d4;return _0x3c0ba4()(this,_0xd0b16d),(_0x6643d4=_0x2b778f['call'](this,_0x1a3919))[a0_0x256f('0x666')]=_0x38afa5['Cartesian3'][a0_0x256f('0x5a0')],_0x6643d4[a0_0x256f('0x9b')]=_0x4321f7(_0x4321f7({},_0x165442),_0x4cea15),_0x6643d4[a0_0x256f('0xf9')](),_0x6643d4;}return _0x6f111f()(_0xd0b16d,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x257a7b=this;this[a0_0x256f('0x10')]=new _0x38afa5[(a0_0x256f('0x39d'))]({'position':new _0x38afa5['CallbackProperty'](function(){return _0x257a7b[a0_0x256f('0x666')];},!0x1),'point':_0x4321f7({},this[a0_0x256f('0x9b')])}),this['_plot']['overlayLayer']['add'](this[a0_0x256f('0x10')]);}},{'key':'_mouseClickHandler','value':function(_0x3009d6){this['_position']=_0x3009d6[a0_0x256f('0xbd')],this[a0_0x256f('0x210')]();var _0x302863=new DC[(a0_0x256f('0x1e0'))](_0x20a4c7['transformCartesianToWGS84'](this['_position']));_0x302863[a0_0x256f('0x421')](this[a0_0x256f('0x9b')]),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](_0x302863);}},{'key':a0_0x256f('0x5cf'),'value':function(_0x2b7d7a){this['_position']=_0x2b7d7a['surfacePosition'],this['_plot']['viewer'][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x2b7d7a[a0_0x256f('0x226')],a0_0x256f('0xb6'));}}]),_0xd0b16d;}(_0x192a29);function _0xe04632(_0x309eac,_0xfceefb){var _0x6f015b=Object[a0_0x256f('0x536')](_0x309eac);if(Object['getOwnPropertySymbols']){var _0x473da7=Object['getOwnPropertySymbols'](_0x309eac);_0xfceefb&&(_0x473da7=_0x473da7[a0_0x256f('0x53e')](function(_0x5b4274){return Object[a0_0x256f('0x79')](_0x309eac,_0x5b4274)['enumerable'];})),_0x6f015b[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x6f015b,_0x473da7);}return _0x6f015b;}function _0x17621a(_0x88f66c){for(var _0x3ab94e=0x1;_0x3ab94e<arguments['length'];_0x3ab94e++){var _0xf55ab1=null!=arguments[_0x3ab94e]?arguments[_0x3ab94e]:{};_0x3ab94e%0x2?_0xe04632(Object(_0xf55ab1),!0x0)['forEach'](function(_0x21fc65){_0x2baac3()(_0x88f66c,_0x21fc65,_0xf55ab1[_0x21fc65]);}):Object[a0_0x256f('0x498')]?Object['defineProperties'](_0x88f66c,Object[a0_0x256f('0x498')](_0xf55ab1)):_0xe04632(Object(_0xf55ab1))[a0_0x256f('0x218')](function(_0x512466){Object[a0_0x256f('0x21f')](_0x88f66c,_0x512466,Object[a0_0x256f('0x79')](_0xf55ab1,_0x512466));});}return _0x88f66c;}function _0x5d8853(_0x3c5d2d){var _0x32623b=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x356b9f){return!0x1;}}();return function(){var _0x24f274,_0x218d5a=_0x1f521f()(_0x3c5d2d);if(_0x32623b){var _0x1a4f85=_0x1f521f()(this)['constructor'];_0x24f274=Reflect['construct'](_0x218d5a,arguments,_0x1a4f85);}else _0x24f274=_0x218d5a[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x24f274);};}var _0x3e7e40=DC[a0_0x256f('0xab')],_0x2ea3e0=DC['Namespace'][a0_0x256f('0x224')],_0x20c4a2={'width':0x3,'material':_0x2ea3e0[a0_0x256f('0x54e')][a0_0x256f('0x543')][a0_0x256f('0x2e4')](0.6)},_0x53e244=function(_0x95b554){_0x38fe39()(_0x5259eb,_0x95b554);var _0x4bea09=_0x5d8853(_0x5259eb);function _0x5259eb(_0x45a54f,_0x3a2529){var _0x3bf903;return _0x3c0ba4()(this,_0x5259eb),(_0x3bf903=_0x4bea09[a0_0x256f('0x32b')](this,_0x45a54f))[a0_0x256f('0x5d3')]=[],_0x3bf903['_style']=_0x17621a(_0x17621a({},_0x20c4a2),_0x3a2529),_0x3bf903[a0_0x256f('0xf9')](),_0x3bf903;}return _0x6f111f()(_0x5259eb,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x50e87e=this;this[a0_0x256f('0x10')]=new _0x2ea3e0[(a0_0x256f('0x39d'))]({'polyline':_0x17621a(_0x17621a({},this[a0_0x256f('0x9b')]),{},{'positions':new _0x2ea3e0['CallbackProperty'](function(){return _0x50e87e['_positions'];},!0x1)})}),this['_plot']['overlayLayer'][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0xf5'),'value':function(_0x5e7bd6){0x0===this[a0_0x256f('0x5d3')][a0_0x256f('0x658')]&&(this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x5e7bd6[a0_0x256f('0xbd')]),this['createAnchor'](_0x5e7bd6[a0_0x256f('0xbd')]),this['_floatingAnchor']=this['createAnchor'](_0x5e7bd6[a0_0x256f('0xbd')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x5e7bd6[a0_0x256f('0xbd')]),this[a0_0x256f('0x4ba')](_0x5e7bd6[a0_0x256f('0xbd')]);}},{'key':a0_0x256f('0x5cf'),'value':function(_0x4a4ba3){this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x4a4ba3[a0_0x256f('0x226')],a0_0x256f('0x30a')),this[a0_0x256f('0x22')]&&(this[a0_0x256f('0x22')]['position'][a0_0x256f('0x171')](_0x4a4ba3[a0_0x256f('0xbd')]),this[a0_0x256f('0x5d3')][a0_0x256f('0x1bf')](),this[a0_0x256f('0x5d3')]['push'](_0x4a4ba3['surfacePosition']));}},{'key':a0_0x256f('0x18a'),'value':function(_0x3852e9){this[a0_0x256f('0x210')]();var _0x3c81a4=new DC[(a0_0x256f('0x1a3'))](_0x3e7e40[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]));_0x3c81a4['setStyle'](this[a0_0x256f('0x9b')]),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](_0x3c81a4);}}]),_0x5259eb;}(_0x192a29);function _0x11d9ce(_0x1431bc,_0x346a14){var _0x547c17=Object[a0_0x256f('0x536')](_0x1431bc);if(Object[a0_0x256f('0x23e')]){var _0x43ec1f=Object[a0_0x256f('0x23e')](_0x1431bc);_0x346a14&&(_0x43ec1f=_0x43ec1f[a0_0x256f('0x53e')](function(_0x405d24){return Object['getOwnPropertyDescriptor'](_0x1431bc,_0x405d24)[a0_0x256f('0x2ec')];})),_0x547c17[a0_0x256f('0x289')]['apply'](_0x547c17,_0x43ec1f);}return _0x547c17;}function _0x1c90f9(_0x2ea7a4){for(var _0x572d2c=0x1;_0x572d2c<arguments[a0_0x256f('0x658')];_0x572d2c++){var _0x1f734a=null!=arguments[_0x572d2c]?arguments[_0x572d2c]:{};_0x572d2c%0x2?_0x11d9ce(Object(_0x1f734a),!0x0)[a0_0x256f('0x218')](function(_0x5cd084){_0x2baac3()(_0x2ea7a4,_0x5cd084,_0x1f734a[_0x5cd084]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x2ea7a4,Object[a0_0x256f('0x498')](_0x1f734a)):_0x11d9ce(Object(_0x1f734a))[a0_0x256f('0x218')](function(_0x4d5460){Object[a0_0x256f('0x21f')](_0x2ea7a4,_0x4d5460,Object[a0_0x256f('0x79')](_0x1f734a,_0x4d5460));});}return _0x2ea7a4;}function _0x5bdf9a(_0x4a8d2e){var _0x1d1b71=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString']['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x54f13a){return!0x1;}}();return function(){var _0x2d3ef5,_0x33967b=_0x1f521f()(_0x4a8d2e);if(_0x1d1b71){var _0x2df5ab=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x2d3ef5=Reflect['construct'](_0x33967b,arguments,_0x2df5ab);}else _0x2d3ef5=_0x33967b['apply'](this,arguments);return _0x31d024()(this,_0x2d3ef5);};}var _0x520672=DC[a0_0x256f('0xab')],_0x3bfed1=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x3d9024={'material':_0x3bfed1[a0_0x256f('0x54e')]['YELLOW']['withAlpha'](0.6),'fill':!0x0},_0x1607b6=function(_0x4b300b){_0x38fe39()(_0x94e169,_0x4b300b);var _0x469e0e=_0x5bdf9a(_0x94e169);function _0x94e169(_0x26a354,_0x4643a1){var _0x4376d2;return _0x3c0ba4()(this,_0x94e169),(_0x4376d2=_0x469e0e[a0_0x256f('0x32b')](this,_0x26a354))[a0_0x256f('0x5d3')]=[],_0x4376d2[a0_0x256f('0x9b')]=_0x1c90f9(_0x1c90f9({},_0x3d9024),_0x4643a1),_0x4376d2['_mountEntity'](),_0x4376d2;}return _0x6f111f()(_0x94e169,[{'key':a0_0x256f('0xf9'),'value':function(){var _0xf23555=this;this[a0_0x256f('0x10')]=new _0x3bfed1[(a0_0x256f('0x39d'))]({'polygon':_0x1c90f9(_0x1c90f9({},this[a0_0x256f('0x9b')]),{},{'hierarchy':new _0x3bfed1['CallbackProperty'](function(){return _0xf23555[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x2?new _0x3bfed1[(a0_0x256f('0x634'))](_0xf23555[a0_0x256f('0x5d3')]):null;},!0x1)})}),this['_plot']['overlayLayer'][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0xf5'),'value':function(_0x1e5c2d){0x0===this['_positions'][a0_0x256f('0x658')]&&(this[a0_0x256f('0x5d3')]['push'](_0x1e5c2d[a0_0x256f('0xbd')]),this['createAnchor'](_0x1e5c2d[a0_0x256f('0xbd')]),this['_floatingAnchor']=this[a0_0x256f('0x4ba')](_0x1e5c2d[a0_0x256f('0xbd')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x1e5c2d[a0_0x256f('0xbd')]),this[a0_0x256f('0x4ba')](_0x1e5c2d[a0_0x256f('0xbd')]);}},{'key':a0_0x256f('0x5cf'),'value':function(_0x143b42){this['_plot'][a0_0x256f('0x488')][a0_0x256f('0x31e')]['showAt'](_0x143b42[a0_0x256f('0x226')],a0_0x256f('0x45a')),this[a0_0x256f('0x22')]&&(this[a0_0x256f('0x22')][a0_0x256f('0x13c')]['setValue'](_0x143b42['surfacePosition']),this[a0_0x256f('0x5d3')]['pop'](),this['_positions'][a0_0x256f('0x289')](_0x143b42[a0_0x256f('0xbd')]));}},{'key':a0_0x256f('0x18a'),'value':function(_0x412fcf){this['unbindEvent']();var _0x2d3b77=new DC['Polygon'](_0x520672[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]));_0x2d3b77[a0_0x256f('0x421')](this[a0_0x256f('0x9b')]),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](_0x2d3b77);}}]),_0x94e169;}(_0x192a29);function _0x2e0e38(_0x57bda0,_0x378016){var _0x2ec282=Object['keys'](_0x57bda0);if(Object['getOwnPropertySymbols']){var _0x346ed0=Object[a0_0x256f('0x23e')](_0x57bda0);_0x378016&&(_0x346ed0=_0x346ed0[a0_0x256f('0x53e')](function(_0x508fcb){return Object[a0_0x256f('0x79')](_0x57bda0,_0x508fcb)[a0_0x256f('0x2ec')];})),_0x2ec282['push'][a0_0x256f('0x40')](_0x2ec282,_0x346ed0);}return _0x2ec282;}function _0xe6ab0b(_0x2196a1){for(var _0x39c675=0x1;_0x39c675<arguments['length'];_0x39c675++){var _0x426cb0=null!=arguments[_0x39c675]?arguments[_0x39c675]:{};_0x39c675%0x2?_0x2e0e38(Object(_0x426cb0),!0x0)['forEach'](function(_0x34e759){_0x2baac3()(_0x2196a1,_0x34e759,_0x426cb0[_0x34e759]);}):Object[a0_0x256f('0x498')]?Object['defineProperties'](_0x2196a1,Object[a0_0x256f('0x498')](_0x426cb0)):_0x2e0e38(Object(_0x426cb0))[a0_0x256f('0x218')](function(_0xf96d30){Object['defineProperty'](_0x2196a1,_0xf96d30,Object[a0_0x256f('0x79')](_0x426cb0,_0xf96d30));});}return _0x2196a1;}function _0x37eaea(_0x15fc49){var _0x1ae24a=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x5885f1){return!0x1;}}();return function(){var _0x5b1075,_0x2c1e88=_0x1f521f()(_0x15fc49);if(_0x1ae24a){var _0x623e14=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x5b1075=Reflect['construct'](_0x2c1e88,arguments,_0x623e14);}else _0x5b1075=_0x2c1e88[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x5b1075);};}var _0x4edd9d=DC[a0_0x256f('0xab')],_0x480c85=DC['Namespace'][a0_0x256f('0x224')],_0x312096={'material':_0x480c85[a0_0x256f('0x54e')][a0_0x256f('0x543')][a0_0x256f('0x2e4')](0.6),'fill':!0x0},_0x4a44a2=function(_0x43796e){_0x38fe39()(_0x13bb10,_0x43796e);var _0x4e5848=_0x37eaea(_0x13bb10);function _0x13bb10(_0x317bf3,_0x30fb57){var _0x5c3743;return _0x3c0ba4()(this,_0x13bb10),(_0x5c3743=_0x4e5848['call'](this,_0x317bf3))[a0_0x256f('0x5d3')]=[],_0x5c3743[a0_0x256f('0x1fa')]=0x0,_0x5c3743[a0_0x256f('0x9b')]=_0xe6ab0b(_0xe6ab0b({},_0x312096),_0x30fb57),_0x5c3743[a0_0x256f('0xf9')](),_0x5c3743;}return _0x6f111f()(_0x13bb10,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x125928=this;this[a0_0x256f('0x10')]=new _0x480c85[(a0_0x256f('0x39d'))]({'polygon':_0xe6ab0b(_0xe6ab0b({},this['_style']),{},{'hierarchy':new _0x480c85[(a0_0x256f('0x420'))](function(){if(_0x125928['_positions'][a0_0x256f('0x658')]>0x1){if(_0x125928['_radius']=_0x480c85[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x125928[a0_0x256f('0x5d3')][0x0],_0x125928[a0_0x256f('0x5d3')][0x1]),_0x125928['_radius']<=0x0)return null;var _0x1b6380=_0x480c85['EllipseGeometryLibrary'][a0_0x256f('0x29')]({'center':_0x125928[a0_0x256f('0x5d3')][0x0],'semiMajorAxis':_0x125928['_radius'],'semiMinorAxis':_0x125928[a0_0x256f('0x1fa')],'rotation':0x0,'granularity':0.005},!0x1,!0x0),_0x1ab711=_0x480c85[a0_0x256f('0x534')][a0_0x256f('0x43f')](_0x1b6380[a0_0x256f('0x85')]);return _0x1ab711[a0_0x256f('0x289')](_0x1ab711[0x0]),new _0x480c85[(a0_0x256f('0x634'))](_0x1ab711);}return null;},!0x1)})}),this['_plot'][a0_0x256f('0x3a5')]['add'](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0xf5'),'value':function(_0x5d5162){var _0x37605b=this[a0_0x256f('0x5d3')][a0_0x256f('0x658')];if(0x0===_0x37605b&&(this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x5d5162[a0_0x256f('0xbd')]),this[a0_0x256f('0x4ba')](_0x5d5162['surfacePosition'],!0x0),this[a0_0x256f('0x22')]=this[a0_0x256f('0x4ba')](_0x5d5162[a0_0x256f('0xbd')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x5d5162['surfacePosition']),_0x37605b>0x0&&this[a0_0x256f('0x4ba')](_0x5d5162[a0_0x256f('0xbd')]),_0x37605b>0x1){this[a0_0x256f('0x5d3')][a0_0x256f('0x1bf')](),this['unbindEvent']();var _0x55617b=new DC[(a0_0x256f('0x11b'))](_0x4edd9d['transformCartesianToWGS84'](this[a0_0x256f('0x5d3')][0x0]),this[a0_0x256f('0x1fa')]);_0x55617b['setStyle'](this[a0_0x256f('0x9b')]),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](_0x55617b);}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x17b003){this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')]['showAt'](_0x17b003[a0_0x256f('0x226')],a0_0x256f('0x1a9')),this['_floatingAnchor']&&(this[a0_0x256f('0x22')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x17b003[a0_0x256f('0xbd')]),this['_positions']['pop'](),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x17b003[a0_0x256f('0xbd')]));}}]),_0x13bb10;}(_0x192a29);function _0x1762b0(_0x584c69,_0x490f70){var _0x1eef10=Object[a0_0x256f('0x536')](_0x584c69);if(Object['getOwnPropertySymbols']){var _0x2af398=Object[a0_0x256f('0x23e')](_0x584c69);_0x490f70&&(_0x2af398=_0x2af398[a0_0x256f('0x53e')](function(_0x58e025){return Object['getOwnPropertyDescriptor'](_0x584c69,_0x58e025)[a0_0x256f('0x2ec')];})),_0x1eef10['push'][a0_0x256f('0x40')](_0x1eef10,_0x2af398);}return _0x1eef10;}function _0x173889(_0x2b8678){for(var _0x5dc00a=0x1;_0x5dc00a<arguments[a0_0x256f('0x658')];_0x5dc00a++){var _0x5c42fa=null!=arguments[_0x5dc00a]?arguments[_0x5dc00a]:{};_0x5dc00a%0x2?_0x1762b0(Object(_0x5c42fa),!0x0)['forEach'](function(_0x519624){_0x2baac3()(_0x2b8678,_0x519624,_0x5c42fa[_0x519624]);}):Object[a0_0x256f('0x498')]?Object['defineProperties'](_0x2b8678,Object[a0_0x256f('0x498')](_0x5c42fa)):_0x1762b0(Object(_0x5c42fa))[a0_0x256f('0x218')](function(_0x42ed99){Object['defineProperty'](_0x2b8678,_0x42ed99,Object[a0_0x256f('0x79')](_0x5c42fa,_0x42ed99));});}return _0x2b8678;}function _0x3e5b8f(_0x3356fd){var _0x4387b4=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x2e50bf){return!0x1;}}();return function(){var _0xbad702,_0x372cfa=_0x1f521f()(_0x3356fd);if(_0x4387b4){var _0x18c587=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0xbad702=Reflect[a0_0x256f('0x64c')](_0x372cfa,arguments,_0x18c587);}else _0xbad702=_0x372cfa[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0xbad702);};}var _0x1941ad=DC[a0_0x256f('0xab')],_0x3a34ff=DC['Namespace'][a0_0x256f('0x224')],_0xfbc8f4={'material':_0x3a34ff[a0_0x256f('0x54e')][a0_0x256f('0x543')][a0_0x256f('0x2e4')](0.6)},_0xf9b7e3=function(_0x215a5b){_0x38fe39()(_0x1688a9,_0x215a5b);var _0x140ecd=_0x3e5b8f(_0x1688a9);function _0x1688a9(_0x240988,_0x4e508b){var _0x2b3d2a;return _0x3c0ba4()(this,_0x1688a9),(_0x2b3d2a=_0x140ecd['call'](this,_0x240988))[a0_0x256f('0x5d3')]=[],_0x2b3d2a[a0_0x256f('0x9b')]=_0x173889(_0x173889({},_0xfbc8f4),_0x4e508b),_0x2b3d2a[a0_0x256f('0xf9')](),_0x2b3d2a;}return _0x6f111f()(_0x1688a9,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x42332b=this;this[a0_0x256f('0x10')]=new _0x3a34ff[(a0_0x256f('0x39d'))]({'rectangle':_0x173889(_0x173889({},this['_style']),{},{'coordinates':new _0x3a34ff[(a0_0x256f('0x420'))](function(_0x238a37){return _0x42332b[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x1?_0x3a34ff['Rectangle'][a0_0x256f('0x3a6')](_0x42332b['_positions']):null;},!0x1)})}),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0xf5'),'value':function(_0x19906a){var _0x1132ab=this[a0_0x256f('0x5d3')]['length'];if(0x0===_0x1132ab&&(this[a0_0x256f('0x5d3')]['push'](_0x19906a['surfacePosition']),this[a0_0x256f('0x4ba')](_0x19906a[a0_0x256f('0xbd')]),this[a0_0x256f('0x22')]=this[a0_0x256f('0x4ba')](_0x19906a['surfacePosition'])),this[a0_0x256f('0x5d3')]['push'](_0x19906a[a0_0x256f('0xbd')]),this[a0_0x256f('0x4ba')](_0x19906a['surfacePosition']),_0x1132ab>0x1){this[a0_0x256f('0x5d3')][a0_0x256f('0x1bf')](),this[a0_0x256f('0x210')]();var _0xc8e040=new DC['Rectangle'](_0x1941ad[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]));_0xc8e040[a0_0x256f('0x421')](this[a0_0x256f('0x9b')]),this['_plot']['plotEvent']['raiseEvent'](_0xc8e040);}}},{'key':'_mouseMoveHandler','value':function(_0x2af971){this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x2af971[a0_0x256f('0x226')],a0_0x256f('0x1a9')),this['_floatingAnchor']&&(this[a0_0x256f('0x22')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x2af971[a0_0x256f('0xbd')]),this[a0_0x256f('0x5d3')][a0_0x256f('0x1bf')](),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x2af971['surfacePosition']));}}]),_0x1688a9;}(_0x192a29);function _0x10adfe(_0x177a53,_0x248498){var _0x5c5e98=Object[a0_0x256f('0x536')](_0x177a53);if(Object['getOwnPropertySymbols']){var _0x1e8ab5=Object[a0_0x256f('0x23e')](_0x177a53);_0x248498&&(_0x1e8ab5=_0x1e8ab5[a0_0x256f('0x53e')](function(_0x41a929){return Object[a0_0x256f('0x79')](_0x177a53,_0x41a929)[a0_0x256f('0x2ec')];})),_0x5c5e98[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x5c5e98,_0x1e8ab5);}return _0x5c5e98;}function _0x124d02(_0x36779b){for(var _0x491489=0x1;_0x491489<arguments['length'];_0x491489++){var _0x6a6f17=null!=arguments[_0x491489]?arguments[_0x491489]:{};_0x491489%0x2?_0x10adfe(Object(_0x6a6f17),!0x0)[a0_0x256f('0x218')](function(_0x580254){_0x2baac3()(_0x36779b,_0x580254,_0x6a6f17[_0x580254]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x256f('0x3d9')](_0x36779b,Object[a0_0x256f('0x498')](_0x6a6f17)):_0x10adfe(Object(_0x6a6f17))[a0_0x256f('0x218')](function(_0x1b326a){Object['defineProperty'](_0x36779b,_0x1b326a,Object[a0_0x256f('0x79')](_0x6a6f17,_0x1b326a));});}return _0x36779b;}function _0x16d21b(_0x1a92db){var _0x495383=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x10d274){return!0x1;}}();return function(){var _0x1af1b9,_0x2e89ee=_0x1f521f()(_0x1a92db);if(_0x495383){var _0x1a45d5=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x1af1b9=Reflect['construct'](_0x2e89ee,arguments,_0x1a45d5);}else _0x1af1b9=_0x2e89ee[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x1af1b9);};}var _0x493954=DC[a0_0x256f('0xab')],_0xc85355=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x54ea2c={},_0x1e8ad4=function(_0x2f99e0){_0x38fe39()(_0x2d8252,_0x2f99e0);var _0x5e1d72=_0x16d21b(_0x2d8252);function _0x2d8252(_0x39077e,_0x5f13b5){var _0x5041ad;return _0x3c0ba4()(this,_0x2d8252),(_0x5041ad=_0x5e1d72[a0_0x256f('0x32b')](this,_0x39077e))[a0_0x256f('0x666')]=_0xc85355[a0_0x256f('0x534')][a0_0x256f('0x5a0')],_0x5041ad[a0_0x256f('0x9b')]=_0x124d02(_0x124d02({'image':_0x39077e[a0_0x256f('0x2eb')][a0_0x256f('0x41b')]},_0x54ea2c),_0x5f13b5),_0x5041ad[a0_0x256f('0xf9')](),_0x5041ad;}return _0x6f111f()(_0x2d8252,[{'key':a0_0x256f('0xf9'),'value':function(){var _0xcea5d6=this;this['_delegate']=new _0xc85355[(a0_0x256f('0x39d'))]({'position':new _0xc85355['CallbackProperty'](function(){return _0xcea5d6[a0_0x256f('0x666')];},!0x1),'billboard':_0x124d02({},this[a0_0x256f('0x9b')])}),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0xf5'),'value':function(_0x3f6e81){this[a0_0x256f('0x666')]=_0x3f6e81[a0_0x256f('0xbd')],this[a0_0x256f('0x210')]();var _0x26e95c=new DC[(a0_0x256f('0x64'))](_0x493954[a0_0x256f('0x31a')](this[a0_0x256f('0x666')]),this[a0_0x256f('0x9b')][a0_0x256f('0x392')]);_0x26e95c[a0_0x256f('0x421')](this[a0_0x256f('0x9b')]),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](_0x26e95c);}},{'key':a0_0x256f('0x5cf'),'value':function(_0x3c0e26){this['_plot'][a0_0x256f('0x488')]['tooltip'][a0_0x256f('0xf2')](_0x3c0e26[a0_0x256f('0x226')],a0_0x256f('0xb6')),this['_position']=_0x3c0e26[a0_0x256f('0xbd')];}}]),_0x2d8252;}(_0x192a29),_0x4ab4a8=DC,_0x2b82c2=_0x4ab4a8[a0_0x256f('0xab')],_0x595e08=_0x4ab4a8['Parse'],_0x5b39f1=_0x4ab4a8['PlotUtil'],_0x3e3bdf=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x2d650d=Math['PI']/0x2,_0x12c6d3=function(){function _0x33d6e0(_0x43f040){_0x3c0ba4()(this,_0x33d6e0),this[a0_0x256f('0x5d3')]=(null==_0x43f040?void 0x0:_0x43f040[a0_0x256f('0x50b')])||[],this[a0_0x256f('0x246')]=0.18,this[a0_0x256f('0x4a')]=0.3,this[a0_0x256f('0x5ba')]=0.85,this[a0_0x256f('0x519')]=0.15,this[a0_0x256f('0x33a')]=0.8;}return _0x6f111f()(_0x33d6e0,[{'key':a0_0x256f('0x5e8'),'value':function(_0x58c24e,_0x55748c,_0x30d882){var _0x3cd254=_0x5b39f1[a0_0x256f('0x607')](_0x58c24e),_0x2d650a=_0x3cd254*this[a0_0x256f('0x246')],_0x380305=_0x58c24e[_0x58c24e['length']-0x1];_0x3cd254=_0x5b39f1[a0_0x256f('0x177')](_0x380305,_0x58c24e[_0x58c24e[a0_0x256f('0x658')]-0x2]);var _0x206955=_0x5b39f1[a0_0x256f('0x177')](_0x55748c,_0x30d882);_0x2d650a>_0x206955*this[a0_0x256f('0x33a')]&&(_0x2d650a=_0x206955*this['headTailFactor']);var _0x9fd268=_0x2d650a*this[a0_0x256f('0x4a')],_0x1ec4b2=_0x2d650a*this[a0_0x256f('0x519')],_0x532dcb=(_0x2d650a=_0x2d650a>_0x3cd254?_0x3cd254:_0x2d650a)*this[a0_0x256f('0x5ba')],_0x367af9=_0x5b39f1[a0_0x256f('0x4ce')](_0x58c24e[_0x58c24e[a0_0x256f('0x658')]-0x2],_0x380305,0x0,_0x2d650a,!0x0),_0x540e7d=_0x5b39f1[a0_0x256f('0x4ce')](_0x58c24e[_0x58c24e[a0_0x256f('0x658')]-0x2],_0x380305,0x0,_0x532dcb,!0x0),_0x2f5e2d=_0x5b39f1['getThirdPoint'](_0x380305,_0x367af9,_0x2d650d,_0x9fd268,!0x1),_0x57b2d6=_0x5b39f1[a0_0x256f('0x4ce')](_0x380305,_0x367af9,_0x2d650d,_0x9fd268,!0x0);return[_0x5b39f1[a0_0x256f('0x4ce')](_0x380305,_0x540e7d,_0x2d650d,_0x1ec4b2,!0x1),_0x2f5e2d,_0x380305,_0x57b2d6,_0x5b39f1[a0_0x256f('0x4ce')](_0x380305,_0x540e7d,_0x2d650d,_0x1ec4b2,!0x0)];}},{'key':a0_0x256f('0x389'),'value':function(_0x25d16a,_0x2efee6,_0x156e94,_0x28a5b3){for(var _0x4b0e91=_0x5b39f1[a0_0x256f('0x123')](_0x25d16a),_0x341ea7=_0x5b39f1[a0_0x256f('0x607')](_0x25d16a)*_0x28a5b3,_0x1a28bf=(_0x341ea7-_0x5b39f1[a0_0x256f('0x177')](_0x2efee6,_0x156e94))/0x2,_0x3f0984=0x0,_0x4e5724=[],_0x418b03=[],_0x3ca3b8=0x1;_0x3ca3b8<_0x25d16a['length']-0x1;_0x3ca3b8++){var _0x3e48a4=_0x5b39f1[a0_0x256f('0x75')](_0x25d16a[_0x3ca3b8-0x1],_0x25d16a[_0x3ca3b8],_0x25d16a[_0x3ca3b8+0x1])/0x2,_0x1ac4c5=(_0x341ea7/0x2-(_0x3f0984+=_0x5b39f1[a0_0x256f('0x177')](_0x25d16a[_0x3ca3b8-0x1],_0x25d16a[_0x3ca3b8]))/_0x4b0e91*_0x1a28bf)/Math['sin'](_0x3e48a4),_0x5cae33=_0x5b39f1[a0_0x256f('0x4ce')](_0x25d16a[_0x3ca3b8-0x1],_0x25d16a[_0x3ca3b8],Math['PI']-_0x3e48a4,_0x1ac4c5,!0x0),_0x4c34b8=_0x5b39f1[a0_0x256f('0x4ce')](_0x25d16a[_0x3ca3b8-0x1],_0x25d16a[_0x3ca3b8],_0x3e48a4,_0x1ac4c5,!0x1);_0x4e5724['push'](_0x5cae33),_0x418b03[a0_0x256f('0x289')](_0x4c34b8);}return _0x4e5724[a0_0x256f('0x318')](_0x418b03);}},{'key':a0_0x256f('0x527'),'value':function(){var _0x2eee57=_0x595e08['parsePolygonCoordToArray'](_0x2b82c2[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]))[0x0],_0x356b57=_0x2eee57[0x0],_0x4f1b8e=_0x2eee57[0x1];_0x5b39f1['isClockWise'](_0x2eee57[0x0],_0x2eee57[0x1],_0x2eee57[0x2])&&(_0x356b57=_0x2eee57[0x1],_0x4f1b8e=_0x2eee57[0x0]);var _0x2c40ff=[_0x5b39f1[a0_0x256f('0x3c6')](_0x356b57,_0x4f1b8e)][a0_0x256f('0x318')](_0x2eee57[a0_0x256f('0x4dd')](0x2)),_0xa217a6=this[a0_0x256f('0x5e8')](_0x2c40ff,_0x356b57,_0x4f1b8e),_0x2fc855=_0xa217a6[0x0],_0x329f4d=_0xa217a6[0x4],_0x227c25=_0x5b39f1[a0_0x256f('0x177')](_0x356b57,_0x4f1b8e)/_0x5b39f1[a0_0x256f('0x607')](_0x2c40ff),_0x438dc5=this[a0_0x256f('0x389')](_0x2c40ff,_0x2fc855,_0x329f4d,_0x227c25),_0x533159=_0x438dc5[a0_0x256f('0x658')],_0x8a4257=[_0x356b57][a0_0x256f('0x318')](_0x438dc5[a0_0x256f('0x4dd')](0x0,_0x533159/0x2));_0x8a4257[a0_0x256f('0x289')](_0x2fc855);var _0x3312aa=[_0x4f1b8e][a0_0x256f('0x318')](_0x438dc5[a0_0x256f('0x4dd')](_0x533159/0x2,_0x533159));return _0x3312aa[a0_0x256f('0x289')](_0x329f4d),_0x8a4257=_0x5b39f1[a0_0x256f('0xfe')](_0x8a4257),_0x3312aa=_0x5b39f1[a0_0x256f('0xfe')](_0x3312aa),new _0x3e3bdf[(a0_0x256f('0x634'))](_0x2b82c2[a0_0x256f('0x1ae')](_0x595e08[a0_0x256f('0x442')](_0x8a4257[a0_0x256f('0x318')](_0xa217a6,_0x3312aa['reverse']()))));}},{'key':a0_0x256f('0x50b'),'set':function(_0x52f124){this[a0_0x256f('0x5d3')]=_0x52f124;},'get':function(){return this['_positions'];}},{'key':a0_0x256f('0x3e3'),'get':function(){return this['_createHierarchy']();}}]),_0x33d6e0;}();function _0x1542e1(_0x3915b5,_0x59d2ab){var _0x1e7fd6=Object[a0_0x256f('0x536')](_0x3915b5);if(Object[a0_0x256f('0x23e')]){var _0x527165=Object['getOwnPropertySymbols'](_0x3915b5);_0x59d2ab&&(_0x527165=_0x527165[a0_0x256f('0x53e')](function(_0x590f2e){return Object[a0_0x256f('0x79')](_0x3915b5,_0x590f2e)['enumerable'];})),_0x1e7fd6[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x1e7fd6,_0x527165);}return _0x1e7fd6;}function _0x2dede0(_0x27d555){for(var _0x15af59=0x1;_0x15af59<arguments[a0_0x256f('0x658')];_0x15af59++){var _0x138043=null!=arguments[_0x15af59]?arguments[_0x15af59]:{};_0x15af59%0x2?_0x1542e1(Object(_0x138043),!0x0)[a0_0x256f('0x218')](function(_0x264797){_0x2baac3()(_0x27d555,_0x264797,_0x138043[_0x264797]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x27d555,Object[a0_0x256f('0x498')](_0x138043)):_0x1542e1(Object(_0x138043))[a0_0x256f('0x218')](function(_0x25c63c){Object[a0_0x256f('0x21f')](_0x27d555,_0x25c63c,Object['getOwnPropertyDescriptor'](_0x138043,_0x25c63c));});}return _0x27d555;}function _0x10fa31(_0x24b634){var _0x3e3099=function(){if('undefined'==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x27d220){return!0x1;}}();return function(){var _0x357c59,_0x3d0570=_0x1f521f()(_0x24b634);if(_0x3e3099){var _0x51eb72=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x357c59=Reflect[a0_0x256f('0x64c')](_0x3d0570,arguments,_0x51eb72);}else _0x357c59=_0x3d0570['apply'](this,arguments);return _0x31d024()(this,_0x357c59);};}var _0x1d0e25=DC[a0_0x256f('0xab')],_0x384990=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0xc5b7a4={'material':_0x384990[a0_0x256f('0x54e')]['YELLOW']['withAlpha'](0.6),'fill':!0x0},_0x1be8fa=function(_0x504c62){_0x38fe39()(_0x38a4ed,_0x504c62);var _0x5cc7ae=_0x10fa31(_0x38a4ed);function _0x38a4ed(_0x67532a,_0x271c28){var _0x5c8b2f;return _0x3c0ba4()(this,_0x38a4ed),(_0x5c8b2f=_0x5cc7ae[a0_0x256f('0x32b')](this,_0x67532a))['_positions']=[],_0x5c8b2f['_floatingAnchor']=void 0x0,_0x5c8b2f[a0_0x256f('0x9b')]=_0x2dede0(_0x2dede0({},_0xc5b7a4),_0x271c28),_0x5c8b2f[a0_0x256f('0x28f')]=new _0x12c6d3(),_0x5c8b2f[a0_0x256f('0xf9')](),_0x5c8b2f;}return _0x6f111f()(_0x38a4ed,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x5e42b7=this;this[a0_0x256f('0x10')]=new _0x384990[(a0_0x256f('0x39d'))]({'polygon':_0x2dede0(_0x2dede0({},this[a0_0x256f('0x9b')]),{},{'hierarchy':new _0x384990[(a0_0x256f('0x420'))](function(){return _0x5e42b7[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x2?(_0x5e42b7[a0_0x256f('0x28f')][a0_0x256f('0x50b')]=_0x5e42b7[a0_0x256f('0x5d3')],_0x5e42b7[a0_0x256f('0x28f')][a0_0x256f('0x3e3')]):null;},!0x1)})}),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':'_mouseClickHandler','value':function(_0x3ad87c){var _0x1efc13=this[a0_0x256f('0x5d3')]['length'];if(0x0===_0x1efc13&&(this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x3ad87c[a0_0x256f('0xbd')]),this[a0_0x256f('0x4ba')](_0x3ad87c[a0_0x256f('0xbd')]),this[a0_0x256f('0x22')]=this[a0_0x256f('0x4ba')](_0x3ad87c[a0_0x256f('0xbd')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x3ad87c[a0_0x256f('0xbd')]),this['_graphics'][a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')],this[a0_0x256f('0x4ba')](_0x3ad87c['surfacePosition']),_0x1efc13>0x2){this[a0_0x256f('0x5d3')][a0_0x256f('0x1bf')](),this['unbindEvent']();var _0x4a8de1=new DC[(a0_0x256f('0x510'))](_0x1d0e25[a0_0x256f('0x292')](this['_positions']));_0x4a8de1[a0_0x256f('0x421')](this[a0_0x256f('0x9b')]),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](_0x4a8de1);}}},{'key':'_mouseMoveHandler','value':function(_0x113862){this['_plot']['viewer'][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x113862[a0_0x256f('0x226')],a0_0x256f('0xb6')),this[a0_0x256f('0x22')]&&(this[a0_0x256f('0x22')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x113862[a0_0x256f('0xbd')]),this[a0_0x256f('0x5d3')]['pop'](),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x113862['surfacePosition']));}}]),_0x38a4ed;}(_0x192a29),_0xc39513=DC,_0x31b904=_0xc39513[a0_0x256f('0xab')],_0x548b96=_0xc39513[a0_0x256f('0x40c')],_0x4425a4=_0xc39513[a0_0x256f('0x20e')],_0x4115ce=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x80fdd3=Math['PI']/0x2,_0xced69=function(){function _0x5a3fef(_0x559b84){_0x3c0ba4()(this,_0x5a3fef),this[a0_0x256f('0x5d3')]=(null==_0x559b84?void 0x0:_0x559b84[a0_0x256f('0x50b')])||[],this[a0_0x256f('0x246')]=0.25,this[a0_0x256f('0x4a')]=0.3,this['neckHeightFactor']=0.85,this['neckWidthFactor']=0.15;}return _0x6f111f()(_0x5a3fef,[{'key':a0_0x256f('0xce'),'value':function(_0x24a9a6,_0x4a06f0,_0x48ee51,_0x2e1612){var _0x44aba1=_0x4425a4[a0_0x256f('0x3c6')](_0x24a9a6,_0x4a06f0),_0x51e1cd=_0x4425a4[a0_0x256f('0x177')](_0x44aba1,_0x48ee51),_0x250ec6=_0x4425a4[a0_0x256f('0x4ce')](_0x48ee51,_0x44aba1,0x0,0.3*_0x51e1cd,!0x0),_0x3bd92e=_0x4425a4[a0_0x256f('0x4ce')](_0x48ee51,_0x44aba1,0x0,0.5*_0x51e1cd,!0x0),_0x20c48c=[_0x44aba1,_0x250ec6=_0x4425a4[a0_0x256f('0x4ce')](_0x44aba1,_0x250ec6,_0x80fdd3,_0x51e1cd/0x5,_0x2e1612),_0x3bd92e=_0x4425a4[a0_0x256f('0x4ce')](_0x44aba1,_0x3bd92e,_0x80fdd3,_0x51e1cd/0x4,_0x2e1612),_0x48ee51],_0x423594=this[a0_0x256f('0x5e8')](_0x20c48c),_0x3b4b9e=_0x423594[0x0],_0x5e3987=_0x423594[0x4],_0xc23a46=_0x4425a4['distance'](_0x24a9a6,_0x4a06f0)/_0x4425a4[a0_0x256f('0x607')](_0x20c48c)/0x2,_0x571da8=this[a0_0x256f('0x389')](_0x20c48c,_0x3b4b9e,_0x5e3987,_0xc23a46),_0x18f451=_0x571da8[a0_0x256f('0x658')],_0x267720=_0x571da8['slice'](0x0,_0x18f451/0x2),_0x387047=_0x571da8[a0_0x256f('0x4dd')](_0x18f451/0x2,_0x18f451);return _0x267720[a0_0x256f('0x289')](_0x3b4b9e),_0x387047['push'](_0x5e3987),(_0x267720=_0x267720[a0_0x256f('0x104')]())[a0_0x256f('0x289')](_0x4a06f0),(_0x387047=_0x387047[a0_0x256f('0x104')]())[a0_0x256f('0x289')](_0x24a9a6),_0x267720[a0_0x256f('0x104')]()[a0_0x256f('0x318')](_0x423594,_0x387047);}},{'key':a0_0x256f('0x5e8'),'value':function(_0x8f3104){var _0x1d776f=_0x4425a4[a0_0x256f('0x607')](_0x8f3104)*this[a0_0x256f('0x246')],_0x66f36b=_0x8f3104[_0x8f3104['length']-0x1],_0x340b3e=_0x1d776f*this[a0_0x256f('0x4a')],_0x3dd5f8=_0x1d776f*this[a0_0x256f('0x519')],_0x520c34=_0x1d776f*this[a0_0x256f('0x5ba')],_0x48357a=_0x4425a4[a0_0x256f('0x4ce')](_0x8f3104[_0x8f3104[a0_0x256f('0x658')]-0x2],_0x66f36b,0x0,_0x1d776f,!0x0),_0x36ad4f=_0x4425a4[a0_0x256f('0x4ce')](_0x8f3104[_0x8f3104[a0_0x256f('0x658')]-0x2],_0x66f36b,0x0,_0x520c34,!0x0),_0x1d5c87=_0x4425a4[a0_0x256f('0x4ce')](_0x66f36b,_0x48357a,_0x80fdd3,_0x340b3e,!0x1),_0x595668=_0x4425a4[a0_0x256f('0x4ce')](_0x66f36b,_0x48357a,_0x80fdd3,_0x340b3e,!0x0);return[_0x4425a4[a0_0x256f('0x4ce')](_0x66f36b,_0x36ad4f,_0x80fdd3,_0x3dd5f8,!0x1),_0x1d5c87,_0x66f36b,_0x595668,_0x4425a4['getThirdPoint'](_0x66f36b,_0x36ad4f,_0x80fdd3,_0x3dd5f8,!0x0)];}},{'key':a0_0x256f('0x389'),'value':function(_0x33b868,_0x4159d5,_0xe02151,_0x1efba7){for(var _0x9a709=_0x4425a4[a0_0x256f('0x123')](_0x33b868),_0x2eadc1=_0x4425a4[a0_0x256f('0x607')](_0x33b868)*_0x1efba7,_0xb70157=(_0x2eadc1-_0x4425a4[a0_0x256f('0x177')](_0x4159d5,_0xe02151))/0x2,_0xd0767e=0x0,_0xd785c2=[],_0x200903=[],_0x4d6ac2=0x1;_0x4d6ac2<_0x33b868[a0_0x256f('0x658')]-0x1;_0x4d6ac2++){var _0x507dba=_0x4425a4[a0_0x256f('0x75')](_0x33b868[_0x4d6ac2-0x1],_0x33b868[_0x4d6ac2],_0x33b868[_0x4d6ac2+0x1])/0x2,_0x12dc2b=(_0x2eadc1/0x2-(_0xd0767e+=_0x4425a4[a0_0x256f('0x177')](_0x33b868[_0x4d6ac2-0x1],_0x33b868[_0x4d6ac2]))/_0x9a709*_0xb70157)/Math['sin'](_0x507dba),_0x200926=_0x4425a4['getThirdPoint'](_0x33b868[_0x4d6ac2-0x1],_0x33b868[_0x4d6ac2],Math['PI']-_0x507dba,_0x12dc2b,!0x0),_0x5eb29f=_0x4425a4['getThirdPoint'](_0x33b868[_0x4d6ac2-0x1],_0x33b868[_0x4d6ac2],_0x507dba,_0x12dc2b,!0x1);_0xd785c2['push'](_0x200926),_0x200903[a0_0x256f('0x289')](_0x5eb29f);}return _0xd785c2[a0_0x256f('0x318')](_0x200903);}},{'key':a0_0x256f('0x1a'),'value':function(_0x24e245,_0x23de1d,_0xd54552){var _0x4a6af7,_0x536b73,_0xc81377,_0x5c1bd5,_0x40369d=_0x4425a4[a0_0x256f('0x3c6')](_0x24e245,_0x23de1d),_0x3f1346=_0x4425a4[a0_0x256f('0x177')](_0x40369d,_0xd54552),_0x5f7aa4=_0x4425a4['getAngleOfThreePoints'](_0x24e245,_0x40369d,_0xd54552);return _0x5f7aa4<_0x80fdd3?(_0x536b73=_0x3f1346*Math[a0_0x256f('0x637')](_0x5f7aa4),_0xc81377=_0x3f1346*Math[a0_0x256f('0x441')](_0x5f7aa4),_0x5c1bd5=_0x4425a4[a0_0x256f('0x4ce')](_0x24e245,_0x40369d,_0x80fdd3,_0x536b73,!0x1),_0x4a6af7=_0x4425a4[a0_0x256f('0x4ce')](_0x40369d,_0x5c1bd5,_0x80fdd3,_0xc81377,!0x0)):_0x5f7aa4>=_0x80fdd3&&_0x5f7aa4<Math['PI']?(_0x536b73=_0x3f1346*Math[a0_0x256f('0x637')](Math['PI']-_0x5f7aa4),_0xc81377=_0x3f1346*Math['cos'](Math['PI']-_0x5f7aa4),_0x5c1bd5=_0x4425a4[a0_0x256f('0x4ce')](_0x24e245,_0x40369d,_0x80fdd3,_0x536b73,!0x1),_0x4a6af7=_0x4425a4[a0_0x256f('0x4ce')](_0x40369d,_0x5c1bd5,_0x80fdd3,_0xc81377,!0x1)):_0x5f7aa4>=Math['PI']&&_0x5f7aa4<1.5*Math['PI']?(_0x536b73=_0x3f1346*Math[a0_0x256f('0x637')](_0x5f7aa4-Math['PI']),_0xc81377=_0x3f1346*Math[a0_0x256f('0x441')](_0x5f7aa4-Math['PI']),_0x5c1bd5=_0x4425a4[a0_0x256f('0x4ce')](_0x24e245,_0x40369d,_0x80fdd3,_0x536b73,!0x0),_0x4a6af7=_0x4425a4[a0_0x256f('0x4ce')](_0x40369d,_0x5c1bd5,_0x80fdd3,_0xc81377,!0x0)):(_0x536b73=_0x3f1346*Math[a0_0x256f('0x637')](0x2*Math['PI']-_0x5f7aa4),_0xc81377=_0x3f1346*Math[a0_0x256f('0x441')](0x2*Math['PI']-_0x5f7aa4),_0x5c1bd5=_0x4425a4['getThirdPoint'](_0x24e245,_0x40369d,_0x80fdd3,_0x536b73,!0x0),_0x4a6af7=_0x4425a4[a0_0x256f('0x4ce')](_0x40369d,_0x5c1bd5,_0x80fdd3,_0xc81377,!0x1)),_0x4a6af7;}},{'key':a0_0x256f('0x527'),'value':function(){var _0x5bf206,_0x13df84,_0x50f10a=this[a0_0x256f('0x5d3')][a0_0x256f('0x658')],_0x578463=void 0x0,_0x5d4b16=void 0x0,_0x17b8d2=_0x548b96[a0_0x256f('0x107')](_0x31b904[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]))[0x0],_0x2c7f77=_0x17b8d2[0x0],_0x1055c9=_0x17b8d2[0x1],_0x47c76f=_0x17b8d2[0x2];_0x578463=0x3===_0x50f10a?this[a0_0x256f('0x1a')](_0x2c7f77,_0x1055c9,_0x47c76f):_0x17b8d2[0x3],_0x5d4b16=0x3===_0x50f10a||0x4===_0x50f10a?_0x4425a4[a0_0x256f('0x3c6')](_0x2c7f77,_0x1055c9):_0x17b8d2[0x4],_0x4425a4[a0_0x256f('0x285')](_0x2c7f77,_0x1055c9,_0x47c76f)?(_0x5bf206=this[a0_0x256f('0xce')](_0x2c7f77,_0x5d4b16,_0x578463,!0x1),_0x13df84=this[a0_0x256f('0xce')](_0x5d4b16,_0x1055c9,_0x47c76f,!0x0)):(_0x5bf206=this[a0_0x256f('0xce')](_0x1055c9,_0x5d4b16,_0x47c76f,!0x1),_0x13df84=this[a0_0x256f('0xce')](_0x5d4b16,_0x2c7f77,_0x578463,!0x0));var _0x45dbce=_0x5bf206[a0_0x256f('0x658')],_0x191f0a=(_0x45dbce-0x5)/0x2,_0x4208e1=_0x5bf206[a0_0x256f('0x4dd')](0x0,_0x191f0a),_0x493241=_0x5bf206[a0_0x256f('0x4dd')](_0x191f0a,_0x191f0a+0x5),_0x211c77=_0x5bf206[a0_0x256f('0x4dd')](_0x191f0a+0x5,_0x45dbce),_0x2f6519=_0x13df84['slice'](0x0,_0x191f0a),_0x2b76d4=_0x13df84[a0_0x256f('0x4dd')](_0x191f0a,_0x191f0a+0x5),_0x3009c1=_0x13df84[a0_0x256f('0x4dd')](_0x191f0a+0x5,_0x45dbce);_0x2f6519=_0x4425a4[a0_0x256f('0x2bd')](_0x2f6519);var _0x404889=_0x4425a4[a0_0x256f('0x2bd')](_0x3009c1[a0_0x256f('0x318')](_0x4208e1[a0_0x256f('0x4dd')](0x1)));return _0x211c77=_0x4425a4[a0_0x256f('0x2bd')](_0x211c77),new _0x4115ce[(a0_0x256f('0x634'))](_0x31b904[a0_0x256f('0x1ae')](_0x548b96['parsePositions'](_0x2f6519[a0_0x256f('0x318')](_0x2b76d4,_0x404889,_0x493241,_0x211c77))));}},{'key':a0_0x256f('0x50b'),'set':function(_0x30a1f8){this[a0_0x256f('0x5d3')]=_0x30a1f8;},'get':function(){return this[a0_0x256f('0x5d3')];}},{'key':a0_0x256f('0x3e3'),'get':function(){return this[a0_0x256f('0x527')]();}}]),_0x5a3fef;}();function _0x47de3c(_0x4e6622,_0x4cc305){var _0x1780d7=Object['keys'](_0x4e6622);if(Object['getOwnPropertySymbols']){var _0x820213=Object[a0_0x256f('0x23e')](_0x4e6622);_0x4cc305&&(_0x820213=_0x820213[a0_0x256f('0x53e')](function(_0x3fc0eb){return Object['getOwnPropertyDescriptor'](_0x4e6622,_0x3fc0eb)[a0_0x256f('0x2ec')];})),_0x1780d7[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x1780d7,_0x820213);}return _0x1780d7;}function _0x4652e8(_0x2954af){for(var _0x1e1f74=0x1;_0x1e1f74<arguments[a0_0x256f('0x658')];_0x1e1f74++){var _0x2a8049=null!=arguments[_0x1e1f74]?arguments[_0x1e1f74]:{};_0x1e1f74%0x2?_0x47de3c(Object(_0x2a8049),!0x0)[a0_0x256f('0x218')](function(_0x27c221){_0x2baac3()(_0x2954af,_0x27c221,_0x2a8049[_0x27c221]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x2954af,Object[a0_0x256f('0x498')](_0x2a8049)):_0x47de3c(Object(_0x2a8049))[a0_0x256f('0x218')](function(_0x27dd0b){Object[a0_0x256f('0x21f')](_0x2954af,_0x27dd0b,Object[a0_0x256f('0x79')](_0x2a8049,_0x27dd0b));});}return _0x2954af;}function _0x9a1820(_0x217e47){var _0x4fa9aa=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x3d62f1){return!0x1;}}();return function(){var _0x1ebe83,_0x5070ec=_0x1f521f()(_0x217e47);if(_0x4fa9aa){var _0x5139d7=_0x1f521f()(this)['constructor'];_0x1ebe83=Reflect[a0_0x256f('0x64c')](_0x5070ec,arguments,_0x5139d7);}else _0x1ebe83=_0x5070ec['apply'](this,arguments);return _0x31d024()(this,_0x1ebe83);};}var _0x39f6c7=DC['Transform'],_0x5d6d17=DC[a0_0x256f('0x3bd')]['Cesium'],_0x217dfb={'material':_0x5d6d17[a0_0x256f('0x54e')][a0_0x256f('0x543')][a0_0x256f('0x2e4')](0.6),'fill':!0x0},_0x1fad7c=function(_0x3eeedc){_0x38fe39()(_0xdba751,_0x3eeedc);var _0x56595c=_0x9a1820(_0xdba751);function _0xdba751(_0x5d6087,_0x586e12){var _0x1a46ba;return _0x3c0ba4()(this,_0xdba751),(_0x1a46ba=_0x56595c[a0_0x256f('0x32b')](this,_0x5d6087))[a0_0x256f('0x5d3')]=[],_0x1a46ba['_floatingAnchor']=void 0x0,_0x1a46ba[a0_0x256f('0x9b')]=_0x4652e8(_0x4652e8({},_0x217dfb),_0x586e12),_0x1a46ba[a0_0x256f('0x28f')]=new _0xced69(),_0x1a46ba[a0_0x256f('0xf9')](),_0x1a46ba;}return _0x6f111f()(_0xdba751,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x25dc3c=this;this[a0_0x256f('0x10')]=new _0x5d6d17[(a0_0x256f('0x39d'))]({'polygon':_0x4652e8(_0x4652e8({},this['_style']),{},{'hierarchy':new _0x5d6d17[(a0_0x256f('0x420'))](function(){return _0x25dc3c[a0_0x256f('0x5d3')]['length']>0x2?(_0x25dc3c['_graphics'][a0_0x256f('0x50b')]=_0x25dc3c[a0_0x256f('0x5d3')],_0x25dc3c[a0_0x256f('0x28f')][a0_0x256f('0x3e3')]):null;},!0x1)})}),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')]['add'](this[a0_0x256f('0x10')]);}},{'key':'_mouseClickHandler','value':function(_0x4fc5fb){var _0x53e473=this[a0_0x256f('0x5d3')]['length'];if(0x0===_0x53e473&&(this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x4fc5fb[a0_0x256f('0xbd')]),this[a0_0x256f('0x4ba')](_0x4fc5fb[a0_0x256f('0xbd')]),this[a0_0x256f('0x22')]=this['createAnchor'](_0x4fc5fb['surfacePosition'])),this[a0_0x256f('0x5d3')]['push'](_0x4fc5fb[a0_0x256f('0xbd')]),this[a0_0x256f('0x28f')][a0_0x256f('0x50b')]=this['_positions'],this[a0_0x256f('0x4ba')](_0x4fc5fb[a0_0x256f('0xbd')]),_0x53e473>0x3){this[a0_0x256f('0x5d3')]['pop'](),this[a0_0x256f('0x210')]();var _0x411b53=new DC[(a0_0x256f('0x12e'))](_0x39f6c7[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]));_0x411b53[a0_0x256f('0x421')](this[a0_0x256f('0x9b')]),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](_0x411b53);}}},{'key':'_mouseMoveHandler','value':function(_0x50832a){this['_plot'][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x50832a[a0_0x256f('0x226')],a0_0x256f('0xb6')),this[a0_0x256f('0x22')]&&(this['_floatingAnchor']['position'][a0_0x256f('0x171')](_0x50832a[a0_0x256f('0xbd')]),this['_positions']['pop'](),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x50832a[a0_0x256f('0xbd')]));}}]),_0xdba751;}(_0x192a29),_0x2b6f33=DC,_0x419d0e=_0x2b6f33[a0_0x256f('0xab')],_0x51123d=_0x2b6f33['Parse'],_0x2540b7=_0x2b6f33[a0_0x256f('0x20e')],_0xb3b074=DC['Namespace'][a0_0x256f('0x224')],_0x216258=Math['PI']/0x2,_0x59827f=function(){function _0x3c5c39(_0x41c7f6){_0x3c0ba4()(this,_0x3c5c39),this[a0_0x256f('0x5d3')]=(null==_0x41c7f6?void 0x0:_0x41c7f6['positions'])||[],this[a0_0x256f('0x385')]=0.15,this[a0_0x256f('0x519')]=0.2,this[a0_0x256f('0x4a')]=0.25,this[a0_0x256f('0x27f')]=Math['PI']/8.5,this[a0_0x256f('0x3cc')]=Math['PI']/0xd;}return _0x6f111f()(_0x3c5c39,[{'key':a0_0x256f('0x527'),'value':function(){var _0x23f437=_0x51123d[a0_0x256f('0x107')](_0x419d0e[a0_0x256f('0x292')](this['_positions']))[0x0],_0x35b19a=_0x23f437[0x0],_0x31fae6=_0x23f437[0x1],_0x4dcff8=_0x2540b7[a0_0x256f('0x607')](_0x23f437),_0x2f8ce1=_0x4dcff8*this[a0_0x256f('0x385')],_0x24884e=_0x4dcff8*this[a0_0x256f('0x519')],_0x57ca83=_0x4dcff8*this[a0_0x256f('0x4a')],_0x4e7d27=_0x2540b7[a0_0x256f('0x4ce')](_0x31fae6,_0x35b19a,_0x216258,_0x2f8ce1,!0x0),_0x44b43c=_0x2540b7[a0_0x256f('0x4ce')](_0x31fae6,_0x35b19a,_0x216258,_0x2f8ce1,!0x1),_0x2d1753=_0x2540b7[a0_0x256f('0x4ce')](_0x35b19a,_0x31fae6,this[a0_0x256f('0x27f')],_0x57ca83,!0x1),_0x54d82f=_0x2540b7[a0_0x256f('0x4ce')](_0x35b19a,_0x31fae6,this[a0_0x256f('0x27f')],_0x57ca83,!0x0),_0x80d2ae=_0x2540b7[a0_0x256f('0x4ce')](_0x35b19a,_0x31fae6,this['neckAngle'],_0x24884e,!0x1),_0x394b33=_0x2540b7[a0_0x256f('0x4ce')](_0x35b19a,_0x31fae6,this[a0_0x256f('0x3cc')],_0x24884e,!0x0);return new _0xb3b074[(a0_0x256f('0x634'))](_0x419d0e[a0_0x256f('0x1ae')](_0x51123d[a0_0x256f('0x442')]([_0x4e7d27,_0x80d2ae,_0x2d1753,_0x31fae6,_0x54d82f,_0x394b33,_0x44b43c])));}},{'key':a0_0x256f('0x50b'),'set':function(_0x263523){this[a0_0x256f('0x5d3')]=_0x263523;},'get':function(){return this[a0_0x256f('0x5d3')];}},{'key':'hierarchy','get':function(){return this[a0_0x256f('0x527')]();}}]),_0x3c5c39;}();function _0x376df0(_0x46efc1,_0x49a3ad){var _0x33564a=Object[a0_0x256f('0x536')](_0x46efc1);if(Object[a0_0x256f('0x23e')]){var _0x318746=Object[a0_0x256f('0x23e')](_0x46efc1);_0x49a3ad&&(_0x318746=_0x318746[a0_0x256f('0x53e')](function(_0x50ec4c){return Object[a0_0x256f('0x79')](_0x46efc1,_0x50ec4c)[a0_0x256f('0x2ec')];})),_0x33564a['push'][a0_0x256f('0x40')](_0x33564a,_0x318746);}return _0x33564a;}function _0x139332(_0x401dbf){for(var _0x4ef510=0x1;_0x4ef510<arguments['length'];_0x4ef510++){var _0x199586=null!=arguments[_0x4ef510]?arguments[_0x4ef510]:{};_0x4ef510%0x2?_0x376df0(Object(_0x199586),!0x0)['forEach'](function(_0x31caaa){_0x2baac3()(_0x401dbf,_0x31caaa,_0x199586[_0x31caaa]);}):Object['getOwnPropertyDescriptors']?Object['defineProperties'](_0x401dbf,Object[a0_0x256f('0x498')](_0x199586)):_0x376df0(Object(_0x199586))[a0_0x256f('0x218')](function(_0x19adbc){Object[a0_0x256f('0x21f')](_0x401dbf,_0x19adbc,Object[a0_0x256f('0x79')](_0x199586,_0x19adbc));});}return _0x401dbf;}function _0x15dc3e(_0x22804f){var _0x2fe0c1=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x2620ee){return!0x1;}}();return function(){var _0x29f78d,_0x28b9c9=_0x1f521f()(_0x22804f);if(_0x2fe0c1){var _0x46fcac=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x29f78d=Reflect[a0_0x256f('0x64c')](_0x28b9c9,arguments,_0x46fcac);}else _0x29f78d=_0x28b9c9[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x29f78d);};}var _0x263603=DC[a0_0x256f('0xab')],_0x477703=DC['Namespace']['Cesium'],_0x1c7490={'material':_0x477703[a0_0x256f('0x54e')][a0_0x256f('0x543')][a0_0x256f('0x2e4')](0.6),'fill':!0x0},_0x1bf18c=function(_0x393f68){_0x38fe39()(_0x1016a1,_0x393f68);var _0x32daa8=_0x15dc3e(_0x1016a1);function _0x1016a1(_0x5f5dfd,_0x329efe){var _0x51dbd6;return _0x3c0ba4()(this,_0x1016a1),(_0x51dbd6=_0x32daa8[a0_0x256f('0x32b')](this,_0x5f5dfd))[a0_0x256f('0x5d3')]=[],_0x51dbd6[a0_0x256f('0x22')]=void 0x0,_0x51dbd6['_style']=_0x139332(_0x139332({},_0x1c7490),_0x329efe),_0x51dbd6[a0_0x256f('0x28f')]=new _0x59827f(),_0x51dbd6[a0_0x256f('0xf9')](),_0x51dbd6;}return _0x6f111f()(_0x1016a1,[{'key':'_mountEntity','value':function(){var _0x384a37=this;this[a0_0x256f('0x10')]=new _0x477703[(a0_0x256f('0x39d'))]({'polygon':_0x139332(_0x139332({},this[a0_0x256f('0x9b')]),{},{'hierarchy':new _0x477703[(a0_0x256f('0x420'))](function(){return _0x384a37[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x1?(_0x384a37[a0_0x256f('0x28f')]['positions']=_0x384a37[a0_0x256f('0x5d3')],_0x384a37[a0_0x256f('0x28f')][a0_0x256f('0x3e3')]):null;},!0x1)})}),this['_plot'][a0_0x256f('0x3a5')]['add'](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0xf5'),'value':function(_0xe72c33){var _0x5aa6a1=this[a0_0x256f('0x5d3')][a0_0x256f('0x658')];if(0x0===_0x5aa6a1&&(this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0xe72c33['surfacePosition']),this['createAnchor'](_0xe72c33[a0_0x256f('0xbd')]),this[a0_0x256f('0x22')]=this[a0_0x256f('0x4ba')](_0xe72c33[a0_0x256f('0xbd')])),this['_positions'][a0_0x256f('0x289')](_0xe72c33[a0_0x256f('0xbd')]),this[a0_0x256f('0x28f')][a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')],this[a0_0x256f('0x4ba')](_0xe72c33['surfacePosition']),_0x5aa6a1>0x1){this[a0_0x256f('0x5d3')][a0_0x256f('0x1bf')](),this['unbindEvent']();var _0x1f14a5=new DC[(a0_0x256f('0x1b8'))](_0x263603[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]));_0x1f14a5['setStyle'](this['_style']),this[a0_0x256f('0x390')]['plotEvent'][a0_0x256f('0x52f')](_0x1f14a5);}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x507681){this['_plot']['viewer'][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x507681[a0_0x256f('0x226')],a0_0x256f('0xb6')),this['_floatingAnchor']&&(this['_floatingAnchor'][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x507681['surfacePosition']),this['_positions'][a0_0x256f('0x1bf')](),this['_positions'][a0_0x256f('0x289')](_0x507681[a0_0x256f('0xbd')]));}}]),_0x1016a1;}(_0x192a29),_0x141760=DC,_0x1733c6=_0x141760[a0_0x256f('0xab')],_0x5b28de=_0x141760[a0_0x256f('0x40c')],_0x30e4fa=_0x141760['PlotUtil'],_0x2eb418=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x49a769=Math['PI']/0x2,_0x50df4d=function(){function _0x5dd6b0(_0x4d131e){_0x3c0ba4()(this,_0x5dd6b0),this[a0_0x256f('0x5d3')]=(null==_0x4d131e?void 0x0:_0x4d131e[a0_0x256f('0x50b')])||[],this['t']=0.4;}return _0x6f111f()(_0x5dd6b0,[{'key':a0_0x256f('0x527'),'value':function(){var _0x3f18d5=_0x5b28de[a0_0x256f('0x107')](_0x1733c6['transformCartesianArrayToWGS84Array'](this[a0_0x256f('0x5d3')]))[0x0];if(0x2===this['_positions'][a0_0x256f('0x658')]){var _0x46e1d4=_0x30e4fa[a0_0x256f('0x3c6')](_0x3f18d5[0x0],_0x3f18d5[0x1]),_0x45e7f8=_0x30e4fa['distance'](_0x3f18d5[0x0],_0x46e1d4)/0.9,_0x381805=_0x30e4fa[a0_0x256f('0x4ce')](_0x3f18d5[0x0],_0x46e1d4,_0x49a769,_0x45e7f8,!0x0);_0x3f18d5=[_0x3f18d5[0x0],_0x381805,_0x3f18d5[0x1]];}var _0x40572f=DC[a0_0x256f('0x20e')][a0_0x256f('0x3c6')](_0x3f18d5[0x0],_0x3f18d5[0x2]);_0x3f18d5[a0_0x256f('0x289')](_0x40572f,_0x3f18d5[0x0],_0x3f18d5[0x1]);for(var _0x3879ba=[],_0x7f1588=0x0;_0x7f1588<_0x3f18d5[a0_0x256f('0x658')]-0x2;_0x7f1588++){var _0x5b610f=_0x3f18d5[_0x7f1588],_0x28b024=_0x3f18d5[_0x7f1588+0x1],_0xeacee=_0x3f18d5[_0x7f1588+0x2],_0x522ed4=_0x30e4fa[a0_0x256f('0x45c')](this['t'],_0x5b610f,_0x28b024,_0xeacee);_0x3879ba=_0x3879ba['concat'](_0x522ed4);}var _0x1a5f85=_0x3879ba['length'];_0x3879ba=[_0x3879ba[_0x1a5f85-0x1]][a0_0x256f('0x318')](_0x3879ba['slice'](0x0,_0x1a5f85-0x1));for(var _0x5b0394=[],_0x47b002=0x0;_0x47b002<_0x3f18d5[a0_0x256f('0x658')]-0x2;_0x47b002++){var _0x4c5115=_0x3f18d5[_0x47b002],_0x39d585=_0x3f18d5[_0x47b002+0x1];_0x5b0394[a0_0x256f('0x289')](_0x4c5115);for(var _0x2e8d30=0x0;_0x2e8d30<=0x64;_0x2e8d30++){var _0x4bf5a6=_0x30e4fa[a0_0x256f('0x1ce')](_0x2e8d30/0x64,_0x4c5115,_0x3879ba[0x2*_0x47b002],_0x3879ba[0x2*_0x47b002+0x1],_0x39d585);_0x5b0394[a0_0x256f('0x289')](_0x4bf5a6);}_0x5b0394[a0_0x256f('0x289')](_0x39d585);}return new _0x2eb418['PolygonHierarchy'](_0x1733c6['transformWGS84ArrayToCartesianArray'](_0x5b28de[a0_0x256f('0x442')](_0x5b0394)));}},{'key':a0_0x256f('0x50b'),'set':function(_0x433a6c){this[a0_0x256f('0x5d3')]=_0x433a6c;},'get':function(){return this[a0_0x256f('0x5d3')];}},{'key':a0_0x256f('0x3e3'),'get':function(){return this[a0_0x256f('0x527')]();}}]),_0x5dd6b0;}();function _0x220af5(_0x16a44b,_0x21c660){var _0x3b9801=Object['keys'](_0x16a44b);if(Object[a0_0x256f('0x23e')]){var _0x53a7c7=Object['getOwnPropertySymbols'](_0x16a44b);_0x21c660&&(_0x53a7c7=_0x53a7c7[a0_0x256f('0x53e')](function(_0x5a504c){return Object[a0_0x256f('0x79')](_0x16a44b,_0x5a504c)[a0_0x256f('0x2ec')];})),_0x3b9801[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x3b9801,_0x53a7c7);}return _0x3b9801;}function _0x81f17a(_0x281a31){for(var _0x2f3d4d=0x1;_0x2f3d4d<arguments[a0_0x256f('0x658')];_0x2f3d4d++){var _0x5926ad=null!=arguments[_0x2f3d4d]?arguments[_0x2f3d4d]:{};_0x2f3d4d%0x2?_0x220af5(Object(_0x5926ad),!0x0)[a0_0x256f('0x218')](function(_0x30c082){_0x2baac3()(_0x281a31,_0x30c082,_0x5926ad[_0x30c082]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x256f('0x3d9')](_0x281a31,Object[a0_0x256f('0x498')](_0x5926ad)):_0x220af5(Object(_0x5926ad))[a0_0x256f('0x218')](function(_0x5ab065){Object[a0_0x256f('0x21f')](_0x281a31,_0x5ab065,Object[a0_0x256f('0x79')](_0x5926ad,_0x5ab065));});}return _0x281a31;}function _0x50ec12(_0x375624){var _0x11d061=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0xb4aeda){return!0x1;}}();return function(){var _0x3ec92b,_0xcaf072=_0x1f521f()(_0x375624);if(_0x11d061){var _0x257aa3=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x3ec92b=Reflect[a0_0x256f('0x64c')](_0xcaf072,arguments,_0x257aa3);}else _0x3ec92b=_0xcaf072[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x3ec92b);};}var _0x2f5600=DC['Transform'],_0x64f00=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x47e17e={'material':_0x64f00[a0_0x256f('0x54e')][a0_0x256f('0x543')][a0_0x256f('0x2e4')](0.6),'fill':!0x0},_0x6459d=function(_0x364c81){_0x38fe39()(_0x5ba012,_0x364c81);var _0x2a8511=_0x50ec12(_0x5ba012);function _0x5ba012(_0x3d6c33,_0xf6aaa){var _0x340069;return _0x3c0ba4()(this,_0x5ba012),(_0x340069=_0x2a8511[a0_0x256f('0x32b')](this,_0x3d6c33))[a0_0x256f('0x5d3')]=[],_0x340069[a0_0x256f('0x22')]=void 0x0,_0x340069[a0_0x256f('0x9b')]=_0x81f17a(_0x81f17a({},_0x47e17e),_0xf6aaa),_0x340069['_graphics']=new _0x50df4d(),_0x340069['_mountEntity'](),_0x340069;}return _0x6f111f()(_0x5ba012,[{'key':'_mountEntity','value':function(){var _0x1e1590=this;this['_delegate']=new _0x64f00['Entity']({'polygon':_0x81f17a(_0x81f17a({},this[a0_0x256f('0x9b')]),{},{'hierarchy':new _0x64f00[(a0_0x256f('0x420'))](function(){return _0x1e1590['_positions'][a0_0x256f('0x658')]>0x1?(_0x1e1590[a0_0x256f('0x28f')][a0_0x256f('0x50b')]=_0x1e1590[a0_0x256f('0x5d3')],_0x1e1590[a0_0x256f('0x28f')][a0_0x256f('0x3e3')]):null;},!0x1)})}),this['_plot']['overlayLayer'][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0xf5'),'value':function(_0x43eda8){var _0x12df17=this['_positions'][a0_0x256f('0x658')];if(0x0===_0x12df17&&(this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x43eda8[a0_0x256f('0xbd')]),this['createAnchor'](_0x43eda8[a0_0x256f('0xbd')]),this['_floatingAnchor']=this['createAnchor'](_0x43eda8[a0_0x256f('0xbd')])),this['_positions'][a0_0x256f('0x289')](_0x43eda8[a0_0x256f('0xbd')]),this['_graphics'][a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')],this[a0_0x256f('0x4ba')](_0x43eda8['surfacePosition']),_0x12df17>0x2){this[a0_0x256f('0x5d3')][a0_0x256f('0x1bf')](),this['unbindEvent']();var _0x3e8754=new DC[(a0_0x256f('0xde'))](_0x2f5600['transformCartesianArrayToWGS84Array'](this[a0_0x256f('0x5d3')]));_0x3e8754[a0_0x256f('0x421')](this['_style']),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')]['raiseEvent'](_0x3e8754);}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x41be74){this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x41be74['windowPosition'],a0_0x256f('0xb6')),this[a0_0x256f('0x22')]&&(this['_floatingAnchor'][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x41be74[a0_0x256f('0xbd')]),this['_positions'][a0_0x256f('0x1bf')](),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x41be74[a0_0x256f('0xbd')]));}}]),_0x5ba012;}(_0x192a29);function _0x30e8f9(_0x534f32){var _0x5de028=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString']['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x322dd0){return!0x1;}}();return function(){var _0x32f280,_0x3e18c5=_0x1f521f()(_0x534f32);if(_0x5de028){var _0x523308=_0x1f521f()(this)['constructor'];_0x32f280=Reflect[a0_0x256f('0x64c')](_0x3e18c5,arguments,_0x523308);}else _0x32f280=_0x3e18c5[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x32f280);};}var _0x14e5f9=DC,_0x2fa350=_0x14e5f9[a0_0x256f('0xab')],_0x170c64=_0x14e5f9['Parse'],_0x488fc7=_0x14e5f9[a0_0x256f('0x20e')],_0x5ade6f=DC['Namespace'][a0_0x256f('0x224')],_0x5c14d6=function(_0x410ba1){_0x38fe39()(_0x423656,_0x410ba1);var _0xfb95d0=_0x30e8f9(_0x423656);function _0x423656(_0x3256f5){var _0x184857;return _0x3c0ba4()(this,_0x423656),(_0x184857=_0xfb95d0[a0_0x256f('0x32b')](this,_0x3256f5))[a0_0x256f('0x246')]=0.18,_0x184857[a0_0x256f('0x4a')]=0.3,_0x184857['neckHeightFactor']=0.85,_0x184857[a0_0x256f('0x519')]=0.15,_0x184857['tailWidthFactor']=0.1,_0x184857[a0_0x256f('0x33a')]=0.8,_0x184857['swallowTailFactor']=0x1,_0x184857;}return _0x6f111f()(_0x423656,[{'key':'_createHierarchy','value':function(){var _0x59a495=_0x170c64['parsePolygonCoordToArray'](_0x2fa350[a0_0x256f('0x292')](this['_positions']))[0x0],_0x3b3481=_0x59a495[0x0],_0x5cdfce=_0x59a495[0x1];_0x488fc7[a0_0x256f('0x285')](_0x59a495[0x0],_0x59a495[0x1],_0x59a495[0x2])&&(_0x3b3481=_0x59a495[0x1],_0x5cdfce=_0x59a495[0x0]);var _0x11db8e=[_0x488fc7[a0_0x256f('0x3c6')](_0x3b3481,_0x5cdfce)][a0_0x256f('0x318')](_0x59a495[a0_0x256f('0x4dd')](0x2)),_0x3428ee=this['_getArrowHeadPoints'](_0x11db8e,_0x3b3481,_0x5cdfce),_0x5b09f4=_0x3428ee[0x0],_0x52fccd=_0x3428ee[0x4],_0x6a340=_0x488fc7[a0_0x256f('0x177')](_0x3b3481,_0x5cdfce),_0x52bc9c=_0x488fc7[a0_0x256f('0x607')](_0x11db8e),_0x38f882=_0x52bc9c*this['tailWidthFactor']*this[a0_0x256f('0x22b')],_0x50949e=_0x488fc7[a0_0x256f('0x4ce')](_0x11db8e[0x1],_0x11db8e[0x0],0x0,_0x38f882,!0x0),_0x5d9dc4=_0x6a340/_0x52bc9c,_0x306c5f=this[a0_0x256f('0x389')](_0x11db8e,_0x5b09f4,_0x52fccd,_0x5d9dc4),_0x2e417d=_0x306c5f[a0_0x256f('0x658')],_0x143184=[_0x3b3481]['concat'](_0x306c5f[a0_0x256f('0x4dd')](0x0,_0x2e417d/0x2));_0x143184[a0_0x256f('0x289')](_0x5b09f4);var _0x3a706c=[_0x5cdfce][a0_0x256f('0x318')](_0x306c5f[a0_0x256f('0x4dd')](_0x2e417d/0x2,_0x2e417d));return _0x3a706c[a0_0x256f('0x289')](_0x52fccd),_0x143184=_0x488fc7[a0_0x256f('0xfe')](_0x143184),_0x3a706c=_0x488fc7['getQBSplinePoints'](_0x3a706c),new _0x5ade6f[(a0_0x256f('0x634'))](_0x2fa350[a0_0x256f('0x1ae')](_0x170c64[a0_0x256f('0x442')](_0x143184[a0_0x256f('0x318')](_0x3428ee,_0x3a706c[a0_0x256f('0x104')](),[_0x50949e,_0x143184[0x0]]))));}}]),_0x423656;}(_0x12c6d3);function _0x5e32d2(_0x5cef94,_0x1e6c95){var _0x30b2ab=Object[a0_0x256f('0x536')](_0x5cef94);if(Object[a0_0x256f('0x23e')]){var _0x1178b2=Object[a0_0x256f('0x23e')](_0x5cef94);_0x1e6c95&&(_0x1178b2=_0x1178b2[a0_0x256f('0x53e')](function(_0x7f781a){return Object[a0_0x256f('0x79')](_0x5cef94,_0x7f781a)[a0_0x256f('0x2ec')];})),_0x30b2ab[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x30b2ab,_0x1178b2);}return _0x30b2ab;}function _0x3ba81b(_0x3fda42){for(var _0x2070e5=0x1;_0x2070e5<arguments['length'];_0x2070e5++){var _0x1b438c=null!=arguments[_0x2070e5]?arguments[_0x2070e5]:{};_0x2070e5%0x2?_0x5e32d2(Object(_0x1b438c),!0x0)['forEach'](function(_0x4e2bd1){_0x2baac3()(_0x3fda42,_0x4e2bd1,_0x1b438c[_0x4e2bd1]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x3fda42,Object[a0_0x256f('0x498')](_0x1b438c)):_0x5e32d2(Object(_0x1b438c))[a0_0x256f('0x218')](function(_0x96c31e){Object[a0_0x256f('0x21f')](_0x3fda42,_0x96c31e,Object[a0_0x256f('0x79')](_0x1b438c,_0x96c31e));});}return _0x3fda42;}function _0x3f31fb(_0x330763){var _0x4e3f83=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0xcf244d){return!0x1;}}();return function(){var _0x221014,_0x24597c=_0x1f521f()(_0x330763);if(_0x4e3f83){var _0x570545=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x221014=Reflect['construct'](_0x24597c,arguments,_0x570545);}else _0x221014=_0x24597c[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x221014);};}var _0x33046f=DC['Transform'],_0x5d4670=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5189b4={'material':_0x5d4670[a0_0x256f('0x54e')][a0_0x256f('0x543')]['withAlpha'](0.6),'fill':!0x0},_0x2594c5=function(_0x4e835c){_0x38fe39()(_0x24b75d,_0x4e835c);var _0x3bc071=_0x3f31fb(_0x24b75d);function _0x24b75d(_0x5eefa4,_0xb835d2){var _0x35651b;return _0x3c0ba4()(this,_0x24b75d),(_0x35651b=_0x3bc071[a0_0x256f('0x32b')](this,_0x5eefa4))[a0_0x256f('0x5d3')]=[],_0x35651b[a0_0x256f('0x22')]=void 0x0,_0x35651b[a0_0x256f('0x9b')]=_0x3ba81b(_0x3ba81b({},_0x5189b4),_0xb835d2),_0x35651b[a0_0x256f('0x28f')]=new _0x5c14d6(),_0x35651b[a0_0x256f('0xf9')](),_0x35651b;}return _0x6f111f()(_0x24b75d,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x123ed2=this;this['_delegate']=new _0x5d4670[(a0_0x256f('0x39d'))]({'polygon':_0x3ba81b(_0x3ba81b({},this['_style']),{},{'hierarchy':new _0x5d4670[(a0_0x256f('0x420'))](function(){return _0x123ed2[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x2?(_0x123ed2[a0_0x256f('0x28f')][a0_0x256f('0x50b')]=_0x123ed2[a0_0x256f('0x5d3')],_0x123ed2[a0_0x256f('0x28f')][a0_0x256f('0x3e3')]):null;},!0x1)})}),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':'_mouseClickHandler','value':function(_0x4d419b){var _0x200359=this['_positions']['length'];if(0x0===_0x200359&&(this[a0_0x256f('0x5d3')]['push'](_0x4d419b['surfacePosition']),this[a0_0x256f('0x4ba')](_0x4d419b['surfacePosition']),this['_floatingAnchor']=this[a0_0x256f('0x4ba')](_0x4d419b[a0_0x256f('0xbd')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x4d419b['surfacePosition']),this['_graphics'][a0_0x256f('0x50b')]=this[a0_0x256f('0x5d3')],this['createAnchor'](_0x4d419b[a0_0x256f('0xbd')]),_0x200359>0x2){this[a0_0x256f('0x5d3')][a0_0x256f('0x1bf')](),this[a0_0x256f('0x210')]();var _0x4dbde1=new DC[(a0_0x256f('0x22c'))](_0x33046f[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]));_0x4dbde1[a0_0x256f('0x421')](this['_style']),this[a0_0x256f('0x390')][a0_0x256f('0x5b6')]['raiseEvent'](_0x4dbde1);}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x21a812){this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x21a812['windowPosition'],a0_0x256f('0xb6')),this[a0_0x256f('0x22')]&&(this[a0_0x256f('0x22')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x21a812[a0_0x256f('0xbd')]),this['_positions']['pop'](),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x21a812[a0_0x256f('0xbd')]));}}]),_0x24b75d;}(_0x192a29),_0x535830=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x3de9d4=function(){function _0x3e0df6(_0x4e0c37){_0x3c0ba4()(this,_0x3e0df6),this[a0_0x256f('0x390')]=_0x4e0c37,this[a0_0x256f('0x3ea')]=void 0x0,this['_anchors']=[],this[a0_0x256f('0x10')]=void 0x0,this['_pickedAnchor']=void 0x0,this[a0_0x256f('0x1c6')]=!0x1;}return _0x6f111f()(_0x3e0df6,[{'key':a0_0x256f('0xf9'),'value':function(){}},{'key':a0_0x256f('0x2db'),'value':function(){}},{'key':a0_0x256f('0xf5'),'value':function(_0xb193a7){}},{'key':a0_0x256f('0x5cf'),'value':function(_0xdbe551){}},{'key':a0_0x256f('0x18a'),'value':function(_0xace99){}},{'key':'bindEvent','value':function(){this[a0_0x256f('0x390')][a0_0x256f('0x488')]['on'](_0x535830['ScreenSpaceEventType'][a0_0x256f('0x3d8')],this['_mouseClickHandler'],this),this['_plot']['viewer']['on'](_0x535830[a0_0x256f('0xf8')][a0_0x256f('0x37b')],this[a0_0x256f('0x5cf')],this),this['_plot'][a0_0x256f('0x488')]['on'](_0x535830[a0_0x256f('0xf8')][a0_0x256f('0x6e')],this['_mouseRightClickHandler'],this);}},{'key':a0_0x256f('0x210'),'value':function(){this['_plot']['viewer'][a0_0x256f('0x2e2')](_0x535830[a0_0x256f('0xf8')]['LEFT_CLICK'],this[a0_0x256f('0xf5')],this),this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x2e2')](_0x535830[a0_0x256f('0xf8')][a0_0x256f('0x37b')],this[a0_0x256f('0x5cf')],this),this[a0_0x256f('0x390')]['viewer']['off'](_0x535830['ScreenSpaceEventType'][a0_0x256f('0x6e')],this[a0_0x256f('0x18a')],this);}},{'key':'createAnchor','value':function(_0x11c361,_0x2731a3){var _0x77860a=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]&&arguments[0x2],_0x15028f=arguments[a0_0x256f('0x658')]>0x3&&void 0x0!==arguments[0x3]&&arguments[0x3],_0x59a2ba=_0x77860a?this[a0_0x256f('0x390')]['options']['icon_midAnchor']:_0x15028f?this[a0_0x256f('0x390')][a0_0x256f('0x2eb')][a0_0x256f('0x341')]:this['_plot'][a0_0x256f('0x2eb')][a0_0x256f('0x41b')],_0x7caa37=this[a0_0x256f('0x390')]['anchorLayer']['add']({'position':_0x11c361,'billboard':{'image':_0x59a2ba,'width':0xc,'height':0xc,'eyeOffset':new _0x535830[(a0_0x256f('0x3d4'))](new _0x535830[(a0_0x256f('0x534'))](0x0,0x0,-0x1f4)),'heightReference':this[a0_0x256f('0x390')]['viewer'][a0_0x256f('0x2b0')]['mode']===_0x535830['SceneMode']['SCENE3D']?_0x535830[a0_0x256f('0x4b3')][a0_0x256f('0x5c2')]:_0x535830[a0_0x256f('0x4b3')][a0_0x256f('0x4eb')]},'properties':{'isMid':_0x77860a,'index':_0x2731a3}});this['_anchors']['push'](_0x7caa37);}},{'key':a0_0x256f('0x7e'),'value':function(_0x41b1ca,_0x4eef02){var _0x5f509d=_0x535830['Ellipsoid'][a0_0x256f('0x1ca')]['cartesianToCartographic'](_0x41b1ca),_0x2bc192=_0x535830[a0_0x256f('0x22d')][a0_0x256f('0x1ca')][a0_0x256f('0x228')](_0x4eef02),_0x1e1a56=new _0x535830[(a0_0x256f('0x4c6'))](_0x5f509d,_0x2bc192)[a0_0x256f('0x630')](0.5);return _0x535830[a0_0x256f('0x22d')][a0_0x256f('0x1ca')]['cartographicToCartesian'](_0x1e1a56);}},{'key':a0_0x256f('0x8c'),'value':function(){this[a0_0x256f('0x393')]();}}]),_0x3e0df6;}();function _0x58a4e7(_0x4eb26b){var _0x579956=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x157555){return!0x1;}}();return function(){var _0x15f31c,_0x254c91=_0x1f521f()(_0x4eb26b);if(_0x579956){var _0x4b2e23=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x15f31c=Reflect[a0_0x256f('0x64c')](_0x254c91,arguments,_0x4b2e23);}else _0x15f31c=_0x254c91[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x15f31c);};}var _0x29f119=DC['Transform'],_0x3d46c2=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x1b11bb=function(_0x1644b0){_0x38fe39()(_0x9e1f3,_0x1644b0);var _0x10b41c=_0x58a4e7(_0x9e1f3);function _0x9e1f3(_0x407363,_0x100a4){var _0x2b4268;return _0x3c0ba4()(this,_0x9e1f3),(_0x2b4268=_0x10b41c[a0_0x256f('0x32b')](this,_0x407363))['_overlay']=_0x100a4,_0x2b4268[a0_0x256f('0x666')]=void 0x0,_0x2b4268['_mountEntity'](),_0x2b4268;}return _0x6f111f()(_0x9e1f3,[{'key':'_mountEntity','value':function(){var _0x55ab36=this;this[a0_0x256f('0x10')]=new _0x3d46c2['Entity'](),this['_delegate']['merge'](this['_overlay'][a0_0x256f('0x64a')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this['_position']=this[a0_0x256f('0x10')]['position'][a0_0x256f('0x21b')](_0x3d46c2['JulianDate'][a0_0x256f('0x2c9')]()),this[a0_0x256f('0x10')][a0_0x256f('0x13c')]=new _0x3d46c2['CallbackProperty'](function(){return _0x55ab36[a0_0x256f('0x666')];}),this[a0_0x256f('0x390')]['overlayLayer'][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x5cf'),'value':function(_0xe2c242){this[a0_0x256f('0x390')][a0_0x256f('0x488')]['tooltip'][a0_0x256f('0xf2')](_0xe2c242['windowPosition'],a0_0x256f('0x503')),this[a0_0x256f('0x666')]=_0xe2c242['surfacePosition'];}},{'key':'_mouseRightClickHandler','value':function(_0x19535c){this[a0_0x256f('0x210')](),this[a0_0x256f('0x3ea')]['position']=_0x29f119[a0_0x256f('0x31a')](this[a0_0x256f('0x666')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](this[a0_0x256f('0x3ea')]);}}]),_0x9e1f3;}(_0x3de9d4);function _0x5185db(_0x589f00){var _0x2b33f5=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x5988e7){return!0x1;}}();return function(){var _0x3067ff,_0x1ac7d1=_0x1f521f()(_0x589f00);if(_0x2b33f5){var _0x450e1d=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x3067ff=Reflect[a0_0x256f('0x64c')](_0x1ac7d1,arguments,_0x450e1d);}else _0x3067ff=_0x1ac7d1['apply'](this,arguments);return _0x31d024()(this,_0x3067ff);};}var _0x99ab37=DC[a0_0x256f('0xab')],_0x2d0509=DC[a0_0x256f('0x3bd')]['Cesium'],_0x1de953=function(_0x2f2b61){_0x38fe39()(_0x598e24,_0x2f2b61);var _0x170cbf=_0x5185db(_0x598e24);function _0x598e24(_0xc3edff,_0x592089){var _0xf97e34;return _0x3c0ba4()(this,_0x598e24),(_0xf97e34=_0x170cbf[a0_0x256f('0x32b')](this,_0xc3edff))[a0_0x256f('0x3ea')]=_0x592089,_0xf97e34[a0_0x256f('0x5d3')]=[],_0xf97e34[a0_0x256f('0xf9')](),_0xf97e34[a0_0x256f('0x2db')](),_0xf97e34;}return _0x6f111f()(_0x598e24,[{'key':a0_0x256f('0xf9'),'value':function(){var _0xaecc88=this;this['_delegate']=new _0x2d0509[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x10')][a0_0x256f('0x3f4')](this[a0_0x256f('0x3ea')][a0_0x256f('0x64a')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this['_delegate']['polyline'][a0_0x256f('0x50b')]=new _0x2d0509[(a0_0x256f('0x420'))](function(){return _0xaecc88[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x1?_0xaecc88[a0_0x256f('0x5d3')]:null;},!0x1),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':'_mountAnchor','value':function(){for(var _0x16ff72=this,_0x5f1d68=[][a0_0x256f('0x318')](this[a0_0x256f('0x3ea')]['delegate'][a0_0x256f('0x18d')]['positions'][a0_0x256f('0x21b')](_0x2d0509[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]())),_0x4a0749=0x0;_0x4a0749<_0x5f1d68[a0_0x256f('0x658')]-0x1;_0x4a0749++){var _0x5e00c9=this[a0_0x256f('0x7e')](_0x5f1d68[_0x4a0749],_0x5f1d68[_0x4a0749+0x1]);this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x5f1d68[_0x4a0749]),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x5e00c9);}this[a0_0x256f('0x5d3')]['push'](_0x5f1d68[_0x5f1d68['length']-0x1]),this['_positions']['forEach'](function(_0x48394d,_0x50807a){_0x16ff72[a0_0x256f('0x4ba')](_0x48394d,_0x50807a,_0x50807a%0x2!=0x0);});}},{'key':a0_0x256f('0xf5'),'value':function(_0x4f948a){var _0x3647ec=this;if(this[a0_0x256f('0x1c6')]){if(this['_isMoving']=!0x1,this['_pickedAnchor']&&this[a0_0x256f('0x19c')]['position']){this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]['setValue'](_0x4f948a[a0_0x256f('0xbd')]);var _0x21c1a1=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x2d0509[a0_0x256f('0x29c')]['now']());if(_0x21c1a1[a0_0x256f('0x461')]){var _0x5da4fc=this[a0_0x256f('0x7e')](this[a0_0x256f('0x5d3')][_0x21c1a1['index']],this[a0_0x256f('0x5d3')][_0x21c1a1[a0_0x256f('0x27e')]-0x1]),_0xe0a50e=this['computeMidPosition'](this['_positions'][_0x21c1a1[a0_0x256f('0x27e')]],this[a0_0x256f('0x5d3')][_0x21c1a1[a0_0x256f('0x27e')]+0x1]);this['_plot'][a0_0x256f('0x32f')]['removeAll'](),this[a0_0x256f('0x10b')]=[],this[a0_0x256f('0x5d3')][a0_0x256f('0x1a8')](_0x21c1a1[a0_0x256f('0x27e')],0x1,_0x5da4fc,_0x4f948a[a0_0x256f('0xbd')],_0xe0a50e),this[a0_0x256f('0x5d3')][a0_0x256f('0x218')](function(_0x1ff28b,_0x5c0ff9){_0x3647ec[a0_0x256f('0x4ba')](_0x1ff28b,_0x5c0ff9,_0x5c0ff9%0x2!=0x0);});}}}else{if(this[a0_0x256f('0x1c6')]=!0x0,!_0x4f948a[a0_0x256f('0x58f')]['id'])return!0x1;this['_pickedAnchor']=_0x4f948a[a0_0x256f('0x58f')]['id'];}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x1ccfe8){if(this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x1ccfe8[a0_0x256f('0x226')],a0_0x256f('0x243')),this[a0_0x256f('0x1c6')]&&this['_pickedAnchor']&&this[a0_0x256f('0x19c')]['position']){var _0x3025d6=this['_pickedAnchor'][a0_0x256f('0x624')]['getValue'](_0x2d0509[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]());if(this[a0_0x256f('0x19c')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x1ccfe8[a0_0x256f('0xbd')]),this[a0_0x256f('0x5d3')][_0x3025d6[a0_0x256f('0x27e')]]=_0x1ccfe8['surfacePosition'],!_0x3025d6[a0_0x256f('0x461')]){var _0x2f41f0=_0x3025d6[a0_0x256f('0x27e')],_0xd94fda=-0x1,_0x391fd6=-0x1,_0x5d3179=-0x1,_0x30baa0=-0x1,_0x276d01=this[a0_0x256f('0x5d3')][a0_0x256f('0x658')];if(0x0===_0x2f41f0?(_0x5d3179=_0x2f41f0+0x2,_0x30baa0=_0x2f41f0+0x1):_0x3025d6[a0_0x256f('0x27e')]===_0x276d01-0x1?(_0xd94fda=_0x2f41f0-0x2,_0x391fd6=_0x2f41f0-0x1):(_0xd94fda=_0x2f41f0-0x2,_0x391fd6=_0x2f41f0-0x1,_0x5d3179=_0x2f41f0+0x2,_0x30baa0=_0x2f41f0+0x1),_0xd94fda>0x0){var _0x681236=this[a0_0x256f('0x7e')](this[a0_0x256f('0x5d3')][_0xd94fda],this[a0_0x256f('0x5d3')][_0x2f41f0]);this[a0_0x256f('0x5d3')][_0x391fd6]=_0x681236,this['_anchors'][_0x391fd6]['position'][a0_0x256f('0x171')](_0x681236);}if(_0x5d3179>0x0){var _0x37c2b4=this[a0_0x256f('0x7e')](this[a0_0x256f('0x5d3')][_0x5d3179],this[a0_0x256f('0x5d3')][_0x2f41f0]);this[a0_0x256f('0x5d3')][_0x30baa0]=_0x37c2b4,this[a0_0x256f('0x10b')][_0x30baa0][a0_0x256f('0x13c')]['setValue'](_0x37c2b4);}}}}},{'key':'_mouseRightClickHandler','value':function(_0x47905f){this['unbindEvent'](),this['_overlay'][a0_0x256f('0x50b')]=_0x99ab37[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](this[a0_0x256f('0x3ea')]);}}]),_0x598e24;}(_0x3de9d4);function _0x44be20(_0x1395a6){var _0x2af267=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x48d177){return!0x1;}}();return function(){var _0x457589,_0x49ced4=_0x1f521f()(_0x1395a6);if(_0x2af267){var _0x19fde7=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x457589=Reflect['construct'](_0x49ced4,arguments,_0x19fde7);}else _0x457589=_0x49ced4[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x457589);};}var _0x3df441=DC[a0_0x256f('0xab')],_0x5aa63a=DC['Namespace']['Cesium'],_0x27681a=function(_0x19e731){_0x38fe39()(_0x44a09c,_0x19e731);var _0x7f2088=_0x44be20(_0x44a09c);function _0x44a09c(_0x4c3361,_0x1d8d19){var _0x3a414c;return _0x3c0ba4()(this,_0x44a09c),(_0x3a414c=_0x7f2088[a0_0x256f('0x32b')](this,_0x4c3361))['_overlay']=_0x1d8d19,_0x3a414c[a0_0x256f('0x5d3')]=[],_0x3a414c[a0_0x256f('0xf9')](),_0x3a414c['_mountAnchor'](),_0x3a414c;}return _0x6f111f()(_0x44a09c,[{'key':'_mountEntity','value':function(){var _0x57a56c=this;this['_delegate']=new _0x5aa63a[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x10')]['merge'](this[a0_0x256f('0x3ea')][a0_0x256f('0x64a')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this[a0_0x256f('0x10')][a0_0x256f('0x493')][a0_0x256f('0x3e3')]=new _0x5aa63a[(a0_0x256f('0x420'))](function(_0x19efbe){return _0x57a56c[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x2?new _0x5aa63a[(a0_0x256f('0x634'))](_0x57a56c[a0_0x256f('0x5d3')]):null;},!0x1),this[a0_0x256f('0x390')]['overlayLayer'][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x2db'),'value':function(){var _0xa41e57=this,_0x3ccaad=[]['concat'](this[a0_0x256f('0x3ea')][a0_0x256f('0x64a')][a0_0x256f('0x493')][a0_0x256f('0x3e3')][a0_0x256f('0x21b')](_0x5aa63a[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]())[a0_0x256f('0x50b')]);_0x3ccaad[a0_0x256f('0x289')](_0x3ccaad[0x0]);for(var _0x498dfb=0x0;_0x498dfb<_0x3ccaad[a0_0x256f('0x658')]-0x1;_0x498dfb++){var _0x18d399=this[a0_0x256f('0x7e')](_0x3ccaad[_0x498dfb],_0x3ccaad[_0x498dfb+0x1]);this[a0_0x256f('0x5d3')]['push'](_0x3ccaad[_0x498dfb]),this[a0_0x256f('0x5d3')][a0_0x256f('0x289')](_0x18d399);}this[a0_0x256f('0x5d3')]['forEach'](function(_0x3226aa,_0x43c305){_0xa41e57['createAnchor'](_0x3226aa,_0x43c305,_0x43c305%0x2!=0x0);});}},{'key':'_mouseClickHandler','value':function(_0x3d4a27){var _0x24b939=this;if(this[a0_0x256f('0x1c6')]){if(this[a0_0x256f('0x1c6')]=!0x1,this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]){this[a0_0x256f('0x19c')]['position'][a0_0x256f('0x171')](_0x3d4a27[a0_0x256f('0xbd')]);var _0x57a922,_0x143e64,_0x44b96e=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x5aa63a[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]()),_0x76edca=_0x44b96e['index'];if(_0x44b96e[a0_0x256f('0x461')])_0x76edca===this[a0_0x256f('0x5d3')]['length']-0x1?(_0x57a922=this[a0_0x256f('0x7e')](this[a0_0x256f('0x5d3')][_0x76edca],this[a0_0x256f('0x5d3')][_0x76edca-0x1]),_0x143e64=this['computeMidPosition'](this[a0_0x256f('0x5d3')][_0x76edca],this[a0_0x256f('0x5d3')][0x0])):(_0x57a922=this['computeMidPosition'](this[a0_0x256f('0x5d3')][_0x76edca],this[a0_0x256f('0x5d3')][_0x76edca-0x1]),_0x143e64=this[a0_0x256f('0x7e')](this[a0_0x256f('0x5d3')][_0x76edca],this['_positions'][_0x76edca+0x1])),this['_positions'][a0_0x256f('0x1a8')](_0x44b96e[a0_0x256f('0x27e')],0x1,_0x57a922,_0x3d4a27['surfacePosition'],_0x143e64),this[a0_0x256f('0x390')][a0_0x256f('0x32f')][a0_0x256f('0x45b')](),this[a0_0x256f('0x10b')]=[],this[a0_0x256f('0x5d3')]['forEach'](function(_0x2d2c31,_0x358ac1){_0x24b939[a0_0x256f('0x4ba')](_0x2d2c31,_0x358ac1,_0x358ac1%0x2!=0x0);});}}else{if(this[a0_0x256f('0x1c6')]=!0x0,!_0x3d4a27[a0_0x256f('0x58f')]['id'])return!0x1;this[a0_0x256f('0x19c')]=_0x3d4a27[a0_0x256f('0x58f')]['id'];}}},{'key':'_mouseMoveHandler','value':function(_0x43352c){if(this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x43352c[a0_0x256f('0x226')],a0_0x256f('0x243')),this[a0_0x256f('0x1c6')]&&this[a0_0x256f('0x19c')]&&this['_pickedAnchor'][a0_0x256f('0x13c')]){var _0x49207c=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x5aa63a[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]()),_0x3b8c09=_0x49207c[a0_0x256f('0x27e')];this[a0_0x256f('0x19c')]['position'][a0_0x256f('0x171')](_0x43352c[a0_0x256f('0xbd')]),this['_positions'][_0x3b8c09]=_0x43352c[a0_0x256f('0xbd')];var _0x6ba344=this[a0_0x256f('0x5d3')][a0_0x256f('0x658')];if(!_0x49207c[a0_0x256f('0x461')]){var _0x1872eb=-0x1,_0x14a8da=-0x1,_0x4964a0=-0x1,_0x1ba998=-0x1;0x0===_0x3b8c09?(_0x1872eb=_0x6ba344-0x2,_0x14a8da=_0x6ba344-0x1,_0x4964a0=_0x3b8c09+0x2,_0x1ba998=_0x3b8c09+0x1):_0x3b8c09===_0x6ba344-0x2?(_0x1872eb=_0x3b8c09-0x2,_0x14a8da=_0x3b8c09-0x1,_0x4964a0=0x0,_0x1ba998=_0x6ba344-0x1):(_0x1872eb=_0x3b8c09-0x2,_0x14a8da=_0x3b8c09-0x1,_0x4964a0=_0x3b8c09+0x2,_0x1ba998=_0x3b8c09+0x1);var _0x26027a=this[a0_0x256f('0x7e')](this[a0_0x256f('0x5d3')][_0x1872eb],this[a0_0x256f('0x5d3')][_0x3b8c09]),_0x30d578=this[a0_0x256f('0x7e')](this[a0_0x256f('0x5d3')][_0x4964a0],this['_positions'][_0x3b8c09]);this['_positions'][_0x14a8da]=_0x26027a,this['_positions'][_0x1ba998]=_0x30d578,this[a0_0x256f('0x10b')][_0x14a8da]['position']['setValue'](_0x26027a),this[a0_0x256f('0x10b')][_0x1ba998][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x30d578);}}}},{'key':'_mouseRightClickHandler','value':function(_0x2e9dc6){this[a0_0x256f('0x210')](),this[a0_0x256f('0x3ea')]['positions']=_0x3df441[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x390')][a0_0x256f('0x5b6')]['raiseEvent'](this['_overlay']);}}]),_0x44a09c;}(_0x3de9d4);function _0x58a650(_0x1dbca9){var _0x2209a7=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype']['toString']['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x4d7a43){return!0x1;}}();return function(){var _0xf4a967,_0x1fbc12=_0x1f521f()(_0x1dbca9);if(_0x2209a7){var _0x3d1d2b=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0xf4a967=Reflect['construct'](_0x1fbc12,arguments,_0x3d1d2b);}else _0xf4a967=_0x1fbc12[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0xf4a967);};}var _0x7b786e=DC[a0_0x256f('0xab')],_0xe99ca7=DC[a0_0x256f('0x3bd')]['Cesium'],_0x110c70=function(_0x8eeb86){_0x38fe39()(_0x327210,_0x8eeb86);var _0x3a52cd=_0x58a650(_0x327210);function _0x327210(_0x42cfff,_0x53797f){var _0x261323;return _0x3c0ba4()(this,_0x327210),(_0x261323=_0x3a52cd[a0_0x256f('0x32b')](this,_0x42cfff))[a0_0x256f('0x3ea')]=_0x53797f,_0x261323['_center']=void 0x0,_0x261323[a0_0x256f('0x1fa')]=0x0,_0x261323[a0_0x256f('0x5d3')]=[],_0x261323[a0_0x256f('0xf9')](),_0x261323[a0_0x256f('0x2db')](),_0x261323;}return _0x6f111f()(_0x327210,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x1b718a=this;this[a0_0x256f('0x1fa')]=this[a0_0x256f('0x3ea')][a0_0x256f('0x223')],this[a0_0x256f('0x4b4')]=_0x7b786e[a0_0x256f('0x72')](this[a0_0x256f('0x3ea')][a0_0x256f('0x532')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this['_delegate']=new _0xe99ca7[(a0_0x256f('0x39d'))]({'polygon':{'material':this[a0_0x256f('0x3ea')][a0_0x256f('0x64a')][a0_0x256f('0x63d')][a0_0x256f('0x168')]}}),this[a0_0x256f('0x5d3')]=[][a0_0x256f('0x318')]([this[a0_0x256f('0x4b4')],this[a0_0x256f('0x53f')](this[a0_0x256f('0x4b4')],this['_radius'])[0x0]]),this[a0_0x256f('0x10')][a0_0x256f('0x493')][a0_0x256f('0x3e3')]=new _0xe99ca7['CallbackProperty'](function(_0x1b893b){if(_0x1b718a['_positions'][a0_0x256f('0x658')]>0x1){if(_0x1b718a['_radius']=_0xe99ca7[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x1b718a['_positions'][0x0],_0x1b718a[a0_0x256f('0x5d3')][0x1]),_0x1b718a[a0_0x256f('0x1fa')]<=0x0)return null;var _0x153ff5=_0x1b718a[a0_0x256f('0x53f')](_0x1b718a[a0_0x256f('0x5d3')][0x0],_0x1b718a[a0_0x256f('0x1fa')]);return _0x153ff5['push'](_0x153ff5[0x0]),new _0xe99ca7[(a0_0x256f('0x634'))](_0x153ff5);}return null;},!0x1),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x2db'),'value':function(){var _0x272042=this;this[a0_0x256f('0x5d3')]['forEach'](function(_0x42711a,_0x364285){_0x272042[a0_0x256f('0x4ba')](_0x42711a,_0x364285,!0x1,_0x364285%0x2==0x0);});}},{'key':a0_0x256f('0x53f'),'value':function(_0x418b8d,_0x52ccdb){var _0xdfe6dc=[],_0x9dee1b=_0xe99ca7[a0_0x256f('0x602')][a0_0x256f('0x29')]({'center':_0x418b8d,'semiMajorAxis':_0x52ccdb,'semiMinorAxis':_0x52ccdb,'rotation':0x0,'granularity':0.005},!0x1,!0x0);return _0x9dee1b&&_0x9dee1b[a0_0x256f('0x85')]&&(_0xdfe6dc=_0xe99ca7['Cartesian3'][a0_0x256f('0x43f')](_0x9dee1b[a0_0x256f('0x85')])),_0xdfe6dc;}},{'key':a0_0x256f('0xf5'),'value':function(_0x20e104){var _0x2c33bd=_0xe99ca7[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]();if(this['_isMoving']){if(this[a0_0x256f('0x1c6')]=!0x1,this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]){this[a0_0x256f('0x19c')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x20e104[a0_0x256f('0xbd')]);var _0x41f65b=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x2c33bd);this[a0_0x256f('0x5d3')][_0x41f65b[a0_0x256f('0x27e')]]=_0x20e104[a0_0x256f('0xbd')];}}else{if(this[a0_0x256f('0x1c6')]=!0x0,!_0x20e104[a0_0x256f('0x58f')]||!_0x20e104[a0_0x256f('0x58f')]['id'])return!0x1;this['_pickedAnchor']=_0x20e104['target']['id'];}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x246cc5){if(this['_plot'][a0_0x256f('0x488')]['tooltip'][a0_0x256f('0xf2')](_0x246cc5[a0_0x256f('0x226')],a0_0x256f('0x243')),this[a0_0x256f('0x1c6')]&&this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]){var _0xd39cc6=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0xe99ca7[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]());this[a0_0x256f('0x19c')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x246cc5[a0_0x256f('0xbd')]),this[a0_0x256f('0x5d3')][_0xd39cc6[a0_0x256f('0x27e')]]=_0x246cc5[a0_0x256f('0xbd')];}}},{'key':a0_0x256f('0x18a'),'value':function(_0x104db8){this[a0_0x256f('0x210')](),this['_overlay'][a0_0x256f('0x532')]=_0x7b786e[a0_0x256f('0x31a')](this[a0_0x256f('0x5d3')][0x0]),this[a0_0x256f('0x3ea')][a0_0x256f('0x223')]=this[a0_0x256f('0x1fa')],this[a0_0x256f('0x3ea')]['show']=!0x0,this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](this['_overlay']);}}]),_0x327210;}(_0x3de9d4);function _0x4da252(_0x1f8e09){var _0x54b5ea=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x3256f8){return!0x1;}}();return function(){var _0x14f081,_0x4058b5=_0x1f521f()(_0x1f8e09);if(_0x54b5ea){var _0x357972=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x14f081=Reflect[a0_0x256f('0x64c')](_0x4058b5,arguments,_0x357972);}else _0x14f081=_0x4058b5[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x14f081);};}var _0x38d0ac=DC[a0_0x256f('0xab')],_0x1db3a3=DC[a0_0x256f('0x3bd')]['Cesium'],_0x21316b=function(_0x618a53){_0x38fe39()(_0x4cd206,_0x618a53);var _0xbf52a7=_0x4da252(_0x4cd206);function _0x4cd206(_0x191d1b,_0x3486f0){var _0x18a82f;return _0x3c0ba4()(this,_0x4cd206),(_0x18a82f=_0xbf52a7['call'](this,_0x191d1b))[a0_0x256f('0x3ea')]=_0x3486f0,_0x18a82f['_positions']=[],_0x18a82f['_mountEntity'](),_0x18a82f[a0_0x256f('0x2db')](),_0x18a82f;}return _0x6f111f()(_0x4cd206,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x513d7f=this;this[a0_0x256f('0x10')]=new _0x1db3a3[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x10')]['merge'](this[a0_0x256f('0x3ea')][a0_0x256f('0x64a')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this[a0_0x256f('0x10')][a0_0x256f('0x15a')][a0_0x256f('0x661')]=new _0x1db3a3[(a0_0x256f('0x420'))](function(_0x151af8){return _0x513d7f[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x1?_0x1db3a3[a0_0x256f('0x51')][a0_0x256f('0x3a6')](_0x513d7f[a0_0x256f('0x5d3')]):null;},!0x1),this[a0_0x256f('0x390')]['overlayLayer']['add'](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x2db'),'value':function(){var _0x2c9125=this;this[a0_0x256f('0x5d3')]=[]['concat'](_0x38d0ac[a0_0x256f('0x1ae')](this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x218')](function(_0xfe65ff,_0x5bd68c){_0x2c9125['createAnchor'](_0xfe65ff,_0x5bd68c);});}},{'key':'_mouseClickHandler','value':function(_0x3face8){if(this[a0_0x256f('0x1c6')]){if(this[a0_0x256f('0x1c6')]=!0x1,this['_pickedAnchor']&&this[a0_0x256f('0x19c')]['position']){this[a0_0x256f('0x19c')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x3face8[a0_0x256f('0xbd')]);var _0x836871=this[a0_0x256f('0x19c')]['properties'][a0_0x256f('0x21b')](_0x1db3a3[a0_0x256f('0x29c')]['now']());this[a0_0x256f('0x5d3')][_0x836871[a0_0x256f('0x27e')]]=_0x3face8[a0_0x256f('0xbd')];}}else{if(this[a0_0x256f('0x1c6')]=!0x0,!_0x3face8[a0_0x256f('0x58f')]||!_0x3face8[a0_0x256f('0x58f')]['id'])return!0x1;this[a0_0x256f('0x19c')]=_0x3face8[a0_0x256f('0x58f')]['id'];}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x185f5e){if(this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')]['showAt'](_0x185f5e[a0_0x256f('0x226')],a0_0x256f('0x243')),this[a0_0x256f('0x1c6')]&&this[a0_0x256f('0x19c')]&&this['_pickedAnchor']['position']){var _0x55dee7=this['_pickedAnchor'][a0_0x256f('0x624')]['getValue'](_0x1db3a3[a0_0x256f('0x29c')]['now']());this[a0_0x256f('0x19c')]['position']['setValue'](_0x185f5e[a0_0x256f('0xbd')]),this['_positions'][_0x55dee7[a0_0x256f('0x27e')]]=_0x185f5e[a0_0x256f('0xbd')];}}},{'key':a0_0x256f('0x18a'),'value':function(_0x255a84){this['unbindEvent'](),this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')]=_0x38d0ac[a0_0x256f('0x292')](this['_positions']),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](this[a0_0x256f('0x3ea')]);}}]),_0x4cd206;}(_0x3de9d4);function _0x4f3a01(_0x93e444){var _0x169a28=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x5f06dd){return!0x1;}}();return function(){var _0x2b2eec,_0x52365e=_0x1f521f()(_0x93e444);if(_0x169a28){var _0x2db281=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x2b2eec=Reflect[a0_0x256f('0x64c')](_0x52365e,arguments,_0x2db281);}else _0x2b2eec=_0x52365e[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x2b2eec);};}var _0x5980d3=DC['Transform'],_0x5aaec5=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x535df5=function(_0x15a132){_0x38fe39()(_0x2b0e17,_0x15a132);var _0x3abdb9=_0x4f3a01(_0x2b0e17);function _0x2b0e17(_0x1d08f2,_0x350a56){var _0xabfa3e;return _0x3c0ba4()(this,_0x2b0e17),(_0xabfa3e=_0x3abdb9['call'](this,_0x1d08f2))['_overlay']=_0x350a56,_0xabfa3e[a0_0x256f('0x666')]=void 0x0,_0xabfa3e[a0_0x256f('0xf9')](),_0xabfa3e;}return _0x6f111f()(_0x2b0e17,[{'key':'_mountEntity','value':function(){var _0x2f17a7=this;this[a0_0x256f('0x10')]=new _0x5aaec5['Entity'](),this[a0_0x256f('0x10')]['merge'](this['_overlay'][a0_0x256f('0x64a')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this[a0_0x256f('0x666')]=this[a0_0x256f('0x10')][a0_0x256f('0x13c')][a0_0x256f('0x21b')](_0x5aaec5[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]()),this['_delegate'][a0_0x256f('0x13c')]=new _0x5aaec5[(a0_0x256f('0x420'))](function(){return _0x2f17a7[a0_0x256f('0x666')];}),this['_plot'][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this['_delegate']);}},{'key':a0_0x256f('0x5cf'),'value':function(_0x5bf4e1){this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x5bf4e1[a0_0x256f('0x226')],a0_0x256f('0x503')),this[a0_0x256f('0x666')]=_0x5bf4e1[a0_0x256f('0xbd')];}},{'key':a0_0x256f('0x18a'),'value':function(_0x1a15da){this[a0_0x256f('0x210')](),this[a0_0x256f('0x3ea')][a0_0x256f('0x13c')]=_0x5980d3[a0_0x256f('0x31a')](this['_position']),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](this[a0_0x256f('0x3ea')]);}}]),_0x2b0e17;}(_0x3de9d4);function _0x436cb5(_0x5a25d2){var _0xcc674d=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x8fcfab){return!0x1;}}();return function(){var _0x9b4301,_0x3d06b2=_0x1f521f()(_0x5a25d2);if(_0xcc674d){var _0x399a45=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x9b4301=Reflect['construct'](_0x3d06b2,arguments,_0x399a45);}else _0x9b4301=_0x3d06b2[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x9b4301);};}var _0x1126cb=DC['Transform'],_0x85b555=DC['Namespace']['Cesium'],_0x34c734=function(_0x254d31){_0x38fe39()(_0x4a79fa,_0x254d31);var _0x163eed=_0x436cb5(_0x4a79fa);function _0x4a79fa(_0x551505,_0x18303f){var _0x97dc50;return _0x3c0ba4()(this,_0x4a79fa),(_0x97dc50=_0x163eed[a0_0x256f('0x32b')](this,_0x551505))['_overlay']=_0x18303f,_0x97dc50[a0_0x256f('0x5d3')]=[],_0x97dc50[a0_0x256f('0x28f')]=new _0x12c6d3(),_0x97dc50[a0_0x256f('0xf9')](),_0x97dc50[a0_0x256f('0x2db')](),_0x97dc50;}return _0x6f111f()(_0x4a79fa,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x2fec5b=this;this[a0_0x256f('0x10')]=new _0x85b555[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x10')]['merge'](this['_overlay'][a0_0x256f('0x64a')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this[a0_0x256f('0x10')][a0_0x256f('0x493')]['hierarchy']=new _0x85b555[(a0_0x256f('0x420'))](function(){return _0x2fec5b[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x2?(_0x2fec5b['_graphics'][a0_0x256f('0x50b')]=_0x2fec5b[a0_0x256f('0x5d3')],_0x2fec5b[a0_0x256f('0x28f')]['hierarchy']):null;},!0x1),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x2db'),'value':function(){var _0x3bbd1b=this;this[a0_0x256f('0x5d3')]=[][a0_0x256f('0x318')](_0x1126cb[a0_0x256f('0x1ae')](this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x218')](function(_0x25cf3c,_0x395b1c){_0x3bbd1b['createAnchor'](_0x25cf3c,_0x395b1c);});}},{'key':a0_0x256f('0xf5'),'value':function(_0x62a317){if(this[a0_0x256f('0x1c6')]){if(this[a0_0x256f('0x1c6')]=!0x1,this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]){this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]['setValue'](_0x62a317[a0_0x256f('0xbd')]);var _0xcff628=this['_pickedAnchor'][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x85b555[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]());this[a0_0x256f('0x5d3')][_0xcff628[a0_0x256f('0x27e')]]=_0x62a317[a0_0x256f('0xbd')];}}else{if(this[a0_0x256f('0x1c6')]=!0x0,!_0x62a317[a0_0x256f('0x58f')]||!_0x62a317[a0_0x256f('0x58f')]['id'])return!0x1;this['_pickedAnchor']=_0x62a317[a0_0x256f('0x58f')]['id'];}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x4d4a11){if(this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')]['showAt'](_0x4d4a11['windowPosition'],a0_0x256f('0x243')),this['_isMoving']&&this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')]['position']){var _0x7c0f9f=this[a0_0x256f('0x19c')][a0_0x256f('0x624')]['getValue'](_0x85b555[a0_0x256f('0x29c')]['now']());this[a0_0x256f('0x19c')]['position']['setValue'](_0x4d4a11[a0_0x256f('0xbd')]),this[a0_0x256f('0x5d3')][_0x7c0f9f[a0_0x256f('0x27e')]]=_0x4d4a11[a0_0x256f('0xbd')];}}},{'key':'_mouseRightClickHandler','value':function(_0x54b9fa){this[a0_0x256f('0x210')](),this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')]=_0x1126cb[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x0,this['_plot']['plotEvent'][a0_0x256f('0x52f')](this[a0_0x256f('0x3ea')]);}}]),_0x4a79fa;}(_0x3de9d4);function _0x20f193(_0x438e18){var _0x1240ec=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x492c4e){return!0x1;}}();return function(){var _0x429480,_0x510aa9=_0x1f521f()(_0x438e18);if(_0x1240ec){var _0x5c3ca4=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x429480=Reflect[a0_0x256f('0x64c')](_0x510aa9,arguments,_0x5c3ca4);}else _0x429480=_0x510aa9[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x429480);};}var _0x1a0fd4=DC['Transform'],_0x3e0395=DC[a0_0x256f('0x3bd')]['Cesium'],_0x1407a9=function(_0x2ff1e5){_0x38fe39()(_0x1905e3,_0x2ff1e5);var _0x473adb=_0x20f193(_0x1905e3);function _0x1905e3(_0x900385,_0x5e8fd4){var _0x21d8a8;return _0x3c0ba4()(this,_0x1905e3),(_0x21d8a8=_0x473adb['call'](this,_0x900385))[a0_0x256f('0x3ea')]=_0x5e8fd4,_0x21d8a8[a0_0x256f('0x5d3')]=[],_0x21d8a8[a0_0x256f('0x28f')]=new _0xced69(),_0x21d8a8['_mountEntity'](),_0x21d8a8[a0_0x256f('0x2db')](),_0x21d8a8;}return _0x6f111f()(_0x1905e3,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x18622b=this;this[a0_0x256f('0x10')]=new _0x3e0395[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x10')][a0_0x256f('0x3f4')](this[a0_0x256f('0x3ea')][a0_0x256f('0x64a')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this[a0_0x256f('0x10')][a0_0x256f('0x493')]['hierarchy']=new _0x3e0395[(a0_0x256f('0x420'))](function(){return _0x18622b[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x2?(_0x18622b[a0_0x256f('0x28f')][a0_0x256f('0x50b')]=_0x18622b[a0_0x256f('0x5d3')],_0x18622b['_graphics'][a0_0x256f('0x3e3')]):null;},!0x1),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x2db'),'value':function(){var _0x563969=this;this[a0_0x256f('0x5d3')]=[]['concat'](_0x1a0fd4['transformWGS84ArrayToCartesianArray'](this['_overlay'][a0_0x256f('0x50b')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x218')](function(_0xde0a72,_0x2bcb83){_0x563969[a0_0x256f('0x4ba')](_0xde0a72,_0x2bcb83);});}},{'key':a0_0x256f('0xf5'),'value':function(_0x58f7b5){if(this[a0_0x256f('0x1c6')]){if(this[a0_0x256f('0x1c6')]=!0x1,this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]){this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]['setValue'](_0x58f7b5[a0_0x256f('0xbd')]);var _0x422956=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x3e0395[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]());this[a0_0x256f('0x5d3')][_0x422956[a0_0x256f('0x27e')]]=_0x58f7b5[a0_0x256f('0xbd')];}}else{if(this[a0_0x256f('0x1c6')]=!0x0,!_0x58f7b5['target']||!_0x58f7b5[a0_0x256f('0x58f')]['id'])return!0x1;this[a0_0x256f('0x19c')]=_0x58f7b5[a0_0x256f('0x58f')]['id'];}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x24fb34){if(this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x24fb34[a0_0x256f('0x226')],'点击锚点移动,右击结束编辑'),this[a0_0x256f('0x1c6')]&&this['_pickedAnchor']&&this[a0_0x256f('0x19c')]['position']){var _0x25d935=this['_pickedAnchor'][a0_0x256f('0x624')]['getValue'](_0x3e0395[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]());this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]['setValue'](_0x24fb34[a0_0x256f('0xbd')]),this['_positions'][_0x25d935[a0_0x256f('0x27e')]]=_0x24fb34[a0_0x256f('0xbd')];}}},{'key':a0_0x256f('0x18a'),'value':function(_0x282134){this[a0_0x256f('0x210')](),this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')]=_0x1a0fd4['transformCartesianArrayToWGS84Array'](this[a0_0x256f('0x5d3')]),this['_overlay'][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x390')][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](this['_overlay']);}}]),_0x1905e3;}(_0x3de9d4);function _0x36117f(_0x1f8779){var _0xde20b=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x16b736){return!0x1;}}();return function(){var _0x41f3d5,_0x5cfbc9=_0x1f521f()(_0x1f8779);if(_0xde20b){var _0x281f20=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x41f3d5=Reflect[a0_0x256f('0x64c')](_0x5cfbc9,arguments,_0x281f20);}else _0x41f3d5=_0x5cfbc9[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x41f3d5);};}var _0xe433c7=DC[a0_0x256f('0xab')],_0x16775e=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x184b04=function(_0x114bd4){_0x38fe39()(_0x732cec,_0x114bd4);var _0x4f6f8c=_0x36117f(_0x732cec);function _0x732cec(_0x5d0052,_0x31796e){var _0xcca2b0;return _0x3c0ba4()(this,_0x732cec),(_0xcca2b0=_0x4f6f8c[a0_0x256f('0x32b')](this,_0x5d0052))[a0_0x256f('0x3ea')]=_0x31796e,_0xcca2b0[a0_0x256f('0x5d3')]=[],_0xcca2b0['_graphics']=new _0x59827f(),_0xcca2b0['_mountEntity'](),_0xcca2b0[a0_0x256f('0x2db')](),_0xcca2b0;}return _0x6f111f()(_0x732cec,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x5171b7=this;this[a0_0x256f('0x10')]=new _0x16775e[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x10')][a0_0x256f('0x3f4')](this[a0_0x256f('0x3ea')][a0_0x256f('0x64a')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x1,this['_delegate'][a0_0x256f('0x493')][a0_0x256f('0x3e3')]=new _0x16775e[(a0_0x256f('0x420'))](function(){return _0x5171b7[a0_0x256f('0x5d3')]['length']>0x1?(_0x5171b7[a0_0x256f('0x28f')][a0_0x256f('0x50b')]=_0x5171b7[a0_0x256f('0x5d3')],_0x5171b7[a0_0x256f('0x28f')]['hierarchy']):null;},!0x1),this[a0_0x256f('0x390')]['overlayLayer'][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x2db'),'value':function(){var _0x38617e=this;this[a0_0x256f('0x5d3')]=[][a0_0x256f('0x318')](_0xe433c7[a0_0x256f('0x1ae')](this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x218')](function(_0x34bbc1,_0x5b48ef){_0x38617e[a0_0x256f('0x4ba')](_0x34bbc1,_0x5b48ef);});}},{'key':a0_0x256f('0xf5'),'value':function(_0x15bfa2){if(this[a0_0x256f('0x1c6')]){if(this[a0_0x256f('0x1c6')]=!0x1,this[a0_0x256f('0x19c')]&&this['_pickedAnchor'][a0_0x256f('0x13c')]){this[a0_0x256f('0x19c')]['position'][a0_0x256f('0x171')](_0x15bfa2[a0_0x256f('0xbd')]);var _0x2b5e12=this[a0_0x256f('0x19c')]['properties'][a0_0x256f('0x21b')](_0x16775e[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]());this['_positions'][_0x2b5e12['index']]=_0x15bfa2['surfacePosition'];}}else{if(this['_isMoving']=!0x0,!_0x15bfa2['target']||!_0x15bfa2[a0_0x256f('0x58f')]['id'])return!0x1;this[a0_0x256f('0x19c')]=_0x15bfa2[a0_0x256f('0x58f')]['id'];}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x43269c){if(this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x43269c[a0_0x256f('0x226')],'点击锚点移动,右击结束编辑'),this['_isMoving']&&this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]){var _0x419d34=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x16775e[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]());this[a0_0x256f('0x19c')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x43269c['surfacePosition']),this['_positions'][_0x419d34[a0_0x256f('0x27e')]]=_0x43269c[a0_0x256f('0xbd')];}}},{'key':'_mouseRightClickHandler','value':function(_0x1bb19e){this['unbindEvent'](),this['_overlay']['positions']=_0xe433c7[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x0,this['_plot'][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](this[a0_0x256f('0x3ea')]);}}]),_0x732cec;}(_0x3de9d4);function _0x4c842c(_0x129d44){var _0x4956ea=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x46418f){return!0x1;}}();return function(){var _0x49446f,_0x46ed8e=_0x1f521f()(_0x129d44);if(_0x4956ea){var _0x1efd82=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x49446f=Reflect[a0_0x256f('0x64c')](_0x46ed8e,arguments,_0x1efd82);}else _0x49446f=_0x46ed8e['apply'](this,arguments);return _0x31d024()(this,_0x49446f);};}var _0x5c4648=DC[a0_0x256f('0xab')],_0x48af78=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0xf7559c=function(_0x46c2b8){_0x38fe39()(_0x144593,_0x46c2b8);var _0x1ce85e=_0x4c842c(_0x144593);function _0x144593(_0x41b92c,_0xc7a88f){var _0x14daef;return _0x3c0ba4()(this,_0x144593),(_0x14daef=_0x1ce85e[a0_0x256f('0x32b')](this,_0x41b92c))[a0_0x256f('0x3ea')]=_0xc7a88f,_0x14daef[a0_0x256f('0x5d3')]=[],_0x14daef[a0_0x256f('0x28f')]=new _0x50df4d(),_0x14daef['_mountEntity'](),_0x14daef[a0_0x256f('0x2db')](),_0x14daef;}return _0x6f111f()(_0x144593,[{'key':a0_0x256f('0xf9'),'value':function(){var _0x488199=this;this[a0_0x256f('0x10')]=new _0x48af78[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x10')][a0_0x256f('0x3f4')](this[a0_0x256f('0x3ea')]['delegate']),this[a0_0x256f('0x3ea')]['show']=!0x1,this['_delegate'][a0_0x256f('0x493')]['hierarchy']=new _0x48af78[(a0_0x256f('0x420'))](function(){return _0x488199[a0_0x256f('0x5d3')][a0_0x256f('0x658')]>0x1?(_0x488199[a0_0x256f('0x28f')][a0_0x256f('0x50b')]=_0x488199[a0_0x256f('0x5d3')],_0x488199[a0_0x256f('0x28f')][a0_0x256f('0x3e3')]):null;},!0x1),this['_plot'][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x2db'),'value':function(){var _0x2441b6=this;this['_positions']=[][a0_0x256f('0x318')](_0x5c4648['transformWGS84ArrayToCartesianArray'](this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x218')](function(_0x4f8d6e,_0x3c5a6f){_0x2441b6[a0_0x256f('0x4ba')](_0x4f8d6e,_0x3c5a6f);});}},{'key':a0_0x256f('0xf5'),'value':function(_0x3a44d1){if(this['_isMoving']){if(this[a0_0x256f('0x1c6')]=!0x1,this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]){this[a0_0x256f('0x19c')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x3a44d1['surfacePosition']);var _0x14385c=this[a0_0x256f('0x19c')]['properties'][a0_0x256f('0x21b')](_0x48af78['JulianDate'][a0_0x256f('0x2c9')]());this[a0_0x256f('0x5d3')][_0x14385c[a0_0x256f('0x27e')]]=_0x3a44d1[a0_0x256f('0xbd')];}}else{if(this[a0_0x256f('0x1c6')]=!0x0,!_0x3a44d1[a0_0x256f('0x58f')]||!_0x3a44d1[a0_0x256f('0x58f')]['id'])return!0x1;this[a0_0x256f('0x19c')]=_0x3a44d1[a0_0x256f('0x58f')]['id'];}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x441d9f){if(this['_plot']['viewer'][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x441d9f[a0_0x256f('0x226')],a0_0x256f('0x243')),this[a0_0x256f('0x1c6')]&&this['_pickedAnchor']&&this['_pickedAnchor'][a0_0x256f('0x13c')]){var _0x4fc2dd=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x48af78[a0_0x256f('0x29c')]['now']());this[a0_0x256f('0x19c')]['position'][a0_0x256f('0x171')](_0x441d9f[a0_0x256f('0xbd')]),this[a0_0x256f('0x5d3')][_0x4fc2dd['index']]=_0x441d9f[a0_0x256f('0xbd')];}}},{'key':a0_0x256f('0x18a'),'value':function(_0xd9c175){this['unbindEvent'](),this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')]=_0x5c4648[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]),this[a0_0x256f('0x3ea')][a0_0x256f('0x3e9')]=!0x0,this['_plot'][a0_0x256f('0x5b6')][a0_0x256f('0x52f')](this[a0_0x256f('0x3ea')]);}}]),_0x144593;}(_0x3de9d4);function _0xfc29f9(_0x11f2c9){var _0xe4df33=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x45626c){return!0x1;}}();return function(){var _0x3bba87,_0x3aa432=_0x1f521f()(_0x11f2c9);if(_0xe4df33){var _0x2fa982=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x3bba87=Reflect[a0_0x256f('0x64c')](_0x3aa432,arguments,_0x2fa982);}else _0x3bba87=_0x3aa432['apply'](this,arguments);return _0x31d024()(this,_0x3bba87);};}var _0x3bdabc=DC[a0_0x256f('0xab')],_0x4f1741=DC[a0_0x256f('0x3bd')]['Cesium'],_0x3a2802=function(_0x1916d7){_0x38fe39()(_0x458627,_0x1916d7);var _0x498158=_0xfc29f9(_0x458627);function _0x458627(_0x367e60,_0x3dcdab){var _0x1d8845;return _0x3c0ba4()(this,_0x458627),(_0x1d8845=_0x498158['call'](this,_0x367e60))['_overlay']=_0x3dcdab,_0x1d8845[a0_0x256f('0x5d3')]=[],_0x1d8845[a0_0x256f('0x28f')]=new _0x5c14d6(),_0x1d8845[a0_0x256f('0xf9')](),_0x1d8845[a0_0x256f('0x2db')](),_0x1d8845;}return _0x6f111f()(_0x458627,[{'key':'_mountEntity','value':function(){var _0x1a80e4=this;this[a0_0x256f('0x10')]=new _0x4f1741[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x10')][a0_0x256f('0x3f4')](this[a0_0x256f('0x3ea')][a0_0x256f('0x64a')]),this['_overlay']['show']=!0x1,this[a0_0x256f('0x10')]['polygon']['hierarchy']=new _0x4f1741['CallbackProperty'](function(){return _0x1a80e4[a0_0x256f('0x5d3')]['length']>0x2?(_0x1a80e4['_graphics'][a0_0x256f('0x50b')]=_0x1a80e4[a0_0x256f('0x5d3')],_0x1a80e4[a0_0x256f('0x28f')]['hierarchy']):null;},!0x1),this[a0_0x256f('0x390')][a0_0x256f('0x3a5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]);}},{'key':a0_0x256f('0x2db'),'value':function(){var _0x5a2d04=this;this[a0_0x256f('0x5d3')]=[][a0_0x256f('0x318')](_0x3bdabc[a0_0x256f('0x1ae')](this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')])),this[a0_0x256f('0x5d3')][a0_0x256f('0x218')](function(_0x17298e,_0x3dfaf){_0x5a2d04['createAnchor'](_0x17298e,_0x3dfaf);});}},{'key':a0_0x256f('0xf5'),'value':function(_0x1e474b){if(this[a0_0x256f('0x1c6')]){if(this['_isMoving']=!0x1,this[a0_0x256f('0x19c')]&&this[a0_0x256f('0x19c')][a0_0x256f('0x13c')]){this[a0_0x256f('0x19c')][a0_0x256f('0x13c')][a0_0x256f('0x171')](_0x1e474b[a0_0x256f('0xbd')]);var _0x424bca=this[a0_0x256f('0x19c')][a0_0x256f('0x624')][a0_0x256f('0x21b')](_0x4f1741[a0_0x256f('0x29c')][a0_0x256f('0x2c9')]());this[a0_0x256f('0x5d3')][_0x424bca[a0_0x256f('0x27e')]]=_0x1e474b[a0_0x256f('0xbd')];}}else{if(this[a0_0x256f('0x1c6')]=!0x0,!_0x1e474b[a0_0x256f('0x58f')]||!_0x1e474b[a0_0x256f('0x58f')]['id'])return!0x1;this['_pickedAnchor']=_0x1e474b['target']['id'];}}},{'key':a0_0x256f('0x5cf'),'value':function(_0x5c7491){if(this[a0_0x256f('0x390')][a0_0x256f('0x488')][a0_0x256f('0x31e')][a0_0x256f('0xf2')](_0x5c7491[a0_0x256f('0x226')],a0_0x256f('0x243')),this[a0_0x256f('0x1c6')]&&this[a0_0x256f('0x19c')]&&this['_pickedAnchor'][a0_0x256f('0x13c')]){var _0xcbe596=this[a0_0x256f('0x19c')][a0_0x256f('0x624')]['getValue'](_0x4f1741[a0_0x256f('0x29c')]['now']());this['_pickedAnchor']['position']['setValue'](_0x5c7491[a0_0x256f('0xbd')]),this['_positions'][_0xcbe596['index']]=_0x5c7491['surfacePosition'];}}},{'key':'_mouseRightClickHandler','value':function(_0xad998){this[a0_0x256f('0x210')](),this[a0_0x256f('0x3ea')][a0_0x256f('0x50b')]=_0x3bdabc[a0_0x256f('0x292')](this[a0_0x256f('0x5d3')]),this['_overlay'][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x390')]['plotEvent'][a0_0x256f('0x52f')](this[a0_0x256f('0x3ea')]);}}]),_0x458627;}(_0x3de9d4);function _0x5f0c2a(_0x53ff37,_0x2c2c1d){var _0x47e0b0=Object[a0_0x256f('0x536')](_0x53ff37);if(Object[a0_0x256f('0x23e')]){var _0x300654=Object[a0_0x256f('0x23e')](_0x53ff37);_0x2c2c1d&&(_0x300654=_0x300654['filter'](function(_0x2286c9){return Object[a0_0x256f('0x79')](_0x53ff37,_0x2286c9)[a0_0x256f('0x2ec')];})),_0x47e0b0['push'][a0_0x256f('0x40')](_0x47e0b0,_0x300654);}return _0x47e0b0;}function _0x3dbdbb(_0xb997aa){for(var _0xf3eb8b=0x1;_0xf3eb8b<arguments[a0_0x256f('0x658')];_0xf3eb8b++){var _0x12f5aa=null!=arguments[_0xf3eb8b]?arguments[_0xf3eb8b]:{};_0xf3eb8b%0x2?_0x5f0c2a(Object(_0x12f5aa),!0x0)[a0_0x256f('0x218')](function(_0x3f8c8e){_0x2baac3()(_0xb997aa,_0x3f8c8e,_0x12f5aa[_0x3f8c8e]);}):Object[a0_0x256f('0x498')]?Object['defineProperties'](_0xb997aa,Object[a0_0x256f('0x498')](_0x12f5aa)):_0x5f0c2a(Object(_0x12f5aa))[a0_0x256f('0x218')](function(_0x3cfe6e){Object[a0_0x256f('0x21f')](_0xb997aa,_0x3cfe6e,Object[a0_0x256f('0x79')](_0x12f5aa,_0x3cfe6e));});}return _0xb997aa;}var _0x2ee0fe=_0x16c2d0(0x3c),_0x2533ef=_0x16c2d0(0x3d),_0x54cd43=_0x16c2d0(0x3e),_0x4960a8=DC['OverlayType'],_0x1743c1=DC['Namespace']['Cesium'],_0xbeee29={'icon_center':_0x54cd43,'icon_anchor':_0x2ee0fe,'icon_midAnchor':_0x2533ef,'icon_size':[0xc,0xc]},_0x476f66=function(){function _0x1f9c2f(_0x2dfe09){var _0x43d623=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};_0x3c0ba4()(this,_0x1f9c2f),this[a0_0x256f('0x454')]=_0x2dfe09,this[a0_0x256f('0x1d3')]=_0x3dbdbb(_0x3dbdbb({},_0xbeee29),_0x43d623),this['_plotEvent']=new _0x1743c1[(a0_0x256f('0x4c9'))](),this[a0_0x256f('0x651')]=void 0x0,this[a0_0x256f('0x11e')]=void 0x0,this['_editWorker']=void 0x0,this[a0_0x256f('0x112')]=new _0x1743c1[(a0_0x256f('0x54c'))](a0_0x256f('0x537')),this[a0_0x256f('0x454')][a0_0x256f('0x194')]['add'](this['_overlayLayer']),this[a0_0x256f('0x203')]=new _0x1743c1[(a0_0x256f('0x54c'))]('plot-anchor-layer'),this['_viewer']['dataSources']['add'](this[a0_0x256f('0x203')]),this[a0_0x256f('0x2fa')]=void 0x0;}return _0x6f111f()(_0x1f9c2f,[{'key':a0_0x256f('0x120'),'value':function(_0x4a36d7){this[a0_0x256f('0x11e')]=void 0x0,this['_editWorker']=void 0x0,this[a0_0x256f('0x454')][a0_0x256f('0x31e')][a0_0x256f('0x167')]=!0x1,this['_overlayLayer'][a0_0x256f('0x365')][a0_0x256f('0x45b')](),this[a0_0x256f('0x203')][a0_0x256f('0x365')][a0_0x256f('0x45b')](),this['_callback']&&this[a0_0x256f('0x651')][a0_0x256f('0x32b')](this,_0x4a36d7);}},{'key':a0_0x256f('0x4fe'),'value':function(_0x45fea5){this['_plotEvent']['removeEventListener'](this[a0_0x256f('0x120')],this),this['_callback']=_0x45fea5,this[a0_0x256f('0x589')][a0_0x256f('0x429')](this['_completeCallback'],this);}},{'key':a0_0x256f('0x37f'),'value':function(_0x1e0ce3,_0x10330a){switch(_0x1e0ce3){case _0x4960a8[a0_0x256f('0x2ac')]:this[a0_0x256f('0x11e')]=new _0x6f7d72(this,_0x10330a);break;case _0x4960a8[a0_0x256f('0x28c')]:this[a0_0x256f('0x11e')]=new _0x53e244(this,_0x10330a);break;case _0x4960a8['POLYGON']:this['_drawWorker']=new _0x1607b6(this,_0x10330a);break;case _0x4960a8[a0_0x256f('0x253')]:this['_drawWorker']=new _0x4a44a2(this,_0x10330a);break;case _0x4960a8[a0_0x256f('0x276')]:this[a0_0x256f('0x11e')]=new _0xf9b7e3(this,_0x10330a);break;case _0x4960a8['BILLBOARD']:this[a0_0x256f('0x11e')]=new _0x1e8ad4(this,_0x10330a);break;case _0x4960a8[a0_0x256f('0x4cc')]:this[a0_0x256f('0x11e')]=new _0x1be8fa(this,_0x10330a);break;case _0x4960a8[a0_0x256f('0x642')]:this['_drawWorker']=new _0x1fad7c(this,_0x10330a);break;case _0x4960a8[a0_0x256f('0x5fa')]:this[a0_0x256f('0x11e')]=new _0x1bf18c(this,_0x10330a);break;case _0x4960a8[a0_0x256f('0x3cd')]:this['_drawWorker']=new _0x2594c5(this,_0x10330a);break;case _0x4960a8[a0_0x256f('0x317')]:this[a0_0x256f('0x11e')]=new _0x6459d(this,_0x10330a);}}},{'key':a0_0x256f('0x3b1'),'value':function(_0x51077f){switch(_0x51077f['type']){case _0x4960a8[a0_0x256f('0x2ac')]:this[a0_0x256f('0x147')]=new _0x1b11bb(this,_0x51077f);break;case _0x4960a8['POLYLINE']:this[a0_0x256f('0x147')]=new _0x1de953(this,_0x51077f);break;case _0x4960a8[a0_0x256f('0x2ca')]:this[a0_0x256f('0x147')]=new _0x27681a(this,_0x51077f);break;case _0x4960a8[a0_0x256f('0x253')]:this['_editWorker']=new _0x110c70(this,_0x51077f);break;case _0x4960a8[a0_0x256f('0x276')]:this['_editWorker']=new _0x21316b(this,_0x51077f);break;case _0x4960a8['BILLBOARD']:this[a0_0x256f('0x147')]=new _0x535df5(this,_0x51077f);break;case _0x4960a8[a0_0x256f('0x4cc')]:this[a0_0x256f('0x147')]=new _0x34c734(this,_0x51077f);break;case _0x4960a8[a0_0x256f('0x642')]:this[a0_0x256f('0x147')]=new _0x1407a9(this,_0x51077f);break;case _0x4960a8[a0_0x256f('0x5fa')]:this[a0_0x256f('0x147')]=new _0x184b04(this,_0x51077f);break;case _0x4960a8[a0_0x256f('0x3cd')]:this[a0_0x256f('0x147')]=new _0x3a2802(this,_0x51077f);break;case _0x4960a8[a0_0x256f('0x317')]:this[a0_0x256f('0x147')]=new _0xf7559c(this,_0x51077f);}}},{'key':a0_0x256f('0x5c0'),'value':function(_0x4ef529,_0x5e1b5d,_0x1d4339){this[a0_0x256f('0x2fa')]=a0_0x256f('0x5c0'),this[a0_0x256f('0x454')][a0_0x256f('0x31e')][a0_0x256f('0x167')]=!0x0,this[a0_0x256f('0x4fe')](_0x5e1b5d),this[a0_0x256f('0x37f')](_0x4ef529,_0x1d4339),this[a0_0x256f('0x11e')]&&this[a0_0x256f('0x11e')][a0_0x256f('0x8c')]();}},{'key':'edit','value':function(_0x3911ba,_0xa96c4d){this[a0_0x256f('0x2fa')]='edit',this[a0_0x256f('0x454')][a0_0x256f('0x31e')]['enable']=!0x0,this[a0_0x256f('0x4fe')](_0xa96c4d),this[a0_0x256f('0x3b1')](_0x3911ba),this['_editWorker']&&this[a0_0x256f('0x147')][a0_0x256f('0x8c')]();}},{'key':a0_0x256f('0x42'),'value':function(){this['_plotEvent'][a0_0x256f('0xba')](this['_completeCallback'],this),this[a0_0x256f('0x454')][a0_0x256f('0x194')][a0_0x256f('0x3ec')](this[a0_0x256f('0x112')]),this[a0_0x256f('0x454')][a0_0x256f('0x194')][a0_0x256f('0x3ec')](this['_anchorLayer']),this[a0_0x256f('0x454')]=void 0x0,this[a0_0x256f('0x589')]=void 0x0;}},{'key':a0_0x256f('0x488'),'get':function(){return this['_viewer'];}},{'key':a0_0x256f('0x2eb'),'get':function(){return this[a0_0x256f('0x1d3')];}},{'key':a0_0x256f('0x5b6'),'get':function(){return this[a0_0x256f('0x589')];}},{'key':a0_0x256f('0x3a5'),'get':function(){return this[a0_0x256f('0x112')]['entities'];}},{'key':a0_0x256f('0x32f'),'get':function(){return this[a0_0x256f('0x203')][a0_0x256f('0x365')];}}]),_0x1f9c2f;}(),_0x1e96d3=(DC[a0_0x256f('0x572')][a0_0x256f('0x409')]({'type':'GLMap','getViewer':function(){return DC['echarts'][a0_0x256f('0x488')];},'defaultOption':{'roam':!0x1}}),DC[a0_0x256f('0x572')][a0_0x256f('0x65d')]({'type':a0_0x256f('0x5fb'),'init':function(_0x3632bb,_0x176e5d){this[a0_0x256f('0xd3')]=_0x176e5d,DC[a0_0x256f('0x572')][a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x24b')][a0_0x256f('0x429')](this['moveHandler'],this);},'moveHandler':function(_0x1e88d2,_0x3530d0){this[a0_0x256f('0xd3')][a0_0x256f('0x1e6')]({'type':a0_0x256f('0x304')});},'render':function(_0x5431ea,_0x9868dc,_0x17e76c){},'dispose':function(_0x56d49e){DC[a0_0x256f('0x572')][a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x24b')][a0_0x256f('0xba')](this['moveHandler'],this);}}),function(){function _0x2feb8d(_0x3d3129,_0x5c32bf){_0x3c0ba4()(this,_0x2feb8d),this[a0_0x256f('0x454')]=_0x3d3129,this[a0_0x256f('0x52e')]=[a0_0x256f('0x16e'),a0_0x256f('0x44a')],this[a0_0x256f('0x15d')]=[0x0,0x0],this['_api']=_0x5c32bf;}return _0x6f111f()(_0x2feb8d,[{'key':a0_0x256f('0x360'),'value':function(_0x4b0754){return this[a0_0x256f('0x15d')]=_0x4b0754,this;}},{'key':a0_0x256f('0x522'),'value':function(){return this[a0_0x256f('0x454')];}},{'key':a0_0x256f('0x585'),'value':function(_0x464e86){var _0x5da8a4=this['_viewer'][a0_0x256f('0x2b0')],_0x2b3db9=[0x0,0x0],_0x482181=DC['Cartesian3'][a0_0x256f('0x641')](_0x464e86[0x0],_0x464e86[0x1]);if(!_0x482181)return _0x2b3db9;if(_0x5da8a4[a0_0x256f('0x5aa')]===DC[a0_0x256f('0xc5')][a0_0x256f('0x25')]&&DC[a0_0x256f('0x534')]['angleBetween'](_0x5da8a4['camera'][a0_0x256f('0x13c')],_0x482181)>DC[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](0x50))return!0x1;var _0x8b6ef1=_0x5da8a4['cartesianToCanvasCoordinates'](_0x482181);return _0x8b6ef1?[_0x8b6ef1['x']-this[a0_0x256f('0x15d')][0x0],_0x8b6ef1['y']-this[a0_0x256f('0x15d')][0x1]]:_0x2b3db9;}},{'key':'pointToData','value':function(_0x1110d6){var _0x2b0f49=this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x216')][a0_0x256f('0x2f')],_0x5b970c=new DC[(a0_0x256f('0x534'))](_0x1110d6[0x0]+this[a0_0x256f('0x15d')][0x0],_0x1110d6[0x1]+this['_mapOffset'][0x1],0x0),_0x366ebf=_0x2b0f49['cartesianToCartographic'](_0x5b970c);return[DC[a0_0x256f('0x4bb')]['toDegrees'](_0x366ebf[a0_0x256f('0x520')]),DC['Math']['toDegrees'](_0x366ebf['latitude'])];}},{'key':a0_0x256f('0x23'),'value':function(){var _0x3cc774=this[a0_0x256f('0x1f8')];return new DC['echarts'][(a0_0x256f('0x158'))][(a0_0x256f('0x348'))](0x0,0x0,_0x3cc774[a0_0x256f('0x5b4')](),_0x3cc774[a0_0x256f('0x56e')]());}},{'key':a0_0x256f('0x33b'),'value':function(){return DC[a0_0x256f('0x572')][a0_0x256f('0x5e6')]['create']();}},{'key':a0_0x256f('0x4bd'),'get':function(){return this[a0_0x256f('0x52e')];}}],[{'key':a0_0x256f('0x6b'),'value':function(_0x16dad8,_0x2e2c7a){var _0x4624ea=void 0x0;_0x16dad8[a0_0x256f('0x2f9')](a0_0x256f('0x5fb'),function(_0x5914cc){(_0x4624ea=new _0x2feb8d(DC[a0_0x256f('0x572')][a0_0x256f('0x488')][a0_0x256f('0x64a')],_0x2e2c7a))['setMapOffset'](_0x5914cc[a0_0x256f('0x3c2')]||[0x0,0x0]),_0x5914cc[a0_0x256f('0x396')]=_0x4624ea;}),_0x16dad8[a0_0x256f('0xb8')](function(_0x205e48){a0_0x256f('0x5fb')===_0x205e48['get']('coordinateSystem')&&(_0x205e48['coordinateSystem']=_0x4624ea);});}},{'key':a0_0x256f('0x4bd'),'get':function(){return[a0_0x256f('0x16e'),'lat'];}}]),_0x2feb8d;}());DC[a0_0x256f('0x572')][a0_0x256f('0x3ff')](a0_0x256f('0x5fb'),_0x1e96d3),DC[a0_0x256f('0x572')][a0_0x256f('0x59b')]({'type':'GLMapRoam','event':a0_0x256f('0x304'),'update':'updateLayout'},function(_0x296ce6,_0x41c2d9){});var _0x34508c=_0x16c2d0(0x6),_0x5d2d0b=_0x16c2d0(0x3),_0x17be24=function(){function _0x8369dd(_0x472fb3,_0x287249){_0x3c0ba4()(this,_0x8369dd),this[a0_0x256f('0x616')]=_0x472fb3||_0x5d2d0b['c'][a0_0x256f('0x37e')](),this[a0_0x256f('0x3a0')]=_0x287249,this[a0_0x256f('0x35')]=_0x5d2d0b['a'][a0_0x256f('0x6b')]('div',a0_0x256f('0x219')),this[a0_0x256f('0x513')](),this[a0_0x256f('0x25f')]=void 0x0,this[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],this['_show']=!0x0;}return _0x6f111f()(_0x8369dd,[{'key':a0_0x256f('0x513'),'value':function(){this['_wrapper'][a0_0x256f('0x19b')][a0_0x256f('0x13c')]=a0_0x256f('0x1c'),this['_wrapper'][a0_0x256f('0x19b')]['top']=a0_0x256f('0x652'),this[a0_0x256f('0x35')]['style']['left']='0px',this[a0_0x256f('0x35')][a0_0x256f('0x19b')][a0_0x256f('0x3ce')]=a0_0x256f('0x47a'),this['_wrapper']['setAttribute']('id',this['_id']);}},{'key':a0_0x256f('0x4a9'),'value':function(_0x1d272c){_0x1d272c&&a0_0x256f('0x374')!==this['_state']&&(_0x1d272c['dcContainer']['appendChild'](this[a0_0x256f('0x35')]),this[a0_0x256f('0x35')][a0_0x256f('0x19b')][a0_0x256f('0x140')]=_0x1d272c['canvas'][a0_0x256f('0x140')]+'px',this['_wrapper']['style'][a0_0x256f('0x4fa')]=_0x1d272c[a0_0x256f('0x54f')][a0_0x256f('0x4fa')]+'px',DC[a0_0x256f('0x572')]&&(DC[a0_0x256f('0x572')][a0_0x256f('0x488')]=_0x1d272c,_0x1d272c[a0_0x256f('0x2b0')][a0_0x256f('0x54f')][a0_0x256f('0xbb')](a0_0x256f('0x2b4'),0x0),this[a0_0x256f('0x25f')]=DC[a0_0x256f('0x572')][a0_0x256f('0x387')](this[a0_0x256f('0x35')]),this[a0_0x256f('0x3a0')]&&this[a0_0x256f('0x25f')]['setOption'](this['_option'])),this[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x4b1')]);}},{'key':a0_0x256f('0x170'),'value':function(_0x338c2e){return this[a0_0x256f('0x3a0')]=_0x338c2e,this['_chart']&&this[a0_0x256f('0x25f')][a0_0x256f('0x170')](this['_option']),this;}},{'key':a0_0x256f('0x45e'),'get':function(){return this[a0_0x256f('0x25f')];}},{'key':'show','set':function(_0x588755){this[a0_0x256f('0x5ed')]=_0x588755,this[a0_0x256f('0x35')]&&(this[a0_0x256f('0x35')][a0_0x256f('0x19b')][a0_0x256f('0x32d')]=_0x588755?a0_0x256f('0x297'):a0_0x256f('0x53'));},'get':function(){return this[a0_0x256f('0x5ed')];}}]),_0x8369dd;}(),_0x295448=_0x16c2d0(0x19),_0x48a86a=_0x16c2d0['n'](_0x295448),_0x2bda11=_0x16c2d0(0xb);function _0x487b65(_0x5acc8e,_0xf9ac53){var _0x2021a8=Object[a0_0x256f('0x536')](_0x5acc8e);if(Object[a0_0x256f('0x23e')]){var _0x2b8fe3=Object[a0_0x256f('0x23e')](_0x5acc8e);_0xf9ac53&&(_0x2b8fe3=_0x2b8fe3[a0_0x256f('0x53e')](function(_0x50faf6){return Object[a0_0x256f('0x79')](_0x5acc8e,_0x50faf6)['enumerable'];})),_0x2021a8[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x2021a8,_0x2b8fe3);}return _0x2021a8;}function _0x20dee2(_0x5b5269){for(var _0x1b8c22=0x1;_0x1b8c22<arguments[a0_0x256f('0x658')];_0x1b8c22++){var _0xe25bdb=null!=arguments[_0x1b8c22]?arguments[_0x1b8c22]:{};_0x1b8c22%0x2?_0x487b65(Object(_0xe25bdb),!0x0)[a0_0x256f('0x218')](function(_0xb9765b){_0x2baac3()(_0x5b5269,_0xb9765b,_0xe25bdb[_0xb9765b]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x256f('0x3d9')](_0x5b5269,Object['getOwnPropertyDescriptors'](_0xe25bdb)):_0x487b65(Object(_0xe25bdb))['forEach'](function(_0x216bb0){Object[a0_0x256f('0x21f')](_0x5b5269,_0x216bb0,Object[a0_0x256f('0x79')](_0xe25bdb,_0x216bb0));});}return _0x5b5269;}var _0x2f3fa8=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x3e315b=function(){function _0x35f6ce(_0x577f1c){_0x3c0ba4()(this,_0x35f6ce),this['_viewer']=_0x577f1c,this[a0_0x256f('0x1d3')]={},this[a0_0x256f('0x44f')]();}return _0x6f111f()(_0x35f6ce,[{'key':'_init','value':function(){this[a0_0x256f('0x454')][a0_0x256f('0x64a')]['cesiumWidget'][a0_0x256f('0x190')][a0_0x256f('0x19b')][a0_0x256f('0x349')]='none',this[a0_0x256f('0x454')][a0_0x256f('0x64a')]['cesiumWidget'][a0_0x256f('0x160')][a0_0x256f('0x46a')](_0x2f3fa8['ScreenSpaceEventType'][a0_0x256f('0x51a')]),this[a0_0x256f('0x454')][a0_0x256f('0x2b0')]['screenSpaceCameraController'][a0_0x256f('0x60')]=0x269d036,this[a0_0x256f('0x454')]['scene'][a0_0x256f('0x3de')]=_0x2f3fa8[a0_0x256f('0x54e')][a0_0x256f('0x155')],this[a0_0x256f('0x454')][a0_0x256f('0x64a')]['imageryLayers'][a0_0x256f('0x45b')]();}},{'key':a0_0x256f('0x69'),'value':function(){var _0x21a2a6;return this[a0_0x256f('0x454')][a0_0x256f('0x64a')][a0_0x256f('0x90')]=null!==(_0x21a2a6=this['_options']['shadows'])&&void 0x0!==_0x21a2a6&&_0x21a2a6,this[a0_0x256f('0x454')][a0_0x256f('0x64a')][a0_0x256f('0x43b')]=this[a0_0x256f('0x1d3')]['resolutionScale']||0x1,this;}},{'key':a0_0x256f('0x57e'),'value':function(){return this[a0_0x256f('0x1d3')]['tabIndex']&&this[a0_0x256f('0x454')][a0_0x256f('0x2b0')][a0_0x256f('0x54f')][a0_0x256f('0xbb')](a0_0x256f('0x2b4'),this['_options'][a0_0x256f('0x2b4')]),this;}},{'key':a0_0x256f('0x47'),'value':function(){var _0x55b1b3,_0x31061b,_0x511cae,_0x1876eb,_0x5f083f,_0x334130,_0x408f3a,_0xa25825,_0x34bb8e,_0x5d9d3e,_0x222433=this[a0_0x256f('0x454')]['scene'];_0x222433['skyAtmosphere'][a0_0x256f('0x3e9')]=null===(_0x55b1b3=this[a0_0x256f('0x1d3')]['showAtmosphere'])||void 0x0===_0x55b1b3||_0x55b1b3,_0x222433[a0_0x256f('0x49a')]['show']=null===(_0x31061b=this['_options'][a0_0x256f('0xf7')])||void 0x0===_0x31061b||_0x31061b,_0x222433[a0_0x256f('0x137')][a0_0x256f('0x3e9')]=null===(_0x511cae=this[a0_0x256f('0x1d3')]['showMoon'])||void 0x0===_0x511cae||_0x511cae,_0x222433['skyBox']['show']=null===(_0x1876eb=this[a0_0x256f('0x1d3')][a0_0x256f('0x41a')])||void 0x0===_0x1876eb||_0x1876eb,_0x222433[a0_0x256f('0x5e5')]['fxaa'][a0_0x256f('0x5b1')]=null!==(_0x5f083f=this[a0_0x256f('0x1d3')][a0_0x256f('0x71')])&&void 0x0!==_0x5f083f&&_0x5f083f;var _0x102ce9=this[a0_0x256f('0x1d3')][a0_0x256f('0x27')];return _0x5d2d0b['c'][a0_0x256f('0x3f4')](_0x222433[a0_0x256f('0x2f5')],{'enableRotate':null===(_0x334130=null==_0x102ce9?void 0x0:_0x102ce9[a0_0x256f('0xad')])||void 0x0===_0x334130||_0x334130,'enableTilt':null===(_0x408f3a=null==_0x102ce9?void 0x0:_0x102ce9['enableTilt'])||void 0x0===_0x408f3a||_0x408f3a,'enableTranslate':null===(_0xa25825=null==_0x102ce9?void 0x0:_0x102ce9[a0_0x256f('0x54d')])||void 0x0===_0xa25825||_0xa25825,'enableZoom':null===(_0x34bb8e=null==_0x102ce9?void 0x0:_0x102ce9[a0_0x256f('0x19e')])||void 0x0===_0x34bb8e||_0x34bb8e,'enableCollisionDetection':null===(_0x5d9d3e=null==_0x102ce9?void 0x0:_0x102ce9['enableCollisionDetection'])||void 0x0===_0x5d9d3e||_0x5d9d3e,'minimumZoomDistance':+(null==_0x102ce9?void 0x0:_0x102ce9[a0_0x256f('0x4e9')])||0x1,'maximumZoomDistance':+(null==_0x102ce9?void 0x0:_0x102ce9[a0_0x256f('0x60')])||0x269d036}),this;}},{'key':'_setGlobeOption','value':function(){var _0xfe8f84,_0x135d42,_0x880fb8,_0x21fd9f,_0x2c3093,_0x15a4ff,_0x5a4612,_0x35be8f,_0x4ff226,_0x26d3e8=this[a0_0x256f('0x454')]['scene'][a0_0x256f('0x216')],_0xc021f3=this[a0_0x256f('0x1d3')][a0_0x256f('0x216')];return _0x5d2d0b['c'][a0_0x256f('0x3f4')](_0x26d3e8,{'show':null===(_0xfe8f84=null==_0xc021f3?void 0x0:_0xc021f3['show'])||void 0x0===_0xfe8f84||_0xfe8f84,'enableLighting':null!==(_0x135d42=null==_0xc021f3?void 0x0:_0xc021f3[a0_0x256f('0x14f')])&&void 0x0!==_0x135d42&&_0x135d42,'depthTestAgainstTerrain':null!==(_0x880fb8=null==_0xc021f3?void 0x0:_0xc021f3[a0_0x256f('0x1a6')])&&void 0x0!==_0x880fb8&&_0x880fb8,'tileCacheSize':+(null==_0xc021f3?void 0x0:_0xc021f3[a0_0x256f('0x1bc')])||0x64,'baseColor':(null==_0xc021f3?void 0x0:_0xc021f3[a0_0x256f('0x105')])||new _0x2f3fa8[(a0_0x256f('0x54e'))](0x0,0x0,0.5,0x1)}),_0x5d2d0b['c']['merge'](_0x26d3e8['translucency'],{'enabled':null!==(_0x21fd9f=null==_0xc021f3||null===(_0x2c3093=_0xc021f3['translucency'])||void 0x0===_0x2c3093?void 0x0:_0x2c3093[a0_0x256f('0x5b1')])&&void 0x0!==_0x21fd9f&&_0x21fd9f,'backFaceAlpha':+(null==_0xc021f3||null===(_0x15a4ff=_0xc021f3[a0_0x256f('0xed')])||void 0x0===_0x15a4ff?void 0x0:_0x15a4ff[a0_0x256f('0x22a')])||0x1,'backFaceAlphaByDistance':null==_0xc021f3||null===(_0x5a4612=_0xc021f3[a0_0x256f('0xed')])||void 0x0===_0x5a4612?void 0x0:_0x5a4612[a0_0x256f('0xc9')],'frontFaceAlpha':+(null==_0xc021f3||null===(_0x35be8f=_0xc021f3['translucency'])||void 0x0===_0x35be8f?void 0x0:_0x35be8f[a0_0x256f('0x141')])||0x1,'frontFaceAlphaByDistance':null==_0xc021f3||null===(_0x4ff226=_0xc021f3[a0_0x256f('0xed')])||void 0x0===_0x4ff226?void 0x0:_0x4ff226['frontFaceAlphaByDistance']}),this;}},{'key':'_setClockOption','value':function(){var _0x1bf916;return this[a0_0x256f('0x454')][a0_0x256f('0x504')][a0_0x256f('0x100')]=null===(_0x1bf916=this[a0_0x256f('0x1d3')][a0_0x256f('0x100')])||void 0x0===_0x1bf916||_0x1bf916,this;}},{'key':'setOptions','value':function(_0x417875){return 0x0===Object[a0_0x256f('0x536')](_0x417875)[a0_0x256f('0x658')]||(this[a0_0x256f('0x1d3')]=_0x20dee2(_0x20dee2({},this[a0_0x256f('0x1d3')]),_0x417875),this['_setViewerOption']()[a0_0x256f('0x57e')]()[a0_0x256f('0x47')]()[a0_0x256f('0x38f')]()[a0_0x256f('0x26b')]()),this;}}]),_0x35f6ce;}(),_0x24283c=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x1a309a=function(){function _0x2181f4(_0x9e25e2){_0x3c0ba4()(this,_0x2181f4),this[a0_0x256f('0x454')]=_0x9e25e2,this[a0_0x256f('0x78')]=0x0;}return _0x6f111f()(_0x2181f4,[{'key':a0_0x256f('0x487'),'value':function(_0x56c7bc,_0x5dc2bc){var _0x48c04a=this,_0x15971f=new _0x24283c[(a0_0x256f('0x7d'))](this[a0_0x256f('0x454')]['scene'][a0_0x256f('0x54f')]);this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x5aa')]===_0x24283c[a0_0x256f('0xc5')][a0_0x256f('0x25')]&&(_0x15971f[a0_0x256f('0x309')](function(_0x31b48a){_0x15971f[a0_0x256f('0x309')](function(_0x58496c){var _0xba18d4=!0x0,_0x5ef287=_0x58496c[a0_0x256f('0x14')]['y']<_0x58496c[a0_0x256f('0x1dd')]['y'];_0xba18d4=!(_0x5ef287&&_0x48c04a[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x3c3')]>_0x24283c[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x5dc2bc))&&!(!_0x5ef287&&_0x48c04a[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x3c3')]<_0x24283c[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x56c7bc)),_0x48c04a['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')]['enableTilt']=_0xba18d4;},_0x24283c[a0_0x256f('0xf8')][a0_0x256f('0x37b')]);},0x0===this[a0_0x256f('0x78')]?_0x24283c[a0_0x256f('0xf8')][a0_0x256f('0x506')]:_0x24283c[a0_0x256f('0xf8')][a0_0x256f('0x225')]),_0x15971f[a0_0x256f('0x309')](function(_0x1c1637){_0x48c04a[a0_0x256f('0x454')]['scene']['screenSpaceCameraController']['enableTilt']=!0x0,_0x15971f[a0_0x256f('0x46a')](_0x24283c[a0_0x256f('0xf8')]['MOUSE_MOVE']);},0x0===this[a0_0x256f('0x78')]?_0x24283c[a0_0x256f('0xf8')]['MIDDLE_UP']:_0x24283c['ScreenSpaceEventType']['RIGHT_UP']));}},{'key':a0_0x256f('0x1f6'),'value':function(){var _0x29e5fc=this;this[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x528')]['addEventListener'](function(_0x10fde1){_0x29e5fc[a0_0x256f('0x454')][a0_0x256f('0x3ee')]['_suspendTerrainAdjustment']&&_0x29e5fc[a0_0x256f('0x454')]['scene'][a0_0x256f('0x5aa')]===_0x24283c[a0_0x256f('0xc5')][a0_0x256f('0x25')]&&(_0x29e5fc['_viewer'][a0_0x256f('0x3ee')]['_suspendTerrainAdjustment']=!0x1,_0x29e5fc[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x2be')](!0x0));});}},{'key':'setBounds','value':function(_0x26f50a,_0x4b5739,_0x56699c,_0x45f989){}},{'key':a0_0x256f('0x3e4'),'value':function(_0x40b3a9){this[a0_0x256f('0x78')]=_0x40b3a9||0x0,0x0===_0x40b3a9?(this['_viewer'][a0_0x256f('0x2b0')]['screenSpaceCameraController'][a0_0x256f('0x479')]=[_0x24283c[a0_0x256f('0x44')][a0_0x256f('0x3e8')],_0x24283c[a0_0x256f('0x44')]['PINCH'],{'eventType':_0x24283c['CameraEventType'][a0_0x256f('0x12')],'modifier':_0x24283c['KeyboardEventModifier']['CTRL']},{'eventType':_0x24283c[a0_0x256f('0x44')][a0_0x256f('0x2d3')],'modifier':_0x24283c[a0_0x256f('0x5c4')][a0_0x256f('0x3d1')]}],this[a0_0x256f('0x454')][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')]['zoomEventTypes']=[_0x24283c[a0_0x256f('0x44')][a0_0x256f('0x2d3')],_0x24283c[a0_0x256f('0x44')][a0_0x256f('0x5c8')],_0x24283c[a0_0x256f('0x44')][a0_0x256f('0xf0')]]):0x1===_0x40b3a9&&(this[a0_0x256f('0x454')][a0_0x256f('0x2b0')]['screenSpaceCameraController'][a0_0x256f('0x479')]=[_0x24283c[a0_0x256f('0x44')][a0_0x256f('0x2d3')],_0x24283c[a0_0x256f('0x44')][a0_0x256f('0xf0')],{'eventType':_0x24283c['CameraEventType']['LEFT_DRAG'],'modifier':_0x24283c['KeyboardEventModifier'][a0_0x256f('0x3d1')]},{'eventType':_0x24283c[a0_0x256f('0x44')]['RIGHT_DRAG'],'modifier':_0x24283c[a0_0x256f('0x5c4')][a0_0x256f('0x3d1')]}],this[a0_0x256f('0x454')][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')][a0_0x256f('0x32e')]=[_0x24283c[a0_0x256f('0x44')][a0_0x256f('0x5c8')],_0x24283c[a0_0x256f('0x44')][a0_0x256f('0xf0')]]);}}]),_0x2181f4;}(),_0x3fe617=_0x16c2d0(0x18),_0x5dcf58=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x36a554=function(){function _0x19e5b5(){_0x3c0ba4()(this,_0x19e5b5),this[a0_0x256f('0x454')]=void 0x0,this[a0_0x256f('0x666')]=void 0x0,this[a0_0x256f('0x11d')]=!0x1,this[a0_0x256f('0x35')]=void 0x0,this['_positionChangeable']=!0x1,this['type']=void 0x0;}return _0x6f111f()(_0x19e5b5,[{'key':a0_0x256f('0x4fe'),'value':function(){}},{'key':a0_0x256f('0x408'),'value':function(){}},{'key':a0_0x256f('0xc6'),'value':function(){!this[a0_0x256f('0x35')][a0_0x256f('0x489')]&&this[a0_0x256f('0x454')]&&this['_viewer'][a0_0x256f('0x40e')][a0_0x256f('0x169')](this[a0_0x256f('0x35')]),this[a0_0x256f('0x35')]&&(this[a0_0x256f('0x35')][a0_0x256f('0x19b')][a0_0x256f('0x32d')]=this[a0_0x256f('0x11d')]?'visible':a0_0x256f('0x53')),this[a0_0x256f('0x11d')]?this[a0_0x256f('0x4fe')]():this['_unbindEvent']();}},{'key':a0_0x256f('0x2a4'),'value':function(_0x14a6cc){}},{'key':'_installHook','value':function(){}},{'key':'install','value':function(_0x2ecd92){if(this['_viewer']=_0x2ecd92,this['_state']=_0x34508c['a']['INSTALLED'],this['_viewer']&&this['_wrapper']&&this[a0_0x256f('0xe7')]){var _0x458b18=this,_0x59b969=this[a0_0x256f('0x454')][a0_0x256f('0x2b0')];_0x59b969[a0_0x256f('0x24b')][a0_0x256f('0x429')](function(){if(_0x458b18[a0_0x256f('0x666')]&&_0x458b18[a0_0x256f('0x11d')]&&_0x458b18['_updateWindowCoord']&&a0_0x256f('0x297')===_0x458b18[a0_0x256f('0x35')][a0_0x256f('0x19b')]['visibility']){var _0x3bfdd3=_0x5dcf58[a0_0x256f('0x5d5')][a0_0x256f('0x380')](_0x59b969,_0x458b18['_position']);_0x3bfdd3&&_0x458b18['_updateWindowCoord'](_0x3bfdd3);}});}this[a0_0x256f('0x472')]&&this[a0_0x256f('0x472')]();}},{'key':a0_0x256f('0x290'),'value':function(_0x34298d){return this;}},{'key':'setContent','value':function(_0x329cd8){if(_0x329cd8&&a0_0x256f('0xa9')==typeof _0x329cd8)this[a0_0x256f('0x35')]['innerHTML']=_0x329cd8;else{if(_0x329cd8&&_0x329cd8 instanceof Element){for(;this[a0_0x256f('0x35')]['hasChildNodes']();)this['_wrapper'][a0_0x256f('0x37')](this[a0_0x256f('0x35')][a0_0x256f('0x3ca')]);this[a0_0x256f('0x35')][a0_0x256f('0x169')](_0x329cd8);}}return this;}},{'key':a0_0x256f('0x19a'),'value':function(){this['_wrapper']&&(this[a0_0x256f('0x35')][a0_0x256f('0x19b')][a0_0x256f('0x0')]='\x0a\x20\x20\x20\x20visibility:hidden;\x0a\x20\x20\x20\x20');}},{'key':a0_0x256f('0x167'),'set':function(_0x3b9855){this[a0_0x256f('0x11d')]=_0x3b9855,this['_state']=this[a0_0x256f('0x11d')]?_0x34508c['a']['ENABLED']:_0x34508c['a'][a0_0x256f('0x3bc')],this['_enableHook']&&this[a0_0x256f('0xc6')]();},'get':function(){return this[a0_0x256f('0x11d')];}},{'key':a0_0x256f('0x65f'),'get':function(){return this[a0_0x256f('0x2fa')];}}],[{'key':'registerType','value':function(_0x38bc91){_0x38bc91&&(_0x3fe617['a'][_0x38bc91[a0_0x256f('0x319')]()]=_0x38bc91[a0_0x256f('0x3e2')]());}},{'key':'getWidgetType','value':function(_0x31c6a2){return _0x3fe617['a'][_0x31c6a2['toLocaleUpperCase']()]||void 0x0;}}]),_0x19e5b5;}();function _0x33eec0(_0x1fb6b6){var _0x187801=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype']['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x43ad63){return!0x1;}}();return function(){var _0xc3edd3,_0x385424=_0x1f521f()(_0x1fb6b6);if(_0x187801){var _0x2c7d70=_0x1f521f()(this)['constructor'];_0xc3edd3=Reflect[a0_0x256f('0x64c')](_0x385424,arguments,_0x2c7d70);}else _0xc3edd3=_0x385424['apply'](this,arguments);return _0x31d024()(this,_0xc3edd3);};}var _0x43785e=function(_0x3dcc59){_0x38fe39()(_0x4d0693,_0x3dcc59);var _0x201953=_0x33eec0(_0x4d0693);function _0x4d0693(){var _0x6b2ce1;return _0x3c0ba4()(this,_0x4d0693),(_0x6b2ce1=_0x201953[a0_0x256f('0x32b')](this))[a0_0x256f('0x35')]=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),a0_0x256f('0x35e')),_0x6b2ce1[a0_0x256f('0x35')][a0_0x256f('0x19b')][a0_0x256f('0x0')]=a0_0x256f('0x4ff'),_0x6b2ce1[a0_0x256f('0x2dc')]=void 0x0,_0x6b2ce1[a0_0x256f('0x195')]=_0x36a554['getWidgetType'](a0_0x256f('0xc7')),_0x6b2ce1['_state']=_0x34508c['a'][a0_0x256f('0x4b1')],_0x6b2ce1;}return _0x6f111f()(_0x4d0693,[{'key':a0_0x256f('0x472'),'value':function(){var _0x4b0c06=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x448'),'',this[a0_0x256f('0x35')]);_0x4b0c06[a0_0x256f('0x52')]=a0_0x256f('0x15c'),_0x4b0c06[a0_0x256f('0x19b')][a0_0x256f('0x0')]='margin-right:5px;';var _0x49ee04=_0x5d2d0b['a']['create']('a','',this[a0_0x256f('0x35')]);_0x49ee04[a0_0x256f('0x52')]=a0_0x256f('0x5be'),_0x49ee04[a0_0x256f('0x256')]=a0_0x256f('0x3b2'),_0x49ee04['onclick']=function(){window['open'](a0_0x256f('0x181'));},_0x49ee04[a0_0x256f('0x19b')][a0_0x256f('0x0')]=a0_0x256f('0x286'),this[a0_0x256f('0x167')]=!0x0;}}]),_0x4d0693;}(_0x36a554);_0x36a554['registerType'](a0_0x256f('0xc7'));var _0x376cda=_0x43785e;function _0xbd7f5b(_0x1cec33){var _0x4ba1db=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x1fbcad){return!0x1;}}();return function(){var _0x200d06,_0x367dba=_0x1f521f()(_0x1cec33);if(_0x4ba1db){var _0xea8364=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x200d06=Reflect[a0_0x256f('0x64c')](_0x367dba,arguments,_0xea8364);}else _0x200d06=_0x367dba[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x200d06);};}var _0x5aa22f=function(_0x535c5d){_0x38fe39()(_0x54c6cc,_0x535c5d);var _0x57eb46=_0xbd7f5b(_0x54c6cc);function _0x54c6cc(){var _0x19423a;return _0x3c0ba4()(this,_0x54c6cc),(_0x19423a=_0x57eb46[a0_0x256f('0x32b')](this))[a0_0x256f('0x35')]=_0x5d2d0b['a'][a0_0x256f('0x6b')]('div',a0_0x256f('0x56b')),_0x19423a[a0_0x256f('0x61')]=_0x5d2d0b['a'][a0_0x256f('0x6b')]('ul','menu-list',_0x19423a[a0_0x256f('0x35')]),_0x19423a[a0_0x256f('0x2dc')]={},_0x19423a['_positionChangeable']=!0x0,_0x19423a[a0_0x256f('0x195')]=_0x36a554[a0_0x256f('0x1fe')](a0_0x256f('0x48')),_0x19423a[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x19423a;}return _0x6f111f()(_0x54c6cc,[{'key':a0_0x256f('0x4fe'),'value':function(){this[a0_0x256f('0x454')]['on'](_0x2bda11['h'][a0_0x256f('0x6e')],this['_rightClickHandler'],this),this['_viewer']['on'](_0x2bda11['h'][a0_0x256f('0x453')],this[a0_0x256f('0x267')],this);}},{'key':'_unbindEvent','value':function(){this[a0_0x256f('0x454')][a0_0x256f('0x2e2')](_0x2bda11['h'][a0_0x256f('0x6e')],this[a0_0x256f('0x23c')],this),this[a0_0x256f('0x454')]['off'](_0x2bda11['h'][a0_0x256f('0x453')],this['_clickHandler'],this);}},{'key':'_installHook','value':function(){this[a0_0x256f('0x237')]();}},{'key':a0_0x256f('0x237'),'value':function(){var _0x2a4d0d=_0x5d2d0b['a']['create']('li',a0_0x256f('0x464'),this[a0_0x256f('0x61')]);_0x2a4d0d['innerHTML']='飞到默认位置';var _0x41a52f=this;_0x2a4d0d[a0_0x256f('0x1a7')]=function(){_0x41a52f[a0_0x256f('0x454')][a0_0x256f('0x64a')][a0_0x256f('0x3ee')][a0_0x256f('0x3cf')](0x0),_0x41a52f[a0_0x256f('0x19a')]();};}},{'key':a0_0x256f('0x23c'),'value':function(_0x2718f6){_0x2718f6&&_0x2718f6[a0_0x256f('0x226')]&&this[a0_0x256f('0x11d')]&&this[a0_0x256f('0x2a4')](_0x2718f6[a0_0x256f('0x226')]);}},{'key':a0_0x256f('0x267'),'value':function(_0x257a38){this[a0_0x256f('0x19a')]();}},{'key':'_updateWindowCoord','value':function(_0xeec6c7){this[a0_0x256f('0x35')][a0_0x256f('0x19b')][a0_0x256f('0x0')]=a0_0x256f('0x5a3')[a0_0x256f('0x318')](Math[a0_0x256f('0x329')](_0xeec6c7['x']),a0_0x256f('0x12c'))['concat'](Math[a0_0x256f('0x329')](_0xeec6c7['y']),'px,\x200);\x0a\x20\x20\x20\x20');}},{'key':a0_0x256f('0x596'),'value':function(){_0x5d2d0b['a'][a0_0x256f('0x5f')](this[a0_0x256f('0x35')],'dc-context-menu\x20'[a0_0x256f('0x318')](this[a0_0x256f('0x2dc')][a0_0x256f('0x31d')]));}},{'key':a0_0x256f('0x47d'),'value':function(_0x59cc45,_0x3af17a,_0x511529){if(!_0x59cc45||!_0x3af17a)return this;var _0x1156fa=_0x5d2d0b['a'][a0_0x256f('0x6b')]('li',a0_0x256f('0x464'),null),_0x211ffa=this[a0_0x256f('0x61')]['lastChild'];_0x1156fa[a0_0x256f('0x52')]=_0x59cc45;var _0x2253ea=this;return _0x3af17a&&(_0x1156fa[a0_0x256f('0x1a7')]=function(){_0x3af17a[a0_0x256f('0x32b')](_0x511529),_0x2253ea['hide']();}),this['_ulEl']['insertBefore'](_0x1156fa,_0x211ffa),this;}},{'key':a0_0x256f('0x57b'),'set':function(_0x4e9a0d){return this[a0_0x256f('0x2dc')]=_0x4e9a0d,_0x4e9a0d[a0_0x256f('0x31d')]&&this[a0_0x256f('0x596')](),this;}}]),_0x54c6cc;}(_0x36a554);_0x36a554[a0_0x256f('0x49d')](a0_0x256f('0x48'));var _0x2ffd32=_0x5aa22f;function _0x130185(_0x22d917){var _0x3e0704=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString']['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x4c49b0){return!0x1;}}();return function(){var _0x332d0c,_0x2a8373=_0x1f521f()(_0x22d917);if(_0x3e0704){var _0x1d9eda=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x332d0c=Reflect[a0_0x256f('0x64c')](_0x2a8373,arguments,_0x1d9eda);}else _0x332d0c=_0x2a8373[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x332d0c);};}var _0x3c67a1=DC['Namespace'][a0_0x256f('0x224')],_0x2ae7e8=function(_0x3cce14){_0x38fe39()(_0x1121f2,_0x3cce14);var _0x53c4eb=_0x130185(_0x1121f2);function _0x1121f2(){var _0x2f09ea;return _0x3c0ba4()(this,_0x1121f2),(_0x2f09ea=_0x53c4eb[a0_0x256f('0x32b')](this))[a0_0x256f('0x35')]=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),a0_0x256f('0x89')),_0x2f09ea[a0_0x256f('0x5ab')]=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),a0_0x256f('0x451'),_0x2f09ea['_wrapper']),_0x2f09ea[a0_0x256f('0x4d6')]=_0x5d2d0b['a']['create'](a0_0x256f('0x64f'),'camera-location',_0x2f09ea[a0_0x256f('0x35')]),_0x2f09ea['type']=_0x36a554[a0_0x256f('0x1fe')](a0_0x256f('0x52c')),_0x2f09ea[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x2f09ea;}return _0x6f111f()(_0x1121f2,[{'key':a0_0x256f('0x4fe'),'value':function(){this[a0_0x256f('0x454')]['on'](_0x2bda11['h'][a0_0x256f('0x37b')],this[a0_0x256f('0x562')],this),this[a0_0x256f('0x454')]['on'](_0x2bda11['l'][a0_0x256f('0x30')],this[a0_0x256f('0x395')],this);}},{'key':'_unbindEvent','value':function(){this[a0_0x256f('0x454')][a0_0x256f('0x2e2')](_0x2bda11['h'][a0_0x256f('0x37b')],this[a0_0x256f('0x562')],this),this[a0_0x256f('0x454')][a0_0x256f('0x2e2')](_0x2bda11['l'][a0_0x256f('0x30')],this[a0_0x256f('0x395')],this);}},{'key':a0_0x256f('0x562'),'value':function(_0x266f24){var _0x5a1b64=_0x3c67a1['Ellipsoid']['WGS84'],_0x34d7d8=_0x266f24[a0_0x256f('0xbd')]?_0x5a1b64[a0_0x256f('0x228')](_0x266f24[a0_0x256f('0xbd')]):void 0x0,_0x12f74d=+_0x3c67a1[a0_0x256f('0x4bb')][a0_0x256f('0xec')]((null==_0x34d7d8?void 0x0:_0x34d7d8['longitude'])||0x0),_0x1efadc=+_0x3c67a1['Math'][a0_0x256f('0xec')]((null==_0x34d7d8?void 0x0:_0x34d7d8['latitude'])||0x0),_0x17e900=_0x34d7d8?+this['_viewer']['scene'][a0_0x256f('0x216')][a0_0x256f('0x56e')](_0x34d7d8):0x0;this[a0_0x256f('0x5ab')][a0_0x256f('0x52')]=a0_0x256f('0x29e')[a0_0x256f('0x318')](_0x12f74d[a0_0x256f('0x478')](0x8),a0_0x256f('0x2ee'))[a0_0x256f('0x318')](_0x1efadc[a0_0x256f('0x478')](0x8),a0_0x256f('0x5d0'))['concat'](_0x17e900[a0_0x256f('0x478')](0x2),a0_0x256f('0x5ce'));}},{'key':'_cameraHandler','value':function(){var _0xe2ba27=this[a0_0x256f('0x454')]['cameraPosition'];this['_cameraEl']['innerHTML']=a0_0x256f('0x4f7')[a0_0x256f('0x318')]((+_0xe2ba27[a0_0x256f('0x3c3')])[a0_0x256f('0x478')](0x2),a0_0x256f('0x14e'))[a0_0x256f('0x318')]((+_0xe2ba27['alt'])[a0_0x256f('0x478')](0x2),a0_0x256f('0x2a7'));}}]),_0x1121f2;}(_0x36a554);_0x36a554['registerType'](a0_0x256f('0x52c'));var _0x11a672=_0x2ae7e8,_0x41d3c9={'compass_outer':a0_0x256f('0x36d'),'compass_inner':a0_0x256f('0x1cd'),'compass_rotation_marker':a0_0x256f('0x263'),'decrease':a0_0x256f('0x4e7'),'increase':a0_0x256f('0x5f5'),'refresh':'\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2250px\x22\x20height=\x2250px\x22\x20viewBox=\x220\x200\x2050\x2050\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>refresh</title>\x0a\x20\x20\x20\x20<path\x20d=\x22M48.2758621,0\x20C47.2844828,0\x2046.5086207,0.775193846\x2046.5086207,1.76571923\x20L46.5086207,12.2308355\x20C42.0689655,4.78036173\x2034.0086207,0\x2025,0\x20C11.2068965,0\x200,11.1972438\x200,25.0215332\x20C0,38.8458226\x2011.2068965,50\x2025,50\x20C38.7931035,50\x2050,38.8027562\x2050,25.0215332\x20C50,24.0310078\x2049.2241379,23.2558139\x2048.2327587,23.2558139\x20C47.2413793,23.2558139\x2046.4655172,24.0310078\x2046.4655172,25.0215332\x20C46.4655172,36.8647717\x2036.8103448,46.5116279\x2024.9568965,46.5116279\x20C13.1034483,46.5116279\x203.49137933,36.8217054\x203.49137933,24.9784668\x20C3.49137933,13.1352283\x2013.1465517,3.48837212\x2025,3.48837212\x20C33.4913793,3.48837212\x2041.0775862,8.44099913\x2044.5258621,16.0206718\x20L32.1551724,16.0206718\x20C31.1637931,16.0206718\x2030.3879311,16.7958657\x2030.3879311,17.7863911\x20C30.3879311,18.7769164\x2031.1637931,19.5521103\x2032.1551724,19.5521103\x20L48.2327587,19.5521103\x20C49.2241379,19.5521103\x2050,18.7769164\x2050,17.7863911\x20L50,1.72265288\x20C50,0.775193846\x2049.2241379,0\x2048.2758621,0\x20L48.2758621,0\x20L48.2758621,0\x20Z\x22\x20id=\x22Shape\x22></path>\x0a</svg>\x0a','splitter':a0_0x256f('0x23f')};function _0xc1f86(_0x3fe57b){var _0x2d14e5=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x208708){return!0x1;}}();return function(){var _0x4500f3,_0x8e7240=_0x1f521f()(_0x3fe57b);if(_0x2d14e5){var _0x36ab19=_0x1f521f()(this)['constructor'];_0x4500f3=Reflect[a0_0x256f('0x64c')](_0x8e7240,arguments,_0x36ab19);}else _0x4500f3=_0x8e7240[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x4500f3);};}var _0x46c4ea=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x271ea3=function(_0x3b394f){_0x38fe39()(_0x6ef715,_0x3b394f);var _0x86ba58=_0xc1f86(_0x6ef715);function _0x6ef715(){var _0x2dd122;return _0x3c0ba4()(this,_0x6ef715),(_0x2dd122=_0x86ba58[a0_0x256f('0x32b')](this))['_wrapper']=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),a0_0x256f('0x356')),_0x2dd122[a0_0x256f('0x627')]=void 0x0,_0x2dd122[a0_0x256f('0x46d')]=!0x1,_0x2dd122[a0_0x256f('0x195')]=_0x36a554[a0_0x256f('0x1fe')](a0_0x256f('0x50f')),_0x2dd122[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x2dd122;}return _0x6f111f()(_0x6ef715,[{'key':a0_0x256f('0x472'),'value':function(){var _0xccea92=_0x5d2d0b['a'][a0_0x256f('0xfb')](_0x41d3c9[a0_0x256f('0x40b')],!0x0,a0_0x256f('0x40b'));this[a0_0x256f('0x35')][a0_0x256f('0x169')](_0xccea92);var _0x39240a=new _0x46c4ea[(a0_0x256f('0x7d'))](_0xccea92),_0x1b8c68=this;_0x39240a['setInputAction'](function(){_0x1b8c68['_moveActive']=!0x0;},_0x46c4ea[a0_0x256f('0xf8')][a0_0x256f('0x656')]),_0x39240a[a0_0x256f('0x309')](function(){_0x1b8c68[a0_0x256f('0x46d')]=!0x0;},_0x46c4ea[a0_0x256f('0xf8')][a0_0x256f('0x274')]),_0x39240a[a0_0x256f('0x309')](function(_0x14daaa){_0x1b8c68[a0_0x256f('0x562')](_0x14daaa);},_0x46c4ea[a0_0x256f('0xf8')][a0_0x256f('0x37b')]),_0x39240a[a0_0x256f('0x309')](function(_0x6cefca){_0x1b8c68[a0_0x256f('0x562')](_0x6cefca);},_0x46c4ea['ScreenSpaceEventType'][a0_0x256f('0x4a7')]),_0x39240a['setInputAction'](function(){_0x1b8c68[a0_0x256f('0x46d')]=!0x1;},_0x46c4ea['ScreenSpaceEventType'][a0_0x256f('0x34d')]),_0x39240a[a0_0x256f('0x309')](function(){_0x1b8c68['_moveActive']=!0x1;},_0x46c4ea[a0_0x256f('0xf8')]['PINCH_END']);}},{'key':'_moveHandler','value':function(_0x42c9a9){if(this[a0_0x256f('0x46d')]&&this[a0_0x256f('0x11d')]){var _0x2de4a1=_0x42c9a9['endPosition']['x'],_0x449fe8=(this[a0_0x256f('0x35')][a0_0x256f('0x625')]+_0x2de4a1)/this['_wrapper'][a0_0x256f('0x28')]['offsetWidth'];this[a0_0x256f('0x35')][a0_0x256f('0x19b')]['left']=0x64*_0x449fe8+'%',this[a0_0x256f('0x454')][a0_0x256f('0x2b0')][a0_0x256f('0x49e')]=_0x449fe8;}}},{'key':a0_0x256f('0x51f'),'value':function(_0x80aff9,_0x51d891){return this[a0_0x256f('0x454')]&&this['_enable']?(_0x80aff9&&(this[a0_0x256f('0x627')]&&this['_viewer'][a0_0x256f('0x64a')][a0_0x256f('0x81')][a0_0x256f('0x3ec')](this['_baseLayer']),this[a0_0x256f('0x627')]=this[a0_0x256f('0x454')][a0_0x256f('0x64a')]['imageryLayers']['addImageryProvider'](_0x80aff9),this[a0_0x256f('0x627')][a0_0x256f('0x191')]=_0x51d891||0x0,this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x49e')]=this[a0_0x256f('0x35')][a0_0x256f('0x625')]/this[a0_0x256f('0x35')][a0_0x256f('0x28')][a0_0x256f('0x302')]),this):this;}}]),_0x6ef715;}(_0x36a554);_0x36a554['registerType'](a0_0x256f('0x50f'));var _0x514693=_0x271ea3;function _0x2a7e7d(_0x5652f8){var _0x4ec582=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x2da668){return!0x1;}}();return function(){var _0x40f354,_0x2e9d75=_0x1f521f()(_0x5652f8);if(_0x4ec582){var _0x3270f4=_0x1f521f()(this)['constructor'];_0x40f354=Reflect[a0_0x256f('0x64c')](_0x2e9d75,arguments,_0x3270f4);}else _0x40f354=_0x2e9d75[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x40f354);};}var _0x5b90b2=function(_0x386f50){_0x38fe39()(_0x372f8b,_0x386f50);var _0x12e85b=_0x2a7e7d(_0x372f8b);function _0x372f8b(){var _0x2ec689;return _0x3c0ba4()(this,_0x372f8b),(_0x2ec689=_0x12e85b[a0_0x256f('0x32b')](this))[a0_0x256f('0x35')]=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),a0_0x256f('0x129')),_0x2ec689[a0_0x256f('0x2dc')]=void 0x0,_0x2ec689[a0_0x256f('0xdb')]=[],_0x2ec689[a0_0x256f('0x195')]=_0x36a554['getWidgetType'](a0_0x256f('0x371')),_0x2ec689[a0_0x256f('0x2fa')]=_0x34508c['a']['INITIALIZED'],_0x2ec689;}return _0x6f111f()(_0x372f8b,[{'key':a0_0x256f('0xc6'),'value':function(){!this[a0_0x256f('0x35')]['parentNode']&&this[a0_0x256f('0x454')]&&this[a0_0x256f('0x454')][a0_0x256f('0x40e')][a0_0x256f('0x169')](this[a0_0x256f('0x35')]);}},{'key':'_installHook','value':function(){var _0x1a5723=this;this[a0_0x256f('0x167')]=!0x0;var _0xdb1b03=this;this[a0_0x256f('0x35')][a0_0x256f('0x33')]=function(){var _0x120cf6=0x50;_0xdb1b03[a0_0x256f('0xdb')][a0_0x256f('0x658')]>0x0&&(_0x120cf6=0x55*_0xdb1b03[a0_0x256f('0xdb')][a0_0x256f('0x658')]),_0x1a5723[a0_0x256f('0x35')]['style'][a0_0x256f('0x140')]=''[a0_0x256f('0x318')](_0x120cf6,'px');},this['_wrapper'][a0_0x256f('0x6')]=function(){_0xdb1b03['_wrapper'][a0_0x256f('0x19b')][a0_0x256f('0x140')]='80px';};}},{'key':'_addItem','value':function(_0x460a6f){var _0x73a9e9=this,_0x386a23=_0x5d2d0b['a'][a0_0x256f('0x6b')]('div',a0_0x256f('0x4f3'),this['_wrapper']),_0xcb03e0=this['_cache'][a0_0x256f('0x658')]?this['_cache'][a0_0x256f('0x658')]-0x1:0x0;0x0===_0xcb03e0&&_0x5d2d0b['a']['addClass'](_0x386a23,'active'),_0x386a23['setAttribute'](a0_0x256f('0x1aa'),String(_0xcb03e0)),_0x386a23[a0_0x256f('0x1a7')]=function(_0x4e50ac){var _0x10438b=document[a0_0x256f('0x5d9')]('map-item\x20active');_0x10438b&&_0x10438b[a0_0x256f('0x658')]&&(_0x10438b[0x0][a0_0x256f('0xbf')]=a0_0x256f('0x4f3')),_0x73a9e9[a0_0x256f('0x454')]&&(_0x4e50ac['target'][a0_0x256f('0xbf')]=a0_0x256f('0x1d9'),_0x73a9e9[a0_0x256f('0x454')][a0_0x256f('0xac')](+_0x4e50ac['target'][a0_0x256f('0x5e2')]('data-index')||0x0));},_0x460a6f[a0_0x256f('0x5de')]&&(_0x386a23[a0_0x256f('0x19b')][a0_0x256f('0x0')]=a0_0x256f('0x24f')[a0_0x256f('0x318')](_0x460a6f[a0_0x256f('0x5de')],a0_0x256f('0x103'))),_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x448'),'',_0x386a23)[a0_0x256f('0x52')]=_0x460a6f[a0_0x256f('0x215')]||'地图';}},{'key':a0_0x256f('0x2c1'),'value':function(){var _0x3445d5=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};this[a0_0x256f('0x11d')]&&(this[a0_0x256f('0xdb')][a0_0x256f('0x289')](_0x3445d5),this['_addItem'](_0x3445d5),this[a0_0x256f('0xdb')][a0_0x256f('0x658')]>0x1&&(this[a0_0x256f('0x35')][a0_0x256f('0x19b')]['visibility']=a0_0x256f('0x297')));}}]),_0x372f8b;}(_0x36a554);_0x36a554[a0_0x256f('0x49d')]('map_switch');var _0x45943b=_0x5b90b2;function _0x3504ae(_0x47a477){var _0x56cdb9=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x2c66f8){return!0x1;}}();return function(){var _0x50831b,_0x25d2d0=_0x1f521f()(_0x47a477);if(_0x56cdb9){var _0x29285c=_0x1f521f()(this)['constructor'];_0x50831b=Reflect['construct'](_0x25d2d0,arguments,_0x29285c);}else _0x50831b=_0x25d2d0[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x50831b);};}var _0x1cc78c=function(_0x2706fd){_0x38fe39()(_0x58321c,_0x2706fd);var _0x382641=_0x3504ae(_0x58321c);function _0x58321c(){var _0x530671;return _0x3c0ba4()(this,_0x58321c),(_0x530671=_0x382641[a0_0x256f('0x32b')](this))[a0_0x256f('0x35')]=_0x5d2d0b['a']['create'](a0_0x256f('0x64f'),a0_0x256f('0x455')),_0x530671[a0_0x256f('0x2dc')]={'customClass':''},_0x530671[a0_0x256f('0xe7')]=!0x0,_0x530671[a0_0x256f('0x195')]=_0x36a554[a0_0x256f('0x1fe')](a0_0x256f('0x555')),_0x530671[a0_0x256f('0x2fa')]=_0x34508c['a']['INITIALIZED'],_0x530671;}return _0x6f111f()(_0x58321c,[{'key':'_installHook','value':function(){this[a0_0x256f('0x167')]=!0x0;}},{'key':a0_0x256f('0x2a4'),'value':function(_0x3767ba){var _0x1514a1=_0x3767ba['x']-this[a0_0x256f('0x35')]['offsetWidth']/0x2,_0x20e5e5=_0x3767ba['y']-this[a0_0x256f('0x35')]['offsetHeight'];this[a0_0x256f('0x2dc')]&&a0_0x256f('0x480')===this[a0_0x256f('0x2dc')][a0_0x256f('0x13c')]?_0x1514a1=_0x3767ba['x']-this[a0_0x256f('0x35')]['offsetWidth']:this[a0_0x256f('0x2dc')]&&a0_0x256f('0xee')===this[a0_0x256f('0x2dc')][a0_0x256f('0x13c')]&&(_0x1514a1=_0x3767ba['x']),this[a0_0x256f('0x35')]['style'][a0_0x256f('0x0')]=a0_0x256f('0x5a3')[a0_0x256f('0x318')](Math[a0_0x256f('0x329')](_0x1514a1),a0_0x256f('0x12c'))[a0_0x256f('0x318')](Math[a0_0x256f('0x329')](_0x20e5e5),a0_0x256f('0x517'));}},{'key':a0_0x256f('0x596'),'value':function(){_0x5d2d0b['a']['setClass'](this[a0_0x256f('0x35')],a0_0x256f('0xf1')[a0_0x256f('0x318')](this[a0_0x256f('0x2dc')][a0_0x256f('0x31d')]));}},{'key':a0_0x256f('0x290'),'value':function(_0x471300){return _0x471300&&_0x471300 instanceof Element&&(this[a0_0x256f('0x35')]=_0x471300,_0x5d2d0b['a'][a0_0x256f('0x56c')](this['_wrapper'],a0_0x256f('0x455'))),this;}},{'key':a0_0x256f('0x57f'),'value':function(_0x1a40f2){return this['_position']=_0x1a40f2,this[a0_0x256f('0x35')]&&(this['_wrapper'][a0_0x256f('0x19b')][a0_0x256f('0x0')]='\x0a\x20\x20\x20\x20visibility:visible;\x0a\x20\x20\x20\x20'),this;}},{'key':'showAt','value':function(_0x841561,_0x10be89){return this['setPosition'](_0x841561)[a0_0x256f('0x63f')](_0x10be89),this;}},{'key':a0_0x256f('0x57b'),'set':function(_0xa94614){this['_config']=_0xa94614,_0xa94614[a0_0x256f('0x31d')]&&this[a0_0x256f('0x596')]();}}]),_0x58321c;}(_0x36a554);_0x36a554['registerType'](a0_0x256f('0x555'));var _0x26b6f9=_0x1cc78c;function _0x13a34d(_0x2c2074){var _0x9bf3ac=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x343c01){return!0x1;}}();return function(){var _0x5c7960,_0x313bb2=_0x1f521f()(_0x2c2074);if(_0x9bf3ac){var _0xbe2c61=_0x1f521f()(this)['constructor'];_0x5c7960=Reflect['construct'](_0x313bb2,arguments,_0xbe2c61);}else _0x5c7960=_0x313bb2[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x5c7960);};}var _0x5833b1=function(_0x328492){_0x38fe39()(_0x2a168a,_0x328492);var _0x2c38ac=_0x13a34d(_0x2a168a);function _0x2a168a(){var _0x205624;return _0x3c0ba4()(this,_0x2a168a),(_0x205624=_0x2c38ac[a0_0x256f('0x32b')](this))['_wrapper']=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),'dc-tool-tip'),_0x205624['type']=_0x36a554[a0_0x256f('0x1fe')](a0_0x256f('0x31e')),_0x205624[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x205624;}return _0x6f111f()(_0x2a168a,[{'key':a0_0x256f('0x2a4'),'value':function(_0x2b428e){var _0xf0782c=_0x2b428e['x']+0xa,_0x88bd72=_0x2b428e['y']-this['_wrapper'][a0_0x256f('0x430')]/0x2;this[a0_0x256f('0x35')]['style'][a0_0x256f('0x0')]=a0_0x256f('0x5a3')[a0_0x256f('0x318')](Math[a0_0x256f('0x329')](_0xf0782c),'px,')[a0_0x256f('0x318')](Math[a0_0x256f('0x329')](_0x88bd72),'px,\x200);\x0a\x20\x20\x20\x20');}},{'key':a0_0x256f('0xf2'),'value':function(_0x4fcfcd,_0x5a2835){return _0x4fcfcd&&this[a0_0x256f('0x2a4')](_0x4fcfcd),this[a0_0x256f('0x63f')](_0x5a2835),this;}}]),_0x2a168a;}(_0x36a554);_0x36a554['registerType']('tooltip');var _0x2a39de=_0x5833b1;function _0x5d1042(_0x21b196,_0x1f8349){var _0x862028=Object[a0_0x256f('0x536')](_0x21b196);if(Object[a0_0x256f('0x23e')]){var _0x1a5b0c=Object[a0_0x256f('0x23e')](_0x21b196);_0x1f8349&&(_0x1a5b0c=_0x1a5b0c['filter'](function(_0x2aa079){return Object[a0_0x256f('0x79')](_0x21b196,_0x2aa079)[a0_0x256f('0x2ec')];})),_0x862028[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x862028,_0x1a5b0c);}return _0x862028;}function _0xab8fe(_0x1f90c1){for(var _0x5d44a8=0x1;_0x5d44a8<arguments[a0_0x256f('0x658')];_0x5d44a8++){var _0x3a7682=null!=arguments[_0x5d44a8]?arguments[_0x5d44a8]:{};_0x5d44a8%0x2?_0x5d1042(Object(_0x3a7682),!0x0)[a0_0x256f('0x218')](function(_0x5292e8){_0x2baac3()(_0x1f90c1,_0x5292e8,_0x3a7682[_0x5292e8]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x256f('0x3d9')](_0x1f90c1,Object[a0_0x256f('0x498')](_0x3a7682)):_0x5d1042(Object(_0x3a7682))[a0_0x256f('0x218')](function(_0x3ddf86){Object[a0_0x256f('0x21f')](_0x1f90c1,_0x3ddf86,Object[a0_0x256f('0x79')](_0x3a7682,_0x3ddf86));});}return _0x1f90c1;}function _0x5bab55(_0x551cac){var _0x3b0141=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x565234){return!0x1;}}();return function(){var _0x20aac9,_0x524411=_0x1f521f()(_0x551cac);if(_0x3b0141){var _0x36eb11=_0x1f521f()(this)['constructor'];_0x20aac9=Reflect[a0_0x256f('0x64c')](_0x524411,arguments,_0x36eb11);}else _0x20aac9=_0x524411[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x20aac9);};}var _0x39ee6d=DC['Namespace'][a0_0x256f('0x224')],_0x3fa7ce={'animation':!0x1,'baseLayerPicker':!0x1,'fullscreenButton':!0x1,'geocoder':!0x1,'homeButton':!0x1,'infoBox':!0x1,'sceneModePicker':!0x1,'selectionIndicator':!0x1,'timeline':!0x1,'navigationHelpButton':!0x1,'navigationInstructionsInitiallyVisible':!0x1,'creditContainer':void 0x0},_0x4a2c0b=function(_0x3dce03){_0x38fe39()(_0x12efa8,_0x3dce03);var _0x1e88a1=_0x5bab55(_0x12efa8);function _0x12efa8(){var _0x269728;return _0x3c0ba4()(this,_0x12efa8),(_0x269728=_0x1e88a1[a0_0x256f('0x32b')](this))[a0_0x256f('0x35')]=_0x5d2d0b['a']['create'](a0_0x256f('0x64f'),'dc-hawkeye-map',null),_0x269728[a0_0x256f('0x35')][a0_0x256f('0xbb')]('id',_0x5d2d0b['c'][a0_0x256f('0x37e')]()),_0x269728[a0_0x256f('0x647')]=[],_0x269728[a0_0x256f('0x366')]=void 0x0,_0x269728[a0_0x256f('0x195')]=_0x36a554[a0_0x256f('0x1fe')](a0_0x256f('0x654')),_0x269728[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x269728;}return _0x6f111f()(_0x12efa8,[{'key':'_mountMap','value':function(){var _0x2f65c9=new _0x39ee6d[(a0_0x256f('0x3ac'))](this[a0_0x256f('0x35')],_0xab8fe(_0xab8fe({},_0x3fa7ce),{},{'sceneMode':_0x39ee6d[a0_0x256f('0xc5')][a0_0x256f('0x63')]}));_0x2f65c9[a0_0x256f('0x81')][a0_0x256f('0x45b')](),_0x2f65c9[a0_0x256f('0x50')][a0_0x256f('0x190')][a0_0x256f('0x19b')][a0_0x256f('0x349')]=a0_0x256f('0x47a'),_0x2f65c9[a0_0x256f('0x50')][a0_0x256f('0x160')][a0_0x256f('0x46a')](_0x39ee6d[a0_0x256f('0xf8')][a0_0x256f('0x51a')]),_0x2f65c9[a0_0x256f('0x2b0')][a0_0x256f('0x3de')]=_0x39ee6d['Color'][a0_0x256f('0x155')],_0x5d2d0b['c'][a0_0x256f('0x3f4')](_0x2f65c9[a0_0x256f('0x2b0')]['screenSpaceCameraController'],{'enableRotate':!0x1,'enableTranslate':!0x1,'enableZoom':!0x1,'enableTilt':!0x1,'enableLook':!0x1,'maximumZoomDistance':0x269d036}),this[a0_0x256f('0x366')]=_0x2f65c9;}},{'key':a0_0x256f('0x4fe'),'value':function(){this[a0_0x256f('0x454')]['on'](_0x2bda11['l'][a0_0x256f('0x30')],this['_syncMap'],this);}},{'key':a0_0x256f('0x408'),'value':function(){this[a0_0x256f('0x454')][a0_0x256f('0x2e2')](_0x2bda11['l'][a0_0x256f('0x30')],this[a0_0x256f('0x47f')],this);}},{'key':a0_0x256f('0x472'),'value':function(){this[a0_0x256f('0x3df')](),this[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x1d6')]=0.01;}},{'key':a0_0x256f('0x47f'),'value':function(){var _0x4c00d0=new _0x39ee6d[(a0_0x256f('0x326'))](Math[a0_0x256f('0xcb')](this[a0_0x256f('0x454')][a0_0x256f('0x54f')][a0_0x256f('0x8d')]/0x2),Math[a0_0x256f('0xcb')](this[a0_0x256f('0x454')]['canvas'][a0_0x256f('0x3f6')]/0x2)),_0x5ddb52=this['_viewer']['scene'][a0_0x256f('0x3ee')][a0_0x256f('0x377')](_0x4c00d0);if(!_0x5ddb52)return!0x1;var _0x187741=_0x39ee6d[a0_0x256f('0x534')]['distance'](_0x5ddb52,this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x3ee')]['positionWC']);this[a0_0x256f('0x366')][a0_0x256f('0x2b0')]['camera'][a0_0x256f('0x638')](_0x5ddb52,new _0x39ee6d[(a0_0x256f('0x534'))](0x0,0x0,_0x187741));}},{'key':a0_0x256f('0x51f'),'value':function(_0x3cfc3b){var _0x144a90=this;return this[a0_0x256f('0x366')]&&this[a0_0x256f('0x11d')]?(_0x3cfc3b&&(this[a0_0x256f('0x647')]&&this[a0_0x256f('0x647')][a0_0x256f('0x658')]&&this['_map'][a0_0x256f('0x81')][a0_0x256f('0x45b')](),Array[a0_0x256f('0x4e3')](_0x3cfc3b)||(_0x3cfc3b=[_0x3cfc3b]),_0x3cfc3b[a0_0x256f('0x218')](function(_0x1e97fe){_0x144a90['_baseLayers']['push'](_0x144a90[a0_0x256f('0x366')]['imageryLayers']['addImageryProvider'](_0x1e97fe));})),this):this;}},{'key':a0_0x256f('0x165'),'get':function(){return this[a0_0x256f('0x647')];}}]),_0x12efa8;}(_0x36a554);_0x36a554['registerType'](a0_0x256f('0x654'));var _0x1b54b6=_0x4a2c0b;function _0x2d4d1c(_0x858c3d){var _0x51945c=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x593eae){return!0x1;}}();return function(){var _0x700f70,_0x34b6c0=_0x1f521f()(_0x858c3d);if(_0x51945c){var _0x142dad=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x700f70=Reflect[a0_0x256f('0x64c')](_0x34b6c0,arguments,_0x142dad);}else _0x700f70=_0x34b6c0[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x700f70);};}var _0x4529e0=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x40cddb=function(_0x36c3b8){_0x38fe39()(_0x3f35d0,_0x36c3b8);var _0x3b08f9=_0x2d4d1c(_0x3f35d0);function _0x3f35d0(){var _0x131d5f;return _0x3c0ba4()(this,_0x3f35d0),(_0x131d5f=_0x3b08f9[a0_0x256f('0x32b')](this))[a0_0x256f('0x35')]=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),a0_0x256f('0x533')),_0x131d5f[a0_0x256f('0x213')]=void 0x0,_0x131d5f['_outRing']=void 0x0,_0x131d5f[a0_0x256f('0x59e')]=void 0x0,_0x131d5f['_rotation_marker']=void 0x0,_0x131d5f[a0_0x256f('0x5c1')]=0x0,_0x131d5f[a0_0x256f('0x663')]=0x0,_0x131d5f['_orbitLastTimestamp']=0x0,_0x131d5f[a0_0x256f('0x411')]=void 0x0,_0x131d5f[a0_0x256f('0x419')]=!0x1,_0x131d5f[a0_0x256f('0x17c')]=void 0x0,_0x131d5f[a0_0x256f('0x9a')]=void 0x0,_0x131d5f[a0_0x256f('0x6c')]=void 0x0,_0x131d5f[a0_0x256f('0x1e8')]=void 0x0,_0x131d5f['type']=_0x36a554[a0_0x256f('0x1fe')]('compass'),_0x131d5f[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x131d5f;}return _0x6f111f()(_0x3f35d0,[{'key':a0_0x256f('0x4fe'),'value':function(){this[a0_0x256f('0x454')]['on'](_0x2bda11['l'][a0_0x256f('0x5d7')],this[a0_0x256f('0x272')],this);}},{'key':a0_0x256f('0x408'),'value':function(){this[a0_0x256f('0x454')]['off'](_0x2bda11['l']['POST_RENDER'],this[a0_0x256f('0x272')],this);}},{'key':a0_0x256f('0x472'),'value':function(){var _0x50998f=this;this[a0_0x256f('0x4f4')](),this[a0_0x256f('0x35')][a0_0x256f('0x254')]=function(_0x1d32df){_0x50998f[a0_0x256f('0x95')](_0x1d32df);},this[a0_0x256f('0x35')]['ondblclick']=function(_0x3bebcd){_0x50998f[a0_0x256f('0x4bf')](_0x3bebcd);};}},{'key':'_postRenderHandler','value':function(){var _0x350b55=this[a0_0x256f('0x454')][a0_0x256f('0x3ee')]['heading'];this[a0_0x256f('0x44d')]&&(this[a0_0x256f('0x44d')][a0_0x256f('0x19b')][a0_0x256f('0x0')]='\x0a\x20\x20\x20\x20\x20\x20transform\x20:\x20rotate(-'[a0_0x256f('0x318')](_0x350b55,a0_0x256f('0x2b8'))[a0_0x256f('0x318')](_0x350b55,a0_0x256f('0x1a5')));}},{'key':a0_0x256f('0x4f4'),'value':function(){_0x5d2d0b['a'][a0_0x256f('0x6b')]('div',a0_0x256f('0x3dc'),this[a0_0x256f('0x35')]),this[a0_0x256f('0x44d')]=_0x5d2d0b['a'][a0_0x256f('0xfb')](_0x41d3c9['compass_outer'],!0x0,a0_0x256f('0x470')),this[a0_0x256f('0x35')][a0_0x256f('0x169')](this[a0_0x256f('0x44d')]),this[a0_0x256f('0x59e')]=_0x5d2d0b['a'][a0_0x256f('0xfb')](_0x41d3c9[a0_0x256f('0x548')],!0x0,a0_0x256f('0x332')),this[a0_0x256f('0x35')][a0_0x256f('0x169')](this[a0_0x256f('0x59e')]),this[a0_0x256f('0x248')]=_0x5d2d0b['a'][a0_0x256f('0xfb')](_0x41d3c9[a0_0x256f('0x664')],!0x0,a0_0x256f('0x15e')),this['_wrapper'][a0_0x256f('0x169')](this[a0_0x256f('0x248')]),this[a0_0x256f('0x248')][a0_0x256f('0x19b')][a0_0x256f('0x32d')]=a0_0x256f('0x53');}},{'key':a0_0x256f('0x95'),'value':function(_0x5b4e0b){if(this[a0_0x256f('0x454')][a0_0x256f('0x2b0')]['mode']===_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x36e')])return!0x0;this[a0_0x256f('0x213')]=_0x5b4e0b['currentTarget']['getBoundingClientRect']();var _0x27fab5=this[a0_0x256f('0x213')][a0_0x256f('0x140')]/0x2,_0x26df47=this[a0_0x256f('0x116')](_0x5b4e0b),_0x53344e=_0x4529e0[a0_0x256f('0x326')][a0_0x256f('0x271')](_0x26df47)/_0x27fab5;if(_0x53344e<0x32/0x91)this[a0_0x256f('0x4d4')](_0x26df47);else{if(!(_0x53344e<0x1))return!0x0;this[a0_0x256f('0x3e7')](_0x26df47);}}},{'key':a0_0x256f('0x4bf'),'value':function(_0x405c51){var _0x1fa782=this[a0_0x256f('0x454')][a0_0x256f('0x2b0')],_0x3bdd5d=_0x1fa782[a0_0x256f('0x3ee')],_0x284540=_0x1fa782[a0_0x256f('0x2f5')];if(_0x1fa782[a0_0x256f('0x5aa')]===_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x36e')]||!_0x284540[a0_0x256f('0x41')])return!0x0;if(_0x1fa782[a0_0x256f('0x5aa')]!==_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x1cf')]||_0x284540[a0_0x256f('0x54d')]){if(_0x1fa782[a0_0x256f('0x5aa')]===_0x4529e0['SceneMode'][a0_0x256f('0x25')]||_0x1fa782[a0_0x256f('0x5aa')]===_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x1cf')]){if(!_0x284540[a0_0x256f('0x6a')])return;if(_0x1fa782[a0_0x256f('0x5aa')]===_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x25')]&&!_0x284540[a0_0x256f('0xad')])return;}var _0x1c5dd6=this[a0_0x256f('0x54a')](!0x0);if(_0x1c5dd6){var _0x46102a=_0x1fa782[a0_0x256f('0x216')][a0_0x256f('0x2f')][a0_0x256f('0x645')](_0x3bdd5d['positionCartographic']),_0x294b08=_0x1fa782['globe'][a0_0x256f('0x2f')]['geodeticSurfaceNormal'](_0x1c5dd6),_0xe019af=new _0x4529e0[(a0_0x256f('0x4b5'))](_0x1c5dd6,0x0);_0x3bdd5d[a0_0x256f('0x363')](_0xe019af,{'offset':new _0x4529e0[(a0_0x256f('0x82'))](0x0,_0x4529e0[a0_0x256f('0x4bb')][a0_0x256f('0x485')]-_0x4529e0['Cartesian3'][a0_0x256f('0x209')](_0x294b08,_0x3bdd5d['directionWC']),_0x4529e0[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x46102a,_0x1c5dd6)),'duration':1.5});}}}},{'key':a0_0x256f('0x54a'),'value':function(_0x114bba){var _0x2d496c=new _0x4529e0[(a0_0x256f('0x534'))](),_0xfa081d=this[a0_0x256f('0x454')][a0_0x256f('0x2b0')],_0x1c493e=_0xfa081d[a0_0x256f('0x3ee')];if(_0xfa081d[a0_0x256f('0x5aa')]!==_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x36e')]){if(this[a0_0x256f('0x454')][a0_0x256f('0x64a')][a0_0x256f('0x622')])_0x2d496c=this[a0_0x256f('0x454')][a0_0x256f('0x64a')]['trackedEntity']['position']['getValue'](this['_viewer'][a0_0x256f('0x504')]['currentTime']);else{var _0x366045=new _0x4529e0[(a0_0x256f('0x2c2'))]();_0x366045[a0_0x256f('0x628')]=_0x1c493e[a0_0x256f('0x4e')],_0x366045[a0_0x256f('0x20b')]=_0x1c493e[a0_0x256f('0x1af')],_0x2d496c=_0xfa081d[a0_0x256f('0x216')]['pick'](_0x366045,_0xfa081d);}if(_0x2d496c){if(_0xfa081d[a0_0x256f('0x5aa')]===_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x63')]||_0xfa081d[a0_0x256f('0x5aa')]===_0x4529e0['SceneMode'][a0_0x256f('0x1cf')]){_0x2d496c=_0x1c493e[a0_0x256f('0x58')](_0x2d496c);var _0x1c72a7=new _0x4529e0['Cartographic']();_0x114bba&&(_0x2d496c=_0xfa081d['globe']['ellipsoid'][a0_0x256f('0x645')](_0xfa081d[a0_0x256f('0x76')]['unproject'](_0x2d496c,_0x1c72a7)));}else _0x114bba||(_0x2d496c=_0x1c493e[a0_0x256f('0x58')](_0x2d496c));return _0x2d496c;}}}},{'key':a0_0x256f('0x4d4'),'value':function(_0x37c189){var _0x683de3=this,_0x241f24=this[a0_0x256f('0x454')]['scene'],_0x1ca12d=_0x241f24['screenSpaceCameraController'],_0x2699be=_0x241f24[a0_0x256f('0x3ee')];if(_0x241f24['mode']!==_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x36e')]&&_0x1ca12d[a0_0x256f('0x41')]){switch(_0x241f24['mode']){case _0x4529e0[a0_0x256f('0xc5')]['COLUMBUS_VIEW']:if(_0x1ca12d[a0_0x256f('0x6a')])break;if(!_0x1ca12d[a0_0x256f('0x54d')]||!_0x1ca12d[a0_0x256f('0x501')])return;break;case _0x4529e0['SceneMode'][a0_0x256f('0x25')]:if(_0x1ca12d[a0_0x256f('0x6a')])break;if(!_0x1ca12d[a0_0x256f('0x501')]||!_0x1ca12d['enableRotate'])return;break;case _0x4529e0['SceneMode'][a0_0x256f('0x63')]:if(!_0x1ca12d['enableTranslate'])return;}if(this['_mouseMoveHandle']=function(_0x4058ad){_0x683de3[a0_0x256f('0x4a4')](_0x4058ad);},this[a0_0x256f('0x1e8')]=function(){_0x683de3[a0_0x256f('0x131')]();},document[a0_0x256f('0xba')]('mousemove',this[a0_0x256f('0x6c')],!0x1),document['removeEventListener']('mouseup',this['_mouseUpHandle'],!0x1),this[a0_0x256f('0x2b')]=_0x4529e0['getTimestamp'](),this[a0_0x256f('0x454')][a0_0x256f('0x64a')]['trackedEntity'])this[a0_0x256f('0x411')]=void 0x0,this[a0_0x256f('0x419')]=!0x1;else{var _0x219d54=this[a0_0x256f('0x54a')](!0x0);_0x219d54?(this['_orbitFrame']=_0x4529e0[a0_0x256f('0x12f')][a0_0x256f('0x471')](_0x219d54,_0x241f24[a0_0x256f('0x216')][a0_0x256f('0x2f')]),this['_orbitIsLook']=!0x1):(this[a0_0x256f('0x411')]=_0x4529e0[a0_0x256f('0x12f')][a0_0x256f('0x471')](_0x2699be[a0_0x256f('0x4e')],_0x241f24[a0_0x256f('0x216')][a0_0x256f('0x2f')]),this['_orbitIsLook']=!0x0);}this[a0_0x256f('0x248')][a0_0x256f('0x19b')][a0_0x256f('0x32d')]=a0_0x256f('0x297'),this[a0_0x256f('0x59e')][a0_0x256f('0xbf')]+='\x20gyro-active',document[a0_0x256f('0x429')]('mousemove',this[a0_0x256f('0x6c')],!0x1),document['addEventListener']('mouseup',this[a0_0x256f('0x1e8')],!0x1),this[a0_0x256f('0x454')][a0_0x256f('0x504')][a0_0x256f('0x108')][a0_0x256f('0x429')](this[a0_0x256f('0x388')],this),this['_updateAngleAndOpacity'](_0x37c189,this[a0_0x256f('0x213')][a0_0x256f('0x140')]);}}},{'key':a0_0x256f('0x388'),'value':function(_0xdcbfd7){var _0x3a911d,_0xcc7b6d=this[a0_0x256f('0x454')][a0_0x256f('0x2b0')],_0x79d29=this[a0_0x256f('0x454')]['camera'],_0x592f1f=_0x4529e0[a0_0x256f('0x613')](),_0x55c257=(_0x592f1f-this[a0_0x256f('0x2b')])*(2.5*(this[a0_0x256f('0x663')]-0.5)/0x3e8),_0x5c0ce8=this['_orbitCursorAngle']+_0x4529e0[a0_0x256f('0x4bb')][a0_0x256f('0x485')],_0x1ada12=Math[a0_0x256f('0x441')](_0x5c0ce8)*_0x55c257,_0x4fa121=Math[a0_0x256f('0x637')](_0x5c0ce8)*_0x55c257;this[a0_0x256f('0x411')]&&(_0x3a911d=_0x4529e0[a0_0x256f('0x5db')][a0_0x256f('0x444')](_0x79d29[a0_0x256f('0x381')]),_0x79d29[a0_0x256f('0x4b')](this[a0_0x256f('0x411')])),_0xcc7b6d[a0_0x256f('0x5aa')]===_0x4529e0['SceneMode'][a0_0x256f('0x63')]?_0x79d29[a0_0x256f('0x4c8')](new _0x4529e0[(a0_0x256f('0x534'))](_0x1ada12,_0x4fa121,0x0),Math['max'](_0xcc7b6d[a0_0x256f('0x54f')][a0_0x256f('0x8d')],_0xcc7b6d[a0_0x256f('0x54f')][a0_0x256f('0x3f6')])/0x64*_0x79d29[a0_0x256f('0x382')][a0_0x256f('0x4fa')]*_0x55c257):this['_orbitIsLook']?(_0x79d29[a0_0x256f('0x1e7')](_0x4529e0[a0_0x256f('0x534')][a0_0x256f('0x50d')],-_0x1ada12),_0x79d29['look'](_0x79d29['right'],-_0x4fa121)):(_0x79d29[a0_0x256f('0x227')](_0x1ada12),_0x79d29[a0_0x256f('0x1e5')](_0x4fa121)),this[a0_0x256f('0x411')]&&_0x3a911d&&_0x79d29[a0_0x256f('0x4b')](_0x3a911d),this[a0_0x256f('0x2b')]=_0x592f1f;}},{'key':a0_0x256f('0x45d'),'value':function(_0x1f6d2e,_0x82164a){var _0x2a0713=Math[a0_0x256f('0x157')](-_0x1f6d2e['y'],_0x1f6d2e['x']);this[a0_0x256f('0x5c1')]=_0x4529e0[a0_0x256f('0x4bb')][a0_0x256f('0x2a2')](_0x2a0713-_0x4529e0[a0_0x256f('0x4bb')][a0_0x256f('0x485')]);var _0x5aced9=_0x4529e0[a0_0x256f('0x326')][a0_0x256f('0x271')](_0x1f6d2e),_0x29c4ba=_0x82164a/0x2,_0x258c82=Math[a0_0x256f('0x511')](_0x5aced9/_0x29c4ba,0x1);this[a0_0x256f('0x663')]=0.5*_0x258c82*_0x258c82+0.5,this['_rotation_marker'][a0_0x256f('0x19b')][a0_0x256f('0x0')]=a0_0x256f('0x84')[a0_0x256f('0x318')](this[a0_0x256f('0x5c1')],a0_0x256f('0x3f2'))[a0_0x256f('0x318')](this['_orbitCursorOpacity']);}},{'key':a0_0x256f('0x4a4'),'value':function(_0x37d510){this[a0_0x256f('0x45d')](this[a0_0x256f('0x116')](_0x37d510),this[a0_0x256f('0x213')]['width']);}},{'key':'_orbitMouseUpFunction','value':function(){document['removeEventListener'](a0_0x256f('0x576'),this[a0_0x256f('0x6c')],!0x1),document[a0_0x256f('0xba')]('mouseup',this[a0_0x256f('0x1e8')],!0x1),this[a0_0x256f('0x454')][a0_0x256f('0x504')][a0_0x256f('0x108')]['removeEventListener'](this[a0_0x256f('0x388')],this),this[a0_0x256f('0x6c')]=void 0x0,this[a0_0x256f('0x1e8')]=void 0x0,this['_rotation_marker']['style'][a0_0x256f('0x32d')]=a0_0x256f('0x53'),this['_gyro'][a0_0x256f('0xbf')]=this[a0_0x256f('0x59e')]['className']['replace'](a0_0x256f('0x63c'),'');}},{'key':a0_0x256f('0x3e7'),'value':function(_0x5a91e8){var _0x2ad5e2=this,_0x4fffe9=this[a0_0x256f('0x454')][a0_0x256f('0x2b0')],_0x3860fe=_0x4fffe9[a0_0x256f('0x3ee')],_0x2207f7=_0x4fffe9[a0_0x256f('0x2f5')];if(_0x4fffe9[a0_0x256f('0x5aa')]!==_0x4529e0[a0_0x256f('0xc5')]['MORPHING']&&_0x4fffe9[a0_0x256f('0x5aa')]!==_0x4529e0['SceneMode'][a0_0x256f('0x63')]&&_0x2207f7['enableInputs']&&(_0x2207f7[a0_0x256f('0x6a')]||_0x4fffe9[a0_0x256f('0x5aa')]!==_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x1cf')]&&(_0x4fffe9['mode']!==_0x4529e0[a0_0x256f('0xc5')]['SCENE3D']||_0x2207f7[a0_0x256f('0xad')]))){if(this['_mouseMoveHandle']=function(_0x1ac336){_0x2ad5e2['_rotateMouseMoveFunction'](_0x1ac336);},this[a0_0x256f('0x1e8')]=function(){_0x2ad5e2['_rotateMouseUpFunction']();},document['removeEventListener'](a0_0x256f('0x576'),this[a0_0x256f('0x6c')],!0x1),document[a0_0x256f('0xba')](a0_0x256f('0x579'),this[a0_0x256f('0x1e8')],!0x1),this[a0_0x256f('0x17c')]=Math['atan2'](-_0x5a91e8['y'],_0x5a91e8['x']),this['_viewer'][a0_0x256f('0x64a')]['trackedEntity'])this[a0_0x256f('0x9a')]=void 0x0;else{var _0x7805b3=this[a0_0x256f('0x54a')](!0x0);_0x7805b3&&(_0x4fffe9[a0_0x256f('0x5aa')]!==_0x4529e0[a0_0x256f('0xc5')][a0_0x256f('0x1cf')]||_0x2207f7[a0_0x256f('0x6a')]||_0x2207f7[a0_0x256f('0x54d')])?this[a0_0x256f('0x9a')]=_0x4529e0['Transforms']['eastNorthUpToFixedFrame'](_0x7805b3,_0x4fffe9['globe']['ellipsoid']):this['_rotateFrame']=_0x4529e0['Transforms'][a0_0x256f('0x471')](_0x3860fe['positionWC'],_0x4fffe9[a0_0x256f('0x216')][a0_0x256f('0x2f')]);}var _0x84be26;this[a0_0x256f('0x9a')]&&(_0x84be26=_0x4529e0['Matrix4'][a0_0x256f('0x444')](_0x3860fe[a0_0x256f('0x381')]),_0x3860fe[a0_0x256f('0x4b')](this[a0_0x256f('0x9a')])),this['_rotateInitialCameraAngle']=-_0x3860fe[a0_0x256f('0x569')],this[a0_0x256f('0x9a')]&&_0x84be26&&_0x3860fe['lookAtTransform'](_0x84be26),document[a0_0x256f('0x429')]('mousemove',this['_mouseMoveHandle'],!0x1),document[a0_0x256f('0x429')](a0_0x256f('0x579'),this[a0_0x256f('0x1e8')],!0x1);}}},{'key':'_rotateMouseMoveFunction','value':function(_0x307c15){var _0x34fe02,_0x421cd7=this[a0_0x256f('0x454')]['camera'],_0x3cd3b0=this['_getVector'](_0x307c15),_0x28db9a=Math[a0_0x256f('0x157')](-_0x3cd3b0['y'],_0x3cd3b0['x'])-this[a0_0x256f('0x17c')],_0x4842f6=_0x4529e0[a0_0x256f('0x4bb')]['zeroToTwoPi'](this[a0_0x256f('0x1b0')]-_0x28db9a);this[a0_0x256f('0x9a')]&&(_0x34fe02=_0x4529e0[a0_0x256f('0x5db')][a0_0x256f('0x444')](_0x421cd7[a0_0x256f('0x381')]),_0x421cd7[a0_0x256f('0x4b')](this['_rotateFrame']));var _0x17693f=-_0x421cd7[a0_0x256f('0x569')];_0x421cd7[a0_0x256f('0x295')](_0x4842f6-_0x17693f),this[a0_0x256f('0x9a')]&&_0x34fe02&&_0x421cd7[a0_0x256f('0x4b')](_0x34fe02);}},{'key':a0_0x256f('0x48b'),'value':function(){document[a0_0x256f('0xba')](a0_0x256f('0x576'),this[a0_0x256f('0x6c')],!0x1),document[a0_0x256f('0xba')](a0_0x256f('0x579'),this[a0_0x256f('0x1e8')],!0x1),this[a0_0x256f('0x6c')]=void 0x0,this[a0_0x256f('0x1e8')]=void 0x0;}},{'key':a0_0x256f('0x116'),'value':function(_0x27522c){var _0x4ebe98=this[a0_0x256f('0x213')],_0x2ecef0=new _0x4529e0[(a0_0x256f('0x326'))]((_0x4ebe98['right']-_0x4ebe98[a0_0x256f('0x480')])/0x2,(_0x4ebe98[a0_0x256f('0x4b2')]-_0x4ebe98[a0_0x256f('0x305')])/0x2),_0x220223=new _0x4529e0[(a0_0x256f('0x326'))](_0x27522c[a0_0x256f('0x9')]-_0x4ebe98[a0_0x256f('0x480')],_0x27522c[a0_0x256f('0x473')]-_0x4ebe98[a0_0x256f('0x305')]),_0x110bcc=new _0x4529e0[(a0_0x256f('0x326'))]();return _0x4529e0['Cartesian2'][a0_0x256f('0xfd')](_0x220223,_0x2ecef0,_0x110bcc),_0x110bcc;}}]),_0x3f35d0;}(_0x36a554);_0x36a554[a0_0x256f('0x49d')](a0_0x256f('0x33e'));var _0x27a665=_0x40cddb,_0x570b2f=_0x16c2d0(0x7),_0x2a7036=_0x16c2d0(0x8);function _0x3c28f1(_0x26ec1f,_0x1bdd3f){var _0x1ba426=Object[a0_0x256f('0x536')](_0x26ec1f);if(Object[a0_0x256f('0x23e')]){var _0x474c64=Object[a0_0x256f('0x23e')](_0x26ec1f);_0x1bdd3f&&(_0x474c64=_0x474c64[a0_0x256f('0x53e')](function(_0x2ff1d3){return Object[a0_0x256f('0x79')](_0x26ec1f,_0x2ff1d3)[a0_0x256f('0x2ec')];})),_0x1ba426['push'][a0_0x256f('0x40')](_0x1ba426,_0x474c64);}return _0x1ba426;}function _0x77a897(_0xcae558){for(var _0x1c6ee2=0x1;_0x1c6ee2<arguments[a0_0x256f('0x658')];_0x1c6ee2++){var _0x432fa5=null!=arguments[_0x1c6ee2]?arguments[_0x1c6ee2]:{};_0x1c6ee2%0x2?_0x3c28f1(Object(_0x432fa5),!0x0)[a0_0x256f('0x218')](function(_0x15f483){_0x2baac3()(_0xcae558,_0x15f483,_0x432fa5[_0x15f483]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0xcae558,Object[a0_0x256f('0x498')](_0x432fa5)):_0x3c28f1(Object(_0x432fa5))[a0_0x256f('0x218')](function(_0x1e7750){Object[a0_0x256f('0x21f')](_0xcae558,_0x1e7750,Object[a0_0x256f('0x79')](_0x432fa5,_0x1e7750));});}return _0xcae558;}var _0x2ca8bf=DC['Namespace'][a0_0x256f('0x224')],_0x42e292={'animation':!0x1,'baseLayerPicker':!0x1,'fullscreenButton':!0x1,'geocoder':!0x1,'homeButton':!0x1,'infoBox':!0x1,'sceneModePicker':!0x1,'selectionIndicator':!0x1,'timeline':!0x1,'navigationHelpButton':!0x1,'navigationInstructionsInitiallyVisible':!0x1,'creditContainer':void 0x0,'shouldAnimate':!0x0},_0x1369e9=function(){function _0x1c84b3(_0x4c4de6){var _0x3b409f=this,_0x1265c0=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};if(_0x3c0ba4()(this,_0x1c84b3),_0x4c4de6&&a0_0x256f('0x146')===_0x48a86a()(_0x4c4de6))this[a0_0x256f('0x10')]=_0x4c4de6;else{if(!_0x4c4de6||a0_0x256f('0xa9')!=typeof _0x4c4de6)throw new Error('Viewer:the\x20id\x20is\x20empty');this[a0_0x256f('0x10')]=new _0x2ca8bf['Viewer'](_0x4c4de6,_0x77a897(_0x77a897({},_0x42e292),_0x1265c0));}new _0x2bda11['g'](this),this[a0_0x256f('0x8e')]=new _0x2bda11['m'](),this[a0_0x256f('0x2e3')]=new _0x2bda11['k'](this),this[a0_0x256f('0x178')]=new _0x3e315b(this),this[a0_0x256f('0x635')]=new _0x1a309a(this),this[a0_0x256f('0x2b3')]=_0x5d2d0b['a']['create']('div','dc-container',document[a0_0x256f('0xfa')](_0x4c4de6)),this['_baseLayerPicker']=new _0x2ca8bf[(a0_0x256f('0x415'))]({'globe':this['_delegate'][a0_0x256f('0x2b0')][a0_0x256f('0x216')]}),this[a0_0x256f('0x37d')]={},this[a0_0x256f('0x5f7')]={},this[a0_0x256f('0x2df')]={},this['_comps']={'popup':new _0x26b6f9(),'contextMenu':new _0x2ffd32(),'tooltip':new _0x2a39de(),'mapSwitch':new _0x45943b(),'mapSplit':new _0x514693(),'locationBar':new _0x11a672(),'hawkeyeMap':new _0x1b54b6(),'compass':new _0x27a665(),'attribution':new _0x376cda()},Object[a0_0x256f('0x536')](this[a0_0x256f('0x591')])[a0_0x256f('0x218')](function(_0x4d8d79){_0x3b409f[a0_0x256f('0x4a0')](_0x3b409f['_comps'][_0x4d8d79]);});}return _0x6f111f()(_0x1c84b3,[{'key':a0_0x256f('0x4cb'),'value':function(_0x5c1982){_0x5c1982&&_0x5c1982[a0_0x256f('0x347')]&&!Object(this[a0_0x256f('0x37d')])[a0_0x256f('0x592')](_0x5c1982['id'])&&(_0x5c1982[a0_0x256f('0x347')][a0_0x256f('0xff')](_0x2bda11['f'][a0_0x256f('0x25e')],this),this[a0_0x256f('0x37d')][_0x5c1982['id']]=_0x5c1982);}},{'key':a0_0x256f('0xe8'),'value':function(_0x4076a1){_0x4076a1&&_0x4076a1[a0_0x256f('0x347')]&&Object(this[a0_0x256f('0x37d')])[a0_0x256f('0x592')](_0x4076a1['id'])&&(_0x4076a1[a0_0x256f('0x347')][a0_0x256f('0xff')](_0x2bda11['f'][a0_0x256f('0x5a7')],this),delete this[a0_0x256f('0x37d')][_0x4076a1['id']]);}},{'key':a0_0x256f('0x269'),'value':function(_0x3fb6d8){_0x3fb6d8&&_0x3fb6d8[a0_0x256f('0x4e1')]&&(!this[a0_0x256f('0x5f7')][_0x3fb6d8['type']]&&(this[a0_0x256f('0x5f7')][_0x3fb6d8['type']]={}),Object(this[a0_0x256f('0x5f7')][_0x3fb6d8[a0_0x256f('0x195')]])[a0_0x256f('0x592')](_0x3fb6d8['id'])||(_0x3fb6d8[a0_0x256f('0x4e1')]['fire'](_0x2bda11['d']['ADD'],this),this[a0_0x256f('0x5f7')][_0x3fb6d8['type']][_0x3fb6d8['id']]=_0x3fb6d8));}},{'key':a0_0x256f('0x236'),'value':function(_0x274ff3){_0x274ff3&&_0x274ff3[a0_0x256f('0x4e1')]&&Object(this[a0_0x256f('0x5f7')][_0x274ff3[a0_0x256f('0x195')]])[a0_0x256f('0x592')](_0x274ff3['id'])&&(_0x274ff3['layerEvent'][a0_0x256f('0xff')](_0x2bda11['d'][a0_0x256f('0x5a7')],this),delete this[a0_0x256f('0x5f7')][_0x274ff3[a0_0x256f('0x195')]][_0x274ff3['id']]);}},{'key':a0_0x256f('0x314'),'value':function(_0x34e37b){_0x34e37b&&_0x34e37b[a0_0x256f('0x164')]&&!Object(this[a0_0x256f('0x2df')])[a0_0x256f('0x592')](_0x34e37b['id'])&&(_0x34e37b[a0_0x256f('0x164')]['fire'](_0x2bda11['a'][a0_0x256f('0x25e')],this),this[a0_0x256f('0x2df')][_0x34e37b['id']]=_0x34e37b);}},{'key':'_removeEffect','value':function(_0x338f22){_0x338f22&&_0x338f22['effectEvent']&&Object(this['_effectCache'])[a0_0x256f('0x592')](_0x338f22['id'])&&(_0x338f22[a0_0x256f('0x164')][a0_0x256f('0xff')](_0x2bda11['a'][a0_0x256f('0x5a7')],this),delete this[a0_0x256f('0x2df')][_0x338f22['id']]);}},{'key':a0_0x256f('0x62b'),'value':function(_0x4be5d8){return this['_viewerOption'][a0_0x256f('0x62b')](_0x4be5d8),this;}},{'key':a0_0x256f('0x487'),'value':function(){var _0x188b9e=arguments[a0_0x256f('0x658')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:-0x5a,_0x3077b1=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:-0x14;return this[a0_0x256f('0x635')]['setPitchRange'](_0x188b9e,_0x3077b1),this;}},{'key':a0_0x256f('0x1f6'),'value':function(){return this[a0_0x256f('0x635')]['limitCameraToGround'](),this;}},{'key':'setBounds','value':function(_0x27810b,_0x4bab29,_0xbf53d4,_0x3d49a2){return this['_cameraOption'][a0_0x256f('0x151')](_0x27810b,_0x4bab29,_0xbf53d4,_0x3d49a2),this;}},{'key':a0_0x256f('0xd1'),'value':function(_0xe4f18b){var _0x5f3649=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x0;return 0x2===_0xe4f18b?this[a0_0x256f('0x10')][a0_0x256f('0x2b0')][a0_0x256f('0x2a0')](_0x5f3649):0x3===_0xe4f18b?this[a0_0x256f('0x10')]['scene'][a0_0x256f('0x609')](_0x5f3649):2.5===_0xe4f18b&&this['_delegate'][a0_0x256f('0x2b0')][a0_0x256f('0x1f5')](_0x5f3649),this;}},{'key':a0_0x256f('0x3e4'),'value':function(_0x38ea06){return this[a0_0x256f('0x635')][a0_0x256f('0x3e4')](_0x38ea06),this;}},{'key':a0_0x256f('0x51f'),'value':function(_0x46016e){var _0xb38918=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};return _0x46016e?(this[a0_0x256f('0x653')][a0_0x256f('0x486')][a0_0x256f('0x289')](new _0x2ca8bf['ProviderViewModel']({'name':_0xb38918[a0_0x256f('0x215')]||'地图','creationFunction':function(){return _0x46016e;}})),this[a0_0x256f('0x653')][a0_0x256f('0x1f7')]||(this[a0_0x256f('0x653')]['selectedImagery']=this[a0_0x256f('0x653')]['imageryProviderViewModels'][0x0]),this['_comps'][a0_0x256f('0x65b')][a0_0x256f('0x2c1')](_0xb38918),this):this;}},{'key':'changeBaseLayer','value':function(_0x33ad3b){return this[a0_0x256f('0x653')]&&_0x33ad3b>=0x0&&(this[a0_0x256f('0x653')][a0_0x256f('0x1f7')]=this[a0_0x256f('0x653')][a0_0x256f('0x486')][_0x33ad3b]),this;}},{'key':a0_0x256f('0x5f0'),'value':function(_0x35a62c){return _0x35a62c?(this[a0_0x256f('0x653')][a0_0x256f('0x83')][a0_0x256f('0x289')](new _0x2ca8bf[(a0_0x256f('0x22e'))]({'name':'地形','creationFunction':function(){return _0x35a62c;}})),this[a0_0x256f('0x653')]['selectedTerrain']||(this[a0_0x256f('0x653')][a0_0x256f('0x12b')]=this[a0_0x256f('0x653')][a0_0x256f('0x83')][0x0]),this):this;}},{'key':a0_0x256f('0x93'),'value':function(_0x263046){return this[a0_0x256f('0x653')]&&_0x263046>=0x0&&(this[a0_0x256f('0x653')][a0_0x256f('0x12b')]=this[a0_0x256f('0x653')]['terrainProviderViewModels'][_0x263046]),this;}},{'key':a0_0x256f('0x4a8'),'value':function(){return this[a0_0x256f('0x10')]['terrainProvider']=new _0x2ca8bf[(a0_0x256f('0x2f6'))](),this;}},{'key':a0_0x256f('0x2a9'),'value':function(_0x1ace07){return this[a0_0x256f('0x4cb')](_0x1ace07),this;}},{'key':a0_0x256f('0xb3'),'value':function(_0x41ef94){return this['_removeLayerGroup'](_0x41ef94),this;}},{'key':a0_0x256f('0x5fd'),'value':function(_0x17deeb){return this[a0_0x256f('0x269')](_0x17deeb),this;}},{'key':a0_0x256f('0x288'),'value':function(_0x24f88e){return this[a0_0x256f('0x236')](_0x24f88e),this;}},{'key':a0_0x256f('0x24'),'value':function(_0x1bbc53){return _0x1bbc53&&_0x1bbc53[a0_0x256f('0x4e1')]&&Object(this[a0_0x256f('0x5f7')][_0x1bbc53['type']])[a0_0x256f('0x592')](_0x1bbc53['id']);}},{'key':a0_0x256f('0x3f'),'value':function(_0x362b4a){var _0x41b54c=this[a0_0x256f('0x20f')]()[a0_0x256f('0x53e')](function(_0x3aa553){return _0x3aa553['id']===_0x362b4a;});return _0x41b54c&&_0x41b54c[a0_0x256f('0x658')]?_0x41b54c[0x0]:void 0x0;}},{'key':'getLayers','value':function(){var _0x4e4398=this,_0x5d0235=[];return Object['keys'](this['_layerCache'])[a0_0x256f('0x218')](function(_0x130520){var _0x4a9e8f=_0x4e4398['_layerCache'][_0x130520];Object['keys'](_0x4a9e8f)['forEach'](function(_0x504ed3){_0x5d0235[a0_0x256f('0x289')](_0x4a9e8f[_0x504ed3]);});}),_0x5d0235;}},{'key':'eachLayer','value':function(_0x3d862c,_0x4ad754){var _0x37f69f=this;return Object[a0_0x256f('0x536')](this[a0_0x256f('0x5f7')])[a0_0x256f('0x218')](function(_0x2892b0){var _0x55f92f=_0x37f69f['_layerCache'][_0x2892b0];Object[a0_0x256f('0x536')](_0x55f92f)[a0_0x256f('0x218')](function(_0x1863ea){_0x3d862c[a0_0x256f('0x32b')](_0x4ad754,_0x55f92f[_0x1863ea]);});}),this;}},{'key':a0_0x256f('0x5cd'),'value':function(_0x30e068){return this[a0_0x256f('0x314')](_0x30e068),this;}},{'key':a0_0x256f('0x369'),'value':function(_0x6a7cc9){return this[a0_0x256f('0x3d7')](_0x6a7cc9),this;}},{'key':a0_0x256f('0x643'),'value':function(_0x2ea99b,_0x3f5c1e){return this['_delegate'][a0_0x256f('0x643')]((null==_0x2ea99b?void 0x0:_0x2ea99b[a0_0x256f('0x64a')])||_0x2ea99b,{'duration':_0x3f5c1e}),this;}},{'key':a0_0x256f('0x4df'),'value':function(_0x113b71){return this['_delegate'][a0_0x256f('0x4df')]((null==_0x113b71?void 0x0:_0x113b71[a0_0x256f('0x64a')])||_0x113b71),this;}},{'key':a0_0x256f('0x27d'),'value':function(_0x7910b6,_0x2254cc,_0x56b995){return _0x7910b6=_0x2a7036['a']['parsePosition'](_0x7910b6),this[a0_0x256f('0x3ee')][a0_0x256f('0x643')]({'destination':_0x570b2f['a'][a0_0x256f('0x72')](_0x7910b6),'orientation':{'heading':_0x2ca8bf[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x7910b6['heading']),'pitch':_0x2ca8bf[a0_0x256f('0x4bb')]['toRadians'](_0x7910b6[a0_0x256f('0x3c3')]),'roll':_0x2ca8bf['Math'][a0_0x256f('0x1b4')](_0x7910b6[a0_0x256f('0x612')])},'complete':_0x2254cc,'duration':_0x56b995}),this;}},{'key':a0_0x256f('0x124'),'value':function(_0x4cb170,_0x5325e0){return _0x4cb170=_0x2a7036['a'][a0_0x256f('0x10c')](_0x4cb170),this['camera'][a0_0x256f('0x643')]({'destination':_0x570b2f['a'][a0_0x256f('0x72')](_0x4cb170),'orientation':{'heading':_0x2ca8bf[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x4cb170[a0_0x256f('0x569')]),'pitch':_0x2ca8bf[a0_0x256f('0x4bb')]['toRadians'](_0x4cb170[a0_0x256f('0x3c3')]),'roll':_0x2ca8bf[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x4cb170[a0_0x256f('0x612')])},'complete':_0x5325e0,'duration':0x0}),this;}},{'key':'on','value':function(_0xe55739,_0x24c67a,_0x40606b){return this[a0_0x256f('0x8e')]['on'](_0xe55739,_0x24c67a,_0x40606b||this),this['_sceneEvent']['on'](_0xe55739,_0x24c67a,_0x40606b||this),this;}},{'key':a0_0x256f('0x608'),'value':function(_0x2d6845,_0x58eee8,_0x44cb1a){return this[a0_0x256f('0x8e')]['once'](_0x2d6845,_0x58eee8,_0x44cb1a||this),this;}},{'key':a0_0x256f('0x2e2'),'value':function(_0x4be4e7,_0x13152c,_0x43bbec){return this[a0_0x256f('0x8e')][a0_0x256f('0x2e2')](_0x4be4e7,_0x13152c,_0x43bbec||this),this[a0_0x256f('0x2e3')]['off'](_0x4be4e7,_0x13152c,_0x43bbec||this),this;}},{'key':a0_0x256f('0x42'),'value':function(){return this[a0_0x256f('0x10')]['destroy'](),this[a0_0x256f('0x10')]=void 0x0,this;}},{'key':a0_0x256f('0x4a0'),'value':function(_0x39d765){return _0x39d765&&_0x39d765[a0_0x256f('0x4a9')]&&_0x39d765[a0_0x256f('0x4a9')](this),this;}},{'key':a0_0x256f('0x64a'),'get':function(){return this['_delegate'];}},{'key':a0_0x256f('0x40e'),'get':function(){return this['_dcContainer'];}},{'key':a0_0x256f('0x2b0'),'get':function(){return this[a0_0x256f('0x10')][a0_0x256f('0x2b0')];}},{'key':a0_0x256f('0x3ee'),'get':function(){return this['_delegate'][a0_0x256f('0x3ee')];}},{'key':a0_0x256f('0x54f'),'get':function(){return this['_delegate']['scene'][a0_0x256f('0x54f')];}},{'key':a0_0x256f('0x194'),'get':function(){return this[a0_0x256f('0x10')][a0_0x256f('0x194')];}},{'key':a0_0x256f('0x81'),'get':function(){return this[a0_0x256f('0x10')][a0_0x256f('0x81')];}},{'key':a0_0x256f('0x365'),'get':function(){return this[a0_0x256f('0x10')][a0_0x256f('0x365')];}},{'key':a0_0x256f('0x504'),'get':function(){return this[a0_0x256f('0x10')][a0_0x256f('0x504')];}},{'key':a0_0x256f('0x619'),'get':function(){return this[a0_0x256f('0x8e')];}},{'key':a0_0x256f('0x555'),'get':function(){return this['_comps']['popup'];}},{'key':a0_0x256f('0x3a3'),'get':function(){return this['_comps'][a0_0x256f('0x3a3')];}},{'key':a0_0x256f('0x31e'),'get':function(){return this[a0_0x256f('0x591')][a0_0x256f('0x31e')];}},{'key':'mapSplit','get':function(){return this['_comps']['mapSplit'];}},{'key':a0_0x256f('0x65b'),'get':function(){return this[a0_0x256f('0x591')][a0_0x256f('0x65b')];}},{'key':a0_0x256f('0x5a9'),'get':function(){return this['_comps'][a0_0x256f('0x5a9')];}},{'key':a0_0x256f('0x2a1'),'get':function(){return this[a0_0x256f('0x591')]['hawkeyeMap'];}},{'key':a0_0x256f('0x33e'),'get':function(){return this['_comps'][a0_0x256f('0x33e')];}},{'key':'cameraPosition','get':function(){var _0x4a538e=_0x570b2f['a'][a0_0x256f('0x31a')](this[a0_0x256f('0x3ee')]['positionWC']);return _0x4a538e&&(_0x4a538e[a0_0x256f('0x569')]=_0x2ca8bf[a0_0x256f('0x4bb')][a0_0x256f('0xec')](this[a0_0x256f('0x3ee')]['heading']),_0x4a538e['pitch']=_0x2ca8bf[a0_0x256f('0x4bb')][a0_0x256f('0xec')](this[a0_0x256f('0x3ee')][a0_0x256f('0x3c3')]),_0x4a538e[a0_0x256f('0x612')]=_0x2ca8bf[a0_0x256f('0x4bb')][a0_0x256f('0xec')](this[a0_0x256f('0x3ee')][a0_0x256f('0x612')])),_0x4a538e;}}]),_0x1c84b3;}(),_0x10dca6=DC[a0_0x256f('0x3bd')]['Cesium'],_0x46605a=function(){function _0xdda24f(_0x4fbc3d,_0x26eebe,_0xccb178){_0x3c0ba4()(this,_0xdda24f),this[a0_0x256f('0x454')]=_0x4fbc3d,this[a0_0x256f('0x2b7')]=_0x26eebe,this[a0_0x256f('0x425')]=_0xccb178,this['_position']=_0xccb178[a0_0x256f('0x13c')],this[a0_0x256f('0x172')]=_0xccb178[a0_0x256f('0xa7')],this[a0_0x256f('0x342')]=_0xccb178[a0_0x256f('0x1c1')],this['_videoUrl']=_0xccb178[a0_0x256f('0x583')],this[a0_0x256f('0x401')]();}return _0x6f111f()(_0xdda24f,[{'key':'appendPopup','value':function(){var _0x5a4523=this;this['isArray'](this[a0_0x256f('0x425')][a0_0x256f('0x26d')])?this[a0_0x256f('0x425')][a0_0x256f('0x26d')]['forEach'](function(_0x269389,_0x1ad1e3){return _0x5a4523['createVideoWindowAll'](_0x269389,_0x5a4523[a0_0x256f('0x425')][a0_0x256f('0xbf')],_0x5a4523[a0_0x256f('0x666')][_0x1ad1e3],_0x5a4523[a0_0x256f('0x342')][_0x1ad1e3],_0x5a4523[a0_0x256f('0x457')][_0x1ad1e3],_0x269389+_0x5a4523[a0_0x256f('0x342')][_0x1ad1e3]);}):this[a0_0x256f('0x1b9')](this[a0_0x256f('0x425')][a0_0x256f('0x26d')],this[a0_0x256f('0x425')][a0_0x256f('0xbf')],this[a0_0x256f('0x666')][0x0],this[a0_0x256f('0x342')][0x0],this[a0_0x256f('0x457')][0x0],this[a0_0x256f('0x425')][a0_0x256f('0x26d')]+this[a0_0x256f('0x457')][0x0]);}},{'key':'isArray','value':function(_0x1059be){return a0_0x256f('0x560')==typeof Array[a0_0x256f('0x4e3')]?Array[a0_0x256f('0x4e3')](_0x1059be):a0_0x256f('0x5e0')===Object[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](_0x1059be);}},{'key':'createVideoWindowAll','value':function(_0xce1a9c,_0x128353,_0x3928da,_0x250877,_0x43ce96,_0x407443){var _0x159129=this,_0x18bb3d=_0x10dca6[a0_0x256f('0x534')]['fromDegrees'](_0x3928da[a0_0x256f('0x520')],_0x3928da[a0_0x256f('0x2b1')],_0x3928da[a0_0x256f('0x4fa')]||0xc8),_0x52b746=_0x10dca6[a0_0x256f('0x5d5')][a0_0x256f('0x380')](this['_viewer'][a0_0x256f('0x2b0')],_0x18bb3d),_0x5a69ec=document[a0_0x256f('0x273')](a0_0x256f('0x64f'));_0x5a69ec['innerHTML']=a0_0x256f('0x1fc')+_0x250877+a0_0x256f('0x159'),_0x5a69ec['setAttribute']('id',_0xce1a9c),_0x5a69ec['className']=_0x128353||'',new _0x159129[(a0_0x256f('0x2b7'))]['EZUIPlayer']({'id':_0x250877,'autoplay':!0x0,'url':_0x43ce96,'accessToken':_0x159129['_token'],'decoderPath':a0_0x256f('0x196')}),document['getElementById']('cesiumContainer')['appendChild'](_0x5a69ec),document[a0_0x256f('0xfa')](_0xce1a9c)['style']['left']=_0x52b746['x']-document['getElementById'](_0xce1a9c)[a0_0x256f('0x302')]/0x2+'px',document[a0_0x256f('0xfa')](_0xce1a9c)[a0_0x256f('0x19b')][a0_0x256f('0x305')]=_0x52b746['y']-document[a0_0x256f('0xfa')](_0xce1a9c)[a0_0x256f('0x430')]+0x14+'px';var _0x33c096=new _0x10dca6[(a0_0x256f('0x326'))](_0x3928da[a0_0x256f('0x520')],_0x3928da[a0_0x256f('0x2b1')]);_0x159129[a0_0x256f('0x2e7')](_0x33c096,_0xce1a9c),this[a0_0x256f('0x454')][a0_0x256f('0x2b0')]['postRender'][a0_0x256f('0x429')](function(){var _0xec0679=_0x10dca6[a0_0x256f('0x5d5')][a0_0x256f('0x380')](_0x159129[a0_0x256f('0x454')][a0_0x256f('0x2b0')],_0x18bb3d);_0x33c096['x']===_0xec0679['x']&&_0x33c096['y']===_0xec0679['y']||(_0x159129['positionPopUp'](_0xec0679,_0xce1a9c),_0x33c096=_0xec0679);});}},{'key':a0_0x256f('0x43e'),'value':function(){}},{'key':a0_0x256f('0x2e7'),'value':function(_0x1b0bfd,_0x2a56e2){var _0x1103ea=_0x1b0bfd['x']-document[a0_0x256f('0xfa')](_0x2a56e2)[a0_0x256f('0x302')]/0x2,_0x143f55=_0x1b0bfd['y']-document['getElementById'](_0x2a56e2)[a0_0x256f('0x430')];document[a0_0x256f('0xfa')](_0x2a56e2)[a0_0x256f('0x19b')]['left']=_0x1103ea+'px',document[a0_0x256f('0xfa')](_0x2a56e2)['style'][a0_0x256f('0x305')]=_0x143f55+'px';}},{'key':a0_0x256f('0x488'),'get':function(){return this[a0_0x256f('0x454')];}},{'key':'EZUIKit','get':function(){return this[a0_0x256f('0x2b7')];}},{'key':a0_0x256f('0x555'),'get':function(){return this['_popup'];}},{'key':a0_0x256f('0x13c'),'get':function(){return this[a0_0x256f('0x666')];}},{'key':'token','get':function(){return this[a0_0x256f('0x172')];}},{'key':a0_0x256f('0x1c1'),'get':function(){return this[a0_0x256f('0x342')];}},{'key':a0_0x256f('0x583'),'get':function(){return this[a0_0x256f('0x457')];}}]),_0xdda24f;}(),_0x41e8d2=DC['Namespace'][a0_0x256f('0x224')],_0x3c1780=function(){function _0x38e90e(){_0x3c0ba4()(this,_0x38e90e);}return _0x6f111f()(_0x38e90e,null,[{'key':a0_0x256f('0x5dd'),'value':function(_0x2ff96a,_0x58fd14){var _0x4953b5;if(_0x58fd14[a0_0x256f('0x39e')])_0x4953b5=_0x58fd14['dragger'];else{var _0x2a50c5=_0x41e8d2[a0_0x256f('0x9f')](_0x58fd14[a0_0x256f('0x13c')],_0x41e8d2[a0_0x256f('0x534')]['ZERO']),_0x5f2989=_0x41e8d2[a0_0x256f('0x9f')](_0x58fd14[a0_0x256f('0x4e6')],a0_0x256f('0x18b'));_0x4953b5=_0x2ff96a[a0_0x256f('0x365')]['add']({'position':_0x2a50c5,'billboard':{'scale':0x1,'heightReference':_0x58fd14[a0_0x256f('0x1c0')]?_0x41e8d2['HeightReference']['CLAMP_TO_GROUND']:_0x41e8d2[a0_0x256f('0x4b3')]['NONE'],'image':_0x5f2989}});}return _0x4953b5[a0_0x256f('0x3dd')]=!0x0,_0x4953b5[a0_0x256f('0x36c')]=_0x41e8d2[a0_0x256f('0x9f')](_0x58fd14[a0_0x256f('0x36c')],null),_0x4953b5[a0_0x256f('0x547')]=_0x41e8d2['defaultValue'](_0x58fd14[a0_0x256f('0x547')],!0x0),_0x4953b5[a0_0x256f('0x1b')]=_0x41e8d2[a0_0x256f('0x9f')](_0x58fd14[a0_0x256f('0x1b')],!0x1),_0x4953b5[a0_0x256f('0x529')]=_0x41e8d2[a0_0x256f('0x9f')](_0x58fd14[a0_0x256f('0x1b')],!0x1),_0x4953b5;}},{'key':a0_0x256f('0x4ae'),'value':function(_0x1f2121){for(var _0x44f8da=[],_0x5a2074=0x0;_0x5a2074<_0x1f2121[a0_0x256f('0x658')];_0x5a2074++){var _0x22b539=_0x41e8d2['Cartographic'][a0_0x256f('0x296')](_0x1f2121[_0x5a2074]),_0x1128c5=Number(_0x41e8d2[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x22b539[a0_0x256f('0x520')])[a0_0x256f('0x478')](0x6)),_0x328549=Number(_0x41e8d2[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x22b539['latitude'])['toFixed'](0x6)),_0x27d528=Number(_0x22b539[a0_0x256f('0x4fa')][a0_0x256f('0x478')](0x1));_0x44f8da[a0_0x256f('0x289')]([_0x1128c5,_0x328549,_0x27d528]);}return _0x44f8da;}},{'key':a0_0x256f('0x4d2'),'value':function(_0x116d35,_0x3f5b20){null==_0x3f5b20&&(_0x3f5b20=0x0);var _0x2d2633=_0x3f5b20;if(null==_0x116d35||0x0==_0x116d35[a0_0x256f('0x658')])return _0x2d2633;for(var _0xa01626=(_0x116d35[0x0],0x0);_0xa01626<_0x116d35[a0_0x256f('0x658')];_0xa01626++){var _0x4a349f=_0x41e8d2['Cartographic'][a0_0x256f('0x296')](_0x116d35[_0xa01626]);_0x4a349f[a0_0x256f('0x4fa')]>_0x2d2633&&(_0x2d2633=_0x4a349f[a0_0x256f('0x4fa')]);}return _0x2d2633;}},{'key':a0_0x256f('0x447'),'value':function(_0x1265db,_0x267d7a){if(_0x1265db instanceof Array){for(var _0x503ba0=[],_0x4ab2d6=0x0;_0x4ab2d6<_0x1265db['length'];_0x4ab2d6++){var _0x9dd045=_0x41e8d2[a0_0x256f('0x22d')]['WGS84'][a0_0x256f('0x228')](_0x1265db[_0x4ab2d6]),_0x562a66={'lon':_0x41e8d2['Math'][a0_0x256f('0xec')](_0x9dd045[a0_0x256f('0x520')]),'lat':_0x41e8d2[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x9dd045[a0_0x256f('0x2b1')]),'hgt':Math[a0_0x256f('0x23a')](Number(_0x9dd045[a0_0x256f('0x4fa')])+Number(_0x267d7a))},_0x4efc81=[Number(_0x562a66[a0_0x256f('0x4f6')]),Number(_0x562a66[a0_0x256f('0x44a')]),Number(_0x562a66['hgt'])];_0x503ba0=_0x503ba0['concat'](_0x4efc81);}return _0x41e8d2[a0_0x256f('0x534')]['fromDegreesArrayHeights'](_0x503ba0);}_0x9dd045=_0x41e8d2[a0_0x256f('0x22d')]['WGS84'][a0_0x256f('0x228')](_0x1265db);var _0x46948a=Number(_0x41e8d2[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x9dd045[a0_0x256f('0x520')])[a0_0x256f('0x478')](0x6)),_0x12a19e=Number(_0x41e8d2[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x9dd045['latitude'])[a0_0x256f('0x478')](0x6));return _0x41e8d2[a0_0x256f('0x534')][a0_0x256f('0x641')](_0x46948a,_0x12a19e,Number(_0x9dd045[a0_0x256f('0x4fa')])+Number(_0x267d7a));}},{'key':a0_0x256f('0x4ca'),'value':function(_0x5ca301,_0x281616){var _0xa7f135=_0x41e8d2['Cartographic']['fromCartesian'](_0x5ca301),_0x5e4cf7=Number(_0x41e8d2['Math'][a0_0x256f('0xec')](_0xa7f135['longitude'])),_0x1b8d06=Number(_0x41e8d2[a0_0x256f('0x4bb')]['toDegrees'](_0xa7f135[a0_0x256f('0x2b1')])),_0x481fc9=Number(_0xa7f135[a0_0x256f('0x4fa')]['toFixed'](0x2)),_0x7d3f0f=_0x41e8d2['Cartographic'][a0_0x256f('0x296')](_0x281616),_0x43934f=Number(_0x41e8d2[a0_0x256f('0x4bb')]['toDegrees'](_0x7d3f0f[a0_0x256f('0x520')])),_0x58d1f3=Number(_0x41e8d2[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x7d3f0f[a0_0x256f('0x2b1')])),_0x3bb215=Number(_0x7d3f0f[a0_0x256f('0x4fa')][a0_0x256f('0x478')](0x2));return _0x481fc9>_0x3bb215?_0x41e8d2[a0_0x256f('0x534')][a0_0x256f('0x641')](_0x43934f,_0x58d1f3,_0x481fc9):_0x41e8d2[a0_0x256f('0x534')][a0_0x256f('0x641')](_0x5e4cf7,_0x1b8d06,_0x3bb215);}},{'key':'getHDistance','value':function(_0x17cfea,_0x3187af){var _0x2ca6f2=this['getZHeightPosition'](_0x17cfea,_0x3187af),_0x14f9d2=_0x41e8d2['Cartographic'][a0_0x256f('0x296')](_0x3187af),_0x478f5e=_0x41e8d2[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x2ca6f2),_0x170624=_0x41e8d2[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x17cfea,_0x2ca6f2);return Math[a0_0x256f('0x15b')](Number(_0x478f5e[a0_0x256f('0x4fa')])-Number(_0x14f9d2[a0_0x256f('0x4fa')]))<0.01&&(_0x170624=_0x41e8d2[a0_0x256f('0x534')]['distance'](_0x3187af,_0x2ca6f2)),_0x170624;}},{'key':a0_0x256f('0x17a'),'value':function(_0x438ca2,_0x16776a){var _0x3f83f3=_0x41e8d2[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x438ca2),_0x28c870=Number(_0x41e8d2[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x3f83f3[a0_0x256f('0x520')])),_0x1df002=Number(_0x41e8d2['Math']['toDegrees'](_0x3f83f3['latitude'])),_0x1219bb=Number(_0x3f83f3['height'][a0_0x256f('0x478')](0x2)),_0x2ba954=_0x41e8d2[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x16776a),_0x5a7706=(_0x28c870+Number(_0x41e8d2[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x2ba954[a0_0x256f('0x520')])))/0x2,_0x356914=(_0x1df002+Number(_0x41e8d2['Math'][a0_0x256f('0xec')](_0x2ba954[a0_0x256f('0x2b1')])))/0x2,_0x343421=(_0x1219bb+Number(_0x2ba954[a0_0x256f('0x4fa')][a0_0x256f('0x478')](0x2)))/0x2;return _0x41e8d2['Cartesian3'][a0_0x256f('0x641')](_0x5a7706,_0x356914,_0x343421);}},{'key':a0_0x256f('0x3f3'),'value':function(_0x2435a7){if(!_0x2435a7)return null;switch(_0x2435a7[a0_0x256f('0x195')]){case a0_0x256f('0x1e0'):return this[a0_0x256f('0x35f')](_0x2435a7['coordinates'][0x0]);case a0_0x256f('0x156'):return this[a0_0x256f('0x37a')](_0x2435a7[a0_0x256f('0x661')]);case'Polygon':return this[a0_0x256f('0x37a')](_0x2435a7[a0_0x256f('0x661')][0x0]);case a0_0x256f('0x5eb'):return this[a0_0x256f('0x37a')](_0x2435a7[a0_0x256f('0x661')]);default:throw new Error(a0_0x256f('0x34b'));}}},{'key':a0_0x256f('0x35f'),'value':function(_0xdb9a38){return _0x41e8d2[a0_0x256f('0x534')][a0_0x256f('0x641')](Number(_0xdb9a38[0x0]),Number(_0xdb9a38[0x1]),Number(_0xdb9a38[0x2]||0x0));}},{'key':'lonLatsToCartesians','value':function(_0x528463){for(var _0x439ec2=[],_0x38f971=0x0;_0x38f971<_0x528463[a0_0x256f('0x658')];_0x38f971++){var _0x58a862=[Number(_0x528463[_0x38f971][0x0]),Number(_0x528463[_0x38f971][0x1]),Number(_0x528463[_0x38f971][0x2]||0x0)];_0x439ec2=_0x439ec2[a0_0x256f('0x318')](_0x58a862);}return _0x41e8d2[a0_0x256f('0x534')][a0_0x256f('0x5a4')](_0x439ec2);}},{'key':a0_0x256f('0x1f4'),'value':function(_0xad23f3){var _0x570a50,_0x1ad397={};if(_0x1ad397['type']=a0_0x256f('0x456'),_0x1ad397[a0_0x256f('0x539')]=[],(_0x570a50=a0_0x256f('0xa9')==typeof _0xad23f3?JSON[a0_0x256f('0x1c5')](_0xad23f3):_0xad23f3)instanceof Array){for(var _0x48abba=0x0;_0x48abba<_0x570a50[a0_0x256f('0x658')];_0x48abba++){var _0x4c4b92={'type':a0_0x256f('0x2a')};_0x4c4b92[a0_0x256f('0x624')]=_0x570a50[_0x48abba][a0_0x256f('0x624')]||_0x570a50[_0x48abba][a0_0x256f('0x3da')],_0x4c4b92['geometry']=_0x570a50[_0x48abba][a0_0x256f('0x17b')]||_0x570a50[_0x48abba][a0_0x256f('0x351')],_0x1ad397[a0_0x256f('0x539')][a0_0x256f('0x289')](_0x4c4b92);}return JSON[a0_0x256f('0x13a')](_0x1ad397);}if(_0xad23f3['features']&&_0xad23f3[a0_0x256f('0x539')]instanceof Array)return _0xad23f3;}},{'key':a0_0x256f('0x3ab'),'value':function(_0x4ff353){var _0x13003d={};try{_0x13003d=JSON[a0_0x256f('0x1c5')](_0x4ff353);}catch(_0x14abc){return void haoutil[a0_0x256f('0x63b')](_0x14abc[a0_0x256f('0x215')]+':\x20'+_0x14abc[a0_0x256f('0x465')]+'\x20\x0a请确认json文件格式正确!!!');}for(var _0x214696=_0x13003d[a0_0x256f('0x539')],_0x3966a6=[],_0x342b98=0x0;_0x342b98<_0x214696[a0_0x256f('0x658')];_0x342b98++){var _0x5dc310=_0x214696[_0x342b98],_0x47fe04={'dataID':_0x5dc310[a0_0x256f('0x624')][a0_0x256f('0x231')]['id'],'dataType':_0x5dc310[a0_0x256f('0x624')][a0_0x256f('0x231')][a0_0x256f('0x195')],'properties':_0x5dc310[a0_0x256f('0x624')],'geometry':_0x5dc310['geometry']};_0x3966a6[a0_0x256f('0x289')](_0x47fe04);}return JSON[a0_0x256f('0x13a')](_0x3966a6);}},{'key':a0_0x256f('0x61f'),'value':function(_0x333754){var _0x72482a=_0x333754[a0_0x256f('0x488')],_0x3b2e44=_0x333754[a0_0x256f('0x50b')];if(null!=_0x3b2e44&&0x0!=_0x3b2e44[a0_0x256f('0x658')]){for(var _0x37742e=_0x41e8d2['PolylinePipeline']['generateArc']({'positions':_0x3b2e44,'granularity':_0x333754[a0_0x256f('0x2fb')]||0.00001}),_0x2dc24b=[],_0x27852a=_0x72482a[a0_0x256f('0x2b0')][a0_0x256f('0x216')][a0_0x256f('0x2f')],_0xb4d444=0x0;_0xb4d444<_0x37742e[a0_0x256f('0x658')];_0xb4d444+=0x3){var _0x2e3940=_0x41e8d2['Cartesian3'][a0_0x256f('0x39c')](_0x37742e,_0xb4d444);_0x2dc24b['push'](_0x27852a['cartesianToCartographic'](_0x2e3940));}var _0xe48a09=_0x41e8d2[a0_0x256f('0x1db')]['fromCartesian'](_0x3b2e44[0x0])[a0_0x256f('0x4fa')];_0x41e8d2[a0_0x256f('0x558')](_0x41e8d2[a0_0x256f('0x614')](_0x72482a[a0_0x256f('0x557')],_0x2dc24b),function(_0x1f34c6){for(var _0x168af9=!0x1,_0x32925f=_0x333754[a0_0x256f('0x64e')]||0x2,_0x1717d5=0x0;_0x1717d5<_0x1f34c6[a0_0x256f('0x658')];++_0x1717d5)null==_0x1f34c6[_0x1717d5][a0_0x256f('0x4fa')]?_0x168af9=!0x0:_0xe48a09=_0x1f34c6[_0x1717d5]['height']||0x0,_0x1f34c6[_0x1717d5][a0_0x256f('0x4fa')]=_0x32925f+(_0x1f34c6[_0x1717d5]['height']||_0xe48a09);var _0x264fac=_0x27852a[a0_0x256f('0x5c5')](_0x1f34c6);_0x333754[a0_0x256f('0x535')]?_0x333754['calback'](_0x264fac,_0x168af9):_0x3b2e44['setValue']&&_0x3b2e44[a0_0x256f('0x171')](_0x264fac);});}else _0x333754[a0_0x256f('0x535')]&&_0x333754[a0_0x256f('0x535')](_0x3b2e44);}}]),_0x38e90e;}(),_0x5eef8d=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x4ba997=function(){function _0x425dbe(_0x3302ed,_0x2d8beb,_0x1d702e){_0x3c0ba4()(this,_0x425dbe),this[a0_0x256f('0x488')]=_0x3302ed,this[a0_0x256f('0x150')]=_0x2d8beb,this[a0_0x256f('0x26f')]=[],_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragger':_0x2d8beb,'onDrag':function(_0x264568,_0x5ae79a){var _0x9f3801=new _0x5eef8d[(a0_0x256f('0x534'))]();_0x5eef8d[a0_0x256f('0x534')][a0_0x256f('0xfd')](_0x5ae79a,_0x2d8beb[a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x9f3801),_0x2d8beb[a0_0x256f('0x13c')][a0_0x256f('0x110')]=_0x5ae79a,_0x2d8beb[a0_0x256f('0x46f')]();}});}return _0x6f111f()(_0x425dbe,[{'key':a0_0x256f('0x66'),'value':function(){}},{'key':a0_0x256f('0x42'),'value':function(){this[a0_0x256f('0x26f')]=[];}}]),_0x425dbe;}(),_0x7240af=DC[a0_0x256f('0x3bd')]['Cesium'],_0x228adf=function(){function _0xc1bbe6(_0x1f1d29,_0x8cb3fa){_0x3c0ba4()(this,_0xc1bbe6),this['_type']=_0x8cb3fa,this['_value']=void 0x0,this['_hasClone']=!0x1,this[a0_0x256f('0x62e')]=!0x1,this[a0_0x256f('0x18c')]=new _0x7240af[(a0_0x256f('0x4c9'))](),this['_constant']=!0x1,this[a0_0x256f('0x171')](_0x1f1d29);}return _0x6f111f()(_0xc1bbe6,[{'key':'getValue','value':function(_0x1fc6af,_0x4f7ab8){return this[a0_0x256f('0x245')]?{'positions':this['_value']}:this[a0_0x256f('0x3d5')]?this[a0_0x256f('0x110')][a0_0x256f('0x444')](_0x4f7ab8):this[a0_0x256f('0x110')];}},{'key':a0_0x256f('0x171'),'value':function(_0x9c1add){var _0x40ef0f=this[a0_0x256f('0x110')];if(_0x40ef0f!==_0x9c1add){var _0x53ec79=_0x7240af['defined'](_0x9c1add),_0x2c12b8=_0x53ec79&&a0_0x256f('0x560')==typeof _0x9c1add[a0_0x256f('0x444')],_0x192120=_0x53ec79&&a0_0x256f('0x560')==typeof _0x9c1add['equals'];this[a0_0x256f('0x3d5')]=_0x2c12b8,this[a0_0x256f('0x62e')]=_0x192120,(!_0x192120||!_0x9c1add[a0_0x256f('0x2ad')](_0x40ef0f))&&(this['_value']=_0x2c12b8?_0x9c1add['clone']():_0x9c1add,this[a0_0x256f('0x18c')][a0_0x256f('0x52f')](this));}}},{'key':a0_0x256f('0x2ad'),'value':function(_0x892f56){return this===_0x892f56||_0x892f56 instanceof _0xc1bbe6&&(!this[a0_0x256f('0x62e')]&&this['_value']===_0x892f56[a0_0x256f('0x110')]||this['_hasEquals']&&this[a0_0x256f('0x110')][a0_0x256f('0x2ad')](_0x892f56[a0_0x256f('0x110')]));}},{'key':a0_0x256f('0x621'),'value':function(_0x82495b){return this['_value'];}},{'key':a0_0x256f('0x270'),'value':function(_0x2fe094){return String(this[a0_0x256f('0x110')]);}}]),_0xc1bbe6;}(),_0x4d3c59=DC['Namespace'][a0_0x256f('0x224')],_0x3baa45={'typename':'billboard','startDraw':function(_0x12cf9c,_0x5e3f88){var _0x486d12=this['attribute2Entity'](_0x5e3f88);return _0x12cf9c['entities'][a0_0x256f('0x53d')]({'billboard':_0x486d12,'attribute':_0x5e3f88});},'attribute2Entity':function(_0x3e702e,_0x12b7d2){for(var _0x161c99 in(null==_0x12b7d2&&(_0x12b7d2={'scale':0x1,'horizontalOrigin':_0x4d3c59[a0_0x256f('0x21d')]['CENTER'],'verticalOrigin':_0x4d3c59[a0_0x256f('0x1b3')][a0_0x256f('0x125')]}),_0x3e702e[a0_0x256f('0x19b')])){var _0x615bb6=_0x3e702e['style'][_0x161c99];switch(_0x161c99){default:_0x12b7d2[_0x161c99]=_0x615bb6;break;case'opacity':_0x12b7d2[a0_0x256f('0x544')]=new _0x4d3c59['Color']['fromCssColorString'](a0_0x256f('0x4b7'))[a0_0x256f('0x2e4')](Number(_0x615bb6||0x1));break;case'rotation':_0x12b7d2[a0_0x256f('0x4ef')]=_0x4d3c59[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x615bb6);}}return _0x12b7d2;},'getEditor':function(_0x307c1c,_0x190e85,_0x4717b3){return new _0x4ba997(_0x307c1c,_0x190e85,_0x4717b3);},'setPositions':function(_0x367327,_0x582df9){_0x367327[a0_0x256f('0x13c')]=new _0x228adf(_0x582df9);},'getPositions':function(_0x311331){return[_0x311331['position'][a0_0x256f('0x110')]];},'getCoordinates':function(_0x26db60){var _0xe1c08c=this['getPositions'](_0x26db60);return _0x3c1780[a0_0x256f('0x4ae')](_0xe1c08c);},'toGeoJSON':function(_0x58caf8){var _0x48dfad=this[a0_0x256f('0x4ae')](_0x58caf8);return{'type':a0_0x256f('0x2a'),'properties':_0x58caf8[a0_0x256f('0x14a')],'geometry':{'type':a0_0x256f('0x1e0'),'coordinates':_0x48dfad}};}},_0x184f8e=DC['Namespace'][a0_0x256f('0x224')],_0x2c0d94=function(){function _0x190f86(_0x44f759,_0x282c73,_0x71adcb){_0x3c0ba4()(this,_0x190f86),this['viewer']=_0x44f759,this[a0_0x256f('0x150')]=_0x282c73,this[a0_0x256f('0x2eb')]=_0x71adcb,this['draggers']=[],this['heightDraggers']=[],this[a0_0x256f('0x445')]();}return _0x6f111f()(_0x190f86,[{'key':a0_0x256f('0x445'),'value':function(){var _0x45bb31=this,_0x1eabee=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':this['options']['dragIcon'],'position':this['entity']['position'][a0_0x256f('0x110')],'onDrag':function(_0xc839a6,_0x321844){var _0x3a5bee=new _0x184f8e[(a0_0x256f('0x534'))]();_0x184f8e['Cartesian3'][a0_0x256f('0xfd')](_0x321844,_0x45bb31[a0_0x256f('0x150')]['position'][a0_0x256f('0x110')],_0x3a5bee);var _0x4140f8=_0x184f8e[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x321844),_0x4a8beb=Number(_0x4140f8['height'])['toFixed'](0x2);_0x45bb31[a0_0x256f('0x150')][a0_0x256f('0x63d')][a0_0x256f('0x4fa')]=new _0x184f8e['ConstantProperty'](_0x4140f8[a0_0x256f('0x4fa')]),_0x45bb31[a0_0x256f('0x150')][a0_0x256f('0x14a')]['style'][a0_0x256f('0x4fa')]=_0x4a8beb,_0x45bb31[a0_0x256f('0x150')][a0_0x256f('0x13c')][a0_0x256f('0x110')]=_0x321844;var _0x38a7e0=new _0x184f8e[(a0_0x256f('0x534'))]();_0x184f8e[a0_0x256f('0x534')]['add'](_0xc839a6[a0_0x256f('0x143')][a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x3a5bee,_0x38a7e0),_0xc839a6['majorDragger'][a0_0x256f('0x13c')]=new _0x184f8e['ConstantProperty'](_0x38a7e0),_0x184f8e[a0_0x256f('0x534')][a0_0x256f('0x53d')](_0xc839a6[a0_0x256f('0x65')][a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x3a5bee,_0x38a7e0),_0xc839a6[a0_0x256f('0x65')][a0_0x256f('0x13c')]=new _0x184f8e['ConstantProperty'](_0x38a7e0),null!=_0x45bb31['entity'][a0_0x256f('0x14a')]['style'][a0_0x256f('0x399')]&&_0x45bb31[a0_0x256f('0x593')](),_0x45bb31['entity'][a0_0x256f('0x46f')]();}});this[a0_0x256f('0x26f')]['push'](_0x1eabee);var _0x221d99=_0x184f8e['EllipseGeometryLibrary']['computeEllipsePositions']({'center':this['entity'][a0_0x256f('0x13c')]['_value'],'semiMinorAxis':this['entity']['ellipse'][a0_0x256f('0x179')][a0_0x256f('0x110')],'semiMajorAxis':this[a0_0x256f('0x150')][a0_0x256f('0x63d')][a0_0x256f('0x122')]['_value'],'rotation':_0x184f8e['Math'][a0_0x256f('0x1b4')](Number(this[a0_0x256f('0x150')][a0_0x256f('0x14a')]['style'][a0_0x256f('0x4ef')]||0x0)),'granularity':0x2},!0x0,!0x1),_0x121915=new _0x184f8e[(a0_0x256f('0x534'))](_0x221d99['positions'][0x0],_0x221d99[a0_0x256f('0x50b')][0x1],_0x221d99['positions'][0x2]),_0x21fff0=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':this[a0_0x256f('0x2eb')]['dragIcon'],'position':_0x121915,'onDrag':function(_0x208250,_0x47f927){var _0x2544e3=_0x184f8e[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x45bb31[a0_0x256f('0x150')][a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x47f927);_0x45bb31['entity'][a0_0x256f('0x63d')][a0_0x256f('0x122')]=new _0x184f8e[(a0_0x256f('0x3d4'))](_0x2544e3),_0x45bb31[a0_0x256f('0x150')]['attribute']['style'][a0_0x256f('0x122')]=Number(_0x2544e3)[a0_0x256f('0x478')](0x2),null!=_0x45bb31[a0_0x256f('0x150')][a0_0x256f('0x14a')][a0_0x256f('0x19b')]['extrudedHeight']&&_0x45bb31[a0_0x256f('0x593')](),_0x45bb31[a0_0x256f('0x150')][a0_0x256f('0x46f')]();}});_0x1eabee[a0_0x256f('0x143')]=_0x21fff0,this[a0_0x256f('0x26f')][a0_0x256f('0x289')](_0x21fff0);var _0x401cc7=new _0x184f8e['Cartesian3'](_0x221d99['positions'][0x3],_0x221d99['positions'][0x4],_0x221d99[a0_0x256f('0x50b')][0x5]),_0x24d9e7=_0x3c1780['createDragger'](this[a0_0x256f('0x488')],{'dragIcon':this['options']['dragIcon'],'position':_0x401cc7,'onDrag':function(_0x55725d,_0x20f8c2){var _0x239126=_0x184f8e[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x45bb31[a0_0x256f('0x150')]['position'][a0_0x256f('0x110')],_0x20f8c2);_0x45bb31['entity'][a0_0x256f('0x63d')][a0_0x256f('0x179')]=new _0x184f8e['ConstantProperty'](_0x239126),_0x45bb31[a0_0x256f('0x150')][a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x179')]=Number(_0x239126)[a0_0x256f('0x478')](0x2),null!=_0x45bb31[a0_0x256f('0x150')]['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x399')]&&_0x45bb31['updateHeightDraggers'](),_0x45bb31[a0_0x256f('0x150')][a0_0x256f('0x46f')]();}});_0x1eabee[a0_0x256f('0x65')]=_0x24d9e7,this['draggers'][a0_0x256f('0x289')](_0x24d9e7),null!=this[a0_0x256f('0x150')]['attribute']['style'][a0_0x256f('0x399')]&&this[a0_0x256f('0x31f')]();}},{'key':a0_0x256f('0x31f'),'value':function(){var _0x4ddcd5=this,_0x170381=Number(this[a0_0x256f('0x150')][a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')])-Number(this['entity'][a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x4fa')]),_0x50d3c0=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':this[a0_0x256f('0x2eb')]['dragIcon'],'position':_0x3c1780[a0_0x256f('0x447')](this[a0_0x256f('0x150')][a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x170381),'onDrag':function(_0xcab1f0,_0x271a33){var _0x1d32ad=new _0x184f8e['Cartesian3']();_0x184f8e[a0_0x256f('0x534')][a0_0x256f('0xfd')](_0x271a33,_0x4ddcd5[a0_0x256f('0x150')][a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x1d32ad);var _0x320843=_0x184f8e[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x271a33),_0x19747d=Number(_0x320843[a0_0x256f('0x4fa')])[a0_0x256f('0x478')](0x2);_0x4ddcd5[a0_0x256f('0x150')][a0_0x256f('0x13c')][a0_0x256f('0x110')]=_0x271a33,_0x4ddcd5[a0_0x256f('0x150')][a0_0x256f('0x63d')][a0_0x256f('0x399')]=new _0x184f8e[(a0_0x256f('0x3d4'))](Number(_0x19747d)+Number(_0x170381)),_0x4ddcd5[a0_0x256f('0x150')][a0_0x256f('0x63d')][a0_0x256f('0x4fa')]=new _0x184f8e['ConstantProperty'](_0x320843[a0_0x256f('0x4fa')]),_0x4ddcd5[a0_0x256f('0x150')]['attribute']['style'][a0_0x256f('0x399')]=Number(_0x19747d)+Number(_0x170381),_0x4ddcd5[a0_0x256f('0x150')][a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x4fa')]=_0x19747d,_0x4ddcd5[a0_0x256f('0x66')](),_0x4ddcd5[a0_0x256f('0x150')][a0_0x256f('0x46f')]();}});this[a0_0x256f('0x550')][a0_0x256f('0x289')](_0x50d3c0);var _0x377b28=_0x184f8e[a0_0x256f('0x602')][a0_0x256f('0x29')]({'center':this[a0_0x256f('0x150')][a0_0x256f('0x13c')][a0_0x256f('0x110')],'semiMinorAxis':this[a0_0x256f('0x150')][a0_0x256f('0x63d')][a0_0x256f('0x179')][a0_0x256f('0x110')],'semiMajorAxis':this[a0_0x256f('0x150')]['ellipse'][a0_0x256f('0x122')][a0_0x256f('0x110')],'rotation':_0x184f8e[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](Number(this[a0_0x256f('0x150')][a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x4ef')]||0x0)),'granularity':0x2},!0x0,!0x1),_0x31ec7d=new _0x184f8e[(a0_0x256f('0x534'))](_0x377b28[a0_0x256f('0x50b')][0x0],_0x377b28['positions'][0x1],_0x377b28[a0_0x256f('0x50b')][0x2]),_0x342482=_0x3c1780[a0_0x256f('0x5dd')](this['viewer'],{'dragIcon':this[a0_0x256f('0x2eb')]['dragIcon'],'position':_0x3c1780[a0_0x256f('0x447')](_0x31ec7d,_0x170381),'onDrag':function(_0x554a87,_0x3e9698){var _0x3d98eb=_0x184f8e['Cartographic']['fromCartesian'](_0x3e9698);_0x4ddcd5[a0_0x256f('0x150')][a0_0x256f('0x63d')][a0_0x256f('0x399')]=new _0x184f8e[(a0_0x256f('0x3d4'))](_0x3d98eb[a0_0x256f('0x4fa')]),_0x4ddcd5[a0_0x256f('0x150')]['attribute'][a0_0x256f('0x19b')]['extrudedHeight']=Number(_0x3d98eb[a0_0x256f('0x4fa')])[a0_0x256f('0x478')](0x2),_0x4ddcd5[a0_0x256f('0x593')](),_0x4ddcd5['entity'][a0_0x256f('0x46f')]();},'vertical':!0x0,'horizontal':!0x1});this[a0_0x256f('0x550')]['push'](_0x342482);var _0x514df0=new _0x184f8e[(a0_0x256f('0x534'))](_0x377b28[a0_0x256f('0x50b')][0x3],_0x377b28['positions'][0x4],_0x377b28[a0_0x256f('0x50b')][0x5]),_0x190e35=_0x3c1780[a0_0x256f('0x5dd')](this['viewer'],{'dragIcon':this[a0_0x256f('0x2eb')][a0_0x256f('0x4e6')],'position':_0x3c1780['getPositionsWithHeight'](_0x514df0,_0x170381),'onDrag':function(_0xfd5a2b,_0x47e7eb){var _0x4997d2=_0x184f8e[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x47e7eb);_0x4ddcd5[a0_0x256f('0x150')]['ellipse'][a0_0x256f('0x399')]=new _0x184f8e['ConstantProperty'](_0x4997d2[a0_0x256f('0x4fa')]),_0x4ddcd5[a0_0x256f('0x150')][a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]=Number(_0x4997d2[a0_0x256f('0x4fa')])[a0_0x256f('0x478')](0x2),_0x4ddcd5[a0_0x256f('0x593')](),_0x4ddcd5[a0_0x256f('0x150')]['changeEditing']();},'vertical':!0x0,'horizontal':!0x1});this[a0_0x256f('0x550')]['push'](_0x190e35);}},{'key':a0_0x256f('0x66'),'value':function(){this[a0_0x256f('0x42')](),this['initDraggers']();}},{'key':'updateHeightDraggers','value':function(){for(i=0x0;i<this[a0_0x256f('0x550')][a0_0x256f('0x658')];i++)this['viewer'][a0_0x256f('0x365')]['remove'](this[a0_0x256f('0x550')][i]);this[a0_0x256f('0x550')]=[],this[a0_0x256f('0x31f')]();}},{'key':a0_0x256f('0x42'),'value':function(){var _0x114101=0x0;for(_0x114101=0x0;_0x114101<this['draggers']['length'];_0x114101++)this[a0_0x256f('0x488')][a0_0x256f('0x365')][a0_0x256f('0x3ec')](this['draggers'][_0x114101]);if(this[a0_0x256f('0x26f')]=[],null!=this['entity'][a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]){for(_0x114101=0x0;_0x114101<this[a0_0x256f('0x550')]['length'];_0x114101++)this[a0_0x256f('0x488')][a0_0x256f('0x365')]['remove'](this[a0_0x256f('0x550')][_0x114101]);this[a0_0x256f('0x550')]=[];}}}]),_0x190f86;}(),_0x52bd5f=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x1374a5={'typename':a0_0x256f('0x63d'),'startDraw':function(_0x226d13,_0x32bf35){var _0x4ea253=this[a0_0x256f('0x373')](_0x32bf35);return _0x226d13['entities'][a0_0x256f('0x53d')]({'ellipse':_0x4ea253,'attribute':_0x32bf35});},'attribute2Entity':function(_0x29aa93,_0x12d268){for(var _0x5067ac in(null==_0x12d268&&(_0x12d268={'show':!0x0,'fill':!0x0}),_0x29aa93[a0_0x256f('0x19b')])){var _0x25fde8=_0x29aa93[a0_0x256f('0x19b')][_0x5067ac];switch(_0x5067ac){default:_0x12d268[_0x5067ac]=_0x25fde8;break;case a0_0x256f('0x136'):case a0_0x256f('0x3b8'):break;case a0_0x256f('0x4d9'):_0x12d268[a0_0x256f('0x4d9')]=new _0x52bd5f[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x25fde8||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](_0x29aa93[a0_0x256f('0x19b')][a0_0x256f('0x3b8')]||_0x29aa93[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1);break;case'color':_0x12d268[a0_0x256f('0x168')]=new _0x52bd5f['Color'][(a0_0x256f('0xe3'))](_0x25fde8||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x29aa93[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));break;case a0_0x256f('0x4ef'):_0x12d268[a0_0x256f('0x4ef')]=_0x52bd5f[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x25fde8);}}return _0x12d268;},'getEditor':function(_0x191e11,_0x4a351b,_0x4163f0){return new _0x2c0d94(_0x191e11,_0x4a351b,_0x4163f0);},'setPositions':function(_0x4ca244,_0x322cef){_0x4ca244[a0_0x256f('0x13c')]=new _0x228adf(_0x322cef);},'getPositions':function(_0x57f746){return[_0x57f746['position'][a0_0x256f('0x110')]];},'getCoordinates':function(_0x57b274){var _0xb7e355=this[a0_0x256f('0x508')](_0x57b274);return _0x3c1780[a0_0x256f('0x4ae')](_0xb7e355);},'toGeoJSON':function(_0xd1c79c){var _0x584aa9=this[a0_0x256f('0x4ae')](_0xd1c79c);return{'type':a0_0x256f('0x2a'),'properties':_0xd1c79c[a0_0x256f('0x14a')],'geometry':{'type':'Point','coordinates':_0x584aa9}};}},_0x2224dd=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0xa236c1=function(){function _0x15e7e6(_0x38cff5,_0x4270bd,_0x317868){_0x3c0ba4()(this,_0x15e7e6),this['viewer']=_0x38cff5,this[a0_0x256f('0x150')]=_0x4270bd,this[a0_0x256f('0x2eb')]=_0x317868,this[a0_0x256f('0x26f')]=[],this[a0_0x256f('0x445')]();}return _0x6f111f()(_0x15e7e6,[{'key':a0_0x256f('0x445'),'value':function(){var _0x3f7623=this,_0x4e2861=this['entity'][a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x21675f=Number(this['entity'][a0_0x256f('0x14a')][a0_0x256f('0x19b')]['heightRadii'])||0x0,_0x44b64f=_0x2224dd[a0_0x256f('0x1db')]['fromCartesian'](_0x4e2861);_0x44b64f[a0_0x256f('0x4fa')]+=_0x21675f;var _0x598d6c=_0x2224dd['Cartesian3']['fromRadians'](_0x44b64f['longitude'],_0x44b64f[a0_0x256f('0x2b1')],_0x44b64f['height']),_0x181f14=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':this['options']['dragIcon'],'position':_0x598d6c,'onDrag':function(_0x3edbcc,_0x19d36a){var _0x5c5b1e=new _0x2224dd[(a0_0x256f('0x534'))]();_0x2224dd[a0_0x256f('0x534')][a0_0x256f('0xfd')](_0x19d36a,_0x3f7623['entity'][a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x5c5b1e);var _0x411595=_0x2224dd[a0_0x256f('0x1db')]['fromCartesian'](_0x19d36a),_0xcfdb57=Number(_0x3f7623[a0_0x256f('0x150')]['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x416')])||0x0;_0x411595[a0_0x256f('0x4fa')]-=_0xcfdb57;var _0x1ff665=_0x2224dd[a0_0x256f('0x534')]['fromRadians'](_0x411595[a0_0x256f('0x520')],_0x411595[a0_0x256f('0x2b1')],_0x411595['height']);_0x3f7623[a0_0x256f('0x150')][a0_0x256f('0x13c')][a0_0x256f('0x110')]=_0x1ff665,_0x3f7623[a0_0x256f('0x150')]['changeEditing']();}});this[a0_0x256f('0x26f')][a0_0x256f('0x289')](_0x181f14);}},{'key':a0_0x256f('0x66'),'value':function(){this[a0_0x256f('0x42')](),this[a0_0x256f('0x445')]();}},{'key':a0_0x256f('0x42'),'value':function(){var _0x40bc0a=0x0;for(_0x40bc0a=0x0;_0x40bc0a<this['draggers'][a0_0x256f('0x658')];_0x40bc0a++)this['viewer'][a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x26f')][_0x40bc0a]);this[a0_0x256f('0x26f')]=[];}}]),_0x15e7e6;}(),_0x18ce40=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x1dd0b3={'typename':'ellipsoid','startDraw':function(_0x5c00ce,_0x3b5802){var _0xf3d589=this[a0_0x256f('0x373')](_0x3b5802);return _0x5c00ce[a0_0x256f('0x365')]['add']({'ellipsoid':_0xf3d589,'attribute':_0x3b5802});},'attribute2Entity':function(_0x4ab64f,_0x3ec502){for(var _0x4f4659 in(null==_0x3ec502&&(_0x3ec502={'show':!0x0,'fill':!0x0}),_0x4ab64f[a0_0x256f('0x19b')])){var _0x6168f2=_0x4ab64f[a0_0x256f('0x19b')][_0x4f4659];switch(_0x4f4659){default:_0x3ec502[_0x4f4659]=_0x6168f2;break;case a0_0x256f('0x136'):case'outlineOpacity':case a0_0x256f('0x101'):case a0_0x256f('0x416'):break;case'outlineColor':_0x3ec502[a0_0x256f('0x4d9')]=new _0x18ce40[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x6168f2||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](_0x4ab64f[a0_0x256f('0x19b')][a0_0x256f('0x3b8')]||_0x4ab64f[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1);break;case a0_0x256f('0x544'):_0x3ec502['material']=new _0x18ce40[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x6168f2||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x4ab64f[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));break;case'extentRadii':var _0x863ba9=_0x4ab64f['style'][a0_0x256f('0x495')]||0x64,_0x1b7b48=_0x4ab64f['style'][a0_0x256f('0x101')]||0x64,_0x2039de=_0x4ab64f[a0_0x256f('0x19b')][a0_0x256f('0x416')]||0x64;_0x3ec502[a0_0x256f('0x4e4')]=new _0x18ce40[(a0_0x256f('0x534'))](_0x863ba9,_0x1b7b48,_0x2039de);}}return _0x3ec502;},'getEditor':function(_0x195b89,_0x58aa12,_0x12bb07){return new _0xa236c1(_0x195b89,_0x58aa12,_0x12bb07);},'setPositions':function(_0x1b701e,_0x4800a1){_0x1b701e['position']=new _0x228adf(_0x4800a1);},'getPositions':function(_0x40d0aa){return[_0x40d0aa[a0_0x256f('0x13c')][a0_0x256f('0x110')]];},'getCoordinates':function(_0x376e51){var _0x175ba5=this['getPositions'](_0x376e51);return _0x3c1780['getCoordinates'](_0x175ba5);},'toGeoJSON':function(_0x3e9b71){var _0x4b2efd=this[a0_0x256f('0x4ae')](_0x3e9b71);return{'type':a0_0x256f('0x2a'),'properties':_0x3e9b71[a0_0x256f('0x14a')],'geometry':{'type':a0_0x256f('0x1e0'),'coordinates':_0x4b2efd}};}},_0x111566=DC[a0_0x256f('0x3bd')]['Cesium'],_0x530ba3={'typename':a0_0x256f('0x3a4'),'startDraw':function(_0x349eef,_0x4ff999){var _0x40aeec=this[a0_0x256f('0x373')](_0x4ff999);return _0x349eef['entities']['add']({'label':_0x40aeec,'attribute':_0x4ff999});},'attribute2Entity':function(_0x5b7344,_0x56ec18){for(var _0xc09caa in(null==_0x56ec18&&(_0x56ec18={'show':!0x0,'scale':0x1,'horizontalOrigin':_0x111566[a0_0x256f('0x21d')][a0_0x256f('0x24c')],'verticalOrigin':_0x111566[a0_0x256f('0x1b3')][a0_0x256f('0x125')]}),_0x5b7344[a0_0x256f('0x19b')])){var _0x5d818d=_0x5b7344[a0_0x256f('0x19b')][_0xc09caa];switch(_0xc09caa){default:_0x56ec18[_0xc09caa]=_0x5d818d;break;case a0_0x256f('0x5c9'):case'font_weight':case'font_size':case a0_0x256f('0x130'):case a0_0x256f('0x644'):break;case a0_0x256f('0x544'):_0x56ec18[a0_0x256f('0x44e')]=new _0x111566[(a0_0x256f('0x54e'))]['fromCssColorString'](_0x5d818d||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x5b7344[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));break;case a0_0x256f('0x52d'):_0x56ec18['style']=_0x5d818d?_0x111566[a0_0x256f('0x128')]['FILL_AND_OUTLINE']:_0x111566['LabelStyle'][a0_0x256f('0x3c4')];break;case a0_0x256f('0x4f9'):_0x56ec18[a0_0x256f('0x4d9')]=new _0x111566[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x5d818d||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x5b7344[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));break;case a0_0x256f('0x176'):_0x56ec18[a0_0x256f('0x312')]=_0x5d818d;break;case a0_0x256f('0x52b'):_0x56ec18[a0_0x256f('0x5f1')]=_0x5d818d;break;case'background_color':_0x56ec18['backgroundColor']=new _0x111566[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x5d818d||'#FFFF00')[a0_0x256f('0x2e4')](Number(_0x5b7344[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));break;case a0_0x256f('0x4e0'):_0x56ec18[a0_0x256f('0x4e0')]=new _0x111566[(a0_0x256f('0x326'))](_0x5b7344[a0_0x256f('0x19b')]['pixelOffset'][0x0],_0x5b7344['style'][a0_0x256f('0x4e0')][0x1]);}}_0x56ec18[a0_0x256f('0x644')]=(_0x5b7344[a0_0x256f('0x19b')][a0_0x256f('0x644')]||'文字')[a0_0x256f('0x255')](new RegExp('<br\x20/>','gm'),'\x0a');var _0x39b507=(_0x5b7344[a0_0x256f('0x19b')][a0_0x256f('0x5c9')]||a0_0x256f('0x3af'))+'\x20small-caps\x20'+(_0x5b7344[a0_0x256f('0x19b')]['font_weight']||a0_0x256f('0x3af'))+'\x20'+(_0x5b7344[a0_0x256f('0x19b')][a0_0x256f('0x660')]||'30')+a0_0x256f('0x264')+(_0x5b7344[a0_0x256f('0x19b')][a0_0x256f('0x130')]||'黑体');return _0x56ec18[a0_0x256f('0x198')]=_0x39b507,_0x56ec18;},'getEditor':function(_0x49fa00,_0x3f56f2,_0x3aaf5b){return new _0x4ba997(_0x49fa00,_0x3f56f2,_0x3aaf5b);},'setPositions':function(_0x51cef8,_0x90f127){_0x51cef8[a0_0x256f('0x13c')]=new _0x228adf(_0x90f127);},'getPositions':function(_0x57f46b){return[_0x57f46b[a0_0x256f('0x13c')][a0_0x256f('0x110')]];},'getCoordinates':function(_0x5badf8){var _0x1e38cc=this[a0_0x256f('0x508')](_0x5badf8);return _0x3c1780[a0_0x256f('0x4ae')](_0x1e38cc);},'toGeoJSON':function(_0x1d5a85){var _0x8308da=this[a0_0x256f('0x4ae')](_0x1d5a85);return{'type':a0_0x256f('0x2a'),'properties':_0x1d5a85[a0_0x256f('0x14a')],'geometry':{'type':'Point','coordinates':_0x8308da}};}},_0x2391cf=(DC['Namespace'][a0_0x256f('0x224')],function(){function _0x373466(_0x42cec9,_0x4bcb1c,_0x4eaf1c){_0x3c0ba4()(this,_0x373466),this['viewer']=_0x42cec9,this[a0_0x256f('0x150')]=_0x4bcb1c,this[a0_0x256f('0x26f')]=[];var _0x1e5d18=_0x4bcb1c['polyline'][a0_0x256f('0x50b')][a0_0x256f('0x110')];_0x4bcb1c[a0_0x256f('0x18d')][a0_0x256f('0x50b')][a0_0x256f('0x2fd')]=!0x1;for(var _0x2da644=0x0;_0x2da644<_0x1e5d18['length'];_0x2da644++){var _0x59163a=_0x1e5d18[_0x2da644],_0x20bdd4=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':_0x4eaf1c['dragIcon'],'position':_0x59163a,'onDrag':function(_0x561647,_0xff9181){_0x1e5d18[_0x561647['index']]=_0xff9181,_0x4bcb1c[a0_0x256f('0x18d')][a0_0x256f('0x50b')]=_0x1e5d18,_0x4bcb1c[a0_0x256f('0x46f')]();}});_0x20bdd4['index']=_0x2da644,this[a0_0x256f('0x26f')]['push'](_0x20bdd4);}}return _0x6f111f()(_0x373466,[{'key':a0_0x256f('0x66'),'value':function(){for(var _0x212ea3=this['entity']['polyline'][a0_0x256f('0x50b')][a0_0x256f('0x21b')](),_0x5beccc=0x0;_0x5beccc<this[a0_0x256f('0x26f')][a0_0x256f('0x658')];_0x5beccc++){var _0x27c00d=_0x212ea3[_0x5beccc];this[a0_0x256f('0x26f')][_0x5beccc][a0_0x256f('0x13c')]=_0x27c00d;}}},{'key':'destroy','value':function(){this[a0_0x256f('0x150')][a0_0x256f('0x18d')][a0_0x256f('0x50b')]['isConstant']=!0x0;for(var _0x559c7f=0x0;_0x559c7f<this['draggers'][a0_0x256f('0x658')];_0x559c7f++)this[a0_0x256f('0x488')]['entities'][a0_0x256f('0x3ec')](this['draggers'][_0x559c7f]);this[a0_0x256f('0x26f')]=[];}}]),_0x373466;}()),_0x3e3f63=DC['Namespace'][a0_0x256f('0x224')],_0x20ac15={'typename':'polyline','startDraw':function(_0x49ae91,_0x260566){var _0x5b2167=this[a0_0x256f('0x373')](_0x260566);return _0x49ae91['entities'][a0_0x256f('0x53d')]({'polyline':_0x5b2167,'attribute':_0x260566});},'attribute2Entity':function(_0x2da817,_0x2580a6){for(var _0x4fa5c3 in(null==_0x2580a6&&(_0x2580a6={'followSurface':!0x0,'positions':new _0x228adf([])}),_0x2da817[a0_0x256f('0x19b')])){var _0x10c00e=_0x2da817['style'][_0x4fa5c3];switch(_0x4fa5c3){default:_0x2580a6[_0x4fa5c3]=_0x10c00e;break;case'lineType':case a0_0x256f('0x544'):case a0_0x256f('0x136'):case'outline':case a0_0x256f('0x312'):case a0_0x256f('0x4d9'):case'outlineOpacity':}}var _0x3502b2=new _0x3e3f63['Color']['fromCssColorString'](_0x2da817['style'][a0_0x256f('0x544')]||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x2da817[a0_0x256f('0x19b')]['opacity']||0x1));switch(_0x2da817[a0_0x256f('0x19b')][a0_0x256f('0x4ec')]){default:case'solid':_0x2da817[a0_0x256f('0x19b')]['outline']?_0x2580a6['material']=new _0x3e3f63['PolylineOutlineMaterialProperty']({'color':_0x3502b2,'outlineWidth':Number(_0x2da817[a0_0x256f('0x19b')][a0_0x256f('0x312')]||0x1),'outlineColor':new _0x3e3f63[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x2da817[a0_0x256f('0x19b')][a0_0x256f('0x4d9')]||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x2da817[a0_0x256f('0x19b')][a0_0x256f('0x3b8')]||_0x2da817[a0_0x256f('0x19b')]['opacity']||0x1))}):_0x2580a6[a0_0x256f('0x168')]=_0x3502b2;break;case'dash':_0x2580a6['material']=new _0x3e3f63[(a0_0x256f('0xe1'))]({'color':_0x3502b2});}return _0x2580a6;},'getEditor':function(_0x36a94a,_0x509ae9,_0x232b8a){return new _0x2391cf(_0x36a94a,_0x509ae9,_0x232b8a);},'setPositions':function(_0x56cf0b,_0x1828bb){_0x56cf0b['polyline'][a0_0x256f('0x50b')]['setValue'](_0x1828bb);},'getPositions':function(_0x96525){return _0x96525['polyline'][a0_0x256f('0x50b')][a0_0x256f('0x110')];},'getCoordinates':function(_0x5a4755){var _0x2d41d5=this[a0_0x256f('0x508')](_0x5a4755);return _0x3c1780[a0_0x256f('0x4ae')](_0x2d41d5);},'toGeoJSON':function(_0x4cbff8){var _0x17cd09=this[a0_0x256f('0x4ae')](_0x4cbff8);return{'type':a0_0x256f('0x2a'),'properties':_0x4cbff8['attribute'],'geometry':{'type':a0_0x256f('0x156'),'coordinates':_0x17cd09}};}},_0x3b1c88=(DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],function(){function _0x425c1e(_0x3f063c,_0x32e372,_0xb0d34f){_0x3c0ba4()(this,_0x425c1e),this[a0_0x256f('0x488')]=_0x3f063c,this[a0_0x256f('0x150')]=_0x32e372,this[a0_0x256f('0x26f')]=[];var _0x14f4f5=_0x32e372[a0_0x256f('0x282')][a0_0x256f('0x50b')][a0_0x256f('0x21b')]();_0x32e372[a0_0x256f('0x282')][a0_0x256f('0x50b')]['isConstant']=!0x1;for(var _0x560b4b=0x0;_0x560b4b<_0x14f4f5[a0_0x256f('0x658')];_0x560b4b++){var _0x3700b6=_0x14f4f5[_0x560b4b],_0x32449d=_0x3c1780[a0_0x256f('0x5dd')](this['viewer'],{'dragIcon':_0xb0d34f[a0_0x256f('0x4e6')],'position':_0x3700b6,'onDrag':function(_0x1180e1,_0x576bd8){_0x14f4f5[_0x1180e1[a0_0x256f('0x27e')]]=_0x576bd8,_0x32e372[a0_0x256f('0x282')][a0_0x256f('0x50b')]=_0x14f4f5,_0x32e372['changeEditing']();}});_0x32449d[a0_0x256f('0x27e')]=_0x560b4b,this['draggers']['push'](_0x32449d);}}return _0x6f111f()(_0x425c1e,[{'key':a0_0x256f('0x66'),'value':function(){for(var _0x48a9f1=this[a0_0x256f('0x150')][a0_0x256f('0x282')][a0_0x256f('0x50b')][a0_0x256f('0x21b')](),_0x3f438e=0x0;_0x3f438e<this[a0_0x256f('0x26f')][a0_0x256f('0x658')];_0x3f438e++){var _0x2b79a3=_0x48a9f1[_0x3f438e];this[a0_0x256f('0x26f')][_0x3f438e][a0_0x256f('0x13c')]=_0x2b79a3;}}},{'key':'destroy','value':function(){this[a0_0x256f('0x150')][a0_0x256f('0x282')]['positions'][a0_0x256f('0x2fd')]=!0x0;for(var _0x3044e3=0x0;_0x3044e3<this[a0_0x256f('0x26f')]['length'];_0x3044e3++)this['viewer']['entities'][a0_0x256f('0x3ec')](this[a0_0x256f('0x26f')][_0x3044e3]);this[a0_0x256f('0x26f')]=[];}}]),_0x425c1e;}()),_0x14018a=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x3ec923={'typename':a0_0x256f('0x282'),'startDraw':function(_0x5135c7,_0x3369d9){var _0x2de5a6=this['attribute2Entity'](_0x3369d9);return _0x5135c7[a0_0x256f('0x365')]['add']({'polylineVolume':_0x2de5a6,'attribute':_0x3369d9});},'attribute2Entity':function(_0x100d51,_0x202740){for(var _0x40073c in(null==_0x202740&&(_0x202740={'positions':new _0x228adf([])}),_0x100d51[a0_0x256f('0x19b')])){var _0x3f5a0d=_0x100d51['style'][_0x40073c];switch(_0x40073c){default:_0x202740[_0x40073c]=_0x3f5a0d;break;case a0_0x256f('0x136'):case a0_0x256f('0x3b8'):case a0_0x256f('0x223'):case a0_0x256f('0x35c'):break;case a0_0x256f('0x4d9'):_0x202740['outlineColor']=new _0x14018a[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x3f5a0d||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](_0x100d51['style'][a0_0x256f('0x3b8')]||_0x100d51[a0_0x256f('0x19b')]['opacity']||0x1);break;case a0_0x256f('0x544'):_0x202740['material']=new _0x14018a[(a0_0x256f('0x54e'))]['fromCssColorString'](_0x3f5a0d||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x100d51[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));}}switch(_0x100d51[a0_0x256f('0x19b')][a0_0x256f('0x223')]=_0x100d51[a0_0x256f('0x19b')][a0_0x256f('0x223')]||0xa,_0x100d51['style'][a0_0x256f('0x35c')]){default:case a0_0x256f('0x5e3'):_0x202740[a0_0x256f('0x35c')]=this[a0_0x256f('0x4c1')](_0x100d51[a0_0x256f('0x19b')]['radius']);break;case a0_0x256f('0x5ca'):_0x202740[a0_0x256f('0x35c')]=this[a0_0x256f('0x58c')](_0x100d51[a0_0x256f('0x19b')][a0_0x256f('0x223')]);break;case a0_0x256f('0x2f8'):_0x202740['shape']=this['_getCorridorShape3'](_0x100d51['style'][a0_0x256f('0x223')]);}return _0x202740;},'_getCorridorShape1':function(_0x545d0e){for(var _0x4919c2=_0x545d0e/0x3,_0x39fef5=[],_0x23acff=0x0;_0x23acff<=0x168;_0x23acff++){var _0x2ca023=_0x14018a[a0_0x256f('0x4bb')]['toRadians'](_0x23acff);_0x39fef5[a0_0x256f('0x289')](new _0x14018a[(a0_0x256f('0x326'))](_0x545d0e*Math[a0_0x256f('0x441')](_0x2ca023),_0x545d0e*Math[a0_0x256f('0x637')](_0x2ca023)));}for(_0x23acff=0x168;_0x23acff>=0x0;_0x23acff--){_0x2ca023=_0x14018a['Math'][a0_0x256f('0x1b4')](_0x23acff),_0x39fef5[a0_0x256f('0x289')](new _0x14018a[(a0_0x256f('0x326'))]((_0x545d0e-_0x4919c2)*Math[a0_0x256f('0x441')](_0x2ca023),(_0x545d0e-_0x4919c2)*Math[a0_0x256f('0x637')](_0x2ca023)));}return _0x39fef5;},'_getCorridorShape2':function(_0x11e46c){for(var _0x66a7ff=[],_0x13fa7d=0x0;_0x13fa7d<=0x168;_0x13fa7d++){var _0x2dfa04=_0x14018a[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x13fa7d);_0x66a7ff['push'](new _0x14018a['Cartesian2'](_0x11e46c*Math[a0_0x256f('0x441')](_0x2dfa04),_0x11e46c*Math['sin'](_0x2dfa04)));}return _0x66a7ff;},'_getCorridorShape3':function(_0x1d4fb9,_0x1d5058){_0x1d5058=_0x1d5058||0x6;for(var _0x2aed93=Math['PI']/_0x1d5058,_0x10be7e=0x2*_0x1d5058,_0x596f87=new Array(_0x10be7e),_0x5bcc14=0x0;_0x5bcc14<_0x10be7e;_0x5bcc14++){var _0x4edd80=_0x5bcc14%0x2==0x0?_0x1d4fb9:_0x1d4fb9/0x3;_0x596f87[_0x5bcc14]=new _0x14018a[(a0_0x256f('0x326'))](Math['cos'](_0x5bcc14*_0x2aed93)*_0x4edd80,Math[a0_0x256f('0x637')](_0x5bcc14*_0x2aed93)*_0x4edd80);}return _0x596f87;},'getEditor':function(_0x4094ee,_0x2ce051,_0x4db229){return new _0x3b1c88(_0x4094ee,_0x2ce051,_0x4db229);},'setPositions':function(_0x2a284a,_0x16bf4c){_0x2a284a[a0_0x256f('0x282')][a0_0x256f('0x50b')]=_0x16bf4c;},'getPositions':function(_0x5bc80f){return _0x5bc80f[a0_0x256f('0x282')]['positions'][a0_0x256f('0x110')];},'getCoordinates':function(_0x4c666a){var _0x11602d=this[a0_0x256f('0x508')](_0x4c666a);return _0x3c1780['getCoordinates'](_0x11602d);},'toGeoJSON':function(_0x5d4e94){var _0x1ced1b=this[a0_0x256f('0x4ae')](_0x5d4e94);return{'type':a0_0x256f('0x2a'),'properties':_0x5d4e94[a0_0x256f('0x14a')],'geometry':{'type':a0_0x256f('0x156'),'coordinates':_0x1ced1b}};}},_0x2c6b81=DC['Namespace']['Cesium'],_0x4a906a=function(){function _0x457c81(_0xe2b942,_0x392c74,_0x5bf497){_0x3c0ba4()(this,_0x457c81),this[a0_0x256f('0x488')]=_0xe2b942,this['entity']=_0x392c74,this[a0_0x256f('0x26f')]=[],this[a0_0x256f('0x550')]=[];var _0x400496=this,_0x35665f=0x0,_0x967ede=_0x392c74[a0_0x256f('0x493')][a0_0x256f('0x3e3')]['_value'];for(_0x392c74[a0_0x256f('0x493')]['hierarchy']['isConstant']=!0x1,_0x35665f=0x0;_0x35665f<_0x967ede[a0_0x256f('0x658')];_0x35665f++){var _0x2d0957=_0x967ede[_0x35665f];if(null!=_0x392c74[a0_0x256f('0x493')]['height']){var _0x18a86f=_0x2c6b81[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x2d0957);_0x18a86f[a0_0x256f('0x4fa')]+=_0x392c74[a0_0x256f('0x493')]['height'][a0_0x256f('0x110')],_0x2d0957=_0x2c6b81['Cartesian3']['fromRadians'](_0x18a86f[a0_0x256f('0x520')],_0x18a86f[a0_0x256f('0x2b1')],_0x18a86f['height']);}(_0x328f2d=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':_0x5bf497[a0_0x256f('0x4e6')],'position':_0x2d0957,'onDrag':function(_0x34d620,_0x598734){_0x34d620[a0_0x256f('0x50b')][_0x34d620[a0_0x256f('0x27e')]]=_0x598734;for(var _0x3f68ac=_0x392c74[a0_0x256f('0x493')]['hierarchy'][a0_0x256f('0x110')],_0x383c80=_0x3f68ac[0x0],_0x26616d=0x1;_0x26616d<_0x3f68ac[a0_0x256f('0x658')];_0x26616d++){var _0x129309=_0x2c6b81['Cartographic']['fromCartesian'](_0x383c80),_0x415ed1=_0x2c6b81[a0_0x256f('0x1db')]['fromCartesian'](_0x3f68ac[_0x26616d]);Number(_0x415ed1[a0_0x256f('0x4fa')])>Number(_0x129309[a0_0x256f('0x4fa')])&&(_0x383c80=_0x3f68ac[_0x26616d]);}var _0x46d0da=Number(_0x392c74['polygon']['extrudedHeight'])-Number(_0x2c6b81[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x383c80)[a0_0x256f('0x4fa')]);_0x392c74[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]=Number(_0x46d0da)[a0_0x256f('0x478')](0x2),_0x400496['updateDraggers'](),_0x392c74[a0_0x256f('0x46f')]();}}))[a0_0x256f('0x27e')]=_0x35665f,_0x328f2d[a0_0x256f('0x50b')]=_0x967ede,this[a0_0x256f('0x26f')][a0_0x256f('0x289')](_0x328f2d);}if(_0x392c74['polygon'][a0_0x256f('0x399')])for(_0x35665f=0x0;_0x35665f<_0x967ede[a0_0x256f('0x658')];_0x35665f++){var _0x46a18c=_0x967ede[_0x35665f],_0x3c079b=_0x2c6b81[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x46a18c);_0x3c079b[a0_0x256f('0x4fa')]=_0x392c74[a0_0x256f('0x493')][a0_0x256f('0x399')][a0_0x256f('0x110')];var _0x328f2d,_0x3f36ed=_0x2c6b81['Cartesian3'][a0_0x256f('0x3a9')](_0x3c079b['longitude'],_0x3c079b[a0_0x256f('0x2b1')],_0x3c079b[a0_0x256f('0x4fa')]);(_0x328f2d=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':_0x5bf497['dragIcon'],'position':_0x3f36ed,'onDrag':function(_0x25b586,_0x282f0b){for(var _0x4a5e90=_0x400496[a0_0x256f('0x150')][a0_0x256f('0x493')][a0_0x256f('0x3e3')][a0_0x256f('0x110')],_0x36d3e5=_0x4a5e90[0x0],_0x3707c7=0x1;_0x3707c7<_0x4a5e90[a0_0x256f('0x658')];_0x3707c7++){var _0x33926b=_0x2c6b81[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x36d3e5),_0x2992ef=_0x2c6b81['Cartographic'][a0_0x256f('0x296')](_0x4a5e90[_0x3707c7]);Number(_0x2992ef[a0_0x256f('0x4fa')])>Number(_0x33926b[a0_0x256f('0x4fa')])&&(_0x36d3e5=_0x4a5e90[_0x3707c7]);}var _0x1cd96a=_0x2c6b81[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x282f0b);_0x392c74['polygon']['extrudedHeight']=new _0x2c6b81['ConstantProperty'](Number(_0x1cd96a['height']));var _0x581611=Number(_0x1cd96a[a0_0x256f('0x4fa')])-Number(_0x2c6b81[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x36d3e5)[a0_0x256f('0x4fa')]);_0x392c74[a0_0x256f('0x14a')]['style'][a0_0x256f('0x399')]=Number(_0x581611)[a0_0x256f('0x478')](0x2),_0x400496[a0_0x256f('0x66')](),_0x392c74[a0_0x256f('0x46f')]();},'vertical':!0x0,'horizontal':!0x1}))[a0_0x256f('0x27e')]=_0x35665f,this[a0_0x256f('0x550')][a0_0x256f('0x289')](_0x328f2d);}}return _0x6f111f()(_0x457c81,[{'key':'updateDraggers','value':function(){var _0x1cf38e=this[a0_0x256f('0x150')]['polygon'][a0_0x256f('0x3e3')]['_value'],_0x5ee6cf=this[a0_0x256f('0x150')][a0_0x256f('0x493')][a0_0x256f('0x399')][a0_0x256f('0x110')],_0x1e2be7=0x0;null!=this[a0_0x256f('0x150')][a0_0x256f('0x493')]['height']&&(_0x1e2be7=this['entity'][a0_0x256f('0x493')][a0_0x256f('0x4fa')][a0_0x256f('0x110')]);for(var _0x365636=0x0;_0x365636<this['heightDraggers'][a0_0x256f('0x658')];_0x365636++){var _0x27a14d=_0x1cf38e[_0x365636],_0x1b5820=this[a0_0x256f('0x550')][_0x365636],_0x3bb649=_0x2c6b81[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x27a14d);_0x3bb649[a0_0x256f('0x4fa')]=_0x5ee6cf;var _0x712b70=_0x2c6b81[a0_0x256f('0x534')][a0_0x256f('0x3a9')](_0x3bb649['longitude'],_0x3bb649['latitude'],_0x3bb649[a0_0x256f('0x4fa')]);_0x1b5820[a0_0x256f('0x13c')]=_0x712b70;var _0x2f256a=this[a0_0x256f('0x26f')][_0x365636],_0x366a40=_0x2c6b81[a0_0x256f('0x1db')]['fromCartesian'](_0x27a14d);_0x366a40[a0_0x256f('0x4fa')]+=_0x1e2be7,_0x712b70=_0x2c6b81[a0_0x256f('0x534')][a0_0x256f('0x3a9')](_0x366a40['longitude'],_0x366a40[a0_0x256f('0x2b1')],_0x366a40[a0_0x256f('0x4fa')]),_0x2f256a[a0_0x256f('0x13c')]=_0x712b70;}}},{'key':'destroy','value':function(){var _0x5cc831=0x0;for(_0x5cc831=0x0;_0x5cc831<this[a0_0x256f('0x26f')][a0_0x256f('0x658')];_0x5cc831++)this[a0_0x256f('0x488')][a0_0x256f('0x365')][a0_0x256f('0x3ec')](this['draggers'][_0x5cc831]);for(this[a0_0x256f('0x26f')]=[],_0x5cc831=0x0;_0x5cc831<this[a0_0x256f('0x550')][a0_0x256f('0x658')];_0x5cc831++)this[a0_0x256f('0x488')][a0_0x256f('0x365')]['remove'](this[a0_0x256f('0x550')][_0x5cc831]);this[a0_0x256f('0x550')]=[];}}]),_0x457c81;}(),_0xdd0d7c=(DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],function(){function _0x597365(_0x494d8a,_0x5b0aa9,_0x3f4b3c){_0x3c0ba4()(this,_0x597365),this[a0_0x256f('0x488')]=_0x494d8a,this[a0_0x256f('0x150')]=_0x5b0aa9,this[a0_0x256f('0x26f')]=[];var _0x49a45d=_0x5b0aa9[a0_0x256f('0x493')][a0_0x256f('0x3e3')][a0_0x256f('0x110')];_0x5b0aa9[a0_0x256f('0x493')][a0_0x256f('0x3e3')][a0_0x256f('0x2fd')]=!0x1;for(var _0x1f494b=0x0;_0x1f494b<_0x49a45d[a0_0x256f('0x658')];_0x1f494b++){var _0x3217dc=_0x49a45d[_0x1f494b],_0x146f8d=_0x3c1780['createDragger'](this[a0_0x256f('0x488')],{'dragIcon':_0x3f4b3c[a0_0x256f('0x4e6')],'position':_0x3217dc,'heightReference':!_0x5b0aa9[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x24e')],'onDrag':function(_0x210204,_0x3dd0cc){_0x210204[a0_0x256f('0x50b')][_0x210204[a0_0x256f('0x27e')]]=_0x3dd0cc,_0x5b0aa9[a0_0x256f('0x46f')]();}});_0x146f8d[a0_0x256f('0x27e')]=_0x1f494b,_0x146f8d[a0_0x256f('0x50b')]=_0x49a45d,this['draggers'][a0_0x256f('0x289')](_0x146f8d);}}return _0x6f111f()(_0x597365,[{'key':a0_0x256f('0x66'),'value':function(){for(var _0x597887=this['entity'][a0_0x256f('0x493')]['hierarchy'][a0_0x256f('0x110')],_0x3918b8=0x0;_0x3918b8<this[a0_0x256f('0x26f')]['length'];_0x3918b8++){var _0x13316c=_0x597887[_0x3918b8];this['draggers'][_0x3918b8][a0_0x256f('0x13c')]=_0x13316c;}}},{'key':a0_0x256f('0x42'),'value':function(){this[a0_0x256f('0x150')][a0_0x256f('0x493')][a0_0x256f('0x3e3')][a0_0x256f('0x2fd')]=!0x0;for(var _0xccd60a=0x0;_0xccd60a<this[a0_0x256f('0x26f')][a0_0x256f('0x658')];_0xccd60a++)this['viewer']['entities'][a0_0x256f('0x3ec')](this[a0_0x256f('0x26f')][_0xccd60a]);this[a0_0x256f('0x26f')]=[];}}]),_0x597365;}()),_0x440f8d=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5427cd={'typename':a0_0x256f('0x493'),'startDraw':function(_0x10fcf4,_0x1e788c){var _0xd8d30b=this[a0_0x256f('0x373')](_0x1e788c);return _0x10fcf4[a0_0x256f('0x365')][a0_0x256f('0x53d')]({'polygon':_0xd8d30b,'attribute':_0x1e788c});},'attribute2Entity':function(_0x25584f,_0xc676b4){for(var _0x27ee05 in(null==_0xc676b4&&(_0xc676b4={'show':!0x0,'fill':!0x0,'hierarchy':new _0x228adf([],'polygon')}),_0x25584f[a0_0x256f('0x19b')])){var _0x4c8c11=_0x25584f[a0_0x256f('0x19b')][_0x27ee05];switch(_0x27ee05){default:_0xc676b4[_0x27ee05]=_0x4c8c11;break;case a0_0x256f('0x136'):case a0_0x256f('0x3b8'):break;case a0_0x256f('0x4d9'):_0xc676b4[a0_0x256f('0x4d9')]=new _0x440f8d['Color'][(a0_0x256f('0xe3'))](_0x4c8c11||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](_0x25584f['style'][a0_0x256f('0x3b8')]||_0x25584f['style'][a0_0x256f('0x136')]||0x1);break;case a0_0x256f('0x544'):_0xc676b4[a0_0x256f('0x168')]=new _0x440f8d[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x4c8c11||'#FFFF00')[a0_0x256f('0x2e4')](Number(_0x25584f[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));break;case a0_0x256f('0x399'):var _0x4693c6=_0x3c1780['getMaxHeightForPositions'](_0xc676b4[a0_0x256f('0x3e3')][a0_0x256f('0x110')]);_0xc676b4[a0_0x256f('0x399')]=Number(_0x4c8c11)+_0x4693c6;}}return null==_0x25584f['style'][a0_0x256f('0x544')]&&(_0xc676b4[a0_0x256f('0x168')]=_0x440f8d[a0_0x256f('0x54e')][a0_0x256f('0x606')]({'minimumGreen':0.75,'maximumBlue':0.75,'alpha':Number(_0x25584f['style'][a0_0x256f('0x136')]||0x1)})),_0xc676b4;},'getEditor':function(_0x2e7bfe,_0x400647,_0x372be8){return _0x400647[a0_0x256f('0x493')][a0_0x256f('0x399')]?new _0x4a906a(_0x2e7bfe,_0x400647,_0x372be8):new _0xdd0d7c(_0x2e7bfe,_0x400647,_0x372be8);},'setPositions':function(_0x335cf3,_0x27a044){if(_0x335cf3[a0_0x256f('0x493')]['hierarchy']=new _0x228adf(_0x27a044),_0x335cf3[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]){var _0x32ec14=_0x3c1780[a0_0x256f('0x4d2')](_0x27a044);_0x335cf3['polygon'][a0_0x256f('0x399')]=_0x32ec14+Number(_0x335cf3[a0_0x256f('0x14a')]['style']['extrudedHeight']);}},'getPositions':function(_0x3f59a6){return _0x3f59a6[a0_0x256f('0x493')][a0_0x256f('0x3e3')][a0_0x256f('0x110')];},'getCoordinates':function(_0x919c9d){var _0x51115e=this[a0_0x256f('0x508')](_0x919c9d);return _0x3c1780[a0_0x256f('0x4ae')](_0x51115e);},'toGeoJSON':function(_0x21f528){var _0x3f7fe8=this[a0_0x256f('0x4ae')](_0x21f528),_0x2addfb=_0x3f7fe8[0x0],_0x3ad285=_0x3f7fe8[_0x3f7fe8[a0_0x256f('0x658')]-0x1];return _0x2addfb[0x0]==_0x3ad285[0x0]&&_0x2addfb[0x1]==_0x3ad285[0x1]&&_0x2addfb[0x2]==_0x3ad285[0x2]||_0x3f7fe8['push'](_0x2addfb),{'type':'Feature','properties':_0x21f528[a0_0x256f('0x14a')],'geometry':{'type':'Polygon','coordinates':[_0x3f7fe8]}};}},_0x326338=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x53222c=function(){function _0xced004(_0x244d6a,_0x3c568d,_0x14ba11){_0x3c0ba4()(this,_0xced004),this['viewer']=_0x244d6a,this['entity']=_0x3c568d,this[a0_0x256f('0x26f')]=[],this[a0_0x256f('0x550')]=[];var _0x475bff=this,_0x78a8e=0x0,_0x5eefde=_0x3c568d['wall'][a0_0x256f('0x50b')][a0_0x256f('0x110')];for(_0x3c568d[a0_0x256f('0x21a')][a0_0x256f('0x50b')][a0_0x256f('0x2fd')]=!0x1,_0x78a8e=0x0;_0x78a8e<_0x5eefde[a0_0x256f('0x658')];_0x78a8e++){var _0x11c8f2=_0x5eefde[_0x78a8e];(_0x470834=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':_0x14ba11['dragIcon'],'position':_0x11c8f2,'onDrag':function(_0x495c03,_0x5aeca6){_0x495c03[a0_0x256f('0x50b')][_0x495c03['index']]=_0x5aeca6,_0x475bff['updateDraggers'](),_0x3c568d['changeEditing']();}}))[a0_0x256f('0x27e')]=_0x78a8e,_0x470834[a0_0x256f('0x50b')]=_0x5eefde,this['draggers'][a0_0x256f('0x289')](_0x470834);}if(_0x3c568d[a0_0x256f('0x21a')][a0_0x256f('0x13b')])for(_0x78a8e=0x0;_0x78a8e<_0x5eefde[a0_0x256f('0x658')];_0x78a8e++){var _0x590db7=_0x5eefde[_0x78a8e],_0x18c38d=_0x326338[a0_0x256f('0x1db')]['fromCartesian'](_0x590db7[a0_0x256f('0x444')]());_0x18c38d['height']=_0x3c568d[a0_0x256f('0x21a')]['maximumHeights'][a0_0x256f('0x110')][_0x78a8e];var _0x470834;_0x11c8f2=_0x326338[a0_0x256f('0x534')]['fromRadians'](_0x18c38d[a0_0x256f('0x520')],_0x18c38d[a0_0x256f('0x2b1')],_0x18c38d[a0_0x256f('0x4fa')]),((_0x470834=_0x3c1780['createDragger'](this[a0_0x256f('0x488')],{'dragIcon':_0x14ba11[a0_0x256f('0x4e6')],'position':_0x11c8f2,'onDrag':function(_0x1458e1,_0x54ea72){var _0x5e5b2b=_0x326338[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x54ea72),_0x5cf56a=_0x475bff[a0_0x256f('0x150')][a0_0x256f('0x21a')][a0_0x256f('0x405')]['_value'],_0x3c56da=Number(_0x5e5b2b['height'])-Number(_0x5cf56a[_0x1458e1[a0_0x256f('0x27e')]]);_0x3c568d[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]=_0x3c56da['toFixed'](0x2),_0x475bff['updateDraggers'](),_0x3c568d[a0_0x256f('0x46f')]();},'vertical':!0x0,'horizontal':!0x1}))[a0_0x256f('0x27e')]=_0x78a8e,this[a0_0x256f('0x550')][a0_0x256f('0x289')](_0x470834));}}return _0x6f111f()(_0xced004,[{'key':a0_0x256f('0x66'),'value':function(){for(var _0x118d4d=this[a0_0x256f('0x150')][a0_0x256f('0x21a')][a0_0x256f('0x50b')][a0_0x256f('0x110')],_0x15e019=this[a0_0x256f('0x150')][a0_0x256f('0x21a')][a0_0x256f('0x405')]['_value'],_0xe09054=this[a0_0x256f('0x150')][a0_0x256f('0x21a')][a0_0x256f('0x13b')][a0_0x256f('0x110')],_0x3aea40=0x0;_0x3aea40<this[a0_0x256f('0x550')][a0_0x256f('0x658')];_0x3aea40++){var _0x3ba425=_0x118d4d[_0x3aea40][a0_0x256f('0x444')](),_0x50364f=this['heightDraggers'][_0x3aea40],_0x5f79e0=_0x326338['Cartographic'][a0_0x256f('0x296')](_0x3ba425);_0x15e019[_0x3aea40]=_0x5f79e0['height'],_0xe09054[_0x3aea40]=Number(_0x5f79e0[a0_0x256f('0x4fa')])+Number(this[a0_0x256f('0x150')][a0_0x256f('0x14a')][a0_0x256f('0x19b')]['extrudedHeight']),_0x50364f[a0_0x256f('0x13c')]=mars3d[a0_0x256f('0xdc')][a0_0x256f('0x12d')][a0_0x256f('0x447')](_0x3ba425,this[a0_0x256f('0x150')][a0_0x256f('0x14a')]['style'][a0_0x256f('0x399')]),this['draggers'][_0x3aea40][a0_0x256f('0x13c')]=_0x3ba425;}}},{'key':a0_0x256f('0x42'),'value':function(){var _0x1f6156=0x0;for(_0x1f6156=0x0;_0x1f6156<this['draggers'][a0_0x256f('0x658')];_0x1f6156++)this['viewer']['entities'][a0_0x256f('0x3ec')](this[a0_0x256f('0x26f')][_0x1f6156]);for(this[a0_0x256f('0x26f')]=[],_0x1f6156=0x0;_0x1f6156<this[a0_0x256f('0x550')][a0_0x256f('0x658')];_0x1f6156++)this['viewer'][a0_0x256f('0x365')][a0_0x256f('0x3ec')](this['heightDraggers'][_0x1f6156]);this[a0_0x256f('0x550')]=[];}}]),_0xced004;}(),_0x828ac3=DC['Namespace']['Cesium'],_0x17f5b0={'typename':a0_0x256f('0x21a'),'startDraw':function(_0x2a27f3,_0x1d42c5){var _0x9d1341=this[a0_0x256f('0x373')](_0x1d42c5);return _0x2a27f3[a0_0x256f('0x365')]['add']({'wall':_0x9d1341,'attribute':_0x1d42c5});},'attribute2Entity':function(_0x108907,_0x36aa08){for(var _0x585ae0 in(_0x36aa08||(_0x36aa08={'show':!0x0,'fill':!0x0,'minimumHeights':[],'maximumHeights':[],'positions':new _0x228adf([])}),_0x108907[a0_0x256f('0x19b')])){var _0x3706a0=_0x108907['style'][_0x585ae0];switch(_0x585ae0){default:_0x36aa08[_0x585ae0]=_0x3706a0;break;case'opacity':case'outlineOpacity':break;case a0_0x256f('0x4d9'):_0x36aa08['outlineColor']=new _0x828ac3[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x3706a0||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](_0x108907[a0_0x256f('0x19b')][a0_0x256f('0x3b8')]||_0x108907[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1);break;case a0_0x256f('0x544'):_0x36aa08[a0_0x256f('0x168')]=new _0x828ac3[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x3706a0||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x108907[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));}}return null==_0x36aa08[a0_0x256f('0x168')]&&(_0x36aa08[a0_0x256f('0x168')]=_0x828ac3[a0_0x256f('0x54e')][a0_0x256f('0x606')]({'minimumGreen':0.75,'maximumBlue':0.75,'alpha':Number(_0x108907[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1)})),_0x36aa08;},'getEditor':function(_0x32f2ce,_0x518098,_0x47a1d3){return new _0x53222c(_0x32f2ce,_0x518098,_0x47a1d3);},'setPositions':function(_0x31b114,_0x41c55e){if(_0x31b114[a0_0x256f('0x21a')][a0_0x256f('0x50b')]=new _0x228adf(_0x41c55e),_0x31b114[a0_0x256f('0x21a')][a0_0x256f('0x13b')]&&_0x31b114[a0_0x256f('0x21a')][a0_0x256f('0x405')])for(var _0x3777a0=0x0;_0x3777a0<_0x41c55e[a0_0x256f('0x658')];_0x3777a0++){var _0x492ff6=_0x828ac3[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x41c55e[_0x3777a0]);_0x31b114['wall'][a0_0x256f('0x405')][a0_0x256f('0x110')][_0x3777a0]=Number(_0x492ff6['height']),_0x31b114[a0_0x256f('0x21a')][a0_0x256f('0x13b')][a0_0x256f('0x110')][_0x3777a0]=Number(_0x492ff6[a0_0x256f('0x4fa')])+Number(_0x31b114['attribute']['style'][a0_0x256f('0x399')]);}},'getPositions':function(_0xae0928){return _0xae0928[a0_0x256f('0x21a')][a0_0x256f('0x50b')][a0_0x256f('0x110')];},'setMaximumHeights':function(_0x33dc29,_0x192beb){_0x33dc29[a0_0x256f('0x21a')][a0_0x256f('0x13b')]=new _0x228adf(_0x192beb);},'getMaximumHeights':function(_0x4f2026){return _0x4f2026['wall'][a0_0x256f('0x13b')][a0_0x256f('0x110')];},'setMinimumHeights':function(_0x223c05,_0x55e230){_0x223c05['wall'][a0_0x256f('0x405')]=new _0x228adf(_0x55e230);},'getMinimumHeights':function(_0xa3593e){return _0xa3593e[a0_0x256f('0x21a')][a0_0x256f('0x405')][a0_0x256f('0x110')];},'getCoordinates':function(_0x560d5a){var _0x111348=this[a0_0x256f('0x508')](_0x560d5a);return _0x3c1780[a0_0x256f('0x4ae')](_0x111348);},'toGeoJSON':function(_0x34ef86){var _0x45ec89=this[a0_0x256f('0x4ae')](_0x34ef86);return{'type':a0_0x256f('0x2a'),'properties':_0x34ef86[a0_0x256f('0x14a')],'geometry':{'type':a0_0x256f('0x156'),'coordinates':_0x45ec89}};}},_0x5252f1=DC['Namespace'][a0_0x256f('0x224')],_0x4af2b1={'typename':a0_0x256f('0x322'),'startDraw':function(_0x1d2875,_0x44819b){var _0x3d8bac=this[a0_0x256f('0x373')](_0x44819b);return _0x1d2875[a0_0x256f('0x365')][a0_0x256f('0x53d')]({'point':_0x3d8bac,'attribute':_0x44819b});},'attribute2Entity':function(_0x4e31f9,_0x4f60b4){for(var _0x2b41a9 in(null==_0x4f60b4&&(_0x4f60b4={'show':!0x0}),_0x4e31f9['style'])){var _0x20e5d9=_0x4e31f9['style'][_0x2b41a9];switch(_0x2b41a9){default:_0x4f60b4[_0x2b41a9]=_0x20e5d9;break;case a0_0x256f('0x136'):case'outlineOpacity':break;case a0_0x256f('0x4d9'):_0x4f60b4[a0_0x256f('0x4d9')]=new _0x5252f1['Color'][(a0_0x256f('0xe3'))](_0x20e5d9||a0_0x256f('0x2f4'))['withAlpha'](_0x4e31f9[a0_0x256f('0x19b')][a0_0x256f('0x3b8')]||_0x4e31f9[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1);break;case'color':_0x4f60b4['color']=new _0x5252f1['Color']['fromCssColorString'](_0x20e5d9||'#FFFF00')[a0_0x256f('0x2e4')](Number(_0x4e31f9[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1));}}return _0x4e31f9[a0_0x256f('0x19b')][a0_0x256f('0x1c4')]||(_0x4f60b4[a0_0x256f('0x312')]=0x0),_0x4f60b4;},'getEditor':function(_0x50b220,_0x21637d,_0x50bfa0){return new _0x4ba997(_0x50b220,_0x21637d,_0x50bfa0);},'setPositions':function(_0x8f18b6,_0x3a8cf4){_0x8f18b6[a0_0x256f('0x13c')]=new _0x228adf(_0x3a8cf4);},'getPositions':function(_0x22c1ab){return[_0x22c1ab[a0_0x256f('0x13c')][a0_0x256f('0x110')]];},'getCoordinates':function(_0x4abaca){var _0x8b2b9a=this[a0_0x256f('0x508')](_0x4abaca);return _0x3c1780[a0_0x256f('0x4ae')](_0x8b2b9a);},'toGeoJSON':function(_0x489efd){var _0x13eace=this[a0_0x256f('0x4ae')](_0x489efd);return{'type':a0_0x256f('0x2a'),'properties':_0x489efd[a0_0x256f('0x14a')],'geometry':{'type':'Point','coordinates':_0x13eace}};}},_0x1d593a=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0xc9dd11=function(){function _0xe7a81e(_0x332cfc,_0x296f8d,_0x5493d0){_0x3c0ba4()(this,_0xe7a81e),this[a0_0x256f('0x488')]=_0x332cfc,this['entity']=_0x296f8d,this[a0_0x256f('0x26f')]=[],this[a0_0x256f('0x550')]=[];var _0x29b612=this,_0x9b6afe=0x0,_0x331f2f=this[a0_0x256f('0x53b')]();for(_0x296f8d[a0_0x256f('0x15a')][a0_0x256f('0x661')]['isConstant']=!0x1,_0x9b6afe=0x0;_0x9b6afe<_0x331f2f['length'];_0x9b6afe++){var _0x37c80b=_0x331f2f[_0x9b6afe];if(null!=_0x296f8d[a0_0x256f('0x15a')]['height'])(_0x17a74f=_0x1d593a[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x37c80b))[a0_0x256f('0x4fa')]+=_0x296f8d[a0_0x256f('0x15a')][a0_0x256f('0x4fa')][a0_0x256f('0x110')],_0x37c80b=_0x1d593a['Cartesian3']['fromRadians'](_0x17a74f[a0_0x256f('0x520')],_0x17a74f[a0_0x256f('0x2b1')],_0x17a74f[a0_0x256f('0x4fa')]);(_0x34cb45=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':_0x5493d0[a0_0x256f('0x4e6')],'position':_0x37c80b,'onDrag':function(_0x2f9828,_0x21760d){var _0x7c83eb;_0x2f9828[a0_0x256f('0x50b')][_0x2f9828[a0_0x256f('0x27e')]]=_0x21760d,_0x7c83eb=0x0==_0x2f9828['index']?_0x1d593a[a0_0x256f('0x51')][a0_0x256f('0x3a6')]([_0x21760d,_0x2f9828[a0_0x256f('0x50b')][0x1]]):_0x1d593a[a0_0x256f('0x51')]['fromCartesianArray']([_0x21760d,_0x2f9828[a0_0x256f('0x50b')][0x0]]),_0x296f8d[a0_0x256f('0x15a')]['coordinates'][a0_0x256f('0x171')](_0x7c83eb),_0x29b612[a0_0x256f('0x66')](),_0x296f8d[a0_0x256f('0x46f')]();}}))[a0_0x256f('0x27e')]=_0x9b6afe,_0x34cb45[a0_0x256f('0x50b')]=_0x331f2f,this[a0_0x256f('0x26f')][a0_0x256f('0x289')](_0x34cb45);}if(_0x296f8d[a0_0x256f('0x15a')][a0_0x256f('0x399')])for(_0x9b6afe=0x0;_0x9b6afe<_0x331f2f[a0_0x256f('0x658')];_0x9b6afe++){var _0x17a74f,_0x7b98e5=_0x331f2f[_0x9b6afe];(_0x17a74f=_0x1d593a['Cartographic']['fromCartesian'](_0x7b98e5))[a0_0x256f('0x4fa')]+=_0x296f8d[a0_0x256f('0x15a')][a0_0x256f('0x399')]['_value'];var _0x34cb45;_0x37c80b=_0x1d593a[a0_0x256f('0x534')][a0_0x256f('0x3a9')](_0x17a74f[a0_0x256f('0x520')],_0x17a74f[a0_0x256f('0x2b1')],_0x17a74f[a0_0x256f('0x4fa')]),((_0x34cb45=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':_0x5493d0[a0_0x256f('0x4e6')],'position':_0x37c80b,'onDrag':function(_0x144f05,_0x17e9c6){var _0x17e2af=_0x1d593a[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x17e9c6);_0x296f8d[a0_0x256f('0x15a')]['extrudedHeight']=new _0x1d593a[(a0_0x256f('0x3d4'))](_0x17e2af[a0_0x256f('0x4fa')]);var _0x419c5d=Number(_0x17e2af[a0_0x256f('0x4fa')])-Number(_0x296f8d[a0_0x256f('0x15a')][a0_0x256f('0x4fa')]);_0x296f8d[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]=Number(_0x419c5d)[a0_0x256f('0x478')](0x2),_0x29b612[a0_0x256f('0x66')](),_0x296f8d[a0_0x256f('0x46f')]();},'vertical':!0x0,'horizontal':!0x1}))['index']=_0x9b6afe,this[a0_0x256f('0x550')][a0_0x256f('0x289')](_0x34cb45));}}return _0x6f111f()(_0xe7a81e,[{'key':a0_0x256f('0x53b'),'value':function(){var _0x4ff0c5=this[a0_0x256f('0x150')][a0_0x256f('0x15a')][a0_0x256f('0x661')]['_value'],_0x480005=_0x1d593a[a0_0x256f('0x51')]['northwest'](_0x4ff0c5),_0x54c82f=_0x1d593a[a0_0x256f('0x51')][a0_0x256f('0x56d')](_0x4ff0c5);return _0x1d593a[a0_0x256f('0x534')][a0_0x256f('0x1c2')]([_0x480005[a0_0x256f('0x520')],_0x480005[a0_0x256f('0x2b1')],_0x54c82f[a0_0x256f('0x520')],_0x54c82f['latitude']]);}},{'key':a0_0x256f('0x66'),'value':function(){var _0x2afaa0=this['getDraggersPositions'](),_0x5a16aa=this[a0_0x256f('0x150')][a0_0x256f('0x15a')][a0_0x256f('0x399')][a0_0x256f('0x110')],_0x20d7fd=0x0;null!=this['entity'][a0_0x256f('0x15a')]['height']&&(_0x20d7fd=this[a0_0x256f('0x150')]['rectangle'][a0_0x256f('0x4fa')][a0_0x256f('0x110')]);for(var _0x4d01f2=0x0;_0x4d01f2<this[a0_0x256f('0x550')][a0_0x256f('0x658')];_0x4d01f2++){var _0x4ffb36=_0x2afaa0[_0x4d01f2],_0x3466cc=this[a0_0x256f('0x550')][_0x4d01f2],_0x413835=_0x1d593a[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x4ffb36);_0x413835[a0_0x256f('0x4fa')]+=_0x5a16aa;var _0x1cf1f0=_0x1d593a[a0_0x256f('0x534')][a0_0x256f('0x3a9')](_0x413835[a0_0x256f('0x520')],_0x413835[a0_0x256f('0x2b1')],_0x413835['height']);_0x3466cc[a0_0x256f('0x13c')]=_0x1cf1f0;var _0x1fa944=this[a0_0x256f('0x26f')][_0x4d01f2],_0x23dedf=_0x1d593a['Cartographic'][a0_0x256f('0x296')](_0x4ffb36);_0x23dedf[a0_0x256f('0x4fa')]+=_0x20d7fd,_0x1cf1f0=_0x1d593a[a0_0x256f('0x534')][a0_0x256f('0x3a9')](_0x23dedf['longitude'],_0x23dedf['latitude'],_0x23dedf[a0_0x256f('0x4fa')]),_0x1fa944['position']=_0x1cf1f0;}}},{'key':a0_0x256f('0x42'),'value':function(){var _0x4b2159=0x0;for(_0x4b2159=0x0;_0x4b2159<this[a0_0x256f('0x26f')]['length'];_0x4b2159++)this[a0_0x256f('0x488')]['entities']['remove'](this[a0_0x256f('0x26f')][_0x4b2159]);for(this[a0_0x256f('0x26f')]=[],_0x4b2159=0x0;_0x4b2159<this[a0_0x256f('0x550')][a0_0x256f('0x658')];_0x4b2159++)this['viewer'][a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x550')][_0x4b2159]);this['heightDraggers']=[];}}]),_0xe7a81e;}(),_0x12e259=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x2e1217=function(){function _0x2e6d57(_0x2eb6de,_0x525f24,_0x5d6f0e){_0x3c0ba4()(this,_0x2e6d57),this[a0_0x256f('0x488')]=_0x2eb6de,this[a0_0x256f('0x150')]=_0x525f24,this[a0_0x256f('0x26f')]=[];var _0x24d14b=this[a0_0x256f('0x53b')]();_0x525f24[a0_0x256f('0x15a')][a0_0x256f('0x661')][a0_0x256f('0x2fd')]=!0x1;for(var _0x4c5e91=0x0;_0x4c5e91<_0x24d14b[a0_0x256f('0x658')];_0x4c5e91++){var _0x58ade6=_0x24d14b[_0x4c5e91],_0xb2ee68=_0x3c1780[a0_0x256f('0x5dd')](this[a0_0x256f('0x488')],{'dragIcon':_0x5d6f0e[a0_0x256f('0x4e6')],'position':_0x58ade6,'heightReference':!_0x525f24[a0_0x256f('0x14a')][a0_0x256f('0x19b')]['perPositionHeight'],'onDrag':function(_0xf7a366,_0x321272){var _0x258981;_0xf7a366['positions'][_0xf7a366[a0_0x256f('0x27e')]]=_0x321272,_0x258981=0x0==_0xf7a366[a0_0x256f('0x27e')]?_0x12e259[a0_0x256f('0x51')][a0_0x256f('0x3a6')]([_0x321272,_0xf7a366['positions'][0x1]]):_0x12e259['Rectangle'][a0_0x256f('0x3a6')]([_0x321272,_0xf7a366['positions'][0x0]]),_0x525f24[a0_0x256f('0x15a')][a0_0x256f('0x661')][a0_0x256f('0x171')](_0x258981),_0x525f24['changeEditing']();}});_0xb2ee68[a0_0x256f('0x27e')]=_0x4c5e91,_0xb2ee68[a0_0x256f('0x50b')]=_0x24d14b,this[a0_0x256f('0x26f')][a0_0x256f('0x289')](_0xb2ee68);}}return _0x6f111f()(_0x2e6d57,[{'key':a0_0x256f('0x66'),'value':function(){for(var _0x3c161f=this[a0_0x256f('0x53b')](),_0x2131f2=0x0;_0x2131f2<this[a0_0x256f('0x26f')][a0_0x256f('0x658')];_0x2131f2++){var _0x407da2=_0x3c161f[_0x2131f2];this['draggers'][_0x2131f2][a0_0x256f('0x13c')]=_0x407da2;}}},{'key':a0_0x256f('0x53b'),'value':function(){var _0x4a6f26=this['entity']['rectangle'][a0_0x256f('0x661')][a0_0x256f('0x110')],_0x5a11d8=_0x12e259[a0_0x256f('0x51')][a0_0x256f('0x3b3')](_0x4a6f26),_0x38ead4=_0x12e259[a0_0x256f('0x51')][a0_0x256f('0x56d')](_0x4a6f26);return _0x12e259[a0_0x256f('0x534')][a0_0x256f('0x1c2')]([_0x5a11d8['longitude'],_0x5a11d8[a0_0x256f('0x2b1')],_0x38ead4['longitude'],_0x38ead4[a0_0x256f('0x2b1')]]);}},{'key':a0_0x256f('0x42'),'value':function(){this[a0_0x256f('0x150')][a0_0x256f('0x15a')][a0_0x256f('0x661')][a0_0x256f('0x2fd')]=!0x0;for(var _0x4299e9=0x0;_0x4299e9<this[a0_0x256f('0x26f')][a0_0x256f('0x658')];_0x4299e9++)this['viewer'][a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x26f')][_0x4299e9]);this['draggers']=[];}}]),_0x2e6d57;}(),_0x339d83=DC['Namespace'][a0_0x256f('0x224')],_0x50f94c={'typename':a0_0x256f('0x15a'),'startDraw':function(_0x2ce687,_0x4410b8){var _0x1c1734=this[a0_0x256f('0x373')](_0x4410b8);return _0x2ce687['entities'][a0_0x256f('0x53d')]({'rectangle':_0x1c1734,'attribute':_0x4410b8});},'attribute2Entity':function(_0x4c042f,_0x1f087c){_0x1f087c||(_0x1f087c={'show':!0x0,'fill':!0x0,'closeTop':!0x0,'closeBottom':!0x0,'coordinates':_0x339d83['Rectangle']['fromDegrees'](78.654473,34.878143,78.654673,34.878316)});for(var _0x532e71 in _0x4c042f[a0_0x256f('0x19b')]){var _0x2b64f8=_0x4c042f[a0_0x256f('0x19b')][_0x532e71];switch(_0x532e71){default:_0x1f087c[_0x532e71]=_0x2b64f8;break;case'opacity':case'outlineOpacity':break;case a0_0x256f('0x4d9'):_0x1f087c['outlineColor']=new _0x339d83['Color'][(a0_0x256f('0xe3'))](_0x2b64f8||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](_0x4c042f[a0_0x256f('0x19b')]['outlineOpacity']||_0x4c042f[a0_0x256f('0x19b')]['opacity']||0x1);break;case a0_0x256f('0x4fa'):_0x1f087c[a0_0x256f('0x4fa')]=Number(_0x2b64f8),_0x1f087c[a0_0x256f('0x399')]=Number(_0x4c042f['style'][a0_0x256f('0x399')])+Number(_0x2b64f8);break;case a0_0x256f('0x399'):_0x1f087c[a0_0x256f('0x399')]=Number(_0x1f087c[a0_0x256f('0x4fa')])+Number(_0x2b64f8);break;case a0_0x256f('0x544'):_0x1f087c[a0_0x256f('0x168')]=new _0x339d83[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x2b64f8||a0_0x256f('0x2f4'))[a0_0x256f('0x2e4')](Number(_0x4c042f['style']['opacity']||0x1));break;case a0_0x256f('0x392'):_0x1f087c[a0_0x256f('0x168')]=_0x4c042f['style'][a0_0x256f('0x392')];break;case a0_0x256f('0x4ef'):_0x1f087c['rotation']=_0x339d83[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x2b64f8),_0x4c042f[a0_0x256f('0x19b')][a0_0x256f('0x59c')]||(_0x1f087c[a0_0x256f('0x59c')]=_0x339d83[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x2b64f8));break;case'stRotation':_0x1f087c[a0_0x256f('0x59c')]=_0x339d83[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x2b64f8);}}return null==_0x1f087c['material']&&(_0x1f087c['material']=_0x339d83[a0_0x256f('0x54e')][a0_0x256f('0x606')]({'minimumGreen':0.75,'maximumBlue':0.75,'alpha':Number(_0x4c042f[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1)})),_0x1f087c;},'getEditor':function(_0x14c98f,_0x2209ee,_0x447724){return _0x2209ee[a0_0x256f('0x15a')][a0_0x256f('0x399')]?new _0xc9dd11(_0x14c98f,_0x2209ee,_0x447724):new _0x2e1217(_0x14c98f,_0x2209ee,_0x447724);},'setPositions':function(_0x43d6e7,_0xb628cc){_0xb628cc instanceof Array&&(_0xb628cc=_0x339d83['Rectangle']['fromCartesianArray'](_0xb628cc)),_0x43d6e7[a0_0x256f('0x15a')]['coordinates']['setValue'](_0xb628cc);},'getPositions':function(_0x3c2467){return _0x3c2467[a0_0x256f('0x15a')][a0_0x256f('0x661')];},'getCoordinates':function(_0xd80597){var _0x19ab77=this[a0_0x256f('0x258')](_0xd80597);return _0x3c1780[a0_0x256f('0x4ae')](_0x19ab77);},'getDiagonalPositions':function(_0x3c59b4){var _0x8281ff=_0x3c59b4[a0_0x256f('0x15a')]['coordinates'][a0_0x256f('0x110')],_0x4874de=_0x339d83[a0_0x256f('0x51')][a0_0x256f('0x3b3')](_0x8281ff),_0x3376fa=_0x339d83[a0_0x256f('0x51')]['southeast'](_0x8281ff);return _0x339d83['Cartesian3'][a0_0x256f('0x1c2')]([_0x4874de['longitude'],_0x4874de['latitude'],_0x3376fa[a0_0x256f('0x520')],_0x3376fa[a0_0x256f('0x2b1')]]);},'toGeoJSON':function(_0x5db7cd){var _0x29e0c3=this[a0_0x256f('0x4ae')](_0x5db7cd);return{'type':a0_0x256f('0x2a'),'properties':_0x5db7cd[a0_0x256f('0x14a')],'geometry':{'type':a0_0x256f('0x5eb'),'coordinates':_0x29e0c3}};}},_0x21dce4=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x2faa56={'typename':a0_0x256f('0x407'),'startDraw':function(_0x2efb26,_0x5ba128){var _0x1991ce=this[a0_0x256f('0x373')](_0x5ba128);return _0x2efb26[a0_0x256f('0x365')]['add']({'model':_0x1991ce,'attribute':_0x5ba128});},'attribute2Entity':function(_0x4eda5f,_0x4746a6){for(var _0x45ed3e in(null==_0x4746a6&&(_0x4746a6={'show':!0x0}),_0x4eda5f[a0_0x256f('0x19b')])){var _0x2d7892=_0x4eda5f[a0_0x256f('0x19b')][_0x45ed3e];switch(_0x45ed3e){default:_0x4746a6[_0x45ed3e]=_0x2d7892;break;case'silhouette':case a0_0x256f('0x3b'):case a0_0x256f('0x114'):case a0_0x256f('0x5bb'):case a0_0x256f('0x601'):case a0_0x256f('0x544'):case'opacity':break;case a0_0x256f('0x36'):_0x4746a6['uri']=_0x2d7892;}}return _0x4eda5f[a0_0x256f('0x19b')][a0_0x256f('0x414')]?(_0x4746a6[a0_0x256f('0x3b')]=new _0x21dce4[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](_0x4eda5f[a0_0x256f('0x19b')][a0_0x256f('0x3b')]||a0_0x256f('0x4b7'))[a0_0x256f('0x2e4')](Number(_0x4eda5f[a0_0x256f('0x19b')][a0_0x256f('0x114')]||0x1)),_0x4746a6[a0_0x256f('0x5bb')]=Number(_0x4eda5f[a0_0x256f('0x19b')][a0_0x256f('0x5bb')]||0x1)):_0x4746a6[a0_0x256f('0x5bb')]=0x0,_0x4eda5f['style'][a0_0x256f('0x601')]?_0x4746a6[a0_0x256f('0x544')]=new _0x21dce4['Color']['fromCssColorString'](_0x4eda5f['style']['color']||a0_0x256f('0x4b7'))[a0_0x256f('0x2e4')](Number(_0x4eda5f[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1)):_0x4746a6[a0_0x256f('0x544')]=new _0x21dce4[(a0_0x256f('0x54e'))][(a0_0x256f('0xe3'))](a0_0x256f('0x4b7'))['withAlpha'](Number(_0x4eda5f[a0_0x256f('0x19b')][a0_0x256f('0x136')]||0x1)),_0x4746a6;},'attribute2Model':function(_0x77e20e,_0x349796){var _0x24a1aa=_0x21dce4['Math']['toRadians'](Number(_0x349796[a0_0x256f('0x14a')]['style'][a0_0x256f('0x569')]||0x0)),_0x1bd9ba=_0x21dce4['Math'][a0_0x256f('0x1b4')](Number(_0x349796['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x3c3')]||0x0)),_0x58f47a=_0x21dce4[a0_0x256f('0x4bb')]['toRadians'](Number(_0x349796[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x612')]||0x0)),_0x575c6f=new _0x21dce4[(a0_0x256f('0x30f'))](_0x24a1aa,_0x1bd9ba,_0x58f47a);_0x349796[a0_0x256f('0xfc')]&&(_0x349796[a0_0x256f('0xfc')]=_0x21dce4[a0_0x256f('0x12f')][a0_0x256f('0x24d')](_0x349796[a0_0x256f('0x13c')]['_value'],_0x575c6f));},'getEditor':function(_0x1a5b9d,_0xb4cc23,_0x346bc8){return new _0x4ba997(_0x1a5b9d,_0xb4cc23,_0x346bc8);},'setPositions':function(_0x463a47,_0x565617){_0x463a47['position']=new _0x228adf(_0x565617);var _0x1e70e1=_0x21dce4[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](Number(_0x463a47['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x569')]||0x0)),_0x58a88b=_0x21dce4[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](Number(_0x463a47[a0_0x256f('0x14a')]['style']['pitch']||0x0)),_0x238601=_0x21dce4[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](Number(_0x463a47['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x612')]||0x0)),_0x524ca9=new _0x21dce4[(a0_0x256f('0x30f'))](_0x1e70e1,_0x58a88b,_0x238601);_0x463a47[a0_0x256f('0xfc')]=_0x21dce4[a0_0x256f('0x12f')][a0_0x256f('0x24d')](_0x463a47[a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x524ca9);},'getPositions':function(_0x127e35){return[_0x127e35[a0_0x256f('0x13c')][a0_0x256f('0x110')]];},'getCoordinates':function(_0xbcd01d){var _0x4b5130=this[a0_0x256f('0x508')](_0xbcd01d);return _0x3c1780[a0_0x256f('0x4ae')](_0x4b5130);},'toGeoJSON':function(_0x5ad1ec){var _0x51f26c=this['getCoordinates'](_0x5ad1ec);return{'type':a0_0x256f('0x2a'),'properties':_0x5ad1ec[a0_0x256f('0x14a')],'geometry':{'type':a0_0x256f('0x1e0'),'coordinates':_0x51f26c}};}},_0x312248=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x1f2b28=function(){function _0x4cff6b(){_0x3c0ba4()(this,_0x4cff6b);}return _0x6f111f()(_0x4cff6b,[{'key':'i','value':function(_0x5e5970){var _0xb127ed=_0x5e5970[a0_0x256f('0x54f')],_0x2d25a6=new _0x312248[(a0_0x256f('0x326'))](_0xb127ed[a0_0x256f('0x8d')]/0x2,_0xb127ed[a0_0x256f('0x3f6')]/0x2),_0x5615de=_0x5e5970[a0_0x256f('0x3ee')][a0_0x256f('0x19d')](_0x2d25a6);return _0x5e5970[a0_0x256f('0x216')]['pick'](_0x5615de,_0x5e5970)||_0x5e5970[a0_0x256f('0x3ee')][a0_0x256f('0x377')](_0x2d25a6);}}],[{'key':a0_0x256f('0x48d'),'value':function(_0x5f47bb,_0x1cf814){var _0x3f230b,_0x351e96=_0x5f47bb[a0_0x256f('0x4d8')](_0x1cf814);if(_0x5f47bb[a0_0x256f('0xb5')]&&_0x312248[a0_0x256f('0x4a3')](_0x351e96)&&(_0x3f230b=_0x5f47bb['pickPosition'](_0x1cf814))&&_0x5f47bb[a0_0x256f('0x216')][a0_0x256f('0x2f')][a0_0x256f('0x228')](_0x3f230b)['height']>0x0)return _0x3f230b;var _0x3c04d4=_0x5f47bb[a0_0x256f('0x3ee')][a0_0x256f('0x19d')](_0x1cf814);return _0x5f47bb['globe'][a0_0x256f('0x4d8')](_0x3c04d4,_0x5f47bb);}},{'key':a0_0x256f('0x32a'),'value':function(_0x4d41ea,_0x24da66){var _0x8996b8=_0x4d41ea[a0_0x256f('0x2b0')],_0x16e4f2=i(_0x8996b8);if(!_0x16e4f2){var _0x1b41eb=_0x8996b8[a0_0x256f('0x216')],_0x1f91fe=_0x8996b8[a0_0x256f('0x3ee')][a0_0x256f('0x382')][a0_0x256f('0x444')](),_0x1c3609=_0x1b41eb['getHeight'](_0x1f91fe);_0x1f91fe['height']=_0x1c3609||0x0,_0x16e4f2=_0x312248[a0_0x256f('0x22d')][a0_0x256f('0x1ca')][a0_0x256f('0x645')](_0x1f91fe);}var _0x221773=_0x312248['Cartographic'][a0_0x256f('0x296')](_0x16e4f2),_0x50f4a7={};return _0x50f4a7['y']=Number(_0x312248['Math'][a0_0x256f('0xec')](_0x221773['latitude'])[a0_0x256f('0x478')](0x6)),_0x50f4a7['x']=Number(_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x221773[a0_0x256f('0x520')])['toFixed'](0x6)),_0x50f4a7['z']=Number(_0x221773['height']['toFixed'](0x1)),_0x24da66&&(_0x50f4a7=_0x50f4a7),_0x50f4a7;}},{'key':a0_0x256f('0x378'),'value':function(_0x35296f,_0x4e44bb){var _0x1fa760={'xmin':0x46,'xmax':0x8c,'ymin':0x0,'ymax':0x37},_0x44bb66=_0x35296f['scene'],_0xa2bc98=_0x44bb66['globe'][a0_0x256f('0x2f')],_0x253107=_0x44bb66[a0_0x256f('0x54f')],_0x51594e=_0x35296f['camera'][a0_0x256f('0x377')](new _0x312248[(a0_0x256f('0x326'))](0x0,0x0),_0xa2bc98);if(_0x51594e){var _0x3ce2bc=_0xa2bc98[a0_0x256f('0x228')](_0x51594e);_0x1fa760[a0_0x256f('0x301')]=_0x312248[a0_0x256f('0x4bb')]['toDegrees'](_0x3ce2bc['longitude']),_0x1fa760[a0_0x256f('0x394')]=_0x312248['Math'][a0_0x256f('0xec')](_0x3ce2bc[a0_0x256f('0x2b1')]);}else{for(var _0x1ba182,_0x19178d=_0x253107[a0_0x256f('0x140')]/0x2,_0x37dda6=_0x253107['height']/0x2,_0x5ee828=0x0;_0x5ee828<=_0x37dda6;_0x5ee828+=0xa){var _0x3bc8f0=_0x5ee828<=_0x19178d?_0x5ee828:_0x19178d;if(_0x1ba182=_0x35296f[a0_0x256f('0x3ee')][a0_0x256f('0x377')](new _0x312248[(a0_0x256f('0x326'))](_0x3bc8f0,_0x5ee828),_0xa2bc98))break;}_0x1ba182&&(_0x3ce2bc=_0xa2bc98['cartesianToCartographic'](_0x1ba182),(_0x1fa760[a0_0x256f('0x301')]=_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x3ce2bc[a0_0x256f('0x520')]),_0x1fa760[a0_0x256f('0x394')]=_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x3ce2bc[a0_0x256f('0x2b1')])));}var _0x3e36c4=_0x35296f[a0_0x256f('0x3ee')][a0_0x256f('0x377')](new _0x312248[(a0_0x256f('0x326'))](_0x253107[a0_0x256f('0x140')],_0x253107['height']),_0xa2bc98);if(_0x3e36c4){var _0x52f8cd=_0xa2bc98[a0_0x256f('0x228')](_0x3e36c4);_0x1fa760['xmax']=_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x52f8cd[a0_0x256f('0x520')]),_0x1fa760[a0_0x256f('0xb4')]=_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x52f8cd['latitude']);}else{var _0x547fb2;for(_0x19178d=_0x253107[a0_0x256f('0x140')]/0x2,_0x37dda6=_0x253107['height']/0x2,_0x5ee828=_0x253107[a0_0x256f('0x4fa')];_0x5ee828>=_0x37dda6;_0x5ee828-=0xa){_0x3bc8f0=_0x5ee828>=_0x19178d?_0x5ee828:_0x19178d;if(_0x547fb2=_0x35296f[a0_0x256f('0x3ee')]['pickEllipsoid'](new _0x312248['Cartesian2'](_0x3bc8f0,_0x5ee828),_0xa2bc98))break;}_0x547fb2&&(_0x52f8cd=_0xa2bc98[a0_0x256f('0x228')](_0x547fb2),(_0x1fa760[a0_0x256f('0x42e')]=_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x52f8cd[a0_0x256f('0x520')]),_0x1fa760[a0_0x256f('0xb4')]=_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x52f8cd[a0_0x256f('0x2b1')])));}if(_0x4e44bb){var _0x251cfa={'x':_0x1fa760[a0_0x256f('0x301')],'y':_0x1fa760[a0_0x256f('0xb4')]};_0x1fa760[a0_0x256f('0x301')]=_0x251cfa['x'],_0x1fa760[a0_0x256f('0xb4')]=_0x251cfa['y'];var _0x5f239d={'x':_0x1fa760['xmax'],'y':_0x1fa760[a0_0x256f('0x394')]};_0x1fa760[a0_0x256f('0x42e')]=_0x5f239d['x'],_0x1fa760[a0_0x256f('0x394')]=_0x5f239d['y'];}return _0x1fa760;}},{'key':a0_0x256f('0x1da'),'value':function(_0x3739cf,_0x18dfa8){var _0xed4ccc=_0x3739cf[a0_0x256f('0x3ee')],_0x190114=_0xed4ccc[a0_0x256f('0x382')],_0x1226c4={};return _0x1226c4['y']=Number(_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0x190114['latitude'])[a0_0x256f('0x478')](0x6)),_0x1226c4['x']=Number(_0x312248[a0_0x256f('0x4bb')]['toDegrees'](_0x190114[a0_0x256f('0x520')])[a0_0x256f('0x478')](0x6)),_0x1226c4['z']=Number(_0x190114[a0_0x256f('0x4fa')][a0_0x256f('0x478')](0x1)),_0x1226c4['heading']=Number(_0x312248['Math'][a0_0x256f('0xec')](_0xed4ccc[a0_0x256f('0x569')])['toFixed'](0x1)),_0x1226c4['pitch']=Number(_0x312248[a0_0x256f('0x4bb')][a0_0x256f('0xec')](_0xed4ccc['pitch'])[a0_0x256f('0x478')](0x1)),_0x1226c4['roll']=Number(_0x312248['Math'][a0_0x256f('0xec')](_0xed4ccc[a0_0x256f('0x612')])['toFixed'](0x1)),_0x18dfa8&&(_0x1226c4=_0x1226c4),_0x1226c4;}}]),_0x4cff6b;}(),_0x1ba615=DC['Namespace'][a0_0x256f('0x224')],_0x3efca9=function(){function _0x56ec46(_0x240765){_0x3c0ba4()(this,_0x56ec46),this[a0_0x256f('0x488')]=_0x240765,_0x240765[a0_0x256f('0x160')][a0_0x256f('0x46a')](_0x1ba615['ScreenSpaceEventType'][a0_0x256f('0x51a')]),_0x240765[a0_0x256f('0x160')]['removeInputAction'](_0x1ba615['ScreenSpaceEventType'][a0_0x256f('0x3d8')]);}return _0x6f111f()(_0x56ec46,[{'key':'createDrawPointHandler','value':function(_0x193181){var _0x4aa83c=this;_0x193181[a0_0x256f('0x5f9')]=!0x0;var _0x239751=new _0x1ba615[(a0_0x256f('0x7d'))](this[a0_0x256f('0x488')]['scene'][a0_0x256f('0x54f')]);return _0x239751['setInputAction'](function(_0x4f9576){var _0x885db=_0x1f2b28[a0_0x256f('0x48d')](_0x4aa83c[a0_0x256f('0x488')][a0_0x256f('0x2b0')],_0x4f9576[a0_0x256f('0x13c')]);_0x885db&&(_0x193181[a0_0x256f('0x5e4')](_0x885db),_0x193181[a0_0x256f('0x5f9')]=!0x1,_0x193181[a0_0x256f('0x5bd')](),_0x193181[a0_0x256f('0x2')](),_0x239751[a0_0x256f('0x42')](),_0x4aa83c[a0_0x256f('0x13')]=null);},_0x1ba615[a0_0x256f('0xf8')]['LEFT_CLICK']),this[a0_0x256f('0x13')]=_0x239751,_0x239751;}},{'key':a0_0x256f('0x1c8'),'value':function(_0x119032,_0x14c6f7){var _0x1c324d=this;_0x119032['inProgress']=!0x0;var _0xbf982d=new _0x1ba615['ScreenSpaceEventHandler'](this[a0_0x256f('0x488')]['scene']['canvas']);return _0xbf982d['lastPointTemporary']=!0x1,_0xbf982d[a0_0x256f('0x309')](function(_0x49bd28){var _0x221104=_0x1f2b28[a0_0x256f('0x48d')](_0x1c324d[a0_0x256f('0x488')]['scene'],_0x49bd28[a0_0x256f('0x13c')]);_0x221104&&(_0xbf982d[a0_0x256f('0x3c8')]&&_0x14c6f7[a0_0x256f('0x1bf')](),_0x14c6f7[a0_0x256f('0x289')](_0x221104),_0xbf982d['lastPointTemporary']=!0x1,_0x119032['attribute']&&_0x119032[a0_0x256f('0x14a')][a0_0x256f('0x280')]&&(_0x14c6f7[a0_0x256f('0x658')]==_0x119032[a0_0x256f('0x14a')][a0_0x256f('0x280')][a0_0x256f('0x511')]&&_0x14c6f7[a0_0x256f('0x658')]==_0x119032[a0_0x256f('0x14a')]['minMaxPoints'][a0_0x256f('0x221')]||_0x119032[a0_0x256f('0x14a')]['minMaxPoints'][a0_0x256f('0x3c')]&&0x4==_0x14c6f7[a0_0x256f('0x658')])&&(_0x119032['inProgress']=!0x1,_0xbf982d[a0_0x256f('0x42')](),_0x1c324d[a0_0x256f('0x13')]=null,_0x119032[a0_0x256f('0x5bd')](),_0x119032[a0_0x256f('0x2')]()),_0x119032[a0_0x256f('0x27b')]());},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x3d8')]),_0xbf982d[a0_0x256f('0x309')](function(_0x10514e){if(_0x10514e[a0_0x256f('0x14')]){var _0x401dad=_0x1f2b28[a0_0x256f('0x48d')](_0x1c324d[a0_0x256f('0x488')][a0_0x256f('0x2b0')],_0x10514e[a0_0x256f('0x14')]);_0x401dad&&(_0xbf982d['lastPointTemporary']&&_0x14c6f7['pop'](),_0x14c6f7[a0_0x256f('0x289')](_0x401dad),_0xbf982d['lastPointTemporary']=!0x0,_0x119032[a0_0x256f('0x97')]());}},_0x1ba615['ScreenSpaceEventType'][a0_0x256f('0x37b')]),_0xbf982d['setInputAction'](function(_0x269f0f){_0x119032[a0_0x256f('0x5f9')]=!0x1,_0xbf982d[a0_0x256f('0x42')](),_0x1c324d['drawHandler']=null,_0x14c6f7[a0_0x256f('0x1bf')](),_0x119032[a0_0x256f('0x5bd')](),_0x119032[a0_0x256f('0x2')]();},_0x1ba615['ScreenSpaceEventType']['LEFT_DOUBLE_CLICK']),this[a0_0x256f('0x13')]=_0xbf982d,_0xbf982d;}},{'key':a0_0x256f('0x665'),'value':function(_0x337771,_0x1a10ac){var _0x5f1909=this;_0x337771[a0_0x256f('0x5f9')]=!0x0;var _0x326a35=new _0x1ba615['ScreenSpaceEventHandler'](this[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x54f')]);return _0x326a35['lastPointTemporary']=!0x1,_0x326a35['setInputAction'](function(_0x4e5e5c){var _0x2d2d68=_0x1f2b28[a0_0x256f('0x48d')](_0x5f1909[a0_0x256f('0x488')][a0_0x256f('0x2b0')],_0x4e5e5c[a0_0x256f('0x13c')]);if(_0x2d2d68){if(_0x326a35[a0_0x256f('0x3c8')]&&_0x1a10ac[a0_0x256f('0x1bf')](),_0x1a10ac[a0_0x256f('0x289')](_0x2d2d68),_0x337771[a0_0x256f('0x14a')][a0_0x256f('0x19b')]['extrudedHeight']){var _0x2732c0=_0x3c1780[a0_0x256f('0x4d2')](_0x1a10ac);_0x337771[a0_0x256f('0x493')][a0_0x256f('0x399')]=_0x2732c0+Number(_0x337771[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]);}_0x326a35[a0_0x256f('0x3c8')]=!0x1,_0x337771[a0_0x256f('0x27b')]();}},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x3d8')]),_0x326a35[a0_0x256f('0x309')](function(_0xd59fdf){if(_0xd59fdf[a0_0x256f('0x14')]){var _0x5e451d=_0x1f2b28[a0_0x256f('0x48d')](_0x5f1909[a0_0x256f('0x488')][a0_0x256f('0x2b0')],_0xd59fdf[a0_0x256f('0x14')]);if(_0x5e451d){if(_0x326a35[a0_0x256f('0x3c8')]&&_0x1a10ac[a0_0x256f('0x1bf')](),_0x1a10ac['push'](_0x5e451d),_0x337771['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x399')]){var _0x4c6c26=_0x3c1780[a0_0x256f('0x4d2')](_0x1a10ac);_0x337771[a0_0x256f('0x493')][a0_0x256f('0x399')]=_0x4c6c26+Number(_0x337771['attribute'][a0_0x256f('0x19b')]['extrudedHeight']);}_0x326a35[a0_0x256f('0x3c8')]=!0x0,_0x337771[a0_0x256f('0x97')]();}}},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x37b')]),_0x326a35[a0_0x256f('0x309')](function(_0x55c1ed){_0x337771[a0_0x256f('0x5f9')]=!0x1,_0x326a35['destroy'](),_0x5f1909[a0_0x256f('0x13')]=null,_0x1a10ac[a0_0x256f('0x1bf')](),_0x337771[a0_0x256f('0x5bd')](),_0x337771[a0_0x256f('0x2')]();},_0x1ba615['ScreenSpaceEventType'][a0_0x256f('0x51a')]),this['drawHandler']=_0x326a35,_0x326a35;}},{'key':a0_0x256f('0x362'),'value':function(_0x542ae5,_0x43030b){var _0x41448a=this;_0x542ae5[a0_0x256f('0x5f9')]=!0x0;var _0x218200=[],_0x515766=new _0x1ba615['ScreenSpaceEventHandler'](this[a0_0x256f('0x488')]['scene'][a0_0x256f('0x54f')]);return _0x515766['lastPointTemporary']=!0x1,_0x515766[a0_0x256f('0x309')](function(_0x57b179){var _0x26d7d7=_0x1f2b28[a0_0x256f('0x48d')](_0x41448a[a0_0x256f('0x488')]['scene'],_0x57b179['position']);if(_0x26d7d7){if(_0x515766[a0_0x256f('0x3c8')]&&_0x218200[a0_0x256f('0x1bf')](),_0x218200[a0_0x256f('0x289')](_0x26d7d7),0x1==_0x218200[a0_0x256f('0x658')]&&_0x542ae5['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x399')]){var _0x50fb2d=Number(_0x1ba615[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x26d7d7)['height'])[a0_0x256f('0x478')](0x2);_0x542ae5[a0_0x256f('0x15a')][a0_0x256f('0x4fa')]=Number(_0x50fb2d),_0x542ae5[a0_0x256f('0x15a')][a0_0x256f('0x399')]=Number(_0x50fb2d)+Number(_0x542ae5[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]),_0x542ae5[a0_0x256f('0x14a')][a0_0x256f('0x19b')]['height']=Number(_0x50fb2d);}if(0x2==_0x218200['length']){var _0x2dd3ea=_0x1ba615[a0_0x256f('0x51')][a0_0x256f('0x3a6')](_0x218200);_0x43030b[a0_0x256f('0x171')](_0x2dd3ea);}_0x515766[a0_0x256f('0x3c8')]=!0x1,_0x542ae5[a0_0x256f('0x27b')](),0x2==_0x218200[a0_0x256f('0x658')]&&(_0x542ae5[a0_0x256f('0x5f9')]=!0x1,_0x515766[a0_0x256f('0x42')](),_0x41448a[a0_0x256f('0x13')]=null,_0x542ae5[a0_0x256f('0x5bd')](),_0x542ae5[a0_0x256f('0x2')]());}},_0x1ba615['ScreenSpaceEventType'][a0_0x256f('0x3d8')]),_0x515766[a0_0x256f('0x309')](function(_0x2e2076){if(_0x2e2076['endPosition']){var _0x16baf5=_0x1f2b28['getCurrentMousePosition'](_0x41448a[a0_0x256f('0x488')][a0_0x256f('0x2b0')],_0x2e2076[a0_0x256f('0x14')]);if(_0x16baf5){if(_0x515766['lastPointTemporary']&&_0x218200[a0_0x256f('0x1bf')](),_0x218200[a0_0x256f('0x289')](_0x16baf5),0x2==_0x218200[a0_0x256f('0x658')]){var _0x5c51fc=_0x1ba615['Rectangle'][a0_0x256f('0x3a6')](_0x218200);_0x43030b[a0_0x256f('0x171')](_0x5c51fc);}_0x515766['lastPointTemporary']=!0x0,_0x542ae5[a0_0x256f('0x97')]();}}},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x37b')]),this['drawHandler']=_0x515766,_0x515766;}},{'key':a0_0x256f('0x2aa'),'value':function(_0x356997,_0x569db2,_0x58f615,_0x10f808){var _0x4e8f0c=this;_0x356997[a0_0x256f('0x5f9')]=!0x0;var _0x4a828e=new _0x1ba615[(a0_0x256f('0x7d'))](this[a0_0x256f('0x488')][a0_0x256f('0x2b0')]['canvas']);return _0x4a828e['lastPointTemporary']=!0x1,_0x4a828e[a0_0x256f('0x309')](function(_0x1b58eb){var _0x42dae9=_0x1f2b28[a0_0x256f('0x48d')](_0x4e8f0c['viewer'][a0_0x256f('0x2b0')],_0x1b58eb[a0_0x256f('0x13c')]);if(_0x42dae9){_0x4a828e[a0_0x256f('0x3c8')]&&(_0x569db2[a0_0x256f('0x1bf')](),_0x58f615[a0_0x256f('0x1bf')](),_0x10f808[a0_0x256f('0x1bf')]()),_0x569db2[a0_0x256f('0x289')](_0x42dae9);var _0x768c84=_0x1ba615[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x42dae9),_0x44996d=Number(_0x768c84[a0_0x256f('0x4fa')])[a0_0x256f('0x478')](0x2),_0xfb0029=Number(_0x44996d)+Number(_0x356997['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x399')]);_0x58f615[a0_0x256f('0x289')](_0x44996d),_0x10f808[a0_0x256f('0x289')](_0xfb0029),_0x4a828e[a0_0x256f('0x3c8')]=!0x1,_0x356997[a0_0x256f('0x27b')]();}},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x3d8')]),_0x4a828e['setInputAction'](function(_0x483ac5){if(_0x483ac5[a0_0x256f('0x14')]){var _0x5b0e3b=_0x1f2b28[a0_0x256f('0x48d')](_0x4e8f0c[a0_0x256f('0x488')][a0_0x256f('0x2b0')],_0x483ac5[a0_0x256f('0x14')]);if(_0x5b0e3b){_0x4a828e[a0_0x256f('0x3c8')]&&(_0x569db2[a0_0x256f('0x1bf')](),_0x58f615[a0_0x256f('0x1bf')](),_0x10f808[a0_0x256f('0x1bf')]()),_0x569db2[a0_0x256f('0x289')](_0x5b0e3b);var _0x3d189b=_0x1ba615[a0_0x256f('0x1db')]['fromCartesian'](_0x5b0e3b),_0x1b8150=Number(_0x3d189b['height'])[a0_0x256f('0x478')](0x2),_0x5cfc2f=Number(_0x1b8150)+Number(_0x356997[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]);_0x58f615[a0_0x256f('0x289')](_0x1b8150),_0x10f808[a0_0x256f('0x289')](_0x5cfc2f),_0x4a828e[a0_0x256f('0x3c8')]=!0x0,_0x356997['moveDrawing']();}}},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x37b')]),_0x4a828e[a0_0x256f('0x309')](function(_0x3f6607){_0x356997['inProgress']=!0x1,_0x4a828e[a0_0x256f('0x42')](),_0x4e8f0c[a0_0x256f('0x13')]=null,_0x569db2[a0_0x256f('0x1bf')](),_0x58f615['pop'](),_0x10f808[a0_0x256f('0x1bf')](),_0x356997['stopDrawing'](),_0x356997[a0_0x256f('0x2')]();},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x51a')]),this[a0_0x256f('0x13')]=_0x4a828e,_0x4a828e;}},{'key':a0_0x256f('0x370'),'value':function(){this[a0_0x256f('0x13')]&&(this['drawHandler']['destroy'](),this['drawHandler']=null);}},{'key':a0_0x256f('0x25a'),'value':function(_0x34d32c){var _0x2861d5=this,_0x28fcd6=new _0x1ba615[(a0_0x256f('0x7d'))](this['viewer'][a0_0x256f('0x54f')]);_0x28fcd6[a0_0x256f('0x309')](function(_0x42e72c){var _0x45e87a=_0x2861d5[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x4d8')](_0x42e72c['position']),_0x4e1427=null;if(_0x1ba615[a0_0x256f('0x4a3')](_0x45e87a)){var _0x1e0391=_0x1ba615[a0_0x256f('0x9f')](_0x45e87a['id'],_0x45e87a[a0_0x256f('0x4e8')]['id']);if(_0x1e0391 instanceof _0x1ba615['Entity'])_0x1ba615[a0_0x256f('0x9f')](_0x1e0391[a0_0x256f('0x5f9')],!0x1)||(_0x4e1427=_0x1e0391);}_0x34d32c(_0x4e1427);},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x3d8')]),this[a0_0x256f('0x4c7')]=_0x28fcd6;}},{'key':a0_0x256f('0x648'),'value':function(){var _0x3613a8=new _0x1ba615['ScreenSpaceEventHandler'](this[a0_0x256f('0x488')][a0_0x256f('0x54f')]);_0x3613a8['dragger']=null;var _0xb169=this;_0x3613a8[a0_0x256f('0x309')](function(_0x3e00d8){var _0x336e52=_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x4d8')](_0x3e00d8['position']);if(_0x1ba615['defined'](_0x336e52)){var _0x4b61c1=_0x336e52['id'];_0x4b61c1&&_0x1ba615[a0_0x256f('0x9f')](_0x4b61c1[a0_0x256f('0x3dd')],!0x1)&&(_0x4b61c1[a0_0x256f('0x13d')]&&(_0x4b61c1[a0_0x256f('0x13d')]['scale_src']=_0x4b61c1['billboard']['scale'][a0_0x256f('0x110')],_0x4b61c1[a0_0x256f('0x13d')]['scale'][a0_0x256f('0x110')]=1.2*_0x4b61c1[a0_0x256f('0x13d')][a0_0x256f('0x497')]),_0x3613a8[a0_0x256f('0x39e')]=_0x4b61c1,_0xb169[a0_0x256f('0x488')]['scene']['screenSpaceCameraController'][a0_0x256f('0xad')]=!0x1,_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')][a0_0x256f('0x501')]=!0x1,_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')][a0_0x256f('0x54d')]=!0x1);}},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x656')]),_0x3613a8[a0_0x256f('0x309')](function(_0x43f972){var _0x871a64=_0xb169[a0_0x256f('0x488')]['scene'][a0_0x256f('0x4d8')](_0x43f972[a0_0x256f('0x13c')]);if(_0x1ba615[a0_0x256f('0x4a3')](_0x871a64)){var _0x245e2b=_0x871a64['id'];_0x245e2b&&_0x1ba615['defaultValue'](_0x245e2b[a0_0x256f('0x3dd')],!0x1)&&(_0x245e2b['billboard']&&(_0x245e2b[a0_0x256f('0x13d')][a0_0x256f('0x497')]=_0x245e2b[a0_0x256f('0x13d')][a0_0x256f('0x193')][a0_0x256f('0x110')],_0x245e2b[a0_0x256f('0x13d')]['scale'][a0_0x256f('0x110')]=1.2*_0x245e2b[a0_0x256f('0x13d')][a0_0x256f('0x497')]),_0x3613a8[a0_0x256f('0x39e')]=_0x245e2b,_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')][a0_0x256f('0xad')]=!0x1,_0xb169['viewer']['scene']['screenSpaceCameraController'][a0_0x256f('0x501')]=!0x1,_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')][a0_0x256f('0x54d')]=!0x1);}},_0x1ba615[a0_0x256f('0xf8')]['LEFT_DOWN'],_0x1ba615[a0_0x256f('0x5c4')][a0_0x256f('0x3d1')]),_0x3613a8[a0_0x256f('0x309')](function(_0x2a28e0){if(_0x3613a8[a0_0x256f('0x39e')]){if(_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x547')]){var _0x5cf25d;if(_0x3613a8['dragger'][a0_0x256f('0x407')]){var _0x348e4b=_0xb169[a0_0x256f('0x488')]['scene'],_0x35a995=_0x348e4b[a0_0x256f('0x4d8')](_0x2a28e0['endPosition']);if(_0x1ba615[a0_0x256f('0x4a3')](_0x35a995)&&_0x35a995['id']==_0x3613a8[a0_0x256f('0x39e')]){var _0x2252dc=_0x348e4b['camera']['getPickRay'](_0x2a28e0[a0_0x256f('0x14')]);_0x5cf25d=_0x348e4b['globe'][a0_0x256f('0x4d8')](_0x2252dc,_0x348e4b);}}null==_0x5cf25d&&(_0x5cf25d=_0x1f2b28[a0_0x256f('0x48d')](_0xb169[a0_0x256f('0x488')]['scene'],_0x2a28e0[a0_0x256f('0x14')])),_0x5cf25d&&(_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x13c')]=_0x5cf25d,_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x36c')]&&_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x36c')](_0x3613a8['dragger'],_0x5cf25d));}if(_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x1b')]){var _0x5f2e76=_0x2a28e0[a0_0x256f('0x14')]['y']-_0x2a28e0[a0_0x256f('0x1dd')]['y'],_0xf13b14=_0x3613a8[a0_0x256f('0x39e')]['position']['_value'],_0x3ee264=new _0x1ba615[(a0_0x256f('0x2e'))](_0xf13b14);_0x1d8e70[a0_0x256f('0x532')]=_0xf13b14,_0x1d8e70[a0_0x256f('0x223')]=0x1;var _0xe52160=_0xb169[a0_0x256f('0x488')]['scene'][a0_0x256f('0xcc')][a0_0x256f('0x3ee')][a0_0x256f('0x26')](_0x1d8e70,_0xb169['viewer'][a0_0x256f('0x2b0')]['frameState']['context']['drawingBufferWidth'],_0xb169[a0_0x256f('0x488')]['scene'][a0_0x256f('0xcc')]['context'][a0_0x256f('0x563')]),_0x90d9d=new _0x1ba615[(a0_0x256f('0x534'))]();_0x1ba615[a0_0x256f('0x534')][a0_0x256f('0x5a1')](_0x3ee264[a0_0x256f('0x3d')],-_0x5f2e76*_0xe52160,_0x90d9d);var _0x13223b=_0x1ba615['Cartesian3']['clone'](_0xf13b14);_0x1ba615[a0_0x256f('0x534')][a0_0x256f('0x53d')](_0xf13b14,_0x90d9d,_0x13223b),_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x13c')]=_0x13223b,_0x3613a8['dragger'][a0_0x256f('0x36c')]&&_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x36c')](_0x3613a8['dragger'],_0x13223b);}}},_0x1ba615['ScreenSpaceEventType'][a0_0x256f('0x37b')]);var _0x1d8e70=new _0x1ba615['BoundingSphere']();_0x3613a8[a0_0x256f('0x309')](function(_0x3c979f){if(_0x3613a8[a0_0x256f('0x39e')]&&_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x529')]){var _0x585341=_0x3c979f[a0_0x256f('0x14')]['y']-_0x3c979f[a0_0x256f('0x1dd')]['y'],_0x9b4309=_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x13c')][a0_0x256f('0x110')],_0x16187d=new _0x1ba615[(a0_0x256f('0x2e'))](_0x9b4309);_0x1d8e70['center']=_0x9b4309,_0x1d8e70[a0_0x256f('0x223')]=0x1;var _0x503d91=_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0xcc')]['camera'][a0_0x256f('0x26')](_0x1d8e70,_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0xcc')][a0_0x256f('0x59')]['drawingBufferWidth'],_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0xcc')][a0_0x256f('0x59')]['drawingBufferHeight']),_0x27407e=new _0x1ba615[(a0_0x256f('0x534'))]();_0x1ba615[a0_0x256f('0x534')][a0_0x256f('0x5a1')](_0x16187d['zAxis'],-_0x585341*_0x503d91,_0x27407e);var _0x377316=_0x1ba615[a0_0x256f('0x534')][a0_0x256f('0x444')](_0x9b4309);_0x1ba615[a0_0x256f('0x534')][a0_0x256f('0x53d')](_0x9b4309,_0x27407e,_0x377316),_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x13c')]=_0x377316,_0x3613a8[a0_0x256f('0x39e')]['onDrag']&&_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x36c')](_0x3613a8['dragger'],_0x377316);}},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x37b')],_0x1ba615[a0_0x256f('0x5c4')][a0_0x256f('0x3d1')]),_0x3613a8[a0_0x256f('0x309')](function(){_0x3613a8[a0_0x256f('0x39e')]&&(_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x13d')]&&(_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x13d')][a0_0x256f('0x193')]['_value']=_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x13d')][a0_0x256f('0x497')]),_0x3613a8[a0_0x256f('0x39e')]=null,_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')][a0_0x256f('0xad')]=!0x0,_0xb169['viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')]['enableTilt']=!0x0,_0xb169['viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')]['enableTranslate']=!0x0);},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x34d')]),_0x3613a8[a0_0x256f('0x309')](function(){_0x3613a8[a0_0x256f('0x39e')]&&(_0x3613a8[a0_0x256f('0x39e')][a0_0x256f('0x13d')]&&(_0x3613a8['dragger'][a0_0x256f('0x13d')][a0_0x256f('0x193')][a0_0x256f('0x110')]=_0x3613a8[a0_0x256f('0x39e')]['billboard'][a0_0x256f('0x497')]),_0x3613a8[a0_0x256f('0x39e')]=null,_0xb169['viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')][a0_0x256f('0xad')]=!0x0,_0xb169[a0_0x256f('0x488')][a0_0x256f('0x2b0')][a0_0x256f('0x2f5')][a0_0x256f('0x501')]=!0x0,_0xb169[a0_0x256f('0x488')]['scene'][a0_0x256f('0x2f5')]['enableTranslate']=!0x0);},_0x1ba615[a0_0x256f('0xf8')][a0_0x256f('0x34d')],_0x1ba615[a0_0x256f('0x5c4')]['CTRL']),this['draggerHandler']=_0x3613a8;}},{'key':'destroyEditHandler','value':function(){this[a0_0x256f('0x4c7')]&&(this[a0_0x256f('0x4c7')]['destroy'](),this['selectHandler']=null),this['draggerHandler']&&(this[a0_0x256f('0x1df')][a0_0x256f('0x42')](),this[a0_0x256f('0x1df')]=null);}}]),_0x56ec46;}(),_0x6696d4=DC[a0_0x256f('0x3bd')]['Cesium'];function _0x5d7bdf(_0x10e743){function _0x39d22f(_0x264080){_0x138a59=_0x264080,_0x264080?(_0x2714d4[a0_0x256f('0x25a')](function(_0x2dc040){_0x43b8f7&&_0x43b8f7[a0_0x256f('0x5f9')]||(_0x2dc040!==_0x43b8f7?(_0x43b8f7&&_0x43b8f7[a0_0x256f('0x31')]&&(_0x43b8f7['stopEditing'](),_0x43b8f7=null),(_0x43b8f7=_0x2dc040)&&_0x43b8f7[a0_0x256f('0x2')]&&_0x43b8f7[a0_0x256f('0x2')]()):_0x10e743[a0_0x256f('0x324')]&&a0_0x256f('0x560')==typeof _0x10e743[a0_0x256f('0x324')]&&_0x10e743[a0_0x256f('0x324')]());}),_0x2714d4[a0_0x256f('0x648')]()):(_0x3ca731(),_0x2714d4['destroyEditHandler']());}function _0x3ca731(){return _0x2714d4[a0_0x256f('0x370')](),_0x43b8f7&&_0x43b8f7['inProgress']&&(_0x43b8f7[a0_0x256f('0x5bd')](),_0x4e5288[a0_0x256f('0x365')][a0_0x256f('0x3ec')](_0x43b8f7),_0x29378d(_0x5c27cc,_0x43b8f7)),_0x43b8f7&&(_0x43b8f7[a0_0x256f('0x31')](),_0x43b8f7=null),this;}function _0x1854e0(_0x26ecc2){_0x26ecc2['startDrawing']=function(){$('.cesium-viewer')['css'](a0_0x256f('0x34f'),'crosshair'),_0x10e743['onStartDrawing']&&a0_0x256f('0x560')==typeof _0x10e743['onStartDrawing']&&_0x10e743[a0_0x256f('0x48f')](this);},_0x26ecc2[a0_0x256f('0x27b')]=function(){_0x10e743[a0_0x256f('0xd0')]&&'function'==typeof _0x10e743[a0_0x256f('0xd0')]&&_0x10e743[a0_0x256f('0xd0')](this);},_0x26ecc2[a0_0x256f('0x97')]=function(){_0x10e743[a0_0x256f('0x599')]&&a0_0x256f('0x560')==typeof _0x10e743[a0_0x256f('0x599')]&&_0x10e743[a0_0x256f('0x599')](this);},_0x26ecc2['stopDrawing']=function(){$('.cesium-viewer')['css'](a0_0x256f('0x34f'),''),_0x10e743['onStopDrawing']&&a0_0x256f('0x560')==typeof _0x10e743['onStopDrawing']&&_0x10e743[a0_0x256f('0x8b')](this);},_0x26ecc2[a0_0x256f('0x2')]=function(){if(_0x138a59){var _0x31900c=this;if(null==_0x31900c[a0_0x256f('0x189')]){var _0x49e801=_0x31900c[a0_0x256f('0x14a')][a0_0x256f('0x195')];_0x31900c[a0_0x256f('0x189')]=_0x3f50a6[_0x49e801]['getEditor'](_0x4e5288,_0x31900c,{'dragIcon':_0x4fb45c});}_0x10e743[a0_0x256f('0x4fd')]&&a0_0x256f('0x560')==typeof _0x10e743[a0_0x256f('0x4fd')]&&_0x10e743[a0_0x256f('0x4fd')](_0x31900c);}},_0x26ecc2['stopEditing']=function(){var _0x46c88c=this;_0x46c88c[a0_0x256f('0x189')]&&(_0x46c88c['editor'][a0_0x256f('0x42')](),_0x46c88c[a0_0x256f('0x189')]=null),_0x10e743[a0_0x256f('0x324')]&&a0_0x256f('0x560')==typeof _0x10e743[a0_0x256f('0x324')]&&_0x10e743[a0_0x256f('0x324')]();},_0x26ecc2[a0_0x256f('0x46f')]=function(){_0x10e743[a0_0x256f('0x2fc')]&&a0_0x256f('0x560')==typeof _0x10e743[a0_0x256f('0x2fc')]&&_0x10e743[a0_0x256f('0x2fc')](this);},_0x26ecc2[a0_0x256f('0x5e4')]=function(_0x1dc57a){var _0x19bad8=this,_0x56421d=_0x19bad8[a0_0x256f('0x14a')]['type'];if('ellipse'==_0x56421d){var _0x58d94b=_0x6696d4['Cartographic'][a0_0x256f('0x296')](_0x1dc57a)[a0_0x256f('0x4fa')];if(_0x19bad8[a0_0x256f('0x14a')][a0_0x256f('0x19b')]['height']=Number(Number(_0x58d94b)['toFixed'](0x2)),_0x19bad8[a0_0x256f('0x63d')]['height'][a0_0x256f('0x110')]=Number(Number(_0x58d94b)[a0_0x256f('0x478')](0x2)),_0x19bad8['attribute'][a0_0x256f('0x19b')][a0_0x256f('0x399')]){var _0x4e0634=Number(_0x58d94b)+Number(_0x19bad8[a0_0x256f('0x14a')][a0_0x256f('0x19b')][a0_0x256f('0x399')]);_0x19bad8['ellipse']['extrudedHeight'][a0_0x256f('0x110')]=Number(_0x4e0634['toFixed'](0x2)),_0x19bad8[a0_0x256f('0x14a')]['style'][a0_0x256f('0x399')]=Number(_0x4e0634['toFixed'](0x2));}}_0x3f50a6[_0x56421d][a0_0x256f('0xe6')](_0x43b8f7,_0x1dc57a);};}function _0x59fa0d(_0x38bb85){return'string'==typeof _0x38bb85&&_0x38bb85[a0_0x256f('0x3d3')]==String;}function _0x29378d(_0x83616f,_0x4f4929){for(var _0x1548f5=0x0;_0x1548f5<_0x83616f[a0_0x256f('0x658')];_0x1548f5++)if(_0x83616f[_0x1548f5]==_0x4f4929){_0x83616f[a0_0x256f('0x1a8')](_0x1548f5,0x1);break;}}var _0x3f50a6={'billboard':_0x3baa45,'label':_0x530ba3,'ellipse':_0x1374a5,'polyline':_0x20ac15,'polylineVolume':_0x3ec923,'polygon':_0x5427cd,'ellipsoid':_0x1dd0b3,'wall':_0x17f5b0,'point':_0x4af2b1,'rectangle':_0x50f94c,'model':_0x2faa56},_0x4e5288=_0x10e743[a0_0x256f('0x488')],_0x4fb45c=(_0x4e5288['scene'],_0x10e743[a0_0x256f('0x4e6')]),_0x43b8f7=null,_0x5c27cc=[],_0x2714d4=new _0x3efca9(_0x4e5288),_0x138a59=_0x10e743['hasEdit'];return _0x39d22f(_0x10e743[a0_0x256f('0xe4')]),{'startDraw':function(_0x2a1814){if(_0x3ca731(),null==_0x2a1814||null==_0x2a1814['type'])throw'请传入需要绘制的类型参数';_0x2a1814['style']=_0x2a1814[a0_0x256f('0x19b')]||{},_0x2a1814[a0_0x256f('0x231')]=_0x2a1814[a0_0x256f('0x231')]||{};var _0x1ba7d7=_0x2a1814[a0_0x256f('0x195')];if(null==_0x3f50a6[_0x1ba7d7])throw a0_0x256f('0x507')+_0x1ba7d7+a0_0x256f('0x1d8');var _0x184e4a=_0x3f50a6[_0x1ba7d7]['startDraw'](_0x4e5288,_0x2a1814);switch(_0x1ba7d7){case a0_0x256f('0x3a4'):case a0_0x256f('0x322'):case a0_0x256f('0x13d'):case a0_0x256f('0x407'):case a0_0x256f('0x63d'):case a0_0x256f('0x2f'):_0x2714d4['createDrawPointHandler'](_0x184e4a);break;case a0_0x256f('0x18d'):case'polylineVolume':_0x2714d4[a0_0x256f('0x1c8')](_0x184e4a,_0x3f50a6[_0x1ba7d7]['getPositions'](_0x184e4a));break;case a0_0x256f('0x493'):_0x2714d4[a0_0x256f('0x665')](_0x184e4a,_0x3f50a6[_0x1ba7d7][a0_0x256f('0x508')](_0x184e4a));break;case a0_0x256f('0x15a'):case'extrudedRectangle':case a0_0x256f('0x262'):_0x2714d4['createTwoPointsModelHandler'](_0x184e4a,_0x3f50a6[_0x1ba7d7]['getPositions'](_0x184e4a));break;case'wall':var _0x21b940=_0x3f50a6[_0x1ba7d7][a0_0x256f('0x508')](_0x184e4a),_0x1c1b81=_0x3f50a6[_0x1ba7d7][a0_0x256f('0x185')](_0x184e4a),_0x1870e4=_0x3f50a6[_0x1ba7d7]['getMaximumHeights'](_0x184e4a);_0x2714d4[a0_0x256f('0x2aa')](_0x184e4a,_0x21b940,_0x1c1b81,_0x1870e4);}return _0x1854e0(_0x184e4a),_0x5c27cc[a0_0x256f('0x289')](_0x184e4a),_0x184e4a['startDrawing'](),_0x43b8f7=_0x184e4a,_0x184e4a;},'stopDraw':_0x3ca731,'updateAttribute':function(_0x1d345a){if(null!=_0x43b8f7&&null!=_0x1d345a){_0x1d345a[a0_0x256f('0x19b')]=_0x1d345a[a0_0x256f('0x19b')]||{},_0x1d345a[a0_0x256f('0x231')]=_0x1d345a[a0_0x256f('0x231')]||{};var _0x7f0aa6=_0x43b8f7[a0_0x256f('0x14a')][a0_0x256f('0x195')];return _0x3f50a6[_0x7f0aa6]['attribute2Entity'](_0x1d345a,_0x43b8f7[_0x7f0aa6]),a0_0x256f('0x407')==_0x7f0aa6&&_0x3f50a6[_0x7f0aa6]['attribute2Model'](_0x1d345a,_0x43b8f7),_0x43b8f7[a0_0x256f('0x14a')]=_0x1d345a,a0_0x256f('0x63d')!=_0x7f0aa6&&'polygon'!=_0x7f0aa6&&a0_0x256f('0x21a')!=_0x7f0aa6&&a0_0x256f('0x15a')!=_0x7f0aa6||_0x43b8f7[a0_0x256f('0x189')][a0_0x256f('0x66')](),_0x43b8f7;}},'updateGeometry':function(_0xb9e2f2){if(null!=_0x43b8f7&&null!=_0xb9e2f2){var _0x53bb1c=_0x43b8f7[a0_0x256f('0x14a')][a0_0x256f('0x195')];return _0x3f50a6[_0x53bb1c][a0_0x256f('0xe6')](_0x43b8f7,_0xb9e2f2),_0x43b8f7[a0_0x256f('0x189')][a0_0x256f('0x66')](),_0x43b8f7;}},'toGeoJSON':function(){if(0x0==_0x5c27cc[a0_0x256f('0x658')])return'';for(var _0xb4915f=[],_0x379106=0x0;_0x379106<_0x5c27cc[a0_0x256f('0x658')];_0x379106++){var _0x2fb272=_0x5c27cc[_0x379106],_0xf34c62=_0x2fb272[a0_0x256f('0x14a')][a0_0x256f('0x195')],_0x1fa662=_0x3f50a6[_0xf34c62][a0_0x256f('0x50e')](_0x2fb272);_0xb4915f['push'](_0x1fa662);}return _0x1fa662={'type':a0_0x256f('0x456'),'features':_0xb4915f},JSON[a0_0x256f('0x13a')](_0x1fa662);},'jsonToEntity':function(_0x11359e,_0x27e5ce,_0x16e060){var _0x11dfc7=_0x11359e;try{_0x59fa0d(_0x11359e)&&(_0x11dfc7=JSON[a0_0x256f('0x1c5')](_0x11359e));}catch(_0x4f0110){return void haoutil[a0_0x256f('0x63b')](_0x4f0110[a0_0x256f('0x215')]+':\x20'+_0x4f0110['message']+'\x20\x0a请确认json文件格式正确!!!');}_0x27e5ce&&u();for(var _0x3f1e66=_0x11dfc7['features'],_0x10072d=0x0;_0x10072d<_0x3f1e66[a0_0x256f('0x658')];_0x10072d++){var _0x3c4fa7=_0x3f1e66[_0x10072d],_0x4570b3=_0x3c4fa7[a0_0x256f('0x624')][a0_0x256f('0x195')],_0x1baa25=_0x3f50a6[_0x4570b3][a0_0x256f('0x35a')](_0x4e5288,_0x3c4fa7[a0_0x256f('0x624')]),_0x11a926=_0x3c1780[a0_0x256f('0x3f3')](_0x3c4fa7[a0_0x256f('0x17b')]);_0x3f50a6[_0x4570b3][a0_0x256f('0xe6')](_0x1baa25,_0x11a926),_0x1854e0(_0x1baa25),_0x5c27cc[a0_0x256f('0x289')](_0x1baa25);}return _0x16e060&&_0x4e5288['flyTo'](_0x5c27cc,{'duration':0x3}),_0x5c27cc;},'markersInfoToEntity':function(_0x52cb37,_0x20e90d,_0x5b8618){var _0x4b11fb=_0x52cb37;try{_0x59fa0d(_0x52cb37)&&(_0x4b11fb=JSON['parse'](_0x52cb37));}catch(_0x444a1d){return void haoutil['alert'](_0x444a1d[a0_0x256f('0x215')]+':\x20'+_0x444a1d[a0_0x256f('0x465')]+a0_0x256f('0x449'));}if(_0x4b11fb instanceof Array){_0x5b8618&&u();for(var _0x28f60c=0x0;_0x28f60c<_0x4b11fb[a0_0x256f('0x658')];_0x28f60c++){var _0x3729f3=_0x4b11fb[_0x28f60c];if(!_0x3729f3['x']||!_0x3729f3['y'])return void haoutil['alert'](r[a0_0x256f('0x215')]+':\x20'+r[a0_0x256f('0x465')]+a0_0x256f('0x449'));var _0x14e6ab={'id':_0x3729f3['id']||_0x3729f3['ID']||'','name':_0x3729f3[a0_0x256f('0x215')]||_0x3729f3['NAME']||'','remark':_0x3729f3['remark']||_0x3729f3[a0_0x256f('0x1e4')]||''},_0x2a010a={'type':_0x20e90d[a0_0x256f('0x195')]||a0_0x256f('0x13d'),'attr':_0x14e6ab,'style':_0x20e90d['style']},_0x513fca=_0x6696d4[a0_0x256f('0x534')][a0_0x256f('0x641')](_0x3729f3['x'],_0x3729f3['y'],_0x3729f3['z']||0x0),_0x471d8b=_0x3f50a6[_0x2a010a[a0_0x256f('0x195')]][a0_0x256f('0x35a')](_0x4e5288,_0x2a010a);_0x3f50a6[_0x2a010a[a0_0x256f('0x195')]][a0_0x256f('0xe6')](_0x471d8b,_0x513fca),_0x1854e0(_0x471d8b),_0x5c27cc['push'](_0x471d8b);}return _0x5c27cc;}haoutil[a0_0x256f('0x63b')](a0_0x256f('0x545'));},'deleteEntity':function(_0x14bcc6){null!=_0x14bcc6&&(_0x14bcc6[a0_0x256f('0x31')](),_0x29378d(_0x5c27cc,_0x14bcc6),_0x4e5288[a0_0x256f('0x365')][a0_0x256f('0x3ec')](_0x14bcc6));},'deleteCurrentEntity':function(){_0x43b8f7&&(_0x43b8f7[a0_0x256f('0x31')](),_0x29378d(_0x5c27cc,_0x43b8f7),_0x4e5288['entities'][a0_0x256f('0x3ec')](_0x43b8f7),_0x43b8f7=null);},'deleteAll':function(){_0x3ca731();for(var _0xd039b6=0x0;_0xd039b6<_0x5c27cc[a0_0x256f('0x658')];_0xd039b6++){var _0xab7742=_0x5c27cc[_0xd039b6];_0xab7742[a0_0x256f('0x31')](),_0x4e5288[a0_0x256f('0x365')][a0_0x256f('0x3ec')](_0xab7742);}_0x5c27cc=[];},'hasDraw':function(){return _0x5c27cc[a0_0x256f('0x658')]>0x0;},'hasEdit':_0x39d22f,'getEntitys':function(){return _0x5c27cc;},'getCoordinates':function(_0x3365b0){var _0x4e4745=_0x3365b0[a0_0x256f('0x14a')][a0_0x256f('0x195')];return _0x3f50a6[_0x4e4745][a0_0x256f('0x4ae')](_0x3365b0);},'getPositions':function(_0x234e3d){var _0x1dafac=_0x234e3d['attribute'][a0_0x256f('0x195')];return _0x3f50a6[_0x1dafac]['getPositions'](_0x234e3d);},'setPositions':function(_0x3fee09,_0x4f5dd3){var _0x5d265c=_0x3fee09['attribute']['type'];_0x4f5dd3=_0x3f50a6[_0x5d265c]['setPositions'](_0x3fee09,_0x4f5dd3);}};}var _0x2ba48f=DC['Namespace'][a0_0x256f('0x224')],_0x261acb=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x43b0e1=function(){function _0x1a3544(_0x188320,_0x3523ac){_0x3c0ba4()(this,_0x1a3544),this['_viewer']=_0x188320,this['_popup']=_0x3523ac,this['_position']=_0x3523ac[a0_0x256f('0x13c')],this[a0_0x256f('0x401')]();}return _0x6f111f()(_0x1a3544,[{'key':a0_0x256f('0x401'),'value':function(){var _0x1d9365=this;this[a0_0x256f('0x4e3')](this[a0_0x256f('0x425')][a0_0x256f('0x26d')])?this[a0_0x256f('0x425')][a0_0x256f('0x26d')][a0_0x256f('0x218')](function(_0x333201,_0x862b68){return _0x1d9365[a0_0x256f('0x1b9')](_0x333201,_0x1d9365[a0_0x256f('0x425')]['className'],_0x1d9365[a0_0x256f('0x666')][_0x862b68]);}):this[a0_0x256f('0x1b9')](this[a0_0x256f('0x425')]['domId'],this[a0_0x256f('0x425')][a0_0x256f('0xbf')],this[a0_0x256f('0x666')][0x0]);}},{'key':a0_0x256f('0x4e3'),'value':function(_0x16ed50){return a0_0x256f('0x560')==typeof Array[a0_0x256f('0x4e3')]?Array[a0_0x256f('0x4e3')](_0x16ed50):a0_0x256f('0x5e0')===Object['prototype']['toString']['call'](_0x16ed50);}},{'key':a0_0x256f('0x1b9'),'value':function(_0x398e47,_0x3f1ad3,_0x21c93e){var _0x51252c=this,_0x213215=_0x261acb[a0_0x256f('0x534')][a0_0x256f('0x641')](_0x21c93e['longitude'],_0x21c93e[a0_0x256f('0x2b1')],_0x21c93e[a0_0x256f('0x4fa')]||0xc8),_0x3d314c=_0x261acb[a0_0x256f('0x5d5')][a0_0x256f('0x380')](this[a0_0x256f('0x454')][a0_0x256f('0x2b0')],_0x213215),_0x4f680d=document[a0_0x256f('0x273')](a0_0x256f('0x64f'));_0x4f680d[a0_0x256f('0x52')]=a0_0x256f('0x538'),_0x4f680d[a0_0x256f('0xbb')]('id',_0x398e47),_0x4f680d['className']=_0x3f1ad3||'',document[a0_0x256f('0xfa')]('cesiumContainer')['appendChild'](_0x4f680d),document[a0_0x256f('0xfa')](_0x398e47)[a0_0x256f('0x19b')][a0_0x256f('0x480')]=_0x3d314c['x']+'px',document['getElementById'](_0x398e47)[a0_0x256f('0x19b')][a0_0x256f('0x305')]=_0x3d314c['y']-document[a0_0x256f('0xfa')](_0x398e47)[a0_0x256f('0x430')]+0x14+'px',console[a0_0x256f('0x358')](_0x3d314c['x'],document[a0_0x256f('0xfa')](_0x398e47)[a0_0x256f('0x302')]);var _0x46b4ce=new _0x261acb['Cartesian2'](_0x21c93e[a0_0x256f('0x520')],_0x21c93e[a0_0x256f('0x2b1')]);_0x51252c[a0_0x256f('0x2e7')](_0x46b4ce,_0x398e47),this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x24b')][a0_0x256f('0x429')](function(){var _0x28ff8d=_0x261acb[a0_0x256f('0x5d5')][a0_0x256f('0x380')](_0x51252c[a0_0x256f('0x454')][a0_0x256f('0x2b0')],_0x213215);_0x46b4ce['x']===_0x28ff8d['x']&&_0x46b4ce['y']===_0x28ff8d['y']||(_0x51252c[a0_0x256f('0x2e7')](_0x28ff8d,_0x398e47),_0x46b4ce=_0x28ff8d);});}},{'key':a0_0x256f('0x43e'),'value':function(){}},{'key':a0_0x256f('0x2e7'),'value':function(_0xf42d8e,_0x3bac32){var _0x4a42c9=_0xf42d8e['x'],_0x42a5a1=_0xf42d8e['y']-document[a0_0x256f('0xfa')](_0x3bac32)[a0_0x256f('0x430')];document[a0_0x256f('0xfa')](_0x3bac32)[a0_0x256f('0x19b')][a0_0x256f('0x480')]=_0x4a42c9+'px',document[a0_0x256f('0xfa')](_0x3bac32)[a0_0x256f('0x19b')][a0_0x256f('0x305')]=_0x42a5a1+'px';}},{'key':a0_0x256f('0x488'),'get':function(){return this[a0_0x256f('0x454')];}},{'key':a0_0x256f('0x555'),'get':function(){return this['_popup'];}},{'key':a0_0x256f('0x13c'),'get':function(){return this[a0_0x256f('0x666')];}}]),_0x1a3544;}(),_0xb5bf4f=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x566998=function(){function _0x4af841(_0x55a485){var _0x28ad26=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};_0x3c0ba4()(this,_0x4af841),this[a0_0x256f('0x454')]=_0x55a485,this[a0_0x256f('0x1d3')]=_0x28ad26,this[a0_0x256f('0xd5')]=_0x55a485[a0_0x256f('0x3ee')][a0_0x256f('0x569')],this[a0_0x256f('0x551')]=_0xb5bf4f[a0_0x256f('0x29c')][a0_0x256f('0x2c9')](),this[a0_0x256f('0x47e')]=this[a0_0x256f('0x1d3')][a0_0x256f('0xda')]||0xa,this[a0_0x256f('0x3bb')]=_0xb5bf4f[a0_0x256f('0x29c')][a0_0x256f('0x3b6')](this[a0_0x256f('0x551')],this[a0_0x256f('0x47e')],new _0xb5bf4f[(a0_0x256f('0x29c'))]()),this[a0_0x256f('0x15f')]();}return _0x6f111f()(_0x4af841,[{'key':'_start','value':function(){this['_viewer'][a0_0x256f('0x504')]['currentTime']=this['_startTime'][a0_0x256f('0x444')](),this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x3f8')][a0_0x256f('0x429')](this['_onPostUpdateHandler'],this);}},{'key':a0_0x256f('0x5c7'),'value':function(_0x478b3c,_0x15aab6){var _0x4ec263=_0xb5bf4f[a0_0x256f('0x29c')][a0_0x256f('0x38c')](_0x15aab6,this[a0_0x256f('0x551')]),_0x23ab32=_0xb5bf4f[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0x4ec263*(0x168/this[a0_0x256f('0x47e')]))+this[a0_0x256f('0xd5')];this[a0_0x256f('0x454')][a0_0x256f('0x2b0')]['camera'][a0_0x256f('0x541')]({'orientation':{'heading':_0x23ab32}}),_0xb5bf4f[a0_0x256f('0x29c')][a0_0x256f('0x459')](_0x15aab6,this[a0_0x256f('0x3bb')])>=0x0&&(this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x3f8')]['removeEventListener'](this[a0_0x256f('0x5c7')],this),this[a0_0x256f('0x1d3')][a0_0x256f('0x16a')]&&this[a0_0x256f('0x1d3')][a0_0x256f('0x16a')][a0_0x256f('0x32b')](this[a0_0x256f('0x1d3')][a0_0x256f('0x59')]||this));}}]),_0x4af841;}(),_0x438271=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x2e4a75=function(){function _0x2f9876(_0x8f492e,_0x1d09d6){var _0x5be630=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};_0x3c0ba4()(this,_0x2f9876),this['_viewer']=_0x8f492e,this[a0_0x256f('0x666')]=_0x2a7036['a'][a0_0x256f('0x10c')](_0x1d09d6),this[a0_0x256f('0x1d3')]=_0x5be630,this[a0_0x256f('0xd5')]=_0x8f492e[a0_0x256f('0x3ee')][a0_0x256f('0x569')],this['_startTime']=_0x438271[a0_0x256f('0x29c')]['now'](),this[a0_0x256f('0x47e')]=this[a0_0x256f('0x1d3')][a0_0x256f('0xda')]||0xa,this['_stopTime']=_0x438271[a0_0x256f('0x29c')][a0_0x256f('0x3b6')](this['_startTime'],this['_duration'],new _0x438271['JulianDate']()),this[a0_0x256f('0x15f')]();}return _0x6f111f()(_0x2f9876,[{'key':'_start','value':function(){this[a0_0x256f('0x454')][a0_0x256f('0x504')]['currentTime']=this['_startTime'][a0_0x256f('0x444')](),this[a0_0x256f('0x454')][a0_0x256f('0x2b0')][a0_0x256f('0x3f8')]['addEventListener'](this['_onPostUpdateHandler'],this);}},{'key':a0_0x256f('0x5c7'),'value':function(_0x592c35,_0x2ec641){var _0x3f9fb0=_0x438271[a0_0x256f('0x29c')][a0_0x256f('0x38c')](_0x2ec641,this[a0_0x256f('0x551')]),_0x299815=_0x438271['Math']['toRadians'](_0x3f9fb0*(0x168/this['_duration']))+this['_heading'];_0x592c35[a0_0x256f('0x3ee')][a0_0x256f('0x541')]({'destination':_0x570b2f['a']['transformWGS84ToCartesian'](this[a0_0x256f('0x666')]),'orientation':{'heading':_0x299815,'pitch':_0x438271[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](this['_options']['pitch']||0x0)}}),this['_options']['distance']&&_0x592c35[a0_0x256f('0x3ee')][a0_0x256f('0x337')](this[a0_0x256f('0x1d3')]['distance']),_0x438271[a0_0x256f('0x29c')]['compare'](_0x2ec641,this[a0_0x256f('0x3bb')])>=0x0&&(this[a0_0x256f('0x454')][a0_0x256f('0x2b0')][a0_0x256f('0x3f8')][a0_0x256f('0xba')](this[a0_0x256f('0x5c7')],this),this[a0_0x256f('0x1d3')][a0_0x256f('0x16a')]&&this[a0_0x256f('0x1d3')][a0_0x256f('0x16a')][a0_0x256f('0x32b')](this[a0_0x256f('0x1d3')][a0_0x256f('0x59')]||this));}}]),_0x2f9876;}(),_0x50777a=DC['Namespace'][a0_0x256f('0x224')],_0x3145d2=function(){function _0x53f34e(_0x5e78d1){var _0x400052=this,_0x4a5a67=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x5,_0x132932=arguments[a0_0x256f('0x658')]>0x2?arguments[0x2]:void 0x0,_0x396946=arguments[a0_0x256f('0x658')]>0x3?arguments[0x3]:void 0x0;_0x3c0ba4()(this,_0x53f34e),this[a0_0x256f('0x454')]=_0x5e78d1,this['_duration']=_0x4a5a67,this['_callback']=_0x132932,this['_startRotate']();var _0x3b2f2d=setTimeout(function(){_0x400052['_endRotate'](),_0x400052['_callback']&&_0x400052[a0_0x256f('0x651')][a0_0x256f('0x32b')](_0x396946||_0x400052),clearTimeout(_0x3b2f2d);},0x3e8*Number(this['_duration']));}return _0x6f111f()(_0x53f34e,[{'key':a0_0x256f('0x183'),'value':function(_0x2cdb2d,_0x5daa31){if(_0x2cdb2d['mode']!==_0x50777a[a0_0x256f('0xc5')][a0_0x256f('0x25')])return!0x1;var _0x1faae7=_0x50777a[a0_0x256f('0x12f')][a0_0x256f('0x7')](_0x5daa31);if(_0x50777a['defined'](_0x1faae7)){var _0x1335f6=this[a0_0x256f('0x454')][a0_0x256f('0x3ee')],_0x399aea=_0x50777a[a0_0x256f('0x534')][a0_0x256f('0x444')](_0x1335f6[a0_0x256f('0x13c')]),_0x59f889=_0x50777a[a0_0x256f('0x5db')][a0_0x256f('0x5c6')](_0x1faae7);_0x1335f6[a0_0x256f('0x4b')](_0x59f889,_0x399aea);}}},{'key':a0_0x256f('0x1e9'),'value':function(){this[a0_0x256f('0x454')]['camera'][a0_0x256f('0x4b')](_0x50777a[a0_0x256f('0x5db')][a0_0x256f('0x25b')]),this['_viewer']['clock'][a0_0x256f('0xef')]=0x2ee0,this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x3f8')]['addEventListener'](this[a0_0x256f('0x183')],this);}},{'key':a0_0x256f('0x19'),'value':function(){this[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x4b')](_0x50777a[a0_0x256f('0x5db')][a0_0x256f('0x25b')]),this['_viewer']['clock']['multiplier']=0x1,this['_viewer'][a0_0x256f('0x504')][a0_0x256f('0x2b9')]=_0x50777a[a0_0x256f('0x29c')]['now']()['clone'](),this[a0_0x256f('0x454')][a0_0x256f('0x2b0')][a0_0x256f('0x3f8')]['removeEventListener'](this[a0_0x256f('0x183')],this);}}]),_0x53f34e;}(),_0x2e3383=_0x16c2d0(0x14),_0x31295d=_0x16c2d0['n'](_0x2e3383),_0x17ec6f=_0x16c2d0(0xc);function _0x4736e0(_0x1a842e,_0x2a48bc){var _0xd33112=Object[a0_0x256f('0x536')](_0x1a842e);if(Object['getOwnPropertySymbols']){var _0x1f67d0=Object[a0_0x256f('0x23e')](_0x1a842e);_0x2a48bc&&(_0x1f67d0=_0x1f67d0[a0_0x256f('0x53e')](function(_0x584232){return Object[a0_0x256f('0x79')](_0x1a842e,_0x584232)[a0_0x256f('0x2ec')];})),_0xd33112[a0_0x256f('0x289')][a0_0x256f('0x40')](_0xd33112,_0x1f67d0);}return _0xd33112;}function _0x162acb(_0x3356d9){for(var _0x23771a=0x1;_0x23771a<arguments[a0_0x256f('0x658')];_0x23771a++){var _0x258272=null!=arguments[_0x23771a]?arguments[_0x23771a]:{};_0x23771a%0x2?_0x4736e0(Object(_0x258272),!0x0)[a0_0x256f('0x218')](function(_0x222275){_0x2baac3()(_0x3356d9,_0x222275,_0x258272[_0x222275]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x3356d9,Object['getOwnPropertyDescriptors'](_0x258272)):_0x4736e0(Object(_0x258272))[a0_0x256f('0x218')](function(_0x5072cc){Object[a0_0x256f('0x21f')](_0x3356d9,_0x5072cc,Object['getOwnPropertyDescriptor'](_0x258272,_0x5072cc));});}return _0x3356d9;}function _0x4596d3(_0x52bc4a){var _0x50c73b=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0xe3c77d){return!0x1;}}();return function(){var _0xdfb8d8,_0x43f8cf=_0x1f521f()(_0x52bc4a);if(_0x50c73b){var _0x40f639=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0xdfb8d8=Reflect[a0_0x256f('0x64c')](_0x43f8cf,arguments,_0x40f639);}else _0xdfb8d8=_0x43f8cf[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0xdfb8d8);};}var _0x4cbb71=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x2fd4ba={'size':0x30,'pixelRange':0x28,'minimumClusterSize':0x2,'gradient':{0.0001:_0x4cbb71[a0_0x256f('0x54e')]['BLUE'][a0_0x256f('0x2e4')](0.5),0.001:_0x4cbb71[a0_0x256f('0x54e')][a0_0x256f('0x20c')][a0_0x256f('0x2e4')](0.5),0.01:_0x4cbb71[a0_0x256f('0x54e')][a0_0x256f('0x188')][a0_0x256f('0x2e4')](0.5),0.1:_0x4cbb71[a0_0x256f('0x54e')][a0_0x256f('0x34a')]['withAlpha'](0.5)},'fontSize':0xe,'fontColor':_0x4cbb71[a0_0x256f('0x54e')][a0_0x256f('0x336')]},_0x15fa7b=function(_0x11b57e){_0x38fe39()(_0x10ad31,_0x11b57e);var _0x1dd653=_0x4596d3(_0x10ad31);function _0x10ad31(_0x17fc51){var _0x56659d,_0x4017bb=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};return _0x3c0ba4()(this,_0x10ad31),(_0x56659d=_0x1dd653[a0_0x256f('0x32b')](this,_0x17fc51))['_delegate']=new _0x4cbb71['CustomDataSource'](_0x17fc51),_0x56659d[a0_0x256f('0x1d3')]=_0x162acb(_0x162acb({},_0x2fd4ba),_0x4017bb),_0x56659d[a0_0x256f('0x10')][a0_0x256f('0x29b')][a0_0x256f('0x5b1')]=!0x0,_0x56659d[a0_0x256f('0x10')][a0_0x256f('0x29b')][a0_0x256f('0x250')][a0_0x256f('0x429')](_0x56659d[a0_0x256f('0x11f')],_0x31295d()(_0x56659d)),_0x56659d[a0_0x256f('0x500')]={},_0x56659d[a0_0x256f('0x10')][a0_0x256f('0x29b')][a0_0x256f('0x604')]=_0x56659d[a0_0x256f('0x1d3')][a0_0x256f('0x604')],_0x56659d[a0_0x256f('0x10')]['clustering'][a0_0x256f('0x4bc')]=_0x56659d[a0_0x256f('0x1d3')][a0_0x256f('0x4bc')],_0x56659d[a0_0x256f('0x195')]=_0x17ec6f['a'][a0_0x256f('0x402')](a0_0x256f('0x12a')),_0x56659d[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x56659d;}return _0x6f111f()(_0x10ad31,[{'key':a0_0x256f('0x526'),'value':function(_0x122969){var _0x4f70c6=_0x122969[a0_0x256f('0x323')](),_0x4948e9=this['_options'][a0_0x256f('0x208')];if(!this[a0_0x256f('0x500')][_0x4f70c6]){var _0x3921a9=document['createElement'](a0_0x256f('0x54f'));_0x3921a9[a0_0x256f('0x140')]=_0x4948e9,_0x3921a9[a0_0x256f('0x4fa')]=_0x4948e9;var _0x1b46d3=_0x3921a9[a0_0x256f('0x582')]('2d');_0x1b46d3['save'](),_0x1b46d3['scale'](_0x4948e9/0x18,_0x4948e9/0x18),_0x1b46d3[a0_0x256f('0x2c')]=_0x122969[a0_0x256f('0x2e4')](0.2)[a0_0x256f('0x323')](),_0x1b46d3[a0_0x256f('0x446')](),_0x1b46d3[a0_0x256f('0x443')](0xc,0xc,0xc,0x0,0x2*Math['PI']),_0x1b46d3[a0_0x256f('0x257')](),_0x1b46d3[a0_0x256f('0x601')](),_0x1b46d3[a0_0x256f('0x446')](),_0x1b46d3['arc'](0xc,0xc,0x9,0x0,0x2*Math['PI']),_0x1b46d3[a0_0x256f('0x2c')]=_0x122969['toCssColorString'](),_0x1b46d3[a0_0x256f('0x601')](),_0x1b46d3['closePath'](),_0x1b46d3['restore'](),this['_circleCache'][_0x4f70c6]=_0x3921a9[a0_0x256f('0x235')]();}return this[a0_0x256f('0x500')][_0x4f70c6];}},{'key':'_clusterEventHandler','value':function(_0x4125d0,_0x1ca4d8){if(!this[a0_0x256f('0x10')][a0_0x256f('0x29b')]['enabled'])return!0x1;if(_0x1ca4d8[a0_0x256f('0x13d')][a0_0x256f('0x3e9')]=!0x0,_0x1ca4d8[a0_0x256f('0x3a4')][a0_0x256f('0x198')]=a0_0x256f('0xd9')['concat'](this['_options']['fontSize'],a0_0x256f('0x4ac')),_0x1ca4d8[a0_0x256f('0x3a4')][a0_0x256f('0x44e')]=this[a0_0x256f('0x1d3')][a0_0x256f('0x1e')],_0x1ca4d8['label'][a0_0x256f('0x3ba')]=Number[a0_0x256f('0x106')],this[a0_0x256f('0x10')][a0_0x256f('0x365')][a0_0x256f('0x5b')][a0_0x256f('0x658')]){var _0x29d743=this['_delegate'][a0_0x256f('0x365')]['values'][a0_0x256f('0x658')]||0x0;for(var _0x47e0d5 in this['_options'][a0_0x256f('0x640')])if(_0x4125d0[a0_0x256f('0x658')]>=_0x29d743*_0x47e0d5){_0x1ca4d8['billboard'][a0_0x256f('0x392')]=this[a0_0x256f('0x526')](this[a0_0x256f('0x1d3')][a0_0x256f('0x640')][_0x47e0d5]),_0x1ca4d8[a0_0x256f('0x13d')][a0_0x256f('0x3ba')]=Number[a0_0x256f('0x106')],_0x1ca4d8['label'][a0_0x256f('0x3e9')]=!0x0;var _0x1e92b3=String(_0x4125d0[a0_0x256f('0x658')]+',')[a0_0x256f('0x658')];_0x1ca4d8[a0_0x256f('0x3a4')][a0_0x256f('0x4e0')]=new _0x4cbb71[(a0_0x256f('0x326'))](-this[a0_0x256f('0x1d3')][a0_0x256f('0x208')]/this[a0_0x256f('0x1d3')][a0_0x256f('0x618')]*(_0x1e92b3-0x1),0x6);}else _0x4125d0[a0_0x256f('0x658')]<=0x1&&(_0x1ca4d8[a0_0x256f('0x3a4')][a0_0x256f('0x3e9')]=!0x1);}}},{'key':'clear','value':function(){return this[a0_0x256f('0x10')]['entities']['removeAll'](),this[a0_0x256f('0xdb')]={},this['_state']=_0x34508c['a'][a0_0x256f('0x40a')],this;}},{'key':a0_0x256f('0x4f1'),'set':function(_0x4a23eb){return this[a0_0x256f('0x10')][a0_0x256f('0x29b')][a0_0x256f('0x5b1')]=_0x4a23eb,this;}}]),_0x10ad31;}(_0x17ec6f['a']);_0x17ec6f['a'][a0_0x256f('0x49d')](a0_0x256f('0x12a'));var _0x2e38db=_0x15fa7b;function _0x47d807(_0x17c5d7){var _0x160732=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x1ea35f){return!0x1;}}();return function(){var _0x344664,_0x436399=_0x1f521f()(_0x17c5d7);if(_0x160732){var _0xe155a7=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x344664=Reflect['construct'](_0x436399,arguments,_0xe155a7);}else _0x344664=_0x436399[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x344664);};}var _0x5f5ae0=DC[a0_0x256f('0x3bd')]['Cesium'],_0x15f245=function(_0x4d80df){_0x38fe39()(_0x1dc75d,_0x4d80df);var _0x2676d1=_0x47d807(_0x1dc75d);function _0x1dc75d(_0x37784a){var _0xf1de3e,_0x4d14bd=arguments[a0_0x256f('0x658')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:'',_0x20ee27=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};return _0x3c0ba4()(this,_0x1dc75d),(_0xf1de3e=_0x2676d1['call'](this,_0x37784a))[a0_0x256f('0x10')]=_0x5f5ae0[a0_0x256f('0x60d')][a0_0x256f('0x27a')](_0x4d14bd,_0x20ee27),_0xf1de3e[a0_0x256f('0x195')]=_0x17ec6f['a']['getLayerType']('czml'),_0xf1de3e[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0xf1de3e;}return _0x6f111f()(_0x1dc75d,[{'key':a0_0x256f('0x63e'),'value':function(_0x4c63ce,_0x5c67b1){if(this['_delegate'])return this[a0_0x256f('0x10')][a0_0x256f('0x2a8')](function(_0x829078){_0x829078[a0_0x256f('0x365')][a0_0x256f('0x5b')]['forEach'](function(_0x585657){_0x4c63ce['call'](_0x5c67b1,_0x585657);});}),this;}},{'key':'show','set':function(_0x265521){var _0x44ba85=this;this[a0_0x256f('0x5ed')]=_0x265521,this[a0_0x256f('0x10')]&&this[a0_0x256f('0x10')]['then'](function(_0x15ca9b){_0x15ca9b[a0_0x256f('0x3e9')]=_0x44ba85[a0_0x256f('0x5ed')];});},'get':function(){return this[a0_0x256f('0x5ed')];}}]),_0x1dc75d;}(_0x17ec6f['a']);_0x17ec6f['a'][a0_0x256f('0x49d')](a0_0x256f('0x6f'));var _0x5e6e3b=_0x15f245,_0x171384=_0x16c2d0(0xd),_0x3cf0d5=_0x16c2d0(0xa);function _0x12e3fa(_0x5b84cd,_0xfe0907){var _0x3cac1c=Object[a0_0x256f('0x536')](_0x5b84cd);if(Object[a0_0x256f('0x23e')]){var _0x8c5cad=Object[a0_0x256f('0x23e')](_0x5b84cd);_0xfe0907&&(_0x8c5cad=_0x8c5cad['filter'](function(_0x48ca3e){return Object[a0_0x256f('0x79')](_0x5b84cd,_0x48ca3e)[a0_0x256f('0x2ec')];})),_0x3cac1c[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x3cac1c,_0x8c5cad);}return _0x3cac1c;}function _0x2631f3(_0x5a9c32){for(var _0x2cde5f=0x1;_0x2cde5f<arguments[a0_0x256f('0x658')];_0x2cde5f++){var _0x1f3c5f=null!=arguments[_0x2cde5f]?arguments[_0x2cde5f]:{};_0x2cde5f%0x2?_0x12e3fa(Object(_0x1f3c5f),!0x0)[a0_0x256f('0x218')](function(_0x86a95d){_0x2baac3()(_0x5a9c32,_0x86a95d,_0x1f3c5f[_0x86a95d]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x5a9c32,Object[a0_0x256f('0x498')](_0x1f3c5f)):_0x12e3fa(Object(_0x1f3c5f))[a0_0x256f('0x218')](function(_0x366e7c){Object[a0_0x256f('0x21f')](_0x5a9c32,_0x366e7c,Object[a0_0x256f('0x79')](_0x1f3c5f,_0x366e7c));});}return _0x5a9c32;}function _0x24a7c4(_0x8b0f83){var _0x12411e=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct'][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x223257){return!0x1;}}();return function(){var _0x506a7b,_0x4ee47c=_0x1f521f()(_0x8b0f83);if(_0x12411e){var _0x5eaea1=_0x1f521f()(this)['constructor'];_0x506a7b=Reflect[a0_0x256f('0x64c')](_0x4ee47c,arguments,_0x5eaea1);}else _0x506a7b=_0x4ee47c[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x506a7b);};}var _0x5577e5=DC[a0_0x256f('0x3bd')]['Cesium'],_0x568a65=_0x16c2d0(0x3f),_0x3fc1ea={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'maxCanvasSize':0x7d0,'minCanvasSize':0x2bc,'radius':0x19,'gradient':{0.4:a0_0x256f('0x17d'),0.6:a0_0x256f('0x5e'),0.8:a0_0x256f('0x615'),0.9:a0_0x256f('0x60a')}},_0x2f1d0c=function(_0x273209){_0x38fe39()(_0x3f8919,_0x273209);var _0x4c090a=_0x24a7c4(_0x3f8919);function _0x3f8919(_0xfa6f1d,_0x88f48e){var _0xd74ea2;return _0x3c0ba4()(this,_0x3f8919),(_0xd74ea2=_0x4c090a[a0_0x256f('0x32b')](this,_0xfa6f1d))['_options']=_0x2631f3(_0x2631f3({},_0x3fc1ea),_0x88f48e),_0xd74ea2[a0_0x256f('0x251')]=void 0x0,_0xd74ea2[a0_0x256f('0x4da')]=void 0x0,_0xd74ea2[a0_0x256f('0x586')]=void 0x0,_0xd74ea2[a0_0x256f('0x109')]=0x1,_0xd74ea2[a0_0x256f('0x5d3')]=[],_0xd74ea2[a0_0x256f('0x1d3')]['spacing']=1.5*_0xd74ea2['_options'][a0_0x256f('0x223')],_0xd74ea2[a0_0x256f('0x10')]=new _0x5577e5[(a0_0x256f('0x54c'))](_0xfa6f1d),_0xd74ea2['_entity']=new _0x5577e5[(a0_0x256f('0x39d'))](),_0xd74ea2['type']=_0x17ec6f['a']['getLayerType'](a0_0x256f('0x119')),_0xd74ea2['_state']=_0x34508c['a'][a0_0x256f('0x206')],_0xd74ea2;}return _0x6f111f()(_0x3f8919,[{'key':a0_0x256f('0x5bc'),'value':function(){this['_reDraw'](),this[a0_0x256f('0x454')]['on'](_0x3cf0d5['f']['CAMERA_MOVE_END'],this[a0_0x256f('0x38b')],this);}},{'key':a0_0x256f('0x611'),'value':function(){this[a0_0x256f('0x454')][a0_0x256f('0x2e2')](_0x3cf0d5['f'][a0_0x256f('0x2cd')],this['_reset'],this);}},{'key':'_initContainer','value':function(){}},{'key':a0_0x256f('0x180'),'value':function(_0x5711c9){_0x5711c9=_0x570b2f['a'][a0_0x256f('0x10e')](_0x5711c9);var _0x4bfaf8={};return _0x4bfaf8['x']=Math[a0_0x256f('0x329')]((_0x5711c9[a0_0x256f('0x16e')]-this['_mBounds'][a0_0x256f('0x492')])/this[a0_0x256f('0x109')]+this[a0_0x256f('0x1d3')][a0_0x256f('0x2d4')]),_0x4bfaf8['y']=Math['round']((_0x5711c9[a0_0x256f('0x44a')]-this['_mBounds'][a0_0x256f('0x55d')])/this[a0_0x256f('0x109')]+this['_options']['spacing']),_0x4bfaf8['y']=this[a0_0x256f('0x251')][a0_0x256f('0x2f2')][a0_0x256f('0x54f')][a0_0x256f('0x4fa')]-_0x4bfaf8['y'],_0x4bfaf8;}},{'key':'_getMBounds','value':function(){var _0x210eab=_0x570b2f['a'][a0_0x256f('0x10e')](new _0x171384['a'](this[a0_0x256f('0x4da')]['west'],this['_bounds']['south'])),_0x56e0b9=_0x570b2f['a'][a0_0x256f('0x10e')](new _0x171384['a'](this[a0_0x256f('0x4da')][a0_0x256f('0x475')],this['_bounds']['north']));return{'west':_0x210eab[a0_0x256f('0x16e')],'south':_0x210eab['lat'],'east':_0x56e0b9['lng'],'north':_0x56e0b9[a0_0x256f('0x44a')]};}},{'key':'_initCanvas','value':function(){var _0x2075f2=Math[a0_0x256f('0x15b')](this['_mBounds'][a0_0x256f('0x475')]-this[a0_0x256f('0x586')][a0_0x256f('0x492')]),_0x1b565d=Math[a0_0x256f('0x15b')](this[a0_0x256f('0x586')][a0_0x256f('0x230')]-this['_mBounds'][a0_0x256f('0x55d')]),_0xfdd903=Math[a0_0x256f('0x221')](_0x2075f2,_0x1b565d),_0x4cb481=Math[a0_0x256f('0x511')](_0x2075f2,_0x1b565d),_0x376c31=0x1;_0xfdd903>this['_options'][a0_0x256f('0x629')]?_0x4cb481/(_0x376c31=_0xfdd903/this[a0_0x256f('0x1d3')][a0_0x256f('0x629')])<this[a0_0x256f('0x1d3')]['minCanvasSize']&&(_0x376c31=_0x4cb481/this[a0_0x256f('0x1d3')][a0_0x256f('0x16c')]):_0x4cb481<this['_options']['minCanvasSize']&&_0xfdd903/(_0x376c31=_0x4cb481/this['_options']['minCanvasSize'])>this[a0_0x256f('0x1d3')][a0_0x256f('0x629')]&&(_0x376c31=_0xfdd903/this['_options'][a0_0x256f('0x629')]),this[a0_0x256f('0x109')]=_0x376c31,this[a0_0x256f('0x1d3')][a0_0x256f('0x4f')]||(this[a0_0x256f('0x1d3')]['container']=_0x5d2d0b['a'][a0_0x256f('0x6b')](a0_0x256f('0x64f'),'heat-map',document['getElementsByClassName']('dc-container')[0x0])),this['_options'][a0_0x256f('0x4f')][a0_0x256f('0x19b')]['cssText']=a0_0x256f('0x31b')['concat'](_0x2075f2/this[a0_0x256f('0x109')],a0_0x256f('0x5c'))[a0_0x256f('0x318')](_0x1b565d/this[a0_0x256f('0x109')],a0_0x256f('0x30d')),this['_heat']?this[a0_0x256f('0x251')][a0_0x256f('0x3e5')](this[a0_0x256f('0x1d3')]):this[a0_0x256f('0x251')]=_0x568a65[a0_0x256f('0x6b')](this[a0_0x256f('0x1d3')]);}},{'key':a0_0x256f('0x3c5'),'value':function(){var _0x5b3180=this['_options']['spacing']*this[a0_0x256f('0x109')];this[a0_0x256f('0x586')][a0_0x256f('0x492')]-=_0x5b3180,this[a0_0x256f('0x586')]['south']-=_0x5b3180,this[a0_0x256f('0x586')][a0_0x256f('0x475')]+=_0x5b3180,this['_mBounds'][a0_0x256f('0x230')]+=_0x5b3180;var _0x1aa947=_0x570b2f['a']['transformMercatorToWGS84']({'lng':this[a0_0x256f('0x586')][a0_0x256f('0x492')],'lat':this[a0_0x256f('0x586')][a0_0x256f('0x55d')]}),_0x5341c0=_0x570b2f['a']['transformMercatorToWGS84']({'lng':this[a0_0x256f('0x586')][a0_0x256f('0x475')],'lat':this[a0_0x256f('0x586')][a0_0x256f('0x230')]}),_0x26a580=_0x5577e5[a0_0x256f('0x51')][a0_0x256f('0x641')](_0x1aa947['lng'],_0x1aa947[a0_0x256f('0x44a')],_0x5341c0[a0_0x256f('0x16e')],_0x5341c0['lat']);this[a0_0x256f('0x578')][a0_0x256f('0x3e9')]=!0x1,this['_entity'][a0_0x256f('0x15a')]={'coordinates':_0x26a580,'fill':!0x1,'distanceDisplayCondition':this[a0_0x256f('0x1d3')][a0_0x256f('0x655')]},this[a0_0x256f('0x10')][a0_0x256f('0x365')]['add'](this[a0_0x256f('0x578')]);}},{'key':a0_0x256f('0x38b'),'value':function(){var _0x25d680=0x2710/Math['floor'](this[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x382')]['height'])*0x3c;_0x25d680<0xa&&(_0x25d680=0xa),_0x25d680>0x3c&&(_0x25d680=0x3c),this['_options']['radius']=_0x25d680,this[a0_0x256f('0x1d3')][a0_0x256f('0x2d4')]=1.5*this[a0_0x256f('0x1d3')][a0_0x256f('0x223')],this[a0_0x256f('0x251')]&&this['_heat'][a0_0x256f('0x3e5')](this[a0_0x256f('0x1d3')]);}},{'key':a0_0x256f('0x44b'),'value':function(){var _0x17ab76=this;if(!this[a0_0x256f('0x4da')])return!0x1;var _0x24ef7d=this['_getMBounds']();this['_mBounds']&&_0x24ef7d[a0_0x256f('0x492')]===this[a0_0x256f('0x586')]['west']&&_0x24ef7d[a0_0x256f('0x55d')]===this['_mBounds'][a0_0x256f('0x55d')]&&_0x24ef7d[a0_0x256f('0x475')]===this['_mBounds'][a0_0x256f('0x475')]&&_0x24ef7d['north']===this[a0_0x256f('0x586')][a0_0x256f('0x230')]||(this[a0_0x256f('0x586')]=_0x24ef7d,this['_initCanvas']());var _0x465d75=[];this[a0_0x256f('0x5d3')][a0_0x256f('0x218')](function(_0x310606){var _0x404054=_0x17ab76[a0_0x256f('0x180')]({'lng':_0x310606[a0_0x256f('0x16e')]||_0x310606['x'],'lat':_0x310606[a0_0x256f('0x44a')]||_0x310606['y']});_0x465d75[a0_0x256f('0x289')]({'x':_0x404054['x'],'y':_0x404054['y'],'value':_0x310606[a0_0x256f('0x48a')]||0x1});}),this[a0_0x256f('0x251')]['setData']({'min':0x0,'max':0x1,'data':_0x465d75}),this[a0_0x256f('0x10')][a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x578')]),this[a0_0x256f('0x3c5')]();var _0x51aeec=new _0x5577e5[(a0_0x256f('0x386'))]({'image':this[a0_0x256f('0x251')][a0_0x256f('0x2f2')][a0_0x256f('0x54f')],'transparent':!0x0});_0x5d2d0b['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x578')][a0_0x256f('0x15a')],{'fill':!0x0,'material':_0x51aeec}),this[a0_0x256f('0x578')][a0_0x256f('0x3e9')]=!0x0;}},{'key':a0_0x256f('0xe6'),'value':function(_0x20179b){return _0x20179b&&Array[a0_0x256f('0x4e3')](_0x20179b)?(this[a0_0x256f('0x5d3')]=_0x20179b,this[a0_0x256f('0x4da')]=_0x5577e5[a0_0x256f('0x4bb')][a0_0x256f('0x17f')](this['_positions']),this[a0_0x256f('0x44b')](),this):this;}},{'key':'addPosition','value':function(_0x22a528){return this[a0_0x256f('0x5d3')]['push'](_0x22a528),this[a0_0x256f('0x4da')]=_0x5577e5[a0_0x256f('0x4bb')][a0_0x256f('0x17f')](this[a0_0x256f('0x5d3')]),this[a0_0x256f('0x44b')](),this;}},{'key':'setOptions','value':function(_0x5423f0){return _0x5d2d0b['c'][a0_0x256f('0x3f4')](this[a0_0x256f('0x1d3')],_0x5423f0),this[a0_0x256f('0x251')]&&(this['_options'][a0_0x256f('0x2d4')]=1.5*this[a0_0x256f('0x1d3')][a0_0x256f('0x223')],this[a0_0x256f('0x251')][a0_0x256f('0x3e5')](this['_options'])),this;}},{'key':a0_0x256f('0x2eb'),'get':function(){return this[a0_0x256f('0x1d3')];}}]),_0x3f8919;}(_0x17ec6f['a']);_0x17ec6f['a'][a0_0x256f('0x49d')](a0_0x256f('0x119'));var _0x55defc=_0x2f1d0c;function _0x15c98b(_0x186a76){var _0x12edb1=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0xf8710b){return!0x1;}}();return function(){var _0x27cd2c,_0x143a3f=_0x1f521f()(_0x186a76);if(_0x12edb1){var _0x176d9d=_0x1f521f()(this)['constructor'];_0x27cd2c=Reflect[a0_0x256f('0x64c')](_0x143a3f,arguments,_0x176d9d);}else _0x27cd2c=_0x143a3f['apply'](this,arguments);return _0x31d024()(this,_0x27cd2c);};}var _0x25446d=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x431a30=function(_0x485209){_0x38fe39()(_0x24a29a,_0x485209);var _0x508c9f=_0x15c98b(_0x24a29a);function _0x24a29a(_0x176f22,_0x1f4871){var _0x31998e,_0x389942=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};if(_0x3c0ba4()(this,_0x24a29a),!_0x1f4871)throw new Error(a0_0x256f('0x27c'));return(_0x31998e=_0x508c9f[a0_0x256f('0x32b')](this,_0x176f22))[a0_0x256f('0x10')]=_0x25446d[a0_0x256f('0x18')][a0_0x256f('0x27a')](_0x1f4871,_0x389942),_0x31998e[a0_0x256f('0x195')]=_0x17ec6f['a'][a0_0x256f('0x402')](a0_0x256f('0x11')),_0x31998e['_state']=_0x34508c['a'][a0_0x256f('0x206')],_0x31998e;}return _0x6f111f()(_0x24a29a,[{'key':'eachOverlay','value':function(_0x87d59c,_0x5aa960){if(this['_delegate'])return this[a0_0x256f('0x10')][a0_0x256f('0x2a8')](function(_0xe636c9){_0xe636c9['entities'][a0_0x256f('0x5b')]['forEach'](function(_0x5d1bc8){_0x87d59c[a0_0x256f('0x32b')](_0x5aa960,_0x5d1bc8);});}),this;}},{'key':a0_0x256f('0x3e9'),'set':function(_0x1f2c44){var _0x4874d2=this;this[a0_0x256f('0x5ed')]=_0x1f2c44,this['_delegate']&&this[a0_0x256f('0x10')][a0_0x256f('0x2a8')](function(_0x4facc2){_0x4facc2[a0_0x256f('0x3e9')]=_0x4874d2[a0_0x256f('0x5ed')];});},'get':function(){return this[a0_0x256f('0x5ed')];}}]),_0x24a29a;}(_0x17ec6f['a']);_0x17ec6f['a']['registerType']('kml');var _0x16f5a1=_0x431a30,_0x3dbfa3=_0x16c2d0(0x13),_0xb0ce00={'ADD':a0_0x256f('0x53d'),'REMOVE':'remove'},_0x5b388d=_0x16c2d0(0x10);function _0x5c889a(_0x45ce3e){var _0x2adf75=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x148283){return!0x1;}}();return function(){var _0x1c30d0,_0x25a0fa=_0x1f521f()(_0x45ce3e);if(_0x2adf75){var _0x1297fa=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x1c30d0=Reflect['construct'](_0x25a0fa,arguments,_0x1297fa);}else _0x1c30d0=_0x25a0fa['apply'](this,arguments);return _0x31d024()(this,_0x1c30d0);};}var _0x4e00ce=DC[a0_0x256f('0x3bd')]['Cesium'],_0xbafe86=function(_0xd63804){_0x38fe39()(_0x2093e0,_0xd63804);var _0x4a556f=_0x5c889a(_0x2093e0);function _0x2093e0(){return _0x3c0ba4()(this,_0x2093e0),_0x4a556f[a0_0x256f('0x32b')](this);}return _0x6f111f()(_0x2093e0,[{'key':a0_0x256f('0x4aa'),'value':function(){var _0xbb6742=this;Object[a0_0x256f('0x536')](_0xb0ce00)[a0_0x256f('0x218')](function(_0x84fb57){var _0x28ebc5=_0xb0ce00[_0x84fb57];_0xbb6742[a0_0x256f('0xdb')][_0x28ebc5]=new _0x4e00ce[(a0_0x256f('0x4c9'))]();});}}]),_0x2093e0;}(_0x5b388d['a']),_0x4f5192={},_0x59ee7b=function(){function _0x1fd9f9(_0x398ff3){_0x3c0ba4()(this,_0x1fd9f9),this[a0_0x256f('0x616')]=_0x398ff3||_0x5d2d0b['c'][a0_0x256f('0x37e')](),this[a0_0x256f('0x454')]=void 0x0,this[a0_0x256f('0x10')]=void 0x0,this[a0_0x256f('0x2fa')]=void 0x0,this['_addable']=!0x1,this[a0_0x256f('0x4be')]=new _0xbafe86(),this[a0_0x256f('0x195')]=void 0x0,this['on'](_0xb0ce00['ADD'],this[a0_0x256f('0x21c')],this),this['on'](_0xb0ce00[a0_0x256f('0x5a7')],this['_onRemove'],this);}return _0x6f111f()(_0x1fd9f9,[{'key':a0_0x256f('0x60c'),'value':function(){}},{'key':a0_0x256f('0x5bc'),'value':function(){}},{'key':a0_0x256f('0x611'),'value':function(){}},{'key':a0_0x256f('0x21c'),'value':function(_0x1adaf9){this['_viewer']=_0x1adaf9,this[a0_0x256f('0x60c')]&&this[a0_0x256f('0x60c')](),this[a0_0x256f('0x10')]&&this[a0_0x256f('0x60e')]&&(this[a0_0x256f('0x454')]['delegate'][a0_0x256f('0x2b0')][a0_0x256f('0x5e5')][a0_0x256f('0x53d')](this[a0_0x256f('0x10')]),this[a0_0x256f('0x5bc')]&&this[a0_0x256f('0x5bc')]()),this[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x135')];}},{'key':a0_0x256f('0x1e1'),'value':function(){this[a0_0x256f('0x454')]&&this[a0_0x256f('0x10')]&&this[a0_0x256f('0x60e')]&&(this['_viewer']['scene']['postProcessStages'][a0_0x256f('0x3ec')](this[a0_0x256f('0x10')]),this[a0_0x256f('0x10')]=void 0x0),this[a0_0x256f('0x611')]&&this['_removedHook'](),this[a0_0x256f('0x2fa')]=_0x34508c['a']['REMOVED'];}},{'key':a0_0x256f('0x102'),'value':function(_0x28df54){return _0x28df54&&_0x28df54[a0_0x256f('0x5cd')]&&_0x28df54[a0_0x256f('0x5cd')](this),this;}},{'key':'on','value':function(_0x2412c2,_0x4e6acb,_0xf71f8f){return this[a0_0x256f('0x4be')]['on'](_0x2412c2,_0x4e6acb,_0xf71f8f||this),this;}},{'key':'off','value':function(_0x1ed7cf,_0x20beea,_0x4eef94){return this[a0_0x256f('0x4be')][a0_0x256f('0x2e2')](_0x1ed7cf,_0x20beea,_0x4eef94||this),this;}},{'key':a0_0x256f('0xff'),'value':function(_0x15d949,_0x199a20){return this['_effectEvent'][a0_0x256f('0xff')](_0x15d949,_0x199a20),this;}},{'key':'id','get':function(){return this[a0_0x256f('0x616')];}},{'key':a0_0x256f('0x164'),'get':function(){return this[a0_0x256f('0x4be')];}}],[{'key':'registerType','value':function(_0x1c0025){_0x1c0025&&(_0x4f5192[_0x1c0025['toLocaleUpperCase']()]=_0x1c0025[a0_0x256f('0x3e2')]());}},{'key':a0_0x256f('0x1c3'),'value':function(_0x24835b){return _0x4f5192[_0x24835b[a0_0x256f('0x319')]()]||void 0x0;}}]),_0x1fd9f9;}();function _0xd2afb(_0x135215){var _0x36d81a=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x51f9f3){return!0x1;}}();return function(){var _0x39c61c,_0x50c672=_0x1f521f()(_0x135215);if(_0x36d81a){var _0x491a44=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x39c61c=Reflect[a0_0x256f('0x64c')](_0x50c672,arguments,_0x491a44);}else _0x39c61c=_0x50c672['apply'](this,arguments);return _0x31d024()(this,_0x39c61c);};}var _0x529214=DC['Namespace'][a0_0x256f('0x224')],_0x1e8d65=function(_0x15e3c2){_0x38fe39()(_0x414bd3,_0x15e3c2);var _0x4e45dd=_0xd2afb(_0x414bd3);function _0x414bd3(_0x43378b,_0x5b59fd){var _0xcbe212;return _0x3c0ba4()(this,_0x414bd3),(_0xcbe212=_0x4e45dd[a0_0x256f('0x32b')](this,_0x43378b))['_brightness']=_0x5b59fd||0x2,_0xcbe212[a0_0x256f('0x60e')]=!0x0,_0xcbe212['type']=_0x59ee7b[a0_0x256f('0x1c3')](a0_0x256f('0x15')),_0xcbe212[a0_0x256f('0x2fa')]=_0x34508c['a']['INITIALIZED'],_0xcbe212;}return _0x6f111f()(_0x414bd3,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x10')]=_0x529214[a0_0x256f('0xe0')][a0_0x256f('0x132')](),this[a0_0x256f('0x10')]['uniforms'][a0_0x256f('0x15')]=this['_brightness'];}},{'key':a0_0x256f('0x5bc'),'value':function(){this['_delegate'][a0_0x256f('0x5b1')]=!0x0;}},{'key':'brightness','set':function(_0x4ebe51){this[a0_0x256f('0x325')]=_0x4ebe51,this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')][a0_0x256f('0x2e5')]['brightness']=this[a0_0x256f('0x325')]);}}]),_0x414bd3;}(_0x59ee7b);_0x59ee7b[a0_0x256f('0x49d')](a0_0x256f('0x15'));var _0x29805e=_0x1e8d65;function _0x347a18(_0x47b1e6){var _0x2fec7a=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x136144){return!0x1;}}();return function(){var _0xa38212,_0x57a59c=_0x1f521f()(_0x47b1e6);if(_0x2fec7a){var _0xa497e3=_0x1f521f()(this)['constructor'];_0xa38212=Reflect[a0_0x256f('0x64c')](_0x57a59c,arguments,_0xa497e3);}else _0xa38212=_0x57a59c['apply'](this,arguments);return _0x31d024()(this,_0xa38212);};}var _0x52e5bd=function(_0x11a2d2){_0x38fe39()(_0xf0d5aa,_0x11a2d2);var _0x414e19=_0x347a18(_0xf0d5aa);function _0xf0d5aa(_0x1b8bfc){var _0x5675cb;return _0x3c0ba4()(this,_0xf0d5aa),(_0x5675cb=_0x414e19[a0_0x256f('0x32b')](this,_0x1b8bfc))[a0_0x256f('0x4dc')]=0x80,_0x5675cb[a0_0x256f('0x325')]=-0.3,_0x5675cb['_glowOnly']=!0x1,_0x5675cb[a0_0x256f('0x80')]=0x1,_0x5675cb[a0_0x256f('0x310')]=0x2,_0x5675cb[a0_0x256f('0x52a')]=0x1,_0x5675cb[a0_0x256f('0x195')]=_0x59ee7b[a0_0x256f('0x1c3')](a0_0x256f('0x494')),_0x5675cb['_state']=_0x34508c['a'][a0_0x256f('0x206')],_0x5675cb;}return _0x6f111f()(_0xf0d5aa,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x10')]=this['_viewer'][a0_0x256f('0x2b0')][a0_0x256f('0x5e5')][a0_0x256f('0x494')],this[a0_0x256f('0x249')]=this[a0_0x256f('0x4dc')],this[a0_0x256f('0x15')]=this['_brightness'],this[a0_0x256f('0x335')]=this['_glowOnly'],this[a0_0x256f('0x4d0')]=this[a0_0x256f('0x80')],this[a0_0x256f('0x5d1')]=this['_sigma'],this[a0_0x256f('0x462')]=this['_stepSize'];}},{'key':a0_0x256f('0x5bc'),'value':function(){this[a0_0x256f('0x10')]['enabled']=!0x0;}},{'key':a0_0x256f('0x611'),'value':function(){this['_delegate']&&(this['_delegate'][a0_0x256f('0x5b1')]=!0x1,this[a0_0x256f('0x64a')]=void 0x0);}},{'key':a0_0x256f('0x249'),'set':function(_0x35eb3b){this['_contrast']=_0x35eb3b,this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')]['uniforms'][a0_0x256f('0x249')]=this['_contrast']);}},{'key':'brightness','set':function(_0x36f145){this[a0_0x256f('0x325')]=_0x36f145,this[a0_0x256f('0x10')]&&(this['_delegate'][a0_0x256f('0x2e5')][a0_0x256f('0x15')]=this['_brightness']);}},{'key':'glowOnly','set':function(_0x3d9871){this[a0_0x256f('0xa4')]=_0x3d9871,this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')][a0_0x256f('0x2e5')][a0_0x256f('0x335')]=this[a0_0x256f('0xa4')]);}},{'key':a0_0x256f('0x4d0'),'set':function(_0x573868){this[a0_0x256f('0x80')]=_0x573868,this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')]['uniforms'][a0_0x256f('0x4d0')]=this[a0_0x256f('0x80')]);}},{'key':a0_0x256f('0x5d1'),'set':function(_0xb9e427){this[a0_0x256f('0x310')]=_0xb9e427,this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')]['uniforms'][a0_0x256f('0x5d1')]=this[a0_0x256f('0x310')]);}},{'key':'stepSize','set':function(_0x2f1a7b){this[a0_0x256f('0x52a')]=_0x2f1a7b,this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')][a0_0x256f('0x2e5')][a0_0x256f('0x462')]=this[a0_0x256f('0x52a')]);}}]),_0xf0d5aa;}(_0x59ee7b);_0x59ee7b['registerType'](a0_0x256f('0x494'));var _0x34c5ae=_0x52e5bd;function _0x73dc4a(_0x19396d){var _0x5adcea=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x168e77){return!0x1;}}();return function(){var _0x2b686b,_0x37b646=_0x1f521f()(_0x19396d);if(_0x5adcea){var _0x1c7869=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x2b686b=Reflect[a0_0x256f('0x64c')](_0x37b646,arguments,_0x1c7869);}else _0x2b686b=_0x37b646[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x2b686b);};}var _0x469430=DC[a0_0x256f('0x3bd')]['Cesium'],_0x298c83=_0x16c2d0(0x54),_0x4e138d=function(_0x2f9d83){_0x38fe39()(_0x4eb2f3,_0x2f9d83);var _0x285a6c=_0x73dc4a(_0x4eb2f3);function _0x4eb2f3(_0xda0984,_0x31664f,_0x158b53,_0xee1548,_0x317723){var _0x4a330d;return _0x3c0ba4()(this,_0x4eb2f3),(_0x4a330d=_0x285a6c[a0_0x256f('0x32b')](this,_0xda0984))[a0_0x256f('0x666')]=_0x2a7036['a'][a0_0x256f('0x10c')](_0x31664f),_0x4a330d['_radius']=_0x158b53||0x0,_0x4a330d['_color']=_0x469430[a0_0x256f('0x9f')](_0xee1548,_0x469430[a0_0x256f('0x54e')][a0_0x256f('0x34a')]),_0x4a330d['_duration']=0x3e8*_0x469430[a0_0x256f('0x9f')](_0x317723,0x1),_0x4a330d[a0_0x256f('0x60e')]=!0x0,_0x4a330d['type']=_0x59ee7b['getEffectType'](a0_0x256f('0x1c7')),_0x4a330d[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x4a330d;}return _0x6f111f()(_0x4eb2f3,[{'key':a0_0x256f('0x60c'),'value':function(){var _0x3f1077=this,_0x38bb14=_0x570b2f['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),_0x4be5d0=new _0x469430[(a0_0x256f('0x327'))](_0x38bb14['x'],_0x38bb14['y'],_0x38bb14['z'],0x1),_0xeca298=_0x570b2f['a'][a0_0x256f('0x72')](new _0x171384['a'](this[a0_0x256f('0x666')][a0_0x256f('0x16e')],this[a0_0x256f('0x666')][a0_0x256f('0x44a')],this[a0_0x256f('0x666')][a0_0x256f('0x41d')]+0x1f4)),_0x33a888=new _0x469430[(a0_0x256f('0x327'))](_0xeca298['x'],_0xeca298['y'],_0xeca298['z'],0x1),_0x12c31d=new Date()[a0_0x256f('0x5dc')]();this[a0_0x256f('0x10')]=new _0x469430['PostProcessStage']({'name':this[a0_0x256f('0x616')],'fragmentShader':_0x298c83,'uniforms':{'u_scanCenterEC':function(){return _0x469430[a0_0x256f('0x5db')][a0_0x256f('0x53a')](_0x3f1077[a0_0x256f('0x454')][a0_0x256f('0x64a')][a0_0x256f('0x3ee')][a0_0x256f('0x398')],_0x4be5d0,new _0x469430['Cartesian4']());},'u_scanPlaneNormalEC':function(){var _0x1fef7c=_0x469430['Matrix4'][a0_0x256f('0x53a')](_0x3f1077[a0_0x256f('0x454')]['delegate'][a0_0x256f('0x3ee')][a0_0x256f('0x398')],_0x4be5d0,new _0x469430['Cartesian4']()),_0xd08464=_0x469430[a0_0x256f('0x5db')]['multiplyByVector'](_0x3f1077[a0_0x256f('0x454')][a0_0x256f('0x64a')][a0_0x256f('0x3ee')][a0_0x256f('0x398')],_0x33a888,new _0x469430[(a0_0x256f('0x327'))]()),_0x21da86=new _0x469430['Cartesian3']();return _0x21da86['x']=_0xd08464['x']-_0x1fef7c['x'],_0x21da86['y']=_0xd08464['y']-_0x1fef7c['y'],_0x21da86['z']=_0xd08464['z']-_0x1fef7c['z'],_0x469430[a0_0x256f('0x534')][a0_0x256f('0x73')](_0x21da86,_0x21da86),_0x21da86;},'u_radius':function(){return _0x3f1077[a0_0x256f('0x1fa')]*((new Date()[a0_0x256f('0x5dc')]()-_0x12c31d)%_0x3f1077[a0_0x256f('0x47e')])/_0x3f1077[a0_0x256f('0x47e')];},'u_scanColor':this[a0_0x256f('0x4c2')]}});}}]),_0x4eb2f3;}(_0x59ee7b);_0x59ee7b[a0_0x256f('0x49d')](a0_0x256f('0x1c7'));var _0x196c06=_0x4e138d;function _0x2aeeb7(_0x363587){var _0x46a494=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x5587de){return!0x1;}}();return function(){var _0x212001,_0x43e8e6=_0x1f521f()(_0x363587);if(_0x46a494){var _0x379dc6=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x212001=Reflect[a0_0x256f('0x64c')](_0x43e8e6,arguments,_0x379dc6);}else _0x212001=_0x43e8e6['apply'](this,arguments);return _0x31d024()(this,_0x212001);};}var _0x2f8293=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0xdefc0b=_0x16c2d0(0x55),_0x8f5a84=function(_0x474e28){_0x38fe39()(_0x54213a,_0x474e28);var _0x53f032=_0x2aeeb7(_0x54213a);function _0x54213a(_0x32fc68,_0x3f7db6,_0xc5c9b5){var _0x27db09;return _0x3c0ba4()(this,_0x54213a),(_0x27db09=_0x53f032[a0_0x256f('0x32b')](this,_0x32fc68))[a0_0x256f('0x23d')]=_0xc5c9b5,_0x27db09[a0_0x256f('0x65c')]=_0x3f7db6||new _0x2f8293[(a0_0x256f('0x54e'))](0.8,0.8,0.8,0.5),_0x27db09['_addable']=!0x0,_0x27db09['type']=_0x59ee7b['getEffectType'](a0_0x256f('0x2dd')),_0x27db09[a0_0x256f('0x2fa')]=_0x34508c['a']['INITIALIZED'],_0x27db09;}return _0x6f111f()(_0x54213a,[{'key':a0_0x256f('0x60c'),'value':function(){var _0x438fdc,_0xd0309e,_0x399fe2,_0x164fb6;this[a0_0x256f('0x10')]=new _0x2f8293[(a0_0x256f('0x77'))]({'name':this['_id'],'fragmentShader':_0xdefc0b,'uniforms':{'fogByDistance':new _0x2f8293[(a0_0x256f('0x327'))]((null===(_0x438fdc=this[a0_0x256f('0x23d')])||void 0x0===_0x438fdc?void 0x0:_0x438fdc[a0_0x256f('0x142')])||0xa,(null===(_0xd0309e=this['_fogByDistance'])||void 0x0===_0xd0309e?void 0x0:_0xd0309e[a0_0x256f('0x440')])||0x0,(null===(_0x399fe2=this[a0_0x256f('0x23d')])||void 0x0===_0x399fe2?void 0x0:_0x399fe2['far'])||0xc8,(null===(_0x164fb6=this[a0_0x256f('0x23d')])||void 0x0===_0x164fb6?void 0x0:_0x164fb6['farValue'])||0x1),'fogColor':this[a0_0x256f('0x65c')]}});}},{'key':'fogByDistance','set':function(_0x37ddf7){var _0xd7ddd9,_0x48f21d,_0x28889d,_0x115f87;this[a0_0x256f('0x23d')]=_0x37ddf7,this['_delegate'][a0_0x256f('0x2e5')][a0_0x256f('0x418')]=new _0x2f8293[(a0_0x256f('0x327'))]((null===(_0xd7ddd9=this['_fogByDistance'])||void 0x0===_0xd7ddd9?void 0x0:_0xd7ddd9[a0_0x256f('0x142')])||0xa,(null===(_0x48f21d=this[a0_0x256f('0x23d')])||void 0x0===_0x48f21d?void 0x0:_0x48f21d[a0_0x256f('0x440')])||0x0,(null===(_0x28889d=this[a0_0x256f('0x23d')])||void 0x0===_0x28889d?void 0x0:_0x28889d['far'])||0xc8,(null===(_0x115f87=this[a0_0x256f('0x23d')])||void 0x0===_0x115f87?void 0x0:_0x115f87[a0_0x256f('0x5f2')])||0x1);}},{'key':'fogColor','set':function(_0x5e630d){this[a0_0x256f('0x65c')]=_0x5e630d,this[a0_0x256f('0x10')]['uniforms'][a0_0x256f('0x646')]=this[a0_0x256f('0x65c')];}}]),_0x54213a;}(_0x59ee7b);_0x59ee7b[a0_0x256f('0x49d')](a0_0x256f('0x2dd'));var _0x55df6a=_0x8f5a84;function _0xd41f0a(_0x56ae3d){var _0x3f6cbb=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect['construct']['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x56926c){return!0x1;}}();return function(){var _0x22d323,_0x386146=_0x1f521f()(_0x56ae3d);if(_0x3f6cbb){var _0x55ce0a=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x22d323=Reflect['construct'](_0x386146,arguments,_0x55ce0a);}else _0x22d323=_0x386146['apply'](this,arguments);return _0x31d024()(this,_0x22d323);};}var _0x55286b=DC['Namespace'][a0_0x256f('0x224')],_0x4c7cc5=_0x16c2d0(0x56),_0x4fb283=function(_0xbb7c8a){_0x38fe39()(_0x529c5b,_0xbb7c8a);var _0x4c704c=_0xd41f0a(_0x529c5b);function _0x529c5b(_0x2b04fb,_0x5b9530,_0x14435c,_0x70d7c8,_0x4b38f9){var _0x4015ef;return _0x3c0ba4()(this,_0x529c5b),(_0x4015ef=_0x4c704c[a0_0x256f('0x32b')](this,_0x2b04fb))[a0_0x256f('0x666')]=_0x2a7036['a']['parsePosition'](_0x5b9530),_0x4015ef[a0_0x256f('0x1fa')]=_0x14435c||0x0,_0x4015ef[a0_0x256f('0x4c2')]=_0x55286b[a0_0x256f('0x9f')](_0x70d7c8,_0x55286b[a0_0x256f('0x54e')][a0_0x256f('0x34a')]),_0x4015ef['_duration']=0x3e8*_0x55286b[a0_0x256f('0x9f')](_0x4b38f9,0x1),_0x4015ef[a0_0x256f('0x60e')]=!0x0,_0x4015ef[a0_0x256f('0x195')]=_0x59ee7b['getEffectType'](a0_0x256f('0x321')),_0x4015ef[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x206')],_0x4015ef;}return _0x6f111f()(_0x529c5b,[{'key':a0_0x256f('0x60c'),'value':function(){var _0x1a42c8=this,_0x527147=_0x570b2f['a'][a0_0x256f('0x72')](this[a0_0x256f('0x666')]),_0x53c230=new _0x55286b[(a0_0x256f('0x327'))](_0x527147['x'],_0x527147['y'],_0x527147['z'],0x1),_0x47dde1=_0x570b2f['a'][a0_0x256f('0x72')](new _0x171384['a'](this[a0_0x256f('0x666')][a0_0x256f('0x16e')],this['_position'][a0_0x256f('0x44a')],this[a0_0x256f('0x666')][a0_0x256f('0x41d')]+0x1f4)),_0x44ee05=new _0x55286b[(a0_0x256f('0x327'))](_0x47dde1['x'],_0x47dde1['y'],_0x47dde1['z'],0x1),_0x3319b3=_0x570b2f['a'][a0_0x256f('0x72')](new _0x171384['a'](this[a0_0x256f('0x666')][a0_0x256f('0x16e')]+0.001,this[a0_0x256f('0x666')][a0_0x256f('0x44a')],this['_position']['alt'])),_0x20293a=new _0x55286b[(a0_0x256f('0x327'))](_0x3319b3['x'],_0x3319b3['y'],_0x3319b3['z'],0x1),_0x3dd0d7=new Date()[a0_0x256f('0x5dc')](),_0xe053ef=new _0x55286b[(a0_0x256f('0xd4'))](),_0x566f37=new _0x55286b['Matrix3'](),_0x2b6fda=new _0x55286b['Cartesian4'](),_0xeb9bf2=new _0x55286b[(a0_0x256f('0x327'))](),_0x33acb2=new _0x55286b[(a0_0x256f('0x327'))](),_0x3f436a=new _0x55286b[(a0_0x256f('0x534'))](),_0x157e1d=new _0x55286b[(a0_0x256f('0x534'))]();this['_delegate']=new _0x55286b[(a0_0x256f('0x77'))]({'name':this[a0_0x256f('0x616')],'fragmentShader':_0x4c7cc5,'uniforms':{'u_scanCenterEC':function(){return _0x55286b[a0_0x256f('0x5db')][a0_0x256f('0x53a')](_0x1a42c8[a0_0x256f('0x454')]['camera'][a0_0x256f('0x398')],_0x53c230,_0x2b6fda);},'u_scanPlaneNormalEC':function(){var _0x1a0ea9=_0x55286b[a0_0x256f('0x5db')][a0_0x256f('0x53a')](_0x1a42c8[a0_0x256f('0x454')][a0_0x256f('0x3ee')]['_viewMatrix'],_0x53c230,_0x2b6fda),_0x2c863b=_0x55286b[a0_0x256f('0x5db')]['multiplyByVector'](_0x1a42c8[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x398')],_0x44ee05,_0xeb9bf2);return _0x3f436a['x']=_0x2c863b['x']-_0x1a0ea9['x'],_0x3f436a['y']=_0x2c863b['y']-_0x1a0ea9['y'],_0x3f436a['z']=_0x2c863b['z']-_0x1a0ea9['z'],_0x55286b[a0_0x256f('0x534')]['normalize'](_0x3f436a,_0x3f436a),_0x3f436a;},'u_scanLineNormalEC':function(){var _0x5d6175=_0x55286b[a0_0x256f('0x5db')][a0_0x256f('0x53a')](_0x1a42c8['_viewer'][a0_0x256f('0x3ee')][a0_0x256f('0x398')],_0x53c230,_0x2b6fda),_0x4555db=_0x55286b[a0_0x256f('0x5db')][a0_0x256f('0x53a')](_0x1a42c8[a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x398')],_0x44ee05,_0xeb9bf2),_0x4aad9f=_0x55286b[a0_0x256f('0x5db')]['multiplyByVector'](_0x1a42c8['_viewer'][a0_0x256f('0x3ee')][a0_0x256f('0x398')],_0x20293a,_0x33acb2);_0x3f436a['x']=_0x4555db['x']-_0x5d6175['x'],_0x3f436a['y']=_0x4555db['y']-_0x5d6175['y'],_0x3f436a['z']=_0x4555db['z']-_0x5d6175['z'],_0x55286b['Cartesian3'][a0_0x256f('0x73')](_0x3f436a,_0x3f436a),_0x157e1d['x']=_0x4aad9f['x']-_0x5d6175['x'],_0x157e1d['y']=_0x4aad9f['y']-_0x5d6175['y'],_0x157e1d['z']=_0x4aad9f['z']-_0x5d6175['z'];var _0x48489e=(new Date()['getTime']()-_0x3dd0d7)%_0x1a42c8['_duration']/_0x1a42c8[a0_0x256f('0x47e')];return _0x55286b[a0_0x256f('0xd4')][a0_0x256f('0x54')](_0x3f436a,_0x48489e*_0x55286b[a0_0x256f('0x4bb')]['PI']*0x2,_0xe053ef),_0x55286b['Matrix3']['fromQuaternion'](_0xe053ef,_0x566f37),_0x55286b[a0_0x256f('0x595')][a0_0x256f('0x53a')](_0x566f37,_0x157e1d,_0x157e1d),_0x55286b[a0_0x256f('0x534')][a0_0x256f('0x73')](_0x157e1d,_0x157e1d),_0x157e1d;},'u_radius':this[a0_0x256f('0x1fa')],'u_scanColor':this[a0_0x256f('0x4c2')]}});}}]),_0x529c5b;}(_0x59ee7b);_0x59ee7b[a0_0x256f('0x49d')]('radar_scan');var _0x18b27=_0x4fb283;function _0x5b1874(_0x280f5a){var _0x1ac400=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString'][a0_0x256f('0x32b')](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x4d6df0){return!0x1;}}();return function(){var _0x4b97bc,_0x5347e7=_0x1f521f()(_0x280f5a);if(_0x1ac400){var _0x14c4bf=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x4b97bc=Reflect['construct'](_0x5347e7,arguments,_0x14c4bf);}else _0x4b97bc=_0x5347e7[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x4b97bc);};}var _0x26906f=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5cc1cd=_0x16c2d0(0x57),_0x1556e4=function(_0xfa1ad3){_0x38fe39()(_0x59210d,_0xfa1ad3);var _0x2e2c51=_0x5b1874(_0x59210d);function _0x59210d(_0x43dc11,_0x1d01e2){var _0x1ae4fc;return _0x3c0ba4()(this,_0x59210d),(_0x1ae4fc=_0x2e2c51[a0_0x256f('0x32b')](this,_0x43dc11))['_addable']=!0x0,_0x1ae4fc[a0_0x256f('0x2e9')]=_0x1d01e2||0xa,_0x1ae4fc[a0_0x256f('0x195')]=_0x59ee7b['getEffectType'](a0_0x256f('0x62f')),_0x1ae4fc[a0_0x256f('0x2fa')]=_0x34508c['a']['INITIALIZED'],_0x1ae4fc;}return _0x6f111f()(_0x59210d,[{'key':'_mountedHook','value':function(){this[a0_0x256f('0x10')]=new _0x26906f[(a0_0x256f('0x77'))]({'name':this[a0_0x256f('0x616')],'fragmentShader':_0x5cc1cd,'uniforms':{'speed':this[a0_0x256f('0x2e9')]}});}},{'key':a0_0x256f('0x26a'),'set':function(_0x4c00bf){this[a0_0x256f('0x2e9')]=_0x4c00bf,this['_delegate']&&(this[a0_0x256f('0x10')]['uniforms']['speed']=this[a0_0x256f('0x2e9')]);},'get':function(){return this[a0_0x256f('0x2e9')];}}]),_0x59210d;}(_0x59ee7b);_0x59ee7b[a0_0x256f('0x49d')](a0_0x256f('0x62f'));var _0x1e9fe7=_0x1556e4;function _0x38c5a1(_0x16f435){var _0x49ad58=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x256f('0x270')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x157ff4){return!0x1;}}();return function(){var _0x165c3f,_0x3da76d=_0x1f521f()(_0x16f435);if(_0x49ad58){var _0x4dc551=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x165c3f=Reflect[a0_0x256f('0x64c')](_0x3da76d,arguments,_0x4dc551);}else _0x165c3f=_0x3da76d[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x165c3f);};}var _0x4ca9fb=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x4d6e72=_0x16c2d0(0x58),_0x36726e=function(_0x4fb547){_0x38fe39()(_0x3351e1,_0x4fb547);var _0x201378=_0x38c5a1(_0x3351e1);function _0x3351e1(_0x18b6eb,_0x2fe341){var _0x29d3b8;return _0x3c0ba4()(this,_0x3351e1),(_0x29d3b8=_0x201378[a0_0x256f('0x32b')](this,_0x18b6eb))['_addable']=!0x0,_0x29d3b8[a0_0x256f('0x2e9')]=_0x2fe341||0xa,_0x29d3b8[a0_0x256f('0x195')]=_0x59ee7b[a0_0x256f('0x1c3')](a0_0x256f('0x328')),_0x29d3b8[a0_0x256f('0x2fa')]=_0x34508c['a']['INITIALIZED'],_0x29d3b8;}return _0x6f111f()(_0x3351e1,[{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x10')]=new _0x4ca9fb[(a0_0x256f('0x77'))]({'name':this[a0_0x256f('0x616')],'fragmentShader':_0x4d6e72,'uniforms':{'speed':this[a0_0x256f('0x2e9')]}});}},{'key':a0_0x256f('0x26a'),'set':function(_0x57f183){this[a0_0x256f('0x2e9')]=_0x57f183,this[a0_0x256f('0x10')]&&(this[a0_0x256f('0x10')]['uniforms'][a0_0x256f('0x26a')]=this[a0_0x256f('0x2e9')]);},'get':function(){return this[a0_0x256f('0x2e9')];}}]),_0x3351e1;}(_0x59ee7b);_0x59ee7b[a0_0x256f('0x49d')](a0_0x256f('0x328'));var _0x2f1c20=_0x36726e;function _0x56f0ee(_0x287640){var _0x37d50b=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')][a0_0x256f('0x270')]['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x5769c3){return!0x1;}}();return function(){var _0x58f7f8,_0x372b1d=_0x1f521f()(_0x287640);if(_0x37d50b){var _0x563eb4=_0x1f521f()(this)['constructor'];_0x58f7f8=Reflect['construct'](_0x372b1d,arguments,_0x563eb4);}else _0x58f7f8=_0x372b1d['apply'](this,arguments);return _0x31d024()(this,_0x58f7f8);};}var _0x85552=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x5ef0f4=function(_0x5237a0){_0x38fe39()(_0x307070,_0x5237a0);var _0x1fca1a=_0x56f0ee(_0x307070);function _0x307070(_0x5efdc9){var _0x21f706;return _0x3c0ba4()(this,_0x307070),(_0x21f706=_0x1fca1a[a0_0x256f('0x32b')](this,_0x5efdc9))[a0_0x256f('0x195')]=_0x59ee7b['getEffectType'](a0_0x256f('0x316')),_0x21f706['_addable']=!0x0,_0x21f706[a0_0x256f('0x2fa')]=_0x34508c['a']['INITIALIZED'],_0x21f706;}return _0x6f111f()(_0x307070,[{'key':'_mountedHook','value':function(){this[a0_0x256f('0x10')]=_0x85552[a0_0x256f('0xe0')][a0_0x256f('0x2d0')]();}},{'key':'_addedHook','value':function(){this['_delegate'][a0_0x256f('0x5b1')]=!0x0;}}]),_0x307070;}(_0x59ee7b);_0x59ee7b['registerType']('night_vision');var _0x5346d8=_0x5ef0f4,_0x3defb8={'FP':'1','TP':'2','TRACKED':a0_0x256f('0x49f'),'FREE':a0_0x256f('0x433')},_0x30fa7f={'ADD':a0_0x256f('0x53d'),'REMOVE':'remove','POST_UPDATE':'postUpdate','ACTIVE':a0_0x256f('0x469'),'RELEASE':a0_0x256f('0x5c3')};function _0x3d3c6b(_0x425423){var _0x41fef7=function(){if(a0_0x256f('0x51b')==typeof Reflect||!Reflect[a0_0x256f('0x64c')])return!0x1;if(Reflect[a0_0x256f('0x64c')][a0_0x256f('0x91')])return!0x1;if(a0_0x256f('0x560')==typeof Proxy)return!0x0;try{return Date[a0_0x256f('0xa8')]['toString']['call'](Reflect[a0_0x256f('0x64c')](Date,[],function(){})),!0x0;}catch(_0x15db02){return!0x1;}}();return function(){var _0x7fa129,_0x1bd54e=_0x1f521f()(_0x425423);if(_0x41fef7){var _0x4b19fa=_0x1f521f()(this)[a0_0x256f('0x3d3')];_0x7fa129=Reflect[a0_0x256f('0x64c')](_0x1bd54e,arguments,_0x4b19fa);}else _0x7fa129=_0x1bd54e[a0_0x256f('0x40')](this,arguments);return _0x31d024()(this,_0x7fa129);};}var _0x266ce4=DC[a0_0x256f('0x3bd')][a0_0x256f('0x224')],_0x3d1c74=function(_0xe7c427){_0x38fe39()(_0x3e13b0,_0xe7c427);var _0x545fb0=_0x3d3c6b(_0x3e13b0);function _0x3e13b0(){return _0x3c0ba4()(this,_0x3e13b0),_0x545fb0[a0_0x256f('0x32b')](this);}return _0x6f111f()(_0x3e13b0,[{'key':'_registerEvent','value':function(){var _0x313399=this;Object[a0_0x256f('0x536')](_0x30fa7f)[a0_0x256f('0x218')](function(_0x49ec10){var _0x1a73b4=_0x30fa7f[_0x49ec10];_0x313399[a0_0x256f('0xdb')][_0x1a73b4]=new _0x266ce4[(a0_0x256f('0x4c9'))]();});}}]),_0x3e13b0;}(_0x5b388d['a']);function _0xde4782(_0x13efdf,_0x4f4418){var _0x1be51e=Object[a0_0x256f('0x536')](_0x13efdf);if(Object[a0_0x256f('0x23e')]){var _0x106d7e=Object[a0_0x256f('0x23e')](_0x13efdf);_0x4f4418&&(_0x106d7e=_0x106d7e[a0_0x256f('0x53e')](function(_0x27ee9b){return Object[a0_0x256f('0x79')](_0x13efdf,_0x27ee9b)['enumerable'];})),_0x1be51e[a0_0x256f('0x289')][a0_0x256f('0x40')](_0x1be51e,_0x106d7e);}return _0x1be51e;}function _0x464ab5(_0x1d04c5){for(var _0x5d1d63=0x1;_0x5d1d63<arguments[a0_0x256f('0x658')];_0x5d1d63++){var _0xa7d702=null!=arguments[_0x5d1d63]?arguments[_0x5d1d63]:{};_0x5d1d63%0x2?_0xde4782(Object(_0xa7d702),!0x0)[a0_0x256f('0x218')](function(_0x48bc62){_0x2baac3()(_0x1d04c5,_0x48bc62,_0xa7d702[_0x48bc62]);}):Object[a0_0x256f('0x498')]?Object[a0_0x256f('0x3d9')](_0x1d04c5,Object[a0_0x256f('0x498')](_0xa7d702)):_0xde4782(Object(_0xa7d702))[a0_0x256f('0x218')](function(_0x2a4b14){Object[a0_0x256f('0x21f')](_0x1d04c5,_0x2a4b14,Object[a0_0x256f('0x79')](_0xa7d702,_0x2a4b14));});}return _0x1d04c5;}var _0x45153c=DC[a0_0x256f('0x3bd')]['Cesium'],_0x422585={'showPath':!0x1,'pathWidth':0x1,'pathMaterial':_0x45153c[a0_0x256f('0x54e')][a0_0x256f('0x188')][a0_0x256f('0x2e4')](0.8),'pathLeadTime':0x1},_0x292840=function(){function _0xe2e8a7(_0x2ff7ab,_0x489239,_0x3d259b){_0x3c0ba4()(this,_0xe2e8a7),this[a0_0x256f('0x616')]=_0x2ff7ab||_0x5d2d0b['c'][a0_0x256f('0x37e')](),this['_startTime']=void 0x0,this[a0_0x256f('0x2ba')]=void 0x0,this[a0_0x256f('0x47e')]=0x0,this['_mode']=a0_0x256f('0x26a'),this[a0_0x256f('0x10')]=new _0x45153c[(a0_0x256f('0x39d'))](),this[a0_0x256f('0x5d3')]=[],this[a0_0x256f('0xa6')]=void 0x0,this['_isActive']=!0x1,this['_tickCallback']=_0x489239,this['_options']=_0x464ab5(_0x464ab5({},_0x422585),_0x3d259b),this[a0_0x256f('0x8')]=0x0,this[a0_0x256f('0x5a5')]=[],this[a0_0x256f('0xd8')]=new _0x3d1c74(),this[a0_0x256f('0xd8')]['on'](_0x30fa7f[a0_0x256f('0x1f3')],this['_onPostUpdate'],this),this[a0_0x256f('0xd8')]['on'](_0x30fa7f[a0_0x256f('0x25e')],this[a0_0x256f('0x21c')],this),this[a0_0x256f('0xd8')]['on'](_0x30fa7f['REMOVE'],this[a0_0x256f('0x1e1')],this),this['_roamingEvent']['on'](_0x30fa7f[a0_0x256f('0x466')],this[a0_0x256f('0x1ff')],this),this[a0_0x256f('0xd8')]['on'](_0x30fa7f[a0_0x256f('0x5cb')],this[a0_0x256f('0x3ad')],this),this['_state']=_0x34508c['a'][a0_0x256f('0x206')];}return _0x6f111f()(_0xe2e8a7,[{'key':a0_0x256f('0x21c'),'value':function(_0x3ef774){this[a0_0x256f('0x2ba')]=_0x3ef774,this[a0_0x256f('0x551')]=_0x3ef774[a0_0x256f('0x438')],this[a0_0x256f('0x47e')]=_0x3ef774[a0_0x256f('0xda')],this[a0_0x256f('0x42a')](),this[a0_0x256f('0x10')]['position']||this['_mountPosition'](),this['_mountedHook']&&this[a0_0x256f('0x60c')](),this[a0_0x256f('0x2fa')]=_0x34508c['a']['ADDED'];}},{'key':a0_0x256f('0x1e1'),'value':function(){this[a0_0x256f('0x2ba')]&&(this[a0_0x256f('0x2ba')][a0_0x256f('0x454')]['delegate']['entities']['remove'](this['_delegate']),this[a0_0x256f('0x2fa')]=_0x34508c['a'][a0_0x256f('0x234')],this[a0_0x256f('0x559')]&&(this[a0_0x256f('0x2ba')][a0_0x256f('0x454')][a0_0x256f('0x3ee')][a0_0x256f('0x4b')](_0x45153c[a0_0x256f('0x5db')][a0_0x256f('0x25b')]),this['_controller']['_viewer'][a0_0x256f('0x64a')][a0_0x256f('0x622')]=void 0x0));}},{'key':'_onPostUpdate','value':function(_0x104a66){var _0x824379=_0x104a66[a0_0x256f('0x2b9')],_0x77ecdc=this[a0_0x256f('0x10')][a0_0x256f('0xfc')][a0_0x256f('0x21b')](_0x824379),_0x20bc87=this['_timeLine'][this[a0_0x256f('0x8')]];if(_0x20bc87){var _0x2339d5=_0x45153c[a0_0x256f('0x29c')][a0_0x256f('0x38c')](_0x824379,_0x20bc87);_0x2339d5>=0x0&&_0x2339d5<=0x1&&(this['_tickCallback']&&this['_tickCallback'](this['_positions'][this[a0_0x256f('0x8')]],_0x77ecdc,this[a0_0x256f('0x8')]+0x1===this[a0_0x256f('0x5d3')][a0_0x256f('0x658')]),this['_positionIndex']+=0x1);}this[a0_0x256f('0x559')]&&this[a0_0x256f('0x367')](_0x824379,_0x104a66['viewMode'],_0x104a66[a0_0x256f('0x28e')]);}},{'key':a0_0x256f('0x1ff'),'value':function(){this[a0_0x256f('0x559')]=!0x0;}},{'key':a0_0x256f('0x3ad'),'value':function(){this[a0_0x256f('0x559')]=!0x1;}},{'key':'_setView','value':function(_0x1ccfb8,_0x3f01aa,_0xdb2b79){var _0x124e86=this[a0_0x256f('0x2ba')]['_viewer'][a0_0x256f('0x64a')],_0xbbdd37=this['_controller'][a0_0x256f('0x454')][a0_0x256f('0x3ee')],_0x23d469=this[a0_0x256f('0xa6')][a0_0x256f('0x21b')](_0x1ccfb8),_0x3fcd5a=this['_sampledPosition'][a0_0x256f('0x21b')](_0x45153c[a0_0x256f('0x29c')][a0_0x256f('0x3b6')](_0x1ccfb8,0x1/0x3c,new _0x45153c[(a0_0x256f('0x29c'))]()));if(_0x23d469&&_0x3fcd5a&&_0x3f01aa){if(_0x3f01aa===_0x3defb8[a0_0x256f('0x152')])_0x124e86[a0_0x256f('0x622')]=this[a0_0x256f('0x10')];else{if(_0x3f01aa===_0x3defb8['FP']){var _0x1c74ce=_0x45153c[a0_0x256f('0x4bb')]['heading'](_0x23d469,_0x3fcd5a),_0x60ef01=_0x570b2f['a'][a0_0x256f('0x31a')](_0x23d469);_0x60ef01[a0_0x256f('0x41d')]=_0xdb2b79[a0_0x256f('0x41d')]||0x5,_0xbbdd37[a0_0x256f('0x638')](_0x570b2f['a'][a0_0x256f('0x72')](_0x60ef01),new _0x45153c[(a0_0x256f('0x82'))](_0x1c74ce,_0x45153c[a0_0x256f('0x4bb')][a0_0x256f('0x1b4')](_0xdb2b79[a0_0x256f('0x3c3')]||0x0),_0xdb2b79[a0_0x256f('0x162')]||0xa));}else _0x3f01aa===_0x3defb8['TP']&&_0xbbdd37['lookAt'](_0x23d469,new _0x45153c[(a0_0x256f('0x82'))](0x0,-0x5a,_0xdb2b79[a0_0x256f('0x162')]||0x3e8));}}else _0xbbdd37[a0_0x256f('0x4b')](_0x45153c[a0_0x256f('0x5db')][a0_0x256f('0x25b')]),_0x124e86[a0_0x256f('0x622')]=void 0x0;}},{'key':a0_0x256f('0x42a'),'value':function(){this[a0_0x256f('0x1d3')][a0_0x256f('0x3d2')]&&(this[a0_0x256f('0x10')][a0_0x256f('0x30c')]=new _0x45153c[(a0_0x256f('0x17e'))]([new _0x45153c['TimeInterval']({'start':this[a0_0x256f('0x551')],'stop':_0x45153c[a0_0x256f('0x29c')][a0_0x256f('0x3b6')](this[a0_0x256f('0x551')],this[a0_0x256f('0x47e')],new _0x45153c[(a0_0x256f('0x29c'))]())})]),this[a0_0x256f('0x10')][a0_0x256f('0x9e')]={'material':this['_options'][a0_0x256f('0x4d')],'width':this['_options']['pathWidth'],'leadTime':this['_options'][a0_0x256f('0x5af')]});}},{'key':a0_0x256f('0x2c4'),'value':function(){var _0x133a43=this;if(!this[a0_0x256f('0x551')]||!this[a0_0x256f('0x47e')])return!0x1;var _0x5009c6=0x0;if(a0_0x256f('0x26a')===this[a0_0x256f('0x484')]){var _0x2cf805=_0x45153c['Math']['distance'](this['_positions'])/this['_duration'];this[a0_0x256f('0x5a5')]=this[a0_0x256f('0x5d3')][a0_0x256f('0x153')](function(_0x2e6a2a,_0x447cc9,_0x5191ea){return 0x0!==_0x447cc9&&(_0x5009c6+=_0x45153c[a0_0x256f('0x4bb')]['distance']([_0x5191ea[_0x447cc9-0x1],_0x2e6a2a])/_0x2cf805),_0x45153c['JulianDate'][a0_0x256f('0x3b6')](_0x133a43[a0_0x256f('0x551')],_0x5009c6,new _0x45153c[(a0_0x256f('0x29c'))]());});}else{var _0x408bcc=this[a0_0x256f('0x5d3')][a0_0x256f('0x658')],_0x18ebb7=(this['_duration']-this[a0_0x256f('0x47e')]%_0x408bcc)/_0x408bcc;this[a0_0x256f('0x5a5')]=this[a0_0x256f('0x5d3')][a0_0x256f('0x153')](function(_0x4cc4f6,_0x30db45){return _0x45153c[a0_0x256f('0x29c')][a0_0x256f('0x3b6')](_0x133a43['_startTime'],_0x30db45*_0x18ebb7,new _0x45153c[(a0_0x256f('0x29c'))]());});}this[a0_0x256f('0xa6')]=new _0x45153c['SampledPositionProperty'](),this[a0_0x256f('0xa6')][a0_0x256f('0x2c7')](this[a0_0x256f('0x5a5')],_0x570b2f['a'][a0_0x256f('0x1ae')](this[a0_0x256f('0x5d3')])),this['_delegate'][a0_0x256f('0x13c')]=this[a0_0x256f('0xa6')],this[a0_0x256f('0x10')][a0_0x256f('0x13c')][a0_0x256f('0x68')]({'interpolationDegree':0x1,'interpolationAlgorithm':_0x45153c[a0_0x256f('0x2ab')]}),this[a0_0x256f('0x10')]['orientation']=new _0x45153c[(a0_0x256f('0x133'))](this[a0_0x256f('0xa6')]);}},{'key':a0_0x256f('0x60c'),'value':function(){this[a0_0x256f('0x2ba')][a0_0x256f('0x454')][a0_0x256f('0x365')][a0_0x256f('0x53d')](this['_delegate']);}},{'key':'setPositions','value':function(_0x144e9a){return this[a0_0x256f('0x5d3')]=_0x2a7036['a'][a0_0x256f('0x442')](_0x144e9a),this[a0_0x256f('0x2c4')](),this;}},{'key':a0_0x256f('0x1f1'),'value':function(_0x26cd08,_0x5f517e){return this[a0_0x256f('0x5d3')]['push'](_0x2a7036['a'][a0_0x256f('0x10c')](_0x26cd08)),this['_duration']+=_0x5f517e,this[a0_0x256f('0x2c4')](),this;}},{'key':a0_0x256f('0x3fb'),'value':function(_0x56cf25){return this[a0_0x256f('0x484')]=_0x56cf25,this['_mountPosition'](),this;}},{'key':a0_0x256f('0x26c'),'value':function(_0x51768d,_0x966f17){return this['_delegate'][a0_0x256f('0x407')]=_0x464ab5(_0x464ab5({},_0x966f17),{},{'uri':_0x51768d}),this;}},{'key':a0_0x256f('0x2e0'),'value':function(_0x36e06f,_0x5b8858){return this['_delegate'][a0_0x256f('0x13d')]=_0x464ab5(_0x464ab5({},_0x5b8858),{},{'image':_0x36e06f}),this;}},{'key':'setLabel','value':function(_0x306379,_0x26684a){return this[a0_0x256f('0x10')][a0_0x256f('0x3a4')]=_0x464ab5(_0x464ab5({},_0x26684a),{},{'text':_0x306379}),this;}},{'key':'id','get':function(){return this[a0_0x256f('0x616')];}},{'key':a0_0x256f('0x299'),'get':function(){return this[a0_0x256f('0xd8')];}},{'key':'state','get':function(){return this['_state'];}},{'key':'isActive','get':function(){return this[a0_0x256f('0x559')];}}]),_0xe2e8a7;}(),_0x96f5d6=DC[a0_0x256f('0x3bd')]['Cesium'],_0x20ee96=function(){function _0x6f0047(_0xe2f29f){_0x3c0ba4()(this,_0x6f0047),this[a0_0x256f('0x454')]=_0xe2f29f,this['_postUpdateRemoveCallback']=void 0x0,this[a0_0x256f('0x551')]=void 0x0,this[a0_0x256f('0x47e')]=0x0,this[a0_0x256f('0xdb')]={},this[a0_0x256f('0x20d')]=void 0x0,this['_viewMode']=void 0x0,this[a0_0x256f('0x540')]={};}return _0x6f111f()(_0x6f0047,[{'key':a0_0x256f('0x5e1'),'value':function(_0x47c6cf,_0x2d796c){var _0x44ffcd=this;Object[a0_0x256f('0x536')](this[a0_0x256f('0xdb')])[a0_0x256f('0x218')](function(_0x1dbce7){var _0x49232c=_0x44ffcd['_cache'][_0x1dbce7];_0x49232c[a0_0x256f('0x299')]&&_0x49232c[a0_0x256f('0x299')]['fire'](_0x30fa7f[a0_0x256f('0x1f3')],{'currentTime':_0x2d796c,'viewMode':_0x44ffcd[a0_0x256f('0x275')],'viewOption':_0x44ffcd[a0_0x256f('0x540')]});});}},{'key':a0_0x256f('0x4db'),'value':function(_0x17d110,_0x3f4ade){if(!(_0x17d110&&_0x3f4ade&&_0x17d110 instanceof Date&&_0x3f4ade instanceof Date&&!(_0x17d110>_0x3f4ade)))throw new Error(a0_0x256f('0x2c5'));return this['_startTime']=_0x96f5d6[a0_0x256f('0x29c')][a0_0x256f('0x67')](_0x17d110),_0x3f4ade=_0x96f5d6[a0_0x256f('0x29c')][a0_0x256f('0x67')](_0x3f4ade),this[a0_0x256f('0x47e')]=_0x96f5d6[a0_0x256f('0x29c')][a0_0x256f('0x38c')](_0x3f4ade,this[a0_0x256f('0x551')]),this;}},{'key':a0_0x256f('0x4ad'),'value':function(_0x5f062a,_0x101d75){if(!(_0x5f062a&&_0x5f062a instanceof Date))throw new Error(a0_0x256f('0x303'));return this['_startTime']=_0x96f5d6[a0_0x256f('0x29c')][a0_0x256f('0x67')](_0x5f062a),this[a0_0x256f('0x47e')]=_0x101d75,this;}},{'key':'play','value':function(){if(!(this[a0_0x256f('0x551')]||this[a0_0x256f('0x551')]instanceof _0x96f5d6['JulianDate']))throw new Error(a0_0x256f('0x434'));return this[a0_0x256f('0x454')][a0_0x256f('0x504')][a0_0x256f('0x100')]=!0x0,this[a0_0x256f('0x454')][a0_0x256f('0x504')][a0_0x256f('0x2b9')]=this[a0_0x256f('0x551')],this[a0_0x256f('0x182')]&&this[a0_0x256f('0x182')](),this[a0_0x256f('0x182')]=this[a0_0x256f('0x454')][a0_0x256f('0x2b0')][a0_0x256f('0x3f8')][a0_0x256f('0x429')](this[a0_0x256f('0x5e1')],this),this;}},{'key':a0_0x256f('0x361'),'value':function(){return this[a0_0x256f('0x454')][a0_0x256f('0x504')][a0_0x256f('0x100')]=!0x1,this['_viewer']['camera'][a0_0x256f('0x4b')](_0x96f5d6[a0_0x256f('0x5db')][a0_0x256f('0x25b')]),this[a0_0x256f('0x454')]['delegate'][a0_0x256f('0x622')]=void 0x0,this;}},{'key':a0_0x256f('0x4a1'),'value':function(){return this[a0_0x256f('0x454')][a0_0x256f('0x504')][a0_0x256f('0x100')]=!0x0,this;}},{'key':'changeSpeed','value':function(_0x33ef09){return this['_viewer']['clock'][a0_0x256f('0xef')]=_0x33ef09,this;}},{'key':a0_0x256f('0x4a5'),'value':function(_0x5a34ad){return _0x5a34ad&&_0x5a34ad[a0_0x256f('0x299')]&&_0x5a34ad[a0_0x256f('0x65f')]!==_0x34508c['a'][a0_0x256f('0x135')]&&(_0x5a34ad[a0_0x256f('0x299')]['fire'](_0x30fa7f[a0_0x256f('0x25e')],this),this[a0_0x256f('0xdb')][_0x5a34ad['id']]=_0x5a34ad),this;}},{'key':'getPath','value':function(_0x377922){return this[a0_0x256f('0xdb')][_0x377922]||void 0x0;}},{'key':'removePath','value':function(_0x39ca35){return _0x39ca35&&Object(this['_cache'])[a0_0x256f('0x592')](_0x39ca35['id'])&&_0x39ca35[a0_0x256f('0x299')]&&(_0x39ca35[a0_0x256f('0x299')]['fire'](_0x30fa7f['REMOVE'],this),delete this[a0_0x256f('0xdb')][_0x39ca35['id']]),this;}},{'key':a0_0x256f('0x61c'),'value':function(){var _0x5c401a=this;return Object[a0_0x256f('0x536')](this[a0_0x256f('0xdb')])['forEach'](function(_0x5b9610){var _0x4b5a62=_0x5c401a['_cache'](_0x5b9610);_0x4b5a62&&_0x5c401a[a0_0x256f('0x3be')](_0x4b5a62);}),this;}},{'key':a0_0x256f('0x649'),'value':function(_0x33f8fa,_0x1075de){var _0x11540c=arguments[a0_0x256f('0x658')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};if(!this[a0_0x256f('0xdb')][_0x33f8fa['id']])throw new Error(a0_0x256f('0x232'));return this[a0_0x256f('0x275')]=_0x1075de,this[a0_0x256f('0x540')]=_0x11540c,this[a0_0x256f('0x20d')]&&this[a0_0x256f('0x20d')]['id']===_0x33f8fa['id']||(this[a0_0x256f('0x20d')]&&this[a0_0x256f('0x20d')]['roamingEvent']&&this[a0_0x256f('0x20d')][a0_0x256f('0x299')]['fire'](_0x30fa7f[a0_0x256f('0x5cb')],_0x33f8fa['id']),this[a0_0x256f('0x20d')]=_0x33f8fa,this['_activePath']&&this['_activePath'][a0_0x256f('0x299')]&&this[a0_0x256f('0x20d')][a0_0x256f('0x299')]['fire'](_0x30fa7f[a0_0x256f('0x466')],_0x33f8fa['id'])),this;}},{'key':a0_0x256f('0x438'),'get':function(){return this['_startTime'];}},{'key':'duration','get':function(){return this[a0_0x256f('0x47e')];}}]),_0x6f0047;}(),_0x36be69=_0x16c2d0(0x12),_0x3c3dab=_0x16c2d0(0xe),_0x248747=_0x16c2d0(0x11),_0x20e356=DC[a0_0x256f('0x3bd')]['Cesium'];_0x20e356[a0_0x256f('0x4bb')]['area']=_0x248747['a'],_0x20e356[a0_0x256f('0x4bb')]['bounds']=_0x248747['b'],_0x20e356[a0_0x256f('0x4bb')][a0_0x256f('0x3c6')]=_0x248747['h'],_0x20e356[a0_0x256f('0x4bb')][a0_0x256f('0x532')]=_0x248747['c'],_0x20e356[a0_0x256f('0x4bb')]['distance']=_0x248747['e'],_0x20e356[a0_0x256f('0x4bb')][a0_0x256f('0x569')]=_0x248747['f'],_0x20e356[a0_0x256f('0x4bb')]['isBetween']=_0x248747['g'],_0x20e356[a0_0x256f('0x4bb')][a0_0x256f('0x437')]=_0x248747['i'],_0x20e356[a0_0x256f('0x4bb')][a0_0x256f('0x201')]=_0x248747['d'];var _0x17c77b={'ImageryLayerFactory':_0x57d96f,'TerrainFactory':_0x1778af,'Viewer':_0x1369e9,'divForms':_0x43b0e1,'World':_0x1369e9,'LayerGroup':_0x36be69['e'],'GeoJsonLayer':_0x36be69['a'],'HtmlLayer':_0x36be69['b'],'LabelLayer':_0x36be69['c'],'PrimitiveLayer':_0x36be69['g'],'TilesetLayer':_0x36be69['h'],'TopoJsonLayer':_0x36be69['i'],'VectorLayer':_0x36be69['j'],'Billboard':_0x3c3dab['b'],'Circle':_0x3c3dab['d'],'DivIcon':_0x3c3dab['i'],'Label':_0x3c3dab['o'],'Point':_0x3c3dab['t'],'Polyline':_0x3c3dab['v'],'Polygon':_0x3c3dab['u'],'Model':_0x3c3dab['p'],'Tileset':_0x3c3dab['z'],'Box':_0x3c3dab['c'],'Corridor':_0x3c3dab['e'],'Cylinder':_0x3c3dab['h'],'Ellipse':_0x3c3dab['k'],'Ellipsoid':_0x3c3dab['l'],'Plane':_0x3c3dab['s'],'PolylineVolume':_0x3c3dab['w'],'Rectangle':_0x3c3dab['x'],'Wall':_0x3c3dab['A'],'CustomBillboard':_0x3c3dab['f'],'CustomLabel':_0x3c3dab['g'],'AttackArrow':_0x3c3dab['a'],'DoubleArrow':_0x3c3dab['j'],'FineArrow':_0x3c3dab['m'],'GatheringPlace':_0x3c3dab['n'],'TailedAttackArrow':_0x3c3dab['y'],'Plot':_0x476f66,'AroundView':_0x566998,'AroundPoint':_0x2e4a75,'GlobeRotate':_0x3145d2,'ClusterLayer':_0x2e38db,'CzmlLayer':_0x5e6e3b,'HeatLayer':_0x55defc,'KmlLayer':_0x16f5a1,'Effect':_0x59ee7b,'BloomEffect':_0x34c5ae,'CircleScanEffect':_0x196c06,'FogEffect':_0x55df6a,'RadarScanEffect':_0x18b27,'RainEffect':_0x1e9fe7,'SnowEffect':_0x2f1c20,'BrightnessEffect':_0x29805e,'NightVisionEffect':_0x5346d8,'RoamingViewMode':_0x3defb8,'RoamingController':_0x20ee96,'RoamingPath':_0x292840,'PolylineTrailMaterialProperty':_0x3dbfa3[a0_0x256f('0x7f')],'PolylineFlowMaterialProperty':_0x3dbfa3[a0_0x256f('0xf')],'PolylineEmissionMaterialProperty':_0x3dbfa3[a0_0x256f('0xcf')],'PolylineImageTrailMaterialProperty':_0x3dbfa3[a0_0x256f('0x43c')],'WaterMaterialProperty':_0x3dbfa3['WaterMaterialProperty'],'RimLightingMaterialProperty':_0x3dbfa3['RimLightingMaterialProperty'],'CircleFadeMaterialProperty':_0x3dbfa3['CircleFadeMaterialProperty'],'CircleWaveMaterialProperty':_0x3dbfa3[a0_0x256f('0x36a')],'WallTrailMaterialProperty':_0x3dbfa3[a0_0x256f('0xc1')],'Chart':_0x17be24,'Math':_0x20e356[a0_0x256f('0x4bb')],'BubbleWindow':_0x46605a,'Measure':function(_0x50e9c7){function _0x5579d4(){_0x3d1337[a0_0x256f('0x406')](),_0x34e679['clearLastNoEnd'](),_0x260e99[a0_0x256f('0x406')](),_0x13f728[a0_0x256f('0x406')](),_0x5a07c8['stopDraw']();}function _0x2eb4d8(_0x53999d,_0xe3d030){if(null==_0x53999d)return'';null!=_0xe3d030&&a0_0x256f('0xaa')!=_0xe3d030||(_0xe3d030=_0x53999d<0x3e8?'m':'km');var _0xa7166e='';switch(_0xe3d030){default:case'm':_0xa7166e=_0x53999d[a0_0x256f('0x478')](0x2)+'\x20米';break;case'km':_0xa7166e=(0.001*_0x53999d)[a0_0x256f('0x478')](0x2)+a0_0x256f('0x413');break;case a0_0x256f('0x42b'):_0xa7166e=(0.00054*_0x53999d)['toFixed'](0x2)+a0_0x256f('0x5ff');break;case a0_0x256f('0x41e'):_0xa7166e=(0.3*_0x53999d)[a0_0x256f('0x478')](0x2)+'\x20丈';}return _0xa7166e;}var _0x4995fd=_0x50e9c7[a0_0x256f('0x488')],_0x32f66d=_0x50e9c7[a0_0x256f('0x198')]||a0_0x256f('0xc3'),_0x546c60='',_0x5a07c8=new _0x5d7bdf({'viewer':_0x4995fd,'hasEdit':!0x1,'onChangeDrawing':function(_0x3c23f7){switch(_0x546c60){case a0_0x256f('0x658'):_0x3d1337[a0_0x256f('0x1cc')](_0x3c23f7);break;case'area':_0x34e679['showAddPointLength'](_0x3c23f7);break;case a0_0x256f('0x4fa'):_0x260e99['showAddPointLength'](_0x3c23f7);break;case a0_0x256f('0x49'):_0x13f728[a0_0x256f('0x1cc')](_0x3c23f7);}},'onMoveDrawing':function(_0x52c9a5){switch(_0x546c60){case a0_0x256f('0x658'):_0x3d1337[a0_0x256f('0x496')](_0x52c9a5);break;case a0_0x256f('0x1ec'):_0x34e679[a0_0x256f('0x496')](_0x52c9a5);break;case'height':_0x260e99[a0_0x256f('0x496')](_0x52c9a5);break;case a0_0x256f('0x49'):_0x13f728[a0_0x256f('0x496')](_0x52c9a5);}},'onStopDrawing':function(_0x30c2f6){switch(_0x546c60){case'length':_0x3d1337['showDrawEnd'](_0x30c2f6);break;case a0_0x256f('0x1ec'):_0x34e679[a0_0x256f('0x5ac')](_0x30c2f6);break;case a0_0x256f('0x4fa'):_0x260e99[a0_0x256f('0x5ac')](_0x30c2f6);break;case a0_0x256f('0x49'):_0x13f728[a0_0x256f('0x5ac')](_0x30c2f6);}}}),_0x3d1337={'options':null,'arrLables':[],'totalLable':null,'clearLastNoEnd':function(){if(null!=this[a0_0x256f('0x139')]&&_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x3ec')](this['totalLable']),this['arrLables']&&this[a0_0x256f('0x5ec')][a0_0x256f('0x658')]>0x0){var _0x1ef338=this[a0_0x256f('0x5ec')];if(_0x1ef338&&_0x1ef338[a0_0x256f('0x658')]>0x0)for(var _0x3a965c in _0x1ef338)_0x4995fd[a0_0x256f('0x365')]['remove'](_0x1ef338[_0x3a965c]);}this['totalLable']=null,this[a0_0x256f('0x5ec')]=[];},'start':function(_0x4bda3b){this[a0_0x256f('0x2eb')]=_0x4bda3b,this[a0_0x256f('0x139')]=_0x4995fd['entities'][a0_0x256f('0x53d')]({'label':{'style':_0x2ba48f[a0_0x256f('0x128')][a0_0x256f('0x59d')],'fillColor':_0x2ba48f[a0_0x256f('0x54e')][a0_0x256f('0x3c1')],'verticalOrigin':_0x2ba48f[a0_0x256f('0x1b3')][a0_0x256f('0x125')],'eyeOffset':new _0x2ba48f[(a0_0x256f('0x534'))](0x0,0x0,-0x14),'outlineColor':_0x2ba48f[a0_0x256f('0x54e')]['BLACK'],'outlineWidth':0x3,'font':_0x32f66d,'show':!0x1},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x256f('0x2eb')][a0_0x256f('0x115')],'type':this[a0_0x256f('0x2eb')]['type']}}),this[a0_0x256f('0x5ec')]=[],_0x5a07c8[a0_0x256f('0x35a')]({'type':'polyline','style':{'color':a0_0x256f('0x2cf'),'width':0x3}});},'showAddPointLength':function(_0x42fea8){var _0x360e41=_0x5a07c8[a0_0x256f('0x508')](_0x42fea8),_0xb49aaf=_0x4995fd[a0_0x256f('0x365')]['add']({'position':_0x360e41[_0x360e41[a0_0x256f('0x658')]-0x1],'label':{'style':_0x2ba48f[a0_0x256f('0x128')][a0_0x256f('0x59d')],'fillColor':_0x2ba48f[a0_0x256f('0x54e')][a0_0x256f('0x3c1')],'outlineColor':_0x2ba48f[a0_0x256f('0x54e')][a0_0x256f('0x336')],'outlineWidth':0x3,'verticalOrigin':_0x2ba48f[a0_0x256f('0x1b3')]['BOTTOM'],'eyeOffset':new _0x2ba48f[(a0_0x256f('0x534'))](0x0,0x0,-0x14),'font':_0x32f66d,'show':!0x0},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this['options'][a0_0x256f('0x115')],'type':this['options']['type']}});if(0x1==_0x360e41[a0_0x256f('0x658')])_0xb49aaf['label'][a0_0x256f('0x644')]='起点';else{var _0x1d6b59=this[a0_0x256f('0xc4')](_0x360e41),_0x5a56a5=_0x2eb4d8(_0x1d6b59,this[a0_0x256f('0x2eb')][a0_0x256f('0x115')]);_0xb49aaf['label']['text']=_0x5a56a5,_0xb49aaf[a0_0x256f('0x14a')][a0_0x256f('0x48a')]=_0x1d6b59,this['getLength']([_0x360e41[_0x360e41[a0_0x256f('0x658')]-0x2],_0x360e41[_0x360e41[a0_0x256f('0x658')]-0x1]])<0x5&&(_0xb49aaf['show']=!0x1);}this[a0_0x256f('0x5ec')][a0_0x256f('0x289')](_0xb49aaf);},'showMoveDrawing':function(_0x18219a){var _0x2bc22e=_0x5a07c8['getPositions'](_0x18219a);if(!(_0x2bc22e['length']<0x2)){var _0x17d504=this['getLength'](_0x2bc22e),_0x18da16=_0x2eb4d8(_0x17d504,this[a0_0x256f('0x2eb')][a0_0x256f('0x115')]);this['totalLable'][a0_0x256f('0x13c')]=_0x2bc22e[_0x2bc22e[a0_0x256f('0x658')]-0x1],this[a0_0x256f('0x139')][a0_0x256f('0x3a4')][a0_0x256f('0x644')]=a0_0x256f('0x42c')+_0x18da16,this['totalLable'][a0_0x256f('0x3a4')][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x139')][a0_0x256f('0x14a')][a0_0x256f('0x48a')]=_0x17d504,this[a0_0x256f('0x139')][a0_0x256f('0x14a')][a0_0x256f('0x594')]=a0_0x256f('0x42c'),this[a0_0x256f('0x2eb')][a0_0x256f('0x535')]&&this[a0_0x256f('0x2eb')][a0_0x256f('0x535')](_0x18da16,_0x17d504);}},'showDrawEnd':function(_0x32b5c1){var _0x36a61a=_0x5a07c8[a0_0x256f('0x508')](_0x32b5c1),_0x3835eb=this[a0_0x256f('0x5ec')][a0_0x256f('0x658')]-_0x36a61a[a0_0x256f('0x658')];if(_0x3835eb>=0x0){for(var _0x557183=this[a0_0x256f('0x5ec')][a0_0x256f('0x658')]-0x1;_0x557183>=_0x36a61a[a0_0x256f('0x658')]-0x1;_0x557183--)_0x4995fd[a0_0x256f('0x365')]['remove'](this[a0_0x256f('0x5ec')][_0x557183]);this[a0_0x256f('0x5ec')][a0_0x256f('0x1a8')](_0x36a61a[a0_0x256f('0x658')]-0x1,_0x3835eb+0x1);}_0x32b5c1['_totalLable']=this['totalLable'],_0x32b5c1[a0_0x256f('0x3b7')]=this[a0_0x256f('0x5ec')],this[a0_0x256f('0x139')]=null,this[a0_0x256f('0x5ec')]=[],this[a0_0x256f('0x5d4')](_0x32b5c1);},'updateLengthForTerrain':function(_0x316d80){if(this[a0_0x256f('0x2eb')][a0_0x256f('0x2ef')]&&null!=_0x316d80['polyline']){var _0x6cffe6=this,_0x1a4f81=_0x316d80[a0_0x256f('0x18d')]['positions'][a0_0x256f('0x21b')](),_0x4b9a15=_0x316d80[a0_0x256f('0x3b7')],_0x2208c7=_0x316d80['_totalLable'],_0x3573c8=_0x2208c7&&_0x2208c7[a0_0x256f('0x115')],_0x401d23=0x0,_0x3dbf66=[];!function _0x530a02(){_0x401d23++;var _0x3010bb=[_0x1a4f81[_0x401d23-0x1],_0x1a4f81[_0x401d23]];_0x3c1780[a0_0x256f('0x61f')]({'viewer':_0x4995fd,'positions':_0x3010bb,'calback':function(_0x1a8d74,_0x9aa3b7){if(_0x3dbf66=_0x9aa3b7?0x1==_0x401d23?_0x3dbf66['concat'](_0x3010bb):_0x3dbf66[a0_0x256f('0x318')]([_0x1a4f81[_0x401d23]]):_0x3dbf66['concat'](_0x1a8d74),_0x401d23>=_0x1a4f81[a0_0x256f('0x658')]-0x1){if(_0x316d80[a0_0x256f('0x18d')][a0_0x256f('0x50b')][a0_0x256f('0x171')](_0x3dbf66),_0x2208c7){var _0x4b1bc4=_0x2eb4d8(_0x220e50=_0x6cffe6[a0_0x256f('0xc4')](_0x3dbf66),_0x3573c8);_0x2208c7[a0_0x256f('0x3a4')][a0_0x256f('0x644')]=a0_0x256f('0x42c')+_0x4b1bc4,_0x2208c7[a0_0x256f('0x14a')]['value']=_0x220e50,_0x6cffe6[a0_0x256f('0x2eb')][a0_0x256f('0x535')]&&_0x6cffe6[a0_0x256f('0x2eb')][a0_0x256f('0x535')](_0x4b1bc4,_0x220e50);}}else{_0x4b1bc4=_0x2eb4d8(_0x220e50=_0x6cffe6[a0_0x256f('0xc4')](_0x1a8d74),_0x3573c8);var _0x220e50,_0x40a76f=_0x4b9a15[_0x401d23];_0x40a76f['label'][a0_0x256f('0x644')]=_0x4b1bc4,_0x40a76f['attribute'][a0_0x256f('0x48a')]=_0x220e50,_0x530a02();}}});}();}},'getLength':function(_0x3628eb){for(var _0x139ea7=0x0,_0x3ac6bb=0x0,_0x531cbe=_0x3628eb[a0_0x256f('0x658')]-0x1;_0x3ac6bb<_0x531cbe;_0x3ac6bb++)_0x139ea7+=_0x2ba48f[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x3628eb[_0x3ac6bb],_0x3628eb[_0x3ac6bb+0x1]);return _0x139ea7;}},_0x34e679={'options':null,'totalLable':null,'clearLastNoEnd':function(){null!=this[a0_0x256f('0x139')]&&_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x139')]),this[a0_0x256f('0x139')]=null;},'start':function(_0x37253a){this[a0_0x256f('0x2eb')]=_0x37253a,this[a0_0x256f('0x139')]=_0x4995fd['entities'][a0_0x256f('0x53d')]({'label':{'style':_0x2ba48f[a0_0x256f('0x128')]['FILL_AND_OUTLINE'],'fillColor':_0x2ba48f[a0_0x256f('0x54e')][a0_0x256f('0x3c1')],'outlineColor':_0x2ba48f[a0_0x256f('0x54e')]['BLACK'],'heightReference':_0x2ba48f[a0_0x256f('0x4b3')]['CLAMP_TO_GROUND'],'outlineWidth':0x3,'verticalOrigin':_0x2ba48f[a0_0x256f('0x1b3')][a0_0x256f('0x125')],'eyeOffset':new _0x2ba48f[(a0_0x256f('0x534'))](0x0,0x0,-0x14),'font':_0x32f66d,'show':!0x1},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this['options'][a0_0x256f('0x115')],'type':this[a0_0x256f('0x2eb')][a0_0x256f('0x195')]}}),_0x5a07c8[a0_0x256f('0x35a')]({'type':a0_0x256f('0x493'),'style':{'color':a0_0x256f('0x2cf'),'outline':!0x0,'outlineColor':a0_0x256f('0x2cf'),'outlineWidth':0x4,'opacity':0.4}});},'showAddPointLength':function(_0x4031a7){},'showMoveDrawing':function(_0x4908f8){var _0x18de60=_0x5a07c8[a0_0x256f('0x508')](_0x4908f8);if(!(_0x18de60['length']<0x3)){var _0x1b6755=_0x5427cd[a0_0x256f('0x50e')](_0x4908f8),_0x173a19=turf[a0_0x256f('0x1ec')](_0x1b6755),_0x4ce96d=s(_0x173a19,this['options'][a0_0x256f('0x115')]),_0x124cbf=turf['centerOfMass'](_0x1b6755),_0x3abcdc=_0x3c1780[a0_0x256f('0x4d2')](_0x18de60),_0x537133=_0x2ba48f[a0_0x256f('0x534')][a0_0x256f('0x641')](_0x124cbf[a0_0x256f('0x17b')][a0_0x256f('0x661')][0x0],_0x124cbf['geometry'][a0_0x256f('0x661')][0x1],_0x3abcdc+0x1);this[a0_0x256f('0x139')][a0_0x256f('0x13c')]=_0x537133,this['totalLable']['label'][a0_0x256f('0x644')]=a0_0x256f('0x3e')+_0x4ce96d,this[a0_0x256f('0x139')][a0_0x256f('0x3a4')][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x139')][a0_0x256f('0x14a')][a0_0x256f('0x48a')]=_0x173a19,this[a0_0x256f('0x139')][a0_0x256f('0x14a')][a0_0x256f('0x594')]=a0_0x256f('0x3e'),this[a0_0x256f('0x2eb')][a0_0x256f('0x535')]&&this['options']['calback'](_0x4ce96d,_0x173a19);}},'showDrawEnd':function(_0x25e3bc){if(null!=_0x25e3bc['polygon']){var _0x137046=_0x25e3bc[a0_0x256f('0x493')][a0_0x256f('0x3e3')]['getValue']();$[a0_0x256f('0x278')](_0x137046,function(_0x250588,_0x1bd79e){_0x1bd79e['z']=_0x1bd79e['z']+0x1;}),_0x25e3bc[a0_0x256f('0x60b')]=this[a0_0x256f('0x139')],this[a0_0x256f('0x139')]=null;}}},_0x260e99={'options':null,'totalLable':null,'clearLastNoEnd':function(){null!=this[a0_0x256f('0x139')]&&_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x139')]),this[a0_0x256f('0x139')]=null;},'start':function(_0x2273d1){this[a0_0x256f('0x2eb')]=_0x2273d1,this[a0_0x256f('0x139')]=_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x53d')]({'label':{'style':_0x2ba48f[a0_0x256f('0x128')][a0_0x256f('0x59d')],'fillColor':_0x2ba48f['Color'][a0_0x256f('0x3c1')],'outlineColor':_0x2ba48f[a0_0x256f('0x54e')][a0_0x256f('0x336')],'outlineWidth':0x3,'font':_0x32f66d,'show':!0x1},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x256f('0x2eb')][a0_0x256f('0x115')],'type':this['options']['type']}}),_0x5a07c8['startDraw']({'type':a0_0x256f('0x18d'),'minMaxPoints':{'min':0x2,'max':0x2,'isSuper':!0x1},'style':{'color':a0_0x256f('0x2cf'),'width':0x3}});},'showAddPointLength':function(_0x30713d){},'showMoveDrawing':function(_0x35c756){var _0x3d4b6c=_0x5a07c8[a0_0x256f('0x508')](_0x35c756);if(!(_0x3d4b6c[a0_0x256f('0x658')]<0x2)){var _0x33966b=_0x2ba48f[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x3d4b6c[0x0]),_0x40a9fa=_0x2ba48f['Cartographic'][a0_0x256f('0x296')](_0x3d4b6c[0x1]),_0x53e01f=Math['abs'](_0x40a9fa[a0_0x256f('0x4fa')]-_0x33966b['height']),_0x3c6e35=_0x2eb4d8(_0x53e01f,this[a0_0x256f('0x2eb')]['unit']);this['totalLable'][a0_0x256f('0x13c')]=_0x3c1780[a0_0x256f('0x17a')](_0x3d4b6c[0x0],_0x3d4b6c[0x1]),this[a0_0x256f('0x139')]['label'][a0_0x256f('0x644')]=a0_0x256f('0x173')+_0x3c6e35,this[a0_0x256f('0x139')][a0_0x256f('0x3a4')][a0_0x256f('0x3e9')]=!0x0,this[a0_0x256f('0x139')][a0_0x256f('0x14a')][a0_0x256f('0x48a')]=_0x53e01f,this[a0_0x256f('0x139')][a0_0x256f('0x14a')]['textEx']=a0_0x256f('0x173'),this[a0_0x256f('0x2eb')][a0_0x256f('0x535')]&&this['options'][a0_0x256f('0x535')](_0x3c6e35,_0x53e01f);}},'showDrawEnd':function(_0x536e95){_0x536e95[a0_0x256f('0x60b')]=this[a0_0x256f('0x139')],this[a0_0x256f('0x139')]=null;}},_0x13f728={'options':null,'totalLable':null,'xLable':null,'hLable':null,'clearLastNoEnd':function(){null!=this[a0_0x256f('0x139')]&&_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x139')]),null!=this['xLable']&&_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x3ec')](this[a0_0x256f('0x2d1')]),null!=this[a0_0x256f('0x490')]&&_0x4995fd[a0_0x256f('0x365')]['remove'](this['hLable']),this[a0_0x256f('0x139')]=null,this[a0_0x256f('0x2d1')]=null,this['hLable']=null;},'start':function(_0x2213f5){this['options']=_0x2213f5,this[a0_0x256f('0x139')]=_0x4995fd['entities'][a0_0x256f('0x53d')]({'label':{'style':_0x2ba48f[a0_0x256f('0x128')][a0_0x256f('0x59d')],'fillColor':_0x2ba48f[a0_0x256f('0x54e')][a0_0x256f('0x3c1')],'outlineColor':_0x2ba48f[a0_0x256f('0x54e')][a0_0x256f('0x336')],'outlineWidth':0x3,'font':_0x32f66d,'show':!0x1,'pixelOffset':new _0x2ba48f[(a0_0x256f('0x326'))](-0x28,0x0)},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x256f('0x2eb')][a0_0x256f('0x115')],'type':this['options'][a0_0x256f('0x195')]}}),this['xLable']=_0x4995fd[a0_0x256f('0x365')]['add']({'label':{'style':_0x2ba48f[a0_0x256f('0x128')][a0_0x256f('0x59d')],'fillColor':_0x2ba48f['Color'][a0_0x256f('0x3c1')],'outlineColor':_0x2ba48f[a0_0x256f('0x54e')]['BLACK'],'outlineWidth':0x3,'font':_0x32f66d,'show':!0x1,'pixelOffset':new _0x2ba48f[(a0_0x256f('0x326'))](-0x28,0x0)},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x256f('0x2eb')]['unit'],'type':this[a0_0x256f('0x2eb')][a0_0x256f('0x195')]}}),this[a0_0x256f('0x490')]=_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x53d')]({'label':{'style':_0x2ba48f[a0_0x256f('0x128')][a0_0x256f('0x59d')],'fillColor':_0x2ba48f['Color'][a0_0x256f('0x3c1')],'outlineColor':_0x2ba48f[a0_0x256f('0x54e')][a0_0x256f('0x336')],'outlineWidth':0x3,'font':_0x32f66d,'show':!0x1,'pixelOffset':new _0x2ba48f[(a0_0x256f('0x326'))](-0x28,0x0)},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x256f('0x2eb')][a0_0x256f('0x115')],'type':this[a0_0x256f('0x2eb')]['type']}}),_0x5a07c8[a0_0x256f('0x35a')]({'type':a0_0x256f('0x18d'),'minMaxPoints':{'min':0x2,'max':0x2,'isSuper':!0x0},'style':{'color':a0_0x256f('0x2cf'),'width':0x3}});},'showAddPointLength':function(_0xdbd3a3){var _0x4ef450=_0x5a07c8[a0_0x256f('0x508')](_0xdbd3a3);if(0x4==_0x4ef450[a0_0x256f('0x658')]){var _0x2dc3af=_0x4ef450[0x3][a0_0x256f('0x444')]();_0x4ef450[a0_0x256f('0x1bf')](),_0x4ef450['pop'](),_0x4ef450[a0_0x256f('0x1bf')](),_0x4ef450['push'](_0x2dc3af);}if(0x2==_0x4ef450[a0_0x256f('0x658')]){var _0x626699=_0x3c1780[a0_0x256f('0x4ca')](_0x4ef450[0x0],_0x4ef450[0x1]);_0x3c1780[a0_0x256f('0x242')](_0x4ef450[0x0],_0x4ef450[0x1])>0x3&&(_0x4ef450[a0_0x256f('0x289')](_0x626699),_0x4ef450[a0_0x256f('0x289')](_0x4ef450[0x0]));}this['showSuperHeight'](_0x4ef450);},'showMoveDrawing':function(_0x4385d4){var _0x153808=_0x5a07c8['getPositions'](_0x4385d4);if(0x4==_0x153808['length']){var _0x1cc92b=_0x153808[0x3]['clone']();_0x153808[a0_0x256f('0x1bf')](),_0x153808[a0_0x256f('0x1bf')](),_0x153808['pop'](),_0x153808[a0_0x256f('0x289')](_0x1cc92b);}if(0x2==_0x153808[a0_0x256f('0x658')]){var _0x5e8489=_0x3c1780[a0_0x256f('0x4ca')](_0x153808[0x0],_0x153808[0x1]);_0x3c1780['getHDistance'](_0x153808[0x0],_0x153808[0x1])>0x3&&(_0x153808['push'](_0x5e8489),_0x153808[a0_0x256f('0x289')](_0x153808[0x0]));}this[a0_0x256f('0x187')](_0x153808);},'showDrawEnd':function(_0x16954f){_0x16954f['_arrLables']=[this[a0_0x256f('0x139')],this[a0_0x256f('0x490')],this[a0_0x256f('0x2d1')]],this[a0_0x256f('0x139')]=null,this[a0_0x256f('0x490')]=null,this[a0_0x256f('0x2d1')]=null;},'showSuperHeight':function(_0x47c704){var _0x410702,_0x3cd800,_0x51293e,_0x291049;if(0x4==_0x47c704[a0_0x256f('0x658')]){var _0x456453,_0x2858e9,_0x20f6d0=_0x3c1780[a0_0x256f('0x17a')](_0x47c704[0x0],_0x47c704[0x1]),_0x3ca091=_0x2ba48f[a0_0x256f('0x1db')]['fromCartesian'](_0x47c704[0x0]),_0x30a4b7=_0x2ba48f[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x47c704[0x1]),_0x442476=_0x2ba48f[a0_0x256f('0x1db')][a0_0x256f('0x296')](_0x47c704[0x2]);_0x2858e9=_0x30a4b7[a0_0x256f('0x4fa')]-_0x442476[a0_0x256f('0x4fa')],_0x291049=_0x30a4b7[a0_0x256f('0x4fa')]-_0x3ca091[a0_0x256f('0x4fa')],_0x51293e=_0x2ba48f[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x47c704[0x0],_0x47c704[0x1]),_0x291049>-0x1&&_0x291049<0x1?(_0x63f7c0=_0x47c704[0x1],this[a0_0x256f('0xb0')](this[a0_0x256f('0x139')],_0x63f7c0,a0_0x256f('0x4f0'),_0x291049),this[a0_0x256f('0xb0')](this['hLable'],_0x20f6d0,'长度',_0x51293e)):(_0x2858e9>-0.1&&_0x2858e9<0.1?(_0x456453=_0x3c1780[a0_0x256f('0x17a')](_0x47c704[0x2],_0x47c704[0x1]),_0x63f7c0=_0x3c1780[a0_0x256f('0x17a')](_0x47c704[0x2],_0x47c704[0x3]),_0x3cd800=_0x2ba48f[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x47c704[0x1],_0x47c704[0x2]),_0x410702=_0x2ba48f['Cartesian3']['distance'](_0x47c704[0x3],_0x47c704[0x2])):(_0x63f7c0=_0x3c1780[a0_0x256f('0x17a')](_0x47c704[0x2],_0x47c704[0x1]),_0x456453=_0x3c1780[a0_0x256f('0x17a')](_0x47c704[0x2],_0x47c704[0x3]),_0x3cd800=_0x2ba48f[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x47c704[0x3],_0x47c704[0x2]),_0x410702=_0x2ba48f[a0_0x256f('0x534')][a0_0x256f('0x177')](_0x47c704[0x1],_0x47c704[0x2])),this[a0_0x256f('0xb0')](this[a0_0x256f('0x139')],_0x63f7c0,a0_0x256f('0x4f0'),_0x410702),this[a0_0x256f('0xb0')](this[a0_0x256f('0x2d1')],_0x456453,a0_0x256f('0xd7'),_0x3cd800),this['updateSuperHeightLabel'](this['hLable'],_0x20f6d0,'长度',_0x51293e));}else{if(0x2==_0x47c704[a0_0x256f('0x658')]){_0x410702=_0x2ba48f[a0_0x256f('0x534')]['distance'](_0x47c704[0x1],_0x47c704[0x0]);var _0x63f7c0=_0x3c1780[a0_0x256f('0x17a')](_0x47c704[0x0],_0x47c704[0x1]);xLable['label'][a0_0x256f('0x3e9')]&&(xLable[a0_0x256f('0x3a4')]['show']=!0x1,hLable[a0_0x256f('0x3a4')]['show']=!0x1),this[a0_0x256f('0xb0')](this[a0_0x256f('0x139')],_0x63f7c0,a0_0x256f('0x4f0'),_0x410702);}}var _0x34e5b5=_0x2eb4d8(_0x410702,this[a0_0x256f('0x2eb')][a0_0x256f('0x115')]);this[a0_0x256f('0x2eb')][a0_0x256f('0x535')]&&this[a0_0x256f('0x2eb')]['calback'](_0x34e5b5,_0x410702);},'updateSuperHeightLabel':function(_0x1b3b3d,_0x1cbe63,_0x3b53f8,_0x388412){null!=_0x1b3b3d&&(_0x1b3b3d[a0_0x256f('0x13c')]=_0x1cbe63,_0x1b3b3d[a0_0x256f('0x3a4')][a0_0x256f('0x644')]=_0x3b53f8+':'+_0x2eb4d8(_0x388412,this[a0_0x256f('0x2eb')]['unit']),_0x1b3b3d[a0_0x256f('0x3a4')][a0_0x256f('0x3e9')]=!0x0,_0x1b3b3d[a0_0x256f('0x14a')][a0_0x256f('0x48a')]=_0x388412,_0x1b3b3d[a0_0x256f('0x14a')][a0_0x256f('0x594')]=_0x3b53f8+':');}};return{'measuerLength':function(_0x92f206){_0x5579d4(),_0x546c60=a0_0x256f('0x658'),(_0x92f206=_0x92f206||{})[a0_0x256f('0x195')]=_0x546c60,_0x92f206[a0_0x256f('0x592')](a0_0x256f('0x2ef'))||(_0x92f206['terrain']=!0x0),_0x3d1337[a0_0x256f('0x8c')](_0x92f206);},'measureHeight':function(_0x2b3c9f){_0x5579d4(),(_0x2b3c9f=_0x2b3c9f||{})['hasOwnProperty'](a0_0x256f('0x3c'))&&!_0x2b3c9f[a0_0x256f('0x3c')]?(_0x546c60=a0_0x256f('0x4fa'),_0x2b3c9f[a0_0x256f('0x195')]=_0x546c60,_0x260e99[a0_0x256f('0x8c')](_0x2b3c9f)):(_0x546c60=a0_0x256f('0x49'),_0x2b3c9f[a0_0x256f('0x195')]=_0x546c60,_0x13f728[a0_0x256f('0x8c')](_0x2b3c9f));},'measureArea':function(_0xff6fb){_0x5579d4(),_0x546c60='area',(_0xff6fb=_0xff6fb||{})[a0_0x256f('0x195')]=_0x546c60,_0x34e679[a0_0x256f('0x8c')](_0xff6fb);},'updateUnit':function(_0x926295,_0x238618){var _0x2dea55=_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x5b')];for(var _0x55ae41 in _0x2dea55){var _0x593e0b=_0x2dea55[_0x55ae41];if(_0x593e0b['label']&&_0x593e0b['isMarsMeasureLabel']&&_0x593e0b[a0_0x256f('0x14a')]&&_0x593e0b[a0_0x256f('0x14a')]['value']){if(_0x593e0b['attribute'][a0_0x256f('0x195')]!=_0x926295)continue;a0_0x256f('0x1ec')==_0x926295?_0x593e0b[a0_0x256f('0x3a4')][a0_0x256f('0x644')]['_value']=(_0x593e0b['attribute'][a0_0x256f('0x594')]||'')+s(_0x593e0b['attribute']['value'],_0x238618):_0x593e0b['_label'][a0_0x256f('0x644')]['_value']=(_0x593e0b[a0_0x256f('0x14a')][a0_0x256f('0x594')]||'')+l(_0x593e0b[a0_0x256f('0x14a')][a0_0x256f('0x48a')],_0x238618);}}},'clearMeasure':function(){_0x546c60='',_0x5579d4();for(var _0x2108c2=_0x5a07c8[a0_0x256f('0x422')](),_0x1caa23=0x0;_0x1caa23<_0x2108c2['length'];_0x1caa23++){if((_0x262a2c=_0x2108c2[_0x1caa23])[a0_0x256f('0x60b')]&&(_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x3ec')](_0x262a2c[a0_0x256f('0x60b')]),delete _0x262a2c[a0_0x256f('0x60b')]),_0x262a2c[a0_0x256f('0x3b7')]){var _0xb1cb0c=_0x262a2c[a0_0x256f('0x3b7')];if(_0xb1cb0c&&_0xb1cb0c[a0_0x256f('0x658')]>0x0)for(var _0x1caa23 in _0xb1cb0c)_0x4995fd[a0_0x256f('0x365')]['remove'](_0xb1cb0c[_0x1caa23]);delete _0x262a2c[a0_0x256f('0x3b7')];}}_0x2108c2=[];var _0x1a9bcf=_0x4995fd[a0_0x256f('0x365')][a0_0x256f('0x5b')];for(var _0x1caa23 in _0x1a9bcf){(_0x262a2c=_0x1a9bcf[_0x1caa23])['label']&&_0x262a2c[a0_0x256f('0x4cd')]&&_0x2108c2[a0_0x256f('0x289')](_0x262a2c);}for(_0x1caa23=0x0;_0x1caa23<_0x2108c2[a0_0x256f('0x658')];_0x1caa23++){var _0x262a2c=_0x2108c2[_0x1caa23];_0x4995fd[a0_0x256f('0x365')]['remove'](_0x262a2c);}_0x5a07c8['deleteAll']();},'formatArea':function(_0x19f3bb,_0x191914){if(null==_0x19f3bb)return'';null!=_0x191914&&a0_0x256f('0xaa')!=_0x191914||(_0x191914=_0x19f3bb<0xf4240?'m':'km');var _0x2bf82d='';switch(_0x191914){default:case'm':_0x2bf82d=_0x19f3bb['toFixed'](0x2)+a0_0x256f('0x3c9');break;case'km':_0x2bf82d=(_0x19f3bb/0xf4240)[a0_0x256f('0x478')](0x2)+a0_0x256f('0x2f7');break;case'mu':_0x2bf82d=(0.0015*_0x19f3bb)[a0_0x256f('0x478')](0x2)+'\x20亩';break;case'ha':_0x2bf82d=(0.0001*_0x19f3bb)[a0_0x256f('0x478')](0x2)+a0_0x256f('0x620');}return _0x2bf82d;},'formatLength':_0x2eb4d8};}};DC[a0_0x256f('0x2e6')](_0x17c77b);}]);});
var a0_0x1aa9=['play','不超过1分钟','向下滚动加载更多','PolylineTrail','defaultValueField','lastChild','_config','registerAction','DefaultImageId','before','toGeoJSON','parentElement','compass_rotation_marker','custom_label','isEmptyObject','parseFromString','_bid','morpheus-bubble-popup','\x20<span\x20title=\x22语音播报\x22>\x20\x20<svg\x20t=\x221583561695846\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20\x20\x20\x20p-id=\x221126\x22\x20width=\x2216\x22\x20height=\x2216\x22>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M513.82044445\x20964.38044445c-8.192\x200-15.47377778-2.73066667-21.84533334-8.192\x200\x200-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555\x200-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555\x2011.83288889-27.30666667\x2026.39644444-27.30666666H246.21511111c7.28177778-2.73066667\x2037.31911111-15.47377778\x20137.44355556-91.02222222\x2058.25422222-43.69066667\x20111.04711111-86.47111111\x20111.04711111-86.47111112\x205.46133333-4.55111111\x2012.74311111-7.28177778\x2020.02488889-7.28177778\x204.55111111\x200\x2010.01244445\x200.91022222\x2014.56355555\x203.6408889\x2010.92266667\x205.46133333\x2018.20444445\x2017.29422222\x2018.20444445\x2030.03733333v837.40444444c0\x2012.74311111-7.28177778\x2025.48622222-19.11466667\x2030.94755556-5.46133333\x201.82044445-10.01244445\x202.73066667-14.56355555\x202.73066667zM270.79111111\x20724.992c19.11466667\x200\x2048.24177778\x208.192\x20167.48088889\x20106.496\x2016.384\x2013.65333333\x2033.67822222\x2028.21688889\x2051.88266667\x2043.69066667l5.46133333\x204.55111111V139.71911111l-5.46133333\x203.64088889c-22.75555555\x2017.29422222-44.60088889\x2034.58844445-65.536\x2050.06222222C293.54666667\x20291.72622222\x20264.41955555\x20299.008\x20245.30488889\x20299.008H82.37511111c-20.02488889\x200-21.84533333\x2012.74311111-21.84533333\x2026.39644445V694.04444445c0\x2023.66577778\x206.37155555\x2030.03733333\x2028.21688889\x2030.03733333h180.224l1.82044444\x200.91022222z\x20m520.64711111\x20162.01955555c-14.56355555\x200-26.39644445-11.83288889-26.39644444-27.30666666\x200-11.83288889\x208.192-20.02488889\x2016.384-24.576\x20112.86755555-67.35644445\x20182.04444445-191.14666667\x20182.04444444-324.03911111\x200-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576\x200-14.56355555\x2011.83288889-27.30666667\x2026.39644445-27.30666667\x205.46133333\x200\x2010.01244445\x201.82044445\x2016.384\x205.46133333\x20128.34133333\x2076.45866667\x20207.53066667\x20218.45333333\x20207.53066666\x20369.55022222\x200\x20152.00711111-80.09955555\x20293.09155555-208.44088889\x20369.55022223-6.37155555\x205.46133333-10.92266667\x207.28177778-16.384\x207.28177777z\x20m-90.112-152.91733333c-14.56355555\x200-26.39644445-11.83288889-26.39644444-27.30666667\x200-10.01244445\x204.55111111-18.20444445\x2012.74311111-23.66577777\x2061.89511111-34.58844445\x20100.12444445-100.12444445\x20100.12444444-171.12177778\x200-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778\x200-14.56355555\x2011.83288889-27.30666667\x2026.39644444-27.30666667\x204.55111111\x200\x2011.83288889\x202.73066667\x2015.47377778\x204.55111111\x2074.63822222\x2044.60088889\x20121.96977778\x20127.43111111\x20121.96977778\x20215.72266667\x200\x2090.112-48.24177778\x20173.85244445-125.61066667\x20218.45333333-1.82044445\x200-9.10222222\x204.55111111-15.47377778\x204.55111111z\x22\x20\x20\x20\x20\x20\x20fill=\x22#ffffff\x22\x20p-id=\x221127\x22></path>\x20\x20</svg></span><span>语音播报</span>','fromRotationTranslation','INITIALIZED','capturePicture','ajaxPrefilter','createVideoWindowAll','_layerEvent','disable','div_icon','tileHeight\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','wmts','getEffectType','closeSound','error','preRender','mouseup','isMid','/ezopen/h5/iframe','isSimulated','setDataMin','_duration','jquery','\x20to\x20','flat','handler','cellSpacing','Invalid\x20XML:\x20','svg-path','removeLayer','https://www.dvgis.cn','val','TAILED_ATTACK_ARROW','valueField','stopEditing','enableInputs','plugin','_width','_mouseMoveHandler','_plotEvent','noModule','_topRadius','_image','baseWaterColor','createDrawWallHandler','ATTACK_ARROW','Billboard','odd','cssText','PolylineGlowMaterialProperty','dequeue','_viewMode','anim','Transform','发送失败,请稍后再试','insertBefore','getById','_type','prototype','enableTranslate','clientY','capturePictureModule','exitFullscreen','\x20\x0a请确认json文件格式正确!!!','specified','readyPromise','_removedHook','_cache','minWidth','uniform\x20vec4\x20color;\x0d\x0auniform\x20float\x20speed;\x0d\x0auniform\x20float\x20count;\x0d\x0auniform\x20float\x20gradient;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x0d\x0a{\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20material.diffuse\x20=\x201.5\x20*\x20color.rgb;\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20vec3\x20str\x20=\x20materialInput.str;\x0d\x0a\x20\x20float\x20dis\x20=\x20distance(st,\x20vec2(0.5,\x200.5));\x0d\x0a\x20\x20float\x20per\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0\x20);\x0d\x0a\x20\x20if(abs(str.z)>0.001){\x0d\x0a\x20\x20\x20\x20discard;\x0d\x0a\x20\x20}\x0d\x0a\x20\x20if(dis\x20>0.5){\x0d\x0a\x20\x20\x20\x20discard;\x0d\x0a\x20\x20}else\x20{\x0d\x0a\x20\x20\x20\x20float\x20perDis\x20=\x200.5\x20/\x20count;\x0d\x0a\x20\x20\x20\x20float\x20disNum;\x0d\x0a\x20\x20\x20\x20float\x20bl\x20=\x20.0;\x0d\x0a\x20\x20\x20\x20for(int\x20i=0;i<=10;i++){\x0d\x0a\x20\x20\x20\x20\x20\x20if(float(i)<=count){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20disNum\x20=\x20perDis*float(i)\x20-\x20dis\x20+\x20per/count;\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(disNum>0.0){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(disNum<perDis){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bl\x20=\x201.0-disNum/perDis;\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}else\x20if(disNum-perDis<perDis){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bl\x20=\x201.0\x20-\x20abs(1.0-disNum/perDis);\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20material.alpha\x20=\x20pow(bl,gradient);\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20\x20\x20}\x0d\x0a\x20\x20}\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a\x0d\x0a','_this.opt','getCenter','_init','documentElement','pow','PolylineFlowMaterialProperty','fire','tileWidth\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','createVRTerrain','rel','icon','verticalCtrl','stopDrawing','WMTS','fileUrl','uniform\x20vec4\x20lightColor;\x0d\x0auniform\x20vec4\x20darkColor;\x0d\x0auniform\x20float\x20frequency;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec3\x20scaled\x20=\x20materialInput.str\x20*\x20frequency;\x0d\x0a\x20\x20float\x20t\x20=\x20abs(czm_snoise(scaled));\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(lightColor,\x20darkColor,\x20t);\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','_semiMajorAxis','REMOVE','LEFT_DOUBLE_CLICK','classList','speak\x20off\x20hide','[id~=','czm_cellular','eachOverlay','getValue','(?:\x5c\x5c[\x5cda-fA-F]{1,6}','createLinearGradient','mousemove','object','imageryProviderViewModels','ZERO','silhouette','_mouseUpHandle','overflow','echarts','onChangeDrawing','https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347','bottomRadius','map','RoamingController:\x20the\x20time\x20range\x20invalid\x20','_outRing','rowSpan','_bindEvent','autoResize','sqrt','_store','PostProcessStageLibrary','onerror','tweens','namespaceURI','changeTerrain','zeroToTwoPi','map-item','\x20data-url=','minOpacity','broadcast\x20off','POLYGON','canvas2d','inline-block','width','polylineVolume','_getMouseInfo','_addItem','_radius','Asphalt','_bounds','draggerHandler','success','tilingScheme','_url','dataset','chart','DcCore','_prepareDefaultMenu','lonLatToCartesian','semiMajorAxis','pathWidth','createDrawPolygonHandler','tts://','clearTimeout','TDT','text/html','tailed_attack_arrow','_getInternalData','onclick','_graphics','create','Quaternion','eachComponent','fieldset','_delegate','extentRadii','memory','addOverlay','xmin','contextMenu','PolylineFlowType','http://t{s}.tianditu.gov.cn/{layer}_c/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={TileMatrix}&layer={layer}&style={style}&tilerow={TileRow}&tilecol={TileCol}&tilematrixset={TileMatrixSet}&format=tiles&tk={key}','fadeFactor','_setCanvasOption','setPosition','Plane','hLable','URL','htmlFor','单击选择点位,右击结束','get','customClass','_initContainer','DISABLED','fromEntity','startEditing','setup','Reflection','animate','random','(\x5c.|$)','\x20was\x20not\x20called','POST','_fogByDistance','access','old','createTwoPointsModelHandler','px,','<script>','reSize','&autoplay=','Set','northwest','WebMercatorProjection','specularIntensity','_start','fromRadians','PolylineDashMaterialProperty','addLayerGroup','pointerover','0\x200\x20','ready','getClass','cache','_semiMinorAxis','parsePolygonCoordToArray','ms-','_max','transform','setView','?|\x5c\x5c[^\x5cr\x5cn\x5cf]|[\x5cw-]|[^-\x5cx7f])+','notifyWith','vertical-align:\x20top;','_xField','_initEntity','_roamingEvent','mozCancelFullScreen','perPositionHeight','snow','brickColor','pick','_handleDoubleClick','layer','getViewRect','css','https://open.ys7.com/api/lapp/voice/send','scrollTo','GeoJsonLayer:the\x20url\x20invalid','compass','pageSize','exports','_clock','scroll','fromCssColorString','stack','margin','With','onreadystatechange','_positions','00:','_activePath','parent','globalEval','POINT','selectHandler','crossDomain','dc-compass','createUrlTerrain','pointerout','closeZoom','parentWindow','dc-popup\x20','formatNum','hasOwnProperty','font_style','finish','attachEvent','getOwnPropertySymbols','_rotateFrame','result','getCoordinates','rtcgw','transformWGS84ArrayToCartesianArray','token','createMediaStreamSource','PolylineTrailMaterialProperty','createEllipsoidTerrain','handleSuccess','ifModified','computeMidPosition','Color','{time}','SingleTileImageryProvider','ADDED','processData','resolve','createSvg','_orbitMouseMoveFunction','getComputedStyle','html','setPrototypeOf','_glowOnly','checkbox','transformCartesianToWGS84','google','uniqueID','ellipse','toArray','PI_OVER_TWO','MultiPoint','CAMERA_MOVE_END','parabola','coordinates','editor','__className__','menu-list','getLayerType','getQBSplinePoints','3.5.1','.hd','*(?:value|','sub','IDENTITY','Cartesian4','rotation','jsonpCallback','_camera','abort','dimensions','getIntersectPoint','getLeftMostControlPoint','onDrag','_speed','moveHandler','getCurvePoints','overflowY','block','noBubble','getPositions','viewBox','menu-items','inprogress','_overlayEvent','getDraggersPositions','selectedTerrain','rotateRight','_renderBoundaries','_setView','size','getAttribute','jQuery','_tileVisibleHandler','getPropertyValue','getExtent','_setSceneOption','glowOnly','outerHTML','split','locationBar','hasChildNodes','fromDegreesArrayHeights','_mouseWheelHandler','HTML','features','activeElement','addMaterial','nodeValue','allow','geojson','initDraggers','false','htmlPrefilter','<span\x20title=\x22结束录像\x22>\x20<svg\x20id=\x22stopSave\x22\x20t=\x221578882716693\x22\x20class=\x22icon\x20hide\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20\x20\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20p-id=\x223782\x22\x20width=\x2224\x22\x20height=\x2224\x22>\x20\x20\x20<path\x20\x20\x20\x20\x20d=\x22M915.2\x20729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6\x2019.2-38.4\x2044.8-51.2l128-76.8c25.6-12.8\x2044.8\x200\x2044.8\x2019.2V704c0\x2032-19.2\x2038.4-44.8\x2025.6z\x20m-332.8\x2089.6H96c-51.2\x200-89.6-38.4-89.6-89.6V332.8c0-51.2\x2038.4-89.6\x2089.6-89.6h486.4c51.2\x200\x2089.6\x2038.4\x2089.6\x2089.6v396.8c0\x2051.2-38.4\x2089.6-89.6\x2089.6zM192\x20364.8c-32\x206.4-57.6\x2032-64\x2064-12.8\x2057.6\x2038.4\x20115.2\x2096\x20102.4\x2032-6.4\x2057.6-32\x2064-70.4\x2012.8-57.6-38.4-108.8-96-96z\x20m0\x200\x22\x20\x20\x20\x20\x20p-id=\x223783\x22\x20fill=\x22red\x22></path>\x20</svg>\x20</span>','_orbitTickFunction','<div\x20class=\x22pop-hover\x22>\x20\x20<div\x20class=\x22pop-hover-content\x22>\x20\x20\x20\x20<div\x20class=\x22vioce-list\x22\x20id=\x22voice-list\x22>\x20\x20\x20\x20\x20\x20<ul\x20class=\x22voice-list-ul\x22>\x20\x20\x20\x20\x20\x20</ul>\x20\x20\x20\x20\x20\x20<div\x20id=\x22voice-list-end\x22></div>\x20\x20\x20\x20</div>\x20\x20\x20\x20<div\x20id=\x22voice-custom\x22\x20style=\x22text-align:\x20center;\x22>自定义语音</div>\x20\x20</div></div><span\x20title=\x22语音播报\x22>\x20\x20<svg\x20t=\x221583561695846\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20\x20\x20\x20p-id=\x221126\x22\x20width=\x2216\x22\x20height=\x2216\x22>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M513.82044445\x20964.38044445c-8.192\x200-15.47377778-2.73066667-21.84533334-8.192\x200\x200-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555\x200-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555\x2011.83288889-27.30666667\x2026.39644444-27.30666666H246.21511111c7.28177778-2.73066667\x2037.31911111-15.47377778\x20137.44355556-91.02222222\x2058.25422222-43.69066667\x20111.04711111-86.47111111\x20111.04711111-86.47111112\x205.46133333-4.55111111\x2012.74311111-7.28177778\x2020.02488889-7.28177778\x204.55111111\x200\x2010.01244445\x200.91022222\x2014.56355555\x203.6408889\x2010.92266667\x205.46133333\x2018.20444445\x2017.29422222\x2018.20444445\x2030.03733333v837.40444444c0\x2012.74311111-7.28177778\x2025.48622222-19.11466667\x2030.94755556-5.46133333\x201.82044445-10.01244445\x202.73066667-14.56355555\x202.73066667zM270.79111111\x20724.992c19.11466667\x200\x2048.24177778\x208.192\x20167.48088889\x20106.496\x2016.384\x2013.65333333\x2033.67822222\x2028.21688889\x2051.88266667\x2043.69066667l5.46133333\x204.55111111V139.71911111l-5.46133333\x203.64088889c-22.75555555\x2017.29422222-44.60088889\x2034.58844445-65.536\x2050.06222222C293.54666667\x20291.72622222\x20264.41955555\x20299.008\x20245.30488889\x20299.008H82.37511111c-20.02488889\x200-21.84533333\x2012.74311111-21.84533333\x2026.39644445V694.04444445c0\x2023.66577778\x206.37155555\x2030.03733333\x2028.21688889\x2030.03733333h180.224l1.82044444\x200.91022222z\x20m520.64711111\x20162.01955555c-14.56355555\x200-26.39644445-11.83288889-26.39644444-27.30666666\x200-11.83288889\x208.192-20.02488889\x2016.384-24.576\x20112.86755555-67.35644445\x20182.04444445-191.14666667\x20182.04444444-324.03911111\x200-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576\x200-14.56355555\x2011.83288889-27.30666667\x2026.39644445-27.30666667\x205.46133333\x200\x2010.01244445\x201.82044445\x2016.384\x205.46133333\x20128.34133333\x2076.45866667\x20207.53066667\x20218.45333333\x20207.53066666\x20369.55022222\x200\x20152.00711111-80.09955555\x20293.09155555-208.44088889\x20369.55022223-6.37155555\x205.46133333-10.92266667\x207.28177778-16.384\x207.28177777z\x20m-90.112-152.91733333c-14.56355555\x200-26.39644445-11.83288889-26.39644444-27.30666667\x200-10.01244445\x204.55111111-18.20444445\x2012.74311111-23.66577777\x2061.89511111-34.58844445\x20100.12444445-100.12444445\x20100.12444444-171.12177778\x200-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778\x200-14.56355555\x2011.83288889-27.30666667\x2026.39644444-27.30666667\x204.55111111\x200\x2011.83288889\x202.73066667\x2015.47377778\x204.55111111\x2074.63822222\x2044.60088889\x20121.96977778\x20127.43111111\x20121.96977778\x20215.72266667\x200\x2090.112-48.24177778\x20173.85244445-125.61066667\x20218.45333333-1.82044445\x200-9.10222222\x204.55111111-15.47377778\x204.55111111z\x22\x20\x20\x20\x20\x20\x20fill=\x22#ff0000\x22\x20p-id=\x221127\x22></path>\x20\x20</svg></span><span>语音播报</span>','support','PolylineTrailType','defaultRadius','makeArray','position:absolute;left:-11111px','readyException','material','setFilters','MORPHING','enableRotate','SampledPositionProperty','UNIT_Z','headingPitchRollQuaternion','ptp-talk\x20on\x20hide','warn','cssProps','defineProperty','single_tile','global','removeProp','data.data','RoamingController:\x20the\x20time\x20invalid\x20','uniform\x20vec4\x20asphaltColor;\x0d\x0auniform\x20float\x20bumpSize;\x0d\x0auniform\x20float\x20roughness;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20//\x20From\x20Stefan\x20Gustavson\x27s\x20Procedural\x20Textures\x20in\x20GLSL\x20in\x20OpenGL\x20Insights\x0d\x0a\x20\x20//Main\x20cellular\x20pattern\x0d\x0a\x20\x20vec4\x20color\x20=\x20asphaltColor;\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20vec2\x20F\x20=\x20czm_cellular(st\x20/\x20bumpSize);\x0d\x0a\x20\x20color.rgb\x20-=\x20(F.x\x20/\x20F.y)\x20*\x200.1;\x0d\x0a\x0d\x0a\x20\x20//Extra\x20bumps\x20for\x20roughness\x0d\x0a\x20\x20float\x20noise\x20=\x20czm_snoise(st\x20/\x20bumpSize);\x0d\x0a\x20\x20noise\x20=\x20pow(noise,\x205.0)\x20*\x20roughness;\x0d\x0a\x20\x20color.rgb\x20+=\x20noise;\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','border','_materialCache','heightDraggers','checkOn','removeInputAction','YELLOW','_token','_chart','_widthSubscription','_createHierarchy','Callbacks','overlayId','image','<div\x20style=\x22width:\x20100%;height:\x20100%\x22><div\x20class=\x22divForms\x20divForms-theme\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22divForms-wrap\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22area\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22arrow-lt\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-t\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-r\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-b\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-l\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22arrow-rb\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22label-wrap\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22title\x22>','stopSpeak','getValueOrClonedDefault','getLayer','layerGroupEvent','center','_setViewerOption','<div\x20class=\x27leaflet-popup\x27><div\x20class=\x27leaflet-popup-content-wrapper\x27><div\x20class=\x27leaflet-popup-content\x27\x20id=','lookAtTransform','wall','nth','CLASS','_compassRectangle','plot-overlay-layer','startPosition','security','fill','webkitURL','_useGradientOpacity','alpha','setPositions','edit','stopTalk','_rimColor','parseXML','voice-list-ul','parsererror','prop','_contrast','selected','props','getOwnPropertyDescriptor','Cartesian2','_viewerOption','^(?:([+-])=|)(','startPositionPopUp','tick','end','lng','extendComponentModel',',.*:','*([*^$|!~]?=)','heat-map','getOverlay','_templates','equals','LinearApproximation','custom_billboard','_baseLayers','ellipsoid','BoundingSphere','enumerable','windowPosition','autoplay','xField','dash','preventDefault','optSelected','uniform\x20vec4\x20color;\x0d\x0auniform\x20float\x20speed;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20\x20\x20float\x20t\x20=fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0d\x0a\x20\x20\x20\x20t\x20*=\x201.03;\x0d\x0a\x20\x20\x20\x20float\x20alpha\x20=\x20smoothstep(t-\x200.03,\x20t,\x20st.s)\x20*\x20step(-t,\x20-st.s);\x0d\x0a\x20\x20\x20\x20alpha\x20+=\x200.1;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20alpha;\x0d\x0a\x20\x20\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','PRE_UPDATE','unbindEvent','construct','https://open.ys7.com/api/lapp/device/ptz/start','effectEvent','CAMERA_CHANGED','_updateAngleAndOpacity','innerHTML','application/x-www-form-urlencoded','ajaxSetup','setOptions','defaultMaxOpacity','unit','_layerCache','FeatureCollection','rad);\x0a\x20\x20\x20\x20\x20\x20-webkit-transform\x20:\x20rotate(-','deleteAll','destroyEditHandler','keys','mapSplit','multiplier','south','box','uniforms','\x20米</span>','clampToGround','popupEvent','attribute','<textarea>x</textarea>','xhr','addBaseLayer','emit','href','remove','GatheringPlace','showPath','getData','context','getElementsByTagName','sourceIndex','PolylineFlow','talkLink','minimumLevel','radi','background_color','setProperty','ajaxComplete','#ffff00','onmouseover','createCoordImageryLayer','onmousedown','_viewOption','margin-right:5px;','availability','drawingBufferHeight','createDrawPolylineHandler','accepts','(^|\x5c.)','_evalUrl','beforeSend','silhouetteColor','radio','ImageMaterialProperty','isReady','getBezierPoints','Billboard:\x20the\x20size\x20invalid','INSTALLED','baseColor','Transforms','_startRotate','resolveWith','_effectEvent','dataSources','_fire','bold\x20','contains','interpolateUsingFraction','special','_blendColor','fromPoints','_rotateInitialCursorAngle','ajaxStop','mozMatchesSelector','xml:lang','api','iframe','[name=d]','speeds','数字视觉','<div>','_gyro','getAllResponseHeaders','elem','model','POST_UPDATE','flyTo',':checked','minimumLevel\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','featuresLength','Last-Modified','setBottomCircle','updateDraggers','AMAP','createComment','<span\x20title=\x22开始录像\x22>\x20\x20<svg\x20id=\x22startSave\x22\x20t=\x221578882716693\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20\x20\x20\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20p-id=\x223782\x22\x20width=\x2224\x22\x20height=\x2224\x22>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M915.2\x20729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6\x2019.2-38.4\x2044.8-51.2l128-76.8c25.6-12.8\x2044.8\x200\x2044.8\x2019.2V704c0\x2032-19.2\x2038.4-44.8\x2025.6z\x20m-332.8\x2089.6H96c-51.2\x200-89.6-38.4-89.6-89.6V332.8c0-51.2\x2038.4-89.6\x2089.6-89.6h486.4c51.2\x200\x2089.6\x2038.4\x2089.6\x2089.6v396.8c0\x2051.2-38.4\x2089.6-89.6\x2089.6zM192\x20364.8c-32\x206.4-57.6\x2032-64\x2064-12.8\x2057.6\x2038.4\x20115.2\x2096\x20102.4\x2032-6.4\x2057.6-32\x2064-70.4\x2012.8-57.6-38.4-108.8-96-96z\x20m0\x200\x22\x20\x20\x20\x20\x20\x20p-id=\x223783\x22\x20fill=\x22#ffffff\x22></path>\x20\x20</svg></span>','firstElementChild','raiseEvent','水平距离','ScreenSpaceEventType','true','_queueHooks','stopSave','_layer','sin','_heat','font_size','img','json','init','9px','EZUIKitPlayer-','scrollTop','multiply','_setWrapperStyle','\x0a\x20\x20\x20\x20\x20\x20<span>经度:','dc-location-bar','extrudedHeight','_blur','changeEditing','unload','rgb','ttsUrl','repeat','http://webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}','morphToColumbusView','Deferred','fromQuaternion','getFactorial','_enable','_yField','FacetType','floor','ezuikit-open-sound','<table>','https://open.ys7.com','Accept','*,:x','div-icon','tileset','cursor','^\x5c.(','easing','_repeatSubscription','trackedEntity','setDataMax','modelMatrix','abs','ajaxSettings','wav_file',':not(','enableZoom','|$)','rgb(255,0,0)','ErosionType','defined','[msallowcapture^=\x27\x27]','CHILD','fromTranslation','totalLable','#FFFF00','far','headerContainer','relative','transformWGS84ToMercator','pointer','_onExtremaChange','px;\x0a\x20\x20\x20\x20margin:0;\x0a\x20\x20\x20\x20display:none','parse','说话时间过短','join','PolylineEmissionType','now','面积:','restore','_rotate','closePath','position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0','setStyle','_setInputAction','&templete=0','template','getEditor','outlineWidth','timeStamp','_properties','ProviderViewModel','compile','towardsTheLeft','standard','semiMinorAxis','uniform\x20sampler2D\x20colorTexture;\x0d\x0auniform\x20sampler2D\x20depthTexture;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0auniform\x20vec4\x20u_scanCenterEC;\x0d\x0auniform\x20vec3\x20u_scanPlaneNormalEC;\x0d\x0auniform\x20vec3\x20u_scanLineNormalEC;\x0d\x0auniform\x20float\x20u_radius;\x0d\x0auniform\x20vec4\x20u_scanColor;\x0d\x0a\x0d\x0avec4\x20toEye(in\x20vec2\x20uv,\x20in\x20float\x20depth){\x0d\x0a\x20\x20vec2\x20xy\x20=\x20vec2((uv.x\x20*\x202.0\x20-\x201.0),(uv.y\x20*\x202.0\x20-\x201.0));\x0d\x0a\x20\x20vec4\x20posInCamera\x20=czm_inverseProjection\x20*\x20vec4(xy,\x20depth,\x201.0);\x0d\x0a\x20\x20posInCamera\x20=posInCamera\x20/\x20posInCamera.w;\x0d\x0a\x20\x20return\x20posInCamera;\x0d\x0a}\x0d\x0a\x0d\x0abool\x20isPointOnLineRight(in\x20vec3\x20ptOnLine,\x20in\x20vec3\x20lineNormal,\x20in\x20vec3\x20testPt){\x0d\x0a\x20\x20vec3\x20v01\x20=\x20testPt\x20-\x20ptOnLine;\x0d\x0a\x20\x20normalize(v01);\x0d\x0a\x20\x20vec3\x20temp\x20=\x20cross(v01,\x20lineNormal);\x0d\x0a\x20\x20float\x20d\x20=\x20dot(temp,\x20u_scanPlaneNormalEC);\x0d\x0a\x20\x20return\x20d\x20>\x200.5;\x0d\x0a}\x0d\x0a\x0d\x0avec3\x20pointProjectOnPlane(in\x20vec3\x20planeNormal,\x20in\x20vec3\x20planeOrigin,\x20in\x20vec3\x20point){\x0d\x0a\x20\x20vec3\x20v01\x20=\x20point\x20-planeOrigin;\x0d\x0a\x20\x20float\x20d\x20=\x20dot(planeNormal,\x20v01)\x20;\x0d\x0a\x20\x20return\x20(point\x20-\x20planeNormal\x20*\x20d);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20distancePointToLine(in\x20vec3\x20ptOnLine,\x20in\x20vec3\x20lineNormal,\x20in\x20vec3\x20testPt){\x0d\x0a\x20\x20vec3\x20tempPt\x20=\x20pointProjectOnPlane(lineNormal,\x20ptOnLine,\x20testPt);\x0d\x0a\x20\x20return\x20length(tempPt\x20-\x20ptOnLine);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20getDepth(in\x20vec4\x20depth){\x0d\x0a\x20\x20float\x20z_window\x20=\x20czm_unpackDepth(depth);\x0d\x0a\x20\x20z_window\x20=\x20czm_reverseLogDepth(z_window);\x0d\x0a\x20\x20float\x20n_range\x20=\x20czm_depthRange.near;\x0d\x0a\x20\x20float\x20f_range\x20=\x20czm_depthRange.far;\x0d\x0a\x20\x20return\x20(2.0\x20*\x20z_window\x20-\x20n_range\x20-\x20f_range)\x20/\x20(f_range\x20-\x20n_range);\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(){\x0d\x0a\x20\x20gl_FragColor\x20=\x20texture2D(colorTexture,\x20v_textureCoordinates);\x0d\x0a\x20\x20float\x20depth\x20=\x20getDepth(\x20texture2D(depthTexture,\x20v_textureCoordinates));\x0d\x0a\x20\x20vec4\x20viewPos\x20=\x20toEye(v_textureCoordinates,\x20depth);\x0d\x0a\x20\x20vec3\x20prjOnPlane\x20=\x20pointProjectOnPlane(u_scanPlaneNormalEC.xyz,\x20u_scanCenterEC.xyz,\x20viewPos.xyz);\x0d\x0a\x20\x20float\x20dis\x20=\x20length(prjOnPlane.xyz\x20-\x20u_scanCenterEC.xyz);\x0d\x0a\x20\x20float\x20twou_radius\x20=\x20u_radius\x20*\x202.0;\x0d\x0a\x20\x20if(dis\x20<\x20u_radius){\x0d\x0a\x20\x20\x20\x20\x20\x20float\x20f0\x20=\x201.0\x20-abs(u_radius\x20-\x20dis)\x20/\x20u_radius;\x0d\x0a\x20\x20\x20\x20\x20\x20f0\x20=\x20pow(f0,\x2064.0);\x0d\x0a\x20\x20\x20\x20\x20\x20vec3\x20lineEndPt\x20=\x20vec3(u_scanCenterEC.xyz)\x20+\x20u_scanLineNormalEC\x20*\x20u_radius;\x0d\x0a\x20\x20\x20\x20\x20\x20float\x20f\x20=\x200.0;\x0d\x0a\x20\x20\x20\x20\x20\x20if(isPointOnLineRight(u_scanCenterEC.xyz,\x20u_scanLineNormalEC.xyz,\x20prjOnPlane.xyz)){\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20dis1=\x20length(prjOnPlane.xyz\x20-\x20lineEndPt);\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20f\x20=\x20abs(twou_radius\x20-dis1)\x20/\x20twou_radius;\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20f\x20=\x20pow(f,\x203.0);\x0d\x0a\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20mix(gl_FragColor,\x20u_scanColor,\x20f\x20+\x20f0);\x0d\x0a\x20\x20\x20\x20}\x0d\x0a}\x0d\x0a','Wood','getElementById','anchorLayer','outer','_drawAlpha','event','primitive','cleared','inProgress','lineType','https://open.ys7.com/api/lapp/voice/query','WGS84','_colorSubscription','_onAdd','getStyle',';\x20q=0.01','orientation','_orbitFrame','WScript.Shell','xyz','/ezopen/h5/iframe?url=','getOverlayType','未找到当前语音','COLUMBUS_VIEW','_icrf','clone','Invalid\x20GeoJSON\x20object.','_createModel','headHeightFactor','getFeature','parsePositions','uniform\x20vec4\x20lightColor;\x0d\x0auniform\x20vec4\x20darkColor;\x0d\x0auniform\x20float\x20frequency;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20//\x20From\x20Stefan\x20Gustavson\x27s\x20Procedural\x20Textures\x20in\x20GLSL\x20in\x20OpenGL\x20Insights\x0d\x0a\x20\x20vec2\x20F\x20=\x20czm_cellular(materialInput.st\x20*\x20frequency);\x0d\x0a\x20\x20float\x20t\x20=\x200.1\x20+\x20(F.y\x20-\x20F.x);\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(lightColor,\x20darkColor,\x20t);\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','Recorder','talkModule','_updateWindowCoord','CzmlDataSource','hasData','popup','postRender','cross','traffic','cylinder','_repeat','correspondingElement','createDragger','removeLayerGroup','scale3d(1,1,1)','_createBillboard','Event','RoamingController:\x20path\x20does\x20not\x20added\x20','cors','onStopEditing','fontColor','_anchorLayer','mouseover','\x20gyro-active','serializeArray','scene','Namespace','onStartDrawing','ownerDocument','ConstantProperty','dataToPoint','fog','nodeType','stRotation','_anchors','getStackHook','link','topRadius','thead','toLocaleUpperCase','destory','))|)','sham','matches','channelNo','events','fullScreen','body','values','splice','onStopDrawing','^(?:','OverlayType','setScale','fail','removeEvent','voiceName','atan2','extendComponentView','_addLayerGroup','replaceWith','_isDragger','getHDistance','test','imageryLayers','_orbitIsLook','Initialized','point','createBrightnessStage','registerType','BlobType','maxOpacity','definitionChanged','CesiumTerrainProvider','RimLightingType','_brightness','MIDDLE_DRAG','EllipseGeometryLibrary','hgt','index','indexOf','TyeDyeType','createImageryLayer','_baseWaterColor','GeographicTilingScheme','toggle','range','_createPolyline','defaultView','direction','Rectangle','arrLables','_stRotation','handleObj','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2219px\x22\x20height=\x2228px\x22\x20viewBox=\x220\x200\x2019\x2028\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22>\x0a\x20\x20\x20\x20<path\x20d=\x22M0.6551724,2.3448276\x20L0.6551724,25.6551724\x20C0.6551724,26.6454761\x201.4579722,27.4482759\x202.4482759,27.4482759\x20C3.4385796,27.4482759\x204.2413793,26.6454761\x204.2413793,25.6551724\x20L4.2413793,2.3448276\x20C4.2413793,1.3545239\x203.4385796,0.5517241\x202.4482759,0.5517241\x20C1.4579722,0.5517241\x200.6551724,1.3545239\x200.6551724,2.3448276\x20L0.6551724,2.3448276\x20Z\x20M7.6551724,2.3448276\x20L7.6551724,25.6551724\x20C7.6551724,26.6454761\x208.4579722,27.4482759\x209.4482759,27.4482759\x20C10.4385796,27.4482759\x2011.2413793,26.6454761\x2011.2413793,25.6551724\x20L11.2413793,2.3448276\x20C11.2413793,1.3545239\x2010.4385796,0.5517241\x209.4482759,0.5517241\x20C8.4579722,0.5517241\x207.6551724,1.3545239\x207.6551724,2.3448276\x20L7.6551724,2.3448276\x20Z\x20M14.6551724,2.3448276\x20L14.6551724,25.6551724\x20C14.6551724,26.6454761\x2015.4579722,27.4482759\x2016.4482759,27.4482759\x20C17.4385796,27.4482759\x2018.2413793,26.6454761\x2018.2413793,25.6551724\x20L18.2413793,2.3448276\x20C18.2413793,1.3545239\x2017.4385796,0.5517241\x2016.4482759,0.5517241\x20C15.4579722,0.5517241\x2014.6551724,1.3545239\x2014.6551724,2.3448276\x20L14.6551724,2.3448276\x20Z\x22\x20id=\x22splitter\x22></path>\x0a</svg>\x0a','Material','Content-Type','static','scale','Module','_mapOffset','_state','setTimeDuration','overlay','_holes','upwardMovement','checked','target','_heading','Moz','zoomToPosition','throws','_getVector','mapSwitch','EllipsoidTangentPlane','toFixed','pending','camera','&templete=0&id=','PINCH_END','显示自定义语音','ajaxTransport','roll','_enableHook','getMaxHeightForPositions','https://open.ys7.com/api/lapp/device/ptz/stop','_renderer','focus','<a\x20id=\x27','dc-tool-tip','positionCartographic','percentageChanged','matrix','CTRL','getPrototypeOf','asin','ezuikit-close-sound','_entity','getNumberOfXTilesAtLevel','unproject','dc-context-menu\x20','getPath','attack_arrow','function','tooltip','right','No\x20web\x20audio\x20support\x20in\x20this\x20browser!','heading','heightRadii','multiplyByVector','Ellipsoid','</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22label-content\x22>\x0a','RefractionType','加载janus.js','getClientRects','clientHeight','filePath','addColorStop','msExitFullscreen','WHEEL','_addEffect','Cesium3DTileset','.cesium-viewer','_hasEquals','showAddPointLength','stopSaveCallBack','_initLabel','createBaiduImageryLayer','_sceneEvent','set','PrimitiveCollection','iconUrl','createPropertyDescriptor','available.','getEntitys','fromRadiansArray','overflowX','key','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2250px\x22\x20height=\x226px\x22\x20viewBox=\x220\x200\x2050\x206\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>decrease</title>\x0a\x20\x20\x20\x20<path\x20d=\x22M46.6183575,0.657894737\x20L3.30112724,0.657894737\x20C1.44927539,0.657894737\x200,1.66880618\x200,2.96052632\x20C0,4.25224645\x201.44927539,5.26315789\x203.30112724,5.26315789\x20L46.6988728,5.26315789\x20C48.5507246,5.26315789\x2050,4.25224645\x2050,2.96052632\x20C49.9194847,1.66880618\x2048.4702093,0.657894737\x2046.6183575,0.657894737\x20L46.6183575,0.657894737\x20L46.6183575,0.657894737\x20Z\x22\x20id=\x22Shape\x22></path>\x0a</svg>\x0a','FresnelType','全长:','towardsTheRight','exec','TAG','scale_src','statusCode','uniform\x20sampler2D\x20image;\x0d\x0auniform\x20float\x20speed;\x0d\x0auniform\x20vec4\x20color;\x0d\x0auniform\x20vec2\x20repeat;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20\x20vec2\x20st\x20=\x20repeat\x20*\x20materialInput.st;\x0d\x0a\x20\x20\x20float\x20time\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0d\x0a\x20\x20\x20vec4\x20colorImage\x20=\x20texture2D(image,\x20vec2(fract(st.s\x20-\x20time),\x20st.t));\x0d\x0a\x20\x20\x20if(color.a\x20==\x200.0){\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0d\x0a\x20\x20\x20}else{\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a\x20*\x20color.a;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20max(color.rgb\x20*\x20material.alpha\x20*\x203.0,\x20color.rgb);\x0d\x0a\x20\x20\x20}\x0d\x0a\x20\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','XMLHttpRequest','createTerrain','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2250px\x22\x20height=\x2250px\x22\x20viewBox=\x220\x200\x2050\x2050\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>increase</title>\x0a\x20\x20\x20\x20<path\x20d=\x22M0,25\x20C0,25.3514939\x200.131810207,25.659051\x200.373462207,25.900703\x20C0.615114207,26.142355\x200.922671379,26.2741652\x201.27416517,26.2741652\x20L23.7258348,26.2741652\x20L23.7258348,48.7258348\x20C23.7258348,49.0773286\x2023.857645,49.3848858\x2024.099297,49.6265378\x20C24.3189807,49.8462214\x2024.6485061,50\x2025,50\x20C25.7029877,50\x2026.2741652,49.4288225\x2026.2741652,48.7258348\x20L26.2741652,26.2741652\x20L48.7258348,26.2741652\x20C49.4288225,26.2741652\x2050,25.7029877\x2050,25\x20C50,24.2970123\x2049.4288225,23.7258348\x2048.7258348,23.7258348\x20L26.2741652,23.7258348\x20L26.2741652,1.27416517\x20C26.2741652,0.571177517\x2025.7029877,0\x2025,0\x20C24.2970123,0\x2023.7258348,0.571177517\x2023.7258348,1.27416517\x20L23.7258348,23.7258348\x20L1.27416517,23.7258348\x20C0.571177517,23.7258348\x200,24.2970123\x200,25\x20L0,25\x20L0,25\x20L0,25\x20Z\x22\x20id=\x22Shape\x22></path>\x0a</svg>\x0a','_onActive','neckWidthFactor','_direction','tailWidthFactor','_getHierarchy','getNormal','extremachange','WebMapTileServiceImageryProvider','menu-item','isTrigger','webkitRequestFullscreen','not\x20present!','gyro','KeyboardEventModifier','toDegrees','GOOGLE','next','LineString','clear','find','radar_scan','statusText','morphComplete','getPixelSize','clearRect','serialize','startDraw','wrapAll','backgroundColor','tileVisible','using','_mountPath','option',':enabled','ajax','执行结束对讲','modelUrl','Ray','removeEffect','lastModified','CallbackProperty','HeightReference','terrainPolyline','</tr></tbody></table>','updateSuperHeightLabel','trim','draw','setRequestHeader','topojson','\x5c\x5c[\x5cda-fA-F]{1,6}','_value','isDisabled','updateLayout','updateLengthForTerrain','empty','createAnchor','Cannot\x20call\x20a\x20class\x20as\x20a\x20function','disabled','page','_getCameraFocus','select-one','undergroundMode','icon_anchor','remark','properties','_organiseData','baseVal','_colorize','transformWGS84ToCartographic','west','isNumeric','secondsDifference','select','footerContainer','sigma','positionWC','hierarchy','getPositionsFromJson','drawing','preDispatch','startSaveCallBack','backgroundClip','terrainProviderViewModels','_sampledPosition','east','czm_snoise','viewerEvent','_tileVisibleCallback','400','_timeLine','_rotateMouseMoveFunction','pathLeadTime','closeSoundCallBack','_addOverlay','timers','tbody','stopImmediatePropagation','_videoUrl','audio-controls','onabort','getPositionsWithHeight','If-Modified-Since','_registerEvent','fullScreenModule','replaceChild','setPitchRange','CircleFadeMaterialProperty','moveEnd','mouseenter','_title','base','font_family','ymax','getUserMedia','frameState','TRACKED','call','enabled','window','getMidPosition','relatedTarget','AudioContext','ctx','打开声音','NAME','_plot','credit','charCodeAt','clusterEvent','fromDate','from','mozRequestFullScreen','isBetween','responseXML','value','subdomains','appendChild','added','uniform\x20vec4\x20color;\x0d\x0auniform\x20float\x20speed;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20material.diffuse\x20=\x201.5\x20*\x20color.rgb;\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20float\x20dis\x20=\x20distance(st,\x20vec2(0.5,\x200.5));\x0d\x0a\x20\x20float\x20per\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0d\x0a\x20\x20if(dis\x20>\x20per\x20*\x200.5){\x0d\x0a\x20\x20\x20discard;\x0d\x0a\x20\x20}else\x20{\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20color.a\x20\x20*\x20dis\x20/\x20per\x20/\x202.0;\x0d\x0a\x20\x20}\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','video-hd','plan','opts','pageXOffset','showAtmosphere','PINCH','Parse','_getTargetInfo','_addable','createXYZImageryLayer','origType','tencent','_drawCircle','wms','flyToPosition','_map','dc-popup','absolute','fromCoordString','primitives','postProcessStages','hidden','radii','_orbitCursorAngle','replace','frontFaceAlpha','Math','传入的[','triggered','expando','scriptCharset','setFeatureProperty','createDrawPointHandler','array','tileHeight','className','deviceSerial','removePath','mapProjection','rejected','&templete=1&id=','frequency','LEFT_CLICK','qsa','multiplyByUniformScale','Polygon','FineArrow','responseText','getBoundingClientRect','enableTilt','console','outlineOpacity','_circleCache','startSpeak','reverse','webkitRequestFullScreen','10001','Matrix3','_options','left','southeast','_scene','propHooks','track','CircleWave','checkPosition','createArcgisTerrain','hasContent','hasClass',',1)','addOverlays','Feature','AttackArrow','SCENE3D','changeBaseLayer','\x0a\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20left:\x202px;\x0a\x20\x20\x20\x20\x20\x20bottom:\x202px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x2014px;\x0a\x20\x20\x20\x20\x20\x20color:\x20rgb(255,\x20255,\x20255);\x0a\x20\x20\x20\x20\x20\x20background:\x20rgba(0,0,0,0.6);\x0a\x20\x20\x20\x20\x20\x20padding:\x202px\x205px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x202px;\x0a\x20\x20\x20\x20\x20\x20user-select:\x20none;\x0a\x20\x20\x20\x20','float','.bubble-window-left','PolygonHierarchy','_palette','even','camera-location','Audio\x20context\x20set\x20up.','delegateTarget','_renderRemoveCallback','Cartesian3','/js/jquery.js','root','subtract','billboard','高度差','ImageryProvider','textarea','-$&','rtcgw-ws','点击锚点移动,右击结束编辑','contros','shadowCtx','加载tts.js','_lat','resolutionScale','push','text','toUpperCase','defaultValue','transformWindowToWGS84','once\x20memory','*(\x5cd+)|))','kml','parentNode','destroy','matchesSelector','://','blue','changed','onload','numberOfListeners','onMoveDrawing','uid','clustering','copy','contents','preUpdate','_label','super_height','opt','_labelStyle','_tickCallback','readyWait','_style','hawkeye_map','withAlpha','_modelUrl','[*^$]=','getProperty','stopVideo','00:00','{x}','cloneNode','1px','bloom','stepSize','send','uniform\x20sampler2D\x20colorTexture;\x0d\x0auniform\x20sampler2D\x20depthTexture;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0auniform\x20vec4\x20u_scanCenterEC;\x0d\x0auniform\x20vec3\x20u_scanPlaneNormalEC;\x0d\x0auniform\x20float\x20u_radius;\x0d\x0auniform\x20vec4\x20u_scanColor;\x0d\x0a\x0d\x0avec4\x20toEye(in\x20vec2\x20uv,\x20in\x20float\x20depth){\x0d\x0a\x20\x20vec2\x20xy\x20=\x20vec2((uv.x\x20*\x202.0\x20-\x201.0),(uv.y\x20*\x202.0\x20-\x201.0));\x0d\x0a\x20\x20vec4\x20posInCamera\x20=\x20czm_inverseProjection\x20*\x20vec4(xy,\x20depth,\x201.0);\x0d\x0a\x20\x20posInCamera\x20=posInCamera\x20/\x20posInCamera.w;\x0d\x0a\x20\x20return\x20posInCamera;\x0d\x0a}\x0d\x0a\x0d\x0avec3\x20pointProjectOnPlane(in\x20vec3\x20planeNormal,\x20in\x20vec3\x20planeOrigin,\x20in\x20vec3\x20point){\x0d\x0a\x20\x20\x20\x20vec3\x20v01\x20=\x20point\x20-\x20planeOrigin;\x0d\x0a\x20\x20\x20\x20float\x20d\x20=\x20dot(planeNormal,\x20v01)\x20;\x0d\x0a\x20\x20\x20\x20return\x20(point\x20-\x20planeNormal\x20*\x20d);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20getDepth(in\x20vec4\x20depth){\x0d\x0a\x20\x20\x20\x20float\x20z_window\x20=\x20czm_unpackDepth(depth);\x0d\x0a\x20\x20\x20\x20z_window\x20=\x20czm_reverseLogDepth(z_window);\x0d\x0a\x20\x20\x20\x20float\x20n_range\x20=\x20czm_depthRange.near;\x0d\x0a\x20\x20\x20\x20float\x20f_range\x20=\x20czm_depthRange.far;\x0d\x0a\x20\x20\x20\x20return\x20(2.0\x20*\x20z_window\x20-\x20n_range\x20-\x20f_range)\x20/\x20(f_range\x20-\x20n_range);\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(){\x0d\x0a\x20\x20\x20\x20gl_FragColor\x20=\x20texture2D(colorTexture,\x20v_textureCoordinates);\x0d\x0a\x20\x20\x20\x20float\x20depth\x20=\x20getDepth(texture2D(depthTexture,\x20v_textureCoordinates));\x0d\x0a\x20\x20\x20\x20vec4\x20viewPos\x20=\x20toEye(v_textureCoordinates,\x20depth);\x0d\x0a\x20\x20\x20\x20vec3\x20prjOnPlane\x20=\x20pointProjectOnPlane(u_scanPlaneNormalEC.xyz,\x20u_scanCenterEC.xyz,\x20viewPos.xyz);\x0d\x0a\x20\x20\x20\x20float\x20dis\x20=\x20length(prjOnPlane.xyz\x20-\x20u_scanCenterEC.xyz);\x0d\x0a\x20\x20\x20\x20if(dis\x20<\x20u_radius){\x0d\x0a\x20\x20\x20\x20\x20\x20float\x20f\x20=\x201.0\x20-\x20abs(u_radius\x20-\x20dis)\x20/\x20u_radius;\x0d\x0a\x20\x20\x20\x20\x20\x20f\x20=\x20pow(f,\x204.0);\x0d\x0a\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20mix(gl_FragColor,\x20u_scanColor,\x20f);\x0d\x0a\x20\x20\x20\x20}\x0d\x0a\x20\x20}\x0d\x0a','inArray','interval','table','lightColor','headWidthFactor','tileCacheSize','pop','_opacity','*\x5c]','https://open.ys7.com/api/lapp/live/talk/url','EZUIKitPlayer收到反馈','renderer','pitch',')([a-z%]*)$','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+klEQVQ4jZ2UT2gTQRTGv5nd7G7TsNnW1QimWC+CghBEqJ7sSTx50oM3iwhejSJ486J4qdWLt6JXsQdPVdRDj0WQBqEehKJotLbEbrLNJvtnZlYmZEub1rLJB8Mw8+b9Zt7Me0PiOMY+KgGwuubv3ba3JKinjUfBj7dC+D6L1tt+82Pke5/agnsRZ+4GC38/iePY6vXbcSLBnXtUGXnYdObQWJ8BC6s7NjeGzyJfuAXNONGgSn4SQCWxbYEE33xECL3zZ+WyEvpf9gsXpn0dVuFuSKgxkcAS0GQsvA9pIIlyI1cweuRBQIh+GECddk4jvLn62nRqiFTTeYWgtaTzaPW+HEtQKeabebc2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=','ArcGisMapServerImageryProvider','backFaceAlpha','grassColor','getAzimuth','Polyline','_popup','#FFFFFF','err','\x27\x20data-time=','vertical','<svg\x20id=\x22fullScreen\x22\x20t=\x221578020167938\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20p-id=\x225035\x22\x20width=\x2216\x22\x20height=\x2216\x22>\x20<path\x20d=\x22M348.373333\x20625.706667l-128\x20128-64\x2064v-128a33.28\x2033.28\x200\x200\x200-35.413333-35.413334A33.493333\x2033.493333\x200\x200\x200\x2085.333333\x20689.706667v213.333333A33.706667\x2033.706667\x200\x200\x200\x20120.96\x20938.666667h213.333333a35.626667\x2035.626667\x200\x200\x200\x200-71.04h-128l64-64\x20128-128a35.2\x2035.2\x200\x200\x200-49.92-49.92zM206.293333\x20156.373333h128a33.28\x2033.28\x200\x200\x200\x2035.413334-35.413333A33.493333\x2033.493333\x200\x200\x200\x20334.293333\x2085.333333H113.706667c-7.04\x200-14.08\x207.04-21.333334\x2014.293334a26.026667\x2026.026667\x200\x200\x200-7.04\x2021.333333v213.333333a33.493333\x2033.493333\x200\x200\x200\x2035.626667\x2035.413334\x2033.28\x2033.28\x200\x200\x200\x2035.413333-35.413334v-128l192\x20192a35.2\x2035.2\x200\x200\x200\x2049.92-49.92zM903.04\x2085.333333h-213.333333a33.493333\x2033.493333\x200\x200\x200-35.413334\x2035.626667\x2033.28\x2033.28\x200\x200\x200\x2035.413334\x2035.413333h128l-64\x2064-128\x20128a35.2\x2035.2\x200\x200\x200\x2049.92\x2049.92l128-128\x2064-64v128a35.626667\x2035.626667\x200\x200\x200\x2071.04\x200v-213.333333A33.706667\x2033.706667\x200\x200\x200\x20903.04\x2085.333333zM903.04\x20654.293333a33.28\x2033.28\x200\x200\x200-35.413333\x2035.413334v128l-64-64-128-128a35.2\x2035.2\x200\x200\x200-49.92\x2049.92l128\x20128\x2064\x2064h-128a35.626667\x2035.626667\x200\x200\x200\x200\x2071.04h213.333333A33.706667\x2033.706667\x200\x200\x200\x20938.666667\x20903.04v-213.333333a33.493333\x2033.493333\x200\x200\x200-35.626667-35.413334z\x22\x20p-id=\x225036\x22\x20fill=\x22#ffffff\x22></path></svg>','always','mimeType','_cfgRadius','SceneMode','|[*])','content-box','currentStyle','dot','</select>','uniform\x20vec4\x20lightColor;\x0d\x0auniform\x20vec4\x20darkColor;\x0d\x0auniform\x20float\x20frequency;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20//\x20From\x20Stefan\x20Gustavson\x27s\x20Procedural\x20Textures\x20in\x20GLSL\x20in\x20OpenGL\x20Insights\x0d\x0a\x20\x20vec2\x20F\x20=\x20czm_cellular(materialInput.st\x20*\x20frequency);\x0d\x0a\x20\x20float\x20t\x20=\x201.0\x20-\x20F.x\x20*\x20F.x;\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(lightColor,\x20darkColor,\x20t);\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','destroyDrawHandler','layer_group','addData','simple','module','initHeightDraggers','icon_center','getArcPoints','normal','addImageryProvider','notmodified','wholeDistance','startVideo','outlineColor','flatOptions','_postRenderHandler','boundingSphere','\x0a\x20\x20\x20\x20width:','_totalLable','开始对讲,关闭声音','specialEasing','getText','dataFilter','centerOfMass','method','head','_on','neckAngle','voiceFile','stringify','showAt','CircleFadeType','map_split','ORANGE','distanceDisplayCondition','removeAttr','(\x5cs|$)','createNightVisionStage','RED','_effectCache','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-t-l\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22b-b-r\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22arrow\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div></div>','http://www.w3.org/2000/svg','defaultYField','请确认json文件格式正确!!!','_baseLayer','RimLightingMaterialProperty','cementColor','createWMTSImageryLayer','UrlTemplateImageryProvider','map-item\x20active','offsetWidth','setMapOffset','{style}','getLength','message','holes','MIDDLE_DOWN','handleTalkSuccess','msMatchesSelector',']类型参数有误','maximumZoomDistance','installed','<select\x20multiple=\x27multiple\x27>','progress','getOverlayById','defaultGradient','onChangeEditing','getRightMostControlPoint','step','useMap','downward','_addLayer','addEventListener','audio','requestImage','_radi','LEFT_UP','attribution','style','BLACK','recodeTimer','toDataURL','xmax','</span>\x0a\x20\x20\x20\x20\x20\x20<span>视高:','viewOption','点击元素','rotateLeft','拖动到底,执行加载','exceptionHook','&audio=','REMOVED','KmlLayer:\x20the\x20url\x20is\x20empty','enableFxaa','hawkeyeMap','setLabel','_pickedAnchor','cameraMoveEnd','delta','CLAMP_TO_GROUND','contentDocument','amd','TRANSPARENT','_show','Viewer','getRootNode','attrHandle','_reset','converters','fromBytes','colgroup','filter','__mapOffset','mode','scaleByDistance','_mountMap','mid','icon_size','_callback','_setClockOption','uniform\x20vec4\x20grassColor;\x0d\x0auniform\x20vec4\x20dirtColor;\x0d\x0auniform\x20float\x20patchiness;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20float\x20noise1\x20=\x20(czm_snoise(st\x20*\x20patchiness\x20*\x201.0))\x20*\x201.0;\x0d\x0a\x20\x20float\x20noise2\x20=\x20(czm_snoise(st\x20*\x20patchiness\x20*\x202.0))\x20*\x200.5;\x0d\x0a\x20\x20float\x20noise3\x20=\x20(czm_snoise(st\x20*\x20patchiness\x20*\x204.0))\x20*\x200.25;\x0d\x0a\x20\x20float\x20noise\x20=\x20sin(noise1\x20+\x20noise2\x20+\x20noise3)\x20*\x200.1;\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(grassColor,\x20dirtColor,\x20noise);\x0d\x0a\x0d\x0a\x20\x20//Make\x20thatch\x20patterns\x0d\x0a\x20\x20float\x20verticalNoise\x20=\x20czm_snoise(vec2(st.x\x20*\x20100.0,\x20st.y\x20*\x2020.0))\x20*\x200.02;\x0d\x0a\x20\x20float\x20horizontalNoise\x20=\x20czm_snoise(vec2(st.x\x20*\x2020.0,\x20st.y\x20*\x20100.0))\x20*\x200.02;\x0d\x0a\x20\x20float\x20stripeNoise\x20=\x20min(verticalNoise,\x20horizontalNoise);\x0d\x0a\x0d\x0a\x20\x20color.rgb\x20+=\x20stripeNoise;\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','translucency','isPlainObject','removeClass','_tileWidth','url','getCurrentMousePosition','disableDepthTestDistance','map_switch','implementation','iterator','showSkyBox','talk://','cStore','open','setEndPoints','near','getType','defineProperties','clearLastNoEnd','https','DeveloperError','escape','uniform\x20vec4\x20color;\x0d\x0auniform\x20float\x20time;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20float\x20alpha\x20=\x201.0;\x0d\x0a\x20\x20if\x20(time\x20!=\x201.0)\x0d\x0a\x20\x20{\x0d\x0a\x20\x20\x20\x20\x20\x20float\x20t\x20=\x200.5\x20+\x20(0.5\x20*\x20czm_snoise(materialInput.str\x20/\x20(1.0\x20/\x2010.0)));\x20\x20\x20//\x20Scale\x20[-1,\x201]\x20to\x20[0,\x201]\x0d\x0a\x0d\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20>\x20time)\x0d\x0a\x20\x20\x20\x20\x20\x20{\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alpha\x20=\x200.0;\x0d\x0a\x20\x20\x20\x20\x20\x20}\x0d\x0a\x20\x20}\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a\x20*\x20alpha;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','PolylineImageTrailMaterialProperty','clientX','Blob','font_weight','_syncMap','rectangle','show','extrudedRectangle','ontimeout','__esModule','\x20公顷','?|\x5c\x5c([^\x5cr\x5cn\x5cf])','_updateProperties','https://webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}','RIGHT_DOWN','msRequestFullScreen','PolylineArrowMaterialProperty','_setGlobeOption','text/xml','EZUIKit.state.countTimer','HorizontalOrigin','_mountAnchor','getHeight','uri','_mode','ajaxStart','Fresnel','LEFT_DRAG','registerCoordinateSystem','createTdtImageryLayer','dragger','_rotateAmount','checkClone','GLMap','getValueAt','_getCorridorShape3','setVLine','_attr','updatePositions','_lng','noCloneChecked','broadcastModule','post','bindType','neckHeightFactor','zAxis','capturePictureCallBack','svg:svg','sun','isClockWise','boolean','lon','PostProcessStage','positions','positionPopUp','SendKeys','_suspendTerrainAdjustment','speak\x20off','moveBackward','Matrix4','plane','WaterMaterialProperty','code','CameraEventType','_dbClickHandler','_default','AsphaltType','swing','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpAAQAAAABAAAAngAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKE1hY2ludG9zaCkAMjAxODoxMDoyNiAxNTozMDozNAAABJAEAAIAAAAUAAAA1KABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAAAyMDE4OjEwOjI2IDE1OjI0OjI1ALUCxicAAAAJcEhZcwAACxMAAAsTAQCanBgAAAdgaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXBNTTpJbnN0YW5jZUlEPnhtcC5paWQ6MjgyZGYxNWEtYzg5MC00ODUzLWJlZDQtOWEyZjQxMmY0NjljPC94bXBNTTpJbnN0YW5jZUlEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD54bXAuZGlkOjI4MmRmMTVhLWM4OTAtNDg1My1iZWQ0LTlhMmY0MTJmNDY5YzwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD54bXAuZGlkOjI4MmRmMTVhLWM4OTAtNDg1My1iZWQ0LTlhMmY0MTJmNDY5YzwveG1wTU06T3JpZ2luYWxEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06SGlzdG9yeT4KICAgICAgICAgICAgPHJkZjpTZXE+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxOC0xMC0yNlQxNToyNDoyNSswODowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDoyODJkZjE1YS1jODkwLTQ4NTMtYmVkNC05YTJmNDEyZjQ2OWM8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDx4bXA6TW9kaWZ5RGF0ZT4yMDE4LTEwLTI2VDE1OjMwOjM0KzA4OjAwPC94bXA6TW9kaWZ5RGF0ZT4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8eG1wOk1ldGFkYXRhRGF0ZT4yMDE4LTEwLTI2VDE1OjMwOjM0KzA4OjAwPC94bXA6TWV0YWRhdGFEYXRlPgogICAgICAgICA8eG1wOkNyZWF0ZURhdGU+MjAxOC0xMC0yNlQxNToyNDoyNSswODowMDwveG1wOkNyZWF0ZURhdGU+CiAgICAgICAgIDxwaG90b3Nob3A6SUNDUHJvZmlsZT5zUkdCIElFQzYxOTY2LTIuMTwvcGhvdG9zaG9wOklDQ1Byb2ZpbGU+CiAgICAgICAgIDxwaG90b3Nob3A6Q29sb3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgr82RRBAAAQ+0lEQVR4AZWaWZIkNw5Ea5M00khnmi/d/zgyLV017znhTEZWdk8PzCIAAg4QABlLRtXz77///p8//vjjy/v7+5ePj48vf/755xfo/eXl5f2ff/55R/f8NPTDDz9s+dRrfnt7i+3Un/Jpf319feF4lj8/P78yV8bKhHplnpcV8u0Fv1cOx8BxAPrjjz+GL7fXYEZ+09c4Hsj6Nubrzz///C+OX3799dd///LLL7/+9ttvP+tM7O+jv/766xPQIj3+/vvvJ4/SWXx195x4u2knnsbvRutz2hyzQNFRtLiXsdukJxZSbhOelQ9b9NqKwfbyRrAPJkT++MDwgV8OivlggsiYkpA29JHprvN9ImJV90FzdyHVE0v7OwfhX96Z/1nu2ByUWWh1FmBzYe8WtHNTVm+jyCMLoMLA6mHRibMm4rmTE18ddsfyjxcbMMon+XnYGI9TV9kGeXQsJ2BiyKXqTrn46s6xOslmNS+5RahvPHQOQ9jCLUga9SemTWzxBeQSwLZXSkMLK4ixSV2SaOJthNgmWF7/8nu98xpbOm1elto8LF5b7eWfCnnJFdCpwvG/NOSM0zlzCbjtwL5zA0y3BXblTaKTtgk4X7a3wVqINrflxLAIzfsmObGeWcUsHXO72t4QnTvb31U3JwiWS2E3QX9tcCsOB8c0WWG3u80Tn3mVI8wJrHZH2RG5ttxyJSfwuB+fOm02w6KLL9fmrpCfuqN5ezeJkcQ1B7nj6gP4ysk6a6oMX9UpPKDGtRHS3jctJto5NZFTV9kb3NduhGLOJ0bjnE1onHv+PU8l6tqF3/t3zC6JyNyfsPrXnpugyCbZAOVf09d+z4u/58VV77gNOS6fwvZNcCsOwRg9DvWuwYV/pB/dxfbmIwdDrmnuAX2kPLsSXps63Xfc1Z9g23ZilHlZ+WTTz9yKbRw5hwXs+RyLG5XPzDwanVd5bDsP9eqql6Pa8QwkqVtMD+5NAm2C3ETaBECoVsBHW12bAcq98Z1j9LEZs3p1kjr9nJdrcc+PKS8vbk/mh+V9JoWLr0/1jhNwTuo5doWVz4oPWfG5b0pnIbuTJnpffBMpd6Ufkfaz+HtMm1BM7eR02aKdp/ZH4xZejFzcOa7O+BZeW97BO2jwrmb15Q1arl5ZfH3LW9iJFd/CT3195nL0pX/H00eySPmZ/Oj3gmkTN/yCre6cF93TGw4vFPDGjegfktt3b4GY8qw4nSq3QJOQqleurTp5d5LyJOPUZhuO3R8wLoi37/yIIU50/vhBpy1j3cRB+VEELjE8Jfhx2gYEYwiBp1Hyt0ng6aeffnrh0eWLhEHIM+/ll8JMHqcQclc/L0Fn0fOycSm6z11w+cEyBSQ/i8ee5MzHgpikY8vZhU0BaZwGSaxcm9Tx1BKdJ8bZFcXB1w5QoCDsr/v6Q/aHyqVIV7FNKDcYzdv6dGdO2jouft763HW5/4ApX1tBp2mCIoer3CKyQxjf8+2rTbCcucOpJf6MdyBtHjT7zQnyI8HVIdH80jCATQCUa5II4Y5PamHaJWJ8KtoEtBVrbCjJTa7Z9uI4srdHv78FTJ57yxMuTZBLuinjZwgpek+jkxeHuCiXAI5GMUHf47OlfUkRos3tqx1+2dbaStO8S6FtRgs3HInlBofchMPVm7WFalMejGKSd7zqWX1i7hSkfQzlQIPVLthxOLkk1sRZO6CJznt4Hl8AqDe/MhynzhbioD4xzIk5ssrlxNhjISZiDLmZgpNJNi6rrY7YbQrQfD3KyoPrjmjhbVhukviGEpGTcSSLljCGOX/JN0GD7JUD4aexvKC44v+r6NNukcY6dU6m/tBlblRd1SynyYGNTo4dditeOdlPg5Bvezy1rV1j0cYq3cXdu0E9x/NuAAkmSXeByc6Enx6DFiMxQQpbo1uB+G39xEm8owHZCZNAboaVTQh/l8fiIsOz+qotigI7FpqdYjoOIItKY6YR7t7upjQGextkvNUAHPcqAfjwTr12/9quLfLkLcgg1atjwnO1HzbKJHwK6Kc8yWbVLfKwpyjzQ53tPkUGVqwgYphHijXeUD6Ijv9uALYU7/TZAQJMxgLcAV77BPGDQbYzsuaQdsdtQDkxto4CduG1N4ZjC8wpta6bIUkR4nYJWIA49Z7w73XeHaA9Nu3E7X3BYX0zz8wX/TLl5r52AIoEoTrv8L6NaPBLix88cgmo853AIvvu38LQ7R0gzi7VpqyPVJ2YI6GuxKp++QMJJS+bAu1CbcQyv9yWGZCELXGMH6d1iUQ/Y+eu/9otGFS4LP78TbLEEqjO7wUpoisYACd8LsXej4sj1i7eJjg2rvihrBb66DghrmubBUkiGiSLx8cjzowNsQsSo00arOJSKEHEdqxfCNzbG6vqRzUL0uJTwKvAt0KfH60ljRAHwdZrscEEOCZ4sG1aMadNWZokTChJqyMVZQsyVmS59wv8EFdjFMCmEWDTMX0VJ0ZiioMyB4kl3vA0InPaZba6D/0vNMJ7QD5Y4uh3ulwCqUrPKdZx5RZZjJyYaQgTbJz6+gxvkgzTxDbD5iRxDRZAnIhyDVBumHJpdkps0+y97fVBt2+0NCjBVjo8BQAY0JX2E/UXAE3er0ROvn8fnMWKP4ty1cWqnyT21h+crLGNKwHPDkuhLQhdtn7H4PY2V6dfbRZP2ARybn3N26IdYztjd05x2vIU8EkA/sNP0i/uBn7c5DM5uwLMlYygxiLl+MguTwaCR1eMg5kw3BhDaYTzeghTD3YXjLwJzNZb5FB0mnQ9MBGJ6aWVe4e8ToPVlj8+uspufRUWlj+MAs494CyEqJhvDciAE9jdGOSoT7/qBhfAqhUNvso5TfHKUIrYQqC3LT/DNA9MischjXBsXBLpvUI5Om3GZHzbAQx89H3RMI1wG6UB2EItiCi7YLe+NJNFNkaEOZ02Y5TUc7SAyCvU6kiqX5iucjqCf4qVlyzcUMYeuabsLG0u7umjnBchb1pQ/tgoJ4Cyme7rX4DJY1PstZxqHDNBdOXqSujSkNrk0C7cAXOlAvhuin7VkzzDVWCEtdKks9y0jb5NyMpPvOAMPfGcw1qe/Xt6/jxmDiYF+b8CvhD5Suyu2Kupk8meVHv5IxsTRd0dNNhUp+ykkrIFqVKeomsL1y6J0S4nOOpdd/3b4HB9BMklfDzWqzCB8vqLIn+bswEk64P3sgPw+2oD8HUVY8f9siO0lWzCSU2GHPTdzTgKEi4shVlDx+o6Vqd8jtW1SWIl7M4Tjn3fA0zYukMAvP27+ikEOWTy4DrcOgWD1VDMqatN3Ulgd1LqO5bPcEQ3R4rfu0QD1KX/tPIajaFfqXJj5x6AMTVgzIuQYDsBaF/jLWBWcOvB7MKLqU4OPruoOkJnpTMhSuZsAefKZIuOyXQkm9NKDJfCTq4s6Uf82Jk+utoySF+S97OvwW/Uaj5ZfQB+DLXAfBTV8IjAtfDyDcN3605ZQMcmojxFKmZc/c18W3Xd0acJ+g02q1zZS0kZbOIxboNVb9JuDG+t8GDSAF9/0Vm8hsvq4bTJjDtwV+BjcS54ZG02Vpw2SZtc3czpODIcWJqaxJabqt2XyPj1LS+Fi1PnMaHjpJ/CxA1WzNCe00uAJuX5SM1ftOcGiM6nwH4RYqJ9QzyLRL+qhjNZSF3lqs6x9oNSoWPmTtLl+GTc4uTCFjTYuD3QW8eJq7z52NebICtlEXYrr8DIIUB7B6hwtvKzIGVtpw7fveLKkjsCWegm1JHRS9UnUQpLU1DWEBA+2SV1aAOMpTxkrPg5Hn2Mhz4NOO8B/v7PpUCwNMEoyBdSZT9OJXM80gUDPn2bnZYni/4lfBWbbFad2NGZ/AjFHKq1Y/QVNoYtqxubOimYco25BOw0E/pOm1um2doFxybC8Yl0PpX3Yya5NES4ReujjXGyGz+ZyQ3bdlRLVpACHF/z1s2j8kCCc9UDiGeK7w5Yjuj3q7D1Ak7tngwES43oTV57xsgmG7knJ6o8/DI+7cpQlhieJPHpjdHAZzMCNp/BIu66uqJRBDjNKIZYtemnvJslPjvAgiDvgIj7a5BF7xufRWGX7ZVUxk+2CZdLc+7HAJ1LqpAE1RsfvG9v2hmudwYHUMY5rXGud/VjDDt2gnrnSNEaId0tYofJbwEtTswugH3kZEWO5SVgFXcTVrylxjdFbNAS4iRudpnj4pw6YzmYHNqHkqh6zYcy4xhHqQwZK/yUB7xvkF4ac+THkL9UcvMDmAa0cIJcGmBiHBeaiS46G6EC20V/jFPo5N4GZLWMJ+G4G8Lw02UBTjpxu0Hju7o2GGJ4/VP3ekqYnjj3mpeBwaj7tgMoIpcAenC3l5qVW1Q5MU6xN81Nqg1uI+2uqi0bm7Fzq8+yi3MMP69Vg4oJdvDBqRNbnaCh+qdJ6MRk5cVSc2BvfP7yv0OyAzB457cTTujNwFndFTokew0lbDZpDxWI0ee9wzRHjFhpYoWbgcloUxyehEdfHcPb9hbnmFjRM04c57vDaZKCc6HBKBs3LDdBCrUzsOwA4oZSvEmX0BqswwvXAJ0NuRRdsJggh4++iV94AlKUq8XcSdjc8UkIZQ9tKpRPGixs+dgADzB9HOY/RLjp5itqPoJYOhNkWZWhVIxT5HKCtqZwcdBF18G9QRyHiQgxsMlnVR2b8D2pP20tajgsPi7A3vrF1I8x9Yc6x1OfAlazdwByG4C4iIQuDZjkaw4HIDf3i/6RcpLThJhmngV2l2wduCQtr+xEpVM3sWva3Ikgx70U0gDvBvmF5SVAIAtNJcocvV63rA4f2Scy+iclCtWEjU15cGGeJO3QLj6DuGZ7G1ZVG2ExF92JrzwFO9yPQR3ZB8Z52k8BJt+XwK3+JzNyEpNPERms08NCa7cYJ3hA5tKmttiMuRTluTTwNX4O8TpJ6iTtJXXFz5wdJ9bg1t0PAKTK00dehQngLjgvAVRrK0T4xslIj8yqbcLXbCaBrfY2K2NjlsQUO4kbMr6HPrp7H8bVn8VbeA//DSDvnb4M+SqsQx5/ClAvhTV6fG7yj61La27049IQdbnxqVeGGisFqhuDTAoenAV0V2xMG6LNWBNPP0nfXO5w/UPnDnALuGo+b2TfU3wnlzvpI3pkWBmuHPTJKhuDadU2XhBjDy6KNVdEa9FeY8fFGQ9d8tTGIY15/jDCyB0QoIVLBoTkgtdg7gM1n/oTF/DdySCQBaY4eMYDi+wJ6oRrNMWKU0HyxugOiFqTeu3KA43Nm92QdovX93YT9KmIwr+OanD7I6b+cHQJ5OlbNLhvQWJb86+gA8Z1F22SqqMbriyd+gBGmYKJm90jP/wizzj3gcNmve/5HYDgDsgHkJkoxdsIx6Mz2P8kfIAn2a9iBUDaw0+fi2FF2KppXpz0sdgxbgzCjjvxt01/dXCLj957oO/A2QEYvf7tpFsgLCgG/w9NjGZycTU0MdXlJD/H5hbjUQg+G2PssYuLXvvowwdfn8AH23cBbfrnH43yc5ixj0Fv1TpIiJ+SXZbvOBu/xRBX2WzzhDHBFmKolcu6dtdw9WB8srVP3IlXngN28cvgLl6uf4Gl/F2AidwB6pzMuWC7EUm89gOTiU+cjicN1i+vW80tp3ITbJw0RR/IE+J6KkyzMlZuLsUMHrZ8yo9YMeBrjMQezPoW4CWgYYpJ5a7aSfp1cvitOyfo27JTbIRFdHAaBhObskmLG0zYyOoO04IY1zy13TcKnR3Q5lMA2MuHfxp75VN4LgOi4ZNtf74MOUnIwCWDV/5e7uSlkbfCcRMuH2yrvBRlLgcO9xXqjIP/9lUeTLjFI3z8F+ualIvlptDJAAAAAElFTkSuQmCC','parseJSON','horizontal','trigger','morphTo3D','panel-top','Cesium3DTileFeature','msg','PolylineOutlineMaterialProperty','contentType','getLayers','bind','voice-list','_onRemove','spacing','color:#0078A8;font-size:12px','enable','_shape','GrassType','expr','jQuery\x20requires\x20a\x20window\x20with\x20a\x20document','fromAxisAngle','getTileCredits','drawingBufferWidth','skyBox','_dcContainer','_initCanvas','ymin','blur','offsetHeight','.bubble-window-bottom','关闭声音','mousedown','rimColor','queue','ShaderSource',')(?:','rejectWith','length','transformWGS84ToCartesian','latitude','sort','type','dc-slider','moon','CENTER','opener','fillColor','generateArc','beginPath','status','grep','https://p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400','setOption','0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz','Until','getPropertyNames',':scope\x20fieldset\x20div','BoundingRect','isConstant','_imageSubscription','getZHeightPosition','_czmBuiltinsAndUniforms','DOMContentLoaded','_completeCallback','prevAll','getBaseLength','/**\x0d\x0a\x20*\x20@license\x0d\x0a\x20*\x20Cellular\x20noise\x20(\x22Worley\x20noise\x22)\x20in\x202D\x20in\x20GLSL.\x0d\x0a\x20*\x20Copyright\x20(c)\x20Stefan\x20Gustavson\x202011-04-19.\x20All\x20rights\x20reserved.\x0d\x0a\x20*\x20This\x20code\x20is\x20released\x20under\x20the\x20conditions\x20of\x20the\x20MIT\x20license.\x0d\x0a\x20*\x20See\x20LICENSE\x20file\x20for\x20details.\x0d\x0a\x20*/\x0d\x0a\x0d\x0a//#ifdef\x20GL_OES_standard_derivatives\x0d\x0a//\x20\x20\x20\x20#extension\x20GL_OES_standard_derivatives\x20:\x20enable\x0d\x0a//#endif\x0d\x0a//\x0d\x0a//float\x20aastep\x20(float\x20threshold\x20,\x20float\x20value)\x0d\x0a//{\x0d\x0a//\x20\x20\x20\x20float\x20afwidth\x20=\x200.7\x20*\x20length\x20(\x20vec2\x20(\x20dFdx\x20(\x20value\x20),\x20dFdy\x20(\x20value\x20)));\x0d\x0a//\x20\x20\x20\x20return\x20smoothstep\x20(\x20threshold\x20-\x20afwidth\x20,\x20threshold\x20+\x20afwidth\x20,\x20value\x20);\x0d\x0a//}\x0d\x0a\x0d\x0a//\x20Permutation\x20polynomial:\x20(34x^2\x20+\x20x)\x20mod\x20289\x0d\x0avec3\x20_czm_permute289(vec3\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20mod((34.0\x20*\x20x\x20+\x201.0)\x20*\x20x,\x20289.0);\x0d\x0a}\x0d\x0a\x0d\x0a/**\x0d\x0a\x20*\x20DOC_TBA\x0d\x0a\x20*\x0d\x0a\x20*\x20Implemented\x20by\x20Stefan\x20Gustavson,\x20and\x20distributed\x20under\x20the\x20MIT\x20License.\x20\x20{@link\x20http://openglinsights.git.sourceforge.net/git/gitweb.cgi?p=openglinsights/openglinsights;a=tree;f=proceduraltextures}\x0d\x0a\x20*\x0d\x0a\x20*\x20@name\x20czm_cellular\x0d\x0a\x20*\x20@glslFunction\x0d\x0a\x20*\x0d\x0a\x20*\x20@see\x20Stefan\x20Gustavson\x27s\x20chapter,\x20<i>Procedural\x20Textures\x20in\x20GLSL</i>,\x20in\x20<a\x20href=\x22http://www.openglinsights.com/\x22>OpenGL\x20Insights</a>.\x0d\x0a\x20*/\x0d\x0avec2\x20czm_cellular(vec2\x20P)\x0d\x0a//\x20Cellular\x20noise,\x20returning\x20F1\x20and\x20F2\x20in\x20a\x20vec2.\x0d\x0a//\x20Standard\x203x3\x20search\x20window\x20for\x20good\x20F1\x20and\x20F2\x20values\x0d\x0a{\x0d\x0a#define\x20K\x200.142857142857\x20//\x201/7\x0d\x0a#define\x20Ko\x200.428571428571\x20//\x203/7\x0d\x0a#define\x20jitter\x201.0\x20//\x20Less\x20gives\x20more\x20regular\x20pattern\x0d\x0a\x20\x20\x20\x20vec2\x20Pi\x20=\x20mod(floor(P),\x20289.0);\x0d\x0a\x20\x20\x20\x20vec2\x20Pf\x20=\x20fract(P);\x0d\x0a\x20\x20\x20\x20vec3\x20oi\x20=\x20vec3(-1.0,\x200.0,\x201.0);\x0d\x0a\x20\x20\x20\x20vec3\x20of\x20=\x20vec3(-0.5,\x200.5,\x201.5);\x0d\x0a\x20\x20\x20\x20vec3\x20px\x20=\x20_czm_permute289(Pi.x\x20+\x20oi);\x0d\x0a\x20\x20\x20\x20vec3\x20p\x20=\x20_czm_permute289(px.x\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p11,\x20p12,\x20p13\x0d\x0a\x20\x20\x20\x20vec3\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20vec3\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20vec3\x20dx\x20=\x20Pf.x\x20+\x200.5\x20+\x20jitter*ox;\x0d\x0a\x20\x20\x20\x20vec3\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0d\x0a\x20\x20\x20\x20vec3\x20d1\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d11,\x20d12\x20and\x20d13,\x20squared\x0d\x0a\x20\x20\x20\x20p\x20=\x20_czm_permute289(px.y\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p21,\x20p22,\x20p23\x0d\x0a\x20\x20\x20\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20dx\x20=\x20Pf.x\x20-\x200.5\x20+\x20jitter*ox;\x0d\x0a\x20\x20\x20\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0d\x0a\x20\x20\x20\x20vec3\x20d2\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d21,\x20d22\x20and\x20d23,\x20squared\x0d\x0a\x20\x20\x20\x20p\x20=\x20_czm_permute289(px.z\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p31,\x20p32,\x20p33\x0d\x0a\x20\x20\x20\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0d\x0a\x20\x20\x20\x20dx\x20=\x20Pf.x\x20-\x201.5\x20+\x20jitter*ox;\x0d\x0a\x20\x20\x20\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0d\x0a\x20\x20\x20\x20vec3\x20d3\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d31,\x20d32\x20and\x20d33,\x20squared\x0d\x0a\x20\x20\x20\x20//\x20Sort\x20out\x20the\x20two\x20smallest\x20distances\x20(F1,\x20F2)\x0d\x0a\x20\x20\x20\x20vec3\x20d1a\x20=\x20min(d1,\x20d2);\x0d\x0a\x20\x20\x20\x20d2\x20=\x20max(d1,\x20d2);\x20//\x20Swap\x20to\x20keep\x20candidates\x20for\x20F2\x0d\x0a\x20\x20\x20\x20d2\x20=\x20min(d2,\x20d3);\x20//\x20neither\x20F1\x20nor\x20F2\x20are\x20now\x20in\x20d3\x0d\x0a\x20\x20\x20\x20d1\x20=\x20min(d1a,\x20d2);\x20//\x20F1\x20is\x20now\x20in\x20d1\x0d\x0a\x20\x20\x20\x20d2\x20=\x20max(d1a,\x20d2);\x20//\x20Swap\x20to\x20keep\x20candidates\x20for\x20F2\x0d\x0a\x20\x20\x20\x20d1.xy\x20=\x20(d1.x\x20<\x20d1.y)\x20?\x20d1.xy\x20:\x20d1.yx;\x20//\x20Swap\x20if\x20smaller\x0d\x0a\x20\x20\x20\x20d1.xz\x20=\x20(d1.x\x20<\x20d1.z)\x20?\x20d1.xz\x20:\x20d1.zx;\x20//\x20F1\x20is\x20in\x20d1.x\x0d\x0a\x20\x20\x20\x20d1.yz\x20=\x20min(d1.yz,\x20d2.yz);\x20//\x20F2\x20is\x20now\x20not\x20in\x20d2.yz\x0d\x0a\x20\x20\x20\x20d1.y\x20=\x20min(d1.y,\x20d1.z);\x20//\x20nor\x20in\x20\x20d1.z\x0d\x0a\x20\x20\x20\x20d1.y\x20=\x20min(d1.y,\x20d2.x);\x20//\x20F2\x20is\x20in\x20d1.y,\x20we\x27re\x20done.\x0d\x0a\x20\x20\x20\x20return\x20sqrt(d1.xy);\x0d\x0a}\x0d\x0a','_getMBounds','createTextNode','_computeHierarchy','SINGLE_TILE','blendColor','opacity','splitter','_maxOpacity','compareDocumentPosition','position','renderall','_cameraEl','*(?:([+-]|)','showMoon','{F11}','_fogColor','when','Left','first','_credit','count','pathMaterial','0px','deserialize','pushStack','fireWith','\x0a\x20\x20\x20\x20\x20\x20<span>视角:','circle_scan','toCssColorString','minCanvasSize','solid','webkitExitFullscreen','_getTempPoint4','onTick','cssHooks','getOverlays','*(?:\x27((?:\x5c\x5c.|[^\x5c\x5c\x27])*)\x27|\x22((?:\x5c\x5c.|[^\x5c\x5c\x22])*)\x22|(','bounds','createSingleTileImageryLayer','[s!=\x27\x27]:x','speak\x20on','optgroup','getPointOnLine','addProp','addTo','scrollLeft','src','请传入需要绘制的类型参数','fetchDefaultList','ARCGIS','removed','_reDraw','ACTIVE','majorDragger','isWindow','swallowTailFactor','\x20small-caps\x20','escapeSelector','visible','rotateAmount','createElement','forEach','writable','toStringTag','zoom','nextSibling','_comps','attributes','nonce','tokenize','scope','gathering_place','tdt','No\x20Transport','heightReference','_selected','surfaceDistance','SCENE2D','cameraPosition','returnValue','ColorMaterialProperty','currentTime','data-','shape','cartesianToCartographic','\x0a\x20\x20\x20\x20\x20\x20transform\x20:\x20rotate(-','isXMLDoc','TimeIntervalCollection','ScreenSpaceEventHandler','boxSizingReliable','offset','removeChild','dir','mouseout','callback','_mouseRightClickHandler','Cesium3DTileStyle','msRequestFullscreen','_length','rad);\x0a\x20\x20\x20\x20\x20\x20opacity:\x20','load','pseudos','minimumHeights','off','symbol','protocol','pos','RIGHT_DRAG','jsonp','toggleClass','firstChild',')*)|.*)\x5c)|)','getBinomialFactor','putImageData','not','catch','_endRotate','_createCompassDom','_coordinator','openSoundCallBack','eachSeries','maxCanvasSize','top','/npm/js/recoder.js','*((?:-\x5cd)?\x5cd*)','rain','needsContext','PlotUtil','_removeLayerGroup','notify','_unbindEvent','_arrLables','getThirdPoint','xLable','fixed','getImageData','lonLatsToCartesians','onfocusin','shadowCanvas','selectors','cur','angleBetween','getTimestamp','frameBorder','_postUpdateRemoveCallback','_pitch','_center','attr','responseJSON','arc','asphaltColor','RIGHT_CLICK','install','cos','reliableMarginLeft','defaultPrevented','VelocityOrientationProperty','prefilters','changeMouseMode','CircleFade','openSound','double_arrow','min','_editWorker','startTime','focusout','postMessage','minimumZoomDistance','_height','unshift','state','_ulEl','isPropagationStopped','_computeCirclePoints','LEFT_DOWN','</span>\x0a\x20\x20\x20\x20\x20\x20<span>纬度:','_stepSize','dragIcon','hasLayer','_definitionChanged','drawHandler','getViewer','CLICK','lat','clockTick','_api','_id','addEffect','_controller','http://api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}','last','zoomTo','clock','fine_arrow','\x5c.(?:.*\x5c.|)','store','_positionIndex','*\x5c)|)','uuid','dc-container','webkitGetUserMedia','computeEllipsePositions','BAIDU','60%','__proto__','_baseLayerPicker','setDocument','<form></form><form></form>','username','unsupported\x20lang:\x20','content-type','which','松开发送','Entity','animated','GeoJsonDataSource','vector','attribute2Entity','setTimeout','shift','splitDirection','done','showSuperHeight','stylesheet','createEditDraggerHandler','dataType','hasFocus','updateConfig','cartesianToCanvasCoordinates','then','directionWC','ptp-talk\x20off\x20hide','shadows','fogByDistance','magnitude','data-index','EllipsoidGeodesic','pickPosition','north','detectDuplicates','<table><tbody><tr>','alt','display','client','textContent','shouldAnimate','_size','document','scale3d(','_mountedHook','</span>\x0a\x20\x20\x20\x20\x20\x20<span>海拔:','pickPositionSupported','isXML','extend','brightness','WMS','script','run','_off','GoogleEarthEnterpriseTerrainProvider','animationSpeed','高度差:','createAmapImageryLayer','start','nodeName','_viewMatrix','time','webkitAudioContext','_rotateInitialCameraAngle','_mouseMode','Coord','createDocumentFragment','silhouetteAlpha','\x0a\x20\x20\x20\x20visibility:visible;\x0a\x20\x20\x20\x20','_specularMapSubscription','getElementsByClassName','useGradientOpacity','WoodType','VRTheWorldTerrainProvider','_mBounds','normalMap','fromCartesian','PolylineEmissionMaterialProperty','_removeLayer','inner','startSave','delegateCount','marginTop','plot-anchor-layer','_onRelease','fromDegrees','[object\x20Object]','changeSceneMode','zhang','getCircleCenterOfThreePoints','If-None-Match','_text','cartographicArrayToCartesianArray','_unOrganizeData','getDiagonalPositions','merge','_tilingScheme','removeAttribute','canvas','default','GREEN','pixelPosition','boxSizing','ajaxSuccess','.bubble-window-blow-up','originalEvent','broadcast\x20on\x20hide','contrast','ajaxError','null','dc-map-switch','entity','max','backFaceAlphaByDistance','parseDom','_viewer','toModelLayer','wss','countTimer','REMA','getOSDTimeCallBack','only','_startTime','+|((?:^|[^\x5c\x5c])(?:\x5c\x5c.)*)','_data','<span\x20title=\x22对讲\x22><svg\x20t=\x221581930496966\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20\x20p-id=\x221641\x22\x20width=\x2216\x22\x20height=\x2216\x22>\x20\x20<path\x20\x20\x20\x20d=\x22M715.648\x20647.872c-30.208-22.336-61.568\x2039.36-100.992\x2077.44-39.36\x2038.08-34.112\x2031.488-123.392-17.088S311.488\x20540.224\x20280\x20491.648C248.448\x20443.072\x20265.472\x20424.704\x20265.472\x20424.704s78.72-62.976\x2097.152-81.344c18.368-18.368\x2013.12-30.208\x2013.12-30.208l-128.64-190.144c-23.616-5.184-64.32\x205.12-128.576\x2057.6C54.208\x20233.088\x2030.592\x20353.856\x20151.296\x20575.68c120.768\x20221.824\x20347.84\x20330.752\x20485.568\x20374.08\x20137.856\x2043.328\x20228.416-61.696\x20249.408-103.68\x2021.056-41.984\x2013.12-85.312\x2013.12-85.312S745.856\x20670.208\x20715.648\x20647.872z\x22\x20\x20\x20\x20p-id=\x221642\x22\x20fill=\x22#ffffff\x22></path>\x20\x20<path\x20\x20\x20\x20d=\x22M715.328\x2064C580.992\x2064\x20472.192\x20172.864\x20472.192\x20307.2s108.8\x20243.2\x20243.136\x20243.2\x20243.2-108.864\x20243.2-243.2S849.6\x2064\x20715.328\x2064zM715.328\x20461.056c-84.992\x200-153.856-68.864-153.856-153.856s68.864-153.856\x20153.856-153.856\x20153.856\x2068.928\x20153.856\x20153.856S800.32\x20461.056\x20715.328\x20461.056z\x22\x20\x20\x20\x20p-id=\x221643\x22\x20fill=\x22#ffffff\x22></path>\x20\x20<path\x20\x20\x20\x20d=\x22M777.472\x20277.376c-18.176\x200-32.96-14.784-32.96-33.024\x200-8.448\x203.136-16.064\x208.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2\x200-92.672\x2041.472-92.672\x2092.736s41.472\x2092.736\x2092.672\x2092.736S808.064\x20358.4\x20808.064\x20307.2c0-13.696-3.072-26.688-8.384-38.4C793.728\x20274.112\x20786.048\x20277.376\x20777.472\x20277.376zM715.328\x20340.928c-18.624\x200-33.664-15.104-33.664-33.728\x200-18.624\x2015.04-33.728\x2033.664-33.728\x2018.688\x200\x2033.728\x2015.104\x2033.728\x2033.728C749.056\x20325.824\x20734.016\x20340.928\x20715.328\x20340.928z\x22\x20\x20\x20\x20p-id=\x221644\x22\x20fill=\x22#ffffff\x22></path>\x20</svg>\x20</span>\x20<span>开启对讲</span>','delegate','unpack','overlayEvent','_minOpacity','getElementsByName','exportWAV','tilingScheme\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','dragIcon.png','focusin','enterFullscreen','_positionChangeable','倒计时结束,开启声音','_createPolygon','NONE','outerPositions','cesiumWidget','sum','<br\x20/>','arcgis','enableLighting','calback','border-box','position:absolute;left:0;top:0;','add','headAngle','getEvent','unique','measureHeight','host','green','fxshow','granularity','getWidgetType','hasEdit','minimumClusterSize','uniform\x20samplerCube\x20cubeMap;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec3\x20normalWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20material.normal);\x0d\x0a\x20\x20vec3\x20positionWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20materialInput.positionToEyeEC);\x0d\x0a\x20\x20vec3\x20reflectedWC\x20=\x20reflect(positionWC,\x20normalWC);\x0d\x0a\x20\x20material.diffuse\x20=\x20textureCube(cubeMap,\x20reflectedWC).channels;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','WallTrailMaterialProperty','rtcUrl','globe','\x20uniform\x20sampler2D\x20image;\x0d\x0a\x20uniform\x20float\x20speed;\x0d\x0a\x20uniform\x20vec4\x20color;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x20\x20\x20float\x20time\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0d\x0a\x20\x20\x20vec4\x20colorImage\x20=\x20texture2D(image,\x20vec2(fract(st.t\x20-\x20time),\x20st.t));\x0d\x0a\x20\x20\x20if(color.a\x20==\x200.0){\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0d\x0a\x20\x20\x20}else{\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a\x20*\x20color.a;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20max(color.rgb\x20*\x20material.alpha\x20*\x203.0,\x20color.rgb);\x0d\x0a\x20\x20\x20}\x0d\x0a\x20\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','layerId','plugins','_createLabel','.bubble-window-right','loadImage','左击选择点位','querySelectorAll','queueHooks','_removeOverlay','defaultMinOpacity','showMoveDrawing','roamingEvent','origin','_onPostUpdate','_option','BaseLayerPickerViewModel','saveModule','height','_dataSource','handleError','执行开始对讲','没有更多数据了','each','speak\x20on\x20hide','CIRCLE','[\x5cr\x5cn\x5cf]','_createDrawWorker','getMaximumHeights','undefined','_speedSubscription','isSuper','_normalMap','requestFullScreen','talk','createTween','concat','padding','ADD','<li\x20class=\x27voice-item\x27\x20id=\x27voice-item-','_overlay','CircleWaveType','czml','responseFields','use','container','onmouseout','delegateType','getAttributeNode','yellow','unsupported\x20pseudo:\x20','(^|','/recorder.js','voice','GET','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2253px\x22\x20height=\x2253px\x22\x20viewBox=\x220\x200\x2053\x2053\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>compass-rotation-marker</title>\x0a\x20\x20\x20\x20<desc>Created\x20with\x20Sketch.</desc>\x0a\x20\x20\x20\x20<defs></defs>\x0a\x20\x20\x20\x20<g\x20id=\x22Page-1\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill=\x22none\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<g\x20id=\x22compass-rotation-marker\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M52.4399986,26.2199993\x20C52.4399986,11.7390936\x2040.7009051,0\x2026.2199993,0\x20C11.7390936,0\x200,11.7390936\x200,26.2199993\x20C0,40.7009051\x2011.7390936,52.4399986\x2026.2199993,52.4399986\x20C40.7009051,52.4399986\x2052.4399986,40.7009051\x2052.4399986,26.2199993\x20Z\x22\x20id=\x22rotator\x22\x20stroke-opacity=\x220.135841259\x22\x20stroke=\x22#E2A549\x22\x20stroke-width=\x229\x22\x20opacity=\x220.201434235\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M0,26.2199993\x20C0,11.7390936\x2011.7390936,0\x2026.2199993,0\x20L26.2199993,9\x20C16.7096563,9\x209,16.7096563\x209,26.2199993\x22\x20id=\x22Shape\x22\x20opacity=\x220.634561567\x22\x20fill=\x22#4990E2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</g>\x0a</svg>\x0a','No\x20conversion\x20from\x20','createWMSImageryLayer','log','\x0a\x20\x20\x20\x20visibility:visible;\x0a\x20\x20\x20\x20z-index:1;\x0a\x20\x20\x20\x20transform:translate3d(','radius','<table><colgroup>','textEx','setBounds','surfacePosition','previousSibling','round','Cesium','_mouseClickHandler','save','MOUSE_MOVE','XYZ','color','fromCoordArray','-\x0d\x5c\x27\x20msallowcapture=\x27\x27><option\x20selected=\x27\x27></option></select>','POST_RENDER','getOSDTime','fromRandom','farValue','gradient','stream','getOverlaysByAttr','rgb(0,0,255)','Thenable\x20self-resolution','rgba(0,0,0,1)','videoUrl','createHTMLDocument','setWrapper','uniform\x20vec4\x20color;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x20\x20\x20\x20vec4\x20fragColor\x20=\x20color;\x0d\x0a\x20\x20\x20\x20fragColor\x20=\x20czm_gammaCorrect(fragColor);\x0d\x0a\x20\x20\x20\x20material.emission\x20=\x20fragColor.rgb;\x0d\x0a\x20\x20\x20\x20material.diffuse\x20=\x20fragColor.rgb;\x0d\x0a\x20\x20\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x20\x20\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','cartographicToCartesian','_layerGroupEvent','/**\x0d\x0a\x20*\x20@license\x0d\x0a\x20*\x20Description\x20:\x20Array\x20and\x20textureless\x20GLSL\x202D/3D/4D\x20simplex\x0d\x0a\x20*\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20noise\x20functions.\x0d\x0a\x20*\x20\x20\x20\x20\x20\x20Author\x20:\x20Ian\x20McEwan,\x20Ashima\x20Arts.\x0d\x0a\x20*\x20\x20Maintainer\x20:\x20ijm\x0d\x0a\x20*\x20\x20\x20\x20\x20Lastmod\x20:\x2020110822\x20(ijm)\x0d\x0a\x20*\x20\x20\x20\x20\x20License\x20:\x20Copyright\x20(C)\x202011\x20Ashima\x20Arts.\x20All\x20rights\x20reserved.\x0d\x0a\x20*\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Distributed\x20under\x20the\x20MIT\x20License.\x20See\x20LICENSE\x20file.\x0d\x0a\x20*\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20https://github.com/ashima/webgl-noise\x0d\x0a\x20*/\x0d\x0a\x0d\x0avec4\x20_czm_mod289(vec4\x20x)\x0d\x0a{\x0d\x0a\x20\x20return\x20x\x20-\x20floor(x\x20*\x20(1.0\x20/\x20289.0))\x20*\x20289.0;\x0d\x0a}\x0d\x0a\x0d\x0avec3\x20_czm_mod289(vec3\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20x\x20-\x20floor(x\x20*\x20(1.0\x20/\x20289.0))\x20*\x20289.0;\x0d\x0a}\x0d\x0a\x0d\x0avec2\x20_czm_mod289(vec2\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20x\x20-\x20floor(x\x20*\x20(1.0\x20/\x20289.0))\x20*\x20289.0;\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20_czm_mod289(float\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20x\x20-\x20floor(x\x20*\x20(1.0\x20/\x20289.0))\x20*\x20289.0;\x0d\x0a}\x0d\x0a\x0d\x0avec4\x20_czm_permute(vec4\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20_czm_mod289(((x*34.0)+1.0)*x);\x0d\x0a}\x0d\x0a\x0d\x0avec3\x20_czm_permute(vec3\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20_czm_mod289(((x*34.0)+1.0)*x);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20_czm_permute(float\x20x)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x20_czm_mod289(((x*34.0)+1.0)*x);\x0d\x0a}\x0d\x0a\x0d\x0avec4\x20_czm_taylorInvSqrt(vec4\x20r)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x201.79284291400159\x20-\x200.85373472095314\x20*\x20r;\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20_czm_taylorInvSqrt(float\x20r)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20return\x201.79284291400159\x20-\x200.85373472095314\x20*\x20r;\x0d\x0a}\x0d\x0a\x0d\x0avec4\x20_czm_grad4(float\x20j,\x20vec4\x20ip)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20const\x20vec4\x20ones\x20=\x20vec4(1.0,\x201.0,\x201.0,\x20-1.0);\x0d\x0a\x20\x20\x20\x20vec4\x20p,s;\x0d\x0a\x0d\x0a\x20\x20\x20\x20p.xyz\x20=\x20floor(\x20fract\x20(vec3(j)\x20*\x20ip.xyz)\x20*\x207.0)\x20*\x20ip.z\x20-\x201.0;\x0d\x0a\x20\x20\x20\x20p.w\x20=\x201.5\x20-\x20dot(abs(p.xyz),\x20ones.xyz);\x0d\x0a\x20\x20\x20\x20s\x20=\x20vec4(lessThan(p,\x20vec4(0.0)));\x0d\x0a\x20\x20\x20\x20p.xyz\x20=\x20p.xyz\x20+\x20(s.xyz*2.0\x20-\x201.0)\x20*\x20s.www;\x0d\x0a\x0d\x0a\x20\x20\x20\x20return\x20p;\x0d\x0a}\x0d\x0a\x0d\x0a/**\x0d\x0a\x20*\x20DOC_TBA\x0d\x0a\x20*\x0d\x0a\x20*\x20Implemented\x20by\x20Ian\x20McEwan,\x20Ashima\x20Arts,\x20and\x20distributed\x20under\x20the\x20MIT\x20License.\x20\x20{@link\x20https://github.com/ashima/webgl-noise}\x0d\x0a\x20*\x0d\x0a\x20*\x20@name\x20czm_snoise\x0d\x0a\x20*\x20@glslFunction\x0d\x0a\x20*\x0d\x0a\x20*\x20@see\x20<a\x20href=\x22https://github.com/ashima/webgl-noise\x22>https://github.com/ashima/webgl-noise</a>\x0d\x0a\x20*\x20@see\x20Stefan\x20Gustavson\x27s\x20paper\x20<a\x20href=\x22http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf\x22>Simplex\x20noise\x20demystified</a>\x0d\x0a\x20*/\x0d\x0afloat\x20czm_snoise(vec2\x20v)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20const\x20vec4\x20C\x20=\x20vec4(0.211324865405187,\x20\x20//\x20(3.0-sqrt(3.0))/6.0\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200.366025403784439,\x20\x20//\x200.5*(sqrt(3.0)-1.0)\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-0.577350269189626,\x20\x20//\x20-1.0\x20+\x202.0\x20*\x20C.x\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200.024390243902439);\x20//\x201.0\x20/\x2041.0\x0d\x0a\x20\x20\x20\x20//\x20First\x20corner\x0d\x0a\x20\x20\x20\x20vec2\x20i\x20\x20=\x20floor(v\x20+\x20dot(v,\x20C.yy)\x20);\x0d\x0a\x20\x20\x20\x20vec2\x20x0\x20=\x20v\x20-\x20\x20\x20i\x20+\x20dot(i,\x20C.xx);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Other\x20corners\x0d\x0a\x20\x20\x20\x20vec2\x20i1;\x0d\x0a\x20\x20\x20\x20//i1.x\x20=\x20step(\x20x0.y,\x20x0.x\x20);\x20//\x20x0.x\x20>\x20x0.y\x20?\x201.0\x20:\x200.0\x0d\x0a\x20\x20\x20\x20//i1.y\x20=\x201.0\x20-\x20i1.x;\x0d\x0a\x20\x20\x20\x20i1\x20=\x20(x0.x\x20>\x20x0.y)\x20?\x20vec2(1.0,\x200.0)\x20:\x20vec2(0.0,\x201.0);\x0d\x0a\x20\x20\x20\x20//\x20x0\x20=\x20x0\x20-\x200.0\x20+\x200.0\x20*\x20C.xx\x20;\x0d\x0a\x20\x20\x20\x20//\x20x1\x20=\x20x0\x20-\x20i1\x20+\x201.0\x20*\x20C.xx\x20;\x0d\x0a\x20\x20\x20\x20//\x20x2\x20=\x20x0\x20-\x201.0\x20+\x202.0\x20*\x20C.xx\x20;\x0d\x0a\x20\x20\x20\x20vec4\x20x12\x20=\x20x0.xyxy\x20+\x20C.xxzz;\x0d\x0a\x20\x20\x20\x20x12.xy\x20-=\x20i1;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Permutations\x0d\x0a\x20\x20\x20\x20i\x20=\x20_czm_mod289(i);\x20//\x20Avoid\x20truncation\x20effects\x20in\x20permutation\x0d\x0a\x20\x20\x20\x20vec3\x20p\x20=\x20_czm_permute(\x20_czm_permute(\x20i.y\x20+\x20vec3(0.0,\x20i1.y,\x201.0\x20))\x20+\x20i.x\x20+\x20vec3(0.0,\x20i1.x,\x201.0\x20));\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec3\x20m\x20=\x20max(0.5\x20-\x20vec3(dot(x0,x0),\x20dot(x12.xy,x12.xy),\x20dot(x12.zw,x12.zw)),\x200.0);\x0d\x0a\x20\x20\x20\x20m\x20=\x20m*m\x20;\x0d\x0a\x20\x20\x20\x20m\x20=\x20m*m\x20;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Gradients:\x2041\x20points\x20uniformly\x20over\x20a\x20line,\x20mapped\x20onto\x20a\x20diamond.\x0d\x0a\x20\x20\x20\x20//\x20The\x20ring\x20size\x2017*17\x20=\x20289\x20is\x20close\x20to\x20a\x20multiple\x20of\x2041\x20(41*7\x20=\x20287)\x0d\x0a\x20\x20\x20\x20vec3\x20x\x20=\x202.0\x20*\x20fract(p\x20*\x20C.www)\x20-\x201.0;\x0d\x0a\x20\x20\x20\x20vec3\x20h\x20=\x20abs(x)\x20-\x200.5;\x0d\x0a\x20\x20\x20\x20vec3\x20ox\x20=\x20floor(x\x20+\x200.5);\x0d\x0a\x20\x20\x20\x20vec3\x20a0\x20=\x20x\x20-\x20ox;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Normalise\x20gradients\x20implicitly\x20by\x20scaling\x20m\x0d\x0a\x20\x20\x20\x20//\x20Approximation\x20of:\x20m\x20*=\x20inversesqrt(\x20a0*a0\x20+\x20h*h\x20);\x0d\x0a\x20\x20\x20\x20m\x20*=\x201.79284291400159\x20-\x200.85373472095314\x20*\x20(\x20a0*a0\x20+\x20h*h\x20);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Compute\x20final\x20noise\x20value\x20at\x20P\x0d\x0a\x20\x20\x20\x20vec3\x20g;\x0d\x0a\x20\x20\x20\x20g.x\x20\x20=\x20a0.x\x20\x20*\x20x0.x\x20\x20+\x20h.x\x20\x20*\x20x0.y;\x0d\x0a\x20\x20\x20\x20g.yz\x20=\x20a0.yz\x20*\x20x12.xz\x20+\x20h.yz\x20*\x20x12.yw;\x0d\x0a\x20\x20\x20\x20return\x20130.0\x20*\x20dot(m,\x20g);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20czm_snoise(vec3\x20v)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20const\x20vec2\x20\x20C\x20=\x20vec2(1.0/6.0,\x201.0/3.0)\x20;\x0d\x0a\x20\x20\x20\x20const\x20vec4\x20\x20D\x20=\x20vec4(0.0,\x200.5,\x201.0,\x202.0);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20First\x20corner\x0d\x0a\x20\x20\x20\x20vec3\x20i\x20\x20=\x20floor(v\x20+\x20dot(v,\x20C.yyy)\x20);\x0d\x0a\x20\x20\x20\x20vec3\x20x0\x20=\x20\x20\x20v\x20-\x20i\x20+\x20dot(i,\x20C.xxx)\x20;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Other\x20corners\x0d\x0a\x20\x20\x20\x20vec3\x20g\x20=\x20step(x0.yzx,\x20x0.xyz);\x0d\x0a\x20\x20\x20\x20vec3\x20l\x20=\x201.0\x20-\x20g;\x0d\x0a\x20\x20\x20\x20vec3\x20i1\x20=\x20min(\x20g.xyz,\x20l.zxy\x20);\x0d\x0a\x20\x20\x20\x20vec3\x20i2\x20=\x20max(\x20g.xyz,\x20l.zxy\x20);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20\x20\x20x0\x20=\x20x0\x20-\x200.0\x20+\x200.0\x20*\x20C.xxx;\x0d\x0a\x20\x20\x20\x20//\x20\x20\x20x1\x20=\x20x0\x20-\x20i1\x20\x20+\x201.0\x20*\x20C.xxx;\x0d\x0a\x20\x20\x20\x20//\x20\x20\x20x2\x20=\x20x0\x20-\x20i2\x20\x20+\x202.0\x20*\x20C.xxx;\x0d\x0a\x20\x20\x20\x20//\x20\x20\x20x3\x20=\x20x0\x20-\x201.0\x20+\x203.0\x20*\x20C.xxx;\x0d\x0a\x20\x20\x20\x20vec3\x20x1\x20=\x20x0\x20-\x20i1\x20+\x20C.xxx;\x0d\x0a\x20\x20\x20\x20vec3\x20x2\x20=\x20x0\x20-\x20i2\x20+\x20C.yyy;\x20//\x202.0*C.x\x20=\x201/3\x20=\x20C.y\x0d\x0a\x20\x20\x20\x20vec3\x20x3\x20=\x20x0\x20-\x20D.yyy;\x20\x20\x20\x20\x20\x20//\x20-1.0+3.0*C.x\x20=\x20-0.5\x20=\x20-D.y\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Permutations\x0d\x0a\x20\x20\x20\x20i\x20=\x20_czm_mod289(i);\x0d\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20_czm_permute(\x20_czm_permute(\x20_czm_permute(\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20i.z\x20+\x20vec4(0.0,\x20i1.z,\x20i2.z,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.y\x20+\x20vec4(0.0,\x20i1.y,\x20i2.y,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.x\x20+\x20vec4(0.0,\x20i1.x,\x20i2.x,\x201.0\x20));\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Gradients:\x207x7\x20points\x20over\x20a\x20square,\x20mapped\x20onto\x20an\x20octahedron.\x0d\x0a\x20\x20\x20\x20//\x20The\x20ring\x20size\x2017*17\x20=\x20289\x20is\x20close\x20to\x20a\x20multiple\x20of\x2049\x20(49*6\x20=\x20294)\x0d\x0a\x20\x20\x20\x20float\x20n_\x20=\x200.142857142857;\x20//\x201.0/7.0\x0d\x0a\x20\x20\x20\x20vec3\x20\x20ns\x20=\x20n_\x20*\x20D.wyz\x20-\x20D.xzx;\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20j\x20=\x20p\x20-\x2049.0\x20*\x20floor(p\x20*\x20ns.z\x20*\x20ns.z);\x20\x20//\x20\x20mod(p,7*7)\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20x_\x20=\x20floor(j\x20*\x20ns.z);\x0d\x0a\x20\x20\x20\x20vec4\x20y_\x20=\x20floor(j\x20-\x207.0\x20*\x20x_\x20);\x20\x20\x20\x20//\x20mod(j,N)\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20x\x20=\x20x_\x20*ns.x\x20+\x20ns.yyyy;\x0d\x0a\x20\x20\x20\x20vec4\x20y\x20=\x20y_\x20*ns.x\x20+\x20ns.yyyy;\x0d\x0a\x20\x20\x20\x20vec4\x20h\x20=\x201.0\x20-\x20abs(x)\x20-\x20abs(y);\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20b0\x20=\x20vec4(\x20x.xy,\x20y.xy\x20);\x0d\x0a\x20\x20\x20\x20vec4\x20b1\x20=\x20vec4(\x20x.zw,\x20y.zw\x20);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//vec4\x20s0\x20=\x20vec4(lessThan(b0,0.0))*2.0\x20-\x201.0;\x0d\x0a\x20\x20\x20\x20//vec4\x20s1\x20=\x20vec4(lessThan(b1,0.0))*2.0\x20-\x201.0;\x0d\x0a\x20\x20\x20\x20vec4\x20s0\x20=\x20floor(b0)*2.0\x20+\x201.0;\x0d\x0a\x20\x20\x20\x20vec4\x20s1\x20=\x20floor(b1)*2.0\x20+\x201.0;\x0d\x0a\x20\x20\x20\x20vec4\x20sh\x20=\x20-step(h,\x20vec4(0.0));\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20a0\x20=\x20b0.xzyw\x20+\x20s0.xzyw*sh.xxyy\x20;\x0d\x0a\x20\x20\x20\x20vec4\x20a1\x20=\x20b1.xzyw\x20+\x20s1.xzyw*sh.zzww\x20;\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec3\x20p0\x20=\x20vec3(a0.xy,h.x);\x0d\x0a\x20\x20\x20\x20vec3\x20p1\x20=\x20vec3(a0.zw,h.y);\x0d\x0a\x20\x20\x20\x20vec3\x20p2\x20=\x20vec3(a1.xy,h.z);\x0d\x0a\x20\x20\x20\x20vec3\x20p3\x20=\x20vec3(a1.zw,h.w);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//Normalise\x20gradients\x0d\x0a\x20\x20\x20\x20vec4\x20norm\x20=\x20_czm_taylorInvSqrt(vec4(dot(p0,p0),\x20dot(p1,p1),\x20dot(p2,\x20p2),\x20dot(p3,p3)));\x0d\x0a\x20\x20\x20\x20p0\x20*=\x20norm.x;\x0d\x0a\x20\x20\x20\x20p1\x20*=\x20norm.y;\x0d\x0a\x20\x20\x20\x20p2\x20*=\x20norm.z;\x0d\x0a\x20\x20\x20\x20p3\x20*=\x20norm.w;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Mix\x20final\x20noise\x20value\x0d\x0a\x20\x20\x20\x20vec4\x20m\x20=\x20max(0.6\x20-\x20vec4(dot(x0,x0),\x20dot(x1,x1),\x20dot(x2,x2),\x20dot(x3,x3)),\x200.0);\x0d\x0a\x20\x20\x20\x20m\x20=\x20m\x20*\x20m;\x0d\x0a\x20\x20\x20\x20return\x2042.0\x20*\x20dot(\x20m*m,\x20vec4(\x20dot(p0,x0),\x20dot(p1,x1),\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20dot(p2,x2),\x20dot(p3,x3)\x20)\x20);\x0d\x0a}\x0d\x0a\x0d\x0afloat\x20czm_snoise(vec4\x20v)\x0d\x0a{\x0d\x0a\x20\x20\x20\x20const\x20vec4\x20\x20C\x20=\x20vec4(\x200.138196601125011,\x20\x20//\x20(5\x20-\x20sqrt(5))/20\x20\x20G4\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200.276393202250021,\x20\x20//\x202\x20*\x20G4\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x200.414589803375032,\x20\x20//\x203\x20*\x20G4\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-0.447213595499958);\x20//\x20-1\x20+\x204\x20*\x20G4\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20(sqrt(5)\x20-\x201)/4\x20=\x20F4,\x20used\x20once\x20below\x0d\x0a\x20\x20\x20\x20#define\x20F4\x200.309016994374947451\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20First\x20corner\x0d\x0a\x20\x20\x20\x20vec4\x20i\x20\x20=\x20floor(v\x20+\x20dot(v,\x20vec4(F4))\x20);\x0d\x0a\x20\x20\x20\x20vec4\x20x0\x20=\x20v\x20-\x20\x20\x20i\x20+\x20dot(i,\x20C.xxxx);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Other\x20corners\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Rank\x20sorting\x20originally\x20contributed\x20by\x20Bill\x20Licea-Kane,\x20AMD\x20(formerly\x20ATI)\x0d\x0a\x20\x20\x20\x20vec4\x20i0;\x0d\x0a\x20\x20\x20\x20vec3\x20isX\x20=\x20step(\x20x0.yzw,\x20x0.xxx\x20);\x0d\x0a\x20\x20\x20\x20vec3\x20isYZ\x20=\x20step(\x20x0.zww,\x20x0.yyz\x20);\x0d\x0a\x20\x20\x20\x20//\x20\x20i0.x\x20=\x20dot(\x20isX,\x20vec3(\x201.0\x20)\x20);\x0d\x0a\x20\x20\x20\x20i0.x\x20=\x20isX.x\x20+\x20isX.y\x20+\x20isX.z;\x0d\x0a\x20\x20\x20\x20i0.yzw\x20=\x201.0\x20-\x20isX;\x0d\x0a\x20\x20\x20\x20//\x20\x20i0.y\x20+=\x20dot(\x20isYZ.xy,\x20vec2(\x201.0\x20)\x20);\x0d\x0a\x20\x20\x20\x20i0.y\x20+=\x20isYZ.x\x20+\x20isYZ.y;\x0d\x0a\x20\x20\x20\x20i0.zw\x20+=\x201.0\x20-\x20isYZ.xy;\x0d\x0a\x20\x20\x20\x20i0.z\x20+=\x20isYZ.z;\x0d\x0a\x20\x20\x20\x20i0.w\x20+=\x201.0\x20-\x20isYZ.z;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20i0\x20now\x20contains\x20the\x20unique\x20values\x200,1,2,3\x20in\x20each\x20channel\x0d\x0a\x20\x20\x20\x20vec4\x20i3\x20=\x20clamp(\x20i0,\x200.0,\x201.0\x20);\x0d\x0a\x20\x20\x20\x20vec4\x20i2\x20=\x20clamp(\x20i0-1.0,\x200.0,\x201.0\x20);\x0d\x0a\x20\x20\x20\x20vec4\x20i1\x20=\x20clamp(\x20i0-2.0,\x200.0,\x201.0\x20);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20\x20x0\x20=\x20x0\x20-\x200.0\x20+\x200.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20//\x20\x20x1\x20=\x20x0\x20-\x20i1\x20\x20+\x201.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20//\x20\x20x2\x20=\x20x0\x20-\x20i2\x20\x20+\x202.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20//\x20\x20x3\x20=\x20x0\x20-\x20i3\x20\x20+\x203.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20//\x20\x20x4\x20=\x20x0\x20-\x201.0\x20+\x204.0\x20*\x20C.xxxx\x0d\x0a\x20\x20\x20\x20vec4\x20x1\x20=\x20x0\x20-\x20i1\x20+\x20C.xxxx;\x0d\x0a\x20\x20\x20\x20vec4\x20x2\x20=\x20x0\x20-\x20i2\x20+\x20C.yyyy;\x0d\x0a\x20\x20\x20\x20vec4\x20x3\x20=\x20x0\x20-\x20i3\x20+\x20C.zzzz;\x0d\x0a\x20\x20\x20\x20vec4\x20x4\x20=\x20x0\x20+\x20C.wwww;\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Permutations\x0d\x0a\x20\x20\x20\x20i\x20=\x20_czm_mod289(i);\x0d\x0a\x20\x20\x20\x20float\x20j0\x20=\x20_czm_permute(\x20_czm_permute(\x20_czm_permute(\x20_czm_permute(i.w)\x20+\x20i.z)\x20+\x20i.y)\x20+\x20i.x);\x0d\x0a\x20\x20\x20\x20vec4\x20j1\x20=\x20_czm_permute(\x20_czm_permute(\x20_czm_permute(\x20_czm_permute\x20(\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20i.w\x20+\x20vec4(i1.w,\x20i2.w,\x20i3.w,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.z\x20+\x20vec4(i1.z,\x20i2.z,\x20i3.z,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.y\x20+\x20vec4(i1.y,\x20i2.y,\x20i3.y,\x201.0\x20))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20i.x\x20+\x20vec4(i1.x,\x20i2.x,\x20i3.x,\x201.0\x20));\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Gradients:\x207x7x6\x20points\x20over\x20a\x20cube,\x20mapped\x20onto\x20a\x204-cross\x20polytope\x0d\x0a\x20\x20\x20\x20//\x207*7*6\x20=\x20294,\x20which\x20is\x20close\x20to\x20the\x20ring\x20size\x2017*17\x20=\x20289.\x0d\x0a\x20\x20\x20\x20vec4\x20ip\x20=\x20vec4(1.0/294.0,\x201.0/49.0,\x201.0/7.0,\x200.0)\x20;\x0d\x0a\x0d\x0a\x20\x20\x20\x20vec4\x20p0\x20=\x20_czm_grad4(j0,\x20\x20\x20ip);\x0d\x0a\x20\x20\x20\x20vec4\x20p1\x20=\x20_czm_grad4(j1.x,\x20ip);\x0d\x0a\x20\x20\x20\x20vec4\x20p2\x20=\x20_czm_grad4(j1.y,\x20ip);\x0d\x0a\x20\x20\x20\x20vec4\x20p3\x20=\x20_czm_grad4(j1.z,\x20ip);\x0d\x0a\x20\x20\x20\x20vec4\x20p4\x20=\x20_czm_grad4(j1.w,\x20ip);\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Normalise\x20gradients\x0d\x0a\x20\x20\x20\x20vec4\x20norm\x20=\x20_czm_taylorInvSqrt(vec4(dot(p0,p0),\x20dot(p1,p1),\x20dot(p2,\x20p2),\x20dot(p3,p3)));\x0d\x0a\x20\x20\x20\x20p0\x20*=\x20norm.x;\x0d\x0a\x20\x20\x20\x20p1\x20*=\x20norm.y;\x0d\x0a\x20\x20\x20\x20p2\x20*=\x20norm.z;\x0d\x0a\x20\x20\x20\x20p3\x20*=\x20norm.w;\x0d\x0a\x20\x20\x20\x20p4\x20*=\x20_czm_taylorInvSqrt(dot(p4,p4));\x0d\x0a\x0d\x0a\x20\x20\x20\x20//\x20Mix\x20contributions\x20from\x20the\x20five\x20corners\x0d\x0a\x20\x20\x20\x20vec3\x20m0\x20=\x20max(0.6\x20-\x20vec3(dot(x0,x0),\x20dot(x1,x1),\x20dot(x2,x2)),\x200.0);\x0d\x0a\x20\x20\x20\x20vec2\x20m1\x20=\x20max(0.6\x20-\x20vec2(dot(x3,x3),\x20dot(x4,x4)\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20),\x200.0);\x0d\x0a\x20\x20\x20\x20m0\x20=\x20m0\x20*\x20m0;\x0d\x0a\x20\x20\x20\x20m1\x20=\x20m1\x20*\x20m1;\x0d\x0a\x20\x20\x20\x20return\x2049.0\x20*\x20(\x20dot(m0*m0,\x20vec3(\x20dot(\x20p0,\x20x0\x20),\x20dot(\x20p1,\x20x1\x20),\x20dot(\x20p2,\x20x2\x20)))\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20+\x20dot(m1*m1,\x20vec2(\x20dot(\x20p3,\x20x3\x20),\x20dot(\x20p4,\x20x4\x20)\x20)\x20)\x20)\x20;\x0d\x0a}\x0d\x0a','audioright','contentWindow','MORPH_COMPLETE','text/plain','inline','longitude','duration','radioValue','_clickHandler','response','_delta','maximumLevel\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','screenSpaceEventHandler','skyAtmosphere','KmlDataSource','_content','getOwnPropertyDescriptors','WebMapServiceImageryProvider','param','录音失败,请重试','polyline_volume','toLocaleLowerCase','bindEvent','_getArrowBodyPoints','config','clamp','loading','currentTarget','GATHERING_PLACE','blowUp','vec','headers','trackedPath','http://mt{s}.google.cn/vt/lyrs=t@131,r@227000000&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}&s=Galile','slice','EZUIKitPlayer','_moveHandler','withCredentials','_mountEntity','offsetParent','endPosition','clientWidth','heat','\x27\x20not\x20found.\x20Maybe\x20it\x20was\x20not\x20registered.','imagerySplitPosition','heatmap-canvas','border_color','isImmediatePropagationStopped','title','substr','<span\x20title=\x22对讲\x22>\x20<svg\x20t=\x221581930496966\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20\x20\x20\x20p-id=\x221641\x22\x20width=\x2216\x22\x20height=\x2216\x22>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M715.648\x20647.872c-30.208-22.336-61.568\x2039.36-100.992\x2077.44-39.36\x2038.08-34.112\x2031.488-123.392-17.088S311.488\x20540.224\x20280\x20491.648C248.448\x20443.072\x20265.472\x20424.704\x20265.472\x20424.704s78.72-62.976\x2097.152-81.344c18.368-18.368\x2013.12-30.208\x2013.12-30.208l-128.64-190.144c-23.616-5.184-64.32\x205.12-128.576\x2057.6C54.208\x20233.088\x2030.592\x20353.856\x20151.296\x20575.68c120.768\x20221.824\x20347.84\x20330.752\x20485.568\x20374.08\x20137.856\x2043.328\x20228.416-61.696\x20249.408-103.68\x2021.056-41.984\x2013.12-85.312\x2013.12-85.312S745.856\x20670.208\x20715.648\x20647.872z\x22\x20\x20\x20\x20\x20\x20p-id=\x221642\x22\x20fill=\x22#ff0000\x22></path>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M715.328\x2064C580.992\x2064\x20472.192\x20172.864\x20472.192\x20307.2s108.8\x20243.2\x20243.136\x20243.2\x20243.2-108.864\x20243.2-243.2S849.6\x2064\x20715.328\x2064zM715.328\x20461.056c-84.992\x200-153.856-68.864-153.856-153.856s68.864-153.856\x20153.856-153.856\x20153.856\x2068.928\x20153.856\x20153.856S800.32\x20461.056\x20715.328\x20461.056z\x22\x20\x20\x20\x20\x20\x20p-id=\x221643\x22\x20fill=\x22#ff0000\x22></path>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M777.472\x20277.376c-18.176\x200-32.96-14.784-32.96-33.024\x200-8.448\x203.136-16.064\x208.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2\x200-92.672\x2041.472-92.672\x2092.736s41.472\x2092.736\x2092.672\x2092.736S808.064\x20358.4\x20808.064\x20307.2c0-13.696-3.072-26.688-8.384-38.4C793.728\x20274.112\x20786.048\x20277.376\x20777.472\x20277.376zM715.328\x20340.928c-18.624\x200-33.664-15.104-33.664-33.728\x200-18.624\x2015.04-33.728\x2033.664-33.728\x2018.688\x200\x2033.728\x2015.104\x2033.728\x2033.728C749.056\x20325.824\x20734.016\x20340.928\x20715.328\x20340.928z\x22\x20\x20\x20\x20\x20\x20p-id=\x221644\x22\x20fill=\x22#ff0000\x22></path>\x20\x20</svg>\x20</span><span>关闭对讲</span>','getWidth','DB_CLICK','showDrawEnd','右击结束编辑','_rightClickHandler','terrainProvider','_mountPosition','geodeticSurfaceNormal','childNodes','compass_inner',')(?!px)[a-z%]+$','HEAD','_specularMap','hasDataAttrs','VerticalOrigin','promise','of-type','normalizeBusinessData','oMatchesSelector','_handleMouseDown','path','location','parseHTML','cssNumber','lang','RECTANGLE','geometry','pause','multiplyByScalar','mixin','_updateGradient','position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%','teardown','transformWGS84ToWindow','icon\x20hide','limitCameraToGround','apply','<svg\x20t=\x221590414410633\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20p-id=\x2220545\x22\x20width=\x2216\x22\x20height=\x2216\x22><path\x20d=\x22M840.533333\x2098.133333c-17.066667-17.066667-42.666667-17.066667-59.733333\x200-17.066667\x2017.066667-17.066667\x2042.666667\x200\x2059.733334C883.2\x20256\x20938.666667\x20392.533333\x20938.666667\x20533.333333c0\x20140.8-55.466667\x20277.333333-157.866667\x20375.466667-17.066667\x2017.066667-17.066667\x2042.666667\x200\x2059.733333\x208.533333\x208.533333\x2021.333333\x2012.8\x2029.866667\x2012.8\x208.533333\x200\x2021.333333-4.266667\x2029.866666-12.8\x20115.2-110.933333\x20183.466667-268.8\x20183.466667-435.2\x200-166.4-68.266667-324.266667-183.466667-435.2zM571.733333\x2012.8c-17.066667-8.533333-34.133333-4.266667-46.933333\x208.533333L281.6\x20256H42.666667c-25.6\x200-42.666667\x2017.066667-42.666667\x2042.666667v426.666666c0\x2025.6\x2017.066667\x2042.666667\x2042.666667\x2042.666667h238.933333l243.2\x20234.666667c8.533333\x208.533333\x2017.066667\x2012.8\x2029.866667\x2012.8\x204.266667\x200\x2012.8\x200\x2017.066666-4.266667\x2017.066667-8.533333\x2025.6-21.333333\x2025.6-38.4V51.2c0-17.066667-8.533333-34.133333-25.6-38.4zM512\x20870.4l-183.466667-179.2c-8.533333-4.266667-17.066667-8.533333-29.866666-8.533333H85.333333V341.333333h213.333334c12.8\x200\x2021.333333-4.266667\x2029.866666-12.8L512\x20153.6v716.8z\x22\x20p-id=\x2220546\x22\x20fill=\x22#ffffff\x22></path><path\x20d=\x22M759.466667\x20349.866667c-12.8-21.333333-38.4-25.6-59.733334-8.533334-21.333333\x2012.8-25.6\x2038.4-8.533333\x2059.733334\x2021.333333\x2029.866667\x2034.133333\x2076.8\x2034.133333\x20123.733333\x200\x2046.933333-12.8\x2093.866667-34.133333\x20123.733333-12.8\x2021.333333-8.533333\x2046.933333\x208.533333\x2059.733334\x208.533333\x204.266667\x2017.066667\x208.533333\x2025.6\x208.533333\x2012.8\x200\x2025.6-4.266667\x2034.133334-17.066667\x2034.133333-46.933333\x2051.2-106.666667\x2051.2-174.933333\x200-68.266667-17.066667-128-51.2-174.933333z\x22\x20p-id=\x2220547\x22\x20fill=\x22#ffffff\x22></path></svg>','hide','COORD','X-Requested-With','async','_onPostUpdateHandler','overlayLayer','complete','audioleft','Erosion','AZURE','coordinateSystem','createElementNS','labelStyle','terrain','readOnly','application/x-www-form-urlencoded;\x20charset=UTF-8','cleanData','customTags','Width','baidu','screenSpaceCameraController','_overlayLayer','_alt','rnamespace','Bottom','setAttribute','drawImage','name','postDispatch','number','_rotation_marker','propFix','stopDraw','onunload','zoomOut','data','{y}','_moveActive','GLMapRoam','source','_setCustomClass','string','Top','handlers','&autoplay=1&audio=','CLEARED','stopPropagation','attrHooks','toRadians','_orbitMouseUpFunction','marginLeft','footer','transformMercatorToWGS84','prepend','ajaxSend','pickEllipsoid','toLowerCase','maximumHeights','FILL_AND_OUTLINE','stackTrace','auto','button','prevObject','_cameraHandler','Circle','click','WallTrailMaterialType','ReflectionType','Facet','fromCartesianArray','getCubicValue','namespace','\x27></a><select\x20id=\x27','getResponseHeader','none','draggers','minorDragger','_getArrowPoints','out-ring','.live','isArray','ENABLED','_orbitCursorOpacity','pixelRange','addSeconds','zoomEventTypes','<span\x20title=\x22开启电子放大\x22>\x20\x20<svg\x20id=\x22enableZoom\x22\x20t=\x221578882639834\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201000\x201000\x22\x20version=\x221.1\x22\x20\x20\x20\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20p-id=\x222227\x22\x20width=\x2224\x22\x20height=\x2224\x22>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M830.6119\x20441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559\x20247.3333\x20128.8559\x20441.1089\x20285.9508\x20791.972\x20479.7344\x20791.972\x20830.6119\x20634.8845\x20830.6119\x20441.1089zM483.2821\x20710.4863c-146.7975\x200-265.8187-118.9953-265.8187-265.8088S336.4847\x20178.8697\x20483.2821\x20178.8697s265.8197\x20118.9953\x20265.8197\x20265.8078S630.0796\x20710.4863\x20483.2821\x20710.4863zM770.6031\x20653.5739l-72.6417\x2075.9485\x20141.6917\x20160.1814\x2082.0737-90.0739L770.6031\x20653.5739zM527.5849\x20267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z\x22\x20\x20\x20\x20\x20\x20p-id=\x222228\x22\x20fill=\x22#ffffff\x22></path>\x20\x20</svg></span>','area','distance','\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x22162px\x22\x20height=\x22162px\x22\x20viewBox=\x220\x200\x20162\x20162\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x2043.2\x20(39069)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>compass-outer</title>\x0a\x20\x20\x20\x20<desc>Created\x20with\x20Sketch.</desc>\x0a\x20\x20\x20\x20<defs></defs>\x0a\x20\x20\x20\x20<g\x20id=\x22Page-1\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<g\x20id=\x22compass-outer\x22\x20fill-rule=\x22nonzero\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M80.8410544,161.682109\x20C36.1937731,161.682109\x200,125.488336\x200,80.8410544\x20C0,36.1937731\x2036.1937731,0\x2080.8410544,0\x20C125.488336,0\x20161.682109,36.1937731\x20161.682109,80.8410544\x20C161.682109,125.488336\x20125.488336,161.682109\x2080.8410544,161.682109\x20Z\x20M81.1836011,134.620909\x20C110.696211,134.620909\x20134.620909,110.696211\x20134.620909,81.1836011\x20C134.620909,51.6709916\x20110.696211,27.7462941\x2081.1836011,27.7462941\x20C51.6709916,27.7462941\x2027.7462941,51.6709916\x2027.7462941,81.1836011\x20C27.7462941,110.696211\x2051.6709916,134.620909\x2081.1836011,134.620909\x20Z\x22\x20id=\x22Oval-108\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-74\x22\x20fill=\x22#FFFFFF\x22\x20cx=\x22129.493683\x22\x20cy=\x22127.952092\x22\x20r=\x221.54159147\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-74-Copy-3\x22\x20fill=\x22#FFFFFF\x22\x20cx=\x22129.493683\x22\x20cy=\x2235.4566038\x22\x20r=\x221.54159147\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-74-Copy-5\x22\x20fill=\x22#FFFFFF\x22\x20cx=\x2230.8318294\x22\x20cy=\x22127.952092\x22\x20r=\x221.54159147\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-74-Copy-4\x22\x20fill=\x22#FFFFFF\x22\x20cx=\x2230.8318294\x22\x20cy=\x2235.4566038\x22\x20r=\x221.54159147\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polygon\x20id=\x22N\x22\x20fill=\x22#FFFFFF\x22\x20points=\x2284.9318072\x2023.1238721\x2084.9318072\x2013.1321362\x2082.5623385\x2013.1321362\x2082.5623385\x2019.2984646\x2077.951866\x2013.1321362\x2075.7108625\x2013.1321362\x2075.7108625\x2023.1238721\x2078.0946053\x2023.1238721\x2078.0946053\x2016.9718176\x2082.6908037\x2023.1238721\x22></polygon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polygon\x20id=\x22Line\x22\x20fill=\x22#FFFFFF\x22\x20points=\x22143.368007\x2082.1093476\x20152.617555\x2082.1093476\x20152.617555\x2081.2993476\x20143.368007\x2081.2993476\x22></polygon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polygon\x20id=\x22Line-Copy-8\x22\x20fill=\x22#FFFFFF\x22\x20points=\x229.24954884\x2082.1093476\x2018.4990976\x2082.1093476\x2018.4990976\x2081.2993476\x209.24954884\x2081.2993476\x22></polygon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polygon\x20id=\x22Line\x22\x20fill=\x22#FFFFFF\x22\x20points=\x2281.2993476\x20143.368007\x2081.2993476\x20152.617555\x2082.1093476\x20152.617555\x2082.1093476\x20143.368007\x22></polygon>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</g>\x0a</svg>\x0a','renderpartial','etag','PRE_RENDER','compare','translate3d(','_getOverlayId','POLYLINE','recodeTime','createGoogleImageryLayer','eastNorthUpToFixedFrame','getRanNum','borderLeftWidth','match','</tbody></table>','<svg\x20t=\x221590476263239\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201178\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20p-id=\x222273\x22\x20width=\x2216\x22\x20height=\x2216\x22><path\x20d=\x22M665.6\x2051.2\x20665.6\x2051.2c-10.24-30.72-40.96-51.2-71.68-51.2-5.12\x200-15.36\x200-20.48\x205.12l0\x200L358.4\x20153.6\x2051.2\x20209.92l0\x200C20.48\x20220.16\x200\x20250.88\x200\x20281.6\x200\x20286.72\x200\x20291.84\x200\x20307.2l0\x200\x200\x20409.6\x200\x200c0\x2015.36\x200\x2020.48\x200\x2025.6\x200\x2030.72\x2020.48\x2061.44\x2051.2\x2071.68l0\x200L358.4\x20870.4l97.28\x2071.68\x20107.52\x2076.8\x200\x200c5.12\x205.12\x2015.36\x205.12\x2025.6\x205.12\x2040.96\x200\x2076.8-35.84\x2076.8-76.8\x200-10.24\x200-10.24\x200-25.6l0\x200L665.6\x2051.2zM563.2\x20870.4l-153.6-102.4-307.2-51.2L102.4\x20307.2l307.2-51.2\x20153.6-102.4L563.2\x20870.4z\x22\x20p-id=\x222274\x22\x20fill=\x22#FF0000\x22></path><path\x20d=\x22M1049.6\x20537.6l112.64-112.64c20.48-20.48\x2020.48-56.32\x200-76.8-20.48-20.48-56.32-20.48-76.8\x200L972.8\x20460.8l-112.64-112.64c0\x200\x200\x200\x200\x200-20.48-20.48-56.32-20.48-76.8\x200\x200\x200\x200\x200\x200\x200-20.48\x2020.48-20.48\x2056.32\x200\x2076.8l112.64\x20112.64-112.64\x20112.64c-20.48\x2020.48-20.48\x2056.32\x200\x2076.8\x2020.48\x2020.48\x2056.32\x2020.48\x2076.8\x200L972.8\x20614.4l112.64\x20112.64c20.48\x2020.48\x2056.32\x2020.48\x2076.8\x200s20.48-56.32\x200-76.8L1049.6\x20537.6z\x22\x20p-id=\x222275\x22\x20fill=\x22#FF0000\x22></path></svg>','graphic','_scale','Right','[object\x20Array]','fullScreenCallBack','EZUIKit','Cartographic','clearCloneStyle','atan','label','json\x20jsonp','isActive','DoubleArrow','{z}','unqueued','frontFaceAlphaByDistance','normalize','_min','setHeight','_clusterEventHandler','_color','_getCorridorShape1','Point','content','outline','splitWords','GEOMETRY','_rotateMouseUpFunction','startTalk','createRadialGradient','speed','WaterType','stop','sampleTerrainMostDetailed','_isMoving','headTailFactor','getQuadricBSplineFactor','_bottomRadius','font','getAngleOfThreePoints','script\x20json','class','uniform\x20sampler2D\x20colorTexture;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0auniform\x20float\x20speed;\x0d\x0a\x0d\x0afloat\x20hash(float\x20x){\x0d\x0a\x20\x20return\x20fract(sin(x*23.3)*13.13);\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(){\x0d\x0a\x20\x20float\x20time\x20=\x20czm_frameNumber\x20*\x20speed\x20/\x201000.0;\x0d\x0a\x20\x20vec2\x20resolution\x20=\x20czm_viewport.zw;\x0d\x0a\x20\x20vec2\x20uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\x0d\x0a\x20\x20vec3\x20c=vec3(.1,.2,.3);\x0d\x0a\x20\x20float\x20a=-.3;\x0d\x0a\x20\x20float\x20si=sin(a),co=cos(a);\x0d\x0a\x20\x20uv*=mat2(co,-si,si,co);\x0d\x0a\x20\x20uv*=length(uv+vec2(0,4.9))*.3+1.;\x0d\x0a\x20\x20float\x20v=1.-sin(hash(floor(uv.x*100.))*2.);\x0d\x0a\x20\x20float\x20b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*10.;\x0d\x0a\x20\x20c*=v*b;\x0d\x0a\x20\x20gl_FragColor\x20=\x20mix(texture2D(colorTexture,\x20v_textureCoordinates),\x20vec4(c,1),\x200.5);\x0d\x0a}\x0d\x0a','wgs84ToWindowCoordinates','单击选择点位','TileCoordinatesImageryProvider','setClass','_orbitLastTimestamp','\x20海里','ptp-talk\x20off','fromArray','getBisectorNormals','allowfullscreen','corridor','reject','DOMParser','LabelStyle','onStartEditing','uniform\x20sampler2D\x20colorTexture;\x0d\x0auniform\x20sampler2D\x20depthTexture;\x0d\x0auniform\x20vec4\x20fogByDistance;\x0d\x0auniform\x20vec4\x20fogColor;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0a\x0d\x0afloat\x20getDistance(sampler2D\x20depthTexture,\x20vec2\x20texCoords){\x0d\x0a\x20\x20float\x20depth\x20=\x20czm_unpackDepth(texture2D(depthTexture,\x20texCoords));\x0d\x0a\x20\x20if\x20(depth\x20==\x200.0)\x20{\x0d\x0a\x20\x20\x20\x20return\x20czm_infinity;\x0d\x0a\x20\x20}\x0d\x0a\x20\x20vec4\x20eyeCoordinate\x20=\x20czm_windowToEyeCoordinates(gl_FragCoord.xy,\x20depth);\x0d\x0a\x20\x20return\x20-eyeCoordinate.z\x20/\x20eyeCoordinate.w;\x0d\x0a}\x0d\x0a\x0d\x0a\x0d\x0afloat\x20interpolateByDistance(vec4\x20nearFarScalar,\x20float\x20distance){\x0d\x0a\x20\x20float\x20startDistance\x20=\x20nearFarScalar.x;\x0d\x0a\x20\x20float\x20startValue\x20=\x20nearFarScalar.y;\x0d\x0a\x20\x20float\x20endDistance\x20=\x20nearFarScalar.z;\x0d\x0a\x20\x20float\x20endValue\x20=\x20nearFarScalar.w;\x0d\x0a\x20\x20float\x20t\x20=\x20clamp((distance\x20-\x20startDistance)\x20/\x20(endDistance\x20-\x20startDistance),\x200.0,\x201.0);\x0d\x0a\x20\x20return\x20mix(startValue,\x20endValue,\x20t);\x0d\x0a}\x0d\x0a\x0d\x0avec4\x20alphaBlend(vec4\x20sourceColor,\x20vec4\x20destinationColor){\x0d\x0a\x20\x20return\x20sourceColor\x20*\x20vec4(sourceColor.aaa,\x201.0)\x20+\x20destinationColor\x20*\x20(1.0\x20-\x20sourceColor.a);\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(void){\x0d\x0a\x20\x20float\x20distance\x20=\x20getDistance(depthTexture,\x20v_textureCoordinates);\x0d\x0a\x20\x20vec4\x20sceneColor\x20=\x20texture2D(colorTexture,\x20v_textureCoordinates);\x0d\x0a\x20\x20float\x20blendAmount\x20=\x20interpolateByDistance(fogByDistance,\x20distance);\x0d\x0a\x20\x20vec4\x20finalFogColor\x20=\x20vec4(fogColor.rgb,\x20fogColor.a\x20*\x20blendAmount);\x0d\x0a\x20\x20gl_FragColor\x20=\x20alphaBlend(finalFogColor,\x20sceneColor);\x0d\x0a}\x0d\x0a','contentEditable','_transformWGS84ToHeatmap','RoamingController:\x20time\x20not\x20set\x20','getValueOrUndefined','propertyValue','EllipsoidTerrainProvider','Grass','tileWidth','once','_plane','legend','tweeners','语音设备正忙,请稍后重试','keyValue','BILLBOARD','moveDrawing','fillRect','*name','ArcGISTiledElevationTerrainProvider','time-area','[name=\x27\x27]','fontSize','_getArrowHeadPoints','darkWoodColor','guid','PROPERTIES','https://open.ys7.com/assets/ezuikit_v2.6.4','HeadingPitchRoll','&accessToken=','[selected]','pageYOffset','fromCharCode','renderPartial','_layerGroupCache','fogColor','onscroll','ondblclick','_isActive','selector','constructor','keyCode','alert','timer','accessToken','polygon','px,\x200);\x0a\x20\x20\x20\x20','hdModule','lastPointTemporary','_drawWorker','{labelStyle}','handleTalkError','load\x20error','timeout','removeOverlay','rotation_marker','viewer','_creditContainer','\x0a\x20\x20\x20\x20visibility:hidden;\x0a\x20\x20\x20\x20','uniform\x20vec4\x20lightWoodColor;\x0d\x0auniform\x20vec4\x20darkWoodColor;\x0d\x0auniform\x20float\x20ringFrequency;\x0d\x0auniform\x20vec2\x20noiseScale;\x0d\x0auniform\x20float\x20grainFrequency;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20//Based\x20on\x20wood\x20shader\x20from\x20OpenGL\x20Shading\x20Language\x20(3rd\x20edition)\x20pg.\x20455\x0d\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0d\x0a\x0d\x0a\x20\x20vec2\x20noisevec;\x0d\x0a\x20\x20noisevec.x\x20=\x20czm_snoise(st\x20*\x20noiseScale.x);\x0d\x0a\x20\x20noisevec.y\x20=\x20czm_snoise(st\x20*\x20noiseScale.y);\x0d\x0a\x0d\x0a\x20\x20vec2\x20location\x20=\x20st\x20+\x20noisevec;\x0d\x0a\x20\x20float\x20dist\x20=\x20sqrt(location.x\x20*\x20location.x\x20+\x20location.y\x20*\x20location.y);\x0d\x0a\x20\x20dist\x20*=\x20ringFrequency;\x0d\x0a\x0d\x0a\x20\x20float\x20r\x20=\x20fract(dist\x20+\x20noisevec[0]\x20+\x20noisevec[1])\x20*\x202.0;\x0d\x0a\x20\x20if(r\x20>\x201.0)\x0d\x0a\x20\x20\x20\x20\x20\x20r\x20=\x202.0\x20-\x20r;\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20mix(lightWoodColor,\x20darkWoodColor,\x20r);\x0d\x0a\x0d\x0a\x20\x20//streaks\x0d\x0a\x20\x20r\x20=\x20abs(czm_snoise(vec2(st.x\x20*\x20grainFrequency,\x20st.y\x20*\x20grainFrequency\x20*\x200.02)))\x20*\x200.2;\x0d\x0a\x20\x20color.rgb\x20+=\x20lightWoodColor.rgb\x20*\x20r;\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a','scrollboxSize','_viewerEvent','px,\x200)','postUpdate','RIGHT_UP','RELEASE','polyline','unpackArray','changeDrawing','_updateStyle','_addedHook','http://mt{s}.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Galile','BrickType','ceil','_orbit',':disabled','disconnectedMatch','updateHeightDraggers','CustomDataSource','holdReady','_stopTime','_constant','valHooks','setValue','CircleWaveMaterialProperty','^:(only|first|last|nth|nth-last)-(child|of-type)(?:\x5c(','parsePosition','dataTypes','.hd.live','appendPopup','toString','*(?:\x27\x27|\x22\x22)','isMarsMeasureLabel','pointToData','SceneTransforms','CementType','maximumLevel','requestAnimationFrame','HeadingPitchRange','selectedImagery','_rectangle','</li>','BOTTOM','showSun','computeIcrfToFixedMatrix','_sigma','voice-list-end','createArcGisImageryLayer','circle','plotEvent','createGoogleTerrain','getPickRay','setBillboard','_position','getContext','darkColor','16px\x20SimHei','setInputAction','isDefaultPrevented','MOUSE_OVER','_roll','Tween','lightWoodColor','pixelOffset','free','amplitude','transformCartesianArrayToWGS84Array',':scope','offsetLeft','minMaxPoints','lookAt','addClass','xhrFields','getTime','addMap','div','silhouetteSize','domId','addPosition','\x0a\x20\x20\x20\x20\x20\x20transform:\x20rotate(-','input','params','type|href|height|width','worldToCameraCoordinatesPoint','charCode','http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali','blur\x20focus\x20focusin\x20focusout\x20resize\x20scroll\x20click\x20dblclick\x20mousedown\x20mouseup\x20mousemove\x20mouseover\x20mouseout\x20mouseenter\x20mouseleave\x20change\x20select\x20submit\x20keydown\x20keypress\x20keyup\x20contextmenu','handle','_createEditWorker','removeEventListener','_cameraOption','addLayer','_mouseEl','fillStyle','expand','layerEvent','_normalMapSubscription','rectangle\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.','elements','enableLook','append','nearValue','MIDDLE_UP','fix','tabIndex','_raiseEvent','globalAlpha','uniqueSort','setContent','active','move','border_width','password','cameraController','JulianDate','_installHook','\x20米</span>\x0a\x20\x20\x20\x20','options','defaultXField','Cement','mouse-location','_floatingAnchor','sortDetached','entities','span','setData','requestFullscreen','maxLength','lock','night_vision','isReliesReady','dc-chart','createTencentImageryLayer','selectedIndex','scriptAttrs','ClassificationType','_wrapper','contextmenu','DefaultCubeMapId','<a\x20href=\x27\x27\x20disabled=\x27disabled\x27></a><select\x20disabled=\x27disabled\x27><option/></select>','WebMercatorTilingScheme','dcContainer','_icon','renderVoliceList','/npm/css/recoder.css','FILL','specularMap','_hasClone','rgb(0,255,0)','Plugin\x20\x27','defaultRenderer','maxWidth','Boolean\x20Number\x20String\x20Function\x20Array\x20Date\x20RegExp\x20Object\x20Error\x20Symbol','handle\x20events','removeData','readyState','visibility','resolved','widthRadii','setCoordinator','configure','_mouseMoveHandle','removeAll','Property'];(function(_0xf39a55,_0x1aa99d){var _0x5a29f7=function(_0x4191a4){while(--_0x4191a4){_0xf39a55['push'](_0xf39a55['shift']());}};_0x5a29f7(++_0x1aa99d);}(a0_0x1aa9,0xa3));var a0_0x5a29=function(_0xf39a55,_0x1aa99d){_0xf39a55=_0xf39a55-0x0;var _0x5a29f7=a0_0x1aa9[_0xf39a55];return _0x5a29f7;};!function(_0x309160,_0xe4a19e){a0_0x5a29('0x950')==typeof exports&&'object'==typeof module?module[a0_0x5a29('0x5a')]=_0xe4a19e():a0_0x5a29('0x2ae')==typeof define&&define[a0_0x5a29('0x480')]?define(a0_0x5a29('0x97c'),[],_0xe4a19e):a0_0x5a29('0x950')==typeof exports?exports[a0_0x5a29('0x97c')]=_0xe4a19e():_0x309160['DcCore']=_0xe4a19e();}(window,function(){return function(_0x118ff9){var _0x110310={};function _0x12c3ce(_0x1a9187){if(_0x110310[_0x1a9187])return _0x110310[_0x1a9187][a0_0x5a29('0x5a')];var _0x1f1865=_0x110310[_0x1a9187]={'i':_0x1a9187,'l':!0x1,'exports':{}};return _0x118ff9[_0x1a9187][a0_0x5a29('0x351')](_0x1f1865[a0_0x5a29('0x5a')],_0x1f1865,_0x1f1865[a0_0x5a29('0x5a')],_0x12c3ce),_0x1f1865['l']=!0x0,_0x1f1865[a0_0x5a29('0x5a')];}return _0x12c3ce['m']=_0x118ff9,_0x12c3ce['c']=_0x110310,_0x12c3ce['d']=function(_0x3e3710,_0x2bf3a8,_0x20b014){_0x12c3ce['o'](_0x3e3710,_0x2bf3a8)||Object[a0_0x5a29('0xe7')](_0x3e3710,_0x2bf3a8,{'enumerable':!0x0,'get':_0x20b014});},_0x12c3ce['r']=function(_0x361f86){a0_0x5a29('0x6c2')!=typeof Symbol&&Symbol[a0_0x5a29('0x572')]&&Object[a0_0x5a29('0xe7')](_0x361f86,Symbol[a0_0x5a29('0x572')],{'value':a0_0x5a29('0x282')}),Object[a0_0x5a29('0xe7')](_0x361f86,a0_0x5a29('0x4b4'),{'value':!0x0});},_0x12c3ce['t']=function(_0x56edfa,_0x172c02){if(0x1&_0x172c02&&(_0x56edfa=_0x12c3ce(_0x56edfa)),0x8&_0x172c02)return _0x56edfa;if(0x4&_0x172c02&&a0_0x5a29('0x950')==typeof _0x56edfa&&_0x56edfa&&_0x56edfa[a0_0x5a29('0x4b4')])return _0x56edfa;var _0x584444=Object[a0_0x5a29('0xa')](null);if(_0x12c3ce['r'](_0x584444),Object[a0_0x5a29('0xe7')](_0x584444,a0_0x5a29('0x663'),{'enumerable':!0x0,'value':_0x56edfa}),0x2&_0x172c02&&a0_0x5a29('0x783')!=typeof _0x56edfa)for(var _0x3a08cd in _0x56edfa)_0x12c3ce['d'](_0x584444,_0x3a08cd,function(_0x48b651){return _0x56edfa[_0x48b651];}[a0_0x5a29('0x4fa')](null,_0x3a08cd));return _0x584444;},_0x12c3ce['n']=function(_0x3ee5dd){var _0x5cbd07=_0x3ee5dd&&_0x3ee5dd[a0_0x5a29('0x4b4')]?function(){return _0x3ee5dd['default'];}:function(){return _0x3ee5dd;};return _0x12c3ce['d'](_0x5cbd07,'a',_0x5cbd07),_0x5cbd07;},_0x12c3ce['o']=function(_0x2e5780,_0x5e3450){return Object[a0_0x5a29('0x928')]['hasOwnProperty'][a0_0x5a29('0x351')](_0x2e5780,_0x5e3450);},_0x12c3ce['p']='/',_0x12c3ce(_0x12c3ce['s']=0x28);}([function(_0x5933ec,_0x1160cb){_0x5933ec[a0_0x5a29('0x5a')]=function(_0x2deb32,_0x3ff9a0){if(!(_0x2deb32 instanceof _0x3ff9a0))throw new TypeError(a0_0x5a29('0x315'));};},function(_0x404589,_0x54f6dd){function _0x1ad6c7(_0x1b8c1c,_0x1d1b01){for(var _0x6a4219=0x0;_0x6a4219<_0x1d1b01[a0_0x5a29('0x515')];_0x6a4219++){var _0x5cd444=_0x1d1b01[_0x6a4219];_0x5cd444[a0_0x5a29('0x12e')]=_0x5cd444[a0_0x5a29('0x12e')]||!0x1,_0x5cd444['configurable']=!0x0,a0_0x5a29('0x363')in _0x5cd444&&(_0x5cd444[a0_0x5a29('0x571')]=!0x0),Object[a0_0x5a29('0xe7')](_0x1b8c1c,_0x5cd444[a0_0x5a29('0x2d0')],_0x5cd444);}}_0x404589[a0_0x5a29('0x5a')]=function(_0x4c79db,_0x486125,_0x236fda){return _0x486125&&_0x1ad6c7(_0x4c79db[a0_0x5a29('0x928')],_0x486125),_0x236fda&&_0x1ad6c7(_0x4c79db,_0x236fda),_0x4c79db;};},function(_0x304801,_0x31a5c1){function _0x31c4f6(_0x71006d){return _0x304801[a0_0x5a29('0x5a')]=_0x31c4f6=Object[a0_0x5a29('0x8c')]?Object[a0_0x5a29('0x2a5')]:function(_0x56132c){return _0x56132c[a0_0x5a29('0x5ff')]||Object['getPrototypeOf'](_0x56132c);},_0x31c4f6(_0x71006d);}_0x304801[a0_0x5a29('0x5a')]=_0x31c4f6;},function(_0x5ab59f,_0x337499,_0x208d3d){'use strict';_0x208d3d['d'](_0x337499,'c',function(){return _0x453ff6;}),_0x208d3d['d'](_0x337499,'a',function(){return _0x46dadd;}),_0x208d3d['d'](_0x337499,'b',function(){return _0x4b7494;});var _0x3d9c34=_0x208d3d(0x0),_0x588045=_0x208d3d['n'](_0x3d9c34),_0x35ceab=_0x208d3d(0x1),_0xb411d4=_0x208d3d['n'](_0x35ceab),_0x68c783=a0_0x5a29('0x525')['split'](''),_0x453ff6=function(){function _0xbe489b(){_0x588045()(this,_0xbe489b);}return _0xb411d4()(_0xbe489b,null,[{'key':'uuid','value':function(){var _0x3e2159,_0x4b7428=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:'D',_0x5d4ac1=[];_0x5d4ac1[0x8]=_0x5d4ac1[0xd]=_0x5d4ac1[0x12]=_0x5d4ac1[0x17]='-',_0x5d4ac1[0xe]='4';for(var _0x45332d=0x0;_0x45332d<0x24;_0x45332d++)_0x5d4ac1[_0x45332d]||(_0x3e2159=0x0|0x10*Math[a0_0x5a29('0x27')](),_0x5d4ac1[_0x45332d]=_0x68c783[0x13===_0x45332d?0x3&_0x3e2159|0x8:_0x3e2159]);return _0x4b7428+'-'+_0x5d4ac1[a0_0x5a29('0x1e9')]('');}},{'key':a0_0x5a29('0x65f'),'value':function(_0x12fc42){for(var _0x30d865,_0x34e47b,_0x35952f,_0x971cff,_0x43f370=arguments['length'],_0x3a7090=new Array(_0x43f370>0x1?_0x43f370-0x1:0x0),_0x20de37=0x1;_0x20de37<_0x43f370;_0x20de37++)_0x3a7090[_0x20de37-0x1]=arguments[_0x20de37];for(_0x34e47b=0x0,_0x35952f=_0x3a7090[a0_0x5a29('0x515')];_0x34e47b<_0x35952f;_0x34e47b++)for(_0x30d865 in _0x971cff=_0x3a7090[_0x34e47b])_0x12fc42[_0x30d865]=_0x971cff[_0x30d865];return _0x12fc42;}},{'key':a0_0x5a29('0x7dc'),'value':function(_0x491333){return this[a0_0x5a29('0x30a')](_0x491333)[a0_0x5a29('0xc5')](/\s+/);}},{'key':'setOptions','value':function(_0x55786b,_0x3329bc){for(var _0x39f29f in(_0x55786b['hasOwnProperty']('options')||(_0x55786b[a0_0x5a29('0x8ae')]=_0x55786b[a0_0x5a29('0x8ae')]?Object['create'](_0x55786b['options']):{}),_0x3329bc))_0x55786b['options'][_0x39f29f]=_0x3329bc[_0x39f29f];return _0x55786b[a0_0x5a29('0x8ae')];}},{'key':a0_0x5a29('0x70'),'value':function(_0x4df9f1,_0x453d94){var _0x5228cd=Math[a0_0x5a29('0x938')](0xa,void 0x0===_0x453d94?0x6:_0x453d94);return Math[a0_0x5a29('0x6e7')](_0x4df9f1*_0x5228cd)/_0x5228cd;}},{'key':a0_0x5a29('0x30a'),'value':function(_0xbaa48c){return _0xbaa48c[a0_0x5a29('0x30a')]?_0xbaa48c[a0_0x5a29('0x30a')]():_0xbaa48c['replace'](/^\s+|\s+$/g,'');}},{'key':'emptyImageUrl','value':function(){return'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';}},{'key':a0_0x5a29('0x3a9'),'value':function(_0x39e718){return _0x39e718&&_0x39e718[a0_0x5a29('0x71')](a0_0x5a29('0x4d2'))&&_0x39e718[a0_0x5a29('0x71')](a0_0x5a29('0x3cb'))&&_0x39e718['hasOwnProperty']('_alt');}}]),_0xbe489b;}(),_0x46dadd=function(){function _0x47b501(){_0x588045()(this,_0x47b501);}return _0xb411d4()(_0x47b501,null,[{'key':a0_0x5a29('0x1e'),'value':function(_0x4d83ab){return a0_0x5a29('0x783')==typeof _0x4d83ab?document[a0_0x5a29('0x200')](_0x4d83ab):_0x4d83ab;}},{'key':a0_0x5a29('0x20d'),'value':function(_0x481619,_0xd3d784){var _0x49f972=_0x481619[a0_0x5a29('0x46a')][_0xd3d784]||_0x481619[a0_0x5a29('0x418')]&&_0x481619[a0_0x5a29('0x418')][_0xd3d784];if((!_0x49f972||a0_0x5a29('0x796')===_0x49f972)&&document[a0_0x5a29('0x277')]){var _0x7f6463=document[a0_0x5a29('0x277')][a0_0x5a29('0x8a')](_0x481619,null);_0x49f972=_0x7f6463?_0x7f6463[_0xd3d784]:null;}return'auto'===_0x49f972?null:_0x49f972;}},{'key':a0_0x5a29('0xa'),'value':function(_0x91a039,_0x57cb34){var _0x478a82=arguments[a0_0x5a29('0x515')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:null,_0x243fed=document[a0_0x5a29('0x56f')](_0x91a039);return _0x243fed['className']=_0x57cb34||'',_0x478a82&&_0x478a82[a0_0x5a29('0x365')](_0x243fed),_0x243fed;}},{'key':a0_0x5a29('0x157'),'value':function(_0x5e5191){var _0x4c04a8=_0x5e5191[a0_0x5a29('0x3d5')];_0x4c04a8&&_0x4c04a8[a0_0x5a29('0x58e')](_0x5e5191);}},{'key':a0_0x5a29('0x313'),'value':function(_0x4a7e8f){for(;_0x4a7e8f[a0_0x5a29('0x5a1')];)_0x4a7e8f[a0_0x5a29('0x58e')](_0x4a7e8f[a0_0x5a29('0x5a1')]);}},{'key':a0_0x5a29('0x3ac'),'value':function(_0x1fa59a,_0x2d70e0){if(void 0x0!==_0x1fa59a[a0_0x5a29('0x947')])return _0x1fa59a[a0_0x5a29('0x947')]['contains'](_0x2d70e0);var _0x30cd9d=this['getClass'](_0x1fa59a);return _0x30cd9d['length']>0x0&&new RegExp('(^|\x5cs)'+_0x2d70e0+a0_0x5a29('0x440'))[a0_0x5a29('0x25e')](_0x30cd9d);}},{'key':a0_0x5a29('0x880'),'value':function(_0x5246fc,_0xe8b77a){if(void 0x0!==_0x5246fc[a0_0x5a29('0x947')])for(var _0x2116b5=_0x453ff6[a0_0x5a29('0x7dc')](_0xe8b77a),_0x4625f1=0x0,_0x488161=_0x2116b5[a0_0x5a29('0x515')];_0x4625f1<_0x488161;_0x4625f1++)_0x5246fc[a0_0x5a29('0x947')][a0_0x5a29('0x695')](_0x2116b5[_0x4625f1]);else{if(!this[a0_0x5a29('0x3ac')](_0x5246fc,_0xe8b77a)){var _0xfeca3e=this[a0_0x5a29('0x3e')](_0x5246fc);this[a0_0x5a29('0x7f1')](_0x5246fc,(_0xfeca3e?_0xfeca3e+'\x20':'')+_0xe8b77a);}}}},{'key':a0_0x5a29('0x496'),'value':function(_0xf4f6b6,_0x38c092){void 0x0!==_0xf4f6b6[a0_0x5a29('0x947')]?_0xf4f6b6['classList'][a0_0x5a29('0x157')](_0x38c092):this[a0_0x5a29('0x7f1')](_0xf4f6b6,_0x453ff6[a0_0x5a29('0x30a')](('\x20'+this[a0_0x5a29('0x3e')](_0xf4f6b6)+'\x20')[a0_0x5a29('0x380')]('\x20'+_0x38c092+'\x20','\x20')));}},{'key':'setClass','value':function(_0x575543,_0x345506){void 0x0===_0x575543[a0_0x5a29('0x38b')][a0_0x5a29('0x31f')]?_0x575543[a0_0x5a29('0x38b')]=_0x345506:_0x575543[a0_0x5a29('0x38b')][a0_0x5a29('0x31f')]=_0x345506;}},{'key':a0_0x5a29('0x3e'),'value':function(_0x4e6ba8){return _0x4e6ba8[a0_0x5a29('0x22a')]&&(_0x4e6ba8=_0x4e6ba8[a0_0x5a29('0x22a')]),void 0x0===_0x4e6ba8['className'][a0_0x5a29('0x31f')]?_0x4e6ba8['className']:_0x4e6ba8[a0_0x5a29('0x38b')]['baseVal'];}},{'key':a0_0x5a29('0x88'),'value':function(_0xf6c3ce,_0xd5ca30,_0x594f8b,_0x548fb6){var _0x17d285=document['createElementNS']('http://www.w3.org/2000/svg',a0_0x5a29('0x4da'));_0x17d285[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x90a')),_0x17d285[a0_0x5a29('0x773')](a0_0x5a29('0x96f'),_0xf6c3ce),_0x17d285['setAttribute']('height',_0xd5ca30),_0x17d285[a0_0x5a29('0x773')](a0_0x5a29('0xb3'),a0_0x5a29('0x3c')[a0_0x5a29('0x6c9')](_0xf6c3ce,'\x20')[a0_0x5a29('0x6c9')](_0xd5ca30));var _0x1ae935=document[a0_0x5a29('0x765')](a0_0x5a29('0x445'),a0_0x5a29('0x748'));return _0x1ae935['setAttribute']('d',_0x594f8b),_0x17d285[a0_0x5a29('0x365')](_0x1ae935),_0x548fb6&&_0x548fb6[a0_0x5a29('0x365')](_0x17d285),_0x17d285;}},{'key':a0_0x5a29('0x672'),'value':function(_0x264b58,_0x313338,_0x5c06b0){var _0x5a02fc;_0x313338=null!==(_0x5a02fc=_0x313338)&&void 0x0!==_0x5a02fc&&_0x5a02fc;var _0x470d7e=document[a0_0x5a29('0x56f')](a0_0x5a29('0x884'));return _0x470d7e[a0_0x5a29('0x38b')]=_0x5c06b0||'',_0x470d7e[a0_0x5a29('0x13d')]=_0x264b58,_0x313338?_0x470d7e:_0x470d7e[a0_0x5a29('0x73c')];}},{'key':a0_0x5a29('0x687'),'value':function(_0x373b86){_0x373b86&&(_0x373b86[a0_0x5a29('0x8b7')]?_0x373b86[a0_0x5a29('0x8b7')]():_0x373b86[a0_0x5a29('0x594')]?_0x373b86[a0_0x5a29('0x594')]():_0x373b86[a0_0x5a29('0x360')]?_0x373b86[a0_0x5a29('0x360')]():_0x373b86[a0_0x5a29('0x2e7')]&&_0x373b86[a0_0x5a29('0x2e7')]());}},{'key':a0_0x5a29('0x92c'),'value':function(){document[a0_0x5a29('0x92c')]?document[a0_0x5a29('0x92c')]():document[a0_0x5a29('0x2bd')]?document[a0_0x5a29('0x2bd')]():document[a0_0x5a29('0x4c')]?document[a0_0x5a29('0x4c')]():document[a0_0x5a29('0x552')]&&document['webkitExitFullscreen']();}}]),_0x47b501;}(),_0x30c9e4=0x2*Math['PI'],_0x4b7494=function(){function _0x4f83c7(){_0x588045()(this,_0x4f83c7);}return _0xb411d4()(_0x4f83c7,null,[{'key':'distance','value':function(_0x422fd7,_0x56a2b2){return Math[a0_0x5a29('0x960')](Math['pow'](_0x422fd7[0x0]-_0x56a2b2[0x0],0x2)+Math[a0_0x5a29('0x938')](_0x422fd7[0x1]-_0x56a2b2[0x1],0x2));}},{'key':'wholeDistance','value':function(_0x2c79ce){for(var _0x4c2852=0x0,_0x5d1f6e=0x0;_0x5d1f6e<_0x2c79ce[a0_0x5a29('0x515')]-0x1;_0x5d1f6e++)_0x4c2852+=this[a0_0x5a29('0x7b2')](_0x2c79ce[_0x5d1f6e],_0x2c79ce[_0x5d1f6e+0x1]);return _0x4c2852;}},{'key':a0_0x5a29('0x531'),'value':function(_0x197357){return Math[a0_0x5a29('0x938')](this['wholeDistance'](_0x197357),0.99);}},{'key':a0_0x5a29('0x48f'),'value':function(_0x3ee834,_0x36165c){return[(_0x3ee834[0x0]+_0x36165c[0x0])/0x2,(_0x3ee834[0x1]+_0x36165c[0x1])/0x2];}},{'key':a0_0x5a29('0x659'),'value':function(_0xb55edf,_0x4311c3,_0x334940){var _0x4335b7=[(_0xb55edf[0x0]+_0x4311c3[0x0])/0x2,(_0xb55edf[0x1]+_0x4311c3[0x1])/0x2],_0x238399=[_0x4335b7[0x0]-_0xb55edf[0x1]+_0x4311c3[0x1],_0x4335b7[0x1]+_0xb55edf[0x0]-_0x4311c3[0x0]],_0x4504fe=[(_0xb55edf[0x0]+_0x334940[0x0])/0x2,(_0xb55edf[0x1]+_0x334940[0x1])/0x2],_0xc7df0e=[_0x4504fe[0x0]-_0xb55edf[0x1]+_0x334940[0x1],_0x4504fe[0x1]+_0xb55edf[0x0]-_0x334940[0x0]];return this[a0_0x5a29('0xa9')](_0x4335b7,_0x238399,_0x4504fe,_0xc7df0e);}},{'key':a0_0x5a29('0xa9'),'value':function(_0x46d122,_0x5450cb,_0x49862f,_0x4e7740){var _0x3abdf6,_0x3c00d0,_0x187812;return _0x46d122[0x1]===_0x5450cb[0x1]?[(_0x3c00d0=(_0x4e7740[0x0]-_0x49862f[0x0])/(_0x4e7740[0x1]-_0x49862f[0x1]))*(_0x46d122[0x1]-_0x49862f[0x1])+_0x49862f[0x0],_0x3abdf6=_0x46d122[0x1]]:_0x49862f[0x1]===_0x4e7740[0x1]?[(_0x187812=(_0x5450cb[0x0]-_0x46d122[0x0])/(_0x5450cb[0x1]-_0x46d122[0x1]))*(_0x49862f[0x1]-_0x46d122[0x1])+_0x46d122[0x0],_0x3abdf6=_0x49862f[0x1]]:(_0x187812=(_0x5450cb[0x0]-_0x46d122[0x0])/(_0x5450cb[0x1]-_0x46d122[0x1]),_0x3c00d0=(_0x4e7740[0x0]-_0x49862f[0x0])/(_0x4e7740[0x1]-_0x49862f[0x1]),[_0x187812*(_0x3abdf6=(_0x187812*_0x46d122[0x1]-_0x46d122[0x0]-_0x3c00d0*_0x49862f[0x1]+_0x49862f[0x0])/(_0x187812-_0x3c00d0))-_0x187812*_0x46d122[0x1]+_0x46d122[0x0],_0x3abdf6]);}},{'key':a0_0x5a29('0x40a'),'value':function(_0x103dbd,_0x5535d8){var _0x333784,_0x2588b4=Math[a0_0x5a29('0x2a6')](Math[a0_0x5a29('0x1d2')](_0x5535d8[0x1]-_0x103dbd[0x1])/this[a0_0x5a29('0x7b2')](_0x103dbd,_0x5535d8));return _0x5535d8[0x1]>=_0x103dbd[0x1]&&_0x5535d8[0x0]>=_0x103dbd[0x0]?_0x333784=_0x2588b4+Math['PI']:_0x5535d8[0x1]>=_0x103dbd[0x1]&&_0x5535d8[0x0]<_0x103dbd[0x0]?_0x333784=_0x30c9e4-_0x2588b4:_0x5535d8[0x1]<_0x103dbd[0x1]&&_0x5535d8[0x0]<_0x103dbd[0x0]?_0x333784=_0x2588b4:_0x5535d8[0x1]<_0x103dbd[0x1]&&_0x5535d8[0x0]>=_0x103dbd[0x0]&&(_0x333784=Math['PI']-_0x2588b4),_0x333784;}},{'key':a0_0x5a29('0x7ea'),'value':function(_0x22700d,_0x135693,_0xcccdef){var _0x10651e=this[a0_0x5a29('0x40a')](_0x135693,_0x22700d)-this[a0_0x5a29('0x40a')](_0x135693,_0xcccdef);return _0x10651e<0x0?_0x10651e+_0x30c9e4:_0x10651e;}},{'key':a0_0x5a29('0x4dc'),'value':function(_0x197cb0,_0x376c6d,_0x32d041){return(_0x32d041[0x1]-_0x197cb0[0x1])*(_0x376c6d[0x0]-_0x197cb0[0x0])>(_0x376c6d[0x1]-_0x197cb0[0x1])*(_0x32d041[0x0]-_0x197cb0[0x0]);}},{'key':a0_0x5a29('0x55d'),'value':function(_0x3a8ffa,_0x2699fa,_0xebed03){return[_0x2699fa[0x0]+_0x3a8ffa*(_0xebed03[0x0]-_0x2699fa[0x0]),_0x2699fa[0x1]+_0x3a8ffa*(_0xebed03[0x1]-_0x2699fa[0x1])];}},{'key':a0_0x5a29('0x7a0'),'value':function(_0xf8af26,_0x402b34,_0x31ada1,_0x20b9ae,_0x5be9ad){var _0x160767=0x1-(_0xf8af26=Math['max'](Math[a0_0x5a29('0x5d5')](_0xf8af26,0x1),0x0)),_0xe1ecf1=_0xf8af26*_0xf8af26,_0x18efd5=_0xe1ecf1*_0xf8af26,_0x5a31ee=_0x160767*_0x160767,_0x50e7b6=_0x5a31ee*_0x160767;return[_0x50e7b6*_0x402b34[0x0]+0x3*_0x5a31ee*_0xf8af26*_0x31ada1[0x0]+0x3*_0x160767*_0xe1ecf1*_0x20b9ae[0x0]+_0x18efd5*_0x5be9ad[0x0],_0x50e7b6*_0x402b34[0x1]+0x3*_0x5a31ee*_0xf8af26*_0x31ada1[0x1]+0x3*_0x160767*_0xe1ecf1*_0x20b9ae[0x1]+_0x18efd5*_0x5be9ad[0x1]];}},{'key':'getThirdPoint','value':function(_0x495198,_0xef206d,_0x1695c6,_0x3349fe,_0x410c3f){var _0x1a3b0b=this[a0_0x5a29('0x40a')](_0x495198,_0xef206d),_0x397994=_0x410c3f?_0x1a3b0b+_0x1695c6:_0x1a3b0b-_0x1695c6,_0x155577=_0x3349fe*Math[a0_0x5a29('0x5cc')](_0x397994),_0x59881a=_0x3349fe*Math[a0_0x5a29('0x1a7')](_0x397994);return[_0xef206d[0x0]+_0x155577,_0xef206d[0x1]+_0x59881a];}},{'key':a0_0x5a29('0x423'),'value':function(_0x2630fb,_0x3f0969,_0x14ae1c,_0x12daa9){var _0x27bfe5,_0x50b281,_0x57dbb4=[],_0x319e9a=_0x12daa9-_0x14ae1c;_0x319e9a=_0x319e9a<0x0?_0x319e9a+_0x30c9e4:_0x319e9a;for(var _0x3e57ec=0x0;_0x3e57ec<=0x64;_0x3e57ec++){var _0x4e0cd0=_0x14ae1c+_0x319e9a*_0x3e57ec/0x64;_0x27bfe5=_0x2630fb[0x0]+_0x3f0969*Math[a0_0x5a29('0x5cc')](_0x4e0cd0),_0x50b281=_0x2630fb[0x1]+_0x3f0969*Math[a0_0x5a29('0x1a7')](_0x4e0cd0),_0x57dbb4[a0_0x5a29('0x3cd')]([_0x27bfe5,_0x50b281]);}return _0x57dbb4;}},{'key':'getBisectorNormals','value':function(_0x456736,_0x522edf,_0x166395,_0x27589e){var _0x23d85b,_0xaf8952,_0x39809c,_0x55af57=this['getNormal'](_0x522edf,_0x166395,_0x27589e),_0x26e560=Math[a0_0x5a29('0x960')](_0x55af57[0x0]*_0x55af57[0x0]+_0x55af57[0x1]*_0x55af57[0x1]),_0x48e714=_0x55af57[0x0]/_0x26e560,_0x30026b=_0x55af57[0x1]/_0x26e560,_0x5a8d54=this['distance'](_0x522edf,_0x166395),_0x102dc7=this[a0_0x5a29('0x7b2')](_0x166395,_0x27589e);return _0x26e560>0.0001?this[a0_0x5a29('0x4dc')](_0x522edf,_0x166395,_0x27589e)?(_0x23d85b=_0x456736*_0x5a8d54,_0x39809c=[_0x166395[0x0]-_0x23d85b*_0x30026b,_0x166395[0x1]+_0x23d85b*_0x48e714],_0x23d85b=_0x456736*_0x102dc7,_0xaf8952=[_0x166395[0x0]+_0x23d85b*_0x30026b,_0x166395[0x1]-_0x23d85b*_0x48e714]):(_0x23d85b=_0x456736*_0x5a8d54,_0x39809c=[_0x166395[0x0]+_0x23d85b*_0x30026b,_0x166395[0x1]-_0x23d85b*_0x48e714],_0x23d85b=_0x456736*_0x102dc7,_0xaf8952=[_0x166395[0x0]-_0x23d85b*_0x30026b,_0x166395[0x1]+_0x23d85b*_0x48e714]):(_0x39809c=[_0x166395[0x0]+_0x456736*(_0x522edf[0x0]-_0x166395[0x0]),_0x166395[0x1]+_0x456736*(_0x522edf[0x1]-_0x166395[0x1])],_0xaf8952=[_0x166395[0x0]+_0x456736*(_0x27589e[0x0]-_0x166395[0x0]),_0x166395[0x1]+_0x456736*(_0x27589e[0x1]-_0x166395[0x1])]),[_0x39809c,_0xaf8952];}},{'key':a0_0x5a29('0x2e2'),'value':function(_0x5bc384,_0x34da57,_0x518139){var _0x4b93e3=_0x5bc384[0x0]-_0x34da57[0x0],_0x2cfd33=_0x5bc384[0x1]-_0x34da57[0x1],_0x48ef6b=Math[a0_0x5a29('0x960')](_0x4b93e3*_0x4b93e3+_0x2cfd33*_0x2cfd33);_0x4b93e3/=_0x48ef6b,_0x2cfd33/=_0x48ef6b;var _0x49a83a=_0x518139[0x0]-_0x34da57[0x0],_0x67d3fb=_0x518139[0x1]-_0x34da57[0x1],_0x360e30=Math[a0_0x5a29('0x960')](_0x49a83a*_0x49a83a+_0x67d3fb*_0x67d3fb);return[_0x4b93e3+(_0x49a83a/=_0x360e30),_0x2cfd33+(_0x67d3fb/=_0x360e30)];}},{'key':a0_0x5a29('0xae'),'value':function(_0x5d2ca7,_0x11ebd6){for(var _0x1c750f,_0xa47c46,_0x2bc316,_0xe770b9,_0x42d3f8=[this[a0_0x5a29('0xaa')](_0x5d2ca7,_0x11ebd6)],_0x2976b8=0x0;_0x2976b8<_0x11ebd6[a0_0x5a29('0x515')]-0x2;_0x2976b8++)_0x1c750f=_0x11ebd6[_0x2976b8],_0xa47c46=_0x11ebd6[_0x2976b8+0x1],_0x2bc316=_0x11ebd6[_0x2976b8+0x2],_0xe770b9=this[a0_0x5a29('0x7f6')](_0x5d2ca7,_0x1c750f,_0xa47c46,_0x2bc316),_0x42d3f8=_0x42d3f8[a0_0x5a29('0x6c9')](_0xe770b9);var _0x42c78e=this[a0_0x5a29('0x45f')](_0x5d2ca7,_0x11ebd6);_0x42d3f8[a0_0x5a29('0x3cd')](_0x42c78e);for(var _0x741df4=[],_0x41adb6=0x0;_0x41adb6<_0x11ebd6[a0_0x5a29('0x515')]-0x1;_0x41adb6++){_0x1c750f=_0x11ebd6[_0x41adb6],_0xa47c46=_0x11ebd6[_0x41adb6+0x1],_0x741df4[a0_0x5a29('0x3cd')](_0x1c750f);for(var _0x3a0a79=0x0;_0x3a0a79<0x64;_0x3a0a79++){var _0xe896d2=this[a0_0x5a29('0x7a0')](_0x3a0a79/0x64,_0x1c750f,_0x42d3f8[0x2*_0x41adb6],_0x42d3f8[0x2*_0x41adb6+0x1],_0xa47c46);_0x741df4[a0_0x5a29('0x3cd')](_0xe896d2);}_0x741df4[a0_0x5a29('0x3cd')](_0xa47c46);}return _0x741df4;}},{'key':a0_0x5a29('0xaa'),'value':function(_0x5819e8,_0x3d4593){var _0x33b12b,_0x5ea57a,_0x1e3d8e=_0x3d4593[0x0],_0x16454c=_0x3d4593[0x1],_0x2e3ec9=_0x3d4593[0x2],_0x11b676=this[a0_0x5a29('0x7f6')](0x0,_0x1e3d8e,_0x16454c,_0x2e3ec9)[0x0],_0x1befb6=this[a0_0x5a29('0x2e2')](_0x1e3d8e,_0x16454c,_0x2e3ec9);if(Math[a0_0x5a29('0x960')](_0x1befb6[0x0]*_0x1befb6[0x0]+_0x1befb6[0x1]*_0x1befb6[0x1])>0.0001){var _0x15c5ff=this[a0_0x5a29('0x48f')](_0x1e3d8e,_0x16454c),_0x34470b=_0x1e3d8e[0x0]-_0x15c5ff[0x0],_0x1dc51f=_0x1e3d8e[0x1]-_0x15c5ff[0x1],_0x4f473f=0x2/this[a0_0x5a29('0x7b2')](_0x1e3d8e,_0x16454c),_0x282c27=-_0x4f473f*_0x1dc51f,_0x25ca2d=_0x4f473f*_0x34470b,_0x57f32e=_0x282c27*_0x282c27-_0x25ca2d*_0x25ca2d,_0xf32629=0x2*_0x282c27*_0x25ca2d,_0x4cb02f=_0x25ca2d*_0x25ca2d-_0x282c27*_0x282c27,_0x4f4ebd=_0x11b676[0x0]-_0x15c5ff[0x0],_0xdcdbb0=_0x11b676[0x1]-_0x15c5ff[0x1];_0x33b12b=_0x15c5ff[0x0]+_0x57f32e*_0x4f4ebd+_0xf32629*_0xdcdbb0,_0x5ea57a=_0x15c5ff[0x1]+_0xf32629*_0x4f4ebd+_0x4cb02f*_0xdcdbb0;}else _0x33b12b=_0x1e3d8e[0x0]+_0x5819e8*(_0x16454c[0x0]-_0x1e3d8e[0x0]),_0x5ea57a=_0x1e3d8e[0x1]+_0x5819e8*(_0x16454c[0x1]-_0x1e3d8e[0x1]);return[_0x33b12b,_0x5ea57a];}},{'key':'getRightMostControlPoint','value':function(_0x2c862e,_0x2eaf38){var _0x1ae0d3,_0x339ece,_0xa2123=_0x2eaf38[a0_0x5a29('0x515')],_0x413137=_0x2eaf38[_0xa2123-0x3],_0x28e9a2=_0x2eaf38[_0xa2123-0x2],_0x5c057c=_0x2eaf38[_0xa2123-0x1],_0x2c099f=this['getBisectorNormals'](0x0,_0x413137,_0x28e9a2,_0x5c057c)[0x1],_0x4e7585=this[a0_0x5a29('0x2e2')](_0x413137,_0x28e9a2,_0x5c057c);if(Math[a0_0x5a29('0x960')](_0x4e7585[0x0]*_0x4e7585[0x0]+_0x4e7585[0x1]*_0x4e7585[0x1])>0.0001){var _0x53c7f8=this[a0_0x5a29('0x48f')](_0x28e9a2,_0x5c057c),_0x236553=_0x5c057c[0x0]-_0x53c7f8[0x0],_0x3609b7=_0x5c057c[0x1]-_0x53c7f8[0x1],_0x74a804=0x2/this['distance'](_0x28e9a2,_0x5c057c),_0x3565bf=-_0x74a804*_0x3609b7,_0x2e867b=_0x74a804*_0x236553,_0x17acde=_0x3565bf*_0x3565bf-_0x2e867b*_0x2e867b,_0x39d7f5=0x2*_0x3565bf*_0x2e867b,_0xc4f13f=_0x2e867b*_0x2e867b-_0x3565bf*_0x3565bf,_0x5093a0=_0x2c099f[0x0]-_0x53c7f8[0x0],_0x119bc2=_0x2c099f[0x1]-_0x53c7f8[0x1];_0x1ae0d3=_0x53c7f8[0x0]+_0x17acde*_0x5093a0+_0x39d7f5*_0x119bc2,_0x339ece=_0x53c7f8[0x1]+_0x39d7f5*_0x5093a0+_0xc4f13f*_0x119bc2;}else _0x1ae0d3=_0x5c057c[0x0]+_0x2c862e*(_0x28e9a2[0x0]-_0x5c057c[0x0]),_0x339ece=_0x5c057c[0x1]+_0x2c862e*(_0x28e9a2[0x1]-_0x5c057c[0x1]);return[_0x1ae0d3,_0x339ece];}},{'key':'getBezierPoints','value':function(_0x329448){if(_0x329448['length']<=0x2)return _0x329448;for(var _0x4d9fe7=[],_0xb0bae7=_0x329448[a0_0x5a29('0x515')]-0x1,_0x189ebe=0x0;_0x189ebe<=0x1;_0x189ebe+=0.01){for(var _0x566f40=0x0,_0x22c32b=0x0,_0x1f5d79=0x0;_0x1f5d79<=_0xb0bae7;_0x1f5d79++){var _0x3aed98=this[a0_0x5a29('0x5a3')](_0xb0bae7,_0x1f5d79),_0x34d39a=Math['pow'](_0x189ebe,_0x1f5d79),_0x100991=Math['pow'](0x1-_0x189ebe,_0xb0bae7-_0x1f5d79);_0x566f40+=_0x3aed98*_0x34d39a*_0x100991*_0x329448[_0x1f5d79][0x0],_0x22c32b+=_0x3aed98*_0x34d39a*_0x100991*_0x329448[_0x1f5d79][0x1];}_0x4d9fe7['push']([_0x566f40,_0x22c32b]);}return _0x4d9fe7[a0_0x5a29('0x3cd')](_0x329448[_0xb0bae7]),_0x4d9fe7;}},{'key':a0_0x5a29('0x5a3'),'value':function(_0x5940f5,_0x324a3d){return this['getFactorial'](_0x5940f5)/(this[a0_0x5a29('0x1bf')](_0x324a3d)*this['getFactorial'](_0x5940f5-_0x324a3d));}},{'key':a0_0x5a29('0x1bf'),'value':function(_0x764bb2){if(_0x764bb2<=0x1)return 0x1;if(0x2===_0x764bb2)return 0x2;if(0x3===_0x764bb2)return 0x6;if(0x4===_0x764bb2)return 0x18;if(0x5===_0x764bb2)return 0x78;for(var _0x1b624b=0x1,_0x52e419=0x1;_0x52e419<=_0x764bb2;_0x52e419++)_0x1b624b*=_0x52e419;return _0x1b624b;}},{'key':'getQBSplinePoints','value':function(_0x24245c){if(_0x24245c[a0_0x5a29('0x515')]<=0x2)return _0x24245c;var _0x224025=[],_0x24a2b7=_0x24245c['length']-0x2-0x1;_0x224025[a0_0x5a29('0x3cd')](_0x24245c[0x0]);for(var _0x493f0b=0x0;_0x493f0b<=_0x24a2b7;_0x493f0b++)for(var _0x278f02=0x0;_0x278f02<=0x1;_0x278f02+=0.05){for(var _0x37fb54=0x0,_0x991f98=0x0,_0x46cd7c=0x0;_0x46cd7c<=0x2;_0x46cd7c++){var _0x498c21=this[a0_0x5a29('0x7e7')](_0x46cd7c,_0x278f02);_0x37fb54+=_0x498c21*_0x24245c[_0x493f0b+_0x46cd7c][0x0],_0x991f98+=_0x498c21*_0x24245c[_0x493f0b+_0x46cd7c][0x1];}_0x224025[a0_0x5a29('0x3cd')]([_0x37fb54,_0x991f98]);}return _0x224025[a0_0x5a29('0x3cd')](_0x24245c[_0x24245c[a0_0x5a29('0x515')]-0x1]),_0x224025;}},{'key':'getQuadricBSplineFactor','value':function(_0x1c0eb6,_0xd43370){return 0x0===_0x1c0eb6?Math['pow'](_0xd43370-0x1,0x2)/0x2:0x1===_0x1c0eb6?(-0x2*Math[a0_0x5a29('0x938')](_0xd43370,0x2)+0x2*_0xd43370+0x1)/0x2:0x2===_0x1c0eb6?Math[a0_0x5a29('0x938')](_0xd43370,0x2)/0x2:0x0;}}]),_0x4f83c7;}();},function(_0x2e90be,_0x5ac83e,_0x419293){var _0x3b5f6a=_0x419293(0x38);_0x2e90be['exports']=function(_0x205984,_0x58f4cf){if('function'!=typeof _0x58f4cf&&null!==_0x58f4cf)throw new TypeError('Super\x20expression\x20must\x20either\x20be\x20null\x20or\x20a\x20function');_0x205984['prototype']=Object['create'](_0x58f4cf&&_0x58f4cf['prototype'],{'constructor':{'value':_0x205984,'writable':!0x0,'configurable':!0x0}}),_0x58f4cf&&_0x3b5f6a(_0x205984,_0x58f4cf);};},function(_0x151fea,_0x27ed0d,_0x4c002c){var _0x2a29de=_0x4c002c(0x1a),_0x58e1c7=_0x4c002c(0x14);_0x151fea[a0_0x5a29('0x5a')]=function(_0x42a3fd,_0xe40a47){return!_0xe40a47||a0_0x5a29('0x950')!==_0x2a29de(_0xe40a47)&&a0_0x5a29('0x2ae')!=typeof _0xe40a47?_0x58e1c7(_0x42a3fd):_0xe40a47;};},function(_0x52165a,_0x47e91a,_0x4181ab){'use strict';_0x47e91a['a']={'INITIALIZED':'initialized','ADDED':a0_0x5a29('0x366'),'REMOVED':a0_0x5a29('0x565'),'CLEARED':a0_0x5a29('0x206'),'INSTALLED':a0_0x5a29('0x459'),'ENABLED':a0_0x5a29('0x352'),'DISABLED':'disabled','PLAY':a0_0x5a29('0x8dd'),'PAUSE':'pause','RESTORE':'restore'};},function(_0x261d72,_0x521a48,_0x1a2a0a){'use strict';var _0xc7b43=_0x1a2a0a(0x0),_0x3b0092=_0x1a2a0a['n'](_0xc7b43),_0x54dfdf=_0x1a2a0a(0x1),_0x198c5b=_0x1a2a0a['n'](_0x54dfdf),_0x327f39=_0x1a2a0a(0xd),_0xac1299=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x1bef95=new _0xac1299[(a0_0x5a29('0x35'))](),_0x12aca9=function(){function _0x34d026(){_0x3b0092()(this,_0x34d026);}return _0x198c5b()(_0x34d026,null,[{'key':a0_0x5a29('0x8f'),'value':function(_0x1aed27){if(_0x1aed27){var _0x7a1491=_0xac1299['Ellipsoid'][a0_0x5a29('0x20a')][a0_0x5a29('0x587')](_0x1aed27);return new _0x327f39['a'](_0xac1299['Math'][a0_0x5a29('0x2eb')](_0x7a1491[a0_0x5a29('0x706')]),_0xac1299[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x7a1491[a0_0x5a29('0x517')]),_0x7a1491[a0_0x5a29('0x6b7')]);}return new _0x327f39['a'](0x0,0x0);}},{'key':a0_0x5a29('0x516'),'value':function(_0x2a4519){return _0x2a4519?_0xac1299[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x2a4519['lng'],_0x2a4519[a0_0x5a29('0x5ea')],_0x2a4519['alt'],_0xac1299[a0_0x5a29('0x2b5')]['WGS84']):_0xac1299[a0_0x5a29('0x3bd')]['ZERO'];}},{'key':a0_0x5a29('0x321'),'value':function(_0x19926b){return _0x19926b?_0xac1299[a0_0x5a29('0x7c9')][a0_0x5a29('0x655')](_0x19926b[a0_0x5a29('0x121')],_0x19926b[a0_0x5a29('0x5ea')],_0x19926b[a0_0x5a29('0x624')]):_0xac1299[a0_0x5a29('0x7c9')][a0_0x5a29('0x952')];}},{'key':a0_0x5a29('0x87b'),'value':function(_0x4c6e1f){var _0x3a1963=this;return _0x4c6e1f?_0x4c6e1f[a0_0x5a29('0x95a')](function(_0x483cc6){return _0x3a1963['transformCartesianToWGS84'](_0x483cc6);}):[];}},{'key':'transformWGS84ArrayToCartesianArray','value':function(_0x462c93){var _0x537a75=this;return _0x462c93?_0x462c93[a0_0x5a29('0x95a')](function(_0x38996c){return _0x537a75[a0_0x5a29('0x516')](_0x38996c);}):[];}},{'key':a0_0x5a29('0x1e3'),'value':function(_0x51fa47){var _0x273e87=_0x1bef95['project'](_0xac1299['Cartographic'][a0_0x5a29('0x655')](_0x51fa47[a0_0x5a29('0x121')],_0x51fa47[a0_0x5a29('0x5ea')],_0x51fa47['alt']));return new _0x327f39['a'](_0x273e87['x'],_0x273e87['y'],_0x273e87['z']);}},{'key':a0_0x5a29('0x78e'),'value':function(_0x3a65e4){var _0x417590=_0x1bef95[a0_0x5a29('0x2aa')](new _0xac1299[(a0_0x5a29('0x3bd'))](_0x3a65e4[a0_0x5a29('0x121')],_0x3a65e4[a0_0x5a29('0x5ea')],_0x3a65e4[a0_0x5a29('0x624')]));return new _0x327f39['a'](_0xac1299[a0_0x5a29('0x382')]['toDegrees'](_0x417590[a0_0x5a29('0x706')]),_0xac1299['Math']['toDegrees'](_0x417590['latitude']),_0x417590[a0_0x5a29('0x6b7')]);}},{'key':a0_0x5a29('0x3d1'),'value':function(_0x40b253,_0x564230){var _0x3f1be3,_0x1e39cb=_0x564230['scene'];if(_0x1e39cb[a0_0x5a29('0x48c')]===_0xac1299[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')]){var _0x57079e=_0x1e39cb[a0_0x5a29('0x294')][a0_0x5a29('0x86c')](_0x40b253);_0x3f1be3=_0x1e39cb['globe'][a0_0x5a29('0x50')](_0x57079e,_0x1e39cb);}else _0x3f1be3=_0x1e39cb['camera']['pickEllipsoid'](_0x40b253,_0xac1299['Ellipsoid'][a0_0x5a29('0x20a')]);return this['transformCartesianToWGS84'](_0x3f1be3);}},{'key':a0_0x5a29('0x755'),'value':function(_0x6ae662,_0x5f1755){var _0x2d599a=_0x5f1755[a0_0x5a29('0x238')];return _0xac1299[a0_0x5a29('0x85b')][a0_0x5a29('0x7ee')](_0x2d599a,this[a0_0x5a29('0x516')](_0x6ae662));}}]),_0x34d026;}();_0x521a48['a']=_0x12aca9;},function(_0x26b859,_0x141c80,_0x6e3f34){'use strict';var _0x1a2808=_0x6e3f34(0x0),_0x4ad630=_0x6e3f34['n'](_0x1a2808),_0x12a483=_0x6e3f34(0x1),_0x3bf4c0=_0x6e3f34['n'](_0x12a483),_0x88c0ed=_0x6e3f34(0xd),_0x21778a=function(){function _0x3c6e4c(){_0x4ad630()(this,_0x3c6e4c);}return _0x3bf4c0()(_0x3c6e4c,null,[{'key':a0_0x5a29('0x853'),'value':function(_0x2cf091){var _0x95e650=new _0x88c0ed['a']();return'string'==typeof _0x2cf091?_0x95e650=_0x88c0ed['a'][a0_0x5a29('0x37a')](_0x2cf091):Array[a0_0x5a29('0x7aa')](_0x2cf091)?_0x95e650=_0x88c0ed['a'][a0_0x5a29('0x6ee')](_0x2cf091):_0x2cf091 instanceof _0x88c0ed['a']&&(_0x95e650=_0x2cf091),_0x95e650;}},{'key':a0_0x5a29('0x21d'),'value':function(_0x46f1a7){if(a0_0x5a29('0x783')==typeof _0x46f1a7){if(_0x46f1a7[a0_0x5a29('0x26f')]('#')>=0x0)throw new Error('the\x20positions\x20invalid');_0x46f1a7=_0x46f1a7[a0_0x5a29('0xc5')](';');}return _0x46f1a7[a0_0x5a29('0x95a')](function(_0x56e4d4){return Array['isArray'](_0x56e4d4)&&_0x56e4d4['length']?_0x88c0ed['a']['fromCoordArray'](_0x56e4d4):_0x56e4d4 instanceof _0x88c0ed['a']?_0x56e4d4:a0_0x5a29('0x783')==typeof _0x56e4d4&&_0x56e4d4?_0x88c0ed['a'][a0_0x5a29('0x37a')](_0x56e4d4):void 0x0;});}},{'key':'parsePointCoordToArray','value':function(_0x38a177){return[(_0x38a177=this[a0_0x5a29('0x853')](_0x38a177))[a0_0x5a29('0x121')],_0x38a177[a0_0x5a29('0x5ea')]];}},{'key':'parsePolylineCoordToArray','value':function(_0x5e71a6){var _0x294472=[];return(_0x5e71a6=this['parsePositions'](_0x5e71a6))['forEach'](function(_0x24ddab){_0x294472[a0_0x5a29('0x3cd')]([_0x24ddab[a0_0x5a29('0x121')],_0x24ddab[a0_0x5a29('0x5ea')]]);}),_0x294472;}},{'key':'parsePolygonCoordToArray','value':function(_0x17067f){var _0x49eed7=[];return(_0x17067f=this[a0_0x5a29('0x21d')](_0x17067f))[a0_0x5a29('0x570')](function(_0x4f0ee1){_0x49eed7[a0_0x5a29('0x3cd')]([_0x4f0ee1[a0_0x5a29('0x121')],_0x4f0ee1[a0_0x5a29('0x5ea')]]);}),[_0x49eed7];}}]),_0x3c6e4c;}();_0x141c80['a']=_0x21778a;},function(_0x4731c3,_0x264fec){_0x4731c3[a0_0x5a29('0x5a')]=function(_0x230a38,_0x5af76a,_0x22978f){return _0x5af76a in _0x230a38?Object[a0_0x5a29('0xe7')](_0x230a38,_0x5af76a,{'value':_0x22978f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x230a38[_0x5af76a]=_0x22978f,_0x230a38;};},function(_0x3c8774,_0x5eebd2,_0x1c63a0){'use strict';_0x1c63a0['d'](_0x5eebd2,'d',function(){return _0x312073;}),_0x1c63a0['d'](_0x5eebd2,'g',function(){return _0x4d362e;}),_0x1c63a0['d'](_0x5eebd2,'f',function(){return _0x4a6c43;}),_0x1c63a0['d'](_0x5eebd2,'c',function(){return _0x2c8630;}),_0x1c63a0['d'](_0x5eebd2,'b',function(){return _0x19dfc3;}),_0x1c63a0['d'](_0x5eebd2,'e',function(){return _0x227980;}),_0x1c63a0['d'](_0x5eebd2,'a',function(){return _0x355df9;});var _0x3a537e=_0x1c63a0(0x9),_0x237466=_0x1c63a0['n'](_0x3a537e);function _0x4147da(_0xca910b,_0x50c931){var _0x3ea791=Object[a0_0x5a29('0x148')](_0xca910b);if(Object[a0_0x5a29('0x75')]){var _0x20fb75=Object['getOwnPropertySymbols'](_0xca910b);_0x50c931&&(_0x20fb75=_0x20fb75['filter'](function(_0x30a537){return Object['getOwnPropertyDescriptor'](_0xca910b,_0x30a537)[a0_0x5a29('0x12e')];})),_0x3ea791['push']['apply'](_0x3ea791,_0x20fb75);}return _0x3ea791;}function _0x24b31c(_0x14b8b3){for(var _0x585f75=0x1;_0x585f75<arguments[a0_0x5a29('0x515')];_0x585f75++){var _0x2f80c5=null!=arguments[_0x585f75]?arguments[_0x585f75]:{};_0x585f75%0x2?_0x4147da(Object(_0x2f80c5),!0x0)[a0_0x5a29('0x570')](function(_0x538ca6){_0x237466()(_0x14b8b3,_0x538ca6,_0x2f80c5[_0x538ca6]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x14b8b3,Object[a0_0x5a29('0x711')](_0x2f80c5)):_0x4147da(Object(_0x2f80c5))[a0_0x5a29('0x570')](function(_0x319983){Object['defineProperty'](_0x14b8b3,_0x319983,Object[a0_0x5a29('0x11a')](_0x2f80c5,_0x319983));});}return _0x14b8b3;}var _0x4c351b=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x5d30e2={'ADD':'add','REMOVE':a0_0x5a29('0x157')},_0x312073={'CLICK':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')],'RIGHT_CLICK':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x5ca')],'DB_CLICK':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x946')],'MOUSE_MOVE':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x6eb')],'WHEEL':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x2be')],'MOUSE_OVER':a0_0x5a29('0x235'),'MOUSE_OUT':a0_0x5a29('0x590')},_0x4d362e={'ADD_LAYER':a0_0x5a29('0x894'),'REMOVE_LAYER':a0_0x5a29('0x90b'),'ADD_EFFECT':'addEffect','REMOVE_EFFECT':a0_0x5a29('0x303'),'CLICK':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')],'RIGHT_CLICK':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x5ca')],'DB_CLICK':_0x4c351b[a0_0x5a29('0x1a2')]['LEFT_DOUBLE_CLICK'],'MOUSE_MOVE':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x6eb')],'WHEEL':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x2be')]},_0x4a6c43={'CAMERA_MOVE_END':a0_0x5a29('0x47c'),'CAMERA_CHANGED':'cameraChanged','PRE_UPDATE':a0_0x5a29('0x3e2'),'POST_UPDATE':a0_0x5a29('0x83c'),'PRE_RENDER':'preRender','POST_RENDER':'postRender','MORPH_COMPLETE':a0_0x5a29('0x2f3'),'CLOCK_TICK':a0_0x5a29('0x5eb')},_0x227980=_0x24b31c(_0x24b31c({},_0x5d30e2),{},{'CLICK':_0x4c351b[a0_0x5a29('0x1a2')]['LEFT_CLICK'],'RIGHT_CLICK':_0x4c351b[a0_0x5a29('0x1a2')][a0_0x5a29('0x5ca')],'DB_CLICK':_0x4c351b['ScreenSpaceEventType'][a0_0x5a29('0x946')],'MOUSE_OVER':a0_0x5a29('0x235'),'MOUSE_OUT':a0_0x5a29('0x590')}),_0x2c8630=_0x5d30e2,_0x19dfc3=_0x5d30e2,_0x355df9=_0x5d30e2;},function(_0xd96618,_0x4ab881,_0x44d91f){'use strict';_0x44d91f['d'](_0x4ab881,'h',function(){return _0x1528f0['d'];}),_0x44d91f['d'](_0x4ab881,'l',function(){return _0x1528f0['f'];}),_0x44d91f['d'](_0x4ab881,'f',function(){return _0x1528f0['c'];}),_0x44d91f['d'](_0x4ab881,'d',function(){return _0x1528f0['b'];}),_0x44d91f['d'](_0x4ab881,'j',function(){return _0x1528f0['e'];}),_0x44d91f['d'](_0x4ab881,'a',function(){return _0x1528f0['a'];}),_0x44d91f['d'](_0x4ab881,'b',function(){return _0x204780['a'];}),_0x44d91f['d'](_0x4ab881,'g',function(){return _0x2a2247;}),_0x44d91f['d'](_0x4ab881,'m',function(){return _0x561be5;}),_0x44d91f['d'](_0x4ab881,'k',function(){return _0xd208c0;}),_0x44d91f['d'](_0x4ab881,'e',function(){return _0x2a2ebe;}),_0x44d91f['d'](_0x4ab881,'c',function(){return _0x292bf8;}),_0x44d91f['d'](_0x4ab881,'i',function(){return _0x25e139;});var _0x1528f0=_0x44d91f(0xa),_0x204780=_0x44d91f(0x10),_0x2825f3=_0x44d91f(0x9),_0xfe4264=_0x44d91f['n'](_0x2825f3),_0x3b27c0=_0x44d91f(0x0),_0x186c15=_0x44d91f['n'](_0x3b27c0),_0x5a5a8d=_0x44d91f(0x1),_0x7d3f91=_0x44d91f['n'](_0x5a5a8d),_0x49b41f=_0x44d91f(0x14),_0x237720=_0x44d91f['n'](_0x49b41f),_0x4c19d4=_0x44d91f(0x4),_0x3681b8=_0x44d91f['n'](_0x4c19d4),_0x1e4266=_0x44d91f(0x5),_0x5517de=_0x44d91f['n'](_0x1e4266),_0x179a20=_0x44d91f(0x2),_0x486505=_0x44d91f['n'](_0x179a20);function _0x286b33(_0xfc080b,_0x520611){var _0x2e284a=Object[a0_0x5a29('0x148')](_0xfc080b);if(Object['getOwnPropertySymbols']){var _0x122e1c=Object[a0_0x5a29('0x75')](_0xfc080b);_0x520611&&(_0x122e1c=_0x122e1c['filter'](function(_0x52e713){return Object['getOwnPropertyDescriptor'](_0xfc080b,_0x52e713)[a0_0x5a29('0x12e')];})),_0x2e284a[a0_0x5a29('0x3cd')]['apply'](_0x2e284a,_0x122e1c);}return _0x2e284a;}function _0x592a1b(_0x2a7591){for(var _0x223ca5=0x1;_0x223ca5<arguments[a0_0x5a29('0x515')];_0x223ca5++){var _0x6dc129=null!=arguments[_0x223ca5]?arguments[_0x223ca5]:{};_0x223ca5%0x2?_0x286b33(Object(_0x6dc129),!0x0)[a0_0x5a29('0x570')](function(_0x8b2f8e){_0xfe4264()(_0x2a7591,_0x8b2f8e,_0x6dc129[_0x8b2f8e]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x2a7591,Object[a0_0x5a29('0x711')](_0x6dc129)):_0x286b33(Object(_0x6dc129))[a0_0x5a29('0x570')](function(_0x2d694c){Object['defineProperty'](_0x2a7591,_0x2d694c,Object[a0_0x5a29('0x11a')](_0x6dc129,_0x2d694c));});}return _0x2a7591;}function _0x1ef247(_0x5a0887){var _0x3be479=function(){if('undefined'==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x33f60b){return!0x1;}}();return function(){var _0x48950d,_0xf18404=_0x486505()(_0x5a0887);if(_0x3be479){var _0x4b6063=_0x486505()(this)[a0_0x5a29('0x825')];_0x48950d=Reflect[a0_0x5a29('0x138')](_0xf18404,arguments,_0x4b6063);}else _0x48950d=_0xf18404[a0_0x5a29('0x758')](this,arguments);return _0x5517de()(this,_0x48950d);};}var _0x1c36e3=DC['Namespace'][a0_0x5a29('0x6e8')],_0x2a2247=function(_0xbb2730){_0x3681b8()(_0x28cfdb,_0xbb2730);var _0x320b6c=_0x1ef247(_0x28cfdb);function _0x28cfdb(_0x3fc1ee){var _0x2a9075;return _0x186c15()(this,_0x28cfdb),(_0x2a9075=_0x320b6c[a0_0x5a29('0x351')](this))[a0_0x5a29('0x673')]=_0x3fc1ee,_0x2a9075['_selected']=void 0x0,_0x2a9075[a0_0x5a29('0x1f2')](),_0x2a9075['on'](_0x1528f0['d'][a0_0x5a29('0x5e9')],_0x2a9075['_clickHandler'],_0x237720()(_0x2a9075)),_0x2a9075['on'](_0x1528f0['d']['DB_CLICK'],_0x2a9075[a0_0x5a29('0x4eb')],_0x237720()(_0x2a9075)),_0x2a9075['on'](_0x1528f0['d'][a0_0x5a29('0x5ca')],_0x2a9075[a0_0x5a29('0x738')],_0x237720()(_0x2a9075)),_0x2a9075['on'](_0x1528f0['d'][a0_0x5a29('0x6eb')],_0x2a9075[a0_0x5a29('0x914')],_0x237720()(_0x2a9075)),_0x2a9075['on'](_0x1528f0['d'][a0_0x5a29('0x2be')],_0x2a9075[a0_0x5a29('0xc9')],_0x237720()(_0x2a9075)),_0x2a9075;}return _0x7d3f91()(_0x28cfdb,[{'key':'_setInputAction','value':function(){var _0x20ebef=this,_0x1a0df5=new _0x1c36e3[(a0_0x5a29('0x58b'))](this[a0_0x5a29('0x673')][a0_0x5a29('0x662')]);Object['keys'](_0x1c36e3['ScreenSpaceEventType'])[a0_0x5a29('0x570')](function(_0x979f89){var _0x5025a8=_0x1c36e3[a0_0x5a29('0x1a2')][_0x979f89];_0x20ebef[a0_0x5a29('0x931')][_0x5025a8]=new _0x1c36e3[(a0_0x5a29('0x22f'))](),_0x1a0df5[a0_0x5a29('0x872')](function(_0xa3477){_0x20ebef['_cache'][_0x5025a8]['raiseEvent'](_0xa3477);},_0x5025a8);});}},{'key':a0_0x5a29('0x971'),'value':function(_0x4b19c3){var _0x316a45,_0x31c7b2=this[a0_0x5a29('0x673')]['scene'],_0x514fa9=_0x31c7b2[a0_0x5a29('0x50')](_0x4b19c3),_0x298847=void 0x0;if(_0x31c7b2[a0_0x5a29('0x62e')]&&(_0x298847=_0x31c7b2[a0_0x5a29('0x620')](_0x4b19c3)),_0x31c7b2[a0_0x5a29('0x48c')]===_0x1c36e3[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')]){var _0x2f1a48=_0x31c7b2[a0_0x5a29('0x294')][a0_0x5a29('0x86c')](_0x4b19c3);_0x316a45=_0x31c7b2[a0_0x5a29('0x6a4')][a0_0x5a29('0x50')](_0x2f1a48,_0x31c7b2);}else _0x316a45=_0x31c7b2['camera'][a0_0x5a29('0x791')](_0x4b19c3,_0x1c36e3[a0_0x5a29('0x2b5')][a0_0x5a29('0x20a')]);return{'target':_0x514fa9,'windowPosition':_0x4b19c3,'position':_0x298847,'surfacePosition':_0x316a45};}},{'key':a0_0x5a29('0x7b9'),'value':function(_0x211a7f){var _0x1fd7cd=void 0x0;return _0x211a7f&&_0x211a7f['id']&&_0x211a7f['id']instanceof _0x1c36e3[a0_0x5a29('0x608')]&&(_0x1fd7cd=_0x211a7f['id'][a0_0x5a29('0xf9')]),_0x211a7f&&_0x211a7f instanceof _0x1c36e3[a0_0x5a29('0x4f5')]&&(_0x1fd7cd=_0x211a7f['tileset'][a0_0x5a29('0xf9')]),_0x1fd7cd;}},{'key':a0_0x5a29('0x36f'),'value':function(_0x36bda9){var _0x5a3c8c=void 0x0,_0x15b403=void 0x0,_0x3743bb=void 0x0;return(_0x36bda9&&_0x36bda9['id']&&_0x36bda9['id']instanceof _0x1c36e3[a0_0x5a29('0x608')]&&(_0x15b403=this['_viewer'][a0_0x5a29('0x4f9')]()[a0_0x5a29('0x48a')](function(_0x448c98){return _0x448c98['layerId']===_0x36bda9['id'][a0_0x5a29('0x6a6')];})[0x0])&&_0x15b403[a0_0x5a29('0x126')]&&(_0x5a3c8c=_0x15b403[a0_0x5a29('0x126')](_0x36bda9['id'][a0_0x5a29('0xf9')])),_0x36bda9&&_0x36bda9 instanceof _0x1c36e3[a0_0x5a29('0x4f5')])&&(_0x15b403=this[a0_0x5a29('0x673')][a0_0x5a29('0x4f9')]()[a0_0x5a29('0x48a')](function(_0x19f2d2){return _0x19f2d2[a0_0x5a29('0x6a6')]===_0x36bda9['tileset'][a0_0x5a29('0x6a6')];})[0x0],_0x3743bb=_0x36bda9,_0x15b403&&_0x15b403[a0_0x5a29('0x126')]&&(_0x5a3c8c=_0x15b403['getOverlay'](_0x36bda9[a0_0x5a29('0x1ca')][a0_0x5a29('0xf9')]),_0x3743bb&&_0x3743bb[a0_0x5a29('0x527')]&&_0x3743bb[a0_0x5a29('0x527')]()[a0_0x5a29('0x570')](function(_0x59eba7){_0x5a3c8c[a0_0x5a29('0x5c6')][_0x59eba7]=_0x3743bb[a0_0x5a29('0x3ee')](_0x59eba7);}))),{'layer':_0x15b403,'overlay':_0x5a3c8c,'feature':_0x3743bb};}},{'key':a0_0x5a29('0x8a2'),'value':function(_0xc400bb){var _0x37f182=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{},_0x3eead6=void 0x0,_0x5b7d67=this[a0_0x5a29('0x36f')](_0x37f182[a0_0x5a29('0x28a')]),_0x228847=null==_0x5b7d67?void 0x0:_0x5b7d67[a0_0x5a29('0x286')];_0x228847&&_0x228847[a0_0x5a29('0x680')]&&(_0x3eead6=_0x228847[a0_0x5a29('0x680')]['getEvent'](_0xc400bb)),_0x3eead6&&0x0!==_0x3eead6['numberOfListeners']||(_0x3eead6=this['_viewer'][a0_0x5a29('0x333')]['getEvent'](_0xc400bb)),_0x3eead6&&_0x3eead6[a0_0x5a29('0x3dc')]>0x0&&_0x3eead6[a0_0x5a29('0x1a0')](_0x592a1b(_0x592a1b({},_0x5b7d67),_0x37f182));}},{'key':'_clickHandler','value':function(_0x30268d){if(!_0x30268d||!_0x30268d[a0_0x5a29('0x53c')])return!0x1;var _0x16117d=this[a0_0x5a29('0x971')](_0x30268d['position']);this[a0_0x5a29('0x8a2')](_0x1528f0['d'][a0_0x5a29('0x5e9')],_0x16117d);}},{'key':a0_0x5a29('0x4eb'),'value':function(_0x28e8eb){if(!_0x28e8eb||!_0x28e8eb[a0_0x5a29('0x53c')])return!0x1;var _0xa18156=this[a0_0x5a29('0x971')](_0x28e8eb[a0_0x5a29('0x53c')]);this['_raiseEvent'](_0x1528f0['d'][a0_0x5a29('0x735')],_0xa18156);}},{'key':a0_0x5a29('0x738'),'value':function(_0xc29b5a){if(!_0xc29b5a||!_0xc29b5a[a0_0x5a29('0x53c')])return!0x1;var _0x2da2a9=this[a0_0x5a29('0x971')](_0xc29b5a[a0_0x5a29('0x53c')]);this[a0_0x5a29('0x8a2')](_0x1528f0['d'][a0_0x5a29('0x5ca')],_0x2da2a9);}},{'key':a0_0x5a29('0x914'),'value':function(_0x2180c2){if(!_0x2180c2||!_0x2180c2[a0_0x5a29('0x729')])return!0x1;var _0x2d8d0a=this['_getMouseInfo'](_0x2180c2[a0_0x5a29('0x729')]);this[a0_0x5a29('0x673')][a0_0x5a29('0x662')][a0_0x5a29('0x46a')][a0_0x5a29('0x1cb')]=_0x2d8d0a[a0_0x5a29('0x28a')]?a0_0x5a29('0x1e4'):a0_0x5a29('0x663'),this[a0_0x5a29('0x8a2')](_0x1528f0['d'][a0_0x5a29('0x6eb')],_0x2d8d0a),this[a0_0x5a29('0x57e')]&&this[a0_0x5a29('0x7b9')](this[a0_0x5a29('0x57e')][a0_0x5a29('0x28a')])===this[a0_0x5a29('0x7b9')](_0x2d8d0a[a0_0x5a29('0x28a')])||(this[a0_0x5a29('0x8a2')](_0x1528f0['d']['MOUSE_OUT'],this['_selected']),this[a0_0x5a29('0x8a2')](_0x1528f0['d'][a0_0x5a29('0x874')],_0x2d8d0a),this[a0_0x5a29('0x57e')]=_0x2d8d0a);}},{'key':a0_0x5a29('0xc9'),'value':function(_0x25e25f){this[a0_0x5a29('0x8a2')](_0x1528f0['d'][a0_0x5a29('0x2be')],{'movement':_0x25e25f});}}]),_0x28cfdb;}(_0x204780['a']);function _0x24b232(_0x2e0c9b){var _0x549b2e=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype']['toString']['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x345bab){return!0x1;}}();return function(){var _0x460a82,_0x7077b3=_0x486505()(_0x2e0c9b);if(_0x549b2e){var _0x5c6ca3=_0x486505()(this)[a0_0x5a29('0x825')];_0x460a82=Reflect[a0_0x5a29('0x138')](_0x7077b3,arguments,_0x5c6ca3);}else _0x460a82=_0x7077b3[a0_0x5a29('0x758')](this,arguments);return _0x5517de()(this,_0x460a82);};}var _0x5eff56=DC['Namespace'][a0_0x5a29('0x6e8')],_0x561be5=function(_0x480139){_0x3681b8()(_0x4cc022,_0x480139);var _0x149286=_0x24b232(_0x4cc022);function _0x4cc022(){return _0x186c15()(this,_0x4cc022),_0x149286[a0_0x5a29('0x351')](this);}return _0x7d3f91()(_0x4cc022,[{'key':'_registerEvent','value':function(){var _0xb7e3a=this;Object['keys'](_0x1528f0['g'])[a0_0x5a29('0x570')](function(_0x214649){var _0x4b22ba=_0x1528f0['g'][_0x214649];_0xb7e3a[a0_0x5a29('0x931')][_0x4b22ba]=new _0x5eff56['Event']();});}}]),_0x4cc022;}(_0x204780['a']);function _0xb120c5(_0x39713e){var _0x3d1eec=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x11c6be){return!0x1;}}();return function(){var _0x416016,_0x4f3d06=_0x486505()(_0x39713e);if(_0x3d1eec){var _0x83a6a8=_0x486505()(this)[a0_0x5a29('0x825')];_0x416016=Reflect[a0_0x5a29('0x138')](_0x4f3d06,arguments,_0x83a6a8);}else _0x416016=_0x4f3d06[a0_0x5a29('0x758')](this,arguments);return _0x5517de()(this,_0x416016);};}var _0xd208c0=function(_0x1d0e2b){_0x3681b8()(_0x27e434,_0x1d0e2b);var _0x5946d5=_0xb120c5(_0x27e434);function _0x27e434(_0x2bdd81){var _0x4fbf0a;return _0x186c15()(this,_0x27e434),(_0x4fbf0a=_0x5946d5['call'](this))[a0_0x5a29('0xa6')]=_0x2bdd81['delegate'][a0_0x5a29('0x294')],_0x4fbf0a['_scene']=_0x2bdd81[a0_0x5a29('0x67e')][a0_0x5a29('0x238')],_0x4fbf0a['_clock']=_0x2bdd81[a0_0x5a29('0x67e')]['clock'],_0x4fbf0a;}return _0x7d3f91()(_0x27e434,[{'key':'on','value':function(_0x54ad09,_0x209f1a,_0x12f9ca){var _0x143a70=void 0x0;switch(_0x54ad09){case _0x1528f0['f'][a0_0x5a29('0x96')]:_0x143a70=this[a0_0x5a29('0xa6')][a0_0x5a29('0x348')][a0_0x5a29('0x464')](_0x209f1a,_0x12f9ca||this);break;case _0x1528f0['f'][a0_0x5a29('0x13b')]:_0x143a70=this[a0_0x5a29('0xa6')][a0_0x5a29('0x3da')][a0_0x5a29('0x464')](_0x209f1a,_0x12f9ca||this);break;case _0x1528f0['f'][a0_0x5a29('0x136')]:_0x143a70=this[a0_0x5a29('0x3a5')][a0_0x5a29('0x3e2')]['addEventListener'](_0x209f1a,_0x12f9ca||this);break;case _0x1528f0['f'][a0_0x5a29('0x194')]:_0x143a70=this[a0_0x5a29('0x3a5')][a0_0x5a29('0x83c')]['addEventListener'](_0x209f1a,_0x12f9ca||this);break;case _0x1528f0['f'][a0_0x5a29('0x7b6')]:_0x143a70=this['_scene']['preRender'][a0_0x5a29('0x464')](_0x209f1a,_0x12f9ca||this);break;case _0x1528f0['f']['POST_RENDER']:_0x143a70=this[a0_0x5a29('0x3a5')][a0_0x5a29('0x225')][a0_0x5a29('0x464')](_0x209f1a,_0x12f9ca||this);break;case _0x1528f0['f'][a0_0x5a29('0x703')]:_0x143a70=this[a0_0x5a29('0x3a5')][a0_0x5a29('0x2f3')][a0_0x5a29('0x464')](_0x209f1a,_0x12f9ca||this);break;case _0x1528f0['f']['CLOCK_TICK']:_0x143a70=this['_clock'][a0_0x5a29('0x554')][a0_0x5a29('0x464')](_0x209f1a,_0x12f9ca||this);}return _0x143a70;}},{'key':a0_0x5a29('0x59a'),'value':function(_0x3e4e1d,_0x2eca4b,_0x1f9406){var _0x59bb94=!0x1;switch(_0x3e4e1d){case _0x1528f0['f']['CAMERA_MOVE_END']:_0x59bb94=this[a0_0x5a29('0xa6')][a0_0x5a29('0x348')][a0_0x5a29('0x892')](_0x2eca4b,_0x1f9406||this);break;case _0x1528f0['f'][a0_0x5a29('0x13b')]:_0x59bb94=this[a0_0x5a29('0xa6')][a0_0x5a29('0x3da')]['removeEventListener'](_0x2eca4b,_0x1f9406||this);break;case _0x1528f0['f']['PRE_UPDATE']:_0x59bb94=this[a0_0x5a29('0x3a5')][a0_0x5a29('0x3e2')]['removeEventListener'](_0x2eca4b,_0x1f9406||this);break;case _0x1528f0['f'][a0_0x5a29('0x194')]:_0x59bb94=this[a0_0x5a29('0x3a5')]['postUpdate']['removeEventListener'](_0x2eca4b,_0x1f9406||this);break;case _0x1528f0['f'][a0_0x5a29('0x7b6')]:_0x59bb94=this[a0_0x5a29('0x3a5')][a0_0x5a29('0x8fd')][a0_0x5a29('0x892')](_0x2eca4b,_0x1f9406||this);break;case _0x1528f0['f'][a0_0x5a29('0x6f0')]:_0x59bb94=this[a0_0x5a29('0x3a5')][a0_0x5a29('0x225')][a0_0x5a29('0x892')](_0x2eca4b,_0x1f9406||this);break;case _0x1528f0['f'][a0_0x5a29('0x703')]:_0x59bb94=this['_scene'][a0_0x5a29('0x2f3')][a0_0x5a29('0x892')](_0x2eca4b,_0x1f9406||this);break;case _0x1528f0['f']['CLOCK_TICK']:_0x59bb94=this[a0_0x5a29('0x5b')][a0_0x5a29('0x554')]['removeEventListener'](_0x2eca4b,_0x1f9406||this);}return _0x59bb94;}}]),_0x27e434;}(_0x204780['a']);function _0x586a1f(_0x5b575c){var _0x13ff79=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct']['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype']['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x4cb1c8){return!0x1;}}();return function(){var _0x3b3f8b,_0x426c6c=_0x486505()(_0x5b575c);if(_0x13ff79){var _0x52c061=_0x486505()(this)[a0_0x5a29('0x825')];_0x3b3f8b=Reflect['construct'](_0x426c6c,arguments,_0x52c061);}else _0x3b3f8b=_0x426c6c[a0_0x5a29('0x758')](this,arguments);return _0x5517de()(this,_0x3b3f8b);};}var _0x5d2053=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2a2ebe=function(_0x35d3f2){_0x3681b8()(_0x557c8f,_0x35d3f2);var _0x40d8eb=_0x586a1f(_0x557c8f);function _0x557c8f(){return _0x186c15()(this,_0x557c8f),_0x40d8eb['call'](this);}return _0x7d3f91()(_0x557c8f,[{'key':a0_0x5a29('0x343'),'value':function(){var _0x587504=this;Object[a0_0x5a29('0x148')](_0x1528f0['c'])[a0_0x5a29('0x570')](function(_0x44bb8a){var _0x580472=_0x1528f0['c'][_0x44bb8a];_0x587504['_cache'][_0x580472]=new _0x5d2053['Event']();});}}]),_0x557c8f;}(_0x204780['a']);function _0x99de5a(_0x4dff70){var _0x305e85=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x529840){return!0x1;}}();return function(){var _0x3976f9,_0x50832d=_0x486505()(_0x4dff70);if(_0x305e85){var _0x4ee904=_0x486505()(this)[a0_0x5a29('0x825')];_0x3976f9=Reflect[a0_0x5a29('0x138')](_0x50832d,arguments,_0x4ee904);}else _0x3976f9=_0x50832d[a0_0x5a29('0x758')](this,arguments);return _0x5517de()(this,_0x3976f9);};}var _0x3d62d1=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x292bf8=function(_0x59b7f4){_0x3681b8()(_0x77eac7,_0x59b7f4);var _0x44776b=_0x99de5a(_0x77eac7);function _0x77eac7(){return _0x186c15()(this,_0x77eac7),_0x44776b['call'](this);}return _0x7d3f91()(_0x77eac7,[{'key':a0_0x5a29('0x343'),'value':function(){var _0x5f44ea=this;Object[a0_0x5a29('0x148')](_0x1528f0['b'])[a0_0x5a29('0x570')](function(_0x1893f9){var _0x21eed5=_0x1528f0['b'][_0x1893f9];_0x5f44ea[a0_0x5a29('0x931')][_0x21eed5]=new _0x3d62d1[(a0_0x5a29('0x22f'))]();});}}]),_0x77eac7;}(_0x204780['a']);function _0x346343(_0x28ce7b){var _0x2a343f=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x457dc9){return!0x1;}}();return function(){var _0x17d395,_0x260cab=_0x486505()(_0x28ce7b);if(_0x2a343f){var _0x50a7eb=_0x486505()(this)[a0_0x5a29('0x825')];_0x17d395=Reflect[a0_0x5a29('0x138')](_0x260cab,arguments,_0x50a7eb);}else _0x17d395=_0x260cab[a0_0x5a29('0x758')](this,arguments);return _0x5517de()(this,_0x17d395);};}var _0x5b69df=DC['Namespace'][a0_0x5a29('0x6e8')],_0x25e139=function(_0x478938){_0x3681b8()(_0x418410,_0x478938);var _0x3021f7=_0x346343(_0x418410);function _0x418410(){return _0x186c15()(this,_0x418410),_0x3021f7[a0_0x5a29('0x351')](this);}return _0x7d3f91()(_0x418410,[{'key':a0_0x5a29('0x343'),'value':function(){var _0x40b2b0=this;Object[a0_0x5a29('0x148')](_0x1528f0['e'])['forEach'](function(_0x2ec671){var _0x21fb2b=_0x1528f0['e'][_0x2ec671];_0x40b2b0[a0_0x5a29('0x931')][_0x21fb2b]=new _0x5b69df[(a0_0x5a29('0x22f'))]();});}}]),_0x418410;}(_0x204780['a']);},function(_0x5824d2,_0x332085,_0x11e5ea){'use strict';var _0x41b7c3=_0x11e5ea(0x0),_0xa16980=_0x11e5ea['n'](_0x41b7c3),_0x312b02=_0x11e5ea(0x1),_0x2a8dec=_0x11e5ea['n'](_0x312b02),_0x1ddcc1=_0x11e5ea(0x3),_0x4d3557=_0x11e5ea(0xb),_0x4870b8=_0x11e5ea(0x6),_0x1514d3=_0x11e5ea(0x18),_0x27b635=DC['Namespace']['Cesium'],_0x426652=function(){function _0x1fd625(_0x488254){_0xa16980()(this,_0x1fd625),this[a0_0x5a29('0x5ed')]=_0x1ddcc1['c']['uuid'](),this[a0_0x5a29('0x8ed')]=_0x488254||_0x1ddcc1['c'][a0_0x5a29('0x5f9')](),this[a0_0x5a29('0xe')]=void 0x0,this[a0_0x5a29('0x673')]=void 0x0,this[a0_0x5a29('0x284')]=void 0x0,this['_show']=!0x0,this[a0_0x5a29('0x931')]={},this[a0_0x5a29('0x4d0')]={},this['_layerEvent']=new _0x4d3557['c'](),this[a0_0x5a29('0x8f5')]['on'](_0x4d3557['d'][a0_0x5a29('0x6cb')],this[a0_0x5a29('0x20c')],this),this[a0_0x5a29('0x8f5')]['on'](_0x4d3557['d']['REMOVE'],this[a0_0x5a29('0x4fc')],this),this['_state']=void 0x0,this[a0_0x5a29('0x519')]=void 0x0;}return _0x2a8dec()(_0x1fd625,[{'key':a0_0x5a29('0x843'),'value':function(){}},{'key':'_removedHook','value':function(){}},{'key':'_onAdd','value':function(_0x5e2eb0){this[a0_0x5a29('0x673')]=_0x5e2eb0,this['_delegate']&&(this[a0_0x5a29('0xe')]instanceof _0x27b635[a0_0x5a29('0x2c9')]?this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x37b')]['add'](this[a0_0x5a29('0xe')]):this[a0_0x5a29('0x673')][a0_0x5a29('0x17e')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]),this[a0_0x5a29('0x843')]&&this['_addedHook'](),this[a0_0x5a29('0x284')]=_0x4870b8['a']['ADDED']);}},{'key':'_onRemove','value':function(){this[a0_0x5a29('0xe')]&&this['_viewer']&&(this[a0_0x5a29('0x931')]={},this['_delegate']instanceof _0x27b635[a0_0x5a29('0x2c9')]?(this['_delegate']['removeAll'](),this[a0_0x5a29('0x673')][a0_0x5a29('0x238')]['primitives'][a0_0x5a29('0x157')](this[a0_0x5a29('0xe')])):this[a0_0x5a29('0xe')][a0_0x5a29('0x618')]?(this[a0_0x5a29('0xe')]['then'](function(_0x491dc2){_0x491dc2[a0_0x5a29('0x8b4')]['removeAll']();}),this['_viewer'][a0_0x5a29('0x17e')][a0_0x5a29('0x157')](this[a0_0x5a29('0xe')])):(this[a0_0x5a29('0xe')]['entities']&&this['_delegate'][a0_0x5a29('0x8b4')][a0_0x5a29('0x8db')](),this[a0_0x5a29('0x673')]['dataSources']['remove'](this['_delegate'])),this['_removedHook']&&this[a0_0x5a29('0x930')](),this[a0_0x5a29('0x284')]=_0x4870b8['a'][a0_0x5a29('0x476')]);}},{'key':a0_0x5a29('0x33a'),'value':function(_0x4297eb){_0x4297eb&&_0x4297eb['overlayEvent']&&!this[a0_0x5a29('0x931')]['hasOwnProperty'](_0x4297eb[a0_0x5a29('0xf9')])&&(_0x4297eb['overlayEvent'][a0_0x5a29('0x93a')](_0x4d3557['j'][a0_0x5a29('0x6cb')],this),this[a0_0x5a29('0x931')][_0x4297eb[a0_0x5a29('0xf9')]]=_0x4297eb,this[a0_0x5a29('0x284')]===_0x4870b8['a'][a0_0x5a29('0x787')]&&(this[a0_0x5a29('0x284')]=_0x4870b8['a'][a0_0x5a29('0x85')]));}},{'key':'_removeOverlay','value':function(_0x5917d9){_0x5917d9&&_0x5917d9['overlayEvent']&&this[a0_0x5a29('0x931')][a0_0x5a29('0x71')](_0x5917d9[a0_0x5a29('0xf9')])&&(_0x5917d9[a0_0x5a29('0x680')][a0_0x5a29('0x93a')](_0x4d3557['j'][a0_0x5a29('0x945')],this),delete this[a0_0x5a29('0x931')][_0x5917d9[a0_0x5a29('0xf9')]]);}},{'key':a0_0x5a29('0x11'),'value':function(_0x531ff2){return this[a0_0x5a29('0x33a')](_0x531ff2),this;}},{'key':a0_0x5a29('0x3ae'),'value':function(_0x9041ac){var _0x3c04fb=this;return Array[a0_0x5a29('0x7aa')](_0x9041ac)&&_0x9041ac['forEach'](function(_0x394e22){_0x3c04fb[a0_0x5a29('0x33a')](_0x394e22);}),this;}},{'key':a0_0x5a29('0x833'),'value':function(_0x6acac7){return this[a0_0x5a29('0x6ae')](_0x6acac7),this;}},{'key':'getOverlay','value':function(_0x2013ac){return this[a0_0x5a29('0x931')][_0x2013ac]||void 0x0;}},{'key':a0_0x5a29('0x45c'),'value':function(_0x980b1e){var _0xf64e43=this,_0x36563f=void 0x0;return Object[a0_0x5a29('0x148')](this[a0_0x5a29('0x931')])[a0_0x5a29('0x570')](function(_0x62fe11){_0xf64e43[a0_0x5a29('0x931')][_0x62fe11]['id']===_0x980b1e&&(_0x36563f=_0xf64e43[a0_0x5a29('0x931')][_0x62fe11]);}),_0x36563f;}},{'key':a0_0x5a29('0x6f6'),'value':function(_0x17f011,_0x38672f){var _0x3a02e2=[];return this[a0_0x5a29('0x94b')](function(_0x34b765){_0x34b765[a0_0x5a29('0x5c6')][_0x17f011]===_0x38672f&&_0x3a02e2[a0_0x5a29('0x3cd')](_0x34b765);},this),_0x3a02e2;}},{'key':a0_0x5a29('0x94b'),'value':function(_0x309f65,_0x52f92a){var _0x3743c2=this;return Object[a0_0x5a29('0x148')](this[a0_0x5a29('0x931')])[a0_0x5a29('0x570')](function(_0x251d24){_0x309f65&&_0x309f65['call'](_0x52f92a||_0x3743c2,_0x3743c2[a0_0x5a29('0x931')][_0x251d24]);}),this;}},{'key':a0_0x5a29('0x556'),'value':function(){var _0x3eb778=this,_0x4d75c1=[];return Object[a0_0x5a29('0x148')](this['_cache'])[a0_0x5a29('0x570')](function(_0x181f56){_0x4d75c1['push'](_0x3eb778['_cache'][_0x181f56]);}),_0x4d75c1;}},{'key':'clear','value':function(){}},{'key':a0_0x5a29('0x157'),'value':function(){this['_viewer']&&this[a0_0x5a29('0x673')][a0_0x5a29('0x90b')](this);}},{'key':'addTo','value':function(_0x4ccc06){return _0x4ccc06&&_0x4ccc06[a0_0x5a29('0x894')]&&_0x4ccc06[a0_0x5a29('0x894')](this),this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x370469){}},{'key':'layerId','get':function(){return this[a0_0x5a29('0x5ed')];}},{'key':'id','get':function(){return this[a0_0x5a29('0x8ed')];}},{'key':a0_0x5a29('0x67e'),'get':function(){return this[a0_0x5a29('0xe')];}},{'key':a0_0x5a29('0x4b1'),'set':function(_0x5959e9){this[a0_0x5a29('0x482')]=_0x5959e9,this[a0_0x5a29('0xe')]&&(this[a0_0x5a29('0xe')]['show']=this[a0_0x5a29('0x482')]);},'get':function(){return this['_show'];}},{'key':a0_0x5a29('0x898'),'get':function(){return this['_layerEvent'];}},{'key':a0_0x5a29('0x5c6'),'set':function(_0x5cc273){this['_attr']=_0x5cc273;},'get':function(){return this[a0_0x5a29('0x4d0')];}},{'key':a0_0x5a29('0x5dd'),'get':function(){return this[a0_0x5a29('0x284')];}}],[{'key':a0_0x5a29('0x264'),'value':function(_0x372b8f){_0x372b8f&&(_0x1514d3['a'][_0x372b8f[a0_0x5a29('0x246')]()]=_0x372b8f['toLocaleLowerCase']());}},{'key':a0_0x5a29('0x9c'),'value':function(_0x111ffa){return _0x1514d3['a'][_0x111ffa[a0_0x5a29('0x246')]()]||void 0x0;}}]),_0x1fd625;}();_0x332085['a']=_0x426652;},function(_0x2a5c3c,_0x39be8d,_0x56ad0f){'use strict';var _0x5efee5=_0x56ad0f(0x0),_0x135517=_0x56ad0f['n'](_0x5efee5),_0xd665d8=_0x56ad0f(0x1),_0x42e806=_0x56ad0f['n'](_0xd665d8),_0x29b0af=_0x56ad0f(0x7),_0x18763e=DC[a0_0x5a29('0x239')]['Cesium'],_0x568d37=function(){function _0x2b3157(_0x5772e7,_0x24dfa5,_0x3da8a7,_0x215eaf,_0x5ebc8b,_0x4f6d0d){_0x135517()(this,_0x2b3157),this[a0_0x5a29('0x4d2')]=_0x5772e7||0x0,this[a0_0x5a29('0x3cb')]=_0x24dfa5||0x0,this[a0_0x5a29('0x770')]=_0x3da8a7||0x0,this[a0_0x5a29('0x28b')]=_0x215eaf||0x0,this[a0_0x5a29('0x5c4')]=_0x5ebc8b||0x0,this[a0_0x5a29('0x875')]=_0x4f6d0d||0x0;}return _0x42e806()(_0x2b3157,[{'key':a0_0x5a29('0x2f6'),'value':function(){var _0x2a2512=new _0x2b3157(this[a0_0x5a29('0x4d2')],this[a0_0x5a29('0x3cb')],this[a0_0x5a29('0x770')],this['_heading'],this[a0_0x5a29('0x5c4')],this[a0_0x5a29('0x875')]);return JSON[a0_0x5a29('0x439')](_0x2a2512);}},{'key':'distance','value':function(_0x2afbce){return _0x2afbce&&_0x2afbce instanceof _0x2b3157?_0x18763e[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0x29b0af['a']['transformWGS84ToCartesian'](this),_0x29b0af['a']['transformWGS84ToCartesian'](_0x2afbce)):0x0;}},{'key':a0_0x5a29('0x3e0'),'value':function(){var _0x4895e3=new _0x2b3157();return _0x4895e3[a0_0x5a29('0x121')]=this[a0_0x5a29('0x121')]||0x0,_0x4895e3[a0_0x5a29('0x5ea')]=this[a0_0x5a29('0x5ea')]||0x0,_0x4895e3[a0_0x5a29('0x624')]=this[a0_0x5a29('0x624')]||0x0,_0x4895e3[a0_0x5a29('0x2b2')]=this['heading']||0x0,_0x4895e3[a0_0x5a29('0x404')]=this[a0_0x5a29('0x404')]||0x0,_0x4895e3[a0_0x5a29('0x299')]=this[a0_0x5a29('0x299')]||0x0,_0x4895e3;}},{'key':a0_0x5a29('0x93'),'value':function(){return[this['lng'],this[a0_0x5a29('0x5ea')],this[a0_0x5a29('0x624')],this['heading'],this[a0_0x5a29('0x404')],this[a0_0x5a29('0x299')]];}},{'key':a0_0x5a29('0x857'),'value':function(){return''['concat'](this['lng'],',')[a0_0x5a29('0x6c9')](this[a0_0x5a29('0x5ea')],',')['concat'](this['alt'],',')[a0_0x5a29('0x6c9')](this[a0_0x5a29('0x2b2')],',')[a0_0x5a29('0x6c9')](this[a0_0x5a29('0x404')],',')[a0_0x5a29('0x6c9')](this[a0_0x5a29('0x299')]);}},{'key':a0_0x5a29('0x121'),'set':function(_0x445a0e){this['_lng']=+_0x445a0e;},'get':function(){return this[a0_0x5a29('0x4d2')];}},{'key':a0_0x5a29('0x5ea'),'set':function(_0x18f35f){this[a0_0x5a29('0x3cb')]=+_0x18f35f;},'get':function(){return this['_lat'];}},{'key':a0_0x5a29('0x624'),'set':function(_0x26d485){this[a0_0x5a29('0x770')]=+_0x26d485;},'get':function(){return this[a0_0x5a29('0x770')];}},{'key':a0_0x5a29('0x2b2'),'set':function(_0x561da0){this[a0_0x5a29('0x28b')]=+_0x561da0;},'get':function(){return this[a0_0x5a29('0x28b')];}},{'key':a0_0x5a29('0x404'),'set':function(_0x13bdc0){this['_pitch']=+_0x13bdc0;},'get':function(){return this[a0_0x5a29('0x5c4')];}},{'key':'roll','set':function(_0x3f2e32){this['_roll']=+_0x3f2e32;},'get':function(){return this[a0_0x5a29('0x875')];}}],[{'key':a0_0x5a29('0x7f5'),'value':function(_0xa5ae12){var _0x3065eb=new _0x2b3157();return Array['isArray'](_0xa5ae12)&&(_0x3065eb[a0_0x5a29('0x121')]=_0xa5ae12[0x0]||0x0,_0x3065eb[a0_0x5a29('0x5ea')]=_0xa5ae12[0x1]||0x0,_0x3065eb[a0_0x5a29('0x624')]=_0xa5ae12[0x2]||0x0,_0x3065eb[a0_0x5a29('0x2b2')]=_0xa5ae12[0x3]||0x0,_0x3065eb['pitch']=_0xa5ae12[0x4]||0x0,_0x3065eb[a0_0x5a29('0x299')]=_0xa5ae12[0x5]||0x0),_0x3065eb;}},{'key':'fromString','value':function(_0x2e1c76){var _0x1f0c85=new _0x2b3157();if(_0x2e1c76&&a0_0x5a29('0x783')==typeof _0x2e1c76){var _0x457efb=_0x2e1c76[a0_0x5a29('0xc5')](',');_0x1f0c85=this[a0_0x5a29('0x7f5')](_0x457efb);}return _0x1f0c85;}},{'key':a0_0x5a29('0x54a'),'value':function(_0x50887a){var _0x382091=new _0x2b3157(),_0x4b97d3=JSON['parse'](_0x50887a);return _0x4b97d3&&(_0x382091[a0_0x5a29('0x121')]=_0x4b97d3[a0_0x5a29('0x121')]||0x0,_0x382091[a0_0x5a29('0x5ea')]=_0x4b97d3[a0_0x5a29('0x5ea')]||0x0,_0x382091[a0_0x5a29('0x624')]=_0x4b97d3[a0_0x5a29('0x624')]||0x0,_0x382091['heading']=_0x4b97d3['heading']||0x0,_0x382091['pitch']=_0x4b97d3[a0_0x5a29('0x404')]||0x0,_0x382091['roll']=_0x4b97d3[a0_0x5a29('0x299')]||0x0),_0x382091;}},{'key':a0_0x5a29('0x37a'),'value':function(_0x5cd38d){var _0x11c814=new _0x2b3157();return _0x5cd38d&&a0_0x5a29('0x783')==typeof _0x5cd38d&&(_0x11c814=this[a0_0x5a29('0x6ee')](_0x5cd38d['split'](','))),_0x11c814;}},{'key':a0_0x5a29('0x6ee'),'value':function(_0x1c4d5e){var _0x5093c5=new _0x2b3157();return Array['isArray'](_0x1c4d5e)&&(_0x5093c5[a0_0x5a29('0x121')]=_0x1c4d5e[0x0]||0x0,_0x5093c5[a0_0x5a29('0x5ea')]=_0x1c4d5e[0x1]||0x0,_0x5093c5[a0_0x5a29('0x624')]=_0x1c4d5e[0x2]||0x0),_0x5093c5;}}]),_0x2b3157;}();_0x39be8d['a']=_0x568d37;},function(_0x146747,_0x23fc1d,_0x47c3b8){'use strict';_0x47c3b8['d'](_0x23fc1d,'r',function(){return _0xe38a63;}),_0x47c3b8['d'](_0x23fc1d,'q',function(){return _0x438ff6;}),_0x47c3b8['d'](_0x23fc1d,'b',function(){return _0x3f49fc;}),_0x47c3b8['d'](_0x23fc1d,'d',function(){return _0x1dcaa5;}),_0x47c3b8['d'](_0x23fc1d,'i',function(){return _0x4f1f95;}),_0x47c3b8['d'](_0x23fc1d,'o',function(){return _0x3899cd;}),_0x47c3b8['d'](_0x23fc1d,'t',function(){return _0x1837e3;}),_0x47c3b8['d'](_0x23fc1d,'u',function(){return _0x16cd26;}),_0x47c3b8['d'](_0x23fc1d,'v',function(){return _0xf088b8;}),_0x47c3b8['d'](_0x23fc1d,'p',function(){return _0x500ef6;}),_0x47c3b8['d'](_0x23fc1d,'z',function(){return _0x3f7d78;}),_0x47c3b8['d'](_0x23fc1d,'c',function(){return _0x2becd9;}),_0x47c3b8['d'](_0x23fc1d,'e',function(){return _0x476929;}),_0x47c3b8['d'](_0x23fc1d,'h',function(){return _0xeb0c07;}),_0x47c3b8['d'](_0x23fc1d,'k',function(){return _0xc36ad4;}),_0x47c3b8['d'](_0x23fc1d,'l',function(){return _0x3b830e;}),_0x47c3b8['d'](_0x23fc1d,'s',function(){return _0x8e680f;}),_0x47c3b8['d'](_0x23fc1d,'w',function(){return _0x45ce48;}),_0x47c3b8['d'](_0x23fc1d,'x',function(){return _0x48e386;}),_0x47c3b8['d'](_0x23fc1d,'A',function(){return _0x4261b0;}),_0x47c3b8['d'](_0x23fc1d,'f',function(){return _0x4de066;}),_0x47c3b8['d'](_0x23fc1d,'g',function(){return _0x41241a;}),_0x47c3b8['d'](_0x23fc1d,'a',function(){return _0x56dbf1;}),_0x47c3b8['d'](_0x23fc1d,'j',function(){return _0x126510;}),_0x47c3b8['d'](_0x23fc1d,'m',function(){return _0x97e745;}),_0x47c3b8['d'](_0x23fc1d,'n',function(){return _0x4ca859;}),_0x47c3b8['d'](_0x23fc1d,'y',function(){return _0x584aca;});var _0xe38a63={},_0x4f214a=_0x47c3b8(0x9),_0x3b629d=_0x47c3b8['n'](_0x4f214a),_0x5b5685=_0x47c3b8(0x0),_0xda8591=_0x47c3b8['n'](_0x5b5685),_0x4e347d=_0x47c3b8(0x1),_0x5db306=_0x47c3b8['n'](_0x4e347d),_0x3fc456=_0x47c3b8(0x3),_0x221f22=_0x47c3b8(0xb),_0x9cc25a=_0x47c3b8(0x6);function _0x9d87fe(_0x251a49,_0x6b2e53){var _0x4ce6f4=Object[a0_0x5a29('0x148')](_0x251a49);if(Object[a0_0x5a29('0x75')]){var _0x4ed1e8=Object[a0_0x5a29('0x75')](_0x251a49);_0x6b2e53&&(_0x4ed1e8=_0x4ed1e8['filter'](function(_0x31c932){return Object[a0_0x5a29('0x11a')](_0x251a49,_0x31c932)[a0_0x5a29('0x12e')];})),_0x4ce6f4['push']['apply'](_0x4ce6f4,_0x4ed1e8);}return _0x4ce6f4;}function _0x2df4f4(_0x2f80da){for(var _0x219b5a=0x1;_0x219b5a<arguments[a0_0x5a29('0x515')];_0x219b5a++){var _0xac5d50=null!=arguments[_0x219b5a]?arguments[_0x219b5a]:{};_0x219b5a%0x2?_0x9d87fe(Object(_0xac5d50),!0x0)[a0_0x5a29('0x570')](function(_0x5333c9){_0x3b629d()(_0x2f80da,_0x5333c9,_0xac5d50[_0x5333c9]);}):Object[a0_0x5a29('0x711')]?Object['defineProperties'](_0x2f80da,Object[a0_0x5a29('0x711')](_0xac5d50)):_0x9d87fe(Object(_0xac5d50))['forEach'](function(_0x1e9290){Object[a0_0x5a29('0xe7')](_0x2f80da,_0x1e9290,Object[a0_0x5a29('0x11a')](_0xac5d50,_0x1e9290));});}return _0x2f80da;}var _0x438ff6=function(){function _0x137a36(){_0xda8591()(this,_0x137a36),this[a0_0x5a29('0x5ed')]=_0x3fc456['c'][a0_0x5a29('0x5f9')](),this[a0_0x5a29('0x8ed')]=_0x3fc456['c']['uuid'](),this[a0_0x5a29('0xe')]=void 0x0,this[a0_0x5a29('0x1a6')]=void 0x0,this[a0_0x5a29('0x284')]=void 0x0,this[a0_0x5a29('0x482')]=!0x0,this[a0_0x5a29('0x3e9')]={},this[a0_0x5a29('0x4d0')]={},this[a0_0x5a29('0xb6')]=new _0x221f22['i'](),this['type']=void 0x0,this['on'](_0x221f22['j'][a0_0x5a29('0x6cb')],this[a0_0x5a29('0x20c')],this),this['on'](_0x221f22['j']['REMOVE'],this[a0_0x5a29('0x4fc')],this);}return _0x5db306()(_0x137a36,[{'key':a0_0x5a29('0x62c'),'value':function(){}},{'key':a0_0x5a29('0x843'),'value':function(){var _0x4f50d1;if(!this[a0_0x5a29('0xe')])return!0x1;this[a0_0x5a29('0xe')][a0_0x5a29('0x6a6')]=null===(_0x4f50d1=this[a0_0x5a29('0x1a6')])||void 0x0===_0x4f50d1?void 0x0:_0x4f50d1[a0_0x5a29('0x6a6')],this[a0_0x5a29('0xe')]['overlayId']=this['_id'];}},{'key':a0_0x5a29('0x930'),'value':function(){}},{'key':a0_0x5a29('0x20c'),'value':function(_0x476d0f){var _0x463b24,_0x21c3c6;if(!_0x476d0f)return!0x1;this[a0_0x5a29('0x1a6')]=_0x476d0f,this['_mountedHook']&&this['_mountedHook'](),(null===(_0x463b24=this[a0_0x5a29('0x1a6')])||void 0x0===_0x463b24||null===(_0x21c3c6=_0x463b24[a0_0x5a29('0x67e')])||void 0x0===_0x21c3c6?void 0x0:_0x21c3c6[a0_0x5a29('0x8b4')])&&(this['_layer'][a0_0x5a29('0x67e')][a0_0x5a29('0x8b4')][a0_0x5a29('0x695')](this['_delegate']),this['_addedHook']&&this[a0_0x5a29('0x843')](),this[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x85')]);}},{'key':'_onRemove','value':function(){var _0x3e4cb9,_0x2aa342;(null===(_0x3e4cb9=this[a0_0x5a29('0x1a6')])||void 0x0===_0x3e4cb9||null===(_0x2aa342=_0x3e4cb9[a0_0x5a29('0x67e')])||void 0x0===_0x2aa342?void 0x0:_0x2aa342[a0_0x5a29('0x8b4')])&&(this[a0_0x5a29('0x1a6')]['delegate'][a0_0x5a29('0x8b4')]['remove'](this[a0_0x5a29('0xe')]),this[a0_0x5a29('0x930')]&&this[a0_0x5a29('0x930')](),this['_state']=_0x9cc25a['a'][a0_0x5a29('0x476')]);}},{'key':'setLabel','value':function(_0x495c8c,_0x42d593){return this['_delegate']&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x7cc')]=_0x2df4f4(_0x2df4f4({},_0x42d593),{},{'text':_0x495c8c})),this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x22140a){return this;}},{'key':a0_0x5a29('0x157'),'value':function(){return this[a0_0x5a29('0x1a6')]&&this[a0_0x5a29('0x1a6')][a0_0x5a29('0x833')](this),this;}},{'key':a0_0x5a29('0x55f'),'value':function(_0x525734){return _0x525734&&_0x525734[a0_0x5a29('0x11')]&&_0x525734[a0_0x5a29('0x11')](this),this;}},{'key':'on','value':function(_0x441292,_0x407343,_0x3512c4){return this[a0_0x5a29('0xb6')]['on'](_0x441292,_0x407343,_0x3512c4||this),this;}},{'key':a0_0x5a29('0x59a'),'value':function(_0x41a22f,_0x188b96,_0x117f01){return this[a0_0x5a29('0xb6')][a0_0x5a29('0x59a')](_0x41a22f,_0x188b96,_0x117f01||this),this;}},{'key':'fire','value':function(_0xbff1f6,_0x55bf66){return this[a0_0x5a29('0xb6')][a0_0x5a29('0x93a')](_0xbff1f6,_0x55bf66),this;}},{'key':'overlayId','get':function(){return this[a0_0x5a29('0x5ed')];}},{'key':'id','set':function(_0x5d8056){return this[a0_0x5a29('0x8ed')]=_0x5d8056,this;},'get':function(){return this['_bid'];}},{'key':a0_0x5a29('0x4b1'),'set':function(_0x5b6fb3){return this[a0_0x5a29('0x482')]=_0x5b6fb3,this[a0_0x5a29('0xe')]&&(this['_delegate'][a0_0x5a29('0x4b1')]=this[a0_0x5a29('0x482')]),this;},'get':function(){return this[a0_0x5a29('0x482')];}},{'key':a0_0x5a29('0x5c6'),'set':function(_0x135b0c){return this[a0_0x5a29('0x4d0')]=_0x135b0c,this;},'get':function(){return this[a0_0x5a29('0x4d0')];}},{'key':a0_0x5a29('0x680'),'get':function(){return this[a0_0x5a29('0xb6')];}},{'key':a0_0x5a29('0x67e'),'get':function(){return this[a0_0x5a29('0xe')];}},{'key':a0_0x5a29('0x5dd'),'get':function(){return this['_state'];}}],[{'key':'registerType','value':function(_0x2960a5){_0x2960a5&&(_0xe38a63[_0x2960a5[a0_0x5a29('0x246')]()]=_0x2960a5[a0_0x5a29('0x716')]());}},{'key':a0_0x5a29('0x214'),'value':function(_0x3d4b7f){return _0xe38a63[_0x3d4b7f[a0_0x5a29('0x246')]()]||void 0x0;}}]),_0x137a36;}(),_0x1b7ea7=_0x47c3b8(0x4),_0x334c21=_0x47c3b8['n'](_0x1b7ea7),_0x47013f=_0x47c3b8(0x5),_0x43e3fd=_0x47c3b8['n'](_0x47013f),_0x1d2b9a=_0x47c3b8(0x2),_0x119abc=_0x47c3b8['n'](_0x1d2b9a),_0x18a8a5=_0x47c3b8(0x7),_0x26bbfc=_0x47c3b8(0x8);function _0x295ea8(_0x550b1f,_0x4a436b){var _0x142205=Object[a0_0x5a29('0x148')](_0x550b1f);if(Object[a0_0x5a29('0x75')]){var _0x287d12=Object[a0_0x5a29('0x75')](_0x550b1f);_0x4a436b&&(_0x287d12=_0x287d12[a0_0x5a29('0x48a')](function(_0x470a36){return Object[a0_0x5a29('0x11a')](_0x550b1f,_0x470a36)[a0_0x5a29('0x12e')];})),_0x142205[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x142205,_0x287d12);}return _0x142205;}function _0x308003(_0x444a44){var _0x2ec611=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x10508b){return!0x1;}}();return function(){var _0x50abb0,_0x143535=_0x119abc()(_0x444a44);if(_0x2ec611){var _0x55386f=_0x119abc()(this)[a0_0x5a29('0x825')];_0x50abb0=Reflect[a0_0x5a29('0x138')](_0x143535,arguments,_0x55386f);}else _0x50abb0=_0x143535['apply'](this,arguments);return _0x43e3fd()(this,_0x50abb0);};}var _0x267823=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x43ee22=function(_0x122d9d){_0x334c21()(_0x2b8e86,_0x122d9d);var _0x23e346=_0x308003(_0x2b8e86);function _0x2b8e86(_0x5dab8f,_0x48a00b){var _0x19e73d;return _0xda8591()(this,_0x2b8e86),(_0x19e73d=_0x23e346[a0_0x5a29('0x351')](this))[a0_0x5a29('0xe')]=new _0x267823[(a0_0x5a29('0x608'))]({'billboard':{}}),_0x19e73d['_position']=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x5dab8f),_0x19e73d[a0_0x5a29('0x8c7')]=_0x48a00b,_0x19e73d['_size']=[0x20,0x20],_0x19e73d[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x3c1')),_0x19e73d[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x19e73d;}return _0x5db306()(_0x2b8e86,[{'key':a0_0x5a29('0x62c'),'value':function(){this['position']=this[a0_0x5a29('0x86e')],this['icon']=this[a0_0x5a29('0x8c7')],this[a0_0x5a29('0xbc')]=this[a0_0x5a29('0x629')];}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x2d7528){return _0x2d7528&&0x0!==Object['keys'](_0x2d7528)[a0_0x5a29('0x515')]?(delete _0x2d7528[a0_0x5a29('0xfa')]&&delete _0x2d7528[a0_0x5a29('0x96f')]&&delete _0x2d7528[a0_0x5a29('0x6b7')],this[a0_0x5a29('0x3e9')]=_0x2d7528,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')][a0_0x5a29('0x3c1')],this[a0_0x5a29('0x3e9')]),this):this;}},{'key':a0_0x5a29('0x53c'),'set':function(_0x5170de){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x5170de),this[a0_0x5a29('0xe')]['position']=_0x18a8a5['a'][a0_0x5a29('0x516')](this['_position']),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':a0_0x5a29('0x93e'),'set':function(_0x7e596){return this[a0_0x5a29('0x8c7')]=_0x7e596,this[a0_0x5a29('0xe')][a0_0x5a29('0x3c1')]['image']=this[a0_0x5a29('0x8c7')],this;},'get':function(){return this[a0_0x5a29('0x8c7')];}},{'key':a0_0x5a29('0xbc'),'set':function(_0x2eb2ad){if(!Array[a0_0x5a29('0x7aa')](_0x2eb2ad))throw new Error('Billboard:\x20the\x20size\x20invalid');return this[a0_0x5a29('0x629')]=_0x2eb2ad,this[a0_0x5a29('0xe')][a0_0x5a29('0x3c1')]['width']=this[a0_0x5a29('0x629')][0x0]||0x20,this[a0_0x5a29('0xe')]['billboard'][a0_0x5a29('0x6b7')]=this[a0_0x5a29('0x629')][0x1]||0x20,this;},'get':function(){return this['_size'];}}],[{'key':a0_0x5a29('0x22'),'value':function(_0x257a90){var _0x490249,_0x2cc635=void 0x0,_0x2a7c03=_0x267823[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')](),_0x5b6c21=_0x18a8a5['a'][a0_0x5a29('0x8f')](_0x257a90[a0_0x5a29('0x53c')][a0_0x5a29('0x94c')](_0x2a7c03));return _0x257a90[a0_0x5a29('0x3c1')]&&((_0x2cc635=new _0x2b8e86(_0x5b6c21,_0x257a90[a0_0x5a29('0x3c1')][a0_0x5a29('0xfa')][a0_0x5a29('0x94c')](_0x2a7c03)))['attr']=function(_0x56f99a){for(var _0x7477be=0x1;_0x7477be<arguments['length'];_0x7477be++){var _0x2c16ac=null!=arguments[_0x7477be]?arguments[_0x7477be]:{};_0x7477be%0x2?_0x295ea8(Object(_0x2c16ac),!0x0)[a0_0x5a29('0x570')](function(_0x571ccb){_0x3b629d()(_0x56f99a,_0x571ccb,_0x2c16ac[_0x571ccb]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x56f99a,Object['getOwnPropertyDescriptors'](_0x2c16ac)):_0x295ea8(Object(_0x2c16ac))[a0_0x5a29('0x570')](function(_0x37c85c){Object[a0_0x5a29('0xe7')](_0x56f99a,_0x37c85c,Object[a0_0x5a29('0x11a')](_0x2c16ac,_0x37c85c));});}return _0x56f99a;}({},null==_0x257a90||null===(_0x490249=_0x257a90[a0_0x5a29('0x31d')])||void 0x0===_0x490249?void 0x0:_0x490249[a0_0x5a29('0x94c')](_0x2a7c03))),_0x2cc635;}}]),_0x2b8e86;}(_0x438ff6);_0x438ff6['registerType']('billboard');var _0x3f49fc=_0x43ee22;function _0x3e5e82(_0x1b7318){var _0x5dbd0f=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x1424a5){return!0x1;}}();return function(){var _0x2de253,_0x22f55f=_0x119abc()(_0x1b7318);if(_0x5dbd0f){var _0x381738=_0x119abc()(this)[a0_0x5a29('0x825')];_0x2de253=Reflect[a0_0x5a29('0x138')](_0x22f55f,arguments,_0x381738);}else _0x2de253=_0x22f55f[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x2de253);};}var _0x5c6b52=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x233533=function(_0x501941){_0x334c21()(_0x5b30b2,_0x501941);var _0x3b7166=_0x3e5e82(_0x5b30b2);function _0x5b30b2(_0x15a926,_0x413c65){var _0x656e7d;return _0xda8591()(this,_0x5b30b2),(_0x656e7d=_0x3b7166[a0_0x5a29('0x351')](this))[a0_0x5a29('0xe')]=new _0x5c6b52[(a0_0x5a29('0x608'))]({'ellipse':{}}),_0x656e7d[a0_0x5a29('0x5c5')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x15a926),_0x656e7d[a0_0x5a29('0x973')]=+_0x413c65||0x0,_0x656e7d[a0_0x5a29('0x4ca')]=0x0,_0x656e7d[a0_0x5a29('0x27b')]=0x0,_0x656e7d[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')]('circle'),_0x656e7d['_state']=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x656e7d;}return _0x5db306()(_0x5b30b2,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x100')]=this[a0_0x5a29('0x5c5')],this[a0_0x5a29('0x6e1')]=this[a0_0x5a29('0x973')];}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x4b0430){return _0x4b0430&&0x0!==Object['keys'](_0x4b0430)[a0_0x5a29('0x515')]?(delete _0x4b0430[a0_0x5a29('0x97f')]&&delete _0x4b0430[a0_0x5a29('0x1fd')],this[a0_0x5a29('0x3e9')]=_0x4b0430,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')][a0_0x5a29('0x92')],this[a0_0x5a29('0x3e9')]),this):this;}},{'key':a0_0x5a29('0x100'),'set':function(_0x55406a){return this[a0_0x5a29('0x5c5')]=_0x26bbfc['a']['parsePosition'](_0x55406a),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x5c5')]),this;},'get':function(){return this[a0_0x5a29('0x5c5')];}},{'key':a0_0x5a29('0x6e1'),'set':function(_0x132803){return this[a0_0x5a29('0x973')]=+_0x132803,this[a0_0x5a29('0xe')][a0_0x5a29('0x92')][a0_0x5a29('0x97f')]=this[a0_0x5a29('0x973')],this[a0_0x5a29('0xe')][a0_0x5a29('0x92')][a0_0x5a29('0x1fd')]=this['_radius'],this;},'get':function(){return this[a0_0x5a29('0x973')];}},{'key':a0_0x5a29('0x56e'),'set':function(_0x3504c2){var _0x2178b0=this;return this['_rotateAmount']=+_0x3504c2,this[a0_0x5a29('0x4ca')]>0x0&&(this[a0_0x5a29('0xe')]['ellipse']['stRotation']=new _0x5c6b52[(a0_0x5a29('0x305'))](function(_0x512761){return _0x2178b0['_rotateAmount']>0x0&&(_0x2178b0[a0_0x5a29('0x27b')]+=_0x2178b0[a0_0x5a29('0x4ca')],_0x2178b0[a0_0x5a29('0x27b')]>=0x168&&(_0x2178b0[a0_0x5a29('0x27b')]=0x0)),_0x2178b0[a0_0x5a29('0x27b')];})),this;},'get':function(){return this[a0_0x5a29('0x4ca')];}}]),_0x5b30b2;}(_0x438ff6);_0x438ff6['registerType'](a0_0x5a29('0x869'));var _0x1dcaa5=_0x233533,_0x3bcaba=_0x47c3b8(0x11);function _0x45a1c2(_0x341c8f,_0x3e8f32){var _0x46ae24=Object[a0_0x5a29('0x148')](_0x341c8f);if(Object['getOwnPropertySymbols']){var _0x2c60d=Object[a0_0x5a29('0x75')](_0x341c8f);_0x3e8f32&&(_0x2c60d=_0x2c60d['filter'](function(_0x36fb32){return Object[a0_0x5a29('0x11a')](_0x341c8f,_0x36fb32)['enumerable'];})),_0x46ae24[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x46ae24,_0x2c60d);}return _0x46ae24;}function _0x20b779(_0x39168b){var _0x1c5f68=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x5a03ba){return!0x1;}}();return function(){var _0x5dfcee,_0x123bdf=_0x119abc()(_0x39168b);if(_0x1c5f68){var _0x355629=_0x119abc()(this)['constructor'];_0x5dfcee=Reflect[a0_0x5a29('0x138')](_0x123bdf,arguments,_0x355629);}else _0x5dfcee=_0x123bdf[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x5dfcee);};}var _0x6bd3c=function(_0x39b2b6){_0x334c21()(_0x12e465,_0x39b2b6);var _0xea7e4a=_0x20b779(_0x12e465);function _0x12e465(_0x52da1c,_0x4b6e78){var _0x86ccc2;return _0xda8591()(this,_0x12e465),(_0x86ccc2=_0xea7e4a[a0_0x5a29('0x351')](this))[a0_0x5a29('0xe')]=_0x3fc456['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),a0_0x5a29('0x1c9')),_0x86ccc2[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x52da1c),_0x86ccc2['_delegate']['setAttribute']('id',_0x86ccc2[a0_0x5a29('0x5ed')]),_0x3fc456['c'][a0_0x5a29('0x65f')](_0x86ccc2[a0_0x5a29('0xe')][a0_0x5a29('0x46a')],{'position':'absolute','top':'0','left':'0'}),_0x86ccc2[a0_0x5a29('0x7da')]=_0x4b6e78,_0x86ccc2[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x8f7')),_0x86ccc2[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x86ccc2;}return _0x5db306()(_0x12e465,[{'key':a0_0x5a29('0x842'),'value':function(_0x5f42c6,_0x262e12){var _0x5bb971='translate3d(0,0,0)';if(_0x5f42c6[a0_0x5a29('0x44')]){var _0x46219f=_0x5f42c6[a0_0x5a29('0x44')]['x']-this['_delegate']['offsetWidth']/0x2,_0x4a557=_0x5f42c6['transform']['y']-this[a0_0x5a29('0xe')]['offsetHeight']/0x2;_0x5bb971=a0_0x5a29('0x7b8')[a0_0x5a29('0x6c9')](Math[a0_0x5a29('0x6e7')](_0x46219f),'px,')[a0_0x5a29('0x6c9')](Math['round'](_0x4a557),a0_0x5a29('0x83b'));}var _0x15d95c=a0_0x5a29('0x22d'),_0x41b4f2=this[a0_0x5a29('0x3e9')][a0_0x5a29('0x48d')];if(_0x262e12&&_0x41b4f2){var _0x5bb9db=_0x41b4f2[a0_0x5a29('0x89e')],_0x3898e5=_0x41b4f2[a0_0x5a29('0x6f3')],_0x7fec08=_0x262e12/_0x41b4f2[a0_0x5a29('0x1e0')];if(_0x262e12<_0x41b4f2[a0_0x5a29('0x4a3')])_0x15d95c=a0_0x5a29('0x62b')[a0_0x5a29('0x6c9')](_0x5bb9db,',')[a0_0x5a29('0x6c9')](_0x5bb9db,',1)');else{if(_0x262e12>_0x41b4f2[a0_0x5a29('0x1e0')])_0x15d95c=a0_0x5a29('0x62b')[a0_0x5a29('0x6c9')](_0x3898e5,',')[a0_0x5a29('0x6c9')](_0x3898e5,',1)');else{var _0x22fb0b=_0x3898e5+_0x7fec08*(_0x5bb9db-_0x3898e5);_0x15d95c=a0_0x5a29('0x62b')[a0_0x5a29('0x6c9')](_0x22fb0b,',')[a0_0x5a29('0x6c9')](_0x22fb0b,a0_0x5a29('0x3ad'));}}}var _0x3ecf05=this['_style']['distanceDisplayCondition'];_0x262e12&&_0x3ecf05&&(this[a0_0x5a29('0x4b1')]=this[a0_0x5a29('0x482')]&&Object(_0x3bcaba['g'])(_0x262e12,_0x3ecf05[a0_0x5a29('0x4a3')],_0x3ecf05['far'])),this[a0_0x5a29('0xe')][a0_0x5a29('0x46a')][a0_0x5a29('0x44')]=''['concat'](_0x5bb971,'\x20')[a0_0x5a29('0x6c9')](_0x15d95c);}},{'key':a0_0x5a29('0x20c'),'value':function(_0x436803){var _0x408354=this;this[a0_0x5a29('0x1a6')]=_0x436803,this[a0_0x5a29('0x1a6')][a0_0x5a29('0x67e')]['appendChild'](this[a0_0x5a29('0xe')]),this[a0_0x5a29('0xe')][a0_0x5a29('0x464')]('click',function(){_0x408354[a0_0x5a29('0xb6')][a0_0x5a29('0x93a')](_0x221f22['h']['CLICK'],{'layer':_0x436803,'overlay':_0x408354,'position':_0x18a8a5['a'][a0_0x5a29('0x516')](_0x408354[a0_0x5a29('0x86e')])});}),this[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x85')];}},{'key':a0_0x5a29('0x4fc'),'value':function(){this['_layer']&&(this[a0_0x5a29('0x1a6')][a0_0x5a29('0x67e')]['removeChild'](this['_delegate']),this['_state']=_0x9cc25a['a']['REMOVED']);}},{'key':a0_0x5a29('0x47a'),'value':function(_0xcab04c,_0x13f40a){return this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x3a3f23){return _0x3a3f23&&0x0!==Object[a0_0x5a29('0x148')](_0x3a3f23)[a0_0x5a29('0x515')]?(this['_style']=_0x3a3f23,this[a0_0x5a29('0x3e9')]['className']&&_0x3fc456['a'][a0_0x5a29('0x880')](this['_delegate'],this[a0_0x5a29('0x3e9')]['className']),this):this;}},{'key':'show','set':function(_0x16b210){return this[a0_0x5a29('0x482')]=_0x16b210,this[a0_0x5a29('0xe')][a0_0x5a29('0x46a')][a0_0x5a29('0x8d5')]=this['_show']?a0_0x5a29('0x56d'):a0_0x5a29('0x37d'),this;},'get':function(){return this['_show'];}},{'key':a0_0x5a29('0x53c'),'set':function(_0x5b5c8f){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a']['parsePosition'](_0x5b5c8f),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':a0_0x5a29('0x7da'),'set':function(_0xf6d49c){if(_0xf6d49c&&'string'==typeof _0xf6d49c)this['_delegate']['innerHTML']=_0xf6d49c;else{if(_0xf6d49c&&_0xf6d49c instanceof Element){for(;this[a0_0x5a29('0xe')]['hasChildNodes']();)this[a0_0x5a29('0xe')][a0_0x5a29('0x58e')](this[a0_0x5a29('0xe')]['firstChild']);this[a0_0x5a29('0xe')][a0_0x5a29('0x365')](_0xf6d49c);}}return this;},'get':function(){return this[a0_0x5a29('0xe')]['childNodes']||[];}}],[{'key':'fromEntity','value':function(_0x5d5524,_0x58314e){var _0x123cd9,_0x3c1b69,_0x5a396d=Cesium[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]();return(_0x123cd9=new _0x12e465(_0x18a8a5['a']['transformCartesianToWGS84'](_0x5d5524[a0_0x5a29('0x53c')][a0_0x5a29('0x94c')](_0x5a396d)),_0x58314e),_0x5d5524[a0_0x5a29('0x3c1')])&&(_0x123cd9[a0_0x5a29('0x5c6')]=function(_0x4e6fc4){for(var _0x2895c7=0x1;_0x2895c7<arguments[a0_0x5a29('0x515')];_0x2895c7++){var _0x423010=null!=arguments[_0x2895c7]?arguments[_0x2895c7]:{};_0x2895c7%0x2?_0x45a1c2(Object(_0x423010),!0x0)['forEach'](function(_0x21ce6a){_0x3b629d()(_0x4e6fc4,_0x21ce6a,_0x423010[_0x21ce6a]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x4e6fc4,Object[a0_0x5a29('0x711')](_0x423010)):_0x45a1c2(Object(_0x423010))[a0_0x5a29('0x570')](function(_0x4701f1){Object[a0_0x5a29('0xe7')](_0x4e6fc4,_0x4701f1,Object[a0_0x5a29('0x11a')](_0x423010,_0x4701f1));});}return _0x4e6fc4;}({},null==_0x5d5524||null===(_0x3c1b69=_0x5d5524['properties'])||void 0x0===_0x3c1b69?void 0x0:_0x3c1b69[a0_0x5a29('0x94c')](_0x5a396d))),_0x123cd9;}}]),_0x12e465;}(_0x438ff6);_0x438ff6['registerType'](a0_0x5a29('0x8f7'));var _0x4f1f95=_0x6bd3c;function _0x4baed4(_0x78fb2b,_0x207533){var _0x4f35ca=Object[a0_0x5a29('0x148')](_0x78fb2b);if(Object[a0_0x5a29('0x75')]){var _0x1c0831=Object['getOwnPropertySymbols'](_0x78fb2b);_0x207533&&(_0x1c0831=_0x1c0831[a0_0x5a29('0x48a')](function(_0x3a1021){return Object['getOwnPropertyDescriptor'](_0x78fb2b,_0x3a1021)[a0_0x5a29('0x12e')];})),_0x4f35ca[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x4f35ca,_0x1c0831);}return _0x4f35ca;}function _0x9e7ca1(_0x3400b5){var _0x3ab72a=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0xcb07b1){return!0x1;}}();return function(){var _0x393a35,_0x241bda=_0x119abc()(_0x3400b5);if(_0x3ab72a){var _0x3608ad=_0x119abc()(this)[a0_0x5a29('0x825')];_0x393a35=Reflect[a0_0x5a29('0x138')](_0x241bda,arguments,_0x3608ad);}else _0x393a35=_0x241bda[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x393a35);};}var _0x573e24=DC['Namespace']['Cesium'],_0x3aca00=function(_0x292ba1){_0x334c21()(_0x26e151,_0x292ba1);var _0x592c1e=_0x9e7ca1(_0x26e151);function _0x26e151(_0x77ef2c,_0x28b46c){var _0x4d389c;return _0xda8591()(this,_0x26e151),(_0x4d389c=_0x592c1e[a0_0x5a29('0x351')](this))['_delegate']=new _0x573e24[(a0_0x5a29('0x608'))]({'label':{}}),_0x4d389c[a0_0x5a29('0x86e')]=_0x26bbfc['a']['parsePosition'](_0x77ef2c),_0x4d389c[a0_0x5a29('0x65b')]=_0x28b46c,_0x4d389c[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x7cc')),_0x4d389c[a0_0x5a29('0x284')]=_0x9cc25a['a']['INITIALIZED'],_0x4d389c;}return _0x5db306()(_0x26e151,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x53c')]=this[a0_0x5a29('0x86e')],this[a0_0x5a29('0x3ce')]=this[a0_0x5a29('0x65b')];}},{'key':'setLabel','value':function(_0x3b2a28,_0x12340c){return this;}},{'key':'setStyle','value':function(_0x58c6d7){return _0x58c6d7&&0x0!==Object[a0_0x5a29('0x148')](_0x58c6d7)[a0_0x5a29('0x515')]?(delete _0x58c6d7[a0_0x5a29('0x3ce')],this[a0_0x5a29('0x3e9')]=_0x58c6d7,_0x3fc456['c'][a0_0x5a29('0x65f')](this['_delegate'][a0_0x5a29('0x7cc')],this['_style']),this):this;}},{'key':a0_0x5a29('0x53c'),'set':function(_0xe1a889){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0xe1a889),this['_delegate'][a0_0x5a29('0x53c')]=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':a0_0x5a29('0x3ce'),'set':function(_0x107a0c){return this[a0_0x5a29('0x65b')]=_0x107a0c,this[a0_0x5a29('0xe')]['label']['text']=this[a0_0x5a29('0x65b')],this;},'get':function(){return this[a0_0x5a29('0x65b')];}}],[{'key':a0_0x5a29('0x22'),'value':function(_0x44fdaa){var _0x3a4843,_0x76212a=_0x573e24[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')](),_0x68ec14=_0x18a8a5['a']['transformCartesianToWGS84'](_0x44fdaa[a0_0x5a29('0x53c')][a0_0x5a29('0x94c')](_0x76212a)),_0x37aa3f=void 0x0;return _0x44fdaa[a0_0x5a29('0x3c1')]&&((_0x37aa3f=new _0x26e151(_0x68ec14,_0x44fdaa['name']))['attr']=function(_0x319ac1){for(var _0xcaf2be=0x1;_0xcaf2be<arguments[a0_0x5a29('0x515')];_0xcaf2be++){var _0x2602b4=null!=arguments[_0xcaf2be]?arguments[_0xcaf2be]:{};_0xcaf2be%0x2?_0x4baed4(Object(_0x2602b4),!0x0)[a0_0x5a29('0x570')](function(_0x120053){_0x3b629d()(_0x319ac1,_0x120053,_0x2602b4[_0x120053]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x319ac1,Object[a0_0x5a29('0x711')](_0x2602b4)):_0x4baed4(Object(_0x2602b4))[a0_0x5a29('0x570')](function(_0x512e27){Object[a0_0x5a29('0xe7')](_0x319ac1,_0x512e27,Object[a0_0x5a29('0x11a')](_0x2602b4,_0x512e27));});}return _0x319ac1;}({},null==_0x44fdaa||null===(_0x3a4843=_0x44fdaa[a0_0x5a29('0x31d')])||void 0x0===_0x3a4843?void 0x0:_0x3a4843[a0_0x5a29('0x94c')](_0x76212a))),_0x37aa3f;}}]),_0x26e151;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x7cc'));var _0x3899cd=_0x3aca00;function _0x983e00(_0x64f706,_0x434704){var _0x4788b9=Object[a0_0x5a29('0x148')](_0x64f706);if(Object[a0_0x5a29('0x75')]){var _0x41ff09=Object[a0_0x5a29('0x75')](_0x64f706);_0x434704&&(_0x41ff09=_0x41ff09[a0_0x5a29('0x48a')](function(_0x161bf3){return Object[a0_0x5a29('0x11a')](_0x64f706,_0x161bf3)[a0_0x5a29('0x12e')];})),_0x4788b9['push'][a0_0x5a29('0x758')](_0x4788b9,_0x41ff09);}return _0x4788b9;}function _0x53d8c3(_0x2f7555){var _0x57b129=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x5d3f59){return!0x1;}}();return function(){var _0x5807a8,_0x4ce383=_0x119abc()(_0x2f7555);if(_0x57b129){var _0x5bb001=_0x119abc()(this)['constructor'];_0x5807a8=Reflect[a0_0x5a29('0x138')](_0x4ce383,arguments,_0x5bb001);}else _0x5807a8=_0x4ce383[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x5807a8);};}var _0x1d7a99=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2e0a0a={'pixelSize':0x8,'outlineColor':_0x1d7a99['Color']['BLUE'],'outlineWidth':0x2},_0x270096=function(_0x116681){_0x334c21()(_0x2306a7,_0x116681);var _0x92a275=_0x53d8c3(_0x2306a7);function _0x2306a7(_0x416a0b){var _0x20ac83;return _0xda8591()(this,_0x2306a7),(_0x20ac83=_0x92a275[a0_0x5a29('0x351')](this))[a0_0x5a29('0xe')]=new _0x1d7a99['Entity']({'point':{}}),_0x20ac83['_position']=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x416a0b),_0x20ac83['type']=_0x438ff6[a0_0x5a29('0x214')]('point'),_0x20ac83[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x20ac83;}return _0x5db306()(_0x2306a7,[{'key':a0_0x5a29('0x62c'),'value':function(){this['position']=this['_position'],_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')][a0_0x5a29('0x262')],_0x2e0a0a,this[a0_0x5a29('0x3e9')]);}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x2ab7e4){return _0x2ab7e4&&0x0!==Object[a0_0x5a29('0x148')](_0x2ab7e4)[a0_0x5a29('0x515')]?(delete _0x2ab7e4['position'],this[a0_0x5a29('0x3e9')]=_0x2ab7e4,_0x3fc456['c']['merge'](this[a0_0x5a29('0xe')]['point'],_0x2e0a0a,this['_style']),this):this;}},{'key':a0_0x5a29('0x53c'),'set':function(_0x527a80){return this['_position']=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x527a80),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),this;},'get':function(){return this['_position'];}}],[{'key':a0_0x5a29('0x22'),'value':function(_0x257118){var _0x35ab92,_0x1bdea9=void 0x0,_0x299167=_0x1d7a99[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]();return(_0x1bdea9=new _0x2306a7(_0x18a8a5['a'][a0_0x5a29('0x8f')](_0x257118[a0_0x5a29('0x53c')]['getValue'](_0x299167))))[a0_0x5a29('0x5c6')]=function(_0x5eb2fd){for(var _0x2fb9d0=0x1;_0x2fb9d0<arguments['length'];_0x2fb9d0++){var _0x576987=null!=arguments[_0x2fb9d0]?arguments[_0x2fb9d0]:{};_0x2fb9d0%0x2?_0x983e00(Object(_0x576987),!0x0)[a0_0x5a29('0x570')](function(_0x3016dc){_0x3b629d()(_0x5eb2fd,_0x3016dc,_0x576987[_0x3016dc]);}):Object[a0_0x5a29('0x711')]?Object['defineProperties'](_0x5eb2fd,Object[a0_0x5a29('0x711')](_0x576987)):_0x983e00(Object(_0x576987))[a0_0x5a29('0x570')](function(_0x5bb28b){Object[a0_0x5a29('0xe7')](_0x5eb2fd,_0x5bb28b,Object[a0_0x5a29('0x11a')](_0x576987,_0x5bb28b));});}return _0x5eb2fd;}({},null==_0x257118||null===(_0x35ab92=_0x257118[a0_0x5a29('0x31d')])||void 0x0===_0x35ab92?void 0x0:_0x35ab92[a0_0x5a29('0x94c')](_0x299167)),_0x1bdea9;}}]),_0x2306a7;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x262'));var _0x1837e3=_0x270096,_0x50dafe=_0x47c3b8(0x17),_0x1330a2=_0x47c3b8['n'](_0x50dafe);function _0x4f2da0(_0x3bade9,_0x4aa0fc){var _0x140a00=Object[a0_0x5a29('0x148')](_0x3bade9);if(Object[a0_0x5a29('0x75')]){var _0x1a29a9=Object[a0_0x5a29('0x75')](_0x3bade9);_0x4aa0fc&&(_0x1a29a9=_0x1a29a9[a0_0x5a29('0x48a')](function(_0x3846aa){return Object[a0_0x5a29('0x11a')](_0x3bade9,_0x3846aa)[a0_0x5a29('0x12e')];})),_0x140a00[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x140a00,_0x1a29a9);}return _0x140a00;}function _0x590ad2(_0x30f161){for(var _0xe2900f=0x1;_0xe2900f<arguments[a0_0x5a29('0x515')];_0xe2900f++){var _0x154447=null!=arguments[_0xe2900f]?arguments[_0xe2900f]:{};_0xe2900f%0x2?_0x4f2da0(Object(_0x154447),!0x0)[a0_0x5a29('0x570')](function(_0x18d784){_0x3b629d()(_0x30f161,_0x18d784,_0x154447[_0x18d784]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x5a29('0x4a5')](_0x30f161,Object[a0_0x5a29('0x711')](_0x154447)):_0x4f2da0(Object(_0x154447))[a0_0x5a29('0x570')](function(_0x53826e){Object['defineProperty'](_0x30f161,_0x53826e,Object[a0_0x5a29('0x11a')](_0x154447,_0x53826e));});}return _0x30f161;}function _0x2065f5(_0x419158){var _0x2f61b3=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x2cafc3){return!0x1;}}();return function(){var _0x3abcce,_0x28135a=_0x119abc()(_0x419158);if(_0x2f61b3){var _0x512b89=_0x119abc()(this)[a0_0x5a29('0x825')];_0x3abcce=Reflect[a0_0x5a29('0x138')](_0x28135a,arguments,_0x512b89);}else _0x3abcce=_0x28135a[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x3abcce);};}var _0x4e014c=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x274c72=function(_0x16f6a1){_0x334c21()(_0x4bb03e,_0x16f6a1);var _0x16c60=_0x2065f5(_0x4bb03e);function _0x4bb03e(_0x4aaa2a){var _0x25b873;return _0xda8591()(this,_0x4bb03e),(_0x25b873=_0x16c60[a0_0x5a29('0x351')](this))[a0_0x5a29('0xe')]=new _0x4e014c['Entity']({'polygon':{}}),_0x25b873[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x4aaa2a),_0x25b873['_holes']=[],_0x25b873[a0_0x5a29('0x519')]=_0x438ff6['getOverlayType'](a0_0x5a29('0x82a')),_0x25b873[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x25b873;}return _0x5db306()(_0x4bb03e,[{'key':a0_0x5a29('0x535'),'value':function(){var _0x5b6e97=new _0x4e014c['PolygonHierarchy']();return _0x5b6e97['positions']=_0x18a8a5['a'][a0_0x5a29('0x7a')](this['_positions']),_0x5b6e97[a0_0x5a29('0x453')]=this[a0_0x5a29('0x287')][a0_0x5a29('0x95a')](function(_0x1e0c47){return new _0x4e014c[(a0_0x5a29('0x3b6'))](_0x18a8a5['a'][a0_0x5a29('0x7a')](_0x1e0c47));}),_0x5b6e97;}},{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x4e0')]=this['_positions'];}},{'key':'setLabel','value':function(_0x344fd8,_0x5bb606){return this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x100')]),this[a0_0x5a29('0xe')][a0_0x5a29('0x7cc')]=_0x590ad2({'text':_0x344fd8},_0x5bb606),this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x372aa5){return _0x372aa5&&0x0!==Object[a0_0x5a29('0x148')](_0x372aa5)[a0_0x5a29('0x515')]?(delete _0x372aa5[a0_0x5a29('0x4e0')],this[a0_0x5a29('0x3e9')]=_0x372aa5,_0x3fc456['c']['merge'](this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')],this['_style']),this):this;}},{'key':'positions','set':function(_0x359dfa){return this[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x359dfa),this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=this[a0_0x5a29('0x535')](),this;},'get':function(){return this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x453'),'set':function(_0x3c06ee){return _0x3c06ee&&_0x3c06ee[a0_0x5a29('0x515')]&&(this[a0_0x5a29('0x287')]=_0x3c06ee[a0_0x5a29('0x95a')](function(_0x26b48c){return _0x26bbfc['a'][a0_0x5a29('0x21d')](_0x26b48c);}),this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=this[a0_0x5a29('0x535')]()),this;},'get':function(){return this['_holes'];}},{'key':a0_0x5a29('0x100'),'get':function(){return Object(_0x3bcaba['c'])([]['concat'](_0x1330a2()(this['_positions']),[this[a0_0x5a29('0x62')][0x0]]));}},{'key':a0_0x5a29('0x7b1'),'get':function(){return Object(_0x3bcaba['a'])(this[a0_0x5a29('0x62')]);}}],[{'key':a0_0x5a29('0x22'),'value':function(_0x55dff7){var _0x5e2a01,_0x314d74=void 0x0,_0x5735b7=_0x4e014c[a0_0x5a29('0x8ab')]['now']();return _0x55dff7['polygon']&&((_0x314d74=new _0x4bb03e(_0x18a8a5['a'][a0_0x5a29('0x87b')](_0x55dff7[a0_0x5a29('0x82a')][a0_0x5a29('0x329')]['getValue'](_0x5735b7)[a0_0x5a29('0x4e0')])))[a0_0x5a29('0x5c6')]=_0x590ad2({},null==_0x55dff7||null===(_0x5e2a01=_0x55dff7['properties'])||void 0x0===_0x5e2a01?void 0x0:_0x5e2a01['getValue'](_0x5735b7))),_0x314d74;}}]),_0x4bb03e;}(_0x438ff6);_0x438ff6['registerType'](a0_0x5a29('0x82a'));var _0x16cd26=_0x274c72;function _0x13aa75(_0x75dd3,_0x1b1844){var _0x3cb7c4=Object[a0_0x5a29('0x148')](_0x75dd3);if(Object[a0_0x5a29('0x75')]){var _0x4e194d=Object[a0_0x5a29('0x75')](_0x75dd3);_0x1b1844&&(_0x4e194d=_0x4e194d[a0_0x5a29('0x48a')](function(_0x3ca578){return Object[a0_0x5a29('0x11a')](_0x75dd3,_0x3ca578)[a0_0x5a29('0x12e')];})),_0x3cb7c4[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x3cb7c4,_0x4e194d);}return _0x3cb7c4;}function _0x2dec37(_0x52de34){for(var _0x5b4afc=0x1;_0x5b4afc<arguments[a0_0x5a29('0x515')];_0x5b4afc++){var _0x39746e=null!=arguments[_0x5b4afc]?arguments[_0x5b4afc]:{};_0x5b4afc%0x2?_0x13aa75(Object(_0x39746e),!0x0)['forEach'](function(_0x49761d){_0x3b629d()(_0x52de34,_0x49761d,_0x39746e[_0x49761d]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x52de34,Object['getOwnPropertyDescriptors'](_0x39746e)):_0x13aa75(Object(_0x39746e))['forEach'](function(_0x5a90df){Object['defineProperty'](_0x52de34,_0x5a90df,Object['getOwnPropertyDescriptor'](_0x39746e,_0x5a90df));});}return _0x52de34;}function _0x5e842f(_0x7c8e88){var _0x57f36e=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x5a1c08){return!0x1;}}();return function(){var _0x579a6d,_0xfea431=_0x119abc()(_0x7c8e88);if(_0x57f36e){var _0x5c7070=_0x119abc()(this)[a0_0x5a29('0x825')];_0x579a6d=Reflect['construct'](_0xfea431,arguments,_0x5c7070);}else _0x579a6d=_0xfea431['apply'](this,arguments);return _0x43e3fd()(this,_0x579a6d);};}var _0x257f1c=DC['Namespace']['Cesium'],_0xd32b08=function(_0x20b937){_0x334c21()(_0x246452,_0x20b937);var _0x103454=_0x5e842f(_0x246452);function _0x246452(_0x410389){var _0x41c879;return _0xda8591()(this,_0x246452),(_0x41c879=_0x103454[a0_0x5a29('0x351')](this))[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x410389),_0x41c879['_delegate']=new _0x257f1c[(a0_0x5a29('0x608'))]({'polyline':{}}),_0x41c879['type']=_0x438ff6['getOverlayType'](a0_0x5a29('0x83f')),_0x41c879[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x41c879;}return _0x5db306()(_0x246452,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x4e0')]=this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x47a'),'value':function(_0xf4b8a1,_0x17c55c){return this[a0_0x5a29('0xe')]['position']=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x100')]),this[a0_0x5a29('0xe')][a0_0x5a29('0x7cc')]=_0x2dec37({'text':_0xf4b8a1},_0x17c55c),this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x3f9984){return _0x3f9984&&0x0!==Object[a0_0x5a29('0x148')](_0x3f9984)[a0_0x5a29('0x515')]?(delete _0x3f9984[a0_0x5a29('0x4e0')],this['_style']=_0x3f9984,_0x3fc456['c'][a0_0x5a29('0x65f')](this['_delegate'][a0_0x5a29('0x83f')],this[a0_0x5a29('0x3e9')]),this):this;}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x2aea39){return this[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x2aea39),this['_delegate']['polyline'][a0_0x5a29('0x4e0')]=_0x18a8a5['a'][a0_0x5a29('0x7a')](this[a0_0x5a29('0x62')]),this;},'get':function(){return this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x100'),'get':function(){return Object(_0x3bcaba['c'])(this[a0_0x5a29('0x62')]);}},{'key':'distance','get':function(){return Object(_0x3bcaba['e'])(this[a0_0x5a29('0x62')]);}}],[{'key':a0_0x5a29('0x22'),'value':function(_0x51a6fa){var _0x18077f,_0x345d93=void 0x0,_0x849185=_0x257f1c[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]();return _0x51a6fa[a0_0x5a29('0x83f')]&&((_0x345d93=new _0x246452(_0x18a8a5['a'][a0_0x5a29('0x87b')](_0x51a6fa['polyline'][a0_0x5a29('0x4e0')][a0_0x5a29('0x94c')](_0x849185))))[a0_0x5a29('0x5c6')]=_0x2dec37({},null==_0x51a6fa||null===(_0x18077f=_0x51a6fa[a0_0x5a29('0x31d')])||void 0x0===_0x18077f?void 0x0:_0x18077f[a0_0x5a29('0x94c')](_0x849185))),_0x345d93;}}]),_0x246452;}(_0x438ff6);_0x438ff6['registerType'](a0_0x5a29('0x83f'));var _0xf088b8=_0xd32b08;function _0x5b7c61(_0xb8411b,_0x1517e5){var _0x435ccc=Object[a0_0x5a29('0x148')](_0xb8411b);if(Object['getOwnPropertySymbols']){var _0x49c0e5=Object[a0_0x5a29('0x75')](_0xb8411b);_0x1517e5&&(_0x49c0e5=_0x49c0e5['filter'](function(_0x43e9f6){return Object['getOwnPropertyDescriptor'](_0xb8411b,_0x43e9f6)[a0_0x5a29('0x12e')];})),_0x435ccc[a0_0x5a29('0x3cd')]['apply'](_0x435ccc,_0x49c0e5);}return _0x435ccc;}function _0x51da08(_0x421a03){var _0x232305=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x690044){return!0x1;}}();return function(){var _0x502597,_0x3a7732=_0x119abc()(_0x421a03);if(_0x232305){var _0x188752=_0x119abc()(this)[a0_0x5a29('0x825')];_0x502597=Reflect['construct'](_0x3a7732,arguments,_0x188752);}else _0x502597=_0x3a7732['apply'](this,arguments);return _0x43e3fd()(this,_0x502597);};}var _0x2eb47b=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x548c80=function(_0x105744){_0x334c21()(_0xa8cbfc,_0x105744);var _0x5d8b41=_0x51da08(_0xa8cbfc);function _0xa8cbfc(_0x18c726,_0x4f2936){var _0xaa277c;return _0xda8591()(this,_0xa8cbfc),(_0xaa277c=_0x5d8b41['call'](this))['_delegate']=new _0x2eb47b[(a0_0x5a29('0x608'))]({'model':{}}),_0xaa277c[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x18c726),_0xaa277c[a0_0x5a29('0x3ec')]=_0x4f2936,_0xaa277c[a0_0x5a29('0x4ca')]=0x0,_0xaa277c[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')]('model'),_0xaa277c[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0xaa277c;}return _0x5db306()(_0xa8cbfc,[{'key':a0_0x5a29('0x62c'),'value':function(){this['position']=this['_position'],this[a0_0x5a29('0x301')]=this[a0_0x5a29('0x3ec')];}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x24411a){return _0x24411a&&0x0!==Object[a0_0x5a29('0x148')](_0x24411a)['length']?(delete _0x24411a[a0_0x5a29('0x4c2')],this[a0_0x5a29('0x3e9')]=_0x24411a,_0x3fc456['c']['merge'](this[a0_0x5a29('0xe')]['model'],this['_style']),this):this;}},{'key':a0_0x5a29('0x53c'),'set':function(_0xeed416){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0xeed416),this[a0_0x5a29('0xe')]['position']=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),0x0===this[a0_0x5a29('0x4ca')]&&(this[a0_0x5a29('0xe')]['orientation']=_0x2eb47b[a0_0x5a29('0x17a')]['headingPitchRollQuaternion'](_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),new _0x2eb47b[(a0_0x5a29('0x819'))](_0x2eb47b[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x2b2')]),_0x2eb47b[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x404')]),_0x2eb47b[a0_0x5a29('0x382')]['toRadians'](this[a0_0x5a29('0x86e')][a0_0x5a29('0x299')])))),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':'modelUrl','set':function(_0x5f371e){return this['_modelUrl']=_0x5f371e,this['_delegate'][a0_0x5a29('0x193')][a0_0x5a29('0x4c2')]=this[a0_0x5a29('0x3ec')],this;},'get':function(){return this[a0_0x5a29('0x3ec')];}},{'key':a0_0x5a29('0x56e'),'set':function(_0x5b6f37){var _0x1804f3=this;return this[a0_0x5a29('0x4ca')]=+_0x5b6f37,this[a0_0x5a29('0x4ca')]>0x0&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x20f')]=new _0x2eb47b[(a0_0x5a29('0x305'))](function(_0x287dce){return _0x1804f3[a0_0x5a29('0x86e')]['heading']+=_0x1804f3[a0_0x5a29('0x4ca')],0x168===_0x1804f3[a0_0x5a29('0x86e')][a0_0x5a29('0x2b2')]&&(_0x1804f3[a0_0x5a29('0x86e')][a0_0x5a29('0x2b2')]=0x0),_0x2eb47b['Transforms'][a0_0x5a29('0xe3')](_0x18a8a5['a'][a0_0x5a29('0x516')](_0x1804f3['_position']),new _0x2eb47b[(a0_0x5a29('0x819'))](_0x2eb47b[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x1804f3[a0_0x5a29('0x86e')]['heading']),_0x2eb47b['Math'][a0_0x5a29('0x78a')](_0x1804f3[a0_0x5a29('0x86e')][a0_0x5a29('0x404')]),_0x2eb47b[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x1804f3[a0_0x5a29('0x86e')]['roll'])));})),this;},'get':function(){return this[a0_0x5a29('0x4ca')];}}],[{'key':'fromEntity','value':function(_0x48a1b1,_0x2f0e4b){var _0x5d9c75=_0x2eb47b[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')](),_0x24eb98=new _0xa8cbfc(_0x18a8a5['a'][a0_0x5a29('0x8f')](_0x48a1b1[a0_0x5a29('0x53c')][a0_0x5a29('0x94c')](_0x5d9c75)),_0x2f0e4b);return _0x24eb98['attr']=function(_0x47e6b5){for(var _0x1db16b=0x1;_0x1db16b<arguments[a0_0x5a29('0x515')];_0x1db16b++){var _0x2f701c=null!=arguments[_0x1db16b]?arguments[_0x1db16b]:{};_0x1db16b%0x2?_0x5b7c61(Object(_0x2f701c),!0x0)[a0_0x5a29('0x570')](function(_0x20efb6){_0x3b629d()(_0x47e6b5,_0x20efb6,_0x2f701c[_0x20efb6]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x47e6b5,Object[a0_0x5a29('0x711')](_0x2f701c)):_0x5b7c61(Object(_0x2f701c))[a0_0x5a29('0x570')](function(_0x4915a7){Object[a0_0x5a29('0xe7')](_0x47e6b5,_0x4915a7,Object[a0_0x5a29('0x11a')](_0x2f701c,_0x4915a7));});}return _0x47e6b5;}({},_0x48a1b1[a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x5d9c75)),_0x24eb98;}}]),_0xa8cbfc;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x193'));var _0x500ef6=_0x548c80;function _0x43ae84(_0x2f8b18,_0x38b8e5){var _0xe3e65=Object[a0_0x5a29('0x148')](_0x2f8b18);if(Object[a0_0x5a29('0x75')]){var _0xded6fe=Object[a0_0x5a29('0x75')](_0x2f8b18);_0x38b8e5&&(_0xded6fe=_0xded6fe[a0_0x5a29('0x48a')](function(_0x1e75fd){return Object[a0_0x5a29('0x11a')](_0x2f8b18,_0x1e75fd)[a0_0x5a29('0x12e')];})),_0xe3e65[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0xe3e65,_0xded6fe);}return _0xe3e65;}function _0x56a35e(_0x18e938){for(var _0x18cba9=0x1;_0x18cba9<arguments[a0_0x5a29('0x515')];_0x18cba9++){var _0x3f1a5=null!=arguments[_0x18cba9]?arguments[_0x18cba9]:{};_0x18cba9%0x2?_0x43ae84(Object(_0x3f1a5),!0x0)['forEach'](function(_0xcab23f){_0x3b629d()(_0x18e938,_0xcab23f,_0x3f1a5[_0xcab23f]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x18e938,Object[a0_0x5a29('0x711')](_0x3f1a5)):_0x43ae84(Object(_0x3f1a5))[a0_0x5a29('0x570')](function(_0xf8d6df){Object[a0_0x5a29('0xe7')](_0x18e938,_0xf8d6df,Object[a0_0x5a29('0x11a')](_0x3f1a5,_0xf8d6df));});}return _0x18e938;}function _0xe1256(_0x2728ad){var _0x50af5c=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype']['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0xeefd24){return!0x1;}}();return function(){var _0x234db0,_0x2a58f7=_0x119abc()(_0x2728ad);if(_0x50af5c){var _0x4d6811=_0x119abc()(this)[a0_0x5a29('0x825')];_0x234db0=Reflect[a0_0x5a29('0x138')](_0x2a58f7,arguments,_0x4d6811);}else _0x234db0=_0x2a58f7['apply'](this,arguments);return _0x43e3fd()(this,_0x234db0);};}var _0x223dc0=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x18450c=function(_0x5273c1){_0x334c21()(_0x5444fd,_0x5273c1);var _0x3e6d39=_0xe1256(_0x5444fd);function _0x5444fd(_0x1ad124){var _0x491d4d,_0x4ad3a7=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};return _0xda8591()(this,_0x5444fd),(_0x491d4d=_0x3e6d39[a0_0x5a29('0x351')](this))[a0_0x5a29('0xe')]=new _0x223dc0[(a0_0x5a29('0x2c0'))](_0x56a35e(_0x56a35e({},_0x4ad3a7),{},{'url':_0x1ad124})),_0x491d4d[a0_0x5a29('0x334')]=void 0x0,_0x491d4d[a0_0x5a29('0x5db')]=void 0x0,_0x491d4d[a0_0x5a29('0x1f8')]=void 0x0,_0x491d4d[a0_0x5a29('0x84d')]=void 0x0,_0x491d4d[a0_0x5a29('0x5c5')]=void 0x0,_0x491d4d[a0_0x5a29('0x519')]=_0x438ff6['getOverlayType']('tileset'),_0x491d4d['_state']=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x491d4d;}return _0x5db306()(_0x5444fd,[{'key':a0_0x5a29('0x20c'),'value':function(_0x381134){var _0x11a566=this;if(!_0x381134)return!0x1;this[a0_0x5a29('0x1a6')]=_0x381134,this['_delegate'][a0_0x5a29('0x92f')][a0_0x5a29('0x618')](function(_0xb25ef7){_0x11a566[a0_0x5a29('0x1a6')]['delegate']['add'](_0xb25ef7),_0xb25ef7[a0_0x5a29('0x6a6')]=_0x381134[a0_0x5a29('0x6a6')],_0xb25ef7['overlayId']=_0x11a566[a0_0x5a29('0x5ed')],_0x11a566[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x85')];});}},{'key':a0_0x5a29('0x4fc'),'value':function(){var _0xaf8c61=this;if(!this[a0_0x5a29('0x1a6')])return!0x1;this['_delegate'][a0_0x5a29('0x92f')]['then'](function(_0x1fc681){_0xaf8c61[a0_0x5a29('0x1a6')][a0_0x5a29('0x67e')]['remove'](_0x1fc681),_0xaf8c61[a0_0x5a29('0x284')]=_0x9cc25a['a']['REMOVED'];});}},{'key':a0_0x5a29('0xbf'),'value':function(_0x382429){this[a0_0x5a29('0x4b7')](_0x382429);}},{'key':a0_0x5a29('0x4b7'),'value':function(_0xddf447){var _0x8da5c6=this;if(this[a0_0x5a29('0x1f8')]&&this['_properties']['length'])for(var _0x3b7bd4=_0xddf447[a0_0x5a29('0x7da')],_0x4d78a5=function(_0x39ec9d){var _0x487ac6=_0x3b7bd4[a0_0x5a29('0x21c')](_0x39ec9d);_0x8da5c6[a0_0x5a29('0x1f8')][a0_0x5a29('0x570')](function(_0x1f9cac){_0x487ac6['hasProperty'](_0x1f9cac['key'])&&_0x487ac6['getProperty'](_0x1f9cac['key'])===_0x1f9cac[a0_0x5a29('0x80b')]&&_0x487ac6[a0_0x5a29('0x163')](_0x1f9cac['propertyName'],_0x1f9cac[a0_0x5a29('0x802')]);});},_0x23a703=0x0;_0x23a703<_0x3b7bd4[a0_0x5a29('0x198')];_0x23a703++)_0x4d78a5(_0x23a703);}},{'key':a0_0x5a29('0x18'),'value':function(_0x587666){return _0x587666=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x587666),this[a0_0x5a29('0xe')][a0_0x5a29('0x92f')][a0_0x5a29('0x618')](function(_0x455476){var _0x19bddc=_0x223dc0['Transforms']['eastNorthUpToFixedFrame'](_0x223dc0[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x587666[a0_0x5a29('0x121')],_0x587666['lat'],_0x587666[a0_0x5a29('0x624')])),_0x49f31a=_0x223dc0['Matrix4'][a0_0x5a29('0x8f0')](_0x223dc0[a0_0x5a29('0x3a1')]['fromRotationZ'](_0x223dc0[a0_0x5a29('0x382')]['toRadians'](_0x587666[a0_0x5a29('0x2b2')])));_0x223dc0['Matrix4'][a0_0x5a29('0x1b0')](_0x19bddc,_0x49f31a,_0x19bddc),_0x455476[a0_0x5a29('0x3bf')]['transform']=_0x19bddc;}),this;}},{'key':'setLabel','value':function(_0x33f848,_0x2d4e7a){return this;}},{'key':a0_0x5a29('0x14f'),'value':function(){var _0x5154cf=this;return this[a0_0x5a29('0xe')][a0_0x5a29('0x92f')][a0_0x5a29('0x618')](function(_0x349673){_0x5154cf['_center']||(_0x5154cf[a0_0x5a29('0x5c5')]=_0x223dc0['Cartographic'][a0_0x5a29('0x64c')](_0x349673[a0_0x5a29('0x42c')][a0_0x5a29('0x100')]));var _0x43617=_0x223dc0[a0_0x5a29('0x3bd')]['fromRadians'](_0x5154cf['_center']['longitude'],_0x5154cf['_center'][a0_0x5a29('0x517')],_0x5154cf[a0_0x5a29('0x5c5')][a0_0x5a29('0x6b7')]),_0x1be9f9=_0x223dc0['Cartesian3'][a0_0x5a29('0x38')](_0x5154cf['_center'][a0_0x5a29('0x706')],_0x5154cf[a0_0x5a29('0x5c5')]['latitude'],0x0),_0x1f63dc=_0x223dc0[a0_0x5a29('0x3bd')][a0_0x5a29('0x3c0')](_0x1be9f9,_0x43617,new _0x223dc0[(a0_0x5a29('0x3bd'))]());_0x349673[a0_0x5a29('0x1d1')]=_0x223dc0['Matrix4'][a0_0x5a29('0x1dd')](_0x1f63dc);}),this;}},{'key':a0_0x5a29('0x7d5'),'value':function(_0x51659b){var _0x1ee769=this;return this['_height']=_0x51659b,this['_delegate'][a0_0x5a29('0x92f')][a0_0x5a29('0x618')](function(_0x3064d6){_0x1ee769[a0_0x5a29('0x5c5')]||(_0x1ee769['_center']=_0x223dc0['Cartographic'][a0_0x5a29('0x64c')](_0x3064d6[a0_0x5a29('0x42c')][a0_0x5a29('0x100')]));var _0x3305be=_0x223dc0[a0_0x5a29('0x3bd')][a0_0x5a29('0x38')](_0x1ee769[a0_0x5a29('0x5c5')][a0_0x5a29('0x706')],_0x1ee769[a0_0x5a29('0x5c5')]['latitude'],_0x1ee769[a0_0x5a29('0x5c5')][a0_0x5a29('0x6b7')]),_0x2e7f78=_0x223dc0[a0_0x5a29('0x3bd')][a0_0x5a29('0x38')](_0x1ee769[a0_0x5a29('0x5c5')]['longitude'],_0x1ee769[a0_0x5a29('0x5c5')]['latitude'],_0x1ee769[a0_0x5a29('0x5c5')][a0_0x5a29('0x6b7')]+_0x1ee769['_height']),_0x1a0c87=_0x223dc0['Cartesian3']['subtract'](_0x2e7f78,_0x3305be,new _0x223dc0[(a0_0x5a29('0x3bd'))]());_0x3064d6['modelMatrix']=_0x223dc0[a0_0x5a29('0x4e6')][a0_0x5a29('0x1dd')](_0x1a0c87);}),this;}},{'key':a0_0x5a29('0x254'),'value':function(_0x2f67bc){return this[a0_0x5a29('0xe')][a0_0x5a29('0x92f')][a0_0x5a29('0x618')](function(_0x2e3b2e){var _0x3dcca5=_0x2e3b2e[a0_0x5a29('0x3bf')]['transform'];_0x2f67bc>0x0&&0x1!==_0x2f67bc&&_0x223dc0[a0_0x5a29('0x4e6')][a0_0x5a29('0x394')](_0x3dcca5,_0x2f67bc,_0x3dcca5),_0x2e3b2e['root'][a0_0x5a29('0x44')]=_0x3dcca5;}),this;}},{'key':a0_0x5a29('0x387'),'value':function(_0x4d3d63){return this[a0_0x5a29('0x1f8')]=_0x4d3d63,!this[a0_0x5a29('0x334')]&&(this[a0_0x5a29('0x334')]=this[a0_0x5a29('0xe')][a0_0x5a29('0x2fa')][a0_0x5a29('0x464')](this['_tileVisibleHandler'],this)),this;}},{'key':'setStyle','value':function(_0x5315cb){return _0x5315cb&&_0x5315cb instanceof _0x223dc0[a0_0x5a29('0x593')]&&(this[a0_0x5a29('0x3e9')]=_0x5315cb,this[a0_0x5a29('0xe')][a0_0x5a29('0x46a')]=this['_style']),this;}},{'key':'readyPromise','get':function(){return this['_delegate']['readyPromise'];}}]),_0x5444fd;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')]('tileset');var _0x3f7d78=_0x18450c;function _0x564c31(_0x1bf6e2){var _0xec0d7c=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x2c834a){return!0x1;}}();return function(){var _0x305a91,_0x4afd1f=_0x119abc()(_0x1bf6e2);if(_0xec0d7c){var _0x3b6422=_0x119abc()(this)[a0_0x5a29('0x825')];_0x305a91=Reflect['construct'](_0x4afd1f,arguments,_0x3b6422);}else _0x305a91=_0x4afd1f[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x305a91);};}var _0x17400f=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x3a19f4=function(_0x32c3ee){_0x334c21()(_0x4d209e,_0x32c3ee);var _0x385d29=_0x564c31(_0x4d209e);function _0x4d209e(_0x249fc1,_0x2d84e3,_0x5ea51f,_0x383101){var _0x359e5f;return _0xda8591()(this,_0x4d209e),(_0x359e5f=_0x385d29[a0_0x5a29('0x351')](this))[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x249fc1),_0x359e5f['_length']=_0x2d84e3,_0x359e5f[a0_0x5a29('0x913')]=_0x5ea51f,_0x359e5f['_height']=_0x383101,_0x359e5f['_delegate']=new _0x17400f[(a0_0x5a29('0x608'))]({'box':{'dimensions':{'x':+_0x359e5f[a0_0x5a29('0x595')],'y':+_0x359e5f['_width'],'z':+_0x359e5f[a0_0x5a29('0x5db')]}}}),_0x359e5f[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x14c')),_0x359e5f[a0_0x5a29('0x284')]=_0x9cc25a['a']['INITIALIZED'],_0x359e5f;}return _0x5db306()(_0x4d209e,[{'key':a0_0x5a29('0x62c'),'value':function(){this['position']=this['_position'];}},{'key':'setStyle','value':function(_0x420f86){return 0x0===Object[a0_0x5a29('0x148')](_0x420f86)[a0_0x5a29('0x515')]||(delete _0x420f86[a0_0x5a29('0x515')]&&delete _0x420f86['width']&&delete _0x420f86[a0_0x5a29('0x6b7')],this['_style']=_0x420f86,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')]['box'],this['_style'])),this;}},{'key':a0_0x5a29('0x53c'),'set':function(_0x291bee){return this['_position']=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x291bee),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),this[a0_0x5a29('0xe')][a0_0x5a29('0x20f')]=_0x17400f[a0_0x5a29('0x17a')][a0_0x5a29('0xe3')](_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),new _0x17400f[(a0_0x5a29('0x819'))](_0x17400f[a0_0x5a29('0x382')]['toRadians'](this['_position'][a0_0x5a29('0x2b2')]),_0x17400f[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x404')]),_0x17400f['Math'][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x299')]))),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':'length','set':function(_0x191b5a){return this[a0_0x5a29('0x595')]=_0x191b5a||0x0,this[a0_0x5a29('0xe')]['box'][a0_0x5a29('0xa8')]['x']=+this['_length'],this;},'get':function(){return this[a0_0x5a29('0x595')];}},{'key':a0_0x5a29('0x96f'),'set':function(_0x117b4d){return this[a0_0x5a29('0x913')]=_0x117b4d||0x0,this[a0_0x5a29('0xe')]['box'][a0_0x5a29('0xa8')]['y']=+this[a0_0x5a29('0x913')],this;},'get':function(){return this[a0_0x5a29('0x913')];}},{'key':a0_0x5a29('0x6b7'),'set':function(_0x1da936){return this['_height']=_0x1da936||0x0,this[a0_0x5a29('0xe')]['box'][a0_0x5a29('0xa8')]['z']=+this[a0_0x5a29('0x5db')],this;},'get':function(){return this[a0_0x5a29('0x5db')];}}]),_0x4d209e;}(_0x438ff6);_0x438ff6['registerType']('box');var _0x2becd9=_0x3a19f4;function _0x4d4de8(_0xb48bfe,_0xf077dd){var _0x408fa2=Object[a0_0x5a29('0x148')](_0xb48bfe);if(Object[a0_0x5a29('0x75')]){var _0x5f4aa0=Object[a0_0x5a29('0x75')](_0xb48bfe);_0xf077dd&&(_0x5f4aa0=_0x5f4aa0[a0_0x5a29('0x48a')](function(_0x25b902){return Object[a0_0x5a29('0x11a')](_0xb48bfe,_0x25b902)[a0_0x5a29('0x12e')];})),_0x408fa2['push'][a0_0x5a29('0x758')](_0x408fa2,_0x5f4aa0);}return _0x408fa2;}function _0x321bdb(_0x2a333b){var _0x2a4750=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x55fd33){return!0x1;}}();return function(){var _0x3fd3f3,_0x1c0c3d=_0x119abc()(_0x2a333b);if(_0x2a4750){var _0x247baf=_0x119abc()(this)[a0_0x5a29('0x825')];_0x3fd3f3=Reflect['construct'](_0x1c0c3d,arguments,_0x247baf);}else _0x3fd3f3=_0x1c0c3d['apply'](this,arguments);return _0x43e3fd()(this,_0x3fd3f3);};}var _0xc243bc=DC['Namespace'][a0_0x5a29('0x6e8')],_0x54a802=function(_0x29a7a0){_0x334c21()(_0x5d9bb1,_0x29a7a0);var _0x2065da=_0x321bdb(_0x5d9bb1);function _0x5d9bb1(_0x507165){var _0x71c4c7;return _0xda8591()(this,_0x5d9bb1),(_0x71c4c7=_0x2065da[a0_0x5a29('0x351')](this))[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x507165),_0x71c4c7[a0_0x5a29('0xe')]=new _0xc243bc[(a0_0x5a29('0x608'))]({'corridor':{}}),_0x71c4c7['type']=_0x438ff6['getOverlayType']('corridor'),_0x71c4c7[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x71c4c7;}return _0x5db306()(_0x5d9bb1,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x4e0')]=this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x47a'),'value':function(_0x24f76e,_0x227491){return this;}},{'key':'setStyle','value':function(_0x1bd2d8){return 0x0===Object[a0_0x5a29('0x148')](_0x1bd2d8)[a0_0x5a29('0x515')]||(delete _0x1bd2d8[a0_0x5a29('0x4e0')],this[a0_0x5a29('0x3e9')]=_0x1bd2d8,_0x3fc456['c']['merge'](this[a0_0x5a29('0xe')][a0_0x5a29('0x7f8')],this[a0_0x5a29('0x3e9')])),this;}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x46a20a){return this['_positions']=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x46a20a),this[a0_0x5a29('0xe')]['corridor']['positions']=_0x18a8a5['a']['transformWGS84ArrayToCartesianArray'](this[a0_0x5a29('0x62')]),this;},'get':function(){return this['_positions'];}}],[{'key':'fromEntity','value':function(_0x245ee0){var _0x4e8019,_0x5b9db4=void 0x0,_0x513e6b=_0xc243bc[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]();return _0x245ee0[a0_0x5a29('0x83f')]&&((_0x5b9db4=new _0x5d9bb1(_0x18a8a5['a'][a0_0x5a29('0x87b')](_0x245ee0[a0_0x5a29('0x83f')]['positions'][a0_0x5a29('0x94c')](_0x513e6b))))[a0_0x5a29('0x5c6')]=function(_0x1b0406){for(var _0x176b65=0x1;_0x176b65<arguments[a0_0x5a29('0x515')];_0x176b65++){var _0x5d18ff=null!=arguments[_0x176b65]?arguments[_0x176b65]:{};_0x176b65%0x2?_0x4d4de8(Object(_0x5d18ff),!0x0)['forEach'](function(_0x5d5398){_0x3b629d()(_0x1b0406,_0x5d5398,_0x5d18ff[_0x5d5398]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x5a29('0x4a5')](_0x1b0406,Object[a0_0x5a29('0x711')](_0x5d18ff)):_0x4d4de8(Object(_0x5d18ff))[a0_0x5a29('0x570')](function(_0x57f0ba){Object['defineProperty'](_0x1b0406,_0x57f0ba,Object[a0_0x5a29('0x11a')](_0x5d18ff,_0x57f0ba));});}return _0x1b0406;}({},null==_0x245ee0||null===(_0x4e8019=_0x245ee0[a0_0x5a29('0x31d')])||void 0x0===_0x4e8019?void 0x0:_0x4e8019[a0_0x5a29('0x94c')](_0x513e6b))),_0x5b9db4;}}]),_0x5d9bb1;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')]('corridor');var _0x476929=_0x54a802;function _0x4b7751(_0x267f92){var _0x16735b=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x3614d6){return!0x1;}}();return function(){var _0x291a90,_0x4b96be=_0x119abc()(_0x267f92);if(_0x16735b){var _0x124039=_0x119abc()(this)[a0_0x5a29('0x825')];_0x291a90=Reflect[a0_0x5a29('0x138')](_0x4b96be,arguments,_0x124039);}else _0x291a90=_0x4b96be[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x291a90);};}var _0x4a9d7a=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4ea393=function(_0xda88ed){_0x334c21()(_0x3ddd49,_0xda88ed);var _0x2e679d=_0x4b7751(_0x3ddd49);function _0x3ddd49(_0x264816,_0xae1d3e,_0x10fd46,_0x1d4220){var _0x1aa674;return _0xda8591()(this,_0x3ddd49),(_0x1aa674=_0x2e679d[a0_0x5a29('0x351')](this))[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x264816),_0x1aa674[a0_0x5a29('0x595')]=+_0xae1d3e||0x0,_0x1aa674[a0_0x5a29('0x917')]=+_0x10fd46||0x0,_0x1aa674['_bottomRadius']=+_0x1d4220||0x0,_0x1aa674[a0_0x5a29('0xe')]=new _0x4a9d7a[(a0_0x5a29('0x608'))]({'cylinder':{}}),_0x1aa674[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x228')),_0x1aa674['_state']=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x1aa674;}return _0x5db306()(_0x3ddd49,[{'key':'_mountedHook','value':function(){this[a0_0x5a29('0x53c')]=this[a0_0x5a29('0x86e')],this[a0_0x5a29('0x515')]=this[a0_0x5a29('0x595')],this[a0_0x5a29('0x244')]=this['_topRadius'],this[a0_0x5a29('0x959')]=this['_bottomRadius'];}},{'key':a0_0x5a29('0x47a'),'value':function(_0x50b8e9,_0x1de80e){return this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x48813a){return 0x0===Object[a0_0x5a29('0x148')](_0x48813a)[a0_0x5a29('0x515')]||(delete _0x48813a[a0_0x5a29('0x515')]&&delete _0x48813a[a0_0x5a29('0x244')]&&delete _0x48813a[a0_0x5a29('0x959')],this[a0_0x5a29('0x3e9')]=_0x48813a,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')][a0_0x5a29('0x228')],this[a0_0x5a29('0x3e9')])),this;}},{'key':a0_0x5a29('0x53c'),'set':function(_0x287fe7){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x287fe7),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=_0x18a8a5['a'][a0_0x5a29('0x516')](this['_position']),this[a0_0x5a29('0xe')][a0_0x5a29('0x20f')]=_0x4a9d7a[a0_0x5a29('0x17a')][a0_0x5a29('0xe3')](_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),new _0x4a9d7a[(a0_0x5a29('0x819'))](_0x4a9d7a[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x2b2')]),_0x4a9d7a['Math'][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')]['pitch']),_0x4a9d7a[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')]['roll']))),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':a0_0x5a29('0x515'),'set':function(_0x4c4a8c){return this[a0_0x5a29('0x595')]=+_0x4c4a8c||0x0,this['_delegate']['cylinder'][a0_0x5a29('0x515')]=this[a0_0x5a29('0x595')],this;},'get':function(){return this[a0_0x5a29('0x595')];}},{'key':'topRadius','set':function(_0x372ca6){return this[a0_0x5a29('0x917')]=+_0x372ca6||0x0,this['_delegate'][a0_0x5a29('0x228')]['topRadius']=this[a0_0x5a29('0x917')],this;},'get':function(){return this[a0_0x5a29('0x917')];}},{'key':'bottomRadius','set':function(_0x1eccff){return this[a0_0x5a29('0x7e8')]=+_0x1eccff||0x0,this['_delegate'][a0_0x5a29('0x228')][a0_0x5a29('0x959')]=this[a0_0x5a29('0x7e8')],this;},'get':function(){return this[a0_0x5a29('0x7e8')];}}]),_0x3ddd49;}(_0x438ff6);_0x438ff6['registerType']('cylinder');var _0xeb0c07=_0x4ea393;function _0x4d4368(_0x218a8d){var _0x1c08f5=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x1cd363){return!0x1;}}();return function(){var _0x3c5e9f,_0x138928=_0x119abc()(_0x218a8d);if(_0x1c08f5){var _0x329809=_0x119abc()(this)['constructor'];_0x3c5e9f=Reflect[a0_0x5a29('0x138')](_0x138928,arguments,_0x329809);}else _0x3c5e9f=_0x138928[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x3c5e9f);};}var _0xdb6b1e=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x548c5d=function(_0x5147df){_0x334c21()(_0x307aa3,_0x5147df);var _0x1aeb40=_0x4d4368(_0x307aa3);function _0x307aa3(_0x53f51d,_0x11cf73,_0x487f58){var _0x568439;return _0xda8591()(this,_0x307aa3),(_0x568439=_0x1aeb40[a0_0x5a29('0x351')](this))['_position']=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x53f51d),_0x568439[a0_0x5a29('0x944')]=+_0x11cf73||0x0,_0x568439[a0_0x5a29('0x40')]=+_0x487f58||0x0,_0x568439[a0_0x5a29('0xe')]=new _0xdb6b1e['Entity']({'ellipse':{}}),_0x568439['type']=_0x438ff6[a0_0x5a29('0x214')]('ellipse'),_0x568439['_state']=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x568439;}return _0x5db306()(_0x307aa3,[{'key':'_mountedHook','value':function(){this[a0_0x5a29('0x53c')]=this[a0_0x5a29('0x86e')],this['semiMajorAxis']=this[a0_0x5a29('0x944')],this['semiMinorAxis']=this[a0_0x5a29('0x40')];}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x3cf22c){return 0x0===Object['keys'](_0x3cf22c)[a0_0x5a29('0x515')]||(delete _0x3cf22c[a0_0x5a29('0x97f')]&&delete _0x3cf22c[a0_0x5a29('0x1fd')],this[a0_0x5a29('0x3e9')]=_0x3cf22c,_0x3fc456['c']['merge'](this[a0_0x5a29('0xe')]['ellipse'],this['_style'])),this;}},{'key':a0_0x5a29('0x53c'),'set':function(_0x247547){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x247547),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=_0x18a8a5['a'][a0_0x5a29('0x516')](this['_position']),this[a0_0x5a29('0xe')][a0_0x5a29('0x20f')]=_0xdb6b1e['Transforms'][a0_0x5a29('0xe3')](_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),new _0xdb6b1e[(a0_0x5a29('0x819'))](_0xdb6b1e[a0_0x5a29('0x382')]['toRadians'](this['_position']['heading']),_0xdb6b1e['Math'][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x404')]),_0xdb6b1e[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')]['roll']))),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':'semiMajorAxis','set':function(_0x49e3b1){return this[a0_0x5a29('0x944')]=+_0x49e3b1||0x0,this['_delegate'][a0_0x5a29('0x92')]['semiMajorAxis']=this[a0_0x5a29('0x944')],this;},'get':function(){return this[a0_0x5a29('0x944')];}},{'key':'semiMinorAxis','set':function(_0x2afd43){return this[a0_0x5a29('0x40')]=+_0x2afd43||0x0,this['_delegate']['ellipse'][a0_0x5a29('0x1fd')]=this[a0_0x5a29('0x40')],this;},'get':function(){return this[a0_0x5a29('0x40')];}}]),_0x307aa3;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')]('ellipse');var _0xc36ad4=_0x548c5d;function _0x38ffa9(_0x59c8aa){var _0x1c5801=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x14c1d9){return!0x1;}}();return function(){var _0x44641e,_0x39152d=_0x119abc()(_0x59c8aa);if(_0x1c5801){var _0x23a17e=_0x119abc()(this)[a0_0x5a29('0x825')];_0x44641e=Reflect[a0_0x5a29('0x138')](_0x39152d,arguments,_0x23a17e);}else _0x44641e=_0x39152d[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x44641e);};}var _0x58869f=DC[a0_0x5a29('0x239')]['Cesium'],_0x4f54fd=function(_0x5367c7){_0x334c21()(_0x396d34,_0x5367c7);var _0x388e73=_0x38ffa9(_0x396d34);function _0x396d34(_0x2da272,_0x1a61e3){var _0x29e808;return _0xda8591()(this,_0x396d34),(_0x29e808=_0x388e73[a0_0x5a29('0x351')](this))[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x2da272),_0x29e808[a0_0x5a29('0x973')]=_0x1a61e3||{'x':0xa,'y':0xa,'z':0xa},_0x29e808[a0_0x5a29('0xe')]=new _0x58869f[(a0_0x5a29('0x608'))]({'ellipsoid':{}}),_0x29e808[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')]('ellipsoid'),_0x29e808['_state']=_0x9cc25a['a']['INITIALIZED'],_0x29e808;}return _0x5db306()(_0x396d34,[{'key':'_mountedHook','value':function(){this['position']=this['_position'],this[a0_0x5a29('0x6e1')]=this[a0_0x5a29('0x973')];}},{'key':'setStyle','value':function(_0xf2d089){return 0x0===Object['keys'](_0xf2d089)[a0_0x5a29('0x515')]||(delete _0xf2d089[a0_0x5a29('0x6e1')],this[a0_0x5a29('0x3e9')]=_0xf2d089,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')]['ellipsoid'],this[a0_0x5a29('0x3e9')])),this;}},{'key':'position','set':function(_0x45718d){return this['_position']=_0x26bbfc['a']['parsePosition'](_0x45718d),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),this[a0_0x5a29('0xe')][a0_0x5a29('0x20f')]=_0x58869f[a0_0x5a29('0x17a')][a0_0x5a29('0xe3')](_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),new _0x58869f['HeadingPitchRoll'](_0x58869f[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')]['heading']),_0x58869f[a0_0x5a29('0x382')]['toRadians'](this[a0_0x5a29('0x86e')][a0_0x5a29('0x404')]),_0x58869f['Math'][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x299')]))),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':'radius','set':function(_0x4d4a7c){return this[a0_0x5a29('0x973')]=_0x4d4a7c||{'x':0xa,'y':0xa,'z':0xa},this['_delegate'][a0_0x5a29('0x12c')][a0_0x5a29('0x37e')]=this['_radius'],this;},'get':function(){return this[a0_0x5a29('0x973')];}}]),_0x396d34;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x12c'));var _0x3b830e=_0x4f54fd;function _0x2c4690(_0x1e94ee){var _0x52b4ff=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x5656ac){return!0x1;}}();return function(){var _0x2a4a6c,_0xd1b2f7=_0x119abc()(_0x1e94ee);if(_0x52b4ff){var _0x450ab4=_0x119abc()(this)[a0_0x5a29('0x825')];_0x2a4a6c=Reflect[a0_0x5a29('0x138')](_0xd1b2f7,arguments,_0x450ab4);}else _0x2a4a6c=_0xd1b2f7[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x2a4a6c);};}var _0x4a7d4e=DC['Namespace'][a0_0x5a29('0x6e8')],_0x23f6ea=function(_0x2a557c){_0x334c21()(_0x29e63f,_0x2a557c);var _0x3f57a6=_0x2c4690(_0x29e63f);function _0x29e63f(_0x333c79,_0x49a2cd,_0x4ce5d7,_0x108e55){var _0x1f46a7;return _0xda8591()(this,_0x29e63f),(_0x1f46a7=_0x3f57a6['call'](this))[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x333c79),_0x1f46a7['_width']=+_0x49a2cd||0x0,_0x1f46a7[a0_0x5a29('0x5db')]=+_0x4ce5d7||0x0,_0x1f46a7['_plane']=new _0x4a7d4e['Plane'](_0x4a7d4e[a0_0x5a29('0x3bd')]['clone'](_0x108e55),0x0),_0x1f46a7[a0_0x5a29('0xe')]=new _0x4a7d4e['Entity']({'plane':{'dimensions':{'x':_0x1f46a7[a0_0x5a29('0x913')],'y':_0x1f46a7['_height']}}}),_0x1f46a7[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x4e7')),_0x1f46a7['_state']=_0x9cc25a['a']['INITIALIZED'],_0x1f46a7;}return _0x5db306()(_0x29e63f,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x53c')]=this['_position'],this[a0_0x5a29('0x278')]=this[a0_0x5a29('0x2df')];}},{'key':a0_0x5a29('0x47a'),'value':function(_0x58eb94,_0x25545c){return this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x4c67d9){return 0x0===Object[a0_0x5a29('0x148')](_0x4c67d9)[a0_0x5a29('0x515')]||(delete _0x4c67d9[a0_0x5a29('0xa8')],this['_style']=_0x4c67d9,_0x3fc456['c']['merge'](this[a0_0x5a29('0xe')][a0_0x5a29('0x4e7')],this[a0_0x5a29('0x3e9')])),this;}},{'key':'position','set':function(_0x1d96f5){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x1d96f5),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=_0x18a8a5['a']['transformWGS84ToCartesian'](this[a0_0x5a29('0x86e')]),this[a0_0x5a29('0xe')][a0_0x5a29('0x20f')]=_0x4a7d4e[a0_0x5a29('0x17a')][a0_0x5a29('0xe3')](_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),new _0x4a7d4e['HeadingPitchRoll'](_0x4a7d4e[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x2b2')]),_0x4a7d4e[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x86e')][a0_0x5a29('0x404')]),_0x4a7d4e['Math'][a0_0x5a29('0x78a')](this['_position'][a0_0x5a29('0x299')]))),this;},'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':a0_0x5a29('0x96f'),'set':function(_0xab621){return this[a0_0x5a29('0x913')]=+_0xab621||0x0,this[a0_0x5a29('0xe')][a0_0x5a29('0x369')][a0_0x5a29('0xa8')]['x']=this[a0_0x5a29('0x913')],this;},'get':function(){return this[a0_0x5a29('0x913')];}},{'key':a0_0x5a29('0x6b7'),'set':function(_0x4d7d79){return this[a0_0x5a29('0x5db')]=+_0x4d7d79||0x0,this[a0_0x5a29('0xe')]['plan'][a0_0x5a29('0xa8')]['y']=this['_height'],this;},'get':function(){return this[a0_0x5a29('0x5db')];}},{'key':a0_0x5a29('0x278'),'set':function(_0x36aed1){return this[a0_0x5a29('0x807')]=new _0x4a7d4e[(a0_0x5a29('0x19'))](_0x36aed1,0x0),this[a0_0x5a29('0xe')][a0_0x5a29('0x369')][a0_0x5a29('0x4e7')]=new _0x4a7d4e[(a0_0x5a29('0x19'))](_0x36aed1,0x0),this;}}]),_0x29e63f;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x4e7'));var _0x8e680f=_0x23f6ea;function _0x3c112f(_0x1a3fa9,_0x593e90){var _0x297f2f=Object[a0_0x5a29('0x148')](_0x1a3fa9);if(Object[a0_0x5a29('0x75')]){var _0x12011a=Object[a0_0x5a29('0x75')](_0x1a3fa9);_0x593e90&&(_0x12011a=_0x12011a['filter'](function(_0x3d24ee){return Object[a0_0x5a29('0x11a')](_0x1a3fa9,_0x3d24ee)[a0_0x5a29('0x12e')];})),_0x297f2f[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x297f2f,_0x12011a);}return _0x297f2f;}function _0x318468(_0x2751e1){var _0x26117a=function(){if('undefined'==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x466989){return!0x1;}}();return function(){var _0x43827d,_0x268c35=_0x119abc()(_0x2751e1);if(_0x26117a){var _0x10beb5=_0x119abc()(this)[a0_0x5a29('0x825')];_0x43827d=Reflect[a0_0x5a29('0x138')](_0x268c35,arguments,_0x10beb5);}else _0x43827d=_0x268c35[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x43827d);};}var _0x2b0b15=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0xc464b7=function(_0x195ce0){_0x334c21()(_0x442107,_0x195ce0);var _0xb6bdcf=_0x318468(_0x442107);function _0x442107(_0x37c65f,_0xf660d4){var _0xe3c12;return _0xda8591()(this,_0x442107),(_0xe3c12=_0xb6bdcf[a0_0x5a29('0x351')](this))[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x37c65f),_0xe3c12[a0_0x5a29('0x500')]=_0xf660d4||[],_0xe3c12[a0_0x5a29('0xe')]=new _0x2b0b15['Entity']({'polylineVolume':{}}),_0xe3c12['type']=_0x438ff6[a0_0x5a29('0x214')]('polyline_volume'),_0xe3c12[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0xe3c12;}return _0x5db306()(_0x442107,[{'key':a0_0x5a29('0x62c'),'value':function(){this['positions']=this[a0_0x5a29('0x62')],this['shape']=this[a0_0x5a29('0x500')];}},{'key':a0_0x5a29('0x47a'),'value':function(_0x540e09,_0x1ed209){return this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x48a113){return 0x0===Object[a0_0x5a29('0x148')](_0x48a113)['length']||(delete _0x48a113[a0_0x5a29('0x4e0')]&&delete _0x48a113[a0_0x5a29('0x586')],this[a0_0x5a29('0x3e9')]=_0x48a113,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')][a0_0x5a29('0x970')],this['_style'])),this;}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x32b935){return this[a0_0x5a29('0x62')]=_0x26bbfc['a']['parsePositions'](_0x32b935),this[a0_0x5a29('0xe')][a0_0x5a29('0x970')][a0_0x5a29('0x4e0')]=_0x18a8a5['a'][a0_0x5a29('0x7a')](this[a0_0x5a29('0x62')]),this;},'get':function(){return this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x586'),'set':function(_0x4c10f8){return this['_shape']=_0x4c10f8||[],this['_delegate']['polylineVolume'][a0_0x5a29('0x586')]=this[a0_0x5a29('0x500')],this;},'get':function(){return this['_shape'];}}],[{'key':a0_0x5a29('0x22'),'value':function(_0x5b036e,_0x27fb94){var _0x4b6555,_0xafc09=void 0x0,_0x4e345d=_0x2b0b15['JulianDate']['now']();return _0x5b036e[a0_0x5a29('0x83f')]&&((_0xafc09=new _0x442107(_0x18a8a5['a']['transformCartesianArrayToWGS84Array'](_0x5b036e[a0_0x5a29('0x83f')][a0_0x5a29('0x4e0')][a0_0x5a29('0x94c')](_0x4e345d)),_0x27fb94))[a0_0x5a29('0x5c6')]=function(_0x13a597){for(var _0x47242d=0x1;_0x47242d<arguments[a0_0x5a29('0x515')];_0x47242d++){var _0x5926a9=null!=arguments[_0x47242d]?arguments[_0x47242d]:{};_0x47242d%0x2?_0x3c112f(Object(_0x5926a9),!0x0)['forEach'](function(_0x3eeb76){_0x3b629d()(_0x13a597,_0x3eeb76,_0x5926a9[_0x3eeb76]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x13a597,Object[a0_0x5a29('0x711')](_0x5926a9)):_0x3c112f(Object(_0x5926a9))[a0_0x5a29('0x570')](function(_0x4b10af){Object[a0_0x5a29('0xe7')](_0x13a597,_0x4b10af,Object[a0_0x5a29('0x11a')](_0x5926a9,_0x4b10af));});}return _0x13a597;}({},null==_0x5b036e||null===(_0x4b6555=_0x5b036e['properties'])||void 0x0===_0x4b6555?void 0x0:_0x4b6555[a0_0x5a29('0x94c')](_0x4e345d))),_0xafc09;}}]),_0x442107;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x715'));var _0x45ce48=_0xc464b7;function _0x1981e4(_0x3cf62c){var _0x4ef551=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x2264c9){return!0x1;}}();return function(){var _0x16292a,_0x3acfa2=_0x119abc()(_0x3cf62c);if(_0x4ef551){var _0x313eec=_0x119abc()(this)['constructor'];_0x16292a=Reflect[a0_0x5a29('0x138')](_0x3acfa2,arguments,_0x313eec);}else _0x16292a=_0x3acfa2[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x16292a);};}var _0x43bd3c=DC['Namespace'][a0_0x5a29('0x6e8')],_0x45c94c=function(_0xb71241){_0x334c21()(_0x17a7a0,_0xb71241);var _0x528d02=_0x1981e4(_0x17a7a0);function _0x17a7a0(_0x28f994){var _0x249981;return _0xda8591()(this,_0x17a7a0),(_0x249981=_0x528d02['call'](this))[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x28f994),_0x249981[a0_0x5a29('0xe')]=new _0x43bd3c['Entity']({'rectangle':{}}),_0x249981[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x4b0')),_0x249981[a0_0x5a29('0x284')]=_0x9cc25a['a']['INITIALIZED'],_0x249981;}return _0x5db306()(_0x17a7a0,[{'key':'_mountedHook','value':function(){this['positions']=this['_positions'];}},{'key':a0_0x5a29('0x47a'),'value':function(_0x211b1d,_0xaf9e35){return this;}},{'key':'setStyle','value':function(_0x4fb8d9){return 0x0===Object[a0_0x5a29('0x148')](_0x4fb8d9)[a0_0x5a29('0x515')]||(delete _0x4fb8d9[a0_0x5a29('0x4e0')],this['_style']=_0x4fb8d9,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')][a0_0x5a29('0x4b0')],this['_style'])),this;}},{'key':'positions','set':function(_0x4e9276){return this['_positions']=_0x26bbfc['a']['parsePositions'](_0x4e9276),this[a0_0x5a29('0xe')][a0_0x5a29('0x4b0')][a0_0x5a29('0x98')]=_0x43bd3c['Rectangle']['fromCartesianArray'](_0x18a8a5['a']['transformWGS84ArrayToCartesianArray'](this['_positions'])),this;},'get':function(){return this['_positions'];}}]),_0x17a7a0;}(_0x438ff6);_0x438ff6['registerType'](a0_0x5a29('0x4b0'));var _0x48e386=_0x45c94c;function _0xede000(_0x51bdeb,_0x4bff80){var _0xf661e1=Object[a0_0x5a29('0x148')](_0x51bdeb);if(Object['getOwnPropertySymbols']){var _0x47b33b=Object['getOwnPropertySymbols'](_0x51bdeb);_0x4bff80&&(_0x47b33b=_0x47b33b[a0_0x5a29('0x48a')](function(_0x470f00){return Object[a0_0x5a29('0x11a')](_0x51bdeb,_0x470f00)['enumerable'];})),_0xf661e1[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0xf661e1,_0x47b33b);}return _0xf661e1;}function _0x5d8db0(_0x49c4eb){var _0x27d6b6=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct']['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x4bd543){return!0x1;}}();return function(){var _0x1243b2,_0x5c8976=_0x119abc()(_0x49c4eb);if(_0x27d6b6){var _0x2cad1=_0x119abc()(this)[a0_0x5a29('0x825')];_0x1243b2=Reflect[a0_0x5a29('0x138')](_0x5c8976,arguments,_0x2cad1);}else _0x1243b2=_0x5c8976[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x1243b2);};}var _0x2b10fd=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x5381a2=function(_0x49d415){_0x334c21()(_0x4530b3,_0x49d415);var _0x14d307=_0x5d8db0(_0x4530b3);function _0x4530b3(_0x130cfc){var _0x5797f8;return _0xda8591()(this,_0x4530b3),(_0x5797f8=_0x14d307[a0_0x5a29('0x351')](this))['_positions']=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x130cfc),_0x5797f8['_delegate']=new _0x2b10fd[(a0_0x5a29('0x608'))]({'wall':{}}),_0x5797f8['type']=_0x438ff6['getOverlayType'](a0_0x5a29('0x104')),_0x5797f8[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x5797f8;}return _0x5db306()(_0x4530b3,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x4e0')]=this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x47a'),'value':function(_0x1814a2,_0x2702a9){return this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x562521){return 0x0===Object['keys'](_0x562521)[a0_0x5a29('0x515')]||(delete _0x562521[a0_0x5a29('0x4e0')],this[a0_0x5a29('0x3e9')]=_0x562521,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')]['wall'],this[a0_0x5a29('0x3e9')])),this;}},{'key':'positions','set':function(_0x513380){return this['_positions']=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x513380),this[a0_0x5a29('0xe')][a0_0x5a29('0x104')]['positions']=_0x18a8a5['a'][a0_0x5a29('0x7a')](this[a0_0x5a29('0x62')]),this;},'get':function(){return this[a0_0x5a29('0x62')];}}],[{'key':a0_0x5a29('0x22'),'value':function(_0x169a81){var _0x28e46d,_0x128687=void 0x0,_0x8d1a89=_0x2b10fd[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]();return _0x169a81['polyline']&&((_0x128687=new _0x4530b3(_0x18a8a5['a']['transformCartesianArrayToWGS84Array'](_0x169a81['polyline'][a0_0x5a29('0x4e0')]['getValue'](_0x8d1a89))))[a0_0x5a29('0x5c6')]=function(_0x39934e){for(var _0x24800f=0x1;_0x24800f<arguments['length'];_0x24800f++){var _0x36b1c6=null!=arguments[_0x24800f]?arguments[_0x24800f]:{};_0x24800f%0x2?_0xede000(Object(_0x36b1c6),!0x0)['forEach'](function(_0x143c37){_0x3b629d()(_0x39934e,_0x143c37,_0x36b1c6[_0x143c37]);}):Object[a0_0x5a29('0x711')]?Object['defineProperties'](_0x39934e,Object['getOwnPropertyDescriptors'](_0x36b1c6)):_0xede000(Object(_0x36b1c6))['forEach'](function(_0x27abb9){Object[a0_0x5a29('0xe7')](_0x39934e,_0x27abb9,Object[a0_0x5a29('0x11a')](_0x36b1c6,_0x27abb9));});}return _0x39934e;}({},null==_0x169a81||null===(_0x28e46d=_0x169a81[a0_0x5a29('0x31d')])||void 0x0===_0x28e46d?void 0x0:_0x28e46d[a0_0x5a29('0x94c')](_0x8d1a89))),_0x128687;}}]),_0x4530b3;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')]('wall');var _0x4261b0=_0x5381a2,_0x402a91=_0x47c3b8(0xd);function _0x5b64c5(_0x429dd1,_0x1ba0de){var _0x231f61=Object[a0_0x5a29('0x148')](_0x429dd1);if(Object[a0_0x5a29('0x75')]){var _0x443c38=Object[a0_0x5a29('0x75')](_0x429dd1);_0x1ba0de&&(_0x443c38=_0x443c38[a0_0x5a29('0x48a')](function(_0x554f40){return Object[a0_0x5a29('0x11a')](_0x429dd1,_0x554f40)['enumerable'];})),_0x231f61['push'][a0_0x5a29('0x758')](_0x231f61,_0x443c38);}return _0x231f61;}function _0x2e6cca(_0x2853a2){for(var _0x403c14=0x1;_0x403c14<arguments[a0_0x5a29('0x515')];_0x403c14++){var _0x256fad=null!=arguments[_0x403c14]?arguments[_0x403c14]:{};_0x403c14%0x2?_0x5b64c5(Object(_0x256fad),!0x0)[a0_0x5a29('0x570')](function(_0xc86eb6){_0x3b629d()(_0x2853a2,_0xc86eb6,_0x256fad[_0xc86eb6]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x2853a2,Object[a0_0x5a29('0x711')](_0x256fad)):_0x5b64c5(Object(_0x256fad))[a0_0x5a29('0x570')](function(_0x548549){Object[a0_0x5a29('0xe7')](_0x2853a2,_0x548549,Object[a0_0x5a29('0x11a')](_0x256fad,_0x548549));});}return _0x2853a2;}function _0x3d4e2c(_0x3a0007){var _0x8a2b99=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x17d11f){return!0x1;}}();return function(){var _0x524e8e,_0x14306f=_0x119abc()(_0x3a0007);if(_0x8a2b99){var _0x574b56=_0x119abc()(this)[a0_0x5a29('0x825')];_0x524e8e=Reflect[a0_0x5a29('0x138')](_0x14306f,arguments,_0x574b56);}else _0x524e8e=_0x14306f['apply'](this,arguments);return _0x43e3fd()(this,_0x524e8e);};}var _0x535c65=DC['Namespace'][a0_0x5a29('0x6e8')],_0x595ce5=function(_0x162d36){_0x334c21()(_0xc5e80f,_0x162d36);var _0x160cc2=_0x3d4e2c(_0xc5e80f);function _0xc5e80f(_0xbebc4f,_0x19c937){var _0xa2522c;return _0xda8591()(this,_0xc5e80f),(_0xa2522c=_0x160cc2['call'](this))[a0_0x5a29('0xe')]=new _0x535c65[(a0_0x5a29('0x608'))]({'billboard':{}}),_0xa2522c[a0_0x5a29('0x86e')]=_0x26bbfc['a']['parsePosition'](_0xbebc4f),_0xa2522c[a0_0x5a29('0x8c7')]=_0x19c937,_0xa2522c[a0_0x5a29('0x629')]=[0x20,0x20],_0xa2522c['type']=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x12a')),_0xa2522c[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0xa2522c;}return _0x5db306()(_0xc5e80f,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x53c')]=this[a0_0x5a29('0x86e')],this[a0_0x5a29('0x93e')]=this['_icon'],this[a0_0x5a29('0xbc')]=this[a0_0x5a29('0x629')];}},{'key':'setLabel','value':function(_0x265303,_0x42e8ca){return this[a0_0x5a29('0xe')][a0_0x5a29('0x7cc')]=_0x2e6cca(_0x2e6cca({},_0x42e8ca),{},{'text':_0x265303}),this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x165d84){return _0x165d84&&0x0!==Object['keys'](_0x165d84)[a0_0x5a29('0x515')]?(delete _0x165d84[a0_0x5a29('0xfa')]&&delete _0x165d84[a0_0x5a29('0x96f')]&&delete _0x165d84[a0_0x5a29('0x6b7')],this[a0_0x5a29('0x3e9')]=_0x165d84,_0x3fc456['c'][a0_0x5a29('0x65f')](this['_delegate'][a0_0x5a29('0x3c1')],this[a0_0x5a29('0x3e9')]),this):this;}},{'key':a0_0x5a29('0x4cf'),'value':function(_0xd3c717){if(this[a0_0x5a29('0x86e')]['alt']>0x0&&!this[a0_0x5a29('0xe')][a0_0x5a29('0x83f')]){var _0x1fab0f=new _0x402a91['a'](this[a0_0x5a29('0x86e')][a0_0x5a29('0x121')],this[a0_0x5a29('0x86e')]['lat'],0x0);this[a0_0x5a29('0xe')][a0_0x5a29('0x83f')]=_0x2e6cca(_0x2e6cca({},_0xd3c717),{},{'positions':_0x18a8a5['a'][a0_0x5a29('0x7a')]([_0x1fab0f,this[a0_0x5a29('0x86e')]])});}return this;}},{'key':a0_0x5a29('0x19a'),'value':function(_0x26c8de,_0x388d88,_0x1c7a1e){var _0x3871b4=0x0,_0x5bad6d=_0x1c7a1e||0x0;return this[a0_0x5a29('0xe')]['ellipse']=_0x2e6cca(_0x2e6cca({},_0x388d88),{},{'semiMajorAxis':_0x26c8de,'semiMinorAxis':_0x26c8de,'stRotation':new _0x535c65[(a0_0x5a29('0x305'))](function(_0x559291){return _0x5bad6d>0x0&&(_0x3871b4+=_0x5bad6d)>=0x168&&(_0x3871b4=0x0),_0x3871b4;})}),this;}},{'key':'position','set':function(_0x278669){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x278669),this['_delegate']['position']=_0x18a8a5['a']['transformWGS84ToCartesian'](this['_position']),this;},'get':function(){return this['_position'];}},{'key':a0_0x5a29('0x93e'),'set':function(_0x17b19e){return this['_icon']=_0x17b19e,this['_delegate']['billboard'][a0_0x5a29('0xfa')]=this[a0_0x5a29('0x8c7')],this;},'get':function(){return this[a0_0x5a29('0x8c7')];}},{'key':'size','set':function(_0x5f350a){if(!Array['isArray'](_0x5f350a))throw new Error(a0_0x5a29('0x177'));return this[a0_0x5a29('0x629')]=_0x5f350a,this[a0_0x5a29('0xe')][a0_0x5a29('0x3c1')]['width']=this['_size'][0x0]||0x20,this[a0_0x5a29('0xe')]['billboard'][a0_0x5a29('0x6b7')]=this[a0_0x5a29('0x629')][0x1]||0x20,this;},'get':function(){return this[a0_0x5a29('0x629')];}}]),_0xc5e80f;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')]('custom_billboard');var _0x4de066=_0x595ce5;function _0x416bea(_0x7d9586,_0x2fe663){var _0x2ff53b=Object['keys'](_0x7d9586);if(Object[a0_0x5a29('0x75')]){var _0x37ee65=Object[a0_0x5a29('0x75')](_0x7d9586);_0x2fe663&&(_0x37ee65=_0x37ee65['filter'](function(_0x4a1d5b){return Object[a0_0x5a29('0x11a')](_0x7d9586,_0x4a1d5b)[a0_0x5a29('0x12e')];})),_0x2ff53b[a0_0x5a29('0x3cd')]['apply'](_0x2ff53b,_0x37ee65);}return _0x2ff53b;}function _0x31002e(_0x6aa38b){for(var _0x1ecea2=0x1;_0x1ecea2<arguments[a0_0x5a29('0x515')];_0x1ecea2++){var _0x3b9eac=null!=arguments[_0x1ecea2]?arguments[_0x1ecea2]:{};_0x1ecea2%0x2?_0x416bea(Object(_0x3b9eac),!0x0)[a0_0x5a29('0x570')](function(_0x2c09a8){_0x3b629d()(_0x6aa38b,_0x2c09a8,_0x3b9eac[_0x2c09a8]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x5a29('0x4a5')](_0x6aa38b,Object[a0_0x5a29('0x711')](_0x3b9eac)):_0x416bea(Object(_0x3b9eac))[a0_0x5a29('0x570')](function(_0x41f796){Object[a0_0x5a29('0xe7')](_0x6aa38b,_0x41f796,Object[a0_0x5a29('0x11a')](_0x3b9eac,_0x41f796));});}return _0x6aa38b;}function _0x51fd2f(_0x3b8f48){var _0x23cb21=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x19451c){return!0x1;}}();return function(){var _0x205e5e,_0x2369fe=_0x119abc()(_0x3b8f48);if(_0x23cb21){var _0x152de8=_0x119abc()(this)[a0_0x5a29('0x825')];_0x205e5e=Reflect[a0_0x5a29('0x138')](_0x2369fe,arguments,_0x152de8);}else _0x205e5e=_0x2369fe['apply'](this,arguments);return _0x43e3fd()(this,_0x205e5e);};}var _0xc24f70=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2e59fc=function(_0x4f7f3d){_0x334c21()(_0x4f6a87,_0x4f7f3d);var _0x2cd80a=_0x51fd2f(_0x4f6a87);function _0x4f6a87(_0x1cbabb,_0x1e7125){var _0x599483;return _0xda8591()(this,_0x4f6a87),(_0x599483=_0x2cd80a[a0_0x5a29('0x351')](this))['_delegate']=new _0xc24f70[(a0_0x5a29('0x608'))]({'label':{}}),_0x599483[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0x1cbabb),_0x599483[a0_0x5a29('0x65b')]=_0x1e7125,_0x599483[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x8ea')),_0x599483['_state']=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x599483;}return _0x5db306()(_0x4f6a87,[{'key':a0_0x5a29('0x62c'),'value':function(){this['position']=this[a0_0x5a29('0x86e')],this[a0_0x5a29('0x3ce')]=this[a0_0x5a29('0x65b')];}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x257c67){return _0x257c67&&0x0!==Object[a0_0x5a29('0x148')](_0x257c67)[a0_0x5a29('0x515')]?(delete _0x257c67[a0_0x5a29('0x3ce')],this['_style']=_0x257c67,_0x3fc456['c']['merge'](this[a0_0x5a29('0xe')]['label'],this['_style']),this):this;}},{'key':'setVLine','value':function(_0x202fda){if(this[a0_0x5a29('0x86e')][a0_0x5a29('0x624')]>0x0&&!this[a0_0x5a29('0xe')][a0_0x5a29('0x83f')]){var _0x1fc91d=new _0x402a91['a'](this['_position'][a0_0x5a29('0x121')],this[a0_0x5a29('0x86e')][a0_0x5a29('0x5ea')],0x0);this[a0_0x5a29('0xe')][a0_0x5a29('0x83f')]=_0x31002e(_0x31002e({},_0x202fda),{},{'positions':_0x18a8a5['a'][a0_0x5a29('0x7a')]([_0x1fc91d,this['_position']])});}return this;}},{'key':a0_0x5a29('0x19a'),'value':function(_0x360d77,_0x4f7a54,_0x503a58){var _0x45e192=0x0,_0x4bd421=_0x503a58||0x0;return this[a0_0x5a29('0xe')][a0_0x5a29('0x92')]=_0x31002e(_0x31002e({},_0x4f7a54),{},{'semiMajorAxis':_0x360d77,'semiMinorAxis':_0x360d77,'stRotation':new _0xc24f70[(a0_0x5a29('0x305'))](function(_0x112501){return _0x4bd421>0x0&&(_0x45e192+=_0x4bd421)>=0x168&&(_0x45e192=0x0),_0x45e192;})}),this;}},{'key':a0_0x5a29('0x53c'),'set':function(_0xef78f3){return this[a0_0x5a29('0x86e')]=_0x26bbfc['a'][a0_0x5a29('0x853')](_0xef78f3),this[a0_0x5a29('0xe')]['position']=_0x18a8a5['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),this;},'get':function(){return this['_position'];}},{'key':a0_0x5a29('0x3ce'),'set':function(_0x34922e){return this[a0_0x5a29('0x65b')]=_0x34922e,this[a0_0x5a29('0xe')]['label'][a0_0x5a29('0x3ce')]=this[a0_0x5a29('0x65b')],this;},'get':function(){return this[a0_0x5a29('0x65b')];}}]),_0x4f6a87;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x8ea'));var _0x41241a=_0x2e59fc;function _0x2019e8(_0x147c9d){var _0x57ef3d=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x2c998b){return!0x1;}}();return function(){var _0x3c7d86,_0x125ace=_0x119abc()(_0x147c9d);if(_0x57ef3d){var _0x3bda5f=_0x119abc()(this)[a0_0x5a29('0x825')];_0x3c7d86=Reflect[a0_0x5a29('0x138')](_0x125ace,arguments,_0x3bda5f);}else _0x3c7d86=_0x125ace['apply'](this,arguments);return _0x43e3fd()(this,_0x3c7d86);};}var _0xbaa729=DC[a0_0x5a29('0x239')]['Cesium'],_0x5d0133=Math['PI']/0x2,_0x471326=function(_0x211b89){_0x334c21()(_0x889401,_0x211b89);var _0x8c2322=_0x2019e8(_0x889401);function _0x889401(_0x53eb17){var _0x488910;return _0xda8591()(this,_0x889401),(_0x488910=_0x8c2322[a0_0x5a29('0x351')](this))[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x53eb17),_0x488910[a0_0x5a29('0xe')]=new _0xbaa729['Entity']({'polygon':{}}),_0x488910['headHeightFactor']=0.18,_0x488910[a0_0x5a29('0x3fc')]=0.3,_0x488910[a0_0x5a29('0x4d7')]=0.85,_0x488910[a0_0x5a29('0x2de')]=0.15,_0x488910[a0_0x5a29('0x7e6')]=0.8,_0x488910[a0_0x5a29('0x519')]=_0x438ff6['getOverlayType'](a0_0x5a29('0x2ad')),_0x488910[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x488910;}return _0x5db306()(_0x889401,[{'key':a0_0x5a29('0x814'),'value':function(_0x474171,_0x3fc2b0,_0x5a7703){var _0x3c1089=_0x3fc456['b'][a0_0x5a29('0x531')](_0x474171),_0x376ed4=_0x3c1089*this[a0_0x5a29('0x21b')],_0x21bb01=_0x474171[_0x474171['length']-0x1];_0x3c1089=_0x3fc456['b']['distance'](_0x21bb01,_0x474171[_0x474171[a0_0x5a29('0x515')]-0x2]);var _0x52fb31=_0x3fc456['b'][a0_0x5a29('0x7b2')](_0x3fc2b0,_0x5a7703);_0x376ed4>_0x52fb31*this[a0_0x5a29('0x7e6')]&&(_0x376ed4=_0x52fb31*this['headTailFactor']);var _0x481ff9=_0x376ed4*this['headWidthFactor'],_0x2e368f=_0x376ed4*this[a0_0x5a29('0x2de')],_0x437dd7=(_0x376ed4=_0x376ed4>_0x3c1089?_0x3c1089:_0x376ed4)*this[a0_0x5a29('0x4d7')],_0x320aac=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x474171[_0x474171['length']-0x2],_0x21bb01,0x0,_0x376ed4,!0x0),_0x188a67=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x474171[_0x474171['length']-0x2],_0x21bb01,0x0,_0x437dd7,!0x0),_0x516c46=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x21bb01,_0x320aac,_0x5d0133,_0x481ff9,!0x1),_0x546170=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x21bb01,_0x320aac,_0x5d0133,_0x481ff9,!0x0);return[_0x3fc456['b']['getThirdPoint'](_0x21bb01,_0x188a67,_0x5d0133,_0x2e368f,!0x1),_0x516c46,_0x21bb01,_0x546170,_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x21bb01,_0x188a67,_0x5d0133,_0x2e368f,!0x0)];}},{'key':a0_0x5a29('0x718'),'value':function(_0x3da83a,_0x4650b6,_0x3b98ae,_0x3620b2){for(var _0x1a1b2=_0x3fc456['b'][a0_0x5a29('0x427')](_0x3da83a),_0x1b68e1=_0x3fc456['b'][a0_0x5a29('0x531')](_0x3da83a)*_0x3620b2,_0xeb087b=(_0x1b68e1-_0x3fc456['b'][a0_0x5a29('0x7b2')](_0x4650b6,_0x3b98ae))/0x2,_0x18f170=0x0,_0x5359d3=[],_0x3ce53a=[],_0xe3548f=0x1;_0xe3548f<_0x3da83a[a0_0x5a29('0x515')]-0x1;_0xe3548f++){var _0x4077e9=_0x3fc456['b']['getAngleOfThreePoints'](_0x3da83a[_0xe3548f-0x1],_0x3da83a[_0xe3548f],_0x3da83a[_0xe3548f+0x1])/0x2,_0x1cae0d=(_0x1b68e1/0x2-(_0x18f170+=_0x3fc456['b']['distance'](_0x3da83a[_0xe3548f-0x1],_0x3da83a[_0xe3548f]))/_0x1a1b2*_0xeb087b)/Math[a0_0x5a29('0x1a7')](_0x4077e9),_0x425920=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x3da83a[_0xe3548f-0x1],_0x3da83a[_0xe3548f],Math['PI']-_0x4077e9,_0x1cae0d,!0x0),_0x5e9e02=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x3da83a[_0xe3548f-0x1],_0x3da83a[_0xe3548f],_0x4077e9,_0x1cae0d,!0x1);_0x5359d3[a0_0x5a29('0x3cd')](_0x425920),_0x3ce53a[a0_0x5a29('0x3cd')](_0x5e9e02);}return _0x5359d3[a0_0x5a29('0x6c9')](_0x3ce53a);}},{'key':'_getHierarchy','value':function(){var _0x380624=_0x26bbfc['a']['parsePolygonCoordToArray'](this[a0_0x5a29('0x62')])[0x0],_0x1e7a2e=_0x380624[0x0],_0x3b3596=_0x380624[0x1];_0x3fc456['b'][a0_0x5a29('0x4dc')](_0x380624[0x0],_0x380624[0x1],_0x380624[0x2])&&(_0x1e7a2e=_0x380624[0x1],_0x3b3596=_0x380624[0x0]);var _0x45c3ce=[_0x3fc456['b']['mid'](_0x1e7a2e,_0x3b3596)][a0_0x5a29('0x6c9')](_0x380624[a0_0x5a29('0x723')](0x2)),_0x39a9de=this['_getArrowHeadPoints'](_0x45c3ce,_0x1e7a2e,_0x3b3596),_0x27e47c=_0x39a9de[0x0],_0x317c58=_0x39a9de[0x4],_0x4f8a58=_0x3fc456['b'][a0_0x5a29('0x7b2')](_0x1e7a2e,_0x3b3596)/_0x3fc456['b']['getBaseLength'](_0x45c3ce),_0x3dad09=this[a0_0x5a29('0x718')](_0x45c3ce,_0x27e47c,_0x317c58,_0x4f8a58),_0x4a2216=_0x3dad09[a0_0x5a29('0x515')],_0x50450a=[_0x1e7a2e][a0_0x5a29('0x6c9')](_0x3dad09[a0_0x5a29('0x723')](0x0,_0x4a2216/0x2));_0x50450a[a0_0x5a29('0x3cd')](_0x27e47c);var _0x4c6b79=[_0x3b3596][a0_0x5a29('0x6c9')](_0x3dad09[a0_0x5a29('0x723')](_0x4a2216/0x2,_0x4a2216));return _0x4c6b79['push'](_0x317c58),_0x50450a=_0x3fc456['b']['getQBSplinePoints'](_0x50450a),_0x4c6b79=_0x3fc456['b'][a0_0x5a29('0x9d')](_0x4c6b79),new _0xbaa729[(a0_0x5a29('0x3b6'))](_0x18a8a5['a'][a0_0x5a29('0x7a')](_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x50450a[a0_0x5a29('0x6c9')](_0x39a9de,_0x4c6b79[a0_0x5a29('0x39e')]()))));}},{'key':a0_0x5a29('0x62c'),'value':function(){this['positions']=this[a0_0x5a29('0x62')];}},{'key':'setLabel','value':function(_0x1d5f47,_0x4d8e25){return this;}},{'key':'setStyle','value':function(_0x4203f9){return 0x0===Object[a0_0x5a29('0x148')](_0x4203f9)[a0_0x5a29('0x515')]||(delete _0x4203f9[a0_0x5a29('0x4e0')],this['_style']=_0x4203f9,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')]['polygon'],this['_style'])),this;}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x10c8b8){return this[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x10c8b8),this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')]['hierarchy']=this['_getHierarchy'](),this;},'get':function(){return this[a0_0x5a29('0x62')];}}]),_0x889401;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x2ad'));var _0x56dbf1=_0x471326;function _0x563dd5(_0x16c47b){var _0x497823=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x3b6efc){return!0x1;}}();return function(){var _0x5aa34e,_0x240b6c=_0x119abc()(_0x16c47b);if(_0x497823){var _0x566dd7=_0x119abc()(this)[a0_0x5a29('0x825')];_0x5aa34e=Reflect[a0_0x5a29('0x138')](_0x240b6c,arguments,_0x566dd7);}else _0x5aa34e=_0x240b6c[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x5aa34e);};}var _0x193217=DC[a0_0x5a29('0x239')]['Cesium'],_0xa7bff3=Math['PI']/0x2,_0x4e2cc2=function(_0xe14e9f){_0x334c21()(_0x30de1a,_0xe14e9f);var _0x29e46a=_0x563dd5(_0x30de1a);function _0x30de1a(_0x5c0d41){var _0x5158a1;return _0xda8591()(this,_0x30de1a),(_0x5158a1=_0x29e46a[a0_0x5a29('0x351')](this))[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x5c0d41),_0x5158a1[a0_0x5a29('0xe')]=new _0x193217[(a0_0x5a29('0x608'))]({'polygon':{}}),_0x5158a1[a0_0x5a29('0x21b')]=0.25,_0x5158a1[a0_0x5a29('0x3fc')]=0.3,_0x5158a1[a0_0x5a29('0x4d7')]=0.85,_0x5158a1[a0_0x5a29('0x2de')]=0.15,_0x5158a1['type']=_0x438ff6[a0_0x5a29('0x214')]('double_arrow'),_0x5158a1[a0_0x5a29('0x284')]=_0x9cc25a['a']['INITIALIZED'],_0x5158a1;}return _0x5db306()(_0x30de1a,[{'key':a0_0x5a29('0x7a7'),'value':function(_0x3592c8,_0x59103e,_0x3a50af,_0x5980cf){var _0xfbc760=_0x3fc456['b'][a0_0x5a29('0x48f')](_0x3592c8,_0x59103e),_0x188c23=_0x3fc456['b']['distance'](_0xfbc760,_0x3a50af),_0x4e0502=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x3a50af,_0xfbc760,0x0,0.3*_0x188c23,!0x0),_0x4a834b=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x3a50af,_0xfbc760,0x0,0.5*_0x188c23,!0x0),_0x35efa3=[_0xfbc760,_0x4e0502=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0xfbc760,_0x4e0502,_0xa7bff3,_0x188c23/0x5,_0x5980cf),_0x4a834b=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0xfbc760,_0x4a834b,_0xa7bff3,_0x188c23/0x4,_0x5980cf),_0x3a50af],_0xf44a59=this[a0_0x5a29('0x814')](_0x35efa3),_0x1aac75=_0xf44a59[0x0],_0x3395e2=_0xf44a59[0x4],_0x1a487b=_0x3fc456['b']['distance'](_0x3592c8,_0x59103e)/_0x3fc456['b'][a0_0x5a29('0x531')](_0x35efa3)/0x2,_0x5df09f=this['_getArrowBodyPoints'](_0x35efa3,_0x1aac75,_0x3395e2,_0x1a487b),_0x6b0a4f=_0x5df09f[a0_0x5a29('0x515')],_0x262031=_0x5df09f[a0_0x5a29('0x723')](0x0,_0x6b0a4f/0x2),_0x113dd8=_0x5df09f['slice'](_0x6b0a4f/0x2,_0x6b0a4f);return _0x262031[a0_0x5a29('0x3cd')](_0x1aac75),_0x113dd8['push'](_0x3395e2),(_0x262031=_0x262031[a0_0x5a29('0x39e')]())['push'](_0x59103e),(_0x113dd8=_0x113dd8[a0_0x5a29('0x39e')]())[a0_0x5a29('0x3cd')](_0x3592c8),_0x262031[a0_0x5a29('0x39e')]()['concat'](_0xf44a59,_0x113dd8);}},{'key':'_getArrowHeadPoints','value':function(_0x58c6c2){var _0xff9292=_0x3fc456['b'][a0_0x5a29('0x531')](_0x58c6c2)*this[a0_0x5a29('0x21b')],_0x3c2fc0=_0x58c6c2[_0x58c6c2['length']-0x1],_0x23af23=_0xff9292*this[a0_0x5a29('0x3fc')],_0x42fbef=_0xff9292*this['neckWidthFactor'],_0x2972ed=_0xff9292*this[a0_0x5a29('0x4d7')],_0x68b66b=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x58c6c2[_0x58c6c2['length']-0x2],_0x3c2fc0,0x0,_0xff9292,!0x0),_0x102c9a=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x58c6c2[_0x58c6c2[a0_0x5a29('0x515')]-0x2],_0x3c2fc0,0x0,_0x2972ed,!0x0),_0x4e2400=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x3c2fc0,_0x68b66b,_0xa7bff3,_0x23af23,!0x1),_0x46314d=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x3c2fc0,_0x68b66b,_0xa7bff3,_0x23af23,!0x0);return[_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x3c2fc0,_0x102c9a,_0xa7bff3,_0x42fbef,!0x1),_0x4e2400,_0x3c2fc0,_0x46314d,_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x3c2fc0,_0x102c9a,_0xa7bff3,_0x42fbef,!0x0)];}},{'key':'_getArrowBodyPoints','value':function(_0x560e9b,_0x9a3050,_0x502a1d,_0x523555){for(var _0x4b016e=_0x3fc456['b'][a0_0x5a29('0x427')](_0x560e9b),_0x6e3abd=_0x3fc456['b'][a0_0x5a29('0x531')](_0x560e9b)*_0x523555,_0x4db1d5=(_0x6e3abd-_0x3fc456['b']['distance'](_0x9a3050,_0x502a1d))/0x2,_0x396b25=0x0,_0x31d3cb=[],_0x3b9880=[],_0x5e1d0b=0x1;_0x5e1d0b<_0x560e9b['length']-0x1;_0x5e1d0b++){var _0x1c47c8=_0x3fc456['b'][a0_0x5a29('0x7ea')](_0x560e9b[_0x5e1d0b-0x1],_0x560e9b[_0x5e1d0b],_0x560e9b[_0x5e1d0b+0x1])/0x2,_0xb4b91f=(_0x6e3abd/0x2-(_0x396b25+=_0x3fc456['b'][a0_0x5a29('0x7b2')](_0x560e9b[_0x5e1d0b-0x1],_0x560e9b[_0x5e1d0b]))/_0x4b016e*_0x4db1d5)/Math[a0_0x5a29('0x1a7')](_0x1c47c8),_0x5d907b=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x560e9b[_0x5e1d0b-0x1],_0x560e9b[_0x5e1d0b],Math['PI']-_0x1c47c8,_0xb4b91f,!0x0),_0x1eccbd=_0x3fc456['b']['getThirdPoint'](_0x560e9b[_0x5e1d0b-0x1],_0x560e9b[_0x5e1d0b],_0x1c47c8,_0xb4b91f,!0x1);_0x31d3cb[a0_0x5a29('0x3cd')](_0x5d907b),_0x3b9880[a0_0x5a29('0x3cd')](_0x1eccbd);}return _0x31d3cb[a0_0x5a29('0x6c9')](_0x3b9880);}},{'key':a0_0x5a29('0x553'),'value':function(_0x508cf8,_0x48371f,_0x480090){var _0x557326,_0x5c29d0,_0x32bf77,_0x2fd6b4,_0x52df85=_0x3fc456['b']['mid'](_0x508cf8,_0x48371f),_0x4b1fb2=_0x3fc456['b'][a0_0x5a29('0x7b2')](_0x52df85,_0x480090),_0x2c1533=_0x3fc456['b']['getAngleOfThreePoints'](_0x508cf8,_0x52df85,_0x480090);return _0x2c1533<_0xa7bff3?(_0x5c29d0=_0x4b1fb2*Math['sin'](_0x2c1533),_0x32bf77=_0x4b1fb2*Math[a0_0x5a29('0x5cc')](_0x2c1533),_0x2fd6b4=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x508cf8,_0x52df85,_0xa7bff3,_0x5c29d0,!0x1),_0x557326=_0x3fc456['b']['getThirdPoint'](_0x52df85,_0x2fd6b4,_0xa7bff3,_0x32bf77,!0x0)):_0x2c1533>=_0xa7bff3&&_0x2c1533<Math['PI']?(_0x5c29d0=_0x4b1fb2*Math[a0_0x5a29('0x1a7')](Math['PI']-_0x2c1533),_0x32bf77=_0x4b1fb2*Math[a0_0x5a29('0x5cc')](Math['PI']-_0x2c1533),_0x2fd6b4=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x508cf8,_0x52df85,_0xa7bff3,_0x5c29d0,!0x1),_0x557326=_0x3fc456['b']['getThirdPoint'](_0x52df85,_0x2fd6b4,_0xa7bff3,_0x32bf77,!0x1)):_0x2c1533>=Math['PI']&&_0x2c1533<1.5*Math['PI']?(_0x5c29d0=_0x4b1fb2*Math['sin'](_0x2c1533-Math['PI']),_0x32bf77=_0x4b1fb2*Math[a0_0x5a29('0x5cc')](_0x2c1533-Math['PI']),_0x2fd6b4=_0x3fc456['b']['getThirdPoint'](_0x508cf8,_0x52df85,_0xa7bff3,_0x5c29d0,!0x0),_0x557326=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x52df85,_0x2fd6b4,_0xa7bff3,_0x32bf77,!0x0)):(_0x5c29d0=_0x4b1fb2*Math[a0_0x5a29('0x1a7')](0x2*Math['PI']-_0x2c1533),_0x32bf77=_0x4b1fb2*Math['cos'](0x2*Math['PI']-_0x2c1533),_0x2fd6b4=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x508cf8,_0x52df85,_0xa7bff3,_0x5c29d0,!0x0),_0x557326=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x52df85,_0x2fd6b4,_0xa7bff3,_0x32bf77,!0x1)),_0x557326;}},{'key':a0_0x5a29('0x2e1'),'value':function(){var _0x1487e5,_0x58fb0e,_0x184e04=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')],_0x33866d=void 0x0,_0x56a050=void 0x0,_0x50ca8c=_0x26bbfc['a'][a0_0x5a29('0x41')](this['_positions'])[0x0],_0xc1c9ee=_0x50ca8c[0x0],_0x678e8e=_0x50ca8c[0x1],_0x490eb8=_0x50ca8c[0x2];_0x33866d=0x3===_0x184e04?this[a0_0x5a29('0x553')](_0xc1c9ee,_0x678e8e,_0x490eb8):_0x50ca8c[0x3],_0x56a050=0x3===_0x184e04||0x4===_0x184e04?_0x3fc456['b']['mid'](_0xc1c9ee,_0x678e8e):_0x50ca8c[0x4],_0x3fc456['b'][a0_0x5a29('0x4dc')](_0xc1c9ee,_0x678e8e,_0x490eb8)?(_0x1487e5=this['_getArrowPoints'](_0xc1c9ee,_0x56a050,_0x33866d,!0x1),_0x58fb0e=this['_getArrowPoints'](_0x56a050,_0x678e8e,_0x490eb8,!0x0)):(_0x1487e5=this[a0_0x5a29('0x7a7')](_0x678e8e,_0x56a050,_0x490eb8,!0x1),_0x58fb0e=this[a0_0x5a29('0x7a7')](_0x56a050,_0xc1c9ee,_0x33866d,!0x0));var _0x5846f5=_0x1487e5[a0_0x5a29('0x515')],_0x1fb8b3=(_0x5846f5-0x5)/0x2,_0x44bd48=_0x1487e5[a0_0x5a29('0x723')](0x0,_0x1fb8b3),_0x271a9e=_0x1487e5['slice'](_0x1fb8b3,_0x1fb8b3+0x5),_0x4c0de4=_0x1487e5['slice'](_0x1fb8b3+0x5,_0x5846f5),_0x5591d2=_0x58fb0e[a0_0x5a29('0x723')](0x0,_0x1fb8b3),_0x8f1306=_0x58fb0e[a0_0x5a29('0x723')](_0x1fb8b3,_0x1fb8b3+0x5),_0x17fa47=_0x58fb0e['slice'](_0x1fb8b3+0x5,_0x5846f5);_0x5591d2=_0x3fc456['b']['getBezierPoints'](_0x5591d2);var _0x139294=_0x3fc456['b'][a0_0x5a29('0x176')](_0x17fa47['concat'](_0x44bd48[a0_0x5a29('0x723')](0x1)));return _0x4c0de4=_0x3fc456['b']['getBezierPoints'](_0x4c0de4),new _0x193217[(a0_0x5a29('0x3b6'))](_0x18a8a5['a'][a0_0x5a29('0x7a')](_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x5591d2['concat'](_0x8f1306,_0x139294,_0x271a9e,_0x4c0de4))));}},{'key':'_mountedHook','value':function(){this['positions']=this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x47a'),'value':function(_0x5ded26,_0x58dba8){return this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x257679){return 0x0===Object['keys'](_0x257679)[a0_0x5a29('0x515')]||(delete _0x257679[a0_0x5a29('0x4e0')],this[a0_0x5a29('0x3e9')]=_0x257679,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')],this['_style'])),this;}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x250e7b){return this[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x250e7b),this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=this['_getHierarchy'](),this;},'get':function(){return this[a0_0x5a29('0x62')];}}]),_0x30de1a;}(_0x438ff6);_0x438ff6['registerType'](a0_0x5a29('0x5d4'));var _0x126510=_0x4e2cc2;function _0xa0456f(_0x362803){var _0x2759f2=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x33f2ab){return!0x1;}}();return function(){var _0x5e0b63,_0x114155=_0x119abc()(_0x362803);if(_0x2759f2){var _0x20bd5a=_0x119abc()(this)['constructor'];_0x5e0b63=Reflect[a0_0x5a29('0x138')](_0x114155,arguments,_0x20bd5a);}else _0x5e0b63=_0x114155['apply'](this,arguments);return _0x43e3fd()(this,_0x5e0b63);};}var _0x20af0d=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x412b8b=Math['PI']/0x2,_0x4eff79=function(_0x50570a){_0x334c21()(_0x4b66a4,_0x50570a);var _0x472f31=_0xa0456f(_0x4b66a4);function _0x4b66a4(_0x3419f3){var _0x259aac;return _0xda8591()(this,_0x4b66a4),(_0x259aac=_0x472f31[a0_0x5a29('0x351')](this))[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x3419f3),_0x259aac[a0_0x5a29('0xe')]=new _0x20af0d[(a0_0x5a29('0x608'))]({'polygon':{}}),_0x259aac[a0_0x5a29('0x2e0')]=0.15,_0x259aac[a0_0x5a29('0x2de')]=0.2,_0x259aac[a0_0x5a29('0x3fc')]=0.25,_0x259aac['headAngle']=Math['PI']/8.5,_0x259aac[a0_0x5a29('0x437')]=Math['PI']/0xd,_0x259aac['type']=_0x438ff6[a0_0x5a29('0x214')](a0_0x5a29('0x5f4')),_0x259aac[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x259aac;}return _0x5db306()(_0x4b66a4,[{'key':a0_0x5a29('0x2e1'),'value':function(){var _0x169108=_0x26bbfc['a']['parsePolygonCoordToArray'](this['_positions'])[0x0],_0x406672=_0x169108[0x0],_0x2c1ec1=_0x169108[0x1],_0x35fcbb=_0x3fc456['b'][a0_0x5a29('0x531')](_0x169108),_0x1cc125=_0x35fcbb*this[a0_0x5a29('0x2e0')],_0x7ca3a4=_0x35fcbb*this[a0_0x5a29('0x2de')],_0x2d7ac3=_0x35fcbb*this[a0_0x5a29('0x3fc')],_0x5c6219=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x2c1ec1,_0x406672,_0x412b8b,_0x1cc125,!0x0),_0x1891fc=_0x3fc456['b']['getThirdPoint'](_0x2c1ec1,_0x406672,_0x412b8b,_0x1cc125,!0x1),_0x100f4d=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x406672,_0x2c1ec1,this[a0_0x5a29('0x696')],_0x2d7ac3,!0x1),_0x97295e=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x406672,_0x2c1ec1,this[a0_0x5a29('0x696')],_0x2d7ac3,!0x0),_0x2ac020=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x406672,_0x2c1ec1,this['neckAngle'],_0x7ca3a4,!0x1),_0x1e69de=_0x3fc456['b'][a0_0x5a29('0x5b7')](_0x406672,_0x2c1ec1,this[a0_0x5a29('0x437')],_0x7ca3a4,!0x0);return new _0x20af0d[(a0_0x5a29('0x3b6'))](_0x18a8a5['a'][a0_0x5a29('0x7a')](_0x26bbfc['a'][a0_0x5a29('0x21d')]([_0x5c6219,_0x2ac020,_0x100f4d,_0x2c1ec1,_0x97295e,_0x1e69de,_0x1891fc])));}},{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x4e0')]=this['_positions'];}},{'key':'setLabel','value':function(_0x3afded,_0x3dfc4b){return this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x3f26b3){return 0x0===Object['keys'](_0x3f26b3)['length']||(delete _0x3f26b3[a0_0x5a29('0x4e0')],this[a0_0x5a29('0x3e9')]=_0x3f26b3,_0x3fc456['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')],this[a0_0x5a29('0x3e9')])),this;}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x2b4c31){return this[a0_0x5a29('0x62')]=_0x26bbfc['a']['parsePositions'](_0x2b4c31),this[a0_0x5a29('0xe')]['polygon'][a0_0x5a29('0x329')]=this['_getHierarchy'](),this;},'get':function(){return this[a0_0x5a29('0x62')];}}]),_0x4b66a4;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x5f4'));var _0x97e745=_0x4eff79;function _0x490cad(_0xf82022){var _0x3454c3=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x4a1821){return!0x1;}}();return function(){var _0x3d2888,_0x2f8c79=_0x119abc()(_0xf82022);if(_0x3454c3){var _0x352d3d=_0x119abc()(this)[a0_0x5a29('0x825')];_0x3d2888=Reflect['construct'](_0x2f8c79,arguments,_0x352d3d);}else _0x3d2888=_0x2f8c79[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0x3d2888);};}var _0x578713=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x48d168=Math['PI']/0x2,_0x343368=function(_0x15798a){_0x334c21()(_0x531c4c,_0x15798a);var _0x2b3b72=_0x490cad(_0x531c4c);function _0x531c4c(_0x6fc58e){var _0x518459;return _0xda8591()(this,_0x531c4c),(_0x518459=_0x2b3b72[a0_0x5a29('0x351')](this))['_positions']=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x6fc58e),_0x518459[a0_0x5a29('0xe')]=new _0x578713[(a0_0x5a29('0x608'))]({'polygon':{}}),_0x518459['t']=0.4,_0x518459[a0_0x5a29('0x519')]=_0x438ff6[a0_0x5a29('0x214')]('gathering_place'),_0x518459['_state']=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x518459;}return _0x5db306()(_0x531c4c,[{'key':a0_0x5a29('0x2e1'),'value':function(){var _0x17934a=_0x26bbfc['a'][a0_0x5a29('0x41')](this[a0_0x5a29('0x62')])[0x0];if(0x2===this[a0_0x5a29('0x62')]['length']){var _0x564744=DC[a0_0x5a29('0x5b2')][a0_0x5a29('0x48f')](_0x17934a[0x0],_0x17934a[0x1]),_0x5aeac6=_0x3fc456['b']['distance'](_0x17934a[0x0],_0x564744)/0.9,_0x343c6c=_0x3fc456['b']['getThirdPoint'](_0x17934a[0x0],_0x564744,_0x48d168,_0x5aeac6,!0x0);_0x17934a=[_0x17934a[0x0],_0x343c6c,_0x17934a[0x1]];}var _0x5fe2b0=DC[a0_0x5a29('0x5b2')][a0_0x5a29('0x48f')](_0x17934a[0x0],_0x17934a[0x2]);_0x17934a[a0_0x5a29('0x3cd')](_0x5fe2b0,_0x17934a[0x0],_0x17934a[0x1]);for(var _0x5469e8=[],_0x8ed37=0x0;_0x8ed37<_0x17934a[a0_0x5a29('0x515')]-0x2;_0x8ed37++){var _0x2e19c=_0x17934a[_0x8ed37],_0x50821c=_0x17934a[_0x8ed37+0x1],_0x2503c5=_0x17934a[_0x8ed37+0x2],_0x477dcc=_0x3fc456['b'][a0_0x5a29('0x7f6')](this['t'],_0x2e19c,_0x50821c,_0x2503c5);_0x5469e8=_0x5469e8[a0_0x5a29('0x6c9')](_0x477dcc);}var _0x3b8e08=_0x5469e8['length'];_0x5469e8=[_0x5469e8[_0x3b8e08-0x1]]['concat'](_0x5469e8[a0_0x5a29('0x723')](0x0,_0x3b8e08-0x1));for(var _0x20c0c6=[],_0x46e6a9=0x0;_0x46e6a9<_0x17934a[a0_0x5a29('0x515')]-0x2;_0x46e6a9++){var _0x4e6132=_0x17934a[_0x46e6a9],_0x862e96=_0x17934a[_0x46e6a9+0x1];_0x20c0c6[a0_0x5a29('0x3cd')](_0x4e6132);for(var _0xbe97ba=0x0;_0xbe97ba<=0x64;_0xbe97ba++){var _0x3c00f8=_0x3fc456['b'][a0_0x5a29('0x7a0')](_0xbe97ba/0x64,_0x4e6132,_0x5469e8[0x2*_0x46e6a9],_0x5469e8[0x2*_0x46e6a9+0x1],_0x862e96);_0x20c0c6[a0_0x5a29('0x3cd')](_0x3c00f8);}_0x20c0c6[a0_0x5a29('0x3cd')](_0x862e96);}return new _0x578713['PolygonHierarchy'](_0x18a8a5['a'][a0_0x5a29('0x7a')](_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x20c0c6)));}},{'key':'_mountedHook','value':function(){this[a0_0x5a29('0x4e0')]=this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x47a'),'value':function(_0x5ccb89,_0x576ccf){return this;}},{'key':a0_0x5a29('0x1f1'),'value':function(_0x74f92f){return 0x0===Object[a0_0x5a29('0x148')](_0x74f92f)[a0_0x5a29('0x515')]||(delete _0x74f92f[a0_0x5a29('0x4e0')],this[a0_0x5a29('0x3e9')]=_0x74f92f,_0x3fc456['c']['merge'](this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')],this[a0_0x5a29('0x3e9')])),this;}},{'key':'positions','set':function(_0x399653){return this['_positions']=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x399653),this[a0_0x5a29('0xe')]['polygon'][a0_0x5a29('0x329')]=this['_getHierarchy'](),this;},'get':function(){return this[a0_0x5a29('0x62')];}}]),_0x531c4c;}(_0x438ff6);_0x438ff6[a0_0x5a29('0x264')](a0_0x5a29('0x57a'));var _0x4ca859=_0x343368;function _0x376fa2(_0x3c6a34){var _0x2b5d2e=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x5ac242){return!0x1;}}();return function(){var _0xd350b3,_0x1377ce=_0x119abc()(_0x3c6a34);if(_0x2b5d2e){var _0x1e219a=_0x119abc()(this)[a0_0x5a29('0x825')];_0xd350b3=Reflect['construct'](_0x1377ce,arguments,_0x1e219a);}else _0xd350b3=_0x1377ce[a0_0x5a29('0x758')](this,arguments);return _0x43e3fd()(this,_0xd350b3);};}var _0x259ad2=DC['Namespace'][a0_0x5a29('0x6e8')],_0x4a8f5e=function(_0x49c90f){_0x334c21()(_0xf46b78,_0x49c90f);var _0x164bf8=_0x376fa2(_0xf46b78);function _0xf46b78(_0x23de77){var _0x5378cd;return _0xda8591()(this,_0xf46b78),(_0x5378cd=_0x164bf8[a0_0x5a29('0x351')](this,_0x23de77))['_delegate']=new _0x259ad2['Entity']({'polygon':{}}),_0x5378cd[a0_0x5a29('0x21b')]=0.18,_0x5378cd[a0_0x5a29('0x3fc')]=0.3,_0x5378cd[a0_0x5a29('0x4d7')]=0.85,_0x5378cd[a0_0x5a29('0x2de')]=0.15,_0x5378cd[a0_0x5a29('0x2e0')]=0.1,_0x5378cd[a0_0x5a29('0x7e6')]=0.8,_0x5378cd[a0_0x5a29('0x56a')]=0x1,_0x5378cd['type']=_0x438ff6[a0_0x5a29('0x214')]('tailed_attack_arrow'),_0x5378cd[a0_0x5a29('0x284')]=_0x9cc25a['a'][a0_0x5a29('0x8f1')],_0x5378cd;}return _0x5db306()(_0xf46b78,[{'key':'_getHierarchy','value':function(){var _0x537262=_0x26bbfc['a'][a0_0x5a29('0x41')](this[a0_0x5a29('0x62')])[0x0],_0x30cc63=_0x537262[0x0],_0x255c9=_0x537262[0x1];_0x3fc456['b'][a0_0x5a29('0x4dc')](_0x537262[0x0],_0x537262[0x1],_0x537262[0x2])&&(_0x30cc63=_0x537262[0x1],_0x255c9=_0x537262[0x0]);var _0x5ac9af=[_0x3fc456['b']['mid'](_0x30cc63,_0x255c9)][a0_0x5a29('0x6c9')](_0x537262['slice'](0x2)),_0x4c04bd=this['_getArrowHeadPoints'](_0x5ac9af,_0x30cc63,_0x255c9),_0x20b2b8=_0x4c04bd[0x0],_0x2539b3=_0x4c04bd[0x4],_0x214af1=_0x3fc456['b']['distance'](_0x30cc63,_0x255c9),_0x218b9d=_0x3fc456['b'][a0_0x5a29('0x531')](_0x5ac9af),_0x585b21=_0x218b9d*this['tailWidthFactor']*this[a0_0x5a29('0x56a')],_0x3c54c6=_0x3fc456['b']['getThirdPoint'](_0x5ac9af[0x1],_0x5ac9af[0x0],0x0,_0x585b21,!0x0),_0x5d8cd9=_0x214af1/_0x218b9d,_0x3be860=this[a0_0x5a29('0x718')](_0x5ac9af,_0x20b2b8,_0x2539b3,_0x5d8cd9),_0x529b71=_0x3be860[a0_0x5a29('0x515')],_0x386d21=[_0x30cc63][a0_0x5a29('0x6c9')](_0x3be860[a0_0x5a29('0x723')](0x0,_0x529b71/0x2));_0x386d21['push'](_0x20b2b8);var _0x3972c3=[_0x255c9][a0_0x5a29('0x6c9')](_0x3be860[a0_0x5a29('0x723')](_0x529b71/0x2,_0x529b71));return _0x3972c3[a0_0x5a29('0x3cd')](_0x2539b3),_0x386d21=_0x3fc456['b'][a0_0x5a29('0x9d')](_0x386d21),_0x3972c3=_0x3fc456['b']['getQBSplinePoints'](_0x3972c3),new _0x259ad2['PolygonHierarchy'](_0x18a8a5['a'][a0_0x5a29('0x7a')](_0x26bbfc['a']['parsePositions'](_0x386d21[a0_0x5a29('0x6c9')](_0x4c04bd,_0x3972c3[a0_0x5a29('0x39e')](),[_0x3c54c6,_0x386d21[0x0]]))));}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x15f9f8){return this[a0_0x5a29('0x62')]=_0x26bbfc['a'][a0_0x5a29('0x21d')](_0x15f9f8),this['_delegate'][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=this['_getHierarchy'](),this;},'get':function(){return this[a0_0x5a29('0x62')];}}]),_0xf46b78;}(_0x56dbf1);_0x438ff6['registerType'](a0_0x5a29('0x6'));var _0x584aca=_0x4a8f5e;},function(_0x55c17e,_0x153f59,_0x218e19){'use strict';_0x153f59['a']={'ARCGIS':a0_0x5a29('0x690'),'SINGLE_TILE':a0_0x5a29('0xe8'),'WMS':a0_0x5a29('0x375'),'WMTS':a0_0x5a29('0x8f9'),'XYZ':a0_0x5a29('0x212'),'COORD':a0_0x5a29('0x641')};},function(_0x9015aa,_0x5f43b3,_0xd89f70){'use strict';var _0x53b573=_0xd89f70(0x0),_0xd1b2c6=_0xd89f70['n'](_0x53b573),_0x175399=_0xd89f70(0x1),_0x4ee2af=_0xd89f70['n'](_0x175399),_0x3e54=function(){function _0x3ce50b(){_0xd1b2c6()(this,_0x3ce50b),this[a0_0x5a29('0x931')]={},this[a0_0x5a29('0x343')]();}return _0x4ee2af()(_0x3ce50b,[{'key':'_registerEvent','value':function(){}},{'key':a0_0x5a29('0x436'),'value':function(_0x31b5cc,_0x3d95f3,_0x21a901){var _0xb81773=this[a0_0x5a29('0x697')](_0x31b5cc),_0x3624e6=void 0x0;return _0xb81773&&_0x3d95f3&&(_0x3624e6=_0xb81773[a0_0x5a29('0x464')](_0x3d95f3,_0x21a901||this)),_0x3624e6;}},{'key':'_off','value':function(_0x40cde1,_0x2727c8,_0x19c6c5){var _0x39789c=this[a0_0x5a29('0x697')](_0x40cde1),_0x17c246=!0x1;return _0x39789c&&_0x2727c8&&(_0x17c246=_0x39789c['removeEventListener'](_0x2727c8,_0x19c6c5||this)),_0x17c246;}},{'key':'_fire','value':function(_0x46bbcb,_0x4a7381){var _0x3bb62f=this['getEvent'](_0x46bbcb);_0x3bb62f&&_0x3bb62f[a0_0x5a29('0x1a0')](_0x4a7381);}},{'key':'on','value':function(_0x10e46f,_0x36c861,_0x3c8f65){return this[a0_0x5a29('0x436')](_0x10e46f,_0x36c861,_0x3c8f65);}},{'key':a0_0x5a29('0x806'),'value':function(_0x38e7ed,_0x13e492,_0x52b9d6){var _0x3ffd32=this[a0_0x5a29('0x436')](_0x38e7ed,_0x13e492,_0x52b9d6);_0x3ffd32&&_0x3ffd32();}},{'key':a0_0x5a29('0x59a'),'value':function(_0xcd0222,_0x2a847d,_0x3a928c){return this[a0_0x5a29('0x635')](_0xcd0222,_0x2a847d,_0x3a928c);}},{'key':'fire','value':function(_0x4aca8e,_0x2e7b2c){this[a0_0x5a29('0x17f')](_0x4aca8e,_0x2e7b2c);}},{'key':a0_0x5a29('0x697'),'value':function(_0x27e6c9){return this['_cache'][_0x27e6c9]||void 0x0;}}]),_0x3ce50b;}();_0x5f43b3['a']=_0x3e54;},function(_0x35564e,_0xa23d1a,_0x37ee0e){'use strict';_0x37ee0e['d'](_0xa23d1a,'a',function(){return _0x113bc9;}),_0x37ee0e['d'](_0xa23d1a,'b',function(){return _0x49cd65;}),_0x37ee0e['d'](_0xa23d1a,'h',function(){return _0xc6bfa6;}),_0x37ee0e['d'](_0xa23d1a,'c',function(){return _0x31ee62;}),_0x37ee0e['d'](_0xa23d1a,'e',function(){return _0x1d3407;}),_0x37ee0e['d'](_0xa23d1a,'f',function(){return _0x45bb6a;}),_0x37ee0e['d'](_0xa23d1a,'g',function(){return _0x4f0204;}),_0x37ee0e['d'](_0xa23d1a,'i',function(){return _0x54ebdb;}),_0x37ee0e['d'](_0xa23d1a,'d',function(){return _0x2d1768;});var _0x1d8a4e=_0x37ee0e(0x17),_0x5d7af9=_0x37ee0e['n'](_0x1d8a4e),_0x12fd3e=_0x37ee0e(0x7),_0x339bdc=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')];function _0x113bc9(_0x17cfc0){var _0x2f6e8b=0x0;if(_0x17cfc0&&Array['isArray'](_0x17cfc0)){for(var _0x1865d4=0x0,_0x4ef0e4=_0x339bdc[a0_0x5a29('0x2b5')][a0_0x5a29('0x20a')],_0x129ff2=_0x5d7af9()(_0x129ff2)[a0_0x5a29('0x6c9')](_0x129ff2[0x0]),_0x3898e8=0x1;_0x3898e8<_0x129ff2[a0_0x5a29('0x515')];_0x3898e8++){var _0x2e95f7=_0x4ef0e4[a0_0x5a29('0x6fe')](_0x12fd3e['a']['transformWGS84ToCartographic'](_0x129ff2[_0x3898e8-0x1])),_0x4bd9a3=_0x4ef0e4[a0_0x5a29('0x6fe')](_0x12fd3e['a'][a0_0x5a29('0x321')](_0x129ff2[_0x3898e8]));_0x1865d4+=_0x2e95f7['x']*_0x4bd9a3['y']-_0x4bd9a3['x']*_0x2e95f7['y'];}_0x2f6e8b=Math[a0_0x5a29('0x1d2')](_0x1865d4)[a0_0x5a29('0x292')](0x2);}return _0x2f6e8b;}function _0x49cd65(){var _0x1bac54=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:[],_0x284e6d=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x0,_0x4fd4bb=0xb4,_0x216983=0x5a,_0x47efce=-0xb4,_0x513e16=-0x5a;if(_0x1bac54[a0_0x5a29('0x570')](function(_0x14d7e3){_0x4fd4bb=Math[a0_0x5a29('0x5d5')](_0x4fd4bb,_0x14d7e3['lng']||_0x14d7e3['x']),_0x216983=Math[a0_0x5a29('0x5d5')](_0x216983,_0x14d7e3[a0_0x5a29('0x5ea')]||_0x14d7e3['y']),_0x47efce=Math[a0_0x5a29('0x670')](_0x47efce,_0x14d7e3[a0_0x5a29('0x121')]||_0x14d7e3['x']),_0x513e16=Math[a0_0x5a29('0x670')](_0x513e16,_0x14d7e3[a0_0x5a29('0x5ea')]||_0x14d7e3['y']);}),_0x284e6d>0x0){var _0x27e225=Math[a0_0x5a29('0x1d2')](_0x47efce-_0x47efce),_0x2c950b=Math[a0_0x5a29('0x1d2')](_0x513e16-_0x216983);_0x4fd4bb-=_0x27e225*_0x284e6d,_0x216983-=_0x2c950b*_0x284e6d,_0x47efce+=_0x27e225*_0x284e6d,_0x513e16+=_0x2c950b*_0x284e6d;}return{'west':_0x4fd4bb,'south':_0x216983,'east':_0x47efce,'north':_0x513e16};}var _0x20cc8b=_0x37ee0e(0xd),_0x239fd0=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')];function _0xc6bfa6(_0x5d7bbe,_0x15c111){_0x5d7bbe instanceof _0x20cc8b['a']&&(_0x5d7bbe=_0x12fd3e['a'][a0_0x5a29('0x321')](_0x5d7bbe)),_0x15c111 instanceof _0x20cc8b['a']&&(_0x15c111=_0x12fd3e['a'][a0_0x5a29('0x321')](_0x15c111));var _0x5d54c5=new _0x239fd0['EllipsoidGeodesic'](_0x5d7bbe,_0x15c111)[a0_0x5a29('0x182')](0.5);return new _0x20cc8b['a'](_0x239fd0[a0_0x5a29('0x382')]['toDegrees'](_0x5d54c5[a0_0x5a29('0x706')]),_0x239fd0[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x5d54c5[a0_0x5a29('0x517')]),_0x5d54c5[a0_0x5a29('0x6b7')]);}var _0x157162=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')];function _0x31ee62(_0x25b795){if(_0x25b795&&Array[a0_0x5a29('0x7aa')](_0x25b795)){var _0x456138=_0x157162['BoundingSphere'][a0_0x5a29('0x185')](_0x12fd3e['a'][a0_0x5a29('0x7a')](_0x25b795));return _0x12fd3e['a'][a0_0x5a29('0x8f')](_0x456138['center']);}return new _0x20cc8b['a']();}var _0x37c7f6=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')];function _0x1d3407(_0x17dbad){var _0x3df7c9=0x0;if(_0x17dbad&&Array[a0_0x5a29('0x7aa')](_0x17dbad))for(var _0x58a3b5=0x0;_0x58a3b5<_0x17dbad[a0_0x5a29('0x515')]-0x1;_0x58a3b5++){var _0x17b811=_0x12fd3e['a'][a0_0x5a29('0x321')](_0x17dbad[_0x58a3b5]),_0x1d7812=_0x12fd3e['a'][a0_0x5a29('0x321')](_0x17dbad[_0x58a3b5+0x1]),_0x589a10=new _0x37c7f6[(a0_0x5a29('0x61f'))]();_0x589a10[a0_0x5a29('0x4a2')](_0x17b811,_0x1d7812);var _0x2ad515=_0x589a10[a0_0x5a29('0x57f')];_0x3df7c9+=_0x2ad515=Math[a0_0x5a29('0x960')](Math[a0_0x5a29('0x938')](_0x2ad515,0x2)+Math['pow'](_0x1d7812[a0_0x5a29('0x6b7')]-_0x17b811[a0_0x5a29('0x6b7')],0x2));}return _0x3df7c9[a0_0x5a29('0x292')](0x3);}var _0xf7551f=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')];function _0x45bb6a(_0x46f4f7,_0x3bf7c6){var _0x749404=0x0;_0x46f4f7 instanceof _0x20cc8b['a']&&(_0x46f4f7=_0x12fd3e['a'][a0_0x5a29('0x516')](_0x46f4f7)),_0x3bf7c6 instanceof _0x20cc8b['a']&&(_0x3bf7c6=_0x12fd3e['a'][a0_0x5a29('0x516')](_0x3bf7c6));var _0x351cff=_0xf7551f['Cartesian3']['subtract'](_0x3bf7c6,_0x46f4f7,new _0xf7551f[(a0_0x5a29('0x3bd'))]());if(_0x351cff){_0xf7551f[a0_0x5a29('0x3bd')][a0_0x5a29('0x7d3')](_0x351cff,_0x351cff);var _0x31225f=_0xf7551f['Ellipsoid'][a0_0x5a29('0x20a')][a0_0x5a29('0x73b')](_0x46f4f7,new _0xf7551f[(a0_0x5a29('0x3bd'))]()),_0x55766d=_0xf7551f[a0_0x5a29('0x3bd')][a0_0x5a29('0x226')](_0xf7551f[a0_0x5a29('0x3bd')]['UNIT_Z'],_0x31225f,new _0xf7551f[(a0_0x5a29('0x3bd'))]()),_0x2900a2=_0xf7551f[a0_0x5a29('0x3bd')][a0_0x5a29('0x226')](_0x31225f,_0x55766d,new _0xf7551f[(a0_0x5a29('0x3bd'))]());_0x749404=Math[a0_0x5a29('0x258')](_0xf7551f['Cartesian3']['dot'](_0x351cff,_0x55766d),_0xf7551f[a0_0x5a29('0x3bd')][a0_0x5a29('0x419')](_0x351cff,_0x2900a2));}return _0x749404;}function _0x4f0204(_0x5313e8,_0x156eee,_0x1acda7){return(_0x5313e8=parseFloat(_0x5313e8||0x0))>=parseFloat(_0x156eee)&&_0x5313e8<=parseFloat(_0x1acda7);}var _0x512383=_0x37ee0e(0x3);function _0x54ebdb(_0x106c50,_0x42e305){var _0x581f12=arguments[a0_0x5a29('0x515')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0x1d8842=arguments['length']>0x3&&void 0x0!==arguments[0x3]?arguments[0x3]:0x32,_0x186f07=[];if(!_0x512383['c'][a0_0x5a29('0x3a9')](_0x106c50)||!_0x512383['c'][a0_0x5a29('0x3a9')](_0x42e305))return _0x186f07;_0x581f12=Math[a0_0x5a29('0x5d5')](+_0x581f12,0x1388),_0x1d8842=Math[a0_0x5a29('0x5d5')](+_0x1d8842,0x32);var _0x356c93=Math[a0_0x5a29('0x1d2')](_0x106c50[a0_0x5a29('0x121')]-_0x42e305['lng']),_0x3756c1=Math[a0_0x5a29('0x1d2')](_0x106c50[a0_0x5a29('0x5ea')]-_0x42e305[a0_0x5a29('0x5ea')]),_0x3f4b55=Math[a0_0x5a29('0x670')](_0x356c93,_0x3756c1),_0x1fa3c4=_0x3f4b55/_0x1d8842;if(_0x356c93>_0x3756c1){var _0x1cf88e=(_0x42e305[a0_0x5a29('0x5ea')]-_0x106c50[a0_0x5a29('0x5ea')])/_0x1d8842;_0x106c50[a0_0x5a29('0x121')]-_0x42e305[a0_0x5a29('0x121')]>0x0&&(_0x1fa3c4=-_0x1fa3c4);for(var _0x3bb03b=0x0;_0x3bb03b<_0x1d8842;_0x3bb03b++){var _0x3b47e4=_0x581f12-0x4*Math['pow'](-0.5*_0x3f4b55+Math[a0_0x5a29('0x1d2')](_0x1fa3c4)*_0x3bb03b,0x2)*_0x581f12/Math[a0_0x5a29('0x938')](_0x3f4b55,0x2),_0x22e446=_0x106c50[a0_0x5a29('0x121')]+_0x1fa3c4*_0x3bb03b,_0xd98876=_0x106c50[a0_0x5a29('0x5ea')]+_0x1cf88e*_0x3bb03b;_0x186f07[a0_0x5a29('0x3cd')]([_0x22e446,_0xd98876,_0x3b47e4]);}}else{var _0x5a0031=(_0x42e305[a0_0x5a29('0x121')]-_0x106c50[a0_0x5a29('0x121')])/_0x1d8842;_0x106c50['lat']-_0x42e305[a0_0x5a29('0x5ea')]>0x0&&(_0x1fa3c4=-_0x1fa3c4);for(var _0x395c15=0x0;_0x395c15<_0x1d8842;_0x395c15++){var _0xce9665=_0x581f12-0x4*Math[a0_0x5a29('0x938')](-0.5*_0x3f4b55+Math[a0_0x5a29('0x1d2')](_0x1fa3c4)*_0x395c15,0x2)*_0x581f12/Math['pow'](_0x3f4b55,0x2),_0xb665d9=_0x106c50[a0_0x5a29('0x121')]+_0x5a0031*_0x395c15,_0x5e5e46=_0x106c50[a0_0x5a29('0x5ea')]+_0x1fa3c4*_0x395c15;_0x186f07[a0_0x5a29('0x3cd')]([_0xb665d9,_0x5e5e46,_0xce9665]);}}return _0x186f07;}function _0x2d1768(_0x149d50,_0x4fc37b){_0x4fc37b=_0x4fc37b||{};for(var _0x13a020=[],_0x25a882=0x0;_0x25a882<_0x149d50[a0_0x5a29('0x515')]-0x1;_0x25a882++){var _0x4eb3d7=_0x3a88ba(_0x149d50[_0x25a882],_0x149d50[_0x25a882+0x1],_0x4fc37b[a0_0x5a29('0x547')]);_0x4eb3d7&&_0x4eb3d7[a0_0x5a29('0x515')]>0x0&&(_0x13a020=_0x13a020[a0_0x5a29('0x6c9')](_0x4eb3d7));}return _0x13a020;}function _0x3a88ba(_0x197683,_0x496804,_0x5cd050){if(!_0x197683||!_0x496804)return null;var _0x1d9119=[];_0x5cd050=_0x5cd050||0x28;var _0xbe38ec,_0x16ef82,_0x39b685,_0x4fbdcc,_0x31cc13,_0x95bc8b,_0x169127=function(_0x5ccd29){return 0x1-0x2*_0x5ccd29+_0x5ccd29*_0x5ccd29;},_0x38fb60=function(_0x21a6e5){return 0x2*_0x21a6e5-0x2*_0x21a6e5*_0x21a6e5;},_0x1be82e=function(_0x2fe1b6){return _0x2fe1b6*_0x2fe1b6;},_0xfa0a25=0x0,_0x3870f1=parseFloat(_0x197683['lat']),_0x18598b=parseFloat(_0x496804[a0_0x5a29('0x5ea')]),_0x4c6b24=parseFloat(_0x197683['lng']),_0x4b995b=parseFloat(_0x496804['lng']);_0x4b995b>_0x4c6b24&&_0x4b995b-_0x4c6b24>0xb4&&_0x4c6b24<0x0&&(_0x4c6b24=0x168+_0x4c6b24,_0x4b995b=0x168+_0x4b995b),_0x95bc8b=0x0,_0x18598b===_0x3870f1?(_0xbe38ec=0x0,_0x16ef82=_0x4c6b24-_0x4b995b):_0x4b995b===_0x4c6b24?(_0xbe38ec=Math['PI']/0x2,_0x16ef82=_0x3870f1-_0x18598b):(_0xbe38ec=Math[a0_0x5a29('0x7cb')]((_0x18598b-_0x3870f1)/(_0x4b995b-_0x4c6b24)),_0x16ef82=(_0x18598b-_0x3870f1)/Math[a0_0x5a29('0x1a7')](_0xbe38ec)),0x0===_0x95bc8b&&(_0x95bc8b=_0xbe38ec+Math['PI']/0x5),_0x31cc13=(_0x39b685=_0x16ef82/0x2)*Math[a0_0x5a29('0x5cc')](_0x95bc8b)+_0x4c6b24,_0x4fbdcc=_0x39b685*Math['sin'](_0x95bc8b)+_0x3870f1;for(var _0x1c97c3=0x0;_0x1c97c3<_0x5cd050+0x1;_0x1c97c3++){var _0x536252=_0x4c6b24*_0x169127(_0xfa0a25)+_0x31cc13*_0x38fb60(_0xfa0a25)+_0x4b995b*_0x1be82e(_0xfa0a25),_0x466dc5=_0x3870f1*_0x169127(_0xfa0a25)+_0x4fbdcc*_0x38fb60(_0xfa0a25)+_0x18598b*_0x1be82e(_0xfa0a25),_0x220c75=_0x197683[a0_0x5a29('0x121')],_0x3df1b6=_0x496804[a0_0x5a29('0x121')];_0x1d9119[a0_0x5a29('0x3cd')]([_0x220c75<0x0&&_0x3df1b6>0x0?_0x536252-0x168:_0x536252,_0x466dc5]),_0xfa0a25+=0x1/_0x5cd050;}return _0x1d9119;}},function(_0x448d7a,_0x39cee3,_0x363818){'use strict';_0x363818['d'](_0x39cee3,'f',function(){return _0x4121b1['a'];}),_0x363818['d'](_0x39cee3,'d',function(){return _0x446baf['a'];}),_0x363818['d'](_0x39cee3,'e',function(){return _0x7910cb;}),_0x363818['d'](_0x39cee3,'a',function(){return _0x45700a;}),_0x363818['d'](_0x39cee3,'b',function(){return _0x23bfdd;}),_0x363818['d'](_0x39cee3,'c',function(){return _0x1893e3;}),_0x363818['d'](_0x39cee3,'g',function(){return _0x3399e7;}),_0x363818['d'](_0x39cee3,'h',function(){return _0x1f4e98;}),_0x363818['d'](_0x39cee3,'i',function(){return _0x3e2278;}),_0x363818['d'](_0x39cee3,'j',function(){return _0xf07cac;});var _0x4121b1=_0x363818(0x18),_0x446baf=_0x363818(0xc),_0x3fd3c5=_0x363818(0x0),_0x42bbcb=_0x363818['n'](_0x3fd3c5),_0x3b9b30=_0x363818(0x1),_0x396749=_0x363818['n'](_0x3b9b30),_0x2fd41d=_0x363818(0x3),_0x8153be=_0x363818(0x6),_0x53c5b5=_0x363818(0xb),_0x4124e7=function(){function _0x51e15f(_0x23c895){_0x42bbcb()(this,_0x51e15f),this[a0_0x5a29('0x5ed')]=_0x23c895||_0x2fd41d['c'][a0_0x5a29('0x5f9')](),this['_cache']={},this[a0_0x5a29('0x482')]=!0x0,this[a0_0x5a29('0x673')]=void 0x0,this[a0_0x5a29('0x6ff')]=new _0x53c5b5['e'](),this[a0_0x5a29('0x6ff')]['on'](_0x53c5b5['f'][a0_0x5a29('0x6cb')],this[a0_0x5a29('0x20c')],this),this['_layerGroupEvent']['on'](_0x53c5b5['f'][a0_0x5a29('0x945')],this[a0_0x5a29('0x4fc')],this),this['type']=_0x446baf['a']['getLayerType']('layer_group'),this[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x8f1')];}return _0x396749()(_0x51e15f,[{'key':a0_0x5a29('0x20c'),'value':function(_0x133e0d){var _0x49ef88=this;this['_viewer']=_0x133e0d,Object['keys'](this[a0_0x5a29('0x931')])[a0_0x5a29('0x570')](function(_0x5e2c1a){_0x49ef88['_viewer'][a0_0x5a29('0x894')](_0x49ef88[a0_0x5a29('0x931')][_0x5e2c1a]);}),this[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x85')];}},{'key':'_onRemove','value':function(){var _0x288116=this;Object[a0_0x5a29('0x148')](this[a0_0x5a29('0x931')])[a0_0x5a29('0x570')](function(_0x3349ec){_0x288116[a0_0x5a29('0x673')]&&_0x288116[a0_0x5a29('0x673')]['remove'](_0x288116[a0_0x5a29('0x931')][_0x3349ec]);}),this['_cache']={},this[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x476')];}},{'key':a0_0x5a29('0x894'),'value':function(_0x4173ff){return Object(this[a0_0x5a29('0x931')])[a0_0x5a29('0x71')](_0x4173ff['id'])||(this[a0_0x5a29('0x931')][_0x4173ff['id']]=_0x4173ff,this['_viewer']&&this['_viewer']['addLayer'](_0x4173ff)),this;}},{'key':a0_0x5a29('0x90b'),'value':function(_0x2209f5){return Object(this['_cache'])[a0_0x5a29('0x71')](_0x2209f5['id'])&&(this[a0_0x5a29('0x673')]&&this[a0_0x5a29('0x673')][a0_0x5a29('0x90b')](_0x2209f5),delete this[a0_0x5a29('0x931')][_0x2209f5['id']]),this;}},{'key':a0_0x5a29('0xfe'),'value':function(_0x39a86f){return this[a0_0x5a29('0x931')][_0x39a86f]||void 0x0;}},{'key':a0_0x5a29('0x4f9'),'value':function(){var _0x485e68=this,_0x24806f=[];return Object[a0_0x5a29('0x148')](this['_cache'])[a0_0x5a29('0x570')](function(_0x445436){_0x24806f[a0_0x5a29('0x3cd')](_0x485e68[a0_0x5a29('0x931')][_0x445436]);}),_0x24806f;}},{'key':a0_0x5a29('0x55f'),'value':function(_0x54ec80){return _0x54ec80&&_0x54ec80[a0_0x5a29('0x3a')]&&_0x54ec80[a0_0x5a29('0x3a')](this),this;}},{'key':'remove','value':function(){return this[a0_0x5a29('0x673')]&&this[a0_0x5a29('0x673')][a0_0x5a29('0x22c')](this),this;}},{'key':'id','get':function(){return this[a0_0x5a29('0x5ed')];}},{'key':'show','set':function(_0x503c0e){var _0x1a0349=this;this[a0_0x5a29('0x482')]=_0x503c0e,Object[a0_0x5a29('0x148')](this[a0_0x5a29('0x931')])['forEach'](function(_0x4d4f86){_0x1a0349[a0_0x5a29('0x931')][_0x4d4f86][a0_0x5a29('0x4b1')]=_0x1a0349['_show'];});},'get':function(){return this[a0_0x5a29('0x482')];}},{'key':a0_0x5a29('0xff'),'get':function(){return this[a0_0x5a29('0x6ff')];}},{'key':'state','get':function(){return this[a0_0x5a29('0x284')];}}]),_0x51e15f;}();_0x446baf['a'][a0_0x5a29('0x264')](a0_0x5a29('0x41d'));var _0x7910cb=_0x4124e7,_0x31de0a=_0x363818(0x4),_0xd1af6d=_0x363818['n'](_0x31de0a),_0x2ff76a=_0x363818(0x5),_0x5915f3=_0x363818['n'](_0x2ff76a),_0x56f545=_0x363818(0x2),_0x4a3cd9=_0x363818['n'](_0x56f545);function _0x3f047c(_0x386a38){var _0x217a1a=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x3ad3cb){return!0x1;}}();return function(){var _0x5cce83,_0x2b3b55=_0x4a3cd9()(_0x386a38);if(_0x217a1a){var _0x59566b=_0x4a3cd9()(this)[a0_0x5a29('0x825')];_0x5cce83=Reflect['construct'](_0x2b3b55,arguments,_0x59566b);}else _0x5cce83=_0x2b3b55[a0_0x5a29('0x758')](this,arguments);return _0x5915f3()(this,_0x5cce83);};}var _0xa9e19d=DC[a0_0x5a29('0x239')]['Cesium'],_0x53f85f=function(_0x3342dc){_0xd1af6d()(_0x27b98f,_0x3342dc);var _0x59eb3e=_0x3f047c(_0x27b98f);function _0x27b98f(_0x59bf43){var _0x394334;return _0x42bbcb()(this,_0x27b98f),(_0x394334=_0x59eb3e['call'](this,_0x59bf43))[a0_0x5a29('0xe')]=new _0xa9e19d[(a0_0x5a29('0x84b'))](_0x59bf43),_0x394334[a0_0x5a29('0x519')]=_0x446baf['a'][a0_0x5a29('0x9c')](a0_0x5a29('0x60b')),_0x394334['_state']=_0x8153be['a']['INITIALIZED'],_0x394334;}return _0x396749()(_0x27b98f,[{'key':a0_0x5a29('0x2ef'),'value':function(){return this['_delegate']['entities']&&this[a0_0x5a29('0xe')][a0_0x5a29('0x8b4')][a0_0x5a29('0x8db')](),this[a0_0x5a29('0x931')]={},this[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x787')],this;}}]),_0x27b98f;}(_0x446baf['a']);_0x446baf['a'][a0_0x5a29('0x264')]('vector');var _0xf07cac=_0x53f85f,_0x39cdcd=_0x363818(0xe);function _0x5dfdcc(_0x386676){var _0x1998e2=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x396e53){return!0x1;}}();return function(){var _0x1918f2,_0x46a2a8=_0x4a3cd9()(_0x386676);if(_0x1998e2){var _0x14ab62=_0x4a3cd9()(this)[a0_0x5a29('0x825')];_0x1918f2=Reflect[a0_0x5a29('0x138')](_0x46a2a8,arguments,_0x14ab62);}else _0x1918f2=_0x46a2a8[a0_0x5a29('0x758')](this,arguments);return _0x5915f3()(this,_0x1918f2);};}var _0x1dfcd2=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4e274d=function(_0x59bb48){_0xd1af6d()(_0xf68c3c,_0x59bb48);var _0x5a99ef=_0x5dfdcc(_0xf68c3c);function _0xf68c3c(_0x306c9b,_0x32a2e1){var _0x52fa64,_0x26c5c8=arguments[a0_0x5a29('0x515')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};if(_0x42bbcb()(this,_0xf68c3c),!_0x32a2e1)throw new Error(a0_0x5a29('0x57'));return(_0x52fa64=_0x5a99ef[a0_0x5a29('0x351')](this,_0x306c9b))[a0_0x5a29('0xe')]=_0x1dfcd2['GeoJsonDataSource'][a0_0x5a29('0x597')](_0x32a2e1,_0x26c5c8),_0x52fa64[a0_0x5a29('0x519')]=_0x446baf['a'][a0_0x5a29('0x9c')](a0_0x5a29('0xd0')),_0x52fa64[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x8f1')],_0x52fa64;}return _0x396749()(_0xf68c3c,[{'key':a0_0x5a29('0x22e'),'value':function(_0x10a660){if(_0x10a660['position']&&_0x10a660[a0_0x5a29('0x3c1')])return _0x39cdcd['b'][a0_0x5a29('0x22')](_0x10a660);}},{'key':'_createPolyline','value':function(_0x3ef2e6){if(_0x3ef2e6[a0_0x5a29('0x83f')])return _0x39cdcd['v']['fromEntity'](_0x3ef2e6);}},{'key':a0_0x5a29('0x68a'),'value':function(_0x420085){if(_0x420085[a0_0x5a29('0x82a')])return _0x39cdcd['u'][a0_0x5a29('0x22')](_0x420085);}},{'key':'_createModel','value':function(_0x5070f6,_0x41cc68){if(_0x5070f6)return _0x39cdcd['p'][a0_0x5a29('0x22')](_0x5070f6,_0x41cc68);}},{'key':'eachOverlay','value':function(_0x174990,_0x223079){if(this[a0_0x5a29('0xe')])return this[a0_0x5a29('0xe')][a0_0x5a29('0x618')](function(_0x5eb300){_0x5eb300[a0_0x5a29('0x8b4')]['values']['forEach'](function(_0x2dc133){_0x174990['call'](_0x223079,_0x2dc133);});}),this;}},{'key':'toVectorLayer','value':function(){var _0x377a8e=this,_0x45367e=new _0xf07cac(this['id']);return this[a0_0x5a29('0x94b')](function(_0x387708){_0x387708[a0_0x5a29('0x3c1')]?_0x45367e['addOverlay'](_0x377a8e['_createBillboard'](_0x387708)):_0x387708[a0_0x5a29('0x83f')]?_0x45367e[a0_0x5a29('0x11')](_0x377a8e[a0_0x5a29('0x276')](_0x387708)):_0x387708['polygon']&&_0x45367e[a0_0x5a29('0x11')](_0x377a8e[a0_0x5a29('0x68a')](_0x387708));},this),_0x45367e;}},{'key':a0_0x5a29('0x674'),'value':function(_0xfdd2b9){var _0x592148=this,_0x28d473=new _0xf07cac(this['id']);return this[a0_0x5a29('0x94b')](function(_0x47bd80){_0x28d473[a0_0x5a29('0x11')](_0x592148[a0_0x5a29('0x21a')](_0x47bd80,_0xfdd2b9));},this),_0x28d473;}},{'key':a0_0x5a29('0x4b1'),'set':function(_0x252031){var _0x211017=this;this[a0_0x5a29('0x482')]=_0x252031,this['_delegate']&&this['_delegate'][a0_0x5a29('0x618')](function(_0x2faff6){_0x2faff6[a0_0x5a29('0x4b1')]=_0x211017[a0_0x5a29('0x482')];});},'get':function(){return this['_show'];}}]),_0xf68c3c;}(_0x446baf['a']);_0x446baf['a']['registerType']('geojson');var _0x45700a=_0x4e274d,_0x56daa3=_0x363818(0x7);function _0x4bd5b3(_0x299648){var _0x3b8440=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x5050ca){return!0x1;}}();return function(){var _0x5118da,_0x41ae82=_0x4a3cd9()(_0x299648);if(_0x3b8440){var _0x26a3fe=_0x4a3cd9()(this)['constructor'];_0x5118da=Reflect[a0_0x5a29('0x138')](_0x41ae82,arguments,_0x26a3fe);}else _0x5118da=_0x41ae82[a0_0x5a29('0x758')](this,arguments);return _0x5915f3()(this,_0x5118da);};}var _0x1108cf=DC['Namespace'][a0_0x5a29('0x6e8')],_0x5b18dd=function(_0x5c9a84){_0xd1af6d()(_0x5552ed,_0x5c9a84);var _0x2a5f5d=_0x4bd5b3(_0x5552ed);function _0x5552ed(_0x483e15){var _0x7f9abe;return _0x42bbcb()(this,_0x5552ed),(_0x7f9abe=_0x2a5f5d[a0_0x5a29('0x351')](this,_0x483e15))['_delegate']=_0x2fd41d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),'html-layer',void 0x0),_0x7f9abe[a0_0x5a29('0xe')][a0_0x5a29('0x773')]('id',_0x7f9abe[a0_0x5a29('0x5ed')]),_0x7f9abe['_renderRemoveCallback']=void 0x0,_0x7f9abe[a0_0x5a29('0x519')]=_0x446baf['a']['getLayerType'](a0_0x5a29('0x8b')),_0x7f9abe[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x8f1')],_0x7f9abe;}return _0x396749()(_0x5552ed,[{'key':a0_0x5a29('0x20c'),'value':function(_0x324888){var _0x3e9e21=this;this[a0_0x5a29('0x673')]=_0x324888,this[a0_0x5a29('0x673')][a0_0x5a29('0x8c6')][a0_0x5a29('0x365')](this[a0_0x5a29('0xe')]);var _0x1c0dcc=this['_viewer']['scene'];this[a0_0x5a29('0x3bc')]=_0x1c0dcc[a0_0x5a29('0x225')][a0_0x5a29('0x464')](function(){var _0x401f1b=_0x3e9e21[a0_0x5a29('0x673')][a0_0x5a29('0x294')][a0_0x5a29('0x328')];_0x3e9e21['eachOverlay'](function(_0x57516f){if(_0x57516f&&_0x57516f[a0_0x5a29('0x53c')]){_0x57516f[a0_0x5a29('0x4b1')]=_0x3e9e21[a0_0x5a29('0x4b1')];var _0x1ab04d=_0x56daa3['a'][a0_0x5a29('0x516')](_0x57516f[a0_0x5a29('0x53c')]),_0x19312e=_0x1108cf[a0_0x5a29('0x85b')][a0_0x5a29('0x7ee')](_0x1c0dcc,_0x1ab04d),_0x5b2d25=_0x1108cf[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0x1ab04d,_0x401f1b);_0x57516f[a0_0x5a29('0x842')]({'transform':_0x19312e},_0x5b2d25);}},_0x3e9e21);},this),this['_state']=_0x8153be['a'][a0_0x5a29('0x85')];}},{'key':a0_0x5a29('0x4fc'),'value':function(){this[a0_0x5a29('0x3bc')]&&this['_renderRemoveCallback'](),this[a0_0x5a29('0x673')][a0_0x5a29('0x8c6')]['removeChild'](this[a0_0x5a29('0xe')]),this['_state']=_0x8153be['a'][a0_0x5a29('0x476')];}},{'key':a0_0x5a29('0x2ef'),'value':function(){for(;this[a0_0x5a29('0xe')][a0_0x5a29('0xc7')]();)this[a0_0x5a29('0xe')][a0_0x5a29('0x58e')](this[a0_0x5a29('0xe')][a0_0x5a29('0x5a1')]);return this[a0_0x5a29('0x931')]={},this['_state']=_0x8153be['a']['CLEARED'],this;}},{'key':a0_0x5a29('0x4b1'),'set':function(_0x5a6054){this['_show']=_0x5a6054,this['_delegate'][a0_0x5a29('0x46a')][a0_0x5a29('0x8d5')]=this[a0_0x5a29('0x482')]?a0_0x5a29('0x56d'):'hidden';},'get':function(){return this[a0_0x5a29('0x482')];}}]),_0x5552ed;}(_0x446baf['a']);_0x446baf['a'][a0_0x5a29('0x264')]('html');var _0x23bfdd=_0x5b18dd;function _0x341b37(_0x3978e0){var _0x25148d=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString']['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x15af3a){return!0x1;}}();return function(){var _0x2f9738,_0x5964dc=_0x4a3cd9()(_0x3978e0);if(_0x25148d){var _0x54d9d3=_0x4a3cd9()(this)[a0_0x5a29('0x825')];_0x2f9738=Reflect[a0_0x5a29('0x138')](_0x5964dc,arguments,_0x54d9d3);}else _0x2f9738=_0x5964dc[a0_0x5a29('0x758')](this,arguments);return _0x5915f3()(this,_0x2f9738);};}var _0x3d72a9=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2b746c=function(_0x1f3a41){_0xd1af6d()(_0x419ee7,_0x1f3a41);var _0x2c1871=_0x341b37(_0x419ee7);function _0x419ee7(_0x220425){var _0x318cb2,_0xd3200e=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:'';return _0x42bbcb()(this,_0x419ee7),(_0x318cb2=_0x2c1871[a0_0x5a29('0x351')](this,_0x220425))[a0_0x5a29('0x6b8')]=_0x3d72a9[a0_0x5a29('0x60a')][a0_0x5a29('0x597')](_0xd3200e),_0x318cb2[a0_0x5a29('0xe')]=new _0x3d72a9[(a0_0x5a29('0x84b'))](_0x220425),_0x318cb2[a0_0x5a29('0x2c5')](),_0x318cb2['type']=_0x446baf['a'][a0_0x5a29('0x264')](a0_0x5a29('0x7cc')),_0x318cb2[a0_0x5a29('0x284')]=_0x8153be['a']['INITIALIZED'],_0x318cb2;}return _0x396749()(_0x419ee7,[{'key':a0_0x5a29('0x6a8'),'value':function(_0x38aac3){if(_0x38aac3[a0_0x5a29('0x53c')]&&_0x38aac3['name'])return _0x39cdcd['o'][a0_0x5a29('0x22')](_0x38aac3);}},{'key':a0_0x5a29('0x2c5'),'value':function(){var _0x4f4960=this;this[a0_0x5a29('0x6b8')][a0_0x5a29('0x618')](function(_0xab80da){_0xab80da[a0_0x5a29('0x8b4')][a0_0x5a29('0x24f')]['forEach'](function(_0x493922){var _0x20f6bc=_0x4f4960['_createLabel'](_0x493922);_0x4f4960['addOverlay'](_0x20f6bc);});});}}]),_0x419ee7;}(_0x446baf['a']);_0x446baf['a'][a0_0x5a29('0x264')]('label');var _0x1893e3=_0x2b746c;function _0x314287(_0xa44cbc){var _0x27876d=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x15022d){return!0x1;}}();return function(){var _0x43c2aa,_0x48c9f2=_0x4a3cd9()(_0xa44cbc);if(_0x27876d){var _0x2336f5=_0x4a3cd9()(this)[a0_0x5a29('0x825')];_0x43c2aa=Reflect[a0_0x5a29('0x138')](_0x48c9f2,arguments,_0x2336f5);}else _0x43c2aa=_0x48c9f2[a0_0x5a29('0x758')](this,arguments);return _0x5915f3()(this,_0x43c2aa);};}var _0x488acf=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4d4b03=function(_0x36cf71){_0xd1af6d()(_0x386843,_0x36cf71);var _0x456b05=_0x314287(_0x386843);function _0x386843(_0x152931){var _0x4d1402;return _0x42bbcb()(this,_0x386843),(_0x4d1402=_0x456b05[a0_0x5a29('0x351')](this,_0x152931))['_delegate']=new _0x488acf[(a0_0x5a29('0x2c9'))](),_0x4d1402['type']=_0x446baf['a'][a0_0x5a29('0x9c')](a0_0x5a29('0x205')),_0x4d1402[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x8f1')],_0x4d1402;}return _0x396749()(_0x386843,[{'key':'clear','value':function(){return this[a0_0x5a29('0xe')]&&this[a0_0x5a29('0xe')]['removeAll'](),this[a0_0x5a29('0x931')]={},this[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x787')],this;}}]),_0x386843;}(_0x446baf['a']);_0x446baf['a']['registerType'](a0_0x5a29('0x205'));var _0x3399e7=_0x4d4b03;function _0x450c04(_0x57e34e){var _0x2540a0=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x2de957){return!0x1;}}();return function(){var _0x351960,_0x4720d5=_0x4a3cd9()(_0x57e34e);if(_0x2540a0){var _0x222179=_0x4a3cd9()(this)[a0_0x5a29('0x825')];_0x351960=Reflect[a0_0x5a29('0x138')](_0x4720d5,arguments,_0x222179);}else _0x351960=_0x4720d5['apply'](this,arguments);return _0x5915f3()(this,_0x351960);};}var _0x41e3bf=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x5f08de=function(_0x46bef6){_0xd1af6d()(_0x538c85,_0x46bef6);var _0x2cf423=_0x450c04(_0x538c85);function _0x538c85(_0x5cd289){var _0xa6afe0;return _0x42bbcb()(this,_0x538c85),(_0xa6afe0=_0x2cf423[a0_0x5a29('0x351')](this,_0x5cd289))[a0_0x5a29('0xe')]=new _0x41e3bf[(a0_0x5a29('0x2c9'))](),_0xa6afe0[a0_0x5a29('0x519')]=_0x446baf['a'][a0_0x5a29('0x9c')](a0_0x5a29('0x1ca')),_0xa6afe0[a0_0x5a29('0x284')]=_0x8153be['a']['INITIALIZED'],_0xa6afe0;}return _0x396749()(_0x538c85,[{'key':a0_0x5a29('0x2ef'),'value':function(){return this[a0_0x5a29('0xe')][a0_0x5a29('0x8db')](),this[a0_0x5a29('0x931')]={},this['_state']=_0x8153be['a'][a0_0x5a29('0x787')],this;}}]),_0x538c85;}(_0x446baf['a']);_0x446baf['a']['registerType'](a0_0x5a29('0x1ca'));var _0x1f4e98=_0x5f08de;function _0x17b63d(_0x2d1504){var _0x15f2a0=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x245176){return!0x1;}}();return function(){var _0x3ac191,_0x137cf6=_0x4a3cd9()(_0x2d1504);if(_0x15f2a0){var _0x37b544=_0x4a3cd9()(this)[a0_0x5a29('0x825')];_0x3ac191=Reflect[a0_0x5a29('0x138')](_0x137cf6,arguments,_0x37b544);}else _0x3ac191=_0x137cf6[a0_0x5a29('0x758')](this,arguments);return _0x5915f3()(this,_0x3ac191);};}var _0x579702=function(_0x4bc7ca){_0xd1af6d()(_0x287389,_0x4bc7ca);var _0x32fafd=_0x17b63d(_0x287389);function _0x287389(_0x240237,_0x52aa3a){var _0x4bcfee,_0x993cfe=arguments[a0_0x5a29('0x515')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};if(_0x42bbcb()(this,_0x287389),!_0x52aa3a)throw new Error('TopoJsonLayer:the\x20url\x20invalid');return(_0x4bcfee=_0x32fafd['call'](this,_0x240237,_0x52aa3a,_0x993cfe))[a0_0x5a29('0x519')]=_0x45700a[a0_0x5a29('0x9c')](a0_0x5a29('0x30d')),_0x4bcfee[a0_0x5a29('0x284')]=_0x8153be['a'][a0_0x5a29('0x8f1')],_0x4bcfee;}return _0x287389;}(_0x45700a);_0x45700a[a0_0x5a29('0x264')](a0_0x5a29('0x30d'));var _0x3e2278=_0x579702;},function(_0xe8bc4a,_0x9623b2,_0x2fd38b){'use strict';_0x2fd38b(0x1c);var _0x5bbbd7=_0x2fd38b(0x1e);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x7d'),function(){return _0x5bbbd7['a'];});var _0x8179b7=_0x2fd38b(0x1f);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x939'),function(){return _0x8179b7['a'];});var _0x2ad3d4=_0x2fd38b(0x20);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x64d'),function(){return _0x2ad3d4['a'];});var _0x1a2e94=_0x2fd38b(0x21);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x4ab'),function(){return _0x1a2e94['a'];});var _0x2f0b4a=_0x2fd38b(0x22);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x4e8'),function(){return _0x2f0b4a['a'];});var _0x3bfa6f=_0x2fd38b(0x23);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x449'),function(){return _0x3bfa6f['a'];});var _0x24ba29=_0x2fd38b(0x24);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x347'),function(){return _0x24ba29['a'];});var _0x314bd2=_0x2fd38b(0x25);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x851'),function(){return _0x314bd2['a'];});var _0x39591a=_0x2fd38b(0x26);_0x2fd38b['d'](_0x9623b2,a0_0x5a29('0x6a2'),function(){return _0x39591a['a'];});},function(_0x59508f,_0x1a1210){_0x59508f[a0_0x5a29('0x5a')]=function(_0x3dd2e7){if(void 0x0===_0x3dd2e7)throw new ReferenceError('this\x20hasn\x27t\x20been\x20initialised\x20-\x20super()\x20hasn\x27t\x20been\x20called');return _0x3dd2e7;};},function(_0x5440b6,_0x5a0808,_0x18d1e2){var _0x5837b2;!function(_0x251182,_0x205e83){'use strict';a0_0x5a29('0x950')==typeof _0x5440b6['exports']?_0x5440b6['exports']=_0x251182[a0_0x5a29('0x62a')]?_0x205e83(_0x251182,!0x0):function(_0x2fbc46){if(!_0x2fbc46[a0_0x5a29('0x62a')])throw new Error(a0_0x5a29('0x503'));return _0x205e83(_0x2fbc46);}:_0x205e83(_0x251182);}(a0_0x5a29('0x6c2')!=typeof window?window:this,function(_0x2c3983,_0x398f43){'use strict';var _0x60a404=[],_0x4a396a=Object['getPrototypeOf'],_0xbd54eb=_0x60a404['slice'],_0x5a3925=_0x60a404[a0_0x5a29('0x906')]?function(_0x1efb27){return _0x60a404[a0_0x5a29('0x906')][a0_0x5a29('0x351')](_0x1efb27);}:function(_0x4d233a){return _0x60a404['concat']['apply']([],_0x4d233a);},_0x47a061=_0x60a404[a0_0x5a29('0x3cd')],_0x3f3faf=_0x60a404[a0_0x5a29('0x26f')],_0x580192={},_0x14c45b=_0x580192[a0_0x5a29('0x857')],_0x43a19a=_0x580192[a0_0x5a29('0x71')],_0xa8361a=_0x43a19a[a0_0x5a29('0x857')],_0x5d4a2d=_0xa8361a[a0_0x5a29('0x351')](Object),_0x1da227={},_0x3512f3=function(_0x2f56d6){return'function'==typeof _0x2f56d6&&a0_0x5a29('0x777')!=typeof _0x2f56d6[a0_0x5a29('0x23f')];},_0x4f93e3=function(_0x184fe1){return null!=_0x184fe1&&_0x184fe1===_0x184fe1[a0_0x5a29('0x353')];},_0x45f8a9=_0x2c3983[a0_0x5a29('0x62a')],_0x56a33c={'type':!0x0,'src':!0x0,'nonce':!0x0,'noModule':!0x0};function _0x454230(_0x440ce8,_0xb9e22f,_0x49b3b4){var _0x1cebb4,_0x334da0,_0xac7c2f=(_0x49b3b4=_0x49b3b4||_0x45f8a9)['createElement'](a0_0x5a29('0x633'));if(_0xac7c2f[a0_0x5a29('0x3ce')]=_0x440ce8,_0xb9e22f)for(_0x1cebb4 in _0x56a33c)(_0x334da0=_0xb9e22f[_0x1cebb4]||_0xb9e22f[a0_0x5a29('0xbd')]&&_0xb9e22f['getAttribute'](_0x1cebb4))&&_0xac7c2f[a0_0x5a29('0x773')](_0x1cebb4,_0x334da0);_0x49b3b4[a0_0x5a29('0x435')][a0_0x5a29('0x365')](_0xac7c2f)['parentNode'][a0_0x5a29('0x58e')](_0xac7c2f);}function _0x5c303c(_0x2f4bb7){return null==_0x2f4bb7?_0x2f4bb7+'':a0_0x5a29('0x950')==typeof _0x2f4bb7||a0_0x5a29('0x2ae')==typeof _0x2f4bb7?_0x580192[_0x14c45b[a0_0x5a29('0x351')](_0x2f4bb7)]||a0_0x5a29('0x950'):typeof _0x2f4bb7;}var _0xd48b4d=function(_0x404576,_0x589c31){return new _0xd48b4d['fn']['init'](_0x404576,_0x589c31);};function _0x283616(_0x43b003){var _0x1cf4a9=!!_0x43b003&&a0_0x5a29('0x515')in _0x43b003&&_0x43b003[a0_0x5a29('0x515')],_0x27b7ac=_0x5c303c(_0x43b003);return!_0x3512f3(_0x43b003)&&!_0x4f93e3(_0x43b003)&&(a0_0x5a29('0x389')===_0x27b7ac||0x0===_0x1cf4a9||a0_0x5a29('0x777')==typeof _0x1cf4a9&&_0x1cf4a9>0x0&&_0x1cf4a9-0x1 in _0x43b003);}_0xd48b4d['fn']=_0xd48b4d[a0_0x5a29('0x928')]={'jquery':a0_0x5a29('0x9e'),'constructor':_0xd48b4d,'length':0x0,'toArray':function(){return _0xbd54eb['call'](this);},'get':function(_0xfb97f6){return null==_0xfb97f6?_0xbd54eb['call'](this):_0xfb97f6<0x0?this[_0xfb97f6+this[a0_0x5a29('0x515')]]:this[_0xfb97f6];},'pushStack':function(_0x4f1c23){var _0x3b53c2=_0xd48b4d[a0_0x5a29('0x65f')](this[a0_0x5a29('0x825')](),_0x4f1c23);return _0x3b53c2[a0_0x5a29('0x798')]=this,_0x3b53c2;},'each':function(_0x4b4d1e){return _0xd48b4d['each'](this,_0x4b4d1e);},'map':function(_0x22e45b){return this[a0_0x5a29('0x54b')](_0xd48b4d[a0_0x5a29('0x95a')](this,function(_0x5e7060,_0x3c1ecd){return _0x22e45b['call'](_0x5e7060,_0x3c1ecd,_0x5e7060);}));},'slice':function(){return this[a0_0x5a29('0x54b')](_0xbd54eb[a0_0x5a29('0x758')](this,arguments));},'first':function(){return this['eq'](0x0);},'last':function(){return this['eq'](-0x1);},'even':function(){return this[a0_0x5a29('0x54b')](_0xd48b4d[a0_0x5a29('0x522')](this,function(_0x2aca2c,_0x24f0d5){return(_0x24f0d5+0x1)%0x2;}));},'odd':function(){return this[a0_0x5a29('0x54b')](_0xd48b4d[a0_0x5a29('0x522')](this,function(_0x230379,_0x130051){return _0x130051%0x2;}));},'eq':function(_0x8d89ce){var _0x398b53=this[a0_0x5a29('0x515')],_0x318a1b=+_0x8d89ce+(_0x8d89ce<0x0?_0x398b53:0x0);return this[a0_0x5a29('0x54b')](_0x318a1b>=0x0&&_0x318a1b<_0x398b53?[this[_0x318a1b]]:[]);},'end':function(){return this[a0_0x5a29('0x798')]||this['constructor']();},'push':_0x47a061,'sort':_0x60a404['sort'],'splice':_0x60a404[a0_0x5a29('0x250')]},_0xd48b4d['extend']=_0xd48b4d['fn'][a0_0x5a29('0x630')]=function(){var _0xb69976,_0x5d1343,_0x1fb64b,_0x4cf6fd,_0x31a66c,_0x42f84a,_0xdc8194=arguments[0x0]||{},_0x56e322=0x1,_0x129996=arguments['length'],_0x547c20=!0x1;for(a0_0x5a29('0x4dd')==typeof _0xdc8194&&(_0x547c20=_0xdc8194,_0xdc8194=arguments[_0x56e322]||{},_0x56e322++),a0_0x5a29('0x950')==typeof _0xdc8194||_0x3512f3(_0xdc8194)||(_0xdc8194={}),_0x56e322===_0x129996&&(_0xdc8194=this,_0x56e322--);_0x56e322<_0x129996;_0x56e322++)if(null!=(_0xb69976=arguments[_0x56e322]))for(_0x5d1343 in _0xb69976)_0x4cf6fd=_0xb69976[_0x5d1343],a0_0x5a29('0x5ff')!==_0x5d1343&&_0xdc8194!==_0x4cf6fd&&(_0x547c20&&_0x4cf6fd&&(_0xd48b4d[a0_0x5a29('0x495')](_0x4cf6fd)||(_0x31a66c=Array[a0_0x5a29('0x7aa')](_0x4cf6fd)))?(_0x1fb64b=_0xdc8194[_0x5d1343],_0x42f84a=_0x31a66c&&!Array[a0_0x5a29('0x7aa')](_0x1fb64b)?[]:_0x31a66c||_0xd48b4d[a0_0x5a29('0x495')](_0x1fb64b)?_0x1fb64b:{},_0x31a66c=!0x1,_0xdc8194[_0x5d1343]=_0xd48b4d[a0_0x5a29('0x630')](_0x547c20,_0x42f84a,_0x4cf6fd)):void 0x0!==_0x4cf6fd&&(_0xdc8194[_0x5d1343]=_0x4cf6fd));return _0xdc8194;},_0xd48b4d[a0_0x5a29('0x630')]({'expando':a0_0x5a29('0xbe')+(a0_0x5a29('0x9e')+Math[a0_0x5a29('0x27')]())[a0_0x5a29('0x380')](/\D/g,''),'isReady':!0x0,'error':function(_0x1eb4f9){throw new Error(_0x1eb4f9);},'noop':function(){},'isPlainObject':function(_0x481cfd){var _0x301846,_0x41fd2a;return!(!_0x481cfd||a0_0x5a29('0x656')!==_0x14c45b[a0_0x5a29('0x351')](_0x481cfd))&&(!(_0x301846=_0x4a396a(_0x481cfd))||a0_0x5a29('0x2ae')==typeof(_0x41fd2a=_0x43a19a[a0_0x5a29('0x351')](_0x301846,'constructor')&&_0x301846[a0_0x5a29('0x825')])&&_0xa8361a[a0_0x5a29('0x351')](_0x41fd2a)===_0x5d4a2d);},'isEmptyObject':function(_0x392a1d){var _0x41c64f;for(_0x41c64f in _0x392a1d)return!0x1;return!0x0;},'globalEval':function(_0x277595,_0x214788,_0xc2184b){_0x454230(_0x277595,{'nonce':_0x214788&&_0x214788[a0_0x5a29('0x577')]},_0xc2184b);},'each':function(_0x3c598,_0x116d73){var _0x1fc411,_0x618f65=0x0;if(_0x283616(_0x3c598))for(_0x1fc411=_0x3c598[a0_0x5a29('0x515')];_0x618f65<_0x1fc411&&!0x1!==_0x116d73['call'](_0x3c598[_0x618f65],_0x618f65,_0x3c598[_0x618f65]);_0x618f65++);else for(_0x618f65 in _0x3c598)if(!0x1===_0x116d73[a0_0x5a29('0x351')](_0x3c598[_0x618f65],_0x618f65,_0x3c598[_0x618f65]))break;return _0x3c598;},'makeArray':function(_0x5ad8fe,_0x4b1a85){var _0x107d0a=_0x4b1a85||[];return null!=_0x5ad8fe&&(_0x283616(Object(_0x5ad8fe))?_0xd48b4d[a0_0x5a29('0x65f')](_0x107d0a,'string'==typeof _0x5ad8fe?[_0x5ad8fe]:_0x5ad8fe):_0x47a061[a0_0x5a29('0x351')](_0x107d0a,_0x5ad8fe)),_0x107d0a;},'inArray':function(_0x8a41f3,_0x2acf7b,_0x341787){return null==_0x2acf7b?-0x1:_0x3f3faf[a0_0x5a29('0x351')](_0x2acf7b,_0x8a41f3,_0x341787);},'merge':function(_0x3da9f9,_0x5e645e){for(var _0x4575c6=+_0x5e645e[a0_0x5a29('0x515')],_0x5b2f94=0x0,_0x350693=_0x3da9f9[a0_0x5a29('0x515')];_0x5b2f94<_0x4575c6;_0x5b2f94++)_0x3da9f9[_0x350693++]=_0x5e645e[_0x5b2f94];return _0x3da9f9['length']=_0x350693,_0x3da9f9;},'grep':function(_0x4472d2,_0x278463,_0x298b1e){for(var _0x3b73b4=[],_0x3b5239=0x0,_0x2df520=_0x4472d2[a0_0x5a29('0x515')],_0xee112=!_0x298b1e;_0x3b5239<_0x2df520;_0x3b5239++)!_0x278463(_0x4472d2[_0x3b5239],_0x3b5239)!==_0xee112&&_0x3b73b4[a0_0x5a29('0x3cd')](_0x4472d2[_0x3b5239]);return _0x3b73b4;},'map':function(_0xb2932c,_0x55b527,_0x27f855){var _0x34dacb,_0x26ceaf,_0x19e9aa=0x0,_0x5e1d4f=[];if(_0x283616(_0xb2932c))for(_0x34dacb=_0xb2932c[a0_0x5a29('0x515')];_0x19e9aa<_0x34dacb;_0x19e9aa++)null!=(_0x26ceaf=_0x55b527(_0xb2932c[_0x19e9aa],_0x19e9aa,_0x27f855))&&_0x5e1d4f[a0_0x5a29('0x3cd')](_0x26ceaf);else for(_0x19e9aa in _0xb2932c)null!=(_0x26ceaf=_0x55b527(_0xb2932c[_0x19e9aa],_0x19e9aa,_0x27f855))&&_0x5e1d4f[a0_0x5a29('0x3cd')](_0x26ceaf);return _0x5a3925(_0x5e1d4f);},'guid':0x1,'support':_0x1da227}),a0_0x5a29('0x2ae')==typeof Symbol&&(_0xd48b4d['fn'][Symbol['iterator']]=_0x60a404[Symbol[a0_0x5a29('0x49d')]]),_0xd48b4d[a0_0x5a29('0x6bc')](a0_0x5a29('0x8d1')[a0_0x5a29('0xc5')]('\x20'),function(_0x5a5a93,_0x1f9251){_0x580192['[object\x20'+_0x1f9251+']']=_0x1f9251[a0_0x5a29('0x792')]();});var _0xce9d72=function(_0x27da4c){var _0x3d54db,_0x5889c2,_0x5d9209,_0x4045c8,_0x283198,_0x413c6e,_0x34386c,_0x5ce1a9,_0x3f23cb,_0x4be623,_0x1a7993,_0x561a54,_0x224dee,_0x2d3158,_0x832708,_0x37769f,_0x1036e7,_0x1063d5,_0x256838,_0x559d13='sizzle'+0x1*new Date(),_0xedcd8e=_0x27da4c['document'],_0x4a938e=0x0,_0x5d36fa=0x0,_0x2234a2=_0x418393(),_0x16d165=_0x418393(),_0x2a6c1a=_0x418393(),_0x35816e=_0x418393(),_0xfd6541=function(_0x11c4d7,_0x588ac3){return _0x11c4d7===_0x588ac3&&(_0x1a7993=!0x0),0x0;},_0x452b4a={}['hasOwnProperty'],_0x3fbd0d=[],_0x19d5d9=_0x3fbd0d[a0_0x5a29('0x3fe')],_0x517a85=_0x3fbd0d[a0_0x5a29('0x3cd')],_0x2c2948=_0x3fbd0d['push'],_0x4fc0ee=_0x3fbd0d[a0_0x5a29('0x723')],_0x2409ad=function(_0x44fd71,_0x34cc47){for(var _0xda5f07=0x0,_0xd1ec04=_0x44fd71[a0_0x5a29('0x515')];_0xda5f07<_0xd1ec04;_0xda5f07++)if(_0x44fd71[_0xda5f07]===_0x34cc47)return _0xda5f07;return-0x1;},_0x5b2d0a='checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped',_0x5a0d36='[\x5cx20\x5ct\x5cr\x5cn\x5cf]',_0x81f16d=a0_0x5a29('0x94d')+_0x5a0d36+a0_0x5a29('0x46'),_0x476936='\x5c['+_0x5a0d36+'*('+_0x81f16d+a0_0x5a29('0x513')+_0x5a0d36+a0_0x5a29('0x124')+_0x5a0d36+a0_0x5a29('0x557')+_0x81f16d+a0_0x5a29('0x248')+_0x5a0d36+a0_0x5a29('0x400'),_0x359717=':('+_0x81f16d+')(?:\x5c(((\x27((?:\x5c\x5c.|[^\x5c\x5c\x27])*)\x27|\x22((?:\x5c\x5c.|[^\x5c\x5c\x22])*)\x22)|((?:\x5c\x5c.|[^\x5c\x5c()[\x5c]]|'+_0x476936+a0_0x5a29('0x5a2'),_0x52f76c=new RegExp(_0x5a0d36+'+','g'),_0x2db4a8=new RegExp('^'+_0x5a0d36+a0_0x5a29('0x67b')+_0x5a0d36+'+$','g'),_0xf6756c=new RegExp('^'+_0x5a0d36+'*,'+_0x5a0d36+'*'),_0x3a21ad=new RegExp('^'+_0x5a0d36+'*([>+~]|'+_0x5a0d36+')'+_0x5a0d36+'*'),_0x36d66e=new RegExp(_0x5a0d36+'|>'),_0x461c58=new RegExp(_0x359717),_0x17904d=new RegExp('^'+_0x81f16d+'$'),_0x4b85b1={'ID':new RegExp('^#('+_0x81f16d+')'),'CLASS':new RegExp(a0_0x5a29('0x1cc')+_0x81f16d+')'),'TAG':new RegExp('^('+_0x81f16d+a0_0x5a29('0x416')),'ATTR':new RegExp('^'+_0x476936),'PSEUDO':new RegExp('^'+_0x359717),'CHILD':new RegExp(a0_0x5a29('0x852')+_0x5a0d36+'*(even|odd|(([+-]|)(\x5cd*)n|)'+_0x5a0d36+a0_0x5a29('0x53f')+_0x5a0d36+a0_0x5a29('0x3d3')+_0x5a0d36+a0_0x5a29('0x5f8'),'i'),'bool':new RegExp(a0_0x5a29('0x252')+_0x5b2d0a+')$','i'),'needsContext':new RegExp('^'+_0x5a0d36+'*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\x5c('+_0x5a0d36+a0_0x5a29('0x5af')+_0x5a0d36+'*\x5c)|)(?=[^-]|$)','i')},_0x455fe2=/HTML$/i,_0x5a1cd3=/^(?:input|select|textarea|button)$/i,_0x502e72=/^h\d$/i,_0x2551b6=/^[^{]+\{\s*\[native \w/,_0x46a932=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_0x1332c5=/[+~]/,_0x731d1f=new RegExp(a0_0x5a29('0x30e')+_0x5a0d36+a0_0x5a29('0x4b6'),'g'),_0x437b82=function(_0x3e8d06,_0xc9efd6){var _0xca018e='0x'+_0x3e8d06[a0_0x5a29('0x723')](0x1)-0x10000;return _0xc9efd6||(_0xca018e<0x0?String[a0_0x5a29('0x81d')](_0xca018e+0x10000):String[a0_0x5a29('0x81d')](_0xca018e>>0xa|0xd800,0x3ff&_0xca018e|0xdc00));},_0x24c909=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_0x5eeabc=function(_0x9886d5,_0x4fda29){return _0x4fda29?''===_0x9886d5?'�':_0x9886d5['slice'](0x0,-0x1)+'\x5c'+_0x9886d5[a0_0x5a29('0x35c')](_0x9886d5[a0_0x5a29('0x515')]-0x1)[a0_0x5a29('0x857')](0x10)+'\x20':'\x5c'+_0x9886d5;},_0x156147=function(){_0x561a54();},_0x2a2048=_0x25c316(function(_0x12e411){return!0x0===_0x12e411[a0_0x5a29('0x316')]&&a0_0x5a29('0xd')===_0x12e411[a0_0x5a29('0x63b')][a0_0x5a29('0x792')]();},{'dir':'parentNode','next':a0_0x5a29('0x808')});try{_0x2c2948[a0_0x5a29('0x758')](_0x3fbd0d=_0x4fc0ee['call'](_0xedcd8e['childNodes']),_0xedcd8e['childNodes']),_0x3fbd0d[_0xedcd8e[a0_0x5a29('0x73c')][a0_0x5a29('0x515')]][a0_0x5a29('0x23f')];}catch(_0x44475c){_0x2c2948={'apply':_0x3fbd0d[a0_0x5a29('0x515')]?function(_0x5553a0,_0x5d5388){_0x517a85[a0_0x5a29('0x758')](_0x5553a0,_0x4fc0ee[a0_0x5a29('0x351')](_0x5d5388));}:function(_0x36cbcd,_0x44eee6){for(var _0x15fb24=_0x36cbcd[a0_0x5a29('0x515')],_0xe5b633=0x0;_0x36cbcd[_0x15fb24++]=_0x44eee6[_0xe5b633++];);_0x36cbcd['length']=_0x15fb24-0x1;}};}function _0x3934bf(_0x134975,_0x50da26,_0x4b6ef9,_0x533455){var _0xef40c4,_0xc15e10,_0x1efbb8,_0x316bdc,_0x5e2312,_0x20985d,_0x4b241b,_0x11422c=_0x50da26&&_0x50da26[a0_0x5a29('0x23b')],_0x17c479=_0x50da26?_0x50da26['nodeType']:0x9;if(_0x4b6ef9=_0x4b6ef9||[],'string'!=typeof _0x134975||!_0x134975||0x1!==_0x17c479&&0x9!==_0x17c479&&0xb!==_0x17c479)return _0x4b6ef9;if(!_0x533455&&(_0x561a54(_0x50da26),_0x50da26=_0x50da26||_0x224dee,_0x832708)){if(0xb!==_0x17c479&&(_0x5e2312=_0x46a932[a0_0x5a29('0x2d5')](_0x134975))){if(_0xef40c4=_0x5e2312[0x1]){if(0x9===_0x17c479){if(!(_0x1efbb8=_0x50da26[a0_0x5a29('0x200')](_0xef40c4)))return _0x4b6ef9;if(_0x1efbb8['id']===_0xef40c4)return _0x4b6ef9[a0_0x5a29('0x3cd')](_0x1efbb8),_0x4b6ef9;}else{if(_0x11422c&&(_0x1efbb8=_0x11422c[a0_0x5a29('0x200')](_0xef40c4))&&_0x256838(_0x50da26,_0x1efbb8)&&_0x1efbb8['id']===_0xef40c4)return _0x4b6ef9[a0_0x5a29('0x3cd')](_0x1efbb8),_0x4b6ef9;}}else{if(_0x5e2312[0x2])return _0x2c2948[a0_0x5a29('0x758')](_0x4b6ef9,_0x50da26[a0_0x5a29('0x15c')](_0x134975)),_0x4b6ef9;if((_0xef40c4=_0x5e2312[0x3])&&_0x5889c2['getElementsByClassName']&&_0x50da26[a0_0x5a29('0x646')])return _0x2c2948[a0_0x5a29('0x758')](_0x4b6ef9,_0x50da26[a0_0x5a29('0x646')](_0xef40c4)),_0x4b6ef9;}}if(_0x5889c2[a0_0x5a29('0x393')]&&!_0x35816e[_0x134975+'\x20']&&(!_0x37769f||!_0x37769f[a0_0x5a29('0x25e')](_0x134975))&&(0x1!==_0x17c479||a0_0x5a29('0x950')!==_0x50da26[a0_0x5a29('0x63b')]['toLowerCase']())){if(_0x4b241b=_0x134975,_0x11422c=_0x50da26,0x1===_0x17c479&&(_0x36d66e[a0_0x5a29('0x25e')](_0x134975)||_0x3a21ad[a0_0x5a29('0x25e')](_0x134975))){for((_0x11422c=_0x1332c5['test'](_0x134975)&&_0x2cb24d(_0x50da26[a0_0x5a29('0x3d5')])||_0x50da26)===_0x50da26&&_0x5889c2[a0_0x5a29('0x579')]||((_0x316bdc=_0x50da26[a0_0x5a29('0xbd')]('id'))?_0x316bdc=_0x316bdc['replace'](_0x24c909,_0x5eeabc):_0x50da26[a0_0x5a29('0x773')]('id',_0x316bdc=_0x559d13)),_0xc15e10=(_0x20985d=_0x413c6e(_0x134975))[a0_0x5a29('0x515')];_0xc15e10--;)_0x20985d[_0xc15e10]=(_0x316bdc?'#'+_0x316bdc:a0_0x5a29('0x87c'))+'\x20'+_0x1221c7(_0x20985d[_0xc15e10]);_0x4b241b=_0x20985d[a0_0x5a29('0x1e9')](',');}try{return _0x2c2948[a0_0x5a29('0x758')](_0x4b6ef9,_0x11422c[a0_0x5a29('0x6ac')](_0x4b241b)),_0x4b6ef9;}catch(_0x5ef81a){_0x35816e(_0x134975,!0x0);}finally{_0x316bdc===_0x559d13&&_0x50da26[a0_0x5a29('0x661')]('id');}}}return _0x5ce1a9(_0x134975[a0_0x5a29('0x380')](_0x2db4a8,'$1'),_0x50da26,_0x4b6ef9,_0x533455);}function _0x418393(){var _0x48bc00=[];return function _0x266046(_0x367284,_0x2ecefb){return _0x48bc00[a0_0x5a29('0x3cd')](_0x367284+'\x20')>_0x5d9209['cacheLength']&&delete _0x266046[_0x48bc00[a0_0x5a29('0x60e')]()],_0x266046[_0x367284+'\x20']=_0x2ecefb;};}function _0x5b357e(_0x124c4d){return _0x124c4d[_0x559d13]=!0x0,_0x124c4d;}function _0x434163(_0x167c35){var _0x15769c=_0x224dee[a0_0x5a29('0x56f')](a0_0x5a29('0xd'));try{return!!_0x167c35(_0x15769c);}catch(_0x359548){return!0x1;}finally{_0x15769c[a0_0x5a29('0x3d5')]&&_0x15769c[a0_0x5a29('0x3d5')]['removeChild'](_0x15769c),_0x15769c=null;}}function _0x55ddc4(_0x4a7990,_0xdc9cd){for(var _0x55e1d9=_0x4a7990[a0_0x5a29('0xc5')]('|'),_0x9ccc2f=_0x55e1d9[a0_0x5a29('0x515')];_0x9ccc2f--;)_0x5d9209[a0_0x5a29('0x485')][_0x55e1d9[_0x9ccc2f]]=_0xdc9cd;}function _0x589cca(_0xfe14e3,_0x12bea5){var _0x750c74=_0x12bea5&&_0xfe14e3,_0x4b8dca=_0x750c74&&0x1===_0xfe14e3['nodeType']&&0x1===_0x12bea5[a0_0x5a29('0x23f')]&&_0xfe14e3[a0_0x5a29('0x15d')]-_0x12bea5[a0_0x5a29('0x15d')];if(_0x4b8dca)return _0x4b8dca;if(_0x750c74)for(;_0x750c74=_0x750c74['nextSibling'];)if(_0x750c74===_0x12bea5)return-0x1;return _0xfe14e3?0x1:-0x1;}function _0x45e7e9(_0x23d8e1){return function(_0x2ac0cb){return a0_0x5a29('0x889')===_0x2ac0cb[a0_0x5a29('0x63b')]['toLowerCase']()&&_0x2ac0cb[a0_0x5a29('0x519')]===_0x23d8e1;};}function _0x5d32ac(_0x50a5cd){return function(_0x3a9c41){var _0x1cf208=_0x3a9c41['nodeName'][a0_0x5a29('0x792')]();return(a0_0x5a29('0x889')===_0x1cf208||a0_0x5a29('0x797')===_0x1cf208)&&_0x3a9c41[a0_0x5a29('0x519')]===_0x50a5cd;};}function _0x50662d(_0x504ce8){return function(_0x33a7ed){return'form'in _0x33a7ed?_0x33a7ed['parentNode']&&!0x1===_0x33a7ed[a0_0x5a29('0x316')]?'label'in _0x33a7ed?a0_0x5a29('0x7cc')in _0x33a7ed[a0_0x5a29('0x3d5')]?_0x33a7ed['parentNode'][a0_0x5a29('0x316')]===_0x504ce8:_0x33a7ed['disabled']===_0x504ce8:_0x33a7ed[a0_0x5a29('0x310')]===_0x504ce8||_0x33a7ed[a0_0x5a29('0x310')]!==!_0x504ce8&&_0x2a2048(_0x33a7ed)===_0x504ce8:_0x33a7ed[a0_0x5a29('0x316')]===_0x504ce8:a0_0x5a29('0x7cc')in _0x33a7ed&&_0x33a7ed[a0_0x5a29('0x316')]===_0x504ce8;};}function _0x137744(_0x165278){return _0x5b357e(function(_0x3812b4){return _0x3812b4=+_0x3812b4,_0x5b357e(function(_0x5b27be,_0x11dc61){for(var _0x2a8bd1,_0x3edafa=_0x165278([],_0x5b27be[a0_0x5a29('0x515')],_0x3812b4),_0x442fe5=_0x3edafa[a0_0x5a29('0x515')];_0x442fe5--;)_0x5b27be[_0x2a8bd1=_0x3edafa[_0x442fe5]]&&(_0x5b27be[_0x2a8bd1]=!(_0x11dc61[_0x2a8bd1]=_0x5b27be[_0x2a8bd1]));});});}function _0x2cb24d(_0x343dc1){return _0x343dc1&&void 0x0!==_0x343dc1[a0_0x5a29('0x15c')]&&_0x343dc1;}for(_0x3d54db in(_0x5889c2=_0x3934bf[a0_0x5a29('0xd7')]={},_0x283198=_0x3934bf[a0_0x5a29('0x62f')]=function(_0x5b78bf){var _0x5d63bb=_0x5b78bf[a0_0x5a29('0x965')],_0xd351e2=(_0x5b78bf[a0_0x5a29('0x23b')]||_0x5b78bf)[a0_0x5a29('0x937')];return!_0x455fe2['test'](_0x5d63bb||_0xd351e2&&_0xd351e2[a0_0x5a29('0x63b')]||a0_0x5a29('0xca'));},_0x561a54=_0x3934bf[a0_0x5a29('0x601')]=function(_0x339561){var _0x5508a7,_0x184340,_0x4a8884=_0x339561?_0x339561[a0_0x5a29('0x23b')]||_0x339561:_0xedcd8e;return _0x4a8884!=_0x224dee&&0x9===_0x4a8884[a0_0x5a29('0x23f')]&&_0x4a8884[a0_0x5a29('0x937')]?(_0x2d3158=(_0x224dee=_0x4a8884)[a0_0x5a29('0x937')],_0x832708=!_0x283198(_0x224dee),_0xedcd8e!=_0x224dee&&(_0x184340=_0x224dee[a0_0x5a29('0x277')])&&_0x184340[a0_0x5a29('0x5ad')]!==_0x184340&&(_0x184340[a0_0x5a29('0x464')]?_0x184340[a0_0x5a29('0x464')](a0_0x5a29('0x1b7'),_0x156147,!0x1):_0x184340[a0_0x5a29('0x74')]&&_0x184340[a0_0x5a29('0x74')](a0_0x5a29('0x77b'),_0x156147)),_0x5889c2[a0_0x5a29('0x579')]=_0x434163(function(_0x26f560){return _0x2d3158['appendChild'](_0x26f560)[a0_0x5a29('0x365')](_0x224dee[a0_0x5a29('0x56f')](a0_0x5a29('0x884'))),void 0x0!==_0x26f560[a0_0x5a29('0x6ac')]&&!_0x26f560[a0_0x5a29('0x6ac')](a0_0x5a29('0x528'))['length'];}),_0x5889c2[a0_0x5a29('0x576')]=_0x434163(function(_0x4fcd09){return _0x4fcd09['className']='i',!_0x4fcd09[a0_0x5a29('0xbd')](a0_0x5a29('0x38b'));}),_0x5889c2[a0_0x5a29('0x15c')]=_0x434163(function(_0x22605d){return _0x22605d[a0_0x5a29('0x365')](_0x224dee[a0_0x5a29('0x19d')]('')),!_0x22605d[a0_0x5a29('0x15c')]('*')['length'];}),_0x5889c2[a0_0x5a29('0x646')]=_0x2551b6[a0_0x5a29('0x25e')](_0x224dee[a0_0x5a29('0x646')]),_0x5889c2['getById']=_0x434163(function(_0x344dda){return _0x2d3158[a0_0x5a29('0x365')](_0x344dda)['id']=_0x559d13,!_0x224dee[a0_0x5a29('0x682')]||!_0x224dee[a0_0x5a29('0x682')](_0x559d13)[a0_0x5a29('0x515')];}),_0x5889c2[a0_0x5a29('0x926')]?(_0x5d9209['filter']['ID']=function(_0x53ea67){var _0x2b41c7=_0x53ea67['replace'](_0x731d1f,_0x437b82);return function(_0x4b258e){return _0x4b258e[a0_0x5a29('0xbd')]('id')===_0x2b41c7;};},_0x5d9209['find']['ID']=function(_0x17e69d,_0x58396d){if(void 0x0!==_0x58396d[a0_0x5a29('0x200')]&&_0x832708){var _0x2e8832=_0x58396d[a0_0x5a29('0x200')](_0x17e69d);return _0x2e8832?[_0x2e8832]:[];}}):(_0x5d9209[a0_0x5a29('0x48a')]['ID']=function(_0x1048dd){var _0x5602bd=_0x1048dd[a0_0x5a29('0x380')](_0x731d1f,_0x437b82);return function(_0x5efcd1){var _0x147220=void 0x0!==_0x5efcd1[a0_0x5a29('0x6d5')]&&_0x5efcd1[a0_0x5a29('0x6d5')]('id');return _0x147220&&_0x147220[a0_0x5a29('0x363')]===_0x5602bd;};},_0x5d9209[a0_0x5a29('0x2f0')]['ID']=function(_0x48c342,_0x5ee20b){if(void 0x0!==_0x5ee20b['getElementById']&&_0x832708){var _0x6921aa,_0x1c4ffc,_0xcd0a0b,_0x2cdd79=_0x5ee20b['getElementById'](_0x48c342);if(_0x2cdd79){if((_0x6921aa=_0x2cdd79[a0_0x5a29('0x6d5')]('id'))&&_0x6921aa[a0_0x5a29('0x363')]===_0x48c342)return[_0x2cdd79];for(_0xcd0a0b=_0x5ee20b['getElementsByName'](_0x48c342),_0x1c4ffc=0x0;_0x2cdd79=_0xcd0a0b[_0x1c4ffc++];)if((_0x6921aa=_0x2cdd79[a0_0x5a29('0x6d5')]('id'))&&_0x6921aa[a0_0x5a29('0x363')]===_0x48c342)return[_0x2cdd79];}return[];}}),_0x5d9209['find'][a0_0x5a29('0x2d6')]=_0x5889c2[a0_0x5a29('0x15c')]?function(_0xeedd20,_0x1eb8a4){return void 0x0!==_0x1eb8a4['getElementsByTagName']?_0x1eb8a4['getElementsByTagName'](_0xeedd20):_0x5889c2[a0_0x5a29('0x393')]?_0x1eb8a4['querySelectorAll'](_0xeedd20):void 0x0;}:function(_0x4061cc,_0x3c9cc0){var _0x6edf9a,_0x57d414=[],_0xe03879=0x0,_0x299354=_0x3c9cc0['getElementsByTagName'](_0x4061cc);if('*'===_0x4061cc){for(;_0x6edf9a=_0x299354[_0xe03879++];)0x1===_0x6edf9a['nodeType']&&_0x57d414['push'](_0x6edf9a);return _0x57d414;}return _0x299354;},_0x5d9209[a0_0x5a29('0x2f0')][a0_0x5a29('0x106')]=_0x5889c2[a0_0x5a29('0x646')]&&function(_0x363759,_0x337b3f){if(void 0x0!==_0x337b3f['getElementsByClassName']&&_0x832708)return _0x337b3f[a0_0x5a29('0x646')](_0x363759);},_0x1036e7=[],_0x37769f=[],(_0x5889c2['qsa']=_0x2551b6[a0_0x5a29('0x25e')](_0x224dee[a0_0x5a29('0x6ac')]))&&(_0x434163(function(_0x185285){var _0x1b6ba9;_0x2d3158['appendChild'](_0x185285)[a0_0x5a29('0x13d')]=a0_0x5a29('0x29f')+_0x559d13+a0_0x5a29('0x7a2')+_0x559d13+a0_0x5a29('0x6ef'),_0x185285['querySelectorAll'](a0_0x5a29('0x1db'))['length']&&_0x37769f[a0_0x5a29('0x3cd')](a0_0x5a29('0x3ed')+_0x5a0d36+a0_0x5a29('0x858')),_0x185285[a0_0x5a29('0x6ac')](a0_0x5a29('0x81b'))[a0_0x5a29('0x515')]||_0x37769f['push']('\x5c['+_0x5a0d36+a0_0x5a29('0xa0')+_0x5b2d0a+')'),_0x185285['querySelectorAll'](a0_0x5a29('0x949')+_0x559d13+'-]')[a0_0x5a29('0x515')]||_0x37769f[a0_0x5a29('0x3cd')]('~='),(_0x1b6ba9=_0x224dee[a0_0x5a29('0x56f')](a0_0x5a29('0x889')))[a0_0x5a29('0x773')](a0_0x5a29('0x775'),''),_0x185285[a0_0x5a29('0x365')](_0x1b6ba9),_0x185285[a0_0x5a29('0x6ac')](a0_0x5a29('0x812'))['length']||_0x37769f[a0_0x5a29('0x3cd')]('\x5c['+_0x5a0d36+a0_0x5a29('0x80f')+_0x5a0d36+'*='+_0x5a0d36+a0_0x5a29('0x858')),_0x185285['querySelectorAll'](a0_0x5a29('0x196'))['length']||_0x37769f[a0_0x5a29('0x3cd')](a0_0x5a29('0x196')),_0x185285['querySelectorAll']('a#'+_0x559d13+'+*')[a0_0x5a29('0x515')]||_0x37769f[a0_0x5a29('0x3cd')]('.#.+[+~]'),_0x185285[a0_0x5a29('0x6ac')]('\x5c\x0c'),_0x37769f[a0_0x5a29('0x3cd')](a0_0x5a29('0x6bf'));}),_0x434163(function(_0x580b4b){_0x580b4b[a0_0x5a29('0x13d')]=a0_0x5a29('0x8c4');var _0x151fa4=_0x224dee['createElement'](a0_0x5a29('0x889'));_0x151fa4['setAttribute'](a0_0x5a29('0x519'),a0_0x5a29('0x37d')),_0x580b4b[a0_0x5a29('0x365')](_0x151fa4)[a0_0x5a29('0x773')](a0_0x5a29('0x775'),'D'),_0x580b4b[a0_0x5a29('0x6ac')](a0_0x5a29('0x18c'))['length']&&_0x37769f[a0_0x5a29('0x3cd')](a0_0x5a29('0x775')+_0x5a0d36+'*[*^$|!~]?='),0x2!==_0x580b4b['querySelectorAll'](a0_0x5a29('0x2fe'))['length']&&_0x37769f[a0_0x5a29('0x3cd')](a0_0x5a29('0x2fe'),a0_0x5a29('0x848')),_0x2d3158[a0_0x5a29('0x365')](_0x580b4b)[a0_0x5a29('0x316')]=!0x0,0x2!==_0x580b4b[a0_0x5a29('0x6ac')](a0_0x5a29('0x848'))[a0_0x5a29('0x515')]&&_0x37769f['push'](a0_0x5a29('0x2fe'),':disabled'),_0x580b4b['querySelectorAll'](a0_0x5a29('0x1c8')),_0x37769f[a0_0x5a29('0x3cd')](a0_0x5a29('0x123'));})),(_0x5889c2[a0_0x5a29('0x3d7')]=_0x2551b6['test'](_0x1063d5=_0x2d3158[a0_0x5a29('0x24a')]||_0x2d3158['webkitMatchesSelector']||_0x2d3158[a0_0x5a29('0x188')]||_0x2d3158[a0_0x5a29('0x746')]||_0x2d3158[a0_0x5a29('0x456')]))&&_0x434163(function(_0x20a979){_0x5889c2[a0_0x5a29('0x849')]=_0x1063d5[a0_0x5a29('0x351')](_0x20a979,'*'),_0x1063d5[a0_0x5a29('0x351')](_0x20a979,a0_0x5a29('0x55a')),_0x1036e7[a0_0x5a29('0x3cd')]('!=',_0x359717);}),_0x37769f=_0x37769f[a0_0x5a29('0x515')]&&new RegExp(_0x37769f[a0_0x5a29('0x1e9')]('|')),_0x1036e7=_0x1036e7[a0_0x5a29('0x515')]&&new RegExp(_0x1036e7['join']('|')),_0x5508a7=_0x2551b6['test'](_0x2d3158[a0_0x5a29('0x53b')]),_0x256838=_0x5508a7||_0x2551b6[a0_0x5a29('0x25e')](_0x2d3158[a0_0x5a29('0x181')])?function(_0x281f6d,_0x5e4a93){var _0x38a018=0x9===_0x281f6d[a0_0x5a29('0x23f')]?_0x281f6d[a0_0x5a29('0x937')]:_0x281f6d,_0x7b706e=_0x5e4a93&&_0x5e4a93[a0_0x5a29('0x3d5')];return _0x281f6d===_0x7b706e||!(!_0x7b706e||0x1!==_0x7b706e[a0_0x5a29('0x23f')]||!(_0x38a018[a0_0x5a29('0x181')]?_0x38a018[a0_0x5a29('0x181')](_0x7b706e):_0x281f6d[a0_0x5a29('0x53b')]&&0x10&_0x281f6d['compareDocumentPosition'](_0x7b706e)));}:function(_0x11dbe7,_0x254cb3){if(_0x254cb3)for(;_0x254cb3=_0x254cb3[a0_0x5a29('0x3d5')];)if(_0x254cb3===_0x11dbe7)return!0x0;return!0x1;},_0xfd6541=_0x5508a7?function(_0x4cb500,_0x170bcf){if(_0x4cb500===_0x170bcf)return _0x1a7993=!0x0,0x0;var _0x230306=!_0x4cb500['compareDocumentPosition']-!_0x170bcf[a0_0x5a29('0x53b')];return _0x230306||(0x1&(_0x230306=(_0x4cb500[a0_0x5a29('0x23b')]||_0x4cb500)==(_0x170bcf[a0_0x5a29('0x23b')]||_0x170bcf)?_0x4cb500['compareDocumentPosition'](_0x170bcf):0x1)||!_0x5889c2[a0_0x5a29('0x8b3')]&&_0x170bcf['compareDocumentPosition'](_0x4cb500)===_0x230306?_0x4cb500==_0x224dee||_0x4cb500[a0_0x5a29('0x23b')]==_0xedcd8e&&_0x256838(_0xedcd8e,_0x4cb500)?-0x1:_0x170bcf==_0x224dee||_0x170bcf[a0_0x5a29('0x23b')]==_0xedcd8e&&_0x256838(_0xedcd8e,_0x170bcf)?0x1:_0x4be623?_0x2409ad(_0x4be623,_0x4cb500)-_0x2409ad(_0x4be623,_0x170bcf):0x0:0x4&_0x230306?-0x1:0x1);}:function(_0x258691,_0x2f105b){if(_0x258691===_0x2f105b)return _0x1a7993=!0x0,0x0;var _0x21d756,_0x32e85f=0x0,_0x384e95=_0x258691[a0_0x5a29('0x3d5')],_0x190820=_0x2f105b[a0_0x5a29('0x3d5')],_0x4172a3=[_0x258691],_0x16aebd=[_0x2f105b];if(!_0x384e95||!_0x190820)return _0x258691==_0x224dee?-0x1:_0x2f105b==_0x224dee?0x1:_0x384e95?-0x1:_0x190820?0x1:_0x4be623?_0x2409ad(_0x4be623,_0x258691)-_0x2409ad(_0x4be623,_0x2f105b):0x0;if(_0x384e95===_0x190820)return _0x589cca(_0x258691,_0x2f105b);for(_0x21d756=_0x258691;_0x21d756=_0x21d756[a0_0x5a29('0x3d5')];)_0x4172a3[a0_0x5a29('0x5dc')](_0x21d756);for(_0x21d756=_0x2f105b;_0x21d756=_0x21d756[a0_0x5a29('0x3d5')];)_0x16aebd[a0_0x5a29('0x5dc')](_0x21d756);for(;_0x4172a3[_0x32e85f]===_0x16aebd[_0x32e85f];)_0x32e85f++;return _0x32e85f?_0x589cca(_0x4172a3[_0x32e85f],_0x16aebd[_0x32e85f]):_0x4172a3[_0x32e85f]==_0xedcd8e?-0x1:_0x16aebd[_0x32e85f]==_0xedcd8e?0x1:0x0;},_0x224dee):_0x224dee;},_0x3934bf[a0_0x5a29('0x24a')]=function(_0x3cbc9b,_0x7e3b3c){return _0x3934bf(_0x3cbc9b,null,null,_0x7e3b3c);},_0x3934bf[a0_0x5a29('0x3d7')]=function(_0x306561,_0x400522){if(_0x561a54(_0x306561),_0x5889c2[a0_0x5a29('0x3d7')]&&_0x832708&&!_0x35816e[_0x400522+'\x20']&&(!_0x1036e7||!_0x1036e7['test'](_0x400522))&&(!_0x37769f||!_0x37769f[a0_0x5a29('0x25e')](_0x400522)))try{var _0x367fea=_0x1063d5[a0_0x5a29('0x351')](_0x306561,_0x400522);if(_0x367fea||_0x5889c2[a0_0x5a29('0x849')]||_0x306561[a0_0x5a29('0x62a')]&&0xb!==_0x306561[a0_0x5a29('0x62a')]['nodeType'])return _0x367fea;}catch(_0x33b5a6){_0x35816e(_0x400522,!0x0);}return _0x3934bf(_0x400522,_0x224dee,null,[_0x306561])['length']>0x0;},_0x3934bf[a0_0x5a29('0x181')]=function(_0x193d94,_0x4ed83d){return(_0x193d94[a0_0x5a29('0x23b')]||_0x193d94)!=_0x224dee&&_0x561a54(_0x193d94),_0x256838(_0x193d94,_0x4ed83d);},_0x3934bf[a0_0x5a29('0x5c6')]=function(_0x1cc3ab,_0x572709){(_0x1cc3ab[a0_0x5a29('0x23b')]||_0x1cc3ab)!=_0x224dee&&_0x561a54(_0x1cc3ab);var _0x3f8d95=_0x5d9209[a0_0x5a29('0x485')][_0x572709[a0_0x5a29('0x792')]()],_0x571bd5=_0x3f8d95&&_0x452b4a[a0_0x5a29('0x351')](_0x5d9209[a0_0x5a29('0x485')],_0x572709[a0_0x5a29('0x792')]())?_0x3f8d95(_0x1cc3ab,_0x572709,!_0x832708):void 0x0;return void 0x0!==_0x571bd5?_0x571bd5:_0x5889c2[a0_0x5a29('0x576')]||!_0x832708?_0x1cc3ab['getAttribute'](_0x572709):(_0x571bd5=_0x1cc3ab['getAttributeNode'](_0x572709))&&_0x571bd5[a0_0x5a29('0x92e')]?_0x571bd5[a0_0x5a29('0x363')]:null;},_0x3934bf[a0_0x5a29('0x4a9')]=function(_0x4616ba){return(_0x4616ba+'')['replace'](_0x24c909,_0x5eeabc);},_0x3934bf['error']=function(_0xa2106e){throw new Error('Syntax\x20error,\x20unrecognized\x20expression:\x20'+_0xa2106e);},_0x3934bf[a0_0x5a29('0x8a4')]=function(_0xb11c0f){var _0x3cc1eb,_0x383c05=[],_0x22edd3=0x0,_0x393e81=0x0;if(_0x1a7993=!_0x5889c2[a0_0x5a29('0x622')],_0x4be623=!_0x5889c2['sortStable']&&_0xb11c0f[a0_0x5a29('0x723')](0x0),_0xb11c0f[a0_0x5a29('0x518')](_0xfd6541),_0x1a7993){for(;_0x3cc1eb=_0xb11c0f[_0x393e81++];)_0x3cc1eb===_0xb11c0f[_0x393e81]&&(_0x22edd3=_0x383c05['push'](_0x393e81));for(;_0x22edd3--;)_0xb11c0f['splice'](_0x383c05[_0x22edd3],0x1);}return _0x4be623=null,_0xb11c0f;},_0x4045c8=_0x3934bf[a0_0x5a29('0x431')]=function(_0x2ddeac){var _0x16fe94,_0x398cca='',_0x338eac=0x0,_0x379cbe=_0x2ddeac[a0_0x5a29('0x23f')];if(_0x379cbe){if(0x1===_0x379cbe||0x9===_0x379cbe||0xb===_0x379cbe){if(a0_0x5a29('0x783')==typeof _0x2ddeac[a0_0x5a29('0x627')])return _0x2ddeac[a0_0x5a29('0x627')];for(_0x2ddeac=_0x2ddeac[a0_0x5a29('0x5a1')];_0x2ddeac;_0x2ddeac=_0x2ddeac[a0_0x5a29('0x574')])_0x398cca+=_0x4045c8(_0x2ddeac);}else{if(0x3===_0x379cbe||0x4===_0x379cbe)return _0x2ddeac[a0_0x5a29('0xce')];}}else for(;_0x16fe94=_0x2ddeac[_0x338eac++];)_0x398cca+=_0x4045c8(_0x16fe94);return _0x398cca;},(_0x5d9209=_0x3934bf[a0_0x5a29('0x5be')]={'cacheLength':0x32,'createPseudo':_0x5b357e,'match':_0x4b85b1,'attrHandle':{},'find':{},'relative':{'>':{'dir':a0_0x5a29('0x3d5'),'first':!0x0},'\x20':{'dir':a0_0x5a29('0x3d5')},'+':{'dir':a0_0x5a29('0x6e6'),'first':!0x0},'~':{'dir':'previousSibling'}},'preFilter':{'ATTR':function(_0x2c2cb5){return _0x2c2cb5[0x1]=_0x2c2cb5[0x1][a0_0x5a29('0x380')](_0x731d1f,_0x437b82),_0x2c2cb5[0x3]=(_0x2c2cb5[0x3]||_0x2c2cb5[0x4]||_0x2c2cb5[0x5]||'')[a0_0x5a29('0x380')](_0x731d1f,_0x437b82),'~='===_0x2c2cb5[0x2]&&(_0x2c2cb5[0x3]='\x20'+_0x2c2cb5[0x3]+'\x20'),_0x2c2cb5[a0_0x5a29('0x723')](0x0,0x4);},'CHILD':function(_0x218dc5){return _0x218dc5[0x1]=_0x218dc5[0x1][a0_0x5a29('0x792')](),a0_0x5a29('0x105')===_0x218dc5[0x1][a0_0x5a29('0x723')](0x0,0x3)?(_0x218dc5[0x3]||_0x3934bf['error'](_0x218dc5[0x0]),_0x218dc5[0x4]=+(_0x218dc5[0x4]?_0x218dc5[0x5]+(_0x218dc5[0x6]||0x1):0x2*(a0_0x5a29('0x3b8')===_0x218dc5[0x3]||a0_0x5a29('0x91d')===_0x218dc5[0x3])),_0x218dc5[0x5]=+(_0x218dc5[0x7]+_0x218dc5[0x8]||a0_0x5a29('0x91d')===_0x218dc5[0x3])):_0x218dc5[0x3]&&_0x3934bf[a0_0x5a29('0x8fc')](_0x218dc5[0x0]),_0x218dc5;},'PSEUDO':function(_0x1939b6){var _0x2694ae,_0x301298=!_0x1939b6[0x6]&&_0x1939b6[0x2];return _0x4b85b1[a0_0x5a29('0x1dc')]['test'](_0x1939b6[0x0])?null:(_0x1939b6[0x3]?_0x1939b6[0x2]=_0x1939b6[0x4]||_0x1939b6[0x5]||'':_0x301298&&_0x461c58[a0_0x5a29('0x25e')](_0x301298)&&(_0x2694ae=_0x413c6e(_0x301298,!0x0))&&(_0x2694ae=_0x301298[a0_0x5a29('0x26f')](')',_0x301298[a0_0x5a29('0x515')]-_0x2694ae)-_0x301298[a0_0x5a29('0x515')])&&(_0x1939b6[0x0]=_0x1939b6[0x0]['slice'](0x0,_0x2694ae),_0x1939b6[0x2]=_0x301298[a0_0x5a29('0x723')](0x0,_0x2694ae)),_0x1939b6[a0_0x5a29('0x723')](0x0,0x3));}},'filter':{'TAG':function(_0x22eb1b){var _0x2b5ab8=_0x22eb1b[a0_0x5a29('0x380')](_0x731d1f,_0x437b82)[a0_0x5a29('0x792')]();return'*'===_0x22eb1b?function(){return!0x0;}:function(_0x156ff1){return _0x156ff1['nodeName']&&_0x156ff1[a0_0x5a29('0x63b')][a0_0x5a29('0x792')]()===_0x2b5ab8;};},'CLASS':function(_0x3f7ba4){var _0x372ab0=_0x2234a2[_0x3f7ba4+'\x20'];return _0x372ab0||(_0x372ab0=new RegExp(a0_0x5a29('0x6d8')+_0x5a0d36+')'+_0x3f7ba4+'('+_0x5a0d36+a0_0x5a29('0x1d7')))&&_0x2234a2(_0x3f7ba4,function(_0x6dbf1f){return _0x372ab0[a0_0x5a29('0x25e')](a0_0x5a29('0x783')==typeof _0x6dbf1f['className']&&_0x6dbf1f['className']||void 0x0!==_0x6dbf1f[a0_0x5a29('0xbd')]&&_0x6dbf1f['getAttribute'](a0_0x5a29('0x7ec'))||'');});},'ATTR':function(_0x1a8a7b,_0x3fa031,_0x51fc43){return function(_0x40aae9){var _0x40c4ff=_0x3934bf[a0_0x5a29('0x5c6')](_0x40aae9,_0x1a8a7b);return null==_0x40c4ff?'!='===_0x3fa031:!_0x3fa031||(_0x40c4ff+='','='===_0x3fa031?_0x40c4ff===_0x51fc43:'!='===_0x3fa031?_0x40c4ff!==_0x51fc43:'^='===_0x3fa031?_0x51fc43&&0x0===_0x40c4ff[a0_0x5a29('0x26f')](_0x51fc43):'*='===_0x3fa031?_0x51fc43&&_0x40c4ff[a0_0x5a29('0x26f')](_0x51fc43)>-0x1:'$='===_0x3fa031?_0x51fc43&&_0x40c4ff[a0_0x5a29('0x723')](-_0x51fc43[a0_0x5a29('0x515')])===_0x51fc43:'~='===_0x3fa031?('\x20'+_0x40c4ff[a0_0x5a29('0x380')](_0x52f76c,'\x20')+'\x20')[a0_0x5a29('0x26f')](_0x51fc43)>-0x1:'|='===_0x3fa031&&(_0x40c4ff===_0x51fc43||_0x40c4ff['slice'](0x0,_0x51fc43[a0_0x5a29('0x515')]+0x1)===_0x51fc43+'-'));};},'CHILD':function(_0x507f66,_0x360454,_0x5dc135,_0x3c0142,_0x81f35d){var _0x40684e='nth'!==_0x507f66[a0_0x5a29('0x723')](0x0,0x3),_0x251739=a0_0x5a29('0x5f1')!==_0x507f66[a0_0x5a29('0x723')](-0x4),_0x5e79c8=a0_0x5a29('0x744')===_0x360454;return 0x1===_0x3c0142&&0x0===_0x81f35d?function(_0x1050ad){return!!_0x1050ad[a0_0x5a29('0x3d5')];}:function(_0x1c9dbe,_0x3a69fc,_0xc80dce){var _0x422cea,_0x2270cb,_0x46966a,_0x5862c3,_0x18ca27,_0x5e976c,_0x326479=_0x40684e!==_0x251739?'nextSibling':a0_0x5a29('0x6e6'),_0x31ce2f=_0x1c9dbe[a0_0x5a29('0x3d5')],_0x2c81bd=_0x5e79c8&&_0x1c9dbe[a0_0x5a29('0x63b')]['toLowerCase'](),_0x5d42d4=!_0xc80dce&&!_0x5e79c8,_0x34e0f2=!0x1;if(_0x31ce2f){if(_0x40684e){for(;_0x326479;){for(_0x5862c3=_0x1c9dbe;_0x5862c3=_0x5862c3[_0x326479];)if(_0x5e79c8?_0x5862c3[a0_0x5a29('0x63b')][a0_0x5a29('0x792')]()===_0x2c81bd:0x1===_0x5862c3['nodeType'])return!0x1;_0x5e976c=_0x326479=a0_0x5a29('0x679')===_0x507f66&&!_0x5e976c&&'nextSibling';}return!0x0;}if(_0x5e976c=[_0x251739?_0x31ce2f[a0_0x5a29('0x5a1')]:_0x31ce2f[a0_0x5a29('0x8e2')]],_0x251739&&_0x5d42d4)for(_0x34e0f2=(_0x18ca27=(_0x422cea=(_0x2270cb=(_0x46966a=(_0x5862c3=_0x31ce2f)[_0x559d13]||(_0x5862c3[_0x559d13]={}))[_0x5862c3[a0_0x5a29('0x91')]]||(_0x46966a[_0x5862c3[a0_0x5a29('0x91')]]={}))[_0x507f66]||[])[0x0]===_0x4a938e&&_0x422cea[0x1])&&_0x422cea[0x2],_0x5862c3=_0x18ca27&&_0x31ce2f[a0_0x5a29('0x73c')][_0x18ca27];_0x5862c3=++_0x18ca27&&_0x5862c3&&_0x5862c3[_0x326479]||(_0x34e0f2=_0x18ca27=0x0)||_0x5e976c[a0_0x5a29('0x3fe')]();)if(0x1===_0x5862c3[a0_0x5a29('0x23f')]&&++_0x34e0f2&&_0x5862c3===_0x1c9dbe){_0x2270cb[_0x507f66]=[_0x4a938e,_0x18ca27,_0x34e0f2];break;}else{if(_0x5d42d4&&(_0x34e0f2=_0x18ca27=(_0x422cea=(_0x2270cb=(_0x46966a=(_0x5862c3=_0x1c9dbe)[_0x559d13]||(_0x5862c3[_0x559d13]={}))[_0x5862c3[a0_0x5a29('0x91')]]||(_0x46966a[_0x5862c3['uniqueID']]={}))[_0x507f66]||[])[0x0]===_0x4a938e&&_0x422cea[0x1]),!0x1===_0x34e0f2)for(;(_0x5862c3=++_0x18ca27&&_0x5862c3&&_0x5862c3[_0x326479]||(_0x34e0f2=_0x18ca27=0x0)||_0x5e976c['pop']())&&((_0x5e79c8?_0x5862c3[a0_0x5a29('0x63b')]['toLowerCase']()!==_0x2c81bd:0x1!==_0x5862c3[a0_0x5a29('0x23f')])||!++_0x34e0f2||(_0x5d42d4&&((_0x2270cb=(_0x46966a=_0x5862c3[_0x559d13]||(_0x5862c3[_0x559d13]={}))[_0x5862c3['uniqueID']]||(_0x46966a[_0x5862c3[a0_0x5a29('0x91')]]={}))[_0x507f66]=[_0x4a938e,_0x34e0f2]),_0x5862c3!==_0x1c9dbe)););}return(_0x34e0f2-=_0x81f35d)===_0x3c0142||_0x34e0f2%_0x3c0142==0x0&&_0x34e0f2/_0x3c0142>=0x0;}};},'PSEUDO':function(_0x10d831,_0x1a9e1a){var _0x56eadd,_0x36c10e=_0x5d9209[a0_0x5a29('0x598')][_0x10d831]||_0x5d9209['setFilters'][_0x10d831['toLowerCase']()]||_0x3934bf[a0_0x5a29('0x8fc')](a0_0x5a29('0x6d7')+_0x10d831);return _0x36c10e[_0x559d13]?_0x36c10e(_0x1a9e1a):_0x36c10e[a0_0x5a29('0x515')]>0x1?(_0x56eadd=[_0x10d831,_0x10d831,'',_0x1a9e1a],_0x5d9209[a0_0x5a29('0xde')][a0_0x5a29('0x71')](_0x10d831[a0_0x5a29('0x792')]())?_0x5b357e(function(_0x22a232,_0x3f4db4){for(var _0x2d05e8,_0x43ce9f=_0x36c10e(_0x22a232,_0x1a9e1a),_0x458f4c=_0x43ce9f['length'];_0x458f4c--;)_0x22a232[_0x2d05e8=_0x2409ad(_0x22a232,_0x43ce9f[_0x458f4c])]=!(_0x3f4db4[_0x2d05e8]=_0x43ce9f[_0x458f4c]);}):function(_0x5e2231){return _0x36c10e(_0x5e2231,0x0,_0x56eadd);}):_0x36c10e;}},'pseudos':{'not':_0x5b357e(function(_0x434736){var _0x2efa9b=[],_0x50ec50=[],_0x432bf4=_0x34386c(_0x434736[a0_0x5a29('0x380')](_0x2db4a8,'$1'));return _0x432bf4[_0x559d13]?_0x5b357e(function(_0xb67879,_0x834af1,_0x2c698c,_0x404f0c){for(var _0x562213,_0x49d94a=_0x432bf4(_0xb67879,null,_0x404f0c,[]),_0x338fc8=_0xb67879[a0_0x5a29('0x515')];_0x338fc8--;)(_0x562213=_0x49d94a[_0x338fc8])&&(_0xb67879[_0x338fc8]=!(_0x834af1[_0x338fc8]=_0x562213));}):function(_0x1a8c08,_0xfc9746,_0x36636f){return _0x2efa9b[0x0]=_0x1a8c08,_0x432bf4(_0x2efa9b,null,_0x36636f,_0x50ec50),_0x2efa9b[0x0]=null,!_0x50ec50[a0_0x5a29('0x3fe')]();};}),'has':_0x5b357e(function(_0x473b3e){return function(_0x51de2f){return _0x3934bf(_0x473b3e,_0x51de2f)['length']>0x0;};}),'contains':_0x5b357e(function(_0x5dcb48){return _0x5dcb48=_0x5dcb48['replace'](_0x731d1f,_0x437b82),function(_0x28c554){return(_0x28c554[a0_0x5a29('0x627')]||_0x4045c8(_0x28c554))[a0_0x5a29('0x26f')](_0x5dcb48)>-0x1;};}),'lang':_0x5b357e(function(_0x1e26f1){return _0x17904d[a0_0x5a29('0x25e')](_0x1e26f1||'')||_0x3934bf[a0_0x5a29('0x8fc')](a0_0x5a29('0x604')+_0x1e26f1),_0x1e26f1=_0x1e26f1['replace'](_0x731d1f,_0x437b82)[a0_0x5a29('0x792')](),function(_0x35e19f){var _0x376d26;do{if(_0x376d26=_0x832708?_0x35e19f[a0_0x5a29('0x74c')]:_0x35e19f[a0_0x5a29('0xbd')](a0_0x5a29('0x189'))||_0x35e19f[a0_0x5a29('0xbd')](a0_0x5a29('0x74c')))return(_0x376d26=_0x376d26[a0_0x5a29('0x792')]())===_0x1e26f1||0x0===_0x376d26[a0_0x5a29('0x26f')](_0x1e26f1+'-');}while((_0x35e19f=_0x35e19f[a0_0x5a29('0x3d5')])&&0x1===_0x35e19f[a0_0x5a29('0x23f')]);return!0x1;};}),'target':function(_0x520402){var _0x4c6821=_0x27da4c[a0_0x5a29('0x749')]&&_0x27da4c[a0_0x5a29('0x749')]['hash'];return _0x4c6821&&_0x4c6821[a0_0x5a29('0x723')](0x1)===_0x520402['id'];},'root':function(_0x5a5e7c){return _0x5a5e7c===_0x2d3158;},'focus':function(_0x2c1f53){return _0x2c1f53===_0x224dee[a0_0x5a29('0xcc')]&&(!_0x224dee['hasFocus']||_0x224dee[a0_0x5a29('0x615')]())&&!!(_0x2c1f53['type']||_0x2c1f53[a0_0x5a29('0x156')]||~_0x2c1f53[a0_0x5a29('0x8a1')]);},'enabled':_0x50662d(!0x1),'disabled':_0x50662d(!0x0),'checked':function(_0xd7261c){var _0x4ccf02=_0xd7261c['nodeName'][a0_0x5a29('0x792')]();return a0_0x5a29('0x889')===_0x4ccf02&&!!_0xd7261c[a0_0x5a29('0x289')]||a0_0x5a29('0x2fd')===_0x4ccf02&&!!_0xd7261c[a0_0x5a29('0x118')];},'selected':function(_0x528dc4){return _0x528dc4[a0_0x5a29('0x3d5')]&&_0x528dc4[a0_0x5a29('0x3d5')][a0_0x5a29('0x8be')],!0x0===_0x528dc4[a0_0x5a29('0x118')];},'empty':function(_0x499ab1){for(_0x499ab1=_0x499ab1[a0_0x5a29('0x5a1')];_0x499ab1;_0x499ab1=_0x499ab1[a0_0x5a29('0x574')])if(_0x499ab1[a0_0x5a29('0x23f')]<0x6)return!0x1;return!0x0;},'parent':function(_0x44f314){return!_0x5d9209[a0_0x5a29('0x598')][a0_0x5a29('0x313')](_0x44f314);},'header':function(_0x402ba6){return _0x502e72['test'](_0x402ba6[a0_0x5a29('0x63b')]);},'input':function(_0x4b1d38){return _0x5a1cd3['test'](_0x4b1d38[a0_0x5a29('0x63b')]);},'button':function(_0xb294dd){var _0x5c6057=_0xb294dd[a0_0x5a29('0x63b')]['toLowerCase']();return a0_0x5a29('0x889')===_0x5c6057&&a0_0x5a29('0x797')===_0xb294dd[a0_0x5a29('0x519')]||a0_0x5a29('0x797')===_0x5c6057;},'text':function(_0x2f4585){var _0x5da7a5;return a0_0x5a29('0x889')===_0x2f4585[a0_0x5a29('0x63b')]['toLowerCase']()&&'text'===_0x2f4585[a0_0x5a29('0x519')]&&(null==(_0x5da7a5=_0x2f4585[a0_0x5a29('0xbd')]('type'))||a0_0x5a29('0x3ce')===_0x5da7a5[a0_0x5a29('0x792')]());},'first':_0x137744(function(){return[0x0];}),'last':_0x137744(function(_0x4b3b3b,_0x2130c4){return[_0x2130c4-0x1];}),'eq':_0x137744(function(_0x52b155,_0x1b667b,_0x440c87){return[_0x440c87<0x0?_0x440c87+_0x1b667b:_0x440c87];}),'even':_0x137744(function(_0x1dde01,_0x3f170f){for(var _0x45e73a=0x0;_0x45e73a<_0x3f170f;_0x45e73a+=0x2)_0x1dde01[a0_0x5a29('0x3cd')](_0x45e73a);return _0x1dde01;}),'odd':_0x137744(function(_0x55eab9,_0x547466){for(var _0x47063e=0x1;_0x47063e<_0x547466;_0x47063e+=0x2)_0x55eab9[a0_0x5a29('0x3cd')](_0x47063e);return _0x55eab9;}),'lt':_0x137744(function(_0x2ddd75,_0x2697ed,_0x5241c1){for(var _0x5e1bb6=_0x5241c1<0x0?_0x5241c1+_0x2697ed:_0x5241c1>_0x2697ed?_0x2697ed:_0x5241c1;--_0x5e1bb6>=0x0;)_0x2ddd75[a0_0x5a29('0x3cd')](_0x5e1bb6);return _0x2ddd75;}),'gt':_0x137744(function(_0x5dfa5b,_0x20c0af,_0x2d81e3){for(var _0x58610b=_0x2d81e3<0x0?_0x2d81e3+_0x20c0af:_0x2d81e3;++_0x58610b<_0x20c0af;)_0x5dfa5b[a0_0x5a29('0x3cd')](_0x58610b);return _0x5dfa5b;})}})[a0_0x5a29('0x598')][a0_0x5a29('0x105')]=_0x5d9209[a0_0x5a29('0x598')]['eq'],{'radio':!0x0,'checkbox':!0x0,'file':!0x0,'password':!0x0,'image':!0x0}))_0x5d9209['pseudos'][_0x3d54db]=_0x45e7e9(_0x3d54db);for(_0x3d54db in{'submit':!0x0,'reset':!0x0})_0x5d9209[a0_0x5a29('0x598')][_0x3d54db]=_0x5d32ac(_0x3d54db);function _0x49166f(){}function _0x1221c7(_0x2630f4){for(var _0xb267e7=0x0,_0x1aede2=_0x2630f4['length'],_0x1625ec='';_0xb267e7<_0x1aede2;_0xb267e7++)_0x1625ec+=_0x2630f4[_0xb267e7]['value'];return _0x1625ec;}function _0x25c316(_0x44de8e,_0x1ddb90,_0x578842){var _0x31d768=_0x1ddb90[a0_0x5a29('0x58f')],_0x2648fc=_0x1ddb90[a0_0x5a29('0x2ed')],_0x521c57=_0x2648fc||_0x31d768,_0x369275=_0x578842&&a0_0x5a29('0x3d5')===_0x521c57,_0x378a00=_0x5d36fa++;return _0x1ddb90[a0_0x5a29('0x545')]?function(_0x61c038,_0x450d23,_0x3994f4){for(;_0x61c038=_0x61c038[_0x31d768];)if(0x1===_0x61c038[a0_0x5a29('0x23f')]||_0x369275)return _0x44de8e(_0x61c038,_0x450d23,_0x3994f4);return!0x1;}:function(_0x40c24a,_0xfebf90,_0x10324e){var _0x3dd965,_0x35aa74,_0x5a5912,_0xa391ed=[_0x4a938e,_0x378a00];if(_0x10324e)for(;_0x40c24a=_0x40c24a[_0x31d768];)if((0x1===_0x40c24a['nodeType']||_0x369275)&&_0x44de8e(_0x40c24a,_0xfebf90,_0x10324e))return!0x0;else for(;_0x40c24a=_0x40c24a[_0x31d768];)if(0x1===_0x40c24a[a0_0x5a29('0x23f')]||_0x369275){if(_0x35aa74=(_0x5a5912=_0x40c24a[_0x559d13]||(_0x40c24a[_0x559d13]={}))[_0x40c24a['uniqueID']]||(_0x5a5912[_0x40c24a[a0_0x5a29('0x91')]]={}),_0x2648fc&&_0x2648fc===_0x40c24a[a0_0x5a29('0x63b')]['toLowerCase']())_0x40c24a=_0x40c24a[_0x31d768]||_0x40c24a;else{if((_0x3dd965=_0x35aa74[_0x521c57])&&_0x3dd965[0x0]===_0x4a938e&&_0x3dd965[0x1]===_0x378a00)return _0xa391ed[0x2]=_0x3dd965[0x2];if(_0x35aa74[_0x521c57]=_0xa391ed,_0xa391ed[0x2]=_0x44de8e(_0x40c24a,_0xfebf90,_0x10324e))return!0x0;}}return!0x1;};}function _0x446707(_0x54539b){return _0x54539b['length']>0x1?function(_0x285a70,_0x415211,_0x393b67){for(var _0x33ce96=_0x54539b[a0_0x5a29('0x515')];_0x33ce96--;)if(!_0x54539b[_0x33ce96](_0x285a70,_0x415211,_0x393b67))return!0x1;return!0x0;}:_0x54539b[0x0];}function _0x191c01(_0x4274ca,_0xbc835e,_0x4cbf85,_0x50dffc,_0x1d0a46){for(var _0x29acdc,_0x208bd1=[],_0x3d26c2=0x0,_0x127604=_0x4274ca[a0_0x5a29('0x515')],_0x2336c0=null!=_0xbc835e;_0x3d26c2<_0x127604;_0x3d26c2++)(_0x29acdc=_0x4274ca[_0x3d26c2])&&(_0x4cbf85&&!_0x4cbf85(_0x29acdc,_0x50dffc,_0x1d0a46)||(_0x208bd1[a0_0x5a29('0x3cd')](_0x29acdc),_0x2336c0&&_0xbc835e['push'](_0x3d26c2)));return _0x208bd1;}function _0x971c08(_0x818902,_0x4322bf,_0x42b4f4,_0x529e18,_0x4d865a,_0x174090){return _0x529e18&&!_0x529e18[_0x559d13]&&(_0x529e18=_0x971c08(_0x529e18)),_0x4d865a&&!_0x4d865a[_0x559d13]&&(_0x4d865a=_0x971c08(_0x4d865a,_0x174090)),_0x5b357e(function(_0x42c209,_0x32ee25,_0x37bb46,_0x21ca1b){var _0x1cd34b,_0x406df4,_0x47b5af,_0x398a4b=[],_0x450ce8=[],_0x26cb0c=_0x32ee25[a0_0x5a29('0x515')],_0x32a6d1=_0x42c209||function(_0x1d4214,_0x3db1e4,_0x24147b){for(var _0x54cd73=0x0,_0x24c27c=_0x3db1e4[a0_0x5a29('0x515')];_0x54cd73<_0x24c27c;_0x54cd73++)_0x3934bf(_0x1d4214,_0x3db1e4[_0x54cd73],_0x24147b);return _0x24147b;}(_0x4322bf||'*',_0x37bb46['nodeType']?[_0x37bb46]:_0x37bb46,[]),_0x179b3d=!_0x818902||!_0x42c209&&_0x4322bf?_0x32a6d1:_0x191c01(_0x32a6d1,_0x398a4b,_0x818902,_0x37bb46,_0x21ca1b),_0x599a6b=_0x42b4f4?_0x4d865a||(_0x42c209?_0x818902:_0x26cb0c||_0x529e18)?[]:_0x32ee25:_0x179b3d;if(_0x42b4f4&&_0x42b4f4(_0x179b3d,_0x599a6b,_0x37bb46,_0x21ca1b),_0x529e18)for(_0x1cd34b=_0x191c01(_0x599a6b,_0x450ce8),_0x529e18(_0x1cd34b,[],_0x37bb46,_0x21ca1b),_0x406df4=_0x1cd34b['length'];_0x406df4--;)(_0x47b5af=_0x1cd34b[_0x406df4])&&(_0x599a6b[_0x450ce8[_0x406df4]]=!(_0x179b3d[_0x450ce8[_0x406df4]]=_0x47b5af));if(_0x42c209){if(_0x4d865a||_0x818902){if(_0x4d865a){for(_0x1cd34b=[],_0x406df4=_0x599a6b[a0_0x5a29('0x515')];_0x406df4--;)(_0x47b5af=_0x599a6b[_0x406df4])&&_0x1cd34b[a0_0x5a29('0x3cd')](_0x179b3d[_0x406df4]=_0x47b5af);_0x4d865a(null,_0x599a6b=[],_0x1cd34b,_0x21ca1b);}for(_0x406df4=_0x599a6b[a0_0x5a29('0x515')];_0x406df4--;)(_0x47b5af=_0x599a6b[_0x406df4])&&(_0x1cd34b=_0x4d865a?_0x2409ad(_0x42c209,_0x47b5af):_0x398a4b[_0x406df4])>-0x1&&(_0x42c209[_0x1cd34b]=!(_0x32ee25[_0x1cd34b]=_0x47b5af));}}else _0x599a6b=_0x191c01(_0x599a6b===_0x32ee25?_0x599a6b[a0_0x5a29('0x250')](_0x26cb0c,_0x599a6b[a0_0x5a29('0x515')]):_0x599a6b),_0x4d865a?_0x4d865a(null,_0x32ee25,_0x599a6b,_0x21ca1b):_0x2c2948[a0_0x5a29('0x758')](_0x32ee25,_0x599a6b);});}function _0x535187(_0xc33ec5){for(var _0x490b1e,_0x1ad24e,_0x68e87f,_0x517b64=_0xc33ec5[a0_0x5a29('0x515')],_0x14d6a0=_0x5d9209[a0_0x5a29('0x1e2')][_0xc33ec5[0x0][a0_0x5a29('0x519')]],_0x3cab6d=_0x14d6a0||_0x5d9209['relative']['\x20'],_0x3a88b8=_0x14d6a0?0x1:0x0,_0x18233d=_0x25c316(function(_0x11e06f){return _0x11e06f===_0x490b1e;},_0x3cab6d,!0x0),_0x2d28f9=_0x25c316(function(_0x19085b){return _0x2409ad(_0x490b1e,_0x19085b)>-0x1;},_0x3cab6d,!0x0),_0x289e31=[function(_0x21f5fd,_0x245354,_0x4b18fe){var _0xcecc41=!_0x14d6a0&&(_0x4b18fe||_0x245354!==_0x3f23cb)||((_0x490b1e=_0x245354)['nodeType']?_0x18233d(_0x21f5fd,_0x245354,_0x4b18fe):_0x2d28f9(_0x21f5fd,_0x245354,_0x4b18fe));return _0x490b1e=null,_0xcecc41;}];_0x3a88b8<_0x517b64;_0x3a88b8++)if(_0x1ad24e=_0x5d9209[a0_0x5a29('0x1e2')][_0xc33ec5[_0x3a88b8]['type']])_0x289e31=[_0x25c316(_0x446707(_0x289e31),_0x1ad24e)];else{if((_0x1ad24e=_0x5d9209[a0_0x5a29('0x48a')][_0xc33ec5[_0x3a88b8][a0_0x5a29('0x519')]]['apply'](null,_0xc33ec5[_0x3a88b8][a0_0x5a29('0x24a')]))[_0x559d13]){for(_0x68e87f=++_0x3a88b8;_0x68e87f<_0x517b64&&!_0x5d9209[a0_0x5a29('0x1e2')][_0xc33ec5[_0x68e87f]['type']];_0x68e87f++);return _0x971c08(_0x3a88b8>0x1&&_0x446707(_0x289e31),_0x3a88b8>0x1&&_0x1221c7(_0xc33ec5[a0_0x5a29('0x723')](0x0,_0x3a88b8-0x1)[a0_0x5a29('0x6c9')]({'value':'\x20'===_0xc33ec5[_0x3a88b8-0x2]['type']?'*':''}))['replace'](_0x2db4a8,'$1'),_0x1ad24e,_0x3a88b8<_0x68e87f&&_0x535187(_0xc33ec5['slice'](_0x3a88b8,_0x68e87f)),_0x68e87f<_0x517b64&&_0x535187(_0xc33ec5=_0xc33ec5['slice'](_0x68e87f)),_0x68e87f<_0x517b64&&_0x1221c7(_0xc33ec5));}_0x289e31[a0_0x5a29('0x3cd')](_0x1ad24e);}return _0x446707(_0x289e31);}return _0x49166f[a0_0x5a29('0x928')]=_0x5d9209['filters']=_0x5d9209[a0_0x5a29('0x598')],_0x5d9209['setFilters']=new _0x49166f(),_0x413c6e=_0x3934bf[a0_0x5a29('0x578')]=function(_0x5df1e8,_0x2d588e){var _0x2e1cd0,_0x448c5f,_0x34f584,_0x361862,_0x2d5f59,_0x2163ee,_0x46cebd,_0x5912d8=_0x16d165[_0x5df1e8+'\x20'];if(_0x5912d8)return _0x2d588e?0x0:_0x5912d8[a0_0x5a29('0x723')](0x0);for(_0x2d5f59=_0x5df1e8,_0x2163ee=[],_0x46cebd=_0x5d9209['preFilter'];_0x2d5f59;){for(_0x361862 in(_0x2e1cd0&&!(_0x448c5f=_0xf6756c[a0_0x5a29('0x2d5')](_0x2d5f59))||(_0x448c5f&&(_0x2d5f59=_0x2d5f59[a0_0x5a29('0x723')](_0x448c5f[0x0]['length'])||_0x2d5f59),_0x2163ee[a0_0x5a29('0x3cd')](_0x34f584=[])),_0x2e1cd0=!0x1,(_0x448c5f=_0x3a21ad[a0_0x5a29('0x2d5')](_0x2d5f59))&&(_0x2e1cd0=_0x448c5f[a0_0x5a29('0x60e')](),_0x34f584['push']({'value':_0x2e1cd0,'type':_0x448c5f[0x0][a0_0x5a29('0x380')](_0x2db4a8,'\x20')}),_0x2d5f59=_0x2d5f59[a0_0x5a29('0x723')](_0x2e1cd0['length'])),_0x5d9209[a0_0x5a29('0x48a')]))!(_0x448c5f=_0x4b85b1[_0x361862][a0_0x5a29('0x2d5')](_0x2d5f59))||_0x46cebd[_0x361862]&&!(_0x448c5f=_0x46cebd[_0x361862](_0x448c5f))||(_0x2e1cd0=_0x448c5f[a0_0x5a29('0x60e')](),_0x34f584['push']({'value':_0x2e1cd0,'type':_0x361862,'matches':_0x448c5f}),_0x2d5f59=_0x2d5f59[a0_0x5a29('0x723')](_0x2e1cd0[a0_0x5a29('0x515')]));if(!_0x2e1cd0)break;}return _0x2d588e?_0x2d5f59['length']:_0x2d5f59?_0x3934bf[a0_0x5a29('0x8fc')](_0x5df1e8):_0x16d165(_0x5df1e8,_0x2163ee)[a0_0x5a29('0x723')](0x0);},_0x34386c=_0x3934bf[a0_0x5a29('0x1fa')]=function(_0x324114,_0x20d56d){var _0x34d362,_0x3462eb=[],_0x18378b=[],_0xd1738c=_0x2a6c1a[_0x324114+'\x20'];if(!_0xd1738c){for(_0x20d56d||(_0x20d56d=_0x413c6e(_0x324114)),_0x34d362=_0x20d56d[a0_0x5a29('0x515')];_0x34d362--;)(_0xd1738c=_0x535187(_0x20d56d[_0x34d362]))[_0x559d13]?_0x3462eb[a0_0x5a29('0x3cd')](_0xd1738c):_0x18378b[a0_0x5a29('0x3cd')](_0xd1738c);(_0xd1738c=_0x2a6c1a(_0x324114,function(_0x193653,_0x2eb494){var _0x473357=_0x2eb494[a0_0x5a29('0x515')]>0x0,_0x1371dd=_0x193653['length']>0x0,_0x807de=function(_0x3e17d7,_0x1bbf48,_0x34b2d8,_0x1d1baa,_0xd23e27){var _0x414c6d,_0x27edf9,_0x4525b8,_0x374e56=0x0,_0x229b85='0',_0x54e649=_0x3e17d7&&[],_0x1333d5=[],_0x20a90e=_0x3f23cb,_0x176880=_0x3e17d7||_0x1371dd&&_0x5d9209[a0_0x5a29('0x2f0')][a0_0x5a29('0x2d6')]('*',_0xd23e27),_0x382a5f=_0x4a938e+=null==_0x20a90e?0x1:Math['random']()||0.1,_0x45349d=_0x176880[a0_0x5a29('0x515')];for(_0xd23e27&&(_0x3f23cb=_0x1bbf48==_0x224dee||_0x1bbf48||_0xd23e27);_0x229b85!==_0x45349d&&null!=(_0x414c6d=_0x176880[_0x229b85]);_0x229b85++){if(_0x1371dd&&_0x414c6d){for(_0x27edf9=0x0,_0x1bbf48||_0x414c6d['ownerDocument']==_0x224dee||(_0x561a54(_0x414c6d),_0x34b2d8=!_0x832708);_0x4525b8=_0x193653[_0x27edf9++];)if(_0x4525b8(_0x414c6d,_0x1bbf48||_0x224dee,_0x34b2d8)){_0x1d1baa[a0_0x5a29('0x3cd')](_0x414c6d);break;}_0xd23e27&&(_0x4a938e=_0x382a5f);}_0x473357&&((_0x414c6d=!_0x4525b8&&_0x414c6d)&&_0x374e56--,_0x3e17d7&&_0x54e649[a0_0x5a29('0x3cd')](_0x414c6d));}if(_0x374e56+=_0x229b85,_0x473357&&_0x229b85!==_0x374e56){for(_0x27edf9=0x0;_0x4525b8=_0x2eb494[_0x27edf9++];)_0x4525b8(_0x54e649,_0x1333d5,_0x1bbf48,_0x34b2d8);if(_0x3e17d7){if(_0x374e56>0x0)for(;_0x229b85--;)_0x54e649[_0x229b85]||_0x1333d5[_0x229b85]||(_0x1333d5[_0x229b85]=_0x19d5d9[a0_0x5a29('0x351')](_0x1d1baa));_0x1333d5=_0x191c01(_0x1333d5);}_0x2c2948['apply'](_0x1d1baa,_0x1333d5),_0xd23e27&&!_0x3e17d7&&_0x1333d5[a0_0x5a29('0x515')]>0x0&&_0x374e56+_0x2eb494[a0_0x5a29('0x515')]>0x1&&_0x3934bf[a0_0x5a29('0x8a4')](_0x1d1baa);}return _0xd23e27&&(_0x4a938e=_0x382a5f,_0x3f23cb=_0x20a90e),_0x54e649;};return _0x473357?_0x5b357e(_0x807de):_0x807de;}(_0x18378b,_0x3462eb)))['selector']=_0x324114;}return _0xd1738c;},_0x5ce1a9=_0x3934bf[a0_0x5a29('0x325')]=function(_0x52c2c4,_0x2e5f1f,_0x1d0cdb,_0x135ea4){var _0x3912a5,_0x5218e6,_0x42b7b8,_0x254f0a,_0x375516,_0x23b692=a0_0x5a29('0x2ae')==typeof _0x52c2c4&&_0x52c2c4,_0x40f7d7=!_0x135ea4&&_0x413c6e(_0x52c2c4=_0x23b692['selector']||_0x52c2c4);if(_0x1d0cdb=_0x1d0cdb||[],0x1===_0x40f7d7['length']){if((_0x5218e6=_0x40f7d7[0x0]=_0x40f7d7[0x0][a0_0x5a29('0x723')](0x0))['length']>0x2&&'ID'===(_0x42b7b8=_0x5218e6[0x0])[a0_0x5a29('0x519')]&&0x9===_0x2e5f1f[a0_0x5a29('0x23f')]&&_0x832708&&_0x5d9209[a0_0x5a29('0x1e2')][_0x5218e6[0x1][a0_0x5a29('0x519')]]){if(!(_0x2e5f1f=(_0x5d9209[a0_0x5a29('0x2f0')]['ID'](_0x42b7b8[a0_0x5a29('0x24a')][0x0][a0_0x5a29('0x380')](_0x731d1f,_0x437b82),_0x2e5f1f)||[])[0x0]))return _0x1d0cdb;_0x23b692&&(_0x2e5f1f=_0x2e5f1f['parentNode']),_0x52c2c4=_0x52c2c4[a0_0x5a29('0x723')](_0x5218e6[a0_0x5a29('0x60e')]()[a0_0x5a29('0x363')][a0_0x5a29('0x515')]);}for(_0x3912a5=_0x4b85b1[a0_0x5a29('0x5b1')][a0_0x5a29('0x25e')](_0x52c2c4)?0x0:_0x5218e6['length'];_0x3912a5--&&(_0x42b7b8=_0x5218e6[_0x3912a5],!_0x5d9209[a0_0x5a29('0x1e2')][_0x254f0a=_0x42b7b8[a0_0x5a29('0x519')]]);)if((_0x375516=_0x5d9209['find'][_0x254f0a])&&(_0x135ea4=_0x375516(_0x42b7b8['matches'][0x0]['replace'](_0x731d1f,_0x437b82),_0x1332c5[a0_0x5a29('0x25e')](_0x5218e6[0x0]['type'])&&_0x2cb24d(_0x2e5f1f[a0_0x5a29('0x3d5')])||_0x2e5f1f))){if(_0x5218e6[a0_0x5a29('0x250')](_0x3912a5,0x1),!(_0x52c2c4=_0x135ea4[a0_0x5a29('0x515')]&&_0x1221c7(_0x5218e6)))return _0x2c2948['apply'](_0x1d0cdb,_0x135ea4),_0x1d0cdb;break;}}return(_0x23b692||_0x34386c(_0x52c2c4,_0x40f7d7))(_0x135ea4,_0x2e5f1f,!_0x832708,_0x1d0cdb,!_0x2e5f1f||_0x1332c5[a0_0x5a29('0x25e')](_0x52c2c4)&&_0x2cb24d(_0x2e5f1f['parentNode'])||_0x2e5f1f),_0x1d0cdb;},_0x5889c2['sortStable']=_0x559d13[a0_0x5a29('0xc5')]('')['sort'](_0xfd6541)[a0_0x5a29('0x1e9')]('')===_0x559d13,_0x5889c2['detectDuplicates']=!!_0x1a7993,_0x561a54(),_0x5889c2[a0_0x5a29('0x8b3')]=_0x434163(function(_0x3e7c72){return 0x1&_0x3e7c72[a0_0x5a29('0x53b')](_0x224dee[a0_0x5a29('0x56f')](a0_0x5a29('0xd')));}),_0x434163(function(_0x54056b){return _0x54056b[a0_0x5a29('0x13d')]='<a\x20href=\x27#\x27></a>','#'===_0x54056b['firstChild'][a0_0x5a29('0xbd')](a0_0x5a29('0x156'));})||_0x55ddc4(a0_0x5a29('0x88b'),function(_0x36d56f,_0xb52d75,_0x183020){if(!_0x183020)return _0x36d56f[a0_0x5a29('0xbd')](_0xb52d75,a0_0x5a29('0x519')===_0xb52d75[a0_0x5a29('0x792')]()?0x1:0x2);}),_0x5889c2[a0_0x5a29('0x576')]&&_0x434163(function(_0x109212){return _0x109212[a0_0x5a29('0x13d')]='<input/>',_0x109212[a0_0x5a29('0x5a1')][a0_0x5a29('0x773')](a0_0x5a29('0x363'),''),''===_0x109212['firstChild'][a0_0x5a29('0xbd')](a0_0x5a29('0x363'));})||_0x55ddc4(a0_0x5a29('0x363'),function(_0x28f439,_0x1a0a9b,_0x2fdc4a){if(!_0x2fdc4a&&a0_0x5a29('0x889')===_0x28f439[a0_0x5a29('0x63b')][a0_0x5a29('0x792')]())return _0x28f439['defaultValue'];}),_0x434163(function(_0x482e89){return null==_0x482e89[a0_0x5a29('0xbd')](a0_0x5a29('0x316'));})||_0x55ddc4(_0x5b2d0a,function(_0xc11d93,_0x36a72d,_0x67200){var _0x56469f;if(!_0x67200)return!0x0===_0xc11d93[_0x36a72d]?_0x36a72d[a0_0x5a29('0x792')]():(_0x56469f=_0xc11d93[a0_0x5a29('0x6d5')](_0x36a72d))&&_0x56469f['specified']?_0x56469f[a0_0x5a29('0x363')]:null;}),_0x3934bf;}(_0x2c3983);_0xd48b4d[a0_0x5a29('0x2f0')]=_0xce9d72,_0xd48b4d[a0_0x5a29('0x502')]=_0xce9d72['selectors'],_0xd48b4d[a0_0x5a29('0x502')][':']=_0xd48b4d[a0_0x5a29('0x502')][a0_0x5a29('0x598')],_0xd48b4d['uniqueSort']=_0xd48b4d[a0_0x5a29('0x698')]=_0xce9d72[a0_0x5a29('0x8a4')],_0xd48b4d[a0_0x5a29('0x3ce')]=_0xce9d72[a0_0x5a29('0x431')],_0xd48b4d[a0_0x5a29('0x589')]=_0xce9d72['isXML'],_0xd48b4d[a0_0x5a29('0x181')]=_0xce9d72['contains'],_0xd48b4d[a0_0x5a29('0x56c')]=_0xce9d72[a0_0x5a29('0x4a9')];var _0x267b53=function(_0x4af78a,_0x120825,_0x36568d){for(var _0xe5a717=[],_0x3e34ce=void 0x0!==_0x36568d;(_0x4af78a=_0x4af78a[_0x120825])&&0x9!==_0x4af78a['nodeType'];)if(0x1===_0x4af78a[a0_0x5a29('0x23f')]){if(_0x3e34ce&&_0xd48b4d(_0x4af78a)['is'](_0x36568d))break;_0xe5a717['push'](_0x4af78a);}return _0xe5a717;},_0x4bfb07=function(_0x4ca08b,_0x44fc43){for(var _0x42b575=[];_0x4ca08b;_0x4ca08b=_0x4ca08b[a0_0x5a29('0x574')])0x1===_0x4ca08b[a0_0x5a29('0x23f')]&&_0x4ca08b!==_0x44fc43&&_0x42b575[a0_0x5a29('0x3cd')](_0x4ca08b);return _0x42b575;},_0x51990b=_0xd48b4d[a0_0x5a29('0x502')][a0_0x5a29('0x7c0')]['needsContext'];function _0x2aac73(_0x537eae,_0x32aa34){return _0x537eae[a0_0x5a29('0x63b')]&&_0x537eae[a0_0x5a29('0x63b')][a0_0x5a29('0x792')]()===_0x32aa34[a0_0x5a29('0x792')]();}var _0xb4aed=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function _0x3992de(_0xfb1149,_0x5d99ba,_0x2953ed){return _0x3512f3(_0x5d99ba)?_0xd48b4d[a0_0x5a29('0x522')](_0xfb1149,function(_0x210470,_0x1378cb){return!!_0x5d99ba['call'](_0x210470,_0x1378cb,_0x210470)!==_0x2953ed;}):_0x5d99ba[a0_0x5a29('0x23f')]?_0xd48b4d[a0_0x5a29('0x522')](_0xfb1149,function(_0x5970cd){return _0x5970cd===_0x5d99ba!==_0x2953ed;}):'string'!=typeof _0x5d99ba?_0xd48b4d[a0_0x5a29('0x522')](_0xfb1149,function(_0x13b827){return _0x3f3faf[a0_0x5a29('0x351')](_0x5d99ba,_0x13b827)>-0x1!==_0x2953ed;}):_0xd48b4d[a0_0x5a29('0x48a')](_0x5d99ba,_0xfb1149,_0x2953ed);}_0xd48b4d['filter']=function(_0x2bc265,_0x25ea92,_0x2f221e){var _0x761b1e=_0x25ea92[0x0];return _0x2f221e&&(_0x2bc265=a0_0x5a29('0x1d5')+_0x2bc265+')'),0x1===_0x25ea92[a0_0x5a29('0x515')]&&0x1===_0x761b1e[a0_0x5a29('0x23f')]?_0xd48b4d[a0_0x5a29('0x2f0')][a0_0x5a29('0x3d7')](_0x761b1e,_0x2bc265)?[_0x761b1e]:[]:_0xd48b4d['find']['matches'](_0x2bc265,_0xd48b4d[a0_0x5a29('0x522')](_0x25ea92,function(_0x2140bd){return 0x1===_0x2140bd['nodeType'];}));},_0xd48b4d['fn']['extend']({'find':function(_0x14173f){var _0x5c62b9,_0x238906,_0xa7b6bc=this[a0_0x5a29('0x515')],_0x5b14c8=this;if(a0_0x5a29('0x783')!=typeof _0x14173f)return this[a0_0x5a29('0x54b')](_0xd48b4d(_0x14173f)['filter'](function(){for(_0x5c62b9=0x0;_0x5c62b9<_0xa7b6bc;_0x5c62b9++)if(_0xd48b4d['contains'](_0x5b14c8[_0x5c62b9],this))return!0x0;}));for(_0x238906=this['pushStack']([]),_0x5c62b9=0x0;_0x5c62b9<_0xa7b6bc;_0x5c62b9++)_0xd48b4d[a0_0x5a29('0x2f0')](_0x14173f,_0x5b14c8[_0x5c62b9],_0x238906);return _0xa7b6bc>0x1?_0xd48b4d[a0_0x5a29('0x8a4')](_0x238906):_0x238906;},'filter':function(_0x5b5a04){return this['pushStack'](_0x3992de(this,_0x5b5a04||[],!0x1));},'not':function(_0x8dc458){return this[a0_0x5a29('0x54b')](_0x3992de(this,_0x8dc458||[],!0x0));},'is':function(_0x315a40){return!!_0x3992de(this,'string'==typeof _0x315a40&&_0x51990b[a0_0x5a29('0x25e')](_0x315a40)?_0xd48b4d(_0x315a40):_0x315a40||[],!0x1)[a0_0x5a29('0x515')];}});var _0xad269f,_0x5af63c=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_0xd48b4d['fn'][a0_0x5a29('0x1ac')]=function(_0x397368,_0x43cdaf,_0x4a97ac){var _0x2db9b8,_0x252f41;if(!_0x397368)return this;if(_0x4a97ac=_0x4a97ac||_0xad269f,a0_0x5a29('0x783')==typeof _0x397368){if(!(_0x2db9b8='<'===_0x397368[0x0]&&'>'===_0x397368[_0x397368[a0_0x5a29('0x515')]-0x1]&&_0x397368[a0_0x5a29('0x515')]>=0x3?[null,_0x397368,null]:_0x5af63c[a0_0x5a29('0x2d5')](_0x397368))||!_0x2db9b8[0x1]&&_0x43cdaf)return!_0x43cdaf||_0x43cdaf[a0_0x5a29('0x904')]?(_0x43cdaf||_0x4a97ac)[a0_0x5a29('0x2f0')](_0x397368):this[a0_0x5a29('0x825')](_0x43cdaf)['find'](_0x397368);if(_0x2db9b8[0x1]){if(_0x43cdaf=_0x43cdaf instanceof _0xd48b4d?_0x43cdaf[0x0]:_0x43cdaf,_0xd48b4d['merge'](this,_0xd48b4d[a0_0x5a29('0x74a')](_0x2db9b8[0x1],_0x43cdaf&&_0x43cdaf['nodeType']?_0x43cdaf[a0_0x5a29('0x23b')]||_0x43cdaf:_0x45f8a9,!0x0)),_0xb4aed[a0_0x5a29('0x25e')](_0x2db9b8[0x1])&&_0xd48b4d[a0_0x5a29('0x495')](_0x43cdaf))for(_0x2db9b8 in _0x43cdaf)_0x3512f3(this[_0x2db9b8])?this[_0x2db9b8](_0x43cdaf[_0x2db9b8]):this[a0_0x5a29('0x5c6')](_0x2db9b8,_0x43cdaf[_0x2db9b8]);return this;}return(_0x252f41=_0x45f8a9['getElementById'](_0x2db9b8[0x2]))&&(this[0x0]=_0x252f41,this[a0_0x5a29('0x515')]=0x1),this;}return _0x397368['nodeType']?(this[0x0]=_0x397368,this[a0_0x5a29('0x515')]=0x1,this):_0x3512f3(_0x397368)?void 0x0!==_0x4a97ac['ready']?_0x4a97ac[a0_0x5a29('0x3d')](_0x397368):_0x397368(_0xd48b4d):_0xd48b4d[a0_0x5a29('0xda')](_0x397368,this);})['prototype']=_0xd48b4d['fn'],_0xad269f=_0xd48b4d(_0x45f8a9);var _0x3f08f5=/^(?:parents|prev(?:Until|All))/,_0x1876f4={'children':!0x0,'contents':!0x0,'next':!0x0,'prev':!0x0};function _0x2916e4(_0x2a3f9b,_0x22eecc){for(;(_0x2a3f9b=_0x2a3f9b[_0x22eecc])&&0x1!==_0x2a3f9b[a0_0x5a29('0x23f')];);return _0x2a3f9b;}_0xd48b4d['fn']['extend']({'has':function(_0x2ba52b){var _0x23febf=_0xd48b4d(_0x2ba52b,this),_0x2c33ec=_0x23febf[a0_0x5a29('0x515')];return this['filter'](function(){for(var _0x560b82=0x0;_0x560b82<_0x2c33ec;_0x560b82++)if(_0xd48b4d['contains'](this,_0x23febf[_0x560b82]))return!0x0;});},'closest':function(_0x52a175,_0xaadaed){var _0x884c1a,_0x52c03a=0x0,_0x2811b1=this[a0_0x5a29('0x515')],_0xc90c83=[],_0x37fc83=a0_0x5a29('0x783')!=typeof _0x52a175&&_0xd48b4d(_0x52a175);if(!_0x51990b[a0_0x5a29('0x25e')](_0x52a175))for(;_0x52c03a<_0x2811b1;_0x52c03a++)for(_0x884c1a=this[_0x52c03a];_0x884c1a&&_0x884c1a!==_0xaadaed;_0x884c1a=_0x884c1a[a0_0x5a29('0x3d5')])if(_0x884c1a['nodeType']<0xb&&(_0x37fc83?_0x37fc83[a0_0x5a29('0x26e')](_0x884c1a)>-0x1:0x1===_0x884c1a[a0_0x5a29('0x23f')]&&_0xd48b4d[a0_0x5a29('0x2f0')][a0_0x5a29('0x3d7')](_0x884c1a,_0x52a175))){_0xc90c83[a0_0x5a29('0x3cd')](_0x884c1a);break;}return this['pushStack'](_0xc90c83[a0_0x5a29('0x515')]>0x1?_0xd48b4d[a0_0x5a29('0x8a4')](_0xc90c83):_0xc90c83);},'index':function(_0x4925ef){return _0x4925ef?a0_0x5a29('0x783')==typeof _0x4925ef?_0x3f3faf[a0_0x5a29('0x351')](_0xd48b4d(_0x4925ef),this[0x0]):_0x3f3faf[a0_0x5a29('0x351')](this,_0x4925ef[a0_0x5a29('0x904')]?_0x4925ef[0x0]:_0x4925ef):this[0x0]&&this[0x0][a0_0x5a29('0x3d5')]?this[a0_0x5a29('0x545')]()[a0_0x5a29('0x530')]()[a0_0x5a29('0x515')]:-0x1;},'add':function(_0x3995bd,_0x3883a7){return this[a0_0x5a29('0x54b')](_0xd48b4d[a0_0x5a29('0x8a4')](_0xd48b4d[a0_0x5a29('0x65f')](this[a0_0x5a29('0x1e')](),_0xd48b4d(_0x3995bd,_0x3883a7))));},'addBack':function(_0x156632){return this[a0_0x5a29('0x695')](null==_0x156632?this[a0_0x5a29('0x798')]:this[a0_0x5a29('0x798')][a0_0x5a29('0x48a')](_0x156632));}}),_0xd48b4d['each']({'parent':function(_0x52a195){var _0x29dd3e=_0x52a195[a0_0x5a29('0x3d5')];return _0x29dd3e&&0xb!==_0x29dd3e[a0_0x5a29('0x23f')]?_0x29dd3e:null;},'parents':function(_0x2a2139){return _0x267b53(_0x2a2139,a0_0x5a29('0x3d5'));},'parentsUntil':function(_0x1f9832,_0x505437,_0x2afe1b){return _0x267b53(_0x1f9832,a0_0x5a29('0x3d5'),_0x2afe1b);},'next':function(_0x167eb6){return _0x2916e4(_0x167eb6,a0_0x5a29('0x574'));},'prev':function(_0x22aa04){return _0x2916e4(_0x22aa04,a0_0x5a29('0x6e6'));},'nextAll':function(_0x5238cd){return _0x267b53(_0x5238cd,'nextSibling');},'prevAll':function(_0x350503){return _0x267b53(_0x350503,a0_0x5a29('0x6e6'));},'nextUntil':function(_0x45fe54,_0x2cea4a,_0x38afba){return _0x267b53(_0x45fe54,a0_0x5a29('0x574'),_0x38afba);},'prevUntil':function(_0x1ca3bd,_0x53f1ca,_0x16aa5b){return _0x267b53(_0x1ca3bd,a0_0x5a29('0x6e6'),_0x16aa5b);},'siblings':function(_0x1e34ff){return _0x4bfb07((_0x1e34ff['parentNode']||{})[a0_0x5a29('0x5a1')],_0x1e34ff);},'children':function(_0x33e49b){return _0x4bfb07(_0x33e49b['firstChild']);},'contents':function(_0x4b8b17){return null!=_0x4b8b17[a0_0x5a29('0x47f')]&&_0x4a396a(_0x4b8b17[a0_0x5a29('0x47f')])?_0x4b8b17[a0_0x5a29('0x47f')]:(_0x2aac73(_0x4b8b17,a0_0x5a29('0x1f4'))&&(_0x4b8b17=_0x4b8b17[a0_0x5a29('0x7da')]||_0x4b8b17),_0xd48b4d[a0_0x5a29('0x65f')]([],_0x4b8b17['childNodes']));}},function(_0x59d904,_0x7a8eee){_0xd48b4d['fn'][_0x59d904]=function(_0x11f374,_0x5bf909){var _0x7aae08=_0xd48b4d[a0_0x5a29('0x95a')](this,_0x7a8eee,_0x11f374);return a0_0x5a29('0x526')!==_0x59d904[a0_0x5a29('0x723')](-0x5)&&(_0x5bf909=_0x11f374),_0x5bf909&&a0_0x5a29('0x783')==typeof _0x5bf909&&(_0x7aae08=_0xd48b4d[a0_0x5a29('0x48a')](_0x5bf909,_0x7aae08)),this['length']>0x1&&(_0x1876f4[_0x59d904]||_0xd48b4d[a0_0x5a29('0x8a4')](_0x7aae08),_0x3f08f5[a0_0x5a29('0x25e')](_0x59d904)&&_0x7aae08[a0_0x5a29('0x39e')]()),this[a0_0x5a29('0x54b')](_0x7aae08);};});var _0x35c17c=/[^\x20\t\r\n\f]+/g;function _0x4db8c7(_0x3be0b8){return _0x3be0b8;}function _0x7507be(_0x395c71){throw _0x395c71;}function _0x365bd8(_0x327e4d,_0x2cc11a,_0x8e74ab,_0x57d667){var _0x5291d7;try{_0x327e4d&&_0x3512f3(_0x5291d7=_0x327e4d['promise'])?_0x5291d7['call'](_0x327e4d)[a0_0x5a29('0x610')](_0x2cc11a)[a0_0x5a29('0x255')](_0x8e74ab):_0x327e4d&&_0x3512f3(_0x5291d7=_0x327e4d[a0_0x5a29('0x618')])?_0x5291d7['call'](_0x327e4d,_0x2cc11a,_0x8e74ab):_0x2cc11a[a0_0x5a29('0x758')](void 0x0,[_0x327e4d][a0_0x5a29('0x723')](_0x57d667));}catch(_0x17c6ff){_0x8e74ab[a0_0x5a29('0x758')](void 0x0,[_0x17c6ff]);}}_0xd48b4d[a0_0x5a29('0xf8')]=function(_0x5794dd){_0x5794dd=a0_0x5a29('0x783')==typeof _0x5794dd?function(_0x67fb01){var _0x222768={};return _0xd48b4d[a0_0x5a29('0x6bc')](_0x67fb01['match'](_0x35c17c)||[],function(_0x299783,_0x3c5f4c){_0x222768[_0x3c5f4c]=!0x0;}),_0x222768;}(_0x5794dd):_0xd48b4d[a0_0x5a29('0x630')]({},_0x5794dd);var _0x5c300f,_0x341c12,_0x4fa5bc,_0xa9d6ad,_0x1751bb=[],_0x10ee2b=[],_0xef43cf=-0x1,_0x4306f3=function(){for(_0xa9d6ad=_0xa9d6ad||_0x5794dd[a0_0x5a29('0x806')],_0x4fa5bc=_0x5c300f=!0x0;_0x10ee2b[a0_0x5a29('0x515')];_0xef43cf=-0x1)for(_0x341c12=_0x10ee2b['shift']();++_0xef43cf<_0x1751bb[a0_0x5a29('0x515')];)!0x1===_0x1751bb[_0xef43cf]['apply'](_0x341c12[0x0],_0x341c12[0x1])&&_0x5794dd['stopOnFalse']&&(_0xef43cf=_0x1751bb[a0_0x5a29('0x515')],_0x341c12=!0x1);_0x5794dd[a0_0x5a29('0x10')]||(_0x341c12=!0x1),_0x5c300f=!0x1,_0xa9d6ad&&(_0x1751bb=_0x341c12?[]:'');},_0x42672b={'add':function(){return _0x1751bb&&(_0x341c12&&!_0x5c300f&&(_0xef43cf=_0x1751bb['length']-0x1,_0x10ee2b[a0_0x5a29('0x3cd')](_0x341c12)),function _0x218e2a(_0x4c7147){_0xd48b4d[a0_0x5a29('0x6bc')](_0x4c7147,function(_0x4fa793,_0x537821){_0x3512f3(_0x537821)?_0x5794dd[a0_0x5a29('0x698')]&&_0x42672b['has'](_0x537821)||_0x1751bb['push'](_0x537821):_0x537821&&_0x537821[a0_0x5a29('0x515')]&&a0_0x5a29('0x783')!==_0x5c303c(_0x537821)&&_0x218e2a(_0x537821);});}(arguments),_0x341c12&&!_0x5c300f&&_0x4306f3()),this;},'remove':function(){return _0xd48b4d[a0_0x5a29('0x6bc')](arguments,function(_0x1b609a,_0xef6e4d){for(var _0x1873be;(_0x1873be=_0xd48b4d[a0_0x5a29('0x3f8')](_0xef6e4d,_0x1751bb,_0x1873be))>-0x1;)_0x1751bb[a0_0x5a29('0x250')](_0x1873be,0x1),_0x1873be<=_0xef43cf&&_0xef43cf--;}),this;},'has':function(_0x5238d7){return _0x5238d7?_0xd48b4d['inArray'](_0x5238d7,_0x1751bb)>-0x1:_0x1751bb[a0_0x5a29('0x515')]>0x0;},'empty':function(){return _0x1751bb&&(_0x1751bb=[]),this;},'disable':function(){return _0xa9d6ad=_0x10ee2b=[],_0x1751bb=_0x341c12='',this;},'disabled':function(){return!_0x1751bb;},'lock':function(){return _0xa9d6ad=_0x10ee2b=[],_0x341c12||_0x5c300f||(_0x1751bb=_0x341c12=''),this;},'locked':function(){return!!_0xa9d6ad;},'fireWith':function(_0x513b59,_0x2ef9a0){return _0xa9d6ad||(_0x2ef9a0=[_0x513b59,(_0x2ef9a0=_0x2ef9a0||[])[a0_0x5a29('0x723')]?_0x2ef9a0['slice']():_0x2ef9a0],_0x10ee2b[a0_0x5a29('0x3cd')](_0x2ef9a0),_0x5c300f||_0x4306f3()),this;},'fire':function(){return _0x42672b[a0_0x5a29('0x54c')](this,arguments),this;},'fired':function(){return!!_0x4fa5bc;}};return _0x42672b;},_0xd48b4d['extend']({'Deferred':function(_0x45d26c){var _0x196acb=[[a0_0x5a29('0x5b4'),a0_0x5a29('0x45b'),_0xd48b4d[a0_0x5a29('0xf8')]('memory'),_0xd48b4d['Callbacks'](a0_0x5a29('0x10')),0x2],[a0_0x5a29('0x87'),a0_0x5a29('0x610'),_0xd48b4d['Callbacks'](a0_0x5a29('0x3d2')),_0xd48b4d[a0_0x5a29('0xf8')](a0_0x5a29('0x3d2')),0x0,a0_0x5a29('0x8d6')],[a0_0x5a29('0x7f9'),a0_0x5a29('0x255'),_0xd48b4d['Callbacks'](a0_0x5a29('0x3d2')),_0xd48b4d[a0_0x5a29('0xf8')]('once\x20memory'),0x1,a0_0x5a29('0x38f')]],_0x41af33=a0_0x5a29('0x293'),_0x5cd43a={'state':function(){return _0x41af33;},'always':function(){return _0x566813[a0_0x5a29('0x610')](arguments)[a0_0x5a29('0x255')](arguments),this;},'catch':function(_0x24a5f0){return _0x5cd43a['then'](null,_0x24a5f0);},'pipe':function(){var _0x265bf0=arguments;return _0xd48b4d[a0_0x5a29('0x1bd')](function(_0x5873b2){_0xd48b4d['each'](_0x196acb,function(_0x41a72b,_0x62f8a8){var _0x33cca6=_0x3512f3(_0x265bf0[_0x62f8a8[0x4]])&&_0x265bf0[_0x62f8a8[0x4]];_0x566813[_0x62f8a8[0x1]](function(){var _0x192a4f=_0x33cca6&&_0x33cca6[a0_0x5a29('0x758')](this,arguments);_0x192a4f&&_0x3512f3(_0x192a4f['promise'])?_0x192a4f['promise']()[a0_0x5a29('0x45b')](_0x5873b2[a0_0x5a29('0x5b4')])[a0_0x5a29('0x610')](_0x5873b2['resolve'])['fail'](_0x5873b2['reject']):_0x5873b2[_0x62f8a8[0x0]+a0_0x5a29('0x60')](this,_0x33cca6?[_0x192a4f]:arguments);});}),_0x265bf0=null;})[a0_0x5a29('0x743')]();},'then':function(_0x1d026c,_0x3336e7,_0x4ee2ac){var _0x355041=0x0;function _0x237295(_0xbcb91b,_0x5b4706,_0x15c229,_0x11a9d0){return function(){var _0x45f2b1=this,_0x26b2d2=arguments,_0x270378=function(){var _0x292962,_0x859650;if(!(_0xbcb91b<_0x355041)){if((_0x292962=_0x15c229[a0_0x5a29('0x758')](_0x45f2b1,_0x26b2d2))===_0x5b4706[a0_0x5a29('0x743')]())throw new TypeError(a0_0x5a29('0x6f8'));_0x859650=_0x292962&&('object'==typeof _0x292962||a0_0x5a29('0x2ae')==typeof _0x292962)&&_0x292962['then'],_0x3512f3(_0x859650)?_0x11a9d0?_0x859650['call'](_0x292962,_0x237295(_0x355041,_0x5b4706,_0x4db8c7,_0x11a9d0),_0x237295(_0x355041,_0x5b4706,_0x7507be,_0x11a9d0)):(_0x355041++,_0x859650[a0_0x5a29('0x351')](_0x292962,_0x237295(_0x355041,_0x5b4706,_0x4db8c7,_0x11a9d0),_0x237295(_0x355041,_0x5b4706,_0x7507be,_0x11a9d0),_0x237295(_0x355041,_0x5b4706,_0x4db8c7,_0x5b4706[a0_0x5a29('0x47')]))):(_0x15c229!==_0x4db8c7&&(_0x45f2b1=void 0x0,_0x26b2d2=[_0x292962]),(_0x11a9d0||_0x5b4706['resolveWith'])(_0x45f2b1,_0x26b2d2));}},_0x261605=_0x11a9d0?_0x270378:function(){try{_0x270378();}catch(_0x38ebc5){_0xd48b4d['Deferred']['exceptionHook']&&_0xd48b4d[a0_0x5a29('0x1bd')][a0_0x5a29('0x474')](_0x38ebc5,_0x261605['stackTrace']),_0xbcb91b+0x1>=_0x355041&&(_0x15c229!==_0x7507be&&(_0x45f2b1=void 0x0,_0x26b2d2=[_0x38ebc5]),_0x5b4706[a0_0x5a29('0x514')](_0x45f2b1,_0x26b2d2));}};_0xbcb91b?_0x261605():(_0xd48b4d[a0_0x5a29('0x1bd')]['getStackHook']&&(_0x261605[a0_0x5a29('0x795')]=_0xd48b4d[a0_0x5a29('0x1bd')][a0_0x5a29('0x242')]()),_0x2c3983[a0_0x5a29('0x60d')](_0x261605));};}return _0xd48b4d[a0_0x5a29('0x1bd')](function(_0x2d7eac){_0x196acb[0x0][0x3][a0_0x5a29('0x695')](_0x237295(0x0,_0x2d7eac,_0x3512f3(_0x4ee2ac)?_0x4ee2ac:_0x4db8c7,_0x2d7eac['notifyWith'])),_0x196acb[0x1][0x3][a0_0x5a29('0x695')](_0x237295(0x0,_0x2d7eac,_0x3512f3(_0x1d026c)?_0x1d026c:_0x4db8c7)),_0x196acb[0x2][0x3][a0_0x5a29('0x695')](_0x237295(0x0,_0x2d7eac,_0x3512f3(_0x3336e7)?_0x3336e7:_0x7507be));})[a0_0x5a29('0x743')]();},'promise':function(_0x24a8a7){return null!=_0x24a8a7?_0xd48b4d[a0_0x5a29('0x630')](_0x24a8a7,_0x5cd43a):_0x5cd43a;}},_0x566813={};return _0xd48b4d[a0_0x5a29('0x6bc')](_0x196acb,function(_0x4509c1,_0x314743){var _0x9a5609=_0x314743[0x2],_0x26de49=_0x314743[0x5];_0x5cd43a[_0x314743[0x1]]=_0x9a5609[a0_0x5a29('0x695')],_0x26de49&&_0x9a5609['add'](function(){_0x41af33=_0x26de49;},_0x196acb[0x3-_0x4509c1][0x2][a0_0x5a29('0x8f6')],_0x196acb[0x3-_0x4509c1][0x3]['disable'],_0x196acb[0x0][0x2]['lock'],_0x196acb[0x0][0x3][a0_0x5a29('0x8b9')]),_0x9a5609[a0_0x5a29('0x695')](_0x314743[0x3][a0_0x5a29('0x93a')]),_0x566813[_0x314743[0x0]]=function(){return _0x566813[_0x314743[0x0]+a0_0x5a29('0x60')](this===_0x566813?void 0x0:this,arguments),this;},_0x566813[_0x314743[0x0]+'With']=_0x9a5609[a0_0x5a29('0x54c')];}),_0x5cd43a[a0_0x5a29('0x743')](_0x566813),_0x45d26c&&_0x45d26c[a0_0x5a29('0x351')](_0x566813,_0x566813),_0x566813;},'when':function(_0x4bf6bd){var _0x26e96b=arguments[a0_0x5a29('0x515')],_0x55ed37=_0x26e96b,_0x5cf8bf=Array(_0x55ed37),_0x3022dd=_0xbd54eb[a0_0x5a29('0x351')](arguments),_0x272869=_0xd48b4d[a0_0x5a29('0x1bd')](),_0x485cc2=function(_0x5ded07){return function(_0x199a46){_0x5cf8bf[_0x5ded07]=this,_0x3022dd[_0x5ded07]=arguments['length']>0x1?_0xbd54eb['call'](arguments):_0x199a46,--_0x26e96b||_0x272869[a0_0x5a29('0x17c')](_0x5cf8bf,_0x3022dd);};};if(_0x26e96b<=0x1&&(_0x365bd8(_0x4bf6bd,_0x272869[a0_0x5a29('0x610')](_0x485cc2(_0x55ed37))[a0_0x5a29('0x87')],_0x272869[a0_0x5a29('0x7f9')],!_0x26e96b),a0_0x5a29('0x293')===_0x272869[a0_0x5a29('0x5dd')]()||_0x3512f3(_0x3022dd[_0x55ed37]&&_0x3022dd[_0x55ed37][a0_0x5a29('0x618')])))return _0x272869[a0_0x5a29('0x618')]();for(;_0x55ed37--;)_0x365bd8(_0x3022dd[_0x55ed37],_0x485cc2(_0x55ed37),_0x272869[a0_0x5a29('0x7f9')]);return _0x272869[a0_0x5a29('0x743')]();}});var _0x2cfd75=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_0xd48b4d['Deferred'][a0_0x5a29('0x474')]=function(_0x5a411c,_0x4dc041){_0x2c3983[a0_0x5a29('0x39a')]&&_0x2c3983[a0_0x5a29('0x39a')][a0_0x5a29('0xe5')]&&_0x5a411c&&_0x2cfd75[a0_0x5a29('0x25e')](_0x5a411c[a0_0x5a29('0x775')])&&_0x2c3983['console'][a0_0x5a29('0xe5')]('jQuery.Deferred\x20exception:\x20'+_0x5a411c[a0_0x5a29('0x452')],_0x5a411c[a0_0x5a29('0x5e')],_0x4dc041);},_0xd48b4d[a0_0x5a29('0xdc')]=function(_0xe7cbd9){_0x2c3983[a0_0x5a29('0x60d')](function(){throw _0xe7cbd9;});};var _0x107e9f=_0xd48b4d[a0_0x5a29('0x1bd')]();function _0x1e8091(){_0x45f8a9['removeEventListener'](a0_0x5a29('0x52e'),_0x1e8091),_0x2c3983[a0_0x5a29('0x892')](a0_0x5a29('0x597'),_0x1e8091),_0xd48b4d[a0_0x5a29('0x3d')]();}_0xd48b4d['fn'][a0_0x5a29('0x3d')]=function(_0x5f3b5b){return _0x107e9f['then'](_0x5f3b5b)[a0_0x5a29('0x5a6')](function(_0x11aeaa){_0xd48b4d[a0_0x5a29('0xdc')](_0x11aeaa);}),this;},_0xd48b4d['extend']({'isReady':!0x1,'readyWait':0x1,'ready':function(_0x455ed2){(!0x0===_0x455ed2?--_0xd48b4d[a0_0x5a29('0x3e8')]:_0xd48b4d[a0_0x5a29('0x175')])||(_0xd48b4d[a0_0x5a29('0x175')]=!0x0,!0x0!==_0x455ed2&&--_0xd48b4d['readyWait']>0x0||_0x107e9f['resolveWith'](_0x45f8a9,[_0xd48b4d]));}}),_0xd48b4d[a0_0x5a29('0x3d')][a0_0x5a29('0x618')]=_0x107e9f[a0_0x5a29('0x618')],a0_0x5a29('0x760')===_0x45f8a9[a0_0x5a29('0x8d4')]||a0_0x5a29('0x71b')!==_0x45f8a9[a0_0x5a29('0x8d4')]&&!_0x45f8a9[a0_0x5a29('0x937')]['doScroll']?_0x2c3983[a0_0x5a29('0x60d')](_0xd48b4d[a0_0x5a29('0x3d')]):(_0x45f8a9[a0_0x5a29('0x464')](a0_0x5a29('0x52e'),_0x1e8091),_0x2c3983[a0_0x5a29('0x464')](a0_0x5a29('0x597'),_0x1e8091));var _0x3a4acb=function(_0xe6709a,_0x44a3e9,_0x2680f7,_0x82bb91,_0x41a9ac,_0x5d5754,_0xd95196){var _0x2a6b9f=0x0,_0x3377cd=_0xe6709a[a0_0x5a29('0x515')],_0x516b43=null==_0x2680f7;if(a0_0x5a29('0x950')===_0x5c303c(_0x2680f7))for(_0x2a6b9f in(_0x41a9ac=!0x0,_0x2680f7))_0x3a4acb(_0xe6709a,_0x44a3e9,_0x2a6b9f,_0x2680f7[_0x2a6b9f],!0x0,_0x5d5754,_0xd95196);else{if(void 0x0!==_0x82bb91&&(_0x41a9ac=!0x0,_0x3512f3(_0x82bb91)||(_0xd95196=!0x0),_0x516b43&&(_0xd95196?(_0x44a3e9[a0_0x5a29('0x351')](_0xe6709a,_0x82bb91),_0x44a3e9=null):(_0x516b43=_0x44a3e9,_0x44a3e9=function(_0x2f388d,_0x5c70bb,_0xa14abc){return _0x516b43['call'](_0xd48b4d(_0x2f388d),_0xa14abc);})),_0x44a3e9))for(;_0x2a6b9f<_0x3377cd;_0x2a6b9f++)_0x44a3e9(_0xe6709a[_0x2a6b9f],_0x2680f7,_0xd95196?_0x82bb91:_0x82bb91['call'](_0xe6709a[_0x2a6b9f],_0x2a6b9f,_0x44a3e9(_0xe6709a[_0x2a6b9f],_0x2680f7)));}return _0x41a9ac?_0xe6709a:_0x516b43?_0x44a3e9[a0_0x5a29('0x351')](_0xe6709a):_0x3377cd?_0x44a3e9(_0xe6709a[0x0],_0x2680f7):_0x5d5754;},_0x51d87f=/^-ms-/,_0x13d6a5=/-([a-z])/g;function _0x47a3b7(_0x594010,_0x1d574d){return _0x1d574d[a0_0x5a29('0x3cf')]();}function _0x65089b(_0x289cb6){return _0x289cb6[a0_0x5a29('0x380')](_0x51d87f,a0_0x5a29('0x42'))[a0_0x5a29('0x380')](_0x13d6a5,_0x47a3b7);}var _0x12d87f=function(_0xbbedaf){return 0x1===_0xbbedaf['nodeType']||0x9===_0xbbedaf[a0_0x5a29('0x23f')]||!+_0xbbedaf[a0_0x5a29('0x23f')];};function _0xa8ae1d(){this[a0_0x5a29('0x385')]=_0xd48b4d[a0_0x5a29('0x385')]+_0xa8ae1d[a0_0x5a29('0x3de')]++;}_0xa8ae1d[a0_0x5a29('0x3de')]=0x1,_0xa8ae1d['prototype']={'cache':function(_0x1e20d5){var _0x15346d=_0x1e20d5[this['expando']];return _0x15346d||(_0x15346d={},_0x12d87f(_0x1e20d5)&&(_0x1e20d5['nodeType']?_0x1e20d5[this[a0_0x5a29('0x385')]]=_0x15346d:Object[a0_0x5a29('0xe7')](_0x1e20d5,this['expando'],{'value':_0x15346d,'configurable':!0x0}))),_0x15346d;},'set':function(_0x3f7542,_0x4b94e4,_0x192b3f){var _0x3e06ed,_0x5e6af1=this[a0_0x5a29('0x3f')](_0x3f7542);if('string'==typeof _0x4b94e4)_0x5e6af1[_0x65089b(_0x4b94e4)]=_0x192b3f;else for(_0x3e06ed in _0x4b94e4)_0x5e6af1[_0x65089b(_0x3e06ed)]=_0x4b94e4[_0x3e06ed];return _0x5e6af1;},'get':function(_0x22b61e,_0x283c6a){return void 0x0===_0x283c6a?this[a0_0x5a29('0x3f')](_0x22b61e):_0x22b61e[this[a0_0x5a29('0x385')]]&&_0x22b61e[this[a0_0x5a29('0x385')]][_0x65089b(_0x283c6a)];},'access':function(_0xac8023,_0x1bd5a2,_0x365e9a){return void 0x0===_0x1bd5a2||_0x1bd5a2&&a0_0x5a29('0x783')==typeof _0x1bd5a2&&void 0x0===_0x365e9a?this[a0_0x5a29('0x1e')](_0xac8023,_0x1bd5a2):(this[a0_0x5a29('0x2c8')](_0xac8023,_0x1bd5a2,_0x365e9a),void 0x0!==_0x365e9a?_0x365e9a:_0x1bd5a2);},'remove':function(_0x306b26,_0x206a90){var _0x16cbed,_0xbe0e59=_0x306b26[this[a0_0x5a29('0x385')]];if(void 0x0!==_0xbe0e59){if(void 0x0!==_0x206a90){_0x16cbed=(_0x206a90=Array[a0_0x5a29('0x7aa')](_0x206a90)?_0x206a90[a0_0x5a29('0x95a')](_0x65089b):(_0x206a90=_0x65089b(_0x206a90))in _0xbe0e59?[_0x206a90]:_0x206a90[a0_0x5a29('0x7c0')](_0x35c17c)||[])[a0_0x5a29('0x515')];for(;_0x16cbed--;)delete _0xbe0e59[_0x206a90[_0x16cbed]];}(void 0x0===_0x206a90||_0xd48b4d['isEmptyObject'](_0xbe0e59))&&(_0x306b26[a0_0x5a29('0x23f')]?_0x306b26[this[a0_0x5a29('0x385')]]=void 0x0:delete _0x306b26[this[a0_0x5a29('0x385')]]);}},'hasData':function(_0x213a69){var _0x4b02f5=_0x213a69[this[a0_0x5a29('0x385')]];return void 0x0!==_0x4b02f5&&!_0xd48b4d['isEmptyObject'](_0x4b02f5);}};var _0x369848=new _0xa8ae1d(),_0x4834de=new _0xa8ae1d(),_0x3ec214=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_0x368ebe=/[A-Z]/g;function _0x3e818e(_0x520aac,_0x57c0e2,_0x31f96f){var _0x54f737;if(void 0x0===_0x31f96f&&0x1===_0x520aac[a0_0x5a29('0x23f')]){if(_0x54f737=a0_0x5a29('0x585')+_0x57c0e2[a0_0x5a29('0x380')](_0x368ebe,a0_0x5a29('0x3c5'))[a0_0x5a29('0x792')](),a0_0x5a29('0x783')==typeof(_0x31f96f=_0x520aac[a0_0x5a29('0xbd')](_0x54f737))){try{_0x31f96f=function(_0x16b33f){return a0_0x5a29('0x1a3')===_0x16b33f||a0_0x5a29('0xd2')!==_0x16b33f&&(a0_0x5a29('0x66d')===_0x16b33f?null:_0x16b33f===+_0x16b33f+''?+_0x16b33f:_0x3ec214['test'](_0x16b33f)?JSON['parse'](_0x16b33f):_0x16b33f);}(_0x31f96f);}catch(_0x5dce19){}_0x4834de[a0_0x5a29('0x2c8')](_0x520aac,_0x57c0e2,_0x31f96f);}else _0x31f96f=void 0x0;}return _0x31f96f;}_0xd48b4d[a0_0x5a29('0x630')]({'hasData':function(_0x2e0a96){return _0x4834de['hasData'](_0x2e0a96)||_0x369848[a0_0x5a29('0x223')](_0x2e0a96);},'data':function(_0x2370c6,_0x1239c8,_0x84d59c){return _0x4834de['access'](_0x2370c6,_0x1239c8,_0x84d59c);},'removeData':function(_0x2b702c,_0x5c6fd1){_0x4834de[a0_0x5a29('0x157')](_0x2b702c,_0x5c6fd1);},'_data':function(_0x4da9c5,_0x3a58d6,_0x6baa4c){return _0x369848[a0_0x5a29('0x2c')](_0x4da9c5,_0x3a58d6,_0x6baa4c);},'_removeData':function(_0xd0a7e8,_0x573375){_0x369848[a0_0x5a29('0x157')](_0xd0a7e8,_0x573375);}}),_0xd48b4d['fn'][a0_0x5a29('0x630')]({'data':function(_0x185db4,_0x4fe745){var _0x267dfe,_0x3ec5e8,_0xb4b26b,_0x4fc0ce=this[0x0],_0x5c2ac2=_0x4fc0ce&&_0x4fc0ce[a0_0x5a29('0x576')];if(void 0x0===_0x185db4){if(this['length']&&(_0xb4b26b=_0x4834de[a0_0x5a29('0x1e')](_0x4fc0ce),0x1===_0x4fc0ce['nodeType']&&!_0x369848['get'](_0x4fc0ce,a0_0x5a29('0x741')))){for(_0x267dfe=_0x5c2ac2[a0_0x5a29('0x515')];_0x267dfe--;)_0x5c2ac2[_0x267dfe]&&0x0===(_0x3ec5e8=_0x5c2ac2[_0x267dfe][a0_0x5a29('0x775')])[a0_0x5a29('0x26f')](a0_0x5a29('0x585'))&&(_0x3ec5e8=_0x65089b(_0x3ec5e8['slice'](0x5)),_0x3e818e(_0x4fc0ce,_0x3ec5e8,_0xb4b26b[_0x3ec5e8]));_0x369848[a0_0x5a29('0x2c8')](_0x4fc0ce,a0_0x5a29('0x741'),!0x0);}return _0xb4b26b;}return a0_0x5a29('0x950')==typeof _0x185db4?this[a0_0x5a29('0x6bc')](function(){_0x4834de[a0_0x5a29('0x2c8')](this,_0x185db4);}):_0x3a4acb(this,function(_0x6c0047){var _0x522a7c;if(_0x4fc0ce&&void 0x0===_0x6c0047)return void 0x0!==(_0x522a7c=_0x4834de[a0_0x5a29('0x1e')](_0x4fc0ce,_0x185db4))||void 0x0!==(_0x522a7c=_0x3e818e(_0x4fc0ce,_0x185db4))?_0x522a7c:void 0x0;this['each'](function(){_0x4834de[a0_0x5a29('0x2c8')](this,_0x185db4,_0x6c0047);});},null,_0x4fe745,arguments[a0_0x5a29('0x515')]>0x1,null,!0x0);},'removeData':function(_0x233058){return this[a0_0x5a29('0x6bc')](function(){_0x4834de[a0_0x5a29('0x157')](this,_0x233058);});}}),_0xd48b4d[a0_0x5a29('0x630')]({'queue':function(_0x2e2903,_0x318b3f,_0x15cee4){var _0x1b8283;if(_0x2e2903)return _0x318b3f=(_0x318b3f||'fx')+a0_0x5a29('0x511'),_0x1b8283=_0x369848['get'](_0x2e2903,_0x318b3f),_0x15cee4&&(!_0x1b8283||Array[a0_0x5a29('0x7aa')](_0x15cee4)?_0x1b8283=_0x369848[a0_0x5a29('0x2c')](_0x2e2903,_0x318b3f,_0xd48b4d[a0_0x5a29('0xda')](_0x15cee4)):_0x1b8283[a0_0x5a29('0x3cd')](_0x15cee4)),_0x1b8283||[];},'dequeue':function(_0x38517c,_0x35ddf1){_0x35ddf1=_0x35ddf1||'fx';var _0x2476bd=_0xd48b4d['queue'](_0x38517c,_0x35ddf1),_0x29c269=_0x2476bd[a0_0x5a29('0x515')],_0x195c00=_0x2476bd[a0_0x5a29('0x60e')](),_0x40a76c=_0xd48b4d['_queueHooks'](_0x38517c,_0x35ddf1);a0_0x5a29('0xb5')===_0x195c00&&(_0x195c00=_0x2476bd[a0_0x5a29('0x60e')](),_0x29c269--),_0x195c00&&('fx'===_0x35ddf1&&_0x2476bd[a0_0x5a29('0x5dc')](a0_0x5a29('0xb5')),delete _0x40a76c[a0_0x5a29('0x7e3')],_0x195c00[a0_0x5a29('0x351')](_0x38517c,function(){_0xd48b4d[a0_0x5a29('0x920')](_0x38517c,_0x35ddf1);},_0x40a76c)),!_0x29c269&&_0x40a76c&&_0x40a76c[a0_0x5a29('0x313')][a0_0x5a29('0x93a')]();},'_queueHooks':function(_0x28c6ba,_0x3302a2){var _0x768fa7=_0x3302a2+a0_0x5a29('0x6ad');return _0x369848[a0_0x5a29('0x1e')](_0x28c6ba,_0x768fa7)||_0x369848[a0_0x5a29('0x2c')](_0x28c6ba,_0x768fa7,{'empty':_0xd48b4d[a0_0x5a29('0xf8')](a0_0x5a29('0x3d2'))[a0_0x5a29('0x695')](function(){_0x369848[a0_0x5a29('0x157')](_0x28c6ba,[_0x3302a2+'queue',_0x768fa7]);})});}}),_0xd48b4d['fn']['extend']({'queue':function(_0x3782a6,_0x154b0a){var _0xc6219e=0x2;return a0_0x5a29('0x783')!=typeof _0x3782a6&&(_0x154b0a=_0x3782a6,_0x3782a6='fx',_0xc6219e--),arguments[a0_0x5a29('0x515')]<_0xc6219e?_0xd48b4d[a0_0x5a29('0x511')](this[0x0],_0x3782a6):void 0x0===_0x154b0a?this:this[a0_0x5a29('0x6bc')](function(){var _0x5b7e79=_0xd48b4d['queue'](this,_0x3782a6,_0x154b0a);_0xd48b4d[a0_0x5a29('0x1a4')](this,_0x3782a6),'fx'===_0x3782a6&&a0_0x5a29('0xb5')!==_0x5b7e79[0x0]&&_0xd48b4d['dequeue'](this,_0x3782a6);});},'dequeue':function(_0xd09db6){return this[a0_0x5a29('0x6bc')](function(){_0xd48b4d[a0_0x5a29('0x920')](this,_0xd09db6);});},'clearQueue':function(_0x4704fe){return this['queue'](_0x4704fe||'fx',[]);},'promise':function(_0xfe7040,_0x1affa4){var _0x478422,_0x2510ef=0x1,_0x49a8cb=_0xd48b4d[a0_0x5a29('0x1bd')](),_0x1526b5=this,_0x5c2fa6=this['length'],_0x470744=function(){--_0x2510ef||_0x49a8cb[a0_0x5a29('0x17c')](_0x1526b5,[_0x1526b5]);};for(a0_0x5a29('0x783')!=typeof _0xfe7040&&(_0x1affa4=_0xfe7040,_0xfe7040=void 0x0),_0xfe7040=_0xfe7040||'fx';_0x5c2fa6--;)(_0x478422=_0x369848[a0_0x5a29('0x1e')](_0x1526b5[_0x5c2fa6],_0xfe7040+a0_0x5a29('0x6ad')))&&_0x478422[a0_0x5a29('0x313')]&&(_0x2510ef++,_0x478422[a0_0x5a29('0x313')][a0_0x5a29('0x695')](_0x470744));return _0x470744(),_0x49a8cb[a0_0x5a29('0x743')](_0x1affa4);}});var _0x4aec78=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/[a0_0x5a29('0x781')],_0x2256b2=new RegExp(a0_0x5a29('0x11d')+_0x4aec78+a0_0x5a29('0x405'),'i'),_0x1f28fd=[a0_0x5a29('0x784'),a0_0x5a29('0x7c5'),a0_0x5a29('0x772'),a0_0x5a29('0x544')],_0x2cb20b=_0x45f8a9[a0_0x5a29('0x937')],_0x50a043=function(_0x48cd11){return _0xd48b4d['contains'](_0x48cd11['ownerDocument'],_0x48cd11);},_0x57ebe7={'composed':!0x0};_0x2cb20b[a0_0x5a29('0x484')]&&(_0x50a043=function(_0x2235cd){return _0xd48b4d[a0_0x5a29('0x181')](_0x2235cd['ownerDocument'],_0x2235cd)||_0x2235cd['getRootNode'](_0x57ebe7)===_0x2235cd[a0_0x5a29('0x23b')];});var _0x284619=function(_0x4a9909,_0x480457){return a0_0x5a29('0x7a4')===(_0x4a9909=_0x480457||_0x4a9909)['style'][a0_0x5a29('0x625')]||''===_0x4a9909[a0_0x5a29('0x46a')][a0_0x5a29('0x625')]&&_0x50a043(_0x4a9909)&&a0_0x5a29('0x7a4')===_0xd48b4d['css'](_0x4a9909,'display');};function _0x3e48f2(_0x37f075,_0x255670,_0x2c78e7,_0x34137e){var _0x33386c,_0x250821,_0x5ac698=0x14,_0x193cef=_0x34137e?function(){return _0x34137e[a0_0x5a29('0x5bf')]();}:function(){return _0xd48b4d[a0_0x5a29('0x54')](_0x37f075,_0x255670,'');},_0x45ac21=_0x193cef(),_0x45b84a=_0x2c78e7&&_0x2c78e7[0x3]||(_0xd48b4d[a0_0x5a29('0x74b')][_0x255670]?'':'px'),_0x421222=_0x37f075[a0_0x5a29('0x23f')]&&(_0xd48b4d[a0_0x5a29('0x74b')][_0x255670]||'px'!==_0x45b84a&&+_0x45ac21)&&_0x2256b2[a0_0x5a29('0x2d5')](_0xd48b4d['css'](_0x37f075,_0x255670));if(_0x421222&&_0x421222[0x3]!==_0x45b84a){for(_0x45ac21/=0x2,_0x45b84a=_0x45b84a||_0x421222[0x3],_0x421222=+_0x45ac21||0x1;_0x5ac698--;)_0xd48b4d['style'](_0x37f075,_0x255670,_0x421222+_0x45b84a),(0x1-_0x250821)*(0x1-(_0x250821=_0x193cef()/_0x45ac21||0.5))<=0x0&&(_0x5ac698=0x0),_0x421222/=_0x250821;_0x421222*=0x2,_0xd48b4d[a0_0x5a29('0x46a')](_0x37f075,_0x255670,_0x421222+_0x45b84a),_0x2c78e7=_0x2c78e7||[];}return _0x2c78e7&&(_0x421222=+_0x421222||+_0x45ac21||0x0,_0x33386c=_0x2c78e7[0x1]?_0x421222+(_0x2c78e7[0x1]+0x1)*_0x2c78e7[0x2]:+_0x2c78e7[0x2],_0x34137e&&(_0x34137e[a0_0x5a29('0x142')]=_0x45b84a,_0x34137e[a0_0x5a29('0x63a')]=_0x421222,_0x34137e[a0_0x5a29('0x120')]=_0x33386c)),_0x33386c;}var _0x53c4fd={};function _0x39f72f(_0x3b7dbe){var _0x37e073,_0x12a2b5=_0x3b7dbe[a0_0x5a29('0x23b')],_0x1420b1=_0x3b7dbe['nodeName'],_0x2a35f2=_0x53c4fd[_0x1420b1];return _0x2a35f2||(_0x37e073=_0x12a2b5['body'][a0_0x5a29('0x365')](_0x12a2b5[a0_0x5a29('0x56f')](_0x1420b1)),_0x2a35f2=_0xd48b4d[a0_0x5a29('0x54')](_0x37e073,a0_0x5a29('0x625')),_0x37e073[a0_0x5a29('0x3d5')]['removeChild'](_0x37e073),a0_0x5a29('0x7a4')===_0x2a35f2&&(_0x2a35f2='block'),_0x53c4fd[_0x1420b1]=_0x2a35f2,_0x2a35f2);}function _0xe50ac9(_0x3b8e92,_0x4479fb){for(var _0x13e1ce,_0x1c0f9b,_0x168a85=[],_0x33b1a8=0x0,_0x1a78a4=_0x3b8e92[a0_0x5a29('0x515')];_0x33b1a8<_0x1a78a4;_0x33b1a8++)(_0x1c0f9b=_0x3b8e92[_0x33b1a8])[a0_0x5a29('0x46a')]&&(_0x13e1ce=_0x1c0f9b['style'][a0_0x5a29('0x625')],_0x4479fb?(a0_0x5a29('0x7a4')===_0x13e1ce&&(_0x168a85[_0x33b1a8]=_0x369848[a0_0x5a29('0x1e')](_0x1c0f9b,a0_0x5a29('0x625'))||null,_0x168a85[_0x33b1a8]||(_0x1c0f9b[a0_0x5a29('0x46a')]['display']='')),''===_0x1c0f9b[a0_0x5a29('0x46a')][a0_0x5a29('0x625')]&&_0x284619(_0x1c0f9b)&&(_0x168a85[_0x33b1a8]=_0x39f72f(_0x1c0f9b))):a0_0x5a29('0x7a4')!==_0x13e1ce&&(_0x168a85[_0x33b1a8]=a0_0x5a29('0x7a4'),_0x369848[a0_0x5a29('0x2c8')](_0x1c0f9b,a0_0x5a29('0x625'),_0x13e1ce)));for(_0x33b1a8=0x0;_0x33b1a8<_0x1a78a4;_0x33b1a8++)null!=_0x168a85[_0x33b1a8]&&(_0x3b8e92[_0x33b1a8][a0_0x5a29('0x46a')]['display']=_0x168a85[_0x33b1a8]);return _0x3b8e92;}_0xd48b4d['fn'][a0_0x5a29('0x630')]({'show':function(){return _0xe50ac9(this,!0x0);},'hide':function(){return _0xe50ac9(this);},'toggle':function(_0x2cf6a0){return a0_0x5a29('0x4dd')==typeof _0x2cf6a0?_0x2cf6a0?this[a0_0x5a29('0x4b1')]():this[a0_0x5a29('0x75a')]():this[a0_0x5a29('0x6bc')](function(){_0x284619(this)?_0xd48b4d(this)[a0_0x5a29('0x4b1')]():_0xd48b4d(this)['hide']();});}});var _0x3eba25,_0x187072,_0x1841c6=/^(?:checkbox|radio)$/i,_0x5af4e4=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,_0x53879c=/^$|^module$|\/(?:java|ecma)script/i;_0x3eba25=_0x45f8a9[a0_0x5a29('0x642')]()[a0_0x5a29('0x365')](_0x45f8a9['createElement'](a0_0x5a29('0x884'))),(_0x187072=_0x45f8a9[a0_0x5a29('0x56f')](a0_0x5a29('0x889')))[a0_0x5a29('0x773')](a0_0x5a29('0x519'),a0_0x5a29('0x173')),_0x187072[a0_0x5a29('0x773')](a0_0x5a29('0x289'),a0_0x5a29('0x289')),_0x187072['setAttribute']('name','t'),_0x3eba25[a0_0x5a29('0x365')](_0x187072),_0x1da227[a0_0x5a29('0x4cb')]=_0x3eba25['cloneNode'](!0x0)[a0_0x5a29('0x3f2')](!0x0)[a0_0x5a29('0x8e2')]['checked'],_0x3eba25[a0_0x5a29('0x13d')]=a0_0x5a29('0x152'),_0x1da227['noCloneChecked']=!!_0x3eba25[a0_0x5a29('0x3f2')](!0x0)[a0_0x5a29('0x8e2')][a0_0x5a29('0x3d0')],_0x3eba25[a0_0x5a29('0x13d')]='<option></option>',_0x1da227[a0_0x5a29('0x2fd')]=!!_0x3eba25[a0_0x5a29('0x8e2')];var _0x109c9c={'thead':[0x1,a0_0x5a29('0x1c5'),'</table>'],'col':[0x2,a0_0x5a29('0x6e2'),'</colgroup></table>'],'tr':[0x2,'<table><tbody>',a0_0x5a29('0x7c1')],'td':[0x3,a0_0x5a29('0x623'),a0_0x5a29('0x308')],'_default':[0x0,'','']};function _0x596cff(_0x2bdad1,_0x10ab02){var _0x11cd2e;return _0x11cd2e=void 0x0!==_0x2bdad1[a0_0x5a29('0x15c')]?_0x2bdad1[a0_0x5a29('0x15c')](_0x10ab02||'*'):void 0x0!==_0x2bdad1['querySelectorAll']?_0x2bdad1[a0_0x5a29('0x6ac')](_0x10ab02||'*'):[],void 0x0===_0x10ab02||_0x10ab02&&_0x2aac73(_0x2bdad1,_0x10ab02)?_0xd48b4d['merge']([_0x2bdad1],_0x11cd2e):_0x11cd2e;}function _0x5e307e(_0x3c4d0a,_0x4a430c){for(var _0x26d8ec=0x0,_0x2f9894=_0x3c4d0a[a0_0x5a29('0x515')];_0x26d8ec<_0x2f9894;_0x26d8ec++)_0x369848['set'](_0x3c4d0a[_0x26d8ec],a0_0x5a29('0x66'),!_0x4a430c||_0x369848['get'](_0x4a430c[_0x26d8ec],a0_0x5a29('0x66')));}_0x109c9c[a0_0x5a29('0x33c')]=_0x109c9c['tfoot']=_0x109c9c[a0_0x5a29('0x489')]=_0x109c9c['caption']=_0x109c9c[a0_0x5a29('0x245')],_0x109c9c['th']=_0x109c9c['td'],_0x1da227['option']||(_0x109c9c[a0_0x5a29('0x55c')]=_0x109c9c[a0_0x5a29('0x2fd')]=[0x1,a0_0x5a29('0x45a'),a0_0x5a29('0x41a')]);var _0x526ab9=/<|&#?\w+;/;function _0x4bbcd4(_0x3023c1,_0x19875e,_0x1dc2e7,_0x4fb2cb,_0x1a6729){for(var _0x8841a,_0x5333af,_0x4ba7ba,_0x47335b,_0x1770d7,_0xf8cfc3,_0x3a4e44=_0x19875e[a0_0x5a29('0x642')](),_0x29ed32=[],_0x4a4d65=0x0,_0x2095b1=_0x3023c1[a0_0x5a29('0x515')];_0x4a4d65<_0x2095b1;_0x4a4d65++)if((_0x8841a=_0x3023c1[_0x4a4d65])||0x0===_0x8841a){if('object'===_0x5c303c(_0x8841a))_0xd48b4d[a0_0x5a29('0x65f')](_0x29ed32,_0x8841a['nodeType']?[_0x8841a]:_0x8841a);else{if(_0x526ab9['test'](_0x8841a)){for(_0x5333af=_0x5333af||_0x3a4e44[a0_0x5a29('0x365')](_0x19875e[a0_0x5a29('0x56f')](a0_0x5a29('0x884'))),_0x4ba7ba=(_0x5af4e4[a0_0x5a29('0x2d5')](_0x8841a)||['',''])[0x1]['toLowerCase'](),_0x47335b=_0x109c9c[_0x4ba7ba]||_0x109c9c['_default'],_0x5333af[a0_0x5a29('0x13d')]=_0x47335b[0x1]+_0xd48b4d[a0_0x5a29('0xd3')](_0x8841a)+_0x47335b[0x2],_0xf8cfc3=_0x47335b[0x0];_0xf8cfc3--;)_0x5333af=_0x5333af['lastChild'];_0xd48b4d['merge'](_0x29ed32,_0x5333af[a0_0x5a29('0x73c')]),(_0x5333af=_0x3a4e44[a0_0x5a29('0x5a1')])[a0_0x5a29('0x627')]='';}else _0x29ed32[a0_0x5a29('0x3cd')](_0x19875e[a0_0x5a29('0x534')](_0x8841a));}}for(_0x3a4e44['textContent']='',_0x4a4d65=0x0;_0x8841a=_0x29ed32[_0x4a4d65++];)if(_0x4fb2cb&&_0xd48b4d[a0_0x5a29('0x3f8')](_0x8841a,_0x4fb2cb)>-0x1)_0x1a6729&&_0x1a6729['push'](_0x8841a);else{if(_0x1770d7=_0x50a043(_0x8841a),_0x5333af=_0x596cff(_0x3a4e44['appendChild'](_0x8841a),a0_0x5a29('0x633')),_0x1770d7&&_0x5e307e(_0x5333af),_0x1dc2e7)for(_0xf8cfc3=0x0;_0x8841a=_0x5333af[_0xf8cfc3++];)_0x53879c['test'](_0x8841a[a0_0x5a29('0x519')]||'')&&_0x1dc2e7[a0_0x5a29('0x3cd')](_0x8841a);}return _0x3a4e44;}var _0x234878=/^key/,_0x4269e8=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_0x5586e0=/^([^.]*)(?:\.(.+)|)/;function _0x91b508(){return!0x0;}function _0x320428(){return!0x1;}function _0x190959(_0x4768da,_0x4bb920){return _0x4768da===function(){try{return _0x45f8a9['activeElement'];}catch(_0x3a557a){}}()==(a0_0x5a29('0x29e')===_0x4bb920);}function _0x329be2(_0x54e060,_0x1af7b1,_0x14a253,_0x11b1f6,_0x4d565d,_0x2902af){var _0x405364,_0xf05d3e;if(a0_0x5a29('0x950')==typeof _0x1af7b1){for(_0xf05d3e in(a0_0x5a29('0x783')!=typeof _0x14a253&&(_0x11b1f6=_0x11b1f6||_0x14a253,_0x14a253=void 0x0),_0x1af7b1))_0x329be2(_0x54e060,_0xf05d3e,_0x14a253,_0x11b1f6,_0x1af7b1[_0xf05d3e],_0x2902af);return _0x54e060;}if(null==_0x11b1f6&&null==_0x4d565d?(_0x4d565d=_0x14a253,_0x11b1f6=_0x14a253=void 0x0):null==_0x4d565d&&(a0_0x5a29('0x783')==typeof _0x14a253?(_0x4d565d=_0x11b1f6,_0x11b1f6=void 0x0):(_0x4d565d=_0x11b1f6,_0x11b1f6=_0x14a253,_0x14a253=void 0x0)),!0x1===_0x4d565d)_0x4d565d=_0x320428;else{if(!_0x4d565d)return _0x54e060;}return 0x1===_0x2902af&&(_0x405364=_0x4d565d,(_0x4d565d=function(_0x4c8f1e){return _0xd48b4d()[a0_0x5a29('0x59a')](_0x4c8f1e),_0x405364[a0_0x5a29('0x758')](this,arguments);})[a0_0x5a29('0x816')]=_0x405364[a0_0x5a29('0x816')]||(_0x405364[a0_0x5a29('0x816')]=_0xd48b4d[a0_0x5a29('0x816')]++)),_0x54e060[a0_0x5a29('0x6bc')](function(){_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x695')](this,_0x1af7b1,_0x4d565d,_0x11b1f6,_0x14a253);});}function _0x4f91e9(_0x223db7,_0x3417c9,_0xdf2ead){_0xdf2ead?(_0x369848[a0_0x5a29('0x2c8')](_0x223db7,_0x3417c9,!0x1),_0xd48b4d[a0_0x5a29('0x204')]['add'](_0x223db7,_0x3417c9,{'namespace':!0x1,'handler':function(_0x1b1a0e){var _0x41cd8c,_0x90de92,_0x2b061e=_0x369848['get'](this,_0x3417c9);if(0x1&_0x1b1a0e[a0_0x5a29('0x2e6')]&&this[_0x3417c9]){if(_0x2b061e[a0_0x5a29('0x515')])(_0xd48b4d['event'][a0_0x5a29('0x183')][_0x3417c9]||{})[a0_0x5a29('0x6d4')]&&_0x1b1a0e[a0_0x5a29('0x788')]();else{if(_0x2b061e=_0xbd54eb[a0_0x5a29('0x351')](arguments),_0x369848['set'](this,_0x3417c9,_0x2b061e),_0x41cd8c=_0xdf2ead(this,_0x3417c9),this[_0x3417c9](),_0x2b061e!==(_0x90de92=_0x369848[a0_0x5a29('0x1e')](this,_0x3417c9))||_0x41cd8c?_0x369848['set'](this,_0x3417c9,!0x1):_0x90de92={},_0x2b061e!==_0x90de92)return _0x1b1a0e[a0_0x5a29('0x33d')](),_0x1b1a0e[a0_0x5a29('0x133')](),_0x90de92[a0_0x5a29('0x363')];}}else _0x2b061e[a0_0x5a29('0x515')]&&(_0x369848[a0_0x5a29('0x2c8')](this,_0x3417c9,{'value':_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x4f2')](_0xd48b4d[a0_0x5a29('0x630')](_0x2b061e[0x0],_0xd48b4d['Event']['prototype']),_0x2b061e[a0_0x5a29('0x723')](0x1),this)}),_0x1b1a0e[a0_0x5a29('0x33d')]());}})):void 0x0===_0x369848[a0_0x5a29('0x1e')](_0x223db7,_0x3417c9)&&_0xd48b4d['event'][a0_0x5a29('0x695')](_0x223db7,_0x3417c9,_0x91b508);}_0xd48b4d[a0_0x5a29('0x204')]={'global':{},'add':function(_0x58a409,_0xd4596f,_0xf34ed,_0x378073,_0x332f18){var _0x5cd72b,_0x3c589b,_0x58f385,_0x105e5d,_0x34185d,_0x529564,_0x540038,_0x49cc82,_0x21727c,_0x39ccd1,_0x115375,_0x56ae37=_0x369848[a0_0x5a29('0x1e')](_0x58a409);if(_0x12d87f(_0x58a409))for(_0xf34ed[a0_0x5a29('0x907')]&&(_0xf34ed=(_0x5cd72b=_0xf34ed)[a0_0x5a29('0x907')],_0x332f18=_0x5cd72b['selector']),_0x332f18&&_0xd48b4d['find']['matchesSelector'](_0x2cb20b,_0x332f18),_0xf34ed[a0_0x5a29('0x816')]||(_0xf34ed[a0_0x5a29('0x816')]=_0xd48b4d[a0_0x5a29('0x816')]++),(_0x105e5d=_0x56ae37[a0_0x5a29('0x24c')])||(_0x105e5d=_0x56ae37[a0_0x5a29('0x24c')]=Object[a0_0x5a29('0xa')](null)),(_0x3c589b=_0x56ae37['handle'])||(_0x3c589b=_0x56ae37['handle']=function(_0x1bcbf4){return void 0x0!==_0xd48b4d&&_0xd48b4d[a0_0x5a29('0x204')]['triggered']!==_0x1bcbf4['type']?_0xd48b4d['event']['dispatch'][a0_0x5a29('0x758')](_0x58a409,arguments):void 0x0;}),_0x34185d=(_0xd4596f=(_0xd4596f||'')[a0_0x5a29('0x7c0')](_0x35c17c)||[''])['length'];_0x34185d--;)_0x21727c=_0x115375=(_0x58f385=_0x5586e0[a0_0x5a29('0x2d5')](_0xd4596f[_0x34185d])||[])[0x1],_0x39ccd1=(_0x58f385[0x2]||'')[a0_0x5a29('0xc5')]('.')[a0_0x5a29('0x518')](),_0x21727c&&(_0x540038=_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0x21727c]||{},_0x21727c=(_0x332f18?_0x540038[a0_0x5a29('0x6d4')]:_0x540038[a0_0x5a29('0x4d6')])||_0x21727c,_0x540038=_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0x21727c]||{},_0x529564=_0xd48b4d[a0_0x5a29('0x630')]({'type':_0x21727c,'origType':_0x115375,'data':_0x378073,'handler':_0xf34ed,'guid':_0xf34ed[a0_0x5a29('0x816')],'selector':_0x332f18,'needsContext':_0x332f18&&_0xd48b4d[a0_0x5a29('0x502')][a0_0x5a29('0x7c0')]['needsContext'][a0_0x5a29('0x25e')](_0x332f18),'namespace':_0x39ccd1[a0_0x5a29('0x1e9')]('.')},_0x5cd72b),(_0x49cc82=_0x105e5d[_0x21727c])||((_0x49cc82=_0x105e5d[_0x21727c]=[])['delegateCount']=0x0,_0x540038[a0_0x5a29('0x24')]&&!0x1!==_0x540038[a0_0x5a29('0x24')][a0_0x5a29('0x351')](_0x58a409,_0x378073,_0x39ccd1,_0x3c589b)||_0x58a409[a0_0x5a29('0x464')]&&_0x58a409[a0_0x5a29('0x464')](_0x21727c,_0x3c589b)),_0x540038[a0_0x5a29('0x695')]&&(_0x540038['add'][a0_0x5a29('0x351')](_0x58a409,_0x529564),_0x529564[a0_0x5a29('0x907')][a0_0x5a29('0x816')]||(_0x529564[a0_0x5a29('0x907')][a0_0x5a29('0x816')]=_0xf34ed[a0_0x5a29('0x816')])),_0x332f18?_0x49cc82[a0_0x5a29('0x250')](_0x49cc82[a0_0x5a29('0x651')]++,0x0,_0x529564):_0x49cc82[a0_0x5a29('0x3cd')](_0x529564),_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0xe9')][_0x21727c]=!0x0);},'remove':function(_0x1e4cad,_0x5bcd19,_0x4ac448,_0x3641c2,_0x1d4481){var _0x58f55c,_0x77803e,_0x4778b0,_0x13b3e9,_0x25874e,_0x5101ca,_0x2db665,_0x8024d0,_0x133bad,_0x27e833,_0xc8e2d7,_0x313d7a=_0x369848['hasData'](_0x1e4cad)&&_0x369848[a0_0x5a29('0x1e')](_0x1e4cad);if(_0x313d7a&&(_0x13b3e9=_0x313d7a['events'])){for(_0x25874e=(_0x5bcd19=(_0x5bcd19||'')[a0_0x5a29('0x7c0')](_0x35c17c)||[''])[a0_0x5a29('0x515')];_0x25874e--;)if(_0x133bad=_0xc8e2d7=(_0x4778b0=_0x5586e0['exec'](_0x5bcd19[_0x25874e])||[])[0x1],_0x27e833=(_0x4778b0[0x2]||'')[a0_0x5a29('0xc5')]('.')[a0_0x5a29('0x518')](),_0x133bad){for(_0x2db665=_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0x133bad]||{},_0x8024d0=_0x13b3e9[_0x133bad=(_0x3641c2?_0x2db665[a0_0x5a29('0x6d4')]:_0x2db665[a0_0x5a29('0x4d6')])||_0x133bad]||[],_0x4778b0=_0x4778b0[0x2]&&new RegExp(a0_0x5a29('0x16f')+_0x27e833[a0_0x5a29('0x1e9')]('\x5c.(?:.*\x5c.|)')+a0_0x5a29('0x28')),_0x77803e=_0x58f55c=_0x8024d0[a0_0x5a29('0x515')];_0x58f55c--;)_0x5101ca=_0x8024d0[_0x58f55c],!_0x1d4481&&_0xc8e2d7!==_0x5101ca['origType']||_0x4ac448&&_0x4ac448[a0_0x5a29('0x816')]!==_0x5101ca[a0_0x5a29('0x816')]||_0x4778b0&&!_0x4778b0['test'](_0x5101ca[a0_0x5a29('0x7a1')])||_0x3641c2&&_0x3641c2!==_0x5101ca[a0_0x5a29('0x824')]&&('**'!==_0x3641c2||!_0x5101ca[a0_0x5a29('0x824')])||(_0x8024d0[a0_0x5a29('0x250')](_0x58f55c,0x1),_0x5101ca[a0_0x5a29('0x824')]&&_0x8024d0[a0_0x5a29('0x651')]--,_0x2db665['remove']&&_0x2db665[a0_0x5a29('0x157')][a0_0x5a29('0x351')](_0x1e4cad,_0x5101ca));_0x77803e&&!_0x8024d0[a0_0x5a29('0x515')]&&(_0x2db665[a0_0x5a29('0x754')]&&!0x1!==_0x2db665['teardown']['call'](_0x1e4cad,_0x27e833,_0x313d7a[a0_0x5a29('0x890')])||_0xd48b4d[a0_0x5a29('0x256')](_0x1e4cad,_0x133bad,_0x313d7a[a0_0x5a29('0x890')]),delete _0x13b3e9[_0x133bad]);}else for(_0x133bad in _0x13b3e9)_0xd48b4d[a0_0x5a29('0x204')]['remove'](_0x1e4cad,_0x133bad+_0x5bcd19[_0x25874e],_0x4ac448,_0x3641c2,!0x0);_0xd48b4d[a0_0x5a29('0x8eb')](_0x13b3e9)&&_0x369848['remove'](_0x1e4cad,a0_0x5a29('0x8d2'));}},'dispatch':function(_0x206609){var _0xa1ecee,_0x5858b8,_0x9520a0,_0x27ff8f,_0x883c2d,_0x337739,_0x146e84=new Array(arguments['length']),_0x223f01=_0xd48b4d['event'][a0_0x5a29('0x8a0')](_0x206609),_0x44e2e2=(_0x369848[a0_0x5a29('0x1e')](this,a0_0x5a29('0x24c'))||Object[a0_0x5a29('0xa')](null))[_0x223f01[a0_0x5a29('0x519')]]||[],_0x49767b=_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0x223f01[a0_0x5a29('0x519')]]||{};for(_0x146e84[0x0]=_0x223f01,_0xa1ecee=0x1;_0xa1ecee<arguments[a0_0x5a29('0x515')];_0xa1ecee++)_0x146e84[_0xa1ecee]=arguments[_0xa1ecee];if(_0x223f01[a0_0x5a29('0x3bb')]=this,!_0x49767b['preDispatch']||!0x1!==_0x49767b[a0_0x5a29('0x32c')][a0_0x5a29('0x351')](this,_0x223f01)){for(_0x337739=_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x785')][a0_0x5a29('0x351')](this,_0x223f01,_0x44e2e2),_0xa1ecee=0x0;(_0x27ff8f=_0x337739[_0xa1ecee++])&&!_0x223f01[a0_0x5a29('0x5df')]();)for(_0x223f01[a0_0x5a29('0x71c')]=_0x27ff8f[a0_0x5a29('0x192')],_0x5858b8=0x0;(_0x883c2d=_0x27ff8f[a0_0x5a29('0x785')][_0x5858b8++])&&!_0x223f01[a0_0x5a29('0x730')]();)_0x223f01[a0_0x5a29('0x771')]&&!0x1!==_0x883c2d[a0_0x5a29('0x7a1')]&&!_0x223f01['rnamespace']['test'](_0x883c2d[a0_0x5a29('0x7a1')])||(_0x223f01['handleObj']=_0x883c2d,_0x223f01['data']=_0x883c2d['data'],void 0x0!==(_0x9520a0=((_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0x883c2d[a0_0x5a29('0x372')]]||{})[a0_0x5a29('0x890')]||_0x883c2d[a0_0x5a29('0x907')])[a0_0x5a29('0x758')](_0x27ff8f[a0_0x5a29('0x192')],_0x146e84))&&!0x1===(_0x223f01[a0_0x5a29('0x77')]=_0x9520a0)&&(_0x223f01[a0_0x5a29('0x133')](),_0x223f01[a0_0x5a29('0x788')]()));return _0x49767b[a0_0x5a29('0x776')]&&_0x49767b['postDispatch'][a0_0x5a29('0x351')](this,_0x223f01),_0x223f01['result'];}},'handlers':function(_0x50ce55,_0x5c4327){var _0x28294e,_0x5b9afd,_0x17563d,_0x4b5207,_0x1dad66,_0xcdbd4b=[],_0x2db22b=_0x5c4327[a0_0x5a29('0x651')],_0x17b8a5=_0x50ce55[a0_0x5a29('0x28a')];if(_0x2db22b&&_0x17b8a5[a0_0x5a29('0x23f')]&&!(a0_0x5a29('0x79b')===_0x50ce55[a0_0x5a29('0x519')]&&_0x50ce55[a0_0x5a29('0x797')]>=0x1))for(;_0x17b8a5!==this;_0x17b8a5=_0x17b8a5[a0_0x5a29('0x3d5')]||this)if(0x1===_0x17b8a5[a0_0x5a29('0x23f')]&&(a0_0x5a29('0x79b')!==_0x50ce55[a0_0x5a29('0x519')]||!0x0!==_0x17b8a5['disabled'])){for(_0x4b5207=[],_0x1dad66={},_0x28294e=0x0;_0x28294e<_0x2db22b;_0x28294e++)void 0x0===_0x1dad66[_0x17563d=(_0x5b9afd=_0x5c4327[_0x28294e])['selector']+'\x20']&&(_0x1dad66[_0x17563d]=_0x5b9afd[a0_0x5a29('0x5b1')]?_0xd48b4d(_0x17563d,this)[a0_0x5a29('0x26e')](_0x17b8a5)>-0x1:_0xd48b4d['find'](_0x17563d,this,null,[_0x17b8a5])[a0_0x5a29('0x515')]),_0x1dad66[_0x17563d]&&_0x4b5207[a0_0x5a29('0x3cd')](_0x5b9afd);_0x4b5207[a0_0x5a29('0x515')]&&_0xcdbd4b[a0_0x5a29('0x3cd')]({'elem':_0x17b8a5,'handlers':_0x4b5207});}return _0x17b8a5=this,_0x2db22b<_0x5c4327[a0_0x5a29('0x515')]&&_0xcdbd4b[a0_0x5a29('0x3cd')]({'elem':_0x17b8a5,'handlers':_0x5c4327[a0_0x5a29('0x723')](_0x2db22b)}),_0xcdbd4b;},'addProp':function(_0x4d1160,_0x4c67e8){Object[a0_0x5a29('0xe7')](_0xd48b4d[a0_0x5a29('0x22f')][a0_0x5a29('0x928')],_0x4d1160,{'enumerable':!0x0,'configurable':!0x0,'get':_0x3512f3(_0x4c67e8)?function(){if(this[a0_0x5a29('0x669')])return _0x4c67e8(this[a0_0x5a29('0x669')]);}:function(){if(this[a0_0x5a29('0x669')])return this['originalEvent'][_0x4d1160];},'set':function(_0xfe02e0){Object[a0_0x5a29('0xe7')](this,_0x4d1160,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfe02e0});}});},'fix':function(_0x413b5d){return _0x413b5d[_0xd48b4d[a0_0x5a29('0x385')]]?_0x413b5d:new _0xd48b4d[(a0_0x5a29('0x22f'))](_0x413b5d);},'special':{'load':{'noBubble':!0x0},'click':{'setup':function(_0x5ae5cd){var _0x600f5=this||_0x5ae5cd;return _0x1841c6['test'](_0x600f5[a0_0x5a29('0x519')])&&_0x600f5[a0_0x5a29('0x79b')]&&_0x2aac73(_0x600f5,'input')&&_0x4f91e9(_0x600f5,a0_0x5a29('0x79b'),_0x91b508),!0x1;},'trigger':function(_0x541721){var _0x359c0f=this||_0x541721;return _0x1841c6[a0_0x5a29('0x25e')](_0x359c0f[a0_0x5a29('0x519')])&&_0x359c0f[a0_0x5a29('0x79b')]&&_0x2aac73(_0x359c0f,a0_0x5a29('0x889'))&&_0x4f91e9(_0x359c0f,a0_0x5a29('0x79b')),!0x0;},'_default':function(_0x3d9211){var _0x42829a=_0x3d9211[a0_0x5a29('0x28a')];return _0x1841c6['test'](_0x42829a[a0_0x5a29('0x519')])&&_0x42829a[a0_0x5a29('0x79b')]&&_0x2aac73(_0x42829a,a0_0x5a29('0x889'))&&_0x369848[a0_0x5a29('0x1e')](_0x42829a,a0_0x5a29('0x79b'))||_0x2aac73(_0x42829a,'a');}},'beforeunload':{'postDispatch':function(_0x13f658){void 0x0!==_0x13f658[a0_0x5a29('0x77')]&&_0x13f658[a0_0x5a29('0x669')]&&(_0x13f658['originalEvent'][a0_0x5a29('0x582')]=_0x13f658[a0_0x5a29('0x77')]);}}}},_0xd48b4d[a0_0x5a29('0x256')]=function(_0x4568ae,_0x53f35b,_0x33e0d2){_0x4568ae[a0_0x5a29('0x892')]&&_0x4568ae[a0_0x5a29('0x892')](_0x53f35b,_0x33e0d2);},_0xd48b4d[a0_0x5a29('0x22f')]=function(_0x4c483e,_0x4379f1){if(!(this instanceof _0xd48b4d[a0_0x5a29('0x22f')]))return new _0xd48b4d['Event'](_0x4c483e,_0x4379f1);_0x4c483e&&_0x4c483e[a0_0x5a29('0x519')]?(this[a0_0x5a29('0x669')]=_0x4c483e,this[a0_0x5a29('0x519')]=_0x4c483e['type'],this[a0_0x5a29('0x873')]=_0x4c483e[a0_0x5a29('0x5ce')]||void 0x0===_0x4c483e[a0_0x5a29('0x5ce')]&&!0x1===_0x4c483e[a0_0x5a29('0x582')]?_0x91b508:_0x320428,this['target']=_0x4c483e['target']&&0x3===_0x4c483e[a0_0x5a29('0x28a')][a0_0x5a29('0x23f')]?_0x4c483e[a0_0x5a29('0x28a')]['parentNode']:_0x4c483e[a0_0x5a29('0x28a')],this[a0_0x5a29('0x71c')]=_0x4c483e['currentTarget'],this[a0_0x5a29('0x355')]=_0x4c483e[a0_0x5a29('0x355')]):this[a0_0x5a29('0x519')]=_0x4c483e,_0x4379f1&&_0xd48b4d[a0_0x5a29('0x630')](this,_0x4379f1),this[a0_0x5a29('0x1f7')]=_0x4c483e&&_0x4c483e['timeStamp']||Date[a0_0x5a29('0x1eb')](),this[_0xd48b4d[a0_0x5a29('0x385')]]=!0x0;},_0xd48b4d[a0_0x5a29('0x22f')][a0_0x5a29('0x928')]={'constructor':_0xd48b4d[a0_0x5a29('0x22f')],'isDefaultPrevented':_0x320428,'isPropagationStopped':_0x320428,'isImmediatePropagationStopped':_0x320428,'isSimulated':!0x1,'preventDefault':function(){var _0x3119e7=this['originalEvent'];this[a0_0x5a29('0x873')]=_0x91b508,_0x3119e7&&!this[a0_0x5a29('0x901')]&&_0x3119e7[a0_0x5a29('0x133')]();},'stopPropagation':function(){var _0x1c5b47=this[a0_0x5a29('0x669')];this[a0_0x5a29('0x5df')]=_0x91b508,_0x1c5b47&&!this[a0_0x5a29('0x901')]&&_0x1c5b47[a0_0x5a29('0x788')]();},'stopImmediatePropagation':function(){var _0x543492=this[a0_0x5a29('0x669')];this[a0_0x5a29('0x730')]=_0x91b508,_0x543492&&!this[a0_0x5a29('0x901')]&&_0x543492[a0_0x5a29('0x33d')](),this[a0_0x5a29('0x788')]();}},_0xd48b4d[a0_0x5a29('0x6bc')]({'altKey':!0x0,'bubbles':!0x0,'cancelable':!0x0,'changedTouches':!0x0,'ctrlKey':!0x0,'detail':!0x0,'eventPhase':!0x0,'metaKey':!0x0,'pageX':!0x0,'pageY':!0x0,'shiftKey':!0x0,'view':!0x0,'char':!0x0,'code':!0x0,'charCode':!0x0,'key':!0x0,'keyCode':!0x0,'button':!0x0,'buttons':!0x0,'clientX':!0x0,'clientY':!0x0,'offsetX':!0x0,'offsetY':!0x0,'pointerId':!0x0,'pointerType':!0x0,'screenX':!0x0,'screenY':!0x0,'targetTouches':!0x0,'toElement':!0x0,'touches':!0x0,'which':function(_0x3628a2){var _0x3203b9=_0x3628a2[a0_0x5a29('0x797')];return null==_0x3628a2[a0_0x5a29('0x606')]&&_0x234878['test'](_0x3628a2[a0_0x5a29('0x519')])?null!=_0x3628a2[a0_0x5a29('0x88d')]?_0x3628a2['charCode']:_0x3628a2[a0_0x5a29('0x826')]:!_0x3628a2[a0_0x5a29('0x606')]&&void 0x0!==_0x3203b9&&_0x4269e8[a0_0x5a29('0x25e')](_0x3628a2[a0_0x5a29('0x519')])?0x1&_0x3203b9?0x1:0x2&_0x3203b9?0x3:0x4&_0x3203b9?0x2:0x0:_0x3628a2[a0_0x5a29('0x606')];}},_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x55e')]),_0xd48b4d[a0_0x5a29('0x6bc')]({'focus':a0_0x5a29('0x686'),'blur':a0_0x5a29('0x5d8')},function(_0x32e53e,_0xec6574){_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0x32e53e]={'setup':function(){return _0x4f91e9(this,_0x32e53e,_0x190959),!0x1;},'trigger':function(){return _0x4f91e9(this,_0x32e53e),!0x0;},'delegateType':_0xec6574};}),_0xd48b4d[a0_0x5a29('0x6bc')]({'mouseenter':'mouseover','mouseleave':'mouseout','pointerenter':a0_0x5a29('0x3b'),'pointerleave':a0_0x5a29('0x6c')},function(_0x16198f,_0x1d5997){_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0x16198f]={'delegateType':_0x1d5997,'bindType':_0x1d5997,'handle':function(_0x44d73f){var _0x11e5bf,_0x3c695a=this,_0x25eaba=_0x44d73f[a0_0x5a29('0x355')],_0x3885dd=_0x44d73f[a0_0x5a29('0x27c')];return _0x25eaba&&(_0x25eaba===_0x3c695a||_0xd48b4d[a0_0x5a29('0x181')](_0x3c695a,_0x25eaba))||(_0x44d73f[a0_0x5a29('0x519')]=_0x3885dd[a0_0x5a29('0x372')],_0x11e5bf=_0x3885dd[a0_0x5a29('0x907')][a0_0x5a29('0x758')](this,arguments),_0x44d73f[a0_0x5a29('0x519')]=_0x1d5997),_0x11e5bf;}};}),_0xd48b4d['fn']['extend']({'on':function(_0x8e1706,_0x211a8e,_0x54ab90,_0x88d26c){return _0x329be2(this,_0x8e1706,_0x211a8e,_0x54ab90,_0x88d26c);},'one':function(_0x4c1db6,_0x55dc9a,_0x4a9564,_0x16df9d){return _0x329be2(this,_0x4c1db6,_0x55dc9a,_0x4a9564,_0x16df9d,0x1);},'off':function(_0x5ef7db,_0x260bb3,_0x1123c5){var _0x32cbeb,_0x1c4b88;if(_0x5ef7db&&_0x5ef7db[a0_0x5a29('0x133')]&&_0x5ef7db[a0_0x5a29('0x27c')])return _0x32cbeb=_0x5ef7db[a0_0x5a29('0x27c')],_0xd48b4d(_0x5ef7db['delegateTarget'])['off'](_0x32cbeb[a0_0x5a29('0x7a1')]?_0x32cbeb['origType']+'.'+_0x32cbeb['namespace']:_0x32cbeb[a0_0x5a29('0x372')],_0x32cbeb[a0_0x5a29('0x824')],_0x32cbeb[a0_0x5a29('0x907')]),this;if('object'==typeof _0x5ef7db){for(_0x1c4b88 in _0x5ef7db)this[a0_0x5a29('0x59a')](_0x1c4b88,_0x260bb3,_0x5ef7db[_0x1c4b88]);return this;}return!0x1!==_0x260bb3&&a0_0x5a29('0x2ae')!=typeof _0x260bb3||(_0x1123c5=_0x260bb3,_0x260bb3=void 0x0),!0x1===_0x1123c5&&(_0x1123c5=_0x320428),this[a0_0x5a29('0x6bc')](function(){_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x157')](this,_0x5ef7db,_0x1123c5,_0x260bb3);});}});var _0x3be163=/<script|<style|<link/i,_0x25c6d7=/checked\s*(?:[^=]|=\s*.checked.)/i,_0x3e99b2=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function _0xa1ccbb(_0x226d43,_0x348ba8){return _0x2aac73(_0x226d43,a0_0x5a29('0x3fa'))&&_0x2aac73(0xb!==_0x348ba8['nodeType']?_0x348ba8:_0x348ba8[a0_0x5a29('0x5a1')],'tr')&&_0xd48b4d(_0x226d43)['children']('tbody')[0x0]||_0x226d43;}function _0x5659ea(_0x3effc2){return _0x3effc2[a0_0x5a29('0x519')]=(null!==_0x3effc2['getAttribute'](a0_0x5a29('0x519')))+'/'+_0x3effc2['type'],_0x3effc2;}function _0x805c86(_0x9f0f4a){return'true/'===(_0x9f0f4a[a0_0x5a29('0x519')]||'')['slice'](0x0,0x5)?_0x9f0f4a[a0_0x5a29('0x519')]=_0x9f0f4a[a0_0x5a29('0x519')][a0_0x5a29('0x723')](0x5):_0x9f0f4a[a0_0x5a29('0x661')](a0_0x5a29('0x519')),_0x9f0f4a;}function _0x200cf1(_0x20d12b,_0x1f1bf0){var _0x4034ff,_0x3aa32a,_0x1858b1,_0x6ce0b2,_0x443124,_0x386e45;if(0x1===_0x1f1bf0[a0_0x5a29('0x23f')]){if(_0x369848[a0_0x5a29('0x223')](_0x20d12b)&&(_0x386e45=_0x369848[a0_0x5a29('0x1e')](_0x20d12b)[a0_0x5a29('0x24c')]))for(_0x1858b1 in(_0x369848[a0_0x5a29('0x157')](_0x1f1bf0,a0_0x5a29('0x8d2')),_0x386e45))for(_0x4034ff=0x0,_0x3aa32a=_0x386e45[_0x1858b1][a0_0x5a29('0x515')];_0x4034ff<_0x3aa32a;_0x4034ff++)_0xd48b4d[a0_0x5a29('0x204')]['add'](_0x1f1bf0,_0x1858b1,_0x386e45[_0x1858b1][_0x4034ff]);_0x4834de[a0_0x5a29('0x223')](_0x20d12b)&&(_0x6ce0b2=_0x4834de[a0_0x5a29('0x2c')](_0x20d12b),_0x443124=_0xd48b4d[a0_0x5a29('0x630')]({},_0x6ce0b2),_0x4834de[a0_0x5a29('0x2c8')](_0x1f1bf0,_0x443124));}}function _0x3a0a87(_0x246343,_0x51f27e){var _0x24f92c=_0x51f27e[a0_0x5a29('0x63b')]['toLowerCase']();'input'===_0x24f92c&&_0x1841c6[a0_0x5a29('0x25e')](_0x246343['type'])?_0x51f27e['checked']=_0x246343[a0_0x5a29('0x289')]:a0_0x5a29('0x889')!==_0x24f92c&&a0_0x5a29('0x3c4')!==_0x24f92c||(_0x51f27e[a0_0x5a29('0x3d0')]=_0x246343['defaultValue']);}function _0x26b96b(_0x4a1f21,_0x2a088c,_0x4dcb42,_0x11a430){_0x2a088c=_0x5a3925(_0x2a088c);var _0xe37f6f,_0xcbebc6,_0x4338af,_0x12ed48,_0x4a1b3f,_0x465fab,_0x5d9ef8=0x0,_0x1287c0=_0x4a1f21['length'],_0x1e0d3e=_0x1287c0-0x1,_0x3b3bfe=_0x2a088c[0x0],_0x381fff=_0x3512f3(_0x3b3bfe);if(_0x381fff||_0x1287c0>0x1&&'string'==typeof _0x3b3bfe&&!_0x1da227[a0_0x5a29('0x4cb')]&&_0x25c6d7['test'](_0x3b3bfe))return _0x4a1f21[a0_0x5a29('0x6bc')](function(_0x25ecb9){var _0x56da44=_0x4a1f21['eq'](_0x25ecb9);_0x381fff&&(_0x2a088c[0x0]=_0x3b3bfe['call'](this,_0x25ecb9,_0x56da44['html']())),_0x26b96b(_0x56da44,_0x2a088c,_0x4dcb42,_0x11a430);});if(_0x1287c0&&(_0xcbebc6=(_0xe37f6f=_0x4bbcd4(_0x2a088c,_0x4a1f21[0x0][a0_0x5a29('0x23b')],!0x1,_0x4a1f21,_0x11a430))['firstChild'],0x1===_0xe37f6f[a0_0x5a29('0x73c')][a0_0x5a29('0x515')]&&(_0xe37f6f=_0xcbebc6),_0xcbebc6||_0x11a430)){for(_0x12ed48=(_0x4338af=_0xd48b4d['map'](_0x596cff(_0xe37f6f,'script'),_0x5659ea))[a0_0x5a29('0x515')];_0x5d9ef8<_0x1287c0;_0x5d9ef8++)_0x4a1b3f=_0xe37f6f,_0x5d9ef8!==_0x1e0d3e&&(_0x4a1b3f=_0xd48b4d[a0_0x5a29('0x218')](_0x4a1b3f,!0x0,!0x0),_0x12ed48&&_0xd48b4d[a0_0x5a29('0x65f')](_0x4338af,_0x596cff(_0x4a1b3f,a0_0x5a29('0x633')))),_0x4dcb42[a0_0x5a29('0x351')](_0x4a1f21[_0x5d9ef8],_0x4a1b3f,_0x5d9ef8);if(_0x12ed48)for(_0x465fab=_0x4338af[_0x4338af['length']-0x1][a0_0x5a29('0x23b')],_0xd48b4d[a0_0x5a29('0x95a')](_0x4338af,_0x805c86),_0x5d9ef8=0x0;_0x5d9ef8<_0x12ed48;_0x5d9ef8++)_0x4a1b3f=_0x4338af[_0x5d9ef8],_0x53879c[a0_0x5a29('0x25e')](_0x4a1b3f[a0_0x5a29('0x519')]||'')&&!_0x369848[a0_0x5a29('0x2c')](_0x4a1b3f,a0_0x5a29('0x66'))&&_0xd48b4d['contains'](_0x465fab,_0x4a1b3f)&&(_0x4a1b3f[a0_0x5a29('0x561')]&&a0_0x5a29('0x420')!==(_0x4a1b3f[a0_0x5a29('0x519')]||'')[a0_0x5a29('0x792')]()?_0xd48b4d['_evalUrl']&&!_0x4a1b3f[a0_0x5a29('0x916')]&&_0xd48b4d[a0_0x5a29('0x170')](_0x4a1b3f[a0_0x5a29('0x561')],{'nonce':_0x4a1b3f['nonce']||_0x4a1b3f['getAttribute'](a0_0x5a29('0x577'))},_0x465fab):_0x454230(_0x4a1b3f['textContent'][a0_0x5a29('0x380')](_0x3e99b2,''),_0x4a1b3f,_0x465fab));}return _0x4a1f21;}function _0x26dcd9(_0xba2cc8,_0xf5810f,_0x68d630){for(var _0x21157c,_0x3664c9=_0xf5810f?_0xd48b4d[a0_0x5a29('0x48a')](_0xf5810f,_0xba2cc8):_0xba2cc8,_0x495227=0x0;null!=(_0x21157c=_0x3664c9[_0x495227]);_0x495227++)_0x68d630||0x1!==_0x21157c[a0_0x5a29('0x23f')]||_0xd48b4d[a0_0x5a29('0x76a')](_0x596cff(_0x21157c)),_0x21157c[a0_0x5a29('0x3d5')]&&(_0x68d630&&_0x50a043(_0x21157c)&&_0x5e307e(_0x596cff(_0x21157c,a0_0x5a29('0x633'))),_0x21157c[a0_0x5a29('0x3d5')][a0_0x5a29('0x58e')](_0x21157c));return _0xba2cc8;}_0xd48b4d[a0_0x5a29('0x630')]({'htmlPrefilter':function(_0x7e516b){return _0x7e516b;},'clone':function(_0x4189f6,_0x468234,_0x40b301){var _0x4cf3c8,_0x437f89,_0x1386f6,_0xeb2a52,_0x28840d=_0x4189f6[a0_0x5a29('0x3f2')](!0x0),_0x35c357=_0x50a043(_0x4189f6);if(!(_0x1da227[a0_0x5a29('0x4d3')]||0x1!==_0x4189f6[a0_0x5a29('0x23f')]&&0xb!==_0x4189f6['nodeType']||_0xd48b4d[a0_0x5a29('0x589')](_0x4189f6)))for(_0xeb2a52=_0x596cff(_0x28840d),_0x4cf3c8=0x0,_0x437f89=(_0x1386f6=_0x596cff(_0x4189f6))['length'];_0x4cf3c8<_0x437f89;_0x4cf3c8++)_0x3a0a87(_0x1386f6[_0x4cf3c8],_0xeb2a52[_0x4cf3c8]);if(_0x468234){if(_0x40b301)for(_0x1386f6=_0x1386f6||_0x596cff(_0x4189f6),_0xeb2a52=_0xeb2a52||_0x596cff(_0x28840d),_0x4cf3c8=0x0,_0x437f89=_0x1386f6[a0_0x5a29('0x515')];_0x4cf3c8<_0x437f89;_0x4cf3c8++)_0x200cf1(_0x1386f6[_0x4cf3c8],_0xeb2a52[_0x4cf3c8]);else _0x200cf1(_0x4189f6,_0x28840d);}return(_0xeb2a52=_0x596cff(_0x28840d,a0_0x5a29('0x633')))[a0_0x5a29('0x515')]>0x0&&_0x5e307e(_0xeb2a52,!_0x35c357&&_0x596cff(_0x4189f6,a0_0x5a29('0x633'))),_0x28840d;},'cleanData':function(_0x4b0a59){for(var _0x599139,_0x1438e8,_0x5a9e64,_0x77138d=_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')],_0x1425b0=0x0;void 0x0!==(_0x1438e8=_0x4b0a59[_0x1425b0]);_0x1425b0++)if(_0x12d87f(_0x1438e8)){if(_0x599139=_0x1438e8[_0x369848['expando']]){if(_0x599139[a0_0x5a29('0x24c')])for(_0x5a9e64 in _0x599139['events'])_0x77138d[_0x5a9e64]?_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x157')](_0x1438e8,_0x5a9e64):_0xd48b4d[a0_0x5a29('0x256')](_0x1438e8,_0x5a9e64,_0x599139[a0_0x5a29('0x890')]);_0x1438e8[_0x369848['expando']]=void 0x0;}_0x1438e8[_0x4834de[a0_0x5a29('0x385')]]&&(_0x1438e8[_0x4834de[a0_0x5a29('0x385')]]=void 0x0);}}}),_0xd48b4d['fn'][a0_0x5a29('0x630')]({'detach':function(_0x156485){return _0x26dcd9(this,_0x156485,!0x0);},'remove':function(_0x4e4f9d){return _0x26dcd9(this,_0x4e4f9d);},'text':function(_0x1150d6){return _0x3a4acb(this,function(_0x59216){return void 0x0===_0x59216?_0xd48b4d[a0_0x5a29('0x3ce')](this):this[a0_0x5a29('0x313')]()['each'](function(){0x1!==this[a0_0x5a29('0x23f')]&&0xb!==this[a0_0x5a29('0x23f')]&&0x9!==this['nodeType']||(this[a0_0x5a29('0x627')]=_0x59216);});},null,_0x1150d6,arguments[a0_0x5a29('0x515')]);},'append':function(){return _0x26b96b(this,arguments,function(_0x122742){0x1!==this[a0_0x5a29('0x23f')]&&0xb!==this['nodeType']&&0x9!==this[a0_0x5a29('0x23f')]||_0xa1ccbb(this,_0x122742)[a0_0x5a29('0x365')](_0x122742);});},'prepend':function(){return _0x26b96b(this,arguments,function(_0x456e88){if(0x1===this[a0_0x5a29('0x23f')]||0xb===this[a0_0x5a29('0x23f')]||0x9===this[a0_0x5a29('0x23f')]){var _0x2e6a79=_0xa1ccbb(this,_0x456e88);_0x2e6a79[a0_0x5a29('0x925')](_0x456e88,_0x2e6a79[a0_0x5a29('0x5a1')]);}});},'before':function(){return _0x26b96b(this,arguments,function(_0x45ae8e){this[a0_0x5a29('0x3d5')]&&this['parentNode'][a0_0x5a29('0x925')](_0x45ae8e,this);});},'after':function(){return _0x26b96b(this,arguments,function(_0x48312f){this[a0_0x5a29('0x3d5')]&&this[a0_0x5a29('0x3d5')][a0_0x5a29('0x925')](_0x48312f,this['nextSibling']);});},'empty':function(){for(var _0x413a87,_0x3d4ce3=0x0;null!=(_0x413a87=this[_0x3d4ce3]);_0x3d4ce3++)0x1===_0x413a87['nodeType']&&(_0xd48b4d[a0_0x5a29('0x76a')](_0x596cff(_0x413a87,!0x1)),_0x413a87[a0_0x5a29('0x627')]='');return this;},'clone':function(_0xcc494f,_0x3695a2){return _0xcc494f=null!=_0xcc494f&&_0xcc494f,_0x3695a2=null==_0x3695a2?_0xcc494f:_0x3695a2,this['map'](function(){return _0xd48b4d[a0_0x5a29('0x218')](this,_0xcc494f,_0x3695a2);});},'html':function(_0x11dcca){return _0x3a4acb(this,function(_0x5dea51){var _0x5612c5=this[0x0]||{},_0x4a895a=0x0,_0x4694ca=this[a0_0x5a29('0x515')];if(void 0x0===_0x5dea51&&0x1===_0x5612c5['nodeType'])return _0x5612c5[a0_0x5a29('0x13d')];if(a0_0x5a29('0x783')==typeof _0x5dea51&&!_0x3be163['test'](_0x5dea51)&&!_0x109c9c[(_0x5af4e4['exec'](_0x5dea51)||['',''])[0x1][a0_0x5a29('0x792')]()]){_0x5dea51=_0xd48b4d[a0_0x5a29('0xd3')](_0x5dea51);try{for(;_0x4a895a<_0x4694ca;_0x4a895a++)0x1===(_0x5612c5=this[_0x4a895a]||{})[a0_0x5a29('0x23f')]&&(_0xd48b4d[a0_0x5a29('0x76a')](_0x596cff(_0x5612c5,!0x1)),_0x5612c5[a0_0x5a29('0x13d')]=_0x5dea51);_0x5612c5=0x0;}catch(_0x212c25){}}_0x5612c5&&this[a0_0x5a29('0x313')]()[a0_0x5a29('0x89d')](_0x5dea51);},null,_0x11dcca,arguments['length']);},'replaceWith':function(){var _0x5d7f33=[];return _0x26b96b(this,arguments,function(_0x38effa){var _0x224006=this['parentNode'];_0xd48b4d['inArray'](this,_0x5d7f33)<0x0&&(_0xd48b4d[a0_0x5a29('0x76a')](_0x596cff(this)),_0x224006&&_0x224006[a0_0x5a29('0x345')](_0x38effa,this));},_0x5d7f33);}}),_0xd48b4d[a0_0x5a29('0x6bc')]({'appendTo':a0_0x5a29('0x89d'),'prependTo':a0_0x5a29('0x78f'),'insertBefore':a0_0x5a29('0x8e6'),'insertAfter':'after','replaceAll':'replaceWith'},function(_0x432a5d,_0x36b136){_0xd48b4d['fn'][_0x432a5d]=function(_0x1230e5){for(var _0x3fa96a,_0x2f2b84=[],_0x5e26b0=_0xd48b4d(_0x1230e5),_0xd9b3c0=_0x5e26b0[a0_0x5a29('0x515')]-0x1,_0x52fa46=0x0;_0x52fa46<=_0xd9b3c0;_0x52fa46++)_0x3fa96a=_0x52fa46===_0xd9b3c0?this:this[a0_0x5a29('0x218')](!0x0),_0xd48b4d(_0x5e26b0[_0x52fa46])[_0x36b136](_0x3fa96a),_0x47a061[a0_0x5a29('0x758')](_0x2f2b84,_0x3fa96a[a0_0x5a29('0x1e')]());return this[a0_0x5a29('0x54b')](_0x2f2b84);};});var _0xc462f7=new RegExp('^('+_0x4aec78+a0_0x5a29('0x73e'),'i'),_0x58b582=function(_0xeb4700){var _0x25cda8=_0xeb4700[a0_0x5a29('0x23b')]['defaultView'];return _0x25cda8&&_0x25cda8[a0_0x5a29('0x51d')]||(_0x25cda8=_0x2c3983),_0x25cda8[a0_0x5a29('0x8a')](_0xeb4700);},_0x4cfa6=function(_0xe12a9c,_0x522989,_0x243838){var _0x32505a,_0xfb7dee,_0x526529={};for(_0xfb7dee in _0x522989)_0x526529[_0xfb7dee]=_0xe12a9c['style'][_0xfb7dee],_0xe12a9c[a0_0x5a29('0x46a')][_0xfb7dee]=_0x522989[_0xfb7dee];for(_0xfb7dee in(_0x32505a=_0x243838[a0_0x5a29('0x351')](_0xe12a9c),_0x522989))_0xe12a9c[a0_0x5a29('0x46a')][_0xfb7dee]=_0x526529[_0xfb7dee];return _0x32505a;},_0x6e44d3=new RegExp(_0x1f28fd['join']('|'),'i');function _0x2c8577(_0x537aa7,_0x3ed3cc,_0x4e1373){var _0x56e37f,_0x111c81,_0x420a2e,_0xf738e2,_0x24b06a=_0x537aa7[a0_0x5a29('0x46a')];return(_0x4e1373=_0x4e1373||_0x58b582(_0x537aa7))&&(''!==(_0xf738e2=_0x4e1373[a0_0x5a29('0xc0')](_0x3ed3cc)||_0x4e1373[_0x3ed3cc])||_0x50a043(_0x537aa7)||(_0xf738e2=_0xd48b4d[a0_0x5a29('0x46a')](_0x537aa7,_0x3ed3cc)),!_0x1da227['pixelBoxStyles']()&&_0xc462f7[a0_0x5a29('0x25e')](_0xf738e2)&&_0x6e44d3[a0_0x5a29('0x25e')](_0x3ed3cc)&&(_0x56e37f=_0x24b06a[a0_0x5a29('0x96f')],_0x111c81=_0x24b06a[a0_0x5a29('0x932')],_0x420a2e=_0x24b06a[a0_0x5a29('0x8d0')],_0x24b06a[a0_0x5a29('0x932')]=_0x24b06a['maxWidth']=_0x24b06a[a0_0x5a29('0x96f')]=_0xf738e2,_0xf738e2=_0x4e1373['width'],_0x24b06a[a0_0x5a29('0x96f')]=_0x56e37f,_0x24b06a[a0_0x5a29('0x932')]=_0x111c81,_0x24b06a[a0_0x5a29('0x8d0')]=_0x420a2e)),void 0x0!==_0xf738e2?_0xf738e2+'':_0xf738e2;}function _0x5e9df6(_0x2b07ee,_0x10e855){return{'get':function(){if(!_0x2b07ee())return(this[a0_0x5a29('0x1e')]=_0x10e855)[a0_0x5a29('0x758')](this,arguments);delete this['get'];}};}!function(){function _0x1c16f0(){if(_0x5deb44){_0x426624[a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x1f0'),_0x5deb44[a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x753'),_0x2cb20b['appendChild'](_0x426624)['appendChild'](_0x5deb44);var _0x55d139=_0x2c3983[a0_0x5a29('0x8a')](_0x5deb44);_0x421683='1%'!==_0x55d139[a0_0x5a29('0x5ad')],_0x1c0d4d=0xc===_0x11aff4(_0x55d139['marginLeft']),_0x5deb44[a0_0x5a29('0x46a')][a0_0x5a29('0x2b0')]=a0_0x5a29('0x5fe'),_0x47ad1b=0x24===_0x11aff4(_0x55d139[a0_0x5a29('0x2b0')]),_0x1610df=0x24===_0x11aff4(_0x55d139[a0_0x5a29('0x96f')]),_0x5deb44[a0_0x5a29('0x46a')]['position']=a0_0x5a29('0x379'),_0xd0ac69=0xc===_0x11aff4(_0x5deb44[a0_0x5a29('0x44e')]/0x3),_0x2cb20b[a0_0x5a29('0x58e')](_0x426624),_0x5deb44=null;}}function _0x11aff4(_0x1a1d6c){return Math[a0_0x5a29('0x6e7')](parseFloat(_0x1a1d6c));}var _0x421683,_0x1610df,_0xd0ac69,_0x47ad1b,_0x2b1b78,_0x1c0d4d,_0x426624=_0x45f8a9[a0_0x5a29('0x56f')](a0_0x5a29('0x884')),_0x5deb44=_0x45f8a9['createElement']('div');_0x5deb44[a0_0x5a29('0x46a')]&&(_0x5deb44['style']['backgroundClip']=a0_0x5a29('0x417'),_0x5deb44[a0_0x5a29('0x3f2')](!0x0)['style'][a0_0x5a29('0x32e')]='',_0x1da227[a0_0x5a29('0x7ca')]=a0_0x5a29('0x417')===_0x5deb44[a0_0x5a29('0x46a')][a0_0x5a29('0x32e')],_0xd48b4d['extend'](_0x1da227,{'boxSizingReliable':function(){return _0x1c16f0(),_0x1610df;},'pixelBoxStyles':function(){return _0x1c16f0(),_0x47ad1b;},'pixelPosition':function(){return _0x1c16f0(),_0x421683;},'reliableMarginLeft':function(){return _0x1c16f0(),_0x1c0d4d;},'scrollboxSize':function(){return _0x1c16f0(),_0xd0ac69;},'reliableTrDimensions':function(){var _0x4a712b,_0x5a7c57,_0x430943,_0x219775;return null==_0x2b1b78&&(_0x4a712b=_0x45f8a9[a0_0x5a29('0x56f')](a0_0x5a29('0x3fa')),_0x5a7c57=_0x45f8a9[a0_0x5a29('0x56f')]('tr'),_0x430943=_0x45f8a9[a0_0x5a29('0x56f')](a0_0x5a29('0x884')),_0x4a712b[a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0xdb'),_0x5a7c57[a0_0x5a29('0x46a')][a0_0x5a29('0x6b7')]=a0_0x5a29('0x3f3'),_0x430943[a0_0x5a29('0x46a')]['height']=a0_0x5a29('0x1ad'),_0x2cb20b[a0_0x5a29('0x365')](_0x4a712b)['appendChild'](_0x5a7c57)[a0_0x5a29('0x365')](_0x430943),_0x219775=_0x2c3983[a0_0x5a29('0x8a')](_0x5a7c57),_0x2b1b78=parseInt(_0x219775[a0_0x5a29('0x6b7')])>0x3,_0x2cb20b[a0_0x5a29('0x58e')](_0x4a712b)),_0x2b1b78;}}));}();var _0x14563e=['Webkit',a0_0x5a29('0x28c'),'ms'],_0x3b48d8=_0x45f8a9[a0_0x5a29('0x56f')](a0_0x5a29('0x884'))[a0_0x5a29('0x46a')],_0x119129={};function _0x2d930a(_0xacc900){var _0x1b6a23=_0xd48b4d[a0_0x5a29('0xe6')][_0xacc900]||_0x119129[_0xacc900];return _0x1b6a23||(_0xacc900 in _0x3b48d8?_0xacc900:_0x119129[_0xacc900]=function(_0x3fcaf5){for(var _0x185841=_0x3fcaf5[0x0][a0_0x5a29('0x3cf')]()+_0x3fcaf5['slice'](0x1),_0x2b11d0=_0x14563e[a0_0x5a29('0x515')];_0x2b11d0--;)if((_0x3fcaf5=_0x14563e[_0x2b11d0]+_0x185841)in _0x3b48d8)return _0x3fcaf5;}(_0xacc900)||_0xacc900);}var _0x183190=/^(none|table(?!-c[ea]).+)/,_0x25b3c3=/^--/,_0x4ab5a6={'position':a0_0x5a29('0x379'),'visibility':a0_0x5a29('0x37d'),'display':a0_0x5a29('0xb0')},_0x4703e4={'letterSpacing':'0','fontWeight':a0_0x5a29('0x335')};function _0x1c71ea(_0x259694,_0xb23884,_0x27bf7b){var _0x1ed5d4=_0x2256b2[a0_0x5a29('0x2d5')](_0xb23884);return _0x1ed5d4?Math['max'](0x0,_0x1ed5d4[0x2]-(_0x27bf7b||0x0))+(_0x1ed5d4[0x3]||'px'):_0xb23884;}function _0x4b46a0(_0x5ce81c,_0x366c0e,_0x400589,_0xfac19,_0x12d63a,_0x1580cb){var _0x49adaf=a0_0x5a29('0x96f')===_0x366c0e?0x1:0x0,_0x3679a6=0x0,_0x440885=0x0;if(_0x400589===(_0xfac19?'border':a0_0x5a29('0x7da')))return 0x0;for(;_0x49adaf<0x4;_0x49adaf+=0x2)a0_0x5a29('0x5f')===_0x400589&&(_0x440885+=_0xd48b4d[a0_0x5a29('0x54')](_0x5ce81c,_0x400589+_0x1f28fd[_0x49adaf],!0x0,_0x12d63a)),_0xfac19?('content'===_0x400589&&(_0x440885-=_0xd48b4d[a0_0x5a29('0x54')](_0x5ce81c,a0_0x5a29('0x6ca')+_0x1f28fd[_0x49adaf],!0x0,_0x12d63a)),a0_0x5a29('0x5f')!==_0x400589&&(_0x440885-=_0xd48b4d[a0_0x5a29('0x54')](_0x5ce81c,a0_0x5a29('0xee')+_0x1f28fd[_0x49adaf]+'Width',!0x0,_0x12d63a))):(_0x440885+=_0xd48b4d[a0_0x5a29('0x54')](_0x5ce81c,'padding'+_0x1f28fd[_0x49adaf],!0x0,_0x12d63a),'padding'!==_0x400589?_0x440885+=_0xd48b4d[a0_0x5a29('0x54')](_0x5ce81c,a0_0x5a29('0xee')+_0x1f28fd[_0x49adaf]+a0_0x5a29('0x76c'),!0x0,_0x12d63a):_0x3679a6+=_0xd48b4d[a0_0x5a29('0x54')](_0x5ce81c,a0_0x5a29('0xee')+_0x1f28fd[_0x49adaf]+'Width',!0x0,_0x12d63a));return!_0xfac19&&_0x1580cb>=0x0&&(_0x440885+=Math[a0_0x5a29('0x670')](0x0,Math[a0_0x5a29('0x846')](_0x5ce81c[a0_0x5a29('0x58d')+_0x366c0e[0x0][a0_0x5a29('0x3cf')]()+_0x366c0e[a0_0x5a29('0x723')](0x1)]-_0x1580cb-_0x440885-_0x3679a6-0.5))||0x0),_0x440885;}function _0x361593(_0xeac969,_0x419003,_0x1cc8ee){var _0x4cb08f=_0x58b582(_0xeac969),_0x4afc1b=(!_0x1da227[a0_0x5a29('0x58c')]()||_0x1cc8ee)&&'border-box'===_0xd48b4d[a0_0x5a29('0x54')](_0xeac969,a0_0x5a29('0x666'),!0x1,_0x4cb08f),_0x518230=_0x4afc1b,_0x5d3846=_0x2c8577(_0xeac969,_0x419003,_0x4cb08f),_0x35746f=a0_0x5a29('0x58d')+_0x419003[0x0][a0_0x5a29('0x3cf')]()+_0x419003[a0_0x5a29('0x723')](0x1);if(_0xc462f7[a0_0x5a29('0x25e')](_0x5d3846)){if(!_0x1cc8ee)return _0x5d3846;_0x5d3846='auto';}return(!_0x1da227['boxSizingReliable']()&&_0x4afc1b||!_0x1da227['reliableTrDimensions']()&&_0x2aac73(_0xeac969,'tr')||a0_0x5a29('0x796')===_0x5d3846||!parseFloat(_0x5d3846)&&a0_0x5a29('0x705')===_0xd48b4d[a0_0x5a29('0x54')](_0xeac969,a0_0x5a29('0x625'),!0x1,_0x4cb08f))&&_0xeac969[a0_0x5a29('0x2b9')]()[a0_0x5a29('0x515')]&&(_0x4afc1b='border-box'===_0xd48b4d[a0_0x5a29('0x54')](_0xeac969,a0_0x5a29('0x666'),!0x1,_0x4cb08f),(_0x518230=_0x35746f in _0xeac969)&&(_0x5d3846=_0xeac969[_0x35746f])),(_0x5d3846=parseFloat(_0x5d3846)||0x0)+_0x4b46a0(_0xeac969,_0x419003,_0x1cc8ee||(_0x4afc1b?a0_0x5a29('0xee'):a0_0x5a29('0x7da')),_0x518230,_0x4cb08f,_0x5d3846)+'px';}function _0x238aa7(_0x3afe35,_0x45115b,_0x22b80b,_0x903bce,_0x4af0d2){return new _0x238aa7[(a0_0x5a29('0x928'))][(a0_0x5a29('0x1ac'))](_0x3afe35,_0x45115b,_0x22b80b,_0x903bce,_0x4af0d2);}_0xd48b4d[a0_0x5a29('0x630')]({'cssHooks':{'opacity':{'get':function(_0x42afa4,_0x396640){if(_0x396640){var _0x1897ae=_0x2c8577(_0x42afa4,a0_0x5a29('0x538'));return''===_0x1897ae?'1':_0x1897ae;}}}},'cssNumber':{'animationIterationCount':!0x0,'columnCount':!0x0,'fillOpacity':!0x0,'flexGrow':!0x0,'flexShrink':!0x0,'fontWeight':!0x0,'gridArea':!0x0,'gridColumn':!0x0,'gridColumnEnd':!0x0,'gridColumnStart':!0x0,'gridRow':!0x0,'gridRowEnd':!0x0,'gridRowStart':!0x0,'lineHeight':!0x0,'opacity':!0x0,'order':!0x0,'orphans':!0x0,'widows':!0x0,'zIndex':!0x0,'zoom':!0x0},'cssProps':{},'style':function(_0x1652f8,_0x2046e6,_0xae08c1,_0x5d6d4e){if(_0x1652f8&&0x3!==_0x1652f8[a0_0x5a29('0x23f')]&&0x8!==_0x1652f8['nodeType']&&_0x1652f8[a0_0x5a29('0x46a')]){var _0x364836,_0x330b50,_0x24b927,_0x5166d4=_0x65089b(_0x2046e6),_0x47b9c8=_0x25b3c3[a0_0x5a29('0x25e')](_0x2046e6),_0x1f8d29=_0x1652f8[a0_0x5a29('0x46a')];if(_0x47b9c8||(_0x2046e6=_0x2d930a(_0x5166d4)),_0x24b927=_0xd48b4d[a0_0x5a29('0x555')][_0x2046e6]||_0xd48b4d[a0_0x5a29('0x555')][_0x5166d4],void 0x0===_0xae08c1)return _0x24b927&&a0_0x5a29('0x1e')in _0x24b927&&void 0x0!==(_0x364836=_0x24b927[a0_0x5a29('0x1e')](_0x1652f8,!0x1,_0x5d6d4e))?_0x364836:_0x1f8d29[_0x2046e6];a0_0x5a29('0x783')===(_0x330b50=typeof _0xae08c1)&&(_0x364836=_0x2256b2[a0_0x5a29('0x2d5')](_0xae08c1))&&_0x364836[0x1]&&(_0xae08c1=_0x3e48f2(_0x1652f8,_0x2046e6,_0x364836),_0x330b50=a0_0x5a29('0x777')),null!=_0xae08c1&&_0xae08c1==_0xae08c1&&(a0_0x5a29('0x777')!==_0x330b50||_0x47b9c8||(_0xae08c1+=_0x364836&&_0x364836[0x3]||(_0xd48b4d[a0_0x5a29('0x74b')][_0x5166d4]?'':'px')),_0x1da227['clearCloneStyle']||''!==_0xae08c1||0x0!==_0x2046e6[a0_0x5a29('0x26f')]('background')||(_0x1f8d29[_0x2046e6]='inherit'),_0x24b927&&'set'in _0x24b927&&void 0x0===(_0xae08c1=_0x24b927[a0_0x5a29('0x2c8')](_0x1652f8,_0xae08c1,_0x5d6d4e))||(_0x47b9c8?_0x1f8d29[a0_0x5a29('0x163')](_0x2046e6,_0xae08c1):_0x1f8d29[_0x2046e6]=_0xae08c1));}},'css':function(_0x3e501d,_0x52536d,_0x410efa,_0x4e0159){var _0x5f1dda,_0x41d7d9,_0x262586,_0x58f6b1=_0x65089b(_0x52536d);return _0x25b3c3[a0_0x5a29('0x25e')](_0x52536d)||(_0x52536d=_0x2d930a(_0x58f6b1)),(_0x262586=_0xd48b4d[a0_0x5a29('0x555')][_0x52536d]||_0xd48b4d['cssHooks'][_0x58f6b1])&&a0_0x5a29('0x1e')in _0x262586&&(_0x5f1dda=_0x262586['get'](_0x3e501d,!0x0,_0x410efa)),void 0x0===_0x5f1dda&&(_0x5f1dda=_0x2c8577(_0x3e501d,_0x52536d,_0x4e0159)),a0_0x5a29('0x424')===_0x5f1dda&&_0x52536d in _0x4703e4&&(_0x5f1dda=_0x4703e4[_0x52536d]),''===_0x410efa||_0x410efa?(_0x41d7d9=parseFloat(_0x5f1dda),!0x0===_0x410efa||isFinite(_0x41d7d9)?_0x41d7d9||0x0:_0x5f1dda):_0x5f1dda;}}),_0xd48b4d[a0_0x5a29('0x6bc')]([a0_0x5a29('0x6b7'),a0_0x5a29('0x96f')],function(_0x18b949,_0x7b00b2){_0xd48b4d['cssHooks'][_0x7b00b2]={'get':function(_0x41b1f2,_0x149b3f,_0x1c3040){if(_0x149b3f)return!_0x183190[a0_0x5a29('0x25e')](_0xd48b4d[a0_0x5a29('0x54')](_0x41b1f2,'display'))||_0x41b1f2[a0_0x5a29('0x2b9')]()[a0_0x5a29('0x515')]&&_0x41b1f2[a0_0x5a29('0x398')]()[a0_0x5a29('0x96f')]?_0x361593(_0x41b1f2,_0x7b00b2,_0x1c3040):_0x4cfa6(_0x41b1f2,_0x4ab5a6,function(){return _0x361593(_0x41b1f2,_0x7b00b2,_0x1c3040);});},'set':function(_0x480f5d,_0x11cc82,_0x47f340){var _0x32e768,_0x2b2a90=_0x58b582(_0x480f5d),_0x5e7491=!_0x1da227[a0_0x5a29('0x839')]()&&'absolute'===_0x2b2a90[a0_0x5a29('0x53c')],_0x5a4c4f=(_0x5e7491||_0x47f340)&&a0_0x5a29('0x693')===_0xd48b4d['css'](_0x480f5d,a0_0x5a29('0x666'),!0x1,_0x2b2a90),_0x1137bd=_0x47f340?_0x4b46a0(_0x480f5d,_0x7b00b2,_0x47f340,_0x5a4c4f,_0x2b2a90):0x0;return _0x5a4c4f&&_0x5e7491&&(_0x1137bd-=Math[a0_0x5a29('0x846')](_0x480f5d[a0_0x5a29('0x58d')+_0x7b00b2[0x0]['toUpperCase']()+_0x7b00b2[a0_0x5a29('0x723')](0x1)]-parseFloat(_0x2b2a90[_0x7b00b2])-_0x4b46a0(_0x480f5d,_0x7b00b2,a0_0x5a29('0xee'),!0x1,_0x2b2a90)-0.5)),_0x1137bd&&(_0x32e768=_0x2256b2['exec'](_0x11cc82))&&'px'!==(_0x32e768[0x3]||'px')&&(_0x480f5d[a0_0x5a29('0x46a')][_0x7b00b2]=_0x11cc82,_0x11cc82=_0xd48b4d[a0_0x5a29('0x54')](_0x480f5d,_0x7b00b2)),_0x1c71ea(0x0,_0x11cc82,_0x1137bd);}};}),_0xd48b4d[a0_0x5a29('0x555')][a0_0x5a29('0x78c')]=_0x5e9df6(_0x1da227[a0_0x5a29('0x5cd')],function(_0x52ac04,_0x3f56fd){if(_0x3f56fd)return(parseFloat(_0x2c8577(_0x52ac04,a0_0x5a29('0x78c')))||_0x52ac04[a0_0x5a29('0x398')]()[a0_0x5a29('0x3a3')]-_0x4cfa6(_0x52ac04,{'marginLeft':0x0},function(){return _0x52ac04[a0_0x5a29('0x398')]()[a0_0x5a29('0x3a3')];}))+'px';}),_0xd48b4d[a0_0x5a29('0x6bc')]({'margin':'','padding':'','border':a0_0x5a29('0x76c')},function(_0x230628,_0x23ea63){_0xd48b4d[a0_0x5a29('0x555')][_0x230628+_0x23ea63]={'expand':function(_0x2f73e5){for(var _0x18546a=0x0,_0x377832={},_0x43efad=a0_0x5a29('0x783')==typeof _0x2f73e5?_0x2f73e5[a0_0x5a29('0xc5')]('\x20'):[_0x2f73e5];_0x18546a<0x4;_0x18546a++)_0x377832[_0x230628+_0x1f28fd[_0x18546a]+_0x23ea63]=_0x43efad[_0x18546a]||_0x43efad[_0x18546a-0x2]||_0x43efad[0x0];return _0x377832;}},a0_0x5a29('0x5f')!==_0x230628&&(_0xd48b4d[a0_0x5a29('0x555')][_0x230628+_0x23ea63][a0_0x5a29('0x2c8')]=_0x1c71ea);}),_0xd48b4d['fn'][a0_0x5a29('0x630')]({'css':function(_0x285055,_0x3b189f){return _0x3a4acb(this,function(_0x541746,_0x432723,_0x38e86f){var _0x480841,_0x38da33,_0x2045ea={},_0x5b8372=0x0;if(Array[a0_0x5a29('0x7aa')](_0x432723)){for(_0x480841=_0x58b582(_0x541746),_0x38da33=_0x432723[a0_0x5a29('0x515')];_0x5b8372<_0x38da33;_0x5b8372++)_0x2045ea[_0x432723[_0x5b8372]]=_0xd48b4d[a0_0x5a29('0x54')](_0x541746,_0x432723[_0x5b8372],!0x1,_0x480841);return _0x2045ea;}return void 0x0!==_0x38e86f?_0xd48b4d['style'](_0x541746,_0x432723,_0x38e86f):_0xd48b4d['css'](_0x541746,_0x432723);},_0x285055,_0x3b189f,arguments[a0_0x5a29('0x515')]>0x1);}}),_0xd48b4d[a0_0x5a29('0x876')]=_0x238aa7,_0x238aa7['prototype']={'constructor':_0x238aa7,'init':function(_0x34fca1,_0xff29b8,_0x3a11a7,_0x1f6797,_0x4890f6,_0x254db1){this[a0_0x5a29('0x192')]=_0x34fca1,this[a0_0x5a29('0x116')]=_0x3a11a7,this[a0_0x5a29('0x1cd')]=_0x4890f6||_0xd48b4d[a0_0x5a29('0x1cd')][a0_0x5a29('0x4ec')],this['options']=_0xff29b8,this[a0_0x5a29('0x63a')]=this[a0_0x5a29('0x1eb')]=this[a0_0x5a29('0x5bf')](),this[a0_0x5a29('0x120')]=_0x1f6797,this[a0_0x5a29('0x142')]=_0x254db1||(_0xd48b4d['cssNumber'][_0x3a11a7]?'':'px');},'cur':function(){var _0x4fd082=_0x238aa7['propHooks'][this[a0_0x5a29('0x116')]];return _0x4fd082&&_0x4fd082[a0_0x5a29('0x1e')]?_0x4fd082[a0_0x5a29('0x1e')](this):_0x238aa7[a0_0x5a29('0x3a6')]['_default'][a0_0x5a29('0x1e')](this);},'run':function(_0x30ca82){var _0x4074dd,_0x4da0ec=_0x238aa7[a0_0x5a29('0x3a6')][this[a0_0x5a29('0x116')]];return this[a0_0x5a29('0x8ae')][a0_0x5a29('0x707')]?this[a0_0x5a29('0x59d')]=_0x4074dd=_0xd48b4d[a0_0x5a29('0x1cd')][this['easing']](_0x30ca82,this[a0_0x5a29('0x8ae')][a0_0x5a29('0x707')]*_0x30ca82,0x0,0x1,this[a0_0x5a29('0x8ae')]['duration']):this['pos']=_0x4074dd=_0x30ca82,this['now']=(this[a0_0x5a29('0x120')]-this[a0_0x5a29('0x63a')])*_0x4074dd+this[a0_0x5a29('0x63a')],this[a0_0x5a29('0x8ae')][a0_0x5a29('0x460')]&&this[a0_0x5a29('0x8ae')][a0_0x5a29('0x460')]['call'](this[a0_0x5a29('0x192')],this[a0_0x5a29('0x1eb')],this),_0x4da0ec&&_0x4da0ec[a0_0x5a29('0x2c8')]?_0x4da0ec[a0_0x5a29('0x2c8')](this):_0x238aa7[a0_0x5a29('0x3a6')][a0_0x5a29('0x4ec')][a0_0x5a29('0x2c8')](this),this;}},_0x238aa7[a0_0x5a29('0x928')][a0_0x5a29('0x1ac')][a0_0x5a29('0x928')]=_0x238aa7[a0_0x5a29('0x928')],_0x238aa7[a0_0x5a29('0x3a6')]={'_default':{'get':function(_0x588695){var _0x4aa201;return 0x1!==_0x588695[a0_0x5a29('0x192')][a0_0x5a29('0x23f')]||null!=_0x588695[a0_0x5a29('0x192')][_0x588695[a0_0x5a29('0x116')]]&&null==_0x588695['elem'][a0_0x5a29('0x46a')][_0x588695['prop']]?_0x588695[a0_0x5a29('0x192')][_0x588695[a0_0x5a29('0x116')]]:(_0x4aa201=_0xd48b4d[a0_0x5a29('0x54')](_0x588695[a0_0x5a29('0x192')],_0x588695[a0_0x5a29('0x116')],''))&&a0_0x5a29('0x796')!==_0x4aa201?_0x4aa201:0x0;},'set':function(_0x47f58a){_0xd48b4d['fx'][a0_0x5a29('0x460')][_0x47f58a['prop']]?_0xd48b4d['fx']['step'][_0x47f58a['prop']](_0x47f58a):0x1!==_0x47f58a[a0_0x5a29('0x192')]['nodeType']||!_0xd48b4d[a0_0x5a29('0x555')][_0x47f58a[a0_0x5a29('0x116')]]&&null==_0x47f58a[a0_0x5a29('0x192')]['style'][_0x2d930a(_0x47f58a[a0_0x5a29('0x116')])]?_0x47f58a[a0_0x5a29('0x192')][_0x47f58a[a0_0x5a29('0x116')]]=_0x47f58a[a0_0x5a29('0x1eb')]:_0xd48b4d['style'](_0x47f58a['elem'],_0x47f58a[a0_0x5a29('0x116')],_0x47f58a['now']+_0x47f58a[a0_0x5a29('0x142')]);}}},_0x238aa7[a0_0x5a29('0x3a6')][a0_0x5a29('0x1af')]=_0x238aa7[a0_0x5a29('0x3a6')][a0_0x5a29('0x560')]={'set':function(_0x209e7e){_0x209e7e['elem'][a0_0x5a29('0x23f')]&&_0x209e7e[a0_0x5a29('0x192')][a0_0x5a29('0x3d5')]&&(_0x209e7e[a0_0x5a29('0x192')][_0x209e7e['prop']]=_0x209e7e[a0_0x5a29('0x1eb')]);}},_0xd48b4d[a0_0x5a29('0x1cd')]={'linear':function(_0x5ec4b1){return _0x5ec4b1;},'swing':function(_0x3ca2d7){return 0.5-Math['cos'](_0x3ca2d7*Math['PI'])/0x2;},'_default':a0_0x5a29('0x4ee')},_0xd48b4d['fx']=_0x238aa7[a0_0x5a29('0x928')][a0_0x5a29('0x1ac')],_0xd48b4d['fx']['step']={};var _0x2a8a5b,_0x53ed9a,_0xfd0e79=/^(?:toggle|show|hide)$/,_0x397016=/queueHooks$/;function _0x5ce8c9(){_0x53ed9a&&(!0x1===_0x45f8a9[a0_0x5a29('0x37d')]&&_0x2c3983['requestAnimationFrame']?_0x2c3983[a0_0x5a29('0x85e')](_0x5ce8c9):_0x2c3983['setTimeout'](_0x5ce8c9,_0xd48b4d['fx'][a0_0x5a29('0x3f9')]),_0xd48b4d['fx'][a0_0x5a29('0x11f')]());}function _0x1b9559(){return _0x2c3983['setTimeout'](function(){_0x2a8a5b=void 0x0;}),_0x2a8a5b=Date['now']();}function _0x1c0649(_0xf8bd2e,_0x25a80f){var _0x30825c,_0x403faa=0x0,_0x54d8f7={'height':_0xf8bd2e};for(_0x25a80f=_0x25a80f?0x1:0x0;_0x403faa<0x4;_0x403faa+=0x2-_0x25a80f)_0x54d8f7[a0_0x5a29('0x5f')+(_0x30825c=_0x1f28fd[_0x403faa])]=_0x54d8f7[a0_0x5a29('0x6ca')+_0x30825c]=_0xf8bd2e;return _0x25a80f&&(_0x54d8f7['opacity']=_0x54d8f7['width']=_0xf8bd2e),_0x54d8f7;}function _0x5a8681(_0x551b8a,_0x11a076,_0x4a8553){for(var _0x309188,_0x404f68=(_0x330404[a0_0x5a29('0x809')][_0x11a076]||[])[a0_0x5a29('0x6c9')](_0x330404[a0_0x5a29('0x809')]['*']),_0x26369d=0x0,_0x366f75=_0x404f68[a0_0x5a29('0x515')];_0x26369d<_0x366f75;_0x26369d++)if(_0x309188=_0x404f68[_0x26369d][a0_0x5a29('0x351')](_0x4a8553,_0x11a076,_0x551b8a))return _0x309188;}function _0x330404(_0x59a664,_0x41c34f,_0xd186c6){var _0x1fc22b,_0x1c638e,_0x47a2c6=0x0,_0x4a0166=_0x330404[a0_0x5a29('0x5d0')][a0_0x5a29('0x515')],_0x43393e=_0xd48b4d['Deferred']()[a0_0x5a29('0x412')](function(){delete _0x138eee[a0_0x5a29('0x192')];}),_0x138eee=function(){if(_0x1c638e)return!0x1;for(var _0x4f4170=_0x2a8a5b||_0x1b9559(),_0x28c2b4=Math[a0_0x5a29('0x670')](0x0,_0x2c13d1['startTime']+_0x2c13d1[a0_0x5a29('0x707')]-_0x4f4170),_0x35109a=0x1-(_0x28c2b4/_0x2c13d1[a0_0x5a29('0x707')]||0x0),_0x4c1534=0x0,_0x511ebe=_0x2c13d1[a0_0x5a29('0x964')]['length'];_0x4c1534<_0x511ebe;_0x4c1534++)_0x2c13d1[a0_0x5a29('0x964')][_0x4c1534][a0_0x5a29('0x634')](_0x35109a);return _0x43393e[a0_0x5a29('0x47')](_0x59a664,[_0x2c13d1,_0x35109a,_0x28c2b4]),_0x35109a<0x1&&_0x511ebe?_0x28c2b4:(_0x511ebe||_0x43393e[a0_0x5a29('0x47')](_0x59a664,[_0x2c13d1,0x1,0x0]),_0x43393e[a0_0x5a29('0x17c')](_0x59a664,[_0x2c13d1]),!0x1);},_0x2c13d1=_0x43393e[a0_0x5a29('0x743')]({'elem':_0x59a664,'props':_0xd48b4d[a0_0x5a29('0x630')]({},_0x41c34f),'opts':_0xd48b4d[a0_0x5a29('0x630')](!0x0,{'specialEasing':{},'easing':_0xd48b4d[a0_0x5a29('0x1cd')][a0_0x5a29('0x4ec')]},_0xd186c6),'originalProperties':_0x41c34f,'originalOptions':_0xd186c6,'startTime':_0x2a8a5b||_0x1b9559(),'duration':_0xd186c6[a0_0x5a29('0x707')],'tweens':[],'createTween':function(_0xa656b,_0x5ea106){var _0x45c82c=_0xd48b4d[a0_0x5a29('0x876')](_0x59a664,_0x2c13d1[a0_0x5a29('0x36a')],_0xa656b,_0x5ea106,_0x2c13d1[a0_0x5a29('0x36a')][a0_0x5a29('0x430')][_0xa656b]||_0x2c13d1[a0_0x5a29('0x36a')][a0_0x5a29('0x1cd')]);return _0x2c13d1[a0_0x5a29('0x964')]['push'](_0x45c82c),_0x45c82c;},'stop':function(_0x2e6627){var _0x3494ff=0x0,_0x224609=_0x2e6627?_0x2c13d1[a0_0x5a29('0x964')][a0_0x5a29('0x515')]:0x0;if(_0x1c638e)return this;for(_0x1c638e=!0x0;_0x3494ff<_0x224609;_0x3494ff++)_0x2c13d1[a0_0x5a29('0x964')][_0x3494ff][a0_0x5a29('0x634')](0x1);return _0x2e6627?(_0x43393e['notifyWith'](_0x59a664,[_0x2c13d1,0x1,0x0]),_0x43393e[a0_0x5a29('0x17c')](_0x59a664,[_0x2c13d1,_0x2e6627])):_0x43393e[a0_0x5a29('0x514')](_0x59a664,[_0x2c13d1,_0x2e6627]),this;}}),_0xceb1b0=_0x2c13d1[a0_0x5a29('0x119')];for(!function(_0x5d8417,_0x77989a){var _0xd7dbda,_0x260c25,_0x3d993b,_0x50c046,_0x80d050;for(_0xd7dbda in _0x5d8417)if(_0x3d993b=_0x77989a[_0x260c25=_0x65089b(_0xd7dbda)],_0x50c046=_0x5d8417[_0xd7dbda],Array[a0_0x5a29('0x7aa')](_0x50c046)&&(_0x3d993b=_0x50c046[0x1],_0x50c046=_0x5d8417[_0xd7dbda]=_0x50c046[0x0]),_0xd7dbda!==_0x260c25&&(_0x5d8417[_0x260c25]=_0x50c046,delete _0x5d8417[_0xd7dbda]),(_0x80d050=_0xd48b4d[a0_0x5a29('0x555')][_0x260c25])&&a0_0x5a29('0x897')in _0x80d050)for(_0xd7dbda in(_0x50c046=_0x80d050[a0_0x5a29('0x897')](_0x50c046),delete _0x5d8417[_0x260c25],_0x50c046))_0xd7dbda in _0x5d8417||(_0x5d8417[_0xd7dbda]=_0x50c046[_0xd7dbda],_0x77989a[_0xd7dbda]=_0x3d993b);else _0x77989a[_0x260c25]=_0x3d993b;}(_0xceb1b0,_0x2c13d1[a0_0x5a29('0x36a')]['specialEasing']);_0x47a2c6<_0x4a0166;_0x47a2c6++)if(_0x1fc22b=_0x330404[a0_0x5a29('0x5d0')][_0x47a2c6]['call'](_0x2c13d1,_0x59a664,_0xceb1b0,_0x2c13d1[a0_0x5a29('0x36a')]))return _0x3512f3(_0x1fc22b[a0_0x5a29('0x7e3')])&&(_0xd48b4d[a0_0x5a29('0x1a4')](_0x2c13d1[a0_0x5a29('0x192')],_0x2c13d1[a0_0x5a29('0x36a')][a0_0x5a29('0x511')])[a0_0x5a29('0x7e3')]=_0x1fc22b[a0_0x5a29('0x7e3')]['bind'](_0x1fc22b)),_0x1fc22b;return _0xd48b4d[a0_0x5a29('0x95a')](_0xceb1b0,_0x5a8681,_0x2c13d1),_0x3512f3(_0x2c13d1[a0_0x5a29('0x36a')][a0_0x5a29('0x63a')])&&_0x2c13d1[a0_0x5a29('0x36a')]['start'][a0_0x5a29('0x351')](_0x59a664,_0x2c13d1),_0x2c13d1['progress'](_0x2c13d1[a0_0x5a29('0x36a')][a0_0x5a29('0x45b')])[a0_0x5a29('0x610')](_0x2c13d1['opts']['done'],_0x2c13d1[a0_0x5a29('0x36a')]['complete'])['fail'](_0x2c13d1['opts'][a0_0x5a29('0x255')])[a0_0x5a29('0x412')](_0x2c13d1[a0_0x5a29('0x36a')]['always']),_0xd48b4d['fx']['timer'](_0xd48b4d[a0_0x5a29('0x630')](_0x138eee,{'elem':_0x59a664,'anim':_0x2c13d1,'queue':_0x2c13d1[a0_0x5a29('0x36a')]['queue']})),_0x2c13d1;}_0xd48b4d['Animation']=_0xd48b4d[a0_0x5a29('0x630')](_0x330404,{'tweeners':{'*':[function(_0x7ddf8e,_0x34db83){var _0x237d67=this[a0_0x5a29('0x6c8')](_0x7ddf8e,_0x34db83);return _0x3e48f2(_0x237d67[a0_0x5a29('0x192')],_0x7ddf8e,_0x2256b2[a0_0x5a29('0x2d5')](_0x34db83),_0x237d67),_0x237d67;}]},'tweener':function(_0x1505fa,_0x176788){_0x3512f3(_0x1505fa)?(_0x176788=_0x1505fa,_0x1505fa=['*']):_0x1505fa=_0x1505fa[a0_0x5a29('0x7c0')](_0x35c17c);for(var _0x2a18b5,_0x52368a=0x0,_0x3d3420=_0x1505fa[a0_0x5a29('0x515')];_0x52368a<_0x3d3420;_0x52368a++)_0x2a18b5=_0x1505fa[_0x52368a],_0x330404[a0_0x5a29('0x809')][_0x2a18b5]=_0x330404[a0_0x5a29('0x809')][_0x2a18b5]||[],_0x330404[a0_0x5a29('0x809')][_0x2a18b5][a0_0x5a29('0x5dc')](_0x176788);},'prefilters':[function(_0x4cae45,_0xaf66ce,_0x5364d4){var _0xa53fc2,_0x47e42b,_0x2eaadd,_0x2af016,_0x388de6,_0x1ffb78,_0x4d936b,_0x4452a8,_0x59d4b9=a0_0x5a29('0x96f')in _0xaf66ce||'height'in _0xaf66ce,_0x20728a=this,_0x50b95d={},_0x33578c=_0x4cae45[a0_0x5a29('0x46a')],_0x35326e=_0x4cae45[a0_0x5a29('0x23f')]&&_0x284619(_0x4cae45),_0x4d8e09=_0x369848[a0_0x5a29('0x1e')](_0x4cae45,a0_0x5a29('0x69c'));for(_0xa53fc2 in(_0x5364d4['queue']||(null==(_0x2af016=_0xd48b4d['_queueHooks'](_0x4cae45,'fx'))[a0_0x5a29('0x7d1')]&&(_0x2af016['unqueued']=0x0,_0x388de6=_0x2af016[a0_0x5a29('0x313')][a0_0x5a29('0x93a')],_0x2af016['empty'][a0_0x5a29('0x93a')]=function(){_0x2af016['unqueued']||_0x388de6();}),_0x2af016[a0_0x5a29('0x7d1')]++,_0x20728a[a0_0x5a29('0x412')](function(){_0x20728a['always'](function(){_0x2af016['unqueued']--,_0xd48b4d[a0_0x5a29('0x511')](_0x4cae45,'fx')[a0_0x5a29('0x515')]||_0x2af016[a0_0x5a29('0x313')]['fire']();});})),_0xaf66ce))if(_0x47e42b=_0xaf66ce[_0xa53fc2],_0xfd0e79[a0_0x5a29('0x25e')](_0x47e42b)){if(delete _0xaf66ce[_0xa53fc2],_0x2eaadd=_0x2eaadd||a0_0x5a29('0x274')===_0x47e42b,_0x47e42b===(_0x35326e?a0_0x5a29('0x75a'):a0_0x5a29('0x4b1'))){if(a0_0x5a29('0x4b1')!==_0x47e42b||!_0x4d8e09||void 0x0===_0x4d8e09[_0xa53fc2])continue;_0x35326e=!0x0;}_0x50b95d[_0xa53fc2]=_0x4d8e09&&_0x4d8e09[_0xa53fc2]||_0xd48b4d[a0_0x5a29('0x46a')](_0x4cae45,_0xa53fc2);}if((_0x1ffb78=!_0xd48b4d[a0_0x5a29('0x8eb')](_0xaf66ce))||!_0xd48b4d[a0_0x5a29('0x8eb')](_0x50b95d))for(_0xa53fc2 in(_0x59d4b9&&0x1===_0x4cae45['nodeType']&&(_0x5364d4[a0_0x5a29('0x955')]=[_0x33578c[a0_0x5a29('0x955')],_0x33578c[a0_0x5a29('0x2cf')],_0x33578c[a0_0x5a29('0xaf')]],null==(_0x4d936b=_0x4d8e09&&_0x4d8e09[a0_0x5a29('0x625')])&&(_0x4d936b=_0x369848[a0_0x5a29('0x1e')](_0x4cae45,a0_0x5a29('0x625'))),'none'===(_0x4452a8=_0xd48b4d[a0_0x5a29('0x54')](_0x4cae45,a0_0x5a29('0x625')))&&(_0x4d936b?_0x4452a8=_0x4d936b:(_0xe50ac9([_0x4cae45],!0x0),_0x4d936b=_0x4cae45[a0_0x5a29('0x46a')][a0_0x5a29('0x625')]||_0x4d936b,_0x4452a8=_0xd48b4d[a0_0x5a29('0x54')](_0x4cae45,a0_0x5a29('0x625')),_0xe50ac9([_0x4cae45]))),(a0_0x5a29('0x705')===_0x4452a8||a0_0x5a29('0x96e')===_0x4452a8&&null!=_0x4d936b)&&'none'===_0xd48b4d[a0_0x5a29('0x54')](_0x4cae45,a0_0x5a29('0x3b4'))&&(_0x1ffb78||(_0x20728a[a0_0x5a29('0x610')](function(){_0x33578c[a0_0x5a29('0x625')]=_0x4d936b;}),null==_0x4d936b&&(_0x4452a8=_0x33578c[a0_0x5a29('0x625')],_0x4d936b='none'===_0x4452a8?'':_0x4452a8)),_0x33578c[a0_0x5a29('0x625')]=a0_0x5a29('0x96e'))),_0x5364d4[a0_0x5a29('0x955')]&&(_0x33578c[a0_0x5a29('0x955')]=a0_0x5a29('0x37d'),_0x20728a['always'](function(){_0x33578c['overflow']=_0x5364d4[a0_0x5a29('0x955')][0x0],_0x33578c['overflowX']=_0x5364d4[a0_0x5a29('0x955')][0x1],_0x33578c[a0_0x5a29('0xaf')]=_0x5364d4[a0_0x5a29('0x955')][0x2];})),_0x1ffb78=!0x1,_0x50b95d))_0x1ffb78||(_0x4d8e09?a0_0x5a29('0x37d')in _0x4d8e09&&(_0x35326e=_0x4d8e09[a0_0x5a29('0x37d')]):_0x4d8e09=_0x369848['access'](_0x4cae45,a0_0x5a29('0x69c'),{'display':_0x4d936b}),_0x2eaadd&&(_0x4d8e09['hidden']=!_0x35326e),_0x35326e&&_0xe50ac9([_0x4cae45],!0x0),_0x20728a[a0_0x5a29('0x610')](function(){for(_0xa53fc2 in(_0x35326e||_0xe50ac9([_0x4cae45]),_0x369848['remove'](_0x4cae45,'fxshow'),_0x50b95d))_0xd48b4d[a0_0x5a29('0x46a')](_0x4cae45,_0xa53fc2,_0x50b95d[_0xa53fc2]);})),_0x1ffb78=_0x5a8681(_0x35326e?_0x4d8e09[_0xa53fc2]:0x0,_0xa53fc2,_0x20728a),_0xa53fc2 in _0x4d8e09||(_0x4d8e09[_0xa53fc2]=_0x1ffb78[a0_0x5a29('0x63a')],_0x35326e&&(_0x1ffb78[a0_0x5a29('0x120')]=_0x1ffb78[a0_0x5a29('0x63a')],_0x1ffb78[a0_0x5a29('0x63a')]=0x0));}],'prefilter':function(_0x2fb7fa,_0x26fe5d){_0x26fe5d?_0x330404['prefilters']['unshift'](_0x2fb7fa):_0x330404[a0_0x5a29('0x5d0')]['push'](_0x2fb7fa);}}),_0xd48b4d[a0_0x5a29('0x7e1')]=function(_0x43aeaa,_0x2dc1b0,_0x52bba9){var _0x49b00a=_0x43aeaa&&a0_0x5a29('0x950')==typeof _0x43aeaa?_0xd48b4d[a0_0x5a29('0x630')]({},_0x43aeaa):{'complete':_0x52bba9||!_0x52bba9&&_0x2dc1b0||_0x3512f3(_0x43aeaa)&&_0x43aeaa,'duration':_0x43aeaa,'easing':_0x52bba9&&_0x2dc1b0||_0x2dc1b0&&!_0x3512f3(_0x2dc1b0)&&_0x2dc1b0};return _0xd48b4d['fx'][a0_0x5a29('0x59a')]?_0x49b00a[a0_0x5a29('0x707')]=0x0:'number'!=typeof _0x49b00a['duration']&&(_0x49b00a[a0_0x5a29('0x707')]in _0xd48b4d['fx'][a0_0x5a29('0x18d')]?_0x49b00a['duration']=_0xd48b4d['fx']['speeds'][_0x49b00a['duration']]:_0x49b00a[a0_0x5a29('0x707')]=_0xd48b4d['fx'][a0_0x5a29('0x18d')][a0_0x5a29('0x4ec')]),null!=_0x49b00a[a0_0x5a29('0x511')]&&!0x0!==_0x49b00a[a0_0x5a29('0x511')]||(_0x49b00a[a0_0x5a29('0x511')]='fx'),_0x49b00a['old']=_0x49b00a[a0_0x5a29('0x760')],_0x49b00a[a0_0x5a29('0x760')]=function(){_0x3512f3(_0x49b00a[a0_0x5a29('0x2d')])&&_0x49b00a[a0_0x5a29('0x2d')][a0_0x5a29('0x351')](this),_0x49b00a[a0_0x5a29('0x511')]&&_0xd48b4d[a0_0x5a29('0x920')](this,_0x49b00a['queue']);},_0x49b00a;},_0xd48b4d['fn']['extend']({'fadeTo':function(_0x1f56b9,_0x1c0b6a,_0x14fe88,_0x3dbb02){return this[a0_0x5a29('0x48a')](_0x284619)[a0_0x5a29('0x54')](a0_0x5a29('0x538'),0x0)[a0_0x5a29('0x4b1')]()[a0_0x5a29('0x120')]()[a0_0x5a29('0x26')]({'opacity':_0x1c0b6a},_0x1f56b9,_0x14fe88,_0x3dbb02);},'animate':function(_0x2a81e9,_0x3beda4,_0x4701ca,_0x1ee7e5){var _0x483aeb=_0xd48b4d[a0_0x5a29('0x8eb')](_0x2a81e9),_0x3f6fe5=_0xd48b4d[a0_0x5a29('0x7e1')](_0x3beda4,_0x4701ca,_0x1ee7e5),_0x4f97d0=function(){var _0x2d3fcc=_0x330404(this,_0xd48b4d['extend']({},_0x2a81e9),_0x3f6fe5);(_0x483aeb||_0x369848[a0_0x5a29('0x1e')](this,a0_0x5a29('0x73')))&&_0x2d3fcc[a0_0x5a29('0x7e3')](!0x0);};return _0x4f97d0[a0_0x5a29('0x73')]=_0x4f97d0,_0x483aeb||!0x1===_0x3f6fe5[a0_0x5a29('0x511')]?this['each'](_0x4f97d0):this['queue'](_0x3f6fe5['queue'],_0x4f97d0);},'stop':function(_0x71148d,_0x39ca1c,_0x2191ec){var _0xf7d8e0=function(_0xd252e){var _0xcf6db2=_0xd252e['stop'];delete _0xd252e[a0_0x5a29('0x7e3')],_0xcf6db2(_0x2191ec);};return a0_0x5a29('0x783')!=typeof _0x71148d&&(_0x2191ec=_0x39ca1c,_0x39ca1c=_0x71148d,_0x71148d=void 0x0),_0x39ca1c&&this[a0_0x5a29('0x511')](_0x71148d||'fx',[]),this[a0_0x5a29('0x6bc')](function(){var _0x54a9ab=!0x0,_0x44b544=null!=_0x71148d&&_0x71148d+'queueHooks',_0x2a3663=_0xd48b4d['timers'],_0x1c1f40=_0x369848[a0_0x5a29('0x1e')](this);if(_0x44b544)_0x1c1f40[_0x44b544]&&_0x1c1f40[_0x44b544][a0_0x5a29('0x7e3')]&&_0xf7d8e0(_0x1c1f40[_0x44b544]);else for(_0x44b544 in _0x1c1f40)_0x1c1f40[_0x44b544]&&_0x1c1f40[_0x44b544][a0_0x5a29('0x7e3')]&&_0x397016[a0_0x5a29('0x25e')](_0x44b544)&&_0xf7d8e0(_0x1c1f40[_0x44b544]);for(_0x44b544=_0x2a3663[a0_0x5a29('0x515')];_0x44b544--;)_0x2a3663[_0x44b544][a0_0x5a29('0x192')]!==this||null!=_0x71148d&&_0x2a3663[_0x44b544][a0_0x5a29('0x511')]!==_0x71148d||(_0x2a3663[_0x44b544][a0_0x5a29('0x922')]['stop'](_0x2191ec),_0x54a9ab=!0x1,_0x2a3663['splice'](_0x44b544,0x1));!_0x54a9ab&&_0x2191ec||_0xd48b4d['dequeue'](this,_0x71148d);});},'finish':function(_0x214fab){return!0x1!==_0x214fab&&(_0x214fab=_0x214fab||'fx'),this[a0_0x5a29('0x6bc')](function(){var _0x4c592b,_0xc324e5=_0x369848[a0_0x5a29('0x1e')](this),_0x27fe02=_0xc324e5[_0x214fab+'queue'],_0x182beb=_0xc324e5[_0x214fab+a0_0x5a29('0x6ad')],_0x119cc9=_0xd48b4d[a0_0x5a29('0x33b')],_0x55eca6=_0x27fe02?_0x27fe02[a0_0x5a29('0x515')]:0x0;for(_0xc324e5[a0_0x5a29('0x73')]=!0x0,_0xd48b4d[a0_0x5a29('0x511')](this,_0x214fab,[]),_0x182beb&&_0x182beb[a0_0x5a29('0x7e3')]&&_0x182beb[a0_0x5a29('0x7e3')][a0_0x5a29('0x351')](this,!0x0),_0x4c592b=_0x119cc9[a0_0x5a29('0x515')];_0x4c592b--;)_0x119cc9[_0x4c592b][a0_0x5a29('0x192')]===this&&_0x119cc9[_0x4c592b]['queue']===_0x214fab&&(_0x119cc9[_0x4c592b][a0_0x5a29('0x922')]['stop'](!0x0),_0x119cc9[a0_0x5a29('0x250')](_0x4c592b,0x1));for(_0x4c592b=0x0;_0x4c592b<_0x55eca6;_0x4c592b++)_0x27fe02[_0x4c592b]&&_0x27fe02[_0x4c592b]['finish']&&_0x27fe02[_0x4c592b][a0_0x5a29('0x73')]['call'](this);delete _0xc324e5[a0_0x5a29('0x73')];});}}),_0xd48b4d['each'](['toggle',a0_0x5a29('0x4b1'),'hide'],function(_0x34f771,_0x2c243a){var _0x7bc2b3=_0xd48b4d['fn'][_0x2c243a];_0xd48b4d['fn'][_0x2c243a]=function(_0x1bb58a,_0x1d9b9b,_0x386cb9){return null==_0x1bb58a||'boolean'==typeof _0x1bb58a?_0x7bc2b3[a0_0x5a29('0x758')](this,arguments):this['animate'](_0x1c0649(_0x2c243a,!0x0),_0x1bb58a,_0x1d9b9b,_0x386cb9);};}),_0xd48b4d['each']({'slideDown':_0x1c0649(a0_0x5a29('0x4b1')),'slideUp':_0x1c0649('hide'),'slideToggle':_0x1c0649(a0_0x5a29('0x274')),'fadeIn':{'opacity':a0_0x5a29('0x4b1')},'fadeOut':{'opacity':a0_0x5a29('0x75a')},'fadeToggle':{'opacity':a0_0x5a29('0x274')}},function(_0x529daa,_0x289d2e){_0xd48b4d['fn'][_0x529daa]=function(_0x2b9576,_0x4fea55,_0x4de2f5){return this[a0_0x5a29('0x26')](_0x289d2e,_0x2b9576,_0x4fea55,_0x4de2f5);};}),_0xd48b4d[a0_0x5a29('0x33b')]=[],_0xd48b4d['fx'][a0_0x5a29('0x11f')]=function(){var _0x24416c,_0x268ac0=0x0,_0x214438=_0xd48b4d[a0_0x5a29('0x33b')];for(_0x2a8a5b=Date[a0_0x5a29('0x1eb')]();_0x268ac0<_0x214438[a0_0x5a29('0x515')];_0x268ac0++)(_0x24416c=_0x214438[_0x268ac0])()||_0x214438[_0x268ac0]!==_0x24416c||_0x214438[a0_0x5a29('0x250')](_0x268ac0--,0x1);_0x214438[a0_0x5a29('0x515')]||_0xd48b4d['fx']['stop'](),_0x2a8a5b=void 0x0;},_0xd48b4d['fx'][a0_0x5a29('0x828')]=function(_0x10b04d){_0xd48b4d[a0_0x5a29('0x33b')][a0_0x5a29('0x3cd')](_0x10b04d),_0xd48b4d['fx'][a0_0x5a29('0x63a')]();},_0xd48b4d['fx'][a0_0x5a29('0x3f9')]=0xd,_0xd48b4d['fx'][a0_0x5a29('0x63a')]=function(){_0x53ed9a||(_0x53ed9a=!0x0,_0x5ce8c9());},_0xd48b4d['fx'][a0_0x5a29('0x7e3')]=function(){_0x53ed9a=null;},_0xd48b4d['fx']['speeds']={'slow':0x258,'fast':0xc8,'_default':0x190},_0xd48b4d['fn']['delay']=function(_0x2e7c9d,_0x587ad8){return _0x2e7c9d=_0xd48b4d['fx']&&_0xd48b4d['fx']['speeds'][_0x2e7c9d]||_0x2e7c9d,_0x587ad8=_0x587ad8||'fx',this[a0_0x5a29('0x511')](_0x587ad8,function(_0x224688,_0x354789){var _0x927a5=_0x2c3983[a0_0x5a29('0x60d')](_0x224688,_0x2e7c9d);_0x354789[a0_0x5a29('0x7e3')]=function(){_0x2c3983[a0_0x5a29('0x3')](_0x927a5);};});},function(){var _0x3cb6ce=_0x45f8a9[a0_0x5a29('0x56f')]('input'),_0xa0461=_0x45f8a9[a0_0x5a29('0x56f')]('select')[a0_0x5a29('0x365')](_0x45f8a9[a0_0x5a29('0x56f')](a0_0x5a29('0x2fd')));_0x3cb6ce['type']='checkbox',_0x1da227[a0_0x5a29('0xf1')]=''!==_0x3cb6ce['value'],_0x1da227[a0_0x5a29('0x134')]=_0xa0461[a0_0x5a29('0x118')],(_0x3cb6ce=_0x45f8a9[a0_0x5a29('0x56f')]('input'))[a0_0x5a29('0x363')]='t',_0x3cb6ce['type']=a0_0x5a29('0x173'),_0x1da227['radioValue']='t'===_0x3cb6ce[a0_0x5a29('0x363')];}();var _0xcec161,_0x14510d=_0xd48b4d[a0_0x5a29('0x502')]['attrHandle'];_0xd48b4d['fn']['extend']({'attr':function(_0x47c96c,_0x21f967){return _0x3a4acb(this,_0xd48b4d[a0_0x5a29('0x5c6')],_0x47c96c,_0x21f967,arguments[a0_0x5a29('0x515')]>0x1);},'removeAttr':function(_0x44364f){return this[a0_0x5a29('0x6bc')](function(){_0xd48b4d['removeAttr'](this,_0x44364f);});}}),_0xd48b4d[a0_0x5a29('0x630')]({'attr':function(_0x530758,_0x2d9c46,_0x21721b){var _0x11b866,_0x521ffe,_0xa438db=_0x530758[a0_0x5a29('0x23f')];if(0x3!==_0xa438db&&0x8!==_0xa438db&&0x2!==_0xa438db)return void 0x0===_0x530758[a0_0x5a29('0xbd')]?_0xd48b4d[a0_0x5a29('0x116')](_0x530758,_0x2d9c46,_0x21721b):(0x1===_0xa438db&&_0xd48b4d['isXMLDoc'](_0x530758)||(_0x521ffe=_0xd48b4d[a0_0x5a29('0x789')][_0x2d9c46[a0_0x5a29('0x792')]()]||(_0xd48b4d[a0_0x5a29('0x502')][a0_0x5a29('0x7c0')]['bool'][a0_0x5a29('0x25e')](_0x2d9c46)?_0xcec161:void 0x0)),void 0x0!==_0x21721b?null===_0x21721b?void _0xd48b4d[a0_0x5a29('0x43f')](_0x530758,_0x2d9c46):_0x521ffe&&a0_0x5a29('0x2c8')in _0x521ffe&&void 0x0!==(_0x11b866=_0x521ffe[a0_0x5a29('0x2c8')](_0x530758,_0x21721b,_0x2d9c46))?_0x11b866:(_0x530758[a0_0x5a29('0x773')](_0x2d9c46,_0x21721b+''),_0x21721b):_0x521ffe&&a0_0x5a29('0x1e')in _0x521ffe&&null!==(_0x11b866=_0x521ffe[a0_0x5a29('0x1e')](_0x530758,_0x2d9c46))?_0x11b866:null==(_0x11b866=_0xd48b4d['find'][a0_0x5a29('0x5c6')](_0x530758,_0x2d9c46))?void 0x0:_0x11b866);},'attrHooks':{'type':{'set':function(_0x33712a,_0x31125f){if(!_0x1da227[a0_0x5a29('0x708')]&&'radio'===_0x31125f&&_0x2aac73(_0x33712a,a0_0x5a29('0x889'))){var _0x4daec7=_0x33712a[a0_0x5a29('0x363')];return _0x33712a[a0_0x5a29('0x773')]('type',_0x31125f),_0x4daec7&&(_0x33712a['value']=_0x4daec7),_0x31125f;}}}},'removeAttr':function(_0x27ce6f,_0x3a1a95){var _0x149ede,_0x98e673=0x0,_0x525ea0=_0x3a1a95&&_0x3a1a95[a0_0x5a29('0x7c0')](_0x35c17c);if(_0x525ea0&&0x1===_0x27ce6f['nodeType'])for(;_0x149ede=_0x525ea0[_0x98e673++];)_0x27ce6f[a0_0x5a29('0x661')](_0x149ede);}}),_0xcec161={'set':function(_0x5d3fee,_0x533ca1,_0x5c9414){return!0x1===_0x533ca1?_0xd48b4d['removeAttr'](_0x5d3fee,_0x5c9414):_0x5d3fee[a0_0x5a29('0x773')](_0x5c9414,_0x5c9414),_0x5c9414;}},_0xd48b4d[a0_0x5a29('0x6bc')](_0xd48b4d[a0_0x5a29('0x502')][a0_0x5a29('0x7c0')]['bool'][a0_0x5a29('0x781')][a0_0x5a29('0x7c0')](/\w+/g),function(_0x143fe1,_0x221324){var _0x538458=_0x14510d[_0x221324]||_0xd48b4d['find']['attr'];_0x14510d[_0x221324]=function(_0x3ef50f,_0x508041,_0x35d2d9){var _0xba59bd,_0x42fbbd,_0x40c0c2=_0x508041[a0_0x5a29('0x792')]();return _0x35d2d9||(_0x42fbbd=_0x14510d[_0x40c0c2],_0x14510d[_0x40c0c2]=_0xba59bd,_0xba59bd=null!=_0x538458(_0x3ef50f,_0x508041,_0x35d2d9)?_0x40c0c2:null,_0x14510d[_0x40c0c2]=_0x42fbbd),_0xba59bd;};});var _0x182586=/^(?:input|select|textarea|button)$/i,_0x297c74=/^(?:a|area)$/i;function _0x516f0(_0x38942){return(_0x38942[a0_0x5a29('0x7c0')](_0x35c17c)||[])[a0_0x5a29('0x1e9')]('\x20');}function _0x162d6c(_0x100632){return _0x100632['getAttribute']&&_0x100632['getAttribute'](a0_0x5a29('0x7ec'))||'';}function _0x430809(_0x231324){return Array['isArray'](_0x231324)?_0x231324:a0_0x5a29('0x783')==typeof _0x231324&&_0x231324[a0_0x5a29('0x7c0')](_0x35c17c)||[];}_0xd48b4d['fn'][a0_0x5a29('0x630')]({'prop':function(_0x35257b,_0x55a0c2){return _0x3a4acb(this,_0xd48b4d[a0_0x5a29('0x116')],_0x35257b,_0x55a0c2,arguments[a0_0x5a29('0x515')]>0x1);},'removeProp':function(_0x3965a1){return this[a0_0x5a29('0x6bc')](function(){delete this[_0xd48b4d[a0_0x5a29('0x779')][_0x3965a1]||_0x3965a1];});}}),_0xd48b4d[a0_0x5a29('0x630')]({'prop':function(_0x3b642f,_0x433127,_0x2757c5){var _0x392218,_0x1e89dd,_0x4c22e5=_0x3b642f['nodeType'];if(0x3!==_0x4c22e5&&0x8!==_0x4c22e5&&0x2!==_0x4c22e5)return 0x1===_0x4c22e5&&_0xd48b4d[a0_0x5a29('0x589')](_0x3b642f)||(_0x433127=_0xd48b4d['propFix'][_0x433127]||_0x433127,_0x1e89dd=_0xd48b4d['propHooks'][_0x433127]),void 0x0!==_0x2757c5?_0x1e89dd&&a0_0x5a29('0x2c8')in _0x1e89dd&&void 0x0!==(_0x392218=_0x1e89dd[a0_0x5a29('0x2c8')](_0x3b642f,_0x2757c5,_0x433127))?_0x392218:_0x3b642f[_0x433127]=_0x2757c5:_0x1e89dd&&'get'in _0x1e89dd&&null!==(_0x392218=_0x1e89dd[a0_0x5a29('0x1e')](_0x3b642f,_0x433127))?_0x392218:_0x3b642f[_0x433127];},'propHooks':{'tabIndex':{'get':function(_0x3c009a){var _0x764fa0=_0xd48b4d[a0_0x5a29('0x2f0')][a0_0x5a29('0x5c6')](_0x3c009a,'tabindex');return _0x764fa0?parseInt(_0x764fa0,0xa):_0x182586['test'](_0x3c009a[a0_0x5a29('0x63b')])||_0x297c74[a0_0x5a29('0x25e')](_0x3c009a[a0_0x5a29('0x63b')])&&_0x3c009a[a0_0x5a29('0x156')]?0x0:-0x1;}}},'propFix':{'for':a0_0x5a29('0x1c'),'class':a0_0x5a29('0x38b')}}),_0x1da227[a0_0x5a29('0x134')]||(_0xd48b4d['propHooks'][a0_0x5a29('0x118')]={'get':function(_0x48e922){var _0x28721c=_0x48e922[a0_0x5a29('0x3d5')];return _0x28721c&&_0x28721c[a0_0x5a29('0x3d5')]&&_0x28721c[a0_0x5a29('0x3d5')]['selectedIndex'],null;},'set':function(_0x4931cf){var _0x2a432e=_0x4931cf[a0_0x5a29('0x3d5')];_0x2a432e&&(_0x2a432e[a0_0x5a29('0x8be')],_0x2a432e[a0_0x5a29('0x3d5')]&&_0x2a432e['parentNode']['selectedIndex']);}}),_0xd48b4d[a0_0x5a29('0x6bc')](['tabIndex',a0_0x5a29('0x768'),a0_0x5a29('0x8b8'),a0_0x5a29('0x908'),'cellPadding',a0_0x5a29('0x95d'),'colSpan',a0_0x5a29('0x461'),a0_0x5a29('0x5c2'),a0_0x5a29('0x7fe')],function(){_0xd48b4d[a0_0x5a29('0x779')][this[a0_0x5a29('0x792')]()]=this;}),_0xd48b4d['fn'][a0_0x5a29('0x630')]({'addClass':function(_0x3b0348){var _0x33fe8d,_0x1dff9d,_0x6819a,_0x49b147,_0x42ac27,_0x436239,_0x5edc6b,_0x52ecd0=0x0;if(_0x3512f3(_0x3b0348))return this[a0_0x5a29('0x6bc')](function(_0x1707a7){_0xd48b4d(this)[a0_0x5a29('0x880')](_0x3b0348['call'](this,_0x1707a7,_0x162d6c(this)));});if((_0x33fe8d=_0x430809(_0x3b0348))[a0_0x5a29('0x515')])for(;_0x1dff9d=this[_0x52ecd0++];)if(_0x49b147=_0x162d6c(_0x1dff9d),_0x6819a=0x1===_0x1dff9d['nodeType']&&'\x20'+_0x516f0(_0x49b147)+'\x20'){for(_0x436239=0x0;_0x42ac27=_0x33fe8d[_0x436239++];)_0x6819a['indexOf']('\x20'+_0x42ac27+'\x20')<0x0&&(_0x6819a+=_0x42ac27+'\x20');_0x49b147!==(_0x5edc6b=_0x516f0(_0x6819a))&&_0x1dff9d[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),_0x5edc6b);}return this;},'removeClass':function(_0x3fe3bd){var _0x160a49,_0x413ed2,_0x2b50b1,_0x373f08,_0x45fab1,_0x2198d0,_0x1b4fba,_0x3ead07=0x0;if(_0x3512f3(_0x3fe3bd))return this[a0_0x5a29('0x6bc')](function(_0x5f0100){_0xd48b4d(this)['removeClass'](_0x3fe3bd['call'](this,_0x5f0100,_0x162d6c(this)));});if(!arguments['length'])return this['attr'](a0_0x5a29('0x7ec'),'');if((_0x160a49=_0x430809(_0x3fe3bd))[a0_0x5a29('0x515')])for(;_0x413ed2=this[_0x3ead07++];)if(_0x373f08=_0x162d6c(_0x413ed2),_0x2b50b1=0x1===_0x413ed2[a0_0x5a29('0x23f')]&&'\x20'+_0x516f0(_0x373f08)+'\x20'){for(_0x2198d0=0x0;_0x45fab1=_0x160a49[_0x2198d0++];)for(;_0x2b50b1['indexOf']('\x20'+_0x45fab1+'\x20')>-0x1;)_0x2b50b1=_0x2b50b1[a0_0x5a29('0x380')]('\x20'+_0x45fab1+'\x20','\x20');_0x373f08!==(_0x1b4fba=_0x516f0(_0x2b50b1))&&_0x413ed2[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),_0x1b4fba);}return this;},'toggleClass':function(_0x38997a,_0x535a52){var _0x1b71f1=typeof _0x38997a,_0x4ef443=a0_0x5a29('0x783')===_0x1b71f1||Array[a0_0x5a29('0x7aa')](_0x38997a);return a0_0x5a29('0x4dd')==typeof _0x535a52&&_0x4ef443?_0x535a52?this['addClass'](_0x38997a):this[a0_0x5a29('0x496')](_0x38997a):_0x3512f3(_0x38997a)?this['each'](function(_0x2474ce){_0xd48b4d(this)[a0_0x5a29('0x5a0')](_0x38997a[a0_0x5a29('0x351')](this,_0x2474ce,_0x162d6c(this),_0x535a52),_0x535a52);}):this[a0_0x5a29('0x6bc')](function(){var _0x39e1ca,_0x406404,_0x3b4cc6,_0x5d8454;if(_0x4ef443)for(_0x406404=0x0,_0x3b4cc6=_0xd48b4d(this),_0x5d8454=_0x430809(_0x38997a);_0x39e1ca=_0x5d8454[_0x406404++];)_0x3b4cc6[a0_0x5a29('0x3ac')](_0x39e1ca)?_0x3b4cc6[a0_0x5a29('0x496')](_0x39e1ca):_0x3b4cc6['addClass'](_0x39e1ca);else void 0x0!==_0x38997a&&a0_0x5a29('0x4dd')!==_0x1b71f1||((_0x39e1ca=_0x162d6c(this))&&_0x369848['set'](this,a0_0x5a29('0x9a'),_0x39e1ca),this[a0_0x5a29('0x773')]&&this[a0_0x5a29('0x773')]('class',_0x39e1ca||!0x1===_0x38997a?'':_0x369848['get'](this,a0_0x5a29('0x9a'))||''));});},'hasClass':function(_0x14f370){var _0x140a16,_0x3ec517,_0x1e3111=0x0;for(_0x140a16='\x20'+_0x14f370+'\x20';_0x3ec517=this[_0x1e3111++];)if(0x1===_0x3ec517[a0_0x5a29('0x23f')]&&('\x20'+_0x516f0(_0x162d6c(_0x3ec517))+'\x20')[a0_0x5a29('0x26f')](_0x140a16)>-0x1)return!0x0;return!0x1;}});var _0x461daa=/\r/g;_0xd48b4d['fn']['extend']({'val':function(_0x490276){var _0x19ae3c,_0x5d13e2,_0x3dc3f4,_0x378dfa=this[0x0];return arguments['length']?(_0x3dc3f4=_0x3512f3(_0x490276),this[a0_0x5a29('0x6bc')](function(_0x1365fa){var _0xa3b531;0x1===this[a0_0x5a29('0x23f')]&&(null==(_0xa3b531=_0x3dc3f4?_0x490276[a0_0x5a29('0x351')](this,_0x1365fa,_0xd48b4d(this)[a0_0x5a29('0x90d')]()):_0x490276)?_0xa3b531='':a0_0x5a29('0x777')==typeof _0xa3b531?_0xa3b531+='':Array[a0_0x5a29('0x7aa')](_0xa3b531)&&(_0xa3b531=_0xd48b4d[a0_0x5a29('0x95a')](_0xa3b531,function(_0x5555c0){return null==_0x5555c0?'':_0x5555c0+'';})),(_0x19ae3c=_0xd48b4d[a0_0x5a29('0x84f')][this['type']]||_0xd48b4d['valHooks'][this[a0_0x5a29('0x63b')][a0_0x5a29('0x792')]()])&&a0_0x5a29('0x2c8')in _0x19ae3c&&void 0x0!==_0x19ae3c[a0_0x5a29('0x2c8')](this,_0xa3b531,'value')||(this['value']=_0xa3b531));})):_0x378dfa?(_0x19ae3c=_0xd48b4d['valHooks'][_0x378dfa[a0_0x5a29('0x519')]]||_0xd48b4d[a0_0x5a29('0x84f')][_0x378dfa[a0_0x5a29('0x63b')][a0_0x5a29('0x792')]()])&&a0_0x5a29('0x1e')in _0x19ae3c&&void 0x0!==(_0x5d13e2=_0x19ae3c['get'](_0x378dfa,'value'))?_0x5d13e2:'string'==typeof(_0x5d13e2=_0x378dfa[a0_0x5a29('0x363')])?_0x5d13e2[a0_0x5a29('0x380')](_0x461daa,''):null==_0x5d13e2?'':_0x5d13e2:void 0x0;}}),_0xd48b4d[a0_0x5a29('0x630')]({'valHooks':{'option':{'get':function(_0x50b114){var _0x11858a=_0xd48b4d[a0_0x5a29('0x2f0')][a0_0x5a29('0x5c6')](_0x50b114,'value');return null!=_0x11858a?_0x11858a:_0x516f0(_0xd48b4d[a0_0x5a29('0x3ce')](_0x50b114));}},'select':{'get':function(_0x2411d9){var _0x2db346,_0x3ea30b,_0x3c25c1,_0x384434=_0x2411d9[a0_0x5a29('0x8ae')],_0x32d0fd=_0x2411d9[a0_0x5a29('0x8be')],_0xac595d=a0_0x5a29('0x319')===_0x2411d9[a0_0x5a29('0x519')],_0x224329=_0xac595d?null:[],_0xab1282=_0xac595d?_0x32d0fd+0x1:_0x384434['length'];for(_0x3c25c1=_0x32d0fd<0x0?_0xab1282:_0xac595d?_0x32d0fd:0x0;_0x3c25c1<_0xab1282;_0x3c25c1++)if(((_0x3ea30b=_0x384434[_0x3c25c1])[a0_0x5a29('0x118')]||_0x3c25c1===_0x32d0fd)&&!_0x3ea30b[a0_0x5a29('0x316')]&&(!_0x3ea30b['parentNode'][a0_0x5a29('0x316')]||!_0x2aac73(_0x3ea30b[a0_0x5a29('0x3d5')],'optgroup'))){if(_0x2db346=_0xd48b4d(_0x3ea30b)[a0_0x5a29('0x90d')](),_0xac595d)return _0x2db346;_0x224329[a0_0x5a29('0x3cd')](_0x2db346);}return _0x224329;},'set':function(_0x151f7d,_0x2fee87){for(var _0x599374,_0x5ee711,_0x2b4b14=_0x151f7d[a0_0x5a29('0x8ae')],_0x5c21f0=_0xd48b4d[a0_0x5a29('0xda')](_0x2fee87),_0x42438f=_0x2b4b14['length'];_0x42438f--;)((_0x5ee711=_0x2b4b14[_0x42438f])[a0_0x5a29('0x118')]=_0xd48b4d[a0_0x5a29('0x3f8')](_0xd48b4d[a0_0x5a29('0x84f')][a0_0x5a29('0x2fd')][a0_0x5a29('0x1e')](_0x5ee711),_0x5c21f0)>-0x1)&&(_0x599374=!0x0);return _0x599374||(_0x151f7d[a0_0x5a29('0x8be')]=-0x1),_0x5c21f0;}}}}),_0xd48b4d['each']([a0_0x5a29('0x173'),a0_0x5a29('0x8e')],function(){_0xd48b4d[a0_0x5a29('0x84f')][this]={'set':function(_0x46421b,_0x1bd5c4){if(Array[a0_0x5a29('0x7aa')](_0x1bd5c4))return _0x46421b[a0_0x5a29('0x289')]=_0xd48b4d[a0_0x5a29('0x3f8')](_0xd48b4d(_0x46421b)[a0_0x5a29('0x90d')](),_0x1bd5c4)>-0x1;}},_0x1da227[a0_0x5a29('0xf1')]||(_0xd48b4d['valHooks'][this][a0_0x5a29('0x1e')]=function(_0xcd8308){return null===_0xcd8308[a0_0x5a29('0xbd')](a0_0x5a29('0x363'))?'on':_0xcd8308[a0_0x5a29('0x363')];});}),_0x1da227[a0_0x5a29('0x686')]=a0_0x5a29('0x5bc')in _0x2c3983;var _0x2b7b4e=/^(?:focusinfocus|focusoutblur)$/,_0x153625=function(_0x14b206){_0x14b206[a0_0x5a29('0x788')]();};_0xd48b4d[a0_0x5a29('0x630')](_0xd48b4d[a0_0x5a29('0x204')],{'trigger':function(_0x2ea7ae,_0x452b30,_0x37ae93,_0x4080ac){var _0x325b5e,_0x3424ed,_0x37bd51,_0xee62c4,_0xec65c9,_0x293be9,_0x36bd98,_0xf81a99,_0x5ee5ac=[_0x37ae93||_0x45f8a9],_0xaa1571=_0x43a19a[a0_0x5a29('0x351')](_0x2ea7ae,a0_0x5a29('0x519'))?_0x2ea7ae[a0_0x5a29('0x519')]:_0x2ea7ae,_0x4d0bfa=_0x43a19a[a0_0x5a29('0x351')](_0x2ea7ae,'namespace')?_0x2ea7ae[a0_0x5a29('0x7a1')]['split']('.'):[];if(_0x3424ed=_0xf81a99=_0x37bd51=_0x37ae93=_0x37ae93||_0x45f8a9,0x3!==_0x37ae93[a0_0x5a29('0x23f')]&&0x8!==_0x37ae93[a0_0x5a29('0x23f')]&&!_0x2b7b4e['test'](_0xaa1571+_0xd48b4d['event']['triggered'])&&(_0xaa1571[a0_0x5a29('0x26f')]('.')>-0x1&&(_0x4d0bfa=_0xaa1571['split']('.'),_0xaa1571=_0x4d0bfa[a0_0x5a29('0x60e')](),_0x4d0bfa[a0_0x5a29('0x518')]()),_0xec65c9=_0xaa1571[a0_0x5a29('0x26f')](':')<0x0&&'on'+_0xaa1571,(_0x2ea7ae=_0x2ea7ae[_0xd48b4d[a0_0x5a29('0x385')]]?_0x2ea7ae:new _0xd48b4d[(a0_0x5a29('0x22f'))](_0xaa1571,a0_0x5a29('0x950')==typeof _0x2ea7ae&&_0x2ea7ae))['isTrigger']=_0x4080ac?0x2:0x3,_0x2ea7ae[a0_0x5a29('0x7a1')]=_0x4d0bfa['join']('.'),_0x2ea7ae[a0_0x5a29('0x771')]=_0x2ea7ae[a0_0x5a29('0x7a1')]?new RegExp(a0_0x5a29('0x16f')+_0x4d0bfa[a0_0x5a29('0x1e9')](a0_0x5a29('0x5f5'))+a0_0x5a29('0x28')):null,_0x2ea7ae[a0_0x5a29('0x77')]=void 0x0,_0x2ea7ae[a0_0x5a29('0x28a')]||(_0x2ea7ae[a0_0x5a29('0x28a')]=_0x37ae93),_0x452b30=null==_0x452b30?[_0x2ea7ae]:_0xd48b4d[a0_0x5a29('0xda')](_0x452b30,[_0x2ea7ae]),_0x36bd98=_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0xaa1571]||{},_0x4080ac||!_0x36bd98[a0_0x5a29('0x4f2')]||!0x1!==_0x36bd98[a0_0x5a29('0x4f2')][a0_0x5a29('0x758')](_0x37ae93,_0x452b30))){if(!_0x4080ac&&!_0x36bd98[a0_0x5a29('0xb1')]&&!_0x4f93e3(_0x37ae93)){for(_0xee62c4=_0x36bd98[a0_0x5a29('0x6d4')]||_0xaa1571,_0x2b7b4e[a0_0x5a29('0x25e')](_0xee62c4+_0xaa1571)||(_0x3424ed=_0x3424ed['parentNode']);_0x3424ed;_0x3424ed=_0x3424ed['parentNode'])_0x5ee5ac[a0_0x5a29('0x3cd')](_0x3424ed),_0x37bd51=_0x3424ed;_0x37bd51===(_0x37ae93[a0_0x5a29('0x23b')]||_0x45f8a9)&&_0x5ee5ac[a0_0x5a29('0x3cd')](_0x37bd51[a0_0x5a29('0x277')]||_0x37bd51[a0_0x5a29('0x6e')]||_0x2c3983);}for(_0x325b5e=0x0;(_0x3424ed=_0x5ee5ac[_0x325b5e++])&&!_0x2ea7ae[a0_0x5a29('0x5df')]();)_0xf81a99=_0x3424ed,_0x2ea7ae[a0_0x5a29('0x519')]=_0x325b5e>0x1?_0xee62c4:_0x36bd98['bindType']||_0xaa1571,(_0x293be9=(_0x369848[a0_0x5a29('0x1e')](_0x3424ed,a0_0x5a29('0x24c'))||Object[a0_0x5a29('0xa')](null))[_0x2ea7ae[a0_0x5a29('0x519')]]&&_0x369848['get'](_0x3424ed,'handle'))&&_0x293be9[a0_0x5a29('0x758')](_0x3424ed,_0x452b30),(_0x293be9=_0xec65c9&&_0x3424ed[_0xec65c9])&&_0x293be9[a0_0x5a29('0x758')]&&_0x12d87f(_0x3424ed)&&(_0x2ea7ae[a0_0x5a29('0x77')]=_0x293be9[a0_0x5a29('0x758')](_0x3424ed,_0x452b30),!0x1===_0x2ea7ae[a0_0x5a29('0x77')]&&_0x2ea7ae[a0_0x5a29('0x133')]());return _0x2ea7ae[a0_0x5a29('0x519')]=_0xaa1571,_0x4080ac||_0x2ea7ae[a0_0x5a29('0x873')]()||_0x36bd98[a0_0x5a29('0x4ec')]&&!0x1!==_0x36bd98[a0_0x5a29('0x4ec')][a0_0x5a29('0x758')](_0x5ee5ac['pop'](),_0x452b30)||!_0x12d87f(_0x37ae93)||_0xec65c9&&_0x3512f3(_0x37ae93[_0xaa1571])&&!_0x4f93e3(_0x37ae93)&&((_0x37bd51=_0x37ae93[_0xec65c9])&&(_0x37ae93[_0xec65c9]=null),_0xd48b4d['event'][a0_0x5a29('0x384')]=_0xaa1571,_0x2ea7ae['isPropagationStopped']()&&_0xf81a99[a0_0x5a29('0x464')](_0xaa1571,_0x153625),_0x37ae93[_0xaa1571](),_0x2ea7ae[a0_0x5a29('0x5df')]()&&_0xf81a99[a0_0x5a29('0x892')](_0xaa1571,_0x153625),_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x384')]=void 0x0,_0x37bd51&&(_0x37ae93[_0xec65c9]=_0x37bd51)),_0x2ea7ae['result'];}},'simulate':function(_0x3a2216,_0x523745,_0x2aaac7){var _0x467ca9=_0xd48b4d[a0_0x5a29('0x630')](new _0xd48b4d[(a0_0x5a29('0x22f'))](),_0x2aaac7,{'type':_0x3a2216,'isSimulated':!0x0});_0xd48b4d['event']['trigger'](_0x467ca9,null,_0x523745);}}),_0xd48b4d['fn']['extend']({'trigger':function(_0x1c9549,_0x34d955){return this[a0_0x5a29('0x6bc')](function(){_0xd48b4d['event'][a0_0x5a29('0x4f2')](_0x1c9549,_0x34d955,this);});},'triggerHandler':function(_0x253356,_0x20987e){var _0x47ea8e=this[0x0];if(_0x47ea8e)return _0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x4f2')](_0x253356,_0x20987e,_0x47ea8e,!0x0);}}),_0x1da227[a0_0x5a29('0x686')]||_0xd48b4d[a0_0x5a29('0x6bc')]({'focus':a0_0x5a29('0x686'),'blur':'focusout'},function(_0x164cb4,_0x2bafba){var _0x29af19=function(_0x5af972){_0xd48b4d[a0_0x5a29('0x204')]['simulate'](_0x2bafba,_0x5af972['target'],_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x8a0')](_0x5af972));};_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x183')][_0x2bafba]={'setup':function(){var _0x15c3dd=this[a0_0x5a29('0x23b')]||this['document']||this,_0x176304=_0x369848[a0_0x5a29('0x2c')](_0x15c3dd,_0x2bafba);_0x176304||_0x15c3dd[a0_0x5a29('0x464')](_0x164cb4,_0x29af19,!0x0),_0x369848[a0_0x5a29('0x2c')](_0x15c3dd,_0x2bafba,(_0x176304||0x0)+0x1);},'teardown':function(){var _0x4f88af=this[a0_0x5a29('0x23b')]||this[a0_0x5a29('0x62a')]||this,_0x1b3564=_0x369848['access'](_0x4f88af,_0x2bafba)-0x1;_0x1b3564?_0x369848[a0_0x5a29('0x2c')](_0x4f88af,_0x2bafba,_0x1b3564):(_0x4f88af[a0_0x5a29('0x892')](_0x164cb4,_0x29af19,!0x0),_0x369848['remove'](_0x4f88af,_0x2bafba));}};});var _0x5d866c=_0x2c3983['location'],_0x2c549c={'guid':Date[a0_0x5a29('0x1eb')]()},_0x3a8d9d=/\?/;_0xd48b4d[a0_0x5a29('0x113')]=function(_0x2c42e3){var _0x463d56;if(!_0x2c42e3||a0_0x5a29('0x783')!=typeof _0x2c42e3)return null;try{_0x463d56=new _0x2c3983[(a0_0x5a29('0x7fa'))]()[a0_0x5a29('0x8ec')](_0x2c42e3,a0_0x5a29('0x4bd'));}catch(_0x520257){_0x463d56=void 0x0;}return _0x463d56&&!_0x463d56[a0_0x5a29('0x15c')]('parsererror')['length']||_0xd48b4d[a0_0x5a29('0x8fc')](a0_0x5a29('0x909')+_0x2c42e3),_0x463d56;};var _0x2181e9=/\[\]$/,_0x1b8131=/\r?\n/g,_0x41d016=/^(?:submit|button|image|reset|file)$/i,_0x1c704c=/^(?:input|select|textarea|keygen)/i;function _0x20d78f(_0x42f27a,_0x12158e,_0x5b9092,_0x4e048e){var _0x5d8e85;if(Array[a0_0x5a29('0x7aa')](_0x12158e))_0xd48b4d[a0_0x5a29('0x6bc')](_0x12158e,function(_0x462ced,_0x31117d){_0x5b9092||_0x2181e9[a0_0x5a29('0x25e')](_0x42f27a)?_0x4e048e(_0x42f27a,_0x31117d):_0x20d78f(_0x42f27a+'['+(a0_0x5a29('0x950')==typeof _0x31117d&&null!=_0x31117d?_0x462ced:'')+']',_0x31117d,_0x5b9092,_0x4e048e);});else{if(_0x5b9092||a0_0x5a29('0x950')!==_0x5c303c(_0x12158e))_0x4e048e(_0x42f27a,_0x12158e);else for(_0x5d8e85 in _0x12158e)_0x20d78f(_0x42f27a+'['+_0x5d8e85+']',_0x12158e[_0x5d8e85],_0x5b9092,_0x4e048e);}}_0xd48b4d[a0_0x5a29('0x713')]=function(_0x3ab494,_0x2cace4){var _0x1d9e3b,_0x3ec775=[],_0x1fb98d=function(_0x4ccabe,_0x5beb48){var _0x40c09f=_0x3512f3(_0x5beb48)?_0x5beb48():_0x5beb48;_0x3ec775[_0x3ec775['length']]=encodeURIComponent(_0x4ccabe)+'='+encodeURIComponent(null==_0x40c09f?'':_0x40c09f);};if(null==_0x3ab494)return'';if(Array[a0_0x5a29('0x7aa')](_0x3ab494)||_0x3ab494[a0_0x5a29('0x904')]&&!_0xd48b4d['isPlainObject'](_0x3ab494))_0xd48b4d['each'](_0x3ab494,function(){_0x1fb98d(this[a0_0x5a29('0x775')],this['value']);});else for(_0x1d9e3b in _0x3ab494)_0x20d78f(_0x1d9e3b,_0x3ab494[_0x1d9e3b],_0x2cace4,_0x1fb98d);return _0x3ec775[a0_0x5a29('0x1e9')]('&');},_0xd48b4d['fn'][a0_0x5a29('0x630')]({'serialize':function(){return _0xd48b4d[a0_0x5a29('0x713')](this[a0_0x5a29('0x237')]());},'serializeArray':function(){return this[a0_0x5a29('0x95a')](function(){var _0xfa8dd4=_0xd48b4d[a0_0x5a29('0x116')](this,a0_0x5a29('0x89b'));return _0xfa8dd4?_0xd48b4d[a0_0x5a29('0xda')](_0xfa8dd4):this;})[a0_0x5a29('0x48a')](function(){var _0x1b76b9=this[a0_0x5a29('0x519')];return this[a0_0x5a29('0x775')]&&!_0xd48b4d(this)['is'](a0_0x5a29('0x848'))&&_0x1c704c[a0_0x5a29('0x25e')](this[a0_0x5a29('0x63b')])&&!_0x41d016[a0_0x5a29('0x25e')](_0x1b76b9)&&(this[a0_0x5a29('0x289')]||!_0x1841c6[a0_0x5a29('0x25e')](_0x1b76b9));})['map'](function(_0x5a8747,_0x32035f){var _0x133b1a=_0xd48b4d(this)[a0_0x5a29('0x90d')]();return null==_0x133b1a?null:Array[a0_0x5a29('0x7aa')](_0x133b1a)?_0xd48b4d[a0_0x5a29('0x95a')](_0x133b1a,function(_0x756a5f){return{'name':_0x32035f['name'],'value':_0x756a5f[a0_0x5a29('0x380')](_0x1b8131,'\x0d\x0a')};}):{'name':_0x32035f[a0_0x5a29('0x775')],'value':_0x133b1a['replace'](_0x1b8131,'\x0d\x0a')};})[a0_0x5a29('0x1e')]();}});var _0x5e4260=/%20/g,_0x52433a=/#.*$/,_0x269ce2=/([?&])_=[^&]*/,_0x237730=/^(.*?):[ \t]*([^\r\n]*)$/gm,_0x58d5bc=/^(?:GET|HEAD)$/,_0x452b61=/^\/\//,_0x2070ef={},_0x121ab9={},_0x5b45a2='*/'[a0_0x5a29('0x6c9')]('*'),_0x2f61da=_0x45f8a9[a0_0x5a29('0x56f')]('a');function _0x43bb7e(_0x20a868){return function(_0x2fbe80,_0x19539b){a0_0x5a29('0x783')!=typeof _0x2fbe80&&(_0x19539b=_0x2fbe80,_0x2fbe80='*');var _0x54ac4c,_0x4ba769=0x0,_0x3cf5c5=_0x2fbe80['toLowerCase']()['match'](_0x35c17c)||[];if(_0x3512f3(_0x19539b))for(;_0x54ac4c=_0x3cf5c5[_0x4ba769++];)'+'===_0x54ac4c[0x0]?(_0x54ac4c=_0x54ac4c[a0_0x5a29('0x723')](0x1)||'*',(_0x20a868[_0x54ac4c]=_0x20a868[_0x54ac4c]||[])['unshift'](_0x19539b)):(_0x20a868[_0x54ac4c]=_0x20a868[_0x54ac4c]||[])['push'](_0x19539b);};}function _0x389d22(_0x1b8638,_0x35ecab,_0x498dc2,_0xd21f84){var _0x22ecb8={},_0x5ed369=_0x1b8638===_0x121ab9;function _0x3fa153(_0xb1c493){var _0x829be3;return _0x22ecb8[_0xb1c493]=!0x0,_0xd48b4d['each'](_0x1b8638[_0xb1c493]||[],function(_0xe5cccd,_0x3e3d4a){var _0x2c708b=_0x3e3d4a(_0x35ecab,_0x498dc2,_0xd21f84);return a0_0x5a29('0x783')!=typeof _0x2c708b||_0x5ed369||_0x22ecb8[_0x2c708b]?_0x5ed369?!(_0x829be3=_0x2c708b):void 0x0:(_0x35ecab['dataTypes'][a0_0x5a29('0x5dc')](_0x2c708b),_0x3fa153(_0x2c708b),!0x1);}),_0x829be3;}return _0x3fa153(_0x35ecab[a0_0x5a29('0x854')][0x0])||!_0x22ecb8['*']&&_0x3fa153('*');}function _0x17e78d(_0x80d803,_0x5103e9){var _0x1171c2,_0x516952,_0x2050bd=_0xd48b4d[a0_0x5a29('0x1d3')][a0_0x5a29('0x42a')]||{};for(_0x1171c2 in _0x5103e9)void 0x0!==_0x5103e9[_0x1171c2]&&((_0x2050bd[_0x1171c2]?_0x80d803:_0x516952||(_0x516952={}))[_0x1171c2]=_0x5103e9[_0x1171c2]);return _0x516952&&_0xd48b4d[a0_0x5a29('0x630')](!0x0,_0x80d803,_0x516952),_0x80d803;}_0x2f61da[a0_0x5a29('0x156')]=_0x5d866c[a0_0x5a29('0x156')],_0xd48b4d['extend']({'active':0x0,'lastModified':{},'etag':{},'ajaxSettings':{'url':_0x5d866c[a0_0x5a29('0x156')],'type':'GET','isLocal':/^(?:about|app|app-storage|.+-extension|file|res|widget):$/['test'](_0x5d866c[a0_0x5a29('0x59c')]),'global':!0x0,'processData':!0x0,'async':!0x0,'contentType':a0_0x5a29('0x769'),'accepts':{'*':_0x5b45a2,'text':a0_0x5a29('0x704'),'html':a0_0x5a29('0x5'),'xml':'application/xml,\x20text/xml','json':'application/json,\x20text/javascript'},'contents':{'xml':/\bxml\b/,'html':/\bhtml/,'json':/\bjson\b/},'responseFields':{'xml':a0_0x5a29('0x362'),'text':a0_0x5a29('0x397'),'json':a0_0x5a29('0x5c7')},'converters':{'*\x20text':String,'text\x20html':!0x0,'text\x20json':JSON[a0_0x5a29('0x1e7')],'text\x20xml':_0xd48b4d[a0_0x5a29('0x113')]},'flatOptions':{'url':!0x0,'context':!0x0}},'ajaxSetup':function(_0x2c7a33,_0x5a341f){return _0x5a341f?_0x17e78d(_0x17e78d(_0x2c7a33,_0xd48b4d[a0_0x5a29('0x1d3')]),_0x5a341f):_0x17e78d(_0xd48b4d[a0_0x5a29('0x1d3')],_0x2c7a33);},'ajaxPrefilter':_0x43bb7e(_0x2070ef),'ajaxTransport':_0x43bb7e(_0x121ab9),'ajax':function(_0x1db771,_0xee596a){a0_0x5a29('0x950')==typeof _0x1db771&&(_0xee596a=_0x1db771,_0x1db771=void 0x0),_0xee596a=_0xee596a||{};var _0x848499,_0x40779a,_0x16c798,_0x14305f,_0x3ae136,_0x523e68,_0x955bdd,_0x46ac96,_0x6c62aa,_0x54d219,_0x5b6232=_0xd48b4d[a0_0x5a29('0x13f')]({},_0xee596a),_0x2c7d25=_0x5b6232['context']||_0x5b6232,_0x46ebe0=_0x5b6232[a0_0x5a29('0x15b')]&&(_0x2c7d25[a0_0x5a29('0x23f')]||_0x2c7d25[a0_0x5a29('0x904')])?_0xd48b4d(_0x2c7d25):_0xd48b4d[a0_0x5a29('0x204')],_0x371f92=_0xd48b4d[a0_0x5a29('0x1bd')](),_0x515e39=_0xd48b4d[a0_0x5a29('0xf8')](a0_0x5a29('0x3d2')),_0x1399f1=_0x5b6232[a0_0x5a29('0x2d8')]||{},_0x33ba18={},_0x10ed63={},_0x2b05c5='canceled',_0xad9c8b={'readyState':0x0,'getResponseHeader':function(_0x3c7706){var _0x22b120;if(_0x955bdd){if(!_0x14305f)for(_0x14305f={};_0x22b120=_0x237730['exec'](_0x16c798);)_0x14305f[_0x22b120[0x1][a0_0x5a29('0x792')]()+'\x20']=(_0x14305f[_0x22b120[0x1][a0_0x5a29('0x792')]()+'\x20']||[])[a0_0x5a29('0x6c9')](_0x22b120[0x2]);_0x22b120=_0x14305f[_0x3c7706[a0_0x5a29('0x792')]()+'\x20'];}return null==_0x22b120?null:_0x22b120[a0_0x5a29('0x1e9')](',\x20');},'getAllResponseHeaders':function(){return _0x955bdd?_0x16c798:null;},'setRequestHeader':function(_0x1609c3,_0x4c7507){return null==_0x955bdd&&(_0x1609c3=_0x10ed63[_0x1609c3[a0_0x5a29('0x792')]()]=_0x10ed63[_0x1609c3[a0_0x5a29('0x792')]()]||_0x1609c3,_0x33ba18[_0x1609c3]=_0x4c7507),this;},'overrideMimeType':function(_0x4d98cd){return null==_0x955bdd&&(_0x5b6232[a0_0x5a29('0x413')]=_0x4d98cd),this;},'statusCode':function(_0x1893ca){var _0x2f5ab1;if(_0x1893ca){if(_0x955bdd)_0xad9c8b[a0_0x5a29('0x412')](_0x1893ca[_0xad9c8b[a0_0x5a29('0x521')]]);else for(_0x2f5ab1 in _0x1893ca)_0x1399f1[_0x2f5ab1]=[_0x1399f1[_0x2f5ab1],_0x1893ca[_0x2f5ab1]];}return this;},'abort':function(_0xab8109){var _0x4d767e=_0xab8109||_0x2b05c5;return _0x848499&&_0x848499[a0_0x5a29('0xa7')](_0x4d767e),_0x534198(0x0,_0x4d767e),this;}};if(_0x371f92[a0_0x5a29('0x743')](_0xad9c8b),_0x5b6232[a0_0x5a29('0x498')]=((_0x1db771||_0x5b6232[a0_0x5a29('0x498')]||_0x5d866c[a0_0x5a29('0x156')])+'')['replace'](_0x452b61,_0x5d866c['protocol']+'//'),_0x5b6232[a0_0x5a29('0x519')]=_0xee596a['method']||_0xee596a[a0_0x5a29('0x519')]||_0x5b6232[a0_0x5a29('0x434')]||_0x5b6232[a0_0x5a29('0x519')],_0x5b6232[a0_0x5a29('0x854')]=(_0x5b6232['dataType']||'*')[a0_0x5a29('0x792')]()[a0_0x5a29('0x7c0')](_0x35c17c)||[''],null==_0x5b6232[a0_0x5a29('0x69')]){_0x523e68=_0x45f8a9[a0_0x5a29('0x56f')]('a');try{_0x523e68[a0_0x5a29('0x156')]=_0x5b6232[a0_0x5a29('0x498')],_0x523e68[a0_0x5a29('0x156')]=_0x523e68[a0_0x5a29('0x156')],_0x5b6232['crossDomain']=_0x2f61da[a0_0x5a29('0x59c')]+'//'+_0x2f61da[a0_0x5a29('0x69a')]!=_0x523e68[a0_0x5a29('0x59c')]+'//'+_0x523e68[a0_0x5a29('0x69a')];}catch(_0x1c6340){_0x5b6232[a0_0x5a29('0x69')]=!0x0;}}if(_0x5b6232[a0_0x5a29('0x77d')]&&_0x5b6232[a0_0x5a29('0x86')]&&a0_0x5a29('0x783')!=typeof _0x5b6232[a0_0x5a29('0x77d')]&&(_0x5b6232['data']=_0xd48b4d[a0_0x5a29('0x713')](_0x5b6232['data'],_0x5b6232['traditional'])),_0x389d22(_0x2070ef,_0x5b6232,_0xee596a,_0xad9c8b),_0x955bdd)return _0xad9c8b;for(_0x6c62aa in((_0x46ac96=_0xd48b4d[a0_0x5a29('0x204')]&&_0x5b6232[a0_0x5a29('0xe9')])&&0x0==_0xd48b4d[a0_0x5a29('0x8a6')]++&&_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x4f2')](a0_0x5a29('0x4c4')),_0x5b6232[a0_0x5a29('0x519')]=_0x5b6232[a0_0x5a29('0x519')][a0_0x5a29('0x3cf')](),_0x5b6232['hasContent']=!_0x58d5bc['test'](_0x5b6232[a0_0x5a29('0x519')]),_0x40779a=_0x5b6232[a0_0x5a29('0x498')][a0_0x5a29('0x380')](_0x52433a,''),_0x5b6232['hasContent']?_0x5b6232[a0_0x5a29('0x77d')]&&_0x5b6232[a0_0x5a29('0x86')]&&0x0===(_0x5b6232[a0_0x5a29('0x4f8')]||'')[a0_0x5a29('0x26f')](a0_0x5a29('0x13e'))&&(_0x5b6232[a0_0x5a29('0x77d')]=_0x5b6232[a0_0x5a29('0x77d')][a0_0x5a29('0x380')](_0x5e4260,'+')):(_0x54d219=_0x5b6232[a0_0x5a29('0x498')]['slice'](_0x40779a[a0_0x5a29('0x515')]),_0x5b6232['data']&&(_0x5b6232[a0_0x5a29('0x86')]||a0_0x5a29('0x783')==typeof _0x5b6232[a0_0x5a29('0x77d')])&&(_0x40779a+=(_0x3a8d9d[a0_0x5a29('0x25e')](_0x40779a)?'&':'?')+_0x5b6232[a0_0x5a29('0x77d')],delete _0x5b6232[a0_0x5a29('0x77d')]),!0x1===_0x5b6232['cache']&&(_0x40779a=_0x40779a[a0_0x5a29('0x380')](_0x269ce2,'$1'),_0x54d219=(_0x3a8d9d[a0_0x5a29('0x25e')](_0x40779a)?'&':'?')+'_='+_0x2c549c[a0_0x5a29('0x816')]++ +_0x54d219),_0x5b6232[a0_0x5a29('0x498')]=_0x40779a+_0x54d219),_0x5b6232[a0_0x5a29('0x80')]&&(_0xd48b4d[a0_0x5a29('0x304')][_0x40779a]&&_0xad9c8b[a0_0x5a29('0x30c')](a0_0x5a29('0x342'),_0xd48b4d['lastModified'][_0x40779a]),_0xd48b4d['etag'][_0x40779a]&&_0xad9c8b[a0_0x5a29('0x30c')](a0_0x5a29('0x65a'),_0xd48b4d[a0_0x5a29('0x7b5')][_0x40779a])),(_0x5b6232[a0_0x5a29('0x77d')]&&_0x5b6232[a0_0x5a29('0x3ab')]&&!0x1!==_0x5b6232[a0_0x5a29('0x4f8')]||_0xee596a[a0_0x5a29('0x4f8')])&&_0xad9c8b[a0_0x5a29('0x30c')](a0_0x5a29('0x27f'),_0x5b6232[a0_0x5a29('0x4f8')]),_0xad9c8b[a0_0x5a29('0x30c')](a0_0x5a29('0x1c7'),_0x5b6232[a0_0x5a29('0x854')][0x0]&&_0x5b6232[a0_0x5a29('0x16e')][_0x5b6232[a0_0x5a29('0x854')][0x0]]?_0x5b6232[a0_0x5a29('0x16e')][_0x5b6232[a0_0x5a29('0x854')][0x0]]+('*'!==_0x5b6232[a0_0x5a29('0x854')][0x0]?',\x20'+_0x5b45a2+a0_0x5a29('0x20e'):''):_0x5b6232['accepts']['*']),_0x5b6232[a0_0x5a29('0x720')]))_0xad9c8b[a0_0x5a29('0x30c')](_0x6c62aa,_0x5b6232[a0_0x5a29('0x720')][_0x6c62aa]);if(_0x5b6232[a0_0x5a29('0x171')]&&(!0x1===_0x5b6232[a0_0x5a29('0x171')][a0_0x5a29('0x351')](_0x2c7d25,_0xad9c8b,_0x5b6232)||_0x955bdd))return _0xad9c8b[a0_0x5a29('0xa7')]();if(_0x2b05c5=a0_0x5a29('0xa7'),_0x515e39['add'](_0x5b6232[a0_0x5a29('0x760')]),_0xad9c8b[a0_0x5a29('0x610')](_0x5b6232['success']),_0xad9c8b[a0_0x5a29('0x255')](_0x5b6232[a0_0x5a29('0x8fc')]),_0x848499=_0x389d22(_0x121ab9,_0x5b6232,_0xee596a,_0xad9c8b)){if(_0xad9c8b[a0_0x5a29('0x8d4')]=0x1,_0x46ac96&&_0x46ebe0[a0_0x5a29('0x4f2')]('ajaxSend',[_0xad9c8b,_0x5b6232]),_0x955bdd)return _0xad9c8b;_0x5b6232[a0_0x5a29('0x75d')]&&_0x5b6232[a0_0x5a29('0x832')]>0x0&&(_0x3ae136=_0x2c3983['setTimeout'](function(){_0xad9c8b[a0_0x5a29('0xa7')](a0_0x5a29('0x832'));},_0x5b6232['timeout']));try{_0x955bdd=!0x1,_0x848499['send'](_0x33ba18,_0x534198);}catch(_0x4b02be){if(_0x955bdd)throw _0x4b02be;_0x534198(-0x1,_0x4b02be);}}else _0x534198(-0x1,a0_0x5a29('0x57c'));function _0x534198(_0x58e199,_0xfd7d8c,_0x473489,_0x590ca8){var _0x4a5885,_0x280c65,_0x4f7f30,_0x383d91,_0x207388,_0x39202a=_0xfd7d8c;_0x955bdd||(_0x955bdd=!0x0,_0x3ae136&&_0x2c3983[a0_0x5a29('0x3')](_0x3ae136),_0x848499=void 0x0,_0x16c798=_0x590ca8||'',_0xad9c8b['readyState']=_0x58e199>0x0?0x4:0x0,_0x4a5885=_0x58e199>=0xc8&&_0x58e199<0x12c||0x130===_0x58e199,_0x473489&&(_0x383d91=function(_0x55b594,_0x16974f,_0x3eb84d){for(var _0x9ee2fd,_0x3ccf01,_0x11e9d4,_0x232893,_0x2eb762=_0x55b594[a0_0x5a29('0x3e1')],_0x3a9c80=_0x55b594[a0_0x5a29('0x854')];'*'===_0x3a9c80[0x0];)_0x3a9c80[a0_0x5a29('0x60e')](),void 0x0===_0x9ee2fd&&(_0x9ee2fd=_0x55b594[a0_0x5a29('0x413')]||_0x16974f[a0_0x5a29('0x7a3')](a0_0x5a29('0x27f')));if(_0x9ee2fd)for(_0x3ccf01 in _0x2eb762)if(_0x2eb762[_0x3ccf01]&&_0x2eb762[_0x3ccf01][a0_0x5a29('0x25e')](_0x9ee2fd)){_0x3a9c80[a0_0x5a29('0x5dc')](_0x3ccf01);break;}if(_0x3a9c80[0x0]in _0x3eb84d)_0x11e9d4=_0x3a9c80[0x0];else{for(_0x3ccf01 in _0x3eb84d){if(!_0x3a9c80[0x0]||_0x55b594['converters'][_0x3ccf01+'\x20'+_0x3a9c80[0x0]]){_0x11e9d4=_0x3ccf01;break;}_0x232893||(_0x232893=_0x3ccf01);}_0x11e9d4=_0x11e9d4||_0x232893;}if(_0x11e9d4)return _0x11e9d4!==_0x3a9c80[0x0]&&_0x3a9c80[a0_0x5a29('0x5dc')](_0x11e9d4),_0x3eb84d[_0x11e9d4];}(_0x5b6232,_0xad9c8b,_0x473489)),!_0x4a5885&&_0xd48b4d[a0_0x5a29('0x3f8')](a0_0x5a29('0x633'),_0x5b6232[a0_0x5a29('0x854')])>-0x1&&(_0x5b6232['converters']['text\x20script']=function(){}),_0x383d91=function(_0x57f602,_0xdc1a56,_0x31c7a9,_0x316225){var _0x3a36f1,_0x422437,_0x5518fa,_0x1f7cd3,_0x51b53a,_0x2a51be={},_0x23e3e3=_0x57f602[a0_0x5a29('0x854')][a0_0x5a29('0x723')]();if(_0x23e3e3[0x1])for(_0x5518fa in _0x57f602[a0_0x5a29('0x487')])_0x2a51be[_0x5518fa[a0_0x5a29('0x792')]()]=_0x57f602[a0_0x5a29('0x487')][_0x5518fa];for(_0x422437=_0x23e3e3['shift']();_0x422437;)if(_0x57f602[a0_0x5a29('0x6d0')][_0x422437]&&(_0x31c7a9[_0x57f602[a0_0x5a29('0x6d0')][_0x422437]]=_0xdc1a56),!_0x51b53a&&_0x316225&&_0x57f602[a0_0x5a29('0x432')]&&(_0xdc1a56=_0x57f602[a0_0x5a29('0x432')](_0xdc1a56,_0x57f602[a0_0x5a29('0x614')])),_0x51b53a=_0x422437,_0x422437=_0x23e3e3[a0_0x5a29('0x60e')]()){if('*'===_0x422437)_0x422437=_0x51b53a;else{if('*'!==_0x51b53a&&_0x51b53a!==_0x422437){if(!(_0x5518fa=_0x2a51be[_0x51b53a+'\x20'+_0x422437]||_0x2a51be['*\x20'+_0x422437]))for(_0x3a36f1 in _0x2a51be)if((_0x1f7cd3=_0x3a36f1[a0_0x5a29('0xc5')]('\x20'))[0x1]===_0x422437&&(_0x5518fa=_0x2a51be[_0x51b53a+'\x20'+_0x1f7cd3[0x0]]||_0x2a51be['*\x20'+_0x1f7cd3[0x0]])){!0x0===_0x5518fa?_0x5518fa=_0x2a51be[_0x3a36f1]:!0x0!==_0x2a51be[_0x3a36f1]&&(_0x422437=_0x1f7cd3[0x0],_0x23e3e3[a0_0x5a29('0x5dc')](_0x1f7cd3[0x1]));break;}if(!0x0!==_0x5518fa){if(_0x5518fa&&_0x57f602[a0_0x5a29('0x28e')])_0xdc1a56=_0x5518fa(_0xdc1a56);else try{_0xdc1a56=_0x5518fa(_0xdc1a56);}catch(_0x51f5ca){return{'state':a0_0x5a29('0x115'),'error':_0x5518fa?_0x51f5ca:a0_0x5a29('0x6dd')+_0x51b53a+a0_0x5a29('0x905')+_0x422437};}}}}}return{'state':a0_0x5a29('0x977'),'data':_0xdc1a56};}(_0x5b6232,_0x383d91,_0xad9c8b,_0x4a5885),_0x4a5885?(_0x5b6232[a0_0x5a29('0x80')]&&((_0x207388=_0xad9c8b[a0_0x5a29('0x7a3')](a0_0x5a29('0x199')))&&(_0xd48b4d['lastModified'][_0x40779a]=_0x207388),(_0x207388=_0xad9c8b['getResponseHeader'](a0_0x5a29('0x7b5')))&&(_0xd48b4d['etag'][_0x40779a]=_0x207388)),0xcc===_0x58e199||a0_0x5a29('0x73f')===_0x5b6232['type']?_0x39202a='nocontent':0x130===_0x58e199?_0x39202a=a0_0x5a29('0x426'):(_0x39202a=_0x383d91[a0_0x5a29('0x5dd')],_0x280c65=_0x383d91[a0_0x5a29('0x77d')],_0x4a5885=!(_0x4f7f30=_0x383d91[a0_0x5a29('0x8fc')]))):(_0x4f7f30=_0x39202a,!_0x58e199&&_0x39202a||(_0x39202a=a0_0x5a29('0x8fc'),_0x58e199<0x0&&(_0x58e199=0x0))),_0xad9c8b[a0_0x5a29('0x521')]=_0x58e199,_0xad9c8b[a0_0x5a29('0x2f2')]=(_0xfd7d8c||_0x39202a)+'',_0x4a5885?_0x371f92['resolveWith'](_0x2c7d25,[_0x280c65,_0x39202a,_0xad9c8b]):_0x371f92[a0_0x5a29('0x514')](_0x2c7d25,[_0xad9c8b,_0x39202a,_0x4f7f30]),_0xad9c8b[a0_0x5a29('0x2d8')](_0x1399f1),_0x1399f1=void 0x0,_0x46ac96&&_0x46ebe0[a0_0x5a29('0x4f2')](_0x4a5885?'ajaxSuccess':a0_0x5a29('0x66c'),[_0xad9c8b,_0x5b6232,_0x4a5885?_0x280c65:_0x4f7f30]),_0x515e39[a0_0x5a29('0x54c')](_0x2c7d25,[_0xad9c8b,_0x39202a]),_0x46ac96&&(_0x46ebe0[a0_0x5a29('0x4f2')](a0_0x5a29('0x164'),[_0xad9c8b,_0x5b6232]),--_0xd48b4d[a0_0x5a29('0x8a6')]||_0xd48b4d[a0_0x5a29('0x204')][a0_0x5a29('0x4f2')](a0_0x5a29('0x187'))));}return _0xad9c8b;},'getJSON':function(_0x33947f,_0x4e47f2,_0x28b69f){return _0xd48b4d[a0_0x5a29('0x1e')](_0x33947f,_0x4e47f2,_0x28b69f,a0_0x5a29('0x1ab'));},'getScript':function(_0x272054,_0x5741d5){return _0xd48b4d[a0_0x5a29('0x1e')](_0x272054,void 0x0,_0x5741d5,'script');}}),_0xd48b4d['each']([a0_0x5a29('0x1e'),a0_0x5a29('0x4d5')],function(_0x18d6ba,_0x64a5de){_0xd48b4d[_0x64a5de]=function(_0x56bf5a,_0x12b8ac,_0x3faad1,_0xa74a01){return _0x3512f3(_0x12b8ac)&&(_0xa74a01=_0xa74a01||_0x3faad1,_0x3faad1=_0x12b8ac,_0x12b8ac=void 0x0),_0xd48b4d[a0_0x5a29('0x2ff')](_0xd48b4d[a0_0x5a29('0x630')]({'url':_0x56bf5a,'type':_0x64a5de,'dataType':_0xa74a01,'data':_0x12b8ac,'success':_0x3faad1},_0xd48b4d[a0_0x5a29('0x495')](_0x56bf5a)&&_0x56bf5a));};}),_0xd48b4d['ajaxPrefilter'](function(_0x7daf6f){var _0x1aa6b5;for(_0x1aa6b5 in _0x7daf6f[a0_0x5a29('0x720')])a0_0x5a29('0x605')===_0x1aa6b5[a0_0x5a29('0x792')]()&&(_0x7daf6f[a0_0x5a29('0x4f8')]=_0x7daf6f['headers'][_0x1aa6b5]||'');}),_0xd48b4d[a0_0x5a29('0x170')]=function(_0x2bd33a,_0x1afeba,_0x55919d){return _0xd48b4d['ajax']({'url':_0x2bd33a,'type':a0_0x5a29('0x6db'),'dataType':a0_0x5a29('0x633'),'cache':!0x0,'async':!0x1,'global':!0x1,'converters':{'text\x20script':function(){}},'dataFilter':function(_0x286544){_0xd48b4d['globalEval'](_0x286544,_0x1afeba,_0x55919d);}});},_0xd48b4d['fn'][a0_0x5a29('0x630')]({'wrapAll':function(_0x49657f){var _0x4be18b;return this[0x0]&&(_0x3512f3(_0x49657f)&&(_0x49657f=_0x49657f[a0_0x5a29('0x351')](this[0x0])),_0x4be18b=_0xd48b4d(_0x49657f,this[0x0][a0_0x5a29('0x23b')])['eq'](0x0)['clone'](!0x0),this[0x0]['parentNode']&&_0x4be18b[a0_0x5a29('0x925')](this[0x0]),_0x4be18b[a0_0x5a29('0x95a')](function(){for(var _0x523c05=this;_0x523c05['firstElementChild'];)_0x523c05=_0x523c05[a0_0x5a29('0x19f')];return _0x523c05;})[a0_0x5a29('0x89d')](this)),this;},'wrapInner':function(_0xe838a8){return _0x3512f3(_0xe838a8)?this[a0_0x5a29('0x6bc')](function(_0x1d34b8){_0xd48b4d(this)['wrapInner'](_0xe838a8[a0_0x5a29('0x351')](this,_0x1d34b8));}):this['each'](function(){var _0x15fe04=_0xd48b4d(this),_0x21d1c2=_0x15fe04[a0_0x5a29('0x3e1')]();_0x21d1c2[a0_0x5a29('0x515')]?_0x21d1c2['wrapAll'](_0xe838a8):_0x15fe04[a0_0x5a29('0x89d')](_0xe838a8);});},'wrap':function(_0x590601){var _0x53d965=_0x3512f3(_0x590601);return this['each'](function(_0x46a68f){_0xd48b4d(this)[a0_0x5a29('0x2f8')](_0x53d965?_0x590601[a0_0x5a29('0x351')](this,_0x46a68f):_0x590601);});},'unwrap':function(_0x34bfc7){return this[a0_0x5a29('0x65')](_0x34bfc7)[a0_0x5a29('0x5a5')](a0_0x5a29('0x24e'))['each'](function(){_0xd48b4d(this)[a0_0x5a29('0x25b')](this[a0_0x5a29('0x73c')]);}),this;}}),_0xd48b4d[a0_0x5a29('0x502')][a0_0x5a29('0x598')][a0_0x5a29('0x37d')]=function(_0x31dc38){return!_0xd48b4d[a0_0x5a29('0x502')][a0_0x5a29('0x598')][a0_0x5a29('0x56d')](_0x31dc38);},_0xd48b4d[a0_0x5a29('0x502')][a0_0x5a29('0x598')]['visible']=function(_0x3242d5){return!!(_0x3242d5[a0_0x5a29('0x44e')]||_0x3242d5[a0_0x5a29('0x50c')]||_0x3242d5[a0_0x5a29('0x2b9')]()['length']);},_0xd48b4d[a0_0x5a29('0x1d3')][a0_0x5a29('0x153')]=function(){try{return new _0x2c3983['XMLHttpRequest']();}catch(_0x35d232){}};var _0x39c7aa={0x0:0xc8,0x4c7:0xcc},_0x497fb0=_0xd48b4d[a0_0x5a29('0x1d3')][a0_0x5a29('0x153')]();_0x1da227[a0_0x5a29('0x231')]=!!_0x497fb0&&a0_0x5a29('0x726')in _0x497fb0,_0x1da227[a0_0x5a29('0x2ff')]=_0x497fb0=!!_0x497fb0,_0xd48b4d[a0_0x5a29('0x298')](function(_0x573a68){var _0x425996,_0x9de215;if(_0x1da227['cors']||_0x497fb0&&!_0x573a68[a0_0x5a29('0x69')])return{'send':function(_0x59342b,_0x1db7a2){var _0xa49c0c,_0x1c41c1=_0x573a68[a0_0x5a29('0x153')]();if(_0x1c41c1[a0_0x5a29('0x4a1')](_0x573a68[a0_0x5a29('0x519')],_0x573a68[a0_0x5a29('0x498')],_0x573a68[a0_0x5a29('0x75d')],_0x573a68[a0_0x5a29('0x603')],_0x573a68[a0_0x5a29('0x8a9')]),_0x573a68[a0_0x5a29('0x881')])for(_0xa49c0c in _0x573a68[a0_0x5a29('0x881')])_0x1c41c1[_0xa49c0c]=_0x573a68[a0_0x5a29('0x881')][_0xa49c0c];for(_0xa49c0c in(_0x573a68[a0_0x5a29('0x413')]&&_0x1c41c1['overrideMimeType']&&_0x1c41c1['overrideMimeType'](_0x573a68[a0_0x5a29('0x413')]),_0x573a68[a0_0x5a29('0x69')]||_0x59342b[a0_0x5a29('0x75c')]||(_0x59342b[a0_0x5a29('0x75c')]=a0_0x5a29('0x2da')),_0x59342b))_0x1c41c1['setRequestHeader'](_0xa49c0c,_0x59342b[_0xa49c0c]);_0x425996=function(_0x4c65f2){return function(){_0x425996&&(_0x425996=_0x9de215=_0x1c41c1[a0_0x5a29('0x3db')]=_0x1c41c1[a0_0x5a29('0x963')]=_0x1c41c1['onabort']=_0x1c41c1[a0_0x5a29('0x4b3')]=_0x1c41c1[a0_0x5a29('0x61')]=null,'abort'===_0x4c65f2?_0x1c41c1[a0_0x5a29('0xa7')]():a0_0x5a29('0x8fc')===_0x4c65f2?'number'!=typeof _0x1c41c1[a0_0x5a29('0x521')]?_0x1db7a2(0x0,'error'):_0x1db7a2(_0x1c41c1[a0_0x5a29('0x521')],_0x1c41c1[a0_0x5a29('0x2f2')]):_0x1db7a2(_0x39c7aa[_0x1c41c1['status']]||_0x1c41c1[a0_0x5a29('0x521')],_0x1c41c1[a0_0x5a29('0x2f2')],'text'!==(_0x1c41c1['responseType']||a0_0x5a29('0x3ce'))||a0_0x5a29('0x783')!=typeof _0x1c41c1[a0_0x5a29('0x397')]?{'binary':_0x1c41c1[a0_0x5a29('0x70a')]}:{'text':_0x1c41c1[a0_0x5a29('0x397')]},_0x1c41c1[a0_0x5a29('0x191')]()));};},_0x1c41c1[a0_0x5a29('0x3db')]=_0x425996(),_0x9de215=_0x1c41c1[a0_0x5a29('0x963')]=_0x1c41c1[a0_0x5a29('0x4b3')]=_0x425996(a0_0x5a29('0x8fc')),void 0x0!==_0x1c41c1[a0_0x5a29('0x340')]?_0x1c41c1[a0_0x5a29('0x340')]=_0x9de215:_0x1c41c1[a0_0x5a29('0x61')]=function(){0x4===_0x1c41c1['readyState']&&_0x2c3983['setTimeout'](function(){_0x425996&&_0x9de215();});},_0x425996=_0x425996(a0_0x5a29('0xa7'));try{_0x1c41c1[a0_0x5a29('0x3f6')](_0x573a68[a0_0x5a29('0x3ab')]&&_0x573a68['data']||null);}catch(_0xe85a39){if(_0x425996)throw _0xe85a39;}},'abort':function(){_0x425996&&_0x425996();}};}),_0xd48b4d[a0_0x5a29('0x8f3')](function(_0x1735de){_0x1735de[a0_0x5a29('0x69')]&&(_0x1735de[a0_0x5a29('0x3e1')][a0_0x5a29('0x633')]=!0x1);}),_0xd48b4d[a0_0x5a29('0x13f')]({'accepts':{'script':'text/javascript,\x20application/javascript,\x20application/ecmascript,\x20application/x-ecmascript'},'contents':{'script':/\b(?:java|ecma)script\b/},'converters':{'text\x20script':function(_0x135318){return _0xd48b4d[a0_0x5a29('0x66')](_0x135318),_0x135318;}}}),_0xd48b4d[a0_0x5a29('0x8f3')](a0_0x5a29('0x633'),function(_0x409e66){void 0x0===_0x409e66[a0_0x5a29('0x3f')]&&(_0x409e66[a0_0x5a29('0x3f')]=!0x1),_0x409e66[a0_0x5a29('0x69')]&&(_0x409e66[a0_0x5a29('0x519')]=a0_0x5a29('0x6db'));}),_0xd48b4d[a0_0x5a29('0x298')](a0_0x5a29('0x633'),function(_0x132ccd){var _0x1a21b5,_0x1c3a84;if(_0x132ccd[a0_0x5a29('0x69')]||_0x132ccd[a0_0x5a29('0x8bf')])return{'send':function(_0x24363a,_0x2210c0){_0x1a21b5=_0xd48b4d(a0_0x5a29('0x30'))[a0_0x5a29('0x5c6')](_0x132ccd[a0_0x5a29('0x8bf')]||{})[a0_0x5a29('0x116')]({'charset':_0x132ccd[a0_0x5a29('0x386')],'src':_0x132ccd[a0_0x5a29('0x498')]})['on'](a0_0x5a29('0x831'),_0x1c3a84=function(_0x1bd460){_0x1a21b5[a0_0x5a29('0x157')](),_0x1c3a84=null,_0x1bd460&&_0x2210c0(a0_0x5a29('0x8fc')===_0x1bd460['type']?0x194:0xc8,_0x1bd460[a0_0x5a29('0x519')]);}),_0x45f8a9[a0_0x5a29('0x435')][a0_0x5a29('0x365')](_0x1a21b5[0x0]);},'abort':function(){_0x1c3a84&&_0x1c3a84();}};});var _0x11388e,_0x204cca=[],_0x351eb3=/(=)\?(?=&|$)|\?\?/;_0xd48b4d[a0_0x5a29('0x13f')]({'jsonp':a0_0x5a29('0x591'),'jsonpCallback':function(){var _0x51c232=_0x204cca[a0_0x5a29('0x3fe')]()||_0xd48b4d[a0_0x5a29('0x385')]+'_'+_0x2c549c[a0_0x5a29('0x816')]++;return this[_0x51c232]=!0x0,_0x51c232;}}),_0xd48b4d[a0_0x5a29('0x8f3')](a0_0x5a29('0x7cd'),function(_0x57381c,_0x56bc5a,_0x399a2d){var _0x1ae7ad,_0x34697b,_0x22d762,_0xc7125=!0x1!==_0x57381c[a0_0x5a29('0x59f')]&&(_0x351eb3[a0_0x5a29('0x25e')](_0x57381c['url'])?a0_0x5a29('0x498'):a0_0x5a29('0x783')==typeof _0x57381c[a0_0x5a29('0x77d')]&&0x0===(_0x57381c[a0_0x5a29('0x4f8')]||'')[a0_0x5a29('0x26f')](a0_0x5a29('0x13e'))&&_0x351eb3[a0_0x5a29('0x25e')](_0x57381c[a0_0x5a29('0x77d')])&&a0_0x5a29('0x77d'));if(_0xc7125||a0_0x5a29('0x59f')===_0x57381c[a0_0x5a29('0x854')][0x0])return _0x1ae7ad=_0x57381c[a0_0x5a29('0xa5')]=_0x3512f3(_0x57381c[a0_0x5a29('0xa5')])?_0x57381c[a0_0x5a29('0xa5')]():_0x57381c[a0_0x5a29('0xa5')],_0xc7125?_0x57381c[_0xc7125]=_0x57381c[_0xc7125][a0_0x5a29('0x380')](_0x351eb3,'$1'+_0x1ae7ad):!0x1!==_0x57381c['jsonp']&&(_0x57381c['url']+=(_0x3a8d9d[a0_0x5a29('0x25e')](_0x57381c['url'])?'&':'?')+_0x57381c[a0_0x5a29('0x59f')]+'='+_0x1ae7ad),_0x57381c[a0_0x5a29('0x487')][a0_0x5a29('0x7eb')]=function(){return _0x22d762||_0xd48b4d[a0_0x5a29('0x8fc')](_0x1ae7ad+a0_0x5a29('0x29')),_0x22d762[0x0];},_0x57381c['dataTypes'][0x0]=a0_0x5a29('0x1ab'),_0x34697b=_0x2c3983[_0x1ae7ad],_0x2c3983[_0x1ae7ad]=function(){_0x22d762=arguments;},_0x399a2d['always'](function(){void 0x0===_0x34697b?_0xd48b4d(_0x2c3983)[a0_0x5a29('0xea')](_0x1ae7ad):_0x2c3983[_0x1ae7ad]=_0x34697b,_0x57381c[_0x1ae7ad]&&(_0x57381c[a0_0x5a29('0xa5')]=_0x56bc5a['jsonpCallback'],_0x204cca[a0_0x5a29('0x3cd')](_0x1ae7ad)),_0x22d762&&_0x3512f3(_0x34697b)&&_0x34697b(_0x22d762[0x0]),_0x22d762=_0x34697b=void 0x0;}),a0_0x5a29('0x633');}),_0x1da227[a0_0x5a29('0x6fb')]=((_0x11388e=_0x45f8a9[a0_0x5a29('0x49c')][a0_0x5a29('0x6fb')]('')['body'])[a0_0x5a29('0x13d')]=a0_0x5a29('0x602'),0x2===_0x11388e[a0_0x5a29('0x73c')][a0_0x5a29('0x515')]),_0xd48b4d['parseHTML']=function(_0x5ee3c1,_0x1d2f2b,_0x12aa33){return a0_0x5a29('0x783')!=typeof _0x5ee3c1?[]:(a0_0x5a29('0x4dd')==typeof _0x1d2f2b&&(_0x12aa33=_0x1d2f2b,_0x1d2f2b=!0x1),_0x1d2f2b||(_0x1da227['createHTMLDocument']?((_0x515999=(_0x1d2f2b=_0x45f8a9[a0_0x5a29('0x49c')]['createHTMLDocument'](''))[a0_0x5a29('0x56f')](a0_0x5a29('0x34b')))['href']=_0x45f8a9[a0_0x5a29('0x749')]['href'],_0x1d2f2b['head'][a0_0x5a29('0x365')](_0x515999)):_0x1d2f2b=_0x45f8a9),_0x4a63f7=!_0x12aa33&&[],(_0x5ec1d3=_0xb4aed[a0_0x5a29('0x2d5')](_0x5ee3c1))?[_0x1d2f2b['createElement'](_0x5ec1d3[0x1])]:(_0x5ec1d3=_0x4bbcd4([_0x5ee3c1],_0x1d2f2b,_0x4a63f7),_0x4a63f7&&_0x4a63f7[a0_0x5a29('0x515')]&&_0xd48b4d(_0x4a63f7)['remove'](),_0xd48b4d['merge']([],_0x5ec1d3['childNodes'])));var _0x515999,_0x5ec1d3,_0x4a63f7;},_0xd48b4d['fn'][a0_0x5a29('0x597')]=function(_0x98d72f,_0x53e420,_0x2b6368){var _0x3a531f,_0x812111,_0x42e381,_0x5e4d88=this,_0x8af56f=_0x98d72f[a0_0x5a29('0x26f')]('\x20');return _0x8af56f>-0x1&&(_0x3a531f=_0x516f0(_0x98d72f[a0_0x5a29('0x723')](_0x8af56f)),_0x98d72f=_0x98d72f['slice'](0x0,_0x8af56f)),_0x3512f3(_0x53e420)?(_0x2b6368=_0x53e420,_0x53e420=void 0x0):_0x53e420&&a0_0x5a29('0x950')==typeof _0x53e420&&(_0x812111=a0_0x5a29('0x2a')),_0x5e4d88[a0_0x5a29('0x515')]>0x0&&_0xd48b4d[a0_0x5a29('0x2ff')]({'url':_0x98d72f,'type':_0x812111||'GET','dataType':a0_0x5a29('0x8b'),'data':_0x53e420})[a0_0x5a29('0x610')](function(_0x4fd2e5){_0x42e381=arguments,_0x5e4d88[a0_0x5a29('0x8b')](_0x3a531f?_0xd48b4d(a0_0x5a29('0x18f'))['append'](_0xd48b4d[a0_0x5a29('0x74a')](_0x4fd2e5))['find'](_0x3a531f):_0x4fd2e5);})['always'](_0x2b6368&&function(_0x283b4d,_0x10207a){_0x5e4d88[a0_0x5a29('0x6bc')](function(){_0x2b6368['apply'](this,_0x42e381||[_0x283b4d[a0_0x5a29('0x397')],_0x10207a,_0x283b4d]);});}),this;},_0xd48b4d['expr'][a0_0x5a29('0x598')][a0_0x5a29('0x609')]=function(_0x3e0f0d){return _0xd48b4d[a0_0x5a29('0x522')](_0xd48b4d['timers'],function(_0x17e04c){return _0x3e0f0d===_0x17e04c[a0_0x5a29('0x192')];})['length'];},_0xd48b4d[a0_0x5a29('0x58d')]={'setOffset':function(_0x5644b7,_0x353942,_0x555cfd){var _0x25a451,_0x22caf1,_0x12c396,_0x474d9c,_0x999de3,_0x346cdc,_0xcc630c=_0xd48b4d[a0_0x5a29('0x54')](_0x5644b7,'position'),_0x21b88c=_0xd48b4d(_0x5644b7),_0x28b4b2={};a0_0x5a29('0x280')===_0xcc630c&&(_0x5644b7['style'][a0_0x5a29('0x53c')]=a0_0x5a29('0x1e2')),_0x999de3=_0x21b88c[a0_0x5a29('0x58d')](),_0x12c396=_0xd48b4d[a0_0x5a29('0x54')](_0x5644b7,a0_0x5a29('0x5ad')),_0x346cdc=_0xd48b4d[a0_0x5a29('0x54')](_0x5644b7,a0_0x5a29('0x3a3')),('absolute'===_0xcc630c||a0_0x5a29('0x5b9')===_0xcc630c)&&(_0x12c396+_0x346cdc)[a0_0x5a29('0x26f')]('auto')>-0x1?(_0x474d9c=(_0x25a451=_0x21b88c[a0_0x5a29('0x53c')]())[a0_0x5a29('0x5ad')],_0x22caf1=_0x25a451[a0_0x5a29('0x3a3')]):(_0x474d9c=parseFloat(_0x12c396)||0x0,_0x22caf1=parseFloat(_0x346cdc)||0x0),_0x3512f3(_0x353942)&&(_0x353942=_0x353942[a0_0x5a29('0x351')](_0x5644b7,_0x555cfd,_0xd48b4d[a0_0x5a29('0x630')]({},_0x999de3))),null!=_0x353942[a0_0x5a29('0x5ad')]&&(_0x28b4b2['top']=_0x353942['top']-_0x999de3[a0_0x5a29('0x5ad')]+_0x474d9c),null!=_0x353942[a0_0x5a29('0x3a3')]&&(_0x28b4b2['left']=_0x353942[a0_0x5a29('0x3a3')]-_0x999de3[a0_0x5a29('0x3a3')]+_0x22caf1),'using'in _0x353942?_0x353942[a0_0x5a29('0x2fb')][a0_0x5a29('0x351')](_0x5644b7,_0x28b4b2):(a0_0x5a29('0x777')==typeof _0x28b4b2[a0_0x5a29('0x5ad')]&&(_0x28b4b2[a0_0x5a29('0x5ad')]+='px'),a0_0x5a29('0x777')==typeof _0x28b4b2[a0_0x5a29('0x3a3')]&&(_0x28b4b2[a0_0x5a29('0x3a3')]+='px'),_0x21b88c['css'](_0x28b4b2));}},_0xd48b4d['fn']['extend']({'offset':function(_0x5e22cf){if(arguments[a0_0x5a29('0x515')])return void 0x0===_0x5e22cf?this:this[a0_0x5a29('0x6bc')](function(_0x42cda1){_0xd48b4d['offset']['setOffset'](this,_0x5e22cf,_0x42cda1);});var _0x30af78,_0x125767,_0x236110=this[0x0];return _0x236110?_0x236110[a0_0x5a29('0x2b9')]()[a0_0x5a29('0x515')]?(_0x30af78=_0x236110[a0_0x5a29('0x398')](),_0x125767=_0x236110[a0_0x5a29('0x23b')][a0_0x5a29('0x277')],{'top':_0x30af78[a0_0x5a29('0x5ad')]+_0x125767['pageYOffset'],'left':_0x30af78[a0_0x5a29('0x3a3')]+_0x125767[a0_0x5a29('0x36b')]}):{'top':0x0,'left':0x0}:void 0x0;},'position':function(){if(this[0x0]){var _0x205f4d,_0x3d8685,_0x175ad0,_0x281fb8=this[0x0],_0x4dd37b={'top':0x0,'left':0x0};if('fixed'===_0xd48b4d[a0_0x5a29('0x54')](_0x281fb8,a0_0x5a29('0x53c')))_0x3d8685=_0x281fb8[a0_0x5a29('0x398')]();else{for(_0x3d8685=this[a0_0x5a29('0x58d')](),_0x175ad0=_0x281fb8['ownerDocument'],_0x205f4d=_0x281fb8['offsetParent']||_0x175ad0['documentElement'];_0x205f4d&&(_0x205f4d===_0x175ad0[a0_0x5a29('0x24e')]||_0x205f4d===_0x175ad0[a0_0x5a29('0x937')])&&a0_0x5a29('0x280')===_0xd48b4d[a0_0x5a29('0x54')](_0x205f4d,a0_0x5a29('0x53c'));)_0x205f4d=_0x205f4d[a0_0x5a29('0x3d5')];_0x205f4d&&_0x205f4d!==_0x281fb8&&0x1===_0x205f4d[a0_0x5a29('0x23f')]&&((_0x4dd37b=_0xd48b4d(_0x205f4d)['offset']())[a0_0x5a29('0x5ad')]+=_0xd48b4d[a0_0x5a29('0x54')](_0x205f4d,'borderTopWidth',!0x0),_0x4dd37b['left']+=_0xd48b4d['css'](_0x205f4d,a0_0x5a29('0x7bf'),!0x0));}return{'top':_0x3d8685['top']-_0x4dd37b['top']-_0xd48b4d[a0_0x5a29('0x54')](_0x281fb8,a0_0x5a29('0x652'),!0x0),'left':_0x3d8685['left']-_0x4dd37b['left']-_0xd48b4d[a0_0x5a29('0x54')](_0x281fb8,a0_0x5a29('0x78c'),!0x0)};}},'offsetParent':function(){return this[a0_0x5a29('0x95a')](function(){for(var _0x33ed5e=this[a0_0x5a29('0x728')];_0x33ed5e&&'static'===_0xd48b4d[a0_0x5a29('0x54')](_0x33ed5e,a0_0x5a29('0x53c'));)_0x33ed5e=_0x33ed5e['offsetParent'];return _0x33ed5e||_0x2cb20b;});}}),_0xd48b4d['each']({'scrollLeft':'pageXOffset','scrollTop':a0_0x5a29('0x81c')},function(_0x2b56f2,_0x1673fc){var _0x261f99=a0_0x5a29('0x81c')===_0x1673fc;_0xd48b4d['fn'][_0x2b56f2]=function(_0x2eb39c){return _0x3a4acb(this,function(_0x5c67f4,_0x1199e1,_0x27a66c){var _0x275927;if(_0x4f93e3(_0x5c67f4)?_0x275927=_0x5c67f4:0x9===_0x5c67f4[a0_0x5a29('0x23f')]&&(_0x275927=_0x5c67f4['defaultView']),void 0x0===_0x27a66c)return _0x275927?_0x275927[_0x1673fc]:_0x5c67f4[_0x1199e1];_0x275927?_0x275927[a0_0x5a29('0x56')](_0x261f99?_0x275927['pageXOffset']:_0x27a66c,_0x261f99?_0x27a66c:_0x275927['pageYOffset']):_0x5c67f4[_0x1199e1]=_0x27a66c;},_0x2b56f2,_0x2eb39c,arguments[a0_0x5a29('0x515')]);};}),_0xd48b4d[a0_0x5a29('0x6bc')]([a0_0x5a29('0x5ad'),a0_0x5a29('0x3a3')],function(_0x4742fd,_0x1a0957){_0xd48b4d[a0_0x5a29('0x555')][_0x1a0957]=_0x5e9df6(_0x1da227[a0_0x5a29('0x665')],function(_0x4b9926,_0x3c3091){if(_0x3c3091)return _0x3c3091=_0x2c8577(_0x4b9926,_0x1a0957),_0xc462f7[a0_0x5a29('0x25e')](_0x3c3091)?_0xd48b4d(_0x4b9926)[a0_0x5a29('0x53c')]()[_0x1a0957]+'px':_0x3c3091;});}),_0xd48b4d[a0_0x5a29('0x6bc')]({'Height':a0_0x5a29('0x6b7'),'Width':a0_0x5a29('0x96f')},function(_0x1a6f07,_0x5f599c){_0xd48b4d[a0_0x5a29('0x6bc')]({'padding':'inner'+_0x1a6f07,'content':_0x5f599c,'':a0_0x5a29('0x202')+_0x1a6f07},function(_0x2a0956,_0x498a7a){_0xd48b4d['fn'][_0x498a7a]=function(_0x5e512b,_0x2ae86b){var _0x2deb81=arguments['length']&&(_0x2a0956||'boolean'!=typeof _0x5e512b),_0x4d271f=_0x2a0956||(!0x0===_0x5e512b||!0x0===_0x2ae86b?a0_0x5a29('0x5f'):a0_0x5a29('0xee'));return _0x3a4acb(this,function(_0x2c0ae9,_0x168fb4,_0x508beb){var _0x534dab;return _0x4f93e3(_0x2c0ae9)?0x0===_0x498a7a['indexOf'](a0_0x5a29('0x202'))?_0x2c0ae9[a0_0x5a29('0x64f')+_0x1a6f07]:_0x2c0ae9[a0_0x5a29('0x62a')]['documentElement'][a0_0x5a29('0x626')+_0x1a6f07]:0x9===_0x2c0ae9[a0_0x5a29('0x23f')]?(_0x534dab=_0x2c0ae9['documentElement'],Math[a0_0x5a29('0x670')](_0x2c0ae9[a0_0x5a29('0x24e')][a0_0x5a29('0x5c')+_0x1a6f07],_0x534dab[a0_0x5a29('0x5c')+_0x1a6f07],_0x2c0ae9['body'][a0_0x5a29('0x58d')+_0x1a6f07],_0x534dab[a0_0x5a29('0x58d')+_0x1a6f07],_0x534dab[a0_0x5a29('0x626')+_0x1a6f07])):void 0x0===_0x508beb?_0xd48b4d[a0_0x5a29('0x54')](_0x2c0ae9,_0x168fb4,_0x4d271f):_0xd48b4d['style'](_0x2c0ae9,_0x168fb4,_0x508beb,_0x4d271f);},_0x5f599c,_0x2deb81?_0x5e512b:void 0x0,_0x2deb81);};});}),_0xd48b4d[a0_0x5a29('0x6bc')]([a0_0x5a29('0x4c4'),a0_0x5a29('0x187'),a0_0x5a29('0x164'),a0_0x5a29('0x66c'),a0_0x5a29('0x667'),a0_0x5a29('0x790')],function(_0x16c62c,_0x3a801f){_0xd48b4d['fn'][_0x3a801f]=function(_0x210264){return this['on'](_0x3a801f,_0x210264);};}),_0xd48b4d['fn'][a0_0x5a29('0x630')]({'bind':function(_0x567e38,_0x136b97,_0x225a52){return this['on'](_0x567e38,null,_0x136b97,_0x225a52);},'unbind':function(_0x511028,_0x211a1b){return this[a0_0x5a29('0x59a')](_0x511028,null,_0x211a1b);},'delegate':function(_0x5cdd98,_0x201762,_0x6918be,_0x2addef){return this['on'](_0x201762,_0x5cdd98,_0x6918be,_0x2addef);},'undelegate':function(_0x29f0be,_0x23bdd4,_0x3e0377){return 0x1===arguments[a0_0x5a29('0x515')]?this[a0_0x5a29('0x59a')](_0x29f0be,'**'):this[a0_0x5a29('0x59a')](_0x23bdd4,_0x29f0be||'**',_0x3e0377);},'hover':function(_0x102dfe,_0x5e3989){return this[a0_0x5a29('0x349')](_0x102dfe)['mouseleave'](_0x5e3989||_0x102dfe);}}),_0xd48b4d[a0_0x5a29('0x6bc')](a0_0x5a29('0x88f')[a0_0x5a29('0xc5')]('\x20'),function(_0x4de095,_0x3cfeca){_0xd48b4d['fn'][_0x3cfeca]=function(_0xd3c49c,_0x26d298){return arguments[a0_0x5a29('0x515')]>0x0?this['on'](_0x3cfeca,null,_0xd3c49c,_0x26d298):this[a0_0x5a29('0x4f2')](_0x3cfeca);};});var _0x4543d8=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;_0xd48b4d['proxy']=function(_0x5ddafa,_0x4ae80e){var _0x3c1ae3,_0x3c1b05,_0x1db214;if('string'==typeof _0x4ae80e&&(_0x3c1ae3=_0x5ddafa[_0x4ae80e],_0x4ae80e=_0x5ddafa,_0x5ddafa=_0x3c1ae3),_0x3512f3(_0x5ddafa))return _0x3c1b05=_0xbd54eb[a0_0x5a29('0x351')](arguments,0x2),(_0x1db214=function(){return _0x5ddafa['apply'](_0x4ae80e||this,_0x3c1b05[a0_0x5a29('0x6c9')](_0xbd54eb[a0_0x5a29('0x351')](arguments)));})[a0_0x5a29('0x816')]=_0x5ddafa['guid']=_0x5ddafa[a0_0x5a29('0x816')]||_0xd48b4d[a0_0x5a29('0x816')]++,_0x1db214;},_0xd48b4d[a0_0x5a29('0x84c')]=function(_0x5d4768){_0x5d4768?_0xd48b4d['readyWait']++:_0xd48b4d[a0_0x5a29('0x3d')](!0x0);},_0xd48b4d[a0_0x5a29('0x7aa')]=Array[a0_0x5a29('0x7aa')],_0xd48b4d[a0_0x5a29('0x4f0')]=JSON[a0_0x5a29('0x1e7')],_0xd48b4d[a0_0x5a29('0x63b')]=_0x2aac73,_0xd48b4d['isFunction']=_0x3512f3,_0xd48b4d[a0_0x5a29('0x569')]=_0x4f93e3,_0xd48b4d['camelCase']=_0x65089b,_0xd48b4d[a0_0x5a29('0x519')]=_0x5c303c,_0xd48b4d[a0_0x5a29('0x1eb')]=Date[a0_0x5a29('0x1eb')],_0xd48b4d[a0_0x5a29('0x323')]=function(_0x3903f0){var _0x568295=_0xd48b4d[a0_0x5a29('0x519')](_0x3903f0);return(a0_0x5a29('0x777')===_0x568295||'string'===_0x568295)&&!isNaN(_0x3903f0-parseFloat(_0x3903f0));},_0xd48b4d['trim']=function(_0x1584f8){return null==_0x1584f8?'':(_0x1584f8+'')[a0_0x5a29('0x380')](_0x4543d8,'');},void 0x0===(_0x5837b2=function(){return _0xd48b4d;}['apply'](_0x5a0808,[]))||(_0x5440b6[a0_0x5a29('0x5a')]=_0x5837b2);var _0x268868=_0x2c3983[a0_0x5a29('0xbe')],_0x2fe593=_0x2c3983['$'];return _0xd48b4d['noConflict']=function(_0x5be8bc){return _0x2c3983['$']===_0xd48b4d&&(_0x2c3983['$']=_0x2fe593),_0x5be8bc&&_0x2c3983[a0_0x5a29('0xbe')]===_0xd48b4d&&(_0x2c3983['jQuery']=_0x268868),_0xd48b4d;},void 0x0===_0x398f43&&(_0x2c3983[a0_0x5a29('0xbe')]=_0x2c3983['$']=_0xd48b4d),_0xd48b4d;});},function(_0x3ba832,_0x34506a,_0x3ed6dd){'use strict';_0x34506a['a']={'NONE':a0_0x5a29('0x7a4'),'XYZ':a0_0x5a29('0x212'),'ARCGIS':a0_0x5a29('0x690'),'GOOGLE':a0_0x5a29('0x90'),'VR':'vr'};},function(_0x315552,_0x378389,_0x2e1454){var _0x4c7999=_0x2e1454(0x39),_0x1651b7=_0x2e1454(0x3a),_0x1a1123=_0x2e1454(0x3b),_0x17a4be=_0x2e1454(0x3c);_0x315552[a0_0x5a29('0x5a')]=function(_0x2f3c56){return _0x4c7999(_0x2f3c56)||_0x1651b7(_0x2f3c56)||_0x1a1123(_0x2f3c56)||_0x17a4be();};},function(_0x22e2d2,_0x6d0681,_0x48029b){'use strict';_0x6d0681['a']={};},function(_0x4726a7,_0x5d7dbc,_0xe97ff1){'use strict';_0x5d7dbc['a']={};},function(_0x4db922,_0x38e9af){function _0x282dcf(_0x587532){return a0_0x5a29('0x2ae')==typeof Symbol&&'symbol'==typeof Symbol['iterator']?_0x4db922[a0_0x5a29('0x5a')]=_0x282dcf=function(_0x166d24){return typeof _0x166d24;}:_0x4db922[a0_0x5a29('0x5a')]=_0x282dcf=function(_0x4208ae){return _0x4208ae&&a0_0x5a29('0x2ae')==typeof Symbol&&_0x4208ae['constructor']===Symbol&&_0x4208ae!==Symbol[a0_0x5a29('0x928')]?a0_0x5a29('0x59b'):typeof _0x4208ae;},_0x282dcf(_0x587532);}_0x4db922[a0_0x5a29('0x5a')]=_0x282dcf;},function(_0x47bf94,_0xe2b82c){_0x47bf94[a0_0x5a29('0x5a')]=function(_0x26aa9c,_0x51f565){(null==_0x51f565||_0x51f565>_0x26aa9c[a0_0x5a29('0x515')])&&(_0x51f565=_0x26aa9c['length']);for(var _0x384ea8=0x0,_0x339c3e=new Array(_0x51f565);_0x384ea8<_0x51f565;_0x384ea8++)_0x339c3e[_0x384ea8]=_0x26aa9c[_0x384ea8];return _0x339c3e;};},function(_0x2b6508,_0x5695b9,_0x5a439d){var _0x225497=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x5609ad=_0x5a439d(0x42),_0x291544=_0x5a439d(0x43),_0x4a2409=_0x5a439d(0x44),_0x484c8e=_0x5a439d(0x45),_0x36926f=_0x5a439d(0x46),_0x4916e6=_0x5a439d(0x47),_0x49e34a=_0x5a439d(0x1d),_0x49e46a=_0x5a439d(0x1d),_0x36f944=_0x5a439d(0x48),_0x243634=_0x5a439d(0x49),_0x48f333=_0x5a439d(0x4a),_0xb42fb6=_0x5a439d(0x4b),_0x1280ee=_0x5a439d(0x4c),_0x511a8f=_0x5a439d(0x4d),_0x47a8b5=_0x5a439d(0x4e),_0x7a34a1=_0x5a439d(0x4f),_0x14d2b0=_0x5a439d(0x50),_0x611a23=_0x5a439d(0x51),_0x244935=_0x5a439d(0x52),_0x1dddf3=_0x5a439d(0x53);_0x225497[a0_0x5a29('0x512')][a0_0x5a29('0x52d')][a0_0x5a29('0x94a')]=_0x484c8e,_0x225497['ShaderSource']['_czmBuiltinsAndUniforms'][a0_0x5a29('0x332')]=_0x36926f,_0x225497['Material'][a0_0x5a29('0x1ea')]='PolylineEmission',_0x225497[a0_0x5a29('0x27e')]['_materialCache'][a0_0x5a29('0xcd')](_0x225497['Material']['PolylineEmissionType'],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x1ea')],'uniforms':{'color':new _0x225497[(a0_0x5a29('0x82'))](0x1,0x0,0x0,0.7)},'source':_0x5609ad},'translucent':function(_0xe0b35d){return!0x0;}}),_0x225497['Material'][a0_0x5a29('0x14')]=a0_0x5a29('0x15e'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')]['addMaterial'](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x14')],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x14')],'uniforms':{'color':new _0x225497[(a0_0x5a29('0x82'))](0x1,0x0,0x0,0.7),'speed':0x2d},'source':_0x291544},'translucent':function(_0x20402f){return!0x0;}}),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xd8')]=a0_0x5a29('0x8e0'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xd8')],{'fabric':{'type':_0x225497['Material'][a0_0x5a29('0xd8')],'uniforms':{'color':new _0x225497['Color'](0x1,0x0,0x0,0.7),'image':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x8e5')],'speed':0x2d,'repeat':new _0x225497[(a0_0x5a29('0x11b'))](0x1,0x1)},'source':_0x4a2409},'translucent':function(_0x188d72){return!0x0;}}),_0x225497['Material'][a0_0x5a29('0x4ed')]=a0_0x5a29('0x974'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')]['addMaterial'](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x4ed')],{'fabric':{'type':_0x225497['Material']['AsphaltType'],'uniforms':{'asphaltColor':new _0x225497['Color'](0.15,0.15,0.15,0x1),'bumpSize':0.02,'roughness':0.2},'source':_0x4916e6},'translucent':function(_0xe1b3f3){return _0xe1b3f3[a0_0x5a29('0x14d')][a0_0x5a29('0x5c9')]['alpha']<0x1;}}),_0x225497[a0_0x5a29('0x27e')]['BlobType']=a0_0x5a29('0x4ad'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')]['BlobType'],{'fabric':{'type':_0x225497['Material'][a0_0x5a29('0x265')],'uniforms':{'lightColor':new _0x225497[(a0_0x5a29('0x82'))](0x1,0x1,0x1,0.5),'darkColor':new _0x225497[(a0_0x5a29('0x82'))](0x0,0x0,0x1,0.5),'frequency':0xa},'source':_0x49e34a},'translucent':function(_0x37fc0f){var _0x45519b=_0x37fc0f[a0_0x5a29('0x14d')];return _0x45519b[a0_0x5a29('0x3fb')]['alpha']<0x1||_0x45519b['darkColor']['alpha']<0x0;}}),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x845')]='Brick',_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x845')],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x845')],'uniforms':{'brickColor':new _0x225497[(a0_0x5a29('0x82'))](0.6,0.3,0.1,0x1),'mortarColor':new _0x225497[(a0_0x5a29('0x82'))](0.8,0.8,0.7,0x1),'brickSize':new _0x225497[(a0_0x5a29('0x11b'))](0.3,0.15),'brickPct':new _0x225497[(a0_0x5a29('0x11b'))](0.9,0.85),'brickRoughness':0.2,'mortarRoughness':0.1},'source':_0x49e46a},'translucent':function(_0x3682ae){var _0x120023=_0x3682ae[a0_0x5a29('0x14d')];return _0x120023[a0_0x5a29('0x4f')][a0_0x5a29('0x10e')]<0x1||_0x120023['mortarColor']['alpha']<0x1;}}),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x85c')]=a0_0x5a29('0x8b0'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')]['addMaterial'](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x85c')],{'fabric':{'type':_0x225497['Material']['CementType'],'uniforms':{'cementColor':new _0x225497['Color'](0.95,0.95,0.85,0x1),'grainScale':0.01,'roughness':0.3},'source':_0x36f944},'translucent':function(_0x3d2fb0){return _0x3d2fb0[a0_0x5a29('0x14d')][a0_0x5a29('0x44a')][a0_0x5a29('0x10e')]<0x1;}}),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x1d9')]=a0_0x5a29('0x762'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')]['addMaterial'](_0x225497[a0_0x5a29('0x27e')]['ErosionType'],{'fabric':{'type':_0x225497['Material']['ErosionType'],'uniforms':{'color':new _0x225497[(a0_0x5a29('0x82'))](0x1,0x0,0x0,0.5),'time':0x1},'source':_0x243634},'translucent':function(_0x1236f9){return _0x1236f9[a0_0x5a29('0x14d')][a0_0x5a29('0x6ed')][a0_0x5a29('0x10e')]<0x1;}}),_0x225497[a0_0x5a29('0x27e')]['FacetType']=a0_0x5a29('0x79e'),_0x225497['Material'][a0_0x5a29('0xef')][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x1c2')],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')]['FacetType'],'uniforms':{'lightColor':new _0x225497[(a0_0x5a29('0x82'))](0.25,0.25,0.25,0.75),'darkColor':new _0x225497[(a0_0x5a29('0x82'))](0.75,0.75,0.75,0.75),'frequency':0xa},'source':_0x48f333},'translucent':function(_0x1bf576){var _0x296069=_0x1bf576[a0_0x5a29('0x14d')];return _0x296069['lightColor'][a0_0x5a29('0x10e')]<0x1||_0x296069[a0_0x5a29('0x870')][a0_0x5a29('0x10e')]<0x0;}}),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x2d2')]=a0_0x5a29('0x4c5'),_0x225497['Material'][a0_0x5a29('0xef')][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x2d2')],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x2d2')],'materials':{'reflection':{'type':_0x225497['Material']['ReflectionType']},'refraction':{'type':_0x225497['Material'][a0_0x5a29('0x2b7')]}},'source':_0xb42fb6},'translucent':!0x1}),_0x225497['Material']['GrassType']=a0_0x5a29('0x804'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')]['addMaterial'](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x501')],{'fabric':{'type':_0x225497['Material'][a0_0x5a29('0x501')],'uniforms':{'grassColor':new _0x225497[(a0_0x5a29('0x82'))](0.25,0.4,0.1,0x1),'dirtColor':new _0x225497[(a0_0x5a29('0x82'))](0.1,0.1,0.1,0x1),'patchiness':1.5},'source':_0x1280ee},'translucent':function(_0x4158e8){var _0x497672=_0x4158e8['uniforms'];return _0x497672[a0_0x5a29('0x409')][a0_0x5a29('0x10e')]<0x1||_0x497672['dirtColor'][a0_0x5a29('0x10e')]<0x1;}}),_0x225497[a0_0x5a29('0x27e')]['ReflectionType']=a0_0x5a29('0x25'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x79d')],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x79d')],'uniforms':{'cubeMap':_0x225497['Material'][a0_0x5a29('0x8c3')],'channels':'rgb'},'source':_0x511a8f},'translucent':!0x1}),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x2b7')]='Refraction',_0x225497[a0_0x5a29('0x27e')]['_materialCache'][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')]['RefractionType'],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x2b7')],'uniforms':{'cubeMap':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x8c3')],'channels':a0_0x5a29('0x1b8'),'indexOfRefractionRatio':0.9},'source':_0x47a8b5},'translucent':!0x1}),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x270')]='TieDye',_0x225497[a0_0x5a29('0x27e')]['_materialCache'][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x270')],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x270')],'uniforms':{'lightColor':new _0x225497[(a0_0x5a29('0x82'))](0x1,0x1,0x0,0.75),'darkColor':new _0x225497[(a0_0x5a29('0x82'))](0x1,0x0,0x0,0.75),'frequency':0x5},'source':_0x7a34a1},'translucent':function(_0x31b737){var _0x57ad35=_0x31b737[a0_0x5a29('0x14d')];return _0x57ad35['lightColor']['alpha']<0x1||_0x57ad35['darkColor'][a0_0x5a29('0x10e')]<0x0;}}),_0x225497[a0_0x5a29('0x27e')]['WoodType']=a0_0x5a29('0x1ff'),_0x225497[a0_0x5a29('0x27e')]['_materialCache'][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x648')],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x648')],'uniforms':{'lightWoodColor':new _0x225497[(a0_0x5a29('0x82'))](0.6,0.3,0.1,0x1),'darkWoodColor':new _0x225497[(a0_0x5a29('0x82'))](0.4,0.2,0.07,0x1),'ringFrequency':0x3,'noiseScale':new _0x225497[(a0_0x5a29('0x11b'))](0.7,0.5),'grainFrequency':0x1b},'source':_0x14d2b0},'translucent':function(_0x40508d){var _0x2f6656=_0x40508d['uniforms'];return _0x2f6656[a0_0x5a29('0x877')]['alpha']<0x1||_0x2f6656[a0_0x5a29('0x815')][a0_0x5a29('0x10e')]<0x1;}}),_0x225497['Material'][a0_0x5a29('0x43b')]=a0_0x5a29('0x5d2'),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')][a0_0x5a29('0xcd')](_0x225497['Material'][a0_0x5a29('0x43b')],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x43b')],'uniforms':{'color':new _0x225497['Color'](0x1,0x0,0x0,0.7),'speed':0x2d},'source':_0x611a23},'translucent':function(_0x3ce54e){return!0x0;}}),_0x225497['Material'][a0_0x5a29('0x6ce')]=a0_0x5a29('0x3a8'),_0x225497[a0_0x5a29('0x27e')]['_materialCache'][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x6ce')],{'fabric':{'type':_0x225497['Material'][a0_0x5a29('0x6ce')],'uniforms':{'color':new _0x225497[(a0_0x5a29('0x82'))](0x1,0x0,0x0,0.7),'speed':0x2d,'count':0x1,'gradient':0.1},'source':_0x244935},'translucent':function(_0x133d86){return!0x0;}}),_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x79c')]='WallTrailMaterial',_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0xef')][a0_0x5a29('0xcd')](_0x225497[a0_0x5a29('0x27e')]['WallTrailMaterialType'],{'fabric':{'type':_0x225497[a0_0x5a29('0x27e')][a0_0x5a29('0x79c')],'uniforms':{'color':new _0x225497[(a0_0x5a29('0x82'))](0x1,0x0,0x0,0.7),'image':_0x225497['Material'][a0_0x5a29('0x8e5')],'speed':0xa},'source':_0x1dddf3},'translucent':function(_0x578d29){return!0x0;}});},function(_0x3c76a0,_0x5da773){_0x3c76a0[a0_0x5a29('0x5a')]=a0_0x5a29('0x41b');},function(_0x53e2f8,_0x9bf132,_0x557599){'use strict';var _0x2a567b=_0x557599(0x0),_0x5115d1=_0x557599['n'](_0x2a567b),_0x2883d9=_0x557599(0x1),_0x465a71=_0x557599['n'](_0x2883d9),_0x3f2387=DC['Namespace'][a0_0x5a29('0x6e8')],_0x4fbdc3=_0x557599(0x54),_0x506e85=_0x3f2387[a0_0x5a29('0x82')]['fromBytes'](0x0,0xff,0xff,0xff),_0x2663e5=function(){function _0x37a356(_0x11d70f){_0x5115d1()(this,_0x37a356),_0x11d70f=_0x11d70f||{},this[a0_0x5a29('0x5e6')]=new _0x3f2387[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x918')]=void 0x0,this[a0_0x5a29('0x52b')]=void 0x0,this[a0_0x5a29('0x7d7')]=void 0x0,this[a0_0x5a29('0x20b')]=void 0x0,this[a0_0x5a29('0xac')]=void 0x0,this['_speedSubscription']=void 0x0,this[a0_0x5a29('0x6ed')]=_0x11d70f[a0_0x5a29('0x6ed')]||_0x506e85,this['speed']=_0x11d70f[a0_0x5a29('0x7e1')]||0x2d,this[a0_0x5a29('0xfa')]=_0x4fbdc3;}return _0x465a71()(_0x37a356,[{'key':a0_0x5a29('0x4a4'),'value':function(_0xd35f31){return _0x3f2387[a0_0x5a29('0x27e')][a0_0x5a29('0xd8')];}},{'key':a0_0x5a29('0x94c'),'value':function(_0xf576f1,_0x7fbb88){return _0x7fbb88||(_0x7fbb88={}),_0x7fbb88[a0_0x5a29('0x6ed')]=_0x3f2387[a0_0x5a29('0x8dc')]['getValueOrClonedDefault'](this['_color'],_0xf576f1,_0x506e85,_0x7fbb88[a0_0x5a29('0x6ed')]),_0x7fbb88[a0_0x5a29('0x7e1')]=_0x3f2387[a0_0x5a29('0x8dc')]['getValueOrClonedDefault'](this[a0_0x5a29('0xac')],_0xf576f1,0x2d,_0x7fbb88[a0_0x5a29('0x7e1')]),_0x7fbb88[a0_0x5a29('0xfa')]=_0x3f2387[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this[a0_0x5a29('0x918')],_0xf576f1),_0x7fbb88;}},{'key':a0_0x5a29('0x128'),'value':function(_0x57f4c3){return this===_0x57f4c3||_0x57f4c3 instanceof _0x37a356&&_0x3f2387[a0_0x5a29('0x8dc')][a0_0x5a29('0x128')](this[a0_0x5a29('0x7d7')],_0x57f4c3[a0_0x5a29('0x7d7')]);}},{'key':a0_0x5a29('0x52a'),'get':function(){return!0x1;}},{'key':a0_0x5a29('0x267'),'get':function(){return this[a0_0x5a29('0x5e6')];}}]),_0x37a356;}();Object[a0_0x5a29('0x4a5')](_0x2663e5[a0_0x5a29('0x928')],{'color':_0x3f2387['createPropertyDescriptor'](a0_0x5a29('0x6ed')),'speed':_0x3f2387[a0_0x5a29('0x2cb')]('speed'),'image':_0x3f2387[a0_0x5a29('0x2cb')](a0_0x5a29('0xfa'))}),_0x9bf132['a']=_0x2663e5;},function(_0x366627,_0xe7fd75,_0x471cdd){'use strict';var _0x1e793f=_0x471cdd(0x0),_0x596466=_0x471cdd['n'](_0x1e793f),_0x4e3432=_0x471cdd(0x1),_0x85fc82=_0x471cdd['n'](_0x4e3432),_0x3a72a5=DC['Namespace']['Cesium'],_0x195c40=_0x3a72a5[a0_0x5a29('0x82')][a0_0x5a29('0x488')](0x0,0xff,0xff,0xff),_0x18a82f=function(){function _0x2c7369(_0xd9f830){_0x596466()(this,_0x2c7369),_0xd9f830=_0xd9f830||{},this[a0_0x5a29('0x5e6')]=new _0x3a72a5[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x7d7')]=void 0x0,this[a0_0x5a29('0x20b')]=void 0x0,this[a0_0x5a29('0x6ed')]=_0xd9f830['color']||_0x195c40,this[a0_0x5a29('0xac')]=void 0x0,this[a0_0x5a29('0x6c3')]=void 0x0,this['speed']=_0xd9f830['speed']||0x2d;}return _0x85fc82()(_0x2c7369,[{'key':a0_0x5a29('0x4a4'),'value':function(_0x2bd736){return _0x3a72a5['Material'][a0_0x5a29('0x14')];}},{'key':a0_0x5a29('0x94c'),'value':function(_0x57d8bd,_0x791417){return _0x791417||(_0x791417={}),_0x791417[a0_0x5a29('0x6ed')]=_0x3a72a5[a0_0x5a29('0x8dc')][a0_0x5a29('0xfd')](this['_color'],_0x57d8bd,_0x195c40,_0x791417['color']),_0x791417['speed']=_0x3a72a5['Property'][a0_0x5a29('0xfd')](this[a0_0x5a29('0xac')],_0x57d8bd,0x2d,_0x791417[a0_0x5a29('0x7e1')]),_0x791417;}},{'key':a0_0x5a29('0x128'),'value':function(_0x2a9457){return this===_0x2a9457||_0x2a9457 instanceof _0x2c7369&&_0x3a72a5['Property'][a0_0x5a29('0x128')](this[a0_0x5a29('0x7d7')],_0x2a9457['_color']);}},{'key':a0_0x5a29('0x52a'),'get':function(){return!0x1;}},{'key':'definitionChanged','get':function(){return this[a0_0x5a29('0x5e6')];}}]),_0x2c7369;}();Object[a0_0x5a29('0x4a5')](_0x18a82f[a0_0x5a29('0x928')],{'color':_0x3a72a5[a0_0x5a29('0x2cb')](a0_0x5a29('0x6ed')),'speed':_0x3a72a5['createPropertyDescriptor'](a0_0x5a29('0x7e1'))}),_0xe7fd75['a']=_0x18a82f;},function(_0x406fc6,_0x435e00,_0x5f32b8){'use strict';var _0x2069a9=_0x5f32b8(0x0),_0x3a8544=_0x5f32b8['n'](_0x2069a9),_0x5b8a34=_0x5f32b8(0x1),_0x3ed042=_0x5f32b8['n'](_0x5b8a34),_0xdb2702=DC[a0_0x5a29('0x239')]['Cesium'],_0x3e3e52=function(){function _0x32fa69(_0x4d6f0e){_0x3a8544()(this,_0x32fa69),_0x4d6f0e=_0x4d6f0e||{},this[a0_0x5a29('0x5e6')]=new _0xdb2702[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x7d7')]=void 0x0,this[a0_0x5a29('0x20b')]=void 0x0,this[a0_0x5a29('0x6ed')]=_0x4d6f0e[a0_0x5a29('0x6ed')]||new _0xdb2702[(a0_0x5a29('0x82'))](0x1,0x0,0x0,0.7);}return _0x3ed042()(_0x32fa69,[{'key':a0_0x5a29('0x4a4'),'value':function(_0x52a3e){return _0xdb2702['Material'][a0_0x5a29('0x1ea')];}},{'key':a0_0x5a29('0x94c'),'value':function(_0x106597,_0x38b48d){return _0x38b48d||(_0x38b48d={}),_0x38b48d[a0_0x5a29('0x6ed')]=_0xdb2702[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this[a0_0x5a29('0x7d7')],_0x106597),_0x38b48d;}},{'key':a0_0x5a29('0x128'),'value':function(_0x5e3c4b){return this===_0x5e3c4b||_0x5e3c4b instanceof _0x32fa69&&_0xdb2702['Property']['equals'](this[a0_0x5a29('0x7d7')],_0x5e3c4b[a0_0x5a29('0x7d7')]);}},{'key':'isConstant','get':function(){return!0x1;}},{'key':a0_0x5a29('0x267'),'get':function(){return this[a0_0x5a29('0x5e6')];}}]),_0x32fa69;}();Object['defineProperties'](_0x3e3e52['prototype'],{'color':_0xdb2702[a0_0x5a29('0x2cb')](a0_0x5a29('0x6ed'))}),_0x435e00['a']=_0x3e3e52;},function(_0x8b2f4c,_0x429d73,_0x11581a){'use strict';var _0x459284=_0x11581a(0x0),_0x18b9cb=_0x11581a['n'](_0x459284),_0x200e70=_0x11581a(0x1),_0xa02bc5=_0x11581a['n'](_0x200e70),_0x3dd178=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x3c5f03=new _0x3dd178[(a0_0x5a29('0x11b'))](0x1,0x1),_0x53a60c=_0x3dd178[a0_0x5a29('0x82')][a0_0x5a29('0x488')](0x0,0xff,0xff,0xff),_0x467a3f=function(){function _0x54a686(_0x404fd1){var _0x302164,_0x2500f9;_0x18b9cb()(this,_0x54a686),_0x404fd1=_0x404fd1||{},this['_definitionChanged']=new _0x3dd178[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x7d7')]=void 0x0,this['_colorSubscription']=void 0x0,this[a0_0x5a29('0xac')]=void 0x0,this[a0_0x5a29('0x6c3')]=void 0x0,this[a0_0x5a29('0x918')]=void 0x0,this[a0_0x5a29('0x52b')]=void 0x0,this[a0_0x5a29('0x229')]=void 0x0,this[a0_0x5a29('0x1ce')]=void 0x0,this[a0_0x5a29('0x6ed')]=_0x404fd1['color']||_0x53a60c,this[a0_0x5a29('0x7e1')]=_0x404fd1[a0_0x5a29('0x7e1')]||0x2d,this['image']=_0x404fd1[a0_0x5a29('0xfa')],this['repeat']=new _0x3dd178[(a0_0x5a29('0x11b'))]((null===(_0x302164=_0x404fd1[a0_0x5a29('0x1ba')])||void 0x0===_0x302164?void 0x0:_0x302164['x'])||0x1,(null===(_0x2500f9=_0x404fd1[a0_0x5a29('0x1ba')])||void 0x0===_0x2500f9?void 0x0:_0x2500f9['y'])||0x1);}return _0xa02bc5()(_0x54a686,[{'key':a0_0x5a29('0x4a4'),'value':function(_0x3c20a5){return _0x3dd178[a0_0x5a29('0x27e')][a0_0x5a29('0xd8')];}},{'key':a0_0x5a29('0x94c'),'value':function(_0x205017,_0x4e5467){return _0x4e5467||(_0x4e5467={}),_0x4e5467[a0_0x5a29('0x6ed')]=_0x3dd178['Property'][a0_0x5a29('0xfd')](this['_color'],_0x205017,_0x53a60c,_0x4e5467[a0_0x5a29('0x6ed')]),_0x4e5467[a0_0x5a29('0x7e1')]=_0x3dd178[a0_0x5a29('0x8dc')][a0_0x5a29('0xfd')](this['_speed'],_0x205017,0x2d,_0x4e5467[a0_0x5a29('0x7e1')]),_0x4e5467[a0_0x5a29('0xfa')]=_0x3dd178['Property']['getValueOrUndefined'](this[a0_0x5a29('0x918')],_0x205017),_0x4e5467[a0_0x5a29('0x1ba')]=_0x3dd178['Property']['getValueOrClonedDefault'](this['_repeat'],_0x205017,_0x3c5f03,_0x4e5467[a0_0x5a29('0x1ba')]),_0x4e5467;}},{'key':'equals','value':function(_0x2f530f){return this===_0x2f530f||_0x2f530f instanceof _0x54a686&&_0x3dd178[a0_0x5a29('0x8dc')][a0_0x5a29('0x128')](this[a0_0x5a29('0x7d7')],_0x2f530f['_color']);}},{'key':a0_0x5a29('0x52a'),'get':function(){return!0x1;}},{'key':a0_0x5a29('0x267'),'get':function(){return this[a0_0x5a29('0x5e6')];}}]),_0x54a686;}();Object[a0_0x5a29('0x4a5')](_0x467a3f[a0_0x5a29('0x928')],{'color':_0x3dd178[a0_0x5a29('0x2cb')](a0_0x5a29('0x6ed')),'speed':_0x3dd178['createPropertyDescriptor'](a0_0x5a29('0x7e1')),'image':_0x3dd178[a0_0x5a29('0x2cb')]('image'),'repeat':_0x3dd178['createPropertyDescriptor']('repeat')}),_0x429d73['a']=_0x467a3f;},function(_0x2246d6,_0x4385ab,_0x486fa4){'use strict';var _0x7c3e81=_0x486fa4(0x0),_0x1a69cb=_0x486fa4['n'](_0x7c3e81),_0x56c04f=_0x486fa4(0x1),_0x47a6ed=_0x486fa4['n'](_0x56c04f),_0x6a4f17=DC['Namespace'][a0_0x5a29('0x6e8')],_0x442662=function(){function _0x5bd585(_0x5dae0f){_0x1a69cb()(this,_0x5bd585),_0x5dae0f=_0x5dae0f||{},this[a0_0x5a29('0x5e6')]=new _0x6a4f17[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x272')]=void 0x0,this['_baseWaterColorSubscription']=void 0x0,this[a0_0x5a29('0x919')]=_0x5dae0f[a0_0x5a29('0x919')]||new _0x6a4f17[(a0_0x5a29('0x82'))](0.2,0.3,0.6,0x1),this[a0_0x5a29('0x184')]=void 0x0,this['_blendColorSubscription']=void 0x0,this[a0_0x5a29('0x537')]=_0x5dae0f['blendColor']||new _0x6a4f17[(a0_0x5a29('0x82'))](0x0,0x1,0.699,0x1),this['_specularMap']=void 0x0,this[a0_0x5a29('0x645')]=void 0x0,this[a0_0x5a29('0x8cb')]=_0x5dae0f[a0_0x5a29('0x8cb')]||_0x6a4f17[a0_0x5a29('0x27e')][a0_0x5a29('0x8e5')],this[a0_0x5a29('0x6c5')]=void 0x0,this[a0_0x5a29('0x899')]=void 0x0,this['normalMap']=_0x5dae0f[a0_0x5a29('0x64b')]||_0x6a4f17[a0_0x5a29('0x27e')]['DefaultImageId'],this[a0_0x5a29('0x391')]=_0x6a4f17[a0_0x5a29('0x3d0')](_0x5dae0f[a0_0x5a29('0x391')],0xa),this['animationSpeed']=_0x6a4f17['defaultValue'](_0x5dae0f['animationSpeed'],0.01),this[a0_0x5a29('0x87a')]=_0x6a4f17['defaultValue'](_0x5dae0f['amplitude'],0x1),this['specularIntensity']=_0x6a4f17['defaultValue'](_0x5dae0f[a0_0x5a29('0x36')],0.5),this[a0_0x5a29('0x16')]=_0x6a4f17[a0_0x5a29('0x3d0')](_0x5dae0f[a0_0x5a29('0x16')],0x1);}return _0x47a6ed()(_0x5bd585,[{'key':a0_0x5a29('0x4a4'),'value':function(_0x1c2568){return _0x6a4f17[a0_0x5a29('0x27e')][a0_0x5a29('0x7e2')];}},{'key':a0_0x5a29('0x94c'),'value':function(_0x42a44d,_0x10ca2d){return _0x10ca2d||(_0x10ca2d={}),_0x10ca2d['baseWaterColor']=_0x6a4f17[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this[a0_0x5a29('0x272')],_0x42a44d),_0x10ca2d[a0_0x5a29('0x537')]=_0x6a4f17[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this['_blendColor'],_0x42a44d),_0x10ca2d['specularMap']=_0x6a4f17[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this[a0_0x5a29('0x740')],_0x42a44d),_0x10ca2d[a0_0x5a29('0x64b')]=_0x6a4f17[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this[a0_0x5a29('0x6c5')],_0x42a44d),_0x10ca2d[a0_0x5a29('0x391')]=this[a0_0x5a29('0x391')],_0x10ca2d['animationSpeed']=this[a0_0x5a29('0x637')],_0x10ca2d['amplitude']=this[a0_0x5a29('0x87a')],_0x10ca2d[a0_0x5a29('0x36')]=this[a0_0x5a29('0x36')],_0x10ca2d['fadeFactor']=this[a0_0x5a29('0x16')],_0x10ca2d;}},{'key':a0_0x5a29('0x128'),'value':function(_0x1a16d8){return this===_0x1a16d8||_0x1a16d8 instanceof _0x5bd585&&_0x6a4f17[a0_0x5a29('0x8dc')][a0_0x5a29('0x128')](this[a0_0x5a29('0x272')],_0x1a16d8[a0_0x5a29('0x272')]);}},{'key':a0_0x5a29('0x52a'),'get':function(){return!0x1;}},{'key':a0_0x5a29('0x267'),'get':function(){return this[a0_0x5a29('0x5e6')];}}]),_0x5bd585;}();Object['defineProperties'](_0x442662[a0_0x5a29('0x928')],{'baseWaterColor':_0x6a4f17['createPropertyDescriptor'](a0_0x5a29('0x919')),'blendColor':_0x6a4f17[a0_0x5a29('0x2cb')](a0_0x5a29('0x537')),'specularMap':_0x6a4f17['createPropertyDescriptor'](a0_0x5a29('0x8cb')),'normalMap':_0x6a4f17[a0_0x5a29('0x2cb')](a0_0x5a29('0x64b'))}),_0x4385ab['a']=_0x442662;},function(_0x3cd296,_0x8dff3d,_0x368d11){'use strict';var _0x395653=_0x368d11(0x0),_0x2584eb=_0x368d11['n'](_0x395653),_0x5d21f2=_0x368d11(0x1),_0x15fdbb=_0x368d11['n'](_0x5d21f2),_0x8550fc=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4cfcba=function(){function _0x44e047(_0xea325f){_0x2584eb()(this,_0x44e047),_0xea325f=_0xea325f||{},this[a0_0x5a29('0x5e6')]=new _0x8550fc[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x7d7')]=void 0x0,this['_colorSubscription']=void 0x0,this[a0_0x5a29('0x6ed')]=_0xea325f['color']||new _0x8550fc['Color'](0x1,0x0,0x0,0.7),this[a0_0x5a29('0x112')]=void 0x0,this['_rimColorSubscription']=void 0x0,this[a0_0x5a29('0x510')]=_0xea325f[a0_0x5a29('0x510')]||new _0x8550fc['Color'](0x1,0x1,0x1,0.4),this['_width']=void 0x0,this[a0_0x5a29('0xf6')]=void 0x0,this[a0_0x5a29('0x96f')]=_0xea325f[a0_0x5a29('0x96f')]||0.3;}return _0x15fdbb()(_0x44e047,[{'key':a0_0x5a29('0x4a4'),'value':function(_0xfa0420){return _0x8550fc[a0_0x5a29('0x27e')][a0_0x5a29('0x269')];}},{'key':a0_0x5a29('0x94c'),'value':function(_0x11679d,_0x318750){return _0x318750||(_0x318750={}),_0x318750[a0_0x5a29('0x6ed')]=_0x8550fc['Property'][a0_0x5a29('0x801')](this[a0_0x5a29('0x7d7')],_0x11679d),_0x318750[a0_0x5a29('0x510')]=_0x8550fc['Property'][a0_0x5a29('0x801')](this[a0_0x5a29('0x112')],_0x11679d),_0x318750[a0_0x5a29('0x96f')]=_0x8550fc[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this[a0_0x5a29('0x913')],_0x11679d),_0x318750;}},{'key':'equals','value':function(_0x3bc87d){return this===_0x3bc87d||_0x3bc87d instanceof _0x44e047&&_0x8550fc[a0_0x5a29('0x8dc')]['equals'](this['_color'],_0x3bc87d['_color']);}},{'key':a0_0x5a29('0x52a'),'get':function(){return!0x1;}},{'key':a0_0x5a29('0x267'),'get':function(){return this[a0_0x5a29('0x5e6')];}}]),_0x44e047;}();Object[a0_0x5a29('0x4a5')](_0x4cfcba['prototype'],{'color':_0x8550fc[a0_0x5a29('0x2cb')]('color'),'rimColor':_0x8550fc[a0_0x5a29('0x2cb')](a0_0x5a29('0x510')),'width':_0x8550fc[a0_0x5a29('0x2cb')](a0_0x5a29('0x96f'))}),_0x8dff3d['a']=_0x4cfcba;},function(_0x48de85,_0x5ab3c1,_0x5e5cfe){'use strict';var _0x598aee=_0x5e5cfe(0x0),_0x13bae6=_0x5e5cfe['n'](_0x598aee),_0x2fb70f=_0x5e5cfe(0x1),_0x55a508=_0x5e5cfe['n'](_0x2fb70f),_0x26fd5e=DC['Namespace'][a0_0x5a29('0x6e8')],_0x2ec290=function(){function _0x4d9539(_0xa99fa6){_0x13bae6()(this,_0x4d9539),_0xa99fa6=_0xa99fa6||{},this[a0_0x5a29('0x5e6')]=new _0x26fd5e[(a0_0x5a29('0x22f'))](),this['_color']=void 0x0,this['_colorSubscription']=void 0x0,this[a0_0x5a29('0xac')]=void 0x0,this[a0_0x5a29('0x6c3')]=void 0x0,this['color']=_0xa99fa6[a0_0x5a29('0x6ed')]||_0x26fd5e['Color']['fromBytes'](0x0,0xff,0xff,0xff),this[a0_0x5a29('0x7e1')]=_0xa99fa6[a0_0x5a29('0x7e1')]||0x2d;}return _0x55a508()(_0x4d9539,[{'key':a0_0x5a29('0x4a4'),'value':function(_0x3484c0){return _0x26fd5e['Material'][a0_0x5a29('0x43b')];}},{'key':'getValue','value':function(_0xca968e,_0x1477a6){return _0x1477a6||(_0x1477a6={}),_0x1477a6[a0_0x5a29('0x6ed')]=_0x26fd5e[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this['_color'],_0xca968e),_0x1477a6[a0_0x5a29('0x7e1')]=this[a0_0x5a29('0xac')],_0x1477a6;}},{'key':a0_0x5a29('0x128'),'value':function(_0x3b7b9b){return this===_0x3b7b9b||_0x3b7b9b instanceof _0x4d9539&&_0x26fd5e[a0_0x5a29('0x8dc')][a0_0x5a29('0x128')](this[a0_0x5a29('0x7d7')],_0x3b7b9b[a0_0x5a29('0x7d7')]);}},{'key':a0_0x5a29('0x52a'),'get':function(){return!0x1;}},{'key':a0_0x5a29('0x267'),'get':function(){return this['_definitionChanged'];}}]),_0x4d9539;}();Object[a0_0x5a29('0x4a5')](_0x2ec290[a0_0x5a29('0x928')],{'color':_0x26fd5e[a0_0x5a29('0x2cb')]('color'),'speed':_0x26fd5e[a0_0x5a29('0x2cb')](a0_0x5a29('0x7e1'))}),_0x5ab3c1['a']=_0x2ec290;},function(_0xc7ff1e,_0x579f87,_0xb996ac){'use strict';var _0x27656e=_0xb996ac(0x0),_0x357733=_0xb996ac['n'](_0x27656e),_0x5c069f=_0xb996ac(0x1),_0x5e690f=_0xb996ac['n'](_0x5c069f),_0x5a3fa8=DC['Namespace'][a0_0x5a29('0x6e8')],_0x2a0be5=function(){function _0xe7600b(_0x483b62){_0x357733()(this,_0xe7600b),_0x483b62=_0x483b62||{},this['_definitionChanged']=new _0x5a3fa8[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x7d7')]=void 0x0,this[a0_0x5a29('0x20b')]=void 0x0,this[a0_0x5a29('0xac')]=void 0x0,this[a0_0x5a29('0x6c3')]=void 0x0,this[a0_0x5a29('0x6ed')]=_0x483b62['color']||_0x5a3fa8[a0_0x5a29('0x82')][a0_0x5a29('0x488')](0x0,0xff,0xff,0xff),this[a0_0x5a29('0x7e1')]=_0x483b62[a0_0x5a29('0x7e1')]||0x2d,this[a0_0x5a29('0x547')]=Math[a0_0x5a29('0x670')](_0x483b62['count']||0x2,0x1),this[a0_0x5a29('0x6f4')]=_0x5a3fa8['Math'][a0_0x5a29('0x71a')](_0x483b62[a0_0x5a29('0x6f4')]||0.1,0x0,0x1);}return _0x5e690f()(_0xe7600b,[{'key':'getType','value':function(_0x370680){return _0x5a3fa8[a0_0x5a29('0x27e')][a0_0x5a29('0x6ce')];}},{'key':a0_0x5a29('0x94c'),'value':function(_0x5d5a64,_0x56cd32){return _0x56cd32||(_0x56cd32={}),_0x56cd32[a0_0x5a29('0x6ed')]=_0x5a3fa8[a0_0x5a29('0x8dc')]['getValueOrUndefined'](this[a0_0x5a29('0x7d7')],_0x5d5a64),_0x56cd32[a0_0x5a29('0x7e1')]=this[a0_0x5a29('0xac')],_0x56cd32['count']=this[a0_0x5a29('0x547')],_0x56cd32[a0_0x5a29('0x6f4')]=this[a0_0x5a29('0x6f4')],_0x56cd32;}},{'key':a0_0x5a29('0x128'),'value':function(_0x37af49){return this===_0x37af49||_0x37af49 instanceof _0xe7600b&&_0x5a3fa8[a0_0x5a29('0x8dc')][a0_0x5a29('0x128')](this[a0_0x5a29('0x7d7')],_0x37af49['_color']);}},{'key':a0_0x5a29('0x52a'),'get':function(){return!0x1;}},{'key':'definitionChanged','get':function(){return this[a0_0x5a29('0x5e6')];}}]),_0xe7600b;}();Object[a0_0x5a29('0x4a5')](_0x2a0be5['prototype'],{'color':_0x5a3fa8[a0_0x5a29('0x2cb')](a0_0x5a29('0x6ed')),'speed':_0x5a3fa8['createPropertyDescriptor'](a0_0x5a29('0x7e1'))}),_0x579f87['a']=_0x2a0be5;},function(_0x375eaa,_0x25dcc3,_0x3688fd){'use strict';var _0x640d80=_0x3688fd(0x0),_0x3369aa=_0x3688fd['n'](_0x640d80),_0x263143=_0x3688fd(0x1),_0x4f281e=_0x3688fd['n'](_0x263143),_0x1a75fa=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x5b92db=_0x3688fd(0x55),_0x255c9b=_0x1a75fa[a0_0x5a29('0x82')][a0_0x5a29('0x488')](0x0,0xff,0xff,0xff),_0x4aa80a=function(){function _0x11329d(_0x20648e){_0x3369aa()(this,_0x11329d),_0x20648e=_0x20648e||{},this[a0_0x5a29('0x5e6')]=new _0x1a75fa[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x918')]=void 0x0,this[a0_0x5a29('0x52b')]=void 0x0,this[a0_0x5a29('0x7d7')]=void 0x0,this[a0_0x5a29('0x20b')]=void 0x0,this[a0_0x5a29('0xac')]=void 0x0,this[a0_0x5a29('0x6c3')]=void 0x0,this[a0_0x5a29('0x6ed')]=_0x20648e[a0_0x5a29('0x6ed')]||_0x255c9b,this['speed']=_0x20648e['speed']||0x2d,this['image']=_0x5b92db;}return _0x4f281e()(_0x11329d,[{'key':a0_0x5a29('0x4a4'),'value':function(_0x4f4efe){return _0x1a75fa[a0_0x5a29('0x27e')][a0_0x5a29('0x79c')];}},{'key':a0_0x5a29('0x94c'),'value':function(_0x3edb53,_0x1b327a){return _0x1b327a||(_0x1b327a={}),_0x1b327a[a0_0x5a29('0x6ed')]=_0x1a75fa[a0_0x5a29('0x8dc')][a0_0x5a29('0xfd')](this[a0_0x5a29('0x7d7')],_0x3edb53,_0x255c9b,_0x1b327a['color']),_0x1b327a[a0_0x5a29('0x7e1')]=_0x1a75fa[a0_0x5a29('0x8dc')][a0_0x5a29('0xfd')](this[a0_0x5a29('0xac')],_0x3edb53,0x2d,_0x1b327a[a0_0x5a29('0x7e1')]),_0x1b327a[a0_0x5a29('0xfa')]=_0x1a75fa[a0_0x5a29('0x8dc')][a0_0x5a29('0x801')](this[a0_0x5a29('0x918')],_0x3edb53),_0x1b327a;}},{'key':a0_0x5a29('0x128'),'value':function(_0x38434a){return this===_0x38434a||_0x38434a instanceof _0x11329d&&_0x1a75fa['Property']['equals'](this[a0_0x5a29('0x7d7')],_0x38434a[a0_0x5a29('0x7d7')]);}},{'key':a0_0x5a29('0x52a'),'get':function(){return!0x1;}},{'key':a0_0x5a29('0x267'),'get':function(){return this['_definitionChanged'];}}]),_0x11329d;}();Object[a0_0x5a29('0x4a5')](_0x4aa80a[a0_0x5a29('0x928')],{'color':_0x1a75fa[a0_0x5a29('0x2cb')](a0_0x5a29('0x6ed')),'speed':_0x1a75fa['createPropertyDescriptor'](a0_0x5a29('0x7e1')),'image':_0x1a75fa[a0_0x5a29('0x2cb')](a0_0x5a29('0xfa'))}),_0x25dcc3['a']=_0x4aa80a;},function(_0x4d9705,_0x30e4c0,_0x5a6f1e){'use strict';var _0x1ced55,_0x4cee96;_0x1ced55='undefined'!=typeof window?window:void 0x0,_0x4cee96=function(_0x53e48a,_0x24f544){function _0xbe8c84(_0x7b612d,_0x36f656){for(var _0x226287=document[a0_0x5a29('0x15c')](a0_0x5a29('0x435'))[0x0][a0_0x5a29('0x15c')](a0_0x5a29('0x633')),_0x557427=!0x1,_0x15ec01=0x0;_0x15ec01<_0x226287[a0_0x5a29('0x515')];_0x15ec01++)_0x226287[_0x15ec01][a0_0x5a29('0xbd')](a0_0x5a29('0x561'))==_0x7b612d&&(_0x557427=!0x0);if(!_0x557427){var _0xdf33b7=document[a0_0x5a29('0x56f')](a0_0x5a29('0x633'));_0xdf33b7[a0_0x5a29('0x773')](a0_0x5a29('0x561'),_0x7b612d),_0xdf33b7['onload']=_0x36f656,document[a0_0x5a29('0x15c')](a0_0x5a29('0x435'))[0x0][a0_0x5a29('0x365')](_0xdf33b7);}}function _0x122b6f(_0x54559b,_0xd0dad6,_0x187169,_0x4eee2d,_0x2a1412,_0x10cdf3){var _0x9c34b4=_0x54559b,_0x384874=new XMLHttpRequest();_0x384874['onreadystatechange']=function(){if(0x4==_0x384874[a0_0x5a29('0x8d4')]&&0xc8==_0x384874[a0_0x5a29('0x521')]){var _0x328f78=JSON[a0_0x5a29('0x1e7')](_0x384874[a0_0x5a29('0x397')]);_0x2a1412(_0x328f78);}},_0x384874[a0_0x5a29('0x4a1')](_0xd0dad6,_0x9c34b4,!0x0);var _0x4cd4ae=new FormData();for(var _0x4b3d45 in _0x187169)_0x4cd4ae[a0_0x5a29('0x89d')](_0x4b3d45,_0x187169[_0x4b3d45]);_0x384874[a0_0x5a29('0x3f6')](_0x4cd4ae);}var _0xaf9c87={'EZUIKitPlayer':void 0x0,'EZUIKitTalk':void 0x0,'opt':{'apiDomain':a0_0x5a29('0x401'),'filePath':a0_0x5a29('0x818'),'accessToken':'','url':'','deviceSerial':'','channelNo':'','id':'','talkLink':'','rtcUrl':'','ttsUrl':'','stream':'','isReliesReady':!0x1,'template':a0_0x5a29('0x41f'),'plugin':[],'audio':0x1,'autoplay':0x1},'state':{'countTimer':void 0x0,'recodeTime':0x0,'recodeTimer':void 0x0,'recodeTime':0x0,'fetchDefaultList':!0x1,'page':0x0,'pageSize':0x5},'handleTalkSuccess':function(){},'handleTalkError':function(){}},_0x480dc8=a0_0x5a29('0x1c6'),_0x5b4b36=function(_0x4e38c3){var _0x521a10=this;console[a0_0x5a29('0x6df')](a0_0x5a29('0x88a'),_0x4e38c3),this[a0_0x5a29('0x3e5')]={'id':_0x4e38c3['id'],'apiDomain':'https://open.ys7.com/api/lapp/live/talk/url','filePath':'https://open.ys7.com/assets/ezuikit_v2.6.4','accessToken':'','url':'','deviceSerial':'','channelNo':'','talkLink':'','rtcUrl':'','ttsUrl':'','stream':'','isReliesReady':!0x1,'template':a0_0x5a29('0x41f'),'plugin':[],'audio':0x1,'autoplay':0x1},_0x4e38c3['id']&&(this[a0_0x5a29('0x3e5')]['id']=_0x4e38c3['id']),_0x4e38c3['accessToken']&&(this['opt'][a0_0x5a29('0x829')]=_0x4e38c3[a0_0x5a29('0x829')]),void 0x0!==_0x4e38c3['audio']&&(this['opt'][a0_0x5a29('0x465')]=_0x4e38c3['audio']),_0x4e38c3['url']&&(this['opt'][a0_0x5a29('0x498')]=_0x4e38c3[a0_0x5a29('0x498')],this[a0_0x5a29('0x3e5')][a0_0x5a29('0x38c')]=_0x4e38c3['url'][a0_0x5a29('0xc5')]('/')[0x3],this[a0_0x5a29('0x3e5')][a0_0x5a29('0x24b')]=_0x4e38c3[a0_0x5a29('0x498')][a0_0x5a29('0xc5')]('/')[0x4]['split']('.')[0x0]),void 0x0!==_0x4e38c3[a0_0x5a29('0x1f4')]&&(this['opt']['template']=_0x4e38c3[a0_0x5a29('0x1f4')]),_0x4e38c3[a0_0x5a29('0x912')]&&(this['opt'][a0_0x5a29('0x912')]=_0x4e38c3[a0_0x5a29('0x912')]),void 0x0!==_0x4e38c3[a0_0x5a29('0x130')]&&(this[a0_0x5a29('0x3e5')][a0_0x5a29('0x130')]=_0x4e38c3[a0_0x5a29('0x130')]?0x1:0x0),void 0x0!==_0x4e38c3[a0_0x5a29('0x455')]&&(_0x53e48a[a0_0x5a29('0x7c8')][a0_0x5a29('0x455')]=_0x4e38c3['handleTalkSuccess']),void 0x0!==_0x4e38c3[a0_0x5a29('0x830')]&&(_0x53e48a[a0_0x5a29('0x7c8')][a0_0x5a29('0x830')]=_0x4e38c3[a0_0x5a29('0x830')]);var _0x1695be=this[a0_0x5a29('0x3e5')]['id'],_0x8daf1c=document['getElementById'](_0x1695be);_0x8daf1c['style'][a0_0x5a29('0x813')]=0x0;var _0x33bd5c=document[a0_0x5a29('0x56f')](a0_0x5a29('0x18b'));_0x33bd5c[a0_0x5a29('0x561')]=function(){switch(_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x1f4')]){case a0_0x5a29('0x41f'):return _0x480dc8+'/ezopen/h5/iframe?url='+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')]+'&autoplay='+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x130')]+a0_0x5a29('0x475')+_0x521a10['opt'][a0_0x5a29('0x465')]+a0_0x5a29('0x81a')+_0x4e38c3['accessToken']+a0_0x5a29('0x295')+_0x1695be;case a0_0x5a29('0x1fc'):return _0x480dc8+a0_0x5a29('0x213')+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')]+a0_0x5a29('0x32')+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x130')]+a0_0x5a29('0x475')+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x465')]+a0_0x5a29('0x81a')+_0x4e38c3[a0_0x5a29('0x829')]+a0_0x5a29('0x390')+_0x1695be;case a0_0x5a29('0x10a'):return _0x480dc8+'/ezopen/h5/iframe_se?url='+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')]+'&autoplay='+_0x521a10['opt']['autoplay']+a0_0x5a29('0x475')+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x465')]+a0_0x5a29('0x81a')+_0x4e38c3[a0_0x5a29('0x829')]+a0_0x5a29('0x295')+_0x1695be;default:return _0x480dc8+a0_0x5a29('0x213')+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')]+'&autoplay='+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x130')]+a0_0x5a29('0x475')+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x465')]+a0_0x5a29('0x81a')+_0x4e38c3[a0_0x5a29('0x829')]+'&templete=0&id='+_0x1695be;}}();var _0x1157d7=document[a0_0x5a29('0x200')](_0x1695be)[a0_0x5a29('0x50c')],_0x2585d7=document[a0_0x5a29('0x200')](_0x1695be)[a0_0x5a29('0x44e')];_0x4e38c3['height']&&(_0x1157d7=parseInt(_0x4e38c3['height'])),_0x4e38c3[a0_0x5a29('0x96f')]&&(_0x2585d7=parseInt(_0x4e38c3['width'])),_0x33bd5c['width']=_0x2585d7,_0x33bd5c[a0_0x5a29('0x6b7')]=_0x1157d7,_0x33bd5c['id']=a0_0x5a29('0x1ae')+_0x1695be,_0x33bd5c[a0_0x5a29('0x773')](a0_0x5a29('0x7f7'),!0x0),_0x33bd5c[a0_0x5a29('0x773')](a0_0x5a29('0xcf'),a0_0x5a29('0x130')),_0x33bd5c['setAttribute']('frameborder',0x0),_0x8daf1c[a0_0x5a29('0x365')](_0x33bd5c);var _0x33927f=_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x2bb')]+a0_0x5a29('0x3be');_0xbe8c84(_0x33927f,function(){_0xbe8c84('https://open.ys7.com/assets/layer/layer.js',function(){if(_0x2141f1()[a0_0x5a29('0x1e1')]){var _0x353b1b=document[a0_0x5a29('0x56f')]('div');_0x353b1b[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x4f4'));var _0x49b875=document['createElement'](a0_0x5a29('0x884'));if(_0x49b875[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x3c8')),_0x353b1b['appendChild'](_0x49b875),_0x8daf1c[a0_0x5a29('0x925')](_0x353b1b,_0x33bd5c),_0x2141f1()[a0_0x5a29('0x92b')]){var _0x1ce955=document[a0_0x5a29('0x56f')](a0_0x5a29('0x8b5'));_0x1ce955['innerHTML']='<span\x20title=\x22截图\x22><svg\x20id=\x22capturePicture\x22\x20title=\x22截图\x22\x20t=\x221578882764585\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20p-id=\x225958\x22\x20width=\x2224\x22\x20height=\x2224\x22>\x20\x20<path\x20\x20\x20\x20d=\x22M887.296\x20315.904h-153.6c-51.2\x200-68.096-102.4-119.296-102.4H392.704c-34.304\x200-51.2\x20102.4-102.4\x20102.4h-153.6c-29.696\x200-51.2\x2021.504-51.2\x2051.2v439.296c0\x2025.6\x2021.504\x2047.104\x2051.2\x2047.104h751.104c29.696\x200\x2051.2-21.504\x2051.2-51.2v-435.2c-0.512-30.208-21.504-51.2-51.712-51.2zM512\x20768c-115.2\x200-204.8-89.6-204.8-200.704s89.6-200.704\x20204.8-200.704\x20204.8\x2089.6\x20204.8\x20200.704-93.696\x20200.704-204.8\x20200.704z\x20m247.296-354.304c-12.8\x200-25.6-12.8-25.6-25.6s12.8-25.6\x2025.6-25.6\x2025.6\x2012.8\x2025.6\x2025.6c0\x2017.408-12.8\x2025.6-25.6\x2025.6zM256\x20264.704c0-8.704-8.704-16.896-16.896-16.896h-51.2c-8.704\x200-16.896\x208.704-16.896\x2016.896V281.6H256v-16.896z\x20m256\x20148.992c-85.504\x200-153.6\x2068.096-153.6\x20153.6s68.096\x20153.6\x20153.6\x20153.6\x20153.6-68.096\x20153.6-153.6-68.096-153.6-153.6-153.6z\x22\x20\x20\x20\x20fill=\x22#ffffff\x22\x20p-id=\x225959\x22></path></svg></span>',_0x1ce955['onclick']=function(){_0x521a10[a0_0x5a29('0x8f2')]();},_0x49b875[a0_0x5a29('0x365')](_0x1ce955);}if(console[a0_0x5a29('0x6df')]('matchHeaderOpt().saveModule',_0x2141f1()[a0_0x5a29('0x6b6')]),_0x2141f1()['saveModule']){var _0x54e5fe=document[a0_0x5a29('0x56f')]('span');_0x54e5fe[a0_0x5a29('0x13d')]=a0_0x5a29('0x19e'),_0x54e5fe[a0_0x5a29('0x8')]=function(){_0x521a10[a0_0x5a29('0x650')](),document[a0_0x5a29('0x200')](a0_0x5a29('0x650'))[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x756')),document[a0_0x5a29('0x200')](a0_0x5a29('0x1a5'))['setAttribute']('class','icon');},_0x49b875[a0_0x5a29('0x365')](_0x54e5fe);var _0x36c00c=document[a0_0x5a29('0x56f')]('span');_0x36c00c['innerHTML']=a0_0x5a29('0xd4'),_0x36c00c[a0_0x5a29('0x8')]=function(){_0x521a10[a0_0x5a29('0x1a5')](),document[a0_0x5a29('0x200')]('stopSave')['setAttribute']('class',a0_0x5a29('0x756')),document[a0_0x5a29('0x200')]('startSave')[a0_0x5a29('0x773')]('class',a0_0x5a29('0x93e'));},_0x49b875[a0_0x5a29('0x365')](_0x36c00c);}if(_0x2141f1()['zoomModule']){var _0x38b459=document[a0_0x5a29('0x56f')](a0_0x5a29('0x8b5'));_0x38b459[a0_0x5a29('0x13d')]=a0_0x5a29('0x7b0'),_0x38b459[a0_0x5a29('0x8')]=function(){_0x521a10[a0_0x5a29('0x1d6')](),document[a0_0x5a29('0x200')]('enableZoom')[a0_0x5a29('0x773')]('class',a0_0x5a29('0x756')),document[a0_0x5a29('0x200')](a0_0x5a29('0x6d'))['setAttribute'](a0_0x5a29('0x7ec'),a0_0x5a29('0x93e'));},_0x49b875[a0_0x5a29('0x365')](_0x38b459);var _0x2246d4=document[a0_0x5a29('0x56f')](a0_0x5a29('0x8b5'));_0x2246d4[a0_0x5a29('0x13d')]='<span\x20title=\x22关闭电子放大\x22>\x20\x20<svg\x20id=\x22closeZoom\x22\x20t=\x221578882639834\x22\x20class=\x22icon\x20hide\x22\x20viewBox=\x220\x200\x201000\x201000\x22\x20version=\x221.1\x22\x20\x20\x20\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20p-id=\x222227\x22\x20width=\x2224\x22\x20height=\x2224\x22>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M830.6119\x20441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559\x20247.3333\x20128.8559\x20441.1089\x20285.9508\x20791.972\x20479.7344\x20791.972\x20830.6119\x20634.8845\x20830.6119\x20441.1089zM483.2821\x20710.4863c-146.7975\x200-265.8187-118.9953-265.8187-265.8088S336.4847\x20178.8697\x20483.2821\x20178.8697s265.8197\x20118.9953\x20265.8197\x20265.8078S630.0796\x20710.4863\x20483.2821\x20710.4863zM770.6031\x20653.5739l-72.6417\x2075.9485\x20141.6917\x20160.1814\x2082.0737-90.0739L770.6031\x20653.5739zM527.5849\x20267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z\x22\x20\x20\x20\x20\x20\x20p-id=\x222228\x22\x20fill=\x22red\x22></path>\x20\x20</svg></span>',_0x2246d4['onclick']=function(){_0x521a10['closeZoom'](),document['getElementById'](a0_0x5a29('0x6d'))[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x756')),document[a0_0x5a29('0x200')](a0_0x5a29('0x1d6'))[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x93e'));},_0x49b875[a0_0x5a29('0x365')](_0x2246d4);}}function _0x21cf58(){var _0x2f0850={'footerContainer':!0x1,'talkModule':!0x1,'broadcastModule':!0x1,'hdModule':!0x1,'fullScreenModule':!0x1};switch(_0x521a10['opt'][a0_0x5a29('0x1f4')]){case'simple':case a0_0x5a29('0x1fc'):var _0x4460ad;_0x4e38c3[a0_0x5a29('0x78d')]&&_0x4e38c3[a0_0x5a29('0x78d')]instanceof Array&&(_0x2f0850={'footerContainer':!0x0,'talkModule':-0x1!==(_0x4460ad=_0x4e38c3[a0_0x5a29('0x78d')])[a0_0x5a29('0x26f')](a0_0x5a29('0x6c7')),'broadcastModule':-0x1!==_0x4460ad[a0_0x5a29('0x26f')]('broadcast'),'hdModule':-0x1!==_0x4460ad[a0_0x5a29('0x26f')]('hd'),'fullScreenModule':-0x1!==_0x4460ad[a0_0x5a29('0x26f')](a0_0x5a29('0x24d'))});break;case a0_0x5a29('0x10a'):break;case a0_0x5a29('0x6da'):_0x2f0850={'footerContainer':!0x0,'talkModule':!0x0,'broadcastModule':!0x0,'hdModule':!0x0,'fullScreenModule':!0x0};}return _0x2f0850;}function _0x2141f1(){var _0xe6953d={'headerContainer':!0x1,'capturePictureModule':!0x1,'saveModule':!0x1,'zoomModule':!0x1};switch(_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x1f4')]){case a0_0x5a29('0x41f'):if(_0x4e38c3['header']&&_0x4e38c3['header']instanceof Array){var _0x1c1bc7=_0x4e38c3['header'];_0xe6953d={'headerContainer':!0x0,'capturePictureModule':-0x1!==_0x1c1bc7[a0_0x5a29('0x26f')](a0_0x5a29('0x8f2')),'saveModule':-0x1!==_0x1c1bc7[a0_0x5a29('0x26f')](a0_0x5a29('0x6ea')),'zoomModule':-0x1!==_0x1c1bc7[a0_0x5a29('0x26f')](a0_0x5a29('0x573'))};}break;case a0_0x5a29('0x1fc'):case a0_0x5a29('0x10a'):break;case'voice':_0xe6953d={'headerContainer':!0x0,'capturePictureModule':!0x0,'saveModule':!0x0,'zoomModule':!0x0};}return _0xe6953d;}if(_0x21cf58()['footerContainer']||-0x1!==_0x521a10[a0_0x5a29('0x3e5')]['plugin'][a0_0x5a29('0x26f')](a0_0x5a29('0x6c7'))){var _0x1eff39=_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x2bb')]+a0_0x5a29('0x8c9'),_0x8f6e80=_0x521a10['opt'][a0_0x5a29('0x2bb')]+a0_0x5a29('0x5ae'),_0x3b8deb=_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x2bb')]+a0_0x5a29('0x6d9');if(function(_0x432013,_0x5e44f7){for(var _0x46f8d1=document[a0_0x5a29('0x15c')]('head')[0x0][a0_0x5a29('0x15c')](a0_0x5a29('0x243')),_0x1bac9b=!0x1,_0xeb2ea8=0x0;_0xeb2ea8<_0x46f8d1['length'];_0xeb2ea8++)_0x46f8d1[_0xeb2ea8][a0_0x5a29('0xbd')](a0_0x5a29('0x156'))==_0x432013&&(_0x1bac9b=!0x0);if(!_0x1bac9b){var _0x2a3497=document[a0_0x5a29('0x56f')](a0_0x5a29('0x243'));_0x2a3497[a0_0x5a29('0x93d')]=a0_0x5a29('0x612'),_0x2a3497[a0_0x5a29('0x519')]='text/css',_0x2a3497[a0_0x5a29('0x156')]=_0x432013,_0x2a3497['onload']=_0x5e44f7,document[a0_0x5a29('0x15c')](a0_0x5a29('0x435'))[0x0][a0_0x5a29('0x365')](_0x2a3497);}}(_0x1eff39,function(){}),_0xbe8c84(_0x8f6e80,function(){_0xbe8c84(_0x3b8deb,function(){});}),(-0x1!==_0x521a10[a0_0x5a29('0x3e5')]['plugin'][a0_0x5a29('0x26f')](a0_0x5a29('0x6c7'))||_0x21cf58()[a0_0x5a29('0x220')])&&_0x122b6f(_0x521a10['opt']['apiDomain'],'POST',{'accessToken':_0x521a10['opt'][a0_0x5a29('0x829')],'deviceSerial':_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x38c')],'channelNo':_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x24b')]},0x0,function(_0x31f7e5){if(console[a0_0x5a29('0x6df')](a0_0x5a29('0x77d'),_0x31f7e5),0xc8==_0x31f7e5[a0_0x5a29('0x4e9')]){var _0x375eac=_0x31f7e5[a0_0x5a29('0x77d')];if(_0x375eac){var _0x318d33=_0x375eac['rtcUrl'];-0x1===_0x318d33[a0_0x5a29('0x26f')]('ws')&&(_0x318d33=_0x318d33[a0_0x5a29('0x380')](a0_0x5a29('0x4a7'),a0_0x5a29('0x675'))[a0_0x5a29('0x380')](a0_0x5a29('0x79'),a0_0x5a29('0x3c6'))),_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x6a3')]=_0x318d33,_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x1b9')]=a0_0x5a29('0x2')+_0x375eac[a0_0x5a29('0x1b9')];var _0x157256=a0_0x5a29('0x49f')+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x38c')]+':0:'+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x24b')]+':cas.ys7.com:6500';if(_0x521a10['opt'][a0_0x5a29('0x15f')]=_0x521a10[a0_0x5a29('0x3e5')]['ttsUrl']+'/'+_0x157256,_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x6f5')]=_0x375eac[a0_0x5a29('0x6f5')],console[a0_0x5a29('0x6df')](a0_0x5a29('0x934'),_0x521a10[a0_0x5a29('0x3e5')]),!_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x8bb')]){var _0x2444cb=_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x2bb')]+'/npm/js/adapeter.js',_0x320e4e=_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x2bb')]+'/npm/js/janus.js',_0x5235f4=_0x521a10[a0_0x5a29('0x3e5')]['filePath']+'/npm/js/tts.js';console[a0_0x5a29('0x6df')]('加载jquery.js'),_0xbe8c84(_0x2444cb,function(){console[a0_0x5a29('0x6df')]('加载adapeter.js'),_0xbe8c84(_0x320e4e,function(){console[a0_0x5a29('0x6df')](a0_0x5a29('0x2b8')),_0xbe8c84(_0x5235f4,function(){console[a0_0x5a29('0x6df')](a0_0x5a29('0x3ca')),_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x8bb')]=!0x0;});});});}if(!document[a0_0x5a29('0x200')](a0_0x5a29('0x761'))){var _0x9be867=document[a0_0x5a29('0x56f')](a0_0x5a29('0x884'));_0x9be867[a0_0x5a29('0x46a')]['display']=a0_0x5a29('0x7a4'),_0x9be867['id']='audioleft',document[a0_0x5a29('0x24e')][a0_0x5a29('0x365')](_0x9be867);}if(!document[a0_0x5a29('0x200')]('audioright')){var _0x3d192e=document['createElement'](a0_0x5a29('0x884'));_0x3d192e[a0_0x5a29('0x46a')][a0_0x5a29('0x625')]=a0_0x5a29('0x7a4'),_0x3d192e['id']=a0_0x5a29('0x701'),document[a0_0x5a29('0x24e')][a0_0x5a29('0x365')](_0x3d192e);}}}}),_0x21cf58()[a0_0x5a29('0x326')]){var _0x1099e4=document['createElement'](a0_0x5a29('0x884'));if(_0x1099e4[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x33f')),_0x8daf1c[a0_0x5a29('0x365')](_0x1099e4),_0x21cf58()[a0_0x5a29('0x82c')]||_0x21cf58()['fullScreenModule']){var _0x4c6e6d=document[a0_0x5a29('0x56f')](a0_0x5a29('0x884'));if(_0x4c6e6d[a0_0x5a29('0x773')]('class',a0_0x5a29('0x3c8')),_0x1099e4[a0_0x5a29('0x365')](_0x4c6e6d),_0x21cf58()[a0_0x5a29('0x82c')]){var _0x127169=document[a0_0x5a29('0x56f')](a0_0x5a29('0x8b5'));_0x127169[a0_0x5a29('0x773')]('id',a0_0x5a29('0x368')),_0x127169[a0_0x5a29('0x13d')]=-0x1===_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')][a0_0x5a29('0x26f')]('.hd')?'标清':'高清',_0x127169['onclick']=function(){_0x521a10['stop'](),-0x1===_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')][a0_0x5a29('0x26f')]('.hd')?(_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')]=_0x521a10['opt'][a0_0x5a29('0x498')][a0_0x5a29('0x380')](a0_0x5a29('0x7a9'),a0_0x5a29('0x855')),_0x127169[a0_0x5a29('0x13d')]=-0x1===_0x521a10['opt'][a0_0x5a29('0x498')][a0_0x5a29('0x26f')](a0_0x5a29('0x9f'))?'标清':'高清'):_0x521a10[a0_0x5a29('0x3e5')]['url']=_0x521a10['opt'][a0_0x5a29('0x498')]['replace'](a0_0x5a29('0x855'),a0_0x5a29('0x7a9')),_0x33bd5c[a0_0x5a29('0x561')]='https://open.ys7.com/ezopen/h5/iframe?url='+_0x521a10['opt'][a0_0x5a29('0x498')][a0_0x5a29('0x380')](a0_0x5a29('0x855'),a0_0x5a29('0x7a9'))+a0_0x5a29('0x786')+_0x521a10[a0_0x5a29('0x3e5')]['audio']+a0_0x5a29('0x81a')+_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x829')]+a0_0x5a29('0x1f3');},_0x4c6e6d['appendChild'](_0x127169);}if(_0x21cf58()[a0_0x5a29('0x344')]){var _0x3e7e26=document[a0_0x5a29('0x56f')](a0_0x5a29('0x8b5'));_0x3e7e26[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x75a')),_0x3e7e26[a0_0x5a29('0x773')]('id',a0_0x5a29('0x1c4')),_0x3e7e26[a0_0x5a29('0x773')](a0_0x5a29('0x731'),a0_0x5a29('0x358')),_0x3e7e26[a0_0x5a29('0x773')](a0_0x5a29('0x46a'),a0_0x5a29('0x48')),_0x3e7e26[a0_0x5a29('0x13d')]=a0_0x5a29('0x7c2'),_0x3e7e26[a0_0x5a29('0x8')]=function(){_0x521a10[a0_0x5a29('0x5d3')](0x0),_0x3e7e26[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x75a')),_0x30d761[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),'');};var _0x30d761=document[a0_0x5a29('0x56f')](a0_0x5a29('0x8b5'));_0x3e7e26[a0_0x5a29('0x773')]('id',a0_0x5a29('0x2a7')),_0x30d761[a0_0x5a29('0x773')]('class','hide'),_0x30d761[a0_0x5a29('0x773')](a0_0x5a29('0x731'),a0_0x5a29('0x50e')),_0x30d761[a0_0x5a29('0x773')]('style','vertical-align:\x20top;'),_0x30d761[a0_0x5a29('0x13d')]=a0_0x5a29('0x759'),_0x30d761[a0_0x5a29('0x8')]=function(){_0x521a10[a0_0x5a29('0x8fb')](0x0),_0x3e7e26[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),''),_0x30d761[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),'hide');},_0x4c6e6d['appendChild'](_0x3e7e26),_0x4c6e6d[a0_0x5a29('0x365')](_0x30d761);}if(0x1==_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x465')]?_0x30d761[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),''):(_0x3e7e26[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),''),_0x521a10[a0_0x5a29('0x8fb')](0x0)),_0x21cf58()[a0_0x5a29('0x344')]){var _0x1ef40b=document[a0_0x5a29('0x56f')]('span');_0x1ef40b[a0_0x5a29('0x773')]('title','全屏'),_0x1ef40b[a0_0x5a29('0x773')](a0_0x5a29('0x46a'),a0_0x5a29('0x48')),_0x1ef40b[a0_0x5a29('0x13d')]=a0_0x5a29('0x411'),_0x1ef40b[a0_0x5a29('0x8')]=function(){_0x521a10[a0_0x5a29('0x24d')]();},_0x4c6e6d[a0_0x5a29('0x365')](_0x1ef40b);}}if(_0x21cf58()[a0_0x5a29('0x220')]){var _0x4cdcd5=document[a0_0x5a29('0x56f')](a0_0x5a29('0x884')),_0x3c4365=document[a0_0x5a29('0x56f')]('div');_0x4cdcd5[a0_0x5a29('0x773')]('class',a0_0x5a29('0x7f4')),_0x4cdcd5[a0_0x5a29('0x13d')]=a0_0x5a29('0x67d'),_0x4cdcd5[a0_0x5a29('0x8')]=function(){if(console[a0_0x5a29('0x6df')](a0_0x5a29('0x4be'),_0xaf9c87[a0_0x5a29('0x5dd')]['countTimer']),_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x676')])return _0x53e48a[a0_0x5a29('0x52')][a0_0x5a29('0x4f6')]('语音设备正忙,请稍后重试'),!0x1;_0x4bfaac(a0_0x5a29('0x695'),0x0),console[a0_0x5a29('0x6df')](a0_0x5a29('0x42f')),_0x521a10[a0_0x5a29('0x8fb')](0x0),console[a0_0x5a29('0x6df')](_0x521a10['opt']),_0x521a10[a0_0x5a29('0x7df')](),this['setAttribute'](a0_0x5a29('0x7ec'),a0_0x5a29('0x61a')),_0x3c4365[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),'ptp-talk\x20on');},_0x3c4365[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0xe4')),_0x3c4365[a0_0x5a29('0x13d')]=a0_0x5a29('0x733'),_0x3c4365[a0_0x5a29('0x8')]=function(){console[a0_0x5a29('0x6df')](_0x521a10[a0_0x5a29('0x3e5')]),_0x521a10[a0_0x5a29('0x111')](),_0x4bfaac('destory',0x0),_0x521a10[a0_0x5a29('0x5d3')](0x0),this[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0xe4')),_0x4cdcd5[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x7f4'));},_0x1099e4[a0_0x5a29('0x365')](_0x4cdcd5),_0x1099e4['appendChild'](_0x3c4365);}if(_0x21cf58()[a0_0x5a29('0x4d4')]){var _0x4394d9=document[a0_0x5a29('0x56f')](a0_0x5a29('0x884')),_0x2ee9ad=document[a0_0x5a29('0x56f')]('div');function _0x52cf36(_0x13da86){_0x122b6f(a0_0x5a29('0x209'),a0_0x5a29('0x2a'),{'accessToken':_0x521a10['opt'][a0_0x5a29('0x829')],'pageStart':_0x13da86,'pageSize':_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x59')],'default':_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x563')]?a0_0x5a29('0x1a3'):a0_0x5a29('0xd2')},0x0,function(_0x5538a9){console[a0_0x5a29('0x6df')](a0_0x5a29('0x77d'),_0x5538a9),0xc8==_0x5538a9[a0_0x5a29('0x4e9')]&&(function(_0x36b158){if(console['log'](a0_0x5a29('0x8c8'),_0x36b158),_0x36b158&&_0x36b158['length']>0x0){for(var _0x518d63=0x0;_0x518d63<_0x36b158[a0_0x5a29('0x515')];_0x518d63++){var _0x5d09a4=document[a0_0x5a29('0x56f')]('li');_0x5d09a4[a0_0x5a29('0x13d')]=a0_0x5a29('0x6cc')+_0x518d63+a0_0x5a29('0x40f')+(_0x36b158[_0x518d63][a0_0x5a29('0x707')]||0x14)+a0_0x5a29('0x969')+_0x36b158[_0x518d63][a0_0x5a29('0x942')]+'>'+(_0x36b158[_0x518d63]['voiceName'][a0_0x5a29('0x515')]>0xa?_0x36b158[_0x518d63][a0_0x5a29('0x257')][a0_0x5a29('0x732')](0x0,0xa)+'...':_0x36b158[_0x518d63][a0_0x5a29('0x257')])+a0_0x5a29('0x862'),document[a0_0x5a29('0x646')](a0_0x5a29('0x114'))[0x0][a0_0x5a29('0x89d')](_0x5d09a4),_0x5d09a4[a0_0x5a29('0x8')]=function(_0x313203){console[a0_0x5a29('0x6df')](a0_0x5a29('0x471'),_0x313203[a0_0x5a29('0x28a')],_0x313203[a0_0x5a29('0x28a')][a0_0x5a29('0x97a')][a0_0x5a29('0x498')]),_0x2b84e9(_0x313203[a0_0x5a29('0x28a')][a0_0x5a29('0x97a')][a0_0x5a29('0x498')],_0x313203[a0_0x5a29('0x28a')][a0_0x5a29('0x97a')][a0_0x5a29('0x63d')]);};}_0x36b158[a0_0x5a29('0x515')]===_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x59')]?document['getElementById'](a0_0x5a29('0x867'))['innerHTML']=a0_0x5a29('0x8df'):document[a0_0x5a29('0x200')](a0_0x5a29('0x867'))['innerHTML']=a0_0x5a29('0x6bb');}}(_0x5538a9[a0_0x5a29('0x77d')]),_0xaf9c87[a0_0x5a29('0x5dd')]['page']=_0x5538a9[a0_0x5a29('0x317')]['page'],0x0!=_0x13da86||0x0!=_0x5538a9['data'][a0_0x5a29('0x515')]||_0xaf9c87['state'][a0_0x5a29('0x563')]||(_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x563')]=!0x0,_0x52cf36(0x0)));});}function _0x2b84e9(_0x4b93a5,_0x2a6318){console[a0_0x5a29('0x6df')]('播放语音',_0x4b93a5,_0x2a6318),_0x122b6f(a0_0x5a29('0x55'),a0_0x5a29('0x2a'),{'accessToken':_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x829')],'deviceSerial':_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x38c')],'channelNo':_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x24b')],'fileUrl':_0x4b93a5},0x0,function(_0x210cc8){console[a0_0x5a29('0x6df')](a0_0x5a29('0xeb'),_0x210cc8[a0_0x5a29('0x77d')]),0xc8==_0x210cc8['code']?_0x4bfaac(a0_0x5a29('0xa1'),parseInt(_0x2a6318)):a0_0x5a29('0x3a0')==_0x210cc8['code']?_0x53e48a[a0_0x5a29('0x52')]['msg'](a0_0x5a29('0x215')):_0x53e48a['layer'][a0_0x5a29('0x4f6')](_0x210cc8['msg']||a0_0x5a29('0x924'));});}_0x4394d9[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),'broadcast\x20off'),_0x2ee9ad[a0_0x5a29('0x773')]('class',a0_0x5a29('0x66a')),_0x4394d9[a0_0x5a29('0x13d')]=a0_0x5a29('0x8ef'),_0x4394d9['onclick']=function(){this[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),'broadcast\x20off\x20hide'),_0x2ee9ad[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),'broadcast\x20on');},_0x2ee9ad['innerHTML']=a0_0x5a29('0xd6'),_0x2ee9ad['onclick']=function(){this[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x66a')),_0x4394d9[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x96b'));},_0x1099e4['appendChild'](_0x4394d9),_0x1099e4[a0_0x5a29('0x365')](_0x2ee9ad),document[a0_0x5a29('0x200')]('voice-custom')[a0_0x5a29('0x8')]=function(){console[a0_0x5a29('0x6df')](a0_0x5a29('0x297')),_0x36bd6b[a0_0x5a29('0x773')]('class',a0_0x5a29('0x4e4'));},_0x52cf36(0x0);var _0x36bd6b=document[a0_0x5a29('0x56f')](a0_0x5a29('0x884')),_0x52bbd1=document[a0_0x5a29('0x56f')]('div');_0x36bd6b[a0_0x5a29('0x773')]('class','speak\x20off\x20hide'),_0x52bbd1['setAttribute'](a0_0x5a29('0x7ec'),'speak\x20on\x20hide'),_0x36bd6b[a0_0x5a29('0x773')]('id',a0_0x5a29('0x39d')),_0x52bbd1[a0_0x5a29('0x773')]('id',a0_0x5a29('0xfc')),_0x36bd6b['innerHTML']='<span\x20title=\x22按住说话\x22>\x20\x20<svg\x20t=\x221581994757678\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20\x20\x20\x20p-id=\x221639\x22\x20width=\x2216\x22\x20height=\x2216\x22>\x20\x20\x20\x20<path\x20\x20\x20\x20\x20\x20d=\x22M757.059829\x20393.846154v-52.512821h262.564103v52.512821H757.059829z\x20m-420.102564\x20481.367521v96.273504h175.042735a8.752137\x208.752137\x200\x200\x201\x208.752137\x208.752137v35.008547a8.752137\x208.752137\x200\x200\x201-8.752137\x208.752137H109.401709a8.752137\x208.752137\x200\x200\x201-8.752136-8.752137v-35.008547a8.752137\x208.752137\x200\x200\x201\x208.752136-8.752137h175.042735v-96.273504C129.767932\x20875.213675\x204.376068\x20749.821812\x204.376068\x20595.145299V463.863248a26.25641\x2026.25641\x200\x201\x201\x2052.512821\x200v113.777778c0\x20140.174222\x20113.637744\x20253.811966\x20253.811966\x20253.811965s253.811966-113.637744\x20253.811966-253.811965V463.863248a26.25641\x2026.25641\x200\x201\x201\x2052.51282\x200v131.282051c0\x20154.676513-125.391863\x20280.068376-280.068376\x20280.068376z\x20m-26.25641-96.273504c-111.178393\x200-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709\x2090.120752\x20199.522462\x200\x20310.700855\x200s201.299145\x2090.120752\x20201.299145\x20201.299145v376.341881c0\x20111.178393-90.120752\x20201.299145-201.299145\x20201.299145z\x20m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z\x20m-17.504273\x20105.025641H757.059829v-52.512821h227.555556v52.512821z\x20m-17.504274\x20105.025641H757.059829v-52.512821h210.051282v52.512821z\x20m-8.752137\x20105.025641H757.059829v-52.512821h201.299145v52.512821z\x20m-17.504273\x20105.025641H757.059829v-52.512821h183.794872v52.512821z\x20m-26.25641\x20105.025641H757.059829v-52.512821h157.538462v52.512821z\x22\x20\x20\x20\x20\x20\x20p-id=\x221640\x22\x20fill=\x22#ffffff\x22></path>\x20\x20</svg></span><span>按住说话</span>',_0x52bbd1['innerHTML']='<span\x20title=\x22按住说话\x22><svg\x20t=\x221581994757678\x22\x20class=\x22icon\x22\x20viewBox=\x220\x200\x201024\x201024\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20\x20p-id=\x221639\x22\x20width=\x2216\x22\x20height=\x2216\x22>\x20\x20<path\x20\x20\x20\x20d=\x22M757.059829\x20393.846154v-52.512821h262.564103v52.512821H757.059829z\x20m-420.102564\x20481.367521v96.273504h175.042735a8.752137\x208.752137\x200\x200\x201\x208.752137\x208.752137v35.008547a8.752137\x208.752137\x200\x200\x201-8.752137\x208.752137H109.401709a8.752137\x208.752137\x200\x200\x201-8.752136-8.752137v-35.008547a8.752137\x208.752137\x200\x200\x201\x208.752136-8.752137h175.042735v-96.273504C129.767932\x20875.213675\x204.376068\x20749.821812\x204.376068\x20595.145299V463.863248a26.25641\x2026.25641\x200\x201\x201\x2052.512821\x200v113.777778c0\x20140.174222\x20113.637744\x20253.811966\x20253.811966\x20253.811965s253.811966-113.637744\x20253.811966-253.811965V463.863248a26.25641\x2026.25641\x200\x201\x201\x2052.51282\x200v131.282051c0\x20154.676513-125.391863\x20280.068376-280.068376\x20280.068376z\x20m-26.25641-96.273504c-111.178393\x200-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709\x2090.120752\x20199.522462\x200\x20310.700855\x200s201.299145\x2090.120752\x20201.299145\x20201.299145v376.341881c0\x20111.178393-90.120752\x20201.299145-201.299145\x20201.299145z\x20m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z\x20m-17.504273\x20105.025641H757.059829v-52.512821h227.555556v52.512821z\x20m-17.504274\x20105.025641H757.059829v-52.512821h210.051282v52.512821z\x20m-8.752137\x20105.025641H757.059829v-52.512821h201.299145v52.512821z\x20m-17.504273\x20105.025641H757.059829v-52.512821h183.794872v52.512821z\x20m-26.25641\x20105.025641H757.059829v-52.512821h157.538462v52.512821z\x22\x20\x20\x20\x20p-id=\x221640\x22\x20fill=\x22#ff0000\x22></path></svg></span><span>松开发送</span>',_0x1099e4[a0_0x5a29('0x365')](_0x36bd6b),_0x1099e4[a0_0x5a29('0x365')](_0x52bbd1),document[a0_0x5a29('0x200')](a0_0x5a29('0x4fb'))[a0_0x5a29('0x821')]=function(_0x565d4c){var _0x5aa375=this['scrollHeight'];console[a0_0x5a29('0x6df')](a0_0x5a29('0x68e'),_0x5aa375,this[a0_0x5a29('0x1af')],document['getElementById'](a0_0x5a29('0x4fb'))[a0_0x5a29('0x2ba')]),_0x5aa375<=this[a0_0x5a29('0x1af')]+this['clientHeight']&&(console['log'](a0_0x5a29('0x473'),_0xaf9c87['state'][a0_0x5a29('0x317')]),_0x52cf36(++_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x317')]));};var _0xd97fbb,_0x1bb7be=document[a0_0x5a29('0x56f')](a0_0x5a29('0x884'));_0x1bb7be[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x811')),_0x1bb7be['setAttribute']('id','time-area'),_0x1bb7be[a0_0x5a29('0x13d')]=a0_0x5a29('0x3f0'),_0x1099e4['appendChild'](_0x1bb7be),document[a0_0x5a29('0x200')](a0_0x5a29('0x39d'))[a0_0x5a29('0x168')]=function(){if(_0xaf9c87['state'][a0_0x5a29('0x676')])return _0x53e48a[a0_0x5a29('0x52')][a0_0x5a29('0x4f6')](a0_0x5a29('0x80a')),!0x1;var _0x43a397;function _0x562bc9(_0x3764cc){var _0x333bdc=_0x43a397[a0_0x5a29('0x7c')](_0x3764cc);_0xd97fbb=new _0x53e48a[(a0_0x5a29('0x21f'))](_0x333bdc);}console[a0_0x5a29('0x6df')]('按住说话'),_0x36bd6b[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x948')),_0x52bbd1[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x55b')),function(){console[a0_0x5a29('0x6df')]('run\x20init');try{_0x53e48a[a0_0x5a29('0x356')]=_0x53e48a[a0_0x5a29('0x356')]||_0x53e48a[a0_0x5a29('0x63e')],navigator[a0_0x5a29('0x34e')]=navigator[a0_0x5a29('0x34e')]||navigator[a0_0x5a29('0x5fb')],_0x53e48a[a0_0x5a29('0x1b')]=_0x53e48a['URL']||_0x53e48a[a0_0x5a29('0x10c')],_0x43a397=new AudioContext(),console[a0_0x5a29('0x6df')](a0_0x5a29('0x3ba')),console[a0_0x5a29('0x6df')]('navigator.getUserMedia\x20'+(navigator['getUserMedia']?a0_0x5a29('0x2cc'):a0_0x5a29('0x2e8')));}catch(_0x44cd3a){console['log'](a0_0x5a29('0x40e'),_0x44cd3a),_0x53e48a['layer'][a0_0x5a29('0x4f6')](a0_0x5a29('0x2b1'));}navigator[a0_0x5a29('0x34e')]({'audio':!0x0},_0x562bc9,function(_0x12890b){console[a0_0x5a29('0x6df')]('No\x20live\x20audio\x20input:\x20'+_0x12890b);});}(),_0x4bfaac(a0_0x5a29('0x695'),0x0),setTimeout(function(){_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x7bb')]=0x0,_0xd97fbb&&_0xd97fbb['record']();},0x3e8),_0xaf9c87['state'][a0_0x5a29('0x46c')]&&clearInterval(_0xaf9c87[a0_0x5a29('0x5dd')]['recodeTimer']),_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x46c')]=setInterval(function(){_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x7bb')]>=0x3b?(_0x521a10[a0_0x5a29('0x111')](),_0x4bfaac(a0_0x5a29('0x247'),0x0),this[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0xe4')),_0x4cdcd5[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),'ptp-talk\x20off'),_0x53e48a[a0_0x5a29('0x52')][a0_0x5a29('0x4f6')](a0_0x5a29('0x8de'))):_0xaf9c87['state'][a0_0x5a29('0x7bb')]=_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x7bb')]+0x1;},0x3e8);},document[a0_0x5a29('0x200')](a0_0x5a29('0xfc'))['onmouseup']=function(){console[a0_0x5a29('0x6df')](a0_0x5a29('0x607')),_0x52bbd1[a0_0x5a29('0x773')](a0_0x5a29('0x7ec'),a0_0x5a29('0x6bd')),function(){if(_0x4bfaac(a0_0x5a29('0x247'),0x0),_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x7bb')]<0x1)return _0x53e48a[a0_0x5a29('0x52')][a0_0x5a29('0x4f6')](a0_0x5a29('0x1e8')),clearInterval(_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x46c')]),!0x1;clearInterval(_0xaf9c87['state'][a0_0x5a29('0x46c')]),function(){try{_0xd97fbb&&_0xd97fbb[a0_0x5a29('0x7e3')](),_0xd97fbb&&_0xd97fbb[a0_0x5a29('0x683')](function(_0x44c4b8){if(console[a0_0x5a29('0x6df')](a0_0x5a29('0x1d4'),_0x44c4b8),_0x44c4b8[a0_0x5a29('0xbc')]<0x3e8)return _0x53e48a[a0_0x5a29('0x52')]['msg'](a0_0x5a29('0x714')),_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x7bb')]=0x0,!0x1;_0x4bfaac(a0_0x5a29('0xa1'),_0xaf9c87['state'][a0_0x5a29('0x7bb')]+0x2);var _0x4dd750=new FormData();_0x4dd750[a0_0x5a29('0x89d')](a0_0x5a29('0x438'),_0x44c4b8),_0x4dd750[a0_0x5a29('0x89d')](a0_0x5a29('0x829'),_0x521a10['opt'][a0_0x5a29('0x829')]),_0x4dd750[a0_0x5a29('0x89d')](a0_0x5a29('0x38c'),_0x521a10['opt'][a0_0x5a29('0x38c')]),_0x4dd750[a0_0x5a29('0x89d')](a0_0x5a29('0x24b'),_0x521a10[a0_0x5a29('0x3e5')]['channelNo']),_0x122b6f('https://open.ys7.com/api/lapp/voice/sendonce',a0_0x5a29('0x2a'),{'voiceFile':_0x44c4b8,'accessToken':_0x521a10['opt'][a0_0x5a29('0x829')],'deviceSerial':_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x38c')],'channelNo':_0x521a10[a0_0x5a29('0x3e5')][a0_0x5a29('0x24b')]},0x0,function(_0x47ee50){console['log'](a0_0x5a29('0xeb'),_0x47ee50[a0_0x5a29('0x77d')]),0xc8==_0x47ee50[a0_0x5a29('0x4e9')]?_0x4bfaac(a0_0x5a29('0xa1'),_0xaf9c87['state']['recodeTime']+0x2):a0_0x5a29('0x3a0')==_0x47ee50[a0_0x5a29('0x4e9')]?_0x53e48a['layer'][a0_0x5a29('0x4f6')](a0_0x5a29('0x215')):_0x53e48a[a0_0x5a29('0x52')][a0_0x5a29('0x4f6')](_0x47ee50[a0_0x5a29('0x4f6')]||'发送失败,请稍后再试');});}),_0xd97fbb&&_0xd97fbb[a0_0x5a29('0x2ef')]();}catch(_0x3511a3){console['log'](_0x3511a3);}}();}();};}function _0x4bfaac(_0x1943b3,_0x44fde8=0x0){if(clearInterval(_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x676')]),'add'===_0x1943b3){var _0x369ebd=_0x44fde8;_0xaf9c87['state'][a0_0x5a29('0x676')]=setInterval(function(){++_0x369ebd,document[a0_0x5a29('0x200')]('time-area')['innerHTML']=_0x1d90f7(_0x369ebd);},0x3e8);}else a0_0x5a29('0xa1')===_0x1943b3?(_0x369ebd=_0x44fde8,_0xaf9c87['state'][a0_0x5a29('0x676')]=setInterval(function(){_0x369ebd>0x0?(_0x369ebd--,document[a0_0x5a29('0x200')](a0_0x5a29('0x811'))[a0_0x5a29('0x13d')]=_0x1d90f7(_0x369ebd)):(clearInterval(_0xaf9c87['state']['countTimer']),_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x676')]=void 0x0,console['log'](a0_0x5a29('0x689')));},0x3e8)):a0_0x5a29('0x247')===_0x1943b3&&(clearInterval(_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x676')]),_0xaf9c87[a0_0x5a29('0x5dd')][a0_0x5a29('0x676')]=void 0x0,document[a0_0x5a29('0x200')](a0_0x5a29('0x811'))[a0_0x5a29('0x13d')]='00:00');function _0x1d90f7(_0x43d4a3){var _0x3c340c,_0x5bd533,_0x3c0f53,_0x3967d2=parseInt(_0x43d4a3),_0x25d02a=0x0,_0x421426=0x0;return _0x3967d2>0x3b&&(_0x25d02a=parseInt(_0x3967d2/0x3c),_0x3967d2=parseInt(_0x3967d2%0x3c),_0x25d02a>0x3b&&(_0x421426=parseInt(_0x25d02a/0x3c),_0x25d02a=parseInt(_0x25d02a%0x3c))),_0x3c340c=parseInt(_0x3967d2)>0x9?parseInt(_0x3967d2):'0'+parseInt(_0x3967d2),_0x5bd533=parseInt(_0x25d02a)>0x9?parseInt(_0x25d02a):'0'+parseInt(_0x25d02a),_0x3c0f53=parseInt(_0x421426)>0x9?parseInt(_0x421426):'0'+parseInt(_0x421426),_0x421426>0x0?_0x3c0f53+':'+_0x5bd533+':'+_0x3c340c:_0x25d02a>0x0?_0x5bd533+':'+_0x3c340c:a0_0x5a29('0x63')+_0x3c340c;}}}}});}),_0x521a10=this,_0x53e48a['addEventListener'](a0_0x5a29('0x452'),function(_0x1f2623){console['log'](a0_0x5a29('0x402'),_0x1f2623),_0x1f2623[a0_0x5a29('0x6b2')];var _0x355da3=_0x521a10[a0_0x5a29('0x3e5')]['id'];if(_0x1f2623[a0_0x5a29('0x77d')][a0_0x5a29('0x519')])switch(_0x1f2623['data'][a0_0x5a29('0x519')]){case'openSound':_0x355da3==_0x1f2623[a0_0x5a29('0x77d')]['id']&&_0x4e38c3[a0_0x5a29('0x5aa')]&&_0x4e38c3[a0_0x5a29('0x5aa')](_0x1f2623[a0_0x5a29('0x77d')]);break;case a0_0x5a29('0x8fb'):_0x355da3==_0x1f2623[a0_0x5a29('0x77d')]['id']&&_0x4e38c3[a0_0x5a29('0x339')]&&_0x4e38c3[a0_0x5a29('0x339')](_0x1f2623[a0_0x5a29('0x77d')]);break;case'capturePicture':_0x355da3==_0x1f2623[a0_0x5a29('0x77d')]['id']&&_0x4e38c3['capturePictureCallBack']&&_0x4e38c3[a0_0x5a29('0x4d9')](_0x1f2623[a0_0x5a29('0x77d')]);break;case a0_0x5a29('0x650'):_0x355da3==_0x1f2623[a0_0x5a29('0x77d')]['id']&&_0x4e38c3['startSaveCallBack']&&_0x4e38c3[a0_0x5a29('0x32d')](_0x1f2623['data']);break;case a0_0x5a29('0x1a5'):_0x355da3==_0x1f2623[a0_0x5a29('0x77d')]['id']&&_0x4e38c3[a0_0x5a29('0x2c4')]&&_0x4e38c3[a0_0x5a29('0x2c4')](_0x1f2623[a0_0x5a29('0x77d')]);break;case'fullScreen':_0x355da3==_0x1f2623['data']['id']&&_0x4e38c3['fullScreenCallBack']&&_0x4e38c3[a0_0x5a29('0x7c7')](_0x1f2623['data']);break;case a0_0x5a29('0x6f1'):_0x355da3==_0x1f2623[a0_0x5a29('0x77d')]['id']&&_0x4e38c3['getOSDTimeCallBack']&&_0x4e38c3[a0_0x5a29('0x678')](_0x1f2623[a0_0x5a29('0x77d')]);break;case a0_0x5a29('0x7f'):_0x355da3==_0x1f2623[a0_0x5a29('0x77d')]['id']&&_0x4e38c3[a0_0x5a29('0x7f')]&&_0x4e38c3['handleSuccess'](_0x1f2623[a0_0x5a29('0x77d')]);break;case'handleError':_0x355da3==_0x1f2623[a0_0x5a29('0x77d')]['id']&&_0x4e38c3[a0_0x5a29('0x6b9')]&&_0x4e38c3[a0_0x5a29('0x6b9')](_0x1f2623[a0_0x5a29('0x77d')]);}});};return _0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x8dd')]=function(_0x4259b0){var _0x3b9fd7=a0_0x5a29('0x1ae')+this['opt']['id'],_0x24e520=document[a0_0x5a29('0x200')](_0x3b9fd7)['contentWindow'];a0_0x5a29('0x950')==typeof _0x4259b0&&_0x4259b0[a0_0x5a29('0x498')]&&(this[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')]=_0x4259b0[a0_0x5a29('0x498')]),a0_0x5a29('0x950')==typeof _0x4259b0&&_0x4259b0[a0_0x5a29('0x829')]&&(this[a0_0x5a29('0x3e5')]['accessToken']=_0x4259b0[a0_0x5a29('0x829')]),'string'==typeof _0x4259b0&&(this[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')]=_0x4259b0),_0x24e520[a0_0x5a29('0x5d9')]({'action':a0_0x5a29('0x8dd'),'accessToken':this[a0_0x5a29('0x3e5')][a0_0x5a29('0x829')],'url':this[a0_0x5a29('0x3e5')][a0_0x5a29('0x498')]},_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x7e3')]=function(){var _0x5571ff=a0_0x5a29('0x1ae')+this['opt']['id'];document[a0_0x5a29('0x200')](_0x5571ff)[a0_0x5a29('0x702')]['postMessage'](a0_0x5a29('0x7e3'),_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36['prototype'][a0_0x5a29('0x5d3')]=function(){var _0x56242b=a0_0x5a29('0x1ae')+this[a0_0x5a29('0x3e5')]['id'];document[a0_0x5a29('0x200')](_0x56242b)[a0_0x5a29('0x702')][a0_0x5a29('0x5d9')](a0_0x5a29('0x5d3'),_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36['prototype'][a0_0x5a29('0x8fb')]=function(){var _0x25244d='EZUIKitPlayer-'+this['opt']['id'];document[a0_0x5a29('0x200')](_0x25244d)[a0_0x5a29('0x702')][a0_0x5a29('0x5d9')](a0_0x5a29('0x8fb'),_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x650')]=function(_0x31331a){var _0x4ab800=a0_0x5a29('0x1ae')+this[a0_0x5a29('0x3e5')]['id'];document[a0_0x5a29('0x200')](_0x4ab800)[a0_0x5a29('0x702')]['postMessage']({'action':a0_0x5a29('0x650'),'fileName':_0x31331a||a0_0x5a29('0x663')},_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x1a5')]=function(){var _0x42bc3f=a0_0x5a29('0x1ae')+this['opt']['id'];document[a0_0x5a29('0x200')](_0x42bc3f)[a0_0x5a29('0x702')][a0_0x5a29('0x5d9')](a0_0x5a29('0x1a5'),_0x480dc8+'/ezopen/h5/iframe');},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x24d')]=function(){var _0x366127='EZUIKitPlayer-'+this[a0_0x5a29('0x3e5')]['id'],_0x1fa714=document[a0_0x5a29('0x200')](_0x366127)['contentWindow'];!function(_0x2fb097){var _0x373f95=_0x2fb097[a0_0x5a29('0x6c6')]||_0x2fb097[a0_0x5a29('0x39f')]||_0x2fb097[a0_0x5a29('0x360')]||_0x2fb097[a0_0x5a29('0x4ba')];if(_0x373f95)_0x373f95[a0_0x5a29('0x351')](_0x2fb097);else{if(void 0x0!==_0x53e48a['ActiveXObject']){var _0x13bba3=new ActiveXObject(a0_0x5a29('0x211'));null!==_0x13bba3&&_0x13bba3[a0_0x5a29('0x4e2')](a0_0x5a29('0x541'));}}}(document[a0_0x5a29('0x200')](_0x366127)),setTimeout(function(){_0x1fa714['postMessage']('autoResize',_0x480dc8+a0_0x5a29('0x900'));},0x64);},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x8f2')]=function(_0x2551be,_0x2cc67b){var _0x5611c8=a0_0x5a29('0x1ae')+this[a0_0x5a29('0x3e5')]['id'];document[a0_0x5a29('0x200')](_0x5611c8)[a0_0x5a29('0x702')]['postMessage']({'action':a0_0x5a29('0x8f2'),'fileName':_0x2551be||a0_0x5a29('0x663'),'isUndownload':_0x2cc67b},_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x1d6')]=function(){var _0x524055=a0_0x5a29('0x1ae')+this[a0_0x5a29('0x3e5')]['id'];document['getElementById'](_0x524055)[a0_0x5a29('0x702')][a0_0x5a29('0x5d9')](a0_0x5a29('0x1d6'),_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x6d')]=function(){var _0x3441bc=a0_0x5a29('0x1ae')+this[a0_0x5a29('0x3e5')]['id'];document[a0_0x5a29('0x200')](_0x3441bc)[a0_0x5a29('0x702')][a0_0x5a29('0x5d9')](a0_0x5a29('0x6d'),_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x6f1')]=function(){var _0x3ad25f='EZUIKitPlayer-'+this[a0_0x5a29('0x3e5')]['id'];document['getElementById'](_0x3ad25f)[a0_0x5a29('0x702')][a0_0x5a29('0x5d9')]('getOSDTime',_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36['prototype']['autoResize']=function(){var _0x19b836='EZUIKitPlayer-'+this[a0_0x5a29('0x3e5')]['id'];document[a0_0x5a29('0x200')](_0x19b836)[a0_0x5a29('0x702')]['postMessage']('autoResize',_0x480dc8+a0_0x5a29('0x900'));},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x31')]=function(_0x4b6ac5,_0x1acfc7){var _0x48ba3a=a0_0x5a29('0x1ae')+this[a0_0x5a29('0x3e5')]['id'],_0x5c40b3=document[a0_0x5a29('0x200')](_0x48ba3a)[a0_0x5a29('0x702')],_0x38fed3=document[a0_0x5a29('0x200')](this[a0_0x5a29('0x3e5')]['id']);_0x38fed3['style'][a0_0x5a29('0x96f')]=_0x4b6ac5+'px',_0x38fed3[a0_0x5a29('0x46a')]['height']=_0x1acfc7+'px';var _0x499c83=document[a0_0x5a29('0x200')](_0x48ba3a);_0x499c83[a0_0x5a29('0x773')](a0_0x5a29('0x96f'),_0x4b6ac5),_0x499c83[a0_0x5a29('0x773')](a0_0x5a29('0x6b7'),_0x1acfc7),setTimeout(()=>{_0x5c40b3[a0_0x5a29('0x5d9')]({'action':a0_0x5a29('0x95f')},_0x480dc8+a0_0x5a29('0x900'));},0xc8);},_0x5b4b36['prototype']['startTalk']=function(){console[a0_0x5a29('0x6df')](a0_0x5a29('0x6ba')),console[a0_0x5a29('0x6df')](this['opt']),_0xaf9c87['opt']=this[a0_0x5a29('0x3e5')],_0x53e48a[a0_0x5a29('0x7df')]();},_0x5b4b36[a0_0x5a29('0x928')][a0_0x5a29('0x111')]=function(){console[a0_0x5a29('0x6df')](a0_0x5a29('0x300')),_0x53e48a['stopTalk']();},_0xaf9c87[a0_0x5a29('0x724')]=_0x5b4b36,_0x53e48a['EZUIKit']=_0xaf9c87,_0x24f544||(_0x53e48a[a0_0x5a29('0x7c8')]=_0xaf9c87),_0xaf9c87;},a0_0x5a29('0x950')==typeof _0x4d9705['exports']?_0x4d9705[a0_0x5a29('0x5a')]=_0x1ced55[a0_0x5a29('0x62a')]?_0x4cee96(_0x1ced55,!0x0):function(_0x28a8d7){if(!_0x28a8d7[a0_0x5a29('0x62a')])throw new Error('EZUIPlayer\x20requires\x20a\x20window\x20with\x20a\x20document');return _0x4cee96(_0x28a8d7);}:_0x4cee96(_0x1ced55);},function(_0x376b17,_0x532763,_0x40b064){_0x40b064(0x29),_0x376b17[a0_0x5a29('0x5a')]=_0x40b064(0x36);},function(_0x45ca5d,_0x7a4436,_0x4b8b87){'use strict';_0x4b8b87['r'](_0x7a4436),(_0x4b8b87(0x2a),_0x4b8b87(0x2b),_0x4b8b87(0x2c),_0x4b8b87(0x2d),_0x4b8b87(0x2e),_0x4b8b87(0x2f),_0x4b8b87(0x30),_0x4b8b87(0x31),_0x4b8b87(0x32),_0x4b8b87(0x33),_0x4b8b87(0x34),_0x4b8b87(0x35));},function(_0x519eb5,_0x54d468,_0x12ac48){},function(_0x5a918b,_0x52afb6,_0x4feef7){},function(_0x46137c,_0x2a0aac,_0xce8d33){},function(_0x4afacf,_0x26cbef,_0x5c7386){},function(_0xe36ef7,_0x5186ff,_0x10015f){},function(_0x1baedf,_0x7d84d,_0x2d3112){},function(_0x2403f3,_0x4423b5,_0x5e3a8a){},function(_0x512eb1,_0x28c364,_0x5932ff){},function(_0x7c5eac,_0x1dcdbc,_0x40ed66){},function(_0x15aab2,_0x4c5699,_0x3a95fb){},function(_0x25b061,_0xa75518,_0x4fa693){},function(_0x29090e,_0x4dbe73,_0x3c3874){},function(_0x3a380a,_0x47880c,_0x2708f7){'use strict';_0x2708f7['r'](_0x47880c);var _0x24f752=function(_0x4c88ec){if(!_0x4c88ec)throw new Error('Missing\x20Base\x20SDK');_0x4c88ec['init'](function(){_0x2708f7(0x37);}),_0x4c88ec[a0_0x5a29('0x3d')]=function(_0x4eedc5){try{_0x4c88ec[a0_0x5a29('0x261')]?_0x4eedc5&&_0x4eedc5():_0x4c88ec['init'](function(){_0x2708f7(0x3d),_0x2708f7(0x5b),_0x4c88ec[a0_0x5a29('0x261')]=!0x0,_0x4eedc5&&_0x4eedc5();});}catch(_0x208b81){console['error'](_0x208b81);}};};'undefined'!=typeof window&&window['DC']&&_0x24f752(window['DC']),_0x47880c[a0_0x5a29('0x663')]={'install':_0x24f752};},function(_0xffe5cc,_0x2e72c6,_0x50ca8f){'use strict';_0x50ca8f['r'](_0x2e72c6);var _0x332e71=_0x50ca8f(0x3),_0x171808=_0x50ca8f(0xb),_0x43fde6=_0x50ca8f(0x12),_0x7f7c52=_0x50ca8f(0xe),_0x3e1086=_0x50ca8f(0xf),_0x195b57=_0x50ca8f(0x16),_0x4efb89=_0x50ca8f(0x19),_0xf7496a=_0x50ca8f(0x6),_0x375232=_0x50ca8f(0xd),_0x1788a3=_0x50ca8f(0x7),_0xf8999f=_0x50ca8f(0x8),_0x4bd0bd={'Util':_0x332e71['c'],'DomUtil':_0x332e71['a'],'PlotUtil':_0x332e71['b'],'State':_0xf7496a['a'],'Event':_0x171808['b'],'ImageryType':_0x3e1086['a'],'TerrainType':_0x195b57['a'],'LayerType':_0x43fde6['f'],'OverlayType':_0x7f7c52['r'],'MouseEventType':_0x171808['h'],'SceneEventType':_0x171808['l'],'WidgetType':_0x4efb89['a'],'Layer':_0x43fde6['d'],'Overlay':_0x7f7c52['q'],'Position':_0x375232['a'],'Transform':_0x1788a3['a'],'T':_0x1788a3['a'],'Parse':_0xf8999f['a'],'P':_0xf8999f['a']};DC[a0_0x5a29('0x751')](_0x4bd0bd);},function(_0x388f5b,_0x281f55){function _0x13b252(_0x5b0573,_0x438f0d){return _0x388f5b[a0_0x5a29('0x5a')]=_0x13b252=Object[a0_0x5a29('0x8c')]||function(_0x1708eb,_0x2468aa){return _0x1708eb[a0_0x5a29('0x5ff')]=_0x2468aa,_0x1708eb;},_0x13b252(_0x5b0573,_0x438f0d);}_0x388f5b[a0_0x5a29('0x5a')]=_0x13b252;},function(_0x4c4be3,_0x5d1e17,_0x375880){var _0x19da84=_0x375880(0x1b);_0x4c4be3[a0_0x5a29('0x5a')]=function(_0x2eedd3){if(Array[a0_0x5a29('0x7aa')](_0x2eedd3))return _0x19da84(_0x2eedd3);};},function(_0x13d05b,_0x3737e0){_0x13d05b[a0_0x5a29('0x5a')]=function(_0x38bfd6){if(a0_0x5a29('0x6c2')!=typeof Symbol&&Symbol['iterator']in Object(_0x38bfd6))return Array[a0_0x5a29('0x35f')](_0x38bfd6);};},function(_0xb5c57a,_0x42be0b,_0x253b33){var _0xb6e906=_0x253b33(0x1b);_0xb5c57a[a0_0x5a29('0x5a')]=function(_0x42ecc1,_0x4c833a){if(_0x42ecc1){if(a0_0x5a29('0x783')==typeof _0x42ecc1)return _0xb6e906(_0x42ecc1,_0x4c833a);var _0x120594=Object[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](_0x42ecc1)['slice'](0x8,-0x1);return'Object'===_0x120594&&_0x42ecc1[a0_0x5a29('0x825')]&&(_0x120594=_0x42ecc1['constructor']['name']),'Map'===_0x120594||a0_0x5a29('0x33')===_0x120594?Array[a0_0x5a29('0x35f')](_0x42ecc1):'Arguments'===_0x120594||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[a0_0x5a29('0x25e')](_0x120594)?_0xb6e906(_0x42ecc1,_0x4c833a):void 0x0;}};},function(_0x23a3a7,_0xb416d1){_0x23a3a7[a0_0x5a29('0x5a')]=function(){throw new TypeError('Invalid\x20attempt\x20to\x20spread\x20non-iterable\x20instance.\x0aIn\x20order\x20to\x20be\x20iterable,\x20non-array\x20objects\x20must\x20have\x20a\x20[Symbol.iterator]()\x20method.');};},function(_0x2001f7,_0x405660){var _0x2042d1=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4a4a58={'Cartesian2':_0x2042d1[a0_0x5a29('0x11b')],'Cartesian3':_0x2042d1['Cartesian3'],'SceneMode':_0x2042d1['SceneMode'],'HeightReference':_0x2042d1[a0_0x5a29('0x306')],'ClassificationType':_0x2042d1[a0_0x5a29('0x8c0')],'ShadowMode':_0x2042d1['ShadowMode'],'TilesetStyle':_0x2042d1[a0_0x5a29('0x593')],'CallbackProperty':_0x2042d1['CallbackProperty'],'JulianDate':_0x2042d1[a0_0x5a29('0x8ab')],'Color':_0x2042d1[a0_0x5a29('0x82')],'ColorMaterialProperty':_0x2042d1[a0_0x5a29('0x583')],'ImageMaterialProperty':_0x2042d1[a0_0x5a29('0x174')],'PolylineDashMaterialProperty':_0x2042d1[a0_0x5a29('0x39')],'PolylineGlowMaterialProperty':_0x2042d1[a0_0x5a29('0x91f')],'PolylineOutlineMaterialProperty':_0x2042d1[a0_0x5a29('0x4f7')],'PolylineArrowMaterialProperty':_0x2042d1[a0_0x5a29('0x4bb')]};DC[a0_0x5a29('0x751')](_0x4a4a58);},function(_0x48ce10,_0x3f91f6){_0x48ce10[a0_0x5a29('0x5a')]='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBkY/kBoplYjVQPsOgrkWeIADcDq7kmyGsXQLG2gd3XkoFZXpxkg7hzAhn+3nl6HpaOPvx79X4+35xikgwBWcxVEPSXWUW6iAGajhiYxASLWLTkHxNrGMhLAmsb/v57+2klAwPDAbAYUjEi8O/tp0t/rj2U/ZTSy4ArJtns9Bj4F5T9YWBk2M4kKewHNxytPBL49+p9H5OYYOLPzcfBCQ6WbUAGsAdY/2VWkfrz/+PXIiZxwWkorsRRsCn8e/cp8v+nb/aMvFygTMnw/8v3q8zy4rsZGBgWYKhmYGAAAN6EGE9igaT+AAAAAElFTkSuQmCC';},function(_0x5a4c5d,_0x3f9b04){_0x5a4c5d[a0_0x5a29('0x5a')]='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACDElEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSscO/l7x3ff/378fz9n++Hr//4fezmz+9ffvz7/eHr33eP3/6Z8P//fwF0fSguevv5X6UwL1PbwoNfGRrWfGJ48PoPiuUOWuwMDSH8DHryrB8FuZkcGBgYLsDk4AZ9/Pavg5mJscS24SXzhQe/8XmXocCLl6Etgv8XJxujOcwwmEEOX37830OMITCQYM/NMD1F8CcHK6MEAwPDByaQ+Ofv/9fUrvpItCEgsODgV4aTt3+xP3n3twHEBxlk8On7P/4J2z4TbQgMNKz5yCDCy5QBNujJu78Ja05+YyHZFAYGhgPXfjJ8+PoPFDYGTEyMDCYPXv8lxxwwuPnsDwcorTGxsTDyoEczOYDp4es/Fwzk2cg2gI2F8QeIZjJWYjtgoMBKliEC3EwMlmpsIK9dAMXaBn8TTgYFUdLDu8CTl+H2iz/nYenow8uPf+cvyBQiyRCQxcU+vH9VJViKGKDpiEGcn7lIW5b1MbGGgby0qVTk75vPf1eCUgFIDDnTCrz5/O/S1ce/ZROmv8PIsDAAyrhLcoT/MDIybJcSZPaDiaOXRwIvP/7tE+dnTtx45js4wV148Ass4aDFwRBkxvlXVZLlz4ev/4okBJinIWvEVbApvP38L/LT93/2vJxMoEzJ8OXHv6sKoiy7QdkMQzUDAwMAuq71NKWtMMgAAAAASUVORK5CYII=';},function(_0x186339,_0x17a7fa){_0x186339[a0_0x5a29('0x5a')]=a0_0x5a29('0x406');},function(_0x3f5119,_0x5b6a37,_0x5c1241){var _0x69e97b,_0x4d3e5c;!function(_0x23e0da,_0x30cd29,_0x4f3e2b){_0x3f5119['exports']?_0x3f5119['exports']=_0x4f3e2b():void 0x0===(_0x4d3e5c=a0_0x5a29('0x2ae')==typeof(_0x69e97b=_0x4f3e2b)?_0x69e97b['call'](_0x5b6a37,_0x5c1241,_0x5b6a37,_0x3f5119):_0x69e97b)||(_0x3f5119[a0_0x5a29('0x5a')]=_0x4d3e5c);}(0x0,0x0,function(){var _0x1abe3d={'defaultRadius':0x28,'defaultRenderer':a0_0x5a29('0x96d'),'defaultGradient':{0.25:a0_0x5a29('0x6f7'),0.55:a0_0x5a29('0x8cd'),0.85:a0_0x5a29('0x6d6'),0x1:a0_0x5a29('0x1d8')},'defaultMaxOpacity':0x1,'defaultMinOpacity':0x0,'defaultBlur':0.85,'defaultXField':'x','defaultYField':'y','defaultValueField':a0_0x5a29('0x363'),'plugins':{}},_0x4df476=function(){var _0xfff0d4=function(_0x2338a5){this[a0_0x5a29('0x5a9')]={},this[a0_0x5a29('0x67c')]=[],this[a0_0x5a29('0x467')]=[],this[a0_0x5a29('0x7d4')]=0xa,this[a0_0x5a29('0x43')]=0x1,this[a0_0x5a29('0x49')]=_0x2338a5[a0_0x5a29('0x131')]||_0x2338a5[a0_0x5a29('0x8af')],this[a0_0x5a29('0x1c1')]=_0x2338a5['yField']||_0x2338a5[a0_0x5a29('0x446')],this['_valueField']=_0x2338a5[a0_0x5a29('0x90f')]||_0x2338a5[a0_0x5a29('0x8e1')],_0x2338a5[a0_0x5a29('0x6e1')]&&(this[a0_0x5a29('0x414')]=_0x2338a5['radius']);},_0x2b515b=_0x1abe3d[a0_0x5a29('0xd9')];return _0xfff0d4[a0_0x5a29('0x928')]={'_organiseData':function(_0x5cd271,_0x2da8b3){var _0x433cf6=_0x5cd271[this[a0_0x5a29('0x49')]],_0x2e066c=_0x5cd271[this['_yField']],_0x52c0b9=this[a0_0x5a29('0x467')],_0x19c999=this[a0_0x5a29('0x67c')],_0x306fdd=this[a0_0x5a29('0x43')],_0x17b030=this[a0_0x5a29('0x7d4')],_0x1efd11=_0x5cd271[this['_valueField']]||0x1,_0x2bbf15=_0x5cd271['radius']||this[a0_0x5a29('0x414')]||_0x2b515b;_0x19c999[_0x433cf6]||(_0x19c999[_0x433cf6]=[],_0x52c0b9[_0x433cf6]=[]),_0x19c999[_0x433cf6][_0x2e066c]?_0x19c999[_0x433cf6][_0x2e066c]+=_0x1efd11:(_0x19c999[_0x433cf6][_0x2e066c]=_0x1efd11,_0x52c0b9[_0x433cf6][_0x2e066c]=_0x2bbf15);var _0x79ce30=_0x19c999[_0x433cf6][_0x2e066c];return _0x79ce30>_0x306fdd?(_0x2da8b3?this[a0_0x5a29('0x1d0')](_0x79ce30):this[a0_0x5a29('0x43')]=_0x79ce30,!0x1):_0x79ce30<_0x17b030?(_0x2da8b3?this[a0_0x5a29('0x902')](_0x79ce30):this[a0_0x5a29('0x7d4')]=_0x79ce30,!0x1):{'x':_0x433cf6,'y':_0x2e066c,'value':_0x1efd11,'radius':_0x2bbf15,'min':_0x17b030,'max':_0x306fdd};},'_unOrganizeData':function(){var _0x498c26=[],_0x58e7e9=this['_data'],_0x3d7b8c=this[a0_0x5a29('0x467')];for(var _0x572fff in _0x58e7e9)for(var _0x370869 in _0x58e7e9[_0x572fff])_0x498c26['push']({'x':_0x572fff,'y':_0x370869,'radius':_0x3d7b8c[_0x572fff][_0x370869],'value':_0x58e7e9[_0x572fff][_0x370869]});return{'min':this[a0_0x5a29('0x7d4')],'max':this['_max'],'data':_0x498c26};},'_onExtremaChange':function(){this[a0_0x5a29('0x5a9')][a0_0x5a29('0x155')]('extremachange',{'min':this[a0_0x5a29('0x7d4')],'max':this['_max']});},'addData':function(){if(arguments[0x0][a0_0x5a29('0x515')]>0x0)for(var _0x496a67=arguments[0x0],_0x4d2395=_0x496a67['length'];_0x4d2395--;)this[a0_0x5a29('0x41e')][a0_0x5a29('0x351')](this,_0x496a67[_0x4d2395]);else{var _0x53af16=this[a0_0x5a29('0x31e')](arguments[0x0],!0x0);_0x53af16&&(0x0===this[a0_0x5a29('0x67c')][a0_0x5a29('0x515')]&&(this['_min']=this[a0_0x5a29('0x43')]=_0x53af16[a0_0x5a29('0x363')]),this[a0_0x5a29('0x5a9')][a0_0x5a29('0x155')](a0_0x5a29('0x7b4'),{'min':this['_min'],'max':this['_max'],'data':[_0x53af16]}));}return this;},'setData':function(_0x22401f){var _0x288ac3=_0x22401f[a0_0x5a29('0x77d')],_0x3813f6=_0x288ac3[a0_0x5a29('0x515')];this[a0_0x5a29('0x67c')]=[],this[a0_0x5a29('0x467')]=[];for(var _0x4b7a21=0x0;_0x4b7a21<_0x3813f6;_0x4b7a21++)this['_organiseData'](_0x288ac3[_0x4b7a21],!0x1);return this[a0_0x5a29('0x43')]=_0x22401f[a0_0x5a29('0x670')],this[a0_0x5a29('0x7d4')]=_0x22401f[a0_0x5a29('0x5d5')]||0x0,this['_onExtremaChange'](),this['_coordinator'][a0_0x5a29('0x155')](a0_0x5a29('0x53d'),this[a0_0x5a29('0x7')]()),this;},'removeData':function(){},'setDataMax':function(_0x3d95dd){return this[a0_0x5a29('0x43')]=_0x3d95dd,this[a0_0x5a29('0x1e5')](),this[a0_0x5a29('0x5a9')]['emit'](a0_0x5a29('0x53d'),this['_getInternalData']()),this;},'setDataMin':function(_0x26154f){return this['_min']=_0x26154f,this[a0_0x5a29('0x1e5')](),this[a0_0x5a29('0x5a9')][a0_0x5a29('0x155')]('renderall',this[a0_0x5a29('0x7')]()),this;},'setCoordinator':function(_0x40e7e6){this[a0_0x5a29('0x5a9')]=_0x40e7e6;},'_getInternalData':function(){return{'max':this[a0_0x5a29('0x43')],'min':this['_min'],'data':this[a0_0x5a29('0x67c')],'radi':this['_radi']};},'getData':function(){return this[a0_0x5a29('0x65d')]();}},_0xfff0d4;}(),_0x21e24f=function(){var _0x29d2c6=function(_0x13f0e3){var _0x2f80f8=_0x13f0e3[a0_0x5a29('0x6f4')]||_0x13f0e3['defaultGradient'],_0x3278ed=document[a0_0x5a29('0x56f')](a0_0x5a29('0x662')),_0x713a20=_0x3278ed[a0_0x5a29('0x86f')]('2d');_0x3278ed[a0_0x5a29('0x96f')]=0x100,_0x3278ed[a0_0x5a29('0x6b7')]=0x1;var _0xc4df9e=_0x713a20[a0_0x5a29('0x94e')](0x0,0x0,0x100,0x1);for(var _0x2c63e7 in _0x2f80f8)_0xc4df9e['addColorStop'](_0x2c63e7,_0x2f80f8[_0x2c63e7]);return _0x713a20['fillStyle']=_0xc4df9e,_0x713a20[a0_0x5a29('0x80e')](0x0,0x0,0x100,0x1),_0x713a20[a0_0x5a29('0x5ba')](0x0,0x0,0x100,0x1)[a0_0x5a29('0x77d')];},_0x4ba864=function(_0x508bda,_0x3dfed7){var _0x3a4f18=document['createElement'](a0_0x5a29('0x662')),_0x4f2394=_0x3a4f18[a0_0x5a29('0x86f')]('2d'),_0x47853b=_0x508bda,_0x5ca334=_0x508bda;if(_0x3a4f18[a0_0x5a29('0x96f')]=_0x3a4f18['height']=0x2*_0x508bda,0x1==_0x3dfed7)_0x4f2394[a0_0x5a29('0x520')](),_0x4f2394[a0_0x5a29('0x5c8')](_0x47853b,_0x5ca334,_0x508bda,0x0,0x2*Math['PI'],!0x1),_0x4f2394['fillStyle']=a0_0x5a29('0x6f9'),_0x4f2394[a0_0x5a29('0x10b')]();else{var _0x10c990=_0x4f2394[a0_0x5a29('0x7e0')](_0x47853b,_0x5ca334,_0x508bda*_0x3dfed7,_0x47853b,_0x5ca334,_0x508bda);_0x10c990[a0_0x5a29('0x2bc')](0x0,a0_0x5a29('0x6f9')),_0x10c990[a0_0x5a29('0x2bc')](0x1,'rgba(0,0,0,0)'),_0x4f2394[a0_0x5a29('0x896')]=_0x10c990,_0x4f2394[a0_0x5a29('0x80e')](0x0,0x0,0x2*_0x508bda,0x2*_0x508bda);}return _0x3a4f18;};function _0xb435b7(_0x3d3673){var _0x286681=_0x3d3673[a0_0x5a29('0x6d2')],_0x3a469c=this[a0_0x5a29('0x5bd')]=document[a0_0x5a29('0x56f')](a0_0x5a29('0x662')),_0x319116=this[a0_0x5a29('0x662')]=_0x3d3673[a0_0x5a29('0x662')]||document[a0_0x5a29('0x56f')](a0_0x5a29('0x662')),_0x49d3a6=(this[a0_0x5a29('0xba')]=[0x2710,0x2710,0x0,0x0],getComputedStyle(_0x3d3673[a0_0x5a29('0x6d2')])||{});_0x319116[a0_0x5a29('0x38b')]=a0_0x5a29('0x72e'),this['_width']=_0x319116[a0_0x5a29('0x96f')]=_0x3a469c[a0_0x5a29('0x96f')]=_0x3d3673[a0_0x5a29('0x96f')]||+_0x49d3a6[a0_0x5a29('0x96f')][a0_0x5a29('0x380')](/px/,''),this[a0_0x5a29('0x5db')]=_0x319116[a0_0x5a29('0x6b7')]=_0x3a469c['height']=_0x3d3673[a0_0x5a29('0x6b7')]||+_0x49d3a6[a0_0x5a29('0x6b7')][a0_0x5a29('0x380')](/px/,''),this['shadowCtx']=_0x3a469c[a0_0x5a29('0x86f')]('2d'),this[a0_0x5a29('0x357')]=_0x319116['getContext']('2d'),_0x319116[a0_0x5a29('0x46a')]['cssText']=_0x3a469c[a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x694'),_0x286681[a0_0x5a29('0x46a')][a0_0x5a29('0x53c')]=a0_0x5a29('0x1e2'),_0x286681[a0_0x5a29('0x365')](_0x319116),this[a0_0x5a29('0x3b7')]=_0x29d2c6(_0x3d3673),this[a0_0x5a29('0x127')]={},this['_setStyles'](_0x3d3673);}return _0xb435b7[a0_0x5a29('0x928')]={'renderPartial':function(_0x5ab707){_0x5ab707[a0_0x5a29('0x77d')][a0_0x5a29('0x515')]>0x0&&(this[a0_0x5a29('0x203')](_0x5ab707),this[a0_0x5a29('0x320')]());},'renderAll':function(_0x1fc3e0){this['_clear'](),_0x1fc3e0['data'][a0_0x5a29('0x515')]>0x0&&(this[a0_0x5a29('0x203')](function(_0x4b706f){for(var _0x4a8d93=[],_0x210fa8=_0x4b706f[a0_0x5a29('0x5d5')],_0x31cf4a=_0x4b706f['max'],_0x2c5181=_0x4b706f[a0_0x5a29('0x161')],_0x207f49=(_0x4b706f=_0x4b706f[a0_0x5a29('0x77d')],Object[a0_0x5a29('0x148')](_0x4b706f)),_0x2ad460=_0x207f49['length'];_0x2ad460--;)for(var _0x1eaabb=_0x207f49[_0x2ad460],_0x345b8f=Object[a0_0x5a29('0x148')](_0x4b706f[_0x1eaabb]),_0x1de690=_0x345b8f['length'];_0x1de690--;){var _0x1fdddb=_0x345b8f[_0x1de690],_0x2af263=_0x4b706f[_0x1eaabb][_0x1fdddb],_0x38884f=_0x2c5181[_0x1eaabb][_0x1fdddb];_0x4a8d93[a0_0x5a29('0x3cd')]({'x':_0x1eaabb,'y':_0x1fdddb,'value':_0x2af263,'radius':_0x38884f});}return{'min':_0x210fa8,'max':_0x31cf4a,'data':_0x4a8d93};}(_0x1fc3e0)),this['_colorize']());},'_updateGradient':function(_0x42709e){this[a0_0x5a29('0x3b7')]=_0x29d2c6(_0x42709e);},'updateConfig':function(_0x2451c4){_0x2451c4[a0_0x5a29('0x6f4')]&&this[a0_0x5a29('0x752')](_0x2451c4),this['_setStyles'](_0x2451c4);},'setDimensions':function(_0x230a1a,_0x420599){this[a0_0x5a29('0x913')]=_0x230a1a,this[a0_0x5a29('0x5db')]=_0x420599,this['canvas'][a0_0x5a29('0x96f')]=this['shadowCanvas'][a0_0x5a29('0x96f')]=_0x230a1a,this[a0_0x5a29('0x662')][a0_0x5a29('0x6b7')]=this[a0_0x5a29('0x5bd')][a0_0x5a29('0x6b7')]=_0x420599;},'_clear':function(){this[a0_0x5a29('0x3c9')]['clearRect'](0x0,0x0,this[a0_0x5a29('0x913')],this[a0_0x5a29('0x5db')]),this['ctx'][a0_0x5a29('0x2f5')](0x0,0x0,this[a0_0x5a29('0x913')],this[a0_0x5a29('0x5db')]);},'_setStyles':function(_0x4c520b){this[a0_0x5a29('0x1b5')]=0x0==_0x4c520b['blur']?0x0:_0x4c520b[a0_0x5a29('0x50b')]||_0x4c520b['defaultBlur'],_0x4c520b['backgroundColor']&&(this[a0_0x5a29('0x662')][a0_0x5a29('0x46a')][a0_0x5a29('0x2f9')]=_0x4c520b['backgroundColor']),this['_width']=this[a0_0x5a29('0x662')][a0_0x5a29('0x96f')]=this[a0_0x5a29('0x5bd')]['width']=_0x4c520b[a0_0x5a29('0x96f')]||this[a0_0x5a29('0x913')],this[a0_0x5a29('0x5db')]=this['canvas'][a0_0x5a29('0x6b7')]=this[a0_0x5a29('0x5bd')][a0_0x5a29('0x6b7')]=_0x4c520b[a0_0x5a29('0x6b7')]||this[a0_0x5a29('0x5db')],this[a0_0x5a29('0x3ff')]=0xff*(_0x4c520b[a0_0x5a29('0x538')]||0x0),this[a0_0x5a29('0x53a')]=0xff*(_0x4c520b[a0_0x5a29('0x266')]||_0x4c520b[a0_0x5a29('0x141')]),this[a0_0x5a29('0x681')]=0xff*(_0x4c520b[a0_0x5a29('0x96a')]||_0x4c520b[a0_0x5a29('0x6af')]),this[a0_0x5a29('0x10d')]=!!_0x4c520b[a0_0x5a29('0x647')];},'_drawAlpha':function(_0x36a600){for(var _0x4d2adb=this[a0_0x5a29('0x7d4')]=_0x36a600['min'],_0x12b5a=this[a0_0x5a29('0x43')]=_0x36a600[a0_0x5a29('0x670')],_0x12053d=(_0x36a600=_0x36a600['data']||[])['length'],_0x5ef48c=0x1-this[a0_0x5a29('0x1b5')];_0x12053d--;){var _0x1c48f7,_0xc084aa=_0x36a600[_0x12053d],_0x317514=_0xc084aa['x'],_0x1697de=_0xc084aa['y'],_0x575a5d=_0xc084aa[a0_0x5a29('0x6e1')],_0x36006b=Math['min'](_0xc084aa[a0_0x5a29('0x363')],_0x12b5a),_0x2478f2=_0x317514-_0x575a5d,_0x56b680=_0x1697de-_0x575a5d,_0x1d50f2=this[a0_0x5a29('0x3c9')];this[a0_0x5a29('0x127')][_0x575a5d]?_0x1c48f7=this[a0_0x5a29('0x127')][_0x575a5d]:this[a0_0x5a29('0x127')][_0x575a5d]=_0x1c48f7=_0x4ba864(_0x575a5d,_0x5ef48c);var _0x1cb56e=(_0x36006b-_0x4d2adb)/(_0x12b5a-_0x4d2adb);_0x1d50f2[a0_0x5a29('0x8a3')]=_0x1cb56e<0.01?0.01:_0x1cb56e,_0x1d50f2[a0_0x5a29('0x774')](_0x1c48f7,_0x2478f2,_0x56b680),_0x2478f2<this['_renderBoundaries'][0x0]&&(this[a0_0x5a29('0xba')][0x0]=_0x2478f2),_0x56b680<this[a0_0x5a29('0xba')][0x1]&&(this[a0_0x5a29('0xba')][0x1]=_0x56b680),_0x2478f2+0x2*_0x575a5d>this['_renderBoundaries'][0x2]&&(this[a0_0x5a29('0xba')][0x2]=_0x2478f2+0x2*_0x575a5d),_0x56b680+0x2*_0x575a5d>this[a0_0x5a29('0xba')][0x3]&&(this['_renderBoundaries'][0x3]=_0x56b680+0x2*_0x575a5d);}},'_colorize':function(){var _0x27fbd1=this['_renderBoundaries'][0x0],_0x4bd86c=this['_renderBoundaries'][0x1],_0x1cc5e7=this[a0_0x5a29('0xba')][0x2]-_0x27fbd1,_0x38dbfe=this[a0_0x5a29('0xba')][0x3]-_0x4bd86c,_0x2cc70e=this[a0_0x5a29('0x913')],_0x1ca64f=this[a0_0x5a29('0x5db')],_0x35bb09=this[a0_0x5a29('0x3ff')],_0x312a9e=this['_maxOpacity'],_0x5d854f=this[a0_0x5a29('0x681')],_0x5489df=this[a0_0x5a29('0x10d')];_0x27fbd1<0x0&&(_0x27fbd1=0x0),_0x4bd86c<0x0&&(_0x4bd86c=0x0),_0x27fbd1+_0x1cc5e7>_0x2cc70e&&(_0x1cc5e7=_0x2cc70e-_0x27fbd1),_0x4bd86c+_0x38dbfe>_0x1ca64f&&(_0x38dbfe=_0x1ca64f-_0x4bd86c);for(var _0x4d0ddd=this[a0_0x5a29('0x3c9')][a0_0x5a29('0x5ba')](_0x27fbd1,_0x4bd86c,_0x1cc5e7,_0x38dbfe),_0xac509e=_0x4d0ddd[a0_0x5a29('0x77d')],_0x374568=_0xac509e['length'],_0x404874=this['_palette'],_0x5a7351=0x3;_0x5a7351<_0x374568;_0x5a7351+=0x4){var _0x3852b5,_0x1eb458=_0xac509e[_0x5a7351],_0x4e46ab=0x4*_0x1eb458;if(_0x4e46ab)_0x3852b5=_0x35bb09>0x0?_0x35bb09:_0x1eb458<_0x312a9e?_0x1eb458<_0x5d854f?_0x5d854f:_0x1eb458:_0x312a9e,_0xac509e[_0x5a7351-0x3]=_0x404874[_0x4e46ab],_0xac509e[_0x5a7351-0x2]=_0x404874[_0x4e46ab+0x1],_0xac509e[_0x5a7351-0x1]=_0x404874[_0x4e46ab+0x2],_0xac509e[_0x5a7351]=_0x5489df?_0x404874[_0x4e46ab+0x3]:_0x3852b5;}_0x4d0ddd[a0_0x5a29('0x77d')]=_0xac509e,this[a0_0x5a29('0x357')][a0_0x5a29('0x5a4')](_0x4d0ddd,_0x27fbd1,_0x4bd86c),this[a0_0x5a29('0xba')]=[0x3e8,0x3e8,0x0,0x0];},'getValueAt':function(_0x78da90){var _0x3570f8=this[a0_0x5a29('0x3c9')][a0_0x5a29('0x5ba')](_0x78da90['x'],_0x78da90['y'],0x1,0x1)['data'][0x3],_0x1f4bda=this['_max'],_0x4b8f2a=this[a0_0x5a29('0x7d4')];return Math[a0_0x5a29('0x1d2')](_0x1f4bda-_0x4b8f2a)*(_0x3570f8/0xff)>>0x0;},'getDataURL':function(){return this[a0_0x5a29('0x662')][a0_0x5a29('0x46d')]();}},_0xb435b7;}(),_0x1a823c=function(){var _0x49f922=!0x1;return a0_0x5a29('0x96d')===_0x1abe3d[a0_0x5a29('0x8cf')]&&(_0x49f922=_0x21e24f),_0x49f922;}(),_0x586284=function(){for(var _0x7a8c2c={},_0x6bbd88=arguments['length'],_0x7218cc=0x0;_0x7218cc<_0x6bbd88;_0x7218cc++){var _0x32c6cc=arguments[_0x7218cc];for(var _0x886b3c in _0x32c6cc)_0x7a8c2c[_0x886b3c]=_0x32c6cc[_0x886b3c];}return _0x7a8c2c;},_0x1bebd1=function(){var _0x6a9c92=function(){function _0x1b1ee9(){this[a0_0x5a29('0x4a0')]={};}return _0x1b1ee9[a0_0x5a29('0x928')]={'on':function(_0x10c03f,_0xeace57,_0x5485cc){var _0x3dd066=this[a0_0x5a29('0x4a0')];_0x3dd066[_0x10c03f]||(_0x3dd066[_0x10c03f]=[]),_0x3dd066[_0x10c03f][a0_0x5a29('0x3cd')](function(_0x357122){return _0xeace57['call'](_0x5485cc,_0x357122);});},'emit':function(_0x3e4994,_0x593d6b){var _0x255454=this['cStore'];if(_0x255454[_0x3e4994])for(var _0x20c47d=_0x255454[_0x3e4994]['length'],_0x52a5f1=0x0;_0x52a5f1<_0x20c47d;_0x52a5f1++){(0x0,_0x255454[_0x3e4994][_0x52a5f1])(_0x593d6b);}}},_0x1b1ee9;}(),_0x3b4d32=function(_0xf49743){var _0x455bf5=_0xf49743[a0_0x5a29('0x29d')],_0x3da105=_0xf49743['_coordinator'],_0x5d8b9a=_0xf49743[a0_0x5a29('0x961')];_0x3da105['on'](a0_0x5a29('0x7b4'),_0x455bf5[a0_0x5a29('0x81e')],_0x455bf5),_0x3da105['on'](a0_0x5a29('0x53d'),_0x455bf5['renderAll'],_0x455bf5),_0x3da105['on'](a0_0x5a29('0x2e3'),function(_0x4f291c){_0xf49743[a0_0x5a29('0x8e3')]['onExtremaChange']&&_0xf49743[a0_0x5a29('0x8e3')]['onExtremaChange']({'min':_0x4f291c[a0_0x5a29('0x5d5')],'max':_0x4f291c[a0_0x5a29('0x670')],'gradient':_0xf49743['_config'][a0_0x5a29('0x6f4')]||_0xf49743['_config'][a0_0x5a29('0x45d')]});}),_0x5d8b9a[a0_0x5a29('0x8d8')](_0x3da105);};function _0x11691d(){var _0x54799b=this[a0_0x5a29('0x8e3')]=_0x586284(_0x1abe3d,arguments[0x0]||{});if(this[a0_0x5a29('0x5a9')]=new _0x6a9c92(),_0x54799b[a0_0x5a29('0x912')]){var _0x1a63a0=_0x54799b[a0_0x5a29('0x912')];if(!_0x1abe3d[a0_0x5a29('0x6a7')][_0x1a63a0])throw new Error(a0_0x5a29('0x8ce')+_0x1a63a0+a0_0x5a29('0x72c'));var _0x2701e1=_0x1abe3d['plugins'][_0x1a63a0];this['_renderer']=new _0x2701e1[(a0_0x5a29('0x403'))](_0x54799b),this[a0_0x5a29('0x961')]=new _0x2701e1[(a0_0x5a29('0x5f6'))](_0x54799b);}else this[a0_0x5a29('0x29d')]=new _0x1a823c(_0x54799b),this['_store']=new _0x4df476(_0x54799b);_0x3b4d32(this);}return _0x11691d['prototype']={'addData':function(){return this[a0_0x5a29('0x961')][a0_0x5a29('0x41e')][a0_0x5a29('0x758')](this[a0_0x5a29('0x961')],arguments),this;},'removeData':function(){return this[a0_0x5a29('0x961')][a0_0x5a29('0x8d3')]&&this[a0_0x5a29('0x961')][a0_0x5a29('0x8d3')][a0_0x5a29('0x758')](this[a0_0x5a29('0x961')],arguments),this;},'setData':function(){return this['_store'][a0_0x5a29('0x8b6')][a0_0x5a29('0x758')](this['_store'],arguments),this;},'setDataMax':function(){return this['_store'][a0_0x5a29('0x1d0')][a0_0x5a29('0x758')](this[a0_0x5a29('0x961')],arguments),this;},'setDataMin':function(){return this['_store'][a0_0x5a29('0x902')][a0_0x5a29('0x758')](this[a0_0x5a29('0x961')],arguments),this;},'configure':function(_0x280d0f){return this['_config']=_0x586284(this[a0_0x5a29('0x8e3')],_0x280d0f),this['_renderer'][a0_0x5a29('0x616')](this[a0_0x5a29('0x8e3')]),this[a0_0x5a29('0x5a9')][a0_0x5a29('0x155')]('renderall',this[a0_0x5a29('0x961')][a0_0x5a29('0x7')]()),this;},'repaint':function(){return this[a0_0x5a29('0x5a9')]['emit']('renderall',this[a0_0x5a29('0x961')][a0_0x5a29('0x7')]()),this;},'getData':function(){return this[a0_0x5a29('0x961')][a0_0x5a29('0x15a')]();},'getDataURL':function(){return this[a0_0x5a29('0x29d')]['getDataURL']();},'getValueAt':function(_0xd7dac5){return this[a0_0x5a29('0x961')][a0_0x5a29('0x4cd')]?this[a0_0x5a29('0x961')]['getValueAt'](_0xd7dac5):this[a0_0x5a29('0x29d')][a0_0x5a29('0x4cd')]?this[a0_0x5a29('0x29d')][a0_0x5a29('0x4cd')](_0xd7dac5):null;}},_0x11691d;}();return{'create':function(_0x3cb29d){return new _0x1bebd1(_0x3cb29d);},'register':function(_0x56a1f3,_0x412fba){_0x1abe3d['plugins'][_0x56a1f3]=_0x412fba;}};});},function(_0x1bcd8e,_0x1c040b){_0x1bcd8e[a0_0x5a29('0x5a')]=a0_0x5a29('0x6fd');},function(_0x5e0dee,_0x3d29f4){_0x5e0dee[a0_0x5a29('0x5a')]=a0_0x5a29('0x135');},function(_0x49f890,_0x50e135){_0x49f890[a0_0x5a29('0x5a')]=a0_0x5a29('0x2d9');},function(_0x23b11c,_0x2717d4){_0x23b11c[a0_0x5a29('0x5a')]=a0_0x5a29('0x532');},function(_0x3b9eb6,_0x546151){_0x3b9eb6['exports']=a0_0x5a29('0x700');},function(_0x12e981,_0x1a1ed3){_0x12e981[a0_0x5a29('0x5a')]=a0_0x5a29('0xed');},function(_0x53a725,_0x39c989){_0x53a725['exports']='uniform\x20vec4\x20cementColor;\x0d\x0auniform\x20float\x20grainScale;\x0d\x0auniform\x20float\x20roughness;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20float\x20noise\x20=\x20czm_snoise(materialInput.st\x20/\x20grainScale);\x0d\x0a\x20\x20noise\x20=\x20pow(noise,\x205.0)\x20*\x20roughness;\x0d\x0a\x0d\x0a\x20\x20vec4\x20color\x20=\x20cementColor;\x0d\x0a\x20\x20color.rgb\x20+=\x20noise;\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0d\x0a\x20\x20material.alpha\x20=\x20color.a;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a';},function(_0x53ce4b,_0xf9bb42){_0x53ce4b[a0_0x5a29('0x5a')]=a0_0x5a29('0x4aa');},function(_0x13688e,_0x5726b0){_0x13688e[a0_0x5a29('0x5a')]=a0_0x5a29('0x21e');},function(_0x2c3dcb,_0x4902bb){_0x2c3dcb[a0_0x5a29('0x5a')]='czm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec3\x20normalWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20material.normal);\x0d\x0a\x20\x20vec3\x20positionWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20materialInput.positionToEyeEC);\x0d\x0a\x20\x20float\x20cosAngIncidence\x20=\x20max(dot(normalWC,\x20positionWC),\x200.0);\x0d\x0a\x0d\x0a\x20\x20material.diffuse\x20=\x20mix(reflection.diffuse,\x20refraction.diffuse,\x20cosAngIncidence);\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a';},function(_0x2fba04,_0x52b1ab){_0x2fba04[a0_0x5a29('0x5a')]=a0_0x5a29('0x493');},function(_0x155e9b,_0x3790b9){_0x155e9b[a0_0x5a29('0x5a')]=a0_0x5a29('0x6a1');},function(_0x54e988,_0x4c67ab){_0x54e988[a0_0x5a29('0x5a')]='uniform\x20samplerCube\x20cubeMap;\x0d\x0auniform\x20float\x20indexOfRefractionRatio;\x0d\x0a\x0d\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0d\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0d\x0a\x0d\x0a\x20\x20vec3\x20normalWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20material.normal);\x0d\x0a\x20\x20vec3\x20positionWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20materialInput.positionToEyeEC);\x0d\x0a\x20\x20vec3\x20refractedWC\x20=\x20refract(positionWC,\x20-normalWC,\x20indexOfRefractionRatio);\x0d\x0a\x20\x20material.diffuse\x20=\x20textureCube(cubeMap,\x20refractedWC).channels;\x0d\x0a\x0d\x0a\x20\x20return\x20material;\x0d\x0a}\x0d\x0a';},function(_0x31da9a,_0x5351f0){_0x31da9a['exports']=a0_0x5a29('0x943');},function(_0x323a4a,_0x182de9){_0x323a4a['exports']=a0_0x5a29('0x838');},function(_0x284679,_0x4d1790){_0x284679['exports']=a0_0x5a29('0x367');},function(_0x4960e0,_0x2f0422){_0x4960e0[a0_0x5a29('0x5a')]=a0_0x5a29('0x933');},function(_0x31ace0,_0x11628a){_0x31ace0[a0_0x5a29('0x5a')]=a0_0x5a29('0x6a5');},function(_0x3bbcfd,_0x32a838){_0x3bbcfd[a0_0x5a29('0x5a')]='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAAgCAYAAABkS8DlAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAADSSURBVHja7NYxEoUgDEDBYM39z2qHtZViwMFxt1FJnF/98ZXWWkRE7LWWOOt5Lsm9q/vsbu9Zdtazs/J19O5bs1XPZrwze/6V31zxbOZs1n905Wt2p3f25GzE7ohv6q3nLQCA3xEAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAA8g4AAAD//wMA4WEFTJOT5UIAAAAASUVORK5CYII=';},function(_0x3dcb75,_0x293529){_0x3dcb75[a0_0x5a29('0x5a')]=a0_0x5a29('0x4ef');},function(_0x31926d,_0x43c8b0){_0x31926d[a0_0x5a29('0x5a')]=a0_0x5a29('0x3f7');},function(_0x1b09eb,_0x57bf01){_0x1b09eb['exports']=a0_0x5a29('0x7fd');},function(_0x3a3602,_0x5b7246){_0x3a3602[a0_0x5a29('0x5a')]=a0_0x5a29('0x1fe');},function(_0x2f3f48,_0x50433c){_0x2f3f48[a0_0x5a29('0x5a')]=a0_0x5a29('0x7ed');},function(_0x5886c6,_0x1cff3e){_0x5886c6['exports']='uniform\x20sampler2D\x20colorTexture;\x0d\x0avarying\x20vec2\x20v_textureCoordinates;\x0d\x0auniform\x20float\x20speed;\x0d\x0a\x0d\x0afloat\x20snow(vec2\x20uv,float\x20scale){\x0d\x0a\x20\x20float\x20time\x20=\x20czm_frameNumber\x20*\x20speed\x20/\x201000.0\x20;\x0d\x0a\x20\x20float\x20w=smoothstep(1.,0.,-uv.y*(scale/10.));\x0d\x0a\x20\x20if(w<.1)return\x200.;\x0d\x0a\x20\x20uv+=time/scale;\x0d\x0a\x20\x20uv.y+=time*2./scale;\x0d\x0a\x20\x20uv.x+=sin(uv.y+time*.5)/scale;\x0d\x0a\x20\x20uv*=scale;\x0d\x0a\x20\x20vec2\x20s=floor(uv),f=fract(uv),p;\x0d\x0a\x20\x20float\x20k=3.,d;\x0d\x0a\x20\x20p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;\x0d\x0a\x20\x20d=length(p);\x0d\x0a\x20\x20k=min(d,k);\x0d\x0a\x20\x20k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\x0d\x0a\x20\x20return\x20k*w;\x0d\x0a}\x0d\x0a\x0d\x0avoid\x20main(){\x0d\x0a\x20\x20vec2\x20resolution\x20=\x20czm_viewport.zw;\x0d\x0a\x20\x20vec2\x20uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\x0d\x0a\x20\x20vec3\x20finalColor=vec3(0);\x0d\x0a\x20\x20float\x20c\x20=\x200.0;\x0d\x0a\x20\x20c+=snow(uv,10.);\x0d\x0a\x20\x20c+=snow(uv,8.);\x0d\x0a\x20\x20c+=snow(uv,6.);\x0d\x0a\x20\x20c+=snow(uv,5.);\x0d\x0a\x20\x20finalColor=(vec3(c));\x0d\x0a\x20\x20gl_FragColor\x20=\x20mix(texture2D(colorTexture,\x20v_textureCoordinates),\x20vec4(finalColor,1),\x200.3);\x0d\x0a}\x0d\x0a';},function(_0x4afcd6,_0x1761ae,_0x5792f){'use strict';_0x5792f['r'](_0x1761ae);var _0x13b092=_0x5792f(0x0),_0x1ee296=_0x5792f['n'](_0x13b092),_0x4a7b57=_0x5792f(0x1),_0x1fafe8=_0x5792f['n'](_0x4a7b57),_0x41d742=_0x5792f(0xf),_0x44fe1a=_0x5792f(0x4),_0x5a1389=_0x5792f['n'](_0x44fe1a),_0x4456e6=_0x5792f(0x5),_0x1fe488=_0x5792f['n'](_0x4456e6),_0x42bc56=_0x5792f(0x2),_0x3c6509=_0x5792f['n'](_0x42bc56);function _0x47d884(_0x3b2087){var _0x9c4aa5=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x452e4f){return!0x1;}}();return function(){var _0x48c970,_0x6dc971=_0x3c6509()(_0x3b2087);if(_0x9c4aa5){var _0x32197a=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x48c970=Reflect[a0_0x5a29('0x138')](_0x6dc971,arguments,_0x32197a);}else _0x48c970=_0x6dc971[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x48c970);};}var _0x382a76=DC['Namespace'][a0_0x5a29('0x6e8')],_0x53c0ea=a0_0x5a29('0x4b8'),_0x5e5a8d=a0_0x5a29('0x1bb'),_0x1465b1=function(_0x45779a){_0x5a1389()(_0x4284c6,_0x45779a);var _0x464f04=_0x47d884(_0x4284c6);function _0x4284c6(){var _0x2aad4f=arguments[a0_0x5a29('0x515')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return _0x1ee296()(this,_0x4284c6),_0x2aad4f[a0_0x5a29('0x498')]=a0_0x5a29('0x1aa')===_0x2aad4f[a0_0x5a29('0x46a')]?_0x53c0ea:_0x5e5a8d,_0x2aad4f[a0_0x5a29('0x364')]=_0x2aad4f[a0_0x5a29('0x364')]||['01','02','03','04'],_0x464f04[a0_0x5a29('0x351')](this,_0x2aad4f);}return _0x4284c6;}(_0x382a76[a0_0x5a29('0x44c')]);_0x41d742['a'][a0_0x5a29('0x19c')]='amap';var _0x3354b2=_0x1465b1,_0x42a1ca=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0xa20c25='http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020',_0x520cfc=a0_0x5a29('0x5f0'),_0x1098c0='http://its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2',_0x4ea0d5=function(){function _0x56c430(){var _0x5840e5=arguments[a0_0x5a29('0x515')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};_0x1ee296()(this,_0x56c430),this[a0_0x5a29('0x979')]='img'===_0x5840e5[a0_0x5a29('0x46a')]?'http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46':a0_0x5a29('0x71f')===_0x5840e5['style']?_0xa20c25:a0_0x5a29('0x227')===_0x5840e5[a0_0x5a29('0x46a')]?_0x1098c0:_0x520cfc,this[a0_0x5a29('0x3e6')]=_0x5840e5[a0_0x5a29('0x766')]||'web2D',this['_tileWidth']=0x100,this['_tileHeight']=0x100,this['_maximumLevel']=0x12,this[a0_0x5a29('0x660')]=new _0x42a1ca[(a0_0x5a29('0x8c5'))]({'rectangleSouthwestInMeters':new _0x42a1ca[(a0_0x5a29('0x11b'))](-0x1fffe86,-0x202ef88),'rectangleNortheastInMeters':new _0x42a1ca[(a0_0x5a29('0x11b'))](0x1fffe86,0x202ef88)}),this[a0_0x5a29('0x861')]=this[a0_0x5a29('0x660')][a0_0x5a29('0x4b0')],this[a0_0x5a29('0x546')]=void 0x0,this[a0_0x5a29('0xf4')]=void 0x0,this[a0_0x5a29('0x3e9')]=_0x5840e5[a0_0x5a29('0x46a')]||a0_0x5a29('0x424');}return _0x1fafe8()(_0x56c430,[{'key':a0_0x5a29('0x505'),'value':function(_0x3a22ea,_0xa89ef8,_0x4baaa9){}},{'key':a0_0x5a29('0x466'),'value':function(_0x117f8e,_0x344c07,_0x44462c){if(!this[a0_0x5a29('0x3d')])throw new _0x42a1ca['DeveloperError']('requestImage\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.');var _0x561713=this[a0_0x5a29('0x660')][a0_0x5a29('0x2a9')](_0x44462c),_0x9eabf7=this[a0_0x5a29('0x660')]['getNumberOfYTilesAtLevel'](_0x44462c),_0x209c08=this[a0_0x5a29('0x979')]['replace'](a0_0x5a29('0x3f1'),String(_0x117f8e-_0x561713/0x2))[a0_0x5a29('0x380')](a0_0x5a29('0x77e'),String(_0x9eabf7/0x2-_0x344c07-0x1))[a0_0x5a29('0x380')](a0_0x5a29('0x7d0'),_0x44462c)['replace']('{s}',String(0x1))['replace'](a0_0x5a29('0x450'),this[a0_0x5a29('0x3e9')])[a0_0x5a29('0x380')](a0_0x5a29('0x82f'),this[a0_0x5a29('0x3e6')])[a0_0x5a29('0x380')](a0_0x5a29('0x83'),String(new Date()['getTime']()));return _0x42a1ca[a0_0x5a29('0x3c3')][a0_0x5a29('0x6aa')](this,_0x209c08);}},{'key':a0_0x5a29('0x498'),'get':function(){return this[a0_0x5a29('0x979')];}},{'key':a0_0x5a29('0x7b'),'get':function(){return this[a0_0x5a29('0xf4')];}},{'key':a0_0x5a29('0x805'),'get':function(){if(!this[a0_0x5a29('0x3d')])throw new _0x42a1ca['DeveloperError'](a0_0x5a29('0x93b'));return this[a0_0x5a29('0x497')];}},{'key':a0_0x5a29('0x38a'),'get':function(){if(!this[a0_0x5a29('0x3d')])throw new _0x42a1ca[(a0_0x5a29('0x4a8'))](a0_0x5a29('0x8f8'));return this['_tileHeight'];}},{'key':a0_0x5a29('0x85d'),'get':function(){if(!this[a0_0x5a29('0x3d')])throw new _0x42a1ca[(a0_0x5a29('0x4a8'))](a0_0x5a29('0x70c'));return this['_maximumLevel'];}},{'key':a0_0x5a29('0x160'),'get':function(){if(!this[a0_0x5a29('0x3d')])throw new _0x42a1ca['DeveloperError'](a0_0x5a29('0x197'));return 0x0;}},{'key':a0_0x5a29('0x978'),'get':function(){if(!this[a0_0x5a29('0x3d')])throw new _0x42a1ca[(a0_0x5a29('0x4a8'))](a0_0x5a29('0x684'));return this[a0_0x5a29('0x660')];}},{'key':a0_0x5a29('0x4b0'),'get':function(){if(!this[a0_0x5a29('0x3d')])throw new _0x42a1ca[(a0_0x5a29('0x4a8'))](a0_0x5a29('0x89a'));return this[a0_0x5a29('0x861')];}},{'key':a0_0x5a29('0x3d'),'get':function(){return!!this[a0_0x5a29('0x979')];}},{'key':a0_0x5a29('0x35b'),'get':function(){return this[a0_0x5a29('0x546')];}},{'key':'hasAlphaChannel','get':function(){return!0x0;}}]),_0x56c430;}();_0x41d742['a'][a0_0x5a29('0x5fd')]=a0_0x5a29('0x76d');var _0x548c92=_0x4ea0d5;function _0xda566(_0x525b87){var _0x3aeec2=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x4b6fc6){return!0x1;}}();return function(){var _0x31d4bd,_0x106a30=_0x3c6509()(_0x525b87);if(_0x3aeec2){var _0x2b5d0e=_0x3c6509()(this)['constructor'];_0x31d4bd=Reflect[a0_0x5a29('0x138')](_0x106a30,arguments,_0x2b5d0e);}else _0x31d4bd=_0x106a30[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x31d4bd);};}var _0x5eaab5=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x429481=a0_0x5a29('0x844'),_0x52a069=a0_0x5a29('0x722'),_0x2622cc=function(_0x5b3cd5){_0x5a1389()(_0x3d7bb2,_0x5b3cd5);var _0x91df33=_0xda566(_0x3d7bb2);function _0x3d7bb2(){var _0x3419cd=arguments[a0_0x5a29('0x515')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return _0x1ee296()(this,_0x3d7bb2),_0x3419cd[a0_0x5a29('0x498')]=a0_0x5a29('0x1aa')===_0x3419cd[a0_0x5a29('0x46a')]?a0_0x5a29('0x88e'):'ter'===_0x3419cd['style']?_0x52a069:_0x429481,_0x3419cd[a0_0x5a29('0x364')]=_0x3419cd['subdomains']||['1','2','3'],_0x91df33['call'](this,_0x3419cd);}return _0x3d7bb2;}(_0x5eaab5[a0_0x5a29('0x44c')]);_0x41d742['a']['GOOGLE']=a0_0x5a29('0x90');var _0x42d6cf=_0x2622cc,_0x51eaf9=_0x5792f(0x17),_0x2ad70f=_0x5792f['n'](_0x51eaf9);function _0x54c99d(_0x1b0772){var _0x23ce7e=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x1ca5e1){return!0x1;}}();return function(){var _0x3b07ac,_0x35b782=_0x3c6509()(_0x1b0772);if(_0x23ce7e){var _0x3355bd=_0x3c6509()(this)['constructor'];_0x3b07ac=Reflect['construct'](_0x35b782,arguments,_0x3355bd);}else _0x3b07ac=_0x35b782['apply'](this,arguments);return _0x1fe488()(this,_0x3b07ac);};}var _0x48cf5d=DC['Namespace'][a0_0x5a29('0x6e8')],_0x42d594=a0_0x5a29('0x15'),_0x5207bb=function(_0x49180a){_0x5a1389()(_0x1407b4,_0x49180a);var _0x5864bb=_0x54c99d(_0x1407b4);function _0x1407b4(){var _0x3be5fc=arguments[a0_0x5a29('0x515')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};return _0x1ee296()(this,_0x1407b4),_0x5864bb['call'](this,{'url':_0x42d594[a0_0x5a29('0x380')](/\{layer\}/g,_0x3be5fc[a0_0x5a29('0x46a')]||a0_0x5a29('0x71f'))[a0_0x5a29('0x380')](/\{key\}/g,_0x3be5fc['key']||''),'style':a0_0x5a29('0x663'),'format':'tiles','tileMatrixSetID':'c','subdomains':_0x2ad70f()(Array(0x6)[a0_0x5a29('0x148')]())[a0_0x5a29('0x95a')](function(_0x1f9352){return(_0x1f9352+0x1)[a0_0x5a29('0x857')]();}),'tileMatrixLabels':_0x2ad70f()(Array(0x12)[a0_0x5a29('0x148')]())['map'](function(_0x4472ba){return(_0x4472ba+0x1)[a0_0x5a29('0x857')]();}),'tilingScheme':new _0x48cf5d[(a0_0x5a29('0x273'))](),'maximumLevel':0x12});}return _0x1407b4;}(_0x48cf5d['WebMapTileServiceImageryProvider']);_0x41d742['a'][a0_0x5a29('0x4')]=a0_0x5a29('0x57b');var _0x111c28=_0x5207bb;function _0x740a14(_0x25bcf3){var _0x3749fe=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x14ce4f){return!0x1;}}();return function(){var _0x1899f3,_0x2a3f2a=_0x3c6509()(_0x25bcf3);if(_0x3749fe){var _0x2f0714=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x1899f3=Reflect['construct'](_0x2a3f2a,arguments,_0x2f0714);}else _0x1899f3=_0x2a3f2a[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x1899f3);};}var _0x12adb5=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2a7dbf=function(_0x32cf60){_0x5a1389()(_0x319d83,_0x32cf60);var _0x5292f8=_0x740a14(_0x319d83);function _0x319d83(){var _0x3bc273=arguments[a0_0x5a29('0x515')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};_0x1ee296()(this,_0x319d83);var _0x5ab3ce=a0_0x5a29('0x1aa')===_0x3bc273['style']?a0_0x5a29('0x523'):a0_0x5a29('0x958');return _0x3bc273[a0_0x5a29('0x498')]=_0x5ab3ce[a0_0x5a29('0x380')](a0_0x5a29('0x450'),_0x3bc273[a0_0x5a29('0x46a')]||0x1),_0x3bc273[a0_0x5a29('0x364')]=_0x3bc273['subdomains']||['1','2','3'],a0_0x5a29('0x1aa')===_0x3bc273[a0_0x5a29('0x46a')]&&(_0x3bc273[a0_0x5a29('0x76b')]={'sx':function(_0x1ae9a8,_0x381df0,_0x268ca7,_0x5a4ce0){return _0x381df0>>0x4;},'sy':function(_0x25224f,_0x369563,_0x35ba8b,_0x2e7bc3){return(0x1<<_0x2e7bc3)-_0x35ba8b>>0x4;}}),_0x5292f8[a0_0x5a29('0x351')](this,_0x3bc273);}return _0x319d83;}(_0x12adb5['UrlTemplateImageryProvider']);_0x41d742['a']['TENCENT']=a0_0x5a29('0x373');var _0x687406=_0x2a7dbf,_0x4a15b9=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4d5de8=function(){function _0x5736f6(){_0x1ee296()(this,_0x5736f6);}return _0x1fafe8()(_0x5736f6,null,[{'key':a0_0x5a29('0x639'),'value':function(_0xe6297c){return new _0x3354b2(_0xe6297c);}},{'key':a0_0x5a29('0x2c6'),'value':function(_0x20ff50){return new _0x548c92(_0x20ff50);}},{'key':a0_0x5a29('0x7bc'),'value':function(_0x164844){return new _0x42d6cf(_0x164844);}},{'key':a0_0x5a29('0x4c8'),'value':function(_0x763d4a){return new _0x111c28(_0x763d4a);}},{'key':a0_0x5a29('0x8bd'),'value':function(_0x473060){return new _0x687406(_0x473060);}},{'key':a0_0x5a29('0x868'),'value':function(_0x395890){return new _0x4a15b9[(a0_0x5a29('0x407'))](_0x395890);}},{'key':'createSingleTileImageryLayer','value':function(_0x5a6135){return new _0x4a15b9[(a0_0x5a29('0x84'))](_0x5a6135);}},{'key':a0_0x5a29('0x6de'),'value':function(_0xd28c2e){return new _0x4a15b9[(a0_0x5a29('0x712'))](_0xd28c2e);}},{'key':a0_0x5a29('0x44b'),'value':function(_0xe8bf56){return new _0x4a15b9[(a0_0x5a29('0x2e4'))](_0xe8bf56);}},{'key':a0_0x5a29('0x371'),'value':function(_0x44c76d){return new _0x4a15b9[(a0_0x5a29('0x44c'))](_0x44c76d);}},{'key':a0_0x5a29('0x167'),'value':function(_0x221006){return new _0x4a15b9[(a0_0x5a29('0x7f0'))](_0x221006);}},{'key':a0_0x5a29('0x271'),'value':function(_0x4ca435,_0x103388){var _0xf074f0=void 0x0;switch(_0x4ca435){case _0x41d742['a'][a0_0x5a29('0x19c')]:_0xf074f0=this[a0_0x5a29('0x639')](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x5fd')]:_0xf074f0=this[a0_0x5a29('0x2c6')](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x2ec')]:_0xf074f0=this[a0_0x5a29('0x7bc')](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x4')]:_0xf074f0=this['createTdtImageryLayer'](_0x103388);break;case _0x41d742['a']['TENCENT']:_0xf074f0=this[a0_0x5a29('0x8bd')](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x564')]:_0xf074f0=this[a0_0x5a29('0x868')](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x536')]:_0xf074f0=this[a0_0x5a29('0x559')](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x632')]:_0xf074f0=this[a0_0x5a29('0x6de')](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x941')]:_0xf074f0=this['createWMTSImageryLayer'](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x6ec')]:_0xf074f0=this['createXYZImageryLayer'](_0x103388);break;case _0x41d742['a'][a0_0x5a29('0x75b')]:_0xf074f0=this[a0_0x5a29('0x167')](_0x103388);}return _0xf074f0;}}]),_0x5736f6;}(),_0x41144c=_0x5792f(0x16),_0xf14a8a=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2c0259=function(){function _0x30d6cb(){_0x1ee296()(this,_0x30d6cb);}return _0x1fafe8()(_0x30d6cb,null,[{'key':a0_0x5a29('0x7e'),'value':function(_0x1ddf1a){return new _0xf14a8a[(a0_0x5a29('0x803'))](_0x1ddf1a);}},{'key':a0_0x5a29('0x6b'),'value':function(_0x530466){return new _0xf14a8a[(a0_0x5a29('0x268'))](_0x530466);}},{'key':a0_0x5a29('0x86b'),'value':function(_0x26bccf){return new _0xf14a8a[(a0_0x5a29('0x636'))](_0x26bccf);}},{'key':a0_0x5a29('0x3aa'),'value':function(_0x3d3847){return new _0xf14a8a[(a0_0x5a29('0x810'))](_0x3d3847);}},{'key':a0_0x5a29('0x93c'),'value':function(_0x43d6f3){return new _0xf14a8a[(a0_0x5a29('0x649'))](_0x43d6f3);}},{'key':a0_0x5a29('0x2db'),'value':function(_0x491cbb,_0x209c64){var _0x520fb1=void 0x0;switch(_0x491cbb){case _0x41144c['a'][a0_0x5a29('0x68b')]:_0x520fb1=this[a0_0x5a29('0x7e')](_0x209c64);break;case _0x41144c['a'][a0_0x5a29('0x6ec')]:_0x520fb1=this['createUrlTerrain'](_0x209c64);break;case _0x41144c['a'][a0_0x5a29('0x2ec')]:_0x520fb1=this[a0_0x5a29('0x86b')](_0x209c64);break;case _0x41144c['a'][a0_0x5a29('0x564')]:_0x520fb1=this[a0_0x5a29('0x3aa')](_0x209c64);break;case _0x41144c['a']['VR']:_0x520fb1=this['createVRTerrain'](_0x209c64);}return _0x520fb1;}}]),_0x30d6cb;}(),_0x56dc34=_0x5792f(0x9),_0x59708f=_0x5792f['n'](_0x56dc34),_0x5bc45d=DC[a0_0x5a29('0x239')]['Cesium'],_0x3d9c2f=function(){function _0x9b51ee(_0x1dfe50){_0x1ee296()(this,_0x9b51ee),this[a0_0x5a29('0x35a')]=_0x1dfe50,this[a0_0x5a29('0xe')]=void 0x0,this['_floatingAnchor']=void 0x0;}return _0x1fafe8()(_0x9b51ee,[{'key':a0_0x5a29('0x727'),'value':function(){}},{'key':'_mouseClickHandler','value':function(){}},{'key':'_mouseMoveHandler','value':function(){}},{'key':'_mouseRightClickHandler','value':function(){}},{'key':a0_0x5a29('0x717'),'value':function(){this['_plot'][a0_0x5a29('0x835')]['on'](_0x5bc45d['ScreenSpaceEventType'][a0_0x5a29('0x392')],this[a0_0x5a29('0x6e9')],this),this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')]['on'](_0x5bc45d[a0_0x5a29('0x1a2')][a0_0x5a29('0x6eb')],this['_mouseMoveHandler'],this),this[a0_0x5a29('0x35a')]['viewer']['on'](_0x5bc45d[a0_0x5a29('0x1a2')][a0_0x5a29('0x5ca')],this[a0_0x5a29('0x592')],this);}},{'key':a0_0x5a29('0x137'),'value':function(){this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x59a')](_0x5bc45d[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')],this[a0_0x5a29('0x6e9')],this),this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x59a')](_0x5bc45d['ScreenSpaceEventType'][a0_0x5a29('0x6eb')],this['_mouseMoveHandler'],this),this[a0_0x5a29('0x35a')]['viewer'][a0_0x5a29('0x59a')](_0x5bc45d['ScreenSpaceEventType'][a0_0x5a29('0x5ca')],this['_mouseRightClickHandler'],this);}},{'key':a0_0x5a29('0x314'),'value':function(_0x3c6082){var _0x538dc2=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]&&arguments[0x1];return this[a0_0x5a29('0x35a')]['overlayLayer'][a0_0x5a29('0x695')]({'position':_0x3c6082,'billboard':{'image':_0x538dc2?this['_plot']['options'][a0_0x5a29('0x422')]:this[a0_0x5a29('0x35a')][a0_0x5a29('0x8ae')]['icon_anchor'],'width':this[a0_0x5a29('0x35a')]['options'][a0_0x5a29('0x490')][0x0],'height':this['_plot'][a0_0x5a29('0x8ae')][a0_0x5a29('0x490')][0x1],'eyeOffset':new _0x5bc45d[(a0_0x5a29('0x3bd'))](0x0,0x0,-0x1f4),'heightReference':this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x48c')]===_0x5bc45d[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')]?_0x5bc45d[a0_0x5a29('0x306')][a0_0x5a29('0x47e')]:_0x5bc45d['HeightReference']['NONE']}});}},{'key':a0_0x5a29('0x63a'),'value':function(){this[a0_0x5a29('0x717')]();}}]),_0x9b51ee;}();function _0xb297a5(_0x44bd5b,_0x47c2f3){var _0x5916da=Object[a0_0x5a29('0x148')](_0x44bd5b);if(Object[a0_0x5a29('0x75')]){var _0x6ab27=Object['getOwnPropertySymbols'](_0x44bd5b);_0x47c2f3&&(_0x6ab27=_0x6ab27[a0_0x5a29('0x48a')](function(_0x5d4715){return Object['getOwnPropertyDescriptor'](_0x44bd5b,_0x5d4715)[a0_0x5a29('0x12e')];})),_0x5916da[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x5916da,_0x6ab27);}return _0x5916da;}function _0x399fe2(_0x3b1849){for(var _0x550b7d=0x1;_0x550b7d<arguments[a0_0x5a29('0x515')];_0x550b7d++){var _0xabad7d=null!=arguments[_0x550b7d]?arguments[_0x550b7d]:{};_0x550b7d%0x2?_0xb297a5(Object(_0xabad7d),!0x0)[a0_0x5a29('0x570')](function(_0x3746c8){_0x59708f()(_0x3b1849,_0x3746c8,_0xabad7d[_0x3746c8]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x3b1849,Object[a0_0x5a29('0x711')](_0xabad7d)):_0xb297a5(Object(_0xabad7d))[a0_0x5a29('0x570')](function(_0x510815){Object[a0_0x5a29('0xe7')](_0x3b1849,_0x510815,Object[a0_0x5a29('0x11a')](_0xabad7d,_0x510815));});}return _0x3b1849;}function _0x17648f(_0x166c1e){var _0xb4cf5=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x30caf3){return!0x1;}}();return function(){var _0x50a49d,_0x33933c=_0x3c6509()(_0x166c1e);if(_0xb4cf5){var _0x5484d7=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x50a49d=Reflect['construct'](_0x33933c,arguments,_0x5484d7);}else _0x50a49d=_0x33933c[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x50a49d);};}var _0x1cc49c=DC[a0_0x5a29('0x923')],_0x45c054=DC['Namespace']['Cesium'],_0x1a9c12={'pixelSize':0xa,'outlineColor':_0x45c054['Color']['BLUE'],'outlineWidth':0x5},_0x39dc3d=function(_0x36f756){_0x5a1389()(_0x53cb54,_0x36f756);var _0x1c319f=_0x17648f(_0x53cb54);function _0x53cb54(_0x1dfb49,_0x57c916){var _0x1eb025;return _0x1ee296()(this,_0x53cb54),(_0x1eb025=_0x1c319f[a0_0x5a29('0x351')](this,_0x1dfb49))['_position']=_0x45c054['Cartesian3'][a0_0x5a29('0x952')],_0x1eb025[a0_0x5a29('0x3e9')]=_0x399fe2(_0x399fe2({},_0x1a9c12),_0x57c916),_0x1eb025[a0_0x5a29('0x727')](),_0x1eb025;}return _0x1fafe8()(_0x53cb54,[{'key':'_mountEntity','value':function(){var _0x2f8620=this;this[a0_0x5a29('0xe')]=new _0x45c054[(a0_0x5a29('0x608'))]({'position':new _0x45c054[(a0_0x5a29('0x305'))](function(){return _0x2f8620[a0_0x5a29('0x86e')];},!0x1),'point':_0x399fe2({},this[a0_0x5a29('0x3e9')])}),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x358e0c){this[a0_0x5a29('0x86e')]=_0x358e0c[a0_0x5a29('0x6e5')],this[a0_0x5a29('0x137')]();var _0x203db7=new DC['Point'](_0x1cc49c[a0_0x5a29('0x8f')](this['_position']));_0x203db7[a0_0x5a29('0x1f1')](this[a0_0x5a29('0x3e9')]),this['_plot'][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](_0x203db7);}},{'key':a0_0x5a29('0x914'),'value':function(_0x24232e){this['_position']=_0x24232e['surfacePosition'],this[a0_0x5a29('0x35a')]['viewer'][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x24232e[a0_0x5a29('0x12f')],a0_0x5a29('0x7ef'));}}]),_0x53cb54;}(_0x3d9c2f);function _0x1e1281(_0xe60909,_0x1014e5){var _0x384279=Object[a0_0x5a29('0x148')](_0xe60909);if(Object[a0_0x5a29('0x75')]){var _0x3f7ff6=Object[a0_0x5a29('0x75')](_0xe60909);_0x1014e5&&(_0x3f7ff6=_0x3f7ff6[a0_0x5a29('0x48a')](function(_0x24710c){return Object[a0_0x5a29('0x11a')](_0xe60909,_0x24710c)['enumerable'];})),_0x384279[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x384279,_0x3f7ff6);}return _0x384279;}function _0x42fb3a(_0x35dfbc){for(var _0x57cadf=0x1;_0x57cadf<arguments['length'];_0x57cadf++){var _0x184e07=null!=arguments[_0x57cadf]?arguments[_0x57cadf]:{};_0x57cadf%0x2?_0x1e1281(Object(_0x184e07),!0x0)[a0_0x5a29('0x570')](function(_0x399f64){_0x59708f()(_0x35dfbc,_0x399f64,_0x184e07[_0x399f64]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x5a29('0x4a5')](_0x35dfbc,Object[a0_0x5a29('0x711')](_0x184e07)):_0x1e1281(Object(_0x184e07))['forEach'](function(_0x1879e1){Object['defineProperty'](_0x35dfbc,_0x1879e1,Object[a0_0x5a29('0x11a')](_0x184e07,_0x1879e1));});}return _0x35dfbc;}function _0x4798f7(_0x70e382){var _0x47eaf0=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype']['toString']['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x56c85a){return!0x1;}}();return function(){var _0x1f61b0,_0x2e25a2=_0x3c6509()(_0x70e382);if(_0x47eaf0){var _0x2ea5b=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x1f61b0=Reflect[a0_0x5a29('0x138')](_0x2e25a2,arguments,_0x2ea5b);}else _0x1f61b0=_0x2e25a2[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x1f61b0);};}var _0x1cb3e1=DC['Transform'],_0x197f72=DC[a0_0x5a29('0x239')]['Cesium'],_0x55f82b={'width':0x3,'material':_0x197f72[a0_0x5a29('0x82')][a0_0x5a29('0xf3')][a0_0x5a29('0x3eb')](0.6)},_0x1d2185=function(_0x280296){_0x5a1389()(_0xcf2f30,_0x280296);var _0x8c98df=_0x4798f7(_0xcf2f30);function _0xcf2f30(_0x1f07de,_0x2493ff){var _0x1cff37;return _0x1ee296()(this,_0xcf2f30),(_0x1cff37=_0x8c98df[a0_0x5a29('0x351')](this,_0x1f07de))[a0_0x5a29('0x62')]=[],_0x1cff37['_style']=_0x42fb3a(_0x42fb3a({},_0x55f82b),_0x2493ff),_0x1cff37[a0_0x5a29('0x727')](),_0x1cff37;}return _0x1fafe8()(_0xcf2f30,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x9c5969=this;this[a0_0x5a29('0xe')]=new _0x197f72[(a0_0x5a29('0x608'))]({'polyline':_0x42fb3a(_0x42fb3a({},this[a0_0x5a29('0x3e9')]),{},{'positions':new _0x197f72[(a0_0x5a29('0x305'))](function(){return _0x9c5969[a0_0x5a29('0x62')];},!0x1)})}),this['_plot']['overlayLayer'][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x304cad){0x0===this['_positions'][a0_0x5a29('0x515')]&&(this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x304cad[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x314')](_0x304cad[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x8b2')]=this['createAnchor'](_0x304cad[a0_0x5a29('0x6e5')])),this[a0_0x5a29('0x62')]['push'](_0x304cad[a0_0x5a29('0x6e5')]),this['createAnchor'](_0x304cad[a0_0x5a29('0x6e5')]);}},{'key':a0_0x5a29('0x914'),'value':function(_0x10f352){this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x10f352['windowPosition'],a0_0x5a29('0x1d')),this[a0_0x5a29('0x8b2')]&&(this[a0_0x5a29('0x8b2')][a0_0x5a29('0x53c')]['setValue'](_0x10f352[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this[a0_0x5a29('0x62')]['push'](_0x10f352[a0_0x5a29('0x6e5')]));}},{'key':'_mouseRightClickHandler','value':function(_0x8fa79b){this[a0_0x5a29('0x137')]();var _0x2688e6=new DC[(a0_0x5a29('0x40b'))](_0x1cb3e1[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]));_0x2688e6[a0_0x5a29('0x1f1')](this[a0_0x5a29('0x3e9')]),this[a0_0x5a29('0x35a')][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](_0x2688e6);}}]),_0xcf2f30;}(_0x3d9c2f);function _0x19d8d0(_0x3f1d6f,_0x4b96ce){var _0x57ec94=Object[a0_0x5a29('0x148')](_0x3f1d6f);if(Object[a0_0x5a29('0x75')]){var _0x1ffdcc=Object['getOwnPropertySymbols'](_0x3f1d6f);_0x4b96ce&&(_0x1ffdcc=_0x1ffdcc[a0_0x5a29('0x48a')](function(_0xeda821){return Object[a0_0x5a29('0x11a')](_0x3f1d6f,_0xeda821)[a0_0x5a29('0x12e')];})),_0x57ec94[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x57ec94,_0x1ffdcc);}return _0x57ec94;}function _0x4d85f1(_0x1bc8f6){for(var _0x3d19a8=0x1;_0x3d19a8<arguments[a0_0x5a29('0x515')];_0x3d19a8++){var _0x5749ff=null!=arguments[_0x3d19a8]?arguments[_0x3d19a8]:{};_0x3d19a8%0x2?_0x19d8d0(Object(_0x5749ff),!0x0)[a0_0x5a29('0x570')](function(_0x266e52){_0x59708f()(_0x1bc8f6,_0x266e52,_0x5749ff[_0x266e52]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x5a29('0x4a5')](_0x1bc8f6,Object[a0_0x5a29('0x711')](_0x5749ff)):_0x19d8d0(Object(_0x5749ff))[a0_0x5a29('0x570')](function(_0x12c821){Object[a0_0x5a29('0xe7')](_0x1bc8f6,_0x12c821,Object['getOwnPropertyDescriptor'](_0x5749ff,_0x12c821));});}return _0x1bc8f6;}function _0x18be2d(_0x27e419){var _0x4d270d=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x173fcf){return!0x1;}}();return function(){var _0xa45982,_0x35d904=_0x3c6509()(_0x27e419);if(_0x4d270d){var _0x2a5900=_0x3c6509()(this)[a0_0x5a29('0x825')];_0xa45982=Reflect[a0_0x5a29('0x138')](_0x35d904,arguments,_0x2a5900);}else _0xa45982=_0x35d904[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0xa45982);};}var _0x1a0d85=DC[a0_0x5a29('0x923')],_0x5b565d=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x294f4c={'material':_0x5b565d[a0_0x5a29('0x82')][a0_0x5a29('0xf3')]['withAlpha'](0.6),'fill':!0x0},_0xcfcb15=function(_0x44bcce){_0x5a1389()(_0x3952cd,_0x44bcce);var _0x259059=_0x18be2d(_0x3952cd);function _0x3952cd(_0x4330ee,_0x4b9084){var _0xbf776;return _0x1ee296()(this,_0x3952cd),(_0xbf776=_0x259059[a0_0x5a29('0x351')](this,_0x4330ee))[a0_0x5a29('0x62')]=[],_0xbf776[a0_0x5a29('0x3e9')]=_0x4d85f1(_0x4d85f1({},_0x294f4c),_0x4b9084),_0xbf776[a0_0x5a29('0x727')](),_0xbf776;}return _0x1fafe8()(_0x3952cd,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x21f206=this;this['_delegate']=new _0x5b565d[(a0_0x5a29('0x608'))]({'polygon':_0x4d85f1(_0x4d85f1({},this[a0_0x5a29('0x3e9')]),{},{'hierarchy':new _0x5b565d['CallbackProperty'](function(){return _0x21f206[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x2?new _0x5b565d[(a0_0x5a29('0x3b6'))](_0x21f206[a0_0x5a29('0x62')]):null;},!0x1)})}),this['_plot'][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x5c5941){0x0===this[a0_0x5a29('0x62')]['length']&&(this['_positions'][a0_0x5a29('0x3cd')](_0x5c5941[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x314')](_0x5c5941[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x8b2')]=this[a0_0x5a29('0x314')](_0x5c5941[a0_0x5a29('0x6e5')])),this['_positions']['push'](_0x5c5941['surfacePosition']),this['createAnchor'](_0x5c5941[a0_0x5a29('0x6e5')]);}},{'key':a0_0x5a29('0x914'),'value':function(_0x918ebb){this[a0_0x5a29('0x35a')]['viewer'][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x918ebb[a0_0x5a29('0x12f')],'左击选择点位,右击结束'),this[a0_0x5a29('0x8b2')]&&(this[a0_0x5a29('0x8b2')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x918ebb['surfacePosition']),this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x918ebb['surfacePosition']));}},{'key':'_mouseRightClickHandler','value':function(_0x58fa3e){this[a0_0x5a29('0x137')]();var _0x2454ff=new DC[(a0_0x5a29('0x395'))](_0x1a0d85[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]));_0x2454ff['setStyle'](this[a0_0x5a29('0x3e9')]),this[a0_0x5a29('0x35a')][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](_0x2454ff);}}]),_0x3952cd;}(_0x3d9c2f);function _0x42d6eb(_0x5cb387,_0x5184d8){var _0x5f52fd=Object[a0_0x5a29('0x148')](_0x5cb387);if(Object['getOwnPropertySymbols']){var _0x3fda32=Object[a0_0x5a29('0x75')](_0x5cb387);_0x5184d8&&(_0x3fda32=_0x3fda32['filter'](function(_0xc8368d){return Object[a0_0x5a29('0x11a')](_0x5cb387,_0xc8368d)[a0_0x5a29('0x12e')];})),_0x5f52fd['push'][a0_0x5a29('0x758')](_0x5f52fd,_0x3fda32);}return _0x5f52fd;}function _0x2f05b6(_0x4712f0){for(var _0x58d54e=0x1;_0x58d54e<arguments[a0_0x5a29('0x515')];_0x58d54e++){var _0x964819=null!=arguments[_0x58d54e]?arguments[_0x58d54e]:{};_0x58d54e%0x2?_0x42d6eb(Object(_0x964819),!0x0)[a0_0x5a29('0x570')](function(_0xedf48a){_0x59708f()(_0x4712f0,_0xedf48a,_0x964819[_0xedf48a]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x4712f0,Object[a0_0x5a29('0x711')](_0x964819)):_0x42d6eb(Object(_0x964819))[a0_0x5a29('0x570')](function(_0x2d4ea6){Object[a0_0x5a29('0xe7')](_0x4712f0,_0x2d4ea6,Object['getOwnPropertyDescriptor'](_0x964819,_0x2d4ea6));});}return _0x4712f0;}function _0x14028d(_0x3fd797){var _0x4c6370=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x4cf7b5){return!0x1;}}();return function(){var _0x2c1daf,_0x23f53d=_0x3c6509()(_0x3fd797);if(_0x4c6370){var _0x1c110c=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x2c1daf=Reflect['construct'](_0x23f53d,arguments,_0x1c110c);}else _0x2c1daf=_0x23f53d['apply'](this,arguments);return _0x1fe488()(this,_0x2c1daf);};}var _0x44e6e8=DC[a0_0x5a29('0x923')],_0x440851=DC['Namespace'][a0_0x5a29('0x6e8')],_0x35b968={'material':_0x440851[a0_0x5a29('0x82')][a0_0x5a29('0xf3')][a0_0x5a29('0x3eb')](0.6),'fill':!0x0},_0x5b75bf=function(_0x591471){_0x5a1389()(_0x1d865f,_0x591471);var _0x5066f5=_0x14028d(_0x1d865f);function _0x1d865f(_0x18af05,_0x3ed1c3){var _0x4fd0c6;return _0x1ee296()(this,_0x1d865f),(_0x4fd0c6=_0x5066f5[a0_0x5a29('0x351')](this,_0x18af05))[a0_0x5a29('0x62')]=[],_0x4fd0c6['_radius']=0x0,_0x4fd0c6[a0_0x5a29('0x3e9')]=_0x2f05b6(_0x2f05b6({},_0x35b968),_0x3ed1c3),_0x4fd0c6[a0_0x5a29('0x727')](),_0x4fd0c6;}return _0x1fafe8()(_0x1d865f,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x55bc83=this;this[a0_0x5a29('0xe')]=new _0x440851['Entity']({'polygon':_0x2f05b6(_0x2f05b6({},this[a0_0x5a29('0x3e9')]),{},{'hierarchy':new _0x440851[(a0_0x5a29('0x305'))](function(){if(_0x55bc83[a0_0x5a29('0x62')]['length']>0x1){if(_0x55bc83[a0_0x5a29('0x973')]=_0x440851['Cartesian3']['distance'](_0x55bc83['_positions'][0x0],_0x55bc83[a0_0x5a29('0x62')][0x1]),_0x55bc83[a0_0x5a29('0x973')]<=0x0)return null;var _0x26ead9=_0x440851[a0_0x5a29('0x26c')]['computeEllipsePositions']({'center':_0x55bc83['_positions'][0x0],'semiMajorAxis':_0x55bc83[a0_0x5a29('0x973')],'semiMinorAxis':_0x55bc83[a0_0x5a29('0x973')],'rotation':0x0,'granularity':0.005},!0x1,!0x0),_0x1b5efb=_0x440851['Cartesian3'][a0_0x5a29('0x840')](_0x26ead9[a0_0x5a29('0x68c')]);return _0x1b5efb['push'](_0x1b5efb[0x0]),new _0x440851[(a0_0x5a29('0x3b6'))](_0x1b5efb);}return null;},!0x1)})}),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x28c2be){var _0x451c6d=this['_positions'][a0_0x5a29('0x515')];if(0x0===_0x451c6d&&(this[a0_0x5a29('0x62')]['push'](_0x28c2be[a0_0x5a29('0x6e5')]),this['createAnchor'](_0x28c2be[a0_0x5a29('0x6e5')],!0x0),this[a0_0x5a29('0x8b2')]=this['createAnchor'](_0x28c2be[a0_0x5a29('0x6e5')])),this['_positions']['push'](_0x28c2be[a0_0x5a29('0x6e5')]),_0x451c6d>0x0&&this[a0_0x5a29('0x314')](_0x28c2be[a0_0x5a29('0x6e5')]),_0x451c6d>0x1){this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this['unbindEvent']();var _0x330a63=new DC[(a0_0x5a29('0x79a'))](_0x44e6e8[a0_0x5a29('0x8f')](this['_positions'][0x0]),this[a0_0x5a29('0x973')]);_0x330a63['setStyle'](this[a0_0x5a29('0x3e9')]),this['_plot']['plotEvent'][a0_0x5a29('0x1a0')](_0x330a63);}}},{'key':'_mouseMoveHandler','value':function(_0x2b4a58){this[a0_0x5a29('0x35a')]['viewer'][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x2b4a58[a0_0x5a29('0x12f')],a0_0x5a29('0x6ab')),this['_floatingAnchor']&&(this[a0_0x5a29('0x8b2')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x2b4a58[a0_0x5a29('0x6e5')]),this['_positions'][a0_0x5a29('0x3fe')](),this[a0_0x5a29('0x62')]['push'](_0x2b4a58[a0_0x5a29('0x6e5')]));}}]),_0x1d865f;}(_0x3d9c2f);function _0x32f4f3(_0x1622c9,_0x3362f0){var _0x36b14c=Object[a0_0x5a29('0x148')](_0x1622c9);if(Object[a0_0x5a29('0x75')]){var _0x5606d0=Object[a0_0x5a29('0x75')](_0x1622c9);_0x3362f0&&(_0x5606d0=_0x5606d0[a0_0x5a29('0x48a')](function(_0x5ea333){return Object[a0_0x5a29('0x11a')](_0x1622c9,_0x5ea333)[a0_0x5a29('0x12e')];})),_0x36b14c[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x36b14c,_0x5606d0);}return _0x36b14c;}function _0x31321d(_0xd2e312){for(var _0x29581f=0x1;_0x29581f<arguments[a0_0x5a29('0x515')];_0x29581f++){var _0x32afe2=null!=arguments[_0x29581f]?arguments[_0x29581f]:{};_0x29581f%0x2?_0x32f4f3(Object(_0x32afe2),!0x0)[a0_0x5a29('0x570')](function(_0x3eea2a){_0x59708f()(_0xd2e312,_0x3eea2a,_0x32afe2[_0x3eea2a]);}):Object['getOwnPropertyDescriptors']?Object['defineProperties'](_0xd2e312,Object[a0_0x5a29('0x711')](_0x32afe2)):_0x32f4f3(Object(_0x32afe2))[a0_0x5a29('0x570')](function(_0xfa0950){Object[a0_0x5a29('0xe7')](_0xd2e312,_0xfa0950,Object['getOwnPropertyDescriptor'](_0x32afe2,_0xfa0950));});}return _0xd2e312;}function _0x420fc0(_0x18c102){var _0x19da6f=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x24c55c){return!0x1;}}();return function(){var _0x2cda79,_0x23bfb3=_0x3c6509()(_0x18c102);if(_0x19da6f){var _0xe24422=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x2cda79=Reflect[a0_0x5a29('0x138')](_0x23bfb3,arguments,_0xe24422);}else _0x2cda79=_0x23bfb3[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x2cda79);};}var _0x2716af=DC[a0_0x5a29('0x923')],_0x208de5=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x5b41eb={'material':_0x208de5[a0_0x5a29('0x82')][a0_0x5a29('0xf3')][a0_0x5a29('0x3eb')](0.6)},_0xe5e44d=function(_0x5d8c4f){_0x5a1389()(_0x21b863,_0x5d8c4f);var _0x3a8485=_0x420fc0(_0x21b863);function _0x21b863(_0x4d5c58,_0x10ceb4){var _0x3c673a;return _0x1ee296()(this,_0x21b863),(_0x3c673a=_0x3a8485[a0_0x5a29('0x351')](this,_0x4d5c58))[a0_0x5a29('0x62')]=[],_0x3c673a[a0_0x5a29('0x3e9')]=_0x31321d(_0x31321d({},_0x5b41eb),_0x10ceb4),_0x3c673a[a0_0x5a29('0x727')](),_0x3c673a;}return _0x1fafe8()(_0x21b863,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x9d9bb1=this;this[a0_0x5a29('0xe')]=new _0x208de5[(a0_0x5a29('0x608'))]({'rectangle':_0x31321d(_0x31321d({},this[a0_0x5a29('0x3e9')]),{},{'coordinates':new _0x208de5[(a0_0x5a29('0x305'))](function(_0x8559d1){return _0x9d9bb1[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x1?_0x208de5[a0_0x5a29('0x279')][a0_0x5a29('0x79f')](_0x9d9bb1[a0_0x5a29('0x62')]):null;},!0x1)})}),this[a0_0x5a29('0x35a')]['overlayLayer'][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x459552){var _0x544006=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')];if(0x0===_0x544006&&(this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x459552['surfacePosition']),this[a0_0x5a29('0x314')](_0x459552[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x8b2')]=this[a0_0x5a29('0x314')](_0x459552[a0_0x5a29('0x6e5')])),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x459552['surfacePosition']),this[a0_0x5a29('0x314')](_0x459552['surfacePosition']),_0x544006>0x1){this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this['unbindEvent']();var _0x48e54f=new DC[(a0_0x5a29('0x279'))](_0x2716af[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]));_0x48e54f[a0_0x5a29('0x1f1')](this[a0_0x5a29('0x3e9')]),this['_plot'][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](_0x48e54f);}}},{'key':a0_0x5a29('0x914'),'value':function(_0x346d7f){this['_plot'][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x346d7f[a0_0x5a29('0x12f')],a0_0x5a29('0x6ab')),this[a0_0x5a29('0x8b2')]&&(this['_floatingAnchor'][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x346d7f[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x346d7f[a0_0x5a29('0x6e5')]));}}]),_0x21b863;}(_0x3d9c2f);function _0x3dfadc(_0x3d309c,_0x5f244d){var _0x4b8232=Object[a0_0x5a29('0x148')](_0x3d309c);if(Object[a0_0x5a29('0x75')]){var _0x31a1cd=Object[a0_0x5a29('0x75')](_0x3d309c);_0x5f244d&&(_0x31a1cd=_0x31a1cd[a0_0x5a29('0x48a')](function(_0x49f0b6){return Object[a0_0x5a29('0x11a')](_0x3d309c,_0x49f0b6)[a0_0x5a29('0x12e')];})),_0x4b8232[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x4b8232,_0x31a1cd);}return _0x4b8232;}function _0x2655be(_0x56eda3){for(var _0x26778d=0x1;_0x26778d<arguments['length'];_0x26778d++){var _0x3b2a7d=null!=arguments[_0x26778d]?arguments[_0x26778d]:{};_0x26778d%0x2?_0x3dfadc(Object(_0x3b2a7d),!0x0)[a0_0x5a29('0x570')](function(_0x5ba90f){_0x59708f()(_0x56eda3,_0x5ba90f,_0x3b2a7d[_0x5ba90f]);}):Object[a0_0x5a29('0x711')]?Object['defineProperties'](_0x56eda3,Object[a0_0x5a29('0x711')](_0x3b2a7d)):_0x3dfadc(Object(_0x3b2a7d))[a0_0x5a29('0x570')](function(_0x4363dd){Object[a0_0x5a29('0xe7')](_0x56eda3,_0x4363dd,Object[a0_0x5a29('0x11a')](_0x3b2a7d,_0x4363dd));});}return _0x56eda3;}function _0xef97fe(_0x3e4e36){var _0x403a77=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x34229e){return!0x1;}}();return function(){var _0x4a659d,_0x2fa571=_0x3c6509()(_0x3e4e36);if(_0x403a77){var _0x28bda8=_0x3c6509()(this)['constructor'];_0x4a659d=Reflect[a0_0x5a29('0x138')](_0x2fa571,arguments,_0x28bda8);}else _0x4a659d=_0x2fa571[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x4a659d);};}var _0x4cdc21=DC[a0_0x5a29('0x923')],_0x32933f=DC[a0_0x5a29('0x239')]['Cesium'],_0x3af282={},_0x135f91=function(_0x4c5d7a){_0x5a1389()(_0x290458,_0x4c5d7a);var _0x3bbac1=_0xef97fe(_0x290458);function _0x290458(_0x218dd6,_0x7b4554){var _0x27c91f;return _0x1ee296()(this,_0x290458),(_0x27c91f=_0x3bbac1[a0_0x5a29('0x351')](this,_0x218dd6))[a0_0x5a29('0x86e')]=_0x32933f[a0_0x5a29('0x3bd')][a0_0x5a29('0x952')],_0x27c91f[a0_0x5a29('0x3e9')]=_0x2655be(_0x2655be({'image':_0x218dd6[a0_0x5a29('0x8ae')][a0_0x5a29('0x31b')]},_0x3af282),_0x7b4554),_0x27c91f[a0_0x5a29('0x727')](),_0x27c91f;}return _0x1fafe8()(_0x290458,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x1e368d=this;this[a0_0x5a29('0xe')]=new _0x32933f[(a0_0x5a29('0x608'))]({'position':new _0x32933f[(a0_0x5a29('0x305'))](function(){return _0x1e368d[a0_0x5a29('0x86e')];},!0x1),'billboard':_0x2655be({},this[a0_0x5a29('0x3e9')])}),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':'_mouseClickHandler','value':function(_0x26f894){this[a0_0x5a29('0x86e')]=_0x26f894[a0_0x5a29('0x6e5')],this[a0_0x5a29('0x137')]();var _0x1ebdde=new DC[(a0_0x5a29('0x91c'))](_0x4cdc21[a0_0x5a29('0x8f')](this[a0_0x5a29('0x86e')]),this[a0_0x5a29('0x3e9')][a0_0x5a29('0xfa')]);_0x1ebdde[a0_0x5a29('0x1f1')](this[a0_0x5a29('0x3e9')]),this[a0_0x5a29('0x35a')][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](_0x1ebdde);}},{'key':a0_0x5a29('0x914'),'value':function(_0x534624){this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x534624[a0_0x5a29('0x12f')],a0_0x5a29('0x7ef')),this['_position']=_0x534624[a0_0x5a29('0x6e5')];}}]),_0x290458;}(_0x3d9c2f),_0x108514=DC,_0x19893f=_0x108514['Transform'],_0x463537=_0x108514[a0_0x5a29('0x36e')],_0x95fe7b=_0x108514[a0_0x5a29('0x5b2')],_0x1c242e=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x3127d4=Math['PI']/0x2,_0x44623b=function(){function _0x5121e9(_0x102801){_0x1ee296()(this,_0x5121e9),this[a0_0x5a29('0x62')]=(null==_0x102801?void 0x0:_0x102801['positions'])||[],this['headHeightFactor']=0.18,this['headWidthFactor']=0.3,this['neckHeightFactor']=0.85,this['neckWidthFactor']=0.15,this[a0_0x5a29('0x7e6')]=0.8;}return _0x1fafe8()(_0x5121e9,[{'key':a0_0x5a29('0x814'),'value':function(_0x612710,_0x21fe72,_0x5d987d){var _0x2de647=_0x95fe7b[a0_0x5a29('0x531')](_0x612710),_0x53102b=_0x2de647*this[a0_0x5a29('0x21b')],_0x268231=_0x612710[_0x612710[a0_0x5a29('0x515')]-0x1];_0x2de647=_0x95fe7b[a0_0x5a29('0x7b2')](_0x268231,_0x612710[_0x612710['length']-0x2]);var _0x2ba402=_0x95fe7b[a0_0x5a29('0x7b2')](_0x21fe72,_0x5d987d);_0x53102b>_0x2ba402*this[a0_0x5a29('0x7e6')]&&(_0x53102b=_0x2ba402*this[a0_0x5a29('0x7e6')]);var _0x53ae2b=_0x53102b*this[a0_0x5a29('0x3fc')],_0x2e3850=_0x53102b*this['neckWidthFactor'],_0xcb0594=(_0x53102b=_0x53102b>_0x2de647?_0x2de647:_0x53102b)*this[a0_0x5a29('0x4d7')],_0xedffd2=_0x95fe7b['getThirdPoint'](_0x612710[_0x612710[a0_0x5a29('0x515')]-0x2],_0x268231,0x0,_0x53102b,!0x0),_0x3a1c25=_0x95fe7b[a0_0x5a29('0x5b7')](_0x612710[_0x612710[a0_0x5a29('0x515')]-0x2],_0x268231,0x0,_0xcb0594,!0x0),_0x42c5cc=_0x95fe7b[a0_0x5a29('0x5b7')](_0x268231,_0xedffd2,_0x3127d4,_0x53ae2b,!0x1),_0x15181d=_0x95fe7b[a0_0x5a29('0x5b7')](_0x268231,_0xedffd2,_0x3127d4,_0x53ae2b,!0x0);return[_0x95fe7b[a0_0x5a29('0x5b7')](_0x268231,_0x3a1c25,_0x3127d4,_0x2e3850,!0x1),_0x42c5cc,_0x268231,_0x15181d,_0x95fe7b[a0_0x5a29('0x5b7')](_0x268231,_0x3a1c25,_0x3127d4,_0x2e3850,!0x0)];}},{'key':a0_0x5a29('0x718'),'value':function(_0x21fd6e,_0x54aff8,_0x2be25c,_0x215742){for(var _0x42512d=_0x95fe7b['wholeDistance'](_0x21fd6e),_0xbed0c2=_0x95fe7b['getBaseLength'](_0x21fd6e)*_0x215742,_0x147797=(_0xbed0c2-_0x95fe7b[a0_0x5a29('0x7b2')](_0x54aff8,_0x2be25c))/0x2,_0x1c3e0b=0x0,_0x3f061b=[],_0x240525=[],_0x447e54=0x1;_0x447e54<_0x21fd6e[a0_0x5a29('0x515')]-0x1;_0x447e54++){var _0x1f8fdf=_0x95fe7b['getAngleOfThreePoints'](_0x21fd6e[_0x447e54-0x1],_0x21fd6e[_0x447e54],_0x21fd6e[_0x447e54+0x1])/0x2,_0x5d2e28=(_0xbed0c2/0x2-(_0x1c3e0b+=_0x95fe7b[a0_0x5a29('0x7b2')](_0x21fd6e[_0x447e54-0x1],_0x21fd6e[_0x447e54]))/_0x42512d*_0x147797)/Math[a0_0x5a29('0x1a7')](_0x1f8fdf),_0x586a63=_0x95fe7b[a0_0x5a29('0x5b7')](_0x21fd6e[_0x447e54-0x1],_0x21fd6e[_0x447e54],Math['PI']-_0x1f8fdf,_0x5d2e28,!0x0),_0x805373=_0x95fe7b[a0_0x5a29('0x5b7')](_0x21fd6e[_0x447e54-0x1],_0x21fd6e[_0x447e54],_0x1f8fdf,_0x5d2e28,!0x1);_0x3f061b[a0_0x5a29('0x3cd')](_0x586a63),_0x240525[a0_0x5a29('0x3cd')](_0x805373);}return _0x3f061b[a0_0x5a29('0x6c9')](_0x240525);}},{'key':a0_0x5a29('0xf7'),'value':function(){var _0x3c7a34=_0x463537[a0_0x5a29('0x41')](_0x19893f['transformCartesianArrayToWGS84Array'](this[a0_0x5a29('0x62')]))[0x0],_0x16df72=_0x3c7a34[0x0],_0x512617=_0x3c7a34[0x1];_0x95fe7b[a0_0x5a29('0x4dc')](_0x3c7a34[0x0],_0x3c7a34[0x1],_0x3c7a34[0x2])&&(_0x16df72=_0x3c7a34[0x1],_0x512617=_0x3c7a34[0x0]);var _0xe0d578=[_0x95fe7b[a0_0x5a29('0x48f')](_0x16df72,_0x512617)]['concat'](_0x3c7a34[a0_0x5a29('0x723')](0x2)),_0x3441a5=this[a0_0x5a29('0x814')](_0xe0d578,_0x16df72,_0x512617),_0x4d08ae=_0x3441a5[0x0],_0x54051e=_0x3441a5[0x4],_0x2f73ca=_0x95fe7b[a0_0x5a29('0x7b2')](_0x16df72,_0x512617)/_0x95fe7b['getBaseLength'](_0xe0d578),_0x61c01e=this[a0_0x5a29('0x718')](_0xe0d578,_0x4d08ae,_0x54051e,_0x2f73ca),_0x2b3d8f=_0x61c01e[a0_0x5a29('0x515')],_0x5ed687=[_0x16df72][a0_0x5a29('0x6c9')](_0x61c01e[a0_0x5a29('0x723')](0x0,_0x2b3d8f/0x2));_0x5ed687['push'](_0x4d08ae);var _0x168c92=[_0x512617][a0_0x5a29('0x6c9')](_0x61c01e[a0_0x5a29('0x723')](_0x2b3d8f/0x2,_0x2b3d8f));return _0x168c92['push'](_0x54051e),_0x5ed687=_0x95fe7b['getQBSplinePoints'](_0x5ed687),_0x168c92=_0x95fe7b[a0_0x5a29('0x9d')](_0x168c92),new _0x1c242e['PolygonHierarchy'](_0x19893f[a0_0x5a29('0x7a')](_0x463537[a0_0x5a29('0x21d')](_0x5ed687[a0_0x5a29('0x6c9')](_0x3441a5,_0x168c92[a0_0x5a29('0x39e')]()))));}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x3a9085){this[a0_0x5a29('0x62')]=_0x3a9085;},'get':function(){return this['_positions'];}},{'key':a0_0x5a29('0x329'),'get':function(){return this[a0_0x5a29('0xf7')]();}}]),_0x5121e9;}();function _0x38443f(_0x1708b5,_0x55ae5d){var _0x4612dc=Object[a0_0x5a29('0x148')](_0x1708b5);if(Object['getOwnPropertySymbols']){var _0x1cbc98=Object['getOwnPropertySymbols'](_0x1708b5);_0x55ae5d&&(_0x1cbc98=_0x1cbc98['filter'](function(_0x5c4602){return Object[a0_0x5a29('0x11a')](_0x1708b5,_0x5c4602)[a0_0x5a29('0x12e')];})),_0x4612dc[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x4612dc,_0x1cbc98);}return _0x4612dc;}function _0x37eeaa(_0x128d0c){for(var _0x278a18=0x1;_0x278a18<arguments[a0_0x5a29('0x515')];_0x278a18++){var _0x5d48b6=null!=arguments[_0x278a18]?arguments[_0x278a18]:{};_0x278a18%0x2?_0x38443f(Object(_0x5d48b6),!0x0)[a0_0x5a29('0x570')](function(_0x307336){_0x59708f()(_0x128d0c,_0x307336,_0x5d48b6[_0x307336]);}):Object[a0_0x5a29('0x711')]?Object['defineProperties'](_0x128d0c,Object[a0_0x5a29('0x711')](_0x5d48b6)):_0x38443f(Object(_0x5d48b6))['forEach'](function(_0x244e33){Object[a0_0x5a29('0xe7')](_0x128d0c,_0x244e33,Object[a0_0x5a29('0x11a')](_0x5d48b6,_0x244e33));});}return _0x128d0c;}function _0xb9b817(_0x5b72c4){var _0x706da0=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x2794f0){return!0x1;}}();return function(){var _0x138ae4,_0x17ed89=_0x3c6509()(_0x5b72c4);if(_0x706da0){var _0x4d7288=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x138ae4=Reflect[a0_0x5a29('0x138')](_0x17ed89,arguments,_0x4d7288);}else _0x138ae4=_0x17ed89[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x138ae4);};}var _0x2a20d7=DC[a0_0x5a29('0x923')],_0x1eac4d=DC['Namespace'][a0_0x5a29('0x6e8')],_0x57a1f9={'material':_0x1eac4d[a0_0x5a29('0x82')][a0_0x5a29('0xf3')]['withAlpha'](0.6),'fill':!0x0},_0xebe43e=function(_0x463a28){_0x5a1389()(_0x26115a,_0x463a28);var _0x6a61ab=_0xb9b817(_0x26115a);function _0x26115a(_0xcbff6,_0x346ffc){var _0x1c85d8;return _0x1ee296()(this,_0x26115a),(_0x1c85d8=_0x6a61ab[a0_0x5a29('0x351')](this,_0xcbff6))[a0_0x5a29('0x62')]=[],_0x1c85d8[a0_0x5a29('0x8b2')]=void 0x0,_0x1c85d8[a0_0x5a29('0x3e9')]=_0x37eeaa(_0x37eeaa({},_0x57a1f9),_0x346ffc),_0x1c85d8[a0_0x5a29('0x9')]=new _0x44623b(),_0x1c85d8['_mountEntity'](),_0x1c85d8;}return _0x1fafe8()(_0x26115a,[{'key':a0_0x5a29('0x727'),'value':function(){var _0xbdff20=this;this[a0_0x5a29('0xe')]=new _0x1eac4d['Entity']({'polygon':_0x37eeaa(_0x37eeaa({},this['_style']),{},{'hierarchy':new _0x1eac4d[(a0_0x5a29('0x305'))](function(){return _0xbdff20[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x2?(_0xbdff20[a0_0x5a29('0x9')]['positions']=_0xbdff20['_positions'],_0xbdff20[a0_0x5a29('0x9')][a0_0x5a29('0x329')]):null;},!0x1)})}),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':'_mouseClickHandler','value':function(_0x5d0664){var _0x16dc5a=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')];if(0x0===_0x16dc5a&&(this[a0_0x5a29('0x62')]['push'](_0x5d0664[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x314')](_0x5d0664['surfacePosition']),this[a0_0x5a29('0x8b2')]=this[a0_0x5a29('0x314')](_0x5d0664['surfacePosition'])),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x5d0664['surfacePosition']),this['_graphics'][a0_0x5a29('0x4e0')]=this[a0_0x5a29('0x62')],this[a0_0x5a29('0x314')](_0x5d0664[a0_0x5a29('0x6e5')]),_0x16dc5a>0x2){this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this['unbindEvent']();var _0x5db37e=new DC[(a0_0x5a29('0x3b0'))](_0x2a20d7[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]));_0x5db37e[a0_0x5a29('0x1f1')](this[a0_0x5a29('0x3e9')]),this[a0_0x5a29('0x35a')]['plotEvent']['raiseEvent'](_0x5db37e);}}},{'key':a0_0x5a29('0x914'),'value':function(_0x1c1d84){this['_plot'][a0_0x5a29('0x835')][a0_0x5a29('0x2af')]['showAt'](_0x1c1d84[a0_0x5a29('0x12f')],a0_0x5a29('0x7ef')),this[a0_0x5a29('0x8b2')]&&(this['_floatingAnchor'][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x1c1d84[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x1c1d84['surfacePosition']));}}]),_0x26115a;}(_0x3d9c2f),_0x3bea15=DC,_0x3dbc2f=_0x3bea15['Transform'],_0xcae02e=_0x3bea15[a0_0x5a29('0x36e')],_0x2dee51=_0x3bea15[a0_0x5a29('0x5b2')],_0x1f777f=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x1139ca=Math['PI']/0x2,_0x2a1f3c=function(){function _0x15fe83(_0x124b2b){_0x1ee296()(this,_0x15fe83),this[a0_0x5a29('0x62')]=(null==_0x124b2b?void 0x0:_0x124b2b[a0_0x5a29('0x4e0')])||[],this[a0_0x5a29('0x21b')]=0.25,this[a0_0x5a29('0x3fc')]=0.3,this[a0_0x5a29('0x4d7')]=0.85,this['neckWidthFactor']=0.15;}return _0x1fafe8()(_0x15fe83,[{'key':a0_0x5a29('0x7a7'),'value':function(_0x4c9e65,_0x525f7a,_0x199c6c,_0x53c3f8){var _0x212e1b=_0x2dee51[a0_0x5a29('0x48f')](_0x4c9e65,_0x525f7a),_0x502e4c=_0x2dee51['distance'](_0x212e1b,_0x199c6c),_0x42a66b=_0x2dee51[a0_0x5a29('0x5b7')](_0x199c6c,_0x212e1b,0x0,0.3*_0x502e4c,!0x0),_0xbc5e38=_0x2dee51[a0_0x5a29('0x5b7')](_0x199c6c,_0x212e1b,0x0,0.5*_0x502e4c,!0x0),_0x5161cd=[_0x212e1b,_0x42a66b=_0x2dee51[a0_0x5a29('0x5b7')](_0x212e1b,_0x42a66b,_0x1139ca,_0x502e4c/0x5,_0x53c3f8),_0xbc5e38=_0x2dee51[a0_0x5a29('0x5b7')](_0x212e1b,_0xbc5e38,_0x1139ca,_0x502e4c/0x4,_0x53c3f8),_0x199c6c],_0x2adba8=this[a0_0x5a29('0x814')](_0x5161cd),_0x51da49=_0x2adba8[0x0],_0x2607c1=_0x2adba8[0x4],_0x77a927=_0x2dee51[a0_0x5a29('0x7b2')](_0x4c9e65,_0x525f7a)/_0x2dee51[a0_0x5a29('0x531')](_0x5161cd)/0x2,_0x189d33=this[a0_0x5a29('0x718')](_0x5161cd,_0x51da49,_0x2607c1,_0x77a927),_0x18e3b8=_0x189d33['length'],_0x41f68d=_0x189d33[a0_0x5a29('0x723')](0x0,_0x18e3b8/0x2),_0x2cc1ba=_0x189d33[a0_0x5a29('0x723')](_0x18e3b8/0x2,_0x18e3b8);return _0x41f68d[a0_0x5a29('0x3cd')](_0x51da49),_0x2cc1ba['push'](_0x2607c1),(_0x41f68d=_0x41f68d[a0_0x5a29('0x39e')]())['push'](_0x525f7a),(_0x2cc1ba=_0x2cc1ba[a0_0x5a29('0x39e')]())[a0_0x5a29('0x3cd')](_0x4c9e65),_0x41f68d[a0_0x5a29('0x39e')]()[a0_0x5a29('0x6c9')](_0x2adba8,_0x2cc1ba);}},{'key':a0_0x5a29('0x814'),'value':function(_0x1a5295){var _0x8881a2=_0x2dee51[a0_0x5a29('0x531')](_0x1a5295)*this['headHeightFactor'],_0x59938d=_0x1a5295[_0x1a5295[a0_0x5a29('0x515')]-0x1],_0x5e1e1f=_0x8881a2*this[a0_0x5a29('0x3fc')],_0x5a78ab=_0x8881a2*this[a0_0x5a29('0x2de')],_0x289b9e=_0x8881a2*this['neckHeightFactor'],_0x2c565b=_0x2dee51[a0_0x5a29('0x5b7')](_0x1a5295[_0x1a5295[a0_0x5a29('0x515')]-0x2],_0x59938d,0x0,_0x8881a2,!0x0),_0x5bf6a3=_0x2dee51[a0_0x5a29('0x5b7')](_0x1a5295[_0x1a5295[a0_0x5a29('0x515')]-0x2],_0x59938d,0x0,_0x289b9e,!0x0),_0x2aa2dd=_0x2dee51['getThirdPoint'](_0x59938d,_0x2c565b,_0x1139ca,_0x5e1e1f,!0x1),_0x303bec=_0x2dee51[a0_0x5a29('0x5b7')](_0x59938d,_0x2c565b,_0x1139ca,_0x5e1e1f,!0x0);return[_0x2dee51[a0_0x5a29('0x5b7')](_0x59938d,_0x5bf6a3,_0x1139ca,_0x5a78ab,!0x1),_0x2aa2dd,_0x59938d,_0x303bec,_0x2dee51[a0_0x5a29('0x5b7')](_0x59938d,_0x5bf6a3,_0x1139ca,_0x5a78ab,!0x0)];}},{'key':'_getArrowBodyPoints','value':function(_0x6703c2,_0x1afc4d,_0x3bd2df,_0x37502c){for(var _0x1d6de9=_0x2dee51['wholeDistance'](_0x6703c2),_0x30f209=_0x2dee51[a0_0x5a29('0x531')](_0x6703c2)*_0x37502c,_0x5bb20c=(_0x30f209-_0x2dee51[a0_0x5a29('0x7b2')](_0x1afc4d,_0x3bd2df))/0x2,_0x57b359=0x0,_0x25afab=[],_0x2ba8e3=[],_0x51e23f=0x1;_0x51e23f<_0x6703c2['length']-0x1;_0x51e23f++){var _0x16b2be=_0x2dee51[a0_0x5a29('0x7ea')](_0x6703c2[_0x51e23f-0x1],_0x6703c2[_0x51e23f],_0x6703c2[_0x51e23f+0x1])/0x2,_0x39aa4e=(_0x30f209/0x2-(_0x57b359+=_0x2dee51[a0_0x5a29('0x7b2')](_0x6703c2[_0x51e23f-0x1],_0x6703c2[_0x51e23f]))/_0x1d6de9*_0x5bb20c)/Math[a0_0x5a29('0x1a7')](_0x16b2be),_0x226797=_0x2dee51[a0_0x5a29('0x5b7')](_0x6703c2[_0x51e23f-0x1],_0x6703c2[_0x51e23f],Math['PI']-_0x16b2be,_0x39aa4e,!0x0),_0x266c91=_0x2dee51[a0_0x5a29('0x5b7')](_0x6703c2[_0x51e23f-0x1],_0x6703c2[_0x51e23f],_0x16b2be,_0x39aa4e,!0x1);_0x25afab[a0_0x5a29('0x3cd')](_0x226797),_0x2ba8e3[a0_0x5a29('0x3cd')](_0x266c91);}return _0x25afab[a0_0x5a29('0x6c9')](_0x2ba8e3);}},{'key':a0_0x5a29('0x553'),'value':function(_0x11b30a,_0x528393,_0x441ea7){var _0x32a6dd,_0x6f8725,_0x5db2d3,_0x4947e5,_0x1b6776=_0x2dee51[a0_0x5a29('0x48f')](_0x11b30a,_0x528393),_0x19c143=_0x2dee51[a0_0x5a29('0x7b2')](_0x1b6776,_0x441ea7),_0x103d7b=_0x2dee51[a0_0x5a29('0x7ea')](_0x11b30a,_0x1b6776,_0x441ea7);return _0x103d7b<_0x1139ca?(_0x6f8725=_0x19c143*Math['sin'](_0x103d7b),_0x5db2d3=_0x19c143*Math[a0_0x5a29('0x5cc')](_0x103d7b),_0x4947e5=_0x2dee51['getThirdPoint'](_0x11b30a,_0x1b6776,_0x1139ca,_0x6f8725,!0x1),_0x32a6dd=_0x2dee51[a0_0x5a29('0x5b7')](_0x1b6776,_0x4947e5,_0x1139ca,_0x5db2d3,!0x0)):_0x103d7b>=_0x1139ca&&_0x103d7b<Math['PI']?(_0x6f8725=_0x19c143*Math['sin'](Math['PI']-_0x103d7b),_0x5db2d3=_0x19c143*Math[a0_0x5a29('0x5cc')](Math['PI']-_0x103d7b),_0x4947e5=_0x2dee51[a0_0x5a29('0x5b7')](_0x11b30a,_0x1b6776,_0x1139ca,_0x6f8725,!0x1),_0x32a6dd=_0x2dee51[a0_0x5a29('0x5b7')](_0x1b6776,_0x4947e5,_0x1139ca,_0x5db2d3,!0x1)):_0x103d7b>=Math['PI']&&_0x103d7b<1.5*Math['PI']?(_0x6f8725=_0x19c143*Math['sin'](_0x103d7b-Math['PI']),_0x5db2d3=_0x19c143*Math[a0_0x5a29('0x5cc')](_0x103d7b-Math['PI']),_0x4947e5=_0x2dee51[a0_0x5a29('0x5b7')](_0x11b30a,_0x1b6776,_0x1139ca,_0x6f8725,!0x0),_0x32a6dd=_0x2dee51[a0_0x5a29('0x5b7')](_0x1b6776,_0x4947e5,_0x1139ca,_0x5db2d3,!0x0)):(_0x6f8725=_0x19c143*Math[a0_0x5a29('0x1a7')](0x2*Math['PI']-_0x103d7b),_0x5db2d3=_0x19c143*Math[a0_0x5a29('0x5cc')](0x2*Math['PI']-_0x103d7b),_0x4947e5=_0x2dee51['getThirdPoint'](_0x11b30a,_0x1b6776,_0x1139ca,_0x6f8725,!0x0),_0x32a6dd=_0x2dee51['getThirdPoint'](_0x1b6776,_0x4947e5,_0x1139ca,_0x5db2d3,!0x1)),_0x32a6dd;}},{'key':a0_0x5a29('0xf7'),'value':function(){var _0x302f9d,_0xe633fa,_0x5f550f=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')],_0x4d7f76=void 0x0,_0x468695=void 0x0,_0x4eff5c=_0xcae02e['parsePolygonCoordToArray'](_0x3dbc2f[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]))[0x0],_0x3400bd=_0x4eff5c[0x0],_0x327146=_0x4eff5c[0x1],_0x2180bd=_0x4eff5c[0x2];_0x4d7f76=0x3===_0x5f550f?this[a0_0x5a29('0x553')](_0x3400bd,_0x327146,_0x2180bd):_0x4eff5c[0x3],_0x468695=0x3===_0x5f550f||0x4===_0x5f550f?_0x2dee51[a0_0x5a29('0x48f')](_0x3400bd,_0x327146):_0x4eff5c[0x4],_0x2dee51[a0_0x5a29('0x4dc')](_0x3400bd,_0x327146,_0x2180bd)?(_0x302f9d=this[a0_0x5a29('0x7a7')](_0x3400bd,_0x468695,_0x4d7f76,!0x1),_0xe633fa=this['_getArrowPoints'](_0x468695,_0x327146,_0x2180bd,!0x0)):(_0x302f9d=this[a0_0x5a29('0x7a7')](_0x327146,_0x468695,_0x2180bd,!0x1),_0xe633fa=this[a0_0x5a29('0x7a7')](_0x468695,_0x3400bd,_0x4d7f76,!0x0));var _0x136ab0=_0x302f9d[a0_0x5a29('0x515')],_0x498025=(_0x136ab0-0x5)/0x2,_0x16a980=_0x302f9d['slice'](0x0,_0x498025),_0x4378bd=_0x302f9d[a0_0x5a29('0x723')](_0x498025,_0x498025+0x5),_0x37abcf=_0x302f9d[a0_0x5a29('0x723')](_0x498025+0x5,_0x136ab0),_0x3a7943=_0xe633fa[a0_0x5a29('0x723')](0x0,_0x498025),_0x153f2c=_0xe633fa[a0_0x5a29('0x723')](_0x498025,_0x498025+0x5),_0x32f120=_0xe633fa[a0_0x5a29('0x723')](_0x498025+0x5,_0x136ab0);_0x3a7943=_0x2dee51[a0_0x5a29('0x176')](_0x3a7943);var _0x46c081=_0x2dee51[a0_0x5a29('0x176')](_0x32f120[a0_0x5a29('0x6c9')](_0x16a980[a0_0x5a29('0x723')](0x1)));return _0x37abcf=_0x2dee51[a0_0x5a29('0x176')](_0x37abcf),new _0x1f777f['PolygonHierarchy'](_0x3dbc2f[a0_0x5a29('0x7a')](_0xcae02e[a0_0x5a29('0x21d')](_0x3a7943[a0_0x5a29('0x6c9')](_0x153f2c,_0x46c081,_0x4378bd,_0x37abcf))));}},{'key':a0_0x5a29('0x4e0'),'set':function(_0xf8d7b3){this[a0_0x5a29('0x62')]=_0xf8d7b3;},'get':function(){return this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x329'),'get':function(){return this[a0_0x5a29('0xf7')]();}}]),_0x15fe83;}();function _0x5e94b6(_0x390023,_0x22d16b){var _0x2a20d2=Object['keys'](_0x390023);if(Object[a0_0x5a29('0x75')]){var _0x34f6fb=Object['getOwnPropertySymbols'](_0x390023);_0x22d16b&&(_0x34f6fb=_0x34f6fb[a0_0x5a29('0x48a')](function(_0x4a8269){return Object[a0_0x5a29('0x11a')](_0x390023,_0x4a8269)['enumerable'];})),_0x2a20d2['push'][a0_0x5a29('0x758')](_0x2a20d2,_0x34f6fb);}return _0x2a20d2;}function _0x930f80(_0x27a1a7){for(var _0x31c617=0x1;_0x31c617<arguments[a0_0x5a29('0x515')];_0x31c617++){var _0x5d5ad4=null!=arguments[_0x31c617]?arguments[_0x31c617]:{};_0x31c617%0x2?_0x5e94b6(Object(_0x5d5ad4),!0x0)['forEach'](function(_0x3496d7){_0x59708f()(_0x27a1a7,_0x3496d7,_0x5d5ad4[_0x3496d7]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x27a1a7,Object[a0_0x5a29('0x711')](_0x5d5ad4)):_0x5e94b6(Object(_0x5d5ad4))[a0_0x5a29('0x570')](function(_0x25d994){Object[a0_0x5a29('0xe7')](_0x27a1a7,_0x25d994,Object[a0_0x5a29('0x11a')](_0x5d5ad4,_0x25d994));});}return _0x27a1a7;}function _0x54ae34(_0x12b1d7){var _0x5b5ec8=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x393dc2){return!0x1;}}();return function(){var _0x3f8356,_0x40d609=_0x3c6509()(_0x12b1d7);if(_0x5b5ec8){var _0xf0426=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x3f8356=Reflect[a0_0x5a29('0x138')](_0x40d609,arguments,_0xf0426);}else _0x3f8356=_0x40d609[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x3f8356);};}var _0x40b1f5=DC[a0_0x5a29('0x923')],_0x369f93=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x315582={'material':_0x369f93[a0_0x5a29('0x82')][a0_0x5a29('0xf3')]['withAlpha'](0.6),'fill':!0x0},_0x20b508=function(_0x1d9150){_0x5a1389()(_0x17286a,_0x1d9150);var _0x53ce66=_0x54ae34(_0x17286a);function _0x17286a(_0x2ffa4,_0x4efb13){var _0x5d8fa8;return _0x1ee296()(this,_0x17286a),(_0x5d8fa8=_0x53ce66[a0_0x5a29('0x351')](this,_0x2ffa4))[a0_0x5a29('0x62')]=[],_0x5d8fa8['_floatingAnchor']=void 0x0,_0x5d8fa8['_style']=_0x930f80(_0x930f80({},_0x315582),_0x4efb13),_0x5d8fa8['_graphics']=new _0x2a1f3c(),_0x5d8fa8[a0_0x5a29('0x727')](),_0x5d8fa8;}return _0x1fafe8()(_0x17286a,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x79b859=this;this[a0_0x5a29('0xe')]=new _0x369f93['Entity']({'polygon':_0x930f80(_0x930f80({},this[a0_0x5a29('0x3e9')]),{},{'hierarchy':new _0x369f93[(a0_0x5a29('0x305'))](function(){return _0x79b859[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x2?(_0x79b859[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=_0x79b859[a0_0x5a29('0x62')],_0x79b859[a0_0x5a29('0x9')][a0_0x5a29('0x329')]):null;},!0x1)})}),this['_plot'][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x577c4f){var _0x5190d6=this[a0_0x5a29('0x62')]['length'];if(0x0===_0x5190d6&&(this[a0_0x5a29('0x62')]['push'](_0x577c4f[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x314')](_0x577c4f[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x8b2')]=this['createAnchor'](_0x577c4f[a0_0x5a29('0x6e5')])),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x577c4f[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=this[a0_0x5a29('0x62')],this[a0_0x5a29('0x314')](_0x577c4f[a0_0x5a29('0x6e5')]),_0x5190d6>0x3){this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this[a0_0x5a29('0x137')]();var _0x2c3d60=new DC[(a0_0x5a29('0x7cf'))](_0x40b1f5[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]));_0x2c3d60[a0_0x5a29('0x1f1')](this[a0_0x5a29('0x3e9')]),this[a0_0x5a29('0x35a')][a0_0x5a29('0x86a')]['raiseEvent'](_0x2c3d60);}}},{'key':a0_0x5a29('0x914'),'value':function(_0x2ab73e){this['_plot'][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x2ab73e[a0_0x5a29('0x12f')],'单击选择点位'),this['_floatingAnchor']&&(this[a0_0x5a29('0x8b2')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x2ab73e[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')]['pop'](),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x2ab73e[a0_0x5a29('0x6e5')]));}}]),_0x17286a;}(_0x3d9c2f),_0x415565=DC,_0xc0afc1=_0x415565[a0_0x5a29('0x923')],_0x2c9248=_0x415565[a0_0x5a29('0x36e')],_0x7a49b3=_0x415565[a0_0x5a29('0x5b2')],_0xf58ea=DC['Namespace'][a0_0x5a29('0x6e8')],_0x42467b=Math['PI']/0x2,_0x2a3bbd=function(){function _0x118738(_0x407ae5){_0x1ee296()(this,_0x118738),this['_positions']=(null==_0x407ae5?void 0x0:_0x407ae5['positions'])||[],this[a0_0x5a29('0x2e0')]=0.15,this['neckWidthFactor']=0.2,this[a0_0x5a29('0x3fc')]=0.25,this['headAngle']=Math['PI']/8.5,this[a0_0x5a29('0x437')]=Math['PI']/0xd;}return _0x1fafe8()(_0x118738,[{'key':a0_0x5a29('0xf7'),'value':function(){var _0x1d4f6f=_0x2c9248[a0_0x5a29('0x41')](_0xc0afc1[a0_0x5a29('0x87b')](this['_positions']))[0x0],_0x31cdda=_0x1d4f6f[0x0],_0x3bb23a=_0x1d4f6f[0x1],_0x15c6dd=_0x7a49b3[a0_0x5a29('0x531')](_0x1d4f6f),_0x5a7de3=_0x15c6dd*this[a0_0x5a29('0x2e0')],_0x47d619=_0x15c6dd*this['neckWidthFactor'],_0x2ff495=_0x15c6dd*this[a0_0x5a29('0x3fc')],_0x112314=_0x7a49b3['getThirdPoint'](_0x3bb23a,_0x31cdda,_0x42467b,_0x5a7de3,!0x0),_0x50f421=_0x7a49b3[a0_0x5a29('0x5b7')](_0x3bb23a,_0x31cdda,_0x42467b,_0x5a7de3,!0x1),_0x24cb65=_0x7a49b3[a0_0x5a29('0x5b7')](_0x31cdda,_0x3bb23a,this['headAngle'],_0x2ff495,!0x1),_0x520a01=_0x7a49b3['getThirdPoint'](_0x31cdda,_0x3bb23a,this[a0_0x5a29('0x696')],_0x2ff495,!0x0),_0x3f80fb=_0x7a49b3[a0_0x5a29('0x5b7')](_0x31cdda,_0x3bb23a,this[a0_0x5a29('0x437')],_0x47d619,!0x1),_0x7bf0f7=_0x7a49b3['getThirdPoint'](_0x31cdda,_0x3bb23a,this[a0_0x5a29('0x437')],_0x47d619,!0x0);return new _0xf58ea[(a0_0x5a29('0x3b6'))](_0xc0afc1[a0_0x5a29('0x7a')](_0x2c9248[a0_0x5a29('0x21d')]([_0x112314,_0x3f80fb,_0x24cb65,_0x3bb23a,_0x520a01,_0x7bf0f7,_0x50f421])));}},{'key':'positions','set':function(_0x2916a1){this['_positions']=_0x2916a1;},'get':function(){return this[a0_0x5a29('0x62')];}},{'key':a0_0x5a29('0x329'),'get':function(){return this[a0_0x5a29('0xf7')]();}}]),_0x118738;}();function _0x5cee2e(_0x576fe1,_0x300c34){var _0x156110=Object['keys'](_0x576fe1);if(Object[a0_0x5a29('0x75')]){var _0x679af5=Object[a0_0x5a29('0x75')](_0x576fe1);_0x300c34&&(_0x679af5=_0x679af5[a0_0x5a29('0x48a')](function(_0x5d0b5b){return Object[a0_0x5a29('0x11a')](_0x576fe1,_0x5d0b5b)[a0_0x5a29('0x12e')];})),_0x156110[a0_0x5a29('0x3cd')]['apply'](_0x156110,_0x679af5);}return _0x156110;}function _0x3a93de(_0x1cb643){for(var _0x2e1dde=0x1;_0x2e1dde<arguments['length'];_0x2e1dde++){var _0x48d65f=null!=arguments[_0x2e1dde]?arguments[_0x2e1dde]:{};_0x2e1dde%0x2?_0x5cee2e(Object(_0x48d65f),!0x0)['forEach'](function(_0x15dc4d){_0x59708f()(_0x1cb643,_0x15dc4d,_0x48d65f[_0x15dc4d]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x1cb643,Object[a0_0x5a29('0x711')](_0x48d65f)):_0x5cee2e(Object(_0x48d65f))[a0_0x5a29('0x570')](function(_0x55c170){Object[a0_0x5a29('0xe7')](_0x1cb643,_0x55c170,Object[a0_0x5a29('0x11a')](_0x48d65f,_0x55c170));});}return _0x1cb643;}function _0x2d5f4e(_0x1906ee){var _0x425a1d=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x49fb01){return!0x1;}}();return function(){var _0xcc91da,_0x3b5fb2=_0x3c6509()(_0x1906ee);if(_0x425a1d){var _0x3634d4=_0x3c6509()(this)[a0_0x5a29('0x825')];_0xcc91da=Reflect[a0_0x5a29('0x138')](_0x3b5fb2,arguments,_0x3634d4);}else _0xcc91da=_0x3b5fb2[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0xcc91da);};}var _0x182214=DC[a0_0x5a29('0x923')],_0x553b12=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x25ca15={'material':_0x553b12[a0_0x5a29('0x82')]['YELLOW'][a0_0x5a29('0x3eb')](0.6),'fill':!0x0},_0x165d2e=function(_0x48c072){_0x5a1389()(_0x1e187d,_0x48c072);var _0x17911a=_0x2d5f4e(_0x1e187d);function _0x1e187d(_0x59a672,_0x44a526){var _0x1257de;return _0x1ee296()(this,_0x1e187d),(_0x1257de=_0x17911a['call'](this,_0x59a672))[a0_0x5a29('0x62')]=[],_0x1257de['_floatingAnchor']=void 0x0,_0x1257de['_style']=_0x3a93de(_0x3a93de({},_0x25ca15),_0x44a526),_0x1257de[a0_0x5a29('0x9')]=new _0x2a3bbd(),_0x1257de[a0_0x5a29('0x727')](),_0x1257de;}return _0x1fafe8()(_0x1e187d,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x176fd7=this;this[a0_0x5a29('0xe')]=new _0x553b12[(a0_0x5a29('0x608'))]({'polygon':_0x3a93de(_0x3a93de({},this[a0_0x5a29('0x3e9')]),{},{'hierarchy':new _0x553b12[(a0_0x5a29('0x305'))](function(){return _0x176fd7[a0_0x5a29('0x62')]['length']>0x1?(_0x176fd7[a0_0x5a29('0x9')]['positions']=_0x176fd7[a0_0x5a29('0x62')],_0x176fd7[a0_0x5a29('0x9')]['hierarchy']):null;},!0x1)})}),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':'_mouseClickHandler','value':function(_0x4c6c2e){var _0x173412=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')];if(0x0===_0x173412&&(this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x4c6c2e[a0_0x5a29('0x6e5')]),this['createAnchor'](_0x4c6c2e[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x8b2')]=this[a0_0x5a29('0x314')](_0x4c6c2e['surfacePosition'])),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x4c6c2e[a0_0x5a29('0x6e5')]),this['_graphics']['positions']=this[a0_0x5a29('0x62')],this[a0_0x5a29('0x314')](_0x4c6c2e[a0_0x5a29('0x6e5')]),_0x173412>0x1){this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this[a0_0x5a29('0x137')]();var _0x488047=new DC[(a0_0x5a29('0x396'))](_0x182214[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]));_0x488047['setStyle'](this[a0_0x5a29('0x3e9')]),this[a0_0x5a29('0x35a')][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](_0x488047);}}},{'key':a0_0x5a29('0x914'),'value':function(_0x394774){this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x394774['windowPosition'],'单击选择点位'),this['_floatingAnchor']&&(this['_floatingAnchor']['position']['setValue'](_0x394774[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x394774[a0_0x5a29('0x6e5')]));}}]),_0x1e187d;}(_0x3d9c2f),_0x2c3d99=DC,_0x2a0d27=_0x2c3d99['Transform'],_0x39155b=_0x2c3d99['Parse'],_0x9b286a=_0x2c3d99['PlotUtil'],_0x2d58c5=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x16ce78=Math['PI']/0x2,_0x530b6c=function(){function _0x51d3ae(_0x138d92){_0x1ee296()(this,_0x51d3ae),this['_positions']=(null==_0x138d92?void 0x0:_0x138d92['positions'])||[],this['t']=0.4;}return _0x1fafe8()(_0x51d3ae,[{'key':a0_0x5a29('0xf7'),'value':function(){var _0x37aae3=_0x39155b[a0_0x5a29('0x41')](_0x2a0d27[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]))[0x0];if(0x2===this[a0_0x5a29('0x62')]['length']){var _0x178f4f=_0x9b286a['mid'](_0x37aae3[0x0],_0x37aae3[0x1]),_0x2eab3d=_0x9b286a['distance'](_0x37aae3[0x0],_0x178f4f)/0.9,_0x193891=_0x9b286a['getThirdPoint'](_0x37aae3[0x0],_0x178f4f,_0x16ce78,_0x2eab3d,!0x0);_0x37aae3=[_0x37aae3[0x0],_0x193891,_0x37aae3[0x1]];}var _0x174e6d=DC[a0_0x5a29('0x5b2')]['mid'](_0x37aae3[0x0],_0x37aae3[0x2]);_0x37aae3[a0_0x5a29('0x3cd')](_0x174e6d,_0x37aae3[0x0],_0x37aae3[0x1]);for(var _0x3fa554=[],_0x46bf47=0x0;_0x46bf47<_0x37aae3[a0_0x5a29('0x515')]-0x2;_0x46bf47++){var _0x181cf7=_0x37aae3[_0x46bf47],_0x222761=_0x37aae3[_0x46bf47+0x1],_0x3e670c=_0x37aae3[_0x46bf47+0x2],_0x5225c5=_0x9b286a[a0_0x5a29('0x7f6')](this['t'],_0x181cf7,_0x222761,_0x3e670c);_0x3fa554=_0x3fa554[a0_0x5a29('0x6c9')](_0x5225c5);}var _0x3c0a7f=_0x3fa554[a0_0x5a29('0x515')];_0x3fa554=[_0x3fa554[_0x3c0a7f-0x1]][a0_0x5a29('0x6c9')](_0x3fa554[a0_0x5a29('0x723')](0x0,_0x3c0a7f-0x1));for(var _0x3b61eb=[],_0x373b39=0x0;_0x373b39<_0x37aae3[a0_0x5a29('0x515')]-0x2;_0x373b39++){var _0xd592e0=_0x37aae3[_0x373b39],_0x1b72f5=_0x37aae3[_0x373b39+0x1];_0x3b61eb['push'](_0xd592e0);for(var _0x2ca50=0x0;_0x2ca50<=0x64;_0x2ca50++){var _0x4782e9=_0x9b286a[a0_0x5a29('0x7a0')](_0x2ca50/0x64,_0xd592e0,_0x3fa554[0x2*_0x373b39],_0x3fa554[0x2*_0x373b39+0x1],_0x1b72f5);_0x3b61eb[a0_0x5a29('0x3cd')](_0x4782e9);}_0x3b61eb[a0_0x5a29('0x3cd')](_0x1b72f5);}return new _0x2d58c5[(a0_0x5a29('0x3b6'))](_0x2a0d27[a0_0x5a29('0x7a')](_0x39155b['parsePositions'](_0x3b61eb)));}},{'key':a0_0x5a29('0x4e0'),'set':function(_0x13529c){this[a0_0x5a29('0x62')]=_0x13529c;},'get':function(){return this['_positions'];}},{'key':'hierarchy','get':function(){return this[a0_0x5a29('0xf7')]();}}]),_0x51d3ae;}();function _0x41a868(_0x4c1baa,_0x206f9a){var _0x3a9c96=Object[a0_0x5a29('0x148')](_0x4c1baa);if(Object[a0_0x5a29('0x75')]){var _0x12ac65=Object[a0_0x5a29('0x75')](_0x4c1baa);_0x206f9a&&(_0x12ac65=_0x12ac65['filter'](function(_0x26ce3b){return Object[a0_0x5a29('0x11a')](_0x4c1baa,_0x26ce3b)['enumerable'];})),_0x3a9c96[a0_0x5a29('0x3cd')]['apply'](_0x3a9c96,_0x12ac65);}return _0x3a9c96;}function _0x2f78d8(_0x5d4088){for(var _0x480963=0x1;_0x480963<arguments[a0_0x5a29('0x515')];_0x480963++){var _0x84a8de=null!=arguments[_0x480963]?arguments[_0x480963]:{};_0x480963%0x2?_0x41a868(Object(_0x84a8de),!0x0)[a0_0x5a29('0x570')](function(_0x27d7e8){_0x59708f()(_0x5d4088,_0x27d7e8,_0x84a8de[_0x27d7e8]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x5d4088,Object['getOwnPropertyDescriptors'](_0x84a8de)):_0x41a868(Object(_0x84a8de))[a0_0x5a29('0x570')](function(_0xca0e0e){Object[a0_0x5a29('0xe7')](_0x5d4088,_0xca0e0e,Object[a0_0x5a29('0x11a')](_0x84a8de,_0xca0e0e));});}return _0x5d4088;}function _0x37a71f(_0x905092){var _0x302568=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x58aaac){return!0x1;}}();return function(){var _0x58ab22,_0x59a29b=_0x3c6509()(_0x905092);if(_0x302568){var _0x5b1037=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x58ab22=Reflect['construct'](_0x59a29b,arguments,_0x5b1037);}else _0x58ab22=_0x59a29b['apply'](this,arguments);return _0x1fe488()(this,_0x58ab22);};}var _0x1df6aa=DC[a0_0x5a29('0x923')],_0x394981=DC[a0_0x5a29('0x239')]['Cesium'],_0x240537={'material':_0x394981[a0_0x5a29('0x82')][a0_0x5a29('0xf3')][a0_0x5a29('0x3eb')](0.6),'fill':!0x0},_0x238952=function(_0x3ae0e1){_0x5a1389()(_0x1f2808,_0x3ae0e1);var _0x27cd62=_0x37a71f(_0x1f2808);function _0x1f2808(_0x29a1ac,_0x7b2c43){var _0xb7e78e;return _0x1ee296()(this,_0x1f2808),(_0xb7e78e=_0x27cd62[a0_0x5a29('0x351')](this,_0x29a1ac))['_positions']=[],_0xb7e78e[a0_0x5a29('0x8b2')]=void 0x0,_0xb7e78e['_style']=_0x2f78d8(_0x2f78d8({},_0x240537),_0x7b2c43),_0xb7e78e['_graphics']=new _0x530b6c(),_0xb7e78e[a0_0x5a29('0x727')](),_0xb7e78e;}return _0x1fafe8()(_0x1f2808,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x33d116=this;this[a0_0x5a29('0xe')]=new _0x394981['Entity']({'polygon':_0x2f78d8(_0x2f78d8({},this[a0_0x5a29('0x3e9')]),{},{'hierarchy':new _0x394981['CallbackProperty'](function(){return _0x33d116[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x1?(_0x33d116[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=_0x33d116[a0_0x5a29('0x62')],_0x33d116[a0_0x5a29('0x9')][a0_0x5a29('0x329')]):null;},!0x1)})}),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x41d914){var _0x22c060=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')];if(0x0===_0x22c060&&(this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x41d914[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x314')](_0x41d914[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x8b2')]=this[a0_0x5a29('0x314')](_0x41d914[a0_0x5a29('0x6e5')])),this[a0_0x5a29('0x62')]['push'](_0x41d914[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=this[a0_0x5a29('0x62')],this[a0_0x5a29('0x314')](_0x41d914[a0_0x5a29('0x6e5')]),_0x22c060>0x2){this['_positions']['pop'](),this['unbindEvent']();var _0x58017d=new DC[(a0_0x5a29('0x158'))](_0x1df6aa[a0_0x5a29('0x87b')](this['_positions']));_0x58017d['setStyle'](this['_style']),this[a0_0x5a29('0x35a')]['plotEvent']['raiseEvent'](_0x58017d);}}},{'key':a0_0x5a29('0x914'),'value':function(_0x5829cf){this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x5829cf[a0_0x5a29('0x12f')],a0_0x5a29('0x7ef')),this[a0_0x5a29('0x8b2')]&&(this[a0_0x5a29('0x8b2')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x5829cf[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this['_positions'][a0_0x5a29('0x3cd')](_0x5829cf[a0_0x5a29('0x6e5')]));}}]),_0x1f2808;}(_0x3d9c2f);function _0x5cc812(_0x360543){var _0x4ed770=function(){if('undefined'==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString']['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x5a2369){return!0x1;}}();return function(){var _0x217d32,_0xee6633=_0x3c6509()(_0x360543);if(_0x4ed770){var _0x48b749=_0x3c6509()(this)['constructor'];_0x217d32=Reflect[a0_0x5a29('0x138')](_0xee6633,arguments,_0x48b749);}else _0x217d32=_0xee6633['apply'](this,arguments);return _0x1fe488()(this,_0x217d32);};}var _0x3b0d69=DC,_0x2114f7=_0x3b0d69[a0_0x5a29('0x923')],_0x352787=_0x3b0d69[a0_0x5a29('0x36e')],_0x12fc13=_0x3b0d69[a0_0x5a29('0x5b2')],_0x496731=DC['Namespace'][a0_0x5a29('0x6e8')],_0x484a4a=function(_0x33e9fb){_0x5a1389()(_0x40936f,_0x33e9fb);var _0x23265d=_0x5cc812(_0x40936f);function _0x40936f(_0x5bf11f){var _0x7b055f;return _0x1ee296()(this,_0x40936f),(_0x7b055f=_0x23265d[a0_0x5a29('0x351')](this,_0x5bf11f))[a0_0x5a29('0x21b')]=0.18,_0x7b055f[a0_0x5a29('0x3fc')]=0.3,_0x7b055f[a0_0x5a29('0x4d7')]=0.85,_0x7b055f[a0_0x5a29('0x2de')]=0.15,_0x7b055f['tailWidthFactor']=0.1,_0x7b055f[a0_0x5a29('0x7e6')]=0.8,_0x7b055f[a0_0x5a29('0x56a')]=0x1,_0x7b055f;}return _0x1fafe8()(_0x40936f,[{'key':a0_0x5a29('0xf7'),'value':function(){var _0x314a7a=_0x352787[a0_0x5a29('0x41')](_0x2114f7['transformCartesianArrayToWGS84Array'](this['_positions']))[0x0],_0x278369=_0x314a7a[0x0],_0x30ebed=_0x314a7a[0x1];_0x12fc13[a0_0x5a29('0x4dc')](_0x314a7a[0x0],_0x314a7a[0x1],_0x314a7a[0x2])&&(_0x278369=_0x314a7a[0x1],_0x30ebed=_0x314a7a[0x0]);var _0x39eee2=[_0x12fc13['mid'](_0x278369,_0x30ebed)][a0_0x5a29('0x6c9')](_0x314a7a[a0_0x5a29('0x723')](0x2)),_0x2b3ad5=this[a0_0x5a29('0x814')](_0x39eee2,_0x278369,_0x30ebed),_0x4fd857=_0x2b3ad5[0x0],_0x3e2229=_0x2b3ad5[0x4],_0x50e908=_0x12fc13[a0_0x5a29('0x7b2')](_0x278369,_0x30ebed),_0x57d81d=_0x12fc13[a0_0x5a29('0x531')](_0x39eee2),_0x2b129d=_0x57d81d*this[a0_0x5a29('0x2e0')]*this[a0_0x5a29('0x56a')],_0x4f24a1=_0x12fc13[a0_0x5a29('0x5b7')](_0x39eee2[0x1],_0x39eee2[0x0],0x0,_0x2b129d,!0x0),_0x3e0563=_0x50e908/_0x57d81d,_0xa8ea2d=this[a0_0x5a29('0x718')](_0x39eee2,_0x4fd857,_0x3e2229,_0x3e0563),_0x37b610=_0xa8ea2d['length'],_0x5df059=[_0x278369][a0_0x5a29('0x6c9')](_0xa8ea2d[a0_0x5a29('0x723')](0x0,_0x37b610/0x2));_0x5df059[a0_0x5a29('0x3cd')](_0x4fd857);var _0x1c35d3=[_0x30ebed][a0_0x5a29('0x6c9')](_0xa8ea2d[a0_0x5a29('0x723')](_0x37b610/0x2,_0x37b610));return _0x1c35d3['push'](_0x3e2229),_0x5df059=_0x12fc13[a0_0x5a29('0x9d')](_0x5df059),_0x1c35d3=_0x12fc13[a0_0x5a29('0x9d')](_0x1c35d3),new _0x496731['PolygonHierarchy'](_0x2114f7['transformWGS84ArrayToCartesianArray'](_0x352787[a0_0x5a29('0x21d')](_0x5df059[a0_0x5a29('0x6c9')](_0x2b3ad5,_0x1c35d3[a0_0x5a29('0x39e')](),[_0x4f24a1,_0x5df059[0x0]]))));}}]),_0x40936f;}(_0x44623b);function _0x5c08d9(_0x21a357,_0x178863){var _0x4d18cb=Object[a0_0x5a29('0x148')](_0x21a357);if(Object[a0_0x5a29('0x75')]){var _0xcaf35c=Object[a0_0x5a29('0x75')](_0x21a357);_0x178863&&(_0xcaf35c=_0xcaf35c[a0_0x5a29('0x48a')](function(_0x10c451){return Object[a0_0x5a29('0x11a')](_0x21a357,_0x10c451)['enumerable'];})),_0x4d18cb[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x4d18cb,_0xcaf35c);}return _0x4d18cb;}function _0x4a4988(_0x477274){for(var _0x58a5ab=0x1;_0x58a5ab<arguments[a0_0x5a29('0x515')];_0x58a5ab++){var _0x1075cd=null!=arguments[_0x58a5ab]?arguments[_0x58a5ab]:{};_0x58a5ab%0x2?_0x5c08d9(Object(_0x1075cd),!0x0)[a0_0x5a29('0x570')](function(_0x45d08d){_0x59708f()(_0x477274,_0x45d08d,_0x1075cd[_0x45d08d]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x477274,Object[a0_0x5a29('0x711')](_0x1075cd)):_0x5c08d9(Object(_0x1075cd))['forEach'](function(_0x3bd6ce){Object[a0_0x5a29('0xe7')](_0x477274,_0x3bd6ce,Object[a0_0x5a29('0x11a')](_0x1075cd,_0x3bd6ce));});}return _0x477274;}function _0x13aae6(_0x553c10){var _0x3ff11a=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0xb05ca3){return!0x1;}}();return function(){var _0x369b73,_0x444805=_0x3c6509()(_0x553c10);if(_0x3ff11a){var _0x4fa193=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x369b73=Reflect[a0_0x5a29('0x138')](_0x444805,arguments,_0x4fa193);}else _0x369b73=_0x444805[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x369b73);};}var _0x324e64=DC[a0_0x5a29('0x923')],_0x133e56=DC[a0_0x5a29('0x239')]['Cesium'],_0x315ff7={'material':_0x133e56['Color'][a0_0x5a29('0xf3')][a0_0x5a29('0x3eb')](0.6),'fill':!0x0},_0x3ae265=function(_0x2ad613){_0x5a1389()(_0x359243,_0x2ad613);var _0x2fee0e=_0x13aae6(_0x359243);function _0x359243(_0x56a481,_0x41933b){var _0x58094d;return _0x1ee296()(this,_0x359243),(_0x58094d=_0x2fee0e[a0_0x5a29('0x351')](this,_0x56a481))[a0_0x5a29('0x62')]=[],_0x58094d[a0_0x5a29('0x8b2')]=void 0x0,_0x58094d[a0_0x5a29('0x3e9')]=_0x4a4988(_0x4a4988({},_0x315ff7),_0x41933b),_0x58094d['_graphics']=new _0x484a4a(),_0x58094d[a0_0x5a29('0x727')](),_0x58094d;}return _0x1fafe8()(_0x359243,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x2e2046=this;this[a0_0x5a29('0xe')]=new _0x133e56[(a0_0x5a29('0x608'))]({'polygon':_0x4a4988(_0x4a4988({},this[a0_0x5a29('0x3e9')]),{},{'hierarchy':new _0x133e56[(a0_0x5a29('0x305'))](function(){return _0x2e2046[a0_0x5a29('0x62')]['length']>0x2?(_0x2e2046[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=_0x2e2046[a0_0x5a29('0x62')],_0x2e2046[a0_0x5a29('0x9')][a0_0x5a29('0x329')]):null;},!0x1)})}),this['_plot'][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x3a772f){var _0x2eaa8b=this[a0_0x5a29('0x62')]['length'];if(0x0===_0x2eaa8b&&(this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x3a772f[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x314')](_0x3a772f[a0_0x5a29('0x6e5')]),this['_floatingAnchor']=this['createAnchor'](_0x3a772f[a0_0x5a29('0x6e5')])),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x3a772f['surfacePosition']),this['_graphics'][a0_0x5a29('0x4e0')]=this['_positions'],this[a0_0x5a29('0x314')](_0x3a772f[a0_0x5a29('0x6e5')]),_0x2eaa8b>0x2){this[a0_0x5a29('0x62')]['pop'](),this[a0_0x5a29('0x137')]();var _0x2519a0=new DC['TailedAttackArrow'](_0x324e64[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]));_0x2519a0[a0_0x5a29('0x1f1')](this[a0_0x5a29('0x3e9')]),this[a0_0x5a29('0x35a')]['plotEvent'][a0_0x5a29('0x1a0')](_0x2519a0);}}},{'key':'_mouseMoveHandler','value':function(_0x4a1ce9){this['_plot']['viewer']['tooltip'][a0_0x5a29('0x43a')](_0x4a1ce9[a0_0x5a29('0x12f')],a0_0x5a29('0x7ef')),this[a0_0x5a29('0x8b2')]&&(this[a0_0x5a29('0x8b2')][a0_0x5a29('0x53c')]['setValue'](_0x4a1ce9[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][a0_0x5a29('0x3fe')](),this['_positions'][a0_0x5a29('0x3cd')](_0x4a1ce9[a0_0x5a29('0x6e5')]));}}]),_0x359243;}(_0x3d9c2f),_0x42f751=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x1b4950=function(){function _0x1530cd(_0x293bbb){_0x1ee296()(this,_0x1530cd),this['_plot']=_0x293bbb,this[a0_0x5a29('0x6cd')]=void 0x0,this[a0_0x5a29('0x241')]=[],this[a0_0x5a29('0xe')]=void 0x0,this[a0_0x5a29('0x47b')]=void 0x0,this['_isMoving']=!0x1;}return _0x1fafe8()(_0x1530cd,[{'key':a0_0x5a29('0x727'),'value':function(){}},{'key':a0_0x5a29('0x4c0'),'value':function(){}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x25cac2){}},{'key':a0_0x5a29('0x914'),'value':function(_0x1610e1){}},{'key':a0_0x5a29('0x592'),'value':function(_0x5e18ab){}},{'key':a0_0x5a29('0x717'),'value':function(){this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')]['on'](_0x42f751[a0_0x5a29('0x1a2')]['LEFT_CLICK'],this[a0_0x5a29('0x6e9')],this),this['_plot'][a0_0x5a29('0x835')]['on'](_0x42f751['ScreenSpaceEventType'][a0_0x5a29('0x6eb')],this[a0_0x5a29('0x914')],this),this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')]['on'](_0x42f751[a0_0x5a29('0x1a2')][a0_0x5a29('0x5ca')],this[a0_0x5a29('0x592')],this);}},{'key':a0_0x5a29('0x137'),'value':function(){this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x59a')](_0x42f751[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')],this['_mouseClickHandler'],this),this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x59a')](_0x42f751[a0_0x5a29('0x1a2')]['MOUSE_MOVE'],this[a0_0x5a29('0x914')],this),this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x59a')](_0x42f751[a0_0x5a29('0x1a2')]['RIGHT_CLICK'],this[a0_0x5a29('0x592')],this);}},{'key':'createAnchor','value':function(_0xbefef6,_0x4913d9){var _0x89f801=arguments[a0_0x5a29('0x515')]>0x2&&void 0x0!==arguments[0x2]&&arguments[0x2],_0x15c202=arguments[a0_0x5a29('0x515')]>0x3&&void 0x0!==arguments[0x3]&&arguments[0x3],_0x5bdb86=_0x89f801?this[a0_0x5a29('0x35a')][a0_0x5a29('0x8ae')]['icon_midAnchor']:_0x15c202?this[a0_0x5a29('0x35a')][a0_0x5a29('0x8ae')]['icon_center']:this['_plot'][a0_0x5a29('0x8ae')][a0_0x5a29('0x31b')],_0x507da5=this[a0_0x5a29('0x35a')][a0_0x5a29('0x201')][a0_0x5a29('0x695')]({'position':_0xbefef6,'billboard':{'image':_0x5bdb86,'width':0xc,'height':0xc,'eyeOffset':new _0x42f751['ConstantProperty'](new _0x42f751[(a0_0x5a29('0x3bd'))](0x0,0x0,-0x1f4)),'heightReference':this[a0_0x5a29('0x35a')]['viewer'][a0_0x5a29('0x238')]['mode']===_0x42f751['SceneMode'][a0_0x5a29('0x3b1')]?_0x42f751[a0_0x5a29('0x306')][a0_0x5a29('0x47e')]:_0x42f751[a0_0x5a29('0x306')][a0_0x5a29('0x68b')]},'properties':{'isMid':_0x89f801,'index':_0x4913d9}});this['_anchors']['push'](_0x507da5);}},{'key':'computeMidPosition','value':function(_0x5ee76a,_0x54fa2a){var _0x9e1327=_0x42f751[a0_0x5a29('0x2b5')]['WGS84'][a0_0x5a29('0x587')](_0x5ee76a),_0x24833a=_0x42f751[a0_0x5a29('0x2b5')][a0_0x5a29('0x20a')][a0_0x5a29('0x587')](_0x54fa2a),_0x67a38b=new _0x42f751[(a0_0x5a29('0x61f'))](_0x9e1327,_0x24833a)[a0_0x5a29('0x182')](0.5);return _0x42f751[a0_0x5a29('0x2b5')][a0_0x5a29('0x20a')][a0_0x5a29('0x6fe')](_0x67a38b);}},{'key':a0_0x5a29('0x63a'),'value':function(){this['bindEvent']();}}]),_0x1530cd;}();function _0x7ee4d5(_0x16b7db){var _0x28e8ab=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype']['toString']['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x552939){return!0x1;}}();return function(){var _0x518ca3,_0x7fee7=_0x3c6509()(_0x16b7db);if(_0x28e8ab){var _0x412d35=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x518ca3=Reflect['construct'](_0x7fee7,arguments,_0x412d35);}else _0x518ca3=_0x7fee7[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x518ca3);};}var _0x60c4f9=DC['Transform'],_0x3c937c=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x162809=function(_0xf72360){_0x5a1389()(_0x2753e8,_0xf72360);var _0x428db2=_0x7ee4d5(_0x2753e8);function _0x2753e8(_0x5747e2,_0x51eed9){var _0x3a6230;return _0x1ee296()(this,_0x2753e8),(_0x3a6230=_0x428db2[a0_0x5a29('0x351')](this,_0x5747e2))['_overlay']=_0x51eed9,_0x3a6230[a0_0x5a29('0x86e')]=void 0x0,_0x3a6230['_mountEntity'](),_0x3a6230;}return _0x1fafe8()(_0x2753e8,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x4fef68=this;this[a0_0x5a29('0xe')]=new _0x3c937c[(a0_0x5a29('0x608'))](),this[a0_0x5a29('0xe')][a0_0x5a29('0x65f')](this['_overlay'][a0_0x5a29('0x67e')]),this[a0_0x5a29('0x6cd')]['show']=!0x1,this['_position']=this[a0_0x5a29('0xe')]['position'][a0_0x5a29('0x94c')](_0x3c937c[a0_0x5a29('0x8ab')]['now']()),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=new _0x3c937c[(a0_0x5a29('0x305'))](function(){return _0x4fef68[a0_0x5a29('0x86e')];}),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x914'),'value':function(_0x32a14f){this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')]['tooltip'][a0_0x5a29('0x43a')](_0x32a14f[a0_0x5a29('0x12f')],a0_0x5a29('0x737')),this[a0_0x5a29('0x86e')]=_0x32a14f[a0_0x5a29('0x6e5')];}},{'key':a0_0x5a29('0x592'),'value':function(_0x5863cb){this[a0_0x5a29('0x137')](),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x53c')]=_0x60c4f9[a0_0x5a29('0x8f')](this[a0_0x5a29('0x86e')]),this[a0_0x5a29('0x6cd')]['show']=!0x0,this[a0_0x5a29('0x35a')]['plotEvent'][a0_0x5a29('0x1a0')](this['_overlay']);}}]),_0x2753e8;}(_0x1b4950);function _0x4208ca(_0xb498e1){var _0x377c65=function(){if('undefined'==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x36023d){return!0x1;}}();return function(){var _0x401bba,_0x37ac2a=_0x3c6509()(_0xb498e1);if(_0x377c65){var _0x36f788=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x401bba=Reflect[a0_0x5a29('0x138')](_0x37ac2a,arguments,_0x36f788);}else _0x401bba=_0x37ac2a[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x401bba);};}var _0x20c734=DC[a0_0x5a29('0x923')],_0x57dce5=DC['Namespace'][a0_0x5a29('0x6e8')],_0x4638da=function(_0x549ba9){_0x5a1389()(_0x428bcf,_0x549ba9);var _0x2e860e=_0x4208ca(_0x428bcf);function _0x428bcf(_0x11ab8f,_0x4d6f50){var _0x583f9d;return _0x1ee296()(this,_0x428bcf),(_0x583f9d=_0x2e860e[a0_0x5a29('0x351')](this,_0x11ab8f))[a0_0x5a29('0x6cd')]=_0x4d6f50,_0x583f9d['_positions']=[],_0x583f9d['_mountEntity'](),_0x583f9d[a0_0x5a29('0x4c0')](),_0x583f9d;}return _0x1fafe8()(_0x428bcf,[{'key':'_mountEntity','value':function(){var _0x27fee9=this;this['_delegate']=new _0x57dce5[(a0_0x5a29('0x608'))](),this[a0_0x5a29('0xe')][a0_0x5a29('0x65f')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')]),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x1,this[a0_0x5a29('0xe')][a0_0x5a29('0x83f')][a0_0x5a29('0x4e0')]=new _0x57dce5[(a0_0x5a29('0x305'))](function(){return _0x27fee9[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x1?_0x27fee9[a0_0x5a29('0x62')]:null;},!0x1),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')]['add'](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x4c0'),'value':function(){for(var _0x3e1816=this,_0x15695c=[][a0_0x5a29('0x6c9')](this[a0_0x5a29('0x6cd')]['delegate'][a0_0x5a29('0x83f')]['positions'][a0_0x5a29('0x94c')](_0x57dce5[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]())),_0x58c3c1=0x0;_0x58c3c1<_0x15695c['length']-0x1;_0x58c3c1++){var _0x89114c=this['computeMidPosition'](_0x15695c[_0x58c3c1],_0x15695c[_0x58c3c1+0x1]);this[a0_0x5a29('0x62')]['push'](_0x15695c[_0x58c3c1]),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x89114c);}this['_positions']['push'](_0x15695c[_0x15695c[a0_0x5a29('0x515')]-0x1]),this[a0_0x5a29('0x62')][a0_0x5a29('0x570')](function(_0x12fc36,_0x5b76fa){_0x3e1816[a0_0x5a29('0x314')](_0x12fc36,_0x5b76fa,_0x5b76fa%0x2!=0x0);});}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x283126){var _0x239608=this;if(this[a0_0x5a29('0x7e5')]){if(this['_isMoving']=!0x1,this['_pickedAnchor']&&this['_pickedAnchor'][a0_0x5a29('0x53c')]){this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x283126[a0_0x5a29('0x6e5')]);var _0x17b11a=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x57dce5[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());if(_0x17b11a['isMid']){var _0xb746f=this['computeMidPosition'](this[a0_0x5a29('0x62')][_0x17b11a[a0_0x5a29('0x26e')]],this[a0_0x5a29('0x62')][_0x17b11a[a0_0x5a29('0x26e')]-0x1]),_0x512beb=this['computeMidPosition'](this[a0_0x5a29('0x62')][_0x17b11a[a0_0x5a29('0x26e')]],this[a0_0x5a29('0x62')][_0x17b11a[a0_0x5a29('0x26e')]+0x1]);this['_plot'][a0_0x5a29('0x201')][a0_0x5a29('0x8db')](),this[a0_0x5a29('0x241')]=[],this[a0_0x5a29('0x62')][a0_0x5a29('0x250')](_0x17b11a[a0_0x5a29('0x26e')],0x1,_0xb746f,_0x283126[a0_0x5a29('0x6e5')],_0x512beb),this['_positions']['forEach'](function(_0x43a2b0,_0x525448){_0x239608['createAnchor'](_0x43a2b0,_0x525448,_0x525448%0x2!=0x0);});}}}else{if(this['_isMoving']=!0x0,!_0x283126[a0_0x5a29('0x28a')]['id'])return!0x1;this[a0_0x5a29('0x47b')]=_0x283126['target']['id'];}}},{'key':a0_0x5a29('0x914'),'value':function(_0xc764b1){if(this['_plot'][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0xc764b1[a0_0x5a29('0x12f')],a0_0x5a29('0x3c7')),this[a0_0x5a29('0x7e5')]&&this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x4586c5=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x57dce5[a0_0x5a29('0x8ab')]['now']());if(this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0xc764b1[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][_0x4586c5[a0_0x5a29('0x26e')]]=_0xc764b1[a0_0x5a29('0x6e5')],!_0x4586c5['isMid']){var _0x3cc795=_0x4586c5[a0_0x5a29('0x26e')],_0x259e1=-0x1,_0x40f701=-0x1,_0x4b981e=-0x1,_0x3a4cde=-0x1,_0x49388e=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')];if(0x0===_0x3cc795?(_0x4b981e=_0x3cc795+0x2,_0x3a4cde=_0x3cc795+0x1):_0x4586c5[a0_0x5a29('0x26e')]===_0x49388e-0x1?(_0x259e1=_0x3cc795-0x2,_0x40f701=_0x3cc795-0x1):(_0x259e1=_0x3cc795-0x2,_0x40f701=_0x3cc795-0x1,_0x4b981e=_0x3cc795+0x2,_0x3a4cde=_0x3cc795+0x1),_0x259e1>0x0){var _0x53fe2c=this[a0_0x5a29('0x81')](this[a0_0x5a29('0x62')][_0x259e1],this[a0_0x5a29('0x62')][_0x3cc795]);this['_positions'][_0x40f701]=_0x53fe2c,this[a0_0x5a29('0x241')][_0x40f701][a0_0x5a29('0x53c')]['setValue'](_0x53fe2c);}if(_0x4b981e>0x0){var _0x17c1b0=this[a0_0x5a29('0x81')](this[a0_0x5a29('0x62')][_0x4b981e],this[a0_0x5a29('0x62')][_0x3cc795]);this[a0_0x5a29('0x62')][_0x3a4cde]=_0x17c1b0,this[a0_0x5a29('0x241')][_0x3a4cde][a0_0x5a29('0x53c')]['setValue'](_0x17c1b0);}}}}},{'key':a0_0x5a29('0x592'),'value':function(_0x43046c){this[a0_0x5a29('0x137')](),this['_overlay'][a0_0x5a29('0x4e0')]=_0x20c734[a0_0x5a29('0x87b')](this['_positions']),this['_overlay']['show']=!0x0,this['_plot']['plotEvent'][a0_0x5a29('0x1a0')](this[a0_0x5a29('0x6cd')]);}}]),_0x428bcf;}(_0x1b4950);function _0x309ff0(_0x41b17e){var _0x53c86c=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString']['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0xeab4b){return!0x1;}}();return function(){var _0x514c0e,_0x240a64=_0x3c6509()(_0x41b17e);if(_0x53c86c){var _0x5e3b2a=_0x3c6509()(this)['constructor'];_0x514c0e=Reflect[a0_0x5a29('0x138')](_0x240a64,arguments,_0x5e3b2a);}else _0x514c0e=_0x240a64[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x514c0e);};}var _0x478e7e=DC['Transform'],_0x3fd557=DC['Namespace'][a0_0x5a29('0x6e8')],_0x197315=function(_0x20f26f){_0x5a1389()(_0x1ed7bd,_0x20f26f);var _0xcfbd2c=_0x309ff0(_0x1ed7bd);function _0x1ed7bd(_0x300ab0,_0x2da09d){var _0x567923;return _0x1ee296()(this,_0x1ed7bd),(_0x567923=_0xcfbd2c[a0_0x5a29('0x351')](this,_0x300ab0))[a0_0x5a29('0x6cd')]=_0x2da09d,_0x567923['_positions']=[],_0x567923['_mountEntity'](),_0x567923[a0_0x5a29('0x4c0')](),_0x567923;}return _0x1fafe8()(_0x1ed7bd,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x6fd5ce=this;this['_delegate']=new _0x3fd557['Entity'](),this[a0_0x5a29('0xe')][a0_0x5a29('0x65f')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')]),this[a0_0x5a29('0x6cd')]['show']=!0x1,this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=new _0x3fd557[(a0_0x5a29('0x305'))](function(_0x161221){return _0x6fd5ce[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x2?new _0x3fd557['PolygonHierarchy'](_0x6fd5ce[a0_0x5a29('0x62')]):null;},!0x1),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')]['add'](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x4c0'),'value':function(){var _0x1ee5b2=this,_0x726ecf=[][a0_0x5a29('0x6c9')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')][a0_0x5a29('0x94c')](_0x3fd557[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]())[a0_0x5a29('0x4e0')]);_0x726ecf[a0_0x5a29('0x3cd')](_0x726ecf[0x0]);for(var _0x3515f9=0x0;_0x3515f9<_0x726ecf[a0_0x5a29('0x515')]-0x1;_0x3515f9++){var _0x2a9e35=this[a0_0x5a29('0x81')](_0x726ecf[_0x3515f9],_0x726ecf[_0x3515f9+0x1]);this[a0_0x5a29('0x62')]['push'](_0x726ecf[_0x3515f9]),this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x2a9e35);}this['_positions'][a0_0x5a29('0x570')](function(_0x162bb2,_0x95ef52){_0x1ee5b2['createAnchor'](_0x162bb2,_0x95ef52,_0x95ef52%0x2!=0x0);});}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x34a9ba){var _0x22c1ad=this;if(this[a0_0x5a29('0x7e5')]){if(this[a0_0x5a29('0x7e5')]=!0x1,this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){this[a0_0x5a29('0x47b')]['position'][a0_0x5a29('0x850')](_0x34a9ba[a0_0x5a29('0x6e5')]);var _0x2c2eb3,_0x1952bd,_0x109fca=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x3fd557[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]()),_0x5600d5=_0x109fca[a0_0x5a29('0x26e')];if(_0x109fca['isMid'])_0x5600d5===this['_positions']['length']-0x1?(_0x2c2eb3=this['computeMidPosition'](this['_positions'][_0x5600d5],this[a0_0x5a29('0x62')][_0x5600d5-0x1]),_0x1952bd=this['computeMidPosition'](this['_positions'][_0x5600d5],this[a0_0x5a29('0x62')][0x0])):(_0x2c2eb3=this['computeMidPosition'](this['_positions'][_0x5600d5],this[a0_0x5a29('0x62')][_0x5600d5-0x1]),_0x1952bd=this[a0_0x5a29('0x81')](this['_positions'][_0x5600d5],this[a0_0x5a29('0x62')][_0x5600d5+0x1])),this['_positions'][a0_0x5a29('0x250')](_0x109fca[a0_0x5a29('0x26e')],0x1,_0x2c2eb3,_0x34a9ba[a0_0x5a29('0x6e5')],_0x1952bd),this[a0_0x5a29('0x35a')]['anchorLayer'][a0_0x5a29('0x8db')](),this[a0_0x5a29('0x241')]=[],this[a0_0x5a29('0x62')]['forEach'](function(_0x3a9bde,_0x1b6bdd){_0x22c1ad[a0_0x5a29('0x314')](_0x3a9bde,_0x1b6bdd,_0x1b6bdd%0x2!=0x0);});}}else{if(this[a0_0x5a29('0x7e5')]=!0x0,!_0x34a9ba[a0_0x5a29('0x28a')]['id'])return!0x1;this['_pickedAnchor']=_0x34a9ba['target']['id'];}}},{'key':'_mouseMoveHandler','value':function(_0x986bca){if(this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x986bca[a0_0x5a29('0x12f')],a0_0x5a29('0x3c7')),this[a0_0x5a29('0x7e5')]&&this['_pickedAnchor']&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x5ab8fa=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x3fd557[a0_0x5a29('0x8ab')]['now']()),_0x3ec284=_0x5ab8fa['index'];this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x986bca[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][_0x3ec284]=_0x986bca['surfacePosition'];var _0x51e3b4=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')];if(!_0x5ab8fa[a0_0x5a29('0x8ff')]){var _0x4528ba=-0x1,_0x20fc0a=-0x1,_0x8657e=-0x1,_0x610f8d=-0x1;0x0===_0x3ec284?(_0x4528ba=_0x51e3b4-0x2,_0x20fc0a=_0x51e3b4-0x1,_0x8657e=_0x3ec284+0x2,_0x610f8d=_0x3ec284+0x1):_0x3ec284===_0x51e3b4-0x2?(_0x4528ba=_0x3ec284-0x2,_0x20fc0a=_0x3ec284-0x1,_0x8657e=0x0,_0x610f8d=_0x51e3b4-0x1):(_0x4528ba=_0x3ec284-0x2,_0x20fc0a=_0x3ec284-0x1,_0x8657e=_0x3ec284+0x2,_0x610f8d=_0x3ec284+0x1);var _0x23ea0a=this[a0_0x5a29('0x81')](this['_positions'][_0x4528ba],this[a0_0x5a29('0x62')][_0x3ec284]),_0x427aa3=this['computeMidPosition'](this[a0_0x5a29('0x62')][_0x8657e],this[a0_0x5a29('0x62')][_0x3ec284]);this[a0_0x5a29('0x62')][_0x20fc0a]=_0x23ea0a,this[a0_0x5a29('0x62')][_0x610f8d]=_0x427aa3,this[a0_0x5a29('0x241')][_0x20fc0a][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x23ea0a),this[a0_0x5a29('0x241')][_0x610f8d]['position'][a0_0x5a29('0x850')](_0x427aa3);}}}},{'key':a0_0x5a29('0x592'),'value':function(_0x288b69){this[a0_0x5a29('0x137')](),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4e0')]=_0x478e7e[a0_0x5a29('0x87b')](this['_positions']),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x0,this[a0_0x5a29('0x35a')][a0_0x5a29('0x86a')]['raiseEvent'](this[a0_0x5a29('0x6cd')]);}}]),_0x1ed7bd;}(_0x1b4950);function _0xd1f83(_0x1cecc3){var _0x28e03f=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString']['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x2ec945){return!0x1;}}();return function(){var _0x32c204,_0x463ab0=_0x3c6509()(_0x1cecc3);if(_0x28e03f){var _0x3c8a61=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x32c204=Reflect[a0_0x5a29('0x138')](_0x463ab0,arguments,_0x3c8a61);}else _0x32c204=_0x463ab0[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x32c204);};}var _0x508c2d=DC[a0_0x5a29('0x923')],_0x192407=DC[a0_0x5a29('0x239')]['Cesium'],_0x1dfd6c=function(_0x546748){_0x5a1389()(_0x34f6a5,_0x546748);var _0x166e51=_0xd1f83(_0x34f6a5);function _0x34f6a5(_0x201771,_0x517540){var _0x3f2122;return _0x1ee296()(this,_0x34f6a5),(_0x3f2122=_0x166e51[a0_0x5a29('0x351')](this,_0x201771))[a0_0x5a29('0x6cd')]=_0x517540,_0x3f2122[a0_0x5a29('0x5c5')]=void 0x0,_0x3f2122[a0_0x5a29('0x973')]=0x0,_0x3f2122['_positions']=[],_0x3f2122[a0_0x5a29('0x727')](),_0x3f2122[a0_0x5a29('0x4c0')](),_0x3f2122;}return _0x1fafe8()(_0x34f6a5,[{'key':'_mountEntity','value':function(){var _0x2700e9=this;this['_radius']=this[a0_0x5a29('0x6cd')][a0_0x5a29('0x6e1')],this[a0_0x5a29('0x5c5')]=_0x508c2d[a0_0x5a29('0x516')](this['_overlay'][a0_0x5a29('0x100')]),this[a0_0x5a29('0x6cd')]['show']=!0x1,this['_delegate']=new _0x192407[(a0_0x5a29('0x608'))]({'polygon':{'material':this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')][a0_0x5a29('0x92')]['material']}}),this[a0_0x5a29('0x62')]=[][a0_0x5a29('0x6c9')]([this['_center'],this[a0_0x5a29('0x5e0')](this[a0_0x5a29('0x5c5')],this[a0_0x5a29('0x973')])[0x0]]),this['_delegate'][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=new _0x192407[(a0_0x5a29('0x305'))](function(_0x203d29){if(_0x2700e9[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x1){if(_0x2700e9['_radius']=_0x192407[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0x2700e9['_positions'][0x0],_0x2700e9[a0_0x5a29('0x62')][0x1]),_0x2700e9['_radius']<=0x0)return null;var _0x28452d=_0x2700e9[a0_0x5a29('0x5e0')](_0x2700e9['_positions'][0x0],_0x2700e9[a0_0x5a29('0x973')]);return _0x28452d['push'](_0x28452d[0x0]),new _0x192407['PolygonHierarchy'](_0x28452d);}return null;},!0x1),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x4c0'),'value':function(){var _0x3cfaf9=this;this[a0_0x5a29('0x62')][a0_0x5a29('0x570')](function(_0x40cff9,_0x2f3da4){_0x3cfaf9['createAnchor'](_0x40cff9,_0x2f3da4,!0x1,_0x2f3da4%0x2==0x0);});}},{'key':a0_0x5a29('0x5e0'),'value':function(_0x1db786,_0x414768){var _0x4a4c4c=[],_0x14ea9f=_0x192407[a0_0x5a29('0x26c')][a0_0x5a29('0x5fc')]({'center':_0x1db786,'semiMajorAxis':_0x414768,'semiMinorAxis':_0x414768,'rotation':0x0,'granularity':0.005},!0x1,!0x0);return _0x14ea9f&&_0x14ea9f[a0_0x5a29('0x68c')]&&(_0x4a4c4c=_0x192407[a0_0x5a29('0x3bd')]['unpackArray'](_0x14ea9f['outerPositions'])),_0x4a4c4c;}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x52cd09){var _0x22425f=_0x192407[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]();if(this[a0_0x5a29('0x7e5')]){if(this[a0_0x5a29('0x7e5')]=!0x1,this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){this[a0_0x5a29('0x47b')]['position'][a0_0x5a29('0x850')](_0x52cd09['surfacePosition']);var _0x58768f=this['_pickedAnchor']['properties'][a0_0x5a29('0x94c')](_0x22425f);this[a0_0x5a29('0x62')][_0x58768f[a0_0x5a29('0x26e')]]=_0x52cd09['surfacePosition'];}}else{if(this[a0_0x5a29('0x7e5')]=!0x0,!_0x52cd09[a0_0x5a29('0x28a')]||!_0x52cd09[a0_0x5a29('0x28a')]['id'])return!0x1;this[a0_0x5a29('0x47b')]=_0x52cd09[a0_0x5a29('0x28a')]['id'];}}},{'key':a0_0x5a29('0x914'),'value':function(_0x3d4169){if(this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x3d4169[a0_0x5a29('0x12f')],a0_0x5a29('0x3c7')),this[a0_0x5a29('0x7e5')]&&this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x4a8287=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x192407[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]['setValue'](_0x3d4169[a0_0x5a29('0x6e5')]),this['_positions'][_0x4a8287[a0_0x5a29('0x26e')]]=_0x3d4169[a0_0x5a29('0x6e5')];}}},{'key':a0_0x5a29('0x592'),'value':function(_0x397782){this[a0_0x5a29('0x137')](),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x100')]=_0x508c2d[a0_0x5a29('0x8f')](this[a0_0x5a29('0x62')][0x0]),this[a0_0x5a29('0x6cd')]['radius']=this[a0_0x5a29('0x973')],this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x0,this[a0_0x5a29('0x35a')]['plotEvent'][a0_0x5a29('0x1a0')](this['_overlay']);}}]),_0x34f6a5;}(_0x1b4950);function _0xdc7e43(_0x3420ed){var _0xe58873=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x3f98c6){return!0x1;}}();return function(){var _0x5e13e9,_0x231d50=_0x3c6509()(_0x3420ed);if(_0xe58873){var _0x1abd0e=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x5e13e9=Reflect[a0_0x5a29('0x138')](_0x231d50,arguments,_0x1abd0e);}else _0x5e13e9=_0x231d50['apply'](this,arguments);return _0x1fe488()(this,_0x5e13e9);};}var _0x121867=DC['Transform'],_0x552eec=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2edf38=function(_0x20d9ec){_0x5a1389()(_0x11f304,_0x20d9ec);var _0x163fbb=_0xdc7e43(_0x11f304);function _0x11f304(_0x16e2cc,_0x5345ff){var _0x5fe31;return _0x1ee296()(this,_0x11f304),(_0x5fe31=_0x163fbb[a0_0x5a29('0x351')](this,_0x16e2cc))['_overlay']=_0x5345ff,_0x5fe31[a0_0x5a29('0x62')]=[],_0x5fe31['_mountEntity'](),_0x5fe31[a0_0x5a29('0x4c0')](),_0x5fe31;}return _0x1fafe8()(_0x11f304,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x1b1e45=this;this[a0_0x5a29('0xe')]=new _0x552eec[(a0_0x5a29('0x608'))](),this[a0_0x5a29('0xe')][a0_0x5a29('0x65f')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')]),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x1,this[a0_0x5a29('0xe')][a0_0x5a29('0x4b0')]['coordinates']=new _0x552eec[(a0_0x5a29('0x305'))](function(_0x334f92){return _0x1b1e45[a0_0x5a29('0x62')]['length']>0x1?_0x552eec['Rectangle'][a0_0x5a29('0x79f')](_0x1b1e45[a0_0x5a29('0x62')]):null;},!0x1),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this['_delegate']);}},{'key':a0_0x5a29('0x4c0'),'value':function(){var _0x1427c8=this;this[a0_0x5a29('0x62')]=[][a0_0x5a29('0x6c9')](_0x121867[a0_0x5a29('0x7a')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4e0')])),this[a0_0x5a29('0x62')][a0_0x5a29('0x570')](function(_0x44e54d,_0x5534be){_0x1427c8['createAnchor'](_0x44e54d,_0x5534be);});}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x4cafef){if(this['_isMoving']){if(this[a0_0x5a29('0x7e5')]=!0x1,this[a0_0x5a29('0x47b')]&&this['_pickedAnchor']['position']){this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]['setValue'](_0x4cafef[a0_0x5a29('0x6e5')]);var _0x2e1507=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')]['getValue'](_0x552eec[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this[a0_0x5a29('0x62')][_0x2e1507[a0_0x5a29('0x26e')]]=_0x4cafef[a0_0x5a29('0x6e5')];}}else{if(this['_isMoving']=!0x0,!_0x4cafef[a0_0x5a29('0x28a')]||!_0x4cafef['target']['id'])return!0x1;this[a0_0x5a29('0x47b')]=_0x4cafef[a0_0x5a29('0x28a')]['id'];}}},{'key':a0_0x5a29('0x914'),'value':function(_0xe065ad){if(this['_plot']['viewer'][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0xe065ad[a0_0x5a29('0x12f')],a0_0x5a29('0x3c7')),this[a0_0x5a29('0x7e5')]&&this['_pickedAnchor']&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x5d1bbd=this[a0_0x5a29('0x47b')]['properties'][a0_0x5a29('0x94c')](_0x552eec['JulianDate']['now']());this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0xe065ad['surfacePosition']),this['_positions'][_0x5d1bbd[a0_0x5a29('0x26e')]]=_0xe065ad[a0_0x5a29('0x6e5')];}}},{'key':a0_0x5a29('0x592'),'value':function(_0x4e33f6){this[a0_0x5a29('0x137')](),this[a0_0x5a29('0x6cd')]['positions']=_0x121867[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x0,this[a0_0x5a29('0x35a')]['plotEvent'][a0_0x5a29('0x1a0')](this['_overlay']);}}]),_0x11f304;}(_0x1b4950);function _0x3ea8c6(_0x67e765){var _0x45a535=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x5d969c){return!0x1;}}();return function(){var _0x4790d1,_0x1f635a=_0x3c6509()(_0x67e765);if(_0x45a535){var _0x5d1cdc=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x4790d1=Reflect['construct'](_0x1f635a,arguments,_0x5d1cdc);}else _0x4790d1=_0x1f635a[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x4790d1);};}var _0x4c3941=DC[a0_0x5a29('0x923')],_0x2a06d6=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x308069=function(_0x372020){_0x5a1389()(_0x12addf,_0x372020);var _0x14580e=_0x3ea8c6(_0x12addf);function _0x12addf(_0x3daaac,_0x2040c4){var _0x1a3524;return _0x1ee296()(this,_0x12addf),(_0x1a3524=_0x14580e[a0_0x5a29('0x351')](this,_0x3daaac))['_overlay']=_0x2040c4,_0x1a3524[a0_0x5a29('0x86e')]=void 0x0,_0x1a3524[a0_0x5a29('0x727')](),_0x1a3524;}return _0x1fafe8()(_0x12addf,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x49f4d8=this;this[a0_0x5a29('0xe')]=new _0x2a06d6['Entity'](),this['_delegate']['merge'](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')]),this['_overlay'][a0_0x5a29('0x4b1')]=!0x1,this[a0_0x5a29('0x86e')]=this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')][a0_0x5a29('0x94c')](_0x2a06d6['JulianDate'][a0_0x5a29('0x1eb')]()),this[a0_0x5a29('0xe')]['position']=new _0x2a06d6[(a0_0x5a29('0x305'))](function(){return _0x49f4d8[a0_0x5a29('0x86e')];}),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')]['add'](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x914'),'value':function(_0x4bcc44){this['_plot'][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x4bcc44[a0_0x5a29('0x12f')],a0_0x5a29('0x737')),this[a0_0x5a29('0x86e')]=_0x4bcc44[a0_0x5a29('0x6e5')];}},{'key':a0_0x5a29('0x592'),'value':function(_0x208fb2){this[a0_0x5a29('0x137')](),this[a0_0x5a29('0x6cd')]['position']=_0x4c3941[a0_0x5a29('0x8f')](this['_position']),this[a0_0x5a29('0x6cd')]['show']=!0x0,this[a0_0x5a29('0x35a')]['plotEvent'][a0_0x5a29('0x1a0')](this[a0_0x5a29('0x6cd')]);}}]),_0x12addf;}(_0x1b4950);function _0x47d559(_0x31aec4){var _0x3a88e3=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString']['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x25406a){return!0x1;}}();return function(){var _0x34247d,_0x10dfd3=_0x3c6509()(_0x31aec4);if(_0x3a88e3){var _0x43dc07=_0x3c6509()(this)['constructor'];_0x34247d=Reflect[a0_0x5a29('0x138')](_0x10dfd3,arguments,_0x43dc07);}else _0x34247d=_0x10dfd3[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x34247d);};}var _0x586244=DC[a0_0x5a29('0x923')],_0x5c0c47=DC['Namespace'][a0_0x5a29('0x6e8')],_0xd5f80b=function(_0x4ffdab){_0x5a1389()(_0x3a7708,_0x4ffdab);var _0x59d813=_0x47d559(_0x3a7708);function _0x3a7708(_0x57cb11,_0x39d014){var _0x38a4ce;return _0x1ee296()(this,_0x3a7708),(_0x38a4ce=_0x59d813[a0_0x5a29('0x351')](this,_0x57cb11))[a0_0x5a29('0x6cd')]=_0x39d014,_0x38a4ce[a0_0x5a29('0x62')]=[],_0x38a4ce[a0_0x5a29('0x9')]=new _0x44623b(),_0x38a4ce[a0_0x5a29('0x727')](),_0x38a4ce[a0_0x5a29('0x4c0')](),_0x38a4ce;}return _0x1fafe8()(_0x3a7708,[{'key':'_mountEntity','value':function(){var _0x33d9b8=this;this[a0_0x5a29('0xe')]=new _0x5c0c47[(a0_0x5a29('0x608'))](),this[a0_0x5a29('0xe')]['merge'](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')]),this['_overlay']['show']=!0x1,this[a0_0x5a29('0xe')]['polygon']['hierarchy']=new _0x5c0c47[(a0_0x5a29('0x305'))](function(){return _0x33d9b8[a0_0x5a29('0x62')]['length']>0x2?(_0x33d9b8['_graphics'][a0_0x5a29('0x4e0')]=_0x33d9b8[a0_0x5a29('0x62')],_0x33d9b8['_graphics'][a0_0x5a29('0x329')]):null;},!0x1),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this['_delegate']);}},{'key':a0_0x5a29('0x4c0'),'value':function(){var _0x4ad1d6=this;this[a0_0x5a29('0x62')]=[][a0_0x5a29('0x6c9')](_0x586244[a0_0x5a29('0x7a')](this[a0_0x5a29('0x6cd')]['positions'])),this[a0_0x5a29('0x62')][a0_0x5a29('0x570')](function(_0x3a89c3,_0x4c13a7){_0x4ad1d6[a0_0x5a29('0x314')](_0x3a89c3,_0x4c13a7);});}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x14b37d){if(this[a0_0x5a29('0x7e5')]){if(this[a0_0x5a29('0x7e5')]=!0x1,this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){this['_pickedAnchor'][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x14b37d[a0_0x5a29('0x6e5')]);var _0x725a3=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x5c0c47[a0_0x5a29('0x8ab')]['now']());this[a0_0x5a29('0x62')][_0x725a3[a0_0x5a29('0x26e')]]=_0x14b37d[a0_0x5a29('0x6e5')];}}else{if(this['_isMoving']=!0x0,!_0x14b37d[a0_0x5a29('0x28a')]||!_0x14b37d['target']['id'])return!0x1;this[a0_0x5a29('0x47b')]=_0x14b37d[a0_0x5a29('0x28a')]['id'];}}},{'key':a0_0x5a29('0x914'),'value':function(_0x5a9895){if(this['_plot'][a0_0x5a29('0x835')][a0_0x5a29('0x2af')]['showAt'](_0x5a9895[a0_0x5a29('0x12f')],a0_0x5a29('0x3c7')),this[a0_0x5a29('0x7e5')]&&this['_pickedAnchor']&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x8fe74d=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')]['getValue'](_0x5c0c47[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]['setValue'](_0x5a9895[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][_0x8fe74d[a0_0x5a29('0x26e')]]=_0x5a9895[a0_0x5a29('0x6e5')];}}},{'key':a0_0x5a29('0x592'),'value':function(_0x1fc4b5){this[a0_0x5a29('0x137')](),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4e0')]=_0x586244[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]),this[a0_0x5a29('0x6cd')]['show']=!0x0,this['_plot'][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](this[a0_0x5a29('0x6cd')]);}}]),_0x3a7708;}(_0x1b4950);function _0x250ae0(_0x7d2580){var _0x4c9a28=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString']['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x73b846){return!0x1;}}();return function(){var _0x21af0c,_0xb6ceb4=_0x3c6509()(_0x7d2580);if(_0x4c9a28){var _0x175447=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x21af0c=Reflect[a0_0x5a29('0x138')](_0xb6ceb4,arguments,_0x175447);}else _0x21af0c=_0xb6ceb4['apply'](this,arguments);return _0x1fe488()(this,_0x21af0c);};}var _0x3aeb0f=DC[a0_0x5a29('0x923')],_0x500911=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x38f137=function(_0x1bfb03){_0x5a1389()(_0x8ba1cc,_0x1bfb03);var _0x5afc57=_0x250ae0(_0x8ba1cc);function _0x8ba1cc(_0x8ccff9,_0x587199){var _0xd42f84;return _0x1ee296()(this,_0x8ba1cc),(_0xd42f84=_0x5afc57[a0_0x5a29('0x351')](this,_0x8ccff9))[a0_0x5a29('0x6cd')]=_0x587199,_0xd42f84[a0_0x5a29('0x62')]=[],_0xd42f84[a0_0x5a29('0x9')]=new _0x2a1f3c(),_0xd42f84[a0_0x5a29('0x727')](),_0xd42f84[a0_0x5a29('0x4c0')](),_0xd42f84;}return _0x1fafe8()(_0x8ba1cc,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x31947f=this;this['_delegate']=new _0x500911[(a0_0x5a29('0x608'))](),this['_delegate'][a0_0x5a29('0x65f')](this[a0_0x5a29('0x6cd')]['delegate']),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x1,this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=new _0x500911['CallbackProperty'](function(){return _0x31947f[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x2?(_0x31947f[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=_0x31947f[a0_0x5a29('0x62')],_0x31947f[a0_0x5a29('0x9')][a0_0x5a29('0x329')]):null;},!0x1),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':'_mountAnchor','value':function(){var _0x58864d=this;this[a0_0x5a29('0x62')]=[][a0_0x5a29('0x6c9')](_0x3aeb0f[a0_0x5a29('0x7a')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4e0')])),this['_positions'][a0_0x5a29('0x570')](function(_0x2d976e,_0x2b846f){_0x58864d[a0_0x5a29('0x314')](_0x2d976e,_0x2b846f);});}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x24ed3b){if(this[a0_0x5a29('0x7e5')]){if(this['_isMoving']=!0x1,this['_pickedAnchor']&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){this['_pickedAnchor'][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x24ed3b[a0_0x5a29('0x6e5')]);var _0xd0f852=this['_pickedAnchor'][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x500911[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this['_positions'][_0xd0f852[a0_0x5a29('0x26e')]]=_0x24ed3b['surfacePosition'];}}else{if(this[a0_0x5a29('0x7e5')]=!0x0,!_0x24ed3b['target']||!_0x24ed3b[a0_0x5a29('0x28a')]['id'])return!0x1;this['_pickedAnchor']=_0x24ed3b[a0_0x5a29('0x28a')]['id'];}}},{'key':a0_0x5a29('0x914'),'value':function(_0x315937){if(this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x2af')][a0_0x5a29('0x43a')](_0x315937[a0_0x5a29('0x12f')],'点击锚点移动,右击结束编辑'),this['_isMoving']&&this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x34a663=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x500911[a0_0x5a29('0x8ab')]['now']());this['_pickedAnchor']['position']['setValue'](_0x315937['surfacePosition']),this[a0_0x5a29('0x62')][_0x34a663[a0_0x5a29('0x26e')]]=_0x315937[a0_0x5a29('0x6e5')];}}},{'key':'_mouseRightClickHandler','value':function(_0x270140){this[a0_0x5a29('0x137')](),this['_overlay'][a0_0x5a29('0x4e0')]=_0x3aeb0f[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]),this[a0_0x5a29('0x6cd')]['show']=!0x0,this[a0_0x5a29('0x35a')][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](this[a0_0x5a29('0x6cd')]);}}]),_0x8ba1cc;}(_0x1b4950);function _0x35a183(_0x181a33){var _0x25dbdc=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x567509){return!0x1;}}();return function(){var _0x5ee571,_0x2bf18d=_0x3c6509()(_0x181a33);if(_0x25dbdc){var _0x4ece93=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x5ee571=Reflect[a0_0x5a29('0x138')](_0x2bf18d,arguments,_0x4ece93);}else _0x5ee571=_0x2bf18d[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x5ee571);};}var _0x2852cd=DC[a0_0x5a29('0x923')],_0x5560a3=DC['Namespace'][a0_0x5a29('0x6e8')],_0x5caa68=function(_0x80ba08){_0x5a1389()(_0x4eb45a,_0x80ba08);var _0x1c8db3=_0x35a183(_0x4eb45a);function _0x4eb45a(_0x39a6,_0x32e680){var _0x39a5ea;return _0x1ee296()(this,_0x4eb45a),(_0x39a5ea=_0x1c8db3[a0_0x5a29('0x351')](this,_0x39a6))[a0_0x5a29('0x6cd')]=_0x32e680,_0x39a5ea[a0_0x5a29('0x62')]=[],_0x39a5ea[a0_0x5a29('0x9')]=new _0x2a3bbd(),_0x39a5ea[a0_0x5a29('0x727')](),_0x39a5ea[a0_0x5a29('0x4c0')](),_0x39a5ea;}return _0x1fafe8()(_0x4eb45a,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x1c4e16=this;this[a0_0x5a29('0xe')]=new _0x5560a3[(a0_0x5a29('0x608'))](),this['_delegate'][a0_0x5a29('0x65f')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')]),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x1,this[a0_0x5a29('0xe')]['polygon'][a0_0x5a29('0x329')]=new _0x5560a3[(a0_0x5a29('0x305'))](function(){return _0x1c4e16[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x1?(_0x1c4e16[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=_0x1c4e16[a0_0x5a29('0x62')],_0x1c4e16['_graphics'][a0_0x5a29('0x329')]):null;},!0x1),this[a0_0x5a29('0x35a')]['overlayLayer'][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x4c0'),'value':function(){var _0x585ff6=this;this[a0_0x5a29('0x62')]=[][a0_0x5a29('0x6c9')](_0x2852cd['transformWGS84ArrayToCartesianArray'](this[a0_0x5a29('0x6cd')]['positions'])),this[a0_0x5a29('0x62')][a0_0x5a29('0x570')](function(_0xd25682,_0x1281dc){_0x585ff6[a0_0x5a29('0x314')](_0xd25682,_0x1281dc);});}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x467816){if(this[a0_0x5a29('0x7e5')]){if(this[a0_0x5a29('0x7e5')]=!0x1,this[a0_0x5a29('0x47b')]&&this['_pickedAnchor'][a0_0x5a29('0x53c')]){this[a0_0x5a29('0x47b')]['position']['setValue'](_0x467816[a0_0x5a29('0x6e5')]);var _0x7e13d5=this['_pickedAnchor']['properties']['getValue'](_0x5560a3['JulianDate'][a0_0x5a29('0x1eb')]());this[a0_0x5a29('0x62')][_0x7e13d5[a0_0x5a29('0x26e')]]=_0x467816[a0_0x5a29('0x6e5')];}}else{if(this[a0_0x5a29('0x7e5')]=!0x0,!_0x467816['target']||!_0x467816[a0_0x5a29('0x28a')]['id'])return!0x1;this[a0_0x5a29('0x47b')]=_0x467816[a0_0x5a29('0x28a')]['id'];}}},{'key':'_mouseMoveHandler','value':function(_0x46562d){if(this[a0_0x5a29('0x35a')][a0_0x5a29('0x835')][a0_0x5a29('0x2af')]['showAt'](_0x46562d[a0_0x5a29('0x12f')],a0_0x5a29('0x3c7')),this[a0_0x5a29('0x7e5')]&&this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x525011=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')]['getValue'](_0x5560a3[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x46562d['surfacePosition']),this[a0_0x5a29('0x62')][_0x525011[a0_0x5a29('0x26e')]]=_0x46562d['surfacePosition'];}}},{'key':a0_0x5a29('0x592'),'value':function(_0x44d0d2){this['unbindEvent'](),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4e0')]=_0x2852cd['transformCartesianArrayToWGS84Array'](this[a0_0x5a29('0x62')]),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x0,this[a0_0x5a29('0x35a')]['plotEvent'][a0_0x5a29('0x1a0')](this[a0_0x5a29('0x6cd')]);}}]),_0x4eb45a;}(_0x1b4950);function _0x8f8167(_0x53003a){var _0x277414=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x28d214){return!0x1;}}();return function(){var _0x171cd3,_0x1d0051=_0x3c6509()(_0x53003a);if(_0x277414){var _0x58ffda=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x171cd3=Reflect[a0_0x5a29('0x138')](_0x1d0051,arguments,_0x58ffda);}else _0x171cd3=_0x1d0051[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x171cd3);};}var _0x5939fb=DC[a0_0x5a29('0x923')],_0xd4bd8e=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x58bf25=function(_0x305e1d){_0x5a1389()(_0xd9bc3b,_0x305e1d);var _0x23c767=_0x8f8167(_0xd9bc3b);function _0xd9bc3b(_0x1421b1,_0x5245a2){var _0x2baf58;return _0x1ee296()(this,_0xd9bc3b),(_0x2baf58=_0x23c767[a0_0x5a29('0x351')](this,_0x1421b1))['_overlay']=_0x5245a2,_0x2baf58[a0_0x5a29('0x62')]=[],_0x2baf58[a0_0x5a29('0x9')]=new _0x530b6c(),_0x2baf58['_mountEntity'](),_0x2baf58[a0_0x5a29('0x4c0')](),_0x2baf58;}return _0x1fafe8()(_0xd9bc3b,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x188fd9=this;this[a0_0x5a29('0xe')]=new _0xd4bd8e[(a0_0x5a29('0x608'))](),this['_delegate'][a0_0x5a29('0x65f')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')]),this[a0_0x5a29('0x6cd')]['show']=!0x1,this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')]['hierarchy']=new _0xd4bd8e[(a0_0x5a29('0x305'))](function(){return _0x188fd9[a0_0x5a29('0x62')]['length']>0x1?(_0x188fd9[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=_0x188fd9[a0_0x5a29('0x62')],_0x188fd9[a0_0x5a29('0x9')][a0_0x5a29('0x329')]):null;},!0x1),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')]['add'](this[a0_0x5a29('0xe')]);}},{'key':'_mountAnchor','value':function(){var _0xae9f84=this;this['_positions']=[][a0_0x5a29('0x6c9')](_0x5939fb['transformWGS84ArrayToCartesianArray'](this[a0_0x5a29('0x6cd')]['positions'])),this[a0_0x5a29('0x62')][a0_0x5a29('0x570')](function(_0x20e109,_0x51f0e3){_0xae9f84[a0_0x5a29('0x314')](_0x20e109,_0x51f0e3);});}},{'key':a0_0x5a29('0x6e9'),'value':function(_0x444736){if(this['_isMoving']){if(this['_isMoving']=!0x1,this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]['setValue'](_0x444736[a0_0x5a29('0x6e5')]);var _0x4150a9=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0xd4bd8e[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this['_positions'][_0x4150a9[a0_0x5a29('0x26e')]]=_0x444736[a0_0x5a29('0x6e5')];}}else{if(this[a0_0x5a29('0x7e5')]=!0x0,!_0x444736['target']||!_0x444736[a0_0x5a29('0x28a')]['id'])return!0x1;this[a0_0x5a29('0x47b')]=_0x444736['target']['id'];}}},{'key':'_mouseMoveHandler','value':function(_0x17d2bb){if(this['_plot']['viewer']['tooltip']['showAt'](_0x17d2bb[a0_0x5a29('0x12f')],a0_0x5a29('0x3c7')),this[a0_0x5a29('0x7e5')]&&this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x21c2a6=this[a0_0x5a29('0x47b')][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0xd4bd8e[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this['_pickedAnchor']['position'][a0_0x5a29('0x850')](_0x17d2bb[a0_0x5a29('0x6e5')]),this[a0_0x5a29('0x62')][_0x21c2a6['index']]=_0x17d2bb[a0_0x5a29('0x6e5')];}}},{'key':'_mouseRightClickHandler','value':function(_0x4d3dff){this['unbindEvent'](),this['_overlay'][a0_0x5a29('0x4e0')]=_0x5939fb[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x0,this[a0_0x5a29('0x35a')][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](this[a0_0x5a29('0x6cd')]);}}]),_0xd9bc3b;}(_0x1b4950);function _0x37fb23(_0x2250a9){var _0x122703=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x200edf){return!0x1;}}();return function(){var _0x3c684b,_0x234777=_0x3c6509()(_0x2250a9);if(_0x122703){var _0x23f664=_0x3c6509()(this)['constructor'];_0x3c684b=Reflect[a0_0x5a29('0x138')](_0x234777,arguments,_0x23f664);}else _0x3c684b=_0x234777[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x3c684b);};}var _0x5cdac8=DC[a0_0x5a29('0x923')],_0x71e31=DC[a0_0x5a29('0x239')]['Cesium'],_0x412ec8=function(_0x14b361){_0x5a1389()(_0x5c99b9,_0x14b361);var _0x3fbe8f=_0x37fb23(_0x5c99b9);function _0x5c99b9(_0x2517e7,_0x189b3f){var _0x10c025;return _0x1ee296()(this,_0x5c99b9),(_0x10c025=_0x3fbe8f['call'](this,_0x2517e7))[a0_0x5a29('0x6cd')]=_0x189b3f,_0x10c025['_positions']=[],_0x10c025[a0_0x5a29('0x9')]=new _0x484a4a(),_0x10c025[a0_0x5a29('0x727')](),_0x10c025['_mountAnchor'](),_0x10c025;}return _0x1fafe8()(_0x5c99b9,[{'key':a0_0x5a29('0x727'),'value':function(){var _0x322a11=this;this['_delegate']=new _0x71e31[(a0_0x5a29('0x608'))](),this['_delegate'][a0_0x5a29('0x65f')](this[a0_0x5a29('0x6cd')][a0_0x5a29('0x67e')]),this[a0_0x5a29('0x6cd')]['show']=!0x1,this[a0_0x5a29('0xe')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=new _0x71e31[(a0_0x5a29('0x305'))](function(){return _0x322a11[a0_0x5a29('0x62')][a0_0x5a29('0x515')]>0x2?(_0x322a11[a0_0x5a29('0x9')][a0_0x5a29('0x4e0')]=_0x322a11[a0_0x5a29('0x62')],_0x322a11[a0_0x5a29('0x9')]['hierarchy']):null;},!0x1),this[a0_0x5a29('0x35a')][a0_0x5a29('0x75f')]['add'](this[a0_0x5a29('0xe')]);}},{'key':'_mountAnchor','value':function(){var _0x31d9f2=this;this[a0_0x5a29('0x62')]=[][a0_0x5a29('0x6c9')](_0x5cdac8[a0_0x5a29('0x7a')](this['_overlay'][a0_0x5a29('0x4e0')])),this['_positions'][a0_0x5a29('0x570')](function(_0x3b3e32,_0x5f2a17){_0x31d9f2['createAnchor'](_0x3b3e32,_0x5f2a17);});}},{'key':'_mouseClickHandler','value':function(_0x3c4504){if(this['_isMoving']){if(this[a0_0x5a29('0x7e5')]=!0x1,this[a0_0x5a29('0x47b')]&&this['_pickedAnchor'][a0_0x5a29('0x53c')]){this['_pickedAnchor']['position'][a0_0x5a29('0x850')](_0x3c4504[a0_0x5a29('0x6e5')]);var _0x1923bc=this[a0_0x5a29('0x47b')]['properties']['getValue'](_0x71e31[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this[a0_0x5a29('0x62')][_0x1923bc[a0_0x5a29('0x26e')]]=_0x3c4504[a0_0x5a29('0x6e5')];}}else{if(this[a0_0x5a29('0x7e5')]=!0x0,!_0x3c4504['target']||!_0x3c4504[a0_0x5a29('0x28a')]['id'])return!0x1;this[a0_0x5a29('0x47b')]=_0x3c4504[a0_0x5a29('0x28a')]['id'];}}},{'key':'_mouseMoveHandler','value':function(_0x45af8c){if(this['_plot']['viewer']['tooltip'][a0_0x5a29('0x43a')](_0x45af8c[a0_0x5a29('0x12f')],a0_0x5a29('0x3c7')),this[a0_0x5a29('0x7e5')]&&this[a0_0x5a29('0x47b')]&&this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')]){var _0x23cd25=this['_pickedAnchor'][a0_0x5a29('0x31d')][a0_0x5a29('0x94c')](_0x71e31[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]());this[a0_0x5a29('0x47b')][a0_0x5a29('0x53c')][a0_0x5a29('0x850')](_0x45af8c['surfacePosition']),this[a0_0x5a29('0x62')][_0x23cd25[a0_0x5a29('0x26e')]]=_0x45af8c[a0_0x5a29('0x6e5')];}}},{'key':a0_0x5a29('0x592'),'value':function(_0x2d14d5){this['unbindEvent'](),this['_overlay'][a0_0x5a29('0x4e0')]=_0x5cdac8[a0_0x5a29('0x87b')](this[a0_0x5a29('0x62')]),this[a0_0x5a29('0x6cd')][a0_0x5a29('0x4b1')]=!0x0,this['_plot'][a0_0x5a29('0x86a')][a0_0x5a29('0x1a0')](this[a0_0x5a29('0x6cd')]);}}]),_0x5c99b9;}(_0x1b4950);function _0x5aaec2(_0x516975,_0xab125a){var _0x3c1a42=Object[a0_0x5a29('0x148')](_0x516975);if(Object[a0_0x5a29('0x75')]){var _0x1215a0=Object['getOwnPropertySymbols'](_0x516975);_0xab125a&&(_0x1215a0=_0x1215a0[a0_0x5a29('0x48a')](function(_0x3da8b0){return Object[a0_0x5a29('0x11a')](_0x516975,_0x3da8b0)[a0_0x5a29('0x12e')];})),_0x3c1a42['push'][a0_0x5a29('0x758')](_0x3c1a42,_0x1215a0);}return _0x3c1a42;}function _0x3a4e10(_0x45f2ee){for(var _0xa3fb81=0x1;_0xa3fb81<arguments[a0_0x5a29('0x515')];_0xa3fb81++){var _0x24ac59=null!=arguments[_0xa3fb81]?arguments[_0xa3fb81]:{};_0xa3fb81%0x2?_0x5aaec2(Object(_0x24ac59),!0x0)['forEach'](function(_0xab1453){_0x59708f()(_0x45f2ee,_0xab1453,_0x24ac59[_0xab1453]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x45f2ee,Object['getOwnPropertyDescriptors'](_0x24ac59)):_0x5aaec2(Object(_0x24ac59))['forEach'](function(_0x7f0eca){Object[a0_0x5a29('0xe7')](_0x45f2ee,_0x7f0eca,Object[a0_0x5a29('0x11a')](_0x24ac59,_0x7f0eca));});}return _0x45f2ee;}var _0x5d0aea=_0x5792f(0x3e),_0x134d64=_0x5792f(0x3f),_0x393535=_0x5792f(0x40),_0x573a2a=DC[a0_0x5a29('0x253')],_0x17e3dc=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x5ca84e={'icon_center':_0x393535,'icon_anchor':_0x5d0aea,'icon_midAnchor':_0x134d64,'icon_size':[0xc,0xc]},_0x27466d=function(){function _0x3a0897(_0x4f9ef0){var _0x224562=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};_0x1ee296()(this,_0x3a0897),this[a0_0x5a29('0x673')]=_0x4f9ef0,this[a0_0x5a29('0x3a2')]=_0x3a4e10(_0x3a4e10({},_0x5ca84e),_0x224562),this[a0_0x5a29('0x915')]=new _0x17e3dc[(a0_0x5a29('0x22f'))](),this['_callback']=void 0x0,this[a0_0x5a29('0x82e')]=void 0x0,this[a0_0x5a29('0x5d6')]=void 0x0,this[a0_0x5a29('0x76f')]=new _0x17e3dc['CustomDataSource'](a0_0x5a29('0x108')),this[a0_0x5a29('0x673')]['dataSources']['add'](this[a0_0x5a29('0x76f')]),this['_anchorLayer']=new _0x17e3dc[(a0_0x5a29('0x84b'))](a0_0x5a29('0x653')),this[a0_0x5a29('0x673')][a0_0x5a29('0x17e')][a0_0x5a29('0x695')](this[a0_0x5a29('0x234')]),this[a0_0x5a29('0x284')]=void 0x0;}return _0x1fafe8()(_0x3a0897,[{'key':a0_0x5a29('0x52f'),'value':function(_0xa7d9e9){this[a0_0x5a29('0x82e')]=void 0x0,this[a0_0x5a29('0x5d6')]=void 0x0,this[a0_0x5a29('0x673')][a0_0x5a29('0x2af')][a0_0x5a29('0x4ff')]=!0x1,this[a0_0x5a29('0x76f')]['entities'][a0_0x5a29('0x8db')](),this[a0_0x5a29('0x234')]['entities'][a0_0x5a29('0x8db')](),this[a0_0x5a29('0x491')]&&this[a0_0x5a29('0x491')][a0_0x5a29('0x351')](this,_0xa7d9e9);}},{'key':'_bindEvent','value':function(_0x2c1ea2){this[a0_0x5a29('0x915')]['removeEventListener'](this[a0_0x5a29('0x52f')],this),this[a0_0x5a29('0x491')]=_0x2c1ea2,this[a0_0x5a29('0x915')]['addEventListener'](this[a0_0x5a29('0x52f')],this);}},{'key':a0_0x5a29('0x6c0'),'value':function(_0x301a36,_0x32e0a7){switch(_0x301a36){case _0x573a2a[a0_0x5a29('0x67')]:this[a0_0x5a29('0x82e')]=new _0x39dc3d(this,_0x32e0a7);break;case _0x573a2a[a0_0x5a29('0x7ba')]:this[a0_0x5a29('0x82e')]=new _0x1d2185(this,_0x32e0a7);break;case _0x573a2a[a0_0x5a29('0x96c')]:this[a0_0x5a29('0x82e')]=new _0xcfcb15(this,_0x32e0a7);break;case _0x573a2a['CIRCLE']:this[a0_0x5a29('0x82e')]=new _0x5b75bf(this,_0x32e0a7);break;case _0x573a2a[a0_0x5a29('0x74d')]:this['_drawWorker']=new _0xe5e44d(this,_0x32e0a7);break;case _0x573a2a[a0_0x5a29('0x80c')]:this[a0_0x5a29('0x82e')]=new _0x135f91(this,_0x32e0a7);break;case _0x573a2a['ATTACK_ARROW']:this[a0_0x5a29('0x82e')]=new _0xebe43e(this,_0x32e0a7);break;case _0x573a2a['DOUBLE_ARROW']:this['_drawWorker']=new _0x20b508(this,_0x32e0a7);break;case _0x573a2a['FINE_ARROW']:this['_drawWorker']=new _0x165d2e(this,_0x32e0a7);break;case _0x573a2a[a0_0x5a29('0x90e')]:this[a0_0x5a29('0x82e')]=new _0x3ae265(this,_0x32e0a7);break;case _0x573a2a[a0_0x5a29('0x71d')]:this[a0_0x5a29('0x82e')]=new _0x238952(this,_0x32e0a7);}}},{'key':'_createEditWorker','value':function(_0x5ba0df){switch(_0x5ba0df['type']){case _0x573a2a[a0_0x5a29('0x67')]:this[a0_0x5a29('0x5d6')]=new _0x162809(this,_0x5ba0df);break;case _0x573a2a[a0_0x5a29('0x7ba')]:this[a0_0x5a29('0x5d6')]=new _0x4638da(this,_0x5ba0df);break;case _0x573a2a[a0_0x5a29('0x96c')]:this['_editWorker']=new _0x197315(this,_0x5ba0df);break;case _0x573a2a[a0_0x5a29('0x6be')]:this[a0_0x5a29('0x5d6')]=new _0x1dfd6c(this,_0x5ba0df);break;case _0x573a2a[a0_0x5a29('0x74d')]:this[a0_0x5a29('0x5d6')]=new _0x2edf38(this,_0x5ba0df);break;case _0x573a2a['BILLBOARD']:this[a0_0x5a29('0x5d6')]=new _0x308069(this,_0x5ba0df);break;case _0x573a2a[a0_0x5a29('0x91b')]:this[a0_0x5a29('0x5d6')]=new _0xd5f80b(this,_0x5ba0df);break;case _0x573a2a['DOUBLE_ARROW']:this[a0_0x5a29('0x5d6')]=new _0x38f137(this,_0x5ba0df);break;case _0x573a2a['FINE_ARROW']:this[a0_0x5a29('0x5d6')]=new _0x5caa68(this,_0x5ba0df);break;case _0x573a2a[a0_0x5a29('0x90e')]:this[a0_0x5a29('0x5d6')]=new _0x412ec8(this,_0x5ba0df);break;case _0x573a2a[a0_0x5a29('0x71d')]:this[a0_0x5a29('0x5d6')]=new _0x58bf25(this,_0x5ba0df);}}},{'key':a0_0x5a29('0x30b'),'value':function(_0x49f12d,_0x1a0303,_0x29eb71){this[a0_0x5a29('0x284')]=a0_0x5a29('0x30b'),this[a0_0x5a29('0x673')][a0_0x5a29('0x2af')][a0_0x5a29('0x4ff')]=!0x0,this[a0_0x5a29('0x95e')](_0x1a0303),this[a0_0x5a29('0x6c0')](_0x49f12d,_0x29eb71),this[a0_0x5a29('0x82e')]&&this[a0_0x5a29('0x82e')]['start']();}},{'key':a0_0x5a29('0x110'),'value':function(_0x502473,_0x2560bc){this['_state']='edit',this[a0_0x5a29('0x673')]['tooltip'][a0_0x5a29('0x4ff')]=!0x0,this[a0_0x5a29('0x95e')](_0x2560bc),this[a0_0x5a29('0x891')](_0x502473),this[a0_0x5a29('0x5d6')]&&this[a0_0x5a29('0x5d6')][a0_0x5a29('0x63a')]();}},{'key':a0_0x5a29('0x3d6'),'value':function(){this[a0_0x5a29('0x915')]['removeEventListener'](this[a0_0x5a29('0x52f')],this),this[a0_0x5a29('0x673')][a0_0x5a29('0x17e')]['remove'](this[a0_0x5a29('0x76f')]),this[a0_0x5a29('0x673')][a0_0x5a29('0x17e')][a0_0x5a29('0x157')](this['_anchorLayer']),this[a0_0x5a29('0x673')]=void 0x0,this['_plotEvent']=void 0x0;}},{'key':a0_0x5a29('0x835'),'get':function(){return this[a0_0x5a29('0x673')];}},{'key':'options','get':function(){return this[a0_0x5a29('0x3a2')];}},{'key':a0_0x5a29('0x86a'),'get':function(){return this['_plotEvent'];}},{'key':a0_0x5a29('0x75f'),'get':function(){return this[a0_0x5a29('0x76f')][a0_0x5a29('0x8b4')];}},{'key':'anchorLayer','get':function(){return this[a0_0x5a29('0x234')][a0_0x5a29('0x8b4')];}}]),_0x3a0897;}(),_0x4b1aa7=(DC['echarts'][a0_0x5a29('0x122')]({'type':a0_0x5a29('0x4cc'),'getViewer':function(){return DC[a0_0x5a29('0x956')][a0_0x5a29('0x835')];},'defaultOption':{'roam':!0x1}}),DC[a0_0x5a29('0x956')][a0_0x5a29('0x259')]({'type':a0_0x5a29('0x4cc'),'init':function(_0xe2fd85,_0x44734e){this['api']=_0x44734e,DC['echarts'][a0_0x5a29('0x835')][a0_0x5a29('0x238')]['postRender'][a0_0x5a29('0x464')](this['moveHandler'],this);},'moveHandler':function(_0x38936d,_0x18eb5e){this[a0_0x5a29('0x18a')]['dispatchAction']({'type':a0_0x5a29('0x780')});},'render':function(_0x57e7ac,_0xcc8858,_0x6787f8){},'dispose':function(_0x2b54c5){DC['echarts']['viewer'][a0_0x5a29('0x238')]['postRender'][a0_0x5a29('0x892')](this[a0_0x5a29('0xad')],this);}}),function(){function _0x5d34f9(_0x58299d,_0x1a7b5f){_0x1ee296()(this,_0x5d34f9),this[a0_0x5a29('0x673')]=_0x58299d,this['_dimensions']=[a0_0x5a29('0x121'),a0_0x5a29('0x5ea')],this[a0_0x5a29('0x283')]=[0x0,0x0],this[a0_0x5a29('0x5ec')]=_0x1a7b5f;}return _0x1fafe8()(_0x5d34f9,[{'key':a0_0x5a29('0x44f'),'value':function(_0x1e2d9e){return this[a0_0x5a29('0x283')]=_0x1e2d9e,this;}},{'key':a0_0x5a29('0x5e8'),'value':function(){return this[a0_0x5a29('0x673')];}},{'key':a0_0x5a29('0x23d'),'value':function(_0x5eda6d){var _0x4e4422=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')],_0xd1db2d=[0x0,0x0],_0x4a8bb3=DC[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x5eda6d[0x0],_0x5eda6d[0x1]);if(!_0x4a8bb3)return _0xd1db2d;if(_0x4e4422['mode']===DC[a0_0x5a29('0x415')]['SCENE3D']&&DC['Cartesian3'][a0_0x5a29('0x5c0')](_0x4e4422[a0_0x5a29('0x294')][a0_0x5a29('0x53c')],_0x4a8bb3)>DC[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](0x50))return!0x1;var _0x2b090c=_0x4e4422[a0_0x5a29('0x617')](_0x4a8bb3);return _0x2b090c?[_0x2b090c['x']-this[a0_0x5a29('0x283')][0x0],_0x2b090c['y']-this[a0_0x5a29('0x283')][0x1]]:_0xd1db2d;}},{'key':a0_0x5a29('0x85a'),'value':function(_0x1693b3){var _0x543a94=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x6a4')]['ellipsoid'],_0x3f14e0=new DC[(a0_0x5a29('0x3bd'))](_0x1693b3[0x0]+this['_mapOffset'][0x0],_0x1693b3[0x1]+this['_mapOffset'][0x1],0x0),_0x260816=_0x543a94[a0_0x5a29('0x587')](_0x3f14e0);return[DC[a0_0x5a29('0x382')]['toDegrees'](_0x260816[a0_0x5a29('0x706')]),DC[a0_0x5a29('0x382')]['toDegrees'](_0x260816[a0_0x5a29('0x517')])];}},{'key':a0_0x5a29('0x53'),'value':function(){var _0x11a7e9=this[a0_0x5a29('0x5ec')];return new DC[(a0_0x5a29('0x956'))][(a0_0x5a29('0x7c3'))][(a0_0x5a29('0x529'))](0x0,0x0,_0x11a7e9[a0_0x5a29('0x734')](),_0x11a7e9[a0_0x5a29('0x4c1')]());}},{'key':'getRoamTransform','value':function(){return DC[a0_0x5a29('0x956')][a0_0x5a29('0x2a3')][a0_0x5a29('0xa')]();}},{'key':'dimensions','get':function(){return this['_dimensions'];}}],[{'key':a0_0x5a29('0xa'),'value':function(_0x38b9a1,_0xb0b6e3){var _0x18628b=void 0x0;_0x38b9a1[a0_0x5a29('0xc')](a0_0x5a29('0x4cc'),function(_0x44c1c3){(_0x18628b=new _0x5d34f9(DC[a0_0x5a29('0x956')][a0_0x5a29('0x835')][a0_0x5a29('0x67e')],_0xb0b6e3))[a0_0x5a29('0x44f')](_0x44c1c3[a0_0x5a29('0x48b')]||[0x0,0x0]),_0x44c1c3[a0_0x5a29('0x764')]=_0x18628b;}),_0x38b9a1[a0_0x5a29('0x5ab')](function(_0x8ab489){a0_0x5a29('0x4cc')===_0x8ab489[a0_0x5a29('0x1e')](a0_0x5a29('0x764'))&&(_0x8ab489[a0_0x5a29('0x764')]=_0x18628b);});}},{'key':a0_0x5a29('0xa8'),'get':function(){return[a0_0x5a29('0x121'),a0_0x5a29('0x5ea')];}}]),_0x5d34f9;}());DC[a0_0x5a29('0x956')][a0_0x5a29('0x4c7')](a0_0x5a29('0x4cc'),_0x4b1aa7),DC[a0_0x5a29('0x956')][a0_0x5a29('0x8e4')]({'type':a0_0x5a29('0x780'),'event':a0_0x5a29('0x780'),'update':a0_0x5a29('0x311')},function(_0x57c346,_0x1fbb48){});var _0x1f4e85=_0x5792f(0x6),_0x3d562d=_0x5792f(0x3),_0x3468de=function(){function _0x324055(_0x852291,_0x58f85e){_0x1ee296()(this,_0x324055),this['_id']=_0x852291||_0x3d562d['c']['uuid'](),this['_option']=_0x58f85e,this['_wrapper']=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),a0_0x5a29('0x8bc')),this[a0_0x5a29('0x1b1')](),this[a0_0x5a29('0xf5')]=void 0x0,this['_state']=_0x1f4e85['a']['INITIALIZED'],this['_show']=!0x0;}return _0x1fafe8()(_0x324055,[{'key':a0_0x5a29('0x1b1'),'value':function(){this['_wrapper'][a0_0x5a29('0x46a')][a0_0x5a29('0x53c')]=a0_0x5a29('0x379'),this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x5ad')]=a0_0x5a29('0x549'),this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x3a3')]=a0_0x5a29('0x549'),this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')]['pointerEvents']=a0_0x5a29('0x7a4'),this[a0_0x5a29('0x8c1')][a0_0x5a29('0x773')]('id',this['_id']);}},{'key':'install','value':function(_0x565242){_0x565242&&a0_0x5a29('0x459')!==this[a0_0x5a29('0x284')]&&(_0x565242[a0_0x5a29('0x8c6')]['appendChild'](this[a0_0x5a29('0x8c1')]),this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x96f')]=_0x565242['canvas'][a0_0x5a29('0x96f')]+'px',this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x6b7')]=_0x565242[a0_0x5a29('0x662')][a0_0x5a29('0x6b7')]+'px',DC['echarts']&&(DC['echarts'][a0_0x5a29('0x835')]=_0x565242,_0x565242[a0_0x5a29('0x238')][a0_0x5a29('0x662')][a0_0x5a29('0x773')](a0_0x5a29('0x8a1'),0x0),this[a0_0x5a29('0xf5')]=DC['echarts']['init'](this[a0_0x5a29('0x8c1')]),this[a0_0x5a29('0x6b4')]&&this[a0_0x5a29('0xf5')]['setOption'](this[a0_0x5a29('0x6b4')])),this[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x178')]);}},{'key':a0_0x5a29('0x524'),'value':function(_0x5adb1b){return this[a0_0x5a29('0x6b4')]=_0x5adb1b,this[a0_0x5a29('0xf5')]&&this['_chart']['setOption'](this['_option']),this;}},{'key':a0_0x5a29('0x97b'),'get':function(){return this[a0_0x5a29('0xf5')];}},{'key':'show','set':function(_0x4a477b){this[a0_0x5a29('0x482')]=_0x4a477b,this[a0_0x5a29('0x8c1')]&&(this[a0_0x5a29('0x8c1')]['style'][a0_0x5a29('0x8d5')]=_0x4a477b?a0_0x5a29('0x56d'):a0_0x5a29('0x37d'));},'get':function(){return this[a0_0x5a29('0x482')];}}]),_0x324055;}(),_0xd6efe5=_0x5792f(0x1a),_0x4ac37a=_0x5792f['n'](_0xd6efe5),_0x2cf667=_0x5792f(0xb);function _0x3c836b(_0x1543c0,_0x2999a5){var _0x5eb931=Object[a0_0x5a29('0x148')](_0x1543c0);if(Object['getOwnPropertySymbols']){var _0x37322a=Object[a0_0x5a29('0x75')](_0x1543c0);_0x2999a5&&(_0x37322a=_0x37322a['filter'](function(_0x3ff405){return Object['getOwnPropertyDescriptor'](_0x1543c0,_0x3ff405)[a0_0x5a29('0x12e')];})),_0x5eb931[a0_0x5a29('0x3cd')]['apply'](_0x5eb931,_0x37322a);}return _0x5eb931;}function _0xb0073c(_0x6245a){for(var _0x5e2e69=0x1;_0x5e2e69<arguments['length'];_0x5e2e69++){var _0x4a0f8b=null!=arguments[_0x5e2e69]?arguments[_0x5e2e69]:{};_0x5e2e69%0x2?_0x3c836b(Object(_0x4a0f8b),!0x0)[a0_0x5a29('0x570')](function(_0x4a5683){_0x59708f()(_0x6245a,_0x4a5683,_0x4a0f8b[_0x4a5683]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x6245a,Object[a0_0x5a29('0x711')](_0x4a0f8b)):_0x3c836b(Object(_0x4a0f8b))['forEach'](function(_0x100433){Object['defineProperty'](_0x6245a,_0x100433,Object[a0_0x5a29('0x11a')](_0x4a0f8b,_0x100433));});}return _0x6245a;}var _0x2f6626=DC[a0_0x5a29('0x239')]['Cesium'],_0x30c639=function(){function _0x4fd9fc(_0x14534c){_0x1ee296()(this,_0x4fd9fc),this[a0_0x5a29('0x673')]=_0x14534c,this['_options']={},this[a0_0x5a29('0x936')]();}return _0x1fafe8()(_0x4fd9fc,[{'key':a0_0x5a29('0x936'),'value':function(){this['_viewer'][a0_0x5a29('0x67e')][a0_0x5a29('0x68d')][a0_0x5a29('0x836')][a0_0x5a29('0x46a')]['display']=a0_0x5a29('0x7a4'),this[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x68d')][a0_0x5a29('0x70d')][a0_0x5a29('0xf2')](_0x2f6626['ScreenSpaceEventType'][a0_0x5a29('0x946')]),this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x76e')][a0_0x5a29('0x458')]=0x269d036,this['_viewer']['scene']['backgroundColor']=_0x2f6626['Color'][a0_0x5a29('0x481')],this['_viewer'][a0_0x5a29('0x67e')][a0_0x5a29('0x25f')][a0_0x5a29('0x8db')]();}},{'key':a0_0x5a29('0x101'),'value':function(){var _0x59ea37;return this[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x61b')]=null!==(_0x59ea37=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x61b')])&&void 0x0!==_0x59ea37&&_0x59ea37,this[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x3cc')]=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x3cc')]||0x1,this;}},{'key':a0_0x5a29('0x17'),'value':function(){return this['_options'][a0_0x5a29('0x8a1')]&&this[a0_0x5a29('0x673')]['scene'][a0_0x5a29('0x662')][a0_0x5a29('0x773')](a0_0x5a29('0x8a1'),this[a0_0x5a29('0x3a2')][a0_0x5a29('0x8a1')]),this;}},{'key':'_setSceneOption','value':function(){var _0x4c8470,_0x43b108,_0x31544c,_0x702fa,_0x191cac,_0x586074,_0x3404f7,_0x356e56,_0x18d493,_0x306be9,_0x177daa=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')];_0x177daa[a0_0x5a29('0x70e')][a0_0x5a29('0x4b1')]=null===(_0x4c8470=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x36c')])||void 0x0===_0x4c8470||_0x4c8470,_0x177daa[a0_0x5a29('0x4db')]['show']=null===(_0x43b108=this['_options'][a0_0x5a29('0x864')])||void 0x0===_0x43b108||_0x43b108,_0x177daa[a0_0x5a29('0x51b')][a0_0x5a29('0x4b1')]=null===(_0x31544c=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x540')])||void 0x0===_0x31544c||_0x31544c,_0x177daa[a0_0x5a29('0x507')][a0_0x5a29('0x4b1')]=null===(_0x702fa=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x49e')])||void 0x0===_0x702fa||_0x702fa,_0x177daa[a0_0x5a29('0x37c')]['fxaa'][a0_0x5a29('0x352')]=null!==(_0x191cac=this['_options'][a0_0x5a29('0x478')])&&void 0x0!==_0x191cac&&_0x191cac;var _0x651a9a=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x8aa')];return _0x3d562d['c'][a0_0x5a29('0x65f')](_0x177daa[a0_0x5a29('0x76e')],{'enableRotate':null===(_0x586074=null==_0x651a9a?void 0x0:_0x651a9a[a0_0x5a29('0xe0')])||void 0x0===_0x586074||_0x586074,'enableTilt':null===(_0x3404f7=null==_0x651a9a?void 0x0:_0x651a9a[a0_0x5a29('0x399')])||void 0x0===_0x3404f7||_0x3404f7,'enableTranslate':null===(_0x356e56=null==_0x651a9a?void 0x0:_0x651a9a[a0_0x5a29('0x929')])||void 0x0===_0x356e56||_0x356e56,'enableZoom':null===(_0x18d493=null==_0x651a9a?void 0x0:_0x651a9a[a0_0x5a29('0x1d6')])||void 0x0===_0x18d493||_0x18d493,'enableCollisionDetection':null===(_0x306be9=null==_0x651a9a?void 0x0:_0x651a9a['enableCollisionDetection'])||void 0x0===_0x306be9||_0x306be9,'minimumZoomDistance':+(null==_0x651a9a?void 0x0:_0x651a9a[a0_0x5a29('0x5da')])||0x1,'maximumZoomDistance':+(null==_0x651a9a?void 0x0:_0x651a9a[a0_0x5a29('0x458')])||0x269d036}),this;}},{'key':a0_0x5a29('0x4bc'),'value':function(){var _0x478bcf,_0x313c75,_0x350219,_0x2c5504,_0x4b66ca,_0x182262,_0x33106d,_0x2d9037,_0x2da552,_0xc99f37=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x6a4')],_0x1ae75f=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x6a4')];return _0x3d562d['c']['merge'](_0xc99f37,{'show':null===(_0x478bcf=null==_0x1ae75f?void 0x0:_0x1ae75f[a0_0x5a29('0x4b1')])||void 0x0===_0x478bcf||_0x478bcf,'enableLighting':null!==(_0x313c75=null==_0x1ae75f?void 0x0:_0x1ae75f[a0_0x5a29('0x691')])&&void 0x0!==_0x313c75&&_0x313c75,'depthTestAgainstTerrain':null!==(_0x350219=null==_0x1ae75f?void 0x0:_0x1ae75f[a0_0x5a29('0x31a')])&&void 0x0!==_0x350219&&_0x350219,'tileCacheSize':+(null==_0x1ae75f?void 0x0:_0x1ae75f[a0_0x5a29('0x3fd')])||0x64,'baseColor':(null==_0x1ae75f?void 0x0:_0x1ae75f[a0_0x5a29('0x179')])||new _0x2f6626[(a0_0x5a29('0x82'))](0x0,0x0,0.5,0x1)}),_0x3d562d['c']['merge'](_0xc99f37[a0_0x5a29('0x494')],{'enabled':null!==(_0x2c5504=null==_0x1ae75f||null===(_0x4b66ca=_0x1ae75f[a0_0x5a29('0x494')])||void 0x0===_0x4b66ca?void 0x0:_0x4b66ca[a0_0x5a29('0x352')])&&void 0x0!==_0x2c5504&&_0x2c5504,'backFaceAlpha':+(null==_0x1ae75f||null===(_0x182262=_0x1ae75f[a0_0x5a29('0x494')])||void 0x0===_0x182262?void 0x0:_0x182262[a0_0x5a29('0x408')])||0x1,'backFaceAlphaByDistance':null==_0x1ae75f||null===(_0x33106d=_0x1ae75f[a0_0x5a29('0x494')])||void 0x0===_0x33106d?void 0x0:_0x33106d[a0_0x5a29('0x671')],'frontFaceAlpha':+(null==_0x1ae75f||null===(_0x2d9037=_0x1ae75f[a0_0x5a29('0x494')])||void 0x0===_0x2d9037?void 0x0:_0x2d9037[a0_0x5a29('0x381')])||0x1,'frontFaceAlphaByDistance':null==_0x1ae75f||null===(_0x2da552=_0x1ae75f['translucency'])||void 0x0===_0x2da552?void 0x0:_0x2da552[a0_0x5a29('0x7d2')]}),this;}},{'key':'_setClockOption','value':function(){var _0x241b34;return this[a0_0x5a29('0x673')][a0_0x5a29('0x5f3')][a0_0x5a29('0x628')]=null===(_0x241b34=this['_options'][a0_0x5a29('0x628')])||void 0x0===_0x241b34||_0x241b34,this;}},{'key':a0_0x5a29('0x140'),'value':function(_0x1ce303){return 0x0===Object[a0_0x5a29('0x148')](_0x1ce303)[a0_0x5a29('0x515')]||(this[a0_0x5a29('0x3a2')]=_0xb0073c(_0xb0073c({},this[a0_0x5a29('0x3a2')]),_0x1ce303),this[a0_0x5a29('0x101')]()['_setCanvasOption']()[a0_0x5a29('0xc2')]()[a0_0x5a29('0x4bc')]()[a0_0x5a29('0x492')]()),this;}}]),_0x4fd9fc;}(),_0x311947=DC[a0_0x5a29('0x239')]['Cesium'],_0x391e5e=function(){function _0x3e248a(_0x26cca0){_0x1ee296()(this,_0x3e248a),this[a0_0x5a29('0x673')]=_0x26cca0,this[a0_0x5a29('0x640')]=0x0;}return _0x1fafe8()(_0x3e248a,[{'key':'setPitchRange','value':function(_0x288910,_0x751587){var _0x51ba6a=this,_0x62cced=new _0x311947[(a0_0x5a29('0x58b'))](this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x662')]);this['_viewer']['scene']['mode']===_0x311947[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')]&&(_0x62cced[a0_0x5a29('0x872')](function(_0x1fb905){_0x62cced['setInputAction'](function(_0x33f383){var _0x489887=!0x0,_0x316652=_0x33f383[a0_0x5a29('0x729')]['y']<_0x33f383[a0_0x5a29('0x109')]['y'];_0x489887=!(_0x316652&&_0x51ba6a[a0_0x5a29('0x673')][a0_0x5a29('0x294')][a0_0x5a29('0x404')]>_0x311947[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x751587))&&!(!_0x316652&&_0x51ba6a[a0_0x5a29('0x673')][a0_0x5a29('0x294')][a0_0x5a29('0x404')]<_0x311947['Math']['toRadians'](_0x288910)),_0x51ba6a['_viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x76e')][a0_0x5a29('0x399')]=_0x489887;},_0x311947[a0_0x5a29('0x1a2')][a0_0x5a29('0x6eb')]);},0x0===this[a0_0x5a29('0x640')]?_0x311947[a0_0x5a29('0x1a2')][a0_0x5a29('0x454')]:_0x311947[a0_0x5a29('0x1a2')][a0_0x5a29('0x4b9')]),_0x62cced[a0_0x5a29('0x872')](function(_0x342c7c){_0x51ba6a[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x76e')][a0_0x5a29('0x399')]=!0x0,_0x62cced[a0_0x5a29('0xf2')](_0x311947[a0_0x5a29('0x1a2')][a0_0x5a29('0x6eb')]);},0x0===this[a0_0x5a29('0x640')]?_0x311947['ScreenSpaceEventType'][a0_0x5a29('0x89f')]:_0x311947[a0_0x5a29('0x1a2')][a0_0x5a29('0x83d')]));}},{'key':a0_0x5a29('0x757'),'value':function(){var _0x1b716d=this;this[a0_0x5a29('0x673')][a0_0x5a29('0x294')]['changed'][a0_0x5a29('0x464')](function(_0x3cdcb8){_0x1b716d['_viewer'][a0_0x5a29('0x294')]['_suspendTerrainAdjustment']&&_0x1b716d['_viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x48c')]===_0x311947[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')]&&(_0x1b716d[a0_0x5a29('0x673')][a0_0x5a29('0x294')][a0_0x5a29('0x4e3')]=!0x1,_0x1b716d[a0_0x5a29('0x673')]['camera']['_adjustOrthographicFrustum'](!0x0));});}},{'key':a0_0x5a29('0x6e4'),'value':function(_0x1ad84a,_0x4cecef,_0x1b87d6,_0x4efab1){}},{'key':a0_0x5a29('0x5d1'),'value':function(_0x2898fe){this['_mouseMode']=_0x2898fe||0x0,0x0===_0x2898fe?(this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x76e')]['tiltEventTypes']=[_0x311947[a0_0x5a29('0x4ea')][a0_0x5a29('0x26b')],_0x311947[a0_0x5a29('0x4ea')][a0_0x5a29('0x36d')],{'eventType':_0x311947[a0_0x5a29('0x4ea')][a0_0x5a29('0x4c6')],'modifier':_0x311947[a0_0x5a29('0x2ea')][a0_0x5a29('0x2a4')]},{'eventType':_0x311947['CameraEventType']['RIGHT_DRAG'],'modifier':_0x311947[a0_0x5a29('0x2ea')]['CTRL']}],this['_viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x76e')][a0_0x5a29('0x7af')]=[_0x311947['CameraEventType'][a0_0x5a29('0x59e')],_0x311947[a0_0x5a29('0x4ea')][a0_0x5a29('0x2be')],_0x311947['CameraEventType'][a0_0x5a29('0x36d')]]):0x1===_0x2898fe&&(this[a0_0x5a29('0x673')][a0_0x5a29('0x238')]['screenSpaceCameraController']['tiltEventTypes']=[_0x311947['CameraEventType']['RIGHT_DRAG'],_0x311947[a0_0x5a29('0x4ea')][a0_0x5a29('0x36d')],{'eventType':_0x311947[a0_0x5a29('0x4ea')]['LEFT_DRAG'],'modifier':_0x311947[a0_0x5a29('0x2ea')][a0_0x5a29('0x2a4')]},{'eventType':_0x311947['CameraEventType'][a0_0x5a29('0x59e')],'modifier':_0x311947[a0_0x5a29('0x2ea')][a0_0x5a29('0x2a4')]}],this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x76e')][a0_0x5a29('0x7af')]=[_0x311947[a0_0x5a29('0x4ea')][a0_0x5a29('0x2be')],_0x311947[a0_0x5a29('0x4ea')]['PINCH']]);}}]),_0x3e248a;}(),_0x58d16d=_0x5792f(0x19),_0x5cacce=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x355f48=function(){function _0x196a51(){_0x1ee296()(this,_0x196a51),this[a0_0x5a29('0x673')]=void 0x0,this[a0_0x5a29('0x86e')]=void 0x0,this['_enable']=!0x1,this[a0_0x5a29('0x8c1')]=void 0x0,this[a0_0x5a29('0x688')]=!0x1,this[a0_0x5a29('0x519')]=void 0x0;}return _0x1fafe8()(_0x196a51,[{'key':a0_0x5a29('0x95e'),'value':function(){}},{'key':a0_0x5a29('0x5b5'),'value':function(){}},{'key':'_enableHook','value':function(){!this[a0_0x5a29('0x8c1')]['parentNode']&&this[a0_0x5a29('0x673')]&&this[a0_0x5a29('0x673')][a0_0x5a29('0x8c6')][a0_0x5a29('0x365')](this[a0_0x5a29('0x8c1')]),this[a0_0x5a29('0x8c1')]&&(this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')]['visibility']=this[a0_0x5a29('0x1c0')]?a0_0x5a29('0x56d'):'hidden'),this[a0_0x5a29('0x1c0')]?this['_bindEvent']():this[a0_0x5a29('0x5b5')]();}},{'key':'_updateWindowCoord','value':function(_0x53108c){}},{'key':a0_0x5a29('0x8ac'),'value':function(){}},{'key':a0_0x5a29('0x5cb'),'value':function(_0xc1db2a){if(this[a0_0x5a29('0x673')]=_0xc1db2a,this['_state']=_0x1f4e85['a']['INSTALLED'],this[a0_0x5a29('0x673')]&&this[a0_0x5a29('0x8c1')]&&this[a0_0x5a29('0x688')]){var _0x55adaa=this,_0x4b0bec=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')];_0x4b0bec[a0_0x5a29('0x225')][a0_0x5a29('0x464')](function(){if(_0x55adaa['_position']&&_0x55adaa[a0_0x5a29('0x1c0')]&&_0x55adaa[a0_0x5a29('0x221')]&&a0_0x5a29('0x56d')===_0x55adaa[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x8d5')]){var _0x198f52=_0x5cacce['SceneTransforms'][a0_0x5a29('0x7ee')](_0x4b0bec,_0x55adaa[a0_0x5a29('0x86e')]);_0x198f52&&_0x55adaa[a0_0x5a29('0x221')](_0x198f52);}});}this[a0_0x5a29('0x8ac')]&&this[a0_0x5a29('0x8ac')]();}},{'key':a0_0x5a29('0x6fc'),'value':function(_0x42f232){return this;}},{'key':'setContent','value':function(_0x5e23bf){if(_0x5e23bf&&a0_0x5a29('0x783')==typeof _0x5e23bf)this[a0_0x5a29('0x8c1')][a0_0x5a29('0x13d')]=_0x5e23bf;else{if(_0x5e23bf&&_0x5e23bf instanceof Element){for(;this[a0_0x5a29('0x8c1')][a0_0x5a29('0xc7')]();)this[a0_0x5a29('0x8c1')][a0_0x5a29('0x58e')](this[a0_0x5a29('0x8c1')][a0_0x5a29('0x5a1')]);this['_wrapper']['appendChild'](_0x5e23bf);}}return this;}},{'key':a0_0x5a29('0x75a'),'value':function(){this[a0_0x5a29('0x8c1')]&&(this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x837'));}},{'key':'enable','set':function(_0x2b1c46){this['_enable']=_0x2b1c46,this[a0_0x5a29('0x284')]=this[a0_0x5a29('0x1c0')]?_0x1f4e85['a'][a0_0x5a29('0x7ab')]:_0x1f4e85['a'][a0_0x5a29('0x21')],this[a0_0x5a29('0x29a')]&&this[a0_0x5a29('0x29a')]();},'get':function(){return this[a0_0x5a29('0x1c0')];}},{'key':a0_0x5a29('0x5dd'),'get':function(){return this[a0_0x5a29('0x284')];}}],[{'key':a0_0x5a29('0x264'),'value':function(_0x4e9cf8){_0x4e9cf8&&(_0x58d16d['a'][_0x4e9cf8[a0_0x5a29('0x246')]()]=_0x4e9cf8['toLocaleLowerCase']());}},{'key':a0_0x5a29('0x69e'),'value':function(_0x46659b){return _0x58d16d['a'][_0x46659b[a0_0x5a29('0x246')]()]||void 0x0;}}]),_0x196a51;}();function _0x1b9cde(_0x3e1079){var _0x49ac26=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x4fed6c){return!0x1;}}();return function(){var _0x230cce,_0x440ca6=_0x3c6509()(_0x3e1079);if(_0x49ac26){var _0x5679e8=_0x3c6509()(this)['constructor'];_0x230cce=Reflect['construct'](_0x440ca6,arguments,_0x5679e8);}else _0x230cce=_0x440ca6['apply'](this,arguments);return _0x1fe488()(this,_0x230cce);};}var _0x105406=function(_0x30dca4){_0x5a1389()(_0x15737d,_0x30dca4);var _0x941d38=_0x1b9cde(_0x15737d);function _0x15737d(){var _0x3c2e39;return _0x1ee296()(this,_0x15737d),(_0x3c2e39=_0x941d38[a0_0x5a29('0x351')](this))[a0_0x5a29('0x8c1')]=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),'dc-attribution'),_0x3c2e39[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x3b3'),_0x3c2e39[a0_0x5a29('0x8e3')]=void 0x0,_0x3c2e39['type']=_0x355f48['getWidgetType'](a0_0x5a29('0x469')),_0x3c2e39[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x178')],_0x3c2e39;}return _0x1fafe8()(_0x15737d,[{'key':a0_0x5a29('0x8ac'),'value':function(){var _0x3bec57=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x8b5'),'',this[a0_0x5a29('0x8c1')]);_0x3bec57['innerHTML']=a0_0x5a29('0x18e'),_0x3bec57[a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x16a');var _0x5d21b0=_0x3d562d['a'][a0_0x5a29('0xa')]('a','',this['_wrapper']);_0x5d21b0[a0_0x5a29('0x13d')]='Digital\x20Visual',_0x5d21b0[a0_0x5a29('0x156')]='javascript:void(0)',_0x5d21b0['onclick']=function(){window[a0_0x5a29('0x4a1')](a0_0x5a29('0x90c'));},_0x5d21b0[a0_0x5a29('0x46a')]['cssText']=a0_0x5a29('0x4fe'),this[a0_0x5a29('0x4ff')]=!0x0;}}]),_0x15737d;}(_0x355f48);_0x355f48[a0_0x5a29('0x264')](a0_0x5a29('0x469'));var _0xe1c35b=_0x105406;function _0x10fc4c(_0x5872ba){var _0x2066e0=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')]['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x1a6e0a){return!0x1;}}();return function(){var _0x517dcb,_0x311424=_0x3c6509()(_0x5872ba);if(_0x2066e0){var _0x3367ec=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x517dcb=Reflect[a0_0x5a29('0x138')](_0x311424,arguments,_0x3367ec);}else _0x517dcb=_0x311424[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x517dcb);};}var _0x38a08e=function(_0x4ea617){_0x5a1389()(_0x5c055b,_0x4ea617);var _0x2edcd0=_0x10fc4c(_0x5c055b);function _0x5c055b(){var _0x43ffe0;return _0x1ee296()(this,_0x5c055b),(_0x43ffe0=_0x2edcd0['call'](this))[a0_0x5a29('0x8c1')]=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),'dc-context-menu'),_0x43ffe0[a0_0x5a29('0x5de')]=_0x3d562d['a'][a0_0x5a29('0xa')]('ul',a0_0x5a29('0x9b'),_0x43ffe0['_wrapper']),_0x43ffe0['_config']={},_0x43ffe0[a0_0x5a29('0x688')]=!0x0,_0x43ffe0[a0_0x5a29('0x519')]=_0x355f48[a0_0x5a29('0x69e')](a0_0x5a29('0x8c2')),_0x43ffe0[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x43ffe0;}return _0x1fafe8()(_0x5c055b,[{'key':'_bindEvent','value':function(){this['_viewer']['on'](_0x2cf667['h'][a0_0x5a29('0x5ca')],this['_rightClickHandler'],this),this[a0_0x5a29('0x673')]['on'](_0x2cf667['h']['CLICK'],this[a0_0x5a29('0x709')],this);}},{'key':'_unbindEvent','value':function(){this[a0_0x5a29('0x673')]['off'](_0x2cf667['h']['RIGHT_CLICK'],this[a0_0x5a29('0x738')],this),this[a0_0x5a29('0x673')][a0_0x5a29('0x59a')](_0x2cf667['h'][a0_0x5a29('0x5e9')],this[a0_0x5a29('0x709')],this);}},{'key':a0_0x5a29('0x8ac'),'value':function(){this[a0_0x5a29('0x97d')]();}},{'key':a0_0x5a29('0x97d'),'value':function(){var _0x2a0e6f=_0x3d562d['a']['create']('li',a0_0x5a29('0xb4'),this[a0_0x5a29('0x5de')]);_0x2a0e6f[a0_0x5a29('0x13d')]='飞到默认位置';var _0x2e9e40=this;_0x2a0e6f[a0_0x5a29('0x8')]=function(){_0x2e9e40[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x294')]['flyHome'](0x0),_0x2e9e40[a0_0x5a29('0x75a')]();};}},{'key':a0_0x5a29('0x738'),'value':function(_0x176bce){_0x176bce&&_0x176bce['windowPosition']&&this[a0_0x5a29('0x1c0')]&&this['_updateWindowCoord'](_0x176bce[a0_0x5a29('0x12f')]);}},{'key':a0_0x5a29('0x709'),'value':function(_0x230a86){this['hide']();}},{'key':a0_0x5a29('0x221'),'value':function(_0x16c587){this['_wrapper'][a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x6e0')[a0_0x5a29('0x6c9')](Math[a0_0x5a29('0x6e7')](_0x16c587['x']),'px,')[a0_0x5a29('0x6c9')](Math[a0_0x5a29('0x6e7')](_0x16c587['y']),a0_0x5a29('0x82b'));}},{'key':a0_0x5a29('0x782'),'value':function(){_0x3d562d['a'][a0_0x5a29('0x7f1')](this[a0_0x5a29('0x8c1')],a0_0x5a29('0x2ab')[a0_0x5a29('0x6c9')](this[a0_0x5a29('0x8e3')][a0_0x5a29('0x1f')]));}},{'key':'addMenuItem','value':function(_0x52ce1e,_0x1b0803,_0x2fe77c){if(!_0x52ce1e||!_0x1b0803)return this;var _0x87c5bd=_0x3d562d['a'][a0_0x5a29('0xa')]('li',a0_0x5a29('0x2e5'),null),_0x6143d4=this[a0_0x5a29('0x5de')][a0_0x5a29('0x8e2')];return _0x87c5bd['innerHTML']=_0x52ce1e,(_0x1b0803&&(_0x87c5bd[a0_0x5a29('0x8')]=function(){_0x1b0803['call'](_0x2fe77c);},this[a0_0x5a29('0x75a')]()),this[a0_0x5a29('0x5de')][a0_0x5a29('0x925')](_0x87c5bd,_0x6143d4),this);}},{'key':a0_0x5a29('0x719'),'set':function(_0x118434){return this[a0_0x5a29('0x8e3')]=_0x118434,_0x118434[a0_0x5a29('0x1f')]&&this['_setCustomClass'](),this;}}]),_0x5c055b;}(_0x355f48);_0x355f48[a0_0x5a29('0x264')](a0_0x5a29('0x8c2'));var _0x28d145=_0x38a08e;function _0x4e5f71(_0x5dd6ec){var _0x1615ad=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x114bea){return!0x1;}}();return function(){var _0x529896,_0x1b4da3=_0x3c6509()(_0x5dd6ec);if(_0x1615ad){var _0x4bee91=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x529896=Reflect[a0_0x5a29('0x138')](_0x1b4da3,arguments,_0x4bee91);}else _0x529896=_0x1b4da3[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x529896);};}var _0x16423e=DC['Namespace']['Cesium'],_0x2a47d8=function(_0x5d1ff7){_0x5a1389()(_0x4a352d,_0x5d1ff7);var _0xacbc6b=_0x4e5f71(_0x4a352d);function _0x4a352d(){var _0x32bf60;return _0x1ee296()(this,_0x4a352d),(_0x32bf60=_0xacbc6b[a0_0x5a29('0x351')](this))[a0_0x5a29('0x8c1')]=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),a0_0x5a29('0x1b3')),_0x32bf60[a0_0x5a29('0x895')]=_0x3d562d['a'][a0_0x5a29('0xa')]('div',a0_0x5a29('0x8b1'),_0x32bf60[a0_0x5a29('0x8c1')]),_0x32bf60[a0_0x5a29('0x53e')]=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),a0_0x5a29('0x3b9'),_0x32bf60[a0_0x5a29('0x8c1')]),_0x32bf60[a0_0x5a29('0x519')]=_0x355f48[a0_0x5a29('0x69e')]('location_bar'),_0x32bf60[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x32bf60;}return _0x1fafe8()(_0x4a352d,[{'key':'_bindEvent','value':function(){this[a0_0x5a29('0x673')]['on'](_0x2cf667['h'][a0_0x5a29('0x6eb')],this[a0_0x5a29('0x725')],this),this[a0_0x5a29('0x673')]['on'](_0x2cf667['l'][a0_0x5a29('0x13b')],this['_cameraHandler'],this);}},{'key':a0_0x5a29('0x5b5'),'value':function(){this[a0_0x5a29('0x673')]['off'](_0x2cf667['h']['MOUSE_MOVE'],this['_moveHandler'],this),this['_viewer'][a0_0x5a29('0x59a')](_0x2cf667['l'][a0_0x5a29('0x13b')],this[a0_0x5a29('0x799')],this);}},{'key':'_moveHandler','value':function(_0x539889){var _0x5970ae=_0x16423e[a0_0x5a29('0x2b5')][a0_0x5a29('0x20a')],_0x6dd785=_0x539889[a0_0x5a29('0x6e5')]?_0x5970ae[a0_0x5a29('0x587')](_0x539889[a0_0x5a29('0x6e5')]):void 0x0,_0x65c4c6=+_0x16423e[a0_0x5a29('0x382')]['toDegrees']((null==_0x6dd785?void 0x0:_0x6dd785[a0_0x5a29('0x706')])||0x0),_0x27ad54=+_0x16423e[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')]((null==_0x6dd785?void 0x0:_0x6dd785[a0_0x5a29('0x517')])||0x0),_0x4aac91=_0x6dd785?+this['_viewer']['scene'][a0_0x5a29('0x6a4')][a0_0x5a29('0x4c1')](_0x6dd785):0x0;this[a0_0x5a29('0x895')]['innerHTML']=a0_0x5a29('0x1b2')['concat'](_0x65c4c6[a0_0x5a29('0x292')](0x8),a0_0x5a29('0x5e2'))[a0_0x5a29('0x6c9')](_0x27ad54[a0_0x5a29('0x292')](0x8),a0_0x5a29('0x62d'))[a0_0x5a29('0x6c9')](_0x4aac91[a0_0x5a29('0x292')](0x2),a0_0x5a29('0x14e'));}},{'key':a0_0x5a29('0x799'),'value':function(){var _0xbf2a51=this[a0_0x5a29('0x673')][a0_0x5a29('0x581')];this[a0_0x5a29('0x53e')]['innerHTML']=a0_0x5a29('0x54d')[a0_0x5a29('0x6c9')]((+_0xbf2a51[a0_0x5a29('0x404')])[a0_0x5a29('0x292')](0x2),a0_0x5a29('0x46f'))[a0_0x5a29('0x6c9')]((+_0xbf2a51['alt'])[a0_0x5a29('0x292')](0x2),a0_0x5a29('0x8ad'));}}]),_0x4a352d;}(_0x355f48);_0x355f48[a0_0x5a29('0x264')]('location_bar');var _0x3f066a=_0x2a47d8,_0x1b5f83={'compass_outer':a0_0x5a29('0x7b3'),'compass_inner':'\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2217px\x22\x20height=\x2217px\x22\x20viewBox=\x220\x200\x2017\x2017\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x2043.2\x20(39069)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>compass-inner</title>\x0a\x20\x20\x20\x20<desc>Created\x20with\x20Sketch.</desc>\x0a\x20\x20\x20\x20<defs></defs>\x0a\x20\x20\x20\x20<g\x20id=\x22Page-1\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<g\x20id=\x22compass-inner\x22\x20fill-rule=\x22nonzero\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8.5,16.5\x20C4.081722,16.5\x200.5,12.918278\x200.5,8.5\x20C0.5,4.081722\x204.081722,0.5\x208.5,0.5\x20C12.918278,0.5\x2016.5,4.081722\x2016.5,8.5\x20C16.5,12.918278\x2012.918278,16.5\x208.5,16.5\x20Z\x20M8.5,15.5\x20C12.3659932,15.5\x2015.5,12.3659932\x2015.5,8.5\x20C15.5,4.63400675\x2012.3659932,1.5\x208.5,1.5\x20C4.63400675,1.5\x201.5,4.63400675\x201.5,8.5\x20C1.5,12.3659932\x204.63400675,15.5\x208.5,15.5\x20Z\x22\x20id=\x22Oval-96\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M9.92599835,7.09066832\x20C12.7122872,9.87695712\x2014.3709388,12.5452228\x2013.4497471,13.4664145\x20C12.5285555,14.3876061\x209.86028979,12.7289545\x207.074001,9.94266568\x20C4.2877122,7.15637688\x202.62906055,4.48811119\x203.55025221,3.56691953\x20C4.47144386,2.64572788\x207.13970955,4.30437952\x209.92599835,7.09066832\x20Z\x20M9.21889157,7.7977751\x20C6.92836458,5.50724811\x204.52075769,4.01062761\x204.25735899,4.27402631\x20C3.99396029,4.53742501\x205.49058078,6.9450319\x207.78110778,9.2355589\x20C10.0716348,11.5260859\x2012.4792417,13.0227064\x2012.7426404,12.7593077\x20C13.0060391,12.495909\x2011.5094186,10.0883021\x209.21889157,7.7977751\x20Z\x22\x20id=\x22Oval-96-Copy-2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M9.92599835,9.94266568\x20C7.13970955,12.7289545\x204.47144386,14.3876061\x203.55025221,13.4664145\x20C2.62906055,12.5452228\x204.2877122,9.87695712\x207.074001,7.09066832\x20C9.86028979,4.30437952\x2012.5285555,2.64572788\x2013.4497471,3.56691953\x20C14.3709388,4.48811119\x2012.7122872,7.15637688\x209.92599835,9.94266568\x20Z\x20M9.21889157,9.2355589\x20C11.5094186,6.9450319\x2013.0060391,4.53742501\x2012.7426404,4.27402631\x20C12.4792417,4.01062761\x2010.0716348,5.50724811\x207.78110778,7.7977751\x20C5.49058078,10.0883021\x203.99396029,12.495909\x204.25735899,12.7593077\x20C4.52075769,13.0227064\x206.92836458,11.5260859\x209.21889157,9.2355589\x20Z\x22\x20id=\x22Oval-96-Copy-3\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M15.1464466,1.1464466\x20L14.3453364,1.94755684\x20L13.9608692,2.33202401\x20L14.667976,3.03913077\x20L15.0524431,2.65466362\x20L15.8535534,1.8535534\x20L15.1464466,1.1464466\x20Z\x20M2.29760014,13.995293\x20L1.85311902,14.4397742\x20L1.004311,15.2885822\x20L1.71141776,15.995689\x20L2.56022581,15.146881\x20L3.00470698,14.7023998\x20L2.29760014,13.995293\x20Z\x22\x20id=\x22Line\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-432\x22\x20cx=\x2216\x22\x20cy=\x221\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-432-Copy\x22\x20cx=\x221\x22\x20cy=\x2216\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</g>\x0a</svg>\x0a','compass_rotation_marker':a0_0x5a29('0x6dc'),'decrease':a0_0x5a29('0x2d1'),'increase':a0_0x5a29('0x2dc'),'refresh':'\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2250px\x22\x20height=\x2250px\x22\x20viewBox=\x220\x200\x2050\x2050\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>refresh</title>\x0a\x20\x20\x20\x20<path\x20d=\x22M48.2758621,0\x20C47.2844828,0\x2046.5086207,0.775193846\x2046.5086207,1.76571923\x20L46.5086207,12.2308355\x20C42.0689655,4.78036173\x2034.0086207,0\x2025,0\x20C11.2068965,0\x200,11.1972438\x200,25.0215332\x20C0,38.8458226\x2011.2068965,50\x2025,50\x20C38.7931035,50\x2050,38.8027562\x2050,25.0215332\x20C50,24.0310078\x2049.2241379,23.2558139\x2048.2327587,23.2558139\x20C47.2413793,23.2558139\x2046.4655172,24.0310078\x2046.4655172,25.0215332\x20C46.4655172,36.8647717\x2036.8103448,46.5116279\x2024.9568965,46.5116279\x20C13.1034483,46.5116279\x203.49137933,36.8217054\x203.49137933,24.9784668\x20C3.49137933,13.1352283\x2013.1465517,3.48837212\x2025,3.48837212\x20C33.4913793,3.48837212\x2041.0775862,8.44099913\x2044.5258621,16.0206718\x20L32.1551724,16.0206718\x20C31.1637931,16.0206718\x2030.3879311,16.7958657\x2030.3879311,17.7863911\x20C30.3879311,18.7769164\x2031.1637931,19.5521103\x2032.1551724,19.5521103\x20L48.2327587,19.5521103\x20C49.2241379,19.5521103\x2050,18.7769164\x2050,17.7863911\x20L50,1.72265288\x20C50,0.775193846\x2049.2241379,0\x2048.2758621,0\x20L48.2758621,0\x20L48.2758621,0\x20Z\x22\x20id=\x22Shape\x22></path>\x0a</svg>\x0a','splitter':a0_0x5a29('0x27d')};function _0x2449d0(_0x32acb9){var _0x2ba61b=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x128e60){return!0x1;}}();return function(){var _0x2e6bd5,_0x4b5ab5=_0x3c6509()(_0x32acb9);if(_0x2ba61b){var _0x577dbe=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x2e6bd5=Reflect[a0_0x5a29('0x138')](_0x4b5ab5,arguments,_0x577dbe);}else _0x2e6bd5=_0x4b5ab5[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x2e6bd5);};}var _0x3d02b2=DC['Namespace']['Cesium'],_0x180672=function(_0x5b67a9){_0x5a1389()(_0x54c18c,_0x5b67a9);var _0x119280=_0x2449d0(_0x54c18c);function _0x54c18c(){var _0x3a7b23;return _0x1ee296()(this,_0x54c18c),(_0x3a7b23=_0x119280[a0_0x5a29('0x351')](this))['_wrapper']=_0x3d562d['a'][a0_0x5a29('0xa')]('div',a0_0x5a29('0x51a')),_0x3a7b23[a0_0x5a29('0x448')]=void 0x0,_0x3a7b23[a0_0x5a29('0x77f')]=!0x1,_0x3a7b23['type']=_0x355f48[a0_0x5a29('0x69e')](a0_0x5a29('0x43c')),_0x3a7b23['_state']=_0x1f4e85['a']['INITIALIZED'],_0x3a7b23;}return _0x1fafe8()(_0x54c18c,[{'key':'_installHook','value':function(){var _0x548be3=_0x3d562d['a'][a0_0x5a29('0x672')](_0x1b5f83['splitter'],!0x0,a0_0x5a29('0x539'));this[a0_0x5a29('0x8c1')][a0_0x5a29('0x365')](_0x548be3);var _0x18ed07=new _0x3d02b2[(a0_0x5a29('0x58b'))](_0x548be3),_0x1578e6=this;_0x18ed07['setInputAction'](function(){_0x1578e6['_moveActive']=!0x0;},_0x3d02b2['ScreenSpaceEventType']['LEFT_DOWN']),_0x18ed07['setInputAction'](function(){_0x1578e6[a0_0x5a29('0x77f')]=!0x0;},_0x3d02b2[a0_0x5a29('0x1a2')]['PINCH_START']),_0x18ed07[a0_0x5a29('0x872')](function(_0x7fefab){_0x1578e6[a0_0x5a29('0x725')](_0x7fefab);},_0x3d02b2[a0_0x5a29('0x1a2')][a0_0x5a29('0x6eb')]),_0x18ed07[a0_0x5a29('0x872')](function(_0x393bf4){_0x1578e6[a0_0x5a29('0x725')](_0x393bf4);},_0x3d02b2[a0_0x5a29('0x1a2')]['PINCH_MOVE']),_0x18ed07[a0_0x5a29('0x872')](function(){_0x1578e6[a0_0x5a29('0x77f')]=!0x1;},_0x3d02b2[a0_0x5a29('0x1a2')][a0_0x5a29('0x468')]),_0x18ed07[a0_0x5a29('0x872')](function(){_0x1578e6[a0_0x5a29('0x77f')]=!0x1;},_0x3d02b2[a0_0x5a29('0x1a2')][a0_0x5a29('0x296')]);}},{'key':'_moveHandler','value':function(_0x542df5){if(this[a0_0x5a29('0x77f')]&&this[a0_0x5a29('0x1c0')]){var _0x57e03e=_0x542df5['endPosition']['x'],_0x5b5e3c=(this[a0_0x5a29('0x8c1')][a0_0x5a29('0x87d')]+_0x57e03e)/this[a0_0x5a29('0x8c1')]['parentElement']['offsetWidth'];this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x3a3')]=0x64*_0x5b5e3c+'%',this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x72d')]=_0x5b5e3c;}}},{'key':a0_0x5a29('0x154'),'value':function(_0x41300d,_0x4c64ff){return this[a0_0x5a29('0x673')]&&this[a0_0x5a29('0x1c0')]?(_0x41300d&&(this[a0_0x5a29('0x448')]&&this['_viewer'][a0_0x5a29('0x67e')][a0_0x5a29('0x25f')][a0_0x5a29('0x157')](this[a0_0x5a29('0x448')]),this[a0_0x5a29('0x448')]=this['_viewer'][a0_0x5a29('0x67e')][a0_0x5a29('0x25f')][a0_0x5a29('0x425')](_0x41300d),this[a0_0x5a29('0x448')][a0_0x5a29('0x60f')]=_0x4c64ff||0x0,this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x72d')]=this['_wrapper'][a0_0x5a29('0x87d')]/this[a0_0x5a29('0x8c1')][a0_0x5a29('0x8e8')][a0_0x5a29('0x44e')]),this):this;}}]),_0x54c18c;}(_0x355f48);_0x355f48[a0_0x5a29('0x264')](a0_0x5a29('0x43c'));var _0x440696=_0x180672;function _0x31662c(_0xb64028){var _0x15d9da=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x4f8070){return!0x1;}}();return function(){var _0x5b3ef2,_0x185d66=_0x3c6509()(_0xb64028);if(_0x15d9da){var _0x4eff4b=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x5b3ef2=Reflect[a0_0x5a29('0x138')](_0x185d66,arguments,_0x4eff4b);}else _0x5b3ef2=_0x185d66[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x5b3ef2);};}var _0x2f35f9=function(_0xffeeb){_0x5a1389()(_0x341f82,_0xffeeb);var _0x5161a3=_0x31662c(_0x341f82);function _0x341f82(){var _0x3265e7;return _0x1ee296()(this,_0x341f82),(_0x3265e7=_0x5161a3[a0_0x5a29('0x351')](this))[a0_0x5a29('0x8c1')]=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),a0_0x5a29('0x66e')),_0x3265e7[a0_0x5a29('0x8e3')]=void 0x0,_0x3265e7[a0_0x5a29('0x931')]=[],_0x3265e7[a0_0x5a29('0x519')]=_0x355f48[a0_0x5a29('0x69e')](a0_0x5a29('0x49b')),_0x3265e7[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x3265e7;}return _0x1fafe8()(_0x341f82,[{'key':a0_0x5a29('0x29a'),'value':function(){!this[a0_0x5a29('0x8c1')][a0_0x5a29('0x3d5')]&&this[a0_0x5a29('0x673')]&&this[a0_0x5a29('0x673')][a0_0x5a29('0x8c6')]['appendChild'](this[a0_0x5a29('0x8c1')]);}},{'key':a0_0x5a29('0x8ac'),'value':function(){var _0x46bb02=this;this[a0_0x5a29('0x4ff')]=!0x0;var _0x1b7386=this;this[a0_0x5a29('0x8c1')][a0_0x5a29('0x166')]=function(){var _0x1bd7f5=0x50;_0x1b7386[a0_0x5a29('0x931')][a0_0x5a29('0x515')]>0x0&&(_0x1bd7f5=0x55*_0x1b7386[a0_0x5a29('0x931')][a0_0x5a29('0x515')]),_0x46bb02[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x96f')]=''[a0_0x5a29('0x6c9')](_0x1bd7f5,'px');},this[a0_0x5a29('0x8c1')][a0_0x5a29('0x6d3')]=function(){_0x1b7386['_wrapper']['style'][a0_0x5a29('0x96f')]='80px';};}},{'key':a0_0x5a29('0x972'),'value':function(_0x139785){var _0x9c9a92=this,_0x3f5a1c=_0x3d562d['a']['create']('div',a0_0x5a29('0x968'),this[a0_0x5a29('0x8c1')]),_0x26bf60=this[a0_0x5a29('0x931')][a0_0x5a29('0x515')]?this[a0_0x5a29('0x931')][a0_0x5a29('0x515')]-0x1:0x0;0x0===_0x26bf60&&_0x3d562d['a'][a0_0x5a29('0x880')](_0x3f5a1c,a0_0x5a29('0x8a6')),_0x3f5a1c[a0_0x5a29('0x773')](a0_0x5a29('0x61e'),String(_0x26bf60)),_0x3f5a1c['onclick']=function(_0x1cfd5c){var _0x276bc4=document[a0_0x5a29('0x646')](a0_0x5a29('0x44d'));_0x276bc4&&_0x276bc4['length']&&(_0x276bc4[0x0][a0_0x5a29('0x38b')]=a0_0x5a29('0x968')),_0x9c9a92[a0_0x5a29('0x673')]&&(_0x1cfd5c[a0_0x5a29('0x28a')][a0_0x5a29('0x38b')]='map-item\x20active',_0x9c9a92['_viewer'][a0_0x5a29('0x3b2')](+_0x1cfd5c[a0_0x5a29('0x28a')][a0_0x5a29('0xbd')]('data-index')||0x0));},_0x139785[a0_0x5a29('0x2ca')]&&(_0x3f5a1c[a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]='\x0a\x20\x20\x20\x20\x20\x20\x20background:url('[a0_0x5a29('0x6c9')](_0x139785[a0_0x5a29('0x2ca')],');\x0a\x20\x20\x20\x20')),_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x8b5'),'',_0x3f5a1c)[a0_0x5a29('0x13d')]=_0x139785[a0_0x5a29('0x775')]||'地图';}},{'key':'addMap','value':function(){var _0x4b2036=arguments[a0_0x5a29('0x515')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:{};this[a0_0x5a29('0x1c0')]&&(this[a0_0x5a29('0x931')][a0_0x5a29('0x3cd')](_0x4b2036),this[a0_0x5a29('0x972')](_0x4b2036),this[a0_0x5a29('0x931')][a0_0x5a29('0x515')]>0x1&&(this['_wrapper']['style'][a0_0x5a29('0x8d5')]=a0_0x5a29('0x56d')));}}]),_0x341f82;}(_0x355f48);_0x355f48[a0_0x5a29('0x264')]('map_switch');var _0x50cc2a=_0x2f35f9;function _0x33a670(_0x134517){var _0x2b3dbf=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype'][a0_0x5a29('0x857')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x1ced95){return!0x1;}}();return function(){var _0xb10cdb,_0x3cac77=_0x3c6509()(_0x134517);if(_0x2b3dbf){var _0x31203b=_0x3c6509()(this)[a0_0x5a29('0x825')];_0xb10cdb=Reflect['construct'](_0x3cac77,arguments,_0x31203b);}else _0xb10cdb=_0x3cac77[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0xb10cdb);};}var _0x4e857d=function(_0x47a06d){_0x5a1389()(_0x350061,_0x47a06d);var _0x5bf9ba=_0x33a670(_0x350061);function _0x350061(){var _0x190715;return _0x1ee296()(this,_0x350061),(_0x190715=_0x5bf9ba['call'](this))[a0_0x5a29('0x8c1')]=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),a0_0x5a29('0x378')),_0x190715[a0_0x5a29('0x8e3')]={'customClass':''},_0x190715[a0_0x5a29('0x688')]=!0x0,_0x190715[a0_0x5a29('0x519')]=_0x355f48['getWidgetType']('popup'),_0x190715[a0_0x5a29('0x284')]=_0x1f4e85['a']['INITIALIZED'],_0x190715;}return _0x1fafe8()(_0x350061,[{'key':a0_0x5a29('0x8ac'),'value':function(){this[a0_0x5a29('0x4ff')]=!0x0;}},{'key':a0_0x5a29('0x221'),'value':function(_0x2e2297){var _0x64ddf0=_0x2e2297['x']-this[a0_0x5a29('0x8c1')][a0_0x5a29('0x44e')]/0x2,_0x4ac796=_0x2e2297['y']-this['_wrapper']['offsetHeight'];this[a0_0x5a29('0x8e3')]&&a0_0x5a29('0x3a3')===this[a0_0x5a29('0x8e3')][a0_0x5a29('0x53c')]?_0x64ddf0=_0x2e2297['x']-this[a0_0x5a29('0x8c1')][a0_0x5a29('0x44e')]:this[a0_0x5a29('0x8e3')]&&a0_0x5a29('0x2b0')===this[a0_0x5a29('0x8e3')][a0_0x5a29('0x53c')]&&(_0x64ddf0=_0x2e2297['x']),this[a0_0x5a29('0x8c1')][a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x6e0')[a0_0x5a29('0x6c9')](Math[a0_0x5a29('0x6e7')](_0x64ddf0),a0_0x5a29('0x2f'))[a0_0x5a29('0x6c9')](Math[a0_0x5a29('0x6e7')](_0x4ac796),a0_0x5a29('0x82b'));}},{'key':a0_0x5a29('0x782'),'value':function(){_0x3d562d['a'][a0_0x5a29('0x7f1')](this['_wrapper'],a0_0x5a29('0x6f')['concat'](this[a0_0x5a29('0x8e3')][a0_0x5a29('0x1f')]));}},{'key':a0_0x5a29('0x6fc'),'value':function(_0x2c70be){return _0x2c70be&&_0x2c70be instanceof Element&&(this[a0_0x5a29('0x8c1')]=_0x2c70be,_0x3d562d['a'][a0_0x5a29('0x880')](this[a0_0x5a29('0x8c1')],a0_0x5a29('0x378'))),this;}},{'key':a0_0x5a29('0x18'),'value':function(_0x128244){return this['_position']=_0x128244,this[a0_0x5a29('0x8c1')]&&(this[a0_0x5a29('0x8c1')]['style'][a0_0x5a29('0x91e')]=a0_0x5a29('0x644')),this;}},{'key':a0_0x5a29('0x43a'),'value':function(_0x4a1ad8,_0x34d1cf){return this[a0_0x5a29('0x18')](_0x4a1ad8)[a0_0x5a29('0x8a5')](_0x34d1cf),this;}},{'key':a0_0x5a29('0x719'),'set':function(_0x236683){this['_config']=_0x236683,_0x236683[a0_0x5a29('0x1f')]&&this[a0_0x5a29('0x782')]();}}]),_0x350061;}(_0x355f48);_0x355f48['registerType'](a0_0x5a29('0x224'));var _0x148bd7=_0x4e857d;function _0x4277ff(_0xf34f0c){var _0x29d1d3=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString']['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x55bc1f){return!0x1;}}();return function(){var _0x46b838,_0x424c87=_0x3c6509()(_0xf34f0c);if(_0x29d1d3){var _0x281366=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x46b838=Reflect[a0_0x5a29('0x138')](_0x424c87,arguments,_0x281366);}else _0x46b838=_0x424c87[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x46b838);};}var _0x49f762=function(_0x352a46){_0x5a1389()(_0x17dbf5,_0x352a46);var _0x57778=_0x4277ff(_0x17dbf5);function _0x17dbf5(){var _0x506b60;return _0x1ee296()(this,_0x17dbf5),(_0x506b60=_0x57778[a0_0x5a29('0x351')](this))[a0_0x5a29('0x8c1')]=_0x3d562d['a']['create'](a0_0x5a29('0x884'),a0_0x5a29('0x2a0')),_0x506b60['type']=_0x355f48['getWidgetType'](a0_0x5a29('0x2af')),_0x506b60['_state']=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x506b60;}return _0x1fafe8()(_0x17dbf5,[{'key':a0_0x5a29('0x221'),'value':function(_0xf6b15b){var _0x1609a4=_0xf6b15b['x']+0xa,_0x19126b=_0xf6b15b['y']-this[a0_0x5a29('0x8c1')]['offsetHeight']/0x2;this['_wrapper']['style'][a0_0x5a29('0x91e')]=a0_0x5a29('0x6e0')[a0_0x5a29('0x6c9')](Math[a0_0x5a29('0x6e7')](_0x1609a4),a0_0x5a29('0x2f'))[a0_0x5a29('0x6c9')](Math[a0_0x5a29('0x6e7')](_0x19126b),'px,\x200);\x0a\x20\x20\x20\x20');}},{'key':'showAt','value':function(_0x546e65,_0x265a7c){return _0x546e65&&this['_updateWindowCoord'](_0x546e65),this[a0_0x5a29('0x8a5')](_0x265a7c),this;}}]),_0x17dbf5;}(_0x355f48);_0x355f48[a0_0x5a29('0x264')]('tooltip');var _0x36cba3=_0x49f762;function _0x4458a0(_0x241eb3,_0x342418){var _0x24e79d=Object[a0_0x5a29('0x148')](_0x241eb3);if(Object['getOwnPropertySymbols']){var _0xb11255=Object['getOwnPropertySymbols'](_0x241eb3);_0x342418&&(_0xb11255=_0xb11255[a0_0x5a29('0x48a')](function(_0x16e6b6){return Object[a0_0x5a29('0x11a')](_0x241eb3,_0x16e6b6)['enumerable'];})),_0x24e79d[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x24e79d,_0xb11255);}return _0x24e79d;}function _0x9f11c2(_0x4f2eda){for(var _0x4b8207=0x1;_0x4b8207<arguments[a0_0x5a29('0x515')];_0x4b8207++){var _0x4531ac=null!=arguments[_0x4b8207]?arguments[_0x4b8207]:{};_0x4b8207%0x2?_0x4458a0(Object(_0x4531ac),!0x0)['forEach'](function(_0x3d01e4){_0x59708f()(_0x4f2eda,_0x3d01e4,_0x4531ac[_0x3d01e4]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x4f2eda,Object[a0_0x5a29('0x711')](_0x4531ac)):_0x4458a0(Object(_0x4531ac))[a0_0x5a29('0x570')](function(_0x451d4b){Object['defineProperty'](_0x4f2eda,_0x451d4b,Object[a0_0x5a29('0x11a')](_0x4531ac,_0x451d4b));});}return _0x4f2eda;}function _0x357ef7(_0x2f35e1){var _0x41669e=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x3eb5a1){return!0x1;}}();return function(){var _0x15a647,_0x27562e=_0x3c6509()(_0x2f35e1);if(_0x41669e){var _0x562cd3=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x15a647=Reflect[a0_0x5a29('0x138')](_0x27562e,arguments,_0x562cd3);}else _0x15a647=_0x27562e[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x15a647);};}var _0x1a376c=DC[a0_0x5a29('0x239')]['Cesium'],_0x426ec0={'animation':!0x1,'baseLayerPicker':!0x1,'fullscreenButton':!0x1,'geocoder':!0x1,'homeButton':!0x1,'infoBox':!0x1,'sceneModePicker':!0x1,'selectionIndicator':!0x1,'timeline':!0x1,'navigationHelpButton':!0x1,'navigationInstructionsInitiallyVisible':!0x1,'creditContainer':void 0x0},_0x2e64b4=function(_0x30bec8){_0x5a1389()(_0x3dda70,_0x30bec8);var _0x4a8cc4=_0x357ef7(_0x3dda70);function _0x3dda70(){var _0x5853dc;return _0x1ee296()(this,_0x3dda70),(_0x5853dc=_0x4a8cc4[a0_0x5a29('0x351')](this))[a0_0x5a29('0x8c1')]=_0x3d562d['a'][a0_0x5a29('0xa')]('div','dc-hawkeye-map',null),_0x5853dc[a0_0x5a29('0x8c1')]['setAttribute']('id',_0x3d562d['c']['uuid']()),_0x5853dc['_baseLayers']=[],_0x5853dc[a0_0x5a29('0x377')]=void 0x0,_0x5853dc['type']=_0x355f48[a0_0x5a29('0x69e')](a0_0x5a29('0x3ea')),_0x5853dc[a0_0x5a29('0x284')]=_0x1f4e85['a']['INITIALIZED'],_0x5853dc;}return _0x1fafe8()(_0x3dda70,[{'key':a0_0x5a29('0x48e'),'value':function(){var _0x55c6e2=new _0x1a376c[(a0_0x5a29('0x483'))](this[a0_0x5a29('0x8c1')],_0x9f11c2(_0x9f11c2({},_0x426ec0),{},{'sceneMode':_0x1a376c['SceneMode'][a0_0x5a29('0x580')]}));_0x55c6e2[a0_0x5a29('0x25f')]['removeAll'](),_0x55c6e2[a0_0x5a29('0x68d')][a0_0x5a29('0x836')][a0_0x5a29('0x46a')]['display']='none',_0x55c6e2['cesiumWidget'][a0_0x5a29('0x70d')][a0_0x5a29('0xf2')](_0x1a376c[a0_0x5a29('0x1a2')][a0_0x5a29('0x946')]),_0x55c6e2['scene'][a0_0x5a29('0x2f9')]=_0x1a376c[a0_0x5a29('0x82')][a0_0x5a29('0x481')],_0x3d562d['c'][a0_0x5a29('0x65f')](_0x55c6e2[a0_0x5a29('0x238')][a0_0x5a29('0x76e')],{'enableRotate':!0x1,'enableTranslate':!0x1,'enableZoom':!0x1,'enableTilt':!0x1,'enableLook':!0x1,'maximumZoomDistance':0x269d036}),this[a0_0x5a29('0x377')]=_0x55c6e2;}},{'key':'_bindEvent','value':function(){this['_viewer']['on'](_0x2cf667['l']['CAMERA_CHANGED'],this['_syncMap'],this);}},{'key':a0_0x5a29('0x5b5'),'value':function(){this[a0_0x5a29('0x673')]['off'](_0x2cf667['l'][a0_0x5a29('0x13b')],this[a0_0x5a29('0x4af')],this);}},{'key':a0_0x5a29('0x8ac'),'value':function(){this[a0_0x5a29('0x48e')](),this['_viewer']['camera'][a0_0x5a29('0x2a2')]=0.01;}},{'key':a0_0x5a29('0x4af'),'value':function(){var _0x4d7423=new _0x1a376c['Cartesian2'](Math[a0_0x5a29('0x1c3')](this['_viewer'][a0_0x5a29('0x662')][a0_0x5a29('0x72a')]/0x2),Math['floor'](this[a0_0x5a29('0x673')]['canvas'][a0_0x5a29('0x2ba')]/0x2)),_0x22b9ed=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x294')]['pickEllipsoid'](_0x4d7423);if(!_0x22b9ed)return!0x1;var _0x49ff11=_0x1a376c[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0x22b9ed,this['_viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x294')][a0_0x5a29('0x328')]);this['_map'][a0_0x5a29('0x238')]['camera'][a0_0x5a29('0x87f')](_0x22b9ed,new _0x1a376c[(a0_0x5a29('0x3bd'))](0x0,0x0,_0x49ff11));}},{'key':a0_0x5a29('0x154'),'value':function(_0x58e062){var _0x49ee0f=this;return this[a0_0x5a29('0x377')]&&this[a0_0x5a29('0x1c0')]?(_0x58e062&&(this[a0_0x5a29('0x12b')]&&this['_baseLayers'][a0_0x5a29('0x515')]&&this['_map'][a0_0x5a29('0x25f')][a0_0x5a29('0x8db')](),Array['isArray'](_0x58e062)||(_0x58e062=[_0x58e062]),_0x58e062[a0_0x5a29('0x570')](function(_0x52d9b5){_0x49ee0f[a0_0x5a29('0x12b')]['push'](_0x49ee0f[a0_0x5a29('0x377')]['imageryLayers'][a0_0x5a29('0x425')](_0x52d9b5));})),this):this;}},{'key':'baseLayers','get':function(){return this[a0_0x5a29('0x12b')];}}]),_0x3dda70;}(_0x355f48);_0x355f48[a0_0x5a29('0x264')](a0_0x5a29('0x3ea'));var _0x24b3da=_0x2e64b4;function _0x2baf2d(_0x553d6b){var _0x10d43c=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x16c6b4){return!0x1;}}();return function(){var _0xd35d2a,_0x20a578=_0x3c6509()(_0x553d6b);if(_0x10d43c){var _0x3de3ae=_0x3c6509()(this)[a0_0x5a29('0x825')];_0xd35d2a=Reflect[a0_0x5a29('0x138')](_0x20a578,arguments,_0x3de3ae);}else _0xd35d2a=_0x20a578[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0xd35d2a);};}var _0x378dd7=DC[a0_0x5a29('0x239')]['Cesium'],_0x4a16ea=function(_0x41de89){_0x5a1389()(_0x593d31,_0x41de89);var _0x471df5=_0x2baf2d(_0x593d31);function _0x593d31(){var _0x164cce;return _0x1ee296()(this,_0x593d31),(_0x164cce=_0x471df5[a0_0x5a29('0x351')](this))[a0_0x5a29('0x8c1')]=_0x3d562d['a'][a0_0x5a29('0xa')]('div',a0_0x5a29('0x6a')),_0x164cce[a0_0x5a29('0x107')]=void 0x0,_0x164cce[a0_0x5a29('0x95c')]=void 0x0,_0x164cce['_gyro']=void 0x0,_0x164cce[a0_0x5a29('0x778')]=void 0x0,_0x164cce[a0_0x5a29('0x37f')]=0x0,_0x164cce[a0_0x5a29('0x7ac')]=0x0,_0x164cce[a0_0x5a29('0x7f2')]=0x0,_0x164cce['_orbitFrame']=void 0x0,_0x164cce[a0_0x5a29('0x260')]=!0x1,_0x164cce[a0_0x5a29('0x186')]=void 0x0,_0x164cce[a0_0x5a29('0x76')]=void 0x0,_0x164cce[a0_0x5a29('0x8da')]=void 0x0,_0x164cce['_mouseUpHandle']=void 0x0,_0x164cce[a0_0x5a29('0x519')]=_0x355f48['getWidgetType']('compass'),_0x164cce['_state']=_0x1f4e85['a']['INITIALIZED'],_0x164cce;}return _0x1fafe8()(_0x593d31,[{'key':a0_0x5a29('0x95e'),'value':function(){this[a0_0x5a29('0x673')]['on'](_0x2cf667['l'][a0_0x5a29('0x6f0')],this[a0_0x5a29('0x42b')],this);}},{'key':a0_0x5a29('0x5b5'),'value':function(){this[a0_0x5a29('0x673')][a0_0x5a29('0x59a')](_0x2cf667['l'][a0_0x5a29('0x6f0')],this['_postRenderHandler'],this);}},{'key':a0_0x5a29('0x8ac'),'value':function(){var _0x230e1f=this;this[a0_0x5a29('0x5a8')](),this['_wrapper'][a0_0x5a29('0x168')]=function(_0x11247c){_0x230e1f[a0_0x5a29('0x747')](_0x11247c);},this[a0_0x5a29('0x8c1')][a0_0x5a29('0x822')]=function(_0x4c3de6){_0x230e1f[a0_0x5a29('0x51')](_0x4c3de6);};}},{'key':a0_0x5a29('0x42b'),'value':function(){var _0x40d83f=this[a0_0x5a29('0x673')]['camera']['heading'];this[a0_0x5a29('0x95c')]&&(this[a0_0x5a29('0x95c')][a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x588')[a0_0x5a29('0x6c9')](_0x40d83f,a0_0x5a29('0x145'))[a0_0x5a29('0x6c9')](_0x40d83f,'rad);\x0a\x20\x20\x20\x20\x20\x20'));}},{'key':a0_0x5a29('0x5a8'),'value':function(){_0x3d562d['a'][a0_0x5a29('0xa')]('div','out-ring-bg',this[a0_0x5a29('0x8c1')]),this[a0_0x5a29('0x95c')]=_0x3d562d['a']['parseDom'](_0x1b5f83['compass_outer'],!0x0,a0_0x5a29('0x7a8')),this[a0_0x5a29('0x8c1')][a0_0x5a29('0x365')](this[a0_0x5a29('0x95c')]),this[a0_0x5a29('0x190')]=_0x3d562d['a'][a0_0x5a29('0x672')](_0x1b5f83[a0_0x5a29('0x73d')],!0x0,a0_0x5a29('0x2e9')),this[a0_0x5a29('0x8c1')]['appendChild'](this[a0_0x5a29('0x190')]),this[a0_0x5a29('0x778')]=_0x3d562d['a']['parseDom'](_0x1b5f83[a0_0x5a29('0x8e9')],!0x0,a0_0x5a29('0x834')),this['_wrapper'][a0_0x5a29('0x365')](this['_rotation_marker']),this['_rotation_marker'][a0_0x5a29('0x46a')][a0_0x5a29('0x8d5')]='hidden';}},{'key':a0_0x5a29('0x747'),'value':function(_0x53c1db){if(this[a0_0x5a29('0x673')]['scene']['mode']===_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0xdf')])return!0x0;this[a0_0x5a29('0x107')]=_0x53c1db['currentTarget'][a0_0x5a29('0x398')]();var _0x4d4115=this['_compassRectangle']['width']/0x2,_0x49150a=this['_getVector'](_0x53c1db),_0x4a1958=_0x378dd7['Cartesian2']['magnitude'](_0x49150a)/_0x4d4115;if(_0x4a1958<0x32/0x91)this[a0_0x5a29('0x847')](_0x49150a);else{if(!(_0x4a1958<0x1))return!0x0;this[a0_0x5a29('0x1ee')](_0x49150a);}}},{'key':a0_0x5a29('0x51'),'value':function(_0x5912e3){var _0x52d96=this['_viewer'][a0_0x5a29('0x238')],_0x1649f4=_0x52d96[a0_0x5a29('0x294')],_0x505c4a=_0x52d96[a0_0x5a29('0x76e')];if(_0x52d96[a0_0x5a29('0x48c')]===_0x378dd7[a0_0x5a29('0x415')]['MORPHING']||!_0x505c4a[a0_0x5a29('0x911')])return!0x0;if(_0x52d96[a0_0x5a29('0x48c')]!==_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0x216')]||_0x505c4a[a0_0x5a29('0x929')]){if(_0x52d96[a0_0x5a29('0x48c')]===_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')]||_0x52d96['mode']===_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0x216')]){if(!_0x505c4a[a0_0x5a29('0x89c')])return;if(_0x52d96['mode']===_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')]&&!_0x505c4a['enableRotate'])return;}var _0xbfe775=this[a0_0x5a29('0x318')](!0x0);if(_0xbfe775){var _0x3fae0f=_0x52d96[a0_0x5a29('0x6a4')][a0_0x5a29('0x12c')][a0_0x5a29('0x6fe')](_0x1649f4[a0_0x5a29('0x2a1')]),_0x38bfcb=_0x52d96[a0_0x5a29('0x6a4')][a0_0x5a29('0x12c')][a0_0x5a29('0x73b')](_0xbfe775),_0x187b6c=new _0x378dd7[(a0_0x5a29('0x12d'))](_0xbfe775,0x0);_0x1649f4['flyToBoundingSphere'](_0x187b6c,{'offset':new _0x378dd7[(a0_0x5a29('0x85f'))](0x0,_0x378dd7[a0_0x5a29('0x382')][a0_0x5a29('0x94')]-_0x378dd7[a0_0x5a29('0x3bd')]['angleBetween'](_0x38bfcb,_0x1649f4[a0_0x5a29('0x619')]),_0x378dd7[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0x3fae0f,_0xbfe775)),'duration':1.5});}}}},{'key':'_getCameraFocus','value':function(_0x1f1aab){var _0x4a9eff=new _0x378dd7['Cartesian3'](),_0x39a693=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')],_0x231da5=_0x39a693[a0_0x5a29('0x294')];if(_0x39a693['mode']!==_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0xdf')]){if(this[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x1cf')])_0x4a9eff=this[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x1cf')][a0_0x5a29('0x53c')]['getValue'](this['_viewer'][a0_0x5a29('0x5f3')]['currentTime']);else{var _0x9a30d2=new _0x378dd7[(a0_0x5a29('0x302'))]();_0x9a30d2[a0_0x5a29('0x6b2')]=_0x231da5[a0_0x5a29('0x328')],_0x9a30d2[a0_0x5a29('0x278')]=_0x231da5[a0_0x5a29('0x619')],_0x4a9eff=_0x39a693['globe'][a0_0x5a29('0x50')](_0x9a30d2,_0x39a693);}if(_0x4a9eff){if(_0x39a693[a0_0x5a29('0x48c')]===_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0x580')]||_0x39a693[a0_0x5a29('0x48c')]===_0x378dd7[a0_0x5a29('0x415')]['COLUMBUS_VIEW']){_0x4a9eff=_0x231da5['worldToCameraCoordinatesPoint'](_0x4a9eff);var _0x4c2815=new _0x378dd7[(a0_0x5a29('0x7c9'))]();_0x1f1aab&&(_0x4a9eff=_0x39a693[a0_0x5a29('0x6a4')][a0_0x5a29('0x12c')][a0_0x5a29('0x6fe')](_0x39a693[a0_0x5a29('0x38e')][a0_0x5a29('0x2aa')](_0x4a9eff,_0x4c2815)));}else _0x1f1aab||(_0x4a9eff=_0x231da5[a0_0x5a29('0x88c')](_0x4a9eff));return _0x4a9eff;}}}},{'key':a0_0x5a29('0x847'),'value':function(_0x4a379e){var _0x5ee093=this,_0x2bad21=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')],_0x5de980=_0x2bad21[a0_0x5a29('0x76e')],_0x58b106=_0x2bad21[a0_0x5a29('0x294')];if(_0x2bad21['mode']!==_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0xdf')]&&_0x5de980['enableInputs']){switch(_0x2bad21[a0_0x5a29('0x48c')]){case _0x378dd7['SceneMode'][a0_0x5a29('0x216')]:if(_0x5de980[a0_0x5a29('0x89c')])break;if(!_0x5de980[a0_0x5a29('0x929')]||!_0x5de980[a0_0x5a29('0x399')])return;break;case _0x378dd7['SceneMode'][a0_0x5a29('0x3b1')]:if(_0x5de980[a0_0x5a29('0x89c')])break;if(!_0x5de980[a0_0x5a29('0x399')]||!_0x5de980[a0_0x5a29('0xe0')])return;break;case _0x378dd7[a0_0x5a29('0x415')]['SCENE2D']:if(!_0x5de980['enableTranslate'])return;}if(this[a0_0x5a29('0x8da')]=function(_0x247a23){_0x5ee093['_orbitMouseMoveFunction'](_0x247a23);},this[a0_0x5a29('0x954')]=function(){_0x5ee093['_orbitMouseUpFunction']();},document[a0_0x5a29('0x892')](a0_0x5a29('0x94f'),this[a0_0x5a29('0x8da')],!0x1),document[a0_0x5a29('0x892')](a0_0x5a29('0x8fe'),this['_mouseUpHandle'],!0x1),this[a0_0x5a29('0x7f2')]=_0x378dd7['getTimestamp'](),this[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x1cf')])this['_orbitFrame']=void 0x0,this[a0_0x5a29('0x260')]=!0x1;else{var _0x224d33=this[a0_0x5a29('0x318')](!0x0);_0x224d33?(this['_orbitFrame']=_0x378dd7[a0_0x5a29('0x17a')][a0_0x5a29('0x7bd')](_0x224d33,_0x2bad21[a0_0x5a29('0x6a4')][a0_0x5a29('0x12c')]),this[a0_0x5a29('0x260')]=!0x1):(this[a0_0x5a29('0x210')]=_0x378dd7['Transforms'][a0_0x5a29('0x7bd')](_0x58b106[a0_0x5a29('0x328')],_0x2bad21['globe'][a0_0x5a29('0x12c')]),this[a0_0x5a29('0x260')]=!0x0);}this['_rotation_marker'][a0_0x5a29('0x46a')][a0_0x5a29('0x8d5')]=a0_0x5a29('0x56d'),this[a0_0x5a29('0x190')][a0_0x5a29('0x38b')]+=a0_0x5a29('0x236'),document[a0_0x5a29('0x464')](a0_0x5a29('0x94f'),this[a0_0x5a29('0x8da')],!0x1),document[a0_0x5a29('0x464')](a0_0x5a29('0x8fe'),this[a0_0x5a29('0x954')],!0x1),this[a0_0x5a29('0x673')][a0_0x5a29('0x5f3')][a0_0x5a29('0x554')][a0_0x5a29('0x464')](this[a0_0x5a29('0xd5')],this),this['_updateAngleAndOpacity'](_0x4a379e,this[a0_0x5a29('0x107')][a0_0x5a29('0x96f')]);}}},{'key':a0_0x5a29('0xd5'),'value':function(_0x6ba716){var _0x262edc,_0xaf84a4=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')],_0x11942c=this[a0_0x5a29('0x673')][a0_0x5a29('0x294')],_0x1acbb7=_0x378dd7[a0_0x5a29('0x5c1')](),_0x4b0f49=(_0x1acbb7-this[a0_0x5a29('0x7f2')])*(2.5*(this[a0_0x5a29('0x7ac')]-0.5)/0x3e8),_0x307f60=this[a0_0x5a29('0x37f')]+_0x378dd7[a0_0x5a29('0x382')]['PI_OVER_TWO'],_0x5e076f=Math[a0_0x5a29('0x5cc')](_0x307f60)*_0x4b0f49,_0x436dd2=Math[a0_0x5a29('0x1a7')](_0x307f60)*_0x4b0f49;this[a0_0x5a29('0x210')]&&(_0x262edc=_0x378dd7['Matrix4'][a0_0x5a29('0x218')](_0x11942c[a0_0x5a29('0x44')]),_0x11942c[a0_0x5a29('0x103')](this[a0_0x5a29('0x210')])),_0xaf84a4[a0_0x5a29('0x48c')]===_0x378dd7['SceneMode'][a0_0x5a29('0x580')]?_0x11942c[a0_0x5a29('0x8a7')](new _0x378dd7[(a0_0x5a29('0x3bd'))](_0x5e076f,_0x436dd2,0x0),Math[a0_0x5a29('0x670')](_0xaf84a4[a0_0x5a29('0x662')][a0_0x5a29('0x72a')],_0xaf84a4[a0_0x5a29('0x662')][a0_0x5a29('0x2ba')])/0x64*_0x11942c['positionCartographic'][a0_0x5a29('0x6b7')]*_0x4b0f49):this[a0_0x5a29('0x260')]?(_0x11942c['look'](_0x378dd7[a0_0x5a29('0x3bd')][a0_0x5a29('0xe2')],-_0x5e076f),_0x11942c['look'](_0x11942c[a0_0x5a29('0x2b0')],-_0x436dd2)):(_0x11942c[a0_0x5a29('0x472')](_0x5e076f),_0x11942c['rotateUp'](_0x436dd2)),this['_orbitFrame']&&_0x262edc&&_0x11942c[a0_0x5a29('0x103')](_0x262edc),this[a0_0x5a29('0x7f2')]=_0x1acbb7;}},{'key':a0_0x5a29('0x13c'),'value':function(_0x36c344,_0x3145ee){var _0x5e8c90=Math[a0_0x5a29('0x258')](-_0x36c344['y'],_0x36c344['x']);this[a0_0x5a29('0x37f')]=_0x378dd7['Math']['zeroToTwoPi'](_0x5e8c90-_0x378dd7[a0_0x5a29('0x382')][a0_0x5a29('0x94')]);var _0x358204=_0x378dd7[a0_0x5a29('0x11b')][a0_0x5a29('0x61d')](_0x36c344),_0x133a8c=_0x3145ee/0x2,_0x44a687=Math[a0_0x5a29('0x5d5')](_0x358204/_0x133a8c,0x1);this['_orbitCursorOpacity']=0.5*_0x44a687*_0x44a687+0.5,this[a0_0x5a29('0x778')][a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x888')['concat'](this[a0_0x5a29('0x37f')],a0_0x5a29('0x596'))[a0_0x5a29('0x6c9')](this[a0_0x5a29('0x7ac')]);}},{'key':a0_0x5a29('0x89'),'value':function(_0x19e050){this['_updateAngleAndOpacity'](this['_getVector'](_0x19e050),this[a0_0x5a29('0x107')]['width']);}},{'key':a0_0x5a29('0x78b'),'value':function(){document[a0_0x5a29('0x892')](a0_0x5a29('0x94f'),this[a0_0x5a29('0x8da')],!0x1),document[a0_0x5a29('0x892')]('mouseup',this[a0_0x5a29('0x954')],!0x1),this[a0_0x5a29('0x673')][a0_0x5a29('0x5f3')][a0_0x5a29('0x554')]['removeEventListener'](this[a0_0x5a29('0xd5')],this),this[a0_0x5a29('0x8da')]=void 0x0,this[a0_0x5a29('0x954')]=void 0x0,this[a0_0x5a29('0x778')][a0_0x5a29('0x46a')][a0_0x5a29('0x8d5')]=a0_0x5a29('0x37d'),this[a0_0x5a29('0x190')][a0_0x5a29('0x38b')]=this[a0_0x5a29('0x190')]['className'][a0_0x5a29('0x380')]('\x20gyro-active','');}},{'key':a0_0x5a29('0x1ee'),'value':function(_0xf33c62){var _0x384f18=this,_0x4efba1=this['_viewer']['scene'],_0x4caa00=_0x4efba1[a0_0x5a29('0x294')],_0x3a7294=_0x4efba1['screenSpaceCameraController'];if(_0x4efba1['mode']!==_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0xdf')]&&_0x4efba1[a0_0x5a29('0x48c')]!==_0x378dd7[a0_0x5a29('0x415')]['SCENE2D']&&_0x3a7294['enableInputs']&&(_0x3a7294[a0_0x5a29('0x89c')]||_0x4efba1['mode']!==_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0x216')]&&(_0x4efba1[a0_0x5a29('0x48c')]!==_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')]||_0x3a7294[a0_0x5a29('0xe0')]))){if(this[a0_0x5a29('0x8da')]=function(_0x24b924){_0x384f18[a0_0x5a29('0x337')](_0x24b924);},this[a0_0x5a29('0x954')]=function(){_0x384f18[a0_0x5a29('0x7de')]();},document[a0_0x5a29('0x892')](a0_0x5a29('0x94f'),this[a0_0x5a29('0x8da')],!0x1),document[a0_0x5a29('0x892')](a0_0x5a29('0x8fe'),this[a0_0x5a29('0x954')],!0x1),this[a0_0x5a29('0x186')]=Math[a0_0x5a29('0x258')](-_0xf33c62['y'],_0xf33c62['x']),this[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x1cf')])this[a0_0x5a29('0x76')]=void 0x0;else{var _0x1e35fe=this['_getCameraFocus'](!0x0);_0x1e35fe&&(_0x4efba1[a0_0x5a29('0x48c')]!==_0x378dd7[a0_0x5a29('0x415')][a0_0x5a29('0x216')]||_0x3a7294['enableLook']||_0x3a7294[a0_0x5a29('0x929')])?this[a0_0x5a29('0x76')]=_0x378dd7[a0_0x5a29('0x17a')][a0_0x5a29('0x7bd')](_0x1e35fe,_0x4efba1[a0_0x5a29('0x6a4')][a0_0x5a29('0x12c')]):this['_rotateFrame']=_0x378dd7['Transforms'][a0_0x5a29('0x7bd')](_0x4caa00['positionWC'],_0x4efba1[a0_0x5a29('0x6a4')][a0_0x5a29('0x12c')]);}var _0x502c83;this[a0_0x5a29('0x76')]&&(_0x502c83=_0x378dd7[a0_0x5a29('0x4e6')]['clone'](_0x4caa00[a0_0x5a29('0x44')]),_0x4caa00[a0_0x5a29('0x103')](this['_rotateFrame'])),this[a0_0x5a29('0x63f')]=-_0x4caa00[a0_0x5a29('0x2b2')],this[a0_0x5a29('0x76')]&&_0x502c83&&_0x4caa00[a0_0x5a29('0x103')](_0x502c83),document[a0_0x5a29('0x464')](a0_0x5a29('0x94f'),this[a0_0x5a29('0x8da')],!0x1),document[a0_0x5a29('0x464')](a0_0x5a29('0x8fe'),this['_mouseUpHandle'],!0x1);}}},{'key':a0_0x5a29('0x337'),'value':function(_0x11cf3f){var _0x33244f,_0x3f4ea1=this[a0_0x5a29('0x673')][a0_0x5a29('0x294')],_0x5b3452=this[a0_0x5a29('0x28f')](_0x11cf3f),_0x50f650=Math[a0_0x5a29('0x258')](-_0x5b3452['y'],_0x5b3452['x'])-this[a0_0x5a29('0x186')],_0x3a43e3=_0x378dd7[a0_0x5a29('0x382')][a0_0x5a29('0x967')](this[a0_0x5a29('0x63f')]-_0x50f650);this['_rotateFrame']&&(_0x33244f=_0x378dd7['Matrix4'][a0_0x5a29('0x218')](_0x3f4ea1[a0_0x5a29('0x44')]),_0x3f4ea1['lookAtTransform'](this['_rotateFrame']));var _0x30ece2=-_0x3f4ea1[a0_0x5a29('0x2b2')];_0x3f4ea1[a0_0x5a29('0xb9')](_0x3a43e3-_0x30ece2),this[a0_0x5a29('0x76')]&&_0x33244f&&_0x3f4ea1[a0_0x5a29('0x103')](_0x33244f);}},{'key':'_rotateMouseUpFunction','value':function(){document[a0_0x5a29('0x892')](a0_0x5a29('0x94f'),this['_mouseMoveHandle'],!0x1),document['removeEventListener'](a0_0x5a29('0x8fe'),this[a0_0x5a29('0x954')],!0x1),this[a0_0x5a29('0x8da')]=void 0x0,this[a0_0x5a29('0x954')]=void 0x0;}},{'key':'_getVector','value':function(_0x2f4450){var _0x3d1ff4=this[a0_0x5a29('0x107')],_0x5c89c1=new _0x378dd7[(a0_0x5a29('0x11b'))]((_0x3d1ff4['right']-_0x3d1ff4[a0_0x5a29('0x3a3')])/0x2,(_0x3d1ff4['bottom']-_0x3d1ff4[a0_0x5a29('0x5ad')])/0x2),_0x474279=new _0x378dd7[(a0_0x5a29('0x11b'))](_0x2f4450[a0_0x5a29('0x4ac')]-_0x3d1ff4[a0_0x5a29('0x3a3')],_0x2f4450[a0_0x5a29('0x92a')]-_0x3d1ff4[a0_0x5a29('0x5ad')]),_0xb4e301=new _0x378dd7[(a0_0x5a29('0x11b'))]();return _0x378dd7[a0_0x5a29('0x11b')]['subtract'](_0x474279,_0x5c89c1,_0xb4e301),_0xb4e301;}}]),_0x593d31;}(_0x355f48);_0x355f48['registerType'](a0_0x5a29('0x58'));var _0x564d35=_0x4a16ea,_0xed6b25=_0x5792f(0x7),_0x48df8c=_0x5792f(0x8);function _0x4d283b(_0x160f9f,_0x1f0664){var _0x7b5749=Object[a0_0x5a29('0x148')](_0x160f9f);if(Object[a0_0x5a29('0x75')]){var _0x2e42f6=Object[a0_0x5a29('0x75')](_0x160f9f);_0x1f0664&&(_0x2e42f6=_0x2e42f6[a0_0x5a29('0x48a')](function(_0xc97f2c){return Object[a0_0x5a29('0x11a')](_0x160f9f,_0xc97f2c)['enumerable'];})),_0x7b5749[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x7b5749,_0x2e42f6);}return _0x7b5749;}function _0x63f3b3(_0x26ae14){for(var _0x5c9952=0x1;_0x5c9952<arguments['length'];_0x5c9952++){var _0x486d53=null!=arguments[_0x5c9952]?arguments[_0x5c9952]:{};_0x5c9952%0x2?_0x4d283b(Object(_0x486d53),!0x0)[a0_0x5a29('0x570')](function(_0x5640c3){_0x59708f()(_0x26ae14,_0x5640c3,_0x486d53[_0x5640c3]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x26ae14,Object[a0_0x5a29('0x711')](_0x486d53)):_0x4d283b(Object(_0x486d53))['forEach'](function(_0x4e6dbc){Object['defineProperty'](_0x26ae14,_0x4e6dbc,Object[a0_0x5a29('0x11a')](_0x486d53,_0x4e6dbc));});}return _0x26ae14;}var _0x5a73f0=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x55631d={'animation':!0x1,'baseLayerPicker':!0x1,'fullscreenButton':!0x1,'geocoder':!0x1,'homeButton':!0x1,'infoBox':!0x1,'sceneModePicker':!0x1,'selectionIndicator':!0x1,'timeline':!0x1,'navigationHelpButton':!0x1,'navigationInstructionsInitiallyVisible':!0x1,'creditContainer':void 0x0,'shouldAnimate':!0x0},_0x10834a=function(){function _0x11737a(_0x379600){var _0xcbeedd=this,_0x8c62b1=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};if(_0x1ee296()(this,_0x11737a),_0x379600&&a0_0x5a29('0x950')===_0x4ac37a()(_0x379600))this[a0_0x5a29('0xe')]=_0x379600;else{if(!_0x379600||a0_0x5a29('0x783')!=typeof _0x379600)throw new Error('Viewer:the\x20id\x20is\x20empty');this['_delegate']=new _0x5a73f0[(a0_0x5a29('0x483'))](_0x379600,_0x63f3b3(_0x63f3b3({},_0x55631d),_0x8c62b1));}new _0x2cf667['g'](this),this[a0_0x5a29('0x83a')]=new _0x2cf667['m'](),this[a0_0x5a29('0x2c7')]=new _0x2cf667['k'](this),this[a0_0x5a29('0x11c')]=new _0x30c639(this),this[a0_0x5a29('0x893')]=new _0x391e5e(this),this['_dcContainer']=_0x3d562d['a']['create']('div','dc-container',document[a0_0x5a29('0x200')](_0x379600)),this[a0_0x5a29('0x600')]=new _0x5a73f0[(a0_0x5a29('0x6b5'))]({'globe':this[a0_0x5a29('0xe')][a0_0x5a29('0x238')][a0_0x5a29('0x6a4')]}),this['_layerGroupCache']={},this[a0_0x5a29('0x143')]={},this[a0_0x5a29('0x443')]={},this[a0_0x5a29('0x575')]={'popup':new _0x148bd7(),'contextMenu':new _0x28d145(),'tooltip':new _0x36cba3(),'mapSwitch':new _0x50cc2a(),'mapSplit':new _0x440696(),'locationBar':new _0x3f066a(),'hawkeyeMap':new _0x24b3da(),'compass':new _0x564d35(),'attribution':new _0xe1c35b()},Object['keys'](this[a0_0x5a29('0x575')])['forEach'](function(_0x43c58f){_0xcbeedd[a0_0x5a29('0x6d1')](_0xcbeedd[a0_0x5a29('0x575')][_0x43c58f]);});}return _0x1fafe8()(_0x11737a,[{'key':'_addLayerGroup','value':function(_0x11511a){_0x11511a&&_0x11511a[a0_0x5a29('0xff')]&&!Object(this[a0_0x5a29('0x81f')])['hasOwnProperty'](_0x11511a['id'])&&(_0x11511a['layerGroupEvent'][a0_0x5a29('0x93a')](_0x2cf667['f']['ADD'],this),this['_layerGroupCache'][_0x11511a['id']]=_0x11511a);}},{'key':a0_0x5a29('0x5b3'),'value':function(_0x2517cb){_0x2517cb&&_0x2517cb[a0_0x5a29('0xff')]&&Object(this[a0_0x5a29('0x81f')])[a0_0x5a29('0x71')](_0x2517cb['id'])&&(_0x2517cb['layerGroupEvent'][a0_0x5a29('0x93a')](_0x2cf667['f']['REMOVE'],this),delete this[a0_0x5a29('0x81f')][_0x2517cb['id']]);}},{'key':a0_0x5a29('0x463'),'value':function(_0x32ab28){_0x32ab28&&_0x32ab28[a0_0x5a29('0x898')]&&(!this[a0_0x5a29('0x143')][_0x32ab28[a0_0x5a29('0x519')]]&&(this[a0_0x5a29('0x143')][_0x32ab28[a0_0x5a29('0x519')]]={}),Object(this['_layerCache'][_0x32ab28['type']])['hasOwnProperty'](_0x32ab28['id'])||(_0x32ab28[a0_0x5a29('0x898')][a0_0x5a29('0x93a')](_0x2cf667['d'][a0_0x5a29('0x6cb')],this),this[a0_0x5a29('0x143')][_0x32ab28[a0_0x5a29('0x519')]][_0x32ab28['id']]=_0x32ab28));}},{'key':a0_0x5a29('0x64e'),'value':function(_0x37b823){_0x37b823&&_0x37b823[a0_0x5a29('0x898')]&&Object(this[a0_0x5a29('0x143')][_0x37b823['type']])['hasOwnProperty'](_0x37b823['id'])&&(_0x37b823[a0_0x5a29('0x898')][a0_0x5a29('0x93a')](_0x2cf667['d'][a0_0x5a29('0x945')],this),delete this['_layerCache'][_0x37b823[a0_0x5a29('0x519')]][_0x37b823['id']]);}},{'key':a0_0x5a29('0x2bf'),'value':function(_0x760030){_0x760030&&_0x760030[a0_0x5a29('0x13a')]&&!Object(this[a0_0x5a29('0x443')])[a0_0x5a29('0x71')](_0x760030['id'])&&(_0x760030[a0_0x5a29('0x13a')][a0_0x5a29('0x93a')](_0x2cf667['a'][a0_0x5a29('0x6cb')],this),this[a0_0x5a29('0x443')][_0x760030['id']]=_0x760030);}},{'key':'_removeEffect','value':function(_0x531812){_0x531812&&_0x531812['effectEvent']&&Object(this[a0_0x5a29('0x443')])[a0_0x5a29('0x71')](_0x531812['id'])&&(_0x531812[a0_0x5a29('0x13a')]['fire'](_0x2cf667['a']['REMOVE'],this),delete this[a0_0x5a29('0x443')][_0x531812['id']]);}},{'key':'setOptions','value':function(_0x22846f){return this['_viewerOption'][a0_0x5a29('0x140')](_0x22846f),this;}},{'key':'setPitchRange','value':function(){var _0x440aca=arguments[a0_0x5a29('0x515')]>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:-0x5a,_0x425da4=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:-0x14;return this['_cameraOption'][a0_0x5a29('0x346')](_0x440aca,_0x425da4),this;}},{'key':a0_0x5a29('0x757'),'value':function(){return this[a0_0x5a29('0x893')][a0_0x5a29('0x757')](),this;}},{'key':'setBounds','value':function(_0x4910e9,_0x3f000e,_0x29485a,_0x55b9a8){return this[a0_0x5a29('0x893')][a0_0x5a29('0x6e4')](_0x4910e9,_0x3f000e,_0x29485a,_0x55b9a8),this;}},{'key':a0_0x5a29('0x657'),'value':function(_0x50c27f){var _0x5883fd=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x0;return 0x2===_0x50c27f?this[a0_0x5a29('0xe')][a0_0x5a29('0x238')]['morphTo2D'](_0x5883fd):0x3===_0x50c27f?this[a0_0x5a29('0xe')]['scene'][a0_0x5a29('0x4f3')](_0x5883fd):2.5===_0x50c27f&&this[a0_0x5a29('0xe')][a0_0x5a29('0x238')][a0_0x5a29('0x1bc')](_0x5883fd),this;}},{'key':a0_0x5a29('0x5d1'),'value':function(_0x4ae1b4){return this[a0_0x5a29('0x893')][a0_0x5a29('0x5d1')](_0x4ae1b4),this;}},{'key':a0_0x5a29('0x154'),'value':function(_0x34206a){var _0x1c4a5d=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};return _0x34206a?(this[a0_0x5a29('0x600')][a0_0x5a29('0x951')]['push'](new _0x5a73f0[(a0_0x5a29('0x1f9'))]({'name':_0x1c4a5d['name']||'地图','creationFunction':function(){return _0x34206a;}})),this[a0_0x5a29('0x600')][a0_0x5a29('0x860')]||(this[a0_0x5a29('0x600')][a0_0x5a29('0x860')]=this[a0_0x5a29('0x600')][a0_0x5a29('0x951')][0x0]),this['_comps'][a0_0x5a29('0x290')][a0_0x5a29('0x883')](_0x1c4a5d),this):this;}},{'key':a0_0x5a29('0x3b2'),'value':function(_0x30f9ee){return this['_baseLayerPicker']&&_0x30f9ee>=0x0&&(this[a0_0x5a29('0x600')][a0_0x5a29('0x860')]=this['_baseLayerPicker'][a0_0x5a29('0x951')][_0x30f9ee]),this;}},{'key':'addTerrain','value':function(_0x3fe90b){return _0x3fe90b?(this[a0_0x5a29('0x600')][a0_0x5a29('0x32f')][a0_0x5a29('0x3cd')](new _0x5a73f0[(a0_0x5a29('0x1f9'))]({'name':'地形','creationFunction':function(){return _0x3fe90b;}})),this['_baseLayerPicker'][a0_0x5a29('0xb8')]||(this['_baseLayerPicker'][a0_0x5a29('0xb8')]=this[a0_0x5a29('0x600')][a0_0x5a29('0x32f')][0x0]),this):this;}},{'key':a0_0x5a29('0x966'),'value':function(_0x32ccac){return this['_baseLayerPicker']&&_0x32ccac>=0x0&&(this['_baseLayerPicker']['selectedTerrain']=this[a0_0x5a29('0x600')]['terrainProviderViewModels'][_0x32ccac]),this;}},{'key':'removeTerrain','value':function(){return this['_delegate']['terrainProvider']=new _0x5a73f0[(a0_0x5a29('0x803'))](),this;}},{'key':a0_0x5a29('0x3a'),'value':function(_0x42eaa3){return this[a0_0x5a29('0x25a')](_0x42eaa3),this;}},{'key':a0_0x5a29('0x22c'),'value':function(_0x4ac49d){return this[a0_0x5a29('0x5b3')](_0x4ac49d),this;}},{'key':a0_0x5a29('0x894'),'value':function(_0x3fcd45){return this['_addLayer'](_0x3fcd45),this;}},{'key':a0_0x5a29('0x90b'),'value':function(_0x533e13){return this['_removeLayer'](_0x533e13),this;}},{'key':a0_0x5a29('0x5e5'),'value':function(_0x3531a8){return _0x3531a8&&_0x3531a8[a0_0x5a29('0x898')]&&Object(this[a0_0x5a29('0x143')][_0x3531a8[a0_0x5a29('0x519')]])[a0_0x5a29('0x71')](_0x3531a8['id']);}},{'key':a0_0x5a29('0xfe'),'value':function(_0x3f69a2){var _0x1ea67b=this[a0_0x5a29('0x4f9')]()['filter'](function(_0x3468ee){return _0x3468ee['id']===_0x3f69a2;});return _0x1ea67b&&_0x1ea67b[a0_0x5a29('0x515')]?_0x1ea67b[0x0]:void 0x0;}},{'key':a0_0x5a29('0x4f9'),'value':function(){var _0x1af962=this,_0x29f7c4=[];return Object['keys'](this[a0_0x5a29('0x143')])[a0_0x5a29('0x570')](function(_0x43f926){var _0x28d574=_0x1af962[a0_0x5a29('0x143')][_0x43f926];Object['keys'](_0x28d574)['forEach'](function(_0x45f52c){_0x29f7c4['push'](_0x28d574[_0x45f52c]);});}),_0x29f7c4;}},{'key':'eachLayer','value':function(_0x28b154,_0x5e103b){var _0x35dfaa=this;return Object[a0_0x5a29('0x148')](this[a0_0x5a29('0x143')])[a0_0x5a29('0x570')](function(_0x2de6f6){var _0x48919f=_0x35dfaa[a0_0x5a29('0x143')][_0x2de6f6];Object[a0_0x5a29('0x148')](_0x48919f)[a0_0x5a29('0x570')](function(_0x281f75){_0x28b154[a0_0x5a29('0x351')](_0x5e103b,_0x48919f[_0x281f75]);});}),this;}},{'key':a0_0x5a29('0x5ee'),'value':function(_0xd8ad99){return this[a0_0x5a29('0x2bf')](_0xd8ad99),this;}},{'key':a0_0x5a29('0x303'),'value':function(_0x36db3b){return this['_removeEffect'](_0x36db3b),this;}},{'key':'flyTo','value':function(_0x43cf5f,_0xd73ce){return this[a0_0x5a29('0xe')][a0_0x5a29('0x195')]((null==_0x43cf5f?void 0x0:_0x43cf5f[a0_0x5a29('0x67e')])||_0x43cf5f,{'duration':_0xd73ce}),this;}},{'key':'zoomTo','value':function(_0x47bb09){return this[a0_0x5a29('0xe')][a0_0x5a29('0x5f2')]((null==_0x47bb09?void 0x0:_0x47bb09[a0_0x5a29('0x67e')])||_0x47bb09),this;}},{'key':a0_0x5a29('0x376'),'value':function(_0x9b5c79,_0x46078e,_0x3687dc){return _0x9b5c79=_0x48df8c['a'][a0_0x5a29('0x853')](_0x9b5c79),this[a0_0x5a29('0x294')]['flyTo']({'destination':_0xed6b25['a'][a0_0x5a29('0x516')](_0x9b5c79),'orientation':{'heading':_0x5a73f0[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x9b5c79[a0_0x5a29('0x2b2')]),'pitch':_0x5a73f0[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x9b5c79[a0_0x5a29('0x404')]),'roll':_0x5a73f0['Math']['toRadians'](_0x9b5c79[a0_0x5a29('0x299')])},'complete':_0x46078e,'duration':_0x3687dc}),this;}},{'key':a0_0x5a29('0x28d'),'value':function(_0x505da1,_0x1e808b){return _0x505da1=_0x48df8c['a'][a0_0x5a29('0x853')](_0x505da1),this[a0_0x5a29('0x294')][a0_0x5a29('0x195')]({'destination':_0xed6b25['a']['transformWGS84ToCartesian'](_0x505da1),'orientation':{'heading':_0x5a73f0[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x505da1[a0_0x5a29('0x2b2')]),'pitch':_0x5a73f0[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x505da1['pitch']),'roll':_0x5a73f0[a0_0x5a29('0x382')]['toRadians'](_0x505da1[a0_0x5a29('0x299')])},'complete':_0x1e808b,'duration':0x0}),this;}},{'key':'on','value':function(_0x3707af,_0x1a3f67,_0x1a2eb2){return this[a0_0x5a29('0x83a')]['on'](_0x3707af,_0x1a3f67,_0x1a2eb2||this),this[a0_0x5a29('0x2c7')]['on'](_0x3707af,_0x1a3f67,_0x1a2eb2||this),this;}},{'key':a0_0x5a29('0x806'),'value':function(_0x1e8044,_0x12ba30,_0x51c0d9){return this[a0_0x5a29('0x83a')]['once'](_0x1e8044,_0x12ba30,_0x51c0d9||this),this;}},{'key':'off','value':function(_0x30cfcd,_0x17cbf4,_0xe205c7){return this[a0_0x5a29('0x83a')][a0_0x5a29('0x59a')](_0x30cfcd,_0x17cbf4,_0xe205c7||this),this[a0_0x5a29('0x2c7')][a0_0x5a29('0x59a')](_0x30cfcd,_0x17cbf4,_0xe205c7||this),this;}},{'key':a0_0x5a29('0x3d6'),'value':function(){return this['_delegate'][a0_0x5a29('0x3d6')](),this[a0_0x5a29('0xe')]=void 0x0,this;}},{'key':'use','value':function(_0xc7b770){return _0xc7b770&&_0xc7b770[a0_0x5a29('0x5cb')]&&_0xc7b770[a0_0x5a29('0x5cb')](this),this;}},{'key':a0_0x5a29('0x67e'),'get':function(){return this[a0_0x5a29('0xe')];}},{'key':a0_0x5a29('0x8c6'),'get':function(){return this[a0_0x5a29('0x508')];}},{'key':a0_0x5a29('0x238'),'get':function(){return this['_delegate'][a0_0x5a29('0x238')];}},{'key':a0_0x5a29('0x294'),'get':function(){return this[a0_0x5a29('0xe')][a0_0x5a29('0x294')];}},{'key':a0_0x5a29('0x662'),'get':function(){return this['_delegate'][a0_0x5a29('0x238')][a0_0x5a29('0x662')];}},{'key':a0_0x5a29('0x17e'),'get':function(){return this[a0_0x5a29('0xe')][a0_0x5a29('0x17e')];}},{'key':a0_0x5a29('0x25f'),'get':function(){return this[a0_0x5a29('0xe')][a0_0x5a29('0x25f')];}},{'key':'entities','get':function(){return this[a0_0x5a29('0xe')][a0_0x5a29('0x8b4')];}},{'key':a0_0x5a29('0x5f3'),'get':function(){return this[a0_0x5a29('0xe')][a0_0x5a29('0x5f3')];}},{'key':a0_0x5a29('0x333'),'get':function(){return this[a0_0x5a29('0x83a')];}},{'key':a0_0x5a29('0x224'),'get':function(){return this[a0_0x5a29('0x575')][a0_0x5a29('0x224')];}},{'key':a0_0x5a29('0x13'),'get':function(){return this[a0_0x5a29('0x575')][a0_0x5a29('0x13')];}},{'key':a0_0x5a29('0x2af'),'get':function(){return this[a0_0x5a29('0x575')][a0_0x5a29('0x2af')];}},{'key':a0_0x5a29('0x149'),'get':function(){return this['_comps'][a0_0x5a29('0x149')];}},{'key':a0_0x5a29('0x290'),'get':function(){return this[a0_0x5a29('0x575')][a0_0x5a29('0x290')];}},{'key':a0_0x5a29('0xc6'),'get':function(){return this[a0_0x5a29('0x575')][a0_0x5a29('0xc6')];}},{'key':a0_0x5a29('0x479'),'get':function(){return this[a0_0x5a29('0x575')][a0_0x5a29('0x479')];}},{'key':a0_0x5a29('0x58'),'get':function(){return this[a0_0x5a29('0x575')][a0_0x5a29('0x58')];}},{'key':a0_0x5a29('0x581'),'get':function(){var _0x1e3fd9=_0xed6b25['a'][a0_0x5a29('0x8f')](this['camera'][a0_0x5a29('0x328')]);return _0x1e3fd9&&(_0x1e3fd9[a0_0x5a29('0x2b2')]=_0x5a73f0[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](this[a0_0x5a29('0x294')][a0_0x5a29('0x2b2')]),_0x1e3fd9[a0_0x5a29('0x404')]=_0x5a73f0[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](this[a0_0x5a29('0x294')][a0_0x5a29('0x404')]),_0x1e3fd9[a0_0x5a29('0x299')]=_0x5a73f0[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](this[a0_0x5a29('0x294')][a0_0x5a29('0x299')])),_0x1e3fd9;}}]),_0x11737a;}(),_0x5087f0=_0x5792f(0x27),_0x13c063=_0x5792f['n'](_0x5087f0),_0x115685=_0x5792f(0x15),_0x5b11a7=_0x5792f['n'](_0x115685),_0x926db8=_0x5792f(0xd),_0x121c79=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0xcb746c=function(){function _0x6fb48d(_0x12bb76,_0x15daf2){_0x1ee296()(this,_0x6fb48d),this[a0_0x5a29('0x673')]=_0x12bb76,this[a0_0x5a29('0x40c')]=_0x15daf2,this[a0_0x5a29('0x86e')]=_0x15daf2[a0_0x5a29('0x53c')],this[a0_0x5a29('0xf4')]=_0x15daf2['token'],this[a0_0x5a29('0x33e')]=_0x15daf2[a0_0x5a29('0x6fa')],this['appendPopup']();}return _0x1fafe8()(_0x6fb48d,[{'key':a0_0x5a29('0x856'),'value':function(){this[a0_0x5a29('0x8f4')](this[a0_0x5a29('0x40c')][a0_0x5a29('0x886')],this[a0_0x5a29('0x40c')]['className']||a0_0x5a29('0x8ee'),this[a0_0x5a29('0x86e')],this[a0_0x5a29('0x33e')],this[a0_0x5a29('0x40c')]['domId']+this['_videoUrl']);}},{'key':a0_0x5a29('0x7aa'),'value':function(_0x141fef){return a0_0x5a29('0x2ae')==typeof Array['isArray']?Array[a0_0x5a29('0x7aa')](_0x141fef):a0_0x5a29('0x7c6')===Object[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](_0x141fef);}},{'key':a0_0x5a29('0x8f4'),'value':function(_0x3b5475,_0x39a9fe,_0x1af63c,_0x185584,_0x4b3a71){var _0x420034=this,_0x4694dc=_0x121c79[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x1af63c[a0_0x5a29('0x706')],_0x1af63c['latitude'],_0x1af63c[a0_0x5a29('0x6b7')]||0xc8),_0x4e2761=_0x121c79[a0_0x5a29('0x85b')][a0_0x5a29('0x7ee')](this[a0_0x5a29('0x673')][a0_0x5a29('0x238')],_0x4694dc),_0x5f3d33=document['createElement']('div'),_0xb380ee=_0x420034[a0_0x5a29('0x7be')]();_0x5f3d33[a0_0x5a29('0x13d')]=a0_0x5a29('0x102')+_0xb380ee+'><div\x20class=\x27bubble-window-top\x27></div><div\x20class=\x27bubble-window-left\x27></div><div\x20class=\x27bubble-window-bottom\x27></div><div\x20class=\x27bubble-window-right\x27></div><div\x20class=\x27bubble-window-blow-up\x27></div><div\x20class=\x27bubble-window-zoom-out\x27></div></div></div><div\x20class=\x27leaflet-popup-tip-container\x27><div\x20class=\x27leaflet-popup-tip\x27></div></div></div>',_0x5f3d33[a0_0x5a29('0x773')]('id',_0x3b5475),_0x5f3d33[a0_0x5a29('0x38b')]=_0x39a9fe||'',document[a0_0x5a29('0x200')](a0_0x5a29('0x95a'))['appendChild'](_0x5f3d33),this[a0_0x5a29('0x288')](_0x5b11a7()(document[a0_0x5a29('0x200')](_0x3b5475))[a0_0x5a29('0x2f0')]('.bubble-window-top')[0x0],0x0,_0x420034['_token'],_0x185584['split'](a0_0x5a29('0x3d8'))[0x1]['split']('/')[0x1],_0x185584[a0_0x5a29('0xc5')](a0_0x5a29('0x3d8'))[0x1][a0_0x5a29('0xc5')]('/')[0x2][a0_0x5a29('0xc5')]('.')[0x0],_0x185584),this[a0_0x5a29('0x1fb')](_0x5b11a7()(document[a0_0x5a29('0x200')](_0x3b5475))[a0_0x5a29('0x2f0')](a0_0x5a29('0x3b5'))[0x0],0x2,_0x420034[a0_0x5a29('0xf4')],_0x185584[a0_0x5a29('0xc5')](a0_0x5a29('0x3d8'))[0x1][a0_0x5a29('0xc5')]('/')[0x1],_0x185584[a0_0x5a29('0xc5')]('://')[0x1][a0_0x5a29('0xc5')]('/')[0x2][a0_0x5a29('0xc5')]('.')[0x0],_0x185584),this[a0_0x5a29('0x462')](_0x5b11a7()(document[a0_0x5a29('0x200')](_0x3b5475))[a0_0x5a29('0x2f0')](a0_0x5a29('0x50d'))[0x0],0x1,_0x420034[a0_0x5a29('0xf4')],_0x185584[a0_0x5a29('0xc5')](a0_0x5a29('0x3d8'))[0x1]['split']('/')[0x1],_0x185584['split'](a0_0x5a29('0x3d8'))[0x1][a0_0x5a29('0xc5')]('/')[0x2][a0_0x5a29('0xc5')]('.')[0x0],_0x185584),this[a0_0x5a29('0x2d4')](_0x5b11a7()(document['getElementById'](_0x3b5475))[a0_0x5a29('0x2f0')](a0_0x5a29('0x6a9'))[0x0],0x3,_0x420034[a0_0x5a29('0xf4')],_0x185584['split'](a0_0x5a29('0x3d8'))[0x1][a0_0x5a29('0xc5')]('/')[0x1],_0x185584[a0_0x5a29('0xc5')]('://')[0x1]['split']('/')[0x2][a0_0x5a29('0xc5')]('.')[0x0],_0x185584),this[a0_0x5a29('0x71e')](_0x5b11a7()(document[a0_0x5a29('0x200')](_0x3b5475))[a0_0x5a29('0x2f0')](a0_0x5a29('0x668'))[0x0],0x8,_0x420034[a0_0x5a29('0xf4')],_0x185584[a0_0x5a29('0xc5')](a0_0x5a29('0x3d8'))[0x1][a0_0x5a29('0xc5')]('/')[0x1],_0x185584['split'](a0_0x5a29('0x3d8'))[0x1]['split']('/')[0x2][a0_0x5a29('0xc5')]('.')[0x0],_0x185584),this[a0_0x5a29('0x77c')](_0x5b11a7()(document[a0_0x5a29('0x200')](_0x3b5475))[a0_0x5a29('0x2f0')]('.bubble-window-zoom-out')[0x0],0x9,_0x420034[a0_0x5a29('0xf4')],_0x185584[a0_0x5a29('0xc5')](a0_0x5a29('0x3d8'))[0x1][a0_0x5a29('0xc5')]('/')[0x1],_0x185584[a0_0x5a29('0xc5')](a0_0x5a29('0x3d8'))[0x1][a0_0x5a29('0xc5')]('/')[0x2][a0_0x5a29('0xc5')]('.')[0x0],_0x185584),new _0x13c063['a'][(a0_0x5a29('0x724'))]({'id':_0xb380ee,'autoplay':!0x0,'url':_0x185584,'accessToken':_0x420034['_token']}),document['getElementById'](_0x3b5475)[a0_0x5a29('0x46a')][a0_0x5a29('0x3a3')]=_0x4e2761['x']-document['getElementById'](_0x3b5475)[a0_0x5a29('0x44e')]/0x2+'px',document[a0_0x5a29('0x200')](_0x3b5475)['style'][a0_0x5a29('0x5ad')]=_0x4e2761['y']-document[a0_0x5a29('0x200')](_0x3b5475)['offsetHeight']+0x14+'px';var _0x23c7fa=new _0x121c79[(a0_0x5a29('0x11b'))](_0x1af63c[a0_0x5a29('0x706')],_0x1af63c['latitude']);_0x420034[a0_0x5a29('0x11e')](_0x23c7fa,_0x3b5475),this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x225')][a0_0x5a29('0x464')](function(){var _0x58fa17=_0xed6b25['a'][a0_0x5a29('0x516')](new _0x926db8['a'](_0x420034[a0_0x5a29('0x86e')][a0_0x5a29('0x706')],_0x420034[a0_0x5a29('0x86e')][a0_0x5a29('0x517')])),_0x1f05ab=_0x121c79[a0_0x5a29('0x85b')][a0_0x5a29('0x7ee')](_0x420034[a0_0x5a29('0x673')][a0_0x5a29('0x238')],_0x58fa17);_0x420034[a0_0x5a29('0x4e1')]({'transform':_0x1f05ab},_0x3b5475);});}},{'key':a0_0x5a29('0x150'),'value':function(){}},{'key':a0_0x5a29('0x7be'),'value':function(){for(var _0x3bf3d2=[],_0x1fb33f=0x0;_0x1fb33f<0x4;_0x1fb33f++){var _0x126717=Math['ceil'](0x19*Math[a0_0x5a29('0x27')]());_0x3bf3d2[a0_0x5a29('0x3cd')](String['fromCharCode'](0x41+_0x126717));}return _0x3bf3d2['join']('')+0x19*Math[a0_0x5a29('0x27')]()+0x5f*Math[a0_0x5a29('0x27')]()+0xa*Math[a0_0x5a29('0x27')]()*(0x4c9*Math[a0_0x5a29('0x27')]());}},{'key':a0_0x5a29('0x71e'),'value':function(_0x173ec8,_0x1c65b0,_0x45f4b9,_0x1d8248,_0x1375fe,_0x5efac2){var _0x41f1f6=this,_0x5d5e25=0x0,_0x5bc6e0=null;_0x173ec8[a0_0x5a29('0x464')](a0_0x5a29('0x50f'),function(){_0x5bc6e0=setInterval(function(){_0x5d5e25++;},0x64),_0x41f1f6[a0_0x5a29('0x428')](_0x1c65b0,_0x45f4b9,_0x1d8248,_0x1375fe,_0x5efac2);}),_0x173ec8[a0_0x5a29('0x464')]('mouseup',function(){clearInterval(_0x5bc6e0),_0x5d5e25<=0x3?(_0x5d5e25=0x0,setTimeout(function(){_0x41f1f6[a0_0x5a29('0x3ef')](_0x1c65b0,_0x45f4b9,_0x1d8248,_0x1375fe,_0x5efac2);},0x1f4)):(_0x5d5e25=0x0,_0x41f1f6[a0_0x5a29('0x3ef')](_0x1c65b0,_0x45f4b9,_0x1d8248,_0x1375fe,_0x5efac2));});}},{'key':a0_0x5a29('0x77c'),'value':function(_0x33e41c,_0x42f7d2,_0x3a1ffc,_0xcb0b02,_0x54d6bd,_0x40f8fa){var _0x38dd77=this,_0x20632b=0x0,_0x3118ea=null;_0x33e41c['addEventListener'](a0_0x5a29('0x50f'),function(){_0x3118ea=setInterval(function(){_0x20632b++;},0x64),_0x38dd77[a0_0x5a29('0x428')](_0x42f7d2,_0x3a1ffc,_0xcb0b02,_0x54d6bd,_0x40f8fa);}),_0x33e41c[a0_0x5a29('0x464')](a0_0x5a29('0x8fe'),function(){clearInterval(_0x3118ea),_0x20632b<=0x3?(_0x20632b=0x0,setTimeout(function(){_0x38dd77[a0_0x5a29('0x3ef')](_0x42f7d2,_0x3a1ffc,_0xcb0b02,_0x54d6bd,_0x40f8fa);},0x1f4)):(_0x20632b=0x0,_0x38dd77['stopVideo'](_0x42f7d2,_0x3a1ffc,_0xcb0b02,_0x54d6bd,_0x40f8fa));});}},{'key':'upwardMovement','value':function(_0x443241,_0x2e36dd,_0x7baef3,_0x309105,_0x44b707,_0x3c4857){var _0x21c1b5=this,_0x8f1ac4=0x0,_0x2fc5a2=null;_0x443241['addEventListener'](a0_0x5a29('0x50f'),function(){_0x2fc5a2=setInterval(function(){_0x8f1ac4++;},0x64),_0x21c1b5['startVideo'](_0x2e36dd,_0x7baef3,_0x309105,_0x44b707,_0x3c4857);}),_0x443241[a0_0x5a29('0x464')](a0_0x5a29('0x8fe'),function(){clearInterval(_0x2fc5a2),_0x8f1ac4<=0x3?(_0x8f1ac4=0x0,setTimeout(function(){_0x21c1b5[a0_0x5a29('0x3ef')](_0x2e36dd,_0x7baef3,_0x309105,_0x44b707,_0x3c4857);},0x1f4)):(_0x8f1ac4=0x0,_0x21c1b5[a0_0x5a29('0x3ef')](_0x2e36dd,_0x7baef3,_0x309105,_0x44b707,_0x3c4857));});}},{'key':'towardsTheLeft','value':function(_0x5998e2,_0x5c3f28,_0x39f3de,_0x39c3a9,_0x27cd59,_0x25e746){var _0x40e9fb=this,_0xab7a66=0x0,_0x3dae6b=null;_0x5998e2['addEventListener'](a0_0x5a29('0x50f'),function(){_0x3dae6b=setInterval(function(){_0xab7a66++;},0x64),_0x40e9fb['startVideo'](_0x5c3f28,_0x39f3de,_0x39c3a9,_0x27cd59,_0x25e746);}),_0x5998e2[a0_0x5a29('0x464')](a0_0x5a29('0x8fe'),function(){clearInterval(_0x3dae6b),_0xab7a66<=0x3?(_0xab7a66=0x0,setTimeout(function(){_0x40e9fb[a0_0x5a29('0x3ef')](_0x5c3f28,_0x39f3de,_0x39c3a9,_0x27cd59,_0x25e746);},0x1f4)):(_0xab7a66=0x0,_0x40e9fb[a0_0x5a29('0x3ef')](_0x5c3f28,_0x39f3de,_0x39c3a9,_0x27cd59,_0x25e746));});}},{'key':a0_0x5a29('0x462'),'value':function(_0x2954a5,_0x27f6f8,_0x1c8f57,_0xd3bd8d,_0x5168e6,_0x3c4fb5){var _0x79c3af=this,_0x50b946=0x0,_0x4f6064=null;_0x2954a5[a0_0x5a29('0x464')](a0_0x5a29('0x50f'),function(){_0x4f6064=setInterval(function(){_0x50b946++;},0x64),_0x79c3af['startVideo'](_0x27f6f8,_0x1c8f57,_0xd3bd8d,_0x5168e6,_0x3c4fb5);}),_0x2954a5['addEventListener']('mouseup',function(){clearInterval(_0x4f6064),_0x50b946<=0x3?(_0x50b946=0x0,setTimeout(function(){_0x79c3af[a0_0x5a29('0x3ef')](_0x27f6f8,_0x1c8f57,_0xd3bd8d,_0x5168e6,_0x3c4fb5);},0x1f4)):(_0x50b946=0x0,_0x79c3af[a0_0x5a29('0x3ef')](_0x27f6f8,_0x1c8f57,_0xd3bd8d,_0x5168e6,_0x3c4fb5));});}},{'key':a0_0x5a29('0x2d4'),'value':function(_0x1069a3,_0x1ba4e5,_0x39d7e0,_0xbeed50,_0x349165,_0x1898b9){var _0x34e91c=this,_0x32c107=0x0,_0x9b8192=null;_0x1069a3[a0_0x5a29('0x464')](a0_0x5a29('0x50f'),function(){_0x9b8192=setInterval(function(){_0x32c107++;},0x64),_0x34e91c[a0_0x5a29('0x428')](_0x1ba4e5,_0x39d7e0,_0xbeed50,_0x349165,_0x1898b9);}),_0x1069a3[a0_0x5a29('0x464')](a0_0x5a29('0x8fe'),function(){clearInterval(_0x9b8192),_0x32c107<=0x3?(_0x32c107=0x0,setTimeout(function(){_0x34e91c[a0_0x5a29('0x3ef')](_0x1ba4e5,_0x39d7e0,_0xbeed50,_0x349165,_0x1898b9);},0x1f4)):(_0x32c107=0x0,_0x34e91c[a0_0x5a29('0x3ef')](_0x1ba4e5,_0x39d7e0,_0xbeed50,_0x349165,_0x1898b9));});}},{'key':a0_0x5a29('0x428'),'value':function(_0x143ec4,_0x54fb99,_0x3b45aa,_0x46cb9d,_0x5cab90){_0x5b11a7['a'][a0_0x5a29('0x2ff')]({'type':a0_0x5a29('0x4d5'),'url':a0_0x5a29('0x139'),'data':{'direction':_0x143ec4,'accessToken':_0x54fb99,'deviceSerial':_0x3b45aa,'channelNo':_0x46cb9d,'speed':0x1,'src':_0x5cab90},'success':function(_0x39d394){}});}},{'key':'stopVideo','value':function(_0x58c9c1,_0x5757db,_0x152e57,_0x5a05f7,_0x49166e){_0x5b11a7['a'][a0_0x5a29('0x2ff')]({'type':a0_0x5a29('0x4d5'),'url':a0_0x5a29('0x29c'),'data':{'direction':_0x58c9c1,'accessToken':_0x5757db,'deviceSerial':_0x152e57,'channelNo':_0x5a05f7,'src':_0x49166e,'speed':0x1},'success':function(_0x16df68){}});}},{'key':a0_0x5a29('0x11e'),'value':function(_0x4b08ce,_0x1c9b9d){var _0x25dd80=_0x4b08ce['x']-document[a0_0x5a29('0x200')](_0x1c9b9d)[a0_0x5a29('0x44e')]/0x2,_0x42f15d=_0x4b08ce['y']-document['getElementById'](_0x1c9b9d)[a0_0x5a29('0x50c')];document[a0_0x5a29('0x200')](_0x1c9b9d)[a0_0x5a29('0x46a')]['left']=_0x25dd80+'px',document['getElementById'](_0x1c9b9d)[a0_0x5a29('0x46a')][a0_0x5a29('0x5ad')]=_0x42f15d+'px';}},{'key':a0_0x5a29('0x4e1'),'value':function(_0x2f9fbe,_0x2c96e8){if(_0x2f9fbe[a0_0x5a29('0x44')]){var _0x2657fd=_0x2f9fbe[a0_0x5a29('0x44')]['x']-document[a0_0x5a29('0x200')](_0x2c96e8)['offsetWidth']/0x2,_0x267e1c=_0x2f9fbe[a0_0x5a29('0x44')]['y']-document[a0_0x5a29('0x200')](_0x2c96e8)['offsetHeight'];document[a0_0x5a29('0x200')](_0x2c96e8)[a0_0x5a29('0x46a')][a0_0x5a29('0x3a3')]=_0x2657fd+'px',document['getElementById'](_0x2c96e8)['style'][a0_0x5a29('0x5ad')]=_0x267e1c+'px';}}},{'key':'viewer','get':function(){return this[a0_0x5a29('0x673')];}},{'key':a0_0x5a29('0x224'),'get':function(){return this[a0_0x5a29('0x40c')];}},{'key':a0_0x5a29('0x53c'),'get':function(){return this[a0_0x5a29('0x86e')];}},{'key':a0_0x5a29('0x7b'),'get':function(){return this[a0_0x5a29('0xf4')];}},{'key':'videoUrl','get':function(){return this[a0_0x5a29('0x33e')];}}]),_0x6fb48d;}(),_0x231faa=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2c464=function(){function _0x2a107d(){_0x1ee296()(this,_0x2a107d);}return _0x1fafe8()(_0x2a107d,null,[{'key':a0_0x5a29('0x22b'),'value':function(_0x535f8c,_0x4fe404){var _0x2ed6ac;if(_0x4fe404[a0_0x5a29('0x4c9')])_0x2ed6ac=_0x4fe404['dragger'];else{var _0x3a97b9=_0x231faa[a0_0x5a29('0x3d0')](_0x4fe404[a0_0x5a29('0x53c')],_0x231faa[a0_0x5a29('0x3bd')][a0_0x5a29('0x952')]),_0x278d76=_0x231faa[a0_0x5a29('0x3d0')](_0x4fe404[a0_0x5a29('0x5e4')],a0_0x5a29('0x685'));_0x2ed6ac=_0x535f8c[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'position':_0x3a97b9,'billboard':{'scale':0x1,'heightReference':_0x4fe404[a0_0x5a29('0x57d')]?_0x231faa[a0_0x5a29('0x306')][a0_0x5a29('0x47e')]:_0x231faa[a0_0x5a29('0x306')]['NONE'],'image':_0x278d76}});}return _0x2ed6ac[a0_0x5a29('0x25c')]=!0x0,_0x2ed6ac[a0_0x5a29('0xab')]=_0x231faa[a0_0x5a29('0x3d0')](_0x4fe404[a0_0x5a29('0xab')],null),_0x2ed6ac[a0_0x5a29('0x4f1')]=_0x231faa['defaultValue'](_0x4fe404[a0_0x5a29('0x4f1')],!0x0),_0x2ed6ac[a0_0x5a29('0x410')]=_0x231faa[a0_0x5a29('0x3d0')](_0x4fe404[a0_0x5a29('0x410')],!0x1),_0x2ed6ac[a0_0x5a29('0x93f')]=_0x231faa['defaultValue'](_0x4fe404['vertical'],!0x1),_0x2ed6ac;}},{'key':a0_0x5a29('0x78'),'value':function(_0x327b07){for(var _0x4af9ca=[],_0x4ec334=0x0;_0x4ec334<_0x327b07[a0_0x5a29('0x515')];_0x4ec334++){var _0x316e59=_0x231faa[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x327b07[_0x4ec334]),_0x16fdab=Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x316e59[a0_0x5a29('0x706')])['toFixed'](0x6)),_0x966c66=Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x316e59['latitude'])['toFixed'](0x6)),_0x394896=Number(_0x316e59[a0_0x5a29('0x6b7')][a0_0x5a29('0x292')](0x1));_0x4af9ca['push']([_0x16fdab,_0x966c66,_0x394896]);}return _0x4af9ca;}},{'key':'getMaxHeightForPositions','value':function(_0x463b51,_0x5320b7){null==_0x5320b7&&(_0x5320b7=0x0);var _0xd7a436=_0x5320b7;if(null==_0x463b51||0x0==_0x463b51[a0_0x5a29('0x515')])return _0xd7a436;for(var _0x5b348d=(_0x463b51[0x0],0x0);_0x5b348d<_0x463b51[a0_0x5a29('0x515')];_0x5b348d++){var _0x42ec76=_0x231faa['Cartographic'][a0_0x5a29('0x64c')](_0x463b51[_0x5b348d]);_0x42ec76['height']>_0xd7a436&&(_0xd7a436=_0x42ec76[a0_0x5a29('0x6b7')]);}return _0xd7a436;}},{'key':a0_0x5a29('0x341'),'value':function(_0x42b3ec,_0x3213dc){if(_0x42b3ec instanceof Array){for(var _0x565e9e=[],_0x9ff173=0x0;_0x9ff173<_0x42b3ec[a0_0x5a29('0x515')];_0x9ff173++){var _0x1a1f50=_0x231faa['Ellipsoid']['WGS84'][a0_0x5a29('0x587')](_0x42b3ec[_0x9ff173]),_0x5c71c8={'lon':_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x1a1f50[a0_0x5a29('0x706')]),'lat':_0x231faa[a0_0x5a29('0x382')]['toDegrees'](_0x1a1f50[a0_0x5a29('0x517')]),'hgt':Math[a0_0x5a29('0x846')](Number(_0x1a1f50['height'])+Number(_0x3213dc))},_0x5adc00=[Number(_0x5c71c8[a0_0x5a29('0x4de')]),Number(_0x5c71c8[a0_0x5a29('0x5ea')]),Number(_0x5c71c8[a0_0x5a29('0x26d')])];_0x565e9e=_0x565e9e['concat'](_0x5adc00);}return _0x231faa[a0_0x5a29('0x3bd')][a0_0x5a29('0xc8')](_0x565e9e);}_0x1a1f50=_0x231faa['Ellipsoid'][a0_0x5a29('0x20a')][a0_0x5a29('0x587')](_0x42b3ec);var _0x108e14=Number(_0x231faa['Math'][a0_0x5a29('0x2eb')](_0x1a1f50['longitude'])[a0_0x5a29('0x292')](0x6)),_0x102c96=Number(_0x231faa['Math'][a0_0x5a29('0x2eb')](_0x1a1f50[a0_0x5a29('0x517')])['toFixed'](0x6));return _0x231faa['Cartesian3'][a0_0x5a29('0x655')](_0x108e14,_0x102c96,Number(_0x1a1f50[a0_0x5a29('0x6b7')])+Number(_0x3213dc));}},{'key':'getZHeightPosition','value':function(_0x70f3c9,_0x247377){var _0x330647=_0x231faa[a0_0x5a29('0x7c9')]['fromCartesian'](_0x70f3c9),_0x1381ca=Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x330647[a0_0x5a29('0x706')])),_0xdd6eb9=Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x330647[a0_0x5a29('0x517')])),_0x4d2382=Number(_0x330647[a0_0x5a29('0x6b7')][a0_0x5a29('0x292')](0x2)),_0x9109d6=_0x231faa[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x247377),_0x47881c=Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x9109d6[a0_0x5a29('0x706')])),_0x21a063=Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x9109d6['latitude'])),_0x225b95=Number(_0x9109d6[a0_0x5a29('0x6b7')][a0_0x5a29('0x292')](0x2));return _0x4d2382>_0x225b95?_0x231faa[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x47881c,_0x21a063,_0x4d2382):_0x231faa[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x1381ca,_0xdd6eb9,_0x225b95);}},{'key':'getHDistance','value':function(_0x452929,_0x2494e0){var _0x8dc7b4=this[a0_0x5a29('0x52c')](_0x452929,_0x2494e0),_0x3a45a1=_0x231faa[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x2494e0),_0x29418b=_0x231faa[a0_0x5a29('0x7c9')]['fromCartesian'](_0x8dc7b4),_0x46caca=_0x231faa[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0x452929,_0x8dc7b4);return Math[a0_0x5a29('0x1d2')](Number(_0x29418b[a0_0x5a29('0x6b7')])-Number(_0x3a45a1[a0_0x5a29('0x6b7')]))<0.01&&(_0x46caca=_0x231faa['Cartesian3']['distance'](_0x2494e0,_0x8dc7b4)),_0x46caca;}},{'key':'getMidPosition','value':function(_0x1191bf,_0x4e34da){var _0x62047c=_0x231faa[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x1191bf),_0x3fbb20=Number(_0x231faa[a0_0x5a29('0x382')]['toDegrees'](_0x62047c[a0_0x5a29('0x706')])),_0x152951=Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x62047c[a0_0x5a29('0x517')])),_0x44e913=Number(_0x62047c[a0_0x5a29('0x6b7')][a0_0x5a29('0x292')](0x2)),_0xf497de=_0x231faa[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x4e34da),_0xe07c64=(_0x3fbb20+Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0xf497de[a0_0x5a29('0x706')])))/0x2,_0x4a54f5=(_0x152951+Number(_0x231faa[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0xf497de[a0_0x5a29('0x517')])))/0x2,_0x35ec4f=(_0x44e913+Number(_0xf497de[a0_0x5a29('0x6b7')][a0_0x5a29('0x292')](0x2)))/0x2;return _0x231faa[a0_0x5a29('0x3bd')]['fromDegrees'](_0xe07c64,_0x4a54f5,_0x35ec4f);}},{'key':a0_0x5a29('0x32a'),'value':function(_0x44786d){if(!_0x44786d)return null;switch(_0x44786d[a0_0x5a29('0x519')]){case'Point':return this[a0_0x5a29('0x97e')](_0x44786d[a0_0x5a29('0x98')][0x0]);case a0_0x5a29('0x2ee'):return this[a0_0x5a29('0x5bb')](_0x44786d[a0_0x5a29('0x98')]);case a0_0x5a29('0x395'):return this[a0_0x5a29('0x5bb')](_0x44786d['coordinates'][0x0]);case a0_0x5a29('0x95'):return this[a0_0x5a29('0x5bb')](_0x44786d['coordinates']);default:throw new Error(a0_0x5a29('0x219'));}}},{'key':a0_0x5a29('0x97e'),'value':function(_0x3cdfd6){return _0x231faa[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](Number(_0x3cdfd6[0x0]),Number(_0x3cdfd6[0x1]),Number(_0x3cdfd6[0x2]||0x0));}},{'key':'lonLatsToCartesians','value':function(_0x479cd1){for(var _0x46ed4b=[],_0x54217f=0x0;_0x54217f<_0x479cd1[a0_0x5a29('0x515')];_0x54217f++){var _0x1e6878=[Number(_0x479cd1[_0x54217f][0x0]),Number(_0x479cd1[_0x54217f][0x1]),Number(_0x479cd1[_0x54217f][0x2]||0x0)];_0x46ed4b=_0x46ed4b[a0_0x5a29('0x6c9')](_0x1e6878);}return _0x231faa['Cartesian3'][a0_0x5a29('0xc8')](_0x46ed4b);}},{'key':'normalizeJsonData','value':function(_0x500e61){var _0x14512c,_0x1cf924={};if(_0x1cf924[a0_0x5a29('0x519')]=a0_0x5a29('0x144'),_0x1cf924['features']=[],(_0x14512c=a0_0x5a29('0x783')==typeof _0x500e61?JSON[a0_0x5a29('0x1e7')](_0x500e61):_0x500e61)instanceof Array){for(var _0x3074ea=0x0;_0x3074ea<_0x14512c[a0_0x5a29('0x515')];_0x3074ea++){var _0x218a35={'type':a0_0x5a29('0x3af')};_0x218a35[a0_0x5a29('0x31d')]=_0x14512c[_0x3074ea][a0_0x5a29('0x31d')]||_0x14512c[_0x3074ea][a0_0x5a29('0x817')],_0x218a35['geometry']=_0x14512c[_0x3074ea][a0_0x5a29('0x74e')]||_0x14512c[_0x3074ea][a0_0x5a29('0x7dd')],_0x1cf924[a0_0x5a29('0xcb')][a0_0x5a29('0x3cd')](_0x218a35);}return JSON['stringify'](_0x1cf924);}if(_0x500e61[a0_0x5a29('0xcb')]&&_0x500e61['features']instanceof Array)return _0x500e61;}},{'key':a0_0x5a29('0x745'),'value':function(_0x17c29e){var _0x287c90={};try{_0x287c90=JSON[a0_0x5a29('0x1e7')](_0x17c29e);}catch(_0x59ba75){return void haoutil[a0_0x5a29('0x827')](_0x59ba75[a0_0x5a29('0x775')]+':\x20'+_0x59ba75[a0_0x5a29('0x452')]+a0_0x5a29('0x92d'));}for(var _0x4efc75=_0x287c90[a0_0x5a29('0xcb')],_0x4b2f08=[],_0x5b0ee9=0x0;_0x5b0ee9<_0x4efc75[a0_0x5a29('0x515')];_0x5b0ee9++){var _0x95173b=_0x4efc75[_0x5b0ee9],_0x24f339={'dataID':_0x95173b[a0_0x5a29('0x31d')][a0_0x5a29('0x5c6')]['id'],'dataType':_0x95173b[a0_0x5a29('0x31d')][a0_0x5a29('0x5c6')][a0_0x5a29('0x519')],'properties':_0x95173b[a0_0x5a29('0x31d')],'geometry':_0x95173b[a0_0x5a29('0x74e')]};_0x4b2f08['push'](_0x24f339);}return JSON[a0_0x5a29('0x439')](_0x4b2f08);}},{'key':a0_0x5a29('0x307'),'value':function(_0x16374c){var _0x1af30b=_0x16374c[a0_0x5a29('0x835')],_0x176e12=_0x16374c[a0_0x5a29('0x4e0')];if(null!=_0x176e12&&0x0!=_0x176e12['length']){for(var _0x58bbff=_0x231faa['PolylinePipeline'][a0_0x5a29('0x51f')]({'positions':_0x176e12,'granularity':_0x16374c[a0_0x5a29('0x69d')]||0.00001}),_0x21ca45=[],_0x4ad28a=_0x1af30b[a0_0x5a29('0x238')][a0_0x5a29('0x6a4')][a0_0x5a29('0x12c')],_0x3fbf12=0x0;_0x3fbf12<_0x58bbff[a0_0x5a29('0x515')];_0x3fbf12+=0x3){var _0x264064=_0x231faa[a0_0x5a29('0x3bd')][a0_0x5a29('0x67f')](_0x58bbff,_0x3fbf12);_0x21ca45[a0_0x5a29('0x3cd')](_0x4ad28a[a0_0x5a29('0x587')](_0x264064));}var _0x146a75=_0x231faa['Cartographic'][a0_0x5a29('0x64c')](_0x176e12[0x0])[a0_0x5a29('0x6b7')];_0x231faa[a0_0x5a29('0x543')](_0x231faa[a0_0x5a29('0x7e4')](_0x1af30b[a0_0x5a29('0x739')],_0x21ca45),function(_0x21820a){for(var _0x19d7a3=!0x1,_0x1db100=_0x16374c[a0_0x5a29('0x58d')]||0x2,_0x27dcb9=0x0;_0x27dcb9<_0x21820a['length'];++_0x27dcb9)null==_0x21820a[_0x27dcb9][a0_0x5a29('0x6b7')]?_0x19d7a3=!0x0:_0x146a75=_0x21820a[_0x27dcb9]['height']||0x0,_0x21820a[_0x27dcb9][a0_0x5a29('0x6b7')]=_0x1db100+(_0x21820a[_0x27dcb9][a0_0x5a29('0x6b7')]||_0x146a75);var _0x5c8fd2=_0x4ad28a[a0_0x5a29('0x65c')](_0x21820a);_0x16374c[a0_0x5a29('0x692')]?_0x16374c[a0_0x5a29('0x692')](_0x5c8fd2,_0x19d7a3):_0x176e12[a0_0x5a29('0x850')]&&_0x176e12[a0_0x5a29('0x850')](_0x5c8fd2);});}else _0x16374c[a0_0x5a29('0x692')]&&_0x16374c[a0_0x5a29('0x692')](_0x176e12);}}]),_0x2a107d;}(),_0x20a902=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x3a2672=function(){function _0x27b12(_0x103ded,_0x5e9711,_0x44fdd4){_0x1ee296()(this,_0x27b12),this[a0_0x5a29('0x835')]=_0x103ded,this[a0_0x5a29('0x66f')]=_0x5e9711,this['draggers']=[],_0x2c464['createDragger'](this[a0_0x5a29('0x835')],{'dragger':_0x5e9711,'onDrag':function(_0x3d5b74,_0x5a6e20){var _0x51f6b8=new _0x20a902[(a0_0x5a29('0x3bd'))]();_0x20a902[a0_0x5a29('0x3bd')][a0_0x5a29('0x3c0')](_0x5a6e20,_0x5e9711[a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],_0x51f6b8),_0x5e9711[a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]=_0x5a6e20,_0x5e9711[a0_0x5a29('0x1b6')]();}});}return _0x1fafe8()(_0x27b12,[{'key':'updateDraggers','value':function(){}},{'key':a0_0x5a29('0x3d6'),'value':function(){this['draggers']=[];}}]),_0x27b12;}(),_0x4f2427=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4c5312=function(){function _0x240152(_0x523a87,_0xebe8d1){_0x1ee296()(this,_0x240152),this[a0_0x5a29('0x927')]=_0xebe8d1,this['_value']=void 0x0,this[a0_0x5a29('0x8cc')]=!0x1,this[a0_0x5a29('0x2c2')]=!0x1,this[a0_0x5a29('0x5e6')]=new _0x4f2427[(a0_0x5a29('0x22f'))](),this[a0_0x5a29('0x84e')]=!0x1,this[a0_0x5a29('0x850')](_0x523a87);}return _0x1fafe8()(_0x240152,[{'key':'getValue','value':function(_0x15ce10,_0x3b7631){return this[a0_0x5a29('0x927')]?{'positions':this[a0_0x5a29('0x30f')]}:this[a0_0x5a29('0x8cc')]?this[a0_0x5a29('0x30f')][a0_0x5a29('0x218')](_0x3b7631):this[a0_0x5a29('0x30f')];}},{'key':'setValue','value':function(_0xbcfbe7){var _0x548318=this[a0_0x5a29('0x30f')];if(_0x548318!==_0xbcfbe7){var _0x190ba8=_0x4f2427[a0_0x5a29('0x1da')](_0xbcfbe7),_0x1f359f=_0x190ba8&&'function'==typeof _0xbcfbe7[a0_0x5a29('0x218')],_0x452d1b=_0x190ba8&&a0_0x5a29('0x2ae')==typeof _0xbcfbe7[a0_0x5a29('0x128')];this[a0_0x5a29('0x8cc')]=_0x1f359f,this['_hasEquals']=_0x452d1b,(!_0x452d1b||!_0xbcfbe7['equals'](_0x548318))&&(this[a0_0x5a29('0x30f')]=_0x1f359f?_0xbcfbe7[a0_0x5a29('0x218')]():_0xbcfbe7,this[a0_0x5a29('0x5e6')][a0_0x5a29('0x1a0')](this));}}},{'key':a0_0x5a29('0x128'),'value':function(_0x156bfa){return this===_0x156bfa||_0x156bfa instanceof _0x240152&&(!this[a0_0x5a29('0x2c2')]&&this[a0_0x5a29('0x30f')]===_0x156bfa[a0_0x5a29('0x30f')]||this[a0_0x5a29('0x2c2')]&&this[a0_0x5a29('0x30f')][a0_0x5a29('0x128')](_0x156bfa[a0_0x5a29('0x30f')]));}},{'key':'valueOf','value':function(_0x259714){return this['_value'];}},{'key':a0_0x5a29('0x857'),'value':function(_0x3581a5){return String(this[a0_0x5a29('0x30f')]);}}]),_0x240152;}(),_0x538fb0=DC['Namespace'][a0_0x5a29('0x6e8')],_0xb77726={'typename':a0_0x5a29('0x3c1'),'startDraw':function(_0x38296f,_0x759583){var _0x234b9b=this[a0_0x5a29('0x60c')](_0x759583);return _0x38296f['entities']['add']({'billboard':_0x234b9b,'attribute':_0x759583});},'attribute2Entity':function(_0x4a4c78,_0x82a2ee){for(var _0x52a12e in(null==_0x82a2ee&&(_0x82a2ee={'scale':0x1,'horizontalOrigin':_0x538fb0[a0_0x5a29('0x4bf')][a0_0x5a29('0x51c')],'verticalOrigin':_0x538fb0[a0_0x5a29('0x742')][a0_0x5a29('0x863')]}),_0x4a4c78[a0_0x5a29('0x46a')])){var _0x5b53bc=_0x4a4c78[a0_0x5a29('0x46a')][_0x52a12e];switch(_0x52a12e){default:_0x82a2ee[_0x52a12e]=_0x5b53bc;break;case a0_0x5a29('0x538'):_0x82a2ee[a0_0x5a29('0x6ed')]=new _0x538fb0[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](a0_0x5a29('0x40d'))[a0_0x5a29('0x3eb')](Number(_0x5b53bc||0x1));break;case a0_0x5a29('0xa4'):_0x82a2ee[a0_0x5a29('0xa4')]=_0x538fb0[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x5b53bc);}}return _0x82a2ee;},'getEditor':function(_0x33d6c7,_0x5cac5a,_0x2a9ffe){return new _0x3a2672(_0x33d6c7,_0x5cac5a,_0x2a9ffe);},'setPositions':function(_0x2c1453,_0x35dcd0){_0x2c1453['position']=new _0x4c5312(_0x35dcd0);},'getPositions':function(_0x3ba806){return[_0x3ba806['position'][a0_0x5a29('0x30f')]];},'getCoordinates':function(_0x229c2d){var _0x446623=this[a0_0x5a29('0xb2')](_0x229c2d);return _0x2c464[a0_0x5a29('0x78')](_0x446623);},'toGeoJSON':function(_0x1a2913){var _0x2bbdea=this[a0_0x5a29('0x78')](_0x1a2913);return{'type':'Feature','properties':_0x1a2913['attribute'],'geometry':{'type':a0_0x5a29('0x7d9'),'coordinates':_0x2bbdea}};}},_0x4d26f6=DC['Namespace'][a0_0x5a29('0x6e8')],_0xa29974=function(){function _0x41151c(_0xd6bbf3,_0x57fb35,_0x150914){_0x1ee296()(this,_0x41151c),this[a0_0x5a29('0x835')]=_0xd6bbf3,this[a0_0x5a29('0x66f')]=_0x57fb35,this['options']=_0x150914,this[a0_0x5a29('0x7a5')]=[],this['heightDraggers']=[],this[a0_0x5a29('0xd1')]();}return _0x1fafe8()(_0x41151c,[{'key':a0_0x5a29('0xd1'),'value':function(){var _0x5b33dd=this,_0x1c9483=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x5e4')],'position':this[a0_0x5a29('0x66f')][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],'onDrag':function(_0x20d358,_0x3e486f){var _0x52cc8c=new _0x4d26f6[(a0_0x5a29('0x3bd'))]();_0x4d26f6[a0_0x5a29('0x3bd')][a0_0x5a29('0x3c0')](_0x3e486f,_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],_0x52cc8c);var _0x416cd9=_0x4d26f6[a0_0x5a29('0x7c9')]['fromCartesian'](_0x3e486f),_0x2aa974=Number(_0x416cd9[a0_0x5a29('0x6b7')])[a0_0x5a29('0x292')](0x2);_0x5b33dd['entity'][a0_0x5a29('0x92')][a0_0x5a29('0x6b7')]=new _0x4d26f6[(a0_0x5a29('0x23c'))](_0x416cd9[a0_0x5a29('0x6b7')]),_0x5b33dd[a0_0x5a29('0x66f')]['attribute']['style']['height']=_0x2aa974,_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]=_0x3e486f;var _0x71fe18=new _0x4d26f6[(a0_0x5a29('0x3bd'))]();_0x4d26f6[a0_0x5a29('0x3bd')][a0_0x5a29('0x695')](_0x20d358[a0_0x5a29('0x568')][a0_0x5a29('0x53c')]['_value'],_0x52cc8c,_0x71fe18),_0x20d358['majorDragger'][a0_0x5a29('0x53c')]=new _0x4d26f6['ConstantProperty'](_0x71fe18),_0x4d26f6[a0_0x5a29('0x3bd')][a0_0x5a29('0x695')](_0x20d358[a0_0x5a29('0x7a6')]['position'][a0_0x5a29('0x30f')],_0x52cc8c,_0x71fe18),_0x20d358[a0_0x5a29('0x7a6')][a0_0x5a29('0x53c')]=new _0x4d26f6[(a0_0x5a29('0x23c'))](_0x71fe18),null!=_0x5b33dd['entity'][a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]&&_0x5b33dd[a0_0x5a29('0x84a')](),_0x5b33dd['entity'][a0_0x5a29('0x1b6')]();}});this[a0_0x5a29('0x7a5')][a0_0x5a29('0x3cd')](_0x1c9483);var _0x25ba6b=_0x4d26f6[a0_0x5a29('0x26c')]['computeEllipsePositions']({'center':this[a0_0x5a29('0x66f')][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],'semiMinorAxis':this[a0_0x5a29('0x66f')]['ellipse'][a0_0x5a29('0x1fd')]['_value'],'semiMajorAxis':this[a0_0x5a29('0x66f')][a0_0x5a29('0x92')][a0_0x5a29('0x97f')][a0_0x5a29('0x30f')],'rotation':_0x4d26f6[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](Number(this[a0_0x5a29('0x66f')]['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0xa4')]||0x0)),'granularity':0x2},!0x0,!0x1),_0x2f74c1=new _0x4d26f6[(a0_0x5a29('0x3bd'))](_0x25ba6b[a0_0x5a29('0x4e0')][0x0],_0x25ba6b[a0_0x5a29('0x4e0')][0x1],_0x25ba6b[a0_0x5a29('0x4e0')][0x2]),_0x5cc021=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x5e4')],'position':_0x2f74c1,'onDrag':function(_0x47658d,_0x158a88){var _0x404d3a=_0x4d26f6[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],_0x158a88);_0x5b33dd['entity'][a0_0x5a29('0x92')][a0_0x5a29('0x97f')]=new _0x4d26f6['ConstantProperty'](_0x404d3a),_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x97f')]=Number(_0x404d3a)['toFixed'](0x2),null!=_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]&&_0x5b33dd['updateHeightDraggers'](),_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x1b6')]();}});_0x1c9483[a0_0x5a29('0x568')]=_0x5cc021,this['draggers']['push'](_0x5cc021);var _0x51853e=new _0x4d26f6['Cartesian3'](_0x25ba6b[a0_0x5a29('0x4e0')][0x3],_0x25ba6b[a0_0x5a29('0x4e0')][0x4],_0x25ba6b[a0_0x5a29('0x4e0')][0x5]),_0x1c6ecb=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':this['options'][a0_0x5a29('0x5e4')],'position':_0x51853e,'onDrag':function(_0x3a8401,_0x493a21){var _0xabce4c=_0x4d26f6['Cartesian3']['distance'](_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],_0x493a21);_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x92')][a0_0x5a29('0x1fd')]=new _0x4d26f6[(a0_0x5a29('0x23c'))](_0xabce4c),_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['semiMinorAxis']=Number(_0xabce4c)[a0_0x5a29('0x292')](0x2),null!=_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['extrudedHeight']&&_0x5b33dd['updateHeightDraggers'](),_0x5b33dd[a0_0x5a29('0x66f')][a0_0x5a29('0x1b6')]();}});_0x1c9483['minorDragger']=_0x1c6ecb,this[a0_0x5a29('0x7a5')][a0_0x5a29('0x3cd')](_0x1c6ecb),null!=this['entity'][a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]&&this['initHeightDraggers']();}},{'key':a0_0x5a29('0x421'),'value':function(){var _0x1c1f98=this,_0x4ee369=Number(this[a0_0x5a29('0x66f')][a0_0x5a29('0x151')]['style'][a0_0x5a29('0x1b4')])-Number(this[a0_0x5a29('0x66f')][a0_0x5a29('0x151')]['style']['height']),_0x11c5c9=_0x2c464[a0_0x5a29('0x22b')](this['viewer'],{'dragIcon':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x5e4')],'position':_0x2c464[a0_0x5a29('0x341')](this['entity'][a0_0x5a29('0x53c')]['_value'],_0x4ee369),'onDrag':function(_0x3f6946,_0xead381){var _0x56442b=new _0x4d26f6[(a0_0x5a29('0x3bd'))]();_0x4d26f6['Cartesian3'][a0_0x5a29('0x3c0')](_0xead381,_0x1c1f98[a0_0x5a29('0x66f')]['position']['_value'],_0x56442b);var _0x131e2b=_0x4d26f6[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0xead381),_0x4b5b02=Number(_0x131e2b[a0_0x5a29('0x6b7')])[a0_0x5a29('0x292')](0x2);_0x1c1f98['entity'][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]=_0xead381,_0x1c1f98['entity'][a0_0x5a29('0x92')][a0_0x5a29('0x1b4')]=new _0x4d26f6[(a0_0x5a29('0x23c'))](Number(_0x4b5b02)+Number(_0x4ee369)),_0x1c1f98['entity'][a0_0x5a29('0x92')][a0_0x5a29('0x6b7')]=new _0x4d26f6[(a0_0x5a29('0x23c'))](_0x131e2b[a0_0x5a29('0x6b7')]),_0x1c1f98['entity'][a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['extrudedHeight']=Number(_0x4b5b02)+Number(_0x4ee369),_0x1c1f98[a0_0x5a29('0x66f')]['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x6b7')]=_0x4b5b02,_0x1c1f98['updateDraggers'](),_0x1c1f98[a0_0x5a29('0x66f')][a0_0x5a29('0x1b6')]();}});this['heightDraggers'][a0_0x5a29('0x3cd')](_0x11c5c9);var _0x358dcb=_0x4d26f6['EllipseGeometryLibrary']['computeEllipsePositions']({'center':this['entity'][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],'semiMinorAxis':this[a0_0x5a29('0x66f')][a0_0x5a29('0x92')][a0_0x5a29('0x1fd')][a0_0x5a29('0x30f')],'semiMajorAxis':this[a0_0x5a29('0x66f')][a0_0x5a29('0x92')]['semiMajorAxis'][a0_0x5a29('0x30f')],'rotation':_0x4d26f6[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](Number(this[a0_0x5a29('0x66f')][a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0xa4')]||0x0)),'granularity':0x2},!0x0,!0x1),_0x13fa3f=new _0x4d26f6[(a0_0x5a29('0x3bd'))](_0x358dcb['positions'][0x0],_0x358dcb[a0_0x5a29('0x4e0')][0x1],_0x358dcb[a0_0x5a29('0x4e0')][0x2]),_0x2b661e=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':this[a0_0x5a29('0x8ae')]['dragIcon'],'position':_0x2c464[a0_0x5a29('0x341')](_0x13fa3f,_0x4ee369),'onDrag':function(_0xe5a9ab,_0x288a7a){var _0x2ec24f=_0x4d26f6['Cartographic'][a0_0x5a29('0x64c')](_0x288a7a);_0x1c1f98[a0_0x5a29('0x66f')][a0_0x5a29('0x92')]['extrudedHeight']=new _0x4d26f6['ConstantProperty'](_0x2ec24f[a0_0x5a29('0x6b7')]),_0x1c1f98['entity'][a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['extrudedHeight']=Number(_0x2ec24f[a0_0x5a29('0x6b7')])['toFixed'](0x2),_0x1c1f98[a0_0x5a29('0x84a')](),_0x1c1f98['entity'][a0_0x5a29('0x1b6')]();},'vertical':!0x0,'horizontal':!0x1});this['heightDraggers'][a0_0x5a29('0x3cd')](_0x2b661e);var _0x4795c5=new _0x4d26f6[(a0_0x5a29('0x3bd'))](_0x358dcb[a0_0x5a29('0x4e0')][0x3],_0x358dcb[a0_0x5a29('0x4e0')][0x4],_0x358dcb[a0_0x5a29('0x4e0')][0x5]),_0x28cd76=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':this['options'][a0_0x5a29('0x5e4')],'position':_0x2c464[a0_0x5a29('0x341')](_0x4795c5,_0x4ee369),'onDrag':function(_0x5cfd1e,_0x54d4c2){var _0x34f436=_0x4d26f6[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x54d4c2);_0x1c1f98['entity']['ellipse'][a0_0x5a29('0x1b4')]=new _0x4d26f6[(a0_0x5a29('0x23c'))](_0x34f436[a0_0x5a29('0x6b7')]),_0x1c1f98['entity'][a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['extrudedHeight']=Number(_0x34f436[a0_0x5a29('0x6b7')])[a0_0x5a29('0x292')](0x2),_0x1c1f98[a0_0x5a29('0x84a')](),_0x1c1f98[a0_0x5a29('0x66f')][a0_0x5a29('0x1b6')]();},'vertical':!0x0,'horizontal':!0x1});this[a0_0x5a29('0xf0')][a0_0x5a29('0x3cd')](_0x28cd76);}},{'key':a0_0x5a29('0x19b'),'value':function(){this[a0_0x5a29('0x3d6')](),this[a0_0x5a29('0xd1')]();}},{'key':a0_0x5a29('0x84a'),'value':function(){for(i=0x0;i<this[a0_0x5a29('0xf0')][a0_0x5a29('0x515')];i++)this[a0_0x5a29('0x835')][a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this['heightDraggers'][i]);this[a0_0x5a29('0xf0')]=[],this[a0_0x5a29('0x421')]();}},{'key':'destroy','value':function(){var _0x519678=0x0;for(_0x519678=0x0;_0x519678<this[a0_0x5a29('0x7a5')]['length'];_0x519678++)this['viewer']['entities'][a0_0x5a29('0x157')](this[a0_0x5a29('0x7a5')][_0x519678]);if(this[a0_0x5a29('0x7a5')]=[],null!=this[a0_0x5a29('0x66f')]['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]){for(_0x519678=0x0;_0x519678<this[a0_0x5a29('0xf0')][a0_0x5a29('0x515')];_0x519678++)this[a0_0x5a29('0x835')][a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this[a0_0x5a29('0xf0')][_0x519678]);this[a0_0x5a29('0xf0')]=[];}}}]),_0x41151c;}(),_0x5549e0=DC['Namespace'][a0_0x5a29('0x6e8')],_0x38b030={'typename':a0_0x5a29('0x92'),'startDraw':function(_0x3c5b0b,_0xecbbc5){var _0x474e99=this[a0_0x5a29('0x60c')](_0xecbbc5);return _0x3c5b0b[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'ellipse':_0x474e99,'attribute':_0xecbbc5});},'attribute2Entity':function(_0x333ddd,_0x51814f){for(var _0x36b33b in(null==_0x51814f&&(_0x51814f={'show':!0x0,'fill':!0x0}),_0x333ddd[a0_0x5a29('0x46a')])){var _0xb7748b=_0x333ddd['style'][_0x36b33b];switch(_0x36b33b){default:_0x51814f[_0x36b33b]=_0xb7748b;break;case a0_0x5a29('0x538'):case a0_0x5a29('0x39b'):break;case'outlineColor':_0x51814f[a0_0x5a29('0x429')]=new _0x5549e0[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0xb7748b||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](_0x333ddd['style'][a0_0x5a29('0x39b')]||_0x333ddd[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1);break;case a0_0x5a29('0x6ed'):_0x51814f[a0_0x5a29('0xdd')]=new _0x5549e0[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0xb7748b||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](Number(_0x333ddd[a0_0x5a29('0x46a')]['opacity']||0x1));break;case'rotation':_0x51814f[a0_0x5a29('0xa4')]=_0x5549e0[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0xb7748b);}}return _0x51814f;},'getEditor':function(_0x330f61,_0x12a18e,_0x4a0c86){return new _0xa29974(_0x330f61,_0x12a18e,_0x4a0c86);},'setPositions':function(_0x575bc0,_0x157ec8){_0x575bc0[a0_0x5a29('0x53c')]=new _0x4c5312(_0x157ec8);},'getPositions':function(_0xf5ea6d){return[_0xf5ea6d[a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]];},'getCoordinates':function(_0x5e4746){var _0xd746a6=this[a0_0x5a29('0xb2')](_0x5e4746);return _0x2c464[a0_0x5a29('0x78')](_0xd746a6);},'toGeoJSON':function(_0x40263a){var _0x31c901=this[a0_0x5a29('0x78')](_0x40263a);return{'type':a0_0x5a29('0x3af'),'properties':_0x40263a[a0_0x5a29('0x151')],'geometry':{'type':a0_0x5a29('0x7d9'),'coordinates':_0x31c901}};}},_0x51ea8a=DC['Namespace'][a0_0x5a29('0x6e8')],_0x44cd1b=function(){function _0xa15bff(_0x25ca86,_0x1a6fbd,_0x35f71b){_0x1ee296()(this,_0xa15bff),this[a0_0x5a29('0x835')]=_0x25ca86,this[a0_0x5a29('0x66f')]=_0x1a6fbd,this[a0_0x5a29('0x8ae')]=_0x35f71b,this[a0_0x5a29('0x7a5')]=[],this[a0_0x5a29('0xd1')]();}return _0x1fafe8()(_0xa15bff,[{'key':a0_0x5a29('0xd1'),'value':function(){var _0x5133a3=this,_0x39216c=this[a0_0x5a29('0x66f')][a0_0x5a29('0x53c')]['_value'],_0x2e5c78=Number(this[a0_0x5a29('0x66f')][a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x2b3')])||0x0,_0x299366=_0x51ea8a['Cartographic']['fromCartesian'](_0x39216c);_0x299366[a0_0x5a29('0x6b7')]+=_0x2e5c78;var _0x438496=_0x51ea8a[a0_0x5a29('0x3bd')]['fromRadians'](_0x299366[a0_0x5a29('0x706')],_0x299366[a0_0x5a29('0x517')],_0x299366['height']),_0x2146f4=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':this[a0_0x5a29('0x8ae')]['dragIcon'],'position':_0x438496,'onDrag':function(_0x1792dc,_0x427025){var _0x13e6ff=new _0x51ea8a[(a0_0x5a29('0x3bd'))]();_0x51ea8a[a0_0x5a29('0x3bd')][a0_0x5a29('0x3c0')](_0x427025,_0x5133a3['entity'][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],_0x13e6ff);var _0x49757e=_0x51ea8a[a0_0x5a29('0x7c9')]['fromCartesian'](_0x427025),_0x9b75b0=Number(_0x5133a3[a0_0x5a29('0x66f')][a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['heightRadii'])||0x0;_0x49757e[a0_0x5a29('0x6b7')]-=_0x9b75b0;var _0x43b308=_0x51ea8a[a0_0x5a29('0x3bd')][a0_0x5a29('0x38')](_0x49757e[a0_0x5a29('0x706')],_0x49757e['latitude'],_0x49757e[a0_0x5a29('0x6b7')]);_0x5133a3[a0_0x5a29('0x66f')][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]=_0x43b308,_0x5133a3[a0_0x5a29('0x66f')]['changeEditing']();}});this[a0_0x5a29('0x7a5')]['push'](_0x2146f4);}},{'key':a0_0x5a29('0x19b'),'value':function(){this[a0_0x5a29('0x3d6')](),this[a0_0x5a29('0xd1')]();}},{'key':'destroy','value':function(){var _0x3f33c6=0x0;for(_0x3f33c6=0x0;_0x3f33c6<this[a0_0x5a29('0x7a5')][a0_0x5a29('0x515')];_0x3f33c6++)this[a0_0x5a29('0x835')][a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this['draggers'][_0x3f33c6]);this[a0_0x5a29('0x7a5')]=[];}}]),_0xa15bff;}(),_0x273aa5=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2db02a={'typename':a0_0x5a29('0x12c'),'startDraw':function(_0x3fda2c,_0x459883){var _0x37fe78=this['attribute2Entity'](_0x459883);return _0x3fda2c['entities']['add']({'ellipsoid':_0x37fe78,'attribute':_0x459883});},'attribute2Entity':function(_0x4117c1,_0xe3cbe8){for(var _0x29570d in(null==_0xe3cbe8&&(_0xe3cbe8={'show':!0x0,'fill':!0x0}),_0x4117c1[a0_0x5a29('0x46a')])){var _0x5d6889=_0x4117c1[a0_0x5a29('0x46a')][_0x29570d];switch(_0x29570d){default:_0xe3cbe8[_0x29570d]=_0x5d6889;break;case a0_0x5a29('0x538'):case a0_0x5a29('0x39b'):case a0_0x5a29('0x8d7'):case a0_0x5a29('0x2b3'):break;case'outlineColor':_0xe3cbe8[a0_0x5a29('0x429')]=new _0x273aa5[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x5d6889||'#FFFF00')[a0_0x5a29('0x3eb')](_0x4117c1[a0_0x5a29('0x46a')][a0_0x5a29('0x39b')]||_0x4117c1[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1);break;case a0_0x5a29('0x6ed'):_0xe3cbe8[a0_0x5a29('0xdd')]=new _0x273aa5[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x5d6889||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](Number(_0x4117c1[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1));break;case'extentRadii':var _0x304926=_0x4117c1['style'][a0_0x5a29('0xf')]||0x64,_0x55cc33=_0x4117c1[a0_0x5a29('0x46a')][a0_0x5a29('0x8d7')]||0x64,_0x14a6c7=_0x4117c1[a0_0x5a29('0x46a')][a0_0x5a29('0x2b3')]||0x64;_0xe3cbe8[a0_0x5a29('0x37e')]=new _0x273aa5[(a0_0x5a29('0x3bd'))](_0x304926,_0x55cc33,_0x14a6c7);}}return _0xe3cbe8;},'getEditor':function(_0xe7afe2,_0x1d5cea,_0x94763f){return new _0x44cd1b(_0xe7afe2,_0x1d5cea,_0x94763f);},'setPositions':function(_0x15ddc5,_0x41d053){_0x15ddc5[a0_0x5a29('0x53c')]=new _0x4c5312(_0x41d053);},'getPositions':function(_0x114498){return[_0x114498[a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]];},'getCoordinates':function(_0x1251f7){var _0x99c27b=this[a0_0x5a29('0xb2')](_0x1251f7);return _0x2c464[a0_0x5a29('0x78')](_0x99c27b);},'toGeoJSON':function(_0x593858){var _0x12a535=this['getCoordinates'](_0x593858);return{'type':a0_0x5a29('0x3af'),'properties':_0x593858['attribute'],'geometry':{'type':a0_0x5a29('0x7d9'),'coordinates':_0x12a535}};}},_0x3e3050=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x3e0ff2={'typename':a0_0x5a29('0x7cc'),'startDraw':function(_0xcbf473,_0x669242){var _0x261eea=this[a0_0x5a29('0x60c')](_0x669242);return _0xcbf473[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'label':_0x261eea,'attribute':_0x669242});},'attribute2Entity':function(_0x4c317d,_0x22be04){for(var _0x5a858e in(null==_0x22be04&&(_0x22be04={'show':!0x0,'scale':0x1,'horizontalOrigin':_0x3e3050[a0_0x5a29('0x4bf')]['CENTER'],'verticalOrigin':_0x3e3050[a0_0x5a29('0x742')][a0_0x5a29('0x863')]}),_0x4c317d[a0_0x5a29('0x46a')])){var _0x56d172=_0x4c317d[a0_0x5a29('0x46a')][_0x5a858e];switch(_0x5a858e){default:_0x22be04[_0x5a858e]=_0x56d172;break;case a0_0x5a29('0x72'):case a0_0x5a29('0x4ae'):case a0_0x5a29('0x1a9'):case a0_0x5a29('0x34c'):case a0_0x5a29('0x3ce'):break;case a0_0x5a29('0x6ed'):_0x22be04[a0_0x5a29('0x51e')]=new _0x3e3050[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x56d172||a0_0x5a29('0x1df'))['withAlpha'](Number(_0x4c317d['style'][a0_0x5a29('0x538')]||0x1));break;case'border':_0x22be04[a0_0x5a29('0x46a')]=_0x56d172?_0x3e3050[a0_0x5a29('0x7fb')][a0_0x5a29('0x794')]:_0x3e3050[a0_0x5a29('0x7fb')][a0_0x5a29('0x8ca')];break;case a0_0x5a29('0x72f'):_0x22be04[a0_0x5a29('0x429')]=new _0x3e3050[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x56d172||a0_0x5a29('0x1df'))['withAlpha'](Number(_0x4c317d[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1));break;case a0_0x5a29('0x8a8'):_0x22be04[a0_0x5a29('0x1f6')]=_0x56d172;break;case'background':_0x22be04['showBackground']=_0x56d172;break;case a0_0x5a29('0x162'):_0x22be04['backgroundColor']=new _0x3e3050[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x56d172||'#FFFF00')['withAlpha'](Number(_0x4c317d[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1));break;case'pixelOffset':_0x22be04[a0_0x5a29('0x878')]=new _0x3e3050[(a0_0x5a29('0x11b'))](_0x4c317d[a0_0x5a29('0x46a')][a0_0x5a29('0x878')][0x0],_0x4c317d[a0_0x5a29('0x46a')][a0_0x5a29('0x878')][0x1]);}}_0x22be04[a0_0x5a29('0x3ce')]=(_0x4c317d[a0_0x5a29('0x46a')]['text']||'文字')['replace'](new RegExp(a0_0x5a29('0x68f'),'gm'),'\x0a');var _0x27d76b=(_0x4c317d[a0_0x5a29('0x46a')][a0_0x5a29('0x72')]||a0_0x5a29('0x424'))+a0_0x5a29('0x56b')+(_0x4c317d[a0_0x5a29('0x46a')]['font_weight']||'normal')+'\x20'+(_0x4c317d['style'][a0_0x5a29('0x1a9')]||'30')+'px\x20'+(_0x4c317d[a0_0x5a29('0x46a')][a0_0x5a29('0x34c')]||'黑体');return _0x22be04['font']=_0x27d76b,_0x22be04;},'getEditor':function(_0x2bb825,_0x2ae597,_0x15776c){return new _0x3a2672(_0x2bb825,_0x2ae597,_0x15776c);},'setPositions':function(_0x1b79b2,_0x479d5a){_0x1b79b2[a0_0x5a29('0x53c')]=new _0x4c5312(_0x479d5a);},'getPositions':function(_0x19c3f2){return[_0x19c3f2[a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]];},'getCoordinates':function(_0x2349e5){var _0x26ff38=this['getPositions'](_0x2349e5);return _0x2c464['getCoordinates'](_0x26ff38);},'toGeoJSON':function(_0x2c48cc){var _0x43ddeb=this['getCoordinates'](_0x2c48cc);return{'type':a0_0x5a29('0x3af'),'properties':_0x2c48cc['attribute'],'geometry':{'type':a0_0x5a29('0x7d9'),'coordinates':_0x43ddeb}};}},_0x23635c=(DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],function(){function _0x2849e2(_0x29732b,_0x1d262e,_0x5032f1){_0x1ee296()(this,_0x2849e2),this['viewer']=_0x29732b,this[a0_0x5a29('0x66f')]=_0x1d262e,this[a0_0x5a29('0x7a5')]=[];var _0x5051db=_0x1d262e[a0_0x5a29('0x83f')][a0_0x5a29('0x4e0')][a0_0x5a29('0x30f')];_0x1d262e[a0_0x5a29('0x83f')][a0_0x5a29('0x4e0')]['isConstant']=!0x1;for(var _0x5b3029=0x0;_0x5b3029<_0x5051db['length'];_0x5b3029++){var _0x1d6e53=_0x5051db[_0x5b3029],_0x3f539c=_0x2c464['createDragger'](this[a0_0x5a29('0x835')],{'dragIcon':_0x5032f1[a0_0x5a29('0x5e4')],'position':_0x1d6e53,'onDrag':function(_0x5eb179,_0x41be44){_0x5051db[_0x5eb179[a0_0x5a29('0x26e')]]=_0x41be44,_0x1d262e[a0_0x5a29('0x83f')]['positions']=_0x5051db,_0x1d262e[a0_0x5a29('0x1b6')]();}});_0x3f539c[a0_0x5a29('0x26e')]=_0x5b3029,this['draggers'][a0_0x5a29('0x3cd')](_0x3f539c);}}return _0x1fafe8()(_0x2849e2,[{'key':a0_0x5a29('0x19b'),'value':function(){for(var _0x291de9=this[a0_0x5a29('0x66f')]['polyline']['positions']['getValue'](),_0x382dad=0x0;_0x382dad<this['draggers'][a0_0x5a29('0x515')];_0x382dad++){var _0x3f35c6=_0x291de9[_0x382dad];this[a0_0x5a29('0x7a5')][_0x382dad][a0_0x5a29('0x53c')]=_0x3f35c6;}}},{'key':a0_0x5a29('0x3d6'),'value':function(){this[a0_0x5a29('0x66f')][a0_0x5a29('0x83f')]['positions'][a0_0x5a29('0x52a')]=!0x0;for(var _0x39f3ef=0x0;_0x39f3ef<this[a0_0x5a29('0x7a5')][a0_0x5a29('0x515')];_0x39f3ef++)this[a0_0x5a29('0x835')][a0_0x5a29('0x8b4')]['remove'](this[a0_0x5a29('0x7a5')][_0x39f3ef]);this[a0_0x5a29('0x7a5')]=[];}}]),_0x2849e2;}()),_0x93ec58=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x50b33c={'typename':'polyline','startDraw':function(_0x32e899,_0x25a1bb){var _0x5011a2=this[a0_0x5a29('0x60c')](_0x25a1bb);return _0x32e899[a0_0x5a29('0x8b4')]['add']({'polyline':_0x5011a2,'attribute':_0x25a1bb});},'attribute2Entity':function(_0xd3a074,_0x152469){for(var _0x2e3fd4 in(null==_0x152469&&(_0x152469={'followSurface':!0x0,'positions':new _0x4c5312([])}),_0xd3a074[a0_0x5a29('0x46a')])){var _0x2c8bfd=_0xd3a074[a0_0x5a29('0x46a')][_0x2e3fd4];switch(_0x2e3fd4){default:_0x152469[_0x2e3fd4]=_0x2c8bfd;break;case a0_0x5a29('0x208'):case a0_0x5a29('0x6ed'):case a0_0x5a29('0x538'):case a0_0x5a29('0x7db'):case a0_0x5a29('0x1f6'):case a0_0x5a29('0x429'):case'outlineOpacity':}}var _0x3699d5=new _0x93ec58[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0xd3a074[a0_0x5a29('0x46a')][a0_0x5a29('0x6ed')]||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](Number(_0xd3a074[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1));switch(_0xd3a074[a0_0x5a29('0x46a')][a0_0x5a29('0x208')]){default:case a0_0x5a29('0x551'):_0xd3a074['style']['outline']?_0x152469[a0_0x5a29('0xdd')]=new _0x93ec58[(a0_0x5a29('0x4f7'))]({'color':_0x3699d5,'outlineWidth':Number(_0xd3a074[a0_0x5a29('0x46a')]['outlineWidth']||0x1),'outlineColor':new _0x93ec58[(a0_0x5a29('0x82'))]['fromCssColorString'](_0xd3a074[a0_0x5a29('0x46a')][a0_0x5a29('0x429')]||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](Number(_0xd3a074[a0_0x5a29('0x46a')][a0_0x5a29('0x39b')]||_0xd3a074['style'][a0_0x5a29('0x538')]||0x1))}):_0x152469[a0_0x5a29('0xdd')]=_0x3699d5;break;case a0_0x5a29('0x132'):_0x152469['material']=new _0x93ec58[(a0_0x5a29('0x39'))]({'color':_0x3699d5});}return _0x152469;},'getEditor':function(_0x53f755,_0x13e7da,_0x2f3bff){return new _0x23635c(_0x53f755,_0x13e7da,_0x2f3bff);},'setPositions':function(_0x1f198c,_0x2bd115){_0x1f198c[a0_0x5a29('0x83f')][a0_0x5a29('0x4e0')][a0_0x5a29('0x850')](_0x2bd115);},'getPositions':function(_0x392ec1){return _0x392ec1['polyline'][a0_0x5a29('0x4e0')][a0_0x5a29('0x30f')];},'getCoordinates':function(_0x52b4fe){var _0x39a016=this[a0_0x5a29('0xb2')](_0x52b4fe);return _0x2c464[a0_0x5a29('0x78')](_0x39a016);},'toGeoJSON':function(_0x3e752e){var _0x24f838=this[a0_0x5a29('0x78')](_0x3e752e);return{'type':a0_0x5a29('0x3af'),'properties':_0x3e752e[a0_0x5a29('0x151')],'geometry':{'type':a0_0x5a29('0x2ee'),'coordinates':_0x24f838}};}},_0x26db41=(DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],function(){function _0x149796(_0x387329,_0x2deeb1,_0x5e0ee0){_0x1ee296()(this,_0x149796),this['viewer']=_0x387329,this[a0_0x5a29('0x66f')]=_0x2deeb1,this['draggers']=[];var _0x4ee11f=_0x2deeb1[a0_0x5a29('0x970')][a0_0x5a29('0x4e0')][a0_0x5a29('0x94c')]();_0x2deeb1[a0_0x5a29('0x970')][a0_0x5a29('0x4e0')][a0_0x5a29('0x52a')]=!0x1;for(var _0x27b92f=0x0;_0x27b92f<_0x4ee11f[a0_0x5a29('0x515')];_0x27b92f++){var _0x5a83bf=_0x4ee11f[_0x27b92f],_0x45b047=_0x2c464['createDragger'](this['viewer'],{'dragIcon':_0x5e0ee0[a0_0x5a29('0x5e4')],'position':_0x5a83bf,'onDrag':function(_0x2b27ad,_0x36635d){_0x4ee11f[_0x2b27ad[a0_0x5a29('0x26e')]]=_0x36635d,_0x2deeb1[a0_0x5a29('0x970')]['positions']=_0x4ee11f,_0x2deeb1[a0_0x5a29('0x1b6')]();}});_0x45b047[a0_0x5a29('0x26e')]=_0x27b92f,this[a0_0x5a29('0x7a5')]['push'](_0x45b047);}}return _0x1fafe8()(_0x149796,[{'key':a0_0x5a29('0x19b'),'value':function(){for(var _0x572c99=this['entity']['polylineVolume'][a0_0x5a29('0x4e0')][a0_0x5a29('0x94c')](),_0x5d6557=0x0;_0x5d6557<this[a0_0x5a29('0x7a5')][a0_0x5a29('0x515')];_0x5d6557++){var _0x1b3ef9=_0x572c99[_0x5d6557];this[a0_0x5a29('0x7a5')][_0x5d6557][a0_0x5a29('0x53c')]=_0x1b3ef9;}}},{'key':'destroy','value':function(){this['entity'][a0_0x5a29('0x970')][a0_0x5a29('0x4e0')][a0_0x5a29('0x52a')]=!0x0;for(var _0x516e30=0x0;_0x516e30<this['draggers'][a0_0x5a29('0x515')];_0x516e30++)this[a0_0x5a29('0x835')][a0_0x5a29('0x8b4')]['remove'](this[a0_0x5a29('0x7a5')][_0x516e30]);this[a0_0x5a29('0x7a5')]=[];}}]),_0x149796;}()),_0x30ec98=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x102b79={'typename':a0_0x5a29('0x970'),'startDraw':function(_0x39f1b3,_0x54dd4d){var _0x5bde08=this[a0_0x5a29('0x60c')](_0x54dd4d);return _0x39f1b3[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'polylineVolume':_0x5bde08,'attribute':_0x54dd4d});},'attribute2Entity':function(_0x307d0f,_0x527082){for(var _0x3619b5 in(null==_0x527082&&(_0x527082={'positions':new _0x4c5312([])}),_0x307d0f['style'])){var _0x52a8b7=_0x307d0f[a0_0x5a29('0x46a')][_0x3619b5];switch(_0x3619b5){default:_0x527082[_0x3619b5]=_0x52a8b7;break;case a0_0x5a29('0x538'):case a0_0x5a29('0x39b'):case'radius':case a0_0x5a29('0x586'):break;case'outlineColor':_0x527082[a0_0x5a29('0x429')]=new _0x30ec98[(a0_0x5a29('0x82'))]['fromCssColorString'](_0x52a8b7||a0_0x5a29('0x1df'))['withAlpha'](_0x307d0f[a0_0x5a29('0x46a')][a0_0x5a29('0x39b')]||_0x307d0f[a0_0x5a29('0x46a')]['opacity']||0x1);break;case a0_0x5a29('0x6ed'):_0x527082[a0_0x5a29('0xdd')]=new _0x30ec98[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x52a8b7||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](Number(_0x307d0f[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1));}}switch(_0x307d0f['style']['radius']=_0x307d0f['style'][a0_0x5a29('0x6e1')]||0xa,_0x307d0f['style'][a0_0x5a29('0x586')]){default:case'pipeline':_0x527082[a0_0x5a29('0x586')]=this[a0_0x5a29('0x7d8')](_0x307d0f[a0_0x5a29('0x46a')][a0_0x5a29('0x6e1')]);break;case a0_0x5a29('0x869'):_0x527082[a0_0x5a29('0x586')]=this['_getCorridorShape2'](_0x307d0f[a0_0x5a29('0x46a')][a0_0x5a29('0x6e1')]);break;case'star':_0x527082[a0_0x5a29('0x586')]=this[a0_0x5a29('0x4ce')](_0x307d0f['style'][a0_0x5a29('0x6e1')]);}return _0x527082;},'_getCorridorShape1':function(_0x36cb13){for(var _0x511297=_0x36cb13/0x3,_0x10ab76=[],_0x3c71d3=0x0;_0x3c71d3<=0x168;_0x3c71d3++){var _0x243e6e=_0x30ec98[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x3c71d3);_0x10ab76[a0_0x5a29('0x3cd')](new _0x30ec98[(a0_0x5a29('0x11b'))](_0x36cb13*Math[a0_0x5a29('0x5cc')](_0x243e6e),_0x36cb13*Math[a0_0x5a29('0x1a7')](_0x243e6e)));}for(_0x3c71d3=0x168;_0x3c71d3>=0x0;_0x3c71d3--){_0x243e6e=_0x30ec98['Math'][a0_0x5a29('0x78a')](_0x3c71d3),_0x10ab76[a0_0x5a29('0x3cd')](new _0x30ec98['Cartesian2']((_0x36cb13-_0x511297)*Math[a0_0x5a29('0x5cc')](_0x243e6e),(_0x36cb13-_0x511297)*Math[a0_0x5a29('0x1a7')](_0x243e6e)));}return _0x10ab76;},'_getCorridorShape2':function(_0x16cc97){for(var _0x1d01ae=[],_0x16f068=0x0;_0x16f068<=0x168;_0x16f068++){var _0x4fa49a=_0x30ec98[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x16f068);_0x1d01ae['push'](new _0x30ec98[(a0_0x5a29('0x11b'))](_0x16cc97*Math[a0_0x5a29('0x5cc')](_0x4fa49a),_0x16cc97*Math[a0_0x5a29('0x1a7')](_0x4fa49a)));}return _0x1d01ae;},'_getCorridorShape3':function(_0x31b6d6,_0x227d71){_0x227d71=_0x227d71||0x6;for(var _0x6c92c7=Math['PI']/_0x227d71,_0xe2cf2=0x2*_0x227d71,_0x18567c=new Array(_0xe2cf2),_0x2d1e1d=0x0;_0x2d1e1d<_0xe2cf2;_0x2d1e1d++){var _0x292596=_0x2d1e1d%0x2==0x0?_0x31b6d6:_0x31b6d6/0x3;_0x18567c[_0x2d1e1d]=new _0x30ec98['Cartesian2'](Math[a0_0x5a29('0x5cc')](_0x2d1e1d*_0x6c92c7)*_0x292596,Math[a0_0x5a29('0x1a7')](_0x2d1e1d*_0x6c92c7)*_0x292596);}return _0x18567c;},'getEditor':function(_0xf52f67,_0x1f8440,_0x4f1e82){return new _0x26db41(_0xf52f67,_0x1f8440,_0x4f1e82);},'setPositions':function(_0x26f441,_0x18ba58){_0x26f441['polylineVolume'][a0_0x5a29('0x4e0')]=_0x18ba58;},'getPositions':function(_0x22b519){return _0x22b519[a0_0x5a29('0x970')][a0_0x5a29('0x4e0')]['_value'];},'getCoordinates':function(_0x50e687){var _0x4f4b49=this['getPositions'](_0x50e687);return _0x2c464[a0_0x5a29('0x78')](_0x4f4b49);},'toGeoJSON':function(_0x45e219){var _0x381d3d=this['getCoordinates'](_0x45e219);return{'type':'Feature','properties':_0x45e219['attribute'],'geometry':{'type':'LineString','coordinates':_0x381d3d}};}},_0x5c5d6e=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x52ced5=function(){function _0x277de0(_0x1c8646,_0x4077ec,_0xaee392){_0x1ee296()(this,_0x277de0),this[a0_0x5a29('0x835')]=_0x1c8646,this[a0_0x5a29('0x66f')]=_0x4077ec,this['draggers']=[],this[a0_0x5a29('0xf0')]=[];var _0x1af653=this,_0x1ba9d3=0x0,_0x2ac3b4=_0x4077ec[a0_0x5a29('0x82a')][a0_0x5a29('0x329')][a0_0x5a29('0x30f')];for(_0x4077ec[a0_0x5a29('0x82a')][a0_0x5a29('0x329')][a0_0x5a29('0x52a')]=!0x1,_0x1ba9d3=0x0;_0x1ba9d3<_0x2ac3b4[a0_0x5a29('0x515')];_0x1ba9d3++){var _0x571bde=_0x2ac3b4[_0x1ba9d3];if(null!=_0x4077ec[a0_0x5a29('0x82a')][a0_0x5a29('0x6b7')]){var _0x5d710b=_0x5c5d6e[a0_0x5a29('0x7c9')]['fromCartesian'](_0x571bde);_0x5d710b[a0_0x5a29('0x6b7')]+=_0x4077ec['polygon'][a0_0x5a29('0x6b7')]['_value'],_0x571bde=_0x5c5d6e[a0_0x5a29('0x3bd')]['fromRadians'](_0x5d710b[a0_0x5a29('0x706')],_0x5d710b[a0_0x5a29('0x517')],_0x5d710b['height']);}(_0x54b925=_0x2c464[a0_0x5a29('0x22b')](this['viewer'],{'dragIcon':_0xaee392['dragIcon'],'position':_0x571bde,'onDrag':function(_0x42f693,_0x2e4093){_0x42f693['positions'][_0x42f693['index']]=_0x2e4093;for(var _0x4e9869=_0x4077ec[a0_0x5a29('0x82a')]['hierarchy'][a0_0x5a29('0x30f')],_0x48071c=_0x4e9869[0x0],_0x128f12=0x1;_0x128f12<_0x4e9869[a0_0x5a29('0x515')];_0x128f12++){var _0x3ffd9b=_0x5c5d6e['Cartographic'][a0_0x5a29('0x64c')](_0x48071c),_0x46149a=_0x5c5d6e[a0_0x5a29('0x7c9')]['fromCartesian'](_0x4e9869[_0x128f12]);Number(_0x46149a['height'])>Number(_0x3ffd9b['height'])&&(_0x48071c=_0x4e9869[_0x128f12]);}var _0x4dcc54=Number(_0x4077ec[a0_0x5a29('0x82a')]['extrudedHeight'])-Number(_0x5c5d6e[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x48071c)[a0_0x5a29('0x6b7')]);_0x4077ec[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]=Number(_0x4dcc54)[a0_0x5a29('0x292')](0x2),_0x1af653[a0_0x5a29('0x19b')](),_0x4077ec['changeEditing']();}}))[a0_0x5a29('0x26e')]=_0x1ba9d3,_0x54b925[a0_0x5a29('0x4e0')]=_0x2ac3b4,this[a0_0x5a29('0x7a5')][a0_0x5a29('0x3cd')](_0x54b925);}if(_0x4077ec[a0_0x5a29('0x82a')]['extrudedHeight'])for(_0x1ba9d3=0x0;_0x1ba9d3<_0x2ac3b4[a0_0x5a29('0x515')];_0x1ba9d3++){var _0xb24592=_0x2ac3b4[_0x1ba9d3],_0x2ec5f5=_0x5c5d6e[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0xb24592);_0x2ec5f5[a0_0x5a29('0x6b7')]=_0x4077ec[a0_0x5a29('0x82a')][a0_0x5a29('0x1b4')]['_value'];var _0x54b925,_0x5c7135=_0x5c5d6e[a0_0x5a29('0x3bd')][a0_0x5a29('0x38')](_0x2ec5f5[a0_0x5a29('0x706')],_0x2ec5f5[a0_0x5a29('0x517')],_0x2ec5f5['height']);(_0x54b925=_0x2c464['createDragger'](this[a0_0x5a29('0x835')],{'dragIcon':_0xaee392[a0_0x5a29('0x5e4')],'position':_0x5c7135,'onDrag':function(_0x231ab8,_0x27f0ed){for(var _0x4cb171=_0x1af653[a0_0x5a29('0x66f')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]['_value'],_0x3795de=_0x4cb171[0x0],_0x3c4641=0x1;_0x3c4641<_0x4cb171['length'];_0x3c4641++){var _0x3f5d02=_0x5c5d6e[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x3795de),_0x4f18d2=_0x5c5d6e[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x4cb171[_0x3c4641]);Number(_0x4f18d2[a0_0x5a29('0x6b7')])>Number(_0x3f5d02[a0_0x5a29('0x6b7')])&&(_0x3795de=_0x4cb171[_0x3c4641]);}var _0x5d811b=_0x5c5d6e[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x27f0ed);_0x4077ec[a0_0x5a29('0x82a')]['extrudedHeight']=new _0x5c5d6e[(a0_0x5a29('0x23c'))](Number(_0x5d811b[a0_0x5a29('0x6b7')]));var _0x562549=Number(_0x5d811b[a0_0x5a29('0x6b7')])-Number(_0x5c5d6e[a0_0x5a29('0x7c9')]['fromCartesian'](_0x3795de)[a0_0x5a29('0x6b7')]);_0x4077ec[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]=Number(_0x562549)['toFixed'](0x2),_0x1af653['updateDraggers'](),_0x4077ec[a0_0x5a29('0x1b6')]();},'vertical':!0x0,'horizontal':!0x1}))['index']=_0x1ba9d3,this[a0_0x5a29('0xf0')][a0_0x5a29('0x3cd')](_0x54b925);}}return _0x1fafe8()(_0x277de0,[{'key':a0_0x5a29('0x19b'),'value':function(){var _0x4a746a=this[a0_0x5a29('0x66f')][a0_0x5a29('0x82a')]['hierarchy'][a0_0x5a29('0x30f')],_0x23d29a=this[a0_0x5a29('0x66f')][a0_0x5a29('0x82a')][a0_0x5a29('0x1b4')][a0_0x5a29('0x30f')],_0x287b87=0x0;null!=this[a0_0x5a29('0x66f')]['polygon'][a0_0x5a29('0x6b7')]&&(_0x287b87=this[a0_0x5a29('0x66f')]['polygon'][a0_0x5a29('0x6b7')][a0_0x5a29('0x30f')]);for(var _0x4aa427=0x0;_0x4aa427<this[a0_0x5a29('0xf0')][a0_0x5a29('0x515')];_0x4aa427++){var _0x42dc80=_0x4a746a[_0x4aa427],_0x2a4833=this['heightDraggers'][_0x4aa427],_0x55e78a=_0x5c5d6e[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x42dc80);_0x55e78a[a0_0x5a29('0x6b7')]=_0x23d29a;var _0x5f3f33=_0x5c5d6e[a0_0x5a29('0x3bd')][a0_0x5a29('0x38')](_0x55e78a['longitude'],_0x55e78a[a0_0x5a29('0x517')],_0x55e78a['height']);_0x2a4833[a0_0x5a29('0x53c')]=_0x5f3f33;var _0x3647d1=this['draggers'][_0x4aa427],_0x11e160=_0x5c5d6e[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x42dc80);_0x11e160[a0_0x5a29('0x6b7')]+=_0x287b87,_0x5f3f33=_0x5c5d6e[a0_0x5a29('0x3bd')][a0_0x5a29('0x38')](_0x11e160[a0_0x5a29('0x706')],_0x11e160[a0_0x5a29('0x517')],_0x11e160[a0_0x5a29('0x6b7')]),_0x3647d1[a0_0x5a29('0x53c')]=_0x5f3f33;}}},{'key':a0_0x5a29('0x3d6'),'value':function(){var _0x210337=0x0;for(_0x210337=0x0;_0x210337<this[a0_0x5a29('0x7a5')]['length'];_0x210337++)this['viewer'][a0_0x5a29('0x8b4')]['remove'](this['draggers'][_0x210337]);for(this['draggers']=[],_0x210337=0x0;_0x210337<this['heightDraggers'][a0_0x5a29('0x515')];_0x210337++)this[a0_0x5a29('0x835')]['entities'][a0_0x5a29('0x157')](this['heightDraggers'][_0x210337]);this[a0_0x5a29('0xf0')]=[];}}]),_0x277de0;}(),_0x599b12=(DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],function(){function _0x55b7ce(_0x43e934,_0x549ff7,_0x32b599){_0x1ee296()(this,_0x55b7ce),this[a0_0x5a29('0x835')]=_0x43e934,this[a0_0x5a29('0x66f')]=_0x549ff7,this['draggers']=[];var _0xd5d714=_0x549ff7[a0_0x5a29('0x82a')][a0_0x5a29('0x329')][a0_0x5a29('0x30f')];_0x549ff7[a0_0x5a29('0x82a')]['hierarchy'][a0_0x5a29('0x52a')]=!0x1;for(var _0x31ea03=0x0;_0x31ea03<_0xd5d714[a0_0x5a29('0x515')];_0x31ea03++){var _0x3b930b=_0xd5d714[_0x31ea03],_0x3c8564=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':_0x32b599[a0_0x5a29('0x5e4')],'position':_0x3b930b,'heightReference':!_0x549ff7['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x4d')],'onDrag':function(_0x1b0572,_0x4a1ed5){_0x1b0572[a0_0x5a29('0x4e0')][_0x1b0572[a0_0x5a29('0x26e')]]=_0x4a1ed5,_0x549ff7['changeEditing']();}});_0x3c8564[a0_0x5a29('0x26e')]=_0x31ea03,_0x3c8564[a0_0x5a29('0x4e0')]=_0xd5d714,this[a0_0x5a29('0x7a5')][a0_0x5a29('0x3cd')](_0x3c8564);}}return _0x1fafe8()(_0x55b7ce,[{'key':a0_0x5a29('0x19b'),'value':function(){for(var _0x2e42f9=this[a0_0x5a29('0x66f')][a0_0x5a29('0x82a')][a0_0x5a29('0x329')]['_value'],_0x339546=0x0;_0x339546<this[a0_0x5a29('0x7a5')][a0_0x5a29('0x515')];_0x339546++){var _0x40abe9=_0x2e42f9[_0x339546];this['draggers'][_0x339546]['position']=_0x40abe9;}}},{'key':a0_0x5a29('0x3d6'),'value':function(){this[a0_0x5a29('0x66f')]['polygon']['hierarchy']['isConstant']=!0x0;for(var _0x1f7701=0x0;_0x1f7701<this['draggers'][a0_0x5a29('0x515')];_0x1f7701++)this['viewer'][a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this[a0_0x5a29('0x7a5')][_0x1f7701]);this[a0_0x5a29('0x7a5')]=[];}}]),_0x55b7ce;}()),_0x2450d9=DC[a0_0x5a29('0x239')]['Cesium'],_0x4fcc19={'typename':a0_0x5a29('0x82a'),'startDraw':function(_0x3889f1,_0x195f5e){var _0x55bc8e=this[a0_0x5a29('0x60c')](_0x195f5e);return _0x3889f1[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'polygon':_0x55bc8e,'attribute':_0x195f5e});},'attribute2Entity':function(_0x553588,_0x31de0e){for(var _0x7f802c in(null==_0x31de0e&&(_0x31de0e={'show':!0x0,'fill':!0x0,'hierarchy':new _0x4c5312([],'polygon')}),_0x553588[a0_0x5a29('0x46a')])){var _0x4bcfd9=_0x553588[a0_0x5a29('0x46a')][_0x7f802c];switch(_0x7f802c){default:_0x31de0e[_0x7f802c]=_0x4bcfd9;break;case a0_0x5a29('0x538'):case a0_0x5a29('0x39b'):break;case'outlineColor':_0x31de0e[a0_0x5a29('0x429')]=new _0x2450d9['Color'][(a0_0x5a29('0x5d'))](_0x4bcfd9||'#FFFF00')[a0_0x5a29('0x3eb')](_0x553588[a0_0x5a29('0x46a')]['outlineOpacity']||_0x553588[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1);break;case a0_0x5a29('0x6ed'):_0x31de0e[a0_0x5a29('0xdd')]=new _0x2450d9[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x4bcfd9||'#FFFF00')[a0_0x5a29('0x3eb')](Number(_0x553588['style'][a0_0x5a29('0x538')]||0x1));break;case a0_0x5a29('0x1b4'):var _0x1724a3=_0x2c464['getMaxHeightForPositions'](_0x31de0e[a0_0x5a29('0x329')][a0_0x5a29('0x30f')]);_0x31de0e[a0_0x5a29('0x1b4')]=Number(_0x4bcfd9)+_0x1724a3;}}return null==_0x553588['style']['color']&&(_0x31de0e[a0_0x5a29('0xdd')]=_0x2450d9[a0_0x5a29('0x82')]['fromRandom']({'minimumGreen':0.75,'maximumBlue':0.75,'alpha':Number(_0x553588['style'][a0_0x5a29('0x538')]||0x1)})),_0x31de0e;},'getEditor':function(_0x894d9c,_0x1d0740,_0x14bc21){return _0x1d0740[a0_0x5a29('0x82a')][a0_0x5a29('0x1b4')]?new _0x52ced5(_0x894d9c,_0x1d0740,_0x14bc21):new _0x599b12(_0x894d9c,_0x1d0740,_0x14bc21);},'setPositions':function(_0x503964,_0x4626f5){if(_0x503964[a0_0x5a29('0x82a')][a0_0x5a29('0x329')]=new _0x4c5312(_0x4626f5),_0x503964['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]){var _0x32302e=_0x2c464[a0_0x5a29('0x29b')](_0x4626f5);_0x503964['polygon'][a0_0x5a29('0x1b4')]=_0x32302e+Number(_0x503964['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]);}},'getPositions':function(_0x36075f){return _0x36075f[a0_0x5a29('0x82a')][a0_0x5a29('0x329')][a0_0x5a29('0x30f')];},'getCoordinates':function(_0x45f138){var _0x3a547c=this['getPositions'](_0x45f138);return _0x2c464['getCoordinates'](_0x3a547c);},'toGeoJSON':function(_0x44cd41){var _0x2bc984=this[a0_0x5a29('0x78')](_0x44cd41),_0x2e518c=_0x2bc984[0x0],_0x21e6ea=_0x2bc984[_0x2bc984['length']-0x1];return _0x2e518c[0x0]==_0x21e6ea[0x0]&&_0x2e518c[0x1]==_0x21e6ea[0x1]&&_0x2e518c[0x2]==_0x21e6ea[0x2]||_0x2bc984[a0_0x5a29('0x3cd')](_0x2e518c),{'type':a0_0x5a29('0x3af'),'properties':_0x44cd41['attribute'],'geometry':{'type':a0_0x5a29('0x395'),'coordinates':[_0x2bc984]}};}},_0xa08a69=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x542ff9=function(){function _0x57456c(_0xbdccee,_0x2969ec,_0x48923a){_0x1ee296()(this,_0x57456c),this['viewer']=_0xbdccee,this[a0_0x5a29('0x66f')]=_0x2969ec,this['draggers']=[],this['heightDraggers']=[];var _0x3bcafe=this,_0x33a0fd=0x0,_0x34b276=_0x2969ec[a0_0x5a29('0x104')][a0_0x5a29('0x4e0')][a0_0x5a29('0x30f')];for(_0x2969ec['wall'][a0_0x5a29('0x4e0')][a0_0x5a29('0x52a')]=!0x1,_0x33a0fd=0x0;_0x33a0fd<_0x34b276['length'];_0x33a0fd++){var _0x279a7d=_0x34b276[_0x33a0fd];(_0x54cbde=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':_0x48923a[a0_0x5a29('0x5e4')],'position':_0x279a7d,'onDrag':function(_0xb32cf6,_0x3ccece){_0xb32cf6[a0_0x5a29('0x4e0')][_0xb32cf6['index']]=_0x3ccece,_0x3bcafe[a0_0x5a29('0x19b')](),_0x2969ec[a0_0x5a29('0x1b6')]();}}))[a0_0x5a29('0x26e')]=_0x33a0fd,_0x54cbde[a0_0x5a29('0x4e0')]=_0x34b276,this[a0_0x5a29('0x7a5')][a0_0x5a29('0x3cd')](_0x54cbde);}if(_0x2969ec[a0_0x5a29('0x104')][a0_0x5a29('0x793')])for(_0x33a0fd=0x0;_0x33a0fd<_0x34b276[a0_0x5a29('0x515')];_0x33a0fd++){var _0x132c16=_0x34b276[_0x33a0fd],_0x3f567f=_0xa08a69[a0_0x5a29('0x7c9')]['fromCartesian'](_0x132c16[a0_0x5a29('0x218')]());_0x3f567f[a0_0x5a29('0x6b7')]=_0x2969ec[a0_0x5a29('0x104')][a0_0x5a29('0x793')][a0_0x5a29('0x30f')][_0x33a0fd];var _0x54cbde;_0x279a7d=_0xa08a69[a0_0x5a29('0x3bd')][a0_0x5a29('0x38')](_0x3f567f[a0_0x5a29('0x706')],_0x3f567f[a0_0x5a29('0x517')],_0x3f567f[a0_0x5a29('0x6b7')]),((_0x54cbde=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':_0x48923a['dragIcon'],'position':_0x279a7d,'onDrag':function(_0x368462,_0x36b521){var _0x5b4027=_0xa08a69['Cartographic']['fromCartesian'](_0x36b521),_0x27bc63=_0x3bcafe['entity']['wall'][a0_0x5a29('0x599')][a0_0x5a29('0x30f')],_0x7f121d=Number(_0x5b4027[a0_0x5a29('0x6b7')])-Number(_0x27bc63[_0x368462[a0_0x5a29('0x26e')]]);_0x2969ec['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]=_0x7f121d[a0_0x5a29('0x292')](0x2),_0x3bcafe[a0_0x5a29('0x19b')](),_0x2969ec[a0_0x5a29('0x1b6')]();},'vertical':!0x0,'horizontal':!0x1}))[a0_0x5a29('0x26e')]=_0x33a0fd,this[a0_0x5a29('0xf0')][a0_0x5a29('0x3cd')](_0x54cbde));}}return _0x1fafe8()(_0x57456c,[{'key':a0_0x5a29('0x19b'),'value':function(){for(var _0x115053=this[a0_0x5a29('0x66f')]['wall']['positions'][a0_0x5a29('0x30f')],_0x5ba57c=this[a0_0x5a29('0x66f')][a0_0x5a29('0x104')][a0_0x5a29('0x599')][a0_0x5a29('0x30f')],_0x27c2c4=this[a0_0x5a29('0x66f')][a0_0x5a29('0x104')][a0_0x5a29('0x793')]['_value'],_0x5bfe48=0x0;_0x5bfe48<this[a0_0x5a29('0xf0')]['length'];_0x5bfe48++){var _0x2af7e0=_0x115053[_0x5bfe48]['clone'](),_0xd18fd3=this[a0_0x5a29('0xf0')][_0x5bfe48],_0x49c8d7=_0xa08a69['Cartographic'][a0_0x5a29('0x64c')](_0x2af7e0);_0x5ba57c[_0x5bfe48]=_0x49c8d7[a0_0x5a29('0x6b7')],_0x27c2c4[_0x5bfe48]=Number(_0x49c8d7[a0_0x5a29('0x6b7')])+Number(this[a0_0x5a29('0x66f')][a0_0x5a29('0x151')]['style'][a0_0x5a29('0x1b4')]),_0xd18fd3[a0_0x5a29('0x53c')]=mars3d[a0_0x5a29('0x32b')]['utils'][a0_0x5a29('0x341')](_0x2af7e0,this[a0_0x5a29('0x66f')][a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]),this['draggers'][_0x5bfe48][a0_0x5a29('0x53c')]=_0x2af7e0;}}},{'key':a0_0x5a29('0x3d6'),'value':function(){var _0x4932d1=0x0;for(_0x4932d1=0x0;_0x4932d1<this[a0_0x5a29('0x7a5')]['length'];_0x4932d1++)this[a0_0x5a29('0x835')][a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this[a0_0x5a29('0x7a5')][_0x4932d1]);for(this['draggers']=[],_0x4932d1=0x0;_0x4932d1<this['heightDraggers'][a0_0x5a29('0x515')];_0x4932d1++)this[a0_0x5a29('0x835')][a0_0x5a29('0x8b4')]['remove'](this[a0_0x5a29('0xf0')][_0x4932d1]);this[a0_0x5a29('0xf0')]=[];}}]),_0x57456c;}(),_0x15231f=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4aaf3d={'typename':a0_0x5a29('0x104'),'startDraw':function(_0x1305dd,_0x147576){var _0x3a491a=this[a0_0x5a29('0x60c')](_0x147576);return _0x1305dd[a0_0x5a29('0x8b4')]['add']({'wall':_0x3a491a,'attribute':_0x147576});},'attribute2Entity':function(_0x4094a6,_0x5b2210){for(var _0x533c53 in(_0x5b2210||(_0x5b2210={'show':!0x0,'fill':!0x0,'minimumHeights':[],'maximumHeights':[],'positions':new _0x4c5312([])}),_0x4094a6[a0_0x5a29('0x46a')])){var _0x35e492=_0x4094a6['style'][_0x533c53];switch(_0x533c53){default:_0x5b2210[_0x533c53]=_0x35e492;break;case a0_0x5a29('0x538'):case a0_0x5a29('0x39b'):break;case a0_0x5a29('0x429'):_0x5b2210[a0_0x5a29('0x429')]=new _0x15231f[(a0_0x5a29('0x82'))]['fromCssColorString'](_0x35e492||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](_0x4094a6[a0_0x5a29('0x46a')][a0_0x5a29('0x39b')]||_0x4094a6[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1);break;case a0_0x5a29('0x6ed'):_0x5b2210[a0_0x5a29('0xdd')]=new _0x15231f['Color'][(a0_0x5a29('0x5d'))](_0x35e492||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](Number(_0x4094a6[a0_0x5a29('0x46a')]['opacity']||0x1));}}return null==_0x5b2210[a0_0x5a29('0xdd')]&&(_0x5b2210[a0_0x5a29('0xdd')]=_0x15231f[a0_0x5a29('0x82')][a0_0x5a29('0x6f2')]({'minimumGreen':0.75,'maximumBlue':0.75,'alpha':Number(_0x4094a6[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1)})),_0x5b2210;},'getEditor':function(_0x6c984f,_0x42c837,_0x42aabe){return new _0x542ff9(_0x6c984f,_0x42c837,_0x42aabe);},'setPositions':function(_0x4842e7,_0x5cbbb4){if(_0x4842e7[a0_0x5a29('0x104')][a0_0x5a29('0x4e0')]=new _0x4c5312(_0x5cbbb4),_0x4842e7[a0_0x5a29('0x104')][a0_0x5a29('0x793')]&&_0x4842e7['wall']['minimumHeights'])for(var _0x9a303d=0x0;_0x9a303d<_0x5cbbb4[a0_0x5a29('0x515')];_0x9a303d++){var _0x573c3c=_0x15231f[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x5cbbb4[_0x9a303d]);_0x4842e7[a0_0x5a29('0x104')][a0_0x5a29('0x599')][a0_0x5a29('0x30f')][_0x9a303d]=Number(_0x573c3c[a0_0x5a29('0x6b7')]),_0x4842e7['wall'][a0_0x5a29('0x793')]['_value'][_0x9a303d]=Number(_0x573c3c['height'])+Number(_0x4842e7[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]);}},'getPositions':function(_0x4060ca){return _0x4060ca[a0_0x5a29('0x104')][a0_0x5a29('0x4e0')][a0_0x5a29('0x30f')];},'setMaximumHeights':function(_0x430c36,_0x3d5f6a){_0x430c36['wall']['maximumHeights']=new _0x4c5312(_0x3d5f6a);},'getMaximumHeights':function(_0x9ac5c5){return _0x9ac5c5['wall']['maximumHeights'][a0_0x5a29('0x30f')];},'setMinimumHeights':function(_0x3b35dd,_0x3be580){_0x3b35dd['wall'][a0_0x5a29('0x599')]=new _0x4c5312(_0x3be580);},'getMinimumHeights':function(_0x39a41c){return _0x39a41c[a0_0x5a29('0x104')]['minimumHeights'][a0_0x5a29('0x30f')];},'getCoordinates':function(_0x34fa7d){var _0x9025e3=this['getPositions'](_0x34fa7d);return _0x2c464[a0_0x5a29('0x78')](_0x9025e3);},'toGeoJSON':function(_0x5867c0){var _0x2555a6=this[a0_0x5a29('0x78')](_0x5867c0);return{'type':a0_0x5a29('0x3af'),'properties':_0x5867c0[a0_0x5a29('0x151')],'geometry':{'type':a0_0x5a29('0x2ee'),'coordinates':_0x2555a6}};}},_0x31aecc=DC[a0_0x5a29('0x239')]['Cesium'],_0x5e929c={'typename':a0_0x5a29('0x262'),'startDraw':function(_0x2c4890,_0x3b3ca5){var _0x3dab43=this['attribute2Entity'](_0x3b3ca5);return _0x2c4890['entities'][a0_0x5a29('0x695')]({'point':_0x3dab43,'attribute':_0x3b3ca5});},'attribute2Entity':function(_0x2b5c0b,_0x536ca7){for(var _0x14d606 in(null==_0x536ca7&&(_0x536ca7={'show':!0x0}),_0x2b5c0b[a0_0x5a29('0x46a')])){var _0x265a62=_0x2b5c0b[a0_0x5a29('0x46a')][_0x14d606];switch(_0x14d606){default:_0x536ca7[_0x14d606]=_0x265a62;break;case'opacity':case a0_0x5a29('0x39b'):break;case'outlineColor':_0x536ca7[a0_0x5a29('0x429')]=new _0x31aecc['Color'][(a0_0x5a29('0x5d'))](_0x265a62||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](_0x2b5c0b['style']['outlineOpacity']||_0x2b5c0b[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1);break;case a0_0x5a29('0x6ed'):_0x536ca7[a0_0x5a29('0x6ed')]=new _0x31aecc[(a0_0x5a29('0x82'))]['fromCssColorString'](_0x265a62||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](Number(_0x2b5c0b[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1));}}return _0x2b5c0b[a0_0x5a29('0x46a')][a0_0x5a29('0x7db')]||(_0x536ca7[a0_0x5a29('0x1f6')]=0x0),_0x536ca7;},'getEditor':function(_0x475875,_0x242fb7,_0x43e94a){return new _0x3a2672(_0x475875,_0x242fb7,_0x43e94a);},'setPositions':function(_0x57ca07,_0x2dd7f3){_0x57ca07[a0_0x5a29('0x53c')]=new _0x4c5312(_0x2dd7f3);},'getPositions':function(_0x1e71a6){return[_0x1e71a6[a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]];},'getCoordinates':function(_0x34bb05){var _0x558de1=this[a0_0x5a29('0xb2')](_0x34bb05);return _0x2c464[a0_0x5a29('0x78')](_0x558de1);},'toGeoJSON':function(_0x56dcf0){var _0x12f75b=this[a0_0x5a29('0x78')](_0x56dcf0);return{'type':a0_0x5a29('0x3af'),'properties':_0x56dcf0[a0_0x5a29('0x151')],'geometry':{'type':'Point','coordinates':_0x12f75b}};}},_0x36fb2b=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x1622df=function(){function _0x49a142(_0x528aad,_0x3c1db8,_0x2123ff){_0x1ee296()(this,_0x49a142),this[a0_0x5a29('0x835')]=_0x528aad,this[a0_0x5a29('0x66f')]=_0x3c1db8,this[a0_0x5a29('0x7a5')]=[],this['heightDraggers']=[];var _0x33b4fa=this,_0x585c61=0x0,_0x55e30b=this['getDraggersPositions']();for(_0x3c1db8[a0_0x5a29('0x4b0')]['coordinates']['isConstant']=!0x1,_0x585c61=0x0;_0x585c61<_0x55e30b[a0_0x5a29('0x515')];_0x585c61++){var _0x11d9ad=_0x55e30b[_0x585c61];if(null!=_0x3c1db8[a0_0x5a29('0x4b0')][a0_0x5a29('0x6b7')])(_0x1e9103=_0x36fb2b['Cartographic'][a0_0x5a29('0x64c')](_0x11d9ad))[a0_0x5a29('0x6b7')]+=_0x3c1db8[a0_0x5a29('0x4b0')][a0_0x5a29('0x6b7')][a0_0x5a29('0x30f')],_0x11d9ad=_0x36fb2b[a0_0x5a29('0x3bd')]['fromRadians'](_0x1e9103['longitude'],_0x1e9103['latitude'],_0x1e9103[a0_0x5a29('0x6b7')]);(_0x3cab26=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':_0x2123ff[a0_0x5a29('0x5e4')],'position':_0x11d9ad,'onDrag':function(_0x1f9f8e,_0x11d19f){var _0x9b887b;_0x1f9f8e[a0_0x5a29('0x4e0')][_0x1f9f8e[a0_0x5a29('0x26e')]]=_0x11d19f,_0x9b887b=0x0==_0x1f9f8e['index']?_0x36fb2b[a0_0x5a29('0x279')][a0_0x5a29('0x79f')]([_0x11d19f,_0x1f9f8e['positions'][0x1]]):_0x36fb2b['Rectangle'][a0_0x5a29('0x79f')]([_0x11d19f,_0x1f9f8e[a0_0x5a29('0x4e0')][0x0]]),_0x3c1db8[a0_0x5a29('0x4b0')][a0_0x5a29('0x98')]['setValue'](_0x9b887b),_0x33b4fa[a0_0x5a29('0x19b')](),_0x3c1db8[a0_0x5a29('0x1b6')]();}}))[a0_0x5a29('0x26e')]=_0x585c61,_0x3cab26[a0_0x5a29('0x4e0')]=_0x55e30b,this[a0_0x5a29('0x7a5')]['push'](_0x3cab26);}if(_0x3c1db8[a0_0x5a29('0x4b0')][a0_0x5a29('0x1b4')])for(_0x585c61=0x0;_0x585c61<_0x55e30b['length'];_0x585c61++){var _0x1e9103,_0x35cabd=_0x55e30b[_0x585c61];(_0x1e9103=_0x36fb2b[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x35cabd))[a0_0x5a29('0x6b7')]+=_0x3c1db8[a0_0x5a29('0x4b0')][a0_0x5a29('0x1b4')][a0_0x5a29('0x30f')];var _0x3cab26;_0x11d9ad=_0x36fb2b[a0_0x5a29('0x3bd')][a0_0x5a29('0x38')](_0x1e9103[a0_0x5a29('0x706')],_0x1e9103[a0_0x5a29('0x517')],_0x1e9103['height']),((_0x3cab26=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':_0x2123ff['dragIcon'],'position':_0x11d9ad,'onDrag':function(_0x3ff519,_0x3da7dd){var _0x2c685a=_0x36fb2b[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x3da7dd);_0x3c1db8['rectangle'][a0_0x5a29('0x1b4')]=new _0x36fb2b[(a0_0x5a29('0x23c'))](_0x2c685a[a0_0x5a29('0x6b7')]);var _0x44e5f6=Number(_0x2c685a[a0_0x5a29('0x6b7')])-Number(_0x3c1db8[a0_0x5a29('0x4b0')]['height']);_0x3c1db8['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]=Number(_0x44e5f6)['toFixed'](0x2),_0x33b4fa[a0_0x5a29('0x19b')](),_0x3c1db8[a0_0x5a29('0x1b6')]();},'vertical':!0x0,'horizontal':!0x1}))[a0_0x5a29('0x26e')]=_0x585c61,this[a0_0x5a29('0xf0')][a0_0x5a29('0x3cd')](_0x3cab26));}}return _0x1fafe8()(_0x49a142,[{'key':a0_0x5a29('0xb7'),'value':function(){var _0x41c270=this[a0_0x5a29('0x66f')]['rectangle'][a0_0x5a29('0x98')]['_value'],_0x414d14=_0x36fb2b[a0_0x5a29('0x279')][a0_0x5a29('0x34')](_0x41c270),_0x5af699=_0x36fb2b['Rectangle']['southeast'](_0x41c270);return _0x36fb2b[a0_0x5a29('0x3bd')][a0_0x5a29('0x2ce')]([_0x414d14[a0_0x5a29('0x706')],_0x414d14[a0_0x5a29('0x517')],_0x5af699[a0_0x5a29('0x706')],_0x5af699[a0_0x5a29('0x517')]]);}},{'key':a0_0x5a29('0x19b'),'value':function(){var _0x2f1999=this['getDraggersPositions'](),_0x42c1f3=this[a0_0x5a29('0x66f')]['rectangle'][a0_0x5a29('0x1b4')]['_value'],_0x4e6705=0x0;null!=this[a0_0x5a29('0x66f')][a0_0x5a29('0x4b0')][a0_0x5a29('0x6b7')]&&(_0x4e6705=this[a0_0x5a29('0x66f')][a0_0x5a29('0x4b0')][a0_0x5a29('0x6b7')][a0_0x5a29('0x30f')]);for(var _0x48a9ae=0x0;_0x48a9ae<this[a0_0x5a29('0xf0')]['length'];_0x48a9ae++){var _0x873d61=_0x2f1999[_0x48a9ae],_0x4883d0=this[a0_0x5a29('0xf0')][_0x48a9ae],_0x417aa7=_0x36fb2b[a0_0x5a29('0x7c9')]['fromCartesian'](_0x873d61);_0x417aa7[a0_0x5a29('0x6b7')]+=_0x42c1f3;var _0x5cceb0=_0x36fb2b['Cartesian3']['fromRadians'](_0x417aa7['longitude'],_0x417aa7[a0_0x5a29('0x517')],_0x417aa7[a0_0x5a29('0x6b7')]);_0x4883d0[a0_0x5a29('0x53c')]=_0x5cceb0;var _0x40fe9f=this[a0_0x5a29('0x7a5')][_0x48a9ae],_0x5f422d=_0x36fb2b['Cartographic']['fromCartesian'](_0x873d61);_0x5f422d['height']+=_0x4e6705,_0x5cceb0=_0x36fb2b['Cartesian3'][a0_0x5a29('0x38')](_0x5f422d[a0_0x5a29('0x706')],_0x5f422d[a0_0x5a29('0x517')],_0x5f422d['height']),_0x40fe9f[a0_0x5a29('0x53c')]=_0x5cceb0;}}},{'key':a0_0x5a29('0x3d6'),'value':function(){var _0x4e0233=0x0;for(_0x4e0233=0x0;_0x4e0233<this[a0_0x5a29('0x7a5')][a0_0x5a29('0x515')];_0x4e0233++)this[a0_0x5a29('0x835')]['entities']['remove'](this[a0_0x5a29('0x7a5')][_0x4e0233]);for(this['draggers']=[],_0x4e0233=0x0;_0x4e0233<this[a0_0x5a29('0xf0')]['length'];_0x4e0233++)this['viewer'][a0_0x5a29('0x8b4')]['remove'](this[a0_0x5a29('0xf0')][_0x4e0233]);this[a0_0x5a29('0xf0')]=[];}}]),_0x49a142;}(),_0x8b4558=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x3a9906=function(){function _0x3f635e(_0x20788a,_0x490c36,_0x1e805a){_0x1ee296()(this,_0x3f635e),this[a0_0x5a29('0x835')]=_0x20788a,this[a0_0x5a29('0x66f')]=_0x490c36,this[a0_0x5a29('0x7a5')]=[];var _0x79a11f=this['getDraggersPositions']();_0x490c36[a0_0x5a29('0x4b0')]['coordinates'][a0_0x5a29('0x52a')]=!0x1;for(var _0x4cdaae=0x0;_0x4cdaae<_0x79a11f['length'];_0x4cdaae++){var _0x24ee8c=_0x79a11f[_0x4cdaae],_0x1266d9=_0x2c464[a0_0x5a29('0x22b')](this[a0_0x5a29('0x835')],{'dragIcon':_0x1e805a[a0_0x5a29('0x5e4')],'position':_0x24ee8c,'heightReference':!_0x490c36['attribute'][a0_0x5a29('0x46a')]['perPositionHeight'],'onDrag':function(_0xcfb90,_0x325af3){var _0x1c830a;_0xcfb90[a0_0x5a29('0x4e0')][_0xcfb90[a0_0x5a29('0x26e')]]=_0x325af3,_0x1c830a=0x0==_0xcfb90[a0_0x5a29('0x26e')]?_0x8b4558[a0_0x5a29('0x279')]['fromCartesianArray']([_0x325af3,_0xcfb90['positions'][0x1]]):_0x8b4558[a0_0x5a29('0x279')]['fromCartesianArray']([_0x325af3,_0xcfb90[a0_0x5a29('0x4e0')][0x0]]),_0x490c36['rectangle'][a0_0x5a29('0x98')][a0_0x5a29('0x850')](_0x1c830a),_0x490c36[a0_0x5a29('0x1b6')]();}});_0x1266d9['index']=_0x4cdaae,_0x1266d9['positions']=_0x79a11f,this[a0_0x5a29('0x7a5')][a0_0x5a29('0x3cd')](_0x1266d9);}}return _0x1fafe8()(_0x3f635e,[{'key':a0_0x5a29('0x19b'),'value':function(){for(var _0x5781b7=this[a0_0x5a29('0xb7')](),_0x531ee5=0x0;_0x531ee5<this['draggers'][a0_0x5a29('0x515')];_0x531ee5++){var _0x1deae5=_0x5781b7[_0x531ee5];this[a0_0x5a29('0x7a5')][_0x531ee5][a0_0x5a29('0x53c')]=_0x1deae5;}}},{'key':a0_0x5a29('0xb7'),'value':function(){var _0x25d072=this[a0_0x5a29('0x66f')][a0_0x5a29('0x4b0')][a0_0x5a29('0x98')]['_value'],_0x2917f6=_0x8b4558[a0_0x5a29('0x279')][a0_0x5a29('0x34')](_0x25d072),_0x248109=_0x8b4558[a0_0x5a29('0x279')]['southeast'](_0x25d072);return _0x8b4558[a0_0x5a29('0x3bd')][a0_0x5a29('0x2ce')]([_0x2917f6[a0_0x5a29('0x706')],_0x2917f6[a0_0x5a29('0x517')],_0x248109[a0_0x5a29('0x706')],_0x248109[a0_0x5a29('0x517')]]);}},{'key':a0_0x5a29('0x3d6'),'value':function(){this[a0_0x5a29('0x66f')][a0_0x5a29('0x4b0')][a0_0x5a29('0x98')][a0_0x5a29('0x52a')]=!0x0;for(var _0x3afc15=0x0;_0x3afc15<this['draggers']['length'];_0x3afc15++)this[a0_0x5a29('0x835')][a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this[a0_0x5a29('0x7a5')][_0x3afc15]);this[a0_0x5a29('0x7a5')]=[];}}]),_0x3f635e;}(),_0xced45f=DC[a0_0x5a29('0x239')]['Cesium'],_0x2393ee={'typename':a0_0x5a29('0x4b0'),'startDraw':function(_0x16c7c6,_0x5212a9){var _0x122434=this[a0_0x5a29('0x60c')](_0x5212a9);return _0x16c7c6[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'rectangle':_0x122434,'attribute':_0x5212a9});},'attribute2Entity':function(_0x336d2d,_0x38bf3c){_0x38bf3c||(_0x38bf3c={'show':!0x0,'fill':!0x0,'closeTop':!0x0,'closeBottom':!0x0,'coordinates':_0xced45f[a0_0x5a29('0x279')]['fromDegrees'](78.654473,34.878143,78.654673,34.878316)});for(var _0x1aabb2 in _0x336d2d[a0_0x5a29('0x46a')]){var _0x1e0b20=_0x336d2d['style'][_0x1aabb2];switch(_0x1aabb2){default:_0x38bf3c[_0x1aabb2]=_0x1e0b20;break;case a0_0x5a29('0x538'):case a0_0x5a29('0x39b'):break;case a0_0x5a29('0x429'):_0x38bf3c['outlineColor']=new _0xced45f['Color'][(a0_0x5a29('0x5d'))](_0x1e0b20||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](_0x336d2d[a0_0x5a29('0x46a')][a0_0x5a29('0x39b')]||_0x336d2d[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1);break;case a0_0x5a29('0x6b7'):_0x38bf3c[a0_0x5a29('0x6b7')]=Number(_0x1e0b20),_0x38bf3c[a0_0x5a29('0x1b4')]=Number(_0x336d2d[a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')])+Number(_0x1e0b20);break;case a0_0x5a29('0x1b4'):_0x38bf3c[a0_0x5a29('0x1b4')]=Number(_0x38bf3c[a0_0x5a29('0x6b7')])+Number(_0x1e0b20);break;case'color':_0x38bf3c[a0_0x5a29('0xdd')]=new _0xced45f[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x1e0b20||a0_0x5a29('0x1df'))[a0_0x5a29('0x3eb')](Number(_0x336d2d[a0_0x5a29('0x46a')]['opacity']||0x1));break;case a0_0x5a29('0xfa'):_0x38bf3c[a0_0x5a29('0xdd')]=_0x336d2d[a0_0x5a29('0x46a')][a0_0x5a29('0xfa')];break;case a0_0x5a29('0xa4'):_0x38bf3c[a0_0x5a29('0xa4')]=_0xced45f[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x1e0b20),_0x336d2d[a0_0x5a29('0x46a')][a0_0x5a29('0x240')]||(_0x38bf3c[a0_0x5a29('0x240')]=_0xced45f[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x1e0b20));break;case'stRotation':_0x38bf3c[a0_0x5a29('0x240')]=_0xced45f[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x1e0b20);}}return null==_0x38bf3c[a0_0x5a29('0xdd')]&&(_0x38bf3c[a0_0x5a29('0xdd')]=_0xced45f['Color'][a0_0x5a29('0x6f2')]({'minimumGreen':0.75,'maximumBlue':0.75,'alpha':Number(_0x336d2d[a0_0x5a29('0x46a')][a0_0x5a29('0x538')]||0x1)})),_0x38bf3c;},'getEditor':function(_0x3c8bb2,_0x4f612e,_0x512533){return _0x4f612e[a0_0x5a29('0x4b0')]['extrudedHeight']?new _0x1622df(_0x3c8bb2,_0x4f612e,_0x512533):new _0x3a9906(_0x3c8bb2,_0x4f612e,_0x512533);},'setPositions':function(_0x3a8a61,_0x328664){_0x328664 instanceof Array&&(_0x328664=_0xced45f[a0_0x5a29('0x279')][a0_0x5a29('0x79f')](_0x328664)),_0x3a8a61[a0_0x5a29('0x4b0')]['coordinates'][a0_0x5a29('0x850')](_0x328664);},'getPositions':function(_0x3c216b){return _0x3c216b[a0_0x5a29('0x4b0')]['coordinates'];},'getCoordinates':function(_0x51b21d){var _0x547820=this[a0_0x5a29('0x65e')](_0x51b21d);return _0x2c464['getCoordinates'](_0x547820);},'getDiagonalPositions':function(_0xb73bd3){var _0x223bdb=_0xb73bd3[a0_0x5a29('0x4b0')]['coordinates'][a0_0x5a29('0x30f')],_0x21642e=_0xced45f[a0_0x5a29('0x279')][a0_0x5a29('0x34')](_0x223bdb),_0x1eb513=_0xced45f[a0_0x5a29('0x279')][a0_0x5a29('0x3a4')](_0x223bdb);return _0xced45f['Cartesian3']['fromRadiansArray']([_0x21642e[a0_0x5a29('0x706')],_0x21642e[a0_0x5a29('0x517')],_0x1eb513[a0_0x5a29('0x706')],_0x1eb513[a0_0x5a29('0x517')]]);},'toGeoJSON':function(_0x350d70){var _0x396b1e=this['getCoordinates'](_0x350d70);return{'type':a0_0x5a29('0x3af'),'properties':_0x350d70['attribute'],'geometry':{'type':a0_0x5a29('0x95'),'coordinates':_0x396b1e}};}},_0x4cdf48=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x28b900={'typename':a0_0x5a29('0x193'),'startDraw':function(_0x39a5eb,_0x5da26c){var _0x49400d=this[a0_0x5a29('0x60c')](_0x5da26c);return _0x39a5eb[a0_0x5a29('0x8b4')]['add']({'model':_0x49400d,'attribute':_0x5da26c});},'attribute2Entity':function(_0x3694b1,_0x1f2e56){for(var _0x5a8433 in(null==_0x1f2e56&&(_0x1f2e56={'show':!0x0}),_0x3694b1[a0_0x5a29('0x46a')])){var _0x3d6635=_0x3694b1[a0_0x5a29('0x46a')][_0x5a8433];switch(_0x5a8433){default:_0x1f2e56[_0x5a8433]=_0x3d6635;break;case a0_0x5a29('0x953'):case a0_0x5a29('0x172'):case a0_0x5a29('0x643'):case a0_0x5a29('0x885'):case a0_0x5a29('0x10b'):case'color':case'opacity':break;case'modelUrl':_0x1f2e56[a0_0x5a29('0x4c2')]=_0x3d6635;}}return _0x3694b1[a0_0x5a29('0x46a')][a0_0x5a29('0x953')]?(_0x1f2e56[a0_0x5a29('0x172')]=new _0x4cdf48[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x3694b1['style'][a0_0x5a29('0x172')]||a0_0x5a29('0x40d'))[a0_0x5a29('0x3eb')](Number(_0x3694b1[a0_0x5a29('0x46a')][a0_0x5a29('0x643')]||0x1)),_0x1f2e56[a0_0x5a29('0x885')]=Number(_0x3694b1['style']['silhouetteSize']||0x1)):_0x1f2e56[a0_0x5a29('0x885')]=0x0,_0x3694b1[a0_0x5a29('0x46a')][a0_0x5a29('0x10b')]?_0x1f2e56[a0_0x5a29('0x6ed')]=new _0x4cdf48[(a0_0x5a29('0x82'))][(a0_0x5a29('0x5d'))](_0x3694b1[a0_0x5a29('0x46a')]['color']||a0_0x5a29('0x40d'))[a0_0x5a29('0x3eb')](Number(_0x3694b1[a0_0x5a29('0x46a')]['opacity']||0x1)):_0x1f2e56['color']=new _0x4cdf48['Color'][(a0_0x5a29('0x5d'))](a0_0x5a29('0x40d'))[a0_0x5a29('0x3eb')](Number(_0x3694b1[a0_0x5a29('0x46a')]['opacity']||0x1)),_0x1f2e56;},'attribute2Model':function(_0x5aec53,_0x5e548f){var _0x5dc01b=_0x4cdf48[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](Number(_0x5e548f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x2b2')]||0x0)),_0x44822c=_0x4cdf48[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](Number(_0x5e548f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x404')]||0x0)),_0x3e833d=_0x4cdf48[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](Number(_0x5e548f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x299')]||0x0)),_0x1e64cd=new _0x4cdf48['HeadingPitchRoll'](_0x5dc01b,_0x44822c,_0x3e833d);_0x5e548f['orientation']&&(_0x5e548f[a0_0x5a29('0x20f')]=_0x4cdf48[a0_0x5a29('0x17a')][a0_0x5a29('0xe3')](_0x5e548f[a0_0x5a29('0x53c')]['_value'],_0x1e64cd));},'getEditor':function(_0x5d32f2,_0x1bbd34,_0x583562){return new _0x3a2672(_0x5d32f2,_0x1bbd34,_0x583562);},'setPositions':function(_0x1568b8,_0x246522){_0x1568b8[a0_0x5a29('0x53c')]=new _0x4c5312(_0x246522);var _0x5cf564=_0x4cdf48[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](Number(_0x1568b8[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x2b2')]||0x0)),_0x44c2b1=_0x4cdf48[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](Number(_0x1568b8[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x404')]||0x0)),_0x4ac9ec=_0x4cdf48[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](Number(_0x1568b8[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x299')]||0x0)),_0x3aef0b=new _0x4cdf48['HeadingPitchRoll'](_0x5cf564,_0x44c2b1,_0x4ac9ec);_0x1568b8['orientation']=_0x4cdf48[a0_0x5a29('0x17a')][a0_0x5a29('0xe3')](_0x1568b8['position'][a0_0x5a29('0x30f')],_0x3aef0b);},'getPositions':function(_0x30b887){return[_0x30b887[a0_0x5a29('0x53c')][a0_0x5a29('0x30f')]];},'getCoordinates':function(_0x2bcf0b){var _0x295bee=this['getPositions'](_0x2bcf0b);return _0x2c464[a0_0x5a29('0x78')](_0x295bee);},'toGeoJSON':function(_0x1ce4b9){var _0x1dfc3a=this[a0_0x5a29('0x78')](_0x1ce4b9);return{'type':a0_0x5a29('0x3af'),'properties':_0x1ce4b9[a0_0x5a29('0x151')],'geometry':{'type':a0_0x5a29('0x7d9'),'coordinates':_0x1dfc3a}};}},_0x3aed8e=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x49fb8c=function(){function _0x5d4beb(){_0x1ee296()(this,_0x5d4beb);}return _0x1fafe8()(_0x5d4beb,[{'key':'i','value':function(_0x23ece1){var _0x142cd3=_0x23ece1['canvas'],_0x280f52=new _0x3aed8e[(a0_0x5a29('0x11b'))](_0x142cd3[a0_0x5a29('0x72a')]/0x2,_0x142cd3[a0_0x5a29('0x2ba')]/0x2),_0x4299aa=_0x23ece1[a0_0x5a29('0x294')]['getPickRay'](_0x280f52);return _0x23ece1[a0_0x5a29('0x6a4')]['pick'](_0x4299aa,_0x23ece1)||_0x23ece1['camera']['pickEllipsoid'](_0x280f52);}}],[{'key':'getCurrentMousePosition','value':function(_0x328ed4,_0x39f350){var _0x2a47c8,_0x416119=_0x328ed4['pick'](_0x39f350);if(_0x328ed4[a0_0x5a29('0x62e')]&&_0x3aed8e[a0_0x5a29('0x1da')](_0x416119)&&(_0x2a47c8=_0x328ed4['pickPosition'](_0x39f350))&&_0x328ed4[a0_0x5a29('0x6a4')][a0_0x5a29('0x12c')]['cartesianToCartographic'](_0x2a47c8)[a0_0x5a29('0x6b7')]>0x0)return _0x2a47c8;var _0x1acc7c=_0x328ed4[a0_0x5a29('0x294')][a0_0x5a29('0x86c')](_0x39f350);return _0x328ed4[a0_0x5a29('0x6a4')][a0_0x5a29('0x50')](_0x1acc7c,_0x328ed4);}},{'key':a0_0x5a29('0x935'),'value':function(_0x1b793c,_0x233823){var _0x21178a=_0x1b793c[a0_0x5a29('0x238')],_0x2db255=i(_0x21178a);if(!_0x2db255){var _0x1e79d7=_0x21178a[a0_0x5a29('0x6a4')],_0x505c26=_0x21178a[a0_0x5a29('0x294')]['positionCartographic']['clone'](),_0x57f4d7=_0x1e79d7['getHeight'](_0x505c26);_0x505c26[a0_0x5a29('0x6b7')]=_0x57f4d7||0x0,_0x2db255=_0x3aed8e['Ellipsoid'][a0_0x5a29('0x20a')][a0_0x5a29('0x6fe')](_0x505c26);}var _0x571532=_0x3aed8e[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x2db255),_0x1e8dbf={};return _0x1e8dbf['y']=Number(_0x3aed8e[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x571532[a0_0x5a29('0x517')])[a0_0x5a29('0x292')](0x6)),_0x1e8dbf['x']=Number(_0x3aed8e['Math']['toDegrees'](_0x571532[a0_0x5a29('0x706')])[a0_0x5a29('0x292')](0x6)),_0x1e8dbf['z']=Number(_0x571532[a0_0x5a29('0x6b7')][a0_0x5a29('0x292')](0x1)),_0x233823&&(_0x1e8dbf=_0x1e8dbf),_0x1e8dbf;}},{'key':a0_0x5a29('0xc1'),'value':function(_0x5bca0f,_0x168576){var _0x3cc10c={'xmin':0x46,'xmax':0x8c,'ymin':0x0,'ymax':0x37},_0x5c2946=_0x5bca0f[a0_0x5a29('0x238')],_0x784432=_0x5c2946[a0_0x5a29('0x6a4')]['ellipsoid'],_0x29aa1d=_0x5c2946[a0_0x5a29('0x662')],_0x5c54ce=_0x5bca0f['camera'][a0_0x5a29('0x791')](new _0x3aed8e[(a0_0x5a29('0x11b'))](0x0,0x0),_0x784432);if(_0x5c54ce){var _0x398fd4=_0x784432[a0_0x5a29('0x587')](_0x5c54ce);_0x3cc10c[a0_0x5a29('0x12')]=_0x3aed8e['Math'][a0_0x5a29('0x2eb')](_0x398fd4[a0_0x5a29('0x706')]),_0x3cc10c[a0_0x5a29('0x34d')]=_0x3aed8e[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x398fd4[a0_0x5a29('0x517')]);}else{for(var _0x1eb18b,_0x4aa0de=_0x29aa1d['width']/0x2,_0x5ddc9b=_0x29aa1d[a0_0x5a29('0x6b7')]/0x2,_0x3777cc=0x0;_0x3777cc<=_0x5ddc9b;_0x3777cc+=0xa){var _0x5bab7d=_0x3777cc<=_0x4aa0de?_0x3777cc:_0x4aa0de;if(_0x1eb18b=_0x5bca0f[a0_0x5a29('0x294')][a0_0x5a29('0x791')](new _0x3aed8e[(a0_0x5a29('0x11b'))](_0x5bab7d,_0x3777cc),_0x784432))break;}_0x1eb18b&&(_0x398fd4=_0x784432[a0_0x5a29('0x587')](_0x1eb18b),(_0x3cc10c['xmin']=_0x3aed8e['Math']['toDegrees'](_0x398fd4[a0_0x5a29('0x706')]),_0x3cc10c[a0_0x5a29('0x34d')]=_0x3aed8e[a0_0x5a29('0x382')]['toDegrees'](_0x398fd4['latitude'])));}var _0x218b6f=_0x5bca0f[a0_0x5a29('0x294')][a0_0x5a29('0x791')](new _0x3aed8e[(a0_0x5a29('0x11b'))](_0x29aa1d[a0_0x5a29('0x96f')],_0x29aa1d[a0_0x5a29('0x6b7')]),_0x784432);if(_0x218b6f){var _0x1b2a7d=_0x784432[a0_0x5a29('0x587')](_0x218b6f);_0x3cc10c[a0_0x5a29('0x46e')]=_0x3aed8e[a0_0x5a29('0x382')]['toDegrees'](_0x1b2a7d[a0_0x5a29('0x706')]),_0x3cc10c['ymin']=_0x3aed8e[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x1b2a7d['latitude']);}else{var _0x50600f;for(_0x4aa0de=_0x29aa1d[a0_0x5a29('0x96f')]/0x2,_0x5ddc9b=_0x29aa1d[a0_0x5a29('0x6b7')]/0x2,_0x3777cc=_0x29aa1d[a0_0x5a29('0x6b7')];_0x3777cc>=_0x5ddc9b;_0x3777cc-=0xa){_0x5bab7d=_0x3777cc>=_0x4aa0de?_0x3777cc:_0x4aa0de;if(_0x50600f=_0x5bca0f[a0_0x5a29('0x294')][a0_0x5a29('0x791')](new _0x3aed8e[(a0_0x5a29('0x11b'))](_0x5bab7d,_0x3777cc),_0x784432))break;}_0x50600f&&(_0x1b2a7d=_0x784432['cartesianToCartographic'](_0x50600f),(_0x3cc10c[a0_0x5a29('0x46e')]=_0x3aed8e['Math'][a0_0x5a29('0x2eb')](_0x1b2a7d[a0_0x5a29('0x706')]),_0x3cc10c[a0_0x5a29('0x50a')]=_0x3aed8e[a0_0x5a29('0x382')]['toDegrees'](_0x1b2a7d[a0_0x5a29('0x517')])));}if(_0x168576){var _0x580add={'x':_0x3cc10c[a0_0x5a29('0x12')],'y':_0x3cc10c[a0_0x5a29('0x50a')]};_0x3cc10c[a0_0x5a29('0x12')]=_0x580add['x'],_0x3cc10c[a0_0x5a29('0x50a')]=_0x580add['y'];var _0x341f30={'x':_0x3cc10c[a0_0x5a29('0x46e')],'y':_0x3cc10c[a0_0x5a29('0x34d')]};_0x3cc10c[a0_0x5a29('0x46e')]=_0x341f30['x'],_0x3cc10c[a0_0x5a29('0x34d')]=_0x341f30['y'];}return _0x3cc10c;}},{'key':'getCameraView','value':function(_0x1462fd,_0xd6d605){var _0x4a41a0=_0x1462fd['camera'],_0x51ccce=_0x4a41a0[a0_0x5a29('0x2a1')],_0x38ae59={};return _0x38ae59['y']=Number(_0x3aed8e[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x51ccce[a0_0x5a29('0x517')])[a0_0x5a29('0x292')](0x6)),_0x38ae59['x']=Number(_0x3aed8e['Math'][a0_0x5a29('0x2eb')](_0x51ccce[a0_0x5a29('0x706')])[a0_0x5a29('0x292')](0x6)),_0x38ae59['z']=Number(_0x51ccce[a0_0x5a29('0x6b7')][a0_0x5a29('0x292')](0x1)),_0x38ae59[a0_0x5a29('0x2b2')]=Number(_0x3aed8e['Math'][a0_0x5a29('0x2eb')](_0x4a41a0['heading'])[a0_0x5a29('0x292')](0x1)),_0x38ae59['pitch']=Number(_0x3aed8e[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x4a41a0[a0_0x5a29('0x404')])[a0_0x5a29('0x292')](0x1)),_0x38ae59['roll']=Number(_0x3aed8e[a0_0x5a29('0x382')][a0_0x5a29('0x2eb')](_0x4a41a0[a0_0x5a29('0x299')])[a0_0x5a29('0x292')](0x1)),_0xd6d605&&(_0x38ae59=_0x38ae59),_0x38ae59;}}]),_0x5d4beb;}(),_0x2971ed=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x359f6d=function(){function _0x304d27(_0xd24ca0){_0x1ee296()(this,_0x304d27),this['viewer']=_0xd24ca0,_0xd24ca0[a0_0x5a29('0x70d')][a0_0x5a29('0xf2')](_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x946')]),_0xd24ca0[a0_0x5a29('0x70d')][a0_0x5a29('0xf2')](_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')]);}return _0x1fafe8()(_0x304d27,[{'key':'createDrawPointHandler','value':function(_0x22ff7e){var _0x2c135a=this;_0x22ff7e[a0_0x5a29('0x207')]=!0x0;var _0x9bf8bf=new _0x2971ed[(a0_0x5a29('0x58b'))](this[a0_0x5a29('0x835')]['scene'][a0_0x5a29('0x662')]);return _0x9bf8bf[a0_0x5a29('0x872')](function(_0x18f7ff){var _0x55674f=_0x49fb8c[a0_0x5a29('0x499')](_0x2c135a['viewer'][a0_0x5a29('0x238')],_0x18f7ff[a0_0x5a29('0x53c')]);_0x55674f&&(_0x22ff7e['updatePositions'](_0x55674f),_0x22ff7e[a0_0x5a29('0x207')]=!0x1,_0x22ff7e['stopDrawing'](),_0x22ff7e[a0_0x5a29('0x23')](),_0x9bf8bf[a0_0x5a29('0x3d6')](),_0x2c135a['drawHandler']=null);},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')]),this[a0_0x5a29('0x5e7')]=_0x9bf8bf,_0x9bf8bf;}},{'key':a0_0x5a29('0x16d'),'value':function(_0x18ac0b,_0x3df589){var _0x4ed265=this;_0x18ac0b['inProgress']=!0x0;var _0x423f81=new _0x2971ed[(a0_0x5a29('0x58b'))](this[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x662')]);return _0x423f81[a0_0x5a29('0x82d')]=!0x1,_0x423f81[a0_0x5a29('0x872')](function(_0x224c15){var _0xbb2c38=_0x49fb8c['getCurrentMousePosition'](_0x4ed265[a0_0x5a29('0x835')][a0_0x5a29('0x238')],_0x224c15['position']);_0xbb2c38&&(_0x423f81[a0_0x5a29('0x82d')]&&_0x3df589[a0_0x5a29('0x3fe')](),_0x3df589[a0_0x5a29('0x3cd')](_0xbb2c38),_0x423f81[a0_0x5a29('0x82d')]=!0x1,_0x18ac0b[a0_0x5a29('0x151')]&&_0x18ac0b[a0_0x5a29('0x151')][a0_0x5a29('0x87e')]&&(_0x3df589[a0_0x5a29('0x515')]==_0x18ac0b['attribute'][a0_0x5a29('0x87e')][a0_0x5a29('0x5d5')]&&_0x3df589[a0_0x5a29('0x515')]==_0x18ac0b[a0_0x5a29('0x151')][a0_0x5a29('0x87e')][a0_0x5a29('0x670')]||_0x18ac0b[a0_0x5a29('0x151')]['minMaxPoints'][a0_0x5a29('0x6c4')]&&0x4==_0x3df589['length'])&&(_0x18ac0b[a0_0x5a29('0x207')]=!0x1,_0x423f81[a0_0x5a29('0x3d6')](),_0x4ed265[a0_0x5a29('0x5e7')]=null,_0x18ac0b[a0_0x5a29('0x940')](),_0x18ac0b[a0_0x5a29('0x23')]()),_0x18ac0b[a0_0x5a29('0x841')]());},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')]),_0x423f81[a0_0x5a29('0x872')](function(_0x202656){if(_0x202656[a0_0x5a29('0x729')]){var _0x2bbc96=_0x49fb8c['getCurrentMousePosition'](_0x4ed265[a0_0x5a29('0x835')][a0_0x5a29('0x238')],_0x202656[a0_0x5a29('0x729')]);_0x2bbc96&&(_0x423f81[a0_0x5a29('0x82d')]&&_0x3df589['pop'](),_0x3df589[a0_0x5a29('0x3cd')](_0x2bbc96),_0x423f81[a0_0x5a29('0x82d')]=!0x0,_0x18ac0b[a0_0x5a29('0x80d')]());}},_0x2971ed['ScreenSpaceEventType'][a0_0x5a29('0x6eb')]),_0x423f81[a0_0x5a29('0x872')](function(_0x1554fd){_0x18ac0b[a0_0x5a29('0x207')]=!0x1,_0x423f81['destroy'](),_0x4ed265[a0_0x5a29('0x5e7')]=null,_0x3df589['pop'](),_0x18ac0b['stopDrawing'](),_0x18ac0b['startEditing']();},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x946')]),this['drawHandler']=_0x423f81,_0x423f81;}},{'key':a0_0x5a29('0x1'),'value':function(_0x27770f,_0xc04dbd){var _0x210a3d=this;_0x27770f['inProgress']=!0x0;var _0x437e13=new _0x2971ed[(a0_0x5a29('0x58b'))](this[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x662')]);return _0x437e13[a0_0x5a29('0x82d')]=!0x1,_0x437e13['setInputAction'](function(_0xe302a6){var _0x32db6b=_0x49fb8c[a0_0x5a29('0x499')](_0x210a3d['viewer'][a0_0x5a29('0x238')],_0xe302a6['position']);if(_0x32db6b){if(_0x437e13[a0_0x5a29('0x82d')]&&_0xc04dbd[a0_0x5a29('0x3fe')](),_0xc04dbd['push'](_0x32db6b),_0x27770f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]){var _0x280b67=_0x2c464['getMaxHeightForPositions'](_0xc04dbd);_0x27770f[a0_0x5a29('0x82a')][a0_0x5a29('0x1b4')]=_0x280b67+Number(_0x27770f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]);}_0x437e13[a0_0x5a29('0x82d')]=!0x1,_0x27770f[a0_0x5a29('0x841')]();}},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')]),_0x437e13['setInputAction'](function(_0x1f0159){if(_0x1f0159['endPosition']){var _0x36a490=_0x49fb8c[a0_0x5a29('0x499')](_0x210a3d['viewer']['scene'],_0x1f0159['endPosition']);if(_0x36a490){if(_0x437e13[a0_0x5a29('0x82d')]&&_0xc04dbd['pop'](),_0xc04dbd[a0_0x5a29('0x3cd')](_0x36a490),_0x27770f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]){var _0x1fba5f=_0x2c464[a0_0x5a29('0x29b')](_0xc04dbd);_0x27770f[a0_0x5a29('0x82a')][a0_0x5a29('0x1b4')]=_0x1fba5f+Number(_0x27770f[a0_0x5a29('0x151')]['style'][a0_0x5a29('0x1b4')]);}_0x437e13[a0_0x5a29('0x82d')]=!0x0,_0x27770f['moveDrawing']();}}},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x6eb')]),_0x437e13['setInputAction'](function(_0x44d8a5){_0x27770f[a0_0x5a29('0x207')]=!0x1,_0x437e13['destroy'](),_0x210a3d[a0_0x5a29('0x5e7')]=null,_0xc04dbd['pop'](),_0x27770f[a0_0x5a29('0x940')](),_0x27770f['startEditing']();},_0x2971ed['ScreenSpaceEventType']['LEFT_DOUBLE_CLICK']),this[a0_0x5a29('0x5e7')]=_0x437e13,_0x437e13;}},{'key':a0_0x5a29('0x2e'),'value':function(_0x11cb6f,_0x5b0ecd){var _0x1288fb=this;_0x11cb6f['inProgress']=!0x0;var _0xbe62a=[],_0x18191b=new _0x2971ed['ScreenSpaceEventHandler'](this[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x662')]);return _0x18191b[a0_0x5a29('0x82d')]=!0x1,_0x18191b[a0_0x5a29('0x872')](function(_0xc7541c){var _0x317d99=_0x49fb8c[a0_0x5a29('0x499')](_0x1288fb[a0_0x5a29('0x835')][a0_0x5a29('0x238')],_0xc7541c[a0_0x5a29('0x53c')]);if(_0x317d99){if(_0x18191b[a0_0x5a29('0x82d')]&&_0xbe62a['pop'](),_0xbe62a[a0_0x5a29('0x3cd')](_0x317d99),0x1==_0xbe62a[a0_0x5a29('0x515')]&&_0x11cb6f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['extrudedHeight']){var _0x3aa77c=Number(_0x2971ed[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x317d99)[a0_0x5a29('0x6b7')])[a0_0x5a29('0x292')](0x2);_0x11cb6f[a0_0x5a29('0x4b0')][a0_0x5a29('0x6b7')]=Number(_0x3aa77c),_0x11cb6f[a0_0x5a29('0x4b0')]['extrudedHeight']=Number(_0x3aa77c)+Number(_0x11cb6f['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]),_0x11cb6f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['height']=Number(_0x3aa77c);}if(0x2==_0xbe62a[a0_0x5a29('0x515')]){var _0x210c72=_0x2971ed[a0_0x5a29('0x279')][a0_0x5a29('0x79f')](_0xbe62a);_0x5b0ecd[a0_0x5a29('0x850')](_0x210c72);}_0x18191b[a0_0x5a29('0x82d')]=!0x1,_0x11cb6f[a0_0x5a29('0x841')](),0x2==_0xbe62a[a0_0x5a29('0x515')]&&(_0x11cb6f[a0_0x5a29('0x207')]=!0x1,_0x18191b[a0_0x5a29('0x3d6')](),_0x1288fb[a0_0x5a29('0x5e7')]=null,_0x11cb6f['stopDrawing'](),_0x11cb6f['startEditing']());}},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')]),_0x18191b[a0_0x5a29('0x872')](function(_0x46f72d){if(_0x46f72d['endPosition']){var _0x3c4fa1=_0x49fb8c['getCurrentMousePosition'](_0x1288fb[a0_0x5a29('0x835')][a0_0x5a29('0x238')],_0x46f72d[a0_0x5a29('0x729')]);if(_0x3c4fa1){if(_0x18191b[a0_0x5a29('0x82d')]&&_0xbe62a[a0_0x5a29('0x3fe')](),_0xbe62a[a0_0x5a29('0x3cd')](_0x3c4fa1),0x2==_0xbe62a['length']){var _0x2f3918=_0x2971ed['Rectangle'][a0_0x5a29('0x79f')](_0xbe62a);_0x5b0ecd[a0_0x5a29('0x850')](_0x2f3918);}_0x18191b['lastPointTemporary']=!0x0,_0x11cb6f['moveDrawing']();}}},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x6eb')]),this[a0_0x5a29('0x5e7')]=_0x18191b,_0x18191b;}},{'key':a0_0x5a29('0x91a'),'value':function(_0xc0fb69,_0x17dd7e,_0x39b970,_0x540d73){var _0x1bb694=this;_0xc0fb69[a0_0x5a29('0x207')]=!0x0;var _0xe19545=new _0x2971ed[(a0_0x5a29('0x58b'))](this[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x662')]);return _0xe19545[a0_0x5a29('0x82d')]=!0x1,_0xe19545['setInputAction'](function(_0x3a5ddb){var _0x3d25fe=_0x49fb8c[a0_0x5a29('0x499')](_0x1bb694[a0_0x5a29('0x835')]['scene'],_0x3a5ddb[a0_0x5a29('0x53c')]);if(_0x3d25fe){_0xe19545['lastPointTemporary']&&(_0x17dd7e[a0_0x5a29('0x3fe')](),_0x39b970[a0_0x5a29('0x3fe')](),_0x540d73[a0_0x5a29('0x3fe')]()),_0x17dd7e[a0_0x5a29('0x3cd')](_0x3d25fe);var _0x4abe23=_0x2971ed[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x3d25fe),_0x49e8eb=Number(_0x4abe23[a0_0x5a29('0x6b7')])[a0_0x5a29('0x292')](0x2),_0x431108=Number(_0x49e8eb)+Number(_0xc0fb69['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]);_0x39b970[a0_0x5a29('0x3cd')](_0x49e8eb),_0x540d73[a0_0x5a29('0x3cd')](_0x431108),_0xe19545[a0_0x5a29('0x82d')]=!0x1,_0xc0fb69['changeDrawing']();}},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')]),_0xe19545[a0_0x5a29('0x872')](function(_0x22eec4){if(_0x22eec4[a0_0x5a29('0x729')]){var _0x22f5d5=_0x49fb8c['getCurrentMousePosition'](_0x1bb694[a0_0x5a29('0x835')][a0_0x5a29('0x238')],_0x22eec4[a0_0x5a29('0x729')]);if(_0x22f5d5){_0xe19545[a0_0x5a29('0x82d')]&&(_0x17dd7e[a0_0x5a29('0x3fe')](),_0x39b970[a0_0x5a29('0x3fe')](),_0x540d73['pop']()),_0x17dd7e['push'](_0x22f5d5);var _0x1913d3=_0x2971ed[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x22f5d5),_0x232321=Number(_0x1913d3['height'])[a0_0x5a29('0x292')](0x2),_0x37729b=Number(_0x232321)+Number(_0xc0fb69['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]);_0x39b970[a0_0x5a29('0x3cd')](_0x232321),_0x540d73[a0_0x5a29('0x3cd')](_0x37729b),_0xe19545[a0_0x5a29('0x82d')]=!0x0,_0xc0fb69[a0_0x5a29('0x80d')]();}}},_0x2971ed['ScreenSpaceEventType']['MOUSE_MOVE']),_0xe19545[a0_0x5a29('0x872')](function(_0x5e68ed){_0xc0fb69[a0_0x5a29('0x207')]=!0x1,_0xe19545[a0_0x5a29('0x3d6')](),_0x1bb694[a0_0x5a29('0x5e7')]=null,_0x17dd7e[a0_0x5a29('0x3fe')](),_0x39b970[a0_0x5a29('0x3fe')](),_0x540d73[a0_0x5a29('0x3fe')](),_0xc0fb69['stopDrawing'](),_0xc0fb69[a0_0x5a29('0x23')]();},_0x2971ed[a0_0x5a29('0x1a2')]['LEFT_DOUBLE_CLICK']),this[a0_0x5a29('0x5e7')]=_0xe19545,_0xe19545;}},{'key':'destroyDrawHandler','value':function(){this[a0_0x5a29('0x5e7')]&&(this[a0_0x5a29('0x5e7')][a0_0x5a29('0x3d6')](),this[a0_0x5a29('0x5e7')]=null);}},{'key':'createEditSelectHandler','value':function(_0x6fd780){var _0x3f00f6=this,_0x352f3b=new _0x2971ed[(a0_0x5a29('0x58b'))](this['viewer'][a0_0x5a29('0x662')]);_0x352f3b['setInputAction'](function(_0x4ff829){var _0x4655d4=_0x3f00f6['viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x50')](_0x4ff829[a0_0x5a29('0x53c')]),_0x2b5b34=null;if(_0x2971ed[a0_0x5a29('0x1da')](_0x4655d4)){var _0x138986=_0x2971ed['defaultValue'](_0x4655d4['id'],_0x4655d4[a0_0x5a29('0x205')]['id']);if(_0x138986 instanceof _0x2971ed['Entity'])_0x2971ed[a0_0x5a29('0x3d0')](_0x138986[a0_0x5a29('0x207')],!0x1)||(_0x2b5b34=_0x138986);}_0x6fd780(_0x2b5b34);},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x392')]),this['selectHandler']=_0x352f3b;}},{'key':a0_0x5a29('0x613'),'value':function(){var _0x4b03fd=new _0x2971ed['ScreenSpaceEventHandler'](this[a0_0x5a29('0x835')]['canvas']);_0x4b03fd[a0_0x5a29('0x4c9')]=null;var _0x4aa055=this;_0x4b03fd[a0_0x5a29('0x872')](function(_0x24fd9e){var _0x4d3e71=_0x4aa055[a0_0x5a29('0x835')]['scene'][a0_0x5a29('0x50')](_0x24fd9e[a0_0x5a29('0x53c')]);if(_0x2971ed[a0_0x5a29('0x1da')](_0x4d3e71)){var _0x3f905a=_0x4d3e71['id'];_0x3f905a&&_0x2971ed[a0_0x5a29('0x3d0')](_0x3f905a[a0_0x5a29('0x25c')],!0x1)&&(_0x3f905a[a0_0x5a29('0x3c1')]&&(_0x3f905a[a0_0x5a29('0x3c1')][a0_0x5a29('0x2d7')]=_0x3f905a['billboard'][a0_0x5a29('0x281')]['_value'],_0x3f905a[a0_0x5a29('0x3c1')]['scale'][a0_0x5a29('0x30f')]=1.2*_0x3f905a[a0_0x5a29('0x3c1')][a0_0x5a29('0x2d7')]),_0x4b03fd['dragger']=_0x3f905a,_0x4aa055['viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x76e')]['enableRotate']=!0x1,_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x76e')][a0_0x5a29('0x399')]=!0x1,_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')]['screenSpaceCameraController'][a0_0x5a29('0x929')]=!0x1);}},_0x2971ed['ScreenSpaceEventType'][a0_0x5a29('0x5e1')]),_0x4b03fd['setInputAction'](function(_0x2a4b69){var _0xa64eb2=_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x50')](_0x2a4b69['position']);if(_0x2971ed['defined'](_0xa64eb2)){var _0x33f3b8=_0xa64eb2['id'];_0x33f3b8&&_0x2971ed[a0_0x5a29('0x3d0')](_0x33f3b8[a0_0x5a29('0x25c')],!0x1)&&(_0x33f3b8[a0_0x5a29('0x3c1')]&&(_0x33f3b8['billboard'][a0_0x5a29('0x2d7')]=_0x33f3b8[a0_0x5a29('0x3c1')][a0_0x5a29('0x281')][a0_0x5a29('0x30f')],_0x33f3b8['billboard'][a0_0x5a29('0x281')]['_value']=1.2*_0x33f3b8['billboard'][a0_0x5a29('0x2d7')]),_0x4b03fd[a0_0x5a29('0x4c9')]=_0x33f3b8,_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x76e')][a0_0x5a29('0xe0')]=!0x1,_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')]['screenSpaceCameraController'][a0_0x5a29('0x399')]=!0x1,_0x4aa055['viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x76e')][a0_0x5a29('0x929')]=!0x1);}},_0x2971ed[a0_0x5a29('0x1a2')]['LEFT_DOWN'],_0x2971ed[a0_0x5a29('0x2ea')][a0_0x5a29('0x2a4')]),_0x4b03fd['setInputAction'](function(_0x50596f){if(_0x4b03fd[a0_0x5a29('0x4c9')]){if(_0x4b03fd[a0_0x5a29('0x4c9')]['horizontal']){var _0xf65389;if(_0x4b03fd['dragger'][a0_0x5a29('0x193')]){var _0x23aad9=_0x4aa055[a0_0x5a29('0x835')]['scene'],_0x5d667c=_0x23aad9[a0_0x5a29('0x50')](_0x50596f[a0_0x5a29('0x729')]);if(_0x2971ed['defined'](_0x5d667c)&&_0x5d667c['id']==_0x4b03fd[a0_0x5a29('0x4c9')]){var _0x5747b7=_0x23aad9['camera'][a0_0x5a29('0x86c')](_0x50596f[a0_0x5a29('0x729')]);_0xf65389=_0x23aad9[a0_0x5a29('0x6a4')]['pick'](_0x5747b7,_0x23aad9);}}null==_0xf65389&&(_0xf65389=_0x49fb8c[a0_0x5a29('0x499')](_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')],_0x50596f[a0_0x5a29('0x729')])),_0xf65389&&(_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x53c')]=_0xf65389,_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0xab')]&&_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0xab')](_0x4b03fd[a0_0x5a29('0x4c9')],_0xf65389));}if(_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x410')]){var _0x1ff1f4=_0x50596f[a0_0x5a29('0x729')]['y']-_0x50596f[a0_0x5a29('0x109')]['y'],_0x1f97ca=_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x53c')][a0_0x5a29('0x30f')],_0xa99279=new _0x2971ed[(a0_0x5a29('0x291'))](_0x1f97ca);_0x577f31[a0_0x5a29('0x100')]=_0x1f97ca,_0x577f31[a0_0x5a29('0x6e1')]=0x1;var _0x233078=_0x4aa055[a0_0x5a29('0x835')]['scene'][a0_0x5a29('0x34f')]['camera']['getPixelSize'](_0x577f31,_0x4aa055['viewer']['scene']['frameState'][a0_0x5a29('0x15b')][a0_0x5a29('0x506')],_0x4aa055['viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x34f')]['context'][a0_0x5a29('0x16c')]),_0x532f67=new _0x2971ed[(a0_0x5a29('0x3bd'))]();_0x2971ed['Cartesian3'][a0_0x5a29('0x750')](_0xa99279['zAxis'],-_0x1ff1f4*_0x233078,_0x532f67);var _0x177126=_0x2971ed[a0_0x5a29('0x3bd')][a0_0x5a29('0x218')](_0x1f97ca);_0x2971ed['Cartesian3']['add'](_0x1f97ca,_0x532f67,_0x177126),_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x53c')]=_0x177126,_0x4b03fd['dragger'][a0_0x5a29('0xab')]&&_0x4b03fd['dragger'][a0_0x5a29('0xab')](_0x4b03fd['dragger'],_0x177126);}}},_0x2971ed['ScreenSpaceEventType'][a0_0x5a29('0x6eb')]);var _0x577f31=new _0x2971ed[(a0_0x5a29('0x12d'))]();_0x4b03fd['setInputAction'](function(_0x55d587){if(_0x4b03fd[a0_0x5a29('0x4c9')]&&_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x93f')]){var _0xf8da2=_0x55d587[a0_0x5a29('0x729')]['y']-_0x55d587[a0_0x5a29('0x109')]['y'],_0x216e65=_0x4b03fd[a0_0x5a29('0x4c9')]['position'][a0_0x5a29('0x30f')],_0x21b1f9=new _0x2971ed[(a0_0x5a29('0x291'))](_0x216e65);_0x577f31[a0_0x5a29('0x100')]=_0x216e65,_0x577f31[a0_0x5a29('0x6e1')]=0x1;var _0x1d27ca=_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x34f')][a0_0x5a29('0x294')][a0_0x5a29('0x2f4')](_0x577f31,_0x4aa055['viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x34f')][a0_0x5a29('0x15b')][a0_0x5a29('0x506')],_0x4aa055[a0_0x5a29('0x835')]['scene'][a0_0x5a29('0x34f')]['context'][a0_0x5a29('0x16c')]),_0x3c5fe9=new _0x2971ed[(a0_0x5a29('0x3bd'))]();_0x2971ed[a0_0x5a29('0x3bd')][a0_0x5a29('0x750')](_0x21b1f9[a0_0x5a29('0x4d8')],-_0xf8da2*_0x1d27ca,_0x3c5fe9);var _0x1b687b=_0x2971ed[a0_0x5a29('0x3bd')][a0_0x5a29('0x218')](_0x216e65);_0x2971ed[a0_0x5a29('0x3bd')]['add'](_0x216e65,_0x3c5fe9,_0x1b687b),_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x53c')]=_0x1b687b,_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0xab')]&&_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0xab')](_0x4b03fd[a0_0x5a29('0x4c9')],_0x1b687b);}},_0x2971ed[a0_0x5a29('0x1a2')]['MOUSE_MOVE'],_0x2971ed[a0_0x5a29('0x2ea')]['CTRL']),_0x4b03fd[a0_0x5a29('0x872')](function(){_0x4b03fd[a0_0x5a29('0x4c9')]&&(_0x4b03fd['dragger'][a0_0x5a29('0x3c1')]&&(_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x3c1')]['scale'][a0_0x5a29('0x30f')]=_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x3c1')][a0_0x5a29('0x2d7')]),_0x4b03fd[a0_0x5a29('0x4c9')]=null,_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')]['screenSpaceCameraController']['enableRotate']=!0x0,_0x4aa055['viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x76e')]['enableTilt']=!0x0,_0x4aa055[a0_0x5a29('0x835')][a0_0x5a29('0x238')][a0_0x5a29('0x76e')]['enableTranslate']=!0x0);},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x468')]),_0x4b03fd['setInputAction'](function(){_0x4b03fd[a0_0x5a29('0x4c9')]&&(_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x3c1')]&&(_0x4b03fd['dragger']['billboard'][a0_0x5a29('0x281')][a0_0x5a29('0x30f')]=_0x4b03fd[a0_0x5a29('0x4c9')][a0_0x5a29('0x3c1')][a0_0x5a29('0x2d7')]),_0x4b03fd['dragger']=null,_0x4aa055['viewer'][a0_0x5a29('0x238')]['screenSpaceCameraController'][a0_0x5a29('0xe0')]=!0x0,_0x4aa055['viewer'][a0_0x5a29('0x238')]['screenSpaceCameraController'][a0_0x5a29('0x399')]=!0x0,_0x4aa055['viewer'][a0_0x5a29('0x238')]['screenSpaceCameraController'][a0_0x5a29('0x929')]=!0x0);},_0x2971ed[a0_0x5a29('0x1a2')][a0_0x5a29('0x468')],_0x2971ed[a0_0x5a29('0x2ea')][a0_0x5a29('0x2a4')]),this[a0_0x5a29('0x976')]=_0x4b03fd;}},{'key':a0_0x5a29('0x147'),'value':function(){this[a0_0x5a29('0x68')]&&(this['selectHandler'][a0_0x5a29('0x3d6')](),this['selectHandler']=null),this[a0_0x5a29('0x976')]&&(this[a0_0x5a29('0x976')][a0_0x5a29('0x3d6')](),this[a0_0x5a29('0x976')]=null);}}]),_0x304d27;}(),_0x5bcde7=DC[a0_0x5a29('0x239')]['Cesium'];function _0x1fcac4(_0x1954ea){function _0x431c43(_0x216813){_0x569bd5=_0x216813,_0x216813?(_0x4235af['createEditSelectHandler'](function(_0x3ec741){_0x15f5d1&&_0x15f5d1[a0_0x5a29('0x207')]||(_0x3ec741!==_0x15f5d1?(_0x15f5d1&&_0x15f5d1['stopEditing']&&(_0x15f5d1[a0_0x5a29('0x910')](),_0x15f5d1=null),(_0x15f5d1=_0x3ec741)&&_0x15f5d1['startEditing']&&_0x15f5d1['startEditing']()):_0x1954ea['onStopEditing']&&'function'==typeof _0x1954ea[a0_0x5a29('0x232')]&&_0x1954ea[a0_0x5a29('0x232')]());}),_0x4235af[a0_0x5a29('0x613')]()):(_0x69fc1b(),_0x4235af['destroyEditHandler']());}function _0x69fc1b(){return _0x4235af[a0_0x5a29('0x41c')](),_0x15f5d1&&_0x15f5d1[a0_0x5a29('0x207')]&&(_0x15f5d1[a0_0x5a29('0x940')](),_0x1478ed['entities'][a0_0x5a29('0x157')](_0x15f5d1),_0x82367c(_0x11fda9,_0x15f5d1)),_0x15f5d1&&(_0x15f5d1[a0_0x5a29('0x910')](),_0x15f5d1=null),this;}function _0x47b98c(_0x6f6fa1){_0x6f6fa1['startDrawing']=function(){$(a0_0x5a29('0x2c1'))[a0_0x5a29('0x54')](a0_0x5a29('0x1cb'),'crosshair'),_0x1954ea[a0_0x5a29('0x23a')]&&a0_0x5a29('0x2ae')==typeof _0x1954ea[a0_0x5a29('0x23a')]&&_0x1954ea[a0_0x5a29('0x23a')](this);},_0x6f6fa1[a0_0x5a29('0x841')]=function(){_0x1954ea[a0_0x5a29('0x957')]&&a0_0x5a29('0x2ae')==typeof _0x1954ea[a0_0x5a29('0x957')]&&_0x1954ea[a0_0x5a29('0x957')](this);},_0x6f6fa1[a0_0x5a29('0x80d')]=function(){_0x1954ea[a0_0x5a29('0x3dd')]&&a0_0x5a29('0x2ae')==typeof _0x1954ea[a0_0x5a29('0x3dd')]&&_0x1954ea[a0_0x5a29('0x3dd')](this);},_0x6f6fa1['stopDrawing']=function(){$(a0_0x5a29('0x2c1'))[a0_0x5a29('0x54')](a0_0x5a29('0x1cb'),''),_0x1954ea[a0_0x5a29('0x251')]&&a0_0x5a29('0x2ae')==typeof _0x1954ea['onStopDrawing']&&_0x1954ea['onStopDrawing'](this);},_0x6f6fa1[a0_0x5a29('0x23')]=function(){if(_0x569bd5){var _0x3b7416=this;if(null==_0x3b7416['editor']){var _0x5c1a98=_0x3b7416[a0_0x5a29('0x151')]['type'];_0x3b7416[a0_0x5a29('0x99')]=_0x1b5de0[_0x5c1a98][a0_0x5a29('0x1f5')](_0x1478ed,_0x3b7416,{'dragIcon':_0x2d8863});}_0x1954ea[a0_0x5a29('0x7fc')]&&a0_0x5a29('0x2ae')==typeof _0x1954ea['onStartEditing']&&_0x1954ea['onStartEditing'](_0x3b7416);}},_0x6f6fa1[a0_0x5a29('0x910')]=function(){var _0x354018=this;_0x354018['editor']&&(_0x354018[a0_0x5a29('0x99')][a0_0x5a29('0x3d6')](),_0x354018['editor']=null),_0x1954ea['onStopEditing']&&'function'==typeof _0x1954ea[a0_0x5a29('0x232')]&&_0x1954ea[a0_0x5a29('0x232')]();},_0x6f6fa1['changeEditing']=function(){_0x1954ea['onChangeEditing']&&'function'==typeof _0x1954ea[a0_0x5a29('0x45e')]&&_0x1954ea[a0_0x5a29('0x45e')](this);},_0x6f6fa1[a0_0x5a29('0x4d1')]=function(_0x15f696){var _0x15b43f=this,_0x179711=_0x15b43f[a0_0x5a29('0x151')][a0_0x5a29('0x519')];if('ellipse'==_0x179711){var _0x19e252=_0x5bcde7[a0_0x5a29('0x7c9')]['fromCartesian'](_0x15f696)[a0_0x5a29('0x6b7')];if(_0x15b43f[a0_0x5a29('0x151')]['style'][a0_0x5a29('0x6b7')]=Number(Number(_0x19e252)['toFixed'](0x2)),_0x15b43f[a0_0x5a29('0x92')][a0_0x5a29('0x6b7')]['_value']=Number(Number(_0x19e252)[a0_0x5a29('0x292')](0x2)),_0x15b43f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')]['extrudedHeight']){var _0x352449=Number(_0x19e252)+Number(_0x15b43f['attribute'][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]);_0x15b43f[a0_0x5a29('0x92')][a0_0x5a29('0x1b4')][a0_0x5a29('0x30f')]=Number(_0x352449['toFixed'](0x2)),_0x15b43f[a0_0x5a29('0x151')][a0_0x5a29('0x46a')][a0_0x5a29('0x1b4')]=Number(_0x352449[a0_0x5a29('0x292')](0x2));}}_0x1b5de0[_0x179711][a0_0x5a29('0x10f')](_0x15f5d1,_0x15f696);};}function _0x12429c(_0x5aa267){return a0_0x5a29('0x783')==typeof _0x5aa267&&_0x5aa267[a0_0x5a29('0x825')]==String;}function _0x82367c(_0x13ad98,_0x300e1c){for(var _0x3e5940=0x0;_0x3e5940<_0x13ad98[a0_0x5a29('0x515')];_0x3e5940++)if(_0x13ad98[_0x3e5940]==_0x300e1c){_0x13ad98[a0_0x5a29('0x250')](_0x3e5940,0x1);break;}}var _0x1b5de0={'billboard':_0xb77726,'label':_0x3e0ff2,'ellipse':_0x38b030,'polyline':_0x50b33c,'polylineVolume':_0x102b79,'polygon':_0x4fcc19,'ellipsoid':_0x2db02a,'wall':_0x4aaf3d,'point':_0x5e929c,'rectangle':_0x2393ee,'model':_0x28b900},_0x1478ed=_0x1954ea[a0_0x5a29('0x835')],_0x2d8863=(_0x1478ed['scene'],_0x1954ea[a0_0x5a29('0x5e4')]),_0x15f5d1=null,_0x11fda9=[],_0x4235af=new _0x359f6d(_0x1478ed),_0x569bd5=_0x1954ea[a0_0x5a29('0x69f')];return _0x431c43(_0x1954ea['hasEdit']),{'startDraw':function(_0x3cb261){if(_0x69fc1b(),null==_0x3cb261||null==_0x3cb261[a0_0x5a29('0x519')])throw a0_0x5a29('0x562');_0x3cb261[a0_0x5a29('0x46a')]=_0x3cb261[a0_0x5a29('0x46a')]||{},_0x3cb261['attr']=_0x3cb261[a0_0x5a29('0x5c6')]||{};var _0x3241f4=_0x3cb261[a0_0x5a29('0x519')];if(null==_0x1b5de0[_0x3241f4])throw a0_0x5a29('0x383')+_0x3241f4+a0_0x5a29('0x457');var _0x1994c6=_0x1b5de0[_0x3241f4]['startDraw'](_0x1478ed,_0x3cb261);switch(_0x3241f4){case'label':case'point':case a0_0x5a29('0x3c1'):case'model':case a0_0x5a29('0x92'):case a0_0x5a29('0x12c'):_0x4235af[a0_0x5a29('0x388')](_0x1994c6);break;case'polyline':case a0_0x5a29('0x970'):_0x4235af[a0_0x5a29('0x16d')](_0x1994c6,_0x1b5de0[_0x3241f4][a0_0x5a29('0xb2')](_0x1994c6));break;case a0_0x5a29('0x82a'):_0x4235af[a0_0x5a29('0x1')](_0x1994c6,_0x1b5de0[_0x3241f4][a0_0x5a29('0xb2')](_0x1994c6));break;case a0_0x5a29('0x4b0'):case a0_0x5a29('0x4b2'):case a0_0x5a29('0x699'):_0x4235af[a0_0x5a29('0x2e')](_0x1994c6,_0x1b5de0[_0x3241f4][a0_0x5a29('0xb2')](_0x1994c6));break;case a0_0x5a29('0x104'):var _0x3ac049=_0x1b5de0[_0x3241f4][a0_0x5a29('0xb2')](_0x1994c6),_0x14ff0b=_0x1b5de0[_0x3241f4]['getMinimumHeights'](_0x1994c6),_0x4e1ea7=_0x1b5de0[_0x3241f4][a0_0x5a29('0x6c1')](_0x1994c6);_0x4235af[a0_0x5a29('0x91a')](_0x1994c6,_0x3ac049,_0x14ff0b,_0x4e1ea7);}return _0x47b98c(_0x1994c6),_0x11fda9[a0_0x5a29('0x3cd')](_0x1994c6),_0x1994c6['startDrawing'](),_0x15f5d1=_0x1994c6,_0x1994c6;},'stopDraw':_0x69fc1b,'updateAttribute':function(_0x72a88f){if(null!=_0x15f5d1&&null!=_0x72a88f){_0x72a88f[a0_0x5a29('0x46a')]=_0x72a88f['style']||{},_0x72a88f[a0_0x5a29('0x5c6')]=_0x72a88f[a0_0x5a29('0x5c6')]||{};var _0x3577e4=_0x15f5d1['attribute']['type'];return _0x1b5de0[_0x3577e4][a0_0x5a29('0x60c')](_0x72a88f,_0x15f5d1[_0x3577e4]),'model'==_0x3577e4&&_0x1b5de0[_0x3577e4]['attribute2Model'](_0x72a88f,_0x15f5d1),_0x15f5d1[a0_0x5a29('0x151')]=_0x72a88f,a0_0x5a29('0x92')!=_0x3577e4&&a0_0x5a29('0x82a')!=_0x3577e4&&'wall'!=_0x3577e4&&a0_0x5a29('0x4b0')!=_0x3577e4||_0x15f5d1[a0_0x5a29('0x99')][a0_0x5a29('0x19b')](),_0x15f5d1;}},'updateGeometry':function(_0x5ecbc5){if(null!=_0x15f5d1&&null!=_0x5ecbc5){var _0x41b341=_0x15f5d1[a0_0x5a29('0x151')][a0_0x5a29('0x519')];return _0x1b5de0[_0x41b341][a0_0x5a29('0x10f')](_0x15f5d1,_0x5ecbc5),_0x15f5d1[a0_0x5a29('0x99')][a0_0x5a29('0x19b')](),_0x15f5d1;}},'toGeoJSON':function(){if(0x0==_0x11fda9[a0_0x5a29('0x515')])return'';for(var _0x22c3c4=[],_0xa637f3=0x0;_0xa637f3<_0x11fda9[a0_0x5a29('0x515')];_0xa637f3++){var _0x1dced0=_0x11fda9[_0xa637f3],_0x40794e=_0x1dced0[a0_0x5a29('0x151')][a0_0x5a29('0x519')],_0x4eabd3=_0x1b5de0[_0x40794e][a0_0x5a29('0x8e7')](_0x1dced0);_0x22c3c4[a0_0x5a29('0x3cd')](_0x4eabd3);}return _0x4eabd3={'type':a0_0x5a29('0x144'),'features':_0x22c3c4},JSON['stringify'](_0x4eabd3);},'jsonToEntity':function(_0x1ad203,_0x1a10fe,_0x4ee66c){var _0x41e715=_0x1ad203;try{_0x12429c(_0x1ad203)&&(_0x41e715=JSON[a0_0x5a29('0x1e7')](_0x1ad203));}catch(_0x36ee63){return void haoutil[a0_0x5a29('0x827')](_0x36ee63['name']+':\x20'+_0x36ee63[a0_0x5a29('0x452')]+a0_0x5a29('0x92d'));}_0x1a10fe&&u();for(var _0x464637=_0x41e715[a0_0x5a29('0xcb')],_0x102578=0x0;_0x102578<_0x464637[a0_0x5a29('0x515')];_0x102578++){var _0x491e20=_0x464637[_0x102578],_0x184588=_0x491e20[a0_0x5a29('0x31d')]['type'],_0x472b7b=_0x1b5de0[_0x184588][a0_0x5a29('0x2f7')](_0x1478ed,_0x491e20[a0_0x5a29('0x31d')]),_0x468e96=_0x2c464[a0_0x5a29('0x32a')](_0x491e20[a0_0x5a29('0x74e')]);_0x1b5de0[_0x184588][a0_0x5a29('0x10f')](_0x472b7b,_0x468e96),_0x47b98c(_0x472b7b),_0x11fda9[a0_0x5a29('0x3cd')](_0x472b7b);}return _0x4ee66c&&_0x1478ed['flyTo'](_0x11fda9,{'duration':0x3}),_0x11fda9;},'markersInfoToEntity':function(_0x2ef38b,_0x4d4d46,_0x20beda){var _0x2d4c29=_0x2ef38b;try{_0x12429c(_0x2ef38b)&&(_0x2d4c29=JSON[a0_0x5a29('0x1e7')](_0x2ef38b));}catch(_0x4f2a73){return void haoutil[a0_0x5a29('0x827')](_0x4f2a73[a0_0x5a29('0x775')]+':\x20'+_0x4f2a73['message']+a0_0x5a29('0x92d'));}if(_0x2d4c29 instanceof Array){_0x20beda&&u();for(var _0x34df5e=0x0;_0x34df5e<_0x2d4c29['length'];_0x34df5e++){var _0x4548c4=_0x2d4c29[_0x34df5e];if(!_0x4548c4['x']||!_0x4548c4['y'])return void haoutil['alert'](r[a0_0x5a29('0x775')]+':\x20'+r['message']+a0_0x5a29('0x92d'));var _0x21f329={'id':_0x4548c4['id']||_0x4548c4['ID']||'','name':_0x4548c4['name']||_0x4548c4[a0_0x5a29('0x359')]||'','remark':_0x4548c4[a0_0x5a29('0x31c')]||_0x4548c4[a0_0x5a29('0x677')]||''},_0x3346fc={'type':_0x4d4d46[a0_0x5a29('0x519')]||a0_0x5a29('0x3c1'),'attr':_0x21f329,'style':_0x4d4d46[a0_0x5a29('0x46a')]},_0x322fc9=_0x5bcde7[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x4548c4['x'],_0x4548c4['y'],_0x4548c4['z']||0x0),_0x27f3c3=_0x1b5de0[_0x3346fc[a0_0x5a29('0x519')]][a0_0x5a29('0x2f7')](_0x1478ed,_0x3346fc);_0x1b5de0[_0x3346fc['type']][a0_0x5a29('0x10f')](_0x27f3c3,_0x322fc9),_0x47b98c(_0x27f3c3),_0x11fda9[a0_0x5a29('0x3cd')](_0x27f3c3);}return _0x11fda9;}haoutil[a0_0x5a29('0x827')](a0_0x5a29('0x447'));},'deleteEntity':function(_0x33aab0){null!=_0x33aab0&&(_0x33aab0[a0_0x5a29('0x910')](),_0x82367c(_0x11fda9,_0x33aab0),_0x1478ed[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](_0x33aab0));},'deleteCurrentEntity':function(){_0x15f5d1&&(_0x15f5d1['stopEditing'](),_0x82367c(_0x11fda9,_0x15f5d1),_0x1478ed['entities'][a0_0x5a29('0x157')](_0x15f5d1),_0x15f5d1=null);},'deleteAll':function(){_0x69fc1b();for(var _0x4b9eb0=0x0;_0x4b9eb0<_0x11fda9['length'];_0x4b9eb0++){var _0x579085=_0x11fda9[_0x4b9eb0];_0x579085[a0_0x5a29('0x910')](),_0x1478ed[a0_0x5a29('0x8b4')]['remove'](_0x579085);}_0x11fda9=[];},'hasDraw':function(){return _0x11fda9[a0_0x5a29('0x515')]>0x0;},'hasEdit':_0x431c43,'getEntitys':function(){return _0x11fda9;},'getCoordinates':function(_0xe7eb58){var _0x54fc96=_0xe7eb58[a0_0x5a29('0x151')][a0_0x5a29('0x519')];return _0x1b5de0[_0x54fc96]['getCoordinates'](_0xe7eb58);},'getPositions':function(_0x254ada){var _0x19222f=_0x254ada[a0_0x5a29('0x151')][a0_0x5a29('0x519')];return _0x1b5de0[_0x19222f][a0_0x5a29('0xb2')](_0x254ada);},'setPositions':function(_0x52e90c,_0x190746){var _0x44963f=_0x52e90c[a0_0x5a29('0x151')]['type'];_0x190746=_0x1b5de0[_0x44963f][a0_0x5a29('0x10f')](_0x52e90c,_0x190746);}};}var _0x3b6bd7=DC['Namespace'][a0_0x5a29('0x6e8')],_0x23bf35=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4fa004=function(){function _0xdcf6c1(_0x36390c,_0x46d1fc){_0x1ee296()(this,_0xdcf6c1),this[a0_0x5a29('0x673')]=_0x36390c,this[a0_0x5a29('0x40c')]=_0x46d1fc,this[a0_0x5a29('0x86e')]=_0x46d1fc['position'],this[a0_0x5a29('0x34a')]=_0x46d1fc[a0_0x5a29('0x731')],this[a0_0x5a29('0x710')]=_0x46d1fc[a0_0x5a29('0x7da')],this[a0_0x5a29('0x856')]();}return _0x1fafe8()(_0xdcf6c1,[{'key':a0_0x5a29('0x856'),'value':function(){var _0x40a591=this;this['isArray'](this[a0_0x5a29('0x40c')][a0_0x5a29('0x886')])?this[a0_0x5a29('0x40c')][a0_0x5a29('0x886')][a0_0x5a29('0x570')](function(_0x2d2a9b,_0x4445da){return _0x40a591['createVideoWindowAll'](_0x2d2a9b,_0x40a591[a0_0x5a29('0x40c')][a0_0x5a29('0x38b')],_0x40a591[a0_0x5a29('0x86e')][_0x4445da]);}):this['createVideoWindowAll'](this[a0_0x5a29('0x40c')][a0_0x5a29('0x886')],this[a0_0x5a29('0x40c')][a0_0x5a29('0x38b')],this[a0_0x5a29('0x86e')][0x0]);}},{'key':'isArray','value':function(_0x1b2d75){return a0_0x5a29('0x2ae')==typeof Array['isArray']?Array['isArray'](_0x1b2d75):a0_0x5a29('0x7c6')===Object[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](_0x1b2d75);}},{'key':a0_0x5a29('0x8f4'),'value':function(_0x32e972,_0x4e9a12,_0x23869b){var _0x152ab2=this,_0x3d1c3e=_0x23bf35[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x23869b[a0_0x5a29('0x706')],_0x23869b[a0_0x5a29('0x517')],_0x23869b['height']||0xc8),_0x2ebfa6=_0x23bf35[a0_0x5a29('0x85b')]['wgs84ToWindowCoordinates'](this[a0_0x5a29('0x673')]['scene'],_0x3d1c3e),_0x6b0491=document[a0_0x5a29('0x56f')]('div'),_0x3297de='';_0x3297de='string'==typeof this[a0_0x5a29('0x710')]?this['_content']:this[a0_0x5a29('0x710')][0x0][a0_0x5a29('0xc4')],_0x6b0491[a0_0x5a29('0x13d')]=a0_0x5a29('0xfb')+this[a0_0x5a29('0x34a')]+a0_0x5a29('0x2b6')+_0x3297de+a0_0x5a29('0x444'),_0x6b0491['setAttribute']('id',_0x32e972),_0x6b0491[a0_0x5a29('0x38b')]=_0x4e9a12||'',document[a0_0x5a29('0x200')](a0_0x5a29('0x95a'))['appendChild'](_0x6b0491),document['getElementById'](_0x32e972)['style'][a0_0x5a29('0x3a3')]=_0x2ebfa6['x']+'px',document['getElementById'](_0x32e972)[a0_0x5a29('0x46a')][a0_0x5a29('0x5ad')]=_0x2ebfa6['y']-document[a0_0x5a29('0x200')](_0x32e972)[a0_0x5a29('0x50c')]+0x14+'px',console[a0_0x5a29('0x6df')](_0x2ebfa6['x'],document['getElementById'](_0x32e972)[a0_0x5a29('0x44e')]);var _0x2c4b79=new _0x23bf35[(a0_0x5a29('0x11b'))](_0x23869b[a0_0x5a29('0x706')],_0x23869b[a0_0x5a29('0x517')]);_0x152ab2[a0_0x5a29('0x11e')](_0x2c4b79,_0x32e972),this['_viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x225')]['addEventListener'](function(){var _0x1c3f7d=_0xed6b25['a'][a0_0x5a29('0x516')](new _0x926db8['a'](_0x152ab2[a0_0x5a29('0x86e')][a0_0x5a29('0x706')],_0x152ab2[a0_0x5a29('0x86e')][a0_0x5a29('0x517')])),_0x2c159e=_0x23bf35['SceneTransforms'][a0_0x5a29('0x7ee')](_0x152ab2[a0_0x5a29('0x673')][a0_0x5a29('0x238')],_0x1c3f7d);_0x152ab2[a0_0x5a29('0x4e1')]({'transform':_0x2c159e},_0x32e972);});}},{'key':a0_0x5a29('0x150'),'value':function(){}},{'key':a0_0x5a29('0x11e'),'value':function(_0x3feeba,_0x231816){var _0x123965=_0x3feeba['x'],_0xbb5ad4=_0x3feeba['y']-document[a0_0x5a29('0x200')](_0x231816)['offsetHeight'];document[a0_0x5a29('0x200')](_0x231816)['style']['left']=_0x123965+'px',document[a0_0x5a29('0x200')](_0x231816)['style'][a0_0x5a29('0x5ad')]=_0xbb5ad4+'px';}},{'key':a0_0x5a29('0x4e1'),'value':function(_0x47aaaf,_0xac5f61){if(_0x47aaaf[a0_0x5a29('0x44')]){var _0x345dd9=_0x47aaaf[a0_0x5a29('0x44')]['x'],_0x24b1a1=_0x47aaaf[a0_0x5a29('0x44')]['y']-document[a0_0x5a29('0x200')](_0xac5f61)[a0_0x5a29('0x50c')];document[a0_0x5a29('0x200')](_0xac5f61)[a0_0x5a29('0x46a')][a0_0x5a29('0x3a3')]=_0x345dd9+'px',document[a0_0x5a29('0x200')](_0xac5f61)[a0_0x5a29('0x46a')][a0_0x5a29('0x5ad')]=_0x24b1a1+'px';}}},{'key':a0_0x5a29('0x835'),'get':function(){return this['_viewer'];}},{'key':a0_0x5a29('0x731'),'get':function(){return this[a0_0x5a29('0x34a')];}},{'key':'content','get':function(){return this['_content'];}},{'key':a0_0x5a29('0x224'),'get':function(){return this[a0_0x5a29('0x40c')];}},{'key':a0_0x5a29('0x53c'),'get':function(){return this[a0_0x5a29('0x86e')];}}]),_0xdcf6c1;}(),_0x53b8bf=DC['Namespace'][a0_0x5a29('0x6e8')],_0x499bdb=function(){function _0xada648(_0x154384){var _0x7c20d6=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};_0x1ee296()(this,_0xada648),this[a0_0x5a29('0x673')]=_0x154384,this[a0_0x5a29('0x3a2')]=_0x7c20d6,this[a0_0x5a29('0x28b')]=_0x154384['camera']['heading'],this[a0_0x5a29('0x67a')]=_0x53b8bf['JulianDate']['now'](),this[a0_0x5a29('0x903')]=this[a0_0x5a29('0x3a2')]['duration']||0xa,this[a0_0x5a29('0x84d')]=_0x53b8bf['JulianDate']['addSeconds'](this['_startTime'],this[a0_0x5a29('0x903')],new _0x53b8bf[(a0_0x5a29('0x8ab'))]()),this[a0_0x5a29('0x37')]();}return _0x1fafe8()(_0xada648,[{'key':'_start','value':function(){this[a0_0x5a29('0x673')]['clock']['currentTime']=this[a0_0x5a29('0x67a')][a0_0x5a29('0x218')](),this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x83c')]['addEventListener'](this['_onPostUpdateHandler'],this);}},{'key':'_onPostUpdateHandler','value':function(_0x3adaf7,_0x23bbde){var _0x57897c=_0x53b8bf['JulianDate']['secondsDifference'](_0x23bbde,this[a0_0x5a29('0x67a')]),_0x1dea90=_0x53b8bf['Math'][a0_0x5a29('0x78a')](_0x57897c*(0x168/this[a0_0x5a29('0x903')]))+this[a0_0x5a29('0x28b')];this['_viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x294')][a0_0x5a29('0x45')]({'orientation':{'heading':_0x1dea90}}),_0x53b8bf['JulianDate'][a0_0x5a29('0x7b7')](_0x23bbde,this[a0_0x5a29('0x84d')])>=0x0&&(this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x83c')][a0_0x5a29('0x892')](this[a0_0x5a29('0x75e')],this),this['_options']['callback']&&this[a0_0x5a29('0x3a2')]['callback'][a0_0x5a29('0x351')](this['_options'][a0_0x5a29('0x15b')]||this));}}]),_0xada648;}(),_0x5765ce=DC['Namespace'][a0_0x5a29('0x6e8')],_0x454cd8=function(){function _0x27fdf8(_0x34e84d,_0x259df9){var _0x205965=arguments[a0_0x5a29('0x515')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};_0x1ee296()(this,_0x27fdf8),this[a0_0x5a29('0x673')]=_0x34e84d,this['_position']=_0x48df8c['a'][a0_0x5a29('0x853')](_0x259df9),this[a0_0x5a29('0x3a2')]=_0x205965,this[a0_0x5a29('0x28b')]=_0x34e84d['camera'][a0_0x5a29('0x2b2')],this[a0_0x5a29('0x67a')]=_0x5765ce['JulianDate'][a0_0x5a29('0x1eb')](),this['_duration']=this['_options'][a0_0x5a29('0x707')]||0xa,this[a0_0x5a29('0x84d')]=_0x5765ce['JulianDate']['addSeconds'](this[a0_0x5a29('0x67a')],this[a0_0x5a29('0x903')],new _0x5765ce[(a0_0x5a29('0x8ab'))]()),this[a0_0x5a29('0x37')]();}return _0x1fafe8()(_0x27fdf8,[{'key':'_start','value':function(){this[a0_0x5a29('0x673')][a0_0x5a29('0x5f3')][a0_0x5a29('0x584')]=this[a0_0x5a29('0x67a')][a0_0x5a29('0x218')](),this[a0_0x5a29('0x673')][a0_0x5a29('0x238')]['postUpdate']['addEventListener'](this['_onPostUpdateHandler'],this);}},{'key':a0_0x5a29('0x75e'),'value':function(_0x232354,_0x2be105){var _0xd987d1=_0x5765ce[a0_0x5a29('0x8ab')][a0_0x5a29('0x324')](_0x2be105,this['_startTime']),_0x39cf6f=_0x5765ce[a0_0x5a29('0x382')]['toRadians'](_0xd987d1*(0x168/this[a0_0x5a29('0x903')]))+this[a0_0x5a29('0x28b')];_0x232354[a0_0x5a29('0x294')][a0_0x5a29('0x45')]({'destination':_0xed6b25['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),'orientation':{'heading':_0x39cf6f,'pitch':_0x5765ce[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](this[a0_0x5a29('0x3a2')][a0_0x5a29('0x404')]||0x0)}}),this[a0_0x5a29('0x3a2')][a0_0x5a29('0x7b2')]&&_0x232354[a0_0x5a29('0x294')][a0_0x5a29('0x4e5')](this[a0_0x5a29('0x3a2')]['distance']),_0x5765ce[a0_0x5a29('0x8ab')][a0_0x5a29('0x7b7')](_0x2be105,this[a0_0x5a29('0x84d')])>=0x0&&(this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x83c')][a0_0x5a29('0x892')](this['_onPostUpdateHandler'],this),this[a0_0x5a29('0x3a2')][a0_0x5a29('0x591')]&&this[a0_0x5a29('0x3a2')][a0_0x5a29('0x591')][a0_0x5a29('0x351')](this[a0_0x5a29('0x3a2')][a0_0x5a29('0x15b')]||this));}}]),_0x27fdf8;}(),_0x41aae2=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2abcc4=function(){function _0x44a15d(_0x336020){var _0x4903ea=this,_0x525f4e=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x5,_0x315331=arguments[a0_0x5a29('0x515')]>0x2?arguments[0x2]:void 0x0,_0x4ba4a3=arguments[a0_0x5a29('0x515')]>0x3?arguments[0x3]:void 0x0;_0x1ee296()(this,_0x44a15d),this[a0_0x5a29('0x673')]=_0x336020,this['_duration']=_0x525f4e,this[a0_0x5a29('0x491')]=_0x315331,this[a0_0x5a29('0x17b')]();var _0x4d63b3=setTimeout(function(){_0x4903ea[a0_0x5a29('0x5a7')](),_0x4903ea[a0_0x5a29('0x491')]&&_0x4903ea['_callback']['call'](_0x4ba4a3||_0x4903ea),clearTimeout(_0x4d63b3);},0x3e8*Number(this['_duration']));}return _0x1fafe8()(_0x44a15d,[{'key':a0_0x5a29('0x217'),'value':function(_0x3710b5,_0x866f2b){if(_0x3710b5['mode']!==_0x41aae2[a0_0x5a29('0x415')][a0_0x5a29('0x3b1')])return!0x1;var _0x16cf70=_0x41aae2[a0_0x5a29('0x17a')][a0_0x5a29('0x865')](_0x866f2b);if(_0x41aae2[a0_0x5a29('0x1da')](_0x16cf70)){var _0x20f72b=this['_viewer'][a0_0x5a29('0x294')],_0x3bce18=_0x41aae2[a0_0x5a29('0x3bd')]['clone'](_0x20f72b[a0_0x5a29('0x53c')]),_0x462f90=_0x41aae2[a0_0x5a29('0x4e6')][a0_0x5a29('0x8f0')](_0x16cf70);_0x20f72b[a0_0x5a29('0x103')](_0x462f90,_0x3bce18);}}},{'key':'_startRotate','value':function(){this[a0_0x5a29('0x673')]['camera']['lookAtTransform'](_0x41aae2[a0_0x5a29('0x4e6')]['IDENTITY']),this['_viewer'][a0_0x5a29('0x5f3')][a0_0x5a29('0x14a')]=0x2ee0,this['_viewer'][a0_0x5a29('0x238')][a0_0x5a29('0x83c')]['addEventListener'](this[a0_0x5a29('0x217')],this);}},{'key':a0_0x5a29('0x5a7'),'value':function(){this[a0_0x5a29('0x673')]['camera'][a0_0x5a29('0x103')](_0x41aae2[a0_0x5a29('0x4e6')]['IDENTITY']),this[a0_0x5a29('0x673')][a0_0x5a29('0x5f3')][a0_0x5a29('0x14a')]=0x1,this['_viewer'][a0_0x5a29('0x5f3')][a0_0x5a29('0x584')]=_0x41aae2[a0_0x5a29('0x8ab')][a0_0x5a29('0x1eb')]()[a0_0x5a29('0x218')](),this[a0_0x5a29('0x673')]['scene'][a0_0x5a29('0x83c')][a0_0x5a29('0x892')](this['_icrf'],this);}}]),_0x44a15d;}(),_0x40f4d2=_0x5792f(0x14),_0x4d1c8a=_0x5792f['n'](_0x40f4d2),_0x453c2f=_0x5792f(0xc);function _0x509545(_0x48fdb0,_0x4b0ae6){var _0x390881=Object[a0_0x5a29('0x148')](_0x48fdb0);if(Object[a0_0x5a29('0x75')]){var _0x1bff49=Object['getOwnPropertySymbols'](_0x48fdb0);_0x4b0ae6&&(_0x1bff49=_0x1bff49['filter'](function(_0x296ce6){return Object[a0_0x5a29('0x11a')](_0x48fdb0,_0x296ce6)[a0_0x5a29('0x12e')];})),_0x390881['push'][a0_0x5a29('0x758')](_0x390881,_0x1bff49);}return _0x390881;}function _0x30b442(_0x53931f){for(var _0x98d802=0x1;_0x98d802<arguments[a0_0x5a29('0x515')];_0x98d802++){var _0x4bc079=null!=arguments[_0x98d802]?arguments[_0x98d802]:{};_0x98d802%0x2?_0x509545(Object(_0x4bc079),!0x0)[a0_0x5a29('0x570')](function(_0x18e41e){_0x59708f()(_0x53931f,_0x18e41e,_0x4bc079[_0x18e41e]);}):Object[a0_0x5a29('0x711')]?Object['defineProperties'](_0x53931f,Object[a0_0x5a29('0x711')](_0x4bc079)):_0x509545(Object(_0x4bc079))[a0_0x5a29('0x570')](function(_0x3c58d5){Object[a0_0x5a29('0xe7')](_0x53931f,_0x3c58d5,Object[a0_0x5a29('0x11a')](_0x4bc079,_0x3c58d5));});}return _0x53931f;}function _0x10aec0(_0x290145){var _0x54bc6b=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0xbb67ab){return!0x1;}}();return function(){var _0x5de7c9,_0x33914e=_0x3c6509()(_0x290145);if(_0x54bc6b){var _0x207514=_0x3c6509()(this)['constructor'];_0x5de7c9=Reflect['construct'](_0x33914e,arguments,_0x207514);}else _0x5de7c9=_0x33914e['apply'](this,arguments);return _0x1fe488()(this,_0x5de7c9);};}var _0x25a54f=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x2531c6={'size':0x30,'pixelRange':0x28,'minimumClusterSize':0x2,'gradient':{0.0001:_0x25a54f[a0_0x5a29('0x82')]['BLUE']['withAlpha'](0.5),0.001:_0x25a54f[a0_0x5a29('0x82')][a0_0x5a29('0x664')][a0_0x5a29('0x3eb')](0.5),0.01:_0x25a54f[a0_0x5a29('0x82')][a0_0x5a29('0x43d')][a0_0x5a29('0x3eb')](0.5),0.1:_0x25a54f[a0_0x5a29('0x82')][a0_0x5a29('0x442')][a0_0x5a29('0x3eb')](0.5)},'fontSize':0xe,'fontColor':_0x25a54f[a0_0x5a29('0x82')][a0_0x5a29('0x46b')]},_0x38933d=function(_0x44fc73){_0x5a1389()(_0x207207,_0x44fc73);var _0x4f1db7=_0x10aec0(_0x207207);function _0x207207(_0x5cbe66){var _0x61f051,_0x1e9f5c=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:{};return _0x1ee296()(this,_0x207207),(_0x61f051=_0x4f1db7['call'](this,_0x5cbe66))[a0_0x5a29('0xe')]=new _0x25a54f[(a0_0x5a29('0x84b'))](_0x5cbe66),_0x61f051[a0_0x5a29('0x3a2')]=_0x30b442(_0x30b442({},_0x2531c6),_0x1e9f5c),_0x61f051[a0_0x5a29('0xe')][a0_0x5a29('0x3df')]['enabled']=!0x0,_0x61f051['_delegate']['clustering'][a0_0x5a29('0x35d')][a0_0x5a29('0x464')](_0x61f051[a0_0x5a29('0x7d6')],_0x4d1c8a()(_0x61f051)),_0x61f051['_circleCache']={},_0x61f051['_delegate']['clustering'][a0_0x5a29('0x7ad')]=_0x61f051['_options'][a0_0x5a29('0x7ad')],_0x61f051['_delegate'][a0_0x5a29('0x3df')][a0_0x5a29('0x6a0')]=_0x61f051[a0_0x5a29('0x3a2')]['minimumClusterSize'],_0x61f051[a0_0x5a29('0x519')]=_0x453c2f['a'][a0_0x5a29('0x9c')]('cluster'),_0x61f051[a0_0x5a29('0x284')]=_0x1f4e85['a']['INITIALIZED'],_0x61f051;}return _0x1fafe8()(_0x207207,[{'key':a0_0x5a29('0x374'),'value':function(_0xf36f48){var _0x47821a=_0xf36f48[a0_0x5a29('0x54f')](),_0x576526=this[a0_0x5a29('0x3a2')][a0_0x5a29('0xbc')];if(!this[a0_0x5a29('0x39c')][_0x47821a]){var _0x498d2d=document['createElement']('canvas');_0x498d2d['width']=_0x576526,_0x498d2d[a0_0x5a29('0x6b7')]=_0x576526;var _0x126392=_0x498d2d[a0_0x5a29('0x86f')]('2d');_0x126392[a0_0x5a29('0x6ea')](),_0x126392[a0_0x5a29('0x281')](_0x576526/0x18,_0x576526/0x18),_0x126392[a0_0x5a29('0x896')]=_0xf36f48['withAlpha'](0.2)[a0_0x5a29('0x54f')](),_0x126392[a0_0x5a29('0x520')](),_0x126392['arc'](0xc,0xc,0xc,0x0,0x2*Math['PI']),_0x126392['closePath'](),_0x126392[a0_0x5a29('0x10b')](),_0x126392[a0_0x5a29('0x520')](),_0x126392[a0_0x5a29('0x5c8')](0xc,0xc,0x9,0x0,0x2*Math['PI']),_0x126392['fillStyle']=_0xf36f48[a0_0x5a29('0x54f')](),_0x126392['fill'](),_0x126392[a0_0x5a29('0x1ef')](),_0x126392['restore'](),this[a0_0x5a29('0x39c')][_0x47821a]=_0x498d2d[a0_0x5a29('0x46d')]();}return this[a0_0x5a29('0x39c')][_0x47821a];}},{'key':a0_0x5a29('0x7d6'),'value':function(_0x759073,_0x56a9f8){if(!this[a0_0x5a29('0xe')]['clustering']['enabled'])return!0x1;if(_0x56a9f8[a0_0x5a29('0x3c1')][a0_0x5a29('0x4b1')]=!0x0,_0x56a9f8['label']['font']=a0_0x5a29('0x180')[a0_0x5a29('0x6c9')](this[a0_0x5a29('0x3a2')][a0_0x5a29('0x813')],'px\x20sans-serif'),_0x56a9f8[a0_0x5a29('0x7cc')]['fillColor']=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x233')],_0x56a9f8[a0_0x5a29('0x7cc')][a0_0x5a29('0x49a')]=Number['POSITIVE_INFINITY'],this[a0_0x5a29('0xe')][a0_0x5a29('0x8b4')][a0_0x5a29('0x24f')][a0_0x5a29('0x515')]){var _0xb5814c=this[a0_0x5a29('0xe')][a0_0x5a29('0x8b4')][a0_0x5a29('0x24f')][a0_0x5a29('0x515')]||0x0;for(var _0x4edfde in this['_options'][a0_0x5a29('0x6f4')])if(_0x759073['length']>=_0xb5814c*_0x4edfde){_0x56a9f8[a0_0x5a29('0x3c1')][a0_0x5a29('0xfa')]=this['_drawCircle'](this[a0_0x5a29('0x3a2')][a0_0x5a29('0x6f4')][_0x4edfde]),_0x56a9f8[a0_0x5a29('0x3c1')][a0_0x5a29('0x49a')]=Number['POSITIVE_INFINITY'],_0x56a9f8[a0_0x5a29('0x7cc')][a0_0x5a29('0x4b1')]=!0x0;var _0x51c0a5=String(_0x759073[a0_0x5a29('0x515')]+',')[a0_0x5a29('0x515')];_0x56a9f8['label'][a0_0x5a29('0x878')]=new _0x25a54f[(a0_0x5a29('0x11b'))](-this['_options'][a0_0x5a29('0xbc')]/this[a0_0x5a29('0x3a2')][a0_0x5a29('0x813')]*(_0x51c0a5-0x1),0x6);}else _0x759073[a0_0x5a29('0x515')]<=0x1&&(_0x56a9f8[a0_0x5a29('0x7cc')][a0_0x5a29('0x4b1')]=!0x1);}}},{'key':'clear','value':function(){return this[a0_0x5a29('0xe')][a0_0x5a29('0x8b4')]['removeAll'](),this['_cache']={},this[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x787')],this;}},{'key':'enableCluster','set':function(_0x2ee2a3){return this[a0_0x5a29('0xe')]['clustering'][a0_0x5a29('0x352')]=_0x2ee2a3,this;}}]),_0x207207;}(_0x453c2f['a']);_0x453c2f['a'][a0_0x5a29('0x264')]('cluster');var _0x1881b4=_0x38933d;function _0x4a816c(_0x22166e){var _0x4513b8=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x31917b){return!0x1;}}();return function(){var _0xb50c54,_0x254928=_0x3c6509()(_0x22166e);if(_0x4513b8){var _0x1a87be=_0x3c6509()(this)[a0_0x5a29('0x825')];_0xb50c54=Reflect[a0_0x5a29('0x138')](_0x254928,arguments,_0x1a87be);}else _0xb50c54=_0x254928[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0xb50c54);};}var _0x30290b=DC['Namespace']['Cesium'],_0x375c88=function(_0xc2e640){_0x5a1389()(_0x1a9ae3,_0xc2e640);var _0x5b61ce=_0x4a816c(_0x1a9ae3);function _0x1a9ae3(_0x1f2b03){var _0x1bbc16,_0x4d8086=arguments[a0_0x5a29('0x515')]>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:'',_0x3ead4d=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};return _0x1ee296()(this,_0x1a9ae3),(_0x1bbc16=_0x5b61ce[a0_0x5a29('0x351')](this,_0x1f2b03))[a0_0x5a29('0xe')]=_0x30290b[a0_0x5a29('0x222')][a0_0x5a29('0x597')](_0x4d8086,_0x3ead4d),_0x1bbc16[a0_0x5a29('0x519')]=_0x453c2f['a']['getLayerType'](a0_0x5a29('0x6cf')),_0x1bbc16['_state']=_0x1f4e85['a']['INITIALIZED'],_0x1bbc16;}return _0x1fafe8()(_0x1a9ae3,[{'key':a0_0x5a29('0x94b'),'value':function(_0x3f681e,_0x12a288){if(this['_delegate'])return this[a0_0x5a29('0xe')]['then'](function(_0x4a7e71){_0x4a7e71[a0_0x5a29('0x8b4')][a0_0x5a29('0x24f')]['forEach'](function(_0x24b346){_0x3f681e[a0_0x5a29('0x351')](_0x12a288,_0x24b346);});}),this;}},{'key':'show','set':function(_0x11ac8f){var _0x2f0e95=this;this[a0_0x5a29('0x482')]=_0x11ac8f,this[a0_0x5a29('0xe')]&&this[a0_0x5a29('0xe')][a0_0x5a29('0x618')](function(_0x5e6def){_0x5e6def['show']=_0x2f0e95[a0_0x5a29('0x482')];});},'get':function(){return this[a0_0x5a29('0x482')];}}]),_0x1a9ae3;}(_0x453c2f['a']);_0x453c2f['a'][a0_0x5a29('0x264')]('czml');var _0x58de21=_0x375c88,_0x29d206=_0x5792f(0xa);function _0x102767(_0xb6d75e,_0x362fcb){var _0x5d0ebc=Object[a0_0x5a29('0x148')](_0xb6d75e);if(Object[a0_0x5a29('0x75')]){var _0x1f7e94=Object[a0_0x5a29('0x75')](_0xb6d75e);_0x362fcb&&(_0x1f7e94=_0x1f7e94[a0_0x5a29('0x48a')](function(_0x5d3ce3){return Object['getOwnPropertyDescriptor'](_0xb6d75e,_0x5d3ce3)[a0_0x5a29('0x12e')];})),_0x5d0ebc['push'][a0_0x5a29('0x758')](_0x5d0ebc,_0x1f7e94);}return _0x5d0ebc;}function _0x2ffbc7(_0x127d0f){for(var _0x18bf6a=0x1;_0x18bf6a<arguments[a0_0x5a29('0x515')];_0x18bf6a++){var _0x408f8e=null!=arguments[_0x18bf6a]?arguments[_0x18bf6a]:{};_0x18bf6a%0x2?_0x102767(Object(_0x408f8e),!0x0)[a0_0x5a29('0x570')](function(_0x52d588){_0x59708f()(_0x127d0f,_0x52d588,_0x408f8e[_0x52d588]);}):Object['getOwnPropertyDescriptors']?Object[a0_0x5a29('0x4a5')](_0x127d0f,Object[a0_0x5a29('0x711')](_0x408f8e)):_0x102767(Object(_0x408f8e))[a0_0x5a29('0x570')](function(_0x4963d1){Object[a0_0x5a29('0xe7')](_0x127d0f,_0x4963d1,Object[a0_0x5a29('0x11a')](_0x408f8e,_0x4963d1));});}return _0x127d0f;}function _0x21b8b5(_0xf80928){var _0x1095cc=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype']['toString']['call'](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x534308){return!0x1;}}();return function(){var _0xe50d2a,_0x5bdd04=_0x3c6509()(_0xf80928);if(_0x1095cc){var _0x40a871=_0x3c6509()(this)[a0_0x5a29('0x825')];_0xe50d2a=Reflect['construct'](_0x5bdd04,arguments,_0x40a871);}else _0xe50d2a=_0x5bdd04['apply'](this,arguments);return _0x1fe488()(this,_0xe50d2a);};}var _0x2c450c=DC[a0_0x5a29('0x239')]['Cesium'],_0x4299d0=_0x5792f(0x41),_0xb74fa1={'maxOpacity':0.8,'minOpacity':0.1,'blur':0.85,'maxCanvasSize':0x7d0,'minCanvasSize':0x2bc,'radius':0x19,'gradient':{0.4:a0_0x5a29('0x3d9'),0.6:a0_0x5a29('0x69b'),0.8:a0_0x5a29('0x6d6'),0.9:'red'}},_0x3d0ba7=function(_0x44989d){_0x5a1389()(_0x555acc,_0x44989d);var _0x58884e=_0x21b8b5(_0x555acc);function _0x555acc(_0xa9385c,_0x3e8fb1){var _0x33b295;return _0x1ee296()(this,_0x555acc),(_0x33b295=_0x58884e['call'](this,_0xa9385c))[a0_0x5a29('0x3a2')]=_0x2ffbc7(_0x2ffbc7({},_0xb74fa1),_0x3e8fb1),_0x33b295[a0_0x5a29('0x1a8')]=void 0x0,_0x33b295[a0_0x5a29('0x975')]=void 0x0,_0x33b295[a0_0x5a29('0x64a')]=void 0x0,_0x33b295[a0_0x5a29('0x7c4')]=0x1,_0x33b295[a0_0x5a29('0x62')]=[],_0x33b295['_options'][a0_0x5a29('0x4fd')]=1.5*_0x33b295[a0_0x5a29('0x3a2')][a0_0x5a29('0x6e1')],_0x33b295[a0_0x5a29('0xe')]=new _0x2c450c['CustomDataSource'](_0xa9385c),_0x33b295[a0_0x5a29('0x2a8')]=new _0x2c450c['Entity'](),_0x33b295[a0_0x5a29('0x519')]=_0x453c2f['a'][a0_0x5a29('0x9c')](a0_0x5a29('0x72b')),_0x33b295[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x33b295;}return _0x1fafe8()(_0x555acc,[{'key':a0_0x5a29('0x843'),'value':function(){this[a0_0x5a29('0x566')](),this['_viewer']['on'](_0x29d206['f'][a0_0x5a29('0x96')],this[a0_0x5a29('0x486')],this);}},{'key':a0_0x5a29('0x930'),'value':function(){this[a0_0x5a29('0x673')]['off'](_0x29d206['f']['CAMERA_MOVE_END'],this[a0_0x5a29('0x486')],this);}},{'key':a0_0x5a29('0x20'),'value':function(){}},{'key':a0_0x5a29('0x7ff'),'value':function(_0x47c769){_0x47c769=_0xed6b25['a'][a0_0x5a29('0x1e3')](_0x47c769);var _0x367ab7={};return _0x367ab7['x']=Math[a0_0x5a29('0x6e7')]((_0x47c769[a0_0x5a29('0x121')]-this['_mBounds'][a0_0x5a29('0x322')])/this[a0_0x5a29('0x7c4')]+this[a0_0x5a29('0x3a2')][a0_0x5a29('0x4fd')]),_0x367ab7['y']=Math[a0_0x5a29('0x6e7')]((_0x47c769[a0_0x5a29('0x5ea')]-this[a0_0x5a29('0x64a')][a0_0x5a29('0x14b')])/this['_scale']+this[a0_0x5a29('0x3a2')][a0_0x5a29('0x4fd')]),_0x367ab7['y']=this[a0_0x5a29('0x1a8')][a0_0x5a29('0x29d')][a0_0x5a29('0x662')]['height']-_0x367ab7['y'],_0x367ab7;}},{'key':a0_0x5a29('0x533'),'value':function(){var _0x3774c7=_0xed6b25['a']['transformWGS84ToMercator'](new _0x926db8['a'](this[a0_0x5a29('0x975')][a0_0x5a29('0x322')],this[a0_0x5a29('0x975')][a0_0x5a29('0x14b')])),_0x3cb30d=_0xed6b25['a'][a0_0x5a29('0x1e3')](new _0x926db8['a'](this['_bounds'][a0_0x5a29('0x331')],this[a0_0x5a29('0x975')][a0_0x5a29('0x621')]));return{'west':_0x3774c7[a0_0x5a29('0x121')],'south':_0x3774c7[a0_0x5a29('0x5ea')],'east':_0x3cb30d[a0_0x5a29('0x121')],'north':_0x3cb30d[a0_0x5a29('0x5ea')]};}},{'key':a0_0x5a29('0x509'),'value':function(){var _0x589f7a=Math[a0_0x5a29('0x1d2')](this[a0_0x5a29('0x64a')][a0_0x5a29('0x331')]-this[a0_0x5a29('0x64a')][a0_0x5a29('0x322')]),_0x12f450=Math['abs'](this[a0_0x5a29('0x64a')][a0_0x5a29('0x621')]-this[a0_0x5a29('0x64a')][a0_0x5a29('0x14b')]),_0x263546=Math[a0_0x5a29('0x670')](_0x589f7a,_0x12f450),_0x63d020=Math[a0_0x5a29('0x5d5')](_0x589f7a,_0x12f450),_0x23fdc=0x1;_0x263546>this['_options'][a0_0x5a29('0x5ac')]?_0x63d020/(_0x23fdc=_0x263546/this[a0_0x5a29('0x3a2')][a0_0x5a29('0x5ac')])<this[a0_0x5a29('0x3a2')]['minCanvasSize']&&(_0x23fdc=_0x63d020/this[a0_0x5a29('0x3a2')]['minCanvasSize']):_0x63d020<this['_options'][a0_0x5a29('0x550')]&&_0x263546/(_0x23fdc=_0x63d020/this[a0_0x5a29('0x3a2')][a0_0x5a29('0x550')])>this[a0_0x5a29('0x3a2')]['maxCanvasSize']&&(_0x23fdc=_0x263546/this[a0_0x5a29('0x3a2')][a0_0x5a29('0x5ac')]),this[a0_0x5a29('0x7c4')]=_0x23fdc,this['_options']['container']||(this[a0_0x5a29('0x3a2')][a0_0x5a29('0x6d2')]=_0x3d562d['a'][a0_0x5a29('0xa')](a0_0x5a29('0x884'),a0_0x5a29('0x125'),document[a0_0x5a29('0x646')](a0_0x5a29('0x5fa'))[0x0])),this[a0_0x5a29('0x3a2')]['container'][a0_0x5a29('0x46a')][a0_0x5a29('0x91e')]=a0_0x5a29('0x42d')[a0_0x5a29('0x6c9')](_0x589f7a/this['_scale'],'px;\x0a\x20\x20\x20\x20height:')['concat'](_0x12f450/this[a0_0x5a29('0x7c4')],a0_0x5a29('0x1e6')),this[a0_0x5a29('0x1a8')]?this['_heat'][a0_0x5a29('0x8d9')](this[a0_0x5a29('0x3a2')]):this[a0_0x5a29('0x1a8')]=_0x4299d0['create'](this[a0_0x5a29('0x3a2')]);}},{'key':a0_0x5a29('0x4a'),'value':function(){var _0x231c5b=this[a0_0x5a29('0x3a2')][a0_0x5a29('0x4fd')]*this[a0_0x5a29('0x7c4')];this[a0_0x5a29('0x64a')][a0_0x5a29('0x322')]-=_0x231c5b,this[a0_0x5a29('0x64a')][a0_0x5a29('0x14b')]-=_0x231c5b,this[a0_0x5a29('0x64a')][a0_0x5a29('0x331')]+=_0x231c5b,this[a0_0x5a29('0x64a')][a0_0x5a29('0x621')]+=_0x231c5b;var _0x4a8777=_0xed6b25['a'][a0_0x5a29('0x78e')]({'lng':this[a0_0x5a29('0x64a')][a0_0x5a29('0x322')],'lat':this[a0_0x5a29('0x64a')][a0_0x5a29('0x14b')]}),_0x9afc2b=_0xed6b25['a'][a0_0x5a29('0x78e')]({'lng':this['_mBounds']['east'],'lat':this[a0_0x5a29('0x64a')]['north']}),_0x53f428=_0x2c450c['Rectangle'][a0_0x5a29('0x655')](_0x4a8777[a0_0x5a29('0x121')],_0x4a8777[a0_0x5a29('0x5ea')],_0x9afc2b[a0_0x5a29('0x121')],_0x9afc2b[a0_0x5a29('0x5ea')]);this[a0_0x5a29('0x2a8')][a0_0x5a29('0x4b1')]=!0x1,this[a0_0x5a29('0x2a8')][a0_0x5a29('0x4b0')]={'coordinates':_0x53f428,'fill':!0x1,'distanceDisplayCondition':this[a0_0x5a29('0x3a2')][a0_0x5a29('0x43e')]},this['_delegate'][a0_0x5a29('0x8b4')]['add'](this[a0_0x5a29('0x2a8')]);}},{'key':a0_0x5a29('0x486'),'value':function(){var _0x5956e2=0x2710/Math[a0_0x5a29('0x1c3')](this['_viewer'][a0_0x5a29('0x294')][a0_0x5a29('0x2a1')][a0_0x5a29('0x6b7')])*0x3c;_0x5956e2<0xa&&(_0x5956e2=0xa),_0x5956e2>0x3c&&(_0x5956e2=0x3c),this[a0_0x5a29('0x3a2')][a0_0x5a29('0x6e1')]=_0x5956e2,this[a0_0x5a29('0x3a2')]['spacing']=1.5*this[a0_0x5a29('0x3a2')][a0_0x5a29('0x6e1')],this['_heat']&&this[a0_0x5a29('0x1a8')]['configure'](this[a0_0x5a29('0x3a2')]);}},{'key':a0_0x5a29('0x566'),'value':function(){var _0x4585db=this;if(!this['_bounds'])return!0x1;var _0x3f41be=this[a0_0x5a29('0x533')]();this['_mBounds']&&_0x3f41be[a0_0x5a29('0x322')]===this[a0_0x5a29('0x64a')][a0_0x5a29('0x322')]&&_0x3f41be[a0_0x5a29('0x14b')]===this[a0_0x5a29('0x64a')]['south']&&_0x3f41be[a0_0x5a29('0x331')]===this[a0_0x5a29('0x64a')][a0_0x5a29('0x331')]&&_0x3f41be['north']===this[a0_0x5a29('0x64a')][a0_0x5a29('0x621')]||(this[a0_0x5a29('0x64a')]=_0x3f41be,this[a0_0x5a29('0x509')]());var _0x4e7c1b=[];this[a0_0x5a29('0x62')]['forEach'](function(_0x5796d6){var _0x324c55=_0x4585db['_transformWGS84ToHeatmap']({'lng':_0x5796d6['lng']||_0x5796d6['x'],'lat':_0x5796d6[a0_0x5a29('0x5ea')]||_0x5796d6['y']});_0x4e7c1b[a0_0x5a29('0x3cd')]({'x':_0x324c55['x'],'y':_0x324c55['y'],'value':_0x5796d6['value']||0x1});}),this['_heat'][a0_0x5a29('0x8b6')]({'min':0x0,'max':0x1,'data':_0x4e7c1b}),this[a0_0x5a29('0xe')][a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this[a0_0x5a29('0x2a8')]),this['_initEntity']();var _0x2c2bc4=new _0x2c450c[(a0_0x5a29('0x174'))]({'image':this[a0_0x5a29('0x1a8')]['_renderer']['canvas'],'transparent':!0x0});_0x3d562d['c'][a0_0x5a29('0x65f')](this[a0_0x5a29('0x2a8')]['rectangle'],{'fill':!0x0,'material':_0x2c2bc4}),this['_entity'][a0_0x5a29('0x4b1')]=!0x0;}},{'key':a0_0x5a29('0x10f'),'value':function(_0x397484){return _0x397484&&Array[a0_0x5a29('0x7aa')](_0x397484)?(this[a0_0x5a29('0x62')]=_0x397484,this['_bounds']=_0x2c450c[a0_0x5a29('0x382')][a0_0x5a29('0x558')](this[a0_0x5a29('0x62')]),this[a0_0x5a29('0x566')](),this):this;}},{'key':a0_0x5a29('0x887'),'value':function(_0x222431){return this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x222431),this['_bounds']=_0x2c450c[a0_0x5a29('0x382')]['bounds'](this['_positions']),this[a0_0x5a29('0x566')](),this;}},{'key':'setOptions','value':function(_0x39723c){return _0x3d562d['c'][a0_0x5a29('0x65f')](this['_options'],_0x39723c),this[a0_0x5a29('0x1a8')]&&(this['_options']['spacing']=1.5*this[a0_0x5a29('0x3a2')][a0_0x5a29('0x6e1')],this[a0_0x5a29('0x1a8')][a0_0x5a29('0x8d9')](this[a0_0x5a29('0x3a2')])),this;}},{'key':a0_0x5a29('0x8ae'),'get':function(){return this[a0_0x5a29('0x3a2')];}}]),_0x555acc;}(_0x453c2f['a']);_0x453c2f['a'][a0_0x5a29('0x264')](a0_0x5a29('0x72b'));var _0x429bd0=_0x3d0ba7;function _0x45b5bd(_0x391192){var _0xbefbb7=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect['construct']['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x201a1a){return!0x1;}}();return function(){var _0x26faa0,_0x3308a0=_0x3c6509()(_0x391192);if(_0xbefbb7){var _0x4101f1=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x26faa0=Reflect[a0_0x5a29('0x138')](_0x3308a0,arguments,_0x4101f1);}else _0x26faa0=_0x3308a0[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x26faa0);};}var _0x438457=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x56550e=function(_0x5edb33){_0x5a1389()(_0x708296,_0x5edb33);var _0x58de11=_0x45b5bd(_0x708296);function _0x708296(_0x1cc1fb,_0x1cffba){var _0x3420b3,_0x6b363a=arguments[a0_0x5a29('0x515')]>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};if(_0x1ee296()(this,_0x708296),!_0x1cffba)throw new Error(a0_0x5a29('0x477'));return(_0x3420b3=_0x58de11[a0_0x5a29('0x351')](this,_0x1cc1fb))[a0_0x5a29('0xe')]=_0x438457[a0_0x5a29('0x70f')][a0_0x5a29('0x597')](_0x1cffba,_0x6b363a),_0x3420b3[a0_0x5a29('0x519')]=_0x453c2f['a'][a0_0x5a29('0x9c')](a0_0x5a29('0x3d4')),_0x3420b3[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x3420b3;}return _0x1fafe8()(_0x708296,[{'key':a0_0x5a29('0x94b'),'value':function(_0x532a9a,_0x3b45e1){if(this[a0_0x5a29('0xe')])return this[a0_0x5a29('0xe')][a0_0x5a29('0x618')](function(_0x569b51){_0x569b51[a0_0x5a29('0x8b4')][a0_0x5a29('0x24f')][a0_0x5a29('0x570')](function(_0x4c0942){_0x532a9a[a0_0x5a29('0x351')](_0x3b45e1,_0x4c0942);});}),this;}},{'key':a0_0x5a29('0x4b1'),'set':function(_0x3237a3){var _0x405b42=this;this[a0_0x5a29('0x482')]=_0x3237a3,this[a0_0x5a29('0xe')]&&this[a0_0x5a29('0xe')]['then'](function(_0x253a19){_0x253a19[a0_0x5a29('0x4b1')]=_0x405b42['_show'];});},'get':function(){return this[a0_0x5a29('0x482')];}}]),_0x708296;}(_0x453c2f['a']);_0x453c2f['a'][a0_0x5a29('0x264')](a0_0x5a29('0x3d4'));var _0x164fe8=_0x56550e,_0x6f5838=_0x5792f(0x13),_0x444214={'ADD':'add','REMOVE':'remove'},_0x1b5ff8=_0x5792f(0x10);function _0x554c3c(_0xec154c){var _0x42624e=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect['construct'][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x1ee1af){return!0x1;}}();return function(){var _0x57f8a5,_0x306753=_0x3c6509()(_0xec154c);if(_0x42624e){var _0x10a52c=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x57f8a5=Reflect['construct'](_0x306753,arguments,_0x10a52c);}else _0x57f8a5=_0x306753[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x57f8a5);};}var _0x2a076b=DC[a0_0x5a29('0x239')]['Cesium'],_0x3c7a75=function(_0x2fca72){_0x5a1389()(_0xba3ba3,_0x2fca72);var _0x427e03=_0x554c3c(_0xba3ba3);function _0xba3ba3(){return _0x1ee296()(this,_0xba3ba3),_0x427e03[a0_0x5a29('0x351')](this);}return _0x1fafe8()(_0xba3ba3,[{'key':a0_0x5a29('0x343'),'value':function(){var _0x332486=this;Object[a0_0x5a29('0x148')](_0x444214)[a0_0x5a29('0x570')](function(_0x27991f){var _0x4dfc53=_0x444214[_0x27991f];_0x332486[a0_0x5a29('0x931')][_0x4dfc53]=new _0x2a076b['Event']();});}}]),_0xba3ba3;}(_0x1b5ff8['a']),_0x2ae9f4={},_0x5e4c4d=function(){function _0x2aef03(_0x413630){_0x1ee296()(this,_0x2aef03),this[a0_0x5a29('0x5ed')]=_0x413630||_0x3d562d['c']['uuid'](),this[a0_0x5a29('0x673')]=void 0x0,this['_delegate']=void 0x0,this[a0_0x5a29('0x284')]=void 0x0,this[a0_0x5a29('0x370')]=!0x1,this[a0_0x5a29('0x17d')]=new _0x3c7a75(),this[a0_0x5a29('0x519')]=void 0x0,this['on'](_0x444214[a0_0x5a29('0x6cb')],this[a0_0x5a29('0x20c')],this),this['on'](_0x444214[a0_0x5a29('0x945')],this[a0_0x5a29('0x4fc')],this);}return _0x1fafe8()(_0x2aef03,[{'key':a0_0x5a29('0x62c'),'value':function(){}},{'key':'_addedHook','value':function(){}},{'key':a0_0x5a29('0x930'),'value':function(){}},{'key':a0_0x5a29('0x20c'),'value':function(_0x21ae9d){this[a0_0x5a29('0x673')]=_0x21ae9d,this['_mountedHook']&&this[a0_0x5a29('0x62c')](),this[a0_0x5a29('0xe')]&&this['_addable']&&(this[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x238')][a0_0x5a29('0x37c')]['add'](this['_delegate']),this['_addedHook']&&this[a0_0x5a29('0x843')]()),this['_state']=_0x1f4e85['a'][a0_0x5a29('0x85')];}},{'key':'_onRemove','value':function(){this[a0_0x5a29('0x673')]&&this[a0_0x5a29('0xe')]&&this[a0_0x5a29('0x370')]&&(this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x37c')][a0_0x5a29('0x157')](this[a0_0x5a29('0xe')]),this[a0_0x5a29('0xe')]=void 0x0),this[a0_0x5a29('0x930')]&&this[a0_0x5a29('0x930')](),this[a0_0x5a29('0x284')]=_0x1f4e85['a']['REMOVED'];}},{'key':a0_0x5a29('0x55f'),'value':function(_0x414a98){return _0x414a98&&_0x414a98['addEffect']&&_0x414a98[a0_0x5a29('0x5ee')](this),this;}},{'key':'on','value':function(_0x1e88d0,_0xb3c95b,_0x534c2d){return this['_effectEvent']['on'](_0x1e88d0,_0xb3c95b,_0x534c2d||this),this;}},{'key':a0_0x5a29('0x59a'),'value':function(_0x1ac289,_0x3f1af9,_0xe1b779){return this[a0_0x5a29('0x17d')][a0_0x5a29('0x59a')](_0x1ac289,_0x3f1af9,_0xe1b779||this),this;}},{'key':a0_0x5a29('0x93a'),'value':function(_0x2436b8,_0x921ec2){return this[a0_0x5a29('0x17d')]['fire'](_0x2436b8,_0x921ec2),this;}},{'key':'id','get':function(){return this['_id'];}},{'key':a0_0x5a29('0x13a'),'get':function(){return this[a0_0x5a29('0x17d')];}}],[{'key':a0_0x5a29('0x264'),'value':function(_0x459b87){_0x459b87&&(_0x2ae9f4[_0x459b87['toLocaleUpperCase']()]=_0x459b87[a0_0x5a29('0x716')]());}},{'key':'getEffectType','value':function(_0x26abdd){return _0x2ae9f4[_0x26abdd[a0_0x5a29('0x246')]()]||void 0x0;}}]),_0x2aef03;}();function _0xb0b227(_0x39e888){var _0x524c19=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect['construct'])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')]['call'](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x1ea140){return!0x1;}}();return function(){var _0x607827,_0x29772f=_0x3c6509()(_0x39e888);if(_0x524c19){var _0x93fdcd=_0x3c6509()(this)['constructor'];_0x607827=Reflect[a0_0x5a29('0x138')](_0x29772f,arguments,_0x93fdcd);}else _0x607827=_0x29772f[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x607827);};}var _0x472fcb=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x3eda77=function(_0x2eb3e1){_0x5a1389()(_0x4804c3,_0x2eb3e1);var _0x27efaa=_0xb0b227(_0x4804c3);function _0x4804c3(_0x22a4e6,_0x12869e){var _0x20cfd7;return _0x1ee296()(this,_0x4804c3),(_0x20cfd7=_0x27efaa['call'](this,_0x22a4e6))[a0_0x5a29('0x26a')]=_0x12869e||0x2,_0x20cfd7[a0_0x5a29('0x370')]=!0x0,_0x20cfd7[a0_0x5a29('0x519')]=_0x5e4c4d['getEffectType'](a0_0x5a29('0x631')),_0x20cfd7['_state']=_0x1f4e85['a']['INITIALIZED'],_0x20cfd7;}return _0x1fafe8()(_0x4804c3,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0xe')]=_0x472fcb[a0_0x5a29('0x962')][a0_0x5a29('0x263')](),this['_delegate']['uniforms'][a0_0x5a29('0x631')]=this['_brightness'];}},{'key':a0_0x5a29('0x843'),'value':function(){this[a0_0x5a29('0xe')][a0_0x5a29('0x352')]=!0x0;}},{'key':'brightness','set':function(_0x300448){this[a0_0x5a29('0x26a')]=_0x300448,this['_delegate']&&(this['_delegate'][a0_0x5a29('0x14d')][a0_0x5a29('0x631')]=this[a0_0x5a29('0x26a')]);}}]),_0x4804c3;}(_0x5e4c4d);_0x5e4c4d[a0_0x5a29('0x264')]('brightness');var _0x46b120=_0x3eda77;function _0x20b41b(_0xb751df){var _0x23df21=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x12313d){return!0x1;}}();return function(){var _0x37ac17,_0x4fbce1=_0x3c6509()(_0xb751df);if(_0x23df21){var _0x14912d=_0x3c6509()(this)['constructor'];_0x37ac17=Reflect['construct'](_0x4fbce1,arguments,_0x14912d);}else _0x37ac17=_0x4fbce1[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x37ac17);};}var _0x2c4a10=function(_0x3c1d26){_0x5a1389()(_0x8e41c2,_0x3c1d26);var _0x522c06=_0x20b41b(_0x8e41c2);function _0x8e41c2(_0x3d3a2b){var _0x5a0ed6;return _0x1ee296()(this,_0x8e41c2),(_0x5a0ed6=_0x522c06[a0_0x5a29('0x351')](this,_0x3d3a2b))[a0_0x5a29('0x117')]=0x80,_0x5a0ed6['_brightness']=-0.3,_0x5a0ed6[a0_0x5a29('0x8d')]=!0x1,_0x5a0ed6[a0_0x5a29('0x70b')]=0x1,_0x5a0ed6[a0_0x5a29('0x866')]=0x2,_0x5a0ed6[a0_0x5a29('0x5e3')]=0x1,_0x5a0ed6[a0_0x5a29('0x519')]=_0x5e4c4d['getEffectType'](a0_0x5a29('0x3f4')),_0x5a0ed6[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x5a0ed6;}return _0x1fafe8()(_0x8e41c2,[{'key':'_mountedHook','value':function(){this['_delegate']=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x37c')][a0_0x5a29('0x3f4')],this[a0_0x5a29('0x66b')]=this[a0_0x5a29('0x117')],this[a0_0x5a29('0x631')]=this[a0_0x5a29('0x26a')],this[a0_0x5a29('0xc3')]=this[a0_0x5a29('0x8d')],this[a0_0x5a29('0x47d')]=this[a0_0x5a29('0x70b')],this[a0_0x5a29('0x327')]=this[a0_0x5a29('0x866')],this[a0_0x5a29('0x3f5')]=this[a0_0x5a29('0x5e3')];}},{'key':a0_0x5a29('0x843'),'value':function(){this[a0_0x5a29('0xe')][a0_0x5a29('0x352')]=!0x0;}},{'key':a0_0x5a29('0x930'),'value':function(){this[a0_0x5a29('0xe')]&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x352')]=!0x1,this['delegate']=void 0x0);}},{'key':a0_0x5a29('0x66b'),'set':function(_0x3c813b){this[a0_0x5a29('0x117')]=_0x3c813b,this[a0_0x5a29('0xe')]&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x14d')][a0_0x5a29('0x66b')]=this[a0_0x5a29('0x117')]);}},{'key':a0_0x5a29('0x631'),'set':function(_0x40234f){this[a0_0x5a29('0x26a')]=_0x40234f,this['_delegate']&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x14d')][a0_0x5a29('0x631')]=this[a0_0x5a29('0x26a')]);}},{'key':a0_0x5a29('0xc3'),'set':function(_0x4df68d){this[a0_0x5a29('0x8d')]=_0x4df68d,this['_delegate']&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x14d')][a0_0x5a29('0xc3')]=this[a0_0x5a29('0x8d')]);}},{'key':a0_0x5a29('0x47d'),'set':function(_0x580359){this['_delta']=_0x580359,this[a0_0x5a29('0xe')]&&(this[a0_0x5a29('0xe')]['uniforms']['delta']=this[a0_0x5a29('0x70b')]);}},{'key':a0_0x5a29('0x327'),'set':function(_0x2c0a69){this['_sigma']=_0x2c0a69,this[a0_0x5a29('0xe')]&&(this['_delegate'][a0_0x5a29('0x14d')][a0_0x5a29('0x327')]=this[a0_0x5a29('0x866')]);}},{'key':a0_0x5a29('0x3f5'),'set':function(_0x2a7036){this[a0_0x5a29('0x5e3')]=_0x2a7036,this['_delegate']&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x14d')][a0_0x5a29('0x3f5')]=this[a0_0x5a29('0x5e3')]);}}]),_0x8e41c2;}(_0x5e4c4d);_0x5e4c4d['registerType']('bloom');var _0x31517e=_0x2c4a10;function _0x38cfce(_0x362532){var _0x53b925=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x9669e8){return!0x1;}}();return function(){var _0xc59509,_0x21560f=_0x3c6509()(_0x362532);if(_0x53b925){var _0x55b82e=_0x3c6509()(this)[a0_0x5a29('0x825')];_0xc59509=Reflect[a0_0x5a29('0x138')](_0x21560f,arguments,_0x55b82e);}else _0xc59509=_0x21560f[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0xc59509);};}var _0x33abb7=DC[a0_0x5a29('0x239')]['Cesium'],_0x1a7c0e=_0x5792f(0x56),_0x1cbbaa=function(_0x255aa4){_0x5a1389()(_0x593296,_0x255aa4);var _0x40ddbb=_0x38cfce(_0x593296);function _0x593296(_0x2719e4,_0x3599be,_0x51f2b0,_0x4d7ee3,_0x4b1db0){var _0xad2adc;return _0x1ee296()(this,_0x593296),(_0xad2adc=_0x40ddbb[a0_0x5a29('0x351')](this,_0x2719e4))['_position']=_0x48df8c['a'][a0_0x5a29('0x853')](_0x3599be),_0xad2adc[a0_0x5a29('0x973')]=_0x51f2b0||0x0,_0xad2adc[a0_0x5a29('0x7d7')]=_0x33abb7['defaultValue'](_0x4d7ee3,_0x33abb7[a0_0x5a29('0x82')][a0_0x5a29('0x442')]),_0xad2adc[a0_0x5a29('0x903')]=0x3e8*_0x33abb7['defaultValue'](_0x4b1db0,0x1),_0xad2adc[a0_0x5a29('0x370')]=!0x0,_0xad2adc[a0_0x5a29('0x519')]=_0x5e4c4d[a0_0x5a29('0x8fa')](a0_0x5a29('0x54e')),_0xad2adc[a0_0x5a29('0x284')]=_0x1f4e85['a']['INITIALIZED'],_0xad2adc;}return _0x1fafe8()(_0x593296,[{'key':a0_0x5a29('0x62c'),'value':function(){var _0x18fd45=this,_0x17afd2=_0xed6b25['a'][a0_0x5a29('0x516')](this[a0_0x5a29('0x86e')]),_0x3bca46=new _0x33abb7['Cartesian4'](_0x17afd2['x'],_0x17afd2['y'],_0x17afd2['z'],0x1),_0x4a0cde=_0xed6b25['a'][a0_0x5a29('0x516')](new _0x926db8['a'](this['_position'][a0_0x5a29('0x121')],this['_position'][a0_0x5a29('0x5ea')],this['_position'][a0_0x5a29('0x624')]+0x1f4)),_0x8def31=new _0x33abb7[(a0_0x5a29('0xa3'))](_0x4a0cde['x'],_0x4a0cde['y'],_0x4a0cde['z'],0x1),_0x9cc857=new Date()['getTime']();this['_delegate']=new _0x33abb7[(a0_0x5a29('0x4df'))]({'name':this[a0_0x5a29('0x5ed')],'fragmentShader':_0x1a7c0e,'uniforms':{'u_scanCenterEC':function(){return _0x33abb7[a0_0x5a29('0x4e6')][a0_0x5a29('0x2b4')](_0x18fd45[a0_0x5a29('0x673')][a0_0x5a29('0x67e')]['camera']['_viewMatrix'],_0x3bca46,new _0x33abb7[(a0_0x5a29('0xa3'))]());},'u_scanPlaneNormalEC':function(){var _0x1495ce=_0x33abb7[a0_0x5a29('0x4e6')][a0_0x5a29('0x2b4')](_0x18fd45[a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x294')]['_viewMatrix'],_0x3bca46,new _0x33abb7[(a0_0x5a29('0xa3'))]()),_0x33bd47=_0x33abb7[a0_0x5a29('0x4e6')][a0_0x5a29('0x2b4')](_0x18fd45['_viewer'][a0_0x5a29('0x67e')][a0_0x5a29('0x294')][a0_0x5a29('0x63c')],_0x8def31,new _0x33abb7['Cartesian4']()),_0x33bcf5=new _0x33abb7['Cartesian3']();return _0x33bcf5['x']=_0x33bd47['x']-_0x1495ce['x'],_0x33bcf5['y']=_0x33bd47['y']-_0x1495ce['y'],_0x33bcf5['z']=_0x33bd47['z']-_0x1495ce['z'],_0x33abb7['Cartesian3']['normalize'](_0x33bcf5,_0x33bcf5),_0x33bcf5;},'u_radius':function(){return _0x18fd45[a0_0x5a29('0x973')]*((new Date()['getTime']()-_0x9cc857)%_0x18fd45[a0_0x5a29('0x903')])/_0x18fd45['_duration'];},'u_scanColor':this['_color']}});}}]),_0x593296;}(_0x5e4c4d);_0x5e4c4d[a0_0x5a29('0x264')](a0_0x5a29('0x54e'));var _0x5bb7b9=_0x1cbbaa;function _0x586fc3(_0x29fa90){var _0x4f38ce=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')]['toString'][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x1c3d87){return!0x1;}}();return function(){var _0xf87f93,_0x1eb1f2=_0x3c6509()(_0x29fa90);if(_0x4f38ce){var _0x127d1a=_0x3c6509()(this)[a0_0x5a29('0x825')];_0xf87f93=Reflect[a0_0x5a29('0x138')](_0x1eb1f2,arguments,_0x127d1a);}else _0xf87f93=_0x1eb1f2[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0xf87f93);};}var _0x2ebfc5=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4097cb=_0x5792f(0x57),_0x4a1013=function(_0x47c7ba){_0x5a1389()(_0x35b1df,_0x47c7ba);var _0x5c362e=_0x586fc3(_0x35b1df);function _0x35b1df(_0x23b681,_0xcfdcf6,_0x17da16){var _0x508699;return _0x1ee296()(this,_0x35b1df),(_0x508699=_0x5c362e['call'](this,_0x23b681))[a0_0x5a29('0x2b')]=_0x17da16,_0x508699[a0_0x5a29('0x542')]=_0xcfdcf6||new _0x2ebfc5[(a0_0x5a29('0x82'))](0.8,0.8,0.8,0.5),_0x508699[a0_0x5a29('0x370')]=!0x0,_0x508699[a0_0x5a29('0x519')]=_0x5e4c4d[a0_0x5a29('0x8fa')](a0_0x5a29('0x23e')),_0x508699[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x508699;}return _0x1fafe8()(_0x35b1df,[{'key':a0_0x5a29('0x62c'),'value':function(){var _0x3c9332,_0xbe13c7,_0x7f2f77,_0x4ebf51;this[a0_0x5a29('0xe')]=new _0x2ebfc5[(a0_0x5a29('0x4df'))]({'name':this[a0_0x5a29('0x5ed')],'fragmentShader':_0x4097cb,'uniforms':{'fogByDistance':new _0x2ebfc5[(a0_0x5a29('0xa3'))]((null===(_0x3c9332=this[a0_0x5a29('0x2b')])||void 0x0===_0x3c9332?void 0x0:_0x3c9332['near'])||0xa,(null===(_0xbe13c7=this['_fogByDistance'])||void 0x0===_0xbe13c7?void 0x0:_0xbe13c7[a0_0x5a29('0x89e')])||0x0,(null===(_0x7f2f77=this[a0_0x5a29('0x2b')])||void 0x0===_0x7f2f77?void 0x0:_0x7f2f77['far'])||0xc8,(null===(_0x4ebf51=this['_fogByDistance'])||void 0x0===_0x4ebf51?void 0x0:_0x4ebf51[a0_0x5a29('0x6f3')])||0x1),'fogColor':this['_fogColor']}});}},{'key':a0_0x5a29('0x61c'),'set':function(_0x48ba01){var _0x109844,_0x5d31bd,_0x4d088f,_0x47300f;this[a0_0x5a29('0x2b')]=_0x48ba01,this['_delegate'][a0_0x5a29('0x14d')][a0_0x5a29('0x61c')]=new _0x2ebfc5[(a0_0x5a29('0xa3'))]((null===(_0x109844=this[a0_0x5a29('0x2b')])||void 0x0===_0x109844?void 0x0:_0x109844[a0_0x5a29('0x4a3')])||0xa,(null===(_0x5d31bd=this['_fogByDistance'])||void 0x0===_0x5d31bd?void 0x0:_0x5d31bd[a0_0x5a29('0x89e')])||0x0,(null===(_0x4d088f=this[a0_0x5a29('0x2b')])||void 0x0===_0x4d088f?void 0x0:_0x4d088f['far'])||0xc8,(null===(_0x47300f=this['_fogByDistance'])||void 0x0===_0x47300f?void 0x0:_0x47300f[a0_0x5a29('0x6f3')])||0x1);}},{'key':'fogColor','set':function(_0x67a432){this[a0_0x5a29('0x542')]=_0x67a432,this['_delegate'][a0_0x5a29('0x14d')][a0_0x5a29('0x820')]=this[a0_0x5a29('0x542')];}}]),_0x35b1df;}(_0x5e4c4d);_0x5e4c4d[a0_0x5a29('0x264')](a0_0x5a29('0x23e'));var _0x1608f3=_0x4a1013;function _0xf05a8f(_0x2989d6){var _0x219197=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype']['toString'][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x5f0cb9){return!0x1;}}();return function(){var _0x360be2,_0x441dc3=_0x3c6509()(_0x2989d6);if(_0x219197){var _0x288a19=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x360be2=Reflect['construct'](_0x441dc3,arguments,_0x288a19);}else _0x360be2=_0x441dc3[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x360be2);};}var _0x194095=DC['Namespace']['Cesium'],_0x1b6317=_0x5792f(0x58),_0x31e311=function(_0x4de2c4){_0x5a1389()(_0x17c252,_0x4de2c4);var _0x1bded7=_0xf05a8f(_0x17c252);function _0x17c252(_0x1c440a,_0x52f059,_0x2b4302,_0x31b043,_0x7a8974){var _0x4a3301;return _0x1ee296()(this,_0x17c252),(_0x4a3301=_0x1bded7[a0_0x5a29('0x351')](this,_0x1c440a))[a0_0x5a29('0x86e')]=_0x48df8c['a'][a0_0x5a29('0x853')](_0x52f059),_0x4a3301['_radius']=_0x2b4302||0x0,_0x4a3301['_color']=_0x194095['defaultValue'](_0x31b043,_0x194095[a0_0x5a29('0x82')]['RED']),_0x4a3301[a0_0x5a29('0x903')]=0x3e8*_0x194095[a0_0x5a29('0x3d0')](_0x7a8974,0x1),_0x4a3301[a0_0x5a29('0x370')]=!0x0,_0x4a3301[a0_0x5a29('0x519')]=_0x5e4c4d[a0_0x5a29('0x8fa')](a0_0x5a29('0x2f1')),_0x4a3301[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x4a3301;}return _0x1fafe8()(_0x17c252,[{'key':a0_0x5a29('0x62c'),'value':function(){var _0x4f318c=this,_0x283f7e=_0xed6b25['a']['transformWGS84ToCartesian'](this['_position']),_0x1927cd=new _0x194095[(a0_0x5a29('0xa3'))](_0x283f7e['x'],_0x283f7e['y'],_0x283f7e['z'],0x1),_0x4946cd=_0xed6b25['a'][a0_0x5a29('0x516')](new _0x926db8['a'](this['_position']['lng'],this[a0_0x5a29('0x86e')][a0_0x5a29('0x5ea')],this[a0_0x5a29('0x86e')]['alt']+0x1f4)),_0x2fd492=new _0x194095[(a0_0x5a29('0xa3'))](_0x4946cd['x'],_0x4946cd['y'],_0x4946cd['z'],0x1),_0x450c85=_0xed6b25['a'][a0_0x5a29('0x516')](new _0x926db8['a'](this[a0_0x5a29('0x86e')][a0_0x5a29('0x121')]+0.001,this['_position'][a0_0x5a29('0x5ea')],this[a0_0x5a29('0x86e')][a0_0x5a29('0x624')])),_0x22e7a0=new _0x194095[(a0_0x5a29('0xa3'))](_0x450c85['x'],_0x450c85['y'],_0x450c85['z'],0x1),_0x580635=new Date()[a0_0x5a29('0x882')](),_0x452e76=new _0x194095['Quaternion'](),_0x213652=new _0x194095[(a0_0x5a29('0x3a1'))](),_0x5e0e1b=new _0x194095[(a0_0x5a29('0xa3'))](),_0xe8a39a=new _0x194095[(a0_0x5a29('0xa3'))](),_0x1f423d=new _0x194095[(a0_0x5a29('0xa3'))](),_0x19f760=new _0x194095[(a0_0x5a29('0x3bd'))](),_0x1adf96=new _0x194095['Cartesian3']();this[a0_0x5a29('0xe')]=new _0x194095['PostProcessStage']({'name':this[a0_0x5a29('0x5ed')],'fragmentShader':_0x1b6317,'uniforms':{'u_scanCenterEC':function(){return _0x194095[a0_0x5a29('0x4e6')][a0_0x5a29('0x2b4')](_0x4f318c[a0_0x5a29('0x673')]['camera']['_viewMatrix'],_0x1927cd,_0x5e0e1b);},'u_scanPlaneNormalEC':function(){var _0x59f497=_0x194095[a0_0x5a29('0x4e6')]['multiplyByVector'](_0x4f318c['_viewer']['camera'][a0_0x5a29('0x63c')],_0x1927cd,_0x5e0e1b),_0x2ebca3=_0x194095[a0_0x5a29('0x4e6')][a0_0x5a29('0x2b4')](_0x4f318c[a0_0x5a29('0x673')][a0_0x5a29('0x294')][a0_0x5a29('0x63c')],_0x2fd492,_0xe8a39a);return _0x19f760['x']=_0x2ebca3['x']-_0x59f497['x'],_0x19f760['y']=_0x2ebca3['y']-_0x59f497['y'],_0x19f760['z']=_0x2ebca3['z']-_0x59f497['z'],_0x194095[a0_0x5a29('0x3bd')]['normalize'](_0x19f760,_0x19f760),_0x19f760;},'u_scanLineNormalEC':function(){var _0x3ab4d4=_0x194095[a0_0x5a29('0x4e6')][a0_0x5a29('0x2b4')](_0x4f318c[a0_0x5a29('0x673')]['camera'][a0_0x5a29('0x63c')],_0x1927cd,_0x5e0e1b),_0x4bc65b=_0x194095[a0_0x5a29('0x4e6')][a0_0x5a29('0x2b4')](_0x4f318c[a0_0x5a29('0x673')][a0_0x5a29('0x294')][a0_0x5a29('0x63c')],_0x2fd492,_0xe8a39a),_0x43b415=_0x194095[a0_0x5a29('0x4e6')]['multiplyByVector'](_0x4f318c[a0_0x5a29('0x673')]['camera'][a0_0x5a29('0x63c')],_0x22e7a0,_0x1f423d);_0x19f760['x']=_0x4bc65b['x']-_0x3ab4d4['x'],_0x19f760['y']=_0x4bc65b['y']-_0x3ab4d4['y'],_0x19f760['z']=_0x4bc65b['z']-_0x3ab4d4['z'],_0x194095[a0_0x5a29('0x3bd')][a0_0x5a29('0x7d3')](_0x19f760,_0x19f760),_0x1adf96['x']=_0x43b415['x']-_0x3ab4d4['x'],_0x1adf96['y']=_0x43b415['y']-_0x3ab4d4['y'],_0x1adf96['z']=_0x43b415['z']-_0x3ab4d4['z'];var _0x4fdbd7=(new Date()[a0_0x5a29('0x882')]()-_0x580635)%_0x4f318c[a0_0x5a29('0x903')]/_0x4f318c[a0_0x5a29('0x903')];return _0x194095[a0_0x5a29('0xb')][a0_0x5a29('0x504')](_0x19f760,_0x4fdbd7*_0x194095[a0_0x5a29('0x382')]['PI']*0x2,_0x452e76),_0x194095['Matrix3'][a0_0x5a29('0x1be')](_0x452e76,_0x213652),_0x194095['Matrix3'][a0_0x5a29('0x2b4')](_0x213652,_0x1adf96,_0x1adf96),_0x194095[a0_0x5a29('0x3bd')][a0_0x5a29('0x7d3')](_0x1adf96,_0x1adf96),_0x1adf96;},'u_radius':this[a0_0x5a29('0x973')],'u_scanColor':this[a0_0x5a29('0x7d7')]}});}}]),_0x17c252;}(_0x5e4c4d);_0x5e4c4d['registerType'](a0_0x5a29('0x2f1'));var _0x3f7716=_0x31e311;function _0x1a0b74(_0x752d8c){var _0x4e519f=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')][a0_0x5a29('0x249')])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x8cc807){return!0x1;}}();return function(){var _0x4b4cee,_0x206c6c=_0x3c6509()(_0x752d8c);if(_0x4e519f){var _0x32616a=_0x3c6509()(this)['constructor'];_0x4b4cee=Reflect[a0_0x5a29('0x138')](_0x206c6c,arguments,_0x32616a);}else _0x4b4cee=_0x206c6c[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x4b4cee);};}var _0xbc23eb=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4adc23=_0x5792f(0x59),_0x2b22c3=function(_0x34bfa1){_0x5a1389()(_0x187358,_0x34bfa1);var _0xfc6c9f=_0x1a0b74(_0x187358);function _0x187358(_0x53f128,_0xb7317c){var _0x328891;return _0x1ee296()(this,_0x187358),(_0x328891=_0xfc6c9f['call'](this,_0x53f128))['_addable']=!0x0,_0x328891[a0_0x5a29('0xac')]=_0xb7317c||0xa,_0x328891[a0_0x5a29('0x519')]=_0x5e4c4d[a0_0x5a29('0x8fa')](a0_0x5a29('0x5b0')),_0x328891[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')],_0x328891;}return _0x1fafe8()(_0x187358,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0xe')]=new _0xbc23eb[(a0_0x5a29('0x4df'))]({'name':this[a0_0x5a29('0x5ed')],'fragmentShader':_0x4adc23,'uniforms':{'speed':this[a0_0x5a29('0xac')]}});}},{'key':a0_0x5a29('0x7e1'),'set':function(_0x55ecf2){this[a0_0x5a29('0xac')]=_0x55ecf2,this[a0_0x5a29('0xe')]&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x14d')][a0_0x5a29('0x7e1')]=this[a0_0x5a29('0xac')]);},'get':function(){return this[a0_0x5a29('0xac')];}}]),_0x187358;}(_0x5e4c4d);_0x5e4c4d[a0_0x5a29('0x264')](a0_0x5a29('0x5b0'));var _0x2fe97f=_0x2b22c3;function _0xd96f38(_0x773773){var _0x20bbed=function(){if(a0_0x5a29('0x6c2')==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if('function'==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect['construct'](Date,[],function(){})),!0x0;}catch(_0x4fccfe){return!0x1;}}();return function(){var _0x1bc341,_0x75a6b4=_0x3c6509()(_0x773773);if(_0x20bbed){var _0x515abd=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x1bc341=Reflect[a0_0x5a29('0x138')](_0x75a6b4,arguments,_0x515abd);}else _0x1bc341=_0x75a6b4[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x1bc341);};}var _0x422a0f=DC['Namespace'][a0_0x5a29('0x6e8')],_0x39b000=_0x5792f(0x5a),_0x108a12=function(_0x589aac){_0x5a1389()(_0x2a19a9,_0x589aac);var _0x168d85=_0xd96f38(_0x2a19a9);function _0x2a19a9(_0x2db6f7,_0x75ae69){var _0x1dfc6b;return _0x1ee296()(this,_0x2a19a9),(_0x1dfc6b=_0x168d85[a0_0x5a29('0x351')](this,_0x2db6f7))[a0_0x5a29('0x370')]=!0x0,_0x1dfc6b['_speed']=_0x75ae69||0xa,_0x1dfc6b[a0_0x5a29('0x519')]=_0x5e4c4d[a0_0x5a29('0x8fa')]('snow'),_0x1dfc6b[a0_0x5a29('0x284')]=_0x1f4e85['a']['INITIALIZED'],_0x1dfc6b;}return _0x1fafe8()(_0x2a19a9,[{'key':'_mountedHook','value':function(){this['_delegate']=new _0x422a0f[(a0_0x5a29('0x4df'))]({'name':this[a0_0x5a29('0x5ed')],'fragmentShader':_0x39b000,'uniforms':{'speed':this[a0_0x5a29('0xac')]}});}},{'key':a0_0x5a29('0x7e1'),'set':function(_0x296dea){this['_speed']=_0x296dea,this[a0_0x5a29('0xe')]&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x14d')][a0_0x5a29('0x7e1')]=this[a0_0x5a29('0xac')]);},'get':function(){return this[a0_0x5a29('0xac')];}}]),_0x2a19a9;}(_0x5e4c4d);_0x5e4c4d[a0_0x5a29('0x264')](a0_0x5a29('0x4e'));var _0x4d8b11=_0x108a12;function _0x2c6cac(_0xe55da){var _0x39d35c=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date['prototype']['toString'][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x95d923){return!0x1;}}();return function(){var _0x48e39e,_0x540450=_0x3c6509()(_0xe55da);if(_0x39d35c){var _0x15915d=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x48e39e=Reflect[a0_0x5a29('0x138')](_0x540450,arguments,_0x15915d);}else _0x48e39e=_0x540450[a0_0x5a29('0x758')](this,arguments);return _0x1fe488()(this,_0x48e39e);};}var _0x46199a=DC[a0_0x5a29('0x239')]['Cesium'],_0x23c190=function(_0x5b5b35){_0x5a1389()(_0xbfcfa,_0x5b5b35);var _0x1f89ad=_0x2c6cac(_0xbfcfa);function _0xbfcfa(_0x498580){var _0x30cd3c;return _0x1ee296()(this,_0xbfcfa),(_0x30cd3c=_0x1f89ad[a0_0x5a29('0x351')](this,_0x498580))[a0_0x5a29('0x519')]=_0x5e4c4d['getEffectType'](a0_0x5a29('0x8ba')),_0x30cd3c[a0_0x5a29('0x370')]=!0x0,_0x30cd3c['_state']=_0x1f4e85['a']['INITIALIZED'],_0x30cd3c;}return _0x1fafe8()(_0xbfcfa,[{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0xe')]=_0x46199a['PostProcessStageLibrary'][a0_0x5a29('0x441')]();}},{'key':a0_0x5a29('0x843'),'value':function(){this[a0_0x5a29('0xe')][a0_0x5a29('0x352')]=!0x0;}}]),_0xbfcfa;}(_0x5e4c4d);_0x5e4c4d[a0_0x5a29('0x264')]('night_vision');var _0x328623=_0x23c190,_0x1d61a2={'FP':'1','TP':'2','TRACKED':a0_0x5a29('0x3a7'),'FREE':a0_0x5a29('0x879')},_0x511892={'ADD':'add','REMOVE':a0_0x5a29('0x157'),'POST_UPDATE':a0_0x5a29('0x83c'),'ACTIVE':a0_0x5a29('0x8a6'),'RELEASE':'release'};function _0x26d017(_0x363172){var _0x189508=function(){if('undefined'==typeof Reflect||!Reflect[a0_0x5a29('0x138')])return!0x1;if(Reflect[a0_0x5a29('0x138')]['sham'])return!0x1;if(a0_0x5a29('0x2ae')==typeof Proxy)return!0x0;try{return Date[a0_0x5a29('0x928')][a0_0x5a29('0x857')][a0_0x5a29('0x351')](Reflect[a0_0x5a29('0x138')](Date,[],function(){})),!0x0;}catch(_0x4a93c5){return!0x1;}}();return function(){var _0x53cf56,_0x46c3ea=_0x3c6509()(_0x363172);if(_0x189508){var _0x35be66=_0x3c6509()(this)[a0_0x5a29('0x825')];_0x53cf56=Reflect['construct'](_0x46c3ea,arguments,_0x35be66);}else _0x53cf56=_0x46c3ea['apply'](this,arguments);return _0x1fe488()(this,_0x53cf56);};}var _0x1cbe65=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')],_0x4fdf49=function(_0x24db2a){_0x5a1389()(_0x2503e6,_0x24db2a);var _0x298d8f=_0x26d017(_0x2503e6);function _0x2503e6(){return _0x1ee296()(this,_0x2503e6),_0x298d8f[a0_0x5a29('0x351')](this);}return _0x1fafe8()(_0x2503e6,[{'key':a0_0x5a29('0x343'),'value':function(){var _0x5e97a2=this;Object[a0_0x5a29('0x148')](_0x511892)[a0_0x5a29('0x570')](function(_0x2c3cb7){var _0x4b7006=_0x511892[_0x2c3cb7];_0x5e97a2[a0_0x5a29('0x931')][_0x4b7006]=new _0x1cbe65['Event']();});}}]),_0x2503e6;}(_0x1b5ff8['a']);function _0x1c559a(_0x4273a3,_0x4cc44a){var _0x10262d=Object[a0_0x5a29('0x148')](_0x4273a3);if(Object[a0_0x5a29('0x75')]){var _0x54c59f=Object[a0_0x5a29('0x75')](_0x4273a3);_0x4cc44a&&(_0x54c59f=_0x54c59f[a0_0x5a29('0x48a')](function(_0x5f2532){return Object[a0_0x5a29('0x11a')](_0x4273a3,_0x5f2532)[a0_0x5a29('0x12e')];})),_0x10262d[a0_0x5a29('0x3cd')][a0_0x5a29('0x758')](_0x10262d,_0x54c59f);}return _0x10262d;}function _0x4e3692(_0x2b798c){for(var _0xc87138=0x1;_0xc87138<arguments[a0_0x5a29('0x515')];_0xc87138++){var _0x58f289=null!=arguments[_0xc87138]?arguments[_0xc87138]:{};_0xc87138%0x2?_0x1c559a(Object(_0x58f289),!0x0)['forEach'](function(_0x3cd110){_0x59708f()(_0x2b798c,_0x3cd110,_0x58f289[_0x3cd110]);}):Object[a0_0x5a29('0x711')]?Object[a0_0x5a29('0x4a5')](_0x2b798c,Object['getOwnPropertyDescriptors'](_0x58f289)):_0x1c559a(Object(_0x58f289))[a0_0x5a29('0x570')](function(_0x31e26a){Object[a0_0x5a29('0xe7')](_0x2b798c,_0x31e26a,Object[a0_0x5a29('0x11a')](_0x58f289,_0x31e26a));});}return _0x2b798c;}var _0x1db41a=DC['Namespace'][a0_0x5a29('0x6e8')],_0x15babe={'showPath':!0x1,'pathWidth':0x1,'pathMaterial':_0x1db41a[a0_0x5a29('0x82')][a0_0x5a29('0x43d')][a0_0x5a29('0x3eb')](0.8),'pathLeadTime':0x1},_0x306cca=function(){function _0x157277(_0x29d7ad,_0x2a4291,_0xc907a0){_0x1ee296()(this,_0x157277),this[a0_0x5a29('0x5ed')]=_0x29d7ad||_0x3d562d['c'][a0_0x5a29('0x5f9')](),this['_startTime']=void 0x0,this[a0_0x5a29('0x5ef')]=void 0x0,this['_duration']=0x0,this[a0_0x5a29('0x4c3')]=a0_0x5a29('0x7e1'),this[a0_0x5a29('0xe')]=new _0x1db41a[(a0_0x5a29('0x608'))](),this[a0_0x5a29('0x62')]=[],this[a0_0x5a29('0x330')]=void 0x0,this['_isActive']=!0x1,this[a0_0x5a29('0x3e7')]=_0x2a4291,this['_options']=_0x4e3692(_0x4e3692({},_0x15babe),_0xc907a0),this['_positionIndex']=0x0,this[a0_0x5a29('0x336')]=[],this[a0_0x5a29('0x4b')]=new _0x4fdf49(),this['_roamingEvent']['on'](_0x511892['POST_UPDATE'],this['_onPostUpdate'],this),this['_roamingEvent']['on'](_0x511892['ADD'],this[a0_0x5a29('0x20c')],this),this[a0_0x5a29('0x4b')]['on'](_0x511892[a0_0x5a29('0x945')],this['_onRemove'],this),this['_roamingEvent']['on'](_0x511892['ACTIVE'],this['_onActive'],this),this[a0_0x5a29('0x4b')]['on'](_0x511892[a0_0x5a29('0x83e')],this[a0_0x5a29('0x654')],this),this[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x8f1')];}return _0x1fafe8()(_0x157277,[{'key':a0_0x5a29('0x20c'),'value':function(_0x5d4f3e){this[a0_0x5a29('0x5ef')]=_0x5d4f3e,this['_startTime']=_0x5d4f3e[a0_0x5a29('0x5d7')],this[a0_0x5a29('0x903')]=_0x5d4f3e[a0_0x5a29('0x707')],this[a0_0x5a29('0x2fc')](),this[a0_0x5a29('0xe')]['position']||this['_mountPosition'](),this[a0_0x5a29('0x62c')]&&this[a0_0x5a29('0x62c')](),this[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x85')];}},{'key':a0_0x5a29('0x4fc'),'value':function(){this['_controller']&&(this['_controller'][a0_0x5a29('0x673')][a0_0x5a29('0x67e')]['entities']['remove'](this[a0_0x5a29('0xe')]),this[a0_0x5a29('0x284')]=_0x1f4e85['a'][a0_0x5a29('0x476')],this[a0_0x5a29('0x823')]&&(this[a0_0x5a29('0x5ef')][a0_0x5a29('0x673')][a0_0x5a29('0x294')][a0_0x5a29('0x103')](_0x1db41a[a0_0x5a29('0x4e6')][a0_0x5a29('0xa2')]),this[a0_0x5a29('0x5ef')][a0_0x5a29('0x673')][a0_0x5a29('0x67e')][a0_0x5a29('0x1cf')]=void 0x0));}},{'key':'_onPostUpdate','value':function(_0x319876){var _0x226c2a=_0x319876[a0_0x5a29('0x584')],_0x4ed724=this[a0_0x5a29('0xe')][a0_0x5a29('0x20f')][a0_0x5a29('0x94c')](_0x226c2a),_0x149d61=this['_timeLine'][this[a0_0x5a29('0x5f7')]];if(_0x149d61){var _0x1e6356=_0x1db41a[a0_0x5a29('0x8ab')][a0_0x5a29('0x324')](_0x226c2a,_0x149d61);_0x1e6356>=0x0&&_0x1e6356<=0x1&&(this[a0_0x5a29('0x3e7')]&&this['_tickCallback'](this[a0_0x5a29('0x62')][this[a0_0x5a29('0x5f7')]],_0x4ed724,this[a0_0x5a29('0x5f7')]+0x1===this[a0_0x5a29('0x62')][a0_0x5a29('0x515')]),this[a0_0x5a29('0x5f7')]+=0x1);}this[a0_0x5a29('0x823')]&&this['_setView'](_0x226c2a,_0x319876['viewMode'],_0x319876[a0_0x5a29('0x470')]);}},{'key':a0_0x5a29('0x2dd'),'value':function(){this[a0_0x5a29('0x823')]=!0x0;}},{'key':a0_0x5a29('0x654'),'value':function(){this[a0_0x5a29('0x823')]=!0x1;}},{'key':a0_0x5a29('0xbb'),'value':function(_0x26ea5c,_0x2f32f4,_0x3184c){var _0x2238dc=this['_controller'][a0_0x5a29('0x673')][a0_0x5a29('0x67e')],_0xc0b845=this['_controller'][a0_0x5a29('0x673')][a0_0x5a29('0x294')],_0x438aaa=this['_sampledPosition']['getValue'](_0x26ea5c),_0x4e6121=this['_sampledPosition'][a0_0x5a29('0x94c')](_0x1db41a['JulianDate']['addSeconds'](_0x26ea5c,0x1/0x3c,new _0x1db41a['JulianDate']()));if(_0x438aaa&&_0x4e6121&&_0x2f32f4){if(_0x2f32f4===_0x1d61a2[a0_0x5a29('0x350')])_0x2238dc[a0_0x5a29('0x1cf')]=this[a0_0x5a29('0xe')];else{if(_0x2f32f4===_0x1d61a2['FP']){var _0x5a0274=_0x1db41a['Math']['heading'](_0x438aaa,_0x4e6121),_0x2ce37f=_0xed6b25['a']['transformCartesianToWGS84'](_0x438aaa);_0x2ce37f[a0_0x5a29('0x624')]=_0x3184c[a0_0x5a29('0x624')]||0x5,_0xc0b845['lookAt'](_0xed6b25['a']['transformWGS84ToCartesian'](_0x2ce37f),new _0x1db41a['HeadingPitchRange'](_0x5a0274,_0x1db41a[a0_0x5a29('0x382')][a0_0x5a29('0x78a')](_0x3184c[a0_0x5a29('0x404')]||0x0),_0x3184c['range']||0xa));}else _0x2f32f4===_0x1d61a2['TP']&&_0xc0b845['lookAt'](_0x438aaa,new _0x1db41a[(a0_0x5a29('0x85f'))](0x0,-0x5a,_0x3184c[a0_0x5a29('0x275')]||0x3e8));}}else _0xc0b845[a0_0x5a29('0x103')](_0x1db41a[a0_0x5a29('0x4e6')][a0_0x5a29('0xa2')]),_0x2238dc[a0_0x5a29('0x1cf')]=void 0x0;}},{'key':a0_0x5a29('0x2fc'),'value':function(){this[a0_0x5a29('0x3a2')][a0_0x5a29('0x159')]&&(this[a0_0x5a29('0xe')][a0_0x5a29('0x16b')]=new _0x1db41a[(a0_0x5a29('0x58a'))]([new _0x1db41a['TimeInterval']({'start':this[a0_0x5a29('0x67a')],'stop':_0x1db41a['JulianDate'][a0_0x5a29('0x7ae')](this[a0_0x5a29('0x67a')],this[a0_0x5a29('0x903')],new _0x1db41a[(a0_0x5a29('0x8ab'))]())})]),this[a0_0x5a29('0xe')]['path']={'material':this[a0_0x5a29('0x3a2')][a0_0x5a29('0x548')],'width':this['_options'][a0_0x5a29('0x0')],'leadTime':this[a0_0x5a29('0x3a2')][a0_0x5a29('0x338')]});}},{'key':a0_0x5a29('0x73a'),'value':function(){var _0x1e1232=this;if(!this[a0_0x5a29('0x67a')]||!this[a0_0x5a29('0x903')])return!0x1;var _0x10b9b6=0x0;if('speed'===this[a0_0x5a29('0x4c3')]){var _0x27101e=_0x1db41a['Math'][a0_0x5a29('0x7b2')](this['_positions'])/this[a0_0x5a29('0x903')];this[a0_0x5a29('0x336')]=this[a0_0x5a29('0x62')][a0_0x5a29('0x95a')](function(_0x48cbde,_0xe3445,_0x1e6a29){return 0x0!==_0xe3445&&(_0x10b9b6+=_0x1db41a[a0_0x5a29('0x382')][a0_0x5a29('0x7b2')]([_0x1e6a29[_0xe3445-0x1],_0x48cbde])/_0x27101e),_0x1db41a[a0_0x5a29('0x8ab')]['addSeconds'](_0x1e1232[a0_0x5a29('0x67a')],_0x10b9b6,new _0x1db41a['JulianDate']());});}else{var _0x2c8473=this[a0_0x5a29('0x62')][a0_0x5a29('0x515')],_0x1cfd50=(this[a0_0x5a29('0x903')]-this[a0_0x5a29('0x903')]%_0x2c8473)/_0x2c8473;this[a0_0x5a29('0x336')]=this[a0_0x5a29('0x62')]['map'](function(_0x38dcbf,_0x51f407){return _0x1db41a['JulianDate'][a0_0x5a29('0x7ae')](_0x1e1232['_startTime'],_0x51f407*_0x1cfd50,new _0x1db41a['JulianDate']());});}this['_sampledPosition']=new _0x1db41a[(a0_0x5a29('0xe1'))](),this['_sampledPosition']['addSamples'](this[a0_0x5a29('0x336')],_0xed6b25['a'][a0_0x5a29('0x7a')](this['_positions'])),this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]=this[a0_0x5a29('0x330')],this[a0_0x5a29('0xe')][a0_0x5a29('0x53c')]['setInterpolationOptions']({'interpolationDegree':0x1,'interpolationAlgorithm':_0x1db41a[a0_0x5a29('0x129')]}),this[a0_0x5a29('0xe')][a0_0x5a29('0x20f')]=new _0x1db41a[(a0_0x5a29('0x5cf'))](this['_sampledPosition']);}},{'key':a0_0x5a29('0x62c'),'value':function(){this[a0_0x5a29('0x5ef')][a0_0x5a29('0x673')][a0_0x5a29('0x8b4')][a0_0x5a29('0x695')](this[a0_0x5a29('0xe')]);}},{'key':a0_0x5a29('0x10f'),'value':function(_0x2f746a){return this[a0_0x5a29('0x62')]=_0x48df8c['a'][a0_0x5a29('0x21d')](_0x2f746a),this[a0_0x5a29('0x73a')](),this;}},{'key':a0_0x5a29('0x887'),'value':function(_0x1787cb,_0x221935){return this[a0_0x5a29('0x62')][a0_0x5a29('0x3cd')](_0x48df8c['a'][a0_0x5a29('0x853')](_0x1787cb)),this[a0_0x5a29('0x903')]+=_0x221935,this['_mountPosition'](),this;}},{'key':'setMode','value':function(_0x61a16a){return this['_mode']=_0x61a16a,this['_mountPosition'](),this;}},{'key':'setModel','value':function(_0x535bee,_0x4d027d){return this[a0_0x5a29('0xe')][a0_0x5a29('0x193')]=_0x4e3692(_0x4e3692({},_0x4d027d),{},{'uri':_0x535bee}),this;}},{'key':a0_0x5a29('0x86d'),'value':function(_0x30a33a,_0x209e91){return this['_delegate'][a0_0x5a29('0x3c1')]=_0x4e3692(_0x4e3692({},_0x209e91),{},{'image':_0x30a33a}),this;}},{'key':a0_0x5a29('0x47a'),'value':function(_0x313a5e,_0x14b3dd){return this[a0_0x5a29('0xe')][a0_0x5a29('0x7cc')]=_0x4e3692(_0x4e3692({},_0x14b3dd),{},{'text':_0x313a5e}),this;}},{'key':'id','get':function(){return this[a0_0x5a29('0x5ed')];}},{'key':a0_0x5a29('0x6b1'),'get':function(){return this[a0_0x5a29('0x4b')];}},{'key':a0_0x5a29('0x5dd'),'get':function(){return this[a0_0x5a29('0x284')];}},{'key':a0_0x5a29('0x7ce'),'get':function(){return this[a0_0x5a29('0x823')];}}]),_0x157277;}(),_0x421c5b=DC[a0_0x5a29('0x239')]['Cesium'],_0x5f1a13=function(){function _0x248865(_0x16c7b2){_0x1ee296()(this,_0x248865),this[a0_0x5a29('0x673')]=_0x16c7b2,this[a0_0x5a29('0x5c3')]=void 0x0,this['_startTime']=void 0x0,this['_duration']=0x0,this[a0_0x5a29('0x931')]={},this['_activePath']=void 0x0,this[a0_0x5a29('0x921')]=void 0x0,this[a0_0x5a29('0x169')]={};}return _0x1fafe8()(_0x248865,[{'key':a0_0x5a29('0x6b3'),'value':function(_0x234414,_0x20f9dc){var _0x1a5e2b=this;Object[a0_0x5a29('0x148')](this[a0_0x5a29('0x931')])[a0_0x5a29('0x570')](function(_0x484855){var _0x4a0af4=_0x1a5e2b[a0_0x5a29('0x931')][_0x484855];_0x4a0af4[a0_0x5a29('0x6b1')]&&_0x4a0af4[a0_0x5a29('0x6b1')][a0_0x5a29('0x93a')](_0x511892[a0_0x5a29('0x194')],{'currentTime':_0x20f9dc,'viewMode':_0x1a5e2b[a0_0x5a29('0x921')],'viewOption':_0x1a5e2b['_viewOption']});});}},{'key':'setTimeRange','value':function(_0x28628e,_0x19e055){if(!(_0x28628e&&_0x19e055&&_0x28628e instanceof Date&&_0x19e055 instanceof Date&&!(_0x28628e>_0x19e055)))throw new Error(a0_0x5a29('0x95b'));return this[a0_0x5a29('0x67a')]=_0x421c5b['JulianDate'][a0_0x5a29('0x35e')](_0x28628e),_0x19e055=_0x421c5b['JulianDate'][a0_0x5a29('0x35e')](_0x19e055),this[a0_0x5a29('0x903')]=_0x421c5b['JulianDate'][a0_0x5a29('0x324')](_0x19e055,this[a0_0x5a29('0x67a')]),this;}},{'key':a0_0x5a29('0x285'),'value':function(_0x390343,_0x17b74b){if(!(_0x390343&&_0x390343 instanceof Date))throw new Error(a0_0x5a29('0xec'));return this[a0_0x5a29('0x67a')]=_0x421c5b['JulianDate']['fromDate'](_0x390343),this['_duration']=_0x17b74b,this;}},{'key':a0_0x5a29('0x8dd'),'value':function(){if(!(this['_startTime']||this[a0_0x5a29('0x67a')]instanceof _0x421c5b[a0_0x5a29('0x8ab')]))throw new Error(a0_0x5a29('0x800'));return this['_viewer'][a0_0x5a29('0x5f3')][a0_0x5a29('0x628')]=!0x0,this[a0_0x5a29('0x673')][a0_0x5a29('0x5f3')][a0_0x5a29('0x584')]=this[a0_0x5a29('0x67a')],this[a0_0x5a29('0x5c3')]&&this['_postUpdateRemoveCallback'](),this[a0_0x5a29('0x5c3')]=this[a0_0x5a29('0x673')][a0_0x5a29('0x238')][a0_0x5a29('0x83c')][a0_0x5a29('0x464')](this[a0_0x5a29('0x6b3')],this),this;}},{'key':a0_0x5a29('0x74f'),'value':function(){return this[a0_0x5a29('0x673')][a0_0x5a29('0x5f3')]['shouldAnimate']=!0x1,this[a0_0x5a29('0x673')][a0_0x5a29('0x294')][a0_0x5a29('0x103')](_0x421c5b[a0_0x5a29('0x4e6')]['IDENTITY']),this[a0_0x5a29('0x673')]['delegate'][a0_0x5a29('0x1cf')]=void 0x0,this;}},{'key':a0_0x5a29('0x1ed'),'value':function(){return this['_viewer'][a0_0x5a29('0x5f3')]['shouldAnimate']=!0x0,this;}},{'key':'changeSpeed','value':function(_0x3d4c46){return this[a0_0x5a29('0x673')][a0_0x5a29('0x5f3')][a0_0x5a29('0x14a')]=_0x3d4c46,this;}},{'key':'addPath','value':function(_0x59c9bb){return _0x59c9bb&&_0x59c9bb[a0_0x5a29('0x6b1')]&&_0x59c9bb[a0_0x5a29('0x5dd')]!==_0x1f4e85['a'][a0_0x5a29('0x85')]&&(_0x59c9bb[a0_0x5a29('0x6b1')]['fire'](_0x511892['ADD'],this),this[a0_0x5a29('0x931')][_0x59c9bb['id']]=_0x59c9bb),this;}},{'key':a0_0x5a29('0x2ac'),'value':function(_0x3ff0fa){return this[a0_0x5a29('0x931')][_0x3ff0fa]||void 0x0;}},{'key':a0_0x5a29('0x38d'),'value':function(_0x3bd67c){return _0x3bd67c&&Object(this['_cache'])[a0_0x5a29('0x71')](_0x3bd67c['id'])&&_0x3bd67c['roamingEvent']&&(_0x3bd67c[a0_0x5a29('0x6b1')][a0_0x5a29('0x93a')](_0x511892[a0_0x5a29('0x945')],this),delete this['_cache'][_0x3bd67c['id']]),this;}},{'key':'clearPath','value':function(){var _0x3f4b87=this;return Object[a0_0x5a29('0x148')](this['_cache'])[a0_0x5a29('0x570')](function(_0x54825f){var _0x2cf504=_0x3f4b87[a0_0x5a29('0x931')](_0x54825f);_0x2cf504&&_0x3f4b87['removePath'](_0x2cf504);}),this;}},{'key':a0_0x5a29('0x721'),'value':function(_0xcc935a,_0x14398a){var _0x3e3367=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:{};if(!this[a0_0x5a29('0x931')][_0xcc935a['id']])throw new Error(a0_0x5a29('0x230'));return this['_viewMode']=_0x14398a,this[a0_0x5a29('0x169')]=_0x3e3367,this[a0_0x5a29('0x64')]&&this[a0_0x5a29('0x64')]['id']===_0xcc935a['id']||(this[a0_0x5a29('0x64')]&&this['_activePath']['roamingEvent']&&this[a0_0x5a29('0x64')]['roamingEvent'][a0_0x5a29('0x93a')](_0x511892['RELEASE'],_0xcc935a['id']),this[a0_0x5a29('0x64')]=_0xcc935a,this['_activePath']&&this[a0_0x5a29('0x64')][a0_0x5a29('0x6b1')]&&this[a0_0x5a29('0x64')][a0_0x5a29('0x6b1')]['fire'](_0x511892[a0_0x5a29('0x567')],_0xcc935a['id'])),this;}},{'key':a0_0x5a29('0x5d7'),'get':function(){return this[a0_0x5a29('0x67a')];}},{'key':'duration','get':function(){return this['_duration'];}}]),_0x248865;}(),_0x2d0233=_0x5792f(0x12),_0x53951f=_0x5792f(0xe),_0x13af1e=_0x5792f(0x11),_0x160efe=DC[a0_0x5a29('0x239')][a0_0x5a29('0x6e8')];_0x160efe[a0_0x5a29('0x382')]['area']=_0x13af1e['a'],_0x160efe[a0_0x5a29('0x382')]['bounds']=_0x13af1e['b'],_0x160efe[a0_0x5a29('0x382')][a0_0x5a29('0x48f')]=_0x13af1e['h'],_0x160efe[a0_0x5a29('0x382')][a0_0x5a29('0x100')]=_0x13af1e['c'],_0x160efe[a0_0x5a29('0x382')][a0_0x5a29('0x7b2')]=_0x13af1e['e'],_0x160efe['Math'][a0_0x5a29('0x2b2')]=_0x13af1e['f'],_0x160efe['Math'][a0_0x5a29('0x361')]=_0x13af1e['g'],_0x160efe['Math'][a0_0x5a29('0x97')]=_0x13af1e['i'],_0x160efe[a0_0x5a29('0x382')]['curve']=_0x13af1e['d'];var _0x48fc71={'ImageryLayerFactory':_0x4d5de8,'TerrainFactory':_0x2c0259,'Viewer':_0x10834a,'divForms':_0x4fa004,'World':_0x10834a,'LayerGroup':_0x2d0233['e'],'GeoJsonLayer':_0x2d0233['a'],'HtmlLayer':_0x2d0233['b'],'LabelLayer':_0x2d0233['c'],'PrimitiveLayer':_0x2d0233['g'],'TilesetLayer':_0x2d0233['h'],'TopoJsonLayer':_0x2d0233['i'],'VectorLayer':_0x2d0233['j'],'Billboard':_0x53951f['b'],'Circle':_0x53951f['d'],'DivIcon':_0x53951f['i'],'Label':_0x53951f['o'],'Point':_0x53951f['t'],'Polyline':_0x53951f['v'],'Polygon':_0x53951f['u'],'Model':_0x53951f['p'],'Tileset':_0x53951f['z'],'Box':_0x53951f['c'],'Corridor':_0x53951f['e'],'Cylinder':_0x53951f['h'],'Ellipse':_0x53951f['k'],'Ellipsoid':_0x53951f['l'],'Plane':_0x53951f['s'],'PolylineVolume':_0x53951f['w'],'Rectangle':_0x53951f['x'],'Wall':_0x53951f['A'],'CustomBillboard':_0x53951f['f'],'CustomLabel':_0x53951f['g'],'AttackArrow':_0x53951f['a'],'DoubleArrow':_0x53951f['j'],'FineArrow':_0x53951f['m'],'GatheringPlace':_0x53951f['n'],'TailedAttackArrow':_0x53951f['y'],'Plot':_0x27466d,'AroundView':_0x499bdb,'AroundPoint':_0x454cd8,'GlobeRotate':_0x2abcc4,'ClusterLayer':_0x1881b4,'CzmlLayer':_0x58de21,'HeatLayer':_0x429bd0,'KmlLayer':_0x164fe8,'Effect':_0x5e4c4d,'BloomEffect':_0x31517e,'CircleScanEffect':_0x5bb7b9,'FogEffect':_0x1608f3,'RadarScanEffect':_0x3f7716,'RainEffect':_0x2fe97f,'SnowEffect':_0x4d8b11,'BrightnessEffect':_0x46b120,'NightVisionEffect':_0x328623,'RoamingViewMode':_0x1d61a2,'RoamingController':_0x5f1a13,'RoamingPath':_0x306cca,'PolylineTrailMaterialProperty':_0x6f5838[a0_0x5a29('0x7d')],'PolylineFlowMaterialProperty':_0x6f5838[a0_0x5a29('0x939')],'PolylineEmissionMaterialProperty':_0x6f5838[a0_0x5a29('0x64d')],'PolylineImageTrailMaterialProperty':_0x6f5838[a0_0x5a29('0x4ab')],'WaterMaterialProperty':_0x6f5838[a0_0x5a29('0x4e8')],'RimLightingMaterialProperty':_0x6f5838[a0_0x5a29('0x449')],'CircleFadeMaterialProperty':_0x6f5838['CircleFadeMaterialProperty'],'CircleWaveMaterialProperty':_0x6f5838['CircleWaveMaterialProperty'],'WallTrailMaterialProperty':_0x6f5838['WallTrailMaterialProperty'],'Chart':_0x3468de,'Math':_0x160efe[a0_0x5a29('0x382')],'BubbleWindow':_0xcb746c,'Measure':function(_0x2ee6d4){function _0x3e971a(){_0x2f6489[a0_0x5a29('0x4a6')](),_0x4afe4f[a0_0x5a29('0x4a6')](),_0x5bf613['clearLastNoEnd'](),_0x51d565[a0_0x5a29('0x4a6')](),_0x43fdbd[a0_0x5a29('0x77a')]();}function _0x48adca(_0x498c66,_0x387498){if(null==_0x498c66)return'';null!=_0x387498&&'auto'!=_0x387498||(_0x387498=_0x498c66<0x3e8?'m':'km');var _0x36cc0a='';switch(_0x387498){default:case'm':_0x36cc0a=_0x498c66[a0_0x5a29('0x292')](0x2)+'\x20米';break;case'km':_0x36cc0a=(0.001*_0x498c66)[a0_0x5a29('0x292')](0x2)+'\x20公里';break;case'mile':_0x36cc0a=(0.00054*_0x498c66)[a0_0x5a29('0x292')](0x2)+a0_0x5a29('0x7f3');break;case a0_0x5a29('0x658'):_0x36cc0a=(0.3*_0x498c66)['toFixed'](0x2)+'\x20丈';}return _0x36cc0a;}var _0x53ec13=_0x2ee6d4[a0_0x5a29('0x835')],_0x5a7f50=_0x2ee6d4[a0_0x5a29('0x7e9')]||a0_0x5a29('0x871'),_0x2e0e2e='',_0x43fdbd=new _0x1fcac4({'viewer':_0x53ec13,'hasEdit':!0x1,'onChangeDrawing':function(_0xd35b4d){switch(_0x2e0e2e){case a0_0x5a29('0x515'):_0x2f6489[a0_0x5a29('0x2c3')](_0xd35b4d);break;case a0_0x5a29('0x7b1'):_0x4afe4f['showAddPointLength'](_0xd35b4d);break;case a0_0x5a29('0x6b7'):_0x5bf613[a0_0x5a29('0x2c3')](_0xd35b4d);break;case'super_height':_0x51d565[a0_0x5a29('0x2c3')](_0xd35b4d);}},'onMoveDrawing':function(_0x5841b4){switch(_0x2e0e2e){case a0_0x5a29('0x515'):_0x2f6489['showMoveDrawing'](_0x5841b4);break;case a0_0x5a29('0x7b1'):_0x4afe4f[a0_0x5a29('0x6b0')](_0x5841b4);break;case a0_0x5a29('0x6b7'):_0x5bf613['showMoveDrawing'](_0x5841b4);break;case a0_0x5a29('0x3e4'):_0x51d565[a0_0x5a29('0x6b0')](_0x5841b4);}},'onStopDrawing':function(_0x100c06){switch(_0x2e0e2e){case'length':_0x2f6489[a0_0x5a29('0x736')](_0x100c06);break;case a0_0x5a29('0x7b1'):_0x4afe4f['showDrawEnd'](_0x100c06);break;case'height':_0x5bf613['showDrawEnd'](_0x100c06);break;case'super_height':_0x51d565[a0_0x5a29('0x736')](_0x100c06);}}}),_0x2f6489={'options':null,'arrLables':[],'totalLable':null,'clearLastNoEnd':function(){if(null!=this[a0_0x5a29('0x1de')]&&_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this['totalLable']),this['arrLables']&&this[a0_0x5a29('0x27a')]['length']>0x0){var _0x1c6a5d=this[a0_0x5a29('0x27a')];if(_0x1c6a5d&&_0x1c6a5d[a0_0x5a29('0x515')]>0x0)for(var _0x11747c in _0x1c6a5d)_0x53ec13['entities'][a0_0x5a29('0x157')](_0x1c6a5d[_0x11747c]);}this[a0_0x5a29('0x1de')]=null,this['arrLables']=[];},'start':function(_0x2d777c){this['options']=_0x2d777c,this['totalLable']=_0x53ec13['entities'][a0_0x5a29('0x695')]({'label':{'style':_0x3b6bd7[a0_0x5a29('0x7fb')][a0_0x5a29('0x794')],'fillColor':_0x3b6bd7['Color']['AZURE'],'verticalOrigin':_0x3b6bd7['VerticalOrigin']['BOTTOM'],'eyeOffset':new _0x3b6bd7[(a0_0x5a29('0x3bd'))](0x0,0x0,-0x14),'outlineColor':_0x3b6bd7[a0_0x5a29('0x82')]['BLACK'],'outlineWidth':0x3,'font':_0x5a7f50,'show':!0x1},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this['options']['unit'],'type':this['options'][a0_0x5a29('0x519')]}}),this['arrLables']=[],_0x43fdbd[a0_0x5a29('0x2f7')]({'type':a0_0x5a29('0x83f'),'style':{'color':a0_0x5a29('0x165'),'width':0x3}});},'showAddPointLength':function(_0x69414){var _0x26010a=_0x43fdbd['getPositions'](_0x69414),_0x3a4bfe=_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'position':_0x26010a[_0x26010a[a0_0x5a29('0x515')]-0x1],'label':{'style':_0x3b6bd7['LabelStyle']['FILL_AND_OUTLINE'],'fillColor':_0x3b6bd7[a0_0x5a29('0x82')]['AZURE'],'outlineColor':_0x3b6bd7[a0_0x5a29('0x82')][a0_0x5a29('0x46b')],'outlineWidth':0x3,'verticalOrigin':_0x3b6bd7[a0_0x5a29('0x742')][a0_0x5a29('0x863')],'eyeOffset':new _0x3b6bd7[(a0_0x5a29('0x3bd'))](0x0,0x0,-0x14),'font':_0x5a7f50,'show':!0x0},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x142')],'type':this['options'][a0_0x5a29('0x519')]}});if(0x1==_0x26010a[a0_0x5a29('0x515')])_0x3a4bfe[a0_0x5a29('0x7cc')][a0_0x5a29('0x3ce')]='起点';else{var _0x470ae8=this[a0_0x5a29('0x451')](_0x26010a),_0x7e012b=_0x48adca(_0x470ae8,this[a0_0x5a29('0x8ae')][a0_0x5a29('0x142')]);_0x3a4bfe[a0_0x5a29('0x7cc')][a0_0x5a29('0x3ce')]=_0x7e012b,_0x3a4bfe[a0_0x5a29('0x151')][a0_0x5a29('0x363')]=_0x470ae8,this[a0_0x5a29('0x451')]([_0x26010a[_0x26010a[a0_0x5a29('0x515')]-0x2],_0x26010a[_0x26010a[a0_0x5a29('0x515')]-0x1]])<0x5&&(_0x3a4bfe['show']=!0x1);}this[a0_0x5a29('0x27a')]['push'](_0x3a4bfe);},'showMoveDrawing':function(_0x27362b){var _0x1f9628=_0x43fdbd[a0_0x5a29('0xb2')](_0x27362b);if(!(_0x1f9628[a0_0x5a29('0x515')]<0x2)){var _0x3bea2e=this[a0_0x5a29('0x451')](_0x1f9628),_0x5b162c=_0x48adca(_0x3bea2e,this[a0_0x5a29('0x8ae')][a0_0x5a29('0x142')]);this[a0_0x5a29('0x1de')][a0_0x5a29('0x53c')]=_0x1f9628[_0x1f9628[a0_0x5a29('0x515')]-0x1],this[a0_0x5a29('0x1de')][a0_0x5a29('0x7cc')][a0_0x5a29('0x3ce')]='全长:'+_0x5b162c,this[a0_0x5a29('0x1de')][a0_0x5a29('0x7cc')][a0_0x5a29('0x4b1')]=!0x0,this[a0_0x5a29('0x1de')][a0_0x5a29('0x151')]['value']=_0x3bea2e,this[a0_0x5a29('0x1de')]['attribute'][a0_0x5a29('0x6e3')]='全长:',this['options']['calback']&&this[a0_0x5a29('0x8ae')][a0_0x5a29('0x692')](_0x5b162c,_0x3bea2e);}},'showDrawEnd':function(_0x1060d5){var _0x5ea5ba=_0x43fdbd[a0_0x5a29('0xb2')](_0x1060d5),_0x10d02c=this['arrLables']['length']-_0x5ea5ba[a0_0x5a29('0x515')];if(_0x10d02c>=0x0){for(var _0x324b55=this['arrLables'][a0_0x5a29('0x515')]-0x1;_0x324b55>=_0x5ea5ba['length']-0x1;_0x324b55--)_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this[a0_0x5a29('0x27a')][_0x324b55]);this['arrLables']['splice'](_0x5ea5ba['length']-0x1,_0x10d02c+0x1);}_0x1060d5[a0_0x5a29('0x42e')]=this['totalLable'],_0x1060d5[a0_0x5a29('0x5b6')]=this[a0_0x5a29('0x27a')],this[a0_0x5a29('0x1de')]=null,this[a0_0x5a29('0x27a')]=[],this[a0_0x5a29('0x312')](_0x1060d5);},'updateLengthForTerrain':function(_0x4140b4){if(this[a0_0x5a29('0x8ae')][a0_0x5a29('0x767')]&&null!=_0x4140b4[a0_0x5a29('0x83f')]){var _0x2c82e4=this,_0x2b5ff5=_0x4140b4[a0_0x5a29('0x83f')]['positions'][a0_0x5a29('0x94c')](),_0x3c9ce5=_0x4140b4[a0_0x5a29('0x5b6')],_0x6e43ed=_0x4140b4['_totalLable'],_0x55325a=_0x6e43ed&&_0x6e43ed[a0_0x5a29('0x142')],_0x12f46e=0x0,_0x5989b3=[];!function _0x312dd5(){_0x12f46e++;var _0x5ad9f4=[_0x2b5ff5[_0x12f46e-0x1],_0x2b5ff5[_0x12f46e]];_0x2c464['terrainPolyline']({'viewer':_0x53ec13,'positions':_0x5ad9f4,'calback':function(_0x16d96e,_0x758e64){if(_0x5989b3=_0x758e64?0x1==_0x12f46e?_0x5989b3[a0_0x5a29('0x6c9')](_0x5ad9f4):_0x5989b3[a0_0x5a29('0x6c9')]([_0x2b5ff5[_0x12f46e]]):_0x5989b3['concat'](_0x16d96e),_0x12f46e>=_0x2b5ff5[a0_0x5a29('0x515')]-0x1){if(_0x4140b4[a0_0x5a29('0x83f')]['positions'][a0_0x5a29('0x850')](_0x5989b3),_0x6e43ed){var _0x3be6e4=_0x48adca(_0x4988a7=_0x2c82e4['getLength'](_0x5989b3),_0x55325a);_0x6e43ed[a0_0x5a29('0x7cc')][a0_0x5a29('0x3ce')]=a0_0x5a29('0x2d3')+_0x3be6e4,_0x6e43ed['attribute']['value']=_0x4988a7,_0x2c82e4['options']['calback']&&_0x2c82e4[a0_0x5a29('0x8ae')][a0_0x5a29('0x692')](_0x3be6e4,_0x4988a7);}}else{_0x3be6e4=_0x48adca(_0x4988a7=_0x2c82e4[a0_0x5a29('0x451')](_0x16d96e),_0x55325a);var _0x4988a7,_0x4ecee9=_0x3c9ce5[_0x12f46e];_0x4ecee9[a0_0x5a29('0x7cc')]['text']=_0x3be6e4,_0x4ecee9['attribute']['value']=_0x4988a7,_0x312dd5();}}});}();}},'getLength':function(_0x58252f){for(var _0x1bd619=0x0,_0x52f096=0x0,_0x1cd9e7=_0x58252f[a0_0x5a29('0x515')]-0x1;_0x52f096<_0x1cd9e7;_0x52f096++)_0x1bd619+=_0x3b6bd7[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0x58252f[_0x52f096],_0x58252f[_0x52f096+0x1]);return _0x1bd619;}},_0x4afe4f={'options':null,'totalLable':null,'clearLastNoEnd':function(){null!=this[a0_0x5a29('0x1de')]&&_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this[a0_0x5a29('0x1de')]),this[a0_0x5a29('0x1de')]=null;},'start':function(_0x29ed5d){this['options']=_0x29ed5d,this[a0_0x5a29('0x1de')]=_0x53ec13[a0_0x5a29('0x8b4')]['add']({'label':{'style':_0x3b6bd7[a0_0x5a29('0x7fb')]['FILL_AND_OUTLINE'],'fillColor':_0x3b6bd7[a0_0x5a29('0x82')][a0_0x5a29('0x763')],'outlineColor':_0x3b6bd7[a0_0x5a29('0x82')][a0_0x5a29('0x46b')],'heightReference':_0x3b6bd7[a0_0x5a29('0x306')][a0_0x5a29('0x47e')],'outlineWidth':0x3,'verticalOrigin':_0x3b6bd7[a0_0x5a29('0x742')][a0_0x5a29('0x863')],'eyeOffset':new _0x3b6bd7['Cartesian3'](0x0,0x0,-0x14),'font':_0x5a7f50,'show':!0x1},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this['options'][a0_0x5a29('0x142')],'type':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x519')]}}),_0x43fdbd['startDraw']({'type':'polygon','style':{'color':a0_0x5a29('0x165'),'outline':!0x0,'outlineColor':a0_0x5a29('0x165'),'outlineWidth':0x4,'opacity':0.4}});},'showAddPointLength':function(_0x510b87){},'showMoveDrawing':function(_0x5ae3af){var _0x1d5d03=_0x43fdbd[a0_0x5a29('0xb2')](_0x5ae3af);if(!(_0x1d5d03[a0_0x5a29('0x515')]<0x3)){var _0x56290e=_0x4fcc19[a0_0x5a29('0x8e7')](_0x5ae3af),_0x5a711a=turf['area'](_0x56290e),_0x52635a=s(_0x5a711a,this[a0_0x5a29('0x8ae')][a0_0x5a29('0x142')]),_0x2faaf1=turf[a0_0x5a29('0x433')](_0x56290e),_0x864527=_0x2c464['getMaxHeightForPositions'](_0x1d5d03),_0x5cac26=_0x3b6bd7[a0_0x5a29('0x3bd')][a0_0x5a29('0x655')](_0x2faaf1[a0_0x5a29('0x74e')][a0_0x5a29('0x98')][0x0],_0x2faaf1[a0_0x5a29('0x74e')][a0_0x5a29('0x98')][0x1],_0x864527+0x1);this[a0_0x5a29('0x1de')][a0_0x5a29('0x53c')]=_0x5cac26,this['totalLable'][a0_0x5a29('0x7cc')]['text']=a0_0x5a29('0x1ec')+_0x52635a,this['totalLable'][a0_0x5a29('0x7cc')]['show']=!0x0,this['totalLable'][a0_0x5a29('0x151')][a0_0x5a29('0x363')]=_0x5a711a,this[a0_0x5a29('0x1de')]['attribute'][a0_0x5a29('0x6e3')]='面积:',this['options']['calback']&&this['options']['calback'](_0x52635a,_0x5a711a);}},'showDrawEnd':function(_0x390869){if(null!=_0x390869[a0_0x5a29('0x82a')]){var _0x4cddd6=_0x390869['polygon'][a0_0x5a29('0x329')][a0_0x5a29('0x94c')]();$[a0_0x5a29('0x6bc')](_0x4cddd6,function(_0x3bc705,_0x51ef08){_0x51ef08['z']=_0x51ef08['z']+0x1;}),_0x390869['_totalLable']=this[a0_0x5a29('0x1de')],this[a0_0x5a29('0x1de')]=null;}}},_0x5bf613={'options':null,'totalLable':null,'clearLastNoEnd':function(){null!=this['totalLable']&&_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this[a0_0x5a29('0x1de')]),this[a0_0x5a29('0x1de')]=null;},'start':function(_0x41dc08){this[a0_0x5a29('0x8ae')]=_0x41dc08,this[a0_0x5a29('0x1de')]=_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'label':{'style':_0x3b6bd7[a0_0x5a29('0x7fb')][a0_0x5a29('0x794')],'fillColor':_0x3b6bd7[a0_0x5a29('0x82')]['AZURE'],'outlineColor':_0x3b6bd7[a0_0x5a29('0x82')][a0_0x5a29('0x46b')],'outlineWidth':0x3,'font':_0x5a7f50,'show':!0x1},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x142')],'type':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x519')]}}),_0x43fdbd[a0_0x5a29('0x2f7')]({'type':a0_0x5a29('0x83f'),'minMaxPoints':{'min':0x2,'max':0x2,'isSuper':!0x1},'style':{'color':'#ffff00','width':0x3}});},'showAddPointLength':function(_0x539901){},'showMoveDrawing':function(_0x231ff7){var _0x44748c=_0x43fdbd[a0_0x5a29('0xb2')](_0x231ff7);if(!(_0x44748c[a0_0x5a29('0x515')]<0x2)){var _0x5c6b47=_0x3b6bd7[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0x44748c[0x0]),_0x575a05=_0x3b6bd7[a0_0x5a29('0x7c9')]['fromCartesian'](_0x44748c[0x1]),_0x109d1c=Math['abs'](_0x575a05[a0_0x5a29('0x6b7')]-_0x5c6b47[a0_0x5a29('0x6b7')]),_0x177286=_0x48adca(_0x109d1c,this[a0_0x5a29('0x8ae')][a0_0x5a29('0x142')]);this[a0_0x5a29('0x1de')][a0_0x5a29('0x53c')]=_0x2c464[a0_0x5a29('0x354')](_0x44748c[0x0],_0x44748c[0x1]),this[a0_0x5a29('0x1de')][a0_0x5a29('0x7cc')][a0_0x5a29('0x3ce')]=a0_0x5a29('0x638')+_0x177286,this['totalLable'][a0_0x5a29('0x7cc')][a0_0x5a29('0x4b1')]=!0x0,this[a0_0x5a29('0x1de')][a0_0x5a29('0x151')][a0_0x5a29('0x363')]=_0x109d1c,this[a0_0x5a29('0x1de')][a0_0x5a29('0x151')][a0_0x5a29('0x6e3')]=a0_0x5a29('0x638'),this[a0_0x5a29('0x8ae')][a0_0x5a29('0x692')]&&this[a0_0x5a29('0x8ae')][a0_0x5a29('0x692')](_0x177286,_0x109d1c);}},'showDrawEnd':function(_0xa8bade){_0xa8bade[a0_0x5a29('0x42e')]=this[a0_0x5a29('0x1de')],this['totalLable']=null;}},_0x51d565={'options':null,'totalLable':null,'xLable':null,'hLable':null,'clearLastNoEnd':function(){null!=this['totalLable']&&_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this['totalLable']),null!=this[a0_0x5a29('0x5b8')]&&_0x53ec13[a0_0x5a29('0x8b4')]['remove'](this['xLable']),null!=this[a0_0x5a29('0x1a')]&&_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](this['hLable']),this[a0_0x5a29('0x1de')]=null,this[a0_0x5a29('0x5b8')]=null,this[a0_0x5a29('0x1a')]=null;},'start':function(_0x12d959){this[a0_0x5a29('0x8ae')]=_0x12d959,this[a0_0x5a29('0x1de')]=_0x53ec13[a0_0x5a29('0x8b4')]['add']({'label':{'style':_0x3b6bd7[a0_0x5a29('0x7fb')][a0_0x5a29('0x794')],'fillColor':_0x3b6bd7[a0_0x5a29('0x82')][a0_0x5a29('0x763')],'outlineColor':_0x3b6bd7[a0_0x5a29('0x82')]['BLACK'],'outlineWidth':0x3,'font':_0x5a7f50,'show':!0x1,'pixelOffset':new _0x3b6bd7[(a0_0x5a29('0x11b'))](-0x28,0x0)},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x5a29('0x8ae')]['unit'],'type':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x519')]}}),this[a0_0x5a29('0x5b8')]=_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'label':{'style':_0x3b6bd7[a0_0x5a29('0x7fb')][a0_0x5a29('0x794')],'fillColor':_0x3b6bd7[a0_0x5a29('0x82')][a0_0x5a29('0x763')],'outlineColor':_0x3b6bd7[a0_0x5a29('0x82')]['BLACK'],'outlineWidth':0x3,'font':_0x5a7f50,'show':!0x1,'pixelOffset':new _0x3b6bd7['Cartesian2'](-0x28,0x0)},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x5a29('0x8ae')]['unit'],'type':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x519')]}}),this[a0_0x5a29('0x1a')]=_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x695')]({'label':{'style':_0x3b6bd7[a0_0x5a29('0x7fb')][a0_0x5a29('0x794')],'fillColor':_0x3b6bd7['Color']['AZURE'],'outlineColor':_0x3b6bd7[a0_0x5a29('0x82')][a0_0x5a29('0x46b')],'outlineWidth':0x3,'font':_0x5a7f50,'show':!0x1,'pixelOffset':new _0x3b6bd7[(a0_0x5a29('0x11b'))](-0x28,0x0)},'isMarsMeasureLabel':!0x0,'attribute':{'unit':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x142')],'type':this[a0_0x5a29('0x8ae')][a0_0x5a29('0x519')]}}),_0x43fdbd[a0_0x5a29('0x2f7')]({'type':a0_0x5a29('0x83f'),'minMaxPoints':{'min':0x2,'max':0x2,'isSuper':!0x0},'style':{'color':'#ffff00','width':0x3}});},'showAddPointLength':function(_0x3a5154){var _0x117941=_0x43fdbd[a0_0x5a29('0xb2')](_0x3a5154);if(0x4==_0x117941['length']){var _0x14793b=_0x117941[0x3][a0_0x5a29('0x218')]();_0x117941[a0_0x5a29('0x3fe')](),_0x117941['pop'](),_0x117941[a0_0x5a29('0x3fe')](),_0x117941[a0_0x5a29('0x3cd')](_0x14793b);}if(0x2==_0x117941[a0_0x5a29('0x515')]){var _0x270818=_0x2c464[a0_0x5a29('0x52c')](_0x117941[0x0],_0x117941[0x1]);_0x2c464[a0_0x5a29('0x25d')](_0x117941[0x0],_0x117941[0x1])>0x3&&(_0x117941[a0_0x5a29('0x3cd')](_0x270818),_0x117941[a0_0x5a29('0x3cd')](_0x117941[0x0]));}this[a0_0x5a29('0x611')](_0x117941);},'showMoveDrawing':function(_0x28daf1){var _0xc7fbca=_0x43fdbd[a0_0x5a29('0xb2')](_0x28daf1);if(0x4==_0xc7fbca['length']){var _0x390dda=_0xc7fbca[0x3][a0_0x5a29('0x218')]();_0xc7fbca[a0_0x5a29('0x3fe')](),_0xc7fbca['pop'](),_0xc7fbca[a0_0x5a29('0x3fe')](),_0xc7fbca[a0_0x5a29('0x3cd')](_0x390dda);}if(0x2==_0xc7fbca[a0_0x5a29('0x515')]){var _0x2c00fe=_0x2c464['getZHeightPosition'](_0xc7fbca[0x0],_0xc7fbca[0x1]);_0x2c464['getHDistance'](_0xc7fbca[0x0],_0xc7fbca[0x1])>0x3&&(_0xc7fbca['push'](_0x2c00fe),_0xc7fbca[a0_0x5a29('0x3cd')](_0xc7fbca[0x0]));}this[a0_0x5a29('0x611')](_0xc7fbca);},'showDrawEnd':function(_0x3dad5a){_0x3dad5a[a0_0x5a29('0x5b6')]=[this[a0_0x5a29('0x1de')],this[a0_0x5a29('0x1a')],this[a0_0x5a29('0x5b8')]],this[a0_0x5a29('0x1de')]=null,this['hLable']=null,this[a0_0x5a29('0x5b8')]=null;},'showSuperHeight':function(_0xc3f6f7){var _0x2f6f83,_0x5bbc7c,_0x5df661,_0x35289f;if(0x4==_0xc3f6f7[a0_0x5a29('0x515')]){var _0x2d83dc,_0xf4eff9,_0x1b9af1=_0x2c464['getMidPosition'](_0xc3f6f7[0x0],_0xc3f6f7[0x1]),_0x1e82aa=_0x3b6bd7[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0xc3f6f7[0x0]),_0x5d1afc=_0x3b6bd7[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0xc3f6f7[0x1]),_0x1e73a9=_0x3b6bd7[a0_0x5a29('0x7c9')][a0_0x5a29('0x64c')](_0xc3f6f7[0x2]);_0xf4eff9=_0x5d1afc[a0_0x5a29('0x6b7')]-_0x1e73a9[a0_0x5a29('0x6b7')],_0x35289f=_0x5d1afc['height']-_0x1e82aa[a0_0x5a29('0x6b7')],_0x5df661=_0x3b6bd7['Cartesian3'][a0_0x5a29('0x7b2')](_0xc3f6f7[0x0],_0xc3f6f7[0x1]),_0x35289f>-0x1&&_0x35289f<0x1?(_0x5dc6ec=_0xc3f6f7[0x1],this[a0_0x5a29('0x309')](this['totalLable'],_0x5dc6ec,a0_0x5a29('0x3c2'),_0x35289f),this[a0_0x5a29('0x309')](this[a0_0x5a29('0x1a')],_0x1b9af1,'长度',_0x5df661)):(_0xf4eff9>-0.1&&_0xf4eff9<0.1?(_0x2d83dc=_0x2c464[a0_0x5a29('0x354')](_0xc3f6f7[0x2],_0xc3f6f7[0x1]),_0x5dc6ec=_0x2c464['getMidPosition'](_0xc3f6f7[0x2],_0xc3f6f7[0x3]),_0x5bbc7c=_0x3b6bd7[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0xc3f6f7[0x1],_0xc3f6f7[0x2]),_0x2f6f83=_0x3b6bd7['Cartesian3']['distance'](_0xc3f6f7[0x3],_0xc3f6f7[0x2])):(_0x5dc6ec=_0x2c464[a0_0x5a29('0x354')](_0xc3f6f7[0x2],_0xc3f6f7[0x1]),_0x2d83dc=_0x2c464['getMidPosition'](_0xc3f6f7[0x2],_0xc3f6f7[0x3]),_0x5bbc7c=_0x3b6bd7[a0_0x5a29('0x3bd')][a0_0x5a29('0x7b2')](_0xc3f6f7[0x3],_0xc3f6f7[0x2]),_0x2f6f83=_0x3b6bd7['Cartesian3']['distance'](_0xc3f6f7[0x1],_0xc3f6f7[0x2])),this[a0_0x5a29('0x309')](this[a0_0x5a29('0x1de')],_0x5dc6ec,a0_0x5a29('0x3c2'),_0x2f6f83),this[a0_0x5a29('0x309')](this['xLable'],_0x2d83dc,a0_0x5a29('0x1a1'),_0x5bbc7c),this[a0_0x5a29('0x309')](this[a0_0x5a29('0x1a')],_0x1b9af1,'长度',_0x5df661));}else{if(0x2==_0xc3f6f7[a0_0x5a29('0x515')]){_0x2f6f83=_0x3b6bd7['Cartesian3'][a0_0x5a29('0x7b2')](_0xc3f6f7[0x1],_0xc3f6f7[0x0]);var _0x5dc6ec=_0x2c464[a0_0x5a29('0x354')](_0xc3f6f7[0x0],_0xc3f6f7[0x1]);xLable[a0_0x5a29('0x7cc')]['show']&&(xLable['label'][a0_0x5a29('0x4b1')]=!0x1,hLable[a0_0x5a29('0x7cc')][a0_0x5a29('0x4b1')]=!0x1),this[a0_0x5a29('0x309')](this[a0_0x5a29('0x1de')],_0x5dc6ec,a0_0x5a29('0x3c2'),_0x2f6f83);}}var _0x48c4e1=_0x48adca(_0x2f6f83,this[a0_0x5a29('0x8ae')][a0_0x5a29('0x142')]);this[a0_0x5a29('0x8ae')]['calback']&&this[a0_0x5a29('0x8ae')]['calback'](_0x48c4e1,_0x2f6f83);},'updateSuperHeightLabel':function(_0x1053ca,_0x6d9718,_0x8f7c5a,_0x44f78f){null!=_0x1053ca&&(_0x1053ca[a0_0x5a29('0x53c')]=_0x6d9718,_0x1053ca['label'][a0_0x5a29('0x3ce')]=_0x8f7c5a+':'+_0x48adca(_0x44f78f,this[a0_0x5a29('0x8ae')]['unit']),_0x1053ca['label']['show']=!0x0,_0x1053ca[a0_0x5a29('0x151')][a0_0x5a29('0x363')]=_0x44f78f,_0x1053ca[a0_0x5a29('0x151')]['textEx']=_0x8f7c5a+':');}};return{'measuerLength':function(_0x3b808c){_0x3e971a(),_0x2e0e2e='length',(_0x3b808c=_0x3b808c||{})[a0_0x5a29('0x519')]=_0x2e0e2e,_0x3b808c[a0_0x5a29('0x71')]('terrain')||(_0x3b808c[a0_0x5a29('0x767')]=!0x0),_0x2f6489[a0_0x5a29('0x63a')](_0x3b808c);},'measureHeight':function(_0xc9dc58){_0x3e971a(),(_0xc9dc58=_0xc9dc58||{})['hasOwnProperty']('isSuper')&&!_0xc9dc58[a0_0x5a29('0x6c4')]?(_0x2e0e2e=a0_0x5a29('0x6b7'),_0xc9dc58[a0_0x5a29('0x519')]=_0x2e0e2e,_0x5bf613[a0_0x5a29('0x63a')](_0xc9dc58)):(_0x2e0e2e='super_height',_0xc9dc58[a0_0x5a29('0x519')]=_0x2e0e2e,_0x51d565[a0_0x5a29('0x63a')](_0xc9dc58));},'measureArea':function(_0x52c930){_0x3e971a(),_0x2e0e2e=a0_0x5a29('0x7b1'),(_0x52c930=_0x52c930||{})[a0_0x5a29('0x519')]=_0x2e0e2e,_0x4afe4f[a0_0x5a29('0x63a')](_0x52c930);},'updateUnit':function(_0x96168c,_0x279c89){var _0x1e85bf=_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x24f')];for(var _0x45411e in _0x1e85bf){var _0x1ec1f8=_0x1e85bf[_0x45411e];if(_0x1ec1f8['label']&&_0x1ec1f8['isMarsMeasureLabel']&&_0x1ec1f8[a0_0x5a29('0x151')]&&_0x1ec1f8[a0_0x5a29('0x151')][a0_0x5a29('0x363')]){if(_0x1ec1f8[a0_0x5a29('0x151')][a0_0x5a29('0x519')]!=_0x96168c)continue;a0_0x5a29('0x7b1')==_0x96168c?_0x1ec1f8[a0_0x5a29('0x7cc')][a0_0x5a29('0x3ce')]['_value']=(_0x1ec1f8['attribute'][a0_0x5a29('0x6e3')]||'')+s(_0x1ec1f8[a0_0x5a29('0x151')][a0_0x5a29('0x363')],_0x279c89):_0x1ec1f8[a0_0x5a29('0x3e3')][a0_0x5a29('0x3ce')][a0_0x5a29('0x30f')]=(_0x1ec1f8[a0_0x5a29('0x151')][a0_0x5a29('0x6e3')]||'')+l(_0x1ec1f8['attribute'][a0_0x5a29('0x363')],_0x279c89);}}},'clearMeasure':function(){_0x2e0e2e='',_0x3e971a();for(var _0x7698c2=_0x43fdbd[a0_0x5a29('0x2cd')](),_0x3a5700=0x0;_0x3a5700<_0x7698c2[a0_0x5a29('0x515')];_0x3a5700++){if((_0x215a80=_0x7698c2[_0x3a5700])[a0_0x5a29('0x42e')]&&(_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](_0x215a80[a0_0x5a29('0x42e')]),delete _0x215a80[a0_0x5a29('0x42e')]),_0x215a80[a0_0x5a29('0x5b6')]){var _0x5166c2=_0x215a80[a0_0x5a29('0x5b6')];if(_0x5166c2&&_0x5166c2['length']>0x0)for(var _0x3a5700 in _0x5166c2)_0x53ec13['entities']['remove'](_0x5166c2[_0x3a5700]);delete _0x215a80[a0_0x5a29('0x5b6')];}}_0x7698c2=[];var _0xebef96=_0x53ec13['entities'][a0_0x5a29('0x24f')];for(var _0x3a5700 in _0xebef96){(_0x215a80=_0xebef96[_0x3a5700])[a0_0x5a29('0x7cc')]&&_0x215a80[a0_0x5a29('0x859')]&&_0x7698c2['push'](_0x215a80);}for(_0x3a5700=0x0;_0x3a5700<_0x7698c2[a0_0x5a29('0x515')];_0x3a5700++){var _0x215a80=_0x7698c2[_0x3a5700];_0x53ec13[a0_0x5a29('0x8b4')][a0_0x5a29('0x157')](_0x215a80);}_0x43fdbd[a0_0x5a29('0x146')]();},'formatArea':function(_0x53a3d9,_0x3c65b9){if(null==_0x53a3d9)return'';null!=_0x3c65b9&&a0_0x5a29('0x796')!=_0x3c65b9||(_0x3c65b9=_0x53a3d9<0xf4240?'m':'km');var _0x566339='';switch(_0x3c65b9){default:case'm':_0x566339=_0x53a3d9[a0_0x5a29('0x292')](0x2)+'\x20平方米';break;case'km':_0x566339=(_0x53a3d9/0xf4240)[a0_0x5a29('0x292')](0x2)+'\x20平方公里';break;case'mu':_0x566339=(0.0015*_0x53a3d9)['toFixed'](0x2)+'\x20亩';break;case'ha':_0x566339=(0.0001*_0x53a3d9)[a0_0x5a29('0x292')](0x2)+a0_0x5a29('0x4b5');}return _0x566339;},'formatLength':_0x48adca,'clear':_0x3e971a};}};DC[a0_0x5a29('0x751')](_0x48fc71);}]);});
widgets/ContextMenu/Widget.html
@@ -1,3 +1,6 @@
<div>
    <div id="nav_box">
                    <ul id="nav-mainbox">
                     </ul>
                </div>
</div>
widgets/ContextMenu/Widget.js
@@ -18,16 +18,274 @@
            baseClass: 'jimu-widget-ContextMenu',
            name: 'ContextMenu',
            layers:{},
            yutiandata: null,
            startup: function () {
                this.inherited(arguments);
                let contextMenu = window.dcViewer.contextMenu
                contextMenu.enable = true
                contextMenu.addMenuItem('测试', () => {}, this)
                var that = this;
                let contextMenu = window.dcViewer.contextMenu;
                contextMenu.enable = true;
                document.oncontextmenu = function () {
                    $("#nav_box").stop().hide();
                    $("#nav_box").find("li").remove();
                    return false;
                }
                var handler = new Cesium.ScreenSpaceEventHandler(window.viewer.scene.canvas);
                handler.setInputAction(function(click){
                    contextMenu.hide();
                    $("#nav_box").stop().hide();
                    $("#nav_box").find("li").remove();
                },Cesium.ScreenSpaceEventType.LEFT_DOWN);
                contextMenu.addMenuItem('场景设置', () => {
                    $("#nav-mainbox").empty();
                    $("#mulu_rongqi").find("li").remove();
                    for (var i = 0; i < that.yutiandata.length; i++) {
                        if (that.yutiandata[i]["navParentId"] == 0) {
                            $(".sfoot img").stop().show();
                            $("#nav-mainbox").append("<li class='" + that.yutiandata[i]["navId"] + "'><span class='shead'></span><a>" + that.yutiandata[i]["navTitle"] + "</a><ul></ul></li>");
                        }
                        else {
                            break;
                        }
                    }
                    //x
                    var x = $('.dc-context-menu').css("transform").replace(/[^0-9\-,]/g, '').split(',')[4];
                    //y
                    var y = $('.dc-context-menu').css("transform").replace(/[^0-9\-,]/g, '').split(',')[5];
                    $("#nav_box").css({
                        "left": parseInt(x) + 123 + "px",
                        "top": parseInt(y) - 10 + "px"
                    }).stop().show()
                    $("#nav-mainbox").on("click", "li", function () {
                        if ($(this).text() == "开启雾天") {
                            window.viewer.scene.postProcessStages.removeAll();
                            if (that.yutiandata[1]["navTitle"] = "关闭雨天") {
                                that.yutiandata[1]["navTitle"] = "开启雨天"
                            }
                            if (that.yutiandata[2]["navTitle"] = "关闭雪天") {
                                that.yutiandata[2]["navTitle"] = "开启雪天"
                            }
                            if (that.yutiandata[3]["navTitle"] = "关闭日照") {
                                that.yutiandata[3]["navTitle"] = "开启日照"
                            }
                            var collection = window.viewer.scene.postProcessStages;
                            var fog = Cesium.PostProcessStageLibrary.createSnowStagew();
                            collection.add(fog);
                            $("#nav_box").stop().hide();
                            $("#nav_box").find("li").remove();
                            contextMenu.hide();
                            that.yutiandata[0]["navTitle"] = "关闭雾天"
                        }
                        else if ($(this).text() == "开启雨天") {
                            window.viewer.scene.postProcessStages.removeAll();
                            if (that.yutiandata[0]["navTitle"] = "关闭雾天") {
                                that.yutiandata[0]["navTitle"] = "开启雾天"
                            }
                            if (that.yutiandata[2]["navTitle"] = "关闭雪天") {
                                that.yutiandata[2]["navTitle"] = "开启雪天"
                            }
                            if (that.yutiandata[3]["navTitle"] = "关闭日照") {
                                that.yutiandata[3]["navTitle"] = "开启日照"
                            }
                            var collection = window.viewer.scene.postProcessStages;
                            var rain = Cesium.PostProcessStageLibrary.createSnowStagey();
                            collection.add(rain);
                            window.viewer.scene.skyAtmosphere.hueShift = -0.8;
                            window.viewer.scene.skyAtmosphere.saturationShift = -0.7;
                            window.viewer.scene.skyAtmosphere.brightnessShift = -0.33;
                            window.viewer.scene.fog.density = 0.001;
                            window.viewer.scene.fog.minimumBrightness = 0.8;
                            $("#nav_box").stop().hide();
                            $("#nav_box").find("li").remove();
                            contextMenu.hide();
                            that.yutiandata[1]["navTitle"] = "关闭雨天"
                        }
                        else if ($(this).text() == "开启雪天") {
                            window.viewer.scene.postProcessStages.removeAll();
                            if (that.yutiandata[0]["navTitle"] = "关闭雾天") {
                                that.yutiandata[0]["navTitle"] = "开启雾天"
                            }
                            if (that.yutiandata[1]["navTitle"] = "关闭雨天") {
                                that.yutiandata[1]["navTitle"] = "开启雨天"
                            }
                            if (that.yutiandata[3]["navTitle"] = "关闭日照") {
                                that.yutiandata[3]["navTitle"] = "开启日照"
                            }
                            var collection = window.viewer.scene.postProcessStages;
                            var snow = Cesium.PostProcessStageLibrary.createSnowStage();
                            collection.add(snow);
                            window.viewer.scene.skyAtmosphere.hueShift = -0.8;
                            window.viewer.scene.skyAtmosphere.saturationShift = -0.7;
                            window.viewer.scene.skyAtmosphere.brightnessShift = -0.33;
                            window.viewer.scene.fog.density = 0.001;
                            window.viewer.scene.fog.minimumBrightness = 0.8;
                            $("#nav_box").stop().hide();
                            $("#nav_box").find("li").remove();
                            contextMenu.hide();
                            that.yutiandata[2]["navTitle"] = "关闭雪天"
                        }
                        else if ($(this).text() == "开启日照") {
                            window.viewer.scene.postProcessStages.removeAll();
                            if (that.yutiandata[0]["navTitle"] = "关闭雾天") {
                                that.yutiandata[0]["navTitle"] = "开启雾天"
                            }
                            if (that.yutiandata[1]["navTitle"] = "关闭雨天") {
                                that.yutiandata[1]["navTitle"] = "开启雨天"
                            }
                            if (that.yutiandata[2]["navTitle"] = "关闭雪天") {
                                that.yutiandata[2]["navTitle"] = "开启雪天"
                            }
                            window.viewer.scene.postProcessStages.removeAll();
                            window.viewer.scene.globe.enableLighting = true//必须开启光照效果,
                            window.viewer.scene.dayAlpha = 0.0 //白天图层透明值
                            window.viewer.scene.nightAlpha = 3.0 //夜晚图层透明值
                            window.viewer.scene.brightness = 3.5 //图层发光亮度
                            $("#nav_box").stop().hide();
                            $("#nav_box").find("li").remove();
                            contextMenu.hide();
                            that.yutiandata[3]["navTitle"] = "关闭日照"
                        }
                        else if ($(this).text() == "关闭雨天") {
                            window.viewer.scene.postProcessStages.removeAll();
                            $("#nav_box").stop().hide();
                            $("#nav_box").find("li").remove();
                            contextMenu.hide();
                            that.yutiandata[1]["navTitle"] = "开启雨天"
                        }
                        else if ($(this).text() == "关闭雪天") {
                            window.viewer.scene.postProcessStages.removeAll();
                            $("#nav_box").stop().hide();
                            $("#nav_box").find("li").remove();
                            contextMenu.hide();
                            that.yutiandata[2]["navTitle"] = "开启雪天"
                        }
                        else if ($(this).text() == "关闭雾天") {
                            window.viewer.scene.postProcessStages.removeAll();
                            $("#nav_box").stop().hide();
                            $("#nav_box").find("li").remove();
                            contextMenu.hide();
                            that.yutiandata[0]["navTitle"] = "开启雾天"
                        }
                        else if ($(this).text() == "关闭日照") {
                            window.viewer.scene.postProcessStages.removeAll();
                            window.viewer.scene.globe.enableLighting = false//必须开启光照效果,
                            window.viewer.scene.dayAlpha = 1.0 //白天图层透明值
                            window.viewer.scene.nightAlpha = 0.0 //夜晚图层透明值
                            window.viewer.scene.brightness = 3.5 //图层发光亮度
                            $("#nav_box").stop().hide();
                            $("#nav_box").find("li").remove();
                            contextMenu.hide();
                            that.yutiandata[3]["navTitle"] = "开启日照"
                        }
                    });
                }, this)
                $(".menu-items").click(function () {
                    $("#nav_box").stop().hide();
                    $("#nav_box").find("li").remove();
                });
                //雾
                Cesium.PostProcessStageLibrary.createSnowStagew = function () {
                    var fog = new Cesium.PostProcessStage({
                        name: 'czm_fog',
                        fragmentShader: fs_fog()
                    });
                    return fog;
                }
                //雨
                Cesium.PostProcessStageLibrary.createSnowStagey = function () {
                    var rain = new Cesium.PostProcessStage({
                        name: 'czm_rain',
                        fragmentShader: fs_rain()
                    });
                    return rain;
                }
                Cesium.PostProcessStageLibrary.createSnowStage = function () {
                    var snow = new Cesium.PostProcessStage({
                        name: 'czm_snow',
                        fragmentShader: fs_snow()
                    });
                    return snow;
                }
                //雾
                function fs_fog() {
                    return "  uniform sampler2D colorTexture;\n" +
                        "  uniform sampler2D depthTexture;\n" +
                        "  varying vec2 v_textureCoordinates;\n" +
                        "  void main(void)\n" +
                        "  {\n" +
                        "      vec4 origcolor=texture2D(colorTexture, v_textureCoordinates);\n" +
                        "      vec4 fogcolor=vec4(0.8,0.8,0.8,0.5);\n" +
                        "\n" +
                        "      float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n" +
                        "      vec4 depthcolor=texture2D(depthTexture, v_textureCoordinates);\n" +
                        "\n" +
                        "      float f=(depthcolor.r-0.22)/0.5;\n" +
                        "      if(f<0.0) f=0.0;\n" +
                        "      else if(f>1.0) f=1.0;\n" +
                        "      gl_FragColor = mix(origcolor,fogcolor,f);\n" +
                        "   }"
                }
                //雨
                function fs_rain() {
                    return 'uniform sampler2D colorTexture;\n'
                        + 'varying vec2 v_textureCoordinates;\n'
                        + '    float hash(float x){\n'
                        + '         return fract(sin(x*133.3)*13.13);\n'
                        + '     }\n'
                        + '    void main(void){\n'
                        + '         float time = czm_frameNumber / 60.0;\n'
                        + '         vec2 resolution = czm_viewport.zw; \n'
                        + '         vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n'
                        + '         vec3 c=vec3(.6,.7,.8); \n'
                        + '         float a=-.4;\n'
                        + '         float si=sin(a),co=cos(a);\n'
                        + '         uv*=mat2(co,-si,si,co);\n'
                        + '         uv*=length(uv+vec2(0,4.9))*.3+1.;\n'
                        + '         float v=1.-sin(hash(floor(uv.x*100.))*2.);\n'
                        + '         float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*20.;\n'
                        + '         c*=v*b; \n'
                        + '         gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5); \n'
                        + '    }';
                }
                //雪
                function fs_snow() {
                    return 'uniform sampler2D colorTexture;\n'
                        + 'varying vec2 v_textureCoordinates;\n'
                        + 'float snow(vec2 uv,float scale)\n'
                        + '{\n'
                        + '    float time = czm_frameNumber / 60.0;\n'
                        + '    float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.;\n'
                        + '    uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale;\n'
                        + '    uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d;\n'
                        + '    p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k);\n'
                        + '    k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n'
                        + '    return k*w;\n'
                        + '}\n'
                        + 'void main(void){\n'
                        + '     vec2 resolution = czm_viewport.zw;\n'
                        + '     vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n'
                        + '     vec3 finalColor=vec3(0);\n'
                        + '     float c = 0.0;\n'
                        + '     c+=snow(uv,30.)*.0;\n'
                        + '     c+=snow(uv,20.)*.0;\n'
                        + '     c+=snow(uv,15.)*.0;\n'
                        + '     c+=snow(uv,10.);\n'
                        + '     c+=snow(uv,8.);\n'
                        + '     c+=snow(uv,6.);\n'
                        + '     c+=snow(uv,5.);\n'
                        + '     finalColor=(vec3(c));\n'
                        + '     gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5);\n'
                        + '}';
                }
            },
            onOpen: function () {
                var self = this;
                //面板打开的时候触发 (when open this panel trigger)
                $.getJSON("/widgets/ContextMenu/nav.json", function (data) {
                    self.yutiandata = data
                })
                $(".menu-item").append("<span class='sfoot'><img src='/widgets/ContextMenu/image/1.png' style='width:10px; height:10px;'/></span>");
            },
            onClose: function () {
widgets/ContextMenu/css/style.css
@@ -0,0 +1,77 @@
ul,
li {
    list-style: none;
}
a,
a:hover,
a:active,
a:link {
    text-decoration: none;
    color: #3d3d3d;
}
#nav_box {
    width: 160px;
    height: 250px;
    overflow: hidden;
    margin-top: 40px;
    position: fixed;
    display: none;
    display: block;
}
#nav_box #nav-mainbox {
    padding: 0;
}
#nav-mainbox li {
    background-color: #444d59;
    font-size: 14px;
    position: relative;
    line-height: 40px;
    cursor: pointer;
    border-bottom: 1px solid #dedede;
    border-bottom-style:inset;
}
#nav-mainbox li a{
    color: white;
}
#nav-mainbox li:hover{
    background-color: #ADADAD;
}
.shead{
    position: relative;
    width: 40px;
    height: 40px;
    top: 10px;
    padding: 10px;
}
.sfoot{
    position: relative;
    width: 40px;
    height: 40px;
    margin-left: 20px;
}
#nav-mainbox li ul{
    padding: 0;
}
#nav-mainbox li ul li {
    position: relative;
    padding-left: 70px;
    background-color: #3d3d3d;
    border-bottom: 1px solid #dedede;
    border-right: 1px solid #dedede;
}
#nav-mainbox li ul li:hover{
    background-color: #ccc;
}
widgets/Layermanagement/Widget.js
@@ -230,10 +230,14 @@
                // 获取鼠标事件
                var handler = new Cesium.ScreenSpaceEventHandler(this.map.scene.canvas);
                // 给鼠标左键添加事件函数
                handler.setInputAction(lang.hitch(this, this.clickHandLayer), Cesium.ScreenSpaceEventType.LEFT_CLICK);
                //handler.setInputAction(lang.hitch(this, this.clickHandLayer), Cesium.ScreenSpaceEventType.LEFT_CLICK);
                handler.setInputAction(lang.hitch(this, this.clickHandLayer), Cesium.ScreenSpaceEventType.LEFT_DOWN);
            },
            // 注册鼠标左键单击事件
            clickHandLayer: function (movement) {
                $("#nav_box").stop().hide();
                $("#nav_box").find("li").remove();
                var self = this;
                var pickRay = this.map.camera.getPickRay(movement.position);
                var featuresPromise = this.map.imageryLayers.pickImageryLayerFeatures(pickRay, this.map.scene);
widgets/Measurement/Widget.js
@@ -36,6 +36,8 @@
                    terrain: !1
                });
                $('#measuerLengths').click(function () {
                let contextMenu = window.dcViewer.contextMenu;
                contextMenu.enable = false;
                    measureSurface.measuerLength({
                        terrain: !1,
                        unit: _type,
@@ -43,12 +45,16 @@
                })
                $('#measuerLength2').click(function () {
                    let contextMenu = window.dcViewer.contextMenu;
                    contextMenu.enable = false;
                    measureSurface.measuerLength({
                        terrain: !0,
                        unit: _type,
                    })
                })
                $('#measureArea').click(function () {
                    let contextMenu = window.dcViewer.contextMenu;
                    contextMenu.enable = false;
                    measureSurface.measureArea({
                        unit: _type
                    });
@@ -56,6 +62,8 @@
                $('#measureHeight').click(function () {
                    let contextMenu = window.dcViewer.contextMenu;
                    contextMenu.enable = false;
                    measureSurface.measureHeight({
                        isSuper: !1,
                        unit: _type,
@@ -63,6 +71,8 @@
                })
                $('#measureHeight2').click(function () {
                    let contextMenu = window.dcViewer.contextMenu;
                    contextMenu.enable = false;
                    measureSurface.measureHeight({
                        isSuper: !0,
                        unit: _type,
@@ -76,6 +86,8 @@
                $('.xx').click(function () {
                    $('.jimu-widget-Measurement').hide()
                    measureSurface.clearMeasure()
                    let contextMenu = window.dcViewer.contextMenu;
                    contextMenu.enable = ture;
                })